diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/CHANGELOG.md b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/CHANGELOG.md index 1d86e532..b6cb067f 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/CHANGELOG.md +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/CHANGELOG.md @@ -1,3 +1,7 @@ +## 10.3.0 + +* Updated THEOplayer to 10.3.0. + ## 10.0.0 * Updated THEOplayer to 10.0.0. diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/android/app/build.gradle b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/android/app/build.gradle index 8a723a05..8e8eec10 100755 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/android/app/build.gradle +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/android/app/build.gradle @@ -22,7 +22,7 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -def theoplayerVersion ='10.0.0' +def theoplayerVersion ='10.3.0' android { namespace "com.theoplayer.theoplayer_example" diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/ios/Podfile.lock b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/ios/Podfile.lock index cf27fe60..3088148c 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/ios/Podfile.lock +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/ios/Podfile.lock @@ -2,14 +2,14 @@ PODS: - Flutter (1.0.0) - integration_test (0.0.1): - Flutter - - THEOplayer-Integration-THEOlive (10.0.0): - - THEOplayer-Integration-THEOlive/Base (= 10.0.0) - - THEOplayer-Integration-THEOlive/Base (10.0.0) + - THEOplayer-Integration-THEOlive (10.3.0): + - THEOplayer-Integration-THEOlive/Base (= 10.3.0) + - THEOplayer-Integration-THEOlive/Base (10.3.0) - theoplayer_ios (1.0.3): - Flutter - - THEOplayer-Integration-THEOlive (= 10.0.0) - - THEOplayerSDK-core (= 10.0.0) - - THEOplayerSDK-core (10.0.0) + - THEOplayer-Integration-THEOlive (= 10.3.0) + - THEOplayerSDK-core (= 10.3.0) + - THEOplayerSDK-core (10.3.0) DEPENDENCIES: - Flutter (from `Flutter`) @@ -32,9 +32,9 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e - THEOplayer-Integration-THEOlive: 8a6852c73f269e0263735a8e6181a983fb4c433e - theoplayer_ios: d76d3ca769cc15f63e6c650ee28e99072d8f87e6 - THEOplayerSDK-core: 3f5ed65e917eaba2285484bca09a818255fe268c + THEOplayer-Integration-THEOlive: 641f460f20a7647acc8a847eb363e9268c0b3acd + theoplayer_ios: 20d20eb47d0935d21f78c33b872265f5eacc1f9c + THEOplayerSDK-core: 016b6d611def0728abe37156e755af8441fb796b PODFILE CHECKSUM: a57f30d18f102dd3ce366b1d62a55ecbef2158e5 diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.chromeless.d.ts b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.chromeless.d.ts index 82d24c71..35c663e0 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.chromeless.d.ts +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.chromeless.d.ts @@ -2,7 +2,7 @@ * THEOplayer * https://www.theoplayer.com * - * Version: 10.0.0 + * Version: 10.3.0 */ -export { ABRConfiguration, ABRMetadata, ABRStrategy, ABRStrategyConfiguration, ABRStrategyType, AES128KeySystemConfiguration, AccessibilityRole, Ad, AdBreak, AdBreakEvent, AdBreakInit, AdBreakInterstitial, AdBufferingEvent, AdDescription, AdEvent, AdInit, AdIntegrationKind, AdMetadataEvent, AdPreloadType, AdReadyState, AdSkipEvent, AdSource, AdSourceType, AdType, AddCachingTaskEvent, AddTrackEvent, AddViewEvent, Ads, AdsConfiguration, AdsEventMap, AdsManagerLoadedEvent, AgamaAnalyticsIntegrationID, AgamaConfiguration, AgamaLogLevelType, AgamaPlayerConfiguration, AgamaServiceName, AgamaSourceConfiguration, AgamaStreamType, AirPlay, AnalyticsDescription, AnalyticsIntegrationID, AudioQuality, AxinomDRMConfiguration, AxinomIntegrationID, AzureDRMConfiguration, AzureIntegrationID, Base64Util, BaseSource, Boundary, BoundaryC3, BoundaryC7, BoundaryHalftime, BoundaryInfo, BufferSource, BufferedSegments, Cache, CacheEventMap, CacheStatus, CacheTaskStatus, CachingTask, CachingTaskEventMap, CachingTaskLicense, CachingTaskList, CachingTaskListEventMap, CachingTaskParameters, CanPlayEvent, CanPlayThroughEvent, Canvas, Cast, CastConfiguration, CastEventMap, CastState, CastStateChangeEvent, CertificateRequest, CertificateResponse, ChannelDrmConfigResponse, Chromecast, ChromecastConfiguration, ChromecastConnectionCallback, ChromecastError, ChromecastErrorCode, ChromecastErrorEvent, ChromecastEventMap, ChromecastMetadataDescription, ChromecastMetadataImage, ChromecastMetadataType, ChromelessPlayer, ClearkeyDecryptionKey, ClearkeyKeySystemConfiguration, Clip, ClipEventMap, ClosedCaptionFile, ComcastDRMConfiguration, ComcastIntegrationID, CommonUtils, CompanionAd, ConaxDRMConfiguration, ConaxIntegrationID, ContentProtectionError, ContentProtectionErrorCode, ContentProtectionErrorEvent, ContentProtectionIntegration, ContentProtectionIntegrationFactory, ContentProtectionRequest, ContentProtectionRequestSubType, ContentProtectionResponse, CrossOriginSetting, CsaiAdDescription, CurrentSourceChangeEvent, CustomAdIntegrationKind, CustomTextTrackMap, CustomTextTrackOptions, CustomWebVTTTextTrack, DAIAvailabilityType, DRMConfiguration, DRMTodayDRMConfiguration, DRMTodayIntegrationID, DashPlaybackConfiguration, DateRangeCue, DeliveryType, DeviceBasedTitaniumDRMConfiguration, DimensionChangeEvent, DirectionChangeEvent, DistributionLoadStartEvent, DistributionOfflineEvent, DurationChangeEvent, EdgeStyle, EmptiedEvent, EmsgCue, EncryptedEvent, EndedEvent, Endpoint, EndpointLoadedEvent, EnterBadNetworkModeEvent, ErrorCategory, ErrorCode, ErrorEvent, Event, EventDispatcher, EventListener, EventMap, EventStreamCue, EventedList, ExitBadNetworkModeEvent, ExpressPlayDRMConfiguration, ExpressPlayIntegrationID, EzdrmDRMConfiguration, EzdrmIntegrationID, FairPlayKeySystemConfiguration, FreeWheelAdDescription, FreeWheelAdUnitType, FreeWheelCue, FullscreenOptions, Geo, GlobalCast, GlobalChromecast, GoogleDAI, GoogleDAIConfiguration, GoogleDAILiveConfiguration, GoogleDAISSAIIntegrationID, GoogleDAITypedSource, GoogleDAIVodConfiguration, GoogleImaAd, GoogleImaConfiguration, HTTPHeaders, HespApi, HespApiEventMap, HespMediaType, HespSourceConfiguration, HespTypedSource, HlsDiscontinuityAlignment, HlsPlaybackConfiguration, ID3AttachedPicture, ID3BaseFrame, ID3Comments, ID3CommercialFrame, ID3Cue, ID3Frame, ID3GenericEncapsulatedObject, ID3InvolvedPeopleList, ID3PositionSynchronisationFrame, ID3PrivateFrame, ID3SynchronizedLyricsText, ID3TermsOfUse, ID3Text, ID3UniqueFileIdentifier, ID3Unknown, ID3UnsynchronisedLyricsTextTranscription, ID3UrlLink, ID3UserDefinedText, ID3UserDefinedUrlLink, ID3Yospace, IMAAdDescription, IntentToFallbackEvent, InterceptableRequest, InterceptableResponse, Interstitial, InterstitialEvent, InterstitialType, IrdetoDRMConfiguration, IrdetoIntegrationID, JoinStrategy, KeyOSDRMConfiguration, KeyOSFairplayKeySystemConfiguration, KeyOSIntegrationID, KeyOSKeySystemConfiguration, KeySystemConfiguration, KeySystemId, Latencies, LatencyConfiguration, LatencyManager, LayoutChangeEvent, LicenseRequest, LicenseResponse, LicenseType, LinearAd, List, LoadedDataEvent, LoadedMetadataEvent, MaybeAsync, MeasurableNetworkEstimator, MediaError, MediaErrorCode, MediaFile, MediaMelonConfiguration, MediaTailorSource, MediaTrack, MediaTrackEventMap, MediaTrackList, MediaType, MetadataDescription, Metrics, Millicast, MillicastEventMap, MillicastMetadataCue, MillicastSource, MillicastStatsEvent, MoatAnalyticsIntegrationID, MoatConfiguration, MutedAutoplayConfiguration, Network, NetworkEstimator, NetworkEstimatorController, NetworkEventMap, NetworkInterceptorController, NodeStyleVoidCallback, NonLinearAd, OverlayInterstitial, OverlayPosition, OverlaySize, PauseEvent, PiPConfiguration, PiPPosition, PlayEvent, PlayReadyKeySystemConfiguration, PlayStation5Configuration, PlayStation5PlayMode, ChromelessPlayer as Player, PlayerConfiguration, PlayerEventMap, PlayerList, PlayingEvent, PreloadType, Presentation, PresentationEventMap, PresentationMode, PresentationModeChangeEvent, ProgressEvent, Quality, QualityEvent, QualityEventMap, QualityList, RateChangeEvent, ReadyStateChangeEvent, RemoveCachingTaskEvent, RemoveTrackEvent, RemoveViewEvent, Representation, RepresentationChangeEvent, Request, RequestBody, RequestInit, RequestInterceptor, RequestLike, RequestMeasurer, RequestMethod, RequestSubType, RequestType, ResponseBody, ResponseInit, ResponseInterceptor, ResponseLike, ResponseType, RetryConfiguration, SSAIIntegrationId, SeamlessPeriodSwitchStrategy, SeamlessSwitchStrategy, SeekedEvent, SeekingEvent, ServerSideAdInsertionConfiguration, ServerSideAdIntegrationController, ServerSideAdIntegrationFactory, ServerSideAdIntegrationHandler, SkippedAdStrategy, SmartSightConfiguration, SmartSightIntegrationID, Source, SourceAbrConfiguration, SourceChangeEvent, SourceConfiguration, SourceDescription, SourceIntegrationId, SourceLatencyConfiguration, Sources, SpotXAdDescription, SpotxData, SpotxQueryParameter, StateChangeEvent, StereoChangeEvent, StreamOneAnalyticsIntegrationID, StreamOneConfiguration, StreamType, StringKeyOf, StylePropertyRecord, SupportedCustomTextTrackCueTypes, THEOplayerError, TTMLCue, TTMLExtent, TargetQualityChangedEvent, TextTrack, TextTrackAddCueEvent, TextTrackCue, TextTrackCueChangeEvent, TextTrackCueEnterEvent, TextTrackCueEventMap, TextTrackCueExitEvent, TextTrackCueList, TextTrackCueUpdateEvent, TextTrackDescription, TextTrackEnterCueEvent, TextTrackError, TextTrackErrorCode, TextTrackErrorEvent, TextTrackEventMap, TextTrackExitCueEvent, TextTrackReadyState, TextTrackReadyStateChangeEvent, TextTrackRemoveCueEvent, TextTrackStyle, TextTrackStyleEventMap, TextTrackType, TextTrackTypeChangeEvent, TextTrackUpdateCueEvent, TextTracksList, TheoAdDescription, TheoAds, TheoAdsEventsMap, TheoAdsLayout, TheoAdsLayoutOverride, TheoLiveApi, TheoLiveApiEventMap, TheoLiveConfiguration, TheoLivePublication, TheoLiveSource, ThumbnailResolution, TimeRanges, TimeUpdateEvent, TitaniumDRMConfiguration, TitaniumIntegrationID, TokenBasedTitaniumDRMConfiguration, Track, TrackChangeEvent, TrackEventMap, TrackList, TrackListEventMap, TrackUpdateEvent, TypedSource, UIConfiguration, UILanguage, UIPlayerConfiguration, UniversalAdId, UpdateQualityEvent, Uplynk, UplynkAd, UplynkAdBeginEvent, UplynkAdBreak, UplynkAdBreakBeginEvent, UplynkAdBreakEndEvent, UplynkAdBreakEventMap, UplynkAdBreakList, UplynkAdBreakListEventMap, UplynkAdBreakSkipEvent, UplynkAdCompleteEvent, UplynkAdEndEvent, UplynkAdEventMap, UplynkAdFirstQuartileEvent, UplynkAdList, UplynkAdListEventMap, UplynkAdMidpointEvent, UplynkAdThirdQuartileEvent, UplynkAddAdBreakEvent, UplynkAddAssetEvent, UplynkAds, UplynkAsset, UplynkAssetEventMap, UplynkAssetId, UplynkAssetInfoResponse, UplynkAssetInfoResponseEvent, UplynkAssetList, UplynkAssetMovieRating, UplynkAssetTvRating, UplynkAssetType, UplynkConfiguration, UplynkDRMConfiguration, UplynkEventMap, UplynkExternalId, UplynkIntegrationID, UplynkPingConfiguration, UplynkPingErrorEvent, UplynkPingResponse, UplynkPingResponseEvent, UplynkPreplayBaseResponse, UplynkPreplayLiveResponse, UplynkPreplayResponse, UplynkPreplayResponseEvent, UplynkPreplayResponseType, UplynkPreplayVodResponse, UplynkRemoveAdBreakEvent, UplynkRemoveAdEvent, UplynkRemoveAssetEvent, UplynkResponseDrm, UplynkResponseLiveAd, UplynkResponseLiveAdBreak, UplynkResponseLiveAds, UplynkResponseVodAd, UplynkResponseVodAdBreak, UplynkResponseVodAdBreakOffset, UplynkResponseVodAdPlaceholder, UplynkResponseVodAds, UplynkSource, UplynkUiConfiguration, UplynkUpdateAdBreakEvent, UserActions, VPAIDMode, VR, VRConfiguration, VRDirection, VREventMap, VRPanoramaMode, VRState, VRStereoMode, VTTAlignSetting, VTTDirectionSetting, VTTLine, VTTLineAlignSetting, VTTPosition, VTTPositionAlignSetting, VTTScrollSetting, VastExtension, VendorCast, VendorCastEventMap, VerimatrixDRMConfiguration, VerimatrixIntegrationID, VideoFrameCallbackMetadata, VideoFrameRequestCallback, VideoQuality, ViewChangeEvent, ViewPositionChangeEvent, VimondDRMConfiguration, VimondIntegrationID, Visibility, VisibilityObserver, VisibilityObserverCallback, VoidPromiseCallback, VolumeChangeEvent, VudrmDRMConfiguration, VudrmIntegrationID, WaitUntilCallback, WaitingEvent, WebAudio, WebVTTCue, WebVTTRegion, WidevineKeySystemConfiguration, XstreamDRMConfiguration, XstreamIntegrationID, YospaceId, YouboraAnalyticsIntegrationID, YouboraOptions, cache, cast, features, players, registerContentProtectionIntegration, utils, version } from './THEOplayer.common'; +export { ABRConfiguration, ABRMetadata, ABRStrategy, ABRStrategyConfiguration, ABRStrategyType, AES128KeySystemConfiguration, AccessibilityRole, Ad, AdBreak, AdBreakEvent, AdBreakInit, AdBreakInterstitial, AdBufferingEvent, AdDescription, AdEvent, AdInit, AdIntegrationKind, AdMetadataEvent, AdPreloadType, AdReadyState, AdSkipEvent, AdSource, AdSourceType, AdType, AddCachingTaskEvent, AddTrackEvent, AddViewEvent, Ads, AdsConfiguration, AdsEventMap, AdsManagerLoadedEvent, AgamaAnalyticsIntegrationID, AgamaConfiguration, AgamaLogLevelType, AgamaPlayerConfiguration, AgamaServiceName, AgamaSourceConfiguration, AgamaStreamType, AirPlay, AnalyticsDescription, AnalyticsIntegrationID, AudioQuality, AxinomDRMConfiguration, AxinomIntegrationID, AzureDRMConfiguration, AzureIntegrationID, Base64Util, BaseSource, Boundary, BoundaryC3, BoundaryC7, BoundaryHalftime, BoundaryInfo, BufferSource, BufferedSegments, Cache, CacheEventMap, CacheStatus, CacheTaskStatus, CachingTask, CachingTaskEventMap, CachingTaskLicense, CachingTaskList, CachingTaskListEventMap, CachingTaskParameters, CanPlayEvent, CanPlayThroughEvent, Canvas, Cast, CastConfiguration, CastEventMap, CastState, CastStateChangeEvent, CertificateRequest, CertificateResponse, ChannelDrmConfigResponse, ChannelMillicastSource, Chromecast, ChromecastConfiguration, ChromecastConnectionCallback, ChromecastError, ChromecastErrorCode, ChromecastErrorEvent, ChromecastEventMap, ChromecastMetadataDescription, ChromecastMetadataImage, ChromecastMetadataType, ChromelessPlayer, ClearkeyDecryptionKey, ClearkeyKeySystemConfiguration, Clip, ClipEventMap, ClosedCaptionFile, ComcastDRMConfiguration, ComcastIntegrationID, CommonUtils, CompanionAd, ConaxDRMConfiguration, ConaxIntegrationID, ContentProtectionError, ContentProtectionErrorCode, ContentProtectionErrorEvent, ContentProtectionIntegration, ContentProtectionIntegrationFactory, ContentProtectionRequest, ContentProtectionRequestSubType, ContentProtectionResponse, CrossOriginSetting, CsaiAdDescription, CurrentSourceChangeEvent, CustomAdIntegrationKind, CustomTextTrackMap, CustomTextTrackOptions, CustomWebVTTTextTrack, DAIAvailabilityType, DRMConfiguration, DRMTodayDRMConfiguration, DRMTodayIntegrationID, DashPlaybackConfiguration, DateRangeCue, DeliveryType, DeviceBasedTitaniumDRMConfiguration, DimensionChangeEvent, DirectionChangeEvent, DistributionLoadStartEvent, DistributionOfflineEvent, DurationChangeEvent, EdgeStyle, EmptiedEvent, EmsgCue, EncryptedEvent, EndedEvent, Endpoint, EndpointLoadedEvent, EnterBadNetworkModeEvent, ErrorCategory, ErrorCode, ErrorEvent, Event, EventDispatcher, EventListener, EventMap, EventStreamCue, EventedList, ExitBadNetworkModeEvent, ExpressPlayDRMConfiguration, ExpressPlayIntegrationID, EzdrmDRMConfiguration, EzdrmIntegrationID, FairPlayKeySystemConfiguration, FreeWheelAdDescription, FreeWheelAdUnitType, FreeWheelCue, FullscreenOptions, Geo, GlobalCast, GlobalChromecast, GoogleDAI, GoogleDAIConfiguration, GoogleDAILiveConfiguration, GoogleDAISSAIIntegrationID, GoogleDAITypedSource, GoogleDAIVodConfiguration, GoogleImaAd, GoogleImaConfiguration, HTTPHeaders, HTTPHeadersInit, HespApi, HespApiEventMap, HespMediaType, HespSourceConfiguration, HespTypedSource, HlsDiscontinuityAlignment, HlsPlaybackConfiguration, ID3AttachedPicture, ID3BaseFrame, ID3Comments, ID3CommercialFrame, ID3Cue, ID3Frame, ID3GenericEncapsulatedObject, ID3InvolvedPeopleList, ID3PositionSynchronisationFrame, ID3PrivateFrame, ID3SynchronizedLyricsText, ID3TermsOfUse, ID3Text, ID3UniqueFileIdentifier, ID3Unknown, ID3UnsynchronisedLyricsTextTranscription, ID3UrlLink, ID3UserDefinedText, ID3UserDefinedUrlLink, ID3Yospace, IMAAdDescription, IntentToFallbackEvent, InterceptableRequest, InterceptableResponse, Interstitial, InterstitialEvent, InterstitialType, IrdetoDRMConfiguration, IrdetoIntegrationID, JoinStrategy, KeyOSDRMConfiguration, KeyOSFairplayKeySystemConfiguration, KeyOSIntegrationID, KeyOSKeySystemConfiguration, KeySystemConfiguration, KeySystemId, Latencies, LatencyConfiguration, LatencyManager, LayoutChangeEvent, LicenseRequest, LicenseResponse, LicenseType, LinearAd, List, LoadedDataEvent, LoadedMetadataEvent, ManifestErrorEvent, MaybeAsync, MeasurableNetworkEstimator, MediaError, MediaErrorCode, MediaFile, MediaMelonConfiguration, MediaTailorSource, MediaTrack, MediaTrackEventMap, MediaTrackList, MediaTrackType, MediaType, MetadataDescription, Metrics, Millicast, MillicastEventMap, MillicastMetadataCue, MillicastSource, MillicastStatsEvent, MoatAnalyticsIntegrationID, MoatConfiguration, MutedAutoplayConfiguration, Network, NetworkEstimator, NetworkEstimatorController, NetworkEventMap, NetworkInterceptorController, NodeStyleVoidCallback, NonLinearAd, OverlayInterstitial, OverlayPosition, OverlaySize, PauseEvent, PiPConfiguration, PiPPosition, PlayEvent, PlayReadyKeySystemConfiguration, PlayStation5Configuration, PlayStation5PlayMode, ChromelessPlayer as Player, PlayerConfiguration, PlayerEventMap, PlayerList, PlayingEvent, PreloadType, Presentation, PresentationEventMap, PresentationMode, PresentationModeChangeEvent, ProgressEvent, Quality, QualityEvent, QualityEventMap, QualityList, RateChangeEvent, ReadyStateChangeEvent, RemoveCachingTaskEvent, RemoveTrackEvent, RemoveViewEvent, Representation, RepresentationChangeEvent, Request, RequestBody, RequestInit, RequestInterceptor, RequestLike, RequestMeasurer, RequestMethod, RequestSubType, RequestType, ResponseBody, ResponseInit, ResponseInterceptor, ResponseLike, ResponseType, RetryConfiguration, SSAIIntegrationId, SeamlessPeriodSwitchStrategy, SeamlessSwitchStrategy, SeekedEvent, SeekingEvent, SegmentErrorEvent, ServerSideAdInsertionConfiguration, ServerSideAdIntegrationController, ServerSideAdIntegrationFactory, ServerSideAdIntegrationHandler, SkippedAdStrategy, SmartSightConfiguration, SmartSightIntegrationID, Source, SourceAbrConfiguration, SourceChangeEvent, SourceConfiguration, SourceDescription, SourceIntegrationId, SourceLatencyConfiguration, Sources, SpotXAdDescription, SpotxData, SpotxQueryParameter, StateChangeEvent, StereoChangeEvent, StreamOneAnalyticsIntegrationID, StreamOneConfiguration, StreamType, StringKeyOf, StylePropertyRecord, SupportedCustomTextTrackCueTypes, THEOplayerError, TTMLCue, TTMLExtent, TargetQualityChangedEvent, TextTrack, TextTrackAddCueEvent, TextTrackCue, TextTrackCueChangeEvent, TextTrackCueEnterEvent, TextTrackCueEventMap, TextTrackCueExitEvent, TextTrackCueList, TextTrackCueUpdateEvent, TextTrackDescription, TextTrackEnterCueEvent, TextTrackError, TextTrackErrorCode, TextTrackErrorEvent, TextTrackEventMap, TextTrackExitCueEvent, TextTrackReadyState, TextTrackReadyStateChangeEvent, TextTrackRemoveCueEvent, TextTrackStyle, TextTrackStyleEventMap, TextTrackType, TextTrackTypeChangeEvent, TextTrackUpdateCueEvent, TextTracksList, TheoAdDescription, TheoAds, TheoAdsEventsMap, TheoAdsLayout, TheoAdsLayoutOverride, TheoLiveApi, TheoLiveApiEventMap, TheoLiveConfiguration, TheoLivePublication, TheoLiveSource, ThumbnailResolution, TimeRanges, TimeUpdateEvent, TitaniumDRMConfiguration, TitaniumIntegrationID, TokenBasedTitaniumDRMConfiguration, Track, TrackChangeEvent, TrackEventMap, TrackList, TrackListEventMap, TrackUpdateEvent, TypedSource, UIConfiguration, UILanguage, UIPlayerConfiguration, UniversalAdId, UpdateQualityEvent, Uplynk, UplynkAd, UplynkAdBeginEvent, UplynkAdBreak, UplynkAdBreakBeginEvent, UplynkAdBreakEndEvent, UplynkAdBreakEventMap, UplynkAdBreakList, UplynkAdBreakListEventMap, UplynkAdBreakSkipEvent, UplynkAdCompleteEvent, UplynkAdEndEvent, UplynkAdEventMap, UplynkAdFirstQuartileEvent, UplynkAdList, UplynkAdListEventMap, UplynkAdMidpointEvent, UplynkAdThirdQuartileEvent, UplynkAddAdBreakEvent, UplynkAddAssetEvent, UplynkAds, UplynkAsset, UplynkAssetEventMap, UplynkAssetId, UplynkAssetInfoResponse, UplynkAssetInfoResponseEvent, UplynkAssetList, UplynkAssetMovieRating, UplynkAssetTvRating, UplynkAssetType, UplynkConfiguration, UplynkDRMConfiguration, UplynkEventMap, UplynkExternalId, UplynkIntegrationID, UplynkPingConfiguration, UplynkPingErrorEvent, UplynkPingResponse, UplynkPingResponseEvent, UplynkPreplayBaseResponse, UplynkPreplayLiveResponse, UplynkPreplayResponse, UplynkPreplayResponseEvent, UplynkPreplayResponseType, UplynkPreplayVodResponse, UplynkRemoveAdBreakEvent, UplynkRemoveAdEvent, UplynkRemoveAssetEvent, UplynkResponseDrm, UplynkResponseLiveAd, UplynkResponseLiveAdBreak, UplynkResponseLiveAds, UplynkResponseVodAd, UplynkResponseVodAdBreak, UplynkResponseVodAdBreakOffset, UplynkResponseVodAdPlaceholder, UplynkResponseVodAds, UplynkSource, UplynkUiConfiguration, UplynkUpdateAdBreakEvent, UserActions, VPAIDMode, VR, VRConfiguration, VRDirection, VREventMap, VRPanoramaMode, VRState, VRStereoMode, VTTAlignSetting, VTTDirectionSetting, VTTLine, VTTLineAlignSetting, VTTPosition, VTTPositionAlignSetting, VTTScrollSetting, VastExtension, VendorCast, VendorCastEventMap, VerimatrixDRMConfiguration, VerimatrixIntegrationID, VideoFrameCallbackMetadata, VideoFrameRequestCallback, VideoQuality, ViewChangeEvent, ViewPositionChangeEvent, VimondDRMConfiguration, VimondIntegrationID, Visibility, VisibilityObserver, VisibilityObserverCallback, VoidPromiseCallback, VolumeChangeEvent, VudrmDRMConfiguration, VudrmIntegrationID, WaitUntilCallback, WaitingEvent, WebAudio, WebVTTCue, WebVTTRegion, WidevineKeySystemConfiguration, XstreamDRMConfiguration, XstreamIntegrationID, YospaceId, YouboraAnalyticsIntegrationID, YouboraOptions, cache, cast, features, players, registerContentProtectionIntegration, utils, version } from './THEOplayer.common'; export as namespace THEOplayer; diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.chromeless.esm.js b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.chromeless.esm.js index cc9f1b14..ce6c01b2 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.chromeless.esm.js +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.chromeless.esm.js @@ -34,8 +34,8 @@ THEOplayer is based on patented technology developed by THEO Technologies (https://www.theoplayer.com). - Version: 10.0.0 - Created: 2025-09-12T12:50:32.290Z + Version: 10.3.0 + Created: 2025-10-23T15:33:11.023Z */ var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window;a.document,a.location,a.navigator,a.setTimeout,a.clearTimeout,a.setInterval,a.clearInterval,a.Error,a.TypeError,a.SyntaxError,a.Object,a.Math,a.parseInt,a.parseFloat,a.isNaN,a.Uint8Array,a.Worker,a.WorkerGlobalScope,a.XMLHttpRequest;import{O as e,P as o,Sa as r,Ta as t,Ua as l,Va as i,Wa as n,Xa as f,bb as d,c as y,db as b}from"./THEOplayer.common.esm.js";y(),y();export{r as ChromelessPlayer,o as ErrorCategory,e as ErrorCode,r as Player,b as cache,d as cast,l as features,n as players,f as registerContentProtectionIntegration,t as utils,i as version}; //# sourceMappingURL=THEOplayer.chromeless.esm.js.map \ No newline at end of file diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.chromeless.js b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.chromeless.js index 4fa06dda..935f3238 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.chromeless.js +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.chromeless.js @@ -33,8 +33,8 @@ THEOplayer is based on patented technology developed by THEO Technologies (https://www.theoplayer.com). - Version: 10.0.0 - Created: 2025-09-12T12:50:32.290Z + Version: 10.3.0 + Created: 2025-10-23T15:33:11.023Z */ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(t):"function"==typeof define&&define.amd?define([],function(){return n(t)}):t.THEOplayer=n(t)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this,function(t){"use strict";var n,i,r,e,s,u,o,h,c,a={exports:{}},f=(a.exports,t.window),v=t.document,d=t.location,l=t.navigator,w=t.setTimeout,g=t.clearTimeout,_=t.setInterval,m=t.clearInterval,y=t.Error,p=t.TypeError,k=(t.SyntaxError,t.Object),b=t.Math,A=t.parseInt,T=t.parseFloat,S=t.isNaN,E=t.Uint8Array,I=t.Worker,R=(t.WorkerGlobalScope,t.XMLHttpRequest),C=k.create,D=k.defineProperty,P=k.getOwnPropertyDescriptor,N=k.getOwnPropertyNames,B=k.getPrototypeOf,x=k.prototype.hasOwnProperty,O=function(t,n){return function(){return t&&(n=t(t=0)),n}},M=function(t,n){return function(){return n||t((n={exports:{}}).exports,n),n.exports}},L=function(t,n,i,r){if(n&&"object"==typeof n||"function"==typeof n)for(var e,s=N(n),u=0,o=s.length;u0;)n.shift()();i=!1}}).AQ,wt.itn=ct.M6,wt.rtn=function(t){try{var n=rt(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}w(function(){throw new y("Unhandled promise rejection: ".concat(t))},0)})}),Et=O(function(){St()});function It(t,n){return(It=k.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}var Rt=O(function(){F(),Et()});function Ct(t,n){if("function"!=typeof n&&null!==n)throw new p("Super expression must either be null or a function");t.prototype=k.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&It(t,n)}var Dt=O(function(){F(),Et(),Rt()});function Pt(t,n){for(var i=0;it.length)&&(n=t.length);for(var i=0,r=new Array(n);i=t.length?{done:!0}:{done:!1,value:t[s++]}}}throw new p("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Ut=O(function(){F(),Et(),Mt()});function Ft(t,n,i,r,e,s,u){try{var o=t[s](u),h=o.value}catch(t){return void i(t)}o.done?n(h):ut.resolve(h).then(r,e)}function Vt(t){return function(){var n=this,i=arguments;return new ut(function(r,e){var s=t.apply(n,i);function u(t){Ft(s,r,e,u,o,"next",t)}function o(t){Ft(s,r,e,u,o,"throw",t)}u(void 0)})}}var Ht,Wt=O(function(){F(),Et()});function zt(t,i){var e,s,u,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},h=k.create(("function"==typeof Iterator?Iterator:k).prototype);return h.next=c(0),h.throw=c(1),h.return=c(2),"function"==typeof n&&(h[r]=function(){return this}),h;function c(n){return function(r){return function(n){if(e)throw new p("Generator is already executing.");for(;h&&(h=0,n[0]&&(o=0)),o;)try{if(e=1,s&&(u=2&n[0]?s.return:n[0]?s.throw||((u=s.return)&&u.call(s),0):s.next)&&!(u=u.call(s,n[1])).done)return u;switch(s=0,u&&(n=[2&n[0],u.value]),n[0]){case 0:case 1:u=n;break;case 4:return o.label++,{value:n[1],done:!1};case 5:o.label++,s=n[1],n=[0];continue;case 7:n=o.ops.pop(),o.trys.pop();continue;default:if(!(u=o.trys,(u=u.length>0&&u[u.length-1])||6!==n[0]&&2!==n[0])){o=0;continue}if(3===n[0]&&(!u||n[1]>u[0]&&n[1]=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new p(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function qt(t,n,i){if(null!=n){if("object"!=typeof n&&"function"!=typeof n)throw new p("Object expected.");var r,u;if(i){if(!s)throw new p("Symbol.asyncDispose is not defined.");r=n[s]}if(void 0===r){if(!e)throw new p("Symbol.dispose is not defined.");r=n[e],i&&(u=r)}if("function"!=typeof r)throw new p("Object not disposable.");u&&(r=function(){try{u.call(this)}catch(t){return ut.reject(t)}}),t.stack.push({value:n,dispose:r,async:i})}else i&&t.stack.push({async:!0});return n}function Gt(t){function n(n){t.error=t.hasError?new Ht(n,t.error,"An error was suppressed during disposal."):n,t.hasError=!0}var i,r=0;return function e(){for(;i=t.stack.pop();)try{if(!i.async&&1===r)return r=0,t.stack.push(i),ut.resolve().then(e);if(i.dispose){var s=i.dispose.call(i.value);if(i.async)return r|=2,ut.resolve(s).then(e,function(t){return n(t),e()})}else r|=1}catch(t){n(t)}if(1===r)return t.hasError?ut.reject(t.error):ut.resolve();if(t.hasError)throw t.error}()}var jt=O(function(){F(),Et(),Ht="function"==typeof SuppressedError?SuppressedError:function(t,n,i){var r=new y(i);return r.name="SuppressedError",r.error=t,r.suppressed=n,r}}),Qt=O(function(){F(),Et(),jt()}),Yt=M(function(t,i){var e,s;F(),Et(),at(),e=t,s=function(t){var i="function"==typeof n&&"symbol"===W(r)?n:function(t){return"Symbol("+t+")"};function e(){}var s=Number.isNaN||function(t){return t!=t},u=e;function o(t){return"object"===(void 0===t?"undefined":W(t))&&null!==t||"function"==typeof t}function h(t){return t.slice()}function c(t,n,i,r,e){new E(t).set(new E(i,r,e),n)}function a(t){return!1!==function(t){return"number"==typeof t&&(!s(t)&&!(t<0))}(t)&&t!==1/0}function f(t,n,i){if("function"!=typeof t)throw new p("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function v(t,n,i,r){var e=t[n];if(void 0!==e){if("function"!=typeof e)throw new p(e+" is not a method");switch(i){case 0:return function(){return l(e,t,r)};case 1:return function(n){var i=[n].concat(r);return l(e,t,i)}}}return function(){return I(void 0)}}function d(t,n,i){var r=t[n];if(void 0!==r)return f(r,t,i)}function l(t,n,i){try{return I(f(t,n,i))}catch(t){return R(t)}}function w(t){if(t=Number(t),s(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function g(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new p("size property of a queuing strategy must be a function");return function(n){return t(n)}}var _=ut,m=ut.prototype.then,A=ut.resolve.bind(_),T=ut.reject.bind(_);function S(t){return new _(t)}function I(t){return A(t)}function R(t){return T(t)}function C(t,n,i){return m.call(t,n,i)}function D(t,n,i){C(C(t,n,i),void 0,u)}function P(t,n){D(t,n)}function N(t,n){D(t,void 0,n)}function B(t,n,i){return C(t,n,i)}function x(t){C(t,void 0,u)}var O=function(){function t(){this.Rd=0,this.Dd=0,this.Ld={Od:[],Fd:void 0},this.Ud=this.Ld,this.Rd=0,this.Dd=0}return k.defineProperty(t.prototype,"length",{get:function(){return this.Dd},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.Ud,i=n;16383===n.Od.length&&(i={Od:[],Fd:void 0}),n.Od.push(t),i!==n&&(this.Ud=i,n.Fd=i),++this.Dd},t.prototype.shift=function(){var t=this.Ld,n=t,i=this.Rd,r=i+1,e=t.Od,s=e[i];return 16384===r&&(n=t.Fd,r=0),--this.Dd,this.Rd=r,t!==n&&(this.Ld=n),e[i]=void 0,s},t.prototype.forEach=function(t){for(var n=this.Rd,i=this.Ld,r=i.Od;!(n===r.length&&void 0===i.Fd||n===r.length&&(n=0,0===(r=(i=i.Fd).Od).length));)t(r[n]),++n},t.prototype.peek=function(){var t=this.Ld,n=this.Rd;return t.Od[n]},t}();function M(t,n,i){var r=null;!0===i&&(r=k.prototype);var e=k.create(r);return e.value=t,e.done=n,e}function L(t,n){t.Vd=!0,t.Hd=n,n.Wd=t,"readable"===n.Ra?H(t):"closed"===n.Ra?function(t){H(t),q(t)}(t):z(t,n.qd)}function U(t,n){return Jn(t.Hd,n)}function F(t){"readable"===t.Hd.Ra?X(t,new p("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){z(t,n)}(t,new p("Reader was released and can no longer be used to monitor the stream's closedness")),t.Hd.Wd=void 0,t.Hd=void 0}function V(t){return new p("Cannot "+t+" a stream using a released reader")}function H(t){t.zd=S(function(n,i){t.Gd=n,t.Xd=i})}function z(t,n){H(t),X(t,n)}function X(t,n){x(t.zd),t.Xd(n),t.Gd=void 0,t.Xd=void 0}function q(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0}var G=i("[[CancelSteps]]"),j=i("[[PullSteps]]");function Q(t,n){void 0===n&&(n=!1);var i=new nt(t);return i.Vd=n,i}function Y(t){return S(function(n,i){var r={Qd:n,Kd:i};t.Wd.Yd.push(r)})}function K(t,n,i){var r=t.Wd;r.Yd.shift().Qd(M(n,i,r.Vd))}function J(t){return t.Wd.Yd.length}function Z(t){var n=t.Wd;return void 0!==n&&!!it(n)}var $,tt,nt=function(){function t(t){if(!1===Yn(t))throw new p("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Kn(t))throw new p("This stream has already been locked for exclusive reading by another reader");L(this,t),this.Yd=new O}return k.defineProperty(t.prototype,"closed",{get:function(){return it(this)?this.zd:R(et("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return it(this)?void 0===this.Hd?R(V("cancel")):U(this,t):R(et("cancel"))},t.prototype.read=function(){return it(this)?void 0===this.Hd?R(V("read from")):rt(this):R(et("read"))},t.prototype.releaseLock=function(){if(!it(this))throw et("releaseLock");if(void 0!==this.Hd){if(this.Yd.length>0)throw new p("Tried to release a reader lock when that reader has pending read() calls un-settled");F(this)}},t}();function it(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Yd")}function rt(t){var n=t.Hd;return n.Jd=!0,"closed"===n.Ra?I(M(void 0,!0,t.Vd)):"errored"===n.Ra?R(n.qd):n.Zd[j]()}function et(t){return new p("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"===W(i.asyncIterator)&&(($={})[i.asyncIterator]=function(){return this},tt=$,k.defineProperty(tt,i.asyncIterator,{enumerable:!1}));var st={next:function(){if(!1===ot(this))return R(ht("next"));var t=this.$d;return void 0===t.Hd?R(V("iterate")):B(rt(t),function(n){var i=n.done;return i&&F(t),M(n.value,i,!0)})},return:function(t){if(!1===ot(this))return R(ht("next"));var n=this.$d;if(void 0===n.Hd)return R(V("finish iterating"));if(n.Yd.length>0)return R(new p("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.ul){var i=U(n,t);return F(n),B(i,function(){return M(t,!0,!0)})}return F(n),I(M(t,!0,!0))}};function ot(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"$d")}function ht(t){return new p("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function ct(t){var n=t.tf.shift();return t.if-=n.size,t.if<0&&(t.if=0),n.value}function at(t,n,i){if(!a(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.tf.push({value:n,size:i}),t.if+=i}function ft(t){t.tf=new O,t.if=0}void 0!==tt&&k.setPrototypeOf(st,tt),k.defineProperty(st,"next",{enumerable:!1}),k.defineProperty(st,"return",{enumerable:!1});var vt=i("[[AbortSteps]]"),dt=i("[[ErrorSteps]]"),lt=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),gt(this);var i=n.size,r=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var e=g(i);void 0===r&&(r=1),function(t,n,i,r){var e=k.create(xt.prototype);function s(){return d(n,"start",[e])}var u=v(n,"write",1,[e]),o=v(n,"close",0,[]),h=v(n,"abort",1,[]);Ot(t,e,s,u,o,h,i,r)}(this,t,r=w(r),e)}return k.defineProperty(t.prototype,"locked",{get:function(){if(!1===_t(this))throw Wt("locked");return mt(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===_t(this)?R(Wt("abort")):!0===mt(this)?R(new p("Cannot abort a stream that already has a writer")):yt(this,t)},t.prototype.close=function(){return!1===_t(this)?R(Wt("close")):!0===mt(this)?R(new p("Cannot close a stream that already has a writer")):!0===Tt(this)?R(new p("Cannot close an already-closing stream")):pt(this)},t.prototype.getWriter=function(){if(!1===_t(this))throw Wt("getWriter");return wt(this)},t}();function wt(t){return new It(t)}function gt(t){t.Ra="writable",t.qd=void 0,t.ef=void 0,t.nf=void 0,t.rf=new O,t.hf=void 0,t.uf=void 0,t.cf=void 0,t.df=void 0,t.lf=!1}function _t(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"nf")}function mt(t){return void 0!==t.ef}function yt(t,n){var i=t.Ra;if("closed"===i||"errored"===i)return I(void 0);if(void 0!==t.df)return t.df.vf;var r=!1;"erroring"===i&&(r=!0,n=void 0);var e=S(function(i,e){t.df={vf:void 0,Qd:i,Kd:e,_f:n,gf:r}});return t.df.vf=e,!1===r&&bt(t,n),e}function pt(t){var n=t.Ra;if("closed"===n||"errored"===n)return R(new p("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=S(function(n,i){var r={Qd:n,Kd:i};t.uf=r}),r=t.ef;return void 0!==r&&!0===t.lf&&"writable"===n&&$t(r),function(t){at(t,"close",0),Ut(t)}(t.nf),i}function kt(t,n){"writable"!==t.Ra?At(t):bt(t,n)}function bt(t,n){var i=t.nf;t.Ra="erroring",t.qd=n;var r=t.ef;void 0!==r&&Pt(r,n),!1===function(t){return void 0!==t.hf||void 0!==t.cf}(t)&&!0===i.pf&&At(t)}function At(t){t.Ra="errored",t.nf[dt]();var n=t.qd;if(t.rf.forEach(function(t){t.Kd(n)}),t.rf=new O,void 0!==t.df){var i=t.df;if(t.df=void 0,!0===i.gf)return i.Kd(n),void St(t);D(t.nf[vt](i._f),function(){i.Qd(),St(t)},function(n){i.Kd(n),St(t)})}else St(t)}function Tt(t){return void 0!==t.uf||void 0!==t.cf}function St(t){void 0!==t.uf&&(t.uf.Kd(t.qd),t.uf=void 0);var n=t.ef;void 0!==n&&jt(n,t.qd)}function Et(t,n){var i=t.ef;void 0!==i&&n!==t.lf&&(!0===n?function(t){Yt(t)}(i):$t(i)),t.lf=n}var It=function(){function t(t){if(!1===_t(t))throw new p("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===mt(t))throw new p("This stream has already been locked for exclusive writing by another writer");this.mf=t,t.ef=this;var n=t.Ra;if("writable"===n)!1===Tt(t)&&!0===t.lf?Yt(this):Jt(this),qt(this);else if("erroring"===n)Kt(this,t.qd),qt(this);else if("closed"===n)Jt(this),function(t){qt(t),Qt(t)}(this);else{var i=t.qd;Kt(this,i),Gt(this,i)}}return k.defineProperty(t.prototype,"closed",{get:function(){return!1===Rt(this)?R(zt("closed")):this.zd},enumerable:!0,configurable:!0}),k.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Rt(this))throw zt("desiredSize");if(void 0===this.mf)throw Xt("desiredSize");return function(t){var n=t.mf,i=n.Ra;return"errored"===i||"erroring"===i?null:"closed"===i?0:Lt(n.nf)}(this)},enumerable:!0,configurable:!0}),k.defineProperty(t.prototype,"ready",{get:function(){return!1===Rt(this)?R(zt("ready")):this.wf},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Rt(this)?R(zt("abort")):void 0===this.mf?R(Xt("abort")):function(t,n){var i=t.mf;return yt(i,n)}(this,t)},t.prototype.close=function(){if(!1===Rt(this))return R(zt("close"));var t=this.mf;return void 0===t?R(Xt("close")):!0===Tt(t)?R(new p("Cannot close an already-closing stream")):Ct(this)},t.prototype.releaseLock=function(){if(!1===Rt(this))throw zt("releaseLock");void 0!==this.mf&&Nt(this)},t.prototype.write=function(t){return!1===Rt(this)?R(zt("write")):void 0===this.mf?R(Xt("write to")):Bt(this,t)},t}();function Rt(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"mf")}function Ct(t){return pt(t.mf)}function Dt(t,n){"pending"===t.yf?jt(t,n):function(t,n){Gt(t,n)}(t,n)}function Pt(t,n){"pending"===t.Af?Zt(t,n):function(t,n){Kt(t,n)}(t,n)}function Nt(t){var n=t.mf,i=new p("Writer was released and can no longer be used to monitor the stream's closedness");Pt(t,i),Dt(t,i),n.ef=void 0,t.mf=void 0}function Bt(t,n){var i=t.mf,r=i.nf,e=function(t,n){try{return t.bf(n)}catch(n){return Ft(t,n),1}}(r,n);if(i!==t.mf)return R(Xt("write to"));var s=i.Ra;if("errored"===s)return R(i.qd);if(!0===Tt(i)||"closed"===s)return R(new p("The stream is closing or closed and cannot be written to"));if("erroring"===s)return R(i.qd);var u=function(t){return S(function(n,i){var r={Qd:n,Kd:i};t.rf.push(r)})}(i);return function(t,n,i){var r={chunk:n};try{at(t,r,i)}catch(n){return void Ft(t,n)}var e=t.Sf;!1===Tt(e)&&"writable"===e.Ra&&Et(e,Vt(t)),Ut(t)}(r,n,e),u}var xt=function(){function t(){throw new p("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Sf")}(this))throw new p("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.Sf.Ra&&Ht(this,t)},t.prototype[vt]=function(t){var n=this.Tf(t);return Mt(this),n},t.prototype[dt]=function(){ft(this)},t}();function Ot(t,n,i,r,e,s,u,o){n.Sf=t,t.nf=n,n.tf=void 0,n.if=void 0,ft(n),n.pf=!1,n.bf=o,n.kf=u,n.Ef=r,n.Pf=e,n.Tf=s;var h=Vt(n);Et(t,h),D(I(i()),function(){n.pf=!0,Ut(n)},function(i){n.pf=!0,kt(t,i)})}function Mt(t){t.Ef=void 0,t.Pf=void 0,t.Tf=void 0,t.bf=void 0}function Lt(t){return t.kf-t.if}function Ut(t){var n=t.Sf;if(!1!==t.pf&&void 0===n.hf)if("erroring"!==n.Ra){if(0!==t.tf.length){var i=function(t){return t.tf.peek().value}(t);"close"===i?function(t){var n=t.Sf;(function(t){t.cf=t.uf,t.uf=void 0})(n),ct(t);var i=t.Pf();Mt(t),D(i,function(){!function(t){t.cf.Qd(void 0),t.cf=void 0,"erroring"===t.Ra&&(t.qd=void 0,void 0!==t.df&&(t.df.Qd(),t.df=void 0)),t.Ra="closed";var n=t.ef;void 0!==n&&Qt(n)}(n)},function(t){!function(t,n){t.cf.Kd(n),t.cf=void 0,void 0!==t.df&&(t.df.Kd(n),t.df=void 0),kt(t,n)}(n,t)})}(t):function(t,n){var i=t.Sf;!function(t){t.hf=t.rf.shift()}(i);var r=t.Ef(n);D(r,function(){!function(t){t.hf.Qd(void 0),t.hf=void 0}(i);var n=i.Ra;if(ct(t),!1===Tt(i)&&"writable"===n){var r=Vt(t);Et(i,r)}Ut(t)},function(n){"writable"===i.Ra&&Mt(t),function(t,n){t.hf.Kd(n),t.hf=void 0,kt(t,n)}(i,n)})}(t,i.chunk)}}else At(n)}function Ft(t,n){"writable"===t.Sf.Ra&&Ht(t,n)}function Vt(t){return Lt(t)<=0}function Ht(t,n){var i=t.Sf;Mt(t),bt(i,n)}function Wt(t){return new p("WritableStream.prototype."+t+" can only be used on a WritableStream")}function zt(t){return new p("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function Xt(t){return new p("Cannot "+t+" a stream using a released writer")}function qt(t){t.zd=S(function(n,i){t.Gd=n,t.Xd=i,t.yf="pending"})}function Gt(t,n){qt(t),jt(t,n)}function jt(t,n){x(t.zd),t.Xd(n),t.Gd=void 0,t.Xd=void 0,t.yf="rejected"}function Qt(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0,t.yf="resolved"}function Yt(t){t.wf=S(function(n,i){t.xf=n,t.If=i}),t.Af="pending"}function Kt(t,n){Yt(t),Zt(t,n)}function Jt(t){Yt(t),$t(t)}function Zt(t,n){x(t.wf),t.If(n),t.xf=void 0,t.If=void 0,t.Af="rejected"}function $t(t){t.xf(void 0),t.xf=void 0,t.If=void 0,t.Af="fulfilled"}function tn(t){if("object"!==(void 0===t?"undefined":W(t))||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var nn,rn="undefined"!=typeof DOMException?DOMException:void 0,en=function(t){if("function"!=typeof t&&"object"!==(void 0===t?"undefined":W(t)))return!1;try{return new t,!0}catch(t){return!1}}(rn)?rn:((nn=function(t,n){this.message=t||"",this.name=n||"Error",y.captureStackTrace&&y.captureStackTrace(this,this.constructor)}).prototype=k.create(y.prototype),k.defineProperty(nn.prototype,"constructor",{value:nn,writable:!0,configurable:!0}),nn);function sn(t,n,i,r,s,u){var o=Q(t),h=wt(n);t.Jd=!0;var c=!1,a=I(void 0);return S(function(f,v){var d,l,w,g;if(void 0!==u){if(d=function(){var i=new en("Aborted","AbortError"),e=[];!1===r&&e.push(function(){return"writable"===n.Ra?yt(n,i):I(void 0)}),!1===s&&e.push(function(){return"readable"===t.Ra?Jn(t,i):I(void 0)}),k(function(){return ut.all(e.map(function(t){return t()}))},!0,i)},!0===u.aborted)return void d();u.addEventListener("abort",d)}if(y(t,o.zd,function(t){!1===r?k(function(){return yt(n,t)},!0,t):b(!0,t)}),y(n,h.zd,function(n){!1===s?k(function(){return Jn(t,n)},!0,n):b(!0,n)}),l=t,w=o.zd,g=function(){!1===i?k(function(){return function(t){var n=t.mf,i=n.Ra;return!0===Tt(n)||"closed"===i?I(void 0):"errored"===i?R(n.qd):Ct(t)}(h)}):b()},"closed"===l.Ra?g():P(w,g),!0===Tt(n)||"closed"===n.Ra){var _=new p("the destination writable stream closed before all data could be piped to it");!1===s?k(function(){return Jn(t,_)},!0,_):b(!0,_)}function m(){var t=a;return C(a,function(){return t!==a?m():void 0})}function y(t,n,i){"errored"===t.Ra?i(t.qd):N(n,i)}function k(t,i,r){function e(){D(t(),function(){return A(i,r)},function(t){return A(!0,t)})}!0!==c&&(c=!0,"writable"===n.Ra&&!1===Tt(n)?P(m(),e):e())}function b(t,i){!0!==c&&(c=!0,"writable"===n.Ra&&!1===Tt(n)?P(m(),function(){return A(t,i)}):A(t,i))}function A(t,n){Nt(h),F(o),void 0!==u&&u.removeEventListener("abort",d),t?v(n):f(void 0)}x(S(function(t,n){!function i(r){r?t():C(!0===c?I(!0):C(h.wf,function(){return C(rt(o),function(t){return!0===t.done||(a=C(Bt(h,t.value),void 0,e),!1)})}),i,n)}(!1)}))})}var un=function(){function t(){throw new p}return k.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===on(this))throw _n("desiredSize");return ln(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===on(this))throw _n("close");if(!1===wn(this))throw new p("The stream is not in a state that permits close");fn(this)},t.prototype.enqueue=function(t){if(!1===on(this))throw _n("enqueue");if(!1===wn(this))throw new p("The stream is not in a state that permits enqueue");return vn(this,t)},t.prototype.error=function(t){if(!1===on(this))throw _n("error");dn(this,t)},t.prototype[G]=function(t){ft(this);var n=this.Rf(t);return an(this),n},t.prototype[j]=function(){var t=this.Cf;if(this.tf.length>0){var n=ct(this);return!0===this.Df&&0===this.tf.length?(an(this),Zn(t)):hn(this),I(M(n,!1,t.Wd.Vd))}var i=Y(t);return hn(this),i},t}();function on(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Cf")}function hn(t){!1!==cn(t)&&(!0!==t.Bf?(t.Bf=!0,D(t.Nf(),function(){t.Bf=!1,!0===t.Mf&&(t.Mf=!1,hn(t))},function(n){dn(t,n)})):t.Mf=!0)}function cn(t){var n=t.Cf;return!1!==wn(t)&&!1!==t.pf&&(!0===Kn(n)&&J(n)>0||ln(t)>0)}function an(t){t.Nf=void 0,t.Rf=void 0,t.bf=void 0}function fn(t){var n=t.Cf;t.Df=!0,0===t.tf.length&&(an(t),Zn(n))}function vn(t,n){var i=t.Cf;if(!0===Kn(i)&&J(i)>0)K(i,n,!1);else{var r=void 0;try{r=t.bf(n)}catch(n){throw dn(t,n),n}try{at(t,n,r)}catch(n){throw dn(t,n),n}}hn(t)}function dn(t,n){var i=t.Cf;"readable"===i.Ra&&(ft(t),an(t),$n(i,n))}function ln(t){var n=t.Cf.Ra;return"errored"===n?null:"closed"===n?0:t.kf-t.if}function wn(t){var n=t.Cf.Ra;return!1===t.Df&&"readable"===n}function gn(t,n,i,r,e,s,u){n.Cf=t,n.tf=void 0,n.if=void 0,ft(n),n.pf=!1,n.Df=!1,n.Mf=!1,n.Bf=!1,n.bf=u,n.kf=s,n.Nf=r,n.Rf=e,t.Zd=n,D(I(i()),function(){n.pf=!0,hn(n)},function(t){dn(n,t)})}function _n(t){return new p("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var mn=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&b.floor(t)===t},yn=function(){function t(){throw new p("ReadableStreamBYOBRequest cannot be used directly")}return k.defineProperty(t.prototype,"view",{get:function(){if(!1===bn(this))throw Un("view");return this.Lf},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===bn(this))throw Un("respond");if(void 0===this.Of)throw new p("This BYOB request has been invalidated");this.Lf.buffer,function(t,n){if(!1===a(n=Number(n)))throw new RangeError("bytesWritten must be a finite");Nn(t,n)}(this.Of,t)},t.prototype.respondWithNewView=function(t){if(!1===bn(this))throw Un("respond");if(void 0===this.Of)throw new p("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new p("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.Ff.peek();if(i.byteOffset+i.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.byteLength!==n.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");i.buffer=n.buffer,Nn(t,n.byteLength)}(this.Of,t)},t}(),pn=function(){function t(){throw new p("ReadableByteStreamController constructor cannot be used directly")}return k.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===kn(this))throw Fn("byobRequest");if(void 0===this.Uf&&this.Ff.length>0){var t=this.Ff.peek(),n=new E(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=k.create(yn.prototype);!function(t,n,i){t.Of=n,t.Lf=i}(i,this,n),this.Uf=i}return this.Uf},enumerable:!0,configurable:!0}),k.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===kn(this))throw Fn("desiredSize");return Mn(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===kn(this))throw Fn("close");if(!0===this.Df)throw new p("The stream has already been closed; do not close it again!");var t=this.Vf.Ra;if("readable"!==t)throw new p("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.Vf;if(t.if>0)t.Df=!0;else{if(t.Ff.length>0&&t.Ff.peek().bytesFilled>0){var i=new p("Insufficient bytes to fill elements in the given buffer");throw On(t,i),i}xn(t),Zn(n)}}(this)},t.prototype.enqueue=function(t){if(!1===kn(this))throw Fn("enqueue");if(!0===this.Df)throw new p("stream is closed or draining");var n=this.Vf.Ra;if("readable"!==n)throw new p("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new p("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.Vf,r=n.buffer,e=n.byteOffset,s=n.byteLength,u=r;!0===Z(i)?0===J(i)?En(t,u,e,s):K(i,new E(u,e,s),!1):!0===Wn(i)?(En(t,u,e,s),Pn(t)):En(t,u,e,s),An(t)}(this,t)},t.prototype.error=function(t){if(!1===kn(this))throw Fn("error");On(this,t)},t.prototype[G]=function(t){this.Ff.length>0&&(this.Ff.peek().bytesFilled=0),ft(this);var n=this.Rf(t);return xn(this),n},t.prototype[j]=function(){var t=this.Vf;if(this.if>0){var n=this.tf.shift();this.if-=n.byteLength,Cn(this);var i=void 0;try{i=new E(n.buffer,n.byteOffset,n.byteLength)}catch(t){return R(t)}return I(M(i,!1,t.Wd.Vd))}var r=this.Hf;if(void 0!==r){var e=void 0;try{e=new ArrayBuffer(r)}catch(t){return R(t)}var s={buffer:e,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,ctor:E,readerType:"default"};this.Ff.push(s)}var u=Y(t);return An(this),u},t}();function kn(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Vf")}function bn(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Of")}function An(t){var n=function(t){var n=t.Vf;if("readable"!==n.Ra)return!1;if(!0===t.Df)return!1;if(!1===t.pf)return!1;if(!0===Z(n)&&J(n)>0)return!0;if(!0===Wn(n)&&Hn(n)>0)return!0;var i=Mn(t);return i>0}(t);!1!==n&&(!0!==t.Bf?(t.Bf=!0,D(t.Nf(),function(){t.Bf=!1,!0===t.Mf&&(t.Mf=!1,An(t))},function(n){On(t,n)})):t.Mf=!0)}function Tn(t,n){var i=!1;"closed"===t.Ra&&(i=!0);var r=Sn(n);"default"===n.readerType?K(t,r,i):function(t,n,i){var r=t.Wd,e=r.Wf.shift();e.Qd(M(n,i,r.Vd))}(t,r,i)}function Sn(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function En(t,n,i,r){t.tf.push({buffer:n,byteOffset:i,byteLength:r}),t.if+=r}function In(t,n){var i=n.elementSize,r=n.bytesFilled-n.bytesFilled%i,e=b.min(t.if,n.byteLength-n.bytesFilled),s=n.bytesFilled+e,u=s-s%i,o=e,h=!1;u>r&&(o=u-n.bytesFilled,h=!0);for(var a=t.tf;o>0;){var f=a.peek(),v=b.min(o,f.byteLength),d=n.byteOffset+n.bytesFilled;c(n.buffer,d,f.buffer,f.byteOffset,v),f.byteLength===v?a.shift():(f.byteOffset+=v,f.byteLength-=v),t.if-=v,Rn(t,v,n),o-=v}return h}function Rn(t,n,i){Dn(t),i.bytesFilled+=n}function Cn(t){0===t.if&&!0===t.Df?(xn(t),Zn(t.Vf)):An(t)}function Dn(t){void 0!==t.Uf&&(t.Uf.Of=void 0,t.Uf.Lf=void 0,t.Uf=void 0)}function Pn(t){for(;t.Ff.length>0;){if(0===t.if)return;var n=t.Ff.peek();!0===In(t,n)&&(Bn(t),Tn(t.Vf,n))}}function Nn(t,n){var i=t.Ff.peek();if("closed"===t.Vf.Ra){if(0!==n)throw new p("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.Vf;if(!0===Wn(i))for(;Hn(i)>0;)Tn(i,Bn(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(Rn(t,n,i),!(i.bytesFilled0){var e=i.byteOffset+i.bytesFilled,s=i.buffer.slice(e-r,e);En(t,s,0,s.byteLength)}i.buffer=i.buffer,i.bytesFilled-=r,Tn(t.Vf,i),Pn(t)}}(t,n,i);An(t)}function Bn(t){var n=t.Ff.shift();return Dn(t),n}function xn(t){t.Nf=void 0,t.Rf=void 0}function On(t,n){var i=t.Vf;"readable"===i.Ra&&(function(t){Dn(t),t.Ff=new O}(t),ft(t),xn(t),$n(i,n))}function Mn(t){var n=t.Vf.Ra;return"errored"===n?null:"closed"===n?0:t.kf-t.if}function Ln(t,n,i){var r=k.create(pn.prototype),e=v(n,"pull",0,[r]),s=v(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===mn(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,r,e,s,u){n.Vf=t,n.Mf=!1,n.Bf=!1,n.Uf=void 0,n.tf=n.if=void 0,ft(n),n.Df=!1,n.pf=!1,n.kf=w(s),n.Nf=r,n.Rf=e,n.Hf=u,n.Ff=new O,t.Zd=n,D(I(i()),function(){n.pf=!0,An(n)},function(t){On(n,t)})}(t,r,function(){return d(n,"start",[r])},e,s,i,u)}function Un(t){return new p("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Fn(t){return new p("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Vn(t){return S(function(n,i){var r={Qd:n,Kd:i};t.Wd.Wf.push(r)})}function Hn(t){return t.Wd.Wf.length}function Wn(t){var n=t.Wd;return void 0!==n&&!!Xn(n)}var zn=function(){function t(t){if(!Yn(t))throw new p("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===kn(t.Zd))throw new p("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Kn(t))throw new p("This stream has already been locked for exclusive reading by another reader");L(this,t),this.Wf=new O}return k.defineProperty(t.prototype,"closed",{get:function(){return Xn(this)?this.zd:R(qn("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Xn(this)?void 0===this.Hd?R(V("cancel")):U(this,t):R(qn("cancel"))},t.prototype.read=function(t){return Xn(this)?void 0===this.Hd?R(V("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?R(new p("view must have non-zero byteLength")):function(t,n){var i=t.Hd;return i.Jd=!0,"errored"===i.Ra?R(i.qd):function(t,n){var i=t.Vf,r=1;n.constructor!==DataView&&(r=n.constructor.BYTES_PER_ELEMENT);var e=n.constructor,s={buffer:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:r,ctor:e,readerType:"byob"};if(t.Ff.length>0)return t.Ff.push(s),Vn(i);if("closed"===i.Ra)return I(M(new e(s.buffer,s.byteOffset,0),!0,i.Wd.Vd));if(t.if>0){if(!0===In(t,s)){var u=Sn(s);return Cn(t),I(M(u,!1,i.Wd.Vd))}if(!0===t.Df){var o=new p("Insufficient bytes to fill elements in the given buffer");return On(t,o),R(o)}}t.Ff.push(s);var h=Vn(i);return An(t),h}(i.Zd,n)}(this,t)):R(new p("view must be an array buffer view")):R(qn("read"))},t.prototype.releaseLock=function(){if(!Xn(this))throw qn("releaseLock");if(void 0!==this.Hd){if(this.Wf.length>0)throw new p("Tried to release a reader lock when that reader has pending read() calls un-settled");F(this)}},t}();function Xn(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Wf")}function qn(t){return new p("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var Gn=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Qn(this);var i=n.size,r=n.highWaterMark,e=t.type;if("bytes"===String(e)){if(void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===r&&(r=0),Ln(this,t,r=w(r))}else{if(void 0!==e)throw new RangeError("Invalid type is specified");var s=g(i);void 0===r&&(r=1),function(t,n,i,r){var e=k.create(un.prototype),s=v(n,"pull",0,[e]),u=v(n,"cancel",1,[]);gn(t,e,function(){return d(n,"start",[e])},s,u,i,r)}(this,t,r=w(r),s)}}return k.defineProperty(t.prototype,"locked",{get:function(){if(!1===Yn(this))throw ti("locked");return Kn(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Yn(this)?R(ti("cancel")):!0===Kn(this)?R(new p("Cannot cancel a stream that already has a reader")):Jn(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Yn(this))throw ti("getReader");if(void 0===n)return Q(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new zn(t);return i.Vd=n,i}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,n){var i=t.writable,r=t.readable,e=void 0===n?{}:n,s=e.preventClose,u=e.preventAbort,o=e.preventCancel,h=e.signal;if(!1===Yn(this))throw ti("pipeThrough");if(!1===_t(i))throw new p("writable argument to pipeThrough must be a WritableStream");if(!1===Yn(r))throw new p("readable argument to pipeThrough must be a ReadableStream");if(s=Boolean(s),u=Boolean(u),o=Boolean(o),void 0!==h&&!tn(h))throw new p("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Kn(this))throw new p("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===mt(i))throw new p("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return x(sn(this,i,s,u,o,h)),r},t.prototype.pipeTo=function(t,n){var i=void 0===n?{}:n,r=i.preventClose,e=i.preventAbort,s=i.preventCancel,u=i.signal;return!1===Yn(this)?R(ti("pipeTo")):!1===_t(t)?R(new p("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(r=Boolean(r),e=Boolean(e),s=Boolean(s),void 0===u||tn(u)?!0===Kn(this)?R(new p("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===mt(t)?R(new p("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):sn(this,t,r,e,s,u):R(new p("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Yn(this))throw ti("tee");var t=function(t){var n,i,r,e,s,u=Q(t),o=!1,c=!1,a=!1,f=S(function(t){s=t});function v(){return!0===o||(o=!0,x(B(rt(u),function(t){if(o=!1,!0===t.done)return!1===c&&fn(r.Zd),void(!1===a&&fn(e.Zd));var n=t.value,i=n,s=n;!1===c&&vn(r.Zd,i),!1===a&&vn(e.Zd,s)}))),I(void 0)}function d(){}return r=jn(d,v,function(r){if(c=!0,n=r,!0===a){var e=h([n,i]),u=Jn(t,e);s(u)}return f}),e=jn(d,v,function(r){if(a=!0,i=r,!0===c){var e=h([n,i]),u=Jn(t,e);s(u)}return f}),N(u.zd,function(t){dn(r.Zd,t),dn(e.Zd,t)}),[r,e]}(this);return h(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Yn(this))throw ti("getIterator");return function(t,n){void 0===n&&(n=!1);var i=Q(t),r=k.create(st);return r.$d=i,r.ul=Boolean(n),r}(this,i)},t}();function jn(t,n,i,r,e){void 0===r&&(r=1),void 0===e&&(e=function(){return 1});var s=k.create(Gn.prototype);return Qn(s),gn(s,k.create(un.prototype),t,n,i,r,e),s}function Qn(t){t.Ra="readable",t.Wd=void 0,t.qd=void 0,t.Jd=!1}function Yn(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Zd")}function Kn(t){return void 0!==t.Wd}function Jn(t,n){return t.Jd=!0,"closed"===t.Ra?I(void 0):"errored"===t.Ra?R(t.qd):(Zn(t),B(t.Zd[G](n),e))}function Zn(t){t.Ra="closed";var n=t.Wd;void 0!==n&&(it(n)&&(n.Yd.forEach(function(t){t.Qd(M(void 0,!0,n.Vd))}),n.Yd=new O),q(n))}function $n(t,n){t.Ra="errored",t.qd=n;var i=t.Wd;void 0!==i&&(it(i)?(i.Yd.forEach(function(t){t.Kd(n)}),i.Yd=new O):(i.Wf.forEach(function(t){t.Kd(n)}),i.Wf=new O),X(i,n))}function ti(t){return new p("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"===W(i.asyncIterator)&&k.defineProperty(Gn.prototype,i.asyncIterator,{value:Gn.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var ni=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(t){return t.byteLength},t}(),ii=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(){return 1},t}(),ri=function(){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={}),void 0===i&&(i={});var r=n.size,e=n.highWaterMark,s=i.size,u=i.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var o=g(r);if(void 0===e&&(e=1),e=w(e),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var h,c=g(s);void 0===u&&(u=0),u=w(u),function(t,n,i,r,e,s){function u(){return n}function o(n){return function(t,n){var i=t.qf;return!0===t.lf?B(t.zf,function(){var r=t.Gf;if("erroring"===r.Ra)throw r.qd;return vi(i,n)}):vi(i,n)}(t,n)}function h(n){return function(t,n){return si(t,n),I(void 0)}(t,n)}function c(){return function(t){var n=t.Xf,i=t.qf,r=i.jf();return ai(i),B(r,function(){if("errored"===n.Ra)throw n.qd;var t=n.Zd;!0===wn(t)&&fn(t)},function(i){throw si(t,i),n.qd})}(t)}function a(){return function(t){return oi(t,!1),t.zf}(t)}function f(n){return ui(t,n),I(void 0)}t.Gf=function(t,n,i,r,e,s){void 0===e&&(e=1),void 0===s&&(s=function(){return 1});var u=k.create(lt.prototype);return gt(u),Ot(u,k.create(xt.prototype),t,n,i,r,e,s),u}(u,o,c,h,i,r),t.Xf=jn(u,a,f,e,s),t.lf=void 0,t.zf=void 0,t.Qf=void 0,oi(t,!0),t.qf=void 0}(this,S(function(t){h=t}),e,o,u,c),function(t,n){var i=k.create(hi.prototype),r=function(t){try{return fi(i,t),I(void 0)}catch(t){return R(t)}},e=n.transform;if(void 0!==e){if("function"!=typeof e)throw new p("transform is not a method");r=function(t){return l(e,n,[t,i])}}var s=v(n,"flush",0,[i]);!function(t,n,i,r){n.Kf=t,t.qf=n,n.Yf=i,n.jf=r}(t,i,r,s)}(this,t);var a=d(t,"start",[this.qf]);h(a)}return k.defineProperty(t.prototype,"readable",{get:function(){if(!1===ei(this))throw li("readable");return this.Xf},enumerable:!0,configurable:!0}),k.defineProperty(t.prototype,"writable",{get:function(){if(!1===ei(this))throw li("writable");return this.Gf},enumerable:!0,configurable:!0}),t}();function ei(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"qf")}function si(t,n){dn(t.Xf.Zd,n),ui(t,n)}function ui(t,n){ai(t.qf),Ft(t.Gf.nf,n),!0===t.lf&&oi(t,!1)}function oi(t,n){void 0!==t.zf&&t.Qf(),t.zf=S(function(n){t.Qf=n}),t.lf=n}var hi=function(){function t(){throw new p("TransformStreamDefaultController instances cannot be created directly")}return k.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===ci(this))throw di("desiredSize");return ln(this.Kf.Xf.Zd)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===ci(this))throw di("enqueue");fi(this,t)},t.prototype.error=function(t){if(!1===ci(this))throw di("error");!function(t,n){si(t.Kf,n)}(this,t)},t.prototype.terminate=function(){if(!1===ci(this))throw di("terminate");!function(t){var n=t.Kf,i=n.Xf.Zd;!0===wn(i)&&fn(i);var r=new p("TransformStream terminated");ui(n,r)}(this)},t}();function ci(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Kf")}function ai(t){t.Yf=void 0,t.jf=void 0}function fi(t,n){var i=t.Kf,r=i.Xf.Zd;if(!1===wn(r))throw new p("Readable side is not in a state that permits enqueue");try{vn(r,n)}catch(t){throw ui(i,t),i.Xf.qd}var e=function(t){return!0!==cn(t)}(r);e!==i.lf&&oi(i,!0)}function vi(t,n){return B(t.Yf(n),void 0,function(n){throw si(t.Kf,n),n})}function di(t){return new p("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function li(t){return new p("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=ni,t.CountQueuingStrategy=ii,t.ReadableStream=Gn,t.TransformStream=ri,t.WritableStream=lt,k.defineProperty(t,"__esModule",{value:!0})},"object"===(void 0===t?"undefined":W(t))&&void 0!==i?s(t):"function"==typeof define&&define.amd?define(["exports"],s):s((e=e||self).WebStreamsPolyfill={})}),Kt=M(function(t){function n(){var t=Yt();return n=function(){return t},t}F(),Et(),k.defineProperty(t,"__esModule",{value:!0}),function(t,n){for(var i in n)k.defineProperty(t,i,{enumerable:!0,get:k.getOwnPropertyDescriptor(n,i).get})}(t,{get ByteLengthQueuingStrategy(){return n().ByteLengthQueuingStrategy},get CountQueuingStrategy(){return n().CountQueuingStrategy},get ReadableStream(){return n().ReadableStream},get TransformStream(){return n().TransformStream},get WritableStream(){return n().WritableStream}})});function Jt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Jt=function(){return!!t})()}var Zt=O(function(){F(),Et()});function $t(t,n,i){return($t=Jt()?Reflect.construct:function(t,n,i){var r=[null];r.push.apply(r,n);var e=new(Function.bind.apply(t,r));return i&&It(e,i.prototype),e}).apply(null,arguments)}var tn=O(function(){F(),Et(),Zt(),Rt()});function nn(t){return(nn=k.setPrototypeOf?k.getPrototypeOf:function(t){return t.__proto__||k.getPrototypeOf(t)})(t)}var rn=O(function(){F(),Et()});var en=O(function(){F(),Et()});function sn(t){var n="function"==typeof Map?new Map:void 0;return sn=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new p("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,i)}function i(){return $t(t,arguments,nn(this).constructor)}return i.prototype=k.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),It(i,t)},sn(t)}var un,on=O(function(){F(),Et(),tn(),rn(),en(),Rt()}),hn=M(function(t,r){var e,s;F(),Et(),Wt(),Bt(),Dt(),H(),at(),on(),Ut(),Qt(),e=t,s=function(t){var r,e=k.defineProperty,s=k.defineProperties,u=k.getOwnPropertyDescriptors,o=k.getOwnPropertySymbols,h=k.prototype.hasOwnProperty,c=k.prototype.propertyIsEnumerable,a=function(t,n,i){return n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i},d=function(t,n){for(var i in n||(n={}))h.call(n,i)&&a(t,i,n[i]);if(o)for(var r,e=Lt(o(n));!(r=e()).done;)i=r.value,c.call(n,i)&&a(t,i,n[i]);return t},g=function(t,n){return s(t,u(n))},T=function(t,n){var i={};for(var r in t)h.call(t,r)&&n.indexOf(r)<0&&(i[r]=t[r]);if(null!=t&&o)for(var e,s=Lt(o(t));!(e=s()).done;)r=e.value,n.indexOf(r)<0&&c.call(t,r)&&(i[r]=t[r]);return i},R=("undefined"==typeof globalThis?"undefined":W(globalThis))<"u"?globalThis:(void 0===f?"undefined":W(f))<"u"?f:("undefined"==typeof global?"undefined":W(global))<"u"?global:("undefined"==typeof self?"undefined":W(self))<"u"?self:{};function C(t){return t&&t.__esModule&&k.prototype.hasOwnProperty.call(t,"default")?t.default:t}var D,P,N={exports:{}},B=(D||(D=1,P=N,function(t){var n,i={VERSION:"1.6.1"},r={},e=function(t,n){return function(){return n.apply(t,arguments)}},s=function(){var t,n,i=arguments,r=i[0];for(n=1;n=n.value},trace:function(){this.invoke(i.TRACE,arguments)},debug:function(){this.invoke(i.DEBUG,arguments)},info:function(){this.invoke(i.INFO,arguments)},warn:function(){this.invoke(i.WARN,arguments)},error:function(){this.invoke(i.ERROR,arguments)},time:function(t){"string"==typeof t&&t.length>0&&this.invoke(i.TIME,[t,"start"])},timeEnd:function(t){"string"==typeof t&&t.length>0&&this.invoke(i.TIME,[t,"end"])},invoke:function(t,i){n&&this.enabledFor(t)&&n(i,s({level:t},this.context))}};var h,c=new o({filterLevel:i.OFF});(h=i).enabledFor=e(c,c.enabledFor),h.trace=e(c,c.trace),h.debug=e(c,c.debug),h.time=e(c,c.time),h.timeEnd=e(c,c.timeEnd),h.info=e(c,c.info),h.warn=e(c,c.warn),h.error=e(c,c.error),h.log=h.info,i.setHandler=function(t){n=t},i.setLevel=function(t){for(var n in c.setLevel(t),r)r.hasOwnProperty(n)&&r[n].setLevel(t)},i.getLevel=function(){return c.getLevel()},i.get=function(t){return r[t]||(r[t]=new o(s({name:t},c.context)))},i.createDefaultHandler=function(t){(t=t||{}).formatter=t.formatter||function(t,n){n.name&&t.unshift("["+n.name+"]")};var n={},r=function(t,n){Function.prototype.apply.call(t,console,n)};return("undefined"==typeof console?"undefined":W(console))>"u"?function(){}:function(e,s){e=Array.prototype.slice.call(e);var u,o=console.log;s.level===i.TIME?(u=(s.name?"["+s.name+"] ":"")+e[0],"start"===e[1]?console.time?console.time(u):n[u]=(new Date).getTime():console.timeEnd?console.timeEnd(u):r(o,[u+": "+((new Date).getTime()-n[u])+"ms"])):(s.level===i.WARN&&console.warn?o=console.warn:s.level===i.ERROR&&console.error?o=console.error:s.level===i.INFO&&console.info?o=console.info:s.level===i.DEBUG&&console.debug?o=console.debug:s.level===i.TRACE&&console.trace&&(o=console.trace),t.formatter(e,s),r(o,e))}},i.useDefaults=function(t){i.setLevel(t&&t.defaultLevel||i.DEBUG),i.setHandler(i.createDefaultHandler(t))},i.setDefaults=i.useDefaults,P.exports?P.exports=i:(i.Jf=t.Logger,i.noConflict=function(){return t.Logger=i.Jf,i},t.Logger=i)}(N.exports)),N.exports),x=C(B),O="0.6.0",M=(null==(r=null==f?void 0:f.navigator)?void 0:r.userAgent)||"No user agent available",L="",U="",F="",H="",z="",X="",q="",G=0,j=[],Q=function(t){L=""===L?t:L},Y=function(t){U=""===U?t:U},K=function(t){F=""===F?t:F},J=function(t){H=""===H?t:H},Z=function(t){z=""===z?t:z},tt=function(t){G=0===G?t:G},nt=function(t){X=t},it=function(t){q=""===q?t:q},rt=function(t){60===j.length&&j.shift(),j.push(t)},et=function(t,n){var i;void 0===t&&(t=60),void 0===n&&(n="JSON"),i=!Number.isInteger(t)||t>60||t<=0?60:t;var r={client:"@millicast/millicast-sdk",version:O,timestamp:(new Date).toISOString(),userAgent:M,clusterId:q,accountId:L,streamName:U,subscriberId:F,connection:X,stats:j.slice(-i),connectionDurationMs:(new Date).getTime()-G};return""!==z?r.feedId=z:""!==H&&(r.streamViewId=H),"CMCD"===n?function(t){function n(t,n){return{ts:b.round(n.timestamp)||"",ot:"audio"===t?"a":"v",bl:n.jitterBufferDelay||0,br:b.round(n.bitrateBitsPerSecond||0),pld:n.packetsLostDeltaPerSecond||0,j:n.jitter||0,mtp:n.packetRate||0,mid:n.mid||"",mimeType:n.mimeType||""}}return t.stats=t.stats.reduce(function(t,i){var r=0!==i.audio.inbounds.length?i.audio.inbounds.map(function(t){return n("audio",t)}):i.audio.outbounds.map(function(t){return n("audio",t)}),e=0!==i.video.inbounds.length?i.video.inbounds.map(function(t){return n("video",t)}):i.video.outbounds.map(function(t){return n("video",t)});return t.concat([].concat(r,e))},[]),t}(r):r};x.useDefaults({defaultLevel:x.TRACE});var st=["TRACE","DEBUG","INFO","WARN","ERROR"],ot=function(t,n){t.unshift("[".concat(n.name||"Global","] ").concat((new Date).toISOString()," - ").concat(n.level.name," -"))},ht=function(t,n){return n?t.value>=lt[n].value:t.value>=dt.value},ct=x.createDefaultHandler({formatter:ot});x.setHandler(function(t,n){(function(t,n){t=(t=Array.prototype.slice.call(t)).map(function(t){return"object"==(void 0===t?"undefined":W(t))?JSON.stringify(t):t}),ot(t,n),0!==ft?(vt.push(t.join(" ")),vt.length>=ft&&(vt=vt.slice(-ft))):vt=[]})(t,n),ht(n.level,n.name)&&ct(t,n);for(var i,r=Lt(wt);!(i=r()).done;){var e=i.value,s=e.handler,u=e.level;n.level.value>=u.value&&s(t,n)}});var at,ft=1e4,vt=[],dt=x.OFF,lt={},wt=[],gt=g(d({},x),{enabledFor:ht,getHistory:function(){return vt},getHistoryMaxSize:function(){return ft},setHistoryMaxSize:function(t){ft=t},setLevel:function(t){for(var n in dt=t,lt)lt[n]=t},getLevel:function(){return dt},get:function(t){lt[t]||(lt[t]=dt);var n=x.get(t);return n.setLevel=function(n){lt[t]=n},n.getLevel=function(){return lt[t]},n},setHandler:function(t,n){wt.push({handler:t,level:n})},diagnose:function(t){var n;void 0===t&&(t={});var i={statsCount:60,historySize:1e3,minLogLevel:"TRACE",statsFormat:"JSON"};"number"==typeof t?(i.statsCount=t,n=i):n=d(d({},i),t);var r=n.statsCount,e=n.historySize,s=n.minLogLevel,u=n.statsFormat,o=et(r,u),h=gt.getHistory();if(!Number.isInteger(e)||e<=0)throw new y("Invalid Argument Exception : historySize must be a positive integer.");if(!st.includes(s.toUpperCase()))throw new y('Invalid Argument Exception : the minLogLevel parameter only excepts "trace", "debug", "info", "warn", and "error" as arguments.');if(st.includes(s.toUpperCase())){var c=st.slice(st.indexOf(s.toUpperCase())),a=h.filter(function(t){return c.some(function(n){return t.includes(n)})});o.history=a.slice(-e)}return o},JSON:"JSON",CMCD:"CMCD",VERSION:O}),_t={exports:{}};function mt(){if(at)return _t.exports;at=1;var t,n="object"==("undefined"==typeof Reflect?"undefined":W(Reflect))?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(t,n,i){return Function.prototype.apply.call(t,n,i)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:k.getOwnPropertySymbols?function(t){return k.getOwnPropertyNames(t).concat(k.getOwnPropertySymbols(t))}:function(t){return k.getOwnPropertyNames(t)};var r=Number.isNaN||function(t){return t!=t};function e(){e.init.call(this)}_t.exports=e,_t.exports.once=function(t,n){return new ut(function(i,r){function e(i){t.removeListener(n,s),r(i)}function s(){"function"==typeof t.removeListener&&t.removeListener("error",e),i([].slice.call(arguments))}l(t,n,s,{once:!0}),"error"!==n&&function(t,n,i){"function"==typeof t.on&&l(t,"error",n,i)}(t,e,{once:!0})})},e.EventEmitter=e,e.prototype.Zf=void 0,e.prototype.$f=0,e.prototype.rv=void 0;var s=10;function u(t){if("function"!=typeof t)throw new p('The "listener" argument must be of type Function. Received type '+(void 0===t?"undefined":W(t)))}function o(t){return void 0===t.rv?e.defaultMaxListeners:t.rv}function h(t,n,i,r){var e,s,h;if(u(i),void 0===(s=t.Zf)?(s=t.Zf=k.create(null),t.$f=0):(void 0!==s.newListener&&(t.emit("newListener",n,i.listener?i.listener:i),s=t.Zf),h=s[n]),void 0===h)h=s[n]=i,++t.$f;else if("function"==typeof h?h=s[n]=r?[i,h]:[h,i]:r?h.unshift(i):h.push(i),(e=o(t))>0&&h.length>e&&!h.warned){h.warned=!0;var c=new y("Possible EventEmitter memory leak detected. "+h.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=n,c.count=h.length,function(t){console&&console.warn&&console.warn(t)}(c)}return t}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function a(t,n,i){var r={fired:!1,wrapFn:void 0,target:t,type:n,listener:i},e=c.bind(r);return e.listener=i,r.wrapFn=e,e}function f(t,n,i){var r=t.Zf;if(void 0===r)return[];var e=r[n];return void 0===e?[]:"function"==typeof e?i?[e.listener||e]:[e]:i?function(t){for(var n=new Array(t.length),i=0;i0&&(u=n[0]),V(u,y))throw u;var o=new y("Unhandled error."+(u?" ("+u.message+")":""));throw o.context=u,o}var h=s[t];if(void 0===h)return!1;if("function"==typeof h)i(h,this,n);else{var c=h.length,a=d(h,c);for(r=0;r=0;s--)if(i[s]===n||i[s].listener===n){o=i[s].listener,e=s;break}if(e<0)return this;0===e?i.shift():function(t,n){for(;n+1=0;r--)this.removeListener(t,n[r]);return this},e.prototype.listeners=function(t){return f(this,t,!0)},e.prototype.rawListeners=function(t){return f(this,t,!1)},e.listenerCount=function(t,n){return"function"==typeof t.listenerCount?t.listenerCount(n):v.call(t,n)},e.prototype.listenerCount=v,e.prototype.eventNames=function(){return this.$f>0?t(this.Zf):[]},_t.exports}var yt,pt,kt,bt,At,Tt,St,Et,It,Rt,Dt,Pt,Bt,xt,Ot,Mt,Ut,Ft,Ht,Wt,Xt,qt,Gt,jt=C(mt()),Qt={exports:{}},Yt=function(){if(yt)return Qt.exports;yt=1,Qt.exports=n,Qt.exports.filter=function(i,r){var e=new t;return n(i,e,r),e};var t=mt().EventEmitter;function n(t,n,i){Array.isArray(i)||(i=[i]);var r=[];return i.forEach(function(i){var e=function(){var t=[].slice.call(arguments);t.unshift(i),n.emit.apply(n,t)};r.push(e),t.on(i,e)}),function(){i.forEach(function(n,i){t.removeListener(n,r[i])})}}return Qt.exports}(),Kt=C(Yt),Jt={exports:{}},Zt=(pt||(pt=1,function(t){var n,i;self,t.exports=(n={7:function(t){var n,i=function(t){if("function"!=typeof t)throw new p('The "listener" argument must be of type Function. Received type '+(void 0===t?"undefined":W(t)))},r=function(t){return void 0===t.rv?l.defaultMaxListeners:t.rv},e=function(t,n,e,s){var u,o,h,c;if(i(e),void 0===(o=t.Zf)?(o=t.Zf=k.create(null),t.$f=0):(void 0!==o.newListener&&(t.emit("newListener",n,e.listener?e.listener:e),o=t.Zf),h=o[n]),void 0===h)h=o[n]=e,++t.$f;else if("function"==typeof h?h=o[n]=s?[e,h]:[h,e]:s?h.unshift(e):h.push(e),(u=r(t))>0&&h.length>u&&!h.warned){h.warned=!0;var a=new y("Possible EventEmitter memory leak detected. "+h.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=n,a.count=h.length,c=a,console&&console.warn&&console.warn(c)}return t},s=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)},u=function(t,n,i){var r={fired:!1,wrapFn:void 0,target:t,type:n,listener:i},e=s.bind(r);return e.listener=i,r.wrapFn=e,e},o=function(t,n,i){var r=t.Zf;if(void 0===r)return[];var e=r[n];return void 0===e?[]:"function"==typeof e?i?[e.listener||e]:[e]:i?function(t){for(var n=new Array(t.length),i=0;i0&&(s=n[0]),V(s,y))throw s;var u=new y("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var o=e[t];if(void 0===o)return!1;if("function"==typeof o)v(o,this,n);else{var h=o.length,a=c(o,h);for(i=0;i=0;u--)if(r[u]===n||r[u].listener===n){o=r[u].listener,s=u;break}if(s<0)return this;0===s?r.shift():function(t,n){for(;n+1=0;r--)this.removeListener(t,n[r]);return this},l.prototype.listeners=function(t){return o(this,t,!0)},l.prototype.rawListeners=function(t){return o(this,t,!1)},l.listenerCount=function(t,n){return"function"==typeof t.listenerCount?t.listenerCount(n):h.call(t,n)},l.prototype.listenerCount=h,l.prototype.eventNames=function(){return this.$f>0?n(this.Zf):[]}},156:function(t,n,i){var r=this&&this.hv||(k.create?function(t,n,i,r){void 0===r&&(r=i);var e=k.getOwnPropertyDescriptor(n,i);e&&!("get"in e?!n.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return n[i]}}),k.defineProperty(t,r,e)}:function(t,n,i,r){void 0===r&&(r=i),t[r]=n[i]}),e=this&&this.ov||function(t,n){for(var i in t)"default"===i||k.prototype.hasOwnProperty.call(n,i)||r(n,t,i)},s=this&&this.uv||function(t){return t&&t.__esModule?t:{default:t}};k.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;var u=i(586);k.defineProperty(n,"Logger",{enumerable:!0,get:function(){return s(u).default}}),e(i(284),n),e(i(280),n),e(i(738),n),e(i(767),n)},185:function(t,n){k.defineProperty(n,"__esModule",{value:!0}),n.calculatePacketsLostRatio=n.calculateRate=n.getMediaKind=void 0,n.getMediaKind=function(t){var n=t.kind||t.mediaType;return["audio","video"].includes(n)||"inbound-rtp"!==t.type||(n=t.id.toLocaleLowerCase().includes("video")?"video":"audio"),n},n.calculateRate=function(t,n,i,r){return i&&r?(n-r)/((t-i)/1e3):0},n.calculatePacketsLostRatio=function(t,n,i,r){var e=t-(null!=i?i:0),s=e+(n-(null!=r?r:0));return 0===s?0:e/s}},280:function(t,n){k.defineProperty(n,"__esModule",{value:!0})},284:function(t,n,i){var r,e,s,u,o,h,c,a,f,v,d,l,w,g,y,b,A=this&&this.fv||function(t,n,i,r){return new(i||(i=ut))(function(e,s){function u(t){try{h(r.next(t))}catch(t){s(t)}}function o(t){try{h(r.throw(t))}catch(t){s(t)}}function h(t){var n;t.done?e(t.value):(n=t.value,V(n,i)?n:new i(function(t){t(n)})).then(u,o)}h((r=r.apply(t,n||[])).next())})},T=this&&this.vv||function(t,n,i,r,e){if("m"===r)throw new p("Private method is not writable");if("a"===r&&!e)throw new p("Private accessor was defined without a setter");if("function"==typeof n?t!==n||!e:!n.has(t))throw new p("Cannot write private member to an object whose class did not declare it");return"a"===r?e.call(t,i):e?e.value=i:n.set(t,i),i},S=this&&this._v||function(t,n,i,r){if("a"===i&&!r)throw new p("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!r:!n.has(t))throw new p("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:n.get(t)},E=this&&this.uv||function(t){return t&&t.__esModule?t:{default:t}};k.defineProperty(n,"__esModule",{value:!0}),n.WebRTCStats=void 0;var I=i(7),R=E(i(586)),C=i(738),D=i(185),P=function(t){function n(n){var i;return i=t.call(this)||this,r.add(i),e.set(i,void 0),s.set(i,void 0),u.set(i,void 0),o.set(i,null),h.set(i,void 0),c.set(i,null),i.start=function(){S(i,h,"f").info("WebRTC statistics collection is starting..."),T(i,c,null,"f"),T(i,o,_(S(i,a,"f"),S(i,s,"f")),"f")},i.stop=function(){S(i,o,"f")&&(m(S(i,o,"f")),T(i,o,null,"f"),S(i,h,"f").info("WebRTC statistics collection has stopped."))},a.set(i,function(){return A(i,void 0,void 0,function(){var t,n,i,s,o,a,f,v,w,_,m,p;return zt(this,function(A){switch(A.label){case 0:return A.trys.push([0,2,,3]),S(this,h,"f").trace("Requesting WebRTC statistics..."),[4,S(this,e,"f").call(this)];case 1:return t=A.sent(),n=(new Date).toISOString(),[3,3];case 2:return i=A.sent(),[2,(S(this,h,"f").error("Problem collecting the WebRTC statistics.",i),void this.emit("error","Problem collecting the WebRTC statistics - ".concat(i)))];case 3:s=Array.from(t.values()),o={timestamp:n,input:{audio:[],video:[]},output:{audio:[],video:[]}},S(this,u,"f")&&(o.rawStats=t),a=0,A.label=4;case 4:if(!(a=n.value},trace:function(){this.invoke(u.TRACE,arguments)},debug:function(){this.invoke(u.DEBUG,arguments)},info:function(){this.invoke(u.INFO,arguments)},warn:function(){this.invoke(u.WARN,arguments)},error:function(){this.invoke(u.ERROR,arguments)},time:function(t){"string"==typeof t&&t.length>0&&this.invoke(u.TIME,[t,"start"])},timeEnd:function(t){"string"==typeof t&&t.length>0&&this.invoke(u.TIME,[t,"end"])},invoke:function(t,n){s&&this.enabledFor(t)&&s(n,c({level:t},this.context))}};var v,d=new f({filterLevel:u.OFF});(v=u).enabledFor=h(d,d.enabledFor),v.trace=h(d,d.trace),v.debug=h(d,d.debug),v.time=h(d,d.time),v.timeEnd=h(d,d.timeEnd),v.info=h(d,d.info),v.warn=h(d,d.warn),v.error=h(d,d.error),v.log=v.info,u.setHandler=function(t){s=t},u.setLevel=function(t){for(var n in d.setLevel(t),o)o.hasOwnProperty(n)&&o[n].setLevel(t)},u.getLevel=function(){return d.getLevel()},u.get=function(t){return o[t]||(o[t]=new f(c({name:t},d.context)))},u.createDefaultHandler=function(t){(t=t||{}).formatter=t.formatter||function(t,n){n.name&&t.unshift("["+n.name+"]")};var n={},i=function(t,n){Function.prototype.apply.call(t,console,n)};return("undefined"==typeof console?"undefined":W(console))>"u"?function(){}:function(r,e){r=Array.prototype.slice.call(r);var s,o=console.log;e.level===u.TIME?(s=(e.name?"["+e.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(s):n[s]=(new Date).getTime():console.timeEnd?console.timeEnd(s):i(o,[s+": "+((new Date).getTime()-n[s])+"ms"])):(e.level===u.WARN&&console.warn?o=console.warn:e.level===u.ERROR&&console.error?o=console.error:e.level===u.INFO&&console.info?o=console.info:e.level===u.DEBUG&&console.debug?o=console.debug:e.level===u.TRACE&&console.trace&&(o=console.trace),t.formatter(r,e),i(o,r))}},u.useDefaults=function(t){u.setLevel(t&&t.defaultLevel||u.DEBUG),u.setHandler(u.createDefaultHandler(t))},u.setDefaults=u.useDefaults,void 0===(e="function"==typeof(r=u)?r.call(n,i,n,t):r)||(t.exports=e)}()},738:function(t,n){var i,r;k.defineProperty(n,"__esModule",{value:!0}),n.QualityLimitationReason=void 0,(r=i||(n.QualityLimitationReason=i={}))[r.none=0]="none",r[r.cpu=1]="cpu",r[r.bandwidth=2]="bandwidth",r[r.other=3]="other"},767:function(t,n){k.defineProperty(n,"__esModule",{value:!0})}},i={},function t(r){var e=i[r];if(void 0!==e)return e.exports;var s=i[r]={exports:{}};return n[r].call(s.exports,s,s.exports,t),s.exports}(156))}(Jt)),Jt.exports),$t=gt.get("PeerConnectionStats"),tn="stats",nn=function(t){function n(n,i){var r;return void 0===i&&(i={statsIntervalMs:1e3,autoInitStats:!0}),(r=t.call(this)||this).peer=n,r.collection=null,r.initialized=!1,i.autoInitStats&&r.init(i.statsIntervalMs),r}Ct(n,t);var i=n.prototype;return i.init=function(t){var n=this;if(this.initialized)$t.warn("PeerConnectionStats.init() has already been called. Automatic initialization occurs when the PeerConnectionStats object is constructed.");else{$t.info("Initializing peer connection stats");var i=this.peer;try{this.collection=new Zt.WebRTCStats({getStatsInterval:t,getStats:function(){return i.getStats()},includeRawStats:!0}),this.collection.on("stats",function(t){var i=function(t){var n=t,i=(n.input,n.output,n.rawStats,T(n,["input","output","rawStats"]));return g(d({},i),{audio:{inbounds:t.input.audio.map(function(t){var n=t,i=n.packetLossRatio,r=n.packetLossDelta,e=n.bitrate,s=T(n,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:i,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)}),outbounds:t.output.audio.map(function(t){var n=t,i=n.packetLossRatio,r=n.packetLossDelta,e=n.bitrate,s=T(n,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:i,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)})},video:{inbounds:t.input.video.map(function(t){var n=t,i=n.packetLossRatio,r=n.packetLossDelta,e=n.bitrate,s=T(n,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:i,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)}),outbounds:t.output.video.map(function(t){var n=t,i=n.packetLossRatio,r=n.packetLossDelta,e=n.bitrate,s=T(n,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:i,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)})},raw:t.rawStats})}(t);rt(i),n.emit(tn,i)}),this.collection.start(),this.initialized=!0}catch(t){$t.error(t)}}},i.parseStats=function(t){return $t.warn("The parseStats method is deprecated and will be removed in future releases."),null},i.stop=function(){$t.info("Stopping peer connection stats"),this.collection.stop()},n}(jt),rn={},en={},un={},on={exports:{}};function hn(){if(kt)return on.exports;kt=1;var t=on.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(t){return t.encoding?"rtpmap:%d %s/%s/%s":t.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(t){return null!=t.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(t){return null!=t.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(t){return"extmap:%d"+(t.direction?"/%s":"%v")+(t["encrypt-uri"]?" %s":"%v")+" %s"+(t.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(t){return null!=t.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(t){var n="candidate:%s %d %s %d %s %d typ %s";return n+=null!=t.raddr?" raddr %s rport %d":"%v%v",n+=null!=t.tcptype?" tcptype %s":"%v",null!=t.generation&&(n+=" generation %d"),n+=null!=t["network-id"]?" network-id %d":"%v",n+=null!=t["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(t){var n="ssrc:%d";return null!=t.attribute&&(n+=" %s",null!=t.value&&(n+=":%s")),n}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(t){return null!=t.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(t){return t.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(t){return"imageattr:%s %s %s"+(t.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(t){return"simulcast:%s %s"+(t.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(t){return"ts-refclk:%s"+(null!=t.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(t){var n="mediaclk:";return n+=null!=t.id?"id=%s %s":"%v%s",n+=null!=t.mediaClockValue?"=%s":"",n+=null!=t.rateNumerator?" rate=%s":"",n+=null!=t.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};return k.keys(t).forEach(function(n){t[n].forEach(function(t){t.reg||(t.reg=/(.*)/),t.format||(t.format="%s")})}),on.exports}function cn(){return bt||(bt=1,function(t){var n=function(t){return String(Number(t))===t?Number(t):t},i=function(t,i,r){var e=t.name&&t.names;t.push&&!i[t.push]?i[t.push]=[]:e&&!i[t.name]&&(i[t.name]={});var s=t.push?{}:e?i[t.name]:i;(function(t,i,r,e){if(e&&!r)i[e]=n(t[1]);else for(var s=0;s1&&(t[r[0]]=void 0),t};t.parseParams=function(t){return t.split(/;\s?/).reduce(s,{})},t.parseFmtpConfig=t.parseParams,t.parsePayloads=function(t){return t.toString().split(" ").map(Number)},t.parseRemoteCandidates=function(t){for(var i=[],r=t.split(" ").map(n),e=0;e=e)return t;var n=r[i];switch(i+=1,t){case"%%":return"%";case"%s":return String(n);case"%d":return Number(n);case"%v":return""}})},r=function(t,n,r){var e=[t+"="+(V(n.format,Function)?n.format(n.push?r:r[n.name]):n.format)];if(n.names)for(var s=0;s0?o-4:o;for(e=0;e>16&255,c[a++]=r>>8&255,c[a++]=255&r;return 2===h&&(r=n[t.charCodeAt(e)]<<2|n[t.charCodeAt(e+1)]>>4,c[a++]=255&r),1===h&&(r=n[t.charCodeAt(e)]<<10|n[t.charCodeAt(e+1)]<<4|n[t.charCodeAt(e+2)]>>2,c[a++]=r>>8&255,c[a++]=255&r),c},ni.fromByteArray=function(n){for(var i,r=n.length,e=r%3,s=[],u=16383,h=0,c=r-e;hc?c:h+u));return 1===e?(i=n[r-1],s.push(t[i>>2]+t[i<<4&63]+"==")):2===e&&(i=(n[r-2]<<8)+n[r-1],s.push(t[i>>10]+t[i>>4&63]+t[i<<2&63]+"=")),s.join("")};for(var t=[],n=[],i=(void 0===E?"undefined":W(E))<"u"?E:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)t[e]=r[e],n[r.charCodeAt(e)]=e;function s(t){var n=t.length;if(n%4>0)throw new y("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");return-1===i&&(i=n),[i,i===n?0:4-i%4]}function u(n){return t[n>>18&63]+t[n>>12&63]+t[n>>6&63]+t[63&n]}function o(t,n,i){for(var r,e=[],s=n;s>1,a=-7,f=i?e-1:0,v=i?-1:1,d=t[n+f];for(f+=v,s=d&(1<<-a)-1,d>>=-a,a+=o;a>0;s=256*s+t[n+f],f+=v,a-=8);for(u=s&(1<<-a)-1,s>>=-a,a+=r;a>0;u=256*u+t[n+f],f+=v,a-=8);if(0===s)s=1-c;else{if(s===h)return u?NaN:1/0*(d?-1:1);u+=b.pow(2,r),s-=c}return(d?-1:1)*u*b.pow(2,s-r)},ii.write=function(t,n,i,r,e,s){var u,o,h,c=8*s-e-1,a=(1<>1,v=23===e?b.pow(2,-24)-b.pow(2,-77):0,d=r?0:s-1,l=r?1:-1,w=n<0||0===n&&1/n<0?1:0;for(n=b.abs(n),S(n)||n===1/0?(o=S(n)?1:0,u=a):(u=b.floor(b.log(n)/b.LN2),n*(h=b.pow(2,-u))<1&&(u--,h*=2),(n+=u+f>=1?v/h:v*b.pow(2,1-f))*h>=2&&(u++,h/=2),u+f>=a?(o=0,u=a):u+f>=1?(o=(n*h-1)*b.pow(2,e),u+=f):(o=n*b.pow(2,f-1)*b.pow(2,e),u=0));e>=8;t[i+d]=255&o,d+=l,o/=256,e-=8);for(u=u<0;t[i+d]=255&u,d+=l,u/=256,c-=8);t[i+d-l]|=128*w}),ii),s="function"==typeof n&&"function"==typeof i?i("nodejs.util.inspect.custom"):null;t.Buffer=h,t.SlowBuffer=function(t){return+t!=t&&(t=0),h.alloc(+t)},t.INSPECT_MAX_BYTES=50;var u=2147483647;function o(t){if(t>u)throw new RangeError('The value "'+t+'" is invalid for option "size"');var n=new E(t);return k.setPrototypeOf(n,h.prototype),n}function h(t,n,i){if("number"==typeof t){if("string"==typeof n)throw new p('The "string" argument must be of type string. Received type number');return f(t)}return c(t,n,i)}function c(t,i,r){if("string"==typeof t)return function(t,n){if(("string"!=typeof n||""===n)&&(n="utf8"),!h.isEncoding(n))throw new p("Unknown encoding: "+n);var i=0|w(t,n),r=o(i),e=r.write(t,n);return e!==i&&(r=r.slice(0,e)),r}(t,i);if(ArrayBuffer.isView(t))return function(t){if(et(t,E)){var n=new E(t);return d(n.buffer,n.byteOffset,n.byteLength)}return v(t)}(t);if(null==t)throw new p("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":W(t)));if(et(t,ArrayBuffer)||t&&et(t.buffer,ArrayBuffer)||("undefined"==typeof SharedArrayBuffer?"undefined":W(SharedArrayBuffer))<"u"&&(et(t,SharedArrayBuffer)||t&&et(t.buffer,SharedArrayBuffer)))return d(t,i,r);if("number"==typeof t)throw new p('The "value" argument must not be of type number. Received type number');var e=t.valueOf&&t.valueOf();if(null!=e&&e!==t)return h.from(e,i,r);var s=function(t){if(h.isBuffer(t)){var n=0|l(t.length),i=o(n);return 0===i.length||t.copy(i,0,0,n),i}return void 0!==t.length?"number"!=typeof t.length||st(t.length)?o(0):v(t):"Buffer"===t.type&&Array.isArray(t.data)?v(t.data):void 0}(t);if(s)return s;if((void 0===n?"undefined":W(n))<"u"&&null!=n.toPrimitive&&"function"==typeof t[n.toPrimitive])return h.from(t[n.toPrimitive]("string"),i,r);throw new p("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":W(t)))}function a(t){if("number"!=typeof t)throw new p('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return a(t),o(t<0?0:0|l(t))}function v(t){for(var n=t.length<0?0:0|l(t.length),i=o(n),r=0;r=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return 0|t}function w(t,n){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||et(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new p('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(void 0===t?"undefined":W(t)));var i=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===i)return 0;for(var e=!1;;)switch(n){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return nt(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return it(t).length;default:if(e)return r?-1:nt(t).length;n=(""+n).toLowerCase(),e=!0}}function g(t,n,i){var r=!1;if((void 0===n||n<0)&&(n=0),n>this.length||((void 0===i||i>this.length)&&(i=this.length),i<=0)||(i>>>=0)<=(n>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,n,i);case"utf8":case"utf-8":return B(this,n,i);case"ascii":return O(this,n,i);case"latin1":case"binary":return M(this,n,i);case"base64":return N(this,n,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,n,i);default:if(r)throw new p("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function _(t,n,i){var r=t[n];t[n]=t[i],t[i]=r}function m(t,n,i,r,e){if(0===t.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),st(i=+i)&&(i=e?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(e)return-1;i=t.length-1}else if(i<0){if(!e)return-1;i=0}if("string"==typeof n&&(n=h.from(n,r)),h.isBuffer(n))return 0===n.length?-1:T(t,n,i,r,e);if("number"==typeof n)return n&=255,"function"==typeof E.prototype.indexOf?e?E.prototype.indexOf.call(t,n,i):E.prototype.lastIndexOf.call(t,n,i):T(t,[n],i,r,e);throw new p("val must be string, number or Buffer")}function T(t,n,i,r,e){var s,u=1,o=t.length,h=n.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||n.length<2)return-1;u=2,o/=2,h/=2,i/=2}function c(t,n){return 1===u?t[n]:t.readUInt16BE(n*u)}if(e){var a=-1;for(s=i;so&&(i=o-h),s=i;s>=0;s--){for(var f=!0,v=0;ve&&(r=e):r=e;var s,u=n.length;for(r>u/2&&(r=u/2),s=0;s>8,e=i%256,s.push(e),s.push(r);return s}(n,t.length-i),t,i,r)}function N(t,n,i){return 0===n&&i===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(n,i))}function B(t,n,i){i=b.min(t.length,i);for(var r=[],e=n;e239?4:s>223?3:s>191?2:1;if(e+o<=i){var h=void 0,c=void 0,a=void 0,f=void 0;switch(o){case 1:s<128&&(u=s);break;case 2:128==(192&(h=t[e+1]))&&(f=(31&s)<<6|63&h)>127&&(u=f);break;case 3:h=t[e+1],c=t[e+2],128==(192&h)&&128==(192&c)&&(f=(15&s)<<12|(63&h)<<6|63&c)>2047&&(f<55296||f>57343)&&(u=f);break;case 4:h=t[e+1],c=t[e+2],a=t[e+3],128==(192&h)&&128==(192&c)&&128==(192&a)&&(f=(15&s)<<18|(63&h)<<12|(63&c)<<6|63&a)>65535&&f<1114112&&(u=f)}}null===u?(u=65533,o=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),e+=o}return function(t){var n=t.length;if(n<=x)return String.fromCharCode.apply(String,t);for(var i="",r=0;rr.length?(h.isBuffer(s)||(s=h.from(s)),s.copy(r,e)):E.prototype.set.call(r,s,e);else{if(!h.isBuffer(s))throw new p('"list" argument must be an Array of Buffers');s.copy(r,e)}e+=s.length}return r},h.byteLength=w,h.prototype.mv=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;ni&&(n+=" ... "),""},s&&(h.prototype[s]=h.prototype.inspect),h.prototype.compare=function(t,n,i,r,e){if(et(t,E)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw new p('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(void 0===t?"undefined":W(t)));if(void 0===n&&(n=0),void 0===i&&(i=t?t.length:0),void 0===r&&(r=0),void 0===e&&(e=this.length),n<0||i>t.length||r<0||e>this.length)throw new RangeError("out of range index");if(r>=e&&n>=i)return 0;if(r>=e)return-1;if(n>=i)return 1;if(this===t)return 0;for(var s=(e>>>=0)-(r>>>=0),u=(i>>>=0)-(n>>>=0),o=b.min(s,u),c=this.slice(r,e),a=t.slice(n,i),f=0;f>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var e=this.length-n;if((void 0===i||i>e)&&(i=e),t.length>0&&(i<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return I(this,t,n,i);case"utf8":case"utf-8":return R(this,t,n,i);case"ascii":case"latin1":case"binary":return C(this,t,n,i);case"base64":return D(this,t,n,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n,i);default:if(s)throw new p("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this.yv||this,0)}};var x=4096;function O(t,n,i){var r="";i=b.min(t.length,i);for(var e=n;er)&&(i=r);for(var e="",s=n;si)throw new RangeError("Trying to access beyond buffer length")}function H(t,n,i,r,e,s){if(!h.isBuffer(t))throw new p('"buffer" argument must be a Buffer instance');if(n>e||nt.length)throw new RangeError("Index out of range")}function z(t,n,i,r,e){J(n,r,e,t,i,7);var s=Number(n&BigInt(4294967295));t[i++]=s,s>>=8,t[i++]=s,s>>=8,t[i++]=s,s>>=8,t[i++]=s;var u=Number(n>>BigInt(32)&BigInt(4294967295));return t[i++]=u,u>>=8,t[i++]=u,u>>=8,t[i++]=u,u>>=8,t[i++]=u,i}function X(t,n,i,r,e){J(n,r,e,t,i,7);var s=Number(n&BigInt(4294967295));t[i+7]=s,s>>=8,t[i+6]=s,s>>=8,t[i+5]=s,s>>=8,t[i+4]=s;var u=Number(n>>BigInt(32)&BigInt(4294967295));return t[i+3]=u,u>>=8,t[i+2]=u,u>>=8,t[i+1]=u,u>>=8,t[i]=u,i+8}function q(t,n,i,r,e,s){if(i+r>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function G(t,n,i,r,s){return n=+n,i>>>=0,s||q(t,0,i,4),e.write(t,n,i,r,23,4),i+4}function j(t,n,i,r,s){return n=+n,i>>>=0,s||q(t,0,i,8),e.write(t,n,i,r,52,8),i+8}h.prototype.slice=function(t,n){var i=this.length;(t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(n=void 0===n?i:~~n)<0?(n+=i)<0&&(n=0):n>i&&(n=i),n>>=0,n>>>=0,i||F(t,n,this.length);for(var r=this[t],e=1,s=0;++s>>=0,n>>>=0,i||F(t,n,this.length);for(var r=this[t+--n],e=1;n>0&&(e*=256);)r+=this[t+--n]*e;return r},h.prototype.readUint8=h.prototype.readUInt8=function(t,n){return t>>>=0,n||F(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,n){return t>>>=0,n||F(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,n){return t>>>=0,n||F(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,n){return t>>>=0,n||F(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,n){return t>>>=0,n||F(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readBigUInt64LE=ot(function(t){Z(t>>>=0,"offset");var n=this[t],i=this[t+7];(void 0===n||void 0===i)&&$(t,this.length-8);var r=n+this[++t]*b.pow(2,8)+this[++t]*b.pow(2,16)+this[++t]*b.pow(2,24),e=this[++t]+this[++t]*b.pow(2,8)+this[++t]*b.pow(2,16)+i*b.pow(2,24);return BigInt(r)+(BigInt(e)<>>=0,"offset");var n=this[t],i=this[t+7];(void 0===n||void 0===i)&&$(t,this.length-8);var r=n*b.pow(2,24)+this[++t]*b.pow(2,16)+this[++t]*b.pow(2,8)+this[++t],e=this[++t]*b.pow(2,24)+this[++t]*b.pow(2,16)+this[++t]*b.pow(2,8)+i;return(BigInt(r)<>>=0,n>>>=0,i||F(t,n,this.length);for(var r=this[t],e=1,s=0;++s=(e*=128)&&(r-=b.pow(2,8*n)),r},h.prototype.readIntBE=function(t,n,i){t>>>=0,n>>>=0,i||F(t,n,this.length);for(var r=n,e=1,s=this[t+--r];r>0&&(e*=256);)s+=this[t+--r]*e;return s>=(e*=128)&&(s-=b.pow(2,8*n)),s},h.prototype.readInt8=function(t,n){return t>>>=0,n||F(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,n){t>>>=0,n||F(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},h.prototype.readInt16BE=function(t,n){t>>>=0,n||F(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},h.prototype.readInt32LE=function(t,n){return t>>>=0,n||F(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,n){return t>>>=0,n||F(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readBigInt64LE=ot(function(t){Z(t>>>=0,"offset");var n=this[t],i=this[t+7];(void 0===n||void 0===i)&&$(t,this.length-8);var r=this[t+4]+this[t+5]*b.pow(2,8)+this[t+6]*b.pow(2,16)+(i<<24);return(BigInt(r)<>>=0,"offset");var n=this[t],i=this[t+7];(void 0===n||void 0===i)&&$(t,this.length-8);var r=(n<<24)+this[++t]*b.pow(2,16)+this[++t]*b.pow(2,8)+this[++t];return(BigInt(r)<>>=0,n||F(t,4,this.length),e.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,n){return t>>>=0,n||F(t,4,this.length),e.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,n){return t>>>=0,n||F(t,8,this.length),e.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,n){return t>>>=0,n||F(t,8,this.length),e.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,n,i,r){t=+t,n>>>=0,i>>>=0,r||H(this,t,n,i,b.pow(2,8*i)-1,0);var e=1,s=0;for(this[n]=255&t;++s>>=0,i>>>=0,r||H(this,t,n,i,b.pow(2,8*i)-1,0);var e=i-1,s=1;for(this[n+e]=255&t;--e>=0&&(s*=256);)this[n+e]=t/s&255;return n+i},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,n,i){return t=+t,n>>>=0,i||H(this,t,n,1,255,0),this[n]=255&t,n+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,n,i){return t=+t,n>>>=0,i||H(this,t,n,2,65535,0),this[n]=255&t,this[n+1]=t>>>8,n+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,n,i){return t=+t,n>>>=0,i||H(this,t,n,2,65535,0),this[n]=t>>>8,this[n+1]=255&t,n+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,n,i){return t=+t,n>>>=0,i||H(this,t,n,4,4294967295,0),this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=255&t,n+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,n,i){return t=+t,n>>>=0,i||H(this,t,n,4,4294967295,0),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t,n+4},h.prototype.writeBigUInt64LE=ot(function(t,n){return void 0===n&&(n=0),z(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=ot(function(t,n){return void 0===n&&(n=0),X(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(t,n,i,r){if(t=+t,n>>>=0,!r){var e=b.pow(2,8*i-1);H(this,t,n,i,e-1,-e)}var s=0,u=1,o=0;for(this[n]=255&t;++s>>=0,!r){var e=b.pow(2,8*i-1);H(this,t,n,i,e-1,-e)}var s=i-1,u=1,o=0;for(this[n+s]=255&t;--s>=0&&(u*=256);)t<0&&0===o&&0!==this[n+s+1]&&(o=1),this[n+s]=(t/u|0)-o&255;return n+i},h.prototype.writeInt8=function(t,n,i){return t=+t,n>>>=0,i||H(this,t,n,1,127,-128),t<0&&(t=255+t+1),this[n]=255&t,n+1},h.prototype.writeInt16LE=function(t,n,i){return t=+t,n>>>=0,i||H(this,t,n,2,32767,-32768),this[n]=255&t,this[n+1]=t>>>8,n+2},h.prototype.writeInt16BE=function(t,n,i){return t=+t,n>>>=0,i||H(this,t,n,2,32767,-32768),this[n]=t>>>8,this[n+1]=255&t,n+2},h.prototype.writeInt32LE=function(t,n,i){return t=+t,n>>>=0,i||H(this,t,n,4,2147483647,-2147483648),this[n]=255&t,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24,n+4},h.prototype.writeInt32BE=function(t,n,i){return t=+t,n>>>=0,i||H(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t,n+4},h.prototype.writeBigInt64LE=ot(function(t,n){return void 0===n&&(n=0),z(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=ot(function(t,n){return void 0===n&&(n=0),X(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeFloatLE=function(t,n,i){return G(this,t,n,!0,i)},h.prototype.writeFloatBE=function(t,n,i){return G(this,t,n,!1,i)},h.prototype.writeDoubleLE=function(t,n,i){return j(this,t,n,!0,i)},h.prototype.writeDoubleBE=function(t,n,i){return j(this,t,n,!1,i)},h.prototype.copy=function(t,n,i,r){if(!h.isBuffer(t))throw new p("argument should be a Buffer");if(i||(i=0),!r&&0!==r&&(r=this.length),n>=t.length&&(n=t.length),n||(n=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-n>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(s=n;s=r+4;i-=3)n="_".concat(t.slice(i-3,i)).concat(n);return"".concat(t.slice(0,i)).concat(n)}function J(t,n,i,r,e,s){if(t>i||t= 0".concat(o," and < 2").concat(o," ** ").concat(8*(s+1)).concat(o):">= -(2".concat(o," ** ").concat(8*(s+1)-1).concat(o,") and < 2 ** ")+"".concat(8*(s+1)-1).concat(o),new Q.ERR_OUT_OF_RANGE("value",u,t)}!function(t,n,i){Z(n,"offset"),(void 0===t[n]||void 0===t[n+i])&&$(n,t.length-(i+1))}(r,e,s)}function Z(t,n){if("number"!=typeof t)throw new Q.ERR_INVALID_ARG_TYPE(n,"number",t)}function $(t,n,i){throw b.floor(t)!==t?(Z(t,i),new Q.ERR_OUT_OF_RANGE("offset","an integer",t)):n<0?new Q.ERR_BUFFER_OUT_OF_BOUNDS:new Q.ERR_OUT_OF_RANGE("offset",">= 0 and <= ".concat(n),t)}Y("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Y("ERR_INVALID_ARG_TYPE",function(t,n){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(void 0===n?"undefined":W(n))},p),Y("ERR_OUT_OF_RANGE",function(t,n,i){var r='The value of "'.concat(t,'" is out of range.'),e=i;return Number.isInteger(i)&&b.abs(i)>b.pow(2,32)?e=K(String(i)):"bigint"==(void 0===i?"undefined":W(i))&&(e=String(i),(i>b.pow(BigInt(2),BigInt(32))||i<-b.pow(BigInt(2),BigInt(32)))&&(e=K(e)),e+="n"),r+=" It must be ".concat(n,". Received ").concat(e)},RangeError);var tt=/[^+/0-9A-Za-z-_]/g;function nt(t,n){var i;n=n||1/0;for(var r=t.length,e=null,s=[],u=0;u55295&&i<57344){if(!e){if(i>56319){(n-=3)>-1&&s.push(239,191,189);continue}if(u+1===r){(n-=3)>-1&&s.push(239,191,189);continue}e=i;continue}if(i<56320){(n-=3)>-1&&s.push(239,191,189),e=i;continue}i=65536+(e-55296<<10|i-56320)}else e&&(n-=3)>-1&&s.push(239,191,189);if(e=null,i<128){if((n-=1)<0)break;s.push(i)}else if(i<2048){if((n-=2)<0)break;s.push(i>>6|192,63&i|128)}else if(i<65536){if((n-=3)<0)break;s.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new y("Invalid code point");if((n-=4)<0)break;s.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return s}function it(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(tt,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function rt(t,n,i,r){var e;for(e=0;e=n.length||e>=t.length);++e)n[e+i]=t[e];return e}function et(t,n){return V(t,n)||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===n.name}function st(t){return t!=t}var ut=function(){for(var t="0123456789abcdef",n=new Array(256),i=0;i<16;++i)for(var r=16*i,e=0;e<16;++e)n[r+e]=t[i]+t[e];return n}();function ot(t){return("undefined"==typeof BigInt?"undefined":W(BigInt))>"u"?ht:t}function ht(){throw new y("BigInt not supported")}}(ti)),ti}function ei(){if(bn)return Zn.exports;bn=1;var t=65536,n=(kn||(kn=1,function(t,n){var i=ri(),r=i.Buffer;function e(t,n){for(var i in t)n[i]=t[i]}function s(t,n,i){return r(t,n,i)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=i:(e(i,n),n.Buffer=s),s.prototype=k.create(r.prototype),e(r,s),s.from=function(t,n,i){if("number"==typeof t)throw new p("Argument must not be a number");return r(t,n,i)},s.alloc=function(t,n,i){if("number"!=typeof t)throw new p("Argument must be a number");var e=r(t);return void 0!==n?"string"==typeof i?e.fill(n,i):e.fill(n):e.fill(0),e},s.allocUnsafe=function(t){if("number"!=typeof t)throw new p("Argument must be a number");return r(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new p("Argument must be a number");return i.SlowBuffer(t)}}($n,$n.exports)),$n.exports).Buffer,i=R.crypto||R.msCrypto;return i&&i.getRandomValues?Zn.exports=function(r,e){if(r>4294967295)throw new RangeError("requested too many random bytes");var s=n.allocUnsafe(r);if(r>0)if(r>t)for(var u=0;u0&&(o.bandwidth.push({type:"AS",limit:u.getBitrate()}),o.bandwidth.push({type:"TIAS",limit:1e3*u.getBitrate()}));for(var h,v=Lt(this.getCandidates());!(h=v()).done;){var d=h.value;o.candidates.push({foundation:d.getFoundation(),component:d.getComponentId(),transport:d.getTransport(),priority:d.getPriority(),ip:d.getAddress(),port:d.getPort(),type:d.getType(),raddr:d.getRelAddr(),rport:d.getRelPort()})}if(this.getICE()&&(o.iceUfrag=this.getICE().getUfrag(),o.icePwd=this.getICE().getPwd()),n("audio",u.getType())||n("video",u.getType())){o.rtcpMux="rtcp-mux",o.rtcpRsize="rtcp-rsize",this.getDTLS()?(o.protocol="UDP/TLS/RTP/SAVPF",o.fingerprint={type:this.getDTLS().getHash(),hash:this.getDTLS().getFingerprint()},o.setup=c.toString(this.getDTLS().getSetup())):this.getCrypto()?(o.protocol="RTP/SAVPF",o.crypto=[{id:this.getCrypto().getTag(),suite:this.getCrypto().getSuite(),config:this.getCrypto().getKeyParams()}]):o.protocol="RTP/AVP";for(var l,w=Lt(u.getCodecs().values());!(l=w()).done;){var g=l.value;n("video",u.getType())?o.rtp.push({payload:g.getType(),codec:g.getCodec().toUpperCase(),rate:9e4}):n("opus",g.getCodec())||n("multiopus",g.getCodec())?o.rtp.push({payload:g.getType(),codec:g.getCodec(),rate:48e3,encoding:g.getChannels()}):o.rtp.push({payload:g.getType(),codec:g.getCodec(),rate:8e3});for(var _,m=Lt(g.getRTCPFeedbacks());!(_=m()).done;){var y=_.value;o.rtcpFb.push({payload:g.getType(),type:y.getId(),subtype:y.getParams().join(" ")})}g.hasRTX()&&(o.rtp.push({payload:g.getRTX(),codec:"rtx",rate:9e4}),o.fmtp.push({payload:g.getRTX(),config:"apt="+g.getType()}));var p=g.getParams();if(k.keys(p).length){var b={payload:g.getType(),config:""};for(var A in p)b.config.length&&(b.config+=";"),k.hasOwnProperty.call(p,A)?b.config+=A+"="+p[A]:b.config+=A;o.fmtp.push(b)}}for(var T,S=[],E=Lt(o.rtp);!(T=E()).done;){var I=T.value;S.push(I.payload)}o.payloads=S.join(" ");for(var R,C=Lt(u.getExtensions().entries());!(R=C()).done;){var D=R.value,P=D[0],N=D[1];o.ext.push({value:P,uri:N})}for(var B,x=Lt(u.getRIDs().values());!(B=x()).done;){var O=B.value,M={id:O.getId(),direction:f.toString(O.getDirection()),params:""};O.getFormats().length&&(M.params="pt="+O.getFormats().join(","));for(var L,U=Lt(O.getParams().entries());!(L=U()).done;){var F=L.value,V=F[0],H=F[1];M.params+=(M.params.length?";":"")+V+"="+H}o.rids.push(M)}var W=u.getSimulcast();if(W){var z=1;o.simulcast={};var X=W.getSimulcastStreams(f.SEND),q=W.getSimulcastStreams(f.RECV);if(X&&X.length){for(var G,j="",Q=Lt(X);!(G=Q()).done;){for(var Y,K="",J=Lt(G.value);!(Y=J()).done;){var Z=Y.value;K+=(K.length?",":"")+(Z.isPaused()?"~":"")+Z.getId()}j+=(j.length?";":"")+K}o.simulcast["dir"+z]="send",o.simulcast["list"+z]=j,z++}if(q&&q.length){for(var $,tt="",nt=Lt(q);!($=nt()).done;){for(var it,rt="",et=Lt($.value);!(it=et()).done;){var st=it.value;rt+=(rt.length?",":"")+(st.isPaused()?"~":"")+st.getId()}tt+=(tt.length?";":"")+rt}o.simulcast["dir"+z]="recv",o.simulcast["list"+z]=tt,z++}}}else if(u.hasDataChannel()){o.protocol="UDP/DTLS/SCTP",o.payloads="webrtc-datachannel";var ut=u.getDataChannel();o.sctpPort=ut.getPort(),o.maxMessageSize=ut.getMaxMessageSize()}i.media.push(o)}for(var ot,ht=Lt(this.streams.values());!(ot=ht()).done;)for(var ct,at=ot.value,ft=Lt(at.getTracks().values());!(ct=ft()).done;){var vt=ct.value;for(var dt in i.media){var lt=i.media[dt];if(vt.getMediaId()){if(vt.getMediaId()==lt.mid){var wt=vt.getSourceGroups();for(var gt in wt){var _t=wt[gt];lt.ssrcGroups.push({semantics:_t.getSemantics(),ssrcs:_t.getSSRCs().join(" ")})}var mt=vt.getSSRCs();for(var yt in mt)lt.ssrcs.push({id:mt[yt],attribute:"cname",value:at.getId()}),lt.ssrcs.push({id:mt[yt],attribute:"msid",value:at.getId()+" "+vt.getId()});lt.msid=at.getId()+" "+vt.getId();break}}else if(n(lt.type,vt.getMedia())){var pt=vt.getSourceGroups();for(var kt in pt){var bt=pt[kt];lt.ssrcGroups.push({semantics:bt.getSemantics(),ssrcs:bt.getSSRCs().join(" ")})}var At=vt.getSSRCs();for(var Tt in At)lt.ssrcs.push({id:At[Tt],attribute:"cname",value:at.getId()}),lt.ssrcs.push({id:At[Tt],attribute:"msid",value:at.getId()+" "+vt.getId()});break}}}var St={type:"BUNDLE",mids:e.join(" ")};return i.groups.push(St),t.write(i)},e.toIceFragmentString=function(){var n={version:0,media:[],candidates:[]};this.hasICE()&&this.getICE().isLite()&&(n.icelite="ice-lite"),this.getICE()&&(n.iceUfrag=this.getICE().getUfrag(),n.icePwd=this.getICE().getPwd());for(var i,r=Lt(this.getCandidates());!(i=r()).done;){var e=i.value;n.candidates.push({foundation:e.getFoundation(),component:e.getComponentId(),transport:e.getTransport(),priority:e.getPriority(),ip:e.getAddress(),port:e.getPort(),type:e.getType(),raddr:e.getRelAddr(),rport:e.getRelPort()})}return t.write(n).slice(10)},r}();return b.create=function(t){var n,r=new b;if(t.streams)for(var e,c=Lt(t.streams);!(e=c()).done;){var a=e.value;r.addStream(l.expand(a))}t.ice&&(V(t.ice,o)?r.setICE(t.ice.clone()):r.setICE(o.expand(t.ice))),t.dtls&&(V(t.dtls,s)?r.setDTLS(t.dtls):r.setDTLS(s.expand(t.dtls))),t.crypto&&(V(t.crypto,u)?r.setCrypto(t.crypto):r.setCrypto(u.expand(t.crypto)));for(var f,v=Lt(t.candidates||[]);!(f=v()).done;){var d=f.value;V(d,i)?r.addCandidate(d.clone()):r.addCandidate(i.expand(d))}for(var w,g=96,_=1,m=0,y=Lt(k.entries(t.capabilities||{}));!(w=y()).done;){var p=w.value,A=p[0],T=p[1];if(t.unified&&null!==(n=t.streams)&&void 0!==n&&n.length)for(var S,E=Lt(r.getTracksByMediaType(A));!(S=E()).done;){for(var I,R=S.value,C=h.create(R.getMediaId(),A,T),D=Lt(C.getCodecs());!(I=D()).done;){var P=I.value,N=(P[0],P[1]);N.getType()>=96&&N.setType(g++),N.getRTX()&&N.setRTX(g++)}if(T.extensions)for(var B,x=Lt(T.extensions);!(B=x()).done;){var O=B.value;15===_&&_++,C.addExtension(_++,O)}r.addMedia(C)}else{for(var M,L=h.create(t.unified?String(m++):A,A,T),U=Lt(L.getCodecs());!(M=U()).done;){var F=M.value,H=(F[0],F[1]);H.getType()>=96&&H.setType(g++),H.getRTX()&&H.setRTX(g++)}if(T.extensions)for(var W,z=Lt(T.extensions);!(W=z()).done;){var X=W.value;15===_&&_++,L.addExtension(_++,X)}r.addMedia(L)}}return r},b.expand=function(t){if("SDPInfo"===t.constructor.name)return t;for(var n,r=new b(t.version),e=Lt(t.medias||[]);!(n=e()).done;){var c=n.value,a=h.expand(c);a&&r.addMedia(a)}for(var f,v=Lt(t.streams||[]);!(f=v()).done;){var d=f.value,w=l.expand(d);w&&r.addStream(w)}for(var g,_=Lt(t.candidates||[]);!(g=_()).done;){var m=g.value,y=i.expand(m);y&&r.addCandidate(y)}return t.ice&&r.setICE(o.expand(t.ice)),t.dtls&&r.setDTLS(s.expand(t.dtls)),t.crypto&&r.setCrypto(u.expand(t.crypto)),t.extmapAllowMixedNotSupported&&(this.extmapAllowMixed=!t.extmapAllowMixedNotSupported),r},b.clone=function(t){return"SDPInfo"===t.constructor.name?t.clone():b.expand(t)},b.process=function(t){return b.parse(t)},b.parse=function(k){var T=t.parse(k),S=new b;if(S.setVersion(T.version),T.iceUfrag&&T.icePwd){var E=String(T.iceUfrag),I=String(T.icePwd),R=new o(E,I);R.setLite("ice-lite"==T.icelite),R.setEndOfCandidates("end-of-candidates"==T.endOfCandidates),S.setICE(R)}for(var C in T.media){var D=T.media[C],P=D.type,N=D.mid?D.mid.toString():C,B=new h(N,P);if(D.iceUfrag&&D.icePwd){var x=String(D.iceUfrag),O=String(D.icePwd),M=new o(x,O);M.setLite("ice-lite"==T.icelite),M.setEndOfCandidates("end-of-candidates"==D.endOfCandidates),S.setICE(M)}for(var L=0;D.candidates&&L1&&st.setChannels(Q.encoding),B.addCodec(st)}}}for(var ut,ot=Lt(G.entries());!(ut=ot()).done;){var ht=ut.value,ct=B.getCodecForType(ht[0]);ct&&ct.setRTX(ht[1])}for(var at=0;D.rtcpFb&&at0?2===h.length?W(h[1])==e?this[h[0]]=h[1].call(this,a):this[h[0]]=h[1]:3===h.length?W(h[1])!==e||h[1].exec&&h[1].test?this[h[0]]=a?a.replace(h[1],h[2]):r:this[h[0]]=a?h[1].call(this,a,h[2]):r:4===h.length&&(this[h[0]]=a?h[3].call(this,a.replace(h[1],h[2])):r):this[h]=a||r;f+=2}},K=function(t,n){for(var i in n)if(W(n[i])===u&&n[i].length>0){for(var e=0;e2&&(t[c]="iPad",t[f]=_),t},this.getEngine=function(){var t={};return t[a]=r,t[d]=r,Y.call(t,m,p.engine),t},this.getOS=function(){var t={};return t[a]=r,t[d]=r,Y.call(t,m,p.os),k&&!t[a]&&y&&y.platform&&"Unknown"!=y.platform&&(t[a]=y.platform.replace(/chrome os/i,H).replace(/macos/i,z)),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return m},this.setUA=function(t){return m=(void 0===t?"undefined":W(t))===o&&t.length>500?Q(t,500):t,this},this.setUA(m),this};$.VERSION="0.7.39",$.BROWSER=q([a,d,h]),$.CPU=q([l]),$.DEVICE=q([c,v,f,w,g,m,_,y,p]),$.ENGINE=$.OS=q([a,d]),t.exports&&(n=t.exports=$),n.UAParser=$;var tt=(void 0===i?"undefined":W(i))!==s&&(i.jQuery||i.Zepto);if(tt&&!tt.ua){var nt=new $;tt.ua=nt.getResult(),tt.ua.get=function(){return nt.getUA()},tt.ua.set=function(t){nt.setUA(t);var n=nt.getResult();for(var i in n)tt.ua[i]=n[i]}}}("object"==(void 0===f?"undefined":W(f))?f:bi)}(ki,ki.exports)),ki.exports),Ti=C(Ai),Si=["iOS"],Ei=function(t){function n(){return t.call(this,f.navigator.userAgent)||this}Ct(n,t);var i=n.prototype;return i.isChromium=function(){return this.getUA().match(/Chrome/i)},i.isChrome=function(){var t=this.getBrowser();if(!t.name)return!1;var n,i=this.getOS();return n=!new RegExp(Si.join("|"),"i").test(i.name),t.name.match(/Chrome/i)&&n},i.isFirefox=function(){var t=this.getBrowser();return!!t.name&&t.name.match(/Firefox/i)},i.isOpera=function(){var t=this.getBrowser();return!!t.name&&t.name.match(/Opera/i)},i.isSafari=function(){var t=this.getBrowser();return!!t.name&&t.name.match(/Safari/i)},n}(Ti),Ii=gt.get("SdpParser"),Ri=Array.from({length:31},function(t,n){return n+35}),Ci=Array.from({length:32},function(t,n){return n+96}),Di=Array.from({length:14},function(t,n){return n+1}),Pi=Array.from({length:240},function(t,n){return n+16}),Ni={setSimulcast:function(t,n){if(Ii.info("Setting simulcast. Codec: ",n),!(new Ei).isChromium())return Ii.warn("Your browser does not appear to support Simulcast. For a better experience, use a Chromium based browser."),t;if("h264"!==n&&"vp8"!==n)return Ii.warn("Your selected codec ".concat(n," does not appear to support Simulcast. To broadcast using simulcast, please use H.264 or VP8.")),t;if(!/m=video/.test(t))return Ii.warn("There is no available video for simulcast to be enabled."),t;try{for(var i=new RegExp("m=video.*?a=ssrc:(\\d*) cname:(.+?)\\r\\n","s"),r=new RegExp("m=video.*?a=ssrc:(\\d*) msid:(.+?)\\r\\n","s"),e=i.exec(t),s=e[1],u=e[2],o=r.exec(t)[2],h=[s],c=0;c<2;++c){var a=100+2*c,f=a+1;h.push(a),t+="a=ssrc-group:FID "+a+" "+f+"\r\na=ssrc:"+a+" cname:"+u+"\r\na=ssrc:"+a+" msid:"+o+"\r\na=ssrc:"+f+" cname:"+u+"\r\na=ssrc:"+f+" msid:"+o+"\r\n"}return t+="a=ssrc-group:SIM "+h.join(" ")+"\r\n",Ii.info("Simulcast setted"),Ii.debug("Simulcast SDP: ",t),t}catch(t){throw Ii.error("Error setting SDP for simulcast: ",t),t}},setStereo:function(t){return Ii.info("Replacing SDP response for support stereo"),t=t.replace(/useinbandfec=1/g,"useinbandfec=1; stereo=1"),Ii.info("Replaced SDP response for support stereo"),Ii.debug("New SDP value: ",t),t},setDTX:function(t){return Ii.info("Replacing SDP response for support dtx"),t=t.replace("useinbandfec=1","useinbandfec=1; usedtx=1"),Ii.info("Replaced SDP response for support dtx"),Ii.debug("New SDP value: ",t),t},setAbsoluteCaptureTime:function(t){var n="a=extmap:"+Ni.getAvailableHeaderExtensionIdRange(t)[0]+" http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time\r\n";return t=t.replace(/(m=.*\r\n(?:.*\r\n)*?)(a=extmap.*\r\n)/gm,function(t,i,r){return i+n+r}),Ii.info("Replaced SDP response for setting absolute capture time"),Ii.debug("New SDP value: ",t),t},setDependencyDescriptor:function(t){var n="a=extmap:"+Ni.getAvailableHeaderExtensionIdRange(t)[0]+" https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension\r\n";return t=t.replace(/(m=.*\r\n(?:.*\r\n)*?)(a=extmap.*\r\n)/gm,function(t,i,r){return i+n+r}),Ii.info("Replaced SDP response for setting depency descriptor"),Ii.debug("New SDP value: ",t),t},setVideoBitrate:function(t,n){if(n<1)Ii.info("Remove bitrate restrictions"),t=t.replace(/b=AS:.*\r\n/,"").replace(/b=TIAS:.*\r\n/,"");else{var i=pi.SDPInfo.parse(t),r=i.getMedia("video");Ii.info("Setting video bitrate"),r.setBitrate(n),t=i.toString()}return t},removeSdpLine:function(t,n){return Ii.debug("SDP before trimming: ",t),t=t.split("\n").filter(function(t){return t.trim()!==n}).join("\n"),Ii.debug("SDP trimmed result: ",t),t},adaptCodecName:function(t,n,i){if(!t)return t;var r=new RegExp("".concat(n),"i");return t.replace(r,i)},setMultiopus:function(t,n){if(!(new Ei).isFirefox()&&(!n||Bi(n)))if(t.includes("multiopus/48000/6"))Ii.info("Multiopus already setted");else{Ii.info("Setting multiopus");var i=/m=audio 9 UDP\/TLS\/RTP\/SAVPF (.*)\r\n/.exec(t)[0],r=Ni.getAvailablePayloadTypeRange(t)[0],e=i.replace("\r\n"," ")+r+"\r\na=rtpmap:"+r+" multiopus/48000/6\r\na=fmtp:"+r+" channel_mapping=0,4,1,2,3,5;coupled_streams=2;minptime=10;num_streams=4;useinbandfec=1\r\n";t=t.replace(i,e),Ii.info("Multiopus offer created"),Ii.debug("SDP parsed for multioups: ",t)}return t},getAvailablePayloadTypeRange:function(t){for(var n,i=function(){var t=n.value[1].split(" ").map(function(t){return A(t)});e=e.filter(function(n){return!t.includes(n)})},r=t.matchAll(/m=(?:.*) (?:.*) UDP\/TLS\/RTP\/SAVPF (.*)\r\n/gm),e=Ci.concat(Ri),s=Lt(r);!(n=s()).done;)i();return e},getAvailableHeaderExtensionIdRange:function(t){for(var n,i=function(){var t=n.value[1].split(" ").map(function(t){return A(t)});e=e.filter(function(n){return!t.includes(n)})},r=t.matchAll(/a=extmap:(\d+)(?:.*)\r\n/gm),e=Di.concat(Pi),s=Lt(r);!(n=s()).done;)i();return e},renegotiate:function(t,n){for(var i,r=pi.SDPInfo.parse(t),e=pi.SDPInfo.parse(n),s=Lt(r.getMedias());!(i=s()).done;){var u=i.value,o=e.getMediaById(u.getId());if(!o){(o=new pi.MediaInfo(u.getId(),u.getType())).setDirection(pi.Direction.reverse(u.getDirection()));var h=e.getMedia(u.getType());if(h){o.setCodecs(h.getCodecs());for(var c,a=Lt(h.getExtensions());!(c=a()).done;){var f=c.value,v=f[0],d=f[1];o.addExtension(v,d)}}e.addMedia(o)}}return e.toString()},updateMissingVideoExtensions:function(t,n){var i,r=pi.SDPInfo.parse(t),e=null==(i=pi.SDPInfo.parse(n).getMediasByType("video")[0])?void 0:i.getExtensions();if(e||e.length){for(var s,u=function(){var n=s.value,i=n.getExtensions();e.forEach(function(r,e){if(!i.get(e)){var s=n.getId(),u="a=extmap:"+e+" "+r+"\r\n",o=new RegExp("(a=mid:"+s+"\r\n(?:.*\r\n)*?)","g");t=t.replace(o,function(t,n,i){return n+u})}})},o=Lt(r.getMediasByType("video"));!(s=o()).done;)u();return t}},getCodecPayloadType:function(t){for(var n,i={},r=Lt(t.matchAll(/a=rtpmap:(\d+) (\w+)\/\d+/g));!(n=r()).done;){var e=n.value;i[e[1]]=e[2]}return i}},Bi=function(t){return t.getAudioTracks().some(function(t){return t.getSettings().channelCount>2})},xi={VP8:"vp8",VP9:"vp9",H264:"h264",AV1:"av1",H265:"h265"},Oi={OPUS:"opus",MULTIOPUS:"multiopus"},Mi=gt.get("PeerConnection"),Li="Publisher",Ui="Viewer",Fi={track:"track",connectionStateChange:"connectionStateChange"},Vi={stereo:!1,mediaStream:null,codec:"h264",simulcast:!1,scalabilityMode:null,disableAudio:!1,disableVideo:!1,setSDPToPeer:!0},Hi=function(t){function n(){var n;return(n=t.call(this)||this).mode=null,n.sessionDescription=null,n.peer=null,n.peerConnectionStats=null,n.transceiverMap=new Map,n}Ct(n,t);var i=n.prototype;return i.createRTCPeer=function(){return Vt(function(t,n){return zt(this,function(i){return void 0===t&&(t={autoInitStats:!0,statsIntervalMs:1e3}),void 0===n&&(n=Ui),Mi.info("Creating new RTCPeerConnection"),Mi.debug("RTC configuration provided by user: ",t),this.peer=Xi(this,t),this.mode=n,t.autoInitStats&&this.initStats(t),[2]})}).apply(this,arguments)},i.getRTCPeer=function(){return Mi.info("Getting RTC Peer"),this.peer},i.closeRTCPeer=function(){return Vt(function(){var t;return zt(this,function(n){return Mi.info("Closing RTCPeerConnection"),null==(t=this.peer)||t.close(),this.peer=null,this.stopStats(),this.emit(Fi.connectionStateChange,"closed"),[2]})}).call(this)},i.setRTCRemoteSDP=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:Mi.info("Setting RTC Remote SDP"),n={type:"answer",sdp:t},r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.peer.setRemoteDescription(n)];case 2:return r.sent(),Mi.info("RTC Remote SDP was set successfully."),Mi.debug("RTC Remote SDP new value: ",t),[3,4];case 3:throw i=r.sent(),Mi.error("Error while setting RTC Remote SDP: ",i),i;case 4:return[2]}})}).call(this)},i.getRTCLocalSDP=function(){return Vt(function(t){var n,i;return zt(this,function(r){switch(r.label){case 0:return void 0===t&&(t=Vi),Mi.info("Getting RTC Local SDP"),t=d(d({},Vi),t),Mi.debug("Options: ",t),(n=zi(t.mediaStream))?Ki(this.peer,n,t):Ji(this.peer,t),Mi.info("Creating peer offer"),[4,this.peer.createOffer()];case 1:return i=r.sent(),Mi.info("Peer offer created"),Mi.debug("Peer offer response: ",i.sdp),this.sessionDescription=i,t.disableAudio||(t.stereo&&(this.sessionDescription.sdp=Ni.setStereo(this.sessionDescription.sdp)),t.dtx&&(this.sessionDescription.sdp=Ni.setDTX(this.sessionDescription.sdp)),this.sessionDescription.sdp=Ni.setMultiopus(this.sessionDescription.sdp,n)),!t.disableVideo&&t.simulcast&&(this.sessionDescription.sdp=Ni.setSimulcast(this.sessionDescription.sdp,t.codec)),t.absCaptureTime&&(this.sessionDescription.sdp=Ni.setAbsoluteCaptureTime(this.sessionDescription.sdp)),t.dependencyDescriptor&&(this.sessionDescription.sdp=Ni.setDependencyDescriptor(this.sessionDescription.sdp)),t.setSDPToPeer?[4,this.peer.setLocalDescription(this.sessionDescription)]:[3,3];case 2:r.sent(),Mi.info("Peer local description set"),r.label=3;case 3:return[2,this.sessionDescription.sdp]}})}).apply(this,arguments)},i.addRemoteTrack=function(t,n){return Vt(function(){var i;return zt(this,function(r){return i=this,[2,new ut(function(r,e){try{var s=i.peer.addTransceiver(t,{direction:"recvonly",streams:n});i.transceiverMap.set(s,r)}catch(t){e(t)}})]})}).call(this)},i.updateBandwidthRestriction=function(t,n){if(this.mode===Ui)throw Mi.error("Viewer attempting to update bitrate, this is not allowed"),new y("It is not possible for a viewer to update the bitrate.");return Mi.info("Updating bandwidth restriction, bitrate value: ",n),Mi.debug("SDP value: ",t),Ni.setVideoBitrate(t,n)},i.updateBitrate=function(t){return void 0===t&&(t=0),Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:if(this.mode===Ui)throw Mi.error("Viewer attempting to update bitrate, this is not allowed"),new y("It is not possible for a viewer to update the bitrate.");if(!this.peer)throw Mi.error("Cannot update bitrate. No peer found."),new y("Cannot update bitrate. No peer found.");return Mi.info("Updating bitrate to value: ",t),n=this,[4,this.peer.createOffer()];case 1:return n.sessionDescription=r.sent(),[4,this.peer.setLocalDescription(this.sessionDescription)];case 2:return r.sent(),i=this.updateBandwidthRestriction(this.peer.remoteDescription.sdp,t),[4,this.setRTCRemoteSDP(i)];case 3:return r.sent(),Mi.info("Bitrate restrictions updated: ","".concat(t>0?t:"unlimited"," kbps")),[2]}})}).call(this)},i.getRTCPeerStatus=function(){if(Mi.info("Getting RTC peer status"),!this.peer)return null;var t=Zi(this.peer);return Mi.info("RTC peer status getted, value: ",t),t},i.replaceTrack=function(t){if(this.peer){var n=this.peer.getSenders().find(function(n){return n.track.kind===t.kind});n?n.replaceTrack(t):Mi.error("There is no ".concat(t.kind," track in active broadcast."))}else Mi.error("Could not change track if there is not an active connection.")},i.getTracks=function(){var t,n;return null==(n=null==(t=this.peer)?void 0:t.getSenders())?void 0:n.map(function(t){return t.track})},i.initStats=function(t){this.peerConnectionStats?Mi.warn("PeerConnection.initStats() has already been called. Automatic initialization occurs via View.connect(), Publish.connect() or this.createRTCPeer(). See options"):this.peer?(this.peerConnectionStats=new nn(this.peer,t),Kt(this.peerConnectionStats,this,[tn])):Mi.warn("Cannot init peer stats: RTCPeerConnection not initialized")},i.stopStats=function(){var t;null==(t=this.peerConnectionStats)||t.stop(),this.peerConnectionStats=null},n.getCapabilities=function(t){var n=new Ei,i=RTCRtpSender.getCapabilities(t);if(i){var r={},e=new RegExp("^video/(".concat(k.values(xi).join("|"),")x?$"),"i");"audio"===t&&(e=new RegExp("^audio/(".concat(k.values(Oi).join("|"),")$"),"i"),n.isChrome()&&(r.multiopus={mimeType:"audio/multiopus",channels:6}));for(var s,u=Lt(i.codecs);!(s=u()).done;){var o=s.value,h=o.mimeType.match(e);if(h){var c=h[1].toLowerCase();if(r[c]=g(d({},r[c]),{mimeType:o.mimeType}),o.scalabilityModes){var a=r[c].scalabilityModes||[];a=[].concat(a,o.scalabilityModes),r[c].scalabilityModes=[].concat(new Set(a))}o.channels&&(r[c].channels=o.channels)}}i.codecs=k.keys(r).map(function(t){return d({codec:t},r[t])})}return i},n}(jt),Wi=function(t){return(null==t?void 0:t.getAudioTracks().length)<=1&&(null==t?void 0:t.getVideoTracks().length)<=1},zi=function(t){if(!t)return null;if(V(t,MediaStream)&&Wi(t))return t;if(!V(t,MediaStream)){Mi.info("Creating MediaStream to add received tracks.");for(var n,i=new MediaStream,r=Lt(t);!(n=r()).done;){var e=n.value;i.addTrack(e)}if(Wi(i))return i}throw Mi.error("MediaStream must have 1 audio track and 1 video track, or at least one of them."),new y("MediaStream must have 1 audio track and 1 video track, or at least one of them.")},Xi=function(t,n){var i=new RTCPeerConnection(n);return Yi(t,i),i};function qi(t){return Vt(function(){return zt(this,function(n){return[2,new ut(function(n){return w(n,t)})]})})()}var Gi,ji,Qi,Yi=function(t,n){n.ontrack=function(n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:if(Mi.info("New track from peer."),Mi.debug("Track event value: ",n),!(i=t.transceiverMap.get(n.transceiver)))return[3,5];r.label=1;case 1:return n.transceiver.mid?[3,4]:[4,qi(100)];case 2:r.sent(),r.label=3;case 3:return[3,1];case 4:i(n.transceiver),t.transceiverMap.delete(n.transceiver),r.label=5;case 5:return w(function(){t.emit(Fi.track,n)},0),[2]}})})()},n.connectionState?n.onconnectionstatechange=function(i){Mi.info("Peer connection state change: ",n.connectionState),t.emit(Fi.connectionStateChange,n.connectionState)}:n.oniceconnectionstatechange=function(i){Mi.info("Peer ICE connection state change: ",n.iceConnectionState),t.emit(Fi.connectionStateChange,n.iceConnectionState)},n.onnegotiationneeded=function(t){return Vt(function(){var t,i;return zt(this,function(r){switch(r.label){case 0:return n.remoteDescription?(Mi.info("Peer onnegotiationneeded, updating local description"),[4,n.createOffer()]):[2];case 1:return t=r.sent(),Mi.info("Peer onnegotiationneeded, got local offer",t.sdp),t.sdp=Ni.updateMissingVideoExtensions(t.sdp,n.remoteDescription.sdp),[4,n.setLocalDescription(t)];case 2:return r.sent(),i=Ni.renegotiate(t.sdp,n.remoteDescription.sdp),Mi.info("Peer onnegotiationneeded, updating remote description",i),[4,n.setRemoteDescription({type:"answer",sdp:i})];case 3:return r.sent(),Mi.info("Peer onnegotiationneeded, renegotiation done"),[2]}})})()}},Ki=function(t,n,i){Mi.info("Adding mediaStream tracks to RTCPeerConnection");for(var r,e=Lt(n.getTracks());!(r=e()).done;){var s=r.value,u={streams:[n]};"audio"===s.kind&&(u.direction=i.disableAudio?"inactive":"sendonly"),"video"===s.kind&&(u.direction=i.disableVideo?"inactive":"sendonly",i.scalabilityMode&&(new Ei).isChrome()?(Mi.debug("Video track with scalability mode: ".concat(i.scalabilityMode,".")),u.sendEncodings=[{scalabilityMode:i.scalabilityMode}]):i.scalabilityMode&&Mi.warn("SVC is only supported in Google Chrome")),t.addTransceiver(s,u),Mi.info("Track '".concat(s.label,"' added: "),"id: ".concat(s.id),"kind: ".concat(s.kind))}},Ji=function(t,n){var i=new Ei;if(!n.disableVideo){var r=t.addTransceiver("video",{direction:"recvonly"});i.isOpera()&&r.setCodecPreferences(RTCRtpReceiver.getCapabilities("video").codecs.filter(function(t){return"video/H264"!==t.mimeType||t.sdpFmtpLine.includes("profile-level-id=4")}))}n.disableAudio||t.addTransceiver("audio",{direction:"recvonly"});for(var e=0;e0&&-1===d.indexOf(v.codec))throw nr.error("Unsupported codec ".concat(v.codec,". Possible values are: "),d),new y("Unsupported codec ".concat(v.codec,". Possible values are: ").concat(d));if(v.codec===xi.AV1&&(t=Ni.adaptCodecName(t,"AV1X",xi.AV1)),w={name:this.streamName,sdp:t,codec:v.codec,sourceId:v.sourceId},v.priority){if(!(Number.isInteger(v.priority)&&v.priority>=-2147483648&&v.priority<=2147483647))throw new y("Invalid value for priority option. It should be a decimal integer between the range [-2^31, +2^31 - 1]");w.priority=v.priority}null!==v.record&&(w.record=v.record),Array.isArray(v.events)&&(w.events=v.events),p.label=1;case 1:if(p.trys.push([1,4,,5]),v.disableVideo&&v.disableAudio)throw new y("Not attempting to connect as video and audio are disabled");return[4,this.connect()];case 2:return p.sent(),nr.info("Sending publish command"),[4,this.transactionManager.cmd("publish",w)];case 3:return g=p.sent(),v.codec===xi.AV1&&(_=null==(f=null==(a=null==(c=null==(h=RTCRtpSender.getCapabilities)?void 0:h.call(RTCRtpSender,"video"))?void 0:c.codecs)?void 0:a.find)?void 0:f.call(a,function(t){return"video/AV1X"===t.mimeType}),g.sdp=_?Ni.adaptCodecName(g.sdp,xi.AV1,"AV1X"):g.sdp),[2,(nr.info("Command sent, publisherId: ",g.publisherId),nr.debug("Command result: ",g),this.serverId=g.publisherId,this.clusterId=g.clusterId,Y(this.streamName),K(this.serverId),Z(g.feedId),it(this.clusterId),g.sdp)];case 4:throw m=p.sent(),nr.error("Error sending publish command, error: ",m),m;case 5:return[2]}})}).call(this)},i.cmd=function(t,n){return Vt(function(){return zt(this,function(i){return[2,(nr.info("Sending cmd: ".concat(t)),this.transactionManager.cmd(t,n))]})}).call(this)},n}(jt),or=function(t,n,i){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===k.keys(r).length&&(r={vad:t,pinnedSourceId:n,excludedSourceIds:i}),r},hr=function(t,n,i){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===k.keys(r).length&&(r={codec:null!=t?t:xi.H264,record:n,sourceId:i}),r},cr=function(t){function n(n,i){var r;return(r=t.call(this,n)||this).name="FetchError",r.status=i,r}return Ct(n,t),n}(sn(y)),ar=gt.get("Director"),fr="WebRtc",vr="",dr="https://director.millicast.com",lr={setEndpoint:function(t){dr=t.replace(/\/$/,"")},getEndpoint:function(){return dr},setLiveDomain:function(t){vr=t.replace(/\/$/,"")},getLiveDomain:function(){return vr},getPublisher:function(t,n,i){return void 0===n&&(n=null),void 0===i&&(i=fr),Vt(function(){var r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:r=wr(t,n,i),ar.info("Getting publisher connection path for stream name: ",r.streamName),e={streamName:r.streamName,streamType:r.streamType},s={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.token)},u="".concat(lr.getEndpoint(),"/api/director/publish"),a.label=1;case 1:return a.trys.push([1,4,,5]),[4,fetch(u,{method:"POST",headers:s,body:JSON.stringify(e)})];case 2:return[4,(o=a.sent()).json()];case 3:if("fail"===(h=a.sent()).status)throw new cr(h.data.message,o.status);return[2,(h=_r(h),ar.debug("Getting publisher response: ",h),Q(h.data.streamAccountId),h.data)];case 4:throw c=a.sent(),ar.error("Error while getting publisher connection path. ",c),c;case 5:return[2]}})})()},getSubscriber:function(t,n,i){return void 0===n&&(n=null),void 0===i&&(i=null),Vt(function(){var r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:r=gr(t,n,i),Q(r.streamAccountId),ar.info("Getting subscriber connection data for stream name: ".concat(r.streamName," and account id: ").concat(r.streamAccountId)),e={streamAccountId:r.streamAccountId,streamName:r.streamName},s={"Content-Type":"application/json"},r.subscriberToken&&(s=g(d({},s),{Authorization:"Bearer ".concat(r.subscriberToken)})),u="".concat(lr.getEndpoint(),"/api/director/subscribe"),a.label=1;case 1:return a.trys.push([1,4,,5]),[4,fetch(u,{method:"POST",headers:s,body:JSON.stringify(e)})];case 2:return[4,(o=a.sent()).json()];case 3:if("fail"===(h=a.sent()).status)throw new cr(h.data.message,o.status);return[2,(h=_r(h),ar.debug("Getting subscriber response: ",h),r.subscriberToken&&(h.data.subscriberToken=r.subscriberToken),h.data)];case 4:throw c=a.sent(),ar.error("Error while getting subscriber connection path. ",c),c;case 5:return[2]}})})()}},wr=function(t,n,i){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===k.keys(r).length&&(r={token:t,streamName:n,streamType:i}),r},gr=function(t,n,i){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===k.keys(r).length&&(r={streamName:t,streamAccountId:n,subscriberToken:i}),r},_r=function(t){if(lr.getLiveDomain()){var n=/\/\/(.*?)\//,i=t.data.urls.map(function(t){var i=n.exec(t);return t.replace(i[1],lr.getLiveDomain())});t.data.urls=i}if(t.data.drmObject){var r=t.data.drmObject.playReadyUrl;r&&(t.data.drmObject.playReadyUrl="".concat(lr.getEndpoint()).concat(r));var e=t.data.drmObject.widevineUrl;e&&(t.data.drmObject.widevineUrl="".concat(lr.getEndpoint()).concat(e));var s=t.data.drmObject.fairPlayUrl;s&&(t.data.drmObject.fairPlayUrl="".concat(lr.getEndpoint()).concat(s));var u=t.data.drmObject.fairPlayCertUrl;u&&(t.data.drmObject.fairPlayCertUrl="".concat(lr.getEndpoint()).concat(u))}return t};function mr(t){this.message=t}mr.prototype=new y,mr.prototype.name="InvalidCharacterError";var yr=(void 0===f?"undefined":W(f))<"u"&&f.atob&&f.atob.bind(f)||function(t){var n=String(t).replace(/=+$/,"");if(n.length%4==1)throw new mr("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,r,e=0,s=0,u="";r=n.charAt(s++);~r&&(i=e%4?64*i+r:r,e++%4)?u+=String.fromCharCode(255&i>>(-2*e&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return u};function pr(t){this.message=t}function kr(t,n){if("string"!=typeof t)throw new pr("Invalid token specified");var i=!0===(n=n||{}).header?0:1;try{return JSON.parse(function(t){var n=t.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(yr(n).replace(/(.)/g,function(t,n){var i=n.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}catch(t){return yr(n)}}(t.split(".")[i]))}catch(t){throw new pr("Invalid token specified: "+t.message)}}pr.prototype=new y,pr.prototype.name="InvalidTokenError";var br,Ar={exports:{}},Tr=(br||(br=1,function(t,n){!function(i){if(null!=n&&"number"!=typeof n.nodeType)t.exports=i();else{var r=i(),e=("undefined"==typeof self?"undefined":W(self))<"u"?self:$.global;"function"!=typeof e.btoa&&(e.btoa=r.btoa),"function"!=typeof e.atob&&(e.atob=r.atob)}}(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function n(t){this.message=t}return n.prototype=new y,n.prototype.name="InvalidCharacterError",{btoa:function(i){for(var r,e,s,u,o=String(i),h=0,c="";h255||e>255||s>255)throw new n("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");c+=t.charAt((u=r<<16|e<<8|s)>>18&63)+t.charAt(u>>12&63)+t.charAt(u>>6&63)+t.charAt(63&u)}switch(o.length%3){case 0:return c;case 1:return c.slice(0,-2)+"==";case 2:return c.slice(0,-1)+"="}},atob:function(i){var r=String(i).replace(/[=]+$/,"");if(r.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var e,s,u=0,o=0,h="";s=r.charAt(o++);~s&&(e=u%4?64*e+s:s,u++%4)?h+=String.fromCharCode(255&e>>(-2*u&6)):0)s=t.indexOf(s);return h}}})}(Ar,Ar.exports)),Ar.exports);function Sr(t){var n,i,r;return{lang:null!=(n=null==t?void 0:t.lang)?n:void 0,message:null==t?void 0:t.message,abortEarly:null!=(i=null==t?void 0:t.abortEarly)?i:void 0,abortPipeEarly:null!=(r=null==t?void 0:t.abortPipeEarly)?r:void 0}}function Er(t){var n,i,r,e=void 0===t?"undefined":W(t);return"string"===e?'"'.concat(t,'"'):"number"===e||"bigint"===e||"boolean"===e?"".concat(t):"object"===e||"function"===e?null!=(r=t&&(null==(i=null==(n=k.getPrototypeOf(t))?void 0:n.constructor)?void 0:i.name))?r:"null":e}function Ir(t,n,i,r,e){var s,u,o,h,c,a,f,v,d=e&&"input"in e?e.input:i.value,l=null!=(u=null!=(s=null==e?void 0:e.expected)?s:t.expects)?u:null,w=null!=(o=null==e?void 0:e.received)?o:Er(d),g={kind:t.kind,type:t.type,input:d,expected:l,received:w,message:"Invalid ".concat(n,": ").concat(l?"Expected ".concat(l," but r"):"R","eceived ").concat(w),requirement:t.requirement,path:null==e?void 0:e.path,issues:null==e?void 0:e.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},_="schema"===t.kind,m=null!=(v=null!=(f=null!=(a=null!=(c=null!=(h=null==e?void 0:e.message)?h:t.message)?c:function(t,n){var i;return null==(i=void 0)?void 0:i.get(n)}(t.reference,g.lang))?a:_?void g.lang:null)?f:r.message)?v:void g.lang;void 0!==m&&(g.message="function"==typeof m?m(g):m),_&&(i.typed=!1),i.issues?i.issues.push(g):i.issues=[g]}function Rr(t){return{version:1,vendor:"valibot",validate:function(n){return t["~run"]({value:n},Sr())}}}function Cr(t,n){return k.hasOwn(t,n)&&"__proto__"!==n&&"prototype"!==n&&"constructor"!==n}function Dr(t,n){var i,r=[].concat(new Set(t));return r.length>1?"(".concat(r.join(" ".concat(n," ")),")"):null!=(i=r[0])?i:"never"}var Pr,Nr=function(t){function n(n){var i;return(i=t.call(this,n[0].message)||this).name="ValiError",i.issues=n,i}return Ct(n,t),n}(sn(y));function Br(t,n,i){return"function"==typeof t.fallback?t.fallback(n,i):t.fallback}function xr(t,n,i){return"function"==typeof t.default?t.default(n,i):t.default}function Or(t,n){return{kind:"schema",type:"array",reference:Or,expects:"Array",async:!1,item:t,message:n,get"~standard"(){return Rr(this)},"~run":function(t,n){var i,r=t.value;if(Array.isArray(r)){t.typed=!0,t.value=[];for(var e=0;e0&&(g=c.updateBandwidthRestriction(g,this.options.bandwidth)),[4,c.setRTCRemoteSDP(g)];case 8:return m.sent(),$r.info("Broadcasting to streamName: ",this.streamName),_=this.webRTCPeer,this.webRTCPeer=c,this.setReconnect(),t.migrate&&this.webRTCPeer.on(Fi.connectionStateChange,function(t){var n,i;["connected","disconnected","failed","closed"].includes(t)&&(null==(n=null==d?void 0:d.close)||n.call(d),null==(i=null==_?void 0:_.closeRTCPeer)||i.call(_),d=_=null)}),[2]}})}).call(this)},i.sendMetadata=function(t,n){var i;if(void 0===n&&(n="d40e38ea-d419-4c62-94ed-20ac37b4e4fa"),null!=(i=this.options)&&i.metadata&&this.worker)this.worker.postMessage({action:"metadata-sei-user-data-unregistered",uuid:n,payload:t});else{var r="Could not send metadata due to:";this.options?this.options.metadata?this.worker||(r+="\n- Stream not being published."):(r+="\n- Metadata option is not enabled.",this.options.codec!==xi.H264&&(r+="\n- Incompatible codec. Only H264 available."),this.options.disableVideo&&(r+="\n- Video disabled.")):r+="\n- Stream not being published.",$r.warn(r)}},n}(qr),ie=function(t){var n=function(t,n,i){var r=t["~run"]({value:n},Sr(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}(Zr=Zr||Lr({sourceId:Ur(Hr()),stereo:Ur(Mr()),dtx:Ur(Mr()),absCaptureTime:Ur(Mr()),dependencyDescriptor:Ur(Mr()),mediaStream:Ur(zr([Or(Xr()),Xr()])),bandwidth:Ur(Fr()),metadata:Ur(Mr()),disableVideo:Ur(Mr()),disableAudio:Ur(Mr()),codec:Ur(Vr(k.values(xi))),simulcast:Ur(Mr()),scalabilityMode:Ur(Hr()),peerConfig:Ur(Lr({autoInitStats:Ur(Mr()),statsIntervalMs:Ur(Fr())})),record:Ur(Mr()),events:Ur(Or(Vr(["active","inactive","viewercount"]))),priority:Ur(Fr())}),t),i=n.success,r=n.issues;i||$r.warn(new Nr(r),t)};function re(t){if(!t)return new E;for(var n=t.length,i=new E(n/2),r=0;r=4&&(r=console)[e(323)].apply(r,[].concat([this[e(310)]],n))},n[ye(331)]=function(){for(var t=arguments.length,n=new Array(t),i=0;i=3&&(r=console)[e(331)].apply(r,[].concat([this[e(310)]],n))},n[ye(320)]=function(){for(var t=arguments.length,n=new Array(t),i=0;i=2&&(r=console)[e(320)].apply(r,[].concat([this[e(310)]],n))},n.error=function(){for(var t=arguments.length,n=new Array(t),i=0;i=1&&(r=console).error.apply(r,[].concat([this.tag],n))},t}();function be(t){return new ke(t)}var Ae={logLevel:3,mediaDumps:{video:{in:{durationMs:0,delimited:!0},out:{durationMs:0}},audio:{in:{durationMs:0},out:{durationMs:0}}}};function Te(){return(new Date)[ye(317)]().slice(11,-1)}function Se(){var t=["mediaBuffer","click","529321KfbOwo","endTimestampMs","28972188cmcnxe","containerFileExt","info","4ZlZeJQ","9kyfNFe","mediaType","172953TzXwsI","byteLength","1327806tybvjI","href","createObjectURL","1089qysnCz","112088WLFXHK","substring","tag","692993ZcAeLj","set","download","810qiScYX","startTimestampMs","8821555KArxhe","toISOString","application/octet-stream","logLevel","warn","revokeObjectURL","42PDuKrJ","debug","targetDurationMs"];return(Se=function(){return t})()}var Ee=function(){function t(t,n,i){var r=ye;this[r(325)]=null,this[r(315)]=-1,this.endTimestampMs=-1,this[r(301)]=t,this[r(330)]=n,this[r(324)]=i,i>0&&(this[r(325)]=new E)}return t.prototype.append=function(t,n){var i,r,e,s,u=ye;if(!this[u(325)])return!1;if(this[u(325)]=(i=this[u(325)],r=t,(s=new E((0|i[(e=ye)(303)])+(0|r.byteLength)))[e(312)](i,0),s[e(312)](r,0|i.byteLength),s),void 0!==n)if(-1===this[u(315)])this.startTimestampMs=n,this[u(328)]=n+this[u(324)];else if(n>=this[u(328)]){var o=(new Date)[u(317)]()[u(309)](0,19).replace(/:/g,"-"),h=this.mediaType+"-"+o+"."+this.containerFileExt;return function(t,n,i){void 0===i&&(i=ye(318));var r=ye,e=v.createElement("a"),s=new Blob([t],{type:i});e.href=URL[r(306)](s),e[r(313)]=n,e[r(326)](),URL[r(321)](e[r(305)])}(this[u(325)],h),this.mediaBuffer=null,!1}return!0},t}(),Ie=Pe;!function(){for(var t=Pe,n=Xe();;)try{if(A(t(160))/1+-A(t(363))/2+-A(t(321))/3*(-A(t(401))/4)+A(t(229))/5+-A(t(276))/6+A(t(400))/7*(-A(t(153))/8)+-A(t(223))/9==858456)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();var Re=be("[MUX]"),Ce=me[Ie(387)];function De(t,n){var i=Ie,r=new E((0|t[i(413)])+(0|n[i(413)]));return r.set(t,0),r[i(251)](n,0|t[i(413)]),r}function Pe(t,n){var i=Xe();return(Pe=function(t,n){return i[t-=147]})(t,n)}function Ne(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=1/0),function(t,n,i,r){var e=Ie,s=r[e(425)]||1;n*=s,i*=s;var u,o=V(u=t,ArrayBuffer)?u:u[Ie(366)],h=(t[e(188)]||0)+t[e(413)],c=(t[e(188)]||0)+n,a=b[e(177)](0,b[e(291)](c,h)),f=b[e(291)](a+b[e(177)](i,0),h);return new r(o,a/=s,(f/=s)-a)}(t,n,i,E)}function Be(t){var n=Ie,i=Array.from(t)[n(238)](function(t){return t[n(384)](0)});return new E(i)}var xe=function(t,n,i,r,e,s,u,o,h,c,a,f,v,d,l){function w(t){var n=Ie;this[n(452)]=t,this[n(402)]=(96&this[n(452)][0])>>5,this[n(186)]=31&this[n(452)][0],this.isvcl=1==this[n(186)]||5==this[n(186)],this[n(309)]="",this.isfmb=!1}var g=w.prototype;return g[o]=function(){var t=Ie;return w[t(234)](this)+": NRI: "+this[t(209)]()},g[h]=function(){return this[Ie(402)]},g[c]=function(){return this[Ie(186)]},g[a]=function(){return this[Ie(186)]===w.IDR},g[f]=function(){return this[Ie(452)]},g[v]=function(){return this[Ie(452)].byteLength},g[d]=function(){return 4+this[Ie(327)]()},g[l]=function(){var t=Ie,n=new E(this[t(194)]());return new DataView(n[t(366)]).setUint32(0,this[t(194)]()-4),n[t(251)](this.getPayload(),4),n},w[u]=function(t){var n=Ie;return t[n(186)]in w[n(159)]?w[n(159)][t.ntype]:n(344)},Nt(w,null,[{key:t,get:function(){return 1}},{key:n,get:function(){return 5}},{key:"SEI",get:function(){return 6}},{key:i,get:function(){return 7}},{key:r,get:function(){return 8}},{key:e,get:function(){return 9}},{key:s,get:function(){var t,n=Ie;return(t={})[w[n(427)]]=n(427),t[w[n(273)]]=n(273),t[w[n(324)]]=n(324),t[w.PPS]="PPS",t[w[n(449)]]="NDR",t[w.AUD]=n(272),t}}]),w}(Ie(449),Ie(427),Ie(324),Ie(379),Ie(272),Ie(159),Ie(234),Ie(365),Ie(209),Ie(234),Ie(306),Ie(203),Ie(327),Ie(194),Ie(341)),Oe=function(){function t(t){var n=Ie;this[n(316)]=t,this[n(368)]=0,this[n(157)]=8*t.byteLength}var n=t.prototype;return n[Ie(433)]=function(t){var n=Ie;this.data=t,this[n(368)]=0,this.bitLength=8*t[n(413)]},n.skipBits=function(t){var n=Ie;if(this[n(451)]>>e,u=8-e;if(u>=t)return i&&(this[r(368)]+=t),s>>u-t;i&&(this[r(368)]+=u);var o=t-u;return s<>>1:-1*(t>>>1)},n[Ie(239)]=function(){return 1===this[Ie(338)](1)},n[Ie(419)]=function(t){return void 0===t&&(t=1),this.readBits(8*t)},n[Ie(232)]=function(){return this.readBits(16)},n.readUInt=function(){return this[Ie(338)](32)},Nt(t,[{key:Ie(451),get:function(){return this[Ie(157)]-this.index}}]),t}(),Me=function(t,n,i,r,e,s,u){function o(t){var n=Ie;this.remuxer=t,this[n(233)]=t.mp4track}var h=o.prototype;return h[e]=function(t){var n=Ie,i=o[n(432)](new E(t));this.track[n(237)]=i.width,this[n(233)].height=i.height,this.track[n(382)]=[new E(t)],this.track[n(210)]=n(292);for(var r=new DataView(t.buffer,t[n(188)]+1,4),e=0;e<3;++e){var s=r[n(313)](e)[n(365)](16);s[n(268)]<2&&(s="0"+s),this.track[n(210)]+=s}},h[s]=function(t){var n=Ie;this[n(233)][n(434)]=[new E(t)]},h[u]=function(t){var n=Ie;if(!t)return!1;var i=!1;switch(t[n(234)]()){case xe[n(427)]:case xe.NDR:i=!0;break;case xe[n(379)]:!this[n(233)][n(434)]&&(this[n(345)](t.getPayload()),!this[n(175)][n(296)]&&this[n(233)][n(434)]&&this.track[n(382)]&&(this.remuxer[n(296)]=!0)),i=!0;break;case xe[n(324)]:!this.track.sps&&(this[n(256)](t[n(203)]()),!this[n(175)][n(296)]&&this[n(233)].pps&&this[n(233)][n(382)]&&(this.remuxer[n(296)]=!0)),i=!0;break;case xe[n(272)]:break;case xe.SEI:i=!0}return i},o[t]=function(t,n){for(var i=Ie,r=[],e=!1,s=!1,u=!1,o=!1,h=0,c=0,a=0,f=[];h<=t.byteLength;){if(h1&&(a=c>2?4:3,f.push(h)),c=0):++c}else a=0,f.push(h++);if(f.length>1){var d=f.shift(),l=f[0]-a;if(d1&&3===y&&(c=0,y=t[h++]),0!==y?c=0:++c,_[m++]=y}r.push(_.subarray(0,m))}}}}var p=!0,k=!1;return s||e?s&&e&&(Re[i(265)](i(331)),p=!1):(Re[i(265)]("[H264Parser] No VCL NALUs found"),p=!1),e&&(u&&o?k=!0:Re.warn(i(158))),{valid:p,idr:k,nalus:r}},o[n]=function(t,n){for(var i=8,r=8,e=0;e0&&y[1]>0&&(l=y[0]/y[1])}c.readBoolean()&&c[h(155)](1),c[h(239)]()&&(c[h(155)](4),c[h(239)]()&&c[h(155)](24)),c[h(239)]()&&(c[h(334)](),c[h(334)]()),c.readBoolean()&&(c.readUInt(),c[h(187)](),c.readBoolean())}return{width:b[h(440)]((16*(r+1)-2*a-2*f)*l),height:(2-s)*(e+1)*16-(s?2:4)*(v+d)}},o[r]=function(t){var n=Ie,i=new Oe(t[n(203)]());i[n(419)](),t[n(196)]=0===i[n(179)](),t[n(309)]=i[n(179)]()},o}(Ie(267),Ie(333),Ie(432),Ie(386),Ie(256),Ie(345),Ie(378)),Le=function(){function t(t){var n=Ie;this.listener={},this[n(234)]=""|t}var n=t.prototype;return n.on=function(t,n){var i=Ie;return!this[i(270)][t]&&(this.listener[t]=[]),this[i(270)][t].push(n),!0},n.off=function(t,n){var i=Ie;if(this[i(270)][t]){var r=this[i(270)][t].indexOf(n);return r>-1&&this[i(270)][t][i(369)](r,1),!0}return!1},n[Ie(219)]=function(){this.listener={}},n[Ie(225)]=function(t,n){var i=Ie;return!!this[i(270)][t]&&(this[i(270)][t].map(function(t){t[i(200)](null,[n])}),!0)},t}(),Ue=function(){function t(n){var i,r,e=Ie;for(var s in this[e(285)]=n,this.saiIvSize={video:"cenc"===(null==(i=n.config[e(415)])?void 0:i[e(201)])?16:0,audio:"cenc"===(null==(r=n[e(154)][e(407)])?void 0:r[e(201)])?16:0},t[e(212)]={avc1:[],encv:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],Opus:[],dOps:[],enca:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],pssh:[],sinf:[],frma:[],schm:[],schi:[],tenc:[],saiz:[],saio:[],senc:[]},t[e(212)])t.types[s]=[s[e(384)](0),s[e(384)](1),s[e(384)](2),s.charCodeAt(3)];var u=new E([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 E([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]);t.HDLR_TYPES={video:u,audio:o};var h=new E([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),c=new E([0,0,0,0,0,0,0,0]);t.STTS=t[e(377)]=t[e(213)]=c,t.STSZ=new E([0,0,0,0,0,0,0,0,0,0,0,0]),t[e(438)]=new E([0,0,0,1,0,0,0,0,0,0,0,0]),t[e(307)]=new E([0,0,0,0,0,0,0,0]),t[e(168)]=new E([0,0,0,0,0,0,0,1]);var a=new E([105,115,111,109]),f=new E([97,118,99,49]),v=new E([0,0,0,1]);t[e(183)]=t[e(347)](t[e(212)].ftyp,a,v,a,f),t[e(147)]=t[e(347)](t.types.dinf,t[e(347)](t[e(212)][e(280)],h))}var n=t.prototype;return n[Ie(190)]=function(n){var i=Ie;return t[i(347)](t[i(212)][i(190)],t[i(418)][n])},n[Ie(244)]=function(n){var i=Ie;return t[i(347)](t[i(212)][i(244)],n)},n[Ie(380)]=function(n,i){var r=Ie;return t[r(347)](t[r(212)][r(380)],new E([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24,n>>>16&255,n>>>8&255,255&n,0,0,0,0,85,196,0,0]))},n[Ie(215)]=function(n){var i=Ie;return t[i(347)](t[i(212)].mdia,this[i(380)](n[i(274)],n[i(290)]),this[i(190)](n[i(234)]),this[i(230)](n))},n[Ie(443)]=function(n){var i=Ie;return t.box(t[i(212)][i(443)],new E([0,0,0,0,n>>>24,n>>>16&255,n>>>8&255,255&n]))},n[Ie(230)]=function(n){var i=Ie;return n[i(234)]===i(407)?t[i(347)](t[i(212)][i(230)],t.box(t.types[i(255)],t.SMHD),t[i(147)],this[i(362)](n)):t[i(347)](t.types[i(230)],t[i(147)],this[i(362)](n),t[i(347)](t[i(212)].vmhd,t[i(438)]))},n[Ie(370)]=function(n,i,r){var e=Ie;return t[e(347)](t.types.moof,this[e(443)](n),this[e(293)](r,i))},n[Ie(295)]=function(n,i,r){for(var e=Ie,s=n[e(268)],u=[];s--;)u[s]=this.trak(n[s]);return t.box[e(200)](null,[t[e(212)][e(295)],this[e(240)](r,i),this[e(447)](n)][e(389)](u)[e(389)](this[e(322)](n)))},n[Ie(322)]=function(n){for(var i=Ie,r=n[i(268)],e=[];r--;)e[r]=this[i(305)](n[r]);return t[i(347)][i(200)](null,[t[i(212)][i(322)]][i(389)](e))},n[Ie(240)]=function(n,i){var r=Ie,e=new E([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24,n>>>16&255,n>>>8&255,255&n,i>>>24,i>>>16&255,i>>>8&255,255&i,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[r(347)](t.types.mvhd,e)},n[Ie(420)]=function(n){for(var i=Ie,r=n[i(428)]||[],e=new E(4+r.length),s=0;s>>8&255),u.push(255&e),u=u[s(389)](Array.prototype[s(314)][s(395)](r));for(i=0;i>>8&255),o[s(406)](255&e),o=o.concat(Array.prototype[s(314)].call(r));var h=t[s(347)](t[s(212)][s(408)],new E([1,u[3],u[4],u[5],255,224|n.sps[s(268)]].concat(u)[s(389)]([n[s(434)][s(268)]]).concat(o))),c=n[s(237)],a=n[s(374)],f=t[s(347)](t.types[s(441)],t.box(t[s(212)][s(318)],new E([97,118,99,49])),t[s(347)](t[s(212)][s(349)],new E([].concat([0,0,0,0],Be(this[s(285)][s(154)][s(415)][s(201)]),[0,1,0,0]))),t.box(t.types[s(217)],this[s(298)](s(415))));return t[s(347)](t[s(212)].encv,new E([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,c>>>8&255,255&c,a>>>8&255,255&a,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,65,86,67,32,67,111,100,105,110,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]),h,f)},n[Ie(372)]=function(t){var n=Ie,i=t[n(154)][n(413)],r=new E(26+i+3);return r[n(251)]([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5,i]),r[n(251)](t[n(154)],26),r.set([6,1,2],26+i),r},n[Ie(403)]=function(n){var i=Ie,r=n[i(354)];return t[i(347)](t[i(212)][i(403)],new E([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n[i(390)],0,16,0,0,0,0,r>>>8&255,255&r,0,0]),t[i(347)](t[i(212)][i(372)],this[i(372)](n)))},n[Ie(266)]=function(t){var n=Ie,i=t[n(354)];return new E([0,t[n(390)],1,56,0,0,i>>>8&255,255&i,0,0,0])},n[Ie(416)]=function(n){var i=Ie,r=n.audiosamplerate;return t[i(347)](t.types[i(416)],new E([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n[i(390)],0,16,0,0,0,0,r>>>8&255,255&r,0,0]),t[i(347)](t[i(212)][i(266)],this[i(266)](n)))},n[Ie(394)]=function(n){var i=Ie,r=t[i(347)](t.types[i(266)],this.dOps(n)),e=t[i(347)](t.types[i(441)],t.box(t.types.frma,new E([79,112,117,115])),t[i(347)](t.types.schm,new E([].concat([0,0,0,0],Be(this[i(285)][i(154)].audio[i(201)]),[0,1,0,0]))),t.box(t.types[i(217)],this[i(298)](i(407)))),s=n[i(354)];return t[i(347)](t[i(212)].enca,new E([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n[i(390)],0,16,0,0,0,0,s>>>8&255,255&s,0,0]),r,e)},n[Ie(165)]=function(n){var i=Ie;return n[i(234)]===i(407)?t[i(347)](t[i(212)][i(165)],t[i(168)],n[i(199)]?this[i(394)](n):this[i(416)](n)):t[i(347)](t.types[i(165)],t[i(168)],this[i(303)](n))},n[Ie(278)]=function(n){var i=Ie,r=n.id,e=n[i(290)],s=n[i(237)],u=n[i(374)],o=n[i(388)];return t[i(347)](t[i(212)].tkhd,new E([0,0,0,7,0,0,0,0,0,0,0,0,r>>>24,r>>>16&255,r>>>8&255,255&r,0,0,0,0,e>>>24,e>>>16&255,e>>>8&255,255&e,0,0,0,0,0,0,0,0,0,0,0,0,255&o,o%1*10&255,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,s>>>8&255,255&s,0,0,u>>>8&255,255&u,0,0]))},n[Ie(293)]=function(n,i){var r,e=Ie,s=n.id,u=n[e(428)][0][e(171)],o=n.samples[0][e(290)],h=n[e(428)][0].flags,c=t[e(347)](t[e(212)].tfhd,new E([0,2,0,58,s>>>24,s>>>16&255,s>>>8&255,255&s,0,0,0,1,o>>>24,s>>>16&255,o>>>8&255,255&o,u>>>24,u>>>16&255,u>>>8&255,255&u,0,h[e(264)],0,0])),a=t[e(347)](t[e(212)].tfdt,new E([0,0,0,0,i>>>24,i>>>16&255,i>>>8&255,255&i]));if(n.encrypted){var f,v;if(n[e(234)]===e(415)?(f=!0,v=this[e(350)][e(415)]+(null==(r=n.samples[0][e(191)])?void 0:r.byteLength)):(f=!1,v=this[e(350)].audio),v>0){var d=this[e(242)](v),l=this[e(340)](n[e(428)],f),w=d[e(268)]+20+l[e(268)]+c[e(268)]+a[e(268)]+8+16+8+8,g=this[e(271)](n,w);return t[e(347)](t[e(212)][e(293)],c,a,g,d,this.saio(w-l[e(268)]+g.length+8),l)}var _=this[e(340)](null,!1),m=_.length+c[e(268)]+a[e(268)]+8+16+8+8,y=this[e(271)](n,m);return t[e(347)](t.types[e(293)],c,a,y,_)}return t.box(t[e(212)].traf,c,a,this.trun(n,c[e(268)]+a.length+8+16+8+8))},n.trak=function(n){var i=Ie;return n.duration=n[i(290)]||4294967295,t.box(t[i(212)].trak,this[i(278)](n),this[i(215)](n))},n[Ie(305)]=function(n){var i=Ie,r=n.id;return t[i(347)](t.types[i(305)],new E([0,0,0,0,r>>>24,r>>>16&255,r>>>8&255,255&r,0,0,0,1,0,0,0,16,0,0,0,0,0,0,0,0]))},n.trun=function(n,i){var r=Ie,e=(n[r(428)]||[])[r(268)],s=new E(12);return i+=20,s.set([0,0,0,1,e>>>24,e>>>16&255,e>>>8&255,255&e,i>>>24,i>>>16&255,i>>>8&255,255&i],0),t[r(347)](t.types[r(271)],s)},n[Ie(224)]=function(t,n){var i,r,e,s=Ie,u=s(445),o=function(t){var n=function(t){for(var n=Ie,i="",r=0;r',s(308),"",s(398),s(353),s(216)+o+'"',">",s(412),s(249),s(391),n?""+n+s(423):"",s(351),s(269)].join("")))},n.pssh=function(n){var i=Ie;if(this[i(285)][i(383)][i(202)](i(178)))return t[i(347)](t.types[i(447)],new E([].concat([0,0,0,0,237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237,0,0,0,18,18,16],this[i(285)][i(154)][n[0][i(234)]].keyId)));if(this[i(285)][i(383)]===i(356)){var r=this[i(224)](this[i(285)][i(154)][n[0][i(234)]][i(429)],this.drm[i(371)]),e=r[i(413)];return t[i(347)](t[i(212)][i(447)],new E([].concat([0,0,0,0,154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149,e>>>24,e>>>16&255,e>>>8&255,255&e],r)))}return this.drm[i(383)]===i(323)?t[i(347)](t[i(212)][i(447)],new E([].concat([1,0,0,0,16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75,0,0,0,1],this.drm[i(154)][n[0].type].keyId,[0,0,0,0]))):this.drm[i(383)]===i(397)?null:void Re[i(189)](i(393)+this[i(285)][i(383)])},n[Ie(298)]=function(n){var i,r,e=Ie,s=this[e(285)][e(154)][n];return s[e(201)]===e(226)?(i=new E([].concat([16],s.iv)),r=25):(i=new E([]),r=0),t[e(347)](t[e(212)][e(298)],new E([].concat([1,0,0,0,0,r,1,this[e(350)][n]],s[e(429)],i)))},n[Ie(242)]=function(n){var i=Ie;return t[i(347)](t[i(212)][i(242)],new E([0,0,0,0,n,0,0,0,1]))},n[Ie(204)]=function(n){var i=Ie;return t[i(347)](t[i(212)][i(204)],new E([0,0,0,0,0,0,0,1,n>>>24,n>>>16&255,n>>>8&255,255&n]))},n[Ie(340)]=function(n,i){var r=Ie,e=null;return n&&(1!==n[r(268)]&&Re[r(189)](r(182)+n[r(268)]+" samples - expected 1"),e=n[0][r(191)]),e&&e[r(413)]?t[r(347)](t[r(212)].senc,new E([].concat([0,0,0,i?2:0,0,0,0,1],e))):t.box(t[r(212)][r(340)],new E([0,0,0,0,0,0,0,1]))},n[Ie(439)]=function(n,i,r){var e=Ie,s=this[e(295)](n,i,r),u=new E(t[e(183)].byteLength+s[e(413)]);return u[e(251)](t[e(183)]),u[e(251)](s,t[e(183)][e(413)]),u},t.box=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r>>24,e[1]=u>>>16&255,e[2]=u>>>8&255,e[3]=255&u,e[s(251)](t,4),o=0,u=8;o0)for(var e=0;e0&&this.readyToDecode&&(this[e(207)][e(263)]+=c,this[e(428)].push({units:h,size:c,keyFrame:o.keyFrame,duration:o[e(290)],sampleAuxInfo:n,timestamp:i}))}},i[Ie(161)]=function(){var t=Ie;if(!this[t(211)]()||!this[t(428)])return null;var n,i=this.mp4track[t(428)],r=this.samples[t(342)](),e=r.units,s=(1e3*r[t(332)]|0)-this[t(222)]|0;s<5&&(s=5),s>5e3&&Re[t(381)](t(430)+(s/1e3|0)+" s"),this.dts=this[t(222)],this[t(222)]+=s,n={size:r.size,duration:s,cts:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,isNonSync:r[t(148)]?0:1,dependsOn:r[t(148)]?2:1},sampleAuxInfo:r[t(191)]};for(var u,o=0,h=Lt(e);!(u=h()).done;)o+=u.value[t(194)]();for(var c,a=0,f=new E(o),v=Lt(e);!(c=v()).done;){var d=c.value;f[t(251)](d[t(341)](),a),a+=d[t(194)]()}return i.push(n),new E(f[t(366)],0,o)},n}(Ve),ze=function(t){function n(n,i){var r,e=Ie;return(r=t.call(this,e(175))||this)[e(260)]=!1,r.trackTypes=[],r[e(357)]={},r[e(274)]=1e3,r[e(163)]=0,r[e(361)]=n,r.mp4=i,r}Ct(n,t);var i=n.prototype;return i[Ie(281)]=function(t){var n=Ie;("video"===t||"both"===t)&&(this[n(357)][n(415)]=new We(this.timescale,this[n(361)]),this[n(335)][n(406)](n(415))),(t===n(407)||t===n(417))&&(this[n(357)][n(407)]=new He(this.timescale),this.trackTypes[n(406)](n(407)))},i[Ie(250)]=function(){for(var t,n=Ie,i=Lt(this[n(335)]);!(t=i()).done;){var r=t.value;this.tracks[r].resetTrack()}this[n(260)]=!1},i[Ie(262)]=function(){var t=Ie;this.tracks={},this[t(219)]()},i[Ie(246)]=function(){var t=Ie;if(this[t(260)])for(var n,i=Lt(this[t(335)]);!(n=i()).done;)for(var r=n.value,e=this[t(357)][r];;){var s=e[t(161)]();if(!s||!s.byteLength)break;var u={type:r,payload:De(this[t(164)][t(370)](e[t(437)]++,e[t(336)],e[t(207)]),this.mp4[t(244)](s)),dts:e[t(336)]};this[t(225)](t(366),u),e[t(246)]()}else this[t(211)]()&&(this[t(225)]("ready"),this.initSegment(),this[t(260)]=!0,this[t(246)]())},i[Ie(439)]=function(){for(var t,n=Ie,i=Lt(this[n(335)]);!(t=i()).done;){var r=t.value,e=this[n(357)][r],s={type:r,payload:this[n(164)][n(439)]([e[n(207)]],this[n(163)],this.timescale)};this[n(225)]("buffer",s)}},i.isReady=function(){for(var t,n=Ie,i=Lt(this[n(335)]);!(t=i()).done;){var r=t.value;if(!this.tracks[r][n(296)]||!this[n(357)][r][n(428)][n(268)])return!1}return!0},i[Ie(181)]=function(t){for(var n,i=Ie,r=Lt(this[i(335)]);!(n=r()).done;){var e=n.value,s=t[e];s.length>0&&this[i(357)][e][i(181)](s,"audio"===e?t.audioSampleAuxInfo:t[i(310)],t[i(332)])}this[i(246)]()},n}(Le);function Xe(){var t=["stsd","isSupported","src","STSD","endMSE","abort","size","appendBufferError","addSourceBuffer","setupMSE","remuxer","addEventListener","max","com.widevine","readUEG"," - ","remux","Received ","FTYP","readyState","valid","ntype","readUInt","byteOffset","error","hdlr","sampleAuxInfo","webkitsourceopen","Checking codec","getSize","irrecoverableError","isfmb","[MSE] buffer error:","url","encrypted","apply","encryption","startsWith","getPayload","saio","open","[MSE] source buffer error","mp4track","append","getNri","codec","isReady","types","STCO","feed","mdia",'VALUE="',"schi","STSZ","offAll","jmuxer","skipEG","nextDts","1036611gAoRea","generatePlayReadyHeader","dispatch","cbcs","stsc","endOfStream","6576815frVeWy","minf","releaseBuffer","readUShort","track","type","stsz","isvcl","width","map","readBoolean","mvhd","onReady","saiz","reportDiscontinuity","mdat","bufferControllers","flush","patchSampleAuxinfo","readEG","","reset","set","onMSEClose","setUint16","idr","smhd","parseSPS","bind","message","getBits","initialized","sourceBuffer","destroy","len","isNonSync","warn","dOps","extractNALUs","length","","listener","trun","AUD","SEI","timescale","Num frames in chunk: ","7620738FWzrwf","mode","tkhd","dbgMediaDump","dref","addTrack","doAppend","options","[MSE] sourceclose","drm","mediaSource","Failure: Browser doesn't support MSE/MMS",'/mp4; codecs="',"function","duration","min","avc1.","traf","[MSE] sourceopen","moov","readyToDecode","resetTrack","tenc","onMSEOpen","MediaSource","removeSourceBuffer","h264","encv","sourceopen","trex","isKeyframe","SMHD","","stype","videoSampleAuxInfo","ended","getElementById","getUint8","slice","audioSampleAuxInfo","data","ready","frma","mseReady","string","4760043VatbTq","mvex","org.w3.clearkey","SPS","buffered","no video element were found to render, provide a valid video element","getPayloadSize",'","out",'","units","Unsupported DRM type ","enca","call","POSITIVE_INFINITY","com.apple.fps","","getVideoFrames","646233hEZDuD","4LuRDMh","nri","mp4a","ManagedMediaSource","buffer error","push","audio","avcC","onError","Buffered range ","getTrackID","","byteLength","No A/V data","video","Opus","both","HDLR_TYPES","readUByte","sdtp","STTS","hasRedundancy","","revokeObjectURL","BYTES_PER_ELEMENT","webkitsourceclose","IDR","samples","keyId","timestamp gap: ","node","readSPS","setData","pps","onBuffer","remuxController","seq","VMHD","initSegment","ceil","sinf","sourceclose","mfhd","skipLZ","http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader","Browser does not support codec","pssh","mediasource is not available to end: ","NDR","isReset","bitsAvailable","payload","DINF","keyFrame","isDependedOn","isTypeSupported","assign","waitingForIdr","8hmeyto","config","skipBits","remove","bitLength","[H264Parser] IDR without SPS/PPS, not suitable for recovery","TYPES","13659xNePtU","getFramePayload","onBufferError","mediaDuration","mp4"];return(Xe=function(){return t})()}var qe=function(t){function n(n,i,r){var e,s,u=Ie;(e=t.call(this,u(366))||this)[u(234)]=i,e[u(337)]=new E;var o=null==(s=Ae.mediaDumps[i])?void 0:s[u(352)].durationMs;return o>0&&(e[u(279)]=new Ee(i,u(164),o)),e.sourceBuffer=n,e[u(385)]=r,e[u(195)]=!1,e[u(261)].addEventListener(u(189),function(t){var n=u;Re.warn(n(206),t,e.type),e[n(195)]=!0,e.dispatch("error",{type:e[n(234)],name:n(366),error:n(405)})}),e}Ct(n,t);var i=n.prototype;return i[Ie(262)]=function(){var t=Ie;this[t(337)]=null,this[t(279)]=null;try{this[t(261)]&&(this.sourceBuffer[t(170)](),this.mse[t(301)](this[t(261)]),this.sourceBuffer=null)}catch(t){}this.offAll()},i[Ie(282)]=function(){var t=Ie;if(this[t(337)][t(268)]&&this[t(261)]&&!this.sourceBuffer.updating){if(this[t(261)].buffered.length>1){for(var n=0;n=0&&(e[a][i(392)]=e[a][i(392)].concat(r))}return 1!==e[i(268)]&&Re.warn(i(275)+e[i(268)]),e},i[Ie(360)]=function(t,n){if(!t)return 0;for(var i=(t[0]<<8)+t[1],r=n+2+4,e=0,s=2;0=0&&(t[r]=e>>>8&255,t[r+1]=255&e)}return 0},i[Ie(376)]=function(){var t=Ie;if(this[t(319)]&&this[t(436)]&&this[t(436)][t(211)]()&&!this[t(245)])for(var i in this[t(245)]={},this[t(436)][t(357)]){var r=this.remuxController[t(357)][i],e=""[t(389)](i,t(288)).concat(r.mp4track[t(210)],'"');if(Re[t(381)](t(193),e),!n[t(166)](e))return Re.error(t(446)),!1;var s=this.mediaSource[t(173)](e);this[t(245)][i]=new qe(s,i,this[t(286)]),this[t(245)][i].on(t(189),this[t(162)][t(257)](this))}},i[Ie(231)]=function(){var t=Ie;for(var n in this.bufferControllers)this[t(245)][n][t(282)]()},i[Ie(435)]=function(t){var n=Ie;this[n(319)]&&this[n(245)]&&this[n(245)][t[n(234)]]&&this[n(245)][t[n(234)]].feed(t[n(452)],t[n(336)])},i.onMSEOpen=function(){var t=Ie;Re[t(381)](t(294)),this[t(286)].readyState!==t(311)&&(this[t(286)][t(290)]=Number[t(396)],this[t(319)]=!0,W(this[t(283)].onReady)===t(289)&&this[t(283)][t(241)][t(395)](null,this.isReset),URL[t(424)](this[t(198)]),this[t(376)]())},i[Ie(252)]=function(){var t=Ie;Re[t(381)](t(284)),this.mseReady=!1,this[t(169)]()},i.onBufferError=function(t){var n=Ie;Re.warn(n(197),t),this[n(195)]=!0,this.endMSE(),W(this.options[n(409)])===n(289)&&this[n(283)][n(409)][n(395)](null,t)},n.isSupported=function(t){var n=Ie;return f[n(404)]?f.ManagedMediaSource[n(150)](t):!!f[n(300)]&&f[n(300)][n(150)](t)},n}(Le);function je(t,n){var i=Qe();return(je=function(t,n){return i[t-=182]})(t,n)}function Qe(){var t=["1247170HwkwNv","bv","gitVersion","352GaBvIm","toISOString","14XlATBT","2568948xDjIMf","1027225mjPCDe","19691yiLZrh","195999uPnZlk","3038288UlnUQm","2033937CLMUfn"];return(Qe=function(){return t})()}!function(){for(var t=je,n=Qe();;)try{if(A(t(182))/1+A(t(192))/2*(A(t(184))/3)+-A(t(185))/4+-A(t(187))/5+A(t(193))/6+-A(t(183))/7*(A(t(190))/8)+-A(t(186))/9==553943)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();var Ye=ts;function Ke(){var t=["1236858jPUtaw","certificate","11225xsjioT","275391VrsSlK","5816evMpkd","CrsCCAMSEKDc0WAwLAQT1SB2ogyBJEwYv4Tx7gUijgIwggEKAoIBAQC8Xc/GTRwZDtlnBThq8","7299lkgbxa","1470Lkqtku","production","Development","charCodeAt","xUuwokpsqVIHZrJfu62ar+BF8UVUKdK5oYQoiTZd9OzK3kr29kqGGk3lSgM0/p499p/FUL8oH","baseUrl","375060LzZhzk","230861ZKueQt","12pvGCSu","https://lic.drmtoday.com","35fxICRY","pQnNI61gzHO42XZOMuxytMm0F6puNHTTqhyY3Z290YqvSDdOB+UY5QJuXJgjhvOUD9+oaLlvT","Production","development","https://lic.test.drmtoday.com","UrTEfQxfPR4dJTquE+IDLAi5yeVVxzbAgMBAAE6DGNhc3RsYWJzLmNvbUABEoADMmGXpXg/0q","from","RL9KsD0v7ysBQVdUXEbJotcFz71tI5qc3jwr6GjYIPA3VzusD17PN6AGQniMwxJV12z/EgnUo","baigovcoURAZcr1d/G0rpREjLdVLG0Gjqk63Gx688W5gh3TKemsK3R1jV0dOfj3e6uV/kTpsN","pcFB13osydpD2AaDsgWo5RWJcNf+fzCgtUQx/0Au9+xVm5LQBdv8Ja4f2oiHN3dw","V382D1oJAM0F/YgCQtNDLz7vTWJ+QskNGi5Dd2qzO4s48Cnx5BLvL4H0xCRSw2Ed6ekHSdrRU","27eI5MATX39gYtCnn7dDXVxo4/rCYK0A4VemC3HRai2X3pSGcsKY7+6we7h4IycjqtuGtYg8A","HzgsJ7Hajdsyzn0Vs3+VysAgaJAkXZ+k+N6Ka0WBiZlCtcunVJDiHQbz1sF9GvcePUUi2fM/h","Staging","staging","name"];return(Ke=function(){return t})()}!function(){for(var t=ts,n=Ke();;)try{if(A(t(326))/1+A(t(325))/2+A(t(315))/3+A(t(327))/4*(-A(t(314))/5)+-A(t(312))/6+A(t(329))/7*(A(t(316))/8)+-A(t(318))/9*(A(t(319))/10)==181728)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();var Je=Ye(317)+Ye(306)+"wyoYOE+M/t1oIbccwlTQ7o+BpV1X6TB7fxFyx1jsBtRsBWphU65w121zqmSiwzZzJ4xsXVQCJ"+Ye(330)+"+vwmV2/NJWxKqHBKdL9JqvOnNiQUF0hDI7Wf8Wb63RYSXKE27Ky31hKgx1wuq7TTWkA+kHnJT"+Ye(334)+Ye(323)+Ye(308)+"7hyskG5ZLAyJMzTvgnV3D8/I5Y6mCFBPb/+/Ri+9bEvquPF3Ff9ip3yEHu9mcQeEYCeGe9zR/"+Ye(307)+Ye(304)+Ye(336)+Ye(305),Ze=E[Ye(335)](f.atob(Je),function(t){return t[Ye(322)](0)}),$e=function(){function t(t){this[Ye(311)]=t}var n=t.prototype;return n.toString=function(){return this.name},n[Ye(324)]=function(){var t=Ye;switch(this[t(311)]){case"staging":return"https://lic.staging.drmtoday.com";case"development":return t(333);default:return t(328)}},n[Ye(313)]=function(){return Ze},t}();function ts(t,n){var i=Ke();return(ts=function(t,n){return i[t-=304]})(t,n)}$e[Ye(309)]=new $e(Ye(310)),$e[Ye(331)]=new $e(Ye(320)),$e[Ye(321)]=new $e(Ye(332));var ns=is;function is(t,n){var i=rs();return(is=function(t,n){return i[t-=252]})(t,n)}function rs(){var t=["SampleAuxInfo corrupted","error","50012RXzLep","3301necisu","[RTC-DRM]","subarray","buffer","64zGPhLV","162pDdDkb","659466dfDPqj","SampleAuxInfo corrupted (postfix not found)","data","4199670WddvRf","95WaGAXy","getUint8","137436hbCkvG","1351035XuhSnW","getUint16","byteLength","184863QcuifQ"];return(rs=function(){return t})()}!function(){for(var t=is,n=rs();;)try{if(-A(t(253))/1*(A(t(258))/2)+A(t(259))/3+A(t(252))/4*(-A(t(263))/5)+-A(t(265))/6+-A(t(269))/7*(-A(t(257))/8)+-A(t(266))/9+A(t(262))/10==173102)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();var es=be(ns(254));!function(){for(var t=us,n=cs();;)try{if(A(t(369))/1+A(t(374))/2+A(t(366))/3+-A(t(373))/4+-A(t(365))/5+-A(t(368))/6*(A(t(370))/7)+A(t(367))/8==110661)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();var ss=[];function us(t,n){var i=cs();return(us=function(t,n){return i[t-=365]})(t,n)}var os=null,hs=0;function cs(){var t=["799144UpkRWz","356926NfeJZx","set","slice","237700RBIjTO","627444ELwjUL","76968OxbdcX","6xPMWky","172231EpHRtx","1480332fEizHX","push","buffer"];return(cs=function(){return t})()}var as=Is;!function(){for(var t=Is,n=gs();;)try{if(-A(t(452))/1+-A(t(412))/2+-A(t(478))/3*(A(t(441))/4)+-A(t(485))/5*(-A(t(415))/6)+-A(t(400))/7+A(t(460))/8*(-A(t(486))/9)+-A(t(437))/10*(-A(t(470))/11)==412983)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();var fs=be(as(424)),vs={licenseUrl:"",onFetch:void 0},ds={},ls=function(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=1/0),function(t,n,i){var r=as,e=E.BYTES_PER_ELEMENT;n*=e,i*=e;var s,u=V(s=t,ArrayBuffer)?s:s[as(484)],o=t[r(483)],h=n,c=b[r(432)](0,b.min(h,o)),a=b.min(c+b[r(432)](i,0),o);return new E(u,c/=e,(a/=e)-c)}(t,n,i)},ws=function(t){for(var n,i=as,r="",e=Lt(t);!(n=e()).done;){var s=n.value.toString(16);1==s[i(433)]&&(s="0"+s),r+=s}return r};function gs(){var t=["360308tFqTFd","usable for decryption (status: ","oct","decode","parse","license","parseFromString","message","8pQccIM","No clear key test key provided!","generateRequest","text/xml","Failed to update the session: ","output-downscaled","target","apply","bind","Failed to update the session","24280927IKsRHd","No PR challenge data!","kids","status","getElementsByTagName","rtcdrmerror","CK license request:","A128KW","3KcCnPp","createSession","License acquisition failed with error ","No media keys for media element!","stringify","byteLength","buffer","82765KyOCry","7206525fRtYVA","error","btoa","9a04f07998404286ab92e65be0885f95","set","[PR] License fetched:","getUint16","onFetch","4630892EspqDe","addEventListener","debug","has","json","Previous lic will be reused","internal-error","subarray","fromCharCode","expired","text","temporary","665922eWbQGg","then","[FPS] License fetched:","174puebov","Content-Type","update","POST","2?i-2:0),e=2;e-1){var s=r[i(458)](e,i(463))[i(474)]("Challenge")[0].childNodes[0][i(420)];if(null===s)throw new y(i(471));return ps(s)}fs[i(444)]("[PR] Challenge node not found")}catch(n){t[i(446)](new CustomEvent(i(475),{detail:{message:""+n}})),fs[i(393)](n)}return null}(t,n.message);if(null===r)return t[i(446)](new CustomEvent("rtcdrmerror",{detail:{message:i(471)}})),void fs[i(393)](i(471));ks(vs[i(445)],r[i(484)],!0)[i(413)](function(t){return t[i(440)]()})[i(413)](function(r){var e=i;fs[e(402)](e(397),r),n[e(466)][e(417)](r)[e(439)](function(n){var i=e;t[i(446)](new CustomEvent(i(475),{detail:{message:i(464)+n}})),fs[i(393)]("Failed to update the session",n)})}).catch(function(n){var r=i;t.dispatchEvent(new CustomEvent(r(475),{detail:{message:""+n}})),fs[r(393)](n)})},Ts=function(t,n){var i=as;ks(vs.licenseUrl,n[i(459)])[i(413)](function(t){var n=i,r=t[n(410)]();return fs[n(402)](n(414),t,r),r})[i(413)](function(t){var r=i;n.target[r(417)](ps(t))})[i(439)](function(n){var r=i;t[r(446)](new CustomEvent(r(475),{detail:{message:""+n}})),fs.error(n)})},Ss=function(t,n){ds[t]=n},Es=me.isSafari;function Is(t,n){var i=gs();return(Is=function(t,n){return i[t-=393]})(t,n)}var Rs=!Es,Cs=new Map;function Ds(t){return se(this,void 0,void 0,function(){var n,i,r,e,s,u,o,h;return zt(this,function(c){switch(c.label){case 0:if(n=Is,null===t.initData)throw new y(n(442));if(null===(i=t[n(466)]))throw new y(n(426));if(null===(r=i.mediaKeys))throw new y(n(481));e=ws(new E(t[n(423)])),s=e+i.id,u=null,Cs[n(403)](s)&&(null!=(u=Cs.get(s))&&u.close(),Cs.delete(s)),fs[n(402)](n(u?405:435)),o=null;try{o=r.createSession(Rs?"persistent-license":"temporary")}catch(t){fs[n(402)]("EME createSession(persistent) failed:",t)}if(!o&&Rs){Rs=!1;try{o=r[n(479)](n(411))}catch(t){fs.error("EME createSession(temporary) failed:",t)}}if(!o)return[3,7];if(o.addEventListener(n(450),function(t){var r=n;t[r(466)][r(430)][r(431)](function(t,n){var e=r;(t===e(409)||"output-restricted"===t||t===e(465)||t===e(406))&&i[e(446)](new CustomEvent(e(475),{detail:{message:"Key "+ws(new E(n))+" is not "+(e(453)+t)+")",keyId:n}}))})}),Es?o[n(401)](n(459),Ts.bind(null,i),!1):-1!==e.indexOf(n(436))?o[n(401)](n(459),bs[n(468)](null,i),!1):-1!==e[n(434)](n(395))?o.addEventListener(n(459),As[n(468)](null,i),!1):o.addEventListener(n(459),ys[n(468)](null,i),!1),!u)return[3,5];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,o.load(u[n(422)])];case 2:return c.sent()?Cs[n(396)](s,o):i[n(446)](new CustomEvent(n(475),{detail:{message:n(428)}})),[3,4];case 3:return h=c.sent(),i[n(446)](new CustomEvent(n(475),{detail:{message:n(451)+h}})),[3,4];case 4:return[3,6];case 5:o[n(462)](t[n(429)],t[n(423)])[n(413)](function(){Rs&&Cs[n(396)](s,o)})[n(439)](function(t){var r=n;i.dispatchEvent(new CustomEvent(r(475),{detail:{message:r(427)+t}}))}),c.label=6;case 6:return[3,8];case 7:i[n(446)](new CustomEvent(n(475),{detail:{message:n(449)}})),c.label=8;case 8:return[2]}})})}var Ps=$s;!function(){for(var t=$s,n=Ks();;)try{if(-A(t(462))/1*(-A(t(532))/2)+-A(t(543))/3+A(t(682))/4+-A(t(692))/5*(A(t(588))/6)+-A(t(539))/7+A(t(496))/8+-A(t(549))/9==672532)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();var Ns=be(Ps(673)),Bs=me[Ps(607)],xs=me[Ps(540)],Os=me[Ps(647)],Ms=me[Ps(489)],Ls=me[Ps(478)],Us=me.platform,Fs=me[Ps(620)],Vs=Ms||Ls&&Us===Ps(578),Hs=1e6*(xs?82:Os?220:120),Ws=xs?5e3:2e3,zs=xs?1.5:.5;function Xs(t){var n,i=Ps;return(void 0===t?"undefined":W(t))!==i(672)||null===t||V(t,Element)||V(t,$e)?t:V(null==(n=t)?void 0:n[Ps(584)],ArrayBuffer)&&null!=n&&n.BYTES_PER_ELEMENT?t[i(550)]():Array[i(636)](t)?t.reduce(function(t,n,i){return t[i]=Xs(n),t},[]):V(t,k)?k.keys(t).reduce(function(n,i){return n[i]=Xs(t[i]),n},{}):t}var qs=function(t){var n=Ps;this[n(547)]="",this[n(471)]="",this.keySystem="",this[n(603)]=[],this[n(479)]=Xs(t),this.jmuxer=null,this.keyFrameLogCntr=0,this[n(561)]=Date[n(658)](),this[n(585)]=0,this[n(602)]=0,this[n(490)]=-1,this[n(680)]=0,this[n(596)]=0,this[n(491)]=!0,this.keyFrameNeededPosted=!1,this[n(617)]=Ws,this[n(500)]=null,this.dbgMediaDump={video:null,audio:null}},Gs=new Map,js=new E([60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60]),Qs=new E([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]),Ys=new E([213,251,214,184,46,217,62,78,249,138,228,9,49,238,51,183]);function Ks(){var t=["isSafari","ansform=$=>{let e=$.transformer;handleTransform(e.options.operation,e.readable,e.writable)}),onmessage=$=>{keyFra","status","DRM config:","key","Development"," will be used","Staging","const DUMMY_IDR_FRAME_SLICE_HDR0=new Uint8Array([32,0,203]),DUMMY_IDR_FRAME_SLICE_HDR1=new Uint8Array([16,0,50]);","enabled","playback at ","now",".experiment","seq","videoElement","data","btoa","PlayReady might not support '","logLevel","cbcs-1-9","encryption"," to ","offset","x-dt-custom-data","let brokenFrame=null,idrFrames=[];function initializeDummyFrames(){brokenFrame=new Uint8Array([0,0,0,1,65,154,255","object","[RTC-DRM]","not-allowed","durationMs","Default transform mode enabled, ","keySystem","timestamp","DRM config keyId must be an instance of 16-byte long Uint8Array.","lastKeyFrameTime","H264 is the only supported video codec.","2533916KeNZJm","out","Applying pre-configured certificate (","buffered","Widevine","x-dt-auth-token"," ms)","com.microsoft.playready.recommendation","error","currentTime","225RwtgWL","end","requestMediaKeySystemAccess","50705YjLCIv","onmessage","environment","wvLicenseUrl","a1d1f1"," requesting a new key frame (latency ","userId","ClearKey","createEncodedStreams","licenseUrl","PlayReady license acquisition might fail without output protection enabled (sessionId is ","feed","dbgMediaDump","jmuxer","MSE (re)init",",255]).buffer,idrFrames.push(new Uint8Array([0,0,0,1,39,100,0,13,172,87,5,6,100,0,0,0,1,40,238,60,176,0,0,0,1,37,","isChrome","config","forEach","Invalid config argument type, DRM config must be an object.","hwSecurity","audioEncrypted","setMediaKeys","fpsCertificate","Unable to create Worker!","GET","customTransform","isEdge","prevSeqNum","keyFrameNeeded","encrypted","targetLatency not set!","opus","FairPlay","7963992IJNztq","streamType","SampleAuxInfo extraction failed (video)"," seeking from ","worker","]: ","video","kind","audio","jitterBufferDelayHint","size","No target media element!","fpsCertificateUrl","wvCertificate","delimited","3000","pipeThrough","/license-server-fairplay/cert/","string",") not found in [","indexOf","warn","ignoreAudio","append","jitterBufferTarget","prLicenseUrl","sessionTypes","authToken","get","RTCRtpScriptTransform","audioElement","catch","trim","join","waitingForIdr","info","52hXHKkY","enqueue","). It has to be a string containing a JWT.","playbackRate","sai","persistent-license","Blob","2699340CvuQCI","isFirefox","transform",'rame:{type:$.type,timestamp:$.timestamp,data:$.data}}),"key"===$.type&&(keyFrameNeeded=!1),$.data=generateDummyFr',"554109usxuWq"," will not be created, use rtcDrmFeedFrame to push frames manually","bind","streams","serverCertificateUrl","includes","3473577nNrBJc","slice","URL","serverCertificate","length","Invalid authToken type (","addEventListener","', it's safer to use 'cbcs' instead.","srcObject","ClearKey is not supported by Safari.","meNeeded=$.data};","value","nextKeyFrameAllowedTime","Error recovery attempted","rtcdrmerror","184,32,0,203,255,38,29,217,24,192,161,96,0,0,12,229,174,166,6,7,20,3,84,0,247,96,193,181,229,128,0,32,32]).buffer"," bytes","both","debug","No valid DRM config found, call rtcDrmConfigure first.","dispatchEvent","certificate","mediaBufferMs","clear","merchant","src","sessionId","reportDiscontinuity","mediaBufferMs should be an integer.","Android","rtcDrmConfigure did not specify audioElement, audio will be dropped","/license-proxy-widevine/cenc/","arrayBuffer","). Edge only supports PlayReady, Widevine and ClearKey.","). Chrome only supports Widevine and ClearKey.","buffer","videoStartTimestamp",'audio/mp4; codecs="opus"',"set","175800AyhMKK","PlayReady","SampleAuxInfo extraction failed (audio)","cenc","codec","videoCapabilities",".. ","Duplicate/reordered frame, prev seq: ","bytesSinceKey","wvCertificateUrl","/license-proxy-headerauth/drmtoday/RightsManager.asmx","robustness","baseUrl","type","audioStartTimestamp","emeConfig","com.widevine.alpha","SW_SECURE_CRYPTO","fpsLicenseUrl","supportsRtpScriptTransform","Target video element (","?audioTransformFunction:videoTransformFunction});e.pipeThrough(a).pipeTo(x)}self.RTCTransformEvent&&(self.onrtctr","createObjectURL","playoutDelayHint","POSITIVE_INFINITY",'ame(keyFrameNeeded),e.enqueue($)}function handleTransform($,e,x){let a=new TransformStream({transform:"audio"===$',"track",'video/mp4; codecs="avc1.640032"',"cbcs","keyFrameRequestInterval","Frame gap: ","keyFrameNeededPosted","isWindows","HW_SECURE_ALL"," bytes, ","GOP is getting too long, requesting a new key frame","temporary","Safari does not support Opus, audio will not be rendered.","stringify","byteLength","message"," frame","H264","mediaDumps","h264","keyFrameLogCntr","requestMediaKeySystemAccess(","Safari doesn't support 'cenc'/AES-CTR, use 'cbcs' instead if possible.","isArray","Invalid DRM type (","DRM config iv must be an instance of 16-byte long Uint8Array.","keyId","pipeTo"," - ","receiver","isInteger","toString","onFetch","next"];return(Ks=function(){return t})()}function Js(t){var n=Ps,i=!1;if((t[n(479)][n(502)]&&t[n(479)].video[n(667)]!==n(572)&&"HW"===t[n(479)][n(502)][n(599)]||t[n(479)][n(504)]&&t[n(479)][n(504)][n(667)]!==n(572)&&"HW"===t.config[n(504)][n(599)])&&(i=!0),t.hwSecurity=i,function(t,n){var i=Ps;void 0!==n&&(t[i(479)].mediaBufferMs=n),(void 0===t[i(479)][i(571)]||t.config[i(571)]<0)&&(t[i(479)].mediaBufferMs=100,xs?t[i(479)][i(571)]=350:!Os&&Fs&&("PlayReady"===t.config[i(601)]||t[i(482)])&&(t.config[i(571)]=1400))}(t,t[n(479)][n(571)]),void 0===t.config[n(523)]){void 0===t[n(479)][n(468)]&&(t[n(479)][n(468)]="purchase"),void 0===t[n(479)][n(575)]&&(t.config[n(575)]=n(466));var r=f[n(663)](JSON[n(626)]({userId:t[n(479)].userId,sessionId:t.config.sessionId,merchant:t[n(479)].merchant}));Ss(n(670),r)}else Ss(n(687),t[n(479)][n(523)]);for(var e=0,s=[t[n(479)][n(504)],t[n(479)][n(502)]];e=4;++t[r(633)]<(u?Number[r(612)]:5)&&(Ns.debug(Te()+" "+n[r(601)]+", "+n.data.byteLength+r(622)+(r(657)+t.config[r(661)].currentTime)),u&&1===t.keyFrameLogCntr&&function(t,n,i){void 0===n&&(n=64),void 0===i&&(i=64);for(var r=Ps,e=new E(t[r(662)]),s="",u=0,o=0;oHs&&(Ns.info(r(623)),t[r(491)]=!0),t[r(475)]&&(function(t,n){var i=Ps;0===t.videoStartTimestamp&&(t.videoStartTimestamp=n.timestamp,t[i(617)]=Ws,t[i(561)]=Date.now()+2e3);var r=null,e=!1;if(n[i(662)][i(627)]<=4)Ns[i(517)]("Discarding corrupted video frame (too small)"),e=!0;else{var s=new E(n[i(662)],0,4);0!=s[0]||0!=s[1]||0!=s[2]||1!=s[3]?(Ns.warn("Discarding corrupted video frame (no Annex B startcode)"),e=!0):!(r=function(t,n){var i=ns,r=new DataView(t.data),e=t.data[i(268)]-2,s=r[i(267)](e);if(s>>4!=1)return es[i(271)]("Unsupported SampleAuxInfo version"),null;for(var o=new E(s-2),h=0,c=0;u1&&3===a&&(c=0,a=r.getUint8(u++)),0!==a?c=0:++c,o[h++]=a}var f=new DataView(o[i(256)]),v="cenc"===n?16:0,d=v+2+6*f[i(267)](v);return d+2>h?(es[i(271)](i(270)),null):{sai:o[i(255)](0,d),offset:e-s,seq:f[i(267)](d)}}return null}(n,t.config[i(502)][i(667)]))&&(Ns.warn(i(498)),e=!0)}if(r)if(n[i(601)]===i(651))t[i(490)]=r.seq;else{if(-1===t[i(490)])return 0;var u=r[i(660)]-t[i(490)];if(u<-32767&&(u+=65536),u<=0)return Ns.debug(i(595)+t.prevSeqNum+", curr: "+r.seq),0;u>1&&(e=n[i(601)]!==i(651),Ns[i(517)](i(618)+t[i(490)]+i(641)+r[i(660)]+", restart required: "+e)),t.prevSeqNum=r[i(660)]}var o=0;e&&!t[i(475)][i(530)]&&(o=-1,t[i(475)][i(576)]());var h=(n[i(678)]-t[i(585)])/9e4;return r&&t[i(475)][i(473)]({video:new E(n[i(662)],0,r.offset),videoSampleAuxInfo:r[i(536)],timestamp:h})<0&&(o=-1,Ns[i(517)](i(562)),Zs(t)),o>=0&&n[i(601)]===i(651)&&(t[i(680)]=h),o}(t,n)<0?t[r(491)]=!0:function(t){var n=Ps,i=t[n(479)][n(661)];if(!(!i||i[n(685)][n(553)]<1||i.paused||i[n(691)]>>2?.875:s<=u?1:s<7*u>>>2?1.125:s<9*u>>>2?1.25:s<11*u>>>2?1.375:1.5)!==(e=i).playbackRate&&(e[h(535)]=o)),!(a>>2))if(t[n(680)]>i[n(691)]+.1){var f=1e3*(c-t.lastKeyFrameTime)|0;f>40&&f>r-100?(Ns.debug(Te()+n(499)+(i[n(691)]+n(668)+t.lastKeyFrameTime+" (")+(t[n(680)]-i[n(691)])+")"),i[n(691)]=t[n(680)]):Ns[n(567)](Te()+" too close to seek, "+f)}else!t.keyFrameNeeded&&Date[n(658)]()>t[n(561)]&&a>r+100&&a>3*r>>>1&&(Ns[n(567)](Te()+n(467)+a+n(688)),t[n(491)]=!0,t[n(617)]<16e3&&(t[n(617)]<<=1))}}(t)),i?(!t[r(491)]||!Vs)&&(n[r(662)]=function(t){return!os&&(n=us,os=new E([0,0,0,1,65,154,255,255])[n(372)],ss[n(371)](new E([0,0,0,1,39,100,0,13,172,87,5,6,100,0,0,0,1,40,238,60,176,0,0,0,1,37,184,32,0,203,255,38,29,217,24,192,161,96,0,0,12,229,174,166,6,7,20,3,84,0,247,96,193,181,229,128,0,32,32])[n(372)]),ss[n(371)](ss[0][n(376)](0)),new E(ss[1])[n(375)]([16,0,50],27)),t?os:ss[hs^=1];var n}(t[r(491)]),i[r(533)](n)):t[r(491)]!=t.keyFrameNeededPosted&&(t[r(500)]&&t.worker.postMessage(t[r(491)]),t.keyFrameNeededPosted=t[r(491)]),t.keyFrameNeeded}function nu(t,n,i){var r=Ps;if(t.dbgMediaDump.audio){var e=n[r(678)]/48;t[r(474)][r(504)][r(519)](new E(n.data),e)||(t.dbgMediaDump[r(504)]=null)}return t[r(479)].audio&&t[r(479)].audio[r(667)]!==r(572)?n[r(662)][r(627)]>0&&function(t,n){var i,r=Ps;if(!t[r(475)]||t[r(518)])return 0;0===t[r(602)]&&(t.audioStartTimestamp=n[r(678)]);var e=(n[r(678)]-t[r(602)])/48e3;if((null===(i=t[r(479)][r(504)])||void 0===i?void 0:i[r(667)])===r(616))return t.jmuxer[r(473)]({audio:new E(n[r(662)]),timestamp:e});var s=function(t){var n=ns,i=new DataView(t[n(261)]),r=t.data[n(268)]-2,e=i[n(267)](r);if(e>>4!=1)return es[n(271)]("Unsupported SampleAuxInfo version"),null;for(var u=new E(e-2),o=0;s=16)break}return{sai:u,offset:r-e}}return null}(n);s?t.jmuxer[r(473)]({audio:new E(n[r(662)],0,s[r(669)]),audioSampleAuxInfo:s[r(536)],timestamp:e}):Ns[r(690)](r(590))}(t,n):i&&i[r(533)](n),!1}function iu(t){var n,i,r,e,s,u=Ps;if(!t||(void 0===t?"undefined":W(t))!==u(672))throw new p(u(481));if(!V(t.videoElement,HTMLVideoElement))throw new p("Invalid videoElement, it must be an instance of HTMLVideoElement.");if(t[u(526)]&&!V(t[u(526)],HTMLMediaElement))throw new p("Invalid audioElement, it must be an instance of HTMLMediaElement.");if(void 0!==t[u(571)]&&!Number[u(643)](t[u(571)]))throw new p("DRM config mediaBufferMs should be an integer.");for(var o=!1,h=!1,c=!1,a=[u(616),"cenc",u(572)],f=["SW","HW"],v=0,d=[t.video,t[u(504)]];v=0))return[3,9];null===(r=t[n(603)][0][n(522)])||void 0===r||r.splice(u,1),m.label=6;case 6:return m.trys.push([6,8,,9]),[4,l[n(461)](t[n(677)],t[n(603)])];case 7:return s=m.sent(),[3,9];case 8:return m.sent(),[3,9];case 9:if(!s)return o=n(634)+t[n(677)]+") failed",[2,(e[n(569)](new CustomEvent(n(563),{detail:{message:o}})),void Ns[n(690)](o))];h=null,m.label=10;case 10:return m.trys.push([10,12,,13]),[4,s.createMediaKeys()];case 11:return h=m.sent(),[3,13];case 12:return m.sent(),[3,13];case 13:return h?t.serverCertificate?(Ns[n(567)](n(684)+t[n(552)][n(627)]+" bytes)"),[4,h.setServerCertificate(t[n(552)])]):[3,15]:(c="createMediaKeys("+t.keySystem+") failed",[2,(e.dispatchEvent(new CustomEvent(n(563),{detail:{message:c}})),void Ns[n(690)](c))]);case 14:return m.sent(),[3,21];case 15:if(!t[n(547)])return[3,21];a={method:n(487)},f=t.serverCertificateUrl,m.label=16;case 16:return m.trys.push([16,20,,21]),[4,t.config[n(645)]?t[n(479)][n(645)](f,a):fetch(f,a)];case 17:return(v=m.sent()).ok?[4,v[n(581)]()]:(d="Server certificate fetch failed with error "+v[n(649)],[2,void e[n(569)](new CustomEvent(n(563),{detail:{message:d}}))]);case 18:return w=m.sent(),Ns[n(567)]("Fetched certificate from "+f+", "+w.byteLength+n(565)),[4,h.setServerCertificate(w)];case 19:return m.sent(),[3,21];case 20:return g=m.sent(),_=g.name+": "+g[n(628)],[2,(Ns[n(690)](_),void e[n(569)](new CustomEvent("rtcdrmerror",{detail:{message:_}})))];case 21:return[4,e[n(484)](h)];case 22:return m.sent(),e[n(555)](n(492),Ds),Zs(t),[2]}})})}(A)),A[u(479)][u(661)][u(555)]("play",function(){var t=u;A[t(479)][t(661)][t(691)]>.5&&(A[t(561)]=Date[t(658)]())})}var ru=Ps(655)+Ps(671)+Ps(477)+Ps(564)+'),idrFrames.push(idrFrames[0].slice());let $=new Uint8Array(idrFrames[1]);$.set([16,0,50],27)}let idrPicIdToggle=0;function generateDummyFrame($){return(brokenFrame||initializeDummyFrames(),$)?brokenFrame:idrFrames[idrPicIdToggle^=1]}function audioTransformFunction($,e){postMessage({streamType:"audio",frame:{timestamp:$.timestamp,data:$.data}}),e.enqueue($)}let keyFrameNeeded=!1;function videoTransformFunction($,e){postMessage({streamType:"video",f'+Ps(542)+Ps(613)+Ps(609)+Ps(648)+Ps(559);function eu(t){var n,i=Ps;if(0===Gs[i(506)])throw new p(i(568));if(t&&t[i(661)])n=t.videoElement;else{if(1!==Gs[i(506)])throw new p("Several DRM configs detected, rtcDrmOnTrack have to be called with target DRM config.");n=Gs.keys()[i(646)]()[i(560)]}var r=Gs[i(524)](n);if(!r){var e="";throw Gs[i(480)](function(t,n){e+=n.id+", "}),e=e[i(550)](0,-2),new p(i(608)+n.id+i(515)+e+"]")}return r}function su(t,n){var i=Ps;if(t&&t.config[i(661)]){var r=t.config[i(661)];if(r.buffered[i(553)]>0){var e=r.buffered[i(693)](r.buffered[i(553)]-1)-r.currentTime;n[i(611)]=n.jitterBufferDelayHint=n[i(520)]=e}w(su,1e3,t,n)}}var uu=gt.get("View");uu.setLevel(gt.DEBUG);var ou={metadata:!1,enableDRM:!1,disableVideo:!1,disableAudio:!1,peerConfig:{autoInitStats:!0,statsIntervalMs:1e3}},hu=function(t){function n(n,i,r,e){var s;return void 0===r&&(r=null),void 0===e&&(e=!0),n&&uu.warn("The streamName property has been deprecated. In a future release, this will be removed. Please do not rely on this value. Instead, set via token generator"),(s=t.call(this,null,i,uu,e)||this).payloadTypeCodec={},s.tracksMidValues={},s.drmOptionsMap=null,s.eventQueue=[],s.isMainStreamActive=!1,r&&(s.on(Fi.track,function(t){r.srcObject=t.streams[0]}),uu.warn("The mediaElement property has been deprecated. In a future release, this will be removed. Please do not rely on this value. Instead, do this in either the `track` or the `active` broadcast event.")),s}Ct(n,t);var i=n.prototype;return i.connect=function(){return Vt(function(t){return zt(this,function(n){switch(n.label){case 0:return void 0===t&&(t=ou),this.options=g(d(d({},ou),t),{peerConfig:d(d({},ou.peerConfig),t.peerConfig),setSDPToPeer:!1}),this.eventQueue.length=0,[4,this.initConnection({migrate:!1})];case 1:return n.sent(),[2]}})}).apply(this,arguments)},i.select=function(){return Vt(function(t){return zt(this,function(n){switch(n.label){case 0:return void 0===t&&(t={}),uu.debug("Viewer select layer values: ",t),[4,this.signaling.cmd("select",{layer:t})];case 1:return n.sent(),uu.info("Connected to streamName: ",this.streamName),[2]}})}).apply(this,arguments)},i.addRemoteTrack=function(t,n){return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:return uu.info("Viewer adding remote track",t),[4,this.webRTCPeer.addRemoteTrack(t,n)];case 1:for(i=s.sent(),r=Lt(n);!(e=r()).done;)e.value.addTrack(i.receiver.track);return[2,i]}})}).call(this)},i.project=function(t,n){return Vt(function(){var i,r,e,s;return zt(this,function(u){switch(u.label){case 0:for(r=function(){var t=s.value;if(!t.trackId&&!t.media)throw uu.error("Error in projection mapping, trackId or mediaId must be set"),new y("Error in projection mapping, trackId or mediaId must be set");var n=i.webRTCPeer.getRTCPeer();if(t.mediaId&&!n.getTransceivers().find(function(n){return n.mid===t.mediaId.toString()}))throw uu.error("Error in projection mapping, ".concat(t.mediaId," mid not found in local transceivers")),new y("Error in projection mapping, ".concat(t.mediaId," mid not found in local transceivers"))},e=Lt(n);!(s=e()).done;)i=this,r();return uu.debug("Viewer project source: layer mappings: ",t,n),[4,this.signaling.cmd("project",{sourceId:t,mapping:n})];case 1:return u.sent(),uu.info("Projection done"),[2]}})}).call(this)},i.unproject=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return uu.debug("Viewer unproject mediaIds: ",t),[4,this.signaling.cmd("unproject",{mediaIds:t})];case 1:return n.sent(),uu.info("Unprojection done"),[2]}})}).call(this)},i.replaceConnection=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return uu.info("Migrating current connection"),[4,this.initConnection({migrate:!0})];case 1:return t.sent(),[2]}})}).call(this)},i.stop=function(){var n,i;t.prototype.stop.call(this),null==(n=this.drmOptionsMap)||n.clear(),this.DRMProfile=null,null==(i=this.worker)||i.terminate(),this.worker=null,this.payloadTypeCodec={},this.tracksMidValues={},this.eventQueue.length=0},i.initConnection=function(t){return Vt(function(){var n,i,r,e,s,u,o,h,c,a,f,v,l,_,m,p,b;return zt(this,function(A){switch(A.label){case 0:if(n=this,uu.debug("Viewer connect options values: ",this.options),this.stopReconnection=!1,t.abrConfiguration&&t.abrConfiguration.metadata&&(!(e=t.abrConfiguration.metadata.bitrate)||e<0))throw new y("Invalid bitrate ".concat(e," supplied for ABR. The value must be a non-negative integer value."));if(!t.migrate&&this.isActive())throw uu.warn("Viewer currently subscribed"),new y("Viewer currently subscribed");A.label=1;case 1:return A.trys.push([1,3,,4]),[4,this.tokenGenerator()];case 2:return s=A.sent(),this.options.peerConfig.iceServers=null==s?void 0:s.iceServers,this.options.peerConfig.encodedInsertableStreams=jr&&(this.options.enableDRM||this.options.metadata),[3,4];case 3:throw u=A.sent(),uu.error("Error generating token."),V(u,cr)&&(401!==u.status&&this.autoReconnect?this.reconnect():this.stopReconnection=!0),u;case 4:if(!s)throw uu.error("Error while subscribing. Subscriber data required"),new y("Subscriber data required");return o=kr(s.jwt),this.streamName=o.millicast.streamName,h=new ur({streamName:this.streamName,url:"".concat(s.urls[0],"?token=").concat(s.jwt)}),s.subscriberToken&&(this.subscriberToken=s.subscriberToken),[4,(c=t.migrate?new Hi:this.webRTCPeer).createRTCPeer(this.options.peerConfig)];case 5:return A.sent(),null==(i=this.stopReemitingWebRTCPeerInstanceEvents)||i.call(this),this.stopReemitingWebRTCPeerInstanceEvents=Kt(c,this,k.values(Fi).filter(function(t){return t!==Fi.track})),this.options.metadata&&(this.worker||(this.worker=new Jr),this.worker.onmessage=function(t){if("metadata"===t.data.event){var i=new TextDecoder,r=t.data.metadata;if(r.mid=t.data.mid,r.track=n.tracksMidValues[t.data.mid],r.uuid){var e=r.uuid;r.uuid=e.reduce(function(t,n){return t+n.toString(16).padStart(2,"0")},""),r.uuid=r.uuid.replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}if(r.timecode&&(r.timecode=new Date(i.decode(r.timecode))),r.unregistered){var s=i.decode(r.unregistered);try{var u=JSON.parse(s);r.unregistered=u}catch(t){uu.info("The content could not be converted to JSON, returning raw bytes instead")}}n.emit("metadata",r)}}),c.on(Fi.track,function(t){n.isMainStreamActive?n.onTrackEvent(t):n.eventQueue.push(t)}),h.on(sr,function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return this.isMainStreamActive||"active"!==t.name?[3,3]:(this.mainSourceId=t.data.sourceId,this.DRMProfile||!t.data.encryption?[3,2]:[4,this.tokenGenerator()]);case 1:(n=i.sent()).drmObject&&(this.DRMProfile=n.drmObject),i.label=2;case 2:for(this.emit(sr,t),this.isMainStreamActive=!0;this.eventQueue.length>0;)this.onTrackEvent(this.eventQueue.shift());return[2];case 3:return"inactive"===t.name&&this.isMainStreamActive&&this.mainSourceId===t.data.sourceId&&(this.isMainStreamActive=!1),this.emit(sr,t),[2]}})}).call(n)}),a=c.getRTCLocalSDP(g(d({},this.options),{stereo:!0})),f=h.connect(),[4,ut.all([a,f])];case 6:return r=A.sent(),v=r[0],l=this.signaling,this.signaling=h,_=this.signaling.subscribe(v,g(d({},this.options),{vad:this.options.multiplexedAudioTracks>0})),m=c.peer.setLocalDescription(c.sessionDescription),[4,ut.all([_,m])];case 7:return r=A.sent(),p=r[0],this.payloadTypeCodec=Ni.getCodecPayloadType(p),[4,c.setRTCRemoteSDP(p)];case 8:return A.sent(),uu.info("Connected to streamName: ",this.streamName),b=this.webRTCPeer,this.webRTCPeer=c,this.setReconnect(),t.migrate&&this.webRTCPeer.on(Fi.connectionStateChange,function(t){var n,i;"connected"===t?w(function(){var t,n;null==(t=null==l?void 0:l.close)||t.call(l),null==(n=null==b?void 0:b.closeRTCPeer)||n.call(b),l=b=null,uu.info("Current connection migrated")},1e3):["disconnected","failed","closed"].includes(t)&&(null==(n=null==l?void 0:l.close)||n.call(l),null==(i=null==b?void 0:b.closeRTCPeer)||i.call(b),l=b=null)}),[2]}})}).call(this)},i.onTrackEvent=function(t){var n,i,r;if(this.tracksMidValues[null==(n=t.transceiver)?void 0:n.mid]=t.track,this.isDRMOn){var e=t.transceiver.mid,s=this.getDRMConfiguration(e);try{!function(t,n){var i,r,e=Ps,s=t[e(614)][e(503)];s===e(502)&&(t[e(642)][e(611)]=t.receiver[e(505)]=t[e(642)][e(520)]=0);var u=eu(n),o=u[e(479)][e(661)],h=u.config.audioElement;if(u.enabled){var c=""+e(Bs?525:470);if(u[e(479)][e(488)])Ns[e(567)](c+e(544));else{if(Ns[e(567)](e(676)+c+e(653)),s===e(502)){var a=Ae[e(631)][e(502)].in[e(675)];a>0&&(u.dbgMediaDump[e(502)]=new Ee(e(502),e(632),a))}else if(s===e(504)){var v=Ae[e(631)][e(504)].in[e(675)];v>0&&(u[e(474)][e(504)]=new Ee(e(504),e(494),v))}if(Bs){if(u[e(500)]=function(t){var n=Ps,i=f[n(551)]||f.webkitURL,r=f[n(538)],e=f.Worker;if(!(i&&r&&e&&t))return null;var s=new r([t]);return new e(i[n(610)](s))}(ru),null==u[e(500)])throw new y(e(486));u[e(500)][e(463)]=function(t){var n=e;t[n(662)][n(497)]===n(502)?tu(u,t.data.frame,null):nu(u,t.data.frame,null)},t[e(642)][e(541)]=new RTCRtpScriptTransform(u.worker,{operation:s})}else{var d=s===e(502)?tu:nu,l={drm:u,transform:function(t,n){d(u,t,n)}},w=t[e(642)][e(470)](),g=new TransformStream({transform:l[e(541)][e(545)](l)}),_=w.readable,m=w.writable;_[e(512)](g)[e(640)](m)}}if("audio"===s&&(null===(i=u.config[e(504)])||void 0===i?void 0:i.encryption)===e(572)){if(!h)return void Ns[e(517)](e(579));h[e(557)]!==t[e(546)][0]&&(h[e(557)]=t.streams[0]),u[e(479)][e(661)]&&(t[e(642)].playoutDelayHint=t.receiver.jitterBufferDelayHint=t[e(642)][e(520)]=u[e(479)][e(571)],su(u,t[e(642)]))}else s===e(502)&&(null===(r=u[e(479)][e(502)])||void 0===r?void 0:r.encryption)===e(572)&&o[e(557)]!==t[e(546)][0]&&(o.srcObject=t[e(546)][0])}else o[e(557)]!==t[e(546)][0]&&(o.srcObject=t[e(546)][0])}(t,s)}catch(t){uu.error("Failed to apply DRM on media Id:",e,"error is: ",t),this.emit("error",new y("Failed to apply DRM on media Id: "+e+" error is: "+t))}this.worker||(this.worker=new Jr),this.worker.addEventListener("message",function(t){"complete"===t.data.event&&function(t,n,i){var r=Ps,e=eu(i);t[r(601)]?tu(e,t,n):nu(e,t,n)}(t.data.frame,null,s)})}if(this.options.metadata)if(Qr)t.receiver.transform=new RTCRtpScriptTransform(this.worker,{name:"receiverTransform",payloadTypeCodec:d({},this.payloadTypeCodec),codec:this.options.metadata&&"h264",mid:null==(i=t.transceiver)?void 0:i.mid});else if(jr){var u=t.receiver.createEncodedStreams(),o=u.readable,h=u.writable;this.worker.postMessage({action:"insertable-streams-receiver",payloadTypeCodec:d({},this.payloadTypeCodec),codec:this.options.metadata&&"h264",mid:null==(r=t.transceiver)?void 0:r.mid,readable:o,writable:h},[o,h])}this.emit(Fi.track,t)},i.getDRMConfiguration=function(t){return this.drmOptionsMap?this.drmOptionsMap.get(t):null},i.onRtcDrmFetch=function(t,n){return Vt(function(){return zt(this,function(i){return[2,(n.headers||(n.headers=new Headers),n.headers.get("x-dt-custom-data")&&n.headers.delete("x-dt-custom-data"),this.subscriberToken?n.headers.append("Authorization","Bearer ".concat(this.subscriberToken)):uu.warn("onRtcDrmFetch: no subscriberToken"),fetch(t,n))]})}).call(this)},i.configureDRM=function(t){var n=this;if(!t)throw new y("Required DRM options is not provided");this.drmOptionsMap||(this.drmOptionsMap=new Map);var i={merchant:"dolby",environment:$e.Production,customTransform:this.options.metadata,videoElement:t.videoElement,audioElement:t.audioElement,video:{codec:"H264",encryption:"cbcs",keyId:re(t.videoEncryptionParams.keyId),iv:re(t.videoEncryptionParams.iv)},audio:{codec:"opus",encryption:"clear"},onFetch:this.onRtcDrmFetch.bind(this)};t.mediaBufferMs&&(i.mediaBufferMs=t.mediaBufferMs),this.DRMProfile&&(this.DRMProfile.playReadyUrl&&(i.prLicenseUrl=this.DRMProfile.playReadyUrl),this.DRMProfile.widevineUrl&&(i.wvLicenseUrl=this.DRMProfile.widevineUrl),this.DRMProfile.fairPlayUrl&&(i.fpsLicenseUrl=this.DRMProfile.fairPlayUrl),this.DRMProfile.fairPlayCertUrl&&(i.fpsCertificateUrl=this.DRMProfile.fairPlayCertUrl));try{iu(i),this.drmOptionsMap.set(t.videoMid,i),t.audioMid&&this.drmOptionsMap.set(t.audioMid,i),i.videoElement.addEventListener("rtcdrmerror",function(t){uu.error("DRM error: ",t.detail.message,"in video element:",i.videoElement.id),n.emit("error",new y(t.detail.message))})}catch(n){uu.error("Failed to configure DRM with options:",t,"error is:",n)}},i.removeDRMConfiguration=function(t){var n;null==(n=this.drmOptionsMap)||n.delete(t)},i.exchangeDRMConfiguration=function(t,n){var i=this.getDRMConfiguration(t),r=this.getDRMConfiguration(n);if(null===i)throw new y("No DRM configuration found for "+t);if(null===r)throw new y("No DRM configuration found for "+n);ee(i.video,r.video,"keyId"),ee(i.video,r.video,"iv");try{iu(i)}catch(t){uu.error("Failed to configure DRM with options:",i,"error is:",t)}try{iu(r)}catch(t){uu.error("Failed to configure DRM with options:",r,"error is:",t)}},Nt(n,[{key:"isDRMOn",get:function(){return!!this.drmOptionsMap&&this.drmOptionsMap.size>0}}]),n}(qr);t.Director=lr,t.Logger=gt,t.PeerConnection=Hi,t.Publish=ne,t.Signaling=ur,t.View=hu,k.defineProperty(t,n.toStringTag,{value:"Module"})},"object"==(void 0===t?"undefined":W(t))&&(void 0===r?"undefined":W(r))<"u"?s(t):"function"==typeof define&&define.amd?define(["exports"],s):s((e=("undefined"==typeof globalThis?"undefined":W(globalThis))<"u"?globalThis:e||self).millicast={})}),cn=M(function(t){function n(){var t=hn();return n=function(){return t},t}F(),Et(),k.defineProperty(t,"__esModule",{value:!0}),function(t,n){for(var i in n)k.defineProperty(t,i,{enumerable:!0,get:k.getOwnPropertyDescriptor(n,i).get})}(t,{get Director(){return n().Director},get Logger(){return n().Logger},get View(){return n().View}})}),an=M(function(t,n){F(),Et(),n.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),fn=M(function(t,n){F(),Et(),n.exports=function(t,n){var i=n[0],r=n[1],e=n[2],s=n[3],u=i+i,o=r+r,h=e+e,c=i*u,a=r*u,f=r*o,v=e*u,d=e*o,l=e*h,w=s*u,g=s*o,_=s*h;return t[0]=1-f-l,t[1]=a+_,t[2]=v-g,t[3]=0,t[4]=a-_,t[5]=1-c-l,t[6]=d+w,t[7]=0,t[8]=v+g,t[9]=d-w,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),vn=M(function(t,n){F(),Et(),n.exports=function(t,n,i){var r,e,s,u=i[0],o=i[1],h=i[2],c=b.sqrt(u*u+o*o+h*h);if(b.abs(c)<1e-6)return null;return u*=c=1/c,o*=c,h*=c,r=b.sin(n),e=b.cos(n),s=1-e,t[0]=u*u*s+e,t[1]=o*u*s+h*r,t[2]=h*u*s-o*r,t[3]=0,t[4]=u*o*s-h*r,t[5]=o*o*s+e,t[6]=h*o*s+u*r,t[7]=0,t[8]=u*h*s+o*r,t[9]=o*h*s-u*r,t[10]=h*h*s+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),dn=M(function(t,n){F(),Et(),n.exports=function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}}),ln=M(function(t,n){F(),Et(),n.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),wn=M(function(t,n){F(),Et(),n.exports=function(t,n){var i=n[0],r=n[1],e=n[2],s=n[3],u=n[4],o=n[5],h=n[6],c=n[7],a=n[8],f=n[9],v=n[10],d=n[11],l=n[12],w=n[13],g=n[14],_=n[15],m=i*o-r*u,y=i*h-e*u,p=i*c-s*u,k=r*h-e*o,b=r*c-s*o,A=e*c-s*h,T=a*w-f*l,S=a*g-v*l,E=a*_-d*l,I=f*g-v*w,R=f*_-d*w,C=v*_-d*g,D=m*C-y*R+p*I+k*E-b*S+A*T;if(!D)return null;return D=1/D,t[0]=(o*C-h*R+c*I)*D,t[1]=(e*R-r*C-s*I)*D,t[2]=(w*A-g*b+_*k)*D,t[3]=(v*b-f*A-d*k)*D,t[4]=(h*E-u*C-c*S)*D,t[5]=(i*C-e*E+s*S)*D,t[6]=(g*p-l*A-_*y)*D,t[7]=(a*A-v*p+d*y)*D,t[8]=(u*R-o*E+c*T)*D,t[9]=(r*E-i*R-s*T)*D,t[10]=(l*b-w*p+_*m)*D,t[11]=(f*p-a*b-d*m)*D,t[12]=(o*S-u*I-h*T)*D,t[13]=(i*I-r*S+e*T)*D,t[14]=(w*y-l*k-g*m)*D,t[15]=(a*k-f*y+v*m)*D,t}}),gn=M(function(t,n){F(),Et(),n.exports=function(t,n,i){var r=n[0],e=n[1],s=n[2],u=n[3],o=n[4],h=n[5],c=n[6],a=n[7],f=n[8],v=n[9],d=n[10],l=n[11],w=n[12],g=n[13],_=n[14],m=n[15],y=i[0],p=i[1],k=i[2],b=i[3];return t[0]=y*r+p*o+k*f+b*w,t[1]=y*e+p*h+k*v+b*g,t[2]=y*s+p*c+k*d+b*_,t[3]=y*u+p*a+k*l+b*m,y=i[4],p=i[5],k=i[6],b=i[7],t[4]=y*r+p*o+k*f+b*w,t[5]=y*e+p*h+k*v+b*g,t[6]=y*s+p*c+k*d+b*_,t[7]=y*u+p*a+k*l+b*m,y=i[8],p=i[9],k=i[10],b=i[11],t[8]=y*r+p*o+k*f+b*w,t[9]=y*e+p*h+k*v+b*g,t[10]=y*s+p*c+k*d+b*_,t[11]=y*u+p*a+k*l+b*m,y=i[12],p=i[13],k=i[14],b=i[15],t[12]=y*r+p*o+k*f+b*w,t[13]=y*e+p*h+k*v+b*g,t[14]=y*s+p*c+k*d+b*_,t[15]=y*u+p*a+k*l+b*m,t}}),_n=M(function(t,n){F(),Et(),n.exports=function(t,n,i,r,e){var s=1/b.tan(n/2),u=1/(r-e);return t[0]=s/i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(e+r)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*e*r*u,t[15]=0,t}}),mn=M(function(t,n){F(),Et(),n.exports=function(t,n,i,r){var e,s,u,o,h,c,a,f,v,d,l,w,g,_,m,y,p,k,A,T,S,E,I,R,C=r[0],D=r[1],P=r[2],N=b.sqrt(C*C+D*D+P*P);if(b.abs(N)<1e-6)return null;C*=N=1/N,D*=N,P*=N,e=b.sin(i),s=b.cos(i),u=1-s,o=n[0],h=n[1],c=n[2],a=n[3],f=n[4],v=n[5],d=n[6],l=n[7],w=n[8],g=n[9],_=n[10],m=n[11],y=C*C*u+s,p=D*C*u+P*e,k=P*C*u-D*e,A=C*D*u-P*e,T=D*D*u+s,S=P*D*u+C*e,E=C*P*u+D*e,I=D*P*u-C*e,R=P*P*u+s,t[0]=o*y+f*p+w*k,t[1]=h*y+v*p+g*k,t[2]=c*y+d*p+_*k,t[3]=a*y+l*p+m*k,t[4]=o*A+f*T+w*S,t[5]=h*A+v*T+g*S,t[6]=c*A+d*T+_*S,t[7]=a*A+l*T+m*S,t[8]=o*E+f*I+w*R,t[9]=h*E+v*I+g*R,t[10]=c*E+d*I+_*R,t[11]=a*E+l*I+m*R,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]);return t}}),yn=M(function(t,n){F(),Et(),n.exports=function(t,n,i){var r,e,s,u,o,h,c,a,f,v,d,l,w=i[0],g=i[1],_=i[2];n===t?(t[12]=n[0]*w+n[4]*g+n[8]*_+n[12],t[13]=n[1]*w+n[5]*g+n[9]*_+n[13],t[14]=n[2]*w+n[6]*g+n[10]*_+n[14],t[15]=n[3]*w+n[7]*g+n[11]*_+n[15]):(r=n[0],e=n[1],s=n[2],u=n[3],o=n[4],h=n[5],c=n[6],a=n[7],f=n[8],v=n[9],d=n[10],l=n[11],t[0]=r,t[1]=e,t[2]=s,t[3]=u,t[4]=o,t[5]=h,t[6]=c,t[7]=a,t[8]=f,t[9]=v,t[10]=d,t[11]=l,t[12]=r*w+o*g+f*_+n[12],t[13]=e*w+h*g+v*_+n[13],t[14]=s*w+c*g+d*_+n[14],t[15]=u*w+a*g+l*_+n[15]);return t}}),pn={};!function(t,n){for(var i in n)D(t,i,{get:n[i],enumerable:!0})}(pn,{ChromelessPlayer:function(){return $x},ErrorCategory:function(){return ad},ErrorCode:function(){return cd},Player:function(){return $x},cache:function(){return x5},cast:function(){return E$},features:function(){return iO},players:function(){return eO},registerContentProtectionIntegration:function(){return sO},utils:function(){return nO},version:function(){return rO}}),a.exports=(un=pn,L(D({},"__esModule",{value:!0}),un)),F(),Et(),F(),Et(),F(),Et(),F(),Et(),Dt(),F(),Et(),Bt(),H(),F(),Et(),H(),F(),Et(),Ut(),F(),Et(),Bt(),H(),F(),Et();var kn=function(t){return t.Sv="web",t.Tv="android",t.Ev="android-tv",t.Pv="ios",t.xv="tvos",t.Iv="chromecast",t.Rv="theoliveweb",t}({});var bn=l?l.userAgent:"",An=bn.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Tn=bn.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Sn=bn.match(/Android ([0-9\.]+)/i),En=bn.match(/Windows NT ([0-9\.]+)/i),In=bn.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Rn=bn.match(/Firefox\/([0-9\.]+)/i),Cn=bn.match(/OPR\/(\d+\.\d+)/i),Dn=bn.match(/Tizen ([0-9\.]+)/i),Pn=bn.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Nn=bn.match(/HbbTV\/([0-9.]+)/i),Bn=bn.match(/(AFT.*) Build/i),xn=function(){function t(){this.Cv=Boolean("ontouchstart"in self||self.DocumentTouch&&V(v,self.DocumentTouch)||l&&l.msMaxTouchPoints),this.Bv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(bn)||/(macintosh|mac(?=_powerpc)\s)/i.test(bn),this.Mv=/Windows NT/i.test(bn),this.Ov=En?T(En[1]):0,this.Uv=/Android/i.test(bn),this.Hv=Sn?T(Sn[1]):0,this.qv=/windows phone (8|8\.1)/i.test(bn),this.Gv=/iPhone/i.test(bn),this.Qv=/iPad/i.test(bn),this.Yv=this.Bv&&this.Cv&&!this.Qv,this.Zv=/iPod/i.test(bn),this.r_=/Mobile Safari/i.test(bn),this.s_=/EOS\d*STB/i.test(bn),this.n_=/APP\d*STB/i.test(bn),this.$v=(this.Gv||this.Qv||this.Yv||this.Zv)&&!this.qv,this.i_=Pn?T(Pn[2]):0,this.h_=this.qv||this.$v||this.Uv||this.r_,this.a_=/CriOS/i.test(bn),this.c_=Boolean(self.chrome&&/google/i.test(l.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(l.userAgent),this.p_=Tn?A(Tn[1],10):0,this.Bg=Boolean(/CriOS/i.test(bn)),this.Dg=Boolean(self.chrome||/Chrome/i.test(bn)||this.Bg),this.f_=An?A(An[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(bn),this.b_=Dn?T(Dn[1]):0,this.l_=this.b_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.b_):void 0,this.T_=/webos|web0s/i.test(bn),this.E_=/HbbTV/i.test(bn),this.x_=!!Nn&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(Nn[1]),this.R_=/AFT.* Build/i.test(bn),this.C_=Bn?Bn[1]:void 0,this.B_=/VIZIO/i.test(bn),this.M_=/Edge\/\d+/i.test(bn),this.O_=/Trident/i.test(bn),this.U_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.H_=/Vivaldi/i.test(bn),this.q_=/Firefox/i.test(bn)&&!/Seamonkey/i.test(bn),this.G_=Rn?T(Rn[1]):0,this.j_=/Safari/i.test(bn)&&!/Chrome/i.test(bn)&&!this.qv&&!this.y_,this.K_=In?T(In[2]):0,this.J_=Boolean(Cn),this.eg=Cn?T(Cn[1]):0,this.hg=/CrKey/.test(bn),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(bn),this.fg=/PlayStation 4/i.test(bn),this._g=/PlayStation 5/i.test(bn),this.pg="web"===kn.Ev,this.yg="web"===kn.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===kn.Pv,this.xg="web"===kn.xv,this.Rg="web"===kn.Iv}return Nt(t,[{key:"Ke",get:function(){return this.Cv}},{key:"Dv",get:function(){return this.Bv}},{key:"Nv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Ov}},{key:"Fv",get:function(){return this.Uv}},{key:"Vv",get:function(){return this.Hv}},{key:"Wv",get:function(){return this.qv}},{key:"zv",get:function(){return this.Gv}},{key:"Xv",get:function(){return this.Qv}},{key:"Kv",get:function(){return this.Yv}},{key:"Jv",get:function(){return this.Zv}},{key:"ru",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"e_",get:function(){return this.s_||this.n_}},{key:"vd",get:function(){return this.r_}},{key:"Ks",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"d_",get:function(){var t;return null!=(t=this.l_)?t:this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){var t;return(null==(t=f.chrome)?void 0:t.webview)&&this.p_>0}},{key:"m_",get:function(){return this.p_}},{key:"w_",get:function(){return this.y_}},{key:"A_",get:function(){return this.b_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"P_",get:function(){return this.x_}},{key:"I_",get:function(){return this.R_}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.C_}},{key:"D_",get:function(){return this.B_}},{key:"N_",get:function(){return this.M_}},{key:"L_",get:function(){return this.O_}},{key:"F_",get:function(){return this.U_}},{key:"V_",get:function(){return this.H_}},{key:"W_",get:function(){return this.q_}},{key:"z_",get:function(){return this.G_}},{key:"X_",get:function(){return this.j_}},{key:"Q_",get:function(){return 0===this.K_&&On.ru?this.i_:this.K_}},{key:"Y_",get:function(){return this.J_}},{key:"Z_",get:function(){return this.eg}},{key:"rg",get:function(){return this.hg}},{key:"og",get:function(){return this.ag}},{key:"cg",get:function(){return!(!this.S_&&!this.w_)&&this.d_<=56}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"Pg",get:function(){return this.xg}},{key:"Ig",get:function(){return this.Rg}},{key:"Cg",get:function(){return this.Dg}},{key:"IS_IOS_CHROME",get:function(){return this.Bg}}]),t}();xn.Ng=new xn;var On=xn.Ng;F(),Et(),at();var Mn={}.hasOwnProperty,Ln={}.toString;function Un(t){return null!=t}function Fn(t){return void 0===t}var Vn,Hn=Array.isArray||function(t){return"[object Array]"===Ln.call(t)};function Wn(t){return zn(t)&&Mn.call(t,"length")&&Yn(t.length)}function zn(t){return"object"===(void 0===t?"undefined":W(t))&&null!==t}function Xn(t){return zn(t)&&t.constructor&&t.constructor===k}function qn(t){return"string"==typeof t}function Gn(t){return"boolean"==typeof t}function jn(t){return Un(t)&&"function"==typeof t.then}function Qn(t){return"[object Date]"===Ln.call(t)}function Yn(t){return"number"==typeof t}function Kn(t){return"function"==typeof t}function Jn(t){return Kn(t)||zn(t)}function Zn(t){return zn(t)&&!Hn(t)}function $n(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function ti(t){for(var n;Un(n=t.firstChild);)t.removeChild(n)}function ni(t,n){for(var i;Un(i=t.firstChild);)n.appendChild(i)}function ii(t){return t&&t.nodeName&&t.nodeName.toLowerCase()||""}function ri(t){var n=t.className;return"string"==typeof n?n:n&&"string"==typeof n.baseVal?n.baseVal:""}function ei(t,n){var i=t.className;"string"==typeof i?t.className=n:i&&"string"==typeof i.baseVal&&(i.baseVal=n)}function si(t,n){if(void 0!==t.classList)t.classList.add(n);else if(void 0!==t.className){var i=ri(t);-1===(" "+i+" ").indexOf(" "+n+" ")&&ei(t,(i+" "+n).trim())}}function ui(t){t.stopPropagation()}function oi(t,n){On.w_&&On.A_<3?function(t,n){var i=n;switch(n){case"flex":i="-webkit-flex";break;case"inline-flex":i="-webkit-inline-flex"}t.display=i}(t,n):function(t,n){if(t.display=n,t.display!==n){var i=n;switch(n){case"flex":i="-ms-flexbox";break;case"inline-flex":i="-ms-inline-flexbox"}t.display=i}}(t,n)}function hi(t,n){var i=n.style;if(i)for(var r,e=Lt(k.keys(t));!(r=e()).done;){var s=r.value,u=t[s];void 0!==u&&(i[s]=u)}}function ci(t){var n=t.style;n.position="absolute",n.left="0",n.right="0",n.top="0",n.bottom="0",n.width="100%",n.height="100%"}function ai(t){var n=t.style;n.position="",n.left="",n.right="",n.top="",n.bottom="",n.width="",n.height=""}function fi(t){t.removeAttribute("title")}function vi(t){try{return Boolean(t)&&t.parent!==t}catch(t){return!1}}F(),Et(),F(),Et();var di=function(){},li=function(t){return t};function wi(t,n){var i=-1/0;return function(){for(var r=arguments.length,e=new Array(r),s=0;s=n&&(t.apply(this,e),i=u)}}function gi(t,n){var i=0;return function(){for(var r=arguments.length,e=new Array(r),s=0;sc&&(u=c),e>c&&(e=c),o=s,h=u;;)if(on?1:S(t)?S(n)?0:1:-1};function Oi(t,n,i){return Si(t,n,i)?0:xi(t,n)}var Mi=function(t,n){return Ei(t,n)?0:xi(t,n)};var Li="function"==typeof Array.prototype.find?function(t,n){return t.find(n)}:function(t,n){var i=Hi(t,n);return-1===i?void 0:t[i]},Ui=Li,Fi="function"==typeof Array.prototype.findLast?function(t,n){return t.findLast(n)}:function(t,n){var i=Wi(t,n);return-1===i?void 0:t[i]},Vi=Fi,Hi="function"==typeof Array.prototype.findIndex?function(t,n){return t.findIndex(n)}:function(t,n){for(var i=0;i=0;i-=1){if(n(t[i],i,t))return i}return-1},zi="function"==typeof Array.prototype.at?function(t,n){return t.at(n)}:function(t,n){var i=t.length,r=n>=0?n:i+n;return r<0||r>=i?void 0:t[r]};function Xi(t,n){var i=t.indexOf(n);return-1!==i&&(qi(t,i),!0)}function qi(t,n){0===n?t.shift():t.splice(n,1)}function Gi(t,n){for(var i=new Array(t.length),r=0,e=0;e=0;r--){var e=i.item(r);ii(e)===n&&t.removeChild(e)}}(t,"source"),t.load())}function Ir(){return void 0!==v?v.createElement("video"):void 0}var Rr=_i(Ir),Cr=_i(function(){return"undefined"!=typeof HTMLVideoElement&&V(Rr(),HTMLVideoElement)});function Dr(t){var n=v.createElement(t);return Sr(n)&&n.addEventListener("contextmenu",xr),Nr(n),n}function Pr(t){Nr(t),t.removeEventListener("contextmenu",xr)}function Nr(t){t.removeAttribute("id"),t.removeAttribute("class"),t.removeAttribute("style"),ti(t),Er(t),t.pause(),t.playbackRate=1,t.disableRemotePlayback=!1,t.preload="auto",t.controls=!1,t.style.display="none",Sr(t)&&(t.style.width="100%",t.style.height="100%",t.style.pointerEvents="none",t.playsInline=!0,t.setAttribute("webkit-playsinline",""))}function Br(t,n){if(n.sp){var i=t.muted;t.muted=!0,t.muted=!1,t.muted=i}else if(t.paused){var r=t.play();jn(r)&&kr(r),t.pause()}}function xr(t){t.preventDefault()}F(),Et(),F(),Et(),F(),Et(),at();var Or=null;try{Or=new WebAssembly.Instance(new WebAssembly.Module(new E([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(un){}function Mr(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function Lr(t){return!0===(t&&t.np)}function Ur(t){var n=b.clz32(t&-t);return t?31-n:n}Mr.prototype.np,k.defineProperty(Mr.prototype,"np",{value:!0}),Mr.isLong=Lr;var Fr={},Vr={};function Hr(t,n){var i,r,e;return n?(e=0<=(t>>>=0)&&t<256)&&(r=Vr[t])?r:(i=zr(t,0,!0),e&&(Vr[t]=i),i):(e=-128<=(t|=0)&&t<128)&&(r=Fr[t])?r:(i=zr(t,t<0?-1:0,!1),e&&(Fr[t]=i),i)}function Wr(t,n){if(S(t))return n?Zr:Jr;if(n){if(t<0)return Zr;if(t>=Qr)return re}else{if(t<=-Yr)return ee;if(t+1>=Yr)return ie}return t<0?Wr(-t,n).neg():zr(t%jr|0,t/jr|0,n)}function zr(t,n,i){return new Mr(t,n,i)}Mr.fromInt=Hr,Mr.fromNumber=Wr,Mr.fromBits=zr;var Xr=b.pow;function qr(t,n,i){if(0===t.length)throw y("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?Zr:Jr;if((i=i||10)<2||360)throw y("interior hyphen");if(0===r)return qr(t.substring(1),n,i).neg();for(var e=Wr(Xr(i,8)),s=Jr,u=0;u>>0:this.low},se.toNumber=function(){return this.unsigned?(this.high>>>0)*jr+(this.low>>>0):this.high*jr+(this.low>>>0)},se.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((s=o).isZero())return h+u;for(;h.length<6;)h="0"+h;u=""+h+u}},se.getHighBits=function(){return this.high},se.getHighBitsUnsigned=function(){return this.high>>>0},se.getLowBits=function(){return this.low},se.getLowBitsUnsigned=function(){return this.low>>>0},se.getNumBitsAbs=function(){if(this.isNegative())return this.eq(ee)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&!(t&1<>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},se.isZero=function(){return 0===this.high&&0===this.low},se.eqz=se.isZero,se.isNegative=function(){return!this.unsigned&&this.high<0},se.isPositive=function(){return this.unsigned||this.high>=0},se.isOdd=function(){return!(1&~this.low)},se.isEven=function(){return!(1&this.low)},se.equals=function(t){return Lr(t)||(t=Gr(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},se.eq=se.equals,se.notEquals=function(t){return!this.eq(t)},se.neq=se.notEquals,se.ne=se.notEquals,se.lessThan=function(t){return this.comp(t)<0},se.lt=se.lessThan,se.lessThanOrEqual=function(t){return this.comp(t)<=0},se.lte=se.lessThanOrEqual,se.le=se.lessThanOrEqual,se.greaterThan=function(t){return this.comp(t)>0},se.gt=se.greaterThan,se.greaterThanOrEqual=function(t){return this.comp(t)>=0},se.gte=se.greaterThanOrEqual,se.ge=se.greaterThanOrEqual,se.compare=function(t){if(Lr(t)||(t=Gr(t)),this.eq(t))return 0;var n=this.isNegative(),i=t.isNegative();return n&&!i?-1:!n&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},se.comp=se.compare,se.negate=function(){return!this.unsigned&&this.eq(ee)?ee:this.not().add($r)},se.neg=se.negate,se.add=function(t){Lr(t)||(t=Gr(t));var n=this.high>>>16,i=65535&this.high,r=this.low>>>16,e=65535&this.low,s=t.high>>>16,u=65535&t.high,o=t.low>>>16,h=0,c=0,a=0,f=0;return a+=(f+=e+(65535&t.low))>>>16,c+=(a+=r+o)>>>16,h+=(c+=i+u)>>>16,h+=n+s,zr((a&=65535)<<16|(f&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},se.subtract=function(t){return Lr(t)||(t=Gr(t)),this.add(t.neg())},se.sub=se.subtract,se.multiply=function(t){if(this.isZero())return this;if(Lr(t)||(t=Gr(t)),Or)return zr(Or.mul(this.low,this.high,t.low,t.high),Or.get_high(),this.unsigned);if(t.isZero())return this.unsigned?Zr:Jr;if(this.eq(ee))return t.isOdd()?ee:Jr;if(t.eq(ee))return this.isOdd()?ee:Jr;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(Kr)&&t.lt(Kr))return Wr(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,r=this.low>>>16,e=65535&this.low,s=t.high>>>16,u=65535&t.high,o=t.low>>>16,h=65535&t.low,c=0,a=0,f=0,v=0;return f+=(v+=e*h)>>>16,a+=(f+=r*h)>>>16,f&=65535,a+=(f+=e*o)>>>16,c+=(a+=i*h)>>>16,a&=65535,c+=(a+=r*o)>>>16,a&=65535,c+=(a+=e*u)>>>16,c+=n*h+i*o+r*u+e*s,zr((f&=65535)<<16|(v&=65535),(c&=65535)<<16|(a&=65535),this.unsigned)},se.mul=se.multiply,se.divide=function(t){if(Lr(t)||(t=Gr(t)),t.isZero())throw y("division by zero");var n,i,r;if(Or)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?zr((this.unsigned?Or.div_u:Or.div_s)(this.low,this.high,t.low,t.high),Or.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?Zr:Jr;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Zr;if(t.gt(this.shru(1)))return te;r=Zr}else{if(this.eq(ee))return t.eq($r)||t.eq(ne)?ee:t.eq(ee)?$r:(n=this.shr(1).div(t).shl(1)).eq(Jr)?t.isNegative()?$r:ne:(i=this.sub(t.mul(n)),r=n.add(i.div(t)));if(t.eq(ee))return this.unsigned?Zr:Jr;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();r=Jr}for(i=this;i.gte(t);){n=b.max(1,b.floor(i.toNumber()/t.toNumber()));for(var e=b.ceil(b.log(n)/b.LN2),s=e<=48?1:Xr(2,e-48),u=Wr(n),o=u.mul(t);o.isNegative()||o.gt(i);)o=(u=Wr(n-=s,this.unsigned)).mul(t);u.isZero()&&(u=$r),r=r.add(u),i=i.sub(o)}return r},se.div=se.divide,se.modulo=function(t){return Lr(t)||(t=Gr(t)),Or?zr((this.unsigned?Or.rem_u:Or.rem_s)(this.low,this.high,t.low,t.high),Or.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},se.mod=se.modulo,se.rem=se.modulo,se.not=function(){return zr(~this.low,~this.high,this.unsigned)},se.countLeadingZeros=function(){return this.high?b.clz32(this.high):b.clz32(this.low)+32},se.clz=se.countLeadingZeros,se.countTrailingZeros=function(){return this.low?Ur(this.low):Ur(this.high)+32},se.ctz=se.countTrailingZeros,se.and=function(t){return Lr(t)||(t=Gr(t)),zr(this.low&t.low,this.high&t.high,this.unsigned)},se.or=function(t){return Lr(t)||(t=Gr(t)),zr(this.low|t.low,this.high|t.high,this.unsigned)},se.xor=function(t){return Lr(t)||(t=Gr(t)),zr(this.low^t.low,this.high^t.high,this.unsigned)},se.shiftLeft=function(t){return Lr(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?zr(this.low<>>32-t,this.unsigned):zr(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):zr(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},se.shr=se.shiftRight,se.shiftRightUnsigned=function(t){return Lr(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?zr(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):zr(32===t?this.high:this.high>>>t-32,0,this.unsigned)},se.shru=se.shiftRightUnsigned,se.shr_u=se.shiftRightUnsigned,se.rotateLeft=function(t){var n;return Lr(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?zr(this.high,this.low,this.unsigned):t<32?(n=32-t,zr(this.low<>>n,this.high<>>n,this.unsigned)):(n=32-(t-=32),zr(this.high<>>n,this.low<>>n,this.unsigned))},se.rotl=se.rotateLeft,se.rotateRight=function(t){var n;return Lr(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?zr(this.high,this.low,this.unsigned):t<32?(n=32-t,zr(this.high<>>t,this.low<>>t,this.unsigned)):(n=32-(t-=32),zr(this.low<>>t,this.high<>>t,this.unsigned))},se.rotr=se.rotateRight,se.toSigned=function(){return this.unsigned?zr(this.low,this.high,!1):this},se.toUnsigned=function(){return this.unsigned?this:zr(this.low,this.high,!0)},se.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},se.toBytesLE=function(){var t=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},se.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,n>>>24,n>>>16&255,n>>>8&255,255&n]},Mr.fromBytes=function(t,n,i){return i?Mr.fromBytesLE(t,n):Mr.fromBytesBE(t,n)},Mr.fromBytesLE=function(t,n){return new Mr(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Mr.fromBytesBE=function(t,n){return new Mr(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},"function"==typeof BigInt&&(Mr.fromBigInt=function(t,n){return zr(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),n)},Mr.fromValue=function(t,n){return"bigint"===(void 0===t?"undefined":W(t))?Mr.fromBigInt(t,n):Gr(t,n)},se.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<=2*ve},Nt(t,[{key:"rp",get:function(){return void 0===this.hp&&(this.hp=this.op()),this.hp}},{key:"ap",get:function(){return On.Fv?"android":On.Dv?"macos":On.ru?"ios":On.Nv?"windows":"other"}},{key:"cp",get:function(){return On.og?"tv":On.Ks?"mobile":"desktop"}},{key:"dp",get:function(){return!On.og}},{key:"lp",get:function(){if(f.screen)return{width:f.screen.width,height:f.screen.height}}},{key:"fp",get:function(){return f.devicePixelRatio||1}},{key:"vp",get:function(){return _e}},{key:"_p",get:function(){return!1}},{key:"gp",get:function(){return!0}},{key:"pp",get:function(){return!!(On.X_||On.ru||On.g_)||!!On.D_}},{key:"mp",get:function(){return On.D_}},{key:"wp",get:function(){return!On.ru}},{key:"yp",get:function(){return!0}},{key:"Ap",get:function(){return!0}},{key:"bp",get:function(){return!1}},{key:"Sp",get:function(){}},{key:"Tp",get:function(){return!0}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){return On.D_}},{key:"Pp",get:function(){return!1}},{key:"Rp",get:function(){return!1}},{key:"Cp",get:function(){return!1}},{key:"Dp",get:function(){return!1}}]),t}(),ye=function(t){function n(){return t.call(this)||this}return Ct(n,t),n}(me);F(),Et(),Bt(),Dt();var pe=function(t){function n(){return t.apply(this,arguments)||this}return Ct(n,t),n.prototype.xp=function(t,n){if(t&&t.Np&&n&&n.Np){var i=ke(t.Np,"mp4a.40.2")&&ke(n.Np,"mp4a.40.5"),r=ke(t.Np,"mp4a.40.5")&&ke(n.Np,"mp4a.40.2"),e=ke(t.Np,"mp4a.40.2")&&ke(n.Np,"mp4a.40.34"),s=ke(t.Np,"mp4a.40.34")&&ke(n.Np,"mp4a.40.2"),u=ke(t.Np,"mp4a.40.5")&&ke(n.Np,"mp4a.40.34"),o=ke(t.Np,"mp4a.40.34")&&ke(n.Np,"mp4a.40.5");return!(i||r||e||s||u||o)}return!0},Nt(n,[{key:"Sp",get:function(){if(On.Dv)return 4096}},{key:"Dp",get:function(){return!0}}]),n}(ye);function ke(t,n){return t.indexOf(n)>-1}F(),Et(),Dt();var be=function(t){function n(){return t.apply(this,arguments)||this}return Ct(n,t),n.prototype.Ip=function(t){return t>=2},n}(ye);F(),Et(),Bt(),Dt();var Ae=function(t){function n(){var n;return(n=t.call(this)||this).Bp=On.Q_>=11,n.sp=On.X_&&!(On.ru&&On.Q_<10),n}return Ct(n,t),Nt(n,[{key:"Pp",get:function(){return On.Q_<17}},{key:"Rp",get:function(){return!0}}]),n}(ye);F(),Et(),Bt(),Dt();var Te,Se=function(t){function n(){return t.apply(this,arguments)||this}return Ct(n,t),Nt(n,[{key:"Tp",get:function(){return!On.Nv||(On.v_?92!==On.m_:On.d_>=100)}}]),n}(ye);F(),Et(),F(),Et(),Bt(),Dt(),F(),Et(),Bt(),Dt(),F(),Et(),Bt(),Dt(),F(),Et();var Ee=function(){var t=Ir();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(On.Kv)return!1;var t=Ir();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var Ie=function(t){function n(n){var i;return(i=t.call(this)||this).Mp=void 0,i.Mp=n,i.Bp=i.Mp.Bp,i.Ke=i.Mp.Ke,i.sp=Ee&&i.Mp.sp,i}Ct(n,t);var i=n.prototype;return i.op=function(){return this.Mp.rp},i.xp=function(t,n){return this.Mp.xp(t,n)},i.Ip=function(t){return this.Mp.Ip(t)},Nt(n,[{key:"Sp",get:function(){return this.Mp.Sp}},{key:"Tp",get:function(){return this.Mp.Tp}},{key:"Pp",get:function(){return this.Mp.Pp}},{key:"Dp",get:function(){return this.Mp.Dp}}]),n}(me),Re=function(t){function n(n){var i;return(i=t.call(this,n)||this).Bp=!0,i.Ks=!0,i}return Ct(n,t),Nt(n,[{key:"bp",get:function(){return On.ru}}]),n}(Ie);F(),Et();var Ce=function(){function t(t){this.Op=void 0,this.Op=De(t)}var n=t.prototype;return n.Lp=function(){return new this.Op},n.Fp=function(t){return this.Op.isTypeSupported(t)},t}();function De(t){return t&&Jn(f.ManagedMediaSource)?f.ManagedMediaSource:Jn(f.MediaSource)?f.MediaSource:void 0}var Pe=function(t){function n(){return t.apply(this,arguments)||this}return Ct(n,t),n.prototype.op=function(){return De(!0)?t.prototype.op.call(this):1},Nt(n,[{key:"bp",get:function(){return!0}}]),n}(Re);F(),Et(),Bt(),Dt();var Ne=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Up=void 0,n}return Ct(n,t),n.prototype.xp=function(n,i){return t.prototype.xp.call(this,n,i)},Nt(n,[{key:"_p",get:function(){return On.A_<3}},{key:"gp",get:function(){return On.A_>=3}},{key:"lp",get:function(){var t=this;return f.tizen&&!this.Up&&f.tizen.systeminfo.getPropertyValue("DISPLAY",function(n){var i=n.resolutionWidth,r=n.resolutionHeight;1===i&&1===r||(t.Up={width:i,height:r})}),this.Up}},{key:"kp",get:function(){return On.A_<3}}]),n}(Ie);F(),Et(),Bt(),Dt();var Be=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Up=void 0,n}return Ct(n,t),Nt(n,[{key:"lp",get:function(){var t=this;return f.webOS&&!this.Up&&f.webOS.deviceInfo(function(n){t.Up={width:n.screenWidth,height:n.screenHeight}}),this.Up}},{key:"yp",get:function(){return!1}}]),n}(Ie);F(),Et(),Bt(),Dt();var xe=function(t){function n(){return t.apply(this,arguments)||this}return Ct(n,t),Nt(n,[{key:"bp",get:function(){return!0}},{key:"Rp",get:function(){return this.Mp.Rp}}]),n}(Ie);F(),Et(),Bt(),Dt();var Oe=function(t){function n(){return t.apply(this,arguments)||this}return Ct(n,t),Nt(n,[{key:"Cp",get:function(){return On.IS_FIRETV_AFTMM}}]),n}(Ie);!function(t){Te=t}(function(){var t=function(){if(On.W_)return new pe;if(On.N_||On.L_)return new be;if(On.X_)return new Ae;if(On.u_)return new Se;return new ye}();return On.ru?new Pe(t):On.I_?new Oe(t):On.Ks?new Re(t):On.w_?new Ne(t):On.S_?new Be(t):On.Dv?new xe(t):new Ie(t)}()),F(),Et(),Bt(),Dt(),F(),Et(),Bt(),H(),at(),F(),Et();var Me=!(On.L_&&!On.F_),Le=self.console;function Ue(t){if(zn(t))try{return JSON.stringify(t)}catch(t){}return t}function Fe(t){return t.map(Ue).join(" ")}function Ve(t){var n=Le&&Le[t];return n?n.bind&&Me?n.bind(Le):function(){for(var n=arguments.length,i=new Array(n),r=0;r1?n-1:0),r=1;r1?n-1:0),r=1;rc&&(s=c),u>c&&(u=c),o=e,h=s;;)if(o=65&&t<=90}function os(t){return us(t)||function(t){return t>=97&&t<=122}(t)}function hs(t){return t>=48&&t<=57}function cs(t){return hs(t)||os(t)}function as(t){return hs(t)||t>=65&&t<=70||t>=97&&t<=102}function fs(t){return us(t)?t+32:t}function vs(t){return hs(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function ds(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var ls=b.min,ws=String.fromCharCode;function gs(t){for(var n=t.length,i=[],r=0;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ks=b.floor,bs=String.fromCharCode;function As(t){throw new RangeError(ps[t])}function Ts(t){for(var n=[],i=0,r=t.length;i=55296&&e<=56319&&i>1,t+=ks(t/n);t>455;r+=36)t=ks(t/35);return ks(r+36*t/(t+38))},Ds=function(t){return function(t,n){var i=t.split("@"),r="";i.length>1&&(r=i[0]+"@",t=i[1]);var e=function(t,n){for(var i=[],r=t.length;r--;)i[r]=n(t[r]);return i}((t=t.replace(ys,".")).split("."),n).join(".");return r+e}(t,function(t){return ms.test(t)?"xn--"+function(t){for(var n=[],i=(t=Ts(t)).length,r=128,e=0,s=72,u=0,o=t;u=r&&lks((_s-e)/w)&&As("overflow"),e+=(f-r)*w,r=f;for(var g=0,_=t;g<_.length;g++){var m=_[g];if(m_s&&As("overflow"),m==r){for(var y=e,p=36;;p+=36){var k=p<=s?1:p>=s+26?26:p-s;if(y65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r)}return gs(n)}function Ns(t){if(t>=55296&&t<=57343)throw new y("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Bs(t,n){return t>>n&63|128}function xs(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(Bs(t,12)),n.push(Bs(t,6))):(Ns(t),n.push(t>>12&15|224),n.push(Bs(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function Os(t){for(var n=[],i=0;i=Es)throw new y("Invalid byte index");var t=255&Ss[Is];if(Is++,128==(192&t))return 63&t;throw new y("Invalid continuation byte")}function Ls(){var t,n;if(Is>Es)throw new y("Invalid byte index");if(Is===Es)return!1;if(t=255&Ss[Is],Is++,!(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Ms())>=128)return n;throw new y("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Ms()<<6|Ms())>=2048)return Ns(n),n;throw new y("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Ms()<<12|Ms()<<6|Ms())>=65536&&n<=1114111)return n;throw new y("Invalid UTF-8 detected")}function Us(t){return[37,ds(t>>4),ds(15&t)]}function Fs(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Vs(t){return Fs(t)||32===t||34===t||60===t||62===t||96===t}function Hs(t){return Vs(t)||35===t||63===t||123===t||125===t}function Ws(t){return Hs(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function zs(t){return t<33||t>126||34===t||35===t||60===t||62===t}function Xs(t){return zs(t)||39===t}function qs(t,n){if(!n(t))return[t];for(var i=Os([t]),r=[],e=0;e6)throw new p;for(var h=0;s0){if(!("."===t[s]&&h<4))throw new p;s+=1}if(!Ye.test(t[s]))throw new p;for(;s255)throw new p}s+=1}i[r]=i[r]<<8|c,2!==(h+=1)&&4!==h||(r+=1)}if(4!==h)throw new p;break}if(":"===t[s]){if((s+=1)===n)throw new p}else if(s0;)ss(i,r,e+f-1),r-=1,f-=1}else if(8!==r)throw new p;return i}function Ks(t){var n=10,i=Ze;return Je.test(t)?(t=t.slice(2),n=16,i=$e):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=ts),""===t?0:i.test(t)?A(t,n):void 0}var Js={Vp:4},Zs=/[\0\t\n\r #%/:?@\[\\\]]/,$s=/[\0\t\n\r #/:?@\[\\\]]/;function tu(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new p("Invalid IPv6 address");return{Vp:2,Hp:Ys(t.slice(1,-1))}}if(!n)return function(t){if($s.test(t))throw new p("Invalid code point in opaque host");var n=Gs(t,Fs);return""===n?Js:{Vp:3,Wp:n}}(t);var i=function(t){var n=function(t){return Ds(t.toLowerCase())}(t);return n}(Qs(t));if(Zs.test(i))throw new p("Invalid code point in host");var r=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var i=[],r=0;r255)throw new p;if(i[i.length-1]>=b.pow(256,5-i.length))throw new p;for(var o=i.pop(),h=0;h>>=8;return n.reverse().join("")}(t.Hp);case 2:return"["+function(t){for(var n="",i=function(t){for(var n=0,i=0,r=0,e=0,s=0;s<8;s++)0===t[s]?(0===e&&(r=s),e++):(e>i&&(n=r,i=e),e=0);return e>i&&(n=r,i=e),i>1?n:null}(t),r=!1,e=0;e<8;e++){if(r){if(0===t[e])continue;r=!1}i!==e?(n+=t[e].toString(16),7!==e&&(n+=":")):(n+=0===e?"::":":",r=!0)}return n}(t.Hp)+"]";case 3:return t.Wp;case 4:return""}}var iu=/\+/g;function ru(t){return 42===t||45===t||46===t||95===t||cs(t)}function eu(t){for(var n=t.split("&"),i=[],r=0;r0&&(n+="&"),n+=uu(Os(Ts(r[0])))+"="+uu(Os(Ts(r[1])))}return n}function uu(t){for(var n=[],i=0;i0&&"?"===t[0]&&(t=t.slice(1)),this.zp=eu(t)}var n=t.prototype;return n.append=function(t,n){t=hu(t),n=hu(n),this.zp.push([t,n]),wu(this)},n.delete=function(t){t=hu(t);for(var n=this.zp,i=0;i=2))return!1;if(!Bu(t.slice(0,2)))return!1;if(2!==n){var i=t[2];if(47!==i&&92!==i&&63!==i&&35!==i)return!1}return!0}function Nu(t){return 2===t.length&&Qe.test(t[0])&&(":"===t[1]||"|"===t[1])}function Bu(t){return 2===t.length&&Nu(gs(t))}function xu(t){return Nu(t)&&":"===t[1]}function Ou(t){var n=t.Jp;0!==n.length&&("file"===t.Qp&&1===n.length&&xu(n[0])||n.pop())}function Mu(t){return null===t.Zp||Js===t.Zp||t.$p||"file"===t.Qp}var Lu=-1,Uu=/\t|\n|\r/g,Fu=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Vu(t,n,i,r){void 0===i&&(i=null),void 0===r&&(r=null),i||(i=new Wu,t=t.replace(Fu,""));var e=null!==r?r:0;n=n||null;for(var s=[],u=!1,o=!1,h=!1,c=Ts(t=t.replace(Uu,"")),a=c.length,f=0;f<=a;){var v=f65535)throw new p("Invalid port");i.im=y===Au[i.Qp]?null:y,s.length=0}if(null!==r)return;e=16,f-=1}break;case 13:i.Qp="file",47===v||92===v?e=14:n&&"file"===n.Qp?Lu===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp=n.Gp):63===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp="",e=19):35===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp=n.Gp,i.nm="",e=20):(Pu(c.slice(f))||(i.Zp=n.Zp,i.Jp=n.Jp.slice(),Ou(i)),e=17,f-=1):(e=17,f-=1);break;case 14:47===v||92===v?e=15:(n&&"file"===n.Qp&&!Pu(c.slice(f))&&(xu(n.Jp[0])?i.Jp.push(n.Jp[0]):i.Zp=n.Zp),e=17,f-=1);break;case 15:if(Lu===v||47===v||92===v||63===v||35===v)if(f-=1,null===r&&Bu(s))e=17;else if(0===s.length){if(i.Zp=Js,null!==r)return;e=16}else{var k=tu(Ps(s),Cu(i));if(0===k.Vp&&"localhost"===k.qp&&(k=Js),i.Zp=k,null!==r)return;s.length=0,e=16}else s.push(v);break;case 16:Cu(i)?(e=17,47!==v&&92!==v&&(f-=1)):null===r&&63===v?(i.Gp="",e=19):null===r&&35===v?(i.nm="",e=20):Lu!==v&&(e=17,47!==v&&(f-=1));break;case 17:if(Lu===v||47===v||Cu(i)&&92===v||null===r&&(63===v||35===v)){var b=Ps(s);if(Iu(b)?(Ou(i),47===v||Cu(i)&&92===v||i.Jp.push("")):!Eu(b)||47===v||Cu(i)&&92===v?Eu(b)||("file"===i.Qp&&0===i.Jp.length&&Bu(s)&&(Js!==i.Zp&&null!==i.Zp&&(i.Zp=Js),s[1]=58,b=Ps(s)),i.Jp.push(b)):i.Jp.push(""),s.length=0,"file"===i.Qp&&(Lu===v||63===v||35===v))for(;i.Jp.length>1&&""===i.Jp[0];)i.Jp.shift();63===v?(i.Gp="",e=19):35===v&&(i.nm="",e=20)}else s.push.apply(s,qs(v,Hs));break;case 18:63===v?(i.Gp="",e=19):35===v?(i.nm="",e=20):Lu!==v&&(i.Jp[0]+=Ps(qs(v,Fs)));break;case 19:null===r&&35===v?(i.nm="",e=20):Lu!==v&&(i.Gp+=Ps(qs(v,Cu(i)?Xs:zs)));break;case 20:Lu===v||0===v||(i.nm+=Ps(qs(v,Vs)))}f++}return i}function Hu(t,n,i,r){try{Vu(t,n,i,r)}catch(t){}}var Wu=function(){this.Qp="",this.Kp="",this.Yp="",this.Zp=null,this.im=null,this.Jp=[],this.Gp=null,this.nm=null,this.$p=!1};function zu(t){switch(t.Qp){case"blob":var n;try{n=Vu(t.Jp[0],null)}catch(t){return bu}return zu(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+nu(n)+(null===i?"":":"+i)}(t.Qp,t.Zp,t.im);default:return bu}}var Xu=function(){function t(t,n){var i,r=null;if(null!=n)if(function(t){return null!=t&&t instanceof Xu&&"object"==typeof t.rc}(n))r=n.rc;else try{r=Vu(String(n),null)}catch(t){throw new p("Invalid base URL: "+t.message)}try{i=Vu(String(t),r)}catch(t){throw new p("Invalid URL: "+t.message)}var e=i.Gp;this.rc=i,this.Gp=function(t){var n=new gu;return null!==t&&lu(n,t),n}(e),this.Gp.rc=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&qe(t.prototype,n),i&&qe(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.Qp+":";if(null!==t.Zp?(i+="//",Du(t)&&(i+=t.Kp,""!==t.Yp&&(i+=":"+t.Yp),i+="@"),i+=nu(t.Zp),null!==t.im&&(i+=":"+t.im)):null===t.Zp&&"file"===t.Qp&&(i+="//"),t.$p)i+=t.Jp[0];else for(var r=0,e=t.Jp;r1?n-1:0),r=1;r>>=1);)r+=r;return e},Wo="function"==typeof String.prototype.padStart?function(t,n,i){return void 0===i&&(i=" "),t.padStart(n,i)}:function(t,n,i){void 0===i&&(i=" ");var r=i,e=(0|n)-t.length;return e<=0?t:(e>r.length&&(r+=Ho(r,e/r.length)),r.slice(0,e)+t)},zo=(String.prototype.padEnd,16384),Xo="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=zo?(n=String).fromCodePoint.apply(n,[].concat(t)):Go(t,String.fromCodePoint)}:function(t){for(var n,i=[],r=Lt(t);!(n=r()).done;){var e=n.value;e>65535&&(e-=65536,i.push(e>>>10&1023|55296),e=56320|1023&e),i.push(e)}return qo(i)};function qo(t){var n;return t.length<=zo?(n=String).fromCharCode.apply(n,[].concat(t)):Go(t,String.fromCharCode)}function Go(t,n){for(var i=[],r=0;r=42||On.W_&&On.z_>=38||On.N_||On.F_||On.Y_&&On.Z_>=29;function Yo(t,n){return Lo(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[Yu({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Yu({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}function Ko(){return void 0!==l&&"function"==typeof l.requestMediaKeySystemAccess}function Jo(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest}var Zo=function(){function t(t){this.hw=void 0,this.ew=Ju(),this.ow=void 0,this.hw=t}var n=t.prototype;return n.Am=function(){return this.Tm(Ro)},n.pm=function(){return this.Tm(Po)},n.ym=function(){return this.Tm(Io)},n.wm=function(){return this.Tm(Co)},n.Tm=function(t){var n=t.$m,i=this.ew.get(n);if(i)return i;var r=this.Sm(t,'video/mp4; codecs="avc1.42000a"');return this.ew.set(n,r),r},n.Sm=function(t,n){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,this.hw.nw(t.Ym,[Yo(n,!0)])];case 1:return i.sent(),[2,!0];case 2:i.sent(),i.label=3;case 3:return i.trys.push([3,5,,6]),[4,this.hw.nw(t.Ym,[Yo(n,!1)])];case 4:return i.sent(),[2,!0];case 5:return i.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}})}).call(this)},n._m=function(){return this.ow||(this.ow=this.aw()),this.ow},n.aw=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return"https:"===f.location.protocol?[2,!1]:Qo?[4,this.pm()]:[2,!1];case 1:return t.sent()?[2,!1]:[2,!0]}})}).call(this)},t}();function $o(t,n,i){if("function"==typeof i)i.call(t,n);else for(var r,e=Lt(i);!(r=e()).done;){r.value.call(t,n)}}F(),Et(),F(),Et(),Wt(),Ut(),Qt(),F(),Et(),Wt(),Bt(),Qt(),F(),Et(),Wt(),Qt(),F(),Et(),Bt(),Dt(),F(),Et(),Dt(),Ut();var th=function(){function t(t){var n=this;this.cw=Ku(),this.fw=void 0,this.dw=0,this._w=void 0,this.Rs=function(t){n.So(t)},this._w=null!=t?t:this}var n=t.prototype;return n.wn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.uw(t,n);else for(var i,r=Lt(t);!(i=r()).done;){var e=i.value;this.uw(e,n)}},n.uw=function(t,n){var i=this.cw[t];void 0===i?this.cw[t]=n:"function"==typeof i?this.cw[t]=[i,n]:0===this.dw?i.push(n):this.cw[t]=i.concat(n)},n.lw=function(t){if("function"==typeof t){var n=this.fw;void 0===n?this.fw=t:"function"==typeof n?this.fw=[n,t]:0===this.dw?n.push(t):this.fw=n.concat(t)}},n.Vo=function(){this.cw=Ku(),this.fw=void 0},n.So=function(t){this.dw++;var n=this.cw[t.type],i=this.fw;void 0!==n&&$o(this._w,t,n),void 0!==i&&$o(this._w,t,i),this.dw--},n.mn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.gw(t,n);else for(var i,r=Lt(t);!(i=r()).done;){var e=i.value;this.gw(e,n)}},n.gw=function(t,n){var i=this.cw[t];void 0!==i&&("function"==typeof i?i===n&&(this.cw[t]=void 0):0===this.dw?Xi(i,n):this.cw[t]=Gi(i,n))},n.pw=function(t){if("string"==typeof t)this.cw[t]=void 0;else for(var n,i=Lt(t);!(n=i()).done;){var r=n.value;this.cw[r]=void 0}},n.mw=function(t){var n=this.fw;void 0!==n&&("function"==typeof n?n===t&&(this.fw=void 0):0===this.dw?Xi(n,t):this.fw=Gi(n,t))},n.ww=function(t,n){var i=this;return new ut(function(r,e){if(n&&n.Hg)return e(new fr);var s=function(t){o(),r(t)},u=function(){o(),e(new fr)},o=function(){i.mn(t,s),n&&n.jg(u)};i.wn(t,s),n&&n.Xg(u)})},t}(),nh=function(t){function n(){return t.apply(this,arguments)||this}return Ct(n,t),n.prototype.So=function(n){var i=this;pr(function(){t.prototype.So.call(i,n)})},n}(th),ih=function(t){function n(){return t.apply(this,arguments)||this}Ct(n,t);var i=n.prototype;return i.lw=function(n){t.prototype.lw.call(this,n)},i.mw=function(n){t.prototype.mw.call(this,n)},n}(th);F(),Et(),Dt(),F(),Et();var rh=function(t,n){void 0===n&&(n=new Date),this.type=void 0,this.date=void 0,this.type=t,this.date=n};F(),Et();var eh=function(t){return t.yw="Aw",t.Sw="Tw",t.Ew="contentprotectionerror",t.Pw="contentprotectionsuccess",t.xw="currentsourcechange",t.Iw="destroy",t.Rw="durationchange",t.Cw="emptied",t.Dw="encrypted",t.Bw="ended",t.Nw="Mw",t.Lw="Ow",t.Fw="Uw",t.Vw="Hw",t.Ww="loadstart",t.qw="manifestupdate",t.zw="nosupportedrepresentationfound",t.Gw="offline",t.Xw="online",t.jw="pause",t.uo="play",t.Qw="progress",t.Kw="ratechange",t.Yw="representationchange",t.Jw="resize",t.Zw="seeked",t.$w="seeking",t.iy="segmentnotfound",t.ey="sy",t.oy="uy",t.ly="vy",t.do="sourcechange",t._y="timeupdate",t.gy="volumechange",t.py="wy",t.yy="Ay",t.LICENSE_REQUEST_GENERATED="by",t.Sy="metricschange",t}({}),sh=["cenc"],uh=["cbcs","cbcs-1-9"],oh=function(t){function n(n){var i;return(i=t.call(this,eh.yy)||this).Ty=void 0,i.Ty=n,i}return Ct(n,t),n}(rh),hh=function(t){function n(n){var i;return(i=t.call(this,eh.LICENSE_REQUEST_GENERATED)||this).Ey=void 0,i.Ey=n,i}return Ct(n,t),n}(rh),ch=function(t){function n(n,i,r,e){var s;return(s=t.call(this,"Py")||this).xy=void 0,s.Iy=void 0,s.Py=void 0,s.Ry=void 0,s.xy=n,s.Iy=i,s.Py=r,s.Ry=e,s}return Ct(n,t),n}(rh),ah=function(t){function n(){return t.call(this,"lt")||this}return Ct(n,t),n}(rh),fh=function(t){return t.Dw="Cy",t.Dy="By",t}({}),vh=function(t){function n(n,i){var r;return(r=t.call(this,"Cy")||this).Jm=void 0,r.Ey=void 0,r.Jm=n,r.Ey=i,r}return Ct(n,t),n}(rh),dh=function(t){function n(){return t.call(this,"By")||this}return Ct(n,t),n}(rh);F(),Et(),Bt(),Ut(),F(),Et(),Ut(),F(),Et();var lh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),wh=/[\t\n\f\r ]/g;function gh(t){return 43===t?62:47===t?63:t>=48&&t<=57?t-48+52:t>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:_h()}function _h(){throw new y("Invalid base64 input")}function mh(t){var n=t;wh.test(n)&&(n=n.replace(wh,""));var i=n.length;i%4==0&&i>=1&&"="===n[i-1]&&(i>=2&&"="===n[i-2]?i-=2:i-=1,n=n.substr(0,i));var r=i%4;if(1===r)return _h();for(var e,s=0===r?0:4-r,u=new E(function(t,n){return 3*(t+n)/4-n}(i,s)),o=s>0?i-4:i,h=0,c=0;h>16&255,u[c++]=e>>8&255,u[c++]=255&e;return 2===s?(e=gh(n.charCodeAt(h))<<2|gh(n.charCodeAt(h+1))>>4,u[c++]=255&e):1===s&&(e=gh(n.charCodeAt(h))<<10|gh(n.charCodeAt(h+1))<<4|gh(n.charCodeAt(h+2))>>2,u[c++]=e>>8&255,u[c++]=255&e),u}function yh(t,n,i){return lh[t>>2]+lh[(3&t)<<4|n>>4]+lh[(15&n)<<2|i>>6]+lh[63&i]}function ph(t,n,i){for(var r=[],e=n;e>2]+lh[(3&u)<<4]+"==")}else if(2===i){var o=t[n-2],h=t[n-1];r.push(lh[o>>2]+lh[(3&o)<<4|h>>4]+lh[(15&h)<<2]+"=")}return r.join("")}function bh(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/[=]/g,"")}function Ah(t,n){var i=n.ac,r=t.getUint8(i>>3),e=1<<7-(7&i);return n.Ny(1),(r&e)===e?1:0}function Th(t,n,i){for(var r=0,e=0;e>16;return i&&(n-=16,t=i),(i=t>>8)&&(n-=8,t=i),(i=t>>4)&&(n-=4,t=i),(i=t>>2)&&(n-=2,t=i),(i=t>>1)?n-2:n-t};function Ih(t){if(t>=55296&&t<=57343)throw new y("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Rh(t,n){return t>>n&63|128}function Ch(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(Rh(t,12)),n.push(Rh(t,6))):(Ih(t),n.push(t>>12&15|224),n.push(Rh(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function Dh(t,n){if(n.ac>=t.length)throw new y("Invalid byte index");var i=255&t[n.ac];if(n.Ny(1),128==(192&i))return 63&i;throw new y("Invalid continuation byte")}function Ph(t,n){var i=n.ac;if(i>t.length)throw new y("Invalid byte index");if(i===t.length)return!1;var r=255&t[i];if(n.Ny(1),!(128&r))return r;if(192==(224&r)){var e=(31&r)<<6|Dh(t,n);if(e>=128)return e;throw new y("Invalid continuation byte")}if(224==(240&r)){var s=(15&r)<<12|Dh(t,n)<<6|Dh(t,n);if(s>=2048)return Ih(s),s;throw new y("Invalid continuation byte")}if(240==(248&r)){var u=(7&r)<<18|Dh(t,n)<<12|Dh(t,n)<<6|Dh(t,n);if(u>=65536&&u<=1114111)return u}throw new y("Invalid UTF-8 detected")}F(),Et(),F(),Et(),Ut();var Nh=[128,64,32,16,8,4,2,1],Bh=function(){function t(t){this.Fy=void 0,this.Fy=t}return t.prototype.Oy=function(t){return xh(this.Fy,t)},t}();function xh(t,n){return(t&n)===n}function Oh(t,n){return xh(t,Nh[n])}function Mh(t,n){var i=t.getUint8(n.ac);return n.Ny(1),i}function Lh(t,n,i){t.setUint8(n.ac,i),n.Ny(1)}function Uh(t,n,i){var r=wc(mc(t),n.ac,n.ac+i);return n.Ny(r.byteLength),r}function Fh(t,n,i){mc(t).set(mc(i),n.ac),n.Ny(i.byteLength)}function Vh(t,n,i){return n.ac+i<=t.byteLength}function Hh(t,n,i,r){return void 0===r&&(r=!1),r?function(t,n,i){for(var r=0,e=1,s=0;s=55296&&e<=56319&&i>8-this.Zy;return(r<0?1:0}},k.defineProperty(t.prototype,"bitLength",{get:function(){return this.Jy.bitLength-this.Zy},enumerable:!1,configurable:!0}),k.defineProperty(t.prototype,"length",{get:function(){return this.Jy.length},enumerable:!1,configurable:!0})}();F(),Et(),F(),Et();b.pow(2,-52);function Qc(t,n,i){return b.min(b.max(t,n),i)}function Yc(t,n){return t>>8-n}function Kc(t,n){return t&(1<7&&(this.tA++,this.iA=0)},t.prototype.seek=function(t,n){this.tA=t,this.iA=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new y("Cannot read past end of buffer.");return this.$y.get(this.tA)>>7-this.iA&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new y("Cannot read past end of buffer.");if(0===this.iA)return this.$y.get(this.tA++);var t=Kc(this.$y.get(this.tA),8-this.iA),n=Yc(this.$y.get(this.tA+1),this.iA);return this.tA++,t<32)throw new y("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new y("Cannot read past end of buffer.");var n=0;if(0===this.iA&&t%8==0)for(var i=t-8;i>=0;i-=8)n|=this.readByte()<=0;i--)n|=this.readBit()<32)throw new y("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new y("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<>3,this.iA=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new y("Cannot read past end of buffer.");for(var n=[],i=0;in?1:S(t)?S(n)?0:1:-1},$c=function(){function t(){this.eA=[],this.sA=[],this.nA=0}return t.from=function(){for(var n=[],i=0;i=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.sA[n];return this.eA[n][i]}},k.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.eA.length<1)return-1;if(this.eA.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.eA[0];return"number"==typeof t?jc(i,t):"undefined"!=typeof Buffer?Buffer.from(i.buffer,i.byteOffset,i.byteLength).indexOf(t):function(t,n){if(0===n.length)return 0;for(var i=n[0],r=n.length,e=t.length-r,s=0;s<=e&&!((s=jc(t,i,s))<0||s>e);s++){for(var u=s+1,o=s+r,h=1;u4)throw new y("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new y("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-n)+")");if(1===n)return this.get(t);for(var i=0,r=0;re)return new t;if(r===e)return new t;for(var s=new t,u=this.findContainingBufferIndex(r),o=this.eA[u],h=r,c=h-this.sA[u];h+o.length-c=0&&i>=0;){if(0!==r[e])break;if(0===e){if(0===i)return new t;i-=1,e=(r=this.eA[i]).length-1}else e-=1;n-=1}return this.slice(0,n+1)},t}(),ta=function(){function t(n){this.rA=n||t.BUFFER_CHUNK_SIZE,this.hA=!1,this.oA=new $c,this.$y=new E(this.rA),this.aA=0,this.uA=0,this.iA=7}return t.prototype.closeByte=function(){this.$y[this.aA++]=this.uA,this.aA>=this.rA&&this.closeBuffer(),this.uA=0,this.iA=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.aA&&(this.oA.pushRange(this.$y,0,this.aA),t&&(this.$y=new E(this.rA)),this.aA=0)},k.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.iA},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.hA)throw new y("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.hA=!0,this.oA},t.prototype.writeBit=function(t){if(this.hA)throw new y("Cannot write to a closed BitWriter.");this.uA|=t<32)throw new y("The max bitlength that can be provided is 32.");if(t>=b.pow(2,n))throw new y("Uint "+t+" cannot be represented in "+n+" bit(s).");if(this.isWritingStartBit&&n%8==0)for(var i=n-8;i>=0;i-=8)this.writeByte(t>>i&255);else for(i=n-1;i>=0;i--)this.writeBool((t&1<0)},t.prototype.writeInt=function(t,n){if(n>32)throw new y("The max bitlength that can be provided is 32.");if(b.abs(t)>=b.pow(2,n-1))throw new y("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+b.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new y("Received a negative number.");for(var n=b.floor(b.log2(t+1))+1,i=0;i=t.LARGE_SIZE/8,e=16===this.boxType.length;n.writeUInt(r?1:i,32),n.writeString(e?"uuid":this.boxType),r&&(n.writeUInt(b.floor(i/t.LARGE_SIZE),32),n.writeUInt(i%t.LARGE_SIZE,32)),e&&n.writeString(this.boxType)},t.prototype.getSize=function(){var n=8+(this.boxType.length>4?16:0),i=this.getBoxContentSize()+n;return i>=t.LARGE_SIZE/8&&(i+=8),i},t.prototype.serialize=function(){var t=new na;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=b.pow(2,32),t}();function ra(t,n){return V(t,ue)?64===n:t65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return fa(n)}(r)}(t,n,!0)}function ka(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new E(t.buffer,t.byteOffset+n,i-n)}function ba(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new DataView(t.buffer,t.byteOffset+n,i-n)}function Aa(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Ta(t){return new E(t.buffer,t.byteOffset,t.byteLength)}var Sa=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new ca(this.offset<<3)},t}();F(),Et();var Ea=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return da(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,n,i){void 0===i&&(i=!1);var r=t.getUint16(n.offset,i);return n.shift(2),r}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,n,i){void 0===i&&(i=!1);var r=t.getInt16(n.offset,i);return n.shift(2),r}(this.data,this.cursor)},t.prototype.nextUint32=function(){return ga(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,n,i){void 0===i&&(i=!1);var r=t.getInt32(n.offset,i);return n.shift(4),r}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,n,i){void 0===i&&(i=!1);var r=ga(t,n,i),e=ga(t,n,i),s=i?e:r,u=i?r:e;return ue.fromBits(u,s,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return _a(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return la(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,n,i){for(var r=[],e=0;et.byteLength){var o=u;return n.seek(i),{complete:!1,neededOffset:o}}var h={type:e.type,offset:i,data:new Ea(ba(t,i,u),new Sa(e.headerSize))};return n.seek(u),{complete:!0,box:h}}function Da(t){return{version:t>>24,flags:new va(16777215&t)}}function Pa(t,n){var i,r,e,s;return 1===n?(i=t.nextUint64(),r=t.nextUint64(),e=t.nextUint32(),s=t.nextUint64()):(i=t.nextUint32(),r=t.nextUint32(),e=t.nextUint32(),s=t.nextUint32()),{creation:i,modification:r,scale:e,duration:s}}function Na(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function Ba(t){var n=t.nextUint32Array(9);return{a:ua(n[0],16),b:ua(n[1],16),u:ua(n[2],30),c:ua(n[3],16),d:ua(n[4],16),v:ua(n[5],30),x:ua(n[6],16),y:ua(n[7],16),w:ua(n[8],30)}}function xa(t){return new ha(t.type,ka(Ta(t.data.data),t.data.cursor.offset))}var Oa=function(t){function n(n,i,r,e){void 0===r&&(r=0),void 0===e&&(e=0);var s=t.call(this,"hdlr",r,e)||this;return s.name=i,s.handlerType=n,s}return Gc(n,t),k.defineProperty(n.prototype,"handlerType",{get:function(){return this.dA},set:function(t){this.dA=t},enumerable:!1,configurable:!0}),n.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(i=null===(n=this.name)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeString(this.handlerType),this.serializeReserved(n),this.name&&n.writer.writeString(this.name),n.writer.writeByte(0)},n}(oa);function Ma(t){var n=t.data,i=Da(n.nextUint32()),r=i.version,e=i.flags;n.skip(4);var s=n.nextChars(4);n.skip(12);var u=n.nextUTF8String();return new Oa(s,u,r,e.raw)}!function(t){function n(){return t.call(this,"mdir")||this}Gc(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(Oa);F(),Et(),F(),Et(),F(),Et();var La=function(){function t(t,n){void 0===n&&(n=!1),this.fixed28BitMode=n,this.tag=t}return t.prototype.encodeSize=function(t){for(var n=[];t>0;)n.length>0&&(n[n.length-1]+=128),n.push(t%128),t>>=7;if(this.fixed28BitMode)for(;n.length<4;)n.push(128);return n.reverse()},k.defineProperty(t.prototype,"tag",{get:function(){return this.lA},set:function(t){if(!ra(t,8))throw new y("Provided tag does not fit in 8 bits.");this.lA=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return this.getDescriptorSize()+1+this.encodeSize(this.getDescriptorSize()).length},t.prototype.serialize=function(t){t.writer.writeByte(this.tag);for(var n=0,i=this.encodeSize(this.getDescriptorSize());n0)throw new y("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeByte(this.defaultSampleInfoSize),n.writer.writeUInt(this.sampleInfoSizes.length,32);for(var i=0,r=this.sampleInfoSizes;i1)throw new y("Provided balance does not fit in the allowed range [-1, 1].");if(!ra(ea(t,8),16))throw new y("Provided balance does not fit in 16 bits (fixed 8.8).");this.Ob=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(ea(this.balance,8),16),n.writer.writeUInt(0,16)}}(oa);F(),Et();!function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}Gc(n,t),k.defineProperty(n.prototype,"entries",{get:function(){return this.EA},set:function(t){if(!ra(t.length,32))throw new y("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!ra(t,32)}))throw new y("Not all entries can be represented in 32 bits.");this.EA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,r=this.entries;i31)throw new y("The provided compressorName should at most be 31 characters long.");this.Hb=t},enumerable:!1,configurable:!0}),k.defineProperty(n.prototype,"frameCount",{get:function(){return this.Wb},set:function(t){if(!ra(t,16))throw new y("Provided frameCount does not fit in 16 bits.");this.Wb=t},enumerable:!1,configurable:!0}),k.defineProperty(n.prototype,"depth",{get:function(){return this.qb},set:function(t){if(!ra(t,16))throw new y("Provided depth does not fit in 16 bits.");this.qb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i,r,e,s,u;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(i=null===(n=this.clap)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)+(null!==(e=null===(r=this.pasp)||void 0===r?void 0:r.getSize())&&void 0!==e?e:0)+(null!==(u=null===(s=this.extra)||void 0===s?void 0:s.length)&&void 0!==u?u:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.width,16),n.writer.writeUInt(this.height,16),n.writer.writeUInt(ea(this.horizontalResolution,16),32),n.writer.writeUInt(ea(this.verticalResolution,16),32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.frameCount,16),n.writer.writeByte(this.compressorName.length),n.writer.writeString(this.compressorName);for(var i=0;i<31-this.compressorName.length;i++)n.writer.writeByte(0);n.writer.writeUInt(this.depth,16),n.writer.writeInt(-1,16),this.clap&&n.concat(this.clap.serialize()),this.pasp&&n.concat(this.pasp.serialize()),this.extra&&sa(n.writer,this.extra)},n}(Ha);F(),Et(),F(),Et(),H();!function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}Gc(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(V(this.esDescriptor,E)?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),V(this.esDescriptor,E)?n.concat($c.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(oa);F(),Et();!function(t){function n(n,i,r){var e=t.call(this,"mp4a",n,r)||this;return e.esd=i,e}Gc(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.esd.serialize())}}(Wa);F(),Et();!function(t){function n(n,i,r,e){void 0===e&&(e={});var s=t.call(this,"mp4v",n,i,e)||this;return s.esDescriptor=r,s}Gc(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(av);F(),Et();!function(t){function n(n,i){var r=t.call(this,"mp4s",n)||this;return r.esDescriptor=i,r}Gc(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(Ha);F(),Et(),F(),Et();!function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}Gc(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(ia);F(),Et();!function(){function t(t,n,i,r,e,s){void 0===s&&(s=1),this.lengthSizeMinusOne=i,this.version=s,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=n,this.spsSets=r,this.ppsSets=e}k.defineProperty(t.prototype,"version",{get:function(){return this.zb},set:function(t){if(!ra(t,8))throw new y("Provided version does not fit in 8 bits.");this.zb=t},enumerable:!1,configurable:!0}),k.defineProperty(t.prototype,"profileIndication",{get:function(){return this.Gb},set:function(t){if(!ra(t,8))throw new y("Provided profileIndication does not fit in 8 bits.");this.Gb=t},enumerable:!1,configurable:!0}),k.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.Xb},set:function(t){if(!ra(t,8))throw new y("Provided profileCompatibility does not fit in 8 bits.");this.Xb=t},enumerable:!1,configurable:!0}),k.defineProperty(t.prototype,"levelIndication",{get:function(){return this.jb},set:function(t){if(!ra(t,8))throw new y("Provided levelIndication does not fit in 8 bits.");this.jb=t},enumerable:!1,configurable:!0}),k.defineProperty(t.prototype,"spsSets",{get:function(){return this.Qb},set:function(t){if(!ra(t.length,5))throw new y("Provided number of spsSets exceeds the max (32)");this.Qb=t},enumerable:!1,configurable:!0}),k.defineProperty(t.prototype,"ppsSets",{get:function(){return this.Kb},set:function(t){if(!ra(t.length,8))throw new y("Provided number of ppsSets exceeds the max (256)");this.Kb=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce(function(t,n){return t+n.length},0)+2*this.ppsSets.length+this.ppsSets.reduce(function(t,n){return t+n.length},0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var n=0,i=this.spsSets;n0&&(null!==(e=null===(r=i.constantIv)||void 0===r?void 0:r.length)&&void 0!==e?e:0)>0)throw new y("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return o.kId=i.kId,o.isProtected=null!==(s=i.isProtected)&&void 0!==s?s:1,i.perSampleIvSize>0?o.perSampleIvSize=i.perSampleIvSize:o.constantIv=null!==(u=i.constantIv)&&void 0!==u?u:new E(0),o}return Gc(n,t),k.defineProperty(n.prototype,"isProtected",{get:function(){return this.Zb},set:function(t){if(!ra(t,8))throw new y("Provided isProtected does not fit in 1 byte.");this.Zb=t},enumerable:!1,configurable:!0}),k.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.$b},set:function(t){if(![8,16].includes(t))throw new y("Provided perSampleIvSize does not match any allowed value [8, 16].");this.$b=t,this.tS=new E(0)},enumerable:!1,configurable:!0}),k.defineProperty(n.prototype,"kId",{get:function(){return this.iS},set:function(t){if(16!==t.length)throw new y("Provided kId length is not 16.");this.iS=t},enumerable:!1,configurable:!0}),k.defineProperty(n.prototype,"constantIv",{get:function(){return this.tS},set:function(t){if(![8,16].includes(t.length))throw new y("Provided constant IV length does not match any allowed value [8, 16].");this.tS=t,this.$b=0},enumerable:!1,configurable:!0}),n.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeOwnContent(n)},n.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),sa(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),sa(t.writer,this.constantIv))},n}(oa),vv=(function(t){function n(n){return t.call(this,0,n)||this}Gc(n,t)}(fv),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return Gc(n,t),k.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.eS},set:function(t){if(!ra(t,4))throw new y("Provided cryptByteBlocks does not fit in 4 bits.");this.eS=t},enumerable:!1,configurable:!0}),k.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.sS},set:function(t){if(!ra(t,4))throw new y("Provided skipByteBlocks does not fit in 4 bits.");this.sS=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(fv));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new vv(n),i}Gc(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(_f);function dv(t){return void 0!==t.iv}function lv(t){return void 0!==t.subsamples}F(),Et();!function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}Gc(n,t),k.defineProperty(n.prototype,"samples",{get:function(){return this.wb},set:function(t){var n;if(!ra(t.length,32))throw new y("The number of samples provided does not fit in 32 bits.");for(var i=0,r=t;i0&&(r.cS.Gy(),r.So(new oh(r.cS))),r.uS.removeEventListener("keystatuseschange",r.wS),r.uS.removeEventListener("message",r.yS)},r.uS.addEventListener("keystatuseschange",r.wS),r.uS.addEventListener("message",r.yS),r.cS=new Fc;var e=[];return r.uS.closed&&e.push(ut.resolve(r.uS.closed)),r.fS=new Vc,e.push(r.fS.Qy),r.zd=ut.race(e).then(r.bS,r.bS),r.gS(),r}Ct(n,t);var i=n.prototype;return i.Xs=function(){if(this.lS)return this.zd;var t=[];return t.push(ut.resolve(this.uS.close())),t.push(Ar(1e3)),this.fS.$g(ut.race(t).catch(Av)),this.lS=!0,this.zd},i.vS=function(t,n,i){if(On.e_){var r=pv(pc(n));if(1===r.version)n=new yf(r.systemId,r.data).serialize().join()}return ut.resolve(this.uS.generateRequest(t,n)).catch(Av)},i.Un=function(t){return ut.resolve(this.uS.load(t)).catch(Av)},i._S=function(){return ut.resolve(this.uS.remove()).catch(Av)},i.er=function(t){return ut.resolve(this.uS.update(t)).catch(Av)},i.gS=function(){var t=this;this.cS.Gy(),this.uS.keyStatuses.forEach(function(n,i){t.pS(i,n)}),this.So(new oh(this.cS))},i.pS=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var r=pc(t);if(this.mS===vo&&16===r.byteLength&&(On.v_||On.dg)){var e=_c(r),s=e.getUint32(0,!0),u=e.getUint16(4,!0),o=e.getUint16(6,!0);e.setUint32(0,s,!1),e.setUint16(4,u,!1),e.setUint16(6,o,!1)}this.mS===vo&&"status-pending"===n&&(n="usable"),this.cS.qy(r,n)},Nt(n,[{key:"oS",get:function(){return this.zd}},{key:"aS",get:function(){return this.uS.expiration}},{key:"Ty",get:function(){return this.cS}},{key:"dS",get:function(){return this.uS.sessionId}}]),n}(th);function Av(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|A(i[1],16))}throw new Xc(t.message,void 0,n,t)}var Tv=function(){function t(t,n,i){this.TS=void 0,this.kS=void 0,this.Cd=void 0,this.TS=t,this.kS=n,this.Cd=i}var n=t.prototype;return n.SS=function(t){return Vt(function(){return zt(this,function(n){return[2,new bv(this.TS.createSession(t),this.kS)]})}).call(this)},n.ES=function(t){return ut.resolve(this.TS.setServerCertificate(t))},n._n=function(t){return ut.resolve(t.setMediaKeys(this.TS))},n.PS=function(t){return ut.resolve(t.setMediaKeys(null))},n.hr=function(){return ut.resolve()},t}(),Sv=function(){function t(t,n,i){this.xS=void 0,this.mS=void 0,this.RS=void 0,this.xS=t,this.mS=n,this.RS=i}var n=t.prototype;return n.IS=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return[4,this.xS.createMediaKeys()];case 1:return t=n.sent(),[2,new Tv(t,this.mS,this.RS)]}})}).call(this)},n.CS=function(){return this.RS},Nt(t,[{key:"kS",get:function(){return this.xS.keySystem}}]),t}();F(),Et(),Ut(),F(),Et(),Ut();var Ev="video/avc",Iv="video/hevc",Rv="video/mp4",Cv="video/mpeg",Dv="video/mpeg2",Pv="video/webm",Nv="video/x-unknown",Bv="audio/mp4",xv="audio/webm",Ov="image/jpeg",Mv="application/ttml+xml",Lv="application/mp4",Uv="text/vtt";function Fv(t){return Uo(t,"audio/")}function Vv(t){return Uo(t,"video/")}function Hv(t){return Lo(t,Lv)||Lo(t,Rv)||Lo(t,Bv)}function Wv(t){return Lo(t,Pv)||Lo(t,xv)}var zv=function(){function t(t,n){this.Km=void 0,this.NS=void 0,this.Km=t,this.NS=n}return t.prototype.DS=function(t){for(var n,i=Lt(this.NS);!(n=i()).done;){var r=n.value,e=r[0],s=r[1];if(e.toLowerCase()===t.toLowerCase())return s}},t}();function Xv(t){var n=t.trim(),i=n.indexOf(";");if(i<0)return new zv(n,[]);for(var r=n.substr(0,i).trim(),e=n.substr(i+1).trim(),s=[],u=0,o=!1,h=0;h=1?t.msSetMediaKeys(this.zS):t.addEventListener("loadedmetadata",i),ut.resolve()},n.PS=function(t){return ut.resolve()},n.hr=function(){return ut.resolve()},t}(),ed=function(){function t(t,n){this.mS=void 0,this.YS=void 0,this.mS=t,this.YS=n}var n=t.prototype;return n.CS=function(){return this.YS},n.IS=function(){var t=new f.MSMediaKeys(this.mS);return ut.resolve(new rd(t,this.mS,this.YS))},Nt(t,[{key:"kS",get:function(){return this.mS}}]),t}(),sd=function(){function t(){}return t.prototype.nw=function(t,n){try{return ut.resolve(function(t,n){if(!ud())throw new p("Unsupported key system "+t);for(var i,r=Lt(n);!(i=r()).done;){var e=i.value,s=Qv(od,sh,t,e);if(s)return new ed(t,s)}throw new p("Unsupported key system configuration for "+t)}(t,n))}catch(t){return ut.reject(t)}},t.LS=function(){return ud()},t}();function ud(){return void 0!==f.MSMediaKeys&&"function"==typeof f.MSMediaKeys.isTypeSupported}function od(t,n){return f.MSMediaKeys.isTypeSupported(t,n)}F(),Et(),Ut(),F(),Et(),Bt(),F(),Et(),Wt(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Qt();var hd=function(t){function n(n,i,r){var e;return(e=t.call(this)||this).tT=void 0,e.GS=void 0,e.$S=void 0,e.US=void 0,e.eT=void 0,e.VS=void 0,e.JS=void 0,e.iT=void 0,e.Ts=void 0,e.XS=void 0,e.jS=void 0,e.tT=n,e.GS=i,e.$S=r,e.US=new Vc,e.eT=void 0,e.VS=new Fc,e.JS=void 0,e.iT=new Vc,e.Ts=function(){var t=e.JS&&e.JS.error;if(t){var n=new Xc("Unknown CDM error",t.code,t.systemCode);e.eT?(e.eT.jy(n),e.eT=void 0):n.Ky===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?e.QS("output-not-allowed"):e.QS("internal-error"),e.So(new ah)}},e.XS=function(t){e.So(new ch(e,"license-request",bc(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},e.jS=function(){e.eT&&(e.eT.Xy(void 0),e.eT=void 0),e.QS("usable")},e}Ct(n,t);var i=n.prototype;return i.vS=function(t,n,i){var r=i&&i.fairplay&&i.fairplay.ZS;if(!r)throw new p("Expected FairPlay contentId to be defined but was "+r+".");var e=function(t,n,i){var r=vc(t),e=2*r.length,s=2*n.length,u=new ArrayBuffer(4+e+4+s+4+i.byteLength),o=new DataView(u),h=new Tc;return Gh(o,h,e,!0),sc(o,h,r,!0),Gh(o,h,s,!0),sc(o,h,n,!0),Gh(o,h,i.byteLength,!0),Fh(o,h,i),new E(u)}(pc(n),r,this.$S);return this.JS=this.tT.createSession(this.GS,e),this.JS.addEventListener("webkitkeymessage",this.XS,!1),this.JS.addEventListener("webkitkeyadded",this.jS,!1),this.JS.addEventListener("webkitkeyerror",this.Ts,!1),this.QS("status-pending"),this.iT.Xy(this.JS),this.iT=new Vc,ut.resolve()},i.Un=function(t){return ut.resolve(!0)},i.er=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:if(0===(n=pc(t)).byteLength)throw new p("Cannot call update with an empty response.");return this.eT=new Vc,(i=this.JS)?[3,2]:[4,this.iT.Qy];case 1:i=r.sent(),r.label=2;case 2:return i.update(n),[4,this.eT.Qy];case 3:return r.sent(),[2]}})}).call(this)},i.Xs=function(){var t,n=this.JS;return n&&(n.removeEventListener("webkitkeymessage",this.XS,!1),n.removeEventListener("webkitkeyadded",this.jS,!1),n.removeEventListener("webkitkeyerror",this.Ts,!1),n.close()),this.iT.Zg(),null==(t=this.eT)||t.Zg(),this.US.Xy(void 0),this.US.Qy},i._S=function(){return ut.resolve(void 0)},i.QS=function(t){this.VS.Gy(),this.VS.qy(Uc,t),this.So(new oh(this.VS))},Nt(n,[{key:"dS",get:function(){return this.JS?this.JS.sessionId:""}},{key:"aS",get:function(){return NaN}},{key:"oS",get:function(){return this.US.Qy}},{key:"Ty",get:function(){return this.VS}}]),n}(th);F(),Et(),Bt(),Dt(),H(),F(),Et();var cd=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.PICTURE_IN_PICTURE_ERROR=11001]="PICTURE_IN_PICTURE_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),ad=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(n){var i=b.floor(n/1e3);if(i in t)return i;throw new p("Invalid error code: "+n)}}(ad||(ad={}));var fd=function(t){function n(n,i,r){var e;return(e=t.call(this,i,r)||this).code=void 0,e.code=n,e}return Ct(n,t),Nt(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return ad.fromCode(this.code)}}]),n}(ar);function vd(t,n){return V(t,fd)?t:V(t,y)?new fd(n,t.message,t):new fd(n,String(t))}var dd=function(){function t(t,n,i){this.tT=void 0,this.kS=void 0,this.Cd=void 0,this.GS=void 0,this.$S=void 0,this.tT=t,this.kS=n,this.Cd=i,this.$S=void 0;var r=Kv(i)||"video/mp4";this.GS=Gv(r)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.tT},n.SS=function(t){return Vt(function(){return zt(this,function(t){if(!this.$S)throw new fd(cd.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new hd(this.tT,this.GS,this.$S)]})}).call(this)},n.ES=function(t){return this.$S=pc(t),ut.resolve(!0)},n._n=function(t){return t.webkitSetMediaKeys(this.tT),ut.resolve()},n.PS=function(t){return t.webkitSetMediaKeys(null),ut.resolve()},n.hr=function(){return ut.resolve()},t}(),ld=function(){function t(t,n){this.mS=void 0,this.YS=void 0,this.mS=t,this.YS=n}var n=t.prototype;return n.CS=function(){return this.YS},n.IS=function(){var t=new f.WebKitMediaKeys(this.mS);return ut.resolve(new dd(t,this.mS,this.YS))},Nt(t,[{key:"kS",get:function(){return this.mS}}]),t}(),wd=function(){function t(){}return t.prototype.nw=function(t,n){try{return ut.resolve(function(t,n){if(t!==To)throw new p(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!gd())throw new p("Unsupported key system "+t);for(var i,r=Lt(n);!(i=r()).done;){var e=i.value,s=Qv(_d,uh,t,e);if(s)return new ld(t,s)}throw new p("Unsupported key system configuration for "+t)}(t,n))}catch(t){return ut.reject(t)}},t.LS=function(){return gd()},t}();function gd(){return void 0!==f.WebKitMediaKeys&&"function"==typeof f.WebKitMediaKeys.isTypeSupported}function _d(t,n){return f.WebKitMediaKeys.isTypeSupported(t,n)}F(),Et(),Wt(),Ut(),Qt();var md=function(){function t(t){this.sT=void 0,this.sT=t}return t.prototype.nw=function(t,n){return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:i=Lt(this.sT),s.label=1;case 1:if((r=i()).done)return[3,6];e=r.value,s.label=2;case 2:return s.trys.push([2,4,,5]),[4,e.nw(t,n)];case 3:return[2,s.sent()];case 4:return s.sent(),[3,5];case 5:return[3,1];case 6:throw new p("Unsupported key system configuration for "+t)}})}).call(this)},t}();F(),Et(),Ut(),F(),Et(),F(),Et(),Wt(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et();var yd=function(){function t(t){var n=this;this.rT=[],this.hT=void 0,this.nT=new hr,this.uT=void 0,this.oT=function(){return 0===n.rT.length?n.uT?pd(n.uT,n.nT.Yg).then(n.cT,n.cT):n.cT():n.rT.shift()().then(n.oT)},this.cT=function(){if(0!==n.rT.length)return n.oT();n.hT=void 0},this.uT=t}var n=t.prototype;return n.Zo=function(t,n){var i=this;return new ut(function(r){var e=hr.ep([i.nT.Yg,n]),s=function(){e.zg()};i.rT.push(function(){var n=pd(t,e.Yg);return r(n),n.then(s,s)}),i.hT||(i.hT=i.oT())})},n.Zg=function(){return this.aT(!0)},n.kn=function(){return this.uT=void 0,this.aT(!1)},n.aT=function(t){var n=this.hT;return this.nT.Zg(),t&&(this.nT=new hr),ut.resolve(n)},t}();function pd(t,n){return new ut(function(i){return i(t(n))})}var kd=new yd,bd=function(t){function n(n){var i;return(i=t.call(this)||this).mS=void 0,i.WS=void 0,i.eT=void 0,i.US=void 0,i.hA=void 0,i.wT=void 0,i.mT=void 0,i.pT=void 0,i._T=void 0,i.gT=void 0,i.mS=n,i.WS=void 0,i.eT=void 0,i.hA=!1,i.wT=void 0,i._T=void 0,i.US=new Vc,i.mT="",i.gT=new Vc,i.pT=new Fc,i}Ct(n,t);var i=n.prototype;return i.dT=function(){this.eT&&(this.QS("usable"),this.eT.Xy(void 0),this.eT=void 0)},i.lT=function(t){var n=new Xc("Unknown CDM error",t.errorCode,t.systemCode);this.eT?(this.eT.jy(n),this.eT=void 0):this.WS?(this.WS.jy(n),this.WS=void 0):n.Ky===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.QS("output-restricted"):1===n.Yy?this.QS("expired"):this.QS("internal-error")},i.fT=function(t){0!==t.message.byteLength?(this.WS&&(this.WS.Xy(void 0),this.WS=void 0),this.So(new ch(this,"license-request",Wc(this.mS,bc(t.message).buffer),t.defaultURL||void 0))):this.WS&&(this.WS.jy("Empty key message"),this.WS=void 0)},i.vT=function(t){this._T||(this._T=t,this.gT.Xy(t))},i.Xs=function(){return Vt(function(){return zt(this,function(t){return this.throwIfClosed(),this.eT&&(this.eT.jy(void 0),this.eT=void 0),this.hA=!0,this.US.Xy(void 0),[2]})}).call(this)},i.vS=function(t,n){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.throwIfClosed(),this.WS=new Vc,this.wT=pc(n),(t=this._T)?[3,2]:[4,this.gT.Qy];case 1:t=i.sent(),i.label=2;case 2:return t.webkitGenerateKeyRequest(this.mS,this.wT),[4,this.WS.Qy];case 3:return i.sent(),[2]}})}).call(this)},i.Un=function(t){return Vt(function(){return zt(this,function(t){return this.throwIfClosed(),[2,!1]})}).call(this)},i._S=function(){return Vt(function(){return zt(this,function(t){return this.throwIfClosed(),[2]})}).call(this)},i.er=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return n=this,this.throwIfClosed(),this.eT=new Vc,On.S_||On.w_?[2,kd.Zo(function(){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.doUpdate(t)];case 1:return n.sent(),[2]}})}).call(n)})]:[4,this.doUpdate(t)];case 1:return i.sent(),[2]}})}).call(this)},i.doUpdate=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return void 0===this.eT?[2]:(n=this._T)?[3,2]:[4,this.gT.Qy];case 1:n=i.sent(),i.label=2;case 2:return n.webkitAddKey(this.mS,pc(t),this.wT,this.dS),[4,this.eT.Qy];case 3:return i.sent(),On.w_?[4,Ar(500)]:[3,5];case 4:i.sent(),i.label=5;case 5:return[2]}})}).call(this)},i.throwIfClosed=function(){if(this.hA)throw new p("Already closing or closed.")},i.QS=function(t){this.pT.Gy(),this.pT.qy(Uc,t),this.So(new oh(this.pT))},i.yT=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:return(n=this._T)?[3,2]:[4,this.gT.Qy];case 1:n=i.sent(),i.label=2;case 2:if(!(t=n).webkitCancelKeyRequest)return[3,7];i.label=3;case 3:return i.trys.push([3,4,5,7]),t.webkitCancelKeyRequest(this.mS,this.mT),[3,7];case 4:return i.sent(),[3,7];case 5:return[4,Ar(500)];case 6:return i.sent(),[7];case 7:return[2]}})}).call(this)},Nt(n,[{key:"Ty",get:function(){return this.pT}},{key:"dS",get:function(){return this.mT},set:function(t){this.mT=t}},{key:"oS",get:function(){return this.US.Qy}},{key:"aS",get:function(){return NaN}}]),n}(th),Ad=function(){function t(t,n){var i=this;this.kS=void 0,this.Cd=void 0,this._T=void 0,this.ST=void 0,this.TT=void 0,this.jS=void 0,this.AT=void 0,this.bT=void 0,this.kS=t,this.Cd=n,this._T=void 0,this.ST=Ju(),this.TT=[],this.jS=function(t){var n=i.kT(t.sessionId);n&&n.dT()},this.AT=function(t){var n=i.kT(t.sessionId);n&&n.lT(t)},this.bT=function(t){var n=i.kT(t.sessionId);n&&n.fT(t)}}var n=t.prototype;return n._n=function(t){return this._T=t,this._T.addEventListener("webkitkeyadded",this.jS),this._T.addEventListener("webkitkeyerror",this.AT),this._T.addEventListener("webkitkeymessage",this.bT),this.ST.forEach(function(n,i){return n.vT(t)}),this.TT.forEach(function(n){return n.vT(t)}),ut.resolve()},n.PS=function(t){return t.removeEventListener("webkitkeyadded",this.jS),t.removeEventListener("webkitkeyerror",this.AT),t.removeEventListener("webkitkeymessage",this.bT),this._T=void 0,ut.resolve()},n.hr=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:t=this.ST.entries(),n=t.next(),i.label=1;case 1:return n.done?[3,3]:[4,n.value[1].yT()];case 2:return i.sent(),n=t.next(),[3,1];case 3:return this.ST.clear(),[2]}})}).call(this)},n.SS=function(t,n,i){return Vt(function(){var t;return zt(this,function(n){return t=new bd(this.kS),this._T&&t.vT(this._T),this.TT.push(t),[2,t]})}).call(this)},n.ES=function(t){return ut.resolve(!1)},n.kT=function(t){if(t){var n=this.ST.get(t);return n||((n=this.TT.shift())?(n.dS=t,this.ST.set(t,n),n):void 0)}},t}(),Td=function(){function t(t,n){this.kS=void 0,this.ET=void 0,this.kS=t,this.ET=n}var n=t.prototype;return n.IS=function(){return ut.resolve(new Ad(this.kS,this.ET))},n.CS=function(){return this.ET},t}(),Sd=function(){function t(){}return t.prototype.nw=function(t,n){try{return ut.resolve(function(t,n){if(!Sd.LS())throw new p("Unsupported key system "+t);for(var i,r=Lt(n);!(i=r()).done;){var e=i.value,s=Qv(Ed,sh,t,e);if(s)return new Td(t,s)}throw new p("Unsupported key system configuration for "+t)}(t,n))}catch(t){return ut.reject(t)}},t.LS=function(){return Jo()},t}();function Ed(t,n){var i=Rr();return Boolean(i&&i.canPlayType&&""!==i.canPlayType(n,t))}F(),Et();var Id,Rd=function(){function t(){}return t.prototype.nw=function(t,n){return t===go||t===vo?ut.resolve(void 0):ut.reject(new y("DRM configuration not supported"))},t}();function Cd(){return Id||(Id=function(){var t=[];wd.LS()&&t.push(new wd);nd.LS()&&t.push(new nd);sd.LS()&&t.push(new sd);Sd.LS()&&t.push(new Sd);On.k_&&t.push(new Rd);return new md(t)}()),Id}F(),Et(),Dt(),F(),Et();var Dd=function(){function t(){this.PT=Ju()}var n=t.prototype;return n.Gy=function(t){this.PT.delete(t)},n.xT=function(){this.PT.clear()},n.Wy=function(t){return this.PT.get(t)},n.qy=function(t,n){this.PT.set(t,n)},t}(),Pd=function(){function t(){}return t.IT=function(){return t.Ng||(t.Ng=Nd.LS()?new Nd:new Dd),t.Ng},t.Gy=function(n){t.IT().Gy(n)},t.xT=function(){t.IT().xT()},t.Wy=function(n){return t.IT().Wy(n)},t.qy=function(n,i){t.IT().qy(n,i)},t}();Pd.Ng=void 0;var Nd=function(t){function n(){return t.apply(this,arguments)||this}Ct(n,t);var i=n.prototype;return i.Gy=function(t){self.sessionStorage.removeItem(t)},i.xT=function(){self.sessionStorage.clear()},i.Wy=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.qy=function(t,n){self.sessionStorage.setItem(t,n)},n.LS=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(Pd);F(),Et(),F(),Et(),Ut();var Bd=function(){var t=self.Blob;if(t)try{new t;return function(t){return function(n,i){return new t(n,i)}}(t)}catch(t){}var n=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(n)return function(t){return function(n,i){var r=new t;if(n)for(var e,s=Lt(n);!(e=s()).done;){var u=e.value;r.append(u)}return r.getBlob(i&&i.type||"")}}(n)}();function xd(t,n,i){var r=Bd([n],{type:"application/octet-stream"}),e=URL.createObjectURL(r),s=function(t,n){var i=t,r=i.indexOf("?");if(r>=0&&(i=i.substr(0,r)),i=i.substr(i.lastIndexOf("/")+1),n){var e=i.indexOf(".");e<0&&(e=i.length),i=i.substr(0,e)+n+i.substr(e)}return i}(t,i),u=v.createElement("a");u.href=e,u.download=s,v.body.appendChild(u),u.click(),v.body.removeChild(u),URL.revokeObjectURL(e)}F(),Et();var Od="default";F(),Et(),Bt(),F(),Et(),F(),Et(),Dt(),F(),Et();var Md=function(t){return t.CT="arraybuffer",t.DT="json",t.BT="stream",t.NT="text",t}({});F(),Et(),H();var Ld=function(){function t(n){var i=this;this.Wm=void 0,this.Wm={},V(n,t)?n.asList().forEach(function(t){var n=t[0],r=t[1];i.append(n,r)}):Array.isArray(n)?n.forEach(function(t){var n=t[0],r=t[1];i.append(n,r)}):n&&k.getOwnPropertyNames(n).forEach(function(t){i.append(t,n[t])})}var n=t.prototype;return n.append=function(t,n){var i=t,r=n;i=Ud(i),r=Fd(r);var e=i.toLowerCase();if(this.Wm.hasOwnProperty(e)){var s=this.Wm[e],u=s[1];s[1]=u?u+", "+r:r}else this.Wm[e]=[i,r]},n.delete=function(t){var n=Ud(t).toLowerCase();delete this.Wm[n]},n.get=function(t){var n=Ud(t).toLowerCase();return this.Wm.hasOwnProperty(n)?this.Wm[n][1]:null},n.has=function(t){var n=Ud(t).toLowerCase();return this.Wm.hasOwnProperty(n)},n.set=function(t,n){var i=t,r=(i=Ud(i)).toLowerCase();this.Wm[r]=[i,Fd(n)]},n.forEach=function(t,n){for(var i in this.Wm)this.Wm.hasOwnProperty(i)&&t.call(n,this.Wm[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.Wm)if(this.Wm.hasOwnProperty(n)){var i=this.Wm[n],r=i[0],e=i[1];t.push([r,e])}return t},n.MT=function(){var t={};return this.forEach(function(n,i){t[i]=n}),t},n.LT=function(t){var n=this;t.forEach(function(t,i){n.append(i,t)})},n.OT=function(t){var n=this;t.forEach(function(t,i){n.set(i,t)})},t}();function Ud(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new p("Invalid character in header field name");return n}function Fd(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}F(),Et(),Bt(),Dt(),F(),Et(),Bt(),Dt(),H(),F(),Et(),Ut();var Vd=U(Kt());F(),Et(),Bt(),Dt();var Hd=function(t){function n(n){var i;return(i=t.call(this,""+n.join("\n"),n[0])||this).causes=void 0,i.causes=n,i}return Ct(n,t),Nt(n,[{key:"name",get:function(){return"AggregateError"}}]),n}(ar),Wd=t,zd=Jn(Wd.ReadableStream)&&Jn(Wd.WritableStream)&&Jn(Wd.TransformStream)&&Kn(Wd.ReadableStream.prototype.pipeThrough)&&!Te.Pp,Xd=zd?Wd.ReadableStream:Vd.ReadableStream,qd=(zd?Wd.WritableStream:Vd.WritableStream,zd?Wd.TransformStream:Vd.TransformStream),Gd=(zd&&Wd.ByteLengthQueuingStrategy?Wd.ByteLengthQueuingStrategy:Vd.ByteLengthQueuingStrategy,zd&&Wd.CountQueuingStrategy?Wd.CountQueuingStrategy:Vd.CountQueuingStrategy);function jd(t){return function(t){return new Xd({start:function(n){for(var i,r=Lt(t);!(i=r()).done;){var e=i.value;n.enqueue(e)}n.close()}})}([t])}function Qd(t){return jd(function(t){return new E(t)}(t))}function Yd(t,n){return function(t,n){var i=n,r=t.getReader(),e=new Vc,s=function(){u();var t=new fr;r.cancel(t).catch(di),e.jy(t)},u=function(){i&&(i.jg(s),i=void 0)};i&&(i.Hg?s():i.Xg(s));var o=[],h=function(t){return t.done?(u(),ut.resolve(o)):(o.push(t.value),ut.resolve(r.read()).then(h))};return ut.resolve(r.read()).then(h).then(function(t){u(),e.Xy(t)},function(t){u(),e.jy(t)}),e.Qy}(t,n).then(function(t){return Nc(t).buffer})}function Kd(t,n){var i=n,r=new qd,e=r.readable,s=r.writable,u=s.getWriter(),o=function(){i&&i.Zg()};return u.closed.then(o,o),t.then(function(t){return i=void 0,u.releaseLock(),t.pipeTo(s).catch(di)},function(t){return i=void 0,u.releaseLock(),s.abort(t).catch(di)}),e}function Jd(t){var n=new qd,i=n.readable,r=n.writable;return t.pipeTo(r,{preventCancel:!0}).catch(function(n){var i;i=Hn(n)?n[0]===n[1]||vr(n[0])&&vr(n[1])?n[0]:new Hd(n):n,t.cancel(i).catch(di)}),i.tee()}function Zd(t){return vc(new E(t))}function $d(t){return dc(t).buffer}F(),Et();var tl="text/plain;charset=UTF-8",nl=function(){function t(){}var n=t.prototype;return n.FT=function(t){return this.UT(t).then(JSON.parse)},n.VT=function(t,n){switch(t){case Md.CT:return this.HT(n);case Md.DT:return this.FT(n);case Md.BT:return this.WT();case Md.NT:return this.UT(n);default:throw new p}},t}();function il(t,n,i){if(V(t,nl))return t;if(V(t,Xd))return function(t,n){return new el({Km:0,WT:t,qT:rl(n)})}(t,i);var r=rl(i),e=ut.resolve(t).then(function(t){return function(t,n){if(t){if("string"==typeof t)return{Km:Md.NT,zT:t,qT:n||tl};if(V(t,ArrayBuffer)||Rc(t))return{Km:Md.CT,zT:fl(t),qT:n};if(Xn(t)||Hn(t))return{Km:Md.DT,zT:t,qT:n};throw new p("Unsupported BodyInit type")}return{Km:Md.NT,zT:null,qT:n}}(t,r)});return new el({Km:1,Qy:e,GT:n})}function rl(t){return(t.get("content-type")||"").toLowerCase()}var el=function(t){function n(n){var i;return(i=t.call(this)||this).jT=!1,i.KT=void 0,i.JT=new Vc,i.JT.Qy.catch(di),i.ek(n),i}Ct(n,t);var i=n.prototype;return i.YT=function(){return this.JT.Qy},i.UT=function(t){return this.ZT(sl,t)},i.FT=function(t){return this.ZT(ol,t)},i.HT=function(t){return this.ZT(cl,t)},i.WT=function(){return this.$T(function(t){return 0===t.Km?t.WT:Kd(t.Qy.then(al).then(Qd),t.GT)}(this.KT))},i.ZT=function(t,n){if(this.jT)return ut.reject(new p("Already used"));this.jT=!0;var i=t(this.KT,n);return this.JT.$g(i.then(di)),i},i.$T=function(t){if(this.jT)throw new p("Already used");if(t.locked)throw new p("Body stream is locked");this.jT=!0;var n=new qd,i=ut.resolve(t.pipeTo(n.writable));return this.JT.$g(i),n.readable},i.ek=function(t){this.KT=t,1===t.Km&&t.Qy.catch(di)},i.nk=function(){if(this.jT)throw new p("Already used");var t=function(t){if(0===t.Km){var n=t.WT.tee(),i=n[0],r=n[1];return[{Km:t.Km,WT:i,qT:t.qT},{Km:t.Km,WT:r,qT:t.qT}]}var e=t.GT.tp(),s=e[0],u=e[1];return[{Km:t.Km,Qy:t.Qy,GT:s},{Km:t.Km,Qy:t.Qy,GT:u}]}(this.KT),i=t[0],r=t[1];return this.ek(i),new n(r)},Nt(n,[{key:"XT",get:function(){return this.jT}},{key:"QT",get:function(){return 0===this.KT.Km}}]),n}(nl);function sl(t,n){return 0===t.Km?Yd(t.WT,n).then(Zd):(n&&t.GT.$g(n),_r(t.Qy.then(ul),t.GT))}function ul(t){switch(t.Km){case Md.NT:return ut.resolve(t.zT||"");case Md.CT:return ut.resolve(t.zT).then(Zd);case Md.DT:return ut.resolve(t.zT).then(JSON.stringify)}}function ol(t,n){return 0===t.Km?sl(t,n).then(JSON.parse):(n&&t.GT.$g(n),_r(t.Qy.then(hl),t.GT))}function hl(t){return t.Km===Md.DT?ut.resolve(t.zT):ul(t).then(JSON.parse)}function cl(t,n){return 0===t.Km?Yd(t.WT,n):(n&&t.GT.$g(n),_r(t.Qy.then(al),t.GT))}function al(t){switch(t.Km){case Md.CT:return ut.resolve(t.zT);case Md.NT:case Md.DT:return ul(t).then($d)}}function fl(t){return V(t,ArrayBuffer)?t:bc(mc(t)).buffer}var vl=function(t){function n(n){var i;return(i=t.call(this)||this).rk=void 0,i.rk=n,i}Ct(n,t);var i=n.prototype;return i.YT=function(){return this.rk.YT()},i.UT=function(t){return this.rk.UT(t)},i.FT=function(t){return this.rk.FT(t)},i.HT=function(t){return this.rk.HT(t)},i.WT=function(t){return this.rk.WT(t)},i.nk=function(){return this.rk.nk()},Nt(n,[{key:"XT",get:function(){return this.rk.XT}},{key:"QT",get:function(){return this.rk.QT}}]),n}(nl);function dl(t){return t.hk>=200&&t.hk<=299||304===t.hk}var ll=function(t){function n(n,i){var r,e,s,u,o,h;i?(e=i.fk,s=i.dk,u=i.hk,o=i.vk,h=i._k):(e=[],s=Md.NT,u=200,o="OK",h=!1);var c=n.lk,a=new Ld(n.fk||e),f=n.dk||s,v=n.gk||(i&&i.lk===c?i.gk:c.Yu),d=i?i.rk:null,l=il(void 0!==n.ck?n.ck:d,n.GT||new hr,a);return(r=t.call(this,l)||this).fk=void 0,r.lk=void 0,r.gk=void 0,r.dk=void 0,r.hk=void 0,r.vk=void 0,r._k=void 0,r.fk=a,r.lk=c,r.gk=v,r.dk=f,r.hk=void 0!==n.hk?n.hk:u,r.vk=void 0!==n.vk?String(n.vk):o,r._k=n._k||h,r}Ct(n,t);var i=n.prototype;return i.ck=function(t){return this.VT(this.dk,t)},i.Ly=function(){return new n({ck:this.nk(),lk:this.lk},this)},n}(vl);F(),Et();var wl=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),gl=function(t){return t.pk="",t.wk="manifest",t.yk="segment",t.Ak="preload-hint",t.bk="content-protection",t}({}),_l=function(t){return t.pk="",t.Sk="initialization-segment",t.Tk="fairplay-license",t.Ek="fairplay-certificate",t.Pk="widevine-license",t.xk="widevine-certificate",t.Ik="playready-license",t.Rk="clearkey-license",t.Ck="aes128-key",t}({}),ml=function(t){return t.pk="",t.Dk="audio",t.Bk="video",t.NT="text",t.Nk="image",t}({}),yl=function(t){return t.Mk="same-origin",t.Lk="no-cors",t.Ok="cors",t.Fk="navigate",t}({}),pl=function(t,n){this.zT=void 0,this.fk=void 0,this.Uk=void 0,this.dk=void 0,this.Vk=void 0,this.Hk=void 0,this.Yg=void 0,this.Km=void 0,this.Wk=void 0,this.qk=void 0,this.Yu=void 0,this.zk=void 0,this.Gk=void 0,this.Xk=void 0,this.jk=void 0,this.Qk=void 0;var i,r,e,s,u,o,h,c,a,f,v,d,l,w,g,_,m,y,p=t.Yu;n?(i=n.zT,r=n.fk,e=n.Uk,s=n.dk,u=n.Vk,o=n.Hk,h=n.Yg,c=n.Km,a=n.Wk,f=n.qk,v=n.zk,d=n.Gk,l=n.Xk,w=n.jk,g=n.Qk):(i=null,r={},e="GET",s=Md.NT,u=0,o=0,c="",a="",f="",v=!1,l=void 0,w=!1,g=void 0),this.Yu=p,this.zT=t.zT||i,this.fk=new Ld(t.fk||r),this.Uk=t.Uk||e,this.dk=t.dk||s,this.Vk=void 0!==t.Vk?Number(t.Vk)||0:u,this.Hk=void 0!==t.Hk?Number(t.Hk)||0:o,this.Yg=t.Yg||h||(new hr).Yg,this.Km=t.Km||c,this.Wk=t.Wk||a,this.qk=t.qk||f,this.zk=void 0!==t.zk?Boolean(t.zk):v,this.Gk=t.Gk||d,this.Xk=null!=(_=t.Xk)?_:l,this.jk=null!=(m=t.jk)?m:w,this.Qk=null!=(y=t.Qk)?y:g},kl=function(){function t(){}var n=t.prototype;return n.lk=function(t){var n=function(t){return new ll({ck:null,fk:{},lk:t,gk:t.Yu,dk:t.dk,hk:0,vk:eh.Gw})}(new pl(t));return ut.resolve(n)},n.Kk=function(t){},n.kn=function(){},t}();var bl=function(){function t(t,n){void 0===n&&(n=!0),this.$k=void 0,this.iE=void 0,this.$k=t,this.iE=n}var n=t.prototype;return n.lk=function(t){var n=this.Zk(t);return this.$k.lk(n)},n.Kk=function(t){return this.$k.Kk(this.tE(t))},n.Zk=function(n){var i=new pl(n);if(!this.iE){var r=t.eE(i.Yu);i=new pl({Yu:r},i)}return i},n.tE=function(n){var i=n.Yu;return this.iE||(i=t.eE(i)),{Yu:i,zT:n.zT}},n.kn=function(){this.$k.kn()},t.eE=function(t){return Vn.Nm&&Uo(t,"http://")?t.replace(":","s:"):t},Nt(t,null,[{key:"Yk",get:function(){return t.Jk||(t.Jk=new t(new kl)),t.Jk}}]),t}();function Al(t,n){var i=Vn.Dh(t);return Tl(i,n),i.toString()}function Tl(t,n){for(var i,r=Lt(k.keys(n));!(i=r()).done;){var e=i.value;t.searchParams.set(e,n[e])}}function Sl(t,n){var i=Vn.xm(t);return n&&!Fo(i,"/")&&(i+="/"),i}bl.Jk=void 0,F(),Et(),F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et(),Ut();var El=/cache:(.+)?(?=&|$)/;function Il(t){if(!Uo(t,"http://webcache.googleusercontent.com/search?q=cache:"))return"";var n=Vn.Dh(t).search.match(El);return n&&n.length>1?n[1]:""}function Rl(t){return Vn.Dh(".",t)}F(),Et(),Bt(),Dt(),F(),Et(),Bt(),Dt();var Cl=function(t){return t.sE="HttpOpenError",t.nE="HttpResponseError",t.rE="HttpTimeoutError",t}({}),Dl=function(t){function n(n,i,r){var e;return(e=t.call(this,i,r)||this).hE=void 0,e.hE=n,e}return Ct(n,t),Nt(n,[{key:"lk",get:function(){return this.hE}}]),n}(ar),Pl=function(t){function n(n,i){return t.call(this,n,"Error while opening "+n.Yu+".",i)||this}return Ct(n,t),Nt(n,[{key:"name",get:function(){return Cl.sE}}]),n}(Dl);F(),Et(),Bt(),Dt();var Nl=function(t){function n(n,i,r){var e;return(e=t.call(this,n.lk,null!=r?r:function(t){return"Error while loading "+t.lk.Yu+", status code "+t.hk}(n),i)||this).aE=void 0,e.aE=n,e}return Ct(n,t),Nt(n,[{key:"name",get:function(){return Cl.nE}},{key:"oE",get:function(){return this.aE}}]),n}(Dl);F(),Et(),Bt(),Dt();var Bl=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.Yu+" timed out after "+t.Vk+" seconds."}(n),i)||this}return Ct(n,t),Nt(n,[{key:"name",get:function(){return Cl.rE}}]),n}(Dl);F(),Et();var xl=self.fetch,Ol=self.Request,Ml=self.Response,Ll=self.Headers,Ul=self.ReadableStream,Fl=self.AbortSignal,Vl=self.AbortController,Hl=_i(function(){try{return Kn(xl)&&Jn(Ol)&&Jn(Ml)&&Jn(Ll)&&"forEach"in Ll.prototype&&Qu()}catch(t){return!1}}),Wl=["http:","https:"];var zl=_i(function(){try{return Hl()&&Jn(Fl)&&Jn(Vl)&&"signal"in Ol.prototype}catch(t){return!1}}),Xl=_i(function(){try{return Hl()&&Jn(Ul)&&"body"in Ml.prototype&&!On.e_}catch(t){return!1}});function ql(t){return V(t,Dl)}function Gl(t){return V(t,Nl)}function jl(t,n){var i,r=t.fk.has("content-length")?Number(t.fk.get("content-length")):void 0;return i=t.QT?function(t,n,i){return t.pipeThrough(new qd(new Ql(n,i)))}(t.WT(),n,r):function(t,n,i){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return[4,ut.resolve()];case 1:return s.sent(),n(0,i),[4,t];case 2:return r=s.sent(),e=r.byteLength,n(e,null!=i?i:e),[2,r]}})})()}(t.HT(),n,r),new ll({ck:i,lk:t.lk},t)}F(),Et(),H(),F(),Et(),Wt(),Qt();var Ql=function(){function t(t,n){this.cE=void 0,this.dE=void 0,this.uE=void 0,this.cE=t,this.dE=n,this.uE=0}var n=t.prototype;return n.transform=function(t,n){this.uE+=t.byteLength,this.cE(this.uE,this.dE),n.enqueue(t)},n.flush=function(t){var n;this.cE(this.uE,null!=(n=this.dE)?n:this.uE)},t}();var Yl=function(){function t(t){this.oE=void 0,this.hE=void 0,this.nT=new hr,this.aE=void 0,this.fE=0,this.vE=!1,this.hE=t,this.nT.$g(t.Yg),this.oE=this.lE()}var n=t.prototype;return n.lE=function(){return Vt(function(){var t,n,i,r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:t=this,(n=this.hE).Vk&&(this.fE=w(function(){t.vE=!0,t.nT.Zg()},n.Vk),this.nT.Yg.Qg(function(){g(t.fE)}));try{i=xl(n.Yu,{method:n.Uk,headers:n.fk.MT(),body:n.zT,credentials:n.zk?"include":"same-origin",signal:Zl(this.nT.Yg),mode:n.Xk,keepalive:n.Qk})}catch(t){throw new Pl(n,t)}a.label=1;case 1:return a.trys.push([1,3,,4]),[4,i];case 2:return r=a.sent(),[3,4];case 3:throw e=a.sent(),vr(s=this._E(e))&&this.nT.Zg(),s;case 4:if(u=r.url||n.Yu,o=0===r.status&&"file:"===function(t){return Vn.Dh(t).protocol}(u)?200:r.status,h=new Kl(this,r,this.nT),!dl(c=new ll({ck:h,lk:n,dk:n.dk,fk:$l(r.headers),hk:o,vk:r.statusText,gk:u})))throw new Nl(c);return n.Gk&&(c=jl(c,n.Gk)),[2,c]}})}).call(this)},n._E=function(t){return ql(t)?t:vr(t)?this.vE?new Bl(this.hE):new fr(t.message,t):this.aE?new Nl(this.aE,t):new Pl(this.hE,t)},t}(),Kl=function(t){function n(n,i,r){var e;return(e=t.call(this)||this).pE=void 0,e.gE=void 0,e.nT=void 0,e.JT=new Vc,e.pE=n,e.gE=i,e.nT=r,e.JT.Qy.catch(di),e}Ct(n,t);var i=n.prototype;return i.YT=function(){return this.JT.Qy},i.UT=function(t){return this.ZT(this.gE.text(),t)},i.HT=function(t){return this.ZT(this.gE.arrayBuffer(),t)},i.WT=function(){var t=this.gE.body;return t?this.$T(t):Kd(this.HT().then(Qd),this.nT)},i.nk=function(){var t=this.gE.clone(),i=this.nT.tp(),r=i[0],e=i[1];return this.nT=r,new n(this.pE,t,e)},i.ZT=function(t,n){var i=this;n&&this.nT.$g(n);var r=gr(ut.resolve(t),this.nT.Yg).catch(function(t){throw i.pE._E(t)});return r=_r(r,this.nT),this.JT.$g(r.then(di)),r},i.$T=function(t){var n=this;return new Xd(new tw(t,function(t){return n.pE._E(t)},this.nT,this.JT),{highWaterMark:0})},Nt(n,[{key:"XT",get:function(){return this.gE.bodyUsed}},{key:"QT",get:function(){return Un(this.gE.body)}}]),n}(nl),Jl="abort";function Zl(t){if(zl()){var n=new Vl;if(t.Hg)n.abort();else if(!t.Wg){var i=function(){r(),n.abort()},r=function(){n.signal.removeEventListener(Jl,i),t.jg(i),t.Kg(r)};n.signal.addEventListener(Jl,i),t.Xg(i),t.Qg(r)}return n.signal}}function $l(t){if(function(t){return zn(t)&&"function"==typeof t.forEach}(t)){var n=new Ld;return t.forEach(function(t,i){Array.isArray(t)&&2===t.length?n.append(t[0],t[1]):n.append(i,t)}),n}return new Ld(t)}var tw=function(){function t(t,n,i,r){this.mE=void 0,this.wE=void 0,this.nT=void 0,this.JT=void 0,this.Wd=void 0,this.mE=t,this.wE=n,this.nT=i,this.JT=r}var n=t.prototype;return n.start=function(t){this.Wd=this.mE.getReader()},n.pull=function(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,gr(this.Wd.read(),this.nT.Yg)];case 1:return n=e.sent(),[3,3];case 2:return i=e.sent(),r=this.wE(i),this.JT.jy(r),this.nT.Zg(),this.Wd.cancel(r).catch(di),t.error(r),[2];case 3:return n.done?(this.JT.Xy(),this.nT.Zg(),t.close()):t.enqueue(n.value),[2]}})}).call(this)},n.cancel=function(t){return this.nT.Zg(),this.JT.jy(t),this.Wd.cancel(t)},t}();F(),Et(),Bt();var nw=function(){function t(t){var n=this;this.AE=void 0,this.hE=void 0,this.nT=new hr,this.aE=void 0,this.yE=new Vc,this.DE=void 0,this.RE=!1,this.xE=function(){var t;n.bE(),null==(t=n.AE)||t.abort()},this.hE=t,this.nT.$g(t.Yg),this.AE=new R,this.lE()}var n=t.prototype;return n.lE=function(){var t=this,n=this.AE,i=this.hE;if(i.Yg.Hg)return this.bE();n.onreadystatechange=function(){return t.SE()},n.onprogress=function(n){return t.cE(n)},n.onload=function(){return t.TE()},n.onloadend=function(){return t.kE()},n.onerror=function(){return t.EE()},n.ontimeout=function(){return t.PE()},n.onabort=function(){return t.bE()},n.open(i.Uk,i.Yu,!0),n.withCredentials=Boolean(i.zk),"responseType"in n&&i.dk&&(i.dk===Md.NT?n.responseType="text":n.responseType="arraybuffer"),i.fk.forEach(function(t,i){n.setRequestHeader(i,t)}),i.Vk&&(n.timeout=i.Vk),this.nT.Yg.Xg(this.xE);var r=i.zT;r?n.send(r):n.send()},n.SE=function(){var t=this.AE;void 0!==t&&t.readyState>=2&&!this.RE&&(this.RE=!0,this.CE())},n.CE=function(){var t,n,i=this.AE,r=function(t){var n=new Ld,i=t.replace(/\r?\n[\t ]+/g," ");return i.split(/\r?\n/).forEach(function(t){var i=t.split(":"),r=i.shift().trim();if(r){var e=i.join(":").trim();n.append(r,e)}}),n}(i.getAllResponseHeaders()||""),e=this.hE;this.DE=new Vc,this.aE=new ll({lk:e,dk:e.dk,ck:this.DE.Qy,hk:i.status,vk:i.statusText,fk:r,gk:null!=(n=i.responseURL)?n:r.get("X-Request-URL")}),null==(t=this.yE)||t.Xy(this.aE)},n.TE=function(){var t,n=this.AE;if(void 0!==n){var i=n.response;if(!Un(i)){var r=this.hE.dk;i=r===Md.NT?n.responseText:r===Md.CT?new ArrayBuffer(0):{}}null==(t=this.DE)||t.Xy(i)}},n.kE=function(){this.kn()},n.cE=function(t){void 0!==this.AE&&(null==this.hE.Gk||this.hE.Gk.call(this.hE,t.loaded,t.lengthComputable?t.total:void 0))},n.EE=function(){var t=new y("Network request failed");this.aE?this.Ts(new Nl(this.aE,t)):this.Ts(new Pl(this.hE,t))},n.PE=function(){this.Ts(new Bl(this.hE))},n.bE=function(){this.Ts(new fr),this.kn()},n.Ts=function(t){var n,i;null==(n=null!=(i=this.DE)?i:this.yE)||n.jy(t)},n.kn=function(){this.AE=void 0,this.aE=void 0,this.yE=void 0,this.DE=void 0,this.nT.zg()},Nt(t,[{key:"oE",get:function(){return this.yE.Qy}}]),t}();function iw(t,n,i){return new ut(function(r,e){if(i&&i.Hg)return e(new fr);var s=function(t){o(),r(t)},u=function(){o(),e(new fr)},o=function(){t.removeEventListener(n,s),i&&i.jg(u)};t.addEventListener(n,s),i&&i.Xg(u)})}F(),Et();var rw=function(){function t(){}var n=t.prototype;return n.lk=function(t){return function(t){if(!Hl()||!function(t){try{return Wl.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Yu))return!1;if(!Xl()&&t.Gk)return!1;if(!t.jk&&t.Uk!==wl.POST){if(On.S_&&On.d_<=68)return!1;if(On.w_)return!1}return!0}(t)?new Yl(t).oE:new nw(t).oE},n.Kk=function(t){var n=f.navigator;if(n&&n.sendBeacon)n.sendBeacon(t.Yu,Bd([t.zT],{type:t.qT}));else{var i=t.qT?{"Content-type":t.qT}:void 0;this.lk(new pl({Uk:wl.POST,Yu:t.Yu,zT:t.zT,fk:i,Xk:yl.Lk})).then(function(t){kr(t.HT())},di)}},n.kn=function(){},t}();F(),Et(),Bt(),Dt(),F(),Et();var ew=function(t){return t[t.BE=1]="BE",t[t.NE=2]="NE",t[t.NT=3]="NT",t[t.LE=4]="LE",t[t.OE=9]="OE",t}({});function sw(t){return 1===t.FE}function uw(t){return 3===t.FE}F(),Et(),Dt();var ow=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Ct(n,t),n}(ar),hw=function(){function t(){}return t.prototype.UE=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new ow(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new ow;return new ww(n)},t}(),cw=function(){function t(t){this.HE=void 0,this.HE=t}var n=t.prototype;return n.GE=function(t){return this.HE.isEqualNode(t.HE)},n.XE=function(n){return new t(this.HE.cloneNode(n))},Nt(t,[{key:"FE",get:function(){return ew.NE}},{key:"VE",get:function(){var t;return null!=(t=this.HE.localName)?t:mw(this.HE.nodeName)}},{key:"l",get:function(){return this.HE.nodeName}},{key:"WE",get:function(){var t;return null!=(t=this.HE.namespaceURI)?t:void 0}},{key:"qE",get:function(){var t;return null!=(t=this.HE.prefix)?t:void 0}},{key:"zE",get:function(){return this.HE.nodeValue}}]),t}(),aw=function(){function t(t){this.KE=void 0,this.QE=void 0,this.KE=t}var n=t.prototype;return n.YE=function(t){return this.jE.filter(function(n){return gw(n)&&n.JE===t})},n.ZE=function(t,n){return this.jE.filter(function(i){return gw(i)&&i.VE===n&&i.WE===t})},n.tP=function(t){this.KE.appendChild(t.$E),this.QE&&this.QE.push(t)},n.GE=function(t){return this.KE.isEqualNode(t.$E)},Nt(t,[{key:"jE",get:function(){return void 0===this.QE&&(this.QE=function(t){for(var n=[],i=0;i=0;n-=1)this.it(t[n])},i.kn=function(){this.hr(),this.Vo()},Nt(n,[{key:"II",get:function(){return this.RI}},{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}},{key:"V",get:function(){return this.RI.length}}]),n}(th);F(),Et(),Ut(),F(),Et(),H(),F(),Et(),Ut();var Nw=k.freeze||li;function Bw(t,n,i){k.defineProperty(t,n,{writable:!1,enumerable:!0,value:i})}function xw(t,n){for(var i,r=Lt(k.getOwnPropertyNames(n));!(i=r()).done;){var e=i.value;k.defineProperty(t,e,k.getOwnPropertyDescriptor(n,e))}return t}function Ow(t){if(Xn(t)){var n={};for(var i in t)Mn.call(t,i)&&(n[i]=Ow(t[i]));return n}if(Hn(t)){for(var r=new Array(t.length),e=0;e0?t.YI=i:t.YI=void 0},get targetQuality(){if(t.YI)return 1===t.YI.length?t.YI[0].Ca:t.YI.map(function(t){return t.Ca})},addEventListener:function(t,i){var r=Gw(t,Xw);n.wn(r,i)},removeEventListener:function(t,i){var r=Gw(t,Xw);n.mn(r,i)}};return n=new nh(r),t.wn(i,function(t){return n.So(t.Ca)}),k.defineProperty(r,"constructor",{value:Jw}),r}function $w(){}function tg(t){var n=Qw(t);return k.defineProperty(n,"constructor",{value:$w}),n}var ng=function(t){function n(){return t.apply(this,arguments)||this}Ct(n,t);var i=n.prototype;return i.tt=function(n){return t.prototype.tt.call(this,n)},i.xa=function(){return tg(this)},n}(Pw);F(),Et(),F(),Et();var ig=function(t){return t.Dk="audio",t.Bk="video",t.NT="text",t.Nk="image",t.pk="unknown",t}({});function rg(t){return"audio"===t||"video"===t}F(),Et(),Bt(),Dt(),F(),Et(),Bt(),Dt();var eg=function(t){function n(n,i,r,e,s,u,o,h){var c;return(c=t.call(this,n,i,r)||this).url=void 0,c.status=void 0,c.statusText=void 0,c.response=void 0,c.systemCode=void 0,c.url=e,c.status=s,c.statusText=u,c.response=o,c.systemCode=h,c}return Ct(n,t),Nt(n,[{key:"name",get:function(){return"ContentProtectionError"}}]),n}(fd);var sg=function(t){return t[t.ABORTED=1]="ABORTED",t[t.NETWORK=2]="NETWORK",t[t.DECODE=3]="DECODE",t[t.SRC_NOT_SUPPORTED=4]="SRC_NOT_SUPPORTED",t[t.ENCRYPTED=5]="ENCRYPTED",t[t.LICENSE_INVALID=6]="LICENSE_INVALID",t[t.ADVERTISEMENT_ERROR=7]="ADVERTISEMENT_ERROR",t}({}),ug=function(t){function n(n,i,r,e){var s;return(s=t.call(this,i)||this).code=void 0,s.message=void 0,s.cause=void 0,s.systemCode=void 0,s.code=n,s.message=null!=i?i:"Unknown error",s.cause=r,s.systemCode=e,y.captureStackTrace&&y.captureStackTrace(s,s.constructor),s}return Ct(n,t),Nt(n,[{key:"name",get:function(){return"MediaError"}}]),n}(cr);function og(t){Bw(t,"MEDIA_ERR_ABORTED",1),Bw(t,"MEDIA_ERR_NETWORK",2),Bw(t,"MEDIA_ERR_DECODE",3),Bw(t,"MEDIA_ERR_SRC_NOT_SUPPORTED",4),Bw(t,"MEDIA_ERR_ENCRYPTED",5)}function hg(t){var n,i;return function(t){return t.category===ad.CONTENT_PROTECTION}(t)?new ug(5,t.message,null==(n=t.cause)?void 0:n.message,t.systemCode):new ug(function(t){if(t===cd.MEDIA_ABORTED)return 1;if(t===cd.MANIFEST_LOAD_ERROR||t===cd.MEDIA_LOAD_ERROR||t===cd.SUBTITLE_LOAD_ERROR)return 2;if(t===cd.MEDIA_DECODE_ERROR)return 3;if(t===cd.MEDIA_NOT_SUPPORTED)return 4;var n=ad.fromCode(t);if(n===ad.NETWORK)return 2;if(n===ad.SOURCE)return 4;if(n===ad.LICENSE)return 6;if(n===ad.CONTENT_PROTECTION)return 5;if(n===ad.AD)return 7;return 3}(t.code),t.message,null==(i=t.cause)?void 0:i.message)}function cg(t){return new fd(ag(t.code),t.message,t)}function ag(t){switch(t){case 1:return cd.MEDIA_ABORTED;case 2:return cd.NETWORK_ERROR;case 3:return cd.MEDIA_DECODE_ERROR;case 4:return cd.SOURCE_NOT_SUPPORTED;case 5:return cd.CONTENT_PROTECTION_ERROR;case 6:return cd.LICENSE_ERROR;case 7:return cd.AD_ERROR}}og(ug),og(ug.prototype),F(),Et(),Bt(),Dt(),F(),Et(),Dt();var fg=function(t){function n(){return t.apply(this,arguments)||this}return Ct(n,t),n}(ih);F(),Et(),Bt(),F(),Et();var vg=function(){function t(){this.dO=[],this.hu=void 0}var n=t.prototype;return n.lO=function(t){this.dO.push(t),this.hu&&this.hu.push(t.Ca)},n._S=function(t){Xi(this.dO,t),this.hu&&Xi(this.hu,t.Ca)},n.CI=function(t){return this.dO[t]},n.fO=function(t){return Hn(t)?function(t,n){for(var i,r=Lt(n);!(i=r()).done;)if(!ji(t,i.value))return!1;return!0}(this.dO,t):ji(this.dO,t)},n.hr=function(){Yi(this.dO),this.hu&&Yi(this.hu)},Nt(t,[{key:"II",get:function(){return this.dO}},{key:"V",get:function(){return this.dO.length}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var n=t.II.map(function(t){return t.Ca});return n.item=function(n){var i=0|n,r=t.CI(i);return r&&r.Ca||void 0},n}(this)),this.hu}}]),t}();F(),Et(),Dt();var dg=function(t){function n(n){var i;return(i=t.call(this,Dw.pa)||this).Ht=void 0,i.Ht=n,i}return Ct(n,t),n.prototype.xa=function(){return new lg(this.Ht.Ca)},n}(Aw),lg=function(t){function n(n){var i;return(i=t.call(this,"change")||this).track=void 0,i.track=n,i}return Ct(n,t),n}(Tw);F(),Et(),Dt();var wg=function(t){function n(n){var i;return(i=t.call(this,Dw.SI)||this).Ht=void 0,i.Ht=n,i}return Ct(n,t),n.prototype.xa=function(){return new gg(this.Ht.Ca)},n}(Aw),gg=function(t){function n(n){var i;return(i=t.call(this,"update")||this).track=void 0,i.track=n,i}return Ct(n,t),n}(Tw);F(),Et();var _g=0;function mg(){return _g++}var yg=0;var pg=0;function kg(){return pg++}var bg=0;function Ag(){return bg++}var Tg=0;var Sg=function(t){function n(n){var i;return(i=t.call(this)||this).Km=ig.Dk,i._O=void 0,i.hS=void 0,i.pO=void 0,i.gO=void 0,i.We=!1,i.dO=void 0,i.hu=void 0,i._O=n,i.gO=mg(),i.hS=""+Tg++,i.pO=n.label,i.dO=new vg,i.yO(),i}Ct(n,t);var i=n.prototype;return i.wO=function(t){this.Rt=t},i.yO=function(){this.Rt=this.vO},Nt(n,[{key:"XI",get:function(){}},{key:"Rt",get:function(){return this.We},set:function(t){this.We!==t&&(this.We=t,this.vO=t,this.So(new dg(this)))}},{key:"vO",get:function(){return this._O.enabled},set:function(t){this._O.enabled=t}},{key:"Ca",get:function(){return this.hu||(this.hu=Zw(this)),this.hu}},{key:"o",get:function(){return this.hS}},{key:"jI",get:function(){return this.gO}},{key:"Lt",get:function(){return this._O.kind}},{key:"Th",get:function(){return this.pO},set:function(t){t!==this.pO&&(this.pO=t,this.So(new wg(this)))}},{key:"bs",get:function(){return this._O.language}},{key:"Xk",get:function(){return this.Rt?"enabled":"disabled"}},{key:"mO",get:function(){return this._O}},{key:"KI",get:function(){return this.dO}},{key:"YI",get:function(){},set:function(t){}}]),n}(th);F(),Et(),Bt(),Dt();var Eg=0;var Ig=function(t){function n(n){var i;return(i=t.call(this)||this).Km=ig.Bk,i._O=void 0,i.hS=void 0,i.gO=void 0,i.We=!1,i.dO=void 0,i.pO=void 0,i.hu=void 0,i._O=n,i.gO=mg(),i.hS=""+Eg++,i.dO=new vg,i.pO=n.label,i.yO(),i}Ct(n,t);var i=n.prototype;return i.yO=function(){this.Rt=this.vO},i.wO=function(t){this.Rt=t},Nt(n,[{key:"XI",get:function(){}},{key:"Rt",get:function(){return this.We},set:function(t){this.We!==t&&(this.We=t,this.vO=t,this.So(new dg(this)))}},{key:"vO",get:function(){return Boolean(this._O.selected)},set:function(t){this._O.selected=t}},{key:"Ca",get:function(){return this.hu||(this.hu=Zw(this)),this.hu}},{key:"o",get:function(){return this.hS}},{key:"jI",get:function(){return this.gO}},{key:"Lt",get:function(){return"main"}},{key:"Th",get:function(){return this.pO},set:function(t){t!==this.pO&&(this.pO=t,this.So(new wg(this)))}},{key:"bs",get:function(){return this._O.language}},{key:"Xk",get:function(){return this.Rt?"enabled":"disabled"}},{key:"mO",get:function(){return this._O}},{key:"KI",get:function(){return this.dO}},{key:"YI",get:function(){},set:function(t){}}]),n}(th);F(),Et(),Dt();var Rg=function(t){function n(n){var i;return(i=t.call(this,eh.yw)||this).KP=void 0,i.KP=n,i}return Ct(n,t),n}(rh);F(),Et(),Wt(),Dt(),Ut(),Qt(),F(),Et();var Cg=function(t){return t[t.NONE=0]="NONE",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED",t[t.ERROR=3]="ERROR",t}({});F(),Et();var Dg=function(t){return t.DEFAULT="",t.SRT="srt",t.TTML="ttml",t.WEBVTT="webvtt",t.EMSG="emsg",t.EVENT_STREAM="eventstream",t.ID3="id3",t.CEA608="cea608",t.DATE_RANGE="daterange",t.MILLICAST="millicast",t}({});function Pg(t){switch(t){case"":case"srt":case"ttml":case"webvtt":case"emsg":case"eventstream":case"id3":case"cea608":case"daterange":case"millicast":return!0;default:return!1}}F(),Et(),Ut(),F(),Et();var Ng=function(t){return t.AO="cue",t.bO="region",t.SO="stylesheet",t}({});F(),Et(),Bt(),Dt(),F(),Et();var Bg={"line-left":"start",center:"middle","line-right":"end"},xg={start:"line-left",middle:"center",end:"line-right"};function Og(t,n){if("auto"===t)switch(n){case"start":case"left":return"line-left";case"end":case"right":return"line-right";default:return"center"}return t}function Mg(t,n){if("auto"===t)switch(n){case"left":return 0;case"right":return 100;default:return 50}return function(t,n){var i="number"==typeof t?t:T(t);return S(i)?n:i}(t,50)}F(),Et(),F(),Et(),F(),Et(),Dt();var Lg=function(t){return t.zL="yo",t.GL="jo",t.SI="er",t}({}),Ug=function(t){function n(n,i){var r;return(r=t.call(this,n)||this).TO=void 0,r.TO=i,r}return Ct(n,t),n}(Aw),Fg=function(t){function n(n,i){var r;return(r=t.call(this,n)||this).cue=void 0,r.cue=i,r}return Ct(n,t),n}(Tw);function Vg(t){var n,i=[Lg.zL,Lg.GL,Lg.SI],r={get kO(){return t},get track(){return t.Ht.Ca},get id(){return t.o},get uid(){return t.jI},get startTime(){return t.EO},set startTime(n){t.EO=n},get endTime(){return t.PO},set endTime(n){t.PO=n},get content(){return t.U},addEventListener:function(t,i){var r=Gw(t,Xw);n.wn(r,i)},removeEventListener:function(t,i){var r=Gw(t,Xw);n.mn(r,i)}};return n=new nh(r),t.wn(i,function(t){return n.So(t.Ca)}),r}function Hg(){}function Wg(t){return xw(Vg(t),{get align(){return t.xO},get line(){return t.IO},get lineAlign(){return t.RO},get position(){return t.mo},get positionAlign(){return t.CO},get region(){return t.DO?t.DO.Ca:null},get size(){return t.Vy},get snapToLines(){return t.BO},get text(){return t.U},get vertical(){return t.Pt}})}F(),Et(),Bt(),Dt(),F(),Et(),Dt();var zg=function(t){function n(n){return t.call(this,Lg.SI,n)||this}return Ct(n,t),n.prototype.xa=function(){return new Xg(this.TO.Ca)},n}(Ug),Xg=function(t){function n(n){return t.call(this,"update",n)||this}return Ct(n,t),n}(Fg);F(),Et(),Dt();var qg=function(t){function n(n){var i;return(i=t.call(this,Dw.cI)||this).TO=void 0,i.TO=n,i}return Ct(n,t),n.prototype.xa=function(){return new Gg(this.TO.Ca)},n}(Aw),Gg=function(t){function n(n){var i;return(i=t.call(this,"updatecue")||this).cue=void 0,i.cue=n,i}return Ct(n,t),n}(Tw),jg=.02;function Qg(t,n){return Si(t.MO,n.MO,jg)&&Si(t.LO,n.LO,jg)&&t.o===n.o}var Yg=function(t){function n(n,i,r,e,s){var u;return(u=t.call(this)||this).gO=void 0,u.hS=void 0,u.MO=void 0,u.LO=void 0,u.OO=void 0,u.VO=void 0,u.hu=void 0,u.FO=void 0,u.ho=!1,u.HO=void 0,u.qO=void 0,u.jO=-1,u.gO=Ag(),u.OO=n,u.VO=i,u.MO=n,u.LO=i,u.HO=r,u.qO=Boolean(e),u.hS=null!=s?s:"",u}Ct(n,t);var i=n.prototype;return i.xa=function(){return Vg(this)},i.zO=function(t){return this===t||Lw(this,t)&&Qg(this,t)&&this.GO(t)},i.GO=function(t){return Mw(this.U,t.U)},i.XO=function(t,n){this.OO=t,this.VO=n,this.MO=t,this.LO=n},i.kn=function(){this.Vo()},Nt(n,[{key:"EO",get:function(){return this.OO},set:function(t){var n,i;this.OO!==t&&(this.OO=t,null==(n=this.FO)||n.UO(this),this.So(new zg(this)),null==(i=this.FO)||i.So(new qg(this)))}},{key:"PO",get:function(){return this.VO},set:function(t){var n,i;this.VO!==t&&(this.VO=t,null==(n=this.FO)||n.UO(this),this.So(new zg(this)),null==(i=this.FO)||i.So(new qg(this)))}},{key:"o",get:function(){return this.hS}},{key:"jI",get:function(){return this.gO}},{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}},{key:"ro",get:function(){return this.ho},set:function(t){this.ho=t}},{key:"Ht",get:function(){return this.FO},set:function(t){this.FO=t}},{key:"U",get:function(){return this.HO},set:function(t){var n;this.HO!==t&&(this.HO=t,this.So(new zg(this)),null==(n=this.FO)||n.So(new qg(this)))}},{key:"WO",get:function(){return this.qO},set:function(t){this.qO=t}}]),n}(th);function Kg(t,n){return t.U===n.U&&t.IO===n.IO&&t.RO===n.RO&&t.mo===n.mo&&t.CO===n.CO&&t.DO===n.DO&&t.BO===n.BO&&t.Vy===n.Vy&&t.xO===n.xO&&t.Pt===n.Pt}var Jg=function(t){function n(n,i,r,e,s){var u;return(u=t.call(this,n,i,r,e,s)||this).IO="auto",u.RO="start",u.mo="auto",u.CO="auto",u.DO=void 0,u.BO=!0,u.Vy=100,u.xO="center",u.Pt="",u}return Ct(n,t),n.prototype.GO=function(t){return Kg(this,t)},Nt(n,[{key:"Ca",get:function(){return this.hu||(this.hu=Wg(this)),this.hu}},{key:"Km",get:function(){return Ng.AO}}]),n}(Yg);function Zg(t){var n=t.IO,i=Yn(n);return i&&!t.BO&&(n<0||n>100)?100:i?Number(n):t.BO?-1:100}function $g(t){return Mg(t.mo,t.xO)}function t_(t){return Og(t.CO,t.xO)}function n_(t){var n,i=t_(t),r=$g(t);switch(i){case"line-left":n=100-r;break;case"line-right":n=r;break;case"center":n=r<=50?2*r:2*(100-r)}return b.min(t.Vy,n)}function i_(t){return{get id(){return t.o},get lines(){return t.QO},get regionAnchorX(){return t.KO},get regionAnchorY(){return t.YO},get scrollValue(){return t.JO},get viewportAnchorX(){return t.ZO},get viewportAnchorY(){return t.$O},get width(){return t.Ti}}}F(),Et(),Bt(),F(),Et();var r_=function(){function t(t,n,i,r,e,s,u,o){this.o=void 0,this.Ti=void 0,this.QO=void 0,this.KO=void 0,this.YO=void 0,this.ZO=void 0,this.$O=void 0,this.JO=void 0,this.hu=void 0,this.o=t,this.Ti=n,this.QO=i,this.KO=r,this.YO=e,this.ZO=s,this.$O=u,this.JO=o}return Nt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=i_(this)),this.hu}},{key:"Km",get:function(){return Ng.bO}}]),t}();F(),Et(),F(),Et();var e_=1e6,s_=function(){function t(){}var n=t.prototype;return n.tF=function(t){return this.iF()*t},n.eF=function(t){return this.sF(t)>0},n.nF=function(t){return this.sF(t)>=0},n.rF=function(t,n){return this.oF(t).hF(n)},n.zO=function(t){return 0===this.sF(t)},n.aF=function(t){return this.sF(t)<0},n.hF=function(t){return this.sF(t)<=0},n.uF=function(){return this.cF()?this.dF():this},n.lF=function(t){return this.lO(t.dF())},n.oF=function(t){return this.lF(t).uF()},t}();function u_(t,n){return t.fF()?n.fF()?Ni.rh:Ni.Fg:n.fF()?Ni.Ug:t.vF()?n.vF()&&t.cF()===n.cF()?Ni.rh:t.cF()?Ni.Ug:Ni.Fg:n.cF()?Ni.Fg:Ni.Ug}F(),Et(),Dt(),F(),Et();var o_=4294967296,h_=o_*o_,c_=h_*h_,a_=c_/2,f_=function(){function t(t,n){this.EF=void 0,this.TF=void 0,this.EF=t,this.TF=n}var n=t.prototype;return n.SF=function(){return this.TF.unsigned},n.kF=function(){return this.EF.isZero()&&this.TF.isZero()},n.cF=function(){return this.TF.isNegative()},n.PF=function(){return this.SF()?t._F(this.EF,this.TF,!1):this},n.xF=function(){return this.SF()?this:t._F(this.EF,this.TF,!0)},n.IF=function(){return this.EF},n.iF=function(){return this.cF()?-this.dF().iF():this.TF.toNumber()*h_+this.EF.toUnsigned().toNumber()},n.RF=function(){return this.EF.toInt()},n.zO=function(t){return(this.SF()===t.SF()||this.TF.getHighBits()>>>31!=1||t.TF.getHighBits()>>>31!=1)&&(this.TF.toUnsigned().eq(t.TF.toUnsigned())&&this.EF.toUnsigned().eq(t.EF.toUnsigned()))},n.sF=function(t){if(this.zO(t))return Ni.rh;var n=this.cF(),i=t.cF();if(n&&!i)return Ni.Ug;if(!n&&i)return Ni.Fg;if(!this.SF())return this.lF(t).cF()?Ni.Ug:Ni.Fg;var r=this.xF(),e=t.xF(),s=e.TF.comp(r.TF);return s>0||0===s&&e.EF.gt(r.EF)?Ni.Ug:Ni.Fg},n.aF=function(t){return this.sF(t)<0},n.hF=function(t){return this.sF(t)<=0},n.CF=function(t){return this.sF(t)>0},n.DF=function(t){return this.sF(t)>=0},n.BF=function(){return new t(this.EF.not(),this.TF.not())},n.NF=function(n){return new t(this.EF.and(n.EF),this.TF.and(n.TF))},n.MF=function(n){return new t(this.EF.or(n.EF),this.TF.or(n.TF))},n.LF=function(n){var i=127&n;return 0===i?this:i<64?t._F(this.EF.shl(i),this.TF.shl(i).or(this.EF.shru(64-i)),this.SF()):t._F(ue.ZERO,this.EF.shl(i-64),this.SF())},n.OF=function(n){var i=127&n;return 0===i?this:i<64?t._F(this.EF.shru(i).or(this.TF.shl(64-i)),this.TF.shr(i),this.SF()):t._F(this.TF.shr(i-64),this.TF.isNegative()?ue.NEG_ONE:ue.ZERO,this.SF())},n.FF=function(n){var i=127&n;return 0===i?this:i<64?t._F(this.EF.shru(i).or(this.TF.shl(64-i)),this.TF.shru(i),this.SF()):64===i?t._F(this.TF,ue.ZERO,this.SF()):t._F(this.TF.shru(i-64),ue.ZERO,this.SF())},n.lO=function(n){var i=this.TF.high>>>16,r=65535&this.TF.high,e=this.TF.low>>>16,s=65535&this.TF.low,u=this.EF.high>>>16,o=65535&this.EF.high,h=this.EF.low>>>16,c=65535&this.EF.low,a=n.TF.high>>>16,f=65535&n.TF.high,v=n.TF.low>>>16,d=65535&n.TF.low,l=n.EF.high>>>16,w=65535&n.EF.high,g=n.EF.low>>>16,_=0,m=0,y=0,p=0,k=0,b=0,A=0,T=0;A+=(T+=c+(65535&n.EF.low))>>>16,T&=65535,b+=(A+=h+g)>>>16,A&=65535,k+=(b+=o+w)>>>16,b&=65535,p+=(k+=u+l)>>>16,k&=65535,y+=(p+=s+d)>>>16,p&=65535,m+=(y+=e+v)>>>16,y&=65535,_+=(m+=r+f)>>>16,m&=65535,_+=i+a,_&=65535;var S=this.SF(),E=ue.fromBits(y<<16|p,_<<16|m,S),I=ue.fromBits(A<<16|T,k<<16|b,S);return t._F(I,E,S)},n.lF=function(t){return this.lO(t.dF())},n.dF=function(){return this.BF().lO(t.UF)},n.VF=function(n){if(this.kF()||n.kF())return this.SF()?t.mF:t.wF;if(this.cF())return n.cF()?this.dF().VF(n.dF()):this.dF().VF(n).dF();if(n.cF())return this.VF(n.dF()).dF();if(this.TF.isZero()&&0===this.EF.high&&n.TF.isZero()&&0===n.EF.high)return t.gF(this.EF.multiply(n.EF));var i=ue.fromBits(4294967295,0,!0),r=this.EF.and(i),e=this.EF.shru(32),s=this.TF.and(i),u=this.TF.shru(32),o=n.EF.and(i),h=n.EF.shru(32),c=n.TF.and(i),a=n.TF.shru(32),f=ue.UZERO,v=ue.UZERO,d=ue.UZERO,l=ue.UZERO;f=f.add(r.mul(o)),v=v.add(f.shru(32)),f=f.and(i),v=v.add(e.mul(o)),d=d.add(v.shru(32)),v=(v=v.and(i)).add(r.mul(h)),d=d.add(v.shru(32)),v=v.and(i),d=d.add(s.mul(o)),l=l.add(d.shru(32)),d=(d=d.and(i)).add(e.mul(h)),l=l.add(d.shru(32)),d=(d=d.and(i)).add(r.mul(c)),l=l.add(d.shru(32)),d=d.and(i),l=l.add(u.mul(o)).add(s.mul(h)).add(e.mul(c)).add(r.mul(a)).and(i);var w=ue.fromBits(f.getLowBitsUnsigned(),v.getLowBitsUnsigned(),!0),g=ue.fromBits(d.getLowBitsUnsigned(),l.getLowBitsUnsigned(),!0);return t._F(w,g,this.SF())},n.HF=function(n){var i,r,e=n;if(e.kF())throw new RangeError("division by zero");if(this.kF())return this.SF()?[t.mF,t.mF]:[t.wF,t.wF];if(this.SF()){if(e.SF()||(e=e.xF()),e.CF(this))return[t.mF,this];if(e.CF(this.FF(1)))return[r=t.WF,i=this.lF(e)];r=t.mF}else{if(this.zO(t.AF)){if(e.zO(t.UF)||e.zO(t.qF))return[t.AF,t.wF];if(e.zO(t.AF))return[t.UF,t.wF];var s=this.OF(1).zF(e).LF(1);return s.zO(t.wF)?r=e.cF()?t.UF:t.qF:(i=this.lF(e.VF(s)),r=s.lO(i.zF(e))),[r,i=this.lF(e.VF(r))]}if(e.zO(t.AF))return this.SF()?[t.mF,this]:[t.wF,this];var u,o;if(this.cF())return e.cF()?this.dF().HF(e.dF()):(r=(u=this.dF().HF(e))[0],i=u[1],[r.dF(),i.dF()]);if(e.cF())return r=(o=this.HF(e.dF()))[0],i=o[1],[r.dF(),i.dF()];r=t.wF}for(i=this;i.DF(e);){for(var h=b.max(1,b.floor(i.iF()/e.iF())),c=b.ceil(b.log(h)/b.LN2),a=c<=48?1:b.pow(2,c-48),f=t.pF(h),v=f.VF(e);v.cF()||v.CF(i);)h-=a,v=(f=t.pF(h,this.SF())).VF(e);f.kF()&&(f=t.UF),r=r.lO(f),i=i.lF(v)}return[r,i]},n.zF=function(t){return this.HF(t)[0]},n.GF=function(t){return this.HF(t)[1]},n.toString=function(n){var i=n||10;if(i<2||i>36)throw new RangeError("radix");if(this.kF())return"0";if(this.cF()){if(this.zO(t.AF)){var r=t.pF(i),e=this.zF(r),s=e.VF(r).lF(this);return e.toString(i)+s.RF().toString(i)}return"-"+this.dF().toString(i)}for(var u=t.pF(b.pow(i,6),this.SF()),o=this,h="";;){var c=o.zF(u),a=(o.lF(c.VF(u)).RF()>>>0).toString(i);if((o=c).kF())return a+h;for(;a.length<6;)a="0"+a;h=String(a)+h}},t._F=function(n,i,r){return r?new t(n.toUnsigned(),i.toUnsigned()):new t(n.toSigned(),i.toSigned())},t.gF=function(n){return n.unsigned?new t(n,ue.UZERO):new t(n,n.isNegative()?ue.NEG_ONE:ue.ZERO)},t.pF=function(n,i){if(S(n))return i?t.mF:t.wF;if(i){if(n<0)return t.mF;if(n>=c_)return t.yF}else{if(n<=-a_)return t.AF;if(n+1>=a_)return t.bF}return n<0?t.pF(-n,i).dF():t._F(ue.fromNumber(n%h_),ue.fromNumber(n/h_),i)},t}();f_.wF=f_.gF(ue.ZERO),f_.mF=f_.gF(ue.UZERO),f_.UF=f_.gF(ue.ONE),f_.WF=f_.gF(ue.UONE),f_.qF=f_.gF(ue.NEG_ONE),f_.bF=f_._F(ue.NEG_ONE,ue.MAX_VALUE,!1),f_.yF=f_._F(ue.MAX_UNSIGNED_VALUE,ue.MAX_UNSIGNED_VALUE,!0),f_.AF=f_._F(ue.ZERO,ue.MIN_VALUE,!1),F(),Et(),Bt();var v_=function(){function t(t,n){void 0===n&&(n=1),this.XF=void 0,this.qD=void 0,this.XF=t,this.qD=n}var n=t.prototype;return n.lO=function(n){return this.qD>=n.qD?new t(this.XF+n.JF(this.qD).XF,this.qD):new t(this.JF(n.qD).XF+n.XF,n.qD)},n.eF=function(t){return t.aF(this)},n.nF=function(t){return t.hF(this)},n.oF=function(n){return this.qD>=n.qD?new t(b.abs(this.XF-n.JF(this.qD).XF),this.qD):n.oF(this)},n.rF=function(t,n){return this.oF(t).hF(n)},n.sF=function(t){return function(t,n){return t.qD>=n.qD?Mi(t.XF,n.JF(t.qD).XF):Mi(t.JF(n.qD).XF,n.XF)}(this,t)},n.zO=function(t){return 0===this.sF(t)},n.aF=function(t){return this.sF(t)<0},n.hF=function(t){return this.sF(t)<=0},n.JF=function(n){return new t(this.XF*(n/this.qD),n)},n.lF=function(n){return this.qD>=n.qD?new t(this.XF-n.JF(this.qD).XF,this.qD):new t(this.JF(n.qD).XF-n.XF,n.qD)},n.ZF=function(n){return new t(this.XF*n,this.qD)},t.jF=function(n){return new t(b.ceil(n.XF),n.qD)},t.QF=function(n){return new t(b.floor(n.XF),n.qD)},t.KF=function(t,n){return t.nF(n)?t:n},t.YF=function(t,n){return t.hF(n)?t:n},Nt(t,[{key:"vF",get:function(){return!isFinite(this.XF)}},{key:"dd",get:function(){return this.XF/this.qD}}]),t}();v_.fd=new v_(1/6,1),v_.wF=new v_(0),v_.tU=new v_(1/0),v_.iU=1e6;var d_=function(t){function n(n,i){var r;return(r=t.call(this)||this).zE=void 0,r.qD=void 0,r.zE=n.toSigned(),r.qD=i>>>0,r}Ct(n,t);var i=n.prototype;return i.cF=function(){return this.zE.isNegative()},i.kF=function(){return 0!==this.qD&&this.zE.isZero()},i.vF=function(){return 0===this.qD&&!this.zE.isZero()},i.fF=function(){return 0===this.qD&&this.zE.isZero()},i.iF=function(){if(0===this.qD)return this.zE.isZero()?NaN:this.zE.isNegative()?-1/0:1/0;var t=this.zE.divide(this.qD),n=this.zE.subtract(t.multiply(this.qD));return t.toNumber()+n.toNumber()/this.qD},i.IF=function(){if(0===this.qD)throw new y("Failed to convert timestamp");return this.zE},i.uU=function(){return new Date(0===this.qD?NaN:this.JF(1e3).zE.toNumber())},i.cU=function(){return new v_(0===this.qD?this.iF():this.zE.toNumber(),this.qD)},i.JF=function(t,i){void 0===i&&(i=w_.dU);var r=this.qD;if(r===t)return this;if(0===r)return this;var e=Di(r,t),s=function(t,n,i){var r=t.HF(n),e=r[0],s=r[1];if(s.kF())return e;if(i===w_.dU)return s.cF()?e.lF(f_.UF):e;if(i===w_.lU)return s.cF()?e:e.lO(f_.UF);var u=s.VF(f_.pF(2));return u.cF()?u.dF().aF(n)?e:e.lF(f_.UF):u.aF(n)?e:e.lO(f_.UF)}(f_.gF(this.zE).VF(f_.pF(t/e)),f_.pF(r/e),i);return new n(s.IF(),t)},i.sF=function(t){if(this===t)return Ni.rh;if(0===this.qD||0===t.qD)return u_(this,t);if(this.kF())return t.kF()?Ni.rh:t.cF()?Ni.Fg:Ni.Ug;if(t.kF())return this.cF()?Ni.Ug:Ni.Fg;var n=b.min(this.qD,t.qD),i=this.JF(n,w_.fU).zE,r=t.JF(n,w_.fU).zE;return i.compare(r)},i.dF=function(){return 0===this.qD?function(t){0;return t.fF()?t:t.cF()?d_.nU:d_.rU}(this):new n(this.zE.negate(),this.qD)},i.lO=function(t){if(0===this.qD||0===t.qD)return function(t,n){0;if(t.fF()||n.fF())return d_.sU;if(t.vF()&&n.vF())return t.cF()===n.cF()?t:d_.sU;return t.vF()?t:n}(this,t);if(this.kF())return t;if(t.kF())return this;var i=b.max(this.qD,t.qD),r=this.JF(i,w_.fU),e=t.JF(i,w_.fU);return new n(r.zE.add(e.zE),i)},i.VF=function(t){if(this.fF()||S(t))return n.sU;if(this.vF()||!isFinite(t)){if(this.kF()||0===t)return n.sU;var i=this.cF()?n.rU:n.nU;return t<0?i.dF():i}return this.kF()?this:new n(0===t?ue.ZERO:this.zE.multiply(t),this.qD)},i.zF=function(t){if(this.fF()||S(t))return n.sU;if(this.vF())return isFinite(t)?0===t?1/t<0?this.dF():this:t<0?this.dF():this:n.sU;if(!isFinite(t))return new n(ue.ZERO,this.qD);if(this.kF())return 0===t?n.sU:new n(ue.ZERO,this.qD);if(0===t){var i=this.cF()?n.rU:n.nU;return 1/t<0?i.dF():i}return new n(this.zE.divide(t),this.qD)},i.vU=function(){return[this.zE.low,this.zE.high,this.qD]},n.eU=function(t,i){return void 0===i&&(i=e_),n.pF(t*i,i)},n.pF=function(t,i){return S(t)?n.sU:t===1/0?n.nU:t===-1/0?n.rU:new n(ue.fromNumber(t),i)},n.gF=function(t,i){return new n(t,i)},n.hU=function(t){return n.eU(t.dd,e_)},n.oU=function(t){return new n(ue.fromNumber(t.getTime()),1e3)},n.KF=function(t,n){return t.nF(n)?t:n},n.YF=function(t,n){return t.hF(n)?t:n},n.aU=function(t,i,r){return n.KF(i,n.YF(r,t))},n}(s_);d_.wF=new d_(ue.ZERO,e_),d_.sU=new d_(ue.ZERO,0),d_.nU=new d_(ue.ONE,0),d_.rU=new d_(ue.NEG_ONE,0),F(),Et(),Bt(),Dt(),at();var l_=function(t){function n(n,i){var r;return(r=t.call(this)||this).zE=void 0,r.qD=void 0,r.zE=BigInt.asIntN(64,n),r.qD=i>>>0,r}Ct(n,t);var i=n.prototype;return i.cF=function(){return this.zE>BigInt(32)&BigInt(4294967295);return ue.fromBits(Number(t),Number(n))},i.uU=function(){return new Date(0===this.qD?NaN:Number(this.JF(1e3).zE))},i.cU=function(){return new v_(0===this.qD?this.iF():Number(this.zE),this.qD)},i.JF=function(t,i){void 0===i&&(i=w_.dU);var r=this.qD;if(r===t)return this;if(0===r)return this;var e=Di(r,t),s=function(t,n,i){var r=t/n,e=t-r*n;if(e===BigInt(0))return r;if(i===w_.dU)return er?Ni.Fg:i>>0),i)},n.hU=function(t){return n.eU(t.dd,e_)},n.oU=function(t){return n.pF(t.getTime(),1e3)},n.KF=function(t,n){return t.nF(n)?t:n},n.YF=function(t,n){return t.hF(n)?t:n},n.aU=function(t,i,r){return n.KF(i,n.YF(r,t))},Nt(n,null,[{key:"wF",get:function(){return n._U||(n._U=new n(BigInt(0),e_)),n._U}},{key:"sU",get:function(){return n.gU||(n.gU=new n(BigInt(0),0)),n.gU}},{key:"nU",get:function(){return n.pU||(n.pU=new n(BigInt(1),0)),n.pU}},{key:"rU",get:function(){return n.mU||(n.mU=new n(BigInt(-1),0)),n.mU}}]),n}(s_);l_._U=void 0,l_.gU=void 0,l_.pU=void 0,l_.mU=void 0;var w_=function(t){return t[t.dU=0]="dU",t[t.lU=1]="lU",t[t.fU=2]="fU",t}({}),g_=function(){try{return"function"==typeof BigInt&&"bigint"===W(BigInt(0))}catch(t){return!1}}()?l_:d_;function __(t,n){return t.sF(n)}function m_(t,n){return void 0!==t?void 0!==n?g_.YF(t,n):t:n}F(),Et();var y_=b.pow(2,33),p_=_i(function(){return g_.pF(y_,9e4)}),k_=_i(function(){return p_().zF(2)});F(),Et();var b_={yU:0,AU:1/0,bU:0},A_=["WEBVTT","WEBVTT ","WEBVTT\t","WEBVTT\n"],T_=[" ","\t","\n","\f","\r"],S_=/^\d*$/,E_=/.*[0-9]+.*/,I_=/^[\d.-]+$/,R_=/(^\.|\.$)/,C_=/(\D\.|\.\D)/;function D_(t,n,i){return void 0===n&&(n=b_),void 0===i&&(i=!0),P_(lc(_c(t),new Tc),n,i)}function P_(t,n,i){void 0===n&&(n=b_),void 0===i&&(i=!0);var r={L:[],SU:[],TU:[]},e=N_(t),s=new Tc,u=!1;if(X_(e),B_(e,function(t){return"\n"!==t},s),s.ac>=e.length)return r;(s.Ny(1),"\n"!==e.charAt(s.ac))?U_(x_(e,s,u,!0,r,n,i),r):s.Ny(1);for(B_(e,function(t){return"\n"===t},s);s.ac=t.length?f=!0:n.Ny(1),Lo(o,"--\x3e")){if(r||1!==h&&(2!==h||v)){n.My(c);break}v=!0,c=n.ac,d=new Jg(0,0,"",!1,a);try{F_(o,e.SU,d,s,u),a=""}catch(t){Vn.um(t),d=null}}else{if(""===o)break;r&&Uo(o,"X-TIMESTAMP-MAP")&&(e.kU=O_(o)),r||2!==h||i||(Vo("STYLE",a.replace(/ /g,""))?(l={Km:Ng.SO},a=""):Vo("REGION",a.replace(/ /g,""))&&(w=new r_("",100,3,0,100,0,100,""),a="")),a&&(a+="\n"),a+=o,c=n.ac}if(d)return d.U=a,d;if(l);else if(w)return function(t,n){for(var i,r=t.split(/\s/),e=":",s=Lt(r);!(i=s()).done;){var u=i.value;if(0!==u.length&&Lo(u,e)&&u.charAt(0)!==e&&u.charAt(u.length-1)!==e){var o=u.indexOf(e),h=u.substring(0,o),c=u.substring(o+1,u.length);switch(h.toUpperCase()){case"ID":im(c,n);break;case"WIDTH":sm(c,n);break;case"LINES":em(c,n);break;case"REGIONANCHOR":var a=nm(c);a&&(n.KO=a[0],n.YO=a[1]);break;case"VIEWPORTANCHOR":var f=nm(c);f&&(n.ZO=f[0],n.$O=f[1]);break;case"SCROLL":rm(c,n)}}}}(a,w),w;return null}function O_(t){var n,i=t.split("=")[1].trim().split(","),r=L_(i[0].trim(),"MPEGTS")?i[0]:i[1],e=L_(i[0].trim(),"LOCAL")?i[0]:i[1];return{EU:M_(Number(r.split(/:(.*)/)[1].trim())||0),bh:g_.eU(null!=(n=W_(e.split(/:(.*)/)[1].trim(),new Tc))?n:0)}}function M_(t){return g_.pF(t,9e4)}function L_(t,n){return Uo(t,n)}function U_(t,n){t&&function(t){return"cue"===t.Km}(t)?n.L.push(t):t&&function(t){return"region"===t.Km}(t)?n.SU.push(t):t&&function(t){return"stylesheet"===t.Km}(t)&&n.TU.push(t)}function F_(t,n,i,r,e){var s=new Tc;G_(t,s);var u=V_(W_(t,s),r,e);if(G_(t,s),"--\x3e"!==t.substring(s.ac,s.ac+3))throw y("Something went wrong with parsing a WebVTT Cue");s.Ny(3),G_(t,s);var o=V_(W_(t,s),r,e);i.XO(u,o),function(t,n,i){for(var r,e=t.split(/\s/),s=":",u=Lt(e);!(r=u()).done;){var o=r.value;if(0!==o.length&&Lo(o,s)&&o.charAt(0)!==s&&o.charAt(o.length-1)!==s){var h=o.indexOf(s),c=o.substring(0,h),a=o.substring(h+1,o.length);switch(c.toUpperCase()){case"REGION":J_(a,n,i);break;case"VERTICAL":$_(a,n);break;case"D":tm(a,n);break;case"LINE":case"L":Y_(a,n);break;case"POSITION":case"T":K_(a,n);break;case"SIZE":case"S":Z_(a,n);break;case"ALIGN":case"A":Q_(a,n)}}}}(t.substring(s.ac,t.length),i,n)}function V_(t,n,i){return i?t+n.yU:t}function H_(t){return/^[0-9]$/.test(t)}function W_(t,n){var i,r,e,s=Mo(t,",","."),u=!1;if(n.ac>=s.length||!H_(s.charAt(n.ac)))throw new y("Something went wrong with parsing a WebVTT Cue timestamp");var o=B_(s,H_,n),h=A(o,10);if((o.length>2||h>59)&&(u=!0),n.ac>=s.length||":"!==s.charAt(n.ac))throw new y("Something went wrong with parsing a WebVTT Cue timestamp");n.Ny(1);var c=B_(s,H_,n);if(2!==c.length)throw new y("Something went wrong with parsing a WebVTT Cue timestamp");var a=A(c,10);if(u||n.ac=s.length||":"!==s.charAt(n.ac))throw new y("Something went wrong with parsing a WebVTT Cue timestamp");n.Ny(1);var f=B_(s,H_,n);if(2!==c.length)throw new y("Something went wrong with parsing a WebVTT Cue timestamp");i=h,r=a,e=A(f,10)}else i=0,r=h,e=a;if(n.ac>=s.length||"."!==s.charAt(n.ac))throw new y("Something went wrong with parsing a WebVTT Cue timestamp");n.Ny(1);var v=B_(s,H_,n),d=A(v,10);if(a>59||e>59)throw new y("Something went wrong with parsing a WebVTT Cue timestamp");return 60*i*60+60*r+e+d/1e3}function z_(t){return X_(N_(t))}function X_(t){if(t.length<6)return!1;for(var n,i=Lt(A_);!(n=i()).done;){var r=n.value;if(Uo(t,r))return!0}return!1}function q_(t){return ji(T_,t)}function G_(t,n){for(;n.ac-1){var i=T(t.substring(0,n));if(!S(i)&&i>=0&&i<=100)return i}return null}function Q_(t,n){var i=t.toLowerCase();switch(i){case"start":case"center":case"end":case"left":case"right":n.xO=i;break;case"middle":n.xO="center"}}function Y_(t,n){var i,r,e=t.indexOf(",");if(e>=0?(i=t.substring(0,e),r=t.substring(e+1,t.length)):(i=t,r=""),E_.test(i)){var s,u;if(Fo(i,"%")){var o=j_(i);if(null===o)return;s=o,u=!1}else{if(!I_.test(i)||i.lastIndexOf("-")>0)return;var h=i.indexOf(".");if(h>=0&&(h!==i.lastIndexOf(".")||!C_.test(i)||R_.test(i)))return;if(s=T(i),S(s))return;u=!0}switch(n.IO=s,n.BO=u,r=r.toLowerCase()){case"start":case"center":case"end":n.RO=r;break;case"middle":n.RO="center"}}}function K_(t,n){var i,r,e=t.indexOf(",");e>=0?(i=t.substring(0,e),r=t.substring(e+1,t.length)):(i=t,r="");var s=j_(i);if(null!==s)switch(n.mo=s,r=r.toLowerCase()){case"line-left":case"center":case"line-right":case"auto":n.CO=r;break;case"start":n.CO="line-left";break;case"middle":n.CO="center";break;case"end":n.CO="line-right"}}function J_(t,n,i){var r=Vi(i,function(n){return n.o===t});void 0!==r&&(n.DO=r)}function Z_(t,n){var i=j_(t);null!==i&&(n.Vy=i)}function $_(t,n){switch(t.toLowerCase()){case"rl":case"vertical:rl":case"vertical-rl":n.Pt="rl";break;case"lr":case"vertical:lr":case"vertical-lr":n.Pt="lr";break;default:n.Pt=""}}function tm(t,n){"VERTICAL"===t.toUpperCase()?n.Pt="rl":"VERTICAL-LR"===t.toUpperCase()&&(n.Pt="lr")}function nm(t){if(t.indexOf(",")>=0){var n=j_(t.substring(0,t.indexOf(","))),i=j_(t.substring(t.indexOf(",")+1,t.length));return[Ti(n||0,0,100),Ti(i||100,0,100)]}return null}function im(t,n){n.o=t}function rm(t,n){"up"===t.toLowerCase()&&(n.JO="up")}function em(t,n){S_.test(t)&&(n.QO=A(t))}function sm(t,n){var i=j_(t);null!==i&&(n.Ti=i)}F(),Et(),Ut(),F(),Et(),Ut(),F(),Et();var um=function(t){return t.OR="moov",t.FR="mvhd",t.UR="trak",t.HR="tkhd",t.WR="mdia",t.qR="mdhd",t.zR="hdlr",t.GR="minf",t.XR="stbl",t.jR="stsd",t.QR="stsc",t.KR="mvex",t.YR="trex",t.JR="avc1",t.ZR="avcC",t.$R="hev1",t.tC="hvc1",t.iC="hvcC",t.eC="vp09",t.sC="vpcC",t.nC="av01",t.rC="av1C",t.hC="dvcC",t.oC="dvvC",t.aC="dvwC",t.uC="dac3",t.cC="dec3",t.dC="dvav",t.lC="dva1",t.fC="dvhe",t.vC="dvh1",t._C="ac-3",t.gC="ec-3",t.pC="colr",t.mC="pasp",t.wC="mp4a",t.yC="esds",t.AC="fLaC",t.bC="dfLa",t.SC="wvtt",t.TC="vttC",t.kC="vlab",t.EC="enca",t.xC="encv",t.IC="moof",t.RC="mfhd",t.DC="traf",t.BC="tfhd",t.NC="trun",t.MC="tfdt",t.LC="senc",t.OC="mdat",t.FC="pssh",t.VC="emsg",t.HC="sidx",t.WC="styp",t.qC="ftyp",t.zC="sinf",t.GC="frma",t.XC="schi",t.jC="tenc",t}({}),om=function(t){return t.ON_SCREEN_COLOURS="nclx",t.RESTRICTED_ICC_PROFILE="rICC",t.UNRESTRICED_ICC_PROFILE="prof",t}({}),hm=function(t){return t[t.BASE_DATA_OFFSET_PRESENT=1]="BASE_DATA_OFFSET_PRESENT",t[t.SAMPLE_DESCRIPTION_INDEX_PRESENT=2]="SAMPLE_DESCRIPTION_INDEX_PRESENT",t[t.DEFAULT_SAMPLE_DURATION_PRESENT=8]="DEFAULT_SAMPLE_DURATION_PRESENT",t[t.DEFAULT_SAMPLE_SIZE_PRESENT=16]="DEFAULT_SAMPLE_SIZE_PRESENT",t[t.DEFAULT_SAMPLE_FLAGS_PRESENT=32]="DEFAULT_SAMPLE_FLAGS_PRESENT",t[t.DURATION_IS_EMPTY=65536]="DURATION_IS_EMPTY",t[t.DEFAULT_BASE_IS_MOOF=131072]="DEFAULT_BASE_IS_MOOF",t}({}),cm=function(t){return t[t.DATA_OFFSET_PRESENT=1]="DATA_OFFSET_PRESENT",t[t.FIRST_SAMPLE_FLAGS_PRESENT=4]="FIRST_SAMPLE_FLAGS_PRESENT",t[t.SAMPLE_DURATION_PRESENT=256]="SAMPLE_DURATION_PRESENT",t[t.SAMPLE_SIZE_PRESENT=512]="SAMPLE_SIZE_PRESENT",t[t.SAMPLE_FLAGS_PRESENT=1024]="SAMPLE_FLAGS_PRESENT",t[t.SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT=2048]="SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT",t}({});F(),Et();var am=function(){function t(t,n){this.ck=void 0,this.KC=void 0,this.ck=t,this.KC=n}var n=t.prototype;return n.QC=function(){return Mh(this.ck,this.KC)},n.YC=function(){return zh(this.ck,this.KC)},n.JC=function(){return function(t,n,i){void 0===i&&(i=!1);var r=t.getInt16(n.ac,i);return n.Ny(2),r}(this.ck,this.KC)},n.ZC=function(){return qh(this.ck,this.KC)},n.$C=function(){return function(t,n,i){void 0===i&&(i=!1);var r=t.getInt32(n.ac,i);return n.Ny(4),r}(this.ck,this.KC)},n.tD=function(){return jh(this.ck,this.KC)},n.iD=function(t){return Uh(this.ck,this.KC,t)},n.eD=function(t){return function(t,n,i){for(var r=[],e=0;en.byteLength){var c=h;return i.My(e),{cD:!1,pD:c}}var a={Km:u.Km,ac:e,ck:new am(gc(n,e,h),new Tc(u.mD))};return i.My(h),{cD:!0,lD:a}},t._D=function(t,n){var i=n.ac;if(!Vh(t,n,8))return{cD:!1,pD:n.ac+8};var r=qh(t,n),e=Kh(t,n,4);if(1===r){if(!Vh(t,n,8)){var s=n.ac+8;return n.My(i),{cD:!1,pD:s}}r=jh(t,n).toNumber()}if("uuid"===e){if(!Vh(t,n,16)){var u=n.ac+16;return n.My(i),{cD:!1,pD:u}}e=Kh(t,n,16)}return{cD:!0,gD:{Km:e,Vy:r,mD:n.ac-i}}},t.wD=function(t,n,i){var r=t.ck,e=t.KC,s=wc(mc(r),e.ac,r.byteLength);return i&&(s=bc(s)),e.Ny(s.byteLength),{Km:n,ck:s}},t.yD=function(n,i,r){var e=mm(n.ZC());return{Km:i,bD:e.version,SD:e.flags,ck:t.wD(n,i,r).ck}},t}();function wm(t,n){var i=gm(t,n);if(!i)throw new y("Missing "+n+" atom");return i}function gm(t,n){for(var i,r=Lt(t);!(i=r()).done;){var e=i.value;if(e.Km===n)return e.ck}}function _m(t,n){for(var i,r=[],e=Lt(t);!(i=e()).done;){var s=i.value;s.Km===n&&r.push(s.ck)}return r}function mm(t){return{version:t>>24,flags:new Bh(16777215&t)}}var ym=function(){function t(){}return t.TD=function(n){for(var i,r=[],e=Lt(lm.aD(new am(n,new Tc)));!(i=e()).done;){var s=i.value,u=t.kD(s);u&&r.push(u)}return r},t.ED=function(t){return lm.uD(t,new Tc,!1).m.some(this.PD)},t.xD=function(n){return _m(lm.aD(new am(n,new Tc)),um.FC).map(t.RD)},t.CD=function(n){return _m(lm.aD(n.ck),um.FC).map(t.RD)},t.PD=function(t){return t.Km===um.qC||t.Km===um.WC||t.Km===um.OR||t.Km===um.IC||t.Km===um.OC||t.Km===um.HC||t.Km===um.VC},t.kD=function(n){switch(n.Km){case um.OR:return t.DD(n.ck);case um.IC:return t.BD(n.ck,n.ac);case um.OC:return t.ND(n.ck);case um.HC:return t.MD(n.ck);case um.VC:return t.LD(n.ck)}},t.DD=function(n){var i=lm.aD(n),r=wm(i,um.FR),e=_m(i,um.UR),s=gm(i,um.KR),u=t.OD(r),o=e.map(t.FD),h=s?t.UD(s):void 0;return{Km:um.OR,gD:u,Z:o,VD:h}},t.OD=function(t){var n=mm(t.ZC()),i=n.version,r=n.flags,e=1===i?t.tD():t.ZC(),s=1===i?t.tD():t.ZC(),u=t.ZC(),o=1===i?t.tD():t.ZC(),h=t.ZC(),c=t.YC()>>8;t.rD(2),t.rD(8);var a=t.eD(9);t.rD(24);var f=t.ZC();return{Km:um.FR,bD:i,SD:r,HD:e,WD:s,qD:u,ct:o,zD:h,Mx:c,GD:a,XD:f}},t.FD=function(n){var i=lm.aD(n),r=wm(i,um.HR),e=wm(i,um.WR),s=t.jD(r),u=t.QD(e);return{Km:um.UR,gD:s,KD:u}},t.jD=function(t){var n=mm(t.ZC()),i=n.version,r=n.flags,e=1===i?t.tD():t.ZC(),s=1===i?t.tD():t.ZC(),u=t.ZC();t.rD(4);var o=1===i?t.tD():t.ZC();t.rD(8);var h=t.JC(),c=t.JC(),a=t.JC()/b.pow(2,8);t.rD(2);var f=t.eD(9),v=t.ZC()/b.pow(2,16),d=t.ZC()/b.pow(2,16);return{Km:um.HR,YD:r.Oy(1),JD:r.Oy(2),ZD:r.Oy(4),HD:e,WD:s,$D:u,ct:o,tB:h,iB:c,Mx:a,GD:f,Ti:v,Mi:d}},t.QD=function(n){var i=lm.aD(n),r=wm(i,um.qR),e=wm(i,um.zR),s=wm(i,um.GR),u=t.eB(r),o=t.sB(e),h=t.nB(s);return{Km:um.WR,gD:u,rB:o,hB:h}},t.eB=function(t){var n=mm(t.ZC()),i=n.version,r=n.flags,e=1===i?t.tD():t.ZC(),s=1===i?t.tD():t.ZC(),u=t.ZC(),o=1===i?t.tD():t.ZC();t.YC();return t.rD(2),{Km:um.qR,bD:i,SD:r,HD:e,WD:s,qD:u,ct:o}},t.sB=function(t){var n=mm(t.ZC()),i=n.version,r=n.flags;t.rD(4);var e=t.sD(4);t.rD(12);var s=t.nD();return{Km:um.zR,bD:i,SD:r,oB:e,l:s}},t.nB=function(n){var i=wm(lm.aD(n),um.XR),r=t.aB(i);return{Km:um.GR,uB:r}},t.aB=function(n){var i=wm(lm.aD(n),um.jR),r=t.cB(i);return{Km:um.XR,dB:r}},t.cB=function(n){for(var i,r=mm(n.ZC()),e=r.version,s=r.flags,u=(n.ZC(),[]),o=Lt(lm.aD(n));!(i=o()).done;){var h=i.value,c=t.lB(h.ck,h.Km);c&&u.push(c)}return{Km:um.jR,bD:e,SD:s,fB:u}},t.lB=function(n,i){var r=t.vB(n,i);return r||((r=t._B(n,i))||(i===um.SC?t.gB(n):void 0))},t.vB=function(n,i){return i===um.wC?t.pB(n):i===um.AC||i===um.AC.toLowerCase()||i===um.AC.toUpperCase()?t.mB(n):i===um.EC?t.wB(n):i===um._C?t.yB(n):i===um.gC?t.AB(n):void 0},t._B=function(n,i){return i===um.JR?t.bB(n):i===um.$R||i===um.tC?t.SB(n,i):i===um.eC?t.TB(n,i):i===um.nC?t.kB(n,i):i===um.xC?t.EB(n):i===um.dC||i===um.lC||i===um.fC||i===um.vC?t.PB(n,i):void 0},t.xB=function(t,n){return t.rD(6),{Km:n,IB:t.YC()}},t.RB=function(n,i){var r=t.xB(n,i);n.rD(8);var e=n.YC(),s=n.YC();return n.rD(2),n.rD(2),Yu({},r,{CB:e,DB:s,BB:n.ZC()>>>16})},t.NB=function(n,i){var r=t.xB(n,i);n.rD(2),n.rD(2),n.rD(12);var e=n.YC(),s=n.YC(),u=n.ZC(),o=n.ZC();n.rD(4);var h=n.YC();n.rD(32);var c=n.YC();return n.rD(2),Yu({},r,{Ti:e,Mi:s,MB:u,LB:o,OB:h,FB:c})},t.pB=function(n){var i=t.RB(n,um.wC),r=wm(lm.aD(n),um.yC);return Yu({},i,{UB:t.VB(r)})},t.mB=function(n){var i=t.RB(n,um.AC),r=wm(lm.aD(n),um.bC);return Yu({},i,{HB:t.WB(r)})},t.gB=function(n){var i=t.xB(n,um.SC),r=lm.aD(n),e=wm(r,um.TC),s=t.qB(e),u=gm(r,um.kC);return Yu({},i,{zB:s,GB:u?t.XB(u):void 0})},t.qB=function(t){return{Km:um.TC,Cd:t.nD()}},t.XB=function(t){return{Km:um.kC,Th:t.nD()}},t.VB=function(t){return lm.yD(t,um.yC,!0)},t.WB=function(t){return lm.yD(t,um.bC,!0)},t.bB=function(n){var i=t.NB(n,um.JR),r=lm.aD(n),e=wm(r,um.ZR),s=gm(r,um.mC);return Yu({},i,{jB:t.QB(e),KB:s?t.YB(s):void 0})},t.SB=function(n,i){var r=t.NB(n,i),e=wm(lm.aD(n),um.iC);return Yu({},r,{JB:t.ZB(e)})},t.TB=function(n,i){var r=t.NB(n,i),e=wm(lm.aD(n),um.sC);return Yu({},r,{$B:t.tN(e)})},t.kB=function(n,i){var r=t.NB(n,i),e=lm.aD(n),s=wm(e,um.rC),u=t.iN(s),o=gm(e,um.pC);return Yu({},r,{eN:u,sN:o?t.nN(o):void 0})},t.EB=function(n){var i=n.Ly(),r=t.NB(n,um.xC),e=wm(lm.aD(n),um.zC),s=t.rN(e);return Yu({},r,{hN:t._B(i,s.aN.oN),uN:s})},t.PB=function(n,i){var r=t.NB(n,i),e=lm.aD(n);return Yu({},r,{cN:t.dN(e)})},t.yB=function(n){var i=t.RB(n,um._C),r=wm(lm.aD(n),um.uC);return Yu({},i,{lN:t.fN(r)})},t.AB=function(n){var i=t.RB(n,um.gC),r=wm(lm.aD(n),um.cC);return Yu({},i,{vN:t._N(r)})},t.wB=function(n){var i=n.Ly(),r=t.RB(n,um.EC),e=wm(lm.aD(n),um.zC),s=t.rN(e);return Yu({},r,{hN:t.vB(i,s.aN.oN),uN:s})},t.rN=function(n){var i=lm.aD(n),r=wm(i,um.GC),e=t.gN(r),s=wm(i,um.XC),u=t.pN(s);return{Km:um.zC,aN:e,mN:u}},t.gN=function(t){var n=t.sD(4);return{Km:um.GC,oN:n}},t.pN=function(n){var i=wm(lm.aD(n),um.jC),r=t.wN(i);return{Km:um.XC,yN:r}},t.wN=function(t){var n=mm(qh(t.ck,t.KC)),i=n.version,r=n.flags,e=t.QC()>0,s=t.QC(),u=t.iD(16);return{Km:um.jC,bD:i,SD:r,AN:e,bN:s,SN:u}},t.QB=function(t){return lm.wD(t,um.ZR,!0)},t.ZB=function(t){return lm.wD(t,um.iC,!0)},t.dN=function(t){var n=gm(t,um.hC);if(void 0!==n)return lm.wD(n,um.hC,!0);var i=gm(t,um.oC);if(void 0!==i)return lm.wD(i,um.oC,!0);var r=gm(t,um.aC);if(void 0!==r)return lm.wD(r,um.aC,!0);throw y("Error parsing Dolby Vision configuration box.")},t.fN=function(t){return lm.wD(t,um.uC,!0)},t._N=function(t){return lm.wD(t,um.cC,!0)},t.tN=function(t){return lm.wD(t,um.sC,!0)},t.iN=function(t){return lm.wD(t,um.rC,!0)},t.nN=function(t){var n=t.sD(4);switch(n){case"nclx":return{TN:om.ON_SCREEN_COLOURS,kN:t.YC(),EN:t.YC(),PN:t.YC(),xN:!!(128&t.QC())};case"rICC":return{TN:om.RESTRICTED_ICC_PROFILE};case"prof":return{TN:om.UNRESTRICED_ICC_PROFILE};default:throw y("Could not parse ColourInformationBox: unknown type '"+n+"'.")}},t.YB=function(t){var n=t.ZC(),i=t.ZC();return{Km:um.mC,RN:n,CN:i}},t.UD=function(n){var i=_m(lm.aD(n),um.YR).map(t.DN);return{Km:um.KR,Z:i}},t.DN=function(t){var n=mm(t.ZC()),i=n.version,r=n.flags,e=t.ZC(),s=t.ZC(),u=t.ZC(),o=t.ZC(),h=t.ZC();return{Km:um.YR,bD:i,SD:r,$D:e,BN:s,NN:u,MN:o,LN:h}},t.BD=function(n,i){var r=lm.aD(n),e=wm(r,um.RC),s=_m(r,um.DC),u=t.ON(e),o=s.map(t.FN);return{Km:um.IC,UN:i,gD:u,Z:o}},t.ON=function(t){var n=mm(t.ZC()),i=n.version,r=n.flags,e=t.ZC();return{Km:um.RC,bD:i,SD:r,VN:e}},t.FN=function(n){var i=lm.aD(n),r=wm(i,um.BC),e=_m(i,um.NC),s=gm(i,um.MC),u=t.HN(r),o=e.map(function(n){return t.WN(n,u)}),h=s?t.qN(s):void 0;return{Km:um.DC,gD:u,zN:o,GN:h}},t.HN=function(t){var n=mm(t.ZC()),i=n.version,r=n.flags,e=t.ZC(),s=r.Oy(hm.BASE_DATA_OFFSET_PRESENT)?t.tD():void 0,u=r.Oy(hm.SAMPLE_DESCRIPTION_INDEX_PRESENT)?t.ZC():void 0,o=r.Oy(hm.DEFAULT_SAMPLE_DURATION_PRESENT)?t.ZC():void 0,h=r.Oy(hm.DEFAULT_SAMPLE_SIZE_PRESENT)?t.ZC():void 0,c=r.Oy(hm.DEFAULT_SAMPLE_FLAGS_PRESENT)?t.ZC():void 0;return{Km:um.BC,bD:i,SD:r,$D:e,XN:s,jN:u,NN:o,MN:h,LN:c}},t.WN=function(n,i){for(var r=mm(n.ZC()),e=r.version,s=r.flags,u=n.ZC(),o=s.Oy(cm.DATA_OFFSET_PRESENT)?n.$C():void 0,h=s.Oy(cm.FIRST_SAMPLE_FLAGS_PRESENT)?n.ZC():void 0,c=[],a=0;a0)for(var a=qh(i,r),f=0;f>31&1,w=2147483647&d,g=qh(r,e),_=qh(r,e),m=_>>31&1,y=_>>28&7,p=268435455&_;f.push({uM:l,cM:w,ct:g,dM:m,lM:y,fM:p})}return{Km:um.HC,bD:u,SD:o,vM:h,qD:c,_M:n,gM:i,pM:a,mM:f}},t.qN=function(t){var n,i=t.ck,r=t.KC,e=mm(qh(i,r)),s=e.version,u=e.flags;return n=0===s?ue.fromBits(qh(i,r),0,!0):jh(i,r),{Km:um.MC,bD:s,SD:u,GN:n}},t}();function pm(t){return t&&"$E"in t?t.$E:t}F(),Et(),Bt(),Dt(),F(),Et();var km=function(t){function n(n,i,r,e,s,u,o,h){var c;return(c=t.call(this,n,i,r,e)||this).xU=void 0,c.RU=void 0,c.CU=void 0,c.BU=void 0,c.xU=s,c.RU=u,c.CU=o,c.BU=h||void 0,c}return Ct(n,t),n.prototype.GO=function(t){return!!Mw(this.PU,t.PU)&&(!!Mw(this.IU,t.IU)&&(!!Mw(this.SU,t.SU)&&(this.DU&&t.DU?!!this.DU.GE(t.DU)&&(this.U&&t.U?this.U.GE(t.U):this.U===t.U):this.DU===t.DU)))},Nt(n,[{key:"PU",get:function(){return this.xU}},{key:"IU",get:function(){return this.RU}},{key:"SU",get:function(){return this.CU}},{key:"DU",get:function(){return this.BU}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return xw(Vg(t),{get extent(){return t.PU},get styles(){return t.IU},get regions(){return t.SU},get metadata(){return pm(t.DU)},get content(){return pm(t.U)}})}(this)),this.hu}}]),n}(Yg);F(),Et(),Bt();var bm=function(){function t(t,n,i){this.Lf=void 0,this.MU=void 0,this.LU=void 0,this.MU=t,this.LU=n,sw(i)?this.Lf=function(t,n,i){for(var r=0,e=["begin","end","dur"];r=t&&u<=n||s=n||st)&&r.push(i[e])}return r}(l[n],l[n+1],h);if(i.length<=0&&function(t){if(sw(t)){var n=t.VE.toUpperCase(),i=Boolean(t.sP("smpte:backgroundImage"));return"BR"===n||i}return t.FE===ew.NT}(t)){var r=t.XE(!1);c.push(new bm(l[n],l[n+1],r))}else if(i.length>0){var e=t.XE(!1);i.forEach(function(t){return e.tP(t.NU)}),c.push(new bm(l[n],l[n+1],e))}},u=n,o=i,h=[],c=[];if(sw(t)){var a,f;u=null!=(a=Lm(t.sP("begin"),r))?a:u,e=Lm(t.sP("dur"),0),o=null!=(f=Lm(t.sP("end"),r))?f:void 0!==e?u+e:o;for(var v=t.jE,d=0;d1||(h=h.concat(Mm(v[d],u,o,r)))}for(var l=function(t,n,i){var r=[];r.push(t,n);for(var e,s=Lt(i);!(e=s()).done;){var u=e.value;r.push(u.EO,u.PO)}r.sort(xi);for(var o=r.length,h=0;hi)break;n<=u.PO&&!ji(r,u)&&r.push(u)}}function oy(t,n){return Bi(t.jI,n.jI)}function hy(t,n,i,r){var e=function(t){switch(t){case Dg.WEBVTT:return"WebVTT";case Dg.SRT:return"SRT";case Dg.TTML:return"TTML";default:return""}}(t);return new $m(cd.SUBTITLE_PARSE_ERROR,"Could not parse the "+(e?e+" ":"")+"subtitle file.",n,i,r)}function cy(t,n){for(var i,r=[],e=Lt(t.L.II);!(i=e()).done;){var s=i.value;if(s.PO<=n)r.push(s);else if(s.EO>=n)break}for(var u,o=Lt(r);!(u=o()).done;){var h=u.value;t.WU(h)}}function ay(t,n){if(t.V>0)for(var i,r=t.Tn(0),e=b.max(0,r-10),s=Lt(n);!(i=s()).done;){i.value.qU(e)}}var fy=function(t){function n(n){var i;return(i=t.call(this)||this).JU=void 0,i.Z=new Qm,i.zU=0,i.GU=function(t){var n=t.Ht;i.XU(n)},i.JU=n,i}Ct(n,t);var i=n.prototype;return i.tt=function(t){t.wn(Dw.pa,this.GU),t.bU=this.bU,this.Z.tt(t),this.XU(t)},i.it=function(t){t.mn(Dw.pa,this.GU),t.Xk=Hm.Nh,this.Z.it(t)},i.jU=function(t){},i.QU=function(t){},i.XU=function(t){t.Xk!==Hm.Nh?this.jU(t):this.QU(t)},i.KU=function(){for(var t,n=Lt(this.Z.II);!(t=n()).done;){var i=t.value;i.mn(Dw.pa,this.GU),i.kn()}},i.qU=function(t){if(t>0)for(var n,i=Lt(this.Z.II);!(n=i()).done;){cy(n.value,t)}},i.YU=function(t){var n=this.JU;if(t!==n){this.JU=t;for(var i,r=Lt(this.Z.II.slice());!(i=r()).done;){var e=i.value,s=this.ZU(e,n,t);e!==s&&(this.it(e),this.tt(s),e.kn())}}},i.hr=function(){return this.KU(),this.Z.hr(),ut.resolve()},i.kn=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),[4,this.hr()];case 1:return t.sent(),this.Z.kn(),[2]}})}).call(this)},Nt(n,[{key:"bU",get:function(){return this.zU},set:function(t){this.zU=t;for(var n,i=Lt(this.Z.II);!(n=i()).done;){n.value.bU=t}}}]),n}(th);function vy(t,n,i){var r=i.tI(t.Lt,t.o,t.Th,t.bs,t.$U,t.Km,t.tR,t.QI);r.iR=t.iR,r.Ax=t.Ax,r.ZI=t.ZI,r.bU=t.bU;for(var e,s=Lt(t.L.II.slice());!(e=s()).done;){var u=e.value;t.WU(u),r.tV(u)}return r.Xk=t.Xk,n.iV(t),r}F(),Et(),Bt(),Dt();var dy=function(t){function n(n){var i;return(i=t.call(this,zm.ma)||this).errorObject=void 0,i.errorObject=n,i}return Ct(n,t),n.prototype.xa=function(){return this},Nt(n,[{key:"error",get:function(){return this.errorObject.message}}]),n}(kw),ly=function(t){function n(n,i){var r;return(r=t.call(this,n)||this).nV=void 0,r.rV=new hr,r.nV=i,r}Ct(n,t);var i=n.prototype;return i.eV=function(t){if(t.src){var n=t.kind||Ym.OU,i=this.JU.tI(n,t.id,t.label,t.srclang,t.default);return i.iR=Sl(t.src),this.tt(i),i}},i.sV=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c,a,f,v;return zt(this,function(d){switch(d.label){case 0:t.Ax=Cg.LOADING,i=new pl({Yu:t.iR,dk:Md.NT,Uk:wl.GET,Yg:n}),d.label=1;case 1:return d.trys.push([1,4,,5]),[4,this.nV.lk(i)];case 2:return s=d.sent(),e=s.hk,[4,s.UT()];case 3:return r=d.sent(),[3,5];case 4:return lr(u=d.sent()),t.Ax=Cg.ERROR,t.So(new dy(function(t,n){var i=n,r=0;if(ql(t)&&t.name===Cl.sE)i=t.lk.Yu;else if(Gl(t)){var e=t.oE;if(i=e.gk,0===(r=e.hk))return new $m(cd.SUBTITLE_CORS_ERROR,"Could not load the subtitle file. Make sure the source is set correctly and that CORS support is enabled.",i,r,t)}return new $m(cd.SUBTITLE_LOAD_ERROR,"Could not load the subtitle file.",i,r,t)}(u,t.iR))),[2];case 5:try{for(o=function(t){return z_(t)?Dg.WEBVTT:Vm(t)?Dg.TTML:Dg.SRT}(r),t.Km=o,h=[],o===Dg.WEBVTT||o===Dg.SRT?(c=P_(r),h=c.L):o===Dg.TTML&&(h=Dm(r,t)),a=Lt(h);!(f=a()).done;)v=f.value,t.tV(v)}catch(n){return lr(n),t.Ax=Cg.ERROR,t.So(new dy(hy(t.Km,t.iR,e,n))),[2]}return t.Ax=Cg.LOADED,[2]}})}).call(this)},i.jU=function(t){ji(this.Z.II,t)&&t.Ax===Cg.NONE&&this.sV(t,this.rV.Yg).catch(wr)},i.Un=function(){},i.ZU=function(t,n,i){return vy(t,n,i)},i.hr=function(){var n=this;return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:for(this.rV.Zg(),this.rV=new hr,i=Lt(this.Z.II);!(r=i()).done;)e=r.value,this.JU.iV(e);return[4,t.prototype.hr.call(n)];case 1:return s.sent(),[2]}})}).call(this)},n}(fy);function wy(t){return"TXXX"===t.id||"TXX"===t.id}F(),Et(),Wt(),Dt(),Ut(),Qt(),F(),Et();var gy=function(t){function n(n,i){var r;return(r=t.call(this,n)||this).oV=void 0,r.fV=void 0,r.pV=void 0,r.aV=void 0,r.gV=void 0,r.uV=void 0,r._V=void 0,r.oV=i,r.fV=Zu(),r.pV=function(t){t.mn(Dw.AI,r.aV),t.Km?t.Km===Dg.ID3&&(t.mn(Dw.hI,r.gV),0!==t.L.V?r.dV(t):t.wn(Dw.hI,r.gV)):t.wn(Dw.AI,r.aV)},r.aV=function(t){r.pV(t.Ht)},r.gV=function(t){r.pV(t.TO.Ht)},r.uV=function(t){var n=t.Ht;if(n.Km===Dg.ID3&&r.fV.has(n.jI)){var i=r.fV.get(n.jI);r.it(i),r.JU.iV(i),n.mn(Dw.AI,r.aV),n.mn(Dw.hI,r.gV),n.mn(Dw.hI,r._V)}},r._V=function(t){_y(t.TO)&&r.vV(t.TO)},r.hV(),r}Ct(n,t);var i=n.prototype;return i.hV=function(){this.oV.wn(Sw.eI,this.aV),this.oV.wn(Sw.nI,this.uV)},i.cV=function(){this.oV.mn(Sw.eI,this.aV),this.oV.mn(Sw.nI,this.uV)},i.dV=function(t){var n=t.L.II[0];if(_y(n)){var i=function(t){var n=t.match(my);if(!n)return;return{Ht:n[1],bs:n[2]}}(n.U.description),r=i.Ht,e=i.bs;if(!this.lV(r,e)){var s=this.JU.tI(Ym.OU,t.o,r,e,!1,Dg.TTML);this.tt(s),this.fV.set(t.jI,s);for(var u,o=Lt(t.L.II);!(u=o()).done;){var h=u.value;_y(h)&&this.vV(h)}t.wn(Dw.hI,this._V)}}},i.lV=function(t,n){return this.Z.II.some(function(i){return i.Th===t&&i.bs===n})},i.vV=function(t){if(t.Ht)for(var n,i=this.fV.get(t.Ht.jI),r=Lt(Dm(t.U.text,i,{yU:0,AU:1/0,bU:t.EO}));!(n=r()).done;){var e=n.value;i.tV(e)}},i.ZU=function(t,n,i){var r=this,e=vy(t,n,i);return this.fV.forEach(function(n,i){n===t&&r.fV.set(i,e)}),e},i.hr=function(){var n=this;return Vt(function(){var i,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:for(i=Lt(this.oV.II);!(r=i()).done;)(e=r.value).mn(Dw.AI,this.aV),e.mn(Dw.hI,this.gV),e.mn(Dw.hI,this._V);for(s=Lt(this.Z.II);!(u=s()).done;)o=u.value,this.JU.iV(o);return this.fV.clear(),[4,t.prototype.hr.call(n)];case 1:return h.sent(),[2]}})}).call(this)},i.kn=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.cV(),[4,t.prototype.kn.call(n)];case 1:return i.sent(),[2]}})}).call(this)},n}(fy);function _y(t){return function(t){return wy(t)&&my.test(t.description)}(t.U)}var my=/^Track:(.+),Lang:(.+)$/;function yy(t,n){for(var i,r=Lt(t);!(i=r()).done;){var e=i.value;if(e.Lt===n&&e.$U)return e}}function py(t,n){ky(yy(t.II,n))}function ky(t){void 0!==t&&(t.Xk=Hm.Kn)}function by(t,n){var i=yy(t.II,n)||function(t,n){for(var i,r=Lt(t);!(i=r()).done;){var e=i.value;if(e.Lt===n)return e}}(t.II,n);ky(i)}function Ay(t){for(var n,i=Lt(Km);!(n=i()).done;){var r=n.value;r===Ym.Yn?by(t,r):py(t,r)}}F(),Et(),Ut(),F(),Et(),Dt();var Ty=function(t){function n(){return t.call(this,eh.Jw)||this}return Ct(n,t),n}(rh);F(),Et(),F(),Et();var Sy=function(t){return t[t.mV=0]="mV",t[t.wV=1]="wV",t}({});F(),Et();var Ey=function(t){return t.wM="canplay",t.yM="canplaythrough",t.AM="loadeddata",t.bM="loadedmetadata",t.wI="readystatechange",t.SM="waiting",t.TM="playing",t}({}),Iy=["canplay","canplaythrough","loadeddata","loadedmetadata","readystatechange","waiting","playing"];F(),Et(),Bt(),Dt(),F(),Et(),Dt();var Ry=function(t){function n(n,i){var r;return(r=t.call(this,Ey.wI)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=n,r.readyState=i,r}return Ct(n,t),n}(rh);F(),Et();var Cy=function(t){return t[t.VL=0]="VL",t[t.Qn=1]="Qn",t[t.HL=2]="HL",t[t.WL=3]="WL",t[t.qL=4]="qL",t}({});F(),Et(),Dt();var Dy=function(t){function n(n,i){var r;return void 0===i&&(i=Cy.Qn),(r=t.call(this,Ey.bM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=n,r.readyState=i,r}return Ct(n,t),n}(rh);F(),Et(),Dt();var Py=function(t){function n(n,i){var r;return void 0===i&&(i=Cy.HL),(r=t.call(this,Ey.AM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=n,r.readyState=i,r}return Ct(n,t),n}(rh);F(),Et(),Dt();var Ny=function(t){function n(n){var i;return(i=t.call(this,Ey.SM)||this).currentTime=void 0,i.currentTime=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var By=function(t){function n(n,i){var r;return void 0===i&&(i=Cy.WL),(r=t.call(this,Ey.wM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=n,r.readyState=i,r}return Ct(n,t),n}(rh);F(),Et(),Dt();var xy=function(t){function n(n,i){var r;return void 0===i&&(i=Cy.qL),(r=t.call(this,Ey.yM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=n,r.readyState=i,r}return Ct(n,t),n}(rh);F(),Et(),Dt();var Oy=function(t){function n(n){var i;return(i=t.call(this,Ey.TM)||this).currentTime=void 0,i.currentTime=n,i}return Ct(n,t),n}(rh),My=[Ey.wI,Ey.TM,eh.uo,eh.jw],Ly=function(t){function n(n,i){var r;return void 0===i&&(i=!1),(r=t.call(this)||this).PV=void 0,r.kV=void 0,r.EV=void 0,r.NV=void 0,r.SV=void 0,r.AV=void 0,r.FV=void 0,r.LV=void 0,r.OV=void 0,r.MV=void 0,r.PV=n,r.kV=i,r.EV=Cy.VL,r.NV=!0,r.SV=!1,r.AV=!1,r.FV=function(t){var n=r.PV.MP,i=r.PV.Ax;i!==r.EV&&r.So(new Ry(n,i)),i===Cy.VL&&(r.SV=!1,r.AV=!1),r.yV(n,i),r.bV(n,i),r.DV(n,i),r.BV(n,i),r.TV(n,i),r.RV(n,i),r.EV=i},r.LV=function(){var t=r.PV.MP;r.RV(t,r.EV),r.TV(t,r.EV),r.NV=r.PV.hx},r.OV=function(){r.NV=r.PV.hx},r.MV=function(){r.So(new Oy(r.PV.MP))},r.PV.wn(Ey.wI,r.FV),r.PV.wn(eh.uo,r.LV),r.PV.wn(eh.jw,r.OV),r.kV&&r.PV.wn(Ey.TM,r.MV),r}Ct(n,t);var i=n.prototype;return i.yV=function(t,n){!this.AV&&n>=Cy.Qn&&(this.AV=!0,this.So(new Dy(t,n)))},i.bV=function(t,n){!this.SV&&n>=Cy.HL&&(this.SV=!0,this.So(new Py(t,n)))},i.TV=function(t,n){this.kV||(n>=Cy.WL&&this.EV=Cy.WL)&&this.So(new Oy(t))},i.RV=function(t,n){!this.CV(n)||this.PV.UP||this.PV.lt||this.So(new Ny(t))},i.DV=function(t,n){this.EV<=Cy.HL&&n>=Cy.WL&&this.So(new By(t,n))},i.BV=function(t,n){n===Cy.qL&&this.So(new xy(t,n))},i.CV=function(t){var n=!this.PV.hx&&t<=Cy.HL,i=!this.NV&&this.EV<=Cy.HL;return n&&!i},i.hr=function(){this.EV=Cy.VL,this.NV=!0,this.SV=!1,this.AV=!1},i.kn=function(){this.Vo(),this.kV&&this.PV.mn(Ey.TM,this.MV),this.PV.mn(eh.uo,this.LV),this.PV.mn(eh.jw,this.OV),this.PV.mn(Ey.wI,this.FV)},Nt(n,[{key:"xV",get:function(){return!this.PV.hx&&this.NV}}]),n}(th);F(),Et(),Bt(),Dt();var Uy=function(t){function n(n,i){var r;return(r=t.call(this)||this).oa=void 0,r.TL=void 0,r.oa=n,r.TL=i,r.TL.wn(My,r.Rs),r}Ct(n,t);var i=n.prototype;return i.zg=function(){this.Vo(),this.TL.mn(My,this.Rs)},i.VV=function(){this.So(new Ry(this.MP,this.Ax))},Nt(n,[{key:"MP",get:function(){return this.oa.MP}},{key:"UP",get:function(){return this.oa.UP}},{key:"lt",get:function(){return this.TL.lt}},{key:"hx",get:function(){return this.TL.hx}},{key:"Ax",get:function(){return this.oa.Ax}}]),n}(th);F(),Et(),F(),Et();var Fy="titanium",Vy="conax",Hy="ezdrm",Wy="irdeto",zy="vudrm",Xy="verimatrix",qy="keyos",Gy="drmtoday",jy="expressplay",Qy="azure",Yy="xstream",Ky="vimond",Jy="axinom",Zy="uplynk",$y="comcast",tp="custom";F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Wt(),Bt(),Qt();var np=function(){function t(t,n,i,r,e){this.kS=void 0,this.aH=void 0,this.uH=void 0,this.XV=void 0,this.nV=void 0,this.WV=void 0,this.oH=void 0,this.kS=t,this.aH=n,this.uH=i,this.nV=r,this.oH=e,this.XV=this.cH(n)}var n=t.prototype;return n.HV=function(){return this.WV},n.qV=function(t){this.WV=t},n.jV=function(){return this.XV.licenseAcquisitionURL||this.HV()},n.KV=function(t){return ut.resolve()},n.YV=function(t,n){return ut.resolve(void 0)},n.JV=function(t,n,i,r){return Vt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:if(""===(e=this.ZV(t,n,i,r)).Yu)throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");u.label=1;case 1:return u.trys.push([1,4,,6]),[4,this.SP.lk(e)];case 2:return[4,u.sent().VT(n)];case 3:return[2,u.sent()];case 4:return lr(s=u.sent()),[4,this.$V(s,e.Yu,r)];case 5:return u.sent(),[2];case 6:return[2]}})}).call(this)},n.ZV=function(t,n,i,r){var e=this.tH().MT(),s=this.zk,u={Yu:this.iH(),dk:n,fk:e,zT:t,zk:s,Uk:wl.POST,Vk:0,Yg:r,Km:gl.bk,Wk:i};return new pl(u)},n.eH=function(t,n){return ut.resolve(t)},n.sH=function(t,n,i,r){return ut.resolve(t)},n.tH=function(){return new Ld(this.XV.headers||{})},n.$V=function(t,n,i){return Vt(function(){return zt(this,function(n){throw new eg(cd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during license server request",t)})})()},n.iH=function(t,n){var i=n,r=this.XV.queryParameters;if(!i){var e=this.jV();if(!e)return"";i=e}if(r||t){var s=Vn.Dh(i);t&&Tl(s,t),r&&Tl(s,r),i=s.href}return i},n.nH=function(t,n){return ip(t)},n.rH=function(t){return new E(t)},n.hH=function(t,n,i){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return[4,this.nH(t,i)];case 1:return r=s.sent(),[4,this.JV(r,this.oH,n,i)];case 2:return e=s.sent(),[2,this.rH(e)]}})}).call(this)},n.kn=function(){},Nt(t,[{key:"SP",get:function(){return this.nV}},{key:"zV",get:function(){return!1}},{key:"GV",get:function(){var t=this.XV.certificate;if(t)return qn(t)?mh(t):pc(t)}},{key:"QV",get:function(){return!1}},{key:"zk",get:function(){return Boolean(this.XV.useCredentials)}}]),t}();function ip(t){return ut.resolve(bc(t).buffer)}var rp,ep=function(t){function n(n,i,r,e){return t.call(this,Ro,n,i,r,e)||this}Ct(n,t);var i=n.prototype;return i.cH=function(t){return t.widevine||{}},i.dH=function(t,n){return Vt(function(){return zt(this,function(i){return this.GV?[2,this.GV]:[2,this.lH(new E(t),n)]})}).call(this)},i.lH=function(n,i){return t.prototype.hH.call(this,n,_l.Pk,i)},n}(np);function sp(t,n){if(null==t)return{};var i,r,e={},s=k.keys(t);for(r=0;r=0||(e[i]=t[i]);return e}function up(t){return Un(t.token&&t.deviceId)}function op(t){var n,i=null==(n=t.fairplay)?void 0:n.headers;return void 0!==i&&Un(i.PreAuthorization)}function hp(t){var n=t;return up(n)&&""!==n.token&&""!==n.deviceId&&!op(n)}F(),Et(),F(),Et(),Wt(),F(),Et(),Ut(),Qt(),F(),Et(),F(),Et(),Ut(),F(),Et(),function(t){t.mR=!1,t.wR=!1,t.yR=!1,t.AR=!1,t.LOG_ADS_DETAILS=!1,t.LOG_CHROMECAST_DETAILS=!1,t.LOG_CUSTOM_DRM=!1,t.LOG_BUFFERING_VIDEO_MAIN=!1,t.LOG_BUFFERING_VIDEO_SELECTION=!1,t.LOG_BUFFERING_AUDIO_MAIN=!1,t.LOG_BUFFERING_AUDIO_SELECTION=!1,t.bR=!1,t.SR=!1,t.LOG_LCEVC_DETAILS=!1}(rp||(rp={})),F(),Et(),Bt();var cp=function(){function t(t,n,i){this.ER=void 0,this.mS=void 0,this.xR=void 0,this.ER=t,this.mS=n,this.xR=i}return t.prototype.PR=function(t){return function(t){var n=t.onCertificateRequest;if(void 0!==n&&"function"!=typeof n)throw new p("ContentProtectionIntegration.onCertificateRequest is not a function.");var i=t.onCertificateResponse;if(void 0!==i&&"function"!=typeof i)throw new p("ContentProtectionIntegration.onCertificateResponse is not a function.");var r=t.onLicenseRequest;if(void 0!==r&&"function"!=typeof r)throw new p("ContentProtectionIntegration.onLicenseRequest is not a function.");var e=t.onLicenseResponse;if(void 0!==e&&"function"!=typeof e)throw new p("ContentProtectionIntegration.onLicenseResponse is not a function.");var s=t.extractFairplayContentId;if(void 0!==s&&"function"!=typeof s)throw new p("ContentProtectionIntegration.extractFairplayContentId is not a function.");return t}(this.xR.build(t))},Nt(t,[{key:"kR",get:function(){return this.ER}},{key:"kS",get:function(){return this.mS}}]),t}();F(),Et();var ap=function(t){return t.FAILED="FAILED",t.OVERRIDDEN="OVERRIDDEN",t.SUCCEEDED="SUCCEEDED",t}({}),fp=function(){function t(){this.RR=[]}var n=t.prototype;return n.registerContentProtectionIntegration=function(t,n,i){switch(this.IR(t,n,i)){case ap.FAILED:throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The keySystem should be 'widevine', 'playready' or 'fairplay', but was "+n+".");case ap.OVERRIDDEN:var r=Rp(n);Vn.um("Warning: Overwriting an earlier registered integration for "+t+" and "+r+".");break;case ap.SUCCEEDED:Rp(n);0}},n.IR=function(t,n,i){var r=Rp(n);if(!r)return ap.FAILED;for(var e,s=ap.SUCCEEDED,u=Lt(this.RR.slice());!(e=u()).done;){var o=e.value;o.kR===t&&o.kS===r&&(s=ap.OVERRIDDEN,Xi(this.RR,o))}return this.RR.push(new cp(t,r,i)),s},n.DR=function(t,n){return void 0!==this.NR(t,n)},n.MR=function(t,n,i){var r=this.NR(t,n);if(!r)throw y("No ContentProtectionIntegrationInit was found for integration id "+t+" and key system "+n);return r.PR(i)},n.NR=function(t,n){for(var i,r=Lt(this.RR);!(i=r()).done;){var e=i.value;if(e.kR===t&&(!n||e.kS===n))return e}},t}();fp.LR=new fp;var vp={playready:"https://pr-keyos.licensekeyserver.com/core/rightsmanager.asmx",widevine:"https://wv-keyos.licensekeyserver.com/",fairplay:"https://fp-keyos.licensekeyserver.com/getkey"};function dp(t){if(!t)return!0;var n=t.licenseAcquisitionURL,i=t.certificateURL,r=t.keys,e=t.headers,s=t.useCredentials,u=t.queryParameters;return!(n||i||r||e||s||u)}function lp(t){return t&&void 0!==t.licenseAcquisitionURL}var wp=lp,gp=lp;function _p(t){if(!t)return!0;if(kp(t))return!1;var n=t.fairplay,i=t.playready,r=t.widevine,e=t.clearkey,s=t.aes128;return dp(n)&&dp(i)&&dp(r)&&void 0===e&&dp(s)}function mp(t){var n=hp(t),i=function(t){var n,i=t;return op(i)&&""!==(null==(n=i.fairplay)?void 0:n.headers.PreAuthorization)&&!up(i)}(t);return(!n||!i)&&(n||i)}function yp(t){return t.integration===Wy}function pp(t){var n=t;if(!n)return!1;if(_p(n))return!1;var i=n.fairplay,r=n.playready,e=n.widevine,s=n.clearkey;if(kp(t))return!0;if(i&&!function(t){var n=t;return n&&(void 0!==n.certificateURL||void 0!==n.certificate)}(i))return!1;if(r&&!wp(r))return!1;if(e&&!gp(e))return!1;if(s&&!function(t){return void 0!==t}(s))return!1;if(n.integration){if(fp.LR.DR(n.integration))return!0;switch(n.integration){case Fy:if(!function(t){var n=t,i=n.integration===Fy;return i&&(bp(t)||Ap(t))}(t))return!1;break;case zy:if(!Tp(t))return!1;break;case Xy:if(!function(t){var n=t;return n.integration===Xy}(t))return!1;break;case Wy:if(!yp(t))return!1;break;case Vy:if(!mp(t))return!1;break;case Hy:if(!function(t){var n=t;return n.integration===Hy}(t))return!1;break;case qy:if(!kp(t))return!1;break;case Gy:if(!function(t){var n=t;return n.integration===Gy&&(void 0!==n.token||function(t){return void 0!==t.merchant&&void 0!==t.sessionId&&void 0!==t.userId}(n))}(t))return!1;break;case jy:if(!function(t){var n=t;return n.integration===jy}(t))return!1;break;case Yy:if(!Sp(t))return!1;break;case Ky:if(!function(t){return t.integration===Ky}(t))return!1;break;case Jy:if(!Ep(t))return!1;break;case Qy:if(!function(t){var n=t;return n.integration===Qy&&void 0!==n.token}(t))return!1;break;case Zy:if(!function(t){var n=t;return n.integration===Zy}(t))return!1;break;case $y:if(!function(t){var n=t;return n&&Un(n.releasePid)&&Un(n.accountId)&&Un(n.token)}(t))return!1;break;case tp:return!0;default:return!1}}return!0}function kp(t){return t.integration===qy}function bp(t){return void 0!==t.authToken}function Ap(t){var n=t;return void 0!==n.accountName&&void 0!==n.customerName&&void 0!==n.portalId}function Tp(t){var n=t;return n.integration===zy&&void 0!==n.token}function Sp(t){var n=t;return n&&n.integration===Yy&&qn(n.ticketAcquisitionURL)&&qn(n.streamId)}function Ep(t){var n=t;return n.integration===Jy&&void 0!==n.token}function Ip(t,n){var i,r,e,s=n[t],u=null!=(i=null==s?void 0:s.licenseAcquisitionURL)?i:vp[t],o=null!=(r=null==s?void 0:s.customdata)?r:n.customdata,h=o?{customData:o}:{},c=Yu({},null!=(e=null==s?void 0:s.headers)?e:{},h),a=null!=s?s:{};a.customdata;return Yu({},sp(a,["customdata"]),{licenseAcquisitionURL:u,headers:c})}function Rp(t){switch(t.toLowerCase()){case"widevine":case wo:return wo;case"playready":case fo:return fo;case"fairplay":case Ao:return Ao}}function Cp(t,n){switch(t){case uo:return function(t){for(var n,i={},r=Lt(ym.xD(new DataView(t)));!(n=r()).done;){var e=n.value;i[e.rM]=e.aM}return i}(n);case oo:case ho:return function(t){var n;return n={},n[bo]=t,n}(n);case co:return function(t){var n;return n={},n[po]=t,n}(n);default:throw new fd(cd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Unsupported initDataType "+t)}}function Dp(t,n){return void 0===n&&(n=!1),Vt(function(){var i,r,e,s;return zt(this,function(u){switch(u.label){case 0:return(i=t.widevine)?[4,Vn.Am()]:[3,2];case 1:i=u.sent(),u.label=2;case 2:return i?[2,!0]:(r=t.playready)?[4,Vn.ym()]:[3,4];case 3:r=u.sent(),u.label=4;case 4:return r?[2,!0]:(e=t.clearkey)?[4,Vn.pm()]:[3,6];case 5:e=u.sent(),u.label=6;case 6:return e?[2,!0]:(s=!n&&t.fairplay)?[4,Vn.wm()]:[3,8];case 7:s=u.sent(),u.label=8;case 8:return s?[2,!0]:[2,!1]}})})()}var Pp=function(t){return t.zm="Widevine",t.fH="PlayreadyV2",t.vH="PlayreadyV3",t.qm="PlayreadyV2",t.jm="Fairplay",t}({}),Np={Widevine:{DRMProvider:"Google",DRMVersion:"1.4.8.86",DRMType:"Widevine"},PlayreadyV2:{DRMProvider:"Microsoft",DRMVersion:"2.9",DRMType:"Playready"},PlayreadyV3:{DRMProvider:"Microsoft",DRMVersion:"3",DRMType:"Playready"},Fairplay:{DRMProvider:"Apple",DRMType:"FairPlay",DRMVersion:"1.0"}};function Bp(t,n){var i,r,e,s,u=Np[n],o=t.accountName;return{CustomerName:t.customerName,AccountName:o,PortalId:t.portalId,FriendlyName:t.friendlyName,DeviceInfo:{FormatVersion:"1",DeviceType:"PC",OSType:null==(i=Vn.Em)?void 0:i.Zs,OSVersion:null==(r=Vn.Em)?void 0:r.Lm,DRMProvider:u.DRMProvider,DRMVersion:u.DRMVersion,DRMType:u.DRMType,DeviceVendor:null==(e=Vn.Em)?void 0:e.Om,DeviceModel:null==(s=Vn.Em)?void 0:s.Fm}}}function xp(t,n){if(!t.accountName)throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+n+" DRM configuration, accountName is not set.");if(!t.customerName)throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+n+" DRM configuration, customerName is not set.");if(!t.portalId)throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+n+" DRM configuration, portalId is not set.");throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+n+" DRM configuration.")}function Op(t,n,i){var r;if(bp(t))r={AuthToken:t.authToken,Payload:n};else{if(!Ap(t))throw xp(t,i);r={LatensRegistration:Bp(t,i),Payload:n}}return Lc(JSON.stringify(r))}function Mp(t,n,i){return Vt(function(){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(!(r=t.oE))throw new eg(cd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium server request",t,n);e=r,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,e.FT(i)];case 2:return s=o.sent(),u=function(t){if(t){if(t.WvProxyErr)return t.WvProxyErr.desc;if(t.DrmErr)return t.DrmErr.desc}return}(s),[3,4];case 3:return o.sent(),u="",[3,4];case 4:throw new eg(cd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium server request",t,e.lk.Yu,e.hk,e.vk,u)}})})()}F(),Et(),Wt(),Qt();var Lp=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i,r,Md.DT)||this).gH=void 0,e}Ct(n,t);var i=n.prototype;return i.$V=function(t,n,i){return Mp(t,n,i)},i.KV=function(t){return this.gH?gr(this.gH.Qy,t):(this.gH=new Vc,ut.resolve())},i.nH=function(t,n){return Vt(function(){var n,i;return zt(this,function(r){if(!(n=this.aH))throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium Widevine DRM configuration.");return i=kh(t),[2,Op(n,i,Pp.zm)]})}).call(this)},i.rH=function(t){if(!t.license)throw new eg(cd.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Titanium Widevine license server");return mh(t.license)},i.pH=function(t){return ut.resolve(new E(t))},i.dH=function(t,n){return Vt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:return this.mH(),[4,this.nH(t,n)];case 1:return i=e.sent(),[4,this.JV(i,Md.CT,_l.xk,n)];case 2:return r=e.sent(),[4,this.pH(r)];case 3:return[2,e.sent()]}})}).call(this)},i.lH=function(n,i){var r=this;return Vt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,t.prototype.lH.call(r,n,i)];case 1:return e=s.sent(),this.mH(),[2,e]}})}).call(this)},i.mH=function(){this.gH||(this.gH=new Vc),this.gH.Xy()},i.kn=function(){this.gH&&this.gH.Zg(),t.prototype.kn.call(this)},n._H=function(){return Vn.Zs.yp?"required":"optional"},n}(ep);F(),Et(),Wt(),Bt(),Dt(),Qt();var Up=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i,r,Md.CT)||this).qV("https://widevine-proxy.drm.technology/proxy"),e}return Ct(n,t),n.prototype.nH=function(t,n){return Vt(function(){var n,i,r,e;return zt(this,function(s){switch(s.label){case 0:return[4,ip(t)];case 1:if(n=s.sent(),i=this.uH,r=Ac(new E(n)),void 0===(e=this.wH))throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The Widevine vuDRM token has not been correctly configured.");return[2,JSON.stringify({token:e,drm_info:r,kid:i})]}})}).call(this)},Nt(n,[{key:"wH",get:function(){if(Tp(this.aH))return this.aH.token}}]),n}(ep);function Fp(t,n){var i=n||{};return t.ticket&&t.sessionId&&(i=Yu({},i,{SessionId:t.sessionId,Ticket:t.ticket})),Yu({},i,{CrmId:t.crmId,AccountId:t.accountId,ContentId:t.contentId})}F(),Et(),Dt(),F(),Et();var Vp=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i,r,Md.CT)||this).qV("https://emeademo.dev.ott.irdeto.com/Widevine/getlicense"),e}return Ct(n,t),n.prototype.iH=function(n,i){var r=n;return yp(this.aH)&&(r=Fp(this.aH,r)),t.prototype.iH.call(this,r,i)},n}(ep);F(),Et(),Dt(),F(),Et();var Hp="Conax-Custom-Data";function Wp(t,n,i){var r=t&&mp(t)&&t;if(r&&!i.has(Hp)){var e=hp(r)?r.token:void 0,s=hp(r)?r.deviceId:void 0,u=JSON.stringify({Version:"1.0.0",CxAuthenticationDataToken:e,CxClientInfo:{DeviceType:"Browser",DrmClientType:n+"-HTML5",DrmClientVersion:"1.0.0",CxDeviceId:s}});i.set(Hp,u)}return i}var zp=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i,r,Md.CT)||this).qV("https://connect.conax.com:8094/license"),e}return Ct(n,t),n.prototype.tH=function(){var n=t.prototype.tH.call(this);return Wp(this.aH,"Widevine",n)},n}(ep);function Xp(t){var n=uc(new E(t));return mh(JSON.parse(n).license)}function qp(t){return"string"==typeof t.token?t.token:Lc(JSON.stringify({userId:t.userId,sessionId:t.sessionId,merchant:t.merchant}))}function Gp(t,n,i){var r;return r=i.token?"x-dt-auth-token":"dt-custom-data",t.set(r,n),t}F(),Et(),Bt(),Dt(),F(),Et();var jp=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i,r,Md.CT)||this).qV("https://lic.drmtoday.com/license-proxy-widevine/cenc/"),e}Ct(n,t);var i=n.prototype;return i.rH=function(t){return Xp(t)},i.tH=function(){return Gp(t.prototype.tH.call(this),this.wH,this.aH)},Nt(n,[{key:"wH",get:function(){return qp(this.aH)}}]),n}(ep);F(),Et(),Dt();var Qp=function(t){function n(n,i,r){return t.call(this,n,i,r,Md.CT)||this}return Ct(n,t),n.prototype.tH=function(){var n=t.prototype.tH.call(this),i=this.aH.token;return n.set("Authorization","Bearer "+i),n},n}(ep);function Yp(t,n,i,r){return Vt(function(){var e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:if(!Sp(t))throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Xstream DRM Configuration");return(e=new Ld).append("Cache-Control","no-cache"),e.append("Content-Type","application/json"),(s=t.sessionId)&&e.append("XSSESSION",s),u=t.streamId,o=t.fairplay?"persistent"===t.fairplay.licenseType?"persistent":"non-persistent":t.widevine&&"persistent"===t.widevine.licenseType?"persistent":"non-persistent",h={drmType:n,licenseType:o,streamId:u},c={Yu:t.ticketAcquisitionURL,dk:Md.DT,fk:e,Uk:wl.POST,zT:JSON.stringify(h),Yg:r},[4,i.lk(c)];case 1:return[4,a.sent().FT()];case 2:return[2,a.sent()]}})})()}F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Wt(),Qt();var Kp=function(t){function n(n,i,r){return t.call(this,n,i,r,Md.DT)||this}Ct(n,t);var i=n.prototype;return i.tH=function(){var n=t.prototype.tH.call(this);return n.set("Content-Type","application/json"),n},i.nH=function(n,i){var r=this;return Vt(function(){var e,s,u;return zt(this,function(o){switch(o.label){case 0:return e=Mc(n.buffer),[4,Yp(this.aH,"widevine_modular",this.SP,i)];case 1:return s=o.sent(),this.qV(s.licenseServerUrl),u=oc(JSON.stringify({payload:e,ticket:s.ticket})),[2,t.prototype.nH.call(r,u,i)]}})}).call(this)},i.rH=function(t){return mh(t.license)},n}(ep);F(),Et(),Dt();var Jp=function(t){function n(n,i,r){return t.call(this,n,i,r,Md.CT)||this}return Ct(n,t),n.prototype.tH=function(){if(!Ep(this.aH))throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");var n=t.prototype.tH.call(this);return n.set("X-AxDRM-Message",this.aH.token),n},n}(ep);function Zp(t){for(var n=new E(2*t.length),i=0;i=1&&t[0].jE.length>0},i.YV=function(n){var i=this.aH.playready.customData;if(i){var r=Zp(i),e=Zp(''+kh(r)+"");return ut.resolve({playready:{qS:e}})}return t.prototype.YV.call(this,n)},i.nH=function(t,n){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return[4,ip(t)];case 1:return n=i.sent(),[2,this.bH(n)]}})}).call(this)},i.bH=function(t){return Vt(function(){var n,i,r,e,s,u,o,h,c,a,f,v,d,l,w,g,_;return zt(this,function(m){r=null,e=new DataView(t),s=rc(e,new Tc,!0);try{u=Vn.UE(s)}catch(t){return[2,r]}for(o=null==(n=u.YE("PlayReadyKeyMessage")[0])?void 0:n.YE("LicenseAcquisition")[0],c=null!=(h=null==o?void 0:o.YE("Challenge"))?h:[],this.AH(c)&&(r=Oc(c[0].eP)),a=new Ld,v=null!=(f=null==o||null==(i=o.YE("HttpHeaders")[0])?void 0:i.YE("HttpHeader"))?f:[],d=Lt(v);!(l=d()).done;)w=l.value,g=w.YE("name")[0].eP,_=w.YE("value")[0].eP,a.append(g,_);return this.yH=a,[2,r]})}).call(this)},i.dH=function(t,n){return ut.resolve(t)},i.lH=function(n,i){return t.prototype.hH.call(this,n,_l.Ik,i)},n}(np);F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Bt();var tk=function(){function t(n){this.kH=void 0,this.zb=void 0,this.kH=n,this.zb=t.SH(n)}return t.prototype.TH=function(){var t={};if(this.zb===Pp.vH){var n={LatensRegistration:Bp(this.kH,Pp.vH)};t["X-TITANIUM-DRM-CDATA"]=Lc(JSON.stringify(n))}return t},t.SH=function(t){return"3"===t.version?Pp.vH:Pp.fH},Nt(t,[{key:"EH",get:function(){return this.zb}},{key:"MS",get:function(){return this.zb===Pp.fH}}]),t}();var nk=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i,r)||this).PH=void 0,e.PH=new tk(e.aH),e}Ct(n,t);var i=n.prototype;return i.YV=function(t){var n=this.aH;if(!this.aH)throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium PlayReady DRM configuration.");if(Ap(n)){var i={};return i.playready={qS:ik(n,this.PH.EH)},ut.resolve(i)}return ut.reject(xp(n,Pp.qm))},i.tH=function(){var n=new Ld(this.PH.TH());return n.OT(t.prototype.tH.call(this)),n},i.$V=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c,a;return zt(this,function(f){switch(f.label){case 0:if(!(r=t.oE))throw new eg(cd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium PlayReady license request",t,n);f.label=1;case 1:return f.trys.push([1,3,,4]),[4,r.HT(i)];case 2:return u=f.sent(),o=uc(new E(u)),(h=Vn.UE(o))&&(c=function(t,n){return function(t,n){for(var i=t.m.slice(),r=[];i.length>0;){var e,s=i.shift();n(s)?r.push(s):(e=i).push.apply(e,[].concat(s.m))}return r}(t,function(t){return t.JE===n})}(h,"CustomData"),c.length>0&&(e=JSON.parse(c[0].eP),s=null==(a=e.DrmErr)?void 0:a.desc)),[3,4];case 3:return f.sent(),[3,4];case 4:throw new eg(cd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium PlayReady license request",t,n,r.hk,r.vk,s)}})})()},i.AH=function(t){if(1!==t.length)throw new eg(cd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"PlayReady license message incorrectly formatted, Challenge not found.");return!0},n}($p);function ik(t,n){var i=Bp(t,n),r=i.DeviceInfo.FormatVersion,e=function(t){return t.replace(/</g,"<").replace(/>/g,">")}(function(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}(""+Lc(''+i.AccountName+""+i.CustomerName+""+i.PortalId+''+i.DeviceInfo.DeviceType+""+i.DeviceInfo.OSType+""+i.DeviceInfo.OSVersion+""+i.DeviceInfo.DRMProvider+""+i.DeviceInfo.DRMVersion+""+i.DeviceInfo.DRMType+""+i.DeviceInfo.DeviceVendor+""+i.DeviceInfo.DeviceModel+"")+"")),s=cc(e,!0);return cc(''+kh(s)+"",!0)}F(),Et(),Bt(),Dt();var rk=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i,r)||this).qV("https://playready-license.drm.technology/rightsmanager.asmx"),e}Ct(n,t);var i=n.prototype;return i.AH=function(t){if(1!==t.length)throw new eg(cd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Vudrm PlayReady license message incorrectly formatted, Challenge not found.");return!0},i.iH=function(n,i){var r=Yu({},n||{},{token:this.wH});return t.prototype.iH.call(this,r,i)},Nt(n,[{key:"wH",get:function(){if(Tp(this.aH))return this.aH.token}}]),n}($p);F(),Et(),Dt();var ek=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i,r)||this).qV("https://emeademo.dev.ott.irdeto.com/playready/rightsmanager.asmx"),e}return Ct(n,t),n.prototype.iH=function(n,i){var r=n;return yp(this.aH)&&(r=Fp(this.aH,r)),t.prototype.iH.call(this,r,i)},n}($p);F(),Et(),Dt();var sk=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i,r)||this).qV("https://connect.conax.com:8010/cxplayready/rightsmanager.asmx"),e}return Ct(n,t),n.prototype.tH=function(){var n=t.prototype.tH.call(this);return Wp(this.aH,"PlayReady",n)},n}($p);F(),Et(),Bt(),Dt();var uk=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i,r)||this).qV("https://lic.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx"),e}Ct(n,t);var i=n.prototype;return i.rH=function(n){var i=function(t){var n=uc(new E(t));return Uo(n,"=0)return ut.resolve(t.substr(n+1));var i=t.split("skd://").pop();if(i){if(/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/.test(i))return ut.resolve(i)}var r=t.split("/");return ut.resolve(r[r.length-1])},i.YV=function(t){return Vt(function(){var n,i,r,e;return zt(this,function(s){switch(s.label){case 0:return i=null!=(n=this.FH)?n:vc(new E(t)),[4,this.OH(i)];case 1:return r=s.sent(),this.MH=r,(e={}).fairplay={ZS:r},[2,e]}})}).call(this)},i.tH=function(){var n=t.prototype.tH.call(this);return n.set("Content-Type",this.LH),n},i.dH=function(t,n){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.GV?[2,this.GV]:[4,this.UH(n)];case 1:return[2,t.sent()]}})}).call(this)},i.lH=function(n,i){return t.prototype.hH.call(this,n,_l.Tk,i)},i.VH=function(t){var n=this.CH(),i=this.tH(),r={Yu:n,dk:Md.CT,fk:i,Uk:wl.GET,zk:!1,zT:null,Vk:0,Yg:t,Km:gl.bk,Wk:_l.Ek};return new pl(r)},i.UH=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:return n=this.VH(t),[4,this.SP.lk(n)];case 1:return[4,r.sent().HT()];case 2:return i=r.sent(),[2,new E(i)]}})}).call(this)},i.rH=function(t){var n;if("string"==typeof t){var i=t.trim();""===i.substr(0,5)&&""===i.substr(-6)&&(i=i.slice(5,-6)),n=mh(i)}else n=new E(t);return n},i.iH=function(n,i){var r=t.prototype.iH.call(this,n,i);return Uo(r,"skd:")&&(r=r.substr(4)),r},Nt(n,[{key:"QV",get:function(){return!0}},{key:"LH",get:function(){return ck.IH}}]),n}(np);F(),Et(),Wt(),Bt(),Dt(),Qt();var fk=function(t){function n(n,i,r,e){return t.call(this,n,i,r,e,Md.CT)||this}Ct(n,t);var i=n.prototype;return i.OH=function(n){var i=n.split("://",1);return"skd"!==i[0].slice(-3).toLowerCase()?ut.resolve(""):(i=n.split(";",2)).length>1?ut.resolve(i[1]):ut.resolve(t.prototype.OH.call(this,n))},i.nH=function(t){return Vt(function(){return zt(this,function(n){return[2,t]})})()},i.rH=function(t){return new E(t)},i.iH=function(n,i){var r=n||{};return r.p1=ce(),t.prototype.iH.call(this,r,i)},Nt(n,[{key:"LH",get:function(){return ck.RH}}]),n}(ak);F(),Et(),Bt(),Dt();var vk=function(t){function n(n,i,r,e){var s;return(s=t.call(this,n,i,r,e,Md.CT)||this).qV("https://fairplay-license.drm.technology/license"),s.BH("https://fairplay-license.drm.technology/certificate"),s}Ct(n,t);var i=n.prototype;return i.NH=function(t,n){var i={token:this.wH,contentId:n,payload:kh(t)};return JSON.stringify(i)},i.rH=function(t){return new E(t)},i.tH=function(){var n=t.prototype.tH.call(this);return n.set("x-vudrm-token",this.wH),n},Nt(n,[{key:"LH",get:function(){return ck.DT}},{key:"wH",get:function(){if(!Tp(this.aH))throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Token is required for FairPlay VuDrm.");return this.aH.token}}]),n}(ak);F(),Et(),Dt();var dk="Verimatrix Fairplay license response incorrectly formatted. Invalid json.",lk="Verimatrix Fairplay license response incorrectly formatted. Ckc not found.",wk=function(t){function n(n,i,r,e){return t.call(this,n,i,r,e,Md.CT)||this}return Ct(n,t),n.prototype.rH=function(n){var i=function(t){var n;try{n=JSON.parse(t).ckc}catch(t){throw new eg(cd.CONTENT_PROTECTION_LICENSE_INVALID,dk)}if(!n)throw new eg(cd.CONTENT_PROTECTION_LICENSE_ERROR,lk);return n}(uc(new DataView(n)));return t.prototype.rH.call(this,i)},n}(ak);F(),Et(),Wt(),Bt(),Dt(),Qt();var gk=function(t){function n(n,i,r,e){return t.call(this,n,i,r,e,Md.DT)||this}Ct(n,t);var i=n.prototype;return i.nH=function(t){return Vt(function(){var n,i;return zt(this,function(r){if(!(n=this.aH))throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium Fairplay DRM configuration.");return i=kh(t),[2,Op(n,i,Pp.jm)]})}).call(this)},i.rH=function(t){try{var n;if(qn(t)){var i=t.trim();n=JSON.parse(i)}else n=t;if(n.license){var r=Oc(n.license);return new E(r)}throw new eg(cd.CONTENT_PROTECTION_LICENSE_ERROR,"No license received from the Titanium Fairplay license server")}catch(t){throw new eg(cd.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Titanium Fairplay license server")}},i.$V=function(t,n,i){return Mp(t,n,i)},Nt(n,[{key:"LH",get:function(){return ck.DT}}]),n}(ak);F(),Et(),Wt(),Bt(),Dt(),Qt();var _k=function(t){function n(n,i,r,e){var s;return(s=t.call(this,n,i,r,e,Md.CT)||this).qV("https://emeademo.dev.ott.irdeto.com/streaming/getckc"),s.BH("https://emeademo.dev.ott.irdeto.com/streaming/getcertificate"),s}Ct(n,t);var i=n.prototype;return i.CH=function(){var n=t.prototype.CH.call(this);if(!n)return n;var i=Vn.Dh(n),r=this.aH;return yp(r)&&Tl(i,{accountId:r.accountId,applicationId:r.applicationId||""}),i.href},i.OH=function(n){return yp(this.aH)?ut.resolve(this.aH.contentId):t.prototype.OH.call(this,n)},i.nH=function(t){return Vt(function(){return zt(this,function(n){return[2,t]})})()},i.rH=function(t){return new E(t)},i.iH=function(n,i){var r=n;return yp(this.aH)&&(r=function(t,n){return Yu({},Fp(t,n),{KeyId:t.keyId})}(this.aH,r)),t.prototype.iH.call(this,r,i)},Nt(n,[{key:"LH",get:function(){return ck.RH}}]),n}(ak);F(),Et(),Wt(),Dt(),Qt();var mk=function(t){function n(n,i,r,e){var s;if(s=t.call(this,n,i,r,e,Md.NT)||this,!mp(i))throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Conax configuration");return s.qV("https://connect.conax.com:8097/license"),s}Ct(n,t);var i=n.prototype;return i.tH=function(){var n=t.prototype.tH.call(this);return Wp(this.aH,"FairPlay",n)},i.UH=function(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:return n=this.CH(),i={Yu:n,dk:Md.CT,fk:{},Uk:wl.GET,zk:!1,zT:null,Vk:0,Yg:t,Km:gl.bk,Wk:_l.Ek},[4,this.SP.lk(i)];case 1:return[4,e.sent().HT()];case 2:return r=e.sent(),[2,new E(r)]}})}).call(this)},i.nH=function(t){return Vt(function(){return zt(this,function(n){return[2,t]})})()},i.OH=function(t){var n,i=t.indexOf("?");return 0===t.indexOf("skd://")?(n=i>=0?t.substring(6,i):t.substring(6),ut.resolve(function(t){return uc(mh(t))}(n))):ut.resolve("unknown")},i.rH=function(t){try{var n=JSON.parse(t);return new E(Oc(n.CkcMessage))}catch(t){throw new y("CFLRW-66")}},n}(ak);F(),Et(),Dt();var yk=function(t){function n(n,i,r,e){var s;return(s=t.call(this,n,i,r,e,Md.NT)||this).qV(vp[Eo.jm]),s}Ct(n,t);var i=n.prototype;return i.OH=function(t){return Uo(t,"skd://")?ut.resolve(t.substring(6,40)):ut.reject(new eg(cd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Error while determining the KeyOS Content ID."))},i.NH=function(t,n){return"spc="+kh(t)+"&assetId="+n},n}(ak);F(),Et(),Bt(),Dt();var pk=function(t){function n(n,i,r,e){var s;return(s=t.call(this,n,i,r,e,Md.NT)||this).qV("https://lic.drmtoday.com/license-server-fairplay/"),s}Ct(n,t);var i=n.prototype;return i.NH=function(t,n){var i="spc="+encodeURIComponent(kh(t))+"&"+encodeURI(n);return"persistent"===this.XV.licenseType?i+"&offline=true":i},i.tH=function(){return Gp(t.prototype.tH.call(this),this.wH,this.aH)},Nt(n,[{key:"wH",get:function(){return qp(this.aH)}}]),n}(ak);F(),Et(),Wt(),Bt(),Dt(),Qt();var kk=function(t){function n(n,i,r,e){return t.call(this,n,i,r,e,Md.CT)||this}Ct(n,t);var i=n.prototype;return i.OH=function(t){var n=t;return Uo(n,"skd:")&&(n="http:"+n.substring(4)),Uo(n,"http:")||Uo(n,"https:")?ut.resolve(Vn.Dh(n).hostname):ut.reject(new y("Could not parse ExpressPlay FairPlay content ID."))},i.nH=function(t){return Vt(function(){return zt(this,function(n){return[2,t]})})()},i.rH=function(t){return new E(t)},Nt(n,[{key:"LH",get:function(){return ck.RH}}]),n}(ak);F(),Et(),Dt();var bk=function(t){function n(n,i,r,e){return t.call(this,n,i,r,e,Md.NT)||this}return Ct(n,t),n.prototype.tH=function(){var n=t.prototype.tH.call(this),i=this.aH.token;return n.set("Authorization","Bearer "+i),n},n}(ak);F(),Et(),Wt(),Bt(),Dt(),Qt();var Ak=function(t){function n(n,i,r,e){var s;if(s=t.call(this,n,i,r,e,Md.DT)||this,!Sp(i))throw new y("Invalid Xstream DRM configuration");return s}Ct(n,t);var i=n.prototype;return i.UH=function(t){return Vt(function(){var n,i,r,e;return zt(this,function(s){switch(s.label){case 0:return n=this.CH(),i=this.tH(),r={Yu:n,dk:Md.DT,fk:i,Uk:wl.POST,Yg:t,Km:gl.bk,Wk:_l.Ek},[4,this.SP.lk(r)];case 1:return[4,s.sent().FT()];case 2:return e=s.sent(),[2,new E(mh(e.certificate))]}})}).call(this)},i.lH=function(){return Vt(function(t,n,i){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return void 0===i&&(i=Md.NT),r=kh(t),[4,Yp(this.aH,"fairplay",this.SP,n)];case 1:return e=o.sent(),s=oc(JSON.stringify({spc:r,ticket:e.ticket})),u={Yu:this.jV(),dk:Md.DT,fk:this.tH(),Uk:wl.POST,zT:s,Vk:0,Yg:n,Km:gl.bk,Wk:_l.Tk},[4,this.SP.lk(u)];case 2:return[4,o.sent().FT()];case 3:return[2,mh(o.sent().licence)]}})}).apply(this,arguments)},Nt(n,[{key:"LH",get:function(){return ck.DT}}]),n}(ak);F(),Et(),Dt();var Tk=function(t){function n(n,i,r,e){return t.call(this,n,i,r,e,Md.NT)||this}Ct(n,t);var i=n.prototype;return i.NH=function(t,n){return kh(t)},i.rH=function(n){if(0===n.length)throw new eg(cd.CONTENT_PROTECTION_LICENSE_ERROR,"Vimond license request error.");return t.prototype.rH.call(this,n)},i.tH=function(){var n=t.prototype.tH.call(this);return n.set("Content-Type","text/plain"),n},n}(ak);F(),Et(),Bt(),Dt();var Sk=function(t){function n(n,i,r,e){return t.call(this,n,i,r,e,Md.CT)||this}Ct(n,t);var i=n.prototype;return i.NH=function(t,n){return t},i.rH=function(t){return new E(t)},i.tH=function(){if(!Ep(this.aH))throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");var n=t.prototype.tH.call(this);return n.set("X-AxDRM-Message",this.aH.token),n},Nt(n,[{key:"LH",get:function(){return ck.DT}}]),n}(ak);F(),Et(),Bt(),Dt();var Ek=function(t){function n(n,i,r,e){var s;return(s=t.call(this,n,i,r,e,Md.DT)||this).WH=void 0,s}Ct(n,t);var i=n.prototype;return i.NH=function(t,n){var i={spc:kh(t)};return JSON.stringify(i)},i.OH=function(t){var n=Vn.Dh(t);return this.WH=t,n.searchParams.has("b")?ut.resolve(n.searchParams.get("b")):ut.reject(new eg(cd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Error during license server request: Could not extract content id"))},i.iH=function(n,i){var r=this.jV();return!r&&this.WH&&(r=this.WH),r&&(r=r.replace("skd://","https://")),t.prototype.iH.call(this,n,i||r)},i.rH=function(t){try{var n;if((n=qn(t)?JSON.parse(t.trim()):t).ckc)return mh(n.ckc)}catch(t){throw new eg(cd.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Uplynk Fairplay license server")}throw new eg(cd.CONTENT_PROTECTION_LICENSE_ERROR,"No license received from the Uplynk Fairplay license server")},Nt(n,[{key:"LH",get:function(){return ck.NT}}]),n}(ak);F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Wt(),Qt(),F(),Et(),Ut();var Ik=function(){function t(t,n){this.zH=void 0,this.XH=void 0,this.zH=t,this.XH=n}var n=t.prototype;return n.qH=function(t){return this.zH(t)},n.GH=function(t,n){throw new p(n+" must be "+this.XH+". (Received: "+t+")")},t}(),Rk=(new Ik(function(t){return!0},"any"),new Ik(Yn,"a number")),Ck=new Ik(qn,"a string"),Dk=new Ik(Gn,"a boolean"),Pk=(new Ik(Qn,"a date"),new Ik(Fn,"undefined")),Nk=new Ik(zn,"an object"),Bk=new Ik(function(t){return null===t},"null");new Ik(function(t){return null==t},"null or undefined");function xk(t,n){throw new p(n+" has an incorrect type")}var Ok=function(){function t(t){this.Qp=void 0,this.Qp=t}var n=t.prototype;return n.qH=function(t){if(!zn(t))return!1;for(var n,i=Lt(k.keys(this.Qp));!(n=i()).done;){var r=n.value;if(!this.Qp[r].qH(t[r]))return!1}return!0},n.GH=function(t,n){if(!zn(t))throw new p(n+" must be an object.");for(var i,r=Lt(k.keys(this.Qp));!(i=r()).done;){var e=i.value,s=this.Qp[e];if(!s.qH(t[e]))return s.GH(t[e],n+"."+String(e))}throw new p},t}();function Mk(t){return new Ok(t)}function Lk(t){return k.keys(t).map(function(n){return t[n]})}var Uk=function(){function t(t){this.jH=void 0,this.jH=t}var n=t.prototype;return n.qH=function(t){return ji(this.jH,t)},n.GH=function(t,n){return xk(0,n)},t}();function Fk(t){return new Uk(t)}var Vk=function(){function t(t){this.QH=void 0,this.QH=t}var n=t.prototype;return n.qH=function(t){return this.QH.some(function(n){return n.qH(t)})},n.GH=function(t,n){return xk(0,n)},t}();function Hk(){for(var t=arguments.length,n=new Array(t),i=0;i36e5},n.cW=function(t){this.dW=t,this.lW()},n.fW=function(){var t;return null!=this.dW||(this.dW=null!=(t=this.uW())?t:yb),this.dW},t}();pb.Ng=new pb,F(),Et();var kb=function(t){return t[t.vW=0]="vW",t[t._W=1]="_W",t[t.gW=2]="gW",t[t.pW=3]="pW",t[t.mW=4]="mW",t[t.wW=5]="wW",t[t.dR=6]="dR",t[t.yW=7]="yW",t[t.AW=8]="AW",t[t._R=9]="_R",t[t.bW=10]="bW",t[t.gR=11]="gR",t[t.TW=12]="TW",t}({});F(),Et(),Bt();var bb=function(){function t(){}return t.prototype.PW=function(t){},Nt(t,[{key:"kW",get:function(){return 0}},{key:"EW",get:function(){return 0}}]),t}();F(),Et(),Dt(),F(),Et(),Dt();var Ab=function(t){function n(n){var i;return(i=t.call(this,"contentProtectionsTracked")||this).xW=void 0,i.xW=n,i}return Ct(n,t),n}(rh),Tb=function(t){function n(n,i){var r;return void 0===i&&(i=new gb),(r=t.call(this)||this).nV=void 0,r.RW=void 0,r.kH=void 0,r.nV=n,r.RW=i,r}Ct(n,t);var i=n.prototype;return i.IW=function(t){this.kH=t},i._H=function(t){var n=this.kH;if(void 0!==n)return this.RW._H(t,n)},i.MS=function(t){var n=this.kH;return void 0!==n&&this.RW.MS(t,n)},i.DW=function(t){var n={kS:t.kS,BW:t.BW||[],NW:t.NW,HH:t.HH,MW:t.MW||[]},i=this.RW.$H(n,this.kH||{},t.uH,this.nV);return n.NW&&i.qV(n.NW),new Sb(i)},i.LW=function(t){t&&(Ui(t,function(t){return void 0!==t.uH})&&this.So(new Ab(t)))},n}(th),Sb=function(){function t(t){this.OW=void 0,this.OW=t}var n=t.prototype;return n.KV=function(t){return this.OW.KV(t)},n.YV=function(t,n,i){return this.OW.YV(n,i)},n.QV=function(){return this.OW.QV||void 0!==this.OW.GV},n.dH=function(t,n){return this.OW.dH(t,n)},n.lH=function(t,n,i){return n&&this.OW.qV(n),this.OW.lH(t,i)},n.zg=function(){this.OW.kn()},t}();F(),Et(),Dt(),Ut();var Eb=function(t){function n(n){var i;(i=t.call(this)||this).UW=[],i.GW=function(t){i.tt(t.Ht)},i.uV=function(t){var n=t.Ht;i.zW(n)||i.it(n)};for(var r,e=Lt(n);!(r=e()).done;){var s=r.value;i.FW(s)}return i}Ct(n,t);var i=n.prototype;return i.FW=function(t){this.UW.push(t);for(var n,i=Lt(t.II);!(n=i()).done;){var r=n.value;this.tt(r)}this.VW(t)},i.WW=function(t){Xi(this.UW,t),this.qW(t);for(var n,i=Lt(t.II);!(n=i()).done;){var r=n.value;this.zW(r)||this.it(r)}},i.zW=function(t){for(var n,i=Lt(this.UW);!(n=i()).done;){if(n.value.DI(t))return!0}return!1},i.VW=function(t){t.wn(Sw.eI,this.GW),t.wn(Sw.nI,this.uV)},i.qW=function(t){t.mn(Sw.eI,this.GW),t.mn(Sw.nI,this.uV)},i.kn=function(){for(;this.UW.length>0;)this.WW(this.UW[0]);t.prototype.kn.call(this)},i.xa=function(){return jm(this)},n}(Pw);F(),Et(),Bt(),F(),Et();var Ib,Rb={forceSeekOffset:0,maximumOffset:0,maximumPlaybackRate:0,minimumOffset:0,minimumPlaybackRate:0,targetOffset:0},Cb=function(){function t(){this.hu=void 0,this.jW=void 0,this.We=void 0}var n=t.prototype;return n.Ea=function(t){this.jW=t,void 0!==this.We&&(this.jW.Rt=this.We)},n.hr=function(){this.jW=void 0,this.We=void 0},Nt(t,[{key:"Ca",get:function(){return null!=this.hu||(this.hu=function(t){return{get enabled(){return t.Rt},set enabled(n){t.Rt=Vw(n)},get monitoringLivePlayback(){return t.XW},get currentLatency(){return t.BL},get currentConfiguration(){return function(t){if(void 0!==t)return{get minimumOffset(){return t.minimumOffset},get maximumOffset(){return t.maximumOffset},get targetOffset(){return t.targetOffset},get forceSeekOffset(){return t.forceSeekOffset},get minimumPlaybackRate(){return t.minimumPlaybackRate},get maximumPlaybackRate(){return t.maximumPlaybackRate}}}(t.Cd)}}}(this)),this.hu}},{key:"Rt",get:function(){var t,n;return null!=(n=this.We)?n:Boolean(null==(t=this.jW)?void 0:t.Rt)},set:function(t){this.We=t,this.jW&&(this.jW.Rt=t)}},{key:"XW",get:function(){var t,n;return null!=(n=null==(t=this.jW)?void 0:t.sL)&&n}},{key:"BL",get:function(){var t;return null==(t=this.jW)?void 0:t.DL}},{key:"Cd",get:function(){return this.jW?this.jW.nL:Rb}}]),t}();var Db=Boolean(f&&f.TextTrack),Pb=function(t){function n(n,i,r,e,s,u,o,h){var c;return void 0===o&&(o=new gb),void 0===h&&(h=Cd()),(c=t.call(this)||this).xq=void 0,c.TL=void 0,c.iq=void 0,c.YL=void 0,c.$L=void 0,c.Gl=void 0,c.yq=void 0,c.Ac=void 0,c.JW=void 0,c.ZW=void 0,c.tq=void 0,c.kq=void 0,c.bq=void 0,c.pq=void 0,c.nV=void 0,c.hw=void 0,c.lq=void 0,c.YW=void 0,c.oq=new bb,c.rq=new Cb,c.Dq=function(t){var n=t.lt,i=n.code,r=new fd(ag(i),"Something went wrong during native playback.",n),e=new ug(i,r.message,n.message);c.qq(r,e)},c.Nc=function(){c.So(new pw(c.MP,c.CP))},c.zq=function(){!c.kx&&On.ru&&On.X_&&c.ct===1/0&&c.OP(1/0)},c.Rq=function(t){c.hx||(c.YW=void 0),c.So(t)},c.IL=function(t){c.YW=void 0},c.Nq=function(){c.So(new Rg(c.KP))},c.Cq=function(){c.Bx>0&&c.Rx>0&&c.So(new Ty)},c.Oq=function(t){var n=c.TL.$W.audioTracks;if(n)for(var i=0;i0?t:null!=n?n:[]}function kA(t,n){if(void 0!==n)switch(t){case ig.Bk:return n.preferredVideoCodecs;case ig.Dk:return n.preferredAudioCodecs;default:return}}F(),Et(),F(),Et(),F(),Et(),F(),Et(),F(),Et(),F(),Et(),F(),Et(),F(),Et(),F(),Et(),F(),Et(),Bt(),Dt(),F(),Et();var bA=!1;function AA(t,n,i){return i?t<=n:t>1,this.EM=t,this.xM=n||function(t){for(var n=new Array(2*t),i=0,r=0;i=this.V)throw new y("The index provided ("+t+") is greater than the maximum bound ("+this.V+")")},n.DM=function(t){if(0===this.V)return 0;if(this.Cr(t))return t;if(t<=this.Tn(0))return this.Tn(0);if(t>=this.An(this.V-1))return this.An(this.V-1);for(var n=0,i=1/0,r=0;rf||(s===a&&(o=v=o||v),u===f&&(h=d=h||d),AA(a,u+n,h||v)?(u=f,h=d):(r.push(s,u),e.push(o,h),s=a,u=f,o=v,h=d))}return r.push(s,u),e.push(o,h),new t(r,e).NM()},n.NM=function(){for(var n=[],i=[],r=0;r=0},n.HM=function(t,n,i,r,e){return this.WM(t,n,i,r,e)>=0},n.qM=function(t,n,i,r,e){return this.zM(t,n,i,r,e)>=0},n.GM=function(t){if(t.V!==this.V)return!1;for(var n=0;n=0;r-=1)if(AA(this.Tn(r),i,this.PM(r)))return r;return-1},n.QM=function(t,n){void 0===n&&(n=0);for(var i=t-n,r=0;ri)return r;return-1},n.YM=function(n){return this.RM(n),new t([this.Tn(n),this.An(n)],[this.PM(n),this.IM(n)])},n.JM=function(t,n){var i=this.VM(t,n);return i<0?void 0:this.YM(i)},t.jn=function(n){for(var i=[],r=0;re.rL.forceSeekOffset)return e.So(new rh("latencyrecoveryseek")),void e.oR();var i=e.rL,r=i.minimumOffset,s=i.targetOffset,u=i.maximumOffset,o=e.TL.ux;if(!e.ML(n,r,u))if(n>u&&e.LL()){var h=e.rL.maximumPlaybackRate;bA,e.PL(h)}else if(n1&&ns){bA,e.PL(1)}}},e.oa=n,e.TL=i,e.fL=r,e.wL=r.targetOffset,e.yL=r.targetOffset+(null!=(s=r.leniency)?s:0),e.vL=r.targetOffset,e.rL=e.cL(),e.oa.wn(Ey.SM,e.xL),e.oa.wn(Ey.TM,e.IL),e}Ct(n,t);var i=n.prototype;return i.hL=function(t){this.oL.push(t),this.aL()},i.uL=function(t){Xi(this.oL,t),this.aL()},i.aL=function(){this.rL=this.cL(),this.ho&&this.dL()},i.cL=function(){var t=this.lL,n=function(t,n){var i=n-t.targetOffset;return{minimumOffset:t.minimumOffset+i,targetOffset:t.targetOffset+i,maximumOffset:t.maximumOffset+i,forceSeekOffset:t.forceSeekOffset+i,minimumPlaybackRate:t.minimumPlaybackRate,maximumPlaybackRate:t.maximumPlaybackRate,leniency:t.leniency}}(this.fL,this.vL),i=[].concat([n],this.oL),r=i.reduce(function(t,n){var i;return b.max(t,null!=(i=null==n?void 0:n.minimumOffset)?i:0)},t),e=i.reduce(function(t,n){var i;return b.max(t,null!=(i=null==n?void 0:n.targetOffset)?i:0)},r+CA),s=i.reduce(function(t,n){var i;return b.max(t,null!=(i=null==n?void 0:n.maximumOffset)?i:0)},e+CA);return{minimumOffset:r,targetOffset:e,maximumOffset:s,forceSeekOffset:i.reduce(function(t,n){var i;return b.max(t,null!=(i=null==n?void 0:n.forceSeekOffset)?i:0)},s+CA),minimumPlaybackRate:i.reduce(function(t,n){var i;return b.min(t,null!=(i=n.minimumPlaybackRate)?i:IA)},IA),maximumPlaybackRate:i.reduce(function(t,n){var i;return b.max(t,null!=(i=n.maximumPlaybackRate)?i:RA)},RA)}},i._L=function(){var t,n=null==(t=TA.jn(this.oa.IP).JM(this.oa.MP))?void 0:t.An(0),i=void 0!==n?n-this.oa.MP:0;this.gL=b.min(this.gL,i),this.pL+=1},i.mL=function(){if(!(this.pL<10)){var t=.25-this.gL,n=Ti(this.vL+t,this.vL-.1,this.vL+.1);this.vL=Ti(n,this.wL,this.yL),this.gL=1/0,this.pL=0}},i.AL=function(){var t=this;this.bL(),this.fE=Vn.Og(function(){return t.dL()},500)},i.bL=function(){void 0!==this.fE&&(Vn.Lg(this.fE),this.fE=void 0)},i.Tn=function(){var t=this;this.We&&this.SL&&(this.ho||this.TL.wn(eh._y,this.dL),this.kL=Vn.fm(function(){return t._L()},1e3),this.EL=Vn.fm(function(){return t.mL()},6e4),this.AL(),this.ho=!0)},i.Xx=function(){this.ho&&(this.bL(),this.kL&&Vn.vm(this.kL),this.EL&&Vn.vm(this.EL),this.TL.mn(eh._y,this.dL),this.PL(1),this.ho=!1)},i.zg=function(){this.Xx(),this.oa.mn(Ey.SM,this.xL),this.oa.mn(Ey.TM,this.IL),this.Vo()},i.PL=function(t){this.TL.CL.RL||this.oa.ux!==t&&(this.oa.ux=t)},Nt(n,[{key:"sL",get:function(){return this.We&&this.ho}},{key:"nL",get:function(){return this.rL}},{key:"Rt",get:function(){return this.We},set:function(t){this.We=t,t?this.Tn():this.Xx()}},{key:"DL",get:function(){return this.oa.BL}}]),n}(th),PA=.66,NA=1.5,BA=3;function xA(t){if(Un(t)){var n,i,r,e,s,u,o=Vn.Zs.mp?10:0,h=t.targetOffset;return{minimumOffset:null!=(n=t.minimumOffset)?n:h*PA,targetOffset:h,maximumOffset:null!=(i=t.maximumOffset)?i:h*NA,forceSeekOffset:b.max(null!=(r=t.forceSeekOffset)?r:h*BA,o),minimumPlaybackRate:null!=(e=t.minimumPlaybackRate)?e:IA,maximumPlaybackRate:null!=(s=t.maximumPlaybackRate)?s:RA,leniency:null!=(u=t.leniency)?u:void 0}}}var OA=function(t){return t.OL="auto",t.FL="always",t.UL="never",t.CLEAR_ONLY="clear-only",t.SAME_DRM_ONLY="same-drm-only",t}({}),MA=function(t){return t.UPLYNK="uplynk",t.MEDIATAILOR="mediatailor",t}({});function LA(t){if(!t||!qn(t))return"auto";switch(t){case"always":return"always";case"never":return"never";case"clear-only":return"clear-only";case"same-drm-only":return"same-drm-only";default:return"auto"}}F(),Et(),F(),Et();var UA=function(t){return t.ENABLED="enabled",t.INSECURE="insecure",t.DISABLED="disabled",t}({});F(),Et();var FA=!1;F(),Et();var VA=function(t){return t.NONE="none",t.MIDROLL_AND_POSTROLL="midroll-and-postroll",t}({});function HA(t){var n=null==t?void 0:t.match(/\b(?:m3u8|mpd)\b/i);if(!n)return hA.fR;switch(n[0].toLowerCase()){case"mpd":return hA.cR;case"m3u8":return hA.dR;default:return hA.fR}}function WA(t){switch(t){case oA.aR:case oA.uR:return t;default:return oA.Lk}}function zA(t){if(!t)return!1;var n=t.toLowerCase();return Uo(n,hA.cR)}function XA(t){if(!t)return!1;var n=t.toLowerCase();return Uo(n,hA.dR)||Uo(n,hA.lR)}function qA(t){return zn(t)&&zn(t.ssai)&&"google-dai"===t.ssai.integration}function GA(t){return zn(t)&&"uplynk"===t.integration}function jA(t){return zn(t)&&"theolive"===t.type}function QA(t){return zn(t)&&"mediatailor"===t.integration}function YA(t){return zn(t)&&"millicast"===t.type}function KA(t){if(qn(t))return!t;if(GA(t))return!t.id;if(qA(t)){var n=t.ssai,i="live"===n.availabilityType&&n.assetKey,r="vod"===n.availabilityType&&n.contentSourceID&&n.videoID;return Boolean(i&&r)}return YA(t)?!t.src||!t.streamAccountId:!t.src}function JA(t){return Boolean(zn(t)&&qn(t.src))}function ZA(t){return t.type===hA.vR||t.type===hA._R}function $A(t){return qn(t)||JA(t)||qA(t)||GA(t)||YA(t)}function tT(t){if(t){if($A(t))return KA(t);for(var n,i=Lt(t);!(n=i()).done;){if(!KA(n.value))return!1}return!0}return!0}function nT(){return{crossOrigin:oA.Lk,useCredentials:!1,liveOffset:void 0,timeServer:void 0,hlsDateRange:void 0,experimentalRendering:!1,nativeUiRendering:!1,lowLatency:!1,useNativePlayback:!1,useManagedMediaSource:!1,dash:void 0,hls:void 0,abr:void 0,lcevc:void 0,ignoreEmbeddedTextTrackTypes:[],seamlessSwitchStrategy:OA.OL,latencyConfiguration:void 0}}function iT(){return Yu({},nT(),{src:void 0,type:hA.fR,contentProtection:void 0,ssai:void 0,integrationData:void 0,isAdvertisement:void 0})}function rT(t){var n={allowedMimeTypes:void 0,preload:"midroll-and-postroll",showCountdown:!0,vpaidMode:UA.ENABLED,googleIma:{useNativeIma:!1,useAdUiElementForSsai:!0,bitrate:-1,language:void 0,uiElements:void 0,allowSeekingForGoogleDai:!1},theoads:FA,allowSkipAdBreak:!1};return void 0===t||(void 0!==t.preload&&(n.preload=function(t){return"none"===t?VA.NONE:VA.MIDROLL_AND_POSTROLL}(t.preload)),void 0!==t.showCountdown&&(n.showCountdown=Vw(t.showCountdown)),void 0!==t.vpaidMode&&(n.vpaidMode=function(t){switch(t){case"insecure":return UA.INSECURE;case"disabled":return UA.DISABLED;default:return UA.ENABLED}}(t.vpaidMode)),Hn(t.allowedMimeTypes)&&(n.allowedMimeTypes=t.allowedMimeTypes.filter(qn)),void 0!==t.googleIma&&(n.googleIma=function(t){return void 0===t?{useNativeIma:!1,useAdUiElementForSsai:!0,bitrate:-1,language:void 0,uiElements:void 0,allowSeekingForGoogleDai:!1}:{useNativeIma:Vw(t.useNativeIma),useAdUiElementForSsai:null==(n=Hw(t.useAdUiElementForSsai))||n,bitrate:null!=(i=t.bitrate)?i:-1,language:Un(t.language)?Xw(t.language):void 0,uiElements:t.uiElements,allowSeekingForGoogleDai:Vw(t.allowSeekingForGoogleDai)};var n,i}(t.googleIma)),void 0!==t.theoads?n.theoads=Vw(t.theoads):n.theoads=FA,n.allowSkipAdBreak=Vw(t.allowSkipAdBreak)),n}function eT(t){if(!Wn(t))return[];for(var n,i=[],r=Lt(t);!(n=r()).done;){var e=n.value;zn(e)&&i.push(e)}return i}function sT(t){return qn(t.src)||YA(t)}function uT(t){return Hn(t)?t.filter(Pg):[]}F(),Et(),Dt();var oT=function(t){function n(n,i){var r;return void 0===i&&(i=Cy.VL),(r=t.call(this,eh.Cw)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=n,r.readyState=i,r}return Ct(n,t),n}(rh);F(),Et(),Dt();var hT=function(t){function n(n){var i;return(i=t.call(this,eh.jw)||this).currentTime=void 0,i.currentTime=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var cT=function(t){function n(n){var i;return(i=t.call(this,eh.uo)||this).currentTime=void 0,i.currentTime=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var aT=function(t){function n(n){var i;return(i=t.call(this,eh.Rw)||this).duration=void 0,i.duration=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var fT=function(t){function n(n,i){var r;return(r=t.call(this,eh.Kw)||this).currentTime=void 0,r.playbackRate=void 0,r.currentTime=n,r.playbackRate=i,r}return Ct(n,t),n}(rh);F(),Et(),Dt();var vT=function(t){function n(n){var i;return(i=t.call(this,eh.Bw)||this).currentTime=void 0,i.currentTime=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var dT=function(t){function n(n){var i;return(i=t.call(this,eh.$w)||this).currentTime=void 0,i.currentTime=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var lT=function(t){function n(n){var i;return(i=t.call(this,eh.Zw)||this).currentTime=void 0,i.currentTime=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var wT=function(t){function n(n,i){var r;return(r=t.call(this,eh.gy)||this).currentTime=void 0,r.volume=void 0,r.currentTime=n,r.volume=i,r}return Ct(n,t),n}(rh);function gT(){return Vt(function(t,n,i,r,e){var s,u,o;return zt(this,function(h){switch(h.label){case 0:void 0===i&&(i=3),void 0===r&&(r=1e3),void 0===e&&(e=1/0),s=0,h.label=1;case 1:0,h.label=2;case 2:return h.trys.push([2,4,,7]),[4,t(n)];case 3:return[2,h.sent()];case 4:return lr(u=h.sent()),sCy.VL&&y===Cy.VL)&&t.So(new oT(v,y)),_&&!o?t.So(new hT(v)):!_&&o&&t.So(new cT(v)),y>=Cy.Qn&&(r||c=Cy.HL&&(r||c=Cy.WL&&(r||c=Cy.qL&&(r||c1)0;else if(0===n.length)throw y("Unknown ad integration: "+t.integration);return n[0]||null},n.zz=function(t){this.Vz.push(t)},Nt(t,[{key:"Uz",get:function(){return this.Vz}}]),t}();yS.Ng=new yS,F(),Et(),Dt(),F(),Et(),F(),Et(),Dt(),F(),Et(),Bt(),Dt();var pS=function(t){return t.TM="PLAYING",t.Gz="PAUSED",t.Xz="SEEK",t.jz="STALLED",t.Qz="FAILED",t.Kz="INITIAL_BUFFERING",t.Yz="NO_ACCESS",t}({}),kS=function(t){return t.Jz="HTTP_REQUEST_STATUS_CODE_1XX",t.Zz="HTTP_REQUEST_STATUS_CODE_2XX",t.$z="HTTP_REQUEST_STATUS_CODE_3XX",t.tG="HTTP_REQUEST_STATUS_CODE_4XX",t.iG="HTTP_REQUEST_STATUS_CODE_5XX",t.eG="BUFFER_LENGTH",t.sG="BYTES_RECEIVED",t.nG="SEGMENT_READ_BITRATE",t.rG="SEGMENT_PROFILE_BITRATE",t.hG="VIDEO_PROFILE_BITRATE",t.oG="NUMBER_OF_FRAMES_DROPPED",t.aG="PLAYBACK_POSITION",t.uG="NUMBER_OF_FRAMES_DECODED",t.cG="PLAYBACK_DELTA_TO_ORIGIN",t.dG="STREAM_DELTA_TO_ORIGIN",t.lG="ORIGIN_TIMESTAMP",t}({}),bS=function(t){return t.fG="MANIFEST_URI",t.vG="ASSET_DURATION",t._G="NUMBER_OF_CONTENT_PROFILES",t.gG="CDN",t.pG="CONTENT_TITLE",t.mG="SERVICE_NAME",t.wG="CONTENT_TYPE",t.yG="CONTENT_DESCRIPTION",t}({}),AS=function(t){return t.AG="shutdown_normal_shutdown",t}({}),TS=function(t){return t.bG="session/",t.SG="content/",t.TG="internalError/",t.kG="drmError/",t.EG="caError/",t.xG="networkError/",t}({}),SS=function(){function t(t,n){this.category=void 0,this.statusCode=void 0,this.category=t,this.statusCode=n}return Nt(t,[{key:"code",get:function(){return this.category+this.statusCode}}]),t}(),ES=function(t){function n(){return t.apply(this,arguments)||this}return Ct(n,t),n}(th);F(),Et(),Dt(),F(),Et(),F(),Et();var IS=function(t){return t.PAUSE="IG",t.RESUME="CG",t}({}),RS=function(t){function n(){return t.call(this,"DG")||this}return Ct(n,t),n}(rh),CS=function(t){function n(n,i){var r;return(r=t.call(this)||this).oa=void 0,r.OG=void 0,r.NG=void 0,r.FG=void 0,r.UG=void 0,r.oa=n,r.OG=i,r.NG=!1,r.FG=function(){r.MG(),r.NG=!1},r.UG=function(){r.NG=!0},r.OG.wn(IS.PAUSE,r.FG),r.OG.wn(IS.RESUME,r.UG),r}Ct(n,t);var i=n.prototype;return i.BG=function(){this.NG=!0},i.MG=function(){},i.kn=function(){this.NG=!1,this.OG.mn(IS.PAUSE,this.FG),this.OG.mn(IS.RESUME,this.UG)},i.VG=function(){return isFinite(this.oa.Nd())},n}(th),DS=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).KG=!1,n.sX=!1,n.nX=!1,n.qG=function(){n.sX&&!n.nX&&n.ZG(pS.jz)},n.GG=function(){n.oa.hx||(n.sX||n.iX(new SS(TS.SG,"firstFrameDisplayed"),"now"),n.sX=!0,n.ZG(pS.TM))},n.zG=function(){n.oa.hx&&(n.sX=!0,n.ZG(pS.Gz))},n.XG=function(){n.KG&&(n.nX=!0,n.KG=!1,n.ZG(pS.Xz))},n.jG=function(){n.nX=!1,n.oa.hx&&n.ZG(pS.Gz)},n}Ct(n,t);var i=n.prototype;return i.BG=function(){t.prototype.BG.call(this),this.HG()},i.kn=function(){this.WG(),t.prototype.kn.call(this)},i.HG=function(){this.oa.wn(Ey.SM,this.qG),this.oa.wn(eh.jw,this.zG),this.oa.wn(Ey.TM,this.GG),this.oa.wn(eh.$w,this.XG),this.oa.wn(eh.Zw,this.jG)},i.WG=function(){this.oa.mn(Ey.SM,this.qG),this.oa.mn(eh.jw,this.zG),this.oa.mn(Ey.TM,this.GG),this.oa.mn(eh.$w,this.XG),this.oa.mn(eh.Zw,this.jG)},i.QG=function(){this.KG=!0},i.YG=function(){var t=this.oa.HP(),n=new SS(TS.TG,String(t.code));this.JG(pS.Qz,n,t.message)},i.ZG=function(t){this.NG&&(this.OG.$G(t),this.So(new RS))},i.JG=function(t,n,i){this.OG.tX(t,n,i),this.So(new RS)},i.iX=function(t,n){this.OG.eX(t,n)},n}(CS);F(),Et(),Dt();var PS=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).uX=function(){n.VG()&&n.lX(bS.vG,b.round(n.oa.Nd()))},n.aX=function(t){"manifest"===t.request.type&&n.lX(bS.fG,t.url)},n.rX=function(){var t=Ui(n.oa.rt.II,function(t){return t.Rt});t&&n.lX(bS._G,t.KI.V)},n}Ct(n,t);var i=n.prototype;return i.BG=function(){t.prototype.BG.call(this),this.rX(),this.HG()},i.kn=function(){this.WG(),t.prototype.kn.call(this)},i.HG=function(){this.oa.rt.wn(Dw.pa,this.rX),this.oa.oX.hX(this.aX),this.oa.wn(eh.Rw,this.uX)},i.WG=function(){this.oa.rt.mn(Dw.pa,this.rX),this.oa.oX.cX(this.aX),this.oa.mn(eh.Rw,this.uX)},i.dX=function(t){t.serviceName&&this.lX(bS.mG,t.serviceName),t.cdn&&this.lX(bS.gG,t.cdn),t.contentTitle&&this.lX(bS.pG,t.contentTitle),t.contentType&&this.lX(bS.wG,t.contentType),t.contentDescription&&this.lX(bS.yG,t.contentDescription)},i.lX=function(t,n){this.NG&&this.OG.fX(t,n)},n}(CS);F(),Et(),Dt();var NS=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).EX=Ju(),n.SX=0,n.vX=0,n._X=0,n.gX=[],n.pX=function(){n.PX(),n.xX(),n.CX()},n.yX=function(t){t.qk===ig.Bk&&(n.bX(t.rO),n.IX(),n.RX(t.BX),n.mX())},n.wX=function(t){var i=t.status.toString()[0],r=n.EX.get(i)||0;n.EX.set(i,r+1),n.kX(kS.Jz,"1"),n.kX(kS.Zz,"2"),n.kX(kS.$z,"3"),n.kX(kS.tG,"4"),n.kX(kS.iG,"5")},n}Ct(n,t);var i=n.prototype;return i.BG=function(){t.prototype.BG.call(this),this.vX=this.oa.JP.iO,this._X=this.oa.JP.sO,this.HG(),this.gX.push(_(this.pX,1e3))},i.MG=function(){t.prototype.MG.call(this),this.mX()},i.kn=function(){this.mX(),this.WG(),this.gX.forEach(m),Yi(this.gX),t.prototype.kn.call(this)},i.HG=function(){this.oa.oX.hX(this.wX),this.oa.wn(eh.ly,this.yX)},i.WG=function(){this.oa.oX.cX(this.wX),this.oa.mn(eh.ly,this.yX)},i.AX=function(){this.mX()},i.bX=function(t){this.SX+=t,this.TX(kS.sG,this.SX)},i.kX=function(t,n){var i=this.EX.get(n)||0;this.TX(t,i)},i.PX=function(){var t=this.oa.JP.iO-this.vX;this.TX(kS.oG,t)},i.xX=function(){var t=this.oa.JP.sO-this._X;this.TX(kS.uG,t)},i.IX=function(){var t=pb.Ng.fW();this.TX(kS.nG,Ec(t))},i.RX=function(t){this.TX(kS.rG,Ec(t)),this.TX(kS.hG,Ec(t))},i.mX=function(){if(this.VG()){var t=b.round(fe(this.oa.LP()));this.TX(kS.aG,t)}},i.CX=function(){var t=TA.jn(this.oa.RP()),n=this.oa.LP(),i=t.JM(n),r=i?fe(i.An(0)-n):0;this.TX(kS.eG,r)},i.TX=function(t,n){this.NG&&this.OG.DX(t,n)},n}(CS);F(),Et(),Ut();function BS(t){return t&&t.integration===VS}function xS(t){if(!qn(t.asset))throw new p("Agama source configuration: expected 'asset' to be a string");if(!function(t){return!!qn(t)&&("live"===t||"vod"===t)}(t.streamType))throw new p("Agama source configuration: expected 'streamType' to be 'live' or 'vod'");if(void 0!==t.serviceName&&!function(t){return!!qn(t)&&("live"===t||"svod"===t||"nvod"===t||"tvod"===t||"avod"===t||"catchuptv"===t)}(t.serviceName))throw new p("Agama source configuration: expected 'serviceName' to be 'live', 'svod', 'nvod','tvod', 'avod' or 'catchuptv'");if(void 0!==t.cdn&&!qn(t.cdn))throw new p("Agama source configuration: expected 'cdn' to be a string");if(void 0!==t.contentTitle&&!qn(t.contentTitle))throw new p("Agama source configuration: expected 'contentTitle' to be a string");if(void 0!==t.contentType&&!qn(t.contentType))throw new p("Agama source configuration: expected 'contentType' to be a string");if(void 0!==t.contentDescription&&!qn(t.contentDescription))throw new p("Agama source configuration: expected 'contentDescription' to be a string");return t}function OS(t){if(!qn(t.config))throw new p("Agama player configuration: expected 'config' to be a string");if(void 0!==t.logLevel&&!function(t){return!!qn(t)&&("info"===t||"debug"===t||"warning"===t||"error"===t||"fatal"===t)}(t.logLevel))throw new p("Agama player configuration: expected 'logLevel' to be 'info', 'debug', 'warning','error' or 'fatal'");if(void 0!==t.application&&!qn(t.application))throw new p("Agama player configuration: expected 'application' to be a string");if(void 0!==t.applicationVersion&&!qn(t.applicationVersion))throw new p("Agama player configuration: expected 'applicationVersion' to be a string");if(void 0!==t.userAccountID&&!qn(t.userAccountID))throw new p("Agama player configuration: expected 'userAccountID' to be a string");if(void 0!==t.deviceID&&!qn(t.deviceID))throw new p("Agama player configuration: expected 'deviceID' to be a string");return t}function MS(){var t="00000000-0000-0000-0000-000000000000",n=f.navigator,i=f.screen,r=""+n.mimeTypes.length;r+=n.userAgent.replace(/\D+/g,""),r+=n.plugins.length,r+=i.height||"",r+=i.width||"",r+=i.pixelDepth||"";var e=function(t){var n,i=0;if(0===t.length)return"0";for(n=0;n0?YS(t[0]):void 0}function KS(t){if(t&&t.sources)return JS(t.sources)}function JS(t){return qn(t)?t:JA(t)?t.src:Wn(t)&&t.length>0?JS(t[0]):void 0}function ZS(t,n,i){return GA(t)?function(t,n,i){var r=Yu({},nT(),{ping:{adImpressions:!1,freeWheelVideoViews:!1,linearAdData:!1},integration:MA.UPLYNK,id:"",prefix:GS,preplayParameters:{},playbackUrlParameters:{},assetType:qS.ASSET,contentProtected:!1,assetInfo:!0});r.id=function(t){if(qn(t))return t;if(Wn(t)&&qn(t[0]))return t;if(function(t){return zn(t)&&qn(t.userId)&&(Wn(t.externalId)||qn(t.externalId))}(t))return t;return""}(t.id),t.preplayParameters&&(r.preplayParameters=t.preplayParameters);t.playbackUrlParameters&&(r.playbackUrlParameters=t.playbackUrlParameters);t.assetType&&(r.assetType=function(t){switch(t){case"channel":return qS.CHANNEL;case"event":return qS.EVENT;default:return qS.ASSET}}(t.assetType));t.contentProtected&&(r.contentProtected=Vw(t.contentProtected));t.assetInfo?r.assetInfo=Vw(t.assetInfo):r.assetInfo="asset"===r.assetType;t.prefix&&(r.prefix=Xw(t.prefix)||GS);return r.ping=function(t,n){var i=!1,r=!1,e=!1;n?(i=!!Gn(n.adImpressions)&&n.adImpressions,r=!!Gn(n.freeWheelVideoViews)&&n.freeWheelVideoViews,e=Gn(n.linearAdData)?n.linearAdData:t!==qS.ASSET):t!==qS.ASSET&&(e=!0);return{adImpressions:i,freeWheelVideoViews:r,linearAdData:e}}(r.assetType,t.ping),r=nE(r,t),r=rE(r,n,i),r=iE(r,t,i),r}(t,n,i):QA(t)?function(t,n,i){var r;return Yu({},$S(t,n,i),{integration:MA.MEDIATAILOR,adsParams:null!=(r=t.adsParams)?r:{}})}(t,n,i):jA(t)?function(t,n,i){return Yu({},$S(t,n,i),{type:"theolive"})}(t,n,i):YA(t)?function(t,n,i){return Yu({},$S(t,n,i),{type:hA.gR,src:t.src,streamAccountId:t.streamAccountId,subscriberToken:t.subscriberToken,connectOptions:uE(t.connectOptions),apiUrl:t.apiUrl,statsIntervalMs:tE(t.statsIntervalMs)})}(t,n,i):$S(t,n,i)}function $S(t,n,i){var r=iT(),e=n&&(n.contentProtection||n.drm);if(qn(t)){if(r.src=t,r.type=HA(t),e){var s=sS(e);r.contentProtection=dA(s)}}else if(JA(t)||qA(t)||YA(t)){r.src=t.src,r.type=t.type||HA(t.src),r.isAdvertisement=t.isAdvertisement;var u=ZA(t)?t.hesp:void 0;void 0!==u&&(r.hesp=u),QA(t)&&(r.integration=t.integration);var o=sS(t.contentProtection||t.drm||e);r.contentProtection=dA(o),t.ssai&&(r.ssai=fA(t.ssai)),r=nE(r,t)}return r=iE(r=rE(r,n,i),t,i)}function tE(t){if(Yn(t)&&t>0)return t}function nE(t,n){var i,r;n.useCredentials?t.crossOrigin=oA.uR:n.crossOrigin&&(t.crossOrigin=WA(n.crossOrigin)),qn(n.timeServer)&&(t.timeServer=n.timeServer),n.liveOffset&&(t.liveOffset=n.liveOffset),n.hlsDateRange&&(t.hlsDateRange=n.hlsDateRange),n.lowLatency&&(t.lowLatency=Vw(n.lowLatency)),n.useNativePlayback&&(t.useNativePlayback=Vw(n.useNativePlayback)),n.useManagedMediaSource&&(t.useManagedMediaSource=Vw(n.useManagedMediaSource)),n.dash&&(t.dash=lA(n.dash)),n.hls&&(t.hls=wA(n.hls)),n.lcevc&&(t.lcevc=Vw(n.lcevc)),n.ignoreEmbeddedTextTrackTypes&&(t.ignoreEmbeddedTextTrackTypes=uT(n.ignoreEmbeddedTextTrackTypes)),n.latencyConfiguration&&(t.latencyConfiguration=xA(n.latencyConfiguration)),t.seamlessSwitchStrategy=LA(null!=(r=n.seamlessSwitchStrategy)?r:null==(i=n.dash)?void 0:i.useSeamlessPeriodSwitch);var e=Hw(n.experimentalRendering);void 0!==e&&(t.experimentalRendering=e);var s=Hw(n.nativeUiRendering);return void 0!==s&&(t.nativeUiRendering=s),t}function iE(t,n,i){return t.abr=mA(qn(n)?void 0:_A(n.abr),null==i?void 0:i.abr),t}function rE(t,n,i){var r,e=n&&n.timeServer;return i&&i.liveOffset&&!Un(t.liveOffset)&&(t.liveOffset=i.liveOffset),i&&i.hlsDateRange&&!Un(t.hlsDateRange)&&(t.hlsDateRange=i.hlsDateRange),t.crossOrigin===oA.Lk&&(null==n||null==(r=n.vr)?void 0:r[360])&&(t.crossOrigin=oA.aR),t.useCredentials=t.crossOrigin===oA.uR,qn(e)&&!t.timeServer&&(t.timeServer=e),t}function eE(t){var n={src:""};if(t&&t.src){if(n.src=Xw(t.src),"default"in t&&(n.default=Vw(t.default)),n.kind=function(t){var n=String(t||"").toLowerCase();return Jm(n)?n:n?"metadata":"subtitles"}(t.kind),Pg(t.format)&&(n.format=t.format),"srclang"in t){var i=t.srclang;"string"==typeof i&&""!==i&&(n.srclang=i)}if("label"in t){var r=t.label;"string"==typeof r&&""!==r&&(n.label=r)}}return n}function sE(t,n){if(zn(t))try{return n.Wz(t).sj(t)}catch(t){return}}function uE(t){if(null==t)return t;if(!zn(t))throw new y("connectOptions must be an object");return t}function oE(t,n,i){if(void 0===i&&(i=yS.Ng),jS(t))return{sources:[iT()]};var r=Ow(t);if(r.sources=function(t,n,i){if($A(t))return[ZS(t,n,i)];if(Wn(t)&&$A(t[0])){for(var r,e=[],s=Lt(t);!(r=s()).done;){var u=r.value;e.push(ZS(u,n,i))}return e}return[iT()]}(r.sources,r,n),"contentProtection"in r&&delete r.contentProtection,"drm"in r&&delete r.drm,"ads"in r){var e=function(t,n){if(!Wn(t))return[];for(var i,r=[],e=Lt(t);!(i=e()).done;){var s=i.value;(s=sE(s,n))&&r.push(s)}return r}(r.ads,i);0===e.length?delete r.ads:r.ads=e}var s=!tT(r.sources),u=r.ads&&r.ads.length>0;if(s&&!u?delete r.ads:u&&!s&&(r.sources=[]),"textTracks"in r){var o=function(t){if(!Wn(t))return[];for(var n,i=[],r=Lt(t);!(n=r()).done;){var e=n.value;""!==(e=eE(e)).src&&i.push(e)}return i}(r.textTracks);0===o.length?delete r.textTracks:r.textTracks=o}if("poster"in r&&(r.poster=Xw(r.poster)),"streamType"in r&&(r.streamType=function(t){switch(t){case"live":case"dvr":case"vod":return t}}(r.streamType)),"vr"in r&&(r.vr=function(t){var n=t||{};return n.stereoMode=function(t){return function(t){switch(t){case"":case"horizontal":case"vertical":return!0;default:return!1}}(t)?t:""}(n.stereoMode),{panoramaMode:XS(n.panoramaMode,Boolean(n[360])),stereoMode:n.stereoMode?zS(n.stereoMode):HS.NONE,nativeVR:Boolean(n.nativeVR)}}(r.vr)),"analytics"in r||(null==n?void 0:n.analytics)){var h=eT(r.analytics),c=n&&n.analytics||[];r.analytics=function(t,n){for(var i,r=function(){var n=i.value,r=!t.some(function(t){return t.integration===n.integration});r&&n.integration!==VS&&e.push(n)},e=Ow(t),s=Lt(n);!(i=s()).done;)r();return e}(h,c)}return"mutedAutoplay"in r&&(r.mutedAutoplay=kT(r.mutedAutoplay)),"timeServer"in r&&delete r.timeServer,"playAdsAfterTime"in r&&(r.playAdsAfterTime=Ww(r.playAdsAfterTime)),r.blockContentIfAdError=function(t){return void 0!==t&&"boolean"==typeof t&&Boolean(t)}(r.blockContentIfAdError),r}F(),Et(),F(),Et(),F(),Et();var hE=function(){function t(t){this.nj=t}return t.prototype.rj=function(t){var n,i,r,e,s,u,o,h=[];if(!t)return"";var c=t.length%4;if(c>0)for(;c++<4;)t+=this.nj.charAt(64);for(n=0;n>>16&255,r=o>>>8&255,e=255&o,h[n/4]=String.fromCharCode(i,r,e),64===u&&(h[n/4]=String.fromCharCode(i,r)),64===s&&(h[n/4]=String.fromCharCode(i));return h.join("")},t.prototype.hj=function(t,n){var i,r,e,s,u,o,h,c=[],a="";if((o=t.length%3)>0)for(;o++<3;)a+=this.nj.charAt(64),t+="\0";for(o=0;o>18&63,e=i>>12&63,s=i>>6&63,u=63&i,c[o/3]=this.nj.charAt(r)+this.nj.charAt(e)+this.nj.charAt(s)+this.nj.charAt(u);return h=(h=c.join("")).slice(0,h.length-a.length),n||(h+=a),h},t.bh=new t(function(){var t,n,i,r,e=[],s=["object","$","undefined","function","Cannot find module '","MODULE_NOT_FOUND","*","com.widevine.alpha","urn:mpeg:dash:mp4protection:2011","^","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","__proto__","@@iterator","getUTCHours","setUTCFullYear","25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?","SegmentBase","RateChangeEvent","Symbol(","Symbol.",'; codecs="'];for(t=0;t0?t[t.length-1]:this.MA.cj?this.MA.cj:void 0}},n.Cj=function(n,i){return!!t.Gj(n,i.pj)},t.Oj=function(t){var n=Number(new Date);return!!t&&n<=t},t.Gj=function(t,n){return OE(this.Xj(t),n)},t.Xj=function(t){return qn(t)?t:JA(t)&&t.src||""},t}(),CE=function(){function t(){}var n=t.prototype;return n.Nj=function(t){return 0},n.xj=function(t,n){},n.Bj=function(t,n){},t}();function DE(t){switch(t){case"invaliddomain":return cd.LICENSE_INVALID_DOMAIN;case"invalidsource":return cd.LICENSE_INVALID_SOURCE;case"expired":return cd.LICENSE_EXPIRED;case"invalidfeature":return cd.LICENSE_INVALID_FEATURE;case"error":return cd.LICENSE_ERROR}}var PE="25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?",NE=_i(function(){var t="\\.",n="(\\*|"+PE+")";return new RegExp("ip-range\\("+n+t+n+t+n+t+n+"\\)")});function BE(t,n){var i=t,r=n;if(!i)return!1;if("*"===(r=r.trim()))return!0;if(r===(i=i.replace(/\.+$/,"")))return!0;if(Uo(r,"ip-range(")){var e="\\.",s=r.match(NE()),u=function(t){return"*"===t?"("+PE+")":t};if(null!==s&&5===s.length){var o=new RegExp("^"+s[1]+e+u(s[2])+e+u(s[3])+e+u(s[4])+"$");return null!==i.match(o)}}return r="."+r,-1!==i.indexOf(r,i.length-r.length)}function xE(t){return t.some(function(t){return"*"===t})}function OE(t,n){var i=Vn.Dh(t);if(!ME(i))return!0;for(var r,e=Lt(n);!(r=e()).done;){var s=r.value;if(BE(i.hostname,s))return!0;if(BE(Il(t),s))return!0}return!1}function ME(t){return-1!==AE.indexOf(t.protocol)}function LE(t){var n=Vn.Dh(t.Yu);return ME(n)&&!function(t){return BE(t.hostname,"localhost")}(n)&&!function(t){return BE(t.hostname,"theoplayer.doubleclick.net")}(n)}var UE=function(){function t(){}return t.Fj=function(t,n){return"The requested feature '"+n+"' is not available with the license for this player."},t.Dj=function(t){return"invaliddomain"===t?this.Qj:"invalidsource"===t?this.Kj:"expired"===t?this.Yj:"invalidfeature"===t?this.Jj:this.Zj},t}();UE.Zj="The license for this player is invalid.",UE.Yj="The usage license for this video player has expired.",UE.Qj="The current domain is incompatible with the license for this player.",UE.Kj="The provided video source is incompatible with the license for this player.",UE.Jj="The requested feature is not available with the license for this player.",F(),Et(),Wt(),Bt(),Qt(),F(),Et();var FE=function(t){return t[t.$j=1]="$j",t[t.tQ=4]="tQ",t[t.iQ=5]="iQ",t[t.eQ=9]="eQ",t}({});function VE(t){var n=[t.VN,t.sQ,t.nQ];switch(t.sQ){case 1:n.push(t.iR);break;case 4:n.push(t.MP),n.push(t.lt);break;case 5:n.push(t.lt);break;case 9:n.push(t.Km)}return n}F(),Et();var HE,WE=new Array(256);for(HE=0;HE<256;HE+=1)WE[HE]=(HE<16?"0":"")+HE.toString(16);function zE(){var t=ce(),n=(4294967296*b.random()|0)+t&3029421624,i=(4294967296*b.random()|0)+t&3595553209,r=(4294967296*b.random()|0)+t&1130486254,e=(4294967296*b.random()|0)+t&1284287105;return WE[255&n]+WE[n>>>8&255]+WE[n>>>16&255]+WE[n>>>24&255]+"-"+WE[255&i]+WE[i>>>8&255]+"-"+WE[i>>>16&15|64]+WE[i>>>24&255]+"-"+WE[63&r|128]+WE[r>>>8&255]+"-"+WE[r>>>16&255]+WE[r>>>24&255]+WE[255&e]+WE[e>>>8&255]+WE[e>>>16&255]+WE[e>>>24&255]}function XE(t){return Sc(t.replace(/-/g,""))}function qE(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=16*b.random()|0;return("x"===t?n:3&n|8).toString(16)})}function GE(){return Vn.Mg()}F(),Et(),F(),Et(),F(),Et();var jE,QE="theoplayer-session-id";function YE(){if(!jE){var t=Pd.Wy(QE);t?jE=t:(jE=zE(),Pd.qy(QE,jE))}return jE}F(),Et(),F(),Et();var KE=/[^\x00-\x7E]/g;function JE(t){return"\\u"+Wo(t.charCodeAt(0).toString(16),4,"0")}var ZE="https://license.theoplayer.com";function $E(t){var n=function(t){var n=[];return function(t,n,i){return JSON.stringify(t,n,i).replace(KE,JE)}(t,function(t,i){if(zn(i)){if(-1!==n.indexOf(i))return null;n.push(i)}return i})}(function(t){return[t.rQ,t.dS,t._j,t.bD,t.hQ,t.oQ,t.aQ.map(VE)]}(t));return hE.aj.hj(n)}var tI=function(){function t(t,n,i,r,e,s){var u=this;void 0===r&&(r=hE.bh),void 0===e&&(e=0),void 0===s&&(s=1),this.zb=void 0,this.nV=void 0,this.fQ=void 0,this.pQ=void 0,this.wQ=void 0,this.TQ=void 0,this.Zf=void 0,this.cQ=void 0,this.EQ=void 0,this.SQ=void 0,this.yb=void 0,this.IQ=void 0,this.RQ=void 0,this.xQ=void 0,this.zb=t,this.nV=n,this.fQ=i,this.pQ=r,this.wQ=e,this.TQ=s,this.Zf=[],this.cQ=null,this.EQ=0,this.SQ="unknown",this.yb=0,this.RQ=function(){GE()-u.EQ>6e4&&u.AQ()},this.xQ=function(){u.AQ(!0)},f.addEventListener("beforeunload",this.xQ),this.IQ=_(this.RQ,6e4)}var n=t.prototype;return n.uQ=function(){return Boolean(this.hQ)},n.dQ=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return[4,this.fQ.lQ()];case 1:return i.sent().Sj?(n={sQ:FE.$j,nQ:ce(),iR:t},[4,this.iX(n)]):[2];case 2:return i.sent(),[2]}})}).call(this)},n.vQ=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return[4,this.fQ.lQ()];case 1:return i.sent().Sj?(n={sQ:FE.eQ,nQ:ce(),Km:t},[4,this.iX(n)]):[2];case 2:return i.sent(),[2]}})}).call(this)},n._Q=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return i={sQ:FE.tQ,nQ:ce(),MP:n,lt:t},[4,this.iX(i)];case 1:return r.sent(),[2]}})}).call(this)},n.gQ=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return n={sQ:FE.iQ,nQ:ce(),lt:t},[4,this.iX(n)];case 1:return i.sent(),[2]}})}).call(this)},n.iX=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return[4,this.fQ.lQ()];case 1:return n=i.sent(),"a:n[_O*[C4C-N$_@_MYY $D]iOp]N$_-_]th_:c|aen?C:pH"===this.pQ.hj(n._j)&&t.sQ!==FE.iQ?[2]:(t.sQ===FE.$j?this.mQ():this.uQ()||this.mQ(),t.VN=this.yb++,this.Zf.push(t),function(t){return t===FE.$j||t===FE.iQ}(t.sQ)?[4,this.AQ()]:[3,3]);case 2:case 4:return i.sent(),[3,5];case 3:return this.Zf.length>this.wQ?[4,this.yQ()]:[3,5];case 5:return[2]}})}).call(this)},n.AQ=function(t){return void 0===t&&(t=!1),Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.Zf.length>0?[4,this.yQ(t)]:[3,2];case 1:return n.sent(),[3,0];case 2:return[2]}})}).call(this)},n.bQ=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return[4,this.fQ.lQ()];case 1:return n=i.sent(),[2,{rQ:ce(),dS:YE(),_j:this.pQ.hj(n._j)||"dev",bD:this.zb,hQ:this.cQ,oQ:this.SQ,aQ:t}]}})}).call(this)},n.yQ=function(t){return void 0===t&&(t=!1),Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:return n=this.Zf.splice(0,this.TQ),[4,this.bQ(n)];case 1:return i=r.sent(),t?this.Kk(i):this.kQ(i),this.EQ=GE(),[2]}})}).call(this)},n.kQ=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:n=$E(t),i=new pl({Yu:ZE,zT:n,zk:!1,dk:Md.NT,fk:{"Content-Type":ck.IH},Vk:4e3,Uk:wl.POST}),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this.nV.lk(i)];case 2:return[4,r.sent().HT()];case 3:return r.sent(),[3,5];case 4:return r.sent(),(new Image).src="https://licensing.theoplayer.com/t?"+n,[3,5];case 5:return[2]}})}).call(this)},n.Kk=function(t){var n=$E(t);this.nV.Kk({Yu:ZE,zT:n,qT:ck.IH})},n.mQ=function(){this.uQ()&&this.AQ(),this.cQ=zE(),this.yb=0},n.kn=function(){f.removeEventListener("beforeunload",this.xQ),m(this.IQ),this.AQ()},Nt(t,[{key:"aQ",get:function(){return this.Zf}},{key:"hQ",get:function(){return this.cQ}}]),t}();F(),Et(),Bt(),H(),F(),Et(),F(),Et();var nI=0;var iI=g,rI=self.requestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame,eI=self.cancelAnimationFrame||self.webkitCancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelRequestAnimationFrame;rI&&eI||(rI=function(t){var n=GE(),i=b.max(0,16-(n-nI)),r=w(function(){return t(n+i)},i);return nI=n+i,r},eI=iI),rI=rI.bind(self),eI=eI.bind(self);var sI=On.L_||On.ru&&On.Q_<13;function uI(t,n,i){var r=t.getImageData(n,i,1,1).data;return 0===r[0]&&0===r[1]&&0===r[2]&&0===r[3]}var oI=function(){function t(t){var n=this;this.t=void 0,this.MQ=void 0,this.hu=void 0,this.zQ=void 0,this.UQ=Zu(),this.OQ=1,this.qQ=!0,this.XQ=function(){n.qQ=!0},this.GQ=function(){n.MQ=n.t.Wx(),n.UQ.forEach(function(t,i){t.HQ(),t.HQ=n.FQ(t.VQ,i)})},this.t=t,this.t.wn(eh.Lw,this.GQ),this.t.wn(eh.Zw,this.XQ),this.GQ()}var n=t.prototype;return n.CQ=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r=Cy.HL},n.LQ=function(t){var n=this.zQ;void 0===n&&(n=v.createElement("canvas"),this.zQ=n);var i=n.getContext("2d"),r=this.t,e=r.Bx,s=r.Rx,u=n.width,o=n.height;i.clearRect(0,0,n.width,n.height),u===e&&o===s||(n.width=e,n.height=s),i.drawImage(t,0,0,e,s);var h=!1;return e>0&&uI(i,e-1,0)&&(n.width=u,h=!0),s>0&&uI(i,0,s-1)&&(n.height=o,h=!0),h&&i.drawImage(t,0,0,e,s),n},n.kn=function(){this.UQ.forEach(function(t){return t.HQ()}),this.UQ.clear(),this.t.mn(eh.Lw,this.GQ),this.t.mn(eh.Zw,this.XQ),this.MQ=void 0,this.zQ=void 0},Nt(t,[{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{drawImage:function(n){for(var i=arguments.length,r=new Array(i>1?i-1:0),e=1;e0){var n=t[t.length-1].contentRect;r.QQ=n.width,r.jQ=n.height,r.VQ(r.QQ,r.jQ)}},r.KQ=new f.ResizeObserver(r.YQ),r.KQ.observe(r.xe),r}return Ct(n,t),n.prototype.kn=function(){this.KQ.disconnect()},Nt(n,[{key:"Iu",get:function(){return this.jQ}},{key:"Eu",get:function(){return this.QQ}}]),n}(fI);F(),Et(),Bt(),Dt(),F(),Et(),Ut();var dI=["Webkit","Moz","O","ms"],lI=function(){var t=!1;try{if(void 0!==f&&"function"==typeof f.addEventListener){var n=k.defineProperty({},"passive",{get:function(){t=!0}});f.addEventListener("testPassiveEventSupport",di,n),f.removeEventListener("testPassiveEventSupport",di,n)}}catch(t){}return t}(),wI=Ju();function gI(t){return wI.has(t)||wI.set(t,function(t){var n=(aI||(aI=f&&f.document&&f.document.createElement("span")),aI);if(!n||!n.style)return t;if(void 0!==n.style[t])return t;for(var i,r=t.charAt(0).toUpperCase()+t.slice(1),e=Lt(dI);!(i=e()).done;){var s=i.value+r;if(void 0!==n.style[s])return s}return t}(t)),wI.get(t)}function _I(t){var n=t.style;n.position="absolute",n.left="0",n.right="0",n.bottom="0",n.top="0",n.overflow="scroll",n.zIndex="-1",n.visibility="hidden"}function mI(t){var n=t.style;n.position="absolute",n.left="0",n.top="0",n[gI("transition")]="0s"}var yI=function(t){function n(n,i,r){var e;(e=t.call(this,n,i)||this).iK=void 0,e.JQ=0,e.QQ=NaN,e.jQ=NaN,e.ZQ=void 0,e.sK=void 0,e.tK=void 0,e.nK=void 0,e.rK=void 0,e.hr=function(){var t=1e5;e.sK.style.width=t+"px",e.sK.style.height=t+"px",e.ZQ.scrollLeft=t,e.ZQ.scrollTop=t,e.tK.scrollLeft=t,e.tK.scrollTop=t,0===e.tK.scrollTop&&rI(e.hr)},e.hK=function(){var t=e.Eu,n=e.Iu;e.VQ(t,n),e.QQ=t,e.jQ=n,e.hr(),e.JQ=0},e.$Q=function(){if(!e.JQ){var t=e.Eu,n=e.Iu;t===e.QQ&&n===e.jQ||(e.JQ=rI(e.hK))}},e.eK=function(){e.rK||(e.rK=w(e.oK,66))},e.oK=function(){e.rK=void 0,e.aK()},e.aK=function(){e.$Q()};var s=function(t,n){return f.getComputedStyle(t,void 0).getPropertyValue(n)||t.style[n]}(n,"position");r||"static"!==s||(n.style.position="relative");var u=v.createElement("div");return e.iK=u,e.ZQ=v.createElement("div"),e.sK=v.createElement("div"),e.tK=v.createElement("div"),e.nK=v.createElement("div"),_I(e.ZQ),_I(e.tK),mI(e.sK),function(t){mI(t),t.style.width="200%",t.style.height="200%"}(e.nK),u.appendChild(e.ZQ),u.appendChild(e.tK),e.ZQ.appendChild(e.sK),e.tK.appendChild(e.nK),n.appendChild(u),e.ZQ.addEventListener("scroll",e.$Q),e.tK.addEventListener("scroll",e.$Q),f&&f.addEventListener("resize",e.eK),e.$Q(),e}return Ct(n,t),n.prototype.kn=function(){eI(this.JQ),this.JQ=0,this.ZQ.removeEventListener("scroll",this.$Q),this.tK.removeEventListener("scroll",this.$Q),$n(this.iK),f&&f.removeEventListener("resize",this.eK)},Nt(n,[{key:"Iu",get:function(){return this.xe.getBoundingClientRect().height||this.jQ||0}},{key:"Eu",get:function(){return this.xe.getBoundingClientRect().width||this.QQ||0}}]),n}(fI),pI=function(t){function n(n){var i;return(i=t.call(this)||this).xe=void 0,i.KQ=void 0,i.YQ=function(t,n){i.So(new cI(t,n))},i.xe=n,i}Ct(n,t);var i=n.prototype;return i._n=function(t){this.KQ||("function"==typeof f.ResizeObserver?this.KQ=new vI(this.xe,this.YQ):this.KQ=new yI(this.xe,this.YQ,t))},i.kn=function(){this.Vo(),this.KQ&&(this.KQ.kn(),this.KQ=void 0)},Nt(n,[{key:"Iu",get:function(){return this.KQ?this.KQ.Iu:0}},{key:"Eu",get:function(){return this.KQ?this.KQ.Eu:0}}]),n}(th);F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Dt();var kI=function(t){function n(){return t.call(this,KT.pa)||this}return Ct(n,t),n}(rh);F(),Et(),Ut();var bI=function(){if(v)for(var t,n=Lt([["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]]);!(t=n()).done;){var i=t.value;if(i[1]in v)return{uK:i[0],sa:i[1],cK:i[2],dK:i[3],Ze:i[4],lK:i[5]}}}();F(),Et(),Dt();var AI=function(t){function n(){return t.call(this,KT.ka)||this}return Ct(n,t),n}(rh),TI=function(t){function n(i){var r;return(r=t.call(this)||this).xe=void 0,r.ca=void 0,r.ds=!1,r.fK=function(){return r._K()},r.vK=function(){return r.gK()},r.xe=i,r.ca=n.la(i),v.addEventListener(bI.Ze,r.fK),r._K(),r}Ct(n,t);var i=n.prototype;return i.yo=function(){var t=this.xe[bI.uK]();t&&t.then?t.then(this.fK,this.vK):(v.removeEventListener(bI.lK,this.vK),v.addEventListener(bI.lK,this.vK))},i.jo=function(){var t=v[bI.sa]();t&&t.then?t.then(this.fK,this.vK):(v.removeEventListener(bI.lK,this.vK),v.addEventListener(bI.lK,this.vK))},i._K=function(){var t=this.ds,n=this.xe===v[bI.cK];this.ds=n,t!==n&&this.So(new kI)},i.gK=function(){this.So(new JT)},i.kn=function(){this.Vo(),v.removeEventListener(bI.Ze,this.fK),v.removeEventListener(bI.lK,this.vK)},n.la=function(t){return Boolean(bI&&v[bI.dK]&&bI.uK in t)},n}(th),SI=function(t){function n(i){var r;return(r=t.call(this)||this).xe=void 0,r.ca=void 0,r.ds=!1,r.fK=function(){return r._K()},r.xe=i,r.ca=n.la(i),r.xe.addEventListener("webkitbeginfullscreen",r.fK),r.xe.addEventListener("webkitendfullscreen",r.fK),r.xe.addEventListener("webkitpresentationmodechanged",r.fK),r._K(),r}Ct(n,t);var i=n.prototype;return i.yo=function(){var t=this;this.xe.webkitSupportsPresentationMode&&this.xe.webkitSupportsPresentationMode("fullscreen")?On.ru?requestAnimationFrame(function(){return t.xe.webkitSetPresentationMode("fullscreen")}):this.xe.webkitSetPresentationMode("fullscreen"):this.xe.webkitEnterFullscreen()},i.jo=function(){this.xe.webkitSupportsPresentationMode&&this.xe.webkitSupportsPresentationMode("inline")?this.xe.webkitSetPresentationMode("inline"):this.xe.webkitExitFullscreen()},i._K=function(){var t,n=this.ds;t=this.xe.webkitPresentationMode?"fullscreen"===this.xe.webkitPresentationMode:Boolean(this.xe.webkitDisplayingFullscreen),this.ds=t,n!==t&&this.So(new kI)},i.kn=function(){this.Vo(),this.xe.removeEventListener("webkitbeginfullscreen",this.fK),this.xe.removeEventListener("webkitendfullscreen",this.fK),this.xe.removeEventListener("webkitpresentationmodechanged",this.fK)},n.la=function(t){return On.ru&&("webkitEnterFullscreen"in t||"webkitSupportsPresentationMode"in t)},n}(th),EI=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).wK=[],n.pK=void 0,n.mK=!1,n._K=function(){var t=n.mK,i=n.SK();t!==i&&(n.mK=i,n.So(new kI))},n}Ct(n,t);var i=n.prototype;return i.yo=function(){this.pK?this.pK.yo():this.So(new JT)},i.jo=function(){for(var t,n=Lt(this.wK);!(t=n()).done;){var i=t.value;i.ds&&i.jo()}},i.yK=function(t){this.pK=t},i.AK=function(t){this.wK.push(t),t.wn(KT.pa,this._K),t.wn(KT.ma,this.Rs),this._K()},i.bK=function(t){Xi(this.wK,t),t.mn(KT.pa,this._K),t.mn(KT.ma,this.Rs)},i.SK=function(){for(var t,n=Lt(this.wK);!(t=n()).done;){if(t.value.ds)return!0}return!1},i.hr=function(){this.pK=void 0,this.mK=!1;for(var t,n=Lt(this.wK.slice());!(t=n()).done;){var i=t.value;this.bK(i),i.kn()}this._K()},i.kn=function(){this.Vo(),this.hr()},Nt(n,[{key:"ca",get:function(){return!!this.pK&&this.pK.ca}},{key:"ds",get:function(){return this.mK}}]),n}(th),II=function(t){function n(n,i){var r;return(r=t.call(this)||this).t=void 0,r.TK=void 0,r.kK=void 0,r.ga=!1,r.xK=function(){return r.er()},r._K=function(t){r.ga||r.So(t)},r.t=n,r.TK=i,r.kK=new ZT,r.EK(),r.t.wn(eh.Nw,r.xK),r.er(),r}Ct(n,t);var i=n.prototype;return i.yo=function(){this.TK&&this.kK.yo()},i.jo=function(){this.kK.jo()},i.EK=function(){this.kK.wn([KT.pa,KT.ka],this._K),this.kK.wn(KT.ma,this.Rs)},i.PK=function(){this.kK.mn([KT.pa,KT.ka],this._K),this.kK.mn(KT.ma,this.Rs)},i.er=function(){var t=this.kK,n=this.t.Hx();if(t!==n){this.ga=!0;var i=this.ds,r=this.ca;i&&this.jo(),this.PK(),this.kK=n,this.EK(),i&&!this.ds&&this.ca?this.yo():this.jo(),this.ga=!1,r!==this.ca&&this.So(new AI),i!==this.ds&&this.So(new kI)}},i.kn=function(){this.Vo(),this.PK(),this.t.mn(eh.Nw,this.xK)},Nt(n,[{key:"ca",get:function(){return!!this.TK&&this.kK.ca}},{key:"ds",get:function(){return this.kK.ds}}]),n}(th);F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et(),Dt(),F(),Et();var RI=function(t){return t.MODE_CHANGE="presentationmodechange",t.ERROR="error",t}({}),CI=function(t){function n(n){var i;return(i=t.call(this,RI.MODE_CHANGE)||this).presentationMode=void 0,i.presentationMode=n,i}return Ct(n,t),n}(rh);F(),Et(),F(),Et(),Dt(),Ut();var DI=function(t){function n(n,i){var r;return void 0===i&&(i=!1),(r=t.call(this,n)||this).RK=[],r.BK=void 0,r.DK=function(t){pr(function(){r.Rs(t)})},r.BK=i?r.DK:r.Rs,r}Ct(n,t);var i=n.prototype;return i.au=function(t){t.lw(this.BK),this.RK.push(t)},i.CK=function(t){t.mw(this.BK),Xi(this.RK,t)},i.kn=function(){this.Vo();for(var t,n=Lt(this.RK);!(t=n()).done;){t.value.mw(this.BK)}Yi(this.RK)},n}(ih);F(),Et(),Bt(),Dt();var PI=function(t){function n(n){var i;return(i=t.call(this,RI.ERROR)||this).errorObject=void 0,i.errorObject=n,i}return Ct(n,t),n.prototype.xa=function(){return this},Nt(n,[{key:"error",get:function(){return this.errorObject.message}}]),n}(kw);F(),Et(),Dt();var NI=function(t){function n(n,i,r){return t.call(this,n,i,r)||this}return Ct(n,t),n}(fd),BI=function(t){function n(n,i){var r;return(r=t.call(this)||this).Yo=yT.INLINE,r.ra=!1,r.ha=void 0,r.ea=void 0,r.ta=new yd,r.hu=void 0,r._K=function(){r._i()},r.gK=function(){r.ra||(r.So(new _b(new fd(cd.FULLSCREEN_ERROR,"Failed to enter fullscreen."))),r._i())},r.UK=function(){r.ra||(r.Yo!==yT.NATIVE_PICTURE_IN_PICTURE||r.ea.XL?r.Yo!==yT.NATIVE_PICTURE_IN_PICTURE&&r.ea.XL&&r.Jo(yT.NATIVE_PICTURE_IN_PICTURE):r.Jo(yT.INLINE))},r.VK=function(){r.ra||(r.So(new PI(new NI(cd.PICTURE_IN_PICTURE_ERROR,"Unexpected native picture-in-picture error."))),r.UK())},r.ha=n,r.ea=i,r.ha.wn(KT.pa,r._K),r.ha.wn(KT.ma,r.gK),r.ea.wn(DT.zL,r.UK),r.ea.wn(DT.GL,r.UK),r.ea.wn(DT.ma,r.VK),r}Ct(n,t);var i=n.prototype;return i.xa=function(){return function(t){var n,i={get currentMode(){return t.Wo()},requestMode:function(n){var i=ET(n);i&&t.Jo(i)},supportsMode:function(n){var i=ET(n);return!!i&&t.Xo(i)},addEventListener:function(t,i){n.wn(t,i)},removeEventListener:function(t,i){n.mn(t,i)}};return(n=new DI(i,!0)).au(t),i}(this)},i.Jo=function(t){this.Yo!==t&&(this.Yo=t,this.ra=!0,this.Ko(t))},i.Wo=function(){return this.Yo},i.Xo=function(t){switch(t){case yT.NATIVE_PICTURE_IN_PICTURE:return this.ea.jL;case yT.FULLSCREEN:return this.ha.ca;case yT.INLINE:return!0}return!1},i.Ko=function(t){var n=this;switch(this.ta.Zg(),t){case yT.FULLSCREEN:kr(this.ta.Zo(function(t){return n.NK(t)}));break;case yT.NATIVE_PICTURE_IN_PICTURE:kr(this.ta.Zo(function(t){return n.MK(t)}));break;case yT.INLINE:kr(this.ta.Zo(function(t){return n.LK(t)}))}},i.NK=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return dr(t),[4,this.ea.jo().catch(di)];case 1:i.sent(),dr(t),i.label=2;case 2:return i.trys.push([2,4,5,6]),[4,this.FK()];case 3:return i.sent(),this.So(new CI(this.Yo)),[3,6];case 4:throw i.sent(),n=new NI(cd.FULLSCREEN_ERROR,"Failed to enter fullscreen."),this.So(new PI(n)),dr(t),this.Jo(yT.INLINE),n;case 5:return this.ra=!1,[7];case 6:return[2]}})}).call(this)},i.MK=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return dr(t),[4,this.sa().catch(di)];case 1:i.sent(),dr(t),i.label=2;case 2:return i.trys.push([2,4,5,6]),[4,this.ea.yo()];case 3:return i.sent(),this.So(new CI(this.Yo)),[3,6];case 4:throw i.sent(),n=new NI(cd.PICTURE_IN_PICTURE_ERROR,"Failed to enter native picture-in-picture."),this.So(new PI(n)),dr(t),this.Jo(yT.INLINE),n;case 5:return this.ra=!1,[7];case 6:return[2]}})}).call(this)},i.LK=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return dr(t),[4,this.sa().catch(di)];case 1:return n.sent(),dr(t),[4,this.ea.jo().catch(di)];case 2:return n.sent(),this.So(new CI(this.Yo)),this.ra=!1,[2]}})}).call(this)},i.FK=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return this.ha.ds?[2]:(t=this.ha.ww([KT.pa,KT.ma]),this.ha.yo(),[4,t]);case 1:if(n.sent(),!this.ha.ds)throw new y("Failed to enter fullscreen.");return[2]}})}).call(this)},i.sa=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return this.ha.ds?(t=this.ha.ww([KT.pa,KT.ma]),this.ha.jo(),[4,t]):[2];case 1:if(n.sent(),this.ha.ds)throw new y("Failed to exit fullscreen.");return[2]}})}).call(this)},i._i=function(){this.ra||(this.Yo!==yT.FULLSCREEN||this.ha.ds?this.Yo!==yT.FULLSCREEN&&this.ha.ds&&this.Jo(yT.FULLSCREEN):this.Jo(yT.INLINE))},i.kn=function(){this.ha.mn(KT.pa,this._K),this.ha.mn(KT.ma,this.gK),this.ea.mn(DT.zL,this.UK),this.ea.mn(DT.GL,this.UK),this.ea.mn(DT.ma,this.VK),this.Vo()},Nt(n,[{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}}]),n}(ih);F(),Et(),Wt(),Qt();var xI=function(){function t(t){this.Iz=void 0,this.WK=void 0,this.Iz=t,this.WK=new yd}var n=t.prototype;return n.HK=function(t){var n=this;return this.WK.Zo(function(){return n.qK(t)})},n.qx=function(){this.Iz.xz()},n.qK=function(n){return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:return i=this.Iz.Gq(ig.Bk),r=i.$W,[4,t.zK(r,n)];case 1:return e=s.sent(),[4,this.Iz.Pq(i)];case 2:return s.sent(),[2,e]}})}).call(this)},n.kn=function(){this.WK.kn()},t.zK=function(n,i){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return On.S_||On.w_?[2,"all"]:(n.src||(n.src="data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),[4,t.GK()]);case 1:return e.sent(),(r=!i)?[4,t.XK(n,!1)]:[3,3];case 2:r=e.sent(),e.label=3;case 3:return r?[2,"all"]:[4,t.XK(n,!0)];case 4:return e.sent()?[2,"muted"]:[2,"none"]}})})()},t.XK=function(t,n){return Vt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:t.muted=n,i=t.play(),e.label=1;case 1:return e.trys.push([1,3,4,5]),jn(i)?(r=Ar(250),[4,ut.race([i,r])]):[2,!On.Ks];case 2:return e.sent(),[2,!0];case 3:return e.sent(),[2,!1];case 4:return t.pause(),t.muted=!0,[7];case 5:return[2]}})})()},t.GK=function(){return new ut(function(t){if("function"==typeof MessageChannel){var n=new MessageChannel;n.port1.onmessage=function(){return t()},n.port2.postMessage("")}else w(t,0)})},t}(),OI=xI;function MI(t){OI=t}function LI(t){var n;return{get url(){return t.Yu},get method(){return t.Uk},get headers(){return n||(n=t.fk.MT()),n},get body(){return t.zT},get useCredentials(){return t.zk},get type(){return t.Km},get subType(){return t.Wk},get mediaType(){return t.qk},get responseType(){return t.dk}}}function UI(t){switch(t.toLowerCase()){case"arraybuffer":return Md.CT;case"json":return Md.DT;case"stream":return Md.BT;default:return Md.NT}}function FI(t){switch(t.toUpperCase()){case"POST":return wl.POST;case"PUT":return wl.PUT;case"DELETE":return wl.DELETE;case"HEAD":return wl.HEAD;case"OPTIONS":return wl.OPTIONS;default:return wl.GET}}function VI(t){switch(t.toLowerCase()){case"manifest":return gl.wk;case"segment":return gl.yk;case"preload-hint":return gl.Ak;case"content-protection":return gl.bk;default:return gl.pk}}function HI(t){switch(t.toLowerCase()){case"initialization-segment":return _l.Sk;case"fairplay-license":return _l.Tk;case"fairplay-certificate":return _l.Ek;case"widevine-license":return _l.Pk;case"widevine-certificate":return _l.xk;case"playready-license":return _l.Ik;case"clearkey-license":return _l.Rk;case"aes128-key":return _l.Ck;default:return _l.pk}}function WI(t){switch(t.toLowerCase()){case"audio":return ml.Dk;case"video":return ml.Bk;case"text":return ml.NT;case"image":return ml.Nk;default:return ml.pk}}F(),Et(),Wt(),Dt(),H(),Ut(),Qt(),F(),Et(),Bt(),Dt(),F(),Et(),F(),Et(),Wt(),Bt(),Qt();var zI=function(){function t(t,n){this.uY=void 0,this.hY=void 0,this.QK=void 0,this.eY=void 0,this.hu=void 0,this.JK=void 0,this.aE=void 0,this.tY=void 0,this.uY=t,this.hY=n,this.QK=new Vc,this.eY=[],this.hu=void 0,this.JK=!1,this.aE=void 0,this.tY=0}var n=t.prototype;return n.cD=function(){this.JK=!0,this.QK.Xy(null)},n.iY=function(){this.QK.jy(new Hd(this.eY))},n.sY=function(t){if(!this.ZK)throw new p("Cannot respond more than once");if(!zn(t))throw new p("Expected valid response");this.aE=this.nY(t),this.cD()},n.rY=function(){try{var t=this.hY(this.Ca);t?this.oY(t):this.$K||this.YK||this.cD()}catch(t){this.eY.push(t),this.iY()}},n.oY=function(t){if(this.YK)throw new y("Request has been redirected or a response already exists");if(jn(t))this.aY(t);else{if("function"!=typeof t)throw new p("Expected promise or function");var n=new Vc;try{var i=t(function(t){t?n.jy(t):n.Xy(void 0)});jn(i)&&n.$g(i)}catch(t){n.jy(t)}this.aY(n.Qy)}},n.aY=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.tY++,[4,t];case 1:return i.sent(),this.tY--,this.$K||this.YK||(this.eY.length?this.iY():this.cD()),[3,3];case 2:return n=i.sent(),this.tY--,this.eY.push(n),this.$K||this.YK||this.iY(),[3,3];case 3:return[2]}})}).call(this)},Nt(t,[{key:"jK",get:function(){return this.QK.Qy}},{key:"Ca",get:function(){return this.hu||(this.hu=this.KK()),this.hu}},{key:"YK",get:function(){return this.JK}},{key:"ZK",get:function(){return!this.JK}},{key:"$K",get:function(){return this.tY>0}},{key:"oE",get:function(){return this.aE}}]),t}(),XI=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i)||this).cY=void 0,e.cY=r,e.rY(),e}Ct(n,t);var i=n.prototype;return i.KK=function(){return function(t){var n,i=LI(t.lk);return{get closed(){return!t.ZK},get request(){return i},get url(){return t.Yu},get status(){return t.hk},get statusText(){return t.vk},get headers(){return n||(n=t.fk.MT()),n},get body(){return t.zT},respondWith:function(n){return t.sY(n)},waitUntil:function(n){return t.oY(n)}}}(this)},i.nY=function(t){return n.dY(t,this.uY,this.cY)},n.dY=function(t,n,i){var r=void 0===t.body?i:t.body;return new ll({ck:r,lk:n.lk,dk:n.lk.dk,fk:t.headers,hk:t.status,vk:t.statusText,gk:t.url,_k:!0},n)},Nt(n,[{key:"zT",get:function(){return this.cY}},{key:"fk",get:function(){return this.uY.fk}},{key:"lk",get:function(){return this.uY.lk}},{key:"oE",get:function(){return this.aE}},{key:"hk",get:function(){return this.uY.hk}},{key:"vk",get:function(){return this.uY.vk}},{key:"Yu",get:function(){return this.uY.gk}}]),n}(zI);F(),Et(),Bt(),Dt();var qI=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i)||this).vY=void 0,e.lY=void 0,e.lY=r,e.rY(),e}Ct(n,t);var i=n.prototype;return i.KK=function(){return function(t){var n;return{get url(){return t.Yu},get method(){return t.Uk},get headers(){return n||(n=t.fk.MT()),n},get body(){return t.zT},get closed(){return!t.ZK},get useCredentials(){return t.zk},get type(){return t.Km},get subType(){return t.Wk},get mediaType(){return t.qk},get responseType(){return t.dk},redirect:function(n){return t._Y(n)},respondWith:function(n){return t.sY(n)},waitUntil:function(n){return t.oY(n)}}}(this)},i.nY=function(t){var n=this.uY.zT,i=new ll({ck:n,fk:{},lk:this.uY,gk:this.uY.Yu,dk:this.uY.dk,hk:200,vk:"OK"});return XI.dY(t,i,n)},i._Y=function(t){if(!this.ZK)throw new p("Cannot redirect, already redirected or has a response");var n;n=qn(t)?{url:t}:t,this.vY=function(t,n){return new pl({Yu:void 0===t.url?n.Yu:t.url,Uk:void 0!==t.method?FI(t.method):void 0,fk:t.headers,zT:t.body,zk:t.useCredentials,Km:void 0!==t.type?VI(t.type):void 0,Wk:void 0!==t.subType?HI(t.subType):void 0,qk:void 0!==t.mediaType?WI(t.mediaType):void 0,dk:void 0!==t.responseType?UI(t.responseType):void 0},n)}(n,this.uY),this.cD()},Nt(n,[{key:"zT",get:function(){return this.uY.zT}},{key:"ZK",get:function(){return this.lY&&!this.JK}},{key:"fk",get:function(){return this.uY.fk}},{key:"Uk",get:function(){return this.uY.Uk}},{key:"fY",get:function(){return this.vY}},{key:"oE",get:function(){return this.aE}},{key:"dk",get:function(){return this.uY.dk}},{key:"Vk",get:function(){return this.uY.Vk}},{key:"Hk",get:function(){return this.uY.Hk}},{key:"Yg",get:function(){return this.uY.Yg}},{key:"Km",get:function(){return this.uY.Km}},{key:"Wk",get:function(){return this.uY.Wk}},{key:"qk",get:function(){return this.uY.qk}},{key:"Yu",get:function(){return this.uY.Yu}},{key:"zk",get:function(){return this.uY.zk}},{key:"jk",get:function(){return this.uY.jk}},{key:"Gk",get:function(){return this.uY.Gk}},{key:"Xk",get:function(){return this.uY.Xk}},{key:"Qk",get:function(){return this.uY.Qk}}]),n}(zI);var GI=function(t){function n(n,i){var r;void 0===i&&(i=!0);var e=new jI(n);return(r=t.call(this,e,i)||this).pY=void 0,r.pY=e,r}Ct(n,t);var i=n.prototype;return i.gY=function(t){this.pY.gY(t)},i.mY=function(t){this.pY.mY(t)},i.wY=function(t){this.pY.wY(t)},i.hX=function(t){this.pY.hX(t)},i.cX=function(t){this.pY.cX(t)},n}(bl),jI=function(){function t(t){this.$k=void 0,this.SY=[],this.TY=[],this.$k=t}var n=t.prototype;return n.lk=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,5]),[4,this.yY(t,t.Yg)];case 1:return n=r.sent(),[3,5];case 2:return V(i=r.sent(),Dl)?[4,this.AY(i,t.Yg)]:[3,4];case 3:return[2,r.sent()];case 4:throw i;case 5:return[4,this.bY(n,t.Yg)];case 6:if(dl(n=r.sent()))return[2,n];throw new Nl(n)}})}).call(this)},n.Kk=function(t){return this.$k.Kk(t)},n.yY=function(t,n){return Vt(function(){var i,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:dr(n),i=t,e=Lt(this.SY.slice()),h.label=1;case 1:if((s=e()).done)return[3,7];if(u=s.value,dr(n),(o=new qI(i,u,!r)).YK)return[3,5];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,o.jK];case 3:return h.sent(),[3,5];case 4:return h.sent(),[3,6];case 5:o.fY&&!r?i=o.fY:o.oE&&!r&&(r=o.oE),h.label=6;case 6:return[3,1];case 7:return r?[2,r]:[2,this.$k.lk(i)]}})}).call(this)},n.AY=function(t,n){return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:return V(t,Nl)?i=t.oE:(r=t.lk,i=new ll({ck:null,lk:r,dk:r.dk,hk:0,vk:""})),[4,this.bY(i,n)];case 1:if((e=s.sent())===i)throw t;if(dl(e))return[2,e];throw new Nl(e)}})}).call(this)},n.bY=function(t,n){return Vt(function(){var i,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:i=t,r=Lt(this.TY.slice()),h.label=1;case 1:return(e=r()).done?[3,8]:(s=e.value,dr(n),[4,ut.resolve(i.Ly().ck(n))]);case 2:if(u=h.sent(),(o=new XI(i,s,u)).YK)return[3,6];h.label=3;case 3:return h.trys.push([3,5,,6]),[4,o.jK];case 4:return h.sent(),[3,6];case 5:return h.sent(),[3,7];case 6:i=o.oE||i,h.label=7;case 7:return[3,1];case 8:return[2,i]}})}).call(this)},n.gY=function(t){this.SY.unshift(t)},n.mY=function(t){this.SY.push(t)},n.wY=function(t){Xi(this.SY,t)},n.hX=function(t){this.TY.unshift(t)},n.cX=function(t){Xi(this.TY,t)},n.kn=function(){this.$k.kn(),Yi(this.SY),Yi(this.TY)},t}();F(),Et(),Bt(),Dt();var QI=function(){function t(t){this.nV=void 0,this.hu=void 0,this.nV=t}var n=t.prototype;return n.gY=function(t){this.nV.gY(t)},n.wY=function(t){this.nV.wY(t)},n.hX=function(t){this.nV.hX(t)},n.cX=function(t){this.nV.cX(t)},Nt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{addRequestInterceptor:function(n){t.gY(n)},removeRequestInterceptor:function(n){t.wY(n)},addResponseInterceptor:function(n){t.hX(n)},removeResponseInterceptor:function(n){t.cX(n)}}}(this)),this.hu}}]),t}(),YI=function(t){function n(n,i,r){var e;return(e=t.call(this,i)||this).CY=void 0,e.nV=void 0,e.Rz=void 0,e.hu=void 0,e.DY=void 0,e.BY=void 0,e.CY=n,e.nV=i,e.Rz=r,e.DY=function(t){e.So(t)},e.BY=function(t){e.So(t)},e.CY.wn(eh.Xw,e.DY),e.CY.wn(eh.Gw,e.BY),e}Ct(n,t);var i=n.prototype;return i.EY=function(t){this.Rz.EY(t)},i.gY=function(t){this.nV.gY(t)},i.wY=function(t){this.nV.wY(t)},i.hX=function(t){this.nV.hX(t)},i.cX=function(t){this.nV.cX(t)},i.kn=function(){this.Vo(),this.CY.mn(eh.Xw,this.DY),this.CY.mn(eh.Gw,this.BY)},Nt(n,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{get online(){return t.sx},get estimator(){return function(t){return{get bandwidth(){return t.kW},get roundTripTime(){return t.EW}}}(t.kY)},setEstimator:function(n){t.EY(function(t){if(!t)return;return{get kW(){return zw(t.bandwidth)},get EW(){return zw(t.roundTripTime)},PW:function(n){return function(t){if(!t)return;return{PY:function(n){t.markRequestStart(n)},xY:function(n){t.markResponseStart(n)},IY:function(n,i){t.markResponseData(n,i)},RY:function(n){t.markResponseEnd(n)}}}(t.createMeasurer(LI(n)))}}}(n))},addRequestInterceptor:function(n){t.gY(n)},removeRequestInterceptor:function(n){t.wY(n)},addResponseInterceptor:function(n){t.hX(n)},removeResponseInterceptor:function(n){t.cX(n)},addEventListener:function(n,i){t.wn(n,i)},removeEventListener:function(n,i){t.mn(n,i)}}}(this)),this.hu}},{key:"sx",get:function(){return this.CY.sx}},{key:"kY",get:function(){return this.Rz.kY}}]),n}(th);F(),Et(),Bt(),Dt(),F(),Et(),F(),Et();var KI=function(t){return t.PERFORMANCE="performance",t.QUALITY="quality",t.BANDWIDTH="bandwidth",t}({});F(),Et(),H();function JI(t,n,i,r,e,s){var u=[],o=t-b.max(s,1),h=t+e;if(n&&i){var c=Ti(i,1,5),a=n-c;o=b.min(o,a);var f=n+i+c;h=b.max(h,f)}return 0!==o&&r.qM(0,o)&&u.push([0,o]),r.qM(h,1/0)&&u.push([h,1/0]),u}function ZI(t){return V(t,y)&&"QuotaExceededError"===t.name}F(),Et();var $I={type:KI.BANDWIDTH};function tR(t){var n=Ow($I);return qn(t)?n.type=nR(t):zn(t)&&function(t){switch(t){case KI.PERFORMANCE:case KI.QUALITY:case KI.BANDWIDTH:return!0;default:return!1}}(t.type)&&(n.type=nR(t.type)),zn(t)&&zn(t.metadata)&&(n.metadata=function(t){var n={},i=Ww(t.bitrate);return S(i)||(n.bitrate=i),n}(t.metadata)),n}function nR(t){switch(t){case"bandwidth":return KI.BANDWIDTH;case"performance":return KI.PERFORMANCE;case"quality":return KI.QUALITY}}F(),Et(),Dt();var iR=function(t){function n(n){var i;return(i=t.call(this,"NY")||this).MY=void 0,i.MY=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var rR=function(t){function n(n){var i;return(i=t.call(this,"LY")||this).OY=void 0,i.OY=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var eR=function(t){function n(n){var i;return(i=t.call(this,"FY")||this).UY=void 0,i.UY=n,i}return Ct(n,t),n}(rh),sR=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).hu=function(t){return{get strategy(){return function(t){return{metadata:t.metadata,type:t.type}}(t.OY)},set strategy(n){t.OY=tR(n)},get targetBuffer(){return t.MY},set targetBuffer(n){var i=Ww(n);S(i)||(t.MY=i)},get bufferLookbackWindow(){return t.UY},set bufferLookbackWindow(n){var i=Ww(n);S(i)||(t.UY=i<=0?30:i)},get maxBufferLength(){return t.QY},get clearBufferWhenSettingTargetQuality(){return t.JY},set clearBufferWhenSettingTargetQuality(n){t.JY=Vw(n)}}}(n),n.qY=$I,n.zY=20,n.jY=30,n.XY=1/0,n.ZY=!1,n.KY=void 0,n.HY=void 0,n}Ct(n,t);var i=n.prototype;return i.VY=function(t){this.HY=t},i.EY=function(t){this.KY=t},i.YY=function(t){var n=b.min(t,.8*this.XY);if(n=b.max(10,n),this.XY===n)return!1;var i=this.GY;this.XY=n;var r=this.GY;return r!==i&&this.So(new iR(r)),!0},Nt(n,[{key:"WY",get:function(){switch(this.qY.type){case KI.PERFORMANCE:return 0;case KI.QUALITY:return 1/0;case KI.BANDWIDTH:return this.qY.metadata&&void 0!==this.qY.metadata.bitrate?this.qY.metadata.bitrate:pb.Ng.fW();default:return pb.Ng.fW()}}},{key:"Ca",get:function(){return this.hu}},{key:"OY",get:function(){return this.qY},set:function(t){this.qY=t,this.So(new rR(t))}},{key:"MY",get:function(){return this.zY},set:function(t){this.zY=t,this.So(new iR(t))}},{key:"GY",get:function(){return b.min(this.zY,this.XY)}},{key:"UY",get:function(){return this.jY},set:function(t){this.jY=t,this.So(new eR(t))}},{key:"QY",get:function(){return this.XY}},{key:"kY",get:function(){var t;return null!=(t=this.KY)?t:this.HY.hq}},{key:"JY",get:function(){return this.ZY},set:function(t){this.ZY=t}}]),n}(th);F(),Et(),Bt(),Dt(),F(),Et(),Dt();var uR=function(t){function n(){return t.call(this,"mI")||this}return Ct(n,t),n.prototype.xa=function(){return new oR},n}(kw),oR=function(t){function n(){return t.call(this,"change")||this}return Ct(n,t),n}(rh);F(),Et(),F(),Et(),Dt(),Ut();var hR=function(t){function n(n,i,r){var e;(e=t.call(this,r)||this).$Y=void 0,e.Zf=void 0,e.tJ=function(t){bw(t)&&pr(function(){e.So(t.Ca)})},e.$Y=n,e.Zf=i;for(var s,u=Lt(e.Zf);!(s=u()).done;){var o=s.value;e.$Y.wn(o,e.tJ)}return e}return Ct(n,t),n.prototype.kn=function(){this.Vo();for(var t,n=Lt(this.Zf);!(t=n()).done;){var i=t.value;this.$Y.mn(i,this.tJ)}},n}(th),cR=function(t){function n(n,i){var r;return(r=t.call(this,i)||this).$Y=void 0,r.tJ=function(t){bw(t)&&pr(function(){r.So(t.Ca)})},r.$Y=n,r.$Y.lw(r.tJ),r}return Ct(n,t),n.prototype.kn=function(){this.Vo(),this.$Y.mw(this.tJ)},n}(ih);var aR=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).OO=0,n.VO=1/0,n.hu=void 0,n}Ct(n,t);var i=n.prototype;return i.hr=function(){0===this.OO&&this.VO===1/0||(this.OO=0,this.VO=1/0,this.So(new uR))},i.iJ=function(){return new TA([this.EO,this.PO],[!0,!0])},Nt(n,[{key:"EO",get:function(){return this.OO},set:function(t){if(this.PO<=t)throw new y("Start time of a clip should be smaller than the end time.");this.OO!==t&&(this.OO=t,this.So(new uR))}},{key:"PO",get:function(){return this.VO},set:function(t){if(t<=this.EO)throw new y("End time of a clip should be larger than the start time.");this.VO!==t&&(this.VO=t,this.So(new uR))}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var n,i={get startTime(){return t.EO},set startTime(n){t.EO=n},get endTime(){return t.PO},set endTime(n){t.PO=n},addEventListener:function(t,i){n.wn(t,i)},removeEventListener:function(t,i){n.mn(t,i)}};return n=new cR(t,i),i}(this)),this.hu}}]),n}(ih);F(),Et(),Wt(),Bt(),Dt(),Qt();var fR=function(t){function n(i,r){var e;return(e=t.call(this,i)||this).eJ=void 0,e.nJ=!1,e.lJ=void 0,e.fJ=!1,e.oJ=function(){e.hJ(),e.sJ()},e.Nc=function(){e.aJ(),e.sJ(),e.dJ&&e.MP>=e.eJ.PO-n.vJ&&!e.UP&&(e.lJ=rI(e.Nc))},e.uJ=function(){e.fJ=!0},e.cJ=function(){e.fJ&&(e.fJ=!1,e.sJ())},e.eJ=r,e.eJ.wn("mI",e.oJ),e.PP.wn(eh._y,e.Nc),e}Ct(n,t);var i=n.prototype;return i.OP=function(n,i){var r=this.eJ.iJ().DM(n);t.prototype.OP.call(this,r,i),this.sJ()},i.VP=function(){return t.prototype.VP.call(this)||this.nJ},i.Tx=function(){return TA.jn(t.prototype.Tx.call(this)).Mn(this.eJ.iJ())._s()},i.Gx=function(){this.VP()?this.OP(this.rJ.start(0)):this.hJ(),t.prototype.Gx.call(this),this.sJ()},i.Ta=function(n,i){var r=this;return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return dr(i),this.nJ=!1,this.eJ.hr(),[4,t.prototype.Ta.call(r,n,i)];case 1:return e.sent(),[2]}})}).call(this)},i.kn=function(){return this.eJ.mn("mI",this.oJ),this.PP.mn(eh._y,this.Nc),this.aJ(),t.prototype.kn.call(this)},i.$x=function(n){switch(n.type){case eh.$w:return this.So(n),this.uJ(),!0;case eh.Zw:case eh.Cw:return this.So(n),this.cJ(),!0;case eh.Bw:if(this.dJ)return!0}return t.prototype.$x.call(this,n)},i.aJ=function(){this.lJ&&(eI(this.lJ),this.lJ=void 0)},i.sJ=function(){var t=this.MP,i=this.dJ&&t>=this.eJ.PO-n.fd;this.nJ&&!i?(this.nJ=!1,this.hx&&this.Gx()):this.nJ||!i||this.kx||this.fJ||(this.nJ=!0,this.So(new vT(t)),this.zx())},i.hJ=function(){if(this.ct!==1/0){var t=this.rJ,i=TA.jn(t).DM(this.MP);Si(this.MP,i,n.fd)||this.OP(i)}},Nt(n,[{key:"rJ",get:function(){return this.Tx().length?this.Tx():this.eJ.iJ()._s()}},{key:"dJ",get:function(){return this.eJ.PO=t},n.WJ=function(){var t=qb.Wy(AR);if(t)return yR.NJ(t)},n.XJ=function(t,n){this.fQ.HJ(t),this.jJ(n)},n.jJ=function(t){throw ze(t.message),this.QJ.gQ(t.message),t},t}();F(),Et(),Wt(),Bt(),Qt();var SR=function(){function t(){this.KJ=void 0,this.YJ=new Vc}var n=t.prototype;return n.HJ=function(t){this.KJ=t,this.YJ.Xy()},n.lQ=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.KJ?[2,ut.resolve(this.KJ)]:[4,this.YJ.Qy];case 1:return t.sent(),[2,this.KJ]}})}).call(this)},Nt(t,[{key:"JJ",get:function(){return this.KJ}}]),t}();F(),Et(),Bt(),Dt(),F(),Et(),Dt();var ER=function(t){function n(){return t.call(this,"mI")||this}return Ct(n,t),n.prototype.xa=function(){return new IR},n}(kw),IR=function(t){function n(){return t.call(this,"change")||this}return Ct(n,t),n}(rh);function RR(t){var n,i={get fontFamily(){return t.ZJ},set fontFamily(n){t.ZJ=n},get fontColor(){return t.$J},set fontColor(n){t.$J=n},get fontSize(){return t.tZ},set fontSize(n){t.tZ=n},get backgroundColor(){return t.iZ},set backgroundColor(n){t.iZ=n},get windowColor(){return t.eZ},set windowColor(n){t.eZ=n},get edgeStyle(){return t.sZ},set edgeStyle(n){t.sZ=n},get marginTop(){return t.nZ},set marginTop(n){t.nZ=n},get marginBottom(){return t.rZ},set marginBottom(n){t.rZ=n},get marginLeft(){return t.hZ},set marginLeft(n){t.hZ=n},get marginRight(){return t.oZ},set marginRight(n){t.oZ=n},addEventListener:function(t,i){var r=Gw(t,Xw);n.wn(r,i)},removeEventListener:function(t,i){var r=Gw(t,Xw);n.mn(r,i)}};return n=new nh(i),t.wn(["mI"],function(t){return n.So(t.Ca)}),i}F(),Et();var CR={ZJ:void 0,$J:void 0,tZ:void 0,iZ:void 0,eZ:void 0,sZ:void 0,nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0},DR="THEOplayer.textTrackStyle.",PR=function(t){function n(){var i;return(i=t.call(this)||this).uZ=void 0,i.hu=void 0,i.uZ=n.dZ(),i}return Ct(n,t),n.prototype.er=function(t){this.uZ=Yu({},this.uZ,t),n.cZ(this.uZ),this.So(new ER)},n.dZ=function(){var t=Yu({},CR);return t.ZJ=qb.Wy(DR+"fontFamily")||t.ZJ,t.$J=qb.Wy(DR+"fontColor")||t.$J,t.tZ=qb.Wy(DR+"fontSize")||t.tZ,t.iZ=qb.Wy(DR+"backgroundColor")||t.iZ,t.eZ=qb.Wy(DR+"windowColor")||t.eZ,t.sZ=qb.Wy(DR+"edgeStyle")||t.sZ,t},n.cZ=function(t){qb.qy(DR+"fontFamily",t.ZJ||""),qb.qy(DR+"fontColor",t.$J||""),qb.qy(DR+"fontSize",t.tZ||""),qb.qy(DR+"backgroundColor",t.iZ||""),qb.qy(DR+"windowColor",t.eZ||""),qb.qy(DR+"edgeStyle",t.sZ||"")},Nt(n,[{key:"aZ",get:function(){return this.uZ}},{key:"ZJ",get:function(){return this.uZ.ZJ},set:function(t){this.er({ZJ:t})}},{key:"$J",get:function(){return this.uZ.$J},set:function(t){this.er({$J:t})}},{key:"tZ",get:function(){return this.uZ.tZ},set:function(t){this.er({tZ:t})}},{key:"iZ",get:function(){return this.uZ.iZ},set:function(t){this.er({iZ:t})}},{key:"eZ",get:function(){return this.uZ.eZ},set:function(t){this.er({eZ:t})}},{key:"sZ",get:function(){return this.uZ.sZ},set:function(t){this.er({sZ:t})}},{key:"nZ",get:function(){return this.uZ.nZ},set:function(t){this.er({nZ:t})}},{key:"rZ",get:function(){return this.uZ.rZ},set:function(t){this.er({rZ:t})}},{key:"oZ",get:function(){return this.uZ.oZ},set:function(t){this.er({oZ:t})}},{key:"hZ",get:function(){return this.uZ.hZ},set:function(t){this.er({hZ:t})}},{key:"Ca",get:function(){return this.hu||(this.hu=RR(this)),this.hu}}]),n}(th);function NR(t,n){var i,r;t.style.marginLeft=(null!=(i=n.hZ)?i:0)+"px",t.style.marginRight=(null!=(r=n.oZ)?r:0)+"px",t.style.width="calc(100% - "+t.style.marginLeft+" - "+t.style.marginRight+")"}F(),Et(),Wt(),Bt(),Ut(),Qt(),F(),Et(),Bt(),Dt(),F(),Et(),Wt(),Bt(),Dt(),H(),Ut(),Qt(),F(),Et();var BR=[eh.uo,eh.jw,Ey.TM,eh._y,eh.Qw,eh.Ww,eh.$w,eh.Zw,eh.Bw,eh.Kw,eh.gy,eh.Rw,Ey.wI,eh.Jw,zm.ma,fh.Dw,fh.Dy,eh.Pw,eh.Ew,eh.py,eh.yy,eh.LICENSE_REQUEST_GENERATED,eh.Fw,eh.Vw,eh.Lw,eh.Nw],xR={RL:!1};function OR(t){return void 0!==t.Rx}function MR(t){return t.Cd.Km===Sy.wV}F(),Et();var LR=function(t){return t.lZ="fZ",t}({}),UR=["fZ"],FR=function(t){return t[t.vZ=0]="vZ",t[t.BT=1]="BT",t[t._Z=2]="_Z",t}({});F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et(),Wt(),Bt(),Dt(),H(),Ut(),Qt();var VR=["loadstart","encrypted","waitingforkey","webkitneedkey","msneedkey"],HR=function(t){return t.gZ="pZ",t.mZ="wZ",t.yZ="AZ",t}({}),WR=function(t){function n(n,i,r,e,s){var u;(u=t.call(this)||this).YS=void 0,u.TL=void 0,u._T=void 0,u.MZ=!1,u.LZ=new Vc,u.kZ=!1,u.ta=new yd,u.PZ=void 0,u.hw=void 0,u.VJ=void 0,u.TS=void 0,u.RZ=function(){u.kZ=!0},u.CZ=function(){u.NZ(!0)},u.YS=n,u.TL=i,u._T=i.$W,u.PZ=r,u.hw=e,u.VJ=s,u._T.addEventListener("loadedmetadata",u.RZ);for(var o,h=Lt(VR);!(o=h()).done;){var c=o.value;u._T.addEventListener(c,u.CZ)}return u}Ct(n,t);var i=n.prototype;return i.bZ=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return[4,this.hw.nw(t.Ym,n)];case 1:return[4,r.sent().IS()];case 2:return i=r.sent(),[4,this.SZ(i)];case 3:return r.sent(),[2,i]}})}).call(this)},i.TZ=function(t){var n=this,i=this.TS;return i?0!==t.aq.length&&t.aq.some(function(t){return t.kS.Ym===i.kS}):0!==this.YS.aq.length?t.aq.some(function(t){return n.YS.aq.some(function(n){return t.kS===n.kS})}):0===t.aq.length||!this.kZ},i.EZ=function(t){return this.PZ.EZ(t),this.YS=t,ut.resolve()},i.xZ=function(t){this.PZ.xZ(t)},i.IZ=function(){if(!On.vg)return"";var t=this.VJ.ps5;return"; pass_through="+t.passThrough+'; playmode="'+t.playMode+'";'},i.zg=function(){return Vt(function(){var t,n,i;return zt(this,function(r){switch(r.label){case 0:for(this.Vo(),this._T.removeEventListener("loadedmetadata",this.RZ),t=Lt(VR);!(n=t()).done;)i=n.value,this._T.removeEventListener(i,this.CZ);return[4,this.ta.kn()];case 1:return r.sent(),this.DZ(),[4,this.PZ.hr()];case 2:return r.sent(),[4,this.BZ(void 0)];case 3:return r.sent(),[2]}})}).call(this)},i.NZ=function(t){t!==this.MZ&&(this.MZ=t,t?this.LZ.Xy(void 0):this.LZ=new Vc)},i.SZ=function(t){var n=this;return this.ta.Zo(function(){return n.BZ(t)})},i.BZ=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:if(t&&!this._T.src&&!this._T.srcObject)throw new eg(cd.CONTENT_PROTECTION_ERROR,"Attempted to attach MediaKeys to a sourceless MediaElement");if(!t&&(this._T.src||this._T.srcObject))throw new eg(cd.CONTENT_PROTECTION_ERROR,"Attempted to remove MediaKeys from a non-empty MediaElement");return!t||this.MZ?[3,2]:[4,this.LZ.Qy];case 1:i.sent(),i.label=2;case 2:return(n=this.TS)?[4,n.PS(this._T)]:[3,4];case 3:i.sent(),this.TS=void 0,i.label=4;case 4:return t?[4,t._n(this._T)]:[3,6];case 5:i.sent(),this.TS=t,i.label=6;case 6:return[2]}})}).call(this)},i.Ta=function(t,n){var i=this;return this.ta.Zo(function(){return i.OZ(t,n)})},i.OZ=function(t,n){this.NZ(!1);var i=this.TL.ux;if(qn(t)&&n){var r=this.FZ(t,n);this._T.appendChild(r)}else if(qn(t))this._T.src=t;else if(function(t){if(void 0!==f.ManagedMediaSource&&V(t,f.ManagedMediaSource))return!0;if("undefined"!=typeof MediaSource&&V(t,MediaSource))return!0;return!1}(t))if(function(t){return"srcObject"in t&&On.ru&&On.Q_>=17}(this._T))try{this._T.srcObject=t}catch(n){this._T.src=URL.createObjectURL(t)}else this._T.src=URL.createObjectURL(t);else zR(t)&&(this._T.srcObject=t);this.TL.ux=i},i.FZ=function(t,n){var i=v.createElement("source");return i.src=t,i.type=n+this.IZ(),i},i.UZ=function(t){var n=this;return this.ta.Zo(function(){return n.VZ(t)})},i.VZ=function(t){this.OZ(t),this._T.load()},i.DZ=function(){this.NZ(!1),Er(this._T)},i.HZ=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.TS?[4,this.TS.hr()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})}).call(this)},Nt(n,[{key:"Cd",get:function(){return this.YS}},{key:"$W",get:function(){return this._T}}]),n}(th);function zR(t){return!("undefined"==typeof MediaStream||!V(t,MediaStream))}var XR=function(t){function n(){return t.apply(this,arguments)||this}Ct(n,t);var i=n.prototype;return i.VY=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:switch((t=this.Cd).cq){case oA.aR:case oA.uR:this._T.setAttribute("crossorigin",t.cq);break;case oA.Lk:default:this._T.removeAttribute("crossorigin")}return void 0!==t.mx?this._T.preload=t.mx:this._T.preload=jT.TW,void 0!==t.dq?this._T.title=t.dq:fi(this._T),t.GZ?[4,this.UZ(t.GZ)]:[3,2];case 1:return n.sent(),[3,6];case 2:return On.vg?[4,this.Ta(t.iR,t.qT)]:[3,4];case 3:return n.sent(),[3,6];case 4:return[4,this.Ta(t.iR)];case 5:n.sent(),n.label=6;case 6:return this.PZ.Un(this,t),[2]}})}).call(this)},i.TZ=function(t){return!1},i.EZ=function(t){return ut.resolve(void 0)},i.XZ=function(t){return!1},i.jZ=function(){return!zR(this.YS.GZ)},i.zg=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return fi(this._T),[4,t.prototype.zg.call(n)];case 1:return i.sent(),[2]}})}).call(this)},n.QZ=function(t,n){return!!n.canPlayType&&Boolean(n.canPlayType(t.qT))},Nt(n,[{key:"IP",get:function(){return TA.jn(this._T.buffered)}},{key:"ct",get:function(){return this._T.duration}},{key:"WZ",get:function(){var t=this.ct;if(!isFinite(t))return!1;var n=this.IP;return 0!==n.V&&t-n.An(n.V-1)0||this._T.videoHeight>0))return this.IP}}]),n}(WR);F(),Et(),Dt();var qR=function(t){function n(n){var i;return(i=t.call(this,eh.Qw)||this).currentTime=void 0,i.currentTime=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var GR=function(t){function n(){return t.call(this,eh.Ww)||this}return Ct(n,t),n}(rh);F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Bt(),Dt();var jR=function(t){return t.KZ="YZ",t}({}),QR=function(t){function n(n){var i;return(i=t.call(this,"YZ")||this).JZ=void 0,i.JZ=n,i}return Ct(n,t),n}(rh),YR=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).$Z=TA.iL(),n}Ct(n,t);var i=n.prototype;return i.t$=function(t,n){var i=new TA([t,n]);this.$Z=this.$Z.OM(i),this.So(new QR(i))},i.i$=function(t,n){this.$Z=this.$Z.UM(new TA([t,n]))},i.hr=function(){this.$Z=TA.iL()},i.kn=function(){this.Vo()},Nt(n,[{key:"ZZ",get:function(){return this.$Z}}]),n}(th);function KR(t,n){return void 0===n&&(n=new Gd({highWaterMark:1/0})),new Xd(new JR(t,n),{highWaterMark:0})}F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et();var JR=function(){function t(t,n){var i=this,r=n.size,e=void 0===r?function(){return 1}:r,s=n.highWaterMark,u=void 0===s?1:s;this.Wd=void 0,this.u$=void 0,this.h$=void 0,this.tf=[],this.if=0,this.YJ=void 0,this.r$=!1,this.o$=void 0,this.a$=function(t){return t.done?(i.n$(),void i.YJ.close()):(i.tf.push(t.value),i.if+=i.u$(t.value),i.r$&&i.n$(),i.e$()?i.Wd.read().then(i.a$):void 0)},this.EE=function(t){i.n$(),i.YJ.error(t)},this.Wd=t.getReader(),this.u$=e,this.h$=u}var n=t.prototype;return n.start=function(t){this.YJ=t,this.e$()&&this.s$()},n.pull=function(){this.tf.length>0?this.n$():this.r$=!0,this.e$()&&this.s$()},n.cancel=function(t){return Yi(this.tf),this.if=0,this.r$=!1,this.Wd.cancel(t)},n.n$=function(){if(0!==this.tf.length){var t=this.tf;this.tf=[],this.if=0,this.r$=!1,this.YJ.enqueue(t)}},n.e$=function(){return!!this.r$||this.h$-this.if>0},n.s$=function(){var t=this;if(!this.o$){var n=this.Wd.read().then(this.a$).catch(this.EE);this.o$=n;var i=function(){t.o$===n&&(t.o$=void 0)};n.then(i,i)}},t}();F(),Et(),F(),Et(),Bt(),Dt(),H(),Ut(),F(),Et(),Ut(),F(),Et();var ZR=function(){function t(){this.d$=[],this.Vy=0}var n=t.prototype;return n.c$=function(t){this.d$.push(t),this.Vy+=t.byteLength},n.l$=function(t){if(this.Vy<=t)return this.f$();for(var n=this.d$,i=0,r=0;r0&&ithis.tf.Vy)return;switch(this.Ra){case 0:this.E$(t);break;case 1:this.P$(t);break;case 2:this.x$(t)}}},n.I$=function(){this.Ra=0,this.k$=8},n.E$=function(t){var n=_c(this.tf.v$(this.k$)),i=new Tc,r=lm._D(n,i);if(!r.cD)return this.k$=r.pD,void(t&&this.k$>this.tf.Vy&&this.R$(this.tf.Vy));var e=r.gD.Km,s=r.gD.Vy;0===s&&(s=1/0),this.w$(e,s),this.C$(e)?this.D$(s):this.R$(s)},n.D$=function(t){this.Ra=1,this.k$=t},n.P$=function(t){var n=_c(this.tf.p$(this.k$)),i=new Tc,r=lm.dD(n,i,!t);if(!r.cD)throw new dm(i.ac);this.y$(),this.B$(r.lD),this.I$()},n.R$=function(t){this.Ra=2,this.k$=0,this.N$=t},n.x$=function(t){var n=this.tf._$(this.N$);this.N$-=n.Vy;for(var i,r=Lt(n.d$);!(i=r()).done;){var e=i.value;this.M$(e)}(0===this.N$||t&&this.N$===1/0)&&(this.y$(),this.I$())},t}();function tC(t){return V(t,Vf)}function nC(t){return V(t,Uf)}function iC(t){return V(t,Of)||V(t,Mf)}function rC(t){return V(t,uf)}function eC(t){return V(t,Oa)}function sC(t){return V(t,Rf)}function uC(t){return V(t,Ef)}function oC(t){return V(t,Zf)}function hC(t){return V(t,Kf)}function cC(t){return V(t,Gf)}function aC(t){return V(t,Qf)}function fC(t,n){var i=Ui(t.boxes,cC);if(i&&i.flags.baseDataOffsetPresent)i.baseDataOffset=i.baseDataOffset.add(n);else for(var r,e=Lt(t.boxes);!(r=e()).done;){var s=r.value;V(s,Qf)&&s.flags.dataOffsetPresent&&(s.dataOffset=s.dataOffset+n)}}F(),Et(),H(),Ut();var vC=function(t){function n(n){var i;return(i=t.call(this)||this).YJ=void 0,i.Q$=void 0,i.H$=void 0,i.q$=Zu(),i.Q$=n,i}Ct(n,t);var i=n.prototype;return i.start=function(t){this.YJ=t},i.transform=function(t){this.A$(t)},i.flush=function(){this.S$()},i.C$=function(t){return t===um.OR||t===um.IC||t===um.HC},i.B$=function(t){var n=this.L$(t);this.YJ.enqueue(n)},i.M$=function(t){this.YJ.enqueue(t)},i.L$=function(t){var n=mc(t.ck.ck);switch(t.Km){case"moov":return this.O$(n);case"sidx":return this.F$(n);case"moof":return this.U$(n)}return n},i.W$=function(t){var n=this.q$.get(t);if(void 0===n)throw new y("Expected to have found a media header timescale for track ID "+t+".");return n},i.O$=function(t){for(var n=_v(t),i=0;i>2,h=!!(2&u),c=Hh(t,n,3),a=qh(t,n),f=qh(t,n);if(n.ac=i)){var r=t.Wy(n.byte);return n.byte+=1,r}}function AC(t,n){return function(t,n,i){for(var r=0,e=i;e>0;)e-=1,r=256*r+bC(t,n);return r}(t,n,2)}F(),Et(),F(),Et(),F(),Et(),F(),Et(),F(),Et(),F(),Et(),Bt(),Ut();var TC=function(){function t(){this.H0=0,this.V0=[],this.DU={}}var n=t.prototype;return n.U0=function(t){this.V0=this.V0.concat(t.V0),this.H0+=t.V},n.W0=function(t,n,i){var r=this.H0,e=i-n;e>0&&(this.V0.push({q0:n,z0:i,G0:e,X0:r,j0:t}),this.H0+=e)},n.Wy=function(t){for(var n,i=Lt(this.V0);!(n=i()).done;){var r=n.value;if(r.X0<=t&&t=this.H0))if(this.H0=t,0!==t)for(var r=n.length-1;r>=0;r-=1){var e=n[r];if(i<=e.G0)return e.z0-=i,e.G0-=i,void(n.length!==r+1&&(n.length=r+1));i-=e.G0}else n.length=0}},{key:"ck",get:function(){for(var t,n=new Array(this.H0),i=0,r=Lt(this.V0);!(t=r()).done;)for(var e=t.value,s=e.z0,u=e.q0;u0;)e-=1,r=2*r+EC(t,n);return r}function RC(t,n){for(var i=0;0===EC(t,n)&&i<32;)i+=1;return IC(t,n,i)+b.pow(2,i)-1}function CC(t,n){var i=RC(t,n);return 1&i?b.floor((i+1)/2):-b.floor(i/2)}function DC(t,n){var i,r=[],e={byte:1};do{r.push(NC(t,n,e)),i=n.Wy(e.byte)}while(void 0!==i&&128!==i);return r}function PC(t,n){var i,r=0;do{r+=i=bC(t,n)}while(255===i);return r}function NC(t,n,i){var r=PC(n,i),e=PC(n,i),s=i.byte,u=s+e;return i.byte=u,{Y0:t,J0:r,Z0:e,$0:s,t1:u,i1:n}}var BC=function(t){return t[t.e1=1]="e1",t[t.s1=2]="s1",t[t.n1=3]="n1",t[t.h1=4]="h1",t[t.o1=5]="o1",t[t.a1=6]="a1",t[t.u1=7]="u1",t[t.c1=8]="c1",t[t.d1=9]="d1",t}({}),xC=[void 0,[1,1],[12,11],[10,11],[16,11],[40,33],[24,11],[20,11],[32,11],[80,33],[18,11],[15,11],[64,33],[160,99],[4,3],[3,2],[2,1]];function OC(t,n,i){for(var r=8,e=8,s=0;s=2&&t.push(n),e=0)}this._1=n-t.length},n.m1=function(t){for(var n,i=t,r=Lt(this.v1);!(n=r()).done;){if(!(n.value<=i))return i;i+=1}return i},n.Wy=function(t){if(!(t>this.g1.V))return t>this._1&&this.l1(),this.g1.Wy(this.m1(t))},t}();function LC(t){var n,i,r,e,s,u,o=new MC(t),h=0,c=0,a=0,f=0,v=o.Wy(1),d={bit:32};if(RC(o,d),100===v||110===v||122===v||144===v){var l=RC(o,d);if(3===l&&(n=EC(o,d)),RC(o,d),RC(o,d),EC(o,d),1===EC(o,d))for(var w=0;w<(3!==l?8:12);w+=1){1===EC(o,d)&&OC(o,d,w<6?16:64)}}var g=RC(o,d),_=RC(o,d);if(0===_)RC(o,d);else if(1===_){EC(o,d),CC(o,d),CC(o,d);for(var m=RC(o,d),y=0;y>3),C);i.Ny(8*C),I.push({P1:C,I1:D})}b.push({R1:T,C1:S,D1:E,B1:I})}return{D0:r,N1:e,M1:s,L1:u,O1:h,F1:a,U1:f,V1:v,H1:o,W1:d,q1:l,z1:w,G1:g,X1:m,j1:y,Q1:_,L0:p,K1:k,Y1:b}}(_c(t.JB.ck),new Tc);n=function(t,n){var i=t.toString()+".";switch(n.N1){case 0:break;case 1:i+="A";break;case 2:i+="B";break;case 3:i+="C";break;default:return}switch(i+=n.L1.toString()+".",i+=function(t){var n=t;return n=n>>>1&1431655765|(1431655765&n)<<1,n=n>>>2&858993459|(858993459&n)<<2,n=n>>>4&252645135|(252645135&n)<<4,n=n>>>8&16711935|(16711935&n)<<8,n=n>>>16|n<<16,n}(n.H1).toString(16)+".",n.M1){case 0:i+="L";break;case 1:i+="H";break;default:return}i+=n.F1.toString();for(var r=n.O1.reduce(function(t,n){return 0===t?n:n+1},0),e=0;e0?t.An(t.V-1):0,this.I3.D3()},n.A3=function(){this.R3=void 0},Nt(t,[{key:"IP",get:function(){if(this.I3.Ax===dD._3)return TA.iL();var t=TA.jn(this.U2.buffered).Mn(TA.eL()),n=this.R3;return void 0!==n&&t.V>0&&t.An(t.V-1)===n&&(t=t.OM(TA.$M(n))),t}}]),t}();function nD(t,n,i,r,e,s,u){var o=new tD(e,t),h=new ZC(o,t,e,i,s);return new iD(t,n,i,r,o,h,u)}var iD=function(t){function n(n,i,r,e,s,u,o){var h;return(h=t.call(this)||this).d3=void 0,h.YS=void 0,h.N3=void 0,h.TL=void 0,h.GS=void 0,h.L3=void 0,h.e3=void 0,h.O3=void 0,h.H3=Ju(),h.d3=n,h.YS=r,h.GS=r.qT,h.N3=e,h.TL=i,h.e3=s,h.O3=u,h.L3=o,h.O3.wn(LR.lZ,h.Rs),h}Ct(n,t);var i=n.prototype;return i.WZ=function(){return this.e3.WZ()},i.C3=function(){this.e3.C3()},i.A3=function(){this.e3.A3(),this.O3.A3()},i.F3=function(t,n){this.L3.t$(t,n)},i.U3=function(t,n){this.L3.i$(t,n)},i.V3=function(){return this.O3.l3()},i.H2=function(t,n,i){return this.O3.H2(t,n,i)},i.z2=function(t,n,i){return this.O3.z2(t,i)},i.r3=function(t,n){return On.w_&&On.A_<3?this.O3.r3(t,1/0):this.O3.r3(t,n)},i._S=function(t,n,i){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return this.U3(t,n),r=this.IP,[4,this.O3.u3(t,n,i)];case 1:return s.sent(),e=0!==r.V&&0===this.IP.V,(On.rg||On.S_)&&e&&this.TL.My(this.TL.MP),[2]}})}).call(this)},i.TZ=function(t){var n=t.qT;if(this.GS===n)return!0;var i=this.H3.get(n);if(void 0!==i)return i;var r=this.W3(t);return this.H3.set(n,r),r},i.W3=function(t){var n=this.d3.m3(t.qT);if(void 0===n)return!1;var i=Xv(this.GS),r=Xv(n),e=zC(i),s=zC(r);if(this.O3.f3()){if(!function(t,n){return sr(t,n,GC)}(e,s))return!1;if(On.og&&!function(t,n){return sr(t,n,qC)}(e,s))return!1}else{if(i.Km!==r.Km)return!1;if(!XC(e,s))return!1}return!0},i.EZ=function(t){return Vt(function(){var n;return zt(this,function(i){return n=t.qT,this.GS!==n&&(this.H3.clear(),this.O3.EZ(t),this.GS=n),this.YS=t,this.d3.q3(),[2]})}).call(this)},i.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:this.H3.clear(),this.Vo(),this.L3.kn(),t.label=1;case 1:return t.trys.push([1,3,,4]),this.O3.mn(LR.lZ,this.Rs),[4,this.O3.zg()];case 2:return t.sent(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}})}).call(this)},Nt(n,[{key:"IP",get:function(){return this.e3.IP}},{key:"Cd",get:function(){return this.YS}},{key:"qT",get:function(){return this.GS}},{key:"B3",get:function(){return this.N3}},{key:"M3",get:function(){return this.L3.ZZ}},{key:"MY",get:function(){return this.O3.MY},set:function(t){this.O3.MY=t}},{key:"UY",get:function(){return this.O3.UY},set:function(t){this.O3.UY=t}},{key:"ga",get:function(){return this.O3.ga}}]),n}(th);F(),Et();var rD=function(){function t(t,n,i,r){void 0===i&&(i=!1),void 0===r&&(r=!1),this.Tn=void 0,this.An=void 0,this.G3=void 0,this.X3=void 0,this.j3=void 0,this.Tn=t,this.An=n,this.G3=i,this.X3=r,this.j3=Vn.Mg()}return t.prototype.z3=function(){var t=this.Tn,n=this.An;if(this.G3||this.X3){var i=.001*(Vn.Mg()-this.j3);this.G3&&(t+=i),this.X3&&(n+=i)}return TA.tL(t,n)},t}();function eD(t){var n=[];if(t.Q3&&n.push(t.Q3.IP),t.K3&&n.push(t.K3.IP),0===n.length)return TA.iL();for(var i,r=0,e=Lt(n);!(i=e()).done;){var s=i.value;s.V>0&&(r=b.max(r,s.An(s.V-1)))}for(var u,o=t.WZ,h=new TA([0,r],[!0,o]),c=Lt(n);!(u=c()).done;){var a=u.value;o&&a.V>0&&(a=a.OM(new TA([a.An(a.V-1),r],[!0,!0]))),h=h.Mn(a)}return h}function sD(t,n,i){var r,e=t.IP,s=e.VM(n);if(s>=0){if(!(s+1=0))return ut.resolve();r=e.Tn(s)}return t._S(r,1/0,i)}function uD(t,n,i){if(!t.Cr(n)){var r=t.VM(n,i);if(r>=0){var e=t.Tn(r);if(n0&&r>n+e.T4){var u,o,h=e.ZZ.CM().UM(s),c=h.QM(i);if(-1!==c){var a=h.Tn(c);if(a-i<1||e.w4()){var f=h.An(c);0,u=f}}if(!u)(u=null==(o=e.E4)?void 0:o.determineStallJumpTarget())&&u!==i||(u=i+.01*e.S4,s.Cr(u)||(u=e.A4(i,s)));0,e.b4=u,e.S4++,e.T4=b.min(2*e.T4,1e4),e.a4(u)}},this.i4.wn(Ey.wI,this.e4),this.TL.wn(eh.Qw,this.e4),this.TL.wn(hD,this.s4),this.E4=r,this.T4=Vn._P?2e3:1e3}var n=t.prototype;return n.Y3=function(t){this.J3.push(t),t.wn(jR.KZ,this.Z3)},n.kn=function(){var t=this;this.t4(),this.i4.mn(Ey.wI,this.e4),this.TL.mn(eh.Qw,this.e4),this.TL.mn(hD,this.s4),this.J3.forEach(function(n){return n.mn(jR.KZ,t.Z3)}),this.n4(),this.r4=!0},n.XZ=function(t){if(this.TL.UP)return!1;if(0!==this.h4)return!1;var n=this.e3.IP,i=n.VM(t);if(i>=0&&t+oD=0?i+1:n.KM(t);if(r<0||r>=n.V)return!1;var e=n.Tn(r);return!(TA.tL(t,e).UM(this.ZZ).ZM>1)&&(0!==t||this.TL.kx?Vn.fP?(this.o4(t,e,250),!0):!(b.abs(e-t)<=.001)&&(this.a4(e),!0):(this.o4(t,e,2e3),!0))},n.o4=function(t,n,i){var r=this;this.n4(),this.u4=t,this.TL.wn(eh.$w,this.c4),this.h4=Vn.Og(function(){r.u4===r.TL.MP&&r.a4(n),r.n4()},i)},n.n4=function(){0!==this.h4&&(this.TL.mn(eh.$w,this.c4),Vn.Lg(this.h4),this.h4=0)},n.a4=function(t){this.TL.My(t,!1,!0)},n.d4=function(){0!==this.l4&&(Vn.Lg(this.l4),this.l4=0),this.TL.mn(eh._y,this.ad)},n.f4=function(){this.r4||0===this.v4&&(this.d4(),this.v4=Vn.fm(this._4,250))},n.t4=function(){0!==this.v4&&(Vn.vm(this.v4),this.v4=0),this.d4(),this.TL.kx||(this.g4=0)},n.m4=function(){return!this.TL.hx&&(!this.TL.kx||this.w4())&&0!==this.TL.ux&&!this.TL.UP&&!this.TL.lt&&(this.y4()||this.i4.Ax>=Cy.WL)},n.w4=function(){return!1},n.y4=function(){var t=this.TL.MP,n=this.e3.IP,i=n.VM(t);return-1!==i&&n.An(i)>t+oD},n.A4=function(t,n){var i=n.VM(t);return i>-1?n.An(i):t},Nt(t,[{key:"ZZ",get:function(){return this.J3.reduce(function(t,n){return t.OM(n.ZZ)},TA.iL())}}]),t}(),aD=function(t){function n(){return t.apply(this,arguments)||this}return Ct(n,t),n.prototype.w4=function(){if(!On.S_||!this.TL.kx)return!1;var t=this.TL.MP,n=this.e3.IP,i=this.ZZ.CM().UM(n),r=i.QM(t);return-1!==r&&i.Tn(r)-t<=3e3},n}(cD),fD=On.N_||On.L_,vD=On.W_||On.X_||On.ru,dD=function(t){return t._3="closed",t.sE="open",t.Bw="ended",t}({}),lD=function(t){function n(n,i,r,e,s,u,o,h){var c;return void 0===u&&(u=new Ce(n.X4)),(c=t.call(this,n,i,e,s,h)||this).G4=void 0,c.P4=void 0,c.U4=void 0,c.x4=void 0,c.V4=void 0,c.N4=new rD(0,1/0),c.iq=void 0,c.I4=void 0,c.R4=void 0,c.F4=void 0,c.H4=!1,c.q4=function(){c.So(new rh(HR.mZ))},c.j4=function(){c.So(new rh(HR.yZ))},c.bd=function(){c.W4()},c.P3=function(){c.TL.P3()},c.G4=u,c.iq=c.G4.Lp(),c.iq.addEventListener("sourceclose",c.q4),c.iq.addEventListener("sourceopen",c.j4),c.TL.wn([eh._y,eh.$w,eh.Fw],c.bd),c.F4=new aD(c,r,c.TL,o),c}Ct(n,t);var i=n.prototype;return i.C4=function(t){if(t<0)throw new y("Invalid duration");this.D4()?this.B4(t):this.I4=t},i.B4=function(t){var n=t===1/0;if(n&&this.iq.setLiveSeekableRange){var i=b.pow(2,39);this.iq.setLiveSeekableRange(0,i)}S(t)?(this.iq.duration=bi,this.R4=NaN):(this.iq.duration=n?vD?1/0:bi:t,this.R4=void 0),this.I4=void 0},i.M4=function(t,n,i,r){this.N4=new rD(t,n,Boolean(i),Boolean(r))},i.VY=function(){return Vt(function(){var t,n,i,r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:return t=this.YS,n=Ui(t.L4,function(t){return Fv(t.qT)}),i=Ui(t.L4,function(t){return Vv(t.qT)}),this._T.disableRemotePlayback=!0,[4,this.O4()];case 1:return a.sent(),r=this.IZ(),n&&(e=new YR,this.F4.Y3(e),u=null!=(s=this.m3(n.qT))?s:n.qT,this.U4=this.iq.addSourceBuffer(""+u+r),this.P4=nD(this,this.TL,n,ig.Dk,this.U4,u,e),this.P4.wn(LR.lZ,this.P3)),i&&(o=new YR,this.F4.Y3(o),c=null!=(h=this.m3(i.qT))?h:i.qT,this.V4=this.iq.addSourceBuffer(""+c+r),this.x4=nD(this,this.TL,i,ig.Bk,this.V4,c,o),this.x4.wn(LR.lZ,this.P3)),this.PZ.Un(this,t),[2]}})}).call(this)},i.O4=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.prototype.UZ.call(n,this.iq)];case 1:return i.sent(),"open"===this.Ax?[3,3]:[4,iw(this.iq,"sourceopen")];case 2:i.sent(),i.label=3;case 3:return[2]}})}).call(this)},i.D4=function(){if("open"!==this.Ax)return!1;var t=this.P4&&this.P4.ga,n=this.x4&&this.x4.ga;return!(t||n)},i.C3=function(){this.H4=!0,this.P4&&this.P4.C3(),this.x4&&this.x4.C3(),this.H4=!1,this.W4()},i.A3=function(){this.P4&&this.P4.A3(),this.x4&&this.x4.A3()},i.TZ=function(n){var i=Ui(n.L4,function(t){return Fv(t.qT)}),r=Ui(n.L4,function(t){return Vv(t.qT)});if(this.P4){if(!i)return!1;if(!this.P4.TZ(i))return!1}else if(i)return!1;if(this.x4){if(!r)return!1;if(!this.x4.TZ(r))return!1}else if(r)return!1;return!!t.prototype.TZ.call(this,n)},i.EZ=function(n){var i=this;return Vt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:return r=Ui(n.L4,function(t){return Fv(t.qT)}),e=Ui(n.L4,function(t){return Vv(t.qT)}),s=[],this.P4&&s.push(this.P4.EZ(r)),this.x4&&s.push(this.x4.EZ(e)),[4,ut.all(s)];case 1:return u.sent(),[4,t.prototype.EZ.call(i,n)];case 2:return u.sent(),[2]}})}).call(this)},i.xZ=function(n){t.prototype.xZ.call(this,n)},i.zg=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.iq.removeEventListener("sourceclose",this.q4),On.S_?[4,this.HZ()]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.P4?[4,this.P4.zg()]:[3,4];case 3:if(i.sent(),this.P4=void 0,Jo()&&(On.S_||On.w_))try{this.iq.removeSourceBuffer(this.U4)}catch(t){}this.U4=void 0,i.label=4;case 4:return this.x4?[4,this.x4.zg()]:[3,6];case 5:if(i.sent(),this.x4=void 0,Jo()&&(On.S_||On.w_))try{this.iq.removeSourceBuffer(this.V4)}catch(t){}this.V4=void 0,i.label=6;case 6:return this._T.src&&URL.revokeObjectURL(this._T.src),this._T.disableRemotePlayback=!1,this.TL.mn([eh._y,eh.$w,eh.Fw],this.bd),this.F4.kn(),On.w_?[4,this.HZ()]:[3,8];case 7:i.sent(),i.label=8;case 8:return[4,t.prototype.zg.call(n)];case 9:return i.sent(),[2]}})}).call(this)},i.q3=function(){var t=this,n=this.YS,i=n.L4.map(function(n){return Fv(n.qT)&&t.P4?t.P4.Cd:Vv(n.qT)&&t.x4?t.x4.Cd:n});this.YS=Yu({},n,{L4:i})},i.D3=function(){this.H4||this.W4()},i.W4=function(){this.z4&&this.D4()&&(this.iq.endOfStream(),this.I4=void 0,this.R4=void 0,this.So(new rh(HR.gZ)),this.TL.P3())},i.S3=function(){this.D4()&&(this.WZ?this.W4():void 0!==this.I4&&this.B4(this.I4))},i.XZ=function(t){return this.F4.XZ(t)},i.jZ=function(){return!0},i.m3=function(t){return wD(this.G4,t)},n.QZ=function(t){var n=De(t.X4);if(void 0===n)return!1;if("function"!=typeof n.isTypeSupported)return!1;for(var i,r=new Ce(t.X4),e=Lt(t.L4);!(i=e()).done;){if(void 0===wD(r,i.value.qT))return!1}return!0},Nt(n,[{key:"Q3",get:function(){return this.P4}},{key:"K3",get:function(){return this.x4}},{key:"ct",get:function(){if(void 0!==this.I4)return this.I4;if(void 0!==this.R4)return this.R4;var t=this.iq.duration;return t===bi?1/0:t}},{key:"IP",get:function(){return fD?eD(this):function(t,n){var i=n;return i.V>0&&t.WZ&&(i=i.OM(TA.$M(i.An(i.V-1)))),i}(this,TA.jn(this._T.buffered))}},{key:"qZ",get:function(){var t;return null==(t=this.P4)?void 0:t.IP}},{key:"zZ",get:function(){var t;return null==(t=this.x4)?void 0:t.IP}},{key:"Sx",get:function(){return this.N4.z3().Mn(new TA([0,this.ct],[!0,!0]))}},{key:"WZ",get:function(){return(!this.P4||this.P4.WZ())&&(!this.x4||this.x4.WZ())}},{key:"Ax",get:function(){return this.iq.readyState}},{key:"z4",get:function(){if(!this.WZ)return!1;var t=this.IP;return 0!==t.V&&t.Tn(t.V-1)<=this.TL.MP}}]),n}(WR);function wD(t,n){var i=Xv(n),r=zC(i),e="audio/mp4"===i.Km,s=e&&1===r.length&&"mp4a.40.34"===r[0];if(t.Fp(n)&&(!s||!On.X_))return n;if(s)for(var u,o=Lt(['audio/mp4; codecs="mp3"',"audio/mpeg"]);!(u=o()).done;){var h=u.value;if(t.Fp(h))return h}if(e&&1===r.length&&"flac"===r[0].toLowerCase())for(var c,a=Lt(["flac","fLaC","FLAC"]);!(c=a()).done;){var f='audio/mp4; codecs="'+c.value+'"';if(t.Fp(n))return f}}F(),Et(),Bt(),Dt(),F(),Et(),Dt();var gD=function(t){function n(n){var i;return(i=t.call(this,eh.Fw)||this).currentTime=void 0,i.currentTime=n,i}return Ct(n,t),n}(rh),_D=[eh.gy,eh.Kw,eh.$w,eh.Fw,eh.uo,eh.jw],mD=function(t){function n(n,i,r,e,s,u,o,h,c,a,f){var v;return(v=t.call(this)||this).bz=void 0,v.WA=void 0,v.Z4=void 0,v.kz=void 0,v.Sz=void 0,v.Tz=void 0,v.Ez=void 0,v.ib=void 0,v.t5=void 0,v.K4=void 0,v.J4=void 0,v.bz=n,v.WA=i,v.Z4=r,v.kz=e,v.Sz=s,v.Tz=u,v.Ez=o,v.ib=h,v.t5=c,v.K4=a,v.J4=f,v}Ct(n,t);var i=n.prototype;return i.My=function(t,n,i){this.bz!==t&&(this.bz=t,this.K4=n,i&&!this.Sz?(this.J4=!0,this.So(new gD(this.MP))):(this.J4=!1,this.Sz=!0,this.So(new dT(this.MP))))},i.zx=function(){this.kz||(this.kz=!0,this.So(new hT(this.MP)))},i.Gx=function(){this.kz&&(this.kz=!1,this.So(new cT(this.MP)))},i.zg=function(){this.Vo()},Nt(n,[{key:"MP",get:function(){return this.bz}},{key:"Q4",get:function(){return this.K4}},{key:"Y4",get:function(){return this.J4}},{key:"ct",get:function(){return this.WA}},{key:"UP",get:function(){return this.Z4}},{key:"hx",get:function(){return this.kz}},{key:"Ax",get:function(){return this.t5}},{key:"kx",get:function(){return this.Sz}},{key:"$P",get:function(){return this.Tz},set:function(t){this.$P!==t&&(this.Tz=t,this.So(new wT(this.MP,this.Mx)))}},{key:"ux",get:function(){return this.Ez},set:function(t){this.ux!==t&&(this.Ez=t,this.So(new fT(this.MP,this.ux)))}},{key:"Mx",get:function(){return this.ib},set:function(t){this.Mx!==t&&(this.ib=t,this.So(new wT(this.MP,this.Mx)))}}]),n}(th);function yD(t){return new mD(t.MP,t.ct,t.UP,t.hx,t.kx,t.$P,t.ux,t.Mx,t.Ax,!1,t.Y4)}function pD(t,n){n.ct===t.ct||S(n.ct)&&S(t.ct)||t.So(new aT(t.ct)),t.$P=n.$P,t.Mx=n.Mx,t.ux=n.ux,n.hx?t.zx():t.Gx().catch(di),n.MP!==t.MP||n.Ax>Cy.VL&&t.Ax===Cy.VL?t.My(n.MP,n.Q4,n.Y4):!n.kx&&t.kx?t.So(new dT(t.MP)):n.kx&&!t.kx&&t.Ax>=Cy.HL&&t.So(new lT(t.MP)),!n.UP&&t.UP&&t.So(new vT(t.MP))}F(),Et(),Dt(),Ut(),F(),Et(),Bt(),Dt();var kD=function(t){function n(n){var i;return(i=t.call(this)||this).TL=void 0,i.EV=Cy.VL,i.s5=function(){i.e5()},i.TL=n,i}Ct(n,t);var i=n.prototype;return i.i5=function(t){this.EV!==t&&(this.EV=t,this.So(new Ry(this.TL.MP,t)))},i.e5=function(){this.i5(this.bx())},i.hr=function(){this.i5(Cy.VL)},i.zg=function(){this.Vo()},Nt(n,[{key:"Ax",get:function(){return this.bx()}}]),n}(th);F(),Et(),Dt(),Ut();var bD=["emptied","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","timeupdate","progress","seeking","seeked"],AD=function(t){function n(n){var i;i=t.call(this,n)||this;for(var r,e=Lt(bD);!(r=e()).done;){var s=r.value;i.TL.$W.addEventListener(s,i.s5)}return i}Ct(n,t);var i=n.prototype;return i.bx=function(){var t=this.TL.$W.readyState;return t>Cy.HL&&this.TL.n5?Cy.HL:(this.TL.$W.seeking&&t>Cy.Qn&&(t=Cy.Qn),t)},i.zg=function(){for(var n,i=Lt(bD);!(n=i()).done;){var r=n.value;this.TL.$W.removeEventListener(r,this.s5)}t.prototype.zg.call(this)},n}(kD);F(),Et();var TD=ve,SD=function(t){function n(n){var i;(i=t.call(this,n)||this).TL.wn([eh.$w,eh.Fw],i.s5);for(var r,e=Lt(bD);!(r=e()).done;){var s=r.value;i.TL.$W.addEventListener(s,i.s5)}return i}Ct(n,t);var i=n.prototype;return i.bx=function(){if(this.TL.$W.readyState===Cy.VL)return Cy.VL;var t=this.r5(),n=t?t.An-t.Tn:0;if(!t)return Cy.Qn;var i=this.TL.ux;return this.h5()||n>=3*i?Cy.qL:n>=3?Cy.WL:Cy.HL},i.r5=function(){var t=this.TL.MP,n=this.TL.IP.LM(.04),i=n.VM(t);if(!(i<0))return{Tn:t,An:n.An(i)}},i.h5=function(){if(this.TL.UP)return!0;var t=this.TL.ct,n=this.r5();return!!n&&t-n.An<=TD},i.zg=function(){this.TL.mn([eh.$w,eh.Fw],this.s5);for(var n,i=Lt(bD);!(n=i()).done;){var r=n.value;this.TL.$W.removeEventListener(r,this.s5)}t.prototype.zg.call(this)},n}(kD);F(),Et(),Dt(),F(),Et(),Dt();var ED=[Ey.wI,eh.uo,eh.jw,eh.$w,eh.Zw,eh.Fw,eh.Vw,eh.Bw,zm.ma],ID=function(t){function n(n){var i;return(i=t.call(this)||this).PV=void 0,i.c5=!1,i.xK=function(){i.er()},i.PV=n,i.PV.wn(ED,i.xK),i}Ct(n,t);var i=n.prototype;return i.o5=function(){return(!this.PV.Y4||!this.PV.a5)&&this.PV.Axn}function PD(t,n){return function(t,n){return Oi(t.EO,n.EO,jg)}(t,n)||function(t,n){return Oi(t.PO,n.PO,jg)}(t,n)}function ND(t,n){return function(t,n){return Oi(t.MO,n.MO,jg)}(t,n)||function(t,n){return Oi(t.LO,n.LO,jg)}(t,n)}function BD(t,n,i){var r=function(t,n,i,r,e,s,u){void 0===e&&(e=!1),void 0===s&&(s=0),void 0===u&&(u=t.length);for(var o=s,h=u-1;o<=h;){var c=o+(h-o>>1),a=r(i(t[c]),n);if(a<0)o=c+1;else if(a>0)h=c-1;else{if(!(e&&c>s&&0===r(i(t[c-1]),n)))return c;h=c-1}}return~o}(t,n,li,i,!0);if(r<0)return r;for(;r=0?r:-(r+1)}function OD(t){var n=t.Ht;if(!n)return-1;if(V(t,Yg))return n.l5(t);var i=n.L;if(!i)return-1;var r=BD(i.II,t,PD);return r>=0?r:-1}function MD(t,n){var i=function(t,n,i){for(var r=t.length,e=n.length,s=0,u=0,o=[],h=[];s=0;i-=1){var r=n[i];if(t.zO(r))return!0}return!1},n.Wy=function(t){return this._5[t]},Nt(t,[{key:"II",get:function(){return this._5}},{key:"V",get:function(){return this._5.length}},{key:"Ca",get:function(){if(this.hu){var t=this._5;this.hu.length=t.length;for(var n=0;n=0)){t.Ht=this;var i=-(n+1);this.x5.splice(i,0,t);var r=xD(this.L.II,t,PD);this.I5(t,r),this.So(new WD(t))}}},i.I5=function(t,n){this._5.splice(n,0,t),this.R5(n),t.jO=n,n=0&&qi(i,r);var e=BD(this.x5,t,ND);e>=0&&qi(this.x5,e),t.Ht=void 0,this.C5(t,n),this.So(new XD(t))}}},i.C5=function(t,n){qi(this._5,n),this.R5(n),t.jO=-1,this.E5>n&&--this.E5},i.UO=function(t){if(t&&t.Ht===this){var n=this.l5(t);if(!(n<0)){this.C5(t,n);var i=xD(this.L.II,t,PD);this.I5(t,i);var r=Hi(this.k5,function(n){return n===t});if(r>=0){qi(this.k5,r);var e=xD(this.k5,t,PD);this.k5.splice(e,0,t)}}}},i.D5=function(t,n){var i=this.k5,r=this._5,e=this.E5,s=!1,u=1/0;n&&(e=0);for(var o=i.length-1;o>=0;o--){var h=i[o];DD(h,t)?h.PO=this.B5)&&this.N5(),t.jO},i.N5=function(){for(var t=this._5,n=this.B5;nt.EO)t.PO=r.EO;else{var e=BD(n,t,PD);if(!(e>=0)){var s=-(e+1),u=s-1;if(u>=0)n[u].EO=0&&t[e].EO===r;e--)t[e].PO=i}function vP(t){return Vg(t)}F(),Et(),H(),Ut(),F(),Et(),Bt(),Dt(),F(),Et(),F(),Et();var dP=function(t){function n(n,i){var r;return(r=t.call(this,n)||this).H5=void 0,r.H5=i,r}Ct(n,t);var i=n.prototype;return i.xa=function(){return vP(this)},i.GO=function(t){return cP(this,t)},Nt(n,[{key:"U",get:function(){return this.H5}},{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}}]),n}(nP);function lP(t){switch(t){case 0:case 1:case 2:case 3:return!0}return!1}function wP(t){switch(t){case 0:return Zh;case 1:return ic;case 2:return rc;case 3:return fc}}function gP(t,n){var i=n.ac,r=t.byteLength,e=mc(t);return n.Ny(r-i),kc(e,i,r).buffer}function _P(t,n){return{id:t||"",data:V(n,ArrayBuffer)?n:void 0}}function mP(t,n,i){var r=Mh(t,n);if(lP(r)){var e=wP(r);return{id:i,language:Kh(t,n,3),description:e(t,n),text:e(t,n)}}}function yP(t,n,i){var r=Mh(t,n);if(lP(r)){var e=wP(r);return{id:i,mimeType:Zh(t,n),fileName:e(t,n),description:e(t,n),data:gP(t,n)}}}function pP(t,n,i){var r=Mh(t,n);if(lP(r)){for(var e=wP(r),s=[];n.act.byteLength)break;a.push({text:f,timestamp:qh(t,n)})}return{id:i,language:s,format:u,contentType:o,description:h,entries:a}}}function bP(t,n,i){return{id:i,ownerIdentifier:Zh(t,n),identifier:gP(t,n)}}function AP(t,n,i){var r=Mh(t,n);if(lP(r)){var e=wP(r);return{id:i,language:Kh(t,n,3),description:e(t,n),text:e(t,n)}}}function TP(t,n,i){var r=Mh(t,n);if(lP(r))return{id:i,text:wP(r)(t,n)}}function SP(t,n,i){return{id:i,url:Zh(t,n)}}function EP(t,n,i){var r=Mh(t,n);if(lP(r)){var e=wP(r);return{id:i,description:e(t,n),text:e(t,n)}}}function IP(t,n,i){var r=Mh(t,n);if(lP(r))return{id:i,description:wP(r)(t,n),url:Zh(t,n)}}function RP(t,n,i){switch(i){case"COM":return mP(t,n,i);case"GEO":return yP(t,n,i);case"IPL":return pP(t,n,i);case"PIC":return function(t,n,i){var r=Mh(t,n);if(lP(r)){var e,s,u=wP(r),o=Kh(t,n,3),h=Mh(t,n),c=u(t,n);return"--\x3e"===o?(e=o,s=Zh(t,n)):(e="image/"+o.toLowerCase(),s=gP(t,n)),{id:i,mimeType:e,pictureType:h,description:c,data:s}}}(t,n,i);case"SLT":return kP(t,n,i);case"TXX":return EP(t,n,i);case"UFI":return bP(t,n,i);case"ULT":return AP(t,n,i);case"WXX":return IP(t,n,i);default:if("T"===i.charAt(0))return TP(t,n,i);if("W"===i.charAt(0))return SP(t,n,i)}}function CP(t,n,i){switch(i){case"APIC":return function(t,n,i){var r=Mh(t,n);if(lP(r)){var e=wP(r),s=Zh(t,n);return{id:i,mimeType:s,pictureType:Mh(t,n),description:e(t,n),data:"--\x3e"===s?Zh(t,n):gP(t,n)}}}(t,n,i);case"COMM":return mP(t,n,i);case"COMR":return function(t,n,i){var r=Mh(t,n);if(lP(r)){var e,s,u=wP(r),o=Zh(t,n),h=Kh(t,n,8),c=Zh(t,n),a=Mh(t,n),f=u(t,n),v=u(t,n);return n.act.byteLength))return{o:Kh(t,n,3),Vy:Hh(t,n,3)}}(t,n);case 3:return function(t,n){if(!(n.ac+10>t.byteLength)){var i=Kh(t,n,4),r=qh(t,n);Mh(t,n);var e=Mh(t,n);return{o:i,Vy:r,SD:{X5:Oh(e,0),K5:Oh(e,1),groupingIdentity:Oh(e,2)}}}}(t,n);case 4:return function(t,n){if(!(n.ac+10>t.byteLength)){var i=Kh(t,n,4),r=DP(t,n);Mh(t,n);var e=Mh(t,n);return{o:i,Vy:r,SD:{groupingIdentity:Oh(e,1),X5:Oh(e,4),K5:Oh(e,5),W5:Oh(e,6),Y5:Oh(e,7)}}}}(t,n)}}function OP(t){for(var n=mc(t),i=new E(n.byteLength),r=0,e=0;e=t||(this.a6=t,cy(this,t))},i.t6=function(){var t=this.Xk;this.n6||t!==Hm.Kn?this.e6=t:this.e6=Hm.JI},i.u6=function(){var t=this.Xk,n=this.e6;t!==n&&(this.n6||t!==Hm.Kn||n!==Hm.JI)&&("metadata"===this.Lt&&n===Hm.Nh?this.Xk=t:this.h6&&n===Hm.Nh&&t===Hm.Kn?this.e6=t:this.Xk=n)},i.e5=function(t){this.t5!==t&&(this.t5=t,this.So(new UD(this,t)))},i.i6=function(t){var n=b.max(this.t5,this.s6,t);this.e5(n)},i.c6=function(t){var n=WP(t);if(n)return n;if(Wn(n=this.d6(t)))for(var i,r=Lt(n);!(i=r()).done;){i.value.Ht=this}else n.Ht=this;return n},i.d6=function(t){var n=this.l6(t);return t.THEOplayerTextTrackCue=n,n},i.l6=function(t){return t.endTime0){for(var n,i=Lt(t.L.II);!(n=i()).done;){var r=n.value;this.D6.push(r)}this.B6()}},n.P6=function(t){if(t.mn(Dw.hI,this.I6),t.mn(Dw.aI,this.R6),t.mn(Dw.cI,this.C6),t.L.V>0){for(var n,i=Lt(t.L.II);!(n=i()).done;){var r=n.value;Xi(this.m6,r),Xi(this.D6,r)}this.B6()}},n.N6=function(){this.oa.kx||this.oa.hx?this.w6():this.B6()},n.B6=function(){this.b6&&0!==this.A6.length&&(this.T6-this.oa.MP>.25*this.oa.ux||this.y6||(this.y6=this.L6.M6(this.O6)))},n.w6=function(){this.y6&&(this.L6.F6(this.y6),this.y6=0)},n.U6=function(t){var n;if(0!==this.T6){var i,r=null!=(i=null==(n=t.Ht)?void 0:n.bU)?i:0,e=t.EO+r,s=t.PO+r,u=this.oa.MP,o=e<=u&&un&&i-n<.1&&(e=!1),this.S6=!1;for(var s,u=[],o=1/0,h=Lt(t);!(s=h()).done;){var c=s.value,a=i-c.bU,f=c.D5(a,e)+c.bU;f=0;y--)ji(u,w[y])&&qi(w,y);var p=[];if(!e)for(var k=w.length-1;k>=0;k--){var A=w[k],T=A.Ht.bU;A.EO+T>n&&A.PO+T<=i&&(p.push(A),qi(w,k))}for(var S,E=Lt(this.D6);!(S=E()).done;){var I=S.value;I.EO!==I.PO&&Xi(p,I)}Yi(this.D6);for(var R,C=[],D=[],P=Lt(p);!(R=P()).done;){var N=R.value;N.ro||C.push(new jD(N,N.EO)),C.push(new YD(N,b.max(N.EO,N.PO))),N.ro=!1}for(var B,x=Lt(w);!(B=x()).done;){var O=B.value;O.ro&&(C.push(new YD(O,b.max(O.EO,O.PO))),O.ro=!1)}for(var M,L=Lt(u);!(M=L()).done;){var U=M.value;U.ro||(C.push(new jD(U,U.EO)),U.ro=!0)}C.sort(zP);for(var F,V=Lt(C);!(F=V()).done;){var H=F.value,W=H.TO;W.So(H);var z=W.Ht;z&&(H.type===Lg.zL?z.So(new JD(W)):z.So(new $D(W)),ji(D,z)||D.push(z))}D.sort(oy);for(var X,q=Lt(D);!(X=q()).done;){var G=X.value;G.So(new iP(G))}this.En=i,this.m6=u,this.T6=o}},n.kn=function(){this.hr(),this.oa.mn(eh._y,this.H6),this.oa.mn(eh.uo,this.W6),this.oa.mn(Ey.TM,this.H6),this.oa.mn(eh.jw,this.H6),this.oa.mn(eh.$w,this.q6),this.oa.mn(eh.Zw,this.H6)},t}();F(),Et();var qP=function(){function t(){}var n=t.prototype;return n.M6=function(t){return rI(t)},n.F6=function(t){eI(t)},t}(),GP=new qP,jP=function(t){function n(n,i){return void 0===i&&(i=GP),t.call(this,n,i)||this}return Ct(n,t),n}(XP);F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt(),Dt();var QP=function(t){function n(n,i,r){return t.call(this,n,1/0,i,!1,r)||this}return Ct(n,t),n.prototype.GO=function(t){return cP(this,t)},Nt(n,[{key:"Ca",get:function(){return this.hu||(this.hu=vP(this)),this.hu}}]),n}(Yg);F(),Et(),Dt(),F(),Et(),Dt();var YP=function(t){function n(n,i,r){return void 0===r&&(r=Dg.DEFAULT),t.call(this,Ym.VU,"",i||"","",!1,r,!1,n)||this}return Ct(n,t),n}(GD),KP=function(t){function n(n,i){var r;return(r=t.call(this,n,i)||this).Km=Dg.ID3,r}Ct(n,t);var i=n.prototype;return i.tV=function(n){aP(n,this._5),t.prototype.tV.call(this,n)},i.xa=function(){return qm(this)},n}(YP),JP=function(t){function n(n){var i;return(i=t.call(this,n.inBandMetadataTrackDispatchType,n.label)||this)._O=void 0,i.a6=0,i.o6=function(){i.Xk!==Hm.Nh&&(i.v6(),i.i6(Cg.LOADED))},i._O=n,i._O.addEventListener("cuechange",i.o6),i.Xk=i.e6,pr(function(){i.o6()}),i}Ct(n,t);var i=n.prototype;return i.T5=function(n){t.prototype.T5.call(this,n),this.e6=this.Xk},i.tV=function(n){t.prototype.tV.call(this,n),n.M5.track!==this._O&&this._O.addCue(n.M5)},i.WU=function(n){t.prototype.WU.call(this,n),n.M5.track===this._O&&this._O.removeCue(n.M5)},i.qU=function(t){this.a6>=t||(this.a6=t,cy(this,t))},i.i6=function(t){this.Ax=b.max(this.Ax,t)},i.v6=function(){var t=this._O.cues;if(t){for(var n=t.length,i=[],r=[],e=0;e=this.a6){var o,h=null!=(o=null==u?void 0:u.THEOplayerTextTrackCue)?o:new ZP(u);i.push(h)}else r.push(u)}yi(i,PD);for(var c,a=MD(this.L.II.slice(),i),f=Lt(r);!(c=f()).done;){var v=c.value;this._O.removeCue(v)}for(var d,l=Lt(a.v5);!(d=l()).done;){var w=d.value;w.kn(),this.WU(w)}for(var g,_=Lt(a.f5);!(g=_()).done;){var m=g.value;this.tV(m)}}},i.kn=function(){this._O.removeEventListener("cuechange",this.o6),t.prototype.kn.call(this)},Nt(n,[{key:"o",get:function(){return this._O.id||""}},{key:"ZI",get:function(){return this._O.inBandMetadataTrackDispatchType||""}},{key:"bs",get:function(){return this._O.language||""}},{key:"e6",get:function(){return Wm(this._O.mode)},set:function(t){this._O.mode=t}},{key:"mO",get:function(){return this._O}}]),n}(KP),ZP=function(t){function n(n){var i,r=n.startTime,e=VP(n.value);return(i=t.call(this,r,e,n.id)||this).M5=void 0,i.M5=n,i.M5.THEOplayerTextTrackCue=i,i}return Ct(n,t),n.prototype.kn=function(){t.prototype.kn.call(this),this.M5.THEOplayerTextTrackCue=void 0},n}(QP);F(),Et(),Wt(),Bt(),Dt(),H(),at(),Ut(),Qt(),F(),Et(),jt(),F(),Et();var $P=[eh.Pw,eh.Ew,eh.py,eh.yy,eh.LICENSE_REQUEST_GENERATED];F(),Et(),Bt(),Dt();var tN=function(t){function n(n){var i;return(i=t.call(this,eh.Ew)||this).errorObject=void 0,i.errorObject=n,i}return Ct(n,t),Nt(n,[{key:"error",get:function(){return this.errorObject.message}},{key:"licenseAcquisitionURL",get:function(){return this.errorObject.url}},{key:"status",get:function(){return this.errorObject.status}},{key:"statusText",get:function(){return this.errorObject.statusText}},{key:"licenseAcquisitionMessage",get:function(){return this.errorObject.response}},{key:"systemCode",get:function(){return this.errorObject.systemCode}}]),n}(rh);F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Wt(),Bt(),Dt(),H(),Qt(),F(),Et(),Dt();var nN=function(t){function n(n){var i;return(i=t.call(this,eh.Pw)||this).z6=void 0,i.z6=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var iN=function(t){function n(n){var i;return(i=t.call(this,"wy")||this).z6=void 0,i.z6=n,i}return Ct(n,t),n}(rh),rN=new yd,eN=function(t){function n(n){var i;return(i=t.call(this,"Xs")||this).session=void 0,i.session=n,i}return Ct(n,t),n}(rh),sN=function(t){function n(n,i,r){var e;return(e=t.call(this)||this).J6=void 0,e.K6=void 0,e.Y6=void 0,e.j6=void 0,e.s8=void 0,e.nT=void 0,e.Z6=void 0,e.X6=void 0,e.yS=void 0,e.i8=void 0,e.e8=void 0,e.J6=n,e.K6=i,e.Y6=r,e.j6=!1,e.s8=!1,e.nT=new hr,e.X6=!1,e.yS=function(t){if(!e.nT.Yg.Hg)switch(t.Iy){case"license-request":case"license-renewal":e.eH(t.Py,t.Ry).catch(function(t){return e.Ts(t)});break;default:e.Ts(new eg(cd.CONTENT_PROTECTION_NOT_SUPPORTED,"Unsupported CDM message type: "+t.Iy))}},e.i8=function(t){e.J6.Ty.zy(function(t,n){switch(t){case"usable":Vn.Og(function(){e.s8=!0,e.So(new nN(n))},100);break;case"expired":case"status-pending":default:break;case"output-restricted":case"internal-error":e.So(new iN(n))}}),e.X6=!0,e.So(t)},e.e8=function(t){e.Ts(new eg(cd.CONTENT_PROTECTION_INTERNAL_ERROR,"Unknown CDM error"))},n.wn("Py",e.yS),n.wn(eh.yy,e.i8),n.wn("lt",e.e8),n.oS.then(function(){return e.t8()},function(t){return e.Ts(t)}),e}Ct(n,t);var i=n.prototype;return i.vS=function(){var t=this;return this.j6=!0,rN.Zo(function(n){return t.Q6(n)},this.nT.Yg)},i.Q6=function(t){return Vt(function(){var n,i,r,e;return zt(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,5]),dr(t),[4,this.K6.KV(t)];case 1:return s.sent(),[4,this.K6.YV(this.Y6.Jm,this.Y6.Ey,t)];case 2:return n=s.sent(),[4,this.J6.vS(this.Y6.Jm,this.Y6.Ey,n)];case 3:return s.sent(),[3,5];case 4:throw lr(i=s.sent()),r=V(i,Xc)?i.Yy:void 0,e=new eg(cd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error while performing the CDM request",i,void 0,void 0,void 0,void 0,r),this.Ts(e),e;case 5:return[2]}})}).call(this)},i.eH=function(t,n){return Vt(function(){var i,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return h.trys.push([0,5,,6]),function(t){return Cc(t,Hc())}(t)?[4,this.K6.dH(new E(t),this.nT.Yg)]:[3,2];case 1:return i=h.sent(),[3,4];case 2:return[4,this.K6.lH(new E(t),n,this.nT.Yg)];case 3:i=h.sent(),h.label=4;case 4:return[3,6];case 5:if(vr(r=h.sent()))return[2];throw r;case 6:if(this.nT.Yg.Hg)return[2];e=this.Z6,s=new Vc,this.Z6=s,h.label=7;case 7:return h.trys.push([7,10,11,14]),[4,this.J6.er(i)];case 8:return h.sent(),[4,Ar(100)];case 9:return h.sent(),[3,14];case 10:throw u=h.sent(),o=V(u,Xc)?u.Yy:void 0,new eg(cd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error while applying license response",u,void 0,void 0,void 0,void 0,o);case 11:return void 0===e?[3,13]:[4,e.Qy];case 12:h.sent(),h.label=13;case 13:return s.Xy(),this.Z6===s&&(this.Z6=void 0),[7];case 14:return[2]}})}).call(this)},i.Ts=function(t){var n=V(t,eg)?t:new eg(cd.CONTENT_PROTECTION_ERROR,t.message,t);this.So(new tN(n)),this.Xs()},i.t8=function(){this.J6.mn("Py",this.yS),this.J6.mn(eh.yy,this.i8),this.J6.mn("lt",this.e8),this.s8=!1,this.X6=!1,this.nT.Zg(),this.So(new eN(this))},i.Xs=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:this.Vo(),n.label=1;case 1:return void 0===(t=this.Z6)?[3,3]:[4,t.Qy];case 2:n.sent(),n.label=3;case 3:if(this.Z6!==t)return[3,1];n.label=4;case 4:return this.t8(),[4,this.J6.Xs().catch(di)];case 5:return n.sent(),[2]}})}).call(this)},Nt(n,[{key:"G6",get:function(){return this.X6}}]),n}(th),uN=function(t){function n(n,i,r){var e;return(e=t.call(this)||this).mS=void 0,e.TS=void 0,e.h8=void 0,e.r8=[],e.a8=void 0,e.d8=[],e.g8=void 0,e.l8=function(t){if(t.type===eh.yy)return null!=e.g8||(e.g8=new Fc),t.Ty.zy(function(t,n){e.g8.qy(n,t)}),void(e.n8&&e.So(new oh(e.g8)));e.Rs(t)},e.f8=function(t){t.session.mn($P,e.Rs),t.session.mn("Xs",e.f8),Xi(e.r8,t.session),e.g8=void 0},e.mS=n,e.TS=i,e.h8=r,e}Ct(n,t);var i=n.prototype;return i.QV=function(){return this.h8.QV()},i.o8=function(t){return this.a8||(this.a8=this.u8(t)),this.a8},i.u8=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return dr(t),[4,this.h8.dH(new E(Hc()),t)];case 1:if(n=i.sent(),dr(t),!this.TS)throw new y("Invalid MediaKeys when setting ServerCertificate");return[4,this.TS.ES(n.buffer)];case 2:return i.sent(),[2]}})}).call(this)},i.c8=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:if(!this.TS)throw new y("Invalid MediaKeys when creating KeySession");r.label=1;case 1:return r.trys.push([1,,3,4]),this.d8.push(t),[4,this.TS.SS("temporary")];case 2:return n=r.sent(),i=new sN(n,this.h8,t),this.r8.push(i),i.wn($P,this.l8),i.wn("Xs",this.f8),[2,i];case 3:return Xi(this.d8,t),[7];case 4:return[2]}})}).call(this)},i.v8=function(t){if(t._8)return!1;for(var n,i=Lt(this.r8);!(n=i()).done;){if(oN(n.value.Y6,t))return!0}for(var r,e=Lt(this.d8);!(r=e()).done;){if(oN(r.value,t))return!0}return!1},i.kn=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return this.TS=void 0,this.Vo(),t=this.r8.slice(),Yi(this.r8),[4,ut.all(t.map(function(t){return t.Xs()}))];case 1:return n.sent(),this.g8=void 0,this.h8.zg(),[2]}})}).call(this)},Nt(n,[{key:"kS",get:function(){return this.mS}},{key:"n8",get:function(){return this.r8.every(function(t){return t.G6})}}]),n}(th);function oN(t,n){if(t._8)return!1;if(t.Jm!==n.Jm)return!1;if(Cc(t.Ey,n.Ey))return!0;if("sinf"===t.Jm&&"sinf"===n.Jm){var i=hN(t),r=hN(t);if(i&&r)return Cc(i,r)}return!1}function hN(t){try{var n=fc(_c(new E(t.Ey)),new Tc),i=JSON.parse(n).sinf[0],r=new E(Oc(i)),e=new am(_c(r),new Tc);return ym.rN(e).mN.yN.SN}catch(t){return}}var cN=function(t){function n(n){var i;return(i=t.call(this)||this).TL=void 0,i.nT=new hr,i.ta=new yd,i.YS=void 0,i.h8=void 0,i.iq=void 0,i.mS=void 0,i.D8=function(t){i.b8(t.Jm,t.Ey,i.nT.Yg).catch(function(t){return i.Ts(t)})},i.TL=n,i.TL.wn(fh.Dw,i.D8),i}Ct(n,t);var i=n.prototype;return i.Un=function(t,n){this.iq=t,this.EZ(n)},i.EZ=function(t){this.YS=t,this.m8(this.nT.Yg).catch(wr)},i.xZ=function(t){this.w8(t,this.nT.Yg).catch(wr)},i.w8=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:if(r=function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:if(r=h.value,void 0===(null==(s=Ui(t,function(t){return t.y8===r.kS.$m}))?void 0:s.A8))return[2,"continue"];if(null==(e=r.BW)?void 0:e.some(function(t){return Cc(s.A8,t)}))return[3,4];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,i.b8(r.kS.Jm,s.A8,n)];case 2:return u.sent(),[2,{v:void 0}];case 3:return lr(u.sent()),[3,4];case 4:return[2]}})},dr(n),!(null==(e=this.YS)?void 0:e.aq))return[2];o=Lt(null!=(u=null==(s=this.YS)?void 0:s.aq)?u:[]),a.label=1;case 1:return(h=o()).done?[3,4]:(i=this,[5,Xt(r())]);case 2:if("object"===W(c=a.sent()))return[2,c.v];a.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},i.m8=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return Vn.Zs.gp?[4,this.S8(t)]:[3,2];case 1:if(n.sent())return[2];n.label=2;case 2:return this.YS&&this.YS.T8?[4,this.k8(t)]:[3,4];case 3:return[2,n.sent()];case 4:return[2]}})}).call(this)},i.S8=function(t){return Vt(function(){var n,i,r,e,s,u,o,h,c,a,f,v,d;return zt(this,function(l){switch(l.label){case 0:if(!(null==(n=this.YS)?void 0:n.aq))return[2,!1];r=!1,s=Lt(null!=(e=null==(i=this.YS)?void 0:i.aq)?e:[]),l.label=1;case 1:if((u=s()).done)return[3,14];if(!(o=u.value).MW||0===o.MW.length)return[3,6];l.label=2;case 2:return l.trys.push([2,4,,5]),h={kids:o.MW.map(function(t){return t.id})},c=dc(JSON.stringify(h)).buffer,[4,this.b8(co,c,t)];case 3:return l.sent(),r=!0,[3,5];case 4:return lr(l.sent()),[3,5];case 5:if(r)return[2,!0];l.label=6;case 6:f=Lt(null!=(a=o.BW)?a:[]),l.label=7;case 7:if((v=f()).done)return[3,12];d=v.value,l.label=8;case 8:return l.trys.push([8,10,,11]),[4,this.b8(o.kS.Jm,d,t)];case 9:return l.sent(),r=!0,[3,11];case 10:return lr(l.sent()),[3,11];case 11:return[3,7];case 12:if(r)return[2,!0];l.label=13;case 13:return[3,1];case 14:return[2,!1]}})}).call(this)},i.E8=function(t){return t===uo||t===ho||t===oo||t===co},i.b8=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c,a,f,v,d,l;return zt(this,function(w){switch(w.label){case 0:if(dr(i),!n.byteLength)return[2];if(!this.YS||!this.YS.aq.length)throw new eg(cd.CONTENT_PROTECTION_CONFIGURATION_MISSING,"Missing configuration for encrypted content");if(!this.E8(t))return[2];r=Cp(t,n),e=this.YS.aq,u=[],o=Lt(e),w.label=1;case 1:if((h=o()).done)return[3,11];if(c=h.value,dr(i),!(a=r[c.kS.Zm])||c.kS.Jm!==t)return c.kS.Km===Eo.Xm&&u.push(!1),[3,10];w.label=2;case 2:return w.trys.push([2,9,,10]),[4,this.P8(c,i)];case 3:return(f=w.sent()).QV()?[4,f.o8()]:[3,5];case 4:w.sent(),w.label=5;case 5:return v=this.TL.KP,d={Jm:c.kS.Jm,Ey:a,_8:v},u.push(!0),this.x8(f,d)?[4,f.c8(d)]:[3,8];case 6:return[4,w.sent().vS()];case 7:w.sent(),this.So(new hh(a)),w.label=8;case 8:return[2];case 9:return lr(l=w.sent()),s=l,[3,10];case 10:return[3,1];case 11:return 0===u.length||u.some(li)?[4,Vn._m()]:[2];case 12:throw w.sent()?new eg(cd.CONTENT_PROTECTION_NOT_SUPPORTED,"Encrypted content over an insecure connection is not supported",s):new eg(cd.CONTENT_PROTECTION_NOT_SUPPORTED,"Cannot create content decryption session",s)}})}).call(this)},i.k8=function(t){return Vt(function(){var n,i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(!(i=null==(n=this.YS)?void 0:n.aq))return[2];r=Lt(i),o.label=1;case 1:if((e=r()).done)return[3,8];s=e.value,dr(t),o.label=2;case 2:return o.trys.push([2,6,,7]),[4,this.P8(s,t)];case 3:return(u=o.sent()).QV()?[4,u.o8()]:[3,5];case 4:o.sent(),o.label=5;case 5:return[2];case 6:return lr(o.sent()),[3,7];case 7:return[3,1];case 8:return[2]}})}).call(this)},i.x8=function(t,n){return Vn.Zs._p||this.TL.CL.RL||!t.v8(n)},i.P8=function(t,n){var i=this;return this.ta.Zo(function(n){return i.I8(t,n)},n)},i.I8=function(t,n){return Vt(function(){var i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(dr(n),!this.YS||!this.h8||!this.iq)throw new y("Not initialized");if(this.mS){if(this.mS.kS!==t.kS)throw new y("Internal key system error");return[2,this.mS]}return i=this.h8,r=Yu({},t,{Mq:t.Mq.map(function(n){var r;return Yu({},n,{persistentState:null!=(r=n.persistentState)?r:i._H(t.kS),MS:n.MS||i.MS(t.kS)})})}),[4,this.iq.bZ(r.kS,r.Mq)];case 1:return e=o.sent(),s=i.DW(r),(u=new uN(r.kS,e,s)).wn($P,this.Rs),this.mS=u,[2,u]}})}).call(this)},i.Ts=function(t){if(!vr(t)){var n=V(t,eg)?t:new eg(cd.CONTENT_PROTECTION_ERROR,t.message,t);this.So(new tN(n))}},i.hr=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.iq=void 0,this.YS=void 0,this.nT.Zg(),this.nT=new hr,[4,this.C8()];case 1:return t.sent(),[2]}})}).call(this)},i.C8=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return[4,this.ta.Zg()];case 1:return n.sent(),(t=this.mS)?(t.mn(eh.py,this.Rs),this.mS=void 0,[4,t.kn()]):[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})}).call(this)},i.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),this.TL.mn(fh.Dw,this.D8),[4,this.hr()];case 1:return t.sent(),[4,this.ta.kn()];case 2:return t.sent(),[2]}})}).call(this)},Nt(n,[{key:"p8",get:function(){var t;return null==(t=this.mS)?void 0:t.kS}},{key:"Eq",get:function(){return this.h8},set:function(t){this.h8=t}}]),n}(th);F(),Et(),Dt();var aN=function(t){function n(n){var i;return(i=t.call(this,eh.Vw)||this).currentTime=void 0,i.currentTime=n,i}return Ct(n,t),n}(rh);F(),Et(),Bt(),Dt();var fN=function(t){function n(n){var i;return(i=t.call(this)||this).M8=void 0,i.B8=void 0,i.M8=n,i}Ct(n,t);var i=n.prototype;return i.e5=function(){var t;null==(t=this.B8)||t.e5()},i.hr=function(){var t;null==(t=this.B8)||t.hr()},i.zg=function(){this.Vo(),void 0!==this.B8&&(this.B8.zg(),this.B8=void 0)},i.N8=function(t){if(this.B8!==t){var n=this.Ax;void 0!==this.B8&&this.B8.zg(),this.B8=t,void 0!==t&&(t.wn(Ey.wI,this.Rs),t.e5());var i=this.Ax;n!==i&&this.So(new Ry(this.M8.MP,i))}},Nt(n,[{key:"Ax",get:function(){return void 0!==this.B8?this.B8.Ax:Cy.VL}}]),n}(th);F(),Et(),Bt(),Dt();var vN=function(t){function n(n,i,r){return t.call(this,n,i,"",r,void 0,Dg.WEBVTT)||this}Ct(n,t);var i=n.prototype;return i.L8=function(t,n,i){var r=new Jg(t,n,i,!1);return this.tV(r),r},i.O8=function(t){this.WU(t)},Nt(n,[{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=dN(this)}}]),n}(GD);function dN(t){return xw(qm(t),{get type(){return t.Km},addCue:function(n,i,r){return t.L8(n,i,r).Ca},removeCue:function(n){t.O8(n.kO)}})}F(),Et(),Bt(),Dt(),Ut();var lN=function(t){function n(n,i,r){var e,s;return(e=t.call(this,n,i,r)||this).uE=!1,e.F8=[],e.U8=function(){var t;null==(t=e.Z5)||t.removeEventListener("load",e.U8),e.uE=!0;for(var n,i=Lt(e.F8);!(n=i()).done;){var r=n.value;e.tV(r)}Yi(e.F8)},null==(s=e.Z5)||s.addEventListener("load",e.U8),e.Km=Dg.WEBVTT,e}Ct(n,t);var i=n.prototype;return i.L8=function(t,n,i){var r=this.d6(new f.VTTCue(t,n,i));return this.uE?this.tV(r):this.F8.push(r),r},i.O8=function(t){Xi(this.F8,t),this.WU(t)},i.kn=function(){var n;t.prototype.kn.call(this),null==(n=this.Z5)||n.removeEventListener("load",this.U8),Yi(this.F8)},Nt(n,[{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=dN(this)}}]),n}(HP);function wN(t,n){return void 0!==t.Q3===n.L4.some(function(t){return Fv(t.qT)})&&void 0!==t.K3===n.L4.some(function(t){return Vv(t.qT)})}F(),Et(),Wt(),Qt();var gN=On.N_||On.L_,_N=On.Cg,mN=On.X_,yN=On.X_&&On.ru,pN=function(t){function n(n,i,r,e,s){var u;return(u=t.call(this)||this)._T=void 0,u.sc=void 0,u.VJ=void 0,u.JW=void 0,u.yz=!0,u.iq=void 0,u.X7=new yd,u.W8=void 0,u.Q8=void 0,u.d7=void 0,u.PZ=void 0,u.ha=new ZT,u.ea=new tS,u.Gl=void 0,u.Dz=void 0,u.O7=[],u.L7=void 0,u.B7=void 0,u.N7=void 0,u.q8=void 0,u.b7=0,u.A7=NaN,u.H8=void 0,u.D7=!1,u.i9=void 0,u.G7=0,u.Sz=!1,u.J4=!1,u.M9=Cy.VL,u.K8=0,u.w7=ut.resolve(),u.m7=new hr,u._7=[],u.Ho=TA.iL(),u.J8=void 0,u.t7=1,u.s7=!1,u.e7=1,u.G8=!1,u.e9=!1,u.s9=!1,u.T7=!1,u.hw=void 0,u.X8=!1,u.j8=!1,u.V8=!1,u.C9=!1,u.r9=0,u.E4=void 0,u.n7=!1,u.F7=function(t){var n=t.track,i=u.q7(n);if(!bN(u.L7,n)){if(On.X_){if(n.kind===Ym.VU)return void u.H7(n);if(n.kind===Ym.FU&&""===n.label&&""===n.language&&!AN(n))return void u.W7(n,i)}u.L7.tt(new HP(n.id,n,i))}},u.U7=function(t){var n=bN(u.L7,t.track);n&&u.L7.it(n)},u.V7=function(){for(var t=0;t=Cy.WL)&&void 0!==u.iq&&MR(u.iq)){var t=u.iq,n=t.Q3,i=t.K3;if(n&&i){var r=u.MP,e=n.IP,s=i.IP;if(e.Cr(r)&&s.Cr(r))e.FM(s).qM(r-5,r)&&(u.V8?u.J7():u.Z7())}}},u.u9=function(){u.So(new cT(u.MP))},u.c9=function(){u.p7(new fr),u.So(new hT(u.MP))},u.a9=function(){u.l7(),u.So(new Oy(u.MP))},u._9=function(){u.Z8()},u.p9=function(){u.So(new aT(u.ct))},u.l9=function(){u.So(new qR(u.MP))},u.f9=function(){u.So(new GR)},u.A9=function(){u.Sz||u.J4||u.D7?u.D7=!1:u.So(new lT(u.MP))},u.b9=function(){u.I7(u.MP),u.D7=!1},u.d9=function(){var t=u.MP,n=u.kx,i=u.Q8.Ax0&&u.Rx>0&&u.So(new Ty)},u.S9=function(t){u.So(new vh(t.initDataType,t.initData||new ArrayBuffer(0)))},u.T9=function(){u.So(new dh)},u.P9=function(t){var n=t.initData,i=n?bc(n).buffer:new ArrayBuffer(0);u.So(new vh(uo,i))},u.k9=function(t){if(t.initData){var n=function(t){try{var n=_c(t),i=new Tc;return oc(hc(Uh(n,i,qh(n,i,!0)),!0))}catch(t){return}}(t.initData);if(!n)return;u.So(new vh(ho,n))}else u.So(new vh(ho,new ArrayBuffer(0)))},u.E9=function(t){var n=t.initData,i=n?bc(n).buffer:new ArrayBuffer(0);u.So(new vh(uo,i))},u.a7=function(){u.l7()},u.u7=function(t){u.p7(t)},u.F9=function(t){u.So(t),t.type===eh.Ew&&u.qq(hg(t.errorObject))},u._T=n,u.hw=i,u.sc=r,u.Dz=e,u.VJ=s,u.Q8=new fN(u),u.Q8.wn(Ey.wI,u.O9),u.Q8.N8(new AD(u)),u.d7=new RD(u),u.d7.wn(Ey.TM,u.a9),u.PZ=new cN(u),u.PZ.wn($P,u.F9),u.Gl=new Qm,u.L7=new Qm,u.B7=new Eb([u.Gl,u.L7]),u.N7=new jP(u),u.n9(),u.Lq(),u}Ct(n,t);var i=n.prototype;return i.z8=function(){return void 0!==this.q8&&this.ct===this.q8},i.Z8=function(){var t=this.ux;this.t7!==t&&(this.t7=t,this.So(new fT(this.MP,t)))},i.Y8=function(){var t=this.Mx,n=this.$P;this.e7===t&&this.s7===n||(this.e7=t,this.s7=n,this.So(new wT(this.MP,this.Mx)))},i.ZP=function(){return wR(this._T)},i.Gx=function(){this.n7||(this.n7=!0);var t=this.r7();return this.h7(),t},i.h7=function(){this.X8?this.j8&&(this.j8=!1,this.So(new cT(this.MP))):this.o7()},i.o7=function(){if(this.W8)this.W8.Gx();else{On.X_&&!On.ru&&this._T.preload===jT.lz&&(this._T.preload=jT.VU);var t=this.ux,n=this._T.play();t!==this.$W.playbackRate&&(this.ux=t),this.G8=!1,jn(n)?n.then(this.a7,this.u7):this.d7.u5()&&this.l7()}},i.zx=function(){this.X8?this.j8||(this.j8=!0,this.So(new hT(this.MP))):this.f7()},i.f7=function(){this.W8?this.W8.zx():(this._T.pause(),this.d7.er()),this.v7(new fr)},i.r7=function(){var t=new Vc;return this._7.push(t),t.Qy},i.g7=function(){for(var t,n=Lt(this._7);!(t=n()).done;){t.value.Xy(void 0)}Yi(this._7)},i.v7=function(t){for(var n,i=Lt(this._7);!(n=i()).done;){n.value.jy(t)}Yi(this._7)},i.l7=function(){this.X8||this.W8||this.g7()},i.p7=function(t){this.X8||this.W8||this.v7(t)},i.My=function(t,n,i){void 0===n&&(n=!1),void 0===i&&(i=!1),this.W8?this.W8.My(t,n,i):(this.m7.Zg(),this.m7=new hr,this.w7=_r(this.y7(t,n,i,this.w7,this.m7.Yg),this.m7).catch(di))},i.KW=function(t){var n=this.nq;if(n&&!S(n.getTime())){var i=(t.getTime()-n.getTime())/1e3;this.My(i)}},i.y7=function(t,n,i,r,e){return Vt(function(){var s,u,o,h,c,a,f,v,d,l,w,g,_,m,y,p,k;return zt(this,function(A){switch(A.label){case 0:return A.trys.push([0,24,,25]),this.q8=t,this.A7=t,this.b7=Vn.Mg(),i&&!this.Sz?this.J4=!0:(this.Sz=!0,this.J4=!1),this.G8&&!this.z8()&&(this.G8=!1),this.J4?(this.So(new gD(this.MP)),(On.w_||On.S_)&&(t+=.05)):this.So(new dT(t)),[4,r.catch(di)];case 1:return A.sent(),dr(e),this.iq&&!this.iq.jZ()?(this.S7(),[2]):(this.T7&&this.k7(),this.Q8.Ax!==Cy.VL?[3,3]:[4,this.Q8.ww(Ey.wI,e)]);case 2:A.sent(),A.label=3;case 3:if(0!==this._T.seekable.length&&(!yN||this.n7))return[3,9];s={stack:[],error:void 0,hasError:!1},A.label=4;case 4:return A.trys.push([4,6,7,8]),u=qt(s,hr.ep([e]),!1),[4,ut.race([iw(this._T,"timeupdate",u.Yg),Ar(100,u.Yg)])];case 5:return A.sent(),dr(e),[3,8];case 6:return o=A.sent(),s.error=o,s.hasError=!0,[3,8];case 7:return Gt(s),[7];case 8:return[3,3];case 9:h=uD(this.IP,t,.05),c=this.Sx,a=!0,f=!1,A.label=10;case 10:0,v={stack:[],error:void 0,hasError:!1},A.label=11;case 11:return A.trys.push([11,20,21,22]),(c=this.Sx).V>0&&!c.Cr(h)&&(h=c.DM(h),a=!0),!n||!Vn.Zs.Dp&&this._T.fastSeek||(l=this.IP).Cr(h)||(w=uD(l,h,1))!==h&&(h=w,a=!0),mN&&void 0!==(g=this.E7())&&h>g&&(h=g,a=!0),f?[3,14]:void 0!==(_=this.P7())&&h>_?(f=!0,[4,this.x7(_,!1,e)]):[3,14];case 12:return A.sent(),[4,iw(this._T,"seeked",e)];case 13:A.sent(),dr(e),a=!0,A.label=14;case 14:return a?(a=!1,[4,this.x7(h,n,e)]):[3,18];case 15:A.sent(),dr(e),m=this.MP,c=this.Sx,h=c.DM(h),y=1,A.label=16;case 16:return b.abs(h-m)>=ve?(c=this.Sx,h=function(t,n,i){void 0===i&&(i=0);if(!n.V)return 0;var r=n.DM(t),e=kN*i;r===n.Tn(0)?r+=e:r===n.An(n.V-1)&&(r-=e);return r}(h,c,y),[4,this.x7(h,n,e)]):[3,18];case 17:return A.sent(),dr(e),m=this.MP,y++,[3,16];case 18:return this._T.seeking||this.Q8.Ax0}F(),Et(),Bt(),Dt();var TN={ZJ:void 0,$J:void 0,tZ:void 0,iZ:void 0,eZ:void 0,sZ:void 0,nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0},SN=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).hu=void 0,n}return Ct(n,t),Nt(n,[{key:"Ca",get:function(){return this.hu||(this.hu=RR(this)),this.hu}},{key:"ZJ",get:function(){}},{key:"$J",get:function(){}},{key:"tZ",get:function(){}},{key:"iZ",get:function(){}},{key:"eZ",get:function(){}},{key:"sZ",get:function(){}},{key:"U9",get:function(){}},{key:"nZ",get:function(){}},{key:"rZ",get:function(){}},{key:"hZ",get:function(){}},{key:"oZ",get:function(){}}]),n}(th),EN=function(t){function n(n,i,r,e){return t.call(this,n,i,r,new SN,e)||this}return Ct(n,t),n.prototype.Wx=function(){},Nt(n,[{key:"Rx",get:function(){return 0}},{key:"Bx",get:function(){return 0}}]),n}(pN);F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Bt();var IN=function(){function t(t){void 0===t&&(t=5),this.V9=void 0;var n=f.document.createElement("div");n.className="theoplayer-texttracks",n.style.position="absolute",n.style.display="none",n.style.overflow="hidden",n.style.pointerEvents="none",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.width="100%",n.style.height="100%",n.style.lineHeight="1.3em",n.style.zIndex=""+t,this.V9=n,this.be()}var n=t.prototype;return n.we=function(){this.V9.style.display="none"},n.be=function(){this.V9.style.display="block"},n.B9=function(t){t.appendChild(this.V9)},n.kn=function(){$n(this.V9)},Nt(t,[{key:"xe",get:function(){return this.V9}}]),t}();function RN(t,n){return Yu({},n,Uw(function(t){return{ZJ:t.ZJ,$J:t.$J,tZ:t.tZ,iZ:t.iZ,eZ:t.eZ,sZ:t.sZ,nZ:t.nZ,rZ:t.rZ,hZ:t.hZ,oZ:t.oZ}}(t)))}function CN(t){return t.tZ&&Fo(t.tZ,"%")?Number(t.tZ.replace("%",""))/100:t.tZ&&Fo(t.tZ,"em")?Number(t.tZ.replace("em","")):1}F(),Et(),Bt(),H(),Ut(),F(),Et(),Dt(),Ut(),F(),Et(),Bt(),Ut(),F(),Et(),F(),Et(),Bt();var DN=function(){function t(t,n,i,r){this.W9=void 0,this.z9=void 0,this.Ti=void 0,this.Mi=void 0,this.W9=t,this.z9=n,this.Ti=i,this.Mi=r}var n=t.prototype;return n.G9=function(t){return this.W9t.W9&&this.z9t.z9},n.fO=function(t){return this.W9<=t.W9&&t.H9<=this.H9&&this.z9<=t.z9&&t.q9<=this.q9},n.Ly=function(){return new t(this.W9,this.z9,this.Ti,this.Mi)},n.X9=function(n){return new t(this.W9+n,this.z9+n,b.max(0,this.Ti-2*n),b.max(0,this.Mi-2*n))},n.j9=function(n){var i=b.min(this.W9,n.W9),r=b.max(this.H9,n.H9),e=b.min(this.z9,n.z9);return new t(i,e,r-i,b.max(this.q9,n.q9)-e)},Nt(t,[{key:"H9",get:function(){return this.W9+this.Ti},set:function(t){this.W9=t-this.Ti}},{key:"q9",get:function(){return this.z9+this.Mi},set:function(t){this.z9=t-this.Mi}}]),t}(),PN=function(){function t(t,n,i,r,e){var s=this;this.ctt=Zu(),this.Ett=!0,this.Z9=void 0,this.itt=Yu({},TN),this.xtt=[],this.FO=void 0,this._T=void 0,this.sc=void 0,this.htt=void 0,this.dtt=function(t){return s.tV(t.TO)},this.ltt=function(t){return s.WU(t.TO)},this.ftt=function(){return s.Stt()},this.ptt=function(t){return s.Att(t.TO)},this.mtt=function(t){return s.btt(t.TO)},this.wtt=function(t){return s.Ptt(t.TO)},this.stt=function(t){return s.oe(t.width,t.height)},this.FO=t,this.htt=this.Z9=e,this._T=this.Btt(i),this.sc=r,n.appendChild(this._T)}var n=t.prototype;return n.Q9=function(t){var n=this.K9(t);if(!n)return!1;for(var i,r=Lt(n);!(i=r()).done;){$n(i.value)}return this.Y9(t),!0},n.VY=function(){var t=this;this.ett(),this.FO.L.II.forEach(function(n){return t.tV(n)}),this.Wu.wn(hI.yn,this.stt),this.oe(this.Wu.Eu,this.Wu.Iu)},n.ntt=function(t){this.itt=t,this.Z9=RN(this.itt,this.htt),this.Z9.ZJ&&(this.$W.style.fontFamily=this.Z9.ZJ),this.oe(this.Wu.Eu,this.Wu.Iu),this.ott(!0)},n.att=function(){return this.Z9},n.utt=function(t){return this.ctt.has(t.jI)},n.ett=function(){this.FO.wn(Dw.hI,this.dtt),this.FO.wn(Dw.aI,this.ltt),this.FO.wn(Dw.pa,this.ftt)},n._tt=function(){this.FO.mn(Dw.hI,this.dtt),this.FO.mn(Dw.aI,this.ltt),this.FO.mn(Dw.pa,this.ftt)},n.gtt=function(t){t.wn(Lg.zL,this.ptt),t.wn(Lg.GL,this.mtt),t.wn(Lg.SI,this.wtt)},n.ytt=function(t){t.mn(Lg.zL,this.ptt),t.mn(Lg.GL,this.mtt),t.mn(Lg.SI,this.wtt)},n.tV=function(t){this.gtt(t),t.ro&&this.Att(t)},n.WU=function(t){this.ytt(t),this.btt(t)},n.Stt=function(){this.FO.Xk===Hm.Kn?this.Ttt():this.ktt()},n.Ttt=function(){if(this.Ett){this.Ett=!1;var t=this.Wu.Eu,n=this.Wu.Iu;this.oe(t,n),this.ott(!1)}},n.ktt=function(){this.Ett||(this.Ett=!0,this.ott(!0))},n.Att=function(t){this.Ett||t.ro&&!this.utt(t)&&this.ott(!1)},n.btt=function(t){this.utt(t)&&this.ott(!0)},n.Ptt=function(t){(t.ro||this.utt(t))&&this.ott(!0)},n.ott=function(t){var n=this.xtt,i=this.Ett?[]:this.FO.q.II.slice();this.Itt(i,n,t),this.xtt=i},n.K9=function(t){return this.ctt.get(t.jI)},n.Rtt=function(t,n){this.ctt.set(t.jI,n)},n.Y9=function(t){this.ctt.delete(t.jI)},n.Ctt=function(t){var n=[],i=this.Z9;if(void 0!==i.nZ){var r=t.Ly();r.Mi=i.nZ,n.push(r)}if(void 0!==i.rZ){var e=t.Ly();e.Mi=i.rZ,e.q9=t.q9,n.push(e)}return n},n.Dtt=function(){return this.xtt.slice()},n.kn=function(){var t=this;$n(this.$W),this.ctt.clear(),this._tt(),this.FO.L.II.forEach(function(n){return t.ytt(n)}),this.Wu.mn(hI.yn,this.stt)},Nt(t,[{key:"Ht",get:function(){return this.FO}},{key:"$W",get:function(){return this._T}},{key:"Wu",get:function(){return this.sc}},{key:"J9",get:function(){return this.Z9}},{key:"ttt",get:function(){return this.itt}}]),t}();function NN(t,n,i,r,e){var s=t.Ly(),u=s,o=1,h=!1,c=T(getComputedStyle(n).lineHeight)/4;if(!S(c)&&c>0){for(var a=0;af&&(u=t.Ly(),o=f),t=s.Ly()}r.fO(t)||(u=s.Ly())}n.style.left=(u.W9-r.W9)/r.Ti*100+"%",n.style.top=(u.z9-r.z9)/r.Mi*100+"%"}function BN(t,n){return n.some(function(n){return t.G9(n)})}function xN(t){return new DN(t.left,t.top,t.width,t.height)}var ON=function(t){return t[t.POS_X=0]="POS_X",t[t.NEG_X=1]="NEG_X",t[t.POS_Y=2]="POS_Y",t[t.NEG_Y=3]="NEG_Y",t}({});function MN(t,n,i){switch(n){case 0:t.W9+=i;break;case 1:t.W9-=i;break;case 2:t.z9+=i;break;case 3:t.z9-=i}}function LN(t,n,i,r){switch(i){case 0:return t.H9>n.H9+r;case 1:return t.W9n.q9+r;case 3:return t.z90?t.jE[0]:null;return n&&uw(n)?"data:image/png;base64,"+n.ck:""}(n),e.id=t.id,e.style.height="100%",e.style.maxWidth="100%",function(t,n){var i=t.style;oi(i,"flex"),i.flexDirection=i.webkitFlexDirection="column";var r=n.sP("smpte:backgroundImageVertical"),e="center";if(r)switch(r.toLowerCase()){case"left":e="flex-start";break;case"center":e="center";break;case"right":e="flex-end";break;case"inherit":e="inherit"}i.justifyContent=i.webkitJustifyContent=e;var s=n.sP("smpte:backgroundImageHorizontal"),u="center";if(s)switch(s.toLowerCase()){case"left":u="flex-start";break;case"center":u="center";break;case"right":u="flex-end";break;case"inherit":u="inherit"}i.alignItems=i.webkitAlignItems=u}(t,i),t.appendChild(e)}function rB(t,n,i,r,e,s){if(i)for(var u,o=Lt(i.split(" "));!(u=o()).done;){var h=u.value;if(r[h])for(var c,a=Lt(k.keys(r[h]));!(c=a()).done;){var f=c.value;"style"===f.toLowerCase()?rB(t,n,r[h][f],r,e,s):eB(t,n,f,r[h][f],e,s)}}}function eB(t,n,i,r,e,s){var u=t.style;switch(i){case"backgroundColor":u.backgroundColor=r;break;case"color":u.color=r;break;case"direction":u.direction=r;break;case"display":"none"===r&&(u.display="none");break;case"fontFamily":var o;u.fontFamily=null!=(o=jN.get(r))?o:r;break;case"fontSize":var h=r;if(Fo(h,"px")){var c=Number(h.slice(0,-2));h=c*s/16+"em"}else Fo(h,"c")&&(h=h.replace("c","em"));u.fontSize=h,u.lineHeight&&"inherit"!==u.lineHeight||(u.lineHeight=QN);break;case"fontStyle":u.fontStyle=r;break;case"fontWeight":u.fontWeight=r;break;case"lineHeight":var a=r;if(Fo(a,"px")){var f=Number(a.slice(0,-2));a=f*s+"px"}u.lineHeight=a;break;case"opacity":u.opacity=r;break;case"overflow":u.overflow=r;break;case"padding":u.padding=r;break;case"textAlign":u.textAlign=r;break;case"textDecoration":switch(r){case"lineThrough":u.textDecoration="line-through";break;case"underline":case"overline":u.textDecoration=r;break;case"noUnderline":case"noLineThrough":case"noOverline":u.textDecoration="none"}break;case"unicodeBidi":switch(r){case"bidiOverride":u.unicodeBidi="bidi-override";break;case"normal":case"embed":case"isolate":u.unicodeBidi=r}break;case"visibility":u.visibility=r;break;case"zIndex":u.zIndex=r;break;case"displayAlign":var v;switch(r.toLowerCase()){case"before":v="flex-start";break;case"center":v="center";break;case"after":v="flex-end";break;case"justify":v="space-between";break;default:return}u.justifyContent=u.webkitJustifyContent=v;break;case"extent":var d,l,w=sB(n.toLowerCase())?e:t,g=r.split(" ",2);2===g.length?(d=g[0],l=g[1]):d=l="100%",w&&(w.style.height=l,w.style.width=d);break;case"origin":var _=sB(n.toLowerCase())?e:t,m=r.split(" ",2),y=m[0],p=m[1];_&&(y||p)&&(y&&(_.style.left=y),p&&(_.style.top=p));break;case"showBackground":case"textOutline":break;case"wrapOption":switch(r){case"wrap":u.whiteSpace="normal";break;case"noWrap":u.whiteSpace="nowrap"}break;case"writingMode":var k,b,A,T;switch(r){case"lrtb":case"lr":k="horizontal-tb";break;case"rltb":k="horizontal-tb",b="rtl",T="bidi-override";break;case"tbrl":case"tb":k="vertical-rl",A="upright";break;case"tblr":k="vertical-lr",A="upright";break;case"rl":k="horizontal-tb",b="rtl";break;default:return}u.writingMode=k,u.setProperty("-webkit-writing-mode",k),b&&(u.direction=b),A&&(u.textOrientation=A,u.setProperty("-webkit-text-orientation",A)),T&&(u.unicodeBidi=T);break;case"linePadding":if(Fo(r,"c")){var S=r.replace("c","em");u.paddingLeft=u.paddingRight=S}break;case"multiRowAlign":"auto"===r.toLowerCase()?u.textAlign="":u.textAlign=r}}function sB(t){return"div"===t||"p"===t||"span"===t}function uB(t){var n=t.style;oi(n,"flex"),n.flexDirection=n.webkitFlexDirection="column",n.top="auto",n.left="5%",n.width="90%",n.height="100%",n.maxHeight="100%",n.maxWidth="100%",n.overflow="visible",n.position="absolute",n.fontFamily=qN,n.color=VN.WHITE,n.background=VN.TRANSPARENT,n.textShadow=HN("uniform"),n.textAlign="start",n.writingMode="horizontal-tb",n.setProperty("-webkit-writing-mode","horizontal-tb"),n.padding="0",n.margin="0",n.fontSize="inherit",n.lineHeight="inherit"}function oB(t){var n=t.style;n.fontFamily="inherit",n.color="inherit",n.fontSize="inherit",n.lineHeight="inherit",n.textShadow="inherit"}function hB(t){var n=xN(t.getBoundingClientRect());if("visible"===getComputedStyle(t).overflow&&t.scrollHeight>t.clientHeight)for(var i=t.children,r=0;r":return n.Ny(1),o;case"EOF":return o;default:r=s,i="StartTag"}break;case"StartTag":switch(s){case"\t":case"\f":case" ":i="StartTagAnnotation";break;case"\n":u=s,i="StartTagAnnotation";break;case".":i="StartTagClass";break;case">":return n.Ny(1),{Km:"starttag",JE:r,Utt:[]};case"EOF":return{Km:"starttag",JE:r,Utt:[]};default:r+=s}break;case"StartTagClass":switch(s){case"\t":case"\f":case" ":e.push(u),u="",i="StartTagAnnotation";break;case"\n":e.push(u),u=s,i="StartTagAnnotation";break;case".":e.push(u),u="";break;case">":return n.Ny(1),e.push(u),{Km:"starttag",JE:r,Utt:e};case"EOF":return e.push(u),{Km:"starttag",JE:r,Utt:e};default:u+=s}break;case"StartTagAnnotation":switch(s){case"&":i="CharRefInAnnotation";break;case">":n.Ny(1);var c=u.trim();return{Km:"starttag",JE:r,Utt:e,Vtt:c=c.replace(/\s/," ")};default:u+=s}break;case"CharRefInAnnotation":for(var a="",f=n.ac;">"===t.charAt(f);f++)a+=t.charAt(f);u+=a||"&",i="StartTagAnnotation";break;case"EndTag":switch(s){case">":return n.Ny(1),{Km:"endtag",JE:r};case"EOF":return{Km:"endtag",JE:r};default:r+=s}break;case"TimestampTag":switch(s){case">":return n.Ny(1),{Km:"timestamp",Htt:r};case"EOF":return{Km:"timestamp",Htt:r};default:r+=s}}n.Ny(1)}return o}F(),Et(),Dt(),Ut(),F(),Et();var fB=function(t){return t.Wtt="string",t.qtt="starttag",t.ztt="endtag",t.Gtt="timestamp",t}({});function vB(t,n){void 0===t.textContent?t.innerText=n:t.textContent=n}F(),Et();var dB={$J:VN.WHITE,ZJ:"sans-serif",tZ:"100%",iZ:"rgba(0,0,0,0.8)",eZ:VN.TRANSPARENT,sZ:"none",nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0},lB="theoplayer-webvtt-region-",wB="theoplayer-webvtt-styling-",gB="theoplayer-webvtt-default-style",_B=5.23,mB=function(t){function n(n,i,r,e){var s;return(s=t.call(this,n,i,r,e,dB)||this).jtt=Ju(),s.Xtt=TB(3),function(t){var n,i=function(t){var n=null==t.getRootNode?void 0:t.getRootNode.call(t);if(n&&n.host)return n}(t),r=null!=(n=null!=i?i:t.ownerDocument)?n:v;if(r.getElementById(gB))return;for(var e,s=[],u=Lt(IB);!(e=u()).done;){var o=e.value,h=o[0],c=o[1];s.push("."+wB+h+" { color: "+c+" !important; }"),s.push("."+wB+"bg"+RB+h+" { background-color: "+c+" !important; }"),s.push("video::cue(."+h+") { color: "+c+"; }"),s.push("video::cue(.bg"+RB+h+") { background-color: "+c+"; }")}var a=v.createElement("style");a.id=gB,a.innerHTML=s.join("\n"),i?i.appendChild(a):r.body.appendChild(a)}(i),s}Ct(n,t);var i=n.prototype;return i.Btt=function(t){var n=v.createElement("div");n.className="theoplayer-webvtt-texttrack-"+t,ci(n),n.style.overflow="hidden",n.style.pointerEvents="none";var i=this.J9.ZJ;return i&&(n.style.fontFamily=i),n.style.whiteSpace="pre-line",n},i.VY=function(){this.$W.appendChild(this.Xtt),t.prototype.VY.call(this)},i.oe=function(t,n){var i=this,r=b.min(t/100,n/100),e=CN(this.J9);this.jtt.forEach(function(t){var n=t.DO,s=t.Qtt;i.Ktt(s,r,e,n)}),this.Ktt(this.Xtt,r,e)},i.ntt=function(n){NR(this.$W,n),t.prototype.ntt.call(this,n)},i.Itt=function(t,n,i){for(var r,e,s=this,u=this.$W,o=this.Wu.Iu/100,h=[],c=Lt(t);!(e=c()).done;){var a=e.value;void 0!==a.DO&&(ji(h,a.DO)||h.push(a.DO))}this.jtt.forEach(function(t,n){var r=t.DO,e=t.Qtt;!i&&ji(h,r)||($n(e),s.jtt.delete(n))});for(var f,v=Lt(n);!(f=v()).done;){var d=f.value;!i&&d.ro||this.Q9(d)}var l=[],w=xN(this.Xtt.getBoundingClientRect());(r=l).push.apply(r,[].concat(this.Ctt(w)));for(var g,_=Lt(h);!(g=_()).done;){var m=g.value,y=void 0;this.jtt.has(m.o)?y=this.jtt.get(m.o).Qtt:(y=SB(m,o),u.appendChild(y),this.jtt.set(m.o,{DO:m,Qtt:y})),l.push(xN(y.getBoundingClientRect()))}t.sort(CB);for(var p,k=Lt(t);!(p=k()).done;){var b=p.value,A=this.Ott(b,l,w);void 0!==A&&l.push(A.X9(.1))}},i.Ott=function(t,n,i){var r,e;t.DO?(e=this.jtt.get(t.DO.o).Qtt,"up"===t.DO.JO&&e.children.length>=1&&(e.style.transitionProperty="top",e.style.transitionDuration="0.433s")):e=this.Xtt;var s=null==(r=this.K9(t))?void 0:r[0];if(s||(s=this.Ytt(t),this.Rtt(t,[s])),e.appendChild(s),t.DO||(yB(s,t),t.BO?function(t,n,i,r){var e=EB(t),s=e?i.Mi:i.Ti,u=T(getComputedStyle(n).lineHeight);if(0===u||S(u))return;var o=xN(n.getBoundingClientRect()),h=b.round(Zg(t));"rl"===t.Pt&&(h=-(h+1));var c=u*h;"rl"===t.Pt&&(c=c-o.Ti+u);h<0&&(c+=s,u=-u);e?o.z9+=c:o.W9+=c;var a=o.Ly(),f=!1;for(;!i.fO(o)||BN(o,r);)if(e)if(u<0&&o.z90&&o.q9>i.q9){if(o.z9=a.z9,f)break;u=-u,f=!0}else o.z9+=u;else if(u<0&&o.W90&&o.H9>i.H9){if(o.W9=a.W9,f)break;u=-u,f=!0}else o.W9+=u;e?n.style.top=(o.z9-i.z9)/i.Mi*100+"%":n.style.left=(o.W9-i.W9)/i.Ti*100+"%"}(t,s,i,n):function(t,n,i,r){var e,s=xN(n.getBoundingClientRect());if(0===s.Ti||0===s.Mi)return;EB(t)?"center"===t.RO?s.z9-=s.Mi/2:"end"===t.RO&&(s.z9-=s.Mi):"center"===t.RO?s.W9-=s.Ti/2:"end"===t.RO&&(s.W9-=s.Ti);e=""===t.Pt?[ON.POS_Y,ON.NEG_Y,ON.POS_X,ON.NEG_X]:"lr"===t.Pt?[ON.POS_X,ON.NEG_X,ON.POS_Y,ON.NEG_Y]:[ON.NEG_X,ON.POS_X,ON.POS_Y,ON.NEG_Y];NN(s,n,e,i,r)}(t,s,i,n)),!t.DO)return xN(s.getBoundingClientRect())},i.Ytt=function(t){for(var n=new Tc,i=t.U,r=this.Jtt(t),e={Ztt:void 0,xe:r},s=e,u="",o="",h=[e],c=[],a=[];n.ac0?a[a.length-1]:"")):"rt"===A&&"ruby"===b?(h.pop(),h.pop(),s=h[h.length-1]):"lang"===b&&(c.pop(),u=c.length>0?c[c.length-1]:"")}else if(f.Km===fB.Gtt){var T=f.Htt,S=new Tc;try{W_(T,S)}catch(t){ze("ERROR collecting timestamp",t)}}}return r},i.$tt=function(t,n){var i=this.J9,r=this.ttt;i.iZ&&(t.style.background=i.iZ);var e=r.$J||n||i.$J;e&&(t.style.color=e)},i.Ktt=function(t,n,i,r){if(r){var e=kB(r,n);t.style.height=e*i+"px",t.style.left=bB(r)+"%",t.style.top=AB(r,n)+"px"}t.style.fontSize=_B*n*i+"px"},i.Jtt=function(t){var n=v.createElement("div");n.style.position="absolute",n.style.margin="0",n.style.padding="0",n.style.unicodeBidi="plaintext",n.style.wordWrap="break-word",n.style.overflowWrap="break-word",n.style.width="auto",n.style.textAlign=t.xO,function(t,n){"rl"===n.Pt?t.style.writingMode="vertical-rl":"lr"===n.Pt?t.style.writingMode="vertical-lr":t.style.writingMode="horizontal-tb"}(n,t),function(t,n){var i=n_(n);EB(n)?(t.style.width=i+"%",t.style.height="auto"):(t.style.height=i+"%",t.style.width="auto")}(n,t),yB(n,t);var i=this.J9.eZ;i&&(n.style.background=i);var r=this.J9.$J;return r&&(n.style.color=r),n.style.textShadow=HN(this.J9.sZ),n},n}(PN);function yB(t,n){var i,r,e=t_(n),s=$g(n),u=n_(n);if(EB(n)){switch(e){case"line-left":i=s;break;case"center":i=s-u/2;break;case"line-right":i=s-u}r=n.BO?0:Zg(n)}else{switch(e){case"line-left":r=s;break;case"center":r=s-u/2;break;case"line-right":r=s-u}i=n.BO?0:Zg(n)}t.style.left=i+"%",t.style.top=r+"%"}function pB(t,n){for(var i,r=Lt(n);!(i=r()).done;){var e=i.value;if(e.Ztt){for(var s,u=Lt(e.Ztt.Utt);!(s=u()).done;){var o=s.value;si(t,wB+o)}"v"===e.Ztt.JE.toLowerCase()&&e.Ztt.Vtt&&si(t,"theoplayer-webvtt-voice-"+e.Ztt.Vtt)}}}function kB(t,n){return t.QO*(_B*n)*1.14}function bB(t){return t.ZO-t.KO*t.Ti/100}function AB(t,n){var i=t.$O,r=t.YO*kB(t,n)/100;return b.max(0,i-r)}function TB(t){var n=v.createElement("div");return n.className=lB+"default",ci(n),n.style.wordWrap="break-word",n.style.writingMode="horizontal-tb",n.style.pointerEvents="none",n.style.width="auto",n.style.height="auto",n.style.maxHeight="100%",n.style.minHeight="0px",n.style.padding="0",n.style.boxSizing="border-box",n.style.fontSize=_B*t+"px",n.style.lineHeight="1.14em",n}function SB(t,n){var i=TB(n);i.className=lB+t.o;var r=t.Ti,e=kB(t,n);return i.style.width=r+"%",i.style.height=e+"px",i.style.left=bB(t)+"%",i.style.right="",i.style.top=AB(t,n)+"px",i.style.bottom="",i.style.boxSizing="border-box",i}function EB(t){return""===t.Pt}var IB=[["white","#fff"],["lime","#0f0"],["cyan","#0ff"],["red","#f00"],["yellow","#ff0"],["magenta","#f0f"],["blue","#00f"],["black","#000"]],RB=String.fromCharCode(95);function CB(t,n){var i=Zg(t),r=Zg(n),e=DB(i,t.BO),s=DB(r,n.BO);return e&&s?i-r||PD(n,t)||n.jI-t.jI:PD(t,n)||t.jI-n.jI}function DB(t,n){return n?t<0?t>-8:t>8:t>50}F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt(),F(),Et();var PB=function(t){return t.FONT_REGULAR="regular",t.FONT_UNDERLINE="underline",t.FONT_ITALICS="italics",t.FONT_UNDERLINE_ITALICS="underline-italics",t}({}),NB={$J:VN.WHITE,ZJ:FN.nl,tZ:"100%",iZ:VN.BLACK,eZ:"transparent",sZ:"none",tit:"regular",nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0},BB=[{iit:VN.WHITE,tit:"regular",eit:0},{iit:VN.WHITE,tit:"underline",eit:0},{iit:VN.GREEN,tit:"regular",eit:0},{iit:VN.GREEN,tit:"underline",eit:0},{iit:VN.BLUE,tit:"regular",eit:0},{iit:VN.BLUE,tit:"underline",eit:0},{iit:VN.CYAN,tit:"regular",eit:0},{iit:VN.CYAN,tit:"underline",eit:0},{iit:VN.RED,tit:"regular",eit:0},{iit:VN.RED,tit:"underline",eit:0},{iit:VN.YELLOW,tit:"regular",eit:0},{iit:VN.YELLOW,tit:"underline",eit:0},{iit:VN.MAGENTA,tit:"regular",eit:0},{iit:VN.MAGENTA,tit:"underline",eit:0},{iit:VN.WHITE,tit:"italics",eit:0},{iit:VN.WHITE,tit:"underline-italics",eit:0},{iit:VN.WHITE,tit:"regular",eit:0},{iit:VN.WHITE,tit:"underline",eit:0},{iit:VN.WHITE,tit:"regular",eit:4},{iit:VN.WHITE,tit:"underline",eit:4},{iit:VN.WHITE,tit:"regular",eit:8},{iit:VN.WHITE,tit:"underline",eit:8},{iit:VN.WHITE,tit:"regular",eit:12},{iit:VN.WHITE,tit:"underline",eit:12},{iit:VN.WHITE,tit:"regular",eit:16},{iit:VN.WHITE,tit:"underline",eit:16},{iit:VN.WHITE,tit:"regular",eit:20},{iit:VN.WHITE,tit:"underline",eit:20},{iit:VN.WHITE,tit:"regular",eit:24},{iit:VN.WHITE,tit:"underline",eit:24},{iit:VN.WHITE,tit:"regular",eit:28},{iit:VN.WHITE,tit:"underline",eit:28}],xB=[11,-1,1,2,3,4,12,13,14,15,5,6,7,8,9,10];function OB(t,n){return __(t.sit,n.sit)||Bi(t.VN,n.VN)}F(),Et(),Ut();var MB=32,LB=/CC([1-4])=(.*)/;function UB(t){if(!t)return[];var n=[],i=t.trim().split(";");if(i.every(function(t){return t.match(LB)}))for(var r,e=Lt(i);!(r=e()).done;){var s=r.value.match(LB),u=s[1],o=s[2];n.push({nit:Number(u),rit:o})}else for(var h=0;h=0;i-=1){var r=n[i];r.Ht===t&&(r.kn(),qi(n,i))}},n.qit=function(n){(function(t){return t===Ym.OU||t===Ym.FU})(n.Lt)&&t.Fit(n)&&(n.Ax===Cg.ERROR?this.Wit(n):this.Hit(n))},n.hr=function(){for(var t,n=Lt(this.Oit);!(t=n()).done;){var i=t.value;i.Ht.mn(Dw.wI,this.Git),i.Ht.mn(Dw.AI,this.Git),i.kn()}Yi(this.Oit)},n.kn=function(){this.hr();for(var t,n=Lt(this.Oit);!(t=n()).done;){t.value.kn()}this.Gl.mn(Sw.eI,this.Xit),this.Gl.mn(Sw.nI,this.jit),this.Gl.mn(Dw.pa,this.Git),this.zit.mn(KT.pa,this.Qit),this.ea.mn([DT.zL,DT.GL],this.Qit),this.Dz.mn("mI",this.Kit)},t.Fit=function(t){switch(t.Km){case Dg.TTML:case Dg.SRT:case Dg.WEBVTT:case Dg.CEA608:return!0}return!1},Nt(t,[{key:"n6",get:function(){return this.zit.ds||this.ea.XL}}]),t}();F(),Et(),Wt(),Bt(),Dt(),Qt();var zB=function(t){function n(n){var i;return(i=t.call(this)||this).Yit=void 0,i.Jit=!1,i.Zit=function(){i.Jit=!0,i.So(new PT)},i.$it=function(){i.Jit=!1,i.So(new NT)},i.Yit=n,i.Yit.addEventListener("enterpictureinpicture",i.Zit),i.Yit.addEventListener("leavepictureinpicture",i.$it),i}Ct(n,t);var i=n.prototype;return i.yo=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return this.jL?this.XL?[3,3]:(t=this.ww([DT.zL,DT.ma]),[4,this.Yit.requestPictureInPicture()]):[3,4];case 1:return n.sent(),[4,t];case 2:n.sent(),this.Jit||this.So(new $T),n.label=3;case 3:return[3,5];case 4:this.So(new $T),n.label=5;case 5:return[2]}})}).call(this)},i.jo=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return this.jL?this.Jit?(t=this.ww([DT.GL,DT.ma]),[4,this.Yit.ownerDocument.exitPictureInPicture()]):[3,3]:[3,4];case 1:return n.sent(),[4,t];case 2:n.sent(),this.Jit&&this.So(new $T),n.label=3;case 3:return[3,5];case 4:this.So(new $T),n.label=5;case 5:return[2]}})}).call(this)},i.kn=function(){this.Vo(),this.Yit.removeEventListener("enterpictureinpicture",this.Zit),this.Yit.removeEventListener("leavepictureinpicture",this.$it)},Nt(n,[{key:"jL",get:function(){var t;return null!=(t=this.Yit.ownerDocument.pictureInPictureEnabled)&&t}},{key:"XL",get:function(){return this.Jit}}]),n}(th);function XB(t){var n=new EI,i=function(t){var n=[];return TI.la(t)&&n.push(new TI(t)),SI.la(t)&&n.push(new SI(t)),n}(t);if(i.length>0){for(var r,e=Lt(i);!(r=e()).done;){var s=r.value;n.AK(s)}n.yK(i[0])}return n}var qB=function(t){function n(n,i,r,e,s){var u;return(u=t.call(this,n,i,r,e,s)||this).eet=void 0,u.net=void 0,u.tet=void 0,u.iet=void 0,u.tet=XB(n),u.iet=new zB(n),u.eet=new IN,u.net=new WB(u.eet.xe,u.Wu,u.nt,u.Ql,u.Ma,u.mq),u}Ct(n,t);var i=n.prototype;return i.Wx=function(){return this._T},i.zg=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.iet.kn(),this.tet.kn(),this.eet.kn(),this.net.kn(),[4,t.prototype.zg.call(n)];case 1:return i.sent(),[2]}})}).call(this)},i.we=function(){t.prototype.we.call(this),this.eet.we()},i.be=function(){t.prototype.be.call(this),this.eet.be()},i.B9=function(n){t.prototype.B9.call(this,n),this.eet.B9(n)},Nt(n,[{key:"$W",get:function(){return this._T}},{key:"Rx",get:function(){return this._T.videoHeight}},{key:"Bx",get:function(){return this._T.videoWidth}},{key:"Ma",get:function(){return this.tet}},{key:"mq",get:function(){return this.iet}}]),n}(pN);F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et();F(),Et(),Wt(),Qt(),F(),Et();var GB=!1,jB=function(t){return t.ret="HELLO",t.het="HI_THERE",t.oet="INITIALIZE",t.aet="APPEND_INIT",t.uet="APPEND_DATA",t.cet="ACK",t.det="REMOVE",t.let="DESTROY_SESSION",t}({}),QB=function(){function t(){this.im=void 0,this.mT=void 0,this.ta=new yd}var n=t.prototype;return n.fet=function(t){var n=this;return this.ta.Zo(function(t){return Vt(function(){var n,i,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return dr(t),n=new MessageChannel,i=n.port1,r=n.port2,l.serviceWorker.controller?[3,2]:[4,iw(l.serviceWorker,"install",t)];case 1:h.sent(),h.label=2;case 2:return"activated"===l.serviceWorker.controller.state?[3,4]:[4,iw(l.serviceWorker.controller,"activate",t)];case 3:h.sent(),h.label=4;case 4:e={kind:"HELLO",port:r},l.serviceWorker.controller.postMessage(e,[r]),i.start(),this.im=i,h.label=5;case 5:return h.trys.push([5,7,,8]),[4,iw(i,"message",t)];case 6:if(s=h.sent(),"HI_THERE"!==(u=s.data).kind)throw new y("Could not set up message channel");return this.mT=u.sessionId,[3,8];case 7:throw vr(o=h.sent())&&this.vet(),o;case 8:return[2]}})}).call(n)},t)},n._et=function(t,n){var i=this;return this.im,this.ta.Zo(function(){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:if(!this.im)throw new y("MessageSession not set up yet or already closed.");return n||(n=[]),this.im.postMessage(t,n),[4,iw(this.im,"message")];case 1:return[2,i.sent().data]}})}).call(i)})},n.pet=function(){var t=this;return this.ta.Zo(function(){return t.vet()})},n.vet=function(){if(l.serviceWorker.controller&&"activated"===l.serviceWorker.controller.state&&this.im){var t={kind:"DESTROY_SESSION"};GB,this.im.postMessage(t),this.im.close(),this.im=void 0}},t}();F(),Et(),Bt();var YB=function(){function t(){this.wet=1/0}var n=t.prototype;return n.yet=function(t,n){var i=t-n;this.wet=i>this.met?this.wet:i},n.Aet=function(t){this.wet=t},Nt(t,[{key:"met",get:function(){return this.wet}}]),t}();F(),Et(),Wt(),Bt(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et();var KB=function(t){return t.Dk="audio",t.Bk="video",t.VU="metadata",t}({}),JB=function(t){function n(n,i){var r;return(r=t.call(this)||this).SQ=void 0,r.Iet=void 0,r.bet=void 0,r.Tet=void 0,r.ta=void 0,r.Eet=void 0,r.ket=void 0,r.SQ=n,r.Iet=i,r.bet=void 0,r.Tet=void 0,r.ta=new yd,r.Eet=!1,r.ket=!1,r}Ct(n,t);var i=n.prototype;return i.F3=function(t,n){},i.U3=function(t,n){},i.WZ=function(){return this.ket},i.V3=function(){return Vt(function(){return zt(this,function(t){return[2]})})()},i.r3=function(t,n){return Vt(function(){return zt(this,function(t){return[2]})})()},i.H2=function(t,n,i){return Vt(function(){var r,e,s;return zt(this,function(u){if(r=this,t.Km!==FR.vZ)throw new y("Streaming or opaque segments are not supported yet.");return e=t.ck,s=function(){return Vt(function(){var t,i,r;return zt(this,function(s){switch(s.label){case 0:return t=e.buffer,i={kind:jB.uet,mediaType:ZB(this.SQ),segment:e,startPts:n.xet,totalDuration:n.ct},[4,this.Iet._et(i,[t])];case 1:return s.sent(),void 0===this.bet&&(r=n.xet+n.bU,this.bet=r,this.Tet=r),this.Tet=this.Tet+n.ct,this.So(new rh(LR.lZ)),[2]}})}).call(r)},[2,this.ta.Zo(function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:dr(t),n.label=1;case 1:return n.trys.push([1,,3,4]),this.Eet=!0,[4,s()];case 2:return n.sent(),[3,4];case 3:return this.Eet=!1,[7];case 4:return[2]}})}).call(r)},i)]})}).call(this)},i.z2=function(t,n,i){return Vt(function(){var n,r,e;return zt(this,function(s){if(n=this,t.Km!==FR.vZ)throw new y("Streaming or opaque initialization segments are not supported yet.");return r=t.ck,e=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return t={kind:jB.aet,mediaType:ZB(this.SQ),segment:r},[4,this.Iet._et(t,[])];case 1:return n.sent(),[2]}})}).call(n)},[2,this.ta.Zo(function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:dr(t),n.label=1;case 1:return n.trys.push([1,,3,4]),this.Eet=!0,[4,e()];case 2:return n.sent(),[3,4];case 3:return this.Eet=!1,[7];case 4:return[2]}})}).call(n)},i)]})}).call(this)},i.C3=function(){this.ket=!0},i.A3=function(){this.ket=!1},i._S=function(t,n,i){return Vt(function(){var t,r;return zt(this,function(e){return t=this,r=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t={kind:jB.det,mediaType:ZB(this.SQ),endTime:n},[4,this.Iet._et(t)];case 1:return i.sent(),this.bet=void 0,this.Tet=void 0,this.So(new rh(LR.lZ)),[2]}})}).call(t)},[2,this.ta.Zo(function(n){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:dr(n),t.label=1;case 1:return t.trys.push([1,,3,4]),this.Eet=!0,[4,r()];case 2:return t.sent(),[3,4];case 3:return this.Eet=!1,[7];case 4:return[2]}})}).call(t)},i)]})}).call(this)},i.TZ=function(t){return this.SQ===t.qT},i.EZ=function(t){return this.SQ=t.qT,ut.resolve()},i.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),[4,this.ta.kn()];case 1:return t.sent(),[2]}})}).call(this)},Nt(n,[{key:"IP",get:function(){return void 0===this.bet||void 0===this.Tet?TA.iL():new TA([this.bet,this.Tet])}},{key:"Cd",get:function(){return{qT:this.SQ}}},{key:"B3",get:function(){return Fv(this.SQ)?ig.Dk:Vv(this.SQ)?ig.Bk:ig.pk}},{key:"oQ",get:function(){return this.SQ}},{key:"M3",get:function(){return TA.iL()}},{key:"MY",get:function(){return 30},set:function(t){}},{key:"UY",get:function(){return 30},set:function(t){}},{key:"ga",get:function(){return this.Eet}},{key:"Pet",get:function(){return this.bet}},{key:"PO",get:function(){return this.Tet}}]),n}(th);function ZB(t){return t.match(/video/)?KB.Bk:KB.Dk}var $B=function(){function t(t,n,i,r){this.YS=void 0,this.hw=void 0,this._T=void 0,this.P4=void 0,this.x4=void 0,this.TS=void 0,this.YS=t,this.x4=Ui(n,function(t){return Boolean(t.oQ.match(/video/))}),this.P4=Ui(n,function(t){return Boolean(t.oQ.match(/audio/))}),this.hw=i,this._T=r,this.Cet()}var n=t.prototype;return n.Cet=function(){},n.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,ut.all([this.P4,this.x4].filter(Un).map(function(t){return t.zg()}))];case 1:return t.sent(),[2]}})}).call(this)},n.C4=function(t){},n.M4=function(t,n,i,r){},n.C3=function(){var t,n;null==(t=this.P4)||t.C3(),null==(n=this.x4)||n.C3()},n.A3=function(){var t,n;null==(t=this.P4)||t.A3(),null==(n=this.x4)||n.A3()},n.TZ=function(t){return!!wN(this,t)},n.EZ=function(t){return this.YS=t,ut.resolve()},n.xZ=function(t){},n.bZ=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return[4,this.hw.nw(t.Ym,n)];case 1:return[4,r.sent().IS()];case 2:return i=r.sent(),[4,this.SZ(i)];case 3:return r.sent(),[2,i]}})}).call(this)},n.SZ=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:if(t&&!this._T.src)throw new eg(cd.CONTENT_PROTECTION_ERROR,"Attempted to attach MediaKeys to a sourceless MediaElement");if(!t&&this._T.src)throw new eg(cd.CONTENT_PROTECTION_ERROR,"Attempted to remove MediaKeys from a non-empty MediaElement");return(n=this.TS)?[4,n.PS(this._T)]:[3,2];case 1:i.sent(),this.TS=void 0,i.label=2;case 2:return t?[4,t._n(this._T)]:[3,4];case 3:i.sent(),this.TS=t,i.label=4;case 4:return[2]}})}).call(this)},t.Ret=function(n,i,r,e){for(var s=[],u=0;u0){var i,r,e=(t=n[0]).width,s=this.Yit.videoWidth/this.Yit.videoHeight,u=t.height;e/u>s?(i=u*s,r=u):(r=e/s,i=e),this.Yit.style.width=i+"px",this.Yit.style.height=r+"px",this.Yit.style.marginLeft=(e-i)/2+"px",this.Yit.style.marginTop=(u-r)/2+"px",this.Yit.style.backgroundColor="black"}},i.sst=function(){this.Yit.style.width="100%",this.Yit.style.height="100%",this.Yit.style.marginLeft="",this.Yit.style.marginTop="",this.Yit.style.backgroundColor=""},i.gq=function(t,n,i,r,e){},i.tI=function(t,n,i,r,e,s,u,o,h){var c=new GD(t,n,i,r,e,s,u,h,o);return this.Gl.tt(c),this.N7.tt(c),c},i.wq=function(t){throw y("Not supported.")},i.QZ=function(t){},i.ZP=function(){return wR(this.Yit)},i.be=function(){this.Yit.style.display="block",this.eet.be()},i.we=function(){this.Yit.style.display="none",this.eet.we()},i.x9=function(){},i.Un=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:if(t.Km===Sy.mV)throw new y("Not yet implemented");return[4,this.Iet.fet()];case 1:return r.sent(),n=Ui(t.aq,function(t){return t.kS.Km===Eo.jm}),i={kind:jB.oet,mediaBufferConfigs:t.L4.map(function(t){return t.qT}),fairPlaySdkUri:null==n?void 0:n.HH},[4,this.Iet._et(i)];case 2:return r.sent(),this.iq=$B.Ret(t,this.Iet,this.hw,this.Yit),this.PZ.Un(this.iq,t),this.Yit.setAttribute("x-webkit-airplay","deny"),this.Yit.setAttribute("x-webkit-wirelessvideoplaybackdisabled",""),this.Yit.disableRemotePlayback=!0,this.Yit.preload="none",this.Yit.src="https://theo.proxy/"+this.Iet.mT+"/master.m3u8",[2,this.iq]}})}).call(this)},i.I9=function(){},i.iV=function(t){this.Gl.it(t),this.N7.it(t)},i.Aq=function(){for(var t,n=Lt(this.Gl.II.slice());!(t=n()).done;){t.value.kn()}this.Gl.hr()},i.KW=function(t){},i.vq=function(){return!1},i.B9=function(t){t.appendChild(this.Yit),this.eet.B9(t)},i.Wx=function(){return this.Yit},i.Yx=function(){},Nt(n,[{key:"$W",get:function(){return this.Yit}},{key:"n5",get:function(){return!1}},{key:"MP",get:function(){return this.Yit.currentTime+this.jet.met}},{key:"hx",get:function(){return this.Yit.paused}},{key:"Mx",get:function(){return this.Yit.volume},set:function(t){this.Yit.volume=t}},{key:"ux",get:function(){return this.Yit.playbackRate},set:function(t){this.Yit.playbackRate=t}},{key:"Qet",get:function(){return this.Yit.defaultPlaybackRate}},{key:"IP",get:function(){var t,n;return null!=(n=null==(t=this.iq)?void 0:t.IP)?n:TA.iL()}},{key:"Ket",get:function(){return TA.jn(this.Yit.buffered)}},{key:"_x",get:function(){var t=this.Yet;return this.Ho.OM(t.Ny(this.jet.met))}},{key:"Yet",get:function(){return TA.jn(this.Yit.played)}},{key:"kx",get:function(){return this.Sz}},{key:"Y4",get:function(){return!1}},{key:"a5",get:function(){return!1}},{key:"ct",get:function(){return this.Yit.duration}},{key:"$P",get:function(){return this.Yit.muted},set:function(t){this.Yit.muted=t}},{key:"Pit",get:function(){return this.Yit.style}},{key:"CL",get:function(){return Yu({},xR,{RL:!0})}},{key:"Ax",get:function(){return this.Q8.Ax}},{key:"Rx",get:function(){return this.Yit.videoHeight}},{key:"Bx",get:function(){return this.Yit.videoWidth}},{key:"UP",get:function(){return this.Yit.ended}},{key:"Mi",get:function(){return this.Yit.offsetHeight*Vn.Zs.fp}},{key:"Ti",get:function(){return this.Yit.offsetWidth*Vn.Zs.fp}},{key:"KP",get:function(){return!1}},{key:"R9",get:function(){return this.C9}},{key:"CP",get:function(){}},{key:"Wu",get:function(){return this.nst}},{key:"lt",get:function(){}},{key:"Ma",get:function(){return this.tet}},{key:"mq",get:function(){return this.ea}},{key:"Sx",get:function(){return this.iq?this.iq.Sx:TA.iL()}},{key:"nq",get:function(){}},{key:"nt",get:function(){return this.Gl}},{key:"Ql",get:function(){return this.Dz}},{key:"Vx",get:function(){return!1},set:function(t){}},{key:"i7",get:function(){return"block"===this.Yit.style.display}},{key:"Eq",get:function(){return this.PZ.Eq},set:function(t){this.PZ.Eq=t}},{key:"N9",get:function(){},set:function(t){}},{key:"p8",get:function(){}}]),n}(th),nx=[ig.Dk,ig.Bk],ix=function(){function t(t,n,i,r,e,s){void 0===r&&(r=2),void 0===e&&(e=nx),void 0===s&&(s=Cd()),this.fst=void 0,this.rst=void 0,this.hw=void 0,this.hst=void 0,this.sc=void 0,this.Dz=void 0,this.VJ=void 0,this.ast=void 0,this.fst=r,this.rst=[].concat(e),this.hw=s,this.sc=t,this.Dz=n,this.VJ=i,this.hst=Ju(),this.lst()}var n=t.prototype;return n.ust=function(t){for(var n,i=Lt(this.Bz);!(n=i()).done;){n.value.B9(t)}},n.Gq=function(t){var n=this.hst.get(t);if(n){var i=Ui(n,function(t){return t.cst});return i?(i.cst=!1,i.ost):void 0}},n.dst=function(t){if(!this.ast){var n,i=null==(n=this.hst.get(ig.Bk))?void 0:n[0].ost.$W;if(!i)throw new y("Error creating iOS Safari MediaController");this.ast=new tx(i,this.hw,this.sc,this.Dz),i.parentElement&&this.ast.B9(i.parentElement)}return this.ast},n.Pq=function(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:return n=t.$W,i=n.tagName.toLowerCase(),[4,t.hr()];case 1:return e.sent(),Nr(n),(r=Ui(this.hst.get(i)||[],function(n){return t===n.ost}))&&(r.cst=!0),[2]}})}).call(this)},n.xz=function(){for(var t,n=Lt(this.Bz);!(t=n()).done;){t.value.D9()}},n.kn=function(){for(var t,n=Lt(this.Bz);!(t=n()).done;){var i=t.value,r=i.$W;i.zg(),Pr(r),$n(r)}this.hst.clear(),this.ast=void 0},n.lst=function(){for(var t,n=Lt(this.rst);!(t=n()).done;){var i=t.value,r=[];this.hst.set(i,r);for(var e=0;e0)for(;i1||t<=0)throw new RangeError("The step must be a number greater than 0 and smaller than or equal to 1");var i;return i="function"==typeof f.IntersectionObserver?new hx(this.bo,t,this.Rst(n)):new ax(this.bo,t,this.Rst(n)),this.Cst.push(i),i},n.Uo=function(t){t.Xx(),Xi(this.Cst,t)},n.Ist=function(t){for(var n,i=Lt(this.Cst);!(n=i()).done;){var r=n.value;if(r.Ca===t)return r}},n.kn=function(){for(var t,n=Lt(this.Cst);!(t=n()).done;){t.value.Xx()}Yi(this.Cst)},Nt(t,[{key:"Est",get:function(){return this.Pst}},{key:"Lo",get:function(){return this.xst},set:function(t){if(S(t)||t<0||t>1)throw new RangeError("The threshold must be a value between 0 and 1");this.xst=t}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{get ratio(){return t.Est},get visible(){return t.Est>t.Lo},get visibleThreshold(){return t.Lo},set visibleThreshold(n){n=Ww(n),t.Lo=n},addObserver:function(n,i){return n=Ww(n),t.Do(n,i).Ca},removeObserver:function(n){var i=t.Ist(n);i&&t.Uo(i)}}}(this)),this.hu}}]),t}();F(),Et(),Dt();var vx=function(t){function n(){return t.call(this,eh.Iw)||this}return Ct(n,t),n}(rh),dx=function(t){function n(n,i,r,e){var s;(s=t.call(this)||this).Qst=void 0,s.Cd=void 0,s.Pa=void 0,s.jst=void 0,s.SP=void 0,s.eJ=void 0,s.gJ=void 0,s.Gst=void 0,s.zst=void 0,s.Rz=void 0,s.Cz=void 0,s.Wst=void 0,s.qJ=void 0,s.Ost=void 0,s.Xst=void 0,s.Dz=void 0,s.Bst=!1,s.ko=!1,s.gO=void 0,s.gz=void 0,s.Kst=!1,s.Iz=void 0,s.Mst=void 0,s.Ust=void 0,s.Lst=void 0,s.Jc=void 0,s.Io=void 0,s.Fst=void 0,s.Na=void 0,s.qst=function(t){if(!s.Kst){s.Kst=!0;var n=s.Qst,i=hg(t);s.Pa.BI=new eS(s.xe,i,t),kr(n.kn())}},s.Yst=function(t){t.type!==eh.Xw&&t.type!==eh.Gw&&s.So(t)};var u=Ww(i.uid);S(u)?s.gO=yg++:s.gO=u,s.Cd=i;var o=Vn.SP,h=new SR;s.jst=new tI("10.0.0",o,h),s.Rz=new sR,s.Cz=new Cb;var c=new ex(o,s.Rz);s.SP=new GI(c,i.allowMixedContent),s.qJ=null!=r?r:new RE(i.isEmbeddable,"10.0.0",bE()),s.Wst=new TR(o,s.qJ,s.jst,h,i,bE()),s.Wst.FJ().catch(s.qst),s.Ost=new pI(n),s.Ost.wn(hI.yn,s.Rs),s.Dz=new PR;var a=new(null!=e?e:ix)(s.Ost,s.Dz,i);a.ust(n),s.eJ=new aR,s.gJ=new vR;var f=new rS(n,i,s.SP,s.Rz,s.Cz,a,s.Dz);s.Rz.VY(f);var v=f;return v=new fR(v,s.Vst),v=new dR(v,s._J),s.Qst=v,s.Pa=new VT(s.Qst),s.Pa.lw(s.Yst),s.Fst=new lR(s.Pa),s.Ust=new YI(s.Pa,s.SP,s.Rz),s.Gst=new oI(s),s.Xst=new II(s.Pa,i.allowNativeFullscreen),s.zst=new BI(s.Xst,s.Pa.Aa()),s.Ost._n(),s.Io=new fx(n),s.Iz=new ix(s.Ost,s.Dz,i,1,[ig.Bk]),s.Mst=new OI(s.Iz),s.Lst=new mR,s}Ct(n,t);var i=n.prototype;return i.RP=function(){return this.Pa.IP},i.LP=function(){return this.Pa.MP},i.OP=function(t,n){this.Pa.OP(t,n)},i.Hst=function(){return this.LP()},i.Nd=function(){return this.Pa.ct},i.HP=function(){return this.Pa.lt},i.qP=function(){return this.Pa.WP},i.ix=function(t){this.Pa.$P=t,t||this.hx||this.qx()},i.lx=function(){return this.Pa.ux},i.vx=function(t){this.Pa.ux=t},i.gx=function(){return this.Pa._x},i.Tx=function(){return this.Pa.Sx},i.Ox=function(t){this.Pa.Mx=t},i.Ea=function(){ST(this,_S,this)},i.Gx=function(){this.Pa.Gx()},i.zx=function(){this.Pa.zx()},i.nu=function(){return this.gz},i.Ta=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return this.gz=t,t?(this.Wst.xj(t).catch(this.qst),i=function(t){t.sources;var n=t.sources.filter(function(t){return Fn(t.integration)});return t.sources=n,t}(t),[4,this.Pa.Ta(i,n)]):[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})}).call(this)},i.Px=function(t,n,i){return this.Pa.Px(t,n,i)},i.xx=function(){return this.Pa.xx()},i.qx=function(){if(!this.ko){this.Pa.qx(),this.Mst.qx();for(var t=this.xe.getElementsByTagName("video"),n=0;n0]}})}).call(this)},i.Drt=function(n,i,r){return t.prototype.H2.call(this,n,i,r)},i.Brt=function(n,i,r){return t.prototype._S.call(this,n,i,r)},Nt(n,[{key:"ost",get:function(){return this.TL},set:function(t){this.TL=t}}]),n}(_O),yO=function(t){function n(n){var i;return(i=t.call(this,n)||this).TL=void 0,i.grt(n),i}return Ct(n,t),n.prototype.mrt=function(t){var n=new mO(t);return n.ost=this.TL,n},Nt(n,[{key:"ost",get:function(){return this.TL},set:function(t){this.TL=t,this.P4&&(this.P4.ost=t),this.x4&&(this.x4.ost=t)}}]),n}(wO);F(),Et(),Bt(),Dt();var pO=function(t){function n(){return t.apply(this,arguments)||this}return Ct(n,t),Nt(n,[{key:"mx",get:function(){return this.iq.mx},set:function(t){this.iq.mx=t}}]),n}(lO);function kO(t){var n=function(t){function n(){return t.apply(this,arguments)||this}return Ct(n,t),n.prototype.Wx=function(){return this.TL.Wx()},Nt(n,[{key:"$W",get:function(){return this.TL.$W}},{key:"Bx",get:function(){return this.TL.Bx}},{key:"Rx",get:function(){return this.TL.Rx}}]),n}(t);return n}F(),Et(),Bt(),Dt(),F(),Et(),Bt(),Dt(),F(),Et(),Wt(),Bt(),Dt(),Qt();var bO=function(t){function n(n){var i;return(i=t.call(this)||this).TL=void 0,i.iq=void 0,i.Vrt=new Zb,i.jrt=function(t){return i.Zx(t)},i.TL=n,i.Vrt.BI=n.nt,i.TL.wn(BR,i.jrt),i}Ct(n,t);var i=n.prototype;return i.RP=function(){return this.TL.IP},i.DP=function(){return this.TL.CP},i.LP=function(){return this.TL.MP},i.Nd=function(){return this.TL.ct},i.Mrt=function(){return this.TL.nq},i.Lrt=function(){return this.TL.UP},i.Hx=function(){return this.TL.Ma},i.Aa=function(){return this.TL.mq},i.Ort=function(){return this.TL.hx},i.gx=function(){return this.TL._x},i.bx=function(){return this.TL.Ax},i.Tx=function(){return this.TL.Sx},i.Ex=function(){return this.TL.kx},i.Frt=function(){return this.TL.Y4},i.Urt=function(){return this.TL.a5},i.Ix=function(){return this.Vrt},i.att=function(){return this.TL.Ql},i.Hrt=function(){return this.TL.Eq},i.Wrt=function(t){this.TL.Eq=t},i.qrt=function(t){this.TL.N9=t},i.zrt=function(){return this.TL.p8},i.ZP=function(){return this.TL.ZP()},i.Gx=function(){return this.TL.Gx()},i.zx=function(){this.TL.zx()},i.My=function(t,n,i){this.TL.My(t,n,i)},i.KW=function(t){this.TL.KW(t)},i.be=function(){this.TL.be()},i.we=function(){this.TL.we()},i.tI=function(t,n,i,r,e,s,u,o){return this.TL.tI(t,n,i,r,e,s,u,o)},i.wq=function(t){return this.TL.wq(t)},i.vq=function(){return this.TL.vq()},i.gq=function(t,n,i,r,e){return this.TL.gq(t,n,i,r,e)},i.iV=function(t){this.TL.iV(t)},i.Aq=function(){this.TL.Aq()},i.QZ=function(t){return this.TL.QZ(t)},i.Un=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:return[4,this.TL.Un(t)];case 1:return n=r.sent(),i=t.Km===Sy.mV?this.Grt(n):this.Xrt(n),this.iq=i,[2,i]}})}).call(this)},i.hr=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.iq?[4,this.iq.zg()]:[3,2];case 1:t.sent(),this.iq=void 0,t.label=2;case 2:return[4,this.TL.hr()];case 3:return t.sent(),[2]}})}).call(this)},i.C8=function(){return this.TL.C8()},i.x9=function(){this.TL.x9()},i.I9=function(){this.TL.I9()},i.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),this.TL.mn(BR,this.jrt),this.Vrt.BI=void 0,this.Vrt.kn(),this.iq?[4,this.iq.zg()]:[3,2];case 1:t.sent(),this.iq=void 0,t.label=2;case 2:return[2]}})}).call(this)},i.D9=function(){this.TL.D9()},i.Qrt=function(t){this.TL.mn(BR,this.jrt),this.TL=t,this.Vrt.BI=t.nt,this.TL.wn(BR,this.jrt)},i.Zx=function(t){this.So(t)},Nt(n,[{key:"Nrt",get:function(){return this.TL}},{key:"IP",get:function(){return this.RP()}},{key:"CP",get:function(){return this.DP()}},{key:"MP",get:function(){return this.LP()}},{key:"Wu",get:function(){return this.TL.Wu}},{key:"ct",get:function(){return this.Nd()}},{key:"nq",get:function(){return this.Mrt()}},{key:"UP",get:function(){return this.Lrt()}},{key:"lt",get:function(){return this.TL.lt}},{key:"Mi",get:function(){return this.TL.Mi}},{key:"Ti",get:function(){return this.TL.Ti}},{key:"Ma",get:function(){return this.Hx()}},{key:"mq",get:function(){return this.Aa()}},{key:"$P",get:function(){return this.TL.$P},set:function(t){this.TL.$P=t}},{key:"hx",get:function(){return this.Ort()}},{key:"ux",get:function(){return this.TL.ux},set:function(t){this.TL.ux=t}},{key:"_x",get:function(){return this.gx()}},{key:"Ax",get:function(){return this.bx()}},{key:"Sx",get:function(){return this.Tx()}},{key:"kx",get:function(){return this.Ex()}},{key:"Y4",get:function(){return this.Frt()}},{key:"a5",get:function(){return this.Urt()}},{key:"nt",get:function(){return this.Ix()}},{key:"Ql",get:function(){return this.att()}},{key:"i7",get:function(){return this.TL.i7}},{key:"Mx",get:function(){return this.TL.Mx},set:function(t){this.TL.Mx=t}},{key:"R9",get:function(){return this.TL.R9}},{key:"KP",get:function(){return this.TL.KP}},{key:"CL",get:function(){return this.TL.CL}},{key:"Eq",get:function(){return this.Hrt()},set:function(t){this.Wrt(t)}},{key:"N9",get:function(){return this.TL.N9},set:function(t){this.qrt(t)}},{key:"p8",get:function(){return this.zrt()}}]),n}(th),AO=function(t){function n(n){return t.call(this,n)||this}Ct(n,t);var i=n.prototype;return i.B9=function(t){this.TL.B9(t)},i.Yx=function(){this.TL.Yx()},Nt(n,[{key:"Nrt",get:function(){return this.TL}},{key:"$W",get:function(){return this.TL.$W}},{key:"n5",get:function(){return this.TL.n5}},{key:"Vx",get:function(){return this.TL.Vx},set:function(t){this.TL.Vx=t}}]),n}(bO),TO=function(t){function n(){return t.apply(this,arguments)||this}Ct(n,t);var i=n.prototype;return i.Xrt=function(t){var n=new yO(t);return n.ost=this,n},i.Grt=function(t){return new pO(t)},n}(AO),SO=function(t){function n(n){return t.call(this,n)||this}return Ct(n,t),n}(dO(TO)),EO=function(t){function n(n){return t.call(this,n)||this}return Ct(n,t),n}(kO(TO)),IO=function(t){function n(){return t.apply(this,arguments)||this}Ct(n,t);var i=n.prototype;return i.Gq=function(n){return n===ig.Bk?new EO(t.prototype.Gq.call(this,n)):n===ig.Dk?new SO(t.prototype.Gq.call(this,n)):void 0},i.Pq=function(n){var i=this;return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return[4,(r=n).zg()];case 1:return e.sent(),[4,t.prototype.Pq.call(i,r.Nrt)];case 2:return e.sent(),[2]}})})()},n}(vO);F(),Et();var RO=function(){function t(t){var n=this;this.oa=void 0,this.Yrt=function(t){t.persisted&&n.Krt()},this.oa=t,f.addEventListener("pageshow",this.Yrt)}var n=t.prototype;return n.Krt=function(){this.oa.Jx()},n.kn=function(){f.removeEventListener("pageshow",this.Yrt)},t}();F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Wt(),Bt(),Ut(),Qt(),F(),Et(),F(),Et();var CO=function(){function t(t){this.tht=void 0,this.tht=t}var n=t.prototype;return n.Jrt=function(t,n,i){return ut.resolve()},n.Zrt=function(t,n,i,r){var e=[];if(r){var s={yU:n.EO,AU:n.PO,bU:i.$rt.bU};r.Km===Dg.TTML?e=Cm(t,r,s,i.oQ):r.Km===Dg.WEBVTT&&(e=D_(t,s,this.tht).L)}return e},n.hr=function(){},t}();F(),Et(),Ut(),F(),Et(),Ut(),F(),Et();var DO,PO=function(t){return t.TC="vttc",t.iht="vsid",t.eht="iden",t.sht="ctim",t.nht="sttg",t.rht="payl",t.hht="vtte",t.oht="vtta",t}({}),NO=function(){function t(){}return t.aht=function(n){return Boolean(t.uht[n])},t.TD=function(n){for(var i,r=[],e=Lt(lm.aD(new am(n,new Tc)));!(i=e()).done;){var s=i.value;t.aht(s.Km)&&r.push(t.uht[s.Km](s.ck))}return r},t.cht=function(n){var i=lm.aD(n),r=gm(i,PO.iht),e=gm(i,PO.eht),s=gm(i,PO.sht),u=gm(i,PO.nht),o=gm(i,PO.rht);return{Km:PO.TC,dht:r?t.fht(r):void 0,vht:e?t._ht(e):void 0,ght:s?t.pht(s):void 0,mht:u?t.wht(u):void 0,yht:o?t.Aht(o):void 0}},t.fht=function(t){return{Km:PO.iht,bht:t.$C()}},t._ht=function(t){return{Km:PO.eht,vht:t.nD()}},t.pht=function(t){return{Km:PO.sht,Sht:t.nD()}},t.wht=function(t){return{Km:PO.nht,Tht:t.nD()}},t.Aht=function(t){return{Km:PO.rht,kht:t.nD()}},t.Eht=function(t){return{Km:PO.hht}},t.Pht=function(t){return{Km:PO.oht,xht:t.nD()}},t}();NO.uht=((DO={})[PO.TC]=NO.cht,DO[PO.hht]=NO.Eht,DO[PO.oht]=NO.Pht,DO);var BO=function(){function t(){this.Rht=NaN}var n=t.prototype;return n.Jrt=function(t,n,i){var r=new DataView(t.Iht),e=ym.TD(r),s=Ui(e,function(t){return t.Km===um.OR});return s&&(this.Rht=s.Z[0].KD.gD.qD),ut.resolve()},n.Zrt=function(t,n,i){if(S(this.Rht))return[];var r=_c(t),e=ym.TD(r),s=vm(e,um.IC),u=vm(e,um.OC);if(!s||0===s.Z.length||!u)return[];var o=function(t,n,i){for(var r,e=t.Z[0],s=e.GN?e.GN.GN.toNumber()/i:n.EO,u=[],o=Lt(e.zN);!(r=o()).done;){var h,c=r.value;(h=u).push.apply(h,[].concat(c.JN))}return{Cht:s,JN:u}}(s,n,this.Rht),h=i.$rt.bU;return function(t,n,i,r){for(var e=NO.TD(_c(n.ck)),s=t.JN,u=t.Cht+r,o=[],h=0,c=0;c=this.Lat},t}(),jO=function(){function t(t,n){this.Hat=void 0,this.Fat=void 0,this.Xat=void 0,this.Hat=n,n&&rg(t)?t===ig.Bk?(this.Xat=5e3,this.Fat=new GO(.05,1,0)):(this.Xat=0,this.Fat=new GO(.005,.1,0)):(this.Xat=16e3,this.Fat=new GO)}return t.prototype.Uat=function(t){var n=t.Vat,i=this.Hat?t.Wat-t.qat:t.Wat-t.zat,r=t.Gat;!r&&n=this.Rz.GY}},{key:"Hut",get:function(){var t,n=this.Fut.QW;if(n&&n.V>0)t=n.An(0);else{t=this.M8.MP;var i=this.Fut.ZZ,r=i.VM(t);r>=0&&(t=i.An(r))}var e=this.Fut.Sx.Tn(0);if(e>t){if(this.Fut.Tn<=t&&this.Fut.An>=t&&e>t+gM)throw new VO(t,e);t=e}return t=this.Fut.qut.DM(t)}}]),t}();F(),Et(),Bt(),Ut();var mM=function(){function t(){this.Wm=void 0,this.Gut=void 0,this.Wm=Ju(),this.Gut=TA.iL()}var n=t.prototype;return n.Xut=function(t){return this.Wm.get(t.o)},n.jut=function(){var t=this.Gut;return this.Wm.forEach(function(n){t=t.OM(n)}),t},n.Qut=function(t){if(this.Gut.Cr(t))return!0;var n=!1;return this.Wm.forEach(function(i){n=n||i.Cr(t)}),n},n.Kut=function(t,n){var i=this.Wm.get(n.o);return!!i&&i.Cr(t)},n.HM=function(t,n){if(this.Gut.HM(t,n))return!0;var i=!1;return this.Wm.forEach(function(r){i=i||r.HM(t,n)}),i},n.Yut=function(t,n){var i=this.Wm.get(n),r=i?i.OM(t):t;this.Wm.set(n,r),this.Gut=this.Gut.OM(t)},n.Jut=function(t){var n=this;this.Wm.forEach(function(i,r){n.Wm.set(r,i.OM(t))}),this.Gut=this.Gut.OM(t)},n.Zut=function(t){var n=this;this.Wm.forEach(function(i,r){n.Wm.set(r,i.Mn(t))}),this.Gut=this.Gut.Mn(t)},n.hr=function(){var t=this;this.Wm.forEach(function(n,i){t.Wm.set(i,TA.iL())}),this.Gut=TA.iL()},Nt(t,[{key:"zut",get:function(){if(0===this.Wm.size)return this.Gut;var t=TA.tL(0,1/0);return t=t.Mn(this.Gut),this.Wm.forEach(function(n){t=t.Mn(n)}),t}}]),t}(),yM=function(){function t(t){this.Ht=void 0,this.tct=void 0,this.$Z=void 0,this.ect=[],this.Ht=t,this.tct=new mM,this.$Z=new mM}var n=t.prototype;return n.ict=function(t){for(var n,i=Lt(this.ect);!(n=i()).done;){var r=n.value;if(r.sat>t)break;if(r.nat>t)return r}},n.sct=function(t){for(var n,i=Lt(this.ect);!(n=i()).done;){var r=n.value;if(r.nct>t)break;if(r.rct>=t)return r}},n.hct=function(t,n){for(var i,r=[],e=Lt(this.ect);!(i=e()).done;){var s=i.value;if(s.sat>t)break;s.nat>=n&&r.push(s)}return r},n.eat=function(){return this.ect},n.aat=function(t){var n=TA.tL(t.nct,t.rct),i=n.BM();this.tct.Zut(i),this.tct.Yut(n,t.oat),this.act(i);var r=Hi(this.ect,function(n){return t.sat<=n.sat});r<0?this.ect.push(t):this.ect[r].nat<=t.nat?this.ect.splice(r,1,t):this.ect.splice(r,0,t)},n.t$=function(t,n){this.$Z.Yut(t,n)},n.uct=function(t){this.$Z.Jut(t)},n.Zut=function(t){this.tct.Zut(t),this.$Z.Zut(t);var n=this.tct.jut();this.act(n)},n.act=function(t){this.ect=this.ect.filter(function(n){return t.qM(n.nct,n.rct)}).map(function(n){return n.cct&&!t.HM(n.nct,n.rct)?function(t,n){return{oat:t.oat,sat:t.sat,nat:t.nat,nct:t.nct,rct:t.rct,cct:n}}(n,!1):n})},n.hr=function(){this.tct.hr(),this.$Z.hr(),this.ect=[]},n.kn=function(){this.hr()},Nt(t,[{key:"$ut",get:function(){return this.tct}},{key:"ZZ",get:function(){return this.$Z}}]),t}();F(),Et(),F(),Et(),Wt(),Bt(),Ut(),Qt();var pM=function(){function t(t,n,i){this.fat=void 0,this.Dot=void 0,this.jp=void 0,this.dct=void 0,this.fat=t,this.Dot=n,this.jp=i}var n=t.prototype;return n.lct=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c,a;return zt(this,function(f){switch(f.label){case 0:return dr(i),e=this.Dot.sct(t),r=e&&Si(e.rct,t,1e-5)?e.nat:t,s=this.fct(r),u=function(t){return kM.bind(void 0,t)}(r),[4,this.jp.vct(u,s,n,i)];case 1:o=f.sent(),dr(i),f.label=2;case 2:return o&&this._ct(o.$at)?(h=TM(o.$at),c=o.kot,[4,this.jp.vct(h,[c],n,i)]):[3,4];case 3:return o=f.sent(),dr(i),[3,2];case 4:return o?this.gct(o.$at)?(a=this.pct(o.$at),t=a.An?[4,this.findFirstNonAppendedSegmentAfterSegment(o,n,i)]:[3,8];case 7:return[2,f.sent()];case 8:if(o.kot.mct(o.$at))return[2,void 0];throw new y("Fatal buffering error")}})}).call(this)},n.findFirstNonAppendedSegmentAfterSegment=function(t,n,i){return Vt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:r=t,u.label=1;case 1:return e=TM(r.$at),s=t.kot,[4,this.jp.vct(e,[s],n,i)];case 2:r=u.sent(),dr(i),u.label=3;case 3:if(r&&this.gct(r.$at))return[3,1];u.label=4;case 4:return r?[2,r]:[2,void 0]}})}).call(this)},n.findFirstNonAppendedSegmentBeforeSegment=function(t,n,i,r){return Vt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:e=t,h.label=1;case 1:return s=function(t){return bM.bind(void 0,t)}(e.$at),u=t.kot,[4,this.jp.vct(s,[u],n,i)];case 2:e=h.sent(),dr(i),h.label=3;case 3:if(e&&this.gct(e.$at))return[3,1];h.label=4;case 4:if(!e)throw o=t.kot.wct.Tn,new VO(o,r.Tn,t.kot);return[2,e]}})}).call(this)},n.yct=function(t){return this.Dot.$ut.Qut(t)},n.Act=function(t){return this.Dot.hct(t.EO,t.PO)},n.gct=function(t){var n=this.Act(t);return n.length>0&&function(t,n){return function(t){for(var n,i=TA.iL(),r=Lt(t);!(n=r()).done;){var e=n.value;i=i.OM(TA.tL(e.sat,e.nat))}return i}(t).HM(n.EO,n.PO)}(n,t)&&n.every(SM)},n._ct=function(t){return this.Dot.ZZ.HM(t.EO,t.PO)},n.pct=function(t){var n=this.Act(t);return{Tn:n[0].nct,An:n[n.length-1].rct}},n.fct=function(t){var n=this.bct(t);if(0===n.length){var i=this.dct?this.dct:this.Dot.Ht.rat;return[i[i.length-1]]}var r=n.filter(function(t){var n;return(null==(n=t.kot)?void 0:n.cst)&&!t.Sct});return r.length>0?r:[n[n.length-1]]},n.bct=function(t){var n=this;return(this.dct?this.dct:this.Dot.Ht.rat).filter(function(i){return!n.Dot.ZZ.Kut(t,i)})},Nt(t,[{key:"Bot",get:function(){return this.dct},set:function(t){this.dct=t}},{key:"Lot",get:function(){return this.Dot.Ht.Lot}}]),t}();function kM(t,n,i,r){return Vt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:return e=n.$rt,(s=e.Tct(t))?n.kct(s)?[4,n.Pct(s,i,r)]:[3,2]:[2,void 0];case 1:return[2,u.sent().Ect(t)];case 2:return[2,s]}})})()}function bM(t,n,i,r){return Vt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return iM(t)?0===t.hut?[2,void 0]:(e=n.$rt.xct(t))?[4,n.Pct(e,i,r)]:[2,void 0]:[3,2];case 1:return[2,s.sent().Ict(t.hut-1)];case 2:return[2,n.$rt.Rct(t)];case 3:return[2]}})})()}function AM(t,n,i,r){return Vt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:return iM(t)?(e=n.$rt.xct(t))?[4,n.Pct(e,i,r)]:[2,void 0]:[3,2];case 1:return s=u.sent(),t.hut+1===s.V?[2,void 0]:[2,s.Ict(t.hut+1)];case 2:return[2,n.$rt.Cct(t)];case 3:return[2]}})})()}function TM(t){return AM.bind(void 0,t)}function SM(t){return t.cct}F(),Et(),Wt(),Qt();var EM=function(){function t(t,n,i,r){this.Lct=void 0,this.Fut=void 0,this.Rz=void 0,this.Bct=void 0,this.Oct=void 0,this.Lct=t,this.Fut=n,this.Rz=i,this.Bct=r,this.Oct=!1}var n=t.prototype;return n.vct=function(t,n,i,r){return Vt(function(){var e,s,u;return zt(this,function(o){switch(o.label){case 0:return dr(r),(e=this.Dct(n,i))?[4,t(e,this.Bct,r)]:[2,void 0];case 1:return(s=o.sent())?(u=e.Nct(s),[2,{kot:e,$at:s,Yu:u}]):[2,void 0]}})}).call(this)},n.Dct=function(t,n){if(0!==t.length){var i=this.Lct.Mct(t,this.Oct?n:void 0,this.Fut,this.Rz.WY);return this.Oct||(this.Oct=!0),i}},t}();F(),Et(),Wt(),Ut(),Qt();var IM=function(){function t(t,n,i,r){this.Lct=void 0,this.Fut=void 0,this.eut=void 0,this.Bct=void 0,this.Lct=t,this.Fut=n,this.eut=i,this.Bct=r}return t.prototype.vct=function(t,n,i,r){return Vt(function(){var e,s,u,o,h,c,a,f;return zt(this,function(v){switch(v.label){case 0:if(dr(r),!(e=this.Lct.Fct(n,i,this.Fut)).length)return[2,void 0];u=Lt(e),v.label=1;case 1:if((o=u()).done)return[3,8];h=o.value,v.label=2;case 2:return v.trys.push([2,6,,7]),dr(r),[4,t(h,this.Bct,r)];case 3:return(c=v.sent())?(a=h.Nct(c),[4,this.eut.Uct(a.Yu,a.Sat)]):[3,5];case 4:if(v.sent())return[2,{$at:c,kot:h,Yu:a}];v.label=5;case 5:return[3,7];case 6:return lr(f=v.sent()),s=f,[3,7];case 7:return[3,1];case 8:if(s)throw s;return[2,void 0]}})}).call(this)},t}();function RM(t){return void 0!==t.ux}function CM(t,n){var i=t.Ti&&n.Ti,r=t.Mi&&n.Mi;return i||r?i&&r?t.Ti*t.Mi-n.Ti*n.Mi:i?t.Ti-n.Ti:r?t.Mi-n.Mi:(t.Ti||1)*(t.Mi||1)-(n.Ti||1)*(n.Mi||1):0}function DM(t,n){return CM(t,n)||function(t,n){return t.kW-n.kW}(t,n)}F(),Et(),at(),Ut(),F(),Et();var PM=function(){function t(t,n,i,r,e,s){this.Wct=void 0,this.jct=void 0,this.Rm=void 0,this.Xct=void 0,this.Vct=void 0,this.Qct=void 0,this.jct=t,this.Wct=n,this.Rm=i,this.Xct=r,this.Vct=e,this.Qct=s}var n=t.prototype;return n.Mct=function(n,i,r,e){var s=t.sortByQuality(n);if(void 0!==this.Vct&&void 0===i&&n.length>1){var u=t.Hct(s,this.Vct);u&&(s=u)}var o=this.Fct(s,i,r,e);return o.length?o[o.length-1]:s[0]},n.Fct=function(n,i,r,e){for(var s,u,o=t.sortByQuality(n),h={Oat:void 0===e||this.Wct.Nat?this.Wct.Oat:e,ux:RM(r)&&r.ux?r.ux:1,qct:r.Ti,zct:r.Mi,Gct:null==(s=this.Xct)?void 0:s.restrictToPlayerSize},c=o,a=Lt(this.jct);!(u=a()).done;){c=(0,u.value)(c,i,h,this.Rm,this.Qct)}return c},t.Kct=function(n){return t.sortByQuality(n)[0]},t.Yct=function(n,i){var r;return i?t.Kct(null!=(r=t.Hct(n,i))?r:n):t.Kct(n)},t.Hct=function(t,n){for(var i,r=function(){var n=i.value,r=t.filter(function(t){return YC(t.Np,n)});if(r.length>0)return{v:r}},e=Lt(n);!(i=e()).done;){var s=r();if("object"===W(s))return s.v}},t.sortByQuality=function(t){var n=[].concat(t);return n.sort(DM),n},t}();F(),Et();var NM=function(t,n,i,r,e){return t.filter(function(t){return e.TZ(t)&&r.xp(n,t)})};F(),Et();var BM=function(t,n,i,r){return void 0===n&&r.Cp?[t[t.length-1]]:t.filter(function(t){return function(t,n,i){var r=i.Oat;if(r<=0)return!1;return.8*r>t.kW*i.ux}(t,0,i)})};F(),Et();var xM=function(t,n,i,r,e){var s=i.Gct;if(void 0===s&&!r.Ks)return t;if(!1===s)return t;if(t.length>0&&t[0].Km!==ig.Bk)return t;for(var u=t.length-1;u>=0;u--){var o=t[u];if(o.Mi===i.zct&&o.Ti===i.qct)return t.slice(0,u+1);if(o.Mi=0;c--){var a=t[c];if(a.Mi<=h&&a.Ti<=o)return t.slice(0,c+1)}return[]},HM=function(){function t(){}return t.Ret=function(t,n,i,r,e,s,u,o,h,c){var a=function(t,n){return new MM([new UM(n),new LM(t)])}(s,u),f=new PM([NM],e,Vn.Zs,o,h,c),v=new IM(f,n,u,a),d=new PM([BM,NM,xM,VM],e,Vn.Zs,o,h,c),l=new EM(d,n,r,a),w=new OM([v,l]);return new pM(t,i,w)},t}();F(),Et(),Wt(),Bt(),Dt(),H(),Ut(),Qt(),F(),Et(),Dt();var WM=function(t){function n(n,i,r,e,s,u){var o;return void 0===u&&(u=0),(o=t.call(this,eh.iy)||this).segmentStartTime=void 0,o.error=void 0,o.trackType=void 0,o.track=void 0,o.quality=void 0,o.retryCount=void 0,o.segmentStartTime=n,o.error=i,o.trackType=r,o.track=e,o.quality=s,o.retryCount=u,o}return Ct(n,t),n}(rh);F(),Et(),Dt();var zM=function(t){function n(n,i){var r;return(r=t.call(this,eh.Sw)||this).track=void 0,r.segments=void 0,r.track=n,r.segments=i,r}return Ct(n,t),n}(rh),XM=function(t){function n(n,i){var r;return(r=t.call(this,i)||this).tdt=void 0,r.tdt=n,r}return Ct(n,t),n}(ar),qM=[eh.oy,eh.ly],GM=function(t){function n(n,i,r,e,s,u,o,h,c){var a;return(a=t.call(this)||this).fat=void 0,a.Dot=void 0,a.rdt=void 0,a.sdt=void 0,a.Ndt=void 0,a.Adt=void 0,a.Qct=void 0,a._dt=void 0,a.lq=void 0,a.idt=void 0,a.Y2=void 0,a.edt=void 0,a.Sdt=void 0,a.ldt=void 0,a.fdt=void 0,a.gdt=void 0,a.fat=n,a.Dot=i,a.rdt=r,a.sdt=e,a.Ndt=s,a.Adt=u,a.Qct=o,a._dt=h,a.lq=c,a.idt=void 0,a.Y2=void 0,a.edt=void 0,a.Sdt=void 0,a.ldt=0,a.fdt=0,a.gdt=TA.iL(),a.Ndt.wn(qM,a.Rs),a}Ct(n,t);var i=n.prototype;return i.ndt=function(t){return!this.Y2||!t||!Cc(this.Y2.Iht,t.Iht)},i.vat=function(t){if(!this.idt)return!1;var n=this.idt.$at,i=TA.tL(n.EO,n.PO),r=this.rdt.Uut,e=r.VM(t);return e<0?i.Cr(t,gM):i.qM(t,r.An(e),!0,!0,gM)},i.uat=function(t){return Vt(function(){var n,i,r,e,s,u,o,h,c,a,f,v,d,l,w;return zt(this,function(g){switch(g.label){case 0:n=this.Dot.Ht.rat,g.label=1;case 1:0,i=void 0,g.label=2;case 2:return g.trys.push([2,12,16,17]),dr(t),this._at(),this.gat()?[3,18]:(i=this.hdt(),[4,this.vct(i,t)]);case 3:return void 0===(e=g.sent())?[3,18]:(this.idt=e,function(t){var n=t.kot,i=n.$rt,r=iM(t.$at)?i.xct(t.$at):t.$at;return i.Udt(r,n.Idt.xdt())}(this.idt)?[3,5]:[4,this.odt(this.idt,t)]);case 4:return g.sent(),[3,1];case 5:return!this.edt||XC(this.edt.kot.frt,this.idt.kot.frt)?[3,7]:[4,this.Qct.EZ(this.idt.kot)];case 6:g.sent(),g.label=7;case 7:return!this.idt.kot.xW||this.Rot&&(null==(r=this.edt)?void 0:r.kot)===this.idt.kot||null==(s=this.lq)||s.LW(this.idt.kot.xW),[4,this.adt(i,this.idt.$at,t)];case 8:return g.sent(),u=this,[4,this.udt(this.idt.kot,t)];case 9:return u.Y2=g.sent(),[4,this.tut(this.idt,t)];case 10:return o=g.sent(),h=this.rdt.IP,c=this.edt,a=this,[4,this.cdt(o,t)];case 11:return a.edt=g.sent(),f=this.rdt.IP,this.ddt(c,this.idt,h,f,i),n.forEach(function(t){return t.Sct=!1}),this.ldt=0,this.fdt=0,[3,17];case 12:return V(v=g.sent(),VO)?(this.F3(v.Tn,v.An,v.kot),[3,1]):[3,13];case 13:if(!V(v,XM))return[3,15];if(d=500,n.every(function(t){return t.Sct})){if(2===this.ldt){if(l=this.rdt.IP,this.vdt(this.idt),this.ddt(this.edt,this.idt,l,l,i),n.forEach(function(t){return t.Sct=!1}),this.fdt+=1,this.ldt=0,this.fdt===this._dt.maxRetries)throw new fd(cd.MEDIA_LOAD_ERROR,"The segments could not be loaded.",v);return[3,1]}this.ldt++,w=this._dt.minimumBackoff*b.pow(2,this.ldt-1),d=b.min(w,this._dt.maximumBackoff)}return[4,Ar(d,t)];case 14:return g.sent(),[3,1];case 15:throw this.gdt=TA.iL(),v;case 16:return this.idt=void 0,[7];case 17:return[3,1];case 18:return[2]}})}).call(this)},i.ddt=function(t,n,i,r,e){var s=r.UM(i),u=n.kot,o=u.pdt(n.$at),h=u.mct(n.$at),c=n.$at.EO,a=n.$at.PO;o&&(c=b.min(c,b.max(0,u.wct.Tn-.05))),h&&(a=b.max(a,u.wct.An));var f=TA.tL(c,a).UM(r);if(0!==s.V){if(o||this.gdt.V>0){var v=f.Mn(TA.tL(c,s.Tn(0)));this.wdt(v)}var d=s.BM().Mn(TA.tL(s.Tn(0),s.An(s.V-1)));if(this.wdt(d),h){var l=f.Mn(TA.tL(s.An(s.V-1),a));this.wdt(l)}if(this.gdt.V>0){var w=this.gdt.UM(s);this.wdt(w),this.gdt=TA.iL()}var g,_=u.$rt,m=iM(n.$at)?void 0:_.Rct(n.$at),y=null!=(g=null==t?void 0:t.$at)?g:this.ydt(m)?m:void 0;if(y){var p=this.Dot.hct(y.EO,y.PO);if(p.length>0){var k=TA.tL(p[p.length-1].rct,s.Tn(0));this.wdt(k)}}var A=iM(n.$at)?void 0:_.Cct(n.$at);if(A&&this.ydt(A)){var T=this.Dot.hct(A.EO,A.PO);if(T.length>0){var S=TA.tL(s.An(s.V-1),T[0].nct);this.wdt(S)}}}else this.mdt(i,f,c,e)},i.mdt=function(t,n,i,r){var e=n;0===this.gdt.V&&(this.gdt=TA.tL(t.An(t.V-1),i)),0===e.V&&void 0!==r&&(e=TA.$M(r)),this.gdt=this.gdt.OM(e),this.Dot.uct(this.gdt)},i.ydt=function(t){return!!t&&this.Dot.hct(t.EO,t.PO).length>0},i.wdt=function(t){for(var n=t.UM(this.rdt.IP),i=0;i0)){var t,n=this.rdt.Uut.OM(null!=(t=this.rdt.ZZ.CM().JM(this.rdt.Hut))?t:TA.iL());this.Dot.Zut(n),this.Sdt&&!this.Tdt(this.Sdt)&&(this.Sdt=void 0),this.So(new zM(this.Dot.Ht.Lot,this.Dot.eat()))}},i.gat=function(){return this.edt&&this.edt.kot.mct(this.edt.$at)?(this.Adt.C3(),!0):(this.Sdt&&this.Sdt.kot.mct(this.Sdt.$at)&&this.Tdt(this.Sdt)&&this.Adt.C3(),!!this.rdt.Vut)},i.Tdt=function(t){return this.Dot.$ut.HM(t.kdt,t.Edt)},i.Pdt=function(t,n,i){(!this.Sdt||this.Sdt.$at.PO=2?(t.kot.Sct=!0,this.Mdt(r,i),[2,this.bdt(MO.Hht,"Could not fetch the segment.")]):[4,Ar(b.min(this._dt.minimumBackoff*b.pow(2,i),this._dt.maximumBackoff),n)]:[3,6];case 5:return e.sent(),[3,7];case 6:throw new fd(cd.MEDIA_LOAD_ERROR,r.message,r);case 7:return i++,[3,1];case 8:return[2]}})}).call(this)},i.adt=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c,a,f,v,d;return zt(this,function(l){switch(l.label){case 0:for(r=this.Dot.hct(n.EO,n.PO),e=this.rdt.Uut.JM(t),s=TA.iL(),u=Lt(r);!(o=u()).done;)h=o.value,dr(i),c=h.nct,a=h.rct,(f=e&&e.qM(c,a)?b.max(c,e.An(0)):c)<(v=a)&&(s=s.OM(TA.tL(f,v)));d=0,l.label=1;case 1:return d0?i.qualities[0]:void 0,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var $M=function(t){function n(n){var i;return(i=t.call(this,Dw.QUALITY_UNAVAILABLE)||this).quality=void 0,i.quality=n,i}return Ct(n,t),n.prototype.xa=function(){return new tL(this.quality.Ca)},n}(Aw),tL=function(t){function n(n){var i;return(i=t.call(this,"qualityunavailable")||this).quality=void 0,i.quality=n,i}return Ct(n,t),n}(Tw);F(),Et(),Dt();var nL=function(t){function n(){return t.call(this,Dw.NO_QUALITY)||this}return Ct(n,t),n}(rh);function iL(t){return{kW:t.kW,Np:t.frt,Mi:rL(t)?t.Mi:0,Km:rL(t)?ig.Bk:ig.Dk,Ti:rL(t)?t.Ti:0}}function rL(t){var n=t;return void 0!==n.Mi&&void 0!==n.Ti}F(),Et();var eL=0,sL=function(t){function n(n,i,r){var e;return void 0===r&&(r="alternative"),(e=t.call(this)||this).Kdt=void 0,e.Kot=void 0,e.We=!1,e.hu=void 0,e.Zdt=void 0,e.hS="",e.gO=void 0,e.b5=void 0,e.pO=void 0,e.qA=void 0,e.clt=!1,e.dO=new vg,e.elt=[],e.jdt=void 0,e.$dt=void 0,e.rlt=void 0,e.zdt=function(){return e.So(new wg(e))},e.nlt=[],e.Kot=n,e.hS=String(eL++),e.gO=mg(),e.b5=r,e.qA=n.rit,e.pO=n.Th,e.rlt=n.Km,e.elt=n.rat.slice(),e.qdt(i),e}Ct(n,t);var i=n.prototype;return i.qdt=function(t){for(var n,i=Lt(t);!(n=i()).done;){var r=n.value;r.wn("update",this.zdt),this.dO.lO(r)}},i.Gdt=function(t){if(this.dO.fO(t)){t.QU();var n=this.Xdt();if(this.jdt&&ji(this.jdt,t)){var i=this.jdt.filter(function(t){return t.cst});0===i.length&&n.length>0?this.YI=n:this.YI=i}else this.YI=n;this.So(new $M(t))}},i.Qdt=function(t){if(this.dO.fO(t)){var n=this.Xdt();t.jU(),this.jdt&&!function(t,n){return Qi(t,n,function(t,n){return t===n})}(this.jdt,n)||(this.YI=this.Xdt())}},i.Xdt=function(){return this.dO.II.filter(function(t){return t.cst})},i.Ydt=function(t){this.Kdt=t.kot,this.So(t)},i.tlt=function(t){if(t&&0!==t.length){for(var n,i=[],r=Lt(this.rat);!(n=r()).done;)for(var e,s=n.value,u=Lt(t);!(e=u()).done;){var o=e.value;o===s.kot&&o.cst&&i.push(s)}return i}},i.slt=function(t){var n;this.nlt.push(t),(n=this.elt).push.apply(n,[].concat(t.rat));var i=t.rat.map(function(t){return t.kot});this.qdt(i)},i.wO=function(t){this.We=t,this.Zdt&&(t?this.Zdt.jU(this):this.Zdt.QU(this))},i.ult=function(t){this.We=t,this.clt!==t&&(this.clt=t,this.So(new dg(this)))},i.kn=function(){for(var t,n=Lt(this.dO.II);!(t=n()).done;){t.value.mn("update",this.zdt)}this.dO.hr()},Nt(n,[{key:"QI",get:function(){return this.Kot.Wdt.map(uL).filter(Un)}},{key:"XI",get:function(){return this.Kdt}},{key:"Nut",get:function(){return this.Kot}},{key:"Rt",get:function(){return this.We},set:function(t){this.wO(t)}},{key:"Ca",get:function(){return this.hu||(this.hu=Zw(this)),this.hu}},{key:"Jdt",get:function(){return this.Zdt},set:function(t){this.Zdt=t}},{key:"o",get:function(){return this.hS}},{key:"jI",get:function(){return this.gO}},{key:"Lt",get:function(){return this.b5}},{key:"bs",get:function(){return this.qA}},{key:"Th",get:function(){return this.pO},set:function(t){t!==this.pO&&(this.pO=t,this.So(new wg(this)))}},{key:"Xk",get:function(){return this.Rt?"enabled":"disabled"}},{key:"YI",get:function(){return this.jdt},set:function(t){var n;if(t){var i=this.XI?iL(this.XI):void 0;n=t.filter(function(t){return t.cst&&Vn.Zs.xp(i,iL(t))})}else n=this.Xdt();0!==n.length?(this.jdt=t&&this.dO.fO(t)?t:void 0,this.$dt=this.tlt(this.jdt),this.So(new JM(t,this))):this.So(new nL)}},{key:"ilt",get:function(){return this.$dt}},{key:"KI",get:function(){return this.dO}},{key:"rat",get:function(){return this.elt}},{key:"Lot",get:function(){return this.rlt}},{key:"hlt",get:function(){return this.nlt}},{key:"olt",get:function(){return this.rat.every(function(t){return t.olt})}}]),n}(th);function uL(t){if("urn:mpeg:dash:role:2011"===t.y8)return oL(t);if("urn:tva:metadata:cs:AudioPurposeCS:2007"===t.y8){if("1"===t.zE)return Yw.HI;if("2"===t.zE)return Yw.qI}}function oL(t){if(void 0!==(null==t?void 0:t.zE))switch(t.zE){case"caption":return Yw.VI;case"sign":return Yw.WI;case"description":return Yw.HI;case"enhanced-audio-intelligibility":return Yw.qI;default:return}}var hL=function(t){function n(n,i,r,e,s,u){var o;return(o=t.call(this,u)||this).Ez=1,o.flt=void 0,o.llt=Zu(),o.wlt=Zu(),o.dlt=void 0,o._lt=void 0,o.Rlt=Zu(),o.nV=void 0,o.eut=void 0,o.M8=void 0,o.Rz=void 0,o.Slt=void 0,o.Tlt=function(t){0},o.M8=n,o.nV=i,o.Rz=r,o.Slt=e,o.eut=s,o}Ct(n,t);var i=n.prototype;return i.C3=function(){},i.Wut=function(){return this.Uut.Cr(this.An)},i.Odt=function(t,n,i,r){return Vt(function(){var e,s,u,o,h,c,a,f,v,d,l;return zt(this,function(w){switch(w.label){case 0:return t.Km!==FR.vZ?[3,1]:(s=t.ck.Iht,[3,3]);case 1:return[4,t.ck.HT(r)];case 2:s=w.sent(),w.label=3;case 3:for(e=s,u=this.findTrackForRepresentation(i),o=this.llt.get(u.jI),h=n.EO,c=n.PO,a=new TA([h,c]),o||(o=TA.iL(),this.llt.set(u.jI,TA.iL()),this.wlt.set(u.jI,TA.iL())),this.Irt(r),f=this.Zrt(new E(e),n,i,u),v=Lt(f);!(d=v()).done;)l=d.value,u.tV(l);return this.llt.set(u.jI,o.OM(a)),[2,{kdt:h,Edt:c}]}})}).call(this)},i.Irt=function(t){for(var n,i=Lt(JI(this.M8.MP,void 0,void 0,this.IP,this.Rz.GY,this.Rz.UY));!(n=i()).done;){var r=n.value,e=r[0],s=r[1];kr(this.Ldt(e,s,t))}},i.Jrt=function(t,n,i){return this.Slt.Jrt(t,n,i)},i.Zrt=function(t,n,i,r){return this.Slt.Zrt(t,n,i,r)},i.Ldt=function(t,n,i){for(var r,e=t,s=n,u=new TA([t,n]),o=Lt(this.Z.II);!(r=o()).done;){for(var h,c=r.value,a=[],f=Lt(c.L.II);!(h=f()).done;){var v=h.value;v.EO>=e&&v.PO<=s?a.push(v):u=u.UM(new TA([v.EO,v.PO]))}for(var d,l=Lt(a);!(d=l()).done;){var w=d.value;c.WU(w)}var g=this.llt.get(c.jI);g&&this.llt.set(c.jI,g.UM(u))}return ut.resolve()},i.t$=function(t,n){},i.i$=function(t,n){},i.YY=function(){return!1},i.jU=function(t){if(t&&this.dlt!==t){this.dlt=t;for(var n,i=Lt(this.Z.II);!(n=i()).done;){var r=n.value;r!==t&&(r.Xk=Hm.Nh)}if(this.Slt.hr(),this.flt&&(this.flt.kn(),this.flt=void 0),this.dlt){var e=this.ylt(this.dlt);this.flt=new QM(this,this.M8,this.M8,this.nV,this.Rz,!1,this.eut,void 0,void 0,new KM,mT,void 0).Hdt(this.dlt,e),this.flt.wn(zm.ma,this.Tlt),this.flt.Tn(MO.Nht)}}},i.QU=function(t){this.dlt===t&&(t&&this.dlt===t&&(this.dlt=void 0),this.flt&&(this.flt.kn(),this.flt=void 0))},i.Un=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.hr()];case 1:return n.sent(),this._lt=t,this.klt(t),[2]}})}).call(this)},i.Elt=function(t){var n=function(t){var n=t.rat&&t.rat.length>0&&t.rat[0],i=n&&ty(n.frt),r=ty(t.frt),e=t.oQ===Mv;return i||r||e?Dg.TTML:t.oQ===Uv||ey(t.oQ,t.frt)?Dg.WEBVTT:Dg.DEFAULT}(t);if(!n)throw new y("Unknown TextTrack type for Representation");var i=t.Plt.concat(t.Wdt);return this.xlt(function(t){return ji(t.filter(function(t){return"urn:mpeg:dash:role:2011"===t.y8}).map(function(t){return t.zE}).filter(Un),"caption")?Ym.FU:Ym.OU}(i),t.Th,t.rit,!1,n,t,function(t){return t.filter(function(t){return"urn:mpeg:dash:role:2011"===t.y8}).some(function(t){return function(t){return"forced-subtitle"===t||"forced_subtitle"===t}(t.zE)})}(t.Plt),t.Wdt.map(oL).filter(Un))},i.klt=function(t){for(var n,i=Lt(t.Ilt);!(n=i()).done;){var r=n.value,e=this.Elt(r);this.Rlt.set(e.jI,r),e.Ax=Cg.LOADED,this.tt(e)}},i.it=function(n){this.Rlt.delete(n.jI),t.prototype.it.call(this,n)},i.xlt=function(t,n,i,r,e,s,u,o){var h,c,a,f=Ui(s.rat,function(t){return""!==t.o}),v=null!=(a=null!=(c=null==f?void 0:f.o)?c:null==(h=s.o)?void 0:h.toString())?a:"";return this.JU.tI(t,v,n,i,r,e,u,o)},i.ZU=function(t,n,i){var r=vy(t,n,i),e=this.Rlt.get(t.jI);void 0!==e&&(this.Rlt.set(r.jI,e),this.Rlt.delete(t.jI));var s=this.llt.get(t.jI);void 0!==s&&(this.llt.set(r.jI,s),this.llt.delete(t.jI));var u=this.wlt.get(t.jI);return void 0!==u&&(this.wlt.set(r.jI,u),this.wlt.delete(t.jI)),r},i.hr=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.prototype.hr.call(n)];case 1:return i.sent(),this.flt?[4,this.flt.hr(MO.eot)]:[3,3];case 2:i.sent(),this.flt.mn(zm.ma,this.Tlt),this.flt=void 0,i.label=3;case 3:return this._lt=void 0,this.llt.clear(),this.wlt.clear(),[2]}})}).call(this)},i.findTrackForRepresentation=function(t){for(var i,r=Lt(this.Z.II);!(i=r()).done;){var e=i.value,s=this.ylt(e);if(s&&n.Clt(s)===t)return e}},i.ylt=function(t){return this.Rlt.get(t.jI)},i.glt=function(){if(this.dlt){var t=this.ylt(this.dlt);if(t)return n.Clt(t)}},i.kn=function(){for(var n,i=Lt(this.Z.II);!(n=i()).done;){var r=n.value;this.JU.iV(r)}return t.prototype.kn.call(this)},n.Clt=function(t){return t.rat&&t.rat.length>0?t.rat[0]:void 0},Nt(n,[{key:"Rt",get:function(){for(var t,n=Lt(this.Z.II);!(t=n()).done;){if(t.value.Xk!==Hm.Nh)return!0}return!1}},{key:"QW",get:function(){var t=this.M8.MP;return this.Uut.JM(t,.01)}},{key:"qut",get:function(){return TA.eL()}},{key:"IP",get:function(){var t;return null!=(t=this.dlt&&this.llt.get(this.dlt.jI))?t:TA.iL()}},{key:"ZZ",get:function(){return this.flt?this.flt.Cot.ZZ.zut:TA.iL()}},{key:"Uut",get:function(){return LO(this.IP,this.ZZ).LM(2*this.vlt)}},{key:"Tn",get:function(){return this._lt?this._lt.wct.Tn:NaN}},{key:"An",get:function(){return this._lt?this._lt.wct.An:NaN}},{key:"UP",get:function(){var t=this.An;return!!t&&this.M8.MP>=t}},{key:"vlt",get:function(){var t,n,i=this.glt();return i?1/(null!=(n=this.dlt&&(null==i||null==(t=i.plt)?void 0:t.iF()))?n:25):.04}},{key:"Mi",get:function(){return 0}},{key:"B3",get:function(){return ig.NT}},{key:"ux",get:function(){return this.Ez},set:function(t){this.Ez=t}},{key:"_x",get:function(){var t;return null!=(t=this.dlt&&this.wlt.get(this.dlt.jI))?t:TA.iL()}},{key:"Sx",get:function(){if(!this.dlt)return TA.$M(0);var t=this.ylt(this.dlt),n=null==t?void 0:t.Alt,i=null==t?void 0:t.blt;if(void 0===i||void 0===n)return TA.$M(0);var r=b.max(n,this.M8.MP);return new TA([i,r]).CM()}},{key:"Ti",get:function(){return 0}}]),n}(fy),cL=function(){function t(t,n,i,r,e,s){this.Nlt=[],this.Gl=new Eb([]),this.JU=void 0,this.tht=void 0,this.M8=void 0,this.nV=void 0,this.Rz=void 0,this.eut=void 0,this.M8=t,this.nV=n,this.Rz=i,this.eut=r,this.JU=e,this.tht=s}var n=t.prototype;return n.sV=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:return t.Km!==ig.NT?[2]:(n=function(t,n,i){return ty(n)||t===Mv||t===Uv?new CO(i):ey(t,n)?new BO:void 0}(t.oQ,t.frt,this.tht),n?(i=this.Dlt(n),this.Blt(i),[4,i.Un(t)]):[3,2]);case 1:return r.sent(),[2,i];case 2:return[2]}})}).call(this)},n.Dlt=function(t){return new hL(this.M8,this.nV,this.Rz,t,this.eut,this.JU)},n.Blt=function(t){this.Nlt.push(t),this.Gl.FW(t.Z)},n.hr=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:t=Lt(this.Nlt.slice()),i.label=1;case 1:return(n=t()).done?[3,4]:[4,n.value.hr()];case 2:i.sent(),i.label=3;case 3:return[3,1];case 4:return Yi(this.Nlt),this.Gl.hr(),[2]}})}).call(this)},n.kn=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:t=Lt(this.Nlt),i.label=1;case 1:return(n=t()).done?[3,4]:[4,n.value.kn()];case 2:i.sent(),i.label=3;case 3:return[3,1];case 4:return Yi(this.Nlt),this.Gl.kn(),[2]}})}).call(this)},Nt(t,[{key:"nt",get:function(){return this.Gl}}]),t}();F(),Et(),Dt();var aL=function(t){function n(n){var i;return(i=t.call(this,eh.zw)||this).error=void 0,i.error=n,i}return Ct(n,t),n}(rh);F(),Et();var fL=function(t){return t.mV="static",t.wV="dynamic",t}({});F(),Et(),Dt(),F(),Et();var vL=function(t){return t.Mlt="Llt",t}({}),dL=function(t){function n(){return t.call(this,vL.Mlt)||this}return Ct(n,t),n}(rh);F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Dt();var lL=function(t){function n(n,i){var r;return(r=t.call(this,eh.Yw)||this).representation=void 0,r.previousRepresentation=void 0,r.representation=n,r.previousRepresentation=i,r}return Ct(n,t),n}(rh);F(),Et(),Dt(),Ut(),F(),Et(),Ut(),F(),Et();var wL=function(t){return t[t.Olt=0]="Olt",t[t.Flt=1]="Flt",t[t.Ult=2]="Ult",t[t.Vlt=3]="Vlt",t[t.Hlt=4]="Hlt",t[t.Wlt=5]="Wlt",t}({}),gL=function(t){return t[t.qlt=0]="qlt",t[t.zlt=1]="zlt",t[t.Glt=2]="Glt",t[t.Xlt=3]="Xlt",t}({});function _L(t,n,i){return i===wL.Olt?i:n!==gL.qlt&&n!==gL.zlt||i!==wL.Flt&&i!==wL.Ult?t?n===gL.Glt?wL.Hlt:n===gL.Xlt?wL.Vlt:wL.Olt:wL.Wlt:wL.Ult}function mL(t,n,i,r){var e={byte:i},s=wL.Flt,u=[],o=31&bC(n,e,r);e.byte+=1;for(var h=0;h0;)e-=1,r+=yL(t,n);return r}(n,i,4);if("GA94"!==u)return}if(3===bC(n,i,r)){47===s&&(i.byte+=1);var o=t;return o.$lt=i.byte,o}}}}function kL(t){return 4===t.J0}function bL(t){for(var n,i=[],r=Lt(t.filter(kL).map(pL).filter(Un));!(n=r()).done;){var e,s=n.value;(e=i).push.apply(e,[].concat(mL(s.Y0,s.i1,s.$lt,s.t1)))}return i}F(),Et(),Ut();var AL="und";var TL=[{l:"Abkhaz",bh:"\u0410\u04a7\u0441\u0443\u0430",1:"ab",2:"abk","2T":"abk","2B":"abk",3:"abk"},{l:"Afar",bh:"Afaraf",1:"aa",2:"aar","2T":"aar","2B":"aar",3:"aar"},{l:"Afrikaans",bh:"Afrikaans",1:"af",2:"afr","2T":"afr","2B":"afr",3:"afr"},{l:"Akan",bh:"Akan",1:"ak",2:"aka","2T":"aka","2B":"aka",3:"aka"},{l:"Albanian",bh:"Shqip",1:"sq",2:"sqi","2T":"sqi","2B":"alb",3:"sqi"},{l:"Amharic",bh:"\u12a0\u121b\u122d\u129b",1:"am",2:"amh","2T":"amh","2B":"amh",3:"amh"},{l:"Arabic",bh:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",1:"ar",2:"ara","2T":"ara","2B":"ara",3:"ara"},{l:"Aragonese",bh:"Aragon\xe9s",1:"an",2:"arg","2T":"arg","2B":"arg",3:"arg"},{l:"Armenian",bh:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",1:"hy",2:"hye","2T":"hye","2B":"arm",3:"hye"},{l:"Assamese",bh:"\u0985\u09b8\u09ae\u09c0\u09af\u09bc\u09be",1:"as",2:"asm","2T":"asm","2B":"asm",3:"asm"},{l:"Avaric",bh:"\u0410\u0432\u0430\u0440",1:"av",2:"ava","2T":"ava","2B":"ava",3:"ava"},{l:"Avestan",bh:"avesta",1:"ae",2:"ave","2T":"ave","2B":"ave",3:"ave"},{l:"Aymara",bh:"Aymar",1:"ay",2:"aym","2T":"aym","2B":"aym",3:"aym"},{l:"Azerbaijani",bh:"Az\u0259rbaycanca",1:"az",2:"aze","2T":"aze","2B":"aze",3:"aze"},{l:"Bambara",bh:"Bamanankan",1:"bm",2:"bam","2T":"bam","2B":"bam",3:"bam"},{l:"Bashkir",bh:"\u0411\u0430\u0448\u04a1\u043e\u0440\u0442\u0441\u0430",1:"ba",2:"bak","2T":"bak","2B":"bak",3:"bak"},{l:"Basque",bh:"Euskara",1:"eu",2:"eus","2T":"eus","2B":"baq",3:"eus"},{l:"Belarusian",bh:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",1:"be",2:"bel","2T":"bel","2B":"bel",3:"bel"},{l:"Bengali",bh:"\u09ac\u09be\u0982\u09b2\u09be",1:"bn",2:"ben","2T":"ben","2B":"ben",3:"ben"},{l:"Bihari",bh:"\u092d\u094b\u091c\u092a\u0941\u0930\u0940",1:"bh",2:"bih","2T":"bih","2B":"bih",3:"bih"},{l:"Bislama",bh:"Bislama",1:"bi",2:"bis","2T":"bis","2B":"bis",3:"bis"},{l:"Bosnian",bh:"Bosanski",1:"bs",2:"bos","2T":"bos","2B":"bos",3:"bos"},{l:"Breton",bh:"Brezhoneg",1:"br",2:"bre","2T":"bre","2B":"bre",3:"bre"},{l:"Bulgarian",bh:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",1:"bg",2:"bul","2T":"bul","2B":"bul",3:"bul"},{l:"Burmese",bh:"\u1019\u103c\u1014\u103a\u1019\u102c\u1018\u102c\u101e\u102c",1:"my",2:"mya","2T":"mya","2B":"bur",3:"mya"},{l:"Catalan",bh:"Catal\xe0",1:"ca",2:"cat","2T":"cat","2B":"cat",3:"cat"},{l:"Chamorro",bh:"Chamoru",1:"ch",2:"cha","2T":"cha","2B":"cha",3:"cha"},{l:"Chechen",bh:"\u041d\u043e\u0445\u0447\u0438\u0439\u043d",1:"ce",2:"che","2T":"che","2B":"che",3:"che"},{l:"Chichewa",bh:"Chichewa",1:"ny",2:"nya","2T":"nya","2B":"nya",3:"nya"},{l:"Chinese",bh:"\u4e2d\u6587",1:"zh",2:"zho","2T":"zho","2B":"chi",3:"zho"},{l:"Chuvash",bh:"\u0427\u04d1\u0432\u0430\u0448\u043b\u0430",1:"cv",2:"chv","2T":"chv","2B":"chv",3:"chv"},{l:"Cornish",bh:"Kernewek",1:"kw",2:"cor","2T":"cor","2B":"cor",3:"cor"},{l:"Corsican",bh:"Corsu",1:"co",2:"cos","2T":"cos","2B":"cos",3:"cos"},{l:"Cree",bh:"\u14c0\u1426\u1403\u152d\u140d\u140f\u1423",1:"cr",2:"cre","2T":"cre","2B":"cre",3:"cre"},{l:"Croatian",bh:"Hrvatski",1:"hr",2:"hrv","2T":"hrv","2B":"hrv",3:"hrv"},{l:"Czech",bh:"\u010ce\u0161tina",1:"cs",2:"ces","2T":"ces","2B":"cze",3:"ces"},{l:"Danish",bh:"Dansk",1:"da",2:"dan","2T":"dan","2B":"dan",3:"dan"},{l:"Divehi",bh:"Divehi",1:"dv",2:"div","2T":"div","2B":"div",3:"div"},{l:"Dutch",bh:"Nederlands",1:"nl",2:"nld","2T":"nld","2B":"dut",3:"nld"},{l:"Dzongkha",bh:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41",1:"dz",2:"dzo","2T":"dzo","2B":"dzo",3:"dzo"},{l:"English",bh:"English",1:"en",2:"eng","2T":"eng","2B":"eng",3:"eng"},{l:"Esperanto",bh:"Esperanto",1:"eo",2:"epo","2T":"epo","2B":"epo",3:"epo"},{l:"Estonian",bh:"Eesti",1:"et",2:"est","2T":"est","2B":"est",3:"est"},{l:"Ewe",bh:"E\u028begbe",1:"ee",2:"ewe","2T":"ewe","2B":"ewe",3:"ewe"},{l:"Faroese",bh:"F\xf8royskt",1:"fo",2:"fao","2T":"fao","2B":"fao",3:"fao"},{l:"Fijian",bh:"Na Vosa Vaka-Viti",1:"fj",2:"fij","2T":"fij","2B":"fij",3:"fij"},{l:"Finnish",bh:"Suomi",1:"fi",2:"fin","2T":"fin","2B":"fin",3:"fin"},{l:"French",bh:"Fran\xe7ais",1:"fr",2:"fra","2T":"fra","2B":"fre",3:"fra"},{l:"Fula",bh:"Fulfulde",1:"ff",2:"ful","2T":"ful","2B":"ful",3:"ful"},{l:"Galician",bh:"Galego",1:"gl",2:"glg","2T":"glg","2B":"glg",3:"glg"},{l:"Georgian",bh:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",1:"ka",2:"kat","2T":"kat","2B":"geo",3:"kat"},{l:"German",bh:"Deutsch",1:"de",2:"deu","2T":"deu","2B":"ger",3:"deu"},{l:"Greek",bh:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",1:"el",2:"ell","2T":"ell","2B":"gre",3:"ell"},{l:"Guaran\xed",bh:"Ava\xf1e'\u1ebd",1:"gn",2:"grn","2T":"grn","2B":"grn",3:"grn"},{l:"Gujarati",bh:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",1:"gu",2:"guj","2T":"guj","2B":"guj",3:"guj"},{l:"Haitian",bh:"Krey\xf2l Ayisyen",1:"ht",2:"hat","2T":"hat","2B":"hat",3:"hat"},{l:"Hausa",bh:"\u0647\u064e\u0648\u064f\u0633\u064e",1:"ha",2:"hau","2T":"hau","2B":"hau",3:"hau"},{l:"Hebrew",bh:"\u05e2\u05d1\u05e8\u05d9\u05ea",1:"he",2:"heb","2T":"heb","2B":"heb",3:"heb"},{l:"Herero",bh:"Otjiherero",1:"hz",2:"her","2T":"her","2B":"her",3:"her"},{l:"Hindi",bh:"\u0939\u093f\u0928\u094d\u0926\u0940",1:"hi",2:"hin","2T":"hin","2B":"hin",3:"hin"},{l:"Hiri Motu",bh:"Hiri Motu",1:"ho",2:"hmo","2T":"hmo","2B":"hmo",3:"hmo"},{l:"Hungarian",bh:"Magyar",1:"hu",2:"hun","2T":"hun","2B":"hun",3:"hun"},{l:"Interlingua",bh:"Interlingua",1:"ia",2:"ina","2T":"ina","2B":"ina",3:"ina"},{l:"Indonesian",bh:"Bahasa Indonesia",1:"id",2:"ind","2T":"ind","2B":"ind",3:"ind"},{l:"Interlingue",bh:"Interlingue",1:"ie",2:"ile","2T":"ile","2B":"ile",3:"ile"},{l:"Irish",bh:"Gaeilge",1:"ga",2:"gle","2T":"gle","2B":"gle",3:"gle"},{l:"Igbo",bh:"Igbo",1:"ig",2:"ibo","2T":"ibo","2B":"ibo",3:"ibo"},{l:"Inupiaq",bh:"I\xf1upiak",1:"ik",2:"ipk","2T":"ipk","2B":"ipk",3:"ipk"},{l:"Ido",bh:"Ido",1:"io",2:"ido","2T":"ido","2B":"ido",3:"ido"},{l:"Icelandic",bh:"\xcdslenska",1:"is",2:"isl","2T":"isl","2B":"ice",3:"isl"},{l:"Italian",bh:"Italiano",1:"it",2:"ita","2T":"ita","2B":"ita",3:"ita"},{l:"Inuktitut",bh:"\u1403\u14c4\u1483\u144e\u1450\u1466",1:"iu",2:"iku","2T":"iku","2B":"iku",3:"iku"},{l:"Japanese",bh:"\u65e5\u672c\u8a9e",1:"ja",2:"jpn","2T":"jpn","2B":"jpn",3:"jpn"},{l:"Javanese",bh:"Basa Jawa",1:"jv",2:"jav","2T":"jav","2B":"jav",3:"jav"},{l:"Kalaallisut",bh:"Kalaallisut",1:"kl",2:"kal","2T":"kal","2B":"kal",3:"kal"},{l:"Kannada",bh:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",1:"kn",2:"kan","2T":"kan","2B":"kan",3:"kan"},{l:"Kanuri",bh:"Kanuri",1:"kr",2:"kau","2T":"kau","2B":"kau",3:"kau"},{l:"Kashmiri",bh:"\u0643\u0634\u0645\u064a\u0631\u064a",1:"ks",2:"kas","2T":"kas","2B":"kas",3:"kas"},{l:"Kazakh",bh:"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",1:"kk",2:"kaz","2T":"kaz","2B":"kaz",3:"kaz"},{l:"Khmer",bh:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",1:"km",2:"khm","2T":"khm","2B":"khm",3:"khm"},{l:"Kikuyu",bh:"G\u0129k\u0169y\u0169",1:"ki",2:"kik","2T":"kik","2B":"kik",3:"kik"},{l:"Kinyarwanda",bh:"Kinyarwanda",1:"rw",2:"kin","2T":"kin","2B":"kin",3:"kin"},{l:"Kyrgyz",bh:"\u041a\u044b\u0440\u0433\u044b\u0437\u0447\u0430",1:"ky",2:"kir","2T":"kir","2B":"kir",3:"kir"},{l:"Komi",bh:"\u041a\u043e\u043c\u0438",1:"kv",2:"kom","2T":"kom","2B":"kom",3:"kom"},{l:"Kongo",bh:"Kongo",1:"kg",2:"kon","2T":"kon","2B":"kon",3:"kon"},{l:"Korean",bh:"\ud55c\uad6d\uc5b4",1:"ko",2:"kor","2T":"kor","2B":"kor",3:"kor"},{l:"Kurdish",bh:"Kurd\xee",1:"ku",2:"kur","2T":"kur","2B":"kur",3:"kur"},{l:"Kwanyama",bh:"Kuanyama",1:"kj",2:"kua","2T":"kua","2B":"kua",3:"kua"},{l:"Latin",bh:"Latina",1:"la",2:"lat","2T":"lat","2B":"lat",3:"lat"},{l:"Luxembourgish",bh:"L\xebtzebuergesch",1:"lb",2:"ltz","2T":"ltz","2B":"ltz",3:"ltz"},{l:"Ganda",bh:"Luganda",1:"lg",2:"lug","2T":"lug","2B":"lug",3:"lug"},{l:"Limburgish",bh:"Limburgs",1:"li",2:"lim","2T":"lim","2B":"lim",3:"lim"},{l:"Lingala",bh:"Ling\xe1la",1:"ln",2:"lin","2T":"lin","2B":"lin",3:"lin"},{l:"Lao",bh:"\u0e9e\u0eb2\u0eaa\u0eb2\u0ea5\u0eb2\u0ea7",1:"lo",2:"lao","2T":"lao","2B":"lao",3:"lao"},{l:"Lithuanian",bh:"Lietuvi\u0173",1:"lt",2:"lit","2T":"lit","2B":"lit",3:"lit"},{l:"Luba-Katanga",bh:"Tshiluba",1:"lu",2:"lub","2T":"lub","2B":"lub",3:"lub"},{l:"Latvian",bh:"Latvie\u0161u",1:"lv",2:"lav","2T":"lav","2B":"lav",3:"lav"},{l:"Manx",bh:"Gaelg",1:"gv",2:"glv","2T":"glv","2B":"glv",3:"glv"},{l:"Macedonian",bh:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438",1:"mk",2:"mkd","2T":"mkd","2B":"mac",3:"mkd"},{l:"Malagasy",bh:"Malagasy",1:"mg",2:"mlg","2T":"mlg","2B":"mlg",3:"mlg"},{l:"Malay",bh:"Bahasa Melayu",1:"ms",2:"msa","2T":"msa","2B":"may",3:"msa"},{l:"Malayalam",bh:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",1:"ml",2:"mal","2T":"mal","2B":"mal",3:"mal"},{l:"Maltese",bh:"Malti",1:"mt",2:"mlt","2T":"mlt","2B":"mlt",3:"mlt"},{l:"M\u0101ori",bh:"M\u0101ori",1:"mi",2:"mri","2T":"mri","2B":"mao",3:"mri"},{l:"Marathi",bh:"\u092e\u0930\u093e\u0920\u0940",1:"mr",2:"mar","2T":"mar","2B":"mar",3:"mar"},{l:"Marshallese",bh:"Kajin M\u0327aje\u013c",1:"mh",2:"mah","2T":"mah","2B":"mah",3:"mah"},{l:"Mongolian",bh:"\u041c\u043e\u043d\u0433\u043e\u043b",1:"mn",2:"mon","2T":"mon","2B":"mon",3:"mon"},{l:"Nauru",bh:"Dorerin Naoero",1:"na",2:"nau","2T":"nau","2B":"nau",3:"nau"},{l:"Navajo",bh:"Din\xe9 Bizaad",1:"nv",2:"nav","2T":"nav","2B":"nav",3:"nav"},{l:"Northern Ndebele",bh:"isiNdebele",1:"nd",2:"nde","2T":"nde","2B":"nde",3:"nde"},{l:"Nepali",bh:"\u0928\u0947\u092a\u093e\u0932\u0940",1:"ne",2:"nep","2T":"nep","2B":"nep",3:"nep"},{l:"Ndonga",bh:"Owambo",1:"ng",2:"ndo","2T":"ndo","2B":"ndo",3:"ndo"},{l:"Norwegian Bokm\xe5l",bh:"Norsk (Bokm\xe5l)",1:"nb",2:"nob","2T":"nob","2B":"nob",3:"nob"},{l:"Norwegian Nynorsk",bh:"Norsk (Nynorsk)",1:"nn",2:"nno","2T":"nno","2B":"nno",3:"nno"},{l:"Norwegian",bh:"Norsk",1:"no",2:"nor","2T":"nor","2B":"nor",3:"nor"},{l:"Nuosu",bh:"\ua188\ua320\ua4bf Nuosuhxop",1:"ii",2:"iii","2T":"iii","2B":"iii",3:"iii"},{l:"Southern Ndebele",bh:"isiNdebele",1:"nr",2:"nbl","2T":"nbl","2B":"nbl",3:"nbl"},{l:"Occitan",bh:"Occitan",1:"oc",2:"oci","2T":"oci","2B":"oci",3:"oci"},{l:"Ojibwe",bh:"\u140a\u14c2\u1511\u14c8\u142f\u14a7\u140e\u14d0",1:"oj",2:"oji","2T":"oji","2B":"oji",3:"oji"},{l:"Old Church Slavonic",bh:"\u0421\u043b\u043e\u0432\u0463\u0301\u043d\u044c\u0441\u043a\u044a",1:"cu",2:"chu","2T":"chu","2B":"chu",3:"chu"},{l:"Oromo",bh:"Afaan Oromoo",1:"om",2:"orm","2T":"orm","2B":"orm",3:"orm"},{l:"Oriya",bh:"\u0b13\u0b21\u0b3f\u0b3c\u0b06",1:"or",2:"ori","2T":"ori","2B":"ori",3:"ori"},{l:"Ossetian",bh:"\u0418\u0440\u043e\u043d \xe6\u0432\u0437\u0430\u0433",1:"os",2:"oss","2T":"oss","2B":"oss",3:"oss"},{l:"Panjabi",bh:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",1:"pa",2:"pan","2T":"pan","2B":"pan",3:"pan"},{l:"P\u0101li",bh:"\u092a\u093e\u0934\u093f",1:"pi",2:"pli","2T":"pli","2B":"pli",3:"pli"},{l:"Persian",bh:"\u0641\u0627\u0631\u0633\u06cc",1:"fa",2:"fas","2T":"fas","2B":"per",3:"fas"},{l:"Polish",bh:"Polski",1:"pl",2:"pol","2T":"pol","2B":"pol",3:"pol"},{l:"Pashto",bh:"\u067e\u069a\u062a\u0648",1:"ps",2:"pus","2T":"pus","2B":"pus",3:"pus"},{l:"Portuguese",bh:"Portugu\xeas",1:"pt",2:"por","2T":"por","2B":"por",3:"por"},{l:"Quechua",bh:"Runa Simi",1:"qu",2:"que","2T":"que","2B":"que",3:"que"},{l:"Romansh",bh:"Rumantsch",1:"rm",2:"roh","2T":"roh","2B":"roh",3:"roh"},{l:"Kirundi",bh:"Kirundi",1:"rn",2:"run","2T":"run","2B":"run",3:"run"},{l:"Romanian",bh:"Rom\xe2n\u0103",1:"ro",2:"ron","2T":"ron","2B":"rum",3:"ron"},{l:"Russian",bh:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",1:"ru",2:"rus","2T":"rus","2B":"rus",3:"rus"},{l:"Sanskrit",bh:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d",1:"sa",2:"san","2T":"san","2B":"san",3:"san"},{l:"Sardinian",bh:"Sardu",1:"sc",2:"srd","2T":"srd","2B":"srd",3:"srd"},{l:"Sindhi",bh:"\u0633\u0646\u068c\u064a\u200e",1:"sd",2:"snd","2T":"snd","2B":"snd",3:"snd"},{l:"Northern Sami",bh:"S\xe1megiella",1:"se",2:"sme","2T":"sme","2B":"sme",3:"sme"},{l:"Samoan",bh:"Gagana S\u0101moa",1:"sm",2:"smo","2T":"smo","2B":"smo",3:"smo"},{l:"Sango",bh:"S\xe4ng\xf6",1:"sg",2:"sag","2T":"sag","2B":"sag",3:"sag"},{l:"Serbian",bh:"\u0421\u0440\u043f\u0441\u043a\u0438",1:"sr",2:"srp","2T":"srp","2B":"srp",3:"srp"},{l:"Gaelic",bh:"G\xe0idhlig",1:"gd",2:"gla","2T":"gla","2B":"gla",3:"gla"},{l:"Shona",bh:"ChiShona",1:"sn",2:"sna","2T":"sna","2B":"sna",3:"sna"},{l:"Sinhala",bh:"\u0dc3\u0dd2\u0d82\u0dc4\u0dbd",1:"si",2:"sin","2T":"sin","2B":"sin",3:"sin"},{l:"Slovak",bh:"Sloven\u010dina",1:"sk",2:"slk","2T":"slk","2B":"slo",3:"slk"},{l:"Slovene",bh:"Sloven\u0161\u010dina",1:"sl",2:"slv","2T":"slv","2B":"slv",3:"slv"},{l:"Somali",bh:"Soomaaliga",1:"so",2:"som","2T":"som","2B":"som",3:"som"},{l:"Southern Sotho",bh:"Sesotho",1:"st",2:"sot","2T":"sot","2B":"sot",3:"sot"},{l:"Spanish",bh:"Espa\xf1ol",1:"es",2:"spa","2T":"spa","2B":"spa",3:"spa"},{l:"Sundanese",bh:"Basa Sunda",1:"su",2:"sun","2T":"sun","2B":"sun",3:"sun"},{l:"Swahili",bh:"Kiswahili",1:"sw",2:"swa","2T":"swa","2B":"swa",3:"swa"},{l:"Swati",bh:"SiSwati",1:"ss",2:"ssw","2T":"ssw","2B":"ssw",3:"ssw"},{l:"Swedish",bh:"Svenska",1:"sv",2:"swe","2T":"swe","2B":"swe",3:"swe"},{l:"Tamil",bh:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",1:"ta",2:"tam","2T":"tam","2B":"tam",3:"tam"},{l:"Telugu",bh:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",1:"te",2:"tel","2T":"tel","2B":"tel",3:"tel"},{l:"Tajik",bh:"\u0422\u043e\u04b7\u0438\u043a\u04e3",1:"tg",2:"tgk","2T":"tgk","2B":"tgk",3:"tgk"},{l:"Thai",bh:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",1:"th",2:"tha","2T":"tha","2B":"tha",3:"tha"},{l:"Tigrinya",bh:"\u1275\u130d\u122d\u129b",1:"ti",2:"tir","2T":"tir","2B":"tir",3:"tir"},{l:"Tibetan Standard",bh:"\u0f56\u0f7c\u0f51\u0f0b\u0f61\u0f72\u0f42",1:"bo",2:"bod","2T":"bod","2B":"tib",3:"bod"},{l:"Turkmen",bh:"T\xfcrkmen\xe7e",1:"tk",2:"tuk","2T":"tuk","2B":"tuk",3:"tuk"},{l:"Tagalog",bh:"Tagalog",1:"tl",2:"tgl","2T":"tgl","2B":"tgl",3:"tgl"},{l:"Tswana",bh:"Setswana",1:"tn",2:"tsn","2T":"tsn","2B":"tsn",3:"tsn"},{l:"Tonga",bh:"faka Tonga",1:"to",2:"ton","2T":"ton","2B":"ton",3:"ton"},{l:"Turkish",bh:"T\xfcrk\xe7e",1:"tr",2:"tur","2T":"tur","2B":"tur",3:"tur"},{l:"Tsonga",bh:"Xitsonga",1:"ts",2:"tso","2T":"tso","2B":"tso",3:"tso"},{l:"Tatar",bh:"\u0422\u0430\u0442\u0430\u0440\u0447\u0430",1:"tt",2:"tat","2T":"tat","2B":"tat",3:"tat"},{l:"Twi",bh:"Twi",1:"tw",2:"twi","2T":"twi","2B":"twi",3:"twi"},{l:"Tahitian",bh:"Reo M\u0101\u2019ohi",1:"ty",2:"tah","2T":"tah","2B":"tah",3:"tah"},{l:"Uyghur",bh:"\u0626\u06c7\u064a\u063a\u06c7\u0631\u0686\u0647",1:"ug",2:"uig","2T":"uig","2B":"uig",3:"uig"},{l:"Ukrainian",bh:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",1:"uk",2:"ukr","2T":"ukr","2B":"ukr",3:"ukr"},{l:"Urdu",bh:"\u0627\u0631\u062f\u0648",1:"ur",2:"urd","2T":"urd","2B":"urd",3:"urd"},{l:"Uzbek",bh:"O\u2018zbek",1:"uz",2:"uzb","2T":"uzb","2B":"uzb",3:"uzb"},{l:"Venda",bh:"Tshiven\u1e13a",1:"ve",2:"ven","2T":"ven","2B":"ven",3:"ven"},{l:"Vietnamese",bh:"Ti\u1ebfng Vi\u1ec7t",1:"vi",2:"vie","2T":"vie","2B":"vie",3:"vie"},{l:"Volap\xfck",bh:"Volap\xfck",1:"vo",2:"vol","2T":"vol","2B":"vol",3:"vol"},{l:"Walloon",bh:"Walon",1:"wa",2:"wln","2T":"wln","2B":"wln",3:"wln"},{l:"Welsh",bh:"Cymraeg",1:"cy",2:"cym","2T":"cym","2B":"wel",3:"cym"},{l:"Wolof",bh:"Wolof",1:"wo",2:"wol","2T":"wol","2B":"wol",3:"wol"},{l:"Western Frisian",bh:"Frysk",1:"fy",2:"fry","2T":"fry","2B":"fry",3:"fry"},{l:"Xhosa",bh:"isiXhosa",1:"xh",2:"xho","2T":"xho","2B":"xho",3:"xho"},{l:"Yiddish",bh:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",1:"yi",2:"yid","2T":"yid","2B":"yid",3:"yid"},{l:"Yoruba",bh:"Yor\xf9b\xe1",1:"yo",2:"yor","2T":"yor","2B":"yor",3:"yor"},{l:"Zhuang",bh:"Cuengh",1:"za",2:"zha","2T":"zha","2B":"zha",3:"zha"},{l:"Zulu",bh:"isiZulu",1:"zu",2:"zul","2T":"zul","2B":"zul",3:"zul"}];F(),Et(),Ut();function SL(t){var n,i=null!=(n=function(t){var n=t.O0,i=new TC;return i.W0(n,0,n.byteLength),LC(i).w1}(t))?n:24;return t.tft/i}function EL(t){return t.Km===um.IC}function IL(t,n,i,r,e){for(var s,u=function(t,n,i,r){var e=i.tft,s=ue.fromNumber(t.ZN||0),u=r.lO(g_.gF(s,e));return{ift:r.iF(),eft:r,sft:u,nft:r}}(t,0,i,r),o=g_.pF(t.ct||0,i.tft),h=t.SD||0,c=!(65536&h)&&1!==(h>>24&3),a=_c(e),f=new Tc;f.ac=i)){var r=Ji(t,function(t,n){return new ML(t.map(function(t){return t?t.xft():null}),n).wft()});if(0!==r.length)return new xL(n,i,r)}},t}(),FL="black",VL="white";F(),Et(),F(),Et();var HL=[[42,225],[92,233],[94,237],[95,243],[96,250],[123,231],[124,247],[125,209],[126,241],[127,9608],[128,174],[129,176],[130,189],[131,191],[132,8482],[133,162],[134,163],[135,9834],[136,224],[137,32],[138,232],[139,226],[140,234],[141,238],[142,244],[143,251],[144,193],[145,201],[146,211],[147,218],[148,220],[149,252],[150,8216],[151,161],[152,42],[153,8217],[154,9473],[155,169],[156,8480],[157,8226],[158,8220],[159,8221],[160,192],[161,194],[162,199],[163,200],[164,202],[165,203],[166,235],[167,206],[168,207],[169,239],[170,212],[171,217],[172,249],[173,219],[174,171],[175,187],[176,195],[177,227],[178,205],[179,204],[180,236],[181,210],[182,242],[183,213],[184,245],[185,123],[186,125],[187,92],[188,94],[189,95],[190,124],[191,8764],[192,196],[193,228],[194,214],[195,246],[196,223],[197,165],[198,164],[199,9475],[200,197],[201,229],[202,216],[203,248],[204,9487],[205,9491],[206,9495],[207,9499]].reduce(function(t,n){return t[n[0]]=n[1],t},{}),WL=function(){function t(){this.Rft=[],this.Bft=0,this.Lft=void 0;for(var t=0;tMB&&(this.Bft=31)},n.Nft=function(t){var n=this.Bft+t;this.Dft(n)},n.Mft=function(){this.Nft(-1),this.Rft[this.Bft]=null},n.vft=function(t){t>=144&&this.Mft();var n=function(t){return HL[t]?String.fromCharCode(HL[t]):String.fromCharCode(t)}(t);this.addParsedChar(n)},n.addParsedChar=function(t){this.Bft>=MB||(32===Number(t)?(this.Rft[this.Bft]=this.Lft?"":"",this.Lft=!this.Lft):this.Rft[this.Bft]=t,this.Nft(1))},n.Oft=function(t){for(var n=t;n=n)return null;var r=(new OL).pft(this.qft.slice(1));return 0===r.length?null:{TO:new xL(t,n,r),WT:i,zft:this.Hft<<1|this.Wft+1}},n.hr=function(){this.Gft(),this.Xft=1},n.jft=function(){return this.Xft},n.Qft=function(t){this.Xft=t},n.Dft=function(t){this.qft[this.Xft].Dft(t)},n.Nft=function(t){this.qft[this.Xft].Nft(t)},n.Kft=function(){return this.Yft},n.Jft=function(t){this.Yft=t},n.vft=function(t,n){if(!(n<32||n>127)){var i="";switch(t){case 0:i=void 0!==GL[n]?GL[n]:String.fromCharCode(n);break;case 1:i=jL[n];break;case 2:this.Zft(),i=QL[n];break;case 3:this.Zft(),i=YL[n]}i&&this.qft[this.Xft].addParsedChar(i)}},n.Zft=function(){this.qft[this.Xft].Mft()},n.$ft=function(t,n,i){if(t>=n)for(var r=i-1;r>=0;r--)this.qft[t+r]=this.qft[n+r];else for(var e=0;e0?this.Yft:0,this.Gft()},n.evt=function(t){this.svt=t},n.nvt=function(t){this.rvt=t},n.ovt=function(t){this.avt=t},n.uvt=function(t){this.cvt=t},t}(),XL=15,qL=function(t){return t[t.dvt=0]="dvt",t[t.lvt=1]="lvt",t[t.fvt=2]="fvt",t[t.vvt=3]="vvt",t}({}),GL={39:"\u2019",42:"\xe1",92:"\xe9",94:"\xed",95:"\xf3",96:"\xfa",123:"\xe7",124:"\xf7",125:"\xd1",126:"\xf1",127:"\u2588"},jL={48:"\xae",49:"\xb0",50:"\xbd",51:"\xbf",52:"\u2122",53:"\xa2",54:"\xa3",55:"\u266a",56:"\xe0",57:"\u2800",58:"\xe8",59:"\xe2",60:"\xea",61:"\xee",62:"\xf4",63:"\xfb"},QL={32:"\xc1",33:"\xc9",34:"\xd3",35:"\xda",36:"\xdc",37:"\xfc",38:"\u2018",39:"\xa1",40:"*",41:"'",42:"\u2500",43:"\xa9",44:"\u2120",45:"\xb7",46:"\u201c",47:"\u201d",48:"\xc0",49:"\xc2",50:"\xc7",51:"\xc8",52:"\xca",53:"\xcb",54:"\xeb",55:"\xce",56:"\xcf",57:"\xef",58:"\xd4",59:"\xd9",60:"\xf9",61:"\xdb",62:"\xab",63:"\xbb"},YL={32:"\xc3",33:"\xe3",34:"\xcd",35:"\xcc",36:"\xec",37:"\xd2",38:"\xf2",39:"\xd5",40:"\xf5",41:"{",42:"}",43:"\\",44:"^",45:"_",46:"|",47:"~",48:"\xc4",49:"\xe4",50:"\xd6",51:"\xf6",52:"\xdf",53:"\xa5",54:"\xa4",55:"\u2502",56:"\xc5",57:"\xe5",58:"\xd8",59:"\xf8",60:"\u250c",61:"\u2510",62:"\u2514",63:"\u2518"},KL=function(){function t(t,n){this.Vp=void 0,this.Avt=void 0,this.mvt=void 0,this.yvt=void 0,this.pvt=void 0,this.gvt=void 0,this.wvt=void 0,this._vt=void 0,this.Vp=0,this.Avt=new zL(t,n),this.mvt=new zL(t,n),this.yvt=new zL(t,n),this.pvt=this.mvt,this.gvt=0,this.wvt=void 0,this._vt=!1}var n=t.prototype;return n.hr=function(){this._vt=!0,this.gvt=0,this.Vp=0,this.pvt=this.mvt,this.wvt=void 0,this.mvt.hr(),this.yvt.hr(),this.Avt.hr()},n.bvt=function(t,n){return[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&t)<<1|n>>5&1]},n.Svt=function(t,n){var i=this.bvt(t,n),r=(30&n)>>1,e=VL,s=!1;r<7?e=$L[r]:7===r&&(s=!0);var u=!(1&~n);if(4!==this.Vp){var o=this.pvt;if(3===this.Vp&&i!==o.jft()){var h=1+o.jft()-o.Kft(),c=1+i-o.Kft();o.$ft(c,h,o.Kft()),o.tvt(0,c-1),o.tvt(i+1,XL-i)}o.Qft(i);var a=xB[t<<1&14|n>>5&1]-1;if(!(a<0)){var f=function(t,n){var i=n>95?n-96:n-64;return{iit:BB[i].iit,tit:BB[i].tit,eit:BB[i].eit,vit:t}}(a,n);o.Dft(f.eit),this.pvt.evt(u),this.pvt.nvt(s),this.pvt.ovt(e),this.pvt.uvt(FL)}}},n.Tvt=function(t,n){this.pvt.evt(!1),this.pvt.nvt(!1),this.pvt.ovt(VL);var i=this.kvt(t,qL.dvt," ".charCodeAt(0)),r=VL,e=!1,s=!(1&~n);return"white_italics"===(r=$L[(14&n)>>1])&&(r="white",e=!0),this.pvt.evt(s),this.pvt.nvt(e),this.pvt.ovt(r),i},n.kvt=function(t,n,i){if(this.pvt.vft(n,i),2===this.Vp||3===this.Vp){var r=this.Evt(this.pvt,this.gvt,t);return this.gvt=t,r}return null},n.Evt=function(t,n,i){return this._vt?null:2===this.Vp||3===this.Vp?t.Vft(i,i+10):t.Vft(n,i)},n.Pvt=function(t,n){var i=FL;7&t||(i=ZL[(14&n)>>1]),this.pvt.uvt(i)},n.xvt=function(t){var n=JL,i=t.Ivt,r=t.Rvt,e=null;switch(i){case n.RCL:this.Cvt();break;case n.BS:this.Dvt();break;case n.AOD:case n.AON:case n.DER:break;case n.RU2:e=this.Bvt(2,r);break;case n.RU3:e=this.Bvt(3,r);break;case n.RU4:e=this.Bvt(4,r);break;case n.FON:e=this.Nvt(r);break;case n.RDC:this.Mvt(r);break;case n.TR:this.Lvt();break;case n.RTD:this.Ovt();break;case n.EDM:e=this.Fvt(r);break;case n.CR:e=this.Uvt(r);break;case n.ENM:this.Vvt();break;case n.EOC:e=this.Hvt(r)}return e},n.Uvt=function(t){var n=this.pvt;if(3!==this.Vp)return null;var i=this.Evt(n,this.gvt,t),r=n.jft()-n.Kft()+1;return n.$ft(r-1,r,n.Kft()),n.tvt(0,r-1),n.tvt(n.jft(),XL-n.jft()),this.gvt=t,i},n.Bvt=function(t,n){this.pvt=this.mvt;var i=this.pvt,r=null;return 3!==this.Vp&&4!==this.Vp&&(r=this.Evt(i,this.gvt,n),this.mvt.ivt(),this.yvt.ivt(),this._vt=!1,i.Qft(XL)),this.Vp=3,i.Jft(t),r},n.Nvt=function(t){return this.kvt(t,qL.dvt," ".charCodeAt(0))},n.Fvt=function(t){var n=this.mvt,i=null;return 4!==this.Vp&&(i=this.Evt(n,this.gvt,t)),n.Gft(),this._vt=!1,i},n.Mvt=function(t){this.Vp=2,this.pvt=this.mvt,this.pvt.Jft(0),this.gvt=t},n.Vvt=function(){this.yvt.Gft()},n.Hvt=function(t){var n=null;4!==this.Vp&&(n=this.Evt(this.mvt,this.gvt,t));var i=this.yvt;return this.yvt=this.mvt,this.mvt=i,this.Cvt(),this.gvt=t,n},n.Cvt=function(){this.Vp=1,this.pvt=this.yvt,this.pvt.Jft(0)},n.Dvt=function(){this.pvt.Zft()},n.Lvt=function(){this.Avt.hr(),this._vt=!1,this.Ovt()},n.Ovt=function(){this.pvt=this.Avt,this.Vp=4},n.Wvt=function(t,n,i){return this.pvt.vft(qL.dvt,n),this.kvt(t,qL.dvt,i)},n.qvt=function(t,n,i){var r=1&n?qL.vvt:qL.fvt;return this.kvt(t,r,i)},n.zvt=function(t){var n=t.Gvt,i=t.Ivt,r=t.Rvt;if(this.wvt===(n<<8|i))return this.wvt=void 0,null;if(this.wvt=n<<8|i,this.Xvt(n,i))this.Svt(n,i);else{if(this.jvt(n,i))return this.Tvt(r,i);if(this.Qvt(n,i))this.Pvt(n,i);else{if(this.Kvt(n,i))return this.kvt(r,qL.lvt,i);if(this.Yvt(n,i))return this.qvt(r,n,i);if(this.Jvt(n,i))return this.xvt(t);this.isTabOffset(n)&&this.pvt.Nft(i-32)}}return null},n.isTabOffset=function(t){return 23===t||31===t},n.Jvt=function(t,n){return 20==(246&t)&&32==(240&n)},n.Xvt=function(t,n){return 16==(240&t)&&64==(192&n)},n.jvt=function(t,n){return 17==(247&t)&&32==(240&n)},n.Qvt=function(t,n){return 16==(247&t)&&32==(240&n)||23==(247&t)&&45==(255&n)},n.Kvt=function(t,n){return 17==(247&t)&&48==(240&n)},n.Yvt=function(t,n){return 18==(246&t)&&32==(224&n)},t.Zvt=function(t){return 16==(112&t)},t}(),JL={RCL:32,BS:33,AOD:34,AON:35,DER:36,RU2:37,RU3:38,RU4:39,FON:40,RDC:41,TR:42,RTD:43,EDM:44,CR:45,ENM:46,EOC:47},ZL=["black","green","blue","cyan","red","yellow","magenta","black"],$L=["white","green","blue","cyan","red","yellow","magenta","white_italics"];F(),Et(),Ut(),Qt(),F(),Et(),F(),Et();var tU=function(){function t(t,n,i,r,e){this.$vt=void 0,this.svt=void 0,this.rvt=void 0,this.cvt=void 0,this.avt=void 0,this.$vt=t,this.svt=n,this.rvt=i,this.cvt=r,this.avt=e}var n=t.prototype;return n.xft=function(){return this.$vt},n.t_t=function(){return this.svt},n.i_t=function(){return this.rvt},n.e_t=function(){return this.cvt},n.s_t=function(){return this.avt},t}(),nU=function(){function t(t){this.C_t=void 0,this.yz=void 0,this.a_t=void 0,this.h_t=void 0,this.r_t=void 0,this.o_t=void 0,this.u_t=void 0,this.c_t=void 0,this.I_t=void 0,this.l_t=void 0,this.OO=void 0,this.Xft=void 0,this.g_t=void 0,this.rvt=void 0,this.svt=void 0,this.avt=void 0,this.cvt=void 0,this.C_t=t,this.yz=!1,this.a_t=!1,this.h_t=0,this.r_t=0,this.o_t=0,this.u_t=0,this.c_t=0,this.I_t=2,this.l_t=[],this.OO=0,this.Xft=0,this.g_t=0,this.rvt=!1,this.svt=!1,this.avt=VL,this.cvt=FL,this.d_t()}var n=t.prototype;return n.n_t=function(t,n,i,r,e,s,u){this.yz=t,this.r_t=n,this.h_t=i,this.o_t=r,this.a_t=e,this.u_t=s,this.c_t=u},n.d_t=function(){this.l_t=[];for(var t=0;t=0,n=this.g_t=0;return t&&n},n.Re=function(){return this.yz},n.m_t=function(t){for(var n=0,i=t;i=this.u_t)return this.m_t(1),void(this.g_t=0);this.Xft++,this.g_t=0},n.y_t=function(){this.l_t[this.Xft]=this.f_t(),this.g_t=0},n.Vft=function(t,n){if(this.OO>=t)return null;var i=UL.Pft(this.l_t,this.OO,t);return i?(this.A_t(t),{TO:i,WT:"svc"+n,zft:n}):null},n.b_t=function(t,n){this.Xft=t,this.g_t=n},n.S_t=function(t){this.cvt=t},n.T_t=function(t){this.avt=t},n.k_t=function(t){this.svt=t},n.E_t=function(t){this.rvt=t},n.P_t=function(){this.Xft=0,this.g_t=0,this.svt=!1,this.rvt=!1,this.avt=VL,this.cvt=FL},n.x_t=function(t){this.I_t=t},n.R_t=function(){this.yz=!0},n.we=function(){this.yz=!1},n.Mh=function(){this.yz=!this.yz},n.A_t=function(t){this.OO=t},t}(),iU=42,rU=15,eU=function(){function t(t){this.q_t=void 0,this.$_t=void 0,this.W_t=void 0,this.q_t=t,this.$_t=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0],this.W_t=void 0}var n=t.prototype;return n.D_t=function(t){var n=t.B_t(),i=n.zE,r=n.Rvt;i===cU&&(i=i<<16|t.B_t().zE);return i>=0&&i<=31?this.N_t(i,r):i>=128&&i<=159?this.M_t(t,i,r):(i>=4096&&i<=4127?this.L_t(t,255&i):i>=4224&&i<=4255?this.O_t(t,255&i):i>=32&&i<=127?this.F_t(i):i>=160&&i<=255?this.U_t(i):i>=4128&&i<=4223?this.V_t(255&i):i>=4256&&i<=4351&&this.H_t(255&i),null)},n.F_t=function(t){this.W_t&&(127!==t?this.W_t.v_t(String.fromCharCode(t)):this.W_t.v_t("\u266a"))},n.U_t=function(t){this.W_t&&this.W_t.v_t(String.fromCharCode(t))},n.V_t=function(t){if(this.W_t)if(void 0!==aU[t]){var n=aU[t];this.W_t.v_t(n)}else this.W_t.v_t("_")},n.H_t=function(t){this.W_t&&(160===t?this.W_t.v_t("[CC]"):this.W_t.v_t("_"))},n.N_t=function(t,n){if(!this.W_t)return null;var i=this.W_t,r=null;switch(t){case sU:i.p_t();break;case oU:i.Re()&&(r=i.Vft(n,this.q_t)),i.w_t();break;case hU:i.Re()&&(r=i.Vft(n,this.q_t)),i.y_t();break;case uU:i.Re()&&(r=i.Vft(n,this.q_t)),i.d_t(),i.b_t(0,0)}return r},n.M_t=function(t,n,i){if(n>=128&&n<=135){var r=7&n;this.z_t(r)}else{if(136===n){var e=t.B_t().zE;return this.G_t(e,i)}if(137===n){var s=t.B_t().zE;this.X_t(s,i)}else{if(138===n){var u=t.B_t().zE;return this.j_t(u,i)}if(139===n){var o=t.B_t().zE;return this.Q_t(o,i)}if(140===n){var h=t.B_t().zE;return this.K_t(h,i)}if(143===n)return this.hr(i);if(144===n)this.Y_t(t);else if(145===n)this.J_t(t);else if(146===n)this.b_t(t);else if(151===n)this.Z_t(t);else if(n>=152&&n<=159){var c=(15&n)-8;this.n_t(t,c,i)}}}return null},n.L_t=function(t,n){n>=8&&n<=15?t.rD(1):n>=16&&n<=23?t.rD(2):n>=24&&n<=31&&t.rD(3)},n.O_t=function(t,n){n>=128&&n<=135?t.rD(4):n>=136&&n<=143&&t.rD(5)},n.z_t=function(t){this.$_t[t]&&(this.W_t=this.$_t[t])},n.tgt=function(t){var n;return zt(this,function(i){switch(i.label){case 0:n=0,i.label=1;case 1:return n<8?!(1&~t)&&this.$_t[n]?[4,n]:[3,3]:[3,5];case 2:i.sent(),i.label=3;case 3:t>>=1,i.label=4;case 4:return n++,[3,1];case 5:return[2]}})},n.G_t=function(t,n){for(var i,r=null,e=Lt(this.tgt(t));!(i=e()).done;){var s=i.value,u=this.$_t[s];u.Re()&&(r=u.Vft(n,this.q_t)),u.d_t()}return r},n.X_t=function(t,n){for(var i,r=Lt(this.tgt(t));!(i=r()).done;){var e=i.value,s=this.$_t[e];s.Re()||s.A_t(n),s.R_t()}},n.j_t=function(t,n){for(var i,r=null,e=Lt(this.tgt(t));!(i=e()).done;){var s=i.value,u=this.$_t[s];u.Re()&&(r=u.Vft(n,this.q_t)),u.we()}return r},n.Q_t=function(t,n){for(var i,r=null,e=Lt(this.tgt(t));!(i=e()).done;){var s=i.value,u=this.$_t[s];u.Re()?r=u.Vft(n,this.q_t):u.A_t(n),u.Mh()}return r},n.K_t=function(t,n){for(var i,r=null,e=Lt(this.tgt(t));!(i=e()).done;){var s=i.value,u=this.$_t[s];u.Re()&&(r=u.Vft(n,this.q_t)),this.$_t[s]=void 0}return r},n.hr=function(t){var n=this.K_t(255,t);return this.Gy(),n},n.Gy=function(){this.W_t=void 0,this.$_t=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0]},n.Y_t=function(t){t.rD(1);var n=t.B_t().zE;if(this.W_t){var i=(128&n)>0,r=(64&n)>0;this.W_t.E_t(i),this.W_t.k_t(r)}},n.J_t=function(t){var n=t.B_t().zE,i=t.B_t().zE;if(t.rD(1),this.W_t){var r=3&n,e=(12&n)>>2,s=(48&n)>>4,u=3&i,o=(12&i)>>2,h=(48&i)>>4,c=this.igt(s,e,r),a=this.igt(h,o,u);this.W_t.T_t(c),this.W_t.S_t(a)}},n.b_t=function(t){var n=t.B_t().zE,i=t.B_t().zE;if(this.W_t){var r=15&n,e=63&i;this.W_t.b_t(r,e)}},n.Z_t=function(t){t.rD(1),t.rD(1);var n=t.B_t().zE;if(t.rD(1),this.W_t){var i=3&n;this.W_t.x_t(i)}},n.n_t=function(t,n,i){var r=void 0!==this.$_t[n];if(!r){var e=new nU(n);e.A_t(i),this.$_t[n]=e}var s=t.B_t().zE,u=t.B_t().zE,o=t.B_t().zE,h=t.B_t().zE,c=t.B_t().zE,a=t.B_t().zE,f=(32&s)>0,v=127&u,d=(128&u)>0,l=o,w=1+(15&h),g=(240&h)>>4,_=1+(63&c);r&&0===(7&a)||this.$_t[n].P_t(),this.$_t[n].n_t(f,v,l,g,d,w,_),this.W_t=this.$_t[n]},n.igt=function(t,n,i){var r={0:0,1:0,2:1,3:1};return fU[r[t]<<2|r[n]<<1|r[i]]},t}(),sU=8,uU=12,oU=13,hU=14,cU=16,aU={32:" ",33:"\xa0",37:"\u2026",42:"\u0160",44:"\u0152",48:"\u2588",49:"\u2018",50:"\u2019",51:"\u201c",52:"\u201d",53:"\u2022",57:"\u2122",58:"\u0161",60:"\u0153",61:"\u2120",63:"\u0178",118:"\u215b",119:"\u215c",120:"\u215d",121:"\u215e",122:"\u2502",123:"\u2510",124:"\u2514",125:"\u2500",126:"\u2518",127:"\u250c"},fU=["black","blue","green","cyan","red","magenta","yellow","white"];F(),Et();var vU=function(){function t(){this.rgt=void 0,this.ngt=void 0,this.sgt=void 0,this.rgt=[],this.ngt=null,this.sgt=0}var n=t.prototype;return n.egt=function(t){if(t.Km===gL.Xlt){var n=63&t.zE;return this.sgt=2*n-1,void(this.ngt=[])}if(this.ngt&&(this.sgt>0&&(this.ngt.push(t),this.sgt--),0===this.sgt)){var i=new dU(this.ngt);this.rgt.push(i),this.ngt=null,this.sgt=0}},n.hgt=function(){return this.rgt},n.ogt=function(){this.rgt=[]},n.Gy=function(){this.rgt=[],this.ngt=[],this.sgt=0},t}(),dU=function(){function t(t){this.ugt=void 0,this.cgt=void 0,this.ugt=0,this.cgt=t}var n=t.prototype;return n.agt=function(){return this.ugtthis.cgt.length)throw new fd(cd.SUBTITLE_PARSE_ERROR,"Buffer read out of bounds / invalid CEA-708 Data.");this.ugt+=t},t}(),lU=function(){function t(){this.fgt=void 0,this.vgt=void 0,this._gt=void 0,this.lgt=void 0,this.wgt=void 0,this.pgt=void 0,this.mgt=void 0,this.ggt=void 0,this.bgt=!1,this.fgt=[],this.vgt=[],this._gt=new vU,this.lgt=0,this.wgt=$u({CC1:new KL(0,0),CC2:new KL(0,1),CC3:new KL(1,0),CC4:new KL(1,1)}),this.pgt=0,this.mgt=0,this.ggt=Zu(),this.hr()}var n=t.prototype;return n.Gy=function(){this.lgt=0,this.fgt=[],this.vgt=[],this._gt.Gy(),this.hr(),this.ggt.forEach(function(t){t.Gy()})},n.hr=function(){this.pgt=0,this.mgt=0,this.wgt.forEach(function(t){t.hr()})},n.ygt=function(t,n){if(t.Klt){var i=t.Jlt,r=t.Zlt,e=t.Km;e===gL.qlt||e===gL.zlt?this.fgt.push({Rvt:n,Km:e,Gvt:i,Ivt:r,Agt:this.fgt.length}):this.bgt&&(this.vgt.push({Rvt:n,Km:e,zE:i,Agt:this.vgt.length}),this.vgt.push({Rvt:n,Km:gL.Glt,zE:r,Agt:this.vgt.length}))}},n.rj=function(){var t=[];this.fgt.sort(function(t,n){return t.Rvt-n.Rvt||t.Agt-n.Agt}),this.vgt.sort(function(t,n){return t.Rvt-n.Rvt||t.Agt-n.Agt});for(var n,i=Lt(this.fgt);!(n=i()).done;){var r=n.value,e=this.Sgt(r);e&&t.push(e)}for(var s,u=Lt(this.vgt);!(s=u()).done;){var o=s.value;this._gt.egt(o)}for(var h,c=Lt(this._gt.hgt());!(h=c()).done;){var a,f=h.value,v=this.Tgt(f);(a=t).push.apply(a,[].concat(v))}return this._gt.ogt(),this.fgt=[],this.vgt=[],t},n.Sgt=function(t){var n=t.Km;if(KL.Zvt(t.Gvt)){var i=t.Gvt>>3&1;0===n?this.pgt=i:this.mgt=i}var r="CC"+(n<<1|(n?this.mgt:this.pgt)+1),e=this.wgt.get(r);return 255===t.Gvt&&255===t.Ivt||!t.Gvt&&!t.Ivt||!this.kgt(t.Gvt)||!this.kgt(t.Ivt)?(++this.lgt>=45&&this.hr(),null):(this.lgt=0,t.Gvt&=127,t.Ivt&=127,t.Gvt||t.Ivt?KL.Zvt(t.Gvt)?e.zvt(t):e.Wvt(t.Rvt,t.Gvt,t.Ivt):null)},n.Tgt=function(t){var n=[];try{for(;t.agt();){var i=t.B_t().zE,r=(224&i)>>5,e=31&i;if(7===r&&0!==e)r=63&t.B_t().zE;if(0!==r){if(!this.ggt.has(r)){var s=new eU(r);this.ggt.set(r,s)}for(var u=this.ggt.get(r),o=t.dgt();t.dgt()-o>=1;return 1===n},t}();F(),Et(),Dt();var wU=function(t){function n(n,i){var r;return(r=t.call(this,"Egt")||this).zft=void 0,r.TO=void 0,r.zft=n,r.TO=i,r}return Ct(n,t),n}(rh),gU=g_.eU(.1),_U=function(t){function n(){var n;return(n=t.call(this)||this).xgt=void 0,n.xgt=new lU,n}Ct(n,t);var i=n.prototype;return i.Pgt=function(t,n){this.xgt.ygt(t,n)},i.rj=function(){for(var t,n=Lt(this.xgt.rj());!(t=n()).done;){var i=t.value;this.So(new wU(i.zft,i.TO))}},i.hr=function(){this.xgt.Gy()},i.kn=function(){this.Vo(),this.xgt.Gy()},n}(th),mU=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Dgt=[],n}Ct(n,t);var i=n.prototype;return i.Igt=function(t,n,i,r){var e=this.Rgt(t,r);this.Cgt(e,n,i),this.rj()},i.Rgt=function(t,n){var i,r=t.slice().sort(OB),e=this.Dgt;if(0===e.length)return r;if(0===r.length)return e;var s=e[0].sit,u=e[e.length-1].sit,o=r[0].sit,h=e[0].kot===r[0].kot;if(u.lF(o).uF().aF(g_.eU(2.5*n))&&h)i=e.concat(r).sort(OB);else if(o.nF(s)){for(var c=0;cu.EO?e.PO=u.EO:e.EO>u.EO&&u.PO>e.EO?u.PO=e.EO:e.EO===u.EO&&(e.PO=u.PO)}i.jgt(r,e)},i.Ngt=Zu(),i.qgt=new mU,i.qgt.wn("Egt",i.Xgt),i}Ct(n,t);var i=n.prototype;return i.Bgt=function(t){return this.Ngt.get(t)},i.Mgt=function(t){var n=this.Ngt.get(t.nit);return n||(n=this.Lgt(t),this.Ngt.set(t.nit,n)),n},i.Lgt=function(t){var n=[Yw.VI],i=function(t){if(t!==AL)for(var n,i=t.toLowerCase(),r=Lt(TL);!(n=r()).done;){var e=n.value;if(e[1]===i||e[2]===i||e["2T"]===i||e["2B"]===i||e[3]===i)return e}}(t.rit),r=i?i.l:"";t.Ogt&&(r="easy "+r,n.push(Yw.zI));var e=t.Th||r||"CC"+t.nit,s=this.Fgt(e,t.rit,n);return this.tt(s),s},i.Jrt=function(t){var n=ym.TD(_c(t));this.Ugt=function(t){for(var n,i=Lt(t.Z);!(n=i()).done;){var r=n.value,e=RL(r),s=r.KD.hB.uB.dB.fB,u=Ui(s,function(t){return t.Km===um.JR});if(!u){var o=s.filter(function(t){return t.Km===um.xC}),h=Ui(o,function(t){var n;return(null==(n=t.hN)?void 0:n.Km)===um.JR});h&&(u=h.hN)}if(u){var c=kC(_c(u.jB.ck),new Tc),a=u.KB;return Yu({},e,{$D:r.gD.$D,jB:Ac(u.jB.ck),Ti:u.Ti,Mi:u.Mi,CN:a&&a.CN,RN:a&&a.RN,t2:c.B0,Vgt:c.N0,i2:c.M0,O0:c.O0[0],F0:c.F0[0]})}}}(Ui(n,CL))},i.Odt=function(t,n,i,r,e,s){var u;if(this.Ugt&&(S(this.Hgt)||!Si(this.Hgt,n,1e-5))){S(this.Wgt)||Si(this.Wgt,n,.1)||this.qgt.hr();for(var o,h,c=function(t,n,i,r,e){for(var s,u=[],o=n.filter(EL),h=r(i),c=Lt(o);!(s=c()).done;){var a=s.value,f=Ui(a.Z,function(t){return t.gD.$D===i.$D});if(f)for(var v,d,l=f.gD.NN||0,w=f.gD.MN||0,g=f.GN?f.GN.GN:ue.ZERO,_=a.UN+(null!=(v=f.gD.XN)?v:ue.ZERO).toNumber(),m=Lt(f.zN);!(d=m()).done;)for(var y,p=d.value,k=_+(p.UN||0),b=Lt(p.JN);!(y=b()).done;){var A=y.value,T=A.Vy||w,S=new TC;S.W0(t,k,k+T);var E=g_.gF(g,i.tft);S.DU=e(A,a,i,E,kc(t,k,k+T)),u.push(S),k+=T,g=g.add(A.ct||l||h)}}return u}(t,ym.TD(_c(t)),this.Ugt,SL,IL),a=null!=(o=null==(u=nr(c,function(t){return t.DU.ct}))?void 0:u.DU.ct)?o:0,f=function(t){for(var n,i=[],r=Lt(t);!(n=r()).done;){var e,s=n.value;s.DU.uft&&(e=i).push.apply(e,[].concat(s.DU.uft)),delete s.DU.uft}for(var u=0;u0}(o,n)||0!==g.length){var y=bc(t),p=Ui(s,function(t){return t.Km===um.KR}),k=p?lm.vD(p.ck,um.YR):void 0,b=k?function(t){var n=t.ck.Ly();return n.rD(4),n.rD(4),n.ZC()}(k):1,A=Ui(f,function(t){return t.Km===um.QR});A&&function(t,n,i){var r=MU(_c(t),n),e=lm.fD(r,new Tc),s=e.ck;s.rD(4);for(var u=s.ZC(),o=0;o=0;S--){var I=g[S];y=OU(y,I.Zgt,v,T,I.$gt,i)}return{tpt:y,ipt:{ept:g.length,BN:b}}}}}}}}}}function xU(t,n,i){var r=xc(t,i,n.ck.ck.byteOffset+n.ck.ck.byteLength);return LU(MU(_c(r),n),i.byteLength),r}function OU(t,n,i,r,e,s){var u=function(t,n,i){0;var r=t.ck.ck,e=WU(),s=new E(r.byteLength+e.byteLength),u=_c(s);s.set(mc(r),0),LU(u,e.byteLength),tc(u,new Tc(qU),n),s.set(e,r.byteLength),tc(u,new Tc(r.byteLength+zU),t.Km),i&&Fh(u,new Tc(r.byteLength+XU),i);return s}(n,e,s),o=xc(t,u,n.ck.ck.byteOffset),h=_c(o);!function(t,n){var i=lm.fD(t,new Tc),r=lm.yD(i.ck,um.jR,!1),e=_c(r.ck),s=e.getUint32(0);e.setUint32(0,s+n)}(MU(h,i),1);for(var c,a=Lt(r);!(c=a()).done;){LU(MU(h,c.value),u.byteLength)}return o}function MU(t,n){var i=n.ck.ck.byteOffset;return gc(t,i,i+n.ck.ck.byteLength)}function LU(t,n){var i=new Tc,r=qh(t,i);if(0===r);else if(1===r){i.Ny(4);var e=jh(t,i.Ly());Qh(t,i,e.add(n))}else i.My(0),Gh(t,i,r+n)}F(),Et(),Dt(),Ut();var UU=function(t){function n(n){var i;return(i=t.call(this)||this).npt=void 0,i.YJ=void 0,i.rpt=[],i.npt=n,i}Ct(n,t);var i=n.prototype;return i.start=function(t){this.YJ=t},i.transform=function(t){this.A$(t),this.spt()},i.flush=function(){this.S$(),this.spt()},i.C$=function(t){return t===um.IC},i.B$=function(t){var n=bc(mc(t.ck.ck)),i=lm.fD(_c(n),new Tc);n=FU(n,i,this.npt),this.rpt.push(n)},i.M$=function(t){this.rpt.push(t)},i.spt=function(){for(var t,n=Lt(function(t){if(t.length<2)return t;for(var n=[],i=t[0],r=i.buffer,e=i.byteOffset,s=i.byteLength,u=1;u=0;s--){var u=e[s];u.Km===um.DC&&(r=VU(r,u,n,i))}return r}function VU(t,n,i,r){var e=MU(_c(t),n),s=lm.fD(e,new Tc),u=lm.aD(s.ck),o=Ui(u,function(t){return t.Km===um.BC});if(!o)return t;var h=o.ck,c=h.KC.Ly(),a=h.ZC(),f=mm(a).flags;h.rD(4),f.Oy(hm.BASE_DATA_OFFSET_PRESENT)&&h.rD(8);var v=h.KC.Ly();if(f.Oy(hm.SAMPLE_DESCRIPTION_INDEX_PRESENT)){var d=qh(h.ck,v);return Gh(h.ck,h.KC,d+r.ept),t}Gh(h.ck,c,a|hm.SAMPLE_DESCRIPTION_INDEX_PRESENT);var l=new E(4);_c(l).setUint32(0,r.BN+r.ept);for(var w,g=h.ck.byteOffset+v.ac,_=Lt(u.filter(function(t){return t.Km===um.NC}));!(w=_()).done;){HU(w.value,l.byteLength)}for(var m=0,y=[o,n,i];m0?n.An(n.V-1):0;var i=t.An(0);isFinite(i)&&this.dpt=0;s--){var u=e[s];u.Km===um.IC&&(i=FU(i,u,n))}return i}(h,this.Apt)),u={Km:FR.vZ,ck:h}),c={xet:n.EO,ct:n.ct,bU:r,i2:null==(s=i.kot)?void 0:s.jI},a=this.Trt.IP,[4,this.bpt()];case 1:return d.sent(),[4,this.Trt.H2(u,c,e)];case 2:return d.sent(),f=this.Trt.IP,v=this.Trt.M3,[2,QU(a,f,v,n)]}})}).call(this)},i.Jrt=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c,a,f;return zt(this,function(v){switch(v.label){case 0:return dr(i),this.ypt&&this.ypt.Jrt(new E(t.Iht)),s=new E(t.Iht),this.Spt(n)&&(u=this.fpt.Tpt,o=[],u&&(o=Ji(u.kpt,function(t){return t.BW}),h=u.Ept.uH?XE(u.Ept.uH):void 0),(c=BU(s,o,h))?(this.Apt=c.ipt,s=c.tpt):this.Apt=void 0),(null==(r=this.Trt)?void 0:r.Cd)&&this.Trt.Cd.qT!==n.qT?(a={qT:n.qT},this.Trt.TZ(a)?[4,this.Trt.EZ(a)]:[3,2]):[3,2];case 1:v.sent(),dr(i),v.label=2;case 2:return f={Km:FR.vZ,ck:s},[4,this.bpt()];case 3:return v.sent(),[4,this.Trt.z2(f,{i2:null==(e=n.kot)?void 0:e.jI},i)];case 4:return v.sent(),[2]}})}).call(this)},i.Ldt=function(t,n,i){return this.Trt._S(t,n,i)},i.t$=function(t,n){this.Trt.F3(t,n)},i.i$=function(t,n){this.Trt.U3(t,n)},i.cpt=function(){return this.Trt?this.Trt.IP:TA.iL()},i.upt=function(){return this.Trt?this.Trt.M3:TA.iL()},i.Ppt=function(){return this.Trt?this.Trt._S(0,1/0):ut.resolve()},i.xpt=function(){return this.Trt&&(this.Trt.mn(LR.lZ,this.Rs),this.Trt=void 0),ut.resolve()},i.Ipt=function(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:return i=PM.Yct(null!=(n=t.ilt)?n:t.rat,this.Vct),r=i.oQ,this.Trt||(this.Trt=this.fpt.Rpt(r),this.Trt.wn(LR.lZ,this.Rs),this.Qct=new YM(this.Trt)),[4,this.bpt()];case 1:return e.sent(),[2]}})}).call(this)},i.Un=function(t,n){var i=hr.ep([n]);this.rV.Zg(),this.rV=i;var r=this.Cpt(t,this.Dpt,i.Yg);return this.Dpt=r,r},i.Bpt=function(t){if(!ji(this.Npt,Dg.CEA608)){var n=t.Nut.Wdt;if(function(t){return t.some(function(t){return t.y8===IU||t.y8===RU})}(n)){this.ypt=new bU(this.JU);for(var i,r=function(t){for(var n,i=[],r=Lt(t);!(n=r()).done;){var e=n.value;if(e.y8===IU)for(var s,u=Lt(UB(e.zE));!(s=u()).done;){var o=s.value;i.push(o)}else if(e.y8===RU)for(var h,c=Lt(SU(e.zE));!(h=c()).done;){var a=h.value;if(a.nit<=4){var f=EU[a.nit];i.push(Yu({},a,{nit:f}))}}}return i}(n),e=Lt(r);!(i=e()).done;){var s=i.value;this.ypt.Mgt(s)}this.opt.FW(this.ypt.Z)}}},i.Cpt=function(t,n,i){return Vt(function(){return zt(this,function(r){switch(r.label){case 0:return dr(i),n?[4,n.catch(di)]:[3,2];case 1:r.sent(),r.label=2;case 2:return this.dlt===t&&this.Mpt?[2]:[4,this.Lpt()];case 3:return r.sent(),dr(i),[4,this.Ppt()];case 4:return r.sent(),dr(i),t?[4,this.sV(t)]:[3,6];case 5:r.sent(),r.label=6;case 6:return[2]}})}).call(this)},i.Lpt=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return t=this.dlt,this.dlt=void 0,this.Mpt=!1,this.dpt=void 0,t&&(t.mn(Dw.EI,this.Opt),t.ult(!1),t.mn(Dw.NO_QUALITY,this.Rs)),this.Fpt&&(this.Fpt.kn(),this.Fpt=void 0),this.flt?[4,this.flt.kn()]:[3,2];case 1:n.sent(),this.flt=void 0,n.label=2;case 2:return this.ypt?(this.opt.WW(this.ypt.Z),[4,this.ypt.kn()]):[3,4];case 3:n.sent(),n.label=4;case 4:return[2]}})}).call(this)},i.sV=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.dlt=t,this.Bpt(t),t.wn(Dw.EI,this.Opt),t.wn(Dw.NO_QUALITY,this.Rs),[4,this.Ipt(t)];case 1:return n.sent(),this.flt=this.Upt(t),this.flt.wn(GU,this.Rs),this.flt.wn("Eot",this.gpt),this.flt.Bot=t.ilt,this.Fpt=new NU(this.TL,this.flt),this.Fpt.wn(Dw.TI,this.Ydt),t.ult(!0),this.Mpt=!0,[2]}})}).call(this)},i.Upt=function(t){return new QM(this,this.TL,this.TL,this.nV,this.Rz,this.Vdt,this.eut,this.Xct,this.Vct,this.Qct,this._dt,this.lq).Ret(t)},i.hr=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.rV.Zg(),this.Dpt?[4,this.Dpt.catch(di)]:[3,2];case 1:n.sent(),this.Dpt=void 0,n.label=2;case 2:return[4,this.Lpt()];case 3:return n.sent(),t?[3,5]:[4,this.Ppt()];case 4:n.sent(),n.label=5;case 5:return[4,this.xpt()];case 6:return n.sent(),[2]}})}).call(this)},i.Vpt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.Lpt()];case 1:return t.sent(),[2]}})}).call(this)},i.Qdt=function(t){var n;null==(n=this.hpt)||n.Qdt(t)},i.Gdt=function(t,n){return Vt(function(){var i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,this.Jot()];case 1:if(o.sent(),null==(i=this.hpt)||i.Gdt(n),!((e=null==(r=this.flt)?void 0:r.Cot.$ut.Xut(t))&&e.V>0))return[3,5];s=0,o.label=2;case 2:return s=t.Nut.wct.An?b.max(n,this.An):n;return e=b.max(r,e),TA.tL(r,e).CM()}},{key:"QW",get:function(){return this.Uut.JM(this.MP)}},{key:"qut",get:function(){return this.fpt.qut}},{key:"MP",get:function(){return this.TL.MP}},{key:"Tn",get:function(){return this.dlt?this.dlt.Nut.wct.Tn:NaN}},{key:"An",get:function(){var t=this.vpt(),n=this.dpt;return void 0===t?NaN:void 0!==n?n:t}},{key:"Mi",get:function(){return this.fpt.Mi}},{key:"Ti",get:function(){return this.fpt.Ti}},{key:"_pt",get:function(){return this.dpt}}]),n}(th);function QU(t,n,i,r){var e,s,u=n.UM(t.CM());return 0===(u=u.UM(i.UM(n))).V?s=e=r.PO:(e=u.Tn(0),s=u.An(0)),{kdt:e,Edt:s}}var YU=0;var KU=function(t){function n(n,i,r,e,s,u,o,h,c,a,f,v,d,l){var w,g,_;return(w=t.call(this)||this).gO=void 0,w.YL=new ng,w.$L=new ng,w.Gl=void 0,w.JU=void 0,w.Qpt=void 0,w.nV=void 0,w.Rz=void 0,w.eut=void 0,w.TL=void 0,w.jpt=void 0,w.lmt=[],w.cmt=new hr,w.hmt=!0,w.Nlt=[],w.imt=void 0,w.lq=void 0,w.Dpt=void 0,w._dt=void 0,w.Npt=void 0,w.d3=void 0,w.Vdt=void 0,w.ju=void 0,w.wpt=void 0,w.Ypt=void 0,w.$pt=wi(function(){w.So(new qR(w.MP))},350),w.vmt=function(t){var n=t.Emt.hpt;if(n)for(var i,r=Lt(w.lmt);!(i=r()).done;){var e,s=i.value;s.hpt&&s.hpt!==n&&s.Km===(null==(e=n.Jdt)?void 0:e.Km)&&(s.mn("fmt",w.vmt),s.hpt.Rt=!1,s.wn("fmt",w.vmt))}w.Rs(t)},w.mmt=function(t){vr(t)||w.So(new _b(vd(t,cd.MEDIA_LOAD_ERROR)))},w.omt=function(t){var n=t.z6;n&&w.wmt(n).catch(w.mmt)},w.Pmt=function(t){w.ymt(t).catch(w.mmt)},w.umt=function(t){for(var n,i=Lt(w.Nlt);!(n=i()).done;){var r=function(){var n=s.value,i=n.xW;if(void 0===i||0===i.length)return"continue";var r=t.Ey;i.filter(function(t){return t.A8&&Dc(new E(r),new E(t.A8))}).forEach(function(t){n.xmt(t)})},e=n.value.hpt;if(void 0!==e)for(var s,u=Lt(e.rat);!(s=u()).done;)r()}},w.amt=function(t){var n=t.z6;if(n)for(var i,r=Lt(w.pmt);!(i=r()).done;)for(var e,s=i.value,u=Lt(s.Nut.rat);!(e=u()).done;){var o=e.value,h=(o.xW||[]).some(function(t){return t.uH&&Dc(pc(n),XE(t.uH))});o.olt&&h&&(o.olt=!1,o.kot&&s.Qdt(o.kot))}},w.nV=r,w.Rz=e,w.eut=s,w.TL=n,w.gO=mg(),w.lmt=[],w.jpt=o,w.imt=h,w.lq=l,w.JU=a,w.Qpt=new cL(n,r,e,s,a,null==(_=null==u||null==(g=u.dash)?void 0:g.segmentRelativeVttTiming)||_),w.Gl=new Eb([w.Qpt.nt]),w._dt=v,w.Npt=d,w.jpt.wn(FO.bot,w.Rs),w.ju=c,w.d3=i,w.Vdt=u.lowLatency,w.wpt=f,w.Ypt=u.abr,w.TL.wn(eh.py,w.omt),w.TL.wn(eh.Pw,w.amt),w.TL.wn(eh.LICENSE_REQUEST_GENERATED,w.umt),w}Ct(n,t);var i=n.prototype;return i.VY=function(t,n){return this.zpt(t,n)},i.zpt=function(t,n){return Vt(function(){var i,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:for(i=Lt(t);!(r=i()).done;)e=r.value,this.Gpt(e);return[4,this.Un(n)];case 1:h.sent(),s=Lt(this.jpt.Xpt),h.label=2;case 2:return(u=s()).done?[3,6]:(o=u.value).Km!==ig.NT?[3,5]:o.rat&&0!==o.rat.length?[3,3]:(this.So(new aL("No supported representation found in the AdaptationSet with mimetype : "+o.Km)),[3,5]);case 3:return[4,this.Qpt.sV(o)];case 4:h.sent(),h.label=5;case 5:return[3,2];case 6:return[2]}})}).call(this)},i.Kpt=function(t){return new jU(t,this,this.TL,this.nV,this.Rz,this.eut,this.JU,this.wpt,this.Ypt,this._dt,this.Npt,this.Vdt,this.lq)},i.zot=function(){return this.Nlt.some(function(t){return t.zot()})},i.Wut=function(){return 0!==this.Nlt.length&&this.Nlt.every(function(t){return t.Wut()})},i.gpt=function(){this.Jpt()&&this.So(new dL)},i.Rpt=function(t){if(Fv(t)){if(this.d3.Q3)return this.d3.Q3}else if(Vv(t)&&this.d3.K3)return this.d3.K3;throw new y("Cannot allocate source buffer for mime type "+t)},i.Zpt=function(t){t.wn([zm.ma,eh.Yw,eh.iy,eh.oy,eh.ly,eh.Sw],this.Rs),t.wn(LR.lZ,this.$pt),t.wn("qpt",this.Rs)},i.tmt=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,ut.all(this.Nlt.map(function(n){return n.kn(t)}))];case 1:return n.sent(),Yi(this.Nlt),[2]}})}).call(this)},i.Jpt=function(){if(this.zot())return!1;if(!this.Wut())return!1;var t=this.IP;if(0===t.V)return!1;var n=this.MP;if(this.emt)return t.Tn(t.V-1)<=n;var i=t.Mn(this.qut);if(0===i.V)return!0;var r=i.Tn(i.V-1),e=i.An(i.V-1)+.1;return r<=n&&n<=e},i.Jot=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.hmt?[2]:(this.hmt=!0,[4,ut.all(this.Nlt.map(function(n){return n.Jot(t)}))]);case 1:return n.sent(),[2]}})}).call(this)},i.$ot=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.hmt?(this.hmt=!1,[4,ut.all(this.Nlt.map(function(n){return n.$ot(t)}))]):[2];case 1:return n.sent(),[2]}})}).call(this)},i.kn=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.TL.mn(eh.py,this.omt),this.TL.mn(eh.Pw,this.amt),this.TL.mn(eh.LICENSE_REQUEST_GENERATED,this.umt),this.Vo(),this.jpt.mn(FO.bot,this.Rs),this.cmt.Zg(),this.Dpt?[4,this.Dpt.catch(di)]:[3,2];case 1:n.sent(),this.Dpt=void 0,n.label=2;case 2:return[4,this.tmt(t)];case 3:return n.sent(),[4,this.Qpt.kn()];case 4:return n.sent(),this.YL.kn(),this.$L.kn(),this.Gl.kn(),this.dmt(),[2]}})}).call(this)},i.Gpt=function(t){this.lmt.push(t),t.wn("fmt",this.vmt);for(var n,i=t.Km===ig.Dk?this.YL:this.$L,r=Lt(t.Z);!(n=r()).done;){var e=n.value;i.tt(e)}},i._mt=function(t){for(var n,i=t.Km===ig.Dk?this.YL:this.$L,r=Lt(t.Z);!(n=r()).done;){var e=n.value;i.it(e),e.kn()}t.kn(),Xi(this.lmt,t)},i.dmt=function(){for(var t=this.lmt.length-1;t>=0;t--)this._mt(this.lmt[t])},i.Un=function(t,n){return this.cmt.Zg(),this.cmt=hr.ep([n]),this.Dpt=_r(this.lE(t,this.Dpt,this.cmt.Yg),this.cmt).catch(this.mmt),this.Dpt},i.lE=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c,a,f,v,d;return zt(this,function(l){switch(l.label){case 0:return n?[4,n.catch(di)]:[3,2];case 1:l.sent(),l.label=2;case 2:dr(i),r=[],e=this.Nlt.slice(),s=t.slice(),Yi(this.Nlt),u=Lt(e),l.label=3;case 3:return(o=u()).done?[3,7]:(h=o.value,(c=h.hpt)&&ji(s,c)?(this.Nlt.push(h),r.push(h.Un(c,i)),Xi(s,c),[3,6]):[3,4]);case 4:return this.Gl.WW(h.nt),[4,h.kn()];case 5:l.sent(),dr(i),l.label=6;case 6:return[3,3];case 7:for(a=Lt(s);!(f=a()).done;)v=f.value,d=this.Kpt(v.Lot),this.Gl.FW(d.nt),this.Nlt.push(d),this.Zpt(d),r.push(d.Un(v,i));return[4,ut.all(r)];case 8:return l.sent(),[2]}})}).call(this)},i.EZ=function(t,n,i){return Vt(function(){return zt(this,function(r){switch(r.label){case 0:return this.d3===i?[3,2]:(this.d3=i,[4,this.tmt(!1)]);case 1:r.sent(),r.label=2;case 2:return[4,this.Un(t)];case 3:return r.sent(),this.imt=n,[2]}})}).call(this)},i.wmt=function(t){return Vt(function(){var n,i,r,e,s,u,o,h;return zt(this,function(c){switch(c.label){case 0:n=Lt(this.Nlt),c.label=1;case 1:if((i=n()).done)return[3,6];if(r=i.value,void 0===(e=r.hpt))return[3,5];s=Lt(e.Nut.rat),c.label=2;case 2:return(u=s()).done?[3,5]:(o=u.value,h=o.xW||[],!h.some(function(n){return n.uH&&Dc(pc(t),XE(n.uH))})||o.olt?[3,4]:(o.olt=!0,[4,r.Gdt(o,o.kot)]));case 3:c.sent(),this.So(new tN(new eg(cd.CONTENT_PROTECTION_OUTPUT_RESTRICTED,"Content unavailable due to DRM restrictions"))),c.label=4;case 4:return[3,2];case 5:return[3,1];case 6:return[2]}})}).call(this)},i.ymt=function(t){return Vt(function(){var n,i,r,e,s,u,o,h;return zt(this,function(c){switch(c.label){case 0:n=Lt(this.Nlt),c.label=1;case 1:if((i=n()).done)return[3,6];if(e=function(){var n,i,e,u;return zt(this,function(o){switch(o.label){case 0:return n=h.value,i=n.xW,e=n.kot,void 0===i||0===i.length||void 0===e?[2,"continue"]:i.some(function(t){return ji(n.Amt,t)})?(u=r.bmt(i,t.Ty),e.cst===u?[3,3]:u?(s.Qdt(e),[3,3]):[3,1]):[2,"continue"];case 1:return[4,s.Gdt(n,e)];case 2:o.sent(),o.label=3;case 3:return[2]}})},s=i.value,void 0===(u=s.hpt))return[3,5];o=Lt(u.rat),c.label=2;case 2:return(h=o()).done?[3,5]:(r=this,[5,Xt(e())]);case 3:c.sent(),c.label=4;case 4:return[3,2];case 5:return[3,1];case 6:return[2]}})}).call(this)},i.bmt=function(t,n){var i=!1,r=t.reduce(function(t,n){return!n.uH||ji(t,n.uH)?t:[].concat(t,[n.uH])},[]);return 0===r.length||(n.zy(function(e,s){"usable"===e&&((t.some(function(t){return t.uH&&Dc(pc(s),XE(t.uH))})||Pc(s,Uc)&&1===r.length&&1===n.Vy)&&(i=!0))}),i)},i.iat=function(t){var n=function(){var n=r.value,i=Ui(t.Nlt,function(t){return t.B3===n.B3});void 0!==i&&n.iat(i)};if(void 0!==t){var i=t.jpt;if(this.jpt.Smt===i||this.jpt.Tmt===i)for(var r,e=Lt(this.Nlt);!(r=e()).done;)n()}},Nt(n,[{key:"jI",get:function(){return this.gO}},{key:"ct",get:function(){return this.TL.ct}},{key:"Rt",get:function(){return this.Nlt.some(function(t){return t.Rt})}},{key:"ht",get:function(){return this.YL}},{key:"IP",get:function(){if(0===this.Nlt.length)return TA.iL();for(var t,n=this.Nlt.map(function(t){return t.IP}),i=TA.tL(0,1/0),r=Lt(n);!(t=r()).done;){var e=t.value;i=i.Mn(e)}if(0===i.V)return i;if(this.Wut()){var s=i.Mn(this.qut);if(0===s.V)return i;for(var u,o=s.An(s.V-1),h=0,c=Lt(this.Nlt);!(u=c()).done;){var a=u.value;h=b.max(h,a._pt)}o<=h&&(i=i.OM(new TA([o,h],[!0,!0])))}return i}},{key:"p8",get:function(){return this.TL.p8}},{key:"MP",get:function(){return this.TL.MP}},{key:"Tpt",get:function(){return this.imt}},{key:"An",get:function(){if(this.emt){var t=this.ct;if(!S(t)&&t!==bi)return t}if(!this.Nlt.length)return NaN;for(var n,i=0,r=Lt(this.Nlt);!(n=r()).done;){var e=n.value;i=b.max(i,e.An)}return i}},{key:"emt",get:function(){var t=this.jpt.Idt;if(t.Km===fL.wV)return!1;var n=t.smt;return 0!==n.length&&this.jpt===n[n.length-1]}},{key:"Sx",get:function(){if(!this.Nlt.length)return TA.iL();for(var t,n=TA.eL(),i=Lt(this.Nlt);!(t=i()).done;){var r=t.value;n=n.Mn(r.Sx)}if(n.V>0&&this.emt&&isFinite(this.ct)){var e=this.ct,s=n.An(n.V-1);e>s&&(n=n.OM(TA.tL(s,e).CM()))}return n}},{key:"Mc",get:function(){return this.jpt}},{key:"nt",get:function(){return this.Gl}},{key:"rt",get:function(){return this.$L}},{key:"Ti",get:function(){return this.ju.Ti}},{key:"Mi",get:function(){return this.ju.Mi}},{key:"QW",get:function(){var t=this.MP,n=this.IP,i=n.VM(t);if(-1!==i)return{Tn:n.Tn(i),An:n.An(i)}}},{key:"qut",get:function(){var t=this.jpt.Tn,n=this.emt?1/0:this.jpt.An;return TA.tL(t,n)}},{key:"nmt",get:function(){return this.hmt}},{key:"gmt",get:function(){return this.lmt.map(function(t){return t.hpt}).filter(Un)}},{key:"pmt",get:function(){return this.Nlt.map(function(t){return t.hpt}).filter(Un)}},{key:"kmt",get:function(){return this.lmt}}]),n}(th);F(),Et(),Wt(),Bt(),Qt(),F(),Et(),Ut(),F(),Et(),Bt();var JU=/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d*\.?\d*)S)?)?$/,ZU=function(){function t(t){this.Imt=void 0,this.Imt=t}var n=t.prototype;return n.Rmt=function(){return this.Imt},n.Cmt=function(){return 1e3*this.Imt},t.TD=function(n){var i=n.match(JU);if(!i)throw new y("The given value could not be parsed as a valid DateTimeInterval");return new t(31536e3*(Number(i[1])||0)+2592e3*(Number(i[2])||0)+86400*(Number(i[3])||0)+3600*(Number(i[4])||0)+60*(Number(i[5])||0)+(Number(i[6])||0))},Nt(t,[{key:"ift",get:function(){return g_.eU(this.Imt,1e3)}}]),t}();F(),Et();var $U=function(t){return t.Dmt="progressive",t.Bmt="interlaced",t.pk="unknown",t}({});F(),Et();var tF=function(){function t(t,n){this.Nmt=void 0,this.Mmt=void 0,this.Nmt=t,this.Mmt=n}return t.prototype.iF=function(){return this.Nmt/this.Mmt},t}();F(),Et();var nF=1886614376;function iF(t){var n=XE(ao),i=t.byteLength,r=12+n.length+4+i,e=new E(r),s=_c(e),u=new Tc;return Gh(s,u,r),Gh(s,u,nF),Gh(s,u,0),Fh(s,u,n),Gh(s,u,i),Fh(s,u,new E(t)),e}var rF=/^(?:true|false)$/i,eF=/^(-?)(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:Z|([+-])(\d{2}):(\d{2}))?$/;function sF(t){if(void 0!==t)return ZU.TD(t)}function uF(t){if(void 0!==t){var n=t.match(eF);if(!n)throw new y("The given value could not be parsed as a valid Date");var i=n[1],r=n[2],e=n[3],s=n[4],u=n[5],o=n[6],h=n[7],c=n[8],a=n[9],f=n[10],v=n[11],d=("-"===i?-1:1)*Number(r),l=Number(e)-1,w=Number(s),g=Number(u),_=Number(o),m=Number(h),p=Number("0."+(c||"")),k=b.round(1e3*p);if(a)_-=("-"===a?-1:1)*(60*Number(f)+Number(v));var A=new Date(Date.UTC(d,l,w,g,_,m,k));if(S(A.getTime()))throw new y("The given value could not be parsed as a valid Date");return A}}function oF(t){if(t){var n=/(\d+)-(\d+)/.exec(t);if(n)return[cF(n[1]),cF(n[2])]}}function hF(t){if(void 0!==t){if(!S(Number(t)))try{return ue.fromString(t,!0)}catch(t){}throw new y("The given value could not be parsed as a valid unsigned long")}}function cF(t){if(void 0!==t){var n=Number(t);if(!S(n))return n;throw new y("The given value could not be parsed as a valid Number")}}function aF(t){if(void 0!==t){var n=t.split("/"),i=Number(n[0]),r=Number(n[1]||1);if(!S(i)&&!S(r))return new tF(i,r);throw new y("The given value could not be parsed as a valid frame rate")}}function fF(t){if(void 0!==t){if(rF.test(t))return"true"===t.toLowerCase();if(!S(A(t)))return Boolean(A(t));throw new y("The given value could not be parsed as a valid Boolean.")}}function vF(t){return{Yu:t.eP,Lmt:fF(t.sP("availabilityTimeComplete")),Omt:cF(t.sP("availabilityTimeOffset"))}}function dF(t){return t.map(vF)}function lF(t){var n,i=TF(t),r=function(t,n,i,r){var e=t.nP(i,n);return void 0===e&&(e=t.sP(r+":"+n)),e}(t,"default_KID","urn:mpeg:cenc:2013","cenc"),e=Tm(t,"pssh","urn:mpeg:cenc:2013","cenc")[0];if(void 0!==e&&(n=Oc(e.eP)),!n){var s=Tm(t,"pro","urn:microsoft:playready","mspr")[0];void 0!==s&&(n=function(t){var n=Oc(t.eP);return iF(n)}(s))}return{uH:r,A8:n,y8:i.y8,zE:i.zE}}function wF(t){return{Fmt:t.sP("sourceURL"),Sat:oF(t.sP("range"))}}function gF(t,n){var i=t.sP("d"),r=t.sP("t"),e=cF(t.sP("r"));n.push({ct:i,EO:r,Umt:e})}function _F(t){return{aut:t.sP("index"),Vmt:oF(t.sP("indexRange")),KD:t.sP("media"),Hmt:oF(t.sP("mediaRange"))}}function mF(t){var n=pF(t),i=function(t){var n=t.map(_F);return n.length>0?n:void 0}(t.YE("SegmentURL"));return Yu({},n,{Wmt:i,qmt:t.sP("xlink:href"),zmt:t.sP("xlink:actuate")})}function yF(t){var n=fF(t.sP("availabilityTimeComplete")),i=cF(t.sP("availabilityTimeOffset")),r=oF(t.sP("indexRange")),e=fF(t.sP("indexRangeExact")),s=t.YE("Initialization");if(s.length>1)throw new y("The provided MPEG-DASH document's "+t.JE+" element can not have more than one Initialization element.");var u=1===s.length?wF(s[0]):void 0,o=hF(t.sP("presentationTimeOffset")),h=t.YE("RepresentationIndex");if(h.length>1)throw new y("The provided MPEG-DASH document's "+t.JE+" element can not have more than one RepresentationIndex element.");return{Lmt:n,Omt:i,Vmt:r,Gmt:e,Xmt:u,jmt:o,Qmt:1===h.length?wF(h[0]):void 0,Kmt:sF(t.sP("timeShiftBufferDepth")),qD:cF(t.sP("timescale"))}}function pF(t){var n=yF(t),i=t.YE("BitstreamSwitching"),r=i.length>0?wF(i[0]):void 0,e=cF(t.sP("duration")),s=t.YE("SegmentTimeline");if(s.length>1)throw new y("The provided MPEG-DASH document's "+t.JE+" element can not have more than one SegmentTimeline element.");var u=1===s.length?function(t){for(var n,i=[],r=Lt(t.YE("S"));!(n=r()).done;)gF(n.value,i);return i}(s[0]):void 0;return Yu({},n,{Ymt:r,ct:e,$rt:u,Jmt:cF(t.sP("startNumber")),Zmt:cF(t.sP("endNumber"))})}function kF(t){return{$mt:function(t){if(t){var n=t.split(/\s/);return n.length>1?(n.length=2,n.map(cF)):1===n.length?n.map(cF)[0]:void 0}}(t.sP("audioSamplingRate")),frt:t.sP("codecs"),twt:fF(t.sP("codingDependency")),xW:function(t){if(0!==t.length)return t.map(lF)}(t.YE("ContentProtection")),iwt:function(t){return t.map(SF)}(t.YE("EssentialProperty")),ewt:function(t){return t.map(EF)}(t.YE("SupplementalProperty")),plt:aF(t.sP("frameRate")),Mi:cF(t.sP("height")),swt:cF(t.sP("maxPlayoutRate")),nwt:cF(t.sP("maximumSAPPeriod")),oQ:t.sP("mimeType"),rwt:t.sP("profiles"),hwt:t.sP("sar"),owt:function(t){switch(t){case $U.Dmt:case $U.Bmt:case $U.pk:return t;default:return}}(t.sP("scanType")),awt:t.sP("segmentProfiles"),uwt:cF(t.sP("startWithSAP")),Ti:cF(t.sP("width"))}}function bF(t){var n=dF(t.YE("BaseURL")),i=t.YE("SegmentBase");if(i.length>1)throw new y("The provided MPEG-DASH document's "+t.VE+" element can not have more than one SegmentBase element.");var r=1===i.length?yF(i[0]):void 0,e=function(t){var n=t.map(mF);return n.length>0?n:void 0}(t.YE("SegmentList")),s=t.YE("SegmentTemplate");if(s.length>1)throw new y("The provided MPEG-DASH document's "+t.VE+" element can not have more than one SegmentTemplate element.");var u=1===s.length?function(t){return Yu({},pF(t),{cwt:t.sP("bitstreamSwitching"),dwt:t.sP("index"),lwt:t.sP("initialization"),fwt:t.sP("media")})}(s[0]):void 0;return{vwt:n,_wt:r,gwt:e,pwt:u}}function AF(t){var n=kF(t),i=bF(t),r=cF(t.sP("bandwidth")),e=t.sP("dependencyId"),s=t.sP("id"),u=t.sP("mediaStreamStructureId"),o=cF(t.sP("qualityRanking"));if(t.YE("SegmentBase").length>1)throw new y("The provided MPEG-DASH document's Representation element can not have more than one SegmentBase element.");return Yu({},n,i,{kW:r,mwt:e,o:s,wwt:u,ywt:o})}function TF(t){return{y8:t.sP("schemeIdUri"),zE:t.sP("value")}}function SF(t){return TF(t)}function EF(t){return TF(t)}function IF(t){return TF(t)}function RF(t){return TF(t)}function CF(t){var n,i=kF(t),r=bF(t),e=function(t){return t.map(RF)}(t.YE("Accessibility")),s=fF(t.sP("bitstreamSwitching")),u=t.sP("contentType"),o=cF(t.sP("group")),h=cF(t.sP("id")),c=(null==(n=t.YE("Label")[0])?void 0:n.eP)||"",a=t.sP("lang"),f=cF(t.sP("maxBandwidth")),v=aF(t.sP("maxFrameRate")),d=cF(t.sP("maxHeight")),l=cF(t.sP("maxWidth")),w=cF(t.sP("minBandwidth")),g=aF(t.sP("minFrameRate")),_=cF(t.sP("minHeight")),m=cF(t.sP("minWidth")),p=t.sP("par"),k=function(t){return t.map(AF)}(t.YE("Representation"));if(0===k.length)throw new y("The provided MPEG-DASH document has an AdaptationSet with no valid Representation's");var b,A=function(t){return t.map(IF)}(t.YE("Role")),T=fF(t.sP("segmentAlignment"))||!1,S=cF(t.sP("selectionPriority")),E=S||1,I=fF(t.sP("subsegmentAlignment"))||!1;try{b=cF(t.sP("subsegmentStartsWithSAP"))}catch(t){}return Yu({},i,r,{Wdt:e,Ymt:s,qT:u,Jdt:o,o:h,Th:c,bs:a,Awt:f,bwt:v,Swt:d,Twt:l,kwt:w,Ewt:g,Pwt:_,xwt:m,Iwt:p,rat:k,Plt:A,Rwt:T,Kq:E,Cwt:I,Dwt:b,Bwt:t.sP("xlink:actuate")||"onRequest",Nwt:t.sP("xlink:href")})}function DF(t){var n=hF(t.sP("presentationTime"))||ue.ZERO,i=hF(t.sP("duration")),r=cF(t.sP("id")),e=function(t){for(var n=t.iP,i={},r=0;r1)throw new y("The provided MPEG-DASH document's Period element can not have more than one AssetIdentifier element.");var r=1===i.length?function(t){return TF(t)}(i[0]):void 0,e=function(t){return t.map(CF)}(t.YE("AdaptationSet")),s=fF(t.sP("bitstreamSwitching")),u=sF(t.sP("duration")),o=function(t){return t.map(PF)}(t.YE("EventStream")),h=t.sP("id"),c=sF(t.sP("start")),a=(t.YE("Subset"),t.sP("xlink:href"));return Yu({},n,{Ilt:e,Mwt:r,Ymt:s,ct:u,Lwt:o,o:h,Tn:c,Bwt:t.sP("xlink:actuate"),Nwt:a})}function BF(t){var n=t.sP("schemeIdUri");if(n)return{y8:n,zE:t.sP("value")}}function xF(t,n){var i=uF(t.sP("availabilityEndTime")),r=uF(t.sP("availabilityStartTime")),e=dF(t.YE("BaseURL")),s=t.sP("id"),u=function(t){return t.map(function(t){return""+t.eP})}(t.YE("Location")),o=sF(t.sP("maxSegmentDuration")),h=sF(t.sP("maxSubsegmentDuration")),c=sF(t.sP("mediaPresentationDuration")),a=(t.YE("Metrics"),sF(t.sP("minBufferTime")));if(!a)throw new y("The provided MPEG-DASH document's MPD element does not have the required 'minimumBufferTime' attribute.");var f=sF(t.sP("minimumUpdatePeriod")),v=function(t){return t.map(function(t){return NF(t)})}(t.YE("Period"));if(!v.length)throw new y("The provided MPEG-DASH document's MPD element does not have the required 'Period' element.");var d=t.sP("profiles");if(!d)throw new y("The provided MPEG-DASH document's MPD element does not have the required 'profiles' attribute.");var l=uF(t.sP("publishTime")),w=sF(t.sP("suggestedPresentationDelay")),g=sF(t.sP("timeShiftBufferDepth")),_=function(t){switch(t){case fL.mV:case fL.wV:return t;default:return}}(t.sP("type")),m=function(t){for(var n,i=[],r=Lt(t);!(n=r()).done;){var e=BF(n.value);e&&i.push(e)}return i}(t.YE("UTCTiming")),p=function(t){if(0===t.length)return;var n=t[0],i=n.YE("Latency");if(0===i.length)return;var r=function(t){var n=t[0],i=cF(n.sP("target"));if(void 0===i)return;var r=cF(n.sP("min")),e=cF(n.sP("max"));return{Owt:i,YF:r,KF:e}}(i);if(void 0===r)return;var e=function(t){if(0===t.length)return;var n=t[0],i=cF(n.sP("max")),r=cF(n.sP("min"));return{YF:r,KF:i}}(n.YE("PlaybackRate"));return{Fwt:r,ux:e}}(t.YE("ServiceDescription"));return{Uwt:i,Vwt:r,vwt:e,o:s,Hwt:u,Wwt:n,qwt:o,zwt:h,Gwt:c,Xwt:a,Qwt:f,smt:v,rwt:d,Kwt:l,Ywt:w,Kmt:g,Km:_,Jwt:m,Zwt:p}}var OF=function(){function t(){}return t.prototype.$wt=function(t,n){return function(t,n){if(!t)throw new y("The provided MPEG-DASH document does not contain a valid MPD root element.");return xF(t,n)}(Vn.UE(t).uP,n)},t}();function MF(t){return{get bandwidth(){return t.kW},get codecs(){return t.frt},get id(){return t.o},get uid(){return t.jI},get name(){return t.Th},get averageBandwidth(){return t.tyt},get label(){return t.Th},set label(n){t.Th=Xw(n)},get available(){return t.cst},get score(){return t.iyt},addEventListener:function(n,i){t.wn(n,i)},removeEventListener:function(n,i){t.mn(n,i)}}}function LF(t){return xw(MF(t),{get height(){return t.Mi},get width(){return t.Ti},get frameRate(){return t.plt},get firstFrame(){return t.eyt}})}function UF(t){return xw(MF(t),{get audioSamplingRate(){return t.$mt}})}F(),Et(),Bt(),F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Bt(),Dt(),F(),Et(),Bt(),Dt(),F(),Et(),F(),Et(),Dt();var FF=function(t){function n(n){var i;return(i=t.call(this,"update")||this).quality=void 0,i.quality=n,i}return Ct(n,t),n}(rh),VF=function(t){function n(n,i,r,e,s){var u;return(u=t.call(this)||this).o=void 0,u.kW=void 0,u.frt=void 0,u.nyt=void 0,u.jI=void 0,u.pO=void 0,u.syt=void 0,u.o=n,u.kW=i,u.frt=r,u.nyt=s,u.jI=kg(),u.pO=e||"",u.syt=!0,u}Ct(n,t);var i=n.prototype;return i.QU=function(){this.syt=!1,this.So(new FF(this.Ca))},i.jU=function(){this.syt=!0,this.So(new FF(this.Ca))},Nt(n,[{key:"Th",get:function(){return this.pO},set:function(t){this.pO!==t&&(this.pO=t,this.So(new FF(this.Ca)))}},{key:"tyt",get:function(){}},{key:"cst",get:function(){return this.syt}},{key:"iyt",get:function(){}}]),n}(th),HF=function(t){function n(n,i,r,e,s,u,o,h,c){var a;return void 0===c&&(c=0),(a=t.call(this,n,i,r,e,s)||this).plt=void 0,a.Ti=void 0,a.Mi=void 0,a.eyt=void 0,a.hu=void 0,a.plt=u,a.Ti=o,a.Mi=h,a.eyt=c,a.hu=void 0,a}return Ct(n,t),Nt(n,[{key:"Ca",get:function(){return this.hu||(this.hu=LF(this)),this.hu}}]),n}(VF),WF=function(t){function n(n,i,r,e,s,u){var o;return(o=t.call(this,n,i,r,e,s)||this).$mt=void 0,o.hu=void 0,o.$mt=u,o.hu=void 0,o}return Ct(n,t),Nt(n,[{key:"Ca",get:function(){return this.hu||(this.hu=UF(this)),this.hu}}]),n}(VF);F(),Et(),F(),Et(),Bt(),Dt();var zF=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).ayt=function(t){n.So(t)},n}return Ct(n,t),Nt(n,[{key:"ryt",get:function(){var t=this.hyt();return null==t?void 0:t.Tn}},{key:"oyt",get:function(){var t=this.hyt();return null==t?void 0:t.An}}]),n}(th),XF=function(t){function n(n,i){var r;if((r=t.call(this)||this).Kot=void 0,r.hu=void 0,r.uyt=void 0,r.vyt=void 0,r.lyt=void 0,r.gyt=!1,r.pyt=!1,r.dyt=[],r.Kot=n,r.uyt=i,r.uyt.wn(FO.yot,r.ayt),r.Km===ig.Bk){var e,s,u=null!=(s=null==(e=r.plt)?void 0:e.iF())?s:NaN;r.vyt=new HF(r.o,r.kW,r.Np,"","",u,r.Ti,r.Mi)}else r.Km===ig.Dk?r.vyt=new WF(r.o,r.kW,r.Np,"","",r.$mt):r.vyt=void 0;return r}Ct(n,t);var i=n.prototype;return i.Nct=function(t){var n=iM(t)?this.uyt.myt(t):this.uyt.Nct(t);return{Yu:n.Yu,Sat:n.Sat,zk:this.Idt.zk}},i.wyt=function(){return this.uyt.wyt()},i.hyt=function(){return this.uyt.hyt()},i.yyt=function(){return this.uyt.yyt()},i.kct=function(t){return this.uyt.kct(t)},i.Pct=function(t,n,i){return this.uyt.Pct(t,this.Idt.zk,n,i)},i.pdt=function(t){return iM(t)?this.$rt.Ayt(t,this.uyt):this.$rt.pdt(t)},i.mct=function(t){return iM(t)?this.$rt.byt(t,this.uyt):this.$rt.mct(t)},i.xmt=function(t){ji(this.dyt,t)||this.dyt.push(t)},i.kn=function(){this.uyt.mn(FO.yot,this.ayt),this.dyt=[]},Nt(n,[{key:"Nut",get:function(){return this.Kot}},{key:"$mt",get:function(){var t;return null!=(t=this.uyt.ck.$mt)?t:this.Nut.$mt}},{key:"kW",get:function(){return this.uyt.ck.kW||0}},{key:"frt",get:function(){var t=this.uyt.ck;return t.frt?[t.frt]:this.Nut.frt}},{key:"cyt",get:function(){var t=this.uyt.ck;return t.frt?[t.frt]:[]}},{key:"Np",get:function(){return this.uyt.ck.frt||this.Nut.Np}},{key:"twt",get:function(){return this.uyt.ck.twt||this.Nut.twt}},{key:"xW",get:function(){return this.uyt.ck.xW||this.Nut.xW}},{key:"Amt",get:function(){return this.dyt}},{key:"qT",get:function(){return this.oQ+'; codecs="'+this.Np+'"'}},{key:"iwt",get:function(){var t=this.uyt.ck;return t.iwt.length?t.iwt:this.Nut.iwt}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{get id(){return t.o},get type(){return t.Km},get bandwidth(){return t.kW},get width(){return t.Ti},get height(){return t.Mi},get frameRate(){var n,i;return null!=(i=null==(n=t.plt)?void 0:n.iF())?i:NaN},get audioSamplingRate(){return t.$mt}}}(this))}},{key:"plt",get:function(){var t;return null!=(t=this.uyt.ck.plt)?t:this.Nut.plt}},{key:"Mi",get:function(){return this.uyt.ck.Mi||this.Nut.Mi}},{key:"o",get:function(){return this.uyt.ck.o||""}},{key:"Bdt",get:function(){return this.lyt},set:function(t){this.lyt=t}},{key:"Ddt",get:function(){var t=this.uyt.fyt();if(t)return{Yu:t.Yu,Sat:t.Sat,zk:this.Idt.zk}}},{key:"swt",get:function(){return this.uyt.ck.swt||this.Nut.swt||1}},{key:"nwt",get:function(){return this.uyt.ck.nwt||this.Nut.nwt}},{key:"Idt",get:function(){return this.wct.Idt}},{key:"oQ",get:function(){return this.uyt.ck.oQ||this.Nut.oQ}},{key:"wct",get:function(){return this.Nut.wct}},{key:"rwt",get:function(){return this.uyt.ck.rwt||this.Nut.rwt}},{key:"kot",get:function(){return this.vyt}},{key:"hwt",get:function(){return this.uyt.ck.hwt||this.Nut.hwt}},{key:"owt",get:function(){return this.uyt.ck.owt||this.Nut.owt}},{key:"_yt",get:function(){return this.uyt._yt}},{key:"awt",get:function(){return this.uyt.ck.awt||this.Nut.awt}},{key:"$rt",get:function(){return this.uyt.$rt}},{key:"uwt",get:function(){return this.uyt.ck.uwt||this.Nut.uwt}},{key:"Km",get:function(){var t=this.oQ.split("/")[0];return"application"===t||"text"===t||ey(this.oQ,this.frt)?ig.NT:"video"===t?ig.Bk:"audio"===t?ig.Dk:"image"===t?ig.Nk:ig.pk}},{key:"Ti",get:function(){return this.uyt.ck.Ti||this.Nut.Ti}},{key:"Sct",get:function(){return this.gyt},set:function(t){this.gyt=t}},{key:"olt",get:function(){return this.pyt},set:function(t){this.pyt=t}}]),n}(zF),qF=function(t){function n(n,i){var r;return(r=t.call(this)||this).uyt=void 0,r.jpt=void 0,r.elt=[],r.jpt=n,r.uyt=i,r.uyt.wn(FO.yot,r.ayt),r}Ct(n,t);var i=n.prototype;return i.er=function(t,n){return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:return i=this,0!==this.elt.length?[3,2]:(r=this.uyt.rat.map(function(r){return i.Tyt(r,t,n)}),e=this,[4,ut.all(r)]);case 1:e.elt=s.sent().filter(Un),s.label=2;case 2:return this.kyt(),[2]}})}).call(this)},i.Tyt=function(t,n,i){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return r=new XF(this,t),[4,n(r)];case 1:return e=s.sent(),dr(i),e?[2,r]:[2,void 0]}})}).call(this)},i.kyt=function(){if(!this.elt.length)throw new y("Detected an AdaptationSet without any supported Representations.")},i.hyt=function(){return this.uyt.hyt()},i.yyt=function(){return this.uyt.yyt()},i.kn=function(){this.uyt.mn(FO.yot,this.ayt);for(var t,n=Lt(this.elt);!(t=n()).done;){t.value.kn()}Yi(this.elt)},Nt(n,[{key:"Wdt",get:function(){return this.uyt.ck.Wdt}},{key:"$mt",get:function(){var t;return null!=(t=this.uyt.ck.$mt)?t:-1}},{key:"frt",get:function(){if(this.uyt.ck.frt)return[this.uyt.ck.frt];for(var t,n=[],i=Lt(this.rat);!(t=i()).done;){var r=t.value;r.cyt.length&&-1===n.indexOf(r.Np)&&n.push(r.Np)}return n}},{key:"Np",get:function(){return this.frt.join()}},{key:"twt",get:function(){return this.uyt.ck.twt}},{key:"xW",get:function(){return this.uyt.ck.xW}},{key:"qT",get:function(){return this.oQ+'; codecs="'+this.Np+'"'}},{key:"iwt",get:function(){return this.uyt.iwt}},{key:"ewt",get:function(){return this.uyt.ewt}},{key:"plt",get:function(){return this.uyt.ck.plt}},{key:"Jdt",get:function(){return this.uyt.ck.Jdt}},{key:"Mi",get:function(){return this.uyt.ck.Mi||0}},{key:"o",get:function(){return this.uyt.ck.o}},{key:"Th",get:function(){return this.uyt.ck.Th||""}},{key:"swt",get:function(){return this.uyt.ck.swt}},{key:"nwt",get:function(){return this.uyt.ck.nwt}},{key:"Idt",get:function(){return this.wct.Idt}},{key:"oQ",get:function(){return this.uyt.ck.oQ||this.elt[0].oQ}},{key:"wct",get:function(){return this.jpt}},{key:"rwt",get:function(){return this.uyt.ck.rwt}},{key:"rat",get:function(){return this.elt}},{key:"Plt",get:function(){return this.uyt.ck.Plt||[]}},{key:"hwt",get:function(){return this.uyt.ck.hwt}},{key:"owt",get:function(){return this.uyt.ck.owt}},{key:"awt",get:function(){return this.uyt.ck.awt}},{key:"Kq",get:function(){return this.uyt.ck.Kq}},{key:"uwt",get:function(){return this.uyt.ck.uwt}},{key:"Km",get:function(){var t=(this.uyt.ck.qT||this.oQ).split("/")[0];return"application"===t||"text"===t||"subtitle"===t||ey(this.oQ,this.frt)?ig.NT:"video"===t?ig.Bk:"audio"===t?ig.Dk:"image"===t?ig.Nk:ig.pk}},{key:"Ti",get:function(){return this.uyt.ck.Ti||0}},{key:"rit",get:function(){return this.uyt.ck.bs||""}},{key:"blt",get:function(){return this.ryt}},{key:"Alt",get:function(){var t=this.blt,n=this.oyt;if(void 0!==t&&void 0!==n){var i=b.min(n,this.Idt.Syt);return b.max(t,i)}}}]),n}(zF);function GF(t,n){for(var i,r=[],e=Lt(n);!(i=e()).done;)for(var s,u=i.value,o=Lt(t);!(s=o()).done;){var h=s.value;r.push(Vn.Dh(h,u))}return r}F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Ut(),F(),Et(),Bt(),Dt(),H(),F(),Et(),Bt(),Dt(),H(),F(),Et(),Dt(),F(),Et(),Bt();var jF=function(){function t(t,n){this.jpt=void 0,this.zyt=void 0,this.HA=void 0,this.Wyt=void 0,this.Yyt=void 0,this.jpt=t,this.zyt=n,this.HA=n.qD,this.Wyt=n.Omt,this.Yyt=n.jmt}var n=t.prototype;return n.Eyt=function(t){var n=t-this.jpt.Tn;if(!(n<0||n>=this.jpt.ct)){var i=this.Pyt();return void 0!==i&&Si(i,n,1e-5)?this.xyt():this.Iyt(n)}},n.Tct=function(t){var n=t-this.jpt.Tn;if(!(n<0))return this.Ryt(b.min(n,this.jpt.ct))},n.xyt=function(){return this.Cyt(0)},n.Dyt=function(){var t=this.jpt.ct;if(isFinite(t))return this.Ryt(t)},n.wyt=function(t){if(this.jpt.Myt.Km===fL.wV){if(this.Byt){var n=this.xyt(),i=this.Lyt();if(void 0===n||void 0===i)return;return{Oyt:t,Fyt:n,Uyt:i}}var r=this.Vyt(t);if(!r)return;return{Oyt:t,Fyt:this.Hyt(t),Uyt:r}}var e=this.xyt();if(e)return{Oyt:t,Fyt:e,Uyt:this.Dyt()}},n.yyt=function(t,n){if(n){var i=this.Rdt(n.Fyt),r=this.Cct(n.Uyt);if(r){var e=this.Cdt(r);(!i||e.getTime()n.getTime();)i=this.Rct(i);if(i){var r=this.Rdt(i);if(r&&r.getTime()<=n.getTime()){var e=this.Rct(i);for(e&&this.Udt(e,n)&&(i=e);i;){if(this.Cdt(i).getTime()>n.getTime())return;if(this.Udt(i,n))break;i=this.Cct(i)}if(!i)return}return i}},n.Udt=function(t,n){if(this.Byt)return!0;if(this.Cdt(t).getTime()>n.getTime())return!1;var i=this.Rdt(t);return!(i&&n.getTime()>=i.getTime())},n.Gyt=function(t,n){if(this.Byt)return!0;if(this.Xyt(t).getTime()>n.getTime())return!1;var i=this.Rdt(t);return!(i&&n.getTime()>=i.getTime())},n.jyt=function(t,n,i){var r=le(n,this.HA)+this.jpt.Tn;return{aut:t,Qyt:n,EO:r,ct:i,PO:r+i}},n.Xyt=function(t){return this.jpt.Myt.Km===fL.wV?new Date(this.jpt.Myt.Vwt.getTime()+1e3*(t.EO+t.ct)):this.jpt.Myt.Vwt},n.Cdt=function(t){var n=this.Xyt(t);return this.jpt.Myt.Km===fL.wV?new Date(n.getTime()-1e3*this.Wyt):n},n.Rdt=function(t){var n=1/0;if(this.jpt.Myt.Km===fL.wV){var i=this.zyt.Kmt;i&&(n=this.Xyt(t).getTime()+1e3*t.ct+i.Cmt())}var r=this.jpt.Myt.Uwt;return r&&(n=b.min(n,r.getTime())),n===1/0?void 0:new Date(n)},n.Kyt=function(t,n){return t.aut+n},n.kct=function(t){return!1},n.Pct=function(t,n,i,r,e){var s=this.Jyt(t);if(!s)return ut.reject(new y("Invalid segment"));var u=this.Zyt(s.aut,n);return u?ut.resolve(u):gr(this.$yt(s.aut,n,i,r),e)},n.Zyt=function(t,n){},n.$yt=function(t,n,i,r){return ut.reject(new y("Not supported"))},n.Rct=function(t){var n=this.Jyt(t);if(n)return this.Cyt(n.aut-1)},n.Cct=function(t){var n=this.Jyt(t);if(n)return this.Cyt(n.aut+1)},n.Jyt=function(t){var n=this.Cyt(t.aut);if(n&&n.EO===t.EO)return n;var i=this.Eyt(t.EO);return i&&i.EO===t.EO?i:void 0},n.tAt=function(t,n){var i=this.xct(t);if(i&&this.kct(i.aut)){var r=this.Zyt(i.aut,n);if(r)return r.tAt(t)}},n.xct=function(t){return this.Cyt(t.iAt)},n.pdt=function(t){var n=this.Jyt(t);return!!n&&0===n.aut},n.Ayt=function(t,n){var i=this.tAt(t,n);return!!i&&0===i.hut},n.mct=function(t){var n=this.Jyt(t);if(!n)return!1;var i=this.Dyt();return!!i&&n.aut===i.aut},n.byt=function(t,n){var i=this.tAt(t,n);if(!i)return!1;var r=this.Dyt();if(!r||i.iAt!==r.aut)return!1;var e=this.Zyt(i.iAt,n);return i.hut+1===e.V},n.zg=function(){},Nt(t,[{key:"Byt",get:function(){return this.jpt.Myt.Nyt&&void 0!==this.Lyt()}},{key:"bU",get:function(){return this.jpt.Tn-le(this.Yyt,this.HA)}},{key:"jmt",get:function(){return le(this.Yyt,this.HA)}}]),t}(),QF=function(t){function n(n,i){var r;(r=t.call(this,i,n)||this).nAt=void 0,r.eAt=void 0;var e=n.oAt,s=n.ct;if(void 0===e||void 0===s)throw new y("MultipleSegmentBase does not have a segment duration specified.");return r.eAt=e,r.nAt=s,r}Ct(n,t);var i=n.prototype;return i.Cyt=function(t){if(!(t<0)){var n=this.eAt.multiply(t),i=le(n,this.HA),r=this.jpt.ct;if(!(i>=r)){var e=this.sAt();if(void 0!==e){if(t>e)return;if(t===e&&isFinite(r))return this.jyt(t,n,r-i)}return isFinite(r)&&i+this.nAt>r?this.jyt(t,n,r-i):this.jyt(t,n,this.nAt)}}},i.Pyt=function(){return 0},i.Iyt=function(t){var n=b.floor(t/this.nAt),i=this.sAt();return void 0!==i&&n>=i?this.Cyt(i):this.Cyt(n)},i.Ryt=function(t){if(t>=this.jpt.ct){var n=b.ceil(this.jpt.ct/this.nAt)-1,i=this.sAt();return void 0!==i&&n>=i?this.Cyt(i):this.Cyt(n)}return this.Iyt(t)},i.sAt=function(){var t,n=this.zyt.Zmt;if(void 0!==n)return n-(null!=(t=this.zyt.Jmt)?t:1);var i=this.zyt.rAt;return void 0!==i&&i>0?i-1:void 0},i.Lyt=function(){if(isFinite(this.jpt.ct))return this.Dyt()},i.hAt=function(t,n){return this.eAt.multiply(t.aut+(n-1))},i.er=function(){},n}(jF);function YF(t,n,i){var r=n.length;if(0===r)return-1;for(var e=0,s=r-1,u=t.aAt(n[e]),o=t.uAt(n[s]);e<=s&&t.cAt(u,i)<=0&&t.cAt(i,o)<0;){var h=e+b.floor(t.dAt(i,u,o)*(s-e)),c=n[h],a=t.aAt(c),f=h+10)return le(this.fAt[0].EO,this.HA)},i.Iyt=function(t){if(this._At&&le(this._At.EO,this.HA)<=t){var n=le(this._At.EO,this.HA),i=le(this._At.ct,this.HA),r=b.floor((t-n)/i);return this.vAt(r)}if(this.fAt.length>0&&Si(t,le(this.fAt[0].EO,this.HA),1e-5))return this.fAt[0].$at;var e=KF(this.fAt,ue.fromNumber(t*this.HA));return e<0?void 0:this.fAt[e].$at},i.Ryt=function(t){if(!this._At&&this.fAt.length>0){var n=this.fAt[this.fAt.length-1];if(function(t,n,i){return Oi(t,n,i)>=0}(t,le(n.PO,this.HA),1e-5))return n.$at}var i=this.Pyt();return i&&t=s)){var u=this.fAt.length+t,o=b.min(le(i,this.HA),e+s);return this.jyt(u,r,o)}}},i.gAt=function(t){return t.Qyt.add(this.Yyt)},i.er=function(){var t=this.zyt.ck.$rt;if(!t)throw new y("MultipleSegmentBaseTO does not have a SegmentTimeline specified.");this.pAt(t)},i.pAt=function(t){var n=this.Yyt;this.mAt(t,n);var i=this.wAt(t);this.yAt(t,n,i.AAt,i.iAt)},i.mAt=function(t,n){var i=this.fAt;if(0===t.length)Yi(i);else{for(var r=t[0],e=0,s=le(r.EO?ue.fromString(r.EO,!1).subtract(n):ue.ZERO,this.HA);e0&&i.splice(0,e)}},i.wAt=function(t){for(var n=this.fAt,i=this.Hgt,r=0,e=0;r=n.length)break;if(n[u].EO.greaterThanOrEqual(i))break;if(n[e].$at.aut===e)e=u+1;else for(;e<=u;)n[e].$at.aut=e,e++;0,r++}return{AAt:r,iAt:e}},i.yAt=function(t,n,i,r){for(var e,s=this.fAt,u=i,o=r;u0){var v=s[o-1];v.PO.greaterThan(f)&&(v.ct=f.subtract(v.EO),v.PO=v.EO.add(v.ct))}}else f=o>0?s[o-1].PO:ue.ZERO;if(a<0){if(u+1===t.length){e={EO:f,ct:c};break}for(var d=ue.fromString(t[u+1].EO,!1).subtract(n);f.lessThan(d);){var l=f.add(c);this.bAt(s,o,f,c,l),f=l,o++}}else for(var w=o+a;o<=w;){var g=f.add(c);this.bAt(s,o,f,c,g),f=g,o++}u++}o0&&(this.Hgt=s[s.length-1].EO),this._At=e},i.bAt=function(t,n,i,r,e){if(n=0&&t0){var i=this.DAt[0];if(n<=le(i.EO,this.qD))return this.BAt(i)}var r=KF(this.DAt,ue.fromNumber(n*this.qD));if(!(r<0))return this.BAt(this.DAt[r])},i.Ect=function(t){var n=this.NAt(t),i=zi(this.DAt,-1);return void 0!==i&&n>=le(i.PO,this.qD)?this.BAt(i):this.CAt(t)},i.BAt=function(t){var n=le(t.EO,this.qD)-this.jmt,i=n+this.MAt,r=le(t.ct,this.qD);return{iAt:this.iAt,hut:t.aut,EO:i,Qyt:ue.fromNumber(n*this.qD),ct:r,PO:i+r,LAt:[t.OAt,t.FAt]}},i.NAt=function(t){return t-this.MAt+this.jmt},Nt(n,[{key:"V",get:function(){return this.DAt.length}}]),n}(uV);F(),Et(),Ut(),F(),Et(),F(),Et(),Ut();var hV=function(){function t(t){this.ck=void 0,this.KC=void 0,this.ck=t,this.KC=new Tc}var n=t.prototype;return n.agt=function(){return this.KC.ac7)throw new RangeError("Invalid EBML ID size");for(var n=0,i=0;i=1,"Incorrect log2 value"),Uh(this.ck,this.KC,n)},t.qAt=function(t){if(8===t.length&&224&t[1])throw new p("EBML variable sized integer is too large");for(var n=0,i=0;i8)throw new RangeError("EMBL integer field size is too large");if(8===t&&224&this.GAt.getUint8(0))throw new RangeError("EMBL integer field value is too large");for(var n=0,i=0;i0?GF(t.vwt.map(function(t){return t.Yu}),n):n.slice(),this.zyt&&(t.pwt?this.zyt.er(t.pwt):t.gwt?this.zyt.er(t.gwt[0]):t._wt&&this.zyt.er(t._wt))},i.hyt=function(){var t;return null==(t=this.ubt)?void 0:t.cbt},i.yyt=function(){var t;return null==(t=this.ubt)?void 0:t.dbt},i.lbt=function(t){var n=this.fbt,i=this.wct.ct,r=this.ubt,e=this.vbt(t);r&&Si(i,n,1e-5)&&DV(r,e)||(this.fbt=i,this.ubt=e,this.So(new SV))},i.zg=function(){this.Vo(),this.zyt&&(this.zyt.zg(),this.zyt=void 0)},Nt(n,[{key:"ck",get:function(){return this.Wp}},{key:"vwt",get:function(){return this.rbt}}]),n}(th);function IV(t){for(var n,i,r=Lt(t);!(i=r()).done;){var e=i.value.hyt();if(e){n=e.Tn;break}}if(void 0!==n){for(var s,u=t.length-1;u>=0;u--){var o=t[u].hyt();if(o){s=o.An;break}}if(void 0!==s)return{Tn:n,An:s}}}function RV(t){if(0!==t.length){for(var n,i=0,r=1/0,e=Lt(t);!(n=e()).done;){var s=n.value.hyt();if(!s)return;if((i=b.max(i,s.Tn))>=(r=b.min(r,s.An)))return}return{Tn:i,An:r}}}function CV(t){for(var n,i,r=Lt(t);!(i=r()).done;){var e=i.value.yyt();e&&(!n||e.getTime()0?this.frt[0]:""}},{key:"Km",get:function(){return this._bt[0].Km}},{key:"o",get:function(){return this.hS}},{key:"Idt",get:function(){return this.jpt.Idt}},{key:"oQ",get:function(){return this._bt[0].oQ}},{key:"wct",get:function(){return this.jpt}},{key:"rat",get:function(){return Ji(this.Ilt,function(t){return t.rat})}}]),n}(zF);F(),Et(),Dt();var NV=function(t){function n(){return t.call(this,FO.bot)||this}return Ct(n,t),n}(rh);function BV(t){for(var n,i=function(){var t=n.value,i=void 0,e=t.Jdt;void 0===e||(i=Ui(r,function(t){return t.o===e})),i||(i={o:e,Ilt:[]},r.push(i)),i.Ilt.push(t)},r=[],e=Lt(t);!(n=e()).done;)i();return r}F(),Et(),Ut();var xV=function(t){function n(n,i){var r;return(r=t.call(this)||this).uyt=void 0,r._bt=[],r.gbt=[],r.mbt=void 0,r.pbt=!1,r.mbt=n,r.uyt=i,r.uyt.wn(FO.yot,r.ayt),r}Ct(n,t);var i=n.prototype;return i.bbt=function(t,n){if(0!==this.gbt.length){for(var i,r=t,e=Lt(this.gbt);!(i=e()).done;){var s=i.value;if(rg(s.Km)){var u=s.oyt;if(void 0===u)return;r=n(r,u)}}return r}},i.Tbt=function(){this.pbt||(this.pbt=!0,this.So(new NV),this.kn())},i.er=function(t,n){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return 0!==this._bt.length?[3,2]:[4,this.kbt(this.uyt.Ilt,t,n)];case 1:return i.sent(),this.Ebt(this._bt),dr(n),[3,4];case 2:return[4,this.Pbt(t,n)];case 3:i.sent(),i.label=4;case 4:return[2]}})}).call(this)},i.kbt=function(t,n,i){return Vt(function(){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:r=Lt(t),o.label=1;case 1:if((e=r()).done)return[3,6];s=e.value,u=new qF(this,s),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,u.er(n,i)];case 3:return o.sent(),this._bt.push(u),[3,5];case 4:return lr(o.sent()),[3,5];case 5:return[3,1];case 6:return[2]}})}).call(this)},i.Ebt=function(t){for(var n,i=Lt(BV(t));!(n=i()).done;){var r=n.value,e=new PV(this,r.o,r.Ilt);this.gbt.push(e)}},i.Pbt=function(t,n){return Vt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:i=Lt(this._bt),e.label=1;case 1:return(r=i()).done?[3,4]:[4,r.value.er(t,n)];case 2:e.sent(),e.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},i.hyt=function(){return this.uyt.hyt()},i.yyt=function(){return this.uyt.yyt()},i.kn=function(){this.Vo(),this.uyt.mn(FO.yot,this.ayt);for(var t,n=Lt(this.gbt);!(t=n()).done;){t.value.kn()}for(var i,r=Lt(this._bt);!(i=r()).done;){i.value.kn()}Yi(this._bt),Yi(this.gbt)},Nt(n,[{key:"Ilt",get:function(){return this._bt}},{key:"Xpt",get:function(){return this.gbt}},{key:"Mwt",get:function(){return this.uyt.ck.Mwt}},{key:"ct",get:function(){return this.uyt.ct}},{key:"An",get:function(){return this.Tn+this.ct}},{key:"Lwt",get:function(){return this.uyt.ck.Lwt||[]}},{key:"o",get:function(){return this.uyt.o}},{key:"Sot",get:function(){return this.pbt}},{key:"Idt",get:function(){return this.mbt}},{key:"Tmt",get:function(){return this.mbt.wbt(this)}},{key:"wct",get:function(){return this}},{key:"Smt",get:function(){return this.mbt.ybt(this)}},{key:"Abt",get:function(){return this.bbt(1/0,b.min)}},{key:"Sbt",get:function(){return this.bbt(0,b.max)}},{key:"Tn",get:function(){return this.uyt.Tn}},{key:"zk",get:function(){return this.Idt.zk}}]),n}(zF);F(),Et(),Dt();var OV=function(t){function n(){return t.call(this,eh.qw)||this}return Ct(n,t),n}(rh);F(),Et(),Dt(),F(),Et();var MV=function(t){return t.xbt="Ibt",t}({}),LV=function(t){function n(){return t.call(this,MV.xbt)||this}return Ct(n,t),n}(rh);F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt(),Dt();var UV=function(t){function n(n,i){var r;return(r=t.call(this,n,i,i.vwt)||this).Kot=void 0,r.Rbt=void 0,r.Kot=i,r.obt(!0),r}Ct(n,t);var i=n.prototype;return i.kct=function(t){var n=this.oQ;return!(!Hv(n)&&!Wv(n))&&this.$rt.kct(t.aut)},i.Pct=function(t,n,i,r){return this.$rt.Pct(t,this,n,i,r)},i.fyt=function(){return this._yt.fyt(this)},i.Nct=function(t){return this._yt.Nct(t,this)},i.myt=function(t){return this._yt.myt(t,this)},i.wyt=function(){return this.Rbt},i.vbt=function(t){var n=this.$rt,i=n.wyt(t),r=i&&function(t,n){var i,r=t.Fyt,e=t.Uyt,s=t.Oyt,u=r.EO,o=n.Xyt(e);if(o.getTime()<=s.getTime())i=e.PO;else{var h=(o.getTime()-s.getTime())/1e3,c=b.max(e.ct-h,0);i=e.EO+c}return{Tn:u,An:i}}(i,n),e=this.$rt.yyt(t,i);return this.Rbt=i,{Oyt:t,cbt:r,dbt:e}},i.er=function(t){this.abt(t,this.Kot.vwt)},Nt(n,[{key:"Nut",get:function(){return this.Kot}},{key:"wct",get:function(){return this.Kot.wct}},{key:"Myt",get:function(){return this.Kot.Myt}},{key:"oQ",get:function(){return this.Wp.oQ||this.Kot.oQ}},{key:"_yt",get:function(){return this.hbt()}},{key:"$rt",get:function(){return this._yt.$rt}}]),n}(EV),FV=function(t){function n(n,i){var r;return(r=t.call(this,n,i,i.vwt)||this).jpt=void 0,r.elt=void 0,r.jpt=i,r.obt(!1),r.elt=n.rat.map(function(t){return new UV(t,r)}),r}Ct(n,t);var i=n.prototype;return i.er=function(t){this.abt(t,this.jpt.vwt);var n=t.rat||[];if(this.elt.length!==n.length)throw new y("Expected "+this.elt.length+' representations in adaptation set "'+t.o+'", found '+n.length);for(var i=0;i0?GF(t.vwt.map(function(t){return t.Yu}),u):u,this.Hbt=t.Hwt&&t.Hwt.length>0?GF(t.Hwt,this.rbt):[];var o=this.Hbt.map(function(t){return t.href}),h=n.href;ji(o,h)||(this.Hbt.push(n),o.push(h));var c=this.Xbt.href;ji(o,c)||(this.Hbt.push(this.Xbt),o.push(c)),this.Vbt=null==(e=t.Gwt)?void 0:e.Rmt(),t.Zwt&&(this.Bbt=new HV(t.Zwt));var a=t.Km===fL.wV,f=function(t,n,i){for(var r=[],e=0;e0&&t[e-1].ct){u=r[e-1]+t[e-1].ct.Rmt()}else{if(0!==e||n)break;u=0}r.push(u)}for(var o=[],h=0;h0){var c=r.length-1,a=t[c],f=r[c],v=1/0;n||(v=a.ct?a.ct.Rmt():i-f),o.push({ck:a,Tn:f,ct:v})}return o}(t.smt,a,this.Vbt);this.jbt(f,s,a),this.lbt(i)},i.jbt=function(t,n,i){var r=this.Wbt;if(0!==t.length){for(var e=t[0].ck.o,s=0;s0&&t.length>0){var h,c,a=null!=(h=XV(r[0].ck))?h:g_.wF,f=null!=(c=XV(t[0].ck))?c:g_.wF;if(f.eF(a)){var v=f.lF(a);void 0!==this.Vbt&&(this.Vbt+=v.iF());for(var d=0;d0)return this.Wbt[n-1]},i.wbt=function(t){var n=this.Wbt.indexOf(t);if(n>=0&&n+1t)return r}}},{key:"rwt",get:function(){return this.uyt&&this.uyt.ck.rwt}},{key:"Kwt",get:function(){return this.uyt&&this.uyt.Kwt}},{key:"Abt",get:function(){for(var t=this.Wbt.length-1;t>=0;t-=1){var n=this.Wbt[t].Abt;if(n)return n}}},{key:"Syt",get:function(){var t=this.Abt;if(void 0!==t){var n=t-this.aSt;return b.max(n,this.hSt)}}},{key:"hSt",get:function(){for(var t,n=Lt(this.Wbt);!(t=n()).done;){var i=t.value.ryt;if(void 0!==i)return i}}},{key:"zk",get:function(){return Boolean(this.uSt.zk)}},{key:"aSt",get:function(){var t,n;if(this.uSt.cSt&&this.Km===fL.wV)return this.uSt.cSt;var i=null==(n=this.uyt)||null==(t=n.ck.Ywt)?void 0:t.Rmt();return void 0!==i?i:this.Km===fL.wV?1.5*this.Xwt.Rmt():0}},{key:"Kmt",get:function(){return this.uyt&&this.uyt.Kmt}},{key:"Km",get:function(){return this.uyt?this.uyt.Km:void 0}},{key:"Zwt",get:function(){var t;return null==(t=this.uyt)?void 0:t.Zwt}}]),n}(th),iH=function(){function t(t,n,i,r,e){this.mbt=void 0,this.mbt=new nH(t,n,i,r,e)}return Nt(t,[{key:"Idt",get:function(){return this.mbt}}]),t}(),rH=1e3,eH=b.pow(2,31)-1,sH=function(){function t(t,n,i,r,e){var s=this;this.CSt=void 0,this.uyt=void 0,this.wSt=void 0,this.gSt=void 0,this.kSt=void 0,this.pSt=new hr,this.mSt=function(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),n=this.uyt.Idt.xdt(),[4,this.ISt(this.uyt.Idt.Hwt,t)];case 1:return i=e.sent(),[4,this.uyt.Idt.er(i,n,t)];case 2:return e.sent(),[3,4];case 3:throw ql(r=e.sent())&&this.uyt.Idt.nSt(!1),r;case 4:return[2]}})}).call(s)},this.CSt=r,this.uyt=new iH(t,n,i,this.pSt.Yg,e)}var n=t.prototype;return n.lE=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:this.uyt.Idt.So(new GR),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.mSt(t)];case 2:return i.sent(),this.uyt.Idt.nSt(!0),[3,4];case 3:throw lr(n=i.sent()),this.gSt=void 0,this.uyt.Idt.nSt(!1),new y("The provided MPEG-DASH document could not be loaded - "+n.message);case 4:return this.wSt=this.ySt(this.pSt.Yg),[2]}})}).call(this)},n.ySt=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:n.trys.push([0,4,,5]),n.label=1;case 1:return this.uyt.Idt.Km!==fL.wV?[3,3]:[4,gr(this.ASt,t)];case 2:return n.sent(),[3,1];case 3:return[3,5];case 4:return n.sent(),[3,5];case 5:return[2]}})}).call(this)},n.SSt=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:return dr(t),(n=this.TSt())>0?[4,Ar(b.min(n,eH),t)]:[3,2];case 1:r.sent(),r.label=2;case 2:return r.trys.push([2,4,5,6]),[4,this.mSt(t)];case 3:return r.sent(),this.uyt.Idt.nSt(!0),[3,6];case 4:throw i=r.sent(),new y("The provided MPEG-DASH manifest could not be loaded - "+i.message);case 5:return this.kSt=void 0,[7];case 6:return[2]}})}).call(this)},n.TSt=function(){var t=this.uyt.Idt.xdt().getTime()-this.uyt.Idt.qbt.getTime();return this.uyt.Idt.Qwt-t},n.ESt=function(t){var n=this.uyt.Idt.yyt();if(n){var i=n.getTime()-t.getTime();if(i>0)return i}this.uyt.Idt.lbt(t);var r=this.uyt.Idt.yyt();return r?r.getTime()-t.getTime():NaN},n.bSt=function(t){return Vt(function(){var n,i,r,e;return zt(this,function(s){switch(s.label){case 0:n={stack:[],error:void 0,hasError:!1},s.label=1;case 1:return s.trys.push([1,3,4,5]),null!=this.kSt||(this.kSt=this.SSt(t)),i=qt(n,hr.ep([t]),!1),r=[this.kSt,this.PSt(i.Yg)].filter(Un),[4,ut.race(r).catch(wr)];case 2:return s.sent(),[3,5];case 3:return e=s.sent(),n.error=e,n.hasError=!0,[3,5];case 4:return Gt(n),[7];case 5:return[2]}})}).call(this)},n.PSt=function(t){var n=this.uyt.Idt.xdt(),i=this.ESt(n);if(!S(i)&&!this.Br.Idt.Nyt)return this.xSt(i,t)},n.xSt=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return[4,Ar(t,n)];case 1:return r.sent(),i=this.uyt.Idt.xdt(),this.uyt.Idt.lbt(i),[2]}})}).call(this)},n.ISt=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return[4,this.CSt.RSt(t,{},n)];case 1:return i=r.sent(),[2,(new OF).$wt(i.DSt,i.gk)]}})}).call(this)},n.kn=function(){return this.pSt.Zg(),this.wSt=void 0,this.gSt=void 0,this.kSt=void 0,this.uyt.Idt.kn(),ut.resolve()},Nt(t,[{key:"Br",get:function(){return this.uyt}},{key:"W",get:function(){return this.gSt||(this.gSt=this.lE(this.pSt.Yg),kr(this.gSt)),this.gSt}},{key:"ASt",get:function(){return this.uyt.Idt.tSt&&this.uyt.Idt.Km===fL.wV?this.bSt(this.pSt.Yg):this.W}}]),t}();F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Dt();var uH=function(t){function n(n,i){var r;return(r=t.call(this,"fmt")||this).Emt=void 0,r.hpt=void 0,r.Emt=n,r.hpt=i,r}return Ct(n,t),n}(rh),oH=function(t){function n(n,i){var r;(r=t.call(this)||this).dlt=void 0,r.RI=void 0,r.Vp=void 0,r.Vp=n,r.RI=i;for(var e,s=Lt(r.RI);!(e=s()).done;){e.value.Jdt=r}return r}Ct(n,t);var i=n.prototype;return i.jU=function(t){t&&this.dlt!==t&&this.BSt(t)},i.QU=function(t){this.dlt===t&&this.BSt(void 0)},i.BSt=function(t){this.dlt=t,this.So(new uH(this,this.dlt))},i.kn=function(){this.Vo();for(var t,n=Lt(this.RI);!(t=n()).done;){t.value.Jdt=void 0}Yi(this.RI)},Nt(n,[{key:"hpt",get:function(){return this.dlt}},{key:"Km",get:function(){return this.Vp}},{key:"Z",get:function(){return this.RI.slice()}}]),n}(th);F(),Et(),F(),Et(),F(),Et(),Dt();var hH=function(t){function n(n,i,r){var e;return(e=t.call(this,eh.Dw)||this).currentTime=void 0,e.initDataType=void 0,e.initData=void 0,e.currentTime=n,e.initDataType=i,e.initData=r,e}return Ct(n,t),n}(rh);function cH(t,n,i,r,e){for(var s,u=[],o=[],h=Lt(n);!(s=h()).done;){var c=s.value;c.Km===ig.Dk?u=u.concat(c.Z):c.Km===ig.Bk&&(o=o.concat(c.Z))}return[aH(t,u,i,r,null==e?void 0:e.preferredAudioCodecs),fH(t,o,i,r,null==e?void 0:e.preferredVideoCodecs)].filter(Un)}function aH(t,n,i,r,e){var s=Ui(r||[],function(t){return t.Lot===ig.Dk&&t.Rt}),u=[dH(s,i,t),lH(s),wH(s),gH(s,e),_H(),function(t){var n=t.filter(function(t){return"main"===t.Lt});return n.length>0?n:t}];return vH(n,u)}function fH(t,n,i,r,e){var s=Ui(r||[],function(t){return t.Lot===ig.Bk&&t.Rt}),u=[dH(s,i,t),gH(s,e),_H(),function(t){var n=t.filter(function(t){return"main"===t.Lt});return n.length>0?n:t}];return vH(n,u)}function vH(t,n){if(0!==t.length){for(var i,r=t,e=Lt(n);!(i=e()).done;){var s=i.value;if(1===r.length)return r[0];r=s(r)}return r[0]}}function dH(t,n,i){return function(r){var e=t?t.Nut.o:void 0;if(!Un(e))return r;var s=null==n?void 0:n.Mwt,u=i.Mwt,o=s&&u&&s.zE===u.zE,h=Ui(r,function(t){return t.Nut.o===e});return o&&h?[h]:r}}function lH(t){return function(n){var i=t?t.bs:"",r=n.some(function(t){return""!==t.bs})?n.filter(function(t){return""!==t.bs}):n;if(""===i)return r;var e=r.filter(function(t){return t.bs===i});return e.length>0?e:r}}function wH(t){return function(n){var i=t?t.Lt:"";if(""===i)return n;var r=n.filter(function(t){return t.Lt===i});return r.length>0?r:n}}function gH(t,n){return function(t){if(n&&n.length>0)for(var i,r=function(){var n=i.value,r=t.filter(function(t){return t.KI.II.some(function(t){return YC(t.frt,n)})});if(r.length>0)return{v:r}},e=Lt(n);!(i=e()).done;){var s=r();if("object"===W(s))return s.v}return t}}function _H(){return function(t){for(var n,i=[],r=-1/0,e=Lt(t);!(n=e()).done;){var s=n.value,u=s.Nut.Kq;u>r?(r=u,i=[s]):u===r&&i.push(s)}return i}}F(),Et(),at(),Ut(),F(),Et();var mH=function(t){return t.NSt="api",t.MSt="start",t}({});F(),Et(),Wt(),Ut(),Qt();var yH={maxRetries:3,minimumBackoff:1e3,maximumBackoff:1/0},pH=function(){function t(t,n,i){void 0===i&&(i=yH),this.nV=void 0,this.FSt=void 0,this._dt=void 0,this.nV=t,this.FSt=n,this._dt=i}var n=t.prototype;return n.LSt=function(t,n,i){var r=this,e=this._dt.maxRetries===1/0?yH:this._dt;return gT(function(){return r.OSt(t,n,i)},i,e.maxRetries,e.minimumBackoff,e.maximumBackoff)},n.OSt=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:e=Lt(t),a.label=1;case 1:if((s=e()).done)return[3,7];u=s.value,a.label=2;case 2:return a.trys.push([2,5,,6]),o=new pl({Yu:u,dk:Md.NT,fk:n,zk:this.FSt,Uk:wl.GET,Km:gl.wk,Wk:_l.pk,Yg:i,Vk:15e3,Hk:5e3}),[4,this.nV.lk(o)];case 3:return[4,(h=a.sent()).UT(i)];case 4:return[2,{DSt:a.sent(),USt:u,gk:h.gk}];case 5:return c=a.sent(),r=c,[3,6];case 6:return[3,1];case 7:throw r}})}).call(this)},t}();function kH(t){return Sl(t)}function bH(t,n){var i=Sl(t);return n?""+i+n:""+i}F(),Et(),Wt(),Ut(),Qt(),F(),Et();var AH=function(){function t(t){this.VSt=void 0,this.VSt=t}return t.prototype.RSt=function(t,n,i){return Vt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:e=Lt(this.VSt),h.label=1;case 1:if((s=e()).done)return[3,6];u=s.value,h.label=2;case 2:return h.trys.push([2,4,,5]),[4,u.RSt(t,n,i)];case 3:return[2,h.sent()];case 4:return lr(o=h.sent()),r=o,[3,5];case 5:return[3,1];case 6:throw r}})}).call(this)},t}(),TH=function(){function t(t){this.eut=void 0,this.eut=t}return t.prototype.RSt=function(t,n,i){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return[4,this.eut.HSt(t)];case 1:if(n=i.sent())return[2,{DSt:n.data,USt:n.locationURL,gk:n.responseURL}];throw new y("Manifest fetch from cache unsuccesful")}})}).call(this)},t}(),SH=function(){function t(t){this.WSt=void 0,this.WSt=t}return t.prototype.RSt=function(t,n,i){return Vt(function(){return zt(this,function(r){switch(r.label){case 0:return[4,this.WSt.LSt(t,n,i)];case 1:return[2,r.sent()]}})}).call(this)},t}();function EH(t,n){return new AH([new TH(n),new SH(t)])}var IH=function(){function t(t,n,i){this.CSt=void 0,this.GSt=void 0,this.XSt=void 0,this.CSt=t,this.GSt=n,this.XSt=i}var n=t.prototype;return n.RSt=function(t,n,i){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return[4,this.CSt.RSt(t,n,i)];case 1:return r=e.sent(),[4,this.qSt(r)];case 2:return e.sent(),[2,r]}})}).call(this)},n.qSt=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.GSt.zSt({key:kH(t.USt),locationURL:Sl(t.USt),responseURL:Sl(t.gk),data:t.DSt,references:[this.XSt.o]})];case 1:return n.sent(),[2]}})}).call(this)},t}();F(),Et(),Dt();var RH=function(t){function n(){return t.call(this,eh.Xw)||this}return Ct(n,t),n}(rh);F(),Et(),Dt();var CH=function(t){function n(){return t.call(this,eh.Gw)||this}return Ct(n,t),n}(rh);F(),Et(),Wt(),Dt(),Ut(),Qt(),F(),Et(),Dt(),Ut();var DH=function(t){function n(n){return t.call(this,n)||this}Ct(n,t);var i=n.prototype;return i.jSt=function(t){return t.Ax=Cg.LOADED,this.tt(t),t},i.QSt=function(t){for(var n,i=Lt(this.Z.II);!(n=i()).done;){var r=n.value;if(r.ZI===t)return r}},n}(fy);function PH(t,n){return""===n?t:t+" "+n}F(),Et(),F(),Et(),Bt(),Dt(),F(),Et();var NH=function(t){function n(n,i,r,e,s){var u;return(u=t.call(this,n,i,r,!1,null==s?void 0:s.toString())||this).iP=void 0,u.KSt=void 0,u.iP=e,u.KSt=s,u}return Ct(n,t),n.prototype.GO=function(t){return this.U===t.U},Nt(n,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return xw(Vg(t),{get attributes(){return t.iP},get eventID(){var n;return""+(null!=(n=t.KSt)?n:"")}})}(this)),this.hu}}]),n}(Yg),BH=function(t){function n(n){var i;return(i=t.call(this,n)||this).Cbt=void 0,i.ZSt=function(){var t,n,r=null!=(n=null==(t=i.Cbt.hyt())?void 0:t.Tn)?n:0;if(r>0)for(var e,s=Lt(i.Z.II);!(e=s()).done;){cy(e.value,r)}for(var u,o=Lt(i.Cbt.smt);!(u=o()).done;){var h=u.value;if(h.An>r)for(var c,a=Lt(h.Lwt);!(c=a()).done;){var f=c.value;i.JSt(f,h,r)}}},i}Ct(n,t);var i=n.prototype;return i.YSt=function(t){var n=this.JU.tI(Ym.VU,"","","",void 0,Dg.EVENT_STREAM);return n.ZI=t,this.jSt(n),n},i.JSt=function(t,n,i){var r,e,s,u=t.y8,o=null!=(r=t.zE)?r:"",h=null!=(e=t.qD)?e:1,c=null!=(s=t.jmt)?s:ue.ZERO,a=PH(u,o),f=this.QSt(a);f||(f=this.YSt(a));for(var v,d=Lt(t.aQ);!(v=d()).done;){var l=v.value;if(!xH(l,f)){var w=OH(l,h,c,n);w.PO>i&&f.tV(w)}}},i.Un=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.hr()];case 1:return n.sent(),this.Cbt=t,this.Cbt.wn(eh.qw,this.ZSt),this.ZSt(),[2]}})}).call(this)},i.hr=function(){var n=this;return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:for(this.Cbt&&(this.Cbt.mn(eh.qw,this.ZSt),this.Cbt=void 0),i=Lt(this.Z.II);!(r=i()).done;)e=r.value,this.JU.iV(e);return[4,t.prototype.hr.call(n)];case 1:return s.sent(),[2]}})}).call(this)},i.ZU=function(t,n,i){return vy(t,n,i)},n}(DH);function xH(t,n){var i=t.o;if(void 0!==i&&Ui(n.L.II,function(n){return n.KSt===i&&n.U===t.ck}))return!0;return!1}function OH(t,n,i,r){var e=t.o,s=t.tM.toSigned().subtract(i),u=t.ct,o=t.ck,h=t.iP,c=s.toNumber()/n+r.Tn,a=u?u.toNumber()/n:void 0,f=void 0!==a?c+a:r.Sbt;return new NH(c,f,o,h,e)}function MH(t,n,i,r,e){var s=[],u=Ui(i,function(t){return t.y8===so});if(void 0!==u){var o=u.zE?function(t){var n=t.split(":",1)[0];switch(n){case"cbcs":case"cenc":return n;default:return}}(u.zE.toLowerCase()):"cenc";if(void 0!==o){for(var h,c=Lt(i);!(h=c()).done;){var a=h.value;if(a.y8!==so)for(var f,v=Lt(Oo(a.y8));!(f=v()).done;){var d,l,w=f.value,g=e&&a.A8?[a.A8]:[],_=null!=(l=null==(d=t.clearkey)?void 0:d.keys)?l:[];s.push({kS:w,BW:g,NW:void 0,HH:void 0,MW:_})}}if(s.length)return{aH:t,Ept:{$St:o,uH:u.uH},kpt:s,tTt:n===ig.Dk?r.slice():[],iTt:n===ig.Bk?r.slice():[],T8:!1}}}}function LH(t,n){if(!t)return n;if(!n)return t;var i,r=[],e=Ju();return UH(r,e,t.kpt),UH(r,e,n.kpt),{aH:t.aH,Ept:{$St:t.Ept.$St,uH:null!=(i=t.Ept.uH)?i:n.Ept.uH},kpt:r,tTt:FH(t.tTt,n.tTt,ji),iTt:FH(t.iTt,n.iTt,ji),T8:t.T8||n.T8||!1}}function UH(t,n,i){for(var r,e=Lt(i);!(r=e()).done;){var s=r.value,u=s.kS.$m,o=void 0;n.has(u)?(o=n.get(u)).BW=FH(o.BW,s.BW,VH):(o=Yu({},s),t.push(o),n.set(u,o))}}function FH(t,n,i){for(var r,e=t.slice(),s=Lt(n);!(r=s()).done;){var u=r.value;i(e,u)||e.push(u)}return e}function VH(t,n){for(var i,r=Lt(t);!(i=r()).done;){if(Cc(i.value,n))return!0}return!1}function HH(t,n,i){var r,e=t.xW;if(e){for(var s,u=t.oQ,o=[],h=Lt(t.frt);!(s=h()).done;){var c=s.value;o.push(u+'; codecs="'+c+'"')}r=MH(n||{},t.Km,e,o,i)}for(var a,f=Lt(t.rat);!(a=f()).done;){r=LH(r,WH(a.value,n,i))}return r}function WH(t,n,i){return MH(n||{},t.Km,t.xW||[],[t.qT],i)}function zH(t){return t?t.kpt.map(function(n){var i=XH(t.aH,n.kS),r=t.Ept.$St;return{kS:n.kS,BW:n.BW,HH:n.HH,Mq:[{initDataTypes:[n.kS.Jm],audioCapabilities:qH(t.tTt,r,null==i?void 0:i.audioRobustness),videoCapabilities:qH(t.iTt,r,null==i?void 0:i.videoRobustness),persistentState:null==i?void 0:i.persistentState,distinctiveIdentifier:null==i?void 0:i.distinctiveIdentifier}],MW:n.MW}}):[]}function XH(t,n){switch(n.Km){case Eo.zm:return t.widevine;case Eo.qm:return t.playready;case Eo.jm:return t.fairplay;case Eo.Gm:case Eo.Xm:return t.clearkey}}function qH(t,n,i){if(0!==t.length)return t.map(function(t){return{contentType:t,encryptionScheme:n,robustness:i}})}function GH(t,n){var i=function(t){var i=n.indexOf(t.kS.$m);return i>=0?i:n.length};return mi(t,function(t,n){return i(t)-i(n)})}F(),Et(),Ut(),F(),Et(),Wt(),Dt(),Ut(),Qt();var jH=function(t){function n(n){var i;(i=t.call(this,n)||this).elt=[],i.hTt=void 0,i.Cbt=void 0,i.er=function(){for(var t,n=[],r=Lt(i.Cbt.smt);!(t=r()).done;)for(var e,s=Lt(t.value.Ilt);!(e=s()).done;){var u=e.value;if(u.Km===ig.Nk&&u.rat.length>0){var o=u.rat[0];n.push(o),i.aTt(o)||i.YSt(o),-1===i.elt.indexOf(o)&&(i.elt.push(o),o.wn(FO.yot,i.hTt)),i.cTt(o)}}i.eTt(n)},i.cTt=function(t){var n=i.uTt(t);n&&t&&n.Xk!==Hm.Nh&&(i.oTt(),function(t,n){var i=t.$rt,r=t.wyt();if(!r)return;var e=r.Fyt,s=r.Uyt,u=t.Ti,o=t.Mi,h=function(t){for(var n,i=Lt(t);!(n=i()).done;){var r=n.value;if(Vo(r.y8,YH)||Vo(r.y8,KH)){var e=r.zE.match(QH);if(e){var s=e[1],u=e[2];return[Number(s),Number(u)]}}}return[1,1]}(t.iwt),c=h[0],a=h[1],f=e;for(;f&&f.aut<=s.aut;){for(var v,d=t._yt.ct||f.ct,l=Lt(JH(n,f,t.Nct(f).Yu,u,o,c,a,d));!(v=l()).done;){var w=v.value;n.tV(w)}f=i.Cct(f)}}(t,n))};var r=i;return i.hTt=function(){r.cTt(this)},i}Ct(n,t);var i=n.prototype;return i.YSt=function(t){var n=this.JU.tI(Ym.VU,t.o,"thumbnails","",!1,Dg.DEFAULT);return n.Xk=Hm.Kn,this.jSt(n),n},i.Un=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.hr()];case 1:return n.sent(),this.Cbt=t,this.Cbt.wn(eh.qw,this.er),this.er(),[2]}})}).call(this)},i.eTt=function(t){this.sTt(t),this.nTt()},i.nTt=function(){for(var t,n=[],i=Lt(this.Z.II);!(t=i()).done;){var r=t.value;this.rTt(r)||n.push(r)}for(var e,s=Lt(n);!(e=s()).done;){var u=e.value;this.it(u)}},i.sTt=function(t){for(var n,i=[],r=Lt(this.elt);!(n=r()).done;){var e=n.value;-1===t.indexOf(e)&&i.push(e)}for(var s,u=Lt(i);!(s=u()).done;){var o=s.value;Xi(this.elt,o)}},i.hr=function(){var n=this;return Vt(function(){var i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:for(this.Cbt&&(this.Cbt.mn(eh.qw,this.er),this.Cbt=void 0),i=Lt(this.elt);!(r=i()).done;)r.value.mn(FO.yot,this.hTt);for(this.elt.length=0,e=Lt(this.Z.II);!(s=e()).done;)u=s.value,this.JU.iV(u);return[4,t.prototype.hr.call(n)];case 1:return o.sent(),[2]}})}).call(this)},i.ZU=function(t,n,i){return vy(t,n,i)},i.kn=function(){return this.hTt=void 0,t.prototype.kn.call(this)},i.oTt=function(){var t,n,i=null!=(n=null==(t=this.Cbt.hyt())?void 0:t.Tn)?n:0;if(i>0)for(var r,e=Lt(this.Z.II);!(r=e()).done;){cy(r.value,i)}},i.aTt=function(t){return this.Z.II.some(function(n){return n.o===t.o})},i.uTt=function(t){return Ui(this.Z.II,function(n){return n.o===t.o})},i.rTt=function(t){return this.elt.some(function(n){return t.o===n.o})},n}(DH),QH=/^(\d+)x(\d+)$/,YH="http://dashif.org/guidelines/thumbnail_tile",KH="http://dashif.org/thumbnail_tile";function JH(t,n,i,r,e,s,u,o){var h=[],c=n.EO,a=s*u,f=r/s,v=e/u,d=b.round(f),l=b.round(v),w=o/a;if(1===a){var g=c+w;return ZH(t,c,g,i)?h:[new Yg(c,g,i,!1)]}for(var _=0;_=n.PO)return h}return h}function ZH(t,n,i,r){return t.L.II.some(function(t){return t.EO===n&&t.PO===i&&t.U===r})}F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Wt(),Dt(),Ut(),Qt(),F(),Et(),Bt(),Dt(),F(),Et();var $H=function(t){function n(n,i,r,e,s,u){var o;return(o=t.call(this,n,i,u,!1)||this).dTt=void 0,o.lTt=void 0,o.vTt=void 0,o.dTt=r,o.lTt=e,o.vTt=s,o}return Ct(n,t),n.prototype.GO=function(t){return Dc(this.U,t.U)},Nt(n,[{key:"$N",get:function(){return this.dTt}},{key:"zE",get:function(){return this.lTt}},{key:"fTt",get:function(){return this.vTt}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return xw(Vg(t),{get schemeIDURI(){return t.$N},get value(){return t.zE},get emsgID(){return t.fTt}})}(this)),this.hu}}]),n}(Yg),tW=function(t){function n(n){return t.call(this,n)||this}Ct(n,t);var i=n.prototype;return i.Odt=function(t,i,r){var e=ym.TD(_c(t));if(e){var s=function(t,n){for(var i,r=[],e=Lt(t);!(i=e()).done;){var s=i.value;fm(s,n)&&r.push(s)}return r}(e,um.VC);if(s.length){var u=n._Tt(e,i,r);this.gTt(s,u,r)}}},i.gTt=function(t,n,i){for(var r,e=Lt(t);!(r=e()).done;){var s=r.value,u=void 0,o=(u=1===s.bD?s.tM.toNumber()/s.qD+i:n+s.sM/s.qD)+s.iM/s.qD;"https://aomedia.org/emsg/ID3"===s.$N||"https://developer.apple.com/streaming/emsg-id3"===s.$N?this.pTt(s,u):this.mTt(s,u,o)}},i.mTt=function(t,n,i){var r=PH(t.$N,t.zE),e=this.QSt(r);e||(e=this.wTt(r),this.jSt(e)),e.tV(new $H(n,i,t.$N,t.zE,t.o,t.eM))},i.pTt=function(t,n){var i=MP(_c(t.eM));if(i){var r=PH(t.$N,t.zE),e=this.QSt(r);e||(e=this.yTt(r),this.jSt(e));for(var s,u=Lt(i.J5);!(s=u()).done;){var o=s.value,h=new QP(n,o);aP(h,e.L.II),e.tV(h)}}},i.wTt=function(t){var n=this.JU.tI(Ym.VU,"","","",void 0,Dg.EMSG);return n.ZI=t,n.Xk=Hm.JI,n},i.yTt=function(t){var n=this.JU.tI(Ym.VU,"","","",void 0,Dg.ID3);return n.ZI=t,n.Xk=Hm.JI,n},i.ZU=function(t,n,i){return vy(t,n,i)},i.hr=function(){var n=this;return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:for(i=Lt(this.Z.II);!(r=i()).done;)e=r.value,this.JU.iV(e);return[4,t.prototype.hr.call(n)];case 1:return s.sent(),[2]}})}).call(this)},n._Tt=function(t,n,i){var r=vm(t,um.HC);return r?le(r._M,r.qD)+i:n},n}(DH),nW=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Cbt=void 0,n.ZSt=function(){var t,i,r=null!=(i=null==(t=n.Cbt.hyt())?void 0:t.Tn)?i:0;n.qU(r)},n}Ct(n,t);var i=n.prototype;return i.Un=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.hr()];case 1:return n.sent(),this.Cbt=t,this.Cbt.wn(eh.qw,this.ZSt),this.ZSt(),[2]}})}).call(this)},i.hr=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Cbt&&(this.Cbt.mn(eh.qw,this.ZSt),this.Cbt=void 0),[4,t.prototype.hr.call(n)];case 1:return i.sent(),[2]}})}).call(this)},n}(tW);F(),Et(),F(),Et(),Wt(),Qt();var iW=function(){function t(t){this.eut=void 0,this.ATt=!1,this.eut=t}var n=t.prototype;return n.Uct=function(t,n){return this.ATt?this.eut.Uct(t,n):ut.resolve(!1)},n.iut=function(t,n){return this.ATt?this.eut.iut(t,n):ut.resolve(void 0)},n.HSt=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return[4,this.eut.HSt(t)];case 1:return n=i.sent(),this.ATt=void 0!==n,[2,n]}})}).call(this)},n.WJ=function(t){return this.eut.WJ(t)},t}();F(),Et(),Dt();var rW=function(t){function n(n,i,r){return t.call(this,n,i,r)||this}Ct(n,t);var i=n.prototype;return i.NL=function(){var t;return null!=(t=this.DL)?t:0},i.oR=function(){this.oa.MP=1/0},i.ML=function(t,n,i){return!1},i.LL=function(){return!0},n}(DA),eW=[eh.Qw,eh.Yw,eh.iy,eh.zw,eh.oy],sW=[eh.Kw,eh.gy,eh.Lw,eh.Nw],uW=function(t){function n(n,i,r,e,s,u,o){var h,c;return(h=t.call(this)||this).nV=void 0,h.Rz=void 0,h._dt=void 0,h.eut=void 0,h.TL=void 0,h.kq=void 0,h.bq=void 0,h.qTt=void 0,h.ekt=void 0,h.n7=!1,h.LEt=NaN,h.JW=void 0,h.ZW=void 0,h.X8=!1,h.skt=void 0,h.q8=void 0,h.UEt=!1,h.OEt=0,h.FEt=0,h._kt=!1,h.rV=new hr,h.WTt=new Vc,h.NEt=void 0,h.DEt=!1,h.uyt=void 0,h.Fkt=void 0,h.sSt=!0,h.ckt=!0,h.oEt=void 0,h.Ho=TA.iL(),h.tq=jT.lz,h.xEt=void 0,h.NV=!0,h.Ac=void 0,h.mEt=void 0,h.Ypt=void 0,h.Npt=[],h.Sz=!1,h.rq=void 0,h.OTt=new hr,h.HTt=ut.resolve(),h.m7=new hr,h.w7=ut.resolve(),h.Bkt=!1,h.uEt=!1,h.FTt=new hr,h.UTt=ut.resolve(),h.YTt=void 0,h.jkt=void 0,h.YL=void 0,h.$L=void 0,h.Gl=void 0,h.$kt=void 0,h.Ykt=void 0,h.wpt=void 0,h.SEt=void 0,h.TEt=void 0,h.pq=void 0,h.VEt=void 0,h.okt=0,h.akt=0,h.ukt=0,h.oq=new bb,h.Zkt=void 0,h.xTt={iO:0,eO:0,sO:0},h.iq=void 0,h.DTt=void 0,h.lq=void 0,h.jW=void 0,h.Pkt=function(t){var n,i,r,e;"fmt"===(null==t?void 0:t.type)&&(e=t.hpt),e&&(null==(n=e.Jdt)?void 0:n.Km)===ig.Dk&&(null==(r=h.bt)||null==(i=r.dash)?void 0:i.forceRecreateMediaSourceOnAudioSwitch)?h.LTt(!0):h.LTt()},h.Pmt=function(t){var n;null==(n=h.qTt)||n.Pmt(t)},h.umt=function(t){var n;null==(n=h.qTt)||n.umt(t)},h.Nc=function(){h.So(new pw(h.MP,h.CP))},h.D8=function(t){h.So(new hH(h.MP,t.Jm,t.Ey))},h.bkt=function(t){h.okt+=t.rO,h.So(t)},h.Skt=function(t){var n=t.segments.filter(function(t){return t.cct});t.track===ig.Dk?h.akt=n.length:t.track===ig.Bk&&(h.ukt=n.length)},h.p9=function(){var t=h.ct;S(t)||t===h.LEt||(h.LEt=t,h.So(new aT(h.LEt)))},h.WEt=function(){h.MTt(),h.hEt()},h.HEt=function(t){h.uEt||!h.UP||h.kx||(h.uEt=!0,h.So(null!=t?t:new vT(h.MP)))},h.AEt=function(t){h.Rs(t),h._kt||(h._kt=!0,h.kq.VV())},h.yEt=function(){h.uyt.Idt.mn(eh.Ww,h.yEt),h.So(new GR)},h.kkt=function(t){var n;if(t.errorObject.code===cd.CONTENT_PROTECTION_OUTPUT_RESTRICTED&&(null==(n=h.qTt)?void 0:n.pmt.every(function(t){return!t.olt})))return;h.qq(t.errorObject),h.So(t)},h.Tkt=function(t){h.qq(t.errorObject)},h.mmt=function(t){vr(t)||h.qq(new fd(cd.MEDIA_DECODE_ERROR,t.message,t))},h.MTt=function(){if(!h.hx)if(h.nkt())if(h.hkt()){var t=h.uyt.Idt.rSt;h.My(t,!0)}else;else{var n=h.uyt.Idt.rSt;h.My(n,!0)}},h.dEt=function(t){h.UEt=h.kx,h.So(t)},h.vEt=function(t){var n=h.UEt,i=h.kx;h.UEt=i,n&&!i&&h.So(t),h.HEt()},h.Ekt=function(){var t=h.Bx,n=h.Rx;h.OEt===t&&h.FEt===n||(h.OEt=t,h.FEt=n,h.So(new Ty))},h.tEt=function(t){var n=t.Ht;n.Xk===Hm.Kn?(h.Gkt(n),h.jkt=n):n===h.jkt&&n.Xk===Hm.Nh&&(h.jkt=void 0,h.Qkt())},h.cEt=function(){h.X8||h.oEt&&(h.oEt.Xy(),h.oEt=void 0)},h.nEt=function(t){h.X8||h.oEt&&(h.oEt.jy(t),h.oEt=void 0)},h.bEt=function(){h.kEt().catch(h.mmt)},h.EEt=function(){h.PEt().catch(h.mmt),h.bq.mn(Ey.SM,h.EEt)},h.GEt=function(t){h.qq(cg(t.lt))},h.qEt=function(){h.STt()},h.zEt=function(){h.TTt()},h.XEt=function(t){h.ETt(t.xW)},h.nV=n,h.eut=new iW(s),h.TL=u,h.DTt=o,h.Rz=r,h.Rz.wn("NY",h.qEt),h.Rz.wn("FY",h.zEt),h.rq=e,h._dt=Yu({},i.retryConfiguration,{maxRetries:null!=(c=i.retryConfiguration.maxRetries)?c:1/0}),h.YL=new Jb,h.$L=new Jb,h.lq=new Tb(n),h.lq.wn("contentProtectionsTracked",h.XEt),h.TL.wn(eh.Rw,h.p9),h.TL.wn(fh.Dw,h.D8),h.TL.wn(eh.Bw,h.HEt),h.TL.wn(eh.$w,h.dEt),h.TL.wn(eh.Zw,h.vEt),h.TL.wn(eh.Jw,h.Ekt),h.TL.wn(eh._y,h.Nc),h.TL.wn([eh.uo,eh.jw],h.WEt),h.TL.wn(sW,h.Rs),h.TL.wn(zm.ma,h.GEt),h.TL.Eq=h.lq,h.TL.N9=h,h.TL.wn([eh.Pw,eh.Ew],h.Rs),h.TL.wn(eh.yy,h.Pmt),h.TL.wn(eh.LICENSE_REQUEST_GENERATED,h.umt),h.kq=new Uy(h,h.TL),h.bq=new Ly(h.kq,!0),h.bq.wn(Ey.SM,h.MTt),h.bq.wn(Iy,h.Rs),h.$kt=new Zb,h.$kt.wn(Dw.pa,h.tEt),h.Ykt=new Zb,h.SEt=new BH(h.TL),h.TEt=new jH(h.TL),h.pq=new ly(h.TL,h.nV),h.VEt=new Qm,h.Gl=new Eb([h.$kt,h.SEt.Z,h.TEt.Z,h.pq.Z,h.VEt]),h}Ct(n,t);var i=n.prototype;return i.bTt=function(t){return!!this.iq&&this.iq.TZ(t)},i.Lp=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return n=this,[4,this.TL.Un(t)];case 1:return n.iq=i.sent(),this.STt(),this.TTt(),this.iq.C4(this.ct),[2]}})}).call(this)},i.kTt=function(t){return this.iq.EZ(t)},i.ETt=function(t){return this.iq.xZ(t)},i.PTt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.xTt=this.ITt,this.iq?[4,this.TL.hr()]:[3,2];case 1:t.sent(),this.iq=void 0,t.label=2;case 2:return[2]}})}).call(this)},i.C3=function(){this.iq.C3()},i.A3=function(){var t=this.ct;this.iq.ct=e||Si(r,e,.001)},i.hkt=function(){var t;if(!this.uyt)return!1;if(this.uyt.Idt.Km!==fL.wV)return!1;var n=null==(t=this.qTt)?void 0:t.Mc;if(n&&n.Sot)return!0;for(var i,r=[],e=Lt(this.uyt.Idt.smt);!(i=e()).done;){var s=i.value,u=s.ryt,o=s.Sbt;void 0!==u&&void 0!==o&&r.push(u,o)}var h=new TA(r).LM();return function(t,n,i){if(!n.V||!i.V)return TA.iL();var r=n.Tn(0),e=n.An(n.V-1),s=t.Mn(i).BM().Mn(t).OM(n);return TA.tL(s.Tn(0),s.An(s.V-1)).FM(s).XM(function(t,n){return tve})}(this.ikt,this.rkt,h).V>0},i.fkt=function(t){this.Ho=this.Ho.OM(t)},i.Akt=function(t){t.wn(eW,this.Rs),t.wn(eh.ly,this.bkt),t.wn(eh.Sw,this.Skt),t.wn(zm.ma,this.Tkt),t.wn(eh.Ew,this.kkt),t.wn(eh.Yw,this.Ekt),t.wn("fmt",this.Pkt),t.wn("qpt",this.Pkt)},i.xkt=function(t){t.mn(eW,this.Rs),t.mn(eh.ly,this.bkt),t.mn(eh.Sw,this.Skt),t.mn(zm.ma,this.Tkt),t.mn(eh.Ew,this.kkt),t.mn(eh.Yw,this.Ekt),t.mn("fmt",this.Pkt),t.mn("qpt",this.Pkt)},i.Ikt=function(t){t.wn(eh.Qw,this.Rs)},i.Rkt=function(t){t.mn(eh.Qw,this.Rs)},i.ykt=function(){if(this.qTt){var t=Ui(this.qTt.gmt,function(t){return t.Lot===ig.Bk});if(t)return t.XI}},i.gkt=function(t){var n,i=null==(n=this.uyt)?void 0:n.Idt;if(!i)return TA.iL();var r=i.hSt,e=t?i.Abt:i.Syt;if(void 0===r||void 0===e)return TA.iL();if(!t){var s=this.lkt;s.V>0&&s.An(s.V-1)>e&&(e=b.min(s.An(s.V-1),i.Abt))}var u=this.ct;return isFinite(u)&&u>e&&(e=u),TA.tL(r,e).CM()},i.Un=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:dr(n),e=this.uyt.Idt;try{i=e.oSt,r=e.rSt}catch(t){throw new y("Something went wrong determining the start of the provided MPEG-DASH stream")}if(!i)throw new y("Something went wrong determining the initial Period of the provided MPEG-DASH stream");if(void 0===r)throw new y("Something went wrong determining the start time of the provided MPEG-DASH stream");return t.textTracks&&this.Ckt(t.textTracks),this.k7(),s=this.klt(i),u=cH(i,s,void 0,void 0,this.Ypt),o=this.zTt(i,u,i,u,!0),u.forEach(function(t){return t.Rt=!0}),h=this.GTt(u,o),[4,this.Lp(h)];case 1:return a.sent(),this.YTt=h,dr(n),[4,this.NTt(i,s,u,o)];case 2:return c=a.sent(),dr(n),this.Dkt(c),this.R7(),dr(n),[4,c.$ot()];case 3:return a.sent(),dr(n),!this.Bkt&&r>0&&this.My(r,!0,mH.MSt),this.Sz||(this.QTt(),this.Nkt()),[2]}})}).call(this)},i.QTt=function(){this.OTt.Zg(),this.OTt=new hr,this.HTt=_r(this.Mkt(this.HTt,this.UTt,this.OTt.Yg),this.OTt).catch(this.mmt)},i.Lkt=function(){this.OTt.Zg()},i.Mkt=function(t,n,i){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return[4,ut.all([t,n])];case 1:s.sent(),dr(i),s.label=2;case 2:return(e=null==(r=this.qTt)?void 0:r.Mc)?[4,this.Okt(e,i)]:[3,4];case 3:return s.sent()?[3,2]:[3,4];case 4:return[2]}})}).call(this)},i.Okt=function(t,n){return Vt(function(){var i,r,e,s;return zt(this,function(u){switch(u.label){case 0:dr(n),r=this.qTt,u.label=1;case 1:if(this.uyt.Idt.Km!==fL.wV||void 0!==(null==(i=this.wbt(t))?void 0:i.ryt))return[3,7];u.label=2;case 2:return u.trys.push([2,4,,5]),[4,gr(this.Fkt.ASt,n)];case 3:return u.sent(),[3,5];case 4:if(lr(e=u.sent()),this.Ukt())return[2,!0];throw e;case 5:return[4,this.Vkt()];case 6:return u.sent(),[3,1];case 7:return dr(n),[4,this.Vkt()];case 8:u.sent(),dr(n),u.label=9;case 9:return r.Jpt()?[3,12]:[4,r.ww(vL.Mlt,n)];case 10:return u.sent(),[4,this.Vkt()];case 11:return u.sent(),[3,9];case 12:return dr(n),[4,this.Vkt()];case 13:return u.sent(),dr(n),(s=this.wbt(t))?this.Hkt(s)?[4,this.Wkt(s,n)]:[3,15]:(this.C3(),[2,!1]);case 14:return u.sent(),[3,17];case 15:return[4,this.qkt(s,n)];case 16:u.sent(),u.label=17;case 17:return[2,!0]}})}).call(this)},i.Ukt=function(){var t=this.QW;return Un(t)&&t.An>this.MP},i.Hkt=function(t){var n,i,r,e,s,u=null!=(s=null==(n=this.Ac)?void 0:n.seamlessSwitchStrategy)?s:OA.OL;if(u===OA.FL)return!0;if(u===OA.UL)return!1;var o=this.qTt,h=null==o?void 0:o.Mc,c=null==o?void 0:o.gmt,a=cH(t,this.klt(t),h,c,this.Ypt),f=this.zTt(t,a,h,c,!1);if(u===OA.CLEAR_ONLY&&((null==(i=this.qTt)?void 0:i.Tpt)||f)||u===OA.SAME_DRM_ONLY&&!((null==(r=this.qTt)?void 0:r.Tpt)&&f||!(null==(e=this.qTt)?void 0:e.Tpt)&&!f))return!1;var v=this.GTt(a,f);return this.bTt(v)},i.zkt=function(){return!0},i.Gkt=function(t){for(var n,i=Lt(this.Xkt());!(n=i()).done;){var r=n.value;r!==t&&(r.Xk=Hm.Nh)}},i.KTt=function(){if(void 0!==this.jkt){if(this.jkt.tR){var t=Ui(this.ht.II,function(t){return t.Rt});void 0!==t&&this.jkt.bs===t.bs||(this.jkt.Xk=Hm.Nh)}}else this.Qkt()},i.Qkt=function(){if(!this.Xkt().length){var t=Ui(this.ht.II,function(t){return t.Rt});if(void 0!==t)for(var n,i=Lt(this.nt.II.filter(function(t){return t.tR}));!(n=i()).done;){var r=n.value;if(r.bs===t.bs)return r.Xk=Hm.Kn,void(this.jkt=r)}}},i.Xkt=function(){return this.nt.II.filter(function(t){return t.Xk===Hm.Kn&&(t.Lt===Ym.FU||t.Lt===Ym.OU)})},i.Kkt=function(t){if(t&&this.jkt){var n=function(t,n){if(""!==t.bs)return n.filter(function(n){return n.bs===t.bs})[0]}(this.jkt,t.nt.II);n&&(n.Xk=Hm.Kn)}},i.Wkt=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c,a,f,v,d;return zt(this,function(l){switch(l.label){case 0:e=this.qTt,s=this.ekt,u=this.YTt,l.label=1;case 1:return l.trys.push([1,16,,22]),dr(n),o=e.Mc,h=e.gmt,c=this.klt(t),cW(e.kmt,c),a=cH(t,c,o,h,this.Ypt),f=this.zTt(t,a,o,h,!1),a.forEach(function(t){return t.Rt=!0}),v=this.GTt(a,f),[4,e.Jot()];case 2:return l.sent(),this.A3(),dr(n),s&&s.Mc===t?this.bTt(v)?[4,this.kTt(v)]:[3,4]:[3,5];case 3:l.sent(),l.label=4;case 4:return this.YTt=v,[3,11];case 5:return s?[4,s.kn(!0)]:[3,7];case 6:l.sent(),l.label=7;case 7:return this.bTt(v)?[4,this.kTt(v)]:[3,9];case 8:l.sent(),l.label=9;case 9:return this.YTt=v,[4,this.NTt(t,c,a,f)];case 10:s=l.sent(),this.ekt=s,this.Ikt(s),this.Ykt.BI=s.nt,s.iat(e),l.label=11;case 11:return[4,s.$ot()];case 12:l.sent(),dr(n),l.label=13;case 13:return this.ZTt900))return[3,5];this.Zkt=i,this.JTt(),r=b.max(this.ZTt,t.Tn),e.label=2;case 2:return e.trys.push([2,,4,5]),[4,this.$Tt(r,!1,!0,n)];case 3:return e.sent(),[3,5];case 4:return this.tkt(),[7];case 5:return[2]}})}).call(this)},i.qkt=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c,a,f,v,d;return zt(this,function(l){switch(l.label){case 0:return dr(n),[4,this.qTt.Jot()];case 1:return l.sent(),this.A3(),[4,this.RTt(t.Tn)];case 2:l.sent(),dr(n),this.C3(),l.label=3;case 3:return!this.TL.UP&&this.ZTt0&&c.push(n.iEt(ig.Dk,r)),e.length>0&&c.push(n.iEt(ig.Bk,e)),c},i.GTt=function(t,n){var i,r,e,s,u,o,h,c,a,f=this,v=t.map(function(t){var n;return PM.Yct(null!=(n=t.ilt)?n:t.rat,kA(t.Lot,f.Ypt))}).map(function(t){return{qT:t.qT}}),d=null==(r=this.Ac)||null==(i=r.dash)?void 0:i.desiredTimescale,l=(null==(e=this.Ac)?void 0:e.seamlessSwitchStrategy)!==OA.UL&&(null==(s=this.Ac)?void 0:s.seamlessSwitchStrategy)!==OA.CLEAR_ONLY&&(null==(u=this.Ac)?void 0:u.seamlessSwitchStrategy)!==OA.SAME_DRM_ONLY&&(null!=(a=null==(h=this.Ac)||null==(o=h.dash)?void 0:o.needsTimescaleShifting)?a:Vn.Zs.kp),w=null==(c=this.Ac)?void 0:c.useManagedMediaSource;return{Km:Sy.wV,L4:v,aq:zH(n),T8:null==n?void 0:n.T8,kp:l,x3:d,X4:w}},i.zTt=function(t,i,r,e,s){var u,o,h,c=this.Ac.contentProtection,a=n.eEt(i,c);if(void 0!==a)return a;var f=null!=(h=null==(u=this.Ac)?void 0:u.seamlessSwitchStrategy)?h:OA.OL;if(f!==OA.UL&&f!==OA.CLEAR_ONLY&&f!==OA.SAME_DRM_ONLY){var v=null==(o=this.qTt)?void 0:o.Tpt;if(!s&&void 0!==v){var d=!v.T8;if(f===OA.OL&&d&&!this.zkt())return;return v}var l=!s&&f===OA.OL;if(void 0!==(a=this.sEt(t,c,r,e,l)))return a.T8=!0,a}},i.sEt=function(t,i,r,e,s){for(var u=t,o=!1;;)if(void 0!==(u=o?this.ybt(u):this.wbt(u))){var h=cH(u,this.klt(u),r,e,this.Ypt),c=n.eEt(h,i);if(s){var a=this.GTt(h,c);if(!this.bTt(a))return}if(void 0!==c)return c}else{if(o)return;o=!0,u=t}},i.Ckt=function(t){for(var n,i=Lt(t);!(n=i()).done;){var r=n.value;r.src&&this.pq.eV(r)}Ay(this.pq.Z)},i.zx=function(){var t,n=this.hx;this.ckt=!0,n||(this.X8||(this.nEt(new fr),this.rEt()),(null==(t=this.jW)?void 0:t.sL)&&this.jW.Xx(),this.hEt())},i.Gx=function(){this.oEt||(this.oEt=new Vc),this.aEt();var t=this.oEt.Qy;return kr(t),t},i.aEt=function(){if(this.ckt=!1,this.n7=!0,this.uEt=!1,this.vkt(),this.UP){var t=this.rkt;t.V>0&&this.My(t.Tn(0))}this.X8||this.h7().then(this.cEt,this.nEt),this.MTt(),this.hEt()},i.h7=function(){return this.TL.Gx()},i.rEt=function(){this.TL.zx()},i.k7=function(){this.X8||(this.ckt=this.hx,this.X8=!0,this.rEt())},i.R7=function(){this.X8&&(this.X8=!1,this.ckt||this.h7().then(this.cEt,this.nEt),this.MTt(),this.hEt())},i.hEt=function(){var t=this.NV,n=this.hx;t!==n&&(this.NV=n,n?this.So(new hT(this.MP)):this.So(new cT(this.MP)))},i.My=function(t,n,i){return void 0===n&&(n=!1),void 0===i&&(i=mH.NSt),this.Bkt=!0,this.OTt.Zg(),this.m7.Zg(),this.Sz=!0,this.q8=t,this.uEt=this.uEt&&this.z8(),this.fkt(this.lkt),this.dEt(new dT(this.MP)),this.m7=new hr,this.w7=_r(this.y7(t,this.HTt,this.w7,this.UTt,this.m7.Yg,n,i),this.m7).catch(this.mmt),this.w7},i.lEt=function(){this.m7.Zg()},i.y7=function(){return Vt(function(t,n,i,r,e,s,u,o){var h,c,a,f,v,d,l,w,g,_,m,y,p,k,b,A,T,S;return zt(this,function(E){switch(E.label){case 0:void 0===s&&(s=!1),void 0===u&&(u=mH.NSt),void 0===o&&(o=!1),null==(h=this.jW)||h.Xx(),E.label=1;case 1:return E.trys.push([1,30,,31]),[4,ut.all([n,i,r])];case 2:return E.sent(),dr(e),[4,gr(this.WTt.Qy,e)];case 3:return E.sent(),f=this.rkt.DM(t),this.q8=f,v=o||(null==(a=this.Ac)||null==(c=a.dash)?void 0:c.forceHardSwitchWhenSeekingBackwards)&&f<=this.MP,d=this.fEt(f),l=this.qTt,v||!l||!l.Sx.Cr(f)&&u!==mH.MSt&&l.Mc!==d?[3,8]:!(w=this.ekt)||w.nmt?[3,7]:[4,w.Jot()];case 4:return E.sent(),this.A3(),g=this.GTt(l.pmt,l.Tpt),this.bTt(g)?[4,this.kTt(g)]:[3,6];case 5:E.sent(),E.label=6;case 6:this.YTt=g,E.label=7;case 7:return[3,27];case 8:return d?(_=this.ekt,this.k7(),l?[4,l.Jot()]:[3,10]):[3,27];case 9:E.sent(),E.label=10;case 10:return!_||_.Mc!==d||v?[3,13]:(m=this.GTt(_.pmt,_.Tpt),this.A3(),this.bTt(m)?[4,this.kTt(m)]:[3,12]);case 11:E.sent(),E.label=12;case 12:return this.YTt=m,[3,25];case 13:return _?[4,_.kn(!0)]:[3,15];case 14:E.sent(),E.label=15;case 15:return y=this.klt(d),l&&cW(l.kmt,y),p=null==l?void 0:l.Mc,k=null==l?void 0:l.gmt,b=cH(d,y,p,k,this.Ypt),A=this.zTt(d,b,p,k,!1),b.forEach(function(t){return t.Rt=!0}),T=this.GTt(b,A),!this.Hkt(d)||v?[3,18]:(this.A3(),this.bTt(T)?[4,this.kTt(T)]:[3,17]);case 16:E.sent(),E.label=17;case 17:return[3,23];case 18:return A=this.zTt(d,b,p,k,!0),T=this.GTt(b,A),l?(this.$kt.mn(Dw.pa,this.tEt),[4,l.kn()]):[3,20];case 19:E.sent(),this.$kt.wn(Dw.pa,this.tEt),this.qTt=void 0,E.label=20;case 20:return[4,this.PTt()];case 21:return E.sent(),[4,this.Lp(T)];case 22:E.sent(),E.label=23;case 23:return this.YTt=T,[4,this.NTt(d,y,b,A)];case 24:_=E.sent(),this.ekt=_,this.Ykt.BI=_.nt,this.Ikt(_),_.iat(this.qTt),E.label=25;case 25:return[4,_.$ot(MO.Lht)];case 26:return E.sent(),this.Dkt(_),[3,27];case 27:return kr(S=this.$Tt(f,s,!1,e)),this.q8=void 0,[4,this.qTt.$ot(MO.Lht)];case 28:return E.sent(),dr(e),this.QTt(),[4,S];case 29:return E.sent(),dr(e),this.R7(),this.Sz=!1,this.vEt(new lT(this.MP)),this.Nkt(),[3,31];case 30:return vr(E.sent())?[2]:[3,31];case 31:return[2]}})}).apply(this,arguments)},i.Nkt=function(){if(!this.hx&&!this.kx&&void 0!==this.BL){var t,n,i=this.MP;if(this.MP+this.BL-this.Fx.Cd.maximumOffset0&&(a=c.DM(t),s!==a&&(c.Cr(s)&&this.uyt.Idt.Km===fL.wV||(s=a,e=!0))),e)e=!1,null==o||o.Zg(),(o=new hr).$g(r),kr(u=_r(this._Et(s,n,i,o.Yg),o));else if(!this.mkt&&!this.Y4)return[3,7];return f=qt(h,hr.ep([r]),!1),[4,ut.race([u,this.ww([eh.iy,eh.Rw],f.Yg),this.uyt.Idt.ww(FO.yot,f.Yg)])];case 3:return d.sent(),[3,6];case 4:return v=d.sent(),h.error=v,h.hasError=!0,[3,6];case 5:return Gt(h),[7];case 6:return[3,1];case 7:return[2]}})}).call(this)},i._Et=function(t,n,i,r){return Vt(function(){return zt(this,function(e){switch(e.label){case 0:this.TL.My(t,n,i),e.label=1;case 1:return this.mkt||this.Y4?[4,this.TL.ww([eh.Zw,eh.Vw],r)]:[3,3];case 2:return e.sent(),[3,1];case 3:return[2]}})}).call(this)},i.JTt=function(){void 0===this.skt&&(this.skt=this.ZTt,this.TL.mn(eh.$w,this.dEt),this.TL.mn(eh.Zw,this.vEt))},i.tkt=function(){if(void 0!==this.skt){var t=this.ZTt;this.skt=void 0,this.TL.wn(eh.$w,this.dEt),this.TL.wn(eh.Zw,this.vEt),this.ZTt!==t&&this.Nc()}},i.gEt=function(t){this.Ho=this.Ho.OM(t)},i.fEt=function(t){var n=this.uyt.Idt,i=n.smt.filter(function(t){return t.ct>=.2});if(0!==i.length){var r=i[0];if(t<=r.Tn)return r;for(var e,s=Lt(i);!(e=s()).done;){var u=e.value;if(u.An>t)return u}return n.Km!==fL.wV?i[i.length-1]:void 0}},i.ybt=function(t){for(var n=t.Smt;n&&n.ct<.2;)n=n.Smt;return n},i.wbt=function(t){for(var n=t.Tmt;n&&n.ct<.2;)n=n.Tmt;return n},i.Ta=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c,a;return zt(this,function(f){switch(f.label){case 0:r={stack:[],error:void 0,hasError:!1},f.label=1;case 1:return f.trys.push([1,8,9,10]),this.lq.IW(t.contentProtection),this.pEt(),!this.Ac||KA(this.Ac)?[3,3]:[4,this.hr()];case 2:f.sent(),f.label=3;case 3:return!t||KA(t)?[2]:(s=qt(r,hr.ep([i]),!1),this.rV=hr.ep([s.Yg]),this.Ac=t,this.mEt=n,this.Ypt=t.abr,this.Npt=t.ignoreEmbeddedTextTrackTypes,u=new pH(this.nV,Boolean(this.Ac.useCredentials),this._dt),o=EH(u,this.eut),this.nSt(!0),this.Fkt=new sH({iR:Vn.Dh(this.Ac.src),cSt:null!=(h=null==(e=this.Ac.latencyConfiguration)?void 0:e.targetOffset)?h:this.Ac.liveOffset,_St:this.Ac.timeServer,zk:this.Ac.useCredentials},this.wEt(this.Ypt),this.nV,o,this.Ac.dash),this.uyt=this.Fkt.Br,this.uyt.Idt.wn(eh.Ww,this.yEt),this.uyt.Idt.wn(eh.qw,this.AEt),this.uyt.Idt.wn(MV.xbt,this.bEt),this.uyt.Idt.wn(FO.yot,this.MTt),[4,this.SEt.Un(this.uyt.Idt)]);case 4:return f.sent(),[4,this.TEt.Un(this.uyt.Idt)];case 5:return f.sent(),ji(this.Npt,Dg.EMSG)?[3,7]:(this.wpt=new nW(this.TL),this.Gl.FW(this.wpt.Z),[4,this.wpt.Un(this.uyt.Idt)]);case 6:f.sent(),f.label=7;case 7:return t.latencyConfiguration&&(c=t.latencyConfiguration,this.jW=new rW(this,this.TL,c),this.jW.Rt=!0,this.rq.Ea(this.jW)),this.vkt(),s.zg(),[3,10];case 8:return a=f.sent(),r.error=a,r.hasError=!0,[3,10];case 9:return Gt(r),[7];case 10:return[2]}})}).call(this)},i.Px=function(t,n,i,r){return ut.resolve()},i.xx=function(){return ut.resolve()},i.kEt=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return t=this.uyt.Idt.sx,this.nSt(t),t?(this.Pkt(),this.bq.mn(Ey.SM,this.EEt),[2]):this.Ukt()?(this.bq.wn(Ey.SM,this.EEt),[2]):[4,this.PEt()];case 1:return n.sent(),[2]}})}).call(this)},i.PEt=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:return[4,ut.all([null==(t=this.qTt)?void 0:t.Jot(MO.Jht),null==(n=this.ekt)?void 0:n.Jot(MO.Jht)].filter(Un))];case 1:throw i.sent(),this.Lkt(),this.lEt(),this.FTt.Zg(),new y("The provided MPEG-DASH manifest could not be loaded")}})}).call(this)},i.nSt=function(t){this.sSt!==t&&(this.sSt=t,this.So(t?new RH:new CH))},i.vkt=function(){this.uyt&&(this.xEt=this.IEt(this.xEt,this.rV.Yg).catch(this.mmt))},i.IEt=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return t?[4,t]:[3,2];case 1:r.sent(),dr(n),r.label=2;case 2:return r.trys.push([2,7,,8]),this.mx===jT.OL||this.n7?[4,this.REt(n)]:[3,4];case 3:return r.sent(),[3,6];case 4:return this.mx!==jT.VU?[3,6]:[4,this.CEt(n)];case 5:return r.sent(),[3,6];case 6:return[3,8];case 7:throw lr(i=r.sent()),this.qq(new fd(cd.MANIFEST_LOAD_ERROR,i.message,i)),i;case 8:return[2]}})}).call(this)},i.REt=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return[4,this.CEt(t)];case 1:i.sent(),this.DEt||(this.DEt=!0,this.WTt.$g(this.Un(this.mEt,t))),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.WTt.Qy];case 3:return i.sent(),[3,5];case 4:return lr(n=i.sent()),this.qq(new fd(cd.MEDIA_DECODE_ERROR,n.message,n)),[3,5];case 5:return[2]}})}).call(this)},i.CEt=function(t){return Vt(function(){var n,i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,gr(this.Fkt.W,t)];case 1:return o.sent(),n=this.uyt.Idt,void 0===this.jW&&n.Km===fL.wV&&(i=n.Zwt,r=(null==i?void 0:i.Mbt)?(null==i?void 0:i.Mbt)/1e3:n.aSt,e=(null==i?void 0:i.Dbt)?(null==i?void 0:i.Dbt)/1e3:.5*r,s=(null==i?void 0:i.Nbt)?(null==i?void 0:i.Nbt)/1e3:1.5*r,u={minimumOffset:e,maximumOffset:s,targetOffset:r,forceSeekOffset:2.5*r,minimumPlaybackRate:IA,maximumPlaybackRate:RA},this.jW=new rW(this,this.TL,u),this.rq.Ea(this.jW)),[2]}})}).call(this)},i.Dkt=function(t){var i=this.qTt;t!==i&&(this.qTt&&this.xkt(this.qTt),this.ekt&&this.Rkt(this.ekt),i&&this.fkt(this.lkt),this.qTt=t,this.ekt=i,this.Akt(this.qTt),this.ekt&&this.Ikt(this.ekt),this.YL.BI=t.ht,this.$L.BI=t.rt,this.Kkt(t),this.$kt.mn(Dw.pa,this.tEt),n.BEt(this.$kt),this.$kt.wn(Dw.pa,this.tEt),this.$kt.BI=t.nt,this.Ykt.BI=void 0,this.Qkt())},i.be=function(){this.TL.be()},i.we=function(){this.TL.we()},i.qq=function(t){this.JW||(kr(this.hr()),this.JW=hg(t),this.ZW=t,this.So(new _b(t)))},i.pEt=function(){this.JW=void 0,this.ZW=void 0},i.STt=function(){var t=this.iq;t&&(t.K3&&(t.K3.MY=this.Rz.GY),t.Q3&&(t.Q3.MY=this.Rz.GY))},i.TTt=function(){var t=this.iq;t&&(t.K3&&(t.K3.UY=this.Rz.UY),t.Q3&&(t.Q3.UY=this.Rz.UY))},i.determineStallJumpTarget=function(){if(this.qTt)return this.qTt.Jpt()&&this.MP>this.qTt.An-oD&&!this.qTt.emt?this.qTt.An:void 0},i.hr=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:if(this.NEt)return[2,this.NEt];t.label=1;case 1:return t.trys.push([1,,3,4]),this.NEt=this.MEt(),[4,this.NEt];case 2:return t.sent(),[3,4];case 3:return this.NEt=void 0,[7];case 4:return[2]}})}).call(this)},i.MEt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.ux=1,this.rV.Zg(),this.lEt(),this.Lkt(),this.FTt.Zg(),this.WTt.Zg(),this.Bkt=!1,this.zx(),this.n7=!1,this.uEt=!1,this.YL.BI=void 0,this.$L.BI=void 0,this.$kt.BI=void 0,this.Ykt.BI=void 0,this.xEt?[4,this.xEt.catch(di)]:[3,2];case 1:t.sent(),this.xEt=void 0,t.label=2;case 2:return[4,ut.all([this.HTt,this.w7,this.UTt,this.WTt.Qy.catch(di)])];case 3:return t.sent(),this.qTt?[4,this.qTt.kn(!0)]:[3,5];case 4:t.sent(),this.qTt=void 0,t.label=5;case 5:return this.ekt?(this.Rkt(this.ekt),[4,this.ekt.kn(!0)]):[3,7];case 6:t.sent(),this.ekt=void 0,t.label=7;case 7:return[4,this.PTt()];case 8:return t.sent(),this.YTt=void 0,this.jkt=void 0,this.bq.mn(Ey.SM,this.EEt),this.bq.hr(),[4,this.SEt.hr()];case 9:return t.sent(),[4,this.TEt.hr()];case 10:return t.sent(),void 0===this.wpt?[3,12]:(this.Gl.WW(this.wpt.Z),[4,this.wpt.kn()]);case 11:t.sent(),this.wpt=void 0,t.label=12;case 12:return this.uyt?(this.uyt.Idt.mn(eh.Ww,this.yEt),this.uyt.Idt.mn(eh.qw,this.AEt),this.uyt.Idt.mn(MV.xbt,this.bEt),[4,this.Fkt.kn()]):[3,14];case 13:t.sent(),this.uyt=void 0,t.label=14;case 14:return this._kt=!1,this.LEt=NaN,this.OEt=0,this.FEt=0,this.skt=void 0,this.X8=!1,this.Ho=TA.iL(),this.NV=!0,this.q8=void 0,this.UEt=!1,this.Sz=!1,this.DEt=!1,this.WTt=new Vc,this.okt=0,this.akt=0,this.ukt=0,this.Ac=void 0,this.mEt=void 0,this.Npt=[],this.Zkt=void 0,this.rq.hr(),this.jW=void 0,this.xTt={iO:0,eO:0,sO:0},[4,this.pq.hr()];case 15:return t.sent(),this.TL.Aq(),this.VEt.hr(),[2]}})}).call(this)},i.kn=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),this.pEt(),[4,this.hr()];case 1:return t.sent(),this.Vo(),this.YL.kn(),this.$L.kn(),this.$kt.kn(),this.Ykt.kn(),this.Gl.kn(),this.bq.kn(),this.kq.zg(),[4,this.SEt.kn()];case 2:return t.sent(),[4,this.TEt.kn()];case 3:return t.sent(),this.VEt.kn(),this.TL.mn(eh.Rw,this.p9),this.TL.mn(fh.Dw,this.D8),this.TL.mn(eh.Bw,this.HEt),this.TL.mn(eh.$w,this.dEt),this.TL.mn(eh.Zw,this.vEt),this.TL.mn(eh.Jw,this.Ekt),this.TL.mn(eh._y,this.Nc),this.TL.mn([eh.uo,eh.jw],this.WEt),this.TL.mn(sW,this.Rs),[4,this.pq.kn()];case 4:return t.sent(),this.Gl.kn(),this.Rz.mn("NY",this.qEt),this.Rz.mn("FY",this.zEt),this.TL.mn(zm.ma,this.GEt),this.TL.mn([eh.Pw,eh.Ew],this.Rs),this.TL.mn(eh.yy,this.Pmt),this.TL.mn(eh.LICENSE_REQUEST_GENERATED,this.umt),this.TL.Eq=void 0,this.lq.mn("contentProtectionsTracked",this.XEt),this.TL.N9=void 0,[2]}})}).call(this)},i.Hx=function(){return this.TL.Ma},i.Aa=function(){return this.TL.mq},i.jx=function(){return!1},i.Qx=function(){},i.Kx=function(){},i.Yx=function(){},i.Jx=function(){this.LTt(!0)},i.tI=function(t){var n=this.TL.wq(t);return this.VEt.tt(n),n},n.iEt=function(t,n){for(var i,r=[],e=[],s=!n.some(function(t){return t.Plt.some(function(t){return"main"===t.zE})}),u=Lt(n);!(i=u()).done;){var o=i.value;if(-1===r.indexOf(o)){var h=oW(o.Wdt.concat(o.Plt),s);s=!1;for(var c,a=o.rat.map(function(t){return t.kot}),f=new sL(o,a,h),v=Lt(hW(o,n));!(c=v()).done;){var d=c.value;f.slt(d),r.push(d)}e.push(f)}}return new oH(t,e)},n.eEt=function(t,n){if(t.length){for(var i,r,e=Lt(t);!(r=e()).done;){var s=r.value,u=0===s.hlt.length;i=LH(i,HH(s.Nut,n,u))}return(null==n?void 0:n.preferredKeySystems)&&i&&(i.kpt=GH(i.kpt,n.preferredKeySystems)),i}},n.BEt=function(t){for(var n,i=Lt(t.II);!(n=i()).done;){n.value.Xk=Hm.Nh}},Nt(n,[{key:"ht",get:function(){return this.YL}},{key:"QW",get:function(){var t=this.ZTt,n=this.ikt,i=n.VM(t);if(-1!==i)return{Tn:n.Tn(i),An:n.An(i)}}},{key:"ikt",get:function(){var t,n,i,r,e=null!=(i=null==(t=this.qTt)?void 0:t.IP)?i:TA.iL(),s=null!=(r=null==(n=this.ekt)?void 0:n.IP)?r:TA.iL();return e.OM(s)}},{key:"IP",get:function(){return this.ikt._s()}},{key:"CP",get:function(){var t,n=null==(t=this.uyt)?void 0:t.Idt,i=null==n?void 0:n.Vwt;if(n&&i){var r=i.getTime(),e=1e3*this.MP;return new Date(e+r)}},set:function(t){var n,i=null==(n=this.uyt)?void 0:n.Idt,r=null==i?void 0:i.Vwt;if(t&&i&&r){var e=r.getTime()/1e3,s=t.getTime()/1e3;this.My(s-e)}}},{key:"bt",get:function(){return this.Ac}},{key:"ZTt",get:function(){return void 0!==this.q8?this.q8:void 0!==this.skt?this.skt:this.TL.MP}},{key:"MP",get:function(){return this.ZTt},set:function(t){this.OP(t)}},{key:"ct",get:function(){var t=NaN;return this.qTt&&this.qTt.emt?t=this.qTt.An:this.uyt&&void 0!==this.uyt.Idt.Km&&(t=this.uyt.Idt.Gwt?this.uyt.Idt.Gwt.Rmt():1/0),t}},{key:"An",get:function(){return this.ct}},{key:"UP",get:function(){return this.kx?this.z8():!(!this.qTt||!this.qTt.emt)&&this.TL.UP}},{key:"lt",get:function(){return this.JW}},{key:"WP",get:function(){return this.ZW}},{key:"zP",get:function(){}},{key:"jP",get:function(){}},{key:"JP",get:function(){return Yu({},this.ITt,{nO:pb.Ng.fW(),rO:this.okt,hO:{amountOfBufferedAudioSegments:this.akt,amountOfBufferedVideoSegments:this.ukt}})}},{key:"ITt",get:function(){return function(t,n){return{iO:t.iO+n.iO,eO:t.eO+n.eO,sO:t.sO+n.sO}}(this.xTt,this.TL.ZP())}},{key:"$P",get:function(){return this.TL.$P},set:function(t){this.TL.$P=t}},{key:"hx",get:function(){return this.X8?this.ckt:this.qTt&&this.qTt.emt?this.dkt:this.ckt}},{key:"ux",get:function(){return this.TL.ux},set:function(t){this.TL.ux=t}},{key:"_x",get:function(){var t=this.Ho;return this.qTt&&(t=t.OM(this.lkt)),t.LM(.1)._s()}},{key:"lkt",get:function(){return this.TL._x}},{key:"mx",get:function(){return this.tq},set:function(t){this.tq=t,this.vkt()}},{key:"Ax",get:function(){var t=this.TL.Ax;return this._kt&&(t=b.max(Cy.Qn,t)),t}},{key:"rkt",get:function(){return this.gkt(!1)}},{key:"pkt",get:function(){return this.gkt(!0)}},{key:"Sx",get:function(){return this.rkt._s()}},{key:"kx",get:function(){return this.Sz||this.mkt}},{key:"mkt",get:function(){return this.TL.kx}},{key:"Y4",get:function(){return this.TL.Y4}},{key:"nq",get:function(){}},{key:"wkt",get:function(){var t,n;return null!=(n=null==(t=this.uyt)?void 0:t.Idt.Km)?n:fL.mV}},{key:"nt",get:function(){return this.Gl}},{key:"rt",get:function(){return this.$L}},{key:"Rx",get:function(){var t;return OR(this.TL)&&(this.TL.Rx||(null==(t=this.ykt())?void 0:t.Mi))||0}},{key:"Bx",get:function(){var t;return OR(this.TL)&&(this.TL.Bx||(null==(t=this.ykt())?void 0:t.Ti))||0}},{key:"Mx",get:function(){return this.TL.Mx},set:function(t){this.TL.Mx=Ti(t,0,1)}},{key:"Fx",get:function(){return this.rq}},{key:"Vx",get:function(){return!1},set:function(t){}},{key:"hq",get:function(){return this.oq}},{key:"dkt",get:function(){return this.TL.hx}},{key:"sx",get:function(){return this.sSt}},{key:"KP",get:function(){return!1}},{key:"BL",get:function(){var t,n=null==(t=this.uyt)?void 0:t.Idt;if(n&&n.Km===fL.wV&&n.Vwt)return n.xdt().getTime()/1e3-n.Vwt.getTime()/1e3-this.MP}}]),n}(th);function oW(t,n){var i=t.filter(function(t){return"urn:mpeg:dash:role:2011"===t.y8}).map(function(t){return t.zE}).filter(Un);return n||ji(i,"main")?ji(i,"caption")?"captions":ji(i,"subtitle")?"subtitles":ji(i,"dub")?"translation":"main":ji(i,"sign")?"sign":ji(i,"description")?"descriptions":ji(i,"commentary")?"commentary":"alternative"}function hW(t,n){for(var i,r,e,s=function(){var t=e.value,i=Number(t),r=Ui(n,function(t){return t.o===i});r&&h.push(r)},u=Ui([].concat(t.iwt,t.ewt),function(t){return"urn:mpeg:dash:adaptation-set-switching:2016"===t.y8}),o=null!=(r=null==u||null==(i=u.zE)?void 0:i.split(","))?r:[],h=[],c=Lt(o);!(e=c()).done;)s();return h}function cW(t,n){for(var i,r=function(){var t=function(){var t=s.value,n=t.YI;if(!n)return"continue";var i=t.rat.map(function(t){return t.o}),r=Ui(o,function(t){var n=t.rat.map(function(t){return t.o});return Ki(i,n)});if(!r)return"continue";var e=n.map(function(t){return t.o});r.YI=r.KI.II.filter(function(t){return ji(e,t.o)})},r=i.value,e=Ui(n,function(t){return t.Km===r.Km});if(!e)return"continue";for(var s,u=r.Z,o=e.Z,h=Lt(u);!(s=h()).done;)t()},e=Lt(t);!(i=e()).done;)r()}F(),Et(),Wt(),Qt();var aW=function(){function t(t,n,i,r){this.QEt=void 0,this.KEt=void 0,this.YEt=void 0,this.JEt=void 0,this.QEt=t,this.KEt=n,this.YEt=i,this.JEt=r}var n=t.prototype;return n.HSt=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.QEt.jEt(t.map(kH))];case 1:return[2,n.sent().shift()]}})}).call(this)},n.Uct=function(t,n){var i=bH(t,n);return this.KEt.Hy(i)},n.iut=function(t,n){return Vt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:return r=bH(t,n),[4,this.YEt.Wy(r)];case 1:return[2,null==(i=e.sent())?void 0:i.data]}})}).call(this)},n.WJ=function(t){return this.JEt.Wy(t)},t}();F(),Et(),Bt(),F(),Et(),F(),Et();var fW=function(){function t(){}var n=t.prototype;return n.ZEt=function(t){return ut.resolve(!1)},n.zSt=function(t){return ut.reject(vW)},n.$Et=function(t){return ut.reject(vW)},n.Hy=function(t){return ut.resolve(!1)},n.Wy=function(t){return ut.resolve(void 0)},n.tPt=function(t,n){return ut.resolve(void 0)},n.jEt=function(t){return ut.resolve([])},n.iPt=function(){return ut.resolve([])},n.ePt=function(t){return ut.resolve([])},n.sPt=function(t,n){return ut.resolve([])},n._S=function(t){return ut.reject(vW)},n.nPt=function(t){return ut.reject(vW)},n.rPt=function(){return ut.reject(vW)},t}(),vW="Storage disabled",dW=function(){function t(){this.dPt=void 0,this.ect=void 0,this.lPt=void 0,this.fPt=void 0,this.vPt=void 0,this.dPt=new fW,this.ect=new fW,this.lPt=new fW,this.fPt=new fW,this.vPt=new fW}return t.prototype.uPt=function(t){return ut.reject(lW)},t.Ret=function(){return ut.resolve(new t)},t}(),lW="Storage disabled";F(),Et(),Wt(),Ut(),Qt(),F(),Et(),Wt(),Bt(),Qt(),F(),Et(),Wt(),Bt(),Qt();var wW=function(){function t(t){var n=this;this.Jg=new Vc,this.oPt=void 0,this.Jg.$g(t),this.Jg.Qy.then(function(t){n.oPt=t})}var n=t.prototype;return n.ZEt=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return(n=this.oPt)?[3,2]:[4,this.hPt];case 1:n=i.sent(),i.label=2;case 2:return[2,n.ZEt(t)]}})}).call(this)},n.zSt=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return(i=this.oPt)?[3,2]:[4,this.hPt];case 1:i=r.sent(),r.label=2;case 2:return[2,i.zSt(t,n)]}})}).call(this)},n.$Et=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return(i=this.oPt)?[3,2]:[4,this.hPt];case 1:i=r.sent(),r.label=2;case 2:return[2,i.$Et(t,n)]}})}).call(this)},n.Hy=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return(n=this.oPt)?[3,2]:[4,this.hPt];case 1:n=i.sent(),i.label=2;case 2:return[2,n.Hy(t)]}})}).call(this)},n.Wy=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return(n=this.oPt)?[3,2]:[4,this.hPt];case 1:n=i.sent(),i.label=2;case 2:return[2,n.Wy(t)]}})}).call(this)},n.tPt=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return(i=this.oPt)?[3,2]:[4,this.hPt];case 1:i=r.sent(),r.label=2;case 2:return[2,i.tPt(t,n)]}})}).call(this)},n.jEt=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return(n=this.oPt)?[3,2]:[4,this.hPt];case 1:n=i.sent(),i.label=2;case 2:return[2,n.jEt(t)]}})}).call(this)},n.iPt=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return(t=this.oPt)?[3,2]:[4,this.hPt];case 1:t=n.sent(),n.label=2;case 2:return[2,t.iPt()]}})}).call(this)},n.ePt=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return(n=this.oPt)?[3,2]:[4,this.hPt];case 1:n=i.sent(),i.label=2;case 2:return[2,n.ePt(t)]}})}).call(this)},n.sPt=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return(i=this.oPt)?[3,2]:[4,this.hPt];case 1:i=r.sent(),r.label=2;case 2:return[2,i.sPt(t,n)]}})}).call(this)},n._S=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return(n=this.oPt)?[3,2]:[4,this.hPt];case 1:n=i.sent(),i.label=2;case 2:return[2,n._S(t)]}})}).call(this)},n.nPt=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return(n=this.oPt)?[3,2]:[4,this.hPt];case 1:n=i.sent(),i.label=2;case 2:return[2,n.nPt(t)]}})}).call(this)},n.rPt=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return(t=this.oPt)?[3,2]:[4,this.hPt];case 1:t=n.sent(),n.label=2;case 2:return[2,t.rPt()]}})}).call(this)},Nt(t,[{key:"hPt",get:function(){return this.Jg.Qy}}]),t}(),gW=function(){function t(t){var n=this;this.Jg=new Vc,this.cPt=void 0,this.ect=void 0,this.dPt=void 0,this.lPt=void 0,this.fPt=void 0,this.vPt=void 0,this.Jg.$g(t);var i=this.Jg.Qy;i.then(function(t){n.cPt=t}),this.ect=new wW(i.then(function(t){return t.ect})),this.dPt=new wW(i.then(function(t){return t.dPt})),this.lPt=new wW(i.then(function(t){return t.lPt})),this.fPt=new wW(i.then(function(t){return t.fPt})),this.vPt=new wW(i.then(function(t){return t.vPt}))}return t.prototype.uPt=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return(n=this.cPt)?[3,2]:[4,this.aPt];case 1:n=i.sent(),i.label=2;case 2:return[4,n.uPt(t)];case 3:return[2,i.sent()]}})}).call(this)},Nt(t,[{key:"aPt",get:function(){return this.Jg.Qy}}]),t}();function _W(t){return new y("This storage cannot handle persistency type "+t)}F(),Et(),F(),Et(),Ut(),F(),Et();var mW=function(t){return t._Pt="readonly",t.gPt="readwrite",t}({}),yW=function(){function t(){this.EA=[]}var n=t.prototype;return n.ZEt=function(t){return ut.resolve("temporary"===t)},n.zSt=function(t,n){return void 0===n&&(n="temporary"),"temporary"!==n?ut.reject(_W(n)):(this.pPt(t.key),this.EA.push(t),ut.resolve())},n.$Et=function(t,n){if(void 0===n&&(n="temporary"),"temporary"!==n)return ut.reject(_W(n));for(var i,r=Lt(t);!(i=r()).done;){var e=i.value;this.pPt(e.key)}for(var s,u=Lt(t);!(s=u()).done;){var o=s.value;this.EA.push(o)}return ut.resolve()},n.Hy=function(t){return ut.resolve(Boolean(this.mPt(t)))},n.Wy=function(t){return ut.resolve(this.mPt(t))},n.tPt=function(t,n){return ut.resolve(this.wPt(t,n))},n.jEt=function(t){var n=this,i=t?t.map(function(t){return n.mPt(t)}):this.EA;return ut.resolve(i.filter(Un))},n.iPt=function(){return ut.resolve([].concat(this.EA))},n.ePt=function(t){return this.sPt(t,"key")},n.sPt=function(t,n){var i=this.EA.filter(function(i){return i[n]===t});return ut.resolve(i)},n._S=function(t){return this.pPt(t),ut.resolve()},n.nPt=function(t){for(var n,i=Lt(t);!(n=i()).done;){var r=n.value;this.pPt(r)}return ut.resolve()},n.rPt=function(){return Yi(this.EA),ut.resolve()},n.mPt=function(t){return this.wPt(t,"key")},n.wPt=function(t,n){for(var i,r=Lt(this.EA);!(i=r()).done;){var e=i.value;if(e[n]===t)return e}},n.pPt=function(t){var n=this.mPt(t);n&&Xi(this.EA,n)},t}(),pW=function(){function t(){this.dPt=void 0,this.ect=void 0,this.lPt=void 0,this.fPt=void 0,this.vPt=void 0,this.dPt=new yW,this.ect=new yW,this.lPt=new yW,this.fPt=new yW,this.vPt=new yW}return t.prototype.uPt=function(t){return t(this)},t.Ret=function(){return ut.resolve(new t)},t}();F(),Et(),Wt(),Bt(),Qt(),F(),Et(),Wt(),Ut(),Qt();var kW=function(){function t(t){this.yPt=void 0,this.yPt=t}var n=t.prototype;return n.ZEt=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:n=Lt(this.yPt),r.label=1;case 1:return(i=n()).done?[3,4]:[4,i.value.ZEt(t)];case 2:if(r.sent())return[2,!0];r.label=3;case 3:return[3,1];case 4:return[2,!1]}})}).call(this)},n.zSt=function(t,n){return void 0===n&&(n="persistent"),Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:i=Lt(this.yPt),s.label=1;case 1:return(r=i()).done?[3,4]:[4,(e=r.value).ZEt(n)];case 2:if(s.sent())return[2,e.zSt(t)];s.label=3;case 3:return[3,1];case 4:throw _W(n)}})}).call(this)},n.$Et=function(t,n){return void 0===n&&(n="persistent"),Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:i=Lt(this.yPt),s.label=1;case 1:return(r=i()).done?[3,4]:[4,(e=r.value).ZEt(n)];case 2:if(s.sent())return[2,e.$Et(t)];s.label=3;case 3:return[3,1];case 4:throw _W(n)}})}).call(this)},n.Hy=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:n=Lt(this.yPt),r.label=1;case 1:return(i=n()).done?[3,4]:[4,i.value.Hy(t)];case 2:if(r.sent())return[2,!0];r.label=3;case 3:return[3,1];case 4:return[2,!1]}})}).call(this)},n.Wy=function(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:n=Lt(this.yPt),e.label=1;case 1:return(i=n()).done?[3,4]:[4,i.value.Wy(t)];case 2:if(r=e.sent())return[2,r];e.label=3;case 3:return[3,1];case 4:return[2,void 0]}})}).call(this)},n.tPt=function(t,n){return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:i=Lt(this.yPt),s.label=1;case 1:return(r=i()).done?[3,4]:[4,r.value.tPt(t,n)];case 2:if(e=s.sent())return[2,e];s.label=3;case 3:return[3,1];case 4:return[2,void 0]}})}).call(this)},n.jEt=function(t){return Vt(function(){var n,i,r,e,s,u,o,h,c,a;return zt(this,function(f){switch(f.label){case 0:n=[],i=Lt(this.yPt),f.label=1;case 1:return(r=i()).done?[3,4]:(e=r.value,o=(u=(s=n).push).apply,h=[s],a=(c=[]).concat,[4,e.jEt(t)]);case 2:o.apply(u,h.concat([a.apply(c,[f.sent()])])),f.label=3;case 3:return[3,1];case 4:return[2,n]}})}).call(this)},n.iPt=function(){return Vt(function(){var t,n,i,r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:t=[],n=Lt(this.yPt),a.label=1;case 1:return(i=n()).done?[3,4]:(r=i.value,u=(s=(e=t).push).apply,o=[e],c=(h=[]).concat,[4,r.iPt()]);case 2:u.apply(s,o.concat([c.apply(h,[a.sent()])])),a.label=3;case 3:return[3,1];case 4:return[2,t]}})}).call(this)},n.ePt=function(t){return Vt(function(){var n,i,r,e,s,u,o,h,c,a;return zt(this,function(f){switch(f.label){case 0:n=[],i=Lt(this.yPt),f.label=1;case 1:return(r=i()).done?[3,4]:(e=r.value,o=(u=(s=n).push).apply,h=[s],a=(c=[]).concat,[4,e.ePt(t)]);case 2:o.apply(u,h.concat([a.apply(c,[f.sent()])])),f.label=3;case 3:return[3,1];case 4:return[2,n]}})}).call(this)},n.sPt=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c,a,f;return zt(this,function(v){switch(v.label){case 0:i=[],r=Lt(this.yPt),v.label=1;case 1:return(e=r()).done?[3,4]:(s=e.value,h=(o=(u=i).push).apply,c=[u],f=(a=[]).concat,[4,s.sPt(t,n)]);case 2:h.apply(o,c.concat([f.apply(a,[v.sent()])])),v.label=3;case 3:return[3,1];case 4:return[2,i]}})}).call(this)},n._S=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:n=Lt(this.yPt),r.label=1;case 1:return(i=n()).done?[3,4]:[4,i.value._S(t)];case 2:r.sent(),r.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},n.nPt=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:n=Lt(this.yPt),r.label=1;case 1:return(i=n()).done?[3,4]:[4,i.value.nPt(t)];case 2:r.sent(),r.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},n.rPt=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:t=Lt(this.yPt),i.label=1;case 1:return(n=t()).done?[3,4]:[4,n.value.rPt()];case 2:i.sent(),i.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},t}();function bW(t){return function(){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return[4,ut.all(t.map(function(t){return t()}))];case 1:return n=i.sent(),[2,AW.Ret(n)]}})})()}}var AW=function(){function t(t){this.EPt=void 0,this.APt=void 0,this.bPt=void 0,this.SPt=void 0,this.TPt=void 0,this.kPt=void 0,this.EPt=t,this.APt=new kW(t.map(function(t){return t.fPt})),this.bPt=new kW(t.map(function(t){return t.vPt})),this.SPt=new kW(t.map(function(t){return t.lPt})),this.TPt=new kW(t.map(function(t){return t.dPt})),this.kPt=new kW(t.map(function(t){return t.ect}))}return t.prototype.uPt=function(n){var i=this;if(0===this.EPt.length)return n(this);var r=[],e=0,s=function(u){return r.push(u),++e0)return b.max(0,t.Tn(0)-300)}return 0},i.y7=function(n,i,r,e,s,u,o,h){return void 0===u&&(u=!1),void 0===o&&(o=mH.NSt),void 0===h&&(h=!1),h||(h=this.ct===1/0&&On.w_&&On.A_<3&&n<=this.MP),t.prototype.y7.call(this,n,i,r,e,s,u,o,h)},i.hr=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.prototype.hr.call(n)];case 1:return i.sent(),this.NPt=void 0,this.TL.DPt=0,[2]}})}).call(this)},i.kn=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.prototype.kn.call(n)];case 1:return i.sent(),[4,this.TL.zg()];case 2:return i.sent(),[4,this.xq.Pq(this.TL)];case 3:return i.sent(),[2]}})}).call(this)},n.LS=function(t){var n;return(!t||"google-dai"!==(null==t||null==(n=t.ssai)?void 0:n.integration))&&(On.w_&&On.A_<4)},n}(EW);F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Wt(),Dt(),H(),Qt(),F(),Et(),Bt(),Dt(),F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et(),Bt(),Dt();var FW=function(t){function n(n){return t.call(this,n)||this}return Ct(n,t),Nt(n,[{key:"Nrt",get:function(){return this.TL}},{key:"Rx",get:function(){return this.TL.Rx}},{key:"Bx",get:function(){return this.TL.Bx}}]),n}(bO);F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Wt(),Dt(),Ut(),Qt();var VW=function(t){function n(n){var i;return(i=t.call(this,n)||this).b3=void 0,i.LPt=void 0,i.jY=0,i.OPt=TA.iL(),i.YS=void 0,i.FPt=TA.iL(),i.WPt=[],i.ZPt=!1,i.zY=0,i.YS=n.Cd,i}Ct(n,t);var i=n.prototype;return i.brt=function(){return this.LPt?this.jY:t.prototype.brt.call(this)},i.Srt=function(n){this.LPt?this.jY=n:t.prototype.Srt.call(this,n)},i.RP=function(){return this.LPt?this.OPt:t.prototype.RP.call(this)},i.CS=function(){return this.LPt?this.YS:t.prototype.CS.call(this)},i.krt=function(){return this.LPt?this.FPt:t.prototype.krt.call(this)},i.Ert=function(){return this.LPt?this.zY:t.prototype.Ert.call(this)},i.Prt=function(n){this.LPt?this.zY=n:t.prototype.Prt.call(this,n)},i.H2=function(t,n,i){var r=this;return this.W2(function(i){return r.UPt(t,n,i)},i)},i.UPt=function(n,i,r){return t.prototype.H2.call(this,n,i,r)},i.V3=function(){var t=this;return this.W2(function(){return t.VPt()})},i.VPt=function(){return t.prototype.V3.call(this)},i.z2=function(t,n,i){var r=this;return this.W2(function(i){return r.HPt(t,n,i)},i)},i.HPt=function(n,i,r){return t.prototype.z2.call(this,n,i,r)},i.F3=function(t,n){this.LPt?(this.FPt=this.FPt.OM(new TA([t,n])),this.WPt.push({Km:"Yut",EO:t,PO:n})):this.qPt(t,n)},i.qPt=function(n,i){t.prototype.F3.call(this,n,i)},i.r3=function(t,n){var i=this;return this.W2(function(){return i.zPt(t,n)})},i.zPt=function(n,i){return t.prototype.r3.call(this,n,i)},i.U3=function(t,n){this.LPt?(this.FPt=this.FPt.UM(new TA([t,n])),this.WPt.push({Km:"_S",EO:t,PO:n})):this.GPt(t,n)},i.GPt=function(n,i){t.prototype.U3.call(this,n,i)},i._S=function(t,n,i){var r=this;return this.W2(function(i){return r.XPt(t,n,i)},i)},i.XPt=function(n,i,r){return t.prototype._S.call(this,n,i,r)},i.EZ=function(t){var n=this;return this.W2(function(){return n.jPt(t)})},i.jPt=function(n){return t.prototype.EZ.call(this,n)},i.W2=function(t,n){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:this.v3(),i.label=1;case 1:return this.LPt?[4,gr(this.LPt.Qy,n)]:[3,3];case 2:return i.sent(),this.v3(),[3,1];case 3:dr(n),i.label=4;case 4:return i.trys.push([4,,6,7]),this.b3=t(n),[4,this.b3];case 5:return i.sent(),[3,7];case 6:return this.b3=void 0,[7];case 7:return[2]}})}).call(this)},i.v3=function(){if(this.b3)throw new y("Internal error")},i.QPt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:if(this.LPt)throw new p("Already locked");return this.LPt=new Vc,this.KPt(),this.b3?[4,this.b3.catch(di)]:[3,2];case 1:t.sent(),this.KPt(),t.label=2;case 2:return[2]}})}).call(this)},i.YPt=function(){var t=this.LPt;void 0!==t&&(t.Xy(),this.LPt=void 0,this.JPt())},i.KPt=function(){this.YS=t.prototype.CS.call(this),this.jY=t.prototype.brt.call(this),this.zY=t.prototype.Ert.call(this),this.OPt=t.prototype.RP.call(this),this.FPt=t.prototype.krt.call(this),this.ZPt=!1},i.JPt=function(){this.v3(),t.prototype.Srt.call(this,this.jY),t.prototype.Prt.call(this,this.zY);var n=this.WPt.slice();Yi(this.WPt);for(var i,r=Lt(n);!(i=r()).done;){var e=i.value;"Yut"===e.Km?this.qPt(e.EO,e.PO):this.GPt(e.EO,e.PO)}this.OPt.GM(t.prototype.RP.call(this))||this.So(new rh(LR.lZ))},i.zg=function(){var n;null==(n=this.LPt)||n.Zg(),this.LPt=void 0,t.prototype.zg.call(this)},n}(_O),HW=function(t){function n(n,i){var r;return(r=t.call(this,i)||this).pE=void 0,r.$Pt=void 0,r.pE=n,r}Ct(n,t);var i=n.prototype;return i.RP=function(){var n,i;return t.prototype.RP.call(this).OM(null!=(i=null==(n=this.$Pt)?void 0:n.IP)?i:TA.iL())},i.krt=function(){var n,i;return t.prototype.krt.call(this).OM(null!=(i=null==(n=this.$Pt)?void 0:n.M3)?i:TA.iL())},i.Srt=function(n){t.prototype.Srt.call(this,n),this.$Pt&&(this.$Pt.UY=n)},i.Prt=function(n){t.prototype.Prt.call(this,n),this.$Pt&&(this.$Pt.MY=n)},i.qPt=function(n,i){t.prototype.qPt.call(this,n,i),this.$Pt&&this.$Pt.F3(n,i)},i.GPt=function(n,i){t.prototype.GPt.call(this,n,i),this.$Pt&&this.$Pt.U3(n,i)},i.XPt=function(n,i,r){var e=this;return Vt(function(){var s;return zt(this,function(u){switch(u.label){case 0:return dr(r),(s=[]).push(t.prototype.XPt.call(e,n,i,r)),this.$Pt&&s.push(this.$Pt._S(n,i,r)),[4,ut.all(s)];case 1:return u.sent(),[2]}})}).call(this)},i.TZ=function(n){return!!t.prototype.TZ.call(this,n)||this.pE.txt(n)},i.jPt=function(n){return t.prototype.TZ.call(this,n)?t.prototype.jPt.call(this,n):this.pE.ixt(n)},i.sxt=function(t){var n,i;null==(n=this.$Pt)||n.mn(UR,this.xrt),this.$Pt=t,null==(i=this.$Pt)||i.wn(UR,this.xrt)},n}(VW),WW=function(t){function n(n,i){var r;return(r=t.call(this,i)||this).pE=void 0,r.nxt=void 0,r.WA=NaN,r.cxt=!1,r.dxt=!1,r.lxt=void 0,r.grt(i),r.pE=n,r}Ct(n,t);var i=n.prototype;return i.TZ=function(n){return!!wN(this,n)&&(!!t.prototype.TZ.call(this,n)||(!(!this.nxt||!this.nxt.TZ(n))||this.pE.rxt(n)))},i.EZ=function(n){var i=this;return Vt(function(){return zt(this,function(r){switch(r.label){case 0:return t.prototype.TZ.call(i,n)?[4,t.prototype.EZ.call(i,n)]:[3,2];case 1:case 3:case 6:return[2,r.sent()];case 2:return this.nxt&&this.nxt.TZ(n)?(this.hxt(),[4,this.EZ(n)]):[3,4];case 4:return[4,this.pE.oxt(n)];case 5:return r.sent(),[4,this.EZ(n)];case 7:return[2]}})}).call(this)},i.txt=function(t){return this.TZ(this.axt(t))},i.ixt=function(t){return this.EZ(this.axt(t))},i.axt=function(t){var n=this.Cd,i=n.L4.map(function(n){return Fv(t.qT)&&Fv(n.qT)||Vv(t.qT)&&Vv(n.qT)?t:n});return Yu({},n,{L4:i})},i.M4=function(n,i,r,e){t.prototype.M4.call(this,n,i,r,e),this.nxt&&this.nxt.M4(n,i,r,e)},i.uxt=function(){return!this.cxt&&this.dxt},i.Nd=function(){return void 0!==this.lxt?this.lxt:this.uxt()?this.WA:t.prototype.Nd.call(this)},i.C4=function(n){this.WA=n,this.lxt=void 0,this.uxt()||t.prototype.C4.call(this,n)},i._rt=function(){return!this.uxt()&&t.prototype._rt.call(this)},i.C3=function(){this.lxt=b.max(zW(this.iq.Q3),zW(this.iq.K3)),this.uxt()||t.prototype.C3.call(this)},i.A3=function(){this.lxt=void 0,this.uxt()||t.prototype.A3.call(this)},i.mrt=function(t){return new HW(this,t)},i.fxt=function(){this.cxt=!this.cxt},i.hxt=function(){var t=this.iq,n=this.nxt;n&&(this.cxt=!this.cxt,this.grt(n),this.vxt(t),this.uxt()&&this._xt())},i.vxt=function(t){var n,i;this.nxt=t,null==(n=this.P4)||n.sxt(null==t?void 0:t.Q3),null==(i=this.x4)||i.sxt(null==t?void 0:t.K3)},i.gxt=function(t){var n=this.iq,i=this.nxt;if(i){var r=this.cxt,e=r?n:i,s=(r?i:n).IP.JM(t);if(s){var u=UO(e.IP,this.krt()).JM(s.An(0),ve);if(u&&!(s.An(0)+ve>=u.An(0)))return b.max(s.An(0),u.Tn(0))}}},i.pxt=function(t,n){var i=this;if(this.dxt)return ut.resolve();var r=this.cxt?this.nxt:this.iq;return r?(this.dxt=!0,this.mxt(function(n){if(dr(n),i.dxt)return function(t,n,i){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return dr(i),r=[],t.Q3&&r.push(sD(t.Q3,n,i)),t.K3&&r.push(sD(t.K3,n,i)),[4,ut.all(r)];case 1:return e.sent(),t.C3(),[2]}})})()}(r,t,n)},n)):ut.resolve()},i._xt=function(){if(this.dxt){var t=this.cxt?this.nxt:this.iq;if(t){var n;0,this.dxt=!1;var i=null!=(n=this.lxt)?n:this.WA;t.ct0?n.An(n.V-1):0}function XW(t){return t.Cd.Km===Sy.wV}F(),Et();var qW=function(t){function n(n,i,r){var e;return(e=t.call(this,n)||this).Axt=void 0,e.Gl=void 0,e.JU=void 0,e.bxt=!1,e.q8=void 0,e.A7=NaN,e.Ho=TA.iL(),e.kz=!0,e.Bxt=!1,e.yz=!0,e.Ext=void 0,e.xxt=void 0,e.Txt=void 0,e.Sxt=new hr,e.m7=new hr,e.Axt=i,e.Ext=n,e.TL.be(),e.Axt.we(),e.JU=new NW(e,r),e.Gl=new Eb([e.JU.nt,t.prototype.Ix.call(RW(e))]),e}Ct(n,t);var i=n.prototype;return i.RP=function(){return t.prototype.RP.call(this).OM(this.Axt.IP)},i.Nd=function(){if(!this.bxt){var n=this.iq;if(n&&XW(n))return n.ct}return t.prototype.Nd.call(this)},i.Lrt=function(){return!!t.prototype.Lrt.call(this)&&!(!this.bxt&&!this.WZ())},i.Ort=function(){return!!t.prototype.Ort.call(this)&&!(!this.bxt&&t.prototype.Lrt.call(this)&&!this.WZ())},i.WZ=function(){var t=this.iq;return!(!t||!XW(t))&&t.WZ},i.gx=function(){return this.Ho.OM(this.TL._x)},i.Tx=function(){return t.prototype.Tx.call(this).OM(this.Axt.Sx)},i.bx=function(){return t.prototype.bx.call(this)},i.Mrt=function(){var n;return null!=(n=t.prototype.Mrt.call(this))?n:this.Axt.nq},i.Gx=function(){return this.kz=!1,t.prototype.Gx.call(this)},i.zx=function(){this.kz=!0,t.prototype.zx.call(this)},i.x9=function(){this.bxt=!0,t.prototype.x9.call(this),this.Axt.x9()},i.I9=function(){this.bxt=!1,t.prototype.I9.call(this),this.Axt.x9()},i.LP=function(){var n;return null!=(n=this.q8)?n:t.prototype.LP.call(this)},i.Ex=function(){return void 0!==this.q8||t.prototype.Ex.call(this)},i.My=function(t,n,i){void 0===n&&(n=!1),void 0===i&&(i=!1),this.Sxt.Zg(),this.m7.Zg(),this.m7=new hr,this.Txt=_r(this.y7(t,n,i,this.Txt,this.m7.Yg),this.m7).catch(di)},i.y7=function(n,i,r,e,s){var u=this;return Vt(function(){return zt(this,function(o){switch(o.label){case 0:return this.q8=n,this.A7=n,this.So(new dT(n)),e?[4,e.catch(di)]:[3,2];case 1:o.sent(),o.label=2;case 2:return dr(s),this.iq&&XW(this.iq)&&this.iq._xt(),this.q8=void 0,t.prototype.My.call(u,n,i,r),this.Axt.My(n,i,r),this.kxt(),[2]}})}).call(this)},i.KW=function(t){var n=this.nq;if(n&&!S(n.getTime())){var i=(t.getTime()-n.getTime())/1e3;this.My(i)}},i.D9=function(){t.prototype.D9.call(this),this.Axt.D9()},i.we=function(){this.yz&&(this.yz=!1,this.Ext.we())},i.be=function(){this.yz||(this.yz=!0,this.Ext.be())},i.Pxt=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return this.q8=void 0,this.A7=NaN,this.Ho=TA.iL(),null==(t=this.xxt)||t.Zg(),this.Sxt.Zg(),this.m7.Zg(),this.Txt?[4,this.Txt.catch(di)]:[3,2];case 1:n.sent(),this.Txt=void 0,n.label=2;case 2:return[2]}})}).call(this)},i.Wrt=function(n){t.prototype.Wrt.call(this,n),this.Axt.Eq=n},i.qrt=function(n){t.prototype.qrt.call(this,n),this.Axt.N9=n},i.Ix=function(){return this.Gl},i.tI=function(t,n,i,r,e,s,u,o){return this.JU.tI(t,n,i,r,e,s,u,o)},i.wq=function(t){return this.JU.wq(t)},i.gq=function(t,n,i,r,e){throw new y("Not implemented yet")},i.vq=function(){return!1},i.iV=function(t){this.JU.iV(t)},i.Aq=function(){this.JU.hr(),t.prototype.Aq.call(this)},i.Un=function(n){var i=this;return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Un.call(i,n)];case 1:return XW(r=e.sent())&&this.kxt(),[2,r]}})}).call(this)},i.hr=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.Pxt()];case 1:return i.sent(),[4,t.prototype.hr.call(n)];case 2:return i.sent(),[4,this.Axt.hr()];case 3:return i.sent(),[2]}})}).call(this)},i.C8=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.Pxt()];case 1:return i.sent(),[4,t.prototype.C8.call(n)];case 2:return i.sent(),[4,this.Axt.C8()];case 3:return i.sent(),[2]}})}).call(this)},i.zg=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.Pxt()];case 1:return i.sent(),this.JU.kn(),this.Gl.kn(),[4,t.prototype.zg.call(n)];case 2:return i.sent(),[2]}})}).call(this)},i.Xrt=function(t){return new WW(this,t)},i.Grt=function(t){return new pO(t)},i.kxt=function(){this.Sxt.Zg(),this.Sxt=new hr,this.Txt=_r(this.Ixt(this.Txt,this.Sxt.Yg),this.Sxt).catch(di)},i.Ixt=function(t,n){return Vt(function(){var i,r,e,s;return zt(this,function(u){switch(u.label){case 0:return t?[4,t.catch(di)]:[3,2];case 1:u.sent(),u.label=2;case 2:if(!this.iq||!XW(this.iq))return[2];u.label=3;case 3:0,dr(n),this.Rxt()&&this.fxt(),i=void 0,this.iq._xt(),dr(n),u.label=4;case 4:0,r={stack:[],error:void 0,hasError:!1},u.label=5;case 5:return u.trys.push([5,9,10,11]),dr(n),this.Rxt()?[3,12]:void 0===(i=this.iq.gxt(this.LP()))?[3,7]:(this.Cxt(),[4,this.iq.pxt(i,n)]);case 6:return u.sent(),dr(n),this.Axt.My(i),[3,12];case 7:return e=qt(r,hr.ep([n]),!1),[4,ut.race([this.ww(eh._y,e.Yg),this.Dxt(e.Yg)])];case 8:return u.sent(),[3,11];case 9:return s=u.sent(),r.error=s,r.hasError=!0,[3,11];case 10:return Gt(r),[7];case 11:return[3,4];case 12:dr(n),u.label=13;case 13:return this.Rxt()?[3,15]:[4,this.TL.ww([eh._y,eh.Bw,Ey.wI],n)];case 14:return u.sent(),[3,13];case 15:return[3,3];case 16:return[2]}})}).call(this)},i.Rxt=function(){var t=this.iq;if(void 0===t||!XW(t))return!1;var n=this.LP(),i=this.TL.IP;return!(!this.TL.UP&&i.Cr(n))&&!!UO(this.Axt.IP,t.krt()).qM(n,n+ve)},i.fxt=function(){if(!this.Bxt){0,this.Bxt=!0,this.Ho=this.gx();var t=yD(this),n=this.Ex(),i=this.bx(),r=this.TL,e=this.Axt,s=this.iq;s._xt(),s.fxt(),pD(e,t),this.Qrt(e),this.Axt=r,r.zx(),r.$P=!0,this.Bxt=!1;var u=this.Ex();n!==u&&(u?this.So(new dT(this.MP)):this.So(new lT(this.MP)));var o=this.bx();i!==o&&this.So(new Ry(this.MP,o)),u||this.Cxt()}},i.Cxt=function(){var t=this.TL,n=this.Ext;if(n!==t){0;var i=this.Bx,r=this.Rx;this.Ext=t,this.yz&&(n.we(),t.be());var e=this.Bx,s=this.Rx;e>0&&s>0&&(i!==e||r!==s)&&this.So(new Ty)}},i.rxt=function(t){return void 0!==this.Axt.QZ([t])},i.oxt=function(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:return this.Cxt(),n=this.iq,[4,(i=this.Axt).hr()];case 1:return e.sent(),[4,i.Un(t)];case 2:return r=e.sent(),n.wxt(r),[2]}})}).call(this)},i.Dxt=function(t){return this.xxt=new Vc,gr(this.xxt.Qy,t)},i.P3=function(){var t;null==(t=this.xxt)||t.Xy()},i.Zx=function(n){n.type===eh.$w&&this.A7===n.currentTime||(n.type===eh.Zw&&(this.A7=NaN,this.Cxt()),n.type!==Ey.wI&&n.type!==eh.jw&&n.type!==eh.Bw||this.Bxt||!this.Rxt()?(n.type!==eh.Bw||this.UP)&&t.prototype.Zx.call(this,n):this.kxt())},Nt(n,[{key:"yxt",get:function(){return this.Axt}},{key:"Rx",get:function(){return this.Ext.Rx}},{key:"Bx",get:function(){return this.Ext.Bx}}]),n}(FW),GW=function(t){function n(n,i){var r;return(r=t.call(this,n,i,new qP)||this).eet=void 0,r.net=void 0,r.KL=void 0,r.KL=new BT(n.mq),r.eet=new IN,r.eet.B9(n.$W.parentElement),r.net=new WB(r.eet.xe,r.Wu,r.nt,r.Ql,r.Ma,r.mq),r}Ct(n,t);var i=n.prototype;return i.we=function(){t.prototype.we.call(this),this.eet.we()},i.be=function(){t.prototype.be.call(this),this.eet.be()},i.B9=function(t){this.TL.B9(t),this.Axt.B9(t)},i.Yx=function(){this.TL.Yx(),this.Axt.Yx()},i.Wx=function(){return this.TL.Wx()},i.Aa=function(){return this.KL},i.Qrt=function(n){var i=this.Hx(),r=this.Wx();t.prototype.Qrt.call(this,n),this.KL.BI=n.mq,this.Hx()!==i&&this.So(new RT),this.Wx()!==r&&this.So(new CT)},i.zg=function(){return this.KL.kn(),this.net.kn(),this.eet.kn(),t.prototype.zg.call(this)},Nt(n,[{key:"Nrt",get:function(){return this.TL}},{key:"yxt",get:function(){return this.Axt}},{key:"$W",get:function(){return this.TL.$W}},{key:"n5",get:function(){return this.TL.n5}},{key:"Vx",get:function(){return this.TL.Vx},set:function(t){this.TL.Vx=t}}]),n}(qW),jW=function(t){function n(){return t.apply(this,arguments)||this}Ct(n,t);var i=n.prototype;return i.Gq=function(n){if(n===ig.Bk){var i=t.prototype.Gq.call(this,n),r=t.prototype.Gq.call(this,n);return new GW(i,r)}return t.prototype.Gq.call(this,n)},i.Pq=function(n){var i=this,r=function(){return t.prototype.Pq};return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return V(n,GW)?[4,n.zg()]:[3,4];case 1:return t.sent(),[4,r().call(i,n.Nrt)];case 2:return t.sent(),[4,r().call(i,n.yxt)];case 3:return t.sent(),[3,6];case 4:return[4,r().call(i,n)];case 5:t.sent(),t.label=6;case 6:return[2]}})})()},n}(vO),QW=function(t){function n(n,i,r,e,s,u,o){var h,c=new IO(new jW(s)),a=c.Gq(u);return(h=t.call(this,n,i,r,e,a,o)||this).xq=void 0,h.xq=c,h}return Ct(n,t),n.prototype.kn=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.prototype.kn.call(n)];case 1:return i.sent(),[4,this.xq.Pq(this.TL)];case 2:return i.sent(),[2]}})}).call(this)},n.LS=function(t){var n;return!On.Ks&&!On.og&&!(t&&"google-dai"===(null==(n=t.ssai)?void 0:n.integration))},n}(EW);F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Wt(),Dt(),Qt();var YW=function(t){function n(n){var i;return(i=t.call(this,n)||this).Nxt=!1,i.OPt=TA.iL(),i.YS=void 0,i.WA=0,i.Mxt=!1,i.ket=!1,i.ZPt=void 0,i.N4=TA.iL(),i.Lxt=void 0,i.grt(n),i.YS=n.Cd,i}Ct(n,t);var i=n.prototype;return i.mrt=function(t){return new VW(t)},i.CS=function(){return this.Nxt?this.YS:t.prototype.CS.call(this)},i.RP=function(){return this.Nxt?this.OPt:t.prototype.RP.call(this)},i.Nd=function(){return this.Nxt?this.WA:t.prototype.Nd.call(this)},i.C4=function(n){this.Nxt?(this.WA=n,this.Mxt=!0):t.prototype.C4.call(this,n)},i.Tx=function(){return this.Nxt?this.Lxt?this.Lxt.z3():this.N4:t.prototype.Tx.call(this)},i.M4=function(n,i,r,e){this.Nxt?this.Lxt=new rD(n,i,r,e):t.prototype.M4.call(this,n,i,r,e)},i._rt=function(){return this.Nxt?this.ket&&!1!==this.ZPt:t.prototype._rt.call(this)},i.C3=function(){this.Nxt?this.ZPt=!0:t.prototype.C3.call(this)},i.A3=function(){this.Nxt?this.ZPt=!1:t.prototype.A3.call(this)},i.TZ=function(n){return!this.Nxt&&t.prototype.TZ.call(this,n)},i.EZ=function(n){return this.Nxt?ut.reject(new p("Not supported")):t.prototype.EZ.call(this,n)},i.QPt=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:if(this.Nxt)throw new p("Already locked");return this.Nxt=!0,this.KPt(),t=[],this.P4&&t.push(this.P4.QPt()),this.x4&&t.push(this.x4.QPt()),[4,ut.all(t)];case 1:return n.sent(),[2]}})}).call(this)},i.YPt=function(){this.Nxt=!1,this.P4&&this.P4.YPt(),this.x4&&this.x4.YPt(),this.JPt()},i.KPt=function(){this.YS=t.prototype.CS.call(this),this.OPt=t.prototype.RP.call(this),this.WA=t.prototype.Nd.call(this),this.N4=t.prototype.Tx.call(this),this.Mxt=!1,this.ZPt=void 0,this.Lxt=void 0},i.JPt=function(){if(this.Mxt&&(t.prototype.C4.call(this,this.WA),this.Mxt=!1),void 0!==this.Lxt){var n=this.Lxt;t.prototype.M4.call(this,n.Tn,n.An,n.G3,n.X3),this.Lxt=void 0}void 0!==this.ZPt&&(this.ZPt?t.prototype.C3.call(this):t.prototype.A3.call(this),this.ZPt=void 0)},n}(wO),KW=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Fxt=!1,n.Vxt=!1,n.Gxt=void 0,n.zxt=void 0,n.qxt=new hr,n}Ct(n,t);var i=n.prototype;return i.Gx=function(){return void 0!==this.iq&&XW(this.iq)&&this.UP&&this.My(0),t.prototype.Gx.call(this)},i.My=function(n,i,r){void 0!==this.iq&&XW(this.iq)&&this.UP&&n0){n=c.tracks[0],i=c;break}}if(Un(n))break}return(qn(null==i?void 0:i.initPattern)||qn(null==n?void 0:n.initPattern))&&!qn(null==n?void 0:n.initializationPattern)&&!qn(null==i?void 0:i.initializationPattern)}(e=r)&&(e=function(t){return Yu({},t,{availabilityDuration:{value:t.dvrDuration?t.dvrDuration.duration/t.dvrDuration.timescale:0},manifestVersion:"1.0.0",presentations:t.presentations.map(rz),contentBaseUrl:t.contentBaseUrl||"./"})}(e)),[2,e]}})}).call(this)},t}();F(),Et(),Bt(),Dt();var pz=function(t){function n(n){var i;return(i=t.call(this)||this).hu=void 0,i.Kxt=void 0,i.Kxt=n,i}Ct(n,t);var i=n.prototype;return i.oR=function(){return this.Kxt.oR()},i.wn=function(t,n){this.Kxt.wn(t,n)},i.mn=function(t,n){this.Kxt.mn(t,n)},Nt(n,[{key:"Ca",get:function(){return this.hu||(this.hu=tA(this)),this.hu}},{key:"eR",get:function(){return this.Kxt.eR}},{key:"sR",get:function(){return this.Kxt.sR}},{key:"nR",get:function(){return this.Kxt.nR}},{key:"rR",get:function(){return this.Kxt.rR}},{key:"hR",get:function(){return this.Kxt.hR}}]),n}(th);F(),Et(),Bt(),Ut(),F(),Et(),Bt(),F(),Et(),Bt();var kz=function(){function t(t){this.Yxt=void 0,this.Zxt=0,this.Jxt=0,this.Yxt=b.exp(b.log(.5)/t)}var n=t.prototype;return n.Pat=function(t,n){var i=b.pow(this.Yxt,t),r=n*(1-i)+i*this.Zxt;S(r)||(this.Zxt=r,this.Jxt+=t)},n.EZ=function(t){var n=b.exp(b.log(.5)/t);if(n!==this.Yxt)if(0!==this.Jxt){var i=this.yet,r=1-b.pow(n,this.Jxt);this.Zxt=i*r,this.Yxt=n}else this.Yxt=n},Nt(t,[{key:"yet",get:function(){var t=1-b.pow(this.Yxt,this.Jxt);return this.Zxt/t}}]),t}(),bz=function(){function t(n,i,r,e){void 0===n&&(n=t.cIt),void 0===i&&(i=t.dIt),void 0===r&&(r=t.Mat),void 0===e&&(e=!1),this.$xt=void 0,this.tIt=void 0,this.rIt=0,this.hIt=[],this.sIt=void 0,this.nIt=6e4,this.oIt=10,this.aIt=void 0,this.uIt=void 0,this.iIt=void 0,this.eIt=void 0,this.aIt=n,this.uIt=i,this.iIt=r,this.eIt=e,this.$xt=new kz(n),this.tIt=new kz(i)}var n=t.prototype;return n.Pat=function(t){var n=Vn.Mg(),i=t;this.eIt&&void 0!==this.sIt&&n-this.sIt>=this.nIt&&this.hr(),this.rIt+=1,this.$xt.Pat(1,i),this.tIt.Pat(1,i),this.hIt.push(i),this.hIt.length>this.oIt&&this.hIt.shift(),this.sIt=n},n.Nat=function(){return void 0!==this.sIt&&Vn.Mg()-this.sIt<=this.nIt},n.hr=function(){this.$xt=new kz(this.aIt),this.tIt=new kz(this.uIt),this.rIt=0,this.hIt=[],this.sIt=void 0},Nt(t,[{key:"yet",get:function(){return this.Nat()?b.max(this.$xt.yet,this.tIt.yet):this.iIt}}]),t}();bz.cIt=2,bz.dIt=5,bz.Mat=.1,F(),Et(),Ut();var Az=function(){function t(t){this.lIt=void 0,this.lIt=t}var n=t.prototype;return n.PY=function(t){for(var n,i=Lt(this.lIt);!(n=i()).done;){n.value.PY(t)}},n.xY=function(t){for(var n,i=Lt(this.lIt);!(n=i()).done;){n.value.xY(t)}},n.IY=function(t,n){for(var i,r=Lt(this.lIt);!(i=r()).done;){i.value.IY(t,n)}},n.RY=function(t){for(var n,i=Lt(this.lIt);!(n=i()).done;){n.value.RY(t)}},t}();F(),Et();var Tz=function(){function t(t){this.vIt=void 0,this.fIt=0,this.vIt=t}var n=t.prototype;return n.PY=function(t){this.fIt=t},n.xY=function(t){this.vIt.Pat(t-this.fIt)},n.IY=function(t){},n.RY=function(t){},t}();F(),Et();var Sz=function(){function t(t){this.Fat=void 0,this._It=0,this.Fat=t}var n=t.prototype;return n.xY=function(t){this._It=t},n.IY=function(t,n){this.Fat.Pat(t-this._It,n.byteLength),this._It=t},n.RY=function(t){},n.PY=function(t){},t}();F(),Et(),Dt();var Ez=function(){function t(t,n){void 0===n&&(n=0),this.Fat=void 0,this.wIt=void 0,this.pIt=new Iz,this.En=0,this.gIt=0,this.Fat=t,this.wIt=n}var n=t.prototype;return n.PY=function(t){},n.IY=function(t,n){var i=n.byteLength,r=this.gIt;this.gIt=i;var e=t-this.En;this.En=t,this.pIt.A$(n);var s=!this.pIt.mIt(),u=i>=this.wIt;r!==Vn.Zs.Sp&&s&&u&&this.Fat.Pat(e,i)},n.xY=function(t){this.En=t},n.RY=function(t){},t}(),Iz=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).AIt=void 0,n.yIt=!1,n}Ct(n,t);var i=n.prototype;return i.mIt=function(){return this.yIt},i.A$=function(n){this.yIt=!1,t.prototype.A$.call(this,n)},i.w$=function(n,i){this.AIt&&this.AIt!==um.OC||(this.yIt=!0),t.prototype.w$.call(this,n,i),this.AIt=n},i.C$=function(t){return!1},i.B$=function(t){},i.M$=function(t){},n}($R);F(),Et(),Dt();var Rz=function(t){return t.bIt="sample",t}({}),Cz=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).SIt=0,n}return Ct(n,t),n.prototype.cW=function(){if(this.Nat()){var t=Vn.Mg();t-this.SIt>1e3&&(this.SIt=t,pb.Ng.cW(this.yet))}},n}(th);F(),Et(),Bt(),Dt();var Dz=function(t){function n(n){var i;return(i=t.call(this)||this).TIt=void 0,i.wb=[],i.Zxt=void 0,i.EIt=0,i.TIt=n,i.Zxt=n,i}Ct(n,t);var i=n.prototype;return i.Nat=function(){return this.wb.length>=3},i.Pat=function(t,n){if(0!==t){var i={kW:8*n/t,kIt:n};if(this.wb.push(i),this.EIt+=i.kIt,this.wb.length>30){var r=this.wb.shift();this.EIt-=r.kIt}for(var e=this.wb.slice().sort(function(t,n){return t.kW-n.kW}),s=0,u=0;u=.5)break}this.cW(),this.So(new rh(Rz.bIt))}},Nt(n,[{key:"yet",get:function(){return this.Nat()?this.Zxt:this.TIt}}]),n}(Cz);F(),Et(),Bt(),Dt();var Pz=function(t){function n(i,r,e,s){var u;return void 0===i&&(i=n.cIt),void 0===r&&(r=n.dIt),void 0===e&&(e=n.IIt),void 0===s&&(s=n.Mat),(u=t.call(this)||this).$xt=void 0,u.tIt=void 0,u.PIt=0,u.iIt=void 0,u.xIt=void 0,u.xIt=e,u.$xt=new kz(i),u.tIt=new kz(r),u.iIt=s,u}Ct(n,t);var i=n.prototype;return i.Pat=function(t,n){var i=8*n/t;this.$xt.Pat(t,i),this.tIt.Pat(t,i),this.PIt+=n,this.cW(),this.So(new rh(Rz.bIt))},i.Nat=function(){return this.PIt>=this.xIt},Nt(n,[{key:"yet",get:function(){return this.Nat()?b.min(this.$xt.yet,this.tIt.yet):this.iIt}}]),n}(Cz);Pz.IIt=128e3,Pz.Mat=yb,Pz.cIt=.5,Pz.dIt=5;var Nz=function(){function t(t,n){var i=this;this.Fat=void 0,this.BIt=[],this.LIt=void 0,this.MIt=void 0,this.CIt=function(){for(var t,n=Lt(i.BIt);!(t=n()).done;){(0,t.value)()}},this.MIt=t>0?t:Pz.Mat,this.LIt=new bz(bz.cIt,bz.dIt,n>0?n:bz.Mat),this.RIt(this.MIt)}var n=t.prototype;return n.RIt=function(t){var n;null==(n=this.Fat)||n.mn(Rz.bIt,this.CIt),this.Fat=new Dz(t),this.Fat.wn(Rz.bIt,this.CIt)},n.DIt=function(t){this.BIt.push(t)},n.NIt=function(t){Xi(this.BIt,t)},n.PW=function(t){if("segment"===t.Km&&"video"===t.qk){var n=[new Tz(this.LIt)];return this.Fat&&("stream"===t.dk&&"initialization-segment"!==t.Wk?n.push(new Ez(this.Fat,1e3)):n.push(new Sz(this.Fat))),new Az(n)}},Nt(t,[{key:"kW",get:function(){var t,n;return null!=(n=null==(t=this.Fat)?void 0:t.yet)?n:this.MIt}},{key:"EW",get:function(){return this.LIt.yet}}]),t}();F(),Et(),Bt();var Bz=function(){function t(){this.FIt=void 0,this.VIt=void 0,this.zIt=void 0,this.WIt=void 0}var n=t.prototype;return n.OIt=function(t,n){var i=n-t;(!this.FIt||i=.4?[4,this.hRt(i)]:[3,5];case 5:return[2]}})}).call(this)},i.z2=function(t,n){return Vt(function(){var i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(this.$It)throw new y("Concurrent appends are not supported.");o.label=1;case 1:o.trys.push([1,,8,9]),i={stack:[],error:void 0,hasError:!1},o.label=2;case 2:return o.trys.push([2,5,6,7]),r=qt(i,hr.ep([n,this.T3.Yg]),!1),e=r.Yg,this.tRt=new Vc,[4,this.hRt(e)];case 3:return o.sent(),[4,this.Trt.z2(t,{},e)];case 4:return o.sent(),this.Trt.B3===ig.Bk&&this.rRt.Jrt(t.ck),[3,7];case 5:return s=o.sent(),i.error=s,i.hasError=!0,[3,7];case 6:return Gt(i),[7];case 7:return[3,9];case 8:return u=this.tRt,this.tRt=void 0,null==u||u.Xy(),[7];case 9:return[2]}})}).call(this)},i._S=function(t,n,i){return Vt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(this.$It)throw new y("Concurrent appends are not supported.");h.label=1;case 1:h.trys.push([1,,8,9]),r={stack:[],error:void 0,hasError:!1},h.label=2;case 2:return h.trys.push([2,5,6,7]),e=qt(r,hr.ep([i,this.T3.Yg]),!1),s=e.Yg,this.tRt=new Vc,[4,this.hRt(s)];case 3:return h.sent(),[4,this.Trt._S(t,n,s)];case 4:return h.sent(),this.ZIt.KIt(TA.tL(t,n)),[3,7];case 5:return u=h.sent(),r.error=u,r.hasError=!0,[3,7];case 6:return Gt(r),[7];case 7:return[3,9];case 8:return o=this.tRt,this.tRt=void 0,null==o||o.Xy(),[7];case 9:return[2]}})}).call(this)},i.AQ=function(t){return Vt(function(){var n,i,r,e,s;return zt(this,function(u){switch(u.label){case 0:if(this.$It)throw new y("Concurrent appends are not supported.");u.label=1;case 1:u.trys.push([1,,7,8]),n={stack:[],error:void 0,hasError:!1},u.label=2;case 2:return u.trys.push([2,4,5,6]),i=qt(n,hr.ep([t,this.T3.Yg]),!1),r=i.Yg,this.tRt=new Vc,[4,this.hRt(r)];case 3:return u.sent(),[3,6];case 4:return e=u.sent(),n.error=e,n.hasError=!0,[3,6];case 5:return Gt(n),[7];case 6:return[3,8];case 7:return s=this.tRt,this.tRt=void 0,null==s||s.Xy(),[7];case 8:return[2]}})}).call(this)},i.hRt=function(t){return Vt(function(){var n,i,r,e,s;return zt(this,function(u){switch(u.label){case 0:n=Lt(this.JIt),u.label=1;case 1:return(i=n()).done?[3,4]:(r=i.value,e=r[0],s=r[1],[4,this.Trt.H2(e,s,t)]);case 2:u.sent(),u.label=3;case 3:return[3,1];case 4:return Yi(this.JIt),[2]}})}).call(this)},i.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:this.T3.zg(),t.label=1;case 1:return this.$It?[4,this.iRt]:[3,3];case 2:return t.sent(),[3,1];case 3:return[2]}})}).call(this)},Nt(n,[{key:"IP",get:function(){for(var t,n=TA.iL(),i=Lt(this.JIt);!(t=i()).done;){var r=t.value[1],e=r.xet+r.bU,s=e+r.ct;n=n.OM(TA.tL(e,s))}return this.Trt.IP.OM(n)}},{key:"$It",get:function(){return void 0!==this.tRt}},{key:"iRt",get:function(){return this.tRt?this.tRt.Qy:ut.resolve()}}]),n}(th);F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et(),Wt(),Qt();var Xz=function(){function t(t){this.aRt=0,this.uRt=void 0,this.uRt=t}var n=t.prototype;return n.oRt=function(t,n){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:if(this.aRt>=this.uRt.maxRetries)throw t;return[4,Ar(this.cRt(this.aRt++),n)];case 1:return i.sent(),[2]}})}).call(this)},n.cRt=function(t){var n=0;return 0!==t&&(n+=b.min(this.uRt.maximumBackoff,this.uRt.minimumBackoff*b.pow(2,t-1))),n},t}();F(),Et(),Dt(),F(),Et(),Dt();var qz=function(t){return t.dRt="emsgdata",t}({}),Gz=function(t){function n(n,i){var r;return(r=t.call(this,"emsgdata")||this).value=void 0,r.data=void 0,r.value=n,r.data=i,r}return Ct(n,t),n}(rh);F(),Et();var jz=function(){function t(){this.YJ=void 0}var n=t.prototype;return n.start=function(t){this.YJ=t},n.lRt=function(t){this.YJ.enqueue(t)},t}();F(),Et(),F(),Et();var Qz=function(t){return t.fRt="initdata",t.MANIFEST_UPDATE="manifestupdate",t.vRt="timestamps:v1",t}({});function Yz(t){if("urn:theo:hesp:2020"===t.$N){var n=t.zE;if(n===Qz.fRt)return function(t){if(t&&zn(t)){var n=t;if(Yn(n.index)&&Yn(n.offset)&&!(n.index<0&&n.offset<0))return{Km:"initdata",index:n.index,offset:n.offset}}}(JSON.parse(fc(_c(t.eM),new Tc)));if(n===Qz.MANIFEST_UPDATE)return function(t){if(t&&zn(t)){var n=t;if(!Un(n.url)||qn(n.url))return{Km:"manifestupdate",url:n.url}}}(JSON.parse(fc(_c(t.eM),new Tc)));if(n===Qz.vRt){var i,r=_c(t.eM),e=new Tc,s=jh(r,e).toNumber()/t.qD,u=jh(r,e).toNumber()/1e3,o=qh(r,e)/1e3;return e.ac+8<=r.byteLength&&(i={hours:qh(r,e),minutes:Wh(r,e),seconds:Wh(r,e),frames:zh(r,e)}),{Km:Qz.vRt,_Rt:s,gRt:u,pRt:o,mRt:i}}}}var Kz=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).wRt=new th,n}Ct(n,t);var i=n.prototype;return i.transform=function(t){if(t.Km===um.VC)try{var n=Yz(ym.LD(t.ck));n&&this.wRt.So(new Gz(n.Km,n))}catch(t){false}this.lRt(t)},i.zg=function(){this.wRt.Vo()},n}(jz);F(),Et(),Dt();var Jz=function(){function t(){this.yRt=void 0}var n=t.prototype;return n.start=function(t){this.yRt=new Zz(t)},n.transform=function(t){this.yRt.A$(t)},n.flush=function(){this.yRt.S$()},t}(),Zz=function(t){function n(n){var i;return(i=t.call(this)||this).YJ=void 0,i.YJ=n,i}Ct(n,t);var i=n.prototype;return i.C$=function(t){return!0},i.B$=function(t){this.YJ.enqueue(t)},i.M$=function(t){},n}($R);F(),Et(),Wt(),Dt(),Qt(),F(),Et();var $z=ue.fromNumber(bi);var tX=function(t){function n(n,i){var r;return(r=t.call(this)||this).nV=void 0,r.ARt=void 0,r.nV=n,r.ARt=i,r}return Ct(n,t),n.prototype.lk=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:0,i.label=1;case 1:return i.trys.push([1,3,,5]),[4,this.nV.lk(t)];case 2:return[2,i.sent()];case 3:if(vr(n=i.sent()))throw n;return[4,this.ARt.oRt(n,t.Yg)];case 4:return i.sent(),[3,5];case 5:return[3,0];case 6:return[2]}})}).call(this)},n}(th);function nX(t,n,i,r,e,s,u,o){var h=new Ld;return e&&h.OT(function(t,n){return void 0===n&&(n=$z),new Ld({Range:"bytes="+t.toString()+"-"+n.toString()})}(e.start,e.end)),{Yu:t,fk:h,zk:!1,Yg:o,Km:gl.yk,Wk:i,qk:r,Vk:s,Hk:u,dk:n,jk:n===Md.BT}}F(),Et(),Dt(),F(),Et();var iX=function(t){return t[t.INITIALIZER=0]="INITIALIZER",t[t.FRAMES=1]="FRAMES",t}({}),rX=function(t){function n(n,i){var r;return(r=t.call(this)||this).SQ=void 0,r.Tat=void 0,r.HA=void 0,r.bRt=[],r.SQ=n,r.Tat=r.SQ.match(/video/)?KB.Bk:KB.Dk,r.HA=i,r}Ct(n,t);var i=n.prototype;return i.transform=function(t){this.bRt.push(t),t.Km===um.OC&&this.SRt(this.bRt.splice(0),iX.FRAMES)},i.SRt=function(t,n){var i={qD:this.HA,oQ:this.SQ},r=Nc(t.map(function(t){return mc(t.ck.ck)})),e=Ui(t,eX),s=ym.TD(e.ck.ck)[0],u={qk:this.Tat,Ey:i,$at:r,Km:n,ct:this.Nd(s)/this.HA,Rvt:le(this.TRt(s),this.HA)};this.lRt(u)},i.Nd=function(t){var n,i=t.Z[0];if(!i||0===i.zN.length)return 0;var r=null!=(n=i.gD.NN)?n:0;return Pi(i.zN[0].JN,function(t){var n;return null!=(n=t.ct)?n:r})},i.TRt=function(t){var n,i;return null!=(i=null==(n=t.Z[0].GN)?void 0:n.GN)?i:ue.UZERO},n}(jz);function eX(t){return t.Km===um.IC}F(),Et();var sX=function(t){function n(n,i,r){var e;return(e=t.call(this)||this).kRt=void 0,e.ORt=void 0,e.nV=void 0,e.ARt=void 0,e.Tat=void 0,e.WRt=void 0,e.xRt="now",e.IRt=void 0,e.RRt=void 0,e.HA=void 0,e.LRt=new hr,e.tRt=void 0,e.kRt=n,e.ARt=new Xz(r),e.WRt=new Kz,e.WRt.wRt.wn(qz.dRt,e.Rs),e.nV=i,e.Tat=function(t){switch(t){case KB.Dk:return ml.Dk;case KB.Bk:return ml.Bk;default:return ml.pk}}(n.Km),e.ORt=new tX(e.nV,e.ARt),e}Ct(n,t);var i=n.prototype;return i.Cct=function(t){return t+1},i.My=function(t){this.xRt=t,this.IRt=void 0,this.RRt=void 0},i.CRt=function(){return void 0!==this.IRt},i.DRt=function(){return Vt(function(){var t,n,i,r,e,s,u,o,h,c,a,f,v,d;return zt(this,function(l){switch(l.label){case 0:if(this.$It)throw new y("Concurrent downloads are not supported.");l.label=1;case 1:return l.trys.push([1,,4,5]),this.tRt=new Vc,"now"===this.xRt?t=Vn.xm(this.kRt.BRt("now"),this.kRt.NRt):(n=this.xRt,i=0===n?1:this.kRt.MRt(n),t=Vn.xm(this.kRt.BRt(i),this.kRt.NRt)),r=nX(t,Md.CT,_l.Sk,this.Tat,void 0,3e3,1e3,this.LRt.Yg),[4,this.ORt.lk(r)];case 2:return[4,l.sent().HT(this.LRt.Yg)];case 3:return e=l.sent(),s=new E(e),u=function(t){var n=lm.aD(new am(_c(t),new Tc)),i=Ui(n,function(t){return t.Km===um.WC||t.Km===um.IC});if(void 0===i)return{FRt:t,KD:void 0};var r=wc(t,0,i.ac),e=wc(t,i.ac);return{FRt:r,KD:0===e.byteLength?void 0:e}}(s),o=u.FRt,h=u.KD,c=ym.TD(_c(s)),this.HA=function(t){var n=Ui(t,function(t){return t.Km===um.OR});return n.Z[0].KD.gD.qD}(c),a=function(t){var n=t.filter(function(t){return t.Km===um.VC}),i=n.map(function(t){return Yz(t)}),r=Ui(i,function(t){return(null==t?void 0:t.Km)===Qz.fRt});if(!r)throw new y("No init data in init response");return r}(c),this.IRt=a.index,this.RRt=a.offset,h&&(v=ym.TD(_c(s)),f=function(t,n,i){var r,e,s,u=Ui(t,function(t){return t.Km===um.IC}),o=le(null!=(e=null==(r=u.Z[0].GN)?void 0:r.GN)?e:ue.UZERO,i),h=u.Z[0],c=null!=(s=h.gD.NN)?s:0,a=h.zN[0],f=Pi(a.JN,function(t){var n;return null!=(n=t.ct)?n:c})/i;return{xet:o,ct:f,bU:n}}(v,-this.kot.eRt,this.HA)),[2,{initialization:o,data:h,metadata:f}];case 4:return d=this.tRt,this.tRt=void 0,null==d||d.Xy(),[7];case 5:return[2]}})}).call(this)},i.URt=function(){if(this.$It)throw new y("Concurrent downloads are not supported.");this.tRt=new Vc;var t=void 0!==this.RRt?ue.fromNumber(this.RRt):void 0;return Kd(this.VRt(this.IRt,t,this.LRt.Yg)).pipeThrough(new qd(new rX(this.kot.oQ,this.HA))).pipeThrough(new qd(new uX(this.LRt.Yg)))},i.VRt=function(t,n,i){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return r=this.HRt(t,n,i),[4,this.ORt.lk(r)];case 1:return[2,e.sent().WT().pipeThrough(new qd(new Jz)).pipeThrough(new qd(this.WRt))]}})}).call(this)},i.HRt=function(t,n,i){var r=this.kRt.qRt(t),e=void 0!==n?{start:n,end:void 0}:void 0;return nX(Vn.xm(r,this.kRt.NRt),Md.BT,_l.pk,this.Tat,e,25e3,1e3,i)},i.sRt=function(){this.IRt=void 0,this.RRt=void 0},i.nRt=function(){void 0!==this.IRt&&(this.IRt=this.Cct(this.IRt)),this.RRt=void 0;var t=this.tRt;this.tRt=void 0,null==t||t.Xy()},i.cancelDownload=function(){var t;this.LRt.Zg(),this.LRt=new hr,this.tRt=null!=(t=this.tRt)?t:new Vc,this.sRt();var n=this.tRt;this.tRt=void 0,null==n||n.Xy()},i.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),this.WRt.zg(),this.LRt.Zg(),[4,this.iRt];case 1:return t.sent(),this.IRt=void 0,this.RRt=void 0,[2]}})}).call(this)},Nt(n,[{key:"kot",get:function(){return this.kRt}},{key:"ERt",get:function(){return!1}},{key:"PRt",get:function(){return this.xRt}},{key:"$It",get:function(){return void 0!==this.tRt}},{key:"iRt",get:function(){return this.tRt?this.tRt.Qy:ut.resolve()}}]),n}(th);var uX=function(){function t(t){var n=this;this.YJ=void 0,this.Jg=void 0,this.zRt=function(){n.YJ.error(new fr)},this.Jg=t}var n=t.prototype;return n.start=function(t){this.YJ=t,this.Jg.Xg(this.zRt)},n.flush=function(){this.Jg.jg(this.zRt)},t}();function oX(t){var n;return t.value/(null!=(n=t.scale)?n:1)}F(),Et(),Bt(),Ut(),F(),Et(),Bt(),Ut(),F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt(),Dt(),F(),Et();var hX="{initId}",cX=/{initId(?::0(?:\d+)d)?}/,aX=/{segmentId(?::0(?:\d+)d)?}/,fX=function(){function t(t,n,i){var r,e,s,u;this.FO=void 0,this.rCt=void 0,this.hS=void 0,this.dW=void 0,this.GRt=void 0,this.YRt=void 0,this.ZRt=void 0,this.tCt=void 0,this.eCt=void 0,this.pO=void 0,this.sCt=void 0,this.nAt=void 0,this.jRt=void 0,this.KRt=void 0,this.fAt=[],this.FO=t,this.rCt=i,this.hS=t.id,this.dW=t.bandwidth,this.GRt=t.averageBandwidth,this.YRt=null!=(r=t.baseUrl)?r:"",this.ZRt=null!=(e=t.codecs)?e:n.codecs,this.tCt=null!=(s=t.continuationPattern)?s:n.continuationPattern,this.eCt=null!=(u=t.initializationPattern)?u:n.initializationPattern,this.pO=t.label,this.sCt=t.mediaTimeOffset?oX(t.mediaTimeOffset):0,this.nAt=t.segmentDuration?oX(t.segmentDuration):0,this.er(t)}return t.prototype.er=function(t){this.jRt=t.activeSegment,this.KRt=t.activeSequenceNumber,this.fAt=t.segments},Nt(t,[{key:"o",get:function(){return this.hS}},{key:"kW",get:function(){return this.dW}},{key:"tyt",get:function(){return this.GRt}},{key:"ect",get:function(){return this.fAt}},{key:"XRt",get:function(){return this.jRt}},{key:"QRt",get:function(){return this.KRt}},{key:"NRt",get:function(){return Vn.xm(this.YRt,this.JRt.NRt)}},{key:"frt",get:function(){return this.ZRt}},{key:"Th",get:function(){return this.pO}},{key:"$Rt",get:function(){return this.tCt}},{key:"iCt",get:function(){return this.eCt}},{key:"eRt",get:function(){return this.sCt}},{key:"nCt",get:function(){return this.nAt}}]),t}(),vX=function(t){function n(n,i,r){var e,s,u,o,h;return(e=t.call(this,n,i,r)||this).oCt=void 0,e.aCt=void 0,e.kA=void 0,e.oCt=null!=(s=n.channels)?s:1,e.aCt=null!=(o=null!=(u=n.frameRate)?u:i.frameRate)?o:1024,e.kA=null!=(h=n.sampleRate)?h:i.sampleRate,e}return Ct(n,t),Nt(n,[{key:"Km",get:function(){return KB.Dk}},{key:"JRt",get:function(){return this.rCt}},{key:"hCt",get:function(){return this.oCt}},{key:"plt",get:function(){return this.aCt}},{key:"BB",get:function(){return this.kA}},{key:"oQ",get:function(){return'audio/mp4; codecs="'+this.frt+'"'}}]),n}(fX),dX=function(t){function n(n,i,r){var e,s;return(e=t.call(this,n,i,r)||this).Up=void 0,e.aCt=void 0,e.Up=n.resolution,e.aCt=oX(null!=(s=n.frameRate)?s:i.frameRate),e}return Ct(n,t),Nt(n,[{key:"Km",get:function(){return KB.Bk}},{key:"JRt",get:function(){return this.rCt}},{key:"uCt",get:function(){return this.Up}},{key:"plt",get:function(){return this.aCt}},{key:"oQ",get:function(){return'video/mp4; codecs="'+this.frt+'"'}}]),n}(fX);function lX(t,n){var i=String(n);if(t===hX||"now"===n)return i;var r=A(t.substring(9,t.lastIndexOf("d")));return Wo(i,r,"0")}function wX(t,n){var i=String(n);if(t===hX)return i;var r=A(t.substring(12,t.lastIndexOf("d")));return Wo(i,r,"0")}var gX=function(){function t(t,n,i){var r;this.rCt=void 0,this.RI=void 0,this.cCt=void 0,this.hS=void 0,this.lCt=void 0,this.YRt=void 0,this.pO=void 0,this.sCt=void 0,this.vCt=void 0,this.rCt=t,this.RI=i,this.cCt=n,this.hS=t.id,this.lCt=t.alignId,this.YRt=null!=(r=t.baseUrl)?r:"",this.pO=t.label,this.sCt=t.mediaTimeOffset?oX(t.mediaTimeOffset):0,this.vCt=t.protection,this.er(t)}return t.prototype.er=function(t){for(var n,i=function(){var i=n.value,r=Ui(t.tracks,function(t){return i.o===t.id});r&&i.er(r)},r=Lt(this.RI);!(n=r()).done;)i()},Nt(t,[{key:"zst",get:function(){return this.cCt}},{key:"o",get:function(){return this.hS}},{key:"dCt",get:function(){return this.lCt}},{key:"NRt",get:function(){return Vn.xm(this.YRt,this.zst.NRt)}},{key:"Th",get:function(){return this.pO}},{key:"eRt",get:function(){return this.sCt}},{key:"fCt",get:function(){return this.vCt}}]),t}(),_X=function(t){function n(n,i){var r,e=[];(r=t.call(this,n,i,e)||this).qA=void 0,r.oCt=void 0,r.SQ=void 0;for(var s,u=Lt(n.tracks);!(s=u()).done;){var o=s.value;e.push(new vX(o,n,r))}return r}return Ct(n,t),n.prototype.er=function(n){var i,r;t.prototype.er.call(this,n),this.qA=n.language,this.oCt=null!=(i=n.channels)?i:1,this.SQ=null!=(r=n.mimeType)?r:"audio/mp4"},Nt(n,[{key:"JRt",get:function(){return this.rCt}},{key:"Z",get:function(){return this.RI}},{key:"bs",get:function(){return this.qA}},{key:"hCt",get:function(){return this.oCt}}]),n}(gX),mX=function(t){function n(n,i){var r,e=[];(r=t.call(this,n,i,e)||this).SQ=void 0;for(var s,u=Lt(n.tracks);!(s=u()).done;){var o=s.value;e.push(new dX(o,n,r))}return r}return Ct(n,t),n.prototype.er=function(n){var i;t.prototype.er.call(this,n),this.SQ=null!=(i=n.mimeType)?i:"video/mp4"},Nt(n,[{key:"JRt",get:function(){return this.rCt}},{key:"Z",get:function(){return this.RI}},{key:"_Ct",get:function(){return this.rCt.captions}}]),n}(gX),yX=function(){function t(t,n){var i,r,e;this.ACt=[],this.SCt=[],this.pCt=void 0,this.hS=void 0,this.YRt=void 0,this.wCt=void 0,this.bz=void 0,this.Zf=void 0,this.pCt=t,this.hS=n.id,this.YRt=null!=(i=n.baseUrl)?i:"";for(var s,u=Lt(null!=(r=n.audio)?r:[]);!(s=u()).done;){var o=s.value;this.ACt.push(new _X(o,this))}for(var h,c=Lt(null!=(e=n.video)?e:[]);!(h=c()).done;){var a=h.value;this.SCt.push(new mX(a,this))}this.er(n)}return t.prototype.er=function(t){var n;this.wCt=t.timeBounds,this.Zf=null!=(n=t.events)?n:[],this.bz=t.currentTime?oX(t.currentTime):void 0},Nt(t,[{key:"o",get:function(){return this.hS}},{key:"NRt",get:function(){return Vn.xm(this.YRt,this.pCt.gCt)}},{key:"mCt",get:function(){return this.wCt}},{key:"MP",get:function(){return this.bz}},{key:"aQ",get:function(){return this.Zf}},{key:"yCt",get:function(){return this.ACt}},{key:"bCt",get:function(){return this.SCt}}]),t}(),pX=function(){function t(t,n){this.OCt=void 0,this.pCt=void 0,this.kCt=void 0,this.PCt=void 0,this.ICt=void 0,this.CCt=void 0,this.BCt=[],this.vA=void 0,this.MCt=void 0,this.LCt=void 0,this.UCt=void 0,this.OCt=t,this.pCt=n,this.er(n)}return t.prototype.er=function(t){var n,i,r=function(){var t=e.value,i=Ui(n.BCt,function(n){return n.o===t.id});i?i.er(t):n.BCt.push(new yX(n,t))};this.kCt=oX(t.availabilityDuration),this.PCt=t.creationDate,this.ICt=t.fallbackPollRate,this.CCt=t.manifestVersion,this.vA=t.streamType,this.MCt=t.activePresentation,this.LCt=t.contentBaseUrl,this.UCt=null==(i=t.timeSource)?void 0:i.url,this.pCt=t;for(var e,s=Lt(t.presentations);!(e=s()).done;)n=this,r();this.BCt=this.BCt.filter(function(n){return t.presentations.some(function(t){return t.id===n.o})})},Nt(t,[{key:"hR",get:function(){return this.pCt}},{key:"TCt",get:function(){return this.kCt}},{key:"ECt",get:function(){return this.PCt}},{key:"xCt",get:function(){return this.ICt}},{key:"RCt",get:function(){return this.CCt}},{key:"DCt",get:function(){return this.BCt}},{key:"b0",get:function(){return this.vA}},{key:"NCt",get:function(){return this.MCt}},{key:"gCt",get:function(){var t;return Vn.xm(null!=(t=this.LCt)?t:"",this.OCt)}},{key:"FCt",get:function(){return this.UCt}}]),t}();F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt(),Dt();var kX=0,bX=function(t){function n(n){var i;return(i=t.call(this)||this).VCt=void 0,i.gO=kX++,i.VCt=n,i}Ct(n,t);var i=n.prototype;return i.MRt=function(t){var n=(t-this.VCt.JRt.zst.MP)*this.framesPerSecond();return b.round(this.VCt.QRt+n)},i.HCt=function(t){return t+1},i.BRt=function(t){for(var n,i,r=this.VCt.iCt;i=null==(n=r.match(cX))?void 0:n.pop();)r=r.split(i).join(lX(i,t));return r+("now"===t?"?uuid="+qE():"")},i.qRt=function(t){for(var n,i,r=this.VCt.$Rt;i=null==(n=r.match(aX))?void 0:n.pop();)r=r.split(i).join(wX(i,t));return r},i.QU=function(){},i.jU=function(){},Nt(n,[{key:"cst",get:function(){return!0}},{key:"tyt",get:function(){return this.VCt.tyt}},{key:"kW",get:function(){return this.VCt.kW}},{key:"frt",get:function(){return this.VCt.frt}},{key:"o",get:function(){return this.VCt.o}},{key:"Th",get:function(){var t;return null!=(t=this.VCt.Th)?t:""}},{key:"jI",get:function(){return this.gO}},{key:"nyt",get:function(){return this.VCt.NRt}},{key:"iyt",get:function(){}},{key:"oQ",get:function(){return this.VCt.oQ}},{key:"eRt",get:function(){return this.VCt.eRt}},{key:"NRt",get:function(){return this.VCt.NRt}},{key:"Km",get:function(){return this.VCt.Km}}]),n}(th),AX=function(t){function n(n,i){var r;return(r=t.call(this,n)||this).FO=void 0,r.hu=void 0,r.FO=i,r}return Ct(n,t),n.prototype.framesPerSecond=function(){return this.VCt.BB/this.VCt.plt},Nt(n,[{key:"WCt",get:function(){return this.VCt}},{key:"$mt",get:function(){return this.VCt.BB}},{key:"Ht",get:function(){return this.FO}},{key:"Ca",get:function(){return this.hu||(this.hu=UF(this)),this.hu}}]),n}(bX),TX=function(t){function n(n,i){var r;return(r=t.call(this,n)||this).FO=void 0,r.hu=void 0,r.FO=i,r}return Ct(n,t),n.prototype.framesPerSecond=function(){return this.VCt.plt},Nt(n,[{key:"WCt",get:function(){return this.VCt}},{key:"eyt",get:function(){return 0}},{key:"plt",get:function(){return this.VCt.plt}},{key:"Mi",get:function(){return this.VCt.uCt.height}},{key:"Ti",get:function(){return this.VCt.uCt.width}},{key:"uCt",get:function(){return this.VCt.uCt}},{key:"Ht",get:function(){return this.FO}},{key:"Ca",get:function(){return this.hu||(this.hu=LF(this)),this.hu}}]),n}(bX);F(),Et();var SX=function(t){return t.qCt="alternative",t.zCt="main",t.GCt="commentary",t.XCt="",t.UU="descriptions",t.jCt="main-desc",t.QCt="translation",t}({}),EX=function(t){return t.qCt="alternative",t.zCt="main",t.GCt="commentary",t.XCt="",t.FU="captions",t.WI="sign",t.OU="subtitles",t}({}),IX=0,RX=function(t){function n(n,i,r){var e;(e=t.call(this)||this).rCt=void 0,e.ZCt=void 0,e.dO=new vg,e.$Ct=void 0,e.gO=IX++,e.We=!1,e.dct=void 0,e.hu=void 0,e.rCt=i,e.ZCt=r,e.$Ct=new oH(n,[]);for(var s,u=Lt(i.Z);!(s=u()).done;){var o=s.value;e.dO.lO(e.createQuality(o))}return e}Ct(n,t);var i=n.prototype;return i.wO=function(t){this.Rt=t},i.tDt=function(t){for(var n,i=Lt(this.dO.II);!(n=i()).done;){var r=n.value;r===t&&this.So(new CU(r))}},Nt(n,[{key:"XI",get:function(){return this.KCt()}},{key:"Rt",get:function(){return this.We},set:function(t){this.Rt!==t&&(this.We=t,t&&this.YCt(),this.ZCt.JCt(),this.So(new dg(this)))}},{key:"Ca",get:function(){return this.hu||(this.hu=Zw(this)),this.hu}},{key:"Jdt",get:function(){return this.$Ct}},{key:"o",get:function(){return this.rCt.o}},{key:"jI",get:function(){return this.gO}},{key:"Th",get:function(){var t;return null!=(t=this.rCt.Th)?t:""}},{key:"Xk",get:function(){return this.Rt?"enabled":"disabled"},set:function(t){"enabled"===t?this.Rt=!0:"disabled"===t&&(this.Rt=!1)}},{key:"KI",get:function(){return this.dO}},{key:"YI",get:function(){return this.dct},set:function(t){this.dct=t,this.ZCt.JCt(),this.So(new JM(t,this))}}]),n}(th),CX=function(t){function n(n,i){return t.call(this,ig.Dk,n,i)||this}Ct(n,t);var i=n.prototype;return i.YCt=function(){this.ZCt.iDt(this)},i.KCt=function(){var t=this.ZCt.eDt;return(null==t?void 0:t.Ht)===this?t:void 0},i.createQuality=function(t){return new AX(t,this)},Nt(n,[{key:"Km",get:function(){return KB.Dk}},{key:"Lt",get:function(){return SX.zCt}},{key:"bs",get:function(){return this.rCt.bs}},{key:"JRt",get:function(){return this.rCt}}]),n}(RX),DX=function(t){function n(n,i){return t.call(this,ig.Bk,n,i)||this}Ct(n,t);var i=n.prototype;return i.YCt=function(){this.ZCt.sDt(this)},i.KCt=function(){var t=this.ZCt.nDt;return(null==t?void 0:t.Ht)===this?t:void 0},i.createQuality=function(t){return new TX(t,this)},Nt(n,[{key:"Km",get:function(){return KB.Bk}},{key:"Lt",get:function(){return EX.zCt}},{key:"bs",get:function(){return""}},{key:"JRt",get:function(){return this.rCt}},{key:"_Ct",get:function(){return this.rCt._Ct}}]),n}(RX);function PX(t,n,i,r){if(t){var e=function(t,n,i){for(var r,e=[],s=Lt(n);!(r=s()).done;){var u,o,h=r.value,c=null!=(u=h.mimeType)?u:"audio/mp4",a=null!=(o=h.codecs)?o:h.tracks.map(function(t){return t.codecs})[0];e.push(c+'; codecs="'+a+'"')}return NX(t,n,e,[],i)}(t,n?[n]:[],!r),s=function(t,n,i){for(var r,e=[],s=Lt(n);!(r=s()).done;){var u,o,h=r.value,c=null!=(u=h.mimeType)?u:"video/mp4",a=null!=(o=h.codecs)?o:h.tracks.map(function(t){return t.codecs})[0];e.push(c+'; codecs="'+a+'"')}return NX(t,n,[],e,i)}(t,i?[i]:[],!r),u=LH(e,s);return t.preferredKeySystems&&(null==u?void 0:u.kpt)&&(u.kpt=GH(u.kpt,t.preferredKeySystems)),u}}function NX(t,n,i,r,e){var s=n.map(function(t){return t.protection}).filter(Un);if(s.length){var u=s[0].type,o=Ji(s,function(t){return t.systems}),h=Ji(o,function(t){return function(t,n){void 0===n&&(n=!0);for(var i,r=[],e=Lt(n?function(t){return xo.filter(function(n){return n.Zm===t.toLowerCase()})}(t.schemeId):function(t){return Bo.filter(function(n){return n.Zm===t.toLowerCase()})}(t.schemeId));!(i=e()).done;){var s=i.value;r.push({HH:BX(t)?t.uri:void 0,kS:s,NW:void 0,BW:t.pssh?[mh(t.pssh).buffer]:[],MW:[]})}return r}(t,e)});return{aH:t,Ept:{$St:u},kpt:h,tTt:i,iTt:r}}}function BX(t){return t.schemeId===eo.jm&&void 0!==t.keyFormat&&void 0!==t.keyFormatVersions}F(),Et(),Ut(),F(),Et(),Wt(),Bt(),Ut(),Qt(),F(),Et();var xX;function OX(t){var n=t.MP,i=t.IP.JM(n);return i?i.An(0)-n:0}xX="Android"===Vn.Cm.Dm?200:300;var MX=Vn.Zs.bp?1:.5,LX=function(){function t(t,n,i,r,e,s){var u=this;this.TL=void 0,this.jW=void 0,this.vDt=void 0,this.IDt=void 0,this.oDt=void 0,this.wDt=void 0,this.uDt=void 0,this.Ra=void 0,this._Dt=void 0,this.rDt=void 0,this.lDt=void 0,this.SDt=void 0,this.TDt=void 0,this.dDt=void 0,this.cDt=void 0,this.aDt=void 0,this.TL=t,this.jW=n,this.vDt=i,this.IDt=r,this.oDt=e,this.wDt=s,this.Ra=0,this._Dt=ut.resolve(),this.SDt=[],this.TDt=void 0,this.dDt=function(){var t,n;if(!u.IDt.kx){var i=null==(t=u.vDt.eDt)?void 0:t.Ht,r=null==(n=u.vDt.nDt)?void 0:n.Ht,e=Zi(u.mDt(i,r),function(t){return t.yDt});e&&(kr(u.ADt(e,!0)),u.TL.CL.RL&&u.IDt.oR())}},this.cDt=function(){u.uDt.wn(Ey.SM,u.dDt),u.uDt.mn(Ey.TM,u.cDt)},this.aDt=function(){if(u.SDt.unshift(u.oDt.kW),u.SDt=u.SDt.slice(0,3),u.lDt){var t=u.lDt.bDt.yDt;u.oDt.kWh){s={bDt:a,ift:Vn.Mg()};break}}if(this.lDt&&FX(this.lDt.bDt,null==s?void 0:s.bDt)){var f=Vn.Mg()-this.lDt.ift,v=this.lDt.bDt.yDt,d=this.SDt.length>=3&&this.SDt.every(function(t){return t>v});if(f>1e3&&d){if(this.TL.CL.RL||Vn.Zs.pp){var l=2*this.oDt.EW;if(!(OX(this.TL)>l))return}else{var w=b.max(2*this.oDt.EW+MX,this.jW.nL.minimumOffset);if(!(OX(this.TL)>w))return void(this.TDt&&this.TDt.minimumOffset===w||(this.uL(),this.TDt={minimumOffset:w},this.jW.hL(this.TDt)))}return this.lDt.bDt}}else this.lDt=s},n.ADt=function(t,n){return void 0===n&&(n=!1),Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:return this.lDt=void 0,this.uL(),(i=this.fDt).kDt===t.kDt&&i.EDt===t.EDt?[2]:(r=t.kDt,e=t.EDt,i.EDt&&e&&i.EDt.kW>e.kW&&n&&(this.oDt.RIt(t.yDt),this.SDt=[]),[4,this.vDt.PDt(e,r)]);case 1:return s.sent(),[2]}})}).call(this)},n.uL=function(){this.TDt&&(this.jW.uL(this.TDt),this.TDt=void 0)},n.mDt=function(t,n){var i,r=[],e=[];t&&(r=(null==(i=t.YI)?void 0:i.length)?t.YI:t.KI.II);if(n){var s,u=(null==(s=n.YI)?void 0:s.length)?n.YI:n.KI.II,o=u.slice().sort(function(t,n){return t.kW-n.kW}),h=this.xDt(o);0===h.length&&u.length>0&&h.push(Zi(u,function(t){return t.kW})),e=h}for(var c,a=[],f=r.length>0?r:[void 0],v=e.length>0?e:[void 0],d=Lt(f);!(c=d()).done;)for(var l,w=c.value,g=Lt(v);!(l=g()).done;){var _=l.value;a.push(UX(w,_))}return function(t){return t.sort(function(t,n){return n.yDt-t.yDt})}(a)},n.xDt=function(t){var n=this,i=Ui(t,function(t){return t.Mi>=n.TL.Mi&&t.Ti>=n.TL.Ti});return i?t.filter(function(t){return t.Mi<=i.Mi&&t.Ti<=i.Ti}):t.slice()},n.zg=function(){this.lDt=void 0,this.uDt.hr(),this.uL()},Nt(t,[{key:"fDt",get:function(){return UX(this.vDt.eDt,this.vDt.nDt)}}]),t}();function UX(t,n){var i,r;return{kDt:t,EDt:n,yDt:1.3*((null!=(i=null==t?void 0:t.kW)?i:0)+(null!=(r=null==n?void 0:n.kW)?r:0))}}function FX(t,n){var i,r,e,s;return void 0===t||void 0===n?t===n:(null==(i=t.kDt)?void 0:i.o)===(null==(r=n.kDt)?void 0:r.o)&&(null==(e=t.EDt)?void 0:e.o)===(null==(s=n.EDt)?void 0:s.o)&&t.yDt===n.yDt}F(),Et(),Wt(),Bt(),Qt();var VX=function(){function t(t,n,i){this.RDt=void 0,this.nT=new hr,this.RDt=t,this.Ixt(n,i,this.nT.Yg).catch(di)}var n=t.prototype;return n.Ixt=function(t,n,i){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return i.Hg?[3,6]:[4,Ar(6e5,i)];case 1:e.sent(),e.label=2;case 2:return e.trys.push([2,4,,5]),r=this,[4,HX(t,n,i)];case 3:return r.RDt=e.sent(),[3,5];case 4:return lr(e.sent()),[3,5];case 5:return[3,0];case 6:return[2]}})}).call(this)},n.zg=function(){this.nT.Zg()},t.create=function(n,i,r){return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,HX(n,i,r)];case 1:return[2,new t(e.sent(),n,i)]}})})()},Nt(t,[{key:"Oyt",get:function(){return(this.RDt.serverTimeMs+(Vn.Mg()-this.RDt.localTimeMs))/1e3}},{key:"CDt",get:function(){return(this.RDt.localTimeMs-this.RDt.serverTimeMs)/1e3}}]),t}();function HX(t,n,i){return Vt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return[4,WX(t,n,i)];case 1:return r=h.sent(),e=r[0],s=r[1],u=r[2],s>20?[4,WX(t,n,i)]:[3,3];case 2:o=h.sent(),e=o[0],s=o[1],u=o[2],h.label=3;case 3:return[2,{localTimeMs:e,serverTimeMs:u-s/2}]}})})()}function WX(t,n,i){return Vt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return r=Vn.Mg(),[4,n.lk({Uk:wl.GET,Yu:t,Yg:i})];case 1:return e=h.sent(),s=Vn.Mg()-r,[4,e.UT(i)];case 2:return u=h.sent(),o=1e3*Number(u),[2,[r,s,o]]}})})()}var zX=function(t){function n(){return t.call(this,"seek")||this}return Ct(n,t),n}(rh),XX=function(t){return t.Xz="seek",t}({}),qX=[eh.uo,Ey.wI,eh._y],GX=function(t){function n(n,i,r,e,s,u,o,h,c,a,f){var v;return(v=t.call(this)||this).Ac=void 0,v.nV=void 0,v.HDt=void 0,v.TL=void 0,v.UDt=void 0,v._dt=void 0,v.hBt=void 0,v.jDt=!1,v.lBt=!1,v.Rz=void 0,v.YL=new ng,v.$L=new ng,v.fBt=void 0,v.NDt=void 0,v.MDt=void 0,v.pCt=void 0,v.ODt=new Vc,v.WDt=void 0,v.GDt=void 0,v.zDt=void 0,v.jW=void 0,v.iq=void 0,v.Dpt=void 0,v.FDt=new Vc,v.rV=new hr,v.eBt=void 0,v.iBt=new hr,v.w7=void 0,v.m7=new hr,v.ZDt=void 0,v.DDt=void 0,v.uBt=void 0,v.$Dt=void 0,v.BDt=void 0,v.aBt=void 0,v.cBt=void 0,v.IL=function(){v.lBt=!0},v.updateActiveQualities=function(){var t,n,i=v.TL.MP,r=null==(t=v.DDt)?void 0:t.YIt(i),e=null==(n=v.BDt)?void 0:n.YIt(i);if(v.NDt!==r&&(v.NDt=r,r))for(var s,u=Lt(v.YL.II);!(s=u()).done;){s.value.tDt(r)}if(v.MDt!==e&&(v.MDt=e,e))for(var o,h=Lt(v.$L.II);!(o=h()).done;){o.value.tDt(e)}},v.oBt=function(t,n){var i=n.data;if(i.Km===Qz.vRt){var r,e=i.gRt,s=i.pRt,u=i._Rt,o=i.mRt;if(v.WDt){var h=v.WDt.Oyt,c=v.TL.MP;if(v.lBt&&0!==c){var a={theolive:h-e+u-c,engine:s,distribution:b.max(h-(e+s),0),player:b.min(u-c,v.jW.nL.forceSeekOffset)};t===ig.Dk?(v.GDt=a,v.UDt.qIt(v.WDt.CDt+e,u)):(v.zDt=a,v.UDt.HIt(v.WDt.CDt+e,u))}}if(o)null!=v.fBt||(v.fBt=v.TL.tI(Ym.VU,"timecode","timecode",void 0,!1,Dg.DEFAULT,!1,void 0)),v.fBt.tV(new Yg(u,u,o,!1,void 0)),cy(v.fBt,null!=(r=v.TL.IP.Tn(0))?r:-1)}v.So(n)},v.e8=function(t){vr(t)||(v.Xx(),v.So(new _b(new fd(cd.MEDIA_LOAD_ERROR,t.message))))},v.Ac=n,v.HDt=i,v.TL=r,v.nV=s,v.UDt=u,v.Rz=new LX(r,o,v,c,e,f),v._dt=h,v.hBt=a,v.jW=o,v.TL.wn(Ey.TM,v.IL),v.TL.wn(qX,v.updateActiveQualities),v}Ct(n,t);var i=n.prototype;return i.VDt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.DDt?[4,this.DDt._S(0,1/0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.BDt?[4,this.BDt._S(0,1/0)]:[3,4];case 3:t.sent(),t.label=4;case 4:return[2]}})}).call(this)},i.Un=function(){if(!this.Ac.src)throw new fd(cd.SOURCE_INVALID,"No src property found in given source.");this.Dpt||(this.Dpt=this.lE(this.rV.Yg).catch(this.e8))},i.lE=function(t){return Vt(function(){var n,i,r,e;return zt(this,function(s){switch(s.label){case 0:return this.So(new GR),n=this.Ac.src,[4,this.HDt.Qxt(n,t)];case 1:return i=s.sent(),this.pCt=new pX(n,i),this.pCt.FCt?(r=this,[4,VX.create(this.pCt.FCt,this.nV,t)]):[3,3];case 2:r.WDt=s.sent(),s.label=3;case 3:return this.qDt(),e=zi(this.pCt.DCt,-1),this.createTracksForPresentation(e),this.ODt.Xy(),this.JCt(),[2]}})}).call(this)},i.iDt=function(t){for(var n,i=Lt(this.YL.II);!(n=i()).done;){var r=n.value;r.wO(r===t)}},i.sDt=function(t){for(var n,i=Lt(this.$L.II);!(n=i()).done;){var r=n.value;r.wO(r===t)}},i.JCt=function(){var t=Ui(this.YL.II,function(t){return t.Rt}),n=Ui(this.$L.II,function(t){return t.Rt}),i=this.Rz.pDt(t,n);kr(this.PDt(i.EDt,i.kDt))},i.qDt=function(){var t=this;if(this.pCt&&"live"===this.pCt.b0&&this.WDt){var n=this.pCt.DCt.filter(function(n){return n.o===t.pCt.NCt})[0].MP,i=this.WDt.CDt+new Date(this.pCt.ECt).getTime()/1e3;this.UDt.UIt(i,n)}},i.createTracksForPresentation=function(t){for(var n,i,r,e,s,u=Lt(null!=(r=t.yCt)?r:[]);!(e=u()).done;){var o=e.value;this.YL.tt(new CX(o,this))}for(var h,c=Lt(null!=(s=t.bCt)?s:[]);!(h=c()).done;){var a=h.value;this.$L.tt(new DX(a,this))}null==(n=this.YL.CI(0))||n.wO(!0),null==(i=this.$L.CI(0))||i.wO(!0)},i.Tn=function(){this.jDt=!0,this.QDt()},i.Xx=function(){var t;this.jDt=!1,this.KDt().catch(this.e8),"live"===(null==(t=this.hR)?void 0:t.b0)&&(this.YDt(),this.JDt())},i.YDt=function(){this.ZDt&&this.ZDt.cancelDownload()},i.JDt=function(){this.$Dt&&this.$Dt.cancelDownload()},i.oR=function(t){var n=this;this.m7.Zg(),this.m7=new hr,this.w7=mr(function(i){return n.tBt(t,n.w7,i)},this.m7).catch(this.e8)},i.tBt=function(t,n,i){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return n?[4,n]:[3,2];case 1:s.sent(),s.label=2;case 2:return[4,gr(this.W,i)];case 3:if(s.sent(),"live"!==this.pCt.b0)throw new y("The current video source does not support Live playback.");return dr(i),[4,this.KDt()];case 4:if(s.sent(),dr(i),!this.ZDt||!this.ZDt.CRt()&&this.ZDt.PRt===(null!=t?t:"now"))return[3,10];if(this.YDt(),!this.DDt)return[3,9];s.label=5;case 5:return this.DDt.$It?[4,gr(this.DDt.iRt,i)]:[3,7];case 6:return s.sent(),[3,5];case 7:return[4,this.DDt._S(0,1/0)];case 8:s.sent(),s.label=9;case 9:null==(r=this.ZDt)||r.My(null!=t?t:"now"),s.label=10;case 10:if(!this.$Dt||!this.$Dt.CRt()&&this.$Dt.PRt===(null!=t?t:"now"))return[3,16];if(this.JDt(),!this.BDt)return[3,15];s.label=11;case 11:return this.BDt.$It?[4,gr(this.BDt.iRt,i)]:[3,13];case 12:return s.sent(),[3,11];case 13:return[4,this.BDt._S(0,1/0)];case 14:s.sent(),s.label=15;case 15:null==(e=this.$Dt)||e.My(null!=t?t:"now"),s.label=16;case 16:return this.So(new zX),dr(i),this.w7=void 0,this.QDt(),[2]}})}).call(this)},i.My=function(t){var n=this;this.m7.Zg(),this.m7=new hr,this.w7=mr(function(i){return n.y7(t,n.w7,i)},this.m7).catch(this.e8)},i.y7=function(t,n,i){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return n?[4,n]:[3,2];case 1:s.sent(),s.label=2;case 2:return[4,gr(this.W,i)];case 3:return s.sent(),dr(i),[4,this.KDt()];case 4:return s.sent(),dr(i),this.ZDt&&(this.ZDt.CRt()||this.ZDt.PRt!==t)&&this.YDt(),this.$Dt&&(this.$Dt.CRt()||this.$Dt.PRt!==t)&&this.JDt(),this.So(new zX),dr(i),null==(r=this.ZDt)||r.My(t),null==(e=this.$Dt)||e.My(t),this.w7=void 0,this.QDt(),[2]}})}).call(this)},i.PDt=function(t,n){var i,r,e=this;return(null==(i=this.ZDt)?void 0:i.kot)===n&&(null==(r=this.$Dt)?void 0:r.kot)===t?ut.resolve():(this.iBt.Zg(),this.iBt=new hr,this.eBt=mr(function(i){return e.sBt(t,n,e.eBt,i)},this.iBt).catch(this.e8),this.eBt)},i.sBt=function(t,n,i,r){return Vt(function(){var e,s,u,o,h;return zt(this,function(c){switch(c.label){case 0:return i?[4,i]:[3,2];case 1:c.sent(),c.label=2;case 2:return[4,gr(this.ODt.Qy,r)];case 3:return c.sent(),dr(r),[4,this.KDt()];case 4:return c.sent(),dr(r),[4,this.nBt(t,n)];case 5:return c.sent(),[4,this.rBt(t,n)];case 6:for(c.sent(),dr(r),u=Lt(null!=(s=null==t||null==(e=t.Ht)?void 0:e._Ct)?s:[]);!(o=u()).done;)h=o.value,this.hBt.Mgt({nit:h.channel,rit:h.language,Th:h.label});return this.eBt=void 0,this.QDt(),[2]}})}).call(this)},i.nBt=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c,a,f,v,d,l,w,g,_,m,y,p;return zt(this,function(k){switch(k.label){case 0:return i=this,u=null!=(s=this.XDt)?s:"now",(null==(r=this.ZDt)?void 0:r.kot)===n?[3,5]:(h=this.ZDt&&!this.ZDt.CRt(),c=null==(o=this.ZDt)?void 0:o.PRt,this.ZDt?[4,this.ZDt.zg()]:[3,2]);case 1:k.sent(),this.ZDt=void 0,k.label=2;case 2:return this.DDt?[4,this.DDt.iRt]:[3,4];case 3:k.sent(),k.label=4;case 4:n&&(v=null!=(f=null==(a=this.DDt)?void 0:a.IP)?f:TA.iL(),d=h?c:v.An(v.V-1),this.ZDt=new sX(n,this.nV,this._dt),this.ZDt.wn(qz.dRt,function(t){return i.oBt(ig.Dk,t)}),this.ZDt.My(null!=d?d:u)),k.label=5;case 5:return(null==(e=this.$Dt)?void 0:e.kot)===t?[3,10]:(w=this.$Dt&&!this.$Dt.CRt(),g=null==(l=this.$Dt)?void 0:l.PRt,this.$Dt?[4,this.$Dt.zg()]:[3,7]);case 6:k.sent(),this.$Dt=void 0,k.label=7;case 7:return this.BDt?[4,this.BDt.iRt]:[3,9];case 8:k.sent(),k.label=9;case 9:t&&(y=null!=(m=null==(_=this.BDt)?void 0:_.IP)?m:TA.iL(),p=w?g:y.An(y.V-1),this.$Dt=new sX(t,this.nV,this._dt),this.$Dt.wn(qz.dRt,function(t){return i.oBt(ig.Bk,t)}),this.$Dt.My(null!=p?p:u)),k.label=10;case 10:return[2]}})}).call(this)},i.rBt=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:if(i=function(t,n,i,r,e){var s=PX(t,null==n?void 0:n.Ht.JRt.JRt,null==i?void 0:i.Ht.JRt.JRt,r),u=zH(s),o=[];n&&o.push({qT:n.oQ});i&&o.push({qT:i.oQ});return{Km:Sy.wV,L4:o,aq:u,X4:e&&!r}}(this.Ac.contentProtection,n,t,this.TL.CL.RL,this.Ac.useManagedMediaSource),!this.iq||!this.iq.TZ(i))return[3,12];if(s=!(null==(r=this.ZDt)?void 0:r.CRt()),!this.DDt||!s)return[3,5];a.label=1;case 1:return this.DDt.$It?[4,this.DDt.iRt]:[3,3];case 2:return a.sent(),[3,1];case 3:return[4,this.DDt.AQ()];case 4:a.sent(),a.label=5;case 5:if(u=!(null==(e=this.$Dt)?void 0:e.CRt()),!this.BDt||!u)return[3,10];a.label=6;case 6:return(null==(o=this.BDt)?void 0:o.$It)?[4,this.BDt.iRt]:[3,8];case 7:return a.sent(),[3,6];case 8:return[4,null==(h=this.BDt)?void 0:h.AQ()];case 9:a.sent(),a.label=10;case 10:return[4,this.iq.EZ(i)];case 11:return a.sent(),[3,21];case 12:return this.YDt(),this.JDt(),this.DDt?[4,this.DDt.zg()]:[3,14];case 13:a.sent(),this.DDt=void 0,a.label=14;case 14:return this.BDt?[4,this.BDt.zg()]:[3,16];case 15:a.sent(),this.BDt=void 0,a.label=16;case 16:this.TL.x9(),a.label=17;case 17:return a.trys.push([17,,20,21]),[4,this.TL.hr()];case 18:return a.sent(),c=this,[4,this.TL.Un(i)];case 19:return c.iq=a.sent(),this.FDt.Xy(),this.iq.Q3&&this.ZDt&&(this.iq.Q3.wn(LR.lZ,this.Rs),this.DDt=new zz(this.iq.Q3,this.TL,n,this.hBt)),this.iq.K3&&this.$Dt&&(this.iq.K3.wn(LR.lZ,this.Rs),this.BDt=new zz(this.iq.K3,this.TL,t,this.hBt)),"live"===this.pCt.b0&&this.iq.C4(1/0),[3,21];case 20:return this.TL.I9(),[7];case 21:return[2]}})}).call(this)},i.QDt=function(){!this.jDt||this.w7||this.eBt||this.aBt||this.uBt||(this.Rz.Tn(),this.cBt=new hr,this.$Dt&&this.BDt&&(this.aBt=this.dBt(this.$Dt,this.BDt,this.cBt.Yg).catch(this.e8)),this.ZDt&&this.DDt&&(this.uBt=this.dBt(this.ZDt,this.DDt,this.cBt.Yg).catch(this.e8)))},i.KDt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Rz.Xx(),this.cBt&&(this.cBt.Zg(),this.cBt=void 0),this.aBt?[4,this.aBt]:[3,2];case 1:t.sent(),this.aBt=void 0,t.label=2;case 2:return this.uBt?[4,this.uBt]:[3,4];case 3:t.sent(),this.uBt=void 0,t.label=4;case 4:return[2]}})}).call(this)},i.dBt=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c,a,f,v,d;return zt(this,function(l){switch(l.label){case 0:return[4,this.W];case 1:l.sent(),l.label=2;case 2:return t.$It?[4,gr(t.iRt,i)]:[3,4];case 3:return l.sent(),[3,2];case 4:return n.$It?[4,gr(n.iRt,i)]:[3,6];case 5:return l.sent(),[3,4];case 6:return t.CRt()?[3,13]:(r=Vn.Mg()/1e3,e="now"===t.PRt,[4,t.DRt()]);case 7:return s=l.sent(),u=s.initialization,o=s.data,h=s.metadata,c={Km:FR.vZ,ck:u},a=o?{Km:FR.vZ,ck:o}:void 0,f=n.IP,!Vn.Zs.wp&&!this.TL.CL.RL&&h&&f.An(f.V-1)>h.xet?[4,n._S(h.xet,1/0)]:[3,9];case 8:l.sent(),l.label=9;case 9:return[4,n.z2(c)];case 10:return l.sent(),a?[4,n.H2(a,h,t.kot)]:[3,12];case 11:l.sent(),l.label=12;case 12:v=n.IP.UM(f),e&&v.V>0&&this.UDt.OIt(r,v.An(v.V-1)),l.label=13;case 13:return t.ERt?[3,15]:(dr(i),d=t.URt(),[4,gr(n.appendStream(d,t),i)]);case 14:return l.sent(),[3,13];case 15:return[2]}})}).call(this)},i.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.rV.Zg(),this.Dpt?[4,this.Dpt.catch(di)]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.w7?(this.m7.Zg(),this.YDt(),this.JDt(),[4,this.w7.catch(di)]):[3,4];case 3:t.sent(),t.label=4;case 4:return this.eBt?(this.iBt.Zg(),this.YDt(),this.JDt(),[4,this.eBt.catch(di)]):[3,6];case 5:t.sent(),t.label=6;case 6:return[4,this.KDt()];case 7:return t.sent(),this.ZDt?[4,this.ZDt.zg()]:[3,9];case 8:t.sent(),t.label=9;case 9:return this.$Dt?[4,this.$Dt.zg()]:[3,11];case 10:t.sent(),t.label=11;case 11:return this.ZDt=void 0,this.$Dt=void 0,this.FDt.Zg(),this.ODt.Zg(),this.iq?[4,this.TL.hr()]:[3,13];case 12:t.sent(),this.iq=void 0,t.label=13;case 13:return this.DDt=void 0,this.BDt=void 0,this.TL.mn(Ey.TM,this.IL),this.TL.mn(qX,this.updateActiveQualities),this.YL.hr(),this.NDt=void 0,this.$L.hr(),this.MDt=void 0,this.pCt=void 0,this.WDt&&(this.WDt.zg(),this.WDt=void 0),this.jDt=!1,[2]}})}).call(this)},Nt(n,[{key:"hR",get:function(){return this.pCt}},{key:"IP",get:function(){return this.DDt&&this.BDt?this.DDt.IP.Mn(this.BDt.IP):this.DDt?this.DDt.IP:this.BDt?this.BDt.IP:TA.iL()}},{key:"eDt",get:function(){return this.NDt}},{key:"nDt",get:function(){return this.MDt}},{key:"ht",get:function(){return this.YL}},{key:"rt",get:function(){return this.$L}},{key:"LDt",get:function(){return this.ODt.Qy}},{key:"W",get:function(){return this.FDt.Qy}},{key:"Sx",get:function(){return this.pCt?function(t,n,i){var r,e=null==(r=t.DCt[0])?void 0:r.MP,s=t.TCt;if(void 0===e||void 0===s)return i>0&&ii+2){var r=t-n;if(r<=this.lastAmountToSeekForward&&!this.oa.kx)return this.oa.MP+=r,this.lastAmountToSeekForward=0,!0;this.lastAmountToSeekForward=r}else this.lastAmountToSeekForward=0;return!1},i.cL=function(){return Vz(t.prototype.cL.call(this))},i.LL=function(){return!Vn.Zs.pp},n}(DA),QX=[eh.Jw,eh.Qw,eh._y,eh.Bw,eh.Kw,eh.gy,eh.Rw,eh.Lw,eh.Nw,eh.Pw,eh.Ew],YX=function(t){function n(n,i,r,e,s){var u,o;return(u=t.call(this)||this).TL=void 0,u.nV=void 0,u.oq=void 0,u.kq=void 0,u.bq=void 0,u.jW=void 0,u.lq=void 0,u.UDt=void 0,u.Cz=void 0,u.mBt=void 0,u._dt=void 0,u.Rz=void 0,u.Ac=void 0,u.vDt=void 0,u.Sz=!1,u.gBt=void 0,u.m7=new hr,u.w7=void 0,u.NEt=void 0,u.RBt=new hr,u.$et=!0,u.lBt=!1,u.YL=new Jb,u.$L=new Jb,u.Gl=void 0,u.hBt=void 0,u.ZW=void 0,u.JW=void 0,u.wBt=jT.lz,u.bBt=void 0,u.bd=function(){var t=u.IP;t.length>0&&u.hBt.qU(t.start(0))},u.vBt=function(){u.TL.hx!==u.$et&&(u.TL.hx?u.zx():u.Gx().catch(di))},u.GG=function(){u.lBt=!0},u.TBt=function(t){u.ZW=t.errorObject,u.JW=hg(u.ZW),u.ABt(u.ZW)},u._Bt=function(t){u.ZW=cg(t.lt),u.JW=t.lt,u.ABt(u.ZW)},u.TL=n,u.kq=new Uy(u,u.TL),u.bq=new Ly(u.kq,!0),u.nV=i,u.Rz=r,u.oq=new Nz(r.WY,r.kY.EW),u.lq=new Tb(i),u.TL.Eq=u.lq,s.allowNativeFullscreen?u.hBt=new kU(u.TL):u.hBt=new bU(u.TL),u.Gl=new Eb([u.hBt.Z]),u.UDt=new Bz,u.mBt=new pz(u),u.Cz=e,u._dt=Yu({},s.retryConfiguration,{maxRetries:null!=(o=s.retryConfiguration.maxRetries)?o:3}),u.OI(),u}Ct(n,t);var i=n.prototype;return i.OI=function(){this.TL.wn(QX,this.Rs),this.TL.wn(Ey.TM,this.GG),this.TL.wn([eh.uo,eh.jw],this.vBt),this.TL.wn(zm.ma,this._Bt),this.TL.wn(eh._y,this.bd),this.bq.wn(Iy,this.Rs)},i.MI=function(){this.TL.mn(QX,this.Rs),this.TL.mn(Ey.TM,this.GG),this.TL.mn([eh.uo,eh.jw],this.vBt),this.TL.mn(zm.ma,this._Bt),this.TL.mn(eh._y,this.bd),this.bq.mn(Iy,this.Rs)},i.jx=function(){return!1},i.Hx=function(){return this.TL.Ma},i.Aa=function(){return this.TL.mq},i.tI=function(t){return this.TL.wq(t)},i.we=function(){this.TL.we()},i.be=function(){return this.TL.be()},i.Yx=function(){},i.Jx=function(){},i.Qx=function(){},i.Kx=function(){},i.OP=function(t,n){var i=this;this.m7.Zg(),this.m7=new hr,this.w7=mr(function(n){return i.y7(t,n,i.w7)},this.m7)},i.pBt=function(){var t=this.hR;if(t){for(var n,i=new Date(t.creationDate).getTime(),r=NaN,e=Lt(t.presentations);!(n=e()).done;){var s=n.value;s.currentTime&&(r=s.currentTime.value/(s.currentTime.scale||1)*1e3)}if(!S(r))return new Date(i-r)}},i.yBt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.wBt!==jT.lz&&this.vDt?(this.vDt.Un(),this.wBt!==jT.OL&&this.wBt!==jT.TW?[3,2]:[4,this.vDt.LDt]):[2];case 1:t.sent(),"vod"===this.vDt.hR.b0&&this.vDt.Tn(),t.label=2;case 2:return[2]}})}).call(this)},i.Ta=function(t,n,i){return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return dr(i),[4,this.hr()];case 1:return e.sent(),dr(i),ZA(t)?(n=t,this.Ac=n,r=new yz(this.nV),this.bBt=this.SBt(t),this.jW=new jX(this,this.TL,this.bBt),this.jW.Rt=!0,this.jW.wn("latencyrecoveryseek",this.Rs),this.Fx.Ea(this.jW),this.vDt=new GX(n,r,this.TL,this.oq,this.nV,this.UDt,this.jW,this._dt,this,this.hBt,this.Rz),this.vDt.wn(eh.Ww,this.Rs),this.vDt.wn(zm.ma,this.TBt),this.YL.BI=this.vDt.ht,this.$L.BI=this.vDt.rt,this.lq.IW(t.contentProtection),kr(this.yBt()),[2]):(this.ZW=new fd(cd.SOURCE_INVALID,"HESP source incorrectly configured"),this.JW=hg(this.ZW),this.ABt(this.ZW),[2,ut.resolve()])}})}).call(this)},i.Px=function(t,n,i,r){return ut.resolve()},i.xx=function(){return ut.resolve()},i.SBt=function(t){return t.latencyConfiguration?t.latencyConfiguration:Hz()},i.Gx=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:return this.vDt?(this.$et=!1,this.vDt.Un(),[4,this.vDt.W]):[2];case 1:return i.sent(),this.So(new cT(this.MP)),n=this.vDt.ww(XX.Xz),this.oR(),[4,n];case 2:return i.sent(),this.vDt.Tn(),[4,this.TL.Gx()];case 3:return i.sent(),null==(t=this.jW)||t.Tn(),[2]}})}).call(this)},i.zx=function(){var t;this.vDt&&(this.$et=!0,this.So(new hT(this.MP)),this.vDt.Xx(),null==(t=this.jW)||t.Xx(),this.TL.zx())},i.oR=function(){var t=this;if(this.NEt)throw new y("Cannot seek while resetting");this.m7.Zg(),this.m7=new hr,this.w7=mr(function(n){return t.tBt(t.w7,n)},this.m7)},i.y7=function(t,n,i){return Vt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:if(this.NEt)throw new y("Cannot seek while resetting");return r=t,this.kBt(r),this.Sx.length>0&&(r=TA.jn(this.Sx).DM(r),this.kBt(r)),this.vDt?i?[4,i.catch(di)]:[3,2]:[2];case 1:u.sent(),dr(n),u.label=2;case 2:return u.trys.push([2,4,,5]),e=this.TL.ww(eh.Zw,n),this.TL.My(r),this.vDt.My(r),[4,e];case 3:return u.sent(),[3,5];case 4:throw lr(s=u.sent()),this.vDt.Xx(),this.EBt(),s;case 5:return this.PBt(),[2]}})}).call(this)},i.tBt=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:return this.So(new rh("golive")),i=this.XDt,this.kBt(i),this.vDt?t?[4,t.catch(di)]:[3,2]:[2];case 1:a.sent(),dr(n),a.label=2;case 2:return a.trys.push([2,11,,13]),r=this.jW.nL.targetOffset,[4,this.vDt.LDt];case 3:a.sent(),i&&r>=1?(this.jW.LL()||(s=b.min(1,.5*r),r-=s),e=i-r):e=this.XDt?this.XDt-.2:void 0,this.vDt.oR(e),a.label=4;case 4:return this.ikt.V>0?[4,this.vDt.ww(LR.lZ,n)]:[3,6];case 5:return a.sent(),[3,4];case 6:u=this.ikt,a.label=7;case 7:return 0!==this.ikt.UM(u).V?[3,9]:[4,this.vDt.ww(LR.lZ,n)];case 8:return a.sent(),[3,7];case 9:return e=this.ikt.Tn(this.ikt.V-1),e=this.xBt(e),this.kBt(e),o=this.TL.ww(eh.Zw,n),this.TL.My(e,!0),[4,o];case 10:return a.sent(),[3,13];case 11:if(vr(h=a.sent()))throw null==(c=this.jW)||c.Tn(),h;return this.vDt.Xx(),[4,this.vDt.VDt()];case 12:throw a.sent(),this.EBt(),h;case 13:return this.PBt(),[2]}})}).call(this)},i.kBt=function(t){this.Sz=!0,this.gBt=t,this.So(new dT(this.MP))},i.PBt=function(){this.Sz&&(this.gBt=void 0,this.Sz=!1,this.So(new lT(this.MP)))},i.EBt=function(){this.gBt=void 0,this.Sz=!1},i.xBt=function(t){return t},i.IBt=function(){var t;null==(t=this.vDt)||t.Xx()},i.ABt=function(t){this.So(new _b(t)),this.IBt()},i.MEt=function(t,n,i){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return dr(i),null==(r=this.jW)||r.Xx(),t?[4,t.catch(di)]:[3,2];case 1:e.sent(),e.label=2;case 2:return n?[4,n.catch(di)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[4,this.hBt.hr()];case 5:return e.sent(),this.vDt?[4,this.vDt.zg()]:[3,7];case 6:e.sent(),this.vDt=void 0,e.label=7;case 7:return dr(i),[4,this.TL.hr()];case 8:return e.sent(),dr(i),this.TL.Aq(),this.$L.hr(),this.YL.hr(),this.EBt(),this.bq.hr(),this.UDt.hr(),this.ZW=void 0,this.JW=void 0,this.$et=!0,this.lBt=!1,this.Ac=void 0,this.NEt=void 0,this.bBt=void 0,[2]}})}).call(this)},i.hr=function(){return this.m7.Zg(),this.m7=new hr,this.RBt.Zg(),this.RBt=new hr,this.NEt=this.MEt(this.w7,this.NEt,this.RBt.Yg).catch(function(t){return wr(t)}),this.NEt},i.kn=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:return this.MI(),this.bq.kn(),this.kq.zg(),this.Ac?[4,this.hr()]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.Vo(),this.TL.Eq=void 0,null==(t=this.jW)||t.mn("latencyrecoveryseek",this.Rs),null==(n=this.jW)||n.zg(),[4,this.hBt.kn()];case 3:return i.sent(),this.Gl.kn(),this.YL.kn(),this.$L.kn(),[2]}})}).call(this)},Nt(n,[{key:"ht",get:function(){return this.YL}},{key:"rt",get:function(){return this.$L}},{key:"hR",get:function(){var t,n;return null==(n=this.vDt)||null==(t=n.hR)?void 0:t.hR}},{key:"Mx",get:function(){return this.TL.Mx},set:function(t){this.TL.Mx=t}},{key:"Vx",get:function(){return!1},set:function(t){}},{key:"hq",get:function(){return this.oq}},{key:"$P",get:function(){return this.TL.$P},set:function(t){this.TL.$P=t}},{key:"MP",get:function(){var t;return null!=(t=this.gBt)?t:this.TL.MP},set:function(t){this.OP(t)}},{key:"CP",get:function(){var t=this.pBt();if(t)return new Date(t.getTime()+1e3*this.MP)},set:function(t){var n=this.pBt();t&&n&&(this.MP=n.getTime()-t.getTime())}},{key:"bt",get:function(){return this.Ac}},{key:"ux",get:function(){return this.TL.ux},set:function(t){this.TL.ux=t}},{key:"ct",get:function(){var t=this.TL.ct;return t===bi?1/0:t}},{key:"UP",get:function(){return!1}},{key:"WP",get:function(){return this.ZW}},{key:"lt",get:function(){return this.JW}},{key:"zP",get:function(){return this.mBt}},{key:"jP",get:function(){}},{key:"KP",get:function(){return!1}},{key:"JP",get:function(){return Yu({},{iO:0,eO:0,sO:0,nO:0,rO:0,hO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.TL.ZP())}},{key:"sx",get:function(){return!0}},{key:"kx",get:function(){return this.Sz}},{key:"nq",get:function(){}},{key:"nt",get:function(){return this.Gl}},{key:"Rx",get:function(){return this.TL.Rx}},{key:"Bx",get:function(){return this.TL.Bx}},{key:"IP",get:function(){return this.ikt._s()}},{key:"ikt",get:function(){return this.vDt?this.vDt.IP:TA.iL()}},{key:"_x",get:function(){return this.TL._x._s()}},{key:"Sx",get:function(){var t,n;return null!=(n=null==(t=this.vDt)?void 0:t.Sx._s())?n:TA.iL()._s()}},{key:"hx",get:function(){return this.$et}},{key:"rR",get:function(){return!0}},{key:"Fx",get:function(){return this.Cz}},{key:"XDt",get:function(){var t;return null==(t=this.vDt)?void 0:t.XDt}},{key:"BL",get:function(){if(!this.hx&&this.lBt){var t=this.MP,n=this.UDt.XIt(t);if(void 0!==n){var i=this.ikt,r=0;if(i.V>0){var e=i.An(i.V-1);r=b.max(e-t,0)}return b.max(n,r)}}}},{key:"eR",get:function(){var t;return null==(t=this.vDt)?void 0:t.eR}},{key:"sR",get:function(){var t;return null==(t=this.vDt)?void 0:t.sR}},{key:"nR",get:function(){var t;return null==(t=this.vDt)?void 0:t.nR}},{key:"Ax",get:function(){return this.TL.Ax}},{key:"mx",get:function(){return this.wBt},set:function(t){this.wBt=t,this.yBt()}}]),n}(th),KX=function(t){function n(n,i,r,e,s,u){var o;return(o=t.call(this,n,i,r,e,u)||this).xq=void 0,o.OBt=void 0,o.MBt=!1,o.CBt=!1,o.BBt=[],o.NBt=void 0,o.LBt=function(){var n=o.$P||0===o.Mx;"hidden"!==v.visibilityState||o.hx||!n||o.Aa().XL?"visible"===v.visibilityState&&o.MBt&&(o.CBt=!0,o.NBt=Vn.Og(function(){for(var n,i=Lt(o.BBt);!(n=i()).done;){var r=n.value;t.prototype.So.call(RW(o),r)}o.NBt=void 0,o.CBt=!1},2e3),kr(o.Gx()),o.MBt=!1):(o.zx(),o.MBt=!0)},o.xq=s,o.OBt=n,On.Cg&&v.addEventListener("visibilitychange",o.LBt),o}Ct(n,t);var i=n.prototype;return i.So=function(n){if(this.CBt){if(n.type===eh.Zw)return void this.DBt();if(n.type===Ey.SM||n.type===eh.$w||n.type===Ey.TM)return void this.BBt.push(n)}t.prototype.So.call(this,n)},i.DBt=function(){this.CBt=!1,void 0!==this.NBt&&Vn.Lg(this.NBt);var n=Ui(this.BBt,function(t){return t.type===Ey.TM});n&&t.prototype.So.call(this,n),Yi(this.BBt)},i.Wx=function(){if(cO(this.TL))return this.TL.Wx()},i.hr=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.MBt=!1,this.DBt(),[4,t.prototype.hr.call(n)];case 1:return i.sent(),[2]}})}).call(this)},i.kn=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return v.removeEventListener("visibilitychange",this.LBt),this.DBt(),[4,t.prototype.kn.call(n)];case 1:return i.sent(),[4,this.TL.zg()];case 2:return i.sent(),[4,this.xq.Pq(this.OBt)];case 3:return i.sent(),[2]}})}).call(this)},i.xBt=function(t){return On.X_&&On.Q_>=15&&On.Kv?t+.25:t},n}(YX);F(),Et(),Wt(),Bt(),Qt();var JX=function(){function t(){}var n=t.prototype;return n.Xq=function(t,n){return Vt(function(){return zt(this,function(n){return[2,ZX(t.type)]})})()},n.jq=function(t){return Vt(function(){return zt(this,function(n){return[2,Dp(t)]})})()},Nt(t,[{key:"Kq",get:function(){return kb._R}}]),t}();function ZX(t){if(!t)return!1;var n=t.toLowerCase();return Uo(n,hA.vR)||Uo(n,hA._R)}var $X=function(t){function n(){return t.apply(this,arguments)||this}Ct(n,t);var i=n.prototype;return i.PR=function(t,n,i,r,e,s,u){var o=new IO(n),h=o.Gq(ig.Bk);return new KX(h,i,e,s,o,r)},i.Xq=function(n,i){return Vn.dP&&zd?On.w_||On.S_||On.D_?ut.resolve(!1):De(n.useManagedMediaSource)?t.prototype.Xq.call(this,n,i):ut.resolve(!1):ut.resolve(!1)},i.Qq=function(){return!1},n}(JX);XT(new $X),F(),Et(),Wt(),Bt(),Dt(),H(),Qt(),F(),Et(),Wt(),Dt(),Qt();var tq=function(t){function n(n,i,r,e,s,u){var o;return(o=t.call(this,n,i,r,e,u)||this).xq=void 0,o.xq=s,o}Ct(n,t);var i=n.prototype;return i.Wx=function(){if(cO(this.TL))return this.TL.Wx()},i.kn=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.prototype.kn.call(n)];case 1:return i.sent(),[4,this.xq.Pq(this.TL)];case 2:return i.sent(),[2]}})}).call(this)},n}(YX),nq=function(t){function n(){return t.apply(this,arguments)||this}Ct(n,t);var i=n.prototype;return i.Xq=function(n,i){var r=this;return Vt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return On.IS_IOS_CHROME?[2,!1]:[4,t.prototype.Xq.call(r,n,i)];case 1:if(u=h.sent(),!(null!=(o=null==(s=Rr())||null==(e=s.canPlayType)?void 0:e.call(s,hA.dR))?o:"")||!u||!("serviceWorker"in l))return[2,!1];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,Tr(l.serviceWorker.ready,1e3)];case 3:return h.sent(),[2,!0];case 4:return h.sent(),[2,!1];case 5:return[2]}})})()},i.jq=function(n){var i=this;return Vt(function(){return zt(this,function(r){switch(r.label){case 0:return n.fairplay?[4,t.prototype.jq.call(i,n)]:[2,!1];case 1:return[2,r.sent()]}})})()},i.PR=function(t,n,i,r,e,s,u){if(V(t,HTMLDivElement)){var o=n.dst(ig.Bk);return new tq(o,i,e,s,n,r)}throw new fd(cd.CONFIGURATION_ERROR,"Container Div element expected.")},i.Qq=function(){return!1},Nt(n,[{key:"Kq",get:function(){return kb.bW}}]),n}(JX);On.X_&&On.ru&&XT(new nq),F(),Et(),F(),Et(),F(),Et(),Wt(),Bt(),Dt(),H(),at(),Ut(),Qt(),F(),Et(),Bt();var iq="theo_live_user_id",rq=function(){function t(t){this.externalId=void 0,this.id=void 0,this.userId=void 0,this.yb=void 0,this.externalId=t,this.id=qE(),this.userId=eq(),this.yb=0}return t.prototype.incrementSequenceNumber=function(){this.yb+=1},Nt(t,[{key:"sequenceNumber",get:function(){return this.yb}}]),t}();function eq(){try{var t=localStorage.getItem(iq);if(t)return t;var n=qE();return localStorage.setItem(iq,n),n}catch(t){return qE()}}function sq(t){var n;return{hespSrc:t.hespSrc,type:"theo.live",hlsSrc:t.hlsSrc,maxMobileBitrate:t.maxMobileBitrate,targetLatency:null==(n=t.metadata.customization)?void 0:n.targetLatency,contentProtection:t.drmConfig?t.drmConfig:void 0}}function uq(t){var n=t.integration,i=t.widevine,r=t.playready,e=t.fairplay;return Yu({integration:n},i&&{widevine:{licenseAcquisitionURL:i.licenseUrl}},r&&{playready:{licenseAcquisitionURL:r.licenseUrl}},e&&{fairplay:{licenseAcquisitionURL:e.licenseUrl,certificateURL:e.certificateUrl}})}function oq(t,n){return{id:t.id,name:t.name,deleted:"deleted"===t.status,targetLatency:t.source.targetLatency,maxMobileBitrate:t.source.maxMobileBitrate,endpoints:[{hespSrc:t.source.hespSrc,hlsSrc:t.source.hlsSrc,weight:1,priority:1,contentProtection:t.source.contentProtection},t.fallback&&n?{hespSrc:t.fallback.hespSrc,hlsSrc:t.fallback.hlsSrc,weight:1,priority:2,contentProtection:t.fallback.contentProtection}:void 0].filter(Un)}}F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),F(),Et(),Wt(),at(),Qt(),F(),Et();var hq=function(t){return t.STARTING="s",t.PLAYING="p",t.SEEKING="k",t.REBUFFERING="r",t.PAUSED="a",t.ENDED="e",t.QUIT="q",t}({}),cq=function(t){return t.MANIFEST="m",t.AUDIO="a",t.VIDEO="v",t.OTHER="o",t}({});function aq(t){return 100*b.round(t/100)}function fq(t){for(var n=t.LP(),i=t.RP(),r=0;r0&&void 0!==i&&void 0!==n&&(this.VBt+=1,this.HBt=this.WBt(this.HBt,i),this.qBt=this.WBt(this.qBt,1e3*this.oa.Fx.Cd.targetOffset),this.rq=this.WBt(this.rq,1e3*n),this.zBt=this.WBt(this.zBt,t/1e3))},n.WBt=function(t,n){return t+(n-t)/this.VBt},n.PR=function(){var t={sta:this.Vp,ts:this.FBt,"theo-vt":this.GBt,"theo-at":this.XBt,"theo-d":this.ct,"theo-r":this._f,"theo-e":this.JW};return this.VBt>0?Yu({},t,{bl:aq(this.HBt),tbl:aq(this.qBt),ltc:aq(this.rq),mtp:aq(this.zBt),"theo-w":this.VBt}):t},n.jBt=function(){return new t(this.Vp,this.oa,this._f)},t.starting=function(n,i,r){return new t(hq.STARTING,n,i,r)},t.playing=function(n){return new t(hq.PLAYING,n)},t.seeking=function(n,i){return new t(hq.SEEKING,n,i)},t.rebuffering=function(n,i){return new t(hq.REBUFFERING,n,i)},t.paused=function(n){return new t(hq.PAUSED,n)},t.ended=function(n){return new t(hq.ENDED,n)},t.quit=function(n){return new t(hq.QUIT,n)},Nt(t,[{key:"ct",get:function(){return Date.now()-this.FBt}}]),t}(),gq=function(){function t(t,n,i){var r=this;this.oa=void 0,this.tNt=void 0,this.rNt=void 0,this.vNt=void 0,this.YBt=void 0,this.eNt=[],this.KBt=void 0,this.lBt=!1,this.nX=!1,this.cNt=function(t){var n,i,e;r.sNt(wq.starting(r.oa,"fallback",null!=(e=null==(n=t.reason)?void 0:n.message)?e:null==(i=r.oa.qP())?void 0:i.message))},this.dNt=function(){r.sNt(wq.starting(r.oa,"loadChannel"))},this.lNt=function(){r.sNt(wq.ended(r.oa))},this.GW=function(t){t.Ht.wn(Dw.TI,r.ih)},this.ih=function(){var t,n,i,e,s=null==(n=vq(r.oa.rt))||null==(t=n.XI)?void 0:t.o,u=null==(e=vq(r.oa.ht))||null==(i=e.XI)?void 0:i.o;s&&u&&(r.KBt&&r.KBt.Vp===hq.PLAYING&&r.KBt.GBt===s&&r.KBt.XBt===u||r.sNt(wq.playing(r.oa)))},this.IL=function(){r.lBt=!0,r.nX=!1,r.sNt(wq.playing(r.oa))},this.aNt=function(){r.lBt&&!r.nX&&(r.nX=!0,r.sNt(wq.seeking(r.oa,"latencyRecovery")))},this.uNt=function(){r.lBt&&!r.nX&&(r.nX=!0,r.sNt(wq.seeking(r.oa,"goLive")))},this.xL=function(){r.oa.kx||r.sNt(wq.rebuffering(r.oa,"visible"===v.visibilityState?void 0:"invisible"))},this.oNt=function(){r.sNt(wq.paused(r.oa))},this.fNt=function(t){var n=Vn.Dh(t.url),i=function(t){var n=t.pathname;if(Fo(n,"manifest.json"))return cq.MANIFEST;if(Lo(n,"/video/"))return cq.VIDEO;if(Lo(n,"/audio/"))return cq.AUDIO;return cq.OTHER}(n);if(i!==cq.OTHER){r.YBt.incrementSequenceNumber();var e=Yu({},t.headers,{"CMCD-Request":r.QBt(),"CMCD-Object":r.JBt(i),"CMCD-Status":r.ZBt(),"CMCD-Session":r.$Bt()});i===cq.VIDEO&&!Fo(n.pathname,".hspi")&&r.KBt&&(r.sNt(r.KBt.jBt()),e=Yu({},e,r.iNt())),t.redirect(Yu({},t,{headers:e}))}},this.hNt=function(){kr(r.nNt())},this.oa=t,this.tNt=n,this.YBt=i;var e=n.endpoints[0],s=(null==e?void 0:e.hespSrc)||(null==e?void 0:e.hlsSrc)||"";this.rNt=Vn.Dh("bye",s).href,f.addEventListener("beforeunload",this.hNt),this.oa.wn(Ey.TM,this.IL),this.oa.wn(Ey.SM,this.xL),this.oa.wn(eh.jw,this.oNt),this.oa.zP.wn("latencyrecoveryseek",this.aNt),this.oa.zP.wn("golive",this.uNt),this.oa.oX.gY(this.fNt),this.oa.rt.wn(Sw.eI,this.GW),this.oa.ht.wn(Sw.eI,this.GW),this.oa.tnt.addEventListener("intenttofallback",this.cNt),this.oa.tnt.addEventListener("distributionloadstart",this.dNt),this.oa.tnt.addEventListener("distributionoffline",this.lNt),this.KBt=wq.starting(this.oa,"loadchannel"),this.vNt=Vn.fm(function(){var t;null==(t=r.KBt)||t.UBt()},1e3)}var n=t.prototype;return n.QBt=function(){var t,n=this.oa.Fx.BL,i=fq(this.oa),r=this.oa.oX.kY.kW;return _q({bl:void 0!==i?aq(i):void 0,tbl:aq(1e3*this.oa.Fx.Cd.targetOffset),ltc:void 0!==n?aq(1e3*n):void 0,mtp:void 0!==r?aq(r/1e3):void 0,sta:null==(t=this.KBt)?void 0:t.Vp,su:!this.lBt||void 0,"theo-sq":this.YBt.sequenceNumber})},n.JBt=function(t){var n,i,r=function(t,n){switch(n){case cq.VIDEO:return vq(t.rt);case cq.AUDIO:return vq(t.ht)}}(this.oa,t);return _q({br:(null==r||null==(n=r.XI)?void 0:n.kW)?aq((null==r||null==(i=r.XI)?void 0:i.kW)/1e3):void 0,ot:t,tb:r?aq(lq(r).kW/1e3):void 0,lb:r?aq(dq(r).kW/1e3):void 0})},n.ZBt=function(){return _q({"theo-cw":this.oa.xe.clientWidth,"theo-ch":this.oa.xe.clientHeight,"theo-m":this.oa.$P,"theo-vo":b.ceil(100*this.oa.Mx)})},n.$Bt=function(){var t;return _q({sf:mq(this.oa.bt),sid:this.YBt.id,st:"l",v:2,"theo-eid":null==(t=this.YBt.externalId)?void 0:t.substring(0,128),"theo-cn":this.tNt.name.substring(0,128),"theo-v":"10.0.0","theo-t":"web","theo-u":this.YBt.userId})},n.iNt=function(){var t={"CMCD-States":btoa(JSON.stringify(this.eNt))};return this.eNt=[],t},n.sNt=function(t){this.KBt&&this.eNt.push(this.KBt.PR()),this.KBt=t},n.nNt=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return this.KBt&&(this.eNt.push(this.KBt.PR()),this.KBt=void 0),this.eNt.push(wq.quit(this.oa).PR()),t=Yu({},this.iNt(),{"CMCD-Session":this.$Bt()}),[4,this.oa.SP.lk({Yu:this.rNt,fk:t,Qk:!0})];case 1:return[4,n.sent().ck()];case 2:return n.sent(),[2]}})}).call(this)},n.destroy=function(){var t=this;this.hNt(),f.removeEventListener("beforeunload",this.hNt),this.oa.mn(Ey.TM,this.IL),this.oa.mn(Ey.SM,this.xL),this.oa.mn(eh.jw,this.oNt),this.oa.zP.mn("latencyrecoveryseek",this.aNt),this.oa.zP.mn("golive",this.uNt),this.oa.rt.mn(Sw.eI,this.GW),this.oa.ht.mn(Sw.eI,this.GW),this.oa.rt.II.forEach(function(n){return n.mn(Dw.TI,t.ih)}),this.oa.ht.II.forEach(function(n){return n.mn(Dw.TI,t.ih)}),this.oa.tnt.removeEventListener("intenttofallback",this.cNt),this.oa.tnt.removeEventListener("distributionloadstart",this.dNt),this.oa.tnt.removeEventListener("distributionoffline",this.lNt),this.oa.oX.wY(this.fNt),Vn.vm(this.vNt)},t}();function _q(t){return k.keys(t).map(function(n){return function(t,n){switch(void 0===n?"undefined":W(n)){case"boolean":return n?t:t+"=false";case"number":return t+"="+n;case"string":return t+'="'+n+'"';default:return}}(n,t[n])}).filter(Boolean).sort().join(",")}function mq(t){if(t)return t.type===hA.dR||t.type===hA.lR?"h":t.type===hA._R?"e":void 0}var yq=function(t){function n(n,i,r){var e;return(e=t.call(this,n,"Could not load channel with id "+i+": "+r)||this).channelId=void 0,e.reason=void 0,e.channelId=i,e.reason=r,e}return Ct(n,t),n}(fd),pq=function(t){function n(n){return t.call(this,cd.THEO_LIVE_CHANNEL_NOT_FOUND,n,"The channel could not be found")||this}return Ct(n,t),n}(yq),kq=function(t){function n(n){return t.call(this,cd.THEO_LIVE_CHANNEL_NOT_FOUND,n,"This account has been locked")||this}return Ct(n,t),n}(yq),bq=function(t){function n(n){return t.call(this,cd.THEO_LIVE_CHANNEL_NOT_FOUND,n,"The channel got deleted")||this}return Ct(n,t),n}(yq),Aq=function(){function t(t,n){this.nV=void 0,this.gNt=void 0,this._Nt=void 0,this.nV=t,this.gNt=n,this._Nt=new Map}return t.prototype.Bgt=function(t){var n=this._Nt.get(t);if(n)return n;var i=new Tq(t,this.nV,this.gNt);return this._Nt.set(t,i),i},t}(),Tq=function(){function t(t,n,i){var r;this.hS=void 0,this.nV=void 0,this.gNt=void 0,this.mNt=void 0,this.yNt=void 0,this.wNt=void 0,this.bNt=void 0,this.hS=t,this.nV=n,this.gNt=i,this.bNt=new Ld,this.gNt.discoveryHeader&&this.bNt.append("x-theolive-discovery",this.gNt.discoveryHeader),this.bNt.set("CMCD-Session",_q({sid:this.gNt.sessionId,st:"l",v:2,"theo-eid":null==(r=this.gNt.externalSessionId)?void 0:r.substring(0,128),"theo-v":"10.0.0","theo-t":"web","theo-u":this.gNt.userId})),this.er()}var n=t.prototype;return n.er=function(){var t=this;this.wNt=!1,this.mNt=ce(),this.yNt=this.RSt(),this.yNt.catch(function(){return t.wNt=!0})},n.RSt=function(){return Vt(function(){var t,n,i,r,e,s,u,o,h,c,a;return zt(this,function(f){switch(f.label){case 0:t=Lt(this.gNt.discoveryUrls),f.label=1;case 1:return(n=t()).done?[3,8]:(i=n.value,[4,this.ANt(this.hS,i,this.bNt)]);case 2:if(!(r=f.sent()))return[3,7];if(!function(t){return void 0!==t.mode}(r))return[3,6];if(e=r.mode,s=r.status,u=r.fallback,o=r.metadata,"locked"===e)throw new kq(this.hS);if("deleted"===s)throw new bq(this.hS);return c={id:this.hS,name:o.name,mode:e,status:s,source:sq(r)},u?[4,this.SNt(u,i,this.bNt)]:[3,4];case 3:return a=f.sent(),[3,5];case 4:a=void 0,f.label=5;case 5:return[2,oq.apply(void 0,[(c.fallback=a,c.insights=null==o?void 0:o.insights,c.enhancedLogging=null==o?void 0:o.enhancedLogging,c.customization=null==o?void 0:o.customization,c.sseEndpoint=r.sseEndpoint,c),null==(h=this.gNt.fallbackEnabled)||h])];case 6:return[2,r];case 7:return[3,1];case 8:throw new pq(this.hS)}})}).call(this)},n.SNt=function(t,n,i){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return"theo.live"!==t.type?[2,{hespSrc:t.src,type:t.type}]:[4,this.ANt(t.src,n,i)];case 1:return(r=e.sent())?[2,sq(r)]:[2,void 0]}})}).call(this)},n.ANt=function(t,n,i){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),(r=Vn.Dh(t,n)).searchParams.set("osName",function(){var t=Vn.Zs.ap;if("ios"===t||"macos"===t)return"apple";return t}()),r.searchParams.set("deviceType",Vn.Zs.cp),r.searchParams.set("sdkType","web"),[4,this.nV.lk({Yu:r.toString(),fk:i})];case 1:return[4,e.sent().FT()];case 2:return[2,e.sent()];case 3:return e.sent(),[2,void 0];case 4:return[2]}})}).call(this)},Nt(t,[{key:"pNt",get:function(){return ce()-this.mNt>36e5}},{key:"TNt",get:function(){return(this.wNt||this.pNt)&&this.er(),this.yNt}}]),t}();F(),Et(),Wt(),Bt(),Dt(),Qt();var Sq=function(t){function n(n){var i;return(i=t.call(this,"distributionloadstart")||this).distributionId=void 0,i.distributionId=n,i}return Ct(n,t),n}(rh),Eq=function(t){function n(n){var i;return(i=t.call(this,"distributionoffline")||this).distributionId=void 0,i.distributionId=n,i}return Ct(n,t),n}(rh),Iq=function(t){function n(n){var i;return(i=t.call(this,"endpointloaded")||this).endpoint=void 0,i.endpoint=n,i}return Ct(n,t),n}(rh),Rq=function(t){function n(n){var i;return(i=t.call(this,"intenttofallback")||this).reason=void 0,i.reason=n,i}return Ct(n,t),n}(rh),Cq=function(t){function n(){return t.call(this,"enterbadnetworkmode")||this}return Ct(n,t),n}(rh),Dq=function(t){function n(){return t.call(this,"exitbadnetworkmode")||this}return Ct(n,t),n}(rh),Pq=function(t){function n(n){var i;return(i=t.call(this)||this).oa=void 0,i.hu=void 0,i.oa=n,i}return Ct(n,t),n.prototype.PNt=function(t){return this.oa.PNt(t)},Nt(n,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{addEventListener:function(n,i){t.wn(n,i)},removeEventListener:function(n,i){t.mn(n,i)},get badNetworkMode(){return t.kNt},set badNetworkMode(n){t.kNt=n},get authToken(){return t.ENt},set authToken(n){t.ENt=n},preloadPublications:function(n){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.PNt(n)];case 1:return[2,i.sent().map(function(t){return{name:t.name}})]}})})()}}}(this)),this.hu}},{key:"kNt",get:function(){return this.oa.kNt},set:function(t){this.oa.kNt=t}},{key:"ENt",get:function(){return this.oa.ENt},set:function(t){this.oa.ENt=t}}]),n}(th);var Nq=["https://discovery.theo.live/channels/"],Bq=8e5,xq=function(t){function n(n,i){var r,e;(r=t.call(this,n,i)||this).DNt=void 0,r.YBt=void 0,r.qNt=void 0,r.GNt=void 0,r.XNt=void 0,r.Ac=void 0,r.fz=void 0,r.zNt=void 0,r.tNt=void 0,r.JNt=void 0,r.jDt=!1,r.Lz=void 0,r.JW=void 0,r.nT=new hr,r.RNt=void 0,r.lBt=!1,r.n7=!1,r.KNt=void 0,r.ZNt=void 0,r.MNt=void 0,r.NNt=void 0,r.$Nt=[],r.FNt=!1,r.HNt=void 0,r.LNt=!0,r.CNt=0,r.ONt=void 0,r.GW=function(t){var n,i,e=t.Ht,s=null==(n=r.tNt)?void 0:n.maxMobileBitrate;void 0!==s&&Vn.Zs.Ks&&e.KI.II.filter(function(t){return t.kW>s}).forEach(function(t){return e.KI._S(t)});e.wn(Dw.TI,r.ih);var u=Oq(null!=(i=e.YI)?i:e.KI.II);e.YI=u.length>0?u:Oq(e.KI.II)},r.ih=function(t){var n,i=t.kot;(!i||(null!=(n=i.tyt)?n:i.kW)>=Bq)&&r.VNt()},r.aNt=function(){r.UNt(),r.$Nt.push(Vn.Mg()),r.$Nt=r.$Nt.filter(function(t){return Vn.Mg()-t<=3e5}),r.$Nt.length>=3&&(r.$Nt=[],r.DNt.So(new Rq(new fd(cd.THEO_LIVE_UNKNOWN_ERROR,"Unstable playback detected."))),kr(r.BNt()))},r.WNt=function(t){r.jDt&&r.HNt&&("manifest"!==t.type&&"segment"!==t.type||(t.headers.Authorization="Bearer "+r.HNt,t.redirect(t)))},r.DNt=new Pq(r);var s,u,o,h=n.Cd.theoLive;return r.GNt={sessionId:null!=(s=null==h?void 0:h.sessionId)?s:qE(),userId:null!=(u=null==h?void 0:h.userId)?u:eq(),externalSessionId:null==h?void 0:h.externalSessionId,analyticsEnabled:!1!==(null==h?void 0:h.analyticsEnabled),fallbackEnabled:!1!==(null==h?void 0:h.fallbackEnabled),discoveryUrls:[].concat([null==h?void 0:h.discoveryUrl],null!=(o=null==h?void 0:h.discoveryUrls)?o:[],Nq).filter(Un).map(function(t){return t.lastIndexOf("/")===t.length-1?t:t+"/"})},r.YBt=new rq(null==(e=r.GNt)?void 0:e.externalSessionId),r.qNt=new Aq(n.SP,r.GNt),r.oa.zP.wn("latencyrecoveryseek",r.aNt),r}Ct(n,t);var i=n.prototype;return i.xNt=function(){this.oa.zP.wn("latencyrecoveryseek",this.aNt),this.oa.rt.wn(Sw.eI,this.GW)},i.INt=function(){this.oa.zP.mn("latencyrecoveryseek",this.aNt),this.oa.rt.mn(Sw.eI,this.GW)},i.$x=function(n){var i=this;if(!this.jDt||this.JW||this.Lz)return t.prototype.$x.call(this,n);if(n.type===Ey.TM)return void 0!==this.RNt?(Vn.Lg(this.RNt),this.RNt=void 0,this.lBt||this.So(new Oy(this.LP()))):this.So(new Oy(this.LP())),this.CNt=0,this.lBt=!0,!0;if(n.type===Ey.SM)return this.RNt||(this.RNt=Vn.Og(function(){i.So(new Ny(i.LP())),i.RNt=void 0},100)),!0;if(n.type===zm.ma){var r;this.CNt++;var e=(null==(r=this.fz)?void 0:r.src)&&Uq(this.fz.src),s=this.CNt>5;return e||s?(this.dispatchErrorEvent(n.errorObject),!0):(this.DNt.So(new Rq(n.errorObject)),kr(this.BNt()),!0)}if(n.type===eh.uo){if(this.NNt=Vn.Mg(),void 0===this.MNt&&(this.MNt=Vn.fm(function(){var t;Vn.Mg()-(null!=(t=i.NNt)?t:0)>15e3&&(i.DNt.So(new Rq(new fd(cd.THEO_LIVE_UNKNOWN_ERROR,"Indefinite stall detected"))),kr(i.BNt()))},1e3)),this.oa.bt&&(this.LNt=!1),this.LNt)return!0}else if(n.type===eh.jw){if(void 0!==this.MNt&&(Vn.vm(this.MNt),this.MNt=void 0),this.oa.bt&&(this.LNt=!0),!this.LNt)return!0}else n.type===eh._y?this.NNt=Vn.Mg():n.type===Ey.bM?this.ONt&&(!function(t,n){var i=Ui(t.rt.II,function(t){return t.o===n.enabledVideoTrackId}),r=Ui(t.rt.II,function(t){return t.Rt});if(i){var e;r&&r.o===i.o||(i.Rt=!0),i.YI=null==(e=n.targetVideoQualities)?void 0:e.map(function(t){return Ui(i.KI.II,function(n){return n.o===t})}).filter(Un)}else r&&(r.Rt=!1);var s=Ui(t.ht.II,function(t){return t.o===n.enabledAudioTrackId}),u=Ui(t.ht.II,function(t){return t.Rt});s?u&&u.o===s.o||(s.Rt=!0):u&&(u.Rt=!1);for(var o,h=Lt(t.nt.II);!(o=h()).done;){var c,a=o.value,f=null!=(c=n.textTrackModes.get(a.o))?c:Hm.Nh;a.Xk!==f&&(a.Xk=f)}}(this.oa,this.ONt),this.ONt=void 0):n.type===eh.ey&&(this.DNt.So(new Rq(new fd(cd.THEO_LIVE_UNKNOWN_ERROR,"manifest not found"))),kr(this.BNt()));return t.prototype.$x.call(this,n)},i.int=function(){return this.DNt.Ca},i.HP=function(){return this.jDt?this.Lz:t.prototype.HP.call(this)},i.qP=function(){return this.jDt?this.JW:t.prototype.qP.call(this)},i.UNt=function(){if(!this.FNt&&(this.FNt=!0,this.DNt.So(new Cq),0!==this.oa.rt.V)){var t,n=this.rt.CI(0),i=tr(n.KI.II,function(t){return t.kW});(null!=(t=i.tyt)?t:i.kW)0?i:Oq(n.KI.II)}},i.PNt=function(t){var n=this;return ut.all(t.map(function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,gr(this.qNt.Bgt(t).TNt,this.nT.Yg)];case 1:return[2,n.sent()]}})}).call(n)}))},i.nu=function(){var n;return null!=(n=this.Ac)?n:t.prototype.nu.call(this)},i.Ta=function(n,i){var r=this,e=function(){return t.prototype.Ta};return Vt(function(){var t,s,u,o,h,c,a;return zt(this,function(f){switch(f.label){case 0:this.jDt=!1,s=Lt(null!=(t=null==n?void 0:n.sources)?t:[]),f.label=1;case 1:return(u=s()).done?[3,8]:sT(o=u.value)&&o.type===hA.pR&&o.src?(this.jDt=!0,this.Ac=n,this.fz=o,this.DNt.So(new Sq(o.src)),this.xNt(),Uq(o.src)?(h=Yu({},n,{sources:[Yu({},o,{type:hA._R,useManagedMediaSource:!0})]}),[4,e().call(r,h,i)]):[3,3]):[3,7];case 2:return f.sent(),[2];case 3:this.zNt=this.qNt.Bgt(o.src),f.label=4;case 4:return f.trys.push([4,6,,7]),[4,this.zNt.TNt];case 5:return c=f.sent(),this.tNt=c,this.GNt.analyticsEnabled&&(this.XNt=new gq(this,c,this.YBt)),[2];case 6:throw lr(a=f.sent()),this.jNt(),a;case 7:return[3,1];case 8:return[4,e().call(r,n,i)];case 9:return[2,f.sent()]}})}).call(this)},i.ox=function(){return this.jDt?this.LNt:t.prototype.ox.call(this)},i.Gx=function(){this.n7||(this.n7=!0,this.QNt(!1)),this.LNt=!1,t.prototype.Gx.call(this)},i.zx=function(){this.LNt=!0,t.prototype.zx.call(this)},i.BNt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return null!=this.ONt||(this.ONt=function(t){var n,i,r=Ui(t.rt.II,function(t){return t.Rt}),e=null==r?void 0:r.o,s=null==r||null==(n=r.YI)?void 0:n.map(function(t){return t.o}),u=null==(i=Ui(t.ht.II,function(t){return t.Rt}))?void 0:i.o,o=Ju();return t.nt.II.forEach(function(t){return o.set(t.o,t.Xk)}),{enabledVideoTrackId:e,targetVideoQualities:s,enabledAudioTrackId:u,textTrackModes:o}}(this.oa)),[4,this.oa.Xx().catch(di)];case 1:return t.sent(),this.QNt(!0),[2]}})}).call(this)},i.QNt=function(t){var n=this;if(this.zNt&&!this.KNt){this.jNt();var i=function(){n.KNt=void 0};this.KNt=this.YNt(this.zNt,t).then(i).catch(i)}},i.YNt=function(t,n){return Vt(function(){var i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return i=this,n&&t.er(),[4,t.TNt];case 1:return r=o.sent(),this.tNt=r,[4,this.selectEndpoint(r,this.JNt)];case 2:if(e=o.sent(),this.JNt=e,!e)return[3,7];s=this.convertEndpointToSource(r,e),o.label=3;case 3:return o.trys.push([3,5,,6]),[4,this.oa.Ta(s,(new hr).Yg)];case 4:return o.sent(),[3,6];case 5:return u=o.sent(),this.dispatchErrorEvent(u),this.jNt(),[2];case 6:return this.DNt.So(new Iq(e)),this.LNt||this.oa.Gx(),[3,8];case 7:this.DNt.So(new Eq(r.id)),this.ZNt=Vn.Og(function(){return i.QNt(!0)},15e3),o.label=8;case 8:return[2]}})}).call(this)},i.convertEndpointToSource=function(t,n){var i,r,e={sources:[this.getHespSource(t,n),this.getHlsSource(n)].filter(Un),ads:this.lBt?[]:null==(i=this.Ac)?void 0:i.ads,blockContentIfAdError:null==(r=this.Ac)?void 0:r.blockContentIfAdError,streamType:"live"};if(n.adSrc||n.daiAssetKey){var s,u=null!=(s=e.ads)?s:[],o=u.filter(function(t){return"theoads"===t.integration});o.length>0?o.forEach(function(t){var i,r,e=t;e.sseEndpoint=null!=(i=n.adSrc)?i:e.sseEndpoint,e.daiAssetKey=null!=(r=n.daiAssetKey)?r:e.daiAssetKey}):u.push({integration:"theoads",sseEndpoint:n.adSrc,daiAssetKey:n.daiAssetKey}),e.ads=u}var h=oE(e);return h.sources[0].bypassLicense=!0,h},i.getHespSource=function(t,n){var i,r;if(n.hespSrc)return{type:"application/vnd.theo.hesp+json",src:n.hespSrc,contentProtection:n.contentProtection?uq(n.contentProtection):void 0,useManagedMediaSource:!0,latencyConfiguration:null!=(r=null==(i=this.fz)?void 0:i.latencyConfiguration)?r:Mq(t.targetLatency),hesp:{maxMobileBitrate:t.maxMobileBitrate}}},i.getHlsSource=function(t){if(t.hlsSrc)return{type:"application/x-mpegurl",src:t.hlsSrc,contentProtection:t.contentProtection?uq(t.contentProtection):void 0}},i.dispatchErrorEvent=function(t){var n=V(t,fd)?t:new fd(cd.THEO_LIVE_UNKNOWN_ERROR,t.message,t);this.Lz=hg(n),this.JW=n,this.jNt(),this.So(new _b(n))},i.jNt=function(){void 0!==this.RNt&&(Vn.Lg(this.RNt),this.RNt=void 0),void 0!==this.ZNt&&(Vn.Lg(this.ZNt),this.ZNt=void 0),void 0!==this.MNt&&(Vn.vm(this.MNt),this.MNt=void 0)},i.Xx=function(){var n;return this.nT.Zg(),this.nT=new hr,this.INt(),this.jNt(),this.NNt=void 0,this.jDt=!1,this.n7=!1,this.lBt=!1,null==(n=this.XNt)||n.destroy(),this.XNt=void 0,this.Ac=void 0,this.fz=void 0,this.zNt=void 0,this.tNt=void 0,this.JNt=void 0,this.JW=void 0,this.Lz=void 0,this.CNt=0,this.$Nt=[],this.LNt=!0,this.ONt=void 0,this.FNt&&this.VNt(),t.prototype.Xx.call(this)},i.kn=function(n){var i=this;return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return this.nT.Zg(),this.oa.oX.wY(this.WNt),void 0!==this.RNt&&(Vn.Lg(this.RNt),this.RNt=void 0),this.Vo(),this.INt(),null==(r=this.XNt)||r.destroy(),this.oa.zP.mn("latencyrecoveryseek",this.aNt),[4,t.prototype.kn.call(i,n)];case 1:return e.sent(),[2]}})}).call(this)},i.selectEndpoint=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c,a,f,v;return zt(this,function(d){switch(d.label){case 0:r=function(){var t,n,r,u;return zt(this,function(o){switch(o.label){case 0:t=c.value,n=s.filter(function(n){return n.priority===t}),o.label=1;case 1:return n.length>0?(r=function(t){var n=t.reduce(function(t,n){return t+n.weight},0);if(0===n){return t[b.floor(b.random()*t.length)]}for(var i,r=b.random()*n,e=0,s=Lt(t);!(i=s()).done;){var u=i.value;if(r<=(e+=u.weight))return u}return t[t.length-1]}(n),[4,Lq(r,i.oa.SP)]):[3,3];case 2:return"online"===(u=o.sent())?[2,{v:r}]:("invalid-security"===u&&(e=!0),Xi(n,r),[3,1]);case 3:return[2]}})},e=!1,Xi(s=t.endpoints.slice(),n),u=ir(s.map(function(t){return t.priority})),o=u.sort(),h=Lt(o),d.label=1;case 1:return(c=h()).done?[3,4]:(i=this,[5,Xt(r())]);case 2:if("object"===W(a=d.sent()))return[2,a.v];d.label=3;case 3:return[3,1];case 4:return n?[4,Lq(n,this.oa.SP)]:[3,6];case 5:if("online"===(f=d.sent()))return[2,n];"invalid-security"===f&&(e=!0),d.label=6;case 6:if(e)throw v=new fd(cd.MEDIA_LOAD_ERROR,"Trying to play a token protected stream without the correct token configured."),this.dispatchErrorEvent(v),v;return[2,void 0]}})}).call(this)},Nt(n,[{key:"kNt",get:function(){return this.FNt},set:function(t){this.jDt&&(t?this.UNt():this.VNt())}},{key:"ENt",get:function(){return this.HNt},set:function(t){this.HNt=t,this.oa.oX.wY(this.WNt),this.HNt&&this.oa.oX.gY(this.WNt)}}]),n}(Lb);function Oq(t){return t.filter(function(t){var n;return(null!=(n=t.tyt)?n:t.kW)>=Bq})}function Mq(t){return void 0===t?Yu({},Hz(),{forceSeekOffset:20}):{minimumOffset:t-CA,targetOffset:t,maximumOffset:t+CA,forceSeekOffset:20,minimumPlaybackRate:IA,maximumPlaybackRate:RA}}function Lq(t,n){return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),i=t.hespSrc||t.hlsSrc,[4,n.lk({Yu:i,Km:gl.wk,Vk:3e3})];case 1:return(r=s.sent()).hk>=200&&r.hk<300?[2,"online"]:[3,3];case 2:return V(e=s.sent(),Nl)&&403===e.oE.hk?[2,"invalid-security"]:[3,3];case 3:return[2,"offline"]}})})()}function Uq(t){try{return Fo(Vn.Dh(t).pathname,"manifest.json")}catch(t){return!1}}zb(function(t){return new xq(t)},Hb.pR),F(),Et(),F(),Et(),Wt(),Bt(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt();var Fq=U(cn());F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt(),Dt(),F(),Et(),Bt(),Dt();var Vq=function(t){function n(n,i){var r;return(r=t.call(this)||this).gO=kg(),r.ob=void 0,r.tMt=void 0,r.hu=void 0,r.ob=n,r.tMt=i,r}Ct(n,t);var i=n.prototype;return i.er=function(t,n){this.ob=t,this.tMt=n,this.hu&&this.So(new FF(this.hu))},i.jU=function(){throw new y("Method not implemented.")},i.QU=function(){throw new y("Method not implemented.")},i.kn=function(){this.Vo()},Nt(n,[{key:"tB",get:function(){return this.tMt}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()}},{key:"o",get:function(){return this.ob.id}},{key:"jI",get:function(){return this.gO}},{key:"kW",get:function(){return this.ob.bitrate}},{key:"tyt",get:function(){}},{key:"frt",get:function(){return""}},{key:"Th",get:function(){return""}},{key:"nyt",get:function(){return""}},{key:"cst",get:function(){return!0}},{key:"iyt",get:function(){}}]),n}(th),Hq=function(t){function n(n,i){return t.call(this,n,i)||this}return Ct(n,t),n.prototype.xa=function(){return LF(this)},Nt(n,[{key:"plt",get:function(){return 0}},{key:"Ti",get:function(){return this.ob.width}},{key:"Mi",get:function(){return this.ob.height}},{key:"eyt",get:function(){return 0}}]),n}(Vq);F(),Et(),Bt(),Dt(),Ut();var Wq=function(t){function n(n,i){var r;return(r=t.call(this)||this).gO=mg(),r.dO=new vg,r.iMt=void 0,r.hS=void 0,r.b5=void 0,r.hu=void 0,r.hS=n,r.b5=i,r}Ct(n,t);var i=n.prototype;return i.wO=function(t){this.Rt=t},i.kn=function(){this.Vo();for(var t,n=Lt(this.dO.II);!(t=n()).done;){t.value.kn()}this.dO.hr()},Nt(n,[{key:"Rt",get:function(){return!0},set:function(t){}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=Zw(this)}},{key:"Jdt",get:function(){}},{key:"Lt",get:function(){return this.b5}},{key:"o",get:function(){return this.hS||"millitrack"}},{key:"jI",get:function(){return this.gO}},{key:"Th",get:function(){return""}},{key:"bs",get:function(){return""}},{key:"Xk",get:function(){return this.Rt?"enabled":"disabled"},set:function(t){this.wO("enabled"===t)}},{key:"XI",get:function(){}},{key:"KI",get:function(){return this.dO}},{key:"YI",get:function(){return this.iMt},set:function(t){if(this.iMt=t,this.Rt){var n=1===(null==t?void 0:t.length)?t[0].tB:void 0;this.eMt(n)}this.So(new JM(this.dO.II.slice(),this)),((null==t?void 0:t.length)||this.dO.V)&&this.So(new CU((null==t?void 0:t[0])||this.dO.CI(0)))}},{key:"QI",get:function(){}}]),n}(th),zq=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i)||this).sMt=void 0,e.sMt=r,e}Ct(n,t);var i=n.prototype;return i.er=function(t){for(var n,i,r=function(){var r=i.value,e=Ui(t.layers,function(t){return t.encodingId===r.id}),s=Ui(n.dO.II,function(t){return t.o===r.id});s?s.er(r,e):n.dO.lO(new Hq(r,e))},e=Lt(t.active);!(i=e()).done;)n=this,r();this.So(new wg(this))},i.eMt=function(t){var n;null==(n=this.sMt)||n.nMt(t)},i.kn=function(){this.sMt=void 0,t.prototype.kn.call(this)},Nt(n,[{key:"Km",get:function(){return ig.Bk}}]),n}(Wq);F(),Et(),Bt();var Xq=function(){function t(){this.rMt=void 0}var n=t.prototype;return n.er=function(t){this.rMt=t},n.PW=function(t){},Nt(t,[{key:"kW",get:function(){var t,n,i,r,e,s;return(null!=(e=null==(n=this.rMt)||null==(t=n.video.inbounds)?void 0:t.reduce(function(t,n){return t+n.bitrateBitsPerSecond},0))?e:0)+(null!=(s=null==(r=this.rMt)||null==(i=r.audio.inbounds)?void 0:i.reduce(function(t,n){return t+n.bitrateBitsPerSecond},0))?s:0)}},{key:"EW",get:function(){var t,n;return null!=(n=null==(t=this.rMt)?void 0:t.currentRoundTripTime)?n:0}}]),t}();F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt(),Dt();var qq=function(t){function n(n,i){var r;return(r=t.call(this,n,i)||this).hMt=0,r}return Ct(n,t),n.prototype.xa=function(){return UF(this)},Nt(n,[{key:"$mt",get:function(){return this.hMt}}]),n}(Vq),Gq=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i)||this).sMt=void 0,e.sMt=r,e}Ct(n,t);var i=n.prototype;return i.er=function(t){for(var n,i,r=function(){var r=i.value,e=Ui(t.layers,function(t){return t.encodingId===r.id}),s=Ui(n.dO.II,function(t){return t.o===r.id});s?s.er(r,e):n.dO.lO(new qq(r,e))},e=Lt(t.active);!(i=e()).done;)n=this,r();this.So(new wg(this))},i.eMt=function(t){var n;null==(n=this.sMt)||n.oMt(t)},i.kn=function(){this.sMt=void 0,t.prototype.kn.call(this)},Nt(n,[{key:"Km",get:function(){return ig.Dk}}]),n}(Wq);F(),Et(),Dt();var jq=function(t){function n(n,i){var r;return(r=t.call(this,n,n,void 0,!1)||this).DU=void 0,r.DU=i,r}return Ct(n,t),n.prototype.xa=function(){return function(t){return xw(Vg(t),{get mid(){return t.DU.mid},get uuid(){return t.DU.uuid},get timecode(){return t.DU.timecode},get unregistered(){return t.DU.unregistered}})}(this)},n}(Yg);F(),Et(),F(),Et(),Bt(),Dt();var Qq=U(cn()),Yq=function(t){function n(n){var i;return(i=t.call(this)||this).hu=void 0,i.aMt=void 0,i.aMt=n,i}Ct(n,t);var i=n.prototype;return i.QL=function(t){return Qq.Logger.diagnose(t)},i.wn=function(t,n){this.aMt.wn(t,n)},i.mn=function(t,n){this.aMt.mn(t,n)},Nt(n,[{key:"Ca",get:function(){return this.hu||(this.hu=OT(this)),this.hu}}]),n}(th),Kq=[eh.uo,eh.jw,Ey.TM,eh._y,eh.Qw,eh.Ww,eh.$w,eh.Zw,eh.Bw,eh.Kw,eh.gy,eh.Rw,eh.Jw,eh.Pw,eh.Ew,eh.Lw,eh.Nw],Jq=["active","inactive","stopped","vad","layers","migrate","viewercount"],Zq=1e3,$q=function(t){function n(n){var i;return(i=t.call(this,"stats")||this).rMt=void 0,i.rMt=n,i}return Ct(n,t),Nt(n,[{key:"stats",get:function(){return this.rMt}}]),n}(rh),tG=function(t){function n(n,i,r){var e;return(e=t.call(this)||this).Iz=void 0,e.Rz=void 0,e.Cz=void 0,e.TL=void 0,e.Lf=void 0,e.gMt=void 0,e.Ac=void 0,e.nT=void 0,e.Dpt=void 0,e.lMt=void 0,e.$L=void 0,e.YL=void 0,e.fMt=void 0,e.JW=void 0,e.ZW=void 0,e.cMt=void 0,e.vMt=void 0,e.oq=void 0,e.kq=void 0,e.bq=void 0,e.uMt=void 0,e.SMt=void 0,e.Ts=void 0,e.mmt=void 0,e.Iz=n,e.Rz=i,e.Cz=r,e.nT=new hr,e.Dpt=void 0,e.lMt=void 0,e.$L=new ng,e.YL=new ng,e.vMt=0,e.oq=new Xq,e.Ts=function(t){e.qq(cg(t.lt))},e.mmt=function(t){vr(t)||e.qq(new fd(cd.MEDIA_DECODE_ERROR,t.message,t))},e.TL=e.Iz.Gq(ig.Bk),e.kq=new Uy(e,e.TL),e.bq=new Ly(e.kq,!0),e.TL.wn(Kq,e.Rs),e.TL.wn(zm.ma,e.Ts),e.bq.wn(Iy,e.Rs),e.uMt=new Yq(e),e}Ct(n,t);var i=n.prototype;return i.nMt=function(t){var n;null==(n=this.Lf)||n.select(t).catch(this.mmt)},i.oMt=function(t){var n;null==(n=this.Lf)||n.select(t).catch(this.mmt)},i.Wx=function(){return this.TL.Wx()},i.OP=function(t,n){},i.be=function(){this.TL.be()},i.we=function(){this.TL.we()},i.Gx=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Un(),[4,this.TL.Gx()];case 1:return t.sent(),[2]}})}).call(this)},i.zx=function(){this.TL.zx()},i.hr=function(){return Vt(function(){var t,n,i;return zt(this,function(r){switch(r.label){case 0:return this.dMt(),this.Ac=void 0,this.nT.Zg(),null==(t=this.Lf)||t.stop(),this.Lf=void 0,this.Dpt?[4,this.Dpt.catch(di)]:[3,2];case 1:r.sent(),this.Dpt=void 0,r.label=2;case 2:return this.lMt=void 0,[4,this.TL.hr()];case 3:for(r.sent(),this.fMt=void 0,this.vMt=0,this.TL.Aq(),n=Lt(this.$L.II);!(i=n()).done;)i.value.kn();return this.YL.hr(),this.$L.hr(),[2]}})}).call(this)},i.kn=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.dMt(),this.Vo(),[4,this.hr()];case 1:return t.sent(),this.YL.kn(),this.$L.kn(),this.bq.kn(),this.kq.zg(),this.TL.mn(Kq,this.Rs),this.TL.mn(zm.ma,this.Ts),[4,this.Iz.Pq(this.TL)];case 2:return t.sent(),[2]}})}).call(this)},i.Ta=function(t,n,i){return Vt(function(){var n,r,e,s;return zt(this,function(u){return dr(i),this.pEt(),this.dMt(),r=t,this.Ac=r,this.nT=new hr,r.apiUrl&&Fq.Director.setEndpoint(r.apiUrl),e=function(){return Fq.Director.getSubscriber({streamName:r.src,streamAccountId:r.streamAccountId,subscriberToken:r.subscriberToken})},s=this._Mt(this.Rz.OY.type),this.Lf=new Fq.View(void 0,e,void 0,!0),this.gMt=Yu({},r.connectOptions,{events:Jq,abrConfiguration:{strategy:s,metadata:{bitrate:null==(n=this.Rz.OY.metadata)?void 0:n.bitrate}}}),this.pMt(),[2]})}).call(this)},i._Mt=function(t){switch(t){case KI.PERFORMANCE:return"performance";case KI.BANDWIDTH:return"bandwidth";case KI.QUALITY:return"quality";default:return}},i.Px=function(t,n,i,r){return ut.resolve()},i.xx=function(){return ut.resolve()},i.Un=function(){if(void 0===this.Dpt){var t=this.Lf;void 0!==t&&(this.Dpt=this.lE(t,this.gMt,this.nT.Yg).catch(this.mmt))}},i.lE=function(t,n,i){return Vt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:dr(i),u.label=1;case 1:return u.trys.push([1,3,,6]),[4,gr(t.connect(n),i)];case 2:return u.sent(),t.webRTCPeer.initStats({autoInitStats:!0,statsIntervalMs:b.min(null!=(e=null==(r=this.Ac)?void 0:r.statsIntervalMs)?e:Zq,Zq)}),[3,6];case 3:return lr(s=u.sent()),function(t){return zn(t)&&"FetchError"===t.name}(s)&&400===s.status?(Vn.um("[THEOplayer] Millicast connect error, reconnecting.",s),[4,gr(t.reconnect(),i)]):[3,5];case 4:u.sent(),u.label=5;case 5:return this.qq(new fd(cd.NETWORK_ERROR,s.message,s)),[3,6];case 6:return[2]}})}).call(this)},i.mMt=function(t,n){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:dr(n),i.label=1;case 1:return i.trys.push([1,,4,5]),this.TL.x9(),this.lMt=t,[4,this.TL.hr()];case 2:return i.sent(),[4,this.TL.Un({Km:Sy.mV,iR:"",GZ:t,qT:hA.gR,aq:[]})];case 3:return i.sent(),[3,5];case 4:return this.TL.I9(),[7];case 5:return[2]}})}).call(this)},i.pMt=function(){var t,n=this,i=this.Lf;i.on("track",function(t){return n.wMt(t)}),i.on("broadcastEvent",function(t){return n.yMt(t)}),i.webRTCPeer.on("stats",function(t){n.cMt=t,n.oq.er(t),n.AMt()}),(null==(t=this.gMt)?void 0:t.metadata)&&i.on("metadata",function(t){return n.bMt(t)})},i.AMt=function(){var t,n,i=this;void 0===this.SMt&&(this.So(new $q(this.cMt)),this.SMt=Vn.fm(function(){i.So(new $q(i.cMt))},null!=(n=null==(t=this.Ac)?void 0:t.statsIntervalMs)?n:Zq))},i.dMt=function(){void 0!==this.SMt&&(Vn.vm(this.SMt),this.SMt=void 0)},i.wMt=function(t){var n=this.YL.V>0,i=this.$L.V>0,r=n&&!i,e=t.streams[0];if(r)for(var s,u=Lt(e.getVideoTracks().slice());!(s=u()).done;){var o=s.value;e.removeTrack(o)}e!==this.lMt&&this.mMt(e,this.nT.Yg).catch(this.mmt)},i.yMt=function(t){switch(t.name){case"active":var n,i=function(){var t=r.value;if(t.media!==ig.Bk||s.disableVideo||n.$L.II.some(function(n){return n.o===t.trackId})){if(t.media===ig.Dk&&!s.disableAudio&&!n.YL.II.some(function(n){return n.o===t.trackId})){var i=n.YL.V>0?SX.qCt:SX.zCt;n.YL.tt(new Gq(t.trackId,i,n))}}else{var e=n.$L.V>0?EX.qCt:EX.zCt;n.$L.tt(new zq(t.trackId,e,n))}};this.So(new RH);for(var r,e=t.data,s=this.gMt,u=Lt(e.tracks);!(r=u()).done;)n=this,i();break;case"inactive":this.So(new CH),this.$L.hr(),this.YL.hr();break;case"stopped":this.So(new CH);break;case"viewercount":default:break;case"layers":var o=t.data;if(0===this.$L.V){var h=new zq("",EX.zCt,this);h.er(o.medias[0]),this.$L.tt(h)}else{var c=Ui(this.$L.II,function(t){return t.Lt===EX.zCt});null==c||c.er(o.medias[0])}}},i.bMt=function(t){var n=this.fMt;void 0===n&&((n=this.TL.tI(Ym.VU,void 0,void 0,void 0,void 0,Dg.MILLICAST)).Xk=Hm.JI,this.fMt=n);var i=this.MP,r=b.max(0,i-10);this.vMt0)||n.some(function(n){return n.toLowerCase()===t.toLowerCase()})},n.uLt=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r1?n-1:0),r=1;r1?n-1:0),r=1;r1?n-1:0),r=1;r1?n-1:0),r=1;r0?t.kW:Pz.Mat,i=t.EW>0?t.EW:bz.Mat;this.Fat=new Pz(Pz.cIt,Pz.dIt,1,n),this.LIt=new bz(bz.cIt,bz.dIt,i)}var n=t.prototype;return n.PW=function(t){if("segment"===t.Km||"preload-hint"===t.Km){var n=[new Tz(this.LIt)];return"stream"!==t.dk||!function(t){return"segment"===t.Km&&"initialization-segment"!==t.Wk}(t)&&"preload-hint"!==t.Km?n.push(new Sz(this.Fat)):n.push(new Ez(this.Fat,1e3)),new Az(n)}},n.RIt=function(t){this.Fat=new Pz(Pz.cIt,Pz.dIt,1,t)},Nt(t,[{key:"kW",get:function(){return this.Fat.yet}},{key:"EW",get:function(){return this.LIt.yet}}]),t}();F(),Et();var bG=function(){function t(t){this.ost=void 0,this.ost=t}return t.prototype.QZ=function(t,n){var i={Km:Sy.wV,aq:[],L4:t.map(function(t){return{qT:t}}),X4:n};return ut.resolve(void 0!==this.ost.QZ([i]))},t}();F(),Et(),Wt(),Bt(),Ut(),Qt(),F(),Et(),Ut();var AG=function(t,n,i,r,e){return t.filter(function(t){return!!ji(r,t)||1.1*t.kW<=i.kW})},TG=function(t,n,i,r,e){return t.filter(function(t){if(ji(r,t))return!0;for(var s,u=1/0,o=Lt(t.lLt);!(s=o()).done;){var h,c,a=s.value;u=b.min(u,null!=(c=null!=(h=a.IMt.fLt)?h:a.IMt.vLt)?c:1/0)}u===1/0&&(u=1);var f=2*i.EW+t.kW*u/i.kW;return t.kW<=n.kW||e._Lt>f})},SG=function(t,n,i,r,e){return mi(t,function(t,n){return n.kW-t.kW})},EG=function(t,n,i,r,e){return t.every(function(t){return t.iyt&&!S(t.iyt)})?mi(t,function(t,n){return n.iyt-t.iyt}):t},IG=function(t,n,i,r,e){return 0===r.length?t:mi(t,function(t,n){var i=ji(r,t)?1:0;return(ji(r,n)?1:0)-i})},RG=function(t,n,i,r,e,s){return t.filter(function(t){return!t.frt||!n.frt||!(void 0!==n.frt.bCt&&void 0!==t.frt.bCt&&!YC(n.frt.bCt,t.frt.bCt)&&!s.gLt({qT:'video/mp4; codecs="'+t.frt.bCt+'"'}))&&!(void 0!==n.frt.yCt&&void 0!==t.frt.yCt&&!YC(n.frt.yCt,t.frt.yCt)&&!s.pLt({qT:'audio/mp4; codecs="'+t.frt.yCt+'"'}))})},CG=function(t,n,i,r,e){if(!1===e.Gct)return t;if(Vn.Zs.dp)return t;for(var s,u,o=Vn.Zs.lp,h=(null!=(s=null==o?void 0:o.width)?s:e.Ti)*FM,c=(null!=(u=null==o?void 0:o.height)?u:e.Mi)*FM,a=0;a=r[1]}return!1}function WG(t,n){return t===n||t.zE===n.zE&&(t.LAt&&n.LAt?t.LAt.Tn===n.LAt.Tn&&t.LAt.V===n.LAt.V:t.LAt===n.LAt)}function zG(t){var n=!!t.ILt||void 0;return{o:t.o,RLt:t.RLt,nq:t.nq,CLt:t.CLt,ct:t.ct,DLt:t.DLt,ILt:n,BLt:t.NLt,MLt:t.LLt,OLt:t.OLt,FLt:t.FLt}}function XG(t,n){var i,r,e;return{yCt:null!=(i=n.yCt)?i:null==t?void 0:t.yCt,bCt:null!=(r=n.bCt)?r:null==t?void 0:t.bCt,ULt:null!=(e=n.ULt)?e:null==t?void 0:t.ULt}}function qG(t,n,i,r,e){return Vt(function(){var s,u,o,h,c,a,f,v,d,l,w,g;return zt(this,function(_){switch(_.label){case 0:return s=n.filter(function(t){return Lo(t,"audio")}),u=n.filter(function(t){return Lo(t,"video")}),o=[],h=i.map(function(t){return function(t,n,i){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return t.nyt&&t.VLt?t.Uk!==UG.ELt?[2]:(r=GG(t.VLt))?r.$m!==Ao?[3,1]:[2,{kS:r,BW:[],NW:void 0,HH:t.nyt,MW:[]}]:[2]:[2];case 1:return r.$m!==mo||t.VLt!==So?[3,2]:[2,{kS:r,BW:[],NW:t.nyt,HH:void 0,MW:[]}];case 2:return _G.hB("HLSDrmUtils","Fetching key uri "+t.nyt+"."),[4,n.lk({Yu:t.nyt,zk:i})];case 3:return[4,s.sent().HT()];case 4:return e=s.sent(),r.$m===fo&&(e=function(t){var n=new DataView(t);return n.byteLength>=8&&n.getUint32(4)===nF?t:iF(t)}(e)),[2,{kS:r,BW:[e],NW:void 0,HH:void 0,MW:[]}];case 5:return[2]}})})()}(t,r,e)}),[4,ut.all(h)];case 1:for(c=_.sent().filter(Un),f=function(t,n){if(0===n.length)return t;var i=function(t){var i=n.indexOf(t.kS.$m);return i>=0?i:n.length};return mi(t,function(t,n){return i(t)-i(n)})}(c,null!=(a=null==t?void 0:t.preferredKeySystems)?a:[]),v=Lt(f);!(d=v()).done;)l=d.value,w=XH(null!=t?t:{},l.kS),g="cbcs",o.push({kS:l.kS,BW:l.BW,NW:l.NW,HH:l.HH,Mq:[{initDataTypes:[l.kS.Jm],audioCapabilities:qH(s,g,null==w?void 0:w.audioRobustness),videoCapabilities:qH(u,g,null==w?void 0:w.videoRobustness),persistentState:null==w?void 0:w.persistentState,distinctiveIdentifier:null==w?void 0:w.distinctiveIdentifier}],MW:l.MW});return[2,o]}})})()}function GG(t){return t===wo?Ro:t===vo?Io:"com.apple.streamingkeydelivery"===t?Do:t===So?Po:void 0}function jG(t){if("#"!==t[0])throw new y("HLSPlaylistParser - Could not extract M3U8 tag or comment: "+t);return t.split(":",1)[0]}function QG(t){return"#"!==t[0]?t:t.split(":",1)[0]}function YG(t){var n=t.indexOf(":");if(-1===n||t.lengtho&&_G.cLt(mG,"#EXT-X-STREAM-INF tag must have BANDWIDTH attribute higher or equal to AVERAGE-BANDWIDTH attribute: "+t+"."),e||_G.hB(mG,"#EXT-X-STREAM-INF tag should have a CODECS attribute: "+t+"."),e&&e.bCt&&void 0===s&&_G.hB(mG,"#EXT-X-STREAM-INF tag should have a valid RESOLUTION attribute if it contains video codecs: "+t+"."),void 0===f||ji(["TYPE-0","TYPE-1","NONE"],f)||_G.cLt(mG,"#EXT-X-STREAM-INF tag has an invalid HDCP-LEVEL attribute: "+t+"."),void 0===w||ji(["SDR","PQ","HLG"],w)||_G.cLt(mG,"#EXT-X-STREAM-INF tag has an invalid VIDEO-RANGE attribute: "+t+"."),void 0===o)throw new y("HLSPlaylistParser - Could not parse #EXT-X-STREAM-INF tag: "+t+".");return{WLt:v,qLt:g,tyt:h,kW:o,zLt:p,frt:e,plt:a,GLt:f,uCt:s,iyt:c,XLt:m,nyt:r,jLt:_,QLt:w}}function tj(t,n){var i=JG(t);if(!i.URI)throw new y("HLSPlaylistParser - Could not parse #EXT-X-I-FRAME-STREAM-INF tag: "+t+".");try{return $G(t,n,i.URI)}catch(n){throw new y("HLSPlaylistParser - Could not parse #EXT-X-I-FRAME-STREAM-INF tag: "+t+".")}}function nj(t){var n=Number(t);return S(n)?void 0:n}function ij(t,n){var i,r,e=JG(t);try{i=function(t){switch(t){case"NONE":return UG.lz;case"AES-128":return UG.kLt;case"SAMPLE-AES":return UG.ELt;case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return t}throw new y("LLHLSPlaylistParser - Could not parse M3U8 key method: "+t+".")}(e.METHOD),r=e.URI?aj(e.URI,n):void 0}catch(n){throw new y("HLSPlaylistParser - Could not parse #EXT-X-KEY tag: "+t+".")}var s,u,o,h,c,a=e.KEYFORMAT,f=e.IV,v=e.KEYFORMATVERSIONS;if(i!==UG.lz){if(o=a||So,"SAMPLE-AES-CENC"===i||"SAMPLE-AES-CTR"===i){if(GG(o)!==Ro)throw new y("HLSPlaylistParser - #EXT-X-KEY tag with METHOD="+i+" is only compatible with Widevine.");s=UG.ELt}else s=i;u=r,h=f?Sc(f):void 0,c=v?v.split("/").map(function(t){return Number(t)}):[1]}else s=UG.lz,(r||a||v||f)&&_G.cLt(mG,"#EXT-X-KEY tag with METHOD=NONE must not have additional attributes: "+t+".");return{Uk:s,nyt:u,KLt:h,VLt:o,YLt:c}}function rj(t){var n=YG(t);if(!n)return[void 0,""];var i=n.split(","),r=i[0],e=i[1];return[nj(r),e]}function ej(t,n){var i=t.split("@"),r=nj(i[0]),e=i.length>1?nj(i[1]):n;if(void 0===r||void 0===e)throw new y("HLSPlaylistParser - Could not parse #EXT-X-BYTERANGE tag: "+t+".");return{Tn:e,V:r}}function sj(t){if(void 0!==t)return ej(t,void 0)}function uj(t,n){return ej(YG(t),n)}function oj(t,n){var i=JG(t);try{return{zE:aj(i.URI,n),LAt:sj(i.BYTERANGE)}}catch(n){throw new y("HLSPlaylistParser - Could not parse #EXT-X-MAP tag: "+t+".")}}function hj(t){var n=YG(t);if(!n)throw new y("HLSPlaylistParser - Could not parse #EXT-X-PROGRAM-DATE-TIME tag: "+t+".");var i=new Date(n.trim());if(!he(i))throw new y("HLSPlaylistParser - Could not parse #EXT-X-PROGRAM-DATE-TIME tag: "+t+".");return i}function cj(t){var n,i,r,e=JG(t),s=e["START-DATE"],u=e["END-DATE"],o=nj(e["PLANNED-DURATION"]),h=nj(e.DURATION);void 0!==e["SCTE35-CMD"]&&(n=Sc(e["SCTE35-CMD"]).buffer),e["SCTE35-IN"]&&(i=Sc(e["SCTE35-IN"]).buffer),e["SCTE35-OUT"]&&(r=Sc(e["SCTE35-OUT"]).buffer);var c,a,f="YES"===e["END-ON-NEXT"],v=function(t){for(var n,i={},r=Lt(k.keys(t));!(n=r()).done;){var e=n.value,s=t[e];void 0!==s&&Uo(e,"X-")&&(i[e]=s)}return i}(e),d=e.ID,l=e.CLASS;if(void 0===s)_G.cLt(mG,"Could not parse #EXT-X-DATERANGE tag without START-DATE attribute: "+s+".");else if(c=new Date(s),a=void 0!==u?new Date(u):void 0,he(c)||_G.cLt(mG,"Could not parse EXT-X-DATERANGE tag with invalid START-DATE attribute: "+c+"."),void 0!==h){var w=new Date(c.getTime()+1e3*h);a?a.getTime()!==w.getTime()&&(_G.cLt(mG,"DURATION and END-DATE attributes of #EXT-X-DATERANGE tag are not aligned, updating the END-DATE: "+t+"."),a=w):a=w}else a&&(h=(c.getTime()-a.getTime())/1e3);if(f&&(e.CLASS||_G.cLt(mG,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute without CLASS attribute: "+t+"."),e.DURATION&&_G.cLt(mG,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute with DURATION attribute: "+t+"."),a&&_G.cLt(mG,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute with END-DATE attribute: "+t+".")),void 0===d&&_G.cLt(mG,"Could not parse #EXT-X-DATERANGE tag without valid ID attribute: "+t+"."),void 0===d||void 0===c)throw new y("HLSPlaylistParser - Could not parse #EXT-X-DATERANGE tag: "+t+".");return{o:d,RLt:l,nq:c,CLt:a,ct:h,DLt:o,LLt:n,FLt:i,OLt:r,ILt:f,NLt:v}}function aj(t,n){if(void 0===t)throw new y("HLSPlaylistParser - Unable to parse URL from string: "+t+".");return Vn.xm(t,n)}function fj(t,n){var i=JG(t),r=nj(i.DURATION),e=aj(i.URI,n),s=sj(i.BYTERANGE),u="YES"===i.INDEPENDENT,o="YES"===i.GAP;if(void 0===r)throw new y("HLSPlaylistParser - Unable to parse #EXT-X-PART without valid DURATION: "+t);return{ct:r,nyt:{zE:e,LAt:s},JLt:u,ZLt:o}}function vj(t){var n=JG(t);return{$Lt:"YES"===n["CAN-BLOCK-RELOAD"],tOt:nj(n["CAN-SKIP-UNTIL"]),iOt:"YES"===n["CAN-SKIP-DATERANGES"],eOt:nj(n["HOLD-BACK"]),sOt:nj(n["PART-HOLD-BACK"])}}function dj(t,n){var i=JG(t);if(void 0===i.URI)throw new y("HLSPlaylistParser - Could not parse #EXT-X-RENDITION-REPORT: "+t+".");var r=aj(i.URI,n),e=nj(i["LAST-MSN"]),s=nj(i["LAST-PART"]);if(void 0===e)throw new y("HLSPlaylistParser - Could not parse #EXT-X-RENDITION-REPORT: "+t+".");return{nyt:r,nOt:e,rOt:s}}function lj(t,n){var i,r=JG(t),e=nj(r["SKIPPED-SEGMENTS"]),s=null==(i=r["RECENTLY-REMOVED-DATERANGES"])?void 0:i.split("\t");if(void 0===e)throw new y("HLSPlaylistParser - Could not parse #EXT-X-SKIP tag without valid SKIPPED-SEGMENTS attribute: "+t+".");return{hOt:e,oOt:s,aOt:n}}function wj(t){var n=nj(JG(t)["PART-TARGET"]);if(void 0===n)throw new y("HLSPlaylistParser - Could not parse #EXT-X-PART-TARGET-DURATION tag: "+t+".");return n}function gj(t){switch(YG(t)){case"VOD":return FG.PLt;case"EVENT":return FG.xLt;default:return _G.cLt(mG,"Found #EXT-X-PLAYLIST-TYPE tag with invalid value: "+t+"."),FG.pk}}function _j(t,n){var i,r,e=JG(t);try{i=function(t){if(void 0===t)throw new y("HLSPlaylistParser - Could not parse PRELOAD-HINT type: "+t+".");if("MAP"===t)return LG.SLt;if("PART"===t)return LG.TLt;throw new y("HLSPlaylistParser - Could not parse PRELOAD-HINT type: "+t+".")}(e.TYPE),r=aj(e.URI,n)}catch(n){throw new y("HLSPlaylistParser - Could not parse #EXT-X-PRELOAD-HINT tag: "+t+".")}var s,u=nj(e["BYTERANGE-START"]),o=nj(e["BYTERANGE-LENGTH"]);return void 0===u&&void 0===o||(s={Tn:u||0,V:o}),{Km:i,nyt:{zE:r,LAt:s}}}F(),Et(),Ut(),F(),Et(),Wt(),Ut(),Qt(),F(),Et();var mj=function(){function t(n){this.dOt=0,this.cOt=void 0,this.cOt=t.fOt(n)}var n=t.prototype;return n.uOt=function(){var t=this.cOt[this.dOt];return this.dOt+=1,t},n.lOt=function(){return this.cOt[this.dOt]},n.Ly=function(){var n=new t("");return n.dOt=0,n.cOt=this.cOt.slice(this.dOt),n},t.fOt=function(t){return t?t.split(/[\r\n]+/).map(function(t){return t.trim()}).filter(function(t){return t}):[]},t}();function yj(t,n,i){var r=t.nyt,e=t.bD,s=t.vOt,u=t.Tn;switch(i){case"#EXT-X-VERSION":e=function(t){var n=KG(t);return S(n)?(_G.cLt(mG,"Playlist version is NaN: "+t+"."),1):n}(n);break;case"#EXT-X-INDEPENDENT-SEGMENTS":s=!0;break;case"#EXT-X-START":u=function(t){var n=JG(t),i=nj(n["TIME-OFFSET"]);if(void 0===i)throw new y("HLSPlaylistParser - #EXT-X-START is missing a TIME-OFFSET: "+t+".");return{_Ot:i,gOt:"YES"===n.PRECISE}}(n);break;case"#EXT-X-DEFINE":_G.cLt(mG,"Ignoring unsupported #EXT-X-DEFINE: "+n+".");break;default:_G.hB(mG,"Ignoring unrecognized line or comment: "+n+".")}return{nyt:r,bD:e,vOt:s,Tn:u}}function pj(t,n){return t.map(function(t){return t.Uk===UG.lz||t.KLt?t:Yu({},t,{KLt:kj(n)})})}function kj(t){var n=new DataView(new ArrayBuffer(16)),i=new Tc;return i.Ny(8),Qh(n,i,ue.fromNumber(t)),new E(n.buffer)}function bj(t,n,i){_G.hB(mG,"Parsing M3U8 playlist at "+t+".");var r=new mj(i);if("#EXTM3U"!==r.uOt())throw new y("HLSPlaylistParser - Could not parse M3U8 playlist. Playlist does not start with #EXTM3U.");return function(t){return/^#EXT-X-(MEDIA|STREAM-INF|I-FRAME-STREAM-INF|SESSION-DATA|SESSION-KEY):/m.test(t)}(i)?function(t,n){var i;try{i=Vn.xm(t)}catch(n){throw _G.cLt(mG,"The master playlist has no valid base URI: "+t+"."),new y("HLSPlaylistParser - Could not parse HLS master playlist: "+t)}for(var r={nyt:i,vOt:void 0,Tn:void 0,bD:void 0},e=[],s=[],u=[],o=[];;){var h=n.uOt();if(!h)break;try{var c=jG(h);switch(c){case"#EXT-X-MEDIA":var a=ZG(h,i);e.push(a);break;case"#EXT-X-STREAM-INF":var f=$G(h,i,n.uOt());s.push(f);break;case"#EXT-X-I-FRAME-STREAM-INF":var v=tj(h,i);u.push(v);break;case"#EXT-X-SESSION-DATA":_G.cLt(mG,"Ignoring unsupported #EXT-X-SESSION-DATA: "+h+".");break;case"#EXT-X-SESSION-KEY":var d=ij(h,i);o.push(d);break;default:r=yj(r,h,c)}}catch(t){_G.cLt(mG,"Ignoring unparsable line: "+h,t)}}var l,w=r.bD,g=null!=(l=r.vOt)&&l,_=r.Tn;return void 0===w&&(_G.cLt(mG,"The playlist has no #EXT-X-VERSION, assuming version is 2."),w=2),w>=8&&(s.some(function(t){return void 0!==t.iyt})||u.some(function(t){return void 0!==t.iyt}))&&(s.some(function(t){return void 0===t.iyt})||u.some(function(t){return void 0===t.iyt}))&&_G.cLt(mG,"If one master playlist variant stream has a SCORE, all variants should have it."),{nyt:i,bD:w,vOt:g,Tn:_,pOt:u,MW:o,KD:e,mOt:s}}(t,r):function(t,n,i){var r,e,s,u,o,h,c,a,f,v,d,l,w,g,_,m,p,k,b={nyt:t,vOt:void 0,Tn:void 0,bD:void 0},A=[],T=!1,S=!1,E=[],I=Ju(),R=[],C=[],D=!1,P=!1,N=[],B=[],x=0,O=!1,M=FG.pk,L=!1,U=0;try{k=Vn.xm(t)}catch(n){throw _G.cLt(mG,"The media playlist has no valid base URI: "+t+".",n),new y("HLSPlaylistParser - Could not parse HLS media playlist.")}for(var F=i.Ly();void 0===_||void 0===m;){var V=F.uOt();if(!V)break;try{switch(QG(V)){case"#EXT-X-MEDIA-SEQUENCE":_=KG(V);break;case"#EXT-X-DISCONTINUITY-SEQUENCE":m=KG(V)}}catch(t){_G.cLt(mG,"Ignoring unparsable line: "+V,t)}}void 0===_&&(_G.hB(mG,"#EXT-X-MEDIA-SEQUENCE tag is missing, assuming first segment media sequence number is 0."),_=0),void 0===m&&(_G.hB(mG,"#EXT-X-DISCONTINUITY-SEQUENCE tag is missing, assuming first segment discontinuity sequence number is 0."),m=0);for(var H=_,W=m;;){var z=i.uOt();if(!z)break;var X=!1;try{var q=QG(z);switch(q){case"#EXTINF":var G;X=!0,o=(G=rj(z))[0],h=G[1];break;case"#EXT-X-BYTERANGE":X=!0,(c=uj(z,x))&&(x=c.Tn+c.V);break;case"#EXT-X-DISCONTINUITY":X=!0,D=!0,W++;break;case"#EXT-X-KEY":var j;X=!0;var Q,Y=ij(z,k);if(Y.Uk===UG.lz){I.clear(),w=void 0;break}var K=null!=(Q=null==(j=Y.VLt)?void 0:j.toString())?Q:"identity";I.set(K,Y),Y.Uk===UG.kLt&&(w=Y);break;case"#EXT-X-MAP":X=!0,f=oj(z,k),v=w;break;case"#EXT-X-PROGRAM-DATE-TIME":X=!0,d=hj(z);break;case"#EXT-X-GAP":X=!0,P=!0;break;case"#EXT-X-BITRATE":X=!0,l=KG(z);break;case"#EXT-X-TARGETDURATION":r=KG(z);break;case"#EXT-X-DATERANGE":var J=cj(z);A.push(J);break;case"#EXT-X-PART":X=!0;var Z=fj(z,k);C.push(Z);break;case"#EXT-X-PRELOAD-HINT":var $=_j(z,k);N.push($);break;case"#EXT-X-SKIP":E.length>0&&_G.cLt(mG,"#EXT-X-SKIP must appear before any #EXTINF tags."),X=!0;var tt=lj(z,H);U=tt.hOt,p=tt.oOt,H+=tt.hOt;break;case"#EXT-X-SERVER-CONTROL":var nt=vj(z);T=nt.$Lt,e=nt.tOt,S=nt.iOt,s=nt.eOt,u=nt.sOt;break;case"#EXT-X-RENDITION-REPORT":var it=dj(z,k);B.push(it);break;case"#EXT-X-PART-INF":g=wj(z);break;case"#EXT-X-MEDIA-SEQUENCE":X&&_G.cLt(mG,"#EXT-X-MEDIA-SEQUENCE must appear before any media segment tags.");break;case"#EXT-X-DISCONTINUITY-SEQUENCE":X&&_G.cLt(mG,"#EXT-X-DISCONTINUITY-SEQUENCE must appear before any media segment tags.");break;case"#EXT-X-ENDLIST":O=!0;break;case"#EXT-X-PLAYLIST-TYPE":M=gj(z);break;case"#EXT-X-I-FRAMES-ONLY":L=!0;break;default:if(Uo(q,"#"))b=yj(b,z,q);else{a=Vn.xm(z,k);var rt=f?{nyt:f,wOt:v}:void 0,et={MW:pj(to(I),H),DU:R,yOt:C,ct:o,dq:h,AOt:D,nyt:{LAt:c,zE:a},bOt:rt,SOt:d,ZLt:P,TOt:l,aOt:H,kOt:W};E.push(et),H++,R=[],C=[],o=void 0,h=void 0,D=!1,c=void 0,a=void 0,d=void 0,P=!1,l=void 0}}}catch(t){_G.cLt(mG,"Ignoring unparsable line: "+z,t)}}if(C.length){var st=f?{nyt:f,wOt:w}:void 0,ut={MW:pj(to(I),H),DU:R,yOt:C,ct:o,dq:h,AOt:D,nyt:void 0,bOt:st,SOt:d,ZLt:P,TOt:l,aOt:H,kOt:W};E.push(ut)}var ot,ht=b.bD,ct=null!=(ot=b.vOt)&&ot,at=b.Tn;void 0===ht&&(_G.cLt(mG,"The media playlist has no #EXT-X-VERSION tag, assuming version is 2."),ht=2),void 0===r&&_G.cLt(mG,"Could not parse the HLS media playlist: no #EXT-X-TARGET-DURATION tag was found.");var ft=E.length,vt=ft>0;vt||_G.cLt(mG,"The HLS media playlist contains no segments.");var dt=vt&&E[ft-1].yOt.length>0;return dt&&void 0===g&&_G.cLt(mG,"Could not parse the HLS media playlist: no #EXT-X-PART-TARGET-DURATION tag was found, but it is required when some or all segments contain parts."),dt&&void 0===u&&_G.cLt(mG,"Could not parse the HLS media playlist: The #EXT-X-SERVER-CONTROL tag has no PART-HOLDBACK attribute, but it is required when some or all segments contain parts."),{$Lt:T,tOt:e,iOt:S,EOt:A,kOt:m,POt:O,vOt:ct,eOt:s,xOt:L,aOt:_,hOt:U,sOt:u,fLt:g,IOt:M,ROt:N,oOt:p,COt:B,DOt:r,ect:E,Tn:at,nyt:k,BOt:n,bD:ht}}(t,n,r)}F(),Et(),Bt(),Ut(),F(),Et(),Bt(),Ut();var Aj=function(){function t(t,n,i){var r,e,s,u;this.o=Tj++,this.IMt=void 0,this.kW=void 0,this.iyt=void 0,this.uCt=void 0,this.plt=void 0,this.qLt=void 0,this.jLt=void 0,this.XLt=void 0,this.zLt=void 0,this.tyt=void 0,this.MOt=void 0,this.ZRt=void 0,this.NOt=!1,this.OOt=[],this.IMt=n,this.kW=t.kW,this.tyt=t.tyt,this.iyt=t.iyt,this.MOt=t.frt?Sj(t.frt):void 0,this.ZRt=this.MOt,this.uCt=t.uCt,this.plt=t.plt,this.qLt=null!=(r=t.qLt)?r:"GOt"+this.o,this.jLt=null!=(e=t.jLt)?e:"XOt"+this.o,this.XLt=null!=(s=t.XLt)?s:"jOt"+this.o,this.zLt=null!=(u=t.zLt)?u:"QOt"+this.o,this.OOt=i}var n=t.prototype;return n.WOt=function(t){for(var n,i=Lt(this.OOt);!(n=i()).done;){var r=n.value.IMt.WOt(t);if(void 0!==r)return r}},n.qOt=function(t){for(var n,i=Lt(this.OOt);!(n=i()).done;){var r=n.value.IMt.qOt(t);if(void 0!==r)return r}},n.zOt=function(t){Xi(this.OOt,t)},Nt(t,[{key:"nyt",get:function(){return this.IMt.nyt}},{key:"frt",get:function(){return this.ZRt},set:function(t){this.ZRt=t?Sj(t):void 0,this.NOt=function(t,n){return!(void 0!==(null==t?void 0:t.yCt)&&void 0===(null==n?void 0:n.yCt)||void 0!==(null==t?void 0:t.bCt)&&void 0===(null==n?void 0:n.bCt))}(this.MOt,this.ZRt)}},{key:"LOt",get:function(){return this.NOt}},{key:"lLt",get:function(){return this.OOt}},{key:"FOt",get:function(){return this.OOt.filter(function(t){return t.Km===MG.Dk})}},{key:"UOt",get:function(){return this.OOt.filter(function(t){return t.Km===MG.Bk})}},{key:"VOt",get:function(){return this.OOt.filter(function(t){return t.Km===MG.OU})}},{key:"HOt",get:function(){return this.OOt.filter(function(t){return t.Km===MG.bLt})}}]),t}(),Tj=0;function Sj(t){return Yu({},t,{bCt:t.bCt?jv(t.bCt):void 0})}F(),Et(),Bt(),Ut(),F(),Et(),Bt(),Ut(),F(),Et(),Bt();var Ej=function(){function t(t,n,i,r,e,s){this.tFt=void 0,this.eFt=void 0,this.ct=void 0,this.nyt=void 0,this.JLt=void 0,this.ZLt=void 0,this.JOt=void 0,this.$Ot=void 0,this.OO=void 0,this.xet=void 0,this.KOt=void 0,this.tFt=t,this.eFt=n,this.OO=i,this.JOt=r,this.$Ot=e,this.ct=s.ct,this.nyt=s.nyt,this.JLt=s.JLt,this.ZLt=s.ZLt}return t.prototype.iFt=function(t,n,i){this.OO=t,this.JOt=n,this.$Ot=i},Nt(t,[{key:"EO",get:function(){var t;return this.OO+(null!=(t=this.KOt)?t:0)}},{key:"YOt",get:function(){return this.JOt}},{key:"ZOt",get:function(){return this.$Ot}},{key:"MW",get:function(){return this.tFt.MW}}]),t}(),Ij=function(){function t(t,n,i,r,e){this.WA=void 0,this.SOt=void 0,this.rFt=void 0,this.bOt=void 0,this.ZLt=void 0,this.JOt=void 0,this.$Ot=void 0,this.aOt=void 0,this.AOt=void 0,this.kOt=void 0,this.MW=void 0,this.OO=void 0,this.xet=void 0,this.hFt=[],this.aFt=0,this.sFt=void 0,this.OO=t,this.bOt=e.bOt,this.JOt=i,this.$Ot=r,this.WA=e.ct,this.SOt=e.SOt,this.rFt=e.nyt,this.ZLt=e.ZLt,this.aOt=e.aOt,this.AOt=e.AOt,this.kOt=n,this.MW=e.MW,this.fFt(e.yOt)}var n=t.prototype;return n.uFt=function(t){return this.hFt[t]},n.cFt=function(t){for(var n=0;n=0;n--){var i=this.hFt[n];if(i.EO<=t)return i}},n.lFt=function(t){for(var n=this.dFt(t);n&&!n.JLt&&n.eFt>0;)n=this.uFt(n.eFt-1);return n},n.iFt=function(t,n,i){var r=t.yOt.length!==this.hFt.length||i!==this.$Ot;this.JOt=n,this.$Ot=i,this.WA=t.ct,null!=this.SOt||(this.SOt=t.SOt),void 0===this.rFt&&(this.rFt=t.nyt),r&&this.fFt(t.yOt)},n.fFt=function(t){this.hFt.length>t.length&&(this.hFt.length=t.length);for(var n=0,i=0;i=0;s--)r(s);for(var u,o=Lt(n);!(u=o()).done;){var h=u.value,c=h.nq;if(void 0!==c&&!t.m5(h.o)){var a=i(c),f=new Dj(h,a);Oj(t.L.II,f),t.tV(f)}}}function xj(t){for(var n,i=Ju(),r=[],e=Lt(t);!(n=e()).done;){var s=n.value;if(i.has(s.o)){var u=i.get(s.o),o=Yu({},u,Uw(s),{BLt:Yu({},u.BLt,s.BLt)});i.set(s.o,o)}else i.set(s.o,s),r.push(s.o)}return r.map(function(t){return i.get(t)})}function Oj(t,n){var i=Vi(t,function(t){return t.RLt===n.RLt});i&&i.ILt&&i.er({o:i.o,CLt:n.nq})}var Mj=String.fromCharCode(95),Lj=Mj+"HLS_msn",Uj=Mj+"HLS_part",Fj=Mj+"HLS_skip",Vj="HLSMediaPlaylist",Hj=function(){function t(t,n,i){this.nyt=void 0,this.qFt=void 0,this.GFt=void 0,this.eUt=void 0,this.sUt=void 0,this.CFt=void 0,this.DFt=void 0,this.BFt=void 0,this.NFt=void 0,this.fAt=[],this.XFt=[],this.sFt=void 0,this.MFt=!1,this.LFt=void 0,this.OFt=!1,this.FFt=FG.pk,this.N4=TA.iL(),this.RFt=TA.iL(),this.WA=void 0,this.QFt=-1/0,this.MU=void 0,this.cUt=void 0,this.YFt=void 0,this.nyt=t,this.MU=n,this.cUt=i}var n=t.prototype;return n.hLt=function(t){if(!t)return this.nyt;var n=Vn.Dh(this.nyt);return void 0!==t.aOt&&n.searchParams.append(Lj,String(t.aOt)),void 0!==t.JFt&&n.searchParams.append(Uj,String(t.JFt)),void 0!==t.rD&&n.searchParams.append(Fj,t.rD),n.href},n.mat=function(t){var n=this.ZFt(t);return n<0?void 0:this.fAt[n]},n.ZFt=function(t){var n=this.fAt;if(0===n.length)return-1;var i=t-n[0].aOt;return i<0||i>=n.length?-1:i},n.$Ft=function(t){if(0!==this.fAt.length){var n=YF(Wj.Ng,this.fAt,t);if(!(n<0)){var i=this.fAt[n];return t===i.PO&&n+1=i.EO?i:this.$Ft(t)}},n.WOt=function(t){var n=this.tUt(t);if(void 0!==n)for(var i=n.aOt-this.fAt[0].aOt;i>=0;i--){var r=this.fAt[i];if(void 0!==r.SOt)return new Date(r.SOt.getTime()+1e3*(t-r.EO))}},n.qOt=function(t){for(var n,i,r=Lt(this.fAt);!(i=r()).done;){var e=i.value;if(zj(e))if(void 0===n)n=e;else{if(!(e.SOt.getTime()<=t.getTime()))break;n=e}}if(void 0!==n)return n.EO+(t.getTime()-n.SOt.getTime())/1e3},n.iUt=function(t){switch(t){case LG.SLt:return this.eUt;case LG.TLt:return this.sUt;default:return}},n.iFt=function(t){var n;void 0===this.CFt&&(this.CFt=null!=(n=t.DOt)?n:this.nUt(t));void 0===this.BFt&&void 0!==t.eOt&&(this.BFt=t.eOt),void 0===this.DFt&&void 0!==t.fLt&&(this.DFt=t.fLt),void 0===this.NFt&&void 0!==t.sOt&&(this.NFt=t.sOt),this.MFt=t.$Lt,this.LFt=t.tOt,this.OFt=t.iOt,this.FFt=t.IOt,this.pAt(t),this.rUt(t);var i=Ui(t.ROt,function(t){return t.Km===LG.SLt}),r=Ui(t.ROt,function(t){return t.Km===LG.TLt});this.eUt=i?{nyt:i.nyt,Km:i.Km,kOt:t.kOt}:void 0,this.sUt=r?{nyt:r.nyt,Km:r.Km,kOt:t.kOt}:void 0,this.qFt=Vn.Mg()/1e3;var e=this.N4.An(this.N4.V-1);this.hUt();var s=this.N4.An(this.N4.V-1);(!this.GFt||s-e>0)&&(this.GFt=this.qFt),null!=this.MU||(this.MU=t.Tn)},n.hUt=function(){this.RFt=this.oUt(),this.N4=this.aUt(this.RFt),this.WA=this.uUt()},n.oUt=function(){var t=this.ect;if(0===t.length)return TA.iL();var n=t[0].EO,i=t[t.length-1].PO;return new TA([n,i])},n.aUt=function(t){if(0===t.V||this.POt)return t;var n=t.Tn(0),i=t.An(0)-this.cSt;return i0&&this.fAt.splice(0,n.fUt);var s=t.hOt;if(s>0){if(s>this.fAt.length)throw new Cj("New playlist skips over missing segments.");var u=this.fAt[s-1];if(void 0===u.ct)throw new Cj("New playlist skips over an incomplete segment.");i=u.nFt+u.ct,e=u.kOt-t.kOt,r=s;for(var o=0;o0&&void 0===w.bOt)w=Yu({},w,{bOt:this.fAt[this.fAt.length-1].bOt});var g=new Ij(i,d,a,f,w);g.KOt=this.sFt,this.fAt.push(g)}void 0!==v&&(i+=v)}}},n.lUt=function(t){if(0===this.fAt.length)return{fUt:0,vUt:0};var n=this.fAt[0].aOt,i=this.fAt[this.fAt.length-1].aOt,r=t.ect[0].aOt-t.hOt,e=t.ect[t.ect.length-1].aOt,s=0,u=0;if(r0&&(s=a)}}return{fUt:s,vUt:u}},n.rUt=function(t){var n=t.EOt.map(zG);if(t.iOt&&t.BOt.rD===Rj.gFt&&(n=this.XFt.concat(n)),this.XFt=xj(n),t.oOt)for(var i,r,e=function(){var t=r.value,n=Hi(i.XFt,function(n){return n.o===t});n>=0&&qi(i.XFt,n)},s=Lt(t.oOt);!(r=s()).done;)i=this,e()},n._Ut=function(t,n){if(this.sFt!==t){this.sFt=t;for(var i,r=Lt(this.fAt);!(i=r()).done;){i.value.KOt=this.sFt}this.hUt()}this.YFt=n},n.dUt=function(){this.sFt=void 0,this.YFt=void 0},Nt(t,[{key:"POt",get:function(){return 0!==this.fAt.length&&this.fAt[this.fAt.length-1].ZOt}},{key:"ct",get:function(){return this.WA}},{key:"Sx",get:function(){return this.N4}},{key:"IFt",get:function(){return this.RFt}},{key:"vLt",get:function(){return this.CFt}},{key:"fLt",get:function(){return this.DFt}},{key:"eOt",get:function(){return this.POt?0:this.BFt?this.BFt:this.CFt?3*this.CFt:void 0}},{key:"sOt",get:function(){var t;return null!=(t=this.NFt)?t:this.DFt?3*this.DFt:void 0}},{key:"$Lt",get:function(){return this.MFt}},{key:"tOt",get:function(){return this.LFt}},{key:"iOt",get:function(){return this.OFt}},{key:"IOt",get:function(){return this.FFt}},{key:"UFt",get:function(){return void 0!==this.fLt}},{key:"VFt",get:function(){if(this.POt)return!0;var t=Vn.Mg()/1e3,n=this.HFt,i=this.WFt;return void 0!==n&&t-nt)return ut.reject(new jj);for(var n,i=[],r=Lt(this.yUt);!(n=r()).done;){var e,s=n.value;if(s0&&this.LUt.every(function(n){return t.IUt.some(function(t){return t.Lot===n})})},n.bUt=function(t){if(this.pUt.has(t))return this.pUt.get(t);var n={bU:void 0,AUt:new Vc,IUt:[]};return this.pUt.set(t,n),n},n.OUt=function(t){var n=this;this.LUt=t,this.pUt.forEach(function(t,i){return n.NUt(t,i)})},n.FUt=function(){this.xUt=-1},n.wUt=function(){return this.xUt},n.zg=function(){this.pUt.forEach(function(t){return t.AUt.Zg()}),this.pUt.clear()},t}();function Yj(t){return void 0!==t.bU}function Kj(t,n){return-function(t,n){if(t.BUt||n.BUt)return function(t,n){var i=t.lF(n);return t.vF()||n.vF()||(i.nF(k_())?i=i.lF(p_()):i.aF(k_().dF())&&(i=i.lO(p_()))),i}(t.RUt,n.RUt).sF(g_.wF);return t.RUt.sF(n.RUt)}(t,n)||function(t,n){return t.DUt===n.DUt?Ni.rh:t.DUt?Ni.Fg:Ni.Ug}(t,n)||function(t,n){return t.CUt.sF(n.CUt)}(t,n)}var Jj=function(){function t(t,n){this.WUt=[],this.VUt=[],this.YUt=Ju(),this.qUt=new Qj,this.cUt=void 0,this.tVt=void 0,this.tVt=t,this.cUt=n}var n=t.prototype;return n.iFt=function(t,n){if(OG(t))if(0===this.WUt.length)this.zUt(t);else{if(!n)return void _G.cLt("HLSModel","No rendition was provided to update the playlist. Ignoring the update.");n.IMt.iFt(t)}else{if(0!==this.WUt.length)return void _G.cLt("HLSModel","Master playlist can only be applied once. Ignoring the update.");this.GUt(t)}},n.zUt=function(t){var n=this.XUt(t.nyt);n.iFt(t);var i=this.jUt(MG.Dk,n),r=this.jUt(MG.Bk,n),e=new Aj({nyt:n.nyt,kW:0,tyt:0,iyt:NaN,frt:void 0,uCt:void 0,plt:0,WLt:[],GLt:void 0,QLt:void 0,qLt:void 0,jLt:void 0,XLt:void 0,zLt:void 0},n,[i,r]);this.WUt.push(e)},n.GUt=function(t){var n,i,r=function(){var i=e.value,r=s.filter(function(t){return function(t,n){return Zj(t.Km,t.BMt,n)&&(!t.MMt||t.IMt.nyt===n.nyt)}(t,i)});n.KUt(i,r);var u=new Aj(i,n.XUt(i.nyt,t.Tn),r);n.WUt.push(u)};(i=this.VUt).push.apply(i,[].concat(t.MW));for(var e,s=this.QUt(t),u=Lt(t.mOt);!(e=u()).done;)n=this,r()},n.XUt=function(t,n){var i=this.YUt.get(t);return void 0===i&&(i=new Hj(t,n,this.cUt),this.YUt.set(t,i)),i},n.QUt=function(t){for(var n,i=[],r=Lt(t.KD);!(n=r()).done;){var e=n.value;if(void 0===e.nyt)for(var s,u=Lt(t.mOt);!(s=u()).done;){var o=s.value;if(Zj(e.Km,e.BMt,o)){var h=new rG(e,this.XUt(o.nyt));i.push(h)}}else{var c=new rG(e,this.XUt(e.nyt));i.push(c)}}return i},n.jUt=function(t,n){return new rG({Km:t,nyt:void 0,BMt:"",bs:void 0,HLt:void 0,l:"",RMt:!0,CMt:!1,DMt:!1,LMt:void 0,NMt:void 0,hCt:void 0},n)},n.KUt=function(t,n){var i=n.filter(function(t){return t.Km===MG.Dk}),r=n.filter(function(t){return t.Km===MG.Bk}),e=t.frt&&(t.frt.bCt||t.frt.yCt);if((!e||t.frt.bCt)&&0===r.length){var s=this.jUt(MG.Bk,this.XUt(t.nyt));n.push(s)}if((!e||t.frt.yCt)&&0===i.length){var u=this.jUt(MG.Dk,this.XUt(t.nyt));n.push(u)}t.frt&&t.frt.ULt},n.JUt=function(t){for(var n,i=Lt(this.WUt);!(n=i()).done;)for(var r,e=Lt(n.value.lLt);!(r=e()).done;){var s=r.value;if(s===t)return s}},n.ZUt=function(t){for(var n,i=Lt(this.WUt);!(n=i()).done;){var r=n.value;if(r===t)return r}},n.$Ut=function(t){for(var n,i=Lt(this.WUt);!(n=i()).done;){var r=n.value;if(ji(r.lLt,t))return r}},n.zg=function(){Yi(this.WUt),Yi(this.VUt),this.YUt.clear(),this.qUt.zg()},Nt(t,[{key:"UUt",get:function(){return this.VUt}},{key:"HUt",get:function(){return this.WUt}},{key:"mM",get:function(){return this.qUt}}]),t}();function Zj(t,n,i){switch(t){case MG.Dk:return i.qLt===n;case MG.Bk:return i.jLt===n;case MG.OU:return i.XLt===n;case MG.bLt:return i.zLt===n}return!1}F(),Et(),Dt();var $j=function(t){function n(n){var i;return(i=t.call(this,rQ.iVt)||this).UMt=void 0,i.UMt=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var tQ=function(t){function n(n){var i;return(i=t.call(this,rQ.eVt)||this).UMt=void 0,i.UMt=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var nQ=function(t){function n(){return t.call(this,eh.ey)||this}return Ct(n,t),n}(rh),iQ="HlsModelUpdater",rQ=function(t){return t.iVt="sVt",t.eVt="nVt",t}({}),eQ=function(t){function n(n,i,r,e,s){var u;return(u=t.call(this)||this).nV=void 0,u.eut=void 0,u.FSt=void 0,u.uyt=void 0,u.hVt=void 0,u.aVt=void 0,u.bVt=void 0,u.cVt=void 0,u.AVt=void 0,u.nV=n,u.eut=i,u.FSt=r,u.hVt=!1,u.aVt=!1,u.bVt=void 0,u.cVt=void 0,u.AVt=Zu(),u.uyt=new Jj(e,s),u}Ct(n,t);var i=n.prototype;return i.dVt=function(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:if(!(n=this.uyt.tVt))throw new y("HLSModelUpdater - Could not load HLS playlist: The provided source is empty.");return this.So(new GR),[4,this.lVt(n,{},2,!0,t)];case 1:if(i=e.sent(),!xG(r=i.IMt)&&!OG(r))throw new y("HLSModelUpdater - Could not load HLS playlist: The playlist is invalid.");return xG(r)||_G.hB(iQ,"Detected media playlist only HLS stream."),this.fVt(r),i.vVt?(this.aVt=!0,[4,this._Vt(t)]):[3,3];case 2:e.sent(),e.label=3;case 3:return this.hVt=!0,[2]}})}).call(this)},i.gVt=function(t,n,i,r){return Vt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(!(e=this.uyt.JUt(t)))throw new y("HLSModelUpdater - Could not load HLS playlist for rendition: the rendition does not exist on the internal model.");s={aOt:n,JFt:i,rD:hQ(e)},u=fe(b.max(1,3*t.IMt.WFt)),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,this.pVt(e,s,r,u)];case 2:return h.sent(),[3,4];case 3:throw lr(o=h.sent()),this.mVt(e),o;case 4:return[2]}})}).call(this)},i.wVt=function(t,n){var i=this.uyt.JUt(t);if(!i)throw new y("HLSModelUpdater - Could not load HLS playlist for rendition: the rendition does not exist on the internal model.");var r={aOt:void 0,JFt:void 0,rD:hQ(i)},e=fe(b.max(1,3*t.IMt.WFt));return this.pVt(i,r,n,e)},i.yVt=function(t,n){return this.AVt.has(t.jI)||this.AVt.set(t.jI,new Vc),gr(this.AVt.get(t.jI).Qy,n)},i.mVt=function(t){this.So(new tQ(t))},i.pVt=function(t,n,i,r){return Vt(function(){var e,s,u,o,h;return zt(this,function(c){switch(c.label){case 0:e=t.IMt.hLt(n),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this.lVt(e,n,0,this.aVt,i,r)];case 2:return u=c.sent(),s=u.IMt,[3,4];case 3:throw lr(o=c.sent()),t.IMt.jFt=Vn.Mg(),o;case 4:if(!OG(s))throw new y("HLSModelUpdater - Could not load HLS playlist for rendition: the playlist is not a media playlist.");if(!this.bVt||t===this.bVt||this.bVt.IMt.VFt)return[3,8];c.label=5;case 5:return c.trys.push([5,7,,8]),[4,this.wVt(this.bVt,i)];case 6:return c.sent(),[3,8];case 7:return lr(c.sent()),this.bVt=t,this.SVt(),[3,8];case 8:try{this.fVt(s,t)}catch(e){if(V(e,Cj)&&void 0!==n.rD)return h=Yu({},n,{rD:void 0}),[2,this.pVt(t,h,i,r)];throw e}return this.bVt=t,[2]}})}).call(this)},i.lVt=function(t,n,i,r,e,s){return Vt(function(){var u;return zt(this,function(o){switch(o.label){case 0:return _G.hB(iQ,"Loading HLS playlist at "+t+"."),r?[4,this.TVt(t,e)]:[3,2];case 1:if(void 0!==(u=o.sent()))return[2,{IMt:u,vVt:!0}];o.label=2;case 2:return[4,this.kVt(t,n,i,e,s)];case 3:return[2,{IMt:o.sent(),vVt:!1}]}})}).call(this)},i.TVt=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.eut.HSt([t])];case 1:return i=r.sent(),dr(n),void 0!==i?[2,bj(i.responseURL,{},i.data)]:[3,3];case 2:return lr(r.sent()),[3,3];case 3:return[2]}})}).call(this)},i.kVt=function(t,n,i,r,e){return Vt(function(){var s,u,o;return zt(this,function(h){switch(h.label){case 0:return s=this,u={Yu:t,dk:Md.NT,zk:this.FSt,Uk:wl.GET,Km:gl.wk,Yg:r,Vk:e},[4,gT(function(){return s.EVt(u)},r,i)];case 1:return[2,bj((o=h.sent()).gk,n,o.ck)]}})}).call(this)},i.EVt=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.nV.lk(t)];case 1:return[4,(n=r.sent()).UT()];case 2:return[2,{ck:r.sent(),gk:n.gk}];case 3:throw vr(i=r.sent())||this.So(new nQ),i;case 4:return[2]}})}).call(this)},i._Vt=function(t){return Vt(function(){var n,i,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:for(dr(t),n=[],i=Lt(this.uyt.HUt);!(r=i()).done;)for(e=r.value,s=Lt(e.lLt);!(u=s()).done;)o=u.value,n.push(this.PVt(o,t));return[4,ut.all(n)];case 1:return h.sent(),[2]}})}).call(this)},i.PVt=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,4,,5]),[4,this.eut.HSt([t.IMt.nyt])];case 1:return i=r.sent(),dr(n),void 0===i||t.IMt.VFt?[3,3]:[4,this.wVt(t,n)];case 2:r.sent(),r.label=3;case 3:return[3,5];case 4:return lr(r.sent()),[3,5];case 5:return[2]}})}).call(this)},i.SVt=function(){for(var t,n=Lt(this.uyt.HUt);!(t=n()).done;)for(var i,r=Lt(t.value.lLt);!(i=r()).done;){var e=i.value;e!==this.bVt&&(void 0!==e.IMt.KOt&&(e.IMt.VFt?this.xVt(e):e.IMt.dUt()))}},i.xVt=function(t){if(0!==t.IMt.ect.length){if(!this.bVt)return this.bVt=t,void this.bVt.IMt._Ut(0,void 0);if(this.IVt(this.bVt),!this.IVt(t)&&void 0===t.IMt.KOt){var n=this.RVt(t,this.bVt);_G.uLt(iQ,"Assuming global timeline offset of "+n+"s for rendition "+t.IMt.nyt+"."),t.IMt._Ut(n,void 0)}}},i.RVt=function(t,n){if(sQ(t)){var i=t.IMt.ect[0],r=n.IMt.ect[0];return _G.uLt(iQ,"Synchronizing by start of VOD: "+r.EO+" vs "+i.EO),r.EO-i.nFt}var e=function(t,n){var i=t.length-1,r=n.length-1;for(;i>=0&&r>=0;){var e=t[i],s=n[r];if(e.kOt>s.kOt)i--;else if(e.kOt=t.IMt.tOt/2))return t.IMt.iOt?Rj.gFt:Rj._Ft}var cQ=function(t){function n(n,i){var r;return(r=t.call(this,i)||this).Fkt=void 0,r.BVt=void 0,r.NVt=function(t){r.rUt(t.UMt)},r.Fkt=n,r.Fkt.wn(rQ.iVt,r.NVt),r}Ct(n,t);var i=n.prototype;return i.rUt=function(t){if(0!==t.IMt.EOt.length){this.BVt||(this.BVt=this.JU.tI(Ym.VU,void 0,void 0,void 0,void 0,Dg.DATE_RANGE),this.tt(this.BVt));Bj(this.BVt,t.IMt.EOt,function(n){var i;return null!=(i=t.IMt.qOt(n))?i:NaN})}},i.ZU=function(t,n,i){var r=vy(t,n,i);return this.BVt===t&&(this.BVt=r),r},n}(fy);F(),Et(),Dt();var aQ=function(t){function n(){return t.call(this,iG.TMt)||this}return Ct(n,t),n}(rh);F(),Et(),Bt(),Ut(),F(),Et(),Wt(),Bt(),Qt(),F(),Et(),Bt();var fQ=function(){function t(t){this.Trt=void 0,this.fAt=void 0,this.Y2=void 0,this.dpt=void 0,this.Trt=t,this.fAt=[],this.Y2=void 0,this.dpt=void 0}var n=t.prototype;return n.LVt=function(t){var n;return null==(n=this.OVt(t))?void 0:n.UMt},n.FVt=function(t){this.Y2=t,this.UVt()},n.Odt=function(t,n,i,r,e,s){this.fAt.push({UMt:t,$at:n,VVt:TA.tL(e,s),HVt:TA.tL(i,r)}),this.UVt()},n.OVt=function(t){return Ui(this.fAt,function(n){return n.HVt.Cr(t)})},n.mat=function(t){return Ui(this.fAt,function(n){return n.$at===t})},n.Rct=function(t,n){return Ui(this.fAt,function(i){return i.UMt===t&&Gj(i.$at,n)})},n.C3=function(){var t=this.IP;t.V>0&&(this.dpt=t.An(t.V-1))},n.UVt=function(){var t=this.Trt.IP;this.fAt=this.fAt.filter(function(n){return 0!==t.Mn(n.HVt).V})},Nt(t,[{key:"MVt",get:function(){return this.Y2}},{key:"IP",get:function(){return LO(this.Trt.IP,this.Trt.M3)}},{key:"ect",get:function(){return this.fAt}},{key:"_pt",get:function(){return this.dpt}}]),t}();F(),Et();var vQ=188,dQ=function(t){return t[t.pk=0]="pk",t[t.fR=1]="fR",t[t.WVt=2]="WVt",t[t.qVt=3]="qVt",t}({});function lQ(t){return wQ(t)?1:function(t){return function(t){if(t.length<376)return-1;for(var n=t.length<564?2:3,i=b.min(1e3,t.length-n*vQ),r=0;r<=i;r++){for(var e=!0,s=0;s=0}(t)?2:function(t){return null!==BP(_c(t),new Tc)}(t)?3:0}function wQ(t){var n=wc(t,0,b.min(t.length,16384));return ym.ED(_c(n))}var gQ=function(){function t(t,n,i,r,e,s,u){var o=this;this.$y=void 0,this.Dot=void 0,this.nHt=void 0,this.Vp=void 0,this.wpt=void 0,this.hBt=void 0,this.vHt=void 0,this.jVt=void 0,this.nT=new hr,this.XVt=TA.iL(),this._Ht=void 0,this.Ugt=void 0,this.eHt=!0,this.KVt=!1,this.rHt=function(t){o.jVt&&(t?ZI(t)&&_Q(o)?o.vHt.YY(o.$y.IP.ZM)?o.jVt.Xy():o.jVt.jy(t):vr(t)?o.jVt.Xy():(o.KVt=!0,o.jVt.jy(t)):o.jVt.Xy(),o.jVt=void 0)},this.Vp=t,this.nHt=i,this.$y=n,this.Dot=r,this.vHt=e,this.wpt=s,this.hBt=u}var n=t.prototype;return n.YVt=function(){if(this.$It)throw new y("Cannot perform new operation while BufferAppender is still busy")},n.JVt=function(t){this.$y!==t&&(this.YVt(),this.$y=t,this.Dot=new fQ(t))},n.ZVt=function(){return this.jVt?this.jVt.Qy:ut.resolve()},n.$Vt=function(t){var n=this.Dot._pt;return void 0!==n&&this.tHt(t,n)},n.tHt=function(t,n){var i,r,e=b.min(t,n);return null!=(r=null==(i=this.Dot.IP.CM().UM(this.GVt).JM(e))?void 0:i.Cr(n))&&r},n.iHt=function(t){return this.Dot.LVt(t)},n.Zg=function(){this.nT.Zg(),this.nT=new hr,this.eHt=!0},n.z2=function(t){var n=this;this.YVt(),this.jVt=new Vc;var i=function(i){n.nHt.sHt(t),n.rHt(i)};this.G2(t,this.nT.Yg).then(i,i)},n.G2=function(t,n){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return _G.uLt(pG,"Appending initializer",VG(t.hHt.nyt)),this.Ugt=t,[4,this.$y.z2(t,n)];case 1:return i.sent(),void 0!==this.hBt&&this.Vp===ig.Bk&&wQ(t.ck.ck)&&this.hBt.Jrt(t.ck.ck),_G.uLt(pG,"Appended initializer",VG(t.hHt.nyt)),this.eHt=!1,this.Dot.FVt(t),[2]}})}).call(this)},n.cdt=function(t){var n=this;this.YVt(),this.jVt=new Vc;var i=function(i){n.nHt.sHt(t),n.rHt(i)};this.oHt(t,this.nT.Yg).then(i,i)},n.oHt=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c,a;return zt(this,function(f){switch(f.label){case 0:if(void 0===(i=t.UMt).IMt.vLt)throw new y("HlsBufferAppender: Cannot append HLSAsset to "+this.Vp+" buffer for a HLSRendition with an undefined targetDuration.");return this.eHt&&void 0!==this.Ugt?[4,this.G2(this.Ugt,n)]:[3,2];case 1:f.sent(),f.label=2;case 2:return r=this.Dot.IP.kM,e=this.$y.IP,_G.uLt(pG,"Appending",VG(t.hHt.nyt)),[4,this.$y.H2(t,n)];case 3:return f.sent(),void 0!==t.ck&&this.aHt(t.ck,t),_G.uLt(pG,"Appended",VG(t.hHt.nyt),r,this.Dot.IP.kM),s=t.EO,u=s+t.ct,o=t.hHt,h=o.EO,a=o.EO+(null!=(c=o.ct)?c:0),this.Dot.Odt(i,o,s,u,h,a),this.uHt(i,o,s,u,e),t.hHt.ZOt&&this.Dot.C3(),[2]}})}).call(this)},n.uHt=function(t,n,i,r,e){if(this.Km===ig.Bk){var s=this.$y.IP.UM(e),u=this.Dot.Rct(t,n);if(u)if(this.cHt(u))if(0===s.V){if(void 0===this.Dot.mat(n)){var o=this.$y.M3.Mn(new TA([i,r]));this.XVt=this.XVt.OM(o)}}else{var h=s.Tn(0),c=new TA([h,r]);if(this.XVt=this.XVt.UM(c),h>i){var a=this.$y.M3.Mn(new TA([i,h]));this.XVt=this.XVt.OM(a)}}else{var f=s.V>0&&s.Tn(0)i?w:i;if(l>g){var _=this.$y.M3.Mn(new TA([g,s.Tn(0)]));this.XVt=this.XVt.OM(_)}}}},n.cHt=function(t){var n=t.HVt,i=n.Tn(0),r=n.An(n.V-1),e=n.PM(0),s=n.IM(n.V-1);return this.XVt.HM(i,r,e,s)},n.aHt=function(t,n){var i;if(wQ(t.ck)){var r=n.EO,e=r+n.ct,s=n.bU;if(null==(i=this.wpt)||i.Odt(t.ck,r,s),void 0!==this.hBt&&this.Vp===ig.Bk){var u=n.hHt.ZOt;this.hBt.Odt(t.ck,r,e,s,n.UMt,u)}var o=[];void 0!==this.wpt&&o.push(this.wpt),void 0!==this.hBt&&o.push(this.hBt),ay(this.$y.IP,o)}},n.dHt=function(t){this.YVt(),this.jVt=new Vc;try{_G.uLt(pG,"Appending gap from "+t.lHt+" to "+t.fHt,VG(t.$at.nyt)),this.F3(t.lHt,t.fHt)}finally{this.nHt.sHt(t),this.rHt()}},n.F3=function(t,n){this.$y.F3(t,n)},Nt(t,[{key:"Km",get:function(){return this.Vp}},{key:"zVt",get:function(){return this.Dot}},{key:"GVt",get:function(){return this.XVt}},{key:"$It",get:function(){return void 0!==this.jVt}},{key:"QVt",get:function(){return this.KVt}}]),t}();function _Q(t){return rg(t.Km)}F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et(),Wt(),Qt();var mQ=function(){function t(t,n,i){this.mHt=void 0,this.nV=void 0,this.FSt=void 0,this.wHt=void 0,this.mHt=t,this.nV=n,this.FSt=i,this.wHt=void 0}var n=t.prototype;return n.gHt=function(t,n,i,r){return Vt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,this.pHt(n,r)];case 1:return e=s.sent(),[4,this.mHt.gHt(t,e,i)];case 2:return[2,s.sent()]}})}).call(this)},n.pHt=function(t,n){return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:return(null==(i=this.wHt)?void 0:i.Yu)===t?[3,3]:(_G.uLt("HLSDecryptor","Fetching new AES-128 decryption key from "+t+"."),[4,this.nV.lk({Yu:t,dk:Md.CT,Uk:wl.GET,Yg:n,Km:gl.bk,Wk:_l.Ck,zk:this.FSt})]);case 1:return[4,s.sent().HT()];case 2:r=s.sent(),e=new E(r),this.wHt={Yu:t,ck:e},s.label=3;case 3:return[2,this.wHt.ck]}})}).call(this)},t}();F(),Et(),Wt(),Qt();var yQ=function(){function t(t,n,i,r,e){void 0===e&&(e=2),this.nV=void 0,this.eut=void 0,this.Tat=void 0,this.FSt=void 0,this.rrt=void 0,this.nV=t,this.eut=n,this.Tat=i,this.FSt=r,this.rrt=e}var n=t.prototype;return n.lk=function(t,n,i,r,e){return Vt(function(){var s,u;return zt(this,function(o){switch(o.label){case 0:return[4,this.yHt(t,n,i,Md.CT,r,e)];case 1:return[4,(s=o.sent()).HT(e)];case 2:return u=o.sent(),[2,{httpStatusCode:s.hk,response:new E(u)}]}})}).call(this)},n.AHt=function(t,n,i,r,e){return Vt(function(){return zt(this,function(s){switch(s.label){case 0:return[4,this.yHt(t,n,i,Md.BT,r,e)];case 1:return[2,s.sent().WT(e)]}})}).call(this)},n.yHt=function(t,n,i,r,e,s){return Vt(function(){var u,o,h,c,a;return zt(this,function(f){switch(f.label){case 0:u=this,t.LAt&&0===(o=BG(t.LAt.Tn,t.LAt.V))[0]&&o[1]===bi&&(o=void 0),h=o?{Range:"bytes="+o[0]+"-"+o[1]}:void 0,c=new pl({Yu:t.zE,dk:r,fk:h,zk:this.FSt,Uk:wl.GET,Km:n,Wk:i,qk:this.Tat,jk:r===Md.BT,Gk:e,Yg:s}),f.label=1;case 1:return f.trys.push([1,3,,4]),[4,this.eut.iut(t.zE,o)];case 2:return a=f.sent(),dr(s),void 0!==a?(null==e||e(a.buffer.byteLength,a.buffer.byteLength),[2,new ll({lk:c,dk:c.dk,ck:a.buffer})]):[3,4];case 3:return lr(f.sent()),[3,4];case 4:return[4,gT(function(){return gr(u.nV.lk(c),c.Yg)},s,this.rrt)];case 5:return[2,f.sent()]}})}).call(this)},t}();F(),Et(),Wt(),Qt();var pQ=function(){function t(t,n){this.Fkt=void 0,this.SHt=void 0,this.IHt=void 0,this.DHt=new hr,this.En=-1/0,this.kHt=void 0,this.RHt=!1,this.Fkt=t,this.SHt=n,this.PHt()}var n=t.prototype;return n.bHt=function(){return this.SHt.IMt.$Lt},n.THt=function(t,n,i){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:if(!this.bHt())throw new y("Could not perform blocking playlist update.");return r=this.kHt,e={aOt:t,JFt:n},void 0!==r&&function(t,n,i){if(t.aOt===n.aOt){if(t.JFt===n.JFt)return!0;if(0===t.JFt&&void 0===n.JFt)return!0}if(t.aOt===n.aOt+1&&0===t.JFt&&void 0!==n.JFt){var r=i.mat(n.aOt);if(r&&r.nyt&&n.JFt>=r.yOt.length)return!0}return!1}(r,e,this.SHt.IMt)?[3,2]:[4,this.EHt()];case 1:s.sent(),this.PHt(e),s.label=2;case 2:return[2,this.Fkt.yVt(this.SHt,i)]}})}).call(this)},n.xHt=function(t){return this.PHt(),this.Fkt.yVt(this.SHt,t)},n.PHt=function(t){var n=this;if(!this.IHt&&!this.RHt){var i=function(){n.IHt=void 0};this.IHt=this.CHt(t,this.DHt.Yg).then(i,i)}},n.EHt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.IHt?(this.DHt.Zg(),this.DHt=new hr,[4,this.IHt.catch(di)]):[3,2];case 1:t.sent(),this.IHt=void 0,t.label=2;case 2:return[2]}})}).call(this)},n.CHt=function(t,n){return Vt(function(){var i,r,e,s;return zt(this,function(u){switch(u.label){case 0:i=t,u.label=1;case 1:if(dr(n),this.SHt.IMt.POt&&this.SHt.IMt.VFt)return[2];null!=i||(i=this.BHt()),this.kHt=i,u.label=2;case 2:return u.trys.push([2,9,,10]),i?[4,this.Fkt.gVt(this.SHt,i.aOt,i.JFt,n)]:[3,4];case 3:return u.sent(),[3,8];case 4:return r=Vn.Mg()-this.En,e=1e3*this.SHt.IMt.WFt,r=t)return!0;if(e=t},n.LHt=function(t,n){for(var i=[],r=0;r0?(c=kc(s,0,h),a=kc(s,h),_G.uLt(bQ,"Of the read "+u+" bytes, the first "+h+" will be stored locally for extraction of "+VG(this.rFt)),this.XHt.FHt(e,c),a.length>0?(_G.uLt(bQ,"Extracting "+a.length+" bytes for extraction of "+VG(this.rFt)),t.enqueue(a),this.qHt(),[2,kr(this.readAndSliceOutAssetBytes(t))]):[3,9]):[3,5];case 5:return e+u<=r?(_G.uLt(bQ,"Extracting the read data range for extraction of "+VG(this.rFt)),t.enqueue(s),this.qHt(),[2,kr(this.readAndSliceOutAssetBytes(t))]):[3,6];case 6:return v=kc(s,0,f=r-e),d=kc(s,f),v.length>0&&(_G.uLt(bQ,"Extracting "+v.length+" bytes for extraction of "+VG(this.rFt)),t.enqueue(v)),_G.uLt(bQ,"Of the read "+u+" bytes, the last "+d.length+" will be stored locally for extraction of "+VG(this.rFt)),this.XHt.FHt(e+f,d),_G.uLt(bQ,"Extraction of "+VG(this.rFt)+" completed as the entire request has been fulfilled."),this.QHt(t),this.KHt?(_G.uLt(bQ,"Aborting stream upstream as no more bytes are needed from "+VG(this.rFt)+"."),[4,this.Wd.WHt("AssetExtraction - AbortOnEnd")]):[3,8];case 7:l.sent(),l.label=8;case 8:return[2];case 9:return[3,3];case 10:return[3,12];case 11:return l.sent(),_G.uLt(bQ,"Extraction of "+VG(this.rFt)+" completed as the entire source stream has been read."),this.QHt(t),[3,12];case 12:return[2]}})}).call(this)},n.QHt=function(t){t.close(),this.qHt(),this.YHt.Xy()},n.start=function(t){_G.uLt(bQ,"Preparing to push all collected data to controller for extraction of "+VG(this.rFt)),this.GHt(t),_G.uLt(bQ,"Collected data pushed to controller for extraction of "+VG(this.rFt));var n=IQ(this.rFt.LAt).FAt;this.Wd.UHt>=n?(_G.uLt(bQ,"Extraction of "+VG(this.rFt)+" completed as the entire request has been fulfilled."),this.QHt(t)):(_G.uLt(bQ,"Continuing read from original stream for extraction of "+VG(this.rFt)),kr(this.readAndSliceOutAssetBytes(t)))},n.pull=function(){return this.jHt.Xy(),this.jHt=new Vc,this.zHt.Qy},Nt(t,[{key:"JHt",get:function(){return this.YHt.Qy}}]),t}(),EQ=function(){function t(t,n){this.rFt=void 0,this.XHt=void 0,this.ZHt=void 0,this.$Ht=void 0,this.rFt=n;var i=IQ(this.rFt.LAt).OAt;this.ZHt=new TQ(t,i),this.XHt=new AQ}var n=t.prototype;return n.fO=function(t){if(!HG(this.rFt,t))return!1;var n=IQ(t.LAt),i=n.OAt,r=n.FAt;return this.XHt.NHt(this.ZHt.UHt,i,r)},n.ygt=function(t,n){return void 0===n&&(n=!1),Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:return i=this.ZHt,r=this.XHt,_G.hB(bQ,"Extracting data from "+VG(t)+" out of "+VG(this.rFt)),this.$Ht?(_G.uLt(bQ,"Awaiting previous extraction before extracting "+VG(t)+" out of "+VG(this.rFt)),[4,this.$Ht]):[3,2];case 1:s.sent(),s.label=2;case 2:if(!this.fO(t))throw new y("The extractor does not contain the data requested");return e=new SQ(t,i,r,n),this.$Ht=e.JHt,[2,new Xd(e)]}})}).call(this)},t}();function IQ(t){if(t){var n=t.Tn;return{OAt:n,FAt:void 0!==t.V?n+t.V:bi}}return{OAt:0,FAt:bi}}var RQ=function(){function t(t,n){this.rFt=void 0,this.tWt=void 0,this.nT=void 0,this.Dpt=void 0,this.rFt=t,this.tWt=n,this.nT=new hr,this.Dpt=this.Un()}var n=t.prototype;return n.Un=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return[4,this.tWt.AHt(this.rFt,gl.Ak,_l.pk,void 0,this.nT.Yg)];case 1:return t=n.sent(),[2,new EQ(t,this.rFt)]}})}).call(this)},n.fO=function(t){return HG(this.rFt,t)},n.ygt=function(t,n){return void 0===n&&(n=!1),Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.Dpt];case 1:return[4,gr(i.sent().ygt(t,n),this.nT.Yg)];case 2:return[2,i.sent()]}})}).call(this)},n.Zg=function(){this.Dpt.catch(di),this.nT.Zg()},t}();F(),Et(),Dt();var CQ=function(t){function n(n){var i;return(i=t.call(this,MQ.iWt)||this).qk=void 0,i.qk=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var DQ=function(t){function n(n,i,r,e,s,u,o){var h;return(h=t.call(this,MQ.eWt)||this).uri=void 0,h.sWt=void 0,h.qk=void 0,h.mediaSequenceNumeber=void 0,h.mediaTrackId=void 0,h.nWt=void 0,h.httpStatusCode=void 0,h.uri=n,h.sWt=i,h.qk=r,h.mediaSequenceNumeber=e,h.mediaTrackId=s,h.nWt=u,h.httpStatusCode=o,h}return Ct(n,t),n}(rh);function PQ(t,n,i){var r=Xj(i)?i:i.tFt;if(n.gUt(r.kOt)){if(void 0!==i.xet)return n.kUt(i.xet,i).iF();if(i!==r&&void 0!==r.xet){var e=n.kUt(r.xet,r).iF();return i.EO+(e-r.EO)}}var s=t.IMt.mat(r.aOt-1);if(void 0!==s&&n.gUt(s.kOt)){if(s.yOt.length>0){var u=s.uFt(s.yOt.length-1);if(void 0!==u.xet){var o=n.kUt(u.xet,u).iF();return i.EO+(o-u.EO)}}if(void 0!==s.xet){var h=n.kUt(s.xet,s).iF();return i.EO+(h-s.EO)}}var c=t.IMt.mat(r.aOt+1);if(void 0!==c&&n.gUt(c.kOt)){if(c.yOt.length>0){var a=c.uFt(0);if(void 0!==a.xet){var f=n.kUt(a.xet,a).iF();return i.EO+(f-a.EO)}}if(void 0!==c.xet){var v=n.kUt(c.xet,c).iF();return i.EO+(v-c.EO)}}return i.EO}function NQ(t){return void 0!==t.xet}function BQ(t,n,i,r){for(var e=n;e=0;e--){var s=t[e];if(s.kOt!==i)break;if(NQ(s))if(r(s,e))break}}F(),Et();var OQ="HlsPlaylistDownloader",MQ=function(t){return t.iWt="rWt",t.eWt="hWt",t}({}),LQ=function(t){function n(n,i,r,e,s,u,o,h){var c;return(c=t.call(this)||this).Vp=void 0,c.Fkt=void 0,c.nHt=void 0,c.tWt=void 0,c.QWt=void 0,c.SHt=void 0,c.aWt=void 0,c.uWt=void 0,c.vWt=void 0,c.KWt=void 0,c.YWt=0,c.JWt=0,c.ZWt=0,c.$Wt=0,c.pWt=new hr,c.mWt=void 0,c.cWt=0,c.dWt=void 0,c.lWt=void 0,c.fWt=!1,c.yWt=void 0,c.wWt=void 0,c.PWt=function(t){c.uWt&&(c.SHt=c.uWt,c.uWt=void 0,c.cWt=0,c.dWt=void 0,c.lWt=void 0,c.fWt=!1),c.vWt&&(t&&!vr(t)?c.vWt.jy(t):c.vWt.Xy(),c.vWt=void 0)},c.XWt=function(t,n){c.ZWt=t,t>0&&0===c.YWt&&(c.YWt=Vn.Mg()),void 0!==n&&(c.$Wt=n),c.So(new CQ(c.Vp))},c.Vp=n,c.Fkt=r,c.nHt=e,c.SHt=i,c.aWt=new pQ(r,i),c.QWt=new mQ(o,s,h),c.tWt=new yQ(s,u,function(t){switch(t){case MG.Bk:return ml.Bk;case MG.Dk:return ml.Dk;case MG.OU:case MG.bLt:return ml.NT;default:return ml.pk}}(i.Km),h),c}Ct(n,t);var i=n.prototype;return i.oWt=function(t){this.aWt.zg(),this.aWt=new pQ(this.Fkt,t),this.$It?this.uWt=t:(this.SHt=t,this.cWt=0,this.dWt=void 0,this.lWt=void 0,this.fWt=!1)},i.ZVt=function(){return this.vWt?this.vWt.Qy:ut.resolve()},i.gWt=function(){return this.nHt.gWt()},i.Zg=function(){var t,n,i;this.pWt.Zg(),this.pWt=new hr,null==(t=this.mWt)||t.Zg(),this.mWt=void 0,null==(n=this.wWt)||n.Zg(),null==(i=this.yWt)||i.Zg(),this.wWt=void 0,this.yWt=void 0,this.cWt=0,this.dWt=void 0,this.lWt=void 0,this.fWt=!1},i.zg=function(){this.aWt.zg()},i.AWt=function(t){var n=this.SHt.IMt.$Ft(t);if(!n)return!1;if(void 0!==this.dWt){var i=n.aOt===this.dWt;return void 0!==this.lWt?n.cFt(t)===n.uFt(this.lWt)&&i:i}return!1},i.bWt=function(t){var n,i;if(!this._Wt&&(void 0===this.dWt||t=u&&(n=this.SWt(t))}else if(this.SHt.IMt.POt&&void 0!==this.dWt){if(this.SHt.IMt.mat(this.dWt).ZOt&&void 0!==(n=this.SWt(t))&&n[0].aOt===this.dWt)return}if(n){this.cWt=t;var o=n[0],h=n[1];return 0===(null==h?void 0:h.eFt)&&void 0!==o.ct?[o,void 0]:[o,h]}},i.SWt=function(t){var n,i,r=this.SHt.IMt.ect;if(0!==r.length){var e,s=this.Fkt.Br.mM,u=g_.eU(t),o=function(t,n,i){var r=t.IMt.ect;if(0!==r.length){var e=t.IMt.tUt(i.iF());if(n.gUt(e.kOt)){var s,u,o,h=e.aOt-r[0].aOt,c=e.kOt,a=0;if(!(xQ(r,h,c,function(t,n){return s=t,a=n,!0}),void 0===s&&(BQ(r,h+1,c,function(t,n){return s=t,a=n,!0}),void 0===s)||(n.kUt(s.xet,s).hF(i)?(u=s,BQ(r,a+1,c,function(t){return n.kUt(t.xet,t).eF(i)?(o=t,!0):(u=t,!1)})):(o=s,xQ(r,a-1,c,function(t){return n.kUt(t.xet,t).hF(i)?(u=t,!0):(o=t,!1)})),void 0===u||void 0===o)))return[u,o]}}}(this.SHt,s,u);if(void 0!==o){var h=o[0],c=o[1],a=s.kUt(h.xet,h),f=s.kUt(c.xet,c),v=u.lF(a).iF()/f.lF(a).iF()*(c.EO-h.EO);e=h.EO+v}else e=t;var d=r[r.length-1];return d.PO<=e?(n=d,i=d.lFt(e)):i=r[0].EO>e?(n=r[0]).uFt(0):null==(n=this.SHt.IMt.$Ft(e))?void 0:n.lFt(e),n?[n,i]:void 0}},i.TWt=function(t,n){var i,r;if((i=this.SHt.IMt.mat(t))&&void 0!==n){if(0===i.yOt.length)return[i,void 0];r=i.uFt(n+1)}return void 0!==i&&void 0!==r||(r=null==(i=this.SHt.IMt.mat(t+1))?void 0:i.uFt(0)),i?[i,r]:void 0},i.YVt=function(){if(this.$It)throw new y("Cannot perform new operation while PlaylistDownloader is still busy")},i.kWt=function(t){this.YVt(),this.vWt=new Vc,this.EWt(t,this.pWt.Yg).then(this.PWt,this.PWt)},i.xWt=function(){this.aWt.PHt()},i.EWt=function(t,n){return Vt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:return this.SHt.IMt.POt?[2]:(i=this.bWt(t))||!this.aWt.bHt()||void 0===this.dWt?[3,2]:[4,this.aWt.THt(void 0===this.lWt?this.dWt+1:this.dWt,void 0!==this.lWt?this.lWt+1:void 0,n)];case 1:e.sent(),i=this.bWt(t),e.label=2;case 2:return i||!this.aWt.bHt()||void 0===this.dWt?[3,4]:[4,this.aWt.THt(this.dWt+1,0,n)];case 3:e.sent(),i=this.bWt(t),e.label=4;case 4:return i?[3,6]:(_G.hB(OQ,"No next segment / part available, need to update playlist before continuing."),[4,this.aWt.xHt(n)]);case 5:return e.sent(),r=this.UMt.IMt.ect,r[0].EO>t&&(this.lWt=void 0,this.dWt=void 0,this.fWt=!1),r[r.length-1].aOt0&&this.ZWt>=this.$Wt)&&!(t-this.YWt<500)))},Nt(n,[{key:"$It",get:function(){return void 0!==this.vWt}},{key:"_Wt",get:function(){return this.fWt}},{key:"UMt",get:function(){var t;return null!=(t=this.uWt)?t:this.SHt}},{key:"ERt",get:function(){if(!this.SHt.IMt.POt||void 0===this.dWt)return!1;var t=this.SHt.IMt.mat(this.dWt);if(!t.ZOt)return!1;if(void 0!==this.lWt&&!t.uFt(this.lWt).ZOt)return!1;return!0}}]),n}(th);function UQ(t,n,i,r){return{ck:{ck:i,Km:FR.vZ},Km:kQ.SLt,Iut:r,hHt:t,kOt:n.kOt}}function FQ(t,n,i){return{ck:{ck:n,Km:FR.vZ},Km:kQ.yk,Iut:i,hHt:t,kOt:t.kOt}}function VQ(t,n,i){return{ck:{ck:n,Km:FR.vZ},Iut:i,Km:kQ.TLt,hHt:t,kOt:t.tFt.kOt}}F(),Et(),Bt(),Ut();var HQ=function(){function t(t){this.oqt=[],this.uqt=Ju(),this.qUt=void 0,this.dqt=void 0,this.rqt=void 0,this.qUt=t}var n=t.prototype;return n.UWt=function(t){"bOt"===t.Km&&(this.rqt=t.bOt),this.oqt.push(t),this.dqt&&(this.dqt.Xy(),this.dqt=void 0)},n.gWt=function(){return this.oqt[0]},n.lqt=function(t){Xi(this.oqt,t)},n.RWt=function(){return null!=this.dqt||(this.dqt=new Vc),this.dqt.Qy},n.fqt=function(t){this.vqt(t.Lot).fqt(t)},n._qt=function(t){return this.vqt(t)._qt()},n.sHt=function(t){this.vqt(t.Lot).sHt(t)},n.gqt=function(t){var n;null==(n=this.uqt.get(t))||n.zg()},n.pqt=function(t){return this.vqt(t).pqt()},n.vqt=function(t){if(this.uqt.has(t))return this.uqt.get(t);var n=new WQ;return this.uqt.set(t,n),n},n.Gy=function(){this.mqt(),this.wqt()},n.mqt=function(){this.rqt=void 0,Yi(this.oqt)},n.wqt=function(){this.uqt.forEach(function(t){return t.Gy()})},n.zg=function(){this.uqt.forEach(function(t){return t.zg()}),this.uqt.clear(),this.Gy(),this.dqt&&(this.dqt.Zg(),this.dqt=void 0)},Nt(t,[{key:"MVt",get:function(){return this.rqt}},{key:"hqt",get:function(){for(var t,n=[],i=Lt(this.oqt);!(t=i()).done;){var r=t.value;if("$at"===r.Km){var e,s=r.$at.hHt,u=PQ(r.UMt,this.qUt,s);n.push({$at:s,UMt:r.UMt,EO:u,PO:u+(null!=(e=s.ct)?e:0)})}else"zWt"===r.Km&&n.push({$at:r.$at,UMt:r.UMt,EO:r.lHt,PO:r.fHt})}return n}},{key:"aqt",get:function(){var t=[];return this.uqt.forEach(function(n){for(var i,r=Lt(n.cqt);!(i=r()).done;){var e=i.value;"$at"===e.Km?t.push({$at:e.hHt,UMt:e.UMt,EO:e.EO,PO:e.EO+e.ct}):"zWt"===e.Km&&t.push({$at:e.$at,UMt:e.UMt,EO:e.lHt,PO:e.fHt})}}),t}}]),t}(),WQ=function(){function t(){this.yqt=[],this.Aqt=void 0}var n=t.prototype;return n.fqt=function(t){this.yqt.push(t),this.Aqt&&(this.Aqt.Xy(),this.Aqt=void 0)},n._qt=function(){return this.yqt[0]},n.sHt=function(t){Xi(this.yqt,t)},n.pqt=function(){return null!=this.Aqt||(this.Aqt=new Vc),this.Aqt.Qy},n.Gy=function(){Yi(this.yqt)},n.zg=function(){this.Gy(),this.Aqt&&(this.Aqt.Zg(),this.Aqt=void 0)},Nt(t,[{key:"cqt",get:function(){return this.yqt}}]),t}();F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Dt();var zQ=function(t){function n(n,i){var r;return(r=t.call(this,QQ.bqt)||this).UMt=void 0,r.frt=void 0,r.UMt=n,r.frt=i,r}return Ct(n,t),n}(rh);F(),Et(),Dt();var XQ=function(t){function n(n){var i;return(i=t.call(this,QQ.Sqt)||this).UMt=void 0,i.UMt=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var qQ=function(t){function n(n,i){var r;return(r=t.call(this,QQ.Tqt)||this).UMt=void 0,r.plt=void 0,r.UMt=n,r.plt=i,r}return Ct(n,t),n}(rh);F(),Et(),Dt();var GQ=function(t){function n(n,i){var r;return(r=t.call(this,QQ.kqt)||this).UMt=void 0,r.Eqt=void 0,r.UMt=n,r.Eqt=i,r}return Ct(n,t),n}(rh);F(),Et(),Dt();var jQ=function(t){function n(){return t.call(this,QQ.Pqt)||this}return Ct(n,t),n}(rh),QQ=function(t){return t.bqt="xqt",t.Tqt="Iqt",t.kqt="Rqt",t.Sqt="Cqt",t.Pqt="Dqt",t}({}),YQ=function(t){function n(n,i,r){var e;return(e=t.call(this)||this).nHt=void 0,e.qUt=void 0,e.Nqt=void 0,e.Lqt=void 0,e.nT=new hr,e.nHt=n,e.qUt=i,e.Nqt=r,e}Ct(n,t);var i=n.prototype;return i.Mqt=function(t){for(var n,i=Lt(this.Nqt);!(n=i()).done;){var r=n.value;ji(t,r)||this.nHt.gqt(r)}this.Nqt=t},i.ZVt=function(){var t,n;return null!=(n=null==(t=this.Lqt)?void 0:t.Qy)?n:ut.resolve()},i.YVt=function(){if(this.$It)throw new y("Cannot perform new operation while transmuxer is still busy")},i.Oqt=function(t,n){},i.Fqt=function(t){var n=this;this.YVt(),this.Lqt=new Vc;var i=function(i){n.Uqt(t,i)};this.Vqt(t,this.nT.Yg).then(i,i)},i.Hqt=function(t){var n=this;this.YVt(),this.Lqt=new Vc;var i=function(i){n.Uqt(t,i)};this.Wqt(t,this.nT.Yg).then(i,i)},i.qqt=function(t){this.YVt(),this.Lqt=new Vc;try{for(var n,i=Lt(this.Bqt);!(n=i()).done;){var r={Km:"zWt",Lot:n.value,lHt:t.lHt,fHt:t.fHt,kOt:t.kOt,UMt:t.UMt,$at:t.$at};this.fqt(r)}}finally{this.Uqt(t)}},i.Uqt=function(t,n){this.Lqt&&(!n||vr(n)||function(t){return V(t,jj)}(n)?(vr(n)||this.nHt.lqt(t),this.Lqt.Xy(),this.Lqt=void 0):this.Lqt.jy(n),this.So(new jQ))},i.zqt=function(t,n){this.So(new zQ(t,n))},i.Gqt=function(t,n){this.So(new qQ(t,n))},i.Xqt=function(t,n,i){qj(n)&&this.So(new GQ(t,i))},i.jqt=function(t){this.So(new XQ(t))},i.fqt=function(t){ji(this.Nqt,t.Lot)&&this.nHt.fqt(t)},i.Qqt=function(t){return this.nHt._qt(t)},i.sHt=function(t){this.nHt.sHt(t)},i.Kqt=function(t){return this.nHt.pqt(t)},i.Zg=function(){this.nT.Zg(),this.nT=new hr},Nt(n,[{key:"Bqt",get:function(){return this.Nqt}},{key:"$It",get:function(){return void 0!==this.Lqt}}]),n}(th);function KQ(t,n){return qj(t)?0:b.min(t.EO,n)}function JQ(t,n){var i;return b.max(t.EO,n)+(null!=(i=t.ct)?i:0)}var ZQ=function(t){function n(n,i,r){return t.call(this,n,i,[r])||this}Ct(n,t);var i=n.prototype;return i.Vqt=function(t,n){dr(n);var i={Km:"FRt",ck:t.bOt.ck,Lot:this.Bqt[0],kOt:t.kOt,Yqt:{frt:"",MW:t.MW},EO:t.EO,UMt:t.UMt,hHt:t.bOt.hHt};return this.fqt(i),ut.resolve()},i.Wqt=function(t,n){return Vt(function(){var i,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return dr(n),void 0===(i=t.$at.hHt).xet?[3,3]:this.qUt.gUt(t.kOt)?[3,2]:[4,gr(this.qUt.mUt(t.kOt),n)];case 1:h.sent(),h.label=2;case 2:return r=this.qUt.kUt(i.xet,i).iF(),[3,4];case 3:r=i.EO,h.label=4;case 4:return e=KQ(i,r),s=JQ(i,e),o={Km:"$at",ck:t.$at.ck,Lot:this.Bqt[0],lHt:e,fHt:s,EO:r,ct:null!=(u=i.ct)?u:0,bU:0,kOt:t.kOt,UMt:t.UMt,hHt:t.$at.hHt},this.fqt(o),[2]}})}).call(this)},n}(YQ);function $Q(t,n){for(var i,r=function(){var r=i.value,s=r.EO;if(r.UMt.IMt.POt&&qj(r.$at))s=0;else{var u=function(t){return r.UMt===t.UMt&&Gj(t.$at,r.$at)},o=Ui(t,u);if(void 0!==o)s=b.min(s,o.PO);else{var h=Ui(n,u);void 0!==h&&(s=b.min(s,h.HVt.An(0)))}}e=e.OM(TA.tL(s,r.PO))},e=TA.iL(),s=Lt(t);!(i=s()).done;)r();return e}F(),Et(),Ut();var tY=.001,nY=function(){function t(t,n,i,r,e,s){this.$qt=void 0,this.ezt=void 0,this.tzt=void 0,this.szt=void 0,this.nzt=void 0,this.Rz=void 0,this.Zqt=void 0,this.$qt=t,this.ezt=n,this.tzt=i,this.szt=r,this.nzt=e,this.Rz=s,this.Zqt=[]}var n=t.prototype;return n.oWt=function(t){this.$qt.oWt(t)},n.izt=function(t){for(var n,i=function(t){var i=n.Zqt[t];if(!_Q(i))throw new y("Invalid state");var r=Hi(e,function(t){return t.Km===i.Km});r>=0&&!i.QVt?(i.JVt(e[r]),qi(e,r)):qi(n.Zqt,t)},r=this.Zqt.length>0,e=t.slice(),s=this.Zqt.length-1;s>=0;s--)n=this,i(s);for(var u,o=Lt(e);!(u=o()).done;){var h=u.value,c=new fQ(h);this.Zqt.push(new gQ(h.Km,h,this.ezt,c,this,this.szt,this.nzt))}r&&e.length>0&&this.ezt.Gy();var a=t.map(function(t){return t.Km});this.tzt.Mqt(a)},n.YY=function(t){var n,i=(null==(n=this.Rz)?void 0:n.YY(t))||!1;return i&&(this.Zg(),this.ezt.Gy()),i},n.rzt=function(t){var n=this.Zqt[0];if(void 0!==n){if(n.Km!==ig.NT||n.$It)throw new y("Invalid state");if(!n.QVt)return void n.JVt(t)}var i=new fQ(t),r=new gQ(ig.NT,t,this.ezt,i,this,void 0,void 0);this.Zqt=[r]},n._at=function(){for(var t,n=Lt(this.Zqt);!(t=n()).done;){t.value.zVt.UVt()}},n.hdt=function(t){var n=this.hzt.JM(t,tY);return n?n.An(n.V-1):t},n.AWt=function(t){return!!this.hzt.JM(t,tY)||this.$qt.AWt(t)},n.azt=function(t){return this.ozt.Cr(t,tY)},n.uzt=function(t,n,i){for(var r,e=Lt(this.Zqt);!(r=e()).done;){var s=r.value.zVt,u=s._pt;if(void 0!==u&&n>=u&&!s.IP.CM().Cr(u))return!0}return n-t0){var n=this.Zqt[0].zVt.MVt;if(n&&this.Zqt.every(function(t){return t.zVt.MVt===n}))return n}}},{key:"hzt",get:function(){var t,n=$Q(this.ezt.hqt.concat(this.ezt.aqt),Ji(this.Zqt,function(t){return t.zVt.ect})).CM();if(0===this.Zqt.length)t=n;else{t=TA.eL();for(var i,r=Lt(this.Zqt);!(i=r()).done;){var e=i.value;t=t.Mn(e.zVt.IP)}for(var s,u=Lt(this.Zqt);!(s=u()).done;){var o=s.value;t=t.UM(o.GVt)}t=t.OM(n)}return t.LM(tY)}},{key:"ozt",get:function(){var t,n=$Q(this.ezt.aqt,Ji(this.Zqt,function(t){return t.zVt.ect})).CM();if(0===this.Zqt.length)t=n;else{t=TA.eL();for(var i,r=Lt(this.Zqt);!(i=r()).done;){var e=i.value;t=t.Mn(e.zVt.IP)}t=t.OM(n)}return t}}]),t}();F(),Et(),Dt();var iY=function(t){function n(){return t.call(this,iG.PMt)||this}return Ct(n,t),n}(rh);F(),Et(),Dt();var rY=function(t){function n(){return t.call(this,iG.kMt)||this}return Ct(n,t),n}(rh);F(),Et(),Wt(),Bt(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Qt();var eY="LazyMediaBuffer",sY=function(t){function n(n,i){var r;return(r=t.call(this)||this).Vp=void 0,r._zt=void 0,r.GS=void 0,r.Trt=void 0,r.fzt=void 0,r.zY=void 0,r.jY=void 0,r.L3=void 0,r.Vp=n,r._zt=i,r.GS=void 0,r.Trt=void 0,r.fzt=new Vc,r.zY=20,r.jY=30,r.L3=new YR,r}Ct(n,t);var i=n.prototype;return i.F3=function(t,n){_G.uLt(eY,"Marking gap from "+t+" to "+n+"."),this.L3.t$(t,n),this.Trt&&this.Trt.F3(t,n)},i.U3=function(t,n){_G.uLt(eY,"Removing gap from "+t+" to "+n+"."),this.L3.i$(t,n),this.Trt&&this.Trt.U3(t,n)},i.lzt=function(t){this.Trt=t,this.Trt.UY=this.jY,this.Trt.MY=this.zY;for(var n=this.L3.ZZ,i=0;i0?s:e;switch(i.OY.type){case KI.BANDWIDTH:var o=i.WY,h=u.filter(function(t){return t.kW<=o});if(h.length>0)return $i(h,function(t){return t.kW});case KI.PERFORMANCE:return Zi(u,function(t){return t.kW});case KI.QUALITY:return $i(u,function(t){return t.kW})}}function lY(t,n){for(var i,r=function(){var n=i.value,r=t.filter(function(t){return t.frt&&t.frt.yCt&&YC(t.frt.yCt,n)});return 0===r.length?"continue":{v:r}},e=Lt(n);!(i=e()).done;){var s=r();if("object"===W(s))return s.v}}function wY(t,n){return t.filter(function(t){return gY(t,n)})}function gY(t,n){var i=n+2e3,r=0===t.UOt.length||t.UOt.some(function(t){return t.IMt.jFt0&&this.OP(n.Tn(0),{Wzt:!1}),this.jzt?[3,2]:[4,this.sGt()];case 1:i.sent(),i.label=2;case 2:return this.MTt(),[4,t];case 3:return i.sent(),this.Nkt(),[2]}})}).call(this)},i.MTt=function(){if(!this.nkt()){var t,n=null==(t=this.VMt)?void 0:t.IMt;if(null==n?void 0:n.POt){var i=!0,r=0,e=n.Tn;if(!this.Bkt&&e&&(i=!e.gOt,(r=e._Ot)<0)){var s=n.IFt;r+=s.An(s.V-1)}this.Kzt(r,{Hzt:i})}else this.Kzt(1/0,{Hzt:!0})}this.rGt()&&this.Kzt(1/0,{Hzt:!0})},i.nkt=function(){var t,n=this.rkt;if(0===n.V)return!0;var i=this.MP,r=null==(t=this.HMt)?void 0:t.hGt,e=null==r?void 0:r.VM(i);return(e&&e>0?r.An(e):i)>=n.Tn(0)},i.rGt=function(){var t=this.MP;return CY(t,this.eLt)||CY(t,this.nLt)},i.pEt=function(){this.JW=void 0,this.ZW=void 0},i.qq=function(t){this.JW||(kr(this.hr()),this.JW=hg(t),this.ZW=t,this.So(new _b(t)))},i.be=function(){_G.hB(AY,"Showing the player."),this.TL.be()},i.Qx=function(){throw new y("Not implemented")},i.Kx=function(){throw new y("Not implemented")},i.Yx=function(){},i.Jx=function(){this.jzt&&kr(this.oGt({Jx:!0}))},i.Ta=function(t,n,i){return Vt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:r={stack:[],error:void 0,hasError:!1},h.label=1;case 1:return h.trys.push([1,9,10,11]),_G.hB(AY,"Setting the player source to "+t.src+"."),this.pEt(),this.HMt?[4,this.hr()]:[3,3];case 2:h.sent(),dr(i),h.label=3;case 3:return KA(t)?[2]:(e=qt(r,hr.ep([i]),!1),this.lq.IW(t.contentProtection),void 0===this.Zzt||this.Zzt.Mc!==t?[3,4]:(this.HMt=this.Zzt,this.HMt.mn(EY,this.aGt),this.rV=this.uGt,this.rV.$g(e.Yg),this.uGt=new hr,this.cGt=void 0,null==(s=this.dGt)||s.Zg(),this.dGt=void 0,this.Zzt=void 0,this.lGt=!1,this.fGt!==this.HMt&&(this.fGt=void 0),this.HMt.vGt(this.TL),[3,8]));case 4:return void 0===this.Zzt?[3,7]:[4,this.xx()];case 5:return h.sent(),[4,this._Gt()];case 6:h.sent(),h.label=7;case 7:this.rV=hr.ep([e.Yg]),this.HMt=this.gGt(t,n,void 0,this.TL),h.label=8;case 8:return this.HMt.wn(EY,this.Rs),this.HMt.wn(iG.PMt,this.pGt),this.YL.BI=this.HMt.ht,this.$L.BI=this.HMt.rt,this.mGt.BI=this.HMt.nt,(u=this.HMt.wGt)&&(this.jW=new rW(this,this.TL,u),this.jW.Rt=!0,this.Cz.Ea(this.jW)),Ay(this.Gl),this.yGt(),this.Ekt(),this.AGt.forEach(this.Rs),this.AGt=[],this.sGt(),e.zg(),[3,11];case 9:return o=h.sent(),r.error=o,r.hasError=!0,[3,11];case 10:return Gt(r),[7];case 11:return[2]}})}).call(this)},i.Px=function(t,n,i,r){return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return dr(r),void 0===this.Zzt?[3,2]:[4,this.xx()];case 1:e.sent(),e.label=2;case 2:return dr(r),this.Zzt=this.gGt(t,n,i,void 0),this.Zzt.wn(EY,this.aGt),[2]}})}).call(this)},i.xx=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return void 0===this.Zzt?[2]:(this.uGt.Zg(),null==(t=this.dGt)||t.Zg(),this.dGt=void 0,void 0===this.cGt?[3,2]:[4,this.cGt.catch(di)]);case 1:n.sent(),this.cGt=void 0,n.label=2;case 2:return[4,this.Zzt.zg()];case 3:return n.sent(),this.uGt=new hr,this.fGt===this.Zzt&&(this.fGt=void 0),this.Zzt=void 0,this.lGt=!1,this.AGt=[],[2]}})}).call(this)},i.gGt=function(t,n,i,r){return null!=this.bGt||(this.bGt=this.SGt.Ret()),new RY(this,t,n,this.nV,this.Rz,this.TGt,this.eut,this.kGt,this.mHt,this.bGt,this._dt,i,r)},i.sGt=function(){return this.Dpt=this.EGt(this.Dpt,this.rV.Yg).catch(this.mmt),this.Dpt},i.EGt=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return t?[4,t]:[3,2];case 1:r.sent(),dr(n),r.label=2;case 2:return this.HMt?(i=this.tq)===jT.OL||this.n7?[4,this.PGt(n)]:[3,5]:[2];case 3:return r.sent(),[4,this.xGt(n)];case 4:return r.sent(),[3,7];case 5:return i!==jT.VU?[3,7]:[4,this.PGt(n)];case 6:r.sent(),r.label=7;case 7:return[2]}})}).call(this)},i.PGt=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return dr(t),void 0===this.HMt||this.HMt.nGt?[2]:[4,this.HMt.PGt(t)];case 1:return n.sent(),this.kq.VV(),this.yGt(),[2]}})}).call(this)},i.yGt=function(){var t;if(!this.jW){var n=null==(t=this.HMt)?void 0:t.wGt;n&&(this.jW=new rW(this,this.TL,n),this.Cz.Ea(this.jW))}},i.xGt=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return dr(t),this.jzt?[2]:(this.jzt=!0,[4,this.HMt.oGt(this.eLt,this.nLt,this.Mzt,{RGt:!0})]);case 1:return n.sent(),[2]}})}).call(this)},i.CGt=function(){var t=this.Zzt;return void 0===t?ut.resolve():(0===t.bU&&(t.bU=this.HMt.bU+this.HMt.ct),null!=this.dGt||(this.dGt=new Vc),void 0===this.cGt&&(this.cGt=t.PGt(this.uGt.Yg),this.dGt.$g(this.cGt)),this.dGt.Qy)},i.DGt=function(){var t;return(null!=(t=this.dGt)?t:this.dGt=new Vc).Qy},i.zzt=function(t){return this.$zt(t,this.TL.MP)},i.$zt=function(t,n){var i=n;return t===this.HMt&&void 0!==this.Zzt&&this.Zzt.bU>0&&(i=b.min(i,this.Zzt.bU)),void 0!==t&&(i=b.max(0,i-t.bU)),i},i.iGt=function(){return void 0!==this.Zzt&&0!==this.Zzt.bU&&(!!this.lGt&&this.TL.MP+.25>=this.Zzt.bU)},i.MGt=function(){var t,n;return{Ti:this.TL.Ti,Mi:this.TL.Mi,_Lt:OX(this.TL),Gct:null==(n=this.bt)||null==(t=n.abr)?void 0:t.restrictToPlayerSize}},i.LGt=function(){return new vY(this.iq)},i.oGt=function(t){void 0===t&&(t={});var n={jMt:t.jMt||!1,KMt:t.KMt||!1,QMt:t.QMt||!1,Jx:t.Jx||!1,RGt:t.RGt||!1},i=[this.Yzt,this.w7].filter(Un);return this.m7.Zg(),this.m7=new hr,this.m7.$g(this.rV.Yg),this.OGt.Zg(),this.OGt=new hr,this.OGt.$g(this.rV.Yg),this.Yzt=_r(this.FGt(i,n,this.OGt.Yg),this.OGt).catch(this.Jzt),this.Yzt},i.FGt=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c,a,f,v;return zt(this,function(d){switch(d.label){case 0:return this.jzt?[3,2]:[4,this.HMt.UGt(i)];case 1:return d.sent(),[2];case 2:return[4,ut.all(t.map(function(t){return t.catch(di)}))];case 3:return d.sent(),this.VGt(),[4,this.HGt(i)];case 4:return d.sent(),[4,this.WGt()];case 5:return d.sent(),[4,this.qGt(n.KMt,n.QMt)];case 6:return d.sent(),dr(i),[4,this.HMt.zGt()];case 7:return u=d.sent(),dr(i),[4,this.GGt(u,n.Jx,i)];case 8:return o=d.sent(),h=null==(r=this.iq)?void 0:r.Q3,c=null==(e=this.iq)?void 0:e.K3,this.HMt.XGt(void 0!==h,void 0!==c,n.jMt||o,n.KMt,n.QMt),this.HMt.jGt(n.jMt),void 0!==this.Zzt&&(this.Zzt.XGt(void 0!==h,void 0!==c,n.jMt||o,n.KMt,n.QMt),this.Zzt.jGt(n.jMt)),this.HMt.izt(h,c),void 0===this.Zzt?[3,10]:[4,this.Zzt.zGt()];case 9:(a=d.sent())&&this.iq&&this.iq.TZ(a)?(this.Zzt.izt(h,c),this.lGt=!0):(this.Zzt.izt(void 0,void 0),this.lGt=!1),d.label=10;case 10:this.QGt(),dr(i),d.label=11;case 11:return d.trys.push([11,13,,14]),[4,ut.all([this.HMt.KGt(i),null==(f=this.Zzt)?void 0:f.KGt(i)].filter(Un))];case 12:return d.sent(),[3,14];case 13:return lr(d.sent()),[3,14];case 14:if(dr(i),this.B4(),this.HMt.hUt(),null==(s=this.Zzt)||s.hUt(),void 0!==this.qzt)return this.Kzt(this.qzt,this.Gzt),[2];if(!this.Bkt){if(v=this.HMt.YGt)return this.Kzt(v.XF,{Hzt:v.Hzt}),[2];if(this.HMt.bU>0)return this.Kzt(0,{Hzt:!1}),[2]}return this.BGt.length>0&&this.JGt(),[2]}})}).call(this)},i.GGt=function(t,n,i){return Vt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return n||!this.iq?[3,3]:t?this.iq.TZ(t)?[4,this.HGt(i)]:[3,3]:[2,!1];case 1:return h.sent(),[4,this.iq.EZ(t)];case 2:return h.sent(),[2,!1];case 3:for(r=Lt(this.HMt.NGt);!(e=r()).done;)e.value.Jqt.forEach(function(t){return t.Zg()});this.TL.x9(),h.label=4;case 4:return h.trys.push([4,,10,11]),this.iq?[4,this.TL.hr()]:[3,6];case 5:h.sent(),h.label=6;case 6:return t?[4,this.TL.Un(t)]:[3,8];case 7:return s=h.sent(),[3,9];case 8:u=void 0!==this.eLt,o=void 0!==this.nLt,s=new oY(this.TL,u,o),h.label=9;case 9:return this.ZGt(s),[3,11];case 10:return this.TL.I9(),[7];case 11:return[2,!0]}})}).call(this)},i.ZGt=function(t){this.iq=t,this.B4(),this.STt(),this.TTt()},i.B4=function(){var t,n,i=this.iq,r=void 0!==this.Zzt&&this.lGt?this.Zzt:this.HMt;if(i&&void 0!==r&&(r!==this.fGt||S(i.ct))){var e;r!==this.fGt&&i.A3();var s=(null!=(e=r.$Gt)?e:NaN)+r.bU;s>0&&i.C4(s),this.fGt=r}null==(t=this.HMt)||t.hUt(),null==(n=this.Zzt)||n.hUt()},i.qGt=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return this.iq?(i=[],t&&this.iq.Q3&&i.push(this.iq.Q3._S(0,1/0)),n&&this.iq.K3&&i.push(this.iq.K3._S(0,1/0)),[4,ut.all(i)]):[2];case 1:return r.sent(),[2]}})}).call(this)},i.STt=function(){var t=this.iq;t&&(t.K3&&(t.K3.MY=this.Rz.GY),t.Q3&&(t.Q3.MY=this.Rz.GY))},i.TTt=function(){var t=this.iq;t&&(t.K3&&(t.K3.UY=this.Rz.UY),t.Q3&&(t.Q3.UY=this.Rz.UY))},i.QGt=function(){var t,n,i,r,e=void 0!==(null==(t=this.iq)?void 0:t.Q3),s=void 0!==(null==(n=this.iq)?void 0:n.K3);null==(i=this.HMt)||i.QGt(e,s),null==(r=this.Zzt)||r.QGt(e,s)},i.y7=function(t,n,i,r){return Vt(function(){var e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,ut.all(t.map(function(t){return t.catch(di)}))];case 1:return o.sent(),dr(r),[4,this.WGt()];case 2:return o.sent(),dr(r),this.qzt=void 0,this.Xzt=void 0,this.Bkt=!0,e=i.gOt?this.IFt:this.rkt,s=e.DM(n+this.HMt.bU),u=this.TL.ww(eh.Zw,r),this.TL.My(s,i.Hzt),this.jzt&&this.HMt.NGt.length>0&&(this.Br.mM.FUt(),this.tXt(this.MP),this.JGt()),[4,u];case 3:return o.sent(),this.Nkt(),[2]}})}).call(this)},i.Nkt=function(){var t=this.jW;if(void 0!==t){var n=this.BL;if(!this.hx&&!this.kx&&void 0!==n)n0?(this.BGt.forEach(function(t){return t.czt()}),[4,this.KDt()]):[3,2];case 1:t.sent(),this.QDt(),this.BGt.forEach(function(t){return t.$qt.xWt()}),t.label=2;case 2:return[2]}})}).call(this)},i.QDt=function(){var t=this;if(!this.hXt){var n=function(){t.hXt=void 0};this.oXt=new hr,this.oXt.$g(this.rV.Yg),this.hXt=_r(this.aXt(this.oXt.Yg),this.oXt).catch(this.Jzt).then(n,n)}},i.KDt=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:return null==(t=this.oXt)||t.Zg(),n=this.hXt,this.hXt=void 0,n?[4,n]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})}).call(this)},i.aXt=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return dr(t),[4,this.uXt(this.HMt,t)];case 1:return n.sent(),dr(t),void 0===this.Zzt?[3,4]:[4,gr(this.CGt(),t)];case 2:return n.sent(),dr(t),[4,this.uXt(this.Zzt,t)];case 3:n.sent(),n.label=4;case 4:return[2]}})}).call(this)},i.uXt=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c,a,f,v,d,l,w,g,_,m,y,p;return zt(this,function(k){switch(k.label){case 0:dr(n),i=t.NGt,k.label=1;case 1:0,r={stack:[],error:void 0,hasError:!1},k.label=2;case 2:for(k.trys.push([2,4,5,6]),e=[],s=b.max(0,this.TL.MP-t.bU),u=Lt(i);!(o=u()).done;)if(h=o.value,c=h.$qt,a=h.hdt(s),c.$It)e.push(c.ZVt());else if(h.uzt(s,a,this.Rz.GY)||c._Wt){if(f=c.UMt.IMt,void 0===(v=c.bWt(a))){if(f.POt)continue;(d=f.ect).length&&d[0].EO>a&&(this.MP=1/0),c.CWt(),c.kWt(a)}else l=v[0],w=v[1],c.pat(l,w,h.MVt),h.tzt.Oqt(l,w);e.push(c.ZVt())}if(g=qt(r,hr.ep([n]),!1),0===e.length){for(i.every(function(t){return t.$qt.ERt})||e.push(this.TL.ww(eh._y,g.Yg)),_=Lt(i);!(m=_()).done;)void 0!==(y=m.value).$qt.gWt()&&e.push(y.tzt.ww([QQ.Sqt,QQ.Pqt],g.Yg));if(0===e.length)return[3,7]}return[4,gr(ut.race(e),g.Yg)];case 3:return k.sent(),[3,6];case 4:return p=k.sent(),r.error=p,r.hasError=!0,[3,6];case 5:return Gt(r),[7];case 6:return[3,1];case 7:return[2]}})}).call(this)},i.sXt=function(){var t=this;if(!this.cXt){var n=function(){t.cXt=void 0};this.dXt=new hr,this.dXt.$g(this.rV.Yg),this.cXt=_r(this.lXt(this.dXt.Yg),this.dXt).catch(this.Jzt).then(n,n)}},i.iXt=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:return null==(t=this.dXt)||t.Zg(),n=this.cXt,this.cXt=void 0,n?[4,n]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})}).call(this)},i.lXt=function(t){return Vt(function(){var n,i,r,e,s,u,o,h;return zt(this,function(c){switch(c.label){case 0:dr(t),n=this.BGt,c.label=1;case 1:for(i=[],r=Lt(n);!(e=r()).done;)s=e.value,u=s.$qt,(o=s.tzt).$It?i.push(o.ZVt()):(h=u.gWt())?"$at"===h.Km?(o.Hqt(h),i.push(o.ZVt())):"bOt"===h.Km?(o.Fqt(h),i.push(o.ZVt())):"zWt"===h.Km&&(o.qqt(h),i.push(o.ZVt())):i.push(u.IWt());return 0!==i.length?[3,2]:[3,5];case 2:return[4,gr(ut.race(i),t)];case 3:c.sent(),c.label=4;case 4:return[3,1];case 5:return[2]}})}).call(this)},i.nXt=function(){var t=this;if(!this.fXt){this.vXt=new hr,this.vXt.$g(this.rV.Yg);var n=function(){t.fXt=void 0};this.fXt=_r(this._Xt(this.vXt.Yg),this.vXt).catch(this.Jzt).then(n,n)}},i.eXt=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:return null==(t=this.vXt)||t.Zg(),n=this.fXt,this.fXt=void 0,n?[4,n]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})}).call(this)},i._Xt=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return dr(t),[4,this.gXt(this.HMt,t)];case 1:return n=i.sent(),void 0!==this.Zzt&&this.lGt&&n?(dr(t),[4,gr(this.DGt(),t)]):[3,4];case 2:return i.sent(),dr(t),this.B4(),[4,this.gXt(this.Zzt,t)];case 3:n=i.sent(),i.label=4;case 4:return n?this.iq.C3():this.iq.A3(),[2]}})}).call(this)},i.gXt=function(t,n){return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:r=function(){var r,e,s,u,o,h,c,a,f,v,d,l,w;return zt(this,function(g){switch(g.label){case 0:for((r=t.NGt).forEach(function(t){return t._at()}),e=b.max(0,i.TL.MP-t.bU),s=[],u=[],o=Lt(r);!(h=o()).done;)for(c=h.value,a=c.tzt,f=Lt(c.Jqt);!(v=f()).done;)d=v.value,l=_Q(d)?s:u,d.$It?l.push(d.ZVt()):d.$Vt(e)||((w=a.Qqt(d.Km))?"$at"===w.Km&&w.kOt===i.Vzt?(d.cdt(w),l.push(d.ZVt())):"FRt"===w.Km&&w.kOt===i.Vzt?(d.z2(w),l.push(d.ZVt())):"zWt"===w.Km&&(d.dHt(w),l.push(d.ZVt())):u.push(a.Kqt(d.Km)));return 0!==s.length?[3,2]:[4,i.pXt(t,r,e,n)];case 1:if(g.sent())return[2,"continue"];g.label=2;case 2:return 0===s.length&&0===u.length?[2,{v:r.every(function(t){return t.Jqt.length>0&&t.Jqt.every(function(t){return t.$Vt(e)})})}]:[4,gr(ut.race([].concat(s,u)),n)];case 3:return g.sent(),[2]}})},s.label=1;case 1:return i=this,[5,Xt(r())];case 2:return"object"===W(e=s.sent())?[2,e.v]:[3,1];case 3:return[2]}})}).call(this)},i.pXt=function(t,n,i,r){return Vt(function(){var e,s,u,o,h,c,a,f,v,d,l,w,g,_,m,y,p,k,b,A,T,S;return zt(this,function(E){switch(E.label){case 0:for(e=[],s=[],u=Lt(n);!(o=u()).done;)for(h=o.value,c=h.hdt(i),a=Lt(h.Jqt);!(f=a()).done;)if(_Q(v=f.value))if(void 0!==(d=h.tzt.Qqt(v.Km))){if(d.kOt===this.Vzt)return[2,!1];e.push(d)}else{if(h.$It||h.uzt(i,c,this.Rz.GY)||!v.tHt(i,c))return[2,!1];void 0!==(l=v.zVt.MVt)&&s.push(l)}return 0===e.length?[2,!1]:(w=$i(e,function(t){return t.kOt}).kOt,e.every(function(t){return"FRt"===t.Km&&t.kOt===w})?(g=Zi(e,function(t){return t.EO}).EO+t.bU,_=[].concat(e,s),[4,this.mXt(_)]):[3,6]);case 1:return m=E.sent(),this.wXt(m)?(_G.uLt(yG,"Seamless switch from",this.iq.Cd,"to",m),[4,this.iq.EZ(m)]):[3,3];case 2:return E.sent(),_G.uLt(yG,"Seamless switch complete."),[3,5];case 3:return[4,this.yXt(t,g,m,r)];case 4:E.sent(),E.label=5;case 5:return this.Vzt=e[0].kOt,[3,7];case 6:for(y=Lt(n);!(p=y()).done;)for(k=p.value,b=Lt(k.Jqt);!(A=b()).done;)for(T=A.value,S=k.tzt.Qqt(T.Km);void 0!==S&&("FRt"!==S.Km||S.kOt!==w);)_G.uLt(yG,"Removing append for other discontinuity, expecting "+w,S),k.tzt.sHt(S),S=k.tzt.Qqt(T.Km);E.label=7;case 7:return[2,!0]}})}).call(this)},i.wXt=function(t){var n,i;switch(null!=(i=null==(n=this.bt)?void 0:n.seamlessSwitchStrategy)?i:OA.OL){case OA.FL:return!0;case OA.UL:return!1;default:return this.iq.TZ(t)}},i.mXt=function(t){return Vt(function(){var n,i,r,e,s;return zt(this,function(u){switch(u.label){case 0:return n=t.map(function(t){return t.Yqt.frt}),i=n.map(function(t){return{qT:t}}),r=[].concat(Ji(t,function(t){return t.Yqt.MW}),this.Br.UUt),[4,qG((e=this.bt).contentProtection,n,r,this.nV,e.useCredentials)];case 1:return 0===(s=u.sent()).length&&this.iq&&this.iq.Cd.aq.length>0&&(s=this.iq.Cd.aq),[2,{Km:Sy.wV,L4:i,aq:s,X4:e.useManagedMediaSource}]}})}).call(this)},i.yXt=function(t,n,i,r){return Vt(function(){var e,s,u,o,h,c,a,f,v,d;return zt(this,function(l){switch(l.label){case 0:if(o=this.iq,h=o.ct,!(c=this.TL.IP.V>0&&this.TL.MP=n}return this.TL.UP||this.iGt()}},{key:"lt",get:function(){return this.JW}},{key:"WP",get:function(){return this.ZW}},{key:"zP",get:function(){}},{key:"jP",get:function(){}},{key:"KP",get:function(){return!1}},{key:"JP",get:function(){var t,n;return Yu({},{iO:0,eO:0,sO:0,nO:0,rO:0,hO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.TL.ZP(),{rO:null!=(n=null==(t=this.HMt)?void 0:t.rO)?n:0,nO:this.Rz.kY.kW})}},{key:"Br",get:function(){var t;return null==(t=this.HMt)?void 0:t.Br}},{key:"eGt",get:function(){var t;return null==(t=this.HMt)?void 0:t.eGt}},{key:"$P",get:function(){return this.TL.$P},set:function(t){this.TL.$P=t}},{key:"sx",get:function(){var t,n;return null==(n=null==(t=this.HMt)?void 0:t.sx)||n}},{key:"hx",get:function(){return this.TL.hx}},{key:"ux",get:function(){return this.TL.ux},set:function(t){_G.hB(AY,"Setting playback rate to "+t+"."),this.TL.ux=t}},{key:"_x",get:function(){return this.lkt._s()}},{key:"lkt",get:function(){var t=this.TL._x;return void 0!==this.HMt&&(t=t.Ny(-this.HMt.bU).Mn(TA.eL())),t}},{key:"mx",get:function(){return this.tq},set:function(t){this.tq!==t&&(this.tq=t,this.sGt())}},{key:"Ax",get:function(){var t,n=this.TL.Ax;return(null==(t=this.HMt)?void 0:t.nGt)&&(n=b.max(Cy.Qn,n)),n}},{key:"IFt",get:function(){var t,n;return null!=(n=null==(t=this.HMt)?void 0:t.IFt)?n:TA.iL()}},{key:"Sx",get:function(){return this.rkt._s()}},{key:"rkt",get:function(){var t,n,i=null!=(n=null==(t=this.HMt)?void 0:t.Sx)?n:TA.iL();if(0===i.V)return i;if(this.iq&&this.Fzt&&this.iq.ct!==1/0&&(i=new TA([i.Tn(0),this.$zt(this.HMt,this.iq.ct)])),this.HMt&&!this.HMt.POt){var r=this.lkt,e=i.An(i.V-1);if(r.V>0&&r.An(r.V-1)>e){var s=r.An(r.V-1),u=this.HMt.IFt;u&&u.V>0&&(s=b.min(s,u.An(u.V-1))),i=i.OM(new TA([e,s]))}}return i}},{key:"kx",get:function(){var t;return null!=(t=this.Xzt)?t:this.TL.kx}},{key:"nq",get:function(){}},{key:"nt",get:function(){return this.Gl}},{key:"rt",get:function(){return this.$L}},{key:"Rx",get:function(){var t,n;return this.TL.Rx||(null==(n=this.VMt)||null==(t=n.uCt)?void 0:t.Mi)||0}},{key:"Bx",get:function(){var t,n;return this.TL.Bx||(null==(n=this.VMt)||null==(t=n.uCt)?void 0:t.Ti)||0}},{key:"Mx",get:function(){return this.TL.Mx},set:function(t){_G.hB(AY,"Setting volume to "+t+"."),this.TL.Mx=t}},{key:"Fx",get:function(){return this.Cz}},{key:"Vx",get:function(){return!1},set:function(t){}},{key:"hq",get:function(){return this.oq}},{key:"IGt",get:function(){return this.jzt}},{key:"BGt",get:function(){return void 0===this.HMt?[]:void 0===this.Zzt?this.HMt.NGt:this.HMt.NGt.concat(this.Zzt.NGt)}}]),n}(th),RY=function(t){function n(n,i,r,e,s,u,o,h,c,a,f,v,d){var l,w,g,_;l=t.call(this)||this,(w=l).oa=void 0,w.Mc=void 0,w.nV=void 0,w.TGt=void 0,w.Rz=void 0,w.eut=void 0,w.kGt=void 0,w.mHt=void 0,w.bGt=void 0,w._dt=void 0,w.GXt=void 0,w.JU=void 0,w.YL=new ng,w.$L=new ng,w.Gl=new Eb([]),w.KXt=void 0,w.pq=void 0,w.wpt=void 0,w.yq=void 0,w.hBt=void 0,w.Fkt=void 0,w.QXt=void 0,w.rV=void 0,w.hjt=void 0,w.ajt=void 0,w.ujt=void 0,w.sjt=void 0,w.Ajt=[],w.LXt=void 0,w.OXt=void 0,w.FXt=void 0,w.UXt=void 0,w.P4=void 0,w.x4=void 0,w.Ljt=void 0,w.HXt=void 0,w.WXt=void 0,w.Ejt=void 0,w.sSt=!0,w.fjt=0,w.ljt=!1,w.N4=TA.iL(),w._kt=!1,w.okt=0,w.lDt=void 0,w.VXt=[],w.zU=0,w.NVt=function(){w.hUt()},w.Ujt=function(t){kr(w.wjt(t.UMt,w.rV.Yg))},w.retryOfflineRenditionsCallback=function(t,n){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return w.UXt!==t&&w.OXt!==t&&w.FXt!==t?[2]:[4,w.Fkt.wVt(t,n)];case 1:return i.sent(),t.IMt.jFt=-1/0,[2]}})})()},w.Djt=function(t){var n=w.LXt,i=null==n?void 0:n.LOt;if(w.Fkt.CVt(t.frt,t.UMt.IMt),!i&&(w.Fkt.DVt(t.frt,t.UMt.IMt),w.Tjt(),n)){var r=void 0!==w.OXt&&!ji(n.FOt,w.OXt),e=void 0!==w.FXt&&!ji(n.UOt,w.FXt);(r||e)&&w.oGt(r?void 0:w.OXt,e?void 0:w.FXt,w.UXt).catch(di)}},w.Bjt=function(t){var n=w.Vjt(t.UMt);void 0!==n&&(n.plt=t.plt)},w.Njt=function(t){var n=w.Vjt(t.UMt);void 0!==n&&(n.eyt=t.Eqt.iF())},w.Vjt=function(t){for(var n,i=Lt(w.$L.II);!(n=i()).done;){var r=n.value.YMt(t);if(void 0!==r)return r}},w.Mjt=function(t){w.Fkt.IVt(t.UMt)},w.Rjt=wi(function(t){t.qk===ig.Bk&&w.Ojt()&&kr(w.Fjt())},200),w.Cjt=function(t){var n;w.okt+=t.nWt;var i=w.$L.V>0?t.qk===ig.Bk:t.qk===ig.Dk;"$at"===t.sWt&&i&&kr(w._jt()),w.So(new dM(function(t){if(t){if(void 0!==t.LAt){var n,i,r=t.LAt.Tn+(null!=(i=t.LAt.V)?i:0);return{Yu:t.zE,Sat:[null==(n=t.LAt)?void 0:n.Tn,r],zk:!0}}return{Yu:t.zE.toString()||"",zk:!0}}return{Yu:"",zk:!0}}(t.uri),(null==(n=w.LXt)?void 0:n.kW)||0,t.mediaSequenceNumeber,t.mediaTrackId,t.qk,t.httpStatusCode,t.nWt))},w.oa=n,w.Mc=i,w.nV=e,w.Rz=s,w.TGt=u,w.eut=o,w.kGt=h,w.mHt=c,w.bGt=a,w._dt=f,w.GXt=v,w.JU=null!=d?d:new PW,w.rV=new hr;var m=null!=(_=null==(g=i.latencyConfiguration)?void 0:g.targetOffset)?_:i.liveOffset;return w.Fkt=new eQ(w.nV,w.eut,i.useCredentials,Vn.xm(i.src),m),w.Fkt.wn(rQ.iVt,w.NVt),w.Fkt.wn(rQ.eVt,w.Ujt),w.Fkt.wn([eh.Ww,eh.qw,eh.ey],w.Rs),w.KXt=new bY(w,w.JU),w.Gl.FW(w.KXt.Z),i.hlsDateRange&&(w.QXt=new cQ(w.Fkt,w.JU),w.Gl.FW(w.QXt.Z)),r.textTracks&&(w.pq=new ly(w.JU,w.nV),w.Gl.FW(w.pq.Z),w.fq(r.textTracks)),!ji(i.ignoreEmbeddedTextTrackTypes,Dg.CEA608)&&(w.hBt=new bU(w.JU),w.Gl.FW(w.hBt.Z)),!ji(i.ignoreEmbeddedTextTrackTypes,Dg.EMSG)&&(w.wpt=new tW(w.JU),w.yq=new gy(w.JU,w.wpt.Z),w.Gl.FW(w.wpt.Z),w.Gl.FW(w.yq.Z)),l}Ct(n,t);var i=n.prototype;return i.hUt=function(){var t,n,i=function(t){if(0===t.length)return TA.iL();for(var n,i=TA.eL(),r=0,e=Lt(t);!(n=e()).done;){var s=n.value.IMt.Sx;s.V>0&&(i=i.Mn(s),r=b.max(r,s.Tn(0)))}if(i.V>0)return i;return TA.$M(r)}(this.Uzt);0!==i.V&&(this.N4=i,null==(t=this.wpt)||t.qU(i.Tn(0)),null==(n=this.hBt)||n.qU(i.Tn(0)))},i.NXt=function(t){var n=[];if(this.LXt)for(var i,r=Lt(this.NGt);!(i=r()).done;)for(var e,s=Lt(i.value.Jqt);!(e=s()).done;){var u=e.value.iHt(t);u&&!ji(n,u)&&n.push(u)}Ki(this.VXt,n)||(this.VXt=n,this.So(new aQ))},i.fq=function(t){for(var n,i=Lt(t);!(n=i()).done;){var r=n.value;r.src&&this.pq.eV(r)}},i.klt=function(){var t,n,i=function(){var n=u.value,i=new vg,r=[];i.lO(new dG(o,n)),r.push(n);for(var e,s=Lt(h);!(e=s()).done;){var c=e.value,a=Ui(c.FOt,function(t){return eG(t,n)&&!hG(r,t)});a&&(i.lO(new dG(c,a)),r.push(a))}t.YL.tt(new aG(t,t.Rz,t.YL,i))},r=function(){var t=a.value,i=new vg,r=[];i.lO(new lG(o,t)),r.push(t);for(var e,s=Lt(h);!(e=s()).done;){var u=e.value,c=Ui(u.UOt,function(n){return eG(n,t)&&!hG(r,n)});c&&(i.lO(new lG(u,c)),r.push(c))}n.$L.tt(new fG(n,n.Rz,n.$L,i))},e=this.Br.HUt;if(0!==e.length){for(var s,u,o=null!=(s=Ui(e,function(t){return 0!==t.FOt.length&&0!==t.UOt.length}))?s:e[0],h=e.filter(function(t){return t!==o}),c=Lt(o.FOt);!(u=c()).done;)t=this,i();for(var a,f=Lt(o.UOt);!(a=f()).done;)n=this,r()}else _G.cLt(AY,"The HLSModel contains no variant streams.")},i.PGt=function(t){return Vt(function(){var n,i,r,e,s;return zt(this,function(u){switch(u.label){case 0:if(this._kt)return[2];if(this.Fkt.rVt)return[3,5];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.Fkt.dVt(t)];case 2:return u.sent(),[3,4];case 3:throw lr(n=u.sent()),this.sx=!1,new fd(cd.MANIFEST_LOAD_ERROR,"The provided HLS document could not be loaded - "+n.message,n);case 4:this.klt(),u.label=5;case 5:return[4,this.YXt()];case 6:return i=u.sent(),this.JXt(i),this.ZXt(i),r=this.$Xt(i.FOt),e=this.tjt(i.UOt),(s=this.ijt(i.VOt))||this.ejt(i.HOt),[4,this.oGt(r,e,s,{RGt:!0})];case 7:return u.sent(),this._kt=!0,[2]}})}).call(this)},i.ZXt=function(t){var n=this.hBt;if(n)for(var i,r=function(t){for(var n,i=[],r=Lt(t);!(n=r()).done;){var e=n.value,s=fY(e);void 0!==s&&i.push({nit:s,rit:e.bs||"",Th:e.l})}return i}(t.HOt),e=Lt(r);!(i=e()).done;){var s=i.value;n.Mgt(s)}},i.YXt=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:if(this.sjt=this.Br.HUt,!this.sjt.length)throw new fd(cd.MANIFEST_LOAD_ERROR,"LLHLSPlayer - Could not select initial variant stream: the HLS stream contains no variant streams.");return[4,this.njt(this.sjt)];case 1:if(0===(t=i.sent()).length)throw new fd(cd.MANIFEST_LOAD_ERROR,"LLHLSPlayer - Could not select initial variant stream: the HLS stream contains no variant stream with a supported codec.");return[4,this.rjt(t)];case 2:return(n=i.sent()).length>0&&(t=n),_G.hB(AY,"Selecting initial active variant stream."),[2,dY(t,this.Mc.abr,this.Rz,this._dt.maximumBackoff)]}})}).call(this)},i.$Xt=function(t){if(this.hjt){var n=this.ojt(this.hjt);if(n)return n}return kY(t)},i.tjt=function(t){if(this.ajt){var n=this.ojt(this.ajt);if(n)return n}return kY(t)},i.ijt=function(t){for(var n,i=Lt(this.Gl.II);!(n=i()).done;){var r=n.value;r.Xk===Hm.Kn&&(this.ujt=this.KXt.Bzt(r))}if(this.ujt){var e=this.ojt(this.ujt);if(e)return e}return pY(t)},i.ejt=function(t){var n=this.hBt;if(n){var i=pY(t);if(void 0!==i){var r=fY(i);n.Bgt(r).Xk=Hm.Kn}}},i.GMt=function(t){for(var n,i=Lt(t);!(n=i()).done;){var r=n.value;if(!this.cjt(r))throw new y("LLHLSPlayer - Could not set an allowed variant stream that does not exists in the internal HLS model.")}this.sjt=t},i.cjt=function(t){var n=this.Br;return!!n&&ji(n.HUt,t)},i.ojt=function(t){if(t&&this.LXt)return Ui(this.LXt.lLt,function(n){return n===t})},i.djt=function(){return Vt(function(){var t,n,i,r;return zt(this,function(e){switch(e.label){case 0:return 0!==(n=null!=(t=this.sjt)?t:this.Br.HUt).length||this.sjt?1!==n.length||this.sjt?[4,this.njt(n)]:(_G.hB(AY,"The HLS stream contains only a single variant stream, skipping ABR selection."),[2,[]]):(_G.hB(AY,"The HLS stream does not contain any variant streams, skipping ABR selection."),[2,[]]);case 1:return 0===(i=e.sent()).length?(_G.cLt(AY,"No variant streams with supported codecs available to perform ABR selection on."),[2,[]]):0!==(r=wY(i,this._dt.maximumBackoff)).length?[3,3]:this.ljt?[2,[]]:(_G.cLt(AY,"No variant streams with online renditions available to perform ABR selection on."),this.fjt++,[4,this.vjt(i)]);case 2:return e.sent(),[2,[]];case 3:return[2,r]}})}).call(this)},i._jt=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:return[4,this.yLt()];case 1:return void 0===(t=i.sent())?[2]:(n=!!this.LXt&&t.kWt.kW)&&(this.lDt={WMt:t,ift:Vn.Mg()});var s,u=Vn.Mg()-this.lDt.ift,o=null!=(s=null==(i=this.FXt)?void 0:i.IMt.vLt)?s:1/0;return n>=b.max(o-1,5)||u>1e3},i.pjt=function(t){return Zi(t,function(t){return t.kW})},i.MXt=function(){return Vt(function(){var t,n,i;return zt(this,function(r){switch(r.label){case 0:return this.lDt=void 0,[4,this.djt()];case 1:return 0===(t=r.sent()).length?[2]:[4,this.rjt(t)];case 2:return(n=r.sent()).length>0&&(t=n),void 0===(i=this.pjt(t))?[3,4]:[4,this.XMt(i,{jMt:!0})];case 3:r.sent(),this.oa.hq.RIt(i.kW),r.label=4;case 4:return[2]}})}).call(this)},i.vjt=function(t){return Vt(function(){var n,i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:n=this,this.ljt=!0,i=!1,r=Lt(t),o.label=1;case 1:if((e=r()).done)return[3,6];s=e.value,o.label=2;case 2:return o.trys.push([2,4,,5]),void 0===(u=this.FXt?Ui(s.UOt,function(t){return eG(t,n.FXt)}):void 0)?[3,5]:[4,this.wVt(u)];case 3:return o.sent(),u.IMt.jFt=-1/0,i=!0,[3,5];case 4:return o.sent(),[3,5];case 5:return[3,1];case 6:return i?(this.fjt=0,[4,this.oa.rXt()]):[3,8];case 7:return o.sent(),[3,10];case 8:return this.fjt>=this._dt.maxRetries?(this.oa.qq(new fd(cd.MEDIA_LOAD_ERROR,"The provided video renditions could not be loaded.")),[2]):[4,Ar(b.min(this._dt.minimumBackoff*b.pow(2,this.fjt-1),this._dt.maximumBackoff))];case 9:o.sent(),o.label=10;case 10:return this.ljt=!1,[4,this._jt()];case 11:return o.sent(),[2]}})}).call(this)},i.njt=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:return n=this,[4,rr(t,function(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:return 0===(r=[(null==(n=t.frt)?void 0:n.yCt)?'audio/mp4; codecs="'+t.frt.yCt+'"':void 0,(null==(i=t.frt)?void 0:i.bCt)?'video/mp4; codecs="'+t.frt.bCt+'"':void 0].filter(Un)).length?[2,!0]:[4,this.kGt.QZ(r,this.Mc.useManagedMediaSource)];case 1:return[2,e.sent()]}})}).call(n)})];case 1:return(i=r.sent()).some(function(t){var n;return null==(n=t.frt)?void 0:n.bCt})&&(i=i.filter(function(t){return!t.frt||t.frt.bCt||0!==t.UOt.length})),i.some(function(t){var n;return null==(n=t.frt)?void 0:n.yCt})&&(i=i.filter(function(t){return!t.frt||t.frt.yCt||0!==t.FOt.length})),[2,i]}})}).call(this)},i.rjt=function(t){var n=this;return this.Fkt.oVt?rr(t,function(t){return function(t,n){return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:i=Lt(t),s.label=1;case 1:return(r=i()).done?[3,4]:(e=r.value,[4,n(e)]);case 2:if(!s.sent())return[2,!1];s.label=3;case 3:return[3,1];case 4:return[2,!0]}})})()}([kY(t.FOt),kY(t.UOt),pY(t.VOt),pY(t.HOt)].filter(Un),function(t){return n.mjt(t)})}):ut.resolve([])},i.mjt=function(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:if(0===t.IMt.ect.length)return[2,!1];if(!(n=t.IMt.ect[0]).nyt)return[2,!1];i=n.nyt,r=i.LAt?BG(i.LAt.Tn,i.LAt.V):void 0,e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.eut.Uct(i.zE,r)];case 2:return[2,e.sent()];case 3:return e.sent(),[2,!1];case 4:return[2]}})}).call(this)},i.sLt=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:return this.LXt?(n=this.ojt(t),t&&!n?(_G.lt(AY,"Trying to set an invalid rendition as the active audio rendition."),[2]):this.OXt===n?[2]:(i=Un(n)!==Un(this.OXt),_G.hB(AY,"Switching audio rendition"),[4,this.oGt(n,this.FXt,this.UXt,{KMt:!0,jMt:i})])):(this.hjt=t,[2]);case 1:return r.sent(),[2]}})}).call(this)},i.rLt=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:return this.LXt?(n=this.ojt(t),t&&!n?(_G.lt(AY,"Trying to set an invalid rendition as the active video rendition."),[2]):this.FXt===n?[2]:(i=Un(n)!==Un(this.FXt),_G.hB(AY,"Switching video rendition"),[4,this.oGt(this.OXt,n,this.UXt,{QMt:!0,jMt:i})])):(this.ajt=t,[2]);case 1:return r.sent(),[2]}})}).call(this)},i.Nzt=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return this.LXt?(n=this.ojt(t),t&&!n?(_G.lt(AY,"Trying to set an invalid rendition as the active subtitle rendition."),[2]):(_G.hB(AY,"Switching subtitle rendition"),[4,this.oGt(this.OXt,this.FXt,n)])):(this.ujt=t,[2]);case 1:return i.sent(),[2]}})}).call(this)},i.wjt=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return this.ljt?[2]:(i=0===this.$L.V,t.Km===MG.Bk||t.Km===MG.Dk&&i?[3,2]:[4,this.yjt(t,n)]);case 1:return r.sent(),[3,10];case 2:return this.sjt&&this.sjt.length<=1?t.Km!==MG.Bk||this.FXt===t?[3,4]:[4,this.oGt(this.OXt,t,this.UXt)]:[3,8];case 3:return r.sent(),[3,6];case 4:return t.Km===MG.Dk&&i&&this.OXt!==t?[4,this.oGt(t,this.FXt,this.UXt)]:[3,6];case 5:r.sent(),r.label=6;case 6:return[4,this.yjt(t,n)];case 7:return r.sent(),[3,10];case 8:return[4,this._jt()];case 9:r.sent(),r.label=10;case 10:return[2]}})}).call(this)},i.wVt=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,5]),[4,this.Fkt.wVt(t,n)];case 1:return r.sent(),[3,5];case 2:return lr(i=r.sent()),ql(i)||Gl(i)?[4,this.wjt(t,n)]:[3,4];case 3:r.sent(),r.label=4;case 4:throw i;case 5:return[2]}})}).call(this)},i.yjt=function(t,n){return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:if(i=this,ji(this.Ajt,t))return[2];this.Ajt.push(t),s.label=1;case 1:return s.trys.push([1,3,4,7]),r=t.Km===MG.OU||t.Km===MG.bLt?1/0:this._dt.maxRetries,[4,gT(function(){return i.retryOfflineRenditionsCallback(t,n)},n,r,this._dt.minimumBackoff,this._dt.maximumBackoff)];case 2:return s.sent(),[3,7];case 3:return e=s.sent(),this.oa.qq(new fd(cd.MEDIA_LOAD_ERROR,e.message,e)),[3,7];case 4:return Xi(this.Ajt,t),t.IMt.jFt!==-1/0?[3,6]:[4,this.oa.rXt()];case 5:s.sent(),s.label=6;case 6:return[7];case 7:return[2]}})}).call(this)},i.UGt=function(t){return Vt(function(){var n,i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return i=this.OXt,r=this.FXt,(e=[]).push(this.bjt(r,t)),sG(i,r)||e.push(this.bjt(i,t)),s=this.UXt,(null==(n=this.Mc.hls)?void 0:n.delaySubtitlePreload)?[4,ut.all(e)]:[3,3];case 1:return o.sent(),[4,this.bjt(s,t)];case 2:return o.sent(),[3,5];case 3:return u=this.bjt(s,t),[4,ut.all([].concat(e,[u]))];case 4:o.sent(),o.label=5;case 5:return[2]}})}).call(this)},i.bjt=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:if(!t)return[2];r.label=1;case 1:return r.trys.push([1,3,,6]),[4,this.Fkt.wVt(t,n)];case 2:return r.sent(),[3,6];case 3:return lr(i=r.sent()),ql(i)||Gl(i)?[4,this.Sjt(t,n)]:[3,5];case 4:r.sent(),r.label=5;case 5:return[3,6];case 6:return[2]}})}).call(this)},i.Sjt=function(t,n){return Vt(function(){var i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return this.ljt?[2]:(i=0===this.$L.V,t.Km===MG.Bk||t.Km===MG.Dk&&i?[3,2]:[4,this.yjt(t,n)]);case 1:return o.sent(),[3,7];case 2:return this.sjt&&this.sjt.length<=1?[4,this.yjt(t,n)]:[3,4];case 3:return o.sent(),[3,7];case 4:return[4,this.YXt()];case 5:return r=o.sent(),this.JXt(r),e=this.$Xt(r.FOt),s=this.tjt(r.UOt),u=this.ijt(r.VOt),[4,this.oGt(e,s,u)];case 6:o.sent(),o.label=7;case 7:return[2]}})}).call(this)},i.oGt=function(t,n,i,r){void 0===r&&(r={});var e={jMt:r.jMt||!1,KMt:r.KMt||!1,QMt:r.QMt||!1,Jx:r.Jx||!1,RGt:r.RGt||!1};return e.RGt||e.Jx||this.OXt!==t||this.FXt!==n||this.UXt!==i?void 0===t&&void 0===n?ut.reject(new y("Trying to buffer no media renditions.")):(this.OXt=t,this.FXt=n,this.UXt=i,this.hUt(),this.So(new rY),this.oa.oGt(e)):ut.resolve()},i.XMt=function(t,n){return Vt(function(){var i,r,e,s;return zt(this,function(u){switch(u.label){case 0:return i=this,this.oa.IGt?t?this.cjt(t)?t===this.LXt?(_G.hB(AY,"Trying to set the already active variant stream, ignoring."),[2]):(r=this.OXt?Ui(t.FOt,function(t){return eG(t,i.OXt)}):void 0,e=this.FXt?Ui(t.UOt,function(t){return eG(t,i.FXt)}):void 0,s=this.UXt?Ui(t.VOt,function(t){return eG(t,i.UXt)}):void 0,this.JXt(t),this.lDt=void 0,[4,this.oGt(r,e,s,n)]):(_G.lt(AY,"Trying to set an active variant stream that does not exists on the internal model."),[2]):(_G.lt(AY,"Cannot explicitly set the active variant stream to undefined."),[2]):(_G.lt(AY,"The LLHLSPlayer is not loaded."),[2]);case 1:return u.sent(),[2]}})}).call(this)},i.JXt=function(t){var n;if(_G.hB(AY,"Setting active variant stream."),this.LXt!==t){var i=(null==(n=this.LXt)?void 0:n.XLt)!==(null==t?void 0:t.XLt);if(this.LXt&&i)for(var r,e=Lt(this.LXt.VOt);!(r=e()).done;){var s=r.value;this.KXt.zOt(s)}if(this.LXt=t,this.So(new iY),t&&i)for(var u,o=Lt(t.VOt);!(u=o()).done;){var h=u.value;this.KXt.Czt(h)}}},i.Tjt=function(){this.kjt(this.YL),this.kjt(this.$L)},i.kjt=function(t){for(var n,i=[],r=Lt(t.II);!(n=r()).done;){for(var e,s=n.value,u=[],o=Lt(s.KI.II);!(e=o()).done;){var h=e.value;ji(h.WMt.lLt,h.UMt)||u.push(h)}for(var c,a=Lt(u);!(c=a()).done;){var f=c.value;s.KI._S(f),f.kn()}0===s.KI.V&&i.push(s)}for(var v,d=Lt(i);!(v=d()).done;){var l=v.value;t.it(l),l.kn()}},i.KGt=function(t){return Vt(function(){var n,i,r,e,s;return zt(this,function(u){switch(u.label){case 0:n=this,i={stack:[],error:void 0,hasError:!1},u.label=1;case 1:return u.trys.push([1,3,4,5]),r=qt(i,hr.ep([t]),!1),e=[this.FXt,sG(this.OXt,this.FXt)?void 0:this.FXt,this.UXt].filter(Un),[4,ut.all(e.filter(function(t){return!t.IMt.VFt}).map(function(t){return n.Fkt.yVt(t,r.Yg)}))];case 2:return u.sent(),[3,5];case 3:return s=u.sent(),i.error=s,i.hasError=!0,[3,5];case 4:return Gt(i),[7];case 5:return[2]}})}).call(this)},i.zGt=function(){return Vt(function(){var t,n,i,r,e,s,u,o,h,c,a,f,v,d,l,w,g,_,m,y,p,k;return zt(this,function(b){switch(b.label){case 0:if(r=this.OXt,e=this.FXt,s=null==(t=this.LXt)?void 0:t.frt,u=[],void 0!==r){if(!(c=null!=(h=null==(o=r.frt)?void 0:o.yCt)?h:null==s?void 0:s.yCt))return[2,void 0];a='audio/mp4; codecs="'+c+'"',_G.hB(AY,"Configuring MediaSource for initial audio rendition with codec: "+a+"."),u.push(a)}if(void 0!==e){if(!(d=null!=(v=null==(f=e.frt)?void 0:f.bCt)?v:null==s?void 0:s.bCt))return[2,void 0];l='video/mp4; codecs="'+d+'"',_G.hB(AY,"Configuring MediaSource for initial video rendition with codec: "+l+"."),u.push(l)}return 0===u.length?(_G.cLt(AY,"No codecs found on the active variant stream."),[2,void 0]):(g=null!=(w=null==e||null==(n=e.IMt.ect[0])?void 0:n.MW)?w:[],m=null!=(_=null==r||null==(i=r.IMt.ect[0])?void 0:i.MW)?_:[],y=this.Mc,p=this.Br,[4,qG(y.contentProtection,u,[].concat(p.UUt,m,g),this.nV,y.useCredentials)]);case 1:return k=b.sent(),[2,{Km:Sy.wV,L4:u.map(function(t){return{qT:t}}),aq:k,X4:y.useManagedMediaSource}]}})}).call(this)},i.XGt=function(t,n,i,r,e){var s,u,o=this.OXt,h=this.FXt,c=t&&sG(o,h);if(n&&h)if(this.WXt)(i||e||c&&r)&&(this.WXt.Zg(),this.WXt.ezt.Gy()),this.WXt.UMt!==h&&this.WXt.oWt(h);else{var a=c?[ig.Bk,ig.Dk]:[ig.Bk];this.WXt=this.Pjt(h,a)}else null==(s=this.WXt)||s.zg(),this.WXt=void 0;t&&o&&!c?this.HXt?((i||r)&&(this.HXt.Zg(),this.HXt.ezt.Gy()),this.HXt.UMt!==o&&this.HXt.oWt(o)):this.HXt=this.xjt(o):(null==(u=this.HXt)||u.zg(),this.HXt=void 0)},i.jGt=function(t){var n=this.UXt;this.Ejt&&(this.Ejt.UMt===n?t&&(this.Ejt.Zg(),this.Ejt.ezt.Gy()):(this.Ejt.zg(),this.Ejt=void 0));if(!this.Ejt&&n&&(this.Ejt=this.Ijt(n)),n){var i=this.KXt.Lzt(n);i.Xk=Hm.Kn,this.rzt(i)}},i.Pjt=function(t,n){var i=function(t,n,i,r,e,s,u,o,h,c,a){var f=i.Br.mM,v=new HQ(f),d=new LQ(ig.Bk,t,i,v,r,e,s,a),l=u.YSt(v,f,n);return new nY(d,v,l,o,h,c)}(t,n,this.Fkt,this.nV,this.eut,this.mHt,this.bGt,this.wpt,this.hBt,this.Rz,this.Mc.useCredentials);return i.$qt.wn(MQ.iWt,this.Rjt),i.$qt.wn(MQ.eWt,this.Cjt),i.tzt.wn(QQ.bqt,this.Djt),i.tzt.wn(QQ.Tqt,this.Bjt),i.tzt.wn(QQ.kqt,this.Njt),i.tzt.wn(QQ.Sqt,this.Mjt),i},i.xjt=function(t){var n=function(t,n,i,r,e,s,u,o,h){var c=n.Br.mM,a=new HQ(c),f=new LQ(ig.Dk,t,n,a,i,r,e,h),v=s.YSt(a,c,[ig.Dk]);return new nY(f,a,v,u,void 0,o)}(t,this.Fkt,this.nV,this.eut,this.mHt,this.bGt,this.wpt,this.Rz,this.Mc.useCredentials);return n.$qt.wn(MQ.eWt,this.Cjt),n.tzt.wn(QQ.bqt,this.Djt),n.tzt.wn(QQ.Sqt,this.Mjt),n},i.Ijt=function(t){return function(t,n,i,r,e,s){var u=n.Br.mM,o=new HQ(u),h=new LQ(ig.NT,t,n,o,i,r,e,s),c=new ZQ(o,u,ig.NT);return new nY(h,o,c)}(t,this.Fkt,this.nV,this.eut,this.mHt,this.Mc.useCredentials)},i.izt=function(t,n){if(t?this.P4&&this.P4.Tzt(t,this.zU)||(this.P4=new hY(ig.Dk,t,this.zU)):this.P4=void 0,n?this.x4&&this.x4.Tzt(n,this.zU)||(this.x4=new hY(ig.Bk,n,this.zU)):this.x4=void 0,void 0!==this.WXt){var i=void 0!==t&&void 0===this.HXt,r=[this.x4,i?this.P4:void 0].filter(Un);this.WXt.izt(r)}if(void 0!==this.HXt){var e=this.P4?[this.P4]:[];this.HXt.izt(e)}},i.rzt=function(t){t?this.Ljt&&this.Ljt.Tzt(t)||(this.Ljt=new aY(t,this.Br.mM)):this.Ljt=void 0,void 0!==this.Ejt&&void 0!==this.Ljt&&this.Ejt.rzt(this.Ljt)},i.vGt=function(t){if(this.JU!==t){this.JU=t;for(var n,i=Lt(this.jXt);!(n=i()).done;){n.value.YU(t)}var r=this.UXt;if(void 0!==r){var e=this.KXt.Lzt(r);this.rzt(e)}}},i.QGt=function(t,n){var i=[];t&&i.push(ig.Dk),n&&i.push(ig.Bk),this.Br.mM.OUt(i)},i.Ojt=function(){if(void 0===this.WXt)return!1;var t=Vn.Mg();if(!this.WXt.$qt.nqt(t))return!1;var n=this.WXt.$qt.tqt();if(void 0===n||void 0===n.$at.ct)return!1;var i=this.MP,r=this.oa.ux,e=this.WXt.hzt.JM(i);return!((void 0!==e?e.An(0)-i:0)>=2*n.$at.ct*r)&&(n.iqt>0&&0===n.eqt?n.sqt>1e3*n.$at.ct*.8:8*n.eqt/this.Rz.kY.kW>=1.8*n.$at.ct)},i.Fjt=function(){return Vt(function(){var t,n,i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,this.yLt()];case 1:return void 0===(n=o.sent())||void 0===(i=null==(t=this.WXt)?void 0:t.$qt.tqt())?[2]:(r=this.LXt,i.eqt>0&&(e=b.max(0,i.eqt-i.iqt),s=i.eqt*(n.kW/r.kW),e<=s)?[2]:(u=n.kW0&&i.every(function(t){return function(t){return t.IMt.ect.length>0&&!t.IMt.POt}(t)})?1/0:NaN}},{key:"ct",get:function(){var t;return null!=(t=this.$Gt)?t:this.zXt}},{key:"tGt",get:function(){var t;return null!=(t=this.qXt)?t:this.zXt}},{key:"Ozt",get:function(){var t=this.Uzt;if(0!==t.length&&this.ct===1/0){for(var n,i,r=Lt(t);!(i=r()).done;){var e=i.value,s=e.IMt.Sx;if(0!==s.V){var u=s.An(s.V-1)+e.IMt.cSt,o=e.IMt.zFt,h=u+(null!=o?o:0);(!n||nt}F(),Et(),Wt(),Qt();var DY=function(){function t(){}var n=t.prototype;return n.Xq=function(t,n){return!!XA(t.type)&&!t.useNativePlayback},n.jq=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return t.aes128?[2,!0]:[4,Dp(t,!0)];case 1:return[2,n.sent()]}})})()},t}();F(),Et(),F(),Et(),Wt(),Qt();var PY=function(){function t(){}var n=t.prototype;return n.gHt=function(t,n,i){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,crypto.subtle.importKey("raw",n,{name:"AES-CBC"},!1,["decrypt"])];case 1:return r=s.sent(),[4,crypto.subtle.decrypt({name:"AES-CBC",iv:i},r,t)];case 2:return e=s.sent(),[2,new E(e)];case 3:throw s.sent(),new fd(cd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error during AES128 decrypt.");case 4:return[2]}})})()},n.zg=function(){},t.LS=function(){return"undefined"!=typeof crypto&&void 0!==crypto.subtle&&void 0!==crypto.subtle.decrypt},t}();F(),Et(),F(),Et(),Wt(),Qt(),F(),Et(),Bt(),Dt(),H(),Ut(),F(),Et(),Dt();var NY=function(t){function n(n,i){var r;return(r=t.call(this,n)||this).data=void 0,r.data=i,r}return Ct(n,t),n}(rh),BY=["message","messageerror","error"];F(),Et(),Dt();var xY=function(t){function n(n){var i;return(i=t.call(this,zm.ma)||this).error=void 0,i.error=n,i}return Ct(n,t),n}(rh),OY=function(t){function n(n){var i;return(i=t.call(this)||this).zjt=void 0,i.Wjt=void 0,i.Gjt=[],i.Qjt=function(t){if(i.Hjt)t.jjt();else{i.zjt=t,i.zjt.wn(BY,i.Rs);for(var n,r=Lt(i.Gjt);!(n=r()).done;){var e=n.value;t.qjt(e.Py,e.Xjt)}Yi(i.Gjt)}},i.Kjt=function(t){if(!i.Hjt){var n=V(t,y)?t:new y("Could not create Worker.");i.So(new xY(n)),i.jjt()}},i.Wjt=new hr,n(i.Wjt.Yg).then(i.Qjt,i.Kjt),i}Ct(n,t);var i=n.prototype;return i.qjt=function(t,n){this.Hjt||(void 0!==this.zjt?this.zjt.qjt(t,n):this.Gjt.push({Py:t,Xjt:n}))},i.jjt=function(){this.Hjt||(this.Wjt.Zg(),Yi(this.Gjt),void 0!==this.zjt&&this.zjt.jjt())},Nt(n,[{key:"Hjt",get:function(){return this.Wjt.Yg.Hg}}]),n}(th);F(),Et(),F(),Et(),Dt(),H();var MY=function(t){function n(n,i){var r;return(r=t.call(this)||this).zjt=void 0,r.Yjt=function(t){r.So(new NY("message",t.data))},r.Jjt=function(t){r.So(new NY("messageerror",t.data))},r.w9=function(t){null==t.preventDefault||t.preventDefault.call(t);var n=V(t.error,y)?t.error:new y(t.message);r.So(new xY(n)),r.jjt()},r.zjt=new I(n,i),r.zjt.addEventListener("message",r.Yjt),r.zjt.addEventListener("messageerror",r.Jjt),r.zjt.addEventListener("error",r.w9),r}Ct(n,t);var i=n.prototype;return i.qjt=function(t,n){n?this.zjt.postMessage(t,n):this.zjt.postMessage(t)},i.jjt=function(){this.Vo(),this.zjt.removeEventListener("message",this.Yjt),this.zjt.removeEventListener("messageerror",this.Jjt),this.zjt.removeEventListener("error",this.w9),this.zjt.terminate()},n}(th);F(),Et(),Dt();var LY=0,UY=function(t){function n(n,i){var r;(r=t.call(this)||this).hS=void 0,r.iQt=void 0,r.Zjt=void 0,r.eQt=void 0,r.$jt=function(){r.Zjt.removeEventListener("load",r.$jt),r.Zjt.contentWindow.postMessage({type:"initialize",id:r.hS,script:r.iQt},"*")},r.tQt=function(t){t.origin===r.eQt&&t.data.id===r.hS&&("initialized"===t.data.type||("error"===t.data.type?(r.So(new xY(new y(t.data.data.message))),r.jjt()):r.So(new NY("message",t.data.data))))},r.hS=LY++,r.iQt=n;var e=Vn.Dh("iframe.html",i);return r.Zjt=function(t){var n=v.createElement("iframe");return n.width="0",n.height="0",n.style.display="none",n.role="",n.src=t,v.body.appendChild(n),n}(e.href),r.eQt=e.origin,r.Zjt.addEventListener("load",r.$jt),self.addEventListener("message",r.tQt),r}Ct(n,t);var i=n.prototype;return i.qjt=function(t,n){n?this.Zjt.contentWindow.postMessage({type:"message",data:t},"*",n):this.Zjt.contentWindow.postMessage({type:"message",data:t},"*")},i.jjt=function(){var t;this.Zjt.removeEventListener("load",this.$jt),self.removeEventListener("message",this.tQt),null==(t=this.Zjt.contentWindow)||t.postMessage({type:"terminate"},"*"),$n(this.Zjt)},n}(th);function FY(t,n,i){var r=Vn.xm(t,n);return new OY(function(t){return function(t,n,i,r){return Vt(function(){var e,s,u,o,h,c,a;return zt(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,HY(e=new MY(t,i),r)];case 1:return f.sent(),[2,e];case 2:return s=f.sent(),null==e||e.jjt(),lr(s),[3,3];case 3:if(!VY||!Bd)return[3,13];f.label=4;case 4:return f.trys.push([4,7,,8]),[4,Vn.SP.lk({Yu:t,Uk:wl.GET,dk:Md.NT,Yg:r})];case 5:return[4,f.sent().UT(r)];case 6:return u=f.sent(),[3,8];case 7:return lr(f.sent()),[3,8];case 8:if(!u)return[3,13];f.label=9;case 9:return f.trys.push([9,11,12,13]),h=Bd([u],{type:"application/javascript"}),o=URL.createObjectURL(h),[4,HY(e=new MY(o,i),r)];case 10:return f.sent(),[2,e];case 11:return c=f.sent(),null==e||e.jjt(),lr(c),VY=!1,[3,13];case 12:return o&&URL.revokeObjectURL(o),[7];case 13:return f.trys.push([13,15,,16]),[4,HY(e=new UY(t,n),r)];case 14:return f.sent(),[2,e];case 15:throw a=f.sent(),null==e||e.jjt(),a;case 16:return[2]}})})()}(r,n,i,t)})}var VY=!0;function HY(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return[4,t.ww(["message","error"],n)];case 1:if("error"===(i=r.sent()).type)throw function(t){return new fd(cd.CONFIGURATION_ERROR,"THEOplayer workers could not be loaded. Please check the configuration of the libraryLocation.",t)}(i.error);if(!function(t){return Xn(t)&&"10.0.0"===t.sQt}(i.data))throw new fd(cd.CONFIGURATION_ERROR,"THEOplayer workers could not be loaded. Please check that the worker's version matches THEOplayer's version (10.0.0).");return[2,i]}})})()}F(),Et();var WY=function(t){return t.nQt="gHt",t.rQt="WHt",t}({}),zY=function(t){return t.hQt="oQt",t.aQt="uQt",t}({}),XY=function(){function t(t){var n=this;this.lQt=void 0,this.dQt=void 0,this.zjt=void 0,this._Qt=0,this.AQt=Ju(),this.fQt=function(t){var i=t.data,r=i.bQt,e=n.AQt.get(r);if(e)if(n.AQt.delete(r),i.SQt===zY.hQt)e.Xy(i.TQt);else if(i.SQt===zY.aQt){var s=i.kQt,u=i.EQt?new y(i.EQt):void 0,o=new fd(cd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error during AES128 decrypt. (code: "+s+")",u);e.jy(o)}},this.vQt=function(t){var i=new fd(cd.CONTENT_PROTECTION_INTERNAL_ERROR,t.error.message,t.error);n.zg(i)},this.lQt=t;try{this.dQt=Vn.xm("theoplayer.d.js",t)}catch(t){throw new fd(cd.CONFIGURATION_ERROR,"Invalid player configuration: missing libraryLocation",t)}}var n=t.prototype;return n.cQt=function(){var t=FY(this.dQt,this.lQt,{name:"THEOplayer decrypt worker"});return t.wn("message",this.fQt),t.wn("error",this.vQt),t},n.gHt=function(t,n,i){var r=""+ ++this._Qt,e={gQt:WY.nQt,pQt:r,mQt:t,wQt:n,yQt:i},s=new Vc;return this.AQt.set(r,s),null!=this.zjt||(this.zjt=this.cQt()),this.zjt.qjt(e),s.Qy},n.zg=function(t){void 0===t&&(t=new fr),this.AQt.forEach(function(n){return n.jy(t)}),this.AQt.clear(),this.zjt&&(this.zjt.jjt(),this.zjt=void 0)},t}();function qY(t){var n=Ui(t.boxes,rC);if(n){var i=Ui(n.boxes,eC);if(i)return i.handlerType}}function GY(t){var n,i=new wv;return(n=i.boxes).push.apply(n,[].concat(t.boxes)),i}function jY(t){var n,i=new Rf;return(n=i.boxes).push.apply(n,[].concat(t.boxes)),i}F(),Et(),Dt(),F(),Et(),Wt(),Dt(),Ut(),Qt(),F(),Et(),Wt(),Dt(),Ut(),Qt(),F(),Et(),H();var QY=8;function YY(t,n){for(var i=function(t){var n,i=new Vf;return(n=i.boxes).push.apply(n,[].concat(t.boxes)),i}(t),r=JY(n),e=0;e=0){var h=u.boxes[o],c=jY(u);c.boxes[o]=new $a(new E(h.getSize()-QY)),i.boxes[e]=c}}}return i}function KY(t,n){for(var i=function(t){var n,i=new Zf;return(n=i.boxes).push.apply(n,[].concat(t.boxes)),i}(t),r=0;r0){var f=a.samples;if(!a.flags.sampleDurationPresent){a.flags.sampleDurationPresent=!0;for(var v,d=null!=r?r:s.defaultSampleDuration,l=Lt(f);!(v=l()).done;){v.value.duration=d}}f[0].duration+=o.toNumber(),a.samples=f}}}F(),Et(),H(),Ut();var $Y="Mp4Transmuxer",tK=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).j2=void 0,n.PQt=void 0,n.CQt=void 0,n.DQt=void 0,n.RQt=void 0,n}Ct(n,t);var i=n.prototype;return i.Vqt=function(t,n){dr(n);var i=t.UMt,r=UC(_c(t.bOt.ck.ck));if(!r)throw new y("Mp4Transmuxer - Unable to parse "+i.Km+" MP4 initializer.");this.j2=r;var e=function(t){for(var n,i,r,e=Lt(t.Z);!(r=e()).done;){var s=r.value;n||(n=s.T1),i||(i=s.S1)}if(n||i)return{yCt:n,bCt:i,ULt:void 0};return}(r);e&&this.zqt(i,e);var s=function(t){for(var n,i=Lt(t.Z);!(n=i()).done;){var r=n.value;if(void 0!==r.E1)return r.E1}return}(r);void 0!==s&&this.Gqt(i,s);var u=function(t){var n,i,r,e,s,u=kv(t),o=Ui(u.boxes,tC),h=o.boxes.filter(nC),c=Ui(h,function(t){return qY(t)===af.AUDIO}),a=Ui(h,function(t){return qY(t)===af.VIDEO}),f={yCt:{$D:c?JY(c):void 0},bCt:{$D:a?JY(a):void 0}},v=null==(n=Ui(o.boxes,sC))?void 0:n.boxes.filter(uC),d=v?{yCt:null!=(i=Ui(v,function(t){return t.trackId===f.yCt.$D}))?i:void 0,bCt:null!=(r=Ui(v,function(t){return t.trackId===f.bCt.$D}))?r:void 0}:void 0;if(d&&(f.yCt.NN=null==(e=d.yCt)?void 0:e.defaultSampleDuration,f.bCt.NN=null==(s=d.bCt)?void 0:s.defaultSampleDuration),!c||!a)return{yCt:c?t:void 0,bCt:a?t:void 0,DU:f};var l=GY(u),w=GY(u),g=u.boxes.indexOf(o);l.boxes[g]=YY(o,a),w.boxes[g]=YY(o,c);var _=l.serialize().join(),m=w.serialize().join();return{yCt:_,bCt:m,DU:f}}(t.bOt.ck.ck);if(this.PQt=u.DU,u.bCt){var o=Ui(r.Z,function(t){return t.$D===u.DU.bCt.$D}),h={Km:"FRt",ck:{Km:FR.vZ,ck:u.bCt},Lot:ig.Bk,kOt:t.kOt,Yqt:{frt:'video/mp4; codecs="'+o.S1+'"',MW:t.MW},EO:t.EO,UMt:t.UMt,hHt:t.bOt.hHt};this.fqt(h)}if(u.yCt){var c=Ui(r.Z,function(t){return t.$D===u.DU.yCt.$D}),a={Km:"FRt",ck:{Km:FR.vZ,ck:u.yCt},Lot:ig.Dk,kOt:t.kOt,Yqt:{frt:'audio/mp4; codecs="'+c.T1+'"',MW:t.MW},EO:t.EO,UMt:t.UMt,hHt:t.bOt.hHt};this.fqt(a)}return ut.resolve()},i.Wqt=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c,a,f,v,d,l,w,g,_,m,y,p,k,b,A,T;return zt(this,function(S){switch(S.label){case 0:if(dr(n),i=t.$at.hHt,_G.hB($Y,"Transmuxing fMP4: "+VG(i.nyt)),r=t.$at.ck,e=nK(r.ck,this.j2),void 0!==(s=tr(e.map(function(t){return t.Pet}),__))&&(i.xet=s,this.jqt(t.UMt)),this.qUt.gUt(t.kOt))return[3,2];if(u=g_.eU(i.EO),e.length>0){for(o=tr(e.map(function(t){return t.xQt}),__),h=Lt(this.Bqt);!(c=h()).done;)a=c.value,this.qUt.PUt(t.kOt,a,o,u,iK(i),!1);this.jqt(t.UMt)}return this.qUt.gUt(t.kOt)?[3,2]:[4,gr(this.qUt.mUt(t.kOt),n)];case 1:S.sent(),S.label=2;case 2:return f=this.qUt.TUt(t.kOt),v=i.xet?this.qUt.kUt(i.xet,i).iF():i.EO,d=KQ(i,v),l=JQ(i,d),g={lHt:d,fHt:l,EO:v,ct:null!=(w=i.ct)?w:0,bU:f.iF(),kOt:t.kOt,UMt:t.UMt,hHt:t.$at.hHt},_=function(t,n){if(void 0===n.yCt.$D)return{yCt:void 0,bCt:t};if(void 0===n.bCt.$D)return{yCt:t,bCt:void 0};for(var i=kv(t),r=GY(i),e=GY(i),s=0;sc&&(c=m)}var y=g_.gF(t.GN.GN,u.qD);e.push({$D:s,xQt:y,Pet:y.lO(g_.pF(h,u.qD)),NQt:y.lO(g_.pF(o,u.qD)),BQt:y.lO(g_.pF(c,u.qD))})},e=[],s=Lt(t.Z);!(i=s()).done;)r();return e}(i,n)}function iK(t){return Xj(t)?t.AOt:0===t.eFt&&t.tFt.AOt}var rK="MpegtsTransmuxer",eK=function(t){function n(n,i,r,e){var s;return(s=t.call(this,i,r,e)||this).pE=void 0,s.HQt=void 0,s.qQt=void 0,s.GQt=void 0,s.jQt=void 0,s.zQt=-1,s.XQt=-1,s.FQt=void 0,s.UQt=Zu(),s.pE=n,s}Ct(n,t);var i=n.prototype;return i.Vqt=function(n,i){return t.prototype.Vqt.call(this,n,i)},i.Oqt=function(n,i){if(t.prototype.Oqt.call(this,n,i),!this.pE.MQt()){var r,e=null!=(r=null==i?void 0:i.nyt)?r:n.nyt;if(e)/\.(ts|aac|mp3)/i.test(e.zE)&&this.pE.LQt()}},i.OQt=function(t){var n;return t.UMt===this.FQt&&this.UQt.has(t.kOt)?n=this.UQt.get(t.kOt):(n=lQ(t.$at.ck.ck),this.FQt=t.UMt,this.UQt.set(t.kOt,n)),n},i.Wqt=function(n,i){var r=this;return Vt(function(){var e,s,u,o,h,c,a,f,v,d,l,w,g,_,m,y,p,k,b,A,T,S,E,I,R,C,D,P,N,B,x,O,M;return zt(this,function(L){switch(L.label){case 0:if(dr(i),e=this.OQt(n),s=n.$at,e!==dQ.WVt&&e!==dQ.qVt)return[2,t.prototype.Wqt.call(r,n,i)];if(s.hHt.MW.some(uK))throw new fd(cd.CONTENT_PROTECTION_NOT_SUPPORTED,"SAMPLE-AES encryption is not supported for MPEG-TS or Packed Audio segments");return u=this.pE.LQt(),e!==dQ.WVt?[3,2]:(_G.hB(rK,"Transmuxing MPEG-TS: "+VG(s.hHt.nyt)),[4,u.VQt({data:s.ck.ck,metadata:this.HQt})]);case 1:return o=L.sent(),[3,4];case 2:return _G.hB(rK,"Transmuxing raw audio: "+VG(s.hHt.nyt)),[4,u.WQt({data:s.ck.ck,metadata:this.HQt})];case 3:o=L.sent(),L.label=4;case 4:if(dr(i),this.zqt(n.UMt,{yCt:o.metadata.audio_codec,bCt:o.metadata.video_codec,ULt:void 0}),o.metadata.video_frame_rate&&this.Gqt(n.UMt,o.metadata.video_frame_rate),h=oK(o.metadata.first_decode_timestamp),c=oK(o.metadata.first_presentation_timestamp),a=void 0!==o.metadata.first_video_presentation_timestamp?oK(o.metadata.first_video_presentation_timestamp):void 0,s.hHt.xet=c,this.jqt(n.UMt),void 0!==a&&this.Xqt(n.UMt,s.hHt,function(t,n){var i=t.lF(n);return i.aF(g_.wF)&&(i=i.lO(p_())),i}(a,c)),this.qUt.gUt(n.kOt))return[3,6];for(f=g_.eU(s.hHt.EO),v=Lt(this.Bqt);!(d=v()).done;)l=d.value,this.qUt.PUt(n.kOt,l,h,f,iK(s.hHt),!0);return this.jqt(n.UMt),this.qUt.gUt(n.kOt)?[3,6]:[4,gr(this.qUt.mUt(n.kOt),i)];case 5:L.sent(),L.label=6;case 6:if(w=this.qUt.EUt(h,s.hHt),this.HQt=o.metadata,g=this.qUt.kUt(c,s.hHt).iF(),_=KQ(s.hHt,g),m=JQ(s.hHt,_),p={lHt:_,fHt:m,EO:g,ct:null!=(y=s.hHt.ct)?y:0,bU:w.iF(),kOt:n.kOt,UMt:n.UMt,hHt:s.hHt},void 0===o.data.audio_media&&void 0===o.data.video_media){for(k=Lt(this.Bqt);!(b=k()).done;)A=b.value,T=Yu({Km:"$at",ck:void 0,Lot:A},p),this.fqt(T);return[2]}return S=[],void 0!==o.data.audio_media?(!o.data.audio_init||this.qQt&&this.zQt===n.kOt&&Dc(this.qQt,o.data.audio_init)||(E=this.qUt.kUt(s.hHt.xet,s.hHt).iF(),I={Km:"FRt",ck:{Km:FR.vZ,ck:o.data.audio_init},Lot:ig.Dk,kOt:n.kOt,Yqt:{frt:'audio/mp4; codecs="'+o.metadata.audio_codec+'"',MW:s.hHt.MW},EO:E,UMt:n.UMt,hHt:s.hHt},this.qQt=o.data.audio_init,this.zQt=n.kOt,this.fqt(I)),R=Yu({Km:"$at",ck:{Km:FR.vZ,ck:o.data.audio_media},Lot:ig.Dk},p),this.fqt(R)):n.$at.hHt.ZOt&&ji(this.Bqt,ig.Dk)&&(C=Yu({Km:"$at",ck:void 0,Lot:ig.Dk},p),this.fqt(C)),void 0!==o.data.video_media?(!o.data.video_init||this.GQt&&this.XQt===n.kOt&&Dc(this.GQt,o.data.video_init)||(D=this.qUt.kUt(s.hHt.xet,s.hHt).iF(),P={Km:"FRt",ck:{Km:FR.vZ,ck:o.data.video_init},Lot:ig.Bk,kOt:n.kOt,Yqt:{frt:'video/mp4; codecs="'+o.metadata.video_codec+'"',MW:s.hHt.MW},EO:D,UMt:n.UMt,hHt:s.hHt},this.GQt=o.data.video_init,this.XQt=n.kOt,this.jQt=UC(_c(o.data.video_init)),this.fqt(P)),N=this.jQt.Z[0],B=nK(o.data.video_media,this.jQt)[0],x=this.IQt(o.data.video_media,N,B,void 0,s.hHt),this.RQt=N,O=Yu({Km:"$at",ck:{Km:FR.vZ,ck:x},Lot:ig.Bk},p),this.fqt(O),S.push(B)):n.$at.hHt.ZOt&&ji(this.Bqt,ig.Bk)&&(M=Yu({Km:"$at",ck:void 0,Lot:ig.Bk},p),this.fqt(M)),this.CQt=s.hHt,this.DQt=S,[2]}})}).call(this)},i.Zg=function(){this.qQt=void 0,this.GQt=void 0,this.zQt=-1,this.XQt=-1,t.prototype.Zg.call(this)},n}(tK),sK=function(){function t(){}return t.prototype.YSt=function(t,n,i){return new eK(this,t,n,i)},t}();function uK(t){return t.Uk===UG.ELt}function oK(t){return g_.gF(ue.fromBits(t.low,t.high),t.base)}F(),Et(),F(),Et();var hK=function(t){return t[t.MPEGTS_TO_FMP4=0]="MPEGTS_TO_FMP4",t[t.RAW_AUDIO_TO_FMP4=1]="RAW_AUDIO_TO_FMP4",t}({}),cK=function(){var t=function(){if("undefined"==typeof WebAssembly)return!1;var t=On.d_;if(t>0&&t<=56)return!1;try{return void 0!==new WebAssembly.Module(mh("AGFzbQEAAAA="))}catch(t){return!1}}();return cK=function(){return t},t};var aK=function(){function t(t){var n=this;this.lQt=void 0,this.dQt=void 0,this.zjt=void 0,this._Qt=0,this.AQt=Zu(),this.fQt=function(t){var i=t.data;if(void 0!==i.requestId){var r=n.AQt.get(i.requestId);if(!r)return;n.AQt.delete(i.requestId),i.success?r.Xy(i.output):r.jy(new fd(i.errorCode,i.error))}else i.success||n.zg(new fd(i.errorCode,i.error))},this.vQt=function(t){var i=new fd(cd.MEDIA_DECODE_ERROR,t.error.message,t.error);n.zg(i)},this.lQt=t;var i=cK()?"THEOplayer.transmux.js":"THEOplayer.transmux.asmjs.js";try{this.dQt=Vn.xm(i,t)}catch(t){throw new fd(cd.CONFIGURATION_ERROR,"Invalid player configuration: missing libraryLocation",t)}this.zjt=this.cQt()}var n=t.prototype;return n.VQt=function(t){return this.QQt(hK.MPEGTS_TO_FMP4,t)},n.WQt=function(t){return this.QQt(hK.RAW_AUDIO_TO_FMP4,t)},n.cQt=function(){var t=FY(this.dQt,this.lQt,{name:"THEOplayer transmux worker"});return t.wn("message",this.fQt),t.wn("error",this.vQt),t},n.QQt=function(t,n){var i=++this._Qt,r={type:t,id:i,input:n},e=new Vc;return this.AQt.set(i,e),this.zjt.qjt(r),e.Qy},n.zg=function(t){void 0===t&&(t=new fr),this.AQt.forEach(function(n){return n.jy(t)}),this.AQt.clear(),this.zjt.jjt()},t}(),fK=function(t){function n(n){var i;return(i=t.call(this)||this).KQt=void 0,i.zjt=void 0,i.KQt=n,i.zjt=void 0,i}Ct(n,t);var i=n.prototype;return i.MQt=function(){return void 0!==this.zjt},i.LQt=function(){var t;return null!=(t=this.zjt)?t:this.zjt=new aK(this.KQt)},i.zg=function(){this.zjt&&(this.zjt.zg(),this.zjt=void 0)},n}(sK),vK=function(){function t(t){this.KQt=void 0,this.KQt=t}return t.prototype.Ret=function(){return new fK(this.KQt)},t}(),dK=function(t){function n(n,i,r,e,s){var u,o=function(t){return PY.LS()?new PY:new XY(t)}(s.libraryLocation),h=new vK(s.libraryLocation),c=new aW(SW.Ng.lPt,SW.Ng.dPt,SW.Ng.ect,SW.Ng.vPt);return(u=t.call(this,n,i,r,e,o,h,c,s)||this).CPt=void 0,On.X_&&(u.CPt=new RO(u)),u}Ct(n,t);var i=n.prototype;return i.Wx=function(){return this.TL.Wx()},i.kn=function(){var n=this;return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return[4,t.prototype.kn.call(n)];case 1:return r.sent(),null==(i=this.CPt)||i.kn(),[2]}})}).call(this)},Nt(n,[{key:"Vx",get:function(){return this.TL.Vx},set:function(t){this.TL.Vx=t}}]),n}(IY),lK=function(t){function n(n,i,r,e,s){var u,o=new IO(n),h=o.Gq(ig.Bk);return(u=t.call(this,h,i,r,e,s)||this).xq=void 0,u.xq=o,u}return Ct(n,t),n.prototype.kn=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.prototype.kn.call(n)];case 1:return i.sent(),[4,this.xq.Pq(this.TL)];case 2:return i.sent(),[2]}})}).call(this)},n}(dK),wK=function(t){function n(){return t.apply(this,arguments)||this}Ct(n,t);var i=n.prototype;return i.Xq=function(n,i){return!!De(n.useManagedMediaSource)&&(!(!n.useManagedMediaSource&&(On.ru||On.Tg))&&t.prototype.Xq.call(this,n,i))},i.jq=function(n){var i=this;return Vt(function(){return zt(this,function(r){return n.clearkey&&!n.fairplay&&On.X_?[2,!1]:[2,t.prototype.jq.call(i,n)]})})()},n}(DY),gK=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Kq=kb.dR,n}Ct(n,t);var i=n.prototype;return i.PR=function(t,n,i,r,e,s,u){return new lK(n,i,e,s,r)},i.Qq=function(){return!0},n}(wK);XT(new gK),_G.Rt=function(){var t;return Boolean(null==(t=f)?void 0:t.THEOplayerDebugLogsEnabled)},F(),Et(),F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Wt(),Dt(),Qt(),F(),Et();var _K=function(){function t(){}var n=t.prototype;return n.Uct=function(t,n){return ut.resolve(!1)},n.iut=function(t,n){return ut.resolve(void 0)},n.HSt=function(t){return ut.resolve(void 0)},n.WJ=function(t){return ut.resolve(void 0)},t}(),mK=function(t){function n(n,i,r){var e;return(e=t.call(this)||this).Ac=void 0,e.Fkt=void 0,e.JQt=void 0,e.nKt=void 0,e.j6=void 0,e.$Qt=void 0,e.nT=new hr,e.Ac=n,e.Fkt=new eQ(r,new _K,n.useCredentials,n.src,n.liveOffset),e.Fkt.wn(eh.qw,e.Rs),e.j6=!1,e}Ct(n,t);var i=n.prototype;return i.YQt=function(){var t;return null==(t=this.JQt)?void 0:t.IMt},i.Tn=function(){var t=this;kr(gT(function(){return t.ZQt(t.nT.Yg)},this.nT.Yg))},i.ZQt=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.Fkt.dVt(t)];case 1:return n.sent(),this.$Qt&&(this.tKt(this.$Qt.Ti,this.$Qt.Mi),this.$Qt=void 0),this.j6=!0,[2]}})}).call(this)},i.iKt=function(t,n){this.j6?this.tKt(t,n):this.$Qt={Ti:t,Mi:n}},i.tKt=function(t,n){var i=this.eKt(t,n),r=null==i?void 0:i.UOt[0];r!==this.JQt&&(this.sKt(),void 0!==r&&(this.JQt=r,this.nKt=new pQ(this.Fkt,r),this.nKt.PHt()))},i.sKt=function(){this.JQt=void 0,this.nKt&&(this.nKt.zg(),this.nKt=void 0)},i.eKt=function(t,n){var i=Ui(this.Fkt.Br.HUt,function(i){return void 0!==i.uCt&&i.uCt.Ti===t&&i.uCt.Mi===n});return null!=i?i:this.Fkt.Br.HUt[0]},i.kn=function(){this.Vo(),this.nT.Zg(),this.nT.zg(),this.sKt(),this.Fkt.zg()},n}(th);F(),Et(),Bt(),Dt(),Ut();var yK=function(t){function n(n){var i;(i=t.call(this)||this).B8=void 0,i.B8=n;for(var r,e=Lt(QT);!(r=e()).done;){var s=r.value;i.B8.wn(s,i.Rs)}return i}Ct(n,t);var i=n.prototype;return i.OP=function(t,n){this.MP=t},i.jx=function(){return this.B8.jx()},i.Hx=function(){return this.B8.Hx()},i.Aa=function(){return this.B8.Aa()},i.tI=function(t){return this.B8.tI(t)},i.Wx=function(){return this.B8.Wx()},i.we=function(){return this.B8.we()},i.Yx=function(){return this.B8.Yx()},i.Jx=function(){return this.B8.Jx()},i.zx=function(){return this.B8.zx()},i.Gx=function(){return this.B8.Gx()},i.hr=function(){return this.B8.hr()},i.Ta=function(t,n,i){return this.B8.Ta(t,n,i)},i.Px=function(t,n,i,r){return this.B8.Px(t,n,i,r)},i.xx=function(){return this.B8.xx()},i.be=function(){return this.B8.be()},i.Qx=function(){return this.B8.Qx()},i.Kx=function(){return this.B8.Kx()},i.kn=function(){this.Vo();for(var t,n=Lt(QT);!(t=n()).done;){var i=t.value;this.B8.mn(i,this.Rs)}return this.B8.kn()},Nt(n,[{key:"ht",get:function(){return this.B8.ht}},{key:"IP",get:function(){return this.B8.IP}},{key:"CP",get:function(){return this.B8.CP},set:function(t){this.B8.CP=t}},{key:"bt",get:function(){return this.B8.bt}},{key:"MP",get:function(){return this.B8.MP},set:function(t){this.B8.MP=t}},{key:"ct",get:function(){return this.B8.ct}},{key:"UP",get:function(){return this.B8.UP}},{key:"WP",get:function(){return this.B8.WP}},{key:"zP",get:function(){return this.B8.zP}},{key:"jP",get:function(){return this.B8.jP}},{key:"lt",get:function(){return this.B8.lt}},{key:"KP",get:function(){return this.B8.KP}},{key:"JP",get:function(){return this.B8.JP}},{key:"$P",get:function(){return this.B8.$P},set:function(t){this.B8.$P=t}},{key:"sx",get:function(){return this.B8.sx}},{key:"hx",get:function(){return this.B8.hx}},{key:"ux",get:function(){return this.B8.ux},set:function(t){this.B8.ux=t}},{key:"_x",get:function(){return this.B8._x}},{key:"mx",get:function(){return this.B8.mx},set:function(t){this.B8.mx=t}},{key:"Ax",get:function(){return this.B8.Ax}},{key:"Sx",get:function(){return this.B8.Sx}},{key:"kx",get:function(){return this.B8.kx}},{key:"nq",get:function(){return this.B8.nq}},{key:"nt",get:function(){return this.B8.nt}},{key:"Rx",get:function(){return this.B8.Rx}},{key:"rt",get:function(){return this.B8.rt}},{key:"Bx",get:function(){return this.B8.Bx}},{key:"Mx",get:function(){return this.B8.Mx},set:function(t){this.B8.Mx=t}},{key:"Fx",get:function(){return this.B8.Fx}},{key:"Vx",get:function(){return this.B8.Vx},set:function(t){this.B8.Vx=t}},{key:"hq",get:function(){return this.B8.hq}},{key:"BL",get:function(){}}]),n}(ih),pK=function(t){function n(n,i,r){var e;return(e=t.call(this,n)||this).rKt=void 0,e.hKt=void 0,e.oKt=!1,e.BVt=void 0,e.N7=void 0,e.handleManifestUpdate=function(t){e.So(t);var n=e.rKt.YQt();if(n){var i=e.nq;if(i){var r=i.getTime(),s=e.BVt;s||(s=new Nj,e.BVt=s),s.er(n.EOt,function(t){return(t.getTime()-r)/1e3}),!e.oKt&&s.L.V>0&&(e.nt.tt(s),e.N7.tt(s),e.oKt=!0)}}},e.CXt=function(){e.rKt&&e.rKt.iKt(e.Bx,e.Rx)},e.hKt=i,e.N7=new jP(e),e.wn(eh.Jw,e.CXt),e}Ct(n,t);var i=n.prototype;return i.Ta=function(n,i,r){var e=this;return Vt(function(){return zt(this,function(s){switch(s.label){case 0:return[4,t.prototype.Ta.call(e,n,i,r)];case 1:return s.sent(),n.hlsDateRange&&this.$wt(n,i),[2]}})}).call(this)},i.$wt=function(t,n){this.rKt=new mK(t,n,this.hKt),this.rKt.wn(eh.qw,this.handleManifestUpdate),this.rKt.Tn()},i.hr=function(){return this.BVt&&(this.nt.it(this.BVt),this.N7.it(this.BVt),this.BVt.kn(),this.BVt=void 0,this.oKt=!1),this.rKt&&(this.rKt.kn(),this.rKt=void 0),this.N7.hr(),t.prototype.hr.call(this)},i.kn=function(){return this.mn(eh.Jw,this.CXt),this.rKt&&(this.rKt.kn(),this.rKt=void 0),this.N7.kn(),t.prototype.kn.call(this)},n}(yK);!function(t){HT.Yq().Jq(t)}(function(t,n,i){return new pK(t,n,i)}),F(),Et(),F(),Et(),F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Wt(),Qt(),F(),Et(),Bt(),Dt();var kK=function(t){function n(n,i){var r;return void 0===i&&(i=""),(r=t.call(this,"An error occurred while casting.")||this).errorCode=void 0,r.description=void 0,r.errorCode=n,r.description=i,r}return Ct(n,t),Nt(n,[{key:"name",get:function(){return"CastError"}}]),n}(ar);function bK(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return EK()?[3,2]:[4,AK(t)];case 1:n.sent(),n.label=2;case 2:return SK()?[3,4]:[4,Ar(100,t)];case 3:n.sent(),n.label=4;case 4:return SK()?[3,6]:(Vn.um('Detected the Chromecast library was loaded without the CAF framework. It is strongly encouraged to load it with the CAF framework by using this URL: "//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"'),[4,TK()]);case 5:n.sent(),n.label=6;case 6:return[2]}})})()}function AK(t){return Vt(function(){var n,i,r,e,s,u;return zt(this,function(o){return(null==t?void 0:t.Hg)?[2,ut.reject(new fr)]:(n=function(){var t,n;return{Qy:new ut(function(i,r){t=i,n=r}),Xy:t,jy:n}}(),i=n.Qy,r=n.Xy,e=n.jy,s=f.__onGCastApiAvailable,u=function(){f.__onGCastApiAvailable=s,e(new fr)},f.__onGCastApiAvailable=function(n,i){n?r():e(new y(i)),null==t||t.jg(u),f.__onGCastApiAvailable=s,s&&s(n,i)},null==t||t.Xg(u),[2,i])})})()}var TK=_i(function(){return function(t){return new ut(function(n,i){var r=v.createElement("script");r.onload=function(){return n()},r.onerror=function(t){return i((null==t?void 0:t.error)||t)},r.type="text/javascript",r.src=t,(v.head||v.documentElement).appendChild(r)})}("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js").catch(function(){throw new kK("API_NOT_INITIALIZED","The Chromecast library could not be loaded successfully.")})});function SK(){return Boolean("undefined"!=typeof cast&&cast.framework)}function EK(){return"undefined"!=typeof chrome&&chrome&&chrome.cast&&chrome.cast.isAvailable}function IK(t,n,i,r){if(Un(n))for(var e,s=Lt(k.keys(n));!(e=s()).done;){var u=e.value;if("type"!==u&&"images"!==u){var o=n[u];Un(o)&&(t[u]=o)}}!function(t,n,i,r){if(!Un(i)&&!Un(null==n?void 0:n.images))return;t.images=[],i&&t.images.push(new r.Image(i));if(null==n?void 0:n.images)if(qn(n.images))t.images.push(new r.Image(n.images));else if(Hn(n.images))for(var e,s=Lt(n.images);!(e=s()).done;){var u,o,h=e.value,c=void 0;if(qn(h))c=new r.Image(h);else(c=new r.Image(h.src)).height=null!=(u=h.height)?u:null,c.width=null!=(o=h.width)?o:null;t.images.push(c)}}(t,n,i,r)}function RK(t,n,i){return void 0===i&&(i=chrome),function(t,n,i){switch(null==t?void 0:t.type){case"movie":var r=new i.MovieMediaMetadata;return IK(r,t,n,i),r;case"audio":var e=new i.MusicTrackMediaMetadata;return IK(e,t,n,i),!Un(e.artist)&&Un(t.artistName)&&(e.artist=t.artistName),e;case"tv-show":var s=new i.TvShowMediaMetadata;return IK(s,t,n,i),!Un(s.title)&&Un(t.episodeTitle)&&(s.title=t.episodeTitle),!Un(s.season)&&Un(t.seasonNumber)&&(s.season=t.seasonNumber),!Un(s.episode)&&Un(t.episodeNumber)&&(s.episode=t.episodeNumber),s;default:var u=new i.GenericMediaMetadata;return IK(u,t,n,i),u}}(t,n,function(t){return{GenericMediaMetadata:t.cast.media.GenericMediaMetadata,MovieMediaMetadata:t.cast.media.MovieMediaMetadata,TvShowMediaMetadata:t.cast.media.TvShowMediaMetadata,MusicTrackMediaMetadata:t.cast.media.MusicTrackMediaMetadata,Image:t.cast.Image}}(i))}function CK(t){switch(t){case chrome.cast.ErrorCode.CANCEL:return"CANCEL";case chrome.cast.ErrorCode.TIMEOUT:return"TIMEOUT";case chrome.cast.ErrorCode.API_NOT_INITIALIZED:return"API_NOT_INITIALIZED";case chrome.cast.ErrorCode.INVALID_PARAMETER:return"INVALID_PARAMETER";case chrome.cast.ErrorCode.EXTENSION_NOT_COMPATIBLE:return"EXTENSION_NOT_COMPATIBLE";case chrome.cast.ErrorCode.EXTENSION_MISSING:return"EXTENSION_MISSING";case chrome.cast.ErrorCode.RECEIVER_UNAVAILABLE:return"RECEIVER_UNAVAILABLE";case chrome.cast.ErrorCode.SESSION_ERROR:return"SESSION_ERROR";case chrome.cast.ErrorCode.CHANNEL_ERROR:return"CHANNEL_ERROR";case chrome.cast.ErrorCode.LOAD_MEDIA_FAILED:return"LOAD_MEDIA_FAILED";default:return"CANCEL"}}function DK(t){if(t.items&&t.items.length>0&&Un(t.currentItemId)&&t.currentItemId>=0)return Ui(t.items,function(n){return n.itemId===t.currentItemId})}F(),Et(),Wt(),Dt(),Ut(),Qt(),F(),Et(),Bt(),Dt(),F(),Et(),F(),Et(),Ut(),F(),Et();var PK="urn:x-cast:com.theoplayer.cast";F(),Et(),F(),Et();var NK=function(t){return t.aKt="theoplayer_receiver_info",t.uKt="theoplayer_trackpropertychange",t.cKt="theoplayer_propertychange",t}({});F(),Et();var BK=function(t){return t.SKIP_AD="SKIP_AD",t}({});F(),Et();function xK(t){v.createElement("img").src=t}F(),Et(),Ut(),F(),Et(),Wt(),Bt(),Qt(),F(),Et();var OK=new RegExp(/^(\d\d):(\d\d):(\d\d)(?:\.(\d{3}))?$/);function MK(t){if(qn(t)){var n=t.match(OK);if(n)return 3600*A(n[1],10)+60*A(n[2],10)+Number(n[3])+(Number(n[4])||0)/1e3}}function LK(t){if(void 0!==t){var n=t.match(/^([1-9]?\d|100)%$/);if(n)return A(n[1])/100}}function UK(t,n){return"vmap"===t.type||!Un(t.type)&&!Un(n)}function FK(t,n){return"vast"===t.type||!Un(t.type)&&Un(n)}F(),Et(),Wt(),H(),Ut(),Qt(),F(),Et(),Bt(),Dt(),F(),Et();var VK=function(){},HK=function(t){function n(n){var i;return(i=t.call(this)||this).qc=void 0,i.fKt=void 0,i.qc=n.sort(function(t,n){return t.VN-n.VN}),i}return Ct(n,t),n.prototype.lKt=function(){return null!=this.fKt||(this.fKt=Ji(this.qc,function(t){return t.lKt()})),this.fKt},Nt(n,[{key:"dKt",get:function(){return this.qc}}]),n}(VK);F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt(),Dt();var WK=function(t){function n(n,i){var r;return(r=t.call(this)||this).vKt=void 0,r._Kt=void 0,r.pKt=void 0,r.vKt=n,r._Kt=i,r.pKt=!1,r}return Ct(n,t),Nt(n,[{key:"o",get:function(){return this.vKt}},{key:"VN",get:function(){return this._Kt}},{key:"gKt",get:function(){return this.pKt}}]),n}(VK),zK=function(t){function n(n,i,r,e,s,u,o){var h;return(h=t.call(this,n,i)||this).AKt=void 0,h.SKt=void 0,h.kKt=void 0,h.wKt=void 0,h.JW=void 0,h.EKt=void 0,h.AKt=r,h.SKt=e,h.kKt=s,h.wKt=u,h.JW=o,h}return Ct(n,t),n.prototype.lKt=function(){if(void 0===this.EKt){for(var t,n,i,r,e=[],s=Lt(this.wKt);!(r=s()).done;){var u=r.value;u.PKt&&(t=u.PKt),u.xKt&&(n=u.xKt),u.IKt&&(i=u.IKt),e=e.concat(u.universalAdIds)}this.EKt={TKt:this.TKt,PKt:t,RKt:n,IKt:i,lt:this.lt,CKt:e}}return[this.EKt]},Nt(n,[{key:"mKt",get:function(){return this.wKt}},{key:"yKt",get:function(){return this.AKt}},{key:"bKt",get:function(){return this.SKt}},{key:"TKt",get:function(){return this.kKt}},{key:"lt",get:function(){return this.JW}}]),n}(WK);F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt();var XK=function(){function t(t,n){this.BKt=void 0,this.MKt=void 0,this.BKt=t,this.MKt=n}return Nt(t,[{key:"DKt",get:function(){return this.BKt}},{key:"NKt",get:function(){return this.MKt}}]),t}(),qK=function(){function t(t,n,i,r,e,s){this.OKt=void 0,this.UKt=void 0,this.HKt=void 0,this.qKt=void 0,this.QKt=void 0,this.XKt=void 0,this.zKt=void 0,this.AKt=void 0,this.OKt=t,this.UKt=n,this.HKt=i,this.qKt=r,this.QKt=!1,this.XKt=e,this.AKt=s}return t.prototype.KKt=function(){this.QKt=!0},Nt(t,[{key:"LKt",get:function(){return this.OKt}},{key:"FKt",get:function(){return this.UKt}},{key:"VKt",get:function(){return this.HKt}},{key:"WKt",get:function(){return this.qKt}},{key:"od",get:function(){return this.zKt},set:function(t){this.zKt=t}},{key:"GKt",get:function(){return this.XKt}},{key:"jKt",get:function(){return this.QKt}},{key:"yKt",get:function(){return this.AKt}}]),t}();F(),Et(),Bt();var GK=function(t){return t.YKt="all",t.JKt="any",t.lz="none",t}({});var jK=function(){function t(t,n){this.$Kt=void 0,this.iYt=void 0,this.$Kt=t,this.iYt=n}return Nt(t,[{key:"ZKt",get:function(){return this.$Kt}},{key:"tYt",get:function(){return this.iYt}}]),t}(),QK=function(){function t(t,n,i,r,e,s,u,o,h,c,a,f,v,d,l,w){this.sb=void 0,this.hb=void 0,this.hS=void 0,this.sYt=void 0,this.rYt=void 0,this.oYt=void 0,this.uYt=void 0,this.dYt=void 0,this.fYt=void 0,this._Yt=void 0,this.OKt=void 0,this.UKt=void 0,this.HKt=void 0,this.pYt=void 0,this.mYt=void 0,this.yYt=void 0,this.sb=t,this.hb=n,this.hS=i,this.sYt=r,this.rYt=e,this.oYt=s,this.uYt=u,this.dYt=o,this.fYt=h,this._Yt=c,this.OKt=a,this.UKt=f,this.HKt=v,this.pYt=d,this.mYt=l,this.yYt=w}return Nt(t,[{key:"o",get:function(){return this.hS}},{key:"Ti",get:function(){return this.sb}},{key:"Mi",get:function(){return this.hb}},{key:"eYt",get:function(){return this.sYt}},{key:"nYt",get:function(){return this.rYt}},{key:"hYt",get:function(){return this.oYt}},{key:"aYt",get:function(){return this.uYt}},{key:"cYt",get:function(){return this.dYt}},{key:"lYt",get:function(){return this.fYt}},{key:"vYt",get:function(){return this._Yt}},{key:"LKt",get:function(){return this.OKt}},{key:"FKt",get:function(){return this.UKt}},{key:"VKt",get:function(){return this.HKt}},{key:"gYt",get:function(){return this.pYt}},{key:"NKt",get:function(){return this.mYt}},{key:"wYt",get:function(){return this.yYt}}]),t}();F(),Et(),Bt();var YK=function(){function t(t,n){this.hS=void 0,this.rFt=void 0,this.hS=t,this.rFt=n}return Nt(t,[{key:"id",get:function(){return this.hS}},{key:"uri",get:function(){return this.rFt}}]),t}(),KK=function(){function t(t,n,i,r){this.bYt=void 0,this.TYt=void 0,this.EYt=void 0,this.xYt=void 0,this.bYt=t,this.TYt=n,this.EYt=i,this.xYt=r}return Nt(t,[{key:"AYt",get:function(){return this.bYt}},{key:"SYt",get:function(){return this.TYt}},{key:"kYt",get:function(){return this.EYt}},{key:"PYt",get:function(){return this.xYt}}]),t}(),JK=function(t){function n(n,i,r,e,s,u,o,h,c){var a;return(a=t.call(this,n,i)||this).kKt=void 0,a.RYt=void 0,a.DYt=void 0,a.NYt=void 0,a.LYt=void 0,a.wKt=void 0,a.JW=void 0,a.fKt=void 0,a.kKt=r,a.RYt=e,a.DYt=s,a.wKt=u,a.NYt=o,a.LYt=h,a.JW=c,a}Ct(n,t);var i=n.prototype;return i.lKt=function(){var t=this;return void 0===this.RYt?[]:(null!=this.fKt||(this.fKt=this.RYt.lKt().map(function(n){return t.OYt(n)})),this.fKt)},i.OYt=function(t){for(var n,i,r,e,s=Lt(this.mKt);!(e=s()).done;){var u=e.value;u.PKt&&(n=u.PKt),u.xKt&&(i=u.xKt),u.IKt&&(r=u.IKt)}var o=t.TKt.concat(this.TKt),h=t.PKt;if(n&&t.PKt){var c=new KK(t.PKt.FYt.AYt,t.PKt.FYt.SYt,t.PKt.FYt.kYt.concat(n.FYt.kYt),t.PKt.FYt.PYt.concat(n.FYt.PYt));(h=t.PKt).FYt=c,h.NKt=h.NKt.concat(n.NKt)}var a=t.RKt;if(i&&i.DKt){for(var f,v,d,l=[],w=Lt(i.DKt);!(d=w()).done;){var g=d.value;l.concat(g.WKt.kYt)}for(var _,m,y,p=[],k=Lt(null!=(_=null==(f=t.RKt)?void 0:f.DKt)?_:[]);!(m=k()).done;){var b,A,T,S=m.value,E=new KK(S.WKt.AYt,S.WKt.SYt,S.WKt.kYt.concat(l),(null!=(A=null==(b=t.PKt)?void 0:b.FYt.PYt)?A:[]).concat(null!=(T=null==n?void 0:n.FYt.PYt)?T:[]));p.push(new qK(S.LKt,S.FKt,S.VKt,E,S.GKt,S.yKt))}a=new XK(p,(null!=(y=null==(v=t.RKt)?void 0:v.NKt)?y:[]).concat(i.NKt))}var I=t.IKt;if(I){var R,C,D,P=I.ZKt;r&&r.ZKt&&(P=r.ZKt),I=new jK(P,(null!=(C=null==(R=t.IKt)?void 0:R.tYt)?C:[]).concat(null!=(D=null==r?void 0:r.tYt)?D:[]))}var N=t.lt;return this.lt&&(N=this.lt),{TKt:o,PKt:h,RKt:a,IKt:I,lt:N,CKt:t.CKt}},Nt(n,[{key:"TKt",get:function(){return this.kKt}},{key:"IYt",get:function(){return this.RYt}},{key:"CYt",get:function(){return this.DYt}},{key:"mKt",get:function(){return this.wKt}},{key:"BYt",get:function(){return this.NYt}},{key:"MYt",get:function(){return this.LYt}},{key:"lt",get:function(){return this.JW}}]),n}(WK);F(),Et(),Bt();var ZK=function(){function t(t,n,i,r,e,s,u,o){this.hS=void 0,this.VYt=void 0,this.WYt=void 0,this.dYt=void 0,this.qYt=void 0,this.zYt=void 0,this.GYt=void 0,this.XYt=void 0,this.hS=t,this.VYt=n,this.WYt=i,this.dYt=r,this.qYt=e,this.zYt=s,this.GYt=u,this.XYt=o}return Nt(t,[{key:"o",get:function(){return this.hS}},{key:"UYt",get:function(){return this.VYt}},{key:"HYt",get:function(){return this.WYt}},{key:"cYt",get:function(){return this.dYt}},{key:"PKt",get:function(){return this.qYt}},{key:"xKt",get:function(){return this.zYt}},{key:"IKt",get:function(){return this.GYt}},{key:"universalAdIds",get:function(){return this.XYt}}]),t}();F(),Et(),Bt();var $K=function(){function t(t,n,i,r,e,s,u,o,h){this.jYt=void 0,this.KYt=void 0,this.iJt=void 0,this.MKt=void 0,this.YYt=void 0,this.ZYt=void 0,this.QKt=void 0,this.XKt=void 0,this.zKt=void 0,this.AKt=void 0,this.sJt=void 0,this.rJt=void 0,this.jYt=t,this.KYt=n,this.MKt=i,this.YYt=r,this.ZYt=e,this.QKt=!1,this.XKt=s,this.AKt=u,this.sJt=o,this.rJt=h}return t.prototype.KKt=function(){this.QKt=!0},Nt(t,[{key:"ct",get:function(){return this.jYt}},{key:"QYt",get:function(){return this.KYt}},{key:"NKt",get:function(){return this.MKt},set:function(t){this.MKt=t}},{key:"FYt",get:function(){return this.YYt},set:function(t){this.YYt=t}},{key:"JYt",get:function(){return this.ZYt},set:function(t){this.ZYt=t}},{key:"$Yt",get:function(){return this.QKt}},{key:"od",get:function(){return this.zKt},set:function(t){this.zKt=t}},{key:"GKt",get:function(){return this.XKt}},{key:"yKt",get:function(){return this.AKt}},{key:"tJt",get:function(){return this.iJt},set:function(t){this.iJt=t}},{key:"eJt",get:function(){return this.sJt}},{key:"nJt",get:function(){return this.rJt}}]),t}();function tJ(t,n){return eJ(t)&&t.getAttribute(n)||void 0}function nJ(t,n){return iJ(t,n,void 0,!1)}function iJ(t,n,i,r){return n===(t.localName?t.localName:t.nodeName)&&(r&&i?i===t.namespaceURI:!i||!t.namespaceURI||i===t.namespaceURI)}function rJ(t,n){for(var i=[],r=0;r0)throw new y('Invalid document for MIME type "'+n+'"');return i}function uJ(t){return sJ(t,"text/xml")}function oJ(t){return t.replace(/[<>&'"]/g,function(t){switch(t){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return""";default:return t}})}function hJ(t){return"data:application/xml,"+encodeURIComponent(t)}F(),Et(),F(),Et(),Bt();var cJ=function(t){return t.hJt="mute",t.oJt="unmute",t.jw="pause",t.aJt="resume",t.uJt="rewind",t.cJt="skip",t.dJt="playerExpand",t.lJt="playerCollapse",t.fJt="fullscreen",t.vJt="exitFullscreen",t._Jt="expand",t.COLLAPSE="collapse",t.MSt="start",t.gJt="firstQuartile",t.pJt="thirdQuartile",t.mJt="midpoint",t.wJt="complete",t.yJt="acceptInvitationLinear",t.AJt="acceptInvitation",t.bJt="timeSpentViewing",t.SJt="otherAdInteraction",t.Qw="progress",t.TJt="creativeView",t.kJt="adExpand",t.EJt="adCollapse",t.PJt="minimize",t.xJt="close",t.IJt="closeLinear",t.RJt="overlayViewDuration",t.CJt="breakStart",t.DJt="breakEnd",t.ma="error",t}({});function aJ(t){switch(t){case"breakStart":case"breakEnd":case"error":return!0;default:return!1}}var fJ=["mute","unmute","pause","resume","rewind","skip","closeLinear","close","playerExpand","playerCollapse","fullscreen","exitFullscreen","expand","collapse","creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","acceptInvitationLinear","acceptInvitation","timeSpentViewing","otherAdInteraction","progress"];function vJ(t){return void 0!==t&&-1!==fJ.indexOf(t)}var dJ=["start","firstQuartile","midpoint","thirdQuartile","complete","mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","expand","collapse","fullscreen","exitFullscreen","creativeView","acceptInvitation","adExpand","adCollapse","minimize","close","overlayViewDuration","otherAdInteraction","progress"];function lJ(t){return void 0!==t&&-1!==dJ.indexOf(t)}var wJ=["mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","creativeView"];function gJ(t){return void 0!==t&&-1!==wJ.indexOf(t)}function _J(t,n){if(void 0!==t&&""!==t&&void 0!==n){var i=t.match(/^(\d+):(\d+):(\d+)$/);return i?T(i[1]||"0")+60*T(i[2]||"0")+T(i[3]||"0"):(i=t.match(/^(100|[1-9]\d|\d)%$/))?T(i[1]||"0")*n/100:void 0}}var mJ=function(){function t(t,n,i){this.BJt=void 0,this.NJt=void 0,this.MJt=void 0,this.BJt=t,this.NJt=n,this.MJt=i}return Nt(t,[{key:"eX",get:function(){return this.BJt}},{key:"ac",get:function(){return this.NJt}},{key:"eventURL",get:function(){return this.MJt}}]),t}();F(),Et(),Bt(),Dt();var yJ=function(){function t(t){this.OJt=void 0,this.OJt=t}return Nt(t,[{key:"LJt",get:function(){return this.OJt}}]),t}(),pJ=function(t){function n(n,i,r,e){var s;return(s=t.call(this,n)||this).UJt=void 0,s.yYt=void 0,s.bYt=void 0,s.UJt=i,s.bYt=r,s.yYt=e,s}return Ct(n,t),Nt(n,[{key:"AYt",get:function(){return this.bYt}},{key:"wYt",get:function(){return this.yYt}},{key:"FJt",get:function(){return this.UJt}}]),n}(yJ),kJ=function(t){function n(n){return t.call(this,n)||this}return Ct(n,t),n}(yJ),bJ=function(t){function n(n){return t.call(this,n)||this}return Ct(n,t),n}(yJ);F(),Et(),Bt();var AJ={VJt:{Ky:100,Py:"XML parsing error."},HJt:{Ky:303,Py:"Empty or invalid VAST error."},WJt:{Ky:400,Py:"General linear error"},qJt:{Ky:403,Py:"Unsupported MIME-type or missing mediafiles error"},zJt:{Ky:500,Py:"General nonlinear error"},xG:{Ky:900,Py:"Network error"}},TJ=function(){function t(t){this.XJt=void 0,this.XJt=t}return t.prototype.jJt=function(t){if(this.GJt){var n=this.GJt.replace(/\[ERRORCODE]/,""+t.Ky);xK(n)}},Nt(t,[{key:"GJt",get:function(){return this.XJt}}]),t}();F(),Et(),Bt(),Dt();var SJ=function(t){function n(n,i,r,e){var s;return(s=t.call(this,r||i&&RJ[i]||n,e)||this).KJt=void 0,s.JJt=void 0,s.O2=void 0,s.KJt=n,s.JJt=i,s.O2=r,s}return Ct(n,t),Nt(n,[{key:"QJt",get:function(){return this.KJt}},{key:"YJt",get:function(){var t;return null!=(t=this.JJt)?t:900}}]),n}(ar),EJ=function(t){return t.ADBLOCK="adblock",t.NETWORK="network",t.PARSING="parsing",t.PLAYBACK="playback",t.GENERAL="general",t}({}),IJ=function(t){return t[t.VAST_MALFORMED_RESPONSE=100]="VAST_MALFORMED_RESPONSE",t[t.VAST_SCHEMA_VALIDATION_ERROR=101]="VAST_SCHEMA_VALIDATION_ERROR",t[t.VAST_UNSUPPORTED_VERSION=102]="VAST_UNSUPPORTED_VERSION",t[t.VAST_TRAFFICKING_ERROR=200]="VAST_TRAFFICKING_ERROR",t[t.VAST_UNEXPECTED_LINEARITY=201]="VAST_UNEXPECTED_LINEARITY",t[t.VAST_UNEXPECTED_DURATION_ERROR=202]="VAST_UNEXPECTED_DURATION_ERROR",t[t.UNEXPECTED_SIZE=203]="UNEXPECTED_SIZE",t[t.VAST_WRAPPER_ERROR=300]="VAST_WRAPPER_ERROR",t[t.VAST_LOAD_TIMEOUT=301]="VAST_LOAD_TIMEOUT",t[t.VAST_TOO_MANY_REDIRECTS=302]="VAST_TOO_MANY_REDIRECTS",t[t.VAST_NO_ADS_AFTER_WRAPPER=303]="VAST_NO_ADS_AFTER_WRAPPER",t[t.GENERAL_LINEAR_ERROR=400]="GENERAL_LINEAR_ERROR",t[t.FILE_NOT_FOUND=401]="FILE_NOT_FOUND",t[t.VAST_MEDIA_LOAD_TIMEOUT=402]="VAST_MEDIA_LOAD_TIMEOUT",t[t.VAST_LINEAR_ASSET_MISMATCH=403]="VAST_LINEAR_ASSET_MISMATCH",t[t.VAST_PROBLEM_DISPLAYING_MEDIA_FILE=405]="VAST_PROBLEM_DISPLAYING_MEDIA_FILE",t[t.MEZZANINE_FILE_REQUIRES=406]="MEZZANINE_FILE_REQUIRES",t[t.MEZZANINE_FILE_DOWNLOADED_FIRST_TIME=407]="MEZZANINE_FILE_DOWNLOADED_FIRST_TIME",t[t.AD_IN_VAST_REJECTED=408]="AD_IN_VAST_REJECTED",t[t.INTERACTIVE_CREATIVE_NOT_EXECUTED=409]="INTERACTIVE_CREATIVE_NOT_EXECUTED",t[t.VERIFICATION_CODE_NOT_EXECUTED=410]="VERIFICATION_CODE_NOT_EXECUTED",t[t.GENERAL_NON_LINEAR_ERROR=500]="GENERAL_NON_LINEAR_ERROR",t[t.NONLINEAR_DIMENSIONS_ERROR=501]="NONLINEAR_DIMENSIONS_ERROR",t[t.OVERLAY_AD_LOADING_FAILED=502]="OVERLAY_AD_LOADING_FAILED",t[t.VAST_NONLINEAR_ASSET_MISMATCH=503]="VAST_NONLINEAR_ASSET_MISMATCH",t[t.GENERAL_COMPANION_AD_ERROR=600]="GENERAL_COMPANION_AD_ERROR",t[t.INVALID_DIMENSIONS_COMPANION_AD=601]="INVALID_DIMENSIONS_COMPANION_AD",t[t.COMPANION_REQUIRED_ERROR=602]="COMPANION_REQUIRED_ERROR",t[t.COMPANION_AD_LOADING_FAILED=603]="COMPANION_AD_LOADING_FAILED",t[t.UNABLE_TO_FIND_SUPPORTED_COMPANION=604]="UNABLE_TO_FIND_SUPPORTED_COMPANION",t[t.UNKNOWN_ERROR=900]="UNKNOWN_ERROR",t[t.GENERAL_VPAID_ERROR=901]="GENERAL_VPAID_ERROR",t[t.MALFORMED_URI=1005]="MALFORMED_URI",t[t.VAST_ASSET_NOT_FOUND=1007]="VAST_ASSET_NOT_FOUND",t[t.VAST_EMPTY_RESPONSE=1009]="VAST_EMPTY_RESPONSE",t[t.UNKNOWN_AD_RESPONSE=1010]="UNKNOWN_AD_RESPONSE",t[t.UNSUPPORTED_LOCALE=1011]="UNSUPPORTED_LOCALE",t[t.INVALID_ARGUMENTS=1101]="INVALID_ARGUMENTS",t[t.INVALID_ADX_EXTENSION=1105]="INVALID_ADX_EXTENSION",t[t.AUTOPLAY_DISALLOWED=1205]="AUTOPLAY_DISALLOWED",t}({}),RJ={100:"XML parsing error.",101:"VAST schema validation error.",102:"VAST version of response not supported.",200:"Trafficking error. The video player received an ad type that it was not expecting and/or cannot display.",201:"Video player expecting different linearity.",202:"Video player expecting different duration.",203:"Video player expecting different size.",300:"General wrapper error.",301:"Timeout of VAST URI provided in wrapper element, or of VAST URI provided in a subsequent wrapper element. This includes request errors such as invalid URI, unreachable or request timeout for URI, and security or other exceptions related to requesting a VAST URI.",302:"Wrapper limit reached, as defined by the video player. Too many wrapper responses have been received with no InLine response. This can be caused by a circular loop of daisy chaining (one network bouncing to another and another).",303:"No ads VAST response after one or more wrappers. This also includes the number of empty VAST responses from fallback.",400:"General linear error. The video player is unable to display the linear ad.",401:"File not found. Unable to find Linear/MediaFile from URI.",402:"Unable to download or timeout of MediaFile URI.",403:"Could not find a media file that is supported by this video player, based on the attributes of the MediaFile element.",405:"Problem displaying a media file.",406:"A mezzanine file was required, but not provided.",407:"The mezzanine file was downloaded for the first time, so the ad did not serve. This can occur when an ad insertion is missed because the creative is being transcoded. It continues to occur until the creative is available for insertion.",408:"The ad returned in the VAST response was rejected.",409:"The interactive creative defined in the InteractiveCreativeFile node was not executed.",410:"The code referenced in the Verification node was not executed.",500:"General NonLinearAds error.",501:"Unable to display non-linear ad because creative dimensions do not align with creative display area (in other words, the creative dimension was too large). This can occur if you use CSS styles to set width and height of the video ,content element. You should instead use the width and height HTML attributes.",502:"Unable to fetch NonLinearAds/NonLinear resource.",503:"Could not find NonLinearResource with supported type. This can occur when a creative size is larger than the player size.",600:"General CompanionAds error.",601:"Unable to display companion because creative dimensions do not fit within the companion display area (in other words, space was not available).",602:"Unable to display required companion.",603:"Unable to fetch CompanionAds/Companion resource.",604:"Could not find Companion resource with supported type.",900:"VAST 2 error. Even if you request VAST 3 or your DFP network default is VAST 3, this can occur if you have a VAST redirect that returns a VAST 2 response.",901:"General VPAID error",1005:"URI malformed."};function CJ(t){if(!t)return!1;switch(t.toLocaleLowerCase()){case hA.dR:case hA.lR:case hA.cR:return!0;default:return!1}}function DJ(t){var n=Rr();return!!(CJ(t)||t&&n&&(null==n?void 0:n.canPlayType)&&n.canPlayType(t))||(NJ("Invalid or unsupported MediaFile Content delivery type, skipping mediafile"),!1)}function PJ(t,n){for(var i,r=Lt(n);!(i=r()).done;){var e=i.value;new TJ(e).jJt(t)}}function NJ(t){0}F(),Et(),Ut(),F(),Et(),Bt();var BJ=function(){function t(t,n){this.$Jt=void 0,this.iZt=void 0,this.$Jt=t,this.iZt=n}return Nt(t,[{key:"ZJt",get:function(){return this.$Jt}},{key:"tZt",get:function(){return this.iZt}}]),t}(),xJ=function(){function t(){}var n=t.prototype;return n.eZt=function(n,i){return Vt(function(){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return UK(n.sources,n.timeOffset)?[4,t.sZt(n.sources.src,i)]:[3,7];case 1:if(r=o.sent(),!(e=r&&r.documentElement))throw new SJ(EJ.NETWORK,IJ.VAST_SCHEMA_VALIDATION_ERROR,"Ad source is not a valid XML document.");return nJ(e,"VMAP")?[4,this.nZt(e,n,i)]:[3,3];case 2:return[2,o.sent()];case 3:return nJ(e,"VAST")?[4,this.rZt(e,i,!1)]:[3,5];case 4:return(s=o.sent())?(u=new FJ("",!0,!0,s),[2,[new LJ("start",u,OJ.hZt,"",[],!1,!0,n)]]):[2,[]];case 5:throw new SJ(EJ.GENERAL,IJ.VAST_MALFORMED_RESPONSE,"Only VMAP and VAST files are allowed as ad source.");case 6:return[3,8];case 7:if(FK(n.sources,n.timeOffset))return[2,[new UJ(String(n.timeOffset),n,i)]];throw new SJ(EJ.GENERAL,IJ.VAST_MALFORMED_RESPONSE,"Something went wrong parsing the ad source; only VMAP and VAST files are allowed as ad source.");case 8:return[2]}})}).call(this)},n.oZt=function(){return Vt(function(n,i,r,e){var s,u,o;return zt(this,function(h){switch(h.label){case 0:void 0===e&&(e=[]),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,t.sZt(n,i)];case 2:return s=h.sent(),[3,4];case 3:throw u=h.sent(),PJ(V(u,SJ)&&u.YJt===IJ.VAST_MALFORMED_RESPONSE?AJ.HJt:AJ.xG,e),u;case 4:return(o=s&&s.documentElement)&&nJ(o,"VAST")?[4,this.rZt(o,i,r,e)]:[3,6];case 5:return[2,h.sent()];case 6:o&&nJ(o,"VMAP")&&We("Received VMAP ad when expecting VAST. Please set the type of your ad source in the configuration, or make sure to not set a timeOffset for VMAP ad sources. VMAP ads have their own offsets included."),h.label=7;case 7:return[2,void 0]}})}).apply(this,arguments)},n.aZt=function(t,n,i,r){return Vt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(!(null==(e=t.sources)?void 0:e.src))throw new SJ(EJ.GENERAL,IJ.MALFORMED_URI,"Property src on adSource is missing.");return[4,this.oZt(t.sources.src,r,!1)];case 1:return s=h.sent(),u=new FJ("",!0,!0,s),(o=new LJ(n,u,OJ.hZt,"",[],!1,!0,t)).uZt=i,[2,o]}})}).call(this)},n.rZt=function(){return Vt(function(t,n,i,r){var e,s,u,o,h,c,a,f,v,d,l,w;return zt(this,function(g){switch(g.label){case 0:if(void 0===r&&(r=[]),e=[],s=[],u=[],!t||!nJ(t,"VAST")){if(PJ(AJ.HJt,r),i)throw new SJ(EJ.PARSING,IJ.VAST_NO_ADS_AFTER_WRAPPER,"No VAST element found after wrapper.");throw new SJ(EJ.PARSING,IJ.VAST_EMPTY_RESPONSE,"The VAST element was empty.")}if(0===rJ(t,"Ad").length)return[3,7];o=Lt(rJ(t,"Ad")),g.label=1;case 1:if((h=o()).done)return[3,6];c=h.value,g.label=2;case 2:return g.trys.push([2,4,,5]),[4,this.cZt(c,n,r)];case 3:return 0===(a=g.sent()).VN?e.push(a):s.push(a),[3,5];case 4:return f=g.sent(),u.push(f),[3,5];case 5:return[3,1];case 6:if(0===e.length&&0===s.length&&u.length>0)throw u[0];if(1===e.length&&0===s.length)return[2,e[0]];if(0===e.length&&0!==s.length)return[2,new HK(s)];if(e.length>0||s.length>0)return[2,new HK(s.concat(e))];g.label=7;case 7:if(0!==rJ(t,"Error").length)for(v=Lt(rJ(t,"Error"));!(d=v()).done;)l=d.value,NJ(AJ.HJt.Py),(w=l.textContent)&&r.push(w.trim());if(PJ(AJ.HJt,r),i)throw new SJ(EJ.PARSING,IJ.VAST_NO_ADS_AFTER_WRAPPER,"No VAST element found after wrapper.");throw new SJ(EJ.PARSING,IJ.VAST_EMPTY_RESPONSE,"The VAST element was empty.")}})}).apply(this,arguments)},n.nZt=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:if(r=[],0===(e=rJ(t,"AdBreak")).length)throw new SJ(EJ.PARSING,IJ.VAST_EMPTY_RESPONSE,"The VMAP element was empty.");s=Lt(e),a.label=1;case 1:if((u=s()).done)return[3,6];o=u.value,a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.dZt(o,n,i)];case 3:return(h=a.sent())&&r.push(h),[3,5];case 4:return c=a.sent(),Vn.hm(c),[3,5];case 5:return[3,1];case 6:return[2,r]}})}).call(this)},n.cZt=function(n,i,r){return Vt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return e=tJ(n,"id")||"",(s=cF(tJ(n,"sequence")))||(s=0),u=rJ(n,"InLine"),0===(o=rJ(n,"Wrapper")).length?[3,2]:[4,this.lZt(o[0],e,s,i,r)];case 1:return[2,h.sent()];case 2:if(0!==u.length)return[2,t.fZt(u[0],e,s,r)];h.label=3;case 3:throw new SJ(EJ.PARSING,IJ.VAST_SCHEMA_VALIDATION_ERROR,"An Ad tag without a Wrapper or inline element cannot be parsed")}})}).call(this)},n.lZt=function(n,i,r,e,s){return Vt(function(){var u,o,h,c,a,f,v,d,l,w,g,_,m,y,p,k,b;return zt(this,function(A){switch(A.label){case 0:for(u=rJ(n,"Error")[0],o="",u&&u.textContent&&(o=u.textContent,s.push(o)),h=rJ(n,"AdSystem")[0],c="",h&&(c=h.textContent||c),a=[],f=Lt(rJ(n,"Impression"));!(v=f()).done;)(d=v.value).textContent&&a.push(d.textContent);return l=rJ(n,"VASTAdTagURI")[0],w="",l&&l.textContent&&(w=l.textContent),[4,this.oZt(w,e,!0,s)];case 1:return g=A.sent(),_=t.vZt(rJ(n,"Extensions")[0]),m=rJ(n,"Creatives")[0],y=[],m&&(y=t.gZt(m,c,_,s)),(p=fF(tJ(n,"followAdditionalWrappers")))||(p=!0),(k=fF(tJ(n,"allowMultipleAds")))||(k=!0),(b=fF(tJ(n,"fallbackOnNoAd")))||(b=!1),[2,new JK(i,r,a,g,p,y,k,b,new TJ(o))]}})}).call(this)},n.dZt=function(n,i,r){return Vt(function(){var e,s,u,o,h,c,a,f,v,d,l,w,g,_,m,y,p;return zt(this,function(k){switch(k.label){case 0:if(e=tJ(n,"timeOffset")||"0",s=tJ(n,"breakType")||OJ.pk,u=tJ(n,"breakId"),o=fF(tJ(n,"repeatAfter")),h=void 0!==MJ.kZt(e),void 0===u&&(u=""),void 0===o&&(o=!1),!h)throw new SJ(EJ.PARSING,IJ.VAST_SCHEMA_VALIDATION_ERROR,"Invalid TimeOffset type");if(c=rJ(n,"AdSource")[0],a=rJ(n,"TrackingEvents")[0],f=[],a&&(f=t.yZt(a,aJ,"vmap")),(v=tJ(c,"id"))||(v=""),void 0===(d=fF(tJ(c,"allowMultipleAds")))&&(d=!0),(l=fF(tJ(c,"followRedirects")))||(l=!0),w=rJ(c,"AdTagURI")[0],g="",_=rJ(c,"VASTAdData")[0],!w||!w.textContent)return[3,1];try{return g=w.textContent,(m=Ow(i)).sources.src=g,[2,new UJ(e,m,r)]}catch(t){return[2,void 0]}return[3,6];case 1:return _?_.firstElementChild&&iJ(_.firstElementChild,"VAST")?[4,this.rZt(_.firstElementChild,r,!1)]:[3,3]:[3,5];case 2:return(y=k.sent())?(p=new FJ(v,d,l,y),[2,new LJ(e,p,s,u,f,o,!1,i)]):[2,void 0];case 3:throw new SJ(EJ.PARSING,IJ.VAST_SCHEMA_VALIDATION_ERROR,"vmap:VASTAdData does not have a VAST-structure as a child element");case 4:return[3,6];case 5:throw new SJ(EJ.PARSING,IJ.VAST_SCHEMA_VALIDATION_ERROR,"Invalid AdTagURI source or invalid VASTAdData in Adbreak Element");case 6:return[2]}})}).call(this)},t.requestSuccessOnly=function(t,n){return Vt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,n.lk(t)];case 1:return i=e.sent(),[3,3];case 2:throw r=e.sent(),new SJ(EJ.NETWORK,IJ.UNKNOWN_ERROR,"Something went wrong while requesting xml from server.",r);case 3:if(!dl(i))throw new SJ(EJ.NETWORK,IJ.UNKNOWN_ERROR,"Something went wrong while requesting xml from server.");return[2,i]}})})()},t.sZt=function(t,n){return Vt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:return i=new pl({Yu:t,dk:Md.NT,Uk:wl.GET}),[4,this.requestSuccessOnly(i,n)];case 1:r=e.sent(),e.label=2;case 2:return e.trys.push([2,4,,5]),[4,r.ck()];case 3:return[2,uJ.apply(void 0,[e.sent()])];case 4:throw e.sent(),new SJ(EJ.NETWORK,IJ.VAST_MALFORMED_RESPONSE,"The ad source could not be loaded.");case 5:return[2]}})}).call(this)},t.fZt=function(n,i,r,e){var s,u=rJ(n,"Error")[0];u&&u.textContent&&(s=u.textContent,e.push(s));var o,h=t.vZt(rJ(n,"Extensions")[0]),c=rJ(n,"AdSystem")[0],a="";c&&(a=c.textContent||a);var f=rJ(n,"AdTitle")[0];f&&(o=f.textContent||void 0);for(var v,d=[],l=Lt(rJ(n,"Impression"));!(v=l()).done;){var w=v.value;w.textContent&&d.push(w.textContent)}var g=t._Zt(rJ(n,"Creatives")[0],a,h,e);return new zK(i,r,a,o,d,g,new TJ(s))},t.gZt=function(n,i,r,e){for(var s,u=[],o=Lt(rJ(n,"Creative"));!(s=o()).done;){var h=s.value,c=tJ(h,"id");c||(c="");var a=cF(tJ(h,"sequence"));a||(a=0);var f=tJ(h,"adId");f||(f="");var v=rJ(h,"Linear")[0],d=void 0;v&&(d=t.pZt(v,"wrapper",c,i,r,e));var l=rJ(h,"NonLinearAds")[0],w=void 0;if(l)try{w=t.mZt(l,c,i)}catch(t){}var g=rJ(h,"CompanionAds")[0],_=void 0;g&&(_=t.wZt(g)),u.push(new ZK(c,f,a,"",d,w,_,[]))}return u},t._Zt=function(n,i,r,e){for(var s,u=[],o=Lt(rJ(n,"Creative"));!(s=o()).done;){var h=s.value,c=tJ(h,"id");c||(c="");var a=cF(tJ(h,"sequence"));a||(a=0);var f=tJ(h,"adId");f||(f="");var v=tJ(h,"apiFramework");v||(v="");var d=rJ(h,"Linear")[0],l=void 0;if(d)try{l=t.pZt(d,"inline",c,i,r,e)}catch(t){}if(0===(null==l?void 0:l.ct))throw new SJ(EJ.PARSING,IJ.VAST_UNEXPECTED_DURATION_ERROR,"The VAST response had a duration of 0 seconds, so skipping the ad(s).");var w=rJ(h,"NonLinearAds")[0],g=void 0;if(w)try{g=t.mZt(w,c,i)}catch(t){}var _=rJ(h,"CompanionAds")[0],m=void 0;_&&(m=t.wZt(_));var y=rJ(h,"UniversalAdId"),p=t.parseUniversalAdIds(y);u.push(new ZK(c,f,a,v,l,g,m,p))}return u},t.vZt=function(t){var n=[];if(!t)return n;for(var i,r=Lt(rJ(t,"Extension"));!(i=r()).done;){var e,s=i.value,u=null!=(e=tJ(s,"type"))?e:"",o=s.outerHTML;n.push({type:u,xml:o})}return n},t.pZt=function(n,i,r,e,s,u){var o=rJ(n,"Duration")[0],h=0;if(o)h=MK(o.textContent)||0;else if(!o&&"inline"===i)throw new SJ(EJ.PARSING,IJ.VAST_SCHEMA_VALIDATION_ERROR,"Missing duration element in inLine linear");var c=tJ(n,"skipoffset"),a=-1;if(c){var f=MK(c);if(void 0===f&&c.indexOf("%")>-1){var v=b.abs(Number(c.replace(/(?![0-9])./g,"")))/100;S(v)||(f=h*v)}void 0!==f&&(a=f)}var d=rJ(n,"MediaFiles")[0],l=[],w=[];if(d&&(l=function(t,n){for(var i,r=[],e=Lt(rJ(t,"MediaFile"));!(i=e()).done;){var s=i.value,u=tJ(s,"delivery"),o=tJ(s,"type");if(o){if(n(o)){var h=cF(tJ(s,"width")),c=cF(tJ(s,"height"));h||(NJ(),h=0),c||(NJ(),c=0);var a={delivery:u,type:o,width:h,height:c,contentURL:""+s.textContent};r.push(a)}}else NJ()}return r}(d,DJ),w=function(t){var n=rJ(t,"ClosedCaptionFiles");if(0===n.length)return[];for(var i,r=[],e=Lt(rJ(n[0],"ClosedCaptionFile"));!(i=e()).done;){var s=i.value,u=tJ(s,"type");u||NJ();var o=tJ(s,"language");o||NJ();var h={type:null!=u?u:"",language:null!=o?o:"",contentURL:(""+s.textContent).trim()};r.push(h)}return r}(d)),"inline"===i&&(!d||0===l.length))throw PJ(AJ.qJt,u),new SJ(EJ.PARSING,IJ.VAST_LINEAR_ASSET_MISMATCH,"Missing MediaFiles in linear element");var g=rJ(n,"TrackingEvents")[0],_=[];g&&(_=t.yZt(g,vJ,"linear"));var m=rJ(n,"VideoClicks")[0],y=t.AZt(m);return new $K(h,l,_,y,a,r,e,w,s)},t.AZt=function(n){if(!n)return new KK("","",[],[]);var i,r=rJ(n,"ClickThrough")[0],e="";r&&(i=r.textContent||void 0,e=tJ(r,"id")||"");var s=t.bZt(rJ(n,"ClickTracking")),u=t.bZt(rJ(n,"CustomClick"));return new KK(i,e,s,u)},t.bZt=function(t){for(var n,i=[],r=Lt(t);!(n=r()).done;){var e=n.value,s=e.textContent;if(s){var u=tJ(e,"id")||"";i.push(new YK(u,s))}}return i},t.yZt=function(t,n,i){for(var r,e=[],s=Lt(rJ(t,"Tracking"));!(r=s()).done;){var u=r.value,o=tJ(u,"event");if(n(o)){var h="";"linear"===i&&(h=tJ(t,"offset")||"0");var c=u.textContent;c&&e.push(new mJ(o,h,c))}else NJ()}return e},t.mZt=function(n,i,r){for(var e,s=[],u=Lt(rJ(n,"NonLinear"));!(e=u()).done;){var o=e.value,h=rJ(o,"NonLinearClickThrough")[0],c=void 0;h&&(c=h.textContent||void 0);var a=t.bZt(rJ(o,"NonLinearClickTracking")),f=rJ(o,"StaticResource")[0],v=void 0;if(f&&f.parentNode){var d=tJ(f,"creativeType"),l=f.textContent||"",w=rJ(f.parentNode,"NonLinearClickThrough")[0],g="";w&&(g=w.textContent||""),v=new pJ(l,d,g,"")}var _=t.SZt(o),m=t.parseHtmlResource(o);if(v||_||m){var y=new KK(c,"",a,[]);s.push(new qK(v,_,m,y,i,r))}else NJ()}if(0===s.length)throw new SJ(EJ.PARSING,IJ.VAST_SCHEMA_VALIDATION_ERROR,"nonLinearAds element found with no nonLinear elements");var p=rJ(n,"TrackingEvents")[0],k=[];return p&&(k=t.yZt(p,lJ,"nonlinear")),new XK(s,k)},t.parseUniversalAdIds=function(t){for(var n,i=[],r=Lt(t);!(n=r()).done;){var e,s,u,o=n.value,h=null!=(e=tJ(o,"idRegistry"))?e:"",c=null!=(u=null!=(s=tJ(o,"idValue"))?s:o.textContent)?u:"";i.push(new BJ(h,c))}return i},t.wZt=function(n){var i=tJ(n,"requiredType");(function(t){switch(t){case"all":case"any":case"none":return!0;default:return!1}})(i)||(i=GK.lz);for(var r,e=[],s=Lt(rJ(n,"Companion"));!(r=s()).done;){var u=r.value,o=cF(tJ(u,"width")),h=cF(tJ(u,"height")),c=tJ(u,"id"),a=cF(tJ(u,"assetWidth")),f=cF(tJ(u,"assetHeight")),v=cF(tJ(u,"expandedWidth")),d=cF(tJ(u,"rxpandedHeight")),l=tJ(u,"apiFramework"),w=tJ(u,"adSlotId"),g=cF(tJ(u,"pxratio")),_=rJ(u,"AltText")[0],m=_?_.textContent:"";o||(NJ(),o=0),h||(NJ(),h=0),c||(c=""),a||(a=0),f||(f=0),v||(v=0),d||(d=0),l||(l=""),w||(w=""),g||(g=1),m||(m="");var y=t.TZt(u),p=t.SZt(u),k=t.parseHtmlResource(u),b=rJ(u,"TrackingEvents")[0],A=[];b&&(A=t.yZt(b,gJ,"companion"));var T=rJ(u,"CompanionClickThrough")[0],S=void 0;T&&(S=T.textContent||void 0);var E=t.bZt(rJ(u,"CompanionClickTracking"));(y||p||k)&&e.push(new QK(o,h,c,a,f,v,d,l,w,g,y,p,k,new KK(S,"",E,[]),A,m))}return new jK(i,e)},t.TZt=function(t){var n,i=rJ(t,"StaticResource")[0];if(i&&i.parentNode){var r=tJ(i,"creativeType");r||(r="");var e,s=i.textContent,u=rJ(i.parentNode,"AltText")[0],o=rJ(i.parentNode,"CompanionClickThrough")[0],h="";u&&(h=u.textContent||""),o&&(e=o.textContent||void 0),s&&(n=new pJ(s,r,e,h))}return n},t.SZt=function(t){var n,i=rJ(t,"IFrameResource")[0];if(i){var r=i.textContent||"";n=new kJ(r)}return n},t.parseHtmlResource=function(t){var n,i=rJ(t,"HTMLResource")[0];if(i){var r=i.textContent||"";n=new bJ(r)}return n},t}(),OJ=function(t){return t.pk="",t.hZt="linear",t.EZt="nonlinear",t.PZt="display",t}({}),MJ=function(){function t(){}return t.xZt=function(t){switch(t){case"linear":case"nonlinear":case"display":return!0;default:return!1}},t.IZt=function(t){},t.RZt=function(t){if(void 0!==t)return"start"===t?0:"end"===t?-1:void 0},t.CZt=function(t){var n=t.split(":"),i=0;return i+=3600*Number(n[0]),i+=60*Number(n[1]),i+=Number(n[2])},t.DZt=function(t){if(t<=0)return"00:00:00.000";var n=b.floor(t),i=t-n;return this.BZt(n/3600,2)+":"+this.BZt(n/60%60,2)+":"+this.BZt(n%60,2)+"."+this.BZt(1e3*i,3)},t.BZt=function(t,n){return("00"+b.floor(t)).slice(-n)},t.NZt=function(t,n){var i=this.kZt(t);if(0===i)switch(t){case"start":return 0;case"end":return-1}else{if(2===i)return LK(t)*n;if(1===i)return MK(t);if(3===i)return this.RZt(t);if(4===i){var r=Number(t);if(!S(r)&&r>=-1)return r}}},t.kZt=function(t){return"start"===t||"end"===t?0:void 0!==MK(t.toString())?1:void 0!==LK(t.toString())?2:void 0!==this.IZt(t.toString())?3:S(Number(t))?void 0:4},t}(),LJ=function(){function t(t,n,i,r,e,s,u,o){this.FZt=void 0,this.mYt=void 0,this.UZt=void 0,this.ZYt=-1,this.XZt=void 0,this.HZt=void 0,this.qZt=void 0,this.jZt=void 0,this.LZt=void 0,this.GZt=void 0,this.FZt=n,this.UZt=t,this.XZt=i,this.HZt=r,this.qZt=s,this.mYt=e,this.jZt=u,this.LZt=o}return t.prototype.Un=function(){return ut.resolve()},Nt(t,[{key:"MZt",get:function(){return this.LZt.integration}},{key:"OZt",get:function(){return this.FZt}},{key:"_Ot",get:function(){return this.UZt}},{key:"JYt",get:function(){return this.ZYt},set:function(t){this.ZYt=t}},{key:"NKt",get:function(){return this.mYt}},{key:"VZt",get:function(){return this.HZt}},{key:"WZt",get:function(){return this.qZt}},{key:"Ont",get:function(){return this.LZt}},{key:"zZt",get:function(){return this.uZt.dd}},{key:"W",get:function(){return!0}},{key:"uZt",get:function(){return this.GZt},set:function(t){this.GZt=t}}]),t}(),UJ=function(){function t(t,n,i){this.zKt=void 0,this.QZt=void 0,this.uE=!1,this.nV=void 0,this.nV=i,this.zKt=new LJ(t,void 0,"","",[],!1,!1,n)}var n=t.prototype;return n.Un=function(){var t;return null!=(t=this.QZt)?t:this.QZt=this.lE()},n.lE=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:return t=new xJ,n=this,[4,t.aZt(this.Ont,this._Ot,this.uZt,this.nV)];case 1:return n.zKt=i.sent(),this.uE=!0,[2]}})}).call(this)},Nt(t,[{key:"MZt",get:function(){return this.zKt.MZt}},{key:"OZt",get:function(){return this.zKt.OZt}},{key:"_Ot",get:function(){return this.zKt._Ot}},{key:"JYt",get:function(){return this.zKt.JYt},set:function(t){this.zKt.JYt=t}},{key:"NKt",get:function(){return this.zKt.NKt}},{key:"VZt",get:function(){return this.zKt.VZt}},{key:"WZt",get:function(){return this.zKt.WZt}},{key:"Ont",get:function(){return this.zKt.Ont}},{key:"zZt",get:function(){return this.zKt.zZt}},{key:"W",get:function(){return this.uE}},{key:"uZt",get:function(){return this.zKt.uZt},set:function(t){this.zKt.uZt=t}}]),t}(),FJ=function(){function t(t,n,i,r){this.hS=void 0,this.KZt=void 0,this.JZt=void 0,this.ZZt=void 0,this.hS=t,this.KZt=n,this.ZZt=r,this.JZt=i}return Nt(t,[{key:"o",get:function(){return this.hS}},{key:"BYt",get:function(){return this.KZt}},{key:"YZt",get:function(){return this.JZt}},{key:"dKt",get:function(){return this.ZZt}}]),t}();function VJ(t,n){var i;if(t.vastAdsRequest&&(i=function(t){if(t.adTagUrl)return t.adTagUrl;if(t.adsResponse)return hJ(t.adsResponse);return}(t.vastAdsRequest)),!i){var r=function(t){var n=t.contentUrl||t.contentId;if(!n)return;var i=t.contentType||"video/mp4",r=zA(i)||XA(i)?"streaming":"progressive",e=void 0!==t.duration?""+MJ.DZt(t.duration)+"":"",s=void 0!==t.whenSkippable&&t.whenSkippable>=0?' skipoffset="'+MJ.DZt(t.whenSkippable)+'"':"",u=''+oJ(n)+"",o=t.clickThroughUrl?""+oJ(t.clickThroughUrl)+"":"",h=""+e+""+u+""+o+"",c=t.title?""+oJ(t.title)+"":"";return''+c+""+h+""}(t);r&&(i=hJ(r))}var e=t.customData;if(i){var s={integration:null==e?void 0:e.integration,sources:{src:i,type:"vast"},timeOffset:n};return s.integration&&"csai"!==s.integration&&"theo"!==s.integration||(s.skipOffset=t.whenSkippable),s}}var HJ=function(t){return t.$Zt="error",t.t$t="sourceupdate",t}({}),WJ=function(t){function n(n){var i;return(i=t.call(this,"error")||this).lt=void 0,i.lt=n,i}return Ct(n,t),n}(rh),zJ=function(t){function n(n,i){var r;return(r=t.call(this,"sourceupdate")||this).bt=void 0,r.Mc=void 0,r.bt=n,r.Mc=i,r}return Ct(n,t),n}(rh),XJ=function(t){function n(n,i,r){var e;return(e=t.call(this,i)||this).YBt=void 0,e.s$t=void 0,e.i$t=void 0,e.m$t=0,e.l$t=function(t){e.So(new WJ(t))},e.d$t=function(t){var n,i=new kK(CK(t.code),null!=(n=t.description)?n:void 0);e.l$t(i)},e.YBt=n,e.s$t=i,e.i$t=r,e}Ct(n,t);var i=n.prototype;return i.e$t=function(t){this.s$t.e$t(t)},i.n$t=function(t){this.s$t.n$t(t)},i.r$t=function(t){this.s$t.r$t(t)},i.h$t=function(t){this.s$t.h$t(t)},i.o$t=function(t){this.i$t.addUpdateListener(t)},i.a$t=function(t){this.i$t.removeUpdateListener(t)},i.u$t=function(){var t=this,n=new Vc,i=new chrome.cast.media.GetStatusRequest;return this.i$t.getStatus(i,function(){n.Xy({bt:t.NP(),Mc:t.nu()})},function(t){return n.jy(t)}),n.Qy},i.NP=function(){var t;return null==(t=this.i$t.customData)?void 0:t.currentSource},i.nu=function(){var t,n;if(null==(t=this.YBt.c$t())?void 0:t.version){var i;n=null==(i=this.i$t.customData)?void 0:i.sourceDescription}else{var r,e=null==(r=DK(this.i$t))?void 0:r.customData;(function(t){return zn(t)&&t.theoplayer_version>=1&&Un(t.streamStart)&&Un(t.isLive)&&Un(t.sourceDescription)})(e)&&(n=e.sourceDescription),n||(n=function(t){return{sources:[{src:t.contentId,type:t.contentType}],ads:qJ(t)}}(this.i$t.media))}return n},i.zx=function(){var t=new chrome.cast.media.PauseRequest;this.i$t.pause(t,di,this.d$t)},i.Xx=function(){var t=new chrome.cast.media.StopRequest;this.i$t.stop(t,di,this.d$t)},i.Gx=function(){var t=new chrome.cast.media.PlayRequest;this.i$t.play(t,di,this.d$t)},i.My=function(t,n){var i=this,r=new chrome.cast.media.SeekRequest;return r.currentTime=t,r.resumeState=n?chrome.cast.media.ResumeState.PLAYBACK_PAUSE:chrome.cast.media.ResumeState.PLAYBACK_START,new ut(function(t,n){i.i$t.seek(r,t,function(t){var i;n(new kK(CK(t.code),null!=(i=t.description)?i:void 0))})})},i.vx=function(t){this.s$t._et(PK,function(t){return{type:NK.cKt,properties:{playbackRate:t}}}(t)).catch(this.l$t)},i.f$t=function(t){var n=new chrome.cast.media.EditTracksInfoRequest(t);this.i$t.editTracksInfo(n,di,this.d$t)},i.v$t=function(){return this.i$t.getEstimatedTime()},i._$t=function(){return this.i$t.getEstimatedBreakClipTime()},i.g$t=function(){return this.i$t.getEstimatedBreakTime()},i.p$t=function(){this.s$t._et("urn:x-cast:com.google.cast.media",{type:BK.SKIP_AD,requestId:this.m$t++,mediaSessionId:this.i$t.mediaSessionId}).catch(this.l$t)},i.kn=function(){this.Vo()},Nt(n,[{key:"KD",get:function(){return this.i$t}}]),n}(th);function qJ(t){return t.vmapAdsRequest&&t.vmapAdsRequest.adTagUrl?[{sources:{src:t.vmapAdsRequest.adTagUrl,type:"vmap"}}]:t.breaks&&t.breakClips?Ji(t.breaks,function(n){return function(t,n){var i=function(){var i=e.value,s=Ui(n,function(t){return t.id===i});if(s){var u=VJ(s,t.position);u&&r.push(u)}},r=[];if(t.isWatched)return r;for(var e,s=Lt(t.breakClipIds);!(e=s()).done;)i();return r}(n,t.breakClips)}):[]}F(),Et();var GJ=function(){function t(t){this.YBt=void 0,this.YBt=t}var n=t.prototype;return n.w$t=function(t,n){this.YBt.addMessageListener(t,n)},n.y$t=function(t,n){this.YBt.removeMessageListener(t,n)},n._et=function(t,n){var i=this;return new ut(function(r,e){i.YBt.sendMessage(t,n,r,function(t){var n;e(new kK(CK(t.code),null!=(n=t.description)?n:void 0))})})},n.kn=function(){},t}();function jJ(t){return"vmap"===t||"adrule"===t}function QJ(t){if(t)return qn(t)&&""!==t?{src:Xw(t),type:void 0}:function(t){return zn(t)&&Boolean(t.src)}(t)&&""!==t.src?{src:Xw(t.src),type:YJ(t.type)}:void 0}function YJ(t){if(qn(t)){var n=t.toLowerCase();switch(n){case"vast":case"vmap":case"adrule":return n;default:return void We("The ad source type provided in the configuration could not be recognized: '"+t+"'.")}}else t||We("For better performance it is highly recommended to add the type to the configuration of your ad sources.")}function KJ(t){if(void 0!==t&&""!==t&&("string"==typeof t||"number"==typeof t)){switch(t){case"start":case"00:00:00":case"00:00:00.000":case"0%":case"0":return 0;case"end":case"100%":return-1}if("string"==typeof t){if(function(t){return OK.test(t)}(t))return MJ.CZt(t);if(JJ(t))return t}return Number(t)>=0?Number(t):void 0}}function JJ(t){return new RegExp(/^\d{1,2}%$/).test(t)}function ZJ(t){for(var n,i=[],r=function(t,n){if(Hn(n))for(var e=0,s=n.length;e-1&&i.push(e)}var s=i.length?i:void 0;this.d0t(s)}},i.d0t=function(t){(function(t,n){return!t&&n||t&&!n||t&&n&&!Ki(t,n)})(this.jdt,t)&&(this.jdt=t&&this.dO.fO(t)?t:void 0,this.So(new JM(this.jdt,this)))},i.unload=function(){for(var t,n=Lt(this.dO.II);!(t=n()).done;){t.value.mn("update",this.iLt)}this.dO.hr()},Nt(n,[{key:"XI",get:function(){return this.Kdt}},{key:"YI",get:function(){return this.jdt},set:function(t){this.d0t(t),this.So(new AZ(this,t))}},{key:"KI",get:function(){return this.dO}},{key:"Th",get:function(){return this.pO},set:function(t){t!==this.pO&&(this.pO=t,this.So(new wg(this)))}},{key:"Rt",get:function(){return this.We},set:function(t){this.We!==t&&(this.We=t,this.l0t!==t&&this.So(new bZ(this.jI,t)),this.So(new dg(this)))}},{key:"f0t",get:function(){return this.l0t},set:function(t){var n=this.We!==t;this.We=t,this.l0t=t,n&&this.So(new dg(this))}},{key:"Ca",get:function(){return this.hu||(this.hu=Zw(this)),this.hu}},{key:"Xk",get:function(){return this.Rt?"enabled":"disabled"}}]),n}(th);F(),Et();var EZ=function(t){return t.v0t="legacy",t._0t="caf",t}({});F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt(),Dt(),H(),Ut(),F(),Et(),F(),Et();var IZ=function(){function t(t){this.qc=void 0,this.g0t=0,this.qc=t}var n=t.prototype;return n.Rc=function(){if(!(this.g0t>=this.qc.length)){var t=this.qc[this.g0t];return this.g0t+=1,t}},n.lt=function(){return this.Rc()},t}();function RZ(t){var n,i,r;return null!=(r=null==(i=t.OZt)||null==(n=i.dKt)?void 0:n.lKt())?r:[]}var CZ=function(){},DZ=function(){function t(){this.hu=void 0}return t.prototype.wnt=function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get ads(){return t.Jc.map(function(t){return t.wnt()})},get integration(){return t.MZt},get maxDuration(){return t.p0t},get maxRemainingDuration(){return t.m0t},get timeOffset(){return t._Ot},get customData(){return t.X$t}}}(this)},t}(),PZ=function(){function t(t,n){this.y0t=void 0,this.oa=void 0,this.y0t=t,this.oa=n}return Nt(t,[{key:"w0t",get:function(){return this.y0t}},{key:"t",get:function(){return this.oa}}]),t}(),NZ=function(t){function n(n,i){var r;return(r=t.call(this)||this).GZt=void 0,r.k0t=void 0,r.T0t=[],r.E0t=[],r.GZt=n,r.k0t=i,r}Ct(n,t);var i=n.prototype;return i.b0t=function(t,n,i,r){var e=Ui(this.T0t,function(n){return n.PKt===t});if(void 0!==e)return e;var s=new MZ(t,n,this,this.k0t,i,r);return this.T0t.push(s),s},i.S0t=function(t,n,i,r,e){var s=Ui(this.E0t,function(n){return n.RKt===t});if(void 0!==s)return s;var u=new OZ(t,n,i,this,this.k0t,r,e);return this.E0t.push(u),u},Nt(n,[{key:"uZt",get:function(){return this.GZt}},{key:"Jc",get:function(){for(var t,n=[],i=Lt(this.GZt.A0t);!(t=i()).done;)for(var r,e=t.value,s=Lt(RZ(e));!(r=s()).done;){var u,o,h=r.value,c=null!=(o=null==(u=h.IKt)?void 0:u.tYt)?o:[];if(h.PKt&&n.push(this.b0t(h.PKt,c,h.CKt,e.Ont)),h.RKt)for(var a,f=Lt(h.RKt.DKt);!(a=f()).done;){var v=a.value;n.push(this.S0t(v,c,h.RKt,h.CKt,e.Ont))}}return n}},{key:"MZt",get:function(){return mS.CSAI}},{key:"_Ot",get:function(){var t=this.GZt.dd;return t>=0?t:this.k0t.t.Nd()}},{key:"m0t",get:function(){for(var t,n=0,i=Lt(this.GZt.A0t);!(t=i()).done;)for(var r,e=Lt(RZ(t.value));!(r=e()).done;){var s=r.value;s.PKt&&!s.PKt.$Yt&&(n+=s.PKt.ct)}return this.k0t&&this.k0t.w0t&&(n+=this.k0t.w0t.ct-this.k0t.w0t.MP),n}},{key:"p0t",get:function(){for(var t,n=0,i=Lt(this.GZt.A0t);!(t=i()).done;)for(var r,e=Lt(RZ(t.value));!(r=e()).done;){var s=r.value;s.PKt&&(n+=s.PKt.ct)}return n}},{key:"X$t",get:function(){}}]),n}(DZ),BZ={height:0,width:0,clickThrough:"",contentHTML:"",resourceURI:"",altText:""},xZ=function(t){function n(n,i,r,e,s,u){var o;return(o=t.call(this)||this).M0t=void 0,o.iYt=void 0,o.zKt=void 0,o.k0t=void 0,o.XYt=void 0,o.LZt=void 0,o.x0t=!1,o.M0t=n,o.iYt=i,o.zKt=r,o.k0t=e,o.XYt=s,o.LZt=u,o}Ct(n,t);var i=n.prototype;return i.P0t=function(){return this.x0t},i.I0t=function(){this.x0t=!0},i.R0t=function(t){return Yu({},BZ,{resourceURI:t.LJt||""})},i.C0t=function(t){return Yu({},BZ,{contentHTML:t.LJt.trim(),type:"HTMLResource"})},i.D0t=function(t){var n,i;return Yu({},BZ,{clickThrough:(null==(n=t.AYt)?void 0:n.trim())||"",resourceURI:(null==(i=t.LJt)?void 0:i.trim())||"",altText:t.wYt||"",type:"StaticResource"})},i.B0t=function(t,n,i){if(t&&n){var r="";return""+r+""}},i.IKt=function(t){var n=this;return t?t.map(function(t){var i,r={adSlotId:t.lYt||"",height:t.Mi||0,width:t.Ti||0};if(t.LKt){var e,s=n.D0t(t.LKt),u=s.clickThrough||(null==(e=t.gYt)?void 0:e.AYt);i=Yu({},s,{contentHTML:n.B0t(s.resourceURI,u,s.altText)||""})}else if(t.VKt)i=n.C0t(t.VKt);else{if(!t.FKt)return;i=n.R0t(t.FKt)}return xw(i,r)}).filter(function(t){return void 0!==t}):[]},i.N0t=function(){return this.M0t.yKt},Nt(n,[{key:"od",get:function(){return this.zKt}},{key:"Ont",get:function(){return this.LZt}},{key:"CKt",get:function(){return this.XYt}}]),n}(CZ),OZ=function(t){function n(n,i,r,e,s,u,o){var h;return(h=t.call(this,n,i,e,s,u,o)||this).L0t=void 0,h.hu=void 0,h.L0t=r,h}Ct(n,t);var i=n.prototype;return i.xa=function(){var t=this.zKt,n={companions:this.IKt(this.iYt),type:"nonlinear",id:this.M0t.GKt,skipOffset:this.JYt,integration:this.LZt.integration,adSystem:this.M0t.yKt,get adBreak(){return t.wnt()},creativeId:this.M0t.GKt,universalAdIds:this.XYt.map(function(t){return{adIdRegistry:t.ZJt,adIdValue:t.tZt}})};return this.M0t.FKt?xw(this.R0t(this.M0t.FKt),n):this.M0t.VKt?xw(this.C0t(this.M0t.VKt),n):this.M0t.LKt?xw(this.D0t(this.M0t.LKt),n):n},i.wnt=function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()},i.O0t=function(){var t,n;return null!=(n=null==(t=this.M0t.LKt)?void 0:t.LJt)?n:""},i.F0t=function(){var t,n,i;return null!=(i=null==(n=this.M0t)||null==(t=n.LKt)?void 0:t.FJt)?i:""},Nt(n,[{key:"RKt",get:function(){return this.M0t}},{key:"xKt",get:function(){return this.L0t}},{key:"JYt",get:function(){var t,n=this.M0t.od;return n&&n.Ont&&void 0!==n.Ont.skipOffset?MJ.NZt(n.Ont.skipOffset,this.k0t.w0t.ct):(null==(t=this.M0t.od)?void 0:t.JYt)||-1}}]),n}(xZ),MZ=function(t){function n(n,i,r,e,s,u){var o;return(o=t.call(this,n,i,r,e,s,u)||this).hu=void 0,o}Ct(n,t);var i=n.prototype;return i.xa=function(){var t,n=this.zKt,i=this.M0t;return{companions:this.IKt(this.iYt),duration:i.ct,id:i.GKt,mediaFiles:i.QYt,get mediaUrl(){return i.tJt},skipOffset:this.JYt,type:"linear",integration:this.LZt.integration,adSystem:i.yKt,width:void 0,height:void 0,get adBreak(){return n.wnt()},clickThrough:null==(t=i.FYt)?void 0:t.AYt,creativeId:i.GKt,universalAdIds:this.XYt.map(function(t){return{adIdRegistry:t.ZJt,adIdValue:t.tZt}}),closedCaptionFiles:i.eJt,extensions:i.nJt}},i.wnt=function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()},i.O0t=function(){return this.M0t.QYt.length>0?this.M0t.QYt[0].contentURL:""},i.F0t=function(){return this.M0t.QYt.length>0?this.M0t.QYt[0].type:""},Nt(n,[{key:"PKt",get:function(){return this.M0t}},{key:"JYt",get:function(){var t=this.M0t.od;return t&&t.Ont&&void 0!==t.Ont.skipOffset?MJ.NZt(t.Ont.skipOffset,this.k0t.w0t.ct):this.M0t.JYt||-1}}]),n}(xZ);function LZ(t){return V(t,MZ)}F(),Et();var UZ=function(t){return t.U0t="csai",t.V0t="google-ima",t.so="google-dai",t.H0t="freewheel",t.W0t="mediatailor",t.Iv="chromecast",t.ont="theoads",t}({});F(),Et(),Dt();var FZ=function(t){function n(n){return t.call(this,"q0t",n)||this}return Ct(n,t),n.prototype.xa=function(){return new VZ(this.Int.wnt())},n}(xx),VZ=function(t){function n(n){return t.call(this,"updatead",n)||this}return Ct(n,t),n}(Ox);F(),Et(),Dt();var HZ=function(t){function n(n){return t.call(this,"z0t",n)||this}return Ct(n,t),n.prototype.xa=function(){return new WZ(this.Int.wnt())},n}(xx),WZ=function(t){function n(n){return t.call(this,"adloaded",n)||this}return Ct(n,t),n}(Ox),zZ=function(t){function n(n,i,r){var e;return(e=t.call(this)||this).oa=void 0,e.i$t=void 0,e.Q0t=void 0,e.X0t=[],e.G0t=void 0,e.M0t=void 0,e.hu=void 0,e.eh=function(t){var n;if(t){var i=e.i$t.KD,r=i.breakStatus,s=i.media,u=s.breakClips,o=s.breaks,h=null==(n=DK(i))?void 0:n.media,c=[];o&&u&&e.Y0t(o,u,h,c),e.t1t(r,c);for(var a,f=Lt(c);!(a=f()).done;){var v=a.value;e.So(v)}}},e.oa=n,e.i$t=i,e.Q0t=r,e.i$t.o$t(e.eh),e}Ct(n,t);var i=n.prototype;return i.M6=function(t,n,i){throw new p("Scheduling ads while casting is not supported.")},i.rD=function(){this.i$t.p$t()},i.Ent=function(t){var n;null==(n=this.Q0t)||n.Ent(t)},i.Tnt=function(t,n){var i;null==(i=this.Q0t)||i.Tnt(t,n)},i.K0t=function(t){return Ui(this.X0t,function(n){return n.o===t})},i.Y0t=function(t,n,i,r){for(var e,s=this.X0t,u=[],o=!1,h=Lt(t);!(e=h()).done;){var c=e.value,a=this.K0t(c.id);void 0===a&&(a=new XZ(c),r.push(new Nx(a))),!Un(a.J0t)&&Un(i)&&(a.J0t=this.Z0t(a.$0t,i));var f=a.Jc;a.er(c,n,i,r);for(var v,d=Lt(a.Jc);!(v=d()).done;){var l=v.value;ji(f,l)||(r.push(new Mx(l)),o=!0)}u.push(a)}this.X0t=u,o&&r.push(new Gx);for(var w,g=Lt(s);!(w=g()).done;){var _=w.value;ji(u,_)||r.push(new Dx(_))}},i.t1t=function(t,n){var i,r,e=this.G0t,s=this.M0t;if(t){var u,o=t.breakId,h=t.breakClipId;i=o?this.K0t(o):void 0,r=h?null==(u=this.G0t)?void 0:u.i1t(h):void 0}if(this.G0t=i,this.M0t=r,i!==e&&(void 0!==e&&(e.e1t=void 0,n.push(new Ux(e))),void 0!==i&&(i.e1t=this.i$t,n.push(new Vx(i)))),r!==s){var c=this.oa.LP();void 0!==s&&n.push(new Xx(s,c)),void 0!==r&&n.push(new Wx(r,c))}},i.Z0t=function(t,n){if(n&&n.breaks){var i=Ui(n.breaks,function(n){return n.id===t.id});return i}},i.knt=function(t){for(var n,i=[],r=Lt(this.X0t);!(n=r()).done;){var e=n.value,s=e.Jc;if(e===this.G0t&&void 0!==this.M0t){var u=s.indexOf(this.M0t);u>=0&&(s=s.slice(u))}else if(e.j0t())continue;for(var o,h=Lt(s);!(o=h()).done;){var c=o.value.s1t();c&&i.push(c)}}for(var a,f=Lt(i);!(a=f()).done;){var v=a.value;t.M6(v,Sx.gnt,!1)}},i.kn=function(){return this.Vo(),this.i$t.a$t(this.eh),void 0!==this.G0t&&(this.G0t.e1t=void 0,this.G0t=void 0),this.M0t=void 0,Yi(this.X0t),ut.resolve(void 0)},i.Snt=function(t){},Nt(n,[{key:"zc",get:function(){return void 0!==this.G0t}},{key:"mnt",get:function(){return this.M0t?[this.M0t]:[]}},{key:"ynt",get:function(){var t;return null!=(t=this.G0t)?t:null}},{key:"Ant",get:function(){var t=this;return Ji(this.X0t,function(n){var i=n.Jc;if(n===t.G0t&&void 0!==t.M0t){var r=i.indexOf(t.M0t);if(r>=0)return i.slice(r+1)}return n.j0t()?[]:i})}},{key:"bnt",get:function(){var t=this;return this.X0t.filter(function(n){return n===t.G0t||!n.j0t()})}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=Ex(this)}}]),n}(ih),XZ=function(t){function n(n){var i;return(i=t.call(this)||this).n1t=void 0,i.J0t=void 0,i.qc=[],i.e1t=void 0,i.n1t=n,i}Ct(n,t);var i=n.prototype;return i.j0t=function(){return this.n1t.isWatched},i.i1t=function(t){return Ui(this.qc,function(n){return n.o===t})},i.er=function(t,n,i,r){for(var e,s=function(s){var o=t.breakClipIds[s],h=Ui(n,function(t){return t.id===o});if(void 0===h)return"continue";var c=s0&&(t=Pi(this.qc,function(t){return t.ct}),S(t)&&(t=void 0)),t}},{key:"m0t",get:function(){var t=this.p0t;if(void 0!==t&&void 0!==this.e1t){var n=this.e1t.g$t();if(void 0!==n)return b.max(0,t-n)}return t}},{key:"_Ot",get:function(){return this.n1t.position}},{key:"X$t",get:function(){}}]),n}(DZ),qZ=function(){function t(t,n){this.a1t=void 0,this.r1t=void 0,this.od=void 0,this.hu=void 0,this.a1t=t,this.od=n}var n=t.prototype;return n.N0t=function(){return""},n.F0t=function(){var t;return null!=(t=this.a1t.contentType)?t:""},n.O0t=function(){var t,n;return null!=(n=null!=(t=this.a1t.contentUrl)?t:this.a1t.contentId)?n:""},n.er=function(t,n){var i=this.o,r=this.ct,e=this.a1t.contentUrl;this.a1t=t;var s=this.o,u=this.ct,o=this.a1t.contentUrl;i===s&&(r===u||S(r)&&S(u))&&e===o||n.push(new FZ(this)),S(r)&&!S(u)&&n.push(new HZ(this))},n.s1t=function(){var t;return this.r1t&&(t=VJ(this.r1t,this.od._Ot)),t||(t=VJ(this.a1t,this.od._Ot)),t},n.wnt=function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()},n.xa=function(){var t=this;return{get extensions(){return[]},get companions(){return t.tYt},get duration(){return t.ct},get id(){return t.o},get mediaFiles(){return t.QYt},get mediaUrl(){return t.tJt},get closedCaptionFiles(){return[]},get skipOffset(){return t.JYt},type:"linear",integration:UZ.Iv,get adSystem(){return t.N0t()},width:void 0,height:void 0,get adBreak(){return t.od.wnt()},get resourceURI(){return t.O0t()},get clickThrough(){return t.AYt},get creativeId(){return t.GKt},get customData(){return t.X$t},get isSlate(){return!1},get universalAdIds(){return t.CKt.map(function(t){return{adIdRegistry:t.ZJt,adIdValue:t.tZt}})}}},Nt(t,[{key:"o1t",get:function(){return this.a1t}},{key:"o",get:function(){return this.a1t.id}},{key:"tYt",get:function(){return[]}},{key:"ct",get:function(){var t;return null!=(t=this.a1t.duration)?t:NaN}},{key:"QYt",get:function(){var t=this.O0t();return t?[{contentURL:t,delivery:"progressive",type:this.F0t(),width:0,height:0}]:[]}},{key:"tJt",get:function(){return this.O0t()}},{key:"JYt",get:function(){var t=this.a1t.whenSkippable;return void 0===t?void 0:t<0?-1:t}},{key:"AYt",get:function(){return this.a1t.clickThroughUrl}},{key:"GKt",get:function(){}},{key:"CKt",get:function(){return[]}},{key:"X$t",get:function(){}}]),t}();F(),Et(),Bt(),Dt();var GZ=function(t){function n(n,i){var r;return void 0===i&&(i=Vn.Zs.Ke),(r=t.call(this)||this).pE=void 0,r.Ls=void 0,r.d1t=void 0,r.c1t=void 0,r.We=!1,r.l1t=function(t){t.stopPropagation(),r.So(new rh("clickstart"))},r.f1t=function(t){t.stopPropagation(),r.So(new rh("click"))},r.pE=n,r.d1t=i,r.Ls=v.createElement("a"),r.Ls.style.position="absolute",r.Ls.style.zIndex="11",r.Ls.target="Xu",r.d1t?(vB(r.Ls,"learn more"),r.Ls.className="theoplayer-ad-overlay-component theoplayer-ad-touch-clickthrough",r.Ls.setAttribute("rel","noopener")):ci(r.Ls),r.pE.appendChild(r.Ls),r.QU(),r}Ct(n,t);var i=n.prototype;return i.jU=function(){if(!this.We){this.We=!0,this.Ls.style.display="",this.d1t||(this.pE.style.cursor="pointer");var t=this.d1t?this.Ls:this.pE;Vn.Zs.Ke?(t.addEventListener("touchstart",this.l1t),t.addEventListener("touchend",this.f1t)):(t.addEventListener("mousedown",this.l1t),t.addEventListener("click",this.f1t))}},i.QU=function(){if(this.We){this.We=!1,this.Ls.style.display="none",this.d1t||(this.pE.style.cursor="");var t=this.d1t?this.Ls:this.pE;Vn.Zs.Ke?(t.removeEventListener("touchstart",this.l1t),t.removeEventListener("touchend",this.f1t)):(t.removeEventListener("mousedown",this.l1t),t.removeEventListener("click",this.f1t))}},i.zg=function(){this.Vo(),this.QU(),this.pE.removeChild(this.Ls)},Nt(n,[{key:"u1t",get:function(){return this.c1t},set:function(t){this.c1t!==t&&(this.c1t=t,this.Ls.href=null!=t?t:"",t?this.jU():this.QU())}}]),n}(th);F(),Et(),Bt(),Dt(),F(),Et(),Ut();var jZ=[1200,992,768,576],QZ={1200:"theo-size-xl",992:"theo-size-l",768:"theo-size-m",576:"theo-size-s"},YZ=function(){function t(t,n){var i=this;this.Ls=void 0,this.sc=void 0,this._1t=void 0,this.bn=void 0,this.Ls=t,this.sc=n,this.bn=function(t){i.v1t(t.width)},this._1t=KZ(n.Eu),si(this.Ls,this._1t),n.wn(hI.yn,this.bn)}var n=t.prototype;return n.v1t=function(t){var n=KZ(t);n!==this._1t&&(si(this.Ls,n),function(t,n){if(void 0!==t.classList)t.classList.remove(n);else if(void 0!==t.className){for(var i=" "+ri(t)+" ",r=" "+n+" ";-1!==i.indexOf(r);)i=i.replace(r," ");ei(t,i.trim())}}(this.Ls,this._1t),this._1t=n)},n.kn=function(){this.sc.mn(hI.yn,this.bn)},t}();function KZ(t){for(var n,i=Lt(jZ);!(n=i()).done;){var r=n.value;if(t>r)return QZ[r]}return"theo-size-xs"}var JZ=function(t){function n(n,i){var r;return(r=t.call(this)||this).Ls=void 0,r.A1t=void 0,r.ud=void 0,r.tc=void 0,r.Yo=void 0,r.y1t=function(){r.So(new rh("rD"))},r.Ls=v.createElement("div"),r.xe.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",r.xe.style.position="absolute",r.ud=v.createElement("span"),r.xe.appendChild(r.ud),i&&(r.A1t=v.createElement("div"),r.A1t.className="theoplayer-ad-skip-poster",r.A1t.style.backgroundImage='url("'+jo(i)+'")',r.xe.appendChild(r.A1t)),r.Yo="countdown",r.tc=new YZ(r.xe,n),r}Ct(n,t);var i=n.prototype;return i.g1t=function(t){"countdown"!==this.Yo&&(this.Yo="countdown",this.p1t(),this.xe.classList.remove("theoplayer-ad-skip-button"),this.xe.classList.add("theoplayer-ad-skip-countdown")),this.UT="You can skip in "+b.round(t)+" seconds"},i.m1t=function(){"skip"!==this.Yo&&(this.Yo="skip",this.UT="Skip Ad",this.w1t(),this.xe.classList.remove("theoplayer-ad-skip-countdown"),this.xe.classList.add("theoplayer-ad-skip-button"))},i.w1t=function(){this.xe.addEventListener("mouseup",this.y1t),this.xe.addEventListener("touchend",this.y1t)},i.p1t=function(){this.xe.removeEventListener("mouseup",this.y1t),this.xe.removeEventListener("touchend",this.y1t)},i.kn=function(){this.Vo(),this.p1t(),this.tc.kn(),$n(this.Ls),$n(this.ud),this.A1t&&$n(this.A1t)},Nt(n,[{key:"xe",get:function(){return this.Ls}},{key:"Xk",get:function(){return this.Yo}},{key:"UT",get:function(){return this.ud.textContent||""},set:function(t){vB(this.ud,t)}}]),n}(th),ZZ=function(t){function n(n,i,r,e,s){var u;return(u=t.call(this)||this).oa=void 0,u.YBt=void 0,u.i$t=void 0,u.OPt=TA.iL(),u.q1t=void 0,u.WA=void 0,u.Z4=!1,u.JW=void 0,u.kz=void 0,u.Ez=void 0,u.M1t=void 0,u.t5=Cy.VL,u.X1t=!1,u.Ho=TA.iL(),u.N4=void 0,u.Sz=!1,u.$$t=void 0,u.i0t=void 0,u.e0t=void 0,u.YL=new ng,u.$L=new ng,u.Gl=new Qm,u.qc=void 0,u.Q1t=void 0,u.Y1t=void 0,u.$1t=void 0,u.LEt=NaN,u.W1t=void 0,u.N1t=!1,u.H1t=NaN,u.U1t=void 0,u.x1t=0,u.i2t=function(t,n){switch(t){case"buffered":u.OPt=new TA(n),u.So(new qR(u.LP()));break;case"currentProgramDateTime":u.q1t=new Date(n).getTime()-u.LP();break;case"played":u.Ho=new TA(n);break;case"seekable":u.C1t();break;case"videoHeight":u.F1t(void 0,n);break;case"videoWidth":u.F1t(n,void 0)}},u.e4=function(t){switch(t.type){case eh.$w:u.Je(t.currentTime);break;case eh.Zw:u.Rq();break;case eh.Yw:u.So(new lL(t.representation,t.previousRepresentation));break;case eh.iy:u.So(new WM(t.segmentStartTime,t.error,t.trackType,t.track,t.quality,t.retryCount));break;case eh.Dw:u.So(new hH(t.currentTime,t.initDataType,t.initData));break;case eh.Ew:u.So(new tN(new eg(cd.CONTENT_PROTECTION_ERROR,t.error,void 0,t.licenseAcquisitionURL,t.status,t.statusText,t.licenseAcquisitionMessage,t.systemCode)));break;case eh.Pw:u.So(new nN)}},u.W$t=function(t){u.C1t(),u.B1t(),u.hh(),u.L1t(),u.V1t(),u.R1t(),u.T1t(),u.b1t(),u.j1t(),u.K1t(),u.Z1t(),t||$Z(u.i$t.KD)&&u.Eh()},u.bd=function(){u.V1t(),u.Z1t()},u.e2t=function(t){u.So(t)},u.z1t=gi(function(t){return u.y7(t)},50),u.l$t=function(t){u.W1t=void 0,u.So(new WJ(t))},u.J1t=function(){u.zx()},u.t2t=function(){u.qc.rD()},u.oa=n,u.YBt=r,u.i$t=e,u.qc=new zZ(n,e,i.Jc),u.$$t=s.s0t(),u.WA=s.Nd()-u.$$t,u.kz=s.ox(),u.Ez=s.lx(),u.i0t=s.Nx(),u.e0t=s.Cx(),u.i$t.r$t(u.e4),u.i$t.e$t(u.i2t),u.i$t.o$t(u.W$t),u.i$t.wn(HJ.$Zt,u.e2t),u.i$t.u$t().then(function(t){u.So(new zJ(t.bt,t.Mc))},u.l$t),u}Ct(n,t);var i=n.prototype;return i.b1t=function(){var t=this.i$t.KD.activeTrackIds;if(t){if(this.S1t()){var n=this.$L.II.map(function(t){return t.o}),i=this.YL.II.map(function(t){return t.o});ji(n.concat(i),"0")&&t.push(0)}r$(t,this.YL),r$(t,this.$L),function(t,n){for(var i,r=!1,e=Lt(n.II);!(i=e()).done;){var s=i.value;s.u0t=ji(t,s.jI)?Hm.Kn:Hm.Nh}}(t,this.Gl)}},i.T1t=function(){var t,n=null==(t=this.i$t.KD.media)?void 0:t.tracks;if(n){var i=n.filter(mZ),r=n.filter(yZ),e=n.filter(pZ);if(this.S1t()&&0===r.length&&0!==this.Nx()){var s=this.k1t();r.push(s)}if(this.S1t()&&0===i.length){var u=this.E1t();i.push(u)}n$(this.YL,i.map(function(t){return t.trackId})),n$(this.$L,r.map(function(t){return t.trackId})),n$(this.Gl,e.map(function(t){return t.trackId})),i$(i,this.YL),i$(r,this.$L),function(t,n){for(var i,r=!1,e=Lt(t);!(i=e()).done;){var s=i.value,u=t$(n,s.trackId);u||(u=new kZ(s),n.tt(u),r=!0)}}(e,this.Gl)}},i.P1t=function(){this.kz||(this.x1t=_(this.bd,250))},i.I1t=function(){m(this.x1t)},i.R1t=function(){this.I1t(),this.P1t()},i.C1t=function(){var t,n,i=this.i$t.KD,r=i.media,e=null!=(n=null==r?void 0:r.duration)?n:NaN,s=(null==r?void 0:r.streamType)===chrome.cast.media.StreamType.LIVE||e<0,u=s?1/0:e;this.WA=u,this.D1t();var o=i.getEstimatedLiveSeekableRange(),h=null==(t=i.customData)?void 0:t.buffers;if(Un(o)){var c=o.start,a=o.end,f=o.isMovingWindow,v=void 0===f?s:f,d=o.isLiveDone,l=void 0!==d&&d;this.hUt(c,a,v,l)}else if(Un(h)){var w=h.seekable,g=w[0],_=w[1];this.hUt(g,_,s,!1)}else s?this.hUt(void 0,void 0,!0,!1):this.hUt(0,u,!1,!1)},i.B1t=function(){var t=this.i$t.KD,n=function(t){return void 0!==t&&t.playerState===chrome.cast.media.PlayerState.PAUSED}(t)||$Z(t);this.N1t=n,this.kz!==n&&(this.kz=n,this.kz?this.So(new hT(this.LP())):this.So(new cT(this.LP())))},i.hh=function(){var t=this.i$t.KD.playbackRate;this.M1t!==t&&(this.M1t=void 0,this.Ez!==t&&(this.Ez=t,this.So(new fT(this.LP(),t))))},i.L1t=function(){var t;switch(this.i$t.KD.playerState){case chrome.cast.media.PlayerState.IDLE:t=Cy.VL;break;case chrome.cast.media.PlayerState.BUFFERING:t=Cy.Qn;break;case chrome.cast.media.PlayerState.PAUSED:case chrome.cast.media.PlayerState.PLAYING:t=Cy.WL}this.e5(t),this.O1t()},i.hUt=function(t,n,i,r){Un(t)&&Un(n)?this.N4=new rD(t,n,i,i&&!r):this.N4=void 0},i.F1t=function(t,n){this.e0t=null!=n?n:this.e0t,this.i0t=null!=t?t:this.i0t,this.So(new Ty)},i.Je=function(t){this.U1t!==t?(this.Sz=!0,this.So(new dT(this.LP()))):this.U1t=void 0},i.Rq=function(){if(this.Sz){this.Sz=!1;var t=this.LP();this.So(new pw(t,this.DP())),this.So(new lT(t))}},i.Eh=function(){this.Z4=!0,this.VP()&&this.So(new vT(this.LP()))},i.D1t=function(){var t=this.LEt,n=this.Nd();t===n||S(t)&&S(n)||(this.LEt=n,this.So(new aT(n)))},i.V1t=function(){var t=this.LP();this.Sz||this.H1t===t||(this.H1t=t,this.So(new pw(t,this.DP())))},i.t0t=function(){this.kz&&(this.kz=!1,this.So(new cT(this.LP())),this.e5(Cy.VL))},i.Zst=function(){return this.qc},i.RP=function(){return this.OPt.Ny(this.$$t)},i.LP=function(){if(this.qc.zc){var t=this.i$t._$t();if(void 0!==t)return t}return this.Hst()},i.Hst=function(){return void 0!==this.W1t?this.$$t+this.W1t:this.Z4?this.Nd():this.$$t+this.i$t.v$t()},i.DP=function(){if(this.q1t)return new Date(this.Hst()+this.q1t)},i.Nd=function(){if(this.qc.zc){var t,n=null==(t=this.qc.mnt[0])?void 0:t.ct;if(void 0!==n&&!S(n))return n}return this.$$t+this.WA},i.HP=function(){return this.JW},i.VP=function(){return!this.qc.zc&&this.Z4},i.ox=function(){return this.kz},i.lx=function(){return this.Ez},i.vx=function(t){this.Ez!==t&&(this.M1t=this.Ez,this.Ez=t,this.So(new fT(this.LP(),t)),this.i$t.vx(t))},i.bx=function(){return this.t5},i.gx=function(){return this.qc.zc?TA.tL(0,this.LP()):this.Ho.Ny(this.$$t)},i.Tx=function(){var t,n;if(this.qc.zc)return TA.iL();var i=null!=(n=null==(t=this.N4)?void 0:t.z3().Ny(this.$$t))?n:TA.iL();if(i.V>0){var r=i.An(i.V-1);i=i.OM(TA.tL(r,this.LP()))}return i},i.Ex=function(){return this.Sz},i.EP=function(){return this.YL},i.Dx=function(){return this.$L},i.Ix=function(){return this.Gl},i.k1t=function(){return{customData:{activeQuality:{averageBandwidth:0,bandwidth:0,codecs:"",frameRate:0,height:this.Cx(),id:"0",name:"",width:this.Nx()},enabled:!0,id:"0",kind:"main",label:"",language:"",qualities:[],uid:0},language:"",name:"",trackContentId:"",trackContentType:"",trackId:0,type:gZ.Bk}},i.E1t=function(){return{customData:{activeQuality:{averageBandwidth:0,bandwidth:0,codecs:"",id:"0",name:"",audioSamplingRate:0},qualities:[],enabled:!0,id:"0",kind:"main",label:"",language:"",uid:0},language:"",name:"",trackContentId:"",trackContentType:"",trackId:0,type:gZ.Dk}},i.S1t=function(){var t,n;return!(void 0!==(null==(t=this.YBt.c$t())?void 0:t.version))||(null==(n=this.YBt.c$t())?void 0:n.sdkType)===EZ._0t},i.f$t=function(t){this.S1t()&&Xi(t,0),this.i$t.f$t(t)},i.Nx=function(){return this.i0t},i.Cx=function(){return this.e0t},i.Gx=function(){this.kz&&(this.kz=!1,this.N1t=!1,this.So(new cT(this.LP()))),this.i$t.Gx()},i.zx=function(){this.kz||(this.kz=!0,this.N1t=!0,this.So(new hT(this.LP()))),this.i$t.zx()},i.My=function(t){if(!this.qc.zc){var n=b.max(0,t-this.$$t);n=b.round(1e6*n)/1e6;var i=this.W1t;this.W1t=n,this.N1t=this.ox(),this.U1t=n,this.Sz=!0,this.So(new dT(this.LP())),void 0===i&&(this.S1t()?this.z1t(n):this.y7(n))}},i.y7=function(t){this.i$t.My(t,this.N1t).then(this.G1t(t)).catch(this.l$t)},i.G1t=function(t){var n=this;return function(){void 0!==n.W1t&&(n.W1t===t?n.W1t=void 0:n.y7(n.W1t))}},i.e5=function(t){this.t5!==t&&(this.t5=t,this.So(new Ry(this.LP(),t))),void 0===this.W1t&&this.Sz&&t>=Cy.HL&&this.Rq(),this.O1t()},i.O1t=function(){if(this.kz)this.X1t=!1;else{var t=this.t5>=Cy.WL;this.X1t!==t&&(this.X1t=t,t?this.So(new Oy(this.LP())):this.So(new Ny(this.LP())))}},i.j1t=function(){this.Q1t||(this.Q1t=v.createElement("div"),this.oa.xe.appendChild(this.Q1t),this.Q1t.className="theoplayer-ad-linear theoplayer-chromecast-ad",this.Q1t.style.zIndex="10",ci(this.Q1t)),this.Q1t.style.display=this.qc.zc?"":"none"},i.K1t=function(){var t,n=null==(t=this.qc.mnt[0])?void 0:t.AYt;n&&!this.Y1t?(this.Y1t=new GZ(this.Q1t,!0),this.Y1t.u1t=n,this.Y1t.wn("clickstart",this.J1t)):this.Y1t&&(this.Y1t.u1t=n)},i.Z1t=function(){var t,n=null==(t=this.qc.mnt[0])?void 0:t.JYt;if(void 0===n||n<0)this.$1t&&(this.$1t.kn(),this.$1t=void 0);else{if(!this.$1t){var i,r=null==(i=this.oa.Na)?void 0:i.gi;this.$1t=new JZ(this.oa.Wu,r),this.Q1t.appendChild(this.$1t.xe),this.$1t.wn("rD",this.t2t)}var e=this.i$t._$t();void 0!==e&&(e=Cy.Qn&&(r.AV=!0,r.So(new Dy(t.currentTime))),!r.SV&&r.EV<=Cy.Qn&&n>=Cy.HL&&(r.SV=!0,r.So(new Py(t.currentTime))),r.EV<=Cy.HL&&n>=Cy.WL&&r.So(new By(t.currentTime)),r.EV<=Cy.WL&&n===Cy.qL&&r.So(new xy(t.currentTime)),r.EV=n},r.ib=r.oa.Mx,r.Tz=r.oa.$P,r.YBt=i,r.YBt.wn(nZ.$Zt,r.e2t),r.YBt.wn(nZ.R$t,r.I2t),r.YBt.wn(nZ.gy,r.R2t),r.YBt.wn(nZ.I$t,r.C2t),r.YBt.wn(nZ.C$t,r.D2t),r.qc=new Qx(r),r.fz=r.oa.bt,r.Ac=r.oa.nu(),r.Ylt=new dZ(r,0,r.oa.Hst(),r.oa.Nd(),r.oa.UP,r.oa.hx,r.oa.ux,r.oa.Bx,r.oa.Rx),r.l2t(),r}Ct(n,t);var i=n.prototype;return i.Az=function(t){t&&(Mw(this.fz&&Fw(this.fz),t&&Fw(t))||(this.fz=t,this.So(new IT(t))))},i.s2t=function(t){if(t){var n=oE(t,this.oa.Cd);Mw(this.Ac&&Fw(this.Ac),n&&Fw(n))||(this.Ra.n0t(0),this.Ac=n,this.So(new yx(n)),this.Ra.t0t())}},i.n2t=function(t){for(var n,i=Lt(this.rt.II);!(n=i()).done;){var r=n.value;if(r.jI===t)return r}for(var e,s=Lt(this.ht.II);!(e=s()).done;){var u=e.value;if(u.jI===t)return u}},i.Zst=function(){return this.qc},i.$st=function(){return this.Mst},i.EP=function(){return this.YL},i.RP=function(){return this.Ra.RP()._s()},i.Un=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return t?[4,this.z$t(t,null!=(i=t.ads)?i:[],t.streamType,NaN,0,null!=n?n:0)]:[2];case 1:return r.sent(),[2]}})}).call(this)},i.a2t=function(t){return Vt(function(){var n,i,r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:return(i=null!=(n=this.o2t)?n:this.Ac)?(e=this.o2t?null!=(r=this.o2t.ads)?r:[]:this.Wnt(),s=this.oa.Nd(),u=this.oa.Tx(),o=function(t,n,i){return S(t)?i:t===1/0?"live"===i||"dvr"===i?i:n&&n.length>0&&n.end(n.length-1)-n.start(0)>60?"dvr":"live":"vod"}(s,u,i.streamType),h=u.length>0?u.start(0):0,c=null!=t?t:this.Hst(),[4,this.z$t(i,e,o,s,h,c)]):[2];case 1:return a.sent(),[2]}})}).call(this)},i.Wnt=function(){var t=new Kx;return this.qc.knt(t),t.Wnt()},i.DP=function(){return this.Ra.DP()},i.NP=function(){return this.fz},i.LP=function(){return this.Ra.LP()},i.Hst=function(){return this.Ra.Hst()},i.OP=function(t,n){this.u2t||(this.YBt.q$t()||this.u2t||!this.Ac?this.Ra.My(t):this.Un(this.Ac,t))},i.Nd=function(){return this.Ra.Nd()},i.VP=function(){return this.Ra.VP()},i.HP=function(){return this.JW},i.qP=function(){return this.ZW},i.GP=function(){return this.ZL},i.ZP=function(){return this.oa.JP},i.tx=function(){return this.Tz},i.ix=function(t){this.Tz=t,this.So(new wT(this.MP,this.Mx)),this.YBt.ix(t)},i.ox=function(){return this.Ra.ox()},i.lx=function(){return this.Ra.lx()},i.vx=function(t){this.Ra.vx(t)},i.gx=function(){return this.Ra.gx()._s()},i.wx=function(){return jT.OL},i.yx=function(t){},i.bx=function(){return this.Ra.bx()},i.Tx=function(){return this.Ra.Tx()._s()},i.Ex=function(){return this.Ra.Ex()},i.nu=function(){return this.Ac},i.Ta=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.Ac=t,[4,this.Un(t)];case 1:return n.sent(),this.o2t=void 0,this.Ra.t0t(),[2]}})}).call(this)},i.Ix=function(){return this.Gl},i.Cx=function(){return this.Ra.Cx()},i.Nx=function(){return this.Ra.Nx()},i.Dx=function(){return this.$L},i.Lx=function(){return this.ib},i.Ox=function(t){this.ib=t,this.So(new wT(this.MP,this.Mx)),this.YBt.Ox(t)},i.Wx=function(){},i.Hx=function(){return this.ha},i.qx=function(){},i.Gx=function(){this.YBt.q$t()||this.u2t||!this.Ac?this.Ra.Gx():this.Un(this.Ac)},i.zx=function(){this.Ra.zx()},i.gr=function(){this.ho=!0},i.mr=function(){this.fz=void 0,this.ho=!1},i.be=function(){},i.we=function(){},i.z$t=function(t,n,i,r,e,s){return Vt(function(){var u,o,h,c;return zt(this,function(a){switch(a.label){case 0:this.u2t=!0,this.c2t(),this.Ra.n0t(e),o=function(t,n,i,r){return{theoplayer_version:1,streamStart:t,isLive:n,sourceDescription:i,configuration:r}}(e,u="live"===i||"dvr"===i,t,this.Cd),h={G$t:t,Jc:n,MP:b.max(0,s-e),ct:r,b0:u?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED,X$t:o},a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,this.YBt.z$t(h)];case 2:return a.sent(),[3,5];case 3:return c=a.sent(),this.d2t(c),[3,5];case 4:return this.u2t=!1,[7];case 5:return[2]}})}).call(this)},i.l2t=function(){this.f2t(this.YL),this.f2t(this.$L),this.v2t(this.Gl)},i.f2t=function(t){for(var n,i=this,r=Lt(t.II);!(n=r()).done;){var e=n.value;this._2t(e)}t.wn(Sw.eI,function(t){i._2t(t.Ht),i.g2t()})},i.v2t=function(t){for(var n,i=this,r=Lt(t.II);!(n=r()).done;){var e=n.value;this.p2t(e)}t.wn(Sw.eI,function(t){i.p2t(t.Ht),i.g2t()})},i._2t=function(t){t.wn(lZ.h0t,this.Opt),t.wn(lZ.o0t,this.m2t),t.wn(lZ.o0t,this.b1t)},i.p2t=function(t){t.wn(lZ.r0t,this.w2t),t.wn(lZ.r0t,this.b1t)},i.y2t=function(){for(var t,n=[],i=Lt(this.rt.II);!(t=i()).done;){var r=t.value;r.Rt&&n.push(r.jI)}for(var e,s=Lt(this.ht.II);!(e=s()).done;){var u=e.value;u.Rt&&n.push(u.jI)}for(var o,h=Lt(this.nt.II);!(o=h()).done;){var c=o.value;c.Xk===Hm.Kn&&n.push(c.jI)}this.Ra.f$t(n)},i.A2t=function(t,n,i){this.b2t=t,this.S2t=n,this.T2t=i},i.k2t=function(t){var n,i;return!!t&&((null!=(i=null==(n=this.YBt.c$t())?void 0:n.version)?i:-1)>=2?t.map(function(t){return t.o}):[t[0].o])},i.E2t=function(t){this.P2t=t},i.Yx=function(){},i.Jx=function(){},i.tI=function(t){throw new y("Can't add a track while casting.")},i.Xx=function(){return Vt(function(){return zt(this,function(t){return this.Ra.Xx(),this.c2t(),[2]})}).call(this)},i.c2t=function(){this.EV=Cy.VL,this.AV=!1,this.SV=!1,this.JW=void 0,this.ZW=void 0},i.kn=function(){return Vt(function(){return zt(this,function(t){return this.c2t(),this.Vo(),this.Ylt=this.x2t(),this.YBt.mn(nZ.$Zt,this.e2t),this.YBt.mn(nZ.R$t,this.I2t),this.YBt.mn(nZ.gy,this.R2t),this.YBt.mn(nZ.I$t,this.C2t),this.YBt.mn(nZ.C$t,this.D2t),this.YBt.kn(),[2]})}).call(this)},i.x2t=function(){return new dZ(this,this.Ra.s0t(),this.Ra.LP(),this.Ra.Nd(),this.Ra.VP(),this.Ra.ox(),this.Ra.lx(),this.Ra.Nx(),this.Ra.Cx())},Nt(n,[{key:"Ylt",get:function(){return this.Ra},set:function(t){var n=this.Ra;n&&(n.mn(HJ.$Zt,this.e2t),n.mn(HJ.t$t,this.r2t),n.mn(s$,this.Rs),n.mn(Ey.wI,this.FV),t.n0t(n.s0t()),n.knt(t.Zst())),this.Ra=t,this.YL.BI=t.EP(),this.$L.BI=t.Dx(),this.Gl.BI=t.Ix(),this.qc.BI=t.Zst(),n&&n.kn(),t.wn(HJ.$Zt,this.e2t),t.wn(HJ.t$t,this.r2t),t.wn(s$,this.Rs),t.wn(Ey.wI,this.FV)}},{key:"ro",get:function(){return this.ho}},{key:"Jc",get:function(){return this.Zst()}},{key:"h2t",get:function(){return this.o2t||this.Ac},set:function(t){this.o2t=t}},{key:"MP",get:function(){return this.LP()},set:function(t){this.OP(t)}},{key:"Vx",get:function(){return!1},set:function(t){}}]),n}(Lb);F(),Et(),Dt();var o$=function(t){function n(n){var i;return(i=t.call(this,"error")||this).lt=void 0,i.lt=n,i}return Ct(n,t),n.prototype.xa=function(){return new h$(this.lt)},n}(kw),h$=function(t){function n(n){var i;return(i=t.call(this,"error")||this).error=void 0,i.error=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var c$=function(t){function n(n){var i;return(i=t.call(this,"statechange")||this).state=void 0,i.state=n,i}return Ct(n,t),n}(rh);function a$(t,n){var i;return{get casting(){return t.bJ},get error(){return t.lt},get receiverName(){return t.B2t},get state(){return t.Ylt},start:function(){t.Tn()},stop:function(){t.Xx()},join:function(){t.N2t()},leave:function(){t.M2t()},set connectionCallback(t){null==n||n.L2t(t)},get connectionCallback(){return null==n?void 0:n.O2t()},get source(){return i||t.Mc},set source(n){i=n,t.Mc=n},addEventListener:function(n,i){var r=Gw(n,Xw);t.wn(r,i)},removeEventListener:function(n,i){var r=Gw(n,Xw);t.mn(r,i)}}}F(),Et();var f$=function(t){function n(n,i,r,e){var s;return(s=t.call(this)||this).YS=void 0,s.JW=void 0,s.hu=void 0,s.V2t=void 0,s.oa=void 0,s.Ra=US.UNAVAILABLE,s.q2t=void 0,s.CY=void 0,s.F2t=void 0,s.H2t=!1,s.rV=new hr,s.n3t=function(){s.F2t.wn(aZ.Z$t,s.s3t),s.Ylt=s.F2t.r3t()},s.s3t=function(t){var n=t.Ylt;s.Ylt=n,n!==US.UNAVAILABLE&&n!==US.AVAILABLE||s.j2t(!1).catch(s.e8)},s.o2t=void 0,s.e8=function(t){vr(t)||V(t,kK)&&(s.JW=t,s.So(new o$(t).Ca))},s.CY=n,s.V2t=i,s.F2t=e,s.YS=r.chromecast,s.q2t=_r(s.F2t.VY(s.YS,s.rV.Yg),s.rV),s.q2t.then(s.n3t).catch(s.e8),s}Ct(n,t);var i=n.prototype;return i.W2t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:if(!this.q2t)throw new y("Chromecast must be initialized before starting a session");return[4,this.q2t];case 1:return t.sent(),this.F2t.U2t()?[3,3]:[4,this.F2t.z2t()];case 2:t.sent(),t.label=3;case 3:return[2]}})}).call(this)},i.Tn=function(){return Vt(function(){var t,n,i;return zt(this,function(r){switch(r.label){case 0:this.H2t=!0,r.label=1;case 1:return r.trys.push([1,5,,6]),this.Ylt=US.CONNECTING,[4,this.W2t()];case 2:return r.sent(),[4,this.G2t()];case 3:return r.sent(),this.oa&&(t=this.V2t.nu(),n=this.F2t.X2t(t),this.oa.h2t=n?oE(n,this.V2t.Cd):this.o2t,this.oa.a2t()),this.Ylt=US.CONNECTED,[4,this.V2t.Xx()];case 4:return r.sent(),[3,6];case 5:return i=r.sent(),this.j2t(!1).catch(di),this.Ylt=US.AVAILABLE,vr(i)||this.e8(i),[3,6];case 6:return[2]}})}).call(this)},i.N2t=function(){return Vt(function(){var t,n,i;return zt(this,function(r){switch(r.label){case 0:this.H2t=!0,r.label=1;case 1:return r.trys.push([1,5,,7]),this.Ylt=US.CONNECTING,[4,this.W2t()];case 2:return r.sent(),[4,this.G2t()];case 3:return r.sent(),this.oa&&(t=this.V2t.nu(),(n=this.F2t.Q2t(t))&&(this.oa.h2t=oE(n,this.V2t.Cd))),this.Ylt=US.CONNECTED,[4,this.V2t.Xx()];case 4:return r.sent(),[3,7];case 5:return i=r.sent(),[4,this.j2t(!0).catch(di)];case 6:return r.sent(),this.Ylt=US.AVAILABLE,vr(i)||this.e8(i),[3,7];case 7:return[2]}})}).call(this)},i.K2t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.F2t.U2t()?[4,this.Tn()]:[2];case 1:return t.sent(),[2]}})}).call(this)},i.G2t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return null!=this.oa||(this.oa=this.Y2t()),this.JW=void 0,this.V2t.zx(),[4,this.CY.J2t(this.oa)];case 1:return t.sent(),[2]}})}).call(this)},i.Y2t=function(){var t=new u$(this.V2t,this.F2t.U2t());return t.E2t(this.e8),t},i.Z2t=function(){this.oa&&(this.oa.kn(),this.oa=void 0)},i.j2t=function(t){return Vt(function(){var n,i,r,e;return zt(this,function(s){switch(s.label){case 0:if(this.H2t=!1,!this.oa)return[2];n=this.oa.ro,i=this.oa.nu(),r=this.oa.Hst(),s.label=1;case 1:return s.trys.push([1,,4,5]),n?(null!=(e=t?this.F2t.$2t(i):this.F2t.t3t(i))||(e=i),[4,this.CY.i3t(e,e===i)]):[3,3];case 2:s.sent(),this.V2t.OP(r),this.V2t.Gx(),s.label=3;case 3:return[3,5];case 4:return this.Z2t(),[7];case 5:return[2]}})}).call(this)},i.M2t=function(){this.bJ&&(this.F2t.e3t(!1),this.j2t(!0).catch(this.e8))},i.Xx=function(){this.bJ&&(this.F2t.e3t(!0),this.j2t(!1).catch(this.e8))},i.kn=function(){this.rV.Zg(),this.F2t.mn(aZ.Z$t,this.s3t),this.Vo(),this.Z2t()},Nt(n,[{key:"bJ",get:function(){return this.Ylt===US.CONNECTING||this.Ylt===US.CONNECTED}},{key:"lt",get:function(){return this.JW}},{key:"Ca",get:function(){return this.hu||(this.hu=a$(this,this.F2t)),this.hu}},{key:"B2t",get:function(){var t;return null==(t=this.F2t.U2t())?void 0:t.Q$t()}},{key:"Mc",get:function(){return this.oa?this.oa.h2t:this.o2t},set:function(t){this.o2t=t?oE(t,this.V2t.Cd):void 0,this.oa&&(this.oa.h2t=this.o2t,this.o2t&&this.oa.Un(this.o2t))}},{key:"Ylt",get:function(){return this.Ra},set:function(t){var n=t;this.H2t||n!==US.CONNECTING&&n!==US.CONNECTED||(n=US.AVAILABLE),this.Ra!==n&&(this.Ra=n,this.So(new c$(this.Ylt)))}}]),n}(ih);F(),Et(),Bt(),Dt();var v$=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).hu=void 0,n}Ct(n,t);var i=n.prototype;return i.N2t=function(){Vn.um("Joining a Chromecast session is not possible when JoinStrategy is configured to disabled")},i.M2t=function(){Vn.um("Leaving a Chromecast session is not possible when JoinStrategy is configured to disabled")},i.Tn=function(){Vn.um("Starting a Chromecast session is not possible when JoinStrategy is configured to disabled")},i.Xx=function(){Vn.um("Stopping a Chromecast session is not possible when JoinStrategy is configured to disabled")},i.K2t=function(){return ut.resolve()},i.kn=function(){},Nt(n,[{key:"bJ",get:function(){return!1}},{key:"lt",get:function(){}},{key:"B2t",get:function(){}},{key:"Mc",get:function(){},set:function(t){}},{key:"Ylt",get:function(){return US.UNAVAILABLE}},{key:"Ca",get:function(){return this.hu||(this.hu=a$(this)),this.hu}}]),n}(ih);function d$(t){return{bt:t.bt,MP:t.LP(),ct:t.Nd(),UP:t.UP,lt:t.HP(),WP:t.qP(),$P:t.$P,hx:t.hx,ux:t.ux,Ax:t.Ax,kx:t.kx,Rx:t.Rx,Bx:t.Bx,Mx:t.Mx}}F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et();var l$=function(t){function n(n,i){var r;return(r=t.call(this,n,i)||this).YL=new Jb,r.$L=new Jb,r.Gl=new Zb,r.KL=void 0,r.ZL=new rA,r.JL=new UT,r.qc=void 0,r.KL=new BT(n.mq),r.YL.BI=n.ht,r.$L.BI=n.rt,r.Gl.BI=n.nt,r.ZL.BI=n.zP,r.JL.BI=n.jP,r.qc=new Qx(r),r.qc.BI=n.Jc,r}Ct(n,t);var i=n.prototype;return i.Zst=function(){return this.qc},i.EP=function(){return this.YL},i.GP=function(){return this.ZL},i.QP=function(){return this.JL},i.Aa=function(){return this.KL},i.Ix=function(){return this.Gl},i.Dx=function(){return this.$L},i.switchContexts=function(t){this.oa=t,this.YL.BI=t.ht,this.$L.BI=t.rt,this.Gl.BI=t.nt,this.KL.BI=t.mq,this.ZL.BI=t.zP,this.JL.BI=t.jP,this.qc.BI=t.Jc},i.h3t=function(t){this.oa!==t&&(this._z(),this.switchContexts(t),this.vz())},i.tO=function(t){if(this.oa!==t){var n;this._z(),this.nnt&&(n=d$(this));var i=this.NP(),r=this.Hx(),e=this.Wx();if(this.switchContexts(t),void 0!==n)ST(this,n,d$(this));var s=this.NP();s!==i&&this.So(new IT(s)),this.Hx()!==r&&this.So(new RT),this.Wx()!==e&&this.So(new CT),this.vz()}},i.kn=function(n){var i=this;return Vt(function(){return zt(this,function(r){switch(r.label){case 0:return[4,t.prototype.kn.call(i,n)];case 1:return r.sent(),this.KL.kn(n),this.YL.kn(n),this.$L.kn(n),this.Gl.kn(n),this.ZL.kn(),this.JL.kn(),[4,this.qc.kn(n)];case 2:return r.sent(),[2]}})}).call(this)},Nt(n,[{key:"zP",get:function(){return this.GP()}},{key:"jP",get:function(){return this.QP()}}]),n}(Lb);F(),Et();function w$(t){var n=v.createElement("div");return si(n,"theo-ads-sgai-ima-container"),function(t){t.style.boxSizing="border-box",t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%"}(n),t.appendChild(n),n}function g$(t){var n=t.style;n.boxSizing="border-box",n.position="absolute",n.display="none",n.border="0 solid transparent",n.borderWidth="0px",n.width="100%",n.height="100%"}function _$(t){var n=t.style;n.display="",n.backgroundColor="",n.backgroundRepeat="",n.backgroundAttachment="",n.border="",n.borderWidth="",n.flex="",n.transform="",n.transition="",n.backgroundImage="",n.backgroundSize="",n.backgroundPosition="",n.alignItems="",n.position=""}function m$(t,n,i,r,e){var s=n/i,u=1,o=0,h=0;if(s>=r/e){var c=r/s;o=(e-c)/2,u=c/i}else{var a=e*s;h=(r-a)/2,u=a/n}t.style.left=h/r*100+"%",t.style.top=o/e*100+"%",t.style.width=n*u/r*100+"%",t.style.height=i*u/e*100+"%"}function y$(t){return Uo(t,"theo-ads://dai.break")}function p$(t){return t&&t.integration===mS.THEOADS}var k$=function(t){function n(n,i){var r;return(r=t.call(this,n)||this).o3t=void 0,r.d3t=void 0,r._3t=void 0,r.ta=new yd,r.a3t=void 0,r.f3t=void 0,r.jkt=void 0,r.v3t=void 0,r.g3t=function(t){var n=t.Ht;b$(r.f3t,n)&&(n.Rt=!0)},r.p3t=function(t){var n=t.Ht;b$(r.jkt,n)&&(n.Xk=Hm.Kn)},r.m3t=function(t){var n=t.Ht;b$(r.v3t,n)&&(n.Rt=!0)},r.l3t=function(){r.d3t.ht.mn(Sw.eI,r.g3t),r.d3t.nt.mn(Sw.eI,r.p3t),r.d3t.rt.mn(Sw.eI,r.m3t)},r.d3t=n,r.Cd.cast.strategy!==sA.DISABLED?r.o3t=new f$(r,n,r.Cd.cast,i):r.o3t=new v$,r.VX.IJ(r.o3t),r}Ct(n,t);var i=n.prototype;return i.nu=function(){var n=t.prototype.nu.call(this);return!n&&this.o3t.bJ&&this.o3t.Mc?this.o3t.Mc:n},i.Ta=function(n,i){var r=this;return this.ta.Zo(function(i){return r.a3t=new hr,r.a3t.$g(i),_r(t.prototype.Ta.call(r,n,r.a3t.Yg),r.a3t)},i)},i.Gx=function(){t.prototype.Gx.call(this),this.Cd.cast.strategy!==sA.AUTO||this.o3t.bJ||this.o3t.K2t()},i.J2t=function(t){var n=this;return this.ta.Zo(function(i){return n.u3t(t,i)})},i.i3t=function(t,n){var i=this;return void 0===t&&(t=void 0),void 0===n&&(n=!1),this.ta.Zo(function(r){return i.c3t(t,n,r)})},i.u3t=function(t,n){dr(n),this.d3t.Jc&&this.d3t.Jc.knt(t.Jc),this.l3t(),this.f3t=Ui(this.d3t.ht.II,function(t){return t.Rt}),this.jkt=Ui(this.d3t.nt.II,function(t){return"showing"===t.Xk}),this.v3t=Ui(this.d3t.rt.II,function(t){return t.Rt}),this._3t=t,this._3t.A2t(this.f3t,this.jkt,this.v3t),this.tO(t),this._3t.gr()},i.c3t=function(t,n,i){return Vt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:if(dr(i),void 0===(r=this._3t))return[2];u.label=1;case 1:return u.trys.push([1,5,6,7]),t?[4,this.d3t.Xx()]:[3,4];case 2:return u.sent(),dr(i),e=oE(t,this.d3t.Cd),n&&(e.ads=null==(s=e.ads)?void 0:s.filter(p$)),this.a3t=new hr,this.a3t.$g(i),[4,_r(this.d3t.Ta(e,this.a3t.Yg),this.a3t)];case 3:u.sent(),u.label=4;case 4:return n&&this.d3t.Jc&&r.Jc.knt(this.d3t.Jc),[3,7];case 5:return wr(u.sent()),[3,7];case 6:return r.mr(),this.tO(this.d3t),this.f3t=Ui(this._3t.ht.II,function(t){return t.Rt}),this.jkt=Ui(this._3t.nt.II,function(t){return"showing"===t.Xk}),this.v3t=Ui(this._3t.rt.II,function(t){return t.Rt}),this.d3t.ht.wn(Sw.eI,this.g3t),this.d3t.nt.wn(Sw.eI,this.p3t),this.d3t.rt.wn(Sw.eI,this.m3t),this.d3t.wn(Ey.bM,this.l3t),this._3t===r&&(this._3t=void 0),[7];case 7:return[2]}})}).call(this)},i.Xx=function(){var n,i=this;return this.f3t=void 0,this.jkt=void 0,this.v3t=void 0,this.l3t(),null==(n=this.a3t)||n.Zg(),this.ta.Zo(function(){return t.prototype.Xx.call(i)})},i.kn=function(){var n=this;return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return null==(i=this.a3t)||i.Zg(),this.o3t.kn(),[4,this.i3t()];case 1:return r.sent(),[4,this.ta.kn()];case 2:return r.sent(),[4,t.prototype.kn.call(n)];case 3:return r.sent(),[2]}})}).call(this)},n}(l$);function b$(t,n){return void 0!==t&&void 0!==n&&(t.bs===n.bs&&n.Th===t.Th)}F(),Et(),Wt(),Bt(),Qt();var A$=function(){function t(t){this.q2t=void 0,this.hu=void 0,this.F2t=void 0,this.F2t=t}var n=t.prototype;return n.VY=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.q2t||(this.q2t=this.S3t(t)),[4,this.q2t];case 1:return n.sent(),[2]}})}).call(this)},n.S3t=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.F2t.VY(t)];case 1:return n.sent(),[2]}})}).call(this)},n.z2t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:if(!this.q2t)throw new y("Chromecast must be initialized before starting a session");return[4,this.q2t];case 1:return t.sent(),this.F2t.U2t()?[3,3]:[4,this.F2t.z2t()];case 2:t.sent(),t.label=3;case 3:return[2]}})}).call(this)},n.T3t=function(){this.F2t.e3t(!1)},n.b3t=function(){this.F2t.e3t(!0)},Nt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{initialize:function(n){var i=t.VY(uA(n));return i.catch(di),i},startSession:function(){var n=t.z2t();return n.catch(di),n},endSession:function(){t.b3t()}}}(this)),this.hu}}]),t}();var T$=new vZ,S$=new A$(T$),E$={get chromecast(){return S$.Ca}};zb(function(t){return new k$(t,T$)},Hb.ant),F(),Et(),F(),Et(),F(),Et(),F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et(),Wt(),Qt();var I$=function(){function t(t){this.N3t=void 0,this.R3t=void 0,this.D3t=void 0,this.N3t=t,this.R3t=Ju(),this.D3t=Ju()}var n=t.prototype;return n.k3t=function(t,n,i,r){var e=this;t.Uz.forEach(function(t){if(!e.E3t(t.P3t)){var s=t.x3t(n,i,r);s&&e.I3t(s)}})},n.E3t=function(t){return this.R3t.get(t)},n.I3t=function(t){this.R3t.set(t.C3t,t),this.D3t.set(t.C3t,t.B3t),this.N3t.au(t.M3t)},n.Ent=function(t){this.D3t.has(t.C3t)||(this.D3t.set(t.C3t,t),this.N3t.au(t.M3t))},n.L3t=function(t){return this.D3t.forEach(t)},n.O3t=function(t){return this.R3t.forEach(t)},n.F3t=function(t){var n=!1;return this.R3t.forEach(function(i){n=i.F3t(t)||n}),n},n.kn=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return t=[],this.R3t.forEach(function(n){return t.push(n.kn())}),this.D3t.forEach(function(n){return t.push(n.kn())}),[4,ut.all(t)];case 1:return n.sent(),this.R3t.clear(),this.D3t.clear(),[2]}})}).call(this)},t}();F(),Et(),Dt();var R$=function(t){function n(n,i,r,e){var s;return(s=t.call(this,"H3t")||this).QJt=void 0,s.Py=void 0,s.Ky=void 0,s.Mc=void 0,s.QJt=n,s.Py=i,s.Ky=r,s.Mc=e,s}return Ct(n,t),n.prototype.xa=function(){return new C$(this.QJt,this.Py,this.Ky,this.Mc)},n.U3t=function(t){return new n(EJ.GENERAL,t.Py,t.YJt)},n.V3t=function(t,i){return new n(t.QJt,t.message,t.YJt,i)},n}(kw),C$=function(t){function n(n,i,r,e){var s;return(s=t.call(this,"aderror")||this).problemType=void 0,s.message=void 0,s.errorCode=void 0,s.source=void 0,s.problemType=n,s.message=i,s.errorCode=r,s.source=e,s}return Ct(n,t),n}(rh),D$=function(t){function n(n){var i;return(i=t.call(this)||this).Q3t=void 0,i.q3t=void 0,i.X3t=!1,i.n7=!1,i.hu=void 0,i.Y3t=function(t){if(i.X3t&&t.Ky!==IJ.VAST_NO_ADS_AFTER_WRAPPER&&t.Ky!==IJ.VAST_EMPTY_RESPONSE){var n=new ug(sg.ADVERTISEMENT_ERROR,t.Py),r=new fd(cd.AD_BLOCKER_DETECTED,t.Py+" Turn off your AdBlocker and try again.",n);i.Q3t.qq(r)}},i.Wet=function(){i.n7=!0},i.Q3t=n,i.q3t=new I$(i),i.wn("H3t",i.Y3t),n.wn(eh.uo,i.Wet),i}Ct(n,t);var i=n.prototype;return i.knt=function(t){this.z3t(function(n){n.knt(t)})},i.M6=function(t,n,i){try{this.X3t=i;var r=yS.Ng.Wz(t);if(r.P3t===UZ.ont)return;var e=this.q3t.E3t(r.P3t);if(!e)throw new SJ(EJ.ADBLOCK,void 0,"Ads could not be loaded.");n!==Sx.pnt&&this.n7||this.Q3t.j3t(e),r.M6(t,n,e,this.X3t)}catch(n){0,this.So(R$.V3t(n,t.sources))}},i.rD=function(){this.z3t(function(t){t.rD()})},i.Snt=function(t){this.z3t(function(n){n.Snt(t)})},i.Ent=function(t){this.q3t.Ent(t)},i.Tnt=function(t,n){return this.Q3t.Tnt(t,n)},i.K3t=function(t){this.q3t.O3t(function(n){n.K3t(t)})},i.F3t=function(t){return this.q3t.F3t(t)},i.z3t=function(t){return this.q3t.L3t(t)},i.qx=function(){this.q3t.O3t(function(t){return t.qx()})},i.hr=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return this.n7=!1,t=[],this.q3t.O3t(function(n){return t.push(n.Xx())}),[4,ut.all(t)];case 1:return n.sent(),[2]}})}).call(this)},i.kn=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),[4,this.q3t.kn()];case 1:return t.sent(),this.Q3t.mn(eh.uo,this.Wet),this.mn("H3t",this.Y3t),[2]}})}).call(this)},Nt(n,[{key:"W3t",get:function(){return this.q3t}},{key:"zc",get:function(){var t=!1;return this.z3t(function(n){t=t||n.G3t}),t}},{key:"mnt",get:function(){var t=[];return this.z3t(function(n){var i,r=n.mnt;r.length&&(i=t).push.apply(i,[].concat(r))}),t}},{key:"ynt",get:function(){var t=null;return this.z3t(function(n){null!=t||(t=n.ynt)}),t}},{key:"Ant",get:function(){var t=[];return this.z3t(function(n){var i;(i=t).push.apply(i,[].concat(n.Ant))}),t}},{key:"bnt",get:function(){var t=[];return this.z3t(function(n){var i;(i=t).push.apply(i,[].concat(n.bnt))}),t}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=Ex(this)}}]),n}(DI);F(),Et(),Wt(),Bt(),Ut(),Qt(),F(),Et(),Bt(),Dt(),F(),Et(),Bt(),Dt();var P$=function(t){function n(n){var i;return(i=t.call(this)||this).UZt=void 0,i.qc=void 0,i.J3t=void 0,i.Z3t=void 0,i.$3t=void 0,i.i4t=void 0,i.UZt=n,i.qc=[],i.J3t=-1,i.Z3t=-1,i.$3t=void 0,i.i4t=!1,i}Ct(n,t);var i=n.prototype;return i.t4t=function(){this.i4t=!0},i.e4t=function(t){this.qc.push(t),this.i4t=!1},i.s4t=function(t){Xi(this.qc,t)},Nt(n,[{key:"Jc",get:function(){return this.qc}},{key:"p0t",get:function(){return this.J3t},set:function(t){this.J3t=t}},{key:"m0t",get:function(){return this.Z3t},set:function(t){this.Z3t=t}},{key:"_Ot",get:function(){return this.UZt},set:function(t){this.UZt=t}},{key:"X$t",get:function(){return this.$3t}},{key:"_x",get:function(){return this.i4t}}]),n}(DZ),N$=function(t){function n(n,i){var r;return(r=t.call(this,i.timeOffset)||this).n4t=void 0,r.r4t=[],r.n4t=n,r.er(i),r}Ct(n,t);var i=n.prototype;return i.er=function(t){void 0!==t.maxDuration&&(this.J3t=t.maxDuration),void 0!==t.customData&&(this.$3t=t.customData)},i.h4t=function(t){var n=this.qc.indexOf(t);return n>=0&&n=.25&&this.M3t.So(new j$(t,e)),i<.5&&r>=.5&&this.M3t.So(new Y$(t,e)),i<.75&&r>=.75&&this.M3t.So(new J$(t,e))},n.o4t=function(t){ji(this.W4t,t)||(this.W4t.push(t),t.od.o4t(t),this.z4t(t.od),this.M3t.So(new Wx(t,this.Q3t.LP())))},n.p$t=function(t){if(ji(this.W4t,t)){var n=t.od.h4t(t);this.M3t.So(new H$(t,t.y4t)),this.G4t(t,n)}},n.M4t=function(t){if(ji(this.W4t,t)){var n=t.od.h4t(t);this.M3t.So(new Xx(t,this.Q3t.LP())),this.G4t(t,n)}},n.s4t=function(t){if(ji(this.qc,t)){var n=t.od.h4t(t);Xi(this.qc,t),t.od.s4t(t),this.M3t.So(new q$(t.od)),this.G4t(t,n)}},n.L4t=function(t){var n=new N$(this.MZt,t);return this.X0t.push(n),this.M3t.So(new Nx(n)),n},n.O4t=function(t,n){t.er(n),this.M3t.So(new z$(t))},n.F4t=function(t){if(ji(this.X0t,t)){for(var n,i=Lt(t.Jc.slice());!(n=i()).done;){var r=n.value;this.s4t(r)}Xi(this.X0t,t),this.M3t.So(new Dx(t))}},n.U4t=function(){for(var t,n=Lt(this.X0t.slice());!(t=n()).done;){var i=t.value;this.F4t(i)}},n.V4t=function(t){this.M3t.So(new R$(EJ.GENERAL,t.message))},n.H4t=function(t,n){var i=new fd(null!=n?n:cd.AD_ERROR,t.message,t);this.Q3t.qq(i)},n.X4t=function(t){return Ui(this.X0t,function(n){return n._Ot===t})},n.q4t=function(t){var n;return null!=(n=this.X4t(t.timeOffset))?n:this.L4t(t)},n.G4t=function(t,n){Xi(this.W4t,t);var i=t.od;0!==this.W4t.length||this.G0t!==i||n||(i.t4t(),this.z4t(void 0))},n.z4t=function(t){this.G0t!==t&&(void 0!==this.G0t&&this.M3t.So(new Ux(this.G0t)),this.G0t=t,void 0!==t&&this.M3t.So(new Vx(t)))},n.B4t=function(t){var n=Ui(this.qc,function(n){return n.wnt()===t});if(void 0===n)throw new y('Invalid ad for integration "'+this.MZt+'"');return n},n.C4t=function(t){var n=Ui(this.X0t,function(n){return n.wnt()===t});if(void 0===n)throw new y('Invalid ad break for integration "'+this.MZt+'"');return n},n.Ta=function(t,n){return Vt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:return dr(n),(null==(i=this.h8)?void 0:i.setSource)?[4,ut.resolve(this.h8.setSource(t))]:[3,2];case 1:return jS(r=e.sent())&&(r=t),[2,oE(r,this.Q3t.Cd)];case 2:return[2,t];case 3:return[2]}})}).call(this)},n.j4t=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return(null==(t=this.h8)?void 0:t.resetSource)?[4,ut.resolve(this.h8.resetSource())]:[3,2];case 1:return n.sent(),[3,3];case 2:this.U4t(),n.label=3;case 3:return[2]}})}).call(this)},n.kn=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return(null==(t=this.h8)?void 0:t.destroy)?[4,ut.resolve(this.h8.destroy()).catch(di)]:[3,2];case 1:n.sent(),n.label=2;case 2:return this.U4t(),this.z4t(void 0),this.h8=void 0,this.M3t.kn(),[2]}})}).call(this)},Nt(t,[{key:"Jc",get:function(){return this.qc}},{key:"A0t",get:function(){return this.X0t}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get integration(){return t.MZt},get ads(){return t.Jc.map(function(t){return t.wnt()})},get adBreaks(){return t.A0t.map(function(t){return t.wnt()})},createAd:function(n,i){return t.R4t(n,i?t.C4t(i):void 0).wnt()},updateAd:function(n,i){t.D4t(t.B4t(n),i)},updateAdProgress:function(n,i){var r=Ti(Number(i),0,1);t.N4t(t.B4t(n),r)},beginAd:function(n){t.o4t(t.B4t(n))},endAd:function(n){t.M4t(t.B4t(n))},skipAd:function(n){t.p$t(t.B4t(n))},removeAd:function(n){t.s4t(t.B4t(n))},createAdBreak:function(n){return t.L4t(n).wnt()},updateAdBreak:function(n,i){t.O4t(t.C4t(n),i)},removeAdBreak:function(n){t.F4t(t.C4t(n))},removeAllAds:function(){t.U4t()},error:function(n){t.V4t(n)},fatalError:function(n,i){var r=i?Number(i):void 0;t.H4t(n,r)}}}(this)}},{key:"rB",get:function(){return this.h8},set:function(t){this.h8=t}},{key:"G3t",get:function(){return this.W4t.some(function(t){return t.l4t===B$.hZt})}},{key:"C3t",get:function(){return this.MZt}},{key:"mnt",get:function(){return this.W4t}},{key:"ynt",get:function(){var t;return null!=(t=this.G0t)?t:null}},{key:"Ant",get:function(){return Ji(this.X0t,function(t){return t.Ant})}},{key:"bnt",get:function(){return this.X0t.filter(function(t){return!t._x})}}]),t}();F(),Et(),Bt();var t0=function(){function t(t){var n=this;this.oa=void 0,this.J8=void 0,this.Q4t=!1,this.Ed=function(t){1!==n.oa.ux&&(n.J8=n.oa.ux,n.oa.ux=1),n.Q4t=!0},this.Bd=function(t){n.Q4t=!1,void 0!==n.J8&&(n.oa.ux=n.J8,n.J8=void 0)},this.oa=t,this.addAdListeners()}var n=t.prototype;return n.destroy=function(){this.removeAdListeners()},n.addAdListeners=function(){var t,n;null==(t=this.oa.Jc)||t.wn("Dnt",this.Ed),null==(n=this.oa.Jc)||n.wn("Cnt",this.Bd)},n.removeAdListeners=function(){var t,n;null==(t=this.oa.Jc)||t.mn("Dnt",this.Ed),null==(n=this.oa.Jc)||n.mn("Cnt",this.Bd)},Nt(t,[{key:"player",get:function(){return this.oa},set:function(t){this.oa&&this.removeAdListeners(),this.oa=t,this.addAdListeners()}},{key:"inAdBreak",get:function(){return this.Q4t}}]),t}(),n0=function(t){function n(n,i){var r;return(r=t.call(this,n)||this).K4t=void 0,r.d3t=void 0,r.t5t=[],r.J4t=void 0,r.Z4t=void 0,r.JW=void 0,r.Lz=void 0,r.e5t=void 0,r.i5t=1,r.d3t=n,r.K4t=new D$(r),r.K4t.W3t.k3t(i,n,r,n.Cd),r}Ct(n,t);var i=n.prototype;return i.Zst=function(){return this.K4t},i.qx=function(){this.d3t.qx(),this.K4t.qx()},i.Gx=function(){void 0===this.JW?(void 0!==this.Z4t&&this.$4t(this.Z4t),t.prototype.Gx.call(this)):this.So(new _b(this.JW))},i.Ta=function(n,i){var r=this;return Vt(function(){var e,s,u,o,h,c,a;return zt(this,function(f){switch(f.label){case 0:if(dr(i),!(e=n))return[3,4];s=Lt(this.t5t),f.label=1;case 1:return(u=s()).done?[3,4]:[4,u.value.Ta(e,i)];case 2:e=f.sent(),f.label=3;case 3:return[3,1];case 4:return[4,t.prototype.Ta.call(r,e,i)];case 5:if(f.sent(),dr(i),null==e?void 0:e.ads)for(o=Boolean(e.blockContentIfAdError),this.K4t.K3t(e.playAdsAfterTime),h=Lt(e.ads);!(c=h()).done;)a=c.value,this.K4t.M6(a,Sx.pnt,o);return[2]}})}).call(this)},i.Xx=function(){var n=this;return Vt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:return this.JW=void 0,this.Lz=void 0,[4,this.K4t.hr()];case 1:return e.sent(),this.i3t(),[4,t.prototype.Xx.call(n)];case 2:e.sent(),i=Lt(this.t5t),e.label=3;case 3:return(r=i()).done?[3,6]:[4,r.value.j4t()];case 4:e.sent(),e.label=5;case 5:return[3,3];case 6:return[2]}})}).call(this)},i.$4t=function(t){this.i5t=this.oa.ux;var n=this.oa.Mx,i=this.oa.$P;t.Ox(n),t.ix(i),this.J4t=t,this.Z4t=void 0,this.tO(t)},i.j3t=function(t){void 0===this.J4t&&(this.Z4t=t)},i.i3t=function(){this.Z4t=void 0,void 0!==this.J4t&&(this.d3t.ux=this.i5t,this.d3t.Mx=this.Mx,this.d3t.$P=this.$P,this.tO(this.d3t),this.J4t=void 0)},i.HP=function(){var n;return null!=(n=this.Lz)?n:t.prototype.HP.call(this)},i.qP=function(){var n;return null!=(n=this.JW)?n:t.prototype.qP.call(this)},i.qq=function(t){void 0===this.qP()&&(this.JW=t,this.Lz=hg(t),this.So(new _b(t)))},i.$x=function(t){return void 0===this.J4t&&this.K4t.F3t(t)},i.Tnt=function(t,n){try{var i=new $$(t,this);i.rB=n(i.Ca),this.K4t.Ent(i),this.t5t.push(i),t!==mS.UPLYNK&&(this.e5t=new t0(this))}catch(n){this.K4t.So(new R$(EJ.GENERAL,'Error while constructing ad integration "'+t+'": '+n+'"'))}},i.vx=function(n){var i;(null==(i=this.e5t)?void 0:i.inAdBreak)||t.prototype.vx.call(this,n)},i.kn=function(){var n=this;return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:r=Lt(this.t5t),s.label=1;case 1:return(e=r()).done?[3,4]:[4,e.value.kn().catch(di)];case 2:s.sent(),s.label=3;case 3:return[3,1];case 4:return[4,this.K4t.kn()];case 5:return s.sent(),this.i3t(),null==(i=this.e5t)||i.destroy(),this.e5t=void 0,[4,t.prototype.kn.call(n)];case 6:return s.sent(),[2]}})}).call(this)},Nt(n,[{key:"Y4t",get:function(){return this.J4t}}]),n}(l$);zb(function(t){return new n0(t,yS.Ng)},Hb.rnt),F(),Et(),Bt(),F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Qt();var i0=On.ru&&On.Q_<12,r0=function(t){function n(n,i){var r;return(r=t.call(this,n,!0)||this).Q3t=void 0,r.o5t=void 0,r.$L=void 0,r.YL=void 0,r.Gl=void 0,r.ZL=void 0,r.JL=void 0,r.s5t=void 0,r.ha=void 0,r.rq=void 0,r.a5t=void 0,r.u5t=void 0,r.Q3t=i,r.o5t=!1,r.$L=new ng,r.YL=new ng,r.Gl=new Qm,r.ZL=new $b,r.JL=new xT,r.s5t=new DI,r.ha=new ZT,r.rq=new Cb,r.a5t=function(){r.oa.be()},r.u5t=function(){r.c5t()},r.oa.wn(eh.xw,r.Rs),r}Ct(n,t);var i=n.prototype;return i.Hst=function(){return this.oa.Hst()},i.RP=function(){return TA.iL()._s()},i.DP=function(){},i.BP=function(t){},i.lx=function(){return 1},i.vx=function(t){},i.gx=function(){return new TA([0,this.MP])._s()},i.Ex=function(){return!1},i.Ix=function(){return this.Gl},i.Dx=function(){return this.$L},i.ds=function(){return this.Hx().ds},i.Hx=function(){return this.ha},i.Ea=function(){},i.kn=function(){return Vt(function(){return zt(this,function(t){return this.Vo(),this.YL.kn(),this.$L.kn(),this.Gl.kn(),this.s5t.kn(),this.oa.mn(eh.xw,this.Rs),[2]})}).call(this)},i.n5t=function(){i0&&this.r5t(),this.G3t||this.Q3t.$4t(this)},i.i3t=function(){this.G3t&&(i0&&this.h5t(),On.Tg&&this.xe.querySelectorAll("video[src]").forEach(function(t){t.src=""}),Vn.Zs.Ep&&this.oa.Jx(),this.Q3t.i3t())},i.r5t=function(){this.o5t||(f.addEventListener("blur",this.a5t),f.addEventListener("focus",this.u5t),this.o5t=!0)},i.h5t=function(){f.removeEventListener("blur",this.a5t),f.removeEventListener("focus",this.u5t),this.o5t=!1},i.c5t=function(){var t=this;requestAnimationFrame(function(){return t.oa.we()})},Nt(n,[{key:"MP",get:function(){return this.LP()},set:function(t){this.OP(t)}},{key:"ct",get:function(){return this.Nd()}},{key:"zP",get:function(){return this.ZL}},{key:"jP",get:function(){return this.JL}},{key:"Sx",get:function(){return this.Tx()}},{key:"Fx",get:function(){return this.rq}},{key:"M3t",get:function(){return this.s5t}},{key:"ht",get:function(){return this.YL}},{key:"G3t",get:function(){return this.Q3t.Y4t===this}}]),n}(Lb);F(),Et(),Wt(),Bt(),Ut(),Qt(),F(),Et(),Bt(),Ut();var e0=0,s0="theoplayer-wrapper",u0=function(){function t(n,i,r,e){this.l5t=void 0,this.oa=void 0,this.p5t=void 0,this.T5t=void 0,this.y5t=void 0,this.k5t=void 0,this.x5t=void 0,this.R5t=void 0,this.C5t=void 0,this.b5t=void 0,this.B5t=void 0,this.Bst=void 0,this.Tz=void 0,this.v5t=void 0,this.L5t=void 0,this.jI=void 0,this.l5t=i,this.oa=r,this.p5t=e,this.k5t=NaN,this.x5t=!1,this.R5t=!1,this.b5t=!1,this.B5t=[],this.Bst=!1,this.Tz=!1,this.v5t=[],this.jI=++e0,this.L5t=n.timeOffset,this.T5t=t.Z5t(this.L5t),this.E5t(),this.v5t.push(n)}var n=t.prototype;return n.m5t=function(t){var n=this.w5t===t.timeOffset;return!this.y5t&&n},n.E5t=function(){if(S(this.k5t)){var t=this.w5t;if(void 0===t)return void(this.k5t=0);if("string"==typeof t&&JJ(t)){var n=this.oa.Nd();S(n)||n===1/0||(t=LK(t)*n)}S(t)||(this.k5t=t)}},n.N5t=function(t){this.B5t.push(t)},n.M5t=function(){if(!this.y5t){var t,n,i=this.l5t===Sx.pnt&&void 0===this.L5t&&1===this.v5t.length,r=this.v5t[0];if(!i&&1===this.v5t.length){var e=Vn.Dh(r.sources.src).searchParams.get("output");e&&e.toLowerCase().indexOf("vmap")>-1&&(i=!0,void 0!==this.L5t&&We("Do not set a timeOffset for VMAP ad sources. VMAP ads have their own offsets included."))}if(jJ(r.sources.type)||i)t=r.sources.src;else{if(S(this.oa.Nd())&&"end"===this.O5t())return;n=this.F5t()}var s=this.oa.Nd();(S(s)||s===1/0)&&(s=-3),this.y5t={U5t:this.oa.xe.offsetWidth,V5t:this.oa.xe.offsetHeight,H5t:this.oa.xe.offsetWidth,W5t:this.oa.xe.offsetHeight,q5t:this.Bst,z5t:this.Tz,G5t:t,X5t:n,j5t:r.omidAccessModeRules,Q5t:s}}return this.y5t},n.F5t=function(){var t=this;return''+this.v5t.map(function(n,i){return t.K5t(n.sources,i)}).join("\n")+""},n.K5t=function(t,n){var i=this.O5t(),r=t.src;return'"},n.O5t=function(){if(0===this.w5t)return"start";if(this.w5t===1/0)return"end";var t=this.w5t;if("string"==typeof t&&JJ(t)){var n=LK(t)*this.oa.Nd();return MJ.DZt(n)}return MJ.DZt(this.w5t||0)},n.Y5t=function(t){this.v5t.push(t)},n.J5t=function(t){for(var n,i=s0+"-"+this.jI+"-",r=Lt(t);!(n=r()).done;){var e=n.value;if(Uo(e,i)){var s=Number(e.slice(i.length));if(!S(s)&&s>=0&&st.dd&&this.t6t.dd!==t.dd},n.r6t=function(t){if(t.length)return t.sort(function(t,n){return t.dd-n.dd})[0]},n.h6t=function(){if(this.Ant.length)return this.r6t(this.o6t(this.t.LP()))},n.a6t=function(){var t=this;if(!(void 0!==this.s6t&&this.s6t>=0))return this.Ant.filter(function(n){return!n.P5t&&0===n.dd&&n!==t.t6t})[0]},n.o6t=function(t){var n=this;if(!this.u6t&&(this.u6t=!this.Ant.some(function(t){return S(t.dd)}),!this.u6t))return[];var i=this.Ant.filter(function(n){return!n.P5t&&(n._5t||!S(n.dd)&&t<=n.dd)});return void 0===this.s6t?i:i.filter(function(t){return t._5t||void 0===t.w5t||t.dd>n.s6t})},Nt(t,[{key:"t6t",get:function(){return this.i6t.t6t}},{key:"e6t",get:function(){return this.i6t.e6t}},{key:"Ant",get:function(){return this.i6t.Ant}},{key:"t",get:function(){return this.i6t.t}}]),t}(),h0=function(t){return t[t.c6t=0]="c6t",t[t.d6t=1]="d6t",t[t.l6t=2]="l6t",t}({}),c0=function(){function t(t,n,i,r,e){var s=this;this.y6t=void 0,this.r4t=void 0,this.f6t=void 0,this.ko=void 0,this.oa=void 0,this.Q3t=void 0,this.M6t=void 0,this.x6t=void 0,this.N6t=void 0,this.Mst=void 0,this.A6t=0,this.Dpt=void 0,this.m6t=void 0,this.L6t=!1,this.uX=function(){for(var t,n=Lt(s.r4t.filter(function(t){return t.S5t}));!(t=n()).done;){var i=t.value;i.E5t();var r=i.w5t;s.m6t.U6t(r,i.dd)}s.ko&&s.O6t&&s.v6t()},this.r4t=[],this.y6t=t,this.ko=!1,this.f6t=!1,this.oa=n,this.Q3t=i,this.t6t=void 0,this.x6t=0,this.N6t=new o0(this),this.Mst=r,this.m6t=e,this.oa.wn(eh.Rw,this.uX)}var n=t.prototype;return n.qx=function(){this.ko=!0,this.f6t&&this.v6t()},n._6t=function(t,n){this.g6t(t,n);var i=Ui(this.Ant,function(n){return n.m5t(t)});if(i)i.Y5t(t);else{var r,e=new u0(t,n,this.oa,null==(r=t.replaceContent)||r);this.r4t.push(e),2===this.p6t&&this.m6t.L4t(e.dd,e,e.w5t),this.w6t(n,e)}},n.b6t=function(){if(Xi(this.Ant,this.t6t),this.t6t){for(var t,n=Lt(this.t6t.D5t);!(t=n()).done;){t.value;this.m6t.S6t()}this.t6t=void 0}},n.T6t=function(){for(var t,n=Lt(this.r4t);!(t=n()).done;)for(var i,r=Lt(t.value.D5t);!(i=r()).done;){var e=i.value;this.m6t.k6t(e,!0)}Yi(this.r4t)},n.E6t=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.b6t(),this.P6t=!0,this.t6t=t,this.x6t=t.dd,this.Dpt=this.I6t(t),[4,this.Dpt];case 1:return n.sent(),this.Dpt=void 0,[2]}})}).call(this)},n.I6t=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:return[4,this.R6t(t)];case 1:if(r.sent(),!(n=t.M5t()))return this.P6t=!1,this.t6t=void 0,[2];i=this.y6t.C6t(n),t.P5t=!0,r.label=2;case 2:return r.trys.push([2,4,,6]),[4,i];case 3:return r.sent(),t.d5t===Sx.gnt&&this.y6t.D6t(),[3,6];case 4:return r.sent(),this.t6t=void 0,[4,this.v6t()];case 5:return r.sent(),[3,6];case 6:return[2]}})}).call(this)},n.R6t=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return t.$P=this.Q3t.$P,this.Q3t.cO?[4,this.Mst.HK(this.Q3t.$P)]:(t.cO=!1,[2]);case 1:switch(n.sent()){case"all":case"muted":t.cO=!0;break;case"none":t.cO=!1}return[2]}})}).call(this)},n.B6t=function(){var t;return null!=(t=this.N6t.a6t())?t:this.N6t.h6t()},n.v6t=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return this.t6t&&!this.t6t.A5t?[2,this.Dpt]:(t=this.B6t())?[4,this.E6t(t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(this)},n.hr=function(){this.b6t(),Yi(this.r4t),this.x6t=0,this.t6t=void 0,this.Dpt=void 0,this.P6t=!1},n.I5t=function(){this.P6t=!1,this.t6t&&(this.t6t.I5t=!0)},n.w6t=function(t,n){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return t===Sx.gnt&&this.ko&&this.N6t.n6t(n)?this.RGt||"linear"===this.y6t.l4t||!(!this.t6t||this.t6t&&this.t6t.P5t)?[3,3]:[4,ut.resolve()]:[3,3];case 1:return i.sent(),[4,this.E6t(n)];case 2:i.sent(),i.label=3;case 3:return[2]}})}).call(this)},n.$5t=function(){this.t6t&&this.t6t.$5t()},n.F6t=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return this.O6t?(t=this.B6t())?[4,this.E6t(t)]:[3,2]:[2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(this)},n.g6t=function(t,n){var i=t.sources.type,r=n===Sx.pnt&&void 0===t.timeOffset,e=jJ(i)||r?1:2;e!==this.A6t&&(this.A6t=e,this.T6t(),this.y6t.w0t&&!this.RGt&&"linear"!==this.y6t.l4t&&(this.y6t.w0t.zg(),this.t6t=void 0,this.Dpt=void 0),this.x6t=0,this.f6t=!0)},n.K3t=function(t){this.N6t.K3t(t)},n.kn=function(){this.oa.mn(eh.Rw,this.uX)},Nt(t,[{key:"e6t",get:function(){return this.y6t}},{key:"Ant",get:function(){return this.r4t}},{key:"t",get:function(){return this.oa}},{key:"RGt",get:function(){return Boolean(this.Dpt)}},{key:"p6t",get:function(){return this.A6t}},{key:"t6t",get:function(){return this.M6t},set:function(t){this.M6t=t}},{key:"P6t",get:function(){return this.L6t},set:function(t){this.L6t=t}},{key:"O6t",get:function(){var t=this;return!this.RGt&&!this.P6t&&(!(this.t6t&&!this.t6t.A5t)&&(!!this.r4t.filter(function(n){return t.t6t!==n}).length&&Boolean(this.B6t())))}}]),t}();F(),Et(),Wt(),Dt(),Qt(),F(),Et();var a0=function(t){return t.V6t="contentResumeRequested",t.H6t="contentPauseRequested",t.W6t="click",t.Rw="durationChange",t.q6t="expandedChanged",t.z6t="start",t.G6t="impression",t.Gz="pause",t.X6t="resume",t.j6t="adProgress",t.Q6t="adBuffering",t.K6t="firstQuartile",t.mJt="midpoint",t.Y6t="thirdQuartile",t.wJt="complete",t.J6t="userClose",t.Z6t="linearChanged",t.$6t="loaded",t.t8t="adCanPlay",t.i8t="adMetadata",t.e8t="adBreakReady",t.s8t="interaction",t.n8t="allAdsCompleted",t.r8t="skip",t.h8t="skippableStateChanged",t.o8t="log",t.a8t="viewableImpression",t.u8t="volumeChange",t.c8t="mute",t}({});F(),Et();var f0=function(t){return t.d8t="adError",t}({});F(),Et();var v0=function(t){return t[t.l8t=-1]="l8t",t[t.f8t=-1]="f8t",t[t.v8t=-1]="v8t",t[t._8t=101]="_8t",t[t.g8t=102]="g8t",t[t.p8t=200]="p8t",t[t.m8t=201]="m8t",t[t.w8t=202]="w8t",t[t.y8t=300]="y8t",t[t.A8t=301]="A8t",t[t.b8t=302]="b8t",t[t.S8t=303]="S8t",t[t.T8t=400]="T8t",t[t.k8t=402]="k8t",t[t.E8t=403]="E8t",t[t.P8t=405]="P8t",t[t.x8t=500]="x8t",t[t.I8t=501]="I8t",t[t.R8t=-1]="R8t",t[t.C8t=503]="C8t",t[t.D8t=602]="D8t",t[t.B8t=900]="B8t",t[t.N8t=901]="N8t",t[t.M8t=1005]="M8t",t[t.L8t=1007]="L8t",t[t.O8t=1009]="O8t",t[t.F8t=1010]="F8t",t[t.U8t=1011]="U8t",t[t.V8t=1012]="V8t",t[t.H8t=1013]="H8t",t[t.W8t=1020]="W8t",t[t.q8t=1021]="q8t",t[t.z8t=1101]="z8t",t[t.G8t=1204]="G8t",t[t.X8t=1205]="X8t",t[t.j8t=1300]="j8t",t[t.Q8t=-1]="Q8t",t[t.K8t=-1]="K8t",t[t.Y8t=-1]="Y8t",t[t.J8t=-1]="J8t",t}({}),d0=function(t){return t.Z8t="adLoadError",t.$8t="adPlayError",t}({});function l0(t,n){if(t===a0.j6t){var i=n;return{t7t:i.adBreakDuration,i7t:i.adPosition,MP:i.currentTime,ct:i.duration,e7t:i.totalAds}}return n}function w0(t){switch(t){case google.ima.AdError.Type.AD_LOAD:return d0.Z8t;case google.ima.AdError.Type.AD_PLAY:return d0.$8t}}function g0(t){return zn(t)&&Kn(t.getVastErrorCode)}function _0(t){var n=t.getInnerError(),i=n&&g0(n)?_0(n):void 0;return{Py:t.getMessage(),YJt:t.getErrorCode(),s7t:t.getVastErrorCode(),Km:w0(t.getType()),n7t:i}}function m0(t){if(Un(t))return t}F(),Et(),F(),Et();var y0=function(t){function n(n,i,r){var e,s;return e=t.call(this)||this,(s=e).y6t=void 0,s.oa=void 0,s.A7t=void 0,s.s9t=void 0,s.$7t=void 0,s.t9t=void 0,s.y0t=void 0,s.C7t=void 0,s.M7t=void 0,s.L7t=void 0,s.o7t=void 0,s.c7t=void 0,s.d7t=void 0,s.l7t=void 0,s.f7t=void 0,s.v7t=void 0,s._7t=void 0,s.g7t=void 0,s.a7t=void 0,s.u7t=void 0,s.y6t=n,s.oa=i,s.A7t=r,s.s9t=!1,s.$7t=void 0,s.t9t=void 0,s.C7t=0,s.M7t=function(t){if(t.Int&&t.Int.V7t){var n=t.Int.V7t;s.A7t.O4t(n._Ot,n.e7t,n.p0t)}},s.L7t=function(t){var n,i,r;if(!(s.C7t>=5)){s.C7t++;var e=t.S7t;if(function(t){return zn(t)&&void 0!==t.t7t&&void 0!==t.e7t}(e)){var u=null==(r=s.y0t)||null==(i=r.O7t())||null==(n=i.V7t)?void 0:n._Ot;void 0!==u&&s.A7t.O4t(u,e.e7t,e.t7t)}}},s.o7t=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return t.S7t.n9t?[4,s.P7t(t.S7t.n9t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})()},s.c7t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return s.s9t=!0,s.y6t.$5t(),[4,s.u7t()];case 1:return t.sent(),[2]}})})()},s.d7t=function(t){if(t.Int){0;var n=t.Int;s.y6t.G7t(n),s.y6t.be(),s.y6t.r9t(),s.y6t.h9t=!0,s.A7t.o9t(n);var i=n.ct;if(s.b7t(i),n.D7t){var r=s.y6t.MP,e=s.y6t.Ax;s.y6t.i5(Cy.WL),s.r7t(new Py(r,e)),s.r7t(new By(r,e)),s.r7t(new xy(r,e)),s.y6t.hx||s.r7t(new Oy(s.y6t.MP)),s.setCountdownTimer(),s.m7t(!0)}else s.y6t.i3t(),s.oa.be(),s.y6t.hx||s.oa.Gx()}},s.l7t=function(t){var n;if(t.Int){0;var i=t.Int;if(s.vm(),s.A7t.z7t(s.y6t.ct,i.D7t),s.y6t.Ax!==Cy.VL){var r=Cy.VL;s.y6t.i5(r);var e=s.y6t.MP;s.r7t(new oT(e,r))}s.b7t(NaN),s.y6t.h9t=!1,null==(n=s.y0t)||n.Ox(s.y6t.B7t())}},s.f7t=function(t){t.Int&&(s.l7t(t),s.A7t.f7t(t.Int,s.y6t.MP,s.y6t.ct))},s.v7t=function(t){t.Int&&(s.A7t.z7t(-1,t.Int.D7t),s.y6t.$5t(),!t.Int.D7t&&s.y6t.O6t()&&s.y6t.F6t())},s._7t=function(t){t.Int&&(t.Int.D7t?s.y6t.zx():s.oa.zx())},s.g7t=function(){var t;(s.y6t.h9t=!0,s.y6t.a9t)&&(null==(t=s.y0t)||t.zx(),s.y6t.a9t=!1)},s.a7t=function(t){var n;if(t.Int){0,s.y6t.Z7t&&(s.t9t=s.oa.LP(),s.oa.Yx(),s.oa.Vx=!0),s.y6t.u9t=!0;var i=t.Int;s.A7t.Ed(i);var r=i.ct;s.y6t.G7t(i),s.b7t(r),s.y6t.p7t(!1),s.y6t.be(),s.y6t.n5t(),s.y6t.Z7t||s.oa.we(),s.oa.zx(),s.y6t.c9t(i),0===(null==(n=i.V7t)?void 0:n._Ot)||s.y6t.So(new Ny(s.y6t.MP))}},s.u7t=function(t){return Vt(function(){var n,i,r,e,u;return zt(this,function(o){switch(o.label){case 0:return n=null==t?void 0:t.Int,s.y6t.u9t=!1,"linear"===s.y6t.l4t&&s.A7t.Bd(),n&&n.ct>=0&&s.b7t(n.ct),s.oa.Nd()===1/0&&s.y6t.d9t(),s.y6t.h9t=!1,s.s9t?[4,s.q7t()]:[3,2];case 1:o.sent(),o.label=2;case 2:s.y6t.p7t(!0),o.label=3;case 3:return o.trys.push([3,5,,6]),[4,s.J7t()];case 4:return o.sent(),[3,6];case 5:return vr(i=o.sent())||s.So(new xY(i)),[2];case 6:return s.y6t.i3t(),s.y6t.we(),s.oa.UP||s.oa.Gx(),n&&s.y6t.G7t(n),s.y6t.Q7t&&(s.y6t.Z7t&&(e=s.oa.Wx(),u=null==(r=s.oa.bt)?void 0:r.src,e&&u&&(e.src=u)),s.y6t.K7t=!0),s.oa.Vx=!1,s.y6t.O6t()?[4,s.y6t.F6t()]:[3,8];case 7:o.sent(),o.label=8;case 8:return[2]}})})()},e}Ct(n,t);var i=n.prototype;return i.r7t=function(t){this.y6t.So(t)},i.h7t=function(t){var n=this;this.y0t=t,this.y0t.wn(f0.d8t,this.o7t),this.y0t.wn(a0.H6t,this.a7t),this.y0t.wn(a0.V6t,this.u7t),this.y0t.wn(a0.n8t,this.c7t),this.y0t.wn(a0.z6t,this.d7t),this.y0t.wn(a0.wJt,this.l7t),this.y0t.wn(a0.r8t,this.f7t),this.y0t.wn(a0.J6t,this.v7t),this.y0t.wn(a0.W6t,this._7t),this.y0t.wn(a0.t8t,this.g7t),this.y0t.wn(a0.Gz,function(){n.y6t.hx||(n.y6t.p7t(!0),n.y6t.So(new hT(n.y6t.MP))),n.m7t(!0)}),this.y0t.wn(a0.X6t,function(){n.y6t.hx&&(n.y6t.p7t(!1),n.y6t.So(new cT(n.y6t.MP)))}),this.y0t.wn(a0.c8t,function(){var i=t.Lx();i>=0&&n.w7t(i)}),this.y0t.wn(a0.u8t,function(){var i=t.Lx();i>=0&&n.w7t(i)}),this.y0t.wn(a0.i8t,function(t){n.A7t.y7t(t.type)}),this.y0t.wn(a0.Rw,function(t){t.Int&&n.b7t(t.Int.ct)}),this.y0t.wn(a0.o8t,function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:return n=t.S7t.adError,(i=g0(n)?_0(n):void 0)?this.T7t(i)?[4,this.k7t(t)]:[3,2]:[2];case 1:return r.sent(),[3,5];case 2:return this.E7t(i)?[4,this.P7t(i)]:[3,4];case 3:return r.sent(),[3,5];case 4:this.x7t(i)&&this.I7t(i),r.label=5;case 5:return[2]}})}).call(n)}),this.y0t.wn(a0.$6t,function(t){if(t.Int&&(n.y6t.I5t(),n.A7t.R7t(t.Int),n.C7t=0,t.Int.D7t)){var i,r=n.y6t.Ax,e=Cy.VL;n.y6t.i5(e);var s=n.y6t.MP,u=n.y6t.Ax;u!==r&&n.r7t(new oT(s,u)),null==(i=n.y0t)||i.Ox(n.y6t.B7t()),n.r7t(new Dy(s,e))}}),this.y0t.wn([a0.Q6t,a0.G6t,a0.K6t,a0.mJt,a0.Y6t],function(t){t.Int&&n.A7t.N7t(t.Int,t.type,n.y6t.MP)}),this.y0t.wn(a0.K6t,this.M7t),this.y0t.wn(a0.j6t,this.L7t)},i.switchToPlayerIfNoNextAd=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:return this.y0t?(t=this.y0t.O7t())&&this.F7t(t)?[3,3]:this.y6t.O6t()?[4,this.y6t.F6t()]:[3,2]:[3,4];case 1:return i.sent(),[3,3];case 2:this.y6t.U7t(),this.oa.hx&&!this.oa.UP&&this.oa.Gx(),i.label=3;case 3:return[3,7];case 4:return this.y6t.O6t()?[4,this.y6t.F6t()]:[3,6];case 5:return i.sent(),[3,7];case 6:n=this.y6t.hx,this.y6t.U7t(),n||this.oa.Gx(),i.label=7;case 7:return[2]}})}).call(this)},i.F7t=function(t){var n=t.V7t,i=null==n?void 0:n.e7t;return(null==n?void 0:n.i7t)!==i},i.vm=function(){this.y6t.Dc&&(m(this.y6t.Dc),this.y6t.Dc=null)},i.x7t=function(t){return t.Km===d0.Z8t},i.E7t=function(t){return t.Km===d0.$8t},i.T7t=function(t){return t.YJt===v0.O8t},i.P7t=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return this.I7t(t),this.H7t(t)?(this.y6t.W7t.P6t=!1,null==(n=this.y6t.W7t.t6t)||n.$5t(),[4,this.switchToPlayerIfNoNextAd()]):[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})}).call(this)},i.H7t=function(t){var n;if(p0(t))return!0;if(this.y6t.Unt)return!1;var i=[v0.T8t,v0.N8t,v0.q8t,v0.X8t];return!(ji(i,t.YJt)||ji(i,null==(n=t.n7t)?void 0:n.YJt))},i.I7t=function(t){this.y6t.V4t(t)},i.q7t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.A7t.S6t(),this.y6t.$5t(),"nonlinear"===this.y6t.l4t&&(this.A7t.z7t(-1,!1),this.y6t.G7t(void 0)),"nonlinear"!==this.y6t.l4t&&"none"!==this.y6t.l4t?[3,2]:this.y6t.O6t()?[4,this.y6t.F6t()]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.y6t.X7t(),this.y6t.G3t?this.y6t.i3t():this.j7t()&&this.oa.So(new vT(this.oa.LP())),[2]}})}).call(this)},i.j7t=function(){return this.y6t.Q7t&&!this.y6t.K7t&&this.oa.UP},i.setCountdownTimer=function(){var t=this;this.vm(),this.y6t.Dc=_(function(){return t.m7t()},250)},i.k7t=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return void 0===t.Int?[2]:(this.y6t.W7t.P6t=!1,this.y6t.$5t(),this.y6t.O6t()?[4,this.y6t.F6t()]:[3,2]);case 1:return n.sent(),[3,3];case 2:this.y6t.p7t(!0),n.label=3;case 3:return[2]}})}).call(this)},i.b7t=function(t){this.y6t.ct!==t&&t>=0&&(this.y6t.C4(t),this.r7t(new aT(this.y6t.ct)))},i.w7t=function(t){this.y6t.B7t()!==t&&(0===t?this.y6t.Y7t(t,!0,!1):this.y6t.Y7t(t,!1,!1))},i.J7t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.y6t.Z7t&&void 0!==this.oa.HP()?(this.$7t=new hr,[4,_r(this.oa.Ta(this.oa.nu(),this.$7t.Yg),this.$7t)]):[3,2];case 1:t.sent(),this.t9t&&this.oa.OP(this.t9t),this.t9t=void 0,t.label=2;case 2:return[2]}})}).call(this)},i.m7t=function(t){if(this.y0t){var n=this.y0t.i9t();n>this.y6t.ct&&this.b7t(b.round(n))}var i=this.y6t.MP;(t||!this.y6t.hx&&i!==this.y6t.e9t)&&(this.y6t.So(new pw(i,void 0)),this.y6t.e9t=i)},i.hr=function(){this.$7t&&(this.$7t.Zg(),this.$7t=void 0),this.s9t=!1,this.C7t=0},i.kn=function(){this.hr(),this.Vo()},n}(th);function p0(t){var n,i;return t.s7t===v0.S8t||(null==(n=t.n7t)?void 0:n.s7t)===v0.S8t||t.YJt===v0.O8t||(null==(i=t.n7t)?void 0:i.YJt)===v0.O8t}F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt(),Dt();var k0=function(t){function n(n,i,r){var e;return(e=t.call(this,n)||this).l9t=void 0,e.f9t=void 0,e.l9t=i,e.f9t=r,e}return Ct(n,t),Nt(n,[{key:"MZt",get:function(){return UZ.V0t}}]),n}(P$);F(),Et(),Bt(),Dt(),F(),Et(),F(),Et(),Bt(),Dt();var b0=function(t){function n(n,i){var r;return(r=t.call(this,n,i)||this)._9t=0,r.g9t=void 0,r}Ct(n,t);var i=n.prototype;return i.N0t=function(){var t;return null==(t=this.g9t)?void 0:t.yKt},i.xa=function(){return function(t,n){return xw(t,{bitrate:0,contentType:void 0,mediaUrl:void 0,traffickingParameters:void 0,traffickingParametersString:void 0,universalAdIds:[],get description(){return n.dB},get apiFramework(){return n.p9t},get creativeId(){return n.GKt},get title(){return n.dq},get wrapperAdIds(){return n.m9t},get wrapperAdSystems(){return n.w9t},get wrapperCreativeIds(){return n.y9t}})}(M$(this),this)},i.A9t=function(t){this.g9t=t;var n=A0(t);this.u4t(t.UYt,t.b9t,t.S9t,t.ct,n,-1)},Nt(n,[{key:"v9t",get:function(){return this._9t},set:function(t){this._9t=t}},{key:"MZt",get:function(){return UZ.so}},{key:"p9t",get:function(){var t;return null==(t=this.g9t)?void 0:t.cYt}},{key:"GKt",get:function(){var t;return null==(t=this.g9t)?void 0:t.GKt}},{key:"dB",get:function(){var t;return null==(t=this.g9t)?void 0:t.dB}},{key:"dq",get:function(){var t;return null==(t=this.g9t)?void 0:t.dq}},{key:"m9t",get:function(){var t,n;return null!=(n=null==(t=this.g9t)?void 0:t.m9t)?n:[]}},{key:"w9t",get:function(){var t,n;return null!=(n=null==(t=this.g9t)?void 0:t.w9t)?n:[]}},{key:"y9t",get:function(){var t,n;return null!=(n=null==(t=this.g9t)?void 0:t.y9t)?n:[]}}]),n}(O$);function A0(t){return t.IKt.map(function(t){return new L$(t)})}var T0=function(t){function n(n){var i;return(i=t.call(this,n,B$.pk)||this).g9t=void 0,i.iJt=void 0,i}Ct(n,t);var i=n.prototype;return i.xa=function(){return function(t,n){return xw(t,{get adSystem(){return n.N0t()},get apiFramework(){return n.p9t},get bitrate(){return n.T9t},get contentType(){return n.qT},get creativeId(){return n.GKt},get description(){return n.dB},get mediaUrl(){return n.tJt},get title(){return n.dq},get traffickingParameters(){return n.k9t},get traffickingParametersString(){return n.E9t},get wrapperAdIds(){return n.m9t},get wrapperAdSystems(){return n.w9t},get wrapperCreativeIds(){return n.y9t},get universalAdIds(){return n.CKt}})}(M$(this),this)},i.A9t=function(t){this.g9t=t,this.u4t(t.UYt,t.b9t,t.S9t,t.ct,A0(t),t.P9t),this.f4t=t.D7t?B$.hZt:B$.a4t},i.N0t=function(){return this.g9t?S0(this.g9t.yKt):void 0},Nt(n,[{key:"MZt",get:function(){return UZ.V0t}},{key:"p9t",get:function(){return this.g9t?S0(this.g9t.cYt):void 0}},{key:"T9t",get:function(){return this.g9t?this.g9t.x9t:0}},{key:"qT",get:function(){return this.g9t?S0(this.g9t.qT):void 0}},{key:"GKt",get:function(){return this.g9t?S0(this.g9t.GKt):void 0}},{key:"I9t",get:function(){return this.g9t?S0(this.g9t.I9t):void 0}},{key:"dB",get:function(){var t;return null==(t=this.g9t)?void 0:t.dB}},{key:"tJt",get:function(){var t,n=null==(t=this.g9t)?void 0:t.tJt;return Un(n)?n:this.iJt},set:function(t){this.iJt=t}},{key:"dq",get:function(){var t;return null==(t=this.g9t)?void 0:t.dq}},{key:"k9t",get:function(){return this.g9t?S0(this.g9t.k9t):void 0}},{key:"E9t",get:function(){return this.g9t?S0(this.g9t.E9t):void 0}},{key:"m9t",get:function(){var t,n;return null!=(n=null==(t=this.g9t)?void 0:t.m9t)?n:[]}},{key:"w9t",get:function(){var t,n;return null!=(n=null==(t=this.g9t)?void 0:t.w9t)?n:[]}},{key:"y9t",get:function(){var t,n;return null!=(n=null==(t=this.g9t)?void 0:t.y9t)?n:[]}},{key:"CKt",get:function(){var t,n;return null!=(n=null==(t=this.g9t)?void 0:t.CKt.map(function(t){return{adIdRegistry:t.R9t,adIdValue:t.C9t}}))?n:[]}}]),n}(O$);function S0(t){return null===t?void 0:t}F(),Et(),Bt(),F(),Et(),Bt();var E0=function(){function t(t,n){this.A7t=void 0,this.D9t=void 0,this.A7t=t,this.D9t=n}var n=t.prototype;return n.knt=function(t){this.A7t.knt(t)},n.rD=function(){this.A7t.rD()},n.Snt=function(t){this.A7t.Snt(t)},n.kn=function(){return ut.resolve()},Nt(t,[{key:"M3t",get:function(){return this.A7t.M3t}},{key:"C3t",get:function(){return this.D9t}},{key:"G3t",get:function(){return this.A7t.G3t}},{key:"ynt",get:function(){var t;return null!=(t=this.A7t.ynt)?t:null}},{key:"mnt",get:function(){var t=this.A7t.B9t;return t?[t]:[]}},{key:"Ant",get:function(){return this.A7t.Ant}},{key:"bnt",get:function(){return this.A7t.bnt}}]),t}(),I0=function(){function t(t,n){this.s5t=void 0,this.X0t=void 0,this.M0t=void 0,this.G0t=void 0,this.L9t=void 0,this.M9t=void 0,this.s5t=t,this.X0t=[],this.L9t=!1,this.M9t=new E0(this,n)}return Nt(t,[{key:"N9t",get:function(){return this.M9t}},{key:"M3t",get:function(){return this.s5t}},{key:"G3t",get:function(){return this.L9t}},{key:"B9t",get:function(){return this.M0t}},{key:"ynt",get:function(){return this.G0t}},{key:"Ant",get:function(){var t=this;return Ji(this.X0t,function(n){if(n._x)return[];var i=n.Jc;if(n===t.G0t&&void 0!==t.M0t){var r=i.indexOf(t.M0t);if(r>=0)return i.slice(r+1)}return i})}},{key:"bnt",get:function(){return this.X0t.filter(function(t){return!t._x})}}]),t}();F(),Et(),Dt();var R0=function(t){function n(n){return t.call(this,"O9t",n)||this}return Ct(n,t),n.prototype.xa=function(){return new C0(this.Int.wnt())},n}(xx),C0=function(t){function n(n){return t.call(this,"adimpression",n)||this}return Ct(n,t),n}(Ox);F(),Et(),Dt();var D0=function(t){function n(n){var i;return(i=t.call(this,"F9t")||this).Int=void 0,i.Int=n,i}return Ct(n,t),n.prototype.xa=function(){return new P0(this.Int.wnt())},n}(kw),P0=function(t){function n(n){var i;return(i=t.call(this,"adbuffering")||this).ad=void 0,i.ad=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var N0=function(t){function n(){return t.call(this,"U9t")||this}return Ct(n,t),n.prototype.xa=function(){return new B0},n}(kw),B0=function(t){function n(){return t.call(this,"admetadata")||this}return Ct(n,t),n}(rh),x0=function(t){function n(n,i){var r;return(r=t.call(this,n,UZ.V0t)||this).W9t=void 0,r.G9t=void 0,r.z9t=void 0,r.W9t=i,r.G9t=[],r.z9t=[],r}Ct(n,t);var i=n.prototype;return i.V9t=function(t,n){for(var i=0;ie){var s=n-e;this.V9t(s,r),r.p0t=i,this.M3t.So(new z$(r))}}},i.f7t=function(t,i,r){if(this.G0t){var e=n.j9t(this.G0t,t);if(e){var s=i/r;this.M3t.So(new H$(e,s))}}},i.N7t=function(t,i,r){if(this.G0t){var e=this.M0t;if(!e){var s=n.j9t(this.G0t,t);if(!s||ji(this.z9t,s))return void this.G9t.push(i);e=s,this.D4t(this.G0t,t),this.q9t(e)}this.y7t(i,e,r)}},i.y7t=function(t,n,i){t===a0.i8t?this.M3t.So(new N0):t===a0.G6t&&n?this.M3t.So(new R0(n)):t===a0.Q6t&&n?this.M3t.So(new D0(n)):t===a0.K6t&&n&&i?this.M3t.So(new j$(n,i)):t===a0.mJt&&n&&i?this.M3t.So(new Y$(n,i)):t===a0.Y6t&&n&&i&&this.M3t.So(new J$(n,i))},i.rD=function(){this.W9t.rD()},i.knt=function(t){this.W9t.knt(t)},i.hr=function(){var t=Boolean(this.M0t&&this.M0t.l4t===B$.hZt);this.q9t(void 0),this.H9t(void 0,t);for(var n,i=Lt(this.X0t);!(n=i()).done;){var r=n.value;this.k6t(r)}Yi(this.X0t),Yi(this.G9t),Yi(this.z9t)},i.kn=function(){this.hr()},i.Snt=function(t){},n.j9t=function(t,n){if(n.V7t)return t.Jc[n.V7t.i7t-1]},Nt(n,[{key:"G3t",get:function(){return this.W9t.G3t}}]),n}(I0);function O0(t){var n=f.google.ima.settings;t.ads&&t.ads.vpaidMode&&f.google.ima.settings.setVpaidMode(function(t){var n=f.google.ima.ImaSdkSettings.VpaidMode;switch(t){case UA.ENABLED:return n.ENABLED;case UA.INSECURE:return n.INSECURE;case UA.DISABLED:default:return n.DISABLED}}(t.ads.vpaidMode)),n.setPlayerVersion("10.0.0"),n.setPlayerType("THEOplayer"),n.setAutoPlayAdBreaks(!0),n.setDisableCustomPlaybackForIOS10Plus(!M0(t));var i=function(t){var n,i,r,e=null==(i=t.ads)||null==(n=i.googleIma)?void 0:n.language;if(void 0!==e)return e;var s=null==(r=t.ui)?void 0:r.language;if(qn(s))return s;return}(t);i&&n.setLocale(i)}function M0(t){return On.ru&&t.allowNativeFullscreen}F(),Et();var L0=function(t){function n(n,i,r,e,s,u,o){var h;return(h=t.call(this,n,i)||this).ko=!1,h.fti=void 0,h.kz=void 0,h.t5=void 0,h.y0t=void 0,h.lti=void 0,h.vti=void 0,h.Dc=void 0,h.WA=void 0,h.tti=void 0,h.eti=void 0,h.X3t=!1,h.sti=void 0,h.nti=void 0,h.i6t=void 0,h.wti=void 0,h.Eti=-1,h.f4t="none",h.VJ=void 0,h.oti=void 0,h.rti=!1,h.m6t=void 0,h.Z9t=!1,h.ati=new hr,h.s6t=void 0,h.$9t=!1,h.iti=!1,h.Iti=function(t){h.M3t.So(t)},h.Pti=function(t){h.sti=new ug(sg.ADVERTISEMENT_ERROR,"Error while recovering from failed IMA ad.",t.error.message),h.nti=cg(h.sti)},h.e9t=NaN,h.hti=function(){h.ko||h.qx()},h.VJ=r,h.kz=!0,h.WA=NaN,h.t5=Cy.VL,h.tti=!1,h.eti=!1,h.m6t=new x0(h.M3t,h),h.wti=new y0(h,h.oa,h.m6t),h.wti.wn(zm.ma,h.Pti),h.oa.wn(eh.uo,h.hti),h.i6t=new c0(h,h.oa,h.Q3t,e,h.m6t),h.fti=o,h.lti=u,h.vti=s,h.we(),h.lti.wn("xti",h.Iti),h}Ct(n,t);var i=n.prototype;return i.K9t=function(t,n,i){n===Sx.pnt&&void 0!==i&&(this.X3t=i),this.i6t._6t(t,n)},i.knt=function(t){for(var n,i=Lt(this.J9t());!(n=i()).done;){var r=n.value;UK(r.sources,r.timeOffset)||t.M6(r,Sx.gnt,!1)}},i.J9t=function(){for(var t,n=[],i=this.B3t,r=i.mnt,e=i.Ant,s=[],u=Lt(r.concat(e));!(t=u()).done;){var o=t.value,h=o.od.f9t;if(!ji(s,h.jI)){var c,a,f=h.J5t(o.m9t);if(f>=0)(c=n).push.apply(c,[].concat(h.f5t.slice(f)));else(a=n).push.apply(a,[].concat(h.f5t));s.push(h.jI)}}for(var v,d=Lt(this.i6t.Ant);!(v=d()).done;){var l,w=v.value;if(!w.P5t)(l=n).push.apply(l,[].concat(w.f5t))}return ir(n)},i.LP=function(){if(!this.w0t)return 0;var t=this.w0t.i9t();return S(this.ct)||t<0?0:this.ct-t},i.OP=function(t,n){},i.Nd=function(){return this.WA||NaN},i.C4=function(t){this.WA=t},i.tx=function(){return this.oa.$P},i.ix=function(t){this.Y7t(this.Mx,t,!0)},i.ox=function(){return this.kz},i.p7t=function(t){this.kz=t},i.Cx=function(){var t,n,i;return null!=(i=null==(n=this.w0t)||null==(t=n.O7t())?void 0:t.S9t)?i:0},i.Nx=function(){var t,n,i;return null!=(i=null==(n=this.w0t)||null==(t=n.O7t())?void 0:t.b9t)?i:0},i.xP=function(){return[]},i.K3t=function(t){this.s6t=t,this.i6t.K3t(t)},i.D6t=function(){!this.Z9t&&this.w0t&&(this.w0t.Tn(),this.Z9t=!0)},i.G7t=function(t){this.l4t=t?t.D7t?"linear":"nonlinear":"none"},i.Tx=function(){return TA.iL()._s()},i.Lx=function(){return this.oa.Mx},i.Ox=function(t){this.Y7t(t,this.$P,!0)},i.B7t=function(){return this.oa.$P?0:this.oa.Mx},i.Y7t=function(t,n,i){var r=this.oa.Mx!==t||this.oa.$P!==n;r&&(this.oa.Mx=t,this.oa.$P=n),this.w0t&&i&&this.w0t.Ox(this.B7t()),r&&this.So(new wT(this.MP,this.Mx))},i.VP=function(){return!1},i.HP=function(){if(this.sti&&this.X3t)return this.sti},i.qP=function(){if(this.nti&&this.X3t)return this.nti},i.bx=function(){return this.t5},i.i5=function(t){this.t5=t,this.So(new Ry(this.MP,t))},i.qx=function(){this.oa.mn(eh.uo,this.hti),this.ko||(this.ko=!0,this.i6t.qx(),this.r9t())},i.Gx=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:if(this.oti)return[2];this.ati.Zg(),this.ati=new hr,t=this.hx,this.p7t(!1),this.So(new cT(this.MP)),this.uti()||(this.Z7t||this.oa.we(),this.So(new Ny(this.MP))),this.h9t||(this.a9t=!1),n=Boolean(this.w0t),this.oti=this.i6t.v6t(),i.label=1;case 1:return i.trys.push([1,,3,4]),[4,this.oti];case 2:return i.sent(),[3,4];case 3:return this.oti=void 0,[7];case 4:try{dr(this.ati.Yg)}catch(t){return[2]}if(this.ko||this.hti(),this.sti&&this.X3t)return[2];if(this.w0t){if(t)if(n)try{dr(this.ati.Yg),this.w0t.cti(),this.So(new Oy(this.MP))}catch(t){return[2]}else this.D6t()}else this.X3t||(this.i3t(),this.Q3t.Gx());return[2]}})}).call(this)},i.zx=function(){var t;this.hx||(this.p7t(!0),this.So(new hT(this.MP))),this.ati.Zg(),this.h9t?null==(t=this.w0t)||t.zx():this.a9t=!0},i.rD=function(){var t;null==(t=this.w0t)||t.rD()},i.X7t=function(){this.w0t&&(this.lti.dti(),this.w0t.Xx(),this.w0t.zg(),this.w0t=void 0,this.l4t="none",this.Z9t=!1)},i.Xx=function(){return Vt(function(){var t;return zt(this,function(n){return this.e9t=0,this.i6t.hr(),this.ati.Zg(),this.p7t(!0),this.tti=!1,this.eti=!1,this.h9t=!1,this.m6t.hr(),this.X7t(),this.U7t(),null==(t=this.fti)||t.hr(),this.a9t=!1,this.lti.zg(),[2]})}).call(this)},i.be=function(){this.vti.be(),this.Z7t&&this.oa.be()},i.we=function(){this.vti.we()},i._ti=function(){return Boolean(this.w0t)&&ji(this.w0t.gti(),-1)&&!this.tti},i.I5t=function(){this.i6t.I5t()},i.O6t=function(){return this.i6t.O6t},i.$5t=function(){this.i6t.$5t()},i.F6t=function(){return this.i6t.F6t()},i.F3t=function(t){if(this._ti()){if(t.type===eh.jw&&this.oa.UP)return!0;if(t.type===eh.Bw)return this.tti=!0,this.lti.dti(),!0}return!1},i.uti=function(){return Boolean(this.w0t&&this.w0t.O7t())},i.C6t=function(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),this.X7t(),n=this.pti(),this.vti.VY(),i=this,[4,this.lti.C6t(t,this.fti,n)];case 1:return i.w0t=e.sent(),this.mti(this.w0t),[3,3];case 2:return r=e.sent(),this.wti.P7t(r),[3,3];case 3:return[2]}})}).call(this)},i.mti=function(t){if(t.Ox(this.B7t()),this.i6t.p6t===h0.d6t){var n=t.gti();if(n.length)for(var i,r=Lt(n);!(i=r()).done;){var e=i.value;this.m6t.L4t(e,this.i6t.t6t)}else this.m6t.L4t(this.i6t.t6t.dd,this.i6t.t6t)}this.wti.hr(),this.wti.h7t(t)},i.Wx=function(){if(this.y0t&&this.Z7t&&this.uti())return this.oa.Wx()},i.Hx=function(){return this.Z7t&&this.G3t?this.oa.Ma:t.prototype.Hx.call(this)},i.pti=function(){var t,n,i=!!(this.i6t.p6t===h0.d6t)&&this.Y9t;return void 0!==this.VJ.ads.googleIma.uiElements?t=this.VJ.ads.googleIma.uiElements:this.VJ.ads.showCountdown||(t=[]),void 0!==this.VJ.ads.allowedMimeTypes&&(n=this.VJ.ads.allowedMimeTypes),{yti:n,Ati:t,bti:i,T9t:this.VJ.ads.googleIma.bitrate,Sti:void 0,Tti:this.s6t}},i.r9t=function(){if(this.y0t){var t=this.pti();this.y0t.kti(t)}},i.V4t=function(t){p0(t)||(this.sti=new ug(sg.ADVERTISEMENT_ERROR,t.Py),this.nti=new fd(cd.AD_ERROR,"There was a problem playing ads.",this.sti)),this.M3t.So(R$.U3t(t))},i.U7t=function(){this.G3t&&(this.oa.be(),this.i3t(),this.we())},i.d9t=function(){var t;this.oa.LP()!==1/0&&0!==this.oa.Tx().length&&((null==(t=this.i6t.t6t)?void 0:t.g5t)&&-1!==this.Eti&&(this.oa.OP(this.oa.LP()+this.Eti),this.Eti=-1))},i.c9t=function(t){var n,i;this.Eti=null!=(i=null==(n=t.V7t)?void 0:n.p0t)?i:-1},i.i3t=function(){t.prototype.i3t.call(this),this.oa.be(),this.Z7t&&!this.oa.UP&&this.oa.Gx()},i.c5t=function(){this.Z7t||t.prototype.c5t.call(this)},i.kn=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.wti.mn(zm.ma,this.Pti),[4,t.prototype.kn.call(n)];case 1:return i.sent(),this.X7t(),this.lti.mn("xti",this.Iti),this.lti.zg(),this.vti.zg(),this.i6t.kn(),this.wti.kn(),[2]}})}).call(this)},Nt(n,[{key:"B3t",get:function(){return this.m6t.N9t}},{key:"Q9t",get:function(){return this.m6t}},{key:"W7t",get:function(){return this.i6t}},{key:"Z7t",get:function(){return M0(this.VJ)}},{key:"C3t",get:function(){return n.C3t}},{key:"Y9t",get:function(){return this.VJ.ads.preload===VA.MIDROLL_AND_POSTROLL}},{key:"l4t",get:function(){return this.f4t},set:function(t){this.f4t=t}},{key:"w0t",get:function(){return this.y0t},set:function(t){this.y0t=t,this.Z9t=!1}},{key:"h9t",get:function(){return this.$9t},set:function(t){this.$9t=t}},{key:"Unt",get:function(){return this.X3t}},{key:"Q7t",get:function(){return this.tti}},{key:"a9t",get:function(){return this.iti},set:function(t){this.iti=t}},{key:"K7t",get:function(){return this.eti},set:function(t){this.eti=t}},{key:"u9t",get:function(){return this.rti},set:function(t){this.rti=t}}],[{key:"C3t",get:function(){return UZ.V0t}}]),n}(r0);F(),Et();var U0=function(){function t(){this.Rti=void 0}var n=t.prototype;return n.registerWebImaAdPlayerConstructor=function(t){this.Rti=t},n.createAdPlayer=function(t,n,i){return F0()&&this.Rti?this.Rti(t,n,i):void 0},t}();function F0(){return!!Boolean(f.google&&f.google.ima)&&!(1===k.keys(f.google.ima).length&&Boolean(f.google.ima.dai))}U0.Ng=new U0;var V0=function(){function t(){}var n=t.prototype;return n.qz=function(t){return t&&t.integration===mS.GOOGLE_IMA},n.x3t=function(t,n,i){return U0.Ng.createAdPlayer(t,n,i)},n.M6=function(t,n,i,r){i.K9t(t,n,r)},n.sj=function(t){var n=QJ(t.sources);if(n){var i={integration:mS.GOOGLE_IMA,sources:n,omidAccessModeRules:m0(t.omidAccessModeRules)},r=KJ(t.timeOffset);return void 0!==r&&(i.timeOffset=r),i}},Nt(t,[{key:"P3t",get:function(){return L0.C3t}}]),t}();yS.Ng.zz(new V0),F(),Et(),Bt(),F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Dt();var H0=function(t){function n(){return t.call(this,"z0t")||this}return Ct(n,t),n.prototype.xa=function(){return new W0},n}(kw),W0=function(t){function n(){return t.call(this,"adloaded")||this}return Ct(n,t),n}(rh),z0=-1,X0=function(){function t(t,n){this.X0t=void 0,this.T5t=void 0,this.Dti=void 0,this.x0t=void 0,this.Xp=void 0,this.k0t=void 0,this.Lti=void 0,this.Mti=void 0,this.X0t=[],this.x0t=!1,this.T5t=t,this.Xp=0,this.k0t=n,this.Lti=NaN,this.Mti=!1,this.Dti=new NZ(this,this.k0t)}var n=t.prototype;return n.Oti=function(){return this.Xp0},i.tii=function(t,n){for(var i,r,e=0,s=Lt(this.Wti);!(r=s()).done;){var u=r.value;if(!u.P0t()){var o=u.dd;o>=t&&o<=n&&o>=e&&!S(o)&&(e=(i=u).dd)}}return i},i.eii=function(t){return this.Jti(new pw(t,void 0))},i.sii=function(){if(!this.nii&&void 0!==this.s6t){this.nii=!this.Wti.some(function(t){return S(t.dd)});for(var t,n=Lt(this.Wti);!(t=n()).done;){var i=t.value;i.dd!==z0&&i.dd<=this.s6t&&!i.P0t()&&i.I0t()}}},i.rii=function(t){for(var n,i=Lt(t);!(n=i()).done;){n.value.I0t()}this.J4t.hii(t),0===this.Hti&&this.Ro()},i.$ti=function(t,n,i){var r=this;return this.Wti.filter(function(e){if(e.P0t())return!1;var s=e.dd;return r.oii(s,t)||r.aii(s,t,n,i)})},i.oii=function(t,n){switch(n){case 0:return 0===t;case z0:return t===z0;default:return!1}},i.aii=function(t,n,i,r){if(t<0)return!1;var e=t-n;return-1!==e&&e<=i&&e>=-r},i.uii=function(t){if(t&&t.length>0){for(var i,r=Lt(t);!(i=r()).done;){var e=i.value,s=n.Z5t(e._Ot),u=this.dgt(e);-1===u&&(this.nii=void 0===this.s6t,this.Wti.push(new X0(s,this.cii)),u=this.Wti.length-1),this.Wti[u].Fti(e)}this.No()}},i.dgt=function(t){var i=n.Z5t(t._Ot);return Hi(this.Wti,function(t){return i===n.Z5t(t.Bti)})},i.dii=function(t){Xi(this.Wti,t)},i.K3t=function(t){this.s6t=t,this.nii=void 0===t},n.Z5t=function(t){switch(t){case"start":case"00:00:00":case"00:00:00.000":case"0%":case"0":return"0";case"end":case"100%":return"-1";default:return t}},Nt(n,[{key:"Hti",get:function(){for(var t,n=0,i=Lt(this.Wti);!(t=i()).done;){t.value.P0t()||(n+=1)}return n}},{key:"Ant",get:function(){return this.Wti}}]),n}(ih);F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Bt(),Dt(),Ut();var G0,j0=function(t){function n(n,i){var r;return(r=t.call(this)||this).Q1t=void 0,r.yii=[],r.mii=[],r.JW=void 0,r.bii=void 0,r.Sii=void 0,r.s5t=new ih,r.Tii=function(t){t.stopPropagation(),r.kii()},r.kii=function(){for(var t,n=Lt(r.yii);!(t=n()).done;)for(var i,e=Lt(t.value.kYt);!(i=e()).done;){var s=i.value;xK(s.uri)}},r.Q1t=v.createElement("div"),r.Q1t.style.display="none",r.bii=n,r.Sii=i,r}Ct(n,t);var i=n.prototype;return i.vii=function(){this._ii(),this.gii(),this.JW=void 0},i.pii=function(t){this.mii=this.mii.concat(t)},i.wii=function(t){this.yii=this.yii.concat(t)},i.gii=function(){this.mii=[]},i._ii=function(){this.yii=[]},i.Aii=function(t){for(var n,i=Lt(this.mii);!(n=i()).done;){var r=n.value;r.eX===t&&xK(r.eventURL)}},i.be=function(){this.fii.style.display=""},i.we=function(){this.fii.style.display="none"},i.kn=function(){this.Vo(),this.s5t.Vo(),$n(this.Q1t)},Nt(n,[{key:"fii",get:function(){return this.Q1t}},{key:"M3t",get:function(){return this.s5t}}]),n}(ih);function Q0(t,n){var i=n;if(!function(t){return"ui"in t}(t))return i;var r,e=t.ui.language;if(qn(e)){var s=t.ui.languages;if(!s)return i;r=s[e]}else r=e;return r&&r[n]&&(i=r[n]),i}F(),Et(),F(),Et(),Ut();var Y0=((G0={})[hA.cR]=1,G0[hA.dR]=2,G0[hA.lR]=2,G0);function K0(t,n){var i=n?n.map(function(t){return t.toLowerCase()}):n;return mi(t.filter(function(t){var n=t.type.toLowerCase();return!!Hn(i)&&-1!==i.indexOf(n)&&CJ(n)}),function(t,n){return Y0[t.type]-Y0[n.type]}).map(J0)}function J0(t){return vA({src:t.contentURL,type:t.type,isAdvertisement:!0})}function Z0(t,n){return CM($0(t),$0(n))}function $0(t){return{Mi:t.height,Ti:t.width}}function t1(t,n,i,r){var e,s=function(t,n,i,r){var e,s=1/0,u=t.filter(function(t){return!CJ(t.type)}).filter(function(t){return void 0===r||-1!==r.indexOf(t.type)});if(u.length){for(var o,h=Lt(u);!(o=h()).done;){var c=o.value,a=(b.abs(c.width/n-1)+b.abs(c.height/i-1))/2;a0&&(t.tJt=null==(e=u[0].src)?void 0:e.trim());return oE({sources:u},r)}var n1=function(t){function n(n,i,r,e,s,u,o){var h;return(h=t.call(this,n,i)||this).eei=void 0,h.YS=void 0,h.J4t=void 0,h.sc=void 0,h.xii=void 0,h.Rii=void 0,h.qYt=void 0,h.Wii=void 0,h.Pii=void 0,h.tei=void 0,h.b4=void 0,h.iei=void 0,h.sei=void 0,h.$1t=void 0,h.Y1t=void 0,h.nT=void 0,h.Cii=void 0,h.Qii=void 0,h.Yii=void 0,h.Kii=void 0,h.jii=void 0,h.zii=void 0,h.Gii=void 0,h.Xii=void 0,h.Uii=void 0,h.Oii=void 0,h.eei=r,h.YS=e,h.J4t=s,h.sc=u,h.xii=o,h.Pii=!1,h.tei=0,h.b4=-1,h.nT=new hr,h.Cii=!0,h.Qii=function(){h.Mii()},h.Yii=function(){h.nT=void 0,h.Pii||(h.Zii(),h.Pii=!0),h.Cii&&(h.Cii=!1,h.J4t.qti()),h.fii.style.display="block",h.xii.mn(Ey.TM,h.Yii),h.Pii=!0},h.Kii=function(){var t=h.MP,n=h.ct,i=t/n;(0===h.tei&&i>=.25?(h.Aii(cJ.gJt),h.tei=1):1===h.tei&&i>=.5?(h.Aii(cJ.mJt),h.tei=2):2===h.tei&&i>=.75&&(h.Aii(cJ.pJt),h.tei=3),h.Vii(t,n),h.rei(),h.b4=t,h.qYt)&&(-1!==h.qYt.JYt&&h.qYt.JYt1){var e=i.filter(function(t){return t.P0t()}).length;r+=". "+Q0(this.YS,"Ad")+" "+(e+1)+"/"+i.length}vB(this.sei,r)}},Nt(n,[{key:"Eii",get:function(){return this.Pii}},{key:"MP",get:function(){return this.xii.MP}},{key:"ct",get:function(){var t=this.xii.ct;return S(t)&&this.qYt&&(t=this.qYt.ct||0),t}},{key:"UP",get:function(){return this.xii.UP}},{key:"$P",get:function(){return this.xii.$P},set:function(t){this.xii.$P=t,t?this.Aii(cJ.hJt):this.Aii(cJ.oJt)}},{key:"hx",get:function(){return this.xii.hx}},{key:"Ax",get:function(){return this.xii.Ax}},{key:"Mx",get:function(){return this.xii.Mx},set:function(t){this.xii.Mx=t}},{key:"Rx",get:function(){return this.xii.Rx}},{key:"Bx",get:function(){return this.xii.Bx}},{key:"Iii",get:function(){return this.Rii}},{key:"Jii",get:function(){return this.qYt&&-1!==this.qYt.JYt&&this.xii.MP>=this.qYt.JYt}}]),n}(j0);F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et(),Bt(),Dt();var i1=function(t){function n(){var i;return(i=t.call(this)||this).Ls=void 0,i.y1t=function(t){i.So(new rh("rD")),i.hei(t)},i.hei=function(t){t.stopPropagation()},i.Ls=n.yr(),i.w1t(),i}Ct(n,t);var i=n.prototype;return i.w1t=function(){this.xe.addEventListener("mouseup",this.y1t),this.xe.addEventListener("touchend",this.y1t),this.xe.addEventListener("mousedown",this.hei)},i.p1t=function(){this.xe.removeEventListener("mouseup",this.y1t),this.xe.removeEventListener("touchend",this.y1t),this.xe.removeEventListener("mousedown",this.hei)},i.kn=function(){this.p1t(),$n(this.Ls)},n.yr=function(){var t=v.createElement("div");return t.className="theoplayer-ad-nonlinear-close",t.style.position="absolute",t.style.right="0",t.style.top="0",t.style.cursor="pointer",t.style.fontSize="1.7em",t.style.lineHeight="0.75em",t},Nt(n,[{key:"xe",get:function(){return this.Ls}}]),n}(th),r1=function(t){function n(n,i,r){var e;return(e=t.call(this,n,i)||this).aei=void 0,e.L0t=void 0,e.J4t=void 0,e.yu=void 0,e.fei=void 0,e.dei=function(){e._ei(),e.Aii(cJ.TJt),e.Sii()},e.cei=function(t){var n,i;e._ei(),null==(n=e.JW)||n.jJt(AJ.zJt);var r,s,u,o=null==(i=e.L0t)?void 0:i.DKt[0],h=null!=(s=null!=(r=null==o?void 0:o.FKt)?r:null==o?void 0:o.LKt)?s:null==o?void 0:o.VKt;e.bii(null!=(u=null==h?void 0:h.LJt)?u:"")},e.vei=function(){e.we(),ti(e.fii),e.Sii(),e.aei=void 0,e.L0t=void 0},e.pei=function(){e.yu||(e.fei=void 0,e.yu=new i1,e.fii.children[0].appendChild(e.yu.xe),e.yu.wn("rD",e.mei))},e.mei=function(){e.Aii(cJ.cJt),e.p$t()},e.fii.className="theoplayer-ad-nonlinear",e.fii.style.position="absolute",e.fii.style.width="100%",e.fii.style.bottom="3em",e.fii.style.zIndex="10",e.fii.style.textAlign="center",e.J4t=r,e}Ct(n,t);var i=n.prototype;return i.vii=function(){t.prototype.vii.call(this),this.fii&&ti(this.fii)},i.qii=function(t,n,i){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.L0t&&this.Nii(),this.aei=t,this.L0t=t.xKt,0!==this.L0t.NKt.length&&this.pii(this.L0t.NKt),this.JW=n,0===this.L0t.DKt.length?[3,2]:(this.wii(this.L0t.DKt[0].WKt),this.fii.addEventListener("error",this.cei),this.fii.addEventListener("load",this.dei),[4,this.Hii()]);case 1:i.sent(),this.lei(),i.label=2;case 2:return[2]}})}).call(this)},i.p$t=function(){var t;if(void 0===this.fei){var n=null==(t=this.L0t)?void 0:t.DKt[0];n&&n.od&&-1!==n.od.JYt&&(this.Aii(cJ.cJt),this.M3t.So(new H$(this.aei,0)),this.vei())}},i.Zii=function(){void 0!==this.aei&&this.M3t.So(new Wx(this.aei,this.J4t.MP))},i.Xx=function(){this.Nii(),this.aei=void 0,this.L0t=void 0},i.Nii=function(){this._ei(),void 0!==this.aei&&(this.aei.I0t(),this.M3t.So(new Xx(this.aei,this.J4t.MP))),this.vii(),this.gei(),void 0!==this.fei&&(g(this.fei),this.fei=void 0)},i._ei=function(){this.fii.removeEventListener("load",this.dei),this.fii.removeEventListener("error",this.cei)},i.Hii=function(){return Vt(function(){var t,n,i,r,e,s,u,o,h;return zt(this,function(c){return(t=v.createElement("div")).className="theoplayer-ad-nonlinear-content",t.style.position="relative",t.style.display="inline-block",n=this.L0t.DKt[0],i=v.createElement("a"),n.WKt.AYt&&(i.href=n.WKt.AYt,i.target="Xu",i.setAttribute("rel","noopener")),n.FKt?(r=n.FKt,(e=v.createElement("iframe")).src=r.LJt,i.appendChild(e)):n.LKt?(s=n.LKt,(u=v.createElement("img")).src=s.LJt,i.appendChild(u)):n.VKt&&(o=n.VKt,(h=v.createElement("iframe")).src=o.LJt,i.appendChild(h)),n.KKt(),i.addEventListener("mousedown",this.Tii),i.addEventListener("touchend",this.Tii),this.fii.firstChild&&(ti(this.fii),this.Nii()),t.appendChild(i),this.fii.appendChild(t),this.be(),[2]})}).call(this)},i.lei=function(){var t;if(this.L0t){var n=null==(t=this.L0t.DKt[0].od)?void 0:t.JYt;void 0!==n&&-1!==n&&(this.fei=f.setTimeout(this.pei,1e3*n))}},i.gei=function(){this.yu&&(this.yu.mn("rD",this.mei),this.yu.kn()),this.yu=void 0},Nt(n,[{key:"oei",get:function(){return this.aei}},{key:"uei",get:function(){return this.yu}},{key:"wei",get:function(){return this.J4t.yei()}}]),n}(j0);F(),Et(),Wt(),Qt();var e1=function(){function t(){}return t.Aei=function(t,n,i){return Vt(function(){var r,e,s,u,o,h;return zt(this,function(c){switch(c.label){case 0:r=[],e=t.shift(),s=[],c.label=1;case 1:if(!e)return[3,6];c.label=2;case 2:return c.trys.push([2,4,,5]),[4,(new xJ).eZt(e,n)];case 3:return u=c.sent(),r=r.concat(u),[3,5];case 4:return o=c.sent(),h=R$.V3t(o,e.sources.src),i.So(h),s.push(h.Ky),[3,5];case 5:return e=t.shift(),[3,1];case 6:return[2,[r,s]]}})})()},t}();F(),Et(),Wt(),Bt(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Dt();var s1=function(t){function n(){return t.call(this,"Eot")||this}return Ct(n,t),n.prototype.xa=function(){return new u1},n}(kw),u1=function(t){function n(){return t.call(this,"statechange")||this}return Ct(n,t),n}(rh);F(),Et();var o1=function(t){return t.IDLE="idle",t.LOADING="loading",t.DONE="done",t.ERROR="error",t.EVICTED="evicted",t}({});F(),Et(),Dt(),F(),Et(),Bt(),Dt(),Ut();var h1=function(){function t(){this.nc=[],this.hu=void 0}var n=t.prototype;return n.CI=function(t){return this.nc[t]},n.lO=function(t){this.nc.push(t),this.hu&&this.hu.push(t.Ca),this.bei(t)},n.Sei=function(t){for(var n,i=Lt(t);!(n=i()).done;){var r=n.value;this.lO(r)}},n.Tei=function(t,n){n>=0&&n<=this.nc.length&&(this.nc.splice(n,0,t),this.hu&&this.hu.splice(n,0,t.Ca),this.bei(t))},n.fO=function(t){return ji(this.nc,t)},n._S=function(t){this.kei(this.nc.indexOf(t))},n.kei=function(t){if(t>=0&&t0&&this.asi=n)return r;return r}(t,s)/8}).reduce(function(t,n){return t+n},0)),E=Ju(),h&&0!==h.length){for(R=function(){var t=P.value,n=t.qualityId,i=new TA(t.startsAndEnds);if(E.has(n))E.get(n).timeRanges=E.get(n).timeRanges.OM(i).LM(5e-4);else{var r,e=Ui(c,function(t){return t.o===n}),s=b.min(I.Wei,null!=(r=null==e?void 0:e.mM.ct)?r:1/0);E.set(n,{timeRanges:i,totalQualityDurationToCache:s})}},C=h.reduce(function(t,n){return t+n.byteSize},0),D=Lt(h);!(P=D()).done;)I=this,R();u=new g1(C,E,this.Wei)}else{for(N=Lt(c);!(B=N()).done;)x=B.value,E.set(x.o,{timeRanges:TA.iL(),totalQualityDurationToCache:b.min(x.mM.ct,this.Wei)});u=new g1(0,E,this.Wei)}return this.fsi=u,[2]}})}).call(this)},i.mi=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.ko];case 1:return n.sent(),[4,this.gsi(this.pCt,t)];case 2:return n.sent(),[2]}})}).call(this)},i.gsi=function(t,n){return Vt(function(){var i,r,e,s;return zt(this,function(u){switch(u.label){case 0:if(!t.Zei)throw new y("Unexpected - manifest is missing locations");return[4,this.psi()];case 1:for(u.sent(),i=[],r=Lt(t.smt);!(e=r()).done;)s=e.value,i.push(this.msi(s,t.Zei[0],n));return[2,br(i)]}})}).call(this)},i.psi=function(){return Vt(function(){var t,n,i,r,e,s;return zt(this,function(u){switch(u.label){case 0:return[4,this.wsi.iPt()];case 1:t=u.sent(),n=Lt(t),u.label=2;case 2:return(i=n()).done?[3,9]:(r=i.value,[4,this.cPt.lPt.Wy(r.key)]);case 3:return(e=u.sent())?[4,$1(e,this.XSt.o,this.cPt.lPt,this.Mei)]:[3,5];case 4:return u.sent(),[3,8];case 5:return u.trys.push([5,7,,8]),[4,this.cPt.lPt.zSt(r,this.Mei)];case 6:return u.sent(),[3,8];case 7:throw s=u.sent(),new y1("Unable to store manifest with url: "+r.locationURL,s);case 8:return[3,2];case 9:return[4,this.wsi.rPt()];case 10:return u.sent(),[2]}})}).call(this)},i.msi=function(t,n,i){for(var r,e=[],s=Lt(t.kmt);!(r=s()).done;)for(var u,o=Lt(t2(r.value,this.XSt.NS.preferredTrackSelection));!(u=o()).done;){var h=u.value;e.push(this.ysi(h,n,i))}return br(e)},i.ysi=function(t,n,i){return Vt(function(){var r,e,s,u,o,h;return zt(this,function(c){switch(c.label){case 0:return r=this.XSt.NS.bandwidth,e=i2(t.KI,r),t.Km===ig.Bk&&t.Tpt&&t.Tpt.aH.widevine&&"persistent"===t.Tpt.aH.widevine.licenseType?[4,this.Asi(t.Tpt)]:[3,2];case 1:c.sent(),dr(i),c.label=2;case 2:for(s=[],u=Lt(e);!(o=u()).done;)h=o.value,s.push(this.bsi(h,n,i));return[2,br(s)]}})}).call(this)},i.bsi=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:dr(i),r=t.mM.ect[0].EO,e=r+this.Wei,s=[],u=!1,o=Lt(t.mM.ect),a.label=1;case 1:return(h=o()).done||((c=h.value).EO>=e||this.stopIfFailed(u))?[3,5]:[4,this.Ssi(i)];case 2:return a.sent(),[4,this.Tsi.nsi()];case 3:a.sent(),s.push(this.Tsi.osi(this.ksi(c,t,n),this.Esi).catch(function(t){return u=!0,ut.reject(t)})),a.label=4;case 4:return[3,1];case 5:return[2,br(s)]}})}).call(this)},i.Ssi=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return(null==t?void 0:t.Hg)?[4,this.Esi.Qy]:[3,2];case 1:throw n.sent(),new fr;case 2:return[2]}})}).call(this)},i.Psi=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.ko.catch(di)];case 1:return t.sent(),[2,this.pCt]}})}).call(this)},i.Asi=function(t){return ut.resolve()},i.xsi=function(){return Vn.um("License renewal unsupported in this SDK."),ut.resolve()},i.ksi=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c,a,f;return zt(this,function(v){switch(v.label){case 0:return r=this,e=this.cPt.dPt,s=bH(t.Jei.Yu,t.Jei.Sat),[4,e.Wy(s)];case 1:return(u=v.sent())?[4,$1(u,this.XSt.o,e,this.Mei)]:[3,3];case 2:return v.sent(),this.Isi(u,!1),[3,7];case 3:return v.trys.push([3,6,,7]),[4,this.Rsi(t.Jei)];case 4:return o=v.sent(),h=this.Csi(t,n,i,o),c=h.segmentMetadataEntry,a=h.segmentEntry,[4,this.cPt.uPt(function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.dPt.zSt(c,this.Mei)];case 1:return n.sent(),[4,t.ect.zSt(a,this.Mei)];case 2:return n.sent(),[2]}})}).call(r)})];case 5:return v.sent(),this.Isi(c,!0),[3,7];case 6:throw f=v.sent(),new y1("Unable to store segment with url: "+t.Jei.Yu,f);case 7:return[2]}})}).call(this)},i.Rsi=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return[4,this.Mut.pat(t,{Eat:this.DEFAULT_CACHING_SEGMENT_TIMEOUT,Hk:this.DEFAULT_CACHING_SEGMENT_CONNECTION_TIMEOUT})];case 1:return n=i.sent(),[4,this.Lut(n)];case 2:return[2,i.sent()]}})}).call(this)},i.Lut=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.HT()];case 1:return[2,{buffer:n.sent()}]}})})()},i.Csi=function(t,n,i,r){var e=bH(t.Jei.Yu,t.Jei.Sat),s=t.EO,u=t.ct,o=this.Dsi(r);return{segmentMetadataEntry:{key:e,segmentURLsegmentByteRange:e,manifestURL:kH(i),qualityId:n.o,byteSize:o,startsAndEnds:new TA([s,s+u]).kM,references:[this.XSt.o]},segmentEntry:{key:e,segmentURLsegmentByteRange:e,manifestURL:kH(i),data:r,references:[this.XSt.o]}}},i.Dsi=function(t){return t.buffer.byteLength},i.Isi=function(t,n){var i=t.qualityId,r=this._si,e=r.dO;e.get(i).timeRanges=e.get(i).timeRanges.OM(new TA(t.startsAndEnds)).LM(5e-4),this.fsi=new g1(n?r.qei+t.byteSize:r.qei,e,this.Wei)},i.stopIfFailed=function(t){return!1},Nt(n,[{key:"Oei",get:function(){return this.qx()}},{key:"vsi",get:function(){return this.lsi}},{key:"fsi",get:function(){return this._si},set:function(t){this._si.zO(t)||(this._si=t,t.zO(g1.Kei)||this.So(new m1))}}]),n}(th);function $1(t,n,i,r){return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return ji(t.references,n)?[3,2]:(t.references.push(n),[4,i.zSt(t,r)]);case 1:e.sent(),e.label=2;case 2:return[2]}})})()}function t2(t,n){switch(t.Km){case ig.Dk:return n2(t.Z,n.audioTrackSelection);case ig.NT:return n2(t.Z,n.textTrackSelection);default:return n2(t.Z,[])}}function n2(t,n){if(0===n.length)return t.length?[t[0]]:[];for(var i,r=[],e=Lt(t);!(i=e()).done;){var s=i.value;n.indexOf(s.bs)>-1&&r.push(s)}return r}function i2(t,n){if(!t.length)return[];var i=[].concat(t).sort(DM),r=i.filter(function(t){return t.kW<=n});return r.length>0?[r.pop()]:[i.shift()]}var r2=function(){function t(t,n,i){this.XSt=void 0,this.cPt=void 0,this.pCt=void 0,this.XSt=t,this.cPt=n,this.pCt=i}var n=t.prototype;return n.Bsi=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return t=this,[4,this.cPt.uPt(function(n){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.Nsi(n)];case 1:return t.sent(),[4,this.Msi(n)];case 2:return t.sent(),[4,this.Lsi(n)];case 3:return t.sent(),[4,this.Osi(n)];case 4:return t.sent(),[2]}})}).call(t)})];case 1:return n.sent(),[2]}})}).call(this)},n.Nsi=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:return n=t.fPt,i=this.XSt.o,[4,n._S(i)];case 1:return r.sent(),[2]}})}).call(this)},n.Msi=function(t){return Vt(function(){var n,i,r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:return n=this,i=t.dPt,r=t.ect,JA(e=this.XSt.Mc.sources[0])?(s=kH(e.src),[4,i.sPt(s,"manifestURL")]):[2];case 1:u=a.sent().filter(function(t){return ji(t.references,n.XSt.o)}),o=Lt(u),a.label=2;case 2:return(h=o()).done?[3,8]:(Xi((c=h.value).references,this.XSt.o),0!==c.references.length?[3,5]:[4,i._S(c.key)]);case 3:return a.sent(),[4,r._S(c.key)];case 4:return a.sent(),[3,7];case 5:return[4,i.zSt(c)];case 6:a.sent(),a.label=7;case 7:return[3,2];case 8:return[2]}})}).call(this)},n.Lsi=function(t){return Vt(function(){var n,i,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return n=this,i=t.lPt,r=this.Fsi(),[4,i.jEt(r)];case 1:e=h.sent().filter(function(t){return ji(t.references,n.XSt.o)}),s=Lt(e),h.label=2;case 2:return(u=s()).done?[3,7]:(Xi((o=u.value).references,this.XSt.o),0!==o.references.length?[3,4]:[4,i._S(o.key)]);case 3:return h.sent(),[3,6];case 4:return[4,i.zSt(o)];case 5:h.sent(),h.label=6;case 6:return[3,2];case 7:return[2]}})}).call(this)},n.Fsi=function(){if(!this.pCt)return[];var t=this.XSt.Mc.sources[0];if(!JA(t))return[];var n=kH(t.src),i=function(t){if(!t)return[];for(var n,i=[],r=Lt(t.smt);!(n=r()).done;)for(var e,s=Lt(n.value.kmt);!(e=s()).done;)for(var u,o=Lt(e.value.Z);!(u=o()).done;)for(var h,c=Lt(u.value.KI);!(h=c()).done;){var a=h.value;a.$ei&&i.push(a.$ei)}return function(t){return t.reduce(function(t,n){return t.indexOf(n)<0&&t.push(n),t},[])}(i)}(this.pCt).map(function(t){return{src:t}}).map(function(t){return kH(t.src)});return[].concat([n],i)},n.Osi=function(t){return Vt(function(){var n,i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return n=this,[4,(i=t.vPt).iPt()];case 1:r=o.sent().filter(function(t){return ji(t.references,n.XSt.o)}),e=Lt(r),o.label=2;case 2:return(s=e()).done?[3,7]:(Xi((u=s.value).references,this.XSt.o),0!==u.references.length?[3,4]:[4,i._S(u.key)]);case 3:return o.sent(),this.Usi(u),[3,6];case 4:return[4,i.zSt(u)];case 5:o.sent(),o.label=6;case 6:return[3,2];case 7:return[2]}})}).call(this)},n.Usi=function(t){},t}(),e2=function(){function t(){}return t.prototype.Ret=function(t,n,i){return new r2(t,n,i)},t}(),s2=new e2;F(),Et(),Wt(),Bt(),Qt(),F(),Et();var u2=function(){function t(t,n){this.pE=void 0,this.Wsi=void 0,this.hu=void 0,this.pE=t,this.Wsi=n}var n=t.prototype;return n.Vsi=function(t){this.Hsi(t)},n.Hsi=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.Wsi.xsi(t)];case 1:return n.sent(),[3,3];case 2:return n.sent(),this.pE.Mot(o1.ERROR),[3,3];case 3:return[2]}})}).call(this)},Nt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{renew:function(n){t.Vsi(n)}}}(this)),this.hu}}]),t}(),o2=function(t){function n(n,i,r,e,s,u){var o;(o=t.call(this)||this).hS=void 0,o.Not=void 0,o.hu=void 0,o.Ac=void 0,o.Ksi=void 0,o.cPt=void 0,o.Wsi=void 0,o.Jsi=new hr,o.Qsi=void 0,o.evictOnLoading=function(){o.mn("Eot",o.evictOnLoading),o.Zsi()},o.hS=n,o.Ac=i,o.Ksi=r,o.cPt=e,o.Wsi=s.Ret(o,o.cPt,u),o.Qsi=new u2(o,o.Wsi),o.Not=1===o.Wsi.fsi.jei?o1.DONE:o1.IDLE,o.Wsi.wn("y4t",function(t){o.Rs(t),1===o.Gsi&&o.Mot(o1.DONE)});var h=new Date,c=o.Ksi.expirationDate.getTime()-h.getTime();return function(t){return t<2147483647}(c)&&w(function(){return o.Zsi()},c),o}Ct(n,t);var i=n.prototype;return i.Mot=function(t){this.Not!==t&&(this.Not=t,this.So(new s1))},i.Tn=function(){this.Not===o1.EVICTED||this.Not===o1.DONE||this.Ysi()},i.Ysi=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),this.Mot(o1.LOADING),t=new hr,this.Jsi=t,[4,this.Wsi.mi(t.Yg)];case 1:return n.sent(),this.Mot(o1.DONE),[3,4];case 2:return vr(n.sent())?this.Mot(o1.IDLE):this.Mot(o1.ERROR),[3,4];case 3:return this.Jsi.zg(),[7];case 4:return[2]}})}).call(this)},i.zx=function(){this.Jsi.Zg()},i._S=function(){this.hk===o1.LOADING?(this.wn("Eot",this.evictOnLoading),this.zx()):this.Zsi()},i.Zsi=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,this.Wsi.Psi()];case 1:return t=n.sent(),[4,s2.Ret(this,this.cPt,t).Bsi()];case 2:return n.sent(),this.Wsi.fsi=g1.Kei,this.Mot(o1.EVICTED),[3,4];case 3:return n.sent(),this.Mot(o1.ERROR),[3,4];case 4:return[2]}})}).call(this)},Nt(n,[{key:"Oei",get:function(){return this.Wsi.Oei}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var n,i={get id(){return t.o},get status(){return t.hk},get source(){return t.Mc},get parameters(){return t.NS},get duration(){return t.ct},get cached(){return t.qsi._s()},get secondsCached(){return t.zsi},get percentageCached(){return t.Gsi},get bytes(){return t.Xsi},get bytesCached(){return t.jsi},get license(){return t.lQ.Ca},start:function(){t.Tn()},pause:function(){t.zx()},remove:function(){t._S()},addEventListener:function(t,i){n.wn(t,i)},removeEventListener:function(t,i){n.mn(t,i)}};return n=new hR(t,["y4t","Eot"],i),i}(this)),this.hu}},{key:"o",get:function(){return this.hS}},{key:"lQ",get:function(){return this.Qsi}},{key:"hk",get:function(){return this.Not}},{key:"Mc",get:function(){return this.Ac}},{key:"NS",get:function(){return this.Ksi}},{key:"ct",get:function(){return this.Wsi.fsi.ZM}},{key:"qsi",get:function(){return this.Wsi.fsi.Xei}},{key:"zsi",get:function(){return this.Wsi.fsi.Gei}},{key:"Gsi",get:function(){return this.Wsi.fsi.jei}},{key:"Xsi",get:function(){return this.Wsi.vsi}},{key:"jsi",get:function(){return this.Wsi.fsi.qei}}]),n}(ih);var h2=function(){function t(t,n){this.cPt=void 0,this.$si=void 0,this.cPt=t,this.$si=n}var n=t.prototype;return n.Uei=function(t,n,i){var r=zE();return this.Bei(r,t,n,i)},n.Bei=function(t,n,i,r){return new o2(t,n,i,this.cPt,this.$si,r)},t}();F(),Et();function c2(t){if(!t)throw new y("Unexpected - The cache parameters are undefined");var n=function(t){if(qn(t)&&!Lo(t,"%"))return A(t);return t}(t.amount);!function(t){if(function(t){return qn(t)&&Lo(t,"%")}(t)){var n=T(t);if(S(n)||n<0||n>100)throw new y("The amount as percentage must be between 0 and 100 percent.")}if(!qn(t)&&S(t))throw new y("The amount must be a number or a string")}(n);var i=function(t){if(!t)return function(){var t=new Date;return t.setMinutes(t.getMinutes()+30),t}();return t}(t.expirationDate);!function(t){if(t&&!function(t){return!t||Qn(t)&&t>new Date}(t))throw new y("Invalid expiration date for the cache parameters")}(i);var r=function(t){if(void 0===t)return 1/0;return t}(t.bandwidth);!function(t){if(S(t)||t<0)throw new y("The bandwidth must be between zero and infinity.")}(r);var e=function(t){if(!t)return 5;if(S(t))throw new y("The amount must be a number");return t}(t.numberOfParallelTasks);return{amount:n,expirationDate:i,bandwidth:r,parallelTasksThreshold:e,preferredTrackSelection:{audioTrackSelection:[],textTrackSelection:[]}}}var a2=function(){function t(t,n,i,r){var e=this;this.cPt=void 0,this.Wsi=void 0,this.tni=void 0,this.VJ=void 0,this.nni=[],this.ini=0,this.eni=0,this.sni=void 0,this.nT=void 0,this.nV=void 0,this.$si=void 0,this.Rz=void 0,this.zti=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return(t=this.B6t())?[4,this.EGt(t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(e)},this.jti=function(){var t=e.nni.shift();null==t||t._S()},this.hni=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:i=!1,r.label=1;case 1:return i?[3,3]:[4,t.ww("y4t")];case 2:return r.sent(),i=1===t.fsi.jei,[3,1];case 3:return n.ct<5&&this.zti(),[2]}})}).call(e)},this.VJ=t,this.nV=n,this.nT=new hr,this.$si=i,this.Rz=r,this.cPt=new pW}var n=t.prototype;return n.B6t=function(){if(this.tni)for(var t=this.tni.A0t;this.ini0,o=this.G0t,h=this.Pni(o),t.PKt?(t.PKt.od=o,void 0!==o.Ont.skipOffset&&void 0!==(c=MJ.NZt(o.Ont.skipOffset,t.PKt.ct))&&c0?this.mni():(this.Sni(),this.G0t=o)),[3,10];case 7:return null!==t?[3,9]:[4,this.Bni()];case 8:return g.sent(),[3,10];case 9:this.yni(!0),g.label=10;case 10:return[2]}})}).call(this)},i.Bni=function(){var t=this.Ini;return this.qii(t&&t.Rc())},i.yni=function(t){this.Cni(cJ.DJt),this.Nni(),this.gni=1;var n=void 0!==this.G0t&&this.G0t.uZt.Oti();if(this.Tni=!1,!n||this.Ani){if(!this.G3t)return;this.oa.be(),!this.oa.UP&&t&&this.oa.Gx(),void 0!==this.bni&&this.oa.OP(this.bni),this.i3t(),this.Ani=!1,this.bni=void 0}else t&&(this.gni=1,this.mni())},i.i3t=function(){this.Mni(),t.prototype.i3t.call(this)},i.Mni=function(){if(this.oa.UP&&(this.gni=5),this.G0t){var t=this.G0t.uZt;t.Vti()&&this.M3t.So(new Ux(this.Pni(this.G0t))),this._ni.dii(t),this.G0t=void 0}},i.Rni=function(t){this.Lni=this.Lni.concat(t)},i.Nni=function(){this.Lni=[]},i.Oni=function(t){this.oa.xe.appendChild(t)},i.Cni=function(t){for(var n,i=Lt(this.Lni);!(n=i()).done;){var r=n.value;r.eX===t&&xK(r.eventURL)}},i.Dni=function(t){this.lni.Aii(cJ.TJt);for(var n,i=Lt(t);!(n=i()).done;){var r=n.value;xK(r)}},i.knt=function(t){for(var n,i=Lt(this.J9t());!(n=i()).done;){var r=n.value;UK(r.sources,r.timeOffset)||t.M6(r,Sx.gnt,!1)}},i.J9t=function(){for(var t,n,i=[],r=Lt(this.mnt.concat(this.Ant));!(n=r()).done;){var e=n.value;i.push(e.Ont)}for(var s,u=Lt(this.pni.concat(this._ni.Ant.filter(function(t){return!t.P0t()})));!(s=u()).done;)for(var o,h=Lt(s.value.A0t);!(o=h()).done;){var c=o.value;c.W||i.push(c.Ont)}return(t=i).push.apply(t,[].concat(this.dni)),ir(i)},i.Eni=function(){return!!this.G0t&&RZ(this.G0t).some(function(t){return t.PKt})},i.Pni=function(t){return t.uZt.Cti},i.yei=function(){return this.Fni},i.Wx=function(){return this.xii.Wx()},i.xP=function(){return this.xii.xP()},i.K3t=function(t){this._ni.K3t(t)},i.kn=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.prototype.kn.call(n)];case 1:return i.sent(),this.oa.mn(eh.uo,this.vni),this.M3t.CK(this.lni.M3t),this.M3t.CK(this.eei.M3t),this.M3t.CK(this._ni),this.lni.kn(),this.eei.kn(),[4,this.xii.kn()];case 2:return i.sent(),[2]}})}).call(this)},Nt(n,[{key:"B3t",get:function(){return this}},{key:"C3t",get:function(){return n.C3t}},{key:"ynt",get:function(){return this.G0t?this.Pni(this.G0t):null}},{key:"mnt",get:function(){return this.G0t?[this.lni.Iii,this.eei.oei].filter(Un):[]}},{key:"Ant",get:function(){var t=this.pni.concat(this._ni.Ant.filter(function(t){return!t.P0t()}));return Ji(t,function(t){return t.Cti.Jc.filter(function(t){return!t.P0t()})})}},{key:"bnt",get:function(){return this._ni.Ant.map(function(t){return t.Cti})}}],[{key:"C3t",get:function(){return UZ.U0t}}]),n}(r0),m2=function(){function t(){}var n=t.prototype;return n.qz=function(t){return t&&("string"!=typeof t.integration||t.integration===mS.DEFAULT||t.integration===mS.CSAI||t.integration===mS.THEO)},n.x3t=function(t,n,i){var r=new ix(t.Ost,t.Ql,i);r.ust(t.xe);var e=new rS(t.xe,i,t.SP,t.Dst,t.Fx,r,t.Ql);return new _2(t,n,e,i,t.Dst,t.SP)},n.M6=function(t,n,i,r){i.K9t(t,n,r)},n.sj=function(t){var n=QJ(t.sources);if(n){var i={integration:mS.CSAI,sources:n};"vast"===i.sources.type&&void 0===t.timeOffset?t.timeOffset=0:"vmap"===i.sources.type&&void 0!==t.timeOffset&&We("Do not set timeOffset for VMAP ad sources. VMAP ads have their own offsets included.");var r=KJ(t.timeOffset);void 0!==r&&(i.timeOffset=r);var e=KJ(t.skipOffset);return void 0!==e&&(i.skipOffset=e),i}},Nt(t,[{key:"P3t",get:function(){return _2.C3t}}]),t}();yS.Ng.zz(new m2),F(),Et(),F(),Et(),Bt();var y2=function(){function t(t,n){this.vti=void 0,this.Q1t=void 0,this.Yit=void 0,this.Gni=void 0,this.j6=!1,this.Yit=t;var i=v.createElement("div");i.className="theoplayer-ima-wrapper",ci(i),i.style.zIndex="10",On.Ks&&function(t,n){t.addEventListener(n,ui)}(i,"mousedown"),n.appendChild(i);var r=v.createElement("div");r.className="theoplayer-ima",r.style.height="100%",this.Gni=r,i.appendChild(r),this.Q1t=i,this.vti=new google.ima.AdDisplayContainer(this.Gni,this.Yit)}var n=t.prototype;return n.VY=function(){var t;this.j6||(null==(t=this.vti)||t.initialize(),this.j6=!0)},n.Qni=function(t){"linear"===t?this.Q1t.style.marginTop="0px":"nonlinear"===t&&(this.Q1t.style.marginTop="-45px")},n.be=function(){this.Q1t.style.opacity="1",this.Q1t.style.pointerEvents=""},n.we=function(){this.Q1t.style.opacity="0",this.Q1t.style.pointerEvents="none"},n.zg=function(){var t;null==(t=this.vti)||t.destroy(),this.vti=void 0},Nt(t,[{key:"fii",get:function(){return this.Q1t}},{key:"zni",get:function(){return this.Gni.offsetHeight}},{key:"Xni",get:function(){return this.Gni.offsetWidth}},{key:"jni",get:function(){return this.vti}}]),t}();F(),Et(),Wt(),Dt(),Qt(),F(),Et(),Dt(),Ut(),F(),Et(),Bt();var p2=function(){function t(t){this.Kni=void 0,this.iYt=void 0,this.Kni=t;var n=new google.ima.CompanionAdSelectionSettings;n.resourceType=google.ima.CompanionAdSelectionSettings.ResourceType.ALL,n.creativeType=google.ima.CompanionAdSelectionSettings.CreativeType.ALL,n.sizeCriteria=google.ima.CompanionAdSelectionSettings.SizeCriteria.IGNORE,this.iYt=t.getCompanionAds(0,0,n)}return Nt(t,[{key:"UYt",get:function(){return this.Kni.getAdId()}},{key:"V7t",get:function(){var t=this.Kni.getAdPodInfo();if(void 0!==t)try{return{i7t:t.getAdPosition(),p0t:t.getMaxDuration(),Yni:t.getPodIndex(),_Ot:t.getTimeOffset(),e7t:t.getTotalAds(),Jni:t.getIsBumper()}}catch(t){return}}},{key:"yKt",get:function(){return this.Kni.getAdSystem()}},{key:"Zni",get:function(){return this.Kni.getAdvertiserName()}},{key:"cYt",get:function(){var t;return null!=(t=this.Kni.getApiFramework())?t:void 0}},{key:"IKt",get:function(){return this.iYt.map(function(t){return{lYt:t.getAdSlotId(),qT:t.getContentType(),p4t:t.getContent(),Mi:t.getHeight(),Ti:t.getWidth()}})}},{key:"qT",get:function(){var t;return null!=(t=this.Kni.getContentType())?t:void 0}},{key:"GKt",get:function(){return this.Kni.getCreativeId()}},{key:"I9t",get:function(){return this.Kni.getCreativeAdId()}},{key:"$ni",get:function(){return this.Kni.getDealId()}},{key:"dB",get:function(){return this.Kni.getDescription()}},{key:"ct",get:function(){return this.Kni.getDuration()}},{key:"Ti",get:function(){return this.Kni.getWidth()}},{key:"Mi",get:function(){return this.Kni.getHeight()}},{key:"tJt",get:function(){var t;return null!=(t=this.Kni.getMediaUrl())?t:void 0}},{key:"tri",get:function(){return this.Kni.getMinSuggestedDuration()}},{key:"P9t",get:function(){return this.Kni.getSkipTimeOffset()}},{key:"iri",get:function(){return this.Kni.getSurveyUrl()}},{key:"dq",get:function(){return this.Kni.getTitle()}},{key:"k9t",get:function(){return this.Kni.getTraffickingParameters()}},{key:"E9t",get:function(){return this.Kni.getTraffickingParametersString()}},{key:"CKt",get:function(){return this.Kni.getUniversalAdIds().map(function(t){return{R9t:t.getAdIdRegistry(),C9t:t.getAdIdValue()}})}},{key:"Ati",get:function(){return this.Kni.getUiElements()}},{key:"x9t",get:function(){return this.Kni.getVastMediaBitrate()}},{key:"S9t",get:function(){return this.Kni.getVastMediaHeight()}},{key:"b9t",get:function(){return this.Kni.getVastMediaWidth()}},{key:"m9t",get:function(){return this.Kni.getWrapperAdIds()}},{key:"w9t",get:function(){return this.Kni.getWrapperAdSystems()}},{key:"y9t",get:function(){return this.Kni.getWrapperCreativeIds()}},{key:"D7t",get:function(){return this.Kni.isLinear()}}]),t}();function k2(){return[google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,google.ima.AdEvent.Type.CLICK,google.ima.AdEvent.Type.DURATION_CHANGE,google.ima.AdEvent.Type.EXPANDED_CHANGED,google.ima.AdEvent.Type.STARTED,google.ima.AdEvent.Type.IMPRESSION,google.ima.AdEvent.Type.PAUSED,google.ima.AdEvent.Type.RESUMED,google.ima.AdEvent.Type.AD_PROGRESS,google.ima.AdEvent.Type.AD_BUFFERING,google.ima.AdEvent.Type.FIRST_QUARTILE,google.ima.AdEvent.Type.MIDPOINT,google.ima.AdEvent.Type.THIRD_QUARTILE,google.ima.AdEvent.Type.COMPLETE,google.ima.AdEvent.Type.USER_CLOSE,google.ima.AdEvent.Type.LINEAR_CHANGED,google.ima.AdEvent.Type.LOADED,google.ima.AdEvent.Type.AD_CAN_PLAY,google.ima.AdEvent.Type.AD_METADATA,google.ima.AdEvent.Type.AD_BREAK_READY,google.ima.AdEvent.Type.INTERACTION,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,google.ima.AdEvent.Type.SKIPPED,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,google.ima.AdEvent.Type.LOG,google.ima.AdEvent.Type.VIEWABLE_IMPRESSION,google.ima.AdEvent.Type.VOLUME_CHANGED,google.ima.AdEvent.Type.VOLUME_MUTED]}var b2=function(t){function n(n,i,r){var e;(e=t.call(this)||this).y0t=void 0,e.vti=void 0,e.sc=void 0,e.qc=[],e.sri=function(t){t.getAd().isLinear()?e.vti.Qni("linear"):e.vti.Qni("nonlinear")},e.eri=function(){e.y0t.resize(e.vti.Xni,e.vti.zni,google.ima.ViewMode.NORMAL)},e.forwardAdEventListener=function(t){var n=t.getAd(),i=function(t){var n;return((n={})[google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED]=a0.V6t,n[google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED]=a0.H6t,n[google.ima.AdEvent.Type.CLICK]=a0.W6t,n[google.ima.AdEvent.Type.DURATION_CHANGE]=a0.Rw,n[google.ima.AdEvent.Type.EXPANDED_CHANGED]=a0.q6t,n[google.ima.AdEvent.Type.STARTED]=a0.z6t,n[google.ima.AdEvent.Type.IMPRESSION]=a0.G6t,n[google.ima.AdEvent.Type.PAUSED]=a0.Gz,n[google.ima.AdEvent.Type.RESUMED]=a0.X6t,n[google.ima.AdEvent.Type.AD_PROGRESS]=a0.j6t,n[google.ima.AdEvent.Type.AD_BUFFERING]=a0.Q6t,n[google.ima.AdEvent.Type.FIRST_QUARTILE]=a0.K6t,n[google.ima.AdEvent.Type.MIDPOINT]=a0.mJt,n[google.ima.AdEvent.Type.THIRD_QUARTILE]=a0.Y6t,n[google.ima.AdEvent.Type.COMPLETE]=a0.wJt,n[google.ima.AdEvent.Type.USER_CLOSE]=a0.J6t,n[google.ima.AdEvent.Type.LINEAR_CHANGED]=a0.Z6t,n[google.ima.AdEvent.Type.LOADED]=a0.$6t,n[google.ima.AdEvent.Type.AD_CAN_PLAY]=a0.t8t,n[google.ima.AdEvent.Type.AD_METADATA]=a0.i8t,n[google.ima.AdEvent.Type.AD_BREAK_READY]=a0.e8t,n[google.ima.AdEvent.Type.INTERACTION]=a0.s8t,n[google.ima.AdEvent.Type.ALL_ADS_COMPLETED]=a0.n8t,n[google.ima.AdEvent.Type.SKIPPED]=a0.r8t,n[google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED]=a0.h8t,n[google.ima.AdEvent.Type.LOG]=a0.o8t,n[google.ima.AdEvent.Type.VIEWABLE_IMPRESSION]=a0.a8t,n[google.ima.AdEvent.Type.VOLUME_CHANGED]=a0.u8t,n[google.ima.AdEvent.Type.VOLUME_MUTED]=a0.c8t,n)[t]}(t.type),r={type:i,date:new Date,Int:n?e.rri(n):void 0,S7t:l0(i,t.getAdData())};e.So(r)},e.forwardAdErrorEventListener=function(t){e.So({date:new Date,Int:void 0,type:f0.d8t,S7t:{n9t:_0(t.getError())}})},e.y0t=n,e.vti=i,e.sc=r,e.sc.wn(hI.yn,e.eri),e.y0t.init(e.vti.Xni,e.vti.zni,google.ima.ViewMode.NORMAL),e.y0t.addEventListener(google.ima.AdEvent.Type.LOADED,e.sri),e.y0t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,e.forwardAdErrorEventListener);for(var s,u=Lt(k2());!(s=u()).done;){var o=s.value;e.y0t.addEventListener(o,e.forwardAdEventListener)}return e}Ct(n,t);var i=n.prototype;return i.Ox=function(t){var n;null==(n=this.y0t)||n.setVolume(t)},i.Lx=function(){return this.y0t.getVolume()},i.i9t=function(){return this.y0t.getRemainingTime()},i.zg=function(){Yi(this.qc),this.sc.mn(hI.yn,this.eri),this.y0t.removeEventListener(google.ima.AdEvent.Type.LOADED,this.sri),this.y0t.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.forwardAdErrorEventListener);for(var t,n=Lt(k2());!(t=n()).done;){var i=t.value;this.y0t.removeEventListener(i,this.forwardAdEventListener)}this.y0t.destroy()},i.Tn=function(){this.y0t.start()},i.cti=function(){this.y0t.resume()},i.zx=function(){this.y0t.pause()},i.rD=function(){this.y0t.skip()},i.Xx=function(){this.y0t.stop()},i.O7t=function(){var t=this.y0t.getCurrentAd();if(t)return this.rri(t)},i.gti=function(){return this.y0t.getCuePoints()},i.rri=function(t){var n=Ui(this.qc,function(n){return n.Kni===t});return n||(n=new p2(t),this.qc.push(n)),n},i.kti=function(t){this.y0t.updateAdsRenderingSettings(E2(t))},n}(th);F(),Et(),Bt(),Dt();var A2=function(t){function n(n,i){var r;return(r=t.call(this,"xti")||this).ari=void 0,r.Q1t=void 0,r.ari=n,r.Q1t=i,r}return Ct(n,t),n.prototype.xa=function(){return new T2(this.ari)},Nt(n,[{key:"hri",get:function(){return this.ari}},{key:"fii",get:function(){return this.Q1t}}]),n}(kw),T2=function(t){function n(n){var i;return(i=t.call(this,"adsmanagerloaded")||this).ari=void 0,i.ari=n,i}return Ct(n,t),Nt(n,[{key:"adsManager",get:function(){return this.ari}}]),n}(rh),S2=function(t){function n(n,i){var r;return(r=t.call(this)||this).lti=void 0,r.sc=void 0,r.dri=void 0,r.cri=void 0,r.lri=void 0,r.fri=void 0,r.onAdsManagerLoadedListener=function(t){if(r.lri&&r.fri&&r.cri){var n,i=E2(r.fri),e=r.lri,s=t.getAdsManager({get currentTime(){return e.MP},get duration(){return e.ct}},i),u=new b2(s,r.dri,r.sc);r.So(new A2(s,r.dri.fii)),null==(n=r.cri)||n.Xy(u),r.cri=void 0}},r.onAdsManagerErrorListener=function(t){var n,i={Py:t.getError().getMessage(),s7t:t.getError().getVastErrorCode(),YJt:t.getError().getErrorCode(),Km:w0(t.getError().getType()),n7t:void 0};null==(n=r.cri)||n.jy(i),r.cri=void 0},r.sc=i,r.dri=n,r}Ct(n,t);var i=n.prototype;return i.dti=function(){var t;null==(t=this.lti)||t.contentComplete()},i.C6t=function(t,n,i){return Vt(function(){var r;return zt(this,function(e){if(this.cri)throw new y("Only one ImaAdsRequest can be made at a time.");if(!this.dri.jni)throw new y("AdDisplayContainer is not initialized.");return this.lti=new google.ima.AdsLoader(this.dri.jni),this.lti.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoadedListener),this.lti.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsManagerErrorListener),this.cri=new Vc,this.lri=n,this.fri=i,r=new google.ima.AdsRequest,t.G5t?r.adTagUrl=t.G5t:t.X5t&&(r.adsResponse=t.X5t),r.linearAdSlotWidth=t.U5t,r.linearAdSlotHeight=t.V5t,r.nonLinearAdSlotWidth=t.H5t,r.nonLinearAdSlotHeight=t.W5t,r.contentDuration=t.Q5t,r.setAdWillAutoPlay(t.q5t),r.setAdWillPlayMuted(t.z5t),t.j5t&&(r.omidAccessModeRules=t.j5t),this.lti.requestAds(r),[2,this.cri.Qy]})}).call(this)},i.zg=function(){var t;void 0!==this.lti&&(this.lti.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoadedListener),this.lti.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsManagerErrorListener),this.lti.destroy(),this.lti=void 0),null==(t=this.cri)||t.jy("AdsLoader destroyed"),this.cri=void 0},n}(th);function E2(t){var n=new google.ima.AdsRenderingSettings;return n.enablePreloading=t.bti,t.Ati&&(n.uiElements=t.Ati),n.mimeTypes=t.yti,void 0!==t.Tti&&(n.playAdsAfterTime=t.Tti),void 0!==t.Sti&&(n.loadVideoTimeout=t.Sti),void 0!==t.T9t&&(n.bitrate=t.T9t),void 0!==t.Tti&&(n.playAdsAfterTime=t.Tti),n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n}F(),Et(),Bt(),Dt();var I2=function(t){function n(n){var i;return(i=t.call(this)||this).vri=void 0,i.oa=void 0,i.oa=n,i.vri=i.oa.LP(),i.oa.wn(eh._y,function(){i.oa.kx||(i.vri=i.oa.LP()),i.So(new pw(i.MP,void 0))}),i}return Ct(n,t),n.prototype.hr=function(){this.vri=0},Nt(n,[{key:"MP",get:function(){return this.oa.kx?this.vri:this.oa.LP()}},{key:"ct",get:function(){return this.oa.Nd()}},{key:"$P",get:function(){return this.oa.$P}},{key:"Mx",get:function(){return this.oa.Mx}}]),n}(th);U0.Ng.registerWebImaAdPlayerConstructor(function(t,n,i){O0(i);var r=M0(i)?t.Wx():void 0,e=new y2(r,t.xe),s=new S2(e,t.Wu),u=new I2(t);return new L0(t,n,i,t.Nst,e,s,u)}),F(),Et(),F(),Et(),Wt(),Bt(),Dt(),H(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Qt();var R2=function(t){function n(n,i,r){var e;return(e=t.call(this,r)||this).Qst=void 0,e.J4t=void 0,e.Pri=!0,e.Qst=n,e.J4t=i,e}Ct(n,t);var i=n.prototype;return i.gr=function(t,n,i,r,e){(e||!r.hx||r.UP)&&this.oa.hx&&this.oa.Gx()},i.OP=function(t,n){},i.BP=function(t){},i.gri=function(n,i){var r=n-this.J4t.pri;return t.prototype.OP.call(this,r,i)},i.wri=function(n){return t.prototype.BP.call(this,n)},i.NP=function(){return this.Qst.bt},i.nu=function(){return this.Qst.nu()},i.Nd=function(){return this.Qst.Nd()},i.Tx=function(){var t=TA.jn(this.Qst.Tx()).Ny(this.J4t.pri);if(this.yri())return t._s();var n=TA.jn(this.J4t.Tx()),i=n;return d4(this.Qst)||(i=t.OM(n)),(i=i.Mn(TA.tL(0,this.LP())))._s()},i.LP=function(){return this.Ari(t.prototype.LP.call(this))},i.Ari=function(t){return this.J4t.bri?this.J4t.bri:this.oa===this.J4t?this.J4t.Sri+t:this.J4t.pri+t},i.DP=function(){return this.Tri(t.prototype.LP.call(this))},i.Tri=function(t){return this.J4t.kri?this.J4t.kri:this.oa===this.J4t&&this.J4t.Eri?new Date(this.J4t.Eri.getTime()+1e3*t):this.Qst.CP},i.RP=function(){var t=TA.jn(this.Qst.RP()).Ny(this.J4t.pri);if(this.yri())return t._s();var n=TA.jn(this.J4t.RP());return t.An(t.V-1)=r||(this.ioi.push(t),n?this.Foi.set(n.jI,t):this.Woi.push(t),this.Poi.qhi(t))},n.qoi=function(t){var n=this.Foi.get(t.jI);if(void 0!==n){var i=t.BLt["X-RESUME-OFFSET"],r=isFinite(t.PO)?this.Poi.Noi(t.PO):void 0;n.er({ct:t.ct,PO:r,Ori:void 0!==i?Number(i):void 0})}},n.poi=function(t){this.zoi(t)},n.zoi=function(t){void 0!==this.Foi.get(t.jI)&&this.Foi.delete(t.jI)},n.Goi=function(t){var n=this;t.forEach(function(t){return n.zhi(t)})},n.zhi=function(t){Xi(this.ioi,t)},n.hr=function(){var t,n,i,r;this.Moi=void 0,this.voi(void 0),this.goi(void 0);for(var e,s=Lt(this.aoi.slice());!(e=s()).done;){var u=e.value;this.coi(u)}Yi(this.aoi),Yi(this.ioi),Yi(this.Woi),this.Foi.clear(),null==(t=this.soi)||t.removeEventListener("adbreak",this.noi),null==(n=this.soi)||n.removeEventListener("overlay",this.roi),null==(i=this.soi)||i.removeEventListener("streaminfo",this.hoi),null==(r=this.soi)||r.close(),this.soi=void 0},n.kn=function(){this.hr()},Nt(t,[{key:"toi",get:function(){return this.ioi}}]),t}();function w3(t){if(t){var n=t.sz.default;return On.Ks&&t.sz.phone?n=t.sz.phone:On.og&&t.sz.tv&&(n=t.sz.tv),{Ahi:t.iu,bhi:n}}}function g3(t){var n=J2[t.type],i=t.default;return On.Ks&&t.phone?i=t.phone:On.og&&t.tv&&(i=t.tv),{Km:n,nyt:i}}function _3(t){var n,i,r,e;return t.top&&t.top>=0&&t.top<=100?n=t.top:t.bottom&&t.bottom>=0&&t.bottom<=100?i=t.bottom:n=10,t.left&&t.left>=0&&t.left<=100?r=t.left:t.right&&t.right>=0&&t.right<=100?e=t.right:r=10,{z9:n,q9:i,W9:r,H9:e}}function m3(t){return{Ti:t.width&&t.width>=0&&t.width<=100?t.width:10,Mi:t.height&&t.height>=0&&t.height<=100?t.height:10}}F(),Et(),Bt(),Dt();var y3=function(t){function n(n){var i;return(i=t.call(this)||this).oa=void 0,i.hu=void 0,i.oa=n,i}return Ct(n,t),n.prototype.Mhi=function(t){Zn(t)?this.oa.Mhi(t):Vn.dm("Incorrect ad tag parameters type, expecting a Record.")},Nt(n,[{key:"Xoi",get:function(){return this.oa.Xoi.map(function(t){return t.wnt()})}},{key:"joi",get:function(){return this.oa.joi.map(function(t){return t.wnt()})}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get currentInterstitials(){return t.Xoi},get scheduledInterstitials(){return t.joi},replaceAdTagParameters:function(n){t.Mhi(n)},addEventListener:function(n,i){t.wn(n,i)},removeEventListener:function(n,i){t.mn(n,i)}}}(this)}}]),n}(th);F(),Et(),Bt();var p3=function(){function t(){this.s5t=new DI,this.Qoi=void 0}var n=t.prototype;return n.$hi=function(t){this.Qoi=t},n.rD=function(){},n.Snt=function(t){},n.knt=function(t){},n.kn=function(){return this.Qoi=void 0,ut.resolve()},Nt(t,[{key:"M3t",get:function(){return this.s5t}},{key:"G3t",get:function(){var t;return void 0!==(null==(t=this.Qoi)?void 0:t.ynt)}},{key:"C3t",get:function(){return UZ.ont}},{key:"mnt",get:function(){var t;return(null==(t=this.Qoi)?void 0:t.B9t)?[this.Qoi.B9t]:[]}},{key:"ynt",get:function(){var t,n;return null!=(n=null==(t=this.Qoi)?void 0:t.ynt)?n:null}},{key:"Ant",get:function(){var t=this;return this.Qoi?Ji(this.Qoi.A0t,function(n){var i,r=n.Jc;if(n===(null==(i=t.Qoi)?void 0:i.ynt)&&void 0!==t.Qoi.B9t){var e=r.indexOf(t.Qoi.B9t);if(e>=0)return r.slice(e+1)}return n._x?[]:r}):[]}},{key:"bnt",get:function(){var t=this;return this.Qoi?this.Qoi.A0t.filter(function(n){var i;return n===(null==(i=t.Qoi)?void 0:i.ynt)||!n._x}):[]}}]),t}();F(),Et(),Wt(),Bt(),Qt();var k3=function(){function t(t,n,i){var r=this;this.oa=void 0,this.Lhi=void 0,this.Koi=[],this.Joi=void 0,this.Zoi=Ju(),this.eai=void 0,this.gn=void 0,this.stt=function(t){m$(r.Joi,r.oa.Bx,r.oa.Rx,t.width,t.height)},this.CXt=function(){m$(r.Joi,r.oa.Bx,r.oa.Rx,r.gn.Eu,r.gn.Iu)},this.Tii=function(t){t.stopPropagation()},this.oa=t,this.eai=i;var e=v.createElement("div");e.style.display="none",e.className="theoads-image-overlays-container",ci(e),n.appendChild(e),this.Joi=e,this.gn=new pI(n),this.gn._n(),this.gn.wn(hI.yn,this.stt),this.oa.wn(eh.Jw,this.CXt)}var n=t.prototype;return n.Yoi=function(t){return Vt(function(){var n,i,r,e;return zt(this,function(s){switch(s.label){case 0:return this.Koi.push(t),this.Joi.style.display="",(n=v.createElement("div")).className="theoplayer-theoads-overlay",n.style.display="",this.Zoi.set(t.o,n),i=v.createElement("a"),[4,this.$oi(t)];case 1:return(r=s.sent()).clickThroughURI&&(this.Joi.style.zIndex="11",i.href=r.clickThroughURI,i.target="Xu",i.setAttribute("rel","noopener"),i.addEventListener("mousedown",this.Tii),i.addEventListener("touchend",this.Tii)),t.shi===K2.image&&(i.style.backgroundImage="url("+r.resourceURI+")",i.style.backgroundSize="contain",i.style.backgroundPosition="center",i.style.backgroundRepeat="no-repeat",r.impressionURI&&((e=v.createElement("img")).src=r.impressionURI,e.style.display="none",i.appendChild(e))),ci(i),function(t,n){t.style.position="absolute";var i=n.mo;i.W9&&(t.style.left=i.W9+"%");i.H9&&(t.style.right=i.H9+"%");i.z9&&(t.style.top=i.z9+"%");i.q9&&(t.style.bottom=i.q9+"%");var r=n.Vy;r.Ti&&(t.style.width=r.Ti+"%");r.Mi&&(t.style.height=r.Mi+"%");n.nhi&&n.nhi>0&&n.nhi<=100&&(t.style.opacity=""+n.nhi/100)}(n,t),n.appendChild(i),this.Joi.appendChild(n),[2]}})}).call(this)},n.tai=function(t){var n=this.Zoi.get(t.o);n&&(this.Joi.contains(n)&&this.Joi.removeChild(n),this.Zoi.delete(t.o),0===this.Zoi.size&&(this.Joi.style.display="none"),Xi(this.Koi,t))},n.iai=function(){var t=this;this.Zoi.forEach(function(n){t.Joi.contains(n)&&t.Joi.removeChild(n)}),this.Zoi.clear(),this.Koi=[]},n.$oi=function(t){return Vt(function(){var n,i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return n={resourceURI:""},t.rhi?((r=Yu({},this.Lhi,t.Hri))&&!r[r3]&&(r[r3]=s3.xhi),[4,this.eai.yhi(t.rhi,r)]):[3,2];case 1:i=o.sent(),o.label=2;case 2:return i?(n.resourceURI=i.image,n.impressionURI=i.impression):t.LJt&&((e=Ui(t.LJt,function(t){return t.Km===J2.svg}))&&(n.resourceURI=e.nyt),(s=Ui(t.LJt,function(t){return t.Km===J2.png}))&&(n.resourceURI=s.nyt)),n.clickThroughURI=null!=(u=null==i?void 0:i.clickThrough)?u:t.AYt,t.er({imageUrl:n.resourceURI,clickThrough:n.clickThroughURI}),[2,n]}})}).call(this)},n.hr=function(){this.iai(),this.Joi.style.display="none"},Nt(t,[{key:"Xoi",get:function(){return this.Koi}},{key:"Hri",get:function(){return this.Lhi},set:function(t){this.Lhi=t}}]),t}();F(),Et(),Dt();var b3=function(t){function n(n){var i;return(i=t.call(this,"addinterstitial")||this).interstitial=void 0,i.interstitial=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var A3=function(t){function n(n){var i;return(i=t.call(this,"nai")||this).interstitial=void 0,i.interstitial=n,i}return Ct(n,t),n.prototype.xa=function(){return new T3(this.interstitial.wnt())},n}(kw),T3=function(t){function n(n){var i;return(i=t.call(this,"interstitialend")||this).interstitial=void 0,i.interstitial=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var S3=function(t){function n(n,i){var r;return(r=t.call(this,"rai")||this).interstitial=void 0,r.Py=void 0,r.interstitial=n,r.Py=i,r}return Ct(n,t),n.prototype.xa=function(){return new E3(this.interstitial.wnt(),this.Py)},n}(kw),E3=function(t){function n(n,i){var r;return(r=t.call(this,"interstitialerror")||this).interstitial=void 0,r.message=void 0,r.interstitial=n,r.message=i,r}return Ct(n,t),n}(rh);F(),Et(),Wt(),Bt(),Dt(),Qt();var I3=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).n7=!1,n.aai=function(t){!n.n7&&n.Jhi&&(n.n7=!0,n.d7t(n.Ari(t.currentTime)))},n.Qhi=function(t){n.Bd(n.Ari(t.currentTime))},n}Ct(n,t);var i=n.prototype;return i.IW=function(t,n,i){return ut.resolve()},i.hai=function(t,n,i,r){void 0===r&&(r=!1),this.Jhi=t;var e=this.Whi(t,n),s={sources:{src:t.nyt}};return this.Yhi(s,i,e,r)},i.oai=function(t,n,i){return Vt(function(){return zt(this,function(n){return this.Jhi=t,[2,t.nyt]})}).call(this)},i.Ghi=function(){t.prototype.Ghi.call(this),this.J4t.wn(Ey.TM,this.aai)},i.Khi=function(){this.J4t.mn(Ey.TM,this.aai),t.prototype.Khi.call(this)},i.bd=function(t){if(this.Chi){var n=this.Ari(t.currentTime),i=this.Chi.y4t;this.Chi.Mri(n);var r=this.Chi.y4t;i<.25&&r>=.25?this.s5t.So(new j$(this.M0t,n)):i<.5&&r>.5?this.s5t.So(new Y$(this.M0t,n)):i<.75&&r>=.75?this.s5t.So(new J$(this.M0t,n)):this.Chi._x&&this.Bd(n)}else Vn.um("Got timeupdate without a current interstitial")},i.Bd=function(n){t.prototype.Bd.call(this,n),this.n7=!1},i.hr=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.prototype.hr.call(n)];case 1:return i.sent(),this.n7=!1,[2]}})}).call(this)},Nt(n,[{key:"uhi",get:function(){return h3.DEFAULT}}]),n}(c3);F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Dt(),H(),F(),Et(),Dt();var R3=function(t){function n(n,i,r){var e;return(e=t.call(this,n,new Date)||this).uai=void 0,e.Int=void 0,e.uai=i,e.Int=r,e}return Ct(n,t),n}(rh),C3=function(t){return t.LOADED="DAILoaded",t.AD_BREAK_STARTED="DAIAdBreakStarted",t.AD_BREAK_ENDED="DAIAdBreakEnded",t.AD_PERIOD_STARTED="DAIAdPeriodStarted",t.AD_PERIOD_ENDED="DAIAdPeriodEnded",t.AD_PROGRESS="DAIAdProgress",t.CUEPOINTS_CHANGED="DAICuePointsChanged",t.CLICK="DAIClick",t.ERROR="DAIError",t.STARTED="DAIStarted",t.FIRST_QUARTILE="DAIFirstQuartile",t.MIDPOINT="DAIMidpoint",t.STREAM_INITIALIZED="DAIStreamInitialized",t.THIRD_QUARTILE="DAIThirdQuartile",t.COMPLETE="DAIComplete",t}({}),D3=function(t){function n(n,i){return t.call(this,"DAILoaded",n,i)||this}return Ct(n,t),n}(R3),P3=function(t){function n(n,i){return t.call(this,"DAIAdBreakStarted",n,i)||this}return Ct(n,t),n}(R3),N3=function(t){function n(n,i){return t.call(this,"DAIAdBreakEnded",n,i)||this}return Ct(n,t),n}(R3),B3=function(t){function n(n,i){return t.call(this,"DAIAdProgress",n,i)||this}return Ct(n,t),n}(R3),x3=function(t){function n(n,i){return t.call(this,"DAICuePointsChanged",n,i)||this}return Ct(n,t),n}(R3),O3=function(t){function n(n,i){return t.call(this,"DAIClick",n,i)||this}return Ct(n,t),n}(R3),M3=function(t){function n(n,i){return t.call(this,"DAIError",n,i)||this}return Ct(n,t),n}(R3),L3=function(t){function n(n,i){return t.call(this,"DAIStarted",n,i)||this}return Ct(n,t),n}(R3),U3=function(t){function n(n,i){return t.call(this,"DAIFirstQuartile",n,i)||this}return Ct(n,t),n}(R3),F3=function(t){function n(n,i){return t.call(this,"DAIMidpoint",n,i)||this}return Ct(n,t),n}(R3),V3=function(t){function n(n,i){return t.call(this,"DAIStreamInitialized",n,i)||this}return Ct(n,t),n}(R3),H3=function(t){function n(n,i){return t.call(this,"DAIThirdQuartile",n,i)||this}return Ct(n,t),n}(R3),W3=function(t){function n(n,i){return t.call(this,"DAIComplete",n,i)||this}return Ct(n,t),n}(R3);var z3=function(t){function n(n,i,r){var e;(e=t.call(this)||this).cai=void 0,e.Y1t=void 0,e.Eai=void 0,e._ai=void 0,e.kai=void 0,e.gai=void 0,e.y1t=void 0,e.pai=void 0,e.mai=void 0,e.Ts=void 0,e.wai=void 0,e.yai=void 0,e.Aai=void 0,e.bai=void 0,e.Sai=void 0,e.Tai=void 0,e.cai=n,e.Y1t=i,e.Eai=r,e._ai=function(t){e.vai(!0);var n=q3(t),i=j3(t);e.So(new P3(n,i))},e.kai=function(t){e.vai(!1);var n=q3(t),i=j3(t);e.So(new N3(n,i))},e.gai=function(t){var n=q3(t),i=j3(t);e.So(new B3(n,i))},e.y1t=function(t){var n=q3(t),i=j3(t);e.So(new O3(n,i))},e.pai=function(t){var n=q3(t),i=j3(t);e.So(new W3(n,i))},e.mai=function(t){var n=q3(t),i=j3(t);e.So(new x3(n,i))},e.Ts=function(t){var n=q3(t),i=j3(t);e.So(new M3(n,i))},e.wai=function(t){var n=q3(t),i=j3(t);e.So(new U3(n,i))},e.yai=function(t){var n=q3(t),i=j3(t);e.So(new D3(n,i))},e.Aai=function(t){var n=q3(t),i=j3(t);e.So(new F3(n,i))},e.bai=function(t){var n=q3(t),i=j3(t);e.So(new L3(n,i))},e.Sai=function(t){var n=q3(t),i=j3(t);e.So(new V3(n,i))},e.Tai=function(t){var n=q3(t),i=j3(t);e.So(new H3(n,i))},e.Y1t&&(e.Y1t.style.display="none",e.cai.setClickElement(e.Y1t));var s=google.ima.dai.api.StreamEvent.Type;return e.cai.addEventListener(s.AD_BREAK_STARTED,e._ai),e.cai.addEventListener(s.AD_PROGRESS,e.gai),e.cai.addEventListener(s.CLICK,e.y1t),e.cai.addEventListener(s.COMPLETE,e.pai),e.cai.addEventListener(s.CUEPOINTS_CHANGED,e.mai),e.cai.addEventListener(s.ERROR,e.Ts),e.cai.addEventListener(s.FIRST_QUARTILE,e.wai),e.cai.addEventListener(s.LOADED,e.yai),e.cai.addEventListener(s.MIDPOINT,e.Aai),e.cai.addEventListener(s.STARTED,e.bai),e.cai.addEventListener(s.STREAM_INITIALIZED,e.Sai),e.cai.addEventListener(s.THIRD_QUARTILE,e.Tai),e.cai.addEventListener(s.AD_BREAK_ENDED,e.kai),e}Ct(n,t);var i=n.prototype;return i.replaceAdTagParameters=function(t){return this.cai.replaceAdTagParameters(null!=t?t:null)},i.lai=function(t){return this.cai.contentTimeForStreamTime(t)},i.fai=function(t){return this.cai.streamTimeForContentTime(t)},i.AHt=function(t,n){var i=function(t){return"vod"===t.availabilityType?new f.google.ima.dai.api.VODStreamRequest(Yu({},X3(t),{contentSourceId:t.contentSourceID,videoId:t.videoID})):new f.google.ima.dai.api.LiveStreamRequest(Yu({},X3(t),{assetKey:t.assetKey}))}(t);t.enableNonce&&(i.enableNonce=!0),this.cai.requestStream(i)},i.hr=function(){this.vai(!1),this.cai.reset()},i.kn=function(){this.Vo();var t=google.ima.dai.api.StreamEvent.Type;this.cai.removeEventListener(t.AD_BREAK_STARTED,this._ai),this.cai.removeEventListener(t.AD_PROGRESS,this.gai),this.cai.removeEventListener(t.CLICK,this.y1t),this.cai.removeEventListener(t.COMPLETE,this.pai),this.cai.removeEventListener(t.CUEPOINTS_CHANGED,this.mai),this.cai.removeEventListener(t.ERROR,this.Ts),this.cai.removeEventListener(t.FIRST_QUARTILE,this.wai),this.cai.removeEventListener(t.LOADED,this.yai),this.cai.removeEventListener(t.MIDPOINT,this.Aai),this.cai.removeEventListener(t.STARTED,this.bai),this.cai.removeEventListener(t.STREAM_INITIALIZED,this.Sai),this.cai.removeEventListener(t.THIRD_QUARTILE,this.Tai),this.cai.removeEventListener(t.AD_BREAK_ENDED,this.kai),this.hr(),this.Eai&&$n(this.Eai)},i.Pai=function(t){this.cai.onTimedMetadata(t)},i.xai=function(t,n,i){this.cai.processMetadata(t,n,i)},i.Iai=function(t){var n=this.cai.previousCuePointForStreamTime(t);if(n)return{PO:n.end,EO:n.start,_x:n.played}},i.Rai=function(t,n){var i=this.Iai(t);if(i){var r=t>n&&i.PO>n,e=i.PO>t&&i.EO<=t;return i._x||!r&&!e?void 0:i.EO}},i.vai=function(t){this.Y1t&&(this.Y1t.style.display=t?"block":"none")},n}(th);function X3(t){var n,i=google.ima.dai.api.StreamRequest.StreamFormat;return{apiKey:t.apiKey,authToken:t.authToken,format:"dash"===t.format?i.DASH:i.HLS,networkCode:t.networkCode,streamActivityMonitorId:t.streamActivityMonitorID,adTagParameters:t.adTagParameters,omidAccessModeRules:null!=(n=m0(t.omidAccessModeRules))?n:{}}}function q3(t){var n,i=t.getStreamData(),r=i.adProgressData;return r&&(n={t7t:r.adBreakDuration,Cai:r.duration,i7t:r.adPosition,MP:r.currentTime,ct:r.duration,e7t:r.totalAds}),{Dai:n,Bai:(i.cuepoints||[]).map(function(t){return{EO:t.start,PO:t.end,_x:t.played}}),Nai:i.errorMessage||void 0,Mai:i.manifestFormat||void 0,Lai:i.streamId||void 0,Oai:(i.subtitles||[]).map(function(t){return{Fai:t.webvtt,Uai:t.ttml,bs:t.language}}),Yu:i.url}}function G3(t){return{lYt:t.getAdSlotId(),p4t:t.getContent(),qT:t.getContentType(),Mi:t.getHeight(),Ti:t.getWidth()}}function j3(t){var n=t.getAd();if(n){var i=n.getAdPodInfo(),r=n.getCompanionAds().map(G3);return{UYt:n.getAdId(),V7t:{i7t:i.getAdPosition(),p0t:i.getMaxDuration(),Yni:i.getPodIndex(),_Ot:i.getTimeOffset(),e7t:i.getTotalAds()},yKt:n.getAdSystem(),Zni:n.getAdvertiserName(),cYt:n.getApiFramework(),IKt:r,GKt:n.getCreativeId(),I9t:n.getCreativeAdId(),$ni:n.getDealId(),dB:n.getDescription(),ct:n.getDuration(),dq:n.getTitle(),Vai:n.getUniversalAdIdRegistry(),Hai:n.getUniversalAdIdValue(),S9t:n.getVastMediaHeight(),b9t:n.getVastMediaWidth(),m9t:n.getWrapperAdIds(),w9t:n.getWrapperAdSystems(),y9t:n.getWrapperCreativeIds()}}}function Q3(){var t=v.body.lastElementChild;if(V(t,HTMLIFrameElement)&&"Advertisement"===t.title)return t}F(),Et(),Bt(),Dt();var Y3=function(t){function n(n,i){var r;return(r=t.call(this,n)||this).Wai=void 0,r.Wai=i,r}Ct(n,t);var i=n.prototype;return i.N0t=function(){return this.Wai.getAdSystem()},i.O0t=function(){return this.od.whi.nyt},Nt(n,[{key:"o",get:function(){return this.Wai.getAdId()}},{key:"ct",get:function(){return this.Wai.getDuration()}},{key:"AYt",get:function(){var t,n;return null==(n=this.Wai)||null==(t=n.ad)?void 0:t.clickThroughUrl}},{key:"GKt",get:function(){return this.Wai.getCreativeId()}},{key:"JYt",get:function(){return this.Wai.getSkipTimeOffset()}}]),n}(n3);F(),Et(),Dt();var K3=function(t){function n(n){var i;return(i=t.call(this,n)||this)._4t=!0,i.WA=n.m0t,i}return Ct(n,t),n}(n3),J3="urn:google:dai:2018",Z3=function(t){function n(n,i,r,e,s,u,o,h){var c;return void 0===u&&(u={}),(c=t.call(this,n,i,e,s,u)||this).cai=void 0,c.zai=void 0,c.qai=void 0,c.Gai=void 0,c.Jai=void 0,c.aui=void 0,c.jai=void 0,c.Qai=void 0,c.$ai=void 0,c.nui=void 0,c.Kai=void 0,c.cui=-1,c.dui=void 0,c.lui=void 0,c.Wn=function(t){var n=t.Ht;c.Xai(n)},c.oui=function(t){t.TO.wn(Lg.zL,c.fui)},c.Aoi=function(t){t.TO.mn(Lg.zL,c.fui)},c.fui=function(t){var n,i;if(c.zai)if((null==(n=c.aui)?void 0:n.Km)===Dg.ID3){var r,e=t.TO.U;if(wy(e))if(c.cui<=t.TO.EO&&c.dui!==e.text)c.cui=t.TO.EO,c.dui=e.text,null==(r=c.cai)||r.processMetadata("ID3",e.text,t.TO.EO)}else if((null==(i=c.aui)?void 0:i.Km)===Dg.EVENT_STREAM){var s,u=t.TO.U;null==(s=c.cai)||s.processMetadata(J3,u,t.TO.EO)}},c.uui=function(t){switch(c.G0t&&(c.G0t.m0t=c.J4t.Nd()-c.J4t.LP()),t.type){case google.ima.dai.api.StreamEvent.Type.ERROR:c.s5t.So(new R$(EJ.GENERAL));break;case google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED:if(c.Chi)break;if(c.Chi=c.Jhi,c.Jhi=void 0,c.G0t=c.X4t(c.Chi),!c.G0t){Vn.dm("Started an ad break without having a current adbreak to our knowledge");break}c.s5t.So(new Vx(c.G0t)),c.lui=Vn.Og(c.vui,250),c.eui(c.Lhi);break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED:Vn.Lg(c.lui);break;case google.ima.dai.api.StreamEvent.Type.STARTED:var n,i=t.getAd();c.M0t=new Y3(c.G0t,i),null==(n=c.Chi)||n.er({ad:c.M0t}),c.s5t.So(new Wx(c.M0t,c.Ari(c.J4t.LP())));break;case google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE:c.s5t.So(new j$(c.M0t,c.Ari(c.J4t.LP())));break;case google.ima.dai.api.StreamEvent.Type.MIDPOINT:c.s5t.So(new Y$(c.M0t,c.Ari(c.J4t.LP())));break;case google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE:c.s5t.So(new J$(c.M0t,c.Ari(c.J4t.LP())));break;case google.ima.dai.api.StreamEvent.Type.COMPLETE:c.s5t.So(new Xx(c.M0t,c.Ari(c.J4t.LP()))),c.M0t=void 0;break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED:if(!c.G0t)break;c.G0t.m0t>1&&c.vui()}},c.vui=function(){var t;c.M0t=new K3(c.G0t),null==(t=c.Chi)||t.er({ad:c.M0t}),c.s5t.So(new Wx(c.M0t,c.Ari(c.J4t.LP())))},c.Kai=r,c.$ai=o,c.nui=h,c}Ct(n,t);var i=n.prototype;return i.Bhi=function(t){if(t){var n=this.cai;this.cai=this.qai,this.qai=n;var i=this.zai;this.zai=this.Gai,this.Gai=i}for(var r,e=Lt(this.J4t.nt.II);!(r=e()).done;){var s=r.value;this.Xai(s)}},i.IW=function(t,n,i){return Vt(function(){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(!t||!n||t===this.jai&&n===this.Qai)return[2];if(void 0===this.cai){if(void 0===(null==(e=f.google)||null==(r=e.ima)?void 0:r.dai))throw new y("IMA DAI SDK missing for THEOads");this.cai=new google.ima.dai.api.StreamManager(this.J4t.xe.querySelector("video"),this.Kai)}return this.jai=t,this.Qai=n,s=this.Yai(!1),u=this.Yai(!0),this.Jai=gr(ut.all([s,u]),i),[4,this.Jai];case 1:return o.sent(),[2]}})}).call(this)},i.Yai=function(t){var n=this,i=this.cai;if(t&&(i=this.qai),!i)return ut.resolve();this.Zai(i),i.reset();var r=new google.ima.dai.api.PodStreamRequest;r.networkCode=this.jai,r.customAssetKey=this.Qai,r.adTagParameters=this.Lhi,this.$ai&&(r.streamActivityMonitorId=this.$ai),r.format="hls";var e=this.tui(i,[google.ima.dai.api.StreamEvent.Type.STREAM_INITIALIZED,google.ima.dai.api.StreamEvent.Type.ERROR]).then(function(r){if(r.type===google.ima.dai.api.StreamEvent.Type.ERROR)throw new y("DAI stream request failed");t?n.Gai=r.getStreamData():n.zai=r.getStreamData(),n.iui(i)});return i.requestStream(r),e},i.tui=function(t,n,i){return new ut(function(r,e){if(i&&i.Hg)return e(new fr);for(var s,u=function(t){h(),r(t)},o=function(){h(),e(new fr)},h=function(){for(var r,e=Lt(n);!(r=e()).done;){var s=r.value;t.removeEventListener(s,u)}i&&i.jg(o)},c=Lt(n);!(s=c()).done;){var a=s.value;t.addEventListener(a,u)}i&&i.Xg(o)})},i.Mhi=function(n){void 0===n&&(n={}),t.prototype.Mhi.call(this,n),this.eui(this.Lhi)},i.eui=function(t){var n,i;void 0===t&&(t={}),null==(n=this.cai)||n.replaceAdTagParameters(t),null==(i=this.qai)||i.replaceAdTagParameters(t)},i.sui=function(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:return n=this,(null==(i=this.Jhi)?void 0:i.Vri)&&!S(this.Jhi.Vri)?[2,this.Jhi.Vri]:this.nui&&(null==(r=this.Jhi)?void 0:r.Rvt)?[4,gT(function(){return n.rui()},t,4,500,5e3)]:[2,void 0];case 1:return[2,e.sent()]}})}).call(this)},i.rui=function(){return Vt(function(){var t,n,i,r;return zt(this,function(e){switch(e.label){case 0:t=this.nui+"/"+this.jai+"/"+this.Qai+"/"+this.Jhi.Rvt+".json",n=new pl({Yu:t,dk:Md.DT,Uk:wl.GET,Vk:1e3}),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.J4t.SP.lk(n)];case 2:return i=e.sent(),[3,4];case 3:throw e.sent(),new SJ(EJ.NETWORK,IJ.UNKNOWN_AD_RESPONSE,"The ad's PodId could not be loaded.");case 4:if(!dl(i))throw new SJ(EJ.NETWORK,IJ.UNKNOWN_ERROR,"Something went wrong while requesting JSON from server.");return[4,i.ck()];case 5:return(r=e.sent())?[2,r.podid]:[2,void 0]}})}).call(this)},i.hai=function(t,n,i,r){return void 0===r&&(r=!1),Vt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:return[4,this.oai(t,n,i)];case 1:return e=u.sent(),s={sources:{src:e}},[4,this.Yhi(s,i,void 0,r)];case 2:return u.sent(),[2]}})}).call(this)},i.oai=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c,a,f,v,d;return zt(this,function(l){switch(l.label){case 0:return this.Jhi=t,e=t.dhi,s=t.lhi,this.Uhi(t.Zri),u=Yu({},this.Lhi,t.Hri),this.eui(u),[4,this.IW(e,s,i)];case 1:return l.sent(),o=Vn.Dh(t.nyt),h=Number(o.searchParams.get("d")),c=b.floor(1e3*b.min(h,t.Bri-n)),[4,this.sui(i)];case 2:if(!(a=l.sent()))throw new y("Something went wrong with retrieving the PodID from the server.");return(null==(r=this.zai)?void 0:r.streamId)?[3,4]:[4,this.Jai];case 3:l.sent(),l.label=4;case 4:return f=Vn.Dh("https://dai.google.com/linear/pods/v1/hls/network/"+this.jai+"/custom_asset/"+this.Qai),"V2"===t.fhi?f.pathname+="/ad_break_id/"+a+".m3u8":f.pathname+="/pod/"+a+".m3u8",v=this.zai.streamId,this.Chi?void 0===(d=this.J4t.hui())||void 0!==this.qai?[3,6]:(this.qai=new google.ima.dai.api.StreamManager(d.xe.querySelector("video"),this.Kai),[4,gr(this.Yai(!0),i)]):[3,7];case 5:l.sent(),l.label=6;case 6:this.Gai&&(v=this.Gai.streamId),l.label=7;case 7:return f.searchParams.set("stream_id",v),f.searchParams.set("pd",String(c)),[2,f.toString()]}})}).call(this)},i.Ghi=function(){this.J4t.nt.wn(Sw.eI,this.Wn),t.prototype.Ghi.call(this)},i.Khi=function(){t.prototype.Khi.call(this),this.J4t.nt.mn(Sw.eI,this.Wn)},i.Xai=function(t){if(t.Lt===Ym.VU&&!(t.Km!==Dg.ID3&&t.Km!==Dg.EVENT_STREAM||t.Km===Dg.EVENT_STREAM&&t.ZI!==J3)){if(t.wn(Dw.hI,this.oui),t.wn(Dw.aI,this.Aoi),t.L)for(var n,i=Lt(t.L.II);!(n=i()).done;){var r=n.value;this.oui(new WD(r))}t.Xk=Hm.JI,this.aui=t}},i.iui=function(t){t&&(t.addEventListener(google.ima.dai.api.StreamEvent.Type.ERROR,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.CLICK,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.STARTED,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.MIDPOINT,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.COMPLETE,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.RESUMED,this.uui))},i.Zai=function(t){t&&(t.removeEventListener(google.ima.dai.api.StreamEvent.Type.ERROR,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.CLICK,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.STARTED,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.MIDPOINT,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.COMPLETE,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.RESUMED,this.uui))},i.Bd=function(n){t.prototype.Bd.call(this,n),this.cui=-1,this.dui=void 0},i.hr=function(){var n=this;return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:return[4,t.prototype.hr.call(n)];case 1:return s.sent(),this.Zai(this.cai),this.Zai(this.qai),null==(i=this.cai)||i.reset(),this.cai=void 0,null==(r=this.qai)||r.reset(),this.qai=void 0,this.zai=void 0,this.Gai=void 0,this.Jai=void 0,this.$ai=void 0,this.Qai=void 0,this.jai=void 0,this.Fhi=!0,this.cui=-1,this.dui=void 0,void 0!==(e=Q3())&&$n(e),[2]}})}).call(this)},i.kn=function(){var n=this;return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return[4,t.prototype.kn.call(n)];case 1:return r.sent(),null==(i=this.aui)||i.kn(),[2]}})}).call(this)},Nt(n,[{key:"uhi",get:function(){return h3.GOOGLE}}]),n}(c3);F(),Et(),Wt(),Dt(),Qt();var $3=function(t){function n(n){return t.call(this,n)||this}Ct(n,t);var i=n.prototype;return i.hui=function(){},i.Yhi=function(t,n,i,r){return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,this.oa.Ta(t,r)];case 1:return e.sent(),this._ui(this.oa,n,i),[2]}})}).call(this)},i._ui=function(t,n,i){On.ru&&On.X_&&(t.Gx(),t.zx()),n&&t.OP(n),i&&t.Gx()},i.gui=function(t){},n}(l$);F(),Et(),Wt(),Bt(),Dt(),Qt(),St();var t4=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).NPt=0,n.Qhi=function(t){n.Bd(n.Ari(t.currentTime))},n}Ct(n,t);var i=n.prototype;return i.IW=function(t,n,i){return ut.resolve()},i.hai=function(t,n,i,r){return void 0===r&&(r=!1),this.Jhi=t,this.Whi(t,n),ut.resolve()},i.Yhi=function(t,n,i,r){return Vt(function(){return zt(this,function(t){return[2,ut.resolve()]})})()},i.oai=function(t,n,i){return Vt(function(){return zt(this,function(n){return this.Jhi=t,[2,t.nyt]})}).call(this)},i.Nhi=function(t){this.NPt=t-this.J4t.LP(),this.d7t(t)},i.bd=function(t){if(this.Chi){var n=this.Ari(t.currentTime);this.Chi.Mri(n),this.Chi._x&&this.Bd(n)}else Vn.um("Got timeupdate without a current interstitial")},i.Ari=function(t){return this.NPt+t},Nt(n,[{key:"uhi",get:function(){return h3.COMPANION}}]),n}(c3);F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),St(),F(),Et(),Bt(),Dt();var n4=function(t){function n(n,i){var r;return(r=t.call(this,n)||this).pui=void 0,r.pui=i,r}Ct(n,t);var i=n.prototype;return i.N0t=function(){return this.pui.N0t()},i.O0t=function(){return this.od.whi.nyt},Nt(n,[{key:"o",get:function(){return this.pui.o}},{key:"ct",get:function(){return this.pui.ct}},{key:"AYt",get:function(){return this.pui.AYt}},{key:"GKt",get:function(){return this.pui.GKt}},{key:"JYt",get:function(){return this.pui.JYt}}]),n}(n3),i4=function(t){function n(n,i,r,e,s){var u;return void 0===s&&(s={}),(u=t.call(this,n,i,r,e,s)||this).Eui=0,u.Qhi=function(t){u.Bd(u.Ari(t.currentTime))},u.wui=function(){u.Jhi?(u.Chi=u.Jhi,u.Jhi=void 0,u.G0t=u.X4t(u.Chi),u.s5t.So(new Vx(u.G0t))):Vn.um("Started an ad break without having a current adbreak to our knowledge")},u.yui=function(t){var n,i,r=t.Int;u.M0t=new n4(u.G0t,r),null==(n=u.Chi)||n.er({ad:u.M0t}),u.Eui=u.Ari(null==(i=u.J4t)?void 0:i.LP()),u.s5t.So(new Wx(u.M0t,u.Eui))},u.Aui=function(){u.s5t.So(new j$(u.M0t,u.Ari(u.J4t.LP())))},u.bui=function(){u.s5t.So(new Y$(u.M0t,u.Ari(u.J4t.LP())))},u.Sui=function(){u.s5t.So(new J$(u.M0t,u.Ari(u.J4t.LP())))},u.Tui=function(){var t=u.Eui+u.M0t.ct;u.s5t.So(new Xx(u.M0t,t)),u.M0t=void 0},u.kui=function(){u.Bd(u.Ari(u.G0t.p0t))},u}Ct(n,t);var i=n.prototype;return i.IW=function(t,n,i){return ut.resolve()},i.hai=function(t,n,i,r){return void 0===r&&(r=!1),this.Jhi=t,this.Yhi({ads:[{integration:"google-ima",sources:this.mui(t)}]},i,void 0,r)},i.oai=function(t,n,i){return Vt(function(){return zt(this,function(n){return this.Jhi=t,[2,this.mui(t)]})}).call(this)},i.mui=function(t){var n=new URL(t.nyt),i=n.searchParams;this.Uhi(t.Zri);for(var r,e=Yu({},this.Lhi,t.Hri),s=Lt(k.keys(e));!(r=s()).done;){var u=r.value;i.set(u,e[u])}return n.toString()},i.Ghi=function(){var n,i,r,e,s,u,o;t.prototype.Ghi.call(this),null==(n=this.J4t.Jc)||n.wn("Dnt",this.wui),null==(i=this.J4t.Jc)||i.wn("Bnt",this.yui),null==(r=this.J4t.Jc)||r.wn("P4t",this.Aui),null==(e=this.J4t.Jc)||e.wn("x4t",this.bui),null==(s=this.J4t.Jc)||s.wn("I4t",this.Sui),null==(u=this.J4t.Jc)||u.wn("Nnt",this.Tui),null==(o=this.J4t.Jc)||o.wn("Cnt",this.kui)},i.Khi=function(){var n,i,r,e,s,u,o;null==(n=this.J4t.Jc)||n.mn("Dnt",this.wui),null==(i=this.J4t.Jc)||i.mn("Bnt",this.yui),null==(r=this.J4t.Jc)||r.mn("P4t",this.Aui),null==(e=this.J4t.Jc)||e.mn("x4t",this.bui),null==(s=this.J4t.Jc)||s.mn("I4t",this.Sui),null==(u=this.J4t.Jc)||u.mn("Nnt",this.Tui),null==(o=this.J4t.Jc)||o.mn("Cnt",this.kui),t.prototype.Khi.call(this)},i.hr=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.prototype.hr.call(n)];case 1:return i.sent(),this.Eui=0,[2]}})}).call(this)},Nt(n,[{key:"uhi",get:function(){return h3.CSAI}}]),n}(c3),r4=function(t){function n(n){var i,r,e;return i=t.call(this,n)||this,(r=i).Qst=void 0,r.Uui=void 0,r.Ls=void 0,r.Fui=void 0,r.Kai=void 0,r.JW=void 0,r.Lz=void 0,r.Rui=void 0,r.Nui=void 0,r.Iui=void 0,r.Qoi=void 0,r.Hui=void 0,r.Lhi=void 0,r.eci=void 0,r.Wui=void 0,r.sci=void 0,r.gci=void 0,r.nci=void 0,r.Yui=void 0,r.xui=void 0,r.eai=void 0,r.Pui=void 0,r.uci=Ju(),r.yci=!0,r.Aci=NaN,r.hci=NaN,r.rci=NaN,r.bci=void 0,r.wci=!1,r.Sci=!0,r.GG=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return r.Qst.mn(Ey.TM,r.GG),r.Rui?r.Rui.initializationDelay?(r.bci=Vn.Og(function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return r.Rui?[4,r.Lui(r.Rui)]:[2];case 1:return t.sent(),[2]}})})()},1e3*r.Rui.initializationDelay),[3,3]):[3,1]:[2];case 1:return[4,r.Lui(r.Rui)];case 2:t.sent(),t.label=3;case 3:return[2]}})})()},r.Pd=function(){r.Qst.mn(Ey.AM,r.Pd),r.xui.ooi(r.oa.nt)},r.Cui=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,4]),[4,r.Wst.Bj([wE.THEOADS])];case 1:return n.sent(),[3,4];case 2:return t=n.sent(),[4,r.Xx().catch(di)];case 3:return n.sent(),r.qq(vd(t,cd.LICENSE_INVALID_FEATURE)),[3,4];case 4:return[2]}})})()},r.stt=function(t){m$(r.Uui,r.oa.Bx,r.oa.Rx,t.width,t.height)},r.CXt=function(){m$(r.Uui,r.oa.Bx,r.oa.Rx,r.Wu.Eu,r.Wu.Iu)},r.qui=function(){r.cci(r.LP()),r.dci()},r.XG=function(){r.cci(r.LP()),r.dci()},r.Xui=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return r.mci()?r.nci?[2]:(r.nci=r.sci,[4,r.nci]):[3,2];case 1:return t.sent(),r.Kui(function(){return r.tci()}),[3,3];case 2:r.Kui(function(){return r.i3t()}),t.label=3;case 3:return[2]}})})()},r.jui=function(t){return r.Jui(r.eci,"Error playing the current adbreak: "+t.error),r.Kui(function(){return r.i3t()})},r.aci=function(t){r.Iui.So(t.Ca)},r.Qst=new $3(n),r.Ls=n.xe,r.Uui=function(){var t=v.createElement("div");return si(t,"theo-ads-sgai-container"),t}(),r.Fui=function(){var t=v.createElement("div");return si(t,"theo-ads-sgai-content-player"),t}(),r.Iui=new y3(r),r.Hui=new p3,null==(e=r.Qst.Jc)||e.Ent(r.Hui),r.eai=new e3(n.SP),r.xui=new l3(r),r.Pui=new k3(r.Qst,r.Fui,r.eai),i}Ct(n,t);var i=n.prototype;return i.Zst=function(){return this.Qst.Jc},i.snt=function(){return this.Iui.Ca},i.FP=function(){return this.Ls},i.Jst=function(){return this.Qst.Dst},i.HP=function(){var n;return null!=(n=this.Lz)?n:t.prototype.HP.call(this)},i.qP=function(){var n;return null!=(n=this.JW)?n:t.prototype.qP.call(this)},i.qx=function(){this.Qst.qx()},i.Noi=function(t){return t},i.Ta=function(n,i){var r=this;return Vt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,this.xpt()];case 1:return s.sent(),[4,t.prototype.Ta.call(r,n,i)];case 2:return s.sent(),void 0===n||void 0===n.ads?[2]:void 0===(e=Ui(n.ads,p$))?[2]:(this.Cui(),this.Dui(),this.Bui(),this.Rui=e,this.Nui=e.backdropLShape,this.Pui.Hri=e.adTagParameters,this.xui.Loi=function(t){switch(t){case"single":return L2.SINGLE;case"l-shape":return L2.LSHAPE_AD;case"double":return L2.DOUBLE;case"single-if-mobile":return On.Ks?L2.SINGLE:void 0;default:return}}(this.Rui.overrideLayout),this.xui.loi=this.Rui.useId3,this.Qst.wn(Ey.AM,this.Pd),this.Wu.wn(hI.yn,this.stt),this.wn(eh.Jw,this.CXt),[4,this.Mui(h3.DEFAULT,void 0,void 0)]);case 3:return s.sent(),this.Qst.wn(Ey.TM,this.GG),[2]}})}).call(this)},i.Lui=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return this.Oui(),n=void 0===t.networkCode||void 0===t.customAssetKey?h3.DEFAULT:h3.GOOGLE,[4,this.Mui(n,t.networkCode,t.customAssetKey)];case 1:return i.sent(),t.sseEndpoint&&this.xui.eoi(t.sseEndpoint),[2]}})}).call(this)},i.Dui=function(){ni(this.Ls,this.Fui),ci(this.Uui),ci(this.Fui),this.Uui.appendChild(this.Fui),this.Ls.appendChild(this.Uui)},i.Vui=function(){ni(this.Fui,this.Ls),ai(this.Fui),ai(this.Uui),$n(this.Fui),$n(this.Uui)},i.Mui=function(t,n,i){return Vt(function(){var r,e,s,u,o,h,c,a,f,v;return zt(this,function(d){switch(d.label){case 0:return u=this.E3t(),o=this.Kai,u&&o?t===(null==(r=this.Qoi)?void 0:r.uhi)?[2]:(c=null!=(h=null==(e=this.Qoi)?void 0:e.A0t)?h:[],[4,null==(s=this.Qoi)?void 0:s.hr()]):[2];case 1:switch(d.sent(),t){case h3.GOOGLE:return[3,2];case h3.COMPANION:return[3,4];case h3.CSAI:return[3,5];case h3.DEFAULT:return[3,6]}return[3,6];case 2:return this.Qoi=new Z3(u,this.Hui,o,c,this.eai,this.Hri,null==(a=this.Rui)?void 0:a.streamActivityMonitorId,null==(f=this.Rui)?void 0:f.retrievePodIdURI),[4,null==(v=this.Qoi)?void 0:v.IW(n,i)];case 3:return d.sent(),[3,7];case 4:return this.Qoi=new t4(this.Qst,this.Hui,c,this.eai),[3,7];case 5:return this.Qoi=new i4(u,this.Hui,c,this.eai,this.Hri),[3,7];case 6:this.Qoi=new I3(u,this.Hui,c,this.eai),d.label=7;case 7:return[2]}})}).call(this)},i.Eoi=function(t,n){return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return this.Wui||void 0===t||void 0===n?[2]:(null==(i=this.Qoi)?void 0:i.uhi)===h3.GOOGLE?[3,2]:[4,this.Mui(h3.GOOGLE,t,n)];case 1:r.sent(),r.label=2;case 2:return[2]}})}).call(this)},i.qq=function(t){void 0===this.qP()&&(this.JW=t,this.Lz=hg(t),this.So(new _b(t)))},i.Oui=function(){this.Qst.wn(eh._y,this.qui),this.Qst.wn(eh.$w,this.XG)},i.zui=function(){this.Qst.mn(eh._y,this.qui),this.Qst.mn(eh.$w,this.XG)},i.Gui=function(){var t,n;this.Hui.M3t.wn("Cnt",this.Xui),null==(t=this.Qoi)||t.wn(o3.AD_ENDED,this.Xui),null==(n=this.E3t())||n.wn(zm.ma,this.jui)},i.Qui=function(){var t,n;this.Hui.M3t.mn("Cnt",this.Xui),null==(t=this.Qoi)||t.wn(o3.AD_ENDED,this.Xui),null==(n=this.E3t())||n.mn(zm.ma,this.jui)},i.Kui=function(t){var n=this,i=function(){n.Yui=void 0};this.Yui=t().then(i).catch(i)},i.Jui=function(t,n){this.Iui.So(new S3(t,n).Ca),t._x=!0,this.Yui&&(this.Wui=void 0)},i.Zui=function(){return Vt(function(){var t;return zt(this,function(n){return null==(t=this.Qoi)||t.Ghi(),this.$ui(),[2]})}).call(this)},i.tci=function(){return Vt(function(){return zt(this,function(t){return this.$ui(),[2]})}).call(this)},i.i3t=function(){return Vt(function(){var t;return zt(this,function(n){return this.ici(),null==(t=this.Qoi)||t.Khi(),this.zhi(this.eci),this.eci=void 0,[2]})}).call(this)},i.$ui=function(){this.ici(),this.eci=this.Wui,this.Wui=void 0,this.sci=void 0,this.nci=void 0},i.ici=function(){var t=this.oa.Rx,n=this.oa.Bx;t===this.rci&&n===this.hci||(this.rci=t,this.hci=n,this.So(new Ty))},i.qhi=function(t){var n;e4(t)&&(null==(n=this.Qoi)||n.qhi(t),this.Uoi(this.LP()));t.wn("Dri",this.aci),this.Iui.So(new b3(t.wnt()))},i.zhi=function(t){if(ji(this.xui.toi,t)){var n;if(this.xui.zhi(t),e4(t))null==(n=this.Qoi)||n.zhi(t);else s4(t)&&(this.Pui.tai(t),this.uci.delete(t.o));t.mn("Dri",this.aci),this.Iui.So(new A3(t).Ca)}},i.Uoi=function(t){this.cci(t),this.dci()},i.cci=function(t){this.lci(t),this.fci(t),this.vci(t)},i.lci=function(t){if(void 0===this.Yui){for(var n,i,r=[],e=Lt(this.xui.toi.filter(e4));!(i=e()).done;){var s=i.value;s._x?r.push(s):s!==this.eci&&(t>=s.EO+5||this.eci&&s.EO+5=t.EO);var e=t.Bri,s=n>=t.EO&&(void 0===e||n=this.Wui.EO&&(void 0===r||t=e)return"continue";var u=n.EO,o=n.EO+n.ct;r>=u&&r<=o&&!t.uci.has(n.o)&&(t.Pui.Yoi(n).catch(function(){i.Iui.So(new S3(n,"Could not load the overlay.").Ca)}),t.Iui.So(new j2(n).Ca),t.uci.set(n.o,n))},i=this,r=this.LP(),e=[];this.uci.forEach(function(t){r>=t.EO&&(void 0===t.Bri||r0&&(i.kci-=i.Qst.LP())},i.cPt=SW.Ng,i.Dci=new w2(Vn.SP),i}Ct(n,t);var i=n.prototype;return i.Nd=function(){var n;return null!=(n=this.WA)?n:t.prototype.Nd.call(this)},i.nu=function(){var n;return null!=(n=this.Ac)?n:t.prototype.nu.call(this)},i.LP=function(){return this.Noi(t.prototype.LP.call(this))},i.DP=function(){return this.Tci?new Date(this.Tci.getTime()+fe(this.Qst.LP())):t.prototype.DP.call(this)},i.RP=function(){var n=t.prototype.RP.call(this);return TA.jn(n).Ny(this.kci)._s()},i.Tx=function(){var n=t.prototype.Tx.call(this);return TA.jn(n).Ny(this.kci)._s()},i.Noi=function(t){return t+this.kci},i.Ta=function(n,i){var r=this;return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Ta.call(r,n,i)];case 1:return e.sent(),this.Rui?(this.Ac=n,this.Eci=new X2(this.Qst),this.Eci.gr(this.Fui,this.Uui),this.tO(this.Eci),[2]):[2]}})}).call(this)},i.Bui=function(){},i.Dui=function(){t.prototype.Dui.call(this),this.Kai=w$(this.Uui)},i.Oui=function(){t.prototype.Oui.call(this),this.Pci()},i.zui=function(){t.prototype.zui.call(this),this.xci()},i.Pci=function(){this.Qst.wn(eh.Rw,this.xXt),this.Qst.wn(Ey.TM,this.MV)},i.xci=function(){this.Qst.mn(eh.Rw,this.xXt),this.Qst.mn(Ey.TM,this.MV)},i.E3t=function(){return this.Qst},i.OP=function(n,i){this.Ici=!0,t.prototype.OP.call(this,n,i)},i.Gx=function(){t.prototype.Gx.call(this),this.So(new cT(this.LP())),this.Sci=!0,this.Rci=!1},i.zx=function(){this.Rci=!0,t.prototype.zx.call(this)},i.hai=function(t,n,i){return Vt(function(){var r,e,s,u,o,h;return zt(this,function(c){switch(c.label){case 0:return r=this,[4,this.Mui(t.uhi,t.dhi,t.lhi)];case 1:return c.sent(),u=this,[4,null==(e=this.Qoi)?void 0:e.oai(t,n,i)];case 2:return u.Cci=c.sent(),[4,null==(s=this.Qoi)?void 0:s.Vhi(t,i).catch(function(){r.Iui.So(new S3(t,"Could not load the backdrop.").Ca)})];case 3:return c.sent(),t.uhi===h3.COMPANION?[2]:(o=new h2(this.cPt,this.Dci),h=new w1(this.cPt.fPt,o,"temporary"),this.Bci=h.Bei(oE(oE({sources:{src:this.Cci}})),c2({amount:30,bandwidth:pb.Ng.fW()||this.Dst.WY}),"temporary"),this.Nci.Zg(),this.Nci=new hr,this.Dci.Ret(this.Bci,this.cPt,"temporary").mi(this.Nci.Yg).catch(di),[2])}})}).call(this)},i.Mci=function(t,n){switch(t){case L2.LSHAPE_CONTENT:case L2.LSHAPE_AD:return new G2(this.Qst,n);case L2.SINGLE:default:return new q2(this.Qst)}},i.Lci=function(t){return Vt(function(){var n,i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return null==(n=this.gci)||n.Zg(),this.gci=new hr,[4,this.Mui(t.uhi,t.dhi,t.lhi)];case 1:return o.sent(),null==(i=this.Eci)||i.mr(this.Fui),(null==(r=this.Qoi)?void 0:r.uhi)!==h3.COMPANION&&(this.wci=!0,this.kci=this.LP(),this.Tci=this.DP(),this.Qst.wn(Ey.TM,this.MV)),this.Iui.So(new j2(t).Ca),[4,null==(e=this.Qoi)?void 0:e.Yhi({sources:{src:this.Cci}},this.gci.Yg,void 0,!0)];case 2:return o.sent(),this.Eci=this.Mci(t.Zri,null!=(u=t.$ri)?u:this.Nui),this.h3t(this.Eci),this.Eci.gr(this.Fui,this.Uui),null==(s=this.Qoi)||s.Nhi(this.LP()),[2]}})}).call(this)},i.Zui=function(){var n=this;return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return void 0===this.Wui||void 0===this.Cci?[2]:(this.xci(),this.Ez=this.ux,[4,this.Lci(this.Wui)]);case 1:return r.sent(),this.Gui(),(null==(i=this.Qoi)?void 0:i.uhi)!==h3.COMPANION&&(this.Oci=!1),[2,t.prototype.Zui.call(n)]}})}).call(this)},i.tci=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.zhi(this.eci),void 0===this.Wui?[2,this.i3t()]:[4,this.Lci(this.Wui)];case 1:return i.sent(),[2,t.prototype.tci.call(n)]}})}).call(this)},i.i3t=function(){var n=this;return Vt(function(){var i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return this.eci?(null==(i=this.Bci)||i._S(),this.Bci=void 0,this.Qui(),(null==(r=this.Qoi)?void 0:r.uhi)===h3.COMPANION?[3,2]:(this.wci=!0,this.Pri=!1,this.kci=this.LP(),this.Tci=this.DP(),this.xui.coi(this.Qst.nt),this.Qst.wn(Ey.AM,this.Fci),this.Qst.wn(Ey.AM,this.Pd),this.Qst.wn(Ey.TM,this.MV),[4,this.Qst.Ta(this.Ac,(new hr).Yg)])):[2];case 1:o.sent(),o.label=2;case 2:return null==(e=this.Eci)||e.mr(this.Fui),this.Eci=new X2(this.Qst),this.Eci.gr(this.Fui,this.Uui),this.h3t(this.Eci),(null==(s=this.Qoi)?void 0:s.uhi)!==h3.COMPANION&&(this.ux=null!=(u=this.Ez)?u:1,this.Qst.Gx()),this.Oci=!0,this.Pci(),[2,t.prototype.i3t.call(n)]}})}).call(this)},i.xpt=function(){var n=this;return Vt(function(){var i;return zt(this,function(r){switch(r.label){case 0:return this.Eci=void 0,this.WA=void 0,this.kci=0,this.Cci=void 0,this.Ez=void 0,this.Tci=void 0,this.Oci=!0,this.wci=!1,this.Sci=!0,this.Rci=!0,this.Nci.Zg(),this.Nci=new hr,null==(i=this.Bci)||i._S(),this.Bci=void 0,this.Qst.mn(Ey.AM,this.Fci),[4,t.prototype.xpt.call(n)];case 1:return r.sent(),[2]}})}).call(this)},i.$x=function(n){if(void 0!==this.Eci)switch(n.type){case eh.uo:return!0;case eh.jw:return!this.Rci||(this.Rci=!1,this.So(new hT(this.Noi(n.currentTime))),!0);case Ey.TM:return!this.Sci||(this.Sci=!1,this.So(new Oy(this.Noi(n.currentTime))),!0);case Ey.SM:return this.wci||(this.Sci=!0,this.So(new Ny(this.Noi(n.currentTime)))),!0;case eh.Zw:return this.wci&&!this.Ici||(this.Ici=!1,this.So(new lT(this.Noi(n.currentTime)))),!0;case eh.$w:return this.wci&&!this.Ici||this.So(new dT(this.Noi(n.currentTime))),!0;case eh.Bw:return!this.Oci||(this.So(new vT(this.Noi(n.currentTime))),!0);case eh._y:return this.So(new pw(this.Noi(n.currentTime),n.currentProgramDateTime)),!0;case eh.Qw:return this.So(new qR(this.Noi(n.currentTime))),!0;case eh.Kw:return this.So(new fT(this.Noi(n.currentTime),n.playbackRate)),!0;case eh.gy:return this.Pri?(this.So(new wT(this.Noi(n.currentTime),n.volume)),!0):(this.Pri=!0,!0);case eh.Cw:return this.So(new oT(this.Noi(n.currentTime),n.readyState)),!0;case Ey.wM:return this.So(new By(this.Noi(n.currentTime),n.readyState)),!0;case Ey.yM:return this.So(new xy(this.Noi(n.currentTime),n.readyState)),!0;case Ey.AM:return this.So(new Py(this.Noi(n.currentTime),n.readyState)),!0;case Ey.bM:return this.So(new Dy(this.Noi(n.currentTime),n.readyState)),!0;case Ey.wI:return this.So(new Ry(this.Noi(n.currentTime),n.readyState)),!0;case eh.Dw:return this.So(new hH(this.Noi(n.currentTime),n.initDataType,n.initData)),!0}return t.prototype.$x.call(this,n)},n}(r4);F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et(),Wt(),Dt(),Qt();var o4=function(t){function n(n,i){var r,e=function(){var t=v.createElement("div");return si(t,"theo-ads-sgai-ad-player-one"),t}(),s=h4(n,e,i);return e.style.display="block",(r=t.call(this,s)||this).Vci=void 0,r.Hci=void 0,r.Uci=void 0,r.Vci=n,r.Hci=s,r}Ct(n,t);var i=n.prototype;return i.hui=function(){if(void 0===this.Uci){var t=function(){var t=v.createElement("div");return si(t,"theo-ads-sgai-ad-player-two"),t}();this.Uci=h4(this.Vci,t,this.oa.Cd)}return this.oa===this.Hci?this.Uci:this.Hci},i.Yhi=function(t,n,i,r){return Vt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,(e=this.oa.nu()?this.hui():this.oa).Ta(t,r)];case 1:return s.sent(),this._ui(e,n,i),[2]}})}).call(this)},i.gui=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return t?[4,this.hui().Xx()]:[3,2];case 1:return n.sent(),[3,4];case 2:return[4,this.oa.Xx()];case 3:n.sent(),n.label=4;case 4:return[2]}})}).call(this)},i.Wci=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return C2(this.oa,this.hui()),this.h3t(this.hui()),this.oa.xe.style.display="",this.hui().xe.style.display="none",[4,this.hui().Xx()];case 1:return t.sent(),[2]}})}).call(this)},i.hr=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.oa.Xx()];case 1:return t.sent(),[4,this.hui().Xx()];case 2:return t.sent(),[2]}})}).call(this)},n}($3);function h4(t,n,i){var r=t.children[t.children.length-1];t.insertBefore(n,r),g$(n);var e=new n0(new dx(n,i,new CE),yS.Ng);return e.mx=jT.OL,e.cO=!1,e}var c4=function(t){function n(n,i,r){var e,s=new o4(i,r);return(e=t.call(this,s)||this).Qst=void 0,e.J4t=void 0,e.Kci=void 0,e.Zci=void 0,e.Jci=void 0,e.Yci=void 0,e.edi=void 0,e.qci=0,e.zci=void 0,e.Gci=0,e.qzt=void 0,e.Xci=void 0,e.rdi=0,e.Qci=0,e.hdi=function(){if(e.Qst.mn(Ey.bM,e.hdi),e.zci){var t=e.zci;t.setSeconds(e.zci.getSeconds()+e.rdi),e.Qst.CP=t,e.zci=void 0}e.Gci-=e.Qst.LP(),e.qzt=void 0,e.Xci=void 0},e.LV=function(){e.J4t.Gx()},e.OV=function(){e.J4t.zx()},e.Qst=n,e.J4t=s,e}Ct(n,t);var i=n.prototype;return i.hui=function(){return this.J4t.hui()},i.Yhi=function(t,n,i,r){return this.J4t.Yhi(t,n,i,r)},i.jci=function(t,n,i,r){var e,s;this.qci=t,r?this.Qci=0:this.Qci+=i,this.zci=n,null==(s=this.zci)||s.setSeconds((null==(e=this.zci)?void 0:e.getSeconds())+this.Qci)},i.Rri=function(){var t;if(void 0===this.Kci){this.qzt=void 0,this.Xci=void 0;var n=this.Yci;this.Yci=void 0,null==(t=this.Jci)||t.Zg(),d4(this.Qst)&&(this.Zci=new hr,this.Kci=_r(this.$ci(n,this.Zci.Yg),this.Zci).catch(wr))}},i.Cri=function(){var t;this.qzt=this.qci+this.oa.LP(),this.Eri&&(this.Xci=new Date(this.Eri.getTime()+1e3*this.oa.LP()));var n=this.Kci;this.Kci=void 0,null==(t=this.Zci)||t.Zg(),this.Jci=new hr,this.Yci=_r(this.tdi(n,this.Jci.Yg),this.Jci).catch(wr)},i.Aa=function(){return this.Qst.mq},i.idi=function(){this.edi||(this.edi={source:this.Qst.nu(),duration:this.Qst.Nd(),currentTime:this.Qst.LP(),preload:this.Qst.mx,autoplay:this.Qst.cO,playbackRate:this.Qst.ux})},i.sdi=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:return this.Qst.mx=jT.OL,this.Qst.cO=!1,this.J4t.$P=!0,n=this.J4t.nu(),[4,this.Qst.Ta(n,t)];case 1:return i.sent(),this.Qst.OP(this.J4t.LP()),this.Qst.wn(eh.uo,this.LV),this.Qst.wn(eh.jw,this.OV),[2]}})}).call(this)},i.ndi=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.edi?(this.Qst.mx=this.edi.preload,this.Qst.cO=this.edi.autoplay,this.Qst.ux=this.edi.playbackRate,[4,this.Qst.Ta(this.edi.source,t)]):[2];case 1:return n.sent(),this.edi=void 0,[2]}})}).call(this)},i.$ci=function(t,n){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,null==t?void 0:t.catch(di)];case 1:return i.sent(),this.idi(),[4,this.Qst.Xx()];case 2:return i.sent(),[4,this.sdi(n)];case 3:return i.sent(),this.h3t(this.Qst),this.Qst.Gx(),[2]}})}).call(this)},i.tdi=function(t,n){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,null==t?void 0:t.catch(di)];case 1:return i.sent(),this.rdi=this.J4t.LP(),this.Gci=this.rdi+this.Sri,[4,this.Qst.Xx()];case 2:return i.sent(),this.Qst.mn(eh.uo,this.LV),this.Qst.mn(eh.jw,this.OV),[4,this.ndi(n)];case 3:return i.sent(),this.h3t(this.J4t),this.Qst.wn(Ey.bM,this.hdi),this.Qst.Gx(),[2]}})}).call(this)},i.nu=function(){return this.edi?this.edi.source:t.prototype.nu.call(this)},i.Nd=function(){return this.edi?this.edi.duration:t.prototype.Nd.call(this)},i.odi=function(){return t.prototype.Nd.call(this)},i.Tx=function(){var n=t.prototype.Tx.call(this);return TA.jn(n).Ny(this.Sri)._s()},i.RP=function(){var n=t.prototype.RP.call(this);return TA.jn(n).Ny(this.Sri)._s()},i.Xx=function(){return this.J4t.Xx()},i.Wci=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.J4t.Wci()];case 1:return t.sent(),this.h3t(this.J4t),[2]}})}).call(this)},i.gui=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.J4t.gui(t)];case 1:return n.sent(),[2]}})}).call(this)},i.hr=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:return null==(t=this.Zci)||t.Zg(),this.Zci=void 0,this.Kci=void 0,null==(n=this.Jci)||n.Zg(),this.Jci=void 0,this.Yci=void 0,this.edi=void 0,this.qci=0,this.zci=void 0,this.Gci=0,this.qzt=void 0,this.Xci=void 0,this.rdi=0,this.Qci=0,this.Qst.mn(Ey.bM,this.hdi),this.Qst.mn(eh.uo,this.LV),this.Qst.mn(eh.jw,this.OV),[4,this.J4t.hr()];case 1:return i.sent(),[2]}})}).call(this)},i.kn=function(){var n=this;return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.hr()];case 1:return i.sent(),[4,t.prototype.kn.call(n)];case 2:return i.sent(),[2]}})}).call(this)},Nt(n,[{key:"Sri",get:function(){return this.qci}},{key:"Eri",get:function(){return this.zci}},{key:"pri",get:function(){return this.Gci}},{key:"bri",get:function(){return this.qzt}},{key:"kri",get:function(){return this.Xci}}]),n}($3);F(),Et(),Dt();var a4=function(t){function n(){return t.apply(this,arguments)||this}return Ct(n,t),n.prototype.Ta=function(n,i){var r;return void 0!==Ui(null!=(r=null==n?void 0:n.ads)?r:[],p$)?ut.reject(new fd(cd.CONFIGURATION_ERROR,"THEOads must be enabled in the player configuration.")):t.prototype.Ta.call(this,n,i)},n}(Lb),f4=1/60,v4=function(t){function n(n){var i;return(i=t.call(this,n)||this).Vci=void 0,i.J4t=void 0,i.ldi=void 0,i.vdi=void 0,i.Sdi=!0,i.pdi=!0,i.Pdi=void 0,i.udi=function(t){switch(t.presentationMode){case"native-picture-in-picture":i.ddi();break;case"fullscreen":M0(i.Cd)&&i.ddi()}},i.mdi=function(t){i.ydi()},i.wdi=function(t){i.ydi()},i.xdi=function(){var t=i.eci;void 0!==t?(!t.Bri||i.LP()>=t.Bri)&&(i.Qst.mn(eh._y,i.xdi),i.Kui(function(){return i.i3t()})):i.Qst.mn(eh._y,i.xdi)},i.kdi=function(){i.oa.mn(Ey.TM,i.kdi),i.wci=!1,i.Sci=!1},i.adi(),i}Ct(n,t);var i=n.prototype;return i.adi=function(){this.Qst.zst.wn("presentationmodechange",this.udi)},i.cdi=function(){this.Qst.zst.mn("presentationmodechange",this.udi)},i.ddi=function(){var t=this;if(this.ldi&&!x2(this.ldi)&&this.J4t&&this.eci)return function(t){return V(t,W2)}(this.ldi)?(this.Jui(this.eci,"Cannot play L-shape content ad breaks in this representation"),void this.Kui(function(){return t.i3t()})):void this.fdi(new N2(this.Qst,this.J4t),!1,!1)},i.ix=function(n){n||this.hx||this.qx(),t.prototype.ix.call(this,n)},i.Ta=function(n,i){var r=this;return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Ta.call(r,n,i)];case 1:return e.sent(),this.Rui?(this.vdi=this.Rui.backdropDoubleBox,this.fdi(new P2(this.Qst,this.J4t),!1,!0),[2]):[2]}})}).call(this)},i.Bui=function(){this.J4t=new c4(this.Qst,this.Vci,this.oa.Cd)},i.Dui=function(){t.prototype.Dui.call(this),this.Vci=function(){var t=v.createElement("div");return si(t,"theo-ads-sgai-ad-player"),t}(),this.Uui.appendChild(this.Vci),this.Kai=w$(this.Vci),this._di()},i._di=function(){ai(this.Fui),function(t){var n=t.style;n.boxSizing="border-box",n.position="relative",n.alignItems="center",n.border="0 solid transparent",n.borderWidth="0px",n.backgroundColor="transparent",n.backgroundRepeat="no-repeat",n.backgroundAttachment="scroll"}(this.Uui),g$(this.Fui),g$(this.Vci)},i.Vui=function(){this.gdi(),t.prototype.Vui.call(this),this.Vci&&($n(this.Vci),this.Vci=void 0)},i.gdi=function(){_$(this.Ls),_$(this.Fui)},i.fdi=function(t,n,i){var r,e=null!=(r=this.ldi)?r:this,s=null!=t?t:this.Qst;C2(e,s),void 0!==this.ldi&&(this.ldi.mr(this.Uui,this.Fui,this.Vci),this.ldi.kn()),null==t||t.gr(this.Uui,this.Fui,this.Vci,e,n),this.ldi=t,i?this.tO(s):this.h3t(s)},i.E3t=function(){return this.J4t},i.qx=function(){var n;t.prototype.qx.call(this),null==(n=this.J4t)||n.qx()},i.OP=function(n,i){this.pdi=!0,t.prototype.OP.call(this,n,i)},i.Noi=function(t){var n,i;return t+(null!=(i=null==(n=this.J4t)?void 0:n.pri)?i:0)},i.Gui=function(){var n;t.prototype.Gui.call(this),null==(n=this.J4t)||n.wn(eh._y,this.mdi),this.Qst.wn(eh.qw,this.wdi)},i.Qui=function(){var n;t.prototype.Qui.call(this),null==(n=this.J4t)||n.mn(eh._y,this.mdi),this.Qst.mn(eh.qw,this.wdi)},i.ydi=function(){this.cci(this.LP()),this.Adi()},i.Adi=function(){var t;if(!(this.mci()||x2(this.ldi)||(null==(t=this.ldi)?void 0:t.yri()))){var n=b.min(this.J4t.Nd(),this.eci.ct)-this.J4t.LP(),i=this.bdi(n);if(void 0!==i&&!(this.Qst.LP()>i-.75)){var r=TA.jn(this.J4t.RP()),e=this.J4t.Tx();if(0!==e.length){var s=b.min(e.end(e.length-1),this.eci.Bri);r.CM().Cr(s)&&!this.Qst.kx&&(this.Qst.hx&&(this.Qst.Gx(),this.Qst.$P=!0),this.Qst.OP(i,{gOt:!0}))}}}},i.bdi=function(t){var n,i=this.Qst.Tx(),r=null==(n=this.eci)?void 0:n.Bri;if(0!==i.length&&void 0!==r){var e=i.start(0),s=i.end(i.length-1),u=r-t;if((u=16&&On.Q_<18&&(null==(n=this.Qoi)?void 0:n.uhi)!==h3.COMPANION&&(null==(s=this.J4t)||s.OP(this.J4t.LP()));this.fdi(o,this.Sci,!1),On.zv&&!o.yri()&&(null==(i=this.Qoi)?void 0:i.uhi)!==h3.COMPANION&&(_$(this.Fui),ci(this.Fui)),this.Iui.So(new j2(t).Ca),this.Sdi=(null==(r=this.Qoi)?void 0:r.uhi)===h3.COMPANION,null==(e=this.Qoi)||e.Nhi(this.LP())},i.pci=function(n,i){var r=!1;if(this.mci()){var e,s;if(!(null==(e=this.Qoi)?void 0:e.Dhi()))return!1;var u=null==(s=this.J4t)?void 0:s.RP();if(u&&u.length>0){var o=u.end(u.length-1);o-=this.J4t.Sri,r=b.min(this.J4t.Nd(),this.eci.ct)-5.499)t=2*b.atan2(r,u),n=b.PI/2,i=0;else if(o<-.499)t=-2*b.atan2(r,u),n=-b.PI/2,i=0;else{var h=r*r,c=e*e,a=s*s;t=b.atan2(2*e*u-2*r*s,1-2*c-2*a),n=b.asin(2*o),i=b.atan2(2*r*u-2*e*s,1-2*h-2*a)}return new R4(t,i,n)},n.tli=function(){var t=b.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return 0===t?(this.x=0,this.y=0,this.z=0,this.w=1):(t=1/t,this.x=this.x*t,this.y=this.y*t,this.z=this.z*t,this.w=this.w*t),this},t}(),R4=function(){function t(t,n,i){this.ali=void 0,this.uli=void 0,this.cli=void 0,this.ali=t||0,this.uli=n||0,this.cli=i||0}var n=t.prototype;return n.qy=function(t,n,i){return this.ali=t,this.uli=n,this.cli=i,this},n.Ift=function(t){return this.qy(t.ali,t.uli,t.cli)},n.lO=function(t){return this.ali+=t.ali,this.uli+=t.uli,this.cli+=t.cli,this},n.lF=function(t){return this.ali-=t.ali,this.uli-=t.uli,this.cli-=t.cli,this},n.dli=function(){var t=this.ali,n=this.cli,i=this.uli,r=b.cos(t/2),e=b.cos(n/2),s=b.cos(i/2),u=b.sin(t/2),o=b.sin(n/2),h=b.sin(i/2),c=r*e,a=u*o;return new I4(c*h+a*s,u*e*s+r*o*h,r*o*s-u*e*h,c*s-a*h)},t}();F(),Et();var C4=["lli","Eot","fli","error"];F(),Et();var D4=function(t){return t.Os="unavailable",t.vli="available",t.Ya="presenting",t}({});F(),Et();var P4=function(){function t(t,n){var i=this;this.xli=void 0,this.Ls=void 0,this.We=!1,this.Cli=new S4,this.Dli=new S4,this.Ili=new S4,this.kli=!1,this._li=function(t){i.Cli.qy(t.clientX,t.clientY),i.kli=!0,t.preventDefault(),t.stopPropagation()},this.gli=function(t){t.touches&&1===t.touches.length&&(i.Cli.qy(t.touches[0].pageX,t.touches[0].pageY),i.kli=!0,t.preventDefault())},this.cr=function(t){if(i.kli||i.Rli()){if(i.Rli()){var n=t.movementX||t.mozMovementX||0,r=t.movementY||t.mozMovementY||0;i.Dli.qy(i.Cli.x-n,i.Cli.y-r)}else i.Dli.qy(t.clientX,t.clientY);i.Ili.$di(i.Dli,i.Cli),i.Cli.Ift(i.Dli),i.Eli()}},this.mli=function(t){i.kli&&(i.Dli.qy(t.touches[0].pageX,t.touches[0].pageY),i.Ili.$di(i.Dli,i.Cli),i.Cli.Ift(i.Dli),i.Eli())},this.wli=function(){i.Tli()},this.yli=function(){i.Tli()},this.Sli=function(){i.Tli()},this.xli=t,this.Ls=n}var n=t.prototype;return n.jU=function(){this.We||(this.We=!0,this.Ls.addEventListener("mousedown",this._li),this.Ls.addEventListener("touchstart",this.gli),f.addEventListener("mousemove",this.cr),f.addEventListener("touchmove",this.mli),f.addEventListener("mouseup",this.wli),f.addEventListener("touchend",this.yli),this.Ali(f))},n.QU=function(){this.We&&(this.We=!1,this.Ls.removeEventListener("mousedown",this._li),this.Ls.removeEventListener("touchstart",this.gli),f.removeEventListener("mousemove",this.cr),f.removeEventListener("touchmove",this.mli),f.removeEventListener("mouseup",this.wli),f.removeEventListener("touchend",this.yli),this.bli(f))},n.Ali=function(t){if(function(t){try{return Boolean(t)&&t===t.top}catch(t){return!1}}(t));else if(vi(t))try{t.parent.addEventListener("mouseup",this.wli),this.Ali(t.parent)}catch(n){t.document.documentElement.addEventListener("mouseleave",this.Sli)}},n.bli=function(t){if(t.document.documentElement.removeEventListener("mouseleave",this.Sli),vi(t))try{t.parent.removeEventListener("mouseup",this.wli),this.bli(t.parent)}catch(t){}},n.Tli=function(){this.kli=!1},n.Eli=function(){var t=this.xli.Pli;t.yaw+=2*b.PI*this.Ili.x*.4/this.Ls.clientWidth,t.pitch+=2*b.PI*this.Ili.y*.5/this.Ls.clientHeight,t.pitch=Ti(t.pitch,-b.PI/2,b.PI/2),this.xli.Pli=t},n.Rli=function(){return(v.pointerLockElement||v.mozPointerLockElement||v.webkitPointerLockElement)===this.Ls},n.kn=function(){this.QU()},t}();F(),Et(),Dt();var N4=function(t){function n(){return t.call(this,"fli")||this}return Ct(n,t),n.prototype.xa=function(){return new B4},n}(kw),B4=function(t){function n(){return t.call(this,"stereochange")||this}return Ct(n,t),n}(rh);F(),Et();var x4=function(){function t(){this.iZ=[0,0,0,1],this.Mli=[]}var n=t.prototype;return n.Bli=function(t){var n;(n=t).clearColor.apply(n,[].concat(this.iZ)),t.clear(t.COLOR_BUFFER_BIT)},n.Nli=function(t,n){t.clearDepth(1),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),t.clear(t.DEPTH_BUFFER_BIT),this.Mli.forEach(function(i){i.Nli(t,n)})},n.Lli=function(t){this.Mli.push(t)},n.Oli=function(){this.Mli=[]},t}();F(),Et(),Dt(),F(),Et(),F(),Et(),Dt();var O4=function(){function t(t,n,i,r,e){this.Uli=void 0,this.$y=void 0,this.Vli=void 0,this.Vp=void 0,this.Hli=void 0,this.Wli=void 0,this.uc=void 0,this.Uli=t,this.$y=this.Fli(t,n,i),this.Vli=r,this.Vp=e,this.Hli=!1,this.Wli=0,this.uc=0}return t.prototype.Fli=function(t,n,i){var r=t.createBuffer();return null===r?(We("Failed to create buffer."),null):(t.bindBuffer(n,r),t.bufferData(n,i,t.STATIC_DRAW),r)},t}(),M4=function(t){function n(n,i,r){return t.call(this,n,n.ARRAY_BUFFER,i,r,n.FLOAT)||this}Ct(n,t);var i=n.prototype;return i.jU=function(t){if(null!==this.$y)if(null!==t){var n=this.Uli;n.bindBuffer(n.ARRAY_BUFFER,this.$y),n.vertexAttribPointer(t,this.Vli,this.Vp,this.Hli,this.Wli,this.uc),n.enableVertexAttribArray(t)}else We("Attempted to enable attribute without location.");else We("Attempted to enable buffer that failed to initialize.")},i.QU=function(t){t&&this.Uli.disableVertexAttribArray(t)},n}(O4);var L4=function(t){function n(n,i){var r;return(r=t.call(this,n,n.ELEMENT_ARRAY_BUFFER,i,1,n.UNSIGNED_SHORT)||this).zli=void 0,r.zli=i.length,r}return Ct(n,t),n.prototype.qli=function(){var t=this.Uli;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.$y),t.drawElements(t.TRIANGLES,this.zli,this.Vp,this.uc)},n}(O4);F(),Et();var U4=function(t){return t.VertexPos="aVertexPosition",t.VertexUV="aVertexUV",t.VertexColor="aVertexColor",t}({}),F4=function(t){return t.ProjectionMat="uProjectionMatrix",t.ModelViewMat="uModelViewMatrix",t.Texture="uTexture",t}({}),V4=function(t){return t.Normal="vNormal",t.Color="vColor",t.UV="vUV",t}({}),H4=function(){function t(t,n,i){this.Qli=void 0,this.Uli=void 0,this.Uli=t,this.Qli=this.Gli(this.Uli,n,i)}var n=t.prototype;return n.Gli=function(t,n,i){var r=this.Xli(t,t.VERTEX_SHADER,n),e=this.Xli(t,t.FRAGMENT_SHADER,i);if(null===r||null===e)return We("Failed to create vertex or fragment shader."),null;var s=t.createProgram();return null===s?(We("Failed to create shader program"),null):(t.attachShader(s,r),t.attachShader(s,e),t.linkProgram(s),t.getProgramParameter(s,t.LINK_STATUS)?s:(We("Failed to initialize shader program"),null))},n.Xli=function(t,n,i){var r=t.createShader(n);if(null===r)return We("failed to create shader."),null;if(t.shaderSource(r,i),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS)){var e=t.getShaderInfoLog(r);return We("Failed to compile shader with error: "+e),t.deleteShader(r),null}return r},n.jli=function(){return this.Qli},n.Kli=function(t){var n=this.Qli;if(null===n)return We("Attempted to retrieve attribute location when shader program was not initialized"),null;var i=this.Uli.getAttribLocation(n,t);return-1===i?null:i},n.Yli=function(t){var n=this.Qli;if(null===n)return We("Attempted to retrieve uniform location when shader program was not initialized"),null;var i=this.Uli.getUniformLocation(n,t);return null===i&&ze("Attempted to retrieve nonexistent uniform: "+t),i},t}(),W4=function(){function t(t,n,i){this.Zli=void 0,this.$li=void 0,this.tfi=void 0,this.Zli=t,this.$li=n,this.tfi=i}var n=t.prototype;return n.Jli=function(){var t,n=this.Zli.length,i=(t=b).max.apply(t,[].concat(this.$li));return i>=n?(ze("Created geometry where largest index ("+i+") is larger than/equal to attribute array size ("+n+")"),!1):(i0)&&a.push(E,I,C),(T!==r-1||c0&&(i.Uvi-=1)),null!==e&&void 0!==n){i.Evi=e.requestAnimationFrame(i.Ivi);var s=e.renderState.baseLayer,u=n.getViewerPose(i.Xvi);if(void 0!==s&&void 0!==u){r.bindFramebuffer(r.FRAMEBUFFER,s.framebuffer);for(var o,h=new R4,c=0,a=Lt(u.views);!(o=a()).done;){var f=o.value,v=new s5(f.eye);if(v.Tfi=f.projectionMatrix,i.Bvi()){var d=void 0;if(On.Ks&&On.u_&&null===i.Nvi){if(0===(d=f.transform.inverse.orientation).x&&0===d.y&&0===d.z&&1===d.w)return}else d=f.transform.orientation;v.Efi=new I4(d.x,d.y,d.z,d.w)}i.mvi&&v.Vfi(i.Kvi.oli()),h=h.lO(v.Efi.oli()),c+=1;var l=s.getViewport(f);l&&r.viewport(l.x,l.y,l.width,l.height),i.hvi.Nli(r,v)}var w=new R4(h.ali/c,h.uli/c,h.cli);i.Qvi=w.dli(),function(t,n){var i=t.sli(n);return 1-i*i=2},i.ABt=function(t,n){this.So(new _b(new fd(n,t)))},i.$vi=function(){var t=this.oa.nu();return t&&t.vr},i.kn=function(){this.rV.Zg(),this.vvi(),this.Vo(),this.Qfi&&($n(this.Qfi),this.Qfi=void 0),this.Uli=void 0,this.Kfi&&(this.Kfi.kn(),this.Kfi=void 0),this.oa=void 0},Nt(n,[{key:"Hvi",get:function(){return this.Wvi},set:function(t){var n=this.Ylt;this.Wvi=t,this.Ylt!==n&&this.So(new s1)}},{key:"tvi",get:function(){return this.evi!==WS.NONE}},{key:"evi",get:function(){return this.qvi},set:function(t){var n=this.Ylt;this.qvi=t,this.Ylt!==n&&this.So(new s1)}},{key:"Zfi",get:function(){return this.zvi},set:function(t){var n=this.zvi;this.zvi=t,this.zvi!==n&&this.So(new s1)}},{key:"Gvi",get:function(){return this.Zfi}},{key:"xvi",get:function(){return this.bvi||this.mvi}},{key:"bvi",get:function(){return this.Nvi},set:function(t){var n=this.Ylt;this.Nvi=t,this.Ylt!==n&&this.So(new s1)}},{key:"Xvi",get:function(){return this.Svi||this.wvi}},{key:"jvi",get:function(){var t=this.Qvi.oli();return{yaw:t.ali*T4,pitch:t.uli*T4,roll:t.cli*T4}},set:function(t){var n=a5(t&&t.pitch||0)*A4,i=a5(t&&t.roll||0)*A4,r=a5(t&&t.yaw||0)*A4,e=new R4(r,n,i),s=this.Qvi.oli(),u=this.Kvi.oli();this.Qvi=e.dli(),this.Kvi=e.lF(s).lO(u).dli()}},{key:"Pli",get:function(){var t=this.Kvi.oli();return{yaw:t.ali,pitch:t.uli,roll:t.cli}},set:function(t){var n=f5(t&&t.pitch||0),i=f5(t&&t.roll||0),r=f5(t&&t.yaw||0),e=new R4(r,n,i);this.Kvi=e.dli()}},{key:"Ylt",get:function(){return this.Hvi?this.bvi?D4.Ya:D4.vli:D4.Os}},{key:"Yvi",get:function(){return null!==this.bvi},set:function(t){var n=this.Yvi;t&&this.Zfi?this.Avi():this.gvi(),this.Yvi!==n&&this.So(new N4)}},{key:"Jvi",get:function(){return this.Mvi},set:function(t){null===this.Nvi&&(this.Mvi=t,t&&On.ru&&this.Ovi())}},{key:"Zvi",get:function(){return this.xfi},set:function(t){t&&t>=0&&t<=180&&(this.xfi=t,null!==this.mvi&&this.mvi.updateRenderState({inlineVerticalFieldOfView:this.xfi*A4}))}}]),n}(th);function a5(t){return Ii(t+180,360)-180}function f5(t){return Ii(t+b.PI,2*b.PI)-b.PI}function v5(t,n){return"function"==typeof t.getAll?d5(void 0===n?t.getAll():t.getAll(n)):function(t){var n=new Vc,i=[];return t.onsuccess=function(){var r=t.result;r&&r.value?(i.push(r.value),r.continue()):n.Xy(i),ot()},t.onerror=function(){n.jy(t.error),ot()},n.Qy}(void 0===n?t.openCursor():t.openCursor(n))}function d5(t){return new ut(function(n,i){t.onsuccess=function(){n(t.result),ot()},t.onerror=function(){i(t.error),ot()}})}Vb(function(t){return function(t){function n(n,i){var r;return(r=t.call(this,n,i)||this).xli=void 0,r.xli=new c5(r),r}Ct(n,t);var i=n.prototype;return i.xa=function(){return xw(t.prototype.xa.call(this),{vr:this.xli.Ca})},i.kn=function(){this.xli.kn(),t.prototype.kn.call(this)},n}(t)},Ub.lu),F(),Et(),F(),Et(),F(),Et(),Wt(),Bt(),Qt(),F(),Et(),Wt(),Qt(),F(),Et(),Wt(),Bt(),Ut(),Qt(),F(),Et(),Wt(),Qt(),St();var l5=function(){function t(t){var n=this;this.uPt=void 0,this.Qy=void 0,this.ro=void 0,this.uPt=t,this.ro=!0,this.Qy=new ut(function(t,i){n.uPt.oncomplete=function(){n.ro=!1,t(),ot()},n.uPt.onerror=function(){n.ro&&(n.ro=!1,i(n.uPt.error||new y("Transaction error")),ot())},n.uPt.onabort=function(){n.ro=!1,i(new y("Transaction aborted")),ot()}})}return t.prototype.Zg=function(){if(this.ro)try{this.uPt.abort(),this.ro=!1}catch(t){}},t}();function w5(t,n,i){return Vt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:r=new l5(t),u.label=1;case 1:return u.trys.push([1,3,4,5]),[4,ut.all([n(i),r.Qy])];case 2:return e=u.sent(),[2,e[0]];case 3:if(s=u.sent(),!r.ro)throw new y1("IDBTransaction committed prematurely",s);throw s;case 4:return r.Zg(),[7];case 5:return[2]}})})()}var g5=function(){function t(t,n){this.pE=void 0,this.n_i=void 0,this.pE=t,this.n_i=n}var n=t.prototype;return n.ZEt=function(t){return ut.resolve("persistent"===t)},n.zSt=function(t,n){return void 0===n&&(n="persistent"),"persistent"!==n?ut.reject(_W(n)):d5(this.s_i(mW.gPt).put(t))},n.$Et=function(t,n){return void 0===n&&(n="persistent"),Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:if("persistent"!==n)return[2,ut.reject(_W(n))];i=Lt(t),s.label=1;case 1:return(r=i()).done?[3,4]:(e=r.value,[4,this.zSt(e,n)]);case 2:s.sent(),s.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},n.Hy=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.Wy(t)];case 1:return[2,Boolean.apply(void 0,[n.sent()])]}})}).call(this)},n.Wy=function(t){return d5(this.s_i(mW._Pt).get(t))},n.tPt=function(t,n){return d5(this.s_i(mW._Pt).index(n).get(t))},n.jEt=function(t){return Vt(function(){var n,i,r,e,s;return zt(this,function(u){switch(u.label){case 0:n=[],i=Lt(t),u.label=1;case 1:return(r=i()).done?[3,4]:(e=r.value,[4,this.Wy(e)]);case 2:(s=u.sent())&&n.push(s),u.label=3;case 3:return[3,1];case 4:return[2,n]}})}).call(this)},n.iPt=function(){return v5(this.s_i(mW._Pt))},n.ePt=function(t){return v5(this.s_i(mW._Pt),t)},n.sPt=function(t,n){return v5(this.s_i(mW._Pt).index(n),t)},n._S=function(t){return d5(this.s_i(mW.gPt).delete(t))},n.nPt=function(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:n=Lt(t),e.label=1;case 1:return(i=n()).done?[3,4]:(r=i.value,[4,this._S(r)]);case 2:e.sent(),e.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},n.rPt=function(){return d5(this.s_i(mW.gPt).clear())},n.s_i=function(t){if(!this.n_i)throw new y("Lock was released");if(!function(t,n){return t===mW._Pt&&n===mW._Pt||n===mW.gPt}(t,this.n_i.mode))throw new y("Incompatible transaction mode: "+this.n_i.mode+", expected "+t);return this.n_i.objectStore(this.l)},n.r_i=function(){this.pE.h_i(this),this.n_i=void 0},Nt(t,[{key:"l",get:function(){return this.pE.l}}]),t}();var _5=function(){function t(t,n){this.u_i=void 0,this.l=void 0,this.LPt=void 0,this.ta=new yd,this.u_i=t,this.l=n}var n=t.prototype;return n.ZEt=function(t){return ut.resolve("persistent"===t)},n.zSt=function(t,n){return void 0===n&&(n="persistent"),"persistent"!==n?ut.reject(_W(n)):this.uPt(mW.gPt,function(n){return n.zSt(t)})},n.$Et=function(t,n){return void 0===n&&(n="persistent"),"persistent"!==n?ut.reject(_W(n)):this.uPt(mW.gPt,function(n){return n.$Et(t)})},n.Hy=function(t){return this.uPt(mW._Pt,function(n){return n.Hy(t)})},n.Wy=function(t){return this.uPt(mW._Pt,function(n){return n.Wy(t)})},n.tPt=function(t,n){return this.uPt(mW._Pt,function(i){return i.tPt(t,n)})},n.jEt=function(t){return this.uPt(mW._Pt,function(n){return n.jEt(t)})},n.iPt=function(){return this.uPt(mW._Pt,function(t){return t.iPt()})},n.ePt=function(t){return this.uPt(mW._Pt,function(n){return n.ePt(t)})},n.sPt=function(t,n){return this.uPt(mW._Pt,function(i){return i.sPt(t,n)})},n._S=function(t){return this.uPt(mW.gPt,function(n){return n._S(t)})},n.nPt=function(t){return this.uPt(mW.gPt,function(n){return n.nPt(t)})},n.rPt=function(){return this.uPt(mW.gPt,function(t){return t.rPt()})},n.QPt=function(t){return this.o_i(),this.LPt=new g5(this,t),this.LPt},n.o_i=function(){if(void 0!==this.LPt)throw new y("Already locked")},n.h_i=function(t){if(this.LPt!==t)throw new y("Incorrect lock");this.LPt=void 0},n.Zo=function(t){return this.ta.Zo(t)},n.uPt=function(t,n){var i=this;return this.Zo(function(){return i.a_i(t,n)})},n.a_i=function(t,n){return Vt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:this.o_i(),i=this.u_i.transaction(this.l,t),r=this.QPt(i),e.label=1;case 1:return e.trys.push([1,,3,4]),[4,w5(i,n,r)];case 2:return[2,e.sent()];case 3:return r.r_i(),[7];case 4:return[2]}})}).call(this)},n.c_i=function(t){this.o_i();var n=this.u_i.transaction(this.l,t);return this.QPt(n)},t.d_i=function(t,n){var i,r=new ut(function(t){i=t}),e=t.reduce(function(t,n){return t.then(function(){var t,i=new ut(function(n){t=n});return n.Zo(function(){return t(),r}).catch(di),i})},ut.resolve());return i(e.then(n)),r},t}();F(),Et(),Bt(),F(),Et(),Wt(),Qt(),F(),Et(),F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Wt(),Qt();var m5={bD:17,l_i:function(t){return Vt(function(){var n,i,r,e;return zt(this,function(s){if(n=t.transaction,i=t.database,(r=n.objectStoreNames)&&r.length)for(e=0;e1)throw new y("Only one youbora analytics configuration expected");var i=n[0];i.integration;return sp(i,["integration"])}},n}(t)},Ub.hnt),F(),Et(),F(),Et(),Dt(),Ut(),F(),Et(),Bt(),Dt();var M5=1,L5=0,U5=1e3,F5=function(t){function n(n,i,r,e,s,u){var o;return void 0===e&&(e=MMPlayerState),void 0===s&&(s=MMAdState),void 0===u&&(u=MMPresentationInfo),(o=t.call(this)||this).oa=void 0,o.YS=void 0,o.k_i=void 0,o.q_i=void 0,o.z_i=void 0,o.E_i=void 0,o.G_i=void 0,o.I_i=void 0,o.B_i=void 0,o.C_i=void 0,o.X_i=void 0,o.W_i=void 0,o.yui=void 0,o.Tui=void 0,o.jui=void 0,o.F_i=void 0,o.H_i=void 0,o.U_i=void 0,o.e8=void 0,o.V_i=void 0,o.uvi=void 0,o.GG=void 0,o.YQ=void 0,o.jG=void 0,o.qG=void 0,o.L_i=void 0,o.M_i=void 0,o.oa=n,o.YS=i,o.k_i=r,o.q_i=e,o.z_i=s,o.E_i=u,o.G_i=!0,o.I_i=!1,o.B_i=void 0,o.C_i=void 0,o.X_i=void 0,o.yui=function(t){var n,i=t.Int,r=(i.O0t(),n=i.wnt().duration,"linear"===i.wnt().type);i.F0t(),i.N0t();r&&(o.I_i=!0),o.D_i=o.z_i.AD_IMPRESSION,o.D_i=o.z_i.AD_STARTED},o.Tui=function(t){o.I_i=!1,o.D_i=o.z_i.AD_COMPLETED},o.jui=function(t){t.QJt===EJ.ADBLOCK?o.D_i=o.z_i.AD_BLOCKED:o.D_i=o.z_i.AD_ERROR},o.F_i=function(){o.D_i=o.z_i.AD_SKIPPED},o.H_i=function(t){var n,i,r,e;t.qk===ig.Bk&&(o.X_i&&t.BX!==o.X_i&&o.k_i.reportABRSwitch(o.X_i,t.BX),o.X_i=t.BX,o.k_i.reportChunkRequest(new MMChunkInformation(t.$D,t.BX,t.VN,t.uut.Yu,void 0,void 0,null!=(r=null==(n=t.uut.Sat)?void 0:n[0])?r:0,null!=(e=null==(i=t.uut.Sat)?void 0:i[1])?e:-1)))},o.U_i=function(t){o.R_i=o.q_i.STOPPED,o.So(t)},o.e8=function(t){o.R_i=o.q_i.ERROR,o.k_i.reportError(t.error,o.P_i())},o.V_i=function(){o.x_i?o.D_i=o.z_i.AD_PAUSED:o.R_i=o.q_i.PAUSED},o.uvi=function(){o.x_i&&(o.D_i=o.z_i.AD_PLAY)},o.GG=function(){o.x_i?(o.B_i===o.z_i.AD_PAUSED&&(o.D_i=o.z_i.AD_RESUMED),o.D_i=o.z_i.AD_PLAYING):(o.G_i&&(o.G_i=!1,o.S_i(),o.R_i=o.q_i.STARTED),o.R_i!==o.q_i.PAUSED&&o.R_i!==o.q_i.BUFFERING||(o.R_i=o.q_i.RESUMED))},o.YQ=function(){o.k_i.reportPresentationSize(o.oa.Bx,o.oa.Rx)},o.jG=function(t){o.x_i||o.R_i!==o.q_i.PAUSED||o.k_i.reportPlayerSeekCompleted(t.currentTime*U5)},o.qG=function(){o.x_i||(o.R_i=o.q_i.BUFFERING)},o.L_i=function(){o.k_i.reportDownloadRate(b.floor(pb.Ng.fW()))},o.M_i=function(){o.x_i||o.k_i.reportPlaybackPosition(o.P_i())},o.R_i=o.q_i.INITIALIZED,o.xNt(),o.W_i=o.N_i(),o}Ct(n,t);var i=n.prototype;return i.S_i=function(){var t=this.ct===1/0,n=t?M5:L5,i=t?-1:this.ct,r=Ji(this.oa.rt.II,this.T_i);this.k_i.setPresentationInformation(new this.E_i(n,i,r))},i.T_i=function(t){for(var n=t.KI.II,i=[],r=0;r1)throw new y("Only one Moat analytics configuration expected");return n[0]}},n}(t)},Ub.hnt),F(),Et(),F(),Et(),F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et(),Wt(),Bt(),Ut(),Qt();var z5="urn:google:dai:2018",X5=function(){function t(t,n,i,r,e){var s=this;this.oa=void 0,this.bgi=void 0,this.cai=void 0,this.kgi=void 0,this.Pgi=void 0,this.aui=void 0,this.JW=void 0,this.ZW=void 0,this.m7=new hr,this.Dgi=!1,this.Sgi=!0,this.Rgi=function(t){var n=t.Ht;n.Lt===Ym.VU&&(n.Km===Dg.ID3||n.Km===Dg.EVENT_STREAM&&n.ZI===z5)&&(n.Xk=Hm.JI,s.aui=n,n.wn(Dw.hI,s.Bgi))},this.Bgi=function(t){t.TO.wn(Lg.zL,s.Ngi)},this.Ngi=function(t){var n,i;if(s.cai)if((null==(n=s.aui)?void 0:n.Km)===Dg.ID3){var r=t.TO.U;"TXXX"===r.id&&s.cai.Pai({TXXX:r.text})}else if((null==(i=s.aui)?void 0:i.Km)===Dg.EVENT_STREAM){var e=t.TO.U;s.cai.xai(z5,e,t.XF)}},this.oa=t,this.cai=n,this.kgi=i,this.bgi=r,this.Pgi=e,i&&n&&this.oa.Jc&&this.oa.Jc.Ent(i.N9t)}var n=t.prototype;return n.OP=function(t){this.m7.Zg(),this.m7=new hr,kr(_r(this.gri(t,this.m7.Yg),this.m7))},n.gri=function(t,n){return Vt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:return dr(n),this.kgi&&this.cai?this.kgi.ynt&&!this.Pgi?[2]:(i=this.oa.LP(),this.Sgi&&(r=this.cai.Rai(t,i))?(this.oa.Egi(r),[4,this.cai.ww(C3.AD_BREAK_ENDED,n)]):[3,2]):[2,this.oa.Egi(t)];case 1:if(e.sent(),this.cai.Iai(t).PO>t)return[2];e.label=2;case 2:return this.oa.Egi(t),[2]}})}).call(this)},n.Tx=function(){var t=this.kgi&&this.kgi.ynt;if(t){var n=TA.jn(this.oa.xgi()),i=t._Ot,r=i+t.p0t,e=new TA([i,r]);return n.Mn(e)._s()}return this.oa.xgi()},n.Xnt=function(t,n){return Vt(function(){var i,r,e;return zt(this,function(s){switch(s.label){case 0:if(!t)return[2,this.oa.Igi(t,n)];i=t,s.label=1;case 1:return s.trys.push([1,3,,4]),this.oa.nt.wn(Sw.eI,this.Rgi),[4,this.bgi.Cgi(t,n)];case 2:return i=s.sent(),this.kgi&&this.cai&&(this.Dgi=!0),[3,4];case 3:if(lr(r=s.sent()),r.code===sg.LICENSE_INVALID)return[2];throw e=new fd(cd.SOURCE_NOT_SUPPORTED,"Something went wrong while setting up a Google DAI stream.",r),this.JW=hg(e),this.ZW=e,this.oa.So(new _b(e)),e;case 4:return[4,this.oa.Igi(i,n)];case 5:return s.sent(),[2]}})}).call(this)},n.hr=function(){if(this.Dgi){if(this.oa.nt.mn(Sw.eI,this.Rgi),this.aui){this.aui.mn(Dw.hI,this.Bgi);for(var t,n=Lt(this.aui.L.II);!(t=n()).done;){t.value.mn(Lg.zL,this.Ngi)}this.aui=void 0}this.JW=void 0,this.ZW=void 0,this.m7.Zg(),this.kgi&&this.kgi.hr(),this.cai&&this.cai.hr(),this.Dgi=!1}},n.kn=function(){this.hr(),this.oa.Ogi(),this.cai&&this.cai.kn()},Nt(t,[{key:"Ca",get:function(){var t=this,n=this.bgi;return{contentTimeForStreamTime:function(n){return t.cai?t.cai.lai(n):n},streamTimeForContentTime:function(n){return t.cai?t.cai.fai(n):n},replaceAdTagParameters:function(n){t.cai&&t.cai.replaceAdTagParameters(n)},get snapback(){return t.Sgi},set snapback(n){t.Sgi=n},get sourceTransformer(){return n.Tgi},set sourceTransformer(t){n.Tgi=t}}}},{key:"lt",get:function(){return this.JW||this.oa.Mgi()}},{key:"WP",get:function(){return this.ZW||this.oa.Lgi()}}]),t}();F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Bt(),Dt();var q5=function(t){function n(n,i,r,e){var s;return void 0===e&&(e=!0),(s=t.call(this,r)||this).Ugi=void 0,s.Ugi=e,s.J3t=n,s.Z3t=i,s}return Ct(n,t),Nt(n,[{key:"Fgi",get:function(){return this.Ugi}},{key:"MZt",get:function(){return UZ.so}}]),n}(P$),G5=function(t){function n(n,i){var r;return(r=t.call(this,new DI,UZ.so)||this).cai=void 0,r.oa=void 0,r.gai=void 0,r.mai=void 0,r.Hgi=void 0,r.kai=void 0,r.cai=n,r.oa=i,r.gai=function(t){var n=r.G0t;if(n&&r.M0t){var i=t.uai.Dai;r.M0t.v9t=i.MP,function(t,n){var i=n.i7t,r=n.t7t,e=n.MP,s=Pi(t.Jc.slice(0,i-1),function(t){var n;return null!=(n=t.ct)?n:0});t.m0t=r-e-s}(n,i)}},r.mai=function(t){var n=t.uai.Bai;if(n)for(var i,e=Lt(n);!(i=e()).done;){var s=i.value;if(!r.Xgi(s.EO)){var u=s.PO-s.EO,o=new q5(u,u,s.EO,!0);r.X0t.push(o)}}},r.Hgi=function(t){r.qgi(t.type),r.Ggi(t)},r.kai=function(t){r.L9t=!1,r.M0t=void 0;var n=r.ynt;n&&(n.m0t=0,r.zgi(t.type,!1,!1),r.G0t=void 0)},r.Vgi(),r}Ct(n,t);var i=n.prototype;return i.Vgi=function(){var t=[C3.STARTED,C3.FIRST_QUARTILE,C3.MIDPOINT,C3.THIRD_QUARTILE,C3.COMPLETE];this.cai.wn(t,this.Hgi),this.cai.wn(C3.AD_BREAK_ENDED,this.kai),this.cai.wn(C3.AD_PROGRESS,this.gai),this.cai.wn(C3.CUEPOINTS_CHANGED,this.mai)},i.Wgi=function(t){var n=t.V7t._Ot,i=this.G0t||this.findAdBreakWithPredicate(n,function(t){return!t._x});if(!i){var r=t.V7t.p0t;n=this.oa.LP(),(i=new q5(r,r,n,!1)).t4t(),this.X0t.push(i)}return i},i.qgi=function(t){switch(t){case C3.STARTED:this.L9t=!0;break;case C3.AD_BREAK_ENDED:this.L9t=!1}},i.zgi=function(t,n,i){if(n)switch(t){case C3.STARTED:case C3.FIRST_QUARTILE:case C3.MIDPOINT:case C3.THIRD_QUARTILE:case C3.COMPLETE:this.M3t.So(new Vx(this.G0t))}if(i)switch(t){case C3.STARTED:case C3.FIRST_QUARTILE:case C3.MIDPOINT:case C3.THIRD_QUARTILE:case C3.COMPLETE:this.M3t.So(new Wx(this.M0t,this.M0t.v9t))}switch(t){case C3.COMPLETE:this.M3t.So(new Xx(this.M0t,this.B9t.v9t));break;case C3.AD_BREAK_ENDED:this.M3t.So(new Ux(this.ynt))}switch(t){case C3.FIRST_QUARTILE:this.M3t.So(new j$(this.M0t,this.B9t.v9t));break;case C3.MIDPOINT:this.M3t.So(new Y$(this.M0t,this.B9t.v9t));break;case C3.THIRD_QUARTILE:this.M3t.So(new J$(this.M0t,this.B9t.v9t))}},i.Ggi=function(t){var n=t.Int,i=this.Wgi(n),r=function(t,n){if(t.Jc.length)return!1;for(var i=0;i=t&&s._Ot<=n&&!s._x&&(!i||s._Ot>=i._Ot)&&(i=s)}return i},i.rD=function(){},i.knt=function(t){},i.hr=function(){this.M0t&&(this.M3t.So(new Xx(this.M0t,this.M0t.v9t)),this.M0t=void 0),this.G0t&&(this.M3t.So(new Ux(this.G0t)),this.G0t=void 0),this.L9t=!1,Yi(this.X0t)},i.kn=function(){this.hr(),this.M3t.kn()},i.Snt=function(t){},Nt(n,[{key:"G3t",get:function(){return this.L9t}},{key:"M3t",get:function(){return this.s5t}},{key:"jgi",get:function(){var t=this.findAdBreakWithPredicate(0,function(t){return t.Fgi}),n=0;return t&&(n=t.p0t),n}}]),n}(I0);F(),Et(),Wt(),Ut(),Qt();var j5=function(){function t(t){this.cai=void 0,this.Tgi=void 0,this.cai=t,this.Tgi=function(t){return t}}var n=t.prototype;return n.Cgi=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c,a,f;return zt(this,function(v){switch(v.label){case 0:for(i=[],r=[],e=Lt(t.sources);!(s=e()).done;)if(qA(u=s.value)){if(!this.cai)continue;i.push(u)}else r.push(u);if(0===i.length)return[2,t];v.label=1;case 1:return void 0!==o||0===i.length?[3,7]:[4,qT.Ng.cz(i,t)];case 2:c=v.sent().Mc,a=c,dr(n),v.label=3;case 3:return v.trys.push([3,5,,6]),[4,this.Kgi(a,n)];case 4:return o=v.sent(),r.push(o),[3,6];case 5:return lr(f=v.sent()),h=f,Xi(i,a),[3,6];case 6:return[3,1];case 7:if(0!==t.sources.length&&0===r.length)throw new y("Fatal: unable to play DAI streams.");return h&&We(h.message),[2,Yu({},t,{sources:r})]}})}).call(this)},n.Kgi=function(t,n){return Vt(function(){var i,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(!this.cai)throw new y("Could not find Google\u2019s IMA DAI HTML5 SDK, all DAI sources will be ignored.");return i=this.cai.ww(C3.LOADED,n),r=this.cai.ww(C3.ERROR,n),e=t.type===hA.cR?"dash":"hls",this.cai.AHt(Yu({},t.ssai,{format:e})),[4,ut.race([i,r])];case 1:return(s=h.sent()).type!==C3.LOADED?[3,5]:(u=t.type===hA.cR?hA.cR:hA.lR,this.Tgi?[4,this.Tgi(s.uai.Yu||"")]:[3,3]);case 2:return o=h.sent(),[3,4];case 3:o=s.uai.Yu,h.label=4;case 4:return[2,vA(Yu({},t,{src:o,type:u}))];case 5:throw y(s.uai.Nai);case 6:return[2]}})}).call(this)},t}();Vb(function(t){return function(n){return function(n){function i(i,r){var e;(e=n.call(this,i,r)||this).Ygi=void 0,e.Jgi=!1,e.Y1t=void 0,e.$gi=void 0,e.Zgi=function(t){13===t.which&&e.Y1t.click(),e.zx()};var s,u,o,h=e.Wx(),c=r.ads.googleIma.useAdUiElementForSsai,a=null!=(s=r.ads.googleIma.allowSeekingForGoogleDai)&&s;try{var f;c?(e.$gi=v.createElement("div"),ci(e.$gi),e.$gi.className="theo-dai-ad-ui"):(e.Y1t=v.createElement("button"),e.Y1t.className="theo-dai-clickthrough"),u=t(h,e.Y1t,e.$gi),o=new G5(u,e);var d=null!=(f=e.Y1t)?f:e.$gi;d&&e.xe.appendChild(d),e.Jgi=!0}catch(t){e.Y1t=void 0,e.$gi=void 0}var l=new j5(u);return e.Ygi=new X5(e,u,o,l,a),e.Y1t&&(e.Y1t.addEventListener("keydown",e.Zgi),e.Y1t.addEventListener("click",e.Zgi)),e}Ct(i,n);var r=i.prototype;return r.xa=function(){var t=n.prototype.xa.call(this),i=t.ads;if(i){var r=this.Ygi.Ca;xw(i,{get dai(){return r}})}return t},r.Egi=function(t){n.prototype.OP.call(this,t)},r.OP=function(t,n){this.Ygi.OP(t)},r.xgi=function(){return n.prototype.Tx.call(this)},r.Tx=function(){return this.Ygi.Tx()},r.Ta=function(t){return this.Ygi.hr(),n.prototype.Ta.call(this,t)},r.Igi=function(t,i){var r=this;return Vt(function(){return zt(this,function(e){return[2,n.prototype.Xnt.call(r,t,i)]})})()},r.Xnt=function(t,n){return Vt(function(){return zt(this,function(i){return[2,this.Ygi.Xnt(t,n)]})}).call(this)},r.Mgi=function(){return n.prototype.HP.call(this)},r.Lgi=function(){return n.prototype.qP.call(this)},r.HP=function(){return this.Ygi.lt},r.qP=function(){return this.Ygi.WP},r.Ogi=function(){n.prototype.kn.call(this)},r.kn=function(){this.Ygi.kn(),this.Y1t&&($n(this.Y1t),this.Y1t.removeEventListener("keydown",this.Zgi),this.Y1t.removeEventListener("click",this.Zgi),this.Y1t=void 0),this.$gi&&($n(this.$gi),this.$gi=void 0)},Nt(i,[{key:"Kl",get:function(){return this.Jgi}}]),i}(n)}}(function(t,n,i){if(!(f.google&&f.google.ima&&zn(f.google.ima.dai)))throw new y("Could not find Google\u2019s IMA DAI HTML5 SDK, all DAI sources will be ignored.");var r=Q3(),e=new google.ima.dai.api.StreamManager(t,i),s=Q3();return new z3(e,n,s&&s!==r?s:void 0)}),Ub.rnt),F(),Et(),F(),Et(),Dt(),Ut(),F(),Et(),Bt();var Q5=function(){function t(t,n){var i=this;this.oa=void 0,this.rpi=void 0,this.spi=void 0,this.mpi=void 0,this.lpi=void 0,this.wpi=void 0,this.vpi=void 0,this.Ppi=void 0,this.gpi=void 0,this.bpi=void 0,this.ipi=void 0,this.uvi=void 0,this.U_i=void 0,this.qui=void 0,this.hpi=void 0,this.opi=void 0,this.e8=void 0,this.upi=void 0,this.hNt=void 0,this.Spi=void 0,this.oa=t,this.rpi=n,this.mpi=!1,this.lpi=!1,this.wpi=[],this.vpi=-1/0,this.gpi=!1,this.uvi=function(){i.mpi||(i.rpi.xpi(),i.gpi&&i.rpi.Api(),i.mpi=!0)},this.U_i=function(){i.rpi.Ipi(),i.lpi=!0},this.qui=function(){i.vpi0&&(e.Ls.style.cursor="pointer",e.Ls.addEventListener("click",e.Ewi))},e.awi=function(){e.Ls.style.cursor="",e.Ls.removeEventListener("click",e.Ewi)},e.Ewi=function(){e.B9t&&e.B9t.qmi.getRendererController().processEvent({name:tv.freewheel.SDK.EVENT_AD_CLICK})},e.uwi=function(t){switch(t.subType){case tv.freewheel.SDK.EVENT_AD_COMPLETE:e.bwi();break;case tv.freewheel.SDK.EVENT_AD_SKIPPED:e.t2t(),e.bwi()}},e}Ct(n,t);var i=n.prototype;return i.Gmi=function(t,n){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Xmi=t,this.jmi=n,this.Qmi(t),[4,n];case 1:return i.sent(),this.Kmi(),[2]}})}).call(this)},i.Kmi=function(){this.nwi()},i.Qmi=function(t){t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.rwi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.hwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.owi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION_END,this.awi),t.addEventListener(tv.freewheel.SDK.EVENT_AD,this.uwi)},i.cwi=function(){this.Xmi&&(this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.rwi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.hwi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.owi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION_END,this.awi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_AD,this.uwi))},i.nwi=function(){this.Jmi=this.dwi(this.lwi),this.$mi=this.dwi(this.fwi).concat(this.dwi(this.vwi)),this.ewi=this.dwi(this._wi),this.swi=this.Jmi.concat(this.$mi).concat(this.ewi)},i.dwi=function(t){if(!this.Xmi)return[];var n=this.Xmi.getSlotsByTimePositionClass(t);return this.gwi(n)},i.pwi=function(t){if(this.G0t){var n=t.getSlot().getAdInstances().indexOf(t);-1!==n&&(this.G0t.Wmi=n);var i=this.G0t.Vmi;return i&&(i.qmi=t),i}},i.mwi=function(t){return Ui(this.swi,function(n){return n.Fmi===t})},i.gwi=function(t){return t.map(function(t){var i=t.getTotalDuration(),r=n.wwi(t);return new v6(i,i,r,t)})},i.t2t=function(){var t=this.B9t;t&&this.So(new H$(t,this.Awi()))},i.bwi=function(){var t=this.B9t;t&&(this.So(new Xx(t,t.qmi.getPlayheadTime())),this.M0t=void 0)},i.Swi=function(t){var n=this.ynt;n&&(n.m0t=function(t,n,i){void 0===i&&(i=0);for(var r=0,e=t.Jc.length,s=n;s=0)(n=t).push.apply(n,[].concat(this.G0t.Jc.slice(i+1)))}for(var r,e=Lt(this.swi);!(r=e()).done;){var s,u=r.value;(s=t).push.apply(s,[].concat(u.Jc))}return t}},{key:"bnt",get:function(){return this.swi}}]),n}(ih);F(),Et(),Bt(),Dt(),Ut();var g6=function(t){function n(n,i,r,e){var s;return(s=t.call(this)||this).oa=void 0,s.sc=void 0,s.uyt=void 0,s.Q1t=void 0,s.N4=void 0,s.npt=void 0,s.kz=void 0,s.ib=void 0,s.WA=void 0,s.Lwi=void 0,s.Z4=void 0,s.t5=void 0,s.bz=void 0,s.Vwi=void 0,s.Uwi=void 0,s.Iwi=void 0,s.Cwi=void 0,s.Hwi=void 0,s.vm=void 0,s.Dwi=void 0,s.Bwi=void 0,s.Nwi=void 0,s.Ed=void 0,s.Rwi=void 0,s.oa=n,s.sc=i,s.uyt=r,s.Q1t=e,s.N4=TA.iL()._s(),s.kz=!0,s.WA=NaN,s.Lwi=!1,s.Z4=!1,s.t5=Cy.VL,s.bz=0,s.Uwi=0,s.Iwi=function(t){switch(t.subType){case tv.freewheel.SDK.EVENT_AD_PAUSE:(function(t){if(!t)return!0;var n=t.qmi,i=n.getPlayheadTime(),r=n.getDuration();return i>=r||Ei(r,i)})(s.uyt.B9t)||(s.hx=!0,s.So(new hT(s.MP)));break;case tv.freewheel.SDK.EVENT_AD_RESUME:s.hx=!1,s.So(new Oy(s.MP));break;case tv.freewheel.SDK.EVENT_AD_VOLUME_CHANGE:if(s.npt){var n=s.npt.getAdVolume();0===n?s.Lwi=!0:s.ib=n,s.So(new wT(s.MP,s.Mx))}}},s.Cwi=function(){s.UP=!1;var t=s.hx;if(s.hx=!1,t&&(s.So(new cT(s.MP)),s.So(new Oy(s.MP))),s.t5=Cy.WL,s.MP=0,s.uyt.B9t){var n=s.uyt.B9t.qmi;s.WA=n.getDuration(),s.So(new aT(s.WA)),s.Vwi=_(function(){if(s.Dhi){s.uyt.Swi(s.MP);var t=n.getPlayheadTime();Si(t,s.Uwi,.001)||s.So(new pw(t,void 0)),s.Uwi=t}else s.vm()},250),s.npt&&s.npt.setAdVolume(_6(s.$P,s.Mx))}},s.Hwi=function(){var t=s.uyt.B9t;t&&(t.l4t===B$.a4t?s.oa.zx():s.hx||s.zx())},s.vm=function(){m(s.Vwi),s.Vwi=void 0},s.Dwi=function(){s.vm(),s.UP=!0},s.Bwi=function(){s.Fwi("pause")},s.Nwi=function(){s.Fwi("playing")},s.Ed=function(t){t.od.l4t===B$.hZt&&(s.hx=!1)},s.Rwi=function(){s.npt&&s.npt.resize(s.sc.Eu,s.sc.Iu)},s.ib=n.Mx,r.wn("Dnt",s.Ed),s.sc.wn(hI.yn,s.Rwi),s.Q1t.addEventListener("click",s.Hwi),s}Ct(n,t);var i=n.prototype;return i.Pwi=function(){this.npt&&this.npt.setAdVolume(_6(this.$P,this.Mx))},i.xwi=function(t){this.npt=t,this.Qmi(t)},i.Qmi=function(t){t.addEventListener(tv.freewheel.SDK.EVENT_AD,this.Iwi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.Rwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.Cwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_COMPLETE,this.Dwi),t.addEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_PAUSE_REQUEST,this.Bwi),t.addEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_RESUME_REQUEST,this.Nwi)},i.Mwi=function(){var t=this.npt;t&&(t.removeEventListener(tv.freewheel.SDK.EVENT_AD,this.Iwi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.Rwi),t.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.Cwi),t.removeEventListener(tv.freewheel.SDK.EVENT_AD_COMPLETE,this.Dwi),t.removeEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_PAUSE_REQUEST,this.Bwi),t.removeEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_RESUME_REQUEST,this.Nwi))},i.Gx=function(){this.uyt.ynt&&(this.uyt.ynt.Fmi.resume(),this.hx=!1)},i.zx=function(){this.uyt.ynt&&(this.uyt.ynt.Fmi.pause(),this.hx=!0)},i.Fwi=function(t){var i=n.Owi(t);this.npt&&i&&this.npt.setVideoState(i)},i.rD=function(){var t=this.uyt.B9t;t&&t.qmi.skip()},i.hr=function(){if(this.Mwi(),this.npt){this.Fwi("stop"),this.npt.setVideoState(tv.freewheel.SDK.VIDEO_STATE_STOPPED);for(var t,n=Lt(this.npt.getTemporalSlots());!(t=n()).done;){t.value.stop()}this.npt.dispose(),this.npt=void 0}this.WA=NaN,this.UP=!1,this.t5=Cy.VL,this.MP=0,this.Uwi=0,this.hx=!0,void 0!==this.Vwi&&(m(this.Vwi),this.Vwi=void 0)},i.kn=function(){this.hr(),this.Vo(),this.uyt.mn("Dnt",this.Ed),this.sc.mn(hI.yn,this.Rwi),this.Q1t.removeEventListener("click",this.Hwi)},n.Owi=function(t){switch(t){case"pause":return tv.freewheel.SDK.VIDEO_STATE_PAUSED;case"playing":return tv.freewheel.SDK.VIDEO_STATE_PLAYING;case"ended":return tv.freewheel.SDK.VIDEO_STATE_COMPLETED;case"stop":return tv.freewheel.SDK.VIDEO_STATE_STOPPED}},Nt(n,[{key:"MP",get:function(){var t=this.uyt.B9t;return t&&(this.MP=t.qmi.getPlayheadTime()),this.bz},set:function(t){this.bz=t}},{key:"ct",get:function(){return this.WA}},{key:"Dhi",get:function(){return!!this.uyt&&void 0!==this.uyt.ynt}},{key:"hx",get:function(){return this.kz},set:function(t){this.kz=t}},{key:"Mx",get:function(){return this.ib},set:function(t){this.npt&&this.npt.setAdVolume(t),this.ib=t}},{key:"$P",get:function(){return this.npt&&(this.Lwi=0===this.npt.getAdVolume()),this.Lwi},set:function(t){this.npt&&this.npt.setAdVolume(_6(t,this.Mx)),this.Lwi=t}},{key:"Sx",get:function(){return this.N4}},{key:"UP",get:function(){return this.Z4},set:function(t){this.Z4=t}},{key:"Ax",get:function(){return this.t5}}]),n}(ih);function _6(t,n){return t?0:n}F(),Et(),Wt(),Ut(),Qt(),F(),Et(),Bt(),Dt();var m6=function(t){function n(){return t.call(this,"A FreeWheel Ad Error occurred")||this}return Ct(n,t),Nt(n,[{key:"name",get:function(){return h6.gmi}}]),n}(ar);F(),Et(),Bt(),Dt();var y6=function(t){function n(){return t.call(this,"A FreeWheel Reset Error Occurred")||this}return Ct(n,t),Nt(n,[{key:"name",get:function(){return h6._mi}}]),n}(ar),p6=0;function k6(){return"cue-"+ ++p6}var b6=function(){function t(t,n,i,r){var e=this;this.npt=void 0,this.zwi=void 0,this.Gwi=void 0,this.npt=n,this.Gwi=function(t){e.npt.removeEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,e.Gwi),t.success?e.zwi.Xy(void 0):e.zwi.jy(new m6)},this.Wwi(t,i,r),n.addEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Gwi),this.zwi=new Vc}var n=t.prototype;return n.Wwi=function(t,n,i){t.setNetwork(n.networkId),t.setServer(n.adServerUrl);var r=this.npt;if(r.setProfile(n.profile),n.assetId&&n.assetDuration&&r.setVideoAsset(n.assetId,n.assetDuration),n.siteSectionId&&r.setSiteSection(n.siteSectionId),r.registerVideoDisplayBase(i),n.cuePoints&&n.cuePoints.length)for(var e,s=Lt(n.cuePoints);!(e=s()).done;){var u=e.value;r.addTemporalSlot(k6(),u.adUnit,u.timeOffset)}var o=n.customData;if(zn(o))for(var h,c=Lt(k.keys(o));!(h=c()).done;){var a=h.value,f=o[a];r.addKeyValue(a,f)}},n.qwi=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.npt.submitRequest(),[4,this.zwi.Qy];case 1:return t.sent(),[2]}})}).call(this)},n.hr=function(){this.npt.removeEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Gwi),this.zwi.jy(new y6)},t}();F(),Et(),Wt(),Ut(),Qt(),F(),Et(),Bt();var A6=function(){function t(t){var n=this;this.Xmi=void 0,this.Jg=void 0,this.hwi=void 0,this.P7t=void 0,this.Xmi=t,this.hwi=function(t){n.Xwi(),n.Jg.Xy(void 0)},this.P7t=function(t){n.Xwi(),n.Jg.jy(new m6)},this.Jg=new Vc,t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.hwi),t.addEventListener(tv.freewheel.SDK.EVENT_ERROR,this.P7t)}var n=t.prototype;return n.Xwi=function(){this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.hwi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_ERROR,this.hwi)},n.WHt=function(){this.Xwi(),this.Jg.jy(new y6)},Nt(t,[{key:"jwi",get:function(){return this.Jg.Qy}}]),t}(),T6=function(){function t(t,n){var i=this;this.oa=void 0,this.Kwi=void 0,this.NNt=void 0,this.Ywi=void 0,this.Xmi=void 0,this.Jwi=void 0,this.oa=t,this.Kwi=n,this.NNt=0,this.Jwi=function(){for(var t,n=i.oa.LP(),r=Lt(i.Kwi.Zmi);!(t=r()).done;){var e=t.value,s=new TA([i.NNt,n],[!0,!0]),u=e.Fmi.getTimePosition();if(s.Cr(u))switch(e.Fmi.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL:i.Qwi([e]);break;case tv.freewheel.SDK.TIME_POSITION_CLASS_OVERLAY:e.Fmi.play(),e.Fmi.setVisible(!0)}}i.NNt=n},t.wn(eh._y,this.Jwi)}var n=t.prototype;return n.aO=function(t){this.Xmi=t},n.Lmi=function(){return this.Qwi(this.Kwi.Ymi)},n.Imi=function(){this.Qwi(this.Kwi.iwi)},n.Qwi=function(t){return Vt(function(){var n,i;return zt(this,function(r){switch(r.label){case 0:if(!this.Xmi)return[2];r.label=1;case 1:if(!(t.length>0))return[3,6];this.Ywi=new A6(this.Xmi),n=this.Ywi.jwi,(i=this.Kwi.ynt)&&i.l4t===B$.a4t&&i.Fmi.stop(),t.shift().Fmi.play(),r.label=2;case 2:return r.trys.push([2,,4,5]),[4,n];case 3:return r.sent(),[3,5];case 4:return this.Ywi=void 0,[7];case 5:return[3,1];case 6:return[2]}})}).call(this)},n.hr=function(){this.Ywi&&(this.Ywi.WHt(),this.Ywi=void 0),this.NNt=0},n.kn=function(){this.oa.mn(eh._y,this.Jwi)},t}(),S6=0,E6=function(t){function n(i,r,e){var s;return(s=t.call(this)||this).oa=void 0,s._T=void 0,s.Zwi=void 0,s.$wi=void 0,s.syi=void 0,s.Q1t=void 0,s.A7t=void 0,s.iyi=void 0,s.tyi=void 0,s.LZt=void 0,s.eyi=void 0,s.oa=i,s._T=r,s.eyi=!1,s.$wi=n.createUniqueDisplayBaseId(),s.Q1t=n.nyi(i.xe,r,s.$wi),s.Zwi=new f.tv.freewheel.SDK.AdManager,s.syi=new w6(s.Q1t,s._T),s.tyi=new T6(s.oa,s.Tmi),s.au(s.Tmi),s.A7t=new g6(i,e,s.Tmi,s.Q1t),s}Ct(n,t);var i=n.prototype;return i.C6t=function(){return Vt(function(){var t,n,i,r;return zt(this,function(e){switch(e.label){case 0:if(!this.LZt)throw new y("Invalid state");t=this.Zwi,(n=t.newContext()).setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_VIDEO_DISPLAY_CONTROLS_WHEN_PAUSE,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL),n.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_CONTENT_VIDEO_ENABLED,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL),i=new b6(t,n,this.LZt,this.$wi),r=this.Tmi.Gmi(n,i.qwi()),this.tyi.aO(n),this.Emi.xwi(n),this.iyi=i,e.label=1;case 1:return e.trys.push([1,,3,4]),[4,r];case 2:return e.sent(),[3,4];case 3:return this.Emi.Pwi(),this.eyi=!0,[7];case 4:return[2]}})}).call(this)},i.F3t=function(t){this.Emi.Fwi(t.type)},i.be=function(){this.Q1t.style.display="block",this._T.style.display="block"},i.we=function(){this.Q1t.style.display="none",this._T.style.display="none"},i.K9t=function(t){this.LZt=t},i.hr=function(){this.eyi=!1,this.LZt=void 0,this.Tmi.hr(),this.tyi.hr(),this.iyi&&(this.iyi.hr(),this.iyi=void 0),this.Emi.hr(),this._T.src=""},i.kn=function(){this.hr(),this.A7t.kn(),this.tyi.kn(),this.Tmi.kn(),this.Q1t.remove(),$n(this.Q1t)},n.createUniqueDisplayBaseId=function(){return"theo-freewheel-"+ ++S6},n.nyi=function(t,n,i){var r=v.createElement("div");return r.id=i,r.className="theo-freewheel",n.classList.add("theo-freewheel-video"),r.appendChild(n),t.appendChild(r),r},Nt(n,[{key:"xmi",get:function(){return 0!==this.Tmi.iwi.length}},{key:"Mmi",get:function(){return 0!==this.Tmi.Ymi.length}},{key:"Emi",get:function(){return this.A7t}},{key:"Tmi",get:function(){return this.syi}},{key:"Dmi",get:function(){return this.eyi}},{key:"Rmi",get:function(){return this.tyi}}]),n}(DI);function I6(t){if(f.tv)switch(t){case"preroll":return tv.freewheel.SDK.ADUNIT_PREROLL;case"midroll":return tv.freewheel.SDK.ADUNIT_MIDROLL;case"postroll":return tv.freewheel.SDK.ADUNIT_POSTROLL;case"overlay":return tv.freewheel.SDK.ADUNIT_OVERLAY}}function R6(t,n,i){if(void 0!==n&&S(n)||n<0||n===1/0)return NaN;switch(t){case"preroll":return 0;case"postroll":return i}return KJ(n)}var C6=function(){function t(){}var n=t.prototype;return n.qz=function(t){return t.integration===mS.FREEWHEEL},n.x3t=function(t,n,i){if(Boolean(f.tv&&f.tv.freewheel&&f.tv.freewheel.SDK&&f.tv.freewheel.SDK.AdManager)){var r=new ix(t.Wu,t.Ql,i,1,[ig.Bk]);r.ust(t.xe);var e=r.Gq(ig.Bk),s=new E6(t,e.$W,t.Wu);return new f6(t,n,r,s,e)}},n.sj=function(t){var n=Ow(t);Hn(n.cuePoints)||(n.cuePoints=[]);for(var i,r=[],e=t.assetDuration||0,s=Lt(n.cuePoints);!(i=s()).done;){var u=i.value,o=R6(u.adUnit,u.timeOffset,e),h=I6(u.adUnit);!S(o)&&qn(h)?(u.adUnit=h,u.timeOffset=o,r.push(u)):Vn.um("Invalid adUnit/timeOffset combination. Cue was removed.")}return n.cuePoints=r,n},n.M6=function(t,n,i,r){i.K9t(t,n,r)},Nt(t,[{key:"P3t",get:function(){return UZ.H0t}}]),t}();yS.Ng.zz(new C6),F(),Et(),F(),Et(),F(),Et(),Dt(),F(),Et(),F(),Et();var D6,P6=self.theoplayerDeviceMetadata;function N6(t){return t.navigator&&t.navigator.userAgent||""}F(),Et(),F(),Et(),F(),Et(),F(),Et();var B6=((D6={})["Windows 10"]=/(Windows 10.0|Windows NT 10.0)/i,D6["Windows 8.1"]=/(Windows 8.1|Windows NT 6.3)/i,D6["Windows 8"]=/(Windows 8|Windows NT 6.2)/i,D6["Windows 7"]=/(Windows 7|Windows NT 6.1)/i,D6["Windows Vista"]=/Windows NT 6.0/i,D6["Windows Server 2003"]=/Windows NT 5.2/i,D6["Windows XP"]=/(Windows NT 5.1|Windows XP)/i,D6["Windows Phone"]=/Windows Phone/i,D6.Android=/Android/i,D6.Linux=/(Linux(?!.*Ubuntu)|X11)/,D6.Ubuntu=/Ubuntu/i,D6.iOS=/(iPhone|iPad|iPod)/i,D6["Mac OS X"]=/Mac OS X/i,D6["Mac OS"]=/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/i,D6["Chrome OS"]=/CrOS/i,D6);function x6(t,n){var i=B6[n];return!!i&&Boolean(N6(t).match(i))}function O6(t){return x6(t,"Android")}function M6(t){return x6(t,"Windows Phone")}function L6(t){return x6(t,"iOS")&&!M6(t)}function U6(t){return x6(t,"Ubuntu")}var F6,V6,H6=/Windows (NT|Phone) ([0-9.]+)/i,W6=/Mac.*?(OS |OS X )(\d+(([_.])\d+)?(([_.])\d+)?)/i,z6=((F6={})["Windows 10"]=H6,F6["Windows 8.1"]=H6,F6["Windows 8"]=H6,F6["Windows 7"]=H6,F6["Windows Vista"]=H6,F6["Windows Server 2003"]=H6,F6["Windows XP"]=H6,F6["Windows Phone"]=/Windows Phone ([0-9.]+)/i,F6.Android=/Android (\d+(([_.])\d+)?(([_.])\d+)?)/i,F6.Linux=void 0,F6.Ubuntu=void 0,F6.iOS=/(iPad|iPhone|iPod).*?(OS |os |OS_)(\d+(([_.])\d+)?(([_.])\d+)?)/i,F6["Mac OS X"]=W6,F6["Mac OS"]=W6,F6["Chrome OS"]=void 0,F6);function X6(t,n){var i=z6[n];return i?N6(t).match(i):null}function q6(t){return t.split(/[_.]/).map(function(t){return A(t,10)})}function G6(t){if(function(t){return Boolean(N6(t).match(/Windows/i))}(t)){if(function(t){return x6(t,"Windows 10")}(t))return"Windows 10";if(M6(t))return"Windows Phone";if(function(t){return x6(t,"Windows 8.1")}(t))return"Windows 8.1";if(function(t){return x6(t,"Windows 8")}(t))return"Windows 8";if(function(t){return x6(t,"Windows 7")}(t))return"Windows 7";if(function(t){return x6(t,"Windows Vista")}(t))return"Windows Vista";if(function(t){return x6(t,"Windows Server 2003")}(t))return"Windows Server 2003";if(function(t){return x6(t,"Windows XP")}(t))return"Windows XP"}else{if(O6(t))return"Android";if(L6(t))return"iOS";if(function(t){return x6(t,"Mac OS X")}(t))return"Mac OS X";if(function(t){return x6(t,"Mac OS")}(t))return"Mac OS";if(U6(t))return"Ubuntu";if(function(t){return x6(t,"Chrome OS")}(t))return"Chrome OS";if(function(t){return x6(t,"Linux")&&!U6(t)}(t))return"Linux"}}function j6(t,n){var i=function(t){var n=X6(t,"Windows 10");return n&&n.length>2?q6(n[2]):void 0}(t),r=function(t){var n=X6(t,"Mac OS X");return n&&n.length>2?q6(n[2]):void 0}(t),e=function(t){var n=X6(t,"Android");return n&&n.length>1?q6(n[1]):void 0}(t),s=function(t){var n=X6(t,"iOS");return n&&n.length>3?q6(n[3]):void 0}(t),u=function(t){var n=X6(t,"Chrome OS");return n&&n.length>0?q6(n[0]):void 0}(t);return i?i.length>n?i[n]:void 0:r?r.length>n?r[n]:void 0:e?e.length>n?e[n]:void 0:s?s.length>n?s[n]:void 0:u&&u.length>n?u[n]:void 0}function Q6(t){var n=function(t){return j6(t,0)}(t),i=function(t){return j6(t,1)}(t),r=function(t){return j6(t,2)}(t);if(void 0!==n)return void 0===i?""+n:void 0===r?n+"."+i:n+"."+i+"."+r}var Y6=((V6={}).Chrome=/Chrome/i,V6["Chrome Mobile"]=void 0,V6["Chrome iOS"]=/CriOS/i,V6.Chromium=/Chromium/i,V6.HeadlessChrome=/HeadlessChrome/i,V6.Firefox=/Firefox/i,V6.Seamonkey=/Seamonkey/i,V6["Firefox iOS"]=/FxiOS/i,V6.Safari=/Safari/i,V6.Edge=/Edge\/\d+/i,V6["Edge Chromium"]=/Edg\/\d+/i,V6.IE=/Trident/i,V6.Opera=/Opera|OPR/i,V6.Vivaldi=/Vivaldi/i,V6["Android Browser"]=void 0,V6);function K6(t,n){var i=Y6[n];return!!i&&Boolean(N6(t).match(i))}function J6(t){return Boolean(N6(t).match(/Mobi/i))}function Z6(t){return Boolean(t.chrome&&t.navigator&&t.navigator.vendor&&/google/i.test(t.navigator.vendor))||$6(t)}function $6(t){return K6(t,"Chrome iOS")}function t8(t){return K6(t,"Firefox")&&!i8(t)}function n8(t){return K6(t,"Firefox Mobile")&&!i8(t)&&J6(t)}function i8(t){return K6(t,"Seamonkey")}function r8(t){return K6(t,"Firefox iOS")&&!i8(t)}function e8(t){return K6(t,"Safari")&&!K6(t,"Chrome")&&!On.Wv}function s8(t){return Boolean(l8(t))}function u8(t){return K6(t,"Edge")}function o8(t){return K6(t,"Edge Chromium")}function h8(t){return K6(t,"IE")}function c8(t){return K6(t,"Vivaldi")}var a8,f8=/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i,v8=((a8={}).Chrome=f8,a8["Chrome Mobile"]=f8,a8["Chrome iOS"]=/CriOS\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i,a8.Chromium=f8,a8.HeadlessChrome=f8,a8.Firefox=/Firefox\/([0-9.]+)/i,a8["Firefox iOS"]=/FxiOS\/([0-9.]+)/i,a8.Safari=/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/,a8["Safari Mobile"]=void 0,a8.Edge=/Edge\/(\d+)/i,a8["Edge Chromium"]=/Edg\/(\d+)/i,a8["Edge Mobile"]=void 0,a8.IE=/(MSIE |Trident.*?rv:)(\d+)/i,a8.Opera=/(OPR\/(\d+\.\d+))|(Opera(?=.*Version\/((\d+)\.(\d+))))/i,a8["Opera Mobile"]=void 0,a8.Vivaldi=/Vivaldi\/((\d+)\.(\d+)\.(\d+)(?:\.(\d+))?)/i,a8["Android Browser"]=void 0,a8);function d8(t,n){var i=v8[n];return i?N6(t).match(i):null}function l8(t){return d8(t,"Opera")}function w8(t){var n=function(t){return d8(t,"Firefox")}(t);return n?T(n[1]):0}function g8(t){var n=function(t){return d8(t,"Firefox iOS")}(t);return n?T(n[1].split(".")[0]):0}function _8(t){var n=function(t){return d8(t,"Safari")}(t);return n?T(n[2].split(".")[0]):0}function m8(t){var n=function(t){return d8(t,"Edge")}(t);return n?T(n[1]):0}function y8(t){var n=function(t){return d8(t,"Edge Chromium")}(t);return n?T(n[1]):0}function p8(t){var n=function(t){return d8(t,"IE")}(t);return n?T(n[2]):0}function k8(t){var n=function(t){return d8(t,"Vivaldi")}(t);return n?T(n[1]):0}function b8(t){if(O6(t))return Z6(t)?"Chrome Mobile":t8(t)||n8(t)?"Firefox Mobile":u8(t)?"Edge Mobile":s8(t)?"Opera Mobile":"Android Browser";if(L6(t)){if(Z6(t)||$6(t))return"Chrome iOS";if(t8(t)||r8(t))return"Firefox iOS";if(u8(t))return"Edge Mobile";if(e8(t)||function(t){return e8(t)&&J6(t)}(t))return"Safari Mobile";if(s8(t))return"Opera Mobile"}return function(t){return K6(t,"Chromium")}(t)?"Chromium":function(t){return K6(t,"HeadlessChrome")}(t)?"HeadlessChrome":Z6(t)?"Chrome":t8(t)?"Firefox":e8(t)?"Safari":u8(t)?"Edge":o8(t)?"Edge Chromium":h8(t)?"IE":s8(t)?"Opera":c8(t)?"Vivaldi":void 0}function A8(t){return c8(t)?k8(t):$6(t)?Number(function(t){var n=v8["Chrome iOS"];return n&&n.exec(N6(t))||[]}(t)[1]):Z6(t)?Number(function(t){var n=v8.Chrome;return n&&n.exec(N6(t))||[]}(t)[1]):t8(t)||n8(t)?w8(t):r8(t)?g8(t):e8(t)?_8(t):u8(t)?m8(t):o8(t)?y8(t):h8(t)?p8(t):s8(t)?function(t){var n=l8(t);return n&&n[0].indexOf("Opera")>-1?T(n[5]):n?T(n[2].split(".")[0]):0}(t):void 0}var T8=function(t){return t.ryi="pc",t.hyi="console",t.oyi="settop",t.ayi="mobile",t.uyi="tablet",t.cyi="smarttv",t.dyi="searchbot",t}({});function S8(t){var n=N6(t);return n.match(/CrKey|Roku|AFTS|AppleTV|Nexus Player/i)?"settop":n.match(/Xbox|Playstation|Wii|Nintendo/i)?"console":/(iPad|Tablet|(Android(?!.*Mobi))|(Windows(?!.*Phone)(.*Touch))|Kindle|Playbook|Silk|(Puffin(?!.*(IP|AP|WP))))/i.test(n)?"tablet":/Mobi/.test(n)?"mobile":n.match(/GoogleTV|SmartTV|SMART-TV|Internet TV|NetCast|NETTV|boxee|Kylo|DLNADOC|hbbtv|CE-HTML/i)?"smarttv":n.match(/(nuhk|Googlebot|bingbot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/i)?"searchbot":function(t){return Boolean(b8(t))}(t)?"pc":void 0}var E8=function(){function t(t,n){var i=this;this.empClient=void 0,this.agama=void 0,this._yi=void 0,this.empClient=t,this.agama=n,this._yi=function(){var t=Vn.bP;switch(t){case"wifi":i.empClient.setDeviceMetadata(i.agama.DeviceMetadata.DATA_CONNECTION_TYPE,"wlan");break;case"ethernet":i.empClient.setDeviceMetadata(i.agama.DeviceMetadata.DATA_CONNECTION_TYPE,t);break;case"cellular":var n=function(t){switch(t){case"3g":return"mobile/3G";case"4g":return"mobile/4G";default:return}}(Vn.AP);n&&i.empClient.setDeviceMetadata(i.agama.DeviceMetadata.DATA_CONNECTION_TYPE,n)}}}var n=t.prototype;return n.ej=function(t){this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_ID,t.deviceID||function(){var t=Pd.Wy("deviceId");if(t)return t;var n=MS();return Pd.qy("deviceId",n),n}()),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.PLAYER,"THEOplayer"),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.PLAYER_VERSION,"10.0.0"),this.lyi(t),this.fyi(),this.vyi(t),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.EMPCLIENT_INTEGRATION_VERSION,"3.0"),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.EMPCLIENT_INTEGRATION_BUILDDATE,"2023-04-17 12:00:00"),t.application&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.APPLICATION,t.application),t.applicationVersion&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.APPLICATION_VERSION,t.applicationVersion),t.userAccountID&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.USER_ACCOUNT_ID,t.userAccountID);var n=t.connectionType;n?this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,n):(this._yi(),l.connection&&l.connection.addEventListener&&l.connection.addEventListener("change",this._yi))},n.lyi=function(t){this.gyi(t);var n=t.deviceManufacturer||P6&&P6.manufacturer;n&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_MANUFACTURER,n);var i=t.deviceModel||P6&&P6.model;i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_MODEL,i)},n.gyi=function(t){var n=t.deviceType||function(){var t=S8(self);switch(t){case T8.hyi:return"game-console";case T8.cyi:return"tv";case T8.oyi:return"media-streamer";default:return t}}();n&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_TYPE,n)},n.fyi=function(){var t=b8(self);t&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_BROWSER,t);var n=A8(self);void 0!==n&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_BROWSER_VERSION,n.toString())},n.vyi=function(t){var n=t.deviceOs||G6(self);n&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_OS,n);var i=t.deviceOsVersion||Q6(self);i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_OS_VERSION,i.toString())},n.kn=function(){l.connection&&l.connection.removeEventListener&&l.connection.removeEventListener("change",this._yi)},t}();var I8=function(t){function n(){var n;return(n=t.call(this)||this).wyi=void 0,n.OG=void 0,n.ko=!1,n.Ayi=!1,n.myi=void 0,n.yyi=void 0,n.wyi=f.Agama,n}Ct(n,t);var i=n.prototype;return i.qx=function(t){this.myi=t,this.wyi&&(this.OG=function(t,n){var i=function(t,n){switch(n){case"info":return t.LogLevel.INFO;case"debug":return t.LogLevel.DEBUG;case"warning":return t.LogLevel.WARNING;case"error":return t.LogLevel.ERROR;default:return t.LogLevel.FATAL}}(n,t.logLevel);n.setLogLevel(i);var r=new n.EMPClient(t.config);return function(t,n){return t.setExternalConfig(n.config),t}(r,t)}(t,this.wyi),this.OG&&(this.yyi=new E8(this.OG,this.wyi),this.ko=!0))},i.ij=function(){return this.wyi||console.warn("Please load the Agama Library (empclient.min.js) in order to use the integration"),Boolean(this.wyi)},i.$X=function(){return this.ko},i.DX=function(t,n){if(this.OG&&this.wyi)switch(t){case kS.eG:this.OG.setMeasurement(this.wyi.Measurement.BUFFER_LENGTH,n);break;case kS.sG:this.OG.setMeasurement(this.wyi.Measurement.BYTES_RECEIVED,n);break;case kS.rG:this.OG.setMeasurement(this.wyi.Measurement.SEGMENT_PROFILE_BITRATE,n);break;case kS.hG:this.OG.setMeasurement(this.wyi.Measurement.VIDEO_PROFILE_BITRATE,n);break;case kS.nG:this.OG.setMeasurement(this.wyi.Measurement.SEGMENT_READ_BITRATE,n);break;case kS.Jz:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_1XX,n);break;case kS.Zz:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_2XX,n);break;case kS.$z:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_3XX,n);break;case kS.tG:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_4XX,n);break;case kS.iG:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_5XX,n);break;case kS.aG:this.OG.setMeasurement(this.wyi.Measurement.PLAYBACK_POSITION,n);break;case kS.uG:this.OG.setMeasurement(this.wyi.Measurement.NUMBER_OF_FRAMES_DECODED,n);break;case kS.oG:this.OG.setMeasurement(this.wyi.Measurement.NUMBER_OF_FRAMES_DROPPED,n)}},i.fX=function(t,n){if(this.OG&&this.wyi)switch(t){case bS.vG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.ASSET_DURATION,n);break;case bS.fG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.MANIFEST_URI,n);break;case bS._G:this.OG.setSessionMetadata(this.wyi.SessionMetadata.NUMBER_OF_CONTENT_PROFILES,n);break;case bS.mG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.SERVICE_NAME,n);break;case bS.gG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.CDN,n);break;case bS.pG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.CONTENT_TITLE,n);break;case bS.wG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.CONTENT_TYPE,n);break;case bS.yG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.CONTENT_DESCRIPTION,n)}},i.ej=function(){this.yyi&&this.myi&&this.yyi.ej(this.myi)},i.tj=function(t,n){this.wyi&&this.OG&&(this.FX(),function(t,n,i,r){var e=LS(t,i,r);n.abrSession(e,t.ViewState.INITIAL_BUFFERING)}(this.wyi,this.OG,t,n),this.Ayi=!0)},i.kn=function(){this.yyi&&this.yyi.kn(),this.byi(AS.AG),this.OG=void 0},i.$G=function(t){this.Syi(t)},i.eX=function(t,n){this.OG&&this.OG.event(t.code,n)},i.FX=function(){this.OG&&this.Ayi&&(this.OG.exitSession(),this.Ayi=!1)},i.byi=function(t){if(this.OG&&this.wyi&&(this.FX(),t===AS.AG))this.OG.shutdown(this.wyi.ShutdownType.NORMAL_SHUTDOWN)},i.tX=function(t,n,i){this.Syi(t,n,i)},i.Syi=function(t,n,i){if(this.OG&&this.wyi)switch(t){case pS.TM:this.Tyi(this.wyi.ViewState.PLAYING,n,i);break;case pS.Qz:this.Tyi(this.wyi.ViewState.FAILED,n,i);break;case pS.Kz:this.Tyi(this.wyi.ViewState.INITIAL_BUFFERING,n,i);break;case pS.Gz:this.Tyi(this.wyi.ViewState.PAUSED,n,i);break;case pS.Xz:this.Tyi(this.wyi.ViewState.SEEK,n,i);break;case pS.jz:this.Tyi(this.wyi.ViewState.STALLED,n,i);break;case pS.Yz:this.Tyi(this.wyi.ViewState.NO_ACCESS,n,i)}},i.Tyi=function(t,n,i){if(this.OG)if(n){var r=function(t){return t||""}(i);this.OG.viewStateExtended(t,n.code,r)}else this.OG.viewStateChanged(t)},n}(ES);Vb(function(t){return function(n){return function(n){function i(i,r){var e;return(e=n.call(this,i,r)||this).OG=new t,e.pyi=void 0,e.pyi=new FS(e,e.OG,r),e}Ct(i,n);var r=i.prototype;return r.OP=function(t,i){this.pyi&&this.pyi.QG(),n.prototype.OP.call(this,t)},r.kn=function(){this.pyi&&this.pyi.kn(),n.prototype.kn.call(this)},i}(n)}}(I8),Ub.hnt),F(),Et(),F(),Et(),Dt(),F(),Et(),F(),Et(),Wt(),Bt(),Ut(),Qt(),F(),Et();var R8=function(t){return t.PLAY_ALL="play-all",t.PLAY_NONE="play-none",t.PLAY_LAST="play-last",t}({});F(),Et();var C8=function(t){return t.VOD="vod",t.LIVE="live",t}({}),D8=function(){function t(t,n,i,r,e,s,u){var o=this;this.oa=void 0,this.Cyi=void 0,this.Nyi=void 0,this.Pyi=void 0,this.kyi=void 0,this.Hyi=void 0,this.xyi=void 0,this.Byi=void 0,this.JW=void 0,this.ZW=void 0,this.m7=void 0,this.Myi=void 0,this.sAi=void 0,this.Iyi=void 0,this.Y1t=void 0,this.Lyi=void 0,this.uvi=void 0,this.qui=void 0,this.U_i=void 0,this.Pd=void 0,this.Fyi=void 0,this.wui=void 0,this.kui=void 0,this.Uyi=void 0,this.Vyi=void 0,this.eAi=void 0,this.oa=t,this.Cyi=n,this.Nyi=i,this.Pyi=r,this.kyi=e,this.Hyi=s,this.xyi=u,this.JW=void 0,this.ZW=void 0,this.m7=new hr,this.Myi=new hr,this.sAi=void 0,this.Iyi=!1,this.Y1t=void 0,this.Lyi=function(t){var n=t.currentSource;if(n&&n.integrationData){var i=n.integrationData,r=i.preplayResponse,e=i.source;o.kyi.nAi(r),r&&r.type===C8.VOD&&r.ads&&o.Pyi.qyi(r.ads),o.Cyi.rAi=n.integrationData,e.assetInfo&&kr(o.fetchAssetInfo(n))}},this.uvi=function(){o.Iyi=!0},this.qui=function(){o.Iyi&&o.zyi(o.oa.LP())},this.U_i=function(){o.Iyi&&(o.zyi(1/0),o.Iyi=!1)},this.Pd=function(){kr(o.Cyi.Tn())},this.Fyi=function(t){o.m7.Zg(),o.m7=new hr,kr(_r(o.gri(t.od.PO,o.m7.Yg),o.m7))},this.wui=function(){1!==o.oa.ux&&(o.sAi=o.oa.ux,o.oa.ux=1)},this.kui=function(){void 0!==o.sAi&&(o.oa.ux=o.sAi,o.sAi=void 0)},this.Uyi=function(t){t.od.wn("Oyi",o.Fyi),t.od.wn("Dnt",o.wui),t.od.wn("Cnt",o.kui)},this.Vyi=function(t){t.od.mn("Oyi",o.Fyi),t.od.mn("Dnt",o.wui),t.od.mn("Cnt",o.kui)},this.eAi=function(){o.oa.zx()},this.oa.wn(eh.xw,this.Lyi),this.oa.wn(eh.uo,this.uvi),this.oa.wn(eh._y,this.qui),this.oa.wn(eh.Bw,this.U_i),this.oa.wn(Ey.AM,this.Pd),this.Pyi.A0t.wn("xnt",this.Uyi),this.Pyi.A0t.wn("Pnt",this.Vyi)}var n=t.prototype;return n.Eyi=function(t){this.JW=hg(t),this.ZW=t,this.oa.So(new _b(t))},n.Ta=function(t){this.Pyi.resetSource(),this.xyi.Gy(),this.Iyi=!1,this.oa.Ryi(t)},n.Xnt=function(t,n){return Vt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:return this.Cyi.hr(),this.Iyi=!1,t&&function(t){return t.sources.some(function(t){return t.integration===MA.UPLYNK})}(t)?[3,2]:[4,this.oa.Dyi(t,n)];case 1:return[2,e.sent()];case 2:return e.trys.push([2,5,,6]),i=this,[4,this.Nyi.Cgi(t)];case 3:return i.Byi=e.sent(),[4,this.oa.Dyi(this.Byi,n)];case 4:return e.sent(),[3,6];case 5:return r=e.sent(),this.Eyi(new fd(cd.MANIFEST_LOAD_ERROR,r.message,r)),[3,6];case 6:return[2]}})}).call(this)},n.kn=function(){this.m7.Zg(),this.Myi.Zg(),this.oa.mn(eh.xw,this.Lyi),this.oa.mn(eh.uo,this.uvi),this.oa.mn(eh._y,this.qui),this.oa.mn(eh.Bw,this.U_i),this.oa.mn(Ey.AM,this.Pd);for(var t,n=Lt(this.Pyi.A0t.ec);!(t=n()).done;){var i=t.value;i.mn("Oyi",this.Fyi),i.mn("Dnt",this.wui),i.mn("Cnt",this.kui)}this.Pyi.A0t.mn("xnt",this.Uyi),this.Pyi.A0t.mn("Pnt",this.Vyi),this.Pyi.destroy(),this.Y1t&&(this.Y1t.zg(),this.Y1t=void 0),this.Iyi=!1},n.fetchAssetInfo=function(t){return Vt(function(){var n;return zt(this,function(i){switch(i.label){case 0:if(!t||!t.integrationData)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.Hyi.RSt(t.integrationData.source.prefix,t.integrationData.source.id,this.Myi.Yg,t.integrationData.preplayResponse.sid)];case 2:return n=i.sent(),this.kyi.Wyi(n),this.xyi.qyi(n,this.Pyi.A0t.ec),[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}})}).call(this)},n.zyi=function(t){this.Pyi.Gyi(t),this.Pyi.mnt.forEach(function(n){return n.Xyi(t)}),this.Pyi.jyi(this.oa.Tx()),this.K1t()},n.OP=function(t){this.Pyi.ynt||(this.m7.Zg(),this.m7=new hr,kr(_r(this.gri(t,this.m7.Yg),this.m7)))},n.gri=function(t,n){return Vt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:if(dr(n),t0});if(t){var n=t.iAi[0];this.Y1t||(this.Y1t=new GZ(this.oa.xe),this.Y1t.wn("clickstart",this.eAi)),this.Y1t.u1t=n}else this.Y1t&&(this.Y1t.zg(),this.Y1t=void 0)},Nt(t,[{key:"Ca",get:function(){return this.kyi.Ca}},{key:"lt",get:function(){return this.JW}},{key:"WP",get:function(){return this.ZW}}]),t}();F(),Et(),Wt(),Qt(),F(),Et();var P8=Mk({breaksIndex:Rk,adsIndex:Rk,startTime:Rk,endTime:Rk}),N8=Mk({index:Rk,timeOffset:Rk}),B8=Mk({duration:Rk,apiFramework:Hk(Ck,Bk),creative:Ck,mimeType:Ck,width:Rk,height:Rk,companions:zk(function(t){return new Gk(t)}(function(){return B8})),extensions:Hk(Pk,zk(Nk)),fw_parameters:Hk(Pk,qk(Ck)),events:qk(zk(Ck))}),x8=Mk({type:Fk(["linear","nonlinear"]),position:Fk(["preroll","midroll","postroll","pause","overlay",""]),timeOffset:Rk,duration:Rk,ads:zk(B8),events:qk(zk(Ck))}),O8=Mk({breaks:zk(x8),breakOffsets:Hk(Pk,zk(N8)),placeholderOffsets:Hk(Pk,zk(P8))}),M8=Mk({required:Hk(Pk,Dk),fairplayCertificateURL:Hk(Pk,Ck),widevineLicenseURL:Hk(Pk,Ck),playreadyLicenseURL:Hk(Pk,Ck)}),L8={type:Fk(Lk(C8)),playURL:Ck,prefix:Ck,sid:Ck,drm:Hk(Pk,M8)},U8=Mk(Yu({},L8,{type:Fk([C8.VOD]),ads:O8,interstitialURL:Hk(Ck,Bk,Pk)})),F8=Hk(U8,Mk(Yu({},L8,{type:Fk([C8.LIVE])})));F(),Et();var V8,H8=Ck,W8=Mk({userId:Ck,externalId:Hk(Ck,zk(Ck))}),z8=function(){function t(t){this.nV=void 0,this.nV=t}var n=t.prototype;return n.RSt=function(t){return Vt(function(){return zt(this,function(n){try{return[2,this.hAi(t)]}catch(t){throw t}return[2]})}).call(this)},n.hAi=function(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:return[4,q8(t)];case 1:return n=e.sent(),[4,this.nV.lk({Uk:wl.GET,Yu:n,dk:Md.DT})];case 2:return[4,e.sent().ck()];case 3:return i=e.sent(),r=Yu({},i,{type:t.assetType===qS.ASSET?C8.VOD:C8.LIVE}),F8.qH(r)||F8.GH(r,"PreplayResponse"),[2,r]}})}).call(this)},t}(),X8=((V8={})[qS.ASSET]="",V8[qS.CHANNEL]="channel/",V8[qS.EVENT]="event/",V8);function q8(t){return Vt(function(){var n,i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return n=t.prefix,i=X8[t.assetType],r=function(t){if(zk(H8).qH(t))return 1===t.length?t[0]:t.join(",")+"/multiple";if(H8.qH(t))return t;if(W8.qH(t)&&Hn(t.externalId))return 1===t.externalId.length?"ext/"+t.userId+"/"+t.externalId[0]:"ext/"+t.userId+"/"+t.externalId.join(",")+"/multiple";if(W8.qH(t))return"ext/"+t.userId+"/"+t.externalId;throw new p("Invalid asset id")}(t.id),[4,G8(t.contentProtected)];case 1:return e=o.sent(),s=function(t,n){var i=j8(t,n);return i?{"ad.cping":"1","ad.pingf":String(i)}:{}}(t.assetType,t.ping),u={},Hn(t.preplayParameters)?t.preplayParameters.forEach(function(t){u[t[0]]=t[1]}):u=t.preplayParameters,[2,Al(n+"/preplay/"+i+r+".json",Yu({v:"2"},u,e,s,u))]}})})()}function G8(t){return Vt(function(){var n,i,r;return zt(this,function(e){switch(e.label){case 0:return(n=t)?[4,Vn.wm()]:[3,2];case 1:n=e.sent(),e.label=2;case 2:return n?[2,{rmt:"fps",manifest:"m3u8"}]:[3,3];case 3:return(i=t)?[4,Vn.Am()]:[3,5];case 4:i=e.sent(),e.label=5;case 5:return i?[2,{rmt:"wv",manifest:"mpd"}]:[3,6];case 6:return(r=t)?[4,Vn.ym()]:[3,8];case 7:r=e.sent(),e.label=8;case 8:if(r)return[2,{rmt:"pr",manifest:"mpd"}];e.label=9;case 9:return[2,{}]}})})()}function j8(t,n){var i=t!==qS.ASSET;return(!i&&n.adImpressions?1:0)+(!i&&n.freeWheelVideoViews?2:0)+(i&&n.linearAdData?4:0)}F(),Et(),Wt(),Qt(),F(),Et();var Q8=Mk({ad_id:Ck,apiFramework:Hk(Bk,Ck),companions:zk(Nk),creative:Ck,duration:Rk,mimeType:Ck,height:Rk,width:Rk,extensions:Hk(Pk,zk(Nk)),fw_parameters:Hk(Pk,qk(Ck))}),Y8=Mk({breakId:Ck,ads:zk(Q8),type:Fk(["linear","nonlinear"]),position:Fk(["preroll","midroll","postroll","pause","overlay",""]),timeOffset:Rk,duration:Rk,height:Hk(Pk,Rk),width:Hk(Pk,Rk),events:qk(zk(Ck))}),K8=Mk({breaks:zk(Y8)}),J8=Mk({next_time:Rk,ads:Hk(Pk,K8),extensions:Hk(Pk,zk(Nk)),error:Hk(Pk,Ck),currentBreakEnd:Hk(Pk,Rk)}),Z8=function(t){return t.MSt="start",t.Xz="seek",t}({}),$8=function(){function t(t){this.nV=void 0,this.nV=t}var n=t.prototype;return n.RSt=function(t,n){return Vt(function(){return zt(this,function(i){try{return[2,this.hAi(t,n)]}catch(t){throw t}return[2]})}).call(this)},n.hAi=function(t,n){return Vt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:return i=function(t){var n={v:"3",pt:String(t.currentTime)};(function(t){return void 0!==t.seekTime})(t)&&t.hasFreeWheelVideoViews&&(n.ft=String(t.seekTime));t.event&&(n.ev=t.event);return Al(t.zonePrefix+"/session/ping/"+t.sessionId+".json",Yu({},n))}(t),[4,this.nV.lk({Uk:wl.GET,Yu:i,dk:Md.DT,Yg:n})];case 1:return[4,e.sent().ck()];case 2:return r=e.sent(),J8.qH(r)||J8.GH(r,"PingResponse"),[2,r]}})}).call(this)},t}();F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et(),Bt(),Dt();var t7=function(t){function n(n){var i;return(i=t.call(this,"oAi")||this).aE=void 0,i.aE=n,i}return Ct(n,t),n.prototype.xa=function(){return new n7(this.aE)},Nt(n,[{key:"oE",get:function(){return this.aE}}]),n}(kw),n7=function(t){function n(n){var i;return(i=t.call(this,"pingresponse")||this).response=void 0,i.response=n,i}return Ct(n,t),n}(rh);F(),Et(),Bt(),Dt();var i7=function(t){function n(n){var i;return(i=t.call(this,"aAi")||this).JW=void 0,i.JW=n,i}return Ct(n,t),n.prototype.xa=function(){return new r7(this.JW)},Nt(n,[{key:"lt",get:function(){return this.JW}}]),n}(kw),r7=function(t){function n(n){var i;return(i=t.call(this,"pingerror")||this).error=void 0,i.error=n,i}return Ct(n,t),n}(rh),e7=function(t){function n(n,i){var r,e;return r=t.call(this)||this,(e=r).pAi=void 0,e.oa=void 0,e.uAi=void 0,e.dAi=void 0,e.gAi=void 0,e.mAi=void 0,e.wAi=void 0,e.nT=void 0,e._Ai=void 0,e.fAi=void 0,e.vAi=void 0,e.pAi=n,e.oa=i,e.dAi=NaN,e.gAi=void 0,e.mAi=!1,e.wAi=NaN,e.nT=new hr,e._Ai=void 0,e.fAi=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return t=e.oa.LP(),e.wAi=t,e.mAi||Fn(e.gAi)||S(e.dAi)?[2]:e.dAi+e.gAi<=t?(e.mAi=!0,[4,e.lAi()]):[3,2];case 1:n.sent(),e.mAi=!1,n.label=2;case 2:return[2]}})})()},e.vAi=function(){if(e.oa.LP()!==e.dAi){e.mAi&&e.yAi(),e.wAi=e.oa.LP();var t=e.wAi-(e.dAi||0);S(t)?kr(e.lAi(Z8.Xz,0)):kr(e.lAi(Z8.Xz,t))}},r}Ct(n,t);var i=n.prototype;return i.Tn=function(){return Vt(function(){var t,n;return zt(this,function(i){switch(i.label){case 0:return(t=this.uAi)?(n=j8(t.source.assetType,t.source.ping),0!==n?(this.dAi=this.oa.Tx().start(0),[4,this.lAi(Z8.MSt)]):[2]):[2];case 1:return i.sent(),this.oa.wn("timeupdate",this.fAi),this.oa.wn("seeking",this.vAi),[2]}})}).call(this)},i.lAi=function(t,n){return Vt(function(){var i,r,e,s,u,o,h;return zt(this,function(c){switch(c.label){case 0:if(i=this.uAi.preplayResponse,r={},S(this.dAi))return[2];if(Un(this._Ai)&&Ei(this._Ai,this.oa.LP()-this.dAi))return[2];void 0!==n&&(r.seekTime=n),void 0!==t&&(r.event=t),e=this.oa.LP()-this.dAi,t===Z8.MSt?e=0:t!==Z8.Xz&&this.gAi&&(e=b.min(e,this.gAi)),this._Ai=e,c.label=1;case 1:return c.trys.push([1,3,4,5]),[4,this.pAi.RSt(Yu({zonePrefix:i.prefix,sessionId:i.sid,currentTime:e,hasFreeWheelVideoViews:null==(u=this.uAi)?void 0:u.source.ping.freeWheelVideoViews},r),this.nT.Yg)];case 2:return o=c.sent(),this.So(new t7(o)),this.gAi=-1!==o.next_time?o.next_time:void 0,s=o.error,[3,5];case 3:return vr(h=c.sent())||(s=h.message),[3,5];case 4:return s&&this.So(new i7(s)),[7];case 5:return[2]}})}).call(this)},i.hr=function(){this.gAi=void 0,this.uAi=void 0,this.dAi=NaN,this.mAi=!1,this.wAi=NaN,this._Ai=void 0,this.oa.mn("seeking",this.vAi),this.oa.mn("timeupdate",this.fAi),this.yAi()},i.yAi=function(){this.nT.Zg(),this.nT=new hr},i.kn=function(){this.hr()},Nt(n,[{key:"rAi",set:function(t){this.uAi=t}},{key:"cAi",get:function(){return this.dAi}}]),n}(th);F(),Et(),Wt(),Ut(),Qt();var s7=function(){function t(t,n){this.AAi=void 0,this.VJ=void 0,this.AAi=t,this.VJ=n}return t.prototype.Cgi=function(t){return Vt(function(){var n,i,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:n=[],i=Lt(t.sources),o.label=1;case 1:return(r=i()).done?[3,6]:GA(e=r.value)?[3,2]:(n.push(e),[3,5]);case 2:return o.trys.push([2,4,,5]),[4,this.AAi.RSt(e)];case 3:return s=o.sent(),u=function(t,n,i){var r,e=t.preplayResponse;t.source.contentProtected&&e.drm&&(r={integration:"uplynk"},e.drm.fairplayCertificateURL&&(r.fairplay={certificateURL:e.drm.fairplayCertificateURL}),e.drm.widevineLicenseURL&&(r.widevine={licenseAcquisitionURL:e.drm.widevineLicenseURL}),e.drm.playreadyLicenseURL&&(r.playready={licenseAcquisitionURL:e.drm.playreadyLicenseURL}));var s=vA({src:e.playURL,contentProtection:r,useNativePlayback:t.source.useNativePlayback,hls:t.source.hls,dash:t.source.dash,seamlessSwitchStrategy:t.source.seamlessSwitchStrategy},n,i);return s.integrationData=t,s}({source:e,preplayResponse:s},t,this.VJ),u.src&&(u.src=Al(u.src,e.playbackUrlParameters)),n.push(u),[3,5];case 4:return o.sent(),[3,5];case 5:return[3,1];case 6:if(0!==t.sources.length&&0===n.length)throw new y("Fatal: unable to play UplynkSources.");return[2,Yu({},t,{sources:n})]}})}).call(this)},t}();F(),Et(),Bt(),Ut(),F(),Et(),Bt(),Dt(),Ut(),F(),Et(),Dt();var u7=function(t){function n(n,i){var r;return(r=t.call(this,"Dnt")||this).od=void 0,r.XF=void 0,r.od=n,r.XF=i,r}return Ct(n,t),n.prototype.xa=function(){return new o7(this.od.Ca)},n}(kw),o7=function(t){function n(n){var i;return(i=t.call(this,"adbreakbegin")||this).adBreak=void 0,i.adBreak=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var h7=function(t){function n(n,i){var r;return(r=t.call(this,"Cnt")||this).od=void 0,r.XF=void 0,r.od=n,r.XF=i,r}return Ct(n,t),n.prototype.xa=function(){return new c7(this.od.Ca)},n}(kw),c7=function(t){function n(n){var i;return(i=t.call(this,"adbreakend")||this).adBreak=void 0,i.adBreak=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var a7=function(t){function n(n){var i;return(i=t.call(this,"Oyi")||this).od=void 0,i.od=n,i}return Ct(n,t),n.prototype.xa=function(){return new f7(this.od.Ca)},n}(kw),f7=function(t){function n(n){var i;return(i=t.call(this,"adbreakskip")||this).adBreak=void 0,i.adBreak=n,i}return Ct(n,t),n}(rh);F(),Et(),F(),Et(),Dt();var v7=function(t){function n(n){var i;return(i=t.call(this,"k4t")||this).od=void 0,i.od=n,i}return Ct(n,t),n.prototype.xa=function(){return new d7(this.od.Ca)},n}(kw),d7=function(t){function n(n){var i;return(i=t.call(this,"updateadbreak")||this).adBreak=void 0,i.adBreak=n,i}return Ct(n,t),n}(rh),l7=function(t){function n(n,i,r,e,s){var u;return(u=t.call(this)||this).OO=void 0,u.WA=void 0,u.qc=void 0,u.gpi=void 0,u.hu=void 0,u.ho=void 0,u.ZYt=void 0,u.TAi=void 0,u.OO=n,u.WA=i,u.qc=r,u.gpi=e,u.ho=!1,u.TAi=!1,u.ZYt=s,u}Ct(n,t);var i=n.prototype;return i.bAi=function(t){this.WA=t-this.EO;for(var n,i=Lt(this.Jc.ec);!(n=i()).done;){var r=n.value;r.EO>t&&this.Jc._S(r)}this.So(new v7(this))},i.Qut=function(t){return t>=this.EO&&(Fn(this.ct)||t<=this.EO+this.ct)},i.kAi=function(t){return-1!==this.JYt&&(!!Un(this.PO)&&t-this.EO>=this.JYt)},i.rD=function(){this.qc.ec.forEach(function(t){return t.rD()}),this.So(new a7(this))},i.EAi=function(t){var n=Un(this.PO)&&t>=this.PO,i=this.EO<=t&&!n&&!this.ro,r=this.ro&&this.PO&&t>=this.PO;i&&(this.ho=!0,this.So(new u7(this,this.EO))),this.qc.ec.forEach(function(n){return n.EAi(t)}),r&&(this.TAi=!0,this.ho=!1,this.So(new h7(this,this.PO)))},Nt(n,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var n,i={get startTime(){return t.EO},get endTime(){return t.PO},get duration(){return t.ct},get ads(){return t.Jc.Ca},get skipOffset(){return t.JYt},set skipOffset(n){t.JYt=n},addEventListener:function(t,i){n.wn(t,i)},removeEventListener:function(t,i){n.mn(t,i)}};return n=new cR(t,i),i}(this)),this.hu}},{key:"EO",get:function(){return this.OO}},{key:"PO",get:function(){return this.WA?this.OO+this.WA:void 0}},{key:"ct",get:function(){return this.WA}},{key:"Sat",get:function(){var t=this.PO;return Un(t)?new TA([this.EO,t]):TA.iL()}},{key:"Jc",get:function(){return this.qc}},{key:"SAi",get:function(){return this.TAi}},{key:"ro",get:function(){return this.ho}},{key:"JYt",get:function(){return this.gpi?-1:this.ZYt},set:function(t){this.gpi||(this.ZYt=t)}}]),n}(ih);F(),Et(),Bt(),Dt(),F(),Et(),Dt();var w7=function(t){function n(n,i){var r;return(r=t.call(this,"Bnt")||this).Int=void 0,r.XF=void 0,r.Int=n,r.XF=i,r}return Ct(n,t),n.prototype.xa=function(){return new g7(this.Int.Ca)},n}(kw),g7=function(t){function n(n){var i;return(i=t.call(this,"adbegin")||this).ad=void 0,i.ad=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var _7=function(t){function n(n,i){var r;return(r=t.call(this,"Nnt")||this).Int=void 0,r.XF=void 0,r.Int=n,r.XF=i,r}return Ct(n,t),n.prototype.xa=function(){return new m7(this.Int.Ca)},n}(kw),m7=function(t){function n(n){var i;return(i=t.call(this,"adend")||this).ad=void 0,i.ad=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt(),F(),Et(),Dt();var y7=function(t){function n(n){var i;return(i=t.call(this,"PAi")||this).Int=void 0,i.Int=n,i}return Ct(n,t),n.prototype.xa=function(){return new p7(this.Int.Ca)},n}(kw),p7=function(t){function n(n){var i;return(i=t.call(this,"removead")||this).ad=void 0,i.ad=n,i}return Ct(n,t),n}(rh),k7=function(t){function n(){return t.call(this)||this}Ct(n,t);var i=n.prototype;return i.bei=function(t){},i.Eei=function(t){this.So(new y7(t))},n}(c1);F(),Et(),Dt();var b7=function(t){function n(n){var i;return(i=t.call(this,"P4t")||this).Int=void 0,i.Int=n,i}return Ct(n,t),n.prototype.xa=function(){return new A7(this.Int.Ca)},n}(kw),A7=function(t){function n(n){var i;return(i=t.call(this,"adfirstquartile")||this).ad=void 0,i.ad=n,i}return Ct(n,t),n}(rh),T7=function(t){function n(n){var i;return(i=t.call(this,"x4t")||this).Int=void 0,i.Int=n,i}return Ct(n,t),n.prototype.xa=function(){return new S7(this.Int.Ca)},n}(kw),S7=function(t){function n(n){var i;return(i=t.call(this,"admidpoint")||this).ad=void 0,i.ad=n,i}return Ct(n,t),n}(rh),E7=function(t){function n(n){var i;return(i=t.call(this,"I4t")||this).Int=void 0,i.Int=n,i}return Ct(n,t),n.prototype.xa=function(){return new I7(this.Int.Ca)},n}(kw),I7=function(t){function n(n){var i;return(i=t.call(this,"adthirdquartile")||this).ad=void 0,i.ad=n,i}return Ct(n,t),n}(rh),R7=function(t){function n(n){var i;return(i=t.call(this,"xAi")||this).Int=void 0,i.Int=n,i}return Ct(n,t),n.prototype.xa=function(){return new C7(this.Int.Ca)},n}(kw),C7=function(t){function n(n){var i;return(i=t.call(this,"adcomplete")||this).ad=void 0,i.ad=n,i}return Ct(n,t),n}(rh);F(),Et();var D7=function(t){function n(n,i,r,e,s,u,o,h,c,a,f,v){var d;return void 0===c&&(c=[]),void 0===a&&(a={}),void 0===f&&(f={}),(d=t.call(this)||this).OO=void 0,d.WA=void 0,d.dYt=void 0,d.BAi=void 0,d.SQ=void 0,d.sb=void 0,d.hb=void 0,d.rJt=void 0,d.NAi=void 0,d.Zf=void 0,d.VYt=void 0,d.iYt=void 0,d.hu=void 0,d.ho=void 0,d.MAi=void 0,d.LAi=void 0,d.OAi=void 0,d.FAi=void 0,d.UAi=void 0,d.VAi=void 0,d.OO=n,d.WA=i,d.dYt=r,d.BAi=e,d.SQ=s,d.sb=u,d.hb=o,d.rJt=c,d.NAi=a,d.Zf=f,d.VYt=v,d.iYt=new k7,d.ho=!1,d.MAi=!1,d.LAi=!1,d.OAi=!1,d.FAi=!1,d.UAi=function(){return d.Xyi(d.OO)},d.VAi=function(){return d.Xyi(d.PO)},d.iYt.Sei(h),d.wn("Bnt",d.UAi),d.wn("Nnt",d.VAi),d}Ct(n,t);var i=n.prototype;return i.EAi=function(t){var n=this.EO<=t&&t=.25&&(this.MAi=!0,this.So(new b7(this))),!this.LAi&&n>=.5&&(this.LAi=!0,this.So(new T7(this))),!this.OAi&&n>=.75&&(this.OAi=!0,this.So(new E7(this))),!this.FAi&&n>=.9999&&(this.FAi=!0,this.So(new R7(this)))},i.rD=function(){this.MAi=!0,this.LAi=!0,this.OAi=!0,this.FAi=!0},i.kn=function(){this.mn("Bnt",this.UAi),this.mn("Nnt",this.VAi)},n.IAi=function(t,i){return new n(t,i.duration,i.apiFramework||"",i.creative,i.mimeType,i.width,i.height,i.companions.map(function(i){return n.IAi(t,i)}),i.extensions,i.fw_parameters,i.events,void 0)},n.RAi=function(t,i){return new n(t,i.duration,i.apiFramework||"",i.creative,i.mimeType,i.width,i.height,i.companions.map(function(i){return n.RAi(t,i)}),i.extensions,i.fw_parameters,void 0,i.ad_id)},Nt(n,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var n,i={get apiFramework(){return t.cYt},get companions(){return t.tYt.Ca},get creative(){return t.CAi},get duration(){return t.ct},get endTime(){return t.PO},get events(){return t.aQ},get extensions(){return t.nJt},get freeWheelParameters(){return t.DAi},get height(){return t.Mi},get mimeType(){return t.oQ},get startTime(){return t.EO},get width(){return t.Ti},addEventListener:function(t,i){n.wn(t,i)},removeEventListener:function(t,i){n.mn(t,i)}};return n=new cR(t,i),i}(this)),this.hu}},{key:"EO",get:function(){return this.OO}},{key:"PO",get:function(){return this.OO+this.WA}},{key:"ct",get:function(){return this.WA}},{key:"cYt",get:function(){return this.dYt}},{key:"CAi",get:function(){return this.BAi}},{key:"oQ",get:function(){return this.SQ}},{key:"Ti",get:function(){return this.sb}},{key:"Mi",get:function(){return this.hb}},{key:"aQ",get:function(){return this.Zf}},{key:"tYt",get:function(){return this.iYt}},{key:"nJt",get:function(){return this.rJt}},{key:"DAi",get:function(){return this.NAi}},{key:"ro",get:function(){return this.ho}},{key:"iAi",get:function(){var t;return null!=(t=this.Zf.clickthroughs)?t:[]}}]),n}(ih);F(),Et(),Dt(),F(),Et(),Dt();var P7=function(t){function n(n){var i;return(i=t.call(this,"xnt")||this).od=void 0,i.od=n,i}return Ct(n,t),n.prototype.xa=function(){return new N7(this.od.Ca)},n}(kw),N7=function(t){function n(n){var i;return(i=t.call(this,"addadbreak")||this).adBreak=void 0,i.adBreak=n,i}return Ct(n,t),n}(rh);F(),Et(),Dt();var B7=function(t){function n(n){var i;return(i=t.call(this,"Pnt")||this).od=void 0,i.od=n,i}return Ct(n,t),n.prototype.xa=function(){return new x7(this.od.Ca)},n}(kw),x7=function(t){function n(n){var i;return(i=t.call(this,"removeadbreak")||this).adBreak=void 0,i.adBreak=n,i}return Ct(n,t),n}(rh),O7=function(t){function n(){return t.call(this)||this}Ct(n,t);var i=n.prototype;return i.bei=function(t){this.So(new P7(t))},i.Eei=function(t){this.So(new B7(t))},n}(c1),M7=function(){function t(t,n,i,r){var e,s=this;this.oa=void 0,this.Cyi=void 0,this.X0t=void 0,this.qAi=void 0,this.WAi=void 0,this.hu=void 0,this.XAi=void 0,this.zAi=[],this.KAi=void 0,this.JAi=function(t){return s.KAi=t,s},this.QAi=function(t){t.oE.ads&&s.qyi(t.oE.ads),t.oE.currentBreakEnd&&s.GAi(t.oE.currentBreakEnd)},this.jAi=function(t){if(0!==s.zAi.length&&0!==s.oa.Tx().length)for(var n,i=s.oa.Tx().end(s.oa.Tx().length-1),r=Lt(s.zAi.slice());!(n=r()).done;){var e=n.value;Un(e.zKt.ct)?Xi(s.zAi,e):e.Zxte.PO&&this.X0t._S(e)}},n.qyi=function(t){for(var n,i=!function(t){return Un(t.breakOffsets)}(t),r=i?this.Cyi.cAi:0,e=Lt(t.breaks);!(n=e()).done;){var s=n.value;if(0!==s.ads.length){for(var u,o=s.timeOffset+r,h=new k7,c=0,a=Lt(s.ads);!(u=a()).done;){var f=u.value,v=i?D7.RAi(o,f):D7.IAi(o,f);h.lO(v),o+=v.ct,c+=v.ct}var d=s.timeOffset+r,l=i?void 0:s.duration,w=new l7(d,l,h,i,this.qAi);i&&this.zAi.push({zKt:w,Zxt:d+c}),this.X0t.lO(w)}}},n.GAi=function(t){var n=this.HAi;n&&n.bAi(t+this.Cyi.cAi)},n.Gyi=function(t){this.XAi=t,this.X0t.ec.forEach(function(n){return n.EAi(t)})},n.rD=function(){var t=this.XAi,n=this.ynt;t&&n&&n.kAi(t)&&n.rD()},n.skipAd=function(t){this.rD()},n.Yyi=function(t,n){for(var i,r=[],e=Lt(this.A0t.ec);!(i=e()).done;){var s=i.value;!s.SAi&&s.EO>=t&&s.EO1e4?[4,this.Fbi(t)]:[3,2];case 1:return i.sent(),this.qbi=Vn.Mg(),this.Wbi=0,[3,4];case 2:return[4,Ar(1e4-n,t)];case 3:i.sent(),i.label=4;case 4:return[3,0];case 5:return[2]}})}).call(this)},n.zbi=function(t){var n=t.SOt;if(n&&this.oa.CP&&0===this.Nbi&&!this.Gbi&&0!==b.floor(this.oa.Tx().start(0))){var i=(this.oa.CP.getTime()-n.getTime())/1e3,r=this.oa.LP()-t._Ot;this.Nbi=r-i}},n.Fbi=function(t){return Vt(function(){var n,i,r,e,s,u,o,h,c,a;return zt(this,function(f){switch(f.label){case 0:return f.trys.push([0,3,,4]),[4,this.oa.SP.lk({Yu:this.Xbi})];case 1:return[4,f.sent().FT(t)];case 2:if(0===(n=f.sent()).avails.length)return 0!==this.Obi.length&&(this.Obi=[]),[2];if(n.avails.length===this.Obi.length&&n.avails[0].startTimeInSeconds===this.Obi[0]._Ot)return this.zbi(this.Obi[0]),[2];for(i=[],r=Lt(n.avails);!(e=r()).done;){for(s=e.value,u=new c9(s.durationInSeconds,s.startTimeInSeconds,s.availProgramDateTime),o=Lt(s.ads);!(h=o()).done;)c=h.value,(a=new h9(u,B$.hZt,c.startTimeInSeconds,c.trackingEvents)).u4t(c.adId,c.width,c.height,c.durationInSeconds,[],c.skipoffset),u.e4t(a);i.push(u),this.zbi(u)}return this.Obi=mi(i,function(t,n){return t._Ot-n._Ot}),[3,4];case 3:throw lr(f.sent()),new y("Failed to poll MediaTailor tracking events");case 4:return[2]}})}).call(this)},n.jbi=function(){var t;null==(t=this.Ubi)||t.Zg(),this.Ubi=void 0,this.Lbi=void 0,this.qbi=-1/0},n.Qbi=function(){if(0!==this.Obi.length){var t=this.Obi[this.Obi.length-1],n=this.Bbi();if(t._Ot+t.p0tthis.NNt)){var o;if(this.Cbi===s)return;return this.Dbi=s,void(null==(o=this.oa.Jc)||o.So(new Vx(this.Dbi)))}}var h;if(this.Dbi)null==(h=this.oa.Jc)||h.So(new Ux(this.Dbi)),this.Dbi=void 0}}},n.Kbi=function(){var t=this,n=this.mnt;if(0!==n.length){for(var i,r=[],e=Lt(n);!(i=e()).done;){var s=i.value.NKt.filter(function(n){return ji(t.Ybi,n.eventType)});r=r.concat(s)}for(var u,o=Lt(r);!(u=o()).done;){var h=u.value;this.Jbi(h.startTimeInSeconds)&&(h.eventType===o9.COMPLETE&&this.Zbi(o9.ENGAGED_VIEW),this.$bi(h))}}},n.tSi=function(t,n){return n.NKt.filter(function(n){return Vo(n.eventType,t)})[0]},n.Zbi=function(t){var n=this.mnt;if(0!==n.length){var i=this.tSi(t,n[0]);i&&this.$bi(i)}},n.$bi=function(t){this.zgi(t.eventType);for(var n,i=Lt(t.beaconUrls);!(n=i()).done;){var r=n.value,e={Uk:wl.GET,Yu:r,zT:"",dk:Md.DT};0,kr(this.iSi(e))}},n.zgi=function(t){var n,i,r=this.mnt;switch(t){case o9.START:n=new Wx(r[r.length-1],this.oa.LP());break;case o9.COMPLETE:n=new Xx(r[0],this.oa.LP());break;case o9.FIRST_QUARTILE:n=new j$(r[0],this.oa.LP());break;case o9.MID_POINT:n=new Y$(r[0],this.oa.LP());break;case o9.THIRD_QUARTILE:n=new J$(r[0],this.oa.LP())}void 0!==n&&(null==(i=this.oa.Jc)||i.So(n))},n.iSi=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.oa.SP.lk(t)];case 1:return n.sent().hk,[2]}})}).call(this)},n.Jbi=function(t){var n=this.Bbi();return t>=this.NNt&&t=s.EO&&this.NNt<=s.EO+s.ct&&i.push(s)}return i}}]),t}();Vb(function(t){return function(t){function n(n,i){var r;return(r=t.call(this,n,i)||this).eSi=void 0,r.JW=void 0,r.ZW=void 0,r.nSi=void 0,r}Ct(n,t);var i=n.prototype;return i.Ta=function(n){return this.eSi&&(this.eSi.kn(),this.eSi=void 0,this.pEt()),t.prototype.Ta.call(this,n)},i.Xnt=function(n,i){var r=this,e=function(){return t.prototype.Xnt};return Vt(function(){var t,s;return zt(this,function(u){switch(u.label){case 0:if(!n||!function(t){return t.sources.some(function(t){return t.integration===MA.MEDIATAILOR})}(n))return[2,e().call(r,n,i)];u.label=1;case 1:return u.trys.push([1,4,,5]),[4,this.sSi(n,i)];case 2:return t=u.sent(),this.nSi=new t0(this),[4,e().call(r,t,i)];case 3:return u.sent(),[3,5];case 4:return s=u.sent(),this.qq(new fd(cd.MANIFEST_LOAD_ERROR,s.message,s)),[3,5];case 5:return[2]}})}).call(this)},i.vx=function(n){var i;(null==(i=this.nSi)?void 0:i.inAdBreak)||t.prototype.vx.call(this,n)},i.OP=function(n,i){var r;(null==(r=this.eSi)?void 0:r.Cbi)||t.prototype.OP.call(this,n,i)},i.HP=function(){var n;return null!=(n=this.JW)?n:t.prototype.HP.call(this)},i.qP=function(){var n;return null!=(n=this.ZW)?n:t.prototype.qP.call(this)},i.qq=function(t){this.JW=hg(t),this.ZW=t,this.So(new _b(t))},i.pEt=function(){this.JW=void 0,this.ZW=void 0},i.sSi=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c;return zt(this,function(a){switch(a.label){case 0:i=[],r=Lt(t.sources),a.label=1;case 1:return(e=r()).done?[3,4]:QA(s=e.value)&&(u=s).src?[4,this.rSi(u,n)]:(i.push(s),[3,3]);case 2:o=a.sent(),dr(n),h=Yu({},u,{integration:void 0,src:o}),i.push(h),a.label=3;case 3:return[3,1];case 4:return(c=Ow(t)).sources=i,[2,c]}})}).call(this)},i.rSi=function(t,n){return Vt(function(){var i,r,e,s,u,o,h,c,a,f;return zt(this,function(v){switch(v.label){case 0:if(i=this,r=t.src||"",!(e=r.match(/.+?(?=\/v1\/)/)))throw new y("Could not find MediaTailor session initialization url");return s=e[0],u=Lo(r,"?ads."),o=u?{Yu:r,dk:Md.DT}:{Yu:r,Uk:wl.POST,zT:JSON.stringify({adsParams:t.adsParams}),dk:Md.DT},[4,gT(function(){return i.hSi(o,n)},n)];case 1:h=v.sent();try{c=s+h.manifestUrl,u||(a=s+h.trackingUrl,f=function(t){return!!t&&/\bmpd\b/i.test(t)}(c),this.eSi=new a9(this,a,f))}catch(t){throw new y("Something went wrong parsing the MediaTailor session initialization response")}return[2,c]}})}).call(this)},i.hSi=function(t,n){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.SP.lk(t)];case 1:return[4,i.sent().FT(n)];case 2:return[2,i.sent()];case 3:throw lr(i.sent()),new y("Failed to initialize MediaTailor session manifest");case 4:return[2]}})}).call(this)},i.kn=function(){var n;this.eSi&&(this.eSi.kn(),this.eSi=void 0),this.pEt(),null==(n=this.nSi)||n.destroy(),this.nSi=void 0,t.prototype.kn.call(this)},n}(t)},Ub.hnt),F(),Et(),F(),Et(),Wt(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Wt(),Bt(),Dt(),Qt(),F(),Et();var f9=function(t){return t[t.oSi=0]="oSi",t[t.TM=1]="TM",t[t.Gz=2]="Gz",t[t.aSi=3]="aSi",t[t.uSi=4]="uSi",t[t.cSi=5]="cSi",t[t.ma=6]="ma",t}({});F(),Et(),Bt(),Dt();var v9=function(t){function n(n,i,r,e,s){var u;return void 0===s&&(s=!1),(u=t.call(this)||this).gO=mg(),u.dO=new vg,u.vu=void 0,u.pO=void 0,u.b5=void 0,u.hu=void 0,u.sMt=void 0,u.We=void 0,u.vu=n,u.pO=i,u.b5=r,u.We=s,u.sMt=e,u}return Ct(n,t),n.prototype.wO=function(t){this.We=t,t?this.sMt.dSi(this.vu):this.sMt.lSi(this.vu)},Nt(n,[{key:"XI",get:function(){}},{key:"Rt",get:function(){return this.We},set:function(t){this.wO(t)}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=Zw(this)}},{key:"o",get:function(){return String(this.vu.componentTag)||"hbbtvaudiotrack"}},{key:"Lt",get:function(){return this.b5}},{key:"Th",get:function(){return this.pO}},{key:"bs",get:function(){return""}},{key:"Xk",get:function(){return this.Rt?"enabled":"disabled"},set:function(t){this.wO("enabled"===t)}},{key:"KI",get:function(){return this.dO}},{key:"YI",get:function(){},set:function(t){}},{key:"jI",get:function(){return this.gO}}]),n}(th);F(),Et(),Wt(),Bt(),Dt(),Ut(),Qt(),F(),Et(),Wt(),Dt(),Ut(),Qt(),F(),Et();var d9=function(t){return t.qm="urn:dvb:casystemid:19219",t.zm="urn:dvb:casystemid:19156",t}({}),l9=function(t){return t.qm="application/vnd.ms-playready.initiator+xml",t.zm="application/widevine+xml",t}({});function w9(t,n,i){switch(t){case"urn:dvb:casystemid:19219":return function(t){return''+(null!=t?t:"")+""}(n);case"urn:dvb:casystemid:19156":if(!i)throw new y("Content URL is needed for Widevine license request");return function(t,n){return''+oJ(null!=n?n:"")+""+oJ(null!=t?t:"")+""}(n,i);default:throw new y("DRM key system is not supported")}}var g9=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).gSi=void 0,n.wSi=void 0,n.Tu=void 0,n.ASi=void 0,n.ySi=void 0,n.pSi=function(t,i,r){var e,s;if(0!==r){var u=n.bSi(r),o=n.SSi(r),h=new eg(u,o);null==(s=n.ySi)||null==(e=s.jy)||e.call(s,h)}else{var c,a;null==(a=n.ySi)||null==(c=a.Xy)||c.call(a,t)}},n.mSi=function(t,i,r,e){var s=n.TSi(t),u=n.kSi(t),o=new eg(s,u);n.So(new tN(o))},n}Ct(n,t);var i=n.prototype;return i.fSi=function(t){this.vSi(),this.Tu=t},i._Si=function(t){return Vt(function(){var n,i,r,e,s,u,o,h;return zt(this,function(c){switch(c.label){case 0:if(!t.aq.length)return this.vSi(),[2];if(!this.Tu)throw new y("The OIPF DRM agent has to be attached to the DOM");this.gSi||(this.gSi=v.createElement("object"),this.gSi.type="application/oipfDrmAgent",this.Tu.appendChild(this.gSi),this.gSi.onDRMMessageResult=this.pSi,this.gSi.onDRMRightsError=this.mSi,this.wSi=v.createElement("object"),this.wSi.type="application/oipfCapabilities",this.Tu.appendChild(this.wSi)),i=Lt(t.aq),c.label=1;case 1:if((r=i()).done)return[3,6];if(e=r.value,s=void 0,u=void 0,o=void 0,e.kS===Io)s=d9.qm,u=l9.qm,o=w9(d9.qm,e.NW);else{if(e.kS!==Ro)return[3,5];s=d9.zm,u=l9.zm,o=w9(d9.zm,e.NW,t.iR)}c.label=2;case 2:return c.trys.push([2,4,,5]),[4,this._et(u,o,s)];case 3:return c.sent(),this.So(new nN),[2];case 4:return h=c.sent(),n=h,[3,5];case 5:return[3,1];case 6:return n&&this.So(new tN(n)),[2]}})}).call(this)},i.zg=function(){return this.ySi=void 0,this.Tu=void 0,t.prototype.zg.call(this)},i._et=function(t,n,i){var r,e;return this.ySi=new Vc,this.ASi=null==(e=this.gSi)||null==(r=e.sendDRMMessage)?void 0:r.call(e,t,n,i),this.ASi||null==this.ySi.jy||this.ySi.jy.call(this.ySi,new eg(cd.CONTENT_PROTECTION_INTERNAL_ERROR,"No DRM message returned by OIPF DRM agent")),this.ySi.Qy},i.bSi=function(t){switch(t){case 5:return cd.CONTENT_PROTECTION_NOT_SUPPORTED;case 2:case 1:case 3:case 4:case 6:return cd.CONTENT_PROTECTION_INTERNAL_ERROR;default:return cd.CONTENT_PROTECTION_ERROR}},i.SSi=function(t){switch(t){case 2:return"The DRM agent was unable to complete the request";case 3:return"The specified MIME type is unknown for the specified DRM system";case 4:return"User consent is needed for that action";case 5:return"The specified DRM System is unknown";case 6:return"The license message has the wrong format";default:return"Unspecified error occurred"}},i.TSi=function(t){return 0===t?cd.CONTENT_PROTECTION_LICENSE_ERROR:1===t?cd.CONTENT_PROTECTION_LICENSE_INVALID:cd.CONTENT_PROTECTION_ERROR},i.kSi=function(t){switch(t){case 0:return"No license, consumption of the content is blocked";case 1:return"Invalid license, consumption of the content is blocked";case 2:return"Valid license, consumption of the content is unblocked";default:return"Unknown error occurred"}},i.vSi=function(){this.gSi&&($n(this.gSi),this.gSi=void 0),this.wSi&&($n(this.wSi),this.wSi=void 0)},i.b8=function(t,n,i){return Vt(function(){return zt(this,function(t){return[2]})})()},n}(cN);F(),Et(),Wt(),Bt(),Qt(),F(),Et();var _9=ut,m9=function(){function t(t,n,i){this.YS=void 0,this.TL=void 0,this.PZ=void 0,this.YS=t,this.TL=n,this.PZ=i}var n=t.prototype;return n.TZ=function(t){return!1},n.EZ=function(t){return _9.resolve(void 0)},n._Si=function(t){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.PZ._Si(this.YS)];case 1:return t.sent(),[2]}})}).call(this)},n.zg=function(){return _9.resolve(void 0)},Nt(t,[{key:"Sx",get:function(){return TA.tL(0,this.TL.ct)}},{key:"mx",get:function(){return jT.lz},set:function(t){}},{key:"Cd",get:function(){return this.YS}}]),t}(),y9=function(t){function n(n,i){var r;return(r=t.call(this)||this).sc=void 0,r.Dz=void 0,r.PZ=void 0,r.ha=void 0,r.ea=void 0,r.CSi=void 0,r.Gl=void 0,r.B7=void 0,r.N7=void 0,r.eet=void 0,r.net=void 0,r.iq=void 0,r.Sz=void 0,r.JW=void 0,r.EV=void 0,r.yz=void 0,r.xSi=void 0,r.RSi=void 0,r.sc=n,r.Dz=i,r.ha=new ZT,r.ea=new tS,r.Gl=new Qm,r.iq=void 0,r.Sz=!1,r.JW=void 0,r.EV=Cy.VL,r.yz=!0,r.xSi=void 0,r.RSi=function(){var t,n,i,e;(null==(t=r.CSi)?void 0:t.playState)&&((null==(n=r.xSi)?void 0:n.Qy)||2!==r.CSi.playState||r.PSi().catch(di),3===r.CSi.playState&&(null==(e=r.xSi)||null==(i=e.Xy)||i.call(e,String(r.CSi.playState)),r.xSi=void 0))},r.PZ=new g9(r),r.PZ.wn($P,r.Rs),r.B7=new Eb([r.Gl]),r.N7=new jP(r),r.eet=new IN,r.net=new WB(r.eet.xe,r.Wu,r.nt,r.Ql,r.Ma,r.mq),r.CSi=r.ISi(),r.PSi().catch(di),r}Ct(n,t);var i=n.prototype;return i.B9=function(t){this.PZ.fSi(t),this.eet.B9(t)},i.QZ=function(t){for(var n,i=Lt(t);!(n=i()).done;){var r=n.value;if(r.Km===Sy.mV)return r}},i.Un=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:if(this.iq)throw new y("Already loaded a media source");return t.Km!==Sy.mV?[3,2]:(this.iq=new m9(t,this,this.PZ),[4,this.iq._Si(t)]);case 1:return n.sent(),[2,this.iq];case 2:throw new y("Unsupported media source configuration for HbbTV");case 3:return[2]}})}).call(this)},i.ESi=function(t){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.PSi()];case 1:return t.sent(),[2]}})}).call(this)},i.Gx=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.PSi()];case 1:return t.sent(),[2]}})}).call(this)},i.KW=function(t){},i.hr=function(){return Vt(function(){return zt(this,function(t){return this.iq=void 0,this.xSi=void 0,[2]})}).call(this)},i.C8=function(){return Vt(function(){return zt(this,function(t){throw new p("Not supported")})})()},i.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.hr()];case 1:return t.sent(),this.Gl.kn(),this.B7.kn(),this.eet.kn(),this.net.kn(),this.PZ.mn($P,this.Rs),[4,this.PZ.zg()];case 2:return t.sent(),[2]}})}).call(this)},i.be=function(){this.yz=!0,this.eet.be()},i.we=function(){this.yz=!1,this.eet.we()},i.vq=function(){return!1},i.gq=function(t,n,i,r,e){throw new y("Adding native sideloaded text tracks is not supported on HbbTV")},i.x9=function(){},i.I9=function(){},i.D9=function(){},i.ZP=function(){return{iO:0,eO:0,sO:0}},i.Yx=function(){},i.wq=function(t){throw new y("Adding custom text tracks is not supported on HbbTV")},i.Wx=function(){},i.tI=function(t,n,i,r,e,s,u,o,h){var c=new GD(t,n,i,r,e,s,u,h,o);return this.Gl.tt(c),this.N7.tt(c),c},i.Aq=function(){for(var t,n=Lt(this.Gl.II.slice());!(t=n()).done;){t.value.kn()}this.Gl.hr()},i.iV=function(t){this.Gl.it(t),this.N7.it(t)},i.ISi=function(){for(var t=v.getElementsByTagName("object"),n=0;n=0?i:n.length};return mi(t,function(t,n){return i(t)-i(n)})},Nt(n,[{key:"ht",get:function(){return this.TL.ht}},{key:"IP",get:function(){return this.TL.IP._s()}},{key:"BL",get:function(){}},{key:"CP",get:function(){return this.TL.CP},set:function(t){t&&this.TL.KW(t)}},{key:"bt",get:function(){return this.Ac}},{key:"MP",get:function(){return this.TL.MP},set:function(t){this.TL.My(t)}},{key:"hq",get:function(){return this.oq}},{key:"ct",get:function(){return this.TL.ct}},{key:"UP",get:function(){return this.TL.UP}},{key:"WP",get:function(){return this.ZW}},{key:"lt",get:function(){return this.JW}},{key:"zP",get:function(){}},{key:"jP",get:function(){}},{key:"KP",get:function(){return!1}},{key:"Vx",get:function(){return this.TL.Vx},set:function(t){this.TL.Vx=t}},{key:"Fx",get:function(){return this.Cz}},{key:"JP",get:function(){return Yu({},{iO:0,eO:0,sO:0,nO:0,rO:0,hO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.TL.ZP())}},{key:"$P",get:function(){return this.TL.$P},set:function(t){this.TL.$P=t}},{key:"sx",get:function(){return!0}},{key:"hx",get:function(){return this.TL.hx}},{key:"ux",get:function(){return this.TL.ux},set:function(t){this.TL.ux=t}},{key:"_x",get:function(){return this.TL._x._s()}},{key:"mx",get:function(){return this.tq},set:function(t){this.tq=t,this.iq&&(this.iq.mx=t)}},{key:"Ax",get:function(){return this.TL.Ax}},{key:"Sx",get:function(){return this.TL.Sx._s()}},{key:"kx",get:function(){return this.TL.kx}},{key:"nq",get:function(){return this.TL.nq}},{key:"nt",get:function(){return this.Gl}},{key:"Rx",get:function(){return this.TL.Rx}},{key:"rt",get:function(){return this.TL.rt}},{key:"Bx",get:function(){return this.TL.Bx}},{key:"Mx",get:function(){return this.TL.Mx},set:function(t){this.TL.Mx=t}}]),n}(th),T9=function(){function t(){this.Kq=kb.vW}var n=t.prototype;return n.PR=function(t,n,i,r,e,s,u,o){return new A9(t,i,s,u)},n.Xq=function(t,n){var i;return!(!On.k_||t.type!==hA.fR&&!zA(t.type)&&!XA(t.type))&&!(Cr()&&!(null==(i=t.contentProtection)?void 0:i.useOipfDrmAgent)&&(!t.contentProtection||Ko()))},n.jq=function(t){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,Dp(t,!0)];case 1:return n.sent()?[2,!0]:[2,!1]}})})()},n.Qq=function(){return!1},t}();return XT(new T9),F(),Et(),a.exports}); +!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(t):"function"==typeof define&&define.amd?define([],function(){return i(t)}):t.THEOplayer=i(t)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this,function(t){"use strict";var i,n,r,e,s,u,o,h,a,c={exports:{}},f=(c.exports,t.window),v=t.document,d=t.location,l=t.navigator,w=t.setTimeout,g=t.clearTimeout,_=t.setInterval,m=t.clearInterval,y=t.Error,p=t.TypeError,k=(t.SyntaxError,t.Object),b=t.Math,A=t.parseInt,T=t.parseFloat,S=t.isNaN,E=t.Uint8Array,I=t.Worker,R=(t.WorkerGlobalScope,t.XMLHttpRequest),C=k.create,P=k.defineProperty,D=k.getOwnPropertyDescriptor,N=k.getOwnPropertyNames,x=k.getPrototypeOf,B=k.prototype.hasOwnProperty,O=function(t,i){return function(){return t&&(i=t(t=0)),i}},M=function(t,i){return function(){return i||t((i={exports:{}}).exports,i),i.exports}},L=function(t,i,n,r){if(i&&"object"==typeof i||"function"==typeof i)for(var e,s=N(i),u=0,o=s.length;u0;)i.shift()();n=!1}}).EQ,wt.nki=at.W6,wt.rki=function(t){try{var i=rt(t);if(!self.dispatchEvent(i)||i.defaultPrevented)return}catch(t){}w(function(){throw new y("Unhandled promise rejection: ".concat(t))},0)})}),Et=O(function(){St()});function It(t,i){return(It=k.setPrototypeOf||function(t,i){return t.__proto__=i,t})(t,i)}var Rt=O(function(){U(),Et()});function Ct(t,i){if("function"!=typeof i&&null!==i)throw new p("Super expression must either be null or a function");t.prototype=k.create(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),i&&It(t,i)}var Pt=O(function(){U(),Et(),Rt()});function Dt(t,i){for(var n=0;nt.length)&&(i=t.length);for(var n=0,r=new Array(i);n=t.length?{done:!0}:{done:!1,value:t[s++]}}}throw new p("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Ft=O(function(){U(),Et(),Mt()});function Ut(t,i,n,r,e,s,u){try{var o=t[s](u),h=o.value}catch(t){return void n(t)}o.done?i(h):ut.resolve(h).then(r,e)}function Vt(t){return function(){var i=this,n=arguments;return new ut(function(r,e){var s=t.apply(i,n);function u(t){Ut(s,r,e,u,o,"next",t)}function o(t){Ut(s,r,e,u,o,"throw",t)}u(void 0)})}}var Ht,Wt=O(function(){U(),Et()});function zt(t,n){var e,s,u,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},h=k.create(("function"==typeof Iterator?Iterator:k).prototype);return h.next=a(0),h.throw=a(1),h.return=a(2),"function"==typeof i&&(h[r]=function(){return this}),h;function a(i){return function(r){return function(i){if(e)throw new p("Generator is already executing.");for(;h&&(h=0,i[0]&&(o=0)),o;)try{if(e=1,s&&(u=2&i[0]?s.return:i[0]?s.throw||((u=s.return)&&u.call(s),0):s.next)&&!(u=u.call(s,i[1])).done)return u;switch(s=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,s=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(u=o.trys,(u=u.length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new p(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function qt(t,i,n){if(null!=i){if("object"!=typeof i&&"function"!=typeof i)throw new p("Object expected.");var r,u;if(n){if(!s)throw new p("Symbol.asyncDispose is not defined.");r=i[s]}if(void 0===r){if(!e)throw new p("Symbol.dispose is not defined.");r=i[e],n&&(u=r)}if("function"!=typeof r)throw new p("Object not disposable.");u&&(r=function(){try{u.call(this)}catch(t){return ut.reject(t)}}),t.stack.push({value:i,dispose:r,async:n})}else n&&t.stack.push({async:!0});return i}function Gt(t){function i(i){t.error=t.hasError?new Ht(i,t.error,"An error was suppressed during disposal."):i,t.hasError=!0}var n,r=0;return function e(){for(;n=t.stack.pop();)try{if(!n.async&&1===r)return r=0,t.stack.push(n),ut.resolve().then(e);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return r|=2,ut.resolve(s).then(e,function(t){return i(t),e()})}else r|=1}catch(t){i(t)}if(1===r)return t.hasError?ut.reject(t.error):ut.resolve();if(t.hasError)throw t.error}()}var jt=O(function(){U(),Et(),Ht="function"==typeof SuppressedError?SuppressedError:function(t,i,n){var r=new y(n);return r.name="SuppressedError",r.error=t,r.suppressed=i,r}}),Qt=O(function(){U(),Et(),jt()}),Yt=M(function(t,n){var e,s;U(),Et(),ct(),e=t,s=function(t){var n="function"==typeof i&&"symbol"===W(r)?i:function(t){return"Symbol("+t+")"};function e(){}var s=Number.isNaN||function(t){return t!=t},u=e;function o(t){return"object"===(void 0===t?"undefined":W(t))&&null!==t||"function"==typeof t}function h(t){return t.slice()}function a(t,i,n,r,e){new E(t).set(new E(n,r,e),i)}function c(t){return!1!==function(t){return"number"==typeof t&&(!s(t)&&!(t<0))}(t)&&t!==1/0}function f(t,i,n){if("function"!=typeof t)throw new p("Argument is not a function");return Function.prototype.apply.call(t,i,n)}function v(t,i,n,r){var e=t[i];if(void 0!==e){if("function"!=typeof e)throw new p(e+" is not a method");switch(n){case 0:return function(){return l(e,t,r)};case 1:return function(i){var n=[i].concat(r);return l(e,t,n)}}}return function(){return I(void 0)}}function d(t,i,n){var r=t[i];if(void 0!==r)return f(r,t,n)}function l(t,i,n){try{return I(f(t,i,n))}catch(t){return R(t)}}function w(t){if(t=Number(t),s(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function g(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new p("size property of a queuing strategy must be a function");return function(i){return t(i)}}var _=ut,m=ut.prototype.then,A=ut.resolve.bind(_),T=ut.reject.bind(_);function S(t){return new _(t)}function I(t){return A(t)}function R(t){return T(t)}function C(t,i,n){return m.call(t,i,n)}function P(t,i,n){C(C(t,i,n),void 0,u)}function D(t,i){P(t,i)}function N(t,i){P(t,void 0,i)}function x(t,i,n){return C(t,i,n)}function B(t){C(t,void 0,u)}var O=function(){function t(){this.Rd=0,this.Dd=0,this.Ld={Od:[],Fd:void 0},this.Ud=this.Ld,this.Rd=0,this.Dd=0}return k.defineProperty(t.prototype,"length",{get:function(){return this.Dd},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var i=this.Ud,n=i;16383===i.Od.length&&(n={Od:[],Fd:void 0}),i.Od.push(t),n!==i&&(this.Ud=n,i.Fd=n),++this.Dd},t.prototype.shift=function(){var t=this.Ld,i=t,n=this.Rd,r=n+1,e=t.Od,s=e[n];return 16384===r&&(i=t.Fd,r=0),--this.Dd,this.Rd=r,t!==i&&(this.Ld=i),e[n]=void 0,s},t.prototype.forEach=function(t){for(var i=this.Rd,n=this.Ld,r=n.Od;!(i===r.length&&void 0===n.Fd||i===r.length&&(i=0,0===(r=(n=n.Fd).Od).length));)t(r[i]),++i},t.prototype.peek=function(){var t=this.Ld,i=this.Rd;return t.Od[i]},t}();function M(t,i,n){var r=null;!0===n&&(r=k.prototype);var e=k.create(r);return e.value=t,e.done=i,e}function L(t,i){t.Vd=!0,t.Hd=i,i.Wd=t,"readable"===i.Ra?H(t):"closed"===i.Ra?function(t){H(t),q(t)}(t):z(t,i.qd)}function F(t,i){return Ki(t.Hd,i)}function U(t){"readable"===t.Hd.Ra?X(t,new p("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,i){z(t,i)}(t,new p("Reader was released and can no longer be used to monitor the stream's closedness")),t.Hd.Wd=void 0,t.Hd=void 0}function V(t){return new p("Cannot "+t+" a stream using a released reader")}function H(t){t.zd=S(function(i,n){t.Gd=i,t.Xd=n})}function z(t,i){H(t),X(t,i)}function X(t,i){B(t.zd),t.Xd(i),t.Gd=void 0,t.Xd=void 0}function q(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0}var G=n("[[CancelSteps]]"),j=n("[[PullSteps]]");function Q(t,i){void 0===i&&(i=!1);var n=new it(t);return n.Vd=i,n}function Y(t){return S(function(i,n){var r={Qd:i,Kd:n};t.Wd.Yd.push(r)})}function K(t,i,n){var r=t.Wd;r.Yd.shift().Qd(M(i,n,r.Vd))}function J(t){return t.Wd.Yd.length}function Z(t){var i=t.Wd;return void 0!==i&&!!nt(i)}var $,tt,it=function(){function t(t){if(!1===Qi(t))throw new p("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Yi(t))throw new p("This stream has already been locked for exclusive reading by another reader");L(this,t),this.Yd=new O}return k.defineProperty(t.prototype,"closed",{get:function(){return nt(this)?this.zd:R(et("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return nt(this)?void 0===this.Hd?R(V("cancel")):F(this,t):R(et("cancel"))},t.prototype.read=function(){return nt(this)?void 0===this.Hd?R(V("read from")):rt(this):R(et("read"))},t.prototype.releaseLock=function(){if(!nt(this))throw et("releaseLock");if(void 0!==this.Hd){if(this.Yd.length>0)throw new p("Tried to release a reader lock when that reader has pending read() calls un-settled");U(this)}},t}();function nt(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Yd")}function rt(t){var i=t.Hd;return i.Jd=!0,"closed"===i.Ra?I(M(void 0,!0,t.Vd)):"errored"===i.Ra?R(i.qd):i.Zd[j]()}function et(t){return new p("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"===W(n.asyncIterator)&&(($={})[n.asyncIterator]=function(){return this},tt=$,k.defineProperty(tt,n.asyncIterator,{enumerable:!1}));var st={next:function(){if(!1===ot(this))return R(ht("next"));var t=this.$d;return void 0===t.Hd?R(V("iterate")):x(rt(t),function(i){var n=i.done;return n&&U(t),M(i.value,n,!0)})},return:function(t){if(!1===ot(this))return R(ht("next"));var i=this.$d;if(void 0===i.Hd)return R(V("finish iterating"));if(i.Yd.length>0)return R(new p("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.ul){var n=F(i,t);return U(i),x(n,function(){return M(t,!0,!0)})}return U(i),I(M(t,!0,!0))}};function ot(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"$d")}function ht(t){return new p("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function at(t){var i=t.tf.shift();return t.if-=i.size,t.if<0&&(t.if=0),i.value}function ct(t,i,n){if(!c(n=Number(n)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.tf.push({value:i,size:n}),t.if+=n}function ft(t){t.tf=new O,t.if=0}void 0!==tt&&k.setPrototypeOf(st,tt),k.defineProperty(st,"next",{enumerable:!1}),k.defineProperty(st,"return",{enumerable:!1});var vt=n("[[AbortSteps]]"),dt=n("[[ErrorSteps]]"),lt=function(){function t(t,i){void 0===t&&(t={}),void 0===i&&(i={}),gt(this);var n=i.size,r=i.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var e=g(n);void 0===r&&(r=1),function(t,i,n,r){var e=k.create(Bt.prototype);function s(){return d(i,"start",[e])}var u=v(i,"write",1,[e]),o=v(i,"close",0,[]),h=v(i,"abort",1,[]);Ot(t,e,s,u,o,h,n,r)}(this,t,r=w(r),e)}return k.defineProperty(t.prototype,"locked",{get:function(){if(!1===_t(this))throw Wt("locked");return mt(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===_t(this)?R(Wt("abort")):!0===mt(this)?R(new p("Cannot abort a stream that already has a writer")):yt(this,t)},t.prototype.close=function(){return!1===_t(this)?R(Wt("close")):!0===mt(this)?R(new p("Cannot close a stream that already has a writer")):!0===Tt(this)?R(new p("Cannot close an already-closing stream")):pt(this)},t.prototype.getWriter=function(){if(!1===_t(this))throw Wt("getWriter");return wt(this)},t}();function wt(t){return new It(t)}function gt(t){t.Ra="writable",t.qd=void 0,t.ef=void 0,t.nf=void 0,t.rf=new O,t.hf=void 0,t.uf=void 0,t.cf=void 0,t.df=void 0,t.lf=!1}function _t(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"nf")}function mt(t){return void 0!==t.ef}function yt(t,i){var n=t.Ra;if("closed"===n||"errored"===n)return I(void 0);if(void 0!==t.df)return t.df.vf;var r=!1;"erroring"===n&&(r=!0,i=void 0);var e=S(function(n,e){t.df={vf:void 0,Qd:n,Kd:e,_f:i,gf:r}});return t.df.vf=e,!1===r&&bt(t,i),e}function pt(t){var i=t.Ra;if("closed"===i||"errored"===i)return R(new p("The stream (in "+i+" state) is not in the writable state and cannot be closed"));var n=S(function(i,n){var r={Qd:i,Kd:n};t.uf=r}),r=t.ef;return void 0!==r&&!0===t.lf&&"writable"===i&&$t(r),function(t){ct(t,"close",0),Ft(t)}(t.nf),n}function kt(t,i){"writable"!==t.Ra?At(t):bt(t,i)}function bt(t,i){var n=t.nf;t.Ra="erroring",t.qd=i;var r=t.ef;void 0!==r&&Dt(r,i),!1===function(t){return void 0!==t.hf||void 0!==t.cf}(t)&&!0===n.pf&&At(t)}function At(t){t.Ra="errored",t.nf[dt]();var i=t.qd;if(t.rf.forEach(function(t){t.Kd(i)}),t.rf=new O,void 0!==t.df){var n=t.df;if(t.df=void 0,!0===n.gf)return n.Kd(i),void St(t);P(t.nf[vt](n._f),function(){n.Qd(),St(t)},function(i){n.Kd(i),St(t)})}else St(t)}function Tt(t){return void 0!==t.uf||void 0!==t.cf}function St(t){void 0!==t.uf&&(t.uf.Kd(t.qd),t.uf=void 0);var i=t.ef;void 0!==i&&jt(i,t.qd)}function Et(t,i){var n=t.ef;void 0!==n&&i!==t.lf&&(!0===i?function(t){Yt(t)}(n):$t(n)),t.lf=i}var It=function(){function t(t){if(!1===_t(t))throw new p("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===mt(t))throw new p("This stream has already been locked for exclusive writing by another writer");this.mf=t,t.ef=this;var i=t.Ra;if("writable"===i)!1===Tt(t)&&!0===t.lf?Yt(this):Jt(this),qt(this);else if("erroring"===i)Kt(this,t.qd),qt(this);else if("closed"===i)Jt(this),function(t){qt(t),Qt(t)}(this);else{var n=t.qd;Kt(this,n),Gt(this,n)}}return k.defineProperty(t.prototype,"closed",{get:function(){return!1===Rt(this)?R(zt("closed")):this.zd},enumerable:!0,configurable:!0}),k.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Rt(this))throw zt("desiredSize");if(void 0===this.mf)throw Xt("desiredSize");return function(t){var i=t.mf,n=i.Ra;return"errored"===n||"erroring"===n?null:"closed"===n?0:Lt(i.nf)}(this)},enumerable:!0,configurable:!0}),k.defineProperty(t.prototype,"ready",{get:function(){return!1===Rt(this)?R(zt("ready")):this.wf},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Rt(this)?R(zt("abort")):void 0===this.mf?R(Xt("abort")):function(t,i){var n=t.mf;return yt(n,i)}(this,t)},t.prototype.close=function(){if(!1===Rt(this))return R(zt("close"));var t=this.mf;return void 0===t?R(Xt("close")):!0===Tt(t)?R(new p("Cannot close an already-closing stream")):Ct(this)},t.prototype.releaseLock=function(){if(!1===Rt(this))throw zt("releaseLock");void 0!==this.mf&&Nt(this)},t.prototype.write=function(t){return!1===Rt(this)?R(zt("write")):void 0===this.mf?R(Xt("write to")):xt(this,t)},t}();function Rt(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"mf")}function Ct(t){return pt(t.mf)}function Pt(t,i){"pending"===t.yf?jt(t,i):function(t,i){Gt(t,i)}(t,i)}function Dt(t,i){"pending"===t.bf?Zt(t,i):function(t,i){Kt(t,i)}(t,i)}function Nt(t){var i=t.mf,n=new p("Writer was released and can no longer be used to monitor the stream's closedness");Dt(t,n),Pt(t,n),i.ef=void 0,t.mf=void 0}function xt(t,i){var n=t.mf,r=n.nf,e=function(t,i){try{return t.Af(i)}catch(i){return Ut(t,i),1}}(r,i);if(n!==t.mf)return R(Xt("write to"));var s=n.Ra;if("errored"===s)return R(n.qd);if(!0===Tt(n)||"closed"===s)return R(new p("The stream is closing or closed and cannot be written to"));if("erroring"===s)return R(n.qd);var u=function(t){return S(function(i,n){var r={Qd:i,Kd:n};t.rf.push(r)})}(n);return function(t,i,n){var r={chunk:i};try{ct(t,r,n)}catch(i){return void Ut(t,i)}var e=t.Sf;!1===Tt(e)&&"writable"===e.Ra&&Et(e,Vt(t)),Ft(t)}(r,i,e),u}var Bt=function(){function t(){throw new p("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Sf")}(this))throw new p("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.Sf.Ra&&Ht(this,t)},t.prototype[vt]=function(t){var i=this.Tf(t);return Mt(this),i},t.prototype[dt]=function(){ft(this)},t}();function Ot(t,i,n,r,e,s,u,o){i.Sf=t,t.nf=i,i.tf=void 0,i.if=void 0,ft(i),i.pf=!1,i.Af=o,i.kf=u,i.Ef=r,i.xf=e,i.Tf=s;var h=Vt(i);Et(t,h),P(I(n()),function(){i.pf=!0,Ft(i)},function(n){i.pf=!0,kt(t,n)})}function Mt(t){t.Ef=void 0,t.xf=void 0,t.Tf=void 0,t.Af=void 0}function Lt(t){return t.kf-t.if}function Ft(t){var i=t.Sf;if(!1!==t.pf&&void 0===i.hf)if("erroring"!==i.Ra){if(0!==t.tf.length){var n=function(t){return t.tf.peek().value}(t);"close"===n?function(t){var i=t.Sf;(function(t){t.cf=t.uf,t.uf=void 0})(i),at(t);var n=t.xf();Mt(t),P(n,function(){!function(t){t.cf.Qd(void 0),t.cf=void 0,"erroring"===t.Ra&&(t.qd=void 0,void 0!==t.df&&(t.df.Qd(),t.df=void 0)),t.Ra="closed";var i=t.ef;void 0!==i&&Qt(i)}(i)},function(t){!function(t,i){t.cf.Kd(i),t.cf=void 0,void 0!==t.df&&(t.df.Kd(i),t.df=void 0),kt(t,i)}(i,t)})}(t):function(t,i){var n=t.Sf;!function(t){t.hf=t.rf.shift()}(n);var r=t.Ef(i);P(r,function(){!function(t){t.hf.Qd(void 0),t.hf=void 0}(n);var i=n.Ra;if(at(t),!1===Tt(n)&&"writable"===i){var r=Vt(t);Et(n,r)}Ft(t)},function(i){"writable"===n.Ra&&Mt(t),function(t,i){t.hf.Kd(i),t.hf=void 0,kt(t,i)}(n,i)})}(t,n.chunk)}}else At(i)}function Ut(t,i){"writable"===t.Sf.Ra&&Ht(t,i)}function Vt(t){return Lt(t)<=0}function Ht(t,i){var n=t.Sf;Mt(t),bt(n,i)}function Wt(t){return new p("WritableStream.prototype."+t+" can only be used on a WritableStream")}function zt(t){return new p("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function Xt(t){return new p("Cannot "+t+" a stream using a released writer")}function qt(t){t.zd=S(function(i,n){t.Gd=i,t.Xd=n,t.yf="pending"})}function Gt(t,i){qt(t),jt(t,i)}function jt(t,i){B(t.zd),t.Xd(i),t.Gd=void 0,t.Xd=void 0,t.yf="rejected"}function Qt(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0,t.yf="resolved"}function Yt(t){t.wf=S(function(i,n){t.Pf=i,t.If=n}),t.bf="pending"}function Kt(t,i){Yt(t),Zt(t,i)}function Jt(t){Yt(t),$t(t)}function Zt(t,i){B(t.wf),t.If(i),t.Pf=void 0,t.If=void 0,t.bf="rejected"}function $t(t){t.Pf(void 0),t.Pf=void 0,t.If=void 0,t.bf="fulfilled"}function ti(t){if("object"!==(void 0===t?"undefined":W(t))||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var ii,ni="undefined"!=typeof DOMException?DOMException:void 0,ri=function(t){if("function"!=typeof t&&"object"!==(void 0===t?"undefined":W(t)))return!1;try{return new t,!0}catch(t){return!1}}(ni)?ni:((ii=function(t,i){this.message=t||"",this.name=i||"Error",y.captureStackTrace&&y.captureStackTrace(this,this.constructor)}).prototype=k.create(y.prototype),k.defineProperty(ii.prototype,"constructor",{value:ii,writable:!0,configurable:!0}),ii);function ei(t,i,n,r,s,u){var o=Q(t),h=wt(i);t.Jd=!0;var a=!1,c=I(void 0);return S(function(f,v){var d,l,w,g;if(void 0!==u){if(d=function(){var n=new ri("Aborted","AbortError"),e=[];!1===r&&e.push(function(){return"writable"===i.Ra?yt(i,n):I(void 0)}),!1===s&&e.push(function(){return"readable"===t.Ra?Ki(t,n):I(void 0)}),k(function(){return ut.all(e.map(function(t){return t()}))},!0,n)},!0===u.aborted)return void d();u.addEventListener("abort",d)}if(y(t,o.zd,function(t){!1===r?k(function(){return yt(i,t)},!0,t):b(!0,t)}),y(i,h.zd,function(i){!1===s?k(function(){return Ki(t,i)},!0,i):b(!0,i)}),l=t,w=o.zd,g=function(){!1===n?k(function(){return function(t){var i=t.mf,n=i.Ra;return!0===Tt(i)||"closed"===n?I(void 0):"errored"===n?R(i.qd):Ct(t)}(h)}):b()},"closed"===l.Ra?g():D(w,g),!0===Tt(i)||"closed"===i.Ra){var _=new p("the destination writable stream closed before all data could be piped to it");!1===s?k(function(){return Ki(t,_)},!0,_):b(!0,_)}function m(){var t=c;return C(c,function(){return t!==c?m():void 0})}function y(t,i,n){"errored"===t.Ra?n(t.qd):N(i,n)}function k(t,n,r){function e(){P(t(),function(){return A(n,r)},function(t){return A(!0,t)})}!0!==a&&(a=!0,"writable"===i.Ra&&!1===Tt(i)?D(m(),e):e())}function b(t,n){!0!==a&&(a=!0,"writable"===i.Ra&&!1===Tt(i)?D(m(),function(){return A(t,n)}):A(t,n))}function A(t,i){Nt(h),U(o),void 0!==u&&u.removeEventListener("abort",d),t?v(i):f(void 0)}B(S(function(t,i){!function n(r){r?t():C(!0===a?I(!0):C(h.wf,function(){return C(rt(o),function(t){return!0===t.done||(c=C(xt(h,t.value),void 0,e),!1)})}),n,i)}(!1)}))})}var si=function(){function t(){throw new p}return k.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===ui(this))throw gi("desiredSize");return di(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===ui(this))throw gi("close");if(!1===li(this))throw new p("The stream is not in a state that permits close");ci(this)},t.prototype.enqueue=function(t){if(!1===ui(this))throw gi("enqueue");if(!1===li(this))throw new p("The stream is not in a state that permits enqueue");return fi(this,t)},t.prototype.error=function(t){if(!1===ui(this))throw gi("error");vi(this,t)},t.prototype[G]=function(t){ft(this);var i=this.Cf(t);return ai(this),i},t.prototype[j]=function(){var t=this.Rf;if(this.tf.length>0){var i=at(this);return!0===this.Df&&0===this.tf.length?(ai(this),Ji(t)):oi(this),I(M(i,!1,t.Wd.Vd))}var n=Y(t);return oi(this),n},t}();function ui(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Rf")}function oi(t){!1!==hi(t)&&(!0!==t.Nf?(t.Nf=!0,P(t.Bf(),function(){t.Nf=!1,!0===t.Mf&&(t.Mf=!1,oi(t))},function(i){vi(t,i)})):t.Mf=!0)}function hi(t){var i=t.Rf;return!1!==li(t)&&!1!==t.pf&&(!0===Yi(i)&&J(i)>0||di(t)>0)}function ai(t){t.Bf=void 0,t.Cf=void 0,t.Af=void 0}function ci(t){var i=t.Rf;t.Df=!0,0===t.tf.length&&(ai(t),Ji(i))}function fi(t,i){var n=t.Rf;if(!0===Yi(n)&&J(n)>0)K(n,i,!1);else{var r=void 0;try{r=t.Af(i)}catch(i){throw vi(t,i),i}try{ct(t,i,r)}catch(i){throw vi(t,i),i}}oi(t)}function vi(t,i){var n=t.Rf;"readable"===n.Ra&&(ft(t),ai(t),Zi(n,i))}function di(t){var i=t.Rf.Ra;return"errored"===i?null:"closed"===i?0:t.kf-t.if}function li(t){var i=t.Rf.Ra;return!1===t.Df&&"readable"===i}function wi(t,i,n,r,e,s,u){i.Rf=t,i.tf=void 0,i.if=void 0,ft(i),i.pf=!1,i.Df=!1,i.Mf=!1,i.Nf=!1,i.Af=u,i.kf=s,i.Bf=r,i.Cf=e,t.Zd=i,P(I(n()),function(){i.pf=!0,oi(i)},function(t){vi(i,t)})}function gi(t){return new p("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var _i=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&b.floor(t)===t},mi=function(){function t(){throw new p("ReadableStreamBYOBRequest cannot be used directly")}return k.defineProperty(t.prototype,"view",{get:function(){if(!1===ki(this))throw Li("view");return this.Lf},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===ki(this))throw Li("respond");if(void 0===this.Of)throw new p("This BYOB request has been invalidated");this.Lf.buffer,function(t,i){if(!1===c(i=Number(i)))throw new RangeError("bytesWritten must be a finite");Di(t,i)}(this.Of,t)},t.prototype.respondWithNewView=function(t){if(!1===ki(this))throw Li("respond");if(void 0===this.Of)throw new p("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new p("You can only respond with array buffer views");t.buffer,function(t,i){var n=t.Ff.peek();if(n.byteOffset+n.bytesFilled!==i.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(n.byteLength!==i.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");n.buffer=i.buffer,Di(t,i.byteLength)}(this.Of,t)},t}(),yi=function(){function t(){throw new p("ReadableByteStreamController constructor cannot be used directly")}return k.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===pi(this))throw Fi("byobRequest");if(void 0===this.Uf&&this.Ff.length>0){var t=this.Ff.peek(),i=new E(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=k.create(mi.prototype);!function(t,i,n){t.Of=i,t.Lf=n}(n,this,i),this.Uf=n}return this.Uf},enumerable:!0,configurable:!0}),k.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===pi(this))throw Fi("desiredSize");return Oi(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===pi(this))throw Fi("close");if(!0===this.Df)throw new p("The stream has already been closed; do not close it again!");var t=this.Vf.Ra;if("readable"!==t)throw new p("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var i=t.Vf;if(t.if>0)t.Df=!0;else{if(t.Ff.length>0&&t.Ff.peek().bytesFilled>0){var n=new p("Insufficient bytes to fill elements in the given buffer");throw Bi(t,n),n}xi(t),Ji(i)}}(this)},t.prototype.enqueue=function(t){if(!1===pi(this))throw Fi("enqueue");if(!0===this.Df)throw new p("stream is closed or draining");var i=this.Vf.Ra;if("readable"!==i)throw new p("The stream (in "+i+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new p("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,i){var n=t.Vf,r=i.buffer,e=i.byteOffset,s=i.byteLength,u=r;!0===Z(n)?0===J(n)?Si(t,u,e,s):K(n,new E(u,e,s),!1):!0===Hi(n)?(Si(t,u,e,s),Pi(t)):Si(t,u,e,s),bi(t)}(this,t)},t.prototype.error=function(t){if(!1===pi(this))throw Fi("error");Bi(this,t)},t.prototype[G]=function(t){this.Ff.length>0&&(this.Ff.peek().bytesFilled=0),ft(this);var i=this.Cf(t);return xi(this),i},t.prototype[j]=function(){var t=this.Vf;if(this.if>0){var i=this.tf.shift();this.if-=i.byteLength,Ri(this);var n=void 0;try{n=new E(i.buffer,i.byteOffset,i.byteLength)}catch(t){return R(t)}return I(M(n,!1,t.Wd.Vd))}var r=this.Hf;if(void 0!==r){var e=void 0;try{e=new ArrayBuffer(r)}catch(t){return R(t)}var s={buffer:e,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,ctor:E,readerType:"default"};this.Ff.push(s)}var u=Y(t);return bi(this),u},t}();function pi(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Vf")}function ki(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Of")}function bi(t){var i=function(t){var i=t.Vf;if("readable"!==i.Ra)return!1;if(!0===t.Df)return!1;if(!1===t.pf)return!1;if(!0===Z(i)&&J(i)>0)return!0;if(!0===Hi(i)&&Vi(i)>0)return!0;var n=Oi(t);return n>0}(t);!1!==i&&(!0!==t.Nf?(t.Nf=!0,P(t.Bf(),function(){t.Nf=!1,!0===t.Mf&&(t.Mf=!1,bi(t))},function(i){Bi(t,i)})):t.Mf=!0)}function Ai(t,i){var n=!1;"closed"===t.Ra&&(n=!0);var r=Ti(i);"default"===i.readerType?K(t,r,n):function(t,i,n){var r=t.Wd,e=r.Wf.shift();e.Qd(M(i,n,r.Vd))}(t,r,n)}function Ti(t){var i=t.bytesFilled,n=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,i/n)}function Si(t,i,n,r){t.tf.push({buffer:i,byteOffset:n,byteLength:r}),t.if+=r}function Ei(t,i){var n=i.elementSize,r=i.bytesFilled-i.bytesFilled%n,e=b.min(t.if,i.byteLength-i.bytesFilled),s=i.bytesFilled+e,u=s-s%n,o=e,h=!1;u>r&&(o=u-i.bytesFilled,h=!0);for(var c=t.tf;o>0;){var f=c.peek(),v=b.min(o,f.byteLength),d=i.byteOffset+i.bytesFilled;a(i.buffer,d,f.buffer,f.byteOffset,v),f.byteLength===v?c.shift():(f.byteOffset+=v,f.byteLength-=v),t.if-=v,Ii(t,v,i),o-=v}return h}function Ii(t,i,n){Ci(t),n.bytesFilled+=i}function Ri(t){0===t.if&&!0===t.Df?(xi(t),Ji(t.Vf)):bi(t)}function Ci(t){void 0!==t.Uf&&(t.Uf.Of=void 0,t.Uf.Lf=void 0,t.Uf=void 0)}function Pi(t){for(;t.Ff.length>0;){if(0===t.if)return;var i=t.Ff.peek();!0===Ei(t,i)&&(Ni(t),Ai(t.Vf,i))}}function Di(t,i){var n=t.Ff.peek();if("closed"===t.Vf.Ra){if(0!==i)throw new p("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,i){i.buffer=i.buffer;var n=t.Vf;if(!0===Hi(n))for(;Vi(n)>0;)Ai(n,Ni(t))}(t,n)}else!function(t,i,n){if(n.bytesFilled+i>n.byteLength)throw new RangeError("bytesWritten out of range");if(Ii(t,i,n),!(n.bytesFilled0){var e=n.byteOffset+n.bytesFilled,s=n.buffer.slice(e-r,e);Si(t,s,0,s.byteLength)}n.buffer=n.buffer,n.bytesFilled-=r,Ai(t.Vf,n),Pi(t)}}(t,i,n);bi(t)}function Ni(t){var i=t.Ff.shift();return Ci(t),i}function xi(t){t.Bf=void 0,t.Cf=void 0}function Bi(t,i){var n=t.Vf;"readable"===n.Ra&&(function(t){Ci(t),t.Ff=new O}(t),ft(t),xi(t),Zi(n,i))}function Oi(t){var i=t.Vf.Ra;return"errored"===i?null:"closed"===i?0:t.kf-t.if}function Mi(t,i,n){var r=k.create(yi.prototype),e=v(i,"pull",0,[r]),s=v(i,"cancel",1,[]),u=i.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===_i(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,i,n,r,e,s,u){i.Vf=t,i.Mf=!1,i.Nf=!1,i.Uf=void 0,i.tf=i.if=void 0,ft(i),i.Df=!1,i.pf=!1,i.kf=w(s),i.Bf=r,i.Cf=e,i.Hf=u,i.Ff=new O,t.Zd=i,P(I(n()),function(){i.pf=!0,bi(i)},function(t){Bi(i,t)})}(t,r,function(){return d(i,"start",[r])},e,s,n,u)}function Li(t){return new p("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Fi(t){return new p("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Ui(t){return S(function(i,n){var r={Qd:i,Kd:n};t.Wd.Wf.push(r)})}function Vi(t){return t.Wd.Wf.length}function Hi(t){var i=t.Wd;return void 0!==i&&!!zi(i)}var Wi=function(){function t(t){if(!Qi(t))throw new p("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===pi(t.Zd))throw new p("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Yi(t))throw new p("This stream has already been locked for exclusive reading by another reader");L(this,t),this.Wf=new O}return k.defineProperty(t.prototype,"closed",{get:function(){return zi(this)?this.zd:R(Xi("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return zi(this)?void 0===this.Hd?R(V("cancel")):F(this,t):R(Xi("cancel"))},t.prototype.read=function(t){return zi(this)?void 0===this.Hd?R(V("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?R(new p("view must have non-zero byteLength")):function(t,i){var n=t.Hd;return n.Jd=!0,"errored"===n.Ra?R(n.qd):function(t,i){var n=t.Vf,r=1;i.constructor!==DataView&&(r=i.constructor.BYTES_PER_ELEMENT);var e=i.constructor,s={buffer:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength,bytesFilled:0,elementSize:r,ctor:e,readerType:"byob"};if(t.Ff.length>0)return t.Ff.push(s),Ui(n);if("closed"===n.Ra)return I(M(new e(s.buffer,s.byteOffset,0),!0,n.Wd.Vd));if(t.if>0){if(!0===Ei(t,s)){var u=Ti(s);return Ri(t),I(M(u,!1,n.Wd.Vd))}if(!0===t.Df){var o=new p("Insufficient bytes to fill elements in the given buffer");return Bi(t,o),R(o)}}t.Ff.push(s);var h=Ui(n);return bi(t),h}(n.Zd,i)}(this,t)):R(new p("view must be an array buffer view")):R(Xi("read"))},t.prototype.releaseLock=function(){if(!zi(this))throw Xi("releaseLock");if(void 0!==this.Hd){if(this.Wf.length>0)throw new p("Tried to release a reader lock when that reader has pending read() calls un-settled");U(this)}},t}();function zi(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Wf")}function Xi(t){return new p("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var qi=function(){function t(t,i){void 0===t&&(t={}),void 0===i&&(i={}),ji(this);var n=i.size,r=i.highWaterMark,e=t.type;if("bytes"===String(e)){if(void 0!==n)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===r&&(r=0),Mi(this,t,r=w(r))}else{if(void 0!==e)throw new RangeError("Invalid type is specified");var s=g(n);void 0===r&&(r=1),function(t,i,n,r){var e=k.create(si.prototype),s=v(i,"pull",0,[e]),u=v(i,"cancel",1,[]);wi(t,e,function(){return d(i,"start",[e])},s,u,n,r)}(this,t,r=w(r),s)}}return k.defineProperty(t.prototype,"locked",{get:function(){if(!1===Qi(this))throw $i("locked");return Yi(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Qi(this)?R($i("cancel")):!0===Yi(this)?R(new p("Cannot cancel a stream that already has a reader")):Ki(this,t)},t.prototype.getReader=function(t){var i=(void 0===t?{}:t).mode;if(!1===Qi(this))throw $i("getReader");if(void 0===i)return Q(this,!0);if("byob"===(i=String(i)))return function(t,i){void 0===i&&(i=!1);var n=new Wi(t);return n.Vd=i,n}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,i){var n=t.writable,r=t.readable,e=void 0===i?{}:i,s=e.preventClose,u=e.preventAbort,o=e.preventCancel,h=e.signal;if(!1===Qi(this))throw $i("pipeThrough");if(!1===_t(n))throw new p("writable argument to pipeThrough must be a WritableStream");if(!1===Qi(r))throw new p("readable argument to pipeThrough must be a ReadableStream");if(s=Boolean(s),u=Boolean(u),o=Boolean(o),void 0!==h&&!ti(h))throw new p("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Yi(this))throw new p("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===mt(n))throw new p("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return B(ei(this,n,s,u,o,h)),r},t.prototype.pipeTo=function(t,i){var n=void 0===i?{}:i,r=n.preventClose,e=n.preventAbort,s=n.preventCancel,u=n.signal;return!1===Qi(this)?R($i("pipeTo")):!1===_t(t)?R(new p("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(r=Boolean(r),e=Boolean(e),s=Boolean(s),void 0===u||ti(u)?!0===Yi(this)?R(new p("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===mt(t)?R(new p("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):ei(this,t,r,e,s,u):R(new p("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Qi(this))throw $i("tee");var t=function(t){var i,n,r,e,s,u=Q(t),o=!1,a=!1,c=!1,f=S(function(t){s=t});function v(){return!0===o||(o=!0,B(x(rt(u),function(t){if(o=!1,!0===t.done)return!1===a&&ci(r.Zd),void(!1===c&&ci(e.Zd));var i=t.value,n=i,s=i;!1===a&&fi(r.Zd,n),!1===c&&fi(e.Zd,s)}))),I(void 0)}function d(){}return r=Gi(d,v,function(r){if(a=!0,i=r,!0===c){var e=h([i,n]),u=Ki(t,e);s(u)}return f}),e=Gi(d,v,function(r){if(c=!0,n=r,!0===a){var e=h([i,n]),u=Ki(t,e);s(u)}return f}),N(u.zd,function(t){vi(r.Zd,t),vi(e.Zd,t)}),[r,e]}(this);return h(t)},t.prototype.getIterator=function(t){var i=(void 0===t?{}:t).preventCancel,n=void 0!==i&&i;if(!1===Qi(this))throw $i("getIterator");return function(t,i){void 0===i&&(i=!1);var n=Q(t),r=k.create(st);return r.$d=n,r.ul=Boolean(i),r}(this,n)},t}();function Gi(t,i,n,r,e){void 0===r&&(r=1),void 0===e&&(e=function(){return 1});var s=k.create(qi.prototype);return ji(s),wi(s,k.create(si.prototype),t,i,n,r,e),s}function ji(t){t.Ra="readable",t.Wd=void 0,t.qd=void 0,t.Jd=!1}function Qi(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Zd")}function Yi(t){return void 0!==t.Wd}function Ki(t,i){return t.Jd=!0,"closed"===t.Ra?I(void 0):"errored"===t.Ra?R(t.qd):(Ji(t),x(t.Zd[G](i),e))}function Ji(t){t.Ra="closed";var i=t.Wd;void 0!==i&&(nt(i)&&(i.Yd.forEach(function(t){t.Qd(M(void 0,!0,i.Vd))}),i.Yd=new O),q(i))}function Zi(t,i){t.Ra="errored",t.qd=i;var n=t.Wd;void 0!==n&&(nt(n)?(n.Yd.forEach(function(t){t.Kd(i)}),n.Yd=new O):(n.Wf.forEach(function(t){t.Kd(i)}),n.Wf=new O),X(n,i))}function $i(t){return new p("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"===W(n.asyncIterator)&&k.defineProperty(qi.prototype,n.asyncIterator,{value:qi.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var tn=function(){function t(t){var i=t.highWaterMark;this.highWaterMark=i}return t.prototype.size=function(t){return t.byteLength},t}(),nn=function(){function t(t){var i=t.highWaterMark;this.highWaterMark=i}return t.prototype.size=function(){return 1},t}(),rn=function(){function t(t,i,n){void 0===t&&(t={}),void 0===i&&(i={}),void 0===n&&(n={});var r=i.size,e=i.highWaterMark,s=n.size,u=n.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var o=g(r);if(void 0===e&&(e=1),e=w(e),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var h,a=g(s);void 0===u&&(u=0),u=w(u),function(t,i,n,r,e,s){function u(){return i}function o(i){return function(t,i){var n=t.qf;return!0===t.lf?x(t.zf,function(){var r=t.Gf;if("erroring"===r.Ra)throw r.qd;return vn(n,i)}):vn(n,i)}(t,i)}function h(i){return function(t,i){return sn(t,i),I(void 0)}(t,i)}function a(){return function(t){var i=t.Xf,n=t.qf,r=n.jf();return cn(n),x(r,function(){if("errored"===i.Ra)throw i.qd;var t=i.Zd;!0===li(t)&&ci(t)},function(n){throw sn(t,n),i.qd})}(t)}function c(){return function(t){return on(t,!1),t.zf}(t)}function f(i){return un(t,i),I(void 0)}t.Gf=function(t,i,n,r,e,s){void 0===e&&(e=1),void 0===s&&(s=function(){return 1});var u=k.create(lt.prototype);return gt(u),Ot(u,k.create(Bt.prototype),t,i,n,r,e,s),u}(u,o,a,h,n,r),t.Xf=Gi(u,c,f,e,s),t.lf=void 0,t.zf=void 0,t.Qf=void 0,on(t,!0),t.qf=void 0}(this,S(function(t){h=t}),e,o,u,a),function(t,i){var n=k.create(hn.prototype),r=function(t){try{return fn(n,t),I(void 0)}catch(t){return R(t)}},e=i.transform;if(void 0!==e){if("function"!=typeof e)throw new p("transform is not a method");r=function(t){return l(e,i,[t,n])}}var s=v(i,"flush",0,[n]);!function(t,i,n,r){i.Kf=t,t.qf=i,i.Yf=n,i.jf=r}(t,n,r,s)}(this,t);var c=d(t,"start",[this.qf]);h(c)}return k.defineProperty(t.prototype,"readable",{get:function(){if(!1===en(this))throw ln("readable");return this.Xf},enumerable:!0,configurable:!0}),k.defineProperty(t.prototype,"writable",{get:function(){if(!1===en(this))throw ln("writable");return this.Gf},enumerable:!0,configurable:!0}),t}();function en(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"qf")}function sn(t,i){vi(t.Xf.Zd,i),un(t,i)}function un(t,i){cn(t.qf),Ut(t.Gf.nf,i),!0===t.lf&&on(t,!1)}function on(t,i){void 0!==t.zf&&t.Qf(),t.zf=S(function(i){t.Qf=i}),t.lf=i}var hn=function(){function t(){throw new p("TransformStreamDefaultController instances cannot be created directly")}return k.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===an(this))throw dn("desiredSize");return di(this.Kf.Xf.Zd)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===an(this))throw dn("enqueue");fn(this,t)},t.prototype.error=function(t){if(!1===an(this))throw dn("error");!function(t,i){sn(t.Kf,i)}(this,t)},t.prototype.terminate=function(){if(!1===an(this))throw dn("terminate");!function(t){var i=t.Kf,n=i.Xf.Zd;!0===li(n)&&ci(n);var r=new p("TransformStream terminated");un(i,r)}(this)},t}();function an(t){return!!o(t)&&!!k.prototype.hasOwnProperty.call(t,"Kf")}function cn(t){t.Yf=void 0,t.jf=void 0}function fn(t,i){var n=t.Kf,r=n.Xf.Zd;if(!1===li(r))throw new p("Readable side is not in a state that permits enqueue");try{fi(r,i)}catch(t){throw un(n,t),n.Xf.qd}var e=function(t){return!0!==hi(t)}(r);e!==n.lf&&on(n,!0)}function vn(t,i){return x(t.Yf(i),void 0,function(i){throw sn(t.Kf,i),i})}function dn(t){return new p("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function ln(t){return new p("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=tn,t.CountQueuingStrategy=nn,t.ReadableStream=qi,t.TransformStream=rn,t.WritableStream=lt,k.defineProperty(t,"__esModule",{value:!0})},"object"===(void 0===t?"undefined":W(t))&&void 0!==n?s(t):"function"==typeof define&&define.amd?define(["exports"],s):s((e=e||self).WebStreamsPolyfill={})}),Kt=M(function(t){function i(){var t=Yt();return i=function(){return t},t}U(),Et(),k.defineProperty(t,"__esModule",{value:!0}),function(t,i){for(var n in i)k.defineProperty(t,n,{enumerable:!0,get:k.getOwnPropertyDescriptor(i,n).get})}(t,{get ByteLengthQueuingStrategy(){return i().ByteLengthQueuingStrategy},get CountQueuingStrategy(){return i().CountQueuingStrategy},get ReadableStream(){return i().ReadableStream},get TransformStream(){return i().TransformStream},get WritableStream(){return i().WritableStream}})});function Jt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Jt=function(){return!!t})()}var Zt=O(function(){U(),Et()});function $t(t,i,n){return($t=Jt()?Reflect.construct:function(t,i,n){var r=[null];r.push.apply(r,i);var e=new(Function.bind.apply(t,r));return n&&It(e,n.prototype),e}).apply(null,arguments)}var ti=O(function(){U(),Et(),Zt(),Rt()});function ii(t){return(ii=k.setPrototypeOf?k.getPrototypeOf:function(t){return t.__proto__||k.getPrototypeOf(t)})(t)}var ni=O(function(){U(),Et()});var ri=O(function(){U(),Et()});function ei(t){var i="function"==typeof Map?new Map:void 0;return ei=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new p("Super expression must either be null or a function");if(void 0!==i){if(i.has(t))return i.get(t);i.set(t,n)}function n(){return $t(t,arguments,ii(this).constructor)}return n.prototype=k.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),It(n,t)},ei(t)}var si,ui=O(function(){U(),Et(),ti(),ni(),ri(),Rt()}),oi=M(function(t,r){var e,s;U(),Et(),Wt(),xt(),Pt(),H(),ct(),ui(),Ft(),Qt(),e=t,s=function(t){var r,e=k.defineProperty,s=k.defineProperties,u=k.getOwnPropertyDescriptors,o=k.getOwnPropertySymbols,h=k.prototype.hasOwnProperty,a=k.prototype.propertyIsEnumerable,c=function(t,i,n){return i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[i]=n},d=function(t,i){for(var n in i||(i={}))h.call(i,n)&&c(t,n,i[n]);if(o)for(var r,e=Lt(o(i));!(r=e()).done;)n=r.value,a.call(i,n)&&c(t,n,i[n]);return t},g=function(t,i){return s(t,u(i))},T=function(t,i){var n={};for(var r in t)h.call(t,r)&&i.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&o)for(var e,s=Lt(o(t));!(e=s()).done;)r=e.value,i.indexOf(r)<0&&a.call(t,r)&&(n[r]=t[r]);return n},R=("undefined"==typeof globalThis?"undefined":W(globalThis))<"u"?globalThis:(void 0===f?"undefined":W(f))<"u"?f:("undefined"==typeof global?"undefined":W(global))<"u"?global:("undefined"==typeof self?"undefined":W(self))<"u"?self:{};function C(t){return t&&t.__esModule&&k.prototype.hasOwnProperty.call(t,"default")?t.default:t}var P,D,N={exports:{}},x=(P||(P=1,D=N,function(t){var i,n={VERSION:"1.6.1"},r={},e=function(t,i){return function(){return i.apply(t,arguments)}},s=function(){var t,i,n=arguments,r=n[0];for(i=1;i=i.value},trace:function(){this.invoke(n.TRACE,arguments)},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},time:function(t){"string"==typeof t&&t.length>0&&this.invoke(n.TIME,[t,"start"])},timeEnd:function(t){"string"==typeof t&&t.length>0&&this.invoke(n.TIME,[t,"end"])},invoke:function(t,n){i&&this.enabledFor(t)&&i(n,s({level:t},this.context))}};var h,a=new o({filterLevel:n.OFF});(h=n).enabledFor=e(a,a.enabledFor),h.trace=e(a,a.trace),h.debug=e(a,a.debug),h.time=e(a,a.time),h.timeEnd=e(a,a.timeEnd),h.info=e(a,a.info),h.warn=e(a,a.warn),h.error=e(a,a.error),h.log=h.info,n.setHandler=function(t){i=t},n.setLevel=function(t){for(var i in a.setLevel(t),r)r.hasOwnProperty(i)&&r[i].setLevel(t)},n.getLevel=function(){return a.getLevel()},n.get=function(t){return r[t]||(r[t]=new o(s({name:t},a.context)))},n.createDefaultHandler=function(t){(t=t||{}).formatter=t.formatter||function(t,i){i.name&&t.unshift("["+i.name+"]")};var i={},r=function(t,i){Function.prototype.apply.call(t,console,i)};return("undefined"==typeof console?"undefined":W(console))>"u"?function(){}:function(e,s){e=Array.prototype.slice.call(e);var u,o=console.log;s.level===n.TIME?(u=(s.name?"["+s.name+"] ":"")+e[0],"start"===e[1]?console.time?console.time(u):i[u]=(new Date).getTime():console.timeEnd?console.timeEnd(u):r(o,[u+": "+((new Date).getTime()-i[u])+"ms"])):(s.level===n.WARN&&console.warn?o=console.warn:s.level===n.ERROR&&console.error?o=console.error:s.level===n.INFO&&console.info?o=console.info:s.level===n.DEBUG&&console.debug?o=console.debug:s.level===n.TRACE&&console.trace&&(o=console.trace),t.formatter(e,s),r(o,e))}},n.useDefaults=function(t){n.setLevel(t&&t.defaultLevel||n.DEBUG),n.setHandler(n.createDefaultHandler(t))},n.setDefaults=n.useDefaults,D.exports?D.exports=n:(n.Jf=t.Logger,n.noConflict=function(){return t.Logger=n.Jf,n},t.Logger=n)}(N.exports)),N.exports),B=C(x),O="0.6.0",M=(null==(r=null==f?void 0:f.navigator)?void 0:r.userAgent)||"No user agent available",L="",F="",U="",H="",z="",X="",q="",G=0,j=[],Q=function(t){L=""===L?t:L},Y=function(t){F=""===F?t:F},K=function(t){U=""===U?t:U},J=function(t){H=""===H?t:H},Z=function(t){z=""===z?t:z},tt=function(t){G=0===G?t:G},it=function(t){X=t},nt=function(t){q=""===q?t:q},rt=function(t){60===j.length&&j.shift(),j.push(t)},et=function(t,i){var n;void 0===t&&(t=60),void 0===i&&(i="JSON"),n=!Number.isInteger(t)||t>60||t<=0?60:t;var r={client:"@millicast/millicast-sdk",version:O,timestamp:(new Date).toISOString(),userAgent:M,clusterId:q,accountId:L,streamName:F,subscriberId:U,connection:X,stats:j.slice(-n),connectionDurationMs:(new Date).getTime()-G};return""!==z?r.feedId=z:""!==H&&(r.streamViewId=H),"CMCD"===i?function(t){function i(t,i){return{ts:b.round(i.timestamp)||"",ot:"audio"===t?"a":"v",bl:i.jitterBufferDelay||0,br:b.round(i.bitrateBitsPerSecond||0),pld:i.packetsLostDeltaPerSecond||0,j:i.jitter||0,mtp:i.packetRate||0,mid:i.mid||"",mimeType:i.mimeType||""}}return t.stats=t.stats.reduce(function(t,n){var r=0!==n.audio.inbounds.length?n.audio.inbounds.map(function(t){return i("audio",t)}):n.audio.outbounds.map(function(t){return i("audio",t)}),e=0!==n.video.inbounds.length?n.video.inbounds.map(function(t){return i("video",t)}):n.video.outbounds.map(function(t){return i("video",t)});return t.concat([].concat(r,e))},[]),t}(r):r};B.useDefaults({defaultLevel:B.TRACE});var st=["TRACE","DEBUG","INFO","WARN","ERROR"],ot=function(t,i){t.unshift("[".concat(i.name||"Global","] ").concat((new Date).toISOString()," - ").concat(i.level.name," -"))},ht=function(t,i){return i?t.value>=lt[i].value:t.value>=dt.value},at=B.createDefaultHandler({formatter:ot});B.setHandler(function(t,i){(function(t,i){t=(t=Array.prototype.slice.call(t)).map(function(t){return"object"==(void 0===t?"undefined":W(t))?JSON.stringify(t):t}),ot(t,i),0!==ft?(vt.push(t.join(" ")),vt.length>=ft&&(vt=vt.slice(-ft))):vt=[]})(t,i),ht(i.level,i.name)&&at(t,i);for(var n,r=Lt(wt);!(n=r()).done;){var e=n.value,s=e.handler,u=e.level;i.level.value>=u.value&&s(t,i)}});var ct,ft=1e4,vt=[],dt=B.OFF,lt={},wt=[],gt=g(d({},B),{enabledFor:ht,getHistory:function(){return vt},getHistoryMaxSize:function(){return ft},setHistoryMaxSize:function(t){ft=t},setLevel:function(t){for(var i in dt=t,lt)lt[i]=t},getLevel:function(){return dt},get:function(t){lt[t]||(lt[t]=dt);var i=B.get(t);return i.setLevel=function(i){lt[t]=i},i.getLevel=function(){return lt[t]},i},setHandler:function(t,i){wt.push({handler:t,level:i})},diagnose:function(t){var i;void 0===t&&(t={});var n={statsCount:60,historySize:1e3,minLogLevel:"TRACE",statsFormat:"JSON"};"number"==typeof t?(n.statsCount=t,i=n):i=d(d({},n),t);var r=i.statsCount,e=i.historySize,s=i.minLogLevel,u=i.statsFormat,o=et(r,u),h=gt.getHistory();if(!Number.isInteger(e)||e<=0)throw new y("Invalid Argument Exception : historySize must be a positive integer.");if(!st.includes(s.toUpperCase()))throw new y('Invalid Argument Exception : the minLogLevel parameter only excepts "trace", "debug", "info", "warn", and "error" as arguments.');if(st.includes(s.toUpperCase())){var a=st.slice(st.indexOf(s.toUpperCase())),c=h.filter(function(t){return a.some(function(i){return t.includes(i)})});o.history=c.slice(-e)}return o},JSON:"JSON",CMCD:"CMCD",VERSION:O}),_t={exports:{}};function mt(){if(ct)return _t.exports;ct=1;var t,i="object"==("undefined"==typeof Reflect?"undefined":W(Reflect))?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(t,i,n){return Function.prototype.apply.call(t,i,n)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:k.getOwnPropertySymbols?function(t){return k.getOwnPropertyNames(t).concat(k.getOwnPropertySymbols(t))}:function(t){return k.getOwnPropertyNames(t)};var r=Number.isNaN||function(t){return t!=t};function e(){e.init.call(this)}_t.exports=e,_t.exports.once=function(t,i){return new ut(function(n,r){function e(n){t.removeListener(i,s),r(n)}function s(){"function"==typeof t.removeListener&&t.removeListener("error",e),n([].slice.call(arguments))}l(t,i,s,{once:!0}),"error"!==i&&function(t,i,n){"function"==typeof t.on&&l(t,"error",i,n)}(t,e,{once:!0})})},e.EventEmitter=e,e.prototype.Zf=void 0,e.prototype.$f=0,e.prototype.rv=void 0;var s=10;function u(t){if("function"!=typeof t)throw new p('The "listener" argument must be of type Function. Received type '+(void 0===t?"undefined":W(t)))}function o(t){return void 0===t.rv?e.defaultMaxListeners:t.rv}function h(t,i,n,r){var e,s,h;if(u(n),void 0===(s=t.Zf)?(s=t.Zf=k.create(null),t.$f=0):(void 0!==s.newListener&&(t.emit("newListener",i,n.listener?n.listener:n),s=t.Zf),h=s[i]),void 0===h)h=s[i]=n,++t.$f;else if("function"==typeof h?h=s[i]=r?[n,h]:[h,n]:r?h.unshift(n):h.push(n),(e=o(t))>0&&h.length>e&&!h.warned){h.warned=!0;var a=new y("Possible EventEmitter memory leak detected. "+h.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=i,a.count=h.length,function(t){console&&console.warn&&console.warn(t)}(a)}return t}function a(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(t,i,n){var r={fired:!1,wrapFn:void 0,target:t,type:i,listener:n},e=a.bind(r);return e.listener=n,r.wrapFn=e,e}function f(t,i,n){var r=t.Zf;if(void 0===r)return[];var e=r[i];return void 0===e?[]:"function"==typeof e?n?[e.listener||e]:[e]:n?function(t){for(var i=new Array(t.length),n=0;n0&&(u=i[0]),V(u,y))throw u;var o=new y("Unhandled error."+(u?" ("+u.message+")":""));throw o.context=u,o}var h=s[t];if(void 0===h)return!1;if("function"==typeof h)n(h,this,i);else{var a=h.length,c=d(h,a);for(r=0;r=0;s--)if(n[s]===i||n[s].listener===i){o=n[s].listener,e=s;break}if(e<0)return this;0===e?n.shift():function(t,i){for(;i+1=0;r--)this.removeListener(t,i[r]);return this},e.prototype.listeners=function(t){return f(this,t,!0)},e.prototype.rawListeners=function(t){return f(this,t,!1)},e.listenerCount=function(t,i){return"function"==typeof t.listenerCount?t.listenerCount(i):v.call(t,i)},e.prototype.listenerCount=v,e.prototype.eventNames=function(){return this.$f>0?t(this.Zf):[]},_t.exports}var yt,pt,kt,bt,At,Tt,St,Et,It,Rt,Pt,Dt,xt,Bt,Ot,Mt,Ft,Ut,Ht,Wt,Xt,qt,Gt,jt=C(mt()),Qt={exports:{}},Yt=function(){if(yt)return Qt.exports;yt=1,Qt.exports=i,Qt.exports.filter=function(n,r){var e=new t;return i(n,e,r),e};var t=mt().EventEmitter;function i(t,i,n){Array.isArray(n)||(n=[n]);var r=[];return n.forEach(function(n){var e=function(){var t=[].slice.call(arguments);t.unshift(n),i.emit.apply(i,t)};r.push(e),t.on(n,e)}),function(){n.forEach(function(i,n){t.removeListener(i,r[n])})}}return Qt.exports}(),Kt=C(Yt),Jt={exports:{}},Zt=(pt||(pt=1,function(t){var i,n;self,t.exports=(i={7:function(t){var i,n=function(t){if("function"!=typeof t)throw new p('The "listener" argument must be of type Function. Received type '+(void 0===t?"undefined":W(t)))},r=function(t){return void 0===t.rv?l.defaultMaxListeners:t.rv},e=function(t,i,e,s){var u,o,h,a;if(n(e),void 0===(o=t.Zf)?(o=t.Zf=k.create(null),t.$f=0):(void 0!==o.newListener&&(t.emit("newListener",i,e.listener?e.listener:e),o=t.Zf),h=o[i]),void 0===h)h=o[i]=e,++t.$f;else if("function"==typeof h?h=o[i]=s?[e,h]:[h,e]:s?h.unshift(e):h.push(e),(u=r(t))>0&&h.length>u&&!h.warned){h.warned=!0;var c=new y("Possible EventEmitter memory leak detected. "+h.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=i,c.count=h.length,a=c,console&&console.warn&&console.warn(a)}return t},s=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)},u=function(t,i,n){var r={fired:!1,wrapFn:void 0,target:t,type:i,listener:n},e=s.bind(r);return e.listener=n,r.wrapFn=e,e},o=function(t,i,n){var r=t.Zf;if(void 0===r)return[];var e=r[i];return void 0===e?[]:"function"==typeof e?n?[e.listener||e]:[e]:n?function(t){for(var i=new Array(t.length),n=0;n0&&(s=i[0]),V(s,y))throw s;var u=new y("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var o=e[t];if(void 0===o)return!1;if("function"==typeof o)v(o,this,i);else{var h=o.length,c=a(o,h);for(n=0;n=0;u--)if(r[u]===i||r[u].listener===i){o=r[u].listener,s=u;break}if(s<0)return this;0===s?r.shift():function(t,i){for(;i+1=0;r--)this.removeListener(t,i[r]);return this},l.prototype.listeners=function(t){return o(this,t,!0)},l.prototype.rawListeners=function(t){return o(this,t,!1)},l.listenerCount=function(t,i){return"function"==typeof t.listenerCount?t.listenerCount(i):h.call(t,i)},l.prototype.listenerCount=h,l.prototype.eventNames=function(){return this.$f>0?i(this.Zf):[]}},156:function(t,i,n){var r=this&&this.hv||(k.create?function(t,i,n,r){void 0===r&&(r=n);var e=k.getOwnPropertyDescriptor(i,n);e&&!("get"in e?!i.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return i[n]}}),k.defineProperty(t,r,e)}:function(t,i,n,r){void 0===r&&(r=n),t[r]=i[n]}),e=this&&this.ov||function(t,i){for(var n in t)"default"===n||k.prototype.hasOwnProperty.call(i,n)||r(i,t,n)},s=this&&this.uv||function(t){return t&&t.__esModule?t:{default:t}};k.defineProperty(i,"__esModule",{value:!0}),i.Logger=void 0;var u=n(586);k.defineProperty(i,"Logger",{enumerable:!0,get:function(){return s(u).default}}),e(n(284),i),e(n(280),i),e(n(738),i),e(n(767),i)},185:function(t,i){k.defineProperty(i,"__esModule",{value:!0}),i.calculatePacketsLostRatio=i.calculateRate=i.getMediaKind=void 0,i.getMediaKind=function(t){var i=t.kind||t.mediaType;return["audio","video"].includes(i)||"inbound-rtp"!==t.type||(i=t.id.toLocaleLowerCase().includes("video")?"video":"audio"),i},i.calculateRate=function(t,i,n,r){return n&&r?(i-r)/((t-n)/1e3):0},i.calculatePacketsLostRatio=function(t,i,n,r){var e=t-(null!=n?n:0),s=e+(i-(null!=r?r:0));return 0===s?0:e/s}},280:function(t,i){k.defineProperty(i,"__esModule",{value:!0})},284:function(t,i,n){var r,e,s,u,o,h,a,c,f,v,d,l,w,g,y,b,A=this&&this.fv||function(t,i,n,r){return new(n||(n=ut))(function(e,s){function u(t){try{h(r.next(t))}catch(t){s(t)}}function o(t){try{h(r.throw(t))}catch(t){s(t)}}function h(t){var i;t.done?e(t.value):(i=t.value,V(i,n)?i:new n(function(t){t(i)})).then(u,o)}h((r=r.apply(t,i||[])).next())})},T=this&&this.vv||function(t,i,n,r,e){if("m"===r)throw new p("Private method is not writable");if("a"===r&&!e)throw new p("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!e:!i.has(t))throw new p("Cannot write private member to an object whose class did not declare it");return"a"===r?e.call(t,n):e?e.value=n:i.set(t,n),n},S=this&&this._v||function(t,i,n,r){if("a"===n&&!r)throw new p("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!r:!i.has(t))throw new p("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:i.get(t)},E=this&&this.uv||function(t){return t&&t.__esModule?t:{default:t}};k.defineProperty(i,"__esModule",{value:!0}),i.WebRTCStats=void 0;var I=n(7),R=E(n(586)),C=n(738),P=n(185),D=function(t){function i(i){var n;return n=t.call(this)||this,r.add(n),e.set(n,void 0),s.set(n,void 0),u.set(n,void 0),o.set(n,null),h.set(n,void 0),a.set(n,null),n.start=function(){S(n,h,"f").info("WebRTC statistics collection is starting..."),T(n,a,null,"f"),T(n,o,_(S(n,c,"f"),S(n,s,"f")),"f")},n.stop=function(){S(n,o,"f")&&(m(S(n,o,"f")),T(n,o,null,"f"),S(n,h,"f").info("WebRTC statistics collection has stopped."))},c.set(n,function(){return A(n,void 0,void 0,function(){var t,i,n,s,o,c,f,v,w,_,m,p;return zt(this,function(A){switch(A.label){case 0:return A.trys.push([0,2,,3]),S(this,h,"f").trace("Requesting WebRTC statistics..."),[4,S(this,e,"f").call(this)];case 1:return t=A.sent(),i=(new Date).toISOString(),[3,3];case 2:return n=A.sent(),[2,(S(this,h,"f").error("Problem collecting the WebRTC statistics.",n),void this.emit("error","Problem collecting the WebRTC statistics - ".concat(n)))];case 3:s=Array.from(t.values()),o={timestamp:i,input:{audio:[],video:[]},output:{audio:[],video:[]}},S(this,u,"f")&&(o.rawStats=t),c=0,A.label=4;case 4:if(!(c=i.value},trace:function(){this.invoke(u.TRACE,arguments)},debug:function(){this.invoke(u.DEBUG,arguments)},info:function(){this.invoke(u.INFO,arguments)},warn:function(){this.invoke(u.WARN,arguments)},error:function(){this.invoke(u.ERROR,arguments)},time:function(t){"string"==typeof t&&t.length>0&&this.invoke(u.TIME,[t,"start"])},timeEnd:function(t){"string"==typeof t&&t.length>0&&this.invoke(u.TIME,[t,"end"])},invoke:function(t,i){s&&this.enabledFor(t)&&s(i,a({level:t},this.context))}};var v,d=new f({filterLevel:u.OFF});(v=u).enabledFor=h(d,d.enabledFor),v.trace=h(d,d.trace),v.debug=h(d,d.debug),v.time=h(d,d.time),v.timeEnd=h(d,d.timeEnd),v.info=h(d,d.info),v.warn=h(d,d.warn),v.error=h(d,d.error),v.log=v.info,u.setHandler=function(t){s=t},u.setLevel=function(t){for(var i in d.setLevel(t),o)o.hasOwnProperty(i)&&o[i].setLevel(t)},u.getLevel=function(){return d.getLevel()},u.get=function(t){return o[t]||(o[t]=new f(a({name:t},d.context)))},u.createDefaultHandler=function(t){(t=t||{}).formatter=t.formatter||function(t,i){i.name&&t.unshift("["+i.name+"]")};var i={},n=function(t,i){Function.prototype.apply.call(t,console,i)};return("undefined"==typeof console?"undefined":W(console))>"u"?function(){}:function(r,e){r=Array.prototype.slice.call(r);var s,o=console.log;e.level===u.TIME?(s=(e.name?"["+e.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(s):i[s]=(new Date).getTime():console.timeEnd?console.timeEnd(s):n(o,[s+": "+((new Date).getTime()-i[s])+"ms"])):(e.level===u.WARN&&console.warn?o=console.warn:e.level===u.ERROR&&console.error?o=console.error:e.level===u.INFO&&console.info?o=console.info:e.level===u.DEBUG&&console.debug?o=console.debug:e.level===u.TRACE&&console.trace&&(o=console.trace),t.formatter(r,e),n(o,r))}},u.useDefaults=function(t){u.setLevel(t&&t.defaultLevel||u.DEBUG),u.setHandler(u.createDefaultHandler(t))},u.setDefaults=u.useDefaults,void 0===(e="function"==typeof(r=u)?r.call(i,n,i,t):r)||(t.exports=e)}()},738:function(t,i){var n,r;k.defineProperty(i,"__esModule",{value:!0}),i.QualityLimitationReason=void 0,(r=n||(i.QualityLimitationReason=n={}))[r.none=0]="none",r[r.cpu=1]="cpu",r[r.bandwidth=2]="bandwidth",r[r.other=3]="other"},767:function(t,i){k.defineProperty(i,"__esModule",{value:!0})}},n={},function t(r){var e=n[r];if(void 0!==e)return e.exports;var s=n[r]={exports:{}};return i[r].call(s.exports,s,s.exports,t),s.exports}(156))}(Jt)),Jt.exports),$t=gt.get("PeerConnectionStats"),ti="stats",ii=function(t){function i(i,n){var r;return void 0===n&&(n={statsIntervalMs:1e3,autoInitStats:!0}),(r=t.call(this)||this).peer=i,r.collection=null,r.initialized=!1,n.autoInitStats&&r.init(n.statsIntervalMs),r}Ct(i,t);var n=i.prototype;return n.init=function(t){var i=this;if(this.initialized)$t.warn("PeerConnectionStats.init() has already been called. Automatic initialization occurs when the PeerConnectionStats object is constructed.");else{$t.info("Initializing peer connection stats");var n=this.peer;try{this.collection=new Zt.WebRTCStats({getStatsInterval:t,getStats:function(){return n.getStats()},includeRawStats:!0}),this.collection.on("stats",function(t){var n=function(t){var i=t,n=(i.input,i.output,i.rawStats,T(i,["input","output","rawStats"]));return g(d({},n),{audio:{inbounds:t.input.audio.map(function(t){var i=t,n=i.packetLossRatio,r=i.packetLossDelta,e=i.bitrate,s=T(i,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:n,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)}),outbounds:t.output.audio.map(function(t){var i=t,n=i.packetLossRatio,r=i.packetLossDelta,e=i.bitrate,s=T(i,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:n,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)})},video:{inbounds:t.input.video.map(function(t){var i=t,n=i.packetLossRatio,r=i.packetLossDelta,e=i.bitrate,s=T(i,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:n,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)}),outbounds:t.output.video.map(function(t){var i=t,n=i.packetLossRatio,r=i.packetLossDelta,e=i.bitrate,s=T(i,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:n,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)})},raw:t.rawStats})}(t);rt(n),i.emit(ti,n)}),this.collection.start(),this.initialized=!0}catch(t){$t.error(t)}}},n.parseStats=function(t){return $t.warn("The parseStats method is deprecated and will be removed in future releases."),null},n.stop=function(){$t.info("Stopping peer connection stats"),this.collection.stop()},i}(jt),ni={},ri={},si={},ui={exports:{}};function oi(){if(kt)return ui.exports;kt=1;var t=ui.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(t){return t.encoding?"rtpmap:%d %s/%s/%s":t.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(t){return null!=t.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(t){return null!=t.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(t){return"extmap:%d"+(t.direction?"/%s":"%v")+(t["encrypt-uri"]?" %s":"%v")+" %s"+(t.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(t){return null!=t.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(t){var i="candidate:%s %d %s %d %s %d typ %s";return i+=null!=t.raddr?" raddr %s rport %d":"%v%v",i+=null!=t.tcptype?" tcptype %s":"%v",null!=t.generation&&(i+=" generation %d"),i+=null!=t["network-id"]?" network-id %d":"%v",i+=null!=t["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(t){var i="ssrc:%d";return null!=t.attribute&&(i+=" %s",null!=t.value&&(i+=":%s")),i}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(t){return null!=t.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(t){return t.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(t){return"imageattr:%s %s %s"+(t.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(t){return"simulcast:%s %s"+(t.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(t){return"ts-refclk:%s"+(null!=t.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(t){var i="mediaclk:";return i+=null!=t.id?"id=%s %s":"%v%s",i+=null!=t.mediaClockValue?"=%s":"",i+=null!=t.rateNumerator?" rate=%s":"",i+=null!=t.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};return k.keys(t).forEach(function(i){t[i].forEach(function(t){t.reg||(t.reg=/(.*)/),t.format||(t.format="%s")})}),ui.exports}function hi(){return bt||(bt=1,function(t){var i=function(t){return String(Number(t))===t?Number(t):t},n=function(t,n,r){var e=t.name&&t.names;t.push&&!n[t.push]?n[t.push]=[]:e&&!n[t.name]&&(n[t.name]={});var s=t.push?{}:e?n[t.name]:n;(function(t,n,r,e){if(e&&!r)n[e]=i(t[1]);else for(var s=0;s1&&(t[r[0]]=void 0),t};t.parseParams=function(t){return t.split(/;\s?/).reduce(s,{})},t.parseFmtpConfig=t.parseParams,t.parsePayloads=function(t){return t.toString().split(" ").map(Number)},t.parseRemoteCandidates=function(t){for(var n=[],r=t.split(" ").map(i),e=0;e=e)return t;var i=r[n];switch(n+=1,t){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}})},r=function(t,i,r){var e=[t+"="+(V(i.format,Function)?i.format(i.push?r:r[i.name]):i.format)];if(i.names)for(var s=0;s0?o-4:o;for(e=0;e>16&255,a[c++]=r>>8&255,a[c++]=255&r;return 2===h&&(r=i[t.charCodeAt(e)]<<2|i[t.charCodeAt(e+1)]>>4,a[c++]=255&r),1===h&&(r=i[t.charCodeAt(e)]<<10|i[t.charCodeAt(e+1)]<<4|i[t.charCodeAt(e+2)]>>2,a[c++]=r>>8&255,a[c++]=255&r),a},tn.fromByteArray=function(i){for(var n,r=i.length,e=r%3,s=[],u=16383,h=0,a=r-e;ha?a:h+u));return 1===e?(n=i[r-1],s.push(t[n>>2]+t[n<<4&63]+"==")):2===e&&(n=(i[r-2]<<8)+i[r-1],s.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+"=")),s.join("")};for(var t=[],i=[],n=(void 0===E?"undefined":W(E))<"u"?E:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)t[e]=r[e],i[r.charCodeAt(e)]=e;function s(t){var i=t.length;if(i%4>0)throw new y("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=i),[n,n===i?0:4-n%4]}function u(i){return t[i>>18&63]+t[i>>12&63]+t[i>>6&63]+t[63&i]}function o(t,i,n){for(var r,e=[],s=i;s>1,c=-7,f=n?e-1:0,v=n?-1:1,d=t[i+f];for(f+=v,s=d&(1<<-c)-1,d>>=-c,c+=o;c>0;s=256*s+t[i+f],f+=v,c-=8);for(u=s&(1<<-c)-1,s>>=-c,c+=r;c>0;u=256*u+t[i+f],f+=v,c-=8);if(0===s)s=1-a;else{if(s===h)return u?NaN:1/0*(d?-1:1);u+=b.pow(2,r),s-=a}return(d?-1:1)*u*b.pow(2,s-r)},nn.write=function(t,i,n,r,e,s){var u,o,h,a=8*s-e-1,c=(1<>1,v=23===e?b.pow(2,-24)-b.pow(2,-77):0,d=r?0:s-1,l=r?1:-1,w=i<0||0===i&&1/i<0?1:0;for(i=b.abs(i),S(i)||i===1/0?(o=S(i)?1:0,u=c):(u=b.floor(b.log(i)/b.LN2),i*(h=b.pow(2,-u))<1&&(u--,h*=2),(i+=u+f>=1?v/h:v*b.pow(2,1-f))*h>=2&&(u++,h/=2),u+f>=c?(o=0,u=c):u+f>=1?(o=(i*h-1)*b.pow(2,e),u+=f):(o=i*b.pow(2,f-1)*b.pow(2,e),u=0));e>=8;t[n+d]=255&o,d+=l,o/=256,e-=8);for(u=u<0;t[n+d]=255&u,d+=l,u/=256,a-=8);t[n+d-l]|=128*w}),nn),s="function"==typeof i&&"function"==typeof n?n("nodejs.util.inspect.custom"):null;t.Buffer=h,t.SlowBuffer=function(t){return+t!=t&&(t=0),h.alloc(+t)},t.INSPECT_MAX_BYTES=50;var u=2147483647;function o(t){if(t>u)throw new RangeError('The value "'+t+'" is invalid for option "size"');var i=new E(t);return k.setPrototypeOf(i,h.prototype),i}function h(t,i,n){if("number"==typeof t){if("string"==typeof i)throw new p('The "string" argument must be of type string. Received type number');return f(t)}return a(t,i,n)}function a(t,n,r){if("string"==typeof t)return function(t,i){if(("string"!=typeof i||""===i)&&(i="utf8"),!h.isEncoding(i))throw new p("Unknown encoding: "+i);var n=0|w(t,i),r=o(n),e=r.write(t,i);return e!==n&&(r=r.slice(0,e)),r}(t,n);if(ArrayBuffer.isView(t))return function(t){if(et(t,E)){var i=new E(t);return d(i.buffer,i.byteOffset,i.byteLength)}return v(t)}(t);if(null==t)throw new p("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":W(t)));if(et(t,ArrayBuffer)||t&&et(t.buffer,ArrayBuffer)||("undefined"==typeof SharedArrayBuffer?"undefined":W(SharedArrayBuffer))<"u"&&(et(t,SharedArrayBuffer)||t&&et(t.buffer,SharedArrayBuffer)))return d(t,n,r);if("number"==typeof t)throw new p('The "value" argument must not be of type number. Received type number');var e=t.valueOf&&t.valueOf();if(null!=e&&e!==t)return h.from(e,n,r);var s=function(t){if(h.isBuffer(t)){var i=0|l(t.length),n=o(i);return 0===n.length||t.copy(n,0,0,i),n}return void 0!==t.length?"number"!=typeof t.length||st(t.length)?o(0):v(t):"Buffer"===t.type&&Array.isArray(t.data)?v(t.data):void 0}(t);if(s)return s;if((void 0===i?"undefined":W(i))<"u"&&null!=i.toPrimitive&&"function"==typeof t[i.toPrimitive])return h.from(t[i.toPrimitive]("string"),n,r);throw new p("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":W(t)))}function c(t){if("number"!=typeof t)throw new p('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return c(t),o(t<0?0:0|l(t))}function v(t){for(var i=t.length<0?0:0|l(t.length),n=o(i),r=0;r=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return 0|t}function w(t,i){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||et(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new p('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(void 0===t?"undefined":W(t)));var n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var e=!1;;)switch(i){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return it(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return nt(t).length;default:if(e)return r?-1:it(t).length;i=(""+i).toLowerCase(),e=!0}}function g(t,i,n){var r=!1;if((void 0===i||i<0)&&(i=0),i>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0)||(n>>>=0)<=(i>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,i,n);case"utf8":case"utf-8":return x(this,i,n);case"ascii":return O(this,i,n);case"latin1":case"binary":return M(this,i,n);case"base64":return N(this,i,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,i,n);default:if(r)throw new p("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function _(t,i,n){var r=t[i];t[i]=t[n],t[n]=r}function m(t,i,n,r,e){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),st(n=+n)&&(n=e?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(e)return-1;n=t.length-1}else if(n<0){if(!e)return-1;n=0}if("string"==typeof i&&(i=h.from(i,r)),h.isBuffer(i))return 0===i.length?-1:T(t,i,n,r,e);if("number"==typeof i)return i&=255,"function"==typeof E.prototype.indexOf?e?E.prototype.indexOf.call(t,i,n):E.prototype.lastIndexOf.call(t,i,n):T(t,[i],n,r,e);throw new p("val must be string, number or Buffer")}function T(t,i,n,r,e){var s,u=1,o=t.length,h=i.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||i.length<2)return-1;u=2,o/=2,h/=2,n/=2}function a(t,i){return 1===u?t[i]:t.readUInt16BE(i*u)}if(e){var c=-1;for(s=n;so&&(n=o-h),s=n;s>=0;s--){for(var f=!0,v=0;ve&&(r=e):r=e;var s,u=i.length;for(r>u/2&&(r=u/2),s=0;s>8,e=n%256,s.push(e),s.push(r);return s}(i,t.length-n),t,n,r)}function N(t,i,n){return 0===i&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(i,n))}function x(t,i,n){n=b.min(t.length,n);for(var r=[],e=i;e239?4:s>223?3:s>191?2:1;if(e+o<=n){var h=void 0,a=void 0,c=void 0,f=void 0;switch(o){case 1:s<128&&(u=s);break;case 2:128==(192&(h=t[e+1]))&&(f=(31&s)<<6|63&h)>127&&(u=f);break;case 3:h=t[e+1],a=t[e+2],128==(192&h)&&128==(192&a)&&(f=(15&s)<<12|(63&h)<<6|63&a)>2047&&(f<55296||f>57343)&&(u=f);break;case 4:h=t[e+1],a=t[e+2],c=t[e+3],128==(192&h)&&128==(192&a)&&128==(192&c)&&(f=(15&s)<<18|(63&h)<<12|(63&a)<<6|63&c)>65535&&f<1114112&&(u=f)}}null===u?(u=65533,o=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),e+=o}return function(t){var i=t.length;if(i<=B)return String.fromCharCode.apply(String,t);for(var n="",r=0;rr.length?(h.isBuffer(s)||(s=h.from(s)),s.copy(r,e)):E.prototype.set.call(r,s,e);else{if(!h.isBuffer(s))throw new p('"list" argument must be an Array of Buffers');s.copy(r,e)}e+=s.length}return r},h.byteLength=w,h.prototype.mv=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;in&&(i+=" ... "),""},s&&(h.prototype[s]=h.prototype.inspect),h.prototype.compare=function(t,i,n,r,e){if(et(t,E)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw new p('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(void 0===t?"undefined":W(t)));if(void 0===i&&(i=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===e&&(e=this.length),i<0||n>t.length||r<0||e>this.length)throw new RangeError("out of range index");if(r>=e&&i>=n)return 0;if(r>=e)return-1;if(i>=n)return 1;if(this===t)return 0;for(var s=(e>>>=0)-(r>>>=0),u=(n>>>=0)-(i>>>=0),o=b.min(s,u),a=this.slice(r,e),c=t.slice(i,n),f=0;f>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var e=this.length-i;if((void 0===n||n>e)&&(n=e),t.length>0&&(n<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return I(this,t,i,n);case"utf8":case"utf-8":return R(this,t,i,n);case"ascii":case"latin1":case"binary":return C(this,t,i,n);case"base64":return P(this,t,i,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,i,n);default:if(s)throw new p("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this.yv||this,0)}};var B=4096;function O(t,i,n){var r="";n=b.min(t.length,n);for(var e=i;er)&&(n=r);for(var e="",s=i;sn)throw new RangeError("Trying to access beyond buffer length")}function H(t,i,n,r,e,s){if(!h.isBuffer(t))throw new p('"buffer" argument must be a Buffer instance');if(i>e||it.length)throw new RangeError("Index out of range")}function z(t,i,n,r,e){J(i,r,e,t,n,7);var s=Number(i&BigInt(4294967295));t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s;var u=Number(i>>BigInt(32)&BigInt(4294967295));return t[n++]=u,u>>=8,t[n++]=u,u>>=8,t[n++]=u,u>>=8,t[n++]=u,n}function X(t,i,n,r,e){J(i,r,e,t,n,7);var s=Number(i&BigInt(4294967295));t[n+7]=s,s>>=8,t[n+6]=s,s>>=8,t[n+5]=s,s>>=8,t[n+4]=s;var u=Number(i>>BigInt(32)&BigInt(4294967295));return t[n+3]=u,u>>=8,t[n+2]=u,u>>=8,t[n+1]=u,u>>=8,t[n]=u,n+8}function q(t,i,n,r,e,s){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function G(t,i,n,r,s){return i=+i,n>>>=0,s||q(t,0,n,4),e.write(t,i,n,r,23,4),n+4}function j(t,i,n,r,s){return i=+i,n>>>=0,s||q(t,0,n,8),e.write(t,i,n,r,52,8),n+8}h.prototype.slice=function(t,i){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(i=void 0===i?n:~~i)<0?(i+=n)<0&&(i=0):i>n&&(i=n),i>>=0,i>>>=0,n||U(t,i,this.length);for(var r=this[t],e=1,s=0;++s>>=0,i>>>=0,n||U(t,i,this.length);for(var r=this[t+--i],e=1;i>0&&(e*=256);)r+=this[t+--i]*e;return r},h.prototype.readUint8=h.prototype.readUInt8=function(t,i){return t>>>=0,i||U(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,i){return t>>>=0,i||U(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,i){return t>>>=0,i||U(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,i){return t>>>=0,i||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,i){return t>>>=0,i||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readBigUInt64LE=ot(function(t){Z(t>>>=0,"offset");var i=this[t],n=this[t+7];(void 0===i||void 0===n)&&$(t,this.length-8);var r=i+this[++t]*b.pow(2,8)+this[++t]*b.pow(2,16)+this[++t]*b.pow(2,24),e=this[++t]+this[++t]*b.pow(2,8)+this[++t]*b.pow(2,16)+n*b.pow(2,24);return BigInt(r)+(BigInt(e)<>>=0,"offset");var i=this[t],n=this[t+7];(void 0===i||void 0===n)&&$(t,this.length-8);var r=i*b.pow(2,24)+this[++t]*b.pow(2,16)+this[++t]*b.pow(2,8)+this[++t],e=this[++t]*b.pow(2,24)+this[++t]*b.pow(2,16)+this[++t]*b.pow(2,8)+n;return(BigInt(r)<>>=0,i>>>=0,n||U(t,i,this.length);for(var r=this[t],e=1,s=0;++s=(e*=128)&&(r-=b.pow(2,8*i)),r},h.prototype.readIntBE=function(t,i,n){t>>>=0,i>>>=0,n||U(t,i,this.length);for(var r=i,e=1,s=this[t+--r];r>0&&(e*=256);)s+=this[t+--r]*e;return s>=(e*=128)&&(s-=b.pow(2,8*i)),s},h.prototype.readInt8=function(t,i){return t>>>=0,i||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,i){t>>>=0,i||U(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt16BE=function(t,i){t>>>=0,i||U(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt32LE=function(t,i){return t>>>=0,i||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,i){return t>>>=0,i||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readBigInt64LE=ot(function(t){Z(t>>>=0,"offset");var i=this[t],n=this[t+7];(void 0===i||void 0===n)&&$(t,this.length-8);var r=this[t+4]+this[t+5]*b.pow(2,8)+this[t+6]*b.pow(2,16)+(n<<24);return(BigInt(r)<>>=0,"offset");var i=this[t],n=this[t+7];(void 0===i||void 0===n)&&$(t,this.length-8);var r=(i<<24)+this[++t]*b.pow(2,16)+this[++t]*b.pow(2,8)+this[++t];return(BigInt(r)<>>=0,i||U(t,4,this.length),e.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,i){return t>>>=0,i||U(t,4,this.length),e.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,i){return t>>>=0,i||U(t,8,this.length),e.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,i){return t>>>=0,i||U(t,8,this.length),e.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,i,n,r){t=+t,i>>>=0,n>>>=0,r||H(this,t,i,n,b.pow(2,8*n)-1,0);var e=1,s=0;for(this[i]=255&t;++s>>=0,n>>>=0,r||H(this,t,i,n,b.pow(2,8*n)-1,0);var e=n-1,s=1;for(this[i+e]=255&t;--e>=0&&(s*=256);)this[i+e]=t/s&255;return i+n},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,i,n){return t=+t,i>>>=0,n||H(this,t,i,1,255,0),this[i]=255&t,i+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,i,n){return t=+t,i>>>=0,n||H(this,t,i,2,65535,0),this[i]=255&t,this[i+1]=t>>>8,i+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,i,n){return t=+t,i>>>=0,n||H(this,t,i,2,65535,0),this[i]=t>>>8,this[i+1]=255&t,i+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,i,n){return t=+t,i>>>=0,n||H(this,t,i,4,4294967295,0),this[i+3]=t>>>24,this[i+2]=t>>>16,this[i+1]=t>>>8,this[i]=255&t,i+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,i,n){return t=+t,i>>>=0,n||H(this,t,i,4,4294967295,0),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=255&t,i+4},h.prototype.writeBigUInt64LE=ot(function(t,i){return void 0===i&&(i=0),z(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=ot(function(t,i){return void 0===i&&(i=0),X(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(t,i,n,r){if(t=+t,i>>>=0,!r){var e=b.pow(2,8*n-1);H(this,t,i,n,e-1,-e)}var s=0,u=1,o=0;for(this[i]=255&t;++s>>=0,!r){var e=b.pow(2,8*n-1);H(this,t,i,n,e-1,-e)}var s=n-1,u=1,o=0;for(this[i+s]=255&t;--s>=0&&(u*=256);)t<0&&0===o&&0!==this[i+s+1]&&(o=1),this[i+s]=(t/u|0)-o&255;return i+n},h.prototype.writeInt8=function(t,i,n){return t=+t,i>>>=0,n||H(this,t,i,1,127,-128),t<0&&(t=255+t+1),this[i]=255&t,i+1},h.prototype.writeInt16LE=function(t,i,n){return t=+t,i>>>=0,n||H(this,t,i,2,32767,-32768),this[i]=255&t,this[i+1]=t>>>8,i+2},h.prototype.writeInt16BE=function(t,i,n){return t=+t,i>>>=0,n||H(this,t,i,2,32767,-32768),this[i]=t>>>8,this[i+1]=255&t,i+2},h.prototype.writeInt32LE=function(t,i,n){return t=+t,i>>>=0,n||H(this,t,i,4,2147483647,-2147483648),this[i]=255&t,this[i+1]=t>>>8,this[i+2]=t>>>16,this[i+3]=t>>>24,i+4},h.prototype.writeInt32BE=function(t,i,n){return t=+t,i>>>=0,n||H(this,t,i,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=255&t,i+4},h.prototype.writeBigInt64LE=ot(function(t,i){return void 0===i&&(i=0),z(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=ot(function(t,i){return void 0===i&&(i=0),X(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeFloatLE=function(t,i,n){return G(this,t,i,!0,n)},h.prototype.writeFloatBE=function(t,i,n){return G(this,t,i,!1,n)},h.prototype.writeDoubleLE=function(t,i,n){return j(this,t,i,!0,n)},h.prototype.writeDoubleBE=function(t,i,n){return j(this,t,i,!1,n)},h.prototype.copy=function(t,i,n,r){if(!h.isBuffer(t))throw new p("argument should be a Buffer");if(n||(n=0),!r&&0!==r&&(r=this.length),i>=t.length&&(i=t.length),i||(i=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=i;s=r+4;n-=3)i="_".concat(t.slice(n-3,n)).concat(i);return"".concat(t.slice(0,n)).concat(i)}function J(t,i,n,r,e,s){if(t>n||t= 0".concat(o," and < 2").concat(o," ** ").concat(8*(s+1)).concat(o):">= -(2".concat(o," ** ").concat(8*(s+1)-1).concat(o,") and < 2 ** ")+"".concat(8*(s+1)-1).concat(o),new Q.ERR_OUT_OF_RANGE("value",u,t)}!function(t,i,n){Z(i,"offset"),(void 0===t[i]||void 0===t[i+n])&&$(i,t.length-(n+1))}(r,e,s)}function Z(t,i){if("number"!=typeof t)throw new Q.ERR_INVALID_ARG_TYPE(i,"number",t)}function $(t,i,n){throw b.floor(t)!==t?(Z(t,n),new Q.ERR_OUT_OF_RANGE("offset","an integer",t)):i<0?new Q.ERR_BUFFER_OUT_OF_BOUNDS:new Q.ERR_OUT_OF_RANGE("offset",">= 0 and <= ".concat(i),t)}Y("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Y("ERR_INVALID_ARG_TYPE",function(t,i){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(void 0===i?"undefined":W(i))},p),Y("ERR_OUT_OF_RANGE",function(t,i,n){var r='The value of "'.concat(t,'" is out of range.'),e=n;return Number.isInteger(n)&&b.abs(n)>b.pow(2,32)?e=K(String(n)):"bigint"==(void 0===n?"undefined":W(n))&&(e=String(n),(n>b.pow(BigInt(2),BigInt(32))||n<-b.pow(BigInt(2),BigInt(32)))&&(e=K(e)),e+="n"),r+=" It must be ".concat(i,". Received ").concat(e)},RangeError);var tt=/[^+/0-9A-Za-z-_]/g;function it(t,i){var n;i=i||1/0;for(var r=t.length,e=null,s=[],u=0;u55295&&n<57344){if(!e){if(n>56319){(i-=3)>-1&&s.push(239,191,189);continue}if(u+1===r){(i-=3)>-1&&s.push(239,191,189);continue}e=n;continue}if(n<56320){(i-=3)>-1&&s.push(239,191,189),e=n;continue}n=65536+(e-55296<<10|n-56320)}else e&&(i-=3)>-1&&s.push(239,191,189);if(e=null,n<128){if((i-=1)<0)break;s.push(n)}else if(n<2048){if((i-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((i-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new y("Invalid code point");if((i-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function nt(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(tt,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function rt(t,i,n,r){var e;for(e=0;e=i.length||e>=t.length);++e)i[e+n]=t[e];return e}function et(t,i){return V(t,i)||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===i.name}function st(t){return t!=t}var ut=function(){for(var t="0123456789abcdef",i=new Array(256),n=0;n<16;++n)for(var r=16*n,e=0;e<16;++e)i[r+e]=t[n]+t[e];return i}();function ot(t){return("undefined"==typeof BigInt?"undefined":W(BigInt))>"u"?ht:t}function ht(){throw new y("BigInt not supported")}}($i)),$i}function en(){if(ki)return Ji.exports;ki=1;var t=65536,i=(pi||(pi=1,function(t,i){var n=rn(),r=n.Buffer;function e(t,i){for(var n in t)i[n]=t[n]}function s(t,i,n){return r(t,i,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(e(n,i),i.Buffer=s),s.prototype=k.create(r.prototype),e(r,s),s.from=function(t,i,n){if("number"==typeof t)throw new p("Argument must not be a number");return r(t,i,n)},s.alloc=function(t,i,n){if("number"!=typeof t)throw new p("Argument must be a number");var e=r(t);return void 0!==i?"string"==typeof n?e.fill(i,n):e.fill(i):e.fill(0),e},s.allocUnsafe=function(t){if("number"!=typeof t)throw new p("Argument must be a number");return r(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new p("Argument must be a number");return n.SlowBuffer(t)}}(Zi,Zi.exports)),Zi.exports).Buffer,n=R.crypto||R.msCrypto;return n&&n.getRandomValues?Ji.exports=function(r,e){if(r>4294967295)throw new RangeError("requested too many random bytes");var s=i.allocUnsafe(r);if(r>0)if(r>t)for(var u=0;u0&&(o.bandwidth.push({type:"AS",limit:u.getBitrate()}),o.bandwidth.push({type:"TIAS",limit:1e3*u.getBitrate()}));for(var h,v=Lt(this.getCandidates());!(h=v()).done;){var d=h.value;o.candidates.push({foundation:d.getFoundation(),component:d.getComponentId(),transport:d.getTransport(),priority:d.getPriority(),ip:d.getAddress(),port:d.getPort(),type:d.getType(),raddr:d.getRelAddr(),rport:d.getRelPort()})}if(this.getICE()&&(o.iceUfrag=this.getICE().getUfrag(),o.icePwd=this.getICE().getPwd()),i("audio",u.getType())||i("video",u.getType())){o.rtcpMux="rtcp-mux",o.rtcpRsize="rtcp-rsize",this.getDTLS()?(o.protocol="UDP/TLS/RTP/SAVPF",o.fingerprint={type:this.getDTLS().getHash(),hash:this.getDTLS().getFingerprint()},o.setup=a.toString(this.getDTLS().getSetup())):this.getCrypto()?(o.protocol="RTP/SAVPF",o.crypto=[{id:this.getCrypto().getTag(),suite:this.getCrypto().getSuite(),config:this.getCrypto().getKeyParams()}]):o.protocol="RTP/AVP";for(var l,w=Lt(u.getCodecs().values());!(l=w()).done;){var g=l.value;i("video",u.getType())?o.rtp.push({payload:g.getType(),codec:g.getCodec().toUpperCase(),rate:9e4}):i("opus",g.getCodec())||i("multiopus",g.getCodec())?o.rtp.push({payload:g.getType(),codec:g.getCodec(),rate:48e3,encoding:g.getChannels()}):o.rtp.push({payload:g.getType(),codec:g.getCodec(),rate:8e3});for(var _,m=Lt(g.getRTCPFeedbacks());!(_=m()).done;){var y=_.value;o.rtcpFb.push({payload:g.getType(),type:y.getId(),subtype:y.getParams().join(" ")})}g.hasRTX()&&(o.rtp.push({payload:g.getRTX(),codec:"rtx",rate:9e4}),o.fmtp.push({payload:g.getRTX(),config:"apt="+g.getType()}));var p=g.getParams();if(k.keys(p).length){var b={payload:g.getType(),config:""};for(var A in p)b.config.length&&(b.config+=";"),k.hasOwnProperty.call(p,A)?b.config+=A+"="+p[A]:b.config+=A;o.fmtp.push(b)}}for(var T,S=[],E=Lt(o.rtp);!(T=E()).done;){var I=T.value;S.push(I.payload)}o.payloads=S.join(" ");for(var R,C=Lt(u.getExtensions().entries());!(R=C()).done;){var P=R.value,D=P[0],N=P[1];o.ext.push({value:D,uri:N})}for(var x,B=Lt(u.getRIDs().values());!(x=B()).done;){var O=x.value,M={id:O.getId(),direction:f.toString(O.getDirection()),params:""};O.getFormats().length&&(M.params="pt="+O.getFormats().join(","));for(var L,F=Lt(O.getParams().entries());!(L=F()).done;){var U=L.value,V=U[0],H=U[1];M.params+=(M.params.length?";":"")+V+"="+H}o.rids.push(M)}var W=u.getSimulcast();if(W){var z=1;o.simulcast={};var X=W.getSimulcastStreams(f.SEND),q=W.getSimulcastStreams(f.RECV);if(X&&X.length){for(var G,j="",Q=Lt(X);!(G=Q()).done;){for(var Y,K="",J=Lt(G.value);!(Y=J()).done;){var Z=Y.value;K+=(K.length?",":"")+(Z.isPaused()?"~":"")+Z.getId()}j+=(j.length?";":"")+K}o.simulcast["dir"+z]="send",o.simulcast["list"+z]=j,z++}if(q&&q.length){for(var $,tt="",it=Lt(q);!($=it()).done;){for(var nt,rt="",et=Lt($.value);!(nt=et()).done;){var st=nt.value;rt+=(rt.length?",":"")+(st.isPaused()?"~":"")+st.getId()}tt+=(tt.length?";":"")+rt}o.simulcast["dir"+z]="recv",o.simulcast["list"+z]=tt,z++}}}else if(u.hasDataChannel()){o.protocol="UDP/DTLS/SCTP",o.payloads="webrtc-datachannel";var ut=u.getDataChannel();o.sctpPort=ut.getPort(),o.maxMessageSize=ut.getMaxMessageSize()}n.media.push(o)}for(var ot,ht=Lt(this.streams.values());!(ot=ht()).done;)for(var at,ct=ot.value,ft=Lt(ct.getTracks().values());!(at=ft()).done;){var vt=at.value;for(var dt in n.media){var lt=n.media[dt];if(vt.getMediaId()){if(vt.getMediaId()==lt.mid){var wt=vt.getSourceGroups();for(var gt in wt){var _t=wt[gt];lt.ssrcGroups.push({semantics:_t.getSemantics(),ssrcs:_t.getSSRCs().join(" ")})}var mt=vt.getSSRCs();for(var yt in mt)lt.ssrcs.push({id:mt[yt],attribute:"cname",value:ct.getId()}),lt.ssrcs.push({id:mt[yt],attribute:"msid",value:ct.getId()+" "+vt.getId()});lt.msid=ct.getId()+" "+vt.getId();break}}else if(i(lt.type,vt.getMedia())){var pt=vt.getSourceGroups();for(var kt in pt){var bt=pt[kt];lt.ssrcGroups.push({semantics:bt.getSemantics(),ssrcs:bt.getSSRCs().join(" ")})}var At=vt.getSSRCs();for(var Tt in At)lt.ssrcs.push({id:At[Tt],attribute:"cname",value:ct.getId()}),lt.ssrcs.push({id:At[Tt],attribute:"msid",value:ct.getId()+" "+vt.getId()});break}}}var St={type:"BUNDLE",mids:e.join(" ")};return n.groups.push(St),t.write(n)},e.toIceFragmentString=function(){var i={version:0,media:[],candidates:[]};this.hasICE()&&this.getICE().isLite()&&(i.icelite="ice-lite"),this.getICE()&&(i.iceUfrag=this.getICE().getUfrag(),i.icePwd=this.getICE().getPwd());for(var n,r=Lt(this.getCandidates());!(n=r()).done;){var e=n.value;i.candidates.push({foundation:e.getFoundation(),component:e.getComponentId(),transport:e.getTransport(),priority:e.getPriority(),ip:e.getAddress(),port:e.getPort(),type:e.getType(),raddr:e.getRelAddr(),rport:e.getRelPort()})}return t.write(i).slice(10)},r}();return b.create=function(t){var i,r=new b;if(t.streams)for(var e,a=Lt(t.streams);!(e=a()).done;){var c=e.value;r.addStream(l.expand(c))}t.ice&&(V(t.ice,o)?r.setICE(t.ice.clone()):r.setICE(o.expand(t.ice))),t.dtls&&(V(t.dtls,s)?r.setDTLS(t.dtls):r.setDTLS(s.expand(t.dtls))),t.crypto&&(V(t.crypto,u)?r.setCrypto(t.crypto):r.setCrypto(u.expand(t.crypto)));for(var f,v=Lt(t.candidates||[]);!(f=v()).done;){var d=f.value;V(d,n)?r.addCandidate(d.clone()):r.addCandidate(n.expand(d))}for(var w,g=96,_=1,m=0,y=Lt(k.entries(t.capabilities||{}));!(w=y()).done;){var p=w.value,A=p[0],T=p[1];if(t.unified&&null!==(i=t.streams)&&void 0!==i&&i.length)for(var S,E=Lt(r.getTracksByMediaType(A));!(S=E()).done;){for(var I,R=S.value,C=h.create(R.getMediaId(),A,T),P=Lt(C.getCodecs());!(I=P()).done;){var D=I.value,N=(D[0],D[1]);N.getType()>=96&&N.setType(g++),N.getRTX()&&N.setRTX(g++)}if(T.extensions)for(var x,B=Lt(T.extensions);!(x=B()).done;){var O=x.value;15===_&&_++,C.addExtension(_++,O)}r.addMedia(C)}else{for(var M,L=h.create(t.unified?String(m++):A,A,T),F=Lt(L.getCodecs());!(M=F()).done;){var U=M.value,H=(U[0],U[1]);H.getType()>=96&&H.setType(g++),H.getRTX()&&H.setRTX(g++)}if(T.extensions)for(var W,z=Lt(T.extensions);!(W=z()).done;){var X=W.value;15===_&&_++,L.addExtension(_++,X)}r.addMedia(L)}}return r},b.expand=function(t){if("SDPInfo"===t.constructor.name)return t;for(var i,r=new b(t.version),e=Lt(t.medias||[]);!(i=e()).done;){var a=i.value,c=h.expand(a);c&&r.addMedia(c)}for(var f,v=Lt(t.streams||[]);!(f=v()).done;){var d=f.value,w=l.expand(d);w&&r.addStream(w)}for(var g,_=Lt(t.candidates||[]);!(g=_()).done;){var m=g.value,y=n.expand(m);y&&r.addCandidate(y)}return t.ice&&r.setICE(o.expand(t.ice)),t.dtls&&r.setDTLS(s.expand(t.dtls)),t.crypto&&r.setCrypto(u.expand(t.crypto)),t.extmapAllowMixedNotSupported&&(this.extmapAllowMixed=!t.extmapAllowMixedNotSupported),r},b.clone=function(t){return"SDPInfo"===t.constructor.name?t.clone():b.expand(t)},b.process=function(t){return b.parse(t)},b.parse=function(k){var T=t.parse(k),S=new b;if(S.setVersion(T.version),T.iceUfrag&&T.icePwd){var E=String(T.iceUfrag),I=String(T.icePwd),R=new o(E,I);R.setLite("ice-lite"==T.icelite),R.setEndOfCandidates("end-of-candidates"==T.endOfCandidates),S.setICE(R)}for(var C in T.media){var P=T.media[C],D=P.type,N=P.mid?P.mid.toString():C,x=new h(N,D);if(P.iceUfrag&&P.icePwd){var B=String(P.iceUfrag),O=String(P.icePwd),M=new o(B,O);M.setLite("ice-lite"==T.icelite),M.setEndOfCandidates("end-of-candidates"==P.endOfCandidates),S.setICE(M)}for(var L=0;P.candidates&&L1&&st.setChannels(Q.encoding),x.addCodec(st)}}}for(var ut,ot=Lt(G.entries());!(ut=ot()).done;){var ht=ut.value,at=x.getCodecForType(ht[0]);at&&at.setRTX(ht[1])}for(var ct=0;P.rtcpFb&&ct0?2===h.length?W(h[1])==e?this[h[0]]=h[1].call(this,c):this[h[0]]=h[1]:3===h.length?W(h[1])!==e||h[1].exec&&h[1].test?this[h[0]]=c?c.replace(h[1],h[2]):r:this[h[0]]=c?h[1].call(this,c,h[2]):r:4===h.length&&(this[h[0]]=c?h[3].call(this,c.replace(h[1],h[2])):r):this[h]=c||r;f+=2}},K=function(t,i){for(var n in i)if(W(i[n])===u&&i[n].length>0){for(var e=0;e2&&(t[a]="iPad",t[f]=_),t},this.getEngine=function(){var t={};return t[c]=r,t[d]=r,Y.call(t,m,p.engine),t},this.getOS=function(){var t={};return t[c]=r,t[d]=r,Y.call(t,m,p.os),k&&!t[c]&&y&&y.platform&&"Unknown"!=y.platform&&(t[c]=y.platform.replace(/chrome os/i,H).replace(/macos/i,z)),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return m},this.setUA=function(t){return m=(void 0===t?"undefined":W(t))===o&&t.length>500?Q(t,500):t,this},this.setUA(m),this};$.VERSION="0.7.39",$.BROWSER=q([c,d,h]),$.CPU=q([l]),$.DEVICE=q([a,v,f,w,g,m,_,y,p]),$.ENGINE=$.OS=q([c,d]),t.exports&&(i=t.exports=$),i.UAParser=$;var tt=(void 0===n?"undefined":W(n))!==s&&(n.jQuery||n.Zepto);if(tt&&!tt.ua){var it=new $;tt.ua=it.getResult(),tt.ua.get=function(){return it.getUA()},tt.ua.set=function(t){it.setUA(t);var i=it.getResult();for(var n in i)tt.ua[n]=i[n]}}}("object"==(void 0===f?"undefined":W(f))?f:bn)}(kn,kn.exports)),kn.exports),Tn=C(An),Sn=["iOS"],En=function(t){function i(){return t.call(this,f.navigator.userAgent)||this}Ct(i,t);var n=i.prototype;return n.isChromium=function(){return this.getUA().match(/Chrome/i)},n.isChrome=function(){var t=this.getBrowser();if(!t.name)return!1;var i,n=this.getOS();return i=!new RegExp(Sn.join("|"),"i").test(n.name),t.name.match(/Chrome/i)&&i},n.isFirefox=function(){var t=this.getBrowser();return!!t.name&&t.name.match(/Firefox/i)},n.isOpera=function(){var t=this.getBrowser();return!!t.name&&t.name.match(/Opera/i)},n.isSafari=function(){var t=this.getBrowser();return!!t.name&&t.name.match(/Safari/i)},i}(Tn),In=gt.get("SdpParser"),Rn=Array.from({length:31},function(t,i){return i+35}),Cn=Array.from({length:32},function(t,i){return i+96}),Pn=Array.from({length:14},function(t,i){return i+1}),Dn=Array.from({length:240},function(t,i){return i+16}),Nn={setSimulcast:function(t,i){if(In.info("Setting simulcast. Codec: ",i),!(new En).isChromium())return In.warn("Your browser does not appear to support Simulcast. For a better experience, use a Chromium based browser."),t;if("h264"!==i&&"vp8"!==i)return In.warn("Your selected codec ".concat(i," does not appear to support Simulcast. To broadcast using simulcast, please use H.264 or VP8.")),t;if(!/m=video/.test(t))return In.warn("There is no available video for simulcast to be enabled."),t;try{for(var n=new RegExp("m=video.*?a=ssrc:(\\d*) cname:(.+?)\\r\\n","s"),r=new RegExp("m=video.*?a=ssrc:(\\d*) msid:(.+?)\\r\\n","s"),e=n.exec(t),s=e[1],u=e[2],o=r.exec(t)[2],h=[s],a=0;a<2;++a){var c=100+2*a,f=c+1;h.push(c),t+="a=ssrc-group:FID "+c+" "+f+"\r\na=ssrc:"+c+" cname:"+u+"\r\na=ssrc:"+c+" msid:"+o+"\r\na=ssrc:"+f+" cname:"+u+"\r\na=ssrc:"+f+" msid:"+o+"\r\n"}return t+="a=ssrc-group:SIM "+h.join(" ")+"\r\n",In.info("Simulcast setted"),In.debug("Simulcast SDP: ",t),t}catch(t){throw In.error("Error setting SDP for simulcast: ",t),t}},setStereo:function(t){return In.info("Replacing SDP response for support stereo"),t=t.replace(/useinbandfec=1/g,"useinbandfec=1; stereo=1"),In.info("Replaced SDP response for support stereo"),In.debug("New SDP value: ",t),t},setDTX:function(t){return In.info("Replacing SDP response for support dtx"),t=t.replace("useinbandfec=1","useinbandfec=1; usedtx=1"),In.info("Replaced SDP response for support dtx"),In.debug("New SDP value: ",t),t},setAbsoluteCaptureTime:function(t){var i="a=extmap:"+Nn.getAvailableHeaderExtensionIdRange(t)[0]+" http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time\r\n";return t=t.replace(/(m=.*\r\n(?:.*\r\n)*?)(a=extmap.*\r\n)/gm,function(t,n,r){return n+i+r}),In.info("Replaced SDP response for setting absolute capture time"),In.debug("New SDP value: ",t),t},setDependencyDescriptor:function(t){var i="a=extmap:"+Nn.getAvailableHeaderExtensionIdRange(t)[0]+" https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension\r\n";return t=t.replace(/(m=.*\r\n(?:.*\r\n)*?)(a=extmap.*\r\n)/gm,function(t,n,r){return n+i+r}),In.info("Replaced SDP response for setting depency descriptor"),In.debug("New SDP value: ",t),t},setVideoBitrate:function(t,i){if(i<1)In.info("Remove bitrate restrictions"),t=t.replace(/b=AS:.*\r\n/,"").replace(/b=TIAS:.*\r\n/,"");else{var n=pn.SDPInfo.parse(t),r=n.getMedia("video");In.info("Setting video bitrate"),r.setBitrate(i),t=n.toString()}return t},removeSdpLine:function(t,i){return In.debug("SDP before trimming: ",t),t=t.split("\n").filter(function(t){return t.trim()!==i}).join("\n"),In.debug("SDP trimmed result: ",t),t},adaptCodecName:function(t,i,n){if(!t)return t;var r=new RegExp("".concat(i),"i");return t.replace(r,n)},setMultiopus:function(t,i){if(!(new En).isFirefox()&&(!i||xn(i)))if(t.includes("multiopus/48000/6"))In.info("Multiopus already setted");else{In.info("Setting multiopus");var n=/m=audio 9 UDP\/TLS\/RTP\/SAVPF (.*)\r\n/.exec(t)[0],r=Nn.getAvailablePayloadTypeRange(t)[0],e=n.replace("\r\n"," ")+r+"\r\na=rtpmap:"+r+" multiopus/48000/6\r\na=fmtp:"+r+" channel_mapping=0,4,1,2,3,5;coupled_streams=2;minptime=10;num_streams=4;useinbandfec=1\r\n";t=t.replace(n,e),In.info("Multiopus offer created"),In.debug("SDP parsed for multioups: ",t)}return t},getAvailablePayloadTypeRange:function(t){for(var i,n=function(){var t=i.value[1].split(" ").map(function(t){return A(t)});e=e.filter(function(i){return!t.includes(i)})},r=t.matchAll(/m=(?:.*) (?:.*) UDP\/TLS\/RTP\/SAVPF (.*)\r\n/gm),e=Cn.concat(Rn),s=Lt(r);!(i=s()).done;)n();return e},getAvailableHeaderExtensionIdRange:function(t){for(var i,n=function(){var t=i.value[1].split(" ").map(function(t){return A(t)});e=e.filter(function(i){return!t.includes(i)})},r=t.matchAll(/a=extmap:(\d+)(?:.*)\r\n/gm),e=Pn.concat(Dn),s=Lt(r);!(i=s()).done;)n();return e},renegotiate:function(t,i){for(var n,r=pn.SDPInfo.parse(t),e=pn.SDPInfo.parse(i),s=Lt(r.getMedias());!(n=s()).done;){var u=n.value,o=e.getMediaById(u.getId());if(!o){(o=new pn.MediaInfo(u.getId(),u.getType())).setDirection(pn.Direction.reverse(u.getDirection()));var h=e.getMedia(u.getType());if(h){o.setCodecs(h.getCodecs());for(var a,c=Lt(h.getExtensions());!(a=c()).done;){var f=a.value,v=f[0],d=f[1];o.addExtension(v,d)}}e.addMedia(o)}}return e.toString()},updateMissingVideoExtensions:function(t,i){var n,r=pn.SDPInfo.parse(t),e=null==(n=pn.SDPInfo.parse(i).getMediasByType("video")[0])?void 0:n.getExtensions();if(e||e.length){for(var s,u=function(){var i=s.value,n=i.getExtensions();e.forEach(function(r,e){if(!n.get(e)){var s=i.getId(),u="a=extmap:"+e+" "+r+"\r\n",o=new RegExp("(a=mid:"+s+"\r\n(?:.*\r\n)*?)","g");t=t.replace(o,function(t,i,n){return i+u})}})},o=Lt(r.getMediasByType("video"));!(s=o()).done;)u();return t}},getCodecPayloadType:function(t){for(var i,n={},r=Lt(t.matchAll(/a=rtpmap:(\d+) (\w+)\/\d+/g));!(i=r()).done;){var e=i.value;n[e[1]]=e[2]}return n}},xn=function(t){return t.getAudioTracks().some(function(t){return t.getSettings().channelCount>2})},Bn={VP8:"vp8",VP9:"vp9",H264:"h264",AV1:"av1",H265:"h265"},On={OPUS:"opus",MULTIOPUS:"multiopus"},Mn=gt.get("PeerConnection"),Ln="Publisher",Fn="Viewer",Un={track:"track",connectionStateChange:"connectionStateChange"},Vn={stereo:!1,mediaStream:null,codec:"h264",simulcast:!1,scalabilityMode:null,disableAudio:!1,disableVideo:!1,setSDPToPeer:!0},Hn=function(t){function i(){var i;return(i=t.call(this)||this).mode=null,i.sessionDescription=null,i.peer=null,i.peerConnectionStats=null,i.transceiverMap=new Map,i}Ct(i,t);var n=i.prototype;return n.createRTCPeer=function(){return Vt(function(t,i){return zt(this,function(n){return void 0===t&&(t={autoInitStats:!0,statsIntervalMs:1e3}),void 0===i&&(i=Fn),Mn.info("Creating new RTCPeerConnection"),Mn.debug("RTC configuration provided by user: ",t),this.peer=Xn(this,t),this.mode=i,t.autoInitStats&&this.initStats(t),[2]})}).apply(this,arguments)},n.getRTCPeer=function(){return Mn.info("Getting RTC Peer"),this.peer},n.closeRTCPeer=function(){return Vt(function(){var t;return zt(this,function(i){return Mn.info("Closing RTCPeerConnection"),null==(t=this.peer)||t.close(),this.peer=null,this.stopStats(),this.emit(Un.connectionStateChange,"closed"),[2]})}).call(this)},n.setRTCRemoteSDP=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:Mn.info("Setting RTC Remote SDP"),i={type:"answer",sdp:t},r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.peer.setRemoteDescription(i)];case 2:return r.sent(),Mn.info("RTC Remote SDP was set successfully."),Mn.debug("RTC Remote SDP new value: ",t),[3,4];case 3:throw n=r.sent(),Mn.error("Error while setting RTC Remote SDP: ",n),n;case 4:return[2]}})}).call(this)},n.getRTCLocalSDP=function(){return Vt(function(t){var i,n;return zt(this,function(r){switch(r.label){case 0:return void 0===t&&(t=Vn),Mn.info("Getting RTC Local SDP"),t=d(d({},Vn),t),Mn.debug("Options: ",t),(i=zn(t.mediaStream))?Kn(this.peer,i,t):Jn(this.peer,t),Mn.info("Creating peer offer"),[4,this.peer.createOffer()];case 1:return n=r.sent(),Mn.info("Peer offer created"),Mn.debug("Peer offer response: ",n.sdp),this.sessionDescription=n,t.disableAudio||(t.stereo&&(this.sessionDescription.sdp=Nn.setStereo(this.sessionDescription.sdp)),t.dtx&&(this.sessionDescription.sdp=Nn.setDTX(this.sessionDescription.sdp)),this.sessionDescription.sdp=Nn.setMultiopus(this.sessionDescription.sdp,i)),!t.disableVideo&&t.simulcast&&(this.sessionDescription.sdp=Nn.setSimulcast(this.sessionDescription.sdp,t.codec)),t.absCaptureTime&&(this.sessionDescription.sdp=Nn.setAbsoluteCaptureTime(this.sessionDescription.sdp)),t.dependencyDescriptor&&(this.sessionDescription.sdp=Nn.setDependencyDescriptor(this.sessionDescription.sdp)),t.setSDPToPeer?[4,this.peer.setLocalDescription(this.sessionDescription)]:[3,3];case 2:r.sent(),Mn.info("Peer local description set"),r.label=3;case 3:return[2,this.sessionDescription.sdp]}})}).apply(this,arguments)},n.addRemoteTrack=function(t,i){return Vt(function(){var n;return zt(this,function(r){return n=this,[2,new ut(function(r,e){try{var s=n.peer.addTransceiver(t,{direction:"recvonly",streams:i});n.transceiverMap.set(s,r)}catch(t){e(t)}})]})}).call(this)},n.updateBandwidthRestriction=function(t,i){if(this.mode===Fn)throw Mn.error("Viewer attempting to update bitrate, this is not allowed"),new y("It is not possible for a viewer to update the bitrate.");return Mn.info("Updating bandwidth restriction, bitrate value: ",i),Mn.debug("SDP value: ",t),Nn.setVideoBitrate(t,i)},n.updateBitrate=function(t){return void 0===t&&(t=0),Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(this.mode===Fn)throw Mn.error("Viewer attempting to update bitrate, this is not allowed"),new y("It is not possible for a viewer to update the bitrate.");if(!this.peer)throw Mn.error("Cannot update bitrate. No peer found."),new y("Cannot update bitrate. No peer found.");return Mn.info("Updating bitrate to value: ",t),i=this,[4,this.peer.createOffer()];case 1:return i.sessionDescription=r.sent(),[4,this.peer.setLocalDescription(this.sessionDescription)];case 2:return r.sent(),n=this.updateBandwidthRestriction(this.peer.remoteDescription.sdp,t),[4,this.setRTCRemoteSDP(n)];case 3:return r.sent(),Mn.info("Bitrate restrictions updated: ","".concat(t>0?t:"unlimited"," kbps")),[2]}})}).call(this)},n.getRTCPeerStatus=function(){if(Mn.info("Getting RTC peer status"),!this.peer)return null;var t=Zn(this.peer);return Mn.info("RTC peer status getted, value: ",t),t},n.replaceTrack=function(t){if(this.peer){var i=this.peer.getSenders().find(function(i){return i.track.kind===t.kind});i?i.replaceTrack(t):Mn.error("There is no ".concat(t.kind," track in active broadcast."))}else Mn.error("Could not change track if there is not an active connection.")},n.getTracks=function(){var t,i;return null==(i=null==(t=this.peer)?void 0:t.getSenders())?void 0:i.map(function(t){return t.track})},n.initStats=function(t){this.peerConnectionStats?Mn.warn("PeerConnection.initStats() has already been called. Automatic initialization occurs via View.connect(), Publish.connect() or this.createRTCPeer(). See options"):this.peer?(this.peerConnectionStats=new ii(this.peer,t),Kt(this.peerConnectionStats,this,[ti])):Mn.warn("Cannot init peer stats: RTCPeerConnection not initialized")},n.stopStats=function(){var t;null==(t=this.peerConnectionStats)||t.stop(),this.peerConnectionStats=null},i.getCapabilities=function(t){var i=new En,n=RTCRtpSender.getCapabilities(t);if(n){var r={},e=new RegExp("^video/(".concat(k.values(Bn).join("|"),")x?$"),"i");"audio"===t&&(e=new RegExp("^audio/(".concat(k.values(On).join("|"),")$"),"i"),i.isChrome()&&(r.multiopus={mimeType:"audio/multiopus",channels:6}));for(var s,u=Lt(n.codecs);!(s=u()).done;){var o=s.value,h=o.mimeType.match(e);if(h){var a=h[1].toLowerCase();if(r[a]=g(d({},r[a]),{mimeType:o.mimeType}),o.scalabilityModes){var c=r[a].scalabilityModes||[];c=[].concat(c,o.scalabilityModes),r[a].scalabilityModes=[].concat(new Set(c))}o.channels&&(r[a].channels=o.channels)}}n.codecs=k.keys(r).map(function(t){return d({codec:t},r[t])})}return n},i}(jt),Wn=function(t){return(null==t?void 0:t.getAudioTracks().length)<=1&&(null==t?void 0:t.getVideoTracks().length)<=1},zn=function(t){if(!t)return null;if(V(t,MediaStream)&&Wn(t))return t;if(!V(t,MediaStream)){Mn.info("Creating MediaStream to add received tracks.");for(var i,n=new MediaStream,r=Lt(t);!(i=r()).done;){var e=i.value;n.addTrack(e)}if(Wn(n))return n}throw Mn.error("MediaStream must have 1 audio track and 1 video track, or at least one of them."),new y("MediaStream must have 1 audio track and 1 video track, or at least one of them.")},Xn=function(t,i){var n=new RTCPeerConnection(i);return Yn(t,n),n};function qn(t){return Vt(function(){return zt(this,function(i){return[2,new ut(function(i){return w(i,t)})]})})()}var Gn,jn,Qn,Yn=function(t,i){i.ontrack=function(i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:if(Mn.info("New track from peer."),Mn.debug("Track event value: ",i),!(n=t.transceiverMap.get(i.transceiver)))return[3,5];r.label=1;case 1:return i.transceiver.mid?[3,4]:[4,qn(100)];case 2:r.sent(),r.label=3;case 3:return[3,1];case 4:n(i.transceiver),t.transceiverMap.delete(i.transceiver),r.label=5;case 5:return w(function(){t.emit(Un.track,i)},0),[2]}})})()},i.connectionState?i.onconnectionstatechange=function(n){Mn.info("Peer connection state change: ",i.connectionState),t.emit(Un.connectionStateChange,i.connectionState)}:i.oniceconnectionstatechange=function(n){Mn.info("Peer ICE connection state change: ",i.iceConnectionState),t.emit(Un.connectionStateChange,i.iceConnectionState)},i.onnegotiationneeded=function(t){return Vt(function(){var t,n;return zt(this,function(r){switch(r.label){case 0:return i.remoteDescription?(Mn.info("Peer onnegotiationneeded, updating local description"),[4,i.createOffer()]):[2];case 1:return t=r.sent(),Mn.info("Peer onnegotiationneeded, got local offer",t.sdp),t.sdp=Nn.updateMissingVideoExtensions(t.sdp,i.remoteDescription.sdp),[4,i.setLocalDescription(t)];case 2:return r.sent(),n=Nn.renegotiate(t.sdp,i.remoteDescription.sdp),Mn.info("Peer onnegotiationneeded, updating remote description",n),[4,i.setRemoteDescription({type:"answer",sdp:n})];case 3:return r.sent(),Mn.info("Peer onnegotiationneeded, renegotiation done"),[2]}})})()}},Kn=function(t,i,n){Mn.info("Adding mediaStream tracks to RTCPeerConnection");for(var r,e=Lt(i.getTracks());!(r=e()).done;){var s=r.value,u={streams:[i]};"audio"===s.kind&&(u.direction=n.disableAudio?"inactive":"sendonly"),"video"===s.kind&&(u.direction=n.disableVideo?"inactive":"sendonly",n.scalabilityMode&&(new En).isChrome()?(Mn.debug("Video track with scalability mode: ".concat(n.scalabilityMode,".")),u.sendEncodings=[{scalabilityMode:n.scalabilityMode}]):n.scalabilityMode&&Mn.warn("SVC is only supported in Google Chrome")),t.addTransceiver(s,u),Mn.info("Track '".concat(s.label,"' added: "),"id: ".concat(s.id),"kind: ".concat(s.kind))}},Jn=function(t,i){var n=new En;if(!i.disableVideo){var r=t.addTransceiver("video",{direction:"recvonly"});n.isOpera()&&r.setCodecPreferences(RTCRtpReceiver.getCapabilities("video").codecs.filter(function(t){return"video/H264"!==t.mimeType||t.sdpFmtpLine.includes("profile-level-id=4")}))}i.disableAudio||t.addTransceiver("audio",{direction:"recvonly"});for(var e=0;e0&&-1===d.indexOf(v.codec))throw ir.error("Unsupported codec ".concat(v.codec,". Possible values are: "),d),new y("Unsupported codec ".concat(v.codec,". Possible values are: ").concat(d));if(v.codec===Bn.AV1&&(t=Nn.adaptCodecName(t,"AV1X",Bn.AV1)),w={name:this.streamName,sdp:t,codec:v.codec,sourceId:v.sourceId},v.priority){if(!(Number.isInteger(v.priority)&&v.priority>=-2147483648&&v.priority<=2147483647))throw new y("Invalid value for priority option. It should be a decimal integer between the range [-2^31, +2^31 - 1]");w.priority=v.priority}null!==v.record&&(w.record=v.record),Array.isArray(v.events)&&(w.events=v.events),p.label=1;case 1:if(p.trys.push([1,4,,5]),v.disableVideo&&v.disableAudio)throw new y("Not attempting to connect as video and audio are disabled");return[4,this.connect()];case 2:return p.sent(),ir.info("Sending publish command"),[4,this.transactionManager.cmd("publish",w)];case 3:return g=p.sent(),v.codec===Bn.AV1&&(_=null==(f=null==(c=null==(a=null==(h=RTCRtpSender.getCapabilities)?void 0:h.call(RTCRtpSender,"video"))?void 0:a.codecs)?void 0:c.find)?void 0:f.call(c,function(t){return"video/AV1X"===t.mimeType}),g.sdp=_?Nn.adaptCodecName(g.sdp,Bn.AV1,"AV1X"):g.sdp),[2,(ir.info("Command sent, publisherId: ",g.publisherId),ir.debug("Command result: ",g),this.serverId=g.publisherId,this.clusterId=g.clusterId,Y(this.streamName),K(this.serverId),Z(g.feedId),nt(this.clusterId),g.sdp)];case 4:throw m=p.sent(),ir.error("Error sending publish command, error: ",m),m;case 5:return[2]}})}).call(this)},n.cmd=function(t,i){return Vt(function(){return zt(this,function(n){return[2,(ir.info("Sending cmd: ".concat(t)),this.transactionManager.cmd(t,i))]})}).call(this)},i}(jt),or=function(t,i,n){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===k.keys(r).length&&(r={vad:t,pinnedSourceId:i,excludedSourceIds:n}),r},hr=function(t,i,n){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===k.keys(r).length&&(r={codec:null!=t?t:Bn.H264,record:i,sourceId:n}),r},ar=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).name="FetchError",r.status=n,r}return Ct(i,t),i}(ei(y)),cr=gt.get("Director"),fr="WebRtc",vr="",dr="https://director.millicast.com",lr={setEndpoint:function(t){dr=t.replace(/\/$/,"")},getEndpoint:function(){return dr},setLiveDomain:function(t){vr=t.replace(/\/$/,"")},getLiveDomain:function(){return vr},getPublisher:function(t,i,n){return void 0===i&&(i=null),void 0===n&&(n=fr),Vt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:r=wr(t,i,n),cr.info("Getting publisher connection path for stream name: ",r.streamName),e={streamName:r.streamName,streamType:r.streamType},s={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.token)},u="".concat(lr.getEndpoint(),"/api/director/publish"),c.label=1;case 1:return c.trys.push([1,4,,5]),[4,fetch(u,{method:"POST",headers:s,body:JSON.stringify(e)})];case 2:return[4,(o=c.sent()).json()];case 3:if("fail"===(h=c.sent()).status)throw new ar(h.data.message,o.status);return[2,(h=_r(h),cr.debug("Getting publisher response: ",h),Q(h.data.streamAccountId),h.data)];case 4:throw a=c.sent(),cr.error("Error while getting publisher connection path. ",a),a;case 5:return[2]}})})()},getSubscriber:function(t,i,n){return void 0===i&&(i=null),void 0===n&&(n=null),Vt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:r=gr(t,i,n),Q(r.streamAccountId),cr.info("Getting subscriber connection data for stream name: ".concat(r.streamName," and account id: ").concat(r.streamAccountId)),e={streamAccountId:r.streamAccountId,streamName:r.streamName},s={"Content-Type":"application/json"},r.subscriberToken&&(s=g(d({},s),{Authorization:"Bearer ".concat(r.subscriberToken)})),u="".concat(lr.getEndpoint(),"/api/director/subscribe"),c.label=1;case 1:return c.trys.push([1,4,,5]),[4,fetch(u,{method:"POST",headers:s,body:JSON.stringify(e)})];case 2:return[4,(o=c.sent()).json()];case 3:if("fail"===(h=c.sent()).status)throw new ar(h.data.message,o.status);return[2,(h=_r(h),cr.debug("Getting subscriber response: ",h),r.subscriberToken&&(h.data.subscriberToken=r.subscriberToken),h.data)];case 4:throw a=c.sent(),cr.error("Error while getting subscriber connection path. ",a),a;case 5:return[2]}})})()}},wr=function(t,i,n){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===k.keys(r).length&&(r={token:t,streamName:i,streamType:n}),r},gr=function(t,i,n){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===k.keys(r).length&&(r={streamName:t,streamAccountId:i,subscriberToken:n}),r},_r=function(t){if(lr.getLiveDomain()){var i=/\/\/(.*?)\//,n=t.data.urls.map(function(t){var n=i.exec(t);return t.replace(n[1],lr.getLiveDomain())});t.data.urls=n}if(t.data.drmObject){var r=t.data.drmObject.playReadyUrl;r&&(t.data.drmObject.playReadyUrl="".concat(lr.getEndpoint()).concat(r));var e=t.data.drmObject.widevineUrl;e&&(t.data.drmObject.widevineUrl="".concat(lr.getEndpoint()).concat(e));var s=t.data.drmObject.fairPlayUrl;s&&(t.data.drmObject.fairPlayUrl="".concat(lr.getEndpoint()).concat(s));var u=t.data.drmObject.fairPlayCertUrl;u&&(t.data.drmObject.fairPlayCertUrl="".concat(lr.getEndpoint()).concat(u))}return t};function mr(t){this.message=t}mr.prototype=new y,mr.prototype.name="InvalidCharacterError";var yr=(void 0===f?"undefined":W(f))<"u"&&f.atob&&f.atob.bind(f)||function(t){var i=String(t).replace(/=+$/,"");if(i.length%4==1)throw new mr("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,e=0,s=0,u="";r=i.charAt(s++);~r&&(n=e%4?64*n+r:r,e++%4)?u+=String.fromCharCode(255&n>>(-2*e&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return u};function pr(t){this.message=t}function kr(t,i){if("string"!=typeof t)throw new pr("Invalid token specified");var n=!0===(i=i||{}).header?0:1;try{return JSON.parse(function(t){var i=t.replace(/-/g,"+").replace(/_/g,"/");switch(i.length%4){case 0:break;case 2:i+="==";break;case 3:i+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(yr(i).replace(/(.)/g,function(t,i){var n=i.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(t){return yr(i)}}(t.split(".")[n]))}catch(t){throw new pr("Invalid token specified: "+t.message)}}pr.prototype=new y,pr.prototype.name="InvalidTokenError";var br,Ar={exports:{}},Tr=(br||(br=1,function(t,i){!function(n){if(null!=i&&"number"!=typeof i.nodeType)t.exports=n();else{var r=n(),e=("undefined"==typeof self?"undefined":W(self))<"u"?self:$.global;"function"!=typeof e.btoa&&(e.btoa=r.btoa),"function"!=typeof e.atob&&(e.atob=r.atob)}}(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(t){this.message=t}return i.prototype=new y,i.prototype.name="InvalidCharacterError",{btoa:function(n){for(var r,e,s,u,o=String(n),h=0,a="";h255||e>255||s>255)throw new i("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");a+=t.charAt((u=r<<16|e<<8|s)>>18&63)+t.charAt(u>>12&63)+t.charAt(u>>6&63)+t.charAt(63&u)}switch(o.length%3){case 0:return a;case 1:return a.slice(0,-2)+"==";case 2:return a.slice(0,-1)+"="}},atob:function(n){var r=String(n).replace(/[=]+$/,"");if(r.length%4==1)throw new i("'atob' failed: The string to be decoded is not correctly encoded.");for(var e,s,u=0,o=0,h="";s=r.charAt(o++);~s&&(e=u%4?64*e+s:s,u++%4)?h+=String.fromCharCode(255&e>>(-2*u&6)):0)s=t.indexOf(s);return h}}})}(Ar,Ar.exports)),Ar.exports);function Sr(t){var i,n,r;return{lang:null!=(i=null==t?void 0:t.lang)?i:void 0,message:null==t?void 0:t.message,abortEarly:null!=(n=null==t?void 0:t.abortEarly)?n:void 0,abortPipeEarly:null!=(r=null==t?void 0:t.abortPipeEarly)?r:void 0}}function Er(t){var i,n,r,e=void 0===t?"undefined":W(t);return"string"===e?'"'.concat(t,'"'):"number"===e||"bigint"===e||"boolean"===e?"".concat(t):"object"===e||"function"===e?null!=(r=t&&(null==(n=null==(i=k.getPrototypeOf(t))?void 0:i.constructor)?void 0:n.name))?r:"null":e}function Ir(t,i,n,r,e){var s,u,o,h,a,c,f,v,d=e&&"input"in e?e.input:n.value,l=null!=(u=null!=(s=null==e?void 0:e.expected)?s:t.expects)?u:null,w=null!=(o=null==e?void 0:e.received)?o:Er(d),g={kind:t.kind,type:t.type,input:d,expected:l,received:w,message:"Invalid ".concat(i,": ").concat(l?"Expected ".concat(l," but r"):"R","eceived ").concat(w),requirement:t.requirement,path:null==e?void 0:e.path,issues:null==e?void 0:e.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},_="schema"===t.kind,m=null!=(v=null!=(f=null!=(c=null!=(a=null!=(h=null==e?void 0:e.message)?h:t.message)?a:function(t,i){var n;return null==(n=void 0)?void 0:n.get(i)}(t.reference,g.lang))?c:_?void g.lang:null)?f:r.message)?v:void g.lang;void 0!==m&&(g.message="function"==typeof m?m(g):m),_&&(n.typed=!1),n.issues?n.issues.push(g):n.issues=[g]}function Rr(t){return{version:1,vendor:"valibot",validate:function(i){return t["~run"]({value:i},Sr())}}}function Cr(t,i){return k.hasOwn(t,i)&&"__proto__"!==i&&"prototype"!==i&&"constructor"!==i}function Pr(t,i){var n,r=[].concat(new Set(t));return r.length>1?"(".concat(r.join(" ".concat(i," ")),")"):null!=(n=r[0])?n:"never"}var Dr,Nr=function(t){function i(i){var n;return(n=t.call(this,i[0].message)||this).name="ValiError",n.issues=i,n}return Ct(i,t),i}(ei(y));function xr(t,i,n){return"function"==typeof t.fallback?t.fallback(i,n):t.fallback}function Br(t,i,n){return"function"==typeof t.default?t.default(i,n):t.default}function Or(t,i){return{kind:"schema",type:"array",reference:Or,expects:"Array",async:!1,item:t,message:i,get"~standard"(){return Rr(this)},"~run":function(t,i){var n,r=t.value;if(Array.isArray(r)){t.typed=!0,t.value=[];for(var e=0;e0&&(g=a.updateBandwidthRestriction(g,this.options.bandwidth)),[4,a.setRTCRemoteSDP(g)];case 8:return m.sent(),$r.info("Broadcasting to streamName: ",this.streamName),_=this.webRTCPeer,this.webRTCPeer=a,this.setReconnect(),t.migrate&&this.webRTCPeer.on(Un.connectionStateChange,function(t){var i,n;["connected","disconnected","failed","closed"].includes(t)&&(null==(i=null==d?void 0:d.close)||i.call(d),null==(n=null==_?void 0:_.closeRTCPeer)||n.call(_),d=_=null)}),[2]}})}).call(this)},n.sendMetadata=function(t,i){var n;if(void 0===i&&(i="d40e38ea-d419-4c62-94ed-20ac37b4e4fa"),null!=(n=this.options)&&n.metadata&&this.worker)this.worker.postMessage({action:"metadata-sei-user-data-unregistered",uuid:i,payload:t});else{var r="Could not send metadata due to:";this.options?this.options.metadata?this.worker||(r+="\n- Stream not being published."):(r+="\n- Metadata option is not enabled.",this.options.codec!==Bn.H264&&(r+="\n- Incompatible codec. Only H264 available."),this.options.disableVideo&&(r+="\n- Video disabled.")):r+="\n- Stream not being published.",$r.warn(r)}},i}(qr),ne=function(t){var i=function(t,i,n){var r=t["~run"]({value:i},Sr(n));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}(Zr=Zr||Lr({sourceId:Fr(Hr()),stereo:Fr(Mr()),dtx:Fr(Mr()),absCaptureTime:Fr(Mr()),dependencyDescriptor:Fr(Mr()),mediaStream:Fr(zr([Or(Xr()),Xr()])),bandwidth:Fr(Ur()),metadata:Fr(Mr()),disableVideo:Fr(Mr()),disableAudio:Fr(Mr()),codec:Fr(Vr(k.values(Bn))),simulcast:Fr(Mr()),scalabilityMode:Fr(Hr()),peerConfig:Fr(Lr({autoInitStats:Fr(Mr()),statsIntervalMs:Fr(Ur())})),record:Fr(Mr()),events:Fr(Or(Vr(["active","inactive","viewercount"]))),priority:Fr(Ur())}),t),n=i.success,r=i.issues;n||$r.warn(new Nr(r),t)};function re(t){if(!t)return new E;for(var i=t.length,n=new E(i/2),r=0;r=4&&(r=console)[e(323)].apply(r,[].concat([this[e(310)]],i))},i[ye(331)]=function(){for(var t=arguments.length,i=new Array(t),n=0;n=3&&(r=console)[e(331)].apply(r,[].concat([this[e(310)]],i))},i[ye(320)]=function(){for(var t=arguments.length,i=new Array(t),n=0;n=2&&(r=console)[e(320)].apply(r,[].concat([this[e(310)]],i))},i.error=function(){for(var t=arguments.length,i=new Array(t),n=0;n=1&&(r=console).error.apply(r,[].concat([this.tag],i))},t}();function be(t){return new ke(t)}var Ae={logLevel:3,mediaDumps:{video:{in:{durationMs:0,delimited:!0},out:{durationMs:0}},audio:{in:{durationMs:0},out:{durationMs:0}}}};function Te(){return(new Date)[ye(317)]().slice(11,-1)}function Se(){var t=["mediaBuffer","click","529321KfbOwo","endTimestampMs","28972188cmcnxe","containerFileExt","info","4ZlZeJQ","9kyfNFe","mediaType","172953TzXwsI","byteLength","1327806tybvjI","href","createObjectURL","1089qysnCz","112088WLFXHK","substring","tag","692993ZcAeLj","set","download","810qiScYX","startTimestampMs","8821555KArxhe","toISOString","application/octet-stream","logLevel","warn","revokeObjectURL","42PDuKrJ","debug","targetDurationMs"];return(Se=function(){return t})()}var Ee=function(){function t(t,i,n){var r=ye;this[r(325)]=null,this[r(315)]=-1,this.endTimestampMs=-1,this[r(301)]=t,this[r(330)]=i,this[r(324)]=n,n>0&&(this[r(325)]=new E)}return t.prototype.append=function(t,i){var n,r,e,s,u=ye;if(!this[u(325)])return!1;if(this[u(325)]=(n=this[u(325)],r=t,(s=new E((0|n[(e=ye)(303)])+(0|r.byteLength)))[e(312)](n,0),s[e(312)](r,0|n.byteLength),s),void 0!==i)if(-1===this[u(315)])this.startTimestampMs=i,this[u(328)]=i+this[u(324)];else if(i>=this[u(328)]){var o=(new Date)[u(317)]()[u(309)](0,19).replace(/:/g,"-"),h=this.mediaType+"-"+o+"."+this.containerFileExt;return function(t,i,n){void 0===n&&(n=ye(318));var r=ye,e=v.createElement("a"),s=new Blob([t],{type:n});e.href=URL[r(306)](s),e[r(313)]=i,e[r(326)](),URL[r(321)](e[r(305)])}(this[u(325)],h),this.mediaBuffer=null,!1}return!0},t}(),Ie=De;!function(){for(var t=De,i=Xe();;)try{if(A(t(160))/1+-A(t(363))/2+-A(t(321))/3*(-A(t(401))/4)+A(t(229))/5+-A(t(276))/6+A(t(400))/7*(-A(t(153))/8)+-A(t(223))/9==858456)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var Re=be("[MUX]"),Ce=me[Ie(387)];function Pe(t,i){var n=Ie,r=new E((0|t[n(413)])+(0|i[n(413)]));return r.set(t,0),r[n(251)](i,0|t[n(413)]),r}function De(t,i){var n=Xe();return(De=function(t,i){return n[t-=147]})(t,i)}function Ne(t,i,n){return void 0===i&&(i=0),void 0===n&&(n=1/0),function(t,i,n,r){var e=Ie,s=r[e(425)]||1;i*=s,n*=s;var u,o=V(u=t,ArrayBuffer)?u:u[Ie(366)],h=(t[e(188)]||0)+t[e(413)],a=(t[e(188)]||0)+i,c=b[e(177)](0,b[e(291)](a,h)),f=b[e(291)](c+b[e(177)](n,0),h);return new r(o,c/=s,(f/=s)-c)}(t,i,n,E)}function xe(t){var i=Ie,n=Array.from(t)[i(238)](function(t){return t[i(384)](0)});return new E(n)}var Be=function(t,i,n,r,e,s,u,o,h,a,c,f,v,d,l){function w(t){var i=Ie;this[i(452)]=t,this[i(402)]=(96&this[i(452)][0])>>5,this[i(186)]=31&this[i(452)][0],this.isvcl=1==this[i(186)]||5==this[i(186)],this[i(309)]="",this.isfmb=!1}var g=w.prototype;return g[o]=function(){var t=Ie;return w[t(234)](this)+": NRI: "+this[t(209)]()},g[h]=function(){return this[Ie(402)]},g[a]=function(){return this[Ie(186)]},g[c]=function(){return this[Ie(186)]===w.IDR},g[f]=function(){return this[Ie(452)]},g[v]=function(){return this[Ie(452)].byteLength},g[d]=function(){return 4+this[Ie(327)]()},g[l]=function(){var t=Ie,i=new E(this[t(194)]());return new DataView(i[t(366)]).setUint32(0,this[t(194)]()-4),i[t(251)](this.getPayload(),4),i},w[u]=function(t){var i=Ie;return t[i(186)]in w[i(159)]?w[i(159)][t.ntype]:i(344)},Nt(w,null,[{key:t,get:function(){return 1}},{key:i,get:function(){return 5}},{key:"SEI",get:function(){return 6}},{key:n,get:function(){return 7}},{key:r,get:function(){return 8}},{key:e,get:function(){return 9}},{key:s,get:function(){var t,i=Ie;return(t={})[w[i(427)]]=i(427),t[w[i(273)]]=i(273),t[w[i(324)]]=i(324),t[w.PPS]="PPS",t[w[i(449)]]="NDR",t[w.AUD]=i(272),t}}]),w}(Ie(449),Ie(427),Ie(324),Ie(379),Ie(272),Ie(159),Ie(234),Ie(365),Ie(209),Ie(234),Ie(306),Ie(203),Ie(327),Ie(194),Ie(341)),Oe=function(){function t(t){var i=Ie;this[i(316)]=t,this[i(368)]=0,this[i(157)]=8*t.byteLength}var i=t.prototype;return i[Ie(433)]=function(t){var i=Ie;this.data=t,this[i(368)]=0,this.bitLength=8*t[i(413)]},i.skipBits=function(t){var i=Ie;if(this[i(451)]>>e,u=8-e;if(u>=t)return n&&(this[r(368)]+=t),s>>u-t;n&&(this[r(368)]+=u);var o=t-u;return s<>>1:-1*(t>>>1)},i[Ie(239)]=function(){return 1===this[Ie(338)](1)},i[Ie(419)]=function(t){return void 0===t&&(t=1),this.readBits(8*t)},i[Ie(232)]=function(){return this.readBits(16)},i.readUInt=function(){return this[Ie(338)](32)},Nt(t,[{key:Ie(451),get:function(){return this[Ie(157)]-this.index}}]),t}(),Me=function(t,i,n,r,e,s,u){function o(t){var i=Ie;this.remuxer=t,this[i(233)]=t.mp4track}var h=o.prototype;return h[e]=function(t){var i=Ie,n=o[i(432)](new E(t));this.track[i(237)]=n.width,this[i(233)].height=n.height,this.track[i(382)]=[new E(t)],this.track[i(210)]=i(292);for(var r=new DataView(t.buffer,t[i(188)]+1,4),e=0;e<3;++e){var s=r[i(313)](e)[i(365)](16);s[i(268)]<2&&(s="0"+s),this.track[i(210)]+=s}},h[s]=function(t){var i=Ie;this[i(233)][i(434)]=[new E(t)]},h[u]=function(t){var i=Ie;if(!t)return!1;var n=!1;switch(t[i(234)]()){case Be[i(427)]:case Be.NDR:n=!0;break;case Be[i(379)]:!this[i(233)][i(434)]&&(this[i(345)](t.getPayload()),!this[i(175)][i(296)]&&this[i(233)][i(434)]&&this.track[i(382)]&&(this.remuxer[i(296)]=!0)),n=!0;break;case Be[i(324)]:!this.track.sps&&(this[i(256)](t[i(203)]()),!this[i(175)][i(296)]&&this[i(233)].pps&&this[i(233)][i(382)]&&(this.remuxer[i(296)]=!0)),n=!0;break;case Be[i(272)]:break;case Be.SEI:n=!0}return n},o[t]=function(t,i){for(var n=Ie,r=[],e=!1,s=!1,u=!1,o=!1,h=0,a=0,c=0,f=[];h<=t.byteLength;){if(h1&&(c=a>2?4:3,f.push(h)),a=0):++a}else c=0,f.push(h++);if(f.length>1){var d=f.shift(),l=f[0]-c;if(d1&&3===y&&(a=0,y=t[h++]),0!==y?a=0:++a,_[m++]=y}r.push(_.subarray(0,m))}}}}var p=!0,k=!1;return s||e?s&&e&&(Re[n(265)](n(331)),p=!1):(Re[n(265)]("[H264Parser] No VCL NALUs found"),p=!1),e&&(u&&o?k=!0:Re.warn(n(158))),{valid:p,idr:k,nalus:r}},o[i]=function(t,i){for(var n=8,r=8,e=0;e0&&y[1]>0&&(l=y[0]/y[1])}a.readBoolean()&&a[h(155)](1),a[h(239)]()&&(a[h(155)](4),a[h(239)]()&&a[h(155)](24)),a[h(239)]()&&(a[h(334)](),a[h(334)]()),a.readBoolean()&&(a.readUInt(),a[h(187)](),a.readBoolean())}return{width:b[h(440)]((16*(r+1)-2*c-2*f)*l),height:(2-s)*(e+1)*16-(s?2:4)*(v+d)}},o[r]=function(t){var i=Ie,n=new Oe(t[i(203)]());n[i(419)](),t[i(196)]=0===n[i(179)](),t[i(309)]=n[i(179)]()},o}(Ie(267),Ie(333),Ie(432),Ie(386),Ie(256),Ie(345),Ie(378)),Le=function(){function t(t){var i=Ie;this.listener={},this[i(234)]=""|t}var i=t.prototype;return i.on=function(t,i){var n=Ie;return!this[n(270)][t]&&(this.listener[t]=[]),this[n(270)][t].push(i),!0},i.off=function(t,i){var n=Ie;if(this[n(270)][t]){var r=this[n(270)][t].indexOf(i);return r>-1&&this[n(270)][t][n(369)](r,1),!0}return!1},i[Ie(219)]=function(){this.listener={}},i[Ie(225)]=function(t,i){var n=Ie;return!!this[n(270)][t]&&(this[n(270)][t].map(function(t){t[n(200)](null,[i])}),!0)},t}(),Fe=function(){function t(i){var n,r,e=Ie;for(var s in this[e(285)]=i,this.saiIvSize={video:"cenc"===(null==(n=i.config[e(415)])?void 0:n[e(201)])?16:0,audio:"cenc"===(null==(r=i[e(154)][e(407)])?void 0:r[e(201)])?16:0},t[e(212)]={avc1:[],encv:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],Opus:[],dOps:[],enca:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],pssh:[],sinf:[],frma:[],schm:[],schi:[],tenc:[],saiz:[],saio:[],senc:[]},t[e(212)])t.types[s]=[s[e(384)](0),s[e(384)](1),s[e(384)](2),s.charCodeAt(3)];var u=new E([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 E([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]);t.HDLR_TYPES={video:u,audio:o};var h=new E([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new E([0,0,0,0,0,0,0,0]);t.STTS=t[e(377)]=t[e(213)]=a,t.STSZ=new E([0,0,0,0,0,0,0,0,0,0,0,0]),t[e(438)]=new E([0,0,0,1,0,0,0,0,0,0,0,0]),t[e(307)]=new E([0,0,0,0,0,0,0,0]),t[e(168)]=new E([0,0,0,0,0,0,0,1]);var c=new E([105,115,111,109]),f=new E([97,118,99,49]),v=new E([0,0,0,1]);t[e(183)]=t[e(347)](t[e(212)].ftyp,c,v,c,f),t[e(147)]=t[e(347)](t.types.dinf,t[e(347)](t[e(212)][e(280)],h))}var i=t.prototype;return i[Ie(190)]=function(i){var n=Ie;return t[n(347)](t[n(212)][n(190)],t[n(418)][i])},i[Ie(244)]=function(i){var n=Ie;return t[n(347)](t[n(212)][n(244)],i)},i[Ie(380)]=function(i,n){var r=Ie;return t[r(347)](t[r(212)][r(380)],new E([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24,i>>>16&255,i>>>8&255,255&i,0,0,0,0,85,196,0,0]))},i[Ie(215)]=function(i){var n=Ie;return t[n(347)](t[n(212)].mdia,this[n(380)](i[n(274)],i[n(290)]),this[n(190)](i[n(234)]),this[n(230)](i))},i[Ie(443)]=function(i){var n=Ie;return t.box(t[n(212)][n(443)],new E([0,0,0,0,i>>>24,i>>>16&255,i>>>8&255,255&i]))},i[Ie(230)]=function(i){var n=Ie;return i[n(234)]===n(407)?t[n(347)](t[n(212)][n(230)],t.box(t.types[n(255)],t.SMHD),t[n(147)],this[n(362)](i)):t[n(347)](t.types[n(230)],t[n(147)],this[n(362)](i),t[n(347)](t[n(212)].vmhd,t[n(438)]))},i[Ie(370)]=function(i,n,r){var e=Ie;return t[e(347)](t.types.moof,this[e(443)](i),this[e(293)](r,n))},i[Ie(295)]=function(i,n,r){for(var e=Ie,s=i[e(268)],u=[];s--;)u[s]=this.trak(i[s]);return t.box[e(200)](null,[t[e(212)][e(295)],this[e(240)](r,n),this[e(447)](i)][e(389)](u)[e(389)](this[e(322)](i)))},i[Ie(322)]=function(i){for(var n=Ie,r=i[n(268)],e=[];r--;)e[r]=this[n(305)](i[r]);return t[n(347)][n(200)](null,[t[n(212)][n(322)]][n(389)](e))},i[Ie(240)]=function(i,n){var r=Ie,e=new E([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24,i>>>16&255,i>>>8&255,255&i,n>>>24,n>>>16&255,n>>>8&255,255&n,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[r(347)](t.types.mvhd,e)},i[Ie(420)]=function(i){for(var n=Ie,r=i[n(428)]||[],e=new E(4+r.length),s=0;s>>8&255),u.push(255&e),u=u[s(389)](Array.prototype[s(314)][s(395)](r));for(n=0;n>>8&255),o[s(406)](255&e),o=o.concat(Array.prototype[s(314)].call(r));var h=t[s(347)](t[s(212)][s(408)],new E([1,u[3],u[4],u[5],255,224|i.sps[s(268)]].concat(u)[s(389)]([i[s(434)][s(268)]]).concat(o))),a=i[s(237)],c=i[s(374)],f=t[s(347)](t.types[s(441)],t.box(t[s(212)][s(318)],new E([97,118,99,49])),t[s(347)](t[s(212)][s(349)],new E([].concat([0,0,0,0],xe(this[s(285)][s(154)][s(415)][s(201)]),[0,1,0,0]))),t.box(t.types[s(217)],this[s(298)](s(415))));return t[s(347)](t[s(212)].encv,new E([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,a>>>8&255,255&a,c>>>8&255,255&c,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,65,86,67,32,67,111,100,105,110,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]),h,f)},i[Ie(372)]=function(t){var i=Ie,n=t[i(154)][i(413)],r=new E(26+n+3);return r[i(251)]([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5,n]),r[i(251)](t[i(154)],26),r.set([6,1,2],26+n),r},i[Ie(403)]=function(i){var n=Ie,r=i[n(354)];return t[n(347)](t[n(212)][n(403)],new E([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i[n(390)],0,16,0,0,0,0,r>>>8&255,255&r,0,0]),t[n(347)](t[n(212)][n(372)],this[n(372)](i)))},i[Ie(266)]=function(t){var i=Ie,n=t[i(354)];return new E([0,t[i(390)],1,56,0,0,n>>>8&255,255&n,0,0,0])},i[Ie(416)]=function(i){var n=Ie,r=i.audiosamplerate;return t[n(347)](t.types[n(416)],new E([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i[n(390)],0,16,0,0,0,0,r>>>8&255,255&r,0,0]),t[n(347)](t[n(212)][n(266)],this[n(266)](i)))},i[Ie(394)]=function(i){var n=Ie,r=t[n(347)](t.types[n(266)],this.dOps(i)),e=t[n(347)](t.types[n(441)],t.box(t.types.frma,new E([79,112,117,115])),t[n(347)](t.types.schm,new E([].concat([0,0,0,0],xe(this[n(285)][n(154)].audio[n(201)]),[0,1,0,0]))),t.box(t.types[n(217)],this[n(298)](n(407)))),s=i[n(354)];return t[n(347)](t[n(212)].enca,new E([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i[n(390)],0,16,0,0,0,0,s>>>8&255,255&s,0,0]),r,e)},i[Ie(165)]=function(i){var n=Ie;return i[n(234)]===n(407)?t[n(347)](t[n(212)][n(165)],t[n(168)],i[n(199)]?this[n(394)](i):this[n(416)](i)):t[n(347)](t.types[n(165)],t[n(168)],this[n(303)](i))},i[Ie(278)]=function(i){var n=Ie,r=i.id,e=i[n(290)],s=i[n(237)],u=i[n(374)],o=i[n(388)];return t[n(347)](t[n(212)].tkhd,new E([0,0,0,7,0,0,0,0,0,0,0,0,r>>>24,r>>>16&255,r>>>8&255,255&r,0,0,0,0,e>>>24,e>>>16&255,e>>>8&255,255&e,0,0,0,0,0,0,0,0,0,0,0,0,255&o,o%1*10&255,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,s>>>8&255,255&s,0,0,u>>>8&255,255&u,0,0]))},i[Ie(293)]=function(i,n){var r,e=Ie,s=i.id,u=i[e(428)][0][e(171)],o=i.samples[0][e(290)],h=i[e(428)][0].flags,a=t[e(347)](t[e(212)].tfhd,new E([0,2,0,58,s>>>24,s>>>16&255,s>>>8&255,255&s,0,0,0,1,o>>>24,s>>>16&255,o>>>8&255,255&o,u>>>24,u>>>16&255,u>>>8&255,255&u,0,h[e(264)],0,0])),c=t[e(347)](t[e(212)].tfdt,new E([0,0,0,0,n>>>24,n>>>16&255,n>>>8&255,255&n]));if(i.encrypted){var f,v;if(i[e(234)]===e(415)?(f=!0,v=this[e(350)][e(415)]+(null==(r=i.samples[0][e(191)])?void 0:r.byteLength)):(f=!1,v=this[e(350)].audio),v>0){var d=this[e(242)](v),l=this[e(340)](i[e(428)],f),w=d[e(268)]+20+l[e(268)]+a[e(268)]+c[e(268)]+8+16+8+8,g=this[e(271)](i,w);return t[e(347)](t[e(212)][e(293)],a,c,g,d,this.saio(w-l[e(268)]+g.length+8),l)}var _=this[e(340)](null,!1),m=_.length+a[e(268)]+c[e(268)]+8+16+8+8,y=this[e(271)](i,m);return t[e(347)](t.types[e(293)],a,c,y,_)}return t.box(t[e(212)].traf,a,c,this.trun(i,a[e(268)]+c.length+8+16+8+8))},i.trak=function(i){var n=Ie;return i.duration=i[n(290)]||4294967295,t.box(t[n(212)].trak,this[n(278)](i),this[n(215)](i))},i[Ie(305)]=function(i){var n=Ie,r=i.id;return t[n(347)](t.types[n(305)],new E([0,0,0,0,r>>>24,r>>>16&255,r>>>8&255,255&r,0,0,0,1,0,0,0,16,0,0,0,0,0,0,0,0]))},i.trun=function(i,n){var r=Ie,e=(i[r(428)]||[])[r(268)],s=new E(12);return n+=20,s.set([0,0,0,1,e>>>24,e>>>16&255,e>>>8&255,255&e,n>>>24,n>>>16&255,n>>>8&255,255&n],0),t[r(347)](t.types[r(271)],s)},i[Ie(224)]=function(t,i){var n,r,e,s=Ie,u=s(445),o=function(t){var i=function(t){for(var i=Ie,n="",r=0;r',s(308),"",s(398),s(353),s(216)+o+'"',">",s(412),s(249),s(391),i?""+i+s(423):"",s(351),s(269)].join("")))},i.pssh=function(i){var n=Ie;if(this[n(285)][n(383)][n(202)](n(178)))return t[n(347)](t.types[n(447)],new E([].concat([0,0,0,0,237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237,0,0,0,18,18,16],this[n(285)][n(154)][i[0][n(234)]].keyId)));if(this[n(285)][n(383)]===n(356)){var r=this[n(224)](this[n(285)][n(154)][i[0][n(234)]][n(429)],this.drm[n(371)]),e=r[n(413)];return t[n(347)](t[n(212)][n(447)],new E([].concat([0,0,0,0,154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149,e>>>24,e>>>16&255,e>>>8&255,255&e],r)))}return this.drm[n(383)]===n(323)?t[n(347)](t[n(212)][n(447)],new E([].concat([1,0,0,0,16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75,0,0,0,1],this.drm[n(154)][i[0].type].keyId,[0,0,0,0]))):this.drm[n(383)]===n(397)?null:void Re[n(189)](n(393)+this[n(285)][n(383)])},i[Ie(298)]=function(i){var n,r,e=Ie,s=this[e(285)][e(154)][i];return s[e(201)]===e(226)?(n=new E([].concat([16],s.iv)),r=25):(n=new E([]),r=0),t[e(347)](t[e(212)][e(298)],new E([].concat([1,0,0,0,0,r,1,this[e(350)][i]],s[e(429)],n)))},i[Ie(242)]=function(i){var n=Ie;return t[n(347)](t[n(212)][n(242)],new E([0,0,0,0,i,0,0,0,1]))},i[Ie(204)]=function(i){var n=Ie;return t[n(347)](t[n(212)][n(204)],new E([0,0,0,0,0,0,0,1,i>>>24,i>>>16&255,i>>>8&255,255&i]))},i[Ie(340)]=function(i,n){var r=Ie,e=null;return i&&(1!==i[r(268)]&&Re[r(189)](r(182)+i[r(268)]+" samples - expected 1"),e=i[0][r(191)]),e&&e[r(413)]?t[r(347)](t[r(212)].senc,new E([].concat([0,0,0,n?2:0,0,0,0,1],e))):t.box(t[r(212)][r(340)],new E([0,0,0,0,0,0,0,1]))},i[Ie(439)]=function(i,n,r){var e=Ie,s=this[e(295)](i,n,r),u=new E(t[e(183)].byteLength+s[e(413)]);return u[e(251)](t[e(183)]),u[e(251)](s,t[e(183)][e(413)]),u},t.box=function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r>>24,e[1]=u>>>16&255,e[2]=u>>>8&255,e[3]=255&u,e[s(251)](t,4),o=0,u=8;o0)for(var e=0;e0&&this.readyToDecode&&(this[e(207)][e(263)]+=a,this[e(428)].push({units:h,size:a,keyFrame:o.keyFrame,duration:o[e(290)],sampleAuxInfo:i,timestamp:n}))}},n[Ie(161)]=function(){var t=Ie;if(!this[t(211)]()||!this[t(428)])return null;var i,n=this.mp4track[t(428)],r=this.samples[t(342)](),e=r.units,s=(1e3*r[t(332)]|0)-this[t(222)]|0;s<5&&(s=5),s>5e3&&Re[t(381)](t(430)+(s/1e3|0)+" s"),this.dts=this[t(222)],this[t(222)]+=s,i={size:r.size,duration:s,cts:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,isNonSync:r[t(148)]?0:1,dependsOn:r[t(148)]?2:1},sampleAuxInfo:r[t(191)]};for(var u,o=0,h=Lt(e);!(u=h()).done;)o+=u.value[t(194)]();for(var a,c=0,f=new E(o),v=Lt(e);!(a=v()).done;){var d=a.value;f[t(251)](d[t(341)](),c),c+=d[t(194)]()}return n.push(i),new E(f[t(366)],0,o)},i}(Ve),ze=function(t){function i(i,n){var r,e=Ie;return(r=t.call(this,e(175))||this)[e(260)]=!1,r.trackTypes=[],r[e(357)]={},r[e(274)]=1e3,r[e(163)]=0,r[e(361)]=i,r.mp4=n,r}Ct(i,t);var n=i.prototype;return n[Ie(281)]=function(t){var i=Ie;("video"===t||"both"===t)&&(this[i(357)][i(415)]=new We(this.timescale,this[i(361)]),this[i(335)][i(406)](i(415))),(t===i(407)||t===i(417))&&(this[i(357)][i(407)]=new He(this.timescale),this.trackTypes[i(406)](i(407)))},n[Ie(250)]=function(){for(var t,i=Ie,n=Lt(this[i(335)]);!(t=n()).done;){var r=t.value;this.tracks[r].resetTrack()}this[i(260)]=!1},n[Ie(262)]=function(){var t=Ie;this.tracks={},this[t(219)]()},n[Ie(246)]=function(){var t=Ie;if(this[t(260)])for(var i,n=Lt(this[t(335)]);!(i=n()).done;)for(var r=i.value,e=this[t(357)][r];;){var s=e[t(161)]();if(!s||!s.byteLength)break;var u={type:r,payload:Pe(this[t(164)][t(370)](e[t(437)]++,e[t(336)],e[t(207)]),this.mp4[t(244)](s)),dts:e[t(336)]};this[t(225)](t(366),u),e[t(246)]()}else this[t(211)]()&&(this[t(225)]("ready"),this.initSegment(),this[t(260)]=!0,this[t(246)]())},n[Ie(439)]=function(){for(var t,i=Ie,n=Lt(this[i(335)]);!(t=n()).done;){var r=t.value,e=this[i(357)][r],s={type:r,payload:this[i(164)][i(439)]([e[i(207)]],this[i(163)],this.timescale)};this[i(225)]("buffer",s)}},n.isReady=function(){for(var t,i=Ie,n=Lt(this[i(335)]);!(t=n()).done;){var r=t.value;if(!this.tracks[r][i(296)]||!this[i(357)][r][i(428)][i(268)])return!1}return!0},n[Ie(181)]=function(t){for(var i,n=Ie,r=Lt(this[n(335)]);!(i=r()).done;){var e=i.value,s=t[e];s.length>0&&this[n(357)][e][n(181)](s,"audio"===e?t.audioSampleAuxInfo:t[n(310)],t[n(332)])}this[n(246)]()},i}(Le);function Xe(){var t=["stsd","isSupported","src","STSD","endMSE","abort","size","appendBufferError","addSourceBuffer","setupMSE","remuxer","addEventListener","max","com.widevine","readUEG"," - ","remux","Received ","FTYP","readyState","valid","ntype","readUInt","byteOffset","error","hdlr","sampleAuxInfo","webkitsourceopen","Checking codec","getSize","irrecoverableError","isfmb","[MSE] buffer error:","url","encrypted","apply","encryption","startsWith","getPayload","saio","open","[MSE] source buffer error","mp4track","append","getNri","codec","isReady","types","STCO","feed","mdia",'VALUE="',"schi","STSZ","offAll","jmuxer","skipEG","nextDts","1036611gAoRea","generatePlayReadyHeader","dispatch","cbcs","stsc","endOfStream","6576815frVeWy","minf","releaseBuffer","readUShort","track","type","stsz","isvcl","width","map","readBoolean","mvhd","onReady","saiz","reportDiscontinuity","mdat","bufferControllers","flush","patchSampleAuxinfo","readEG","","reset","set","onMSEClose","setUint16","idr","smhd","parseSPS","bind","message","getBits","initialized","sourceBuffer","destroy","len","isNonSync","warn","dOps","extractNALUs","length","","listener","trun","AUD","SEI","timescale","Num frames in chunk: ","7620738FWzrwf","mode","tkhd","dbgMediaDump","dref","addTrack","doAppend","options","[MSE] sourceclose","drm","mediaSource","Failure: Browser doesn't support MSE/MMS",'/mp4; codecs="',"function","duration","min","avc1.","traf","[MSE] sourceopen","moov","readyToDecode","resetTrack","tenc","onMSEOpen","MediaSource","removeSourceBuffer","h264","encv","sourceopen","trex","isKeyframe","SMHD","","stype","videoSampleAuxInfo","ended","getElementById","getUint8","slice","audioSampleAuxInfo","data","ready","frma","mseReady","string","4760043VatbTq","mvex","org.w3.clearkey","SPS","buffered","no video element were found to render, provide a valid video element","getPayloadSize",'","out",'","units","Unsupported DRM type ","enca","call","POSITIVE_INFINITY","com.apple.fps","","getVideoFrames","646233hEZDuD","4LuRDMh","nri","mp4a","ManagedMediaSource","buffer error","push","audio","avcC","onError","Buffered range ","getTrackID","","byteLength","No A/V data","video","Opus","both","HDLR_TYPES","readUByte","sdtp","STTS","hasRedundancy","","revokeObjectURL","BYTES_PER_ELEMENT","webkitsourceclose","IDR","samples","keyId","timestamp gap: ","node","readSPS","setData","pps","onBuffer","remuxController","seq","VMHD","initSegment","ceil","sinf","sourceclose","mfhd","skipLZ","http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader","Browser does not support codec","pssh","mediasource is not available to end: ","NDR","isReset","bitsAvailable","payload","DINF","keyFrame","isDependedOn","isTypeSupported","assign","waitingForIdr","8hmeyto","config","skipBits","remove","bitLength","[H264Parser] IDR without SPS/PPS, not suitable for recovery","TYPES","13659xNePtU","getFramePayload","onBufferError","mediaDuration","mp4"];return(Xe=function(){return t})()}var qe=function(t){function i(i,n,r){var e,s,u=Ie;(e=t.call(this,u(366))||this)[u(234)]=n,e[u(337)]=new E;var o=null==(s=Ae.mediaDumps[n])?void 0:s[u(352)].durationMs;return o>0&&(e[u(279)]=new Ee(n,u(164),o)),e.sourceBuffer=i,e[u(385)]=r,e[u(195)]=!1,e[u(261)].addEventListener(u(189),function(t){var i=u;Re.warn(i(206),t,e.type),e[i(195)]=!0,e.dispatch("error",{type:e[i(234)],name:i(366),error:i(405)})}),e}Ct(i,t);var n=i.prototype;return n[Ie(262)]=function(){var t=Ie;this[t(337)]=null,this[t(279)]=null;try{this[t(261)]&&(this.sourceBuffer[t(170)](),this.mse[t(301)](this[t(261)]),this.sourceBuffer=null)}catch(t){}this.offAll()},n[Ie(282)]=function(){var t=Ie;if(this[t(337)][t(268)]&&this[t(261)]&&!this.sourceBuffer.updating){if(this[t(261)].buffered.length>1){for(var i=0;i=0&&(e[c][n(392)]=e[c][n(392)].concat(r))}return 1!==e[n(268)]&&Re.warn(n(275)+e[n(268)]),e},n[Ie(360)]=function(t,i){if(!t)return 0;for(var n=(t[0]<<8)+t[1],r=i+2+4,e=0,s=2;0=0&&(t[r]=e>>>8&255,t[r+1]=255&e)}return 0},n[Ie(376)]=function(){var t=Ie;if(this[t(319)]&&this[t(436)]&&this[t(436)][t(211)]()&&!this[t(245)])for(var n in this[t(245)]={},this[t(436)][t(357)]){var r=this.remuxController[t(357)][n],e=""[t(389)](n,t(288)).concat(r.mp4track[t(210)],'"');if(Re[t(381)](t(193),e),!i[t(166)](e))return Re.error(t(446)),!1;var s=this.mediaSource[t(173)](e);this[t(245)][n]=new qe(s,n,this[t(286)]),this[t(245)][n].on(t(189),this[t(162)][t(257)](this))}},n[Ie(231)]=function(){var t=Ie;for(var i in this.bufferControllers)this[t(245)][i][t(282)]()},n[Ie(435)]=function(t){var i=Ie;this[i(319)]&&this[i(245)]&&this[i(245)][t[i(234)]]&&this[i(245)][t[i(234)]].feed(t[i(452)],t[i(336)])},n.onMSEOpen=function(){var t=Ie;Re[t(381)](t(294)),this[t(286)].readyState!==t(311)&&(this[t(286)][t(290)]=Number[t(396)],this[t(319)]=!0,W(this[t(283)].onReady)===t(289)&&this[t(283)][t(241)][t(395)](null,this.isReset),URL[t(424)](this[t(198)]),this[t(376)]())},n[Ie(252)]=function(){var t=Ie;Re[t(381)](t(284)),this.mseReady=!1,this[t(169)]()},n.onBufferError=function(t){var i=Ie;Re.warn(i(197),t),this[i(195)]=!0,this.endMSE(),W(this.options[i(409)])===i(289)&&this[i(283)][i(409)][i(395)](null,t)},i.isSupported=function(t){var i=Ie;return f[i(404)]?f.ManagedMediaSource[i(150)](t):!!f[i(300)]&&f[i(300)][i(150)](t)},i}(Le);function je(t,i){var n=Qe();return(je=function(t,i){return n[t-=182]})(t,i)}function Qe(){var t=["1247170HwkwNv","Av","gitVersion","352GaBvIm","toISOString","14XlATBT","2568948xDjIMf","1027225mjPCDe","19691yiLZrh","195999uPnZlk","3038288UlnUQm","2033937CLMUfn"];return(Qe=function(){return t})()}!function(){for(var t=je,i=Qe();;)try{if(A(t(182))/1+A(t(192))/2*(A(t(184))/3)+-A(t(185))/4+-A(t(187))/5+A(t(193))/6+-A(t(183))/7*(A(t(190))/8)+-A(t(186))/9==553943)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var Ye=ts;function Ke(){var t=["1236858jPUtaw","certificate","11225xsjioT","275391VrsSlK","5816evMpkd","CrsCCAMSEKDc0WAwLAQT1SB2ogyBJEwYv4Tx7gUijgIwggEKAoIBAQC8Xc/GTRwZDtlnBThq8","7299lkgbxa","1470Lkqtku","production","Development","charCodeAt","xUuwokpsqVIHZrJfu62ar+BF8UVUKdK5oYQoiTZd9OzK3kr29kqGGk3lSgM0/p499p/FUL8oH","baseUrl","375060LzZhzk","230861ZKueQt","12pvGCSu","https://lic.drmtoday.com","35fxICRY","pQnNI61gzHO42XZOMuxytMm0F6puNHTTqhyY3Z290YqvSDdOB+UY5QJuXJgjhvOUD9+oaLlvT","Production","development","https://lic.test.drmtoday.com","UrTEfQxfPR4dJTquE+IDLAi5yeVVxzbAgMBAAE6DGNhc3RsYWJzLmNvbUABEoADMmGXpXg/0q","from","RL9KsD0v7ysBQVdUXEbJotcFz71tI5qc3jwr6GjYIPA3VzusD17PN6AGQniMwxJV12z/EgnUo","baigovcoURAZcr1d/G0rpREjLdVLG0Gjqk63Gx688W5gh3TKemsK3R1jV0dOfj3e6uV/kTpsN","pcFB13osydpD2AaDsgWo5RWJcNf+fzCgtUQx/0Au9+xVm5LQBdv8Ja4f2oiHN3dw","V382D1oJAM0F/YgCQtNDLz7vTWJ+QskNGi5Dd2qzO4s48Cnx5BLvL4H0xCRSw2Ed6ekHSdrRU","27eI5MATX39gYtCnn7dDXVxo4/rCYK0A4VemC3HRai2X3pSGcsKY7+6we7h4IycjqtuGtYg8A","HzgsJ7Hajdsyzn0Vs3+VysAgaJAkXZ+k+N6Ka0WBiZlCtcunVJDiHQbz1sF9GvcePUUi2fM/h","Staging","staging","name"];return(Ke=function(){return t})()}!function(){for(var t=ts,i=Ke();;)try{if(A(t(326))/1+A(t(325))/2+A(t(315))/3+A(t(327))/4*(-A(t(314))/5)+-A(t(312))/6+A(t(329))/7*(A(t(316))/8)+-A(t(318))/9*(A(t(319))/10)==181728)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var Je=Ye(317)+Ye(306)+"wyoYOE+M/t1oIbccwlTQ7o+BpV1X6TB7fxFyx1jsBtRsBWphU65w121zqmSiwzZzJ4xsXVQCJ"+Ye(330)+"+vwmV2/NJWxKqHBKdL9JqvOnNiQUF0hDI7Wf8Wb63RYSXKE27Ky31hKgx1wuq7TTWkA+kHnJT"+Ye(334)+Ye(323)+Ye(308)+"7hyskG5ZLAyJMzTvgnV3D8/I5Y6mCFBPb/+/Ri+9bEvquPF3Ff9ip3yEHu9mcQeEYCeGe9zR/"+Ye(307)+Ye(304)+Ye(336)+Ye(305),Ze=E[Ye(335)](f.atob(Je),function(t){return t[Ye(322)](0)}),$e=function(){function t(t){this[Ye(311)]=t}var i=t.prototype;return i.toString=function(){return this.name},i[Ye(324)]=function(){var t=Ye;switch(this[t(311)]){case"staging":return"https://lic.staging.drmtoday.com";case"development":return t(333);default:return t(328)}},i[Ye(313)]=function(){return Ze},t}();function ts(t,i){var n=Ke();return(ts=function(t,i){return n[t-=304]})(t,i)}$e[Ye(309)]=new $e(Ye(310)),$e[Ye(331)]=new $e(Ye(320)),$e[Ye(321)]=new $e(Ye(332));var is=ns;function ns(t,i){var n=rs();return(ns=function(t,i){return n[t-=252]})(t,i)}function rs(){var t=["SampleAuxInfo corrupted","error","50012RXzLep","3301necisu","[RTC-DRM]","subarray","buffer","64zGPhLV","162pDdDkb","659466dfDPqj","SampleAuxInfo corrupted (postfix not found)","data","4199670WddvRf","95WaGAXy","getUint8","137436hbCkvG","1351035XuhSnW","getUint16","byteLength","184863QcuifQ"];return(rs=function(){return t})()}!function(){for(var t=ns,i=rs();;)try{if(-A(t(253))/1*(A(t(258))/2)+A(t(259))/3+A(t(252))/4*(-A(t(263))/5)+-A(t(265))/6+-A(t(269))/7*(-A(t(257))/8)+-A(t(266))/9+A(t(262))/10==173102)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var es=be(is(254));!function(){for(var t=us,i=as();;)try{if(A(t(369))/1+A(t(374))/2+A(t(366))/3+-A(t(373))/4+-A(t(365))/5+-A(t(368))/6*(A(t(370))/7)+A(t(367))/8==110661)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var ss=[];function us(t,i){var n=as();return(us=function(t,i){return n[t-=365]})(t,i)}var os=null,hs=0;function as(){var t=["799144UpkRWz","356926NfeJZx","set","slice","237700RBIjTO","627444ELwjUL","76968OxbdcX","6xPMWky","172231EpHRtx","1480332fEizHX","push","buffer"];return(as=function(){return t})()}var cs=Is;!function(){for(var t=Is,i=gs();;)try{if(-A(t(452))/1+-A(t(412))/2+-A(t(478))/3*(A(t(441))/4)+-A(t(485))/5*(-A(t(415))/6)+-A(t(400))/7+A(t(460))/8*(-A(t(486))/9)+-A(t(437))/10*(-A(t(470))/11)==412983)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var fs=be(cs(424)),vs={licenseUrl:"",onFetch:void 0},ds={},ls=function(t,i,n){return void 0===i&&(i=0),void 0===n&&(n=1/0),function(t,i,n){var r=cs,e=E.BYTES_PER_ELEMENT;i*=e,n*=e;var s,u=V(s=t,ArrayBuffer)?s:s[cs(484)],o=t[r(483)],h=i,a=b[r(432)](0,b.min(h,o)),c=b.min(a+b[r(432)](n,0),o);return new E(u,a/=e,(c/=e)-a)}(t,i,n)},ws=function(t){for(var i,n=cs,r="",e=Lt(t);!(i=e()).done;){var s=i.value.toString(16);1==s[n(433)]&&(s="0"+s),r+=s}return r};function gs(){var t=["360308tFqTFd","usable for decryption (status: ","oct","decode","parse","license","parseFromString","message","8pQccIM","No clear key test key provided!","generateRequest","text/xml","Failed to update the session: ","output-downscaled","target","apply","bind","Failed to update the session","24280927IKsRHd","No PR challenge data!","kids","status","getElementsByTagName","rtcdrmerror","CK license request:","A128KW","3KcCnPp","createSession","License acquisition failed with error ","No media keys for media element!","stringify","byteLength","buffer","82765KyOCry","7206525fRtYVA","error","btoa","9a04f07998404286ab92e65be0885f95","set","[PR] License fetched:","getUint16","onFetch","4630892EspqDe","addEventListener","debug","has","json","Previous lic will be reused","internal-error","subarray","fromCharCode","expired","text","temporary","665922eWbQGg","then","[FPS] License fetched:","174puebov","Content-Type","update","POST","2?n-2:0),e=2;e-1){var s=r[n(458)](e,n(463))[n(474)]("Challenge")[0].childNodes[0][n(420)];if(null===s)throw new y(n(471));return ps(s)}fs[n(444)]("[PR] Challenge node not found")}catch(i){t[n(446)](new CustomEvent(n(475),{detail:{message:""+i}})),fs[n(393)](i)}return null}(t,i.message);if(null===r)return t[n(446)](new CustomEvent("rtcdrmerror",{detail:{message:n(471)}})),void fs[n(393)](n(471));ks(vs[n(445)],r[n(484)],!0)[n(413)](function(t){return t[n(440)]()})[n(413)](function(r){var e=n;fs[e(402)](e(397),r),i[e(466)][e(417)](r)[e(439)](function(i){var n=e;t[n(446)](new CustomEvent(n(475),{detail:{message:n(464)+i}})),fs[n(393)]("Failed to update the session",i)})}).catch(function(i){var r=n;t.dispatchEvent(new CustomEvent(r(475),{detail:{message:""+i}})),fs[r(393)](i)})},Ts=function(t,i){var n=cs;ks(vs.licenseUrl,i[n(459)])[n(413)](function(t){var i=n,r=t[i(410)]();return fs[i(402)](i(414),t,r),r})[n(413)](function(t){var r=n;i.target[r(417)](ps(t))})[n(439)](function(i){var r=n;t[r(446)](new CustomEvent(r(475),{detail:{message:""+i}})),fs.error(i)})},Ss=function(t,i){ds[t]=i},Es=me.isSafari;function Is(t,i){var n=gs();return(Is=function(t,i){return n[t-=393]})(t,i)}var Rs=!Es,Cs=new Map;function Ps(t){return se(this,void 0,void 0,function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:if(i=Is,null===t.initData)throw new y(i(442));if(null===(n=t[i(466)]))throw new y(i(426));if(null===(r=n.mediaKeys))throw new y(i(481));e=ws(new E(t[i(423)])),s=e+n.id,u=null,Cs[i(403)](s)&&(null!=(u=Cs.get(s))&&u.close(),Cs.delete(s)),fs[i(402)](i(u?405:435)),o=null;try{o=r.createSession(Rs?"persistent-license":"temporary")}catch(t){fs[i(402)]("EME createSession(persistent) failed:",t)}if(!o&&Rs){Rs=!1;try{o=r[i(479)](i(411))}catch(t){fs.error("EME createSession(temporary) failed:",t)}}if(!o)return[3,7];if(o.addEventListener(i(450),function(t){var r=i;t[r(466)][r(430)][r(431)](function(t,i){var e=r;(t===e(409)||"output-restricted"===t||t===e(465)||t===e(406))&&n[e(446)](new CustomEvent(e(475),{detail:{message:"Key "+ws(new E(i))+" is not "+(e(453)+t)+")",keyId:i}}))})}),Es?o[i(401)](i(459),Ts.bind(null,n),!1):-1!==e.indexOf(i(436))?o[i(401)](i(459),bs[i(468)](null,n),!1):-1!==e[i(434)](i(395))?o.addEventListener(i(459),As[i(468)](null,n),!1):o.addEventListener(i(459),ys[i(468)](null,n),!1),!u)return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,o.load(u[i(422)])];case 2:return a.sent()?Cs[i(396)](s,o):n[i(446)](new CustomEvent(i(475),{detail:{message:i(428)}})),[3,4];case 3:return h=a.sent(),n[i(446)](new CustomEvent(i(475),{detail:{message:i(451)+h}})),[3,4];case 4:return[3,6];case 5:o[i(462)](t[i(429)],t[i(423)])[i(413)](function(){Rs&&Cs[i(396)](s,o)})[i(439)](function(t){var r=i;n.dispatchEvent(new CustomEvent(r(475),{detail:{message:r(427)+t}}))}),a.label=6;case 6:return[3,8];case 7:n[i(446)](new CustomEvent(i(475),{detail:{message:i(449)}})),a.label=8;case 8:return[2]}})})}var Ds=$s;!function(){for(var t=$s,i=Ks();;)try{if(-A(t(462))/1*(-A(t(532))/2)+-A(t(543))/3+A(t(682))/4+-A(t(692))/5*(A(t(588))/6)+-A(t(539))/7+A(t(496))/8+-A(t(549))/9==672532)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var Ns=be(Ds(673)),xs=me[Ds(607)],Bs=me[Ds(540)],Os=me[Ds(647)],Ms=me[Ds(489)],Ls=me[Ds(478)],Fs=me.platform,Us=me[Ds(620)],Vs=Ms||Ls&&Fs===Ds(578),Hs=1e6*(Bs?82:Os?220:120),Ws=Bs?5e3:2e3,zs=Bs?1.5:.5;function Xs(t){var i,n=Ds;return(void 0===t?"undefined":W(t))!==n(672)||null===t||V(t,Element)||V(t,$e)?t:V(null==(i=t)?void 0:i[Ds(584)],ArrayBuffer)&&null!=i&&i.BYTES_PER_ELEMENT?t[n(550)]():Array[n(636)](t)?t.reduce(function(t,i,n){return t[n]=Xs(i),t},[]):V(t,k)?k.keys(t).reduce(function(i,n){return i[n]=Xs(t[n]),i},{}):t}var qs=function(t){var i=Ds;this[i(547)]="",this[i(471)]="",this.keySystem="",this[i(603)]=[],this[i(479)]=Xs(t),this.jmuxer=null,this.keyFrameLogCntr=0,this[i(561)]=Date[i(658)](),this[i(585)]=0,this[i(602)]=0,this[i(490)]=-1,this[i(680)]=0,this[i(596)]=0,this[i(491)]=!0,this.keyFrameNeededPosted=!1,this[i(617)]=Ws,this[i(500)]=null,this.dbgMediaDump={video:null,audio:null}},Gs=new Map,js=new E([60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60]),Qs=new E([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]),Ys=new E([213,251,214,184,46,217,62,78,249,138,228,9,49,238,51,183]);function Ks(){var t=["isSafari","ansform=$=>{let e=$.transformer;handleTransform(e.options.operation,e.readable,e.writable)}),onmessage=$=>{keyFra","status","DRM config:","key","Development"," will be used","Staging","const DUMMY_IDR_FRAME_SLICE_HDR0=new Uint8Array([32,0,203]),DUMMY_IDR_FRAME_SLICE_HDR1=new Uint8Array([16,0,50]);","enabled","playback at ","now",".experiment","seq","videoElement","data","btoa","PlayReady might not support '","logLevel","cbcs-1-9","encryption"," to ","offset","x-dt-custom-data","let brokenFrame=null,idrFrames=[];function initializeDummyFrames(){brokenFrame=new Uint8Array([0,0,0,1,65,154,255","object","[RTC-DRM]","not-allowed","durationMs","Default transform mode enabled, ","keySystem","timestamp","DRM config keyId must be an instance of 16-byte long Uint8Array.","lastKeyFrameTime","H264 is the only supported video codec.","2533916KeNZJm","out","Applying pre-configured certificate (","buffered","Widevine","x-dt-auth-token"," ms)","com.microsoft.playready.recommendation","error","currentTime","225RwtgWL","end","requestMediaKeySystemAccess","50705YjLCIv","onmessage","environment","wvLicenseUrl","a1d1f1"," requesting a new key frame (latency ","userId","ClearKey","createEncodedStreams","licenseUrl","PlayReady license acquisition might fail without output protection enabled (sessionId is ","feed","dbgMediaDump","jmuxer","MSE (re)init",",255]).buffer,idrFrames.push(new Uint8Array([0,0,0,1,39,100,0,13,172,87,5,6,100,0,0,0,1,40,238,60,176,0,0,0,1,37,","isChrome","config","forEach","Invalid config argument type, DRM config must be an object.","hwSecurity","audioEncrypted","setMediaKeys","fpsCertificate","Unable to create Worker!","GET","customTransform","isEdge","prevSeqNum","keyFrameNeeded","encrypted","targetLatency not set!","opus","FairPlay","7963992IJNztq","streamType","SampleAuxInfo extraction failed (video)"," seeking from ","worker","]: ","video","kind","audio","jitterBufferDelayHint","size","No target media element!","fpsCertificateUrl","wvCertificate","delimited","3000","pipeThrough","/license-server-fairplay/cert/","string",") not found in [","indexOf","warn","ignoreAudio","append","jitterBufferTarget","prLicenseUrl","sessionTypes","authToken","get","RTCRtpScriptTransform","audioElement","catch","trim","join","waitingForIdr","info","52hXHKkY","enqueue","). It has to be a string containing a JWT.","playbackRate","sai","persistent-license","Blob","2699340CvuQCI","isFirefox","transform",'rame:{type:$.type,timestamp:$.timestamp,data:$.data}}),"key"===$.type&&(keyFrameNeeded=!1),$.data=generateDummyFr',"554109usxuWq"," will not be created, use rtcDrmFeedFrame to push frames manually","bind","streams","serverCertificateUrl","includes","3473577nNrBJc","slice","URL","serverCertificate","length","Invalid authToken type (","addEventListener","', it's safer to use 'cbcs' instead.","srcObject","ClearKey is not supported by Safari.","meNeeded=$.data};","value","nextKeyFrameAllowedTime","Error recovery attempted","rtcdrmerror","184,32,0,203,255,38,29,217,24,192,161,96,0,0,12,229,174,166,6,7,20,3,84,0,247,96,193,181,229,128,0,32,32]).buffer"," bytes","both","debug","No valid DRM config found, call rtcDrmConfigure first.","dispatchEvent","certificate","mediaBufferMs","clear","merchant","src","sessionId","reportDiscontinuity","mediaBufferMs should be an integer.","Android","rtcDrmConfigure did not specify audioElement, audio will be dropped","/license-proxy-widevine/cenc/","arrayBuffer","). Edge only supports PlayReady, Widevine and ClearKey.","). Chrome only supports Widevine and ClearKey.","buffer","videoStartTimestamp",'audio/mp4; codecs="opus"',"set","175800AyhMKK","PlayReady","SampleAuxInfo extraction failed (audio)","cenc","codec","videoCapabilities",".. ","Duplicate/reordered frame, prev seq: ","bytesSinceKey","wvCertificateUrl","/license-proxy-headerauth/drmtoday/RightsManager.asmx","robustness","baseUrl","type","audioStartTimestamp","emeConfig","com.widevine.alpha","SW_SECURE_CRYPTO","fpsLicenseUrl","supportsRtpScriptTransform","Target video element (","?audioTransformFunction:videoTransformFunction});e.pipeThrough(a).pipeTo(x)}self.RTCTransformEvent&&(self.onrtctr","createObjectURL","playoutDelayHint","POSITIVE_INFINITY",'ame(keyFrameNeeded),e.enqueue($)}function handleTransform($,e,x){let a=new TransformStream({transform:"audio"===$',"track",'video/mp4; codecs="avc1.640032"',"cbcs","keyFrameRequestInterval","Frame gap: ","keyFrameNeededPosted","isWindows","HW_SECURE_ALL"," bytes, ","GOP is getting too long, requesting a new key frame","temporary","Safari does not support Opus, audio will not be rendered.","stringify","byteLength","message"," frame","H264","mediaDumps","h264","keyFrameLogCntr","requestMediaKeySystemAccess(","Safari doesn't support 'cenc'/AES-CTR, use 'cbcs' instead if possible.","isArray","Invalid DRM type (","DRM config iv must be an instance of 16-byte long Uint8Array.","keyId","pipeTo"," - ","receiver","isInteger","toString","onFetch","next"];return(Ks=function(){return t})()}function Js(t){var i=Ds,n=!1;if((t[i(479)][i(502)]&&t[i(479)].video[i(667)]!==i(572)&&"HW"===t[i(479)][i(502)][i(599)]||t[i(479)][i(504)]&&t[i(479)][i(504)][i(667)]!==i(572)&&"HW"===t.config[i(504)][i(599)])&&(n=!0),t.hwSecurity=n,function(t,i){var n=Ds;void 0!==i&&(t[n(479)].mediaBufferMs=i),(void 0===t[n(479)][n(571)]||t.config[n(571)]<0)&&(t[n(479)].mediaBufferMs=100,Bs?t[n(479)][n(571)]=350:!Os&&Us&&("PlayReady"===t.config[n(601)]||t[n(482)])&&(t.config[n(571)]=1400))}(t,t[i(479)][i(571)]),void 0===t.config[i(523)]){void 0===t[i(479)][i(468)]&&(t[i(479)][i(468)]="purchase"),void 0===t[i(479)][i(575)]&&(t.config[i(575)]=i(466));var r=f[i(663)](JSON[i(626)]({userId:t[i(479)].userId,sessionId:t.config.sessionId,merchant:t[i(479)].merchant}));Ss(i(670),r)}else Ss(i(687),t[i(479)][i(523)]);for(var e=0,s=[t[i(479)][i(504)],t[i(479)][i(502)]];e=4;++t[r(633)]<(u?Number[r(612)]:5)&&(Ns.debug(Te()+" "+i[r(601)]+", "+i.data.byteLength+r(622)+(r(657)+t.config[r(661)].currentTime)),u&&1===t.keyFrameLogCntr&&function(t,i,n){void 0===i&&(i=64),void 0===n&&(n=64);for(var r=Ds,e=new E(t[r(662)]),s="",u=0,o=0;oHs&&(Ns.info(r(623)),t[r(491)]=!0),t[r(475)]&&(function(t,i){var n=Ds;0===t.videoStartTimestamp&&(t.videoStartTimestamp=i.timestamp,t[n(617)]=Ws,t[n(561)]=Date.now()+2e3);var r=null,e=!1;if(i[n(662)][n(627)]<=4)Ns[n(517)]("Discarding corrupted video frame (too small)"),e=!0;else{var s=new E(i[n(662)],0,4);0!=s[0]||0!=s[1]||0!=s[2]||1!=s[3]?(Ns.warn("Discarding corrupted video frame (no Annex B startcode)"),e=!0):!(r=function(t,i){var n=is,r=new DataView(t.data),e=t.data[n(268)]-2,s=r[n(267)](e);if(s>>4!=1)return es[n(271)]("Unsupported SampleAuxInfo version"),null;for(var o=new E(s-2),h=0,a=0;u1&&3===c&&(a=0,c=r.getUint8(u++)),0!==c?a=0:++a,o[h++]=c}var f=new DataView(o[n(256)]),v="cenc"===i?16:0,d=v+2+6*f[n(267)](v);return d+2>h?(es[n(271)](n(270)),null):{sai:o[n(255)](0,d),offset:e-s,seq:f[n(267)](d)}}return null}(i,t.config[n(502)][n(667)]))&&(Ns.warn(n(498)),e=!0)}if(r)if(i[n(601)]===n(651))t[n(490)]=r.seq;else{if(-1===t[n(490)])return 0;var u=r[n(660)]-t[n(490)];if(u<-32767&&(u+=65536),u<=0)return Ns.debug(n(595)+t.prevSeqNum+", curr: "+r.seq),0;u>1&&(e=i[n(601)]!==n(651),Ns[n(517)](n(618)+t[n(490)]+n(641)+r[n(660)]+", restart required: "+e)),t.prevSeqNum=r[n(660)]}var o=0;e&&!t[n(475)][n(530)]&&(o=-1,t[n(475)][n(576)]());var h=(i[n(678)]-t[n(585)])/9e4;return r&&t[n(475)][n(473)]({video:new E(i[n(662)],0,r.offset),videoSampleAuxInfo:r[n(536)],timestamp:h})<0&&(o=-1,Ns[n(517)](n(562)),Zs(t)),o>=0&&i[n(601)]===n(651)&&(t[n(680)]=h),o}(t,i)<0?t[r(491)]=!0:function(t){var i=Ds,n=t[i(479)][i(661)];if(!(!n||n[i(685)][i(553)]<1||n.paused||n[i(691)]>>2?.875:s<=u?1:s<7*u>>>2?1.125:s<9*u>>>2?1.25:s<11*u>>>2?1.375:1.5)!==(e=n).playbackRate&&(e[h(535)]=o)),!(c>>2))if(t[i(680)]>n[i(691)]+.1){var f=1e3*(a-t.lastKeyFrameTime)|0;f>40&&f>r-100?(Ns.debug(Te()+i(499)+(n[i(691)]+i(668)+t.lastKeyFrameTime+" (")+(t[i(680)]-n[i(691)])+")"),n[i(691)]=t[i(680)]):Ns[i(567)](Te()+" too close to seek, "+f)}else!t.keyFrameNeeded&&Date[i(658)]()>t[i(561)]&&c>r+100&&c>3*r>>>1&&(Ns[i(567)](Te()+i(467)+c+i(688)),t[i(491)]=!0,t[i(617)]<16e3&&(t[i(617)]<<=1))}}(t)),n?(!t[r(491)]||!Vs)&&(i[r(662)]=function(t){return!os&&(i=us,os=new E([0,0,0,1,65,154,255,255])[i(372)],ss[i(371)](new E([0,0,0,1,39,100,0,13,172,87,5,6,100,0,0,0,1,40,238,60,176,0,0,0,1,37,184,32,0,203,255,38,29,217,24,192,161,96,0,0,12,229,174,166,6,7,20,3,84,0,247,96,193,181,229,128,0,32,32])[i(372)]),ss[i(371)](ss[0][i(376)](0)),new E(ss[1])[i(375)]([16,0,50],27)),t?os:ss[hs^=1];var i}(t[r(491)]),n[r(533)](i)):t[r(491)]!=t.keyFrameNeededPosted&&(t[r(500)]&&t.worker.postMessage(t[r(491)]),t.keyFrameNeededPosted=t[r(491)]),t.keyFrameNeeded}function iu(t,i,n){var r=Ds;if(t.dbgMediaDump.audio){var e=i[r(678)]/48;t[r(474)][r(504)][r(519)](new E(i.data),e)||(t.dbgMediaDump[r(504)]=null)}return t[r(479)].audio&&t[r(479)].audio[r(667)]!==r(572)?i[r(662)][r(627)]>0&&function(t,i){var n,r=Ds;if(!t[r(475)]||t[r(518)])return 0;0===t[r(602)]&&(t.audioStartTimestamp=i[r(678)]);var e=(i[r(678)]-t[r(602)])/48e3;if((null===(n=t[r(479)][r(504)])||void 0===n?void 0:n[r(667)])===r(616))return t.jmuxer[r(473)]({audio:new E(i[r(662)]),timestamp:e});var s=function(t){var i=is,n=new DataView(t[i(261)]),r=t.data[i(268)]-2,e=n[i(267)](r);if(e>>4!=1)return es[i(271)]("Unsupported SampleAuxInfo version"),null;for(var u=new E(e-2),o=0;s=16)break}return{sai:u,offset:r-e}}return null}(i);s?t.jmuxer[r(473)]({audio:new E(i[r(662)],0,s[r(669)]),audioSampleAuxInfo:s[r(536)],timestamp:e}):Ns[r(690)](r(590))}(t,i):n&&n[r(533)](i),!1}function nu(t){var i,n,r,e,s,u=Ds;if(!t||(void 0===t?"undefined":W(t))!==u(672))throw new p(u(481));if(!V(t.videoElement,HTMLVideoElement))throw new p("Invalid videoElement, it must be an instance of HTMLVideoElement.");if(t[u(526)]&&!V(t[u(526)],HTMLMediaElement))throw new p("Invalid audioElement, it must be an instance of HTMLMediaElement.");if(void 0!==t[u(571)]&&!Number[u(643)](t[u(571)]))throw new p("DRM config mediaBufferMs should be an integer.");for(var o=!1,h=!1,a=!1,c=[u(616),"cenc",u(572)],f=["SW","HW"],v=0,d=[t.video,t[u(504)]];v=0))return[3,9];null===(r=t[i(603)][0][i(522)])||void 0===r||r.splice(u,1),m.label=6;case 6:return m.trys.push([6,8,,9]),[4,l[i(461)](t[i(677)],t[i(603)])];case 7:return s=m.sent(),[3,9];case 8:return m.sent(),[3,9];case 9:if(!s)return o=i(634)+t[i(677)]+") failed",[2,(e[i(569)](new CustomEvent(i(563),{detail:{message:o}})),void Ns[i(690)](o))];h=null,m.label=10;case 10:return m.trys.push([10,12,,13]),[4,s.createMediaKeys()];case 11:return h=m.sent(),[3,13];case 12:return m.sent(),[3,13];case 13:return h?t.serverCertificate?(Ns[i(567)](i(684)+t[i(552)][i(627)]+" bytes)"),[4,h.setServerCertificate(t[i(552)])]):[3,15]:(a="createMediaKeys("+t.keySystem+") failed",[2,(e.dispatchEvent(new CustomEvent(i(563),{detail:{message:a}})),void Ns[i(690)](a))]);case 14:return m.sent(),[3,21];case 15:if(!t[i(547)])return[3,21];c={method:i(487)},f=t.serverCertificateUrl,m.label=16;case 16:return m.trys.push([16,20,,21]),[4,t.config[i(645)]?t[i(479)][i(645)](f,c):fetch(f,c)];case 17:return(v=m.sent()).ok?[4,v[i(581)]()]:(d="Server certificate fetch failed with error "+v[i(649)],[2,void e[i(569)](new CustomEvent(i(563),{detail:{message:d}}))]);case 18:return w=m.sent(),Ns[i(567)]("Fetched certificate from "+f+", "+w.byteLength+i(565)),[4,h.setServerCertificate(w)];case 19:return m.sent(),[3,21];case 20:return g=m.sent(),_=g.name+": "+g[i(628)],[2,(Ns[i(690)](_),void e[i(569)](new CustomEvent("rtcdrmerror",{detail:{message:_}})))];case 21:return[4,e[i(484)](h)];case 22:return m.sent(),e[i(555)](i(492),Ps),Zs(t),[2]}})})}(A)),A[u(479)][u(661)][u(555)]("play",function(){var t=u;A[t(479)][t(661)][t(691)]>.5&&(A[t(561)]=Date[t(658)]())})}var ru=Ds(655)+Ds(671)+Ds(477)+Ds(564)+'),idrFrames.push(idrFrames[0].slice());let $=new Uint8Array(idrFrames[1]);$.set([16,0,50],27)}let idrPicIdToggle=0;function generateDummyFrame($){return(brokenFrame||initializeDummyFrames(),$)?brokenFrame:idrFrames[idrPicIdToggle^=1]}function audioTransformFunction($,e){postMessage({streamType:"audio",frame:{timestamp:$.timestamp,data:$.data}}),e.enqueue($)}let keyFrameNeeded=!1;function videoTransformFunction($,e){postMessage({streamType:"video",f'+Ds(542)+Ds(613)+Ds(609)+Ds(648)+Ds(559);function eu(t){var i,n=Ds;if(0===Gs[n(506)])throw new p(n(568));if(t&&t[n(661)])i=t.videoElement;else{if(1!==Gs[n(506)])throw new p("Several DRM configs detected, rtcDrmOnTrack have to be called with target DRM config.");i=Gs.keys()[n(646)]()[n(560)]}var r=Gs[n(524)](i);if(!r){var e="";throw Gs[n(480)](function(t,i){e+=i.id+", "}),e=e[n(550)](0,-2),new p(n(608)+i.id+n(515)+e+"]")}return r}function su(t,i){var n=Ds;if(t&&t.config[n(661)]){var r=t.config[n(661)];if(r.buffered[n(553)]>0){var e=r.buffered[n(693)](r.buffered[n(553)]-1)-r.currentTime;i[n(611)]=i.jitterBufferDelayHint=i[n(520)]=e}w(su,1e3,t,i)}}var uu=gt.get("View");uu.setLevel(gt.DEBUG);var ou={metadata:!1,enableDRM:!1,disableVideo:!1,disableAudio:!1,peerConfig:{autoInitStats:!0,statsIntervalMs:1e3}},hu=function(t){function i(i,n,r,e){var s;return void 0===r&&(r=null),void 0===e&&(e=!0),i&&uu.warn("The streamName property has been deprecated. In a future release, this will be removed. Please do not rely on this value. Instead, set via token generator"),(s=t.call(this,null,n,uu,e)||this).payloadTypeCodec={},s.tracksMidValues={},s.drmOptionsMap=null,s.eventQueue=[],s.isMainStreamActive=!1,r&&(s.on(Un.track,function(t){r.srcObject=t.streams[0]}),uu.warn("The mediaElement property has been deprecated. In a future release, this will be removed. Please do not rely on this value. Instead, do this in either the `track` or the `active` broadcast event.")),s}Ct(i,t);var n=i.prototype;return n.connect=function(){return Vt(function(t){return zt(this,function(i){switch(i.label){case 0:return void 0===t&&(t=ou),this.options=g(d(d({},ou),t),{peerConfig:d(d({},ou.peerConfig),t.peerConfig),setSDPToPeer:!1}),this.eventQueue.length=0,[4,this.initConnection({migrate:!1})];case 1:return i.sent(),[2]}})}).apply(this,arguments)},n.select=function(){return Vt(function(t){return zt(this,function(i){switch(i.label){case 0:return void 0===t&&(t={}),uu.debug("Viewer select layer values: ",t),[4,this.signaling.cmd("select",{layer:t})];case 1:return i.sent(),uu.info("Connected to streamName: ",this.streamName),[2]}})}).apply(this,arguments)},n.addRemoteTrack=function(t,i){return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return uu.info("Viewer adding remote track",t),[4,this.webRTCPeer.addRemoteTrack(t,i)];case 1:for(n=s.sent(),r=Lt(i);!(e=r()).done;)e.value.addTrack(n.receiver.track);return[2,n]}})}).call(this)},n.project=function(t,i){return Vt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:for(r=function(){var t=s.value;if(!t.trackId&&!t.media)throw uu.error("Error in projection mapping, trackId or mediaId must be set"),new y("Error in projection mapping, trackId or mediaId must be set");var i=n.webRTCPeer.getRTCPeer();if(t.mediaId&&!i.getTransceivers().find(function(i){return i.mid===t.mediaId.toString()}))throw uu.error("Error in projection mapping, ".concat(t.mediaId," mid not found in local transceivers")),new y("Error in projection mapping, ".concat(t.mediaId," mid not found in local transceivers"))},e=Lt(i);!(s=e()).done;)n=this,r();return uu.debug("Viewer project source: layer mappings: ",t,i),[4,this.signaling.cmd("project",{sourceId:t,mapping:i})];case 1:return u.sent(),uu.info("Projection done"),[2]}})}).call(this)},n.unproject=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return uu.debug("Viewer unproject mediaIds: ",t),[4,this.signaling.cmd("unproject",{mediaIds:t})];case 1:return i.sent(),uu.info("Unprojection done"),[2]}})}).call(this)},n.replaceConnection=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return uu.info("Migrating current connection"),[4,this.initConnection({migrate:!0})];case 1:return t.sent(),[2]}})}).call(this)},n.stop=function(){var i,n;t.prototype.stop.call(this),null==(i=this.drmOptionsMap)||i.clear(),this.DRMProfile=null,null==(n=this.worker)||n.terminate(),this.worker=null,this.payloadTypeCodec={},this.tracksMidValues={},this.eventQueue.length=0},n.initConnection=function(t){return Vt(function(){var i,n,r,e,s,u,o,h,a,c,f,v,l,_,m,p,b;return zt(this,function(A){switch(A.label){case 0:if(i=this,uu.debug("Viewer connect options values: ",this.options),this.stopReconnection=!1,t.abrConfiguration&&t.abrConfiguration.metadata&&(!(e=t.abrConfiguration.metadata.bitrate)||e<0))throw new y("Invalid bitrate ".concat(e," supplied for ABR. The value must be a non-negative integer value."));if(!t.migrate&&this.isActive())throw uu.warn("Viewer currently subscribed"),new y("Viewer currently subscribed");A.label=1;case 1:return A.trys.push([1,3,,4]),[4,this.tokenGenerator()];case 2:return s=A.sent(),this.options.peerConfig.iceServers=null==s?void 0:s.iceServers,this.options.peerConfig.encodedInsertableStreams=jr&&(this.options.enableDRM||this.options.metadata),[3,4];case 3:throw u=A.sent(),uu.error("Error generating token."),V(u,ar)&&(401!==u.status&&this.autoReconnect?this.reconnect():this.stopReconnection=!0),u;case 4:if(!s)throw uu.error("Error while subscribing. Subscriber data required"),new y("Subscriber data required");return o=kr(s.jwt),this.streamName=o.millicast.streamName,h=new ur({streamName:this.streamName,url:"".concat(s.urls[0],"?token=").concat(s.jwt)}),s.subscriberToken&&(this.subscriberToken=s.subscriberToken),[4,(a=t.migrate?new Hn:this.webRTCPeer).createRTCPeer(this.options.peerConfig)];case 5:return A.sent(),null==(n=this.stopReemitingWebRTCPeerInstanceEvents)||n.call(this),this.stopReemitingWebRTCPeerInstanceEvents=Kt(a,this,k.values(Un).filter(function(t){return t!==Un.track})),this.options.metadata&&(this.worker||(this.worker=new Jr),this.worker.onmessage=function(t){if("metadata"===t.data.event){var n=new TextDecoder,r=t.data.metadata;if(r.mid=t.data.mid,r.track=i.tracksMidValues[t.data.mid],r.uuid){var e=r.uuid;r.uuid=e.reduce(function(t,i){return t+i.toString(16).padStart(2,"0")},""),r.uuid=r.uuid.replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}if(r.timecode&&(r.timecode=new Date(n.decode(r.timecode))),r.unregistered){var s=n.decode(r.unregistered);try{var u=JSON.parse(s);r.unregistered=u}catch(t){uu.info("The content could not be converted to JSON, returning raw bytes instead")}}i.emit("metadata",r)}}),a.on(Un.track,function(t){i.isMainStreamActive?i.onTrackEvent(t):i.eventQueue.push(t)}),h.on(sr,function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.isMainStreamActive||"active"!==t.name?[3,3]:(this.mainSourceId=t.data.sourceId,this.DRMProfile||!t.data.encryption?[3,2]:[4,this.tokenGenerator()]);case 1:(i=n.sent()).drmObject&&(this.DRMProfile=i.drmObject),n.label=2;case 2:for(this.emit(sr,t),this.isMainStreamActive=!0;this.eventQueue.length>0;)this.onTrackEvent(this.eventQueue.shift());return[2];case 3:return"inactive"===t.name&&this.isMainStreamActive&&this.mainSourceId===t.data.sourceId&&(this.isMainStreamActive=!1),this.emit(sr,t),[2]}})}).call(i)}),c=a.getRTCLocalSDP(g(d({},this.options),{stereo:!0})),f=h.connect(),[4,ut.all([c,f])];case 6:return r=A.sent(),v=r[0],l=this.signaling,this.signaling=h,_=this.signaling.subscribe(v,g(d({},this.options),{vad:this.options.multiplexedAudioTracks>0})),m=a.peer.setLocalDescription(a.sessionDescription),[4,ut.all([_,m])];case 7:return r=A.sent(),p=r[0],this.payloadTypeCodec=Nn.getCodecPayloadType(p),[4,a.setRTCRemoteSDP(p)];case 8:return A.sent(),uu.info("Connected to streamName: ",this.streamName),b=this.webRTCPeer,this.webRTCPeer=a,this.setReconnect(),t.migrate&&this.webRTCPeer.on(Un.connectionStateChange,function(t){var i,n;"connected"===t?w(function(){var t,i;null==(t=null==l?void 0:l.close)||t.call(l),null==(i=null==b?void 0:b.closeRTCPeer)||i.call(b),l=b=null,uu.info("Current connection migrated")},1e3):["disconnected","failed","closed"].includes(t)&&(null==(i=null==l?void 0:l.close)||i.call(l),null==(n=null==b?void 0:b.closeRTCPeer)||n.call(b),l=b=null)}),[2]}})}).call(this)},n.onTrackEvent=function(t){var i,n,r;if(this.tracksMidValues[null==(i=t.transceiver)?void 0:i.mid]=t.track,this.isDRMOn){var e=t.transceiver.mid,s=this.getDRMConfiguration(e);try{!function(t,i){var n,r,e=Ds,s=t[e(614)][e(503)];s===e(502)&&(t[e(642)][e(611)]=t.receiver[e(505)]=t[e(642)][e(520)]=0);var u=eu(i),o=u[e(479)][e(661)],h=u.config.audioElement;if(u.enabled){var a=""+e(xs?525:470);if(u[e(479)][e(488)])Ns[e(567)](a+e(544));else{if(Ns[e(567)](e(676)+a+e(653)),s===e(502)){var c=Ae[e(631)][e(502)].in[e(675)];c>0&&(u.dbgMediaDump[e(502)]=new Ee(e(502),e(632),c))}else if(s===e(504)){var v=Ae[e(631)][e(504)].in[e(675)];v>0&&(u[e(474)][e(504)]=new Ee(e(504),e(494),v))}if(xs){if(u[e(500)]=function(t){var i=Ds,n=f[i(551)]||f.webkitURL,r=f[i(538)],e=f.Worker;if(!(n&&r&&e&&t))return null;var s=new r([t]);return new e(n[i(610)](s))}(ru),null==u[e(500)])throw new y(e(486));u[e(500)][e(463)]=function(t){var i=e;t[i(662)][i(497)]===i(502)?tu(u,t.data.frame,null):iu(u,t.data.frame,null)},t[e(642)][e(541)]=new RTCRtpScriptTransform(u.worker,{operation:s})}else{var d=s===e(502)?tu:iu,l={drm:u,transform:function(t,i){d(u,t,i)}},w=t[e(642)][e(470)](),g=new TransformStream({transform:l[e(541)][e(545)](l)}),_=w.readable,m=w.writable;_[e(512)](g)[e(640)](m)}}if("audio"===s&&(null===(n=u.config[e(504)])||void 0===n?void 0:n.encryption)===e(572)){if(!h)return void Ns[e(517)](e(579));h[e(557)]!==t[e(546)][0]&&(h[e(557)]=t.streams[0]),u[e(479)][e(661)]&&(t[e(642)].playoutDelayHint=t.receiver.jitterBufferDelayHint=t[e(642)][e(520)]=u[e(479)][e(571)],su(u,t[e(642)]))}else s===e(502)&&(null===(r=u[e(479)][e(502)])||void 0===r?void 0:r.encryption)===e(572)&&o[e(557)]!==t[e(546)][0]&&(o.srcObject=t[e(546)][0])}else o[e(557)]!==t[e(546)][0]&&(o.srcObject=t[e(546)][0])}(t,s)}catch(t){uu.error("Failed to apply DRM on media Id:",e,"error is: ",t),this.emit("error",new y("Failed to apply DRM on media Id: "+e+" error is: "+t))}this.worker||(this.worker=new Jr),this.worker.addEventListener("message",function(t){"complete"===t.data.event&&function(t,i,n){var r=Ds,e=eu(n);t[r(601)]?tu(e,t,i):iu(e,t,i)}(t.data.frame,null,s)})}if(this.options.metadata)if(Qr)t.receiver.transform=new RTCRtpScriptTransform(this.worker,{name:"receiverTransform",payloadTypeCodec:d({},this.payloadTypeCodec),codec:this.options.metadata&&"h264",mid:null==(n=t.transceiver)?void 0:n.mid});else if(jr){var u=t.receiver.createEncodedStreams(),o=u.readable,h=u.writable;this.worker.postMessage({action:"insertable-streams-receiver",payloadTypeCodec:d({},this.payloadTypeCodec),codec:this.options.metadata&&"h264",mid:null==(r=t.transceiver)?void 0:r.mid,readable:o,writable:h},[o,h])}this.emit(Un.track,t)},n.getDRMConfiguration=function(t){return this.drmOptionsMap?this.drmOptionsMap.get(t):null},n.onRtcDrmFetch=function(t,i){return Vt(function(){return zt(this,function(n){return[2,(i.headers||(i.headers=new Headers),i.headers.get("x-dt-custom-data")&&i.headers.delete("x-dt-custom-data"),this.subscriberToken?i.headers.append("Authorization","Bearer ".concat(this.subscriberToken)):uu.warn("onRtcDrmFetch: no subscriberToken"),fetch(t,i))]})}).call(this)},n.configureDRM=function(t){var i=this;if(!t)throw new y("Required DRM options is not provided");this.drmOptionsMap||(this.drmOptionsMap=new Map);var n={merchant:"dolby",environment:$e.Production,customTransform:this.options.metadata,videoElement:t.videoElement,audioElement:t.audioElement,video:{codec:"H264",encryption:"cbcs",keyId:re(t.videoEncryptionParams.keyId),iv:re(t.videoEncryptionParams.iv)},audio:{codec:"opus",encryption:"clear"},onFetch:this.onRtcDrmFetch.bind(this)};t.mediaBufferMs&&(n.mediaBufferMs=t.mediaBufferMs),this.DRMProfile&&(this.DRMProfile.playReadyUrl&&(n.prLicenseUrl=this.DRMProfile.playReadyUrl),this.DRMProfile.widevineUrl&&(n.wvLicenseUrl=this.DRMProfile.widevineUrl),this.DRMProfile.fairPlayUrl&&(n.fpsLicenseUrl=this.DRMProfile.fairPlayUrl),this.DRMProfile.fairPlayCertUrl&&(n.fpsCertificateUrl=this.DRMProfile.fairPlayCertUrl));try{nu(n),this.drmOptionsMap.set(t.videoMid,n),t.audioMid&&this.drmOptionsMap.set(t.audioMid,n),n.videoElement.addEventListener("rtcdrmerror",function(t){uu.error("DRM error: ",t.detail.message,"in video element:",n.videoElement.id),i.emit("error",new y(t.detail.message))})}catch(i){uu.error("Failed to configure DRM with options:",t,"error is:",i)}},n.removeDRMConfiguration=function(t){var i;null==(i=this.drmOptionsMap)||i.delete(t)},n.exchangeDRMConfiguration=function(t,i){var n=this.getDRMConfiguration(t),r=this.getDRMConfiguration(i);if(null===n)throw new y("No DRM configuration found for "+t);if(null===r)throw new y("No DRM configuration found for "+i);ee(n.video,r.video,"keyId"),ee(n.video,r.video,"iv");try{nu(n)}catch(t){uu.error("Failed to configure DRM with options:",n,"error is:",t)}try{nu(r)}catch(t){uu.error("Failed to configure DRM with options:",r,"error is:",t)}},Nt(i,[{key:"isDRMOn",get:function(){return!!this.drmOptionsMap&&this.drmOptionsMap.size>0}}]),i}(qr);t.Director=lr,t.Logger=gt,t.PeerConnection=Hn,t.Publish=ie,t.Signaling=ur,t.View=hu,k.defineProperty(t,i.toStringTag,{value:"Module"})},"object"==(void 0===t?"undefined":W(t))&&(void 0===r?"undefined":W(r))<"u"?s(t):"function"==typeof define&&define.amd?define(["exports"],s):s((e=("undefined"==typeof globalThis?"undefined":W(globalThis))<"u"?globalThis:e||self).millicast={})}),hi=M(function(t){function i(){var t=oi();return i=function(){return t},t}U(),Et(),k.defineProperty(t,"__esModule",{value:!0}),function(t,i){for(var n in i)k.defineProperty(t,n,{enumerable:!0,get:k.getOwnPropertyDescriptor(i,n).get})}(t,{get Director(){return i().Director},get Logger(){return i().Logger},get View(){return i().View}})}),ai=M(function(t,i){U(),Et(),i.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),ci=M(function(t,i){U(),Et(),i.exports=function(t,i){var n=i[0],r=i[1],e=i[2],s=i[3],u=n+n,o=r+r,h=e+e,a=n*u,c=r*u,f=r*o,v=e*u,d=e*o,l=e*h,w=s*u,g=s*o,_=s*h;return t[0]=1-f-l,t[1]=c+_,t[2]=v-g,t[3]=0,t[4]=c-_,t[5]=1-a-l,t[6]=d+w,t[7]=0,t[8]=v+g,t[9]=d-w,t[10]=1-a-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),fi=M(function(t,i){U(),Et(),i.exports=function(t,i,n){var r,e,s,u=n[0],o=n[1],h=n[2],a=b.sqrt(u*u+o*o+h*h);if(b.abs(a)<1e-6)return null;return u*=a=1/a,o*=a,h*=a,r=b.sin(i),e=b.cos(i),s=1-e,t[0]=u*u*s+e,t[1]=o*u*s+h*r,t[2]=h*u*s-o*r,t[3]=0,t[4]=u*o*s-h*r,t[5]=o*o*s+e,t[6]=h*o*s+u*r,t[7]=0,t[8]=u*h*s+o*r,t[9]=o*h*s-u*r,t[10]=h*h*s+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),vi=M(function(t,i){U(),Et(),i.exports=function(t,i){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=i[0],t[13]=i[1],t[14]=i[2],t[15]=1,t}}),di=M(function(t,i){U(),Et(),i.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),li=M(function(t,i){U(),Et(),i.exports=function(t,i){var n=i[0],r=i[1],e=i[2],s=i[3],u=i[4],o=i[5],h=i[6],a=i[7],c=i[8],f=i[9],v=i[10],d=i[11],l=i[12],w=i[13],g=i[14],_=i[15],m=n*o-r*u,y=n*h-e*u,p=n*a-s*u,k=r*h-e*o,b=r*a-s*o,A=e*a-s*h,T=c*w-f*l,S=c*g-v*l,E=c*_-d*l,I=f*g-v*w,R=f*_-d*w,C=v*_-d*g,P=m*C-y*R+p*I+k*E-b*S+A*T;if(!P)return null;return P=1/P,t[0]=(o*C-h*R+a*I)*P,t[1]=(e*R-r*C-s*I)*P,t[2]=(w*A-g*b+_*k)*P,t[3]=(v*b-f*A-d*k)*P,t[4]=(h*E-u*C-a*S)*P,t[5]=(n*C-e*E+s*S)*P,t[6]=(g*p-l*A-_*y)*P,t[7]=(c*A-v*p+d*y)*P,t[8]=(u*R-o*E+a*T)*P,t[9]=(r*E-n*R-s*T)*P,t[10]=(l*b-w*p+_*m)*P,t[11]=(f*p-c*b-d*m)*P,t[12]=(o*S-u*I-h*T)*P,t[13]=(n*I-r*S+e*T)*P,t[14]=(w*y-l*k-g*m)*P,t[15]=(c*k-f*y+v*m)*P,t}}),wi=M(function(t,i){U(),Et(),i.exports=function(t,i,n){var r=i[0],e=i[1],s=i[2],u=i[3],o=i[4],h=i[5],a=i[6],c=i[7],f=i[8],v=i[9],d=i[10],l=i[11],w=i[12],g=i[13],_=i[14],m=i[15],y=n[0],p=n[1],k=n[2],b=n[3];return t[0]=y*r+p*o+k*f+b*w,t[1]=y*e+p*h+k*v+b*g,t[2]=y*s+p*a+k*d+b*_,t[3]=y*u+p*c+k*l+b*m,y=n[4],p=n[5],k=n[6],b=n[7],t[4]=y*r+p*o+k*f+b*w,t[5]=y*e+p*h+k*v+b*g,t[6]=y*s+p*a+k*d+b*_,t[7]=y*u+p*c+k*l+b*m,y=n[8],p=n[9],k=n[10],b=n[11],t[8]=y*r+p*o+k*f+b*w,t[9]=y*e+p*h+k*v+b*g,t[10]=y*s+p*a+k*d+b*_,t[11]=y*u+p*c+k*l+b*m,y=n[12],p=n[13],k=n[14],b=n[15],t[12]=y*r+p*o+k*f+b*w,t[13]=y*e+p*h+k*v+b*g,t[14]=y*s+p*a+k*d+b*_,t[15]=y*u+p*c+k*l+b*m,t}}),gi=M(function(t,i){U(),Et(),i.exports=function(t,i,n,r,e){var s=1/b.tan(i/2),u=1/(r-e);return t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(e+r)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*e*r*u,t[15]=0,t}}),_i=M(function(t,i){U(),Et(),i.exports=function(t,i,n,r){var e,s,u,o,h,a,c,f,v,d,l,w,g,_,m,y,p,k,A,T,S,E,I,R,C=r[0],P=r[1],D=r[2],N=b.sqrt(C*C+P*P+D*D);if(b.abs(N)<1e-6)return null;C*=N=1/N,P*=N,D*=N,e=b.sin(n),s=b.cos(n),u=1-s,o=i[0],h=i[1],a=i[2],c=i[3],f=i[4],v=i[5],d=i[6],l=i[7],w=i[8],g=i[9],_=i[10],m=i[11],y=C*C*u+s,p=P*C*u+D*e,k=D*C*u-P*e,A=C*P*u-D*e,T=P*P*u+s,S=D*P*u+C*e,E=C*D*u+P*e,I=P*D*u-C*e,R=D*D*u+s,t[0]=o*y+f*p+w*k,t[1]=h*y+v*p+g*k,t[2]=a*y+d*p+_*k,t[3]=c*y+l*p+m*k,t[4]=o*A+f*T+w*S,t[5]=h*A+v*T+g*S,t[6]=a*A+d*T+_*S,t[7]=c*A+l*T+m*S,t[8]=o*E+f*I+w*R,t[9]=h*E+v*I+g*R,t[10]=a*E+d*I+_*R,t[11]=c*E+l*I+m*R,i!==t&&(t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15]);return t}}),mi=M(function(t,i){U(),Et(),i.exports=function(t,i,n){var r,e,s,u,o,h,a,c,f,v,d,l,w=n[0],g=n[1],_=n[2];i===t?(t[12]=i[0]*w+i[4]*g+i[8]*_+i[12],t[13]=i[1]*w+i[5]*g+i[9]*_+i[13],t[14]=i[2]*w+i[6]*g+i[10]*_+i[14],t[15]=i[3]*w+i[7]*g+i[11]*_+i[15]):(r=i[0],e=i[1],s=i[2],u=i[3],o=i[4],h=i[5],a=i[6],c=i[7],f=i[8],v=i[9],d=i[10],l=i[11],t[0]=r,t[1]=e,t[2]=s,t[3]=u,t[4]=o,t[5]=h,t[6]=a,t[7]=c,t[8]=f,t[9]=v,t[10]=d,t[11]=l,t[12]=r*w+o*g+f*_+i[12],t[13]=e*w+h*g+v*_+i[13],t[14]=s*w+a*g+d*_+i[14],t[15]=u*w+c*g+l*_+i[15]);return t}}),yi={};!function(t,i){for(var n in i)P(t,n,{get:i[n],enumerable:!0})}(yi,{ChromelessPlayer:function(){return sO},ErrorCategory:function(){return dd},ErrorCode:function(){return vd},Player:function(){return sO},cache:function(){return P6},cast:function(){return k0},features:function(){return hO},players:function(){return cO},registerContentProtectionIntegration:function(){return fO},utils:function(){return oO},version:function(){return aO}}),c.exports=(si=yi,L(P({},"__esModule",{value:!0}),si)),U(),Et(),U(),Et(),U(),Et(),U(),Et(),Pt(),U(),Et(),xt(),H(),U(),Et(),H(),U(),Et(),Ft(),U(),Et(),xt(),H(),U(),Et();var pi=function(t){return t.Sv="web",t.Tv="android",t.Ev="android-tv",t.xv="ios",t.Pv="tvos",t.Iv="chromecast",t.Cv="theoliveweb",t}({});var ki=l?l.userAgent:"",bi=ki.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ai=ki.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ti=ki.match(/Android ([0-9\.]+)/i),Si=ki.match(/Windows NT ([0-9\.]+)/i),Ei=ki.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Ii=ki.match(/Firefox\/([0-9\.]+)/i),Ri=ki.match(/OPR\/(\d+\.\d+)/i),Ci=ki.match(/Tizen ([0-9\.]+)/i),Pi=ki.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Di=ki.match(/HbbTV\/([0-9.]+)/i),Ni=ki.match(/(AFT.*) Build/i),xi=function(){function t(){this.Rv=Boolean("ontouchstart"in self||self.DocumentTouch&&V(v,self.DocumentTouch)||l&&l.msMaxTouchPoints),this.Nv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(ki)||/(macintosh|mac(?=_powerpc)\s)/i.test(ki),this.Mv=/Windows NT/i.test(ki),this.Ov=Si?T(Si[1]):0,this.Uv=/Android/i.test(ki),this.Hv=Ti?T(Ti[1]):0,this.qv=/windows phone (8|8\.1)/i.test(ki),this.Gv=/iPhone/i.test(ki),this.Qv=/iPad/i.test(ki),this.Yv=this.Nv&&this.Rv&&!this.Qv,this.Zv=/iPod/i.test(ki),this.r_=/Mobile Safari/i.test(ki),this.s_=/EOS\d*STB/i.test(ki),this.n_=/APP\d*STB/i.test(ki),this.$v=(this.Gv||this.Qv||this.Yv||this.Zv)&&!this.qv,this.i_=Pi?T(Pi[2]):0,this.h_=this.qv||this.$v||this.Uv||this.r_,this.a_=/CriOS/i.test(ki),this.c_=Boolean(self.chrome&&/google/i.test(l.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(l.userAgent),this.p_=Ai?A(Ai[1],10):0,this.Ng=Boolean(/CriOS/i.test(ki)),this.Dg=Boolean(self.chrome||/Chrome/i.test(ki)||this.Ng),this.f_=bi?A(bi[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(ki),this.A_=Ci?T(Ci[1]):0,this.l_=this.A_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.A_):void 0,this.T_=/webos|web0s/i.test(ki),this.E_=/HbbTV/i.test(ki),this.P_=!!Di&&function(t){if(!t)return!1;var i=t.split(".").map(Number);return 3===i.length&&1===i[0]&&2===i[1]}(Di[1]),this.C_=/AFT.* Build/i.test(ki),this.R_=Ni?Ni[1]:void 0,this.N_=/VIZIO/i.test(ki),this.M_=/Edge\/\d+/i.test(ki),this.O_=/Trident/i.test(ki),this.U_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.H_=/Vivaldi/i.test(ki),this.q_=/Firefox/i.test(ki)&&!/Seamonkey/i.test(ki),this.G_=Ii?T(Ii[1]):0,this.j_=/Safari/i.test(ki)&&!/Chrome/i.test(ki)&&!this.qv&&!this.y_,this.K_=Ei?T(Ei[2]):0,this.J_=Boolean(Ri),this.eg=Ri?T(Ri[1]):0,this.hg=/CrKey/.test(ki),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(ki),this.fg=/PlayStation 4/i.test(ki),this._g=/PlayStation 5/i.test(ki),this.pg="web"===pi.Ev,this.yg="web"===pi.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===pi.xv,this.Pg="web"===pi.Pv,this.Cg="web"===pi.Iv}return Nt(t,[{key:"Ke",get:function(){return this.Rv}},{key:"Dv",get:function(){return this.Nv}},{key:"Bv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Ov}},{key:"Fv",get:function(){return this.Uv}},{key:"Vv",get:function(){return this.Hv}},{key:"Wv",get:function(){return this.qv}},{key:"zv",get:function(){return this.Gv}},{key:"Xv",get:function(){return this.Qv}},{key:"Kv",get:function(){return this.Yv}},{key:"Jv",get:function(){return this.Zv}},{key:"ru",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"e_",get:function(){return this.s_||this.n_}},{key:"vd",get:function(){return this.r_}},{key:"Ks",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"d_",get:function(){var t;return null!=(t=this.l_)?t:this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){var t;return(null==(t=f.chrome)?void 0:t.webview)&&this.p_>0}},{key:"m_",get:function(){return this.p_}},{key:"w_",get:function(){return this.y_}},{key:"b_",get:function(){return this.A_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"x_",get:function(){return this.P_}},{key:"I_",get:function(){return this.C_}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.R_}},{key:"D_",get:function(){return this.N_}},{key:"B_",get:function(){return this.M_}},{key:"L_",get:function(){return this.O_}},{key:"F_",get:function(){return this.U_}},{key:"V_",get:function(){return this.H_}},{key:"W_",get:function(){return this.q_}},{key:"z_",get:function(){return this.G_}},{key:"X_",get:function(){return this.j_}},{key:"Q_",get:function(){return 0===this.K_&&Bi.ru?this.i_:this.K_}},{key:"Y_",get:function(){return this.J_}},{key:"Z_",get:function(){return this.eg}},{key:"rg",get:function(){return this.hg}},{key:"og",get:function(){return this.ag}},{key:"cg",get:function(){return!(!this.S_&&!this.w_)&&this.d_<=56}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"xg",get:function(){return this.Pg}},{key:"Ig",get:function(){return this.Cg}},{key:"Rg",get:function(){return this.Dg}},{key:"IS_IOS_CHROME",get:function(){return this.Ng}}]),t}();xi.Bg=new xi;var Bi=xi.Bg;U(),Et(),ct();var Oi={}.hasOwnProperty,Mi={}.toString;function Li(t){return null!=t}function Fi(t){return void 0===t}var Ui,Vi=Array.isArray||function(t){return"[object Array]"===Mi.call(t)};function Hi(t){return Wi(t)&&Oi.call(t,"length")&&Qi(t.length)}function Wi(t){return"object"===(void 0===t?"undefined":W(t))&&null!==t}function zi(t){return Wi(t)&&t.constructor&&t.constructor===k}function Xi(t){return"string"==typeof t}function qi(t){return"boolean"==typeof t}function Gi(t){return Li(t)&&"function"==typeof t.then}function ji(t){return"[object Date]"===Mi.call(t)}function Qi(t){return"number"==typeof t}function Yi(t){return"function"==typeof t}function Ki(t){return Yi(t)||Wi(t)}function Ji(t){return Wi(t)&&!Vi(t)}function Zi(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function $i(t){for(var i;Li(i=t.firstChild);)t.removeChild(i)}function tn(t,i){for(var n;Li(n=t.firstChild);)i.appendChild(n)}function nn(t){return t&&t.nodeName&&t.nodeName.toLowerCase()||""}function rn(t){var i=t.className;return"string"==typeof i?i:i&&"string"==typeof i.baseVal?i.baseVal:""}function en(t,i){var n=t.className;"string"==typeof n?t.className=i:n&&"string"==typeof n.baseVal&&(n.baseVal=i)}function sn(t,i){if(void 0!==t.classList)t.classList.add(i);else if(void 0!==t.className){var n=rn(t);-1===(" "+n+" ").indexOf(" "+i+" ")&&en(t,(n+" "+i).trim())}}function un(t){t.stopPropagation()}function on(t,i){Bi.w_&&Bi.b_<3?function(t,i){var n=i;switch(i){case"flex":n="-webkit-flex";break;case"inline-flex":n="-webkit-inline-flex"}t.display=n}(t,i):function(t,i){if(t.display=i,t.display!==i){var n=i;switch(i){case"flex":n="-ms-flexbox";break;case"inline-flex":n="-ms-inline-flexbox"}t.display=n}}(t,i)}function hn(t,i){var n=i.style;if(n)for(var r,e=Lt(k.keys(t));!(r=e()).done;){var s=r.value,u=t[s];void 0!==u&&(n[s]=u)}}function an(t){var i=t.style;i.position="absolute",i.left="0",i.right="0",i.top="0",i.bottom="0",i.width="100%",i.height="100%"}function cn(t){var i=t.style;i.position="",i.left="",i.right="",i.top="",i.bottom="",i.width="",i.height=""}function fn(t){t.removeAttribute("title")}function vn(t){try{return Boolean(t)&&t.parent!==t}catch(t){return!1}}U(),Et(),U(),Et();var dn=function(){},ln=function(t){return t};function wn(t,i){var n=-1/0;return function(){for(var r=arguments.length,e=new Array(r),s=0;s=i&&(t.apply(this,e),n=u)}}function gn(t,i){var n=0;return function(){for(var r=arguments.length,e=new Array(r),s=0;sa&&(u=a),e>a&&(e=a),o=s,h=u;;)if(oi?1:S(t)?S(i)?0:1:-1};function On(t,i,n){return Sn(t,i,n)?0:Bn(t,i)}var Mn=function(t,i){return En(t,i)?0:Bn(t,i)};var Ln="function"==typeof Array.prototype.find?function(t,i){return t.find(i)}:function(t,i){var n=Hn(t,i);return-1===n?void 0:t[n]},Fn=Ln,Un="function"==typeof Array.prototype.findLast?function(t,i){return t.findLast(i)}:function(t,i){var n=Wn(t,i);return-1===n?void 0:t[n]},Vn=Un,Hn="function"==typeof Array.prototype.findIndex?function(t,i){return t.findIndex(i)}:function(t,i){for(var n=0;n=0;n-=1){if(i(t[n],n,t))return n}return-1},zn="function"==typeof Array.prototype.at?function(t,i){return t.at(i)}:function(t,i){var n=t.length,r=i>=0?i:n+i;return r<0||r>=n?void 0:t[r]};function Xn(t,i){var n=t.indexOf(i);return-1!==n&&(qn(t,n),!0)}function qn(t,i){0===i?t.shift():t.splice(i,1)}function Gn(t,i){for(var n=new Array(t.length),r=0,e=0;e=0;r--){var e=n.item(r);nn(e)===i&&t.removeChild(e)}}(t,"source"),t.load())}function Ir(){return void 0!==v?v.createElement("video"):void 0}var Rr=_n(Ir),Cr=_n(function(){return"undefined"!=typeof HTMLVideoElement&&V(Rr(),HTMLVideoElement)});function Pr(t){var i=v.createElement(t);return Sr(i)&&i.addEventListener("contextmenu",Br),Nr(i),i}function Dr(t){Nr(t),t.removeEventListener("contextmenu",Br)}function Nr(t){t.removeAttribute("id"),t.removeAttribute("class"),t.removeAttribute("style"),$i(t),Er(t),t.pause(),t.playbackRate=1,t.disableRemotePlayback=!1,t.preload="auto",t.controls=!1,t.style.display="none",Sr(t)&&(t.style.width="100%",t.style.height="100%",t.style.pointerEvents="none",t.playsInline=!0,t.setAttribute("webkit-playsinline",""))}function xr(t,i){if(i.sp){var n=t.muted;t.muted=!0,t.muted=!1,t.muted=n}else if(t.paused){var r=t.play();Gi(r)&&kr(r),t.pause()}}function Br(t){t.preventDefault()}U(),Et(),U(),Et(),U(),Et(),ct();var Or=null;try{Or=new WebAssembly.Instance(new WebAssembly.Module(new E([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(si){}function Mr(t,i,n){this.low=0|t,this.high=0|i,this.unsigned=!!n}function Lr(t){return!0===(t&&t.np)}function Fr(t){var i=b.clz32(t&-t);return t?31-i:i}Mr.prototype.np,k.defineProperty(Mr.prototype,"np",{value:!0}),Mr.isLong=Lr;var Ur={},Vr={};function Hr(t,i){var n,r,e;return i?(e=0<=(t>>>=0)&&t<256)&&(r=Vr[t])?r:(n=zr(t,0,!0),e&&(Vr[t]=n),n):(e=-128<=(t|=0)&&t<128)&&(r=Ur[t])?r:(n=zr(t,t<0?-1:0,!1),e&&(Ur[t]=n),n)}function Wr(t,i){if(S(t))return i?Zr:Jr;if(i){if(t<0)return Zr;if(t>=Qr)return re}else{if(t<=-Yr)return ee;if(t+1>=Yr)return ne}return t<0?Wr(-t,i).neg():zr(t%jr|0,t/jr|0,i)}function zr(t,i,n){return new Mr(t,i,n)}Mr.fromInt=Hr,Mr.fromNumber=Wr,Mr.fromBits=zr;var Xr=b.pow;function qr(t,i,n){if(0===t.length)throw y("empty string");if("number"==typeof i?(n=i,i=!1):i=!!i,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return i?Zr:Jr;if((n=n||10)<2||360)throw y("interior hyphen");if(0===r)return qr(t.substring(1),i,n).neg();for(var e=Wr(Xr(n,8)),s=Jr,u=0;u>>0:this.low},se.toNumber=function(){return this.unsigned?(this.high>>>0)*jr+(this.low>>>0):this.high*jr+(this.low>>>0)},se.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((s=o).isZero())return h+u;for(;h.length<6;)h="0"+h;u=""+h+u}},se.getHighBits=function(){return this.high},se.getHighBitsUnsigned=function(){return this.high>>>0},se.getLowBits=function(){return this.low},se.getLowBitsUnsigned=function(){return this.low>>>0},se.getNumBitsAbs=function(){if(this.isNegative())return this.eq(ee)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,i=31;i>0&&!(t&1<>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},se.isZero=function(){return 0===this.high&&0===this.low},se.eqz=se.isZero,se.isNegative=function(){return!this.unsigned&&this.high<0},se.isPositive=function(){return this.unsigned||this.high>=0},se.isOdd=function(){return!(1&~this.low)},se.isEven=function(){return!(1&this.low)},se.equals=function(t){return Lr(t)||(t=Gr(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},se.eq=se.equals,se.notEquals=function(t){return!this.eq(t)},se.neq=se.notEquals,se.ne=se.notEquals,se.lessThan=function(t){return this.comp(t)<0},se.lt=se.lessThan,se.lessThanOrEqual=function(t){return this.comp(t)<=0},se.lte=se.lessThanOrEqual,se.le=se.lessThanOrEqual,se.greaterThan=function(t){return this.comp(t)>0},se.gt=se.greaterThan,se.greaterThanOrEqual=function(t){return this.comp(t)>=0},se.gte=se.greaterThanOrEqual,se.ge=se.greaterThanOrEqual,se.compare=function(t){if(Lr(t)||(t=Gr(t)),this.eq(t))return 0;var i=this.isNegative(),n=t.isNegative();return i&&!n?-1:!i&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},se.comp=se.compare,se.negate=function(){return!this.unsigned&&this.eq(ee)?ee:this.not().add($r)},se.neg=se.negate,se.add=function(t){Lr(t)||(t=Gr(t));var i=this.high>>>16,n=65535&this.high,r=this.low>>>16,e=65535&this.low,s=t.high>>>16,u=65535&t.high,o=t.low>>>16,h=0,a=0,c=0,f=0;return c+=(f+=e+(65535&t.low))>>>16,a+=(c+=r+o)>>>16,h+=(a+=n+u)>>>16,h+=i+s,zr((c&=65535)<<16|(f&=65535),(h&=65535)<<16|(a&=65535),this.unsigned)},se.subtract=function(t){return Lr(t)||(t=Gr(t)),this.add(t.neg())},se.sub=se.subtract,se.multiply=function(t){if(this.isZero())return this;if(Lr(t)||(t=Gr(t)),Or)return zr(Or.mul(this.low,this.high,t.low,t.high),Or.get_high(),this.unsigned);if(t.isZero())return this.unsigned?Zr:Jr;if(this.eq(ee))return t.isOdd()?ee:Jr;if(t.eq(ee))return this.isOdd()?ee:Jr;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(Kr)&&t.lt(Kr))return Wr(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,n=65535&this.high,r=this.low>>>16,e=65535&this.low,s=t.high>>>16,u=65535&t.high,o=t.low>>>16,h=65535&t.low,a=0,c=0,f=0,v=0;return f+=(v+=e*h)>>>16,c+=(f+=r*h)>>>16,f&=65535,c+=(f+=e*o)>>>16,a+=(c+=n*h)>>>16,c&=65535,a+=(c+=r*o)>>>16,c&=65535,a+=(c+=e*u)>>>16,a+=i*h+n*o+r*u+e*s,zr((f&=65535)<<16|(v&=65535),(a&=65535)<<16|(c&=65535),this.unsigned)},se.mul=se.multiply,se.divide=function(t){if(Lr(t)||(t=Gr(t)),t.isZero())throw y("division by zero");var i,n,r;if(Or)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?zr((this.unsigned?Or.div_u:Or.div_s)(this.low,this.high,t.low,t.high),Or.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?Zr:Jr;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Zr;if(t.gt(this.shru(1)))return te;r=Zr}else{if(this.eq(ee))return t.eq($r)||t.eq(ie)?ee:t.eq(ee)?$r:(i=this.shr(1).div(t).shl(1)).eq(Jr)?t.isNegative()?$r:ie:(n=this.sub(t.mul(i)),r=i.add(n.div(t)));if(t.eq(ee))return this.unsigned?Zr:Jr;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();r=Jr}for(n=this;n.gte(t);){i=b.max(1,b.floor(n.toNumber()/t.toNumber()));for(var e=b.ceil(b.log(i)/b.LN2),s=e<=48?1:Xr(2,e-48),u=Wr(i),o=u.mul(t);o.isNegative()||o.gt(n);)o=(u=Wr(i-=s,this.unsigned)).mul(t);u.isZero()&&(u=$r),r=r.add(u),n=n.sub(o)}return r},se.div=se.divide,se.modulo=function(t){return Lr(t)||(t=Gr(t)),Or?zr((this.unsigned?Or.rem_u:Or.rem_s)(this.low,this.high,t.low,t.high),Or.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},se.mod=se.modulo,se.rem=se.modulo,se.not=function(){return zr(~this.low,~this.high,this.unsigned)},se.countLeadingZeros=function(){return this.high?b.clz32(this.high):b.clz32(this.low)+32},se.clz=se.countLeadingZeros,se.countTrailingZeros=function(){return this.low?Fr(this.low):Fr(this.high)+32},se.ctz=se.countTrailingZeros,se.and=function(t){return Lr(t)||(t=Gr(t)),zr(this.low&t.low,this.high&t.high,this.unsigned)},se.or=function(t){return Lr(t)||(t=Gr(t)),zr(this.low|t.low,this.high|t.high,this.unsigned)},se.xor=function(t){return Lr(t)||(t=Gr(t)),zr(this.low^t.low,this.high^t.high,this.unsigned)},se.shiftLeft=function(t){return Lr(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?zr(this.low<>>32-t,this.unsigned):zr(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):zr(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},se.shr=se.shiftRight,se.shiftRightUnsigned=function(t){return Lr(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?zr(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):zr(32===t?this.high:this.high>>>t-32,0,this.unsigned)},se.shru=se.shiftRightUnsigned,se.shr_u=se.shiftRightUnsigned,se.rotateLeft=function(t){var i;return Lr(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?zr(this.high,this.low,this.unsigned):t<32?(i=32-t,zr(this.low<>>i,this.high<>>i,this.unsigned)):(i=32-(t-=32),zr(this.high<>>i,this.low<>>i,this.unsigned))},se.rotl=se.rotateLeft,se.rotateRight=function(t){var i;return Lr(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?zr(this.high,this.low,this.unsigned):t<32?(i=32-t,zr(this.high<>>t,this.low<>>t,this.unsigned)):(i=32-(t-=32),zr(this.low<>>t,this.high<>>t,this.unsigned))},se.rotr=se.rotateRight,se.toSigned=function(){return this.unsigned?zr(this.low,this.high,!1):this},se.toUnsigned=function(){return this.unsigned?this:zr(this.low,this.high,!0)},se.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},se.toBytesLE=function(){var t=this.high,i=this.low;return[255&i,i>>>8&255,i>>>16&255,i>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},se.toBytesBE=function(){var t=this.high,i=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,i>>>24,i>>>16&255,i>>>8&255,255&i]},Mr.fromBytes=function(t,i,n){return n?Mr.fromBytesLE(t,i):Mr.fromBytesBE(t,i)},Mr.fromBytesLE=function(t,i){return new Mr(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,i)},Mr.fromBytesBE=function(t,i){return new Mr(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],i)},"function"==typeof BigInt&&(Mr.fromBigInt=function(t,i){return zr(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),i)},Mr.fromValue=function(t,i){return"bigint"===(void 0===t?"undefined":W(t))?Mr.fromBigInt(t,i):Gr(t,i)},se.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<=2*ve},Nt(t,[{key:"rp",get:function(){return void 0===this.hp&&(this.hp=this.op()),this.hp}},{key:"ap",get:function(){return Bi.Fv?"android":Bi.Dv?"macos":Bi.ru?"ios":Bi.Bv?"windows":"other"}},{key:"cp",get:function(){return Bi.og?"tv":Bi.Ks?"mobile":"desktop"}},{key:"dp",get:function(){return!Bi.og}},{key:"lp",get:function(){if(f.screen)return{width:f.screen.width*this.fp,height:f.screen.height*this.fp}}},{key:"fp",get:function(){return f.devicePixelRatio||1}},{key:"vp",get:function(){return _e}},{key:"_p",get:function(){return!1}},{key:"gp",get:function(){return!0}},{key:"pp",get:function(){return!!(Bi.X_||Bi.ru||Bi.g_)||!!Bi.D_}},{key:"mp",get:function(){return Bi.D_}},{key:"wp",get:function(){return!Bi.ru}},{key:"yp",get:function(){return!0}},{key:"bp",get:function(){return!0}},{key:"Ap",get:function(){return!1}},{key:"Sp",get:function(){}},{key:"Tp",get:function(){return!0}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){return Bi.D_}},{key:"xp",get:function(){return!1}},{key:"Cp",get:function(){return!1}},{key:"Rp",get:function(){return!1}},{key:"Dp",get:function(){return!0}}]),t}(),ye=function(t){function i(){return t.call(this)||this}return Ct(i,t),i}(me);U(),Et(),xt(),Pt();var pe=function(t){function i(){return t.apply(this,arguments)||this}return Ct(i,t),i.prototype.Pp=function(t,i){if(t&&t.Bp&&i&&i.Bp){var n=ke(t.Bp,"mp4a.40.2")&&ke(i.Bp,"mp4a.40.5"),r=ke(t.Bp,"mp4a.40.5")&&ke(i.Bp,"mp4a.40.2"),e=ke(t.Bp,"mp4a.40.2")&&ke(i.Bp,"mp4a.40.34"),s=ke(t.Bp,"mp4a.40.34")&&ke(i.Bp,"mp4a.40.2"),u=ke(t.Bp,"mp4a.40.5")&&ke(i.Bp,"mp4a.40.34"),o=ke(t.Bp,"mp4a.40.34")&&ke(i.Bp,"mp4a.40.5");return!(n||r||e||s||u||o)}return!0},Nt(i,[{key:"Sp",get:function(){if(Bi.Dv)return 4096}}]),i}(ye);function ke(t,i){return t.indexOf(i)>-1}U(),Et(),Pt();var be=function(t){function i(){return t.apply(this,arguments)||this}return Ct(i,t),i.prototype.Ip=function(t){return t>=2},i}(ye);U(),Et(),xt(),Pt();var Ae=function(t){function i(){var i;return(i=t.call(this)||this).Np=Bi.Q_>=11,i.sp=Bi.X_&&!(Bi.ru&&Bi.Q_<10),i}return Ct(i,t),Nt(i,[{key:"xp",get:function(){return Bi.Q_<17}},{key:"Cp",get:function(){return!0}}]),i}(ye);U(),Et(),xt(),Pt();var Te,Se=function(t){function i(){return t.apply(this,arguments)||this}return Ct(i,t),Nt(i,[{key:"Tp",get:function(){return!(Bi.d_>=133)}}]),i}(ye);U(),Et(),U(),Et(),xt(),Pt(),U(),Et(),xt(),Pt(),U(),Et(),xt(),Pt(),U(),Et();var Ee=function(){var t=Ir();if(!t)return!1;var i=t.muted;return t.muted=!i,t.muted!==i}();!function(){if(Bi.Kv)return!1;var t=Ir();if(!t)return!1;var i=t.volume;t.volume=i/2+.1,t.volume}();var Ie=function(t){function i(i){var n;return(n=t.call(this)||this).Mp=void 0,n.Mp=i,n.Np=n.Mp.Np,n.Ke=n.Mp.Ke,n.sp=Ee&&n.Mp.sp,n}Ct(i,t);var n=i.prototype;return n.op=function(){return this.Mp.rp},n.Pp=function(t,i){return this.Mp.Pp(t,i)},n.Ip=function(t){return this.Mp.Ip(t)},Nt(i,[{key:"Sp",get:function(){return this.Mp.Sp}},{key:"Tp",get:function(){return this.Mp.Tp}},{key:"xp",get:function(){return this.Mp.xp}}]),i}(me),Re=function(t){function i(i){var n;return(n=t.call(this,i)||this).Np=!0,n.Ks=!0,n}return Ct(i,t),Nt(i,[{key:"Ap",get:function(){return Bi.ru}}]),i}(Ie);U(),Et();var Ce=function(){function t(t){this.Op=void 0,this.Op=Pe(t)}var i=t.prototype;return i.Lp=function(){return new this.Op},i.Fp=function(t){return this.Op.isTypeSupported(t)},t}();function Pe(t){return t&&Ki(f.ManagedMediaSource)?f.ManagedMediaSource:Ki(f.MediaSource)?f.MediaSource:void 0}var De=function(t){function i(){return t.apply(this,arguments)||this}return Ct(i,t),i.prototype.op=function(){return Pe(!0)?t.prototype.op.call(this):1},Nt(i,[{key:"Ap",get:function(){return!0}}]),i}(Re);U(),Et(),xt(),Pt();var Ne=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Up=void 0,i}return Ct(i,t),i.prototype.Pp=function(i,n){return t.prototype.Pp.call(this,i,n)},Nt(i,[{key:"_p",get:function(){return Bi.b_<3}},{key:"gp",get:function(){return Bi.b_>=3}},{key:"lp",get:function(){var t=this;return f.tizen&&!this.Up&&f.tizen.systeminfo.getPropertyValue("DISPLAY",function(i){var n=i.resolutionWidth,r=i.resolutionHeight;1===n&&1===r||(t.Up={width:n,height:r})}),this.Up}},{key:"kp",get:function(){return Bi.b_<3}}]),i}(Ie);U(),Et(),xt(),Pt();var xe=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Up=void 0,i}return Ct(i,t),Nt(i,[{key:"lp",get:function(){var t=this;return f.webOS&&!this.Up&&f.webOS.deviceInfo(function(i){t.Up={width:i.screenWidth,height:i.screenHeight}}),this.Up}},{key:"yp",get:function(){return!1}}]),i}(Ie);U(),Et(),xt(),Pt();var Be=function(t){function i(){return t.apply(this,arguments)||this}return Ct(i,t),Nt(i,[{key:"Ap",get:function(){return!0}},{key:"Cp",get:function(){return this.Mp.Cp}}]),i}(Ie);U(),Et(),xt(),Pt();var Oe=function(t){function i(){return t.apply(this,arguments)||this}return Ct(i,t),Nt(i,[{key:"Rp",get:function(){return Bi.IS_FIRETV_AFTMM}}]),i}(Ie);!function(t){Te=t}(function(){var t=function(){if(Bi.W_)return new pe;if(Bi.B_||Bi.L_)return new be;if(Bi.X_)return new Ae;if(Bi.Rg)return new Se;return new ye}();return Bi.ru?new De(t):Bi.I_?new Oe(t):Bi.Ks?new Re(t):Bi.w_?new Ne(t):Bi.S_?new xe(t):Bi.Dv?new Be(t):new Ie(t)}()),U(),Et(),xt(),Pt(),U(),Et(),xt(),H(),ct(),U(),Et();var Me=!(Bi.L_&&!Bi.F_),Le=self.console;function Fe(t){if(Wi(t))try{return JSON.stringify(t)}catch(t){}return t}function Ue(t){return t.map(Fe).join(" ")}function Ve(t){var i=Le&&Le[t];return i?i.bind&&Me?i.bind(Le):function(){for(var i=arguments.length,n=new Array(i),r=0;r1?i-1:0),r=1;r1?i-1:0),r=1;ra&&(s=a),u>a&&(u=a),o=e,h=s;;)if(o=65&&t<=90}function os(t){return us(t)||function(t){return t>=97&&t<=122}(t)}function hs(t){return t>=48&&t<=57}function as(t){return hs(t)||os(t)}function cs(t){return hs(t)||t>=65&&t<=70||t>=97&&t<=102}function fs(t){return us(t)?t+32:t}function vs(t){return hs(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function ds(t,i){return void 0===i&&(i=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(i?87:55):-1}var ls=b.min,ws=String.fromCharCode;function gs(t){for(var i=t.length,n=[],r=0;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ks=b.floor,bs=String.fromCharCode;function As(t){throw new RangeError(ps[t])}function Ts(t){for(var i=[],n=0,r=t.length;n=55296&&e<=56319&&n>1,t+=ks(t/i);t>455;r+=36)t=ks(t/35);return ks(r+36*t/(t+38))},Ps=function(t){return function(t,i){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]);var e=function(t,i){for(var n=[],r=t.length;r--;)n[r]=i(t[r]);return n}((t=t.replace(ys,".")).split("."),i).join(".");return r+e}(t,function(t){return ms.test(t)?"xn--"+function(t){for(var i=[],n=(t=Ts(t)).length,r=128,e=0,s=72,u=0,o=t;u=r&&lks((_s-e)/w)&&As("overflow"),e+=(f-r)*w,r=f;for(var g=0,_=t;g<_.length;g++){var m=_[g];if(m_s&&As("overflow"),m==r){for(var y=e,p=36;;p+=36){var k=p<=s?1:p>=s+26?26:p-s;if(y65535&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r)}return gs(i)}function Ns(t){if(t>=55296&&t<=57343)throw new y("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function xs(t,i){return t>>i&63|128}function Bs(t,i){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(i.push(t>>18&7|240),i.push(xs(t,12)),i.push(xs(t,6))):(Ns(t),i.push(t>>12&15|224),i.push(xs(t,6))):i.push(t>>6&31|192),i.push(63&t|128)):i.push(t)}function Os(t){for(var i=[],n=0;n=Es)throw new y("Invalid byte index");var t=255&Ss[Is];if(Is++,128==(192&t))return 63&t;throw new y("Invalid continuation byte")}function Ls(){var t,i;if(Is>Es)throw new y("Invalid byte index");if(Is===Es)return!1;if(t=255&Ss[Is],Is++,!(128&t))return t;if(192==(224&t)){if((i=(31&t)<<6|Ms())>=128)return i;throw new y("Invalid continuation byte")}if(224==(240&t)){if((i=(15&t)<<12|Ms()<<6|Ms())>=2048)return Ns(i),i;throw new y("Invalid continuation byte")}if(240==(248&t)&&(i=(7&t)<<18|Ms()<<12|Ms()<<6|Ms())>=65536&&i<=1114111)return i;throw new y("Invalid UTF-8 detected")}function Fs(t){return[37,ds(t>>4),ds(15&t)]}function Us(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Vs(t){return Us(t)||32===t||34===t||60===t||62===t||96===t}function Hs(t){return Vs(t)||35===t||63===t||123===t||125===t}function Ws(t){return Hs(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function zs(t){return t<33||t>126||34===t||35===t||60===t||62===t}function Xs(t){return zs(t)||39===t}function qs(t,i){if(!i(t))return[t];for(var n=Os([t]),r=[],e=0;e6)throw new p;for(var h=0;s0){if(!("."===t[s]&&h<4))throw new p;s+=1}if(!Ye.test(t[s]))throw new p;for(;s255)throw new p}s+=1}n[r]=n[r]<<8|a,2!==(h+=1)&&4!==h||(r+=1)}if(4!==h)throw new p;break}if(":"===t[s]){if((s+=1)===i)throw new p}else if(s0;)ss(n,r,e+f-1),r-=1,f-=1}else if(8!==r)throw new p;return n}function Ks(t){var i=10,n=Ze;return Je.test(t)?(t=t.slice(2),i=16,n=$e):t.length>=2&&"0"===t[0]&&(t=t.slice(1),i=8,n=ts),""===t?0:n.test(t)?A(t,i):void 0}var Js={Vp:4},Zs=/[\0\t\n\r #%/:?@\[\\\]]/,$s=/[\0\t\n\r #/:?@\[\\\]]/;function tu(t,i){if("["===t[0]){if("]"!==t[t.length-1])throw new p("Invalid IPv6 address");return{Vp:2,Hp:Ys(t.slice(1,-1))}}if(!i)return function(t){if($s.test(t))throw new p("Invalid code point in opaque host");var i=Gs(t,Us);return""===i?Js:{Vp:3,Wp:i}}(t);var n=function(t){var i=function(t){return Ps(t.toLowerCase())}(t);return i}(Qs(t));if(Zs.test(n))throw new p("Invalid code point in host");var r=function(t){var i=t.split(".");if(""===i[i.length-1]&&i.pop(),!(i.length>4)){for(var n=[],r=0;r255)throw new p;if(n[n.length-1]>=b.pow(256,5-n.length))throw new p;for(var o=n.pop(),h=0;h>>=8;return i.reverse().join("")}(t.Hp);case 2:return"["+function(t){for(var i="",n=function(t){for(var i=0,n=0,r=0,e=0,s=0;s<8;s++)0===t[s]?(0===e&&(r=s),e++):(e>n&&(i=r,n=e),e=0);return e>n&&(i=r,n=e),n>1?i:null}(t),r=!1,e=0;e<8;e++){if(r){if(0===t[e])continue;r=!1}n!==e?(i+=t[e].toString(16),7!==e&&(i+=":")):(i+=0===e?"::":":",r=!0)}return i}(t.Hp)+"]";case 3:return t.Wp;case 4:return""}}var nu=/\+/g;function ru(t){return 42===t||45===t||46===t||95===t||as(t)}function eu(t){for(var i=t.split("&"),n=[],r=0;r0&&(i+="&"),i+=uu(Os(Ts(r[0])))+"="+uu(Os(Ts(r[1])))}return i}function uu(t){for(var i=[],n=0;n0&&"?"===t[0]&&(t=t.slice(1)),this.zp=eu(t)}var i=t.prototype;return i.append=function(t,i){t=hu(t),i=hu(i),this.zp.push([t,i]),wu(this)},i.delete=function(t){t=hu(t);for(var i=this.zp,n=0;n=2))return!1;if(!xu(t.slice(0,2)))return!1;if(2!==i){var n=t[2];if(47!==n&&92!==n&&63!==n&&35!==n)return!1}return!0}function Nu(t){return 2===t.length&&Qe.test(t[0])&&(":"===t[1]||"|"===t[1])}function xu(t){return 2===t.length&&Nu(gs(t))}function Bu(t){return Nu(t)&&":"===t[1]}function Ou(t){var i=t.Jp;0!==i.length&&("file"===t.Qp&&1===i.length&&Bu(i[0])||i.pop())}function Mu(t){return null===t.Zp||Js===t.Zp||t.$p||"file"===t.Qp}var Lu=-1,Fu=/\t|\n|\r/g,Uu=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Vu(t,i,n,r){void 0===n&&(n=null),void 0===r&&(r=null),n||(n=new Wu,t=t.replace(Uu,""));var e=null!==r?r:0;i=i||null;for(var s=[],u=!1,o=!1,h=!1,a=Ts(t=t.replace(Fu,"")),c=a.length,f=0;f<=c;){var v=f65535)throw new p("Invalid port");n.im=y===Au[n.Qp]?null:y,s.length=0}if(null!==r)return;e=16,f-=1}break;case 13:n.Qp="file",47===v||92===v?e=14:i&&"file"===i.Qp?Lu===v?(n.Zp=i.Zp,n.Jp=i.Jp.slice(),n.Gp=i.Gp):63===v?(n.Zp=i.Zp,n.Jp=i.Jp.slice(),n.Gp="",e=19):35===v?(n.Zp=i.Zp,n.Jp=i.Jp.slice(),n.Gp=i.Gp,n.nm="",e=20):(Du(a.slice(f))||(n.Zp=i.Zp,n.Jp=i.Jp.slice(),Ou(n)),e=17,f-=1):(e=17,f-=1);break;case 14:47===v||92===v?e=15:(i&&"file"===i.Qp&&!Du(a.slice(f))&&(Bu(i.Jp[0])?n.Jp.push(i.Jp[0]):n.Zp=i.Zp),e=17,f-=1);break;case 15:if(Lu===v||47===v||92===v||63===v||35===v)if(f-=1,null===r&&xu(s))e=17;else if(0===s.length){if(n.Zp=Js,null!==r)return;e=16}else{var k=tu(Ds(s),Cu(n));if(0===k.Vp&&"localhost"===k.qp&&(k=Js),n.Zp=k,null!==r)return;s.length=0,e=16}else s.push(v);break;case 16:Cu(n)?(e=17,47!==v&&92!==v&&(f-=1)):null===r&&63===v?(n.Gp="",e=19):null===r&&35===v?(n.nm="",e=20):Lu!==v&&(e=17,47!==v&&(f-=1));break;case 17:if(Lu===v||47===v||Cu(n)&&92===v||null===r&&(63===v||35===v)){var b=Ds(s);if(Iu(b)?(Ou(n),47===v||Cu(n)&&92===v||n.Jp.push("")):!Eu(b)||47===v||Cu(n)&&92===v?Eu(b)||("file"===n.Qp&&0===n.Jp.length&&xu(s)&&(Js!==n.Zp&&null!==n.Zp&&(n.Zp=Js),s[1]=58,b=Ds(s)),n.Jp.push(b)):n.Jp.push(""),s.length=0,"file"===n.Qp&&(Lu===v||63===v||35===v))for(;n.Jp.length>1&&""===n.Jp[0];)n.Jp.shift();63===v?(n.Gp="",e=19):35===v&&(n.nm="",e=20)}else s.push.apply(s,qs(v,Hs));break;case 18:63===v?(n.Gp="",e=19):35===v?(n.nm="",e=20):Lu!==v&&(n.Jp[0]+=Ds(qs(v,Us)));break;case 19:null===r&&35===v?(n.nm="",e=20):Lu!==v&&(n.Gp+=Ds(qs(v,Cu(n)?Xs:zs)));break;case 20:Lu===v||0===v||(n.nm+=Ds(qs(v,Vs)))}f++}return n}function Hu(t,i,n,r){try{Vu(t,i,n,r)}catch(t){}}var Wu=function(){this.Qp="",this.Kp="",this.Yp="",this.Zp=null,this.im=null,this.Jp=[],this.Gp=null,this.nm=null,this.$p=!1};function zu(t){switch(t.Qp){case"blob":var i;try{i=Vu(t.Jp[0],null)}catch(t){return bu}return zu(i);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,i,n){return t+"://"+iu(i)+(null===n?"":":"+n)}(t.Qp,t.Zp,t.im);default:return bu}}var Xu=function(){function t(t,i){var n,r=null;if(null!=i)if(function(t){return null!=t&&t instanceof Xu&&"object"==typeof t.rc}(i))r=i.rc;else try{r=Vu(String(i),null)}catch(t){throw new p("Invalid base URL: "+t.message)}try{n=Vu(String(t),r)}catch(t){throw new p("Invalid URL: "+t.message)}var e=n.Gp;this.rc=n,this.Gp=function(t){var i=new gu;return null!==t&&lu(i,t),i}(e),this.Gp.rc=this}var i=t.prototype;return i.toString=function(){return this.href},i.toJSON=function(){return this.href},function(t,i,n){i&&qe(t.prototype,i),n&&qe(t,n)}(t,[{key:"href",get:function(){return function(t,i){void 0===i&&(i=!1);var n=t.Qp+":";if(null!==t.Zp?(n+="//",Pu(t)&&(n+=t.Kp,""!==t.Yp&&(n+=":"+t.Yp),n+="@"),n+=iu(t.Zp),null!==t.im&&(n+=":"+t.im)):null===t.Zp&&"file"===t.Qp&&(n+="//"),t.$p)n+=t.Jp[0];else for(var r=0,e=t.Jp;r1?i-1:0),r=1;r>>=1);)r+=r;return e},Wo="function"==typeof String.prototype.padStart?function(t,i,n){return void 0===n&&(n=" "),t.padStart(i,n)}:function(t,i,n){void 0===n&&(n=" ");var r=n,e=(0|i)-t.length;return e<=0?t:(e>r.length&&(r+=Ho(r,e/r.length)),r.slice(0,e)+t)},zo=(String.prototype.padEnd,16384),Xo="function"==typeof String.fromCodePoint?function(t){var i;return t.length<=zo?(i=String).fromCodePoint.apply(i,[].concat(t)):Go(t,String.fromCodePoint)}:function(t){for(var i,n=[],r=Lt(t);!(i=r()).done;){var e=i.value;e>65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return qo(n)};function qo(t){var i;return t.length<=zo?(i=String).fromCharCode.apply(i,[].concat(t)):Go(t,String.fromCharCode)}function Go(t,i){for(var n=[],r=0;r=42||Bi.W_&&Bi.z_>=38||Bi.B_||Bi.F_||Bi.Y_&&Bi.Z_>=29;function Yo(t,i){return Lo(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[Yu({contentType:t},i?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Yu({contentType:t},i?{robustness:"SW_SECURE_CRYPTO"}:{})]}}function Ko(){return void 0!==l&&"function"==typeof l.requestMediaKeySystemAccess}function Jo(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest}var Zo=function(){function t(t){this.hw=void 0,this.ew=Ju(),this.ow=void 0,this.hw=t}var i=t.prototype;return i.Am=function(){return this.Tm(Ro)},i.pm=function(){return this.Tm(Do)},i.ym=function(){return this.Tm(Io)},i.wm=function(){return this.Tm(Co)},i.Tm=function(t){var i=t.$m,n=this.ew.get(i);if(n)return n;var r=this.Sm(t,'video/mp4; codecs="avc1.42000a"');return this.ew.set(i,r),r},i.Sm=function(t,i){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,7]),[4,this.hw.nw(t.Ym,[Yo(i,!0)])];case 1:return n.sent(),[2,!0];case 2:n.sent(),n.label=3;case 3:return n.trys.push([3,5,,6]),[4,this.hw.nw(t.Ym,[Yo(i,!1)])];case 4:return n.sent(),[2,!0];case 5:return n.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}})}).call(this)},i._m=function(){return this.ow||(this.ow=this.aw()),this.ow},i.aw=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return"https:"===f.location.protocol?[2,!1]:Qo?[4,this.pm()]:[2,!1];case 1:return t.sent()?[2,!1]:[2,!0]}})}).call(this)},t}();function $o(t,i,n){if("function"==typeof n)n.call(t,i);else for(var r,e=Lt(n);!(r=e()).done;){r.value.call(t,i)}}U(),Et(),U(),Et(),Wt(),Ft(),Qt(),U(),Et(),Wt(),xt(),Qt(),U(),Et(),Wt(),Qt(),U(),Et(),xt(),Pt(),U(),Et(),Pt(),Ft();var th=function(){function t(t){var i=this;this.cw=Ku(),this.fw=void 0,this.dw=0,this._w=void 0,this.Rs=function(t){i.So(t)},this._w=null!=t?t:this}var i=t.prototype;return i.wn=function(t,i){if("function"==typeof i)if("string"==typeof t)this.uw(t,i);else for(var n,r=Lt(t);!(n=r()).done;){var e=n.value;this.uw(e,i)}},i.uw=function(t,i){var n=this.cw[t];void 0===n?this.cw[t]=i:"function"==typeof n?this.cw[t]=[n,i]:0===this.dw?n.push(i):this.cw[t]=n.concat(i)},i.lw=function(t){if("function"==typeof t){var i=this.fw;void 0===i?this.fw=t:"function"==typeof i?this.fw=[i,t]:0===this.dw?i.push(t):this.fw=i.concat(t)}},i.Vo=function(){this.cw=Ku(),this.fw=void 0},i.So=function(t){this.dw++;var i=this.cw[t.type],n=this.fw;void 0!==i&&$o(this._w,t,i),void 0!==n&&$o(this._w,t,n),this.dw--},i.mn=function(t,i){if("function"==typeof i)if("string"==typeof t)this.gw(t,i);else for(var n,r=Lt(t);!(n=r()).done;){var e=n.value;this.gw(e,i)}},i.gw=function(t,i){var n=this.cw[t];void 0!==n&&("function"==typeof n?n===i&&(this.cw[t]=void 0):0===this.dw?Xn(n,i):this.cw[t]=Gn(n,i))},i.pw=function(t){if("string"==typeof t)this.cw[t]=void 0;else for(var i,n=Lt(t);!(i=n()).done;){var r=i.value;this.cw[r]=void 0}},i.mw=function(t){var i=this.fw;void 0!==i&&("function"==typeof i?i===t&&(this.fw=void 0):0===this.dw?Xn(i,t):this.fw=Gn(i,t))},i.ww=function(t,i){var n=this;return new ut(function(r,e){if(i&&i.Hg)return e(new fr);var s=function(t){o(),r(t)},u=function(){o(),e(new fr)},o=function(){n.mn(t,s),i&&i.jg(u)};n.wn(t,s),i&&i.Xg(u)})},t}(),ih=function(t){function i(){return t.apply(this,arguments)||this}return Ct(i,t),i.prototype.So=function(i){var n=this;pr(function(){t.prototype.So.call(n,i)})},i}(th),nh=function(t){function i(){return t.apply(this,arguments)||this}Ct(i,t);var n=i.prototype;return n.lw=function(i){t.prototype.lw.call(this,i)},n.mw=function(i){t.prototype.mw.call(this,i)},i}(th);U(),Et(),Pt(),U(),Et();var rh=function(t,i){void 0===i&&(i=new Date),this.type=void 0,this.date=void 0,this.type=t,this.date=i};U(),Et();var eh=function(t){return t.yw="Aw",t.Sw="Tw",t.Ew="contentprotectionerror",t.xw="contentprotectionsuccess",t.Pw="currentsourcechange",t.Iw="destroy",t.Cw="durationchange",t.Rw="emptied",t.Dw="encrypted",t.Nw="ended",t.Bw="Mw",t.Lw="Ow",t.Fw="Uw",t.Vw="Hw",t.Ww="loadstart",t.qw="manifestupdate",t.zw="nosupportedrepresentationfound",t.Gw="offline",t.Xw="online",t.jw="pause",t.uo="play",t.Qw="progress",t.Kw="ratechange",t.Yw="representationchange",t.Jw="resize",t.Zw="seeked",t.$w="seeking",t.iy="segmenterror",t.ey="segmentnotfound",t.sy="manifesterror",t.oy="uy",t.ly="vy",t._y="gy",t.do="sourcechange",t.py="timeupdate",t.wy="volumechange",t.yy="by",t.Ay="Sy",t.LICENSE_REQUEST_GENERATED="Ty",t.Ey="metricschange",t}({}),sh=["cenc"],uh=["cbcs","cbcs-1-9"],oh=function(t){function i(i){var n;return(n=t.call(this,eh.Ay)||this).xy=void 0,n.xy=i,n}return Ct(i,t),i}(rh),hh=function(t){function i(i){var n;return(n=t.call(this,eh.LICENSE_REQUEST_GENERATED)||this).Py=void 0,n.Py=i,n}return Ct(i,t),i}(rh),ah=function(t){function i(i,n,r,e){var s;return(s=t.call(this,"Iy")||this).Cy=void 0,s.Ry=void 0,s.Iy=void 0,s.Dy=void 0,s.Cy=i,s.Ry=n,s.Iy=r,s.Dy=e,s}return Ct(i,t),i}(rh),ch=function(t){function i(){return t.call(this,"lt")||this}return Ct(i,t),i}(rh),fh=function(t){return t.Dw="Ny",t.By="My",t}({}),vh=function(t){function i(i,n){var r;return(r=t.call(this,"Ny")||this).Jm=void 0,r.Py=void 0,r.Jm=i,r.Py=n,r}return Ct(i,t),i}(rh),dh=function(t){function i(){return t.call(this,"My")||this}return Ct(i,t),i}(rh);U(),Et(),xt(),Ft(),U(),Et(),Ft(),U(),Et();var lh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),wh=/[\t\n\f\r ]/g;function gh(t){return 43===t?62:47===t?63:t>=48&&t<=57?t-48+52:t>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:_h()}function _h(){throw new y("Invalid base64 input")}function mh(t){var i=t;wh.test(i)&&(i=i.replace(wh,""));var n=i.length;n%4==0&&n>=1&&"="===i[n-1]&&(n>=2&&"="===i[n-2]?n-=2:n-=1,i=i.substr(0,n));var r=n%4;if(1===r)return _h();for(var e,s=0===r?0:4-r,u=new E(function(t,i){return 3*(t+i)/4-i}(n,s)),o=s>0?n-4:n,h=0,a=0;h>16&255,u[a++]=e>>8&255,u[a++]=255&e;return 2===s?(e=gh(i.charCodeAt(h))<<2|gh(i.charCodeAt(h+1))>>4,u[a++]=255&e):1===s&&(e=gh(i.charCodeAt(h))<<10|gh(i.charCodeAt(h+1))<<4|gh(i.charCodeAt(h+2))>>2,u[a++]=e>>8&255,u[a++]=255&e),u}function yh(t,i,n){return lh[t>>2]+lh[(3&t)<<4|i>>4]+lh[(15&i)<<2|n>>6]+lh[63&n]}function ph(t,i,n){for(var r=[],e=i;e>2]+lh[(3&u)<<4]+"==")}else if(2===n){var o=t[i-2],h=t[i-1];r.push(lh[o>>2]+lh[(3&o)<<4|h>>4]+lh[(15&h)<<2]+"=")}return r.join("")}function bh(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/[=]/g,"")}function Ah(t,i){var n=i.ac,r=t.getUint8(n>>3),e=1<<7-(7&n);return i.Ly(1),(r&e)===e?1:0}function Th(t,i,n){for(var r=0,e=0;e>16;return n&&(i-=16,t=n),(n=t>>8)&&(i-=8,t=n),(n=t>>4)&&(i-=4,t=n),(n=t>>2)&&(i-=2,t=n),(n=t>>1)?i-2:i-t};function Ih(t){if(t>=55296&&t<=57343)throw new y("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Rh(t,i){return t>>i&63|128}function Ch(t,i){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(i.push(t>>18&7|240),i.push(Rh(t,12)),i.push(Rh(t,6))):(Ih(t),i.push(t>>12&15|224),i.push(Rh(t,6))):i.push(t>>6&31|192),i.push(63&t|128)):i.push(t)}function Ph(t,i){if(i.ac>=t.length)throw new y("Invalid byte index");var n=255&t[i.ac];if(i.Ly(1),128==(192&n))return 63&n;throw new y("Invalid continuation byte")}function Dh(t,i){var n=i.ac;if(n>t.length)throw new y("Invalid byte index");if(n===t.length)return!1;var r=255&t[n];if(i.Ly(1),!(128&r))return r;if(192==(224&r)){var e=(31&r)<<6|Ph(t,i);if(e>=128)return e;throw new y("Invalid continuation byte")}if(224==(240&r)){var s=(15&r)<<12|Ph(t,i)<<6|Ph(t,i);if(s>=2048)return Ih(s),s;throw new y("Invalid continuation byte")}if(240==(248&r)){var u=(7&r)<<18|Ph(t,i)<<12|Ph(t,i)<<6|Ph(t,i);if(u>=65536&&u<=1114111)return u}throw new y("Invalid UTF-8 detected")}U(),Et(),U(),Et(),Ft();var Nh=[128,64,32,16,8,4,2,1],xh=function(){function t(t){this.Vy=void 0,this.Vy=t}return t.prototype.Uy=function(t){return Bh(this.Vy,t)},t}();function Bh(t,i){return(t&i)===i}function Oh(t,i){return Bh(t,Nh[i])}function Mh(t,i){var n=t.getUint8(i.ac);return i.Ly(1),n}function Lh(t,i,n){t.setUint8(i.ac,n),i.Ly(1)}function Fh(t,i,n){var r=wa(ma(t),i.ac,i.ac+n);return i.Ly(r.byteLength),r}function Uh(t,i,n){ma(t).set(ma(n),i.ac),i.Ly(n.byteLength)}function Vh(t,i,n){return i.ac+n<=t.byteLength}function Hh(t,i,n,r){return void 0===r&&(r=!1),r?function(t,i,n){for(var r=0,e=1,s=0;s=55296&&e<=56319&&n>8-this.ib;return(r<0?1:0}},k.defineProperty(t.prototype,"bitLength",{get:function(){return this.$y.bitLength-this.ib},enumerable:!1,configurable:!0}),k.defineProperty(t.prototype,"length",{get:function(){return this.$y.length},enumerable:!1,configurable:!0}),t}();U(),Et(),U(),Et();b.pow(2,-52);function Ka(t,i,n){return b.min(b.max(t,i),n)}function Ja(t){if(t<=0)return 0;for(var i=0;t>>i>0;)i++;return i>0&&t===1<>8-i}function $a(t,i){return t&(1<7&&(this.sb++,this.hb=0)},t.prototype.seek=function(t,i){this.sb=t,this.hb=i},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new y("Cannot read past end of buffer.");return this.eb.get(this.sb)>>7-this.hb&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new y("Cannot read past end of buffer.");if(0===this.hb)return this.eb.get(this.sb++);var t=$a(this.eb.get(this.sb),8-this.hb),i=Za(this.eb.get(this.sb+1),this.hb);return this.sb++,t<32)throw new y("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new y("Cannot read past end of buffer.");var i=0;if(0===this.hb&&t%8==0)for(var n=t-8;n>=0;n-=8)i|=this.readByte()<=0;n--)i|=this.readBit()<32)throw new y("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new y("Cannot read past end of buffer.");var i=this.readUInt(t);return 0===(i&1<>3,this.hb=7&i},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new y("Cannot read past end of buffer.");for(var i=[],n=0;ni?1:S(t)?S(i)?0:1:-1},nc=function(){function t(){this.ob=[],this.ub=[],this.fb=0}return t.from=function(){for(var i=[],n=0;n=this.length)){var i=this.findContainingBufferIndex(t),n=t-this.ub[i];return this.ob[i][n]}},k.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.ob.length<1)return-1;if(this.ob.length>1){var i=this.join();this.clear(),this.pushRange(i)}var n=this.ob[0];return"number"==typeof t?Qa(n,t):"undefined"!=typeof Buffer?Buffer.from(n.buffer,n.byteOffset,n.byteLength).indexOf(t):function(t,i){if(0===i.length)return 0;for(var n=i[0],r=i.length,e=t.length-r,s=0;s<=e&&!((s=Qa(t,n,s))<0||s>e);s++){for(var u=s+1,o=s+r,h=1;u4)throw new y("Expected byteLength to be between 0 and 4 but was "+i);if(t<0||t>this.length-i)throw new y("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-i)+")");if(1===i)return this.get(t);for(var n=0,r=0;re)return new t;if(r===e)return new t;for(var s=new t,u=this.findContainingBufferIndex(r),o=this.ob[u],h=r,a=h-this.ub[u];h+o.length-a=0&&n>=0;){if(0!==r[e])break;if(0===e){if(0===n)return new t;n-=1,e=(r=this.ob[n]).length-1}else e-=1;i-=1}return this.slice(0,i+1)},t}(),rc=function(){function t(i){this._b=i||t.BUFFER_CHUNK_SIZE,this.gb=!1,this.pb=new nc,this.eb=new E(this._b),this.mb=0,this.wb=0,this.hb=7}return t.prototype.closeByte=function(){this.eb[this.mb++]=this.wb,this.mb>=this._b&&this.closeBuffer(),this.wb=0,this.hb=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.mb&&(this.pb.pushRange(this.eb,0,this.mb),t&&(this.eb=new E(this._b)),this.mb=0)},k.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.hb},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.gb)throw new y("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.gb=!0,this.pb},t.prototype.writeBit=function(t){if(this.gb)throw new y("Cannot write to a closed BitWriter.");this.wb|=t<32)throw new y("The max bitlength that can be provided is 32.");if(t>=b.pow(2,i))throw new y("Uint "+t+" cannot be represented in "+i+" bit(s).");if(this.isWritingStartBit&&i%8==0)for(var n=i-8;n>=0;n-=8)this.writeByte(t>>n&255);else for(n=i-1;n>=0;n--)this.writeBool((t&1<0)},t.prototype.writeInt=function(t,i){if(i>32)throw new y("The max bitlength that can be provided is 32.");if(b.abs(t)>=b.pow(2,i-1))throw new y("Signed integer "+t+" cannot be represented in "+i+" bit(s).");t<0?this.writeUInt(t+b.pow(2,i),i):this.writeUInt(t,i)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new y("Received a negative number.");for(var i=b.floor(b.log2(t+1))+1,n=0;n=t.LARGE_SIZE/8,e=16===this.boxType.length;i.writeUInt(r?1:n,32),i.writeString(e?"uuid":this.boxType),r&&(i.writeUInt(b.floor(n/t.LARGE_SIZE),32),i.writeUInt(n%t.LARGE_SIZE,32)),e&&i.writeString(this.boxType)},t.prototype.getSize=function(){var i=8+(this.boxType.length>4?16:0),n=this.getBoxContentSize()+i;return n>=t.LARGE_SIZE/8&&(n+=8),n},t.prototype.serialize=function(){var t=new ec;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=b.pow(2,32),t}();function uc(t,i){return V(t,ue)?64===i:t65535&&(e-=65536,i.push(e>>>10&1023|55296),e=56320|1023&e),i.push(e)}return lc(i)}(r)}(t,i,!0)}function Tc(t,i,n){return void 0===i&&(i=0),void 0===n&&(n=t.byteLength),new E(t.buffer,t.byteOffset+i,n-i)}function Sc(t,i,n){return void 0===i&&(i=0),void 0===n&&(n=t.byteLength),new DataView(t.buffer,t.byteOffset+i,n-i)}function Ec(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Ic(t){return new E(t.buffer,t.byteOffset,t.byteLength)}var Rc=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new vc(this.offset<<3)},t}();U(),Et();var Cc=function(){function t(t,i){this.data=t,this.cursor=i}return t.prototype.nextUint8=function(){return gc(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getUint16(i.offset,n);return i.shift(2),r}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getInt16(i.offset,n);return i.shift(2),r}(this.data,this.cursor)},t.prototype.nextUint32=function(){return yc(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getInt32(i.offset,n);return i.shift(4),r}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,i,n){void 0===n&&(n=!1);var r=yc(t,i,n),e=yc(t,i,n),s=n?e:r,u=n?r:e;return ue.fromBits(u,s,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return pc(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return _c(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,i,n){for(var r=[],e=0;et.byteLength){var o=u;return i.seek(n),{complete:!1,neededOffset:o}}var h={type:e.type,offset:n,data:new Cc(Sc(t,n,u),new Rc(e.headerSize))};return i.seek(u),{complete:!0,box:h}}function xc(t){return{version:t>>24,flags:new wc(16777215&t)}}function Bc(t,i){var n,r,e,s;return 1===i?(n=t.nextUint64(),r=t.nextUint64(),e=t.nextUint32(),s=t.nextUint64()):(n=t.nextUint32(),r=t.nextUint32(),e=t.nextUint32(),s=t.nextUint32()),{creation:n,modification:r,scale:e,duration:s}}function Oc(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function Mc(t){var i=t.nextUint32Array(9);return{a:ac(i[0],16),b:ac(i[1],16),u:ac(i[2],30),c:ac(i[3],16),d:ac(i[4],16),v:ac(i[5],30),x:ac(i[6],16),y:ac(i[7],16),w:ac(i[8],30)}}function Lc(t){return new fc(t.type,Tc(Ic(t.data.data),t.data.cursor.offset))}var Fc=function(t){function i(i,n,r,e){void 0===r&&(r=0),void 0===e&&(e=0);var s=t.call(this,"hdlr",r,e)||this;return s.name=n,s.handlerType=i,s}return Ga(i,t),k.defineProperty(i.prototype,"handlerType",{get:function(){return this.bb},set:function(t){this.bb=t},enumerable:!1,configurable:!0}),i.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},i.prototype.getBoxContentSize=function(){var i,n;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(n=null===(i=this.name)||void 0===i?void 0:i.length)&&void 0!==n?n:0)+1},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(0,32),i.writer.writeString(this.handlerType),this.serializeReserved(i),this.name&&i.writer.writeString(this.name),i.writer.writeByte(0)},i}(cc);function Uc(t){var i=t.data,n=xc(i.nextUint32()),r=n.version,e=n.flags;i.skip(4);var s=i.nextChars(4);i.skip(12);var u=i.nextUTF8String();return new Fc(s,u,r,e.raw)}!function(t){function i(){return t.call(this,"mdir")||this}Ga(i,t),i.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(Fc);U(),Et(),U(),Et(),U(),Et();var Vc=function(){function t(t,i){void 0===i&&(i=!1),this.fixed28BitMode=i,this.tag=t}return t.prototype.encodeSize=function(t){for(var i=[];t>0;)i.length>0&&(i[i.length-1]+=128),i.push(t%128),t>>=7;if(this.fixed28BitMode)for(;i.length<4;)i.push(128);return i.reverse()},k.defineProperty(t.prototype,"tag",{get:function(){return this.Ab},set:function(t){if(!uc(t,8))throw new y("Provided tag does not fit in 8 bits.");this.Ab=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return this.getDescriptorSize()+1+this.encodeSize(this.getDescriptorSize()).length},t.prototype.serialize=function(t){t.writer.writeByte(this.tag);for(var i=0,n=this.encodeSize(this.getDescriptorSize());i0)throw new y("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,i),void 0!==this.explicitAuxInfoType&&(i.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),i.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),i.writer.writeByte(this.defaultSampleInfoSize),i.writer.writeUInt(this.sampleInfoSizes.length,32);for(var n=0,r=this.sampleInfoSizes;n1)throw new y("Provided balance does not fit in the allowed range [-1, 1].");if(!uc(oc(t,8),16))throw new y("Provided balance does not fit in 16 bits (fixed 8.8).");this.UA=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(oc(this.balance,8),16),i.writer.writeUInt(0,16)}}(cc);U(),Et();!function(t){function i(i){var n=t.call(this,"stss",0,0)||this;return n.entries=i,n}Ga(i,t),k.defineProperty(i.prototype,"entries",{get:function(){return this.Lb},set:function(t){if(!uc(t.length,32))throw new y("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!uc(t,32)}))throw new y("Not all entries can be represented in 32 bits.");this.Lb=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.entries.length,32);for(var n=0,r=this.entries;n31)throw new y("The provided compressorName should at most be 31 characters long.");this.qA=t},enumerable:!1,configurable:!0}),k.defineProperty(i.prototype,"frameCount",{get:function(){return this.zA},set:function(t){if(!uc(t,16))throw new y("Provided frameCount does not fit in 16 bits.");this.zA=t},enumerable:!1,configurable:!0}),k.defineProperty(i.prototype,"depth",{get:function(){return this.GA},set:function(t){if(!uc(t,16))throw new y("Provided depth does not fit in 16 bits.");this.GA=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){var i,n,r,e,s,u;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(n=null===(i=this.clap)||void 0===i?void 0:i.getSize())&&void 0!==n?n:0)+(null!==(e=null===(r=this.pasp)||void 0===r?void 0:r.getSize())&&void 0!==e?e:0)+(null!==(u=null===(s=this.extra)||void 0===s?void 0:s.length)&&void 0!==u?u:0)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(0,16),i.writer.writeUInt(0,16),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),i.writer.writeUInt(this.width,16),i.writer.writeUInt(this.height,16),i.writer.writeUInt(oc(this.horizontalResolution,16),32),i.writer.writeUInt(oc(this.verticalResolution,16),32),i.writer.writeUInt(0,32),i.writer.writeUInt(this.frameCount,16),i.writer.writeByte(this.compressorName.length),i.writer.writeString(this.compressorName);for(var n=0;n<31-this.compressorName.length;n++)i.writer.writeByte(0);i.writer.writeUInt(this.depth,16),i.writer.writeInt(-1,16),this.clap&&i.concat(this.clap.serialize()),this.pasp&&i.concat(this.pasp.serialize()),this.extra&&hc(i.writer,this.extra)},i}(Xc);U(),Et(),U(),Et(),H();!function(t){function i(i){var n=t.call(this,"esds",0,0)||this;return n.esDescriptor=i,n}Ga(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(V(this.esDescriptor,E)?this.esDescriptor.length:this.esDescriptor.getSize())},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),V(this.esDescriptor,E)?i.concat(nc.from(this.esDescriptor)):this.esDescriptor.serialize(i)}}(cc);U(),Et();!function(t){function i(i,n,r){var e=t.call(this,"mp4a",i,r)||this;return e.esd=n,e}Ga(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.concat(this.esd.serialize())}}(qc);U(),Et();!function(t){function i(i,n,r,e){void 0===e&&(e={});var s=t.call(this,"mp4v",i,n,e)||this;return s.esDescriptor=r,s}Ga(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor.serialize(i)}}(dv);U(),Et();!function(t){function i(i,n){var r=t.call(this,"mp4s",i)||this;return r.esDescriptor=n,r}Ga(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor.serialize(i)}}(Xc);U(),Et(),U(),Et();!function(t){function i(i){var n=t.call(this,"avcC")||this;return n.decoderConfig=i,n}Ga(i,t),i.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},i.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(sc);U(),Et();!function(){function t(t,i,n,r,e,s){void 0===s&&(s=1),this.lengthSizeMinusOne=n,this.version=s,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=i,this.spsSets=r,this.ppsSets=e}k.defineProperty(t.prototype,"version",{get:function(){return this.XA},set:function(t){if(!uc(t,8))throw new y("Provided version does not fit in 8 bits.");this.XA=t},enumerable:!1,configurable:!0}),k.defineProperty(t.prototype,"profileIndication",{get:function(){return this.jA},set:function(t){if(!uc(t,8))throw new y("Provided profileIndication does not fit in 8 bits.");this.jA=t},enumerable:!1,configurable:!0}),k.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.QA},set:function(t){if(!uc(t,8))throw new y("Provided profileCompatibility does not fit in 8 bits.");this.QA=t},enumerable:!1,configurable:!0}),k.defineProperty(t.prototype,"levelIndication",{get:function(){return this.KA},set:function(t){if(!uc(t,8))throw new y("Provided levelIndication does not fit in 8 bits.");this.KA=t},enumerable:!1,configurable:!0}),k.defineProperty(t.prototype,"spsSets",{get:function(){return this.YA},set:function(t){if(!uc(t.length,5))throw new y("Provided number of spsSets exceeds the max (32)");this.YA=t},enumerable:!1,configurable:!0}),k.defineProperty(t.prototype,"ppsSets",{get:function(){return this.JA},set:function(t){if(!uc(t.length,8))throw new y("Provided number of ppsSets exceeds the max (256)");this.JA=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce(function(t,i){return t+i.length},0)+2*this.ppsSets.length+this.ppsSets.reduce(function(t,i){return t+i.length},0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var i=0,n=this.spsSets;i0&&(null!==(e=null===(r=n.constantIv)||void 0===r?void 0:r.length)&&void 0!==e?e:0)>0)throw new y("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return o.kId=n.kId,o.isProtected=null!==(s=n.isProtected)&&void 0!==s?s:1,n.perSampleIvSize>0?o.perSampleIvSize=n.perSampleIvSize:o.constantIv=null!==(u=n.constantIv)&&void 0!==u?u:new E(0),o}return Ga(i,t),k.defineProperty(i.prototype,"isProtected",{get:function(){return this.tS},set:function(t){if(!uc(t,8))throw new y("Provided isProtected does not fit in 1 byte.");this.tS=t},enumerable:!1,configurable:!0}),k.defineProperty(i.prototype,"perSampleIvSize",{get:function(){return this.iS},set:function(t){if(![8,16].includes(t))throw new y("Provided perSampleIvSize does not match any allowed value [8, 16].");this.iS=t,this.eS=new E(0)},enumerable:!1,configurable:!0}),k.defineProperty(i.prototype,"kId",{get:function(){return this.sS},set:function(t){if(16!==t.length)throw new y("Provided kId length is not 16.");this.sS=t},enumerable:!1,configurable:!0}),k.defineProperty(i.prototype,"constantIv",{get:function(){return this.eS},set:function(t){if(![8,16].includes(t.length))throw new y("Provided constant IV length does not match any allowed value [8, 16].");this.eS=t,this.iS=0},enumerable:!1,configurable:!0}),i.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},i.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.serializeOwnContent(i)},i.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),hc(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),hc(t.writer,this.constantIv))},i}(cc),wv=(function(t){function i(i){return t.call(this,0,i)||this}Ga(i,t)}(lv),function(t){function i(i){var n=t.call(this,1,i)||this;return n.cryptByteBlocks=i.cryptByteBlock,n.skipByteBlocks=i.skipByteBlock,n}return Ga(i,t),k.defineProperty(i.prototype,"cryptByteBlocks",{get:function(){return this.nS},set:function(t){if(!uc(t,4))throw new y("Provided cryptByteBlocks does not fit in 4 bits.");this.nS=t},enumerable:!1,configurable:!0}),k.defineProperty(i.prototype,"skipByteBlocks",{get:function(){return this.rS},set:function(t){if(!uc(t,4))throw new y("Provided skipByteBlocks does not fit in 4 bits.");this.rS=t},enumerable:!1,configurable:!0}),i.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},i}(lv));!function(t){function i(i){var n=t.call(this)||this;return n.tencBox=new wv(i),n}Ga(i,t),i.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},i.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(pf);function gv(t){return void 0!==t.iv}function _v(t){return void 0!==t.subsamples}U(),Et();!function(t){function i(i){var n=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return n.samples=i,n}Ga(i,t),k.defineProperty(i.prototype,"samples",{get:function(){return this.bA},set:function(t){var i;if(!uc(t.length,32))throw new y("The number of samples provided does not fit in 32 bits.");for(var n=0,r=t;n0&&(r.lS.jy(),r.So(new oh(r.lS))),r.dS.removeEventListener("keystatuseschange",r.bS),r.dS.removeEventListener("message",r.SS)},r.dS.addEventListener("keystatuseschange",r.bS),r.dS.addEventListener("message",r.SS),r.lS=new Ua;var e=[];return r.dS.closed&&e.push(ut.resolve(r.dS.closed)),r._S=new Va,e.push(r._S.Yy),r.zd=ut.race(e).then(r.TS,r.TS),r.mS(),r}Ct(i,t);var n=i.prototype;return n.Xs=function(){if(this.vS)return this.zd;var t=[];return t.push(ut.resolve(this.dS.close())),t.push(Ar(1e3)),this._S.$g(ut.race(t).catch(Ev)),this.vS=!0,this.zd},n.gS=function(t,i,n){if(Bi.e_){var r=Av(pa(i));if(1===r.version)i=new bf(r.systemId,r.data).serialize().join()}return ut.resolve(this.dS.generateRequest(t,i)).catch(Ev)},n.Un=function(t){return ut.resolve(this.dS.load(t)).catch(Ev)},n.pS=function(){return ut.resolve(this.dS.remove()).catch(Ev)},n.er=function(t){return ut.resolve(this.dS.update(t)).catch(Ev)},n.mS=function(){var t=this;this.lS.jy(),this.dS.keyStatuses.forEach(function(i,n){t.wS(n,i)}),this.So(new oh(this.lS))},n.wS=function(t,i){if("string"==typeof t){var n=t;t=i,i=n}var r=pa(t);if(this.yS===vo&&16===r.byteLength&&(Bi.v_||Bi.dg)){var e=_a(r),s=e.getUint32(0,!0),u=e.getUint16(4,!0),o=e.getUint16(6,!0);e.setUint32(0,s,!1),e.setUint16(4,u,!1),e.setUint16(6,o,!1)}this.yS===vo&&"status-pending"===i&&(i="usable"),this.lS.Gy(r,i)},Nt(i,[{key:"uS",get:function(){return this.zd}},{key:"cS",get:function(){return this.dS.expiration}},{key:"xy",get:function(){return this.lS}},{key:"fS",get:function(){return this.dS.sessionId}}]),i}(th);function Ev(t){var i;if(t.message){var n=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);n&&(i=0|A(n[1],16))}throw new Xa(t.message,void 0,i,t)}var Iv=function(){function t(t,i,n){this.ES=void 0,this.xS=void 0,this.Cd=void 0,this.ES=t,this.xS=i,this.Cd=n}var i=t.prototype;return i.kS=function(t){return Vt(function(){return zt(this,function(i){return[2,new Sv(this.ES.createSession(t),this.xS)]})}).call(this)},i.PS=function(t){return ut.resolve(this.ES.setServerCertificate(t))},i._n=function(t){return ut.resolve(t.setMediaKeys(this.ES))},i.IS=function(t){return ut.resolve(t.setMediaKeys(null))},i.hr=function(){return ut.resolve()},t}(),Rv=function(){function t(t,i,n){this.CS=void 0,this.yS=void 0,this.DS=void 0,this.CS=t,this.yS=i,this.DS=n}var i=t.prototype;return i.RS=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return[4,this.CS.createMediaKeys()];case 1:return t=i.sent(),[2,new Iv(t,this.yS,this.DS)]}})}).call(this)},i.NS=function(){return this.DS},Nt(t,[{key:"xS",get:function(){return this.CS.keySystem}}]),t}();U(),Et(),Ft(),U(),Et(),Ft();var Cv="video/avc",Pv="video/hevc",Dv="video/mp4",Nv="video/mpeg",xv="video/mpeg2",Bv="video/webm",Ov="video/x-unknown",Mv="audio/mp4",Lv="audio/webm",Fv="image/jpeg",Uv="application/ttml+xml",Vv="application/mp4",Hv="text/vtt";function Wv(t){return Fo(t,"audio/")}function zv(t){return Fo(t,"video/")}function Xv(t){return Lo(t,Vv)||Lo(t,Dv)||Lo(t,Mv)}function qv(t){return Lo(t,Bv)||Lo(t,Lv)}var Gv=function(){function t(t,i){this.Km=void 0,this.LS=void 0,this.Km=t,this.LS=i}return t.prototype.MS=function(t){for(var i,n=Lt(this.LS);!(i=n()).done;){var r=i.value,e=r[0],s=r[1];if(e.toLowerCase()===t.toLowerCase())return s}},t}();function jv(t){var i=t.trim(),n=i.indexOf(";");if(n<0)return new Gv(i,[]);for(var r=i.substr(0,n).trim(),e=i.substr(n+1).trim(),s=[],u=0,o=!1,h=0;h=1?t.msSetMediaKeys(this.XS):t.addEventListener("loadedmetadata",n),ut.resolve()},i.IS=function(t){return ut.resolve()},i.hr=function(){return ut.resolve()},t}(),od=function(){function t(t,i){this.yS=void 0,this.ZS=void 0,this.yS=t,this.ZS=i}var i=t.prototype;return i.NS=function(){return this.ZS},i.RS=function(){var t=new f.MSMediaKeys(this.yS);return ut.resolve(new ud(t,this.yS,this.ZS))},Nt(t,[{key:"xS",get:function(){return this.yS}}]),t}(),hd=function(){function t(){}return t.prototype.nw=function(t,i){try{return ut.resolve(function(t,i){if(!ad())throw new p("Unsupported key system "+t);for(var n,r=Lt(i);!(n=r()).done;){var e=n.value,s=Jv(cd,sh,t,e);if(s)return new od(t,s)}throw new p("Unsupported key system configuration for "+t)}(t,i))}catch(t){return ut.reject(t)}},t.US=function(){return ad()},t}();function ad(){return void 0!==f.MSMediaKeys&&"function"==typeof f.MSMediaKeys.isTypeSupported}function cd(t,i){return f.MSMediaKeys.isTypeSupported(t,i)}U(),Et(),Ft(),U(),Et(),xt(),U(),Et(),Wt(),Qt(),U(),Et(),Wt(),xt(),Pt(),Qt();var fd=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).eT=void 0,e.jS=void 0,e.iT=void 0,e.HS=void 0,e.nT=void 0,e.WS=void 0,e.$S=void 0,e.sT=void 0,e.Ts=void 0,e.QS=void 0,e.KS=void 0,e.eT=i,e.jS=n,e.iT=r,e.HS=new Va,e.nT=void 0,e.WS=new Ua,e.$S=void 0,e.sT=new Va,e.Ts=function(){var t=e.$S&&e.$S.error;if(t){var i=new Xa("Unknown CDM error",t.code,t.systemCode);e.nT?(e.nT.Ky(i),e.nT=void 0):i.Jy===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?e.YS("output-not-allowed"):e.YS("internal-error"),e.So(new ch)}},e.QS=function(t){e.So(new ah(e,"license-request",ba(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},e.KS=function(){e.nT&&(e.nT.Qy(void 0),e.nT=void 0),e.YS("usable")},e}Ct(i,t);var n=i.prototype;return n.gS=function(t,i,n){var r=n&&n.fairplay&&n.fairplay.tT;if(!r)throw new p("Expected FairPlay contentId to be defined but was "+r+".");var e=function(t,i,n){var r=va(t),e=2*r.length,s=2*i.length,u=new ArrayBuffer(4+e+4+s+4+n.byteLength),o=new DataView(u),h=new Ta;return Gh(o,h,e,!0),sa(o,h,r,!0),Gh(o,h,s,!0),sa(o,h,i,!0),Gh(o,h,n.byteLength,!0),Uh(o,h,n),new E(u)}(pa(i),r,this.iT);return this.$S=this.eT.createSession(this.jS,e),this.$S.addEventListener("webkitkeymessage",this.QS,!1),this.$S.addEventListener("webkitkeyadded",this.KS,!1),this.$S.addEventListener("webkitkeyerror",this.Ts,!1),this.YS("status-pending"),this.sT.Qy(this.$S),this.sT=new Va,ut.resolve()},n.Un=function(t){return ut.resolve(!0)},n.er=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(0===(i=pa(t)).byteLength)throw new p("Cannot call update with an empty response.");return this.nT=new Va,(n=this.$S)?[3,2]:[4,this.sT.Yy];case 1:n=r.sent(),r.label=2;case 2:return n.update(i),[4,this.nT.Yy];case 3:return r.sent(),[2]}})}).call(this)},n.Xs=function(){var t,i=this.$S;return i&&(i.removeEventListener("webkitkeymessage",this.QS,!1),i.removeEventListener("webkitkeyadded",this.KS,!1),i.removeEventListener("webkitkeyerror",this.Ts,!1),i.close()),this.sT.Zg(),null==(t=this.nT)||t.Zg(),this.HS.Qy(void 0),this.HS.Yy},n.pS=function(){return ut.resolve(void 0)},n.YS=function(t){this.WS.jy(),this.WS.Gy(Fa,t),this.So(new oh(this.WS))},Nt(i,[{key:"fS",get:function(){return this.$S?this.$S.sessionId:""}},{key:"cS",get:function(){return NaN}},{key:"uS",get:function(){return this.HS.Yy}},{key:"xy",get:function(){return this.WS}}]),i}(th);U(),Et(),xt(),Pt(),H(),U(),Et();var vd=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.PICTURE_IN_PICTURE_ERROR=11001]="PICTURE_IN_PICTURE_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),dd=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(i){var n=b.floor(i/1e3);if(n in t)return n;throw new p("Invalid error code: "+i)}}(dd||(dd={}));var ld=function(t){function i(i,n,r){var e;return(e=t.call(this,n,r)||this).code=void 0,e.code=i,e}return Ct(i,t),Nt(i,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return dd.fromCode(this.code)}}]),i}(cr);function wd(t,i){return V(t,ld)?t:V(t,y)?new ld(i,t.message,t):new ld(i,String(t))}var gd=function(){function t(t,i,n){this.eT=void 0,this.xS=void 0,this.Cd=void 0,this.jS=void 0,this.iT=void 0,this.eT=t,this.xS=i,this.Cd=n,this.iT=void 0;var r=$v(n)||"video/mp4";this.jS=Yv(r)}var i=t.prototype;return i.getInternalMediaKeys=function(){return this.eT},i.kS=function(t){return Vt(function(){return zt(this,function(t){if(!this.iT)throw new ld(vd.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new fd(this.eT,this.jS,this.iT)]})}).call(this)},i.PS=function(t){return this.iT=pa(t),ut.resolve(!0)},i._n=function(t){return t.webkitSetMediaKeys(this.eT),ut.resolve()},i.IS=function(t){return t.webkitSetMediaKeys(null),ut.resolve()},i.hr=function(){return ut.resolve()},t}(),_d=function(){function t(t,i){this.yS=void 0,this.ZS=void 0,this.yS=t,this.ZS=i}var i=t.prototype;return i.NS=function(){return this.ZS},i.RS=function(){var t=new f.WebKitMediaKeys(this.yS);return ut.resolve(new gd(t,this.yS,this.ZS))},Nt(t,[{key:"xS",get:function(){return this.yS}}]),t}(),md=function(){function t(){}return t.prototype.nw=function(t,i){try{return ut.resolve(function(t,i){if(t!==To)throw new p(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!yd())throw new p("Unsupported key system "+t);for(var n,r=Lt(i);!(n=r()).done;){var e=n.value,s=Jv(pd,uh,t,e);if(s)return new _d(t,s)}throw new p("Unsupported key system configuration for "+t)}(t,i))}catch(t){return ut.reject(t)}},t.US=function(){return yd()},t}();function yd(){return void 0!==f.WebKitMediaKeys&&"function"==typeof f.WebKitMediaKeys.isTypeSupported}function pd(t,i){return f.WebKitMediaKeys.isTypeSupported(t,i)}U(),Et(),Wt(),Ft(),Qt();var kd=function(){function t(t){this.rT=void 0,this.rT=t}return t.prototype.nw=function(t,i){return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Lt(this.rT),s.label=1;case 1:if((r=n()).done)return[3,6];e=r.value,s.label=2;case 2:return s.trys.push([2,4,,5]),[4,e.nw(t,i)];case 3:return[2,s.sent()];case 4:return s.sent(),[3,5];case 5:return[3,1];case 6:throw new p("Unsupported key system configuration for "+t)}})}).call(this)},t}();U(),Et(),Ft(),U(),Et(),U(),Et(),Wt(),Qt(),U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et();var bd=function(){function t(t){var i=this;this.oT=[],this.aT=void 0,this.hT=new hr,this.dT=void 0,this.uT=function(){return 0===i.oT.length?i.dT?Ad(i.dT,i.hT.Yg).then(i.lT,i.lT):i.lT():i.oT.shift()().then(i.uT)},this.lT=function(){if(0!==i.oT.length)return i.uT();i.aT=void 0},this.dT=t}var i=t.prototype;return i.Zo=function(t,i){var n=this;return new ut(function(r){var e=hr.ep([n.hT.Yg,i]),s=function(){e.zg()};n.oT.push(function(){var i=Ad(t,e.Yg);return r(i),i.then(s,s)}),n.aT||(n.aT=n.uT())})},i.Zg=function(){return this.cT(!0)},i.kn=function(){return this.dT=void 0,this.cT(!1)},i.cT=function(t){var i=this.aT;return this.hT.Zg(),t&&(this.hT=new hr),ut.resolve(i)},t}();function Ad(t,i){return new ut(function(n){return n(t(i))})}var Td=new bd,Sd=function(t){function i(i){var n;return(n=t.call(this)||this).yS=void 0,n.zS=void 0,n.nT=void 0,n.HS=void 0,n.gb=void 0,n.bT=void 0,n.yT=void 0,n.wT=void 0,n.pT=void 0,n.mT=void 0,n.yS=i,n.zS=void 0,n.nT=void 0,n.gb=!1,n.bT=void 0,n.pT=void 0,n.HS=new Va,n.yT="",n.mT=new Va,n.wT=new Ua,n}Ct(i,t);var n=i.prototype;return n.fT=function(){this.nT&&(this.YS("usable"),this.nT.Qy(void 0),this.nT=void 0)},n.vT=function(t){var i=new Xa("Unknown CDM error",t.errorCode,t.systemCode);this.nT?(this.nT.Ky(i),this.nT=void 0):this.zS?(this.zS.Ky(i),this.zS=void 0):i.Jy===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.YS("output-restricted"):1===i.Zy?this.YS("expired"):this.YS("internal-error")},n._T=function(t){0!==t.message.byteLength?(this.zS&&(this.zS.Qy(void 0),this.zS=void 0),this.So(new ah(this,"license-request",Wa(this.yS,ba(t.message).buffer),t.defaultURL||void 0))):this.zS&&(this.zS.Ky("Empty key message"),this.zS=void 0)},n.gT=function(t){this.pT||(this.pT=t,this.mT.Qy(t))},n.Xs=function(){return Vt(function(){return zt(this,function(t){return this.throwIfClosed(),this.nT&&(this.nT.Ky(void 0),this.nT=void 0),this.gb=!0,this.HS.Qy(void 0),[2]})}).call(this)},n.gS=function(t,i){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return this.throwIfClosed(),this.zS=new Va,this.bT=pa(i),(t=this.pT)?[3,2]:[4,this.mT.Yy];case 1:t=n.sent(),n.label=2;case 2:return t.webkitGenerateKeyRequest(this.yS,this.bT),[4,this.zS.Yy];case 3:return n.sent(),[2]}})}).call(this)},n.Un=function(t){return Vt(function(){return zt(this,function(t){return this.throwIfClosed(),[2,!1]})}).call(this)},n.pS=function(){return Vt(function(){return zt(this,function(t){return this.throwIfClosed(),[2]})}).call(this)},n.er=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return i=this,this.throwIfClosed(),this.nT=new Va,Bi.S_||Bi.w_?[2,Td.Zo(function(){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.doUpdate(t)];case 1:return i.sent(),[2]}})}).call(i)})]:[4,this.doUpdate(t)];case 1:return n.sent(),[2]}})}).call(this)},n.doUpdate=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return void 0===this.nT?[2]:(i=this.pT)?[3,2]:[4,this.mT.Yy];case 1:i=n.sent(),n.label=2;case 2:return i.webkitAddKey(this.yS,pa(t),this.bT,this.fS),[4,this.nT.Yy];case 3:return n.sent(),Bi.w_?[4,Ar(500)]:[3,5];case 4:n.sent(),n.label=5;case 5:return[2]}})}).call(this)},n.throwIfClosed=function(){if(this.gb)throw new p("Already closing or closed.")},n.YS=function(t){this.wT.jy(),this.wT.Gy(Fa,t),this.So(new oh(this.wT))},n.AT=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return(i=this.pT)?[3,2]:[4,this.mT.Yy];case 1:i=n.sent(),n.label=2;case 2:if(!(t=i).webkitCancelKeyRequest)return[3,7];n.label=3;case 3:return n.trys.push([3,4,5,7]),t.webkitCancelKeyRequest(this.yS,this.yT),[3,7];case 4:return n.sent(),[3,7];case 5:return[4,Ar(500)];case 6:return n.sent(),[7];case 7:return[2]}})}).call(this)},Nt(i,[{key:"xy",get:function(){return this.wT}},{key:"fS",get:function(){return this.yT},set:function(t){this.yT=t}},{key:"uS",get:function(){return this.HS.Yy}},{key:"cS",get:function(){return NaN}}]),i}(th),Ed=function(){function t(t,i){var n=this;this.xS=void 0,this.Cd=void 0,this.pT=void 0,this.kT=void 0,this.ET=void 0,this.KS=void 0,this.ST=void 0,this.TT=void 0,this.xS=t,this.Cd=i,this.pT=void 0,this.kT=Ju(),this.ET=[],this.KS=function(t){var i=n.xT(t.sessionId);i&&i.fT()},this.ST=function(t){var i=n.xT(t.sessionId);i&&i.vT(t)},this.TT=function(t){var i=n.xT(t.sessionId);i&&i._T(t)}}var i=t.prototype;return i._n=function(t){return this.pT=t,this.pT.addEventListener("webkitkeyadded",this.KS),this.pT.addEventListener("webkitkeyerror",this.ST),this.pT.addEventListener("webkitkeymessage",this.TT),this.kT.forEach(function(i,n){return i.gT(t)}),this.ET.forEach(function(i){return i.gT(t)}),ut.resolve()},i.IS=function(t){return t.removeEventListener("webkitkeyadded",this.KS),t.removeEventListener("webkitkeyerror",this.ST),t.removeEventListener("webkitkeymessage",this.TT),this.pT=void 0,ut.resolve()},i.hr=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:t=this.kT.entries(),i=t.next(),n.label=1;case 1:return i.done?[3,3]:[4,i.value[1].AT()];case 2:return n.sent(),i=t.next(),[3,1];case 3:return this.kT.clear(),[2]}})}).call(this)},i.kS=function(t,i,n){return Vt(function(){var t;return zt(this,function(i){return t=new Sd(this.xS),this.pT&&t.gT(this.pT),this.ET.push(t),[2,t]})}).call(this)},i.PS=function(t){return ut.resolve(!1)},i.xT=function(t){if(t){var i=this.kT.get(t);return i||((i=this.ET.shift())?(i.fS=t,this.kT.set(t,i),i):void 0)}},t}(),Id=function(){function t(t,i){this.xS=void 0,this.PT=void 0,this.xS=t,this.PT=i}var i=t.prototype;return i.RS=function(){return ut.resolve(new Ed(this.xS,this.PT))},i.NS=function(){return this.PT},t}(),Rd=function(){function t(){}return t.prototype.nw=function(t,i){try{return ut.resolve(function(t,i){if(!Rd.US())throw new p("Unsupported key system "+t);for(var n,r=Lt(i);!(n=r()).done;){var e=n.value,s=Jv(Cd,sh,t,e);if(s)return new Id(t,s)}throw new p("Unsupported key system configuration for "+t)}(t,i))}catch(t){return ut.reject(t)}},t.US=function(){return Jo()},t}();function Cd(t,i){var n=Rr();return Boolean(n&&n.canPlayType&&""!==n.canPlayType(i,t))}U(),Et();var Pd,Dd=function(){function t(){}return t.prototype.nw=function(t,i){return t===go||t===vo?ut.resolve(void 0):ut.reject(new y("DRM configuration not supported"))},t}();function Nd(){return Pd||(Pd=function(){var t=[];md.US()&&t.push(new md);ed.US()&&t.push(new ed);hd.US()&&t.push(new hd);Rd.US()&&t.push(new Rd);Bi.k_&&t.push(new Dd);return new kd(t)}()),Pd}U(),Et(),Pt(),U(),Et();var xd=function(){function t(){this.IT=Ju()}var i=t.prototype;return i.jy=function(t){this.IT.delete(t)},i.CT=function(){this.IT.clear()},i.zy=function(t){return this.IT.get(t)},i.Gy=function(t,i){this.IT.set(t,i)},t}(),Bd=function(){function t(){}return t.DT=function(){return t.Bg||(t.Bg=Od.US()?new Od:new xd),t.Bg},t.jy=function(i){t.DT().jy(i)},t.CT=function(){t.DT().CT()},t.zy=function(i){return t.DT().zy(i)},t.Gy=function(i,n){t.DT().Gy(i,n)},t}();Bd.Bg=void 0;var Od=function(t){function i(){return t.apply(this,arguments)||this}Ct(i,t);var n=i.prototype;return n.jy=function(t){self.sessionStorage.removeItem(t)},n.CT=function(){self.sessionStorage.clear()},n.zy=function(t){var i;return null!=(i=self.sessionStorage.getItem(t))?i:void 0},n.Gy=function(t,i){self.sessionStorage.setItem(t,i)},i.US=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},i}(Bd);U(),Et(),U(),Et(),Ft();var Md=function(){var t=self.Blob;if(t)try{new t;return function(t){return function(i,n){return new t(i,n)}}(t)}catch(t){}var i=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(i)return function(t){return function(i,n){var r=new t;if(i)for(var e,s=Lt(i);!(e=s()).done;){var u=e.value;r.append(u)}return r.getBlob(n&&n.type||"")}}(i)}();function Ld(t,i,n){var r=Md([i],{type:"application/octet-stream"}),e=URL.createObjectURL(r),s=function(t,i){var n=t,r=n.indexOf("?");if(r>=0&&(n=n.substr(0,r)),n=n.substr(n.lastIndexOf("/")+1),i){var e=n.indexOf(".");e<0&&(e=n.length),n=n.substr(0,e)+i+n.substr(e)}return n}(t,n),u=v.createElement("a");u.href=e,u.download=s,v.body.appendChild(u),u.click(),v.body.removeChild(u),URL.revokeObjectURL(e)}U(),Et();var Fd="default";U(),Et(),xt(),U(),Et(),U(),Et(),Pt(),U(),Et();var Ud=function(t){return t.NT="arraybuffer",t.BT="json",t.MT="stream",t.LT="text",t}({});U(),Et(),H(),Ft();var Vd=function(){function t(i){var n=this;if(this.Wm=void 0,this.Wm={},i)if(V(i,t))i.asList().forEach(function(t){var i=t[0],r=t[1];n.append(i,r)});else if(function(t){return Wi(t)&&"function"==typeof t.forEach}(i))i.forEach(function(t,i){Array.isArray(t)&&2===t.length?n.append(t[0],t[1]):n.append(i,t)});else if(function(t){return void 0!==r&&Wi(t)&&r in t}(i))for(var e,s=Lt(i);!(e=s()).done;){var u=e.value,o=u[0],h=u[1];this.append(o,h)}else k.getOwnPropertyNames(i).forEach(function(t){n.append(t,i[t])});else;}var i=t.prototype;return i.append=function(t,i){var n=t,r=i;n=Hd(n),r=Wd(r);var e=n.toLowerCase();if(this.Wm.hasOwnProperty(e)){var s=this.Wm[e],u=s[1];s[1]=u?u+", "+r:r}else this.Wm[e]=[n,r]},i.delete=function(t){var i=Hd(t).toLowerCase();delete this.Wm[i]},i.get=function(t){var i=Hd(t).toLowerCase();return this.Wm.hasOwnProperty(i)?this.Wm[i][1]:null},i.has=function(t){var i=Hd(t).toLowerCase();return this.Wm.hasOwnProperty(i)},i.set=function(t,i){var n=t,r=(n=Hd(n)).toLowerCase();this.Wm[r]=[n,Wd(i)]},i.forEach=function(t,i){for(var n in this.Wm)this.Wm.hasOwnProperty(n)&&t.call(i,this.Wm[n][1],n,this)},i.asList=function(){var t=[];for(var i in this.Wm)if(this.Wm.hasOwnProperty(i)){var n=this.Wm[i],r=n[0],e=n[1];t.push([r,e])}return t},i.OT=function(){var t={};return this.forEach(function(i,n){t[n]=i}),t},i.FT=function(t){var i=this;t.forEach(function(t,n){i.append(n,t)})},i.UT=function(t){var i=this;t.forEach(function(t,n){i.set(n,t)})},t}();function Hd(t){var i=t;if("string"!=typeof i&&(i=String(i)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(i))throw new p("Invalid character in header field name");return i}function Wd(t){var i=t;return"string"!=typeof i&&(i=String(i)),i}U(),Et(),xt(),Pt(),U(),Et(),xt(),Pt(),H(),U(),Et(),Ft();var zd=F(Kt());U(),Et(),xt(),Pt();var Xd=function(t){function i(i){var n;return(n=t.call(this,""+i.join("\n"),i[0])||this).causes=void 0,n.causes=i,n}return Ct(i,t),Nt(i,[{key:"name",get:function(){return"AggregateError"}}]),i}(cr),qd=t,Gd=Ki(qd.ReadableStream)&&Ki(qd.WritableStream)&&Ki(qd.TransformStream)&&Yi(qd.ReadableStream.prototype.pipeThrough)&&!Te.xp,jd=Gd?qd.ReadableStream:zd.ReadableStream,Qd=(Gd?qd.WritableStream:zd.WritableStream,Gd?qd.TransformStream:zd.TransformStream),Yd=(Gd&&qd.ByteLengthQueuingStrategy?qd.ByteLengthQueuingStrategy:zd.ByteLengthQueuingStrategy,Gd&&qd.CountQueuingStrategy?qd.CountQueuingStrategy:zd.CountQueuingStrategy);function Kd(t){return function(t){return new jd({start:function(i){for(var n,r=Lt(t);!(n=r()).done;){var e=n.value;i.enqueue(e)}i.close()}})}([t])}function Jd(t){return Kd(function(t){return new E(t)}(t))}function Zd(t,i){return function(t,i){var n=i,r=t.getReader(),e=new Va,s=function(){u();var t=new fr;r.cancel(t).catch(dn),e.Ky(t)},u=function(){n&&(n.jg(s),n=void 0)};n&&(n.Hg?s():n.Xg(s));var o=[],h=function(t){return t.done?(u(),ut.resolve(o)):(o.push(t.value),ut.resolve(r.read()).then(h))};return ut.resolve(r.read()).then(h).then(function(t){u(),e.Qy(t)},function(t){u(),e.Ky(t)}),e.Yy}(t,i).then(function(t){return Na(t).buffer})}function $d(t,i){var n=i,r=new Qd,e=r.readable,s=r.writable,u=s.getWriter(),o=function(){n&&n.Zg()};return u.closed.then(o,o),t.then(function(t){return n=void 0,u.releaseLock(),t.pipeTo(s).catch(dn)},function(t){return n=void 0,u.releaseLock(),s.abort(t).catch(dn)}),e}function tl(t){var i=new Qd,n=i.readable,r=i.writable;return t.pipeTo(r,{preventCancel:!0}).catch(function(i){var n;n=Vi(i)?i[0]===i[1]||vr(i[0])&&vr(i[1])?i[0]:new Xd(i):i,t.cancel(n).catch(dn)}),n.tee()}function il(t){return va(new E(t))}function nl(t){return da(t).buffer}U(),Et();var rl="text/plain;charset=UTF-8",el=function(){function t(){}var i=t.prototype;return i.VT=function(t){return this.HT(t).then(JSON.parse)},i.WT=function(t,i){switch(t){case Ud.NT:return this.qT(i);case Ud.BT:return this.VT(i);case Ud.MT:return this.zT();case Ud.LT:return this.HT(i);default:throw new p}},t}();function sl(t,i,n){if(V(t,el))return t;if(V(t,jd))return function(t,i){return new ol({Km:0,zT:t,GT:ul(i)})}(t,n);var r=ul(n),e=ut.resolve(t).then(function(t){return function(t,i){if(t){if("string"==typeof t)return{Km:Ud.LT,XT:t,GT:i||rl};if(V(t,ArrayBuffer)||Ra(t))return{Km:Ud.NT,XT:ll(t),GT:i};if(zi(t)||Vi(t))return{Km:Ud.BT,XT:t,GT:i};throw new p("Unsupported BodyInit type")}return{Km:Ud.LT,XT:null,GT:i}}(t,r)});return new ol({Km:1,Yy:e,jT:i})}function ul(t){return(t.get("content-type")||"").toLowerCase()}var ol=function(t){function i(i){var n;return(n=t.call(this)||this).KT=!1,n.JT=void 0,n.$T=new Va,n.$T.Yy.catch(dn),n.rk(i),n}Ct(i,t);var n=i.prototype;return n.ZT=function(){return this.$T.Yy},n.HT=function(t){return this.ek(hl,t)},n.VT=function(t){return this.ek(cl,t)},n.qT=function(t){return this.ek(vl,t)},n.zT=function(){return this.nk(function(t){return 0===t.Km?t.zT:$d(t.Yy.then(dl).then(Jd),t.jT)}(this.JT))},n.ek=function(t,i){if(this.KT)return ut.reject(new p("Already used"));this.KT=!0;var n=t(this.JT,i);return this.$T.$g(n.then(dn)),n},n.nk=function(t){if(this.KT)throw new p("Already used");if(t.locked)throw new p("Body stream is locked");this.KT=!0;var i=new Qd,n=ut.resolve(t.pipeTo(i.writable));return this.$T.$g(n),i.readable},n.rk=function(t){this.JT=t,1===t.Km&&t.Yy.catch(dn)},n.hk=function(){if(this.KT)throw new p("Already used");var t=function(t){if(0===t.Km){var i=t.zT.tee(),n=i[0],r=i[1];return[{Km:t.Km,zT:n,GT:t.GT},{Km:t.Km,zT:r,GT:t.GT}]}var e=t.jT.tp(),s=e[0],u=e[1];return[{Km:t.Km,Yy:t.Yy,jT:s},{Km:t.Km,Yy:t.Yy,jT:u}]}(this.JT),n=t[0],r=t[1];return this.rk(n),new i(r)},Nt(i,[{key:"QT",get:function(){return this.KT}},{key:"YT",get:function(){return 0===this.JT.Km}}]),i}(el);function hl(t,i){return 0===t.Km?Zd(t.zT,i).then(il):(i&&t.jT.$g(i),_r(t.Yy.then(al),t.jT))}function al(t){switch(t.Km){case Ud.LT:return ut.resolve(t.XT||"");case Ud.NT:return ut.resolve(t.XT).then(il);case Ud.BT:return ut.resolve(t.XT).then(JSON.stringify)}}function cl(t,i){return 0===t.Km?hl(t,i).then(JSON.parse):(i&&t.jT.$g(i),_r(t.Yy.then(fl),t.jT))}function fl(t){return t.Km===Ud.BT?ut.resolve(t.XT):al(t).then(JSON.parse)}function vl(t,i){return 0===t.Km?Zd(t.zT,i):(i&&t.jT.$g(i),_r(t.Yy.then(dl),t.jT))}function dl(t){switch(t.Km){case Ud.NT:return ut.resolve(t.XT);case Ud.LT:case Ud.BT:return al(t).then(nl)}}function ll(t){return V(t,ArrayBuffer)?t:ba(ma(t)).buffer}var wl=function(t){function i(i){var n;return(n=t.call(this)||this).ck=void 0,n.ck=i,n}Ct(i,t);var n=i.prototype;return n.ZT=function(){return this.ck.ZT()},n.HT=function(t){return this.ck.HT(t)},n.VT=function(t){return this.ck.VT(t)},n.qT=function(t){return this.ck.qT(t)},n.zT=function(t){return this.ck.zT(t)},n.hk=function(){return this.ck.hk()},Nt(i,[{key:"QT",get:function(){return this.ck.QT}},{key:"YT",get:function(){return this.ck.YT}}]),i}(el);function gl(t){return t.dk>=200&&t.dk<=299||304===t.dk}var _l=function(t){function i(i,n){var r,e,s,u,o,h;n?(e=n._k,s=n.fk,u=n.dk,o=n.gk,h=n.pk):(e=[],s=Ud.LT,u=200,o="OK",h=!1);var a=i.vk,c=new Vd(i._k||e),f=i.fk||s,v=i.wk||(n&&n.vk===a?n.wk:a.Yu),d=n?n.ck:null,l=sl(void 0!==i.lk?i.lk:d,i.jT||new hr,c);return(r=t.call(this,l)||this)._k=void 0,r.vk=void 0,r.wk=void 0,r.fk=void 0,r.dk=void 0,r.gk=void 0,r.pk=void 0,r._k=c,r.vk=a,r.wk=v,r.fk=f,r.dk=void 0!==i.dk?i.dk:u,r.gk=void 0!==i.gk?String(i.gk):o,r.pk=i.pk||h,r}Ct(i,t);var n=i.prototype;return n.lk=function(t){return this.WT(this.fk,t)},n.Fy=function(){return new i({lk:this.hk(),vk:this.vk},this)},i}(wl);U(),Et();var ml=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),yl=function(t){return t.yk="",t.bk="manifest",t.Ak="segment",t.Sk="preload-hint",t.Tk="content-protection",t}({}),pl=function(t){return t.yk="",t.Ek="initialization-segment",t.xk="fairplay-license",t.Pk="fairplay-certificate",t.Ik="widevine-license",t.Ck="widevine-certificate",t.Rk="playready-license",t.Dk="clearkey-license",t.Nk="aes128-key",t}({}),kl=function(t){return t.yk="",t.Bk="audio",t.Mk="video",t.LT="text",t.Lk="image",t}({}),bl=function(t){return t.Ok="same-origin",t.Fk="no-cors",t.Uk="cors",t.Vk="navigate",t}({}),Al=function(t,i){this.XT=void 0,this._k=void 0,this.Hk=void 0,this.fk=void 0,this.Wk=void 0,this.qk=void 0,this.Yg=void 0,this.Km=void 0,this.zk=void 0,this.Gk=void 0,this.Yu=void 0,this.Xk=void 0,this.jk=void 0,this.Qk=void 0,this.Kk=void 0,this.Yk=void 0;var n,r,e,s,u,o,h,a,c,f,v,d,l,w,g,_,m,y,p=t.Yu;i?(n=i.XT,r=i._k,e=i.Hk,s=i.fk,u=i.Wk,o=i.qk,h=i.Yg,a=i.Km,c=i.zk,f=i.Gk,v=i.Xk,d=i.jk,l=i.Qk,w=i.Kk,g=i.Yk):(n=null,r={},e="GET",s=Ud.LT,u=0,o=0,a="",c="",f="",v=!1,l=void 0,w=!1,g=void 0),this.Yu=p,this.XT=t.XT||n,this._k=new Vd(t._k||r),this.Hk=t.Hk||e,this.fk=t.fk||s,this.Wk=void 0!==t.Wk?Number(t.Wk)||0:u,this.qk=void 0!==t.qk?Number(t.qk)||0:o,this.Yg=t.Yg||h||(new hr).Yg,this.Km=t.Km||a,this.zk=t.zk||c,this.Gk=t.Gk||f,this.Xk=void 0!==t.Xk?Boolean(t.Xk):v,this.jk=t.jk||d,this.Qk=null!=(_=t.Qk)?_:l,this.Kk=null!=(m=t.Kk)?m:w,this.Yk=null!=(y=t.Yk)?y:g},Tl=function(){function t(){}var i=t.prototype;return i.vk=function(t){var i=function(t){return new _l({lk:null,_k:{},vk:t,wk:t.Yu,fk:t.fk,dk:0,gk:eh.Gw})}(new Al(t));return ut.resolve(i)},i.Jk=function(t){},i.kn=function(){},t}();var Sl=function(){function t(t,i){void 0===i&&(i=!0),this.iE=void 0,this.sE=void 0,this.iE=t,this.sE=i}var i=t.prototype;return i.vk=function(t){var i=this.tE(t);return this.iE.vk(i)},i.Jk=function(t){return this.iE.Jk(this.eE(t))},i.tE=function(i){var n=new Al(i);if(!this.sE){var r=t.nE(n.Yu);n=new Al({Yu:r},n)}return n},i.eE=function(i){var n=i.Yu;return this.sE||(n=t.nE(n)),{Yu:n,XT:i.XT}},i.kn=function(){this.iE.kn()},t.nE=function(t){return Ui.Bm&&Fo(t,"http://")?t.replace(":","s:"):t},Nt(t,null,[{key:"Zk",get:function(){return t.$k||(t.$k=new t(new Tl)),t.$k}}]),t}();function El(t,i){var n=Ui.Dh(t);return Il(n,i),n.toString()}function Il(t,i){for(var n,r=Lt(k.keys(i));!(n=r()).done;){var e=n.value;t.searchParams.set(e,i[e])}}function Rl(t,i){var n=Ui.Pm(t);return i&&!Uo(n,"/")&&(n+="/"),n}Sl.$k=void 0,U(),Et(),U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et(),Ft();var Cl=/cache:(.+)?(?=&|$)/;function Pl(t){if(!Fo(t,"http://webcache.googleusercontent.com/search?q=cache:"))return"";var i=Ui.Dh(t).search.match(Cl);return i&&i.length>1?i[1]:""}function Dl(t){return Ui.Dh(".",t)}U(),Et(),xt(),Pt(),U(),Et(),xt(),Pt();var Nl=function(t){return t.rE="HttpOpenError",t.hE="HttpResponseError",t.oE="HttpTimeoutError",t}({}),xl=function(t){function i(i,n,r){var e;return(e=t.call(this,n,r)||this).aE=void 0,e.aE=i,e}return Ct(i,t),Nt(i,[{key:"vk",get:function(){return this.aE}}]),i}(cr),Bl=function(t){function i(i,n){return t.call(this,i,"Error while opening "+i.Yu+".",n)||this}return Ct(i,t),Nt(i,[{key:"name",get:function(){return Nl.rE}}]),i}(xl);U(),Et(),xt(),Pt();var Ol=function(t){function i(i,n,r){var e;return(e=t.call(this,i.vk,null!=r?r:function(t){return"Error while loading "+t.vk.Yu+", status code "+t.dk}(i),n)||this).cE=void 0,e.cE=i,e}return Ct(i,t),Nt(i,[{key:"name",get:function(){return Nl.hE}},{key:"uE",get:function(){return this.cE}}]),i}(xl);U(),Et(),xt(),Pt();var Ml=function(t){function i(i,n){return t.call(this,i,function(t){return"Request for "+t.Yu+" timed out after "+t.Wk+" seconds."}(i),n)||this}return Ct(i,t),Nt(i,[{key:"name",get:function(){return Nl.oE}}]),i}(xl);U(),Et();var Ll=self.fetch,Fl=self.Request,Ul=self.Response,Vl=self.Headers,Hl=self.ReadableStream,Wl=self.AbortSignal,zl=self.AbortController,Xl=_n(function(){try{return Yi(Ll)&&Ki(Fl)&&Ki(Ul)&&Ki(Vl)&&"forEach"in Vl.prototype&&Qu()}catch(t){return!1}}),ql=["http:","https:"];var Gl=_n(function(){try{return Xl()&&Ki(Wl)&&Ki(zl)&&"signal"in Fl.prototype}catch(t){return!1}}),jl=_n(function(){try{return Xl()&&Ki(Hl)&&"body"in Ul.prototype&&!Bi.e_}catch(t){return!1}});function Ql(t){return V(t,xl)}function Yl(t){return V(t,Ol)}function Kl(t,i){var n,r=t._k.has("content-length")?Number(t._k.get("content-length")):void 0;return n=t.YT?function(t,i,n){return t.pipeThrough(new Qd(new Jl(i,n)))}(t.zT(),i,r):function(t,i,n){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return[4,ut.resolve()];case 1:return s.sent(),i(0,n),[4,t];case 2:return r=s.sent(),e=r.byteLength,i(e,null!=n?n:e),[2,r]}})})()}(t.qT(),i,r),new _l({lk:n,vk:t.vk},t)}U(),Et(),H(),U(),Et(),Wt(),Qt();var Jl=function(){function t(t,i){this.lE=void 0,this.fE=void 0,this.dE=void 0,this.lE=t,this.fE=i,this.dE=0}var i=t.prototype;return i.transform=function(t,i){this.dE+=t.byteLength,this.lE(this.dE,this.fE),i.enqueue(t)},i.flush=function(t){var i;this.lE(this.dE,null!=(i=this.fE)?i:this.dE)},t}();var Zl=function(){function t(t){this.uE=void 0,this.aE=void 0,this.hT=new hr,this.cE=void 0,this._E=0,this.gE=!1,this.aE=t,this.hT.$g(t.Yg),this.uE=this.vE()}var i=t.prototype;return i.vE=function(){return Vt(function(){var t,i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:t=this,(i=this.aE).Wk&&(this._E=w(function(){t.gE=!0,t.hT.Zg()},i.Wk),this.hT.Yg.Qg(function(){g(t._E)}));try{n=Ll(i.Yu,{method:i.Hk,headers:i._k.OT(),body:i.XT,credentials:i.Xk?"include":"same-origin",signal:iw(this.hT.Yg),mode:i.Qk,keepalive:i.Yk})}catch(t){throw new Bl(i,t)}c.label=1;case 1:return c.trys.push([1,3,,4]),[4,n];case 2:return r=c.sent(),[3,4];case 3:throw e=c.sent(),vr(s=this.pE(e))&&this.hT.Zg(),s;case 4:if(u=r.url||i.Yu,o=0===r.status&&"file:"===function(t){return Ui.Dh(t).protocol}(u)?200:r.status,h=new $l(this,r,this.hT),!gl(a=new _l({lk:h,vk:i,fk:i.fk,_k:new Vd(r.headers),dk:o,gk:r.statusText,wk:u})))throw new Ol(a);return i.jk&&(a=Kl(a,i.jk)),[2,a]}})}).call(this)},i.pE=function(t){return Ql(t)?t:vr(t)?this.gE?new Ml(this.aE):new fr(t.message,t):this.cE?new Ol(this.cE,t):new Bl(this.aE,t)},t}(),$l=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).wE=void 0,e.mE=void 0,e.hT=void 0,e.$T=new Va,e.wE=i,e.mE=n,e.hT=r,e.$T.Yy.catch(dn),e}Ct(i,t);var n=i.prototype;return n.ZT=function(){return this.$T.Yy},n.HT=function(t){return this.ek(this.mE.text(),t)},n.qT=function(t){return this.ek(this.mE.arrayBuffer(),t)},n.zT=function(){var t=this.mE.body;return t?this.nk(t):$d(this.qT().then(Jd),this.hT)},n.hk=function(){var t=this.mE.clone(),n=this.hT.tp(),r=n[0],e=n[1];return this.hT=r,new i(this.wE,t,e)},n.ek=function(t,i){var n=this;i&&this.hT.$g(i);var r=gr(ut.resolve(t),this.hT.Yg).catch(function(t){throw n.wE.pE(t)});return r=_r(r,this.hT),this.$T.$g(r.then(dn)),r},n.nk=function(t){var i=this;return new jd(new nw(t,function(t){return i.wE.pE(t)},this.hT,this.$T),{highWaterMark:0})},Nt(i,[{key:"QT",get:function(){return this.mE.bodyUsed}},{key:"YT",get:function(){return Li(this.mE.body)}}]),i}(el),tw="abort";function iw(t){if(Gl()){var i=new zl;if(t.Hg)i.abort();else if(!t.Wg){var n=function(){r(),i.abort()},r=function(){i.signal.removeEventListener(tw,n),t.jg(n),t.Kg(r)};i.signal.addEventListener(tw,n),t.Xg(n),t.Qg(r)}return i.signal}}var nw=function(){function t(t,i,n,r){this.yE=void 0,this.bE=void 0,this.hT=void 0,this.$T=void 0,this.Wd=void 0,this.yE=t,this.bE=i,this.hT=n,this.$T=r}var i=t.prototype;return i.start=function(t){this.Wd=this.yE.getReader()},i.pull=function(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,gr(this.Wd.read(),this.hT.Yg)];case 1:return i=e.sent(),[3,3];case 2:return n=e.sent(),r=this.bE(n),this.$T.Ky(r),this.hT.Zg(),this.Wd.cancel(r).catch(dn),t.error(r),[2];case 3:return i.done?(this.$T.Qy(),this.hT.Zg(),t.close()):t.enqueue(i.value),[2]}})}).call(this)},i.cancel=function(t){return this.hT.Zg(),this.$T.Ky(t),this.Wd.cancel(t)},t}();U(),Et(),xt();var rw=function(){function t(t){var i=this;this.SE=void 0,this.aE=void 0,this.hT=new hr,this.cE=void 0,this.AE=new Va,this.BE=void 0,this.DE=!1,this.RE=function(){var t;i.TE(),null==(t=i.SE)||t.abort()},this.aE=t,this.hT.$g(t.Yg),this.SE=new R,this.vE()}var i=t.prototype;return i.vE=function(){var t=this,i=this.SE,n=this.aE;if(n.Yg.Hg)return this.TE();i.onreadystatechange=function(){return t.kE()},i.onprogress=function(i){return t.lE(i)},i.onload=function(){return t.EE()},i.onloadend=function(){return t.xE()},i.onerror=function(){return t.PE()},i.ontimeout=function(){return t.CE()},i.onabort=function(){return t.TE()},i.open(n.Hk,n.Yu,!0),i.withCredentials=Boolean(n.Xk),"responseType"in i&&n.fk&&(n.fk===Ud.LT?i.responseType="text":i.responseType="arraybuffer"),n._k.forEach(function(t,n){i.setRequestHeader(n,t)}),n.Wk&&(i.timeout=n.Wk),this.hT.Yg.Xg(this.RE);var r=n.XT;r?i.send(r):i.send()},i.kE=function(){var t=this.SE;void 0!==t&&t.readyState>=2&&!this.DE&&(this.DE=!0,this.NE())},i.NE=function(){var t,i,n=this.SE,r=function(t){var i=new Vd,n=t.replace(/\r?\n[\t ]+/g," ");return n.split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var e=n.join(":").trim();i.append(r,e)}}),i}(n.getAllResponseHeaders()||""),e=this.aE;this.BE=new Va,this.cE=new _l({vk:e,fk:e.fk,lk:this.BE.Yy,dk:n.status,gk:n.statusText,_k:r,wk:null!=(i=n.responseURL)?i:r.get("X-Request-URL")}),null==(t=this.AE)||t.Qy(this.cE)},i.EE=function(){var t,i=this.SE;if(void 0!==i){var n=i.response;if(!Li(n)){var r=this.aE.fk;n=r===Ud.LT?i.responseText:r===Ud.NT?new ArrayBuffer(0):{}}null==(t=this.BE)||t.Qy(n)}},i.xE=function(){this.kn()},i.lE=function(t){void 0!==this.SE&&(null==this.aE.jk||this.aE.jk.call(this.aE,t.loaded,t.lengthComputable?t.total:void 0))},i.PE=function(){var t=new y("Network request failed");this.cE?this.Ts(new Ol(this.cE,t)):this.Ts(new Bl(this.aE,t))},i.CE=function(){this.Ts(new Ml(this.aE))},i.TE=function(){this.Ts(new fr),this.kn()},i.Ts=function(t){var i,n;null==(i=null!=(n=this.BE)?n:this.AE)||i.Ky(t)},i.kn=function(){this.SE=void 0,this.cE=void 0,this.AE=void 0,this.BE=void 0,this.hT.zg()},Nt(t,[{key:"uE",get:function(){return this.AE.Yy}}]),t}();function ew(t,i,n){return new ut(function(r,e){if(n&&n.Hg)return e(new fr);var s=function(t){o(),r(t)},u=function(){o(),e(new fr)},o=function(){t.removeEventListener(i,s),n&&n.jg(u)};t.addEventListener(i,s),n&&n.Xg(u)})}U(),Et();var sw=function(){function t(){}var i=t.prototype;return i.vk=function(t){return function(t){if(!Xl()||!function(t){try{return ql.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Yu))return!1;if(!jl()&&t.jk)return!1;if(!t.Kk&&t.Hk!==ml.POST){if(Bi.S_&&Bi.d_<=68)return!1;if(Bi.w_)return!1}return!0}(t)?new Zl(t).uE:new rw(t).uE},i.Jk=function(t){var i=f.navigator;if(i&&i.sendBeacon)i.sendBeacon(t.Yu,Md([t.XT],{type:t.GT}));else{var n=t.GT?{"Content-type":t.GT}:void 0;this.vk(new Al({Hk:ml.POST,Yu:t.Yu,XT:t.XT,_k:n,Qk:bl.Fk})).then(function(t){kr(t.qT())},dn)}},i.kn=function(){},t}();U(),Et(),xt(),Pt(),U(),Et();var uw=function(t){return t[t.LE=1]="LE",t[t.OE=2]="OE",t[t.LT=3]="LT",t[t.FE=4]="FE",t[t.UE=9]="UE",t}({});function ow(t){return 1===t.VE}function hw(t){return 3===t.VE}U(),Et(),Pt();var aw=function(t){function i(i){return t.call(this,"Invalid XML",i)||this}return Ct(i,t),i}(cr),cw=function(){function t(){}return t.prototype.HE=function(t){var i,n=new DOMParser;try{i=n.parseFromString(t,"text/xml")}catch(t){throw new aw(t)}if(!i||i.getElementsByTagName("parsererror").length>0)throw new aw;return new _w(i)},t}(),fw=function(){function t(t){this.qE=void 0,this.qE=t}var i=t.prototype;return i.jE=function(t){return this.qE.isEqualNode(t.qE)},i.QE=function(i){return new t(this.qE.cloneNode(i))},Nt(t,[{key:"VE",get:function(){return uw.OE}},{key:"WE",get:function(){var t;return null!=(t=this.qE.localName)?t:pw(this.qE.nodeName)}},{key:"l",get:function(){return this.qE.nodeName}},{key:"zE",get:function(){var t;return null!=(t=this.qE.namespaceURI)?t:void 0}},{key:"GE",get:function(){var t;return null!=(t=this.qE.prefix)?t:void 0}},{key:"XE",get:function(){return this.qE.nodeValue}}]),t}(),vw=function(){function t(t){this.JE=void 0,this.YE=void 0,this.JE=t}var i=t.prototype;return i.ZE=function(t){return this.KE.filter(function(i){return mw(i)&&i.$E===t})},i.tx=function(t,i){return this.KE.filter(function(n){return mw(n)&&n.WE===i&&n.zE===t})},i.sx=function(t){this.JE.appendChild(t.ix),this.YE&&this.YE.push(t)},i.jE=function(t){return this.JE.isEqualNode(t.ix)},Nt(t,[{key:"KE",get:function(){return void 0===this.YE&&(this.YE=function(t){for(var i=[],n=0;n=0;i-=1)this.it(t[i])},n.kn=function(){this.hr(),this.Vo()},Nt(i,[{key:"NI",get:function(){return this.BI}},{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}},{key:"V",get:function(){return this.BI.length}}]),i}(th);U(),Et(),Ft(),U(),Et(),H(),U(),Et(),Ft();var Bw=k.freeze||ln;function Ow(t,i,n){k.defineProperty(t,i,{writable:!1,enumerable:!0,value:n})}function Mw(t,i){for(var n,r=Lt(k.getOwnPropertyNames(i));!(n=r()).done;){var e=n.value;k.defineProperty(t,e,k.getOwnPropertyDescriptor(i,e))}return t}function Lw(t){if(zi(t)){var i={};for(var n in t)Oi.call(t,n)&&(i[n]=Lw(t[n]));return i}if(Vi(t)){for(var r=new Array(t.length),e=0;e0?t.tC=n:t.tC=void 0},get targetQuality(){if(t.tC)return 1===t.tC.length?t.tC[0].Ca:t.tC.map(function(t){return t.Ca})},addEventListener:function(t,n){var r=Qw(t,Gw);i.wn(r,n)},removeEventListener:function(t,n){var r=Qw(t,Gw);i.mn(r,n)}};return i=new ih(r),t.wn(n,function(t){return i.So(t.Ca)}),k.defineProperty(r,"constructor",{value:$w}),r}function ig(){}function ng(t){var i=Kw(t);return k.defineProperty(i,"constructor",{value:ig}),i}var rg=function(t){function i(){return t.apply(this,arguments)||this}Ct(i,t);var n=i.prototype;return n.tt=function(i){return t.prototype.tt.call(this,i)},n.xa=function(){return ng(this)},i}(xw);U(),Et(),U(),Et();var eg=function(t){return t.Bk="audio",t.Mk="video",t.LT="text",t.Lk="image",t.yk="unknown",t}({});function sg(t){return"audio"===t||"video"===t}U(),Et(),xt(),Pt(),U(),Et(),xt(),Pt();var ug=function(t){function i(i,n,r,e,s,u,o,h){var a;return(a=t.call(this,i,n,r)||this).url=void 0,a.status=void 0,a.statusText=void 0,a.response=void 0,a.systemCode=void 0,a.url=e,a.status=s,a.statusText=u,a.response=o,a.systemCode=h,a}return Ct(i,t),Nt(i,[{key:"name",get:function(){return"ContentProtectionError"}}]),i}(ld);var og=function(t){return t[t.ABORTED=1]="ABORTED",t[t.NETWORK=2]="NETWORK",t[t.DECODE=3]="DECODE",t[t.SRC_NOT_SUPPORTED=4]="SRC_NOT_SUPPORTED",t[t.ENCRYPTED=5]="ENCRYPTED",t[t.LICENSE_INVALID=6]="LICENSE_INVALID",t[t.ADVERTISEMENT_ERROR=7]="ADVERTISEMENT_ERROR",t}({}),hg=function(t){function i(i,n,r,e){var s;return(s=t.call(this,n)||this).code=void 0,s.message=void 0,s.cause=void 0,s.systemCode=void 0,s.code=i,s.message=null!=n?n:"Unknown error",s.cause=r,s.systemCode=e,y.captureStackTrace&&y.captureStackTrace(s,s.constructor),s}return Ct(i,t),Nt(i,[{key:"name",get:function(){return"MediaError"}}]),i}(ar);function ag(t){Ow(t,"MEDIA_ERR_ABORTED",1),Ow(t,"MEDIA_ERR_NETWORK",2),Ow(t,"MEDIA_ERR_DECODE",3),Ow(t,"MEDIA_ERR_SRC_NOT_SUPPORTED",4),Ow(t,"MEDIA_ERR_ENCRYPTED",5)}function cg(t){var i,n;return function(t){return t.category===dd.CONTENT_PROTECTION}(t)?new hg(5,t.message,null==(i=t.cause)?void 0:i.message,t.systemCode):new hg(function(t){if(t===vd.MEDIA_ABORTED)return 1;if(t===vd.MANIFEST_LOAD_ERROR||t===vd.MEDIA_LOAD_ERROR||t===vd.SUBTITLE_LOAD_ERROR)return 2;if(t===vd.MEDIA_DECODE_ERROR)return 3;if(t===vd.MEDIA_NOT_SUPPORTED)return 4;var i=dd.fromCode(t);if(i===dd.NETWORK)return 2;if(i===dd.SOURCE)return 4;if(i===dd.LICENSE)return 6;if(i===dd.CONTENT_PROTECTION)return 5;if(i===dd.AD)return 7;return 3}(t.code),t.message,null==(n=t.cause)?void 0:n.message)}function fg(t){return new ld(vg(t.code),t.message,t)}function vg(t){switch(t){case 1:return vd.MEDIA_ABORTED;case 2:return vd.NETWORK_ERROR;case 3:return vd.MEDIA_DECODE_ERROR;case 4:return vd.SOURCE_NOT_SUPPORTED;case 5:return vd.CONTENT_PROTECTION_ERROR;case 6:return vd.LICENSE_ERROR;case 7:return vd.AD_ERROR}}ag(hg),ag(hg.prototype),U(),Et(),xt(),Pt(),U(),Et(),Pt();var dg=function(t){function i(){return t.apply(this,arguments)||this}return Ct(i,t),i}(nh);U(),Et(),xt(),U(),Et();var lg=function(){function t(){this._O=[],this.hu=void 0}var i=t.prototype;return i.gO=function(t){this._O.push(t),this.hu&&this.hu.push(t.Ca)},i.pS=function(t){Xn(this._O,t),this.hu&&Xn(this.hu,t.Ca)},i.MI=function(t){return this._O[t]},i.pO=function(t){return Vi(t)?function(t,i){for(var n,r=Lt(i);!(n=r()).done;)if(!jn(t,n.value))return!1;return!0}(this._O,t):jn(this._O,t)},i.hr=function(){Yn(this._O),this.hu&&Yn(this.hu)},Nt(t,[{key:"NI",get:function(){return this._O}},{key:"V",get:function(){return this._O.length}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i=t.NI.map(function(t){return t.Ca});return i.item=function(i){var n=0|i,r=t.MI(n);return r&&r.Ca||void 0},i}(this)),this.hu}}]),t}();U(),Et(),Pt();var wg=function(t){function i(i){var n;return(n=t.call(this,Nw.pa)||this).Ht=void 0,n.Ht=i,n}return Ct(i,t),i.prototype.xa=function(){return new gg(this.Ht.Ca)},i}(Sw),gg=function(t){function i(i){var n;return(n=t.call(this,"change")||this).track=void 0,n.track=i,n}return Ct(i,t),i}(Ew);U(),Et(),Pt();var _g=function(t){function i(i){var n;return(n=t.call(this,Nw.xI)||this).Ht=void 0,n.Ht=i,n}return Ct(i,t),i.prototype.xa=function(){return new mg(this.Ht.Ca)},i}(Sw),mg=function(t){function i(i){var n;return(n=t.call(this,"update")||this).track=void 0,n.track=i,n}return Ct(i,t),i}(Ew);U(),Et();var yg=0;function pg(){return yg++}var kg=0;var bg=0;function Ag(){return bg++}var Tg=0;function Sg(){return Tg++}var Eg=0;var Ig=function(t){function i(i){var n;return(n=t.call(this)||this).Km=eg.Bk,n.wO=void 0,n.aS=void 0,n.bO=void 0,n.yO=void 0,n.We=!1,n._O=void 0,n.hu=void 0,n.wO=i,n.yO=pg(),n.aS=""+Eg++,n.bO=i.label,n._O=new lg,n.TO(),n}Ct(i,t);var n=i.prototype;return n.SO=function(t){this.Rt=t},n.TO=function(){this.Rt=this.mO},Nt(i,[{key:"YI",get:function(){}},{key:"Rt",get:function(){return this.We},set:function(t){this.We!==t&&(this.We=t,this.mO=t,this.So(new wg(this)))}},{key:"mO",get:function(){return this.wO.enabled},set:function(t){this.wO.enabled=t}},{key:"Ca",get:function(){return this.hu||(this.hu=tg(this)),this.hu}},{key:"o",get:function(){return this.aS}},{key:"JI",get:function(){return this.yO}},{key:"Lt",get:function(){return this.wO.kind}},{key:"Th",get:function(){return this.bO},set:function(t){t!==this.bO&&(this.bO=t,this.So(new _g(this)))}},{key:"bs",get:function(){return this.wO.language}},{key:"Qk",get:function(){return this.Rt?"enabled":"disabled"}},{key:"AO",get:function(){return this.wO}},{key:"$I",get:function(){return this._O}},{key:"tC",get:function(){},set:function(t){}}]),i}(th);U(),Et(),xt(),Pt();var Rg=0;var Cg=function(t){function i(i){var n;return(n=t.call(this)||this).Km=eg.Mk,n.wO=void 0,n.aS=void 0,n.yO=void 0,n.We=!1,n._O=void 0,n.bO=void 0,n.hu=void 0,n.wO=i,n.yO=pg(),n.aS=""+Rg++,n._O=new lg,n.bO=i.label,n.TO(),n}Ct(i,t);var n=i.prototype;return n.TO=function(){this.Rt=this.mO},n.SO=function(t){this.Rt=t},Nt(i,[{key:"YI",get:function(){}},{key:"Rt",get:function(){return this.We},set:function(t){this.We!==t&&(this.We=t,this.mO=t,this.So(new wg(this)))}},{key:"mO",get:function(){return Boolean(this.wO.selected)},set:function(t){this.wO.selected=t}},{key:"Ca",get:function(){return this.hu||(this.hu=tg(this)),this.hu}},{key:"o",get:function(){return this.aS}},{key:"JI",get:function(){return this.yO}},{key:"Lt",get:function(){return"main"}},{key:"Th",get:function(){return this.bO},set:function(t){t!==this.bO&&(this.bO=t,this.So(new _g(this)))}},{key:"bs",get:function(){return this.wO.language}},{key:"Qk",get:function(){return this.Rt?"enabled":"disabled"}},{key:"AO",get:function(){return this.wO}},{key:"$I",get:function(){return this._O}},{key:"tC",get:function(){},set:function(t){}}]),i}(th);U(),Et(),Pt();var Pg=function(t){function i(i){var n;return(n=t.call(this,eh.yw)||this).sP=void 0,n.sP=i,n}return Ct(i,t),i}(rh);U(),Et(),Wt(),Pt(),Ft(),Qt(),U(),Et();var Dg=function(t){return t[t.NONE=0]="NONE",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED",t[t.ERROR=3]="ERROR",t}({});U(),Et();var Ng=function(t){return t.DEFAULT="",t.SRT="srt",t.TTML="ttml",t.WEBVTT="webvtt",t.EMSG="emsg",t.EVENT_STREAM="eventstream",t.ID3="id3",t.CEA608="cea608",t.DATE_RANGE="daterange",t.MILLICAST="millicast",t}({});function xg(t){switch(t){case"":case"srt":case"ttml":case"webvtt":case"emsg":case"eventstream":case"id3":case"cea608":case"daterange":case"millicast":return!0;default:return!1}}U(),Et(),Ft(),U(),Et();var Bg=function(t){return t.kO="cue",t.EO="region",t.xO="stylesheet",t}({});U(),Et(),xt(),Pt(),U(),Et();var Og={"line-left":"start",center:"middle","line-right":"end"},Mg={start:"line-left",middle:"center",end:"line-right"};function Lg(t,i){if("auto"===t)switch(i){case"start":case"left":return"line-left";case"end":case"right":return"line-right";default:return"center"}return t}function Fg(t,i){if("auto"===t)switch(i){case"left":return 0;case"right":return 100;default:return 50}return function(t,i){var n="number"==typeof t?t:T(t);return S(n)?i:n}(t,50)}U(),Et(),U(),Et(),U(),Et(),Pt();var Ug=function(t){return t.QL="yo",t.KL="jo",t.xI="er",t}({}),Vg=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).PO=void 0,r.PO=n,r}return Ct(i,t),i}(Sw),Hg=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).cue=void 0,r.cue=n,r}return Ct(i,t),i}(Ew);function Wg(t){var i,n=[Ug.QL,Ug.KL,Ug.xI],r={get IO(){return t},get track(){return t.Ht.Ca},get id(){return t.o},get uid(){return t.JI},get startTime(){return t.CO},set startTime(i){t.CO=i},get endTime(){return t.RO},set endTime(i){t.RO=i},get content(){return t.U},addEventListener:function(t,n){var r=Qw(t,Gw);i.wn(r,n)},removeEventListener:function(t,n){var r=Qw(t,Gw);i.mn(r,n)}};return i=new ih(r),t.wn(n,function(t){return i.So(t.Ca)}),r}function zg(){}function Xg(t){return Mw(Wg(t),{get align(){return t.DO},get line(){return t.BO},get lineAlign(){return t.MO},get position(){return t.mo},get positionAlign(){return t.LO},get region(){return t.OO?t.OO.Ca:null},get size(){return t.Wy},get snapToLines(){return t.FO},get text(){return t.U},get vertical(){return t.Pt}})}U(),Et(),xt(),Pt(),U(),Et(),Pt();var qg=function(t){function i(i){return t.call(this,Ug.xI,i)||this}return Ct(i,t),i.prototype.xa=function(){return new Gg(this.PO.Ca)},i}(Vg),Gg=function(t){function i(i){return t.call(this,"update",i)||this}return Ct(i,t),i}(Hg);U(),Et(),Pt();var jg=function(t){function i(i){var n;return(n=t.call(this,Nw.fI)||this).PO=void 0,n.PO=i,n}return Ct(i,t),i.prototype.xa=function(){return new Qg(this.PO.Ca)},i}(Sw),Qg=function(t){function i(i){var n;return(n=t.call(this,"updatecue")||this).cue=void 0,n.cue=i,n}return Ct(i,t),i}(Ew),Yg=.02;function Kg(t,i){return Sn(t.UO,i.UO,Yg)&&Sn(t.VO,i.VO,Yg)&&t.o===i.o}var Jg=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).yO=void 0,u.aS=void 0,u.UO=void 0,u.VO=void 0,u.HO=void 0,u.zO=void 0,u.hu=void 0,u.WO=void 0,u.ho=!1,u.GO=void 0,u.jO=void 0,u.JO=-1,u.yO=Sg(),u.HO=i,u.zO=n,u.UO=i,u.VO=n,u.GO=r,u.jO=Boolean(e),u.aS=null!=s?s:"",u}Ct(i,t);var n=i.prototype;return n.xa=function(){return Wg(this)},n.QO=function(t){return this===t||Uw(this,t)&&Kg(this,t)&&this.KO(t)},n.KO=function(t){return Fw(this.U,t.U)},n.YO=function(t,i){this.HO=t,this.zO=i,this.UO=t,this.VO=i},n.kn=function(){this.Vo()},Nt(i,[{key:"CO",get:function(){return this.HO},set:function(t){var i,n;this.HO!==t&&(this.HO=t,null==(i=this.WO)||i.qO(this),this.So(new qg(this)),null==(n=this.WO)||n.So(new jg(this)))}},{key:"RO",get:function(){return this.zO},set:function(t){var i,n;this.zO!==t&&(this.zO=t,null==(i=this.WO)||i.qO(this),this.So(new qg(this)),null==(n=this.WO)||n.So(new jg(this)))}},{key:"o",get:function(){return this.aS}},{key:"JI",get:function(){return this.yO}},{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}},{key:"ro",get:function(){return this.ho},set:function(t){this.ho=t}},{key:"Ht",get:function(){return this.WO},set:function(t){this.WO=t}},{key:"U",get:function(){return this.GO},set:function(t){var i;this.GO!==t&&(this.GO=t,this.So(new qg(this)),null==(i=this.WO)||i.So(new jg(this)))}},{key:"XO",get:function(){return this.jO},set:function(t){this.jO=t}}]),i}(th);function Zg(t,i){return t.U===i.U&&t.BO===i.BO&&t.MO===i.MO&&t.mo===i.mo&&t.LO===i.LO&&t.OO===i.OO&&t.FO===i.FO&&t.Wy===i.Wy&&t.DO===i.DO&&t.Pt===i.Pt}var $g=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this,i,n,r,e,s)||this).BO="auto",u.MO="start",u.mo="auto",u.LO="auto",u.OO=void 0,u.FO=!0,u.Wy=100,u.DO="center",u.Pt="",u}return Ct(i,t),i.prototype.KO=function(t){return Zg(this,t)},Nt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=Xg(this)),this.hu}},{key:"Km",get:function(){return Bg.kO}}]),i}(Jg);function t_(t){var i=t.BO,n=Qi(i);return n&&!t.FO&&(i<0||i>100)?100:n?Number(i):t.FO?-1:100}function i_(t){return Fg(t.mo,t.DO)}function n_(t){return Lg(t.LO,t.DO)}function r_(t){var i,n=n_(t),r=i_(t);switch(n){case"line-left":i=100-r;break;case"line-right":i=r;break;case"center":i=r<=50?2*r:2*(100-r)}return b.min(t.Wy,i)}function e_(t){return{get id(){return t.o},get lines(){return t.ZO},get regionAnchorX(){return t.$O},get regionAnchorY(){return t.tF},get scrollValue(){return t.iF},get viewportAnchorX(){return t.eF},get viewportAnchorY(){return t.sF},get width(){return t.Ti}}}U(),Et(),xt(),U(),Et();var s_=function(){function t(t,i,n,r,e,s,u,o){this.o=void 0,this.Ti=void 0,this.ZO=void 0,this.$O=void 0,this.tF=void 0,this.eF=void 0,this.sF=void 0,this.iF=void 0,this.hu=void 0,this.o=t,this.Ti=i,this.ZO=n,this.$O=r,this.tF=e,this.eF=s,this.sF=u,this.iF=o}return Nt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=e_(this)),this.hu}},{key:"Km",get:function(){return Bg.EO}}]),t}();U(),Et(),U(),Et();var u_=1e6,o_=function(){function t(){}var i=t.prototype;return i.nF=function(t){return this.rF()*t},i.hF=function(t){return this.oF(t)>0},i.aF=function(t){return this.oF(t)>=0},i.uF=function(t,i){return this.dF(t).cF(i)},i.QO=function(t){return 0===this.oF(t)},i.lF=function(t){return this.oF(t)<0},i.cF=function(t){return this.oF(t)<=0},i.fF=function(){return this.vF()?this._F():this},i.gF=function(t){return this.gO(t._F())},i.dF=function(t){return this.gF(t).fF()},t}();function h_(t,i){return t.pF()?i.pF()?Nn.rh:Nn.Fg:i.pF()?Nn.Ug:t.mF()?i.mF()&&t.vF()===i.vF()?Nn.rh:t.vF()?Nn.Ug:Nn.Fg:i.vF()?Nn.Fg:Nn.Ug}U(),Et(),Pt(),U(),Et();var a_=4294967296,c_=a_*a_,f_=c_*c_,v_=f_/2,d_=function(){function t(t,i){this.CF=void 0,this.PF=void 0,this.CF=t,this.PF=i}var i=t.prototype;return i.xF=function(){return this.PF.unsigned},i.IF=function(){return this.CF.isZero()&&this.PF.isZero()},i.vF=function(){return this.PF.isNegative()},i.RF=function(){return this.xF()?t.wF(this.CF,this.PF,!1):this},i.DF=function(){return this.xF()?this:t.wF(this.CF,this.PF,!0)},i.NF=function(){return this.CF},i.rF=function(){return this.vF()?-this._F().rF():this.PF.toNumber()*c_+this.CF.toUnsigned().toNumber()},i.BF=function(){return this.CF.toInt()},i.QO=function(t){return(this.xF()===t.xF()||this.PF.getHighBits()>>>31!=1||t.PF.getHighBits()>>>31!=1)&&(this.PF.toUnsigned().eq(t.PF.toUnsigned())&&this.CF.toUnsigned().eq(t.CF.toUnsigned()))},i.oF=function(t){if(this.QO(t))return Nn.rh;var i=this.vF(),n=t.vF();if(i&&!n)return Nn.Ug;if(!i&&n)return Nn.Fg;if(!this.xF())return this.gF(t).vF()?Nn.Ug:Nn.Fg;var r=this.DF(),e=t.DF(),s=e.PF.comp(r.PF);return s>0||0===s&&e.CF.gt(r.CF)?Nn.Ug:Nn.Fg},i.lF=function(t){return this.oF(t)<0},i.cF=function(t){return this.oF(t)<=0},i.MF=function(t){return this.oF(t)>0},i.LF=function(t){return this.oF(t)>=0},i.OF=function(){return new t(this.CF.not(),this.PF.not())},i.FF=function(i){return new t(this.CF.and(i.CF),this.PF.and(i.PF))},i.UF=function(i){return new t(this.CF.or(i.CF),this.PF.or(i.PF))},i.VF=function(i){var n=127&i;return 0===n?this:n<64?t.wF(this.CF.shl(n),this.PF.shl(n).or(this.CF.shru(64-n)),this.xF()):t.wF(ue.ZERO,this.CF.shl(n-64),this.xF())},i.HF=function(i){var n=127&i;return 0===n?this:n<64?t.wF(this.CF.shru(n).or(this.PF.shl(64-n)),this.PF.shr(n),this.xF()):t.wF(this.PF.shr(n-64),this.PF.isNegative()?ue.NEG_ONE:ue.ZERO,this.xF())},i.WF=function(i){var n=127&i;return 0===n?this:n<64?t.wF(this.CF.shru(n).or(this.PF.shl(64-n)),this.PF.shru(n),this.xF()):64===n?t.wF(this.PF,ue.ZERO,this.xF()):t.wF(this.PF.shru(n-64),ue.ZERO,this.xF())},i.gO=function(i){var n=this.PF.high>>>16,r=65535&this.PF.high,e=this.PF.low>>>16,s=65535&this.PF.low,u=this.CF.high>>>16,o=65535&this.CF.high,h=this.CF.low>>>16,a=65535&this.CF.low,c=i.PF.high>>>16,f=65535&i.PF.high,v=i.PF.low>>>16,d=65535&i.PF.low,l=i.CF.high>>>16,w=65535&i.CF.high,g=i.CF.low>>>16,_=0,m=0,y=0,p=0,k=0,b=0,A=0,T=0;A+=(T+=a+(65535&i.CF.low))>>>16,T&=65535,b+=(A+=h+g)>>>16,A&=65535,k+=(b+=o+w)>>>16,b&=65535,p+=(k+=u+l)>>>16,k&=65535,y+=(p+=s+d)>>>16,p&=65535,m+=(y+=e+v)>>>16,y&=65535,_+=(m+=r+f)>>>16,m&=65535,_+=n+c,_&=65535;var S=this.xF(),E=ue.fromBits(y<<16|p,_<<16|m,S),I=ue.fromBits(A<<16|T,k<<16|b,S);return t.wF(I,E,S)},i.gF=function(t){return this.gO(t._F())},i._F=function(){return this.OF().gO(t.qF)},i.zF=function(i){if(this.IF()||i.IF())return this.xF()?t.AF:t.SF;if(this.vF())return i.vF()?this._F().zF(i._F()):this._F().zF(i)._F();if(i.vF())return this.zF(i._F())._F();if(this.PF.isZero()&&0===this.CF.high&&i.PF.isZero()&&0===i.CF.high)return t.yF(this.CF.multiply(i.CF));var n=ue.fromBits(4294967295,0,!0),r=this.CF.and(n),e=this.CF.shru(32),s=this.PF.and(n),u=this.PF.shru(32),o=i.CF.and(n),h=i.CF.shru(32),a=i.PF.and(n),c=i.PF.shru(32),f=ue.UZERO,v=ue.UZERO,d=ue.UZERO,l=ue.UZERO;f=f.add(r.mul(o)),v=v.add(f.shru(32)),f=f.and(n),v=v.add(e.mul(o)),d=d.add(v.shru(32)),v=(v=v.and(n)).add(r.mul(h)),d=d.add(v.shru(32)),v=v.and(n),d=d.add(s.mul(o)),l=l.add(d.shru(32)),d=(d=d.and(n)).add(e.mul(h)),l=l.add(d.shru(32)),d=(d=d.and(n)).add(r.mul(a)),l=l.add(d.shru(32)),d=d.and(n),l=l.add(u.mul(o)).add(s.mul(h)).add(e.mul(a)).add(r.mul(c)).and(n);var w=ue.fromBits(f.getLowBitsUnsigned(),v.getLowBitsUnsigned(),!0),g=ue.fromBits(d.getLowBitsUnsigned(),l.getLowBitsUnsigned(),!0);return t.wF(w,g,this.xF())},i.GF=function(i){var n,r,e=i;if(e.IF())throw new RangeError("division by zero");if(this.IF())return this.xF()?[t.AF,t.AF]:[t.SF,t.SF];if(this.xF()){if(e.xF()||(e=e.DF()),e.MF(this))return[t.AF,this];if(e.MF(this.WF(1)))return[r=t.XF,n=this.gF(e)];r=t.AF}else{if(this.QO(t.kF)){if(e.QO(t.qF)||e.QO(t.jF))return[t.kF,t.SF];if(e.QO(t.kF))return[t.qF,t.SF];var s=this.HF(1).QF(e).VF(1);return s.QO(t.SF)?r=e.vF()?t.qF:t.jF:(n=this.gF(e.zF(s)),r=s.gO(n.QF(e))),[r,n=this.gF(e.zF(r))]}if(e.QO(t.kF))return this.xF()?[t.AF,this]:[t.SF,this];var u,o;if(this.vF())return e.vF()?this._F().GF(e._F()):(r=(u=this._F().GF(e))[0],n=u[1],[r._F(),n._F()]);if(e.vF())return r=(o=this.GF(e._F()))[0],n=o[1],[r._F(),n._F()];r=t.SF}for(n=this;n.LF(e);){for(var h=b.max(1,b.floor(n.rF()/e.rF())),a=b.ceil(b.log(h)/b.LN2),c=a<=48?1:b.pow(2,a-48),f=t.bF(h),v=f.zF(e);v.vF()||v.MF(n);)h-=c,v=(f=t.bF(h,this.xF())).zF(e);f.IF()&&(f=t.qF),r=r.gO(f),n=n.gF(v)}return[r,n]},i.QF=function(t){return this.GF(t)[0]},i.KF=function(t){return this.GF(t)[1]},i.toString=function(i){var n=i||10;if(n<2||n>36)throw new RangeError("radix");if(this.IF())return"0";if(this.vF()){if(this.QO(t.kF)){var r=t.bF(n),e=this.QF(r),s=e.zF(r).gF(this);return e.toString(n)+s.BF().toString(n)}return"-"+this._F().toString(n)}for(var u=t.bF(b.pow(n,6),this.xF()),o=this,h="";;){var a=o.QF(u),c=(o.gF(a.zF(u)).BF()>>>0).toString(n);if((o=a).IF())return c+h;for(;c.length<6;)c="0"+c;h=String(c)+h}},t.wF=function(i,n,r){return r?new t(i.toUnsigned(),n.toUnsigned()):new t(i.toSigned(),n.toSigned())},t.yF=function(i){return i.unsigned?new t(i,ue.UZERO):new t(i,i.isNegative()?ue.NEG_ONE:ue.ZERO)},t.bF=function(i,n){if(S(i))return n?t.AF:t.SF;if(n){if(i<0)return t.AF;if(i>=f_)return t.TF}else{if(i<=-v_)return t.kF;if(i+1>=v_)return t.EF}return i<0?t.bF(-i,n)._F():t.wF(ue.fromNumber(i%c_),ue.fromNumber(i/c_),n)},t}();d_.SF=d_.yF(ue.ZERO),d_.AF=d_.yF(ue.UZERO),d_.qF=d_.yF(ue.ONE),d_.XF=d_.yF(ue.UONE),d_.jF=d_.yF(ue.NEG_ONE),d_.EF=d_.wF(ue.NEG_ONE,ue.MAX_VALUE,!1),d_.TF=d_.wF(ue.MAX_UNSIGNED_VALUE,ue.MAX_UNSIGNED_VALUE,!0),d_.kF=d_.wF(ue.ZERO,ue.MIN_VALUE,!1),U(),Et(),xt();var l_=function(){function t(t,i){void 0===i&&(i=1),this.YF=void 0,this.jD=void 0,this.YF=t,this.jD=i}var i=t.prototype;return i.gO=function(i){return this.jD>=i.jD?new t(this.YF+i.eU(this.jD).YF,this.jD):new t(this.eU(i.jD).YF+i.YF,i.jD)},i.hF=function(t){return t.lF(this)},i.aF=function(t){return t.cF(this)},i.dF=function(i){return this.jD>=i.jD?new t(b.abs(this.YF-i.eU(this.jD).YF),this.jD):i.dF(this)},i.uF=function(t,i){return this.dF(t).cF(i)},i.oF=function(t){return function(t,i){return t.jD>=i.jD?Mn(t.YF,i.eU(t.jD).YF):Mn(t.eU(i.jD).YF,i.YF)}(this,t)},i.QO=function(t){return 0===this.oF(t)},i.lF=function(t){return this.oF(t)<0},i.cF=function(t){return this.oF(t)<=0},i.eU=function(i){return new t(this.YF*(i/this.jD),i)},i.gF=function(i){return this.jD>=i.jD?new t(this.YF-i.eU(this.jD).YF,this.jD):new t(this.eU(i.jD).YF-i.YF,i.jD)},i.sU=function(i){return new t(this.YF*i,this.jD)},t.JF=function(i){return new t(b.ceil(i.YF),i.jD)},t.ZF=function(i){return new t(b.floor(i.YF),i.jD)},t.tU=function(t,i){return t.aF(i)?t:i},t.iU=function(t,i){return t.cF(i)?t:i},Nt(t,[{key:"mF",get:function(){return!isFinite(this.YF)}},{key:"dd",get:function(){return this.YF/this.jD}}]),t}();l_.fd=new l_(1/6,1),l_.SF=new l_(0),l_.nU=new l_(1/0),l_.rU=1e6;var w_=function(t){function i(i,n){var r;return(r=t.call(this)||this).XE=void 0,r.jD=void 0,r.XE=i.toSigned(),r.jD=n>>>0,r}Ct(i,t);var n=i.prototype;return n.vF=function(){return this.XE.isNegative()},n.IF=function(){return 0!==this.jD&&this.XE.isZero()},n.mF=function(){return 0===this.jD&&!this.XE.isZero()},n.pF=function(){return 0===this.jD&&this.XE.isZero()},n.rF=function(){if(0===this.jD)return this.XE.isZero()?NaN:this.XE.isNegative()?-1/0:1/0;var t=this.XE.divide(this.jD),i=this.XE.subtract(t.multiply(this.jD));return t.toNumber()+i.toNumber()/this.jD},n.NF=function(){if(0===this.jD)throw new y("Failed to convert timestamp");return this.XE},n.fU=function(){return new Date(0===this.jD?NaN:this.eU(1e3).XE.toNumber())},n.vU=function(){return new l_(0===this.jD?this.rF():this.XE.toNumber(),this.jD)},n.eU=function(t,n){void 0===n&&(n=__._U);var r=this.jD;if(r===t)return this;if(0===r)return this;var e=Pn(r,t),s=function(t,i,n){var r=t.GF(i),e=r[0],s=r[1];if(s.IF())return e;if(n===__._U)return s.vF()?e.gF(d_.qF):e;if(n===__.gU)return s.vF()?e:e.gO(d_.qF);var u=s.zF(d_.bF(2));return u.vF()?u._F().lF(i)?e:e.gF(d_.qF):u.lF(i)?e:e.gO(d_.qF)}(d_.yF(this.XE).zF(d_.bF(t/e)),d_.bF(r/e),n);return new i(s.NF(),t)},n.oF=function(t){if(this===t)return Nn.rh;if(0===this.jD||0===t.jD)return h_(this,t);if(this.IF())return t.IF()?Nn.rh:t.vF()?Nn.Fg:Nn.Ug;if(t.IF())return this.vF()?Nn.Ug:Nn.Fg;var i=b.min(this.jD,t.jD),n=this.eU(i,__.pU).XE,r=t.eU(i,__.pU).XE;return n.compare(r)},n._F=function(){return 0===this.jD?function(t){0;return t.pF()?t:t.vF()?w_.aU:w_.uU}(this):new i(this.XE.negate(),this.jD)},n.gO=function(t){if(0===this.jD||0===t.jD)return function(t,i){0;if(t.pF()||i.pF())return w_.oU;if(t.mF()&&i.mF())return t.vF()===i.vF()?t:w_.oU;return t.mF()?t:i}(this,t);if(this.IF())return t;if(t.IF())return this;var n=b.max(this.jD,t.jD),r=this.eU(n,__.pU),e=t.eU(n,__.pU);return new i(r.XE.add(e.XE),n)},n.zF=function(t){if(this.pF()||S(t))return i.oU;if(this.mF()||!isFinite(t)){if(this.IF()||0===t)return i.oU;var n=this.vF()?i.uU:i.aU;return t<0?n._F():n}return this.IF()?this:new i(0===t?ue.ZERO:this.XE.multiply(t),this.jD)},n.QF=function(t){if(this.pF()||S(t))return i.oU;if(this.mF())return isFinite(t)?0===t?1/t<0?this._F():this:t<0?this._F():this:i.oU;if(!isFinite(t))return new i(ue.ZERO,this.jD);if(this.IF())return 0===t?i.oU:new i(ue.ZERO,this.jD);if(0===t){var n=this.vF()?i.uU:i.aU;return 1/t<0?n._F():n}return new i(this.XE.divide(t),this.jD)},n.mU=function(){return[this.XE.low,this.XE.high,this.jD]},i.hU=function(t,n){return void 0===n&&(n=u_),i.bF(t*n,n)},i.bF=function(t,n){return S(t)?i.oU:t===1/0?i.aU:t===-1/0?i.uU:new i(ue.fromNumber(t),n)},i.yF=function(t,n){return new i(t,n)},i.cU=function(t){return i.hU(t.dd,u_)},i.dU=function(t){return new i(ue.fromNumber(t.getTime()),1e3)},i.tU=function(t,i){return t.aF(i)?t:i},i.iU=function(t,i){return t.cF(i)?t:i},i.lU=function(t,n,r){return i.tU(n,i.iU(r,t))},i}(o_);w_.SF=new w_(ue.ZERO,u_),w_.oU=new w_(ue.ZERO,0),w_.aU=new w_(ue.ONE,0),w_.uU=new w_(ue.NEG_ONE,0),U(),Et(),xt(),Pt(),ct();var g_=function(t){function i(i,n){var r;return(r=t.call(this)||this).XE=void 0,r.jD=void 0,r.XE=BigInt.asIntN(64,i),r.jD=n>>>0,r}Ct(i,t);var n=i.prototype;return n.vF=function(){return this.XE>BigInt(32)&BigInt(4294967295);return ue.fromBits(Number(t),Number(i))},n.fU=function(){return new Date(0===this.jD?NaN:Number(this.eU(1e3).XE))},n.vU=function(){return new l_(0===this.jD?this.rF():Number(this.XE),this.jD)},n.eU=function(t,n){void 0===n&&(n=__._U);var r=this.jD;if(r===t)return this;if(0===r)return this;var e=Pn(r,t),s=function(t,i,n){var r=t/i,e=t-r*i;if(e===BigInt(0))return r;if(n===__._U)return er?Nn.Fg:n>>0),n)},i.cU=function(t){return i.hU(t.dd,u_)},i.dU=function(t){return i.bF(t.getTime(),1e3)},i.tU=function(t,i){return t.aF(i)?t:i},i.iU=function(t,i){return t.cF(i)?t:i},i.lU=function(t,n,r){return i.tU(n,i.iU(r,t))},Nt(i,null,[{key:"SF",get:function(){return i.wU||(i.wU=new i(BigInt(0),u_)),i.wU}},{key:"oU",get:function(){return i.yU||(i.yU=new i(BigInt(0),0)),i.yU}},{key:"aU",get:function(){return i.bU||(i.bU=new i(BigInt(1),0)),i.bU}},{key:"uU",get:function(){return i.AU||(i.AU=new i(BigInt(-1),0)),i.AU}}]),i}(o_);g_.wU=void 0,g_.yU=void 0,g_.bU=void 0,g_.AU=void 0;var __=function(t){return t[t._U=0]="_U",t[t.gU=1]="gU",t[t.pU=2]="pU",t}({}),m_=function(){try{return"function"==typeof BigInt&&"bigint"===W(BigInt(0))}catch(t){return!1}}()?g_:w_;function y_(t,i){return t.oF(i)}function p_(t,i){return void 0!==t?void 0!==i?m_.iU(t,i):t:i}U(),Et();var k_=b.pow(2,33),b_=_n(function(){return m_.bF(k_,9e4)}),A_=_n(function(){return b_().QF(2)});U(),Et();var T_={TU:0,kU:1/0,EU:0},S_=["WEBVTT","WEBVTT ","WEBVTT\t","WEBVTT\n"],E_=[" ","\t","\n","\f","\r"],I_=/^\d*$/,R_=/.*[0-9]+.*/,C_=/^[\d.-]+$/,P_=/(^\.|\.$)/,D_=/(\D\.|\.\D)/;function N_(t,i,n){return void 0===i&&(i=T_),void 0===n&&(n=!0),x_(la(_a(t),new Ta),i,n)}function x_(t,i,n){void 0===i&&(i=T_),void 0===n&&(n=!0);var r={L:[],xU:[],PU:[]},e=B_(t),s=new Ta,u=!1;if(G_(e),O_(e,function(t){return"\n"!==t},s),s.ac>=e.length)return r;(s.Ly(1),"\n"!==e.charAt(s.ac))?V_(M_(e,s,u,!0,r,i,n),r):s.Ly(1);for(O_(e,function(t){return"\n"===t},s);s.ac=t.length?f=!0:i.Ly(1),Lo(o,"--\x3e")){if(r||1!==h&&(2!==h||v)){i.Oy(a);break}v=!0,a=i.ac,d=new $g(0,0,"",!1,c);try{H_(o,e.xU,d,s,u),c=""}catch(t){Ui.um(t),d=null}}else{if(""===o)break;r&&Fo(o,"X-TIMESTAMP-MAP")&&(e.IU=L_(o)),r||2!==h||n||(Vo("STYLE",c.replace(/ /g,""))?(l={Km:Bg.xO},c=""):Vo("REGION",c.replace(/ /g,""))&&(w=new s_("",100,3,0,100,0,100,""),c="")),c&&(c+="\n"),c+=o,a=i.ac}if(d)return d.U=c,d;if(l);else if(w)return function(t,i){for(var n,r=t.split(/\s/),e=":",s=Lt(r);!(n=s()).done;){var u=n.value;if(0!==u.length&&Lo(u,e)&&u.charAt(0)!==e&&u.charAt(u.length-1)!==e){var o=u.indexOf(e),h=u.substring(0,o),a=u.substring(o+1,u.length);switch(h.toUpperCase()){case"ID":em(a,i);break;case"WIDTH":om(a,i);break;case"LINES":um(a,i);break;case"REGIONANCHOR":var c=rm(a);c&&(i.$O=c[0],i.tF=c[1]);break;case"VIEWPORTANCHOR":var f=rm(a);f&&(i.eF=f[0],i.sF=f[1]);break;case"SCROLL":sm(a,i)}}}}(c,w),w;return null}function L_(t){var i,n=t.split("=")[1].trim().split(","),r=U_(n[0].trim(),"MPEGTS")?n[0]:n[1],e=U_(n[0].trim(),"LOCAL")?n[0]:n[1];return{CU:F_(Number(r.split(/:(.*)/)[1].trim())||0),bh:m_.hU(null!=(i=X_(e.split(/:(.*)/)[1].trim(),new Ta))?i:0)}}function F_(t){return m_.bF(t,9e4)}function U_(t,i){return Fo(t,i)}function V_(t,i){t&&function(t){return"cue"===t.Km}(t)?i.L.push(t):t&&function(t){return"region"===t.Km}(t)?i.xU.push(t):t&&function(t){return"stylesheet"===t.Km}(t)&&i.PU.push(t)}function H_(t,i,n,r,e){var s=new Ta;Q_(t,s);var u=W_(X_(t,s),r,e);if(Q_(t,s),"--\x3e"!==t.substring(s.ac,s.ac+3))throw y("Something went wrong with parsing a WebVTT Cue");s.Ly(3),Q_(t,s);var o=W_(X_(t,s),r,e);n.YO(u,o),function(t,i,n){for(var r,e=t.split(/\s/),s=":",u=Lt(e);!(r=u()).done;){var o=r.value;if(0!==o.length&&Lo(o,s)&&o.charAt(0)!==s&&o.charAt(o.length-1)!==s){var h=o.indexOf(s),a=o.substring(0,h),c=o.substring(h+1,o.length);switch(a.toUpperCase()){case"REGION":$_(c,i,n);break;case"VERTICAL":im(c,i);break;case"D":nm(c,i);break;case"LINE":case"L":J_(c,i);break;case"POSITION":case"T":Z_(c,i);break;case"SIZE":case"S":tm(c,i);break;case"ALIGN":case"A":K_(c,i)}}}}(t.substring(s.ac,t.length),n,i)}function W_(t,i,n){return n?t+i.TU:t}function z_(t){return/^[0-9]$/.test(t)}function X_(t,i){var n,r,e,s=Mo(t,",","."),u=!1;if(i.ac>=s.length||!z_(s.charAt(i.ac)))throw new y("Something went wrong with parsing a WebVTT Cue timestamp");var o=O_(s,z_,i),h=A(o,10);if((o.length>2||h>59)&&(u=!0),i.ac>=s.length||":"!==s.charAt(i.ac))throw new y("Something went wrong with parsing a WebVTT Cue timestamp");i.Ly(1);var a=O_(s,z_,i);if(2!==a.length)throw new y("Something went wrong with parsing a WebVTT Cue timestamp");var c=A(a,10);if(u||i.ac=s.length||":"!==s.charAt(i.ac))throw new y("Something went wrong with parsing a WebVTT Cue timestamp");i.Ly(1);var f=O_(s,z_,i);if(2!==a.length)throw new y("Something went wrong with parsing a WebVTT Cue timestamp");n=h,r=c,e=A(f,10)}else n=0,r=h,e=c;if(i.ac>=s.length||"."!==s.charAt(i.ac))throw new y("Something went wrong with parsing a WebVTT Cue timestamp");i.Ly(1);var v=O_(s,z_,i),d=A(v,10);if(c>59||e>59)throw new y("Something went wrong with parsing a WebVTT Cue timestamp");return 60*n*60+60*r+e+d/1e3}function q_(t){return G_(B_(t))}function G_(t){if(t.length<6)return!1;for(var i,n=Lt(S_);!(i=n()).done;){var r=i.value;if(Fo(t,r))return!0}return!1}function j_(t){return jn(E_,t)}function Q_(t,i){for(;i.ac-1){var n=T(t.substring(0,i));if(!S(n)&&n>=0&&n<=100)return n}return null}function K_(t,i){var n=t.toLowerCase();switch(n){case"start":case"center":case"end":case"left":case"right":i.DO=n;break;case"middle":i.DO="center"}}function J_(t,i){var n,r,e=t.indexOf(",");if(e>=0?(n=t.substring(0,e),r=t.substring(e+1,t.length)):(n=t,r=""),R_.test(n)){var s,u;if(Uo(n,"%")){var o=Y_(n);if(null===o)return;s=o,u=!1}else{if(!C_.test(n)||n.lastIndexOf("-")>0)return;var h=n.indexOf(".");if(h>=0&&(h!==n.lastIndexOf(".")||!D_.test(n)||P_.test(n)))return;if(s=T(n),S(s))return;u=!0}switch(i.BO=s,i.FO=u,r=r.toLowerCase()){case"start":case"center":case"end":i.MO=r;break;case"middle":i.MO="center"}}}function Z_(t,i){var n,r,e=t.indexOf(",");e>=0?(n=t.substring(0,e),r=t.substring(e+1,t.length)):(n=t,r="");var s=Y_(n);if(null!==s)switch(i.mo=s,r=r.toLowerCase()){case"line-left":case"center":case"line-right":case"auto":i.LO=r;break;case"start":i.LO="line-left";break;case"middle":i.LO="center";break;case"end":i.LO="line-right"}}function $_(t,i,n){var r=Vn(n,function(i){return i.o===t});void 0!==r&&(i.OO=r)}function tm(t,i){var n=Y_(t);null!==n&&(i.Wy=n)}function im(t,i){switch(t.toLowerCase()){case"rl":case"vertical:rl":case"vertical-rl":i.Pt="rl";break;case"lr":case"vertical:lr":case"vertical-lr":i.Pt="lr";break;default:i.Pt=""}}function nm(t,i){"VERTICAL"===t.toUpperCase()?i.Pt="rl":"VERTICAL-LR"===t.toUpperCase()&&(i.Pt="lr")}function rm(t){if(t.indexOf(",")>=0){var i=Y_(t.substring(0,t.indexOf(","))),n=Y_(t.substring(t.indexOf(",")+1,t.length));return[Tn(i||0,0,100),Tn(n||100,0,100)]}return null}function em(t,i){i.o=t}function sm(t,i){"up"===t.toLowerCase()&&(i.iF="up")}function um(t,i){I_.test(t)&&(i.ZO=A(t))}function om(t,i){var n=Y_(t);null!==n&&(i.Ti=n)}U(),Et(),Ft(),U(),Et(),Ft(),U(),Et();var hm=function(t){return t.HC="moov",t.WC="mvhd",t.qC="trak",t.zC="tkhd",t.GC="mdia",t.XC="mdhd",t.jC="hdlr",t.QC="minf",t.KC="stbl",t.YC="stsd",t.JC="stsc",t.ZC="mvex",t.$C="trex",t.tR="avc1",t.iR="avcC",t.eR="hev1",t.sR="hvc1",t.nR="hvcC",t.rR="vp09",t.hR="vpcC",t.oR="av01",t.aR="av1C",t.uR="dvcC",t.cR="dvvC",t.dR="dvwC",t.lR="dac3",t.fR="dec3",t.vR="dvav",t._R="dva1",t.gR="dvhe",t.pR="dvh1",t.mR="ac-3",t.wR="ec-3",t.yR="colr",t.bR="pasp",t.AR="mp4a",t.SR="esds",t.kR="fLaC",t.ER="dfLa",t.xR="wvtt",t.PR="vttC",t.IR="vlab",t.RR="enca",t.DR="encv",t.NR="moof",t.MR="mfhd",t.LR="traf",t.OR="tfhd",t.FR="trun",t.UR="tfdt",t.HR="senc",t.WR="mdat",t.qR="pssh",t.zR="emsg",t.GR="sidx",t.XR="styp",t.jR="ftyp",t.QR="sinf",t.KR="frma",t.YR="schi",t.JR="tenc",t}({}),am=function(t){return t.ON_SCREEN_COLOURS="nclx",t.RESTRICTED_ICC_PROFILE="rICC",t.UNRESTRICED_ICC_PROFILE="prof",t}({}),cm=function(t){return t[t.BASE_DATA_OFFSET_PRESENT=1]="BASE_DATA_OFFSET_PRESENT",t[t.SAMPLE_DESCRIPTION_INDEX_PRESENT=2]="SAMPLE_DESCRIPTION_INDEX_PRESENT",t[t.DEFAULT_SAMPLE_DURATION_PRESENT=8]="DEFAULT_SAMPLE_DURATION_PRESENT",t[t.DEFAULT_SAMPLE_SIZE_PRESENT=16]="DEFAULT_SAMPLE_SIZE_PRESENT",t[t.DEFAULT_SAMPLE_FLAGS_PRESENT=32]="DEFAULT_SAMPLE_FLAGS_PRESENT",t[t.DURATION_IS_EMPTY=65536]="DURATION_IS_EMPTY",t[t.DEFAULT_BASE_IS_MOOF=131072]="DEFAULT_BASE_IS_MOOF",t}({}),fm=function(t){return t[t.DATA_OFFSET_PRESENT=1]="DATA_OFFSET_PRESENT",t[t.FIRST_SAMPLE_FLAGS_PRESENT=4]="FIRST_SAMPLE_FLAGS_PRESENT",t[t.SAMPLE_DURATION_PRESENT=256]="SAMPLE_DURATION_PRESENT",t[t.SAMPLE_SIZE_PRESENT=512]="SAMPLE_SIZE_PRESENT",t[t.SAMPLE_FLAGS_PRESENT=1024]="SAMPLE_FLAGS_PRESENT",t[t.SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT=2048]="SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT",t}({});U(),Et();var vm=function(){function t(t,i){this.lk=void 0,this.$R=void 0,this.lk=t,this.$R=i}var i=t.prototype;return i.ZR=function(){return Mh(this.lk,this.$R)},i.tD=function(){return zh(this.lk,this.$R)},i.iD=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getInt16(i.ac,n);return i.Ly(2),r}(this.lk,this.$R)},i.eD=function(){return qh(this.lk,this.$R)},i.sD=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getInt32(i.ac,n);return i.Ly(4),r}(this.lk,this.$R)},i.nD=function(){return jh(this.lk,this.$R)},i.rD=function(t){return Fh(this.lk,this.$R,t)},i.hD=function(t){return function(t,i,n){for(var r=[],e=0;ei.byteLength){var a=h;return n.Oy(e),{vD:!1,bD:a}}var c={Km:u.Km,ac:e,lk:new vm(ga(i,e,h),new Ta(u.SD))};return n.Oy(h),{vD:!0,gD:c}},t.wD=function(t,i){var n=i.ac;if(!Vh(t,i,8))return{vD:!1,bD:i.ac+8};var r=qh(t,i),e=Kh(t,i,4);if(1===r){if(!Vh(t,i,8)){var s=i.ac+8;return i.Oy(n),{vD:!1,bD:s}}r=jh(t,i).toNumber()}if("uuid"===e){if(!Vh(t,i,16)){var u=i.ac+16;return i.Oy(n),{vD:!1,bD:u}}e=Kh(t,i,16)}return{vD:!0,yD:{Km:e,Wy:r,SD:i.ac-n}}},t.TD=function(t,i,n){var r=t.lk,e=t.$R,s=wa(ma(r),e.ac,r.byteLength);return n&&(s=ba(s)),e.Ly(s.byteLength),{Km:i,lk:s}},t.kD=function(i,n,r){var e=pm(i.eD());return{Km:n,ED:e.version,xD:e.flags,lk:t.TD(i,n,r).lk}},t}();function _m(t,i){var n=mm(t,i);if(!n)throw new y("Missing "+i+" atom");return n}function mm(t,i){for(var n,r=Lt(t);!(n=r()).done;){var e=n.value;if(e.Km===i)return e.lk}}function ym(t,i){for(var n,r=[],e=Lt(t);!(n=e()).done;){var s=n.value;s.Km===i&&r.push(s.lk)}return r}function pm(t){return{version:t>>24,flags:new xh(16777215&t)}}var km=function(){function t(){}return t.PD=function(i){for(var n,r=[],e=Lt(gm.lD(new vm(i,new Ta)));!(n=e()).done;){var s=n.value,u=t.CD(s);u&&r.push(u)}return r},t.RD=function(t){return gm.fD(t,new Ta,!1).m.some(this.DD)},t.ND=function(i){return ym(gm.lD(new vm(i,new Ta)),hm.qR).map(t.BD)},t.MD=function(i){return ym(gm.lD(i.lk),hm.qR).map(t.BD)},t.DD=function(t){return t.Km===hm.jR||t.Km===hm.XR||t.Km===hm.HC||t.Km===hm.NR||t.Km===hm.WR||t.Km===hm.GR||t.Km===hm.zR},t.CD=function(i){switch(i.Km){case hm.HC:return t.LD(i.lk);case hm.NR:return t.OD(i.lk,i.ac);case hm.WR:return t.FD(i.lk);case hm.GR:return t.UD(i.lk);case hm.zR:return t.VD(i.lk)}},t.LD=function(i){var n=gm.lD(i),r=_m(n,hm.WC),e=ym(n,hm.qC),s=mm(n,hm.ZC),u=t.HD(r),o=e.map(t.WD),h=s?t.qD(s):void 0;return{Km:hm.HC,yD:u,Z:o,zD:h}},t.HD=function(t){var i=pm(t.eD()),n=i.version,r=i.flags,e=1===n?t.nD():t.eD(),s=1===n?t.nD():t.eD(),u=t.eD(),o=1===n?t.nD():t.eD(),h=t.eD(),a=t.tD()>>8;t.uD(2),t.uD(8);var c=t.hD(9);t.uD(24);var f=t.eD();return{Km:hm.WC,ED:n,xD:r,GD:e,XD:s,jD:u,ct:o,QD:h,OP:a,KD:c,YD:f}},t.WD=function(i){var n=gm.lD(i),r=_m(n,hm.zC),e=_m(n,hm.GC),s=t.JD(r),u=t.ZD(e);return{Km:hm.qC,yD:s,$D:u}},t.JD=function(t){var i=pm(t.eD()),n=i.version,r=i.flags,e=1===n?t.nD():t.eD(),s=1===n?t.nD():t.eD(),u=t.eD();t.uD(4);var o=1===n?t.nD():t.eD();t.uD(8);var h=t.iD(),a=t.iD(),c=t.iD()/b.pow(2,8);t.uD(2);var f=t.hD(9),v=t.eD()/b.pow(2,16),d=t.eD()/b.pow(2,16);return{Km:hm.zC,tN:r.Uy(1),iN:r.Uy(2),eN:r.Uy(4),GD:e,XD:s,sN:u,ct:o,nN:h,rN:a,OP:c,KD:f,Ti:v,Mi:d}},t.ZD=function(i){var n=gm.lD(i),r=_m(n,hm.XC),e=_m(n,hm.jC),s=_m(n,hm.QC),u=t.hN(r),o=t.oN(e),h=t.aN(s);return{Km:hm.GC,yD:u,uN:o,cN:h}},t.hN=function(t){var i=pm(t.eD()),n=i.version,r=i.flags,e=1===n?t.nD():t.eD(),s=1===n?t.nD():t.eD(),u=t.eD(),o=1===n?t.nD():t.eD();t.tD();return t.uD(2),{Km:hm.XC,ED:n,xD:r,GD:e,XD:s,jD:u,ct:o}},t.oN=function(t){var i=pm(t.eD()),n=i.version,r=i.flags;t.uD(4);var e=t.oD(4);t.uD(12);var s=t.aD();return{Km:hm.jC,ED:n,xD:r,dN:e,l:s}},t.aN=function(i){var n=_m(gm.lD(i),hm.KC),r=t.lN(n);return{Km:hm.QC,fN:r}},t.lN=function(i){var n=_m(gm.lD(i),hm.YC),r=t.vN(n);return{Km:hm.KC,_N:r}},t.vN=function(i){for(var n,r=pm(i.eD()),e=r.version,s=r.flags,u=(i.eD(),[]),o=Lt(gm.lD(i));!(n=o()).done;){var h=n.value,a=t.gN(h.lk,h.Km);a&&u.push(a)}return{Km:hm.YC,ED:e,xD:s,pN:u}},t.gN=function(i,n){var r=t.mN(i,n);return r||((r=t.wN(i,n))||(n===hm.xR?t.yN(i):void 0))},t.mN=function(i,n){return n===hm.AR?t.bN(i):n===hm.kR||n===hm.kR.toLowerCase()||n===hm.kR.toUpperCase()?t.AN(i):n===hm.RR?t.SN(i):n===hm.mR?t.TN(i):n===hm.wR?t.kN(i):void 0},t.wN=function(i,n){return n===hm.tR?t.EN(i):n===hm.eR||n===hm.sR?t.xN(i,n):n===hm.rR?t.PN(i,n):n===hm.oR?t.CN(i,n):n===hm.DR?t.RN(i):n===hm.vR||n===hm._R||n===hm.gR||n===hm.pR?t.DN(i,n):void 0},t.NN=function(t,i){return t.uD(6),{Km:i,BN:t.tD()}},t.MN=function(i,n){var r=t.NN(i,n);i.uD(8);var e=i.tD(),s=i.tD();return i.uD(2),i.uD(2),Yu({},r,{LN:e,ON:s,FN:i.eD()>>>16})},t.UN=function(i,n){var r=t.NN(i,n);i.uD(2),i.uD(2),i.uD(12);var e=i.tD(),s=i.tD(),u=i.eD(),o=i.eD();i.uD(4);var h=i.tD();i.uD(32);var a=i.tD();return i.uD(2),Yu({},r,{Ti:e,Mi:s,VN:u,HN:o,WN:h,qN:a})},t.bN=function(i){var n=t.MN(i,hm.AR),r=_m(gm.lD(i),hm.SR);return Yu({},n,{zN:t.GN(r)})},t.AN=function(i){var n=t.MN(i,hm.kR),r=_m(gm.lD(i),hm.ER);return Yu({},n,{XN:t.jN(r)})},t.yN=function(i){var n=t.NN(i,hm.xR),r=gm.lD(i),e=_m(r,hm.PR),s=t.QN(e),u=mm(r,hm.IR);return Yu({},n,{KN:s,YN:u?t.JN(u):void 0})},t.QN=function(t){return{Km:hm.PR,Cd:t.aD()}},t.JN=function(t){return{Km:hm.IR,Th:t.aD()}},t.GN=function(t){return gm.kD(t,hm.SR,!0)},t.jN=function(t){return gm.kD(t,hm.ER,!0)},t.EN=function(i){var n=t.UN(i,hm.tR),r=gm.lD(i),e=_m(r,hm.iR),s=mm(r,hm.bR);return Yu({},n,{ZN:t.$N(e),tB:s?t.iB(s):void 0})},t.xN=function(i,n){var r=t.UN(i,n),e=_m(gm.lD(i),hm.nR);return Yu({},r,{eB:t.sB(e)})},t.PN=function(i,n){var r=t.UN(i,n),e=_m(gm.lD(i),hm.hR);return Yu({},r,{nB:t.rB(e)})},t.CN=function(i,n){var r=t.UN(i,n),e=gm.lD(i),s=_m(e,hm.aR),u=t.hB(s),o=mm(e,hm.yR);return Yu({},r,{oB:u,aB:o?t.uB(o):void 0})},t.RN=function(i){var n=i.Fy(),r=t.UN(i,hm.DR),e=_m(gm.lD(i),hm.QR),s=t.cB(e);return Yu({},r,{dB:t.wN(n,s.fB.lB),vB:s})},t.DN=function(i,n){var r=t.UN(i,n),e=gm.lD(i);return Yu({},r,{_B:t.gB(e)})},t.TN=function(i){var n=t.MN(i,hm.mR),r=_m(gm.lD(i),hm.lR);return Yu({},n,{pB:t.mB(r)})},t.kN=function(i){var n=t.MN(i,hm.wR),r=_m(gm.lD(i),hm.fR);return Yu({},n,{wB:t.yB(r)})},t.SN=function(i){var n=i.Fy(),r=t.MN(i,hm.RR),e=_m(gm.lD(i),hm.QR),s=t.cB(e);return Yu({},r,{dB:t.mN(n,s.fB.lB),vB:s})},t.cB=function(i){var n=gm.lD(i),r=_m(n,hm.KR),e=t.bB(r),s=_m(n,hm.YR),u=t.AB(s);return{Km:hm.QR,fB:e,SB:u}},t.bB=function(t){var i=t.oD(4);return{Km:hm.KR,lB:i}},t.AB=function(i){var n=_m(gm.lD(i),hm.JR),r=t.TB(n);return{Km:hm.YR,kB:r}},t.TB=function(t){var i=pm(qh(t.lk,t.$R)),n=i.version,r=i.flags,e=t.ZR()>0,s=t.ZR(),u=t.rD(16);return{Km:hm.JR,ED:n,xD:r,EB:e,xB:s,PB:u}},t.$N=function(t){return gm.TD(t,hm.iR,!0)},t.sB=function(t){return gm.TD(t,hm.nR,!0)},t.gB=function(t){var i=mm(t,hm.uR);if(void 0!==i)return gm.TD(i,hm.uR,!0);var n=mm(t,hm.cR);if(void 0!==n)return gm.TD(n,hm.cR,!0);var r=mm(t,hm.dR);if(void 0!==r)return gm.TD(r,hm.dR,!0);throw y("Error parsing Dolby Vision configuration box.")},t.mB=function(t){return gm.TD(t,hm.lR,!0)},t.yB=function(t){return gm.TD(t,hm.fR,!0)},t.rB=function(t){return gm.TD(t,hm.hR,!0)},t.hB=function(t){return gm.TD(t,hm.aR,!0)},t.uB=function(t){var i=t.oD(4);switch(i){case"nclx":return{IB:am.ON_SCREEN_COLOURS,CB:t.tD(),RB:t.tD(),DB:t.tD(),NB:!!(128&t.ZR())};case"rICC":return{IB:am.RESTRICTED_ICC_PROFILE};case"prof":return{IB:am.UNRESTRICED_ICC_PROFILE};default:throw y("Could not parse ColourInformationBox: unknown type '"+i+"'.")}},t.iB=function(t){var i=t.eD(),n=t.eD();return{Km:hm.bR,BB:i,MB:n}},t.qD=function(i){var n=ym(gm.lD(i),hm.$C).map(t.LB);return{Km:hm.ZC,Z:n}},t.LB=function(t){var i=pm(t.eD()),n=i.version,r=i.flags,e=t.eD(),s=t.eD(),u=t.eD(),o=t.eD(),h=t.eD();return{Km:hm.$C,ED:n,xD:r,sN:e,OB:s,FB:u,UB:o,VB:h}},t.OD=function(i,n){var r=gm.lD(i),e=_m(r,hm.MR),s=ym(r,hm.LR),u=t.HB(e),o=s.map(t.WB);return{Km:hm.NR,qB:n,yD:u,Z:o}},t.HB=function(t){var i=pm(t.eD()),n=i.version,r=i.flags,e=t.eD();return{Km:hm.MR,ED:n,xD:r,zB:e}},t.WB=function(i){var n=gm.lD(i),r=_m(n,hm.OR),e=ym(n,hm.FR),s=mm(n,hm.UR),u=t.GB(r),o=e.map(function(i){return t.XB(i,u)}),h=s?t.jB(s):void 0;return{Km:hm.LR,yD:u,QB:o,KB:h}},t.GB=function(t){var i=pm(t.eD()),n=i.version,r=i.flags,e=t.eD(),s=r.Uy(cm.BASE_DATA_OFFSET_PRESENT)?t.nD():void 0,u=r.Uy(cm.SAMPLE_DESCRIPTION_INDEX_PRESENT)?t.eD():void 0,o=r.Uy(cm.DEFAULT_SAMPLE_DURATION_PRESENT)?t.eD():void 0,h=r.Uy(cm.DEFAULT_SAMPLE_SIZE_PRESENT)?t.eD():void 0,a=r.Uy(cm.DEFAULT_SAMPLE_FLAGS_PRESENT)?t.eD():void 0;return{Km:hm.OR,ED:n,xD:r,sN:e,YB:s,JB:u,FB:o,UB:h,VB:a}},t.XB=function(i,n){for(var r=pm(i.eD()),e=r.version,s=r.flags,u=i.eD(),o=s.Uy(fm.DATA_OFFSET_PRESENT)?i.sD():void 0,h=s.Uy(fm.FIRST_SAMPLE_FLAGS_PRESENT)?i.eD():void 0,a=[],c=0;c0)for(var c=qh(n,r),f=0;f>31&1,w=2147483647&d,g=qh(r,e),_=qh(r,e),m=_>>31&1,y=_>>28&7,p=268435455&_;f.push({fM:l,vM:w,ct:g,_M:m,gM:y,pM:p})}return{Km:hm.GR,ED:u,xD:o,mM:h,jD:a,wM:i,yM:n,bM:c,AM:f}},t.jB=function(t){var i,n=t.lk,r=t.$R,e=pm(qh(n,r)),s=e.version,u=e.flags;return i=0===s?ue.fromBits(qh(n,r),0,!0):jh(n,r),{Km:hm.UR,ED:s,xD:u,KB:i}},t}();function bm(t){return t&&"ix"in t?t.ix:t}U(),Et(),xt(),Pt(),U(),Et();var Am=function(t){function i(i,n,r,e,s,u,o,h){var a;return(a=t.call(this,i,n,r,e)||this).DU=void 0,a.BU=void 0,a.MU=void 0,a.OU=void 0,a.DU=s,a.BU=u,a.MU=o,a.OU=h||void 0,a}return Ct(i,t),i.prototype.KO=function(t){return!!Fw(this.RU,t.RU)&&(!!Fw(this.NU,t.NU)&&(!!Fw(this.xU,t.xU)&&(this.LU&&t.LU?!!this.LU.jE(t.LU)&&(this.U&&t.U?this.U.jE(t.U):this.U===t.U):this.LU===t.LU)))},Nt(i,[{key:"RU",get:function(){return this.DU}},{key:"NU",get:function(){return this.BU}},{key:"xU",get:function(){return this.MU}},{key:"LU",get:function(){return this.OU}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return Mw(Wg(t),{get extent(){return t.RU},get styles(){return t.NU},get regions(){return t.xU},get metadata(){return bm(t.LU)},get content(){return bm(t.U)}})}(this)),this.hu}}]),i}(Jg);U(),Et(),xt();var Tm=function(){function t(t,i,n){this.Lf=void 0,this.UU=void 0,this.VU=void 0,this.UU=t,this.VU=i,ow(n)?this.Lf=function(t,i,n){for(var r=0,e=["begin","end","dur"];r=t&&u<=i||s=i||st)&&r.push(n[e])}return r}(l[i],l[i+1],h);if(n.length<=0&&function(t){if(ow(t)){var i=t.WE.toUpperCase(),n=Boolean(t.ox("smpte:backgroundImage"));return"BR"===i||n}return t.VE===uw.LT}(t)){var r=t.QE(!1);a.push(new Tm(l[i],l[i+1],r))}else if(n.length>0){var e=t.QE(!1);n.forEach(function(t){return e.sx(t.FU)}),a.push(new Tm(l[i],l[i+1],e))}},u=i,o=n,h=[],a=[];if(ow(t)){var c,f;u=null!=(c=Um(t.ox("begin"),r))?c:u,e=Um(t.ox("dur"),0),o=null!=(f=Um(t.ox("end"),r))?f:void 0!==e?u+e:o;for(var v=t.KE,d=0;d1||(h=h.concat(Fm(v[d],u,o,r)))}for(var l=function(t,i,n){var r=[];r.push(t,i);for(var e,s=Lt(n);!(e=s()).done;){var u=e.value;r.push(u.CO,u.RO)}r.sort(Bn);for(var o=r.length,h=0;hn)break;i<=u.RO&&!jn(r,u)&&r.push(u)}}function ay(t,i){return xn(t.JI,i.JI)}function cy(t,i,n,r){var e=function(t){switch(t){case Ng.WEBVTT:return"WebVTT";case Ng.SRT:return"SRT";case Ng.TTML:return"TTML";default:return""}}(t);return new iy(vd.SUBTITLE_PARSE_ERROR,"Could not parse the "+(e?e+" ":"")+"subtitle file.",i,n,r)}function fy(t,i){for(var n,r=[],e=Lt(t.L.NI);!(n=e()).done;){var s=n.value;if(s.RO<=i)r.push(s);else if(s.CO>=i)break}for(var u,o=Lt(r);!(u=o()).done;){var h=u.value;t.XU(h)}}function vy(t,i){if(t.V>0)for(var n,r=t.Tn(0),e=b.max(0,r-10),s=Lt(i);!(n=s()).done;){n.value.jU(e)}}var dy=function(t){function i(i){var n;return(n=t.call(this)||this).iV=void 0,n.Z=new Km,n.QU=0,n.KU=function(t){var i=t.Ht;n.YU(i)},n.iV=i,n}Ct(i,t);var n=i.prototype;return n.tt=function(t){t.wn(Nw.pa,this.KU),t.EU=this.EU,this.Z.tt(t),this.YU(t)},n.it=function(t){t.mn(Nw.pa,this.KU),t.Qk=zm.Nh,this.Z.it(t)},n.JU=function(t){},n.ZU=function(t){},n.YU=function(t){t.Qk!==zm.Nh?this.JU(t):this.ZU(t)},n.$U=function(){for(var t,i=Lt(this.Z.NI);!(t=i()).done;){var n=t.value;n.mn(Nw.pa,this.KU),n.kn()}},n.jU=function(t){if(t>0)for(var i,n=Lt(this.Z.NI);!(i=n()).done;){fy(i.value,t)}},n.tV=function(t){var i=this.iV;if(t!==i){this.iV=t;for(var n,r=Lt(this.Z.NI.slice());!(n=r()).done;){var e=n.value,s=this.eV(e,i,t);e!==s&&(this.it(e),this.tt(s),e.kn())}}},n.hr=function(){return this.$U(),this.Z.hr(),ut.resolve()},n.kn=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),[4,this.hr()];case 1:return t.sent(),this.Z.kn(),[2]}})}).call(this)},Nt(i,[{key:"EU",get:function(){return this.QU},set:function(t){this.QU=t;for(var i,n=Lt(this.Z.NI);!(i=n()).done;){i.value.EU=t}}}]),i}(th);function ly(t,i,n){var r=n.sI(t.Lt,t.o,t.Th,t.bs,t.sV,t.Km,t.nC,t.ZI);r.rC=t.rC,r.AP=t.AP,r.eC=t.eC,r.EU=t.EU;for(var e,s=Lt(t.L.NI.slice());!(e=s()).done;){var u=e.value;t.XU(u),r.nV(u)}return r.Qk=t.Qk,i.rV(t),r}U(),Et(),xt(),Pt();var wy=function(t){function i(i){var n;return(n=t.call(this,qm.ma)||this).errorObject=void 0,n.errorObject=i,n}return Ct(i,t),i.prototype.xa=function(){return this},Nt(i,[{key:"error",get:function(){return this.errorObject.message}}]),i}(Aw),gy=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).aV=void 0,r.uV=new hr,r.aV=n,r}Ct(i,t);var n=i.prototype;return n.hV=function(t){if(t.src){var i=t.kind||Jm.HU,n=this.iV.sI(i,t.id,t.label,t.srclang,t.default);return n.rC=Rl(t.src),this.tt(n),n}},n.oV=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a,c,f,v;return zt(this,function(d){switch(d.label){case 0:t.AP=Dg.LOADING,n=new Al({Yu:t.rC,fk:Ud.LT,Hk:ml.GET,Yg:i}),d.label=1;case 1:return d.trys.push([1,4,,5]),[4,this.aV.vk(n)];case 2:return s=d.sent(),e=s.dk,[4,s.HT()];case 3:return r=d.sent(),[3,5];case 4:return lr(u=d.sent()),t.AP=Dg.ERROR,t.So(new wy(function(t,i){var n=i,r=0;if(Ql(t)&&t.name===Nl.rE)n=t.vk.Yu;else if(Yl(t)){var e=t.uE;if(n=e.wk,0===(r=e.dk))return new iy(vd.SUBTITLE_CORS_ERROR,"Could not load the subtitle file. Make sure the source is set correctly and that CORS support is enabled.",n,r,t)}return new iy(vd.SUBTITLE_LOAD_ERROR,"Could not load the subtitle file.",n,r,t)}(u,t.rC))),[2];case 5:try{for(o=function(t){return q_(t)?Ng.WEBVTT:Wm(t)?Ng.TTML:Ng.SRT}(r),t.Km=o,h=[],o===Ng.WEBVTT||o===Ng.SRT?(a=x_(r),h=a.L):o===Ng.TTML&&(h=Nm(r,t)),c=Lt(h);!(f=c()).done;)v=f.value,t.nV(v)}catch(i){return lr(i),t.AP=Dg.ERROR,t.So(new wy(cy(t.Km,t.rC,e,i))),[2]}return t.AP=Dg.LOADED,[2]}})}).call(this)},n.JU=function(t){jn(this.Z.NI,t)&&t.AP===Dg.NONE&&this.oV(t,this.uV.Yg).catch(wr)},n.Un=function(){},n.eV=function(t,i,n){return ly(t,i,n)},n.hr=function(){var i=this;return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:for(this.uV.Zg(),this.uV=new hr,n=Lt(this.Z.NI);!(r=n()).done;)e=r.value,this.iV.rV(e);return[4,t.prototype.hr.call(i)];case 1:return s.sent(),[2]}})}).call(this)},i}(dy);function _y(t){return"TXXX"===t.id||"TXX"===t.id}U(),Et(),Wt(),Pt(),Ft(),Qt(),U(),Et();var my=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).dV=void 0,r.pV=void 0,r.bV=void 0,r.lV=void 0,r.yV=void 0,r.fV=void 0,r.wV=void 0,r.dV=n,r.pV=Zu(),r.bV=function(t){t.mn(Nw.kI,r.lV),t.Km?t.Km===Ng.ID3&&(t.mn(Nw.uI,r.yV),0!==t.L.V?r._V(t):t.wn(Nw.uI,r.yV)):t.wn(Nw.kI,r.lV)},r.lV=function(t){r.bV(t.Ht)},r.yV=function(t){r.bV(t.PO.Ht)},r.fV=function(t){var i=t.Ht;if(i.Km===Ng.ID3&&r.pV.has(i.JI)){var n=r.pV.get(i.JI);r.it(n),r.iV.rV(n),i.mn(Nw.kI,r.lV),i.mn(Nw.uI,r.yV),i.mn(Nw.uI,r.wV)}},r.wV=function(t){yy(t.PO)&&r.mV(t.PO)},r.cV(),r}Ct(i,t);var n=i.prototype;return n.cV=function(){this.dV.wn(Iw.rI,this.lV),this.dV.wn(Iw.oI,this.fV)},n.vV=function(){this.dV.mn(Iw.rI,this.lV),this.dV.mn(Iw.oI,this.fV)},n._V=function(t){var i=t.L.NI[0];if(yy(i)){var n=function(t){var i=t.match(py);if(!i)return;return{Ht:i[1],bs:i[2]}}(i.U.description),r=n.Ht,e=n.bs;if(!this.gV(r,e)){var s=this.iV.sI(Jm.HU,t.o,r,e,!1,Ng.TTML);this.tt(s),this.pV.set(t.JI,s);for(var u,o=Lt(t.L.NI);!(u=o()).done;){var h=u.value;yy(h)&&this.mV(h)}t.wn(Nw.uI,this.wV)}}},n.gV=function(t,i){return this.Z.NI.some(function(n){return n.Th===t&&n.bs===i})},n.mV=function(t){if(t.Ht)for(var i,n=this.pV.get(t.Ht.JI),r=Lt(Nm(t.U.text,n,{TU:0,kU:1/0,EU:t.CO}));!(i=r()).done;){var e=i.value;n.nV(e)}},n.eV=function(t,i,n){var r=this,e=ly(t,i,n);return this.pV.forEach(function(i,n){i===t&&r.pV.set(n,e)}),e},n.hr=function(){var i=this;return Vt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:for(n=Lt(this.dV.NI);!(r=n()).done;)(e=r.value).mn(Nw.kI,this.lV),e.mn(Nw.uI,this.yV),e.mn(Nw.uI,this.wV);for(s=Lt(this.Z.NI);!(u=s()).done;)o=u.value,this.iV.rV(o);return this.pV.clear(),[4,t.prototype.hr.call(i)];case 1:return h.sent(),[2]}})}).call(this)},n.kn=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.vV(),[4,t.prototype.kn.call(i)];case 1:return n.sent(),[2]}})}).call(this)},i}(dy);function yy(t){return function(t){return _y(t)&&py.test(t.description)}(t.U)}var py=/^Track:(.+),Lang:(.+)$/;function ky(t,i){for(var n,r=Lt(t);!(n=r()).done;){var e=n.value;if(e.Lt===i&&e.sV)return e}}function by(t,i){Ay(ky(t.NI,i))}function Ay(t){void 0!==t&&(t.Qk=zm.Kn)}function Ty(t,i){var n=ky(t.NI,i)||function(t,i){for(var n,r=Lt(t);!(n=r()).done;){var e=n.value;if(e.Lt===i)return e}}(t.NI,i);Ay(n)}function Sy(t){for(var i,n=Lt(Zm);!(i=n()).done;){var r=i.value;r===Jm.Yn?Ty(t,r):by(t,r)}}U(),Et(),Ft(),U(),Et(),Pt();var Ey=function(t){function i(){return t.call(this,eh.Jw)||this}return Ct(i,t),i}(rh);U(),Et(),U(),Et();var Iy=function(t){return t[t.AV=0]="AV",t[t.SV=1]="SV",t}({});U(),Et();var Ry=function(t){return t.SM="canplay",t.TM="canplaythrough",t.kM="loadeddata",t.EM="loadedmetadata",t.AI="readystatechange",t.xM="waiting",t.PM="playing",t}({}),Cy=["canplay","canplaythrough","loadeddata","loadedmetadata","readystatechange","waiting","playing"];U(),Et(),xt(),Pt(),U(),Et(),Pt();var Py=function(t){function i(i,n){var r;return(r=t.call(this,Ry.AI)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Ct(i,t),i}(rh);U(),Et();var Dy=function(t){return t[t.zL=0]="zL",t[t.Qn=1]="Qn",t[t.GL=2]="GL",t[t.XL=3]="XL",t[t.jL=4]="jL",t}({});U(),Et(),Pt();var Ny=function(t){function i(i,n){var r;return void 0===n&&(n=Dy.Qn),(r=t.call(this,Ry.EM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Ct(i,t),i}(rh);U(),Et(),Pt();var xy=function(t){function i(i,n){var r;return void 0===n&&(n=Dy.GL),(r=t.call(this,Ry.kM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Ct(i,t),i}(rh);U(),Et(),Pt();var By=function(t){function i(i){var n;return(n=t.call(this,Ry.xM)||this).currentTime=void 0,n.currentTime=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var Oy=function(t){function i(i,n){var r;return void 0===n&&(n=Dy.XL),(r=t.call(this,Ry.SM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Ct(i,t),i}(rh);U(),Et(),Pt();var My=function(t){function i(i,n){var r;return void 0===n&&(n=Dy.jL),(r=t.call(this,Ry.TM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Ct(i,t),i}(rh);U(),Et(),Pt();var Ly=function(t){function i(i){var n;return(n=t.call(this,Ry.PM)||this).currentTime=void 0,n.currentTime=i,n}return Ct(i,t),i}(rh),Fy=[Ry.AI,Ry.PM,eh.uo,eh.jw],Uy=function(t){function i(i,n){var r;return void 0===n&&(n=!1),(r=t.call(this)||this).DV=void 0,r.CV=void 0,r.RV=void 0,r.FV=void 0,r.xV=void 0,r.kV=void 0,r.qV=void 0,r.HV=void 0,r.WV=void 0,r.VV=void 0,r.DV=i,r.CV=n,r.RV=Dy.zL,r.FV=!0,r.xV=!1,r.kV=!1,r.qV=function(t){var i=r.DV.zx,n=r.DV.AP;n!==r.RV&&r.So(new Py(i,n)),n===Dy.zL&&(r.xV=!1,r.kV=!1),r.TV(i,n),r.EV(i,n),r.LV(i,n),r.OV(i,n),r.PV(i,n),r.BV(i,n),r.RV=n},r.HV=function(){var t=r.DV.zx;r.BV(t,r.RV),r.PV(t,r.RV),r.FV=r.DV.lP},r.WV=function(){r.FV=r.DV.lP},r.VV=function(){r.So(new Ly(r.DV.zx))},r.DV.wn(Ry.AI,r.qV),r.DV.wn(eh.uo,r.HV),r.DV.wn(eh.jw,r.WV),r.CV&&r.DV.wn(Ry.PM,r.VV),r}Ct(i,t);var n=i.prototype;return n.TV=function(t,i){!this.kV&&i>=Dy.Qn&&(this.kV=!0,this.So(new Ny(t,i)))},n.EV=function(t,i){!this.xV&&i>=Dy.GL&&(this.xV=!0,this.So(new xy(t,i)))},n.PV=function(t,i){this.CV||(i>=Dy.XL&&this.RV=Dy.XL)&&this.So(new Ly(t))},n.BV=function(t,i){!this.MV(i)||this.DV.Qx||this.DV.lt||this.So(new By(t))},n.LV=function(t,i){this.RV<=Dy.GL&&i>=Dy.XL&&this.So(new Oy(t,i))},n.OV=function(t,i){i===Dy.jL&&this.So(new My(t,i))},n.MV=function(t){var i=!this.DV.lP&&t<=Dy.GL,n=!this.FV&&this.RV<=Dy.GL;return i&&!n},n.hr=function(){this.RV=Dy.zL,this.FV=!0,this.xV=!1,this.kV=!1},n.kn=function(){this.Vo(),this.CV&&this.DV.mn(Ry.PM,this.VV),this.DV.mn(eh.uo,this.HV),this.DV.mn(eh.jw,this.WV),this.DV.mn(Ry.AI,this.qV)},Nt(i,[{key:"NV",get:function(){return!this.DV.lP&&this.FV}}]),i}(th);U(),Et(),xt(),Pt();var Vy=function(t){function i(i,n){var r;return(r=t.call(this)||this).oa=void 0,r.PL=void 0,r.oa=i,r.PL=n,r.PL.wn(Fy,r.Rs),r}Ct(i,t);var n=i.prototype;return n.zg=function(){this.Vo(),this.PL.mn(Fy,this.Rs)},n.zV=function(){this.So(new Py(this.zx,this.AP))},Nt(i,[{key:"zx",get:function(){return this.oa.zx}},{key:"Qx",get:function(){return this.oa.Qx}},{key:"lt",get:function(){return this.PL.lt}},{key:"lP",get:function(){return this.PL.lP}},{key:"AP",get:function(){return this.oa.AP}}]),i}(th);U(),Et(),U(),Et();var Hy="titanium",Wy="conax",zy="ezdrm",Xy="irdeto",qy="vudrm",Gy="verimatrix",jy="keyos",Qy="drmtoday",Yy="expressplay",Ky="azure",Jy="xstream",Zy="vimond",$y="axinom",tp="uplynk",ip="comcast",np="custom";U(),Et(),Wt(),Pt(),Qt(),U(),Et(),Wt(),Pt(),Qt(),U(),Et(),Wt(),xt(),Qt();var rp=function(){function t(t,i,n,r,e){this.xS=void 0,this.lH=void 0,this.fH=void 0,this.YV=void 0,this.aV=void 0,this.XV=void 0,this.dH=void 0,this.xS=t,this.lH=i,this.fH=n,this.aV=r,this.dH=e,this.YV=this.vH(i)}var i=t.prototype;return i.GV=function(){return this.XV},i.jV=function(t){this.XV=t},i.JV=function(){return this.YV.licenseAcquisitionURL||this.GV()},i.$V=function(t){return ut.resolve()},i.tH=function(t,i){return ut.resolve(void 0)},i.iH=function(t,i,n,r){return Vt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:if(""===(e=this.eH(t,i,n,r)).Yu)throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");u.label=1;case 1:return u.trys.push([1,4,,6]),[4,this.Dx.vk(e)];case 2:return[4,u.sent().WT(i)];case 3:return[2,u.sent()];case 4:return lr(s=u.sent()),[4,this.sH(s,e.Yu,r)];case 5:return u.sent(),[2];case 6:return[2]}})}).call(this)},i.eH=function(t,i,n,r){var e=this.nH().OT(),s=this.Xk,u={Yu:this.rH(),fk:i,_k:e,XT:t,Xk:s,Hk:ml.POST,Wk:0,Yg:r,Km:yl.Tk,zk:n};return new Al(u)},i.hH=function(t,i){return ut.resolve(t)},i.oH=function(t,i,n,r){return ut.resolve(t)},i.nH=function(){return new Vd(this.YV.headers||{})},i.sH=function(t,i,n){return Vt(function(){return zt(this,function(i){throw new ug(vd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during license server request",t)})})()},i.rH=function(t,i){var n=i,r=this.YV.queryParameters;if(!n){var e=this.JV();if(!e)return"";n=e}if(r||t){var s=Ui.Dh(n);t&&Il(s,t),r&&Il(s,r),n=s.href}return n},i.aH=function(t,i){return ep(t)},i.uH=function(t){return new E(t)},i.cH=function(t,i,n){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return[4,this.aH(t,n)];case 1:return r=s.sent(),[4,this.iH(r,this.dH,i,n)];case 2:return e=s.sent(),[2,this.uH(e)]}})}).call(this)},i.kn=function(){},Nt(t,[{key:"Dx",get:function(){return this.aV}},{key:"QV",get:function(){return!1}},{key:"KV",get:function(){var t=this.YV.certificate;if(t)return Xi(t)?mh(t):pa(t)}},{key:"ZV",get:function(){return!1}},{key:"Xk",get:function(){return Boolean(this.YV.useCredentials)}}]),t}();function ep(t){return ut.resolve(ba(t).buffer)}var sp,up=function(t){function i(i,n,r,e){return t.call(this,Ro,i,n,r,e)||this}Ct(i,t);var n=i.prototype;return n.vH=function(t){return t.widevine||{}},n._H=function(t,i){return Vt(function(){return zt(this,function(n){return this.KV?[2,this.KV]:[2,this.gH(new E(t),i)]})}).call(this)},n.gH=function(i,n){return t.prototype.cH.call(this,i,pl.Ik,n)},i}(rp);function op(t,i){if(null==t)return{};var n,r,e={},s=k.keys(t);for(r=0;r=0||(e[n]=t[n]);return e}function hp(t){return Li(t.token&&t.deviceId)}function ap(t){var i,n=null==(i=t.fairplay)?void 0:i.headers;return void 0!==n&&Li(n.PreAuthorization)}function cp(t){var i=t;return hp(i)&&""!==i.token&&""!==i.deviceId&&!ap(i)}U(),Et(),U(),Et(),Wt(),U(),Et(),Ft(),Qt(),U(),Et(),U(),Et(),Ft(),U(),Et(),function(t){t.AC=!1,t.SC=!1,t.TC=!1,t.kC=!1,t.LOG_ADS_DETAILS=!1,t.LOG_CHROMECAST_DETAILS=!1,t.LOG_CUSTOM_DRM=!1,t.LOG_BUFFERING_VIDEO_MAIN=!1,t.LOG_BUFFERING_VIDEO_SELECTION=!1,t.LOG_BUFFERING_AUDIO_MAIN=!1,t.LOG_BUFFERING_AUDIO_SELECTION=!1,t.EC=!1,t.xC=!1,t.LOG_LCEVC_DETAILS=!1}(sp||(sp={})),U(),Et(),xt();var fp=function(){function t(t,i,n){this.RC=void 0,this.yS=void 0,this.NC=void 0,this.RC=t,this.yS=i,this.NC=n}return t.prototype.DC=function(t){return function(t){var i=t.onCertificateRequest;if(void 0!==i&&"function"!=typeof i)throw new p("ContentProtectionIntegration.onCertificateRequest is not a function.");var n=t.onCertificateResponse;if(void 0!==n&&"function"!=typeof n)throw new p("ContentProtectionIntegration.onCertificateResponse is not a function.");var r=t.onLicenseRequest;if(void 0!==r&&"function"!=typeof r)throw new p("ContentProtectionIntegration.onLicenseRequest is not a function.");var e=t.onLicenseResponse;if(void 0!==e&&"function"!=typeof e)throw new p("ContentProtectionIntegration.onLicenseResponse is not a function.");var s=t.extractFairplayContentId;if(void 0!==s&&"function"!=typeof s)throw new p("ContentProtectionIntegration.extractFairplayContentId is not a function.");return t}(this.NC.build(t))},Nt(t,[{key:"IC",get:function(){return this.RC}},{key:"xS",get:function(){return this.yS}}]),t}();U(),Et();var vp=function(t){return t.FAILED="FAILED",t.OVERRIDDEN="OVERRIDDEN",t.SUCCEEDED="SUCCEEDED",t}({}),dp=function(){function t(){this.MC=[]}var i=t.prototype;return i.registerContentProtectionIntegration=function(t,i,n){switch(this.BC(t,i,n)){case vp.FAILED:throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The keySystem should be 'widevine', 'playready' or 'fairplay', but was "+i+".");case vp.OVERRIDDEN:var r=Pp(i);Ui.um("Warning: Overwriting an earlier registered integration for "+t+" and "+r+".");break;case vp.SUCCEEDED:Pp(i);0}},i.BC=function(t,i,n){var r=Pp(i);if(!r)return vp.FAILED;for(var e,s=vp.SUCCEEDED,u=Lt(this.MC.slice());!(e=u()).done;){var o=e.value;o.IC===t&&o.xS===r&&(s=vp.OVERRIDDEN,Xn(this.MC,o))}return this.MC.push(new fp(t,r,n)),s},i.LC=function(t,i){return void 0!==this.OC(t,i)},i.FC=function(t,i,n){var r=this.OC(t,i);if(!r)throw y("No ContentProtectionIntegrationInit was found for integration id "+t+" and key system "+i);return r.DC(n)},i.OC=function(t,i){for(var n,r=Lt(this.MC);!(n=r()).done;){var e=n.value;if(e.IC===t&&(!i||e.xS===i))return e}},t}();dp.VC=new dp;var lp={playready:"https://pr-keyos.licensekeyserver.com/core/rightsmanager.asmx",widevine:"https://wv-keyos.licensekeyserver.com/",fairplay:"https://fp-keyos.licensekeyserver.com/getkey"};function wp(t){if(!t)return!0;var i=t.licenseAcquisitionURL,n=t.certificateURL,r=t.keys,e=t.headers,s=t.useCredentials,u=t.queryParameters;return!(i||n||r||e||s||u)}function gp(t){return t&&void 0!==t.licenseAcquisitionURL}var _p=gp,mp=gp;function yp(t){if(!t)return!0;if(Ap(t))return!1;var i=t.fairplay,n=t.playready,r=t.widevine,e=t.clearkey,s=t.aes128;return wp(i)&&wp(n)&&wp(r)&&void 0===e&&wp(s)}function pp(t){var i=cp(t),n=function(t){var i,n=t;return ap(n)&&""!==(null==(i=n.fairplay)?void 0:i.headers.PreAuthorization)&&!hp(n)}(t);return(!i||!n)&&(i||n)}function kp(t){return t.integration===Xy}function bp(t){var i=t;if(!i)return!1;if(yp(i))return!1;var n=i.fairplay,r=i.playready,e=i.widevine,s=i.clearkey;if(Ap(t))return!0;if(n&&!function(t){var i=t;return i&&(void 0!==i.certificateURL||void 0!==i.certificate)}(n))return!1;if(r&&!_p(r))return!1;if(e&&!mp(e))return!1;if(s&&!function(t){return void 0!==t}(s))return!1;if(i.integration){if(dp.VC.LC(i.integration))return!0;switch(i.integration){case Hy:if(!function(t){var i=t,n=i.integration===Hy;return n&&(Tp(t)||Sp(t))}(t))return!1;break;case qy:if(!Ep(t))return!1;break;case Gy:if(!function(t){var i=t;return i.integration===Gy}(t))return!1;break;case Xy:if(!kp(t))return!1;break;case Wy:if(!pp(t))return!1;break;case zy:if(!function(t){var i=t;return i.integration===zy}(t))return!1;break;case jy:if(!Ap(t))return!1;break;case Qy:if(!function(t){var i=t;return i.integration===Qy&&(void 0!==i.token||function(t){return void 0!==t.merchant&&void 0!==t.sessionId&&void 0!==t.userId}(i))}(t))return!1;break;case Yy:if(!function(t){var i=t;return i.integration===Yy}(t))return!1;break;case Jy:if(!Ip(t))return!1;break;case Zy:if(!function(t){return t.integration===Zy}(t))return!1;break;case $y:if(!Rp(t))return!1;break;case Ky:if(!function(t){var i=t;return i.integration===Ky&&void 0!==i.token}(t))return!1;break;case tp:if(!function(t){var i=t;return i.integration===tp}(t))return!1;break;case ip:if(!function(t){var i=t;return i&&Li(i.releasePid)&&Li(i.accountId)&&Li(i.token)}(t))return!1;break;case np:return!0;default:return!1}}return!0}function Ap(t){return t.integration===jy}function Tp(t){return void 0!==t.authToken}function Sp(t){var i=t;return void 0!==i.accountName&&void 0!==i.customerName&&void 0!==i.portalId}function Ep(t){var i=t;return i.integration===qy&&void 0!==i.token}function Ip(t){var i=t;return i&&i.integration===Jy&&Xi(i.ticketAcquisitionURL)&&Xi(i.streamId)}function Rp(t){var i=t;return i.integration===$y&&void 0!==i.token}function Cp(t,i){var n,r,e,s=i[t],u=null!=(n=null==s?void 0:s.licenseAcquisitionURL)?n:lp[t],o=null!=(r=null==s?void 0:s.customdata)?r:i.customdata,h=o?{customData:o}:{},a=Yu({},null!=(e=null==s?void 0:s.headers)?e:{},h),c=null!=s?s:{};c.customdata;return Yu({},op(c,["customdata"]),{licenseAcquisitionURL:u,headers:a})}function Pp(t){switch(t.toLowerCase()){case"widevine":case wo:return wo;case"playready":case fo:return fo;case"fairplay":case Ao:return Ao}}function Dp(t,i){switch(t){case uo:return function(t){for(var i,n={},r=Lt(km.ND(new DataView(t)));!(i=r()).done;){var e=i.value;n[e.uM]=e.lM}return n}(i);case oo:case ho:return function(t){var i;return i={},i[bo]=t,i}(i);case ao:return function(t){var i;return i={},i[po]=t,i}(i);default:throw new ld(vd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Unsupported initDataType "+t)}}function Np(t,i){return void 0===i&&(i=!1),Vt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return(n=t.widevine)?[4,Ui.Am()]:[3,2];case 1:n=u.sent(),u.label=2;case 2:return n?[2,!0]:(r=t.playready)?[4,Ui.ym()]:[3,4];case 3:r=u.sent(),u.label=4;case 4:return r?[2,!0]:(e=t.clearkey)?[4,Ui.pm()]:[3,6];case 5:e=u.sent(),u.label=6;case 6:return e?[2,!0]:(s=!i&&t.fairplay)?[4,Ui.wm()]:[3,8];case 7:s=u.sent(),u.label=8;case 8:return s?[2,!0]:[2,!1]}})})()}var xp=function(t){return t.zm="Widevine",t.pH="PlayreadyV2",t.mH="PlayreadyV3",t.qm="PlayreadyV2",t.jm="Fairplay",t}({}),Bp={Widevine:{DRMProvider:"Google",DRMVersion:"1.4.8.86",DRMType:"Widevine"},PlayreadyV2:{DRMProvider:"Microsoft",DRMVersion:"2.9",DRMType:"Playready"},PlayreadyV3:{DRMProvider:"Microsoft",DRMVersion:"3",DRMType:"Playready"},Fairplay:{DRMProvider:"Apple",DRMType:"FairPlay",DRMVersion:"1.0"}};function Op(t,i){var n,r,e,s,u=Bp[i],o=t.accountName;return{CustomerName:t.customerName,AccountName:o,PortalId:t.portalId,FriendlyName:t.friendlyName,DeviceInfo:{FormatVersion:"1",DeviceType:"PC",OSType:null==(n=Ui.Em)?void 0:n.Zs,OSVersion:null==(r=Ui.Em)?void 0:r.Lm,DRMProvider:u.DRMProvider,DRMVersion:u.DRMVersion,DRMType:u.DRMType,DeviceVendor:null==(e=Ui.Em)?void 0:e.Om,DeviceModel:null==(s=Ui.Em)?void 0:s.Fm}}}function Mp(t,i){if(!t.accountName)throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, accountName is not set.");if(!t.customerName)throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, customerName is not set.");if(!t.portalId)throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, portalId is not set.");throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration.")}function Lp(t,i,n){var r;if(Tp(t))r={AuthToken:t.authToken,Payload:i};else{if(!Sp(t))throw Mp(t,n);r={LatensRegistration:Op(t,n),Payload:i}}return La(JSON.stringify(r))}function Fp(t,i,n){return Vt(function(){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(!(r=t.uE))throw new ug(vd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium server request",t,i);e=r,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,e.VT(n)];case 2:return s=o.sent(),u=function(t){if(t){if(t.WvProxyErr)return t.WvProxyErr.desc;if(t.DrmErr)return t.DrmErr.desc}return}(s),[3,4];case 3:return o.sent(),u="",[3,4];case 4:throw new ug(vd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium server request",t,e.vk.Yu,e.dk,e.gk,u)}})})()}U(),Et(),Wt(),Qt();var Up=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,Ud.BT)||this).yH=void 0,e}Ct(i,t);var n=i.prototype;return n.sH=function(t,i,n){return Fp(t,i,n)},n.$V=function(t){return this.yH?gr(this.yH.Yy,t):(this.yH=new Va,ut.resolve())},n.aH=function(t,i){return Vt(function(){var i,n;return zt(this,function(r){if(!(i=this.lH))throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium Widevine DRM configuration.");return n=kh(t),[2,Lp(i,n,xp.zm)]})}).call(this)},n.uH=function(t){if(!t.license)throw new ug(vd.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Titanium Widevine license server");return mh(t.license)},n.bH=function(t){return ut.resolve(new E(t))},n._H=function(t,i){return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return this.AH(),[4,this.aH(t,i)];case 1:return n=e.sent(),[4,this.iH(n,Ud.NT,pl.Ck,i)];case 2:return r=e.sent(),[4,this.bH(r)];case 3:return[2,e.sent()]}})}).call(this)},n.gH=function(i,n){var r=this;return Vt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,t.prototype.gH.call(r,i,n)];case 1:return e=s.sent(),this.AH(),[2,e]}})}).call(this)},n.AH=function(){this.yH||(this.yH=new Va),this.yH.Qy()},n.kn=function(){this.yH&&this.yH.Zg(),t.prototype.kn.call(this)},i.wH=function(){return Ui.Zs.yp?"required":"optional"},i}(up);U(),Et(),Wt(),xt(),Pt(),Qt();var Vp=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,Ud.NT)||this).jV("https://widevine-proxy.drm.technology/proxy"),e}return Ct(i,t),i.prototype.aH=function(t,i){return Vt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return[4,ep(t)];case 1:if(i=s.sent(),n=this.fH,r=Aa(new E(i)),void 0===(e=this.SH))throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The Widevine vuDRM token has not been correctly configured.");return[2,JSON.stringify({token:e,drm_info:r,kid:n})]}})}).call(this)},Nt(i,[{key:"SH",get:function(){if(Ep(this.lH))return this.lH.token}}]),i}(up);function Hp(t,i){var n=i||{};return t.ticket&&t.sessionId&&(n=Yu({},n,{SessionId:t.sessionId,Ticket:t.ticket})),Yu({},n,{CrmId:t.crmId,AccountId:t.accountId,ContentId:t.contentId})}U(),Et(),Pt(),U(),Et();var Wp=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,Ud.NT)||this).jV("https://emeademo.dev.ott.irdeto.com/Widevine/getlicense"),e}return Ct(i,t),i.prototype.rH=function(i,n){var r=i;return kp(this.lH)&&(r=Hp(this.lH,r)),t.prototype.rH.call(this,r,n)},i}(up);U(),Et(),Pt(),U(),Et();var zp="Conax-Custom-Data";function Xp(t,i,n){var r=t&&pp(t)&&t;if(r&&!n.has(zp)){var e=cp(r)?r.token:void 0,s=cp(r)?r.deviceId:void 0,u=JSON.stringify({Version:"1.0.0",CxAuthenticationDataToken:e,CxClientInfo:{DeviceType:"Browser",DrmClientType:i+"-HTML5",DrmClientVersion:"1.0.0",CxDeviceId:s}});n.set(zp,u)}return n}var qp=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,Ud.NT)||this).jV("https://connect.conax.com:8094/license"),e}return Ct(i,t),i.prototype.nH=function(){var i=t.prototype.nH.call(this);return Xp(this.lH,"Widevine",i)},i}(up);function Gp(t){var i=ua(new E(t));return mh(JSON.parse(i).license)}function jp(t){return"string"==typeof t.token?t.token:La(JSON.stringify({userId:t.userId,sessionId:t.sessionId,merchant:t.merchant}))}function Qp(t,i,n){var r;return r=n.token?"x-dt-auth-token":"dt-custom-data",t.set(r,i),t}U(),Et(),xt(),Pt(),U(),Et();var Yp=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,Ud.NT)||this).jV("https://lic.drmtoday.com/license-proxy-widevine/cenc/"),e}Ct(i,t);var n=i.prototype;return n.uH=function(t){return Gp(t)},n.nH=function(){return Qp(t.prototype.nH.call(this),this.SH,this.lH)},Nt(i,[{key:"SH",get:function(){return jp(this.lH)}}]),i}(up);U(),Et(),Pt();var Kp=function(t){function i(i,n,r){return t.call(this,i,n,r,Ud.NT)||this}return Ct(i,t),i.prototype.nH=function(){var i=t.prototype.nH.call(this),n=this.lH.token;return i.set("Authorization","Bearer "+n),i},i}(up);function Jp(t,i,n,r){return Vt(function(){var e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:if(!Ip(t))throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Xstream DRM Configuration");return(e=new Vd).append("Cache-Control","no-cache"),e.append("Content-Type","application/json"),(s=t.sessionId)&&e.append("XSSESSION",s),u=t.streamId,o=t.fairplay?"persistent"===t.fairplay.licenseType?"persistent":"non-persistent":t.widevine&&"persistent"===t.widevine.licenseType?"persistent":"non-persistent",h={drmType:i,licenseType:o,streamId:u},a={Yu:t.ticketAcquisitionURL,fk:Ud.BT,_k:e,Hk:ml.POST,XT:JSON.stringify(h),Yg:r},[4,n.vk(a)];case 1:return[4,c.sent().VT()];case 2:return[2,c.sent()]}})})()}U(),Et(),Wt(),Pt(),Qt(),U(),Et(),Wt(),Qt();var Zp=function(t){function i(i,n,r){return t.call(this,i,n,r,Ud.BT)||this}Ct(i,t);var n=i.prototype;return n.nH=function(){var i=t.prototype.nH.call(this);return i.set("Content-Type","application/json"),i},n.aH=function(i,n){var r=this;return Vt(function(){var e,s,u;return zt(this,function(o){switch(o.label){case 0:return e=Ma(i.buffer),[4,Jp(this.lH,"widevine_modular",this.Dx,n)];case 1:return s=o.sent(),this.jV(s.licenseServerUrl),u=oa(JSON.stringify({payload:e,ticket:s.ticket})),[2,t.prototype.aH.call(r,u,n)]}})}).call(this)},n.uH=function(t){return mh(t.license)},i}(up);U(),Et(),Pt();var $p=function(t){function i(i,n,r){return t.call(this,i,n,r,Ud.NT)||this}return Ct(i,t),i.prototype.nH=function(){if(!Rp(this.lH))throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");var i=t.prototype.nH.call(this);return i.set("X-AxDRM-Message",this.lH.token),i},i}(up);function tk(t){for(var i=new E(2*t.length),n=0;n=1&&t[0].KE.length>0},n.tH=function(i){var n=this.lH.playready.customData;if(n){var r=tk(n),e=tk(''+kh(r)+"");return ut.resolve({playready:{GS:e}})}return t.prototype.tH.call(this,i)},n.aH=function(t,i){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,ep(t)];case 1:return i=n.sent(),[2,this.EH(i)]}})}).call(this)},n.EH=function(t){return Vt(function(){var i,n,r,e,s,u,o,h,a,c,f,v,d,l,w,g,_;return zt(this,function(m){r=null,e=new DataView(t),s=ra(e,new Ta,!0);try{u=Ui.HE(s)}catch(t){return[2,r]}for(o=null==(i=u.ZE("PlayReadyKeyMessage")[0])?void 0:i.ZE("LicenseAcquisition")[0],a=null!=(h=null==o?void 0:o.ZE("Challenge"))?h:[],this.kH(a)&&(r=Oa(a[0].hx)),c=new Vd,v=null!=(f=null==o||null==(n=o.ZE("HttpHeaders")[0])?void 0:n.ZE("HttpHeader"))?f:[],d=Lt(v);!(l=d()).done;)w=l.value,g=w.ZE("name")[0].hx,_=w.ZE("value")[0].hx,c.append(g,_);return this.TH=c,[2,r]})}).call(this)},n._H=function(t,i){return ut.resolve(t)},n.gH=function(i,n){return t.prototype.cH.call(this,i,pl.Rk,n)},i}(rp);U(),Et(),Wt(),Pt(),Qt(),U(),Et(),xt();var nk=function(){function t(i){this.IH=void 0,this.XA=void 0,this.IH=i,this.XA=t.xH(i)}return t.prototype.PH=function(){var t={};if(this.XA===xp.mH){var i={LatensRegistration:Op(this.IH,xp.mH)};t["X-TITANIUM-DRM-CDATA"]=La(JSON.stringify(i))}return t},t.xH=function(t){return"3"===t.version?xp.mH:xp.pH},Nt(t,[{key:"CH",get:function(){return this.XA}},{key:"FS",get:function(){return this.XA===xp.pH}}]),t}();var rk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).RH=void 0,e.RH=new nk(e.lH),e}Ct(i,t);var n=i.prototype;return n.tH=function(t){var i=this.lH;if(!this.lH)throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium PlayReady DRM configuration.");if(Sp(i)){var n={};return n.playready={GS:ek(i,this.RH.CH)},ut.resolve(n)}return ut.reject(Mp(i,xp.qm))},n.nH=function(){var i=new Vd(this.RH.PH());return i.UT(t.prototype.nH.call(this)),i},n.sH=function(t,i,n){return Vt(function(){var r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:if(!(r=t.uE))throw new ug(vd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium PlayReady license request",t,i);f.label=1;case 1:return f.trys.push([1,3,,4]),[4,r.qT(n)];case 2:return u=f.sent(),o=ua(new E(u)),(h=Ui.HE(o))&&(a=function(t,i){return function(t,i){for(var n=t.m.slice(),r=[];n.length>0;){var e,s=n.shift();i(s)?r.push(s):(e=n).push.apply(e,[].concat(s.m))}return r}(t,function(t){return t.$E===i})}(h,"CustomData"),a.length>0&&(e=JSON.parse(a[0].hx),s=null==(c=e.DrmErr)?void 0:c.desc)),[3,4];case 3:return f.sent(),[3,4];case 4:throw new ug(vd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium PlayReady license request",t,i,r.dk,r.gk,s)}})})()},n.kH=function(t){if(1!==t.length)throw new ug(vd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"PlayReady license message incorrectly formatted, Challenge not found.");return!0},i}(ik);function ek(t,i){var n=Op(t,i),r=n.DeviceInfo.FormatVersion,e=function(t){return t.replace(/</g,"<").replace(/>/g,">")}(function(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}(""+La(''+n.AccountName+""+n.CustomerName+""+n.PortalId+''+n.DeviceInfo.DeviceType+""+n.DeviceInfo.OSType+""+n.DeviceInfo.OSVersion+""+n.DeviceInfo.DRMProvider+""+n.DeviceInfo.DRMVersion+""+n.DeviceInfo.DRMType+""+n.DeviceInfo.DeviceVendor+""+n.DeviceInfo.DeviceModel+"")+"")),s=aa(e,!0);return aa(''+kh(s)+"",!0)}U(),Et(),xt(),Pt();var sk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).jV("https://playready-license.drm.technology/rightsmanager.asmx"),e}Ct(i,t);var n=i.prototype;return n.kH=function(t){if(1!==t.length)throw new ug(vd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Vudrm PlayReady license message incorrectly formatted, Challenge not found.");return!0},n.rH=function(i,n){var r=Yu({},i||{},{token:this.SH});return t.prototype.rH.call(this,r,n)},Nt(i,[{key:"SH",get:function(){if(Ep(this.lH))return this.lH.token}}]),i}(ik);U(),Et(),Pt();var uk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).jV("https://emeademo.dev.ott.irdeto.com/playready/rightsmanager.asmx"),e}return Ct(i,t),i.prototype.rH=function(i,n){var r=i;return kp(this.lH)&&(r=Hp(this.lH,r)),t.prototype.rH.call(this,r,n)},i}(ik);U(),Et(),Pt();var ok=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).jV("https://connect.conax.com:8010/cxplayready/rightsmanager.asmx"),e}return Ct(i,t),i.prototype.nH=function(){var i=t.prototype.nH.call(this);return Xp(this.lH,"PlayReady",i)},i}(ik);U(),Et(),xt(),Pt();var hk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).jV("https://lic.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx"),e}Ct(i,t);var n=i.prototype;return n.uH=function(i){var n=function(t){var i=ua(new E(t));return Fo(i,"=0)return ut.resolve(t.substr(i+1));var n=t.split("skd://").pop();if(n){if(/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/.test(n))return ut.resolve(n)}var r=t.split("/");return ut.resolve(r[r.length-1])},n.tH=function(t){return Vt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return n=null!=(i=this.WH)?i:va(new E(t)),[4,this.HH(n)];case 1:return r=s.sent(),this.UH=r,(e={}).fairplay={tT:r},[2,e]}})}).call(this)},n.nH=function(){var i=t.prototype.nH.call(this);return i.set("Content-Type",this.VH),i},n._H=function(t,i){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.KV?[2,this.KV]:[4,this.qH(i)];case 1:return[2,t.sent()]}})}).call(this)},n.gH=function(i,n){return t.prototype.cH.call(this,i,pl.xk,n)},n.zH=function(t){var i=this.MH(),n=this.nH(),r={Yu:i,fk:Ud.NT,_k:n,Hk:ml.GET,Xk:!1,XT:null,Wk:0,Yg:t,Km:yl.Tk,zk:pl.Pk};return new Al(r)},n.qH=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=this.zH(t),[4,this.Dx.vk(i)];case 1:return[4,r.sent().qT()];case 2:return n=r.sent(),[2,new E(n)]}})}).call(this)},n.uH=function(t){var i;if("string"==typeof t){var n=t.trim();""===n.substr(0,5)&&""===n.substr(-6)&&(n=n.slice(5,-6)),i=mh(n)}else i=new E(t);return i},n.rH=function(i,n){var r=t.prototype.rH.call(this,i,n);return Fo(r,"skd:")&&(r=r.substr(4)),r},Nt(i,[{key:"ZV",get:function(){return!0}},{key:"VH",get:function(){return fk.NH}}]),i}(rp);U(),Et(),Wt(),xt(),Pt(),Qt();var dk=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,Ud.NT)||this}Ct(i,t);var n=i.prototype;return n.HH=function(i){var n=i.split("://",1);return"skd"!==n[0].slice(-3).toLowerCase()?ut.resolve(""):(n=i.split(";",2)).length>1?ut.resolve(n[1]):ut.resolve(t.prototype.HH.call(this,i))},n.aH=function(t){return Vt(function(){return zt(this,function(i){return[2,t]})})()},n.uH=function(t){return new E(t)},n.rH=function(i,n){var r=i||{};return r.p1=ae(),t.prototype.rH.call(this,r,n)},Nt(i,[{key:"VH",get:function(){return fk.BH}}]),i}(vk);U(),Et(),xt(),Pt();var lk=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,Ud.NT)||this).jV("https://fairplay-license.drm.technology/license"),s.OH("https://fairplay-license.drm.technology/certificate"),s}Ct(i,t);var n=i.prototype;return n.FH=function(t,i){var n={token:this.SH,contentId:i,payload:kh(t)};return JSON.stringify(n)},n.uH=function(t){return new E(t)},n.nH=function(){var i=t.prototype.nH.call(this);return i.set("x-vudrm-token",this.SH),i},Nt(i,[{key:"VH",get:function(){return fk.BT}},{key:"SH",get:function(){if(!Ep(this.lH))throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Token is required for FairPlay VuDrm.");return this.lH.token}}]),i}(vk);U(),Et(),Pt();var wk="Verimatrix Fairplay license response incorrectly formatted. Invalid json.",gk="Verimatrix Fairplay license response incorrectly formatted. Ckc not found.",_k=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,Ud.NT)||this}return Ct(i,t),i.prototype.uH=function(i){var n=function(t){var i;try{i=JSON.parse(t).ckc}catch(t){throw new ug(vd.CONTENT_PROTECTION_LICENSE_INVALID,wk)}if(!i)throw new ug(vd.CONTENT_PROTECTION_LICENSE_ERROR,gk);return i}(ua(new DataView(i)));return t.prototype.uH.call(this,n)},i}(vk);U(),Et(),Wt(),xt(),Pt(),Qt();var mk=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,Ud.BT)||this}Ct(i,t);var n=i.prototype;return n.aH=function(t){return Vt(function(){var i,n;return zt(this,function(r){if(!(i=this.lH))throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium Fairplay DRM configuration.");return n=kh(t),[2,Lp(i,n,xp.jm)]})}).call(this)},n.uH=function(t){try{var i;if(Xi(t)){var n=t.trim();i=JSON.parse(n)}else i=t;if(i.license){var r=Oa(i.license);return new E(r)}throw new ug(vd.CONTENT_PROTECTION_LICENSE_ERROR,"No license received from the Titanium Fairplay license server")}catch(t){throw new ug(vd.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Titanium Fairplay license server")}},n.sH=function(t,i,n){return Fp(t,i,n)},Nt(i,[{key:"VH",get:function(){return fk.BT}}]),i}(vk);U(),Et(),Wt(),xt(),Pt(),Qt();var yk=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,Ud.NT)||this).jV("https://emeademo.dev.ott.irdeto.com/streaming/getckc"),s.OH("https://emeademo.dev.ott.irdeto.com/streaming/getcertificate"),s}Ct(i,t);var n=i.prototype;return n.MH=function(){var i=t.prototype.MH.call(this);if(!i)return i;var n=Ui.Dh(i),r=this.lH;return kp(r)&&Il(n,{accountId:r.accountId,applicationId:r.applicationId||""}),n.href},n.HH=function(i){return kp(this.lH)?ut.resolve(this.lH.contentId):t.prototype.HH.call(this,i)},n.aH=function(t){return Vt(function(){return zt(this,function(i){return[2,t]})})()},n.uH=function(t){return new E(t)},n.rH=function(i,n){var r=i;return kp(this.lH)&&(r=function(t,i){return Yu({},Hp(t,i),{KeyId:t.keyId})}(this.lH,r)),t.prototype.rH.call(this,r,n)},Nt(i,[{key:"VH",get:function(){return fk.BH}}]),i}(vk);U(),Et(),Wt(),Pt(),Qt();var pk=function(t){function i(i,n,r,e){var s;if(s=t.call(this,i,n,r,e,Ud.LT)||this,!pp(n))throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Conax configuration");return s.jV("https://connect.conax.com:8097/license"),s}Ct(i,t);var n=i.prototype;return n.nH=function(){var i=t.prototype.nH.call(this);return Xp(this.lH,"FairPlay",i)},n.qH=function(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return i=this.MH(),n={Yu:i,fk:Ud.NT,_k:{},Hk:ml.GET,Xk:!1,XT:null,Wk:0,Yg:t,Km:yl.Tk,zk:pl.Pk},[4,this.Dx.vk(n)];case 1:return[4,e.sent().qT()];case 2:return r=e.sent(),[2,new E(r)]}})}).call(this)},n.aH=function(t){return Vt(function(){return zt(this,function(i){return[2,t]})})()},n.HH=function(t){var i,n=t.indexOf("?");return 0===t.indexOf("skd://")?(i=n>=0?t.substring(6,n):t.substring(6),ut.resolve(function(t){return ua(mh(t))}(i))):ut.resolve("unknown")},n.uH=function(t){try{var i=JSON.parse(t);return new E(Oa(i.CkcMessage))}catch(t){throw new y("CFLRW-66")}},i}(vk);U(),Et(),Pt();var kk=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,Ud.LT)||this).jV(lp[Eo.jm]),s}Ct(i,t);var n=i.prototype;return n.HH=function(t){return Fo(t,"skd://")?ut.resolve(t.substring(6,40)):ut.reject(new ug(vd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Error while determining the KeyOS Content ID."))},n.FH=function(t,i){return"spc="+kh(t)+"&assetId="+i},i}(vk);U(),Et(),xt(),Pt();var bk=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,Ud.LT)||this).jV("https://lic.drmtoday.com/license-server-fairplay/"),s}Ct(i,t);var n=i.prototype;return n.FH=function(t,i){var n="spc="+encodeURIComponent(kh(t))+"&"+encodeURI(i);return"persistent"===this.YV.licenseType?n+"&offline=true":n},n.nH=function(){return Qp(t.prototype.nH.call(this),this.SH,this.lH)},Nt(i,[{key:"SH",get:function(){return jp(this.lH)}}]),i}(vk);U(),Et(),Wt(),xt(),Pt(),Qt();var Ak=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,Ud.NT)||this}Ct(i,t);var n=i.prototype;return n.HH=function(t){var i=t;return Fo(i,"skd:")&&(i="http:"+i.substring(4)),Fo(i,"http:")||Fo(i,"https:")?ut.resolve(Ui.Dh(i).hostname):ut.reject(new y("Could not parse ExpressPlay FairPlay content ID."))},n.aH=function(t){return Vt(function(){return zt(this,function(i){return[2,t]})})()},n.uH=function(t){return new E(t)},Nt(i,[{key:"VH",get:function(){return fk.BH}}]),i}(vk);U(),Et(),Pt();var Tk=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,Ud.LT)||this}return Ct(i,t),i.prototype.nH=function(){var i=t.prototype.nH.call(this),n=this.lH.token;return i.set("Authorization","Bearer "+n),i},i}(vk);U(),Et(),Wt(),xt(),Pt(),Qt();var Sk=function(t){function i(i,n,r,e){var s;if(s=t.call(this,i,n,r,e,Ud.BT)||this,!Ip(n))throw new y("Invalid Xstream DRM configuration");return s}Ct(i,t);var n=i.prototype;return n.qH=function(t){return Vt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return i=this.MH(),n=this.nH(),r={Yu:i,fk:Ud.BT,_k:n,Hk:ml.POST,Yg:t,Km:yl.Tk,zk:pl.Pk},[4,this.Dx.vk(r)];case 1:return[4,s.sent().VT()];case 2:return e=s.sent(),[2,new E(mh(e.certificate))]}})}).call(this)},n.gH=function(){return Vt(function(t,i,n){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return void 0===n&&(n=Ud.LT),r=kh(t),[4,Jp(this.lH,"fairplay",this.Dx,i)];case 1:return e=o.sent(),s=oa(JSON.stringify({spc:r,ticket:e.ticket})),u={Yu:this.JV(),fk:Ud.BT,_k:this.nH(),Hk:ml.POST,XT:s,Wk:0,Yg:i,Km:yl.Tk,zk:pl.xk},[4,this.Dx.vk(u)];case 2:return[4,o.sent().VT()];case 3:return[2,mh(o.sent().licence)]}})}).apply(this,arguments)},Nt(i,[{key:"VH",get:function(){return fk.BT}}]),i}(vk);U(),Et(),Pt();var Ek=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,Ud.LT)||this}Ct(i,t);var n=i.prototype;return n.FH=function(t,i){return kh(t)},n.uH=function(i){if(0===i.length)throw new ug(vd.CONTENT_PROTECTION_LICENSE_ERROR,"Vimond license request error.");return t.prototype.uH.call(this,i)},n.nH=function(){var i=t.prototype.nH.call(this);return i.set("Content-Type","text/plain"),i},i}(vk);U(),Et(),xt(),Pt();var Ik=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,Ud.NT)||this}Ct(i,t);var n=i.prototype;return n.FH=function(t,i){return t},n.uH=function(t){return new E(t)},n.nH=function(){if(!Rp(this.lH))throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");var i=t.prototype.nH.call(this);return i.set("X-AxDRM-Message",this.lH.token),i},Nt(i,[{key:"VH",get:function(){return fk.BT}}]),i}(vk);U(),Et(),xt(),Pt();var Rk=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,Ud.BT)||this).XH=void 0,s}Ct(i,t);var n=i.prototype;return n.FH=function(t,i){var n={spc:kh(t)};return JSON.stringify(n)},n.HH=function(t){var i=Ui.Dh(t);return this.XH=t,i.searchParams.has("b")?ut.resolve(i.searchParams.get("b")):ut.reject(new ug(vd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Error during license server request: Could not extract content id"))},n.rH=function(i,n){var r=this.JV();return!r&&this.XH&&(r=this.XH),r&&(r=r.replace("skd://","https://")),t.prototype.rH.call(this,i,n||r)},n.uH=function(t){try{var i;if((i=Xi(t)?JSON.parse(t.trim()):t).ckc)return mh(i.ckc)}catch(t){throw new ug(vd.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Uplynk Fairplay license server")}throw new ug(vd.CONTENT_PROTECTION_LICENSE_ERROR,"No license received from the Uplynk Fairplay license server")},Nt(i,[{key:"VH",get:function(){return fk.LT}}]),i}(vk);U(),Et(),Wt(),Pt(),Qt(),U(),Et(),Wt(),Qt(),U(),Et(),Ft();var Ck=function(){function t(t,i){this.QH=void 0,this.YH=void 0,this.QH=t,this.YH=i}var i=t.prototype;return i.jH=function(t){return this.QH(t)},i.KH=function(t,i){throw new p(i+" must be "+this.YH+". (Received: "+t+")")},t}(),Pk=(new Ck(function(t){return!0},"any"),new Ck(Qi,"a number")),Dk=new Ck(Xi,"a string"),Nk=new Ck(qi,"a boolean"),xk=(new Ck(ji,"a date"),new Ck(Fi,"undefined")),Bk=new Ck(Wi,"an object"),Ok=new Ck(function(t){return null===t},"null");new Ck(function(t){return null==t},"null or undefined");function Mk(t,i){throw new p(i+" has an incorrect type")}var Lk=function(){function t(t){this.Qp=void 0,this.Qp=t}var i=t.prototype;return i.jH=function(t){if(!Wi(t))return!1;for(var i,n=Lt(k.keys(this.Qp));!(i=n()).done;){var r=i.value;if(!this.Qp[r].jH(t[r]))return!1}return!0},i.KH=function(t,i){if(!Wi(t))throw new p(i+" must be an object.");for(var n,r=Lt(k.keys(this.Qp));!(n=r()).done;){var e=n.value,s=this.Qp[e];if(!s.jH(t[e]))return s.KH(t[e],i+"."+String(e))}throw new p},t}();function Fk(t){return new Lk(t)}function Uk(t){return k.keys(t).map(function(i){return t[i]})}var Vk=function(){function t(t){this.JH=void 0,this.JH=t}var i=t.prototype;return i.jH=function(t){return jn(this.JH,t)},i.KH=function(t,i){return Mk(0,i)},t}();function Hk(t){return new Vk(t)}var Wk=function(){function t(t){this.ZH=void 0,this.ZH=t}var i=t.prototype;return i.jH=function(t){return this.ZH.some(function(i){return i.jH(t)})},i.KH=function(t,i){return Mk(0,i)},t}();function zk(){for(var t=arguments.length,i=new Array(t),n=0;n36e5},i.vW=function(t){this._W=t,this.gW()},i.pW=function(){var t;return null!=this._W||(this._W=null!=(t=this.fW())?t:kb),this._W},t}();bb.Bg=new bb,U(),Et();var Ab=function(t){return t[t.mW=0]="mW",t[t.wW=1]="wW",t[t.yW=2]="yW",t[t.bW=3]="bW",t[t.AW=4]="AW",t[t.TW=5]="TW",t[t._C=6]="_C",t[t.kW=7]="kW",t[t.EW=8]="EW",t[t.wC=9]="wC",t[t.xW=10]="xW",t[t.yC=11]="yC",t[t.PW=12]="PW",t}({});U(),Et(),xt();var Tb=function(){function t(){}return t.prototype.DW=function(t){},Nt(t,[{key:"IW",get:function(){return 0}},{key:"RW",get:function(){return 0}}]),t}();U(),Et(),Pt(),U(),Et(),Pt();var Sb=function(t){function i(i){var n;return(n=t.call(this,"contentProtectionsTracked")||this).NW=void 0,n.NW=i,n}return Ct(i,t),i}(rh),Eb=function(t){function i(i,n){var r;return void 0===n&&(n=new mb),(r=t.call(this)||this).aV=void 0,r.MW=void 0,r.IH=void 0,r.aV=i,r.MW=n,r}Ct(i,t);var n=i.prototype;return n.BW=function(t){this.IH=t},n.wH=function(t){var i=this.IH;if(void 0!==i)return this.MW.wH(t,i)},n.FS=function(t){var i=this.IH;return void 0!==i&&this.MW.FS(t,i)},n.LW=function(t){var i={xS:t.xS,OW:t.OW||[],FW:t.FW,GH:t.GH,UW:t.UW||[]},n=this.MW.sW(i,this.IH||{},t.fH,this.aV);return i.FW&&n.jV(i.FW),new Ib(n)},n.VW=function(t){t&&(Fn(t,function(t){return void 0!==t.fH})&&this.So(new Sb(t)))},i}(th),Ib=function(){function t(t){this.WW=void 0,this.WW=t}var i=t.prototype;return i.$V=function(t){return this.WW.$V(t)},i.tH=function(t,i,n){return this.WW.tH(i,n)},i.ZV=function(){return this.WW.ZV||void 0!==this.WW.KV},i._H=function(t,i){return this.WW._H(t,i)},i.gH=function(t,i,n){return i&&this.WW.jV(i),this.WW.gH(t,n)},i.zg=function(){this.WW.kn()},t}();U(),Et(),Pt(),Ft();var Rb=function(t){function i(i){var n;(n=t.call(this)||this).zW=[],n.KW=function(t){n.tt(t.Ht)},n.fV=function(t){var i=t.Ht;n.QW(i)||n.it(i)};for(var r,e=Lt(i);!(r=e()).done;){var s=r.value;n.qW(s)}return n}Ct(i,t);var n=i.prototype;return n.qW=function(t){this.zW.push(t);for(var i,n=Lt(t.NI);!(i=n()).done;){var r=i.value;this.tt(r)}this.GW(t)},n.XW=function(t){Xn(this.zW,t),this.jW(t);for(var i,n=Lt(t.NI);!(i=n()).done;){var r=i.value;this.QW(r)||this.it(r)}},n.QW=function(t){for(var i,n=Lt(this.zW);!(i=n()).done;){if(i.value.LI(t))return!0}return!1},n.GW=function(t){t.wn(Iw.rI,this.KW),t.wn(Iw.oI,this.fV)},n.jW=function(t){t.mn(Iw.rI,this.KW),t.mn(Iw.oI,this.fV)},n.kn=function(){for(;this.zW.length>0;)this.XW(this.zW[0]);t.prototype.kn.call(this)},n.xa=function(){return Ym(this)},i}(xw);U(),Et(),xt(),U(),Et();var Cb,Pb={forceSeekOffset:0,maximumOffset:0,maximumPlaybackRate:0,minimumOffset:0,minimumPlaybackRate:0,targetOffset:0},Db=function(){function t(){this.hu=void 0,this.JW=void 0,this.We=void 0}var i=t.prototype;return i.Ea=function(t){this.JW=t,void 0!==this.We&&(this.JW.Rt=this.We)},i.hr=function(){this.JW=void 0,this.We=void 0},Nt(t,[{key:"Ca",get:function(){return null!=this.hu||(this.hu=function(t){return{get enabled(){return t.Rt},set enabled(i){t.Rt=Ww(i)},get monitoringLivePlayback(){return t.YW},get currentLatency(){return t.OL},get currentConfiguration(){return function(t){if(void 0!==t)return{get minimumOffset(){return t.minimumOffset},get maximumOffset(){return t.maximumOffset},get targetOffset(){return t.targetOffset},get forceSeekOffset(){return t.forceSeekOffset},get minimumPlaybackRate(){return t.minimumPlaybackRate},get maximumPlaybackRate(){return t.maximumPlaybackRate}}}(t.Cd)}}}(this)),this.hu}},{key:"Rt",get:function(){var t,i;return null!=(i=this.We)?i:Boolean(null==(t=this.JW)?void 0:t.Rt)},set:function(t){this.We=t,this.JW&&(this.JW.Rt=t)}},{key:"YW",get:function(){var t,i;return null!=(i=null==(t=this.JW)?void 0:t.oL)&&i}},{key:"OL",get:function(){var t;return null==(t=this.JW)?void 0:t.LL}},{key:"Cd",get:function(){return this.JW?this.JW.aL:Pb}}]),t}();var Nb=Boolean(f&&f.TextTrack),xb=function(t){function i(i,n,r,e,s,u,o,h){var a;return void 0===o&&(o=new mb),void 0===h&&(h=Nd()),(a=t.call(this)||this).Nq=void 0,a.PL=void 0,a.aq=void 0,a.tO=void 0,a.sO=void 0,a.Gl=void 0,a.kq=void 0,a.Ac=void 0,a.nq=void 0,a.rq=void 0,a.oq=void 0,a.Cq=void 0,a.xq=void 0,a.Aq=void 0,a.aV=void 0,a.hw=void 0,a.pq=void 0,a.tq=void 0,a.lq=new Tb,a.cq=new Db,a.Oq=function(t){var i=t.lt,n=i.code,r=new ld(vg(n),"Something went wrong during native playback.",i),e=new hg(n,r.message,i.message);a.Qq(r,e)},a.Nc=function(){a.So(new bw(a.zx,a.Vx))},a.Kq=function(){Bi.X_&&a.ct===1/0&&a.Xx(1/0)},a.Mq=function(t){a.lP||(a.tq=void 0),a.So(t)},a.NL=function(t){a.tq=void 0},a.Uq=function(){a.So(new Pg(a.sP))},a.Lq=function(){a.MP>0&&a.DP>0&&a.So(new Ey)},a.Wq=function(t){var i=a.PL.hq.audioTracks;if(i)for(var n=0;n0?t:null!=i?i:[]}function AA(t,i){if(void 0!==i)switch(t){case eg.Mk:return i.preferredVideoCodecs;case eg.Bk:return i.preferredAudioCodecs;default:return}}U(),Et(),U(),Et(),U(),Et(),U(),Et(),U(),Et(),U(),Et(),U(),Et(),U(),Et(),U(),Et(),U(),Et(),xt(),Pt(),U(),Et();var TA=!1;function SA(t,i,n){return n?t<=i:t>1,this.CM=t,this.DM=i||function(t){for(var i=new Array(2*t),n=0,r=0;n=this.V)throw new y("The index provided ("+t+") is greater than the maximum bound ("+this.V+")")},i.LM=function(t){if(0===this.V)return 0;if(this.Cr(t))return t;if(t<=this.Tn(0))return this.Tn(0);if(t>=this.An(this.V-1))return this.An(this.V-1);for(var i=0,n=1/0,r=0;rf||(s===c&&(o=v=o||v),u===f&&(h=d=h||d),SA(c,u+i,h||v)?(u=f,h=d):(r.push(s,u),e.push(o,h),s=c,u=f,o=v,h=d))}return r.push(s,u),e.push(o,h),new t(r,e).FM()},i.FM=function(){for(var i=[],n=[],r=0;r=0},i.GM=function(t,i,n,r,e){return this.XM(t,i,n,r,e)>=0},i.jM=function(t,i,n,r,e){return this.QM(t,i,n,r,e)>=0},i.KM=function(t){if(t.V!==this.V)return!1;for(var i=0;i=0;r-=1)if(SA(this.Tn(r),n,this.RM(r)))return r;return-1},i.ZM=function(t,i){void 0===i&&(i=0);for(var n=t-i,r=0;rn)return r;return-1},i.tL=function(i){return this.BM(i),new t([this.Tn(i),this.An(i)],[this.RM(i),this.NM(i)])},i.iL=function(t,i){var n=this.zM(t,i);return n<0?void 0:this.tL(n)},t.jn=function(i){for(var n=[],r=0;re.uL.forceSeekOffset)return e.So(new rh("latencyrecoveryseek")),void e.dC();var n=e.uL,r=n.minimumOffset,s=n.targetOffset,u=n.maximumOffset,o=e.PL.vP;if(!e.UL(i,r,u))if(i>u&&e.VL()){var h=e.uL.maximumPlaybackRate;TA,e.RL(h)}else if(i1&&is){TA,e.RL(1)}}},e.oa=i,e.PL=n,e.pL=r,e.SL=r.targetOffset,e.TL=r.targetOffset+(null!=(s=r.leniency)?s:0),e.mL=r.targetOffset,e.uL=e.vL(),e.oa.wn(Ry.xM,e.DL),e.oa.wn(Ry.PM,e.NL),e}Ct(i,t);var n=i.prototype;return n.cL=function(t){this.dL.push(t),this.lL()},n.fL=function(t){Xn(this.dL,t),this.lL()},n.lL=function(){this.uL=this.vL(),this.ho&&this._L()},n.vL=function(){var t=this.gL,i=function(t,i){var n=i-t.targetOffset;return{minimumOffset:t.minimumOffset+n,targetOffset:t.targetOffset+n,maximumOffset:t.maximumOffset+n,forceSeekOffset:t.forceSeekOffset+n,minimumPlaybackRate:t.minimumPlaybackRate,maximumPlaybackRate:t.maximumPlaybackRate,leniency:t.leniency}}(this.pL,this.mL),n=[].concat([i],this.dL),r=n.reduce(function(t,i){var n;return b.max(t,null!=(n=null==i?void 0:i.minimumOffset)?n:0)},t),e=n.reduce(function(t,i){var n;return b.max(t,null!=(n=null==i?void 0:i.targetOffset)?n:0)},r+DA),s=n.reduce(function(t,i){var n;return b.max(t,null!=(n=null==i?void 0:i.maximumOffset)?n:0)},e+DA);return{minimumOffset:r,targetOffset:e,maximumOffset:s,forceSeekOffset:n.reduce(function(t,i){var n;return b.max(t,null!=(n=null==i?void 0:i.forceSeekOffset)?n:0)},s+DA),minimumPlaybackRate:n.reduce(function(t,i){var n;return b.min(t,null!=(n=i.minimumPlaybackRate)?n:CA)},CA),maximumPlaybackRate:n.reduce(function(t,i){var n;return b.max(t,null!=(n=i.maximumPlaybackRate)?n:PA)},PA)}},n.wL=function(){var t,i=null==(t=EA.jn(this.oa.Fx).iL(this.oa.zx))?void 0:t.An(0),n=void 0!==i?i-this.oa.zx:0;this.yL=b.min(this.yL,n),this.bL+=1},n.AL=function(){if(!(this.bL<10)){var t=.25-this.yL,i=Tn(this.mL+t,this.mL-.1,this.mL+.1);this.mL=Tn(i,this.SL,this.TL),this.yL=1/0,this.bL=0}},n.kL=function(){var t=this;this.EL(),this._E=Ui.Og(function(){return t._L()},500)},n.EL=function(){void 0!==this._E&&(Ui.Lg(this._E),this._E=void 0)},n.Tn=function(){var t=this;this.We&&this.xL&&(this.ho||this.PL.wn(eh.py,this._L),this.IL=Ui.fm(function(){return t.wL()},1e3),this.CL=Ui.fm(function(){return t.AL()},6e4),this.kL(),this.ho=!0)},n.KP=function(){this.ho&&(this.EL(),this.IL&&Ui.vm(this.IL),this.CL&&Ui.vm(this.CL),this.PL.mn(eh.py,this._L),this.RL(1),this.ho=!1)},n.zg=function(){this.KP(),this.oa.mn(Ry.xM,this.DL),this.oa.mn(Ry.PM,this.NL),this.Vo()},n.RL=function(t){this.PL.ML.BL||this.oa.vP!==t&&(this.oa.vP=t)},Nt(i,[{key:"oL",get:function(){return this.We&&this.ho}},{key:"aL",get:function(){return this.uL}},{key:"Rt",get:function(){return this.We},set:function(t){this.We=t,t?this.Tn():this.KP()}},{key:"LL",get:function(){return this.oa.OL}}]),i}(th),xA=.66,BA=1.5,OA=3;function MA(t){if(Li(t)){var i,n,r,e,s,u,o=Ui.Zs.mp?10:0,h=t.targetOffset;return{minimumOffset:null!=(i=t.minimumOffset)?i:h*xA,targetOffset:h,maximumOffset:null!=(n=t.maximumOffset)?n:h*BA,forceSeekOffset:b.max(null!=(r=t.forceSeekOffset)?r:h*OA,o),minimumPlaybackRate:null!=(e=t.minimumPlaybackRate)?e:CA,maximumPlaybackRate:null!=(s=t.maximumPlaybackRate)?s:PA,leniency:null!=(u=t.leniency)?u:void 0}}}var LA=function(t){return t.HL="auto",t.WL="always",t.qL="never",t.CLEAR_ONLY="clear-only",t.SAME_DRM_ONLY="same-drm-only",t}({}),FA=function(t){return t.UPLYNK="uplynk",t.MEDIATAILOR="mediatailor",t}({});function UA(t){if(!t||!Xi(t))return"auto";switch(t){case"always":return"always";case"never":return"never";case"clear-only":return"clear-only";case"same-drm-only":return"same-drm-only";default:return"auto"}}U(),Et(),U(),Et();var VA=function(t){return t.ENABLED="enabled",t.INSECURE="insecure",t.DISABLED="disabled",t}({});U(),Et();var HA=!1;U(),Et();var WA=function(t){return t.NONE="none",t.MIDROLL_AND_POSTROLL="midroll-and-postroll",t}({});function zA(t){var i=null==t?void 0:t.match(/\b(?:m3u8|mpd)\b/i);if(!i)return cA.pC;switch(i[0].toLowerCase()){case"mpd":return cA.vC;case"m3u8":return cA._C;default:return cA.pC}}function XA(t){switch(t){case aA.lC:case aA.fC:return t;default:return aA.Fk}}function qA(t){if(!t)return!1;var i=t.toLowerCase();return Fo(i,cA.vC)}function GA(t){if(!t)return!1;var i=t.toLowerCase();return Fo(i,cA._C)||Fo(i,cA.gC)}function jA(t){return Wi(t)&&Wi(t.ssai)&&"google-dai"===t.ssai.integration}function QA(t){return Wi(t)&&"uplynk"===t.integration}function YA(t){return Wi(t)&&"theolive"===t.type}function KA(t){return Wi(t)&&"mediatailor"===t.integration}function JA(t){return Wi(t)&&"millicast"===t.type}function ZA(t){if(Xi(t))return!t;if(QA(t))return!t.id;if(jA(t)){var i=t.ssai,n="live"===i.availabilityType&&i.assetKey,r="vod"===i.availabilityType&&i.contentSourceID&&i.videoID;return Boolean(n&&r)}return JA(t)?!t.src||!t.streamAccountId:!t.src}function $A(t){return Boolean(Wi(t)&&Xi(t.src))}function tT(t){return t.type===cA.mC||t.type===cA.wC}function iT(t){return Xi(t)||$A(t)||jA(t)||QA(t)||JA(t)}function nT(t){if(t){if(iT(t))return ZA(t);for(var i,n=Lt(t);!(i=n()).done;){if(!ZA(i.value))return!1}return!0}return!0}function rT(){return{crossOrigin:aA.Fk,useCredentials:!1,liveOffset:void 0,timeServer:void 0,hlsDateRange:void 0,experimentalRendering:!1,nativeUiRendering:!1,lowLatency:!1,useNativePlayback:!1,useManagedMediaSource:!1,dash:void 0,hls:void 0,abr:void 0,lcevc:void 0,ignoreEmbeddedTextTrackTypes:[],seamlessSwitchStrategy:LA.HL,latencyConfiguration:void 0}}function eT(){return Yu({},rT(),{src:void 0,type:cA.pC,contentProtection:void 0,ssai:void 0,integrationData:void 0,isAdvertisement:void 0})}function sT(t){var i={allowedMimeTypes:void 0,preload:"midroll-and-postroll",showCountdown:!0,vpaidMode:VA.ENABLED,googleIma:{useNativeIma:!1,useAdUiElementForSsai:!0,bitrate:-1,language:void 0,uiElements:void 0,allowSeekingForGoogleDai:!1},theoads:HA,allowSkipAdBreak:!1};return void 0===t||(void 0!==t.preload&&(i.preload=function(t){return"none"===t?WA.NONE:WA.MIDROLL_AND_POSTROLL}(t.preload)),void 0!==t.showCountdown&&(i.showCountdown=Ww(t.showCountdown)),void 0!==t.vpaidMode&&(i.vpaidMode=function(t){switch(t){case"insecure":return VA.INSECURE;case"disabled":return VA.DISABLED;default:return VA.ENABLED}}(t.vpaidMode)),Vi(t.allowedMimeTypes)&&(i.allowedMimeTypes=t.allowedMimeTypes.filter(Xi)),void 0!==t.googleIma&&(i.googleIma=function(t){return void 0===t?{useNativeIma:!1,useAdUiElementForSsai:!0,bitrate:-1,language:void 0,uiElements:void 0,allowSeekingForGoogleDai:!1}:{useNativeIma:Ww(t.useNativeIma),useAdUiElementForSsai:null==(i=zw(t.useAdUiElementForSsai))||i,bitrate:null!=(n=t.bitrate)?n:-1,language:Li(t.language)?Gw(t.language):void 0,uiElements:t.uiElements,allowSeekingForGoogleDai:Ww(t.allowSeekingForGoogleDai)};var i,n}(t.googleIma)),void 0!==t.theoads?i.theoads=Ww(t.theoads):i.theoads=HA,i.allowSkipAdBreak=Ww(t.allowSkipAdBreak)),i}function uT(t){if(!Hi(t))return[];for(var i,n=[],r=Lt(t);!(i=r()).done;){var e=i.value;Wi(e)&&n.push(e)}return n}function oT(t){return Xi(t.src)||JA(t)}function hT(t){return Vi(t)?t.filter(xg):[]}U(),Et(),Pt();var aT=function(t){function i(i,n){var r;return void 0===n&&(n=Dy.zL),(r=t.call(this,eh.Rw)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Ct(i,t),i}(rh);U(),Et(),Pt();var cT=function(t){function i(i){var n;return(n=t.call(this,eh.jw)||this).currentTime=void 0,n.currentTime=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var fT=function(t){function i(i){var n;return(n=t.call(this,eh.uo)||this).currentTime=void 0,n.currentTime=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var vT=function(t){function i(i){var n;return(n=t.call(this,eh.Cw)||this).duration=void 0,n.duration=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var dT=function(t){function i(i,n){var r;return(r=t.call(this,eh.Kw)||this).currentTime=void 0,r.playbackRate=void 0,r.currentTime=i,r.playbackRate=n,r}return Ct(i,t),i}(rh);U(),Et(),Pt();var lT=function(t){function i(i){var n;return(n=t.call(this,eh.Nw)||this).currentTime=void 0,n.currentTime=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var wT=function(t){function i(i){var n;return(n=t.call(this,eh.$w)||this).currentTime=void 0,n.currentTime=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var gT=function(t){function i(i){var n;return(n=t.call(this,eh.Zw)||this).currentTime=void 0,n.currentTime=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var _T=function(t){function i(i,n){var r;return(r=t.call(this,eh.wy)||this).currentTime=void 0,r.volume=void 0,r.currentTime=i,r.volume=n,r}return Ct(i,t),i}(rh);function mT(){return Vt(function(t,i,n,r,e){var s,u,o;return zt(this,function(h){switch(h.label){case 0:void 0===n&&(n=3),void 0===r&&(r=1e3),void 0===e&&(e=1/0),s=0,h.label=1;case 1:0,h.label=2;case 2:return h.trys.push([2,4,,7]),[4,t(s,i)];case 3:return[2,h.sent()];case 4:return lr(u=h.sent()),sDy.zL&&y===Dy.zL)&&t.So(new aT(v,y)),_&&!o?t.So(new cT(v)):!_&&o&&t.So(new fT(v)),y>=Dy.Qn&&(r||a=Dy.GL&&(r||a=Dy.XL&&(r||a=Dy.jL&&(r||a1)0;else if(0===i.length)throw y("Unknown ad integration: "+t.integration);return i[0]||null},i.Kz=function(t){this.Xz.push(t)},Nt(t,[{key:"Gz",get:function(){return this.Xz}}]),t}();kS.Bg=new kS,U(),Et(),Pt(),U(),Et(),U(),Et(),Pt(),U(),Et(),xt(),Pt();var bS=function(t){return t.PM="PLAYING",t.Yz="PAUSED",t.Jz="SEEK",t.Zz="STALLED",t.$z="FAILED",t.tG="INITIAL_BUFFERING",t.iG="NO_ACCESS",t}({}),AS=function(t){return t.eG="HTTP_REQUEST_STATUS_CODE_1XX",t.sG="HTTP_REQUEST_STATUS_CODE_2XX",t.nG="HTTP_REQUEST_STATUS_CODE_3XX",t.rG="HTTP_REQUEST_STATUS_CODE_4XX",t.hG="HTTP_REQUEST_STATUS_CODE_5XX",t.oG="BUFFER_LENGTH",t.aG="BYTES_RECEIVED",t.uG="SEGMENT_READ_BITRATE",t.cG="SEGMENT_PROFILE_BITRATE",t.dG="VIDEO_PROFILE_BITRATE",t.lG="NUMBER_OF_FRAMES_DROPPED",t.fG="PLAYBACK_POSITION",t.vG="NUMBER_OF_FRAMES_DECODED",t._G="PLAYBACK_DELTA_TO_ORIGIN",t.gG="STREAM_DELTA_TO_ORIGIN",t.pG="ORIGIN_TIMESTAMP",t}({}),TS=function(t){return t.mG="MANIFEST_URI",t.wG="ASSET_DURATION",t.yG="NUMBER_OF_CONTENT_PROFILES",t.bG="CDN",t.AG="CONTENT_TITLE",t.SG="SERVICE_NAME",t.TG="CONTENT_TYPE",t.kG="CONTENT_DESCRIPTION",t}({}),SS=function(t){return t.EG="shutdown_normal_shutdown",t}({}),ES=function(t){return t.xG="session/",t.IG="content/",t.CG="internalError/",t.DG="drmError/",t.NG="caError/",t.BG="networkError/",t}({}),IS=function(){function t(t,i){this.category=void 0,this.statusCode=void 0,this.category=t,this.statusCode=i}return Nt(t,[{key:"code",get:function(){return this.category+this.statusCode}}]),t}(),RS=function(t){function i(){return t.apply(this,arguments)||this}return Ct(i,t),i}(th);U(),Et(),Pt(),U(),Et(),U(),Et();var CS=function(t){return t.PAUSE="MG",t.RESUME="OG",t}({}),PS=function(t){function i(){return t.call(this,"FG")||this}return Ct(i,t),i}(rh),DS=function(t){function i(i,n){var r;return(r=t.call(this)||this).oa=void 0,r.WG=void 0,r.VG=void 0,r.qG=void 0,r.zG=void 0,r.oa=i,r.WG=n,r.VG=!1,r.qG=function(){r.HG(),r.VG=!1},r.zG=function(){r.VG=!0},r.WG.wn(CS.PAUSE,r.qG),r.WG.wn(CS.RESUME,r.zG),r}Ct(i,t);var n=i.prototype;return n.UG=function(){this.VG=!0},n.HG=function(){},n.kn=function(){this.VG=!1,this.WG.mn(CS.PAUSE,this.qG),this.WG.mn(CS.RESUME,this.zG)},n.GG=function(){return isFinite(this.oa.Nd())},i}(th),NS=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).tX=!1,i.aX=!1,i.uX=!1,i.QG=function(){i.aX&&!i.uX&&i.sX(bS.Zz)},i.YG=function(){i.oa.lP||(i.aX||i.hX(new IS(ES.IG,"firstFrameDisplayed"),"now"),i.aX=!0,i.sX(bS.PM))},i.KG=function(){i.oa.lP&&(i.aX=!0,i.sX(bS.Yz))},i.JG=function(){i.tX&&(i.uX=!0,i.tX=!1,i.sX(bS.Jz))},i.ZG=function(){i.uX=!1,i.oa.lP&&i.sX(bS.Yz)},i}Ct(i,t);var n=i.prototype;return n.UG=function(){t.prototype.UG.call(this),this.XG()},n.kn=function(){this.jG(),t.prototype.kn.call(this)},n.XG=function(){this.oa.wn(Ry.xM,this.QG),this.oa.wn(eh.jw,this.KG),this.oa.wn(Ry.PM,this.YG),this.oa.wn(eh.$w,this.JG),this.oa.wn(eh.Zw,this.ZG)},n.jG=function(){this.oa.mn(Ry.xM,this.QG),this.oa.mn(eh.jw,this.KG),this.oa.mn(Ry.PM,this.YG),this.oa.mn(eh.$w,this.JG),this.oa.mn(eh.Zw,this.ZG)},n.$G=function(){this.tX=!0},n.iX=function(){var t=this.oa.Yx(),i=new IS(ES.CG,String(t.code));this.eX(bS.$z,i,t.message)},n.sX=function(t){this.VG&&(this.WG.nX(t),this.So(new PS))},n.eX=function(t,i,n){this.WG.rX(t,i,n),this.So(new PS)},n.hX=function(t,i){this.WG.oX(t,i)},i}(DS);U(),Et(),Pt();var xS=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).vX=function(){i.GG()&&i.pX(TS.wG,b.round(i.oa.Nd()))},i.fX=function(t){"manifest"===t.request.type&&i.pX(TS.mG,t.url)},i.cX=function(){var t=Fn(i.oa.rt.NI,function(t){return t.Rt});t&&i.pX(TS.yG,t.$I.V)},i}Ct(i,t);var n=i.prototype;return n.UG=function(){t.prototype.UG.call(this),this.cX(),this.XG()},n.kn=function(){this.jG(),t.prototype.kn.call(this)},n.XG=function(){this.oa.rt.wn(Nw.pa,this.cX),this.oa.lX.dX(this.fX),this.oa.wn(eh.Cw,this.vX)},n.jG=function(){this.oa.rt.mn(Nw.pa,this.cX),this.oa.lX._X(this.fX),this.oa.mn(eh.Cw,this.vX)},n.gX=function(t){t.serviceName&&this.pX(TS.SG,t.serviceName),t.cdn&&this.pX(TS.bG,t.cdn),t.contentTitle&&this.pX(TS.AG,t.contentTitle),t.contentType&&this.pX(TS.TG,t.contentType),t.contentDescription&&this.pX(TS.kG,t.contentDescription)},n.pX=function(t,i){this.VG&&this.WG.mX(t,i)},i}(DS);U(),Et(),Pt();var BS=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).RX=Ju(),i.PX=0,i.wX=0,i.yX=0,i.bX=[],i.AX=function(){i.DX(),i.NX(),i.LX()},i.kX=function(t){t.Gk===eg.Mk&&(i.xX(t.uO),i.BX(),i.MX(t.FX),i.SX())},i.TX=function(t){var n=t.status.toString()[0],r=i.RX.get(n)||0;i.RX.set(n,r+1),i.CX(AS.eG,"1"),i.CX(AS.sG,"2"),i.CX(AS.nG,"3"),i.CX(AS.rG,"4"),i.CX(AS.hG,"5")},i}Ct(i,t);var n=i.prototype;return n.UG=function(){t.prototype.UG.call(this),this.wX=this.oa.rP.rO,this.yX=this.oa.rP.oO,this.XG(),this.bX.push(_(this.AX,1e3))},n.HG=function(){t.prototype.HG.call(this),this.SX()},n.kn=function(){this.SX(),this.jG(),this.bX.forEach(m),Yn(this.bX),t.prototype.kn.call(this)},n.XG=function(){this.oa.lX.dX(this.TX),this.oa.wn(eh._y,this.kX)},n.jG=function(){this.oa.lX._X(this.TX),this.oa.mn(eh._y,this.kX)},n.EX=function(){this.SX()},n.xX=function(t){this.PX+=t,this.IX(AS.aG,this.PX)},n.CX=function(t,i){var n=this.RX.get(i)||0;this.IX(t,n)},n.DX=function(){var t=this.oa.rP.rO-this.wX;this.IX(AS.lG,t)},n.NX=function(){var t=this.oa.rP.oO-this.yX;this.IX(AS.vG,t)},n.BX=function(){var t=bb.Bg.pW();this.IX(AS.uG,Ea(t))},n.MX=function(t){this.IX(AS.cG,Ea(t)),this.IX(AS.dG,Ea(t))},n.SX=function(){if(this.GG()){var t=b.round(fe(this.oa.Gx()));this.IX(AS.fG,t)}},n.LX=function(){var t=EA.jn(this.oa.Ux()),i=this.oa.Gx(),n=t.iL(i),r=n?fe(n.An(0)-i):0;this.IX(AS.oG,r)},n.IX=function(t,i){this.VG&&this.WG.OX(t,i)},i}(DS);U(),Et(),Ft();function OS(t){return t&&t.integration===WS}function MS(t){if(!Xi(t.asset))throw new p("Agama source configuration: expected 'asset' to be a string");if(!function(t){return!!Xi(t)&&("live"===t||"vod"===t)}(t.streamType))throw new p("Agama source configuration: expected 'streamType' to be 'live' or 'vod'");if(void 0!==t.serviceName&&!function(t){return!!Xi(t)&&("live"===t||"svod"===t||"nvod"===t||"tvod"===t||"avod"===t||"catchuptv"===t)}(t.serviceName))throw new p("Agama source configuration: expected 'serviceName' to be 'live', 'svod', 'nvod','tvod', 'avod' or 'catchuptv'");if(void 0!==t.cdn&&!Xi(t.cdn))throw new p("Agama source configuration: expected 'cdn' to be a string");if(void 0!==t.contentTitle&&!Xi(t.contentTitle))throw new p("Agama source configuration: expected 'contentTitle' to be a string");if(void 0!==t.contentType&&!Xi(t.contentType))throw new p("Agama source configuration: expected 'contentType' to be a string");if(void 0!==t.contentDescription&&!Xi(t.contentDescription))throw new p("Agama source configuration: expected 'contentDescription' to be a string");return t}function LS(t){if(!Xi(t.config))throw new p("Agama player configuration: expected 'config' to be a string");if(void 0!==t.logLevel&&!function(t){return!!Xi(t)&&("info"===t||"debug"===t||"warning"===t||"error"===t||"fatal"===t)}(t.logLevel))throw new p("Agama player configuration: expected 'logLevel' to be 'info', 'debug', 'warning','error' or 'fatal'");if(void 0!==t.application&&!Xi(t.application))throw new p("Agama player configuration: expected 'application' to be a string");if(void 0!==t.applicationVersion&&!Xi(t.applicationVersion))throw new p("Agama player configuration: expected 'applicationVersion' to be a string");if(void 0!==t.userAccountID&&!Xi(t.userAccountID))throw new p("Agama player configuration: expected 'userAccountID' to be a string");if(void 0!==t.deviceID&&!Xi(t.deviceID))throw new p("Agama player configuration: expected 'deviceID' to be a string");return t}function FS(){var t="00000000-0000-0000-0000-000000000000",i=f.navigator,n=f.screen,r=""+i.mimeTypes.length;r+=i.userAgent.replace(/\D+/g,""),r+=i.plugins.length,r+=n.height||"",r+=n.width||"",r+=n.pixelDepth||"";var e=function(t){var i,n=0;if(0===t.length)return"0";for(i=0;i0?JS(t[0]):void 0}function ZS(t){if(t&&t.sources)return $S(t.sources)}function $S(t){return Xi(t)?t:$A(t)?t.src:Hi(t)&&t.length>0?$S(t[0]):void 0}function tE(t,i,n){return QA(t)?function(t,i,n){var r=Yu({},rT(),{ping:{adImpressions:!1,freeWheelVideoViews:!1,linearAdData:!1},integration:FA.UPLYNK,id:"",prefix:QS,preplayParameters:{},playbackUrlParameters:{},assetType:jS.ASSET,contentProtected:!1,assetInfo:!0});r.id=function(t){if(Xi(t))return t;if(Hi(t)&&Xi(t[0]))return t;if(function(t){return Wi(t)&&Xi(t.userId)&&(Hi(t.externalId)||Xi(t.externalId))}(t))return t;return""}(t.id),t.preplayParameters&&(r.preplayParameters=t.preplayParameters);t.playbackUrlParameters&&(r.playbackUrlParameters=t.playbackUrlParameters);t.assetType&&(r.assetType=function(t){switch(t){case"channel":return jS.CHANNEL;case"event":return jS.EVENT;default:return jS.ASSET}}(t.assetType));t.contentProtected&&(r.contentProtected=Ww(t.contentProtected));t.assetInfo?r.assetInfo=Ww(t.assetInfo):r.assetInfo="asset"===r.assetType;t.prefix&&(r.prefix=Gw(t.prefix)||QS);return r.ping=function(t,i){var n=!1,r=!1,e=!1;i?(n=!!qi(i.adImpressions)&&i.adImpressions,r=!!qi(i.freeWheelVideoViews)&&i.freeWheelVideoViews,e=qi(i.linearAdData)?i.linearAdData:t!==jS.ASSET):t!==jS.ASSET&&(e=!0);return{adImpressions:n,freeWheelVideoViews:r,linearAdData:e}}(r.assetType,t.ping),r=eE(r,t),r=uE(r,i,n),r=sE(r,t,n),r}(t,i,n):KA(t)?function(t,i,n){var r;return Yu({},iE(t,i,n),{integration:FA.MEDIATAILOR,adsParams:null!=(r=t.adsParams)?r:{}})}(t,i,n):YA(t)?function(t,i,n){return Yu({},iE(t,i,n),{type:"theolive"})}(t,i,n):JA(t)?nE(t,i,n):iE(t,i,n)}function iE(t,i,n){var r=eT(),e=i&&(i.contentProtection||i.drm);if(Xi(t)){if(r.src=t,r.type=zA(t),e){var s=oS(e);r.contentProtection=wA(s)}}else if($A(t)||jA(t)||JA(t)){r.src=t.src,r.type=t.type||zA(t.src),r.isAdvertisement=t.isAdvertisement;var u=tT(t)?t.hesp:void 0;void 0!==u&&(r.hesp=u),KA(t)&&(r.integration=t.integration);var o=oS(t.contentProtection||t.drm||e);r.contentProtection=wA(o),t.ssai&&(r.ssai=dA(t.ssai)),r=eE(r,t)}return r=sE(r=uE(r,i,n),t,n)}function nE(t,i,n){return Yu({},iE(t,i,n),{type:cA.yC,src:t.src,streamAccountId:t.streamAccountId,subscriberToken:t.subscriberToken,connectOptions:aE(t.connectOptions),apiUrl:t.apiUrl,statsIntervalMs:rE(t.statsIntervalMs)})}function rE(t){if(Qi(t)&&t>0)return t}function eE(t,i){var n,r;i.useCredentials?t.crossOrigin=aA.fC:i.crossOrigin&&(t.crossOrigin=XA(i.crossOrigin)),Xi(i.timeServer)&&(t.timeServer=i.timeServer),i.liveOffset&&(t.liveOffset=i.liveOffset),i.hlsDateRange&&(t.hlsDateRange=i.hlsDateRange),i.lowLatency&&(t.lowLatency=Ww(i.lowLatency)),i.useNativePlayback&&(t.useNativePlayback=Ww(i.useNativePlayback)),i.useManagedMediaSource&&(t.useManagedMediaSource=Ww(i.useManagedMediaSource)),i.dash&&(t.dash=gA(i.dash)),i.hls&&(t.hls=_A(i.hls)),i.lcevc&&(t.lcevc=Ww(i.lcevc)),i.ignoreEmbeddedTextTrackTypes&&(t.ignoreEmbeddedTextTrackTypes=hT(i.ignoreEmbeddedTextTrackTypes)),i.latencyConfiguration&&(t.latencyConfiguration=MA(i.latencyConfiguration)),t.seamlessSwitchStrategy=UA(null!=(r=i.seamlessSwitchStrategy)?r:null==(n=i.dash)?void 0:n.useSeamlessPeriodSwitch);var e=zw(i.experimentalRendering);void 0!==e&&(t.experimentalRendering=e);var s=zw(i.nativeUiRendering);return void 0!==s&&(t.nativeUiRendering=s),t}function sE(t,i,n){return t.abr=pA(Xi(i)?void 0:yA(i.abr),null==n?void 0:n.abr),t}function uE(t,i,n){var r,e=i&&i.timeServer;return n&&n.liveOffset&&!Li(t.liveOffset)&&(t.liveOffset=n.liveOffset),n&&n.hlsDateRange&&!Li(t.hlsDateRange)&&(t.hlsDateRange=n.hlsDateRange),t.crossOrigin===aA.Fk&&(null==i||null==(r=i.vr)?void 0:r[360])&&(t.crossOrigin=aA.lC),t.useCredentials=t.crossOrigin===aA.fC,Xi(e)&&!t.timeServer&&(t.timeServer=e),t}function oE(t){var i={src:""};if(t&&t.src){if(i.src=Gw(t.src),"default"in t&&(i.default=Ww(t.default)),i.kind=function(t){var i=String(t||"").toLowerCase();return $m(i)?i:i?"metadata":"subtitles"}(t.kind),xg(t.format)&&(i.format=t.format),"srclang"in t){var n=t.srclang;"string"==typeof n&&""!==n&&(i.srclang=n)}if("label"in t){var r=t.label;"string"==typeof r&&""!==r&&(i.label=r)}}return i}function hE(t,i){if(Wi(t))try{return i.jz(t).uj(t)}catch(t){return}}function aE(t){if(null==t)return t;if(!Wi(t))throw new y("connectOptions must be an object");return t}function cE(t,i,n){if(void 0===n&&(n=kS.Bg),YS(t))return{sources:[eT()]};var r=Lw(t);if(r.sources=function(t,i,n){if(iT(t))return[tE(t,i,n)];if(Hi(t)&&iT(t[0])){for(var r,e=[],s=Lt(t);!(r=s()).done;){var u=r.value;e.push(tE(u,i,n))}return e}return[eT()]}(r.sources,r,i),"contentProtection"in r&&delete r.contentProtection,"drm"in r&&delete r.drm,"ads"in r){var e=function(t,i){if(!Hi(t))return[];for(var n,r=[],e=Lt(t);!(n=e()).done;){var s=n.value;(s=hE(s,i))&&r.push(s)}return r}(r.ads,n);0===e.length?delete r.ads:r.ads=e}var s=!nT(r.sources),u=r.ads&&r.ads.length>0;if(s&&!u?delete r.ads:u&&!s&&(r.sources=[]),"textTracks"in r){var o=function(t){if(!Hi(t))return[];for(var i,n=[],r=Lt(t);!(i=r()).done;){var e=i.value;""!==(e=oE(e)).src&&n.push(e)}return n}(r.textTracks);0===o.length?delete r.textTracks:r.textTracks=o}if("poster"in r&&(r.poster=Gw(r.poster)),"streamType"in r&&(r.streamType=function(t){switch(t){case"live":case"dvr":case"vod":return t}}(r.streamType)),"vr"in r&&(r.vr=function(t){var i=t||{};return i.stereoMode=function(t){return function(t){switch(t){case"":case"horizontal":case"vertical":return!0;default:return!1}}(t)?t:""}(i.stereoMode),{panoramaMode:GS(i.panoramaMode,Boolean(i[360])),stereoMode:i.stereoMode?qS(i.stereoMode):zS.NONE,nativeVR:Boolean(i.nativeVR)}}(r.vr)),"analytics"in r||(null==i?void 0:i.analytics)){var h=uT(r.analytics),a=i&&i.analytics||[];r.analytics=function(t,i){for(var n,r=function(){var i=n.value,r=!t.some(function(t){return t.integration===i.integration});r&&i.integration!==WS&&e.push(i)},e=Lw(t),s=Lt(i);!(n=s()).done;)r();return e}(h,a)}return"mutedAutoplay"in r&&(r.mutedAutoplay=AT(r.mutedAutoplay)),"timeServer"in r&&delete r.timeServer,"playAdsAfterTime"in r&&(r.playAdsAfterTime=Xw(r.playAdsAfterTime)),r.blockContentIfAdError=function(t){return void 0!==t&&"boolean"==typeof t&&Boolean(t)}(r.blockContentIfAdError),r}U(),Et(),U(),Et(),U(),Et();var fE=function(){function t(t){this.cj=t}return t.prototype.dj=function(t){var i,n,r,e,s,u,o,h=[];if(!t)return"";var a=t.length%4;if(a>0)for(;a++<4;)t+=this.cj.charAt(64);for(i=0;i>>16&255,r=o>>>8&255,e=255&o,h[i/4]=String.fromCharCode(n,r,e),64===u&&(h[i/4]=String.fromCharCode(n,r)),64===s&&(h[i/4]=String.fromCharCode(n));return h.join("")},t.prototype.lj=function(t,i){var n,r,e,s,u,o,h,a=[],c="";if((o=t.length%3)>0)for(;o++<3;)c+=this.cj.charAt(64),t+="\0";for(o=0;o>18&63,e=n>>12&63,s=n>>6&63,u=63&n,a[o/3]=this.cj.charAt(r)+this.cj.charAt(e)+this.cj.charAt(s)+this.cj.charAt(u);return h=(h=a.join("")).slice(0,h.length-c.length),i||(h+=c),h},t.bh=new t(function(){var t,i,n,r,e=[],s=["object","$","undefined","function","Cannot find module '","MODULE_NOT_FOUND","*","com.widevine.alpha","urn:mpeg:dash:mp4protection:2011","^","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","__proto__","@@iterator","getUTCHours","setUTCFullYear","25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?","SegmentBase","RateChangeEvent","Symbol(","Symbol.",'; codecs="'];for(t=0;t0?t[t.length-1]:this.Gb.gj?this.Gb.gj:void 0}},i.Lj=function(i,n){return!!t.Yj(i,n.Aj)},t.Wj=function(t){var i=Number(new Date);return!!t&&i<=t},t.Yj=function(t,i){return FE(this.Jj(t),i)},t.Jj=function(t){return Xi(t)?t:$A(t)&&t.src||""},t}(),NE=function(){function t(){}var i=t.prototype;return i.Uj=function(t){return 0},i.Nj=function(t,i){},i.Fj=function(t,i){},t}();function xE(t){switch(t){case"invaliddomain":return vd.LICENSE_INVALID_DOMAIN;case"invalidsource":return vd.LICENSE_INVALID_SOURCE;case"expired":return vd.LICENSE_EXPIRED;case"invalidfeature":return vd.LICENSE_INVALID_FEATURE;case"error":return vd.LICENSE_ERROR}}var BE="25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?",OE=_n(function(){var t="\\.",i="(\\*|"+BE+")";return new RegExp("ip-range\\("+i+t+i+t+i+t+i+"\\)")});function ME(t,i){var n=t,r=i;if(!n)return!1;if("*"===(r=r.trim()))return!0;if(r===(n=n.replace(/\.+$/,"")))return!0;if(Fo(r,"ip-range(")){var e="\\.",s=r.match(OE()),u=function(t){return"*"===t?"("+BE+")":t};if(null!==s&&5===s.length){var o=new RegExp("^"+s[1]+e+u(s[2])+e+u(s[3])+e+u(s[4])+"$");return null!==n.match(o)}}return r="."+r,-1!==n.indexOf(r,n.length-r.length)}function LE(t){return t.some(function(t){return"*"===t})}function FE(t,i){var n=Ui.Dh(t);if(!UE(n))return!0;for(var r,e=Lt(i);!(r=e()).done;){var s=r.value;if(ME(n.hostname,s))return!0;if(ME(Pl(t),s))return!0}return!1}function UE(t){return-1!==EE.indexOf(t.protocol)}function VE(t){var i=Ui.Dh(t.Yu);return UE(i)&&!function(t){return ME(t.hostname,"localhost")}(i)&&!function(t){return ME(t.hostname,"theoplayer.doubleclick.net")}(i)}var HE=function(){function t(){}return t.qj=function(t,i){return"The requested feature '"+i+"' is not available with the license for this player."},t.Oj=function(t){return"invaliddomain"===t?this.$j:"invalidsource"===t?this.tQ:"expired"===t?this.iQ:"invalidfeature"===t?this.eQ:this.sQ},t}();HE.sQ="The license for this player is invalid.",HE.iQ="The usage license for this video player has expired.",HE.$j="The current domain is incompatible with the license for this player.",HE.tQ="The provided video source is incompatible with the license for this player.",HE.eQ="The requested feature is not available with the license for this player.",U(),Et(),Wt(),xt(),Qt(),U(),Et();var WE=function(t){return t[t.nQ=1]="nQ",t[t.rQ=4]="rQ",t[t.hQ=5]="hQ",t[t.oQ=9]="oQ",t}({});function zE(t){var i=[t.zB,t.aQ,t.uQ];switch(t.aQ){case 1:i.push(t.rC);break;case 4:i.push(t.zx),i.push(t.lt);break;case 5:i.push(t.lt);break;case 9:i.push(t.Km)}return i}U(),Et();var XE,qE=new Array(256);for(XE=0;XE<256;XE+=1)qE[XE]=(XE<16?"0":"")+XE.toString(16);function GE(){var t=ae(),i=(4294967296*b.random()|0)+t&3029421624,n=(4294967296*b.random()|0)+t&3595553209,r=(4294967296*b.random()|0)+t&1130486254,e=(4294967296*b.random()|0)+t&1284287105;return qE[255&i]+qE[i>>>8&255]+qE[i>>>16&255]+qE[i>>>24&255]+"-"+qE[255&n]+qE[n>>>8&255]+"-"+qE[n>>>16&15|64]+qE[n>>>24&255]+"-"+qE[63&r|128]+qE[r>>>8&255]+"-"+qE[r>>>16&255]+qE[r>>>24&255]+qE[255&e]+qE[e>>>8&255]+qE[e>>>16&255]+qE[e>>>24&255]}function jE(t){return Sa(t.replace(/-/g,""))}function QE(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=16*b.random()|0;return("x"===t?i:3&i|8).toString(16)})}function YE(){return Ui.Mg()}U(),Et(),U(),Et(),U(),Et();var KE,JE="theoplayer-session-id";function ZE(){if(!KE){var t=Bd.zy(JE);t?KE=t:(KE=GE(),Bd.Gy(JE,KE))}return KE}U(),Et(),U(),Et();var $E=/[^\x00-\x7E]/g;function tI(t){return"\\u"+Wo(t.charCodeAt(0).toString(16),4,"0")}var iI="https://license.theoplayer.com";function nI(t){var i=function(t){var i=[];return function(t,i,n){return JSON.stringify(t,i,n).replace($E,tI)}(t,function(t,n){if(Wi(n)){if(-1!==i.indexOf(n))return null;i.push(n)}return n})}(function(t){return[t.cQ,t.fS,t.yj,t.ED,t.dQ,t.lQ,t.fQ.map(zE)]}(t));return fE.vj.lj(i)}var rI=function(){function t(t,i,n,r,e,s){var u=this;void 0===r&&(r=fE.bh),void 0===e&&(e=0),void 0===s&&(s=1),this.XA=void 0,this.aV=void 0,this.mQ=void 0,this.AQ=void 0,this.TQ=void 0,this.CQ=void 0,this.Zf=void 0,this._Q=void 0,this.DQ=void 0,this.IQ=void 0,this.AA=void 0,this.BQ=void 0,this.MQ=void 0,this.NQ=void 0,this.XA=t,this.aV=i,this.mQ=n,this.AQ=r,this.TQ=e,this.CQ=s,this.Zf=[],this._Q=null,this.DQ=0,this.IQ="unknown",this.AA=0,this.MQ=function(){YE()-u.DQ>6e4&&u.EQ()},this.NQ=function(){u.EQ(!0)},f.addEventListener("beforeunload",this.NQ),this.BQ=_(this.MQ,6e4)}var i=t.prototype;return i.vQ=function(){return Boolean(this.dQ)},i.gQ=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.mQ.pQ()];case 1:return n.sent().Ij?(i={aQ:WE.nQ,uQ:ae(),rC:t},[4,this.hX(i)]):[2];case 2:return n.sent(),[2]}})}).call(this)},i.wQ=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.mQ.pQ()];case 1:return n.sent().Ij?(i={aQ:WE.oQ,uQ:ae(),Km:t},[4,this.hX(i)]):[2];case 2:return n.sent(),[2]}})}).call(this)},i.yQ=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return n={aQ:WE.rQ,uQ:ae(),zx:i,lt:t},[4,this.hX(n)];case 1:return r.sent(),[2]}})}).call(this)},i.bQ=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return i={aQ:WE.hQ,uQ:ae(),lt:t},[4,this.hX(i)];case 1:return n.sent(),[2]}})}).call(this)},i.hX=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.mQ.pQ()];case 1:return i=n.sent(),"a:n[_O*[C4C-N$_@_MYY $D]iOp]N$_-_]th_:c|aen?C:pH"===this.AQ.lj(i.yj)&&t.aQ!==WE.hQ?[2]:(t.aQ===WE.nQ?this.SQ():this.vQ()||this.SQ(),t.zB=this.AA++,this.Zf.push(t),function(t){return t===WE.nQ||t===WE.hQ}(t.aQ)?[4,this.EQ()]:[3,3]);case 2:case 4:return n.sent(),[3,5];case 3:return this.Zf.length>this.TQ?[4,this.kQ()]:[3,5];case 5:return[2]}})}).call(this)},i.EQ=function(t){return void 0===t&&(t=!1),Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Zf.length>0?[4,this.kQ(t)]:[3,2];case 1:return i.sent(),[3,0];case 2:return[2]}})}).call(this)},i.xQ=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.mQ.pQ()];case 1:return i=n.sent(),[2,{cQ:ae(),fS:ZE(),yj:this.AQ.lj(i.yj)||"dev",ED:this.XA,dQ:this._Q,lQ:this.IQ,fQ:t}]}})}).call(this)},i.kQ=function(t){return void 0===t&&(t=!1),Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=this.Zf.splice(0,this.CQ),[4,this.xQ(i)];case 1:return n=r.sent(),t?this.Jk(n):this.RQ(n),this.DQ=YE(),[2]}})}).call(this)},i.RQ=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=nI(t),n=new Al({Yu:iI,XT:i,Xk:!1,fk:Ud.LT,_k:{"Content-Type":fk.NH},Wk:4e3,Hk:ml.POST}),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this.aV.vk(n)];case 2:return[4,r.sent().qT()];case 3:return r.sent(),[3,5];case 4:return r.sent(),(new Image).src="https://licensing.theoplayer.com/t?"+i,[3,5];case 5:return[2]}})}).call(this)},i.Jk=function(t){var i=nI(t);this.aV.Jk({Yu:iI,XT:i,GT:fk.NH})},i.SQ=function(){this.vQ()&&this.EQ(),this._Q=GE(),this.AA=0},i.kn=function(){f.removeEventListener("beforeunload",this.NQ),m(this.BQ),this.EQ()},Nt(t,[{key:"fQ",get:function(){return this.Zf}},{key:"dQ",get:function(){return this._Q}}]),t}();U(),Et(),xt(),H(),U(),Et(),U(),Et();var eI=0;var sI=g,uI=self.requestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame,oI=self.cancelAnimationFrame||self.webkitCancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelRequestAnimationFrame;uI&&oI||(uI=function(t){var i=YE(),n=b.max(0,16-(i-eI)),r=w(function(){return t(i+n)},n);return eI=i+n,r},oI=sI),uI=uI.bind(self),oI=oI.bind(self);var hI=Bi.L_||Bi.ru&&Bi.Q_<13;function aI(t,i,n){var r=t.getImageData(i,n,1,1).data;return 0===r[0]&&0===r[1]&&0===r[2]&&0===r[3]}var cI=function(){function t(t){var i=this;this.t=void 0,this.VQ=void 0,this.hu=void 0,this.KQ=void 0,this.zQ=Zu(),this.WQ=1,this.QQ=!0,this.JQ=function(){i.QQ=!0},this.YQ=function(){i.VQ=i.t.zP(),i.zQ.forEach(function(t,n){t.XQ(),t.XQ=i.qQ(t.GQ,n)})},this.t=t,this.t.wn(eh.Lw,this.YQ),this.t.wn(eh.Zw,this.JQ),this.YQ()}var i=t.prototype;return i.LQ=function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r=Dy.GL},i.HQ=function(t){var i=this.KQ;void 0===i&&(i=v.createElement("canvas"),this.KQ=i);var n=i.getContext("2d"),r=this.t,e=r.MP,s=r.DP,u=i.width,o=i.height;n.clearRect(0,0,i.width,i.height),u===e&&o===s||(i.width=e,i.height=s),n.drawImage(t,0,0,e,s);var h=!1;return e>0&&aI(n,e-1,0)&&(i.width=u,h=!0),s>0&&aI(n,0,s-1)&&(i.height=o,h=!0),h&&n.drawImage(t,0,0,e,s),i},i.kn=function(){this.zQ.forEach(function(t){return t.XQ()}),this.zQ.clear(),this.t.mn(eh.Lw,this.YQ),this.t.mn(eh.Zw,this.JQ),this.VQ=void 0,this.KQ=void 0},Nt(t,[{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{drawImage:function(i){for(var n=arguments.length,r=new Array(n>1?n-1:0),e=1;e0){var i=t[t.length-1].contentRect;r.$Q=i.width,r.ZQ=i.height,r.GQ(r.$Q,r.ZQ)}},r.tK=new f.ResizeObserver(r.iK),r.tK.observe(r.xe),r}return Ct(i,t),i.prototype.kn=function(){this.tK.disconnect()},Nt(i,[{key:"Iu",get:function(){return this.ZQ}},{key:"Eu",get:function(){return this.$Q}}]),i}(lI);U(),Et(),xt(),Pt(),U(),Et(),Ft();var gI=["Webkit","Moz","O","ms"],_I=function(){var t=!1;try{if(void 0!==f&&"function"==typeof f.addEventListener){var i=k.defineProperty({},"passive",{get:function(){t=!0}});f.addEventListener("testPassiveEventSupport",dn,i),f.removeEventListener("testPassiveEventSupport",dn,i)}}catch(t){}return t}(),mI=Ju();function yI(t){return mI.has(t)||mI.set(t,function(t){var i=(dI||(dI=f&&f.document&&f.document.createElement("span")),dI);if(!i||!i.style)return t;if(void 0!==i.style[t])return t;for(var n,r=t.charAt(0).toUpperCase()+t.slice(1),e=Lt(gI);!(n=e()).done;){var s=n.value+r;if(void 0!==i.style[s])return s}return t}(t)),mI.get(t)}function pI(t){var i=t.style;i.position="absolute",i.left="0",i.right="0",i.bottom="0",i.top="0",i.overflow="scroll",i.zIndex="-1",i.visibility="hidden"}function kI(t){var i=t.style;i.position="absolute",i.left="0",i.top="0",i[yI("transition")]="0s"}var bI=function(t){function i(i,n,r){var e;(e=t.call(this,i,n)||this).hK=void 0,e.eK=0,e.$Q=NaN,e.ZQ=NaN,e.sK=void 0,e.aK=void 0,e.rK=void 0,e.uK=void 0,e.cK=void 0,e.hr=function(){var t=1e5;e.aK.style.width=t+"px",e.aK.style.height=t+"px",e.sK.scrollLeft=t,e.sK.scrollTop=t,e.rK.scrollLeft=t,e.rK.scrollTop=t,0===e.rK.scrollTop&&uI(e.hr)},e.dK=function(){var t=e.Eu,i=e.Iu;e.GQ(t,i),e.$Q=t,e.ZQ=i,e.hr(),e.eK=0},e.nK=function(){if(!e.eK){var t=e.Eu,i=e.Iu;t===e.$Q&&i===e.ZQ||(e.eK=uI(e.dK))}},e.oK=function(){e.cK||(e.cK=w(e.lK,66))},e.lK=function(){e.cK=void 0,e.fK()},e.fK=function(){e.nK()};var s=function(t,i){return f.getComputedStyle(t,void 0).getPropertyValue(i)||t.style[i]}(i,"position");r||"static"!==s||(i.style.position="relative");var u=v.createElement("div");return e.hK=u,e.sK=v.createElement("div"),e.aK=v.createElement("div"),e.rK=v.createElement("div"),e.uK=v.createElement("div"),pI(e.sK),pI(e.rK),kI(e.aK),function(t){kI(t),t.style.width="200%",t.style.height="200%"}(e.uK),u.appendChild(e.sK),u.appendChild(e.rK),e.sK.appendChild(e.aK),e.rK.appendChild(e.uK),i.appendChild(u),e.sK.addEventListener("scroll",e.nK),e.rK.addEventListener("scroll",e.nK),f&&f.addEventListener("resize",e.oK),e.nK(),e}return Ct(i,t),i.prototype.kn=function(){oI(this.eK),this.eK=0,this.sK.removeEventListener("scroll",this.nK),this.rK.removeEventListener("scroll",this.nK),Zi(this.hK),f&&f.removeEventListener("resize",this.oK)},Nt(i,[{key:"Iu",get:function(){return this.xe.getBoundingClientRect().height||this.ZQ||0}},{key:"Eu",get:function(){return this.xe.getBoundingClientRect().width||this.$Q||0}}]),i}(lI),AI=function(t){function i(i){var n;return(n=t.call(this)||this).xe=void 0,n.tK=void 0,n.iK=function(t,i){n.So(new vI(t,i))},n.xe=i,n}Ct(i,t);var n=i.prototype;return n._n=function(t){this.tK||("function"==typeof f.ResizeObserver?this.tK=new wI(this.xe,this.iK):this.tK=new bI(this.xe,this.iK,t))},n.kn=function(){this.Vo(),this.tK&&(this.tK.kn(),this.tK=void 0)},Nt(i,[{key:"Iu",get:function(){return this.tK?this.tK.Iu:0}},{key:"Eu",get:function(){return this.tK?this.tK.Eu:0}}]),i}(th);U(),Et(),xt(),Pt(),Ft(),U(),Et(),Pt();var TI=function(t){function i(){return t.call(this,ZT.pa)||this}return Ct(i,t),i}(rh);U(),Et(),Ft();var SI=function(){if(v)for(var t,i=Lt([["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]]);!(t=i()).done;){var n=t.value;if(n[1]in v)return{vK:n[0],sa:n[1],_K:n[2],gK:n[3],Ze:n[4],pK:n[5]}}}();U(),Et(),Pt();var EI=function(t){function i(){return t.call(this,ZT.ka)||this}return Ct(i,t),i}(rh),II=function(t){function i(n){var r;return(r=t.call(this)||this).xe=void 0,r.ca=void 0,r.ds=!1,r.mK=function(){return r.yK()},r.wK=function(){return r.bK()},r.xe=n,r.ca=i.la(n),v.addEventListener(SI.Ze,r.mK),r.yK(),r}Ct(i,t);var n=i.prototype;return n.yo=function(){var t=this.xe[SI.vK]();t&&t.then?t.then(this.mK,this.wK):(v.removeEventListener(SI.pK,this.wK),v.addEventListener(SI.pK,this.wK))},n.jo=function(){var t=v[SI.sa]();t&&t.then?t.then(this.mK,this.wK):(v.removeEventListener(SI.pK,this.wK),v.addEventListener(SI.pK,this.wK))},n.yK=function(){var t=this.ds,i=this.xe===v[SI._K];this.ds=i,t!==i&&this.So(new TI)},n.bK=function(){this.So(new $T)},n.kn=function(){this.Vo(),v.removeEventListener(SI.Ze,this.mK),v.removeEventListener(SI.pK,this.wK)},i.la=function(t){return Boolean(SI&&v[SI.gK]&&SI.vK in t)},i}(th),RI=function(t){function i(n){var r;return(r=t.call(this)||this).xe=void 0,r.ca=void 0,r.ds=!1,r.mK=function(){return r.yK()},r.xe=n,r.ca=i.la(n),r.xe.addEventListener("webkitbeginfullscreen",r.mK),r.xe.addEventListener("webkitendfullscreen",r.mK),r.xe.addEventListener("webkitpresentationmodechanged",r.mK),r.yK(),r}Ct(i,t);var n=i.prototype;return n.yo=function(){var t=this;this.xe.webkitSupportsPresentationMode&&this.xe.webkitSupportsPresentationMode("fullscreen")?Bi.ru?requestAnimationFrame(function(){return t.xe.webkitSetPresentationMode("fullscreen")}):this.xe.webkitSetPresentationMode("fullscreen"):this.xe.webkitEnterFullscreen()},n.jo=function(){this.xe.webkitSupportsPresentationMode&&this.xe.webkitSupportsPresentationMode("inline")?this.xe.webkitSetPresentationMode("inline"):this.xe.webkitExitFullscreen()},n.yK=function(){var t,i=this.ds;t=this.xe.webkitPresentationMode?"fullscreen"===this.xe.webkitPresentationMode:Boolean(this.xe.webkitDisplayingFullscreen),this.ds=t,i!==t&&this.So(new TI)},n.kn=function(){this.Vo(),this.xe.removeEventListener("webkitbeginfullscreen",this.mK),this.xe.removeEventListener("webkitendfullscreen",this.mK),this.xe.removeEventListener("webkitpresentationmodechanged",this.mK)},i.la=function(t){return Bi.ru&&("webkitEnterFullscreen"in t||"webkitSupportsPresentationMode"in t)},i}(th),CI=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).TK=[],i.AK=void 0,i.SK=!1,i.yK=function(){var t=i.SK,n=i.PK();t!==n&&(i.SK=n,i.So(new TI))},i}Ct(i,t);var n=i.prototype;return n.yo=function(){this.AK?this.AK.yo():this.So(new $T)},n.jo=function(){for(var t,i=Lt(this.TK);!(t=i()).done;){var n=t.value;n.ds&&n.jo()}},n.kK=function(t){this.AK=t},n.EK=function(t){this.TK.push(t),t.wn(ZT.pa,this.yK),t.wn(ZT.ma,this.Rs),this.yK()},n.xK=function(t){Xn(this.TK,t),t.mn(ZT.pa,this.yK),t.mn(ZT.ma,this.Rs)},n.PK=function(){for(var t,i=Lt(this.TK);!(t=i()).done;){if(t.value.ds)return!0}return!1},n.hr=function(){this.AK=void 0,this.SK=!1;for(var t,i=Lt(this.TK.slice());!(t=i()).done;){var n=t.value;this.xK(n),n.kn()}this.yK()},n.kn=function(){this.Vo(),this.hr()},Nt(i,[{key:"ca",get:function(){return!!this.AK&&this.AK.ca}},{key:"ds",get:function(){return this.SK}}]),i}(th),PI=function(t){function i(i,n){var r;return(r=t.call(this)||this).t=void 0,r.IK=void 0,r.CK=void 0,r.ga=!1,r.NK=function(){return r.er()},r.yK=function(t){r.ga||r.So(t)},r.t=i,r.IK=n,r.CK=new tS,r.RK(),r.t.wn(eh.Bw,r.NK),r.er(),r}Ct(i,t);var n=i.prototype;return n.yo=function(){this.IK&&this.CK.yo()},n.jo=function(){this.CK.jo()},n.RK=function(){this.CK.wn([ZT.pa,ZT.ka],this.yK),this.CK.wn(ZT.ma,this.Rs)},n.DK=function(){this.CK.mn([ZT.pa,ZT.ka],this.yK),this.CK.mn(ZT.ma,this.Rs)},n.er=function(){var t=this.CK,i=this.t.qP();if(t!==i){this.ga=!0;var n=this.ds,r=this.ca;n&&this.jo(),this.DK(),this.CK=i,this.RK(),n&&!this.ds&&this.ca?this.yo():this.jo(),this.ga=!1,r!==this.ca&&this.So(new EI),n!==this.ds&&this.So(new TI)}},n.kn=function(){this.Vo(),this.DK(),this.t.mn(eh.Bw,this.NK)},Nt(i,[{key:"ca",get:function(){return!!this.IK&&this.CK.ca}},{key:"ds",get:function(){return this.CK.ds}}]),i}(th);U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et(),Pt(),U(),Et();var DI=function(t){return t.MODE_CHANGE="presentationmodechange",t.ERROR="error",t}({}),NI=function(t){function i(i){var n;return(n=t.call(this,DI.MODE_CHANGE)||this).presentationMode=void 0,n.presentationMode=i,n}return Ct(i,t),i}(rh);U(),Et(),U(),Et(),Pt(),Ft();var xI=function(t){function i(i,n){var r;return void 0===n&&(n=!1),(r=t.call(this,i)||this).MK=[],r.UK=void 0,r.FK=function(t){pr(function(){r.Rs(t)})},r.UK=n?r.FK:r.Rs,r}Ct(i,t);var n=i.prototype;return n.au=function(t){t.lw(this.UK),this.MK.push(t)},n.LK=function(t){t.mw(this.UK),Xn(this.MK,t)},n.kn=function(){this.Vo();for(var t,i=Lt(this.MK);!(t=i()).done;){t.value.mw(this.UK)}Yn(this.MK)},i}(nh);U(),Et(),xt(),Pt();var BI=function(t){function i(i){var n;return(n=t.call(this,DI.ERROR)||this).errorObject=void 0,n.errorObject=i,n}return Ct(i,t),i.prototype.xa=function(){return this},Nt(i,[{key:"error",get:function(){return this.errorObject.message}}]),i}(Aw);U(),Et(),Pt();var OI=function(t){function i(i,n,r){return t.call(this,i,n,r)||this}return Ct(i,t),i}(ld),MI=function(t){function i(i,n){var r;return(r=t.call(this)||this).Yo=kT.INLINE,r.ra=!1,r.ha=void 0,r.ea=void 0,r.ta=new bd,r.hu=void 0,r.yK=function(){r._i()},r.bK=function(){r.ra||(r.So(new yb(new ld(vd.FULLSCREEN_ERROR,"Failed to enter fullscreen."))),r._i())},r.zK=function(){r.ra||(r.Yo!==kT.NATIVE_PICTURE_IN_PICTURE||r.ea.YL?r.Yo!==kT.NATIVE_PICTURE_IN_PICTURE&&r.ea.YL&&r.Jo(kT.NATIVE_PICTURE_IN_PICTURE):r.Jo(kT.INLINE))},r.GK=function(){r.ra||(r.So(new BI(new OI(vd.PICTURE_IN_PICTURE_ERROR,"Unexpected native picture-in-picture error."))),r.zK())},r.ha=i,r.ea=n,r.ha.wn(ZT.pa,r.yK),r.ha.wn(ZT.ma,r.bK),r.ea.wn(NT.QL,r.zK),r.ea.wn(NT.KL,r.zK),r.ea.wn(NT.ma,r.GK),r}Ct(i,t);var n=i.prototype;return n.xa=function(){return function(t){var i,n={get currentMode(){return t.Wo()},requestMode:function(i){var n=RT(i);n&&t.Jo(n)},supportsMode:function(i){var n=RT(i);return!!n&&t.Xo(n)},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return(i=new xI(n,!0)).au(t),n}(this)},n.Jo=function(t){this.Yo!==t&&(this.Yo=t,this.ra=!0,this.Ko(t))},n.Wo=function(){return this.Yo},n.Xo=function(t){switch(t){case kT.NATIVE_PICTURE_IN_PICTURE:return this.ea.JL;case kT.FULLSCREEN:return this.ha.ca;case kT.INLINE:return!0}return!1},n.Ko=function(t){var i=this;switch(this.ta.Zg(),t){case kT.FULLSCREEN:kr(this.ta.Zo(function(t){return i.VK(t)}));break;case kT.NATIVE_PICTURE_IN_PICTURE:kr(this.ta.Zo(function(t){return i.HK(t)}));break;case kT.INLINE:kr(this.ta.Zo(function(t){return i.WK(t)}))}},n.VK=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return dr(t),[4,this.ea.jo().catch(dn)];case 1:n.sent(),dr(t),n.label=2;case 2:return n.trys.push([2,4,5,6]),[4,this.qK()];case 3:return n.sent(),this.So(new NI(this.Yo)),[3,6];case 4:throw n.sent(),i=new OI(vd.FULLSCREEN_ERROR,"Failed to enter fullscreen."),this.So(new BI(i)),dr(t),this.Jo(kT.INLINE),i;case 5:return this.ra=!1,[7];case 6:return[2]}})}).call(this)},n.HK=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return dr(t),[4,this.sa().catch(dn)];case 1:n.sent(),dr(t),n.label=2;case 2:return n.trys.push([2,4,5,6]),[4,this.ea.yo()];case 3:return n.sent(),this.So(new NI(this.Yo)),[3,6];case 4:throw n.sent(),i=new OI(vd.PICTURE_IN_PICTURE_ERROR,"Failed to enter native picture-in-picture."),this.So(new BI(i)),dr(t),this.Jo(kT.INLINE),i;case 5:return this.ra=!1,[7];case 6:return[2]}})}).call(this)},n.WK=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return dr(t),[4,this.sa().catch(dn)];case 1:return i.sent(),dr(t),[4,this.ea.jo().catch(dn)];case 2:return i.sent(),this.So(new NI(this.Yo)),this.ra=!1,[2]}})}).call(this)},n.qK=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.ha.ds?[2]:(t=this.ha.ww([ZT.pa,ZT.ma]),this.ha.yo(),[4,t]);case 1:if(i.sent(),!this.ha.ds)throw new y("Failed to enter fullscreen.");return[2]}})}).call(this)},n.sa=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.ha.ds?(t=this.ha.ww([ZT.pa,ZT.ma]),this.ha.jo(),[4,t]):[2];case 1:if(i.sent(),this.ha.ds)throw new y("Failed to exit fullscreen.");return[2]}})}).call(this)},n._i=function(){this.ra||(this.Yo!==kT.FULLSCREEN||this.ha.ds?this.Yo!==kT.FULLSCREEN&&this.ha.ds&&this.Jo(kT.FULLSCREEN):this.Jo(kT.INLINE))},n.kn=function(){this.ha.mn(ZT.pa,this.yK),this.ha.mn(ZT.ma,this.bK),this.ea.mn(NT.QL,this.zK),this.ea.mn(NT.KL,this.zK),this.ea.mn(NT.ma,this.GK),this.Vo()},Nt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}}]),i}(nh);U(),Et(),Wt(),Qt();var LI=function(){function t(t){this.Bz=void 0,this.jK=void 0,this.Bz=t,this.jK=new bd}var i=t.prototype;return i.XK=function(t){var i=this;return this.jK.Zo(function(){return i.QK(t)})},i.GP=function(){this.Bz.Nz()},i.QK=function(i){return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return n=this.Bz.Yq(eg.Mk),r=n.hq,[4,t.KK(r,i)];case 1:return e=s.sent(),[4,this.Bz.Dq(n)];case 2:return s.sent(),[2,e]}})}).call(this)},i.kn=function(){this.jK.kn()},t.KK=function(i,n){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return Bi.S_||Bi.w_?[2,"all"]:(i.src||(i.src="data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),[4,t.YK()]);case 1:return e.sent(),(r=!n)?[4,t.JK(i,!1)]:[3,3];case 2:r=e.sent(),e.label=3;case 3:return r?[2,"all"]:[4,t.JK(i,!0)];case 4:return e.sent()?[2,"muted"]:[2,"none"]}})})()},t.JK=function(t,i){return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:t.muted=i,n=t.play(),e.label=1;case 1:return e.trys.push([1,3,4,5]),Gi(n)?(r=Ar(250),[4,ut.race([n,r])]):[2,!Bi.Ks];case 2:return e.sent(),[2,!0];case 3:return e.sent(),[2,!1];case 4:return t.pause(),t.muted=!0,[7];case 5:return[2]}})})()},t.YK=function(){return new ut(function(t){if("function"==typeof MessageChannel){var i=new MessageChannel;i.port1.onmessage=function(){return t()},i.port2.postMessage("")}else w(t,0)})},t}(),FI=LI;function UI(t){FI=t}function VI(t){var i;return{get url(){return t.Yu},get method(){return t.Hk},get headers(){return i||(i=t._k.OT()),i},get body(){return t.XT},get useCredentials(){return t.Xk},get type(){return t.Km},get subType(){return t.zk},get mediaType(){return t.Gk},get responseType(){return t.fk}}}function HI(t){switch(t.toLowerCase()){case"arraybuffer":return Ud.NT;case"json":return Ud.BT;case"stream":return Ud.MT;default:return Ud.LT}}function WI(t){switch(t.toUpperCase()){case"POST":return ml.POST;case"PUT":return ml.PUT;case"DELETE":return ml.DELETE;case"HEAD":return ml.HEAD;case"OPTIONS":return ml.OPTIONS;default:return ml.GET}}function zI(t){switch(t.toLowerCase()){case"manifest":return yl.bk;case"segment":return yl.Ak;case"preload-hint":return yl.Sk;case"content-protection":return yl.Tk;default:return yl.yk}}function XI(t){switch(t.toLowerCase()){case"initialization-segment":return pl.Ek;case"fairplay-license":return pl.xk;case"fairplay-certificate":return pl.Pk;case"widevine-license":return pl.Ik;case"widevine-certificate":return pl.Ck;case"playready-license":return pl.Rk;case"clearkey-license":return pl.Dk;case"aes128-key":return pl.Nk;default:return pl.yk}}function qI(t){switch(t.toLowerCase()){case"audio":return kl.Bk;case"video":return kl.Mk;case"text":return kl.LT;case"image":return kl.Lk;default:return kl.yk}}U(),Et(),Wt(),Pt(),H(),Ft(),Qt(),U(),Et(),xt(),Pt(),U(),Et(),U(),Et(),Wt(),xt(),Qt();var GI=function(){function t(t,i){this.vY=void 0,this.dY=void 0,this.$K=void 0,this.oY=void 0,this.hu=void 0,this.eY=void 0,this.cE=void 0,this.rY=void 0,this.vY=t,this.dY=i,this.$K=new Va,this.oY=[],this.hu=void 0,this.eY=!1,this.cE=void 0,this.rY=0}var i=t.prototype;return i.vD=function(){this.eY=!0,this.$K.Qy(null)},i.hY=function(){this.$K.Ky(new Xd(this.oY))},i.aY=function(t){if(!this.sY)throw new p("Cannot respond more than once");if(!Wi(t))throw new p("Expected valid response");this.cE=this.uY(t),this.vD()},i.cY=function(){try{var t=this.dY(this.Ca);t?this.lY(t):this.nY||this.iY||this.vD()}catch(t){this.oY.push(t),this.hY()}},i.lY=function(t){if(this.iY)throw new y("Request has been redirected or a response already exists");if(Gi(t))this.fY(t);else{if("function"!=typeof t)throw new p("Expected promise or function");var i=new Va;try{var n=t(function(t){t?i.Ky(t):i.Qy(void 0)});Gi(n)&&i.$g(n)}catch(t){i.Ky(t)}this.fY(i.Yy)}},i.fY=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.rY++,[4,t];case 1:return n.sent(),this.rY--,this.nY||this.iY||(this.oY.length?this.hY():this.vD()),[3,3];case 2:return i=n.sent(),this.rY--,this.oY.push(i),this.nY||this.iY||this.hY(),[3,3];case 3:return[2]}})}).call(this)},Nt(t,[{key:"ZK",get:function(){return this.$K.Yy}},{key:"Ca",get:function(){return this.hu||(this.hu=this.tY()),this.hu}},{key:"iY",get:function(){return this.eY}},{key:"sY",get:function(){return!this.eY}},{key:"nY",get:function(){return this.rY>0}},{key:"uE",get:function(){return this.cE}}]),t}(),jI=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this)._Y=void 0,e._Y=r,e.cY(),e}Ct(i,t);var n=i.prototype;return n.tY=function(){return function(t){var i,n=VI(t.vk);return{get closed(){return!t.sY},get request(){return n},get url(){return t.Yu},get status(){return t.dk},get statusText(){return t.gk},get headers(){return i||(i=t._k.OT()),i},get body(){return t.XT},respondWith:function(i){return t.aY(i)},waitUntil:function(i){return t.lY(i)}}}(this)},n.uY=function(t){return i.gY(t,this.vY,this._Y)},i.gY=function(t,i,n){var r=void 0===t.body?n:t.body;return new _l({lk:r,vk:i.vk,fk:i.vk.fk,_k:t.headers,dk:t.status,gk:t.statusText,wk:t.url,pk:!0},i)},Nt(i,[{key:"XT",get:function(){return this._Y}},{key:"_k",get:function(){return this.vY._k}},{key:"vk",get:function(){return this.vY.vk}},{key:"uE",get:function(){return this.cE}},{key:"dk",get:function(){return this.vY.dk}},{key:"gk",get:function(){return this.vY.gk}},{key:"Yu",get:function(){return this.vY.wk}}]),i}(GI);U(),Et(),xt(),Pt();var QI=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).wY=void 0,e.pY=void 0,e.pY=r,e.cY(),e}Ct(i,t);var n=i.prototype;return n.tY=function(){return function(t){var i;return{get url(){return t.Yu},get method(){return t.Hk},get headers(){return i||(i=t._k.OT()),i},get body(){return t.XT},get closed(){return!t.sY},get useCredentials(){return t.Xk},get type(){return t.Km},get subType(){return t.zk},get mediaType(){return t.Gk},get responseType(){return t.fk},redirect:function(i){return t.yY(i)},respondWith:function(i){return t.aY(i)},waitUntil:function(i){return t.lY(i)}}}(this)},n.uY=function(t){var i=this.vY.XT,n=new _l({lk:i,_k:{},vk:this.vY,wk:this.vY.Yu,fk:this.vY.fk,dk:200,gk:"OK"});return jI.gY(t,n,i)},n.yY=function(t){if(!this.sY)throw new p("Cannot redirect, already redirected or has a response");var i;i=Xi(t)?{url:t}:t,this.wY=function(t,i){return new Al({Yu:void 0===t.url?i.Yu:t.url,Hk:void 0!==t.method?WI(t.method):void 0,_k:t.headers,XT:t.body,Xk:t.useCredentials,Km:void 0!==t.type?zI(t.type):void 0,zk:void 0!==t.subType?XI(t.subType):void 0,Gk:void 0!==t.mediaType?qI(t.mediaType):void 0,fk:void 0!==t.responseType?HI(t.responseType):void 0},i)}(i,this.vY),this.vD()},Nt(i,[{key:"XT",get:function(){return this.vY.XT}},{key:"sY",get:function(){return this.pY&&!this.eY}},{key:"_k",get:function(){return this.vY._k}},{key:"Hk",get:function(){return this.vY.Hk}},{key:"mY",get:function(){return this.wY}},{key:"uE",get:function(){return this.cE}},{key:"fk",get:function(){return this.vY.fk}},{key:"Wk",get:function(){return this.vY.Wk}},{key:"qk",get:function(){return this.vY.qk}},{key:"Yg",get:function(){return this.vY.Yg}},{key:"Km",get:function(){return this.vY.Km}},{key:"zk",get:function(){return this.vY.zk}},{key:"Gk",get:function(){return this.vY.Gk}},{key:"Yu",get:function(){return this.vY.Yu}},{key:"Xk",get:function(){return this.vY.Xk}},{key:"Kk",get:function(){return this.vY.Kk}},{key:"jk",get:function(){return this.vY.jk}},{key:"Qk",get:function(){return this.vY.Qk}},{key:"Yk",get:function(){return this.vY.Yk}}]),i}(GI);var YI=function(t){function i(i,n){var r;void 0===n&&(n=!0);var e=new KI(i);return(r=t.call(this,e,n)||this).AY=void 0,r.AY=e,r}Ct(i,t);var n=i.prototype;return n.bY=function(t){this.AY.bY(t)},n.SY=function(t){this.AY.SY(t)},n.TY=function(t){this.AY.TY(t)},n.dX=function(t){this.AY.dX(t)},n._X=function(t){this.AY._X(t)},i}(Sl),KI=function(){function t(t){this.iE=void 0,this.PY=[],this.IY=[],this.iE=t}var i=t.prototype;return i.vk=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,5]),[4,this.kY(t,t.Yg)];case 1:return i=r.sent(),[3,5];case 2:return V(n=r.sent(),xl)?[4,this.EY(n,t.Yg)]:[3,4];case 3:return[2,r.sent()];case 4:throw n;case 5:return[4,this.xY(i,t.Yg)];case 6:if(gl(i=r.sent()))return[2,i];throw new Ol(i)}})}).call(this)},i.Jk=function(t){return this.iE.Jk(t)},i.kY=function(t,i){return Vt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:dr(i),n=t,e=Lt(this.PY.slice()),h.label=1;case 1:if((s=e()).done)return[3,7];if(u=s.value,dr(i),(o=new QI(n,u,!r)).iY)return[3,5];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,o.ZK];case 3:return h.sent(),[3,5];case 4:return h.sent(),[3,6];case 5:o.mY&&!r?n=o.mY:o.uE&&!r&&(r=o.uE),h.label=6;case 6:return[3,1];case 7:return r?[2,r]:[2,this.iE.vk(n)]}})}).call(this)},i.EY=function(t,i){return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return V(t,Ol)?n=t.uE:(r=t.vk,n=new _l({lk:null,vk:r,fk:r.fk,dk:0,gk:""})),[4,this.xY(n,i)];case 1:if((e=s.sent())===n)throw t;if(gl(e))return[2,e];throw new Ol(e)}})}).call(this)},i.xY=function(t,i){return Vt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:n=t,r=Lt(this.IY.slice()),h.label=1;case 1:return(e=r()).done?[3,8]:(s=e.value,dr(i),[4,ut.resolve(n.Fy().lk(i))]);case 2:if(u=h.sent(),(o=new jI(n,s,u)).iY)return[3,6];h.label=3;case 3:return h.trys.push([3,5,,6]),[4,o.ZK];case 4:return h.sent(),[3,6];case 5:return h.sent(),[3,7];case 6:n=o.uE||n,h.label=7;case 7:return[3,1];case 8:return[2,n]}})}).call(this)},i.bY=function(t){this.PY.unshift(t)},i.SY=function(t){this.PY.push(t)},i.TY=function(t){Xn(this.PY,t)},i.dX=function(t){this.IY.unshift(t)},i._X=function(t){Xn(this.IY,t)},i.kn=function(){this.iE.kn(),Yn(this.PY),Yn(this.IY)},t}();U(),Et(),xt(),Pt();var JI=function(){function t(t){this.aV=void 0,this.hu=void 0,this.aV=t}var i=t.prototype;return i.bY=function(t){this.aV.bY(t)},i.TY=function(t){this.aV.TY(t)},i.dX=function(t){this.aV.dX(t)},i._X=function(t){this.aV._X(t)},Nt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{addRequestInterceptor:function(i){t.bY(i)},removeRequestInterceptor:function(i){t.TY(i)},addResponseInterceptor:function(i){t.dX(i)},removeResponseInterceptor:function(i){t._X(i)}}}(this)),this.hu}}]),t}(),ZI=function(t){function i(i,n,r){var e;return(e=t.call(this,n)||this).LY=void 0,e.aV=void 0,e.Mz=void 0,e.hu=void 0,e.OY=void 0,e.FY=void 0,e.LY=i,e.aV=n,e.Mz=r,e.OY=function(t){e.So(t)},e.FY=function(t){e.So(t)},e.LY.wn(eh.Xw,e.OY),e.LY.wn(eh.Gw,e.FY),e}Ct(i,t);var n=i.prototype;return n.RY=function(t){this.Mz.RY(t)},n.bY=function(t){this.aV.bY(t)},n.TY=function(t){this.aV.TY(t)},n.dX=function(t){this.aV.dX(t)},n._X=function(t){this.aV._X(t)},n.kn=function(){this.Vo(),this.LY.mn(eh.Xw,this.OY),this.LY.mn(eh.Gw,this.FY)},Nt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{get online(){return t.cP},get estimator(){return function(t){return{get bandwidth(){return t.IW},get roundTripTime(){return t.RW}}}(t.CY)},setEstimator:function(i){t.RY(function(t){if(!t)return;return{get IW(){return qw(t.bandwidth)},get RW(){return qw(t.roundTripTime)},DW:function(i){return function(t){if(!t)return;return{DY:function(i){t.markRequestStart(i)},NY:function(i){t.markResponseStart(i)},BY:function(i,n){t.markResponseData(i,n)},MY:function(i){t.markResponseEnd(i)}}}(t.createMeasurer(VI(i)))}}}(i))},addRequestInterceptor:function(i){t.bY(i)},removeRequestInterceptor:function(i){t.TY(i)},addResponseInterceptor:function(i){t.dX(i)},removeResponseInterceptor:function(i){t._X(i)},addEventListener:function(i,n){t.wn(i,n)},removeEventListener:function(i,n){t.mn(i,n)}}}(this)),this.hu}},{key:"cP",get:function(){return this.LY.cP}},{key:"CY",get:function(){return this.Mz.CY}}]),i}(th);U(),Et(),xt(),Pt(),U(),Et(),U(),Et();var $I=function(t){return t.PERFORMANCE="performance",t.QUALITY="quality",t.BANDWIDTH="bandwidth",t}({});U(),Et(),H();function tR(t,i,n,r,e,s){var u=[],o=t-b.max(s,1),h=t+e;if(i&&n){var a=Tn(n,1,5),c=i-a;o=b.min(o,c);var f=i+n+a;h=b.max(h,f)}return 0!==o&&r.jM(0,o)&&u.push([0,o]),r.jM(h,1/0)&&u.push([h,1/0]),u}function iR(t){return V(t,y)&&"QuotaExceededError"===t.name}U(),Et();var nR={type:$I.BANDWIDTH};function rR(t){var i=Lw(nR);return Xi(t)?i.type=eR(t):Wi(t)&&function(t){switch(t){case $I.PERFORMANCE:case $I.QUALITY:case $I.BANDWIDTH:return!0;default:return!1}}(t.type)&&(i.type=eR(t.type)),Wi(t)&&Wi(t.metadata)&&(i.metadata=function(t){var i={},n=Xw(t.bitrate);return S(n)||(i.bitrate=n),i}(t.metadata)),i}function eR(t){switch(t){case"bandwidth":return $I.BANDWIDTH;case"performance":return $I.PERFORMANCE;case"quality":return $I.QUALITY}}U(),Et(),Pt();var sR=function(t){function i(i){var n;return(n=t.call(this,"UY")||this).VY=void 0,n.VY=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var uR=function(t){function i(i){var n;return(n=t.call(this,"HY")||this).WY=void 0,n.WY=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var oR=function(t){function i(i){var n;return(n=t.call(this,"qY")||this).zY=void 0,n.zY=i,n}return Ct(i,t),i}(rh),hR=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).hu=function(t){return{get strategy(){return function(t){return{metadata:t.metadata,type:t.type}}(t.WY)},set strategy(i){t.WY=rR(i)},get targetBuffer(){return t.VY},set targetBuffer(i){var n=Xw(i);S(n)||(t.VY=n)},get bufferLookbackWindow(){return t.zY},set bufferLookbackWindow(i){var n=Xw(i);S(n)||(t.zY=n<=0?30:n)},get maxBufferLength(){return t.$Y},get clearBufferWhenSettingTargetQuality(){return t.eJ},set clearBufferWhenSettingTargetQuality(i){t.eJ=Ww(i)}}}(i),i.QY=nR,i.KY=20,i.ZY=30,i.JY=1/0,i.sJ=!1,i.tJ=void 0,i.XY=void 0,i}Ct(i,t);var n=i.prototype;return n.GY=function(t){this.XY=t},n.RY=function(t){this.tJ=t},n.iJ=function(t){var i=b.min(t,.8*this.JY);if(i=b.max(10,i),this.JY===i)return!1;var n=this.YY;this.JY=i;var r=this.YY;return r!==n&&this.So(new sR(r)),!0},Nt(i,[{key:"jY",get:function(){switch(this.QY.type){case $I.PERFORMANCE:return 0;case $I.QUALITY:return 1/0;case $I.BANDWIDTH:return this.QY.metadata&&void 0!==this.QY.metadata.bitrate?this.QY.metadata.bitrate:bb.Bg.pW();default:return bb.Bg.pW()}}},{key:"Ca",get:function(){return this.hu}},{key:"WY",get:function(){return this.QY},set:function(t){this.QY=t,this.So(new uR(t))}},{key:"VY",get:function(){return this.KY},set:function(t){this.KY=t,this.So(new sR(t))}},{key:"YY",get:function(){return b.min(this.KY,this.JY)}},{key:"zY",get:function(){return this.ZY},set:function(t){this.ZY=t,this.So(new oR(t))}},{key:"$Y",get:function(){return this.JY}},{key:"CY",get:function(){var t;return null!=(t=this.tJ)?t:this.XY.dq}},{key:"eJ",get:function(){return this.sJ},set:function(t){this.sJ=t}}]),i}(th);U(),Et(),xt(),Pt(),U(),Et(),Pt();var aR=function(t){function i(){return t.call(this,"bI")||this}return Ct(i,t),i.prototype.xa=function(){return new cR},i}(Aw),cR=function(t){function i(){return t.call(this,"change")||this}return Ct(i,t),i}(rh);U(),Et(),U(),Et(),Pt(),Ft();var fR=function(t){function i(i,n,r){var e;(e=t.call(this,r)||this).nJ=void 0,e.Zf=void 0,e.rJ=function(t){Tw(t)&&pr(function(){e.So(t.Ca)})},e.nJ=i,e.Zf=n;for(var s,u=Lt(e.Zf);!(s=u()).done;){var o=s.value;e.nJ.wn(o,e.rJ)}return e}return Ct(i,t),i.prototype.kn=function(){this.Vo();for(var t,i=Lt(this.Zf);!(t=i()).done;){var n=t.value;this.nJ.mn(n,this.rJ)}},i}(th),vR=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).nJ=void 0,r.rJ=function(t){Tw(t)&&pr(function(){r.So(t.Ca)})},r.nJ=i,r.nJ.lw(r.rJ),r}return Ct(i,t),i.prototype.kn=function(){this.Vo(),this.nJ.mw(this.rJ)},i}(nh);var dR=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).HO=0,i.zO=1/0,i.hu=void 0,i}Ct(i,t);var n=i.prototype;return n.hr=function(){0===this.HO&&this.zO===1/0||(this.HO=0,this.zO=1/0,this.So(new aR))},n.hJ=function(){return new EA([this.CO,this.RO],[!0,!0])},Nt(i,[{key:"CO",get:function(){return this.HO},set:function(t){if(this.RO<=t)throw new y("Start time of a clip should be smaller than the end time.");this.HO!==t&&(this.HO=t,this.So(new aR))}},{key:"RO",get:function(){return this.zO},set:function(t){if(t<=this.CO)throw new y("End time of a clip should be larger than the start time.");this.zO!==t&&(this.zO=t,this.So(new aR))}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get startTime(){return t.CO},set startTime(i){t.CO=i},get endTime(){return t.RO},set endTime(i){t.RO=i},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new vR(t,n),n}(this)),this.hu}}]),i}(nh);U(),Et(),Wt(),xt(),Pt(),Qt();var lR=function(t){function i(n,r){var e;return(e=t.call(this,n)||this).oJ=void 0,e.uJ=!1,e.pJ=void 0,e.mJ=!1,e.lJ=function(){e.dJ(),e.aJ()},e.Nc=function(){e.fJ(),e.aJ(),e.gJ&&e.zx>=e.oJ.RO-i.wJ&&!e.Qx&&(e.pJ=uI(e.Nc))},e.vJ=function(){e.mJ=!0},e._J=function(){e.mJ&&(e.mJ=!1,e.aJ())},e.oJ=r,e.oJ.wn("bI",e.lJ),e.Lx.wn(eh.py,e.Nc),e}Ct(i,t);var n=i.prototype;return n.Xx=function(i,n){var r=this.oJ.hJ().LM(i);t.prototype.Xx.call(this,r,n),this.aJ()},n.Kx=function(){return t.prototype.Kx.call(this)||this.uJ},n.EP=function(){return EA.jn(t.prototype.EP.call(this)).Mn(this.oJ.hJ())._s()},n.QP=function(){this.Kx()?this.Xx(this.cJ.start(0)):this.dJ(),t.prototype.QP.call(this),this.aJ()},n.Ta=function(i,n){var r=this;return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return dr(n),this.uJ=!1,this.oJ.hr(),[4,t.prototype.Ta.call(r,i,n)];case 1:return e.sent(),[2]}})}).call(this)},n.kn=function(){return this.oJ.mn("bI",this.lJ),this.Lx.mn(eh.py,this.Nc),this.fJ(),t.prototype.kn.call(this)},n.eI=function(i){switch(i.type){case eh.$w:return this.So(i),this.vJ(),!0;case eh.Zw:case eh.Rw:return this.So(i),this._J(),!0;case eh.Nw:if(this.gJ)return!0}return t.prototype.eI.call(this,i)},n.fJ=function(){this.pJ&&(oI(this.pJ),this.pJ=void 0)},n.aJ=function(){var t=this.zx,n=this.gJ&&t>=this.oJ.RO-i.fd;this.uJ&&!n?(this.uJ=!1,this.lP&&this.QP()):this.uJ||!n||this.xP||this.mJ||(this.uJ=!0,this.So(new lT(t)),this.jP())},n.dJ=function(){if(this.ct!==1/0){var t=this.cJ,n=EA.jn(t).LM(this.zx);Sn(this.zx,n,i.fd)||this.Xx(n)}},Nt(i,[{key:"cJ",get:function(){return this.EP().length?this.EP():this.oJ.hJ()._s()}},{key:"gJ",get:function(){return this.oJ.RO=t},i.jJ=function(){var t=jb.zy(ER);if(t)return bR.UJ(t)},i.JJ=function(t,i){this.mQ.XJ(t),this.ZJ(i)},i.ZJ=function(t){throw ze(t.message),this.$J.bQ(t.message),t},t}();U(),Et(),Wt(),xt(),Qt();var RR=function(){function t(){this.tZ=void 0,this.iZ=new Va}var i=t.prototype;return i.XJ=function(t){this.tZ=t,this.iZ.Qy()},i.pQ=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.tZ?[2,ut.resolve(this.tZ)]:[4,this.iZ.Yy];case 1:return t.sent(),[2,this.tZ]}})}).call(this)},Nt(t,[{key:"eZ",get:function(){return this.tZ}}]),t}();U(),Et(),xt(),Pt(),U(),Et(),Pt();var CR=function(t){function i(){return t.call(this,"bI")||this}return Ct(i,t),i.prototype.xa=function(){return new PR},i}(Aw),PR=function(t){function i(){return t.call(this,"change")||this}return Ct(i,t),i}(rh);function DR(t){var i,n={get fontFamily(){return t.sZ},set fontFamily(i){t.sZ=i},get fontColor(){return t.nZ},set fontColor(i){t.nZ=i},get fontSize(){return t.rZ},set fontSize(i){t.rZ=i},get backgroundColor(){return t.hZ},set backgroundColor(i){t.hZ=i},get windowColor(){return t.oZ},set windowColor(i){t.oZ=i},get edgeStyle(){return t.aZ},set edgeStyle(i){t.aZ=i},get marginTop(){return t.uZ},set marginTop(i){t.uZ=i},get marginBottom(){return t.cZ},set marginBottom(i){t.cZ=i},get marginLeft(){return t.dZ},set marginLeft(i){t.dZ=i},get marginRight(){return t.lZ},set marginRight(i){t.lZ=i},addEventListener:function(t,n){var r=Qw(t,Gw);i.wn(r,n)},removeEventListener:function(t,n){var r=Qw(t,Gw);i.mn(r,n)}};return i=new ih(n),t.wn(["bI"],function(t){return i.So(t.Ca)}),n}U(),Et();var NR={sZ:void 0,nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0,aZ:void 0,uZ:void 0,cZ:void 0,dZ:void 0,lZ:void 0},xR="THEOplayer.textTrackStyle.",BR=function(t){function i(){var n;return(n=t.call(this)||this).vZ=void 0,n.hu=void 0,n.vZ=i.gZ(),n}Ct(i,t);var n=i.prototype;return n.hr=function(){this.er(NR)},n.er=function(t){this.vZ=Yu({},this.vZ,t),i._Z(this.vZ),this.So(new CR)},i.gZ=function(){var t=Yu({},NR);return t.sZ=jb.zy(xR+"fontFamily")||t.sZ,t.nZ=jb.zy(xR+"fontColor")||t.nZ,t.rZ=jb.zy(xR+"fontSize")||t.rZ,t.hZ=jb.zy(xR+"backgroundColor")||t.hZ,t.oZ=jb.zy(xR+"windowColor")||t.oZ,t.aZ=jb.zy(xR+"edgeStyle")||t.aZ,t},i._Z=function(t){jb.Gy(xR+"fontFamily",t.sZ||""),jb.Gy(xR+"fontColor",t.nZ||""),jb.Gy(xR+"fontSize",t.rZ||""),jb.Gy(xR+"backgroundColor",t.hZ||""),jb.Gy(xR+"windowColor",t.oZ||""),jb.Gy(xR+"edgeStyle",t.aZ||"")},Nt(i,[{key:"fZ",get:function(){return this.vZ}},{key:"sZ",get:function(){return this.vZ.sZ},set:function(t){this.er({sZ:t})}},{key:"nZ",get:function(){return this.vZ.nZ},set:function(t){this.er({nZ:t})}},{key:"rZ",get:function(){return this.vZ.rZ},set:function(t){this.er({rZ:t})}},{key:"hZ",get:function(){return this.vZ.hZ},set:function(t){this.er({hZ:t})}},{key:"oZ",get:function(){return this.vZ.oZ},set:function(t){this.er({oZ:t})}},{key:"aZ",get:function(){return this.vZ.aZ},set:function(t){this.er({aZ:t})}},{key:"uZ",get:function(){return this.vZ.uZ},set:function(t){this.er({uZ:t})}},{key:"cZ",get:function(){return this.vZ.cZ},set:function(t){this.er({cZ:t})}},{key:"lZ",get:function(){return this.vZ.lZ},set:function(t){this.er({lZ:t})}},{key:"dZ",get:function(){return this.vZ.dZ},set:function(t){this.er({dZ:t})}},{key:"Ca",get:function(){return this.hu||(this.hu=DR(this)),this.hu}}]),i}(th);function OR(t,i){var n,r;t.style.marginLeft=(null!=(n=i.dZ)?n:0)+"px",t.style.marginRight=(null!=(r=i.lZ)?r:0)+"px",t.style.width="calc(100% - "+t.style.marginLeft+" - "+t.style.marginRight+")"}function MR(t){return(null==t?void 0:t.Cd.Km)===Iy.SV}U(),Et(),Wt(),xt(),Ft(),Qt(),U(),Et(),xt(),Pt(),U(),Et(),Wt(),xt(),Pt(),H(),Ft(),Qt(),U(),Et(),U(),Et();var LR=[eh.uo,eh.jw,Ry.PM,eh.py,eh.Qw,eh.Ww,eh.$w,eh.Zw,eh.Nw,eh.Kw,eh.wy,eh.Cw,Ry.AI,eh.Jw,qm.ma,fh.Dw,fh.By,eh.xw,eh.Ew,eh.yy,eh.Ay,eh.LICENSE_REQUEST_GENERATED,eh.Fw,eh.Vw,eh.Lw,eh.Bw],FR={BL:!1};function UR(t){return void 0!==t.DP}function VR(t){return t.Cd.Km===Iy.SV}U(),Et();var HR=function(t){return t.pZ="mZ",t}({}),WR=["mZ"],zR=function(t){return t[t.wZ=0]="wZ",t[t.MT=1]="MT",t[t.yZ=2]="yZ",t}({});U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et(),Wt(),xt(),Pt(),H(),Ft(),Qt();var XR=["loadstart","encrypted","waitingforkey","webkitneedkey","msneedkey"],qR=function(t){return t.bZ="AZ",t.SZ="TZ",t.kZ="EZ",t}({}),GR=function(t){function i(i,n,r,e,s){var u;(u=t.call(this)||this).ZS=void 0,u.PL=void 0,u.pT=void 0,u.VZ=!1,u.HZ=new Va,u.CZ=!1,u.ta=new bd,u.DZ=void 0,u.hw=void 0,u.GJ=void 0,u.ES=void 0,u.MZ=function(){u.CZ=!0},u.LZ=function(){u.UZ(!0)},u.ZS=i,u.PL=n,u.pT=n.hq,u.DZ=r,u.hw=e,u.GJ=s,u.pT.addEventListener("loadedmetadata",u.MZ);for(var o,h=Lt(XR);!(o=h()).done;){var a=o.value;u.pT.addEventListener(a,u.LZ)}return u}Ct(i,t);var n=i.prototype;return n.xZ=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,this.hw.nw(t.Ym,i)];case 1:return[4,r.sent().RS()];case 2:return n=r.sent(),[4,this.PZ(n)];case 3:return r.sent(),[2,n]}})}).call(this)},n.IZ=function(t){var i=this,n=this.ES;return n?0!==t.fq.length&&t.fq.some(function(t){return t.xS.Ym===n.xS}):0!==this.ZS.fq.length?t.fq.some(function(t){return i.ZS.fq.some(function(i){return t.xS===i.xS})}):0===t.fq.length||!this.CZ},n.RZ=function(t){return this.DZ.RZ(t),this.ZS=t,ut.resolve()},n.NZ=function(t){this.DZ.NZ(t)},n.BZ=function(){if(!Bi.vg)return"";var t=this.GJ.ps5;return"; pass_through="+t.passThrough+'; playmode="'+t.playMode+'";'},n.zg=function(){return Vt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:for(this.Vo(),this.pT.removeEventListener("loadedmetadata",this.MZ),t=Lt(XR);!(i=t()).done;)n=i.value,this.pT.removeEventListener(n,this.LZ);return[4,this.ta.kn()];case 1:return r.sent(),this.OZ(),[4,this.DZ.hr()];case 2:return r.sent(),[4,this.FZ(void 0)];case 3:return r.sent(),[2]}})}).call(this)},n.UZ=function(t){t!==this.VZ&&(this.VZ=t,t?this.HZ.Qy(void 0):this.HZ=new Va)},n.PZ=function(t){var i=this;return this.ta.Zo(function(){return i.FZ(t)})},n.FZ=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:if(t&&!this.pT.src&&!this.pT.srcObject)throw new ug(vd.CONTENT_PROTECTION_ERROR,"Attempted to attach MediaKeys to a sourceless MediaElement");if(!t&&(this.pT.src||this.pT.srcObject))throw new ug(vd.CONTENT_PROTECTION_ERROR,"Attempted to remove MediaKeys from a non-empty MediaElement");return!t||this.VZ?[3,2]:[4,this.HZ.Yy];case 1:n.sent(),n.label=2;case 2:return(i=this.ES)?[4,i.IS(this.pT)]:[3,4];case 3:n.sent(),this.ES=void 0,n.label=4;case 4:return t?[4,t._n(this.pT)]:[3,6];case 5:n.sent(),this.ES=t,n.label=6;case 6:return[2]}})}).call(this)},n.Ta=function(t,i){var n=this;return this.ta.Zo(function(){return n.WZ(t,i)})},n.WZ=function(t,i){this.UZ(!1);var n=this.PL.vP;if(Xi(t)&&i){var r=this.qZ(t,i);this.pT.appendChild(r)}else if(Xi(t))this.pT.src=t;else if(function(t){if(void 0!==f.ManagedMediaSource&&V(t,f.ManagedMediaSource))return!0;if("undefined"!=typeof MediaSource&&V(t,MediaSource))return!0;return!1}(t))if(function(t){return"srcObject"in t&&Bi.ru&&Bi.Q_>=17}(this.pT))try{this.pT.srcObject=t}catch(i){this.pT.src=URL.createObjectURL(t)}else this.pT.src=URL.createObjectURL(t);else jR(t)&&(this.pT.srcObject=t);this.PL.vP=n},n.qZ=function(t,i){var n=v.createElement("source");return n.src=t,n.type=i+this.BZ(),n},n.zZ=function(t){var i=this;return this.ta.Zo(function(){return i.GZ(t)})},n.GZ=function(t){this.WZ(t),this.pT.load()},n.OZ=function(){this.UZ(!1),Er(this.pT)},n.XZ=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.ES?[4,this.ES.hr()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})}).call(this)},Nt(i,[{key:"Cd",get:function(){return this.ZS}},{key:"hq",get:function(){return this.pT}}]),i}(th);function jR(t){return!("undefined"==typeof MediaStream||!V(t,MediaStream))}var QR=function(t){function i(){return t.apply(this,arguments)||this}Ct(i,t);var n=i.prototype;return n.GY=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:switch((t=this.Cd)._q){case aA.lC:case aA.fC:this.pT.setAttribute("crossorigin",t._q);break;case aA.Fk:default:this.pT.removeAttribute("crossorigin")}return void 0!==t.wP?this.pT.preload=t.wP:this.pT.preload=YT.PW,void 0!==t.gq?this.pT.title=t.gq:fn(this.pT),t.YZ?[4,this.zZ(t.YZ)]:[3,2];case 1:return i.sent(),[3,6];case 2:return Bi.vg?[4,this.Ta(t.rC,t.GT)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,this.Ta(t.rC)];case 5:i.sent(),i.label=6;case 6:return this.DZ.Un(this,t),[2]}})}).call(this)},n.IZ=function(t){return!1},n.RZ=function(t){return ut.resolve(void 0)},n.JZ=function(t){return!1},n.ZZ=function(){return!jR(this.ZS.YZ)},n.zg=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return fn(this.pT),[4,t.prototype.zg.call(i)];case 1:return n.sent(),[2]}})}).call(this)},i.$Z=function(t,i){return!!i.canPlayType&&Boolean(i.canPlayType(t.GT))},Nt(i,[{key:"Fx",get:function(){return EA.jn(this.pT.buffered)}},{key:"ct",get:function(){return this.pT.duration}},{key:"jZ",get:function(){var t=this.ct;if(!isFinite(t))return!1;var i=this.Fx;return 0!==i.V&&t-i.An(i.V-1)0||this.pT.videoHeight>0))return this.Fx}}]),i}(GR);U(),Et(),Pt();var YR=function(t){function i(i){var n;return(n=t.call(this,eh.Qw)||this).currentTime=void 0,n.currentTime=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var KR=function(t){function i(){return t.call(this,eh.Ww)||this}return Ct(i,t),i}(rh);U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),xt(),Pt();var JR=function(t){return t.t$="i$",t}({}),ZR=function(t){function i(i){var n;return(n=t.call(this,"i$")||this).e$=void 0,n.e$=i,n}return Ct(i,t),i}(rh),$R=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).n$=EA.rL(),i}Ct(i,t);var n=i.prototype;return n.r$=function(t,i){if(!Sn(t,i,1e-5)){var n=new EA([t,i]);this.n$=this.n$.HM(n),this.So(new ZR(n))}},n.h$=function(t,i){this.n$=this.n$.qM(new EA([t,i]))},n.hr=function(){this.n$=EA.rL()},n.kn=function(){this.Vo()},Nt(i,[{key:"s$",get:function(){return this.n$}}]),i}(th);function tC(t,i){return void 0===i&&(i=new Yd({highWaterMark:1/0})),new jd(new iC(t,i),{highWaterMark:0})}U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et();var iC=function(){function t(t,i){var n=this,r=i.size,e=void 0===r?function(){return 1}:r,s=i.highWaterMark,u=void 0===s?1:s;this.Wd=void 0,this.v$=void 0,this.d$=void 0,this.tf=[],this.if=0,this.iZ=void 0,this.c$=!1,this.l$=void 0,this.f$=function(t){return t.done?(n.u$(),void n.iZ.close()):(n.tf.push(t.value),n.if+=n.v$(t.value),n.c$&&n.u$(),n.o$()?n.Wd.read().then(n.f$):void 0)},this.PE=function(t){n.u$(),n.iZ.error(t)},this.Wd=t.getReader(),this.v$=e,this.d$=u}var i=t.prototype;return i.start=function(t){this.iZ=t,this.o$()&&this.a$()},i.pull=function(){this.tf.length>0?this.u$():this.c$=!0,this.o$()&&this.a$()},i.cancel=function(t){return Yn(this.tf),this.if=0,this.c$=!1,this.Wd.cancel(t)},i.u$=function(){if(0!==this.tf.length){var t=this.tf;this.tf=[],this.if=0,this.c$=!1,this.iZ.enqueue(t)}},i.o$=function(){return!!this.c$||this.d$-this.if>0},i.a$=function(){var t=this;if(!this.l$){var i=this.Wd.read().then(this.f$).catch(this.PE);this.l$=i;var n=function(){t.l$===i&&(t.l$=void 0)};i.then(n,n)}},t}();U(),Et(),U(),Et(),xt(),Pt(),H(),Ft(),U(),Et(),Ft(),U(),Et();var nC=function(){function t(){this.g$=[],this.Wy=0}var i=t.prototype;return i._$=function(t){this.g$.push(t),this.Wy+=t.byteLength},i.p$=function(t){if(this.Wy<=t)return this.m$();for(var i=this.g$,n=0,r=0;r0&&nthis.tf.Wy)return;switch(this.Ra){case 0:this.R$(t);break;case 1:this.D$(t);break;case 2:this.N$(t)}}},i.B$=function(){this.Ra=0,this.C$=8},i.R$=function(t){var i=_a(this.tf.w$(this.C$)),n=new Ta,r=gm.wD(i,n);if(!r.vD)return this.C$=r.bD,void(t&&this.C$>this.tf.Wy&&this.M$(this.tf.Wy));var e=r.yD.Km,s=r.yD.Wy;0===s&&(s=1/0),this.T$(e,s),this.L$(e)?this.O$(s):this.M$(s)},i.O$=function(t){this.Ra=1,this.C$=t},i.D$=function(t){var i=_a(this.tf.A$(this.C$)),n=new Ta,r=gm._D(i,n,!t);if(!r.vD)throw new wm(n.ac);this.k$(),this.F$(r.gD),this.B$()},i.M$=function(t){this.Ra=2,this.C$=0,this.U$=t},i.N$=function(t){var i=this.tf.y$(this.U$);this.U$-=i.Wy;for(var n,r=Lt(i.g$);!(n=r()).done;){var e=n.value;this.V$(e)}(0===this.U$||t&&this.U$===1/0)&&(this.k$(),this.B$())},t}();function eC(t){return V(t,zf)}function sC(t){return V(t,Hf)}function uC(t){return V(t,Ff)||V(t,Uf)}function oC(t){return V(t,af)}function hC(t){return V(t,Fc)}function aC(t){return V(t,Df)}function cC(t){return V(t,Cf)}function fC(t){return V(t,nv)}function vC(t){return V(t,$f)}function dC(t){return V(t,Yf)}function lC(t){return V(t,Jf)}function wC(t,i){var n=Fn(t.boxes,dC);if(n&&n.flags.baseDataOffsetPresent)n.baseDataOffset=n.baseDataOffset.add(i);else for(var r,e=Lt(t.boxes);!(r=e()).done;){var s=r.value;V(s,Jf)&&s.flags.dataOffsetPresent&&(s.dataOffset=s.dataOffset+i)}}U(),Et(),H(),Ft();var gC=function(t){function i(i){var n;return(n=t.call(this)||this).iZ=void 0,n.t0=void 0,n.X$=void 0,n.Q$=Zu(),n.t0=i,n}Ct(i,t);var n=i.prototype;return n.start=function(t){this.iZ=t},n.transform=function(t){this.E$(t)},n.flush=function(){this.P$()},n.L$=function(t){return t===hm.HC||t===hm.NR||t===hm.GR},n.F$=function(t){var i=this.H$(t);this.iZ.enqueue(i)},n.V$=function(t){this.iZ.enqueue(t)},n.H$=function(t){var i=ma(t.lk.lk);switch(t.Km){case"moov":return this.W$(i);case"sidx":return this.q$(i);case"moof":return this.z$(i)}return i},n.j$=function(t){var i=this.Q$.get(t);if(void 0===i)throw new y("Expected to have found a media header timescale for track ID "+t+".");return i},n.W$=function(t){for(var i=pv(t),n=0;n>2,h=!!(2&u),a=Hh(t,i,3),c=qh(t,i),f=qh(t,i);if(i.ac=n)){var r=t.zy(i.byte);return i.byte+=1,r}}function IC(t,i){return function(t,i,n){for(var r=0,e=n;e>0;)e-=1,r=256*r+EC(t,i);return r}(t,i,2)}U(),Et(),U(),Et(),U(),Et(),U(),Et(),U(),Et(),U(),Et(),xt(),Ft();var RC=function(){function t(){this.j0=0,this.X0=[],this.LU={}}var i=t.prototype;return i.G0=function(t){this.X0=this.X0.concat(t.X0),this.j0+=t.V},i.Q0=function(t,i,n){var r=this.j0,e=n-i;e>0&&(this.X0.push({K0:i,Y0:n,J0:e,Z0:r,$0:t}),this.j0+=e)},i.zy=function(t){for(var i,n=Lt(this.X0);!(i=n()).done;){var r=i.value;if(r.Z0<=t&&t=this.j0))if(this.j0=t,0!==t)for(var r=i.length-1;r>=0;r-=1){var e=i[r];if(n<=e.J0)return e.Y0-=n,e.J0-=n,void(i.length!==r+1&&(i.length=r+1));n-=e.J0}else i.length=0}},{key:"lk",get:function(){for(var t,i=new Array(this.j0),n=0,r=Lt(this.X0);!(t=r()).done;)for(var e=t.value,s=e.Y0,u=e.K0;u0;)e-=1,r=2*r+PC(t,i);return r}function NC(t,i){for(var n=0;0===PC(t,i)&&n<32;)n+=1;return DC(t,i,n)+b.pow(2,n)-1}function xC(t,i){var n=NC(t,i);return 1&n?b.floor((n+1)/2):-b.floor(n/2)}function BC(t,i){var n,r=[],e={byte:1};do{r.push(MC(t,i,e)),n=i.zy(e.byte)}while(void 0!==n&&128!==n);return r}function OC(t,i){var n,r=0;do{r+=n=EC(t,i)}while(255===n);return r}function MC(t,i,n){var r=OC(i,n),e=OC(i,n),s=n.byte,u=s+e;return n.byte=u,{e1:t,s1:r,n1:e,h1:s,o1:u,a1:i}}var LC=function(t){return t[t.u1=1]="u1",t[t.c1=2]="c1",t[t.d1=3]="d1",t[t.v1=4]="v1",t[t._1=5]="_1",t[t.g1=6]="g1",t[t.m1=7]="m1",t[t.w1=8]="w1",t[t.b1=9]="b1",t}({}),FC=[void 0,[1,1],[12,11],[10,11],[16,11],[40,33],[24,11],[20,11],[32,11],[80,33],[18,11],[15,11],[64,33],[160,99],[4,3],[3,2],[2,1]];function UC(t,i,n){for(var r=8,e=8,s=0;s=2&&t.push(i),e=0)}this.T1=i-t.length},i.P1=function(t){for(var i,n=t,r=Lt(this.S1);!(i=r()).done;){if(!(i.value<=n))return n;n+=1}return n},i.zy=function(t){if(!(t>this.E1.V))return t>this.T1&&this.A1(),this.E1.zy(this.P1(t))},t}();function HC(t){var i,n,r,e,s,u,o=new VC(t),h=0,a=0,c=0,f=0,v=o.zy(1),d={bit:32};if(NC(o,d),100===v||110===v||122===v||144===v){var l=NC(o,d);if(3===l&&(i=PC(o,d)),NC(o,d),NC(o,d),PC(o,d),1===PC(o,d))for(var w=0;w<(3!==l?8:12);w+=1){1===PC(o,d)&&UC(o,d,w<6?16:64)}}var g=NC(o,d),_=NC(o,d);if(0===_)NC(o,d);else if(1===_){PC(o,d),xC(o,d),xC(o,d);for(var m=NC(o,d),y=0;y>3),C);n.Ly(8*C),I.push({M1:C,L1:P})}b.push({O1:T,F1:S,U1:E,V1:I})}return{F0:r,H1:e,W1:s,q1:u,z1:h,G1:c,X1:f,j1:v,Q1:o,K1:d,Y1:l,J1:w,Z1:g,t2:m,i2:y,e2:_,W0:p,s2:k,n2:b}}(_a(t.eB.lk),new Ta);i=function(t,i){var n=t.toString()+".";switch(i.H1){case 0:break;case 1:n+="A";break;case 2:n+="B";break;case 3:n+="C";break;default:return}switch(n+=i.q1.toString()+".",n+=function(t){var i=t;return i=i>>>1&1431655765|(1431655765&i)<<1,i=i>>>2&858993459|(858993459&i)<<2,i=i>>>4&252645135|(252645135&i)<<4,i=i>>>8&16711935|(16711935&i)<<8,i=i>>>16|i<<16,i}(i.Q1).toString(16)+".",i.W1){case 0:n+="L";break;case 1:n+="H";break;default:return}n+=i.G1.toString();for(var r=i.z1.reduce(function(t,i){return 0===t?i:i+1},0),e=0;e0?t.An(t.V-1):0,this.L3.U3()},i.I3=function(){this.O3=void 0},Nt(t,[{key:"Fx",get:function(){if(this.L3.AP===_P.S3)return EA.rL();var t=EA.jn(this.j2.buffered).Mn(EA.hL()),i=this.O3;return void 0!==i&&t.V>0&&t.An(t.V-1)===i&&(t=t.HM(EA.sL(i))),t}}]),t}();function sP(t,i,n,r,e,s,u){var o=new eP(e,t),h=new nP(o,t,e,n,s);return new uP(t,i,n,r,o,h,u)}var uP=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this)||this).w3=void 0,h.ZS=void 0,h.H3=void 0,h.PL=void 0,h.jS=void 0,h.q3=void 0,h.u3=void 0,h.z3=void 0,h.Q3=Ju(),h.w3=i,h.ZS=r,h.jS=r.GT,h.H3=e,h.PL=n,h.u3=s,h.z3=u,h.q3=o,h.z3.wn(HR.pZ,h.Rs),h}Ct(i,t);var n=i.prototype;return n.jZ=function(){return this.u3.jZ()},n.F3=function(){this.u3.F3()},n.I3=function(){this.u3.I3(),this.z3.I3()},n.G3=function(t,i){this.q3.r$(t,i)},n.X3=function(t,i){this.q3.h$(t,i)},n.j3=function(){return this.z3.y3()},n.Q2=function(t,i,n){return this.z3.Q2(t,i,n)},n.J2=function(t,i,n){return this.z3.J2(t,n)},n.f3=function(t,i){return Bi.w_&&Bi.b_<3?this.z3.f3(t,1/0):this.z3.f3(t,i)},n.pS=function(t,i,n){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return this.X3(t,i),r=this.Fx,[4,this.z3.m3(t,i,n)];case 1:return s.sent(),e=0!==r.V&&0===this.Fx.V,(Bi.rg||Bi.S_)&&e&&this.PL.Oy(this.PL.zx),[2]}})}).call(this)},n.IZ=function(t){var i=t.GT;if(this.jS===i)return!0;var n=this.Q3.get(i);if(void 0!==n)return n;var r=this.K3(t);return this.Q3.set(i,r),r},n.K3=function(t){var i=this.w3.E3(t.GT);if(void 0===i)return!1;var n=jv(this.jS),r=jv(i),e=jC(n),s=jC(r);if(this.z3.b3()){if(!function(t,i){return sr(t,i,KC)}(e,s))return!1;if(Bi.og&&!function(t,i){return sr(t,i,YC)}(e,s))return!1}else{if(n.Km!==r.Km)return!1;if(!QC(e,s))return!1}return!0},n.RZ=function(t){return Vt(function(){var i;return zt(this,function(n){return i=t.GT,this.jS!==i&&(this.Q3.clear(),this.z3.RZ(t),this.jS=i),this.ZS=t,this.w3.Y3(),[2]})}).call(this)},n.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:this.Q3.clear(),this.Vo(),this.q3.kn(),t.label=1;case 1:return t.trys.push([1,3,,4]),this.z3.mn(HR.pZ,this.Rs),[4,this.z3.zg()];case 2:return t.sent(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}})}).call(this)},Nt(i,[{key:"Fx",get:function(){return this.u3.Fx}},{key:"Cd",get:function(){return this.ZS}},{key:"GT",get:function(){return this.jS}},{key:"V3",get:function(){return this.H3}},{key:"W3",get:function(){return this.q3.s$}},{key:"VY",get:function(){return this.z3.VY},set:function(t){this.z3.VY=t}},{key:"zY",get:function(){return this.z3.zY},set:function(t){this.z3.zY=t}},{key:"ga",get:function(){return this.z3.ga}}]),i}(th);U(),Et();var oP=function(){function t(t,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=!1),this.Tn=void 0,this.An=void 0,this.Z3=void 0,this.t4=void 0,this.i4=void 0,this.Tn=t,this.An=i,this.Z3=n,this.t4=r,this.i4=Ui.Mg()}return t.prototype.J3=function(){var t=this.Tn,i=this.An;if(this.Z3||this.t4){var n=.001*(Ui.Mg()-this.i4);this.Z3&&(t+=n),this.t4&&(i+=n)}return EA.nL(t,i)},t}();function hP(t){var i=[];if(t.e4&&i.push(t.e4.Fx),t.s4&&i.push(t.s4.Fx),0===i.length)return EA.rL();for(var n,r=0,e=Lt(i);!(n=e()).done;){var s=n.value;s.V>0&&(r=b.max(r,s.An(s.V-1)))}for(var u,o=t.jZ,h=new EA([0,r],[!0,o]),a=Lt(i);!(u=a()).done;){var c=u.value;o&&c.V>0&&(c=c.HM(new EA([c.An(c.V-1),r],[!0,!0]))),h=h.Mn(c)}return h}function aP(t,i,n){var r,e=t.Fx,s=e.zM(i);if(s>=0){if(!(s+1=0))return ut.resolve();r=e.Tn(s)}return t.pS(r,1/0,n)}function cP(t,i,n){if(!t.Cr(i)){var r=t.zM(i,n);if(r>=0){var e=t.Tn(r);if(i0&&r>i+e.D4){var u,o,h=e.s$.MM().qM(s),a=h.ZM(n);if(-1!==a){var c=h.Tn(a);if(c-n<1||e.x4()){var f=h.An(a);0,u=f}}if(!u)(u=null==(o=e.N4)?void 0:o.determineStallJumpTarget())&&u!==n||(u=n+.01*e.R4,s.Cr(u)||(u=e.I4(n,s)));0,e.C4=u,e.R4++,e.D4=b.min(2*e.D4,1e4),e._4(u)}},this.a4.wn(Ry.AI,this.u4),this.PL.wn(eh.Qw,this.u4),this.PL.wn(vP,this.c4),this.N4=r,this.D4=Ui.Tx?5e3:1e3}var i=t.prototype;return i.n4=function(t){this.r4.push(t),t.wn(JR.t$,this.h4)},i.kn=function(){var t=this;this.o4(),this.a4.mn(Ry.AI,this.u4),this.PL.mn(eh.Qw,this.u4),this.PL.mn(vP,this.c4),this.r4.forEach(function(i){return i.mn(JR.t$,t.h4)}),this.d4(),this.l4=!0},i.JZ=function(t){if(this.PL.Qx)return!1;if(0!==this.f4)return!1;var i=this.u3.Fx,n=i.zM(t);if(n>=0&&t+fP=0?n+1:i.$M(t);if(r<0||r>=i.V)return!1;var e=i.Tn(r);return!(EA.nL(t,e).qM(this.s$).eL>1)&&(0!==t||this.PL.xP?Ui.Ax?(this.v4(t,e,250),!0):!(b.abs(e-t)<=.001)&&(this._4(e),!0):(this.v4(t,e,2e3),!0))},i.v4=function(t,i,n){var r=this;this.d4(),this.g4=t,this.PL.wn(eh.$w,this.m4),this.f4=Ui.Og(function(){r.g4===r.PL.zx&&r._4(i),r.d4()},n)},i.d4=function(){0!==this.f4&&(this.PL.mn(eh.$w,this.m4),Ui.Lg(this.f4),this.f4=0)},i._4=function(t){this.PL.Oy(t,!1,!0)},i.w4=function(){0!==this.y4&&(Ui.Lg(this.y4),this.y4=0),this.PL.mn(eh.py,this.ad)},i.b4=function(){this.l4||0===this.A4&&(this.w4(),this.A4=Ui.fm(this.S4,250))},i.o4=function(){0!==this.A4&&(Ui.vm(this.A4),this.A4=0),this.w4(),this.PL.xP||(this.T4=0)},i.E4=function(){return!this.PL.lP&&(!this.PL.xP||this.x4())&&0!==this.PL.vP&&!this.PL.Qx&&!this.PL.lt&&(this.P4()||this.a4.AP>=Dy.XL)},i.x4=function(){return!1},i.P4=function(){var t=this.PL.zx,i=this.u3.Fx,n=i.zM(t);return-1!==n&&i.An(n)>t+fP},i.I4=function(t,i){var n=i.zM(t);return n>-1?i.An(n):t},Nt(t,[{key:"s$",get:function(){return this.r4.reduce(function(t,i){return t.HM(i.s$)},EA.rL())}}]),t}(),lP=function(t){function i(){return t.apply(this,arguments)||this}return Ct(i,t),i.prototype.x4=function(){if(!Bi.S_||!this.PL.xP)return!1;var t=this.PL.zx,i=this.u3.Fx,n=this.s$.MM().qM(i),r=n.ZM(t);return-1!==r&&n.Tn(r)-t<=3e3},i}(dP),wP=Bi.B_||Bi.L_,gP=Bi.W_||Bi.X_||Bi.ru,_P=function(t){return t.S3="closed",t.rE="open",t.Nw="ended",t}({}),mP=function(t){function i(i,n,r,e,s,u,o,h){var a;return void 0===u&&(u=new Ce(i.t5)),(a=t.call(this,i,n,e,s,h)||this).Z4=void 0,a.B4=void 0,a.X4=void 0,a.M4=void 0,a.j4=void 0,a.H4=new oP(0,1/0),a.aq=void 0,a.L4=void 0,a.O4=void 0,a.G4=void 0,a.Q4=!1,a.Y4=function(){a.So(new rh(qR.SZ))},a.i5=function(){a.So(new rh(qR.kZ))},a.bd=function(){a.K4()},a.B3=function(){a.PL.B3()},a.Z4=u,a.aq=a.Z4.Lp(),a.aq.addEventListener("sourceclose",a.Y4),a.aq.addEventListener("sourceopen",a.i5),a.PL.wn([eh.py,eh.$w,eh.Fw],a.bd),a.G4=new lP(a,r,a.PL,o),a}Ct(i,t);var n=i.prototype;return n.F4=function(t){if(t<0)throw new y("Invalid duration");this.U4()?this.V4(t):this.L4=t},n.V4=function(t){var i=t===1/0;if(i&&this.aq.setLiveSeekableRange){var n=b.pow(2,39);this.aq.setLiveSeekableRange(0,n)}S(t)?(this.aq.duration=bn,this.O4=NaN):(this.aq.duration=i?gP?1/0:bn:t,this.O4=void 0),this.L4=void 0},n.W4=function(t,i,n,r){this.H4=new oP(t,i,Boolean(n),Boolean(r))},n.GY=function(){return Vt(function(){var t,i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:return t=this.ZS,i=Fn(t.q4,function(t){return Wv(t.GT)}),n=Fn(t.q4,function(t){return zv(t.GT)}),this.pT.disableRemotePlayback=!0,[4,this.z4()];case 1:return c.sent(),r=this.BZ(),i&&(e=new $R,this.G4.n4(e),u=null!=(s=this.E3(i.GT))?s:i.GT,this.X4=this.aq.addSourceBuffer(""+u+r),this.B4=sP(this,this.PL,i,eg.Bk,this.X4,u,e),this.B4.wn(HR.pZ,this.B3)),n&&(o=new $R,this.G4.n4(o),a=null!=(h=this.E3(n.GT))?h:n.GT,this.j4=this.aq.addSourceBuffer(""+a+r),this.M4=sP(this,this.PL,n,eg.Mk,this.j4,a,o),this.M4.wn(HR.pZ,this.B3)),this.DZ.Un(this,t),[2]}})}).call(this)},n.z4=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.zZ.call(i,this.aq)];case 1:return n.sent(),"open"===this.AP?[3,3]:[4,ew(this.aq,"sourceopen")];case 2:n.sent(),n.label=3;case 3:return[2]}})}).call(this)},n.U4=function(){if("open"!==this.AP)return!1;var t=this.B4&&this.B4.ga,i=this.M4&&this.M4.ga;return!(t||i)},n.F3=function(){this.Q4=!0,this.B4&&this.B4.F3(),this.M4&&this.M4.F3(),this.Q4=!1,this.K4()},n.I3=function(){this.B4&&this.B4.I3(),this.M4&&this.M4.I3()},n.IZ=function(i){var n=Fn(i.q4,function(t){return Wv(t.GT)}),r=Fn(i.q4,function(t){return zv(t.GT)});if(this.B4){if(!n)return!1;if(!this.B4.IZ(n))return!1}else if(n)return!1;if(this.M4){if(!r)return!1;if(!this.M4.IZ(r))return!1}else if(r)return!1;return!!t.prototype.IZ.call(this,i)},n.RZ=function(i){var n=this;return Vt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:return r=Fn(i.q4,function(t){return Wv(t.GT)}),e=Fn(i.q4,function(t){return zv(t.GT)}),s=[],this.B4&&s.push(this.B4.RZ(r)),this.M4&&s.push(this.M4.RZ(e)),[4,ut.all(s)];case 1:return u.sent(),[4,t.prototype.RZ.call(n,i)];case 2:return u.sent(),[2]}})}).call(this)},n.NZ=function(i){t.prototype.NZ.call(this,i)},n.zg=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.aq.removeEventListener("sourceclose",this.Y4),Bi.S_?[4,this.XZ()]:[3,2];case 1:n.sent(),n.label=2;case 2:return this.B4?[4,this.B4.zg()]:[3,4];case 3:if(n.sent(),this.B4=void 0,Jo()&&(Bi.S_||Bi.w_))try{this.aq.removeSourceBuffer(this.X4)}catch(t){}this.X4=void 0,n.label=4;case 4:return this.M4?[4,this.M4.zg()]:[3,6];case 5:if(n.sent(),this.M4=void 0,Jo()&&(Bi.S_||Bi.w_))try{this.aq.removeSourceBuffer(this.j4)}catch(t){}this.j4=void 0,n.label=6;case 6:return this.pT.src&&URL.revokeObjectURL(this.pT.src),this.pT.disableRemotePlayback=!1,this.PL.mn([eh.py,eh.$w,eh.Fw],this.bd),this.G4.kn(),Bi.w_?[4,this.XZ()]:[3,8];case 7:n.sent(),n.label=8;case 8:return[4,t.prototype.zg.call(i)];case 9:return n.sent(),[2]}})}).call(this)},n.Y3=function(){var t=this,i=this.ZS,n=i.q4.map(function(i){return Wv(i.GT)&&t.B4?t.B4.Cd:zv(i.GT)&&t.M4?t.M4.Cd:i});this.ZS=Yu({},i,{q4:n})},n.U3=function(){this.Q4||this.K4()},n.K4=function(){this.J4&&this.U4()&&(this.aq.endOfStream(),this.L4=void 0,this.O4=void 0,this.So(new rh(qR.bZ)),this.PL.B3())},n.R3=function(){this.U4()&&(this.jZ?this.K4():void 0!==this.L4&&this.V4(this.L4))},n.JZ=function(t){return this.G4.JZ(t)},n.ZZ=function(){return!0},n.E3=function(t){return yP(this.Z4,t)},i.$Z=function(t){var i=Pe(t.t5);if(void 0===i)return!1;if("function"!=typeof i.isTypeSupported)return!1;for(var n,r=new Ce(t.t5),e=Lt(t.q4);!(n=e()).done;){if(void 0===yP(r,n.value.GT))return!1}return!0},Nt(i,[{key:"e4",get:function(){return this.B4}},{key:"s4",get:function(){return this.M4}},{key:"ct",get:function(){if(void 0!==this.L4)return this.L4;if(void 0!==this.O4)return this.O4;var t=this.aq.duration;return t===bn?1/0:t}},{key:"Fx",get:function(){return wP?hP(this):function(t,i){var n=i;return n.V>0&&t.jZ&&(n=n.HM(EA.sL(n.An(n.V-1)))),n}(this,EA.jn(this.pT.buffered))}},{key:"QZ",get:function(){var t;return null==(t=this.B4)?void 0:t.Fx}},{key:"KZ",get:function(){var t;return null==(t=this.M4)?void 0:t.Fx}},{key:"kP",get:function(){return this.H4.J3().Mn(new EA([0,this.ct],[!0,!0]))}},{key:"jZ",get:function(){return(!this.B4||this.B4.jZ())&&(!this.M4||this.M4.jZ())}},{key:"AP",get:function(){return this.aq.readyState}},{key:"J4",get:function(){if(!this.jZ)return!1;var t=this.Fx;return 0!==t.V&&t.Tn(t.V-1)<=this.PL.zx}}]),i}(GR);function yP(t,i){var n=jv(i),r=jC(n),e="audio/mp4"===n.Km,s=e&&1===r.length&&"mp4a.40.34"===r[0];if(t.Fp(i)&&(!s||!Bi.X_))return i;if(s)for(var u,o=Lt(['audio/mp4; codecs="mp3"',"audio/mpeg"]);!(u=o()).done;){var h=u.value;if(t.Fp(h))return h}if(e&&1===r.length&&"flac"===r[0].toLowerCase())for(var a,c=Lt(["flac","fLaC","FLAC"]);!(a=c()).done;){var f='audio/mp4; codecs="'+a.value+'"';if(t.Fp(i))return f}}U(),Et(),xt(),Pt(),U(),Et(),Pt();var pP=function(t){function i(i){var n;return(n=t.call(this,eh.Fw)||this).currentTime=void 0,n.currentTime=i,n}return Ct(i,t),i}(rh),kP=[eh.wy,eh.Kw,eh.$w,eh.Fw,eh.uo,eh.jw],bP=function(t){function i(i,n,r,e,s,u,o,h,a,c,f){var v;return(v=t.call(this)||this).xz=void 0,v.Zb=void 0,v.h5=void 0,v.Cz=void 0,v.Pz=void 0,v.Iz=void 0,v.Rz=void 0,v.cA=void 0,v.o5=void 0,v.s5=void 0,v.r5=void 0,v.xz=i,v.Zb=n,v.h5=r,v.Cz=e,v.Pz=s,v.Iz=u,v.Rz=o,v.cA=h,v.o5=a,v.s5=c,v.r5=f,v}Ct(i,t);var n=i.prototype;return n.Oy=function(t,i,n){this.xz!==t&&(this.xz=t,this.s5=i,n&&!this.Pz?(this.r5=!0,this.So(new pP(this.zx))):(this.r5=!1,this.Pz=!0,this.So(new wT(this.zx))))},n.jP=function(){this.Cz||(this.Cz=!0,this.So(new cT(this.zx)))},n.QP=function(){this.Cz&&(this.Cz=!1,this.So(new fT(this.zx)))},n.zg=function(){this.Vo()},Nt(i,[{key:"zx",get:function(){return this.xz}},{key:"e5",get:function(){return this.s5}},{key:"n5",get:function(){return this.r5}},{key:"ct",get:function(){return this.Zb}},{key:"Qx",get:function(){return this.h5}},{key:"lP",get:function(){return this.Cz}},{key:"AP",get:function(){return this.o5}},{key:"xP",get:function(){return this.Pz}},{key:"oP",get:function(){return this.Iz},set:function(t){this.oP!==t&&(this.Iz=t,this.So(new _T(this.zx,this.OP)))}},{key:"vP",get:function(){return this.Rz},set:function(t){this.vP!==t&&(this.Rz=t,this.So(new dT(this.zx,this.vP)))}},{key:"OP",get:function(){return this.cA},set:function(t){this.OP!==t&&(this.cA=t,this.So(new _T(this.zx,this.OP)))}}]),i}(th);function AP(t){return new bP(t.zx,t.ct,t.Qx,t.lP,t.xP,t.oP,t.vP,t.OP,t.AP,!1,t.n5)}function TP(t,i){i.ct===t.ct||S(i.ct)&&S(t.ct)||t.So(new vT(t.ct)),t.oP=i.oP,t.OP=i.OP,t.vP=i.vP,i.lP?t.jP():t.QP().catch(dn),i.zx!==t.zx||i.AP>Dy.zL&&t.AP===Dy.zL?t.Oy(i.zx,i.e5,i.n5):!i.xP&&t.xP?t.So(new wT(t.zx)):i.xP&&!t.xP&&t.AP>=Dy.GL&&t.So(new gT(t.zx)),!i.Qx&&t.Qx&&t.So(new lT(t.zx))}U(),Et(),Pt(),Ft(),U(),Et(),xt(),Pt();var SP=function(t){function i(i){var n;return(n=t.call(this)||this).PL=void 0,n.RV=Dy.zL,n.c5=function(){n.u5()},n.PL=i,n}Ct(i,t);var n=i.prototype;return n.a5=function(t){this.RV!==t&&(this.RV=t,this.So(new Py(this.PL.zx,t)))},n.u5=function(){this.a5(this.TP())},n.hr=function(){this.a5(Dy.zL)},n.zg=function(){this.Vo()},Nt(i,[{key:"AP",get:function(){return this.TP()}}]),i}(th);U(),Et(),Pt(),Ft();var EP=["emptied","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","timeupdate","progress","seeking","seeked"],IP=function(t){function i(i){var n;n=t.call(this,i)||this;for(var r,e=Lt(EP);!(r=e()).done;){var s=r.value;n.PL.hq.addEventListener(s,n.c5)}return n}Ct(i,t);var n=i.prototype;return n.TP=function(){var t=this.PL.hq.readyState;return t>Dy.GL&&this.PL.d5?Dy.GL:(this.PL.hq.seeking&&t>Dy.Qn&&(t=Dy.Qn),t)},n.zg=function(){for(var i,n=Lt(EP);!(i=n()).done;){var r=i.value;this.PL.hq.removeEventListener(r,this.c5)}t.prototype.zg.call(this)},i}(SP);U(),Et();var RP=ve,CP=function(t){function i(i){var n;(n=t.call(this,i)||this).PL.wn([eh.$w,eh.Fw],n.c5);for(var r,e=Lt(EP);!(r=e()).done;){var s=r.value;n.PL.hq.addEventListener(s,n.c5)}return n}Ct(i,t);var n=i.prototype;return n.TP=function(){if(this.PL.hq.readyState===Dy.zL)return Dy.zL;var t=this.l5(),i=t?t.An-t.Tn:0;if(!t)return Dy.Qn;var n=this.PL.vP;return this.f5()||i>=3*n?Dy.jL:i>=3?Dy.XL:Dy.GL},n.l5=function(){var t=this.PL.zx,i=this.PL.Fx.VM(.04),n=i.zM(t);if(!(n<0))return{Tn:t,An:i.An(n)}},n.f5=function(){if(this.PL.Qx)return!0;var t=this.PL.ct,i=this.l5();return!!i&&t-i.An<=RP},n.zg=function(){this.PL.mn([eh.$w,eh.Fw],this.c5);for(var i,n=Lt(EP);!(i=n()).done;){var r=i.value;this.PL.hq.removeEventListener(r,this.c5)}t.prototype.zg.call(this)},i}(SP);U(),Et(),Pt(),U(),Et(),Pt();var PP=[Ry.AI,eh.uo,eh.jw,eh.$w,eh.Zw,eh.Fw,eh.Vw,eh.Nw,qm.ma],DP=function(t){function i(i){var n;return(n=t.call(this)||this).DV=void 0,n.p5=!1,n.NK=function(){n.er()},n.DV=i,n.DV.wn(PP,n.NK),n}Ct(i,t);var n=i.prototype;return n.v5=function(){return(!this.DV.n5||!this.DV._5)&&this.DV.APi}function OP(t,i){return function(t,i){return On(t.CO,i.CO,Yg)}(t,i)||function(t,i){return On(t.RO,i.RO,Yg)}(t,i)}function MP(t,i){return function(t,i){return On(t.UO,i.UO,Yg)}(t,i)||function(t,i){return On(t.VO,i.VO,Yg)}(t,i)}function LP(t,i,n){var r=function(t,i,n,r,e,s,u){void 0===e&&(e=!1),void 0===s&&(s=0),void 0===u&&(u=t.length);for(var o=s,h=u-1;o<=h;){var a=o+(h-o>>1),c=r(n(t[a]),i);if(c<0)o=a+1;else if(c>0)h=a-1;else{if(!(e&&a>s&&0===r(n(t[a-1]),i)))return a;h=a-1}}return~o}(t,i,ln,n,!0);if(r<0)return r;for(;r=0?r:-(r+1)}function UP(t){var i=t.Ht;if(!i)return-1;if(V(t,Jg))return i.w5(t);var n=i.L;if(!n)return-1;var r=LP(n.NI,t,OP);return r>=0?r:-1}function VP(t,i){var n=function(t,i,n){for(var r=t.length,e=i.length,s=0,u=0,o=[],h=[];s=0;n-=1){var r=i[n];if(t.QO(r))return!0}return!1},i.zy=function(t){return this.A5[t]},Nt(t,[{key:"NI",get:function(){return this.A5}},{key:"V",get:function(){return this.A5.length}},{key:"Ca",get:function(){if(this.hu){var t=this.A5;this.hu.length=t.length;for(var i=0;i=0)){t.Ht=this;var n=-(i+1);this.M5.splice(n,0,t);var r=FP(this.L.NI,t,OP);this.L5(t,r),this.So(new GP(t))}}},n.L5=function(t,i){this.A5.splice(i,0,t),this.O5(i),t.JO=i,i=0&&qn(n,r);var e=LP(this.M5,t,MP);e>=0&&qn(this.M5,e),t.Ht=void 0,this.F5(t,i),this.So(new QP(t))}}},n.F5=function(t,i){qn(this.A5,i),this.O5(i),t.JO=-1,this.N5>i&&--this.N5},n.qO=function(t){if(t&&t.Ht===this){var i=this.w5(t);if(!(i<0)){this.F5(t,i);var n=FP(this.L.NI,t,OP);this.L5(t,n);var r=Hn(this.D5,function(i){return i===t});if(r>=0){qn(this.D5,r);var e=FP(this.D5,t,OP);this.D5.splice(e,0,t)}}}},n.U5=function(t,i){var n=this.D5,r=this.A5,e=this.N5,s=!1,u=1/0;i&&(e=0);for(var o=n.length-1;o>=0;o--){var h=n[o];BP(h,t)?h.RO=this.V5)&&this.H5(),t.JO},n.H5=function(){for(var t=this.A5,i=this.V5;it.CO)t.RO=r.CO;else{var e=LP(i,t,OP);if(!(e>=0)){var s=-(e+1),u=s-1;if(u>=0)i[u].CO=0&&t[e].CO===r;e--)t[e].RO=n}function gD(t){return Wg(t)}U(),Et(),H(),Ft(),U(),Et(),xt(),Pt(),U(),Et(),U(),Et();var _D=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).Q5=void 0,r.Q5=n,r}Ct(i,t);var n=i.prototype;return n.xa=function(){return gD(this)},n.KO=function(t){return dD(this,t)},Nt(i,[{key:"U",get:function(){return this.Q5}},{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}}]),i}(sD);function mD(t){switch(t){case 0:case 1:case 2:case 3:return!0}return!1}function yD(t){switch(t){case 0:return Zh;case 1:return na;case 2:return ra;case 3:return fa}}function pD(t,i){var n=i.ac,r=t.byteLength,e=ma(t);return i.Ly(r-n),ka(e,n,r).buffer}function kD(t,i){return{id:t||"",data:V(i,ArrayBuffer)?i:void 0}}function bD(t,i,n){var r=Mh(t,i);if(mD(r)){var e=yD(r);return{id:n,language:Kh(t,i,3),description:e(t,i),text:e(t,i)}}}function AD(t,i,n){var r=Mh(t,i);if(mD(r)){var e=yD(r);return{id:n,mimeType:Zh(t,i),fileName:e(t,i),description:e(t,i),data:pD(t,i)}}}function TD(t,i,n){var r=Mh(t,i);if(mD(r)){for(var e=yD(r),s=[];i.act.byteLength)break;c.push({text:f,timestamp:qh(t,i)})}return{id:n,language:s,format:u,contentType:o,description:h,entries:c}}}function ED(t,i,n){return{id:n,ownerIdentifier:Zh(t,i),identifier:pD(t,i)}}function ID(t,i,n){var r=Mh(t,i);if(mD(r)){var e=yD(r);return{id:n,language:Kh(t,i,3),description:e(t,i),text:e(t,i)}}}function RD(t,i,n){var r=Mh(t,i);if(mD(r))return{id:n,text:yD(r)(t,i)}}function CD(t,i,n){return{id:n,url:Zh(t,i)}}function PD(t,i,n){var r=Mh(t,i);if(mD(r)){var e=yD(r);return{id:n,description:e(t,i),text:e(t,i)}}}function DD(t,i,n){var r=Mh(t,i);if(mD(r))return{id:n,description:yD(r)(t,i),url:Zh(t,i)}}function ND(t,i,n){switch(n){case"COM":return bD(t,i,n);case"GEO":return AD(t,i,n);case"IPL":return TD(t,i,n);case"PIC":return function(t,i,n){var r=Mh(t,i);if(mD(r)){var e,s,u=yD(r),o=Kh(t,i,3),h=Mh(t,i),a=u(t,i);return"--\x3e"===o?(e=o,s=Zh(t,i)):(e="image/"+o.toLowerCase(),s=pD(t,i)),{id:n,mimeType:e,pictureType:h,description:a,data:s}}}(t,i,n);case"SLT":return SD(t,i,n);case"TXX":return PD(t,i,n);case"UFI":return ED(t,i,n);case"ULT":return ID(t,i,n);case"WXX":return DD(t,i,n);default:if("T"===n.charAt(0))return RD(t,i,n);if("W"===n.charAt(0))return CD(t,i,n)}}function xD(t,i,n){switch(n){case"APIC":return function(t,i,n){var r=Mh(t,i);if(mD(r)){var e=yD(r),s=Zh(t,i);return{id:n,mimeType:s,pictureType:Mh(t,i),description:e(t,i),data:"--\x3e"===s?Zh(t,i):pD(t,i)}}}(t,i,n);case"COMM":return bD(t,i,n);case"COMR":return function(t,i,n){var r=Mh(t,i);if(mD(r)){var e,s,u=yD(r),o=Zh(t,i),h=Kh(t,i,8),a=Zh(t,i),c=Mh(t,i),f=u(t,i),v=u(t,i);return i.act.byteLength))return{o:Kh(t,i,3),Wy:Hh(t,i,3)}}(t,i);case 3:return function(t,i){if(!(i.ac+10>t.byteLength)){var n=Kh(t,i,4),r=qh(t,i);Mh(t,i);var e=Mh(t,i);return{o:n,Wy:r,xD:{t6:Oh(e,0),s6:Oh(e,1),groupingIdentity:Oh(e,2)}}}}(t,i);case 4:return function(t,i){if(!(i.ac+10>t.byteLength)){var n=Kh(t,i,4),r=BD(t,i);Mh(t,i);var e=Mh(t,i);return{o:n,Wy:r,xD:{groupingIdentity:Oh(e,1),t6:Oh(e,4),s6:Oh(e,5),K5:Oh(e,6),n6:Oh(e,7)}}}}(t,i)}}function UD(t){for(var i=ma(t),n=new E(i.byteLength),r=0,e=0;e=t||(this._6=t,fy(this,t))},n.o6=function(){var t=this.Qk;this.d6||t!==zm.Kn?this.u6=t:this.u6=zm.iC},n.g6=function(){var t=this.Qk,i=this.u6;t!==i&&(this.d6||t!==zm.Kn||i!==zm.iC)&&("metadata"===this.Lt&&i===zm.Nh?this.Qk=t:this.f6&&i===zm.Nh&&t===zm.Kn?this.u6=t:this.Qk=i)},n.u5=function(t){this.o5!==t&&(this.o5=t,this.So(new WP(this,t)))},n.a6=function(t){var i=b.max(this.o5,this.c6,t);this.u5(i)},n.p6=function(t){var i=GD(t);if(i)return i;if(Hi(i=this.m6(t)))for(var n,r=Lt(i);!(n=r()).done;){n.value.Ht=this}else i.Ht=this;return i},n.m6=function(t){var i=this.w6(t);return t.THEOplayerTextTrackCue=i,i},n.w6=function(t){return t.endTime0){for(var i,n=Lt(t.L.NI);!(i=n()).done;){var r=i.value;this.U6.push(r)}this.V6()}},i.B6=function(t){if(t.mn(Nw.uI,this.L6),t.mn(Nw.dI,this.O6),t.mn(Nw.fI,this.F6),t.L.V>0){for(var i,n=Lt(t.L.NI);!(i=n()).done;){var r=i.value;Xn(this.k6,r),Xn(this.U6,r)}this.V6()}},i.H6=function(){this.oa.xP||this.oa.lP?this.E6():this.V6()},i.V6=function(){this.I6&&0!==this.P6.length&&(this.R6-this.oa.zx>.25*this.oa.vP||this.x6||(this.x6=this.q6.W6(this.z6)))},i.E6=function(){this.x6&&(this.q6.G6(this.x6),this.x6=0)},i.X6=function(t){var i;if(0!==this.R6){var n,r=null!=(n=null==(i=t.Ht)?void 0:i.EU)?n:0,e=t.CO+r,s=t.RO+r,u=this.oa.zx,o=e<=u&&ui&&n-i<.1&&(e=!1),this.C6=!1;for(var s,u=[],o=1/0,h=Lt(t);!(s=h()).done;){var a=s.value,c=n-a.EU,f=a.U5(c,e)+a.EU;f=0;y--)jn(u,w[y])&&qn(w,y);var p=[];if(!e)for(var k=w.length-1;k>=0;k--){var A=w[k],T=A.Ht.EU;A.CO+T>i&&A.RO+T<=n&&(p.push(A),qn(w,k))}for(var S,E=Lt(this.U6);!(S=E()).done;){var I=S.value;I.CO!==I.RO&&Xn(p,I)}Yn(this.U6);for(var R,C=[],P=[],D=Lt(p);!(R=D()).done;){var N=R.value;N.ro||C.push(new JP(N,N.CO)),C.push(new $P(N,b.max(N.CO,N.RO))),N.ro=!1}for(var x,B=Lt(w);!(x=B()).done;){var O=x.value;O.ro&&(C.push(new $P(O,b.max(O.CO,O.RO))),O.ro=!1)}for(var M,L=Lt(u);!(M=L()).done;){var F=M.value;F.ro||(C.push(new JP(F,F.CO)),F.ro=!0)}C.sort(jD);for(var U,V=Lt(C);!(U=V()).done;){var H=U.value,W=H.PO;W.So(H);var z=W.Ht;z&&(H.type===Ug.QL?z.So(new iD(W)):z.So(new rD(W)),jn(P,z)||P.push(z))}P.sort(ay);for(var X,q=Lt(P);!(X=q()).done;){var G=X.value;G.So(new uD(G))}this.En=n,this.k6=u,this.R6=o}},i.kn=function(){this.hr(),this.oa.mn(eh.py,this.Q6),this.oa.mn(eh.uo,this.K6),this.oa.mn(Ry.PM,this.Q6),this.oa.mn(eh.jw,this.Q6),this.oa.mn(eh.$w,this.Y6),this.oa.mn(eh.Zw,this.Q6)},t}();U(),Et();var YD=function(){function t(){}var i=t.prototype;return i.W6=function(t){return uI(t)},i.G6=function(t){oI(t)},t}(),KD=new YD,JD=function(t){function i(i,n){return void 0===n&&(n=KD),t.call(this,i,n)||this}return Ct(i,t),i}(QD);U(),Et(),xt(),Pt(),Ft(),U(),Et(),xt(),Pt();var ZD=function(t){function i(i,n,r){return t.call(this,i,1/0,n,!1,r)||this}return Ct(i,t),i.prototype.KO=function(t){return dD(this,t)},Nt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=gD(this)),this.hu}}]),i}(Jg);U(),Et(),Pt(),U(),Et(),Pt();var $D=function(t){function i(i,n,r){return void 0===r&&(r=Ng.DEFAULT),t.call(this,Jm.zU,"",n||"","",!1,r,!1,i)||this}return Ct(i,t),i}(KP),tN=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).Km=Ng.ID3,r}Ct(i,t);var n=i.prototype;return n.nV=function(i){lD(i,this.A5),t.prototype.nV.call(this,i)},n.xa=function(){return jm(this)},i}($D),iN=function(t){function i(i){var n;return(n=t.call(this,i.inBandMetadataTrackDispatchType,i.label)||this).wO=void 0,n._6=0,n.v6=function(){n.Qk!==zm.Nh&&(n.b6(),n.a6(Dg.LOADED))},n.wO=i,n.wO.addEventListener("cuechange",n.v6),n.Qk=n.u6,pr(function(){n.v6()}),n}Ct(i,t);var n=i.prototype;return n.R5=function(i){t.prototype.R5.call(this,i),this.u6=this.Qk},n.nV=function(i){t.prototype.nV.call(this,i),i.W5.track!==this.wO&&this.wO.addCue(i.W5)},n.XU=function(i){t.prototype.XU.call(this,i),i.W5.track===this.wO&&this.wO.removeCue(i.W5)},n.jU=function(t){this._6>=t||(this._6=t,fy(this,t))},n.a6=function(t){this.AP=b.max(this.AP,t)},n.b6=function(){var t=this.wO.cues;if(t){for(var i=t.length,n=[],r=[],e=0;e=this._6){var o,h=null!=(o=null==u?void 0:u.THEOplayerTextTrackCue)?o:new nN(u);n.push(h)}else r.push(u)}yn(n,OP);for(var a,c=VP(this.L.NI.slice(),n),f=Lt(r);!(a=f()).done;){var v=a.value;this.wO.removeCue(v)}for(var d,l=Lt(c.b5);!(d=l()).done;){var w=d.value;w.kn(),this.XU(w)}for(var g,_=Lt(c.y5);!(g=_()).done;){var m=g.value;this.nV(m)}}},n.kn=function(){this.wO.removeEventListener("cuechange",this.v6),t.prototype.kn.call(this)},Nt(i,[{key:"o",get:function(){return this.wO.id||""}},{key:"eC",get:function(){return this.wO.inBandMetadataTrackDispatchType||""}},{key:"bs",get:function(){return this.wO.language||""}},{key:"u6",get:function(){return Xm(this.wO.mode)},set:function(t){this.wO.mode=t}},{key:"AO",get:function(){return this.wO}}]),i}(tN),nN=function(t){function i(i){var n,r=i.startTime,e=XD(i.value);return(n=t.call(this,r,e,i.id)||this).W5=void 0,n.W5=i,n.W5.THEOplayerTextTrackCue=n,n}return Ct(i,t),i.prototype.kn=function(){t.prototype.kn.call(this),this.W5.THEOplayerTextTrackCue=void 0},i}(ZD);U(),Et(),Wt(),xt(),Pt(),H(),ct(),Ft(),Qt(),U(),Et(),jt(),U(),Et();var rN=[eh.xw,eh.Ew,eh.yy,eh.Ay,eh.LICENSE_REQUEST_GENERATED];U(),Et(),xt(),Pt();var eN=function(t){function i(i){var n;return(n=t.call(this,eh.Ew)||this).errorObject=void 0,n.errorObject=i,n}return Ct(i,t),Nt(i,[{key:"error",get:function(){return this.errorObject.message}},{key:"licenseAcquisitionURL",get:function(){return this.errorObject.url}},{key:"status",get:function(){return this.errorObject.status}},{key:"statusText",get:function(){return this.errorObject.statusText}},{key:"licenseAcquisitionMessage",get:function(){return this.errorObject.response}},{key:"systemCode",get:function(){return this.errorObject.systemCode}}]),i}(rh);U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Wt(),xt(),Pt(),H(),Qt(),U(),Et(),Pt();var sN=function(t){function i(i){var n;return(n=t.call(this,eh.xw)||this).J6=void 0,n.J6=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var uN=function(t){function i(i){var n;return(n=t.call(this,"by")||this).J6=void 0,n.J6=i,n}return Ct(i,t),i}(rh),oN=new bd,hN=function(t){function i(i){var n;return(n=t.call(this,"Xs")||this).session=void 0,n.session=i,n}return Ct(i,t),i}(rh),aN=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).r8=void 0,e.s8=void 0,e.n8=void 0,e.i8=void 0,e.c8=void 0,e.hT=void 0,e.h8=void 0,e.t8=void 0,e.SS=void 0,e.a8=void 0,e.u8=void 0,e.r8=i,e.s8=n,e.n8=r,e.i8=!1,e.c8=!1,e.hT=new hr,e.t8=!1,e.SS=function(t){if(!e.hT.Yg.Hg)switch(t.Ry){case"license-request":case"license-renewal":e.hH(t.Iy,t.Dy).catch(function(t){return e.Ts(t)});break;default:e.Ts(new ug(vd.CONTENT_PROTECTION_NOT_SUPPORTED,"Unsupported CDM message type: "+t.Ry))}},e.a8=function(t){e.r8.xy.Xy(function(t,i){switch(t){case"usable":Ui.Og(function(){e.c8=!0,e.So(new sN(i))},100);break;case"expired":case"status-pending":default:break;case"output-restricted":case"internal-error":e.So(new uN(i))}}),e.t8=!0,e.So(t)},e.u8=function(t){e.Ts(new ug(vd.CONTENT_PROTECTION_INTERNAL_ERROR,"Unknown CDM error"))},i.wn("Iy",e.SS),i.wn(eh.Ay,e.a8),i.wn("lt",e.u8),i.uS.then(function(){return e.o8()},function(t){return e.Ts(t)}),e}Ct(i,t);var n=i.prototype;return n.gS=function(){var t=this;return this.i8=!0,oN.Zo(function(i){return t.e8(i)},this.hT.Yg)},n.e8=function(t){return Vt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,5]),dr(t),[4,this.s8.$V(t)];case 1:return s.sent(),[4,this.s8.tH(this.n8.Jm,this.n8.Py,t)];case 2:return i=s.sent(),[4,this.r8.gS(this.n8.Jm,this.n8.Py,i)];case 3:return s.sent(),[3,5];case 4:throw lr(n=s.sent()),r=V(n,Xa)?n.Zy:void 0,e=new ug(vd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error while performing the CDM request",n,void 0,void 0,void 0,void 0,r),this.Ts(e),e;case 5:return[2]}})}).call(this)},n.hH=function(t,i){return Vt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return h.trys.push([0,5,,6]),function(t){return Ca(t,Ha())}(t)?[4,this.s8._H(new E(t),this.hT.Yg)]:[3,2];case 1:return n=h.sent(),[3,4];case 2:return[4,this.s8.gH(new E(t),i,this.hT.Yg)];case 3:n=h.sent(),h.label=4;case 4:return[3,6];case 5:if(vr(r=h.sent()))return[2];throw r;case 6:if(this.hT.Yg.Hg)return[2];e=this.h8,s=new Va,this.h8=s,h.label=7;case 7:return h.trys.push([7,10,11,14]),[4,this.r8.er(n)];case 8:return h.sent(),[4,Ar(100)];case 9:return h.sent(),[3,14];case 10:throw u=h.sent(),o=V(u,Xa)?u.Zy:void 0,new ug(vd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error while applying license response",u,void 0,void 0,void 0,void 0,o);case 11:return void 0===e?[3,13]:[4,e.Yy];case 12:h.sent(),h.label=13;case 13:return s.Qy(),this.h8===s&&(this.h8=void 0),[7];case 14:return[2]}})}).call(this)},n.Ts=function(t){var i=V(t,ug)?t:new ug(vd.CONTENT_PROTECTION_ERROR,t.message,t);this.So(new eN(i)),this.Xs()},n.o8=function(){this.r8.mn("Iy",this.SS),this.r8.mn(eh.Ay,this.a8),this.r8.mn("lt",this.u8),this.c8=!1,this.t8=!1,this.hT.Zg(),this.So(new hN(this))},n.Xs=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:this.Vo(),i.label=1;case 1:return void 0===(t=this.h8)?[3,3]:[4,t.Yy];case 2:i.sent(),i.label=3;case 3:if(this.h8!==t)return[3,1];i.label=4;case 4:return this.o8(),[4,this.r8.Xs().catch(dn)];case 5:return i.sent(),[2]}})}).call(this)},Nt(i,[{key:"Z6",get:function(){return this.t8}}]),i}(th),cN=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).yS=void 0,e.ES=void 0,e.f8=void 0,e.l8=[],e._8=void 0,e.m8=[],e.S8=void 0,e.w8=function(t){if(t.type===eh.Ay)return null!=e.S8||(e.S8=new Ua),t.xy.Xy(function(t,i){e.S8.Gy(i,t)}),void(e.d8&&e.So(new oh(e.S8)));e.Rs(t)},e.y8=function(t){t.session.mn(rN,e.Rs),t.session.mn("Xs",e.y8),Xn(e.l8,t.session),e.S8=void 0},e.yS=i,e.ES=n,e.f8=r,e}Ct(i,t);var n=i.prototype;return n.ZV=function(){return this.f8.ZV()},n.v8=function(t){return this._8||(this._8=this.g8(t)),this._8},n.g8=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return dr(t),[4,this.f8._H(new E(Ha()),t)];case 1:if(i=n.sent(),dr(t),!this.ES)throw new y("Invalid MediaKeys when setting ServerCertificate");return[4,this.ES.PS(i.buffer)];case 2:return n.sent(),[2]}})}).call(this)},n.p8=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(!this.ES)throw new y("Invalid MediaKeys when creating KeySession");r.label=1;case 1:return r.trys.push([1,,3,4]),this.m8.push(t),[4,this.ES.kS("temporary")];case 2:return i=r.sent(),n=new aN(i,this.f8,t),this.l8.push(n),n.wn(rN,this.w8),n.wn("Xs",this.y8),[2,n];case 3:return Xn(this.m8,t),[7];case 4:return[2]}})}).call(this)},n.b8=function(t){if(t.A8)return!1;for(var i,n=Lt(this.l8);!(i=n()).done;){if(fN(i.value.n8,t))return!0}for(var r,e=Lt(this.m8);!(r=e()).done;){if(fN(r.value,t))return!0}return!1},n.kn=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.ES=void 0,this.Vo(),t=this.l8.slice(),Yn(this.l8),[4,ut.all(t.map(function(t){return t.Xs()}))];case 1:return i.sent(),this.S8=void 0,this.f8.zg(),[2]}})}).call(this)},Nt(i,[{key:"xS",get:function(){return this.yS}},{key:"d8",get:function(){return this.l8.every(function(t){return t.Z6})}}]),i}(th);function fN(t,i){if(t.A8)return!1;if(t.Jm!==i.Jm)return!1;if(Ca(t.Py,i.Py))return!0;if("sinf"===t.Jm&&"sinf"===i.Jm){var n=vN(t),r=vN(t);if(n&&r)return Pa(n,r)}return!1}function vN(t){try{var i=fa(_a(new E(t.Py)),new Ta),n=JSON.parse(i).sinf[0],r=new E(Oa(n)),e=new vm(_a(r),new Ta);return km.cB(e).SB.kB.PB}catch(t){return}}var dN=function(t){function i(i){var n;return(n=t.call(this)||this).PL=void 0,n.hT=new hr,n.ta=new bd,n.ZS=void 0,n.f8=void 0,n.aq=void 0,n.yS=void 0,n.U8=function(t){n.I8(t.Jm,t.Py,n.hT.Yg).catch(function(t){return n.Ts(t)})},n.PL=i,n.PL.wn(fh.Dw,n.U8),n}Ct(i,t);var n=i.prototype;return n.Un=function(t,i){this.aq=t,this.RZ(i)},n.RZ=function(t){this.ZS=t,this.k8(this.hT.Yg).catch(wr)},n.NZ=function(t){this.E8(t,this.hT.Yg).catch(wr)},n.E8=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:if(r=function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:if(r=h.value,void 0===(null==(s=Fn(t,function(t){return t.x8===r.xS.$m}))?void 0:s.P8))return[2,"continue"];if(null==(e=r.OW)?void 0:e.some(function(t){return Ca(s.P8,t)}))return[3,4];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,n.I8(r.xS.Jm,s.P8,i)];case 2:return u.sent(),[2,{v:void 0}];case 3:return lr(u.sent()),[3,4];case 4:return[2]}})},dr(i),!(null==(e=this.ZS)?void 0:e.fq))return[2];o=Lt(null!=(u=null==(s=this.ZS)?void 0:s.fq)?u:[]),c.label=1;case 1:return(h=o()).done?[3,4]:(n=this,[5,Xt(r())]);case 2:if("object"===W(a=c.sent()))return[2,a.v];c.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},n.k8=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return Ui.Zs.gp?[4,this.C8(t)]:[3,2];case 1:if(i.sent())return[2];i.label=2;case 2:return this.ZS&&this.ZS.D8?[4,this.N8(t)]:[3,4];case 3:return[2,i.sent()];case 4:return[2]}})}).call(this)},n.C8=function(t){return Vt(function(){var i,n,r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:if(!(null==(i=this.ZS)?void 0:i.fq))return[2,!1];r=!1,s=Lt(null!=(e=null==(n=this.ZS)?void 0:n.fq)?e:[]),l.label=1;case 1:if((u=s()).done)return[3,14];if(!(o=u.value).UW||0===o.UW.length)return[3,6];l.label=2;case 2:return l.trys.push([2,4,,5]),h={kids:o.UW.map(function(t){return t.id})},a=da(JSON.stringify(h)).buffer,[4,this.I8(ao,a,t)];case 3:return l.sent(),r=!0,[3,5];case 4:return lr(l.sent()),[3,5];case 5:if(r)return[2,!0];l.label=6;case 6:f=Lt(null!=(c=o.OW)?c:[]),l.label=7;case 7:if((v=f()).done)return[3,12];d=v.value,l.label=8;case 8:return l.trys.push([8,10,,11]),[4,this.I8(o.xS.Jm,d,t)];case 9:return l.sent(),r=!0,[3,11];case 10:return lr(l.sent()),[3,11];case 11:return[3,7];case 12:if(r)return[2,!0];l.label=13;case 13:return[3,1];case 14:return[2,!1]}})}).call(this)},n.B8=function(t){return t===uo||t===ho||t===oo||t===ao},n.I8=function(t,i,n){return Vt(function(){var r,e,s,u,o,h,a,c,f,v,d,l;return zt(this,function(w){switch(w.label){case 0:if(dr(n),!i.byteLength)return[2];if(!this.ZS||!this.ZS.fq.length)throw new ug(vd.CONTENT_PROTECTION_CONFIGURATION_MISSING,"Missing configuration for encrypted content");if(!this.B8(t))return[2];r=Dp(t,i),e=this.ZS.fq,u=[],o=Lt(e),w.label=1;case 1:if((h=o()).done)return[3,11];if(a=h.value,dr(n),!(c=r[a.xS.Zm])||a.xS.Jm!==t)return a.xS.Km===Eo.Xm&&u.push(!1),[3,10];w.label=2;case 2:return w.trys.push([2,9,,10]),[4,this.M8(a,n)];case 3:return(f=w.sent()).ZV()?[4,f.v8()]:[3,5];case 4:w.sent(),w.label=5;case 5:return v=this.PL.sP,d={Jm:a.xS.Jm,Py:c,A8:v},u.push(!0),this.L8(f,d)?[4,f.p8(d)]:[3,8];case 6:return[4,w.sent().gS()];case 7:w.sent(),this.So(new hh(c)),w.label=8;case 8:return[2];case 9:return lr(l=w.sent()),s=l,[3,10];case 10:return[3,1];case 11:return 0===u.length||u.some(ln)?[4,Ui._m()]:[2];case 12:throw w.sent()?new ug(vd.CONTENT_PROTECTION_NOT_SUPPORTED,"Encrypted content over an insecure connection is not supported",s):new ug(vd.CONTENT_PROTECTION_NOT_SUPPORTED,"Cannot create content decryption session",s)}})}).call(this)},n.N8=function(t){return Vt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(!(n=null==(i=this.ZS)?void 0:i.fq))return[2];r=Lt(n),o.label=1;case 1:if((e=r()).done)return[3,8];s=e.value,dr(t),o.label=2;case 2:return o.trys.push([2,6,,7]),[4,this.M8(s,t)];case 3:return(u=o.sent()).ZV()?[4,u.v8()]:[3,5];case 4:o.sent(),o.label=5;case 5:return[2];case 6:return lr(o.sent()),[3,7];case 7:return[3,1];case 8:return[2]}})}).call(this)},n.L8=function(t,i){return Ui.Zs._p||this.PL.ML.BL||!t.b8(i)},n.M8=function(t,i){var n=this;return this.ta.Zo(function(i){return n.O8(t,i)},i)},n.O8=function(t,i){return Vt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(dr(i),!this.ZS||!this.f8||!this.aq)throw new y("Not initialized");if(this.yS){if(this.yS.xS!==t.xS)throw new y("Internal key system error");return[2,this.yS]}return n=this.f8,r=Yu({},t,{Vq:t.Vq.map(function(i){var r;return Yu({},i,{persistentState:null!=(r=i.persistentState)?r:n.wH(t.xS),FS:i.FS||n.FS(t.xS)})})}),[4,this.aq.xZ(r.xS,r.Vq)];case 1:return e=o.sent(),s=n.LW(r),(u=new cN(r.xS,e,s)).wn(rN,this.Rs),this.yS=u,[2,u]}})}).call(this)},n.Ts=function(t){if(!vr(t)){var i=V(t,ug)?t:new ug(vd.CONTENT_PROTECTION_ERROR,t.message,t);this.So(new eN(i))}},n.hr=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.aq=void 0,this.ZS=void 0,this.hT.Zg(),this.hT=new hr,[4,this.F8()];case 1:return t.sent(),[2]}})}).call(this)},n.F8=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return[4,this.ta.Zg()];case 1:return i.sent(),(t=this.yS)?(t.mn(eh.yy,this.Rs),this.yS=void 0,[4,t.kn()]):[3,3];case 2:i.sent(),i.label=3;case 3:return[2]}})}).call(this)},n.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),this.PL.mn(fh.Dw,this.U8),[4,this.hr()];case 1:return t.sent(),[4,this.ta.kn()];case 2:return t.sent(),[2]}})}).call(this)},Nt(i,[{key:"T8",get:function(){var t;return null==(t=this.yS)?void 0:t.xS}},{key:"Rq",get:function(){return this.f8},set:function(t){this.f8=t}}]),i}(th);U(),Et(),Pt();var lN=function(t){function i(i){var n;return(n=t.call(this,eh.Vw)||this).currentTime=void 0,n.currentTime=i,n}return Ct(i,t),i}(rh);U(),Et(),xt(),Pt();var wN=function(t){function i(i){var n;return(n=t.call(this)||this).W8=void 0,n.V8=void 0,n.W8=i,n}Ct(i,t);var n=i.prototype;return n.u5=function(){var t;null==(t=this.V8)||t.u5()},n.hr=function(){var t;null==(t=this.V8)||t.hr()},n.zg=function(){this.Vo(),void 0!==this.V8&&(this.V8.zg(),this.V8=void 0)},n.H8=function(t){if(this.V8!==t){var i=this.AP;void 0!==this.V8&&this.V8.zg(),this.V8=t,void 0!==t&&(t.wn(Ry.AI,this.Rs),t.u5());var n=this.AP;i!==n&&this.So(new Py(this.W8.zx,n))}},Nt(i,[{key:"AP",get:function(){return void 0!==this.V8?this.V8.AP:Dy.zL}}]),i}(th);U(),Et(),xt(),Pt();var gN=function(t){function i(i,n,r){return t.call(this,i,n,"",r,void 0,Ng.WEBVTT)||this}Ct(i,t);var n=i.prototype;return n.q8=function(t,i,n){var r=new $g(t,i,n,!1);return this.nV(r),r},n.z8=function(t){this.XU(t)},Nt(i,[{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=_N(this)}}]),i}(KP);function _N(t){return Mw(jm(t),{get type(){return t.Km},addCue:function(i,n,r){return t.q8(i,n,r).Ca},removeCue:function(i){t.z8(i.IO)}})}U(),Et(),xt(),Pt(),Ft();var mN=function(t){function i(i,n,r){var e,s;return(e=t.call(this,i,n,r)||this).dE=!1,e.G8=[],e.X8=function(){var t;null==(t=e.h6)||t.removeEventListener("load",e.X8),e.dE=!0;for(var i,n=Lt(e.G8);!(i=n()).done;){var r=i.value;e.nV(r)}Yn(e.G8)},null==(s=e.h6)||s.addEventListener("load",e.X8),e.Km=Ng.WEBVTT,e}Ct(i,t);var n=i.prototype;return n.q8=function(t,i,n){var r=this.m6(new f.VTTCue(t,i,n));return this.dE?this.nV(r):this.G8.push(r),r},n.z8=function(t){Xn(this.G8,t),this.XU(t)},n.kn=function(){var i;t.prototype.kn.call(this),null==(i=this.h6)||i.removeEventListener("load",this.X8),Yn(this.G8)},Nt(i,[{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=_N(this)}}]),i}(qD);function yN(t,i){return void 0!==t.e4===i.q4.some(function(t){return Wv(t.GT)})&&void 0!==t.s4===i.q4.some(function(t){return zv(t.GT)})}function pN(t,i){return Vt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(e=t.W9,s=t.q9,"function"!=typeof(null==(r=l)||null==(n=r.mediaCapabilities)?void 0:n.decodingInfo))return[3,4];u={type:"media-source",video:e&&{contentType:e.GT,width:e.Ti,height:e.Mi,bitrate:e.z9,framerate:e.G9},audio:s&&{contentType:s.GT,channels:s.X9,bitrate:s.z9,samplerate:s.j9}},h.label=1;case 1:return h.trys.push([1,3,,4]),[4,l.mediaCapabilities.decodingInfo(u)];case 2:return[2,{H9:(o=h.sent()).supported,Q9:o.smooth,K9:o.powerEfficient}];case 3:return h.sent(),[3,4];case 4:return[2,{H9:(!s||i.isTypeSupported(s.GT))&&(!e||i.isTypeSupported(e.GT)),Q9:void 0,K9:void 0}]}})})()}U(),Et(),Wt(),Qt(),U(),Et(),Wt(),Qt();var kN=.05,bN=Bi.B_||Bi.L_,AN=Bi.Rg,TN=Bi.X_,SN=Bi.X_&&Bi.ru,EN=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).pT=void 0,u.sc=void 0,u.GJ=void 0,u.nq=void 0,u.kz=!0,u.aq=void 0,u.d7=new bd,u.K8=void 0,u.e9=void 0,u.p9=void 0,u.DZ=void 0,u.ha=new tS,u.ea=new nS,u.Gl=void 0,u.Oz=void 0,u.i7=[],u.t7=void 0,u.Y9=void 0,u.J9=void 0,u.Y8=void 0,u.P9=0,u.x9=NaN,u.Q8=void 0,u.U9=!1,u.D9=void 0,u.u7=0,u.Pz=!1,u.r5=!1,u.Z7=Dy.zL,u.s9=0,u.k9=ut.resolve(),u.T9=new hr,u.b9=[],u.Ho=EA.rL(),u.r9=void 0,u.o9=1,u.c9=!1,u.u9=1,u.Z8=!1,u.w7=!1,u.y7=!1,u.C9=!1,u.hw=void 0,u.t9=!1,u.i9=!1,u.j8=!1,u.Q7=!1,u.A7=0,u.N4=void 0,u.d9=!1,u.e7=function(t){var i=t.track,n=u.o7(i);if(!RN(u.t7,i)){if(Bi.X_){if(i.kind===Jm.zU)return void u.r7(i);if(i.kind===Jm.WU&&""===i.label&&""===i.language&&!CN(i))return void u.h7(i,n)}u.t7.tt(new qD(i.id,i,n))}},u.s7=function(t){var i=RN(u.t7,t.track);i&&u.t7.it(i)},u.n7=function(){for(var t=0;t=Dy.XL)&&void 0!==u.aq&&VR(u.aq)){var t=u.aq,i=t.e4,n=t.s4;if(i&&n){var r=u.zx,e=i.Fx,s=n.Fx;if(e.Cr(r)&&s.Cr(r))e.WM(s).jM(r-5,r)&&(u.j8?u.g7():u.p7())}}},u.E7=function(){u.So(new fT(u.zx))},u.x7=function(){u.S9(new fr),u.So(new cT(u.zx))},u.k7=function(){u.m9(),u.So(new Ly(u.zx))},u.D7=function(){u.h9()},u.B7=function(){u.So(new vT(u.ct))},u.I7=function(){u.So(new YR(u.zx))},u.C7=function(){u.So(new KR)},u.F7=function(){u.Pz||u.r5||u.U9?u.U9=!1:u.So(new gT(u.zx))},u.U7=function(){u.L9(u.zx),u.U9=!1},u.P7=function(){var t=u.zx,i=u.xP,n=u.e9.AP0&&u.DP>0&&u.So(new Ey)},u.V7=function(t){u.So(new vh(t.initDataType,t.initData||new ArrayBuffer(0)))},u.H7=function(){u.So(new dh)},u.z7=function(t){var i=t.initData,n=i?ba(i).buffer:new ArrayBuffer(0);u.So(new vh(uo,n))},u.W7=function(t){var i=t.initData;if(i){var n=function(t){try{var i=_a(t),n=new Ta;return oa(ha(Fh(i,n,qh(i,n,!0)),!0))}catch(t){return}}(i);if(!n)return;u.So(new vh(ho,n.buffer))}else u.So(new vh(ho,new ArrayBuffer(0)))},u.q7=function(t){var i=t.initData,n=i?ba(i).buffer:new ArrayBuffer(0);u.So(new vh(uo,n))},u._9=function(){u.m9()},u.g9=function(t){u.S9(t)},u.ett=function(t){u.So(t),t.type===eh.Ew&&u.Qq(cg(t.errorObject))},u.pT=i,u.hw=n,u.sc=r,u.Oz=e,u.GJ=s,u.e9=new wN(u),u.e9.wn(Ry.AI,u.itt),u.e9.H8(new IP(u)),u.p9=new NP(u),u.p9.wn(Ry.PM,u.k7),u.DZ=new dN(u),u.DZ.wn(rN,u.ett),u.Gl=new Km,u.t7=new Km,u.Y9=new Rb([u.Gl,u.t7]),u.J9=new JD(u),u.b7(),u.Hq(),u}Ct(i,t);var n=i.prototype;return n.J8=function(){return void 0!==this.Y8&&this.ct===this.Y8},n.h9=function(){var t=this.vP;this.o9!==t&&(this.o9=t,this.So(new dT(this.zx,t)))},n.n9=function(){var t=this.OP,i=this.oP;this.u9===t&&this.c9===i||(this.u9=t,this.c9=i,this.So(new _T(this.zx,this.OP)))},n.hP=function(){return mR(this.pT)},n.QP=function(){this.d9||(this.d9=!0);var t=this.l9();return this.f9(),t},n.f9=function(){this.t9?this.i9&&(this.i9=!1,this.So(new fT(this.zx))):this.v9()},n.v9=function(){if(this.K8)this.K8.QP();else{Bi.X_&&!Bi.ru&&this.pT.preload===YT.pz&&(this.pT.preload=YT.zU);var t=this.vP,i=this.pT.play();t!==this.hq.playbackRate&&(this.vP=t),this.Z8=!1,Gi(i)?i.then(this._9,this.g9):this.p9.g5()&&this.m9()}},n.jP=function(){this.t9?this.i9||(this.i9=!0,this.So(new cT(this.zx))):this.w9()},n.w9=function(){this.K8?this.K8.jP():(this.pT.pause(),this.p9.er()),this.y9(new fr)},n.l9=function(){var t=new Va;return this.b9.push(t),t.Yy},n.A9=function(){for(var t,i=Lt(this.b9);!(t=i()).done;){t.value.Qy(void 0)}Yn(this.b9)},n.y9=function(t){for(var i,n=Lt(this.b9);!(i=n()).done;){i.value.Ky(t)}Yn(this.b9)},n.m9=function(){this.t9||this.K8||this.A9()},n.S9=function(t){this.t9||this.K8||this.y9(t)},n.Oy=function(t,i,n){void 0===i&&(i=!1),void 0===n&&(n=!1),this.K8?this.K8.Oy(t,i,n):(this.T9.Zg(),this.T9=new hr,this.k9=_r(this.E9(t,i,n,this.k9,this.T9.Yg),this.T9).catch(dn))},n.$W=function(t){var i=this.uq;if(i&&!S(i.getTime())){var n=(t.getTime()-i.getTime())/1e3;this.Oy(n)}},n.E9=function(t,i,n,r,e){return Vt(function(){var s,u,o,h,a,c,f,v,d,l,w,g,_,m,y,p,k,A;return zt(this,function(T){switch(T.label){case 0:return T.trys.push([0,24,,25]),this.Y8=t,this.x9=t,this.P9=Ui.Mg(),n&&!this.Pz?this.r5=!0:(this.Pz=!0,this.r5=!1),this.Z8&&!this.J8()&&(this.Z8=!1),this.r5?(this.So(new pP(this.zx)),(Bi.w_||Bi.S_)&&(t+=kN)):this.So(new wT(t)),[4,r.catch(dn)];case 1:return T.sent(),dr(e),this.aq&&!this.aq.ZZ()?(this.I9(),[2]):(this.C9&&this.R9(),this.e9.AP!==Dy.zL?[3,3]:[4,this.e9.ww(Ry.AI,e)]);case 2:T.sent(),T.label=3;case 3:if(!(0===this.pT.seekable.length||Bi.X_&&this.pT.seekable.end(0)===1/0||SN&&!this.d9))return[3,9];s={stack:[],error:void 0,hasError:!1},T.label=4;case 4:return T.trys.push([4,6,7,8]),void 0!==this.D9&&0===this.pT.seekable.length?(this.I9(),[2]):(u=qt(s,hr.ep([e]),!1),[4,ut.race([ew(this.pT,"timeupdate",u.Yg),Ar(100,u.Yg)])]);case 5:return T.sent(),dr(e),[3,8];case 6:return o=T.sent(),s.error=o,s.hasError=!0,[3,8];case 7:return Gt(s),[7];case 8:return[3,3];case 9:h=cP(this.Fx,t,kN),a=this.kP,c=!0,f=!1,T.label=10;case 10:0,v={stack:[],error:void 0,hasError:!1},T.label=11;case 11:return T.trys.push([11,20,21,22]),(a=this.kP).V>0&&!a.Cr(h)&&((l=a.LM(h))===a.An(0)&&Bi.X_&&this.ct===1/0&&function(t){return(null==t?void 0:t.Cd.Km)===Iy.AV}(this.aq)&&a.Cr(l-kN)&&(l-=kN),h=l,c=!0),!i||!Ui.Zs.Dp&&this.pT.fastSeek||(w=this.Fx).Cr(h)||(g=cP(w,h,1))!==h&&(h=g,c=!0),TN&&void 0!==(_=this.N9())&&h>_&&(h=_,c=!0),f?[3,14]:void 0!==(m=this.B9())&&h>m?(f=!0,[4,this.M9(m,!1,e)]):[3,14];case 12:return T.sent(),[4,ew(this.pT,"seeked",e)];case 13:T.sent(),dr(e),c=!0,T.label=14;case 14:return c?(c=!1,[4,this.M9(h,i,e)]):[3,18];case 15:T.sent(),dr(e),y=this.zx,a=this.kP,h=a.LM(h),p=1,T.label=16;case 16:return b.abs(h-y)>=ve?(a=this.kP,h=function(t,i,n){void 0===n&&(n=0);if(!i.V)return 0;var r=i.LM(t),e=IN*n;r===i.Tn(0)?r+=e:r===i.An(i.V-1)&&(r-=e);return r}(h,a,p),[4,this.M9(h,i,e)]):[3,18];case 17:return T.sent(),dr(e),y=this.zx,p++,[3,16];case 18:return this.pT.seeking||this.e9.AP0}U(),Et(),xt(),Pt();var PN={sZ:void 0,nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0,aZ:void 0,uZ:void 0,cZ:void 0,dZ:void 0,lZ:void 0},DN=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).hu=void 0,i}return Ct(i,t),Nt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=DR(this)),this.hu}},{key:"sZ",get:function(){}},{key:"nZ",get:function(){}},{key:"rZ",get:function(){}},{key:"hZ",get:function(){}},{key:"oZ",get:function(){}},{key:"aZ",get:function(){}},{key:"stt",get:function(){}},{key:"uZ",get:function(){}},{key:"cZ",get:function(){}},{key:"dZ",get:function(){}},{key:"lZ",get:function(){}}]),i}(th),NN=function(t){function i(i,n,r,e){return t.call(this,i,n,r,new DN,e)||this}return Ct(i,t),i.prototype.zP=function(){},Nt(i,[{key:"DP",get:function(){return 0}},{key:"MP",get:function(){return 0}}]),i}(EN);U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),xt();var xN=function(){function t(t){void 0===t&&(t=5),this.ntt=void 0;var i=f.document.createElement("div");i.className="theoplayer-texttracks",i.style.position="absolute",i.style.display="none",i.style.overflow="hidden",i.style.pointerEvents="none",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.width="100%",i.style.height="100%",i.style.lineHeight="1.3em",i.style.zIndex=""+t,this.ntt=i,this.be()}var i=t.prototype;return i.we=function(){this.ntt.style.display="none"},i.be=function(){this.ntt.style.display="block"},i.Y7=function(t){t.appendChild(this.ntt)},i.kn=function(){Zi(this.ntt)},Nt(t,[{key:"xe",get:function(){return this.ntt}}]),t}();function BN(t,i){return Yu({},i,Vw(function(t){return{sZ:t.sZ,nZ:t.nZ,rZ:t.rZ,hZ:t.hZ,oZ:t.oZ,aZ:t.aZ,uZ:t.uZ,cZ:t.cZ,dZ:t.dZ,lZ:t.lZ}}(t)))}function ON(t){return t.rZ&&Uo(t.rZ,"%")?Number(t.rZ.replace("%",""))/100:t.rZ&&Uo(t.rZ,"em")?Number(t.rZ.replace("em","")):1}U(),Et(),xt(),H(),Ft(),U(),Et(),Pt(),Ft(),U(),Et(),xt(),Ft(),U(),Et(),U(),Et(),xt();var MN=function(){function t(t,i,n,r){this.ott=void 0,this.utt=void 0,this.Ti=void 0,this.Mi=void 0,this.ott=t,this.utt=i,this.Ti=n,this.Mi=r}var i=t.prototype;return i.ctt=function(t){return this.ottt.ott&&this.uttt.utt},i.pO=function(t){return this.ott<=t.ott&&t.htt<=this.htt&&this.utt<=t.utt&&t.att<=this.att},i.Fy=function(){return new t(this.ott,this.utt,this.Ti,this.Mi)},i.dtt=function(i){return new t(this.ott+i,this.utt+i,b.max(0,this.Ti-2*i),b.max(0,this.Mi-2*i))},i.ltt=function(i){var n=b.min(this.ott,i.ott),r=b.max(this.htt,i.htt),e=b.min(this.utt,i.utt);return new t(n,e,r-n,b.max(this.att,i.att)-e)},Nt(t,[{key:"htt",get:function(){return this.ott+this.Ti},set:function(t){this.ott=t-this.Ti}},{key:"att",get:function(){return this.utt+this.Mi},set:function(t){this.utt=t-this.Mi}}]),t}(),LN=function(){function t(t,i,n,r,e){var s=this;this.Ptt=Zu(),this.qtt=!0,this.mtt=void 0,this.ytt=Yu({},PN),this.Gtt=[],this.WO=void 0,this.pT=void 0,this.sc=void 0,this.Ttt=void 0,this.Itt=function(t){return s.nV(t.PO)},this.Ctt=function(t){return s.XU(t.PO)},this.Rtt=function(){return s.Vtt()},this.Btt=function(t){return s.Ftt(t.PO)},this.Mtt=function(t){return s.Utt(t.PO)},this.Ltt=function(t){return s.ztt(t.PO)},this.Att=function(t){return s.oe(t.width,t.height)},this.WO=t,this.Ttt=this.mtt=e,this.pT=this.Ytt(n),this.sc=r,i.appendChild(this.pT)}var i=t.prototype;return i.ftt=function(t){var i=this._tt(t);if(!i)return!1;for(var n,r=Lt(i);!(n=r()).done;){Zi(n.value)}return this.gtt(t),!0},i.GY=function(){var t=this;this.btt(),this.WO.L.NI.forEach(function(i){return t.nV(i)}),this.Wu.wn(fI.yn,this.Att),this.oe(this.Wu.Eu,this.Wu.Iu)},i.Stt=function(t){this.ytt=t,this.mtt=BN(this.ytt,this.Ttt),this.mtt.sZ&&(this.hq.style.fontFamily=this.mtt.sZ),this.oe(this.Wu.Eu,this.Wu.Iu),this.ktt(!0)},i.Ett=function(){return this.mtt},i.xtt=function(t){return this.Ptt.has(t.JI)},i.btt=function(){this.WO.wn(Nw.uI,this.Itt),this.WO.wn(Nw.dI,this.Ctt),this.WO.wn(Nw.pa,this.Rtt)},i.Dtt=function(){this.WO.mn(Nw.uI,this.Itt),this.WO.mn(Nw.dI,this.Ctt),this.WO.mn(Nw.pa,this.Rtt)},i.Ntt=function(t){t.wn(Ug.QL,this.Btt),t.wn(Ug.KL,this.Mtt),t.wn(Ug.xI,this.Ltt)},i.Ott=function(t){t.mn(Ug.QL,this.Btt),t.mn(Ug.KL,this.Mtt),t.mn(Ug.xI,this.Ltt)},i.nV=function(t){this.Ntt(t),t.ro&&this.Ftt(t)},i.XU=function(t){this.Ott(t),this.Utt(t)},i.Vtt=function(){this.WO.Qk===zm.Kn?this.Htt():this.Wtt()},i.Htt=function(){if(this.qtt){this.qtt=!1;var t=this.Wu.Eu,i=this.Wu.Iu;this.oe(t,i),this.ktt(!1)}},i.Wtt=function(){this.qtt||(this.qtt=!0,this.ktt(!0))},i.Ftt=function(t){this.qtt||t.ro&&!this.xtt(t)&&this.ktt(!1)},i.Utt=function(t){this.xtt(t)&&this.ktt(!0)},i.ztt=function(t){(t.ro||this.xtt(t))&&this.ktt(!0)},i.ktt=function(t){var i=this.Gtt,n=this.qtt?[]:this.WO.q.NI.slice();this.Xtt(n,i,t),this.Gtt=n},i._tt=function(t){return this.Ptt.get(t.JI)},i.jtt=function(t,i){this.Ptt.set(t.JI,i)},i.gtt=function(t){this.Ptt.delete(t.JI)},i.Qtt=function(t){var i=[],n=this.mtt;if(void 0!==n.uZ){var r=t.Fy();r.Mi=n.uZ,i.push(r)}if(void 0!==n.cZ){var e=t.Fy();e.Mi=n.cZ,e.att=t.att,i.push(e)}return i},i.Ktt=function(){return this.Gtt.slice()},i.kn=function(){var t=this;Zi(this.hq),this.Ptt.clear(),this.Dtt(),this.WO.L.NI.forEach(function(i){return t.Ott(i)}),this.Wu.mn(fI.yn,this.Att)},Nt(t,[{key:"Ht",get:function(){return this.WO}},{key:"hq",get:function(){return this.pT}},{key:"Wu",get:function(){return this.sc}},{key:"ptt",get:function(){return this.mtt}},{key:"wtt",get:function(){return this.ytt}}]),t}();function FN(t,i,n,r,e){var s=t.Fy(),u=s,o=1,h=!1,a=T(getComputedStyle(i).lineHeight)/4;if(!S(a)&&a>0){for(var c=0;cf&&(u=t.Fy(),o=f),t=s.Fy()}r.pO(t)||(u=s.Fy())}i.style.left=(u.ott-r.ott)/r.Ti*100+"%",i.style.top=(u.utt-r.utt)/r.Mi*100+"%"}function UN(t,i){return i.some(function(i){return t.ctt(i)})}function VN(t){return new MN(t.left,t.top,t.width,t.height)}var HN=function(t){return t[t.POS_X=0]="POS_X",t[t.NEG_X=1]="NEG_X",t[t.POS_Y=2]="POS_Y",t[t.NEG_Y=3]="NEG_Y",t}({});function WN(t,i,n){switch(i){case 0:t.ott+=n;break;case 1:t.ott-=n;break;case 2:t.utt+=n;break;case 3:t.utt-=n}}function zN(t,i,n,r){switch(n){case 0:return t.htt>i.htt+r;case 1:return t.otti.att+r;case 3:return t.utt0?t.KE[0]:null;return i&&hw(i)?"data:image/png;base64,"+i.lk:""}(i),e.id=t.id,e.style.height="100%",e.style.maxWidth="100%",function(t,i){var n=t.style;on(n,"flex"),n.flexDirection=n.webkitFlexDirection="column";var r=i.ox("smpte:backgroundImageVertical"),e="center";if(r)switch(r.toLowerCase()){case"left":e="flex-start";break;case"center":e="center";break;case"right":e="flex-end";break;case"inherit":e="inherit"}n.justifyContent=n.webkitJustifyContent=e;var s=i.ox("smpte:backgroundImageHorizontal"),u="center";if(s)switch(s.toLowerCase()){case"left":u="flex-start";break;case"center":u="center";break;case"right":u="flex-end";break;case"inherit":u="inherit"}n.alignItems=n.webkitAlignItems=u}(t,n),t.appendChild(e)}function ax(t,i,n,r,e,s){if(n)for(var u,o=Lt(n.split(" "));!(u=o()).done;){var h=u.value;if(r[h])for(var a,c=Lt(k.keys(r[h]));!(a=c()).done;){var f=a.value;"style"===f.toLowerCase()?ax(t,i,r[h][f],r,e,s):cx(t,i,f,r[h][f],e,s)}}}function cx(t,i,n,r,e,s){var u=t.style;switch(n){case"backgroundColor":u.backgroundColor=r;break;case"color":u.color=r;break;case"direction":u.direction=r;break;case"display":"none"===r&&(u.display="none");break;case"fontFamily":var o;u.fontFamily=null!=(o=$N.get(r))?o:r;break;case"fontSize":var h=r;if(Uo(h,"px")){var a=Number(h.slice(0,-2));h=a*s/16+"em"}else Uo(h,"c")&&(h=h.replace("c","em"));u.fontSize=h,u.lineHeight&&"inherit"!==u.lineHeight||(u.lineHeight=tx);break;case"fontStyle":u.fontStyle=r;break;case"fontWeight":u.fontWeight=r;break;case"lineHeight":var c=r;if(Uo(c,"px")){var f=Number(c.slice(0,-2));c=f*s+"px"}u.lineHeight=c;break;case"opacity":u.opacity=r;break;case"overflow":u.overflow=r;break;case"padding":u.padding=r;break;case"textAlign":u.textAlign=r;break;case"textDecoration":switch(r){case"lineThrough":u.textDecoration="line-through";break;case"underline":case"overline":u.textDecoration=r;break;case"noUnderline":case"noLineThrough":case"noOverline":u.textDecoration="none"}break;case"unicodeBidi":switch(r){case"bidiOverride":u.unicodeBidi="bidi-override";break;case"normal":case"embed":case"isolate":u.unicodeBidi=r}break;case"visibility":u.visibility=r;break;case"zIndex":u.zIndex=r;break;case"displayAlign":var v;switch(r.toLowerCase()){case"before":v="flex-start";break;case"center":v="center";break;case"after":v="flex-end";break;case"justify":v="space-between";break;default:return}u.justifyContent=u.webkitJustifyContent=v;break;case"extent":var d,l,w=fx(i.toLowerCase())?e:t,g=r.split(" ",2);2===g.length?(d=g[0],l=g[1]):d=l="100%",w&&(w.style.height=l,w.style.width=d);break;case"origin":var _=fx(i.toLowerCase())?e:t,m=r.split(" ",2),y=m[0],p=m[1];_&&(y||p)&&(y&&(_.style.left=y),p&&(_.style.top=p));break;case"showBackground":case"textOutline":break;case"wrapOption":switch(r){case"wrap":u.whiteSpace="normal";break;case"noWrap":u.whiteSpace="nowrap"}break;case"writingMode":var k,b,A,T;switch(r){case"lrtb":case"lr":k="horizontal-tb";break;case"rltb":k="horizontal-tb",b="rtl",T="bidi-override";break;case"tbrl":case"tb":k="vertical-rl",A="upright";break;case"tblr":k="vertical-lr",A="upright";break;case"rl":k="horizontal-tb",b="rtl";break;default:return}u.writingMode=k,u.setProperty("-webkit-writing-mode",k),b&&(u.direction=b),A&&(u.textOrientation=A,u.setProperty("-webkit-text-orientation",A)),T&&(u.unicodeBidi=T);break;case"linePadding":if(Uo(r,"c")){var S=r.replace("c","em");u.paddingLeft=u.paddingRight=S}break;case"multiRowAlign":"auto"===r.toLowerCase()?u.textAlign="":u.textAlign=r}}function fx(t){return"div"===t||"p"===t||"span"===t}function vx(t){var i=t.style;on(i,"flex"),i.flexDirection=i.webkitFlexDirection="column",i.top="auto",i.left="5%",i.width="90%",i.height="100%",i.maxHeight="100%",i.maxWidth="100%",i.overflow="visible",i.position="absolute",i.fontFamily=JN,i.color=GN.WHITE,i.background=GN.TRANSPARENT,i.textShadow=jN("uniform"),i.textAlign="start",i.writingMode="horizontal-tb",i.setProperty("-webkit-writing-mode","horizontal-tb"),i.padding="0",i.margin="0",i.fontSize="inherit",i.lineHeight="inherit"}function dx(t){var i=t.style;i.fontFamily="inherit",i.color="inherit",i.fontSize="inherit",i.lineHeight="inherit",i.textShadow="inherit"}function lx(t){var i=VN(t.getBoundingClientRect());if("visible"===getComputedStyle(t).overflow&&t.scrollHeight>t.clientHeight)for(var n=t.children,r=0;r":return i.Ly(1),o;case"EOF":return o;default:r=s,n="StartTag"}break;case"StartTag":switch(s){case"\t":case"\f":case" ":n="StartTagAnnotation";break;case"\n":u=s,n="StartTagAnnotation";break;case".":n="StartTagClass";break;case">":return i.Ly(1),{Km:"starttag",$E:r,eit:[]};case"EOF":return{Km:"starttag",$E:r,eit:[]};default:r+=s}break;case"StartTagClass":switch(s){case"\t":case"\f":case" ":e.push(u),u="",n="StartTagAnnotation";break;case"\n":e.push(u),u=s,n="StartTagAnnotation";break;case".":e.push(u),u="";break;case">":return i.Ly(1),e.push(u),{Km:"starttag",$E:r,eit:e};case"EOF":return e.push(u),{Km:"starttag",$E:r,eit:e};default:u+=s}break;case"StartTagAnnotation":switch(s){case"&":n="CharRefInAnnotation";break;case">":i.Ly(1);var a=u.trim();return{Km:"starttag",$E:r,eit:e,sit:a=a.replace(/\s/," ")};default:u+=s}break;case"CharRefInAnnotation":for(var c="",f=i.ac;">"===t.charAt(f);f++)c+=t.charAt(f);u+=c||"&",n="StartTagAnnotation";break;case"EndTag":switch(s){case">":return i.Ly(1),{Km:"endtag",$E:r};case"EOF":return{Km:"endtag",$E:r};default:r+=s}break;case"TimestampTag":switch(s){case">":return i.Ly(1),{Km:"timestamp",nit:r};case"EOF":return{Km:"timestamp",nit:r};default:r+=s}}i.Ly(1)}return o}U(),Et(),Pt(),Ft(),U(),Et();var _x=function(t){return t.rit="string",t.hit="starttag",t.oit="endtag",t.ait="timestamp",t}({});function mx(t,i){void 0===t.textContent?t.innerText=i:t.textContent=i}U(),Et();var yx={nZ:GN.WHITE,sZ:"sans-serif",rZ:"100%",hZ:"rgba(0,0,0,0.8)",oZ:GN.TRANSPARENT,aZ:"none",uZ:void 0,cZ:void 0,dZ:void 0,lZ:void 0},px="theoplayer-webvtt-region-",kx="theoplayer-webvtt-styling-",bx="theoplayer-webvtt-default-style",Ax=5.23,Tx=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,yx)||this).cit=Ju(),s.uit=Px(3),function(t){var i,n=function(t){var i=null==t.getRootNode?void 0:t.getRootNode.call(t);if(i&&i.host)return i}(t),r=null!=(i=null!=n?n:t.ownerDocument)?i:v;if(r.getElementById(bx))return;for(var e,s=[],u=Lt(xx);!(e=u()).done;){var o=e.value,h=o[0],a=o[1];s.push("."+kx+h+" { color: "+a+" !important; }"),s.push("."+kx+"bg"+Bx+h+" { background-color: "+a+" !important; }"),s.push("video::cue(."+h+") { color: "+a+"; }"),s.push("video::cue(.bg"+Bx+h+") { background-color: "+a+"; }")}var c=v.createElement("style");c.id=bx,c.innerHTML=s.join("\n"),n?n.appendChild(c):r.body.appendChild(c)}(n),s}Ct(i,t);var n=i.prototype;return n.Ytt=function(t){var i=v.createElement("div");i.className="theoplayer-webvtt-texttrack-"+t,an(i),i.style.overflow="hidden",i.style.pointerEvents="none";var n=this.ptt.sZ;return n&&(i.style.fontFamily=n),i.style.whiteSpace="pre-line",i},n.GY=function(){this.hq.appendChild(this.uit),t.prototype.GY.call(this)},n.oe=function(t,i){var n=this,r=b.min(t/100,i/100),e=ON(this.ptt);this.cit.forEach(function(t){var i=t.OO,s=t.dit;n.fit(s,r,e,i)}),this.fit(this.uit,r,e)},n.Stt=function(i){OR(this.hq,i),t.prototype.Stt.call(this,i)},n.Xtt=function(t,i,n){for(var r,e,s=this,u=this.hq,o=this.Wu.Iu/100,h=[],a=Lt(t);!(e=a()).done;){var c=e.value;void 0!==c.OO&&(jn(h,c.OO)||h.push(c.OO))}this.cit.forEach(function(t,i){var r=t.OO,e=t.dit;!n&&jn(h,r)||(Zi(e),s.cit.delete(i))});for(var f,v=Lt(i);!(f=v()).done;){var d=f.value;!n&&d.ro||this.ftt(d)}var l=[],w=VN(this.uit.getBoundingClientRect());(r=l).push.apply(r,[].concat(this.Qtt(w)));for(var g,_=Lt(h);!(g=_()).done;){var m=g.value,y=void 0;this.cit.has(m.o)?y=this.cit.get(m.o).dit:(y=Dx(m,o),u.appendChild(y),this.cit.set(m.o,{OO:m,dit:y})),l.push(VN(y.getBoundingClientRect()))}t.sort(Ox);for(var p,k=Lt(t);!(p=k()).done;){var b=p.value,A=this.tit(b,l,w);void 0!==A&&l.push(A.dtt(.1))}},n.tit=function(t,i,n){var r,e;t.OO?(e=this.cit.get(t.OO.o).dit,"up"===t.OO.iF&&e.children.length>=1&&(e.style.transitionProperty="top",e.style.transitionDuration="0.433s")):e=this.uit;var s=null==(r=this._tt(t))?void 0:r[0];if(s||(s=this.vit(t),this.jtt(t,[s])),e.appendChild(s),t.OO||(Sx(s,t),t.FO?function(t,i,n,r){var e=Nx(t),s=e?n.Mi:n.Ti,u=T(getComputedStyle(i).lineHeight);if(0===u||S(u))return;var o=VN(i.getBoundingClientRect()),h=b.round(t_(t));"rl"===t.Pt&&(h=-(h+1));var a=u*h;"rl"===t.Pt&&(a=a-o.Ti+u);h<0&&(a+=s,u=-u);e?o.utt+=a:o.ott+=a;var c=o.Fy(),f=!1;for(;!n.pO(o)||UN(o,r);)if(e)if(u<0&&o.utt0&&o.att>n.att){if(o.utt=c.utt,f)break;u=-u,f=!0}else o.utt+=u;else if(u<0&&o.ott0&&o.htt>n.htt){if(o.ott=c.ott,f)break;u=-u,f=!0}else o.ott+=u;e?i.style.top=(o.utt-n.utt)/n.Mi*100+"%":i.style.left=(o.ott-n.ott)/n.Ti*100+"%"}(t,s,n,i):function(t,i,n,r){var e,s=VN(i.getBoundingClientRect());if(0===s.Ti||0===s.Mi)return;Nx(t)?"center"===t.MO?s.utt-=s.Mi/2:"end"===t.MO&&(s.utt-=s.Mi):"center"===t.MO?s.ott-=s.Ti/2:"end"===t.MO&&(s.ott-=s.Ti);e=""===t.Pt?[HN.POS_Y,HN.NEG_Y,HN.POS_X,HN.NEG_X]:"lr"===t.Pt?[HN.POS_X,HN.NEG_X,HN.POS_Y,HN.NEG_Y]:[HN.NEG_X,HN.POS_X,HN.POS_Y,HN.NEG_Y];FN(s,i,e,n,r)}(t,s,n,i)),!t.OO)return VN(s.getBoundingClientRect())},n.vit=function(t){for(var i=new Ta,n=t.U,r=this._it(t),e={git:void 0,xe:r},s=e,u="",o="",h=[e],a=[],c=[];i.ac0?c[c.length-1]:"")):"rt"===A&&"ruby"===b?(h.pop(),h.pop(),s=h[h.length-1]):"lang"===b&&(a.pop(),u=a.length>0?a[a.length-1]:"")}else if(f.Km===_x.ait){var T=f.nit,S=new Ta;try{X_(T,S)}catch(t){ze("ERROR collecting timestamp",t)}}}return r},n.pit=function(t,i){var n=this.ptt,r=this.wtt;n.hZ&&(t.style.background=n.hZ);var e=r.nZ||i||n.nZ;e&&(t.style.color=e)},n.fit=function(t,i,n,r){if(r){var e=Ix(r,i);t.style.height=e*n+"px",t.style.left=Rx(r)+"%",t.style.top=Cx(r,i)+"px"}t.style.fontSize=Ax*i*n+"px"},n._it=function(t){var i=v.createElement("div");i.style.position="absolute",i.style.margin="0",i.style.padding="0",i.style.unicodeBidi="plaintext",i.style.wordWrap="break-word",i.style.overflowWrap="break-word",i.style.width="auto",i.style.textAlign=t.DO,function(t,i){"rl"===i.Pt?t.style.writingMode="vertical-rl":"lr"===i.Pt?t.style.writingMode="vertical-lr":t.style.writingMode="horizontal-tb"}(i,t),function(t,i){var n=r_(i);Nx(i)?(t.style.width=n+"%",t.style.height="auto"):(t.style.height=n+"%",t.style.width="auto")}(i,t),Sx(i,t);var n=this.ptt.oZ;n&&(i.style.background=n);var r=this.ptt.nZ;return r&&(i.style.color=r),i.style.textShadow=jN(this.ptt.aZ),i},i}(LN);function Sx(t,i){var n,r,e=n_(i),s=i_(i),u=r_(i);if(Nx(i)){switch(e){case"line-left":n=s;break;case"center":n=s-u/2;break;case"line-right":n=s-u}r=i.FO?0:t_(i)}else{switch(e){case"line-left":r=s;break;case"center":r=s-u/2;break;case"line-right":r=s-u}n=i.FO?0:t_(i)}t.style.left=n+"%",t.style.top=r+"%"}function Ex(t,i){for(var n,r=Lt(i);!(n=r()).done;){var e=n.value;if(e.git){for(var s,u=Lt(e.git.eit);!(s=u()).done;){var o=s.value;sn(t,kx+o)}"v"===e.git.$E.toLowerCase()&&e.git.sit&&sn(t,"theoplayer-webvtt-voice-"+e.git.sit)}}}function Ix(t,i){return t.ZO*(Ax*i)*1.14}function Rx(t){return t.eF-t.$O*t.Ti/100}function Cx(t,i){var n=t.sF,r=t.tF*Ix(t,i)/100;return b.max(0,n-r)}function Px(t){var i=v.createElement("div");return i.className=px+"default",an(i),i.style.wordWrap="break-word",i.style.writingMode="horizontal-tb",i.style.pointerEvents="none",i.style.width="auto",i.style.height="auto",i.style.maxHeight="100%",i.style.minHeight="0px",i.style.padding="0",i.style.boxSizing="border-box",i.style.fontSize=Ax*t+"px",i.style.lineHeight="1.14em",i}function Dx(t,i){var n=Px(i);n.className=px+t.o;var r=t.Ti,e=Ix(t,i);return n.style.width=r+"%",n.style.height=e+"px",n.style.left=Rx(t)+"%",n.style.right="",n.style.top=Cx(t,i)+"px",n.style.bottom="",n.style.boxSizing="border-box",n}function Nx(t){return""===t.Pt}var xx=[["white","#fff"],["lime","#0f0"],["cyan","#0ff"],["red","#f00"],["yellow","#ff0"],["magenta","#f0f"],["blue","#00f"],["black","#000"]],Bx=String.fromCharCode(95);function Ox(t,i){var n=t_(t),r=t_(i),e=Mx(n,t.FO),s=Mx(r,i.FO);return e&&s?n-r||OP(i,t)||i.JI-t.JI:OP(t,i)||t.JI-i.JI}function Mx(t,i){return i?t<0?t>-8:t>8:t>50}U(),Et(),xt(),Pt(),Ft(),U(),Et(),xt(),U(),Et();var Lx=function(t){return t.FONT_REGULAR="regular",t.FONT_UNDERLINE="underline",t.FONT_ITALICS="italics",t.FONT_UNDERLINE_ITALICS="underline-italics",t}({}),Fx={nZ:GN.WHITE,sZ:qN.nl,rZ:"100%",hZ:GN.BLACK,oZ:"transparent",aZ:"none",mit:"regular",uZ:void 0,cZ:void 0,dZ:void 0,lZ:void 0},Ux=[{wit:GN.WHITE,mit:"regular",yit:0},{wit:GN.WHITE,mit:"underline",yit:0},{wit:GN.GREEN,mit:"regular",yit:0},{wit:GN.GREEN,mit:"underline",yit:0},{wit:GN.BLUE,mit:"regular",yit:0},{wit:GN.BLUE,mit:"underline",yit:0},{wit:GN.CYAN,mit:"regular",yit:0},{wit:GN.CYAN,mit:"underline",yit:0},{wit:GN.RED,mit:"regular",yit:0},{wit:GN.RED,mit:"underline",yit:0},{wit:GN.YELLOW,mit:"regular",yit:0},{wit:GN.YELLOW,mit:"underline",yit:0},{wit:GN.MAGENTA,mit:"regular",yit:0},{wit:GN.MAGENTA,mit:"underline",yit:0},{wit:GN.WHITE,mit:"italics",yit:0},{wit:GN.WHITE,mit:"underline-italics",yit:0},{wit:GN.WHITE,mit:"regular",yit:0},{wit:GN.WHITE,mit:"underline",yit:0},{wit:GN.WHITE,mit:"regular",yit:4},{wit:GN.WHITE,mit:"underline",yit:4},{wit:GN.WHITE,mit:"regular",yit:8},{wit:GN.WHITE,mit:"underline",yit:8},{wit:GN.WHITE,mit:"regular",yit:12},{wit:GN.WHITE,mit:"underline",yit:12},{wit:GN.WHITE,mit:"regular",yit:16},{wit:GN.WHITE,mit:"underline",yit:16},{wit:GN.WHITE,mit:"regular",yit:20},{wit:GN.WHITE,mit:"underline",yit:20},{wit:GN.WHITE,mit:"regular",yit:24},{wit:GN.WHITE,mit:"underline",yit:24},{wit:GN.WHITE,mit:"regular",yit:28},{wit:GN.WHITE,mit:"underline",yit:28}],Vx=[11,-1,1,2,3,4,12,13,14,15,5,6,7,8,9,10];function Hx(t,i){return y_(t.Ait,i.Ait)||xn(t.zB,i.zB)}U(),Et(),Ft();var Wx=32,zx=/CC([1-4])=(.*)/;function Xx(t){if(!t)return[];var i=[],n=t.trim().split(";");if(n.every(function(t){return t.match(zx)}))for(var r,e=Lt(n);!(r=e()).done;){var s=r.value.match(zx),u=s[1],o=s[2];i.push({Sit:Number(u),Tit:o})}else for(var h=0;h=0;n-=1){var r=i[n];r.Ht===t&&(r.kn(),qn(i,n))}},i.oet=function(i){(function(t){return t===Jm.HU||t===Jm.WU})(i.Lt)&&t.iet(i)&&(i.AP===Dg.ERROR?this.het(i):this.ret(i))},i.hr=function(){for(var t,i=Lt(this.tet);!(t=i()).done;){var n=t.value;n.Ht.mn(Nw.AI,this.uet),n.Ht.mn(Nw.kI,this.uet),n.kn()}Yn(this.tet)},i.kn=function(){this.hr();for(var t,i=Lt(this.tet);!(t=i()).done;){t.value.kn()}this.Gl.mn(Iw.rI,this.cet),this.Gl.mn(Iw.oI,this.det),this.Gl.mn(Nw.pa,this.uet),this.aet.mn(ZT.pa,this.let),this.ea.mn([NT.QL,NT.KL],this.let),this.Oz.mn("bI",this.fet)},t.iet=function(t){switch(t.Km){case Ng.TTML:case Ng.SRT:case Ng.WEBVTT:case Ng.CEA608:return!0}return!1},Nt(t,[{key:"d6",get:function(){return this.aet.ds||this.ea.YL}}]),t}();U(),Et(),Wt(),xt(),Pt(),Qt();var Yx=function(t){function i(i){var n;return(n=t.call(this)||this).vet=void 0,n._et=!1,n.pet=function(){n._et=!0,n.So(new xT)},n.met=function(){n._et=!1,n.So(new BT)},n.vet=i,n.vet.addEventListener("enterpictureinpicture",n.pet),n.vet.addEventListener("leavepictureinpicture",n.met),n}Ct(i,t);var n=i.prototype;return n.yo=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.JL?this.YL?[3,3]:(t=this.ww([NT.QL,NT.ma]),[4,this.vet.requestPictureInPicture()]):[3,4];case 1:return i.sent(),[4,t];case 2:i.sent(),this._et||this.So(new iS),i.label=3;case 3:return[3,5];case 4:this.So(new iS),i.label=5;case 5:return[2]}})}).call(this)},n.jo=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.JL?this._et?(t=this.ww([NT.KL,NT.ma]),[4,this.vet.ownerDocument.exitPictureInPicture()]):[3,3]:[3,4];case 1:return i.sent(),[4,t];case 2:i.sent(),this._et&&this.So(new iS),i.label=3;case 3:return[3,5];case 4:this.So(new iS),i.label=5;case 5:return[2]}})}).call(this)},n.kn=function(){this.Vo(),this.vet.removeEventListener("enterpictureinpicture",this.pet),this.vet.removeEventListener("leavepictureinpicture",this.met)},Nt(i,[{key:"JL",get:function(){var t;return null!=(t=this.vet.ownerDocument.pictureInPictureEnabled)&&t}},{key:"YL",get:function(){return this._et}}]),i}(th);function Kx(t){var i=new CI,n=function(t){var i=[];return II.la(t)&&i.push(new II(t)),RI.la(t)&&i.push(new RI(t)),i}(t);if(n.length>0){for(var r,e=Lt(n);!(r=e()).done;){var s=r.value;i.EK(s)}i.kK(n[0])}return i}var Jx=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this,i,n,r,e,s)||this).bet=void 0,u.Aet=void 0,u.wet=void 0,u.yet=void 0,u.wet=Kx(i),u.yet=new Yx(i),u.bet=new xN,u.Aet=new Qx(u.bet.xe,u.Wu,u.nt,u.Ql,u.Ma,u.Sq),u}Ct(i,t);var n=i.prototype;return n.zP=function(){return this.pT},n.zg=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.yet.kn(),this.wet.kn(),this.bet.kn(),this.Aet.kn(),[4,t.prototype.zg.call(i)];case 1:return n.sent(),[2]}})}).call(this)},n.we=function(){t.prototype.we.call(this),this.bet.we()},n.be=function(){t.prototype.be.call(this),this.bet.be()},n.Y7=function(i){t.prototype.Y7.call(this,i),this.bet.Y7(i)},Nt(i,[{key:"hq",get:function(){return this.pT}},{key:"DP",get:function(){return this.pT.videoHeight}},{key:"MP",get:function(){return this.pT.videoWidth}},{key:"Ma",get:function(){return this.wet}},{key:"Sq",get:function(){return this.yet}}]),i}(EN);U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et();U(),Et(),Wt(),Qt(),U(),Et();var Zx=!1,$x=function(t){return t.Tet="HELLO",t.ket="HI_THERE",t.Eet="INITIALIZE",t.xet="APPEND_INIT",t.Pet="APPEND_DATA",t.Iet="ACK",t.Cet="REMOVE",t.Ret="DESTROY_SESSION",t}({}),tB=function(){function t(){this.im=void 0,this.yT=void 0,this.ta=new bd}var i=t.prototype;return i.Det=function(t){var i=this;return this.ta.Zo(function(t){return Vt(function(){var i,n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return dr(t),i=new MessageChannel,n=i.port1,r=i.port2,l.serviceWorker.controller?[3,2]:[4,ew(l.serviceWorker,"install",t)];case 1:h.sent(),h.label=2;case 2:return"activated"===l.serviceWorker.controller.state?[3,4]:[4,ew(l.serviceWorker.controller,"activate",t)];case 3:h.sent(),h.label=4;case 4:e={kind:"HELLO",port:r},l.serviceWorker.controller.postMessage(e,[r]),n.start(),this.im=n,h.label=5;case 5:return h.trys.push([5,7,,8]),[4,ew(n,"message",t)];case 6:if(s=h.sent(),"HI_THERE"!==(u=s.data).kind)throw new y("Could not set up message channel");return this.yT=u.sessionId,[3,8];case 7:throw vr(o=h.sent())&&this.Net(),o;case 8:return[2]}})}).call(i)},t)},i.Bet=function(t,i){var n=this;return this.im,this.ta.Zo(function(){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:if(!this.im)throw new y("MessageSession not set up yet or already closed.");return i||(i=[]),this.im.postMessage(t,i),[4,ew(this.im,"message")];case 1:return[2,n.sent().data]}})}).call(n)})},i.Met=function(){var t=this;return this.ta.Zo(function(){return t.Net()})},i.Net=function(){if(l.serviceWorker.controller&&"activated"===l.serviceWorker.controller.state&&this.im){var t={kind:"DESTROY_SESSION"};Zx,this.im.postMessage(t),this.im.close(),this.im=void 0}},t}();U(),Et(),xt();var iB=function(){function t(){this.Oet=1/0}var i=t.prototype;return i.Fet=function(t,i){var n=t-i;this.Oet=n>this.Let?this.Oet:n},i.Uet=function(t){this.Oet=t},Nt(t,[{key:"Let",get:function(){return this.Oet}}]),t}();U(),Et(),Wt(),xt(),Qt(),U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et();var nB=function(t){return t.Bk="audio",t.Mk="video",t.zU="metadata",t}({}),rB=function(t){function i(i,n){var r;return(r=t.call(this)||this).IQ=void 0,r.Xet=void 0,r.Vet=void 0,r.Het=void 0,r.ta=void 0,r.qet=void 0,r.Wet=void 0,r.IQ=i,r.Xet=n,r.Vet=void 0,r.Het=void 0,r.ta=new bd,r.qet=!1,r.Wet=!1,r}Ct(i,t);var n=i.prototype;return n.G3=function(t,i){},n.X3=function(t,i){},n.jZ=function(){return this.Wet},n.j3=function(){return Vt(function(){return zt(this,function(t){return[2]})})()},n.f3=function(t,i){return Vt(function(){return zt(this,function(t){return[2]})})()},n.Q2=function(t,i,n){return Vt(function(){var r,e,s;return zt(this,function(u){if(r=this,t.Km!==zR.wZ)throw new y("Streaming or opaque segments are not supported yet.");return e=t.lk,s=function(){return Vt(function(){var t,n,r;return zt(this,function(s){switch(s.label){case 0:return t=e.buffer,n={kind:$x.Pet,mediaType:eB(this.IQ),segment:e,startPts:i.Get,totalDuration:i.ct},[4,this.Xet.Bet(n,[t])];case 1:return s.sent(),void 0===this.Vet&&(r=i.Get+i.EU,this.Vet=r,this.Het=r),this.Het=this.Het+i.ct,this.So(new rh(HR.pZ)),[2]}})}).call(r)},[2,this.ta.Zo(function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:dr(t),i.label=1;case 1:return i.trys.push([1,,3,4]),this.qet=!0,[4,s()];case 2:return i.sent(),[3,4];case 3:return this.qet=!1,[7];case 4:return[2]}})}).call(r)},n)]})}).call(this)},n.J2=function(t,i,n){return Vt(function(){var i,r,e;return zt(this,function(s){if(i=this,t.Km!==zR.wZ)throw new y("Streaming or opaque initialization segments are not supported yet.");return r=t.lk,e=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t={kind:$x.xet,mediaType:eB(this.IQ),segment:r},[4,this.Xet.Bet(t,[])];case 1:return i.sent(),[2]}})}).call(i)},[2,this.ta.Zo(function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:dr(t),i.label=1;case 1:return i.trys.push([1,,3,4]),this.qet=!0,[4,e()];case 2:return i.sent(),[3,4];case 3:return this.qet=!1,[7];case 4:return[2]}})}).call(i)},n)]})}).call(this)},n.F3=function(){this.Wet=!0},n.I3=function(){this.Wet=!1},n.pS=function(t,i,n){return Vt(function(){var t,r;return zt(this,function(e){return t=this,r=function(){return Vt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return t={kind:$x.Cet,mediaType:eB(this.IQ),endTime:i},[4,this.Xet.Bet(t)];case 1:return n.sent(),this.Vet=void 0,this.Het=void 0,this.So(new rh(HR.pZ)),[2]}})}).call(t)},[2,this.ta.Zo(function(i){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:dr(i),t.label=1;case 1:return t.trys.push([1,,3,4]),this.qet=!0,[4,r()];case 2:return t.sent(),[3,4];case 3:return this.qet=!1,[7];case 4:return[2]}})}).call(t)},n)]})}).call(this)},n.IZ=function(t){return this.IQ===t.GT},n.RZ=function(t){return this.IQ=t.GT,ut.resolve()},n.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),[4,this.ta.kn()];case 1:return t.sent(),[2]}})}).call(this)},Nt(i,[{key:"Fx",get:function(){return void 0===this.Vet||void 0===this.Het?EA.rL():new EA([this.Vet,this.Het])}},{key:"Cd",get:function(){return{GT:this.IQ}}},{key:"V3",get:function(){return Wv(this.IQ)?eg.Bk:zv(this.IQ)?eg.Mk:eg.yk}},{key:"lQ",get:function(){return this.IQ}},{key:"W3",get:function(){return EA.rL()}},{key:"VY",get:function(){return 30},set:function(t){}},{key:"zY",get:function(){return 30},set:function(t){}},{key:"ga",get:function(){return this.qet}},{key:"zet",get:function(){return this.Vet}},{key:"RO",get:function(){return this.Het}}]),i}(th);function eB(t){return t.match(/video/)?nB.Mk:nB.Bk}var sB=function(){function t(t,i,n,r){this.ZS=void 0,this.hw=void 0,this.pT=void 0,this.B4=void 0,this.M4=void 0,this.ES=void 0,this.ZS=t,this.M4=Fn(i,function(t){return Boolean(t.lQ.match(/video/))}),this.B4=Fn(i,function(t){return Boolean(t.lQ.match(/audio/))}),this.hw=n,this.pT=r,this.Qet()}var i=t.prototype;return i.Qet=function(){},i.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,ut.all([this.B4,this.M4].filter(Li).map(function(t){return t.zg()}))];case 1:return t.sent(),[2]}})}).call(this)},i.F4=function(t){},i.W4=function(t,i,n,r){},i.F3=function(){var t,i;null==(t=this.B4)||t.F3(),null==(i=this.M4)||i.F3()},i.I3=function(){var t,i;null==(t=this.B4)||t.I3(),null==(i=this.M4)||i.I3()},i.IZ=function(t){return!!yN(this,t)},i.RZ=function(t){return this.ZS=t,ut.resolve()},i.NZ=function(t){},i.xZ=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,this.hw.nw(t.Ym,i)];case 1:return[4,r.sent().RS()];case 2:return n=r.sent(),[4,this.PZ(n)];case 3:return r.sent(),[2,n]}})}).call(this)},i.PZ=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:if(t&&!this.pT.src)throw new ug(vd.CONTENT_PROTECTION_ERROR,"Attempted to attach MediaKeys to a sourceless MediaElement");if(!t&&this.pT.src)throw new ug(vd.CONTENT_PROTECTION_ERROR,"Attempted to remove MediaKeys from a non-empty MediaElement");return(i=this.ES)?[4,i.IS(this.pT)]:[3,2];case 1:n.sent(),this.ES=void 0,n.label=2;case 2:return t?[4,t._n(this.pT)]:[3,4];case 3:n.sent(),this.ES=t,n.label=4;case 4:return[2]}})}).call(this)},t.jet=function(i,n,r,e){for(var s=[],u=0;u0){var n,r,e=(t=i[0]).width,s=this.vet.videoWidth/this.vet.videoHeight,u=t.height;e/u>s?(n=u*s,r=u):(r=e/s,n=e),this.vet.style.width=n+"px",this.vet.style.height=r+"px",this.vet.style.marginLeft=(e-n)/2+"px",this.vet.style.marginTop=(u-r)/2+"px",this.vet.style.backgroundColor="black"}},n.yst=function(){this.vet.style.width="100%",this.vet.style.height="100%",this.vet.style.marginLeft="",this.vet.style.marginTop="",this.vet.style.backgroundColor=""},n.bq=function(t,i,n,r,e){},n.sI=function(t,i,n,r,e,s,u,o,h){var a=new KP(t,i,n,r,e,s,u,h,o);return this.Gl.tt(a),this.J9.tt(a),a},n.Tq=function(t){throw y("Not supported.")},n.$Z=function(t){},n.V9=function(t){return ut.resolve({H9:!1})},n.hP=function(){return mR(this.vet)},n.be=function(){this.vet.style.display="block",this.bet.be()},n.we=function(){this.vet.style.display="none",this.bet.we()},n.G7=function(){},n.Un=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(t.Km===Iy.AV)throw new y("Not yet implemented");return[4,this.Xet.Det()];case 1:return r.sent(),i=Fn(t.fq,function(t){return t.xS.Km===Eo.jm}),n={kind:$x.Eet,mediaBufferConfigs:t.q4.map(function(t){return t.GT}),fairPlaySdkUri:null==i?void 0:i.GH},[4,this.Xet.Bet(n)];case 2:return r.sent(),this.aq=sB.jet(t,this.Xet,this.hw,this.vet),this.DZ.Un(this.aq,t),this.vet.setAttribute("x-webkit-airplay","deny"),this.vet.setAttribute("x-webkit-wirelessvideoplaybackdisabled",""),this.vet.disableRemotePlayback=!0,this.vet.preload="none",this.vet.src="https://theo.proxy/"+this.Xet.yT+"/master.m3u8",[2,this.aq]}})}).call(this)},n.X7=function(){},n.rV=function(t){this.Gl.it(t),this.J9.it(t)},n.Eq=function(){for(var t,i=Lt(this.Gl.NI.slice());!(t=i()).done;){t.value.kn()}this.Gl.hr()},n.$W=function(t){},n.wq=function(){return!1},n.Y7=function(t){t.appendChild(this.vet),this.bet.Y7(t)},n.zP=function(){return this.vet},n.$P=function(){},Nt(i,[{key:"hq",get:function(){return this.vet}},{key:"d5",get:function(){return!1}},{key:"zx",get:function(){return this.vet.currentTime+this.dst.Let}},{key:"lP",get:function(){return this.vet.paused}},{key:"OP",get:function(){return this.vet.volume},set:function(t){this.vet.volume=t}},{key:"vP",get:function(){return this.vet.playbackRate},set:function(t){this.vet.playbackRate=t}},{key:"lst",get:function(){return this.vet.defaultPlaybackRate}},{key:"Fx",get:function(){var t,i;return null!=(i=null==(t=this.aq)?void 0:t.Fx)?i:EA.rL()}},{key:"fst",get:function(){return EA.jn(this.vet.buffered)}},{key:"pP",get:function(){var t=this.vst;return this.Ho.HM(t.Ly(this.dst.Let))}},{key:"vst",get:function(){return EA.jn(this.vet.played)}},{key:"xP",get:function(){return this.Pz}},{key:"n5",get:function(){return!1}},{key:"_5",get:function(){return!1}},{key:"ct",get:function(){return this.vet.duration}},{key:"oP",get:function(){return this.vet.muted},set:function(t){this.vet.muted=t}},{key:"zit",get:function(){return this.vet.style}},{key:"ML",get:function(){return Yu({},FR,{BL:!0})}},{key:"AP",get:function(){return this.e9.AP}},{key:"DP",get:function(){return this.vet.videoHeight}},{key:"MP",get:function(){return this.vet.videoWidth}},{key:"Qx",get:function(){return this.vet.ended}},{key:"Mi",get:function(){return this.vet.offsetHeight*Ui.Zs.fp}},{key:"Ti",get:function(){return this.vet.offsetWidth*Ui.Zs.fp}},{key:"sP",get:function(){return!1}},{key:"j7",get:function(){return this.Q7}},{key:"Vx",get:function(){}},{key:"Wu",get:function(){return this.bst}},{key:"lt",get:function(){}},{key:"Ma",get:function(){return this.wet}},{key:"Sq",get:function(){return this.ea}},{key:"kP",get:function(){return this.aq?this.aq.kP:EA.rL()}},{key:"uq",get:function(){}},{key:"nt",get:function(){return this.Gl}},{key:"Ql",get:function(){return this.Oz}},{key:"WP",get:function(){return!1},set:function(t){}},{key:"a9",get:function(){return"block"===this.vet.style.display}},{key:"Rq",get:function(){return this.DZ.Rq},set:function(t){this.DZ.Rq=t}},{key:"J7",get:function(){},set:function(t){}},{key:"T8",get:function(){}}]),i}(th),oB=[eg.Bk,eg.Mk],hB=function(){function t(t,i,n,r,e,s){void 0===r&&(r=2),void 0===e&&(e=oB),void 0===s&&(s=Nd()),this.Cst=void 0,this.Ast=void 0,this.hw=void 0,this.Sst=void 0,this.sc=void 0,this.Oz=void 0,this.GJ=void 0,this.kst=void 0,this.Cst=r,this.Ast=[].concat(e),this.hw=s,this.sc=t,this.Oz=i,this.GJ=n,this.Sst=Ju(),this.Ist()}var i=t.prototype;return i.Est=function(t){for(var i,n=Lt(this.Fz);!(i=n()).done;){i.value.Y7(t)}},i.Yq=function(t){var i=this.Sst.get(t);if(i){var n=Fn(i,function(t){return t.xst});return n?(n.xst=!1,n.Tst):void 0}},i.Pst=function(t){if(!this.kst){var i,n=null==(i=this.Sst.get(eg.Mk))?void 0:i[0].Tst.hq;if(!n)throw new y("Error creating iOS Safari MediaController");this.kst=new uB(n,this.hw,this.sc,this.Oz),n.parentElement&&this.kst.Y7(n.parentElement)}return this.kst},i.Dq=function(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return i=t.hq,n=i.tagName.toLowerCase(),[4,t.hr()];case 1:return e.sent(),Nr(i),(r=Fn(this.Sst.get(n)||[],function(i){return t===i.Tst}))&&(r.xst=!0),[2]}})}).call(this)},i.Nz=function(){for(var t,i=Lt(this.Fz);!(t=i()).done;){t.value.K7()}},i.kn=function(){for(var t,i=Lt(this.Fz);!(t=i()).done;){var n=t.value,r=n.hq;n.zg(),Dr(r),Zi(r)}this.Sst.clear(),this.kst=void 0},i.Ist=function(){for(var t,i=Lt(this.Ast);!(t=i()).done;){var n=t.value,r=[];this.Sst.set(n,r);for(var e=0;e0)for(;n1||t<=0)throw new RangeError("The step must be a number greater than 0 and smaller than or equal to 1");var n;return n="function"==typeof f.IntersectionObserver?new lB(this.bo,t,this.jst(i)):new gB(this.bo,t,this.jst(i)),this.Qst.push(n),n},i.Uo=function(t){t.KP(),Xn(this.Qst,t)},i.Xst=function(t){for(var i,n=Lt(this.Qst);!(i=n()).done;){var r=i.value;if(r.Ca===t)return r}},i.kn=function(){for(var t,i=Lt(this.Qst);!(t=i()).done;){t.value.KP()}Yn(this.Qst)},Nt(t,[{key:"qst",get:function(){return this.zst}},{key:"Lo",get:function(){return this.Gst},set:function(t){if(S(t)||t<0||t>1)throw new RangeError("The threshold must be a value between 0 and 1");this.Gst=t}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{get ratio(){return t.qst},get visible(){return t.qst>t.Lo},get visibleThreshold(){return t.Lo},set visibleThreshold(i){i=Xw(i),t.Lo=i},addObserver:function(i,n){return i=Xw(i),t.Do(i,n).Ca},removeObserver:function(i){var n=t.Xst(i);n&&t.Uo(n)}}}(this)),this.hu}}]),t}();U(),Et(),Pt();var mB=function(t){function i(){return t.call(this,eh.Iw)||this}return Ct(i,t),i}(rh),yB=function(t){function i(i,n,r,e){var s;(s=t.call(this)||this).dnt=void 0,s.Cd=void 0,s.Pa=void 0,s.cnt=void 0,s.Dx=void 0,s.oJ=void 0,s.bJ=void 0,s.ant=void 0,s.ont=void 0,s.Mz=void 0,s.Lz=void 0,s.rnt=void 0,s.QJ=void 0,s.tnt=void 0,s.unt=void 0,s.Oz=void 0,s.Yst=!1,s.ko=!1,s.yO=void 0,s.bz=void 0,s.lnt=!1,s.Bz=void 0,s.Zst=void 0,s.ent=void 0,s.$st=void 0,s.Jc=void 0,s.Io=void 0,s.int=void 0,s.Na=void 0,s.hnt=function(t){if(!s.lnt){s.lnt=!0;var i=s.dnt,n=cg(t);s.Pa.OI=new uS(s.xe,n,t),kr(i.kn())}},s.fnt=function(t){t.type!==eh.Xw&&t.type!==eh.Gw&&s.So(t)};var u=Xw(n.uid);S(u)?s.yO=kg++:s.yO=u,s.Cd=n;var o=Ui.Dx,h=new RR;s.cnt=new rI("10.3.0",o,h),s.Mz=new hR,s.Lz=new Db;var a=new cB(o,s.Mz);s.Dx=new YI(a,n.allowMixedContent),s.QJ=null!=r?r:new DE(n.isEmbeddable,"10.3.0",SE()),s.rnt=new IR(o,s.QJ,s.cnt,h,n,SE()),s.rnt.qJ().catch(s.hnt),s.tnt=new AI(i),s.tnt.wn(fI.yn,s.Rs),s.Oz=new BR;var c=new(null!=e?e:hB)(s.tnt,s.Oz,n);c.Est(i),s.oJ=new dR,s.bJ=new wR;var f=new sS(i,n,s.Dx,s.Mz,s.Lz,c,s.Oz);s.Mz.GY(f);var v=f;return v=new lR(v,s.snt),v=new gR(v,s.yJ),s.dnt=v,s.Pa=new WT(s.dnt),s.Pa.lw(s.fnt),s.int=new _R(s.Pa),s.ent=new ZI(s.Pa,s.Dx,s.Mz),s.ant=new cI(s),s.unt=new PI(s.Pa,n.allowNativeFullscreen),s.ont=new MI(s.unt,s.Pa.Aa()),s.tnt._n(),s.Io=new _B(i),s.Bz=new hB(s.tnt,s.Oz,n,1,[eg.Mk]),s.Zst=new FI(s.Bz),s.$st=new kR,s}Ct(i,t);var n=i.prototype;return n.Ux=function(){return this.Pa.Fx},n.Gx=function(){return this.Pa.zx},n.Xx=function(t,i){this.Pa.Xx(t,i)},n.nnt=function(){return this.Gx()},n.Nd=function(){return this.Pa.ct},n.Yx=function(){return this.Pa.lt},n.Zx=function(){return this.Pa.Jx},n.uP=function(t){this.Pa.oP=t,t||this.lP||this.GP()},n._P=function(){return this.Pa.vP},n.gP=function(t){this.Pa.vP=t},n.mP=function(){return this.Pa.pP},n.EP=function(){return this.Pa.kP},n.UP=function(t){this.Pa.OP=t},n.Ea=function(){IT(this,yS,this)},n.QP=function(){this.Pa.QP()},n.jP=function(){this.Pa.jP()},n.nu=function(){return this.bz},n.Ta=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.bz=t,t?(this.rnt.Nj(t).catch(this.hnt),n=function(t){t.sources;var i=t.sources.filter(function(t){return Fi(t.integration)});return t.sources=i,t}(t),[4,this.Pa.Ta(n,i)]):[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})}).call(this)},n.IP=function(t,i,n){return this.Pa.IP(t,i,n)},n.CP=function(){return this.Pa.CP()},n.GP=function(){if(!this.ko){this.Pa.GP(),this.Zst.GP();for(var t=this.xe.getElementsByTagName("video"),i=0;i0]}})}).call(this)},n.Yrt=function(i,n,r){return t.prototype.Q2.call(this,i,n,r)},n.Jrt=function(i,n,r){return t.prototype.pS.call(this,i,n,r)},Nt(i,[{key:"Tst",get:function(){return this.PL},set:function(t){this.PL=t}}]),i}(AO),SO=function(t){function i(i){var n;return(n=t.call(this,i)||this).PL=void 0,n.Brt(i),n}return Ct(i,t),i.prototype.Lrt=function(t){var i=new TO(t);return i.Tst=this.PL,i},Nt(i,[{key:"Tst",get:function(){return this.PL},set:function(t){this.PL=t,this.B4&&(this.B4.Tst=t),this.M4&&(this.M4.Tst=t)}}]),i}(kO);U(),Et(),xt(),Pt();var EO=function(t){function i(){return t.apply(this,arguments)||this}return Ct(i,t),Nt(i,[{key:"wP",get:function(){return this.aq.wP},set:function(t){this.aq.wP=t}}]),i}(pO);function IO(t){var i=function(t){function i(){return t.apply(this,arguments)||this}return Ct(i,t),i.prototype.zP=function(){return this.PL.zP()},Nt(i,[{key:"hq",get:function(){return this.PL.hq}},{key:"MP",get:function(){return this.PL.MP}},{key:"DP",get:function(){return this.PL.DP}}]),i}(t);return i}U(),Et(),xt(),Pt(),U(),Et(),xt(),Pt(),U(),Et(),Wt(),xt(),Pt(),Qt();var RO=function(t){function i(i){var n;return(n=t.call(this)||this).PL=void 0,n.aq=void 0,n.nht=new tA,n.dht=function(t){return n.iI(t)},n.PL=i,n.nht.OI=i.nt,n.PL.wn(LR,n.dht),n}Ct(i,t);var n=i.prototype;return n.Ux=function(){return this.PL.Fx},n.Hx=function(){return this.PL.Vx},n.Gx=function(){return this.PL.zx},n.Nd=function(){return this.PL.ct},n.$rt=function(){return this.PL.uq},n.tht=function(){return this.PL.Qx},n.qP=function(){return this.PL.Ma},n.Aa=function(){return this.PL.Sq},n.iht=function(){return this.PL.lP},n.mP=function(){return this.PL.pP},n.TP=function(){return this.PL.AP},n.EP=function(){return this.PL.kP},n.PP=function(){return this.PL.xP},n.eht=function(){return this.PL.n5},n.sht=function(){return this.PL._5},n.RP=function(){return this.nht},n.Ett=function(){return this.PL.Ql},n.rht=function(){return this.PL.Rq},n.hht=function(t){this.PL.Rq=t},n.oht=function(t){this.PL.J7=t},n.aht=function(){return this.PL.T8},n.hP=function(){return this.PL.hP()},n.QP=function(){return this.PL.QP()},n.jP=function(){this.PL.jP()},n.Oy=function(t,i,n){this.PL.Oy(t,i,n)},n.$W=function(t){this.PL.$W(t)},n.be=function(){this.PL.be()},n.we=function(){this.PL.we()},n.sI=function(t,i,n,r,e,s,u,o){return this.PL.sI(t,i,n,r,e,s,u,o)},n.Tq=function(t){return this.PL.Tq(t)},n.wq=function(){return this.PL.wq()},n.bq=function(t,i,n,r,e){return this.PL.bq(t,i,n,r,e)},n.rV=function(t){this.PL.rV(t)},n.Eq=function(){this.PL.Eq()},n.$Z=function(t){return this.PL.$Z(t)},n.V9=function(t){return this.PL.V9(t)},n.Un=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return[4,this.PL.Un(t)];case 1:return i=r.sent(),n=t.Km===Iy.AV?this.uht(i):this.cht(i),this.aq=n,[2,n]}})}).call(this)},n.hr=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.aq?[4,this.aq.zg()]:[3,2];case 1:t.sent(),this.aq=void 0,t.label=2;case 2:return[4,this.PL.hr()];case 3:return t.sent(),[2]}})}).call(this)},n.F8=function(){return this.PL.F8()},n.G7=function(){this.PL.G7()},n.X7=function(){this.PL.X7()},n.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),this.PL.mn(LR,this.dht),this.nht.OI=void 0,this.nht.kn(),this.aq?[4,this.aq.zg()]:[3,2];case 1:t.sent(),this.aq=void 0,t.label=2;case 2:return[2]}})}).call(this)},n.K7=function(){this.PL.K7()},n.fht=function(t){this.PL.mn(LR,this.dht),this.PL=t,this.nht.OI=t.nt,this.PL.wn(LR,this.dht)},n.iI=function(t){this.So(t)},Nt(i,[{key:"Zrt",get:function(){return this.PL}},{key:"Fx",get:function(){return this.Ux()}},{key:"Vx",get:function(){return this.Hx()}},{key:"zx",get:function(){return this.Gx()}},{key:"Wu",get:function(){return this.PL.Wu}},{key:"ct",get:function(){return this.Nd()}},{key:"uq",get:function(){return this.$rt()}},{key:"Qx",get:function(){return this.tht()}},{key:"lt",get:function(){return this.PL.lt}},{key:"Mi",get:function(){return this.PL.Mi}},{key:"Ti",get:function(){return this.PL.Ti}},{key:"Ma",get:function(){return this.qP()}},{key:"Sq",get:function(){return this.Aa()}},{key:"oP",get:function(){return this.PL.oP},set:function(t){this.PL.oP=t}},{key:"lP",get:function(){return this.iht()}},{key:"vP",get:function(){return this.PL.vP},set:function(t){this.PL.vP=t}},{key:"pP",get:function(){return this.mP()}},{key:"AP",get:function(){return this.TP()}},{key:"kP",get:function(){return this.EP()}},{key:"xP",get:function(){return this.PP()}},{key:"n5",get:function(){return this.eht()}},{key:"_5",get:function(){return this.sht()}},{key:"nt",get:function(){return this.RP()}},{key:"Ql",get:function(){return this.Ett()}},{key:"a9",get:function(){return this.PL.a9}},{key:"OP",get:function(){return this.PL.OP},set:function(t){this.PL.OP=t}},{key:"j7",get:function(){return this.PL.j7}},{key:"sP",get:function(){return this.PL.sP}},{key:"ML",get:function(){return this.PL.ML}},{key:"Rq",get:function(){return this.rht()},set:function(t){this.hht(t)}},{key:"J7",get:function(){return this.PL.J7},set:function(t){this.oht(t)}},{key:"T8",get:function(){return this.aht()}}]),i}(th),CO=function(t){function i(i){return t.call(this,i)||this}Ct(i,t);var n=i.prototype;return n.Y7=function(t){this.PL.Y7(t)},n.$P=function(){this.PL.$P()},Nt(i,[{key:"Zrt",get:function(){return this.PL}},{key:"hq",get:function(){return this.PL.hq}},{key:"d5",get:function(){return this.PL.d5}},{key:"WP",get:function(){return this.PL.WP},set:function(t){this.PL.WP=t}}]),i}(RO),PO=function(t){function i(){return t.apply(this,arguments)||this}Ct(i,t);var n=i.prototype;return n.cht=function(t){var i=new SO(t);return i.Tst=this,i},n.uht=function(t){return new EO(t)},i}(CO),DO=function(t){function i(i){return t.call(this,i)||this}return Ct(i,t),i}(yO(PO)),NO=function(t){function i(i){return t.call(this,i)||this}return Ct(i,t),i}(IO(PO)),xO=function(t){function i(){return t.apply(this,arguments)||this}Ct(i,t);var n=i.prototype;return n.Yq=function(i){return i===eg.Mk?new NO(t.prototype.Yq.call(this,i)):i===eg.Bk?new DO(t.prototype.Yq.call(this,i)):void 0},n.Dq=function(i){var n=this;return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return[4,(r=i).zg()];case 1:return e.sent(),[4,t.prototype.Dq.call(n,r.Zrt)];case 2:return e.sent(),[2]}})})()},i}(mO);U(),Et();var BO=function(){function t(t){var i=this;this.oa=void 0,this._ht=function(t){t.persisted&&i.vht()},this.oa=t,f.addEventListener("pageshow",this._ht)}var i=t.prototype;return i.vht=function(){this.oa.tI()},i.kn=function(){f.removeEventListener("pageshow",this._ht)},t}();U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Wt(),xt(),Ft(),Qt(),U(),Et(),U(),Et();var OO=function(){function t(t){this.wht=void 0,this.wht=t}var i=t.prototype;return i.ght=function(t,i,n){return ut.resolve()},i.pht=function(t,i,n,r){var e=[];if(r){var s={TU:i.CO,kU:i.RO,EU:n.mht.EU};r.Km===Ng.TTML?e=Dm(t,r,s,n.lQ):r.Km===Ng.WEBVTT&&(e=N_(t,s,this.wht).L)}return e},i.hr=function(){},t}();U(),Et(),Ft(),U(),Et(),Ft(),U(),Et();var MO,LO=function(t){return t.PR="vttc",t.yht="vsid",t.bht="iden",t.Aht="ctim",t.Sht="sttg",t.Tht="payl",t.kht="vtte",t.Eht="vtta",t}({}),FO=function(){function t(){}return t.xht=function(i){return Boolean(t.Pht[i])},t.PD=function(i){for(var n,r=[],e=Lt(gm.lD(new vm(i,new Ta)));!(n=e()).done;){var s=n.value;t.xht(s.Km)&&r.push(t.Pht[s.Km](s.lk))}return r},t.Iht=function(i){var n=gm.lD(i),r=mm(n,LO.yht),e=mm(n,LO.bht),s=mm(n,LO.Aht),u=mm(n,LO.Sht),o=mm(n,LO.Tht);return{Km:LO.PR,Cht:r?t.Rht(r):void 0,Dht:e?t.Nht(e):void 0,Bht:s?t.Mht(s):void 0,Lht:u?t.Oht(u):void 0,Fht:o?t.Uht(o):void 0}},t.Rht=function(t){return{Km:LO.yht,Vht:t.sD()}},t.Nht=function(t){return{Km:LO.bht,Dht:t.aD()}},t.Mht=function(t){return{Km:LO.Aht,Hht:t.aD()}},t.Oht=function(t){return{Km:LO.Sht,Wht:t.aD()}},t.Uht=function(t){return{Km:LO.Tht,qht:t.aD()}},t.zht=function(t){return{Km:LO.kht}},t.Ght=function(t){return{Km:LO.Eht,Xht:t.aD()}},t}();FO.Pht=((MO={})[LO.PR]=FO.Iht,MO[LO.kht]=FO.zht,MO[LO.Eht]=FO.Ght,MO);var UO=function(){function t(){this.Qht=NaN}var i=t.prototype;return i.ght=function(t,i,n){var r=new DataView(t.jht),e=km.PD(r),s=Fn(e,function(t){return t.Km===hm.HC});return s&&(this.Qht=s.Z[0].$D.yD.jD),ut.resolve()},i.pht=function(t,i,n){if(S(this.Qht))return[];var r=_a(t),e=km.PD(r),s=lm(e,hm.NR),u=lm(e,hm.WR);if(!s||0===s.Z.length||!u)return[];var o=function(t,i,n){for(var r,e=t.Z[0],s=e.KB?e.KB.KB.toNumber()/n:i.CO,u=[],o=Lt(e.QB);!(r=o()).done;){var h,a=r.value;(h=u).push.apply(h,[].concat(a.iM))}return{Kht:s,iM:u}}(s,i,this.Qht),h=n.mht.EU;return function(t,i,n,r){for(var e=FO.PD(_a(i.lk)),s=t.iM,u=t.Kht+r,o=[],h=0,a=0;a=this.tut},t}(),$O=function(){function t(t,i){this.rut=void 0,this.eut=void 0,this.lut=void 0,this.rut=i,i&&sg(t)?t===eg.Mk?(this.lut=5e3,this.eut=new ZO(.05,1,0)):(this.lut=0,this.eut=new ZO(.005,.1,0)):(this.lut=16e3,this.eut=new ZO)}return t.prototype.sut=function(t){var i=t.nut,n=this.rut?t.hut-t.aut:t.hut-t.uut,r=t.cut;!r&&i=this.Mz.YY}},{key:"rct",get:function(){var t,i=this.ect.ZW;if(i&&i.V>0)t=i.An(0);else{t=this.W8.zx;var n=this.ect.s$,r=n.zM(t);r>=0&&(t=n.An(r))}var e=this.ect.kP.Tn(0);if(e>t){if(this.ect.Tn<=t&&this.ect.An>=t&&e>t+bM)throw new GO(t,e);t=e}return t=this.ect.act.LM(t)}}]),t}();U(),Et(),xt(),Ft();var TM=function(){function t(){this.Wm=void 0,this.cct=void 0,this.Wm=Ju(),this.cct=EA.rL()}var i=t.prototype;return i.dct=function(t){return this.Wm.get(t.o)},i.lct=function(){var t=this.cct;return this.Wm.forEach(function(i){t=t.HM(i)}),t},i.fct=function(t){if(this.cct.Cr(t))return!0;var i=!1;return this.Wm.forEach(function(n){i=i||n.Cr(t)}),i},i.vct=function(t,i){var n=this.Wm.get(i.o);return!!n&&n.Cr(t)},i.GM=function(t,i){if(this.cct.GM(t,i))return!0;var n=!1;return this.Wm.forEach(function(r){n=n||r.GM(t,i)}),n},i._ct=function(t,i){var n=this.Wm.get(i),r=n?n.HM(t):t;this.Wm.set(i,r),this.cct=this.cct.HM(t)},i.gct=function(t){var i=this;this.Wm.forEach(function(n,r){i.Wm.set(r,n.HM(t))}),this.cct=this.cct.HM(t)},i.pct=function(t){var i=this;this.Wm.forEach(function(n,r){i.Wm.set(r,n.Mn(t))}),this.cct=this.cct.Mn(t)},i.hr=function(){var t=this;this.Wm.forEach(function(i,n){t.Wm.set(n,EA.rL())}),this.cct=EA.rL()},Nt(t,[{key:"uct",get:function(){if(0===this.Wm.size)return this.cct;var t=EA.nL(0,1/0);return t=t.Mn(this.cct),this.Wm.forEach(function(i){t=t.Mn(i)}),t}}]),t}(),SM=function(){function t(t){this.Ht=void 0,this.wct=void 0,this.n$=void 0,this.bct=[],this.Ht=t,this.wct=new TM,this.n$=new TM}var i=t.prototype;return i.yct=function(t){for(var i,n=Lt(this.bct);!(i=n()).done;){var r=i.value;if(r.Tat>t)break;if(r.Eat>t)return r}},i.Act=function(t){for(var i,n=Lt(this.bct);!(i=n()).done;){var r=i.value;if(r.Sct>t)break;if(r.Tct>=t)return r}},i.kct=function(t,i){for(var n,r=[],e=Lt(this.bct);!(n=e()).done;){var s=n.value;if(s.Tat>t)break;s.Eat>=i&&r.push(s)}return r},i.Sat=function(){return this.bct},i.Iat=function(t){var i=EA.nL(t.Sct,t.Tct),n=i.OM();this.wct.pct(n),this.wct._ct(i,t.Pat),this.Ect(n);var r=Hn(this.bct,function(i){return t.Tat<=i.Tat});r<0?this.bct.push(t):this.bct[r].Eat<=t.Eat?this.bct.splice(r,1,t):this.bct.splice(r,0,t)},i.r$=function(t,i){this.n$._ct(t,i)},i.xct=function(t){this.n$.gct(t)},i.pct=function(t){this.wct.pct(t),this.n$.pct(t);var i=this.wct.lct();this.Ect(i)},i.Ect=function(t){this.bct=this.bct.filter(function(i){return t.jM(i.Sct,i.Tct)}).map(function(i){return i.Pct&&!t.GM(i.Sct,i.Tct)?function(t,i){return{Pat:t.Pat,Tat:t.Tat,Eat:t.Eat,Sct:t.Sct,Tct:t.Tct,Pct:i}}(i,!1):i})},i.hr=function(){this.wct.hr(),this.n$.hr(),this.bct=[]},i.kn=function(){this.hr()},Nt(t,[{key:"mct",get:function(){return this.wct}},{key:"s$",get:function(){return this.n$}}]),t}();U(),Et(),U(),Et(),Wt(),xt(),Ft(),Qt();var EM=function(){function t(t,i,n){this.Dat=void 0,this.Yot=void 0,this.jp=void 0,this.Ict=void 0,this.Dat=t,this.Yot=i,this.jp=n}var i=t.prototype;return i.Cct=function(t,i,n){return Vt(function(){var r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:return dr(n),e=this.Yot.Act(t),r=e&&Sn(e.Tct,t,1e-5)?e.Eat:t,s=this.Rct(r),u=function(t){return IM.bind(void 0,t)}(r),[4,this.jp.Dct(u,s,i,n)];case 1:o=f.sent(),dr(n),f.label=2;case 2:return o&&this.Nct(o.yut)?(h=PM(o.yut),a=o.qot,[4,this.jp.Dct(h,[a],i,n)]):[3,4];case 3:return o=f.sent(),dr(n),[3,2];case 4:return o?this.Bct(o.yut)?(c=this.Mct(o.yut),t=c.An?[4,this.findFirstNonAppendedSegmentAfterSegment(o,i,n)]:[3,8];case 7:return[2,f.sent()];case 8:if(o.qot.Lct(o.yut))return[2,void 0];throw new y("Fatal buffering error")}})}).call(this)},i.findFirstNonAppendedSegmentAfterSegment=function(t,i,n){return Vt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:r=t,u.label=1;case 1:return e=PM(r.yut),s=t.qot,[4,this.jp.Dct(e,[s],i,n)];case 2:r=u.sent(),dr(n),u.label=3;case 3:if(r&&this.Bct(r.yut))return[3,1];u.label=4;case 4:return r?[2,r]:[2,void 0]}})}).call(this)},i.findFirstNonAppendedSegmentBeforeSegment=function(t,i,n,r){return Vt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:e=t,h.label=1;case 1:return s=function(t){return RM.bind(void 0,t)}(e.yut),u=t.qot,[4,this.jp.Dct(s,[u],i,n)];case 2:e=h.sent(),dr(n),h.label=3;case 3:if(e&&this.Bct(e.yut))return[3,1];h.label=4;case 4:if(!e)throw o=t.qot.Oct.Tn,new GO(o,r.Tn,t.qot);return[2,e]}})}).call(this)},i.Fct=function(t){return this.Yot.mct.fct(t)},i.Uct=function(t){return this.Yot.kct(t.CO,t.RO)},i.Bct=function(t){var i=this.Uct(t);return i.length>0&&function(t,i){return function(t){for(var i,n=EA.rL(),r=Lt(t);!(i=r()).done;){var e=i.value;n=n.HM(EA.nL(e.Tat,e.Eat))}return n}(t).GM(i.CO,i.RO)}(i,t)&&i.every(DM)},i.Nct=function(t){return this.Yot.s$.GM(t.CO,t.RO)},i.Mct=function(t){var i=this.Uct(t);return{Tn:i[0].Sct,An:i[i.length-1].Tct}},i.Rct=function(t){var i=this.Vct(t);if(0===i.length){var n=this.Ict?this.Ict:this.Yot.Ht.xat;return[n[n.length-1]]}var r=i.filter(function(t){var i;return(null==(i=t.qot)?void 0:i.xst)&&!t.Hct});return r.length>0?r:[i[i.length-1]]},i.Vct=function(t){var i=this;return(this.Ict?this.Ict:this.Yot.Ht.xat).filter(function(n){return!i.Yot.s$.vct(t,n)})},Nt(t,[{key:"Jot",get:function(){return this.Ict},set:function(t){this.Ict=t}},{key:"iat",get:function(){return this.Yot.Ht.iat}}]),t}();function IM(t,i,n,r){return Vt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:return e=i.mht,(s=e.Wct(t))?i.qct(s)?[4,i.Gct(s,n,r)]:[3,2]:[2,void 0];case 1:return[2,u.sent().zct(t)];case 2:return[2,s]}})})()}function RM(t,i,n,r){return Vt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return hM(t)?0===t.xut?[2,void 0]:(e=i.mht.Xct(t))?[4,i.Gct(e,n,r)]:[2,void 0]:[3,2];case 1:return[2,s.sent().jct(t.xut-1)];case 2:return[2,i.mht.Qct(t)];case 3:return[2]}})})()}function CM(t,i,n,r){return Vt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:return hM(t)?(e=i.mht.Xct(t))?[4,i.Gct(e,n,r)]:[2,void 0]:[3,2];case 1:return s=u.sent(),t.xut+1===s.V?[2,void 0]:[2,s.jct(t.xut+1)];case 2:return[2,i.mht.Kct(t)];case 3:return[2]}})})()}function PM(t){return CM.bind(void 0,t)}function DM(t){return t.Pct}U(),Et(),Wt(),Qt();var NM=function(){function t(t,i,n,r){this.tdt=void 0,this.ect=void 0,this.Mz=void 0,this.Jct=void 0,this.idt=void 0,this.tdt=t,this.ect=i,this.Mz=n,this.Jct=r,this.idt=!1}var i=t.prototype;return i.Dct=function(t,i,n,r){return Vt(function(){var e,s,u;return zt(this,function(o){switch(o.label){case 0:return dr(r),(e=this.Yct(i,n))?[4,t(e,this.Jct,r)]:[2,void 0];case 1:return(s=o.sent())?(u=e.Zct(s),[2,{qot:e,yut:s,Yu:u}]):[2,void 0]}})}).call(this)},i.Yct=function(t,i){if(0!==t.length){var n=this.tdt.$ct(t,this.idt?i:void 0,this.ect,this.Mz.jY);return this.idt||(this.idt=!0),n}},t}();U(),Et(),Wt(),Ft(),Qt();var xM=function(){function t(t,i,n,r){this.tdt=void 0,this.ect=void 0,this.Sut=void 0,this.Jct=void 0,this.tdt=t,this.ect=i,this.Sut=n,this.Jct=r}return t.prototype.Dct=function(t,i,n,r){return Vt(function(){var e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:if(dr(r),!(e=this.tdt.edt(i,n,this.ect)).length)return[2,void 0];u=Lt(e),v.label=1;case 1:if((o=u()).done)return[3,8];h=o.value,v.label=2;case 2:return v.trys.push([2,6,,7]),dr(r),[4,t(h,this.Jct,r)];case 3:return(a=v.sent())?(c=h.Zct(a),[4,this.Sut.sdt(c.Yu,c.Wat)]):[3,5];case 4:if(v.sent())return[2,{yut:a,qot:h,Yu:c}];v.label=5;case 5:return[3,7];case 6:return lr(f=v.sent()),s=f,[3,7];case 7:return[3,1];case 8:if(s)throw s;return[2,void 0]}})}).call(this)},t}();function BM(t){return void 0!==t.vP}function OM(t,i){var n=t.Ti&&i.Ti,r=t.Mi&&i.Mi;return n||r?n&&r?t.Ti*t.Mi-i.Ti*i.Mi:n?t.Ti-i.Ti:r?t.Mi-i.Mi:(t.Ti||1)*(t.Mi||1)-(i.Ti||1)*(i.Mi||1):0}function MM(t,i){return OM(t,i)||function(t,i){return t.IW-i.IW}(t,i)}U(),Et(),ct(),Ft(),U(),Et();var LM=function(){function t(t,i,n,r,e,s){this.hdt=void 0,this.ddt=void 0,this.Cm=void 0,this.cdt=void 0,this.ndt=void 0,this.ldt=void 0,this.ddt=t,this.hdt=i,this.Cm=n,this.cdt=r,this.ndt=e,this.ldt=s}var i=t.prototype;return i.$ct=function(i,n,r,e){var s=t.sortByQuality(i);if(void 0!==this.ndt&&void 0===n&&i.length>1){var u=t.rdt(s,this.ndt);u&&(s=u)}var o=this.edt(s,n,r,e);return o.length?o[o.length-1]:s[0]},i.edt=function(i,n,r,e){for(var s,u,o=t.sortByQuality(i),h={iut:void 0===e||this.hdt.Zat?this.hdt.iut:e,vP:BM(r)&&r.vP?r.vP:1,odt:r.Ti,adt:r.Mi,udt:null==(s=this.cdt)?void 0:s.restrictToPlayerSize},a=o,c=Lt(this.ddt);!(u=c()).done;){a=(0,u.value)(a,n,h,this.Cm,this.ldt)}return a},t.fdt=function(i){return t.sortByQuality(i)[0]},t.vdt=function(i,n){var r;return n?t.fdt(null!=(r=t.rdt(i,n))?r:i):t.fdt(i)},t.rdt=function(t,i){for(var n,r=function(){var i=n.value,r=t.filter(function(t){return $C(t.Bp,i)});if(r.length>0)return{v:r}},e=Lt(i);!(n=e()).done;){var s=r();if("object"===W(s))return s.v}},t.sortByQuality=function(t){var i=[].concat(t);return i.sort(MM),i},t}();U(),Et();var FM=function(t,i,n,r,e){return t.filter(function(t){return e.IZ(t)&&r.Pp(i,t)})};U(),Et();var UM=function(t,i,n,r){return void 0===i&&r.Rp?[t[t.length-1]]:t.filter(function(t){return function(t,i,n){var r=n.iut;if(r<=0)return!1;return.8*r>t.IW*n.vP}(t,0,n)})};U(),Et();var VM=function(t,i,n,r,e){var s=n.udt;if(void 0===s&&!r.Ks)return t;if(!1===s)return t;if(t.length>0&&t[0].Km!==eg.Mk)return t;for(var u=t.length-1;u>=0;u--){var o=t[u];if(o.Mi===n.adt&&o.Ti===n.odt)return t.slice(0,u+1);if(o.Mi=0;a--){var c=t[a];if(c.Mi<=h&&c.Ti<=o)return t.slice(0,a+1)}return[]},jM=function(){function t(){}return t.jet=function(t,i,n,r,e,s,u,o,h,a){var c=function(t,i){return new WM([new XM(i),new zM(t)])}(s,u),f=new LM([FM],e,Ui.Zs,o,h,a),v=new xM(f,i,u,c),d=new LM([UM,FM,VM,GM],e,Ui.Zs,o,h,a),l=new NM(d,i,r,c),w=new HM([v,l]);return new EM(t,n,w)},t}();U(),Et(),Wt(),xt(),Pt(),H(),Ft(),Qt(),U(),Et(),Pt();var QM=function(t){function i(i,n,r,e,s,u){var o;return void 0===u&&(u=0),(o=t.call(this,eh.ey)||this).segmentStartTime=void 0,o.error=void 0,o.trackType=void 0,o.track=void 0,o.quality=void 0,o.retryCount=void 0,o.segmentStartTime=i,o.error=n,o.trackType=r,o.track=e,o.quality=s,o.retryCount=u,o}return Ct(i,t),i}(rh);U(),Et(),Pt();var YM=function(t){function i(i,n){var r;return(r=t.call(this,eh.Sw)||this).track=void 0,r.segments=void 0,r.track=i,r.segments=n,r}return Ct(i,t),i}(rh);U(),Et(),Pt();var KM=function(t){function i(i,n,r,e,s,u,o){var h;return void 0===u&&(u=0),void 0===o&&(o=void 0),(h=t.call(this,eh.iy)||this).segmentStartTime=void 0,h.error=void 0,h.trackType=void 0,h.track=void 0,h.quality=void 0,h.retryCount=void 0,h.statusCode=void 0,h.segmentStartTime=i,h.error=n,h.trackType=r,h.track=e,h.quality=s,h.retryCount=u,h.statusCode=o,h}return Ct(i,t),i}(rh),JM=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).mdt=void 0,r.mdt=i,r}return Ct(i,t),i}(cr),ZM=[eh.ly,eh._y],$M=function(t){function i(i,n,r,e,s,u,o,h,a){var c;return(c=t.call(this)||this).Dat=void 0,c.Yot=void 0,c.Sdt=void 0,c.bdt=void 0,c.Zdt=void 0,c.Udt=void 0,c.ldt=void 0,c.Ndt=void 0,c.pq=void 0,c.wdt=void 0,c.n3=void 0,c.ydt=void 0,c.Hdt=void 0,c.Cdt=void 0,c.Rdt=void 0,c.Bdt=void 0,c.Dat=i,c.Yot=n,c.Sdt=r,c.bdt=e,c.Zdt=s,c.Udt=u,c.ldt=o,c.Ndt=h,c.pq=a,c.wdt=void 0,c.n3=void 0,c.ydt=void 0,c.Hdt=void 0,c.Cdt=0,c.Rdt=0,c.Bdt=EA.rL(),c.Zdt.wn(ZM,c.Rs),c}Ct(i,t);var n=i.prototype;return n.Adt=function(t){return!this.n3||!t||!Ca(this.n3.jht,t.jht)},n.Nat=function(t){if(!this.wdt)return!1;var i=this.wdt.yut,n=EA.nL(i.CO,i.RO),r=this.Sdt.sct,e=r.zM(t);return e<0?n.Cr(t,bM):n.jM(t,r.An(e),!0,!0,bM)},n.Cat=function(t){return Vt(function(){var i,n,r,e,s,u,o,h,a,c,f,v,d,l,w;return zt(this,function(g){switch(g.label){case 0:i=this.Yot.Ht.xat,g.label=1;case 1:0,n=void 0,g.label=2;case 2:return g.trys.push([2,12,16,17]),dr(t),this.Bat(),this.Mat()?[3,18]:(n=this.Tdt(),[4,this.Dct(n,t)]);case 3:return void 0===(e=g.sent())?[3,18]:(this.wdt=e,function(t){var i=t.qot,n=i.mht,r=hM(t.yut)?n.Xct(t.yut):t.yut;return n.nlt(r,i.jdt.Xdt())}(this.wdt)?[3,5]:[4,this.kdt(this.wdt,t)]);case 4:return g.sent(),[3,1];case 5:return!this.ydt||QC(this.ydt.qot.Rrt,this.wdt.qot.Rrt)?[3,7]:[4,this.ldt.RZ(this.wdt.qot)];case 6:g.sent(),g.label=7;case 7:return!this.wdt.qot.NW||this.Qot&&(null==(r=this.ydt)?void 0:r.qot)===this.wdt.qot||null==(s=this.pq)||s.VW(this.wdt.qot.NW),[4,this.Edt(n,this.wdt.yut,t)];case 8:return g.sent(),u=this,[4,this.xdt(this.wdt.qot,t)];case 9:return u.n3=g.sent(),[4,this.but(this.wdt,t)];case 10:return o=g.sent(),h=this.Sdt.Fx,a=this.ydt,c=this,[4,this.Pdt(o,t)];case 11:return c.ydt=g.sent(),f=this.Sdt.Fx,this.Idt(a,this.wdt,h,f,n),i.forEach(function(t){return t.Hct=!1}),this.Cdt=0,this.Rdt=0,[3,17];case 12:return V(v=g.sent(),GO)?(this.G3(v.Tn,v.An,v.qot),[3,1]):[3,13];case 13:if(!V(v,JM))return[3,15];if(d=500,i.every(function(t){return t.Hct})){if(2===this.Cdt){if(l=this.Sdt.Fx,this.Ddt(this.wdt),this.Idt(this.ydt,this.wdt,l,l,n),i.forEach(function(t){return t.Hct=!1}),this.Rdt+=1,this.Cdt=0,this.Rdt===this.Ndt.maxRetries)throw new ld(vd.MEDIA_LOAD_ERROR,"The segments could not be loaded.",v);return[3,1]}this.Cdt++,w=this.Ndt.minimumBackoff*b.pow(2,this.Cdt-1),d=b.min(w,this.Ndt.maximumBackoff)}return[4,Ar(d,t)];case 14:return g.sent(),[3,1];case 15:throw this.Bdt=EA.rL(),v;case 16:return this.wdt=void 0,[7];case 17:return[3,1];case 18:return[2]}})}).call(this)},n.Idt=function(t,i,n,r,e){var s=r.qM(n),u=i.qot,o=u.Mdt(i.yut),h=u.Lct(i.yut),a=i.yut.CO,c=i.yut.RO;o&&(a=b.min(a,b.max(0,u.Oct.Tn-.05))),h&&(c=b.max(c,u.Oct.An));var f=EA.nL(a,c).qM(r);if(0!==s.V){if(o||this.Bdt.V>0){var v=f.Mn(EA.nL(a,s.Tn(0)));this.Odt(v)}var d=s.OM().Mn(EA.nL(s.Tn(0),s.An(s.V-1)));if(this.Odt(d),h){var l=f.Mn(EA.nL(s.An(s.V-1),c));this.Odt(l)}if(this.Bdt.V>0){var w=this.Bdt.qM(s);this.Odt(w),this.Bdt=EA.rL()}var g,_=u.mht,m=hM(i.yut)?void 0:_.Qct(i.yut),y=null!=(g=null==t?void 0:t.yut)?g:this.Fdt(m)?m:void 0;if(y){var p=this.Yot.kct(y.CO,y.RO);if(p.length>0){var k=EA.nL(p[p.length-1].Tct,s.Tn(0));this.Odt(k)}}var A=hM(i.yut)?void 0:_.Kct(i.yut);if(A&&this.Fdt(A)){var T=this.Yot.kct(A.CO,A.RO);if(T.length>0){var S=EA.nL(s.An(s.V-1),T[0].Sct);this.Odt(S)}}}else this.Ldt(n,f,a,e)},n.Ldt=function(t,i,n,r){var e=i;0===this.Bdt.V&&(this.Bdt=EA.nL(t.An(t.V-1),n)),0===e.V&&void 0!==r&&(e=EA.sL(r)),this.Bdt=this.Bdt.HM(e),this.Yot.xct(this.Bdt)},n.Fdt=function(t){return!!t&&this.Yot.kct(t.CO,t.RO).length>0},n.Odt=function(t){for(var i=t.qM(this.Sdt.Fx),n=0;n0)){var t,i=this.Sdt.sct.HM(null!=(t=this.Sdt.s$.MM().iL(this.Sdt.rct))?t:EA.rL());this.Yot.pct(i),this.Hdt&&!this.Wdt(this.Hdt)&&(this.Hdt=void 0),this.So(new YM(this.Yot.Ht.iat,this.Yot.Sat()))}},n.Mat=function(){return this.ydt&&this.ydt.qot.Lct(this.ydt.yut)?(this.Udt.F3(),!0):(this.Hdt&&this.Hdt.qot.Lct(this.Hdt.yut)&&this.Wdt(this.Hdt)&&this.Udt.F3(),!!this.Sdt.nct)},n.Wdt=function(t){return this.Yot.mct.GM(t.qdt,t.zdt)},n.Gdt=function(t,i,n){(!this.Hdt||this.Hdt.yut.RO=2?(t.qot.Hct=!0,this.$dt(r,n),this.tlt(r,n),[2,this.Vdt(WO.oot,"Could not fetch the segment.")]):(this.tlt(r,n),[4,Ar(b.min(this.Ndt.minimumBackoff*b.pow(2,n),this.Ndt.maximumBackoff),i)]):[3,6];case 5:return s.sent(),[3,7];case 6:throw new ld(vd.MEDIA_LOAD_ERROR,r.message,r);case 7:return n++,[3,1];case 8:return[2]}})}).call(this)},n.Edt=function(t,i,n){return Vt(function(){var r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:for(r=this.Yot.kct(i.CO,i.RO),e=this.Sdt.sct.iL(t),s=EA.rL(),u=Lt(r);!(o=u()).done;)h=o.value,dr(n),a=h.Sct,c=h.Tct,(f=e&&e.jM(a,c)?b.max(a,e.An(0)):a)<(v=c)&&(s=s.HM(EA.nL(f,v)));d=0,l.label=1;case 1:return d0?n.qualities[0]:void 0,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var uL=function(t){function i(i){var n;return(n=t.call(this,Nw.QUALITY_UNAVAILABLE)||this).quality=void 0,n.quality=i,n}return Ct(i,t),i.prototype.xa=function(){return new oL(this.quality.Ca)},i}(Sw),oL=function(t){function i(i){var n;return(n=t.call(this,"qualityunavailable")||this).quality=void 0,n.quality=i,n}return Ct(i,t),i}(Ew);U(),Et(),Pt();var hL=function(t){function i(){return t.call(this,Nw.NO_QUALITY)||this}return Ct(i,t),i}(rh);function aL(t){return{IW:t.IW,Bp:t.Rrt,Mi:cL(t)?t.Mi:0,Km:cL(t)?eg.Mk:eg.Bk,Ti:cL(t)?t.Ti:0}}function cL(t){var i=t;return void 0!==i.Mi&&void 0!==i.Ti}U(),Et();var fL=0,vL=function(t){function i(i,n,r){var e;return void 0===r&&(r="alternative"),(e=t.call(this)||this)._lt=void 0,e.mat=void 0,e.We=!1,e.hu=void 0,e.wlt=void 0,e.aS="",e.yO=void 0,e.I5=void 0,e.bO=void 0,e.$b=void 0,e.Clt=!1,e._O=new lg,e.Slt=[],e.flt=void 0,e.ylt=void 0,e.Elt=void 0,e.clt=function(){return e.So(new _g(e))},e.klt=[],e.mat=i,e.aS=String(fL++),e.yO=pg(),e.I5=r,e.$b=i.Tit,e.bO=i.Th,e.Elt=i.Km,e.Slt=i.xat.slice(),e.ult(n),e}Ct(i,t);var n=i.prototype;return n.ult=function(t){for(var i,n=Lt(t);!(i=n()).done;){var r=i.value;r.wn("update",this.clt),this._O.gO(r)}},n.dlt=function(t){if(this._O.pO(t)){t.ZU();var i=this.llt();if(this.flt&&jn(this.flt,t)){var n=this.flt.filter(function(t){return t.xst});0===n.length&&i.length>0?this.tC=i:this.tC=n}else this.tC=i;this.So(new uL(t))}},n.vlt=function(t){if(this._O.pO(t)){var i=this.llt();t.JU(),this.flt&&!function(t,i){return Qn(t,i,function(t,i){return t===i})}(this.flt,i)||(this.tC=this.llt())}},n.llt=function(){return this._O.NI.filter(function(t){return t.xst})},n.glt=function(t){this._lt=t.qot,this.So(t)},n.blt=function(t){if(t&&0!==t.length){for(var i,n=[],r=Lt(this.xat);!(i=r()).done;)for(var e,s=i.value,u=Lt(t);!(e=u()).done;){var o=e.value;o===s.qot&&o.xst&&n.push(s)}return n}},n.Tlt=function(t){var i;this.klt.push(t),(i=this.Slt).push.apply(i,[].concat(t.xat));var n=t.xat.map(function(t){return t.qot});this.ult(n)},n.SO=function(t){this.We=t,this.wlt&&(t?this.wlt.JU(this):this.wlt.ZU(this))},n.Ilt=function(t){this.We=t,this.Clt!==t&&(this.Clt=t,this.So(new wg(this)))},n.kn=function(){for(var t,i=Lt(this._O.NI);!(t=i()).done;){t.value.mn("update",this.clt)}this._O.hr()},Nt(i,[{key:"ZI",get:function(){return this.mat.olt.map(dL).filter(Li)}},{key:"YI",get:function(){return this._lt}},{key:"Zut",get:function(){return this.mat}},{key:"Rt",get:function(){return this.We},set:function(t){this.SO(t)}},{key:"Ca",get:function(){return this.hu||(this.hu=tg(this)),this.hu}},{key:"plt",get:function(){return this.wlt},set:function(t){this.wlt=t}},{key:"o",get:function(){return this.aS}},{key:"JI",get:function(){return this.yO}},{key:"Lt",get:function(){return this.I5}},{key:"bs",get:function(){return this.$b}},{key:"Th",get:function(){return this.bO},set:function(t){t!==this.bO&&(this.bO=t,this.So(new _g(this)))}},{key:"Qk",get:function(){return this.Rt?"enabled":"disabled"}},{key:"tC",get:function(){return this.flt},set:function(t){var i;if(t){var n=this.YI?aL(this.YI):void 0;i=t.filter(function(t){return t.xst&&Ui.Zs.Pp(n,aL(t))})}else i=this.llt();0!==i.length?(this.flt=t&&this._O.pO(t)?t:void 0,this.ylt=this.blt(this.flt),this.So(new eL(t,this))):this.So(new hL)}},{key:"Alt",get:function(){return this.ylt}},{key:"$I",get:function(){return this._O}},{key:"xat",get:function(){return this.Slt}},{key:"iat",get:function(){return this.Elt}},{key:"xlt",get:function(){return this.klt}},{key:"Plt",get:function(){return this.xat.every(function(t){return t.Plt})}}]),i}(th);function dL(t){if("urn:mpeg:dash:role:2011"===t.x8)return lL(t);if("urn:tva:metadata:cs:AudioPurposeCS:2007"===t.x8){if("1"===t.XE)return Jw.GI;if("2"===t.XE)return Jw.jI}}function lL(t){if(void 0!==(null==t?void 0:t.XE))switch(t.XE){case"caption":return Jw.zI;case"sign":return Jw.XI;case"description":return Jw.GI;case"enhanced-audio-intelligibility":return Jw.jI;default:return}}var wL=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,u)||this).Rz=1,o.Nlt=void 0,o.Dlt=Zu(),o.Rlt=void 0,o.Mlt=void 0,o.Qlt=Zu(),o.aV=void 0,o.Sut=void 0,o.W8=void 0,o.Mz=void 0,o.Hlt=void 0,o.Wlt=function(t){0},o.W8=i,o.aV=n,o.Mz=r,o.Hlt=e,o.Sut=s,o}Ct(i,t);var n=i.prototype;return n.F3=function(){},n.hct=function(){return this.sct.Cr(this.An)},n.elt=function(t,i,n,r){return Vt(function(){var e,s,u,o,h,a,c,f,v,d,l,w;return zt(this,function(g){switch(g.label){case 0:return t.Km!==zR.wZ?[3,1]:(s=t.lk.jht,[3,3]);case 1:return[4,t.lk.qT(r)];case 2:s=g.sent(),g.label=3;case 3:for(e=s,u=this.findTrackForRepresentation(n),o=i.CO,h=i.RO,a=new EA([o,h]),this.jrt(r),c=this.pht(new E(e),i,n,u),f=Lt(c);!(v=f()).done;)d=v.value,u.nV(d);return w=null!=(l=this.Dlt.get(u.JI))?l:EA.rL(),this.Dlt.set(u.JI,w.HM(a)),[2,{qdt:o,zdt:h}]}})}).call(this)},n.jrt=function(t){for(var i,n=Lt(tR(this.W8.zx,void 0,void 0,this.Fx,this.Mz.YY,this.Mz.zY));!(i=n()).done;){var r=i.value,e=r[0],s=r[1];kr(this.ilt(e,s,t))}},n.ght=function(t,i,n){return this.Hlt.ght(t,i,n)},n.pht=function(t,i,n,r){return this.Hlt.pht(t,i,n,r)},n.ilt=function(t,i,n){dr(n);for(var r,e=t,s=i,u=new EA([t,i]),o=Lt(this.Z.NI);!(r=o()).done;){for(var h,a=r.value,c=[],f=Lt(a.L.NI);!(h=f()).done;){var v=h.value;v.CO>=e&&v.RO<=s?c.push(v):u=u.qM(new EA([v.CO,v.RO]))}for(var d,l=Lt(c);!(d=l()).done;){var w=d.value;a.XU(w)}var g=this.Dlt.get(a.JI);g&&this.Dlt.set(a.JI,g.qM(u))}return ut.resolve()},n.r$=function(t,i){},n.h$=function(t,i){},n.iJ=function(){return!1},n.JU=function(t){if(t&&this.Rlt!==t){this.Rlt=t;for(var i,n=Lt(this.Z.NI);!(i=n()).done;){var r=i.value;r!==t&&(r.Qk=zm.Nh)}if(this.Hlt.hr(),this.Nlt&&(this.Nlt.kn(),this.Nlt=void 0),this.Rlt){var e=this.Flt(this.Rlt);this.Nlt=new iL(this,this.W8,this.W8,this.aV,this.Mz,!1,this.Sut,void 0,void 0,new rL,pT,void 0).hlt(this.Rlt,e),this.Nlt.wn(qm.ma,this.Wlt),this.Nlt.Tn(WO.Zht)}}},n.ZU=function(t){this.Rlt===t&&(t&&this.Rlt===t&&(this.Rlt=void 0),this.Nlt&&(this.Nlt.kn(),this.Nlt=void 0))},n.Un=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.hr()];case 1:return i.sent(),this.Mlt=t,this.qlt(t),[2]}})}).call(this)},n.zlt=function(t){var i=function(t){var i=t.xat&&t.xat.length>0&&t.xat[0],n=i&&ny(i.Rrt),r=ny(t.Rrt),e=t.lQ===Uv;return n||r||e?Ng.TTML:t.lQ===Hv||uy(t.lQ,t.Rrt)?Ng.WEBVTT:Ng.DEFAULT}(t);if(!i)throw new y("Unknown TextTrack type for Representation");var n=t.Glt.concat(t.olt);return this.Xlt(function(t){return jn(t.filter(function(t){return"urn:mpeg:dash:role:2011"===t.x8}).map(function(t){return t.XE}).filter(Li),"caption")?Jm.WU:Jm.HU}(n),t.Th,t.Tit,!1,i,t,function(t){return t.filter(function(t){return"urn:mpeg:dash:role:2011"===t.x8}).some(function(t){return function(t){return"forced-subtitle"===t||"forced_subtitle"===t}(t.XE)})}(t.Glt),t.olt.map(lL).filter(Li))},n.qlt=function(t){for(var i,n=Lt(t.jlt);!(i=n()).done;){var r=i.value,e=this.zlt(r);this.Qlt.set(e.JI,r),e.AP=Dg.LOADED,this.tt(e)}},n.it=function(i){this.Qlt.delete(i.JI),t.prototype.it.call(this,i)},n.Xlt=function(t,i,n,r,e,s,u,o){var h,a,c,f=Fn(s.xat,function(t){return""!==t.o}),v=null!=(c=null!=(a=null==f?void 0:f.o)?a:null==(h=s.o)?void 0:h.toString())?c:"";return this.iV.sI(t,v,i,n,r,e,u,o)},n.eV=function(t,i,n){var r=ly(t,i,n),e=this.Qlt.get(t.JI);void 0!==e&&(this.Qlt.set(r.JI,e),this.Qlt.delete(t.JI));var s=this.Dlt.get(t.JI);return void 0!==s&&(this.Dlt.set(r.JI,s),this.Dlt.delete(t.JI)),r},n.hr=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return n.sent(),this.Nlt?[4,this.Nlt.hr(WO.Aot)]:[3,3];case 2:n.sent(),this.Nlt.mn(qm.ma,this.Wlt),this.Nlt=void 0,n.label=3;case 3:return this.Mlt=void 0,this.Dlt.clear(),[2]}})}).call(this)},n.findTrackForRepresentation=function(t){for(var n,r=Lt(this.Z.NI);!(n=r()).done;){var e=n.value,s=this.Flt(e);if(s&&i.Klt(s)===t)return e}},n.Flt=function(t){return this.Qlt.get(t.JI)},n.Llt=function(){if(this.Rlt){var t=this.Flt(this.Rlt);if(t)return i.Klt(t)}},n.kn=function(){for(var i,n=Lt(this.Z.NI);!(i=n()).done;){var r=i.value;this.iV.rV(r)}return t.prototype.kn.call(this)},i.Klt=function(t){return t.xat&&t.xat.length>0?t.xat[0]:void 0},Nt(i,[{key:"Rt",get:function(){for(var t,i=Lt(this.Z.NI);!(t=i()).done;){if(t.value.Qk!==zm.Nh)return!0}return!1}},{key:"ZW",get:function(){var t=this.W8.zx;return this.sct.iL(t,.01)}},{key:"act",get:function(){return EA.hL()}},{key:"Fx",get:function(){var t;return null!=(t=this.Rlt&&this.Dlt.get(this.Rlt.JI))?t:EA.rL()}},{key:"s$",get:function(){return this.Nlt?this.Nlt.Kot.s$.uct:EA.rL()}},{key:"sct",get:function(){return zO(this.Fx,this.s$).VM(2*this.Blt)}},{key:"Tn",get:function(){return this.Mlt?this.Mlt.Oct.Tn:NaN}},{key:"An",get:function(){return this.Mlt?this.Mlt.Oct.An:NaN}},{key:"Qx",get:function(){var t=this.An;return!!t&&this.W8.zx>=t}},{key:"Blt",get:function(){var t,i,n=this.Llt();return n?1/(null!=(i=this.Rlt&&(null==n||null==(t=n.Olt)?void 0:t.rF()))?i:25):.04}},{key:"Mi",get:function(){return 0}},{key:"V3",get:function(){return eg.LT}},{key:"vP",get:function(){return this.Rz},set:function(t){this.Rz=t}},{key:"kP",get:function(){if(!this.Rlt)return EA.sL(0);var t=this.Flt(this.Rlt),i=null==t?void 0:t.Ult,n=null==t?void 0:t.Vlt;if(void 0===n||void 0===i)return EA.sL(0);var r=b.max(i,this.W8.zx);return new EA([n,r]).MM()}},{key:"Ti",get:function(){return 0}}]),i}(dy),gL=function(){function t(t,i,n,r,e,s){this.Zlt=[],this.Gl=new Rb([]),this.iV=void 0,this.wht=void 0,this.W8=void 0,this.aV=void 0,this.Mz=void 0,this.Sut=void 0,this.W8=t,this.aV=i,this.Mz=n,this.Sut=r,this.iV=e,this.wht=s}var i=t.prototype;return i.oV=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return t.Km!==eg.LT?[2]:(i=function(t,i,n){return ny(i)||t===Uv||t===Hv?new OO(n):uy(t,i)?new UO:void 0}(t.lQ,t.Rrt,this.wht),i?(n=this.Ylt(i),this.Jlt(n),[4,n.Un(t)]):[3,2]);case 1:return r.sent(),[2,n];case 2:return[2]}})}).call(this)},i.Ylt=function(t){return new wL(this.W8,this.aV,this.Mz,t,this.Sut,this.iV)},i.Jlt=function(t){this.Zlt.push(t),this.Gl.qW(t.Z)},i.hr=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:t=Lt(this.Zlt.slice()),n.label=1;case 1:return(i=t()).done?[3,4]:[4,i.value.hr()];case 2:n.sent(),n.label=3;case 3:return[3,1];case 4:return Yn(this.Zlt),this.Gl.hr(),[2]}})}).call(this)},i.kn=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:t=Lt(this.Zlt),n.label=1;case 1:return(i=t()).done?[3,4]:[4,i.value.kn()];case 2:n.sent(),n.label=3;case 3:return[3,1];case 4:return Yn(this.Zlt),this.Gl.kn(),[2]}})}).call(this)},Nt(t,[{key:"nt",get:function(){return this.Gl}}]),t}();U(),Et(),Pt();var _L=function(t){function i(i){var n;return(n=t.call(this,eh.zw)||this).error=void 0,n.error=i,n}return Ct(i,t),i}(rh);U(),Et();var mL=function(t){return t.AV="static",t.SV="dynamic",t}({});U(),Et(),Pt(),U(),Et();var yL=function(t){return t.$lt="tft",t}({}),pL=function(t){function i(){return t.call(this,yL.$lt)||this}return Ct(i,t),i}(rh);U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Pt();var kL=function(t){function i(i,n){var r;return(r=t.call(this,eh.Yw)||this).representation=void 0,r.previousRepresentation=void 0,r.representation=i,r.previousRepresentation=n,r}return Ct(i,t),i}(rh);U(),Et(),Pt(),Ft(),U(),Et(),Ft(),U(),Et();var bL=function(t){return t[t.ift=0]="ift",t[t.eft=1]="eft",t[t.sft=2]="sft",t[t.nft=3]="nft",t[t.rft=4]="rft",t[t.hft=5]="hft",t}({}),AL=function(t){return t[t.oft=0]="oft",t[t.aft=1]="aft",t[t.uft=2]="uft",t[t.cft=3]="cft",t}({});function TL(t,i,n){return n===bL.ift?n:i!==AL.oft&&i!==AL.aft||n!==bL.eft&&n!==bL.sft?t?i===AL.uft?bL.rft:i===AL.cft?bL.nft:bL.ift:bL.hft:bL.sft}function SL(t,i,n,r){var e={byte:n},s=bL.eft,u=[],o=31&EC(i,e,r);e.byte+=1;for(var h=0;h0;)e-=1,r+=EL(t,i);return r}(i,n,4);if("GA94"!==u)return}if(3===EC(i,n,r)){47===s&&(n.byte+=1);var o=t;return o.pft=n.byte,o}}}}function RL(t){return 4===t.s1}function CL(t){for(var i,n=[],r=Lt(t.filter(RL).map(IL).filter(Li));!(i=r()).done;){var e,s=i.value;(e=n).push.apply(e,[].concat(SL(s.e1,s.a1,s.pft,s.o1)))}return n}U(),Et(),Ft();var PL="und";var DL=[{l:"Abkhaz",bh:"\u0410\u04a7\u0441\u0443\u0430",1:"ab",2:"abk","2T":"abk","2B":"abk",3:"abk"},{l:"Afar",bh:"Afaraf",1:"aa",2:"aar","2T":"aar","2B":"aar",3:"aar"},{l:"Afrikaans",bh:"Afrikaans",1:"af",2:"afr","2T":"afr","2B":"afr",3:"afr"},{l:"Akan",bh:"Akan",1:"ak",2:"aka","2T":"aka","2B":"aka",3:"aka"},{l:"Albanian",bh:"Shqip",1:"sq",2:"sqi","2T":"sqi","2B":"alb",3:"sqi"},{l:"Amharic",bh:"\u12a0\u121b\u122d\u129b",1:"am",2:"amh","2T":"amh","2B":"amh",3:"amh"},{l:"Arabic",bh:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",1:"ar",2:"ara","2T":"ara","2B":"ara",3:"ara"},{l:"Aragonese",bh:"Aragon\xe9s",1:"an",2:"arg","2T":"arg","2B":"arg",3:"arg"},{l:"Armenian",bh:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",1:"hy",2:"hye","2T":"hye","2B":"arm",3:"hye"},{l:"Assamese",bh:"\u0985\u09b8\u09ae\u09c0\u09af\u09bc\u09be",1:"as",2:"asm","2T":"asm","2B":"asm",3:"asm"},{l:"Avaric",bh:"\u0410\u0432\u0430\u0440",1:"av",2:"ava","2T":"ava","2B":"ava",3:"ava"},{l:"Avestan",bh:"avesta",1:"ae",2:"ave","2T":"ave","2B":"ave",3:"ave"},{l:"Aymara",bh:"Aymar",1:"ay",2:"aym","2T":"aym","2B":"aym",3:"aym"},{l:"Azerbaijani",bh:"Az\u0259rbaycanca",1:"az",2:"aze","2T":"aze","2B":"aze",3:"aze"},{l:"Bambara",bh:"Bamanankan",1:"bm",2:"bam","2T":"bam","2B":"bam",3:"bam"},{l:"Bashkir",bh:"\u0411\u0430\u0448\u04a1\u043e\u0440\u0442\u0441\u0430",1:"ba",2:"bak","2T":"bak","2B":"bak",3:"bak"},{l:"Basque",bh:"Euskara",1:"eu",2:"eus","2T":"eus","2B":"baq",3:"eus"},{l:"Belarusian",bh:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",1:"be",2:"bel","2T":"bel","2B":"bel",3:"bel"},{l:"Bengali",bh:"\u09ac\u09be\u0982\u09b2\u09be",1:"bn",2:"ben","2T":"ben","2B":"ben",3:"ben"},{l:"Bihari",bh:"\u092d\u094b\u091c\u092a\u0941\u0930\u0940",1:"bh",2:"bih","2T":"bih","2B":"bih",3:"bih"},{l:"Bislama",bh:"Bislama",1:"bi",2:"bis","2T":"bis","2B":"bis",3:"bis"},{l:"Bosnian",bh:"Bosanski",1:"bs",2:"bos","2T":"bos","2B":"bos",3:"bos"},{l:"Breton",bh:"Brezhoneg",1:"br",2:"bre","2T":"bre","2B":"bre",3:"bre"},{l:"Bulgarian",bh:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",1:"bg",2:"bul","2T":"bul","2B":"bul",3:"bul"},{l:"Burmese",bh:"\u1019\u103c\u1014\u103a\u1019\u102c\u1018\u102c\u101e\u102c",1:"my",2:"mya","2T":"mya","2B":"bur",3:"mya"},{l:"Catalan",bh:"Catal\xe0",1:"ca",2:"cat","2T":"cat","2B":"cat",3:"cat"},{l:"Chamorro",bh:"Chamoru",1:"ch",2:"cha","2T":"cha","2B":"cha",3:"cha"},{l:"Chechen",bh:"\u041d\u043e\u0445\u0447\u0438\u0439\u043d",1:"ce",2:"che","2T":"che","2B":"che",3:"che"},{l:"Chichewa",bh:"Chichewa",1:"ny",2:"nya","2T":"nya","2B":"nya",3:"nya"},{l:"Chinese",bh:"\u4e2d\u6587",1:"zh",2:"zho","2T":"zho","2B":"chi",3:"zho"},{l:"Chuvash",bh:"\u0427\u04d1\u0432\u0430\u0448\u043b\u0430",1:"cv",2:"chv","2T":"chv","2B":"chv",3:"chv"},{l:"Cornish",bh:"Kernewek",1:"kw",2:"cor","2T":"cor","2B":"cor",3:"cor"},{l:"Corsican",bh:"Corsu",1:"co",2:"cos","2T":"cos","2B":"cos",3:"cos"},{l:"Cree",bh:"\u14c0\u1426\u1403\u152d\u140d\u140f\u1423",1:"cr",2:"cre","2T":"cre","2B":"cre",3:"cre"},{l:"Croatian",bh:"Hrvatski",1:"hr",2:"hrv","2T":"hrv","2B":"hrv",3:"hrv"},{l:"Czech",bh:"\u010ce\u0161tina",1:"cs",2:"ces","2T":"ces","2B":"cze",3:"ces"},{l:"Danish",bh:"Dansk",1:"da",2:"dan","2T":"dan","2B":"dan",3:"dan"},{l:"Divehi",bh:"Divehi",1:"dv",2:"div","2T":"div","2B":"div",3:"div"},{l:"Dutch",bh:"Nederlands",1:"nl",2:"nld","2T":"nld","2B":"dut",3:"nld"},{l:"Dzongkha",bh:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41",1:"dz",2:"dzo","2T":"dzo","2B":"dzo",3:"dzo"},{l:"English",bh:"English",1:"en",2:"eng","2T":"eng","2B":"eng",3:"eng"},{l:"Esperanto",bh:"Esperanto",1:"eo",2:"epo","2T":"epo","2B":"epo",3:"epo"},{l:"Estonian",bh:"Eesti",1:"et",2:"est","2T":"est","2B":"est",3:"est"},{l:"Ewe",bh:"E\u028begbe",1:"ee",2:"ewe","2T":"ewe","2B":"ewe",3:"ewe"},{l:"Faroese",bh:"F\xf8royskt",1:"fo",2:"fao","2T":"fao","2B":"fao",3:"fao"},{l:"Fijian",bh:"Na Vosa Vaka-Viti",1:"fj",2:"fij","2T":"fij","2B":"fij",3:"fij"},{l:"Finnish",bh:"Suomi",1:"fi",2:"fin","2T":"fin","2B":"fin",3:"fin"},{l:"French",bh:"Fran\xe7ais",1:"fr",2:"fra","2T":"fra","2B":"fre",3:"fra"},{l:"Fula",bh:"Fulfulde",1:"ff",2:"ful","2T":"ful","2B":"ful",3:"ful"},{l:"Galician",bh:"Galego",1:"gl",2:"glg","2T":"glg","2B":"glg",3:"glg"},{l:"Georgian",bh:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",1:"ka",2:"kat","2T":"kat","2B":"geo",3:"kat"},{l:"German",bh:"Deutsch",1:"de",2:"deu","2T":"deu","2B":"ger",3:"deu"},{l:"Greek",bh:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",1:"el",2:"ell","2T":"ell","2B":"gre",3:"ell"},{l:"Guaran\xed",bh:"Ava\xf1e'\u1ebd",1:"gn",2:"grn","2T":"grn","2B":"grn",3:"grn"},{l:"Gujarati",bh:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",1:"gu",2:"guj","2T":"guj","2B":"guj",3:"guj"},{l:"Haitian",bh:"Krey\xf2l Ayisyen",1:"ht",2:"hat","2T":"hat","2B":"hat",3:"hat"},{l:"Hausa",bh:"\u0647\u064e\u0648\u064f\u0633\u064e",1:"ha",2:"hau","2T":"hau","2B":"hau",3:"hau"},{l:"Hebrew",bh:"\u05e2\u05d1\u05e8\u05d9\u05ea",1:"he",2:"heb","2T":"heb","2B":"heb",3:"heb"},{l:"Herero",bh:"Otjiherero",1:"hz",2:"her","2T":"her","2B":"her",3:"her"},{l:"Hindi",bh:"\u0939\u093f\u0928\u094d\u0926\u0940",1:"hi",2:"hin","2T":"hin","2B":"hin",3:"hin"},{l:"Hiri Motu",bh:"Hiri Motu",1:"ho",2:"hmo","2T":"hmo","2B":"hmo",3:"hmo"},{l:"Hungarian",bh:"Magyar",1:"hu",2:"hun","2T":"hun","2B":"hun",3:"hun"},{l:"Interlingua",bh:"Interlingua",1:"ia",2:"ina","2T":"ina","2B":"ina",3:"ina"},{l:"Indonesian",bh:"Bahasa Indonesia",1:"id",2:"ind","2T":"ind","2B":"ind",3:"ind"},{l:"Interlingue",bh:"Interlingue",1:"ie",2:"ile","2T":"ile","2B":"ile",3:"ile"},{l:"Irish",bh:"Gaeilge",1:"ga",2:"gle","2T":"gle","2B":"gle",3:"gle"},{l:"Igbo",bh:"Igbo",1:"ig",2:"ibo","2T":"ibo","2B":"ibo",3:"ibo"},{l:"Inupiaq",bh:"I\xf1upiak",1:"ik",2:"ipk","2T":"ipk","2B":"ipk",3:"ipk"},{l:"Ido",bh:"Ido",1:"io",2:"ido","2T":"ido","2B":"ido",3:"ido"},{l:"Icelandic",bh:"\xcdslenska",1:"is",2:"isl","2T":"isl","2B":"ice",3:"isl"},{l:"Italian",bh:"Italiano",1:"it",2:"ita","2T":"ita","2B":"ita",3:"ita"},{l:"Inuktitut",bh:"\u1403\u14c4\u1483\u144e\u1450\u1466",1:"iu",2:"iku","2T":"iku","2B":"iku",3:"iku"},{l:"Japanese",bh:"\u65e5\u672c\u8a9e",1:"ja",2:"jpn","2T":"jpn","2B":"jpn",3:"jpn"},{l:"Javanese",bh:"Basa Jawa",1:"jv",2:"jav","2T":"jav","2B":"jav",3:"jav"},{l:"Kalaallisut",bh:"Kalaallisut",1:"kl",2:"kal","2T":"kal","2B":"kal",3:"kal"},{l:"Kannada",bh:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",1:"kn",2:"kan","2T":"kan","2B":"kan",3:"kan"},{l:"Kanuri",bh:"Kanuri",1:"kr",2:"kau","2T":"kau","2B":"kau",3:"kau"},{l:"Kashmiri",bh:"\u0643\u0634\u0645\u064a\u0631\u064a",1:"ks",2:"kas","2T":"kas","2B":"kas",3:"kas"},{l:"Kazakh",bh:"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",1:"kk",2:"kaz","2T":"kaz","2B":"kaz",3:"kaz"},{l:"Khmer",bh:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",1:"km",2:"khm","2T":"khm","2B":"khm",3:"khm"},{l:"Kikuyu",bh:"G\u0129k\u0169y\u0169",1:"ki",2:"kik","2T":"kik","2B":"kik",3:"kik"},{l:"Kinyarwanda",bh:"Kinyarwanda",1:"rw",2:"kin","2T":"kin","2B":"kin",3:"kin"},{l:"Kyrgyz",bh:"\u041a\u044b\u0440\u0433\u044b\u0437\u0447\u0430",1:"ky",2:"kir","2T":"kir","2B":"kir",3:"kir"},{l:"Komi",bh:"\u041a\u043e\u043c\u0438",1:"kv",2:"kom","2T":"kom","2B":"kom",3:"kom"},{l:"Kongo",bh:"Kongo",1:"kg",2:"kon","2T":"kon","2B":"kon",3:"kon"},{l:"Korean",bh:"\ud55c\uad6d\uc5b4",1:"ko",2:"kor","2T":"kor","2B":"kor",3:"kor"},{l:"Kurdish",bh:"Kurd\xee",1:"ku",2:"kur","2T":"kur","2B":"kur",3:"kur"},{l:"Kwanyama",bh:"Kuanyama",1:"kj",2:"kua","2T":"kua","2B":"kua",3:"kua"},{l:"Latin",bh:"Latina",1:"la",2:"lat","2T":"lat","2B":"lat",3:"lat"},{l:"Luxembourgish",bh:"L\xebtzebuergesch",1:"lb",2:"ltz","2T":"ltz","2B":"ltz",3:"ltz"},{l:"Ganda",bh:"Luganda",1:"lg",2:"lug","2T":"lug","2B":"lug",3:"lug"},{l:"Limburgish",bh:"Limburgs",1:"li",2:"lim","2T":"lim","2B":"lim",3:"lim"},{l:"Lingala",bh:"Ling\xe1la",1:"ln",2:"lin","2T":"lin","2B":"lin",3:"lin"},{l:"Lao",bh:"\u0e9e\u0eb2\u0eaa\u0eb2\u0ea5\u0eb2\u0ea7",1:"lo",2:"lao","2T":"lao","2B":"lao",3:"lao"},{l:"Lithuanian",bh:"Lietuvi\u0173",1:"lt",2:"lit","2T":"lit","2B":"lit",3:"lit"},{l:"Luba-Katanga",bh:"Tshiluba",1:"lu",2:"lub","2T":"lub","2B":"lub",3:"lub"},{l:"Latvian",bh:"Latvie\u0161u",1:"lv",2:"lav","2T":"lav","2B":"lav",3:"lav"},{l:"Manx",bh:"Gaelg",1:"gv",2:"glv","2T":"glv","2B":"glv",3:"glv"},{l:"Macedonian",bh:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438",1:"mk",2:"mkd","2T":"mkd","2B":"mac",3:"mkd"},{l:"Malagasy",bh:"Malagasy",1:"mg",2:"mlg","2T":"mlg","2B":"mlg",3:"mlg"},{l:"Malay",bh:"Bahasa Melayu",1:"ms",2:"msa","2T":"msa","2B":"may",3:"msa"},{l:"Malayalam",bh:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",1:"ml",2:"mal","2T":"mal","2B":"mal",3:"mal"},{l:"Maltese",bh:"Malti",1:"mt",2:"mlt","2T":"mlt","2B":"mlt",3:"mlt"},{l:"M\u0101ori",bh:"M\u0101ori",1:"mi",2:"mri","2T":"mri","2B":"mao",3:"mri"},{l:"Marathi",bh:"\u092e\u0930\u093e\u0920\u0940",1:"mr",2:"mar","2T":"mar","2B":"mar",3:"mar"},{l:"Marshallese",bh:"Kajin M\u0327aje\u013c",1:"mh",2:"mah","2T":"mah","2B":"mah",3:"mah"},{l:"Mongolian",bh:"\u041c\u043e\u043d\u0433\u043e\u043b",1:"mn",2:"mon","2T":"mon","2B":"mon",3:"mon"},{l:"Nauru",bh:"Dorerin Naoero",1:"na",2:"nau","2T":"nau","2B":"nau",3:"nau"},{l:"Navajo",bh:"Din\xe9 Bizaad",1:"nv",2:"nav","2T":"nav","2B":"nav",3:"nav"},{l:"Northern Ndebele",bh:"isiNdebele",1:"nd",2:"nde","2T":"nde","2B":"nde",3:"nde"},{l:"Nepali",bh:"\u0928\u0947\u092a\u093e\u0932\u0940",1:"ne",2:"nep","2T":"nep","2B":"nep",3:"nep"},{l:"Ndonga",bh:"Owambo",1:"ng",2:"ndo","2T":"ndo","2B":"ndo",3:"ndo"},{l:"Norwegian Bokm\xe5l",bh:"Norsk (Bokm\xe5l)",1:"nb",2:"nob","2T":"nob","2B":"nob",3:"nob"},{l:"Norwegian Nynorsk",bh:"Norsk (Nynorsk)",1:"nn",2:"nno","2T":"nno","2B":"nno",3:"nno"},{l:"Norwegian",bh:"Norsk",1:"no",2:"nor","2T":"nor","2B":"nor",3:"nor"},{l:"Nuosu",bh:"\ua188\ua320\ua4bf Nuosuhxop",1:"ii",2:"iii","2T":"iii","2B":"iii",3:"iii"},{l:"Southern Ndebele",bh:"isiNdebele",1:"nr",2:"nbl","2T":"nbl","2B":"nbl",3:"nbl"},{l:"Occitan",bh:"Occitan",1:"oc",2:"oci","2T":"oci","2B":"oci",3:"oci"},{l:"Ojibwe",bh:"\u140a\u14c2\u1511\u14c8\u142f\u14a7\u140e\u14d0",1:"oj",2:"oji","2T":"oji","2B":"oji",3:"oji"},{l:"Old Church Slavonic",bh:"\u0421\u043b\u043e\u0432\u0463\u0301\u043d\u044c\u0441\u043a\u044a",1:"cu",2:"chu","2T":"chu","2B":"chu",3:"chu"},{l:"Oromo",bh:"Afaan Oromoo",1:"om",2:"orm","2T":"orm","2B":"orm",3:"orm"},{l:"Oriya",bh:"\u0b13\u0b21\u0b3f\u0b3c\u0b06",1:"or",2:"ori","2T":"ori","2B":"ori",3:"ori"},{l:"Ossetian",bh:"\u0418\u0440\u043e\u043d \xe6\u0432\u0437\u0430\u0433",1:"os",2:"oss","2T":"oss","2B":"oss",3:"oss"},{l:"Panjabi",bh:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",1:"pa",2:"pan","2T":"pan","2B":"pan",3:"pan"},{l:"P\u0101li",bh:"\u092a\u093e\u0934\u093f",1:"pi",2:"pli","2T":"pli","2B":"pli",3:"pli"},{l:"Persian",bh:"\u0641\u0627\u0631\u0633\u06cc",1:"fa",2:"fas","2T":"fas","2B":"per",3:"fas"},{l:"Polish",bh:"Polski",1:"pl",2:"pol","2T":"pol","2B":"pol",3:"pol"},{l:"Pashto",bh:"\u067e\u069a\u062a\u0648",1:"ps",2:"pus","2T":"pus","2B":"pus",3:"pus"},{l:"Portuguese",bh:"Portugu\xeas",1:"pt",2:"por","2T":"por","2B":"por",3:"por"},{l:"Quechua",bh:"Runa Simi",1:"qu",2:"que","2T":"que","2B":"que",3:"que"},{l:"Romansh",bh:"Rumantsch",1:"rm",2:"roh","2T":"roh","2B":"roh",3:"roh"},{l:"Kirundi",bh:"Kirundi",1:"rn",2:"run","2T":"run","2B":"run",3:"run"},{l:"Romanian",bh:"Rom\xe2n\u0103",1:"ro",2:"ron","2T":"ron","2B":"rum",3:"ron"},{l:"Russian",bh:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",1:"ru",2:"rus","2T":"rus","2B":"rus",3:"rus"},{l:"Sanskrit",bh:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d",1:"sa",2:"san","2T":"san","2B":"san",3:"san"},{l:"Sardinian",bh:"Sardu",1:"sc",2:"srd","2T":"srd","2B":"srd",3:"srd"},{l:"Sindhi",bh:"\u0633\u0646\u068c\u064a\u200e",1:"sd",2:"snd","2T":"snd","2B":"snd",3:"snd"},{l:"Northern Sami",bh:"S\xe1megiella",1:"se",2:"sme","2T":"sme","2B":"sme",3:"sme"},{l:"Samoan",bh:"Gagana S\u0101moa",1:"sm",2:"smo","2T":"smo","2B":"smo",3:"smo"},{l:"Sango",bh:"S\xe4ng\xf6",1:"sg",2:"sag","2T":"sag","2B":"sag",3:"sag"},{l:"Serbian",bh:"\u0421\u0440\u043f\u0441\u043a\u0438",1:"sr",2:"srp","2T":"srp","2B":"srp",3:"srp"},{l:"Gaelic",bh:"G\xe0idhlig",1:"gd",2:"gla","2T":"gla","2B":"gla",3:"gla"},{l:"Shona",bh:"ChiShona",1:"sn",2:"sna","2T":"sna","2B":"sna",3:"sna"},{l:"Sinhala",bh:"\u0dc3\u0dd2\u0d82\u0dc4\u0dbd",1:"si",2:"sin","2T":"sin","2B":"sin",3:"sin"},{l:"Slovak",bh:"Sloven\u010dina",1:"sk",2:"slk","2T":"slk","2B":"slo",3:"slk"},{l:"Slovene",bh:"Sloven\u0161\u010dina",1:"sl",2:"slv","2T":"slv","2B":"slv",3:"slv"},{l:"Somali",bh:"Soomaaliga",1:"so",2:"som","2T":"som","2B":"som",3:"som"},{l:"Southern Sotho",bh:"Sesotho",1:"st",2:"sot","2T":"sot","2B":"sot",3:"sot"},{l:"Spanish",bh:"Espa\xf1ol",1:"es",2:"spa","2T":"spa","2B":"spa",3:"spa"},{l:"Sundanese",bh:"Basa Sunda",1:"su",2:"sun","2T":"sun","2B":"sun",3:"sun"},{l:"Swahili",bh:"Kiswahili",1:"sw",2:"swa","2T":"swa","2B":"swa",3:"swa"},{l:"Swati",bh:"SiSwati",1:"ss",2:"ssw","2T":"ssw","2B":"ssw",3:"ssw"},{l:"Swedish",bh:"Svenska",1:"sv",2:"swe","2T":"swe","2B":"swe",3:"swe"},{l:"Tamil",bh:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",1:"ta",2:"tam","2T":"tam","2B":"tam",3:"tam"},{l:"Telugu",bh:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",1:"te",2:"tel","2T":"tel","2B":"tel",3:"tel"},{l:"Tajik",bh:"\u0422\u043e\u04b7\u0438\u043a\u04e3",1:"tg",2:"tgk","2T":"tgk","2B":"tgk",3:"tgk"},{l:"Thai",bh:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",1:"th",2:"tha","2T":"tha","2B":"tha",3:"tha"},{l:"Tigrinya",bh:"\u1275\u130d\u122d\u129b",1:"ti",2:"tir","2T":"tir","2B":"tir",3:"tir"},{l:"Tibetan Standard",bh:"\u0f56\u0f7c\u0f51\u0f0b\u0f61\u0f72\u0f42",1:"bo",2:"bod","2T":"bod","2B":"tib",3:"bod"},{l:"Turkmen",bh:"T\xfcrkmen\xe7e",1:"tk",2:"tuk","2T":"tuk","2B":"tuk",3:"tuk"},{l:"Tagalog",bh:"Tagalog",1:"tl",2:"tgl","2T":"tgl","2B":"tgl",3:"tgl"},{l:"Tswana",bh:"Setswana",1:"tn",2:"tsn","2T":"tsn","2B":"tsn",3:"tsn"},{l:"Tonga",bh:"faka Tonga",1:"to",2:"ton","2T":"ton","2B":"ton",3:"ton"},{l:"Turkish",bh:"T\xfcrk\xe7e",1:"tr",2:"tur","2T":"tur","2B":"tur",3:"tur"},{l:"Tsonga",bh:"Xitsonga",1:"ts",2:"tso","2T":"tso","2B":"tso",3:"tso"},{l:"Tatar",bh:"\u0422\u0430\u0442\u0430\u0440\u0447\u0430",1:"tt",2:"tat","2T":"tat","2B":"tat",3:"tat"},{l:"Twi",bh:"Twi",1:"tw",2:"twi","2T":"twi","2B":"twi",3:"twi"},{l:"Tahitian",bh:"Reo M\u0101\u2019ohi",1:"ty",2:"tah","2T":"tah","2B":"tah",3:"tah"},{l:"Uyghur",bh:"\u0626\u06c7\u064a\u063a\u06c7\u0631\u0686\u0647",1:"ug",2:"uig","2T":"uig","2B":"uig",3:"uig"},{l:"Ukrainian",bh:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",1:"uk",2:"ukr","2T":"ukr","2B":"ukr",3:"ukr"},{l:"Urdu",bh:"\u0627\u0631\u062f\u0648",1:"ur",2:"urd","2T":"urd","2B":"urd",3:"urd"},{l:"Uzbek",bh:"O\u2018zbek",1:"uz",2:"uzb","2T":"uzb","2B":"uzb",3:"uzb"},{l:"Venda",bh:"Tshiven\u1e13a",1:"ve",2:"ven","2T":"ven","2B":"ven",3:"ven"},{l:"Vietnamese",bh:"Ti\u1ebfng Vi\u1ec7t",1:"vi",2:"vie","2T":"vie","2B":"vie",3:"vie"},{l:"Volap\xfck",bh:"Volap\xfck",1:"vo",2:"vol","2T":"vol","2B":"vol",3:"vol"},{l:"Walloon",bh:"Walon",1:"wa",2:"wln","2T":"wln","2B":"wln",3:"wln"},{l:"Welsh",bh:"Cymraeg",1:"cy",2:"cym","2T":"cym","2B":"wel",3:"cym"},{l:"Wolof",bh:"Wolof",1:"wo",2:"wol","2T":"wol","2B":"wol",3:"wol"},{l:"Western Frisian",bh:"Frysk",1:"fy",2:"fry","2T":"fry","2B":"fry",3:"fry"},{l:"Xhosa",bh:"isiXhosa",1:"xh",2:"xho","2T":"xho","2B":"xho",3:"xho"},{l:"Yiddish",bh:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",1:"yi",2:"yid","2T":"yid","2B":"yid",3:"yid"},{l:"Yoruba",bh:"Yor\xf9b\xe1",1:"yo",2:"yor","2T":"yor","2B":"yor",3:"yor"},{l:"Zhuang",bh:"Cuengh",1:"za",2:"zha","2T":"zha","2B":"zha",3:"zha"},{l:"Zulu",bh:"isiZulu",1:"zu",2:"zul","2T":"zul","2B":"zul",3:"zul"}];U(),Et(),Ft();function NL(t){var i,n=null!=(i=function(t){var i=t.q0,n=new RC;return n.Q0(i,0,i.byteLength),HC(n).I1}(t))?i:24;return t.mft/n}function xL(t){return t.Km===hm.NR}function BL(t,i,n,r,e){for(var s,u=function(t,i,n,r){var e=n.mft,s=ue.fromNumber(t.eM||0),u=r.gO(m_.yF(s,e));return{wft:r.rF(),yft:r,bft:u,Aft:r}}(t,0,n,r),o=m_.bF(t.ct||0,n.mft),h=t.xD||0,a=!(65536&h)&&1!==(h>>24&3),c=_a(e),f=new Ta;f.ac=n)){var r=Jn(t,function(t,i){return new zL(t.map(function(t){return t?t.Xft():null}),i).Oft()});if(0!==r.length)return new HL(i,n,r)}},t}(),GL="black",jL="white";U(),Et(),U(),Et();var QL=[[42,225],[92,233],[94,237],[95,243],[96,250],[123,231],[124,247],[125,209],[126,241],[127,9608],[128,174],[129,176],[130,189],[131,191],[132,8482],[133,162],[134,163],[135,9834],[136,224],[137,32],[138,232],[139,226],[140,234],[141,238],[142,244],[143,251],[144,193],[145,201],[146,211],[147,218],[148,220],[149,252],[150,8216],[151,161],[152,42],[153,8217],[154,9473],[155,169],[156,8480],[157,8226],[158,8220],[159,8221],[160,192],[161,194],[162,199],[163,200],[164,202],[165,203],[166,235],[167,206],[168,207],[169,239],[170,212],[171,217],[172,249],[173,219],[174,171],[175,187],[176,195],[177,227],[178,205],[179,204],[180,236],[181,210],[182,242],[183,213],[184,245],[185,123],[186,125],[187,92],[188,94],[189,95],[190,124],[191,8764],[192,196],[193,228],[194,214],[195,246],[196,223],[197,165],[198,164],[199,9475],[200,197],[201,229],[202,216],[203,248],[204,9487],[205,9491],[206,9495],[207,9499]].reduce(function(t,i){return t[i[0]]=i[1],t},{}),YL=function(){function t(){this.Qft=[],this.Jft=0,this.tvt=void 0;for(var t=0;tWx&&(this.Jft=31)},i.Zft=function(t){var i=this.Jft+t;this.Yft(i)},i.$ft=function(){this.Zft(-1),this.Qft[this.Jft]=null},i.Dft=function(t){t>=144&&this.$ft();var i=function(t){return QL[t]?String.fromCharCode(QL[t]):String.fromCharCode(t)}(t);this.addParsedChar(i)},i.addParsedChar=function(t){this.Jft>=Wx||(32===Number(t)?(this.Qft[this.Jft]=this.tvt?"":"",this.tvt=!this.tvt):this.Qft[this.Jft]=t,this.Zft(1))},i.ivt=function(t){for(var i=t;i=i)return null;var r=(new WL).Mft(this.avt.slice(1));return 0===r.length?null:{PO:new HL(t,i,r),zT:n,uvt:this.rvt<<1|this.ovt+1}},i.hr=function(){this.cvt(),this.dvt=1},i.lvt=function(){return this.dvt},i.fvt=function(t){this.dvt=t},i.Yft=function(t){this.avt[this.dvt].Yft(t)},i.Zft=function(t){this.avt[this.dvt].Zft(t)},i.vvt=function(){return this._vt},i.gvt=function(t){this._vt=t},i.Dft=function(t,i){if(!(i<32||i>127)){var n="";switch(t){case 0:n=void 0!==$L[i]?$L[i]:String.fromCharCode(i);break;case 1:n=tF[i];break;case 2:this.pvt(),n=iF[i];break;case 3:this.pvt(),n=nF[i]}n&&this.avt[this.dvt].addParsedChar(n)}},i.pvt=function(){this.avt[this.dvt].$ft()},i.mvt=function(t,i,n){if(t>=i)for(var r=n-1;r>=0;r--)this.avt[t+r]=this.avt[i+r];else for(var e=0;e0?this._vt:0,this.cvt()},i.bvt=function(t){this.Avt=t},i.Svt=function(t){this.Tvt=t},i.kvt=function(t){this.Evt=t},i.xvt=function(t){this.Pvt=t},t}(),JL=15,ZL=function(t){return t[t.Ivt=0]="Ivt",t[t.Cvt=1]="Cvt",t[t.Rvt=2]="Rvt",t[t.Dvt=3]="Dvt",t}({}),$L={39:"\u2019",42:"\xe1",92:"\xe9",94:"\xed",95:"\xf3",96:"\xfa",123:"\xe7",124:"\xf7",125:"\xd1",126:"\xf1",127:"\u2588"},tF={48:"\xae",49:"\xb0",50:"\xbd",51:"\xbf",52:"\u2122",53:"\xa2",54:"\xa3",55:"\u266a",56:"\xe0",57:"\u2800",58:"\xe8",59:"\xe2",60:"\xea",61:"\xee",62:"\xf4",63:"\xfb"},iF={32:"\xc1",33:"\xc9",34:"\xd3",35:"\xda",36:"\xdc",37:"\xfc",38:"\u2018",39:"\xa1",40:"*",41:"'",42:"\u2500",43:"\xa9",44:"\u2120",45:"\xb7",46:"\u201c",47:"\u201d",48:"\xc0",49:"\xc2",50:"\xc7",51:"\xc8",52:"\xca",53:"\xcb",54:"\xeb",55:"\xce",56:"\xcf",57:"\xef",58:"\xd4",59:"\xd9",60:"\xf9",61:"\xdb",62:"\xab",63:"\xbb"},nF={32:"\xc3",33:"\xe3",34:"\xcd",35:"\xcc",36:"\xec",37:"\xd2",38:"\xf2",39:"\xd5",40:"\xf5",41:"{",42:"}",43:"\\",44:"^",45:"_",46:"|",47:"~",48:"\xc4",49:"\xe4",50:"\xd6",51:"\xf6",52:"\xdf",53:"\xa5",54:"\xa4",55:"\u2502",56:"\xc5",57:"\xe5",58:"\xd8",59:"\xf8",60:"\u250c",61:"\u2510",62:"\u2514",63:"\u2518"},rF=function(){function t(t,i){this.Vp=void 0,this.Uvt=void 0,this.Lvt=void 0,this.Fvt=void 0,this.Mvt=void 0,this.Bvt=void 0,this.Ovt=void 0,this.Nvt=void 0,this.Vp=0,this.Uvt=new KL(t,i),this.Lvt=new KL(t,i),this.Fvt=new KL(t,i),this.Mvt=this.Lvt,this.Bvt=0,this.Ovt=void 0,this.Nvt=!1}var i=t.prototype;return i.hr=function(){this.Nvt=!0,this.Bvt=0,this.Vp=0,this.Mvt=this.Lvt,this.Ovt=void 0,this.Lvt.hr(),this.Fvt.hr(),this.Uvt.hr()},i.Vvt=function(t,i){return[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&t)<<1|i>>5&1]},i.Hvt=function(t,i){var n=this.Vvt(t,i),r=(30&i)>>1,e=jL,s=!1;r<7?e=uF[r]:7===r&&(s=!0);var u=!(1&~i);if(4!==this.Vp){var o=this.Mvt;if(3===this.Vp&&n!==o.lvt()){var h=1+o.lvt()-o.vvt(),a=1+n-o.vvt();o.mvt(a,h,o.vvt()),o.wvt(0,a-1),o.wvt(n+1,JL-n)}o.fvt(n);var c=Vx[t<<1&14|i>>5&1]-1;if(!(c<0)){var f=function(t,i){var n=i>95?i-96:i-64;return{wit:Ux[n].wit,mit:Ux[n].mit,yit:Ux[n].yit,Dit:t}}(c,i);o.Yft(f.yit),this.Mvt.bvt(u),this.Mvt.Svt(s),this.Mvt.kvt(e),this.Mvt.xvt(GL)}}},i.Wvt=function(t,i){this.Mvt.bvt(!1),this.Mvt.Svt(!1),this.Mvt.kvt(jL);var n=this.qvt(t,ZL.Ivt," ".charCodeAt(0)),r=jL,e=!1,s=!(1&~i);return"white_italics"===(r=uF[(14&i)>>1])&&(r="white",e=!0),this.Mvt.bvt(s),this.Mvt.Svt(e),this.Mvt.kvt(r),n},i.qvt=function(t,i,n){if(this.Mvt.Dft(i,n),2===this.Vp||3===this.Vp){var r=this.zvt(this.Mvt,this.Bvt,t);return this.Bvt=t,r}return null},i.zvt=function(t,i,n){return this.Nvt?null:2===this.Vp||3===this.Vp?t.nvt(n,n+10):t.nvt(i,n)},i.Gvt=function(t,i){var n=GL;7&t||(n=sF[(14&i)>>1]),this.Mvt.xvt(n)},i.Xvt=function(t){var i=eF,n=t.jvt,r=t.Qvt,e=null;switch(n){case i.RCL:this.Kvt();break;case i.BS:this.Yvt();break;case i.AOD:case i.AON:case i.DER:break;case i.RU2:e=this.Jvt(2,r);break;case i.RU3:e=this.Jvt(3,r);break;case i.RU4:e=this.Jvt(4,r);break;case i.FON:e=this.Zvt(r);break;case i.RDC:this.$vt(r);break;case i.TR:this.t_t();break;case i.RTD:this.i_t();break;case i.EDM:e=this.e_t(r);break;case i.CR:e=this.s_t(r);break;case i.ENM:this.n_t();break;case i.EOC:e=this.r_t(r)}return e},i.s_t=function(t){var i=this.Mvt;if(3!==this.Vp)return null;var n=this.zvt(i,this.Bvt,t),r=i.lvt()-i.vvt()+1;return i.mvt(r-1,r,i.vvt()),i.wvt(0,r-1),i.wvt(i.lvt(),JL-i.lvt()),this.Bvt=t,n},i.Jvt=function(t,i){this.Mvt=this.Lvt;var n=this.Mvt,r=null;return 3!==this.Vp&&4!==this.Vp&&(r=this.zvt(n,this.Bvt,i),this.Lvt.yvt(),this.Fvt.yvt(),this.Nvt=!1,n.fvt(JL)),this.Vp=3,n.gvt(t),r},i.Zvt=function(t){return this.qvt(t,ZL.Ivt," ".charCodeAt(0))},i.e_t=function(t){var i=this.Lvt,n=null;return 4!==this.Vp&&(n=this.zvt(i,this.Bvt,t)),i.cvt(),this.Nvt=!1,n},i.$vt=function(t){this.Vp=2,this.Mvt=this.Lvt,this.Mvt.gvt(0),this.Bvt=t},i.n_t=function(){this.Fvt.cvt()},i.r_t=function(t){var i=null;4!==this.Vp&&(i=this.zvt(this.Lvt,this.Bvt,t));var n=this.Fvt;return this.Fvt=this.Lvt,this.Lvt=n,this.Kvt(),this.Bvt=t,i},i.Kvt=function(){this.Vp=1,this.Mvt=this.Fvt,this.Mvt.gvt(0)},i.Yvt=function(){this.Mvt.pvt()},i.t_t=function(){this.Uvt.hr(),this.Nvt=!1,this.i_t()},i.i_t=function(){this.Mvt=this.Uvt,this.Vp=4},i.h_t=function(t,i,n){return this.Mvt.Dft(ZL.Ivt,i),this.qvt(t,ZL.Ivt,n)},i.o_t=function(t,i,n){var r=1&i?ZL.Dvt:ZL.Rvt;return this.qvt(t,r,n)},i.a_t=function(t){var i=t.u_t,n=t.jvt,r=t.Qvt;if(this.Ovt===(i<<8|n))return this.Ovt=void 0,null;if(this.Ovt=i<<8|n,this.c_t(i,n))this.Hvt(i,n);else{if(this.d_t(i,n))return this.Wvt(r,n);if(this.l_t(i,n))this.Gvt(i,n);else{if(this.f_t(i,n))return this.qvt(r,ZL.Cvt,n);if(this.v_t(i,n))return this.o_t(r,i,n);if(this.__t(i,n))return this.Xvt(t);this.isTabOffset(i)&&this.Mvt.Zft(n-32)}}return null},i.isTabOffset=function(t){return 23===t||31===t},i.__t=function(t,i){return 20==(246&t)&&32==(240&i)},i.c_t=function(t,i){return 16==(240&t)&&64==(192&i)},i.d_t=function(t,i){return 17==(247&t)&&32==(240&i)},i.l_t=function(t,i){return 16==(247&t)&&32==(240&i)||23==(247&t)&&45==(255&i)},i.f_t=function(t,i){return 17==(247&t)&&48==(240&i)},i.v_t=function(t,i){return 18==(246&t)&&32==(224&i)},t.g_t=function(t){return 16==(112&t)},t}(),eF={RCL:32,BS:33,AOD:34,AON:35,DER:36,RU2:37,RU3:38,RU4:39,FON:40,RDC:41,TR:42,RTD:43,EDM:44,CR:45,ENM:46,EOC:47},sF=["black","green","blue","cyan","red","yellow","magenta","black"],uF=["white","green","blue","cyan","red","yellow","magenta","white_italics"];U(),Et(),Ft(),Qt(),U(),Et(),U(),Et();var oF=function(){function t(t,i,n,r,e){this.p_t=void 0,this.Avt=void 0,this.Tvt=void 0,this.Pvt=void 0,this.Evt=void 0,this.p_t=t,this.Avt=i,this.Tvt=n,this.Pvt=r,this.Evt=e}var i=t.prototype;return i.Xft=function(){return this.p_t},i.m_t=function(){return this.Avt},i.w_t=function(){return this.Tvt},i.y_t=function(){return this.Pvt},i.b_t=function(){return this.Evt},t}(),hF=function(){function t(t){this.K_t=void 0,this.kz=void 0,this.E_t=void 0,this.T_t=void 0,this.S_t=void 0,this.k_t=void 0,this.x_t=void 0,this.P_t=void 0,this.j_t=void 0,this.C_t=void 0,this.HO=void 0,this.dvt=void 0,this.B_t=void 0,this.Tvt=void 0,this.Avt=void 0,this.Evt=void 0,this.Pvt=void 0,this.K_t=t,this.kz=!1,this.E_t=!1,this.T_t=0,this.S_t=0,this.k_t=0,this.x_t=0,this.P_t=0,this.j_t=2,this.C_t=[],this.HO=0,this.dvt=0,this.B_t=0,this.Tvt=!1,this.Avt=!1,this.Evt=jL,this.Pvt=GL,this.I_t()}var i=t.prototype;return i.A_t=function(t,i,n,r,e,s,u){this.kz=t,this.S_t=i,this.T_t=n,this.k_t=r,this.E_t=e,this.x_t=s,this.P_t=u},i.I_t=function(){this.C_t=[];for(var t=0;t=0,i=this.B_t=0;return t&&i},i.Re=function(){return this.kz},i.L_t=function(t){for(var i=0,n=t;n=this.x_t)return this.L_t(1),void(this.B_t=0);this.dvt++,this.B_t=0},i.F_t=function(){this.C_t[this.dvt]=this.R_t(),this.B_t=0},i.nvt=function(t,i){if(this.HO>=t)return null;var n=qL.Gft(this.C_t,this.HO,t);return n?(this.U_t(t),{PO:n,zT:"svc"+i,uvt:i}):null},i.V_t=function(t,i){this.dvt=t,this.B_t=i},i.H_t=function(t){this.Pvt=t},i.W_t=function(t){this.Evt=t},i.q_t=function(t){this.Avt=t},i.z_t=function(t){this.Tvt=t},i.G_t=function(){this.dvt=0,this.B_t=0,this.Avt=!1,this.Tvt=!1,this.Evt=jL,this.Pvt=GL},i.X_t=function(t){this.j_t=t},i.Q_t=function(){this.kz=!0},i.we=function(){this.kz=!1},i.Mh=function(){this.kz=!this.kz},i.U_t=function(t){this.HO=t},t}(),aF=42,cF=15,fF=function(){function t(t){this.ogt=void 0,this.pgt=void 0,this.hgt=void 0,this.ogt=t,this.pgt=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0],this.hgt=void 0}var i=t.prototype;return i.Y_t=function(t){var i=t.J_t(),n=i.XE,r=i.Qvt;n===gF&&(n=n<<16|t.J_t().XE);return n>=0&&n<=31?this.Z_t(n,r):n>=128&&n<=159?this.$_t(t,n,r):(n>=4096&&n<=4127?this.tgt(t,255&n):n>=4224&&n<=4255?this.igt(t,255&n):n>=32&&n<=127?this.egt(n):n>=160&&n<=255?this.sgt(n):n>=4128&&n<=4223?this.ngt(255&n):n>=4256&&n<=4351&&this.rgt(255&n),null)},i.egt=function(t){this.hgt&&(127!==t?this.hgt.D_t(String.fromCharCode(t)):this.hgt.D_t("\u266a"))},i.sgt=function(t){this.hgt&&this.hgt.D_t(String.fromCharCode(t))},i.ngt=function(t){if(this.hgt)if(void 0!==_F[t]){var i=_F[t];this.hgt.D_t(i)}else this.hgt.D_t("_")},i.rgt=function(t){this.hgt&&(160===t?this.hgt.D_t("[CC]"):this.hgt.D_t("_"))},i.Z_t=function(t,i){if(!this.hgt)return null;var n=this.hgt,r=null;switch(t){case vF:n.M_t();break;case lF:n.Re()&&(r=n.nvt(i,this.ogt)),n.O_t();break;case wF:n.Re()&&(r=n.nvt(i,this.ogt)),n.F_t();break;case dF:n.Re()&&(r=n.nvt(i,this.ogt)),n.I_t(),n.V_t(0,0)}return r},i.$_t=function(t,i,n){if(i>=128&&i<=135){var r=7&i;this.agt(r)}else{if(136===i){var e=t.J_t().XE;return this.ugt(e,n)}if(137===i){var s=t.J_t().XE;this.cgt(s,n)}else{if(138===i){var u=t.J_t().XE;return this.dgt(u,n)}if(139===i){var o=t.J_t().XE;return this.lgt(o,n)}if(140===i){var h=t.J_t().XE;return this.fgt(h,n)}if(143===i)return this.hr(n);if(144===i)this.vgt(t);else if(145===i)this._gt(t);else if(146===i)this.V_t(t);else if(151===i)this.ggt(t);else if(i>=152&&i<=159){var a=(15&i)-8;this.A_t(t,a,n)}}}return null},i.tgt=function(t,i){i>=8&&i<=15?t.uD(1):i>=16&&i<=23?t.uD(2):i>=24&&i<=31&&t.uD(3)},i.igt=function(t,i){i>=128&&i<=135?t.uD(4):i>=136&&i<=143&&t.uD(5)},i.agt=function(t){this.pgt[t]&&(this.hgt=this.pgt[t])},i.mgt=function(t){var i;return zt(this,function(n){switch(n.label){case 0:i=0,n.label=1;case 1:return i<8?!(1&~t)&&this.pgt[i]?[4,i]:[3,3]:[3,5];case 2:n.sent(),n.label=3;case 3:t>>=1,n.label=4;case 4:return i++,[3,1];case 5:return[2]}})},i.ugt=function(t,i){for(var n,r=null,e=Lt(this.mgt(t));!(n=e()).done;){var s=n.value,u=this.pgt[s];u.Re()&&(r=u.nvt(i,this.ogt)),u.I_t()}return r},i.cgt=function(t,i){for(var n,r=Lt(this.mgt(t));!(n=r()).done;){var e=n.value,s=this.pgt[e];s.Re()||s.U_t(i),s.Q_t()}},i.dgt=function(t,i){for(var n,r=null,e=Lt(this.mgt(t));!(n=e()).done;){var s=n.value,u=this.pgt[s];u.Re()&&(r=u.nvt(i,this.ogt)),u.we()}return r},i.lgt=function(t,i){for(var n,r=null,e=Lt(this.mgt(t));!(n=e()).done;){var s=n.value,u=this.pgt[s];u.Re()?r=u.nvt(i,this.ogt):u.U_t(i),u.Mh()}return r},i.fgt=function(t,i){for(var n,r=null,e=Lt(this.mgt(t));!(n=e()).done;){var s=n.value,u=this.pgt[s];u.Re()&&(r=u.nvt(i,this.ogt)),this.pgt[s]=void 0}return r},i.hr=function(t){var i=this.fgt(255,t);return this.jy(),i},i.jy=function(){this.hgt=void 0,this.pgt=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0]},i.vgt=function(t){t.uD(1);var i=t.J_t().XE;if(this.hgt){var n=(128&i)>0,r=(64&i)>0;this.hgt.z_t(n),this.hgt.q_t(r)}},i._gt=function(t){var i=t.J_t().XE,n=t.J_t().XE;if(t.uD(1),this.hgt){var r=3&i,e=(12&i)>>2,s=(48&i)>>4,u=3&n,o=(12&n)>>2,h=(48&n)>>4,a=this.wgt(s,e,r),c=this.wgt(h,o,u);this.hgt.W_t(a),this.hgt.H_t(c)}},i.V_t=function(t){var i=t.J_t().XE,n=t.J_t().XE;if(this.hgt){var r=15&i,e=63&n;this.hgt.V_t(r,e)}},i.ggt=function(t){t.uD(1),t.uD(1);var i=t.J_t().XE;if(t.uD(1),this.hgt){var n=3&i;this.hgt.X_t(n)}},i.A_t=function(t,i,n){var r=void 0!==this.pgt[i];if(!r){var e=new hF(i);e.U_t(n),this.pgt[i]=e}var s=t.J_t().XE,u=t.J_t().XE,o=t.J_t().XE,h=t.J_t().XE,a=t.J_t().XE,c=t.J_t().XE,f=(32&s)>0,v=127&u,d=(128&u)>0,l=o,w=1+(15&h),g=(240&h)>>4,_=1+(63&a);r&&0===(7&c)||this.pgt[i].G_t(),this.pgt[i].A_t(f,v,l,g,d,w,_),this.hgt=this.pgt[i]},i.wgt=function(t,i,n){var r={0:0,1:0,2:1,3:1};return mF[r[t]<<2|r[i]<<1|r[n]]},t}(),vF=8,dF=12,lF=13,wF=14,gF=16,_F={32:" ",33:"\xa0",37:"\u2026",42:"\u0160",44:"\u0152",48:"\u2588",49:"\u2018",50:"\u2019",51:"\u201c",52:"\u201d",53:"\u2022",57:"\u2122",58:"\u0161",60:"\u0153",61:"\u2120",63:"\u0178",118:"\u215b",119:"\u215c",120:"\u215d",121:"\u215e",122:"\u2502",123:"\u2510",124:"\u2514",125:"\u2500",126:"\u2518",127:"\u250c"},mF=["black","blue","green","cyan","red","magenta","yellow","white"];U(),Et();var yF=function(){function t(){this.Sgt=void 0,this.Agt=void 0,this.bgt=void 0,this.Sgt=[],this.Agt=null,this.bgt=0}var i=t.prototype;return i.ygt=function(t){if(t.Km===AL.cft){var i=63&t.XE;return this.bgt=2*i-1,void(this.Agt=[])}if(this.Agt&&(this.bgt>0&&(this.Agt.push(t),this.bgt--),0===this.bgt)){var n=new pF(this.Agt);this.Sgt.push(n),this.Agt=null,this.bgt=0}},i.Tgt=function(){return this.Sgt},i.kgt=function(){this.Sgt=[]},i.jy=function(){this.Sgt=[],this.Agt=[],this.bgt=0},t}(),pF=function(){function t(t){this.xgt=void 0,this.Pgt=void 0,this.xgt=0,this.Pgt=t}var i=t.prototype;return i.Egt=function(){return this.xgtthis.Pgt.length)throw new ld(vd.SUBTITLE_PARSE_ERROR,"Buffer read out of bounds / invalid CEA-708 Data.");this.xgt+=t},t}(),kF=function(){function t(){this.Rgt=void 0,this.Dgt=void 0,this.Ngt=void 0,this.Cgt=void 0,this.Ogt=void 0,this.Mgt=void 0,this.Lgt=void 0,this.Bgt=void 0,this.Vgt=!1,this.Rgt=[],this.Dgt=[],this.Ngt=new yF,this.Cgt=0,this.Ogt=$u({CC1:new rF(0,0),CC2:new rF(0,1),CC3:new rF(1,0),CC4:new rF(1,1)}),this.Mgt=0,this.Lgt=0,this.Bgt=Zu(),this.hr()}var i=t.prototype;return i.jy=function(){this.Cgt=0,this.Rgt=[],this.Dgt=[],this.Ngt.jy(),this.hr(),this.Bgt.forEach(function(t){t.jy()})},i.hr=function(){this.Mgt=0,this.Lgt=0,this.Ogt.forEach(function(t){t.hr()})},i.Fgt=function(t,i){if(t.fft){var n=t._ft,r=t.gft,e=t.Km;e===AL.oft||e===AL.aft?this.Rgt.push({Qvt:i,Km:e,u_t:n,jvt:r,Ugt:this.Rgt.length}):this.Vgt&&(this.Dgt.push({Qvt:i,Km:e,XE:n,Ugt:this.Dgt.length}),this.Dgt.push({Qvt:i,Km:AL.uft,XE:r,Ugt:this.Dgt.length}))}},i.dj=function(){var t=[];this.Rgt.sort(function(t,i){return t.Qvt-i.Qvt||t.Ugt-i.Ugt}),this.Dgt.sort(function(t,i){return t.Qvt-i.Qvt||t.Ugt-i.Ugt});for(var i,n=Lt(this.Rgt);!(i=n()).done;){var r=i.value,e=this.Hgt(r);e&&t.push(e)}for(var s,u=Lt(this.Dgt);!(s=u()).done;){var o=s.value;this.Ngt.ygt(o)}for(var h,a=Lt(this.Ngt.Tgt());!(h=a()).done;){var c,f=h.value,v=this.Wgt(f);(c=t).push.apply(c,[].concat(v))}return this.Ngt.kgt(),this.Rgt=[],this.Dgt=[],t},i.Hgt=function(t){var i=t.Km;if(rF.g_t(t.u_t)){var n=t.u_t>>3&1;0===i?this.Mgt=n:this.Lgt=n}var r="CC"+(i<<1|(i?this.Lgt:this.Mgt)+1),e=this.Ogt.get(r);return 255===t.u_t&&255===t.jvt||!t.u_t&&!t.jvt||!this.qgt(t.u_t)||!this.qgt(t.jvt)?(++this.Cgt>=45&&this.hr(),null):(this.Cgt=0,t.u_t&=127,t.jvt&=127,t.u_t||t.jvt?rF.g_t(t.u_t)?e.a_t(t):e.h_t(t.Qvt,t.u_t,t.jvt):null)},i.Wgt=function(t){var i=[];try{for(;t.Egt();){var n=t.J_t().XE,r=(224&n)>>5,e=31&n;if(7===r&&0!==e)r=63&t.J_t().XE;if(0!==r){if(!this.Bgt.has(r)){var s=new fF(r);this.Bgt.set(r,s)}for(var u=this.Bgt.get(r),o=t.Igt();t.Igt()-o>=1;return 1===i},t}();U(),Et(),Pt();var bF=function(t){function i(i,n){var r;return(r=t.call(this,"zgt")||this).uvt=void 0,r.PO=void 0,r.uvt=i,r.PO=n,r}return Ct(i,t),i}(rh),AF=m_.hU(.1),TF=function(t){function i(){var i;return(i=t.call(this)||this).Xgt=void 0,i.Xgt=new kF,i}Ct(i,t);var n=i.prototype;return n.Ggt=function(t,i){this.Xgt.Fgt(t,i)},n.dj=function(){for(var t,i=Lt(this.Xgt.dj());!(t=i()).done;){var n=t.value;this.So(new bF(n.uvt,n.PO))}},n.hr=function(){this.Xgt.jy()},n.kn=function(){this.Vo(),this.Xgt.jy()},i}(th),SF=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Ygt=[],i}Ct(i,t);var n=i.prototype;return n.jgt=function(t,i,n,r){var e=this.Qgt(t,r);this.Kgt(e,i,n),this.dj()},n.Qgt=function(t,i){var n,r=t.slice().sort(Hx),e=this.Ygt;if(0===e.length)return r;if(0===r.length)return e;var s=e[0].Ait,u=e[e.length-1].Ait,o=r[0].Ait,h=e[0].qot===r[0].qot;if(u.gF(o).fF().lF(m_.hU(2.5*i))&&h)n=e.concat(r).sort(Hx);else if(o.aF(s)){for(var a=0;au.CO?e.RO=u.CO:e.CO>u.CO&&u.RO>e.CO?u.RO=e.CO:e.CO===u.CO&&(e.RO=u.RO)}n.lpt(r,e)},n.Zgt=Zu(),n.opt=new SF,n.opt.wn("zgt",n.dpt),n}Ct(i,t);var n=i.prototype;return n.Jgt=function(t){return this.Zgt.get(t)},n.$gt=function(t){var i=this.Zgt.get(t.Sit);return i||(i=this.tpt(t),this.Zgt.set(t.Sit,i)),i},n.tpt=function(t){var i=[Jw.zI],n=function(t){if(t!==PL)for(var i,n=t.toLowerCase(),r=Lt(DL);!(i=r()).done;){var e=i.value;if(e[1]===n||e[2]===n||e["2T"]===n||e["2B"]===n||e[3]===n)return e}}(t.Tit),r=n?n.l:"";t.ipt&&(r="easy "+r,i.push(Jw.QI));var e=t.Th||r||"CC"+t.Sit,s=this.ept(e,t.Tit,i);return this.tt(s),s},n.ght=function(t){var i=km.PD(_a(t));this.spt=function(t){for(var i,n=Lt(t.Z);!(i=n()).done;){var r=i.value,e=OL(r),s=r.$D.cN.fN._N.pN,u=Fn(s,function(t){return t.Km===hm.tR});if(!u){var o=s.filter(function(t){return t.Km===hm.DR}),h=Fn(o,function(t){var i;return(null==(i=t.dB)?void 0:i.Km)===hm.tR});h&&(u=h.dB)}if(u){var a=SC(_a(u.ZN.lk),new Ta),c=u.tB;return Yu({},e,{sN:r.yD.sN,ZN:Aa(u.ZN.lk),Ti:u.Ti,Mi:u.Mi,MB:c&&c.MB,BB:c&&c.BB,a2:a.U0,npt:a.V0,u2:a.H0,q0:a.q0[0],z0:a.z0[0]})}}}(Fn(i,ML))},n.elt=function(t,i,n,r,e,s){var u;if(this.spt&&(S(this.rpt)||!Sn(this.rpt,i,1e-5))){S(this.hpt)||Sn(this.hpt,i,.1)||this.opt.hr();for(var o,h,a=function(t,i,n,r,e){for(var s,u=[],o=i.filter(xL),h=r(n),a=Lt(o);!(s=a()).done;){var c=s.value,f=Fn(c.Z,function(t){return t.yD.sN===n.sN});if(f)for(var v,d,l=f.yD.FB||0,w=f.yD.UB||0,g=f.KB?f.KB.KB:ue.ZERO,_=c.qB+(null!=(v=f.yD.YB)?v:ue.ZERO).toNumber(),m=Lt(f.QB);!(d=m()).done;)for(var y,p=d.value,k=_+(p.qB||0),b=Lt(p.iM);!(y=b()).done;){var A=y.value,T=A.Wy||w,S=new RC;S.Q0(t,k,k+T);var E=m_.yF(g,n.mft);S.LU=e(A,c,n,E,ka(t,k,k+T)),u.push(S),k+=T,g=g.add(A.ct||l||h)}}return u}(t,km.PD(_a(t)),this.spt,NL,BL),c=null!=(o=null==(u=ir(a,function(t){return t.LU.ct}))?void 0:u.LU.ct)?o:0,f=function(t){for(var i,n=[],r=Lt(t);!(i=r()).done;){var e,s=i.value;s.LU.xft&&(e=n).push.apply(e,[].concat(s.LU.xft)),delete s.LU.xft}for(var u=0;u0}(o,i)||0!==g.length){var y=ba(t),p=Fn(s,function(t){return t.Km===hm.ZC}),k=p?gm.mD(p.lk,hm.$C):void 0,b=k?function(t){var i=t.lk.Fy();return i.uD(4),i.uD(4),i.eD()}(k):1,A=Fn(f,function(t){return t.Km===hm.JC});A&&function(t,i,n){var r=zF(_a(t),i),e=gm.pD(r,new Ta),s=e.lk;s.uD(4);for(var u=s.eD(),o=0;o=0;S--){var I=g[S];y=WF(y,I.ppt,v,T,I.mpt,n)}return{wpt:y,ypt:{bpt:g.length,OB:b}}}}}}}}}}function HF(t,i,n){var r=Ba(t,n,i.lk.lk.byteOffset+i.lk.lk.byteLength);return XF(zF(_a(r),i),n.byteLength),r}function WF(t,i,n,r,e,s){var u=function(t,i,n){0;var r=t.lk.lk,e=YF(),s=new E(r.byteLength+e.byteLength),u=_a(s);s.set(ma(r),0),XF(u,e.byteLength),ta(u,new Ta(ZF),i),s.set(e,r.byteLength),ta(u,new Ta(r.byteLength+KF),t.Km),n&&Uh(u,new Ta(r.byteLength+JF),n);return s}(i,e,s),o=Ba(t,u,i.lk.lk.byteOffset),h=_a(o);!function(t,i){var n=gm.pD(t,new Ta),r=gm.kD(n.lk,hm.YC,!1),e=_a(r.lk),s=e.getUint32(0);e.setUint32(0,s+i)}(zF(h,n),1);for(var a,c=Lt(r);!(a=c()).done;){XF(zF(h,a.value),u.byteLength)}return o}function zF(t,i){var n=i.lk.lk.byteOffset;return ga(t,n,n+i.lk.lk.byteLength)}function XF(t,i){var n=new Ta,r=qh(t,n);if(0===r);else if(1===r){n.Ly(4);var e=jh(t,n.Fy());Qh(t,n,e.add(i))}else n.Oy(0),Gh(t,n,r+i)}U(),Et(),Pt(),Ft();var qF=function(t){function i(i){var n;return(n=t.call(this)||this).Spt=void 0,n.iZ=void 0,n.Tpt=[],n.Spt=i,n}Ct(i,t);var n=i.prototype;return n.start=function(t){this.iZ=t},n.transform=function(t){this.E$(t),this.Apt()},n.flush=function(){this.P$(),this.Apt()},n.L$=function(t){return t===hm.NR},n.F$=function(t){var i=ba(ma(t.lk.lk)),n=gm.pD(_a(i),new Ta);i=GF(i,n,this.Spt),this.Tpt.push(i)},n.V$=function(t){this.Tpt.push(t)},n.Apt=function(){for(var t,i=Lt(function(t){if(t.length<2)return t;for(var i=[],n=t[0],r=n.buffer,e=n.byteOffset,s=n.byteLength,u=1;u=0;s--){var u=e[s];u.Km===hm.LR&&(r=jF(r,u,i,n))}return r}function jF(t,i,n,r){var e=zF(_a(t),i),s=gm.pD(e,new Ta),u=gm.lD(s.lk),o=Fn(u,function(t){return t.Km===hm.OR});if(!o)return t;var h=o.lk,a=h.$R.Fy(),c=h.eD(),f=pm(c).flags;h.uD(4),f.Uy(cm.BASE_DATA_OFFSET_PRESENT)&&h.uD(8);var v=h.$R.Fy();if(f.Uy(cm.SAMPLE_DESCRIPTION_INDEX_PRESENT)){var d=qh(h.lk,v);return Gh(h.lk,h.$R,d+r.bpt),t}Gh(h.lk,a,c|cm.SAMPLE_DESCRIPTION_INDEX_PRESENT);var l=new E(4);_a(l).setUint32(0,r.OB+r.bpt);for(var w,g=h.lk.byteOffset+v.ac,_=Lt(u.filter(function(t){return t.Km===hm.FR}));!(w=_()).done;){QF(w.value,l.byteLength)}for(var m=0,y=[o,i,n];m0?i.An(i.V-1):0;var n=t.An(0);isFinite(n)&&this.Ipt=0;s--){var u=e[s];u.Km===hm.NR&&(n=GF(n,u,i))}return n}(h,this.Upt)),u={Km:zR.wZ,lk:h}),a={Get:i.CO,ct:i.ct,EU:r,u2:null==(s=n.qot)?void 0:s.JI},c=this.Wrt.Fx,[4,this.Vpt()];case 1:return d.sent(),[4,this.Wrt.Q2(u,a,e)];case 2:return d.sent(),f=this.Wrt.Fx,v=this.Wrt.W3,[2,iU(c,f,v,i)]}})}).call(this)},n.ght=function(t,i,n){return Vt(function(){var r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:return dr(n),this.Fpt&&this.Fpt.ght(new E(t.jht)),s=new E(t.jht),this.Hpt(i)&&(u=this.Rpt.Wpt,o=[],u&&(o=Jn(u.qpt,function(t){return t.OW}),h=u.zpt.fH?jE(u.zpt.fH):void 0),(a=VF(s,o,h))?(this.Upt=a.ypt,s=a.wpt):this.Upt=void 0),(null==(r=this.Wrt)?void 0:r.Cd)&&this.Wrt.Cd.GT!==i.GT?(c={GT:i.GT},this.Wrt.IZ(c)?[4,this.Wrt.RZ(c)]:[3,2]):[3,2];case 1:v.sent(),dr(n),v.label=2;case 2:return f={Km:zR.wZ,lk:s},[4,this.Vpt()];case 3:return v.sent(),[4,this.Wrt.J2(f,{u2:null==(e=i.qot)?void 0:e.JI},n)];case 4:return v.sent(),[2]}})}).call(this)},n.ilt=function(t,i,n){return this.Wrt.pS(t,i,n)},n.r$=function(t,i){this.Wrt.G3(t,i)},n.h$=function(t,i){this.Wrt.X3(t,i)},n.Ppt=function(){return this.Wrt?this.Wrt.Fx:EA.rL()},n.xpt=function(){return this.Wrt?this.Wrt.W3:EA.rL()},n.Gpt=function(){return this.Wrt?this.Wrt.pS(0,1/0):ut.resolve()},n.Xpt=function(){return this.Wrt&&(this.Wrt.mn(HR.pZ,this.Rs),this.Wrt=void 0),ut.resolve()},n.jpt=function(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return n=LM.vdt(null!=(i=t.Alt)?i:t.xat,this.ndt),r=n.lQ,this.Wrt||(this.Wrt=this.Rpt.Qpt(r),this.Wrt.wn(HR.pZ,this.Rs),this.ldt=new nL(this.Wrt)),[4,this.Vpt()];case 1:return e.sent(),[2]}})}).call(this)},n.Un=function(t,i){var n=hr.ep([i]);this.uV.Zg(),this.uV=n;var r=this.Kpt(t,this.Ypt,n.Yg);return this.Ypt=r,r},n.Jpt=function(t){if(!jn(this.Zpt,Ng.CEA608)){var i=t.Zut.olt;if(function(t){return t.some(function(t){return t.x8===BF||t.x8===OF})}(i)){this.Fpt=new CF(this.iV);for(var n,r=function(t){for(var i,n=[],r=Lt(t);!(i=r()).done;){var e=i.value;if(e.x8===BF)for(var s,u=Lt(Xx(e.XE));!(s=u()).done;){var o=s.value;n.push(o)}else if(e.x8===OF)for(var h,a=Lt(NF(e.XE));!(h=a()).done;){var c=h.value;if(c.Sit<=4){var f=xF[c.Sit];n.push(Yu({},c,{Sit:f}))}}}return n}(i),e=Lt(r);!(n=e()).done;){var s=n.value;this.Fpt.$gt(s)}this.Ept.qW(this.Fpt.Z)}}},n.Kpt=function(t,i,n){return Vt(function(){return zt(this,function(r){switch(r.label){case 0:return dr(n),i?[4,i.catch(dn)]:[3,2];case 1:r.sent(),r.label=2;case 2:return this.Rlt===t&&this.$pt?[2]:[4,this.tmt()];case 3:return r.sent(),dr(n),[4,this.Gpt()];case 4:return r.sent(),dr(n),t?[4,this.oV(t)]:[3,6];case 5:r.sent(),r.label=6;case 6:return[2]}})}).call(this)},n.tmt=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=this.Rlt,this.Rlt=void 0,this.$pt=!1,this.Ipt=void 0,t&&(t.mn(Nw.RI,this.imt),t.Ilt(!1),t.mn(Nw.NO_QUALITY,this.Rs)),this.emt&&(this.emt.kn(),this.emt=void 0),this.Nlt?[4,this.Nlt.kn()]:[3,2];case 1:i.sent(),this.Nlt=void 0,i.label=2;case 2:return this.Fpt?(this.Ept.XW(this.Fpt.Z),[4,this.Fpt.kn()]):[3,4];case 3:i.sent(),i.label=4;case 4:return[2]}})}).call(this)},n.oV=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Rlt=t,this.Jpt(t),t.wn(Nw.RI,this.imt),t.wn(Nw.NO_QUALITY,this.Rs),[4,this.jpt(t)];case 1:return i.sent(),this.Nlt=this.smt(t),this.Nlt.wn($F,this.Rs),this.Nlt.wn("zot",this.Bpt),this.Nlt.Jot=t.Alt,this.emt=new UF(this.PL,this.Nlt),this.emt.wn(Nw.II,this.glt),t.Ilt(!0),this.$pt=!0,[2]}})}).call(this)},n.smt=function(t){return new iL(this,this.PL,this.PL,this.aV,this.Mz,this.rlt,this.Sut,this.cdt,this.ndt,this.ldt,this.Ndt,this.pq).jet(t)},n.hr=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.uV.Zg(),this.Ypt?[4,this.Ypt.catch(dn)]:[3,2];case 1:i.sent(),this.Ypt=void 0,i.label=2;case 2:return[4,this.tmt()];case 3:return i.sent(),t?[3,5]:[4,this.Gpt()];case 4:i.sent(),i.label=5;case 5:return[4,this.Xpt()];case 6:return i.sent(),[2]}})}).call(this)},n.nmt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.tmt()];case 1:return t.sent(),[2]}})}).call(this)},n.vlt=function(t){var i;null==(i=this.kpt)||i.vlt(t)},n.dlt=function(t,i){return Vt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,this.wat()];case 1:if(o.sent(),null==(n=this.kpt)||n.dlt(i),!((e=null==(r=this.Nlt)?void 0:r.Kot.mct.dct(t))&&e.V>0))return[3,5];s=0,o.label=2;case 2:return s=t.Zut.Oct.An?b.max(i,this.An):i;return e=b.max(r,e),EA.nL(r,e).MM()}},{key:"ZW",get:function(){return this.sct.iL(this.zx)}},{key:"act",get:function(){return this.Rpt.act}},{key:"zx",get:function(){return this.PL.zx}},{key:"Tn",get:function(){return this.Rlt?this.Rlt.Zut.Oct.Tn:NaN}},{key:"An",get:function(){var t=this.Dpt(),i=this.Ipt;return void 0===t?NaN:void 0!==i?i:t}},{key:"Mi",get:function(){return this.Rpt.Mi}},{key:"Ti",get:function(){return this.Rpt.Ti}},{key:"Npt",get:function(){return this.Ipt}}]),i}(th);function iU(t,i,n,r){var e,s,u=i.qM(t.MM());return 0===(u=u.qM(n.qM(i))).V?s=e=r.RO:(e=u.Tn(0),s=u.An(0)),{qdt:e,zdt:s}}var nU=0;var rU=function(t){function i(i,n,r,e,s,u,o,h,a,c,f,v,d,l){var w,g,_;return(w=t.call(this)||this).yO=void 0,w.tO=new rg,w.sO=new rg,w.Gl=void 0,w.iV=void 0,w.fmt=void 0,w.aV=void 0,w.Mz=void 0,w.Sut=void 0,w.PL=void 0,w.lmt=void 0,w.Cmt=[],w.Pmt=new hr,w.Tmt=!0,w.Zlt=[],w.ymt=void 0,w.pq=void 0,w.Ypt=void 0,w.Ndt=void 0,w.Zpt=void 0,w.w3=void 0,w.rlt=void 0,w.ju=void 0,w.Opt=void 0,w._mt=void 0,w.mmt=wn(function(){w.So(new YR(w.zx))},350),w.Dmt=function(t){var i=t.zmt.kpt;if(i)for(var n,r=Lt(w.Cmt);!(n=r()).done;){var e,s=n.value;s.kpt&&s.kpt!==i&&s.Km===(null==(e=i.plt)?void 0:e.Km)&&(s.mn("Rmt",w.Dmt),s.kpt.Rt=!1,s.wn("Rmt",w.Dmt))}w.Rs(t)},w.Lmt=function(t){vr(t)||w.So(new yb(wd(t,vd.MEDIA_LOAD_ERROR)))},w.kmt=function(t){var i=t.J6;i&&w.Omt(i).catch(w.Lmt)},w.Gmt=function(t){w.Fmt(t).catch(w.Lmt)},w.xmt=function(t){for(var i,n=Lt(w.Zlt);!(i=n()).done;){var r=function(){var i=s.value,n=i.NW;if(void 0===n||0===n.length)return"continue";var r=t.Py;n.filter(function(t){return t.P8&&Pa(new E(r),new E(t.P8))}).forEach(function(t){i.Xmt(t)})},e=i.value.kpt;if(void 0!==e)for(var s,u=Lt(e.xat);!(s=u()).done;)r()}},w.Emt=function(t){var i=t.J6;if(i)for(var n,r=Lt(w.Mmt);!(n=r()).done;)for(var e,s=n.value,u=Lt(s.Zut.xat);!(e=u()).done;){var o=e.value,h=(o.NW||[]).some(function(t){return t.fH&&Pa(pa(i),jE(t.fH))});o.Plt&&h&&(o.Plt=!1,o.qot&&s.vlt(o.qot))}},w.aV=r,w.Mz=e,w.Sut=s,w.PL=i,w.yO=pg(),w.Cmt=[],w.lmt=o,w.ymt=h,w.pq=l,w.iV=c,w.fmt=new gL(i,r,e,s,c,null==(_=null==u||null==(g=u.dash)?void 0:g.segmentRelativeVttTiming)||_),w.Gl=new Rb([w.fmt.nt]),w.Ndt=v,w.Zpt=d,w.lmt.wn(qO.Vot,w.Rs),w.ju=a,w.w3=n,w.rlt=u.lowLatency,w.Opt=f,w._mt=u.abr,w.PL.wn(eh.yy,w.kmt),w.PL.wn(eh.xw,w.Emt),w.PL.wn(eh.LICENSE_REQUEST_GENERATED,w.xmt),w}Ct(i,t);var n=i.prototype;return n.GY=function(t,i){return this.umt(t,i)},n.umt=function(t,i){return Vt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:for(n=Lt(t);!(r=n()).done;)e=r.value,this.cmt(e);return[4,this.Un(i)];case 1:h.sent(),s=Lt(this.lmt.dmt),h.label=2;case 2:return(u=s()).done?[3,6]:(o=u.value).Km!==eg.LT?[3,5]:o.xat&&0!==o.xat.length?[3,3]:(this.So(new _L("No supported representation found in the AdaptationSet with mimetype : "+o.Km)),[3,5]);case 3:return[4,this.fmt.oV(o)];case 4:h.sent(),h.label=5;case 5:return[3,2];case 6:return[2]}})}).call(this)},n.vmt=function(t){return new tU(t,this,this.PL,this.aV,this.Mz,this.Sut,this.iV,this.Opt,this._mt,this.Ndt,this.Zpt,this.rlt,this.pq)},n.dat=function(){return this.Zlt.some(function(t){return t.dat()})},n.hct=function(){return 0!==this.Zlt.length&&this.Zlt.every(function(t){return t.hct()})},n.Bpt=function(){this.gmt()&&this.So(new pL)},n.Qpt=function(t){if(Wv(t)){if(this.w3.e4)return this.w3.e4}else if(zv(t)&&this.w3.s4)return this.w3.s4;throw new y("Cannot allocate source buffer for mime type "+t)},n.pmt=function(t){t.wn([qm.ma,eh.Yw,eh.ey,eh.iy,eh.ly,eh._y,eh.Sw],this.Rs),t.wn(HR.pZ,this.mmt),t.wn("amt",this.Rs)},n.wmt=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,ut.all(this.Zlt.map(function(i){return i.kn(t)}))];case 1:return i.sent(),Yn(this.Zlt),[2]}})}).call(this)},n.gmt=function(){if(this.dat())return!1;if(!this.hct())return!1;var t=this.Fx;if(0===t.V)return!1;var i=this.zx;if(this.bmt)return t.Tn(t.V-1)<=i;var n=t.Mn(this.act);if(0===n.V)return!0;var r=n.Tn(n.V-1),e=n.An(n.V-1)+.1;return r<=i&&i<=e},n.wat=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Tmt?[2]:(this.Tmt=!0,[4,ut.all(this.Zlt.map(function(i){return i.wat(t)}))]);case 1:return i.sent(),[2]}})}).call(this)},n.bat=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Tmt?(this.Tmt=!1,[4,ut.all(this.Zlt.map(function(i){return i.bat(t)}))]):[2];case 1:return i.sent(),[2]}})}).call(this)},n.kn=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.PL.mn(eh.yy,this.kmt),this.PL.mn(eh.xw,this.Emt),this.PL.mn(eh.LICENSE_REQUEST_GENERATED,this.xmt),this.Vo(),this.lmt.mn(qO.Vot,this.Rs),this.Pmt.Zg(),this.Ypt?[4,this.Ypt.catch(dn)]:[3,2];case 1:i.sent(),this.Ypt=void 0,i.label=2;case 2:return[4,this.wmt(t)];case 3:return i.sent(),[4,this.fmt.kn()];case 4:return i.sent(),this.tO.kn(),this.sO.kn(),this.Gl.kn(),this.Imt(),[2]}})}).call(this)},n.cmt=function(t){this.Cmt.push(t),t.wn("Rmt",this.Dmt);for(var i,n=t.Km===eg.Bk?this.tO:this.sO,r=Lt(t.Z);!(i=r()).done;){var e=i.value;n.tt(e)}},n.Nmt=function(t){for(var i,n=t.Km===eg.Bk?this.tO:this.sO,r=Lt(t.Z);!(i=r()).done;){var e=i.value;n.it(e),e.kn()}t.kn(),Xn(this.Cmt,t)},n.Imt=function(){for(var t=this.Cmt.length-1;t>=0;t--)this.Nmt(this.Cmt[t])},n.Un=function(t,i){return this.Pmt.Zg(),this.Pmt=hr.ep([i]),this.Ypt=_r(this.vE(t,this.Ypt,this.Pmt.Yg),this.Pmt).catch(this.Lmt),this.Ypt},n.vE=function(t,i,n){return Vt(function(){var r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:return i?[4,i.catch(dn)]:[3,2];case 1:l.sent(),l.label=2;case 2:dr(n),r=[],e=this.Zlt.slice(),s=t.slice(),Yn(this.Zlt),u=Lt(e),l.label=3;case 3:return(o=u()).done?[3,7]:(h=o.value,(a=h.kpt)&&jn(s,a)?(this.Zlt.push(h),r.push(h.Un(a,n)),Xn(s,a),[3,6]):[3,4]);case 4:return this.Gl.XW(h.nt),[4,h.kn()];case 5:l.sent(),dr(n),l.label=6;case 6:return[3,3];case 7:for(c=Lt(s);!(f=c()).done;)v=f.value,d=this.vmt(v.iat),this.Gl.qW(d.nt),this.Zlt.push(d),this.pmt(d),r.push(d.Un(v,n));return[4,ut.all(r)];case 8:return l.sent(),[2]}})}).call(this)},n.RZ=function(t,i,n){return Vt(function(){return zt(this,function(r){switch(r.label){case 0:return this.w3===n?[3,2]:(this.w3=n,[4,this.wmt(!1)]);case 1:r.sent(),r.label=2;case 2:return[4,this.Un(t)];case 3:return r.sent(),this.ymt=i,[2]}})}).call(this)},n.Omt=function(t){return Vt(function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:i=Lt(this.Zlt),a.label=1;case 1:if((n=i()).done)return[3,6];if(r=n.value,void 0===(e=r.kpt))return[3,5];s=Lt(e.Zut.xat),a.label=2;case 2:return(u=s()).done?[3,5]:(o=u.value,h=o.NW||[],!h.some(function(i){return i.fH&&Pa(pa(t),jE(i.fH))})||o.Plt?[3,4]:(o.Plt=!0,[4,r.dlt(o,o.qot)]));case 3:a.sent(),this.So(new eN(new ug(vd.CONTENT_PROTECTION_OUTPUT_RESTRICTED,"Content unavailable due to DRM restrictions"))),a.label=4;case 4:return[3,2];case 5:return[3,1];case 6:return[2]}})}).call(this)},n.Fmt=function(t){return Vt(function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:i=Lt(this.Zlt),a.label=1;case 1:if((n=i()).done)return[3,6];if(e=function(){var i,n,e,u;return zt(this,function(o){switch(o.label){case 0:return i=h.value,n=i.NW,e=i.qot,void 0===n||0===n.length||void 0===e?[2,"continue"]:n.some(function(t){return jn(i.Umt,t)})?(u=r.Vmt(n,t.xy),e.xst===u?[3,3]:u?(s.vlt(e),[3,3]):[3,1]):[2,"continue"];case 1:return[4,s.dlt(i,e)];case 2:o.sent(),o.label=3;case 3:return[2]}})},s=n.value,void 0===(u=s.kpt))return[3,5];o=Lt(u.xat),a.label=2;case 2:return(h=o()).done?[3,5]:(r=this,[5,Xt(e())]);case 3:a.sent(),a.label=4;case 4:return[3,2];case 5:return[3,1];case 6:return[2]}})}).call(this)},n.Vmt=function(t,i){var n=!1,r=t.reduce(function(t,i){return!i.fH||jn(t,i.fH)?t:[].concat(t,[i.fH])},[]);return 0===r.length||(i.Xy(function(e,s){"usable"===e&&((t.some(function(t){return t.fH&&Pa(pa(s),jE(t.fH))})||Da(s,Fa)&&1===r.length&&1===i.Wy)&&(n=!0))}),n)},n.Aat=function(t){var i=function(){var i=r.value,n=Fn(t.Zlt,function(t){return t.V3===i.V3});void 0!==n&&i.Aat(n)};if(void 0!==t){var n=t.lmt;if(this.lmt.Hmt===n||this.lmt.Wmt===n)for(var r,e=Lt(this.Zlt);!(r=e()).done;)i()}},Nt(i,[{key:"JI",get:function(){return this.yO}},{key:"ct",get:function(){return this.PL.ct}},{key:"Rt",get:function(){return this.Zlt.some(function(t){return t.Rt})}},{key:"ht",get:function(){return this.tO}},{key:"Fx",get:function(){if(0===this.Zlt.length)return EA.rL();for(var t,i=this.Zlt.map(function(t){return t.Fx}),n=EA.nL(0,1/0),r=Lt(i);!(t=r()).done;){var e=t.value;n=n.Mn(e)}if(0===n.V)return n;if(this.hct()){var s=n.Mn(this.act);if(0===s.V)return n;for(var u,o=s.An(s.V-1),h=0,a=Lt(this.Zlt);!(u=a()).done;){var c=u.value;h=b.max(h,c.Npt)}o<=h&&(n=n.HM(new EA([o,h],[!0,!0])))}return n}},{key:"T8",get:function(){return this.PL.T8}},{key:"zx",get:function(){return this.PL.zx}},{key:"Wpt",get:function(){return this.ymt}},{key:"An",get:function(){if(this.bmt){var t=this.ct;if(!S(t)&&t!==bn)return t}if(!this.Zlt.length)return NaN;for(var i,n=0,r=Lt(this.Zlt);!(i=r()).done;){var e=i.value;n=b.max(n,e.An)}return n}},{key:"bmt",get:function(){var t=this.lmt.jdt;if(t.Km===mL.SV)return!1;var i=t.Amt;return 0!==i.length&&this.lmt===i[i.length-1]}},{key:"kP",get:function(){if(!this.Zlt.length)return EA.rL();for(var t,i=EA.hL(),n=Lt(this.Zlt);!(t=n()).done;){var r=t.value;i=i.Mn(r.kP)}if(i.V>0&&this.bmt&&isFinite(this.ct)){var e=this.ct,s=i.An(i.V-1);e>s&&(i=i.HM(EA.nL(s,e).MM()))}return i}},{key:"Mc",get:function(){return this.lmt}},{key:"nt",get:function(){return this.Gl}},{key:"rt",get:function(){return this.sO}},{key:"Ti",get:function(){return this.ju.Ti}},{key:"Mi",get:function(){return this.ju.Mi}},{key:"ZW",get:function(){var t=this.zx,i=this.Fx,n=i.zM(t);if(-1!==n)return{Tn:i.Tn(n),An:i.An(n)}}},{key:"act",get:function(){var t=this.lmt.Tn,i=this.bmt?1/0:this.lmt.An;return EA.nL(t,i)}},{key:"Smt",get:function(){return this.Tmt}},{key:"Bmt",get:function(){return this.Cmt.map(function(t){return t.kpt}).filter(Li)}},{key:"Mmt",get:function(){return this.Zlt.map(function(t){return t.kpt}).filter(Li)}},{key:"qmt",get:function(){return this.Cmt}}]),i}(th);U(),Et(),Wt(),xt(),Qt(),U(),Et(),Ft(),U(),Et(),xt();var eU=/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d*\.?\d*)S)?)?$/,sU=function(){function t(t){this.jmt=void 0,this.jmt=t}var i=t.prototype;return i.Qmt=function(){return this.jmt},i.Kmt=function(){return 1e3*this.jmt},t.PD=function(i){var n=i.match(eU);if(!n)throw new y("The given value could not be parsed as a valid DateTimeInterval");return new t(31536e3*(Number(n[1])||0)+2592e3*(Number(n[2])||0)+86400*(Number(n[3])||0)+3600*(Number(n[4])||0)+60*(Number(n[5])||0)+(Number(n[6])||0))},Nt(t,[{key:"wft",get:function(){return m_.hU(this.jmt,1e3)}}]),t}();U(),Et();var uU=function(t){return t.Ymt="progressive",t.Jmt="interlaced",t.yk="unknown",t}({});U(),Et();var oU=function(){function t(t,i){this.Zmt=void 0,this.$mt=void 0,this.Zmt=t,this.$mt=i}return t.prototype.rF=function(){return this.Zmt/this.$mt},t}();U(),Et();var hU=1886614376;function aU(t){var i=jE(co),n=t.byteLength,r=12+i.length+4+n,e=new E(r),s=_a(e),u=new Ta;return Gh(s,u,r),Gh(s,u,hU),Gh(s,u,0),Uh(s,u,i),Gh(s,u,n),Uh(s,u,new E(t)),e.buffer}var cU=/^(?:true|false)$/i,fU=/^(-?)(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:Z|([+-])(\d{2}):(\d{2}))?$/;function vU(t){if(void 0!==t)return sU.PD(t)}function dU(t){if(void 0!==t){var i=t.match(fU);if(!i)throw new y("The given value could not be parsed as a valid Date");var n=i[1],r=i[2],e=i[3],s=i[4],u=i[5],o=i[6],h=i[7],a=i[8],c=i[9],f=i[10],v=i[11],d=("-"===n?-1:1)*Number(r),l=Number(e)-1,w=Number(s),g=Number(u),_=Number(o),m=Number(h),p=Number("0."+(a||"")),k=b.round(1e3*p);if(c)_-=("-"===c?-1:1)*(60*Number(f)+Number(v));var A=new Date(Date.UTC(d,l,w,g,_,m,k));if(S(A.getTime()))throw new y("The given value could not be parsed as a valid Date");return A}}function lU(t){if(t){var i=/(\d+)-(\d+)/.exec(t);if(i)return[gU(i[1]),gU(i[2])]}}function wU(t){if(void 0!==t){if(!S(Number(t)))try{return ue.fromString(t,!0)}catch(t){}throw new y("The given value could not be parsed as a valid unsigned long")}}function gU(t){if(void 0!==t){var i=Number(t);if(!S(i))return i;throw new y("The given value could not be parsed as a valid Number")}}function _U(t){if(void 0!==t){var i=t.split("/"),n=Number(i[0]),r=Number(i[1]||1);if(!S(n)&&!S(r))return new oU(n,r);throw new y("The given value could not be parsed as a valid frame rate")}}function mU(t){if(void 0!==t){if(cU.test(t))return"true"===t.toLowerCase();if(!S(A(t)))return Boolean(A(t));throw new y("The given value could not be parsed as a valid Boolean.")}}function yU(t){return{Yu:t.hx,twt:mU(t.ox("availabilityTimeComplete")),iwt:gU(t.ox("availabilityTimeOffset"))}}function pU(t){return t.map(yU)}function kU(t){var i,n=DU(t),r=function(t,i,n,r){var e=t.ux(n,i);return void 0===e&&(e=t.ox(r+":"+i)),e}(t,"default_KID","urn:mpeg:cenc:2013","cenc"),e=Em(t,"pssh","urn:mpeg:cenc:2013","cenc")[0];if(void 0!==e&&(i=Oa(e.hx)),!i){var s=Em(t,"pro","urn:microsoft:playready","mspr")[0];void 0!==s&&(i=function(t){var i=Oa(t.hx);return aU(i)}(s))}return{fH:r,P8:i,x8:n.x8,XE:n.XE}}function bU(t){return{ewt:t.ox("sourceURL"),Wat:lU(t.ox("range"))}}function AU(t,i){var n=t.ox("d"),r=t.ox("t"),e=gU(t.ox("r"));i.push({ct:n,CO:r,swt:e})}function TU(t){return{Put:t.ox("index"),nwt:lU(t.ox("indexRange")),$D:t.ox("media"),rwt:lU(t.ox("mediaRange"))}}function SU(t){var i=IU(t),n=function(t){var i=t.map(TU);return i.length>0?i:void 0}(t.ZE("SegmentURL"));return Yu({},i,{hwt:n,owt:t.ox("xlink:href"),awt:t.ox("xlink:actuate")})}function EU(t){var i=mU(t.ox("availabilityTimeComplete")),n=gU(t.ox("availabilityTimeOffset")),r=lU(t.ox("indexRange")),e=mU(t.ox("indexRangeExact")),s=t.ZE("Initialization");if(s.length>1)throw new y("The provided MPEG-DASH document's "+t.$E+" element can not have more than one Initialization element.");var u=1===s.length?bU(s[0]):void 0,o=wU(t.ox("presentationTimeOffset")),h=t.ZE("RepresentationIndex");if(h.length>1)throw new y("The provided MPEG-DASH document's "+t.$E+" element can not have more than one RepresentationIndex element.");return{twt:i,iwt:n,nwt:r,uwt:e,cwt:u,dwt:o,lwt:1===h.length?bU(h[0]):void 0,fwt:vU(t.ox("timeShiftBufferDepth")),jD:gU(t.ox("timescale"))}}function IU(t){var i=EU(t),n=t.ZE("BitstreamSwitching"),r=n.length>0?bU(n[0]):void 0,e=gU(t.ox("duration")),s=t.ZE("SegmentTimeline");if(s.length>1)throw new y("The provided MPEG-DASH document's "+t.$E+" element can not have more than one SegmentTimeline element.");var u=1===s.length?function(t){for(var i,n=[],r=Lt(t.ZE("S"));!(i=r()).done;)AU(i.value,n);return n}(s[0]):void 0;return Yu({},i,{vwt:r,ct:e,mht:u,_wt:gU(t.ox("startNumber")),gwt:gU(t.ox("endNumber"))})}function RU(t){return{mwt:function(t){if(t){var i=t.split(/\s/);return i.length>1?(i.length=2,i.map(gU)):1===i.length?i.map(gU)[0]:void 0}}(t.ox("audioSamplingRate")),Rrt:t.ox("codecs"),wwt:mU(t.ox("codingDependency")),NW:function(t){if(0!==t.length)return t.map(kU)}(t.ZE("ContentProtection")),ywt:function(t){return t.map(NU)}(t.ZE("EssentialProperty")),bwt:function(t){return t.map(xU)}(t.ZE("SupplementalProperty")),Olt:_U(t.ox("frameRate")),Mi:gU(t.ox("height")),Awt:gU(t.ox("maxPlayoutRate")),Swt:gU(t.ox("maximumSAPPeriod")),lQ:t.ox("mimeType"),Twt:t.ox("profiles"),kwt:t.ox("sar"),Ewt:function(t){switch(t){case uU.Ymt:case uU.Jmt:case uU.yk:return t;default:return}}(t.ox("scanType")),xwt:t.ox("segmentProfiles"),Pwt:gU(t.ox("startWithSAP")),Ti:gU(t.ox("width"))}}function CU(t){var i=pU(t.ZE("BaseURL")),n=t.ZE("SegmentBase");if(n.length>1)throw new y("The provided MPEG-DASH document's "+t.WE+" element can not have more than one SegmentBase element.");var r=1===n.length?EU(n[0]):void 0,e=function(t){var i=t.map(SU);return i.length>0?i:void 0}(t.ZE("SegmentList")),s=t.ZE("SegmentTemplate");if(s.length>1)throw new y("The provided MPEG-DASH document's "+t.WE+" element can not have more than one SegmentTemplate element.");var u=1===s.length?function(t){return Yu({},IU(t),{Iwt:t.ox("bitstreamSwitching"),Cwt:t.ox("index"),Rwt:t.ox("initialization"),Dwt:t.ox("media")})}(s[0]):void 0;return{Nwt:i,Bwt:r,Mwt:e,Lwt:u}}function PU(t){var i=RU(t),n=CU(t),r=gU(t.ox("bandwidth")),e=t.ox("dependencyId"),s=t.ox("id"),u=t.ox("mediaStreamStructureId"),o=gU(t.ox("qualityRanking"));if(t.ZE("SegmentBase").length>1)throw new y("The provided MPEG-DASH document's Representation element can not have more than one SegmentBase element.");return Yu({},i,n,{IW:r,Owt:e,o:s,Fwt:u,Uwt:o})}function DU(t){return{x8:t.ox("schemeIdUri"),XE:t.ox("value")}}function NU(t){return DU(t)}function xU(t){return DU(t)}function BU(t){return DU(t)}function OU(t){return DU(t)}function MU(t){var i,n=RU(t),r=CU(t),e=function(t){return t.map(OU)}(t.ZE("Accessibility")),s=mU(t.ox("bitstreamSwitching")),u=t.ox("contentType"),o=gU(t.ox("group")),h=gU(t.ox("id")),a=(null==(i=t.ZE("Label")[0])?void 0:i.hx)||"",c=t.ox("lang"),f=gU(t.ox("maxBandwidth")),v=_U(t.ox("maxFrameRate")),d=gU(t.ox("maxHeight")),l=gU(t.ox("maxWidth")),w=gU(t.ox("minBandwidth")),g=_U(t.ox("minFrameRate")),_=gU(t.ox("minHeight")),m=gU(t.ox("minWidth")),p=t.ox("par"),k=function(t){return t.map(PU)}(t.ZE("Representation"));if(0===k.length)throw new y("The provided MPEG-DASH document has an AdaptationSet with no valid Representation's");var b,A=function(t){return t.map(BU)}(t.ZE("Role")),T=mU(t.ox("segmentAlignment"))||!1,S=gU(t.ox("selectionPriority")),E=S||1,I=mU(t.ox("subsegmentAlignment"))||!1;try{b=gU(t.ox("subsegmentStartsWithSAP"))}catch(t){}return Yu({},n,r,{olt:e,vwt:s,GT:u,plt:o,o:h,Th:a,bs:c,Vwt:f,Hwt:v,Wwt:d,qwt:l,zwt:w,Gwt:g,Xwt:_,Qwt:m,Kwt:p,xat:k,Glt:A,Ywt:T,tz:E,Jwt:I,Zwt:b,$wt:t.ox("xlink:actuate")||"onRequest",tyt:t.ox("xlink:href")})}function LU(t){var i=wU(t.ox("presentationTime"))||ue.ZERO,n=wU(t.ox("duration")),r=gU(t.ox("id")),e=function(t){for(var i=t.nx,n={},r=0;r1)throw new y("The provided MPEG-DASH document's Period element can not have more than one AssetIdentifier element.");var r=1===n.length?function(t){return DU(t)}(n[0]):void 0,e=function(t){return t.map(MU)}(t.ZE("AdaptationSet")),s=mU(t.ox("bitstreamSwitching")),u=vU(t.ox("duration")),o=function(t){return t.map(FU)}(t.ZE("EventStream")),h=t.ox("id"),a=vU(t.ox("start")),c=(t.ZE("Subset"),t.ox("xlink:href"));return Yu({},i,{jlt:e,iyt:r,vwt:s,ct:u,eyt:o,o:h,Tn:a,$wt:t.ox("xlink:actuate"),tyt:c})}function VU(t){var i=t.ox("schemeIdUri");if(i)return{x8:i,XE:t.ox("value")}}function HU(t,i){var n=dU(t.ox("availabilityEndTime")),r=dU(t.ox("availabilityStartTime")),e=pU(t.ZE("BaseURL")),s=t.ox("id"),u=function(t){return t.map(function(t){return""+t.hx})}(t.ZE("Location")),o=vU(t.ox("maxSegmentDuration")),h=vU(t.ox("maxSubsegmentDuration")),a=vU(t.ox("mediaPresentationDuration")),c=(t.ZE("Metrics"),vU(t.ox("minBufferTime")));if(!c)throw new y("The provided MPEG-DASH document's MPD element does not have the required 'minimumBufferTime' attribute.");var f=vU(t.ox("minimumUpdatePeriod")),v=function(t){return t.map(function(t){return UU(t)})}(t.ZE("Period"));if(!v.length)throw new y("The provided MPEG-DASH document's MPD element does not have the required 'Period' element.");var d=t.ox("profiles");if(!d)throw new y("The provided MPEG-DASH document's MPD element does not have the required 'profiles' attribute.");var l=dU(t.ox("publishTime")),w=vU(t.ox("suggestedPresentationDelay")),g=vU(t.ox("timeShiftBufferDepth")),_=function(t){switch(t){case mL.AV:case mL.SV:return t;default:return}}(t.ox("type")),m=function(t){for(var i,n=[],r=Lt(t);!(i=r()).done;){var e=VU(i.value);e&&n.push(e)}return n}(t.ZE("UTCTiming")),p=function(t){if(0===t.length)return;var i=t[0],n=i.ZE("Latency");if(0===n.length)return;var r=function(t){var i=t[0],n=gU(i.ox("target"));if(void 0===n)return;var r=gU(i.ox("min")),e=gU(i.ox("max"));return{syt:n,iU:r,tU:e}}(n);if(void 0===r)return;var e=function(t){if(0===t.length)return;var i=t[0],n=gU(i.ox("max")),r=gU(i.ox("min"));return{iU:r,tU:n}}(i.ZE("PlaybackRate"));return{nyt:r,vP:e}}(t.ZE("ServiceDescription"));return{ryt:n,hyt:r,Nwt:e,o:s,oyt:u,ayt:i,uyt:o,cyt:h,dyt:a,lyt:c,fyt:f,Amt:v,Twt:d,vyt:l,_yt:w,fwt:g,Km:_,gyt:m,pyt:p}}var WU=function(){function t(){}return t.prototype.myt=function(t,i){return function(t,i){if(!t)throw new y("The provided MPEG-DASH document does not contain a valid MPD root element.");return HU(t,i)}(Ui.HE(t).mx,i)},t}();function zU(t){return{get bandwidth(){return t.IW},get codecs(){return t.Rrt},get id(){return t.o},get uid(){return t.JI},get name(){return t.Th},get averageBandwidth(){return t.wyt},get label(){return t.Th},set label(i){t.Th=Gw(i)},get available(){return t.xst},get score(){return t.yyt},addEventListener:function(i,n){t.wn(i,n)},removeEventListener:function(i,n){t.mn(i,n)}}}function XU(t){return Mw(zU(t),{get height(){return t.Mi},get width(){return t.Ti},get frameRate(){return t.Olt},get firstFrame(){return t.byt}})}function qU(t){return Mw(zU(t),{get audioSamplingRate(){return t.mwt}})}U(),Et(),xt(),U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),xt(),Pt(),U(),Et(),xt(),Pt(),U(),Et(),U(),Et(),Pt();var GU=function(t){function i(i){var n;return(n=t.call(this,"update")||this).quality=void 0,n.quality=i,n}return Ct(i,t),i}(rh),jU=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).o=void 0,u.IW=void 0,u.Rrt=void 0,u.Syt=void 0,u.JI=void 0,u.bO=void 0,u.Ayt=void 0,u.o=i,u.IW=n,u.Rrt=r,u.Syt=s,u.JI=Ag(),u.bO=e||"",u.Ayt=!0,u}Ct(i,t);var n=i.prototype;return n.ZU=function(){this.Ayt=!1,this.So(new GU(this.Ca))},n.JU=function(){this.Ayt=!0,this.So(new GU(this.Ca))},Nt(i,[{key:"Th",get:function(){return this.bO},set:function(t){this.bO!==t&&(this.bO=t,this.So(new GU(this.Ca)))}},{key:"wyt",get:function(){}},{key:"xst",get:function(){return this.Ayt}},{key:"yyt",get:function(){}}]),i}(th),QU=function(t){function i(i,n,r,e,s,u,o,h,a){var c;return void 0===a&&(a=0),(c=t.call(this,i,n,r,e,s)||this).Olt=void 0,c.Ti=void 0,c.Mi=void 0,c.byt=void 0,c.hu=void 0,c.Olt=u,c.Ti=o,c.Mi=h,c.byt=a,c.hu=void 0,c}return Ct(i,t),Nt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=XU(this)),this.hu}}]),i}(jU),YU=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,r,e,s)||this).mwt=void 0,o.hu=void 0,o.mwt=u,o.hu=void 0,o}return Ct(i,t),Nt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=qU(this)),this.hu}}]),i}(jU);U(),Et(),U(),Et(),xt(),Pt();var KU=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).xyt=function(t){i.So(t)},i}return Ct(i,t),Nt(i,[{key:"Tyt",get:function(){var t=this.kyt();return null==t?void 0:t.Tn}},{key:"Eyt",get:function(){var t=this.kyt();return null==t?void 0:t.An}}]),i}(th),JU=function(t){function i(i,n){var r;if((r=t.call(this)||this).mat=void 0,r.hu=void 0,r.Pyt=void 0,r.Nyt=void 0,r.Ryt=void 0,r.Myt=!1,r.Lyt=!1,r.Cyt=[],r.mat=i,r.Pyt=n,r.Pyt.wn(qO.Fot,r.xyt),r.Km===eg.Mk){var e,s,u=null!=(s=null==(e=r.Olt)?void 0:e.rF())?s:NaN;r.Nyt=new QU(r.o,r.IW,r.Bp,"","",u,r.Ti,r.Mi)}else r.Km===eg.Bk?r.Nyt=new YU(r.o,r.IW,r.Bp,"","",r.mwt):r.Nyt=void 0;return r}Ct(i,t);var n=i.prototype;return n.Zct=function(t){var i=hM(t)?this.Pyt.Oyt(t):this.Pyt.Zct(t);return{Yu:i.Yu,Wat:i.Wat,Xk:this.jdt.Xk}},n.Fyt=function(){return this.Pyt.Fyt()},n.kyt=function(){return this.Pyt.kyt()},n.Uyt=function(){return this.Pyt.Uyt()},n.qct=function(t){return this.Pyt.qct(t)},n.Gct=function(t,i,n){return this.Pyt.Gct(t,this.jdt.Xk,i,n)},n.Mdt=function(t){return hM(t)?this.mht.Vyt(t,this.Pyt):this.mht.Mdt(t)},n.Lct=function(t){return hM(t)?this.mht.Hyt(t,this.Pyt):this.mht.Lct(t)},n.Xmt=function(t){jn(this.Cyt,t)||this.Cyt.push(t)},n.kn=function(){this.Pyt.mn(qO.Fot,this.xyt),this.Cyt=[]},Nt(i,[{key:"Zut",get:function(){return this.mat}},{key:"mwt",get:function(){var t;return null!=(t=this.Pyt.lk.mwt)?t:this.Zut.mwt}},{key:"IW",get:function(){return this.Pyt.lk.IW||0}},{key:"Rrt",get:function(){var t=this.Pyt.lk;return t.Rrt?[t.Rrt]:this.Zut.Rrt}},{key:"Iyt",get:function(){var t=this.Pyt.lk;return t.Rrt?[t.Rrt]:[]}},{key:"Bp",get:function(){return this.Pyt.lk.Rrt||this.Zut.Bp}},{key:"wwt",get:function(){return this.Pyt.lk.wwt||this.Zut.wwt}},{key:"NW",get:function(){return this.Pyt.lk.NW||this.Zut.NW}},{key:"Umt",get:function(){return this.Cyt}},{key:"GT",get:function(){return this.lQ+'; codecs="'+this.Bp+'"'}},{key:"ywt",get:function(){var t=this.Pyt.lk;return t.ywt.length?t.ywt:this.Zut.ywt}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{get id(){return t.o},get type(){return t.Km},get bandwidth(){return t.IW},get width(){return t.Ti},get height(){return t.Mi},get frameRate(){var i,n;return null!=(n=null==(i=t.Olt)?void 0:i.rF())?n:NaN},get audioSamplingRate(){return t.mwt}}}(this))}},{key:"Olt",get:function(){var t;return null!=(t=this.Pyt.lk.Olt)?t:this.Zut.Olt}},{key:"Mi",get:function(){return this.Pyt.lk.Mi||this.Zut.Mi}},{key:"o",get:function(){return this.Pyt.lk.o||""}},{key:"Jdt",get:function(){return this.Ryt},set:function(t){this.Ryt=t}},{key:"Ydt",get:function(){var t=this.Pyt.Dyt();if(t)return{Yu:t.Yu,Wat:t.Wat,Xk:this.jdt.Xk}}},{key:"Awt",get:function(){return this.Pyt.lk.Awt||this.Zut.Awt||1}},{key:"Swt",get:function(){return this.Pyt.lk.Swt||this.Zut.Swt}},{key:"jdt",get:function(){return this.Oct.jdt}},{key:"lQ",get:function(){return this.Pyt.lk.lQ||this.Zut.lQ}},{key:"Oct",get:function(){return this.Zut.Oct}},{key:"Twt",get:function(){return this.Pyt.lk.Twt||this.Zut.Twt}},{key:"qot",get:function(){return this.Nyt}},{key:"kwt",get:function(){return this.Pyt.lk.kwt||this.Zut.kwt}},{key:"Ewt",get:function(){return this.Pyt.lk.Ewt||this.Zut.Ewt}},{key:"Byt",get:function(){return this.Pyt.Byt}},{key:"xwt",get:function(){return this.Pyt.lk.xwt||this.Zut.xwt}},{key:"mht",get:function(){return this.Pyt.mht}},{key:"Pwt",get:function(){return this.Pyt.lk.Pwt||this.Zut.Pwt}},{key:"Km",get:function(){var t=this.lQ.split("/")[0];return"application"===t||"text"===t||uy(this.lQ,this.Rrt)?eg.LT:"video"===t?eg.Mk:"audio"===t?eg.Bk:"image"===t?eg.Lk:eg.yk}},{key:"Ti",get:function(){return this.Pyt.lk.Ti||this.Zut.Ti}},{key:"Hct",get:function(){return this.Myt},set:function(t){this.Myt=t}},{key:"Plt",get:function(){return this.Lyt},set:function(t){this.Lyt=t}}]),i}(KU),ZU=function(t){function i(i,n){var r;return(r=t.call(this)||this).Pyt=void 0,r.lmt=void 0,r.Slt=[],r.lmt=i,r.Pyt=n,r.Pyt.wn(qO.Fot,r.xyt),r}Ct(i,t);var n=i.prototype;return n.er=function(t,i){return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return n=this,0!==this.Slt.length?[3,2]:(r=this.Pyt.xat.map(function(r){return n.qyt(r,t,i)}),e=this,[4,ut.all(r)]);case 1:e.Slt=s.sent().filter(Li),s.label=2;case 2:return this.zyt(),[2]}})}).call(this)},n.qyt=function(t,i,n){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return r=new JU(this,t),[4,i(r)];case 1:return e=s.sent(),dr(n),e?[2,r]:[2,void 0]}})}).call(this)},n.zyt=function(){if(!this.Slt.length)throw new y("Detected an AdaptationSet without any supported Representations.")},n.kyt=function(){return this.Pyt.kyt()},n.Uyt=function(){return this.Pyt.Uyt()},n.kn=function(){this.Pyt.mn(qO.Fot,this.xyt);for(var t,i=Lt(this.Slt);!(t=i()).done;){t.value.kn()}Yn(this.Slt)},Nt(i,[{key:"olt",get:function(){return this.Pyt.lk.olt}},{key:"mwt",get:function(){var t;return null!=(t=this.Pyt.lk.mwt)?t:-1}},{key:"Rrt",get:function(){if(this.Pyt.lk.Rrt)return[this.Pyt.lk.Rrt];for(var t,i=[],n=Lt(this.xat);!(t=n()).done;){var r=t.value;r.Iyt.length&&-1===i.indexOf(r.Bp)&&i.push(r.Bp)}return i}},{key:"Bp",get:function(){return this.Rrt.join()}},{key:"wwt",get:function(){return this.Pyt.lk.wwt}},{key:"NW",get:function(){return this.Pyt.lk.NW}},{key:"GT",get:function(){return this.lQ+'; codecs="'+this.Bp+'"'}},{key:"ywt",get:function(){return this.Pyt.ywt}},{key:"bwt",get:function(){return this.Pyt.bwt}},{key:"Olt",get:function(){return this.Pyt.lk.Olt}},{key:"plt",get:function(){return this.Pyt.lk.plt}},{key:"Mi",get:function(){return this.Pyt.lk.Mi||0}},{key:"o",get:function(){return this.Pyt.lk.o}},{key:"Th",get:function(){return this.Pyt.lk.Th||""}},{key:"Awt",get:function(){return this.Pyt.lk.Awt}},{key:"Swt",get:function(){return this.Pyt.lk.Swt}},{key:"jdt",get:function(){return this.Oct.jdt}},{key:"lQ",get:function(){return this.Pyt.lk.lQ||this.Slt[0].lQ}},{key:"Oct",get:function(){return this.lmt}},{key:"Twt",get:function(){return this.Pyt.lk.Twt}},{key:"xat",get:function(){return this.Slt}},{key:"Glt",get:function(){return this.Pyt.lk.Glt||[]}},{key:"kwt",get:function(){return this.Pyt.lk.kwt}},{key:"Ewt",get:function(){return this.Pyt.lk.Ewt}},{key:"xwt",get:function(){return this.Pyt.lk.xwt}},{key:"tz",get:function(){return this.Pyt.lk.tz}},{key:"Pwt",get:function(){return this.Pyt.lk.Pwt}},{key:"Km",get:function(){var t=(this.Pyt.lk.GT||this.lQ).split("/")[0];return"application"===t||"text"===t||"subtitle"===t||uy(this.lQ,this.Rrt)?eg.LT:"video"===t?eg.Mk:"audio"===t?eg.Bk:"image"===t?eg.Lk:eg.yk}},{key:"Ti",get:function(){return this.Pyt.lk.Ti||0}},{key:"Tit",get:function(){return this.Pyt.lk.bs||""}},{key:"Vlt",get:function(){return this.Tyt}},{key:"Ult",get:function(){var t=this.Vlt,i=this.Eyt;if(void 0!==t&&void 0!==i){var n=b.min(i,this.jdt.Wyt);return b.max(t,n)}}}]),i}(KU);function $U(t,i){for(var n,r=[],e=Lt(i);!(n=e()).done;)for(var s,u=n.value,o=Lt(t);!(s=o()).done;){var h=s.value;r.push(Ui.Dh(h,u))}return r}U(),Et(),xt(),Pt(),Ft(),U(),Et(),xt(),Pt(),Ft(),U(),Et(),Ft(),U(),Et(),xt(),Pt(),H(),U(),Et(),xt(),Pt(),H(),U(),Et(),Pt(),U(),Et(),xt();var tV=function(){function t(t,i){this.lmt=void 0,this.ubt=void 0,this.Jb=void 0,this.obt=void 0,this._bt=void 0,this.lmt=t,this.ubt=i,this.Jb=i.jD,this.obt=i.iwt,this._bt=i.dwt}var i=t.prototype;return i.Gyt=function(t){var i=t-this.lmt.Tn;if(!(i<0||i>=this.lmt.ct)){var n=this.Xyt();return void 0!==n&&Sn(n,i,1e-5)?this.jyt():this.Qyt(i)}},i.Wct=function(t){var i=t-this.lmt.Tn;if(!(i<0))return this.Kyt(b.min(i,this.lmt.ct))},i.jyt=function(){return this.Yyt(0)},i.Jyt=function(){var t=this.lmt.ct;if(isFinite(t))return this.Kyt(t)},i.Fyt=function(t){if(this.lmt.tbt.Km===mL.SV){if(this.Zyt){var i=this.jyt(),n=this.ibt();if(void 0===i||void 0===n)return;return{ebt:t,sbt:i,nbt:n}}var r=this.rbt(t);if(!r)return;return{ebt:t,sbt:this.hbt(t),nbt:r}}var e=this.jyt();if(e)return{ebt:t,sbt:e,nbt:this.Jyt()}},i.Uyt=function(t,i){if(i){var n=this.Qdt(i.sbt),r=this.Kct(i.nbt);if(r){var e=this.Kdt(r);(!n||e.getTime()i.getTime();)n=this.Qct(n);if(n){var r=this.Qdt(n);if(r&&r.getTime()<=i.getTime()){var e=this.Qct(n);for(e&&this.nlt(e,i)&&(n=e);n;){if(this.Kdt(n).getTime()>i.getTime())return;if(this.nlt(n,i))break;n=this.Kct(n)}if(!n)return}return n}},i.nlt=function(t,i){if(this.Zyt)return!0;if(this.Kdt(t).getTime()>i.getTime())return!1;var n=this.Qdt(t);return!(n&&i.getTime()>=n.getTime())},i.cbt=function(t,i){if(this.Zyt)return!0;if(this.dbt(t).getTime()>i.getTime())return!1;var n=this.Qdt(t);return!(n&&i.getTime()>=n.getTime())},i.lbt=function(t,i,n){var r=le(i,this.Jb)+this.lmt.Tn;return{Put:t,fbt:i,CO:r,ct:n,RO:r+n}},i.dbt=function(t){return this.lmt.tbt.Km===mL.SV?new Date(this.lmt.tbt.hyt.getTime()+1e3*(t.CO+t.ct)):this.lmt.tbt.hyt},i.Kdt=function(t){var i=this.dbt(t);return this.lmt.tbt.Km===mL.SV?new Date(i.getTime()-1e3*this.obt):i},i.Qdt=function(t){var i=1/0;if(this.lmt.tbt.Km===mL.SV){var n=this.ubt.fwt;n&&(i=this.dbt(t).getTime()+1e3*t.ct+n.Kmt())}var r=this.lmt.tbt.ryt;return r&&(i=b.min(i,r.getTime())),i===1/0?void 0:new Date(i)},i.vbt=function(t,i){return t.Put+i},i.qct=function(t){return!1},i.Gct=function(t,i,n,r,e){var s=this.gbt(t);if(!s)return ut.reject(new y("Invalid segment"));var u=this.pbt(s.Put,i);return u?ut.resolve(u):gr(this.mbt(s.Put,i,n,r),e)},i.pbt=function(t,i){},i.mbt=function(t,i,n,r){return ut.reject(new y("Not supported"))},i.Qct=function(t){var i=this.gbt(t);if(i)return this.Yyt(i.Put-1)},i.Kct=function(t){var i=this.gbt(t);if(i)return this.Yyt(i.Put+1)},i.gbt=function(t){var i=this.Yyt(t.Put);if(i&&i.CO===t.CO)return i;var n=this.Gyt(t.CO);return n&&n.CO===t.CO?n:void 0},i.wbt=function(t,i){var n=this.Xct(t);if(n&&this.qct(n.Put)){var r=this.pbt(n.Put,i);if(r)return r.wbt(t)}},i.Xct=function(t){return this.Yyt(t.ybt)},i.Mdt=function(t){var i=this.gbt(t);return!!i&&0===i.Put},i.Vyt=function(t,i){var n=this.wbt(t,i);return!!n&&0===n.xut},i.Lct=function(t){var i=this.gbt(t);if(!i)return!1;var n=this.Jyt();return!!n&&i.Put===n.Put},i.Hyt=function(t,i){var n=this.wbt(t,i);if(!n)return!1;var r=this.Jyt();if(!r||n.ybt!==r.Put)return!1;var e=this.pbt(n.ybt,i);return n.xut+1===e.V},i.zg=function(){},Nt(t,[{key:"Zyt",get:function(){return this.lmt.tbt.$yt&&void 0!==this.ibt()}},{key:"EU",get:function(){return this.lmt.Tn-le(this._bt,this.Jb)}},{key:"dwt",get:function(){return le(this._bt,this.Jb)}}]),t}(),iV=function(t){function i(i,n){var r;(r=t.call(this,n,i)||this).Sbt=void 0,r.bbt=void 0;var e=i.Ebt,s=i.ct;if(void 0===e||void 0===s)throw new y("MultipleSegmentBase does not have a segment duration specified.");return r.bbt=e,r.Sbt=s,r}Ct(i,t);var n=i.prototype;return n.Yyt=function(t){if(!(t<0)){var i=this.bbt.multiply(t),n=le(i,this.Jb),r=this.lmt.ct;if(!(n>=r)){var e=this.Abt();if(void 0!==e){if(t>e)return;if(t===e&&isFinite(r))return this.lbt(t,i,r-n)}return isFinite(r)&&n+this.Sbt>r?this.lbt(t,i,r-n):this.lbt(t,i,this.Sbt)}}},n.Xyt=function(){return 0},n.Qyt=function(t){var i=b.floor(t/this.Sbt),n=this.Abt();return void 0!==n&&i>=n?this.Yyt(n):this.Yyt(i)},n.Kyt=function(t){if(t>=this.lmt.ct){var i=b.ceil(this.lmt.ct/this.Sbt)-1,n=this.Abt();return void 0!==n&&i>=n?this.Yyt(n):this.Yyt(i)}return this.Qyt(t)},n.Abt=function(){var t,i=this.ubt.gwt;if(void 0!==i)return i-(null!=(t=this.ubt._wt)?t:1);var n=this.ubt.Tbt;return void 0!==n&&n>0?n-1:void 0},n.ibt=function(){if(isFinite(this.lmt.ct))return this.Jyt()},n.kbt=function(t,i){return this.bbt.multiply(t.Put+(i-1))},n.er=function(){},i}(tV);function nV(t,i,n){var r=i.length;if(0===r)return-1;for(var e=0,s=r-1,u=t.xbt(i[e]),o=t.Pbt(i[s]);e<=s&&t.Ibt(u,n)<=0&&t.Ibt(n,o)<0;){var h=e+b.floor(t.Cbt(n,u,o)*(s-e)),a=i[h],c=t.xbt(a),f=h+10)return le(this.Dbt[0].CO,this.Jb)},n.Qyt=function(t){if(this.Bbt&&le(this.Bbt.CO,this.Jb)<=t){var i=le(this.Bbt.CO,this.Jb),n=le(this.Bbt.ct,this.Jb),r=b.floor((t-i)/n);return this.Nbt(r)}if(this.Dbt.length>0&&Sn(t,le(this.Dbt[0].CO,this.Jb),1e-5))return this.Dbt[0].yut;var e=rV(this.Dbt,ue.fromNumber(t*this.Jb));return e<0?void 0:this.Dbt[e].yut},n.Kyt=function(t){if(!this.Bbt&&this.Dbt.length>0){var i=this.Dbt[this.Dbt.length-1];if(function(t,i,n){return On(t,i,n)>=0}(t,le(i.RO,this.Jb),1e-5))return i.yut}var n=this.Xyt();return n&&t=s)){var u=this.Dbt.length+t,o=b.min(le(n,this.Jb),e+s);return this.lbt(u,r,o)}}},n.Mbt=function(t){return t.fbt.add(this._bt)},n.er=function(){var t=this.ubt.lk.mht;if(!t)throw new y("MultipleSegmentBaseTO does not have a SegmentTimeline specified.");this.Lbt(t)},n.Lbt=function(t){var i=this._bt;this.Obt(t,i);var n=this.Fbt(t);this.Ubt(t,i,n.Vbt,n.ybt)},n.Obt=function(t,i){var n=this.Dbt;if(0===t.length)Yn(n);else{for(var r=t[0],e=0,s=le(r.CO?ue.fromString(r.CO,!1).subtract(i):ue.ZERO,this.Jb);e0&&n.splice(0,e)}},n.Fbt=function(t){for(var i=this.Dbt,n=this.rpt,r=0,e=0;r=i.length)break;if(i[u].CO.greaterThanOrEqual(n))break;if(i[e].yut.Put===e)e=u+1;else for(;e<=u;)i[e].yut.Put=e,e++;0,r++}return{Vbt:r,ybt:e}},n.Ubt=function(t,i,n,r){for(var e,s=this.Dbt,u=n,o=r;u0){var v=s[o-1];v.RO.greaterThan(f)&&(v.ct=f.subtract(v.CO),v.RO=v.CO.add(v.ct))}}else f=o>0?s[o-1].RO:ue.ZERO;if(c<0){if(u+1===t.length){e={CO:f,ct:a};break}for(var d=ue.fromString(t[u+1].CO,!1).subtract(i);f.lessThan(d);){var l=f.add(a);this.Hbt(s,o,f,a,l),f=l,o++}}else for(var w=o+c;o<=w;){var g=f.add(a);this.Hbt(s,o,f,a,g),f=g,o++}u++}o0&&(this.rpt=s[s.length-1].CO),this.Bbt=e},n.Hbt=function(t,i,n,r,e){if(i=0&&t0){var n=this.Jbt[0];if(i<=le(n.CO,this.jD))return this.Zbt(n)}var r=rV(this.Jbt,ue.fromNumber(i*this.jD));if(!(r<0))return this.Zbt(this.Jbt[r])},n.zct=function(t){var i=this.$bt(t),n=zn(this.Jbt,-1);return void 0!==n&&i>=le(n.RO,this.jD)?this.Zbt(n):this.Ybt(t)},n.Zbt=function(t){var i=le(t.CO,this.jD)-this.dwt,n=i+this.tAt,r=le(t.ct,this.jD);return{ybt:this.ybt,xut:t.Put,CO:n,fbt:ue.fromNumber(i*this.jD),ct:r,RO:n+r,iAt:[t.eAt,t.sAt]}},n.$bt=function(t){return t-this.tAt+this.dwt},Nt(i,[{key:"V",get:function(){return this.Jbt.length}}]),i}(dV);U(),Et(),Ft(),U(),Et(),U(),Et(),Ft();var wV=function(){function t(t){this.lk=void 0,this.$R=void 0,this.lk=t,this.$R=new Ta}var i=t.prototype;return i.Egt=function(){return this.$R.ac7)throw new RangeError("Invalid EBML ID size");for(var i=0,n=0;n=1,"Incorrect log2 value"),Fh(this.lk,this.$R,i)},t.aAt=function(t){if(8===t.length&&224&t[1])throw new p("EBML variable sized integer is too large");for(var i=0,n=0;n8)throw new RangeError("EMBL integer field size is too large");if(8===t&&224&this.cAt.getUint8(0))throw new RangeError("EMBL integer field value is too large");for(var i=0,n=0;n0?$U(t.Nwt.map(function(t){return t.Yu}),i):i.slice(),this.ubt&&(t.Lwt?this.ubt.er(t.Lwt):t.Mwt?this.ubt.er(t.Mwt[0]):t.Bwt&&this.ubt.er(t.Bwt))},n.kyt=function(){var t;return null==(t=this.PAt)?void 0:t.IAt},n.Uyt=function(){var t;return null==(t=this.PAt)?void 0:t.CAt},n.RAt=function(t){var i=this.DAt,n=this.Oct.ct,r=this.PAt,e=this.NAt(t);r&&Sn(n,i,1e-5)&&LV(r,e)||(this.DAt=n,this.PAt=e,this.So(new NV))},n.zg=function(){this.Vo(),this.ubt&&(this.ubt.zg(),this.ubt=void 0)},Nt(i,[{key:"lk",get:function(){return this.Wp}},{key:"Nwt",get:function(){return this.TAt}}]),i}(th);function BV(t){for(var i,n,r=Lt(t);!(n=r()).done;){var e=n.value.kyt();if(e){i=e.Tn;break}}if(void 0!==i){for(var s,u=t.length-1;u>=0;u--){var o=t[u].kyt();if(o){s=o.An;break}}if(void 0!==s)return{Tn:i,An:s}}}function OV(t){if(0!==t.length){for(var i,n=0,r=1/0,e=Lt(t);!(i=e()).done;){var s=i.value.kyt();if(!s)return;if((n=b.max(n,s.Tn))>=(r=b.min(r,s.An)))return}return{Tn:n,An:r}}}function MV(t){for(var i,n,r=Lt(t);!(n=r()).done;){var e=n.value.Uyt();e&&(!i||e.getTime()0?this.Rrt[0]:""}},{key:"Km",get:function(){return this.BAt[0].Km}},{key:"o",get:function(){return this.aS}},{key:"jdt",get:function(){return this.lmt.jdt}},{key:"lQ",get:function(){return this.BAt[0].lQ}},{key:"Oct",get:function(){return this.lmt}},{key:"xat",get:function(){return Jn(this.jlt,function(t){return t.xat})}}]),i}(KU);U(),Et(),Pt();var UV=function(t){function i(){return t.call(this,qO.Vot)||this}return Ct(i,t),i}(rh);function VV(t){for(var i,n=function(){var t=i.value,n=void 0,e=t.plt;void 0===e||(n=Fn(r,function(t){return t.o===e})),n||(n={o:e,jlt:[]},r.push(n)),n.jlt.push(t)},r=[],e=Lt(t);!(i=e()).done;)n();return r}U(),Et(),Ft();var HV=function(t){function i(i,n){var r;return(r=t.call(this)||this).Pyt=void 0,r.BAt=[],r.MAt=[],r.OAt=void 0,r.LAt=!1,r.OAt=i,r.Pyt=n,r.Pyt.wn(qO.Fot,r.xyt),r}Ct(i,t);var n=i.prototype;return n.HAt=function(t,i){if(0!==this.MAt.length){for(var n,r=t,e=Lt(this.MAt);!(n=e()).done;){var s=n.value;if(sg(s.Km)){var u=s.Eyt;if(void 0===u)return;r=i(r,u)}}return r}},n.qAt=function(){this.LAt||(this.LAt=!0,this.So(new UV),this.kn())},n.er=function(t,i){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return 0!==this.BAt.length?[3,2]:[4,this.zAt(this.Pyt.jlt,t,i)];case 1:return n.sent(),this.GAt(this.BAt),dr(i),[3,4];case 2:return[4,this.XAt(t,i)];case 3:n.sent(),n.label=4;case 4:return[2]}})}).call(this)},n.zAt=function(t,i,n){return Vt(function(){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:r=Lt(t),o.label=1;case 1:if((e=r()).done)return[3,6];s=e.value,u=new ZU(this,s),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,u.er(i,n)];case 3:return o.sent(),this.BAt.push(u),[3,5];case 4:return lr(o.sent()),[3,5];case 5:return[3,1];case 6:return[2]}})}).call(this)},n.GAt=function(t){for(var i,n=Lt(VV(t));!(i=n()).done;){var r=i.value,e=new FV(this,r.o,r.jlt);this.MAt.push(e)}},n.XAt=function(t,i){return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:n=Lt(this.BAt),e.label=1;case 1:return(r=n()).done?[3,4]:[4,r.value.er(t,i)];case 2:e.sent(),e.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},n.kyt=function(){return this.Pyt.kyt()},n.Uyt=function(){return this.Pyt.Uyt()},n.kn=function(){this.Vo(),this.Pyt.mn(qO.Fot,this.xyt);for(var t,i=Lt(this.MAt);!(t=i()).done;){t.value.kn()}for(var n,r=Lt(this.BAt);!(n=r()).done;){n.value.kn()}Yn(this.BAt),Yn(this.MAt)},Nt(i,[{key:"jlt",get:function(){return this.BAt}},{key:"dmt",get:function(){return this.MAt}},{key:"iyt",get:function(){return this.Pyt.lk.iyt}},{key:"ct",get:function(){return this.Pyt.ct}},{key:"An",get:function(){return this.Tn+this.ct}},{key:"eyt",get:function(){return this.Pyt.lk.eyt||[]}},{key:"o",get:function(){return this.Pyt.o}},{key:"Hot",get:function(){return this.LAt}},{key:"jdt",get:function(){return this.OAt}},{key:"Wmt",get:function(){return this.OAt.FAt(this)}},{key:"Oct",get:function(){return this}},{key:"Hmt",get:function(){return this.OAt.UAt(this)}},{key:"VAt",get:function(){return this.HAt(1/0,b.min)}},{key:"WAt",get:function(){return this.HAt(0,b.max)}},{key:"Tn",get:function(){return this.Pyt.Tn}},{key:"Xk",get:function(){return this.jdt.Xk}}]),i}(KU);U(),Et(),Pt();var WV=function(t){function i(){return t.call(this,eh.qw)||this}return Ct(i,t),i}(rh);U(),Et(),Pt(),U(),Et();var zV=function(t){return t.jAt="QAt",t}({}),XV=function(t){function i(){return t.call(this,zV.jAt)||this}return Ct(i,t),i}(rh);U(),Et(),xt(),Pt(),Ft(),U(),Et(),xt(),Pt(),Ft(),U(),Et(),xt(),Pt(),Ft(),U(),Et(),xt(),Pt();var qV=function(t){function i(i,n){var r;return(r=t.call(this,i,n,n.Nwt)||this).mat=void 0,r.KAt=void 0,r.mat=n,r.EAt(!0),r}Ct(i,t);var n=i.prototype;return n.qct=function(t){var i=this.lQ;return!(!Xv(i)&&!qv(i))&&this.mht.qct(t.Put)},n.Gct=function(t,i,n,r){return this.mht.Gct(t,this,i,n,r)},n.Dyt=function(){return this.Byt.Dyt(this)},n.Zct=function(t){return this.Byt.Zct(t,this)},n.Oyt=function(t){return this.Byt.Oyt(t,this)},n.Fyt=function(){return this.KAt},n.NAt=function(t){var i=this.mht,n=i.Fyt(t),r=n&&function(t,i){var n,r=t.sbt,e=t.nbt,s=t.ebt,u=r.CO,o=i.dbt(e);if(o.getTime()<=s.getTime())n=e.RO;else{var h=(o.getTime()-s.getTime())/1e3,a=b.max(e.ct-h,0);n=e.CO+a}return{Tn:u,An:n}}(n,i),e=this.mht.Uyt(t,n);return this.KAt=n,{ebt:t,IAt:r,CAt:e}},n.er=function(t){this.xAt(t,this.mat.Nwt)},Nt(i,[{key:"Zut",get:function(){return this.mat}},{key:"Oct",get:function(){return this.mat.Oct}},{key:"tbt",get:function(){return this.mat.tbt}},{key:"lQ",get:function(){return this.Wp.lQ||this.mat.lQ}},{key:"Byt",get:function(){return this.kAt()}},{key:"mht",get:function(){return this.Byt.mht}}]),i}(xV),GV=function(t){function i(i,n){var r;return(r=t.call(this,i,n,n.Nwt)||this).lmt=void 0,r.Slt=void 0,r.lmt=n,r.EAt(!1),r.Slt=i.xat.map(function(t){return new qV(t,r)}),r}Ct(i,t);var n=i.prototype;return n.er=function(t){this.xAt(t,this.lmt.Nwt);var i=t.xat||[];if(this.Slt.length!==i.length)throw new y("Expected "+this.Slt.length+' representations in adaptation set "'+t.o+'", found '+i.length);for(var n=0;n0?$U(t.Nwt.map(function(t){return t.Yu}),u):u,this.hSt=t.oyt&&t.oyt.length>0?$U(t.oyt,this.TAt):[];var o=this.hSt.map(function(t){return t.href}),h=i.href;jn(o,h)||(this.hSt.push(i),o.push(h));var a=this.dSt.href;jn(o,a)||(this.hSt.push(this.dSt),o.push(a)),this.rSt=null==(e=t.dyt)?void 0:e.Qmt(),t.pyt&&(this.ZAt=new QV(t.pyt));var c=t.Km===mL.SV,f=function(t,i,n){for(var r=[],e=0;e0&&t[e-1].ct){u=r[e-1]+t[e-1].ct.Qmt()}else{if(0!==e||i)break;u=0}r.push(u)}for(var o=[],h=0;h0){var a=r.length-1,c=t[a],f=r[a],v=1/0;i||(v=c.ct?c.ct.Qmt():n-f),o.push({lk:c,Tn:f,ct:v})}return o}(t.Amt,c,this.rSt);this.lSt(f,s,c),this.RAt(n)},n.lSt=function(t,i,n){var r=this.oSt;if(0!==t.length){for(var e=t[0].lk.o,s=0;s0&&t.length>0){var h,a,c=null!=(h=JV(r[0].lk))?h:m_.SF,f=null!=(a=JV(t[0].lk))?a:m_.SF;if(f.hF(c)){var v=f.gF(c);void 0!==this.rSt&&(this.rSt+=v.rF());for(var d=0;d0)return this.oSt[i-1]},n.FAt=function(t){var i=this.oSt.indexOf(t);if(i>=0&&i+1t)return r}}},{key:"Twt",get:function(){return this.Pyt&&this.Pyt.lk.Twt}},{key:"vyt",get:function(){return this.Pyt&&this.Pyt.vyt}},{key:"VAt",get:function(){for(var t=this.oSt.length-1;t>=0;t-=1){var i=this.oSt[t].VAt;if(i)return i}}},{key:"Wyt",get:function(){var t=this.VAt;if(void 0!==t){var i=t-this.xSt;return b.max(i,this.kSt)}}},{key:"kSt",get:function(){for(var t,i=Lt(this.oSt);!(t=i()).done;){var n=t.value.Tyt;if(void 0!==n)return n}}},{key:"Xk",get:function(){return Boolean(this.PSt.Xk)}},{key:"xSt",get:function(){var t,i;if(this.PSt.ISt&&this.Km===mL.SV)return this.PSt.ISt;var n=null==(i=this.Pyt)||null==(t=i.lk._yt)?void 0:t.Qmt();return void 0!==n?n:this.Km===mL.SV?1.5*this.lyt.Qmt():0}},{key:"fwt",get:function(){return this.Pyt&&this.Pyt.fwt}},{key:"Km",get:function(){return this.Pyt?this.Pyt.Km:void 0}},{key:"pyt",get:function(){var t;return null==(t=this.Pyt)?void 0:t.pyt}}]),i}(th),aH=function(){function t(t,i,n,r,e){this.OAt=void 0,this.OAt=new hH(t,i,n,r,e)}return Nt(t,[{key:"jdt",get:function(){return this.OAt}}]),t}();U(),Et(),Pt();var cH=function(t){function i(){return t.call(this,eh.oy)||this}return Ct(i,t),i}(rh),fH=1e3,vH=b.pow(2,31)-1,dH=function(){function t(t,i,n,r,e){var s=this;this.YSt=void 0,this.Pyt=void 0,this.FSt=void 0,this.MSt=void 0,this.zSt=void 0,this.LSt=new hr,this.OSt=function(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),i=this.Pyt.jdt.Xdt(),[4,this.QSt(this.Pyt.jdt.oyt,t)];case 1:return n=e.sent(),[4,this.Pyt.jdt.er(n,i,t)];case 2:return e.sent(),[3,4];case 3:throw Ql(r=e.sent())&&(this.Pyt.jdt.SSt(!1),this.Pyt.jdt.So(new cH)),r;case 4:return[2]}})}).call(s)},this.YSt=r,this.Pyt=new aH(t,i,n,this.LSt.Yg,e)}var i=t.prototype;return i.vE=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:this.Pyt.jdt.So(new KR),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.OSt(t)];case 2:return n.sent(),this.Pyt.jdt.SSt(!0),[3,4];case 3:throw lr(i=n.sent()),this.MSt=void 0,this.Pyt.jdt.SSt(!1),new y("The provided MPEG-DASH document could not be loaded - "+i.message);case 4:return this.FSt=this.USt(this.LSt.Yg),[2]}})}).call(this)},i.USt=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:i.trys.push([0,4,,5]),i.label=1;case 1:return this.Pyt.jdt.Km!==mL.SV?[3,3]:[4,gr(this.VSt,t)];case 2:return i.sent(),[3,1];case 3:return[3,5];case 4:return i.sent(),[3,5];case 5:return[2]}})}).call(this)},i.WSt=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return dr(t),(i=this.qSt())>0?[4,Ar(b.min(i,vH),t)]:[3,2];case 1:r.sent(),r.label=2;case 2:return r.trys.push([2,4,5,6]),[4,this.OSt(t)];case 3:return r.sent(),this.Pyt.jdt.SSt(!0),[3,6];case 4:throw n=r.sent(),new y("The provided MPEG-DASH manifest could not be loaded - "+n.message);case 5:return this.zSt=void 0,[7];case 6:return[2]}})}).call(this)},i.qSt=function(){var t=this.Pyt.jdt.Xdt().getTime()-this.Pyt.jdt.aSt.getTime();return this.Pyt.jdt.fyt-t},i.GSt=function(t){var i=this.Pyt.jdt.Uyt();if(i){var n=i.getTime()-t.getTime();if(n>0)return n}this.Pyt.jdt.RAt(t);var r=this.Pyt.jdt.Uyt();return r?r.getTime()-t.getTime():NaN},i.HSt=function(t){return Vt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:i={stack:[],error:void 0,hasError:!1},s.label=1;case 1:return s.trys.push([1,3,4,5]),null!=this.zSt||(this.zSt=this.WSt(t)),n=qt(i,hr.ep([t]),!1),r=[this.zSt,this.XSt(n.Yg)].filter(Li),[4,ut.race(r).catch(wr)];case 2:return s.sent(),[3,5];case 3:return e=s.sent(),i.error=e,i.hasError=!0,[3,5];case 4:return Gt(i),[7];case 5:return[2]}})}).call(this)},i.XSt=function(t){var i=this.Pyt.jdt.Xdt(),n=this.GSt(i);if(!S(n)&&!this.Br.jdt.$yt)return this.jSt(n,t)},i.jSt=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,Ar(t,i)];case 1:return r.sent(),n=this.Pyt.jdt.Xdt(),this.Pyt.jdt.RAt(n),[2]}})}).call(this)},i.QSt=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,this.YSt.KSt(t,{},i)];case 1:return n=r.sent(),[2,(new WU).myt(n.JSt,n.wk)]}})}).call(this)},i.kn=function(){return this.LSt.Zg(),this.FSt=void 0,this.MSt=void 0,this.zSt=void 0,this.Pyt.jdt.kn(),ut.resolve()},Nt(t,[{key:"Br",get:function(){return this.Pyt}},{key:"W",get:function(){return this.MSt||(this.MSt=this.vE(this.LSt.Yg),kr(this.MSt)),this.MSt}},{key:"VSt",get:function(){return this.Pyt.jdt.wSt&&this.Pyt.jdt.Km===mL.SV?this.HSt(this.LSt.Yg):this.W}}]),t}();U(),Et(),xt(),Pt(),Ft(),U(),Et(),Pt();var lH=function(t){function i(i,n){var r;return(r=t.call(this,"Rmt")||this).zmt=void 0,r.kpt=void 0,r.zmt=i,r.kpt=n,r}return Ct(i,t),i}(rh),wH=function(t){function i(i,n){var r;(r=t.call(this)||this).Rlt=void 0,r.BI=void 0,r.Vp=void 0,r.Vp=i,r.BI=n;for(var e,s=Lt(r.BI);!(e=s()).done;){e.value.plt=r}return r}Ct(i,t);var n=i.prototype;return n.JU=function(t){t&&this.Rlt!==t&&this.ZSt(t)},n.ZU=function(t){this.Rlt===t&&this.ZSt(void 0)},n.ZSt=function(t){this.Rlt=t,this.So(new lH(this,this.Rlt))},n.kn=function(){this.Vo();for(var t,i=Lt(this.BI);!(t=i()).done;){t.value.plt=void 0}Yn(this.BI)},Nt(i,[{key:"kpt",get:function(){return this.Rlt}},{key:"Km",get:function(){return this.Vp}},{key:"Z",get:function(){return this.BI.slice()}}]),i}(th);U(),Et(),U(),Et(),U(),Et(),Pt();var gH=function(t){function i(i,n,r){var e;return(e=t.call(this,eh.Dw)||this).currentTime=void 0,e.initDataType=void 0,e.initData=void 0,e.currentTime=i,e.initDataType=n,e.initData=r,e}return Ct(i,t),i}(rh);function _H(t,i,n,r,e){for(var s,u=[],o=[],h=Lt(i);!(s=h()).done;){var a=s.value;a.Km===eg.Bk?u=u.concat(a.Z):a.Km===eg.Mk&&(o=o.concat(a.Z))}return[mH(t,u,n,r,null==e?void 0:e.preferredAudioCodecs),yH(t,o,n,r,null==e?void 0:e.preferredVideoCodecs)].filter(Li)}function mH(t,i,n,r,e){var s=Fn(r||[],function(t){return t.iat===eg.Bk&&t.Rt}),u=[kH(s,n,t),bH(s),AH(s),TH(s,e),SH(),function(t){var i=t.filter(function(t){return"main"===t.Lt});return i.length>0?i:t}];return pH(i,u)}function yH(t,i,n,r,e){var s=Fn(r||[],function(t){return t.iat===eg.Mk&&t.Rt}),u=[kH(s,n,t),TH(s,e),SH(),function(t){var i=t.filter(function(t){return"main"===t.Lt});return i.length>0?i:t}];return pH(i,u)}function pH(t,i){if(0!==t.length){for(var n,r=t,e=Lt(i);!(n=e()).done;){var s=n.value;if(1===r.length)return r[0];r=s(r)}return r[0]}}function kH(t,i,n){return function(r){var e=t?t.Zut.o:void 0;if(!Li(e))return r;var s=null==i?void 0:i.iyt,u=n.iyt,o=s&&u&&s.XE===u.XE,h=Fn(r,function(t){return t.Zut.o===e});return o&&h?[h]:r}}function bH(t){return function(i){var n=t?t.bs:"",r=i.some(function(t){return""!==t.bs})?i.filter(function(t){return""!==t.bs}):i;if(""===n)return r;var e=r.filter(function(t){return t.bs===n});return e.length>0?e:r}}function AH(t){return function(i){var n=t?t.Lt:"";if(""===n)return i;var r=i.filter(function(t){return t.Lt===n});return r.length>0?r:i}}function TH(t,i){return function(t){if(i&&i.length>0)for(var n,r=function(){var i=n.value,r=t.filter(function(t){return t.$I.NI.some(function(t){return $C(t.Rrt,i)})});if(r.length>0)return{v:r}},e=Lt(i);!(n=e()).done;){var s=r();if("object"===W(s))return s.v}return t}}function SH(){return function(t){for(var i,n=[],r=-1/0,e=Lt(t);!(i=e()).done;){var s=i.value,u=s.Zut.tz;u>r?(r=u,n=[s]):u===r&&n.push(s)}return n}}U(),Et(),ct(),Ft(),U(),Et();var EH=function(t){return t.$St="api",t.tTt="start",t}({});U(),Et(),Wt(),Pt(),Ft(),Qt(),U(),Et(),Pt();var IH=function(t){function i(i,n,r){var e;return void 0===i&&(i=0),void 0===n&&(n=void 0),void 0===r&&(r=void 0),(e=t.call(this,eh.sy)||this).retryCount=void 0,e.statusCode=void 0,e.statusMessage=void 0,e.retryCount=i,e.statusCode=n,e.statusMessage=r,e}return Ct(i,t),i}(rh),RH={maxRetries:3,minimumBackoff:1e3,maximumBackoff:1/0},CH=function(t){function i(i,n,r){var e;return void 0===r&&(r=RH),(e=t.call(this)||this).aV=void 0,e.sTt=void 0,e.Ndt=void 0,e.aV=i,e.sTt=n,e.Ndt=r,e}Ct(i,t);var n=i.prototype;return n.iTt=function(t,i,n){var r=this,e=this.Ndt.maxRetries===1/0?RH:this.Ndt;return mT(function(n,e){return r.eTt(t,i,e,n)},n,e.maxRetries,e.minimumBackoff,e.maximumBackoff)},n.eTt=function(t,i,n,r){return Vt(function(){var e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:s=Lt(t),v.label=1;case 1:if((u=s()).done)return[3,7];o=u.value,v.label=2;case 2:return v.trys.push([2,5,,6]),h=new Al({Yu:o,fk:Ud.LT,_k:i,Xk:this.sTt,Hk:ml.GET,Km:yl.bk,zk:pl.yk,Yg:n,Wk:15e3,qk:5e3}),[4,this.aV.vk(h)];case 3:return[4,(a=v.sent()).HT(n)];case 4:return[2,{JSt:v.sent(),nTt:o,wk:a.wk}];case 5:return c=v.sent(),e=c,f=Yl(c)?c.uE.dk:void 0,this.So(new IH(r,f,c.message)),[3,6];case 6:return[3,1];case 7:throw e}})}).call(this)},i}(th);function PH(t){return Rl(t)}function DH(t,i){var n=Rl(t);return i?""+n+i:""+n}U(),Et(),Wt(),Ft(),Qt(),U(),Et();var NH=function(){function t(t){this.rTt=void 0,this.rTt=t}return t.prototype.KSt=function(t,i,n){return Vt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:e=Lt(this.rTt),h.label=1;case 1:if((s=e()).done)return[3,6];u=s.value,h.label=2;case 2:return h.trys.push([2,4,,5]),[4,u.KSt(t,i,n)];case 3:return[2,h.sent()];case 4:return lr(o=h.sent()),r=o,[3,5];case 5:return[3,1];case 6:throw r}})}).call(this)},t}(),xH=function(){function t(t){this.Sut=void 0,this.Sut=t}return t.prototype.KSt=function(t,i,n){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.Sut.hTt(t)];case 1:if(i=n.sent())return[2,{JSt:i.data,nTt:i.locationURL,wk:i.responseURL}];throw new y("Manifest fetch from cache unsuccesful")}})}).call(this)},t}(),BH=function(){function t(t){this.oTt=void 0,this.oTt=t}return t.prototype.KSt=function(t,i,n){return Vt(function(){return zt(this,function(r){switch(r.label){case 0:return[4,this.oTt.iTt(t,i,n)];case 1:return[2,r.sent()]}})}).call(this)},t}();function OH(t,i){return new NH([new xH(i),new BH(t)])}var MH=function(){function t(t,i,n){this.YSt=void 0,this.cTt=void 0,this.dTt=void 0,this.YSt=t,this.cTt=i,this.dTt=n}var i=t.prototype;return i.KSt=function(t,i,n){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return[4,this.YSt.KSt(t,i,n)];case 1:return r=e.sent(),[4,this.aTt(r)];case 2:return e.sent(),[2,r]}})}).call(this)},i.aTt=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.cTt.uTt({key:PH(t.nTt),locationURL:Rl(t.nTt),responseURL:Rl(t.wk),data:t.JSt,references:[this.dTt.o]})];case 1:return i.sent(),[2]}})}).call(this)},t}();U(),Et(),Pt();var LH=function(t){function i(){return t.call(this,eh.Xw)||this}return Ct(i,t),i}(rh);U(),Et(),Pt();var FH=function(t){function i(){return t.call(this,eh.Gw)||this}return Ct(i,t),i}(rh);U(),Et(),Wt(),Pt(),Ft(),Qt(),U(),Et(),Pt(),Ft();var UH=function(t){function i(i){return t.call(this,i)||this}Ct(i,t);var n=i.prototype;return n.lTt=function(t){return t.AP=Dg.LOADED,this.tt(t),t},n.fTt=function(t){for(var i,n=Lt(this.Z.NI);!(i=n()).done;){var r=i.value;if(r.eC===t)return r}},i}(dy);function VH(t,i){return""===i?t:t+" "+i}U(),Et(),U(),Et(),xt(),Pt(),U(),Et();var HH=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this,i,n,r,!1,null==s?void 0:s.toString())||this).nx=void 0,u.vTt=void 0,u.nx=e,u.vTt=s,u}return Ct(i,t),i.prototype.KO=function(t){return this.U===t.U},Nt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return Mw(Wg(t),{get attributes(){return t.nx},get eventID(){var i;return""+(null!=(i=t.vTt)?i:"")}})}(this)),this.hu}}]),i}(Jg),WH=function(t){function i(i){var n;return(n=t.call(this,i)||this).YAt=void 0,n.pTt=function(){var t,i,r=null!=(i=null==(t=n.YAt.kyt())?void 0:t.Tn)?i:0;if(r>0)for(var e,s=Lt(n.Z.NI);!(e=s()).done;){fy(e.value,r)}for(var u,o=Lt(n.YAt.Amt);!(u=o()).done;){var h=u.value;if(h.An>r)for(var a,c=Lt(h.eyt);!(a=c()).done;){var f=a.value;n.gTt(f,h,r)}}},n}Ct(i,t);var n=i.prototype;return n._Tt=function(t){var i=this.iV.sI(Jm.zU,"","","",void 0,Ng.EVENT_STREAM);return i.eC=t,this.lTt(i),i},n.gTt=function(t,i,n){var r,e,s,u=t.x8,o=null!=(r=t.XE)?r:"",h=null!=(e=t.jD)?e:1,a=null!=(s=t.dwt)?s:ue.ZERO,c=VH(u,o),f=this.fTt(c);f||(f=this._Tt(c));for(var v,d=Lt(t.fQ);!(v=d()).done;){var l=v.value;if(!zH(l,f)){var w=XH(l,h,a,i);w.RO>n&&f.nV(w)}}},n.Un=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.hr()];case 1:return i.sent(),this.YAt=t,this.YAt.wn(eh.qw,this.pTt),this.pTt(),[2]}})}).call(this)},n.hr=function(){var i=this;return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:for(this.YAt&&(this.YAt.mn(eh.qw,this.pTt),this.YAt=void 0),n=Lt(this.Z.NI);!(r=n()).done;)e=r.value,this.iV.rV(e);return[4,t.prototype.hr.call(i)];case 1:return s.sent(),[2]}})}).call(this)},n.eV=function(t,i,n){return ly(t,i,n)},i}(UH);function zH(t,i){var n=t.o;if(void 0!==n&&Fn(i.L.NI,function(i){return i.vTt===n&&i.U===t.lk}))return!0;return!1}function XH(t,i,n,r){var e=t.o,s=t.nM.toSigned().subtract(n),u=t.ct,o=t.lk,h=t.nx,a=s.toNumber()/i+r.Tn,c=u?u.toNumber()/i:void 0,f=void 0!==c?a+c:r.WAt;return new HH(a,f,o,h,e)}function qH(t,i,n,r,e){var s=[],u=Fn(n,function(t){return t.x8===so});if(void 0!==u){var o=u.XE?function(t){var i=t.split(":",1)[0];switch(i){case"cbcs":case"cenc":return i;default:return}}(u.XE.toLowerCase()):"cenc";if(void 0!==o){for(var h,a=Lt(n);!(h=a()).done;){var c=h.value;if(c.x8!==so)for(var f,v=Lt(Oo(c.x8));!(f=v()).done;){var d,l,w=f.value,g=e&&c.P8?[c.P8]:[],_=null!=(l=null==(d=t.clearkey)?void 0:d.keys)?l:[];s.push({xS:w,OW:g,FW:void 0,GH:void 0,UW:_})}}if(s.length)return{lH:t,zpt:{mTt:o,fH:u.fH},qpt:s,wTt:i===eg.Bk?r.slice():[],yTt:i===eg.Mk?r.slice():[],D8:!1}}}}function GH(t,i){if(!t)return i;if(!i)return t;var n,r=[],e=Ju();return jH(r,e,t.qpt),jH(r,e,i.qpt),{lH:t.lH,zpt:{mTt:t.zpt.mTt,fH:null!=(n=t.zpt.fH)?n:i.zpt.fH},qpt:r,wTt:QH(t.wTt,i.wTt,jn),yTt:QH(t.yTt,i.yTt,jn),D8:t.D8||i.D8||!1}}function jH(t,i,n){for(var r,e=Lt(n);!(r=e()).done;){var s=r.value,u=s.xS.$m,o=void 0;i.has(u)?(o=i.get(u)).OW=QH(o.OW,s.OW,YH):(o=Yu({},s),t.push(o),i.set(u,o))}}function QH(t,i,n){for(var r,e=t.slice(),s=Lt(i);!(r=s()).done;){var u=r.value;n(e,u)||e.push(u)}return e}function YH(t,i){for(var n,r=Lt(t);!(n=r()).done;){if(Ca(n.value,i))return!0}return!1}function KH(t,i,n){var r,e=t.NW;if(e){for(var s,u=t.lQ,o=[],h=Lt(t.Rrt);!(s=h()).done;){var a=s.value;o.push(u+'; codecs="'+a+'"')}r=qH(i||{},t.Km,e,o,n)}for(var c,f=Lt(t.xat);!(c=f()).done;){r=GH(r,JH(c.value,i,n))}return r}function JH(t,i,n){return qH(i||{},t.Km,t.NW||[],[t.GT],n)}function ZH(t){return t?t.qpt.map(function(i){var n=$H(t.lH,i.xS),r=t.zpt.mTt;return{xS:i.xS,OW:i.OW,GH:i.GH,Vq:[{initDataTypes:[i.xS.Jm],audioCapabilities:tW(t.wTt,r,null==n?void 0:n.audioRobustness),videoCapabilities:tW(t.yTt,r,null==n?void 0:n.videoRobustness),persistentState:null==n?void 0:n.persistentState,distinctiveIdentifier:null==n?void 0:n.distinctiveIdentifier}],UW:i.UW}}):[]}function $H(t,i){switch(i.Km){case Eo.zm:return t.widevine;case Eo.qm:return t.playready;case Eo.jm:return t.fairplay;case Eo.Gm:case Eo.Xm:return t.clearkey}}function tW(t,i,n){if(0!==t.length)return t.map(function(t){return{contentType:t,encryptionScheme:i,robustness:n}})}function iW(t,i){var n=function(t){var n=i.indexOf(t.xS.$m);return n>=0?n:i.length};return mn(t,function(t,i){return n(t)-n(i)})}U(),Et(),Ft(),U(),Et(),Wt(),Pt(),Ft(),Qt();var nW=function(t){function i(i){var n;(n=t.call(this,i)||this).Slt=[],n.kTt=void 0,n.YAt=void 0,n.er=function(){for(var t,i=[],r=Lt(n.YAt.Amt);!(t=r()).done;)for(var e,s=Lt(t.value.jlt);!(e=s()).done;){var u=e.value;if(u.Km===eg.Lk&&u.xat.length>0){var o=u.xat[0];i.push(o),n.xTt(o)||n._Tt(o),-1===n.Slt.indexOf(o)&&(n.Slt.push(o),o.wn(qO.Fot,n.kTt)),n.ITt(o)}}n.bTt(i)},n.ITt=function(t){var i=n.PTt(t);i&&t&&i.Qk!==zm.Nh&&(n.ETt(),function(t,i){var n=t.mht,r=t.Fyt();if(!r)return;var e=r.sbt,s=r.nbt,u=t.Ti,o=t.Mi,h=function(t){for(var i,n=Lt(t);!(i=n()).done;){var r=i.value;if(Vo(r.x8,eW)||Vo(r.x8,sW)){var e=r.XE.match(rW);if(e){var s=e[1],u=e[2];return[Number(s),Number(u)]}}}return[1,1]}(t.ywt),a=h[0],c=h[1],f=e;for(;f&&f.Put<=s.Put;){for(var v,d=t.Byt.ct||f.ct,l=Lt(uW(i,f,t.Zct(f).Yu,u,o,a,c,d));!(v=l()).done;){var w=v.value;i.nV(w)}f=n.Kct(f)}}(t,i))};var r=n;return n.kTt=function(){r.ITt(this)},n}Ct(i,t);var n=i.prototype;return n._Tt=function(t){var i=this.iV.sI(Jm.zU,t.o,"thumbnails","",!1,Ng.DEFAULT);return i.Qk=zm.Kn,this.lTt(i),i},n.Un=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.hr()];case 1:return i.sent(),this.YAt=t,this.YAt.wn(eh.qw,this.er),this.er(),[2]}})}).call(this)},n.bTt=function(t){this.ATt(t),this.STt()},n.STt=function(){for(var t,i=[],n=Lt(this.Z.NI);!(t=n()).done;){var r=t.value;this.TTt(r)||i.push(r)}for(var e,s=Lt(i);!(e=s()).done;){var u=e.value;this.it(u)}},n.ATt=function(t){for(var i,n=[],r=Lt(this.Slt);!(i=r()).done;){var e=i.value;-1===t.indexOf(e)&&n.push(e)}for(var s,u=Lt(n);!(s=u()).done;){var o=s.value;Xn(this.Slt,o)}},n.hr=function(){var i=this;return Vt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:for(this.YAt&&(this.YAt.mn(eh.qw,this.er),this.YAt=void 0),n=Lt(this.Slt);!(r=n()).done;)r.value.mn(qO.Fot,this.kTt);for(this.Slt.length=0,e=Lt(this.Z.NI);!(s=e()).done;)u=s.value,this.iV.rV(u);return[4,t.prototype.hr.call(i)];case 1:return o.sent(),[2]}})}).call(this)},n.eV=function(t,i,n){return ly(t,i,n)},n.kn=function(){return this.kTt=void 0,t.prototype.kn.call(this)},n.ETt=function(){var t,i,n=null!=(i=null==(t=this.YAt.kyt())?void 0:t.Tn)?i:0;if(n>0)for(var r,e=Lt(this.Z.NI);!(r=e()).done;){fy(r.value,n)}},n.xTt=function(t){return this.Z.NI.some(function(i){return i.o===t.o})},n.PTt=function(t){return Fn(this.Z.NI,function(i){return i.o===t.o})},n.TTt=function(t){return this.Slt.some(function(i){return t.o===i.o})},i}(UH),rW=/^(\d+)x(\d+)$/,eW="http://dashif.org/guidelines/thumbnail_tile",sW="http://dashif.org/thumbnail_tile";function uW(t,i,n,r,e,s,u,o){var h=[],a=i.CO,c=s*u,f=r/s,v=e/u,d=b.round(f),l=b.round(v),w=o/c;if(1===c){var g=a+w;return oW(t,a,g,n)?h:[new Jg(a,g,n,!1)]}for(var _=0;_=i.RO)return h}return h}function oW(t,i,n,r){return t.L.NI.some(function(t){return t.CO===i&&t.RO===n&&t.U===r})}U(),Et(),Wt(),Pt(),Qt(),U(),Et(),Wt(),Pt(),Ft(),Qt(),U(),Et(),xt(),Pt(),U(),Et();var hW=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,u,!1)||this).CTt=void 0,o.RTt=void 0,o.NTt=void 0,o.CTt=r,o.RTt=e,o.NTt=s,o}return Ct(i,t),i.prototype.KO=function(t){return Pa(this.U,t.U)},Nt(i,[{key:"sM",get:function(){return this.CTt}},{key:"XE",get:function(){return this.RTt}},{key:"DTt",get:function(){return this.NTt}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return Mw(Wg(t),{get schemeIDURI(){return t.sM},get value(){return t.XE},get emsgID(){return t.DTt}})}(this)),this.hu}}]),i}(Jg),aW=function(t){function i(i){return t.call(this,i)||this}Ct(i,t);var n=i.prototype;return n.elt=function(t,n,r){var e=km.PD(_a(t));if(e){var s=function(t,i){for(var n,r=[],e=Lt(t);!(n=e()).done;){var s=n.value;dm(s,i)&&r.push(s)}return r}(e,hm.zR);if(s.length){var u=i.BTt(e,n,r);this.MTt(s,u,r)}}},n.MTt=function(t,i,n){for(var r,e=Lt(t);!(r=e()).done;){var s=r.value,u=void 0,o=(u=1===s.ED?s.nM.toNumber()/s.jD+n:i+s.oM/s.jD)+s.rM/s.jD;"https://aomedia.org/emsg/ID3"===s.sM||"https://developer.apple.com/streaming/emsg-id3"===s.sM?this.LTt(s,u):this.OTt(s,u,o)}},n.OTt=function(t,i,n){var r=VH(t.sM,t.XE),e=this.fTt(r);e||(e=this.FTt(r),this.lTt(e)),e.nV(new hW(i,n,t.sM,t.XE,t.o,t.hM))},n.LTt=function(t,i){var n=VD(_a(t.hM));if(n){var r=VH(t.sM,t.XE),e=this.fTt(r);e||(e=this.UTt(r),this.lTt(e));for(var s,u=Lt(n.r6);!(s=u()).done;){var o=s.value,h=new ZD(i,o);lD(h,e.L.NI),e.nV(h)}}},n.FTt=function(t){var i=this.iV.sI(Jm.zU,"","","",void 0,Ng.EMSG);return i.eC=t,i.Qk=zm.iC,i},n.UTt=function(t){var i=this.iV.sI(Jm.zU,"","","",void 0,Ng.ID3);return i.eC=t,i.Qk=zm.iC,i},n.eV=function(t,i,n){return ly(t,i,n)},n.hr=function(){var i=this;return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:for(n=Lt(this.Z.NI);!(r=n()).done;)e=r.value,this.iV.rV(e);return[4,t.prototype.hr.call(i)];case 1:return s.sent(),[2]}})}).call(this)},i.BTt=function(t,i,n){var r=lm(t,hm.GR);return r?le(r.wM,r.jD)+n:i},i}(UH),cW=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).YAt=void 0,i.pTt=function(){var t,n,r=null!=(n=null==(t=i.YAt.kyt())?void 0:t.Tn)?n:0;i.jU(r)},i}Ct(i,t);var n=i.prototype;return n.Un=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.hr()];case 1:return i.sent(),this.YAt=t,this.YAt.wn(eh.qw,this.pTt),this.pTt(),[2]}})}).call(this)},n.hr=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.YAt&&(this.YAt.mn(eh.qw,this.pTt),this.YAt=void 0),[4,t.prototype.hr.call(i)];case 1:return n.sent(),[2]}})}).call(this)},i}(aW);U(),Et(),U(),Et(),Wt(),Qt();var fW=function(){function t(t){this.Sut=void 0,this.VTt=!1,this.Sut=t}var i=t.prototype;return i.sdt=function(t,i){return this.VTt?this.Sut.sdt(t,i):ut.resolve(!1)},i.Aut=function(t,i){return this.VTt?this.Sut.Aut(t,i):ut.resolve(void 0)},i.hTt=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.Sut.hTt(t)];case 1:return i=n.sent(),this.VTt=void 0!==i,[2,i]}})}).call(this)},i.jJ=function(t){return this.Sut.jJ(t)},t}();U(),Et(),Pt();var vW=function(t){function i(i,n,r){return t.call(this,i,n,r)||this}Ct(i,t);var n=i.prototype;return n.FL=function(){var t;return null!=(t=this.LL)?t:0},n.dC=function(){this.oa.zx=1/0},n.UL=function(t,i,n){return!1},n.VL=function(){return!0},i}(NA),dW=[eh.Qw,eh.Yw,eh.ey,eh.iy,eh.zw,eh.ly],lW=[eh.Kw,eh.wy,eh.Lw,eh.Bw],wW=function(t){function i(i,n,r,e,s,u,o){var h,a;return(h=t.call(this)||this).aV=void 0,h.Mz=void 0,h.Ndt=void 0,h.Sut=void 0,h.PL=void 0,h.Cq=void 0,h.xq=void 0,h.akt=void 0,h.bkt=void 0,h.d9=!1,h.nxt=NaN,h.nq=void 0,h.rq=void 0,h.t9=!1,h.Akt=void 0,h.Y8=void 0,h.oxt=!1,h.rxt=0,h.hxt=0,h.Mkt=!1,h.uV=new hr,h.okt=new Va,h.ixt=void 0,h.$Et=!1,h.Pyt=void 0,h.nEt=void 0,h.UEt=void 0,h.ASt=!0,h.Ckt=!0,h.xEt=void 0,h.Ho=EA.rL(),h.oq=YT.pz,h.KEt=void 0,h.FV=!0,h.Ac=void 0,h.FEt=void 0,h._mt=void 0,h.Zpt=[],h.Pz=!1,h.cq=void 0,h.ekt=new hr,h.hkt=ut.resolve(),h.T9=new hr,h.k9=ut.resolve(),h.$kt=!1,h.IEt=!1,h.skt=new hr,h.nkt=ut.resolve(),h._kt=void 0,h.fEt=void 0,h.Ikt=!1,h.tO=void 0,h.sO=void 0,h.Gl=void 0,h.wEt=void 0,h.gEt=void 0,h.Opt=void 0,h.zEt=void 0,h.GEt=void 0,h.Aq=void 0,h.axt=void 0,h.Ekt=0,h.xkt=0,h.Pkt=0,h.lq=new Tb,h.mEt=void 0,h.jTt={rO:0,hO:0,oO:0},h.aq=void 0,h.JTt=void 0,h.pq=void 0,h.JW=void 0,h.jkt=function(t){var i,n,r,e;"Rmt"===(null==t?void 0:t.type)&&(e=t.kpt),e&&(null==(i=e.plt)?void 0:i.Km)===eg.Bk&&(null==(r=h.bt)||null==(n=r.dash)?void 0:n.forceRecreateMediaSourceOnAudioSwitch)?h.ikt(!0):h.ikt()},h.Gmt=function(t){var i;null==(i=h.akt)||i.Gmt(t)},h.xmt=function(t){var i;null==(i=h.akt)||i.xmt(t)},h.Nc=function(){h.So(new bw(h.zx,h.Vx))},h.U8=function(t){h.So(new gH(h.zx,t.Jm,t.Py))},h.Wkt=function(t){h.Ekt+=t.uO,h.So(t)},h.qkt=function(t){var i=t.segments.filter(function(t){return t.Pct});t.track===eg.Bk?h.xkt=i.length:t.track===eg.Mk&&(h.Pkt=i.length)},h.B7=function(){var t=h.ct;S(t)||t===h.nxt||(h.nxt=t,h.So(new vT(h.nxt)))},h.cxt=function(){h.tkt(),h.EEt()},h.uxt=function(t){h.IEt||!h.Qx||h.xP||(h.IEt=!0,h.So(null!=t?t:new lT(h.zx)))},h.WEt=function(t){h.Rs(t),h.Mkt||(h.Mkt=!0,h.Cq.zV())},h.HEt=function(){h.Pyt.jdt.mn(eh.Ww,h.HEt),h.So(new KR)},h.Gkt=function(t){var i;if(t.errorObject.code===vd.CONTENT_PROTECTION_OUTPUT_RESTRICTED&&(null==(i=h.akt)?void 0:i.Mmt.every(function(t){return!t.Plt})))return;h.Qq(t.errorObject),h.So(t)},h.zkt=function(t){h.Qq(t.errorObject)},h.Lmt=function(t){vr(t)||h.Qq(new ld(vd.MEDIA_DECODE_ERROR,t.message,t))},h.tkt=function(){if(!h.lP)if(h.Skt())if(h.kkt()){var t=h.Pyt.jdt.TSt;h.Oy(t,!0)}else;else{var i=h.Pyt.jdt.TSt;h.Oy(i,!0)}},h.REt=function(t){h.oxt=h.xP,h.So(t)},h.BEt=function(t){var i=h.oxt,n=h.xP;h.oxt=n,i&&!n&&h.So(t),h.uxt()},h.Xkt=function(){var t=h.MP,i=h.DP;h.rxt===t&&h.hxt===i||(h.rxt=t,h.hxt=i,h.So(new Ey))},h.yEt=function(t){var i=t.Ht;i.Qk===zm.Kn?(h.dEt(i),h.fEt=i):i===h.fEt&&i.Qk===zm.Nh&&(h.fEt=void 0,h.vEt())},h.CEt=function(){h.t9||h.xEt&&(h.xEt.Qy(),h.xEt=void 0)},h.TEt=function(t){h.t9||h.xEt&&(h.xEt.Ky(t),h.xEt=void 0)},h.qEt=function(){h.XEt().catch(h.Lmt)},h.jEt=function(){h.QEt().catch(h.Lmt),h.xq.mn(Ry.xM,h.jEt)},h.fxt=function(t){h.Qq(fg(t.lt))},h.dxt=function(){h.WTt()},h.lxt=function(){h.qTt()},h.vxt=function(t){h.GTt(t.NW)},h.aV=i,h.Sut=new fW(s),h.PL=u,h.JTt=o,h.Mz=r,h.Mz.wn("UY",h.dxt),h.Mz.wn("qY",h.lxt),h.cq=e,h.Ndt=Yu({},n.retryConfiguration,{maxRetries:null!=(a=n.retryConfiguration.maxRetries)?a:1/0}),h.tO=new $b,h.sO=new $b,h.pq=new Eb(i),h.pq.wn("contentProtectionsTracked",h.vxt),h.PL.wn(eh.Cw,h.B7),h.PL.wn(fh.Dw,h.U8),h.PL.wn(eh.Nw,h.uxt),h.PL.wn(eh.$w,h.REt),h.PL.wn(eh.Zw,h.BEt),h.PL.wn(eh.Jw,h.Xkt),h.PL.wn(eh.py,h.Nc),h.PL.wn([eh.uo,eh.jw],h.cxt),h.PL.wn(lW,h.Rs),h.PL.wn(qm.ma,h.fxt),h.PL.Rq=h.pq,h.PL.J7=h,h.PL.wn([eh.xw,eh.Ew],h.Rs),h.PL.wn(eh.Ay,h.Gmt),h.PL.wn(eh.LICENSE_REQUEST_GENERATED,h.xmt),h.Cq=new Vy(h,h.PL),h.xq=new Uy(h.Cq,!0),h.xq.wn(Ry.xM,h.tkt),h.xq.wn(Cy,h.Rs),h.wEt=new tA,h.wEt.wn(Nw.pa,h.yEt),h.gEt=new tA,h.zEt=new WH(h.PL),h.GEt=new nW(h.PL),h.Aq=new gy(h.PL,h.aV),h.axt=new Km,h.Gl=new Rb([h.wEt,h.zEt.Z,h.GEt.Z,h.Aq.Z,h.axt]),h}Ct(i,t);var n=i.prototype;return n.HTt=function(t){return!!this.aq&&this.aq.IZ(t)},n.Lp=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return i=this,[4,this.PL.Un(t)];case 1:return i.aq=n.sent(),this.WTt(),this.qTt(),this.aq.F4(this.ct),[2]}})}).call(this)},n.zTt=function(t){return this.aq.RZ(t)},n.GTt=function(t){return this.aq.NZ(t)},n.XTt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.jTt=this.QTt,this.aq?[4,this.PL.hr()]:[3,2];case 1:t.sent(),this.aq=void 0,t.label=2;case 2:return[2]}})}).call(this)},n.F3=function(){this.aq.F3()},n.I3=function(){var t=this.ct;this.aq.ct=e||Sn(r,e,.001)},n.kkt=function(){var t;if(!this.Pyt)return!1;if(this.Pyt.jdt.Km!==mL.SV)return!1;var i=null==(t=this.akt)?void 0:t.Mc;if(i&&i.Hot)return!0;for(var n,r=[],e=Lt(this.Pyt.jdt.Amt);!(n=e()).done;){var s=n.value,u=s.Tyt,o=s.WAt;void 0!==u&&void 0!==o&&r.push(u,o)}var h=new EA(r).VM();return function(t,i,n){if(!i.V||!n.V)return EA.rL();var r=i.Tn(0),e=i.An(i.V-1),s=t.Mn(n).OM().Mn(t).HM(i);return EA.nL(s.Tn(0),s.An(s.V-1)).WM(s).YM(function(t,i){return tve})}(this.ykt,this.Tkt,h).V>0},n.Nkt=function(t){this.Ho=this.Ho.HM(t)},n.Hkt=function(t){t.wn(dW,this.Rs),t.wn(eh._y,this.Wkt),t.wn(eh.Sw,this.qkt),t.wn(qm.ma,this.zkt),t.wn(eh.Ew,this.Gkt),t.wn(eh.Yw,this.Xkt),t.wn("Rmt",this.jkt),t.wn("amt",this.jkt)},n.Qkt=function(t){t.mn(dW,this.Rs),t.mn(eh._y,this.Wkt),t.mn(eh.Sw,this.qkt),t.mn(qm.ma,this.zkt),t.mn(eh.Ew,this.Gkt),t.mn(eh.Yw,this.Xkt),t.mn("Rmt",this.jkt),t.mn("amt",this.jkt)},n.Kkt=function(t){t.wn(eh.Qw,this.Rs)},n.Ykt=function(t){t.mn(eh.Qw,this.Rs)},n.Vkt=function(){if(this.akt){var t=Fn(this.akt.Bmt,function(t){return t.iat===eg.Mk});if(t)return t.YI}},n.Lkt=function(t){var i,n=null==(i=this.Pyt)?void 0:i.jdt;if(!n)return EA.rL();var r=n.kSt,e=t?n.VAt:n.Wyt;if(void 0===r||void 0===e)return EA.rL();if(!t){var s=this.Dkt;s.V>0&&s.An(s.V-1)>e&&(e=b.min(s.An(s.V-1),n.VAt))}var u=this.ct;return isFinite(u)&&u>e&&(e=u),EA.nL(r,e).MM()},n.Un=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:dr(i),e=this.Pyt.jdt;try{n=e.ESt,r=e.TSt}catch(t){throw new y("Something went wrong determining the start of the provided MPEG-DASH stream")}if(!n)throw new y("Something went wrong determining the initial Period of the provided MPEG-DASH stream");if(void 0===r)throw new y("Something went wrong determining the start time of the provided MPEG-DASH stream");return t.textTracks&&this.Jkt(t.textTracks),this.R9(),s=this.qlt(n),u=_H(n,s,void 0,void 0,this._mt),o=this.ukt(n,u,n,u,!0),u.forEach(function(t){return t.Rt=!0}),h=this.ckt(u,o),[4,this.Lp(h)];case 1:return c.sent(),this._kt=h,dr(i),[4,this.$Tt(n,s,u,o)];case 2:return a=c.sent(),dr(i),this.Zkt(a),this.O9(),dr(i),[4,a.bat()];case 3:return c.sent(),dr(i),!this.$kt&&r>0&&this.Oy(r,!0,EH.tTt),this.Pz||(this.fkt(),this.tEt()),[2]}})}).call(this)},n.fkt=function(){this.ekt.Zg(),this.ekt=new hr,this.hkt=_r(this.iEt(this.hkt,this.nkt,this.ekt.Yg),this.ekt).catch(this.Lmt)},n.eEt=function(){this.ekt.Zg()},n.iEt=function(t,i,n){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return[4,ut.all([t,i])];case 1:s.sent(),dr(n),s.label=2;case 2:return(e=null==(r=this.akt)?void 0:r.Mc)?[4,this.sEt(e,n)]:[3,4];case 3:return s.sent()?[3,2]:[3,4];case 4:return[2]}})}).call(this)},n.sEt=function(t,i){return Vt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:dr(i),r=this.akt,u.label=1;case 1:if(this.Pyt.jdt.Km!==mL.SV||void 0!==(null==(n=this.FAt(t))?void 0:n.Tyt))return[3,7];u.label=2;case 2:return u.trys.push([2,4,,5]),[4,gr(this.nEt.VSt,i)];case 3:return u.sent(),[3,5];case 4:if(lr(e=u.sent()),this.rEt())return[2,!0];throw e;case 5:return[4,this.hEt()];case 6:return u.sent(),[3,1];case 7:return dr(i),[4,this.hEt()];case 8:u.sent(),dr(i),u.label=9;case 9:return r.gmt()?[3,12]:[4,r.ww(yL.$lt,i)];case 10:return u.sent(),[4,this.hEt()];case 11:return u.sent(),[3,9];case 12:return dr(i),[4,this.hEt()];case 13:return u.sent(),dr(i),(s=this.FAt(t))?this.oEt(s)?[4,this.aEt(s,i)]:[3,15]:(this.F3(),[2,!1]);case 14:return u.sent(),[3,17];case 15:return[4,this.uEt(s,i)];case 16:u.sent(),u.label=17;case 17:return[2,!0]}})}).call(this)},n.rEt=function(){var t=this.ZW;return Li(t)&&t.An>this.zx},n.oEt=function(t){var i,n,r,e,s,u=null!=(s=null==(i=this.Ac)?void 0:i.seamlessSwitchStrategy)?s:LA.HL;if(u===LA.WL)return!0;if(u===LA.qL)return!1;var o=this.akt,h=null==o?void 0:o.Mc,a=null==o?void 0:o.Bmt,c=_H(t,this.qlt(t),h,a,this._mt),f=this.ukt(t,c,h,a,!1);if(u===LA.CLEAR_ONLY&&((null==(n=this.akt)?void 0:n.Wpt)||f)||u===LA.SAME_DRM_ONLY&&!((null==(r=this.akt)?void 0:r.Wpt)&&f||!(null==(e=this.akt)?void 0:e.Wpt)&&!f))return!1;var v=this.ckt(c,f);return this.HTt(v)},n.cEt=function(){return!0},n.dEt=function(t){for(var i,n=Lt(this.lEt());!(i=n()).done;){var r=i.value;r!==t&&(r.Qk=zm.Nh)}},n.vkt=function(){if(void 0!==this.fEt){if(this.fEt.nC){var t=Fn(this.ht.NI,function(t){return t.Rt});void 0!==t&&this.fEt.bs===t.bs||(this.fEt.Qk=zm.Nh)}}else this.vEt()},n.vEt=function(){if(!this.lEt().length){var t=Fn(this.ht.NI,function(t){return t.Rt});if(void 0!==t)for(var i,n=Lt(this.nt.NI.filter(function(t){return t.nC}));!(i=n()).done;){var r=i.value;if(r.bs===t.bs)return r.Qk=zm.Kn,void(this.fEt=r)}}},n.lEt=function(){return this.nt.NI.filter(function(t){return t.Qk===zm.Kn&&(t.Lt===Jm.WU||t.Lt===Jm.HU)})},n._Et=function(t){if(t&&this.fEt){var i=function(t,i){if(""!==t.bs)return i.filter(function(i){return i.bs===t.bs})[0]}(this.fEt,t.nt.NI);i&&(i.Qk=zm.Kn)}},n.aEt=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:e=this.akt,s=this.bkt,u=this._kt,l.label=1;case 1:return l.trys.push([1,16,,22]),dr(i),o=e.Mc,h=e.Bmt,a=this.qlt(t),mW(e.qmt,a),c=_H(t,a,o,h,this._mt),f=this.ukt(t,c,o,h,!1),c.forEach(function(t){return t.Rt=!0}),v=this.ckt(c,f),[4,e.wat()];case 2:return l.sent(),this.I3(),dr(i),s&&s.Mc===t?this.HTt(v)?[4,this.zTt(v)]:[3,4]:[3,5];case 3:l.sent(),l.label=4;case 4:return this._kt=v,[3,11];case 5:return s?[4,s.kn(!0)]:[3,7];case 6:l.sent(),l.label=7;case 7:return this.HTt(v)?[4,this.zTt(v)]:[3,9];case 8:l.sent(),l.label=9;case 9:return this._kt=v,[4,this.$Tt(t,a,c,f)];case 10:s=l.sent(),this.bkt=s,this.Kkt(s),this.gEt.OI=s.nt,s.Aat(e),l.label=11;case 11:return[4,s.bat()];case 12:l.sent(),dr(i),l.label=13;case 13:return this.pkt900))return[3,5];this.mEt=n,this.gkt(),r=b.max(this.pkt,t.Tn),e.label=2;case 2:return e.trys.push([2,,4,5]),[4,this.mkt(r,!1,!0,i)];case 3:return e.sent(),[3,5];case 4:return this.wkt(),[7];case 5:return[2]}})}).call(this)},n.uEt=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a,c,f,v,d,l;return zt(this,function(w){switch(w.label){case 0:return dr(i),[4,this.akt.wat()];case 1:return w.sent(),this.I3(),[4,this.KTt(t.Tn)];case 2:w.sent(),dr(i),w.label=3;case 3:w.trys.push([3,7,8,9]),this.F3(),this.Ikt=!0,w.label=4;case 4:return!this.PL.Qx&&this.pkt0&&a.push(i.bEt(eg.Bk,r)),e.length>0&&a.push(i.bEt(eg.Mk,e)),a},n.ckt=function(t,i){var n,r,e,s,u,o,h,a,c,f=this,v=t.map(function(t){var i;return LM.vdt(null!=(i=t.Alt)?i:t.xat,AA(t.iat,f._mt))}).map(function(t){return{GT:t.GT}}),d=null==(r=this.Ac)||null==(n=r.dash)?void 0:n.desiredTimescale,l=(null==(e=this.Ac)?void 0:e.seamlessSwitchStrategy)!==LA.qL&&(null==(s=this.Ac)?void 0:s.seamlessSwitchStrategy)!==LA.CLEAR_ONLY&&(null==(u=this.Ac)?void 0:u.seamlessSwitchStrategy)!==LA.SAME_DRM_ONLY&&(null!=(c=null==(h=this.Ac)||null==(o=h.dash)?void 0:o.needsTimescaleShifting)?c:Ui.Zs.kp),w=null==(a=this.Ac)?void 0:a.useManagedMediaSource;return{Km:Iy.SV,q4:v,fq:ZH(i),D8:null==i?void 0:i.D8,kp:l,M3:d,t5:w}},n.ukt=function(t,n,r,e,s){var u,o,h,a=this.Ac.contentProtection,c=i.AEt(n,a);if(void 0!==c)return c;var f=null!=(h=null==(u=this.Ac)?void 0:u.seamlessSwitchStrategy)?h:LA.HL;if(f!==LA.qL&&f!==LA.CLEAR_ONLY&&f!==LA.SAME_DRM_ONLY){var v=null==(o=this.akt)?void 0:o.Wpt;if(!s&&void 0!==v){var d=!v.D8;if(f===LA.HL&&d&&!this.cEt())return;return v}var l=!s&&f===LA.HL;if(void 0!==(c=this.SEt(t,a,r,e,l)))return c.D8=!0,c}},n.SEt=function(t,n,r,e,s){for(var u=t,o=!1;;)if(void 0!==(u=o?this.UAt(u):this.FAt(u))){var h=_H(u,this.qlt(u),r,e,this._mt),a=i.AEt(h,n);if(s){var c=this.ckt(h,a);if(!this.HTt(c))return}if(void 0!==a)return a}else{if(o)return;o=!0,u=t}},n.Jkt=function(t){for(var i,n=Lt(t);!(i=n()).done;){var r=i.value;r.src&&this.Aq.hV(r)}Sy(this.Aq.Z)},n.jP=function(){var t,i=this.lP;this.Ckt=!0,i||(this.t9||(this.TEt(new fr),this.kEt()),(null==(t=this.JW)?void 0:t.oL)&&this.JW.KP(),this.EEt())},n.QP=function(){this.xEt||(this.xEt=new Va),this.PEt();var t=this.xEt.Yy;return kr(t),t},n.PEt=function(){if(this.Ckt=!1,this.d9=!0,this.IEt=!1,this.Bkt(),this.Qx){var t=this.Tkt;t.V>0&&this.Oy(t.Tn(0))}this.t9||this.f9().then(this.CEt,this.TEt),this.tkt(),this.EEt()},n.f9=function(){return this.PL.QP()},n.kEt=function(){this.PL.jP()},n.R9=function(){this.t9||(this.Ckt=this.lP,this.t9=!0,this.kEt())},n.O9=function(){this.t9&&(this.t9=!1,this.Ckt||this.f9().then(this.CEt,this.TEt),this.tkt(),this.EEt())},n.EEt=function(){var t=this.FV,i=this.lP;t!==i&&(this.FV=i,this.Ckt=i,i?this.So(new cT(this.zx)):this.So(new fT(this.zx)))},n.Oy=function(t,i,n){return void 0===i&&(i=!1),void 0===n&&(n=EH.$St),this.$kt=!0,this.ekt.Zg(),this.T9.Zg(),this.Pz=!0,this.Y8=t,this.IEt=this.IEt&&this.J8(),this.Nkt(this.Dkt),this.REt(new wT(this.zx)),this.T9=new hr,this.k9=_r(this.E9(t,this.hkt,this.k9,this.nkt,this.T9.Yg,i,n),this.T9).catch(this.Lmt),this.k9},n.DEt=function(){this.T9.Zg()},n.E9=function(){return Vt(function(t,i,n,r,e,s,u,o){var h,a,c,f,v,d,l,w,g,_,m,y,p,k,b,A,T,S;return zt(this,function(E){switch(E.label){case 0:void 0===s&&(s=!1),void 0===u&&(u=EH.$St),void 0===o&&(o=!1),null==(h=this.JW)||h.KP(),E.label=1;case 1:return E.trys.push([1,30,,31]),[4,ut.all([i,n,r])];case 2:return E.sent(),dr(e),[4,gr(this.okt.Yy,e)];case 3:return E.sent(),f=this.Tkt.LM(t),this.Y8=f,v=o||(null==(c=this.Ac)||null==(a=c.dash)?void 0:a.forceHardSwitchWhenSeekingBackwards)&&f<=this.zx,d=this.NEt(f),l=this.akt,v||!l||!l.kP.Cr(f)&&u!==EH.tTt&&l.Mc!==d?[3,8]:!(w=this.bkt)||w.Smt?[3,7]:[4,w.wat()];case 4:return E.sent(),this.I3(),g=this.ckt(l.Mmt,l.Wpt),this.HTt(g)?[4,this.zTt(g)]:[3,6];case 5:E.sent(),E.label=6;case 6:this._kt=g,E.label=7;case 7:return[3,27];case 8:return d?(_=this.bkt,this.R9(),l?[4,l.wat()]:[3,10]):[3,27];case 9:E.sent(),E.label=10;case 10:return!_||_.Mc!==d||v?[3,13]:(m=this.ckt(_.Mmt,_.Wpt),this.I3(),this.HTt(m)?[4,this.zTt(m)]:[3,12]);case 11:E.sent(),E.label=12;case 12:return this._kt=m,[3,25];case 13:return _?[4,_.kn(!0)]:[3,15];case 14:E.sent(),E.label=15;case 15:return y=this.qlt(d),l&&mW(l.qmt,y),p=null==l?void 0:l.Mc,k=null==l?void 0:l.Bmt,b=_H(d,y,p,k,this._mt),A=this.ukt(d,b,p,k,!1),b.forEach(function(t){return t.Rt=!0}),T=this.ckt(b,A),!this.oEt(d)||v?[3,18]:(this.I3(),this.HTt(T)?[4,this.zTt(T)]:[3,17]);case 16:E.sent(),E.label=17;case 17:return[3,23];case 18:return A=this.ukt(d,b,p,k,!0),T=this.ckt(b,A),l?(this.wEt.mn(Nw.pa,this.yEt),[4,l.kn()]):[3,20];case 19:E.sent(),this.wEt.wn(Nw.pa,this.yEt),this.akt=void 0,E.label=20;case 20:return[4,this.XTt()];case 21:return E.sent(),[4,this.Lp(T)];case 22:E.sent(),E.label=23;case 23:return this._kt=T,[4,this.$Tt(d,y,b,A)];case 24:_=E.sent(),this.bkt=_,this.gEt.OI=_.nt,this.Kkt(_),_.Aat(this.akt),E.label=25;case 25:return[4,_.bat(WO.tot)];case 26:return E.sent(),this.Zkt(_),[3,27];case 27:return kr(S=this.mkt(f,s,!1,e)),this.Y8=void 0,[4,this.akt.bat(WO.tot)];case 28:return E.sent(),dr(e),this.fkt(),[4,S];case 29:return E.sent(),dr(e),this.O9(),this.Pz=!1,this.BEt(new gT(this.zx)),this.tEt(),[3,31];case 30:return vr(E.sent())?[2]:[3,31];case 31:return[2]}})}).apply(this,arguments)},n.tEt=function(){if(!this.lP&&!this.xP&&void 0!==this.OL){var t,i,n=this.zx;if(this.zx+this.OL-this.VP.Cd.maximumOffset0&&(c=a.LM(t),s!==c&&(a.Cr(s)&&this.Pyt.jdt.Km===mL.SV||(s=c,e=!0))),e)e=!1,null==o||o.Zg(),(o=new hr).$g(r),kr(u=_r(this.MEt(s,i,n,o.Yg),o));else if(!this.Fkt&&!this.n5)return[3,7];return f=qt(h,hr.ep([r]),!1),[4,ut.race([u,this.ww([eh.ey,eh.iy,eh.Cw],f.Yg),this.Pyt.jdt.ww(qO.Fot,f.Yg)])];case 3:return d.sent(),[3,6];case 4:return v=d.sent(),h.error=v,h.hasError=!0,[3,6];case 5:return Gt(h),[7];case 6:return[3,1];case 7:return[2]}})}).call(this)},n.MEt=function(t,i,n,r){return Vt(function(){return zt(this,function(e){switch(e.label){case 0:this.PL.Oy(t,i,n),e.label=1;case 1:return this.Fkt||this.n5?[4,this.PL.ww([eh.Zw,eh.Vw],r)]:[3,3];case 2:return e.sent(),[3,1];case 3:return[2]}})}).call(this)},n.gkt=function(){void 0===this.Akt&&(this.Akt=this.pkt,this.PL.mn(eh.$w,this.REt),this.PL.mn(eh.Zw,this.BEt))},n.wkt=function(){if(void 0!==this.Akt){var t=this.pkt;this.Akt=void 0,this.PL.wn(eh.$w,this.REt),this.PL.wn(eh.Zw,this.BEt),this.pkt!==t&&this.Nc()}},n.LEt=function(t){this.Ho=this.Ho.HM(t)},n.NEt=function(t){var i=this.Pyt.jdt,n=i.Amt.filter(function(t){return t.ct>=.2});if(0!==n.length){var r=n[0];if(t<=r.Tn)return r;for(var e,s=Lt(n);!(e=s()).done;){var u=e.value;if(u.An>t)return u}return i.Km!==mL.SV?n[n.length-1]:void 0}},n.UAt=function(t){for(var i=t.Hmt;i&&i.ct<.2;)i=i.Hmt;return i},n.FAt=function(t){for(var i=t.Wmt;i&&i.ct<.2;)i=i.Wmt;return i},n.Ta=function(t,i,n){return Vt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:r={stack:[],error:void 0,hasError:!1},c.label=1;case 1:return c.trys.push([1,8,9,10]),this.pq.BW(t.contentProtection),this.OEt(),!this.Ac||ZA(this.Ac)?[3,3]:[4,this.hr()];case 2:c.sent(),c.label=3;case 3:return!t||ZA(t)?[2]:(s=qt(r,hr.ep([n]),!1),this.uV=hr.ep([s.Yg]),this.Ac=t,this.FEt=i,this._mt=t.abr,this.Zpt=t.ignoreEmbeddedTextTrackTypes,this.UEt=new CH(this.aV,Boolean(this.Ac.useCredentials),this.Ndt),this.UEt.wn(eh.sy,this.Rs),u=OH(this.UEt,this.Sut),this.SSt(!0),this.nEt=new dH({rC:Ui.Dh(this.Ac.src),ISt:null!=(o=null==(e=this.Ac.latencyConfiguration)?void 0:e.targetOffset)?o:this.Ac.liveOffset,BSt:this.Ac.timeServer,Xk:this.Ac.useCredentials},this.VEt(this._mt),this.aV,u,this.Ac.dash),this.Pyt=this.nEt.Br,this.Pyt.jdt.wn(eh.Ww,this.HEt),this.Pyt.jdt.wn(eh.qw,this.WEt),this.Pyt.jdt.wn(zV.jAt,this.qEt),this.Pyt.jdt.wn(qO.Fot,this.tkt),this.Pyt.jdt.wn(eh.oy,this.Rs),[4,this.zEt.Un(this.Pyt.jdt)]);case 4:return c.sent(),[4,this.GEt.Un(this.Pyt.jdt)];case 5:return c.sent(),jn(this.Zpt,Ng.EMSG)?[3,7]:(this.Opt=new cW(this.PL),this.Gl.qW(this.Opt.Z),[4,this.Opt.Un(this.Pyt.jdt)]);case 6:c.sent(),c.label=7;case 7:return t.latencyConfiguration&&(h=t.latencyConfiguration,this.JW=new vW(this,this.PL,h),this.JW.Rt=!0,this.cq.Ea(this.JW)),this.Bkt(),s.zg(),[3,10];case 8:return a=c.sent(),r.error=a,r.hasError=!0,[3,10];case 9:return Gt(r),[7];case 10:return[2]}})}).call(this)},n.IP=function(t,i,n,r){return ut.resolve()},n.CP=function(){return ut.resolve()},n.XEt=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=this.Pyt.jdt.cP,this.SSt(t),t?(this.jkt(),this.xq.mn(Ry.xM,this.jEt),[2]):this.rEt()?(this.xq.wn(Ry.xM,this.jEt),[2]):[4,this.QEt()];case 1:return i.sent(),[2]}})}).call(this)},n.QEt=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return[4,ut.all([null==(t=this.akt)?void 0:t.wat(WO.pot),null==(i=this.bkt)?void 0:i.wat(WO.pot)].filter(Li))];case 1:throw n.sent(),this.eEt(),this.DEt(),this.skt.Zg(),new y("The provided MPEG-DASH manifest could not be loaded")}})}).call(this)},n.SSt=function(t){this.ASt!==t&&(this.ASt=t,this.So(t?new LH:new FH))},n.Bkt=function(){this.Pyt&&(this.KEt=this.YEt(this.KEt,this.uV.Yg).catch(this.Lmt))},n.YEt=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return t?[4,t]:[3,2];case 1:r.sent(),dr(i),r.label=2;case 2:return r.trys.push([2,7,,8]),this.wP===YT.HL||this.d9?[4,this.JEt(i)]:[3,4];case 3:return r.sent(),[3,6];case 4:return this.wP!==YT.zU?[3,6]:[4,this.ZEt(i)];case 5:return r.sent(),[3,6];case 6:return[3,8];case 7:throw lr(n=r.sent()),this.Qq(new ld(vd.MANIFEST_LOAD_ERROR,n.message,n)),n;case 8:return[2]}})}).call(this)},n.JEt=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.ZEt(t)];case 1:n.sent(),this.$Et||(this.$Et=!0,this.okt.$g(this.Un(this.FEt,t))),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,this.okt.Yy];case 3:return n.sent(),[3,5];case 4:return lr(i=n.sent()),this.Qq(new ld(vd.MEDIA_DECODE_ERROR,i.message,i)),[3,5];case 5:return[2]}})}).call(this)},n.ZEt=function(t){return Vt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,gr(this.nEt.W,t)];case 1:return o.sent(),i=this.Pyt.jdt,void 0===this.JW&&i.Km===mL.SV&&(n=i.pyt,r=(null==n?void 0:n.tSt)?(null==n?void 0:n.tSt)/1e3:i.xSt,e=(null==n?void 0:n.JAt)?(null==n?void 0:n.JAt)/1e3:.5*r,s=(null==n?void 0:n.$At)?(null==n?void 0:n.$At)/1e3:1.5*r,u={minimumOffset:e,maximumOffset:s,targetOffset:r,forceSeekOffset:2.5*r,minimumPlaybackRate:CA,maximumPlaybackRate:PA},this.JW=new vW(this,this.PL,u),this.cq.Ea(this.JW)),[2]}})}).call(this)},n.Zkt=function(t){var n=this.akt;t!==n&&(this.akt&&this.Qkt(this.akt),this.bkt&&this.Ykt(this.bkt),n&&this.Nkt(this.Dkt),this.akt=t,this.bkt=n,this.Hkt(this.akt),this.bkt&&this.Kkt(this.bkt),this.tO.OI=t.ht,this.sO.OI=t.rt,this._Et(t),this.wEt.mn(Nw.pa,this.yEt),i.txt(this.wEt),this.wEt.wn(Nw.pa,this.yEt),this.wEt.OI=t.nt,this.gEt.OI=void 0,this.vEt())},n.be=function(){this.PL.be()},n.we=function(){this.PL.we()},n.Qq=function(t){this.nq||(kr(this.hr()),this.nq=cg(t),this.rq=t,this.So(new yb(t)))},n.OEt=function(){this.nq=void 0,this.rq=void 0},n.WTt=function(){var t=this.aq;t&&(t.s4&&(t.s4.VY=this.Mz.YY),t.e4&&(t.e4.VY=this.Mz.YY))},n.qTt=function(){var t=this.aq;t&&(t.s4&&(t.s4.zY=this.Mz.zY),t.e4&&(t.e4.zY=this.Mz.zY))},n.determineStallJumpTarget=function(){if(this.akt)return this.akt.gmt()&&this.zx>this.akt.An-fP&&!this.akt.bmt?this.akt.An:void 0},n.hr=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:if(this.ixt)return[2,this.ixt];t.label=1;case 1:return t.trys.push([1,,3,4]),this.ixt=this.sxt(),[4,this.ixt];case 2:return t.sent(),[3,4];case 3:return this.ixt=void 0,[7];case 4:return[2]}})}).call(this)},n.sxt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.vP=1,this.uV.Zg(),this.DEt(),this.eEt(),this.skt.Zg(),this.okt.Zg(),this.$kt=!1,this.jP(),this.d9=!1,this.IEt=!1,this.tO.OI=void 0,this.sO.OI=void 0,this.wEt.OI=void 0,this.gEt.OI=void 0,this.KEt?[4,this.KEt.catch(dn)]:[3,2];case 1:t.sent(),this.KEt=void 0,t.label=2;case 2:return[4,ut.all([this.hkt,this.k9,this.nkt,this.okt.Yy.catch(dn)])];case 3:return t.sent(),this.akt?[4,this.akt.kn(!0)]:[3,5];case 4:t.sent(),this.akt=void 0,t.label=5;case 5:return this.bkt?(this.Ykt(this.bkt),[4,this.bkt.kn(!0)]):[3,7];case 6:t.sent(),this.bkt=void 0,t.label=7;case 7:return[4,this.XTt()];case 8:return t.sent(),this._kt=void 0,this.fEt=void 0,this.xq.mn(Ry.xM,this.jEt),this.xq.hr(),[4,this.zEt.hr()];case 9:return t.sent(),[4,this.GEt.hr()];case 10:return t.sent(),void 0===this.Opt?[3,12]:(this.Gl.XW(this.Opt.Z),[4,this.Opt.kn()]);case 11:t.sent(),this.Opt=void 0,t.label=12;case 12:return this.UEt&&(this.UEt.mn(eh.sy,this.Rs),this.UEt=void 0),this.Pyt?(this.Pyt.jdt.mn(eh.Ww,this.HEt),this.Pyt.jdt.mn(eh.qw,this.WEt),this.Pyt.jdt.mn(zV.jAt,this.qEt),this.Pyt.jdt.mn(qO.Fot,this.tkt),this.Pyt.jdt.mn(eh.oy,this.Rs),[4,this.nEt.kn()]):[3,14];case 13:t.sent(),this.Pyt=void 0,t.label=14;case 14:return this.Mkt=!1,this.nxt=NaN,this.rxt=0,this.hxt=0,this.Akt=void 0,this.t9=!1,this.Ho=EA.rL(),this.FV=!0,this.Y8=void 0,this.oxt=!1,this.Pz=!1,this.$Et=!1,this.okt=new Va,this.Ekt=0,this.xkt=0,this.Pkt=0,this.Ac=void 0,this.FEt=void 0,this.Zpt=[],this.mEt=void 0,this.cq.hr(),this.JW=void 0,this.jTt={rO:0,hO:0,oO:0},[4,this.Aq.hr()];case 15:return t.sent(),this.PL.Eq(),this.axt.hr(),[2]}})}).call(this)},n.kn=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),this.OEt(),[4,this.hr()];case 1:return t.sent(),this.Vo(),this.tO.kn(),this.sO.kn(),this.wEt.kn(),this.gEt.kn(),this.Gl.kn(),this.xq.kn(),this.Cq.zg(),[4,this.zEt.kn()];case 2:return t.sent(),[4,this.GEt.kn()];case 3:return t.sent(),this.axt.kn(),this.PL.mn(eh.Cw,this.B7),this.PL.mn(fh.Dw,this.U8),this.PL.mn(eh.Nw,this.uxt),this.PL.mn(eh.$w,this.REt),this.PL.mn(eh.Zw,this.BEt),this.PL.mn(eh.Jw,this.Xkt),this.PL.mn(eh.py,this.Nc),this.PL.mn([eh.uo,eh.jw],this.cxt),this.PL.mn(lW,this.Rs),[4,this.Aq.kn()];case 4:return t.sent(),this.Gl.kn(),this.Mz.mn("UY",this.dxt),this.Mz.mn("qY",this.lxt),this.PL.mn(qm.ma,this.fxt),this.PL.mn([eh.xw,eh.Ew],this.Rs),this.PL.mn(eh.Ay,this.Gmt),this.PL.mn(eh.LICENSE_REQUEST_GENERATED,this.xmt),this.PL.Rq=void 0,this.pq.mn("contentProtectionsTracked",this.vxt),this.PL.J7=void 0,[2]}})}).call(this)},n.qP=function(){return this.PL.Ma},n.Aa=function(){return this.PL.Sq},n.YP=function(){return!1},n.JP=function(){},n.ZP=function(){},n.$P=function(){},n.tI=function(){this.ikt(!0)},n.sI=function(t){var i=this.PL.Tq(t);return this.axt.tt(i),i},i.bEt=function(t,i){for(var n,r=[],e=[],s=!i.some(function(t){return t.Glt.some(function(t){return"main"===t.XE})}),u=Lt(i);!(n=u()).done;){var o=n.value;if(-1===r.indexOf(o)){var h=gW(o.olt.concat(o.Glt),s);s=!1;for(var a,c=o.xat.map(function(t){return t.qot}),f=new vL(o,c,h),v=Lt(_W(o,i));!(a=v()).done;){var d=a.value;f.Tlt(d),r.push(d)}e.push(f)}}return new wH(t,e)},i.AEt=function(t,i){if(t.length){for(var n,r,e=Lt(t);!(r=e()).done;){var s=r.value,u=0===s.xlt.length;n=GH(n,KH(s.Zut,i,u))}return(null==i?void 0:i.preferredKeySystems)&&n&&(n.qpt=iW(n.qpt,i.preferredKeySystems)),n}},i.txt=function(t){for(var i,n=Lt(t.NI);!(i=n()).done;){i.value.Qk=zm.Nh}},Nt(i,[{key:"ht",get:function(){return this.tO}},{key:"ZW",get:function(){var t=this.pkt,i=this.ykt,n=i.zM(t);if(-1!==n)return{Tn:i.Tn(n),An:i.An(n)}}},{key:"ykt",get:function(){var t,i,n,r,e=null!=(n=null==(t=this.akt)?void 0:t.Fx)?n:EA.rL(),s=null!=(r=null==(i=this.bkt)?void 0:i.Fx)?r:EA.rL();return e.HM(s)}},{key:"Fx",get:function(){return this.ykt._s()}},{key:"Vx",get:function(){var t,i=null==(t=this.Pyt)?void 0:t.jdt,n=null==i?void 0:i.hyt;if(i&&n){var r=n.getTime(),e=1e3*this.zx;return new Date(e+r)}},set:function(t){var i,n=null==(i=this.Pyt)?void 0:i.jdt,r=null==n?void 0:n.hyt;if(t&&n&&r){var e=r.getTime()/1e3,s=t.getTime()/1e3;this.Oy(s-e)}}},{key:"bt",get:function(){return this.Ac}},{key:"pkt",get:function(){return void 0!==this.Y8?this.Y8:void 0!==this.Akt?this.Akt:this.PL.zx}},{key:"zx",get:function(){return this.pkt},set:function(t){this.Xx(t)}},{key:"ct",get:function(){var t=NaN;return this.akt&&this.akt.bmt?t=this.akt.An:this.Pyt&&void 0!==this.Pyt.jdt.Km&&(t=this.Pyt.jdt.dyt?this.Pyt.jdt.dyt.Qmt():1/0),t}},{key:"An",get:function(){return this.ct}},{key:"Qx",get:function(){return this.xP?this.J8():!(!this.akt||!this.akt.bmt)&&this.PL.Qx}},{key:"lt",get:function(){return this.nq}},{key:"Jx",get:function(){return this.rq}},{key:"$x",get:function(){}},{key:"iP",get:function(){}},{key:"rP",get:function(){return Yu({},this.QTt,{aO:bb.Bg.pW(),uO:this.Ekt,cO:{amountOfBufferedAudioSegments:this.xkt,amountOfBufferedVideoSegments:this.Pkt}})}},{key:"QTt",get:function(){return function(t,i){return{rO:t.rO+i.rO,hO:t.hO+i.hO,oO:t.oO+i.oO}}(this.jTt,this.PL.hP())}},{key:"oP",get:function(){return this.PL.oP},set:function(t){this.PL.oP=t}},{key:"lP",get:function(){return this.t9||this.Ikt&&this.PL.Qx?this.Ckt:this.Rkt}},{key:"vP",get:function(){return this.PL.vP},set:function(t){this.PL.vP=t}},{key:"pP",get:function(){var t=this.Ho;return this.akt&&(t=t.HM(this.Dkt)),t.VM(.1)._s()}},{key:"Dkt",get:function(){return this.PL.pP}},{key:"wP",get:function(){return this.oq},set:function(t){this.oq=t,this.Bkt()}},{key:"AP",get:function(){var t=this.PL.AP;return this.Mkt&&(t=b.max(Dy.Qn,t)),t}},{key:"Tkt",get:function(){return this.Lkt(!1)}},{key:"Okt",get:function(){return this.Lkt(!0)}},{key:"kP",get:function(){return this.Tkt._s()}},{key:"xP",get:function(){return this.Pz||this.Fkt}},{key:"Fkt",get:function(){return this.PL.xP}},{key:"n5",get:function(){return this.PL.n5}},{key:"uq",get:function(){}},{key:"Ukt",get:function(){var t,i;return null!=(i=null==(t=this.Pyt)?void 0:t.jdt.Km)?i:mL.AV}},{key:"nt",get:function(){return this.Gl}},{key:"rt",get:function(){return this.sO}},{key:"DP",get:function(){var t;return UR(this.PL)&&(this.PL.DP||(null==(t=this.Vkt())?void 0:t.Mi))||0}},{key:"MP",get:function(){var t;return UR(this.PL)&&(this.PL.MP||(null==(t=this.Vkt())?void 0:t.Ti))||0}},{key:"OP",get:function(){return this.PL.OP},set:function(t){this.PL.OP=Tn(t,0,1)}},{key:"VP",get:function(){return this.cq}},{key:"WP",get:function(){return!1},set:function(t){}},{key:"dq",get:function(){return this.lq}},{key:"Rkt",get:function(){return this.PL.lP}},{key:"cP",get:function(){return this.ASt}},{key:"sP",get:function(){return!1}},{key:"OL",get:function(){var t,i=null==(t=this.Pyt)?void 0:t.jdt;if(i&&i.Km===mL.SV&&i.hyt)return i.Xdt().getTime()/1e3-i.hyt.getTime()/1e3-this.zx}}]),i}(th);function gW(t,i){var n=t.filter(function(t){return"urn:mpeg:dash:role:2011"===t.x8}).map(function(t){return t.XE}).filter(Li);return i||jn(n,"main")?jn(n,"caption")?"captions":jn(n,"subtitle")?"subtitles":jn(n,"dub")?"translation":"main":jn(n,"sign")?"sign":jn(n,"description")?"descriptions":jn(n,"commentary")?"commentary":"alternative"}function _W(t,i){for(var n,r,e,s=function(){var t=e.value,n=Number(t),r=Fn(i,function(t){return t.o===n});r&&h.push(r)},u=Fn([].concat(t.ywt,t.bwt),function(t){return"urn:mpeg:dash:adaptation-set-switching:2016"===t.x8}),o=null!=(r=null==u||null==(n=u.XE)?void 0:n.split(","))?r:[],h=[],a=Lt(o);!(e=a()).done;)s();return h}function mW(t,i){for(var n,r=function(){var t=function(){var t=s.value,i=t.tC;if(!i)return"continue";var n=t.xat.map(function(t){return t.o}),r=Fn(o,function(t){var i=t.xat.map(function(t){return t.o});return Kn(n,i)});if(!r)return"continue";var e=i.map(function(t){return t.o});r.tC=r.$I.NI.filter(function(t){return jn(e,t.o)})},r=n.value,e=Fn(i,function(t){return t.Km===r.Km});if(!e)return"continue";for(var s,u=r.Z,o=e.Z,h=Lt(u);!(s=h()).done;)t()},e=Lt(t);!(n=e()).done;)r()}U(),Et(),Wt(),Qt();var yW=function(){function t(t,i,n,r){this.gxt=void 0,this.pxt=void 0,this.mxt=void 0,this.wxt=void 0,this.gxt=t,this.pxt=i,this.mxt=n,this.wxt=r}var i=t.prototype;return i.hTt=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.gxt._xt(t.map(PH))];case 1:return[2,i.sent().shift()]}})}).call(this)},i.sdt=function(t,i){var n=DH(t,i);return this.pxt.qy(n)},i.Aut=function(t,i){return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return r=DH(t,i),[4,this.mxt.zy(r)];case 1:return[2,null==(n=e.sent())?void 0:n.data]}})}).call(this)},i.jJ=function(t){return this.wxt.zy(t)},t}();U(),Et(),xt(),U(),Et(),U(),Et();var pW=function(){function t(){}var i=t.prototype;return i.yxt=function(t){return ut.resolve(!1)},i.uTt=function(t){return ut.reject(kW)},i.bxt=function(t){return ut.reject(kW)},i.qy=function(t){return ut.resolve(!1)},i.zy=function(t){return ut.resolve(void 0)},i.Axt=function(t,i){return ut.resolve(void 0)},i._xt=function(t){return ut.resolve([])},i.Sxt=function(){return ut.resolve([])},i.Txt=function(t){return ut.resolve([])},i.kxt=function(t,i){return ut.resolve([])},i.pS=function(t){return ut.reject(kW)},i.Ext=function(t){return ut.reject(kW)},i.xxt=function(){return ut.reject(kW)},t}(),kW="Storage disabled",bW=function(){function t(){this.Nxt=void 0,this.bct=void 0,this.Bxt=void 0,this.Mxt=void 0,this.Lxt=void 0,this.Nxt=new pW,this.bct=new pW,this.Bxt=new pW,this.Mxt=new pW,this.Lxt=new pW}return t.prototype.Rxt=function(t){return ut.reject(AW)},t.jet=function(){return ut.resolve(new t)},t}(),AW="Storage disabled";U(),Et(),Wt(),Ft(),Qt(),U(),Et(),Wt(),xt(),Qt(),U(),Et(),Wt(),xt(),Qt();var TW=function(){function t(t){var i=this;this.Jg=new Va,this.Ixt=void 0,this.Jg.$g(t),this.Jg.Yy.then(function(t){i.Ixt=t})}var i=t.prototype;return i.yxt=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Ixt)?[3,2]:[4,this.Pxt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.yxt(t)]}})}).call(this)},i.uTt=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return(n=this.Ixt)?[3,2]:[4,this.Pxt];case 1:n=r.sent(),r.label=2;case 2:return[2,n.uTt(t,i)]}})}).call(this)},i.bxt=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return(n=this.Ixt)?[3,2]:[4,this.Pxt];case 1:n=r.sent(),r.label=2;case 2:return[2,n.bxt(t,i)]}})}).call(this)},i.qy=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Ixt)?[3,2]:[4,this.Pxt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.qy(t)]}})}).call(this)},i.zy=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Ixt)?[3,2]:[4,this.Pxt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.zy(t)]}})}).call(this)},i.Axt=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return(n=this.Ixt)?[3,2]:[4,this.Pxt];case 1:n=r.sent(),r.label=2;case 2:return[2,n.Axt(t,i)]}})}).call(this)},i._xt=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Ixt)?[3,2]:[4,this.Pxt];case 1:i=n.sent(),n.label=2;case 2:return[2,i._xt(t)]}})}).call(this)},i.Sxt=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(t=this.Ixt)?[3,2]:[4,this.Pxt];case 1:t=i.sent(),i.label=2;case 2:return[2,t.Sxt()]}})}).call(this)},i.Txt=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Ixt)?[3,2]:[4,this.Pxt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.Txt(t)]}})}).call(this)},i.kxt=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return(n=this.Ixt)?[3,2]:[4,this.Pxt];case 1:n=r.sent(),r.label=2;case 2:return[2,n.kxt(t,i)]}})}).call(this)},i.pS=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Ixt)?[3,2]:[4,this.Pxt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.pS(t)]}})}).call(this)},i.Ext=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Ixt)?[3,2]:[4,this.Pxt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.Ext(t)]}})}).call(this)},i.xxt=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(t=this.Ixt)?[3,2]:[4,this.Pxt];case 1:t=i.sent(),i.label=2;case 2:return[2,t.xxt()]}})}).call(this)},Nt(t,[{key:"Pxt",get:function(){return this.Jg.Yy}}]),t}(),SW=function(){function t(t){var i=this;this.Jg=new Va,this.Dxt=void 0,this.bct=void 0,this.Nxt=void 0,this.Bxt=void 0,this.Mxt=void 0,this.Lxt=void 0,this.Jg.$g(t);var n=this.Jg.Yy;n.then(function(t){i.Dxt=t}),this.bct=new TW(n.then(function(t){return t.bct})),this.Nxt=new TW(n.then(function(t){return t.Nxt})),this.Bxt=new TW(n.then(function(t){return t.Bxt})),this.Mxt=new TW(n.then(function(t){return t.Mxt})),this.Lxt=new TW(n.then(function(t){return t.Lxt}))}return t.prototype.Rxt=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Dxt)?[3,2]:[4,this.Cxt];case 1:i=n.sent(),n.label=2;case 2:return[4,i.Rxt(t)];case 3:return[2,n.sent()]}})}).call(this)},Nt(t,[{key:"Cxt",get:function(){return this.Jg.Yy}}]),t}();function EW(t){return new y("This storage cannot handle persistency type "+t)}U(),Et(),U(),Et(),Ft(),U(),Et();var IW=function(t){return t.Oxt="readonly",t.Fxt="readwrite",t}({}),RW=function(){function t(){this.Lb=[]}var i=t.prototype;return i.yxt=function(t){return ut.resolve("temporary"===t)},i.uTt=function(t,i){return void 0===i&&(i="temporary"),"temporary"!==i?ut.reject(EW(i)):(this.Uxt(t.key),this.Lb.push(t),ut.resolve())},i.bxt=function(t,i){if(void 0===i&&(i="temporary"),"temporary"!==i)return ut.reject(EW(i));for(var n,r=Lt(t);!(n=r()).done;){var e=n.value;this.Uxt(e.key)}for(var s,u=Lt(t);!(s=u()).done;){var o=s.value;this.Lb.push(o)}return ut.resolve()},i.qy=function(t){return ut.resolve(Boolean(this.Vxt(t)))},i.zy=function(t){return ut.resolve(this.Vxt(t))},i.Axt=function(t,i){return ut.resolve(this.Hxt(t,i))},i._xt=function(t){var i=this,n=t?t.map(function(t){return i.Vxt(t)}):this.Lb;return ut.resolve(n.filter(Li))},i.Sxt=function(){return ut.resolve([].concat(this.Lb))},i.Txt=function(t){return this.kxt(t,"key")},i.kxt=function(t,i){var n=this.Lb.filter(function(n){return n[i]===t});return ut.resolve(n)},i.pS=function(t){return this.Uxt(t),ut.resolve()},i.Ext=function(t){for(var i,n=Lt(t);!(i=n()).done;){var r=i.value;this.Uxt(r)}return ut.resolve()},i.xxt=function(){return Yn(this.Lb),ut.resolve()},i.Vxt=function(t){return this.Hxt(t,"key")},i.Hxt=function(t,i){for(var n,r=Lt(this.Lb);!(n=r()).done;){var e=n.value;if(e[i]===t)return e}},i.Uxt=function(t){var i=this.Vxt(t);i&&Xn(this.Lb,i)},t}(),CW=function(){function t(){this.Nxt=void 0,this.bct=void 0,this.Bxt=void 0,this.Mxt=void 0,this.Lxt=void 0,this.Nxt=new RW,this.bct=new RW,this.Bxt=new RW,this.Mxt=new RW,this.Lxt=new RW}return t.prototype.Rxt=function(t){return t(this)},t.jet=function(){return ut.resolve(new t)},t}();U(),Et(),Wt(),xt(),Qt(),U(),Et(),Wt(),Ft(),Qt();var PW=function(){function t(t){this.Wxt=void 0,this.Wxt=t}var i=t.prototype;return i.yxt=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=Lt(this.Wxt),r.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value.yxt(t)];case 2:if(r.sent())return[2,!0];r.label=3;case 3:return[3,1];case 4:return[2,!1]}})}).call(this)},i.uTt=function(t,i){return void 0===i&&(i="persistent"),Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Lt(this.Wxt),s.label=1;case 1:return(r=n()).done?[3,4]:[4,(e=r.value).yxt(i)];case 2:if(s.sent())return[2,e.uTt(t)];s.label=3;case 3:return[3,1];case 4:throw EW(i)}})}).call(this)},i.bxt=function(t,i){return void 0===i&&(i="persistent"),Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Lt(this.Wxt),s.label=1;case 1:return(r=n()).done?[3,4]:[4,(e=r.value).yxt(i)];case 2:if(s.sent())return[2,e.bxt(t)];s.label=3;case 3:return[3,1];case 4:throw EW(i)}})}).call(this)},i.qy=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=Lt(this.Wxt),r.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value.qy(t)];case 2:if(r.sent())return[2,!0];r.label=3;case 3:return[3,1];case 4:return[2,!1]}})}).call(this)},i.zy=function(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:i=Lt(this.Wxt),e.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value.zy(t)];case 2:if(r=e.sent())return[2,r];e.label=3;case 3:return[3,1];case 4:return[2,void 0]}})}).call(this)},i.Axt=function(t,i){return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Lt(this.Wxt),s.label=1;case 1:return(r=n()).done?[3,4]:[4,r.value.Axt(t,i)];case 2:if(e=s.sent())return[2,e];s.label=3;case 3:return[3,1];case 4:return[2,void 0]}})}).call(this)},i._xt=function(t){return Vt(function(){var i,n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:i=[],n=Lt(this.Wxt),f.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,o=(u=(s=i).push).apply,h=[s],c=(a=[]).concat,[4,e._xt(t)]);case 2:o.apply(u,h.concat([c.apply(a,[f.sent()])])),f.label=3;case 3:return[3,1];case 4:return[2,i]}})}).call(this)},i.Sxt=function(){return Vt(function(){var t,i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:t=[],i=Lt(this.Wxt),c.label=1;case 1:return(n=i()).done?[3,4]:(r=n.value,u=(s=(e=t).push).apply,o=[e],a=(h=[]).concat,[4,r.Sxt()]);case 2:u.apply(s,o.concat([a.apply(h,[c.sent()])])),c.label=3;case 3:return[3,1];case 4:return[2,t]}})}).call(this)},i.Txt=function(t){return Vt(function(){var i,n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:i=[],n=Lt(this.Wxt),f.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,o=(u=(s=i).push).apply,h=[s],c=(a=[]).concat,[4,e.Txt(t)]);case 2:o.apply(u,h.concat([c.apply(a,[f.sent()])])),f.label=3;case 3:return[3,1];case 4:return[2,i]}})}).call(this)},i.kxt=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:n=[],r=Lt(this.Wxt),v.label=1;case 1:return(e=r()).done?[3,4]:(s=e.value,h=(o=(u=n).push).apply,a=[u],f=(c=[]).concat,[4,s.kxt(t,i)]);case 2:h.apply(o,a.concat([f.apply(c,[v.sent()])])),v.label=3;case 3:return[3,1];case 4:return[2,n]}})}).call(this)},i.pS=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=Lt(this.Wxt),r.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value.pS(t)];case 2:r.sent(),r.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},i.Ext=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=Lt(this.Wxt),r.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value.Ext(t)];case 2:r.sent(),r.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},i.xxt=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:t=Lt(this.Wxt),n.label=1;case 1:return(i=t()).done?[3,4]:[4,i.value.xxt()];case 2:n.sent(),n.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},t}();function DW(t){return function(){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,ut.all(t.map(function(t){return t()}))];case 1:return i=n.sent(),[2,NW.jet(i)]}})})()}}var NW=function(){function t(t){this.Qxt=void 0,this.qxt=void 0,this.zxt=void 0,this.Gxt=void 0,this.Xxt=void 0,this.jxt=void 0,this.Qxt=t,this.qxt=new PW(t.map(function(t){return t.Mxt})),this.zxt=new PW(t.map(function(t){return t.Lxt})),this.Gxt=new PW(t.map(function(t){return t.Bxt})),this.Xxt=new PW(t.map(function(t){return t.Nxt})),this.jxt=new PW(t.map(function(t){return t.bct}))}return t.prototype.Rxt=function(i){var n=this;if(0===this.Qxt.length)return i(this);var r=[],e=0,s=function(u){return r.push(u),++e0)return b.max(0,t.Tn(0)-300)}return 0},n.E9=function(i,n,r,e,s,u,o,h){return void 0===u&&(u=!1),void 0===o&&(o=EH.$St),void 0===h&&(h=!1),h||(h=this.ct===1/0&&Bi.w_&&Bi.b_<3&&i<=this.zx),t.prototype.E9.call(this,i,n,r,e,s,u,o,h)},n.hr=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return n.sent(),this.ePt=void 0,this.PL.tPt=0,[2]}})}).call(this)},n.kn=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.PL.zg()];case 2:return n.sent(),[4,this.Nq.Dq(this.PL)];case 3:return n.sent(),[2]}})}).call(this)},i.US=function(t){var i;return(!t||"google-dai"!==(null==t||null==(i=t.ssai)?void 0:i.integration))&&(Bi.w_&&Bi.b_<4)},i}(OW);U(),Et(),Wt(),Pt(),Qt(),U(),Et(),Wt(),Pt(),H(),Qt(),U(),Et(),xt(),Pt(),U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et(),xt(),Pt();var QW=function(t){function i(i){return t.call(this,i)||this}return Ct(i,t),Nt(i,[{key:"Zrt",get:function(){return this.PL}},{key:"DP",get:function(){return this.PL.DP}},{key:"MP",get:function(){return this.PL.MP}}]),i}(RO);U(),Et(),Wt(),Pt(),Qt(),U(),Et(),Wt(),Pt(),Qt(),U(),Et(),Wt(),Pt(),Ft(),Qt();var YW=function(t){function i(i){var n;return(n=t.call(this,i)||this).C3=void 0,n.nPt=void 0,n.ZY=0,n.rPt=EA.rL(),n.ZS=void 0,n.hPt=EA.rL(),n.cPt=[],n.yPt=!1,n.KY=0,n.ZS=i.Cd,n}Ct(i,t);var n=i.prototype;return n.Vrt=function(){return this.nPt?this.ZY:t.prototype.Vrt.call(this)},n.Hrt=function(i){this.nPt?this.ZY=i:t.prototype.Hrt.call(this,i)},n.Ux=function(){return this.nPt?this.rPt:t.prototype.Ux.call(this)},n.NS=function(){return this.nPt?this.ZS:t.prototype.NS.call(this)},n.qrt=function(){return this.nPt?this.hPt:t.prototype.qrt.call(this)},n.zrt=function(){return this.nPt?this.KY:t.prototype.zrt.call(this)},n.Grt=function(i){this.nPt?this.KY=i:t.prototype.Grt.call(this,i)},n.Q2=function(t,i,n){var r=this;return this.K2(function(n){return r.oPt(t,i,n)},n)},n.oPt=function(i,n,r){return t.prototype.Q2.call(this,i,n,r)},n.j3=function(){var t=this;return this.K2(function(){return t.aPt()})},n.aPt=function(){return t.prototype.j3.call(this)},n.J2=function(t,i,n){var r=this;return this.K2(function(n){return r.uPt(t,i,n)},n)},n.uPt=function(i,n,r){return t.prototype.J2.call(this,i,n,r)},n.G3=function(t,i){this.nPt?(this.hPt=this.hPt.HM(new EA([t,i])),this.cPt.push({Km:"_ct",CO:t,RO:i})):this.dPt(t,i)},n.dPt=function(i,n){t.prototype.G3.call(this,i,n)},n.f3=function(t,i){var n=this;return this.K2(function(){return n.lPt(t,i)})},n.lPt=function(i,n){return t.prototype.f3.call(this,i,n)},n.X3=function(t,i){this.nPt?(this.hPt=this.hPt.qM(new EA([t,i])),this.cPt.push({Km:"pS",CO:t,RO:i})):this.fPt(t,i)},n.fPt=function(i,n){t.prototype.X3.call(this,i,n)},n.pS=function(t,i,n){var r=this;return this.K2(function(n){return r.vPt(t,i,n)},n)},n.vPt=function(i,n,r){return t.prototype.pS.call(this,i,n,r)},n.RZ=function(t){var i=this;return this.K2(function(){return i._Pt(t)})},n._Pt=function(i){return t.prototype.RZ.call(this,i)},n.K2=function(t,i){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:this.A3(),n.label=1;case 1:return this.nPt?[4,gr(this.nPt.Yy,i)]:[3,3];case 2:return n.sent(),this.A3(),[3,1];case 3:dr(i),n.label=4;case 4:return n.trys.push([4,,6,7]),this.C3=t(i),[4,this.C3];case 5:return n.sent(),[3,7];case 6:return this.C3=void 0,[7];case 7:return[2]}})}).call(this)},n.A3=function(){if(this.C3)throw new y("Internal error")},n.gPt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:if(this.nPt)throw new p("Already locked");return this.nPt=new Va,this.pPt(),this.C3?[4,this.C3.catch(dn)]:[3,2];case 1:t.sent(),this.pPt(),t.label=2;case 2:return[2]}})}).call(this)},n.mPt=function(){var t=this.nPt;void 0!==t&&(t.Qy(),this.nPt=void 0,this.wPt())},n.pPt=function(){this.ZS=t.prototype.NS.call(this),this.ZY=t.prototype.Vrt.call(this),this.KY=t.prototype.zrt.call(this),this.rPt=t.prototype.Ux.call(this),this.hPt=t.prototype.qrt.call(this),this.yPt=!1},n.wPt=function(){this.A3(),t.prototype.Hrt.call(this,this.ZY),t.prototype.Grt.call(this,this.KY);var i=this.cPt.slice();Yn(this.cPt);for(var n,r=Lt(i);!(n=r()).done;){var e=n.value;"_ct"===e.Km?this.dPt(e.CO,e.RO):this.fPt(e.CO,e.RO)}this.rPt.KM(t.prototype.Ux.call(this))||this.So(new rh(HR.pZ))},n.zg=function(){var i;null==(i=this.nPt)||i.Zg(),this.nPt=void 0,t.prototype.zg.call(this)},i}(AO),KW=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).wE=void 0,r.bPt=void 0,r.wE=i,r}Ct(i,t);var n=i.prototype;return n.Ux=function(){var i,n;return t.prototype.Ux.call(this).HM(null!=(n=null==(i=this.bPt)?void 0:i.Fx)?n:EA.rL())},n.qrt=function(){var i,n;return t.prototype.qrt.call(this).HM(null!=(n=null==(i=this.bPt)?void 0:i.W3)?n:EA.rL())},n.Hrt=function(i){t.prototype.Hrt.call(this,i),this.bPt&&(this.bPt.zY=i)},n.Grt=function(i){t.prototype.Grt.call(this,i),this.bPt&&(this.bPt.VY=i)},n.dPt=function(i,n){t.prototype.dPt.call(this,i,n),this.bPt&&this.bPt.G3(i,n)},n.fPt=function(i,n){t.prototype.fPt.call(this,i,n),this.bPt&&this.bPt.X3(i,n)},n.vPt=function(i,n,r){var e=this;return Vt(function(){var s;return zt(this,function(u){switch(u.label){case 0:return dr(r),(s=[]).push(t.prototype.vPt.call(e,i,n,r)),this.bPt&&s.push(this.bPt.pS(i,n,r)),[4,ut.all(s)];case 1:return u.sent(),[2]}})}).call(this)},n.IZ=function(i){return!!t.prototype.IZ.call(this,i)||this.wE.APt(i)},n._Pt=function(i){return t.prototype.IZ.call(this,i)?t.prototype._Pt.call(this,i):this.wE.SPt(i)},n.TPt=function(t){var i,n;null==(i=this.bPt)||i.mn(WR,this.Xrt),this.bPt=t,null==(n=this.bPt)||n.wn(WR,this.Xrt)},i}(YW),JW=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).wE=void 0,r.kPt=void 0,r.Zb=NaN,r.RPt=!1,r.DPt=!1,r.NPt=void 0,r.Brt(n),r.wE=i,r}Ct(i,t);var n=i.prototype;return n.IZ=function(i){return!!yN(this,i)&&(!!t.prototype.IZ.call(this,i)||(!(!this.kPt||!this.kPt.IZ(i))||this.wE.EPt(i)))},n.RZ=function(i){var n=this;return Vt(function(){return zt(this,function(r){switch(r.label){case 0:return t.prototype.IZ.call(n,i)?[4,t.prototype.RZ.call(n,i)]:[3,2];case 1:case 3:case 6:return[2,r.sent()];case 2:return this.kPt&&this.kPt.IZ(i)?(this.xPt(),[4,this.RZ(i)]):[3,4];case 4:return[4,this.wE.PPt(i)];case 5:return r.sent(),[4,this.RZ(i)];case 7:return[2]}})}).call(this)},n.APt=function(t){return this.IZ(this.IPt(t))},n.SPt=function(t){return this.RZ(this.IPt(t))},n.IPt=function(t){var i=this.Cd,n=i.q4.map(function(i){return Wv(t.GT)&&Wv(i.GT)||zv(t.GT)&&zv(i.GT)?t:i});return Yu({},i,{q4:n})},n.W4=function(i,n,r,e){t.prototype.W4.call(this,i,n,r,e),this.kPt&&this.kPt.W4(i,n,r,e)},n.CPt=function(){return!this.RPt&&this.DPt},n.Nd=function(){return void 0!==this.NPt?this.NPt:this.CPt()?this.Zb:t.prototype.Nd.call(this)},n.F4=function(i){this.Zb=i,this.NPt=void 0,this.CPt()||t.prototype.F4.call(this,i)},n.Nrt=function(){return!this.CPt()&&t.prototype.Nrt.call(this)},n.F3=function(){this.NPt=b.max(ZW(this.aq.e4),ZW(this.aq.s4)),this.CPt()||t.prototype.F3.call(this)},n.I3=function(){this.NPt=void 0,this.CPt()||t.prototype.I3.call(this)},n.Lrt=function(t){return new KW(this,t)},n.BPt=function(){this.RPt=!this.RPt},n.xPt=function(){var t=this.aq,i=this.kPt;i&&(this.RPt=!this.RPt,this.Brt(i),this.MPt(t),this.CPt()&&this.LPt())},n.MPt=function(t){var i,n;this.kPt=t,null==(i=this.B4)||i.TPt(null==t?void 0:t.e4),null==(n=this.M4)||n.TPt(null==t?void 0:t.s4)},n.OPt=function(t){var i=this.aq,n=this.kPt;if(n){var r=this.RPt,e=r?i:n,s=(r?n:i).Fx.iL(t);if(s){var u=XO(e.Fx,this.qrt()).iL(s.An(0),ve);if(u&&!(s.An(0)+ve>=u.An(0)))return b.max(s.An(0),u.Tn(0))}}},n.FPt=function(t,i){var n=this;if(this.DPt)return ut.resolve();var r=this.RPt?this.kPt:this.aq;return r?(this.DPt=!0,this.UPt(function(i){if(dr(i),n.DPt)return function(t,i,n){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return dr(n),r=[],t.e4&&r.push(aP(t.e4,i,n)),t.s4&&r.push(aP(t.s4,i,n)),[4,ut.all(r)];case 1:return e.sent(),t.F3(),[2]}})})()}(r,t,i)},i)):ut.resolve()},n.LPt=function(){if(this.DPt){var t=this.RPt?this.kPt:this.aq;if(t){var i;0,this.DPt=!1;var n=null!=(i=this.NPt)?i:this.Zb;t.ct0?i.An(i.V-1):0}var $W=function(t){function i(i,n,r){var e;return(e=t.call(this,i)||this).WPt=void 0,e.Gl=void 0,e.iV=void 0,e.qPt=!1,e.Y8=void 0,e.x9=NaN,e.Ho=EA.rL(),e.Cz=!0,e.tIt=!1,e.kz=!0,e.jPt=void 0,e.KPt=void 0,e.GPt=void 0,e.zPt=new hr,e.T9=new hr,e.WPt=n,e.jPt=i,e.PL.be(),e.WPt.we(),e.iV=new HW(e,r),e.Gl=new Rb([e.iV.nt,t.prototype.RP.call(LW(e))]),e}Ct(i,t);var n=i.prototype;return n.Ux=function(){return t.prototype.Ux.call(this).HM(this.WPt.Fx)},n.Nd=function(){if(!this.qPt){var i=this.aq;if(i&&MR(i))return i.ct}return t.prototype.Nd.call(this)},n.tht=function(){return!!t.prototype.tht.call(this)&&!(!this.qPt&&!this.jZ())},n.iht=function(){return!!t.prototype.iht.call(this)&&!(!this.qPt&&t.prototype.tht.call(this)&&!this.jZ())},n.jZ=function(){var t=this.aq;return!(!t||!MR(t))&&t.jZ},n.mP=function(){return this.Ho.HM(this.PL.pP)},n.EP=function(){return t.prototype.EP.call(this).HM(this.WPt.kP)},n.TP=function(){return t.prototype.TP.call(this)},n.$rt=function(){var i;return null!=(i=t.prototype.$rt.call(this))?i:this.WPt.uq},n.QP=function(){return this.Cz=!1,t.prototype.QP.call(this)},n.jP=function(){this.Cz=!0,t.prototype.jP.call(this)},n.G7=function(){this.qPt=!0,t.prototype.G7.call(this),this.WPt.G7()},n.X7=function(){this.qPt=!1,t.prototype.X7.call(this),this.WPt.G7()},n.Gx=function(){var i;return null!=(i=this.Y8)?i:t.prototype.Gx.call(this)},n.PP=function(){return void 0!==this.Y8||t.prototype.PP.call(this)},n.Oy=function(t,i,n){void 0===i&&(i=!1),void 0===n&&(n=!1),this.zPt.Zg(),this.T9.Zg(),this.T9=new hr,this.GPt=_r(this.E9(t,i,n,this.GPt,this.T9.Yg),this.T9).catch(dn)},n.E9=function(i,n,r,e,s){var u=this;return Vt(function(){return zt(this,function(o){switch(o.label){case 0:return this.Y8=i,this.x9=i,this.So(new wT(i)),e?[4,e.catch(dn)]:[3,2];case 1:o.sent(),o.label=2;case 2:return dr(s),this.aq&&MR(this.aq)&&this.aq.LPt(),this.Y8=void 0,t.prototype.Oy.call(u,i,n,r),this.WPt.Oy(i,n,r),this.XPt(),[2]}})}).call(this)},n.$W=function(t){var i=this.uq;if(i&&!S(i.getTime())){var n=(t.getTime()-i.getTime())/1e3;this.Oy(n)}},n.K7=function(){t.prototype.K7.call(this),this.WPt.K7()},n.we=function(){this.kz&&(this.kz=!1,this.jPt.we())},n.be=function(){this.kz||(this.kz=!0,this.jPt.be())},n.QPt=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.Y8=void 0,this.x9=NaN,this.Ho=EA.rL(),null==(t=this.KPt)||t.Zg(),this.zPt.Zg(),this.T9.Zg(),this.GPt?[4,this.GPt.catch(dn)]:[3,2];case 1:i.sent(),this.GPt=void 0,i.label=2;case 2:return[2]}})}).call(this)},n.hht=function(i){t.prototype.hht.call(this,i),this.WPt.Rq=i},n.oht=function(i){t.prototype.oht.call(this,i),this.WPt.J7=i},n.RP=function(){return this.Gl},n.sI=function(t,i,n,r,e,s,u,o){return this.iV.sI(t,i,n,r,e,s,u,o)},n.Tq=function(t){return this.iV.Tq(t)},n.bq=function(t,i,n,r,e){throw new y("Not implemented yet")},n.wq=function(){return!1},n.rV=function(t){this.iV.rV(t)},n.Eq=function(){this.iV.hr(),t.prototype.Eq.call(this)},n.Un=function(i){var n=this;return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Un.call(n,i)];case 1:return MR(r=e.sent())&&this.XPt(),[2,r]}})}).call(this)},n.hr=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.QPt()];case 1:return n.sent(),[4,t.prototype.hr.call(i)];case 2:return n.sent(),[4,this.WPt.hr()];case 3:return n.sent(),[2]}})}).call(this)},n.F8=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.QPt()];case 1:return n.sent(),[4,t.prototype.F8.call(i)];case 2:return n.sent(),[4,this.WPt.F8()];case 3:return n.sent(),[2]}})}).call(this)},n.zg=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.QPt()];case 1:return n.sent(),this.iV.kn(),this.Gl.kn(),[4,t.prototype.zg.call(i)];case 2:return n.sent(),[2]}})}).call(this)},n.cht=function(t){return new JW(this,t)},n.uht=function(t){return new EO(t)},n.XPt=function(){this.zPt.Zg(),this.zPt=new hr,this.GPt=_r(this.YPt(this.GPt,this.zPt.Yg),this.zPt).catch(dn)},n.YPt=function(t,i){return Vt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return t?[4,t.catch(dn)]:[3,2];case 1:u.sent(),u.label=2;case 2:if(!this.aq||!MR(this.aq))return[2];u.label=3;case 3:0,dr(i),this.JPt()&&this.BPt(),n=void 0,this.aq.LPt(),dr(i),u.label=4;case 4:0,r={stack:[],error:void 0,hasError:!1},u.label=5;case 5:return u.trys.push([5,9,10,11]),dr(i),this.JPt()?[3,12]:void 0===(n=this.aq.OPt(this.Gx()))?[3,7]:(this.ZPt(),[4,this.aq.FPt(n,i)]);case 6:return u.sent(),dr(i),this.WPt.Oy(n),[3,12];case 7:return e=qt(r,hr.ep([i]),!1),[4,ut.race([this.ww(eh.py,e.Yg),this.$Pt(e.Yg)])];case 8:return u.sent(),[3,11];case 9:return s=u.sent(),r.error=s,r.hasError=!0,[3,11];case 10:return Gt(r),[7];case 11:return[3,4];case 12:dr(i),u.label=13;case 13:return this.JPt()?[3,15]:[4,this.PL.ww([eh.py,eh.Nw,Ry.AI],i)];case 14:return u.sent(),[3,13];case 15:return[3,3];case 16:return[2]}})}).call(this)},n.JPt=function(){var t=this.aq;if(void 0===t||!MR(t))return!1;var i=this.Gx(),n=this.PL.Fx;return!(!this.PL.Qx&&n.Cr(i))&&!!XO(this.WPt.Fx,t.qrt()).jM(i,i+ve)},n.BPt=function(){if(!this.tIt){0,this.tIt=!0,this.Ho=this.mP();var t=AP(this),i=this.PP(),n=this.TP(),r=this.PL,e=this.WPt,s=this.aq;s.LPt(),s.BPt(),TP(e,t),this.fht(e),this.WPt=r,r.jP(),r.oP=!0,this.tIt=!1;var u=this.PP();i!==u&&(u?this.So(new wT(this.zx)):this.So(new gT(this.zx)));var o=this.TP();n!==o&&this.So(new Py(this.zx,o)),u||this.ZPt()}},n.ZPt=function(){var t=this.PL,i=this.jPt;if(i!==t){0;var n=this.MP,r=this.DP;this.jPt=t,this.kz&&(i.we(),t.be());var e=this.MP,s=this.DP;e>0&&s>0&&(n!==e||r!==s)&&this.So(new Ey)}},n.EPt=function(t){return void 0!==this.WPt.$Z([t])},n.PPt=function(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return this.ZPt(),i=this.aq,[4,(n=this.WPt).hr()];case 1:return e.sent(),[4,n.Un(t)];case 2:return r=e.sent(),i.VPt(r),[2]}})}).call(this)},n.$Pt=function(t){return this.KPt=new Va,gr(this.KPt.Yy,t)},n.B3=function(){var t;null==(t=this.KPt)||t.Qy()},n.iI=function(i){i.type===eh.$w&&this.x9===i.currentTime||(i.type===eh.Zw&&(this.x9=NaN,this.ZPt()),i.type!==Ry.AI&&i.type!==eh.jw&&i.type!==eh.Nw||this.tIt||!this.JPt()?(i.type!==eh.Nw||this.Qx)&&t.prototype.iI.call(this,i):this.XPt())},Nt(i,[{key:"HPt",get:function(){return this.WPt}},{key:"DP",get:function(){return this.jPt.DP}},{key:"MP",get:function(){return this.jPt.MP}}]),i}(QW),tz=function(t){function i(i,n){var r;return(r=t.call(this,i,n,new YD)||this).bet=void 0,r.Aet=void 0,r.$L=void 0,r.$L=new OT(i.Sq),r.bet=new xN,r.bet.Y7(i.hq.parentElement),r.Aet=new Qx(r.bet.xe,r.Wu,r.nt,r.Ql,r.Ma,r.Sq),r}Ct(i,t);var n=i.prototype;return n.we=function(){t.prototype.we.call(this),this.bet.we()},n.be=function(){t.prototype.be.call(this),this.bet.be()},n.Y7=function(t){this.PL.Y7(t),this.WPt.Y7(t)},n.$P=function(){this.PL.$P(),this.WPt.$P()},n.zP=function(){return this.PL.zP()},n.Aa=function(){return this.$L},n.fht=function(i){var n=this.qP(),r=this.zP();t.prototype.fht.call(this,i),this.$L.OI=i.Sq,this.qP()!==n&&this.So(new PT),this.zP()!==r&&this.So(new DT)},n.zg=function(){return this.$L.kn(),this.Aet.kn(),this.bet.kn(),t.prototype.zg.call(this)},Nt(i,[{key:"Zrt",get:function(){return this.PL}},{key:"HPt",get:function(){return this.WPt}},{key:"hq",get:function(){return this.PL.hq}},{key:"d5",get:function(){return this.PL.d5}},{key:"WP",get:function(){return this.PL.WP},set:function(t){this.PL.WP=t}}]),i}($W),iz=function(t){function i(){return t.apply(this,arguments)||this}Ct(i,t);var n=i.prototype;return n.Yq=function(i){if(i===eg.Mk){var n=t.prototype.Yq.call(this,i),r=t.prototype.Yq.call(this,i);return new tz(n,r)}return t.prototype.Yq.call(this,i)},n.Dq=function(i){var n=this,r=function(){return t.prototype.Dq};return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return V(i,tz)?[4,i.zg()]:[3,4];case 1:return t.sent(),[4,r().call(n,i.Zrt)];case 2:return t.sent(),[4,r().call(n,i.HPt)];case 3:return t.sent(),[3,6];case 4:return[4,r().call(n,i)];case 5:t.sent(),t.label=6;case 6:return[2]}})})()},i}(mO),nz=function(t){function i(i,n,r,e,s,u,o){var h,a=new xO(new iz(s)),c=a.Yq(u);return(h=t.call(this,i,n,r,e,c,o)||this).Nq=void 0,h.Nq=a,h}return Ct(i,t),i.prototype.kn=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.Nq.Dq(this.PL)];case 2:return n.sent(),[2]}})}).call(this)},i.US=function(t){var i;return!Bi.Ks&&!Bi.og&&!(t&&"google-dai"===(null==(i=t.ssai)?void 0:i.integration))},i}(OW);U(),Et(),Wt(),Pt(),Qt(),U(),Et(),Wt(),Pt(),Qt(),U(),Et(),Wt(),Pt(),Qt();var rz=function(t){function i(i){var n;return(n=t.call(this,i)||this).iIt=!1,n.rPt=EA.rL(),n.ZS=void 0,n.Zb=0,n.eIt=!1,n.Wet=!1,n.yPt=void 0,n.H4=EA.rL(),n.sIt=void 0,n.Brt(i),n.ZS=i.Cd,n}Ct(i,t);var n=i.prototype;return n.Lrt=function(t){return new YW(t)},n.NS=function(){return this.iIt?this.ZS:t.prototype.NS.call(this)},n.Ux=function(){return this.iIt?this.rPt:t.prototype.Ux.call(this)},n.Nd=function(){return this.iIt?this.Zb:t.prototype.Nd.call(this)},n.F4=function(i){this.iIt?(this.Zb=i,this.eIt=!0):t.prototype.F4.call(this,i)},n.EP=function(){return this.iIt?this.sIt?this.sIt.J3():this.H4:t.prototype.EP.call(this)},n.W4=function(i,n,r,e){this.iIt?this.sIt=new oP(i,n,r,e):t.prototype.W4.call(this,i,n,r,e)},n.Nrt=function(){return this.iIt?this.Wet&&!1!==this.yPt:t.prototype.Nrt.call(this)},n.F3=function(){this.iIt?this.yPt=!0:t.prototype.F3.call(this)},n.I3=function(){this.iIt?this.yPt=!1:t.prototype.I3.call(this)},n.IZ=function(i){return!this.iIt&&t.prototype.IZ.call(this,i)},n.RZ=function(i){return this.iIt?ut.reject(new p("Not supported")):t.prototype.RZ.call(this,i)},n.gPt=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:if(this.iIt)throw new p("Already locked");return this.iIt=!0,this.pPt(),t=[],this.B4&&t.push(this.B4.gPt()),this.M4&&t.push(this.M4.gPt()),[4,ut.all(t)];case 1:return i.sent(),[2]}})}).call(this)},n.mPt=function(){this.iIt=!1,this.B4&&this.B4.mPt(),this.M4&&this.M4.mPt(),this.wPt()},n.pPt=function(){this.ZS=t.prototype.NS.call(this),this.rPt=t.prototype.Ux.call(this),this.Zb=t.prototype.Nd.call(this),this.H4=t.prototype.EP.call(this),this.eIt=!1,this.yPt=void 0,this.sIt=void 0},n.wPt=function(){if(this.eIt&&(t.prototype.F4.call(this,this.Zb),this.eIt=!1),void 0!==this.sIt){var i=this.sIt;t.prototype.W4.call(this,i.Tn,i.An,i.Z3,i.t4),this.sIt=void 0}void 0!==this.yPt&&(this.yPt?t.prototype.F3.call(this):t.prototype.I3.call(this),this.yPt=void 0)},i}(kO),ez=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).rIt=!1,i.oIt=!1,i.lIt=void 0,i.dIt=void 0,i.cIt=new hr,i}Ct(i,t);var n=i.prototype;return n.QP=function(){return void 0!==this.aq&&MR(this.aq)&&this.Qx&&this.Oy(0),t.prototype.QP.call(this)},n.Oy=function(i,n,r){void 0!==this.aq&&MR(this.aq)&&this.Qx&&i0){i=a.tracks[0],n=a;break}}if(Li(i))break}return(Xi(null==n?void 0:n.initPattern)||Xi(null==i?void 0:i.initPattern))&&!Xi(null==i?void 0:i.initializationPattern)&&!Xi(null==n?void 0:n.initializationPattern)}(e=r)&&(e=function(t){return Yu({},t,{availabilityDuration:{value:t.dvrDuration?t.dvrDuration.duration/t.dvrDuration.timescale:0},manifestVersion:"1.0.0",presentations:t.presentations.map(fz),contentBaseUrl:t.contentBaseUrl||"./"})}(e)),[2,e]}})}).call(this)},t}();U(),Et(),xt(),Pt();var Rz=function(t){function i(i){var n;return(n=t.call(this)||this).hu=void 0,n.gIt=void 0,n.gIt=i,n}Ct(i,t);var n=i.prototype;return n.dC=function(){return this.gIt.dC()},n.wn=function(t,i){this.gIt.wn(t,i)},n.mn=function(t,i){this.gIt.mn(t,i)},Nt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=nA(this)),this.hu}},{key:"hC",get:function(){return this.gIt.hC}},{key:"oC",get:function(){return this.gIt.oC}},{key:"aC",get:function(){return this.gIt.aC}},{key:"uC",get:function(){return this.gIt.uC}},{key:"cC",get:function(){return this.gIt.cC}}]),i}(th);U(),Et(),xt(),Ft(),U(),Et(),xt(),U(),Et(),xt();var Cz=function(){function t(t){this.pIt=void 0,this.wIt=0,this.mIt=0,this.pIt=b.exp(b.log(.5)/t)}var i=t.prototype;return i.Gat=function(t,i){var n=b.pow(this.pIt,t),r=i*(1-n)+n*this.wIt;S(r)||(this.wIt=r,this.mIt+=t)},i.RZ=function(t){var i=b.exp(b.log(.5)/t);if(i!==this.pIt)if(0!==this.mIt){var n=this.Fet,r=1-b.pow(i,this.mIt);this.wIt=n*r,this.pIt=i}else this.pIt=i},Nt(t,[{key:"Fet",get:function(){var t=1-b.pow(this.pIt,this.mIt);return this.wIt/t}}]),t}(),Pz=function(){function t(i,n,r,e){void 0===i&&(i=t.RIt),void 0===n&&(n=t.DIt),void 0===r&&(r=t.$at),void 0===e&&(e=!1),this.yIt=void 0,this.bIt=void 0,this.EIt=0,this.xIt=[],this.TIt=void 0,this.kIt=6e4,this.PIt=10,this.IIt=void 0,this.CIt=void 0,this.AIt=void 0,this.SIt=void 0,this.IIt=i,this.CIt=n,this.AIt=r,this.SIt=e,this.yIt=new Cz(i),this.bIt=new Cz(n)}var i=t.prototype;return i.Gat=function(t){var i=Ui.Mg(),n=t;this.SIt&&void 0!==this.TIt&&i-this.TIt>=this.kIt&&this.hr(),this.EIt+=1,this.yIt.Gat(1,n),this.bIt.Gat(1,n),this.xIt.push(n),this.xIt.length>this.PIt&&this.xIt.shift(),this.TIt=i},i.Zat=function(){return void 0!==this.TIt&&Ui.Mg()-this.TIt<=this.kIt},i.hr=function(){this.yIt=new Cz(this.IIt),this.bIt=new Cz(this.CIt),this.EIt=0,this.xIt=[],this.TIt=void 0},Nt(t,[{key:"Fet",get:function(){return this.Zat()?b.max(this.yIt.Fet,this.bIt.Fet):this.AIt}}]),t}();Pz.RIt=2,Pz.DIt=5,Pz.$at=.1,U(),Et(),Ft();var Dz=function(){function t(t){this.NIt=void 0,this.NIt=t}var i=t.prototype;return i.DY=function(t){for(var i,n=Lt(this.NIt);!(i=n()).done;){i.value.DY(t)}},i.NY=function(t){for(var i,n=Lt(this.NIt);!(i=n()).done;){i.value.NY(t)}},i.BY=function(t,i){for(var n,r=Lt(this.NIt);!(n=r()).done;){n.value.BY(t,i)}},i.MY=function(t){for(var i,n=Lt(this.NIt);!(i=n()).done;){i.value.MY(t)}},t}();U(),Et();var Nz=function(){function t(t){this.MIt=void 0,this.BIt=0,this.MIt=t}var i=t.prototype;return i.DY=function(t){this.BIt=t},i.NY=function(t){this.MIt.Gat(t-this.BIt)},i.BY=function(t){},i.MY=function(t){},t}();U(),Et();var xz=function(){function t(t){this.eut=void 0,this.LIt=0,this.eut=t}var i=t.prototype;return i.NY=function(t){this.LIt=t},i.BY=function(t,i){this.eut.Gat(t-this.LIt,i.byteLength),this.LIt=t},i.MY=function(t){},i.DY=function(t){},t}();U(),Et(),Pt();var Bz=function(){function t(t,i){void 0===i&&(i=0),this.eut=void 0,this.VIt=void 0,this.FIt=new Oz,this.En=0,this.OIt=0,this.eut=t,this.VIt=i}var i=t.prototype;return i.DY=function(t){},i.BY=function(t,i){var n=i.byteLength,r=this.OIt;this.OIt=n;var e=t-this.En;this.En=t,this.FIt.E$(i);var s=!this.FIt.UIt(),u=n>=this.VIt;r!==Ui.Zs.Sp&&s&&u&&this.eut.Gat(e,n)},i.NY=function(t){this.En=t},i.MY=function(t){},t}(),Oz=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).WIt=void 0,i.HIt=!1,i}Ct(i,t);var n=i.prototype;return n.UIt=function(){return this.HIt},n.E$=function(i){this.HIt=!1,t.prototype.E$.call(this,i)},n.T$=function(i,n){this.WIt&&this.WIt!==hm.WR||(this.HIt=!0),t.prototype.T$.call(this,i,n),this.WIt=i},n.L$=function(t){return!1},n.F$=function(t){},n.V$=function(t){},i}(rC);U(),Et(),Pt();var Mz=function(t){return t.qIt="sample",t}({}),Lz=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).zIt=0,i}return Ct(i,t),i.prototype.vW=function(){if(this.Zat()){var t=Ui.Mg();t-this.zIt>1e3&&(this.zIt=t,bb.Bg.vW(this.Fet))}},i}(th);U(),Et(),xt(),Pt();var Fz=function(t){function i(i){var n;return(n=t.call(this)||this).GIt=void 0,n.bA=[],n.wIt=void 0,n.jIt=0,n.GIt=i,n.wIt=i,n}Ct(i,t);var n=i.prototype;return n.Zat=function(){return this.bA.length>=3},n.Gat=function(t,i){if(0!==t){var n={IW:8*i/t,XIt:i};if(this.bA.push(n),this.jIt+=n.XIt,this.bA.length>30){var r=this.bA.shift();this.jIt-=r.XIt}for(var e=this.bA.slice().sort(function(t,i){return t.IW-i.IW}),s=0,u=0;u=.5)break}this.vW(),this.So(new rh(Mz.qIt))}},Nt(i,[{key:"Fet",get:function(){return this.Zat()?this.wIt:this.GIt}}]),i}(Lz);U(),Et(),xt(),Pt();var Uz=function(t){function i(n,r,e,s){var u;return void 0===n&&(n=i.RIt),void 0===r&&(r=i.DIt),void 0===e&&(e=i.YIt),void 0===s&&(s=i.$at),(u=t.call(this)||this).yIt=void 0,u.bIt=void 0,u.QIt=0,u.AIt=void 0,u.KIt=void 0,u.KIt=e,u.yIt=new Cz(n),u.bIt=new Cz(r),u.AIt=s,u}Ct(i,t);var n=i.prototype;return n.Gat=function(t,i){var n=8*i/t;this.yIt.Gat(t,n),this.bIt.Gat(t,n),this.QIt+=i,this.vW(),this.So(new rh(Mz.qIt))},n.Zat=function(){return this.QIt>=this.KIt},Nt(i,[{key:"Fet",get:function(){return this.Zat()?b.min(this.yIt.Fet,this.bIt.Fet):this.AIt}}]),i}(Lz);Uz.YIt=128e3,Uz.$at=kb,Uz.RIt=.5,Uz.DIt=5;var Vz=function(){function t(t,i){var n=this;this.eut=void 0,this.tCt=[],this.sCt=void 0,this.eCt=void 0,this.ZIt=function(){for(var t,i=Lt(n.tCt);!(t=i()).done;){(0,t.value)()}},this.eCt=t>0?t:Uz.$at,this.sCt=new Pz(Pz.RIt,Pz.DIt,i>0?i:Pz.$at),this.JIt(this.eCt)}var i=t.prototype;return i.JIt=function(t){var i;null==(i=this.eut)||i.mn(Mz.qIt,this.ZIt),this.eut=new Fz(t),this.eut.wn(Mz.qIt,this.ZIt)},i.$It=function(t){this.tCt.push(t)},i.iCt=function(t){Xn(this.tCt,t)},i.DW=function(t){if("segment"===t.Km&&"video"===t.Gk){var i=[new Nz(this.sCt)];return this.eut&&("stream"===t.fk&&"initialization-segment"!==t.zk?i.push(new Bz(this.eut,1e3)):i.push(new xz(this.eut))),new Dz(i)}},Nt(t,[{key:"IW",get:function(){var t,i;return null!=(i=null==(t=this.eut)?void 0:t.Fet)?i:this.eCt}},{key:"RW",get:function(){return this.sCt.Fet}}]),t}();U(),Et(),xt();var Hz=function(){function t(){this.rCt=void 0,this.oCt=void 0,this.dCt=void 0,this.uCt=void 0}var i=t.prototype;return i.nCt=function(t,i){var n=i-t;(!this.rCt||n=.4?[4,this.xCt(n)]:[3,5];case 5:return[2]}})}).call(this)},n.J2=function(t,i){return Vt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(this.yCt)throw new y("Concurrent appends are not supported.");o.label=1;case 1:o.trys.push([1,,8,9]),n={stack:[],error:void 0,hasError:!1},o.label=2;case 2:return o.trys.push([2,5,6,7]),r=qt(n,hr.ep([i,this.D3.Yg]),!1),e=r.Yg,this.bCt=new Va,[4,this.xCt(e)];case 3:return o.sent(),[4,this.Wrt.J2({Km:zR.wZ,lk:t},{},e)];case 4:return o.sent(),this.Wrt.V3===eg.Mk&&this.ECt.ght(t),[3,7];case 5:return s=o.sent(),n.error=s,n.hasError=!0,[3,7];case 6:return Gt(n),[7];case 7:return[3,9];case 8:return u=this.bCt,this.bCt=void 0,null==u||u.Qy(),[7];case 9:return[2]}})}).call(this)},n.pS=function(t,i,n){return Vt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(this.yCt)throw new y("Concurrent appends are not supported.");h.label=1;case 1:h.trys.push([1,,8,9]),r={stack:[],error:void 0,hasError:!1},h.label=2;case 2:return h.trys.push([2,5,6,7]),e=qt(r,hr.ep([n,this.D3.Yg]),!1),s=e.Yg,this.bCt=new Va,[4,this.xCt(s)];case 3:return h.sent(),[4,this.Wrt.pS(t,i,s)];case 4:return h.sent(),this.wCt.gCt(EA.nL(t,i)),[3,7];case 5:return u=h.sent(),r.error=u,r.hasError=!0,[3,7];case 6:return Gt(r),[7];case 7:return[3,9];case 8:return o=this.bCt,this.bCt=void 0,null==o||o.Qy(),[7];case 9:return[2]}})}).call(this)},n.EQ=function(t){return Vt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:if(this.yCt)throw new y("Concurrent appends are not supported.");u.label=1;case 1:u.trys.push([1,,7,8]),i={stack:[],error:void 0,hasError:!1},u.label=2;case 2:return u.trys.push([2,4,5,6]),n=qt(i,hr.ep([t,this.D3.Yg]),!1),r=n.Yg,this.bCt=new Va,[4,this.xCt(r)];case 3:return u.sent(),[3,6];case 4:return e=u.sent(),i.error=e,i.hasError=!0,[3,6];case 5:return Gt(i),[7];case 6:return[3,8];case 7:return s=this.bCt,this.bCt=void 0,null==s||s.Qy(),[7];case 8:return[2]}})}).call(this)},n.xCt=function(t){return Vt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:i=Lt(this.mCt),u.label=1;case 1:return(n=i()).done?[3,4]:(r=n.value,e=r[0],s=r[1],[4,this.Wrt.Q2({Km:zR.wZ,lk:e},s,t)]);case 2:u.sent(),u.label=3;case 3:return[3,1];case 4:return Yn(this.mCt),[2]}})}).call(this)},n.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:this.D3.zg(),t.label=1;case 1:return this.yCt?[4,this.ACt]:[3,3];case 2:return t.sent(),[3,1];case 3:return[2]}})}).call(this)},Nt(i,[{key:"Fx",get:function(){for(var t,i=EA.rL(),n=Lt(this.mCt);!(t=n()).done;){var r=t.value[1],e=r.Get+r.EU,s=e+r.ct;i=i.HM(EA.nL(e,s))}return this.Wrt.Fx.HM(i)}},{key:"yCt",get:function(){return void 0!==this.bCt}},{key:"ACt",get:function(){return this.bCt?this.bCt.Yy:ut.resolve()}}]),i}(th);U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et(),Wt(),Qt();var Zz=function(){function t(t){this.ICt=0,this.CCt=void 0,this.CCt=t}var i=t.prototype;return i.PCt=function(t,i){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:if(this.ICt>=this.CCt.maxRetries)throw t;return[4,Ar(this.RCt(this.ICt++),i)];case 1:return n.sent(),[2]}})}).call(this)},i.RCt=function(t){var i=0;return 0!==t&&(i+=b.min(this.CCt.maximumBackoff,this.CCt.minimumBackoff*b.pow(2,t-1))),i},t}();U(),Et(),Pt(),U(),Et(),Pt();var $z=function(t){return t.DCt="emsgdata",t}({}),tX=function(t){function i(i,n){var r;return(r=t.call(this,"emsgdata")||this).value=void 0,r.data=void 0,r.value=i,r.data=n,r}return Ct(i,t),i}(rh);U(),Et();var iX=function(){function t(){this.iZ=void 0}var i=t.prototype;return i.start=function(t){this.iZ=t},i.NCt=function(t){this.iZ.enqueue(t)},t}();U(),Et(),U(),Et();var nX=function(t){return t.BCt="initdata",t.MANIFEST_UPDATE="manifestupdate",t.MCt="timestamps:v1",t}({});function rX(t){if("urn:theo:hesp:2020"===t.sM){var i=t.XE;if(i===nX.BCt)return function(t){if(t&&Wi(t)){var i=t;if(Qi(i.index)&&Qi(i.offset)&&!(i.index<0&&i.offset<0))return{Km:"initdata",index:i.index,offset:i.offset}}}(JSON.parse(fa(_a(t.hM),new Ta)));if(i===nX.MANIFEST_UPDATE)return function(t){if(t&&Wi(t)){var i=t;if(!Li(i.url)||Xi(i.url))return{Km:"manifestupdate",url:i.url}}}(JSON.parse(fa(_a(t.hM),new Ta)));if(i===nX.MCt){var n,r=_a(t.hM),e=new Ta,s=jh(r,e).toNumber()/t.jD,u=jh(r,e).toNumber()/1e3,o=qh(r,e)/1e3;return e.ac+8<=r.byteLength&&(n={hours:qh(r,e),minutes:Wh(r,e),seconds:Wh(r,e),frames:zh(r,e)}),{Km:nX.MCt,LCt:s,OCt:u,FCt:o,UCt:n}}}}var eX=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).VCt=new th,i}Ct(i,t);var n=i.prototype;return n.transform=function(t){if(t.Km===hm.zR)try{var i=rX(km.VD(t.lk));i&&this.VCt.So(new tX(i.Km,i))}catch(t){false}this.NCt(t)},n.zg=function(){this.VCt.Vo()},i}(iX);U(),Et(),Pt();var sX=function(){function t(){this.HCt=void 0}var i=t.prototype;return i.start=function(t){this.HCt=new uX(t)},i.transform=function(t){this.HCt.E$(t)},i.flush=function(){this.HCt.P$()},t}(),uX=function(t){function i(i){var n;return(n=t.call(this)||this).iZ=void 0,n.iZ=i,n}Ct(i,t);var n=i.prototype;return n.L$=function(t){return!0},n.F$=function(t){this.iZ.enqueue(t)},n.V$=function(t){},i}(rC);U(),Et(),Wt(),Pt(),Qt(),U(),Et();var oX=ue.fromNumber(bn);var hX=function(t){function i(i,n){var r;return(r=t.call(this)||this).aV=void 0,r.WCt=void 0,r.aV=i,r.WCt=n,r}return Ct(i,t),i.prototype.vk=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:0,n.label=1;case 1:return n.trys.push([1,3,,5]),[4,this.aV.vk(t)];case 2:return[2,n.sent()];case 3:if(vr(i=n.sent()))throw i;return[4,this.WCt.PCt(i,t.Yg)];case 4:return n.sent(),[3,5];case 5:return[3,0];case 6:return[2]}})}).call(this)},i}(th);function aX(t,i,n,r,e,s,u,o){var h=new Vd;return e&&h.UT(function(t,i){return void 0===i&&(i=oX),new Vd({Range:"bytes="+t.toString()+"-"+i.toString()})}(e.start,e.end)),{Yu:t,_k:h,Xk:!1,Yg:o,Km:yl.Ak,zk:n,Gk:r,Wk:s,qk:u,fk:i,Kk:i===Ud.MT}}U(),Et(),U(),Et(),Pt(),Ft(),U(),Et();var cX,fX,vX=function(t){return t[t.INITIALIZER=0]="INITIALIZER",t[t.FRAMES=1]="FRAMES",t}({});U(),Et(),U(),Et(),function(t){t[t.NON_IDR_PICTURE=1]="NON_IDR_PICTURE",t[t.PARTITION_A_DATA=2]="PARTITION_A_DATA",t[t.PARTITION_B_DATA=3]="PARTITION_B_DATA",t[t.PARTITION_C_DATA=4]="PARTITION_C_DATA",t[t.IDR_PICTURE=5]="IDR_PICTURE",t[t.SUPPLEMENTAL_ENHANCEMENT_INFORMATION=6]="SUPPLEMENTAL_ENHANCEMENT_INFORMATION",t[t.SEQUENCE_PARAMETER_SET=7]="SEQUENCE_PARAMETER_SET",t[t.PICTURE_PARAMETER_SET=8]="PICTURE_PARAMETER_SET",t[t.ACCESS_UNIT_DELIMITER=9]="ACCESS_UNIT_DELIMITER",t[t.END_OF_SEQUENCE=10]="END_OF_SEQUENCE",t[t.END_OF_STREAM=11]="END_OF_STREAM",t[t.FILTER_DATA=12]="FILTER_DATA",t[t.SEQUENCE_PARAMETER_EXTENSION_SET=13]="SEQUENCE_PARAMETER_EXTENSION_SET",t[t.PREFIX_NAL_UNIT=14]="PREFIX_NAL_UNIT",t[t.SUBSET_SEQUENCE_PARAMETER_SET=15]="SUBSET_SEQUENCE_PARAMETER_SET",t[t.DEPTH_PARAMETER_SET=16]="DEPTH_PARAMETER_SET",t[t.CODED_SLICE_WITHOUT_PARITIONING=19]="CODED_SLICE_WITHOUT_PARITIONING",t[t.CODED_SLICE_EXTENSION=20]="CODED_SLICE_EXTENSION",t[t.CODED_SLICE_FOR_DEPTH_VIEW=21]="CODED_SLICE_FOR_DEPTH_VIEW"}(cX||(cX={})),U(),Et(),U(),Et(),U(),Et(),function(t){t[t.P=0]="P",t[t.B=1]="B",t[t.I=2]="I",t[t.SP=3]="SP",t[t.SI=4]="SI"}(fX||(fX={})),U(),Et();var dX=255,lX=[44,83,86,100,110,118,122,128,134,135,138,139,244],wX=[44,86,100,110,122,244];function gX(t){return t.separateColourPlaneFlag?0:t.chromaFormatIDC}function _X(t){return t.parsed&&t.header.type===cX.SEQUENCE_PARAMETER_SET}U(),Et(),U(),Et(),U(),Et(),U(),Et();var mX=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.emulationTracker=0,i.emulationsSkipped=0,i}return Ga(i,t),k.defineProperty(i.prototype,"skippedEmulationBytes",{get:function(){return this.emulationsSkipped},enumerable:!0,configurable:!0}),i.prototype.peekBit=function(){var i=t.prototype.peekBit.call(this);return 1===i||0===this.emulationTracker&&0!==this.location.bit?this.emulationTracker=0:22===++this.emulationTracker&&(t.prototype.skipBits.call(this,8),this.emulationsSkipped++,this.emulationTracker=0),i},i.prototype.readByte=function(){for(var t=0,i=7;i>=0;i--)t+=this.readBit()<9))return t%5}(R),P=u.readExponentialGolombCode();if(void 0===C)throw new y("Could not read the slice header slice type.");i.separateColourPlaneFlag&&(o=u.readUInt(2));var D=u.readUInt(i.log2MaxFrameNumMinus4+4);(i.frameMbsOnlyFlag||(h=u.readBool())&&(a=u.readBool()),t.header.type===cX.IDR_PICTURE&&(c=u.readExponentialGolombCode()),0===i.picOrderCntType?(f=u.readUInt(i.log2MaxPicOrderCntLsbMinus4+4),n.bottomFieldPicOrderInFramePresentFlag&&(v=u.readSignedExponentialGolombCode())):1!==i.picOrderCntType||i.deltaPicOrderAlwaysZeroFlag||(d.push(u.readSignedExponentialGolombCode()),n.bottomFieldPicOrderInFramePresentFlag?d.push(u.readSignedExponentialGolombCode()):d.push(0)),n.redundantPicCntPresentFlag&&(l=u.readExponentialGolombCode()),C===fX.B&&(w=u.readBool()),[fX.B,fX.P,fX.SP].includes(C)&&(g=u.readBool())&&(_=u.readExponentialGolombCode(),C===fX.B&&(m=u.readExponentialGolombCode())),r=t.header.type===cX.CODED_SLICE_EXTENSION||t.header.type===cX.CODED_SLICE_FOR_DEPTH_VIEW?pX(u,C,!0):pX(u,C),(n.weightedPredFlag&&(C===fX.P||C===fX.SP)||1===n.weightedBipredIdc&&C===fX.B)&&(e=function(t,i,n,r,e){var s,u=0,o=t.readExponentialGolombCode();0!==n&&(u=t.readExponentialGolombCode());var h=yX(t,n,r,o,u);return i===fX.B&&(s=yX(t,n,e,o,u)),{chromaLog2WeightDenom:u,lumaLog2WeightDenom:o,l0:h,l1:s}}(u,C,gX(i),_,m)),0!==t.header.refIdc)&&(s=function(t,i){var n=!1,r=!1,e=!1,s=[],u=[],o=[],h=[],a=[];if(i)n=t.readBool(),r=t.readBool();else if(e=t.readBool()){var c=-1,f=void 0;do{u.push(0),o.push(0),h.push(0),a.push(0),c++,f=t.readExponentialGolombCode(),s.push(f),1!==f&&3!==f||(u[c]=t.readExponentialGolombCode()),2===f&&(o[c]=t.readExponentialGolombCode()),3!==f&&6!==f||(h[c]=t.readExponentialGolombCode()),4===f&&(a[c]=t.readExponentialGolombCode())}while(0!==f)}return{noOutputOfPriorPicsFlag:n,longTermReferenceFlag:r,adaptiveRefPicMarkingModeFlag:e,memoryManagementControlOperation:s,differenceOfPicNumsMinus1:u,longTermPicNum:o,longTermFrameIdx:h,maxLongTermFrameIdxPlus1:a}}(u,t.header.type===cX.IDR_PICTURE));n.entropyCodingModeFlag&&C!==fX.I&&C!==fX.SI&&(p=u.readExponentialGolombCode());var N=u.readSignedExponentialGolombCode();return C!==fX.SP&&C!==fX.SI||(C===fX.SP&&(k=u.readBool()),b=u.readSignedExponentialGolombCode()),n.deblockingFilterControlPresentFlag&&1!==(A=u.readExponentialGolombCode())&&(T=u.readSignedExponentialGolombCode(),S=u.readSignedExponentialGolombCode()),n.numSliceGroupsMinus1>0&&n.sliceGroupMapType>=3&&n.sliceGroupMapType<=5&&(E=u.readUInt(Ja(n.picSizeInMapUnitsMinus1+n.sliceGroupChangeRateMinus1+1))),n.entropyCodingModeFlag&&u.location.bit>0&&u.skipBits(8-u.location.bit),{header:ja(ja({},t.header),{firstMbInSlice:I,sliceType:C,origSliceType:R,picParameterSetID:P,colourPlaneID:o,frameNum:D,fieldPicFlag:h,bottomFieldFlag:a,idrPicID:c,picOrderCntLsb:f,deltaPicOrderCntBottom:v,deltaPicOrderCnt:d,redundantPicCnt:l,directSpatialMvPredFlag:w,numRefIdxActiveOverrideFlag:g,numRefIdxL0ActiveMinus1:_,numRefIdxL1ActiveMinus1:m,cabacInitIdc:p,sliceQpDelta:N,spForSwitchFlag:k,sliceQsDelta:b,disableDeblockingFilterIdc:A,sliceAlphaC0OffsetDiv2:T,sliceBetaOffsetDiv2:S,sliceGroupChangeCycle:E,rplm:r,pwt:e,drpm:s}),parsed:!0,data:new Ya(t.data.slice(u.location.byte,t.data.length),u.location.bit)}}function AX(t){var i=function(t,i){return 11===t&&i[3]?TX["1b"]:TX[(t/10).toFixed(1)]}(t.levelIDC,t.constraintFlags),n=(t.frameMbsOnlyFlag?1:2)*(t.picHeightInMapUnitsMinus1+1);return b.min(16,i.maxDpbMbs/((t.picWidthInMbsMinus1+1)*n))}U(),Et(),U(),Et(),U(),Et(),U(),Et(),U(),Et();var TX={"1.0":{maxMbps:1485,maxFs:99,maxDpbMbs:396,maxBr:64,maxCpb:175},"1b":{maxMbps:1485,maxFs:99,maxDpbMbs:396,maxBr:128,maxCpb:350},1.1:{maxMbps:3e3,maxFs:396,maxDpbMbs:900,maxBr:192,maxCpb:500},1.2:{maxMbps:6e3,maxFs:396,maxDpbMbs:2376,maxBr:384,maxCpb:1e3},1.3:{maxMbps:11880,maxFs:396,maxDpbMbs:2376,maxBr:384,maxCpb:2e3},"2.0":{maxMbps:11880,maxFs:396,maxDpbMbs:2376,maxBr:768,maxCpb:2e3},2.1:{maxMbps:19800,maxFs:792,maxDpbMbs:4752,maxBr:4e3,maxCpb:4e3},2.2:{maxMbps:20250,maxFs:1620,maxDpbMbs:8100,maxBr:4e3,maxCpb:4e3},"3.0":{maxMbps:40500,maxFs:1620,maxDpbMbs:8100,maxBr:1e4,maxCpb:1e4},3.1:{maxMbps:108e3,maxFs:3600,maxDpbMbs:18e3,maxBr:14e3,maxCpb:14e3},3.2:{maxMbps:216e3,maxFs:5120,maxDpbMbs:20480,maxBr:2e4,maxCpb:2e4},"4.0":{maxMbps:245760,maxFs:8192,maxDpbMbs:32768,maxBr:2e4,maxCpb:25e3},4.1:{maxMbps:245760,maxFs:8192,maxDpbMbs:32768,maxBr:5e4,maxCpb:62500},4.2:{maxMbps:522240,maxFs:8704,maxDpbMbs:34816,maxBr:5e4,maxCpb:62500},"5.0":{maxMbps:589824,maxFs:22080,maxDpbMbs:110400,maxBr:135e3,maxCpb:135e3},5.1:{maxMbps:983040,maxFs:36864,maxDpbMbs:184320,maxBr:24e4,maxCpb:24e4},5.2:{maxMbps:2073600,maxFs:36864,maxDpbMbs:184320,maxBr:24e4,maxCpb:24e4},"6.0":{maxMbps:4177920,maxFs:139264,maxDpbMbs:696320,maxBr:24e4,maxCpb:24e4},6.1:{maxMbps:8355840,maxFs:139264,maxDpbMbs:696320,maxBr:48e4,maxCpb:48e4},6.2:{maxMbps:16711680,maxFs:139264,maxDpbMbs:696320,maxBr:8e5,maxCpb:8e5}};function SX(t,i){for(var n,r=!1,e=[],s=8,u=8,o=0;o0)if(0===(r=n.readExponentialGolombCode()))for(var A=0;A<=b;A++)e.push(n.readExponentialGolombCode());else if(2===r)for(A=0;A=this.lengthSize;){var n=this.currentBuffer.readUIntBE(0,this.lengthSize);if(this.lengthSize+n>this.currentBuffer.length)break;var r=this.currentBuffer.slice(this.lengthSize,this.lengthSize+n);i.push(CX(r)),this.currentBuffer=this.currentBuffer.slice(this.lengthSize+n)}return i},t}();U(),Et(),U(),Et();var NX=new E([0,0,1]),xX=new E([0,0,0,1]);function BX(t){return!1===t.parsed}var OX=function(){function t(){this.currentData=new nc,this.startFound=!1}return t.prototype.extractNals=function(i){this.currentData=this.currentData.concat(PX(i));var n=[];if(!this.startFound){var r=this.currentData.indexOf(xX);if(-1===r)return n;this.currentData=this.currentData.slice(r+4),this.startFound=!0}for(;this.currentData.length>0;){var e=t.findNextIndex(this.currentData);if(void 0===e)break;var s=e[0],u=e[1];n.push(CX(this.currentData.slice(0,s))),this.currentData=this.currentData.slice(s+u)}return n},t.findNextIndex=function(t){var i=t.indexOf(xX),n=t.indexOf(NX);if(-1!==i||-1!==n)return-1===i||i>n?[n,3]:[i,4]},t}(),MX=function(){function t(){}return t.createStreamingAnnexBExtractor=function(){return new OX},t.createStreamingAvccExtractor=function(t){return new DX(t)},t.extractAnnexB=function(t){var i=new OX,n=PX(t);return n.pushRange(new E([0,0,0,1])),i.extractNals(n)},t.extractAvcc=function(t,i){return new DX(i).extractNals(PX(t))},t.extractParsedAnnexB=function(t){return(new RX).parseNals(this.extractAnnexB(t))},t.extractParsedAvcc=function(t,i){return(new RX).parseNals(this.extractAvcc(t,i))},t}();U(),Et(),U(),Et(),U(),Et(),U(),Et();var LX=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.emulationTracker=0,i}return Ga(i,t),i.prototype.writeBit=function(i){if(22===this.emulationTracker){for(var n=0,r=[1,1,0,0,0,0,0,0];n0)&&(this.emulationTracker+=1),t.prototype.writeBit.call(this,i)},i.prototype.writeByte=function(t){for(var i=7;i>=0;i--)this.writeBool((t&1<0)},i.prototype.writeBuffer=function(i){var n;for(n=0;n0&&n.sliceGroupMapType>=3&&n.sliceGroupMapType<=5&&e.writeUInt(r.sliceGroupChangeCycle,Ja(n.picSizeInMapUnitsMinus1+n.sliceGroupChangeRateMinus1+1)),n.entropyCodingModeFlag&&e.padByte(1),e.writeBuffer(t.data),{header:{refIdc:r.refIdc,type:r.type},parsed:!1,data:e.close()}}function WX(t){var i=t.header,n=new LX;n.writeByte(i.profileIDC);for(var r=0,e=i.constraintFlags;r0)if(r.writeExponentialGolombCode(n.sliceGroupMapType),0===n.sliceGroupMapType)for(var e=0,s=n.runLengthMinus1;e=b.pow(2,8*i))throw new y("NAL length size "+i+" is too small, serialized NAL is "+u+"B long.");var o=new rc;o.writeUInt(u,i),n.pushRange(o.close().join()),n=n.concat(s)}return n}(i,n).join():t.serializeAvcc((new XX).writeNals(i),n)},t}();U(),Et();!function(){function t(){}t.createAvccDecoderConfig=function(t,i){var n=t.header,r=new XX,e=GX.serializeNal(r.writeNal(t)),s=GX.serializeNal(r.writeNal(i)),u=e.length,o=s.length,h=new rc;return h.writeUInt(1,8),h.writeUInt(n.profileIDC,8),h.writeUInt(this.toNumber(n.constraintFlags),8),h.writeUInt(n.levelIDC,8),h.writeUInt(255,8),h.writeUInt(225,8),h.writeUInt((65280&u)>>8,8),h.writeUInt(255&u,8),h.writeBytes(e),h.writeUInt(1,8),h.writeUInt((65280&o)>>8,8),h.writeUInt(255&o,8),h.writeBytes(s),h.close().join()},t.createCodecInformation=function(t){var i=this.toHex(t.header.profileIDC),n=this.toHex(this.toNumber(function(){for(var t=0,i=0,n=arguments.length;ih){s={WDt:c,wft:Ui.Mg()};break}}if(this.DDt&&xq(this.DDt.WDt,null==s?void 0:s.WDt)){var f=Ui.Mg()-this.DDt.wft,v=this.DDt.WDt.VDt,d=this.qDt.length>=3&&this.qDt.every(function(t){return t>v});if(f>1e3&&d){if(this.PL.ML.BL||Ui.Zs.pp){var l=2*this.xDt.RW;if(!(Cq(this.PL)>l))return}else{var w=b.max(2*this.xDt.RW+Pq,this.JW.aL.minimumOffset);if(!(Cq(this.PL)>w))return void(this.zDt&&this.zDt.minimumOffset===w||(this.fL(),this.zDt={minimumOffset:w},this.JW.cL(this.zDt)))}return this.DDt.WDt}}else this.DDt=s},i.HDt=function(t,i){return void 0===i&&(i=!1),Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return this.DDt=void 0,this.fL(),(n=this.NDt).GDt===t.GDt&&n.XDt===t.XDt?[2]:(r=t.GDt,e=t.XDt,n.XDt&&e&&n.XDt.IW>e.IW&&i&&(this.xDt.JIt(t.VDt),this.qDt=[]),[4,this.BDt.jDt(e,r)]);case 1:return s.sent(),[2]}})}).call(this)},i.fL=function(){this.zDt&&(this.JW.fL(this.zDt),this.zDt=void 0)},i.FDt=function(t,i){var n,r=[],e=[];t&&(r=(null==(n=t.tC)?void 0:n.length)?t.tC:t.$I.NI);if(i){var s,u=(null==(s=i.tC)?void 0:s.length)?i.tC:i.$I.NI,o=u.slice().sort(function(t,i){return t.IW-i.IW}),h=this.QDt(o);0===h.length&&u.length>0&&h.push(Zn(u,function(t){return t.IW})),e=h}for(var a,c=[],f=r.length>0?r:[void 0],v=e.length>0?e:[void 0],d=Lt(f);!(a=d()).done;)for(var l,w=a.value,g=Lt(v);!(l=g()).done;){var _=l.value;c.push(Nq(w,_))}return function(t){return t.sort(function(t,i){return i.VDt-t.VDt})}(c)},i.QDt=function(t){var i=this,n=Fn(t,function(t){return t.Mi>=i.PL.Mi&&t.Ti>=i.PL.Ti});return n?t.filter(function(t){return t.Mi<=n.Mi&&t.Ti<=n.Ti}):t.slice()},i.zg=function(){this.DDt=void 0,this.IDt.hr(),this.fL()},Nt(t,[{key:"NDt",get:function(){return Nq(this.BDt.ADt,this.BDt.TDt)}}]),t}();function Nq(t,i){var n,r;return{GDt:t,XDt:i,VDt:1.3*((null!=(n=null==t?void 0:t.IW)?n:0)+(null!=(r=null==i?void 0:i.IW)?r:0))}}function xq(t,i){var n,r,e,s;return void 0===t||void 0===i?t===i:(null==(n=t.GDt)?void 0:n.o)===(null==(r=i.GDt)?void 0:r.o)&&(null==(e=t.XDt)?void 0:e.o)===(null==(s=i.XDt)?void 0:s.o)&&t.VDt===i.VDt}U(),Et(),Wt(),xt(),Qt();var Bq=function(){function t(t,i,n){this.YDt=void 0,this.hT=new hr,this.YDt=t,this.YPt(i,n,this.hT.Yg).catch(dn)}var i=t.prototype;return i.YPt=function(t,i,n){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return n.Hg?[3,6]:[4,Ar(6e5,n)];case 1:e.sent(),e.label=2;case 2:return e.trys.push([2,4,,5]),r=this,[4,Oq(t,i,n)];case 3:return r.YDt=e.sent(),[3,5];case 4:return lr(e.sent()),[3,5];case 5:return[3,0];case 6:return[2]}})}).call(this)},i.zg=function(){this.hT.Zg()},t.create=function(i,n,r){return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,Oq(i,n,r)];case 1:return[2,new t(e.sent(),i,n)]}})})()},Nt(t,[{key:"ebt",get:function(){return(this.YDt.serverTimeMs+(Ui.Mg()-this.YDt.localTimeMs))/1e3}},{key:"JDt",get:function(){return(this.YDt.localTimeMs-this.YDt.serverTimeMs)/1e3}}]),t}();function Oq(t,i,n){return Vt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return[4,Mq(t,i,n)];case 1:return r=h.sent(),e=r[0],s=r[1],u=r[2],s>20?[4,Mq(t,i,n)]:[3,3];case 2:o=h.sent(),e=o[0],s=o[1],u=o[2],h.label=3;case 3:return[2,{localTimeMs:e,serverTimeMs:u-s/2}]}})})()}function Mq(t,i,n){return Vt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return r=Ui.Mg(),[4,i.vk({Hk:ml.GET,Yu:t,Yg:n})];case 1:return e=h.sent(),s=Ui.Mg()-r,[4,e.HT(n)];case 2:return u=h.sent(),o=1e3*Number(u),[2,[r,s,o]]}})})()}var Lq=function(t){function i(){return t.call(this,"seek")||this}return Ct(i,t),i}(rh),Fq=function(t){return t.Jz="seek",t}({}),Uq=[eh.uo,Ry.AI,eh.py],Vq=function(t){function i(i,n,r,e,s,u,o,h,a,c,f){var v;return(v=t.call(this)||this).Ac=void 0,v.aV=void 0,v.oNt=void 0,v.PL=void 0,v.rNt=void 0,v.Ndt=void 0,v.ENt=void 0,v.fNt=!1,v.DNt=!1,v.Mz=void 0,v.tO=new rg,v.sO=new rg,v.NNt=void 0,v.tNt=void 0,v.iNt=void 0,v.URt=void 0,v.sNt=new Va,v.aNt=void 0,v.dNt=void 0,v.cNt=void 0,v.JW=void 0,v.aq=void 0,v.Ypt=void 0,v.nNt=new Va,v.uV=new hr,v.ANt=void 0,v.bNt=new hr,v.k9=void 0,v.T9=new hr,v.mNt=void 0,v.ZDt=void 0,v.INt=void 0,v.wNt=void 0,v.$Dt=void 0,v.PNt=void 0,v.CNt=void 0,v.NL=function(){v.DNt=!0},v.updateActiveQualities=function(){var t,i,n=v.PL.zx,r=null==(t=v.ZDt)?void 0:t.pCt(n),e=null==(i=v.$Dt)?void 0:i.pCt(n);if(v.tNt!==r&&(v.tNt=r,r))for(var s,u=Lt(v.tO.NI);!(s=u()).done;){s.value.yDt(r)}if(v.iNt!==e&&(v.iNt=e,e))for(var o,h=Lt(v.sO.NI);!(o=h()).done;){o.value.yDt(e)}},v.xNt=function(t,i){var n=i.data;if(n.Km===nX.MCt){var r,e=n.OCt,s=n.FCt,u=n.LCt,o=n.UCt;if(v.aNt){var h=v.aNt.ebt,a=v.PL.zx;if(v.DNt&&0!==a){var c={theolive:h-e+u-a,engine:s,distribution:b.max(h-(e+s),0),player:b.min(u-a,v.JW.aL.forceSeekOffset)};t===eg.Bk?(v.dNt=c,v.rNt.cCt(v.aNt.JDt+e,u)):(v.cNt=c,v.rNt.aCt(v.aNt.JDt+e,u))}}if(o)null!=v.NNt||(v.NNt=v.PL.sI(Jm.zU,"timecode","timecode",void 0,!1,Ng.DEFAULT,!1,void 0)),v.NNt.nV(new Jg(u,u,o,!1,void 0)),fy(v.NNt,null!=(r=v.PL.Fx.Tn(0))?r:-1)}v.So(i)},v.u8=function(t){vr(t)||(v.KP(),v.So(new yb(new ld(vd.MEDIA_LOAD_ERROR,t.message))))},v.Ac=i,v.oNt=n,v.PL=r,v.aV=s,v.rNt=u,v.Mz=new Dq(r,o,v,a,e,f),v.Ndt=h,v.ENt=c,v.JW=o,v.PL.wn(Ry.PM,v.NL),v.PL.wn(Uq,v.updateActiveQualities),v}Ct(i,t);var n=i.prototype;return n.hNt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.ZDt?[4,this.ZDt.pS(0,1/0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.$Dt?[4,this.$Dt.pS(0,1/0)]:[3,4];case 3:t.sent(),t.label=4;case 4:return[2]}})}).call(this)},n.Un=function(){if(!this.Ac.src)throw new ld(vd.SOURCE_INVALID,"No src property found in given source.");this.Ypt||(this.Ypt=this.vE(this.uV.Yg).catch(this.u8))},n.vE=function(t){return Vt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return this.So(new KR),i=this.Ac.src,[4,this.oNt._It(i,t)];case 1:return n=s.sent(),this.URt=new lq(i,n),this.URt.nDt?(r=this,[4,Bq.create(this.URt.nDt,this.aV,t)]):[3,3];case 2:r.aNt=s.sent(),s.label=3;case 3:return this.uNt(),e=zn(this.URt.ZRt,-1),this.createTracksForPresentation(e),this.sNt.Qy(),this.pDt(),[2]}})}).call(this)},n.bDt=function(t){for(var i,n=Lt(this.tO.NI);!(i=n()).done;){var r=i.value;r.SO(r===t)}},n.SDt=function(t){for(var i,n=Lt(this.sO.NI);!(i=n()).done;){var r=i.value;r.SO(r===t)}},n.pDt=function(){var t=Fn(this.tO.NI,function(t){return t.Rt}),i=Fn(this.sO.NI,function(t){return t.Rt}),n=this.Mz.ODt(t,i);kr(this.jDt(n.XDt,n.GDt))},n.uNt=function(){var t=this;if(this.URt&&"live"===this.URt.P0&&this.aNt){var i=this.URt.ZRt.filter(function(i){return i.o===t.URt.tDt})[0].zx,n=this.aNt.JDt+new Date(this.URt.XRt).getTime()/1e3;this.rNt.hCt(n,i)}},n.createTracksForPresentation=function(t){for(var i,n,r,e,s,u=Lt(null!=(r=t.q9)?r:[]);!(e=u()).done;){var o=e.value;this.tO.tt(new Aq(o,this))}for(var h,a=Lt(null!=(s=t.W9)?s:[]);!(h=a()).done;){var c=h.value;this.sO.tt(new Tq(c,this))}null==(i=this.tO.MI(0))||i.SO(!0),null==(n=this.sO.MI(0))||n.SO(!0)},n.Tn=function(){this.fNt=!0,this.vNt()},n.KP=function(){var t;this.fNt=!1,this._Nt().catch(this.u8),"live"===(null==(t=this.cC)?void 0:t.P0)&&(this.gNt(),this.pNt())},n.gNt=function(){this.mNt&&this.mNt.cancelDownload()},n.pNt=function(){this.wNt&&this.wNt.cancelDownload()},n.dC=function(t){var i=this;this.T9.Zg(),this.T9=new hr,this.k9=mr(function(n){return i.yNt(t,i.k9,n)},this.T9).catch(this.u8)},n.yNt=function(t,i,n){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return i?[4,i]:[3,2];case 1:s.sent(),s.label=2;case 2:return[4,gr(this.W,n)];case 3:if(s.sent(),"live"!==this.URt.P0)throw new y("The current video source does not support Live playback.");return dr(n),[4,this._Nt()];case 4:if(s.sent(),dr(n),!this.mNt||!this.mNt.ZCt()&&this.mNt.QCt===(null!=t?t:"now"))return[3,10];if(this.gNt(),!this.ZDt)return[3,9];s.label=5;case 5:return this.ZDt.yCt?[4,gr(this.ZDt.ACt,n)]:[3,7];case 6:return s.sent(),[3,5];case 7:return[4,this.ZDt.pS(0,1/0)];case 8:s.sent(),s.label=9;case 9:null==(r=this.mNt)||r.Oy(null!=t?t:"now"),s.label=10;case 10:if(!this.wNt||!this.wNt.ZCt()&&this.wNt.QCt===(null!=t?t:"now"))return[3,16];if(this.pNt(),!this.$Dt)return[3,15];s.label=11;case 11:return this.$Dt.yCt?[4,gr(this.$Dt.ACt,n)]:[3,13];case 12:return s.sent(),[3,11];case 13:return[4,this.$Dt.pS(0,1/0)];case 14:s.sent(),s.label=15;case 15:null==(e=this.wNt)||e.Oy(null!=t?t:"now"),s.label=16;case 16:return this.So(new Lq),dr(n),this.k9=void 0,this.vNt(),[2]}})}).call(this)},n.Oy=function(t){var i=this;this.T9.Zg(),this.T9=new hr,this.k9=mr(function(n){return i.E9(t,i.k9,n)},this.T9).catch(this.u8)},n.E9=function(t,i,n){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return i?[4,i]:[3,2];case 1:s.sent(),s.label=2;case 2:return[4,gr(this.W,n)];case 3:return s.sent(),dr(n),[4,this._Nt()];case 4:return s.sent(),dr(n),this.mNt&&(this.mNt.ZCt()||this.mNt.QCt!==t)&&this.gNt(),this.wNt&&(this.wNt.ZCt()||this.wNt.QCt!==t)&&this.pNt(),this.So(new Lq),dr(n),null==(r=this.mNt)||r.Oy(t),null==(e=this.wNt)||e.Oy(t),this.k9=void 0,this.vNt(),[2]}})}).call(this)},n.jDt=function(t,i){var n,r,e=this;return(null==(n=this.mNt)?void 0:n.qot)===i&&(null==(r=this.wNt)?void 0:r.qot)===t?ut.resolve():(this.bNt.Zg(),this.bNt=new hr,this.ANt=mr(function(n){return e.SNt(t,i,e.ANt,n)},this.bNt).catch(this.u8),this.ANt)},n.SNt=function(t,i,n,r){return Vt(function(){var e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:return n?[4,n]:[3,2];case 1:a.sent(),a.label=2;case 2:return[4,gr(this.sNt.Yy,r)];case 3:return a.sent(),dr(r),[4,this._Nt()];case 4:return a.sent(),dr(r),[4,this.TNt(t,i)];case 5:return a.sent(),[4,this.kNt(t,i)];case 6:for(a.sent(),dr(r),u=Lt(null!=(s=null==t||null==(e=t.Ht)?void 0:e.ORt)?s:[]);!(o=u()).done;)h=o.value,this.ENt.$gt({Sit:h.channel,Tit:h.language,Th:h.label});return this.ANt=void 0,this.vNt(),[2]}})}).call(this)},n.TNt=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a,c,f,v,d,l,w,g,_,m,y,p;return zt(this,function(k){switch(k.label){case 0:return n=this,u=null!=(s=this.lNt)?s:"now",(null==(r=this.mNt)?void 0:r.qot)===i?[3,5]:(h=this.mNt&&!this.mNt.ZCt(),a=null==(o=this.mNt)?void 0:o.QCt,this.mNt?[4,this.mNt.zg()]:[3,2]);case 1:k.sent(),this.mNt=void 0,k.label=2;case 2:return this.ZDt?[4,this.ZDt.ACt]:[3,4];case 3:k.sent(),k.label=4;case 4:i&&(v=null!=(f=null==(c=this.ZDt)?void 0:c.Fx)?f:EA.rL(),d=h?a:v.An(v.V-1),this.mNt=new ZX(i,this.aV,this.Ndt),this.mNt.wn($z.DCt,function(t){return n.xNt(eg.Bk,t)}),this.mNt.Oy(null!=d?d:u)),k.label=5;case 5:return(null==(e=this.wNt)?void 0:e.qot)===t?[3,10]:(w=this.wNt&&!this.wNt.ZCt(),g=null==(l=this.wNt)?void 0:l.QCt,this.wNt?[4,this.wNt.zg()]:[3,7]);case 6:k.sent(),this.wNt=void 0,k.label=7;case 7:return this.$Dt?[4,this.$Dt.ACt]:[3,9];case 8:k.sent(),k.label=9;case 9:t&&(y=null!=(m=null==(_=this.$Dt)?void 0:_.Fx)?m:EA.rL(),p=w?g:y.An(y.V-1),this.wNt=new $X(t,this.aV,this.Ndt,this.PL),this.wNt.wn($z.DCt,function(t){return n.xNt(eg.Mk,t)}),this.wNt.Oy(null!=p?p:u)),k.label=10;case 10:return[2]}})}).call(this)},n.kNt=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:if(n=function(t,i,n,r,e){var s=Sq(t,null==i?void 0:i.Ht.yRt.yRt,null==n?void 0:n.Ht.yRt.yRt,r),u=ZH(s),o=[];i&&o.push({GT:i.lQ});n&&o.push({GT:n.lQ});return{Km:Iy.SV,q4:o,fq:u,t5:e&&!r}}(this.Ac.contentProtection,i,t,this.PL.ML.BL,this.Ac.useManagedMediaSource),!this.aq||!this.aq.IZ(n))return[3,12];if(s=!(null==(r=this.mNt)?void 0:r.ZCt()),!this.ZDt||!s)return[3,5];c.label=1;case 1:return this.ZDt.yCt?[4,this.ZDt.ACt]:[3,3];case 2:return c.sent(),[3,1];case 3:return[4,this.ZDt.EQ()];case 4:c.sent(),c.label=5;case 5:if(u=!(null==(e=this.wNt)?void 0:e.ZCt()),!this.$Dt||!u)return[3,10];c.label=6;case 6:return(null==(o=this.$Dt)?void 0:o.yCt)?[4,this.$Dt.ACt]:[3,8];case 7:return c.sent(),[3,6];case 8:return[4,null==(h=this.$Dt)?void 0:h.EQ()];case 9:c.sent(),c.label=10;case 10:return[4,this.aq.RZ(n)];case 11:return c.sent(),[3,21];case 12:return this.gNt(),this.pNt(),this.ZDt?[4,this.ZDt.zg()]:[3,14];case 13:c.sent(),this.ZDt=void 0,c.label=14;case 14:return this.$Dt?[4,this.$Dt.zg()]:[3,16];case 15:c.sent(),this.$Dt=void 0,c.label=16;case 16:this.PL.G7(),c.label=17;case 17:return c.trys.push([17,,20,21]),[4,this.PL.hr()];case 18:return c.sent(),a=this,[4,this.PL.Un(n)];case 19:return a.aq=c.sent(),this.nNt.Qy(),this.aq.e4&&this.mNt&&(this.aq.e4.wn(HR.pZ,this.Rs),this.ZDt=new Jz(this.aq.e4,this.PL,i,this.ENt)),this.aq.s4&&this.wNt&&(this.aq.s4.wn(HR.pZ,this.Rs),this.$Dt=new Jz(this.aq.s4,this.PL,t,this.ENt)),"live"===this.URt.P0&&this.aq.F4(1/0),[3,21];case 20:return this.PL.X7(),[7];case 21:return[2]}})}).call(this)},n.vNt=function(){!this.fNt||this.k9||this.ANt||this.PNt||this.INt||(this.Mz.Tn(),this.CNt=new hr,this.wNt&&this.$Dt&&(this.PNt=this.RNt(this.wNt,this.$Dt,this.CNt.Yg).catch(this.u8)),this.mNt&&this.ZDt&&(this.INt=this.RNt(this.mNt,this.ZDt,this.CNt.Yg).catch(this.u8)))},n._Nt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Mz.KP(),this.CNt&&(this.CNt.Zg(),this.CNt=void 0),this.PNt?[4,this.PNt]:[3,2];case 1:t.sent(),this.PNt=void 0,t.label=2;case 2:return this.INt?[4,this.INt]:[3,4];case 3:t.sent(),this.INt=void 0,t.label=4;case 4:return[2]}})}).call(this)},n.RNt=function(t,i,n){return Vt(function(){var r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:return[4,this.W];case 1:v.sent(),v.label=2;case 2:return t.yCt?[4,gr(t.ACt,n)]:[3,4];case 3:return v.sent(),[3,2];case 4:return i.yCt?[4,gr(i.ACt,n)]:[3,6];case 5:return v.sent(),[3,4];case 6:return t.ZCt()?[3,13]:(r=Ui.Mg()/1e3,e="now"===t.QCt,[4,t.$Ct()]);case 7:return s=v.sent(),u=s.initialization,o=s.data,h=s.metadata,a=i.Fx,!Ui.Zs.wp&&!this.PL.ML.BL&&h&&a.An(a.V-1)>h.Get?[4,i.pS(h.Get,1/0)]:[3,9];case 8:v.sent(),v.label=9;case 9:return[4,i.J2(u)];case 10:return v.sent(),o?[4,i.Q2(o,h,t.qot)]:[3,12];case 11:v.sent(),v.label=12;case 12:c=i.Fx.qM(a),e&&c.V>0&&this.rNt.nCt(r,c.An(c.V-1)),v.label=13;case 13:return t.jCt?[3,15]:(dr(n),f=t.oRt(),[4,gr(i.appendStream(f,t),n)]);case 14:return v.sent(),[3,13];case 15:return[2]}})}).call(this)},n.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.uV.Zg(),this.Ypt?[4,this.Ypt.catch(dn)]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.k9?(this.T9.Zg(),this.gNt(),this.pNt(),[4,this.k9.catch(dn)]):[3,4];case 3:t.sent(),t.label=4;case 4:return this.ANt?(this.bNt.Zg(),this.gNt(),this.pNt(),[4,this.ANt.catch(dn)]):[3,6];case 5:t.sent(),t.label=6;case 6:return[4,this._Nt()];case 7:return t.sent(),this.mNt?[4,this.mNt.zg()]:[3,9];case 8:t.sent(),t.label=9;case 9:return this.wNt?[4,this.wNt.zg()]:[3,11];case 10:t.sent(),t.label=11;case 11:return this.mNt=void 0,this.wNt=void 0,this.nNt.Zg(),this.sNt.Zg(),this.aq?[4,this.PL.hr()]:[3,13];case 12:t.sent(),this.aq=void 0,t.label=13;case 13:return this.ZDt=void 0,this.$Dt=void 0,this.PL.mn(Ry.PM,this.NL),this.PL.mn(Uq,this.updateActiveQualities),this.tO.hr(),this.tNt=void 0,this.sO.hr(),this.iNt=void 0,this.URt=void 0,this.aNt&&(this.aNt.zg(),this.aNt=void 0),this.fNt=!1,[2]}})}).call(this)},Nt(i,[{key:"cC",get:function(){return this.URt}},{key:"Fx",get:function(){return this.ZDt&&this.$Dt?this.ZDt.Fx.Mn(this.$Dt.Fx):this.ZDt?this.ZDt.Fx:this.$Dt?this.$Dt.Fx:EA.rL()}},{key:"ADt",get:function(){return this.tNt}},{key:"TDt",get:function(){return this.iNt}},{key:"ht",get:function(){return this.tO}},{key:"rt",get:function(){return this.sO}},{key:"eNt",get:function(){return this.sNt.Yy}},{key:"W",get:function(){return this.nNt.Yy}},{key:"kP",get:function(){return this.URt?function(t,i,n){var r,e=null==(r=t.ZRt[0])?void 0:r.zx,s=t.zRt;if(void 0===e||void 0===s)return n>0&&nn+2){var r=t-i;if(r<=this.lastAmountToSeekForward&&!this.oa.xP)return this.oa.zx+=r,this.lastAmountToSeekForward=0,!0;this.lastAmountToSeekForward=r}else this.lastAmountToSeekForward=0;return!1},n.vL=function(){return Qz(t.prototype.vL.call(this))},n.VL=function(){return!Ui.Zs.pp},i}(NA),Wq=[eh.Jw,eh.Qw,eh.Nw,eh.Kw,eh.wy,eh.Cw,eh.Lw,eh.Bw,eh.xw,eh.Ew],zq=function(t){function i(i,n,r,e,s){var u,o;return(u=t.call(this)||this).PL=void 0,u.aV=void 0,u.lq=void 0,u.Cq=void 0,u.xq=void 0,u.JW=void 0,u.pq=void 0,u.rNt=void 0,u.Lz=void 0,u.FNt=void 0,u.Ndt=void 0,u.Mz=void 0,u.Ac=void 0,u.FEt=void 0,u.BDt=void 0,u.Pz=!1,u.LNt=void 0,u.T9=new hr,u.k9=void 0,u.ixt=void 0,u.YNt=new hr,u.pst=!0,u.DNt=!1,u.tO=new $b,u.sO=new $b,u.Gl=void 0,u.ENt=void 0,u.rq=void 0,u.nq=void 0,u.UNt=YT.pz,u.WNt=void 0,u.bd=function(t){var i=u.Fx;i.length>0&&u.ENt.jU(i.start(0)),u.So(new bw(t.currentTime,u.Vx))},u.BNt=function(){u.PL.lP!==u.pst&&(u.PL.lP?u.jP():u.QP().catch(dn))},u.YG=function(){u.DNt=!0},u.zNt=function(t){u.rq=t.errorObject,u.nq=cg(u.rq),u.HNt(u.rq)},u.MNt=function(t){u.rq=fg(t.lt),u.nq=t.lt,u.HNt(u.rq)},u.PL=i,u.Cq=new Vy(u,u.PL),u.xq=new Uy(u.Cq,!0),u.aV=n,u.Mz=r,u.lq=new Vz(r.jY,r.CY.RW),u.pq=new Eb(n),u.PL.Rq=u.pq,s.allowNativeFullscreen?u.ENt=new RF(u.PL):u.ENt=new CF(u.PL),u.Gl=new Rb([u.ENt.Z]),u.rNt=new Hz,u.FNt=new Rz(u),u.Lz=e,u.Ndt=Yu({},s.retryConfiguration,{maxRetries:null!=(o=s.retryConfiguration.maxRetries)?o:3}),u.HI(),u}Ct(i,t);var n=i.prototype;return n.HI=function(){this.PL.wn(Wq,this.Rs),this.PL.wn(Ry.PM,this.YG),this.PL.wn([eh.uo,eh.jw],this.BNt),this.PL.wn(qm.ma,this.MNt),this.PL.wn(eh.py,this.bd),this.xq.wn(Cy,this.Rs)},n.UI=function(){this.PL.mn(Wq,this.Rs),this.PL.mn(Ry.PM,this.YG),this.PL.mn([eh.uo,eh.jw],this.BNt),this.PL.mn(qm.ma,this.MNt),this.PL.mn(eh.py,this.bd),this.xq.mn(Cy,this.Rs)},n.YP=function(){return!1},n.qP=function(){return this.PL.Ma},n.Aa=function(){return this.PL.Sq},n.sI=function(t){return this.PL.Tq(t)},n.we=function(){this.PL.we()},n.be=function(){return this.PL.be()},n.$P=function(){},n.tI=function(){},n.JP=function(){},n.ZP=function(){},n.Xx=function(t,i){var n=this;this.T9.Zg(),this.T9=new hr,this.k9=mr(function(i){return n.E9(t,i,n.k9)},this.T9)},n.ONt=function(){var t=this.cC;if(t){for(var i,n=new Date(t.creationDate).getTime(),r=NaN,e=Lt(t.presentations);!(i=e()).done;){var s=i.value;s.currentTime&&(r=s.currentTime.value/(s.currentTime.scale||1)*1e3)}if(!S(r))return new Date(n-r)}},n.VNt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.UNt!==YT.pz&&this.BDt?(this.BDt.Un(),this.UNt!==YT.HL&&this.UNt!==YT.PW?[3,2]:[4,this.BDt.eNt]):[2];case 1:t.sent(),"vod"===this.BDt.cC.P0&&this.BDt.Tn(),t.label=2;case 2:return[2]}})}).call(this)},n.Ta=function(t,i,n){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return dr(n),[4,this.hr()];case 1:return s.sent(),dr(n),tT(t)?(r=t,this.Ac=r,this.FEt=i,e=new Iz(this.aV),this.WNt=this.qNt(t),this.JW=new Hq(this,this.PL,this.WNt),this.JW.Rt=!0,this.JW.wn("latencyrecoveryseek",this.Rs),this.VP.Ea(this.JW),this.BDt=new Vq(r,e,this.PL,this.lq,this.aV,this.rNt,this.JW,this.Ndt,this,this.ENt,this.Mz),this.BDt.wn(eh.Ww,this.Rs),this.BDt.wn(qm.ma,this.zNt),this.tO.OI=this.BDt.ht,this.sO.OI=this.BDt.rt,this.pq.BW(t.contentProtection),kr(this.VNt()),[2]):(this.rq=new ld(vd.SOURCE_INVALID,"HESP source incorrectly configured"),this.nq=cg(this.rq),this.HNt(this.rq),[2,ut.resolve()])}})}).call(this)},n.IP=function(t,i,n,r){return ut.resolve()},n.CP=function(){return ut.resolve()},n.qNt=function(t){return t.latencyConfiguration?t.latencyConfiguration:Yz()},n.QP=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return this.BDt?(this.pst=!1,this.BDt.Un(),[4,this.BDt.W]):[2];case 1:return n.sent(),this.So(new fT(this.zx)),i=this.BDt.ww(Fq.Jz),this.dC(),[4,i];case 2:return n.sent(),this.BDt.Tn(),[4,this.PL.QP()];case 3:return n.sent(),null==(t=this.JW)||t.Tn(),[2]}})}).call(this)},n.jP=function(){var t;this.BDt&&(this.pst=!0,this.So(new cT(this.zx)),this.BDt.KP(),null==(t=this.JW)||t.KP(),this.PL.jP())},n.dC=function(){var t=this;if(this.ixt)throw new y("Cannot seek while resetting");this.T9.Zg(),this.T9=new hr,this.k9=mr(function(i){return t.yNt(t.k9,i)},this.T9)},n.E9=function(t,i,n){return Vt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:if(this.ixt)throw new y("Cannot seek while resetting");return r=t,this.GNt(r),this.kP.length>0&&(r=EA.jn(this.kP).LM(r),this.GNt(r)),this.BDt?n?[4,n.catch(dn)]:[3,2]:[2];case 1:u.sent(),dr(i),u.label=2;case 2:return u.trys.push([2,4,,5]),e=this.PL.ww(eh.Zw,i),this.PL.Oy(r),this.BDt.Oy(r),[4,e];case 3:return u.sent(),[3,5];case 4:throw lr(s=u.sent()),this.BDt.KP(),this.XNt(),s;case 5:return this.jNt(),[2]}})}).call(this)},n.yNt=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:return this.So(new rh("golive")),n=this.lNt,this.GNt(n),this.BDt?t?[4,t.catch(dn)]:[3,2]:[2];case 1:c.sent(),dr(i),c.label=2;case 2:return c.trys.push([2,11,,13]),r=this.JW.aL.targetOffset,[4,this.BDt.eNt];case 3:c.sent(),n&&r>=1?(this.JW.VL()||(s=b.min(1,.5*r),r-=s),e=n-r):e=this.lNt?this.lNt-.2:void 0,this.BDt.dC(e),c.label=4;case 4:return this.ykt.V>0?[4,this.BDt.ww(HR.pZ,i)]:[3,6];case 5:return c.sent(),[3,4];case 6:u=this.ykt,c.label=7;case 7:return 0!==this.ykt.qM(u).V?[3,9]:[4,this.BDt.ww(HR.pZ,i)];case 8:return c.sent(),[3,7];case 9:return e=this.ykt.Tn(this.ykt.V-1),e=this.QNt(e),this.GNt(e),o=this.PL.ww(eh.Zw,i),this.PL.Oy(e,!0),[4,o];case 10:return c.sent(),[3,13];case 11:if(vr(h=c.sent()))throw null==(a=this.JW)||a.Tn(),h;return this.BDt.KP(),[4,this.BDt.hNt()];case 12:throw c.sent(),this.XNt(),h;case 13:return this.jNt(),[2]}})}).call(this)},n.GNt=function(t){this.Pz=!0,this.LNt=t,this.So(new wT(this.zx))},n.jNt=function(){this.Pz&&(this.LNt=void 0,this.Pz=!1,this.So(new gT(this.zx)))},n.XNt=function(){this.LNt=void 0,this.Pz=!1},n.QNt=function(t){return t},n.KNt=function(){var t;null==(t=this.BDt)||t.KP()},n.HNt=function(t){this.So(new yb(t)),this.KNt()},n.sxt=function(t,i,n){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return dr(n),null==(r=this.JW)||r.KP(),t?[4,t.catch(dn)]:[3,2];case 1:e.sent(),e.label=2;case 2:return i?[4,i.catch(dn)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[4,this.ENt.hr()];case 5:return e.sent(),this.BDt?[4,this.BDt.zg()]:[3,7];case 6:e.sent(),this.BDt=void 0,e.label=7;case 7:return dr(n),[4,this.PL.hr()];case 8:return e.sent(),dr(n),this.PL.Eq(),this.sO.hr(),this.tO.hr(),this.XNt(),this.xq.hr(),this.rNt.hr(),this.rq=void 0,this.nq=void 0,this.pst=!0,this.DNt=!1,this.Ac=void 0,this.ixt=void 0,this.WNt=void 0,[2]}})}).call(this)},n.hr=function(){return this.T9.Zg(),this.T9=new hr,this.YNt.Zg(),this.YNt=new hr,this.ixt=this.sxt(this.k9,this.ixt,this.YNt.Yg).catch(function(t){return wr(t)}),this.ixt},n.kn=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return this.UI(),this.xq.kn(),this.Cq.zg(),this.Ac?[4,this.hr()]:[3,2];case 1:n.sent(),n.label=2;case 2:return this.Vo(),this.PL.Rq=void 0,null==(t=this.JW)||t.mn("latencyrecoveryseek",this.Rs),null==(i=this.JW)||i.zg(),[4,this.ENt.kn()];case 3:return n.sent(),this.Gl.kn(),this.tO.kn(),this.sO.kn(),[2]}})}).call(this)},Nt(i,[{key:"ht",get:function(){return this.tO}},{key:"rt",get:function(){return this.sO}},{key:"cC",get:function(){var t,i;return null==(i=this.BDt)||null==(t=i.cC)?void 0:t.cC}},{key:"OP",get:function(){return this.PL.OP},set:function(t){this.PL.OP=t}},{key:"WP",get:function(){return!1},set:function(t){}},{key:"dq",get:function(){return this.lq}},{key:"oP",get:function(){return this.PL.oP},set:function(t){this.PL.oP=t}},{key:"zx",get:function(){var t;return null!=(t=this.LNt)?t:this.PL.zx},set:function(t){this.Xx(t)}},{key:"Vx",get:function(){var t=this.ONt();if(t)return new Date(t.getTime()+1e3*this.zx)},set:function(t){var i=this.ONt();t&&i&&(this.zx=i.getTime()-t.getTime())}},{key:"bt",get:function(){return this.Ac}},{key:"vP",get:function(){return this.PL.vP},set:function(t){this.PL.vP=t}},{key:"ct",get:function(){var t=this.PL.ct;return t===bn?1/0:t}},{key:"Qx",get:function(){return!1}},{key:"Jx",get:function(){return this.rq}},{key:"lt",get:function(){return this.nq}},{key:"$x",get:function(){return this.FNt}},{key:"iP",get:function(){}},{key:"sP",get:function(){return!1}},{key:"rP",get:function(){return Yu({},{rO:0,hO:0,oO:0,aO:0,uO:0,cO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.PL.hP())}},{key:"cP",get:function(){return!0}},{key:"xP",get:function(){return this.Pz}},{key:"uq",get:function(){}},{key:"nt",get:function(){return this.Gl}},{key:"DP",get:function(){return this.PL.DP}},{key:"MP",get:function(){return this.PL.MP}},{key:"Fx",get:function(){return this.ykt._s()}},{key:"ykt",get:function(){return this.BDt?this.BDt.Fx:EA.rL()}},{key:"pP",get:function(){return this.PL.pP._s()}},{key:"kP",get:function(){var t,i;return null!=(i=null==(t=this.BDt)?void 0:t.kP._s())?i:EA.rL()._s()}},{key:"lP",get:function(){return this.pst}},{key:"uC",get:function(){return!0}},{key:"VP",get:function(){return this.Lz}},{key:"lNt",get:function(){var t;return null==(t=this.BDt)?void 0:t.lNt}},{key:"OL",get:function(){if(!this.lP&&this.DNt){var t=this.zx,i=this.rNt.fCt(t);if(void 0!==i){var n=this.ykt,r=0;if(n.V>0){var e=n.An(n.V-1);r=b.max(e-t,0)}return b.max(i,r)}}}},{key:"hC",get:function(){var t;return null==(t=this.BDt)?void 0:t.hC}},{key:"oC",get:function(){var t;return null==(t=this.BDt)?void 0:t.oC}},{key:"aC",get:function(){var t;return null==(t=this.BDt)?void 0:t.aC}},{key:"AP",get:function(){return this.PL.AP}},{key:"wP",get:function(){return this.UNt},set:function(t){this.UNt=t,this.VNt()}}]),i}(th),Xq=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,r,e,u)||this).Nq=void 0,o.sBt=void 0,o.iBt=!1,o.JNt=!1,o.$Nt=[],o.tBt=void 0,o.eBt=function(){var i=o.oP||0===o.OP;"hidden"!==v.visibilityState||o.lP||!i||o.Aa().YL?"visible"===v.visibilityState&&o.iBt&&(o.JNt=!0,o.tBt=Ui.Og(function(){for(var i,n=Lt(o.$Nt);!(i=n()).done;){var r=i.value;t.prototype.So.call(LW(o),r)}o.tBt=void 0,o.JNt=!1},2e3),kr(o.QP()),o.iBt=!1):(o.jP(),o.iBt=!0)},o.Nq=s,o.sBt=i,Bi.Rg&&v.addEventListener("visibilitychange",o.eBt),o}Ct(i,t);var n=i.prototype;return n.So=function(i){if(this.JNt){if(i.type===eh.Zw)return void this.ZNt();if(i.type===Ry.xM||i.type===eh.$w||i.type===Ry.PM)return void this.$Nt.push(i)}t.prototype.So.call(this,i)},n.ZNt=function(){this.JNt=!1,void 0!==this.tBt&&Ui.Lg(this.tBt);var i=Fn(this.$Nt,function(t){return t.type===Ry.PM});i&&t.prototype.So.call(this,i),Yn(this.$Nt)},n.zP=function(){if(wO(this.PL))return this.PL.zP()},n.hr=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.iBt=!1,this.ZNt(),[4,t.prototype.hr.call(i)];case 1:return n.sent(),[2]}})}).call(this)},n.kn=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return v.removeEventListener("visibilitychange",this.eBt),this.ZNt(),[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.PL.zg()];case 2:return n.sent(),[4,this.Nq.Dq(this.sBt)];case 3:return n.sent(),[2]}})}).call(this)},n.QNt=function(t){return Bi.X_&&Bi.Q_>=15&&Bi.Kv?t+.25:t},i}(zq);U(),Et(),Wt(),xt(),Qt();var qq=function(){function t(){}var i=t.prototype;return i.Jq=function(t,i){return Vt(function(){return zt(this,function(i){return[2,Gq(t.type)]})})()},i.Zq=function(t){return Vt(function(){return zt(this,function(i){return[2,Np(t)]})})()},Nt(t,[{key:"tz",get:function(){return Ab.wC}}]),t}();function Gq(t){if(!t)return!1;var i=t.toLowerCase();return Fo(i,cA.mC)||Fo(i,cA.wC)}var jq=function(t){function i(){return t.apply(this,arguments)||this}Ct(i,t);var n=i.prototype;return n.DC=function(t,i,n,r,e,s,u){var o=new xO(i),h=o.Yq(eg.Mk);return new Xq(h,n,e,s,o,r)},n.Jq=function(i,n){return Ui.yx&&Gd?Bi.w_||Bi.S_||Bi.D_?ut.resolve(!1):Pe(i.useManagedMediaSource)?t.prototype.Jq.call(this,i,n):ut.resolve(!1):ut.resolve(!1)},n.$q=function(){return!1},i}(qq);GT(new jq),U(),Et(),Wt(),xt(),Pt(),H(),Qt(),U(),Et(),Wt(),Pt(),Qt();var Qq=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,r,e,u)||this).Nq=void 0,o.Nq=s,o}Ct(i,t);var n=i.prototype;return n.zP=function(){if(wO(this.PL))return this.PL.zP()},n.kn=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.Nq.Dq(this.PL)];case 2:return n.sent(),[2]}})}).call(this)},i}(zq),Yq=function(t){function i(){return t.apply(this,arguments)||this}Ct(i,t);var n=i.prototype;return n.Jq=function(i,n){var r=this;return Vt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return Bi.IS_IOS_CHROME?[2,!1]:[4,t.prototype.Jq.call(r,i,n)];case 1:if(u=h.sent(),!(null!=(o=null==(s=Rr())||null==(e=s.canPlayType)?void 0:e.call(s,cA._C))?o:"")||!u||!("serviceWorker"in l))return[2,!1];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,Tr(l.serviceWorker.ready,1e3)];case 3:return h.sent(),[2,!0];case 4:return h.sent(),[2,!1];case 5:return[2]}})})()},n.Zq=function(i){var n=this;return Vt(function(){return zt(this,function(r){switch(r.label){case 0:return i.fairplay?[4,t.prototype.Zq.call(n,i)]:[2,!1];case 1:return[2,r.sent()]}})})()},n.DC=function(t,i,n,r,e,s,u){if(V(t,HTMLDivElement)){var o=i.Pst(eg.Mk);return new Qq(o,n,e,s,i,r)}throw new ld(vd.CONFIGURATION_ERROR,"Container Div element expected.")},n.$q=function(){return!1},Nt(i,[{key:"tz",get:function(){return Ab.xW}}]),i}(qq);Bi.X_&&Bi.ru&>(new Yq),U(),Et(),U(),Et(),U(),Et(),Wt(),xt(),Pt(),H(),ct(),Ft(),Qt(),U(),Et(),xt();var Kq="theo_live_user_id",Jq=function(){function t(t){this.externalId=void 0,this.id=void 0,this.userId=void 0,this.AA=void 0,this.externalId=t,this.id=QE(),this.userId=Zq(),this.AA=0}return t.prototype.incrementSequenceNumber=function(){this.AA+=1},Nt(t,[{key:"sequenceNumber",get:function(){return this.AA}}]),t}();function Zq(){try{var t=localStorage.getItem(Kq);if(t)return t;var i=QE();return localStorage.setItem(Kq,i),i}catch(t){return QE()}}function $q(t){var i;return{hespSrc:t.hespSrc,type:"theo.live",hlsSrc:t.hlsSrc,maxMobileBitrate:t.maxMobileBitrate,targetLatency:null==(i=t.metadata.customization)?void 0:i.targetLatency,contentProtection:t.drmConfig?t.drmConfig:void 0}}function tG(t){var i=t.integration,n=t.widevine,r=t.playready,e=t.fairplay;return Yu({integration:i},n&&{widevine:{licenseAcquisitionURL:n.licenseUrl}},r&&{playready:{licenseAcquisitionURL:r.licenseUrl}},e&&{fairplay:{licenseAcquisitionURL:e.licenseUrl,certificateURL:e.certificateUrl}})}function iG(t,i){return{id:t.id,name:t.name,deleted:"deleted"===t.status,targetLatency:t.source.targetLatency,maxMobileBitrate:t.source.maxMobileBitrate,endpoints:[{hespSrc:t.source.hespSrc,hlsSrc:t.source.hlsSrc,weight:1,priority:1,contentProtection:t.source.contentProtection},t.fallback&&i?{hespSrc:t.fallback.hespSrc,hlsSrc:t.fallback.hlsSrc,weight:1,priority:2,contentProtection:t.fallback.contentProtection}:void 0].filter(Li)}}U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),U(),Et(),Wt(),ct(),Qt(),U(),Et();var nG=function(t){return t.STARTING="s",t.PLAYING="p",t.SEEKING="k",t.REBUFFERING="r",t.PAUSED="a",t.ENDED="e",t.QUIT="q",t}({}),rG=function(t){return t.MANIFEST="m",t.AUDIO="a",t.VIDEO="v",t.OTHER="o",t}({});function eG(t){return 100*b.round(t/100)}function sG(t){for(var i=t.Gx(),n=t.Ux(),r=0;r0&&void 0!==n&&void 0!==i&&(this.hBt+=1,this.oBt=this.aBt(this.oBt,n),this.uBt=this.aBt(this.uBt,1e3*this.oa.VP.Cd.targetOffset),this.cq=this.aBt(this.cq,1e3*i),this.cBt=this.aBt(this.cBt,t/1e3))},i.aBt=function(t,i){return t+(i-t)/this.hBt},i.DC=function(){var t={sta:this.Vp,ts:this.nBt,"theo-vt":this.dBt,"theo-at":this.lBt,"theo-d":this.ct,"theo-r":this._f,"theo-e":this.nq};return this.hBt>0?Yu({},t,{bl:eG(this.oBt),tbl:eG(this.uBt),ltc:eG(this.cq),mtp:eG(this.cBt),"theo-w":this.hBt}):t},i.fBt=function(){return new t(this.Vp,this.oa,this._f)},t.starting=function(i,n,r){return new t(nG.STARTING,i,n,r)},t.playing=function(i){return new t(nG.PLAYING,i)},t.seeking=function(i,n){return new t(nG.SEEKING,i,n)},t.rebuffering=function(i,n){return new t(nG.REBUFFERING,i,n)},t.paused=function(i){return new t(nG.PAUSED,i)},t.ended=function(i){return new t(nG.ENDED,i)},t.quit=function(i){return new t(nG.QUIT,i)},Nt(t,[{key:"ct",get:function(){return Date.now()-this.nBt}}]),t}(),cG=function(){function t(t,i,n){var r=this;this.oa=void 0,this.yBt=void 0,this.kBt=void 0,this.BBt=void 0,this.gBt=void 0,this.ABt=[],this._Bt=void 0,this.DNt=!1,this.uX=!1,this.CBt=function(t){var i,n,e;r.SBt(aG.starting(r.oa,"fallback",null!=(e=null==(i=t.reason)?void 0:i.message)?e:null==(n=r.oa.Zx())?void 0:n.message))},this.RBt=function(){r.SBt(aG.starting(r.oa,"loadChannel"))},this.DBt=function(){r.SBt(aG.ended(r.oa))},this.KW=function(t){t.Ht.wn(Nw.II,r.ih)},this.ih=function(){var t,i,n,e,s=null==(i=uG(r.oa.rt))||null==(t=i.YI)?void 0:t.o,u=null==(e=uG(r.oa.ht))||null==(n=e.YI)?void 0:n.o;s&&u&&(r._Bt&&r._Bt.Vp===nG.PLAYING&&r._Bt.dBt===s&&r._Bt.lBt===u||r.SBt(aG.playing(r.oa)))},this.NL=function(){r.DNt=!0,r.uX=!1,r.SBt(aG.playing(r.oa))},this.PBt=function(){r.DNt&&!r.uX&&(r.uX=!0,r.SBt(aG.seeking(r.oa,"latencyRecovery")))},this.IBt=function(){r.DNt&&!r.uX&&(r.uX=!0,r.SBt(aG.seeking(r.oa,"goLive")))},this.DL=function(){r.oa.xP||r.SBt(aG.rebuffering(r.oa,"visible"===v.visibilityState?void 0:"invisible"))},this.xBt=function(){r.SBt(aG.paused(r.oa))},this.NBt=function(t){var i=Ui.Dh(t.url),n=function(t){var i=t.pathname;if(Uo(i,"manifest.json"))return rG.MANIFEST;if(Lo(i,"/video/"))return rG.VIDEO;if(Lo(i,"/audio/"))return rG.AUDIO;return rG.OTHER}(i);if(n!==rG.OTHER){r.gBt.incrementSequenceNumber();var e=Yu({},t.headers,{"CMCD-Request":r.vBt(),"CMCD-Object":r.pBt(n),"CMCD-Status":r.mBt(),"CMCD-Session":r.wBt()});n===rG.VIDEO&&!Uo(i.pathname,".hspi")&&r._Bt&&(r.SBt(r._Bt.fBt()),e=Yu({},e,r.bBt())),t.redirect(Yu({},t,{headers:e}))}},this.EBt=function(){kr(r.TBt())},this.oa=t,this.yBt=i,this.gBt=n;var e=i.endpoints[0],s=(null==e?void 0:e.hespSrc)||(null==e?void 0:e.hlsSrc)||"";this.kBt=Ui.Dh("bye",s).href,f.addEventListener("beforeunload",this.EBt),this.oa.wn(Ry.PM,this.NL),this.oa.wn(Ry.xM,this.DL),this.oa.wn(eh.jw,this.xBt),this.oa.$x.wn("latencyrecoveryseek",this.PBt),this.oa.$x.wn("golive",this.IBt),this.oa.lX.bY(this.NBt),this.oa.rt.wn(Iw.rI,this.KW),this.oa.ht.wn(Iw.rI,this.KW),this.oa.pnt.addEventListener("intenttofallback",this.CBt),this.oa.pnt.addEventListener("distributionloadstart",this.RBt),this.oa.pnt.addEventListener("distributionoffline",this.DBt),this._Bt=aG.starting(this.oa,"loadchannel"),this.BBt=Ui.fm(function(){var t;null==(t=r._Bt)||t.rBt()},1e3)}var i=t.prototype;return i.vBt=function(){var t,i=this.oa.VP.OL,n=sG(this.oa),r=this.oa.lX.CY.IW;return fG({bl:void 0!==n?eG(n):void 0,tbl:eG(1e3*this.oa.VP.Cd.targetOffset),ltc:void 0!==i?eG(1e3*i):void 0,mtp:void 0!==r?eG(r/1e3):void 0,sta:null==(t=this._Bt)?void 0:t.Vp,su:!this.DNt||void 0,"theo-sq":this.gBt.sequenceNumber})},i.pBt=function(t){var i,n,r=function(t,i){switch(i){case rG.VIDEO:return uG(t.rt);case rG.AUDIO:return uG(t.ht)}}(this.oa,t);return fG({br:(null==r||null==(i=r.YI)?void 0:i.IW)?eG((null==r||null==(n=r.YI)?void 0:n.IW)/1e3):void 0,ot:t,tb:r?eG(hG(r).IW/1e3):void 0,lb:r?eG(oG(r).IW/1e3):void 0})},i.mBt=function(){return fG({"theo-cw":this.oa.xe.clientWidth,"theo-ch":this.oa.xe.clientHeight,"theo-m":this.oa.oP,"theo-vo":b.ceil(100*this.oa.OP)})},i.wBt=function(){var t;return fG({sf:vG(this.oa.bt),sid:this.gBt.id,st:"l",v:2,"theo-eid":null==(t=this.gBt.externalId)?void 0:t.substring(0,128),"theo-cn":this.yBt.name.substring(0,128),"theo-v":"10.3.0","theo-t":"web","theo-u":this.gBt.userId})},i.bBt=function(){var t={"CMCD-States":btoa(JSON.stringify(this.ABt))};return this.ABt=[],t},i.SBt=function(t){this._Bt&&this.ABt.push(this._Bt.DC()),this._Bt=t},i.TBt=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this._Bt&&(this.ABt.push(this._Bt.DC()),this._Bt=void 0),this.ABt.push(aG.quit(this.oa).DC()),t=Yu({},this.bBt(),{"CMCD-Session":this.wBt()}),[4,this.oa.Dx.vk({Yu:this.kBt,_k:t,Yk:!0})];case 1:return[4,i.sent().lk()];case 2:return i.sent(),[2]}})}).call(this)},i.destroy=function(){var t=this;this.EBt(),f.removeEventListener("beforeunload",this.EBt),this.oa.mn(Ry.PM,this.NL),this.oa.mn(Ry.xM,this.DL),this.oa.mn(eh.jw,this.xBt),this.oa.$x.mn("latencyrecoveryseek",this.PBt),this.oa.$x.mn("golive",this.IBt),this.oa.rt.mn(Iw.rI,this.KW),this.oa.ht.mn(Iw.rI,this.KW),this.oa.rt.NI.forEach(function(i){return i.mn(Nw.II,t.ih)}),this.oa.ht.NI.forEach(function(i){return i.mn(Nw.II,t.ih)}),this.oa.pnt.removeEventListener("intenttofallback",this.CBt),this.oa.pnt.removeEventListener("distributionloadstart",this.RBt),this.oa.pnt.removeEventListener("distributionoffline",this.DBt),this.oa.lX.TY(this.NBt),Ui.vm(this.BBt)},t}();function fG(t){return k.keys(t).map(function(i){return function(t,i){switch(void 0===i?"undefined":W(i)){case"boolean":return i?t:t+"=false";case"number":return t+"="+i;case"string":return t+'="'+i+'"';default:return}}(i,t[i])}).filter(Boolean).sort().join(",")}function vG(t){if(t)return t.type===cA._C||t.type===cA.gC?"h":t.type===cA.wC?"e":void 0}var dG=function(t){function i(i,n,r){var e;return(e=t.call(this,i,"Could not load channel with id "+n+": "+r)||this).channelId=void 0,e.reason=void 0,e.channelId=n,e.reason=r,e}return Ct(i,t),i}(ld),lG=function(t){function i(i){return t.call(this,vd.THEO_LIVE_CHANNEL_NOT_FOUND,i,"The channel could not be found")||this}return Ct(i,t),i}(dG),wG=function(t){function i(i){return t.call(this,vd.THEO_LIVE_CHANNEL_NOT_FOUND,i,"This account has been locked")||this}return Ct(i,t),i}(dG),gG=function(t){function i(i){return t.call(this,vd.THEO_LIVE_CHANNEL_NOT_FOUND,i,"The channel got deleted")||this}return Ct(i,t),i}(dG),_G=function(){function t(t,i){this.aV=void 0,this.LBt=void 0,this.MBt=void 0,this.aV=t,this.LBt=i,this.MBt=new Map}return t.prototype.Jgt=function(t){var i=this.MBt.get(t);if(i)return i;var n=new mG(t,this.aV,this.LBt);return this.MBt.set(t,n),n},t}(),mG=function(){function t(t,i,n){var r;this.aS=void 0,this.aV=void 0,this.LBt=void 0,this.FBt=void 0,this.VBt=void 0,this.UBt=void 0,this.WBt=void 0,this.aS=t,this.aV=i,this.LBt=n,this.WBt=new Vd,this.LBt.discoveryHeader&&this.WBt.append("x-theolive-discovery",this.LBt.discoveryHeader),this.WBt.set("CMCD-Session",fG({sid:this.LBt.sessionId,st:"l",v:2,"theo-eid":null==(r=this.LBt.externalSessionId)?void 0:r.substring(0,128),"theo-v":"10.3.0","theo-t":"web","theo-u":this.LBt.userId})),this.er()}var i=t.prototype;return i.er=function(){var t=this;this.UBt=!1,this.FBt=ae(),this.VBt=this.KSt(),this.VBt.catch(function(){return t.UBt=!0})},i.KSt=function(){return Vt(function(){var t,i,n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:t=Lt(this.LBt.discoveryUrls),f.label=1;case 1:return(i=t()).done?[3,8]:(n=i.value,[4,this.HBt(this.aS,n,this.WBt)]);case 2:if(!(r=f.sent()))return[3,7];if(!function(t){return void 0!==t.mode}(r))return[3,6];if(e=r.mode,s=r.status,u=r.fallback,o=r.metadata,"locked"===e)throw new wG(this.aS);if("deleted"===s)throw new gG(this.aS);return a={id:this.aS,name:o.name,mode:e,status:s,source:$q(r)},u?[4,this.qBt(u,n,this.WBt)]:[3,4];case 3:return c=f.sent(),[3,5];case 4:c=void 0,f.label=5;case 5:return[2,iG.apply(void 0,[(a.fallback=c,a.insights=null==o?void 0:o.insights,a.enhancedLogging=null==o?void 0:o.enhancedLogging,a.customization=null==o?void 0:o.customization,a.sseEndpoint=r.sseEndpoint,a),null==(h=this.LBt.fallbackEnabled)||h])];case 6:return[2,r];case 7:return[3,1];case 8:throw new lG(this.aS)}})}).call(this)},i.qBt=function(t,i,n){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return"hls"===t.type?[2,{hlsSrc:t.src,type:"hls"}]:[4,this.HBt(t.src,i,n)];case 1:return(r=e.sent())?[2,$q(r)]:[2,void 0]}})}).call(this)},i.HBt=function(t,i,n){return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),(r=Ui.Dh(t,i)).searchParams.set("osName",function(){var t=Ui.Zs.ap;if("ios"===t||"macos"===t)return"apple";return t}()),r.searchParams.set("deviceType",Ui.Zs.cp),r.searchParams.set("sdkType","web"),[4,this.aV.vk({Yu:r.toString(),_k:n})];case 1:return[4,e.sent().VT()];case 2:return[2,e.sent()];case 3:return e.sent(),[2,void 0];case 4:return[2]}})}).call(this)},Nt(t,[{key:"OBt",get:function(){return ae()-this.FBt>36e5}},{key:"zBt",get:function(){return(this.UBt||this.OBt)&&this.er(),this.VBt}}]),t}();U(),Et(),Wt(),xt(),Pt(),Qt();var yG=function(t){function i(i){var n;return(n=t.call(this,"distributionloadstart")||this).distributionId=void 0,n.distributionId=i,n}return Ct(i,t),i}(rh),pG=function(t){function i(i){var n;return(n=t.call(this,"distributionoffline")||this).distributionId=void 0,n.distributionId=i,n}return Ct(i,t),i}(rh),kG=function(t){function i(i){var n;return(n=t.call(this,"endpointloaded")||this).endpoint=void 0,n.endpoint=i,n}return Ct(i,t),i}(rh),bG=function(t){function i(i){var n;return(n=t.call(this,"intenttofallback")||this).reason=void 0,n.reason=i,n}return Ct(i,t),i}(rh),AG=function(t){function i(){return t.call(this,"enterbadnetworkmode")||this}return Ct(i,t),i}(rh),TG=function(t){function i(){return t.call(this,"exitbadnetworkmode")||this}return Ct(i,t),i}(rh),SG=function(t){function i(i){var n;return(n=t.call(this)||this).oa=void 0,n.hu=void 0,n.oa=i,n}return Ct(i,t),i.prototype.jBt=function(t){return this.oa.jBt(t)},Nt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{addEventListener:function(i,n){t.wn(i,n)},removeEventListener:function(i,n){t.mn(i,n)},get badNetworkMode(){return t.GBt},set badNetworkMode(i){t.GBt=i},get authToken(){return t.XBt},set authToken(i){t.XBt=i},preloadPublications:function(i){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.jBt(i)];case 1:return[2,n.sent().map(function(t){return{name:t.name}})]}})})()}}}(this)),this.hu}},{key:"GBt",get:function(){return this.oa.GBt},set:function(t){this.oa.GBt=t}},{key:"XBt",get:function(){return this.oa.XBt},set:function(t){this.oa.XBt=t}}]),i}(th);var EG=["https://discovery.theo.live/channels/"],IG=8e5,RG=function(t){function i(i,n){var r,e;(r=t.call(this,i,n)||this).ZBt=void 0,r.gBt=void 0,r.uMt=void 0,r.dMt=void 0,r.lMt=void 0,r.Ac=void 0,r.mz=void 0,r.cMt=void 0,r.yBt=void 0,r.pMt=void 0,r.fNt=!1,r.Wz=void 0,r.nq=void 0,r.hT=new hr,r.YBt=void 0,r.DNt=!1,r.d9=!1,r._Mt=void 0,r.mMt=void 0,r.iMt=void 0,r.tMt=void 0,r.wMt=[],r.nMt=!1,r.oMt=void 0,r.eMt=!0,r.JBt=0,r.sMt=void 0,r.KW=function(t){var i,n,e=t.Ht,s=null==(i=r.yBt)?void 0:i.maxMobileBitrate;void 0!==s&&Ui.Zs.Ks&&e.$I.NI.filter(function(t){return t.IW>s}).forEach(function(t){return e.$I.pS(t)});e.wn(Nw.II,r.ih);var u=CG(null!=(n=e.tC)?n:e.$I.NI);e.tC=u.length>0?u:CG(e.$I.NI)},r.ih=function(t){var i,n=t.qot;(!n||(null!=(i=n.wyt)?i:n.IW)>=IG)&&r.hMt()},r.PBt=function(){r.rMt(),r.wMt.push(Ui.Mg()),r.wMt=r.wMt.filter(function(t){return Ui.Mg()-t<=3e5}),r.wMt.length>=3&&(r.wMt=[],r.ZBt.So(new bG(new ld(vd.THEO_LIVE_UNKNOWN_ERROR,"Unstable playback detected."))),kr(r.$Bt()))},r.aMt=function(t){r.fNt&&r.oMt&&("manifest"!==t.type&&"segment"!==t.type||(t.headers.Authorization="Bearer "+r.oMt,t.redirect(t)))},r.ZBt=new SG(r);var s,u,o,h=i.Cd.theoLive;return r.dMt={sessionId:null!=(s=null==h?void 0:h.sessionId)?s:QE(),userId:null!=(u=null==h?void 0:h.userId)?u:Zq(),externalSessionId:null==h?void 0:h.externalSessionId,analyticsEnabled:!1!==(null==h?void 0:h.analyticsEnabled),fallbackEnabled:!1!==(null==h?void 0:h.fallbackEnabled),discoveryUrls:[].concat([null==h?void 0:h.discoveryUrl],null!=(o=null==h?void 0:h.discoveryUrls)?o:[],EG).filter(Li).map(function(t){return t.lastIndexOf("/")===t.length-1?t:t+"/"})},r.gBt=new Jq(null==(e=r.dMt)?void 0:e.externalSessionId),r.uMt=new _G(i.Dx,r.dMt),r.oa.$x.wn("latencyrecoveryseek",r.PBt),r}Ct(i,t);var n=i.prototype;return n.QBt=function(){this.oa.$x.wn("latencyrecoveryseek",this.PBt),this.oa.rt.wn(Iw.rI,this.KW)},n.KBt=function(){this.oa.$x.mn("latencyrecoveryseek",this.PBt),this.oa.rt.mn(Iw.rI,this.KW)},n.eI=function(i){var n=this;if(!this.fNt||this.nq||this.Wz)return t.prototype.eI.call(this,i);if(i.type===Ry.PM)return void 0!==this.YBt?(Ui.Lg(this.YBt),this.YBt=void 0,this.DNt||this.So(new Ly(this.Gx()))):this.So(new Ly(this.Gx())),this.JBt=0,this.DNt=!0,!0;if(i.type===Ry.xM)return this.YBt||(this.YBt=Ui.Og(function(){n.So(new By(n.Gx())),n.YBt=void 0},100)),!0;if(i.type===qm.ma){var r;this.JBt++;var e=(null==(r=this.mz)?void 0:r.src)&&NG(this.mz.src),s=this.JBt>5;return e||s?(this.dispatchErrorEvent(i.errorObject),!0):(this.ZBt.So(new bG(i.errorObject)),kr(this.$Bt()),!0)}if(i.type===eh.uo){if(this.tMt=Ui.Mg(),void 0===this.iMt&&void 0!==this.oa.bt&&(this.iMt=Ui.fm(function(){var t;Ui.Mg()-(null!=(t=n.tMt)?t:0)>15e3&&(n.ZBt.So(new bG(new ld(vd.THEO_LIVE_UNKNOWN_ERROR,"Indefinite stall detected"))),kr(n.$Bt()))},1e3)),this.oa.bt&&(this.eMt=!1),this.eMt)return!0}else if(i.type===eh.jw){if(void 0!==this.iMt&&(Ui.vm(this.iMt),this.iMt=void 0),this.oa.bt&&(this.eMt=!0),!this.eMt)return!0}else i.type===eh.py?this.tMt=Ui.Mg():i.type===Ry.EM?this.sMt&&(!function(t,i){if(t.rt.V>0){var n,r=t.rt.MI(0);if(r.Rt=i.enabledVideo,r.Rt)r.tC=null==(n=i.targetVideoQualities)?void 0:n.map(function(t){return Fn(r.$I.NI,function(i){return i.IW===t})}).filter(Li)}for(var e,s=Fn(t.ht.NI,function(t){return t.bs===i.enabledAudioLanguage}),u=Lt(t.ht.NI);!(e=u()).done;){var o=e.value;o.Rt=o===s}for(var h,a=Lt(t.nt.NI);!(h=a()).done;){var c,f=h.value,v=null!=(c=i.textTrackModes.get(f.o))?c:zm.Nh;f.Qk!==v&&(f.Qk=v)}}(this.oa,this.sMt),this.sMt=void 0):i.type===eh.sy&&(this.ZBt.So(new bG(new ld(vd.THEO_LIVE_UNKNOWN_ERROR,"manifest not found"))),kr(this.$Bt()));return t.prototype.eI.call(this,i)},n.mnt=function(){return this.ZBt.Ca},n.Yx=function(){return this.fNt?this.Wz:t.prototype.Yx.call(this)},n.Zx=function(){return this.fNt?this.nq:t.prototype.Zx.call(this)},n.rMt=function(){if(!this.nMt&&(this.nMt=!0,this.ZBt.So(new AG),0!==this.oa.rt.V)){var t,i=this.rt.MI(0),n=tr(i.$I.NI,function(t){return t.IW});(null!=(t=n.wyt)?t:n.IW)0?n:CG(i.$I.NI)}},n.jBt=function(t){var i=this;return ut.all(t.map(function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,gr(this.uMt.Jgt(t).zBt,this.hT.Yg)];case 1:return[2,i.sent()]}})}).call(i)}))},n.nu=function(){var i;return null!=(i=this.Ac)?i:t.prototype.nu.call(this)},n.Ta=function(i,n){var r=this,e=function(){return t.prototype.Ta};return Vt(function(){var t,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:this.fNt=!1,s=Lt(null!=(t=null==i?void 0:i.sources)?t:[]),f.label=1;case 1:return(u=s()).done?[3,8]:oT(o=u.value)&&o.type===cA.bC&&o.src?(this.fNt=!0,this.Ac=i,this.mz=o,this.ZBt.So(new yG(o.src)),this.QBt(),NG(o.src)?(h=Yu({},i,{sources:[Yu({},o,{type:cA.wC,useManagedMediaSource:!0})]}),[4,e().call(r,h,n)]):[3,3]):[3,7];case 2:return f.sent(),[2];case 3:this.cMt=this.uMt.Jgt(o.src),f.label=4;case 4:return f.trys.push([4,6,,7]),[4,this.cMt.zBt];case 5:return a=f.sent(),this.yBt=a,this.dMt.analyticsEnabled&&(this.lMt=new cG(this,a,this.gBt)),[2];case 6:throw lr(c=f.sent()),this.fMt(),c;case 7:return[3,1];case 8:return[4,e().call(r,i,n)];case 9:return[2,f.sent()]}})}).call(this)},n.fP=function(){return this.fNt?this.eMt:t.prototype.fP.call(this)},n.QP=function(){this.d9||(this.d9=!0,this.vMt(!1)),this.eMt=!1,t.prototype.QP.call(this)},n.jP=function(){this.eMt=!0,t.prototype.jP.call(this)},n.$Bt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return void 0!==this.oa.bt&&(null!=this.sMt||(this.sMt=function(t){var i,n,r=Fn(t.rt.NI,function(t){return t.Rt}),e=null==r||null==(i=r.tC)?void 0:i.map(function(t){return t.IW}),s=null==(n=Fn(t.ht.NI,function(t){return t.Rt}))?void 0:n.bs,u=Ju();return t.nt.NI.forEach(function(t){return u.set(t.o,t.Qk)}),{enabledVideo:Boolean(r),targetVideoQualities:e,enabledAudioLanguage:s,textTrackModes:u}}(this.oa))),[4,this.oa.KP().catch(dn)];case 1:return t.sent(),this.vMt(!0),[2]}})}).call(this)},n.vMt=function(t){var i=this;if(this.cMt&&!this._Mt){this.fMt();var n=function(){i._Mt=void 0};this._Mt=this.gMt(this.cMt,t).then(n).catch(n)}},n.gMt=function(t,i){return Vt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return n=this,i&&t.er(),[4,t.zBt];case 1:return r=o.sent(),this.yBt=r,[4,this.selectEndpoint(r,this.pMt)];case 2:if(e=o.sent(),this.pMt=e,!e)return[3,7];s=this.convertEndpointToSource(r,e),o.label=3;case 3:return o.trys.push([3,5,,6]),[4,this.oa.Ta(s,(new hr).Yg)];case 4:return o.sent(),[3,6];case 5:return u=o.sent(),this.dispatchErrorEvent(u),this.fMt(),[2];case 6:return this.ZBt.So(new kG(e)),this.eMt||this.oa.QP(),[3,8];case 7:this.ZBt.So(new pG(r.id)),this.mMt=Ui.Og(function(){return n.vMt(!0)},15e3),o.label=8;case 8:return[2]}})}).call(this)},n.convertEndpointToSource=function(t,i){var n,r,e={sources:[this.getHespSource(t,i),this.getMillicastSource(i),this.getHlsSource(i)].filter(Li),ads:this.DNt?[]:null==(n=this.Ac)?void 0:n.ads,blockContentIfAdError:null==(r=this.Ac)?void 0:r.blockContentIfAdError,streamType:"live"};if(i.adSrc||i.daiAssetKey){var s,u=null!=(s=e.ads)?s:[],o=u.filter(function(t){return"theoads"===t.integration});o.length>0?o.forEach(function(t){var n,r,e=t;e.sseEndpoint=null!=(n=i.adSrc)?n:e.sseEndpoint,e.daiAssetKey=null!=(r=i.daiAssetKey)?r:e.daiAssetKey}):u.push({integration:"theoads",sseEndpoint:i.adSrc,daiAssetKey:i.daiAssetKey}),e.ads=u}i.dvrWindow&&(e.dvr=Yu({},e.dvr,{windowLength:i.dvrWindow}));var h=cE(e);return h.sources[0].bypassLicense=!0,h},n.getHespSource=function(t,i){var n,r;if(i.hespSrc)return{type:cA.wC,src:i.hespSrc,contentProtection:i.contentProtection?tG(i.contentProtection):void 0,useManagedMediaSource:!0,latencyConfiguration:null!=(r=null==(n=this.mz)?void 0:n.latencyConfiguration)?r:PG(t.targetLatency),hesp:{maxMobileBitrate:t.maxMobileBitrate}}},n.getHlsSource=function(t){if(t.hlsSrc)return{type:cA.gC,src:t.hlsSrc,contentProtection:t.contentProtection?tG(t.contentProtection):void 0}},n.getMillicastSource=function(t){if(t.millicastSrc)return{type:cA.yC,src:t.millicastSrc.name,streamAccountId:t.millicastSrc.accountId,subscriberToken:t.millicastSrc.subscriberToken}},n.dispatchErrorEvent=function(t){var i=V(t,ld)?t:new ld(vd.THEO_LIVE_UNKNOWN_ERROR,t.message,t);this.Wz=cg(i),this.nq=i,this.fMt(),this.So(new yb(i))},n.fMt=function(){void 0!==this.YBt&&(Ui.Lg(this.YBt),this.YBt=void 0),void 0!==this.mMt&&(Ui.Lg(this.mMt),this.mMt=void 0),void 0!==this.iMt&&(Ui.vm(this.iMt),this.iMt=void 0)},n.KP=function(){var i;return this.hT.Zg(),this.hT=new hr,this.KBt(),this.fMt(),this.tMt=void 0,this.fNt=!1,this.d9=!1,this.DNt=!1,null==(i=this.lMt)||i.destroy(),this.lMt=void 0,this.Ac=void 0,this.mz=void 0,this.cMt=void 0,this.yBt=void 0,this.pMt=void 0,this.nq=void 0,this.Wz=void 0,this.JBt=0,this.wMt=[],this.eMt=!0,this.sMt=void 0,this.nMt&&this.hMt(),t.prototype.KP.call(this)},n.kn=function(i){var n=this;return Vt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return this.hT.Zg(),this.oa.lX.TY(this.aMt),void 0!==this.YBt&&(Ui.Lg(this.YBt),this.YBt=void 0),this.Vo(),this.KBt(),null==(r=this.lMt)||r.destroy(),this.oa.$x.mn("latencyrecoveryseek",this.PBt),[4,t.prototype.kn.call(n,i)];case 1:return e.sent(),[2]}})}).call(this)},n.selectEndpoint=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a,c,f,v;return zt(this,function(d){switch(d.label){case 0:r=function(){var t,i,r,u;return zt(this,function(o){switch(o.label){case 0:t=a.value,i=s.filter(function(i){return i.priority===t}),o.label=1;case 1:return i.length>0?(r=function(t){var i=t.reduce(function(t,i){return t+i.weight},0);if(0===i){return t[b.floor(b.random()*t.length)]}for(var n,r=b.random()*i,e=0,s=Lt(t);!(n=s()).done;){var u=n.value;if(r<=(e+=u.weight))return u}return t[t.length-1]}(i),[4,DG(r,n.oa.Dx)]):[3,3];case 2:return"online"===(u=o.sent())?[2,{v:r}]:("invalid-security"===u&&(e=!0),Xn(i,r),[3,1]);case 3:return[2]}})},e=!1,s=t.endpoints.slice().filter(function(t){return!i||!function(t,i){return t.hespSrc===i.hespSrc&&t.hlsSrc===i.hlsSrc&&t.adSrc===i.adSrc}(t,i)}),u=nr(s.map(function(t){return t.priority})),o=u.sort(),h=Lt(o),d.label=1;case 1:return(a=h()).done?[3,4]:(n=this,[5,Xt(r())]);case 2:if("object"===W(c=d.sent()))return[2,c.v];d.label=3;case 3:return[3,1];case 4:return i?[4,DG(i,this.oa.Dx)]:[3,6];case 5:if("online"===(f=d.sent()))return[2,i];"invalid-security"===f&&(e=!0),d.label=6;case 6:if(e)throw v=new ld(vd.MEDIA_LOAD_ERROR,"Trying to play a stream without the correct authorization."),this.dispatchErrorEvent(v),v;return[2,void 0]}})}).call(this)},Nt(i,[{key:"GBt",get:function(){return this.nMt},set:function(t){this.fNt&&(t?this.rMt():this.hMt())}},{key:"XBt",get:function(){return this.oMt},set:function(t){this.oMt=t,this.oa.lX.TY(this.aMt),this.oMt&&this.oa.lX.bY(this.aMt)}}]),i}(Ub);function CG(t){return t.filter(function(t){var i;return(null!=(i=t.wyt)?i:t.IW)>=IG})}function PG(t){return void 0===t?Yu({},Yz(),{forceSeekOffset:20}):{minimumOffset:t-DA,targetOffset:t,maximumOffset:t+DA,forceSeekOffset:20,minimumPlaybackRate:CA,maximumPlaybackRate:PA}}function DG(t,i){return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n=t.hespSrc||t.hlsSrc,[4,i.vk({Yu:n,Km:yl.bk,Wk:3e3})];case 1:return(r=s.sent()).dk>=200&&r.dk<300?[2,"online"]:[3,3];case 2:return V(e=s.sent(),Ol)&&403===e.uE.dk?[2,"invalid-security"]:[3,3];case 3:return[2,"offline"]}})})()}function NG(t){try{return Uo(Ui.Dh(t).pathname,"manifest.json")}catch(t){return!1}}qb(function(t){return new RG(t)},zb.bC),U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et();var xG=function(t){function i(i){var n;return(n=t.call(this,i)||this).Ac=void 0,n.yMt=void 0,n.AMt=void 0,n.SMt=void 0,n.Yo=0,n.k9=void 0,n.T9=void 0,n}Ct(i,t);var n=i.prototype;return n.Ta=function(i,n){if(this.Ac=i,Li(null==i?void 0:i.dvr)&&i.dvr.windowLength>=60&&i.sources.length>=2){var r=Fn(i.sources,function(t){return tT(t)||JA(t)}),e=Fn(i.sources,function(t){return $A(t)&&(GA(t.type)||qA(t.type))});Li(r)&&Li(e)&&(this.Yo=1,this.yMt=this.bMt(i,r),this.AMt=this.bMt(i,e),this.SMt=i.dvr.windowLength)}return t.prototype.Ta.call(this,i,n)},n.nu=function(){return this.Ac},n.KP=function(){var i=this;return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return null==(n=this.T9)||n.Zg(),this.T9=void 0,void 0===this.k9?[3,2]:[4,this.k9.catch(dn)];case 1:r.sent(),this.k9=void 0,r.label=2;case 2:return this.Ac=void 0,this.Yo=0,this.yMt=void 0,this.AMt=void 0,this.SMt=void 0,[4,t.prototype.KP.call(i)];case 3:return r.sent(),[2]}})}).call(this)},n.EP=function(){var i,n=t.prototype.EP.call(this);if(!this.oL||this.GX.xJ)return n;if(0===n.length||1===this.Yo){var r=Date.now()/1e3,e=this.SMt;i=new EA([r-e,r])}else i=EA.jn(n).Ly(this.uAt());return i._s()},n.Xx=function(i,n){var r;if(!this.oL)return t.prototype.Xx.call(this,i,n);null==(r=this.T9)||r.Zg(),this.T9=new hr,this.k9=_r(this.E9(i,this.k9,this.T9.Yg),this.T9),this.k9.catch(dn)},n.eI=function(i){return this.oL?i.type===eh.py?(this.So(new bw(this.Gx(),this.Hx())),!0):i.type===eh.Zw?(this.So(new gT(this.Gx())),!0):t.prototype.eI.call(this,i):t.prototype.eI.call(this,i)},n.E9=function(i,n,r){var e=this;return Vt(function(){var s,u;return zt(this,function(o){switch(o.label){case 0:return void 0===n?[3,2]:[4,n.catch(dn)];case 1:o.sent(),o.label=2;case 2:return dr(r),i!==1/0?[3,6]:1===this.Yo?[3,4]:(this.So(new wT(i)),[4,this.kMt(this.yMt,r)]);case 3:return o.sent(),[3,5];case 4:t.prototype.Xx.call(e,i),o.label=5;case 5:return[2];case 6:return s=!1,2===this.Yo?[3,8]:(this.So(new wT(i)),s=!0,[4,this.TMt(this.AMt,r)]);case 7:o.sent(),o.label=8;case 8:if(!S(this.Nd()))return[3,12];s||this.So(new wT(i)),o.label=9;case 9:return[4,this.ww(eh.Cw,r)];case 10:o.sent(),o.label=11;case 11:if(S(this.Nd()))return[3,9];o.label=12;case 12:u=new Date(1e3*i),t.prototype.Wx.call(e,u),o.label=13;case 13:return[2]}})}).call(this)},n.Gx=function(){var i,n;return this.oL&&this.EP().length?this.oa.bt?(null!=(n=null==(i=this.Vx)?void 0:i.getTime())?n:ae())/1e3:this.EP().end(0):t.prototype.Gx.call(this)},n.mP=function(){var i=t.prototype.mP.call(this);if(!this.oL||!this.bt||!i.length)return i;var n=EA.jn(i);return(n=n.Ly(this.uAt()))._s()},n.Ux=function(){var i=t.prototype.Ux.call(this);if(!this.oL||!this.bt||!i.length)return i;var n=EA.jn(i);return(n=n.Ly(this.uAt()))._s()},n.Hx=function(){var i=t.prototype.Hx.call(this);return i&&he(i)?i:new Date},n.Wx=function(i){return this.oL?i&&he(i)?this.Xx(i.getTime()/1e3):void 0:t.prototype.Wx.call(this,i)},n.uAt=function(){if(!this.oL)return 0;var i=t.prototype.Gx.call(this);return this.EMt-i},n.kMt=function(i,n){var r=this;return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Ta.call(r,i,n)];case 1:return e.sent(),this.Yo=1,this.QP(),[2]}})}).call(this)},n.TMt=function(i,n){var r=this;return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Ta.call(r,i,n)];case 1:return e.sent(),this.Yo=2,this.QP(),[2]}})}).call(this)},n.bMt=function(t,i){var n=i.type===cA.yC?nE(i):iE(i);return n.bypassLicense=!0,Yu({},t,{sources:[n]})},Nt(i,[{key:"oL",get:function(){return 0!==this.Yo}},{key:"EMt",get:function(){var t,i;return(null!=(i=null==(t=this.Vx)?void 0:t.getTime())?i:ae())/1e3}}]),i}(Ub);qb(function(t){return new xG(t)},zb.Tnt),U(),Et(),U(),Et(),Wt(),xt(),Qt(),U(),Et(),Wt(),xt(),Pt(),Ft(),Qt();var BG=F(hi());U(),Et(),xt(),Pt(),Ft(),U(),Et(),xt(),Pt(),U(),Et(),xt(),Pt();var OG=function(t){function i(i,n){var r;return(r=t.call(this)||this).yO=Ag(),r.vA=void 0,r.xMt=void 0,r.hu=void 0,r.vA=i,r.xMt=n,r}Ct(i,t);var n=i.prototype;return n.er=function(t,i){this.vA=t,this.xMt=i,this.hu&&this.So(new GU(this.hu))},n.JU=function(){throw new y("Method not implemented.")},n.ZU=function(){throw new y("Method not implemented.")},n.kn=function(){this.Vo()},Nt(i,[{key:"nN",get:function(){return this.xMt}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()}},{key:"o",get:function(){return this.vA.id}},{key:"JI",get:function(){return this.yO}},{key:"IW",get:function(){return this.vA.bitrate}},{key:"wyt",get:function(){}},{key:"Rrt",get:function(){return""}},{key:"Th",get:function(){return""}},{key:"Syt",get:function(){return""}},{key:"xst",get:function(){return!0}},{key:"yyt",get:function(){}}]),i}(th),MG=function(t){function i(i,n){return t.call(this,i,n)||this}return Ct(i,t),i.prototype.xa=function(){return XU(this)},Nt(i,[{key:"Olt",get:function(){return 0}},{key:"Ti",get:function(){return this.vA.width}},{key:"Mi",get:function(){return this.vA.height}},{key:"byt",get:function(){return 0}}]),i}(OG);U(),Et(),xt(),Pt(),Ft();var LG=function(t){function i(i,n){var r;return(r=t.call(this)||this).yO=pg(),r._O=new lg,r.PMt=void 0,r.aS=void 0,r.I5=void 0,r.hu=void 0,r.aS=i,r.I5=n,r}Ct(i,t);var n=i.prototype;return n.SO=function(t){this.Rt=t},n.kn=function(){this.Vo();for(var t,i=Lt(this._O.NI);!(t=i()).done;){t.value.kn()}this._O.hr()},Nt(i,[{key:"Rt",get:function(){return!0},set:function(t){}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=tg(this)}},{key:"plt",get:function(){}},{key:"Lt",get:function(){return this.I5}},{key:"o",get:function(){return this.aS||"millitrack"}},{key:"JI",get:function(){return this.yO}},{key:"Th",get:function(){return""}},{key:"bs",get:function(){return""}},{key:"Qk",get:function(){return this.Rt?"enabled":"disabled"},set:function(t){this.SO("enabled"===t)}},{key:"YI",get:function(){}},{key:"$I",get:function(){return this._O}},{key:"tC",get:function(){return this.PMt},set:function(t){if(this.PMt=t,this.Rt){var i=1===(null==t?void 0:t.length)?t[0].nN:void 0;this.IMt(i)}this.So(new eL(this._O.NI.slice(),this)),((null==t?void 0:t.length)||this._O.V)&&this.So(new MF((null==t?void 0:t[0])||this._O.MI(0)))}},{key:"ZI",get:function(){}}]),i}(th),FG=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).CMt=void 0,e.CMt=r,e}Ct(i,t);var n=i.prototype;return n.er=function(t){for(var i,n,r=function(){var r=n.value,e=Fn(t.layers,function(t){return t.encodingId===r.id}),s=Fn(i._O.NI,function(t){return t.o===r.id});s?s.er(r,e):i._O.gO(new MG(r,e))},e=Lt(t.active);!(n=e()).done;)i=this,r();this.So(new _g(this))},n.IMt=function(t){var i;null==(i=this.CMt)||i.RMt(t)},n.kn=function(){this.CMt=void 0,t.prototype.kn.call(this)},Nt(i,[{key:"Km",get:function(){return eg.Mk}}]),i}(LG);U(),Et(),xt();var UG=function(){function t(){this.DMt=void 0}var i=t.prototype;return i.er=function(t){this.DMt=t},i.DW=function(t){},Nt(t,[{key:"IW",get:function(){var t,i,n,r,e,s;return(null!=(e=null==(i=this.DMt)||null==(t=i.video.inbounds)?void 0:t.reduce(function(t,i){return t+i.bitrateBitsPerSecond},0))?e:0)+(null!=(s=null==(r=this.DMt)||null==(n=r.audio.inbounds)?void 0:n.reduce(function(t,i){return t+i.bitrateBitsPerSecond},0))?s:0)}},{key:"RW",get:function(){var t,i;return null!=(i=null==(t=this.DMt)?void 0:t.currentRoundTripTime)?i:0}}]),t}();U(),Et(),xt(),Pt(),Ft(),U(),Et(),xt(),Pt();var VG=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).NMt=0,r}return Ct(i,t),i.prototype.xa=function(){return qU(this)},Nt(i,[{key:"mwt",get:function(){return this.NMt}}]),i}(OG),HG=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).CMt=void 0,e.CMt=r,e}Ct(i,t);var n=i.prototype;return n.er=function(t){for(var i,n,r=function(){var r=n.value,e=Fn(t.layers,function(t){return t.encodingId===r.id}),s=Fn(i._O.NI,function(t){return t.o===r.id});s?s.er(r,e):i._O.gO(new VG(r,e))},e=Lt(t.active);!(n=e()).done;)i=this,r();this.So(new _g(this))},n.IMt=function(t){var i;null==(i=this.CMt)||i.BMt(t)},n.kn=function(){this.CMt=void 0,t.prototype.kn.call(this)},Nt(i,[{key:"Km",get:function(){return eg.Bk}}]),i}(LG);U(),Et(),Pt();var WG=function(t){function i(i,n){var r;return(r=t.call(this,i,i,void 0,!1)||this).LU=void 0,r.LU=n,r}return Ct(i,t),i.prototype.xa=function(){return function(t){return Mw(Wg(t),{get mid(){return t.LU.mid},get uuid(){return t.LU.uuid},get timecode(){return t.LU.timecode},get unregistered(){return t.LU.unregistered}})}(this)},i}(Jg);U(),Et(),U(),Et(),xt(),Pt();var zG=F(hi()),XG=function(t){function i(i){var n;return(n=t.call(this)||this).hu=void 0,n.MMt=void 0,n.MMt=i,n}Ct(i,t);var n=i.prototype;return n.ZL=function(t){return zG.Logger.diagnose(t)},n.wn=function(t,i){this.MMt.wn(t,i)},n.mn=function(t,i){this.MMt.mn(t,i)},Nt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=LT(this)),this.hu}}]),i}(th),qG=[eh.uo,eh.jw,Ry.PM,eh.Qw,eh.Ww,eh.$w,eh.Zw,eh.Nw,eh.Kw,eh.wy,eh.Cw,eh.Jw,eh.xw,eh.Ew,eh.Lw,eh.Bw],GG=["active","inactive","stopped","vad","layers","migrate","viewercount"],jG=1e3,QG=function(t){function i(i){var n;return(n=t.call(this,"stats")||this).DMt=void 0,n.DMt=i,n}return Ct(i,t),Nt(i,[{key:"stats",get:function(){return this.DMt}}]),i}(rh),YG=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).Bz=void 0,e.Mz=void 0,e.Lz=void 0,e.PL=void 0,e.Lf=void 0,e.zMt=void 0,e.Ac=void 0,e.hT=void 0,e.Ypt=void 0,e.VMt=void 0,e.sO=void 0,e.tO=void 0,e.HMt=void 0,e.nq=void 0,e.rq=void 0,e.FMt=void 0,e.WMt=void 0,e.lq=void 0,e.Cq=void 0,e.xq=void 0,e.OMt=void 0,e.JMt=void 0,e.LMt=void 0,e.C6=void 0,e.Ts=void 0,e.bd=void 0,e.Lmt=void 0,e.Bz=i,e.Mz=n,e.Lz=r,e.hT=new hr,e.Ypt=void 0,e.VMt=void 0,e.sO=new rg,e.tO=new rg,e.WMt=0,e.lq=new UG,e.C6=!1,e.Ts=function(t){e.Qq(fg(t.lt))},e.bd=function(t){e.C6||(e.C6=!0,e.So(new gT(t.currentTime))),e.So(new bw(t.currentTime,e.Vx))},e.Lmt=function(t){vr(t)||e.Qq(new ld(vd.MEDIA_DECODE_ERROR,t.message,t))},e.PL=e.Bz.Yq(eg.Mk),e.Cq=new Vy(e,e.PL),e.xq=new Uy(e.Cq,!0),e.PL.wn(qG,e.Rs),e.PL.wn(qm.ma,e.Ts),e.PL.wn(eh.py,e.bd),e.xq.wn(Cy,e.Rs),e.OMt=new XG(e),e}Ct(i,t);var n=i.prototype;return n.RMt=function(t){var i;null==(i=this.Lf)||i.select(t).catch(this.Lmt)},n.BMt=function(t){var i;null==(i=this.Lf)||i.select(t).catch(this.Lmt)},n.zP=function(){return this.PL.zP()},n.Xx=function(t,i){},n.be=function(){this.PL.be()},n.we=function(){this.PL.we()},n.QP=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.LMt=void 0,this.Un(),[4,this.PL.QP()];case 1:return t.sent(),[2]}})}).call(this)},n.jP=function(){this.LMt=new Date,this.PL.jP()},n.hr=function(){return Vt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:return this.UMt(),this.Ac=void 0,this.C6=!1,this.hT.Zg(),null==(t=this.Lf)||t.stop(),this.Lf=void 0,this.Ypt?[4,this.Ypt.catch(dn)]:[3,2];case 1:r.sent(),this.Ypt=void 0,r.label=2;case 2:return this.VMt=void 0,[4,this.PL.hr()];case 3:for(r.sent(),this.HMt=void 0,this.WMt=0,this.PL.Eq(),i=Lt(this.sO.NI);!(n=i()).done;)n.value.kn();return this.tO.hr(),this.sO.hr(),[2]}})}).call(this)},n.kn=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.UMt(),this.Vo(),[4,this.hr()];case 1:return t.sent(),this.tO.kn(),this.sO.kn(),this.xq.kn(),this.Cq.zg(),this.PL.mn(qG,this.Rs),this.PL.mn(qm.ma,this.Ts),this.PL.mn(eh.py,this.bd),[4,this.Bz.Dq(this.PL)];case 2:return t.sent(),[2]}})}).call(this)},n.Ta=function(t,i,n){return Vt(function(){var i,r,e,s;return zt(this,function(u){return dr(n),this.OEt(),this.UMt(),r=t,this.Ac=r,this.hT=new hr,r.apiUrl&&BG.Director.setEndpoint(r.apiUrl),e=function(){return BG.Director.getSubscriber({streamName:r.src,streamAccountId:r.streamAccountId,subscriberToken:r.subscriberToken})},s=this.qMt(this.Mz.WY.type),this.Lf=new BG.View(void 0,e,void 0,!0),this.zMt=Yu({},r.connectOptions,{events:GG,abrConfiguration:{strategy:s,metadata:{bitrate:null==(i=this.Mz.WY.metadata)?void 0:i.bitrate}}}),this.GMt(),[2]})}).call(this)},n.qMt=function(t){switch(t){case $I.PERFORMANCE:return"performance";case $I.BANDWIDTH:return"bandwidth";case $I.QUALITY:return"quality";default:return}},n.IP=function(t,i,n,r){return ut.resolve()},n.CP=function(){return ut.resolve()},n.Un=function(){if(void 0===this.Ypt){var t=this.Lf;void 0!==t&&(this.Ypt=this.vE(t,this.zMt,this.hT.Yg).catch(this.Lmt))}},n.vE=function(t,i,n){return Vt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:dr(n),u.label=1;case 1:return u.trys.push([1,3,,6]),[4,gr(t.connect(i),n)];case 2:return u.sent(),t.webRTCPeer.initStats({autoInitStats:!0,statsIntervalMs:b.min(null!=(e=null==(r=this.Ac)?void 0:r.statsIntervalMs)?e:jG,jG)}),[3,6];case 3:return lr(s=u.sent()),function(t){return Wi(t)&&"FetchError"===t.name}(s)&&400===s.status?(Ui.um("[THEOplayer] Millicast connect error, reconnecting.",s),[4,gr(t.reconnect(),n)]):[3,5];case 4:u.sent(),u.label=5;case 5:return this.Qq(new ld(vd.NETWORK_ERROR,s.message,s)),[3,6];case 6:return[2]}})}).call(this)},n.XMt=function(t,i){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:dr(i),n.label=1;case 1:return n.trys.push([1,,4,5]),this.PL.G7(),this.VMt=t,[4,this.PL.hr()];case 2:return n.sent(),[4,this.PL.Un({Km:Iy.AV,rC:"",YZ:t,GT:cA.yC,fq:[]})];case 3:return n.sent(),[3,5];case 4:return this.PL.X7(),[7];case 5:return[2]}})}).call(this)},n.GMt=function(){var t,i=this,n=this.Lf;n.on("track",function(t){return i.jMt(t)}),n.on("broadcastEvent",function(t){return i.QMt(t)}),n.webRTCPeer.on("stats",function(t){i.FMt=t,i.lq.er(t),i.KMt()}),(null==(t=this.zMt)?void 0:t.metadata)&&n.on("metadata",function(t){return i.YMt(t)})},n.KMt=function(){var t,i,n=this;void 0===this.JMt&&(this.So(new QG(this.FMt)),this.JMt=Ui.fm(function(){n.So(new QG(n.FMt))},null!=(i=null==(t=this.Ac)?void 0:t.statsIntervalMs)?i:jG))},n.UMt=function(){void 0!==this.JMt&&(Ui.vm(this.JMt),this.JMt=void 0)},n.jMt=function(t){var i=this.tO.V>0,n=this.sO.V>0,r=i&&!n,e=t.streams[0];if(r)for(var s,u=Lt(e.getVideoTracks().slice());!(s=u()).done;){var o=s.value;e.removeTrack(o)}e!==this.VMt&&this.XMt(e,this.hT.Yg).catch(this.Lmt)},n.QMt=function(t){switch(t.name){case"active":var i,n=function(){var t=r.value;if(t.media!==eg.Mk||s.disableVideo||i.sO.NI.some(function(i){return i.o===t.trackId})){if(t.media===eg.Bk&&!s.disableAudio&&!i.tO.NI.some(function(i){return i.o===t.trackId})){var n=i.tO.V>0?yq.uDt:yq.cDt;i.tO.tt(new HG(t.trackId,n,i))}}else{var e=i.sO.V>0?pq.uDt:pq.cDt;i.sO.tt(new FG(t.trackId,e,i))}};this.So(new LH);for(var r,e=t.data,s=this.zMt,u=Lt(e.tracks);!(r=u()).done;)i=this,n();break;case"inactive":this.So(new FH),this.sO.hr(),this.tO.hr();break;case"stopped":this.So(new FH);break;case"viewercount":default:break;case"layers":var o=t.data;if(0===this.sO.V){var h=new FG("",pq.cDt,this);h.er(o.medias[0]),this.sO.tt(h)}else{var a=Fn(this.sO.NI,function(t){return t.Lt===pq.cDt});null==a||a.er(o.medias[0])}}},n.YMt=function(t){var i=this.HMt;void 0===i&&((i=this.PL.sI(Jm.zU,void 0,void 0,void 0,void 0,Ng.MILLICAST)).Qk=zm.iC,this.HMt=i);var n=this.zx,r=b.max(0,n-10);this.WMt0)||i.some(function(i){return i.toLowerCase()===t.toLowerCase()})},i.OLt=function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r1?i-1:0),r=1;r1?i-1:0),r=1;r1?i-1:0),r=1;r1?i-1:0),r=1;r0?t.IW:Uz.$at,n=t.RW>0?t.RW:Pz.$at;this.eut=new Uz(Uz.RIt,Uz.DIt,1,i),this.sCt=new Pz(Pz.RIt,Pz.DIt,n)}var i=t.prototype;return i.DW=function(t){if("segment"===t.Km||"preload-hint"===t.Km){var i=[new Nz(this.sCt)];return"stream"!==t.fk||!function(t){return"segment"===t.Km&&"initialization-segment"!==t.zk}(t)&&"preload-hint"!==t.Km?i.push(new xz(this.eut)):i.push(new Bz(this.eut,1e3)),new Dz(i)}},i.JIt=function(t){this.eut=new Uz(Uz.RIt,Uz.DIt,1,t)},Nt(t,[{key:"IW",get:function(){return this.eut.Fet}},{key:"RW",get:function(){return this.sCt.Fet}}]),t}();U(),Et();var _j=function(){function t(t){this.Tst=void 0,this.Tst=t}return t.prototype.$Z=function(t,i){var n={Km:Iy.SV,fq:[],q4:t.map(function(t){return{GT:t}}),t5:i};return ut.resolve(void 0!==this.Tst.$Z([n]))},t}();U(),Et(),Wt(),xt(),Ft(),Qt(),U(),Et(),Ft();var mj=function(t,i,n,r,e){return t.filter(function(t){return!!jn(r,t)||1.1*t.IW<=n.IW})},yj=function(t,i,n,r,e){return t.filter(function(t){if(jn(r,t))return!0;for(var s,u=1/0,o=Lt(t.VLt);!(s=o()).done;){var h,a,c=s.value;u=b.min(u,null!=(a=null!=(h=c.sLt.HLt)?h:c.sLt.WLt)?a:1/0)}u===1/0&&(u=1);var f=2*n.RW+t.IW*u/n.IW;return t.IW<=i.IW||e.qLt>f})},pj=function(t,i,n,r,e){return mn(t,function(t,i){return i.IW-t.IW})},kj=function(t,i,n,r,e){return t.every(function(t){return t.yyt&&!S(t.yyt)})?mn(t,function(t,i){return i.yyt-t.yyt}):t},bj=function(t,i,n,r,e){return 0===r.length?t:mn(t,function(t,i){var n=jn(r,t)?1:0;return(jn(r,i)?1:0)-n})},Aj=function(t,i,n,r,e,s){return t.filter(function(t){return!t.Rrt||!i.Rrt||!(void 0!==i.Rrt.W9&&void 0!==t.Rrt.W9&&!$C(i.Rrt.W9,t.Rrt.W9)&&!s.zLt({GT:'video/mp4; codecs="'+t.Rrt.W9+'"'}))&&!(void 0!==i.Rrt.q9&&void 0!==t.Rrt.q9&&!$C(i.Rrt.q9,t.Rrt.q9)&&!s.GLt({GT:'audio/mp4; codecs="'+t.Rrt.q9+'"'}))})},Tj=function(t,i,n,r,e){if(!1===e.udt)return t;if(Ui.Zs.dp)return t;for(var s,u,o=Ui.Zs.lp,h=(null!=(s=null==o?void 0:o.width)?s:e.Ti)*qM,a=(null!=(u=null==o?void 0:o.height)?u:e.Mi)*qM,c=0;c=r[1]}return!1}function Lj(t,i){return t===i||t.XE===i.XE&&(t.iAt&&i.iAt?t.iAt.Tn===i.iAt.Tn&&t.iAt.V===i.iAt.V:t.iAt===i.iAt)}function Fj(t){var i=!!t.sOt||void 0;return{o:t.o,nOt:t.nOt,uq:t.uq,rOt:t.rOt,ct:t.ct,hOt:t.hOt,sOt:i,oOt:t.aOt,uOt:t.cOt,dOt:t.dOt,lOt:t.lOt}}function Uj(t,i){var n,r,e;return{q9:null!=(n=i.q9)?n:null==t?void 0:t.q9,W9:null!=(r=i.W9)?r:null==t?void 0:t.W9,fOt:null!=(e=i.fOt)?e:null==t?void 0:t.fOt}}function Vj(t,i,n,r,e){return Vt(function(){var s,u,o,h,a,c,f,v,d,l,w,g;return zt(this,function(_){switch(_.label){case 0:return s=i.filter(function(t){return Lo(t,"audio")}),u=i.filter(function(t){return Lo(t,"video")}),o=[],h=n.map(function(t){return function(t,i,n){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return t.Syt&&t.vOt?t.Hk!==xj.tOt?[2]:(r=Hj(t.vOt))?r.$m!==Ao?[3,1]:[2,{xS:r,OW:[],FW:void 0,GH:t.Syt,UW:[]}]:[2]:[2];case 1:return r.$m!==mo||t.vOt!==So?[3,2]:[2,{xS:r,OW:[],FW:t.Syt,GH:void 0,UW:[]}];case 2:return vj.cN("HLSDrmUtils","Fetching key uri "+t.Syt+"."),[4,i.vk({Yu:t.Syt,Xk:n})];case 3:return[4,s.sent().qT()];case 4:return e=s.sent(),r.$m===fo&&(e=function(t){var i=new DataView(t);return i.byteLength>=8&&i.getUint32(4)===hU?t:aU(t)}(e)),[2,{xS:r,OW:[e],FW:void 0,GH:void 0,UW:[]}];case 5:return[2]}})})()}(t,r,e)}),[4,ut.all(h)];case 1:for(a=_.sent().filter(Li),f=function(t,i){if(0===i.length)return t;var n=function(t){var n=i.indexOf(t.xS.$m);return n>=0?n:i.length};return mn(t,function(t,i){return n(t)-n(i)})}(a,null!=(c=null==t?void 0:t.preferredKeySystems)?c:[]),v=Lt(f);!(d=v()).done;)l=d.value,w=$H(null!=t?t:{},l.xS),g="cbcs",o.push({xS:l.xS,OW:l.OW,FW:l.FW,GH:l.GH,Vq:[{initDataTypes:[l.xS.Jm],audioCapabilities:tW(s,g,null==w?void 0:w.audioRobustness),videoCapabilities:tW(u,g,null==w?void 0:w.videoRobustness),persistentState:null==w?void 0:w.persistentState,distinctiveIdentifier:null==w?void 0:w.distinctiveIdentifier}],UW:l.UW});return[2,o]}})})()}function Hj(t){return t===wo?Ro:t===vo?Io:"com.apple.streamingkeydelivery"===t?Po:t===So?Do:void 0}function Wj(t){if("#"!==t[0])throw new y("HLSPlaylistParser - Could not extract M3U8 tag or comment: "+t);return t.split(":",1)[0]}function zj(t){return"#"!==t[0]?t:t.split(":",1)[0]}function Xj(t){var i=t.indexOf(":");if(-1===i||t.lengtho&&vj.FLt(dj,"#EXT-X-STREAM-INF tag must have BANDWIDTH attribute higher or equal to AVERAGE-BANDWIDTH attribute: "+t+"."),e||vj.cN(dj,"#EXT-X-STREAM-INF tag should have a CODECS attribute: "+t+"."),e&&e.W9&&void 0===s&&vj.cN(dj,"#EXT-X-STREAM-INF tag should have a valid RESOLUTION attribute if it contains video codecs: "+t+"."),void 0===f||jn(["TYPE-0","TYPE-1","NONE"],f)||vj.FLt(dj,"#EXT-X-STREAM-INF tag has an invalid HDCP-LEVEL attribute: "+t+"."),void 0===w||jn(["SDR","PQ","HLG"],w)||vj.FLt(dj,"#EXT-X-STREAM-INF tag has an invalid VIDEO-RANGE attribute: "+t+"."),void 0===o)throw new y("HLSPlaylistParser - Could not parse #EXT-X-STREAM-INF tag: "+t+".");return{gOt:v,pOt:g,wyt:h,IW:o,mOt:p,Rrt:e,Olt:c,wOt:f,RRt:s,yyt:a,yOt:m,Syt:r,bOt:_,AOt:w}}function Yj(t,i){var n=Gj(t);if(!n.URI)throw new y("HLSPlaylistParser - Could not parse #EXT-X-I-FRAME-STREAM-INF tag: "+t+".");try{return Qj(t,i,n.URI)}catch(i){throw new y("HLSPlaylistParser - Could not parse #EXT-X-I-FRAME-STREAM-INF tag: "+t+".")}}function Kj(t){var i=Number(t);return S(i)?void 0:i}function Jj(t,i){var n,r,e=Gj(t);try{n=function(t){switch(t){case"NONE":return xj.pz;case"AES-128":return xj.$Lt;case"SAMPLE-AES":return xj.tOt;case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return t}throw new y("LLHLSPlaylistParser - Could not parse M3U8 key method: "+t+".")}(e.METHOD),r=e.URI?sQ(e.URI,i):void 0}catch(i){throw new y("HLSPlaylistParser - Could not parse #EXT-X-KEY tag: "+t+".")}var s,u,o,h,a,c=e.KEYFORMAT,f=e.IV,v=e.KEYFORMATVERSIONS;if(n!==xj.pz){if(o=c||So,"SAMPLE-AES-CENC"===n||"SAMPLE-AES-CTR"===n){if(Hj(o)!==Ro)throw new y("HLSPlaylistParser - #EXT-X-KEY tag with METHOD="+n+" is only compatible with Widevine.");s=xj.tOt}else s=n;u=r,h=f?Sa(f):void 0,a=v?v.split("/").map(function(t){return Number(t)}):[1]}else s=xj.pz,(r||c||v||f)&&vj.FLt(dj,"#EXT-X-KEY tag with METHOD=NONE must not have additional attributes: "+t+".");return{Hk:s,Syt:u,SOt:h,vOt:o,TOt:a}}function Zj(t){var i=Xj(t);if(!i)return[void 0,""];var n=i.split(","),r=n[0],e=n[1];return[Kj(r),e]}function $j(t,i){var n=t.split("@"),r=Kj(n[0]),e=n.length>1?Kj(n[1]):i;if(void 0===r||void 0===e)throw new y("HLSPlaylistParser - Could not parse #EXT-X-BYTERANGE tag: "+t+".");return{Tn:e,V:r}}function tQ(t){if(void 0!==t)return $j(t,void 0)}function iQ(t,i){return $j(Xj(t),i)}function nQ(t,i){var n=Gj(t);try{return{XE:sQ(n.URI,i),iAt:tQ(n.BYTERANGE)}}catch(i){throw new y("HLSPlaylistParser - Could not parse #EXT-X-MAP tag: "+t+".")}}function rQ(t){var i=Xj(t);if(!i)throw new y("HLSPlaylistParser - Could not parse #EXT-X-PROGRAM-DATE-TIME tag: "+t+".");var n=new Date(i.trim());if(!he(n))throw new y("HLSPlaylistParser - Could not parse #EXT-X-PROGRAM-DATE-TIME tag: "+t+".");return n}function eQ(t){var i,n,r,e=Gj(t),s=e["START-DATE"],u=e["END-DATE"],o=Kj(e["PLANNED-DURATION"]),h=Kj(e.DURATION);void 0!==e["SCTE35-CMD"]&&(i=Sa(e["SCTE35-CMD"]).buffer),e["SCTE35-IN"]&&(n=Sa(e["SCTE35-IN"]).buffer),e["SCTE35-OUT"]&&(r=Sa(e["SCTE35-OUT"]).buffer);var a,c,f="YES"===e["END-ON-NEXT"],v=function(t){for(var i,n={},r=Lt(k.keys(t));!(i=r()).done;){var e=i.value,s=t[e];void 0!==s&&Fo(e,"X-")&&(n[e]=s)}return n}(e),d=e.ID,l=e.CLASS;if(void 0===s)vj.FLt(dj,"Could not parse #EXT-X-DATERANGE tag without START-DATE attribute: "+s+".");else if(a=new Date(s),c=void 0!==u?new Date(u):void 0,he(a)||vj.FLt(dj,"Could not parse EXT-X-DATERANGE tag with invalid START-DATE attribute: "+a+"."),void 0!==h){var w=new Date(a.getTime()+1e3*h);c?c.getTime()!==w.getTime()&&(vj.FLt(dj,"DURATION and END-DATE attributes of #EXT-X-DATERANGE tag are not aligned, updating the END-DATE: "+t+"."),c=w):c=w}else c&&(h=(a.getTime()-c.getTime())/1e3);if(f&&(e.CLASS||vj.FLt(dj,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute without CLASS attribute: "+t+"."),e.DURATION&&vj.FLt(dj,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute with DURATION attribute: "+t+"."),c&&vj.FLt(dj,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute with END-DATE attribute: "+t+".")),void 0===d&&vj.FLt(dj,"Could not parse #EXT-X-DATERANGE tag without valid ID attribute: "+t+"."),void 0===d||void 0===a)throw new y("HLSPlaylistParser - Could not parse #EXT-X-DATERANGE tag: "+t+".");return{o:d,nOt:l,uq:a,rOt:c,ct:h,hOt:o,cOt:i,lOt:n,dOt:r,sOt:f,aOt:v}}function sQ(t,i){if(void 0===t)throw new y("HLSPlaylistParser - Unable to parse URL from string: "+t+".");return Ui.Pm(t,i)}function uQ(t,i){var n=Gj(t),r=Kj(n.DURATION),e=sQ(n.URI,i),s=tQ(n.BYTERANGE),u="YES"===n.INDEPENDENT,o="YES"===n.GAP;if(void 0===r)throw new y("HLSPlaylistParser - Unable to parse #EXT-X-PART without valid DURATION: "+t);return{ct:r,Syt:{XE:e,iAt:s},kOt:u,EOt:o}}function oQ(t){var i=Gj(t);return{xOt:"YES"===i["CAN-BLOCK-RELOAD"],POt:Kj(i["CAN-SKIP-UNTIL"]),IOt:"YES"===i["CAN-SKIP-DATERANGES"],COt:Kj(i["HOLD-BACK"]),ROt:Kj(i["PART-HOLD-BACK"])}}function hQ(t,i){var n=Gj(t);if(void 0===n.URI)throw new y("HLSPlaylistParser - Could not parse #EXT-X-RENDITION-REPORT: "+t+".");var r=sQ(n.URI,i),e=Kj(n["LAST-MSN"]),s=Kj(n["LAST-PART"]);if(void 0===e)throw new y("HLSPlaylistParser - Could not parse #EXT-X-RENDITION-REPORT: "+t+".");return{Syt:r,DOt:e,NOt:s}}function aQ(t,i){var n,r=Gj(t),e=Kj(r["SKIPPED-SEGMENTS"]),s=null==(n=r["RECENTLY-REMOVED-DATERANGES"])?void 0:n.split("\t");if(void 0===e)throw new y("HLSPlaylistParser - Could not parse #EXT-X-SKIP tag without valid SKIPPED-SEGMENTS attribute: "+t+".");return{BOt:e,MOt:s,LOt:i}}function cQ(t){var i=Kj(Gj(t)["PART-TARGET"]);if(void 0===i)throw new y("HLSPlaylistParser - Could not parse #EXT-X-PART-TARGET-DURATION tag: "+t+".");return i}function fQ(t){switch(Xj(t)){case"VOD":return Bj.iOt;case"EVENT":return Bj.eOt;default:return vj.FLt(dj,"Found #EXT-X-PLAYLIST-TYPE tag with invalid value: "+t+"."),Bj.yk}}function vQ(t,i){var n,r,e=Gj(t);try{n=function(t){if(void 0===t)throw new y("HLSPlaylistParser - Could not parse PRELOAD-HINT type: "+t+".");if("MAP"===t)return Nj.JLt;if("PART"===t)return Nj.ZLt;throw new y("HLSPlaylistParser - Could not parse PRELOAD-HINT type: "+t+".")}(e.TYPE),r=sQ(e.URI,i)}catch(i){throw new y("HLSPlaylistParser - Could not parse #EXT-X-PRELOAD-HINT tag: "+t+".")}var s,u=Kj(e["BYTERANGE-START"]),o=Kj(e["BYTERANGE-LENGTH"]);return void 0===u&&void 0===o||(s={Tn:u||0,V:o}),{Km:n,Syt:{XE:r,iAt:s}}}U(),Et(),Ft(),U(),Et(),Wt(),Ft(),Qt(),U(),Et();var dQ=function(){function t(i){this.UOt=0,this.FOt=void 0,this.FOt=t.HOt(i)}var i=t.prototype;return i.OOt=function(){var t=this.FOt[this.UOt];return this.UOt+=1,t},i.VOt=function(){return this.FOt[this.UOt]},i.Fy=function(){var i=new t("");return i.UOt=0,i.FOt=this.FOt.slice(this.UOt),i},t.HOt=function(t){return t?t.split(/[\r\n]+/).map(function(t){return t.trim()}).filter(function(t){return t}):[]},t}();function lQ(t,i,n){var r=t.Syt,e=t.ED,s=t.WOt,u=t.Tn;switch(n){case"#EXT-X-VERSION":e=function(t){var i=qj(t);return S(i)?(vj.FLt(dj,"Playlist version is NaN: "+t+"."),1):i}(i);break;case"#EXT-X-INDEPENDENT-SEGMENTS":s=!0;break;case"#EXT-X-START":u=function(t){var i=Gj(t),n=Kj(i["TIME-OFFSET"]);if(void 0===n)throw new y("HLSPlaylistParser - #EXT-X-START is missing a TIME-OFFSET: "+t+".");return{qOt:n,zOt:"YES"===i.PRECISE}}(i);break;case"#EXT-X-DEFINE":vj.FLt(dj,"Ignoring unsupported #EXT-X-DEFINE: "+i+".");break;default:vj.cN(dj,"Ignoring unrecognized line or comment: "+i+".")}return{Syt:r,ED:e,WOt:s,Tn:u}}function wQ(t,i){return t.map(function(t){return t.Hk===xj.pz||t.SOt?t:Yu({},t,{SOt:gQ(i)})})}function gQ(t){var i=new DataView(new ArrayBuffer(16)),n=new Ta;return n.Ly(8),Qh(i,n,ue.fromNumber(t)),new E(i.buffer)}function _Q(t,i,n){vj.cN(dj,"Parsing M3U8 playlist at "+t+".");var r=new dQ(n);if("#EXTM3U"!==r.OOt())throw new y("HLSPlaylistParser - Could not parse M3U8 playlist. Playlist does not start with #EXTM3U.");return function(t){return/^#EXT-X-(MEDIA|STREAM-INF|I-FRAME-STREAM-INF|SESSION-DATA|SESSION-KEY):/m.test(t)}(n)?function(t,i){var n;try{n=Ui.Pm(t)}catch(i){throw vj.FLt(dj,"The master playlist has no valid base URI: "+t+"."),new y("HLSPlaylistParser - Could not parse HLS master playlist: "+t)}for(var r={Syt:n,WOt:void 0,Tn:void 0,ED:void 0},e=[],s=[],u=[],o=[];;){var h=i.OOt();if(!h)break;try{var a=Wj(h);switch(a){case"#EXT-X-MEDIA":var c=jj(h,n);e.push(c);break;case"#EXT-X-STREAM-INF":var f=Qj(h,n,i.OOt());s.push(f);break;case"#EXT-X-I-FRAME-STREAM-INF":var v=Yj(h,n);u.push(v);break;case"#EXT-X-SESSION-DATA":vj.FLt(dj,"Ignoring unsupported #EXT-X-SESSION-DATA: "+h+".");break;case"#EXT-X-SESSION-KEY":var d=Jj(h,n);o.push(d);break;default:r=lQ(r,h,a)}}catch(t){vj.FLt(dj,"Ignoring unparsable line: "+h,t)}}var l,w=r.ED,g=null!=(l=r.WOt)&&l,_=r.Tn;return void 0===w&&(vj.FLt(dj,"The playlist has no #EXT-X-VERSION, assuming version is 2."),w=2),w>=8&&(s.some(function(t){return void 0!==t.yyt})||u.some(function(t){return void 0!==t.yyt}))&&(s.some(function(t){return void 0===t.yyt})||u.some(function(t){return void 0===t.yyt}))&&vj.FLt(dj,"If one master playlist variant stream has a SCORE, all variants should have it."),{Syt:n,ED:w,WOt:g,Tn:_,GOt:u,UW:o,$D:e,XOt:s}}(t,r):function(t,i,n){var r,e,s,u,o,h,a,c,f,v,d,l,w,g,_,m,p,k,b={Syt:t,WOt:void 0,Tn:void 0,ED:void 0},A=[],T=!1,S=!1,E=[],I=Ju(),R=[],C=[],P=!1,D=!1,N=[],x=[],B=0,O=!1,M=Bj.yk,L=!1,F=0;try{k=Ui.Pm(t)}catch(i){throw vj.FLt(dj,"The media playlist has no valid base URI: "+t+".",i),new y("HLSPlaylistParser - Could not parse HLS media playlist.")}for(var U=n.Fy();void 0===_||void 0===m;){var V=U.OOt();if(!V)break;try{switch(zj(V)){case"#EXT-X-MEDIA-SEQUENCE":_=qj(V);break;case"#EXT-X-DISCONTINUITY-SEQUENCE":m=qj(V)}}catch(t){vj.FLt(dj,"Ignoring unparsable line: "+V,t)}}void 0===_&&(vj.cN(dj,"#EXT-X-MEDIA-SEQUENCE tag is missing, assuming first segment media sequence number is 0."),_=0),void 0===m&&(vj.cN(dj,"#EXT-X-DISCONTINUITY-SEQUENCE tag is missing, assuming first segment discontinuity sequence number is 0."),m=0);for(var H=_,W=m;;){var z=n.OOt();if(!z)break;var X=!1;try{var q=zj(z);switch(q){case"#EXTINF":var G;X=!0,o=(G=Zj(z))[0],h=G[1];break;case"#EXT-X-BYTERANGE":X=!0,(a=iQ(z,B))&&(B=a.Tn+a.V);break;case"#EXT-X-DISCONTINUITY":X=!0,P=!0,W++;break;case"#EXT-X-KEY":var j;X=!0;var Q,Y=Jj(z,k);if(Y.Hk===xj.pz){I.clear(),w=void 0;break}var K=null!=(Q=null==(j=Y.vOt)?void 0:j.toString())?Q:"identity";I.set(K,Y),Y.Hk===xj.$Lt&&(w=Y);break;case"#EXT-X-MAP":X=!0,f=nQ(z,k),v=w;break;case"#EXT-X-PROGRAM-DATE-TIME":X=!0,d=rQ(z);break;case"#EXT-X-GAP":X=!0,D=!0;break;case"#EXT-X-BITRATE":X=!0,l=qj(z);break;case"#EXT-X-TARGETDURATION":r=qj(z);break;case"#EXT-X-DATERANGE":var J=eQ(z);A.push(J);break;case"#EXT-X-PART":X=!0;var Z=uQ(z,k);C.push(Z);break;case"#EXT-X-PRELOAD-HINT":var $=vQ(z,k);N.push($);break;case"#EXT-X-SKIP":E.length>0&&vj.FLt(dj,"#EXT-X-SKIP must appear before any #EXTINF tags."),X=!0;var tt=aQ(z,H);F=tt.BOt,p=tt.MOt,H+=tt.BOt;break;case"#EXT-X-SERVER-CONTROL":var it=oQ(z);T=it.xOt,e=it.POt,S=it.IOt,s=it.COt,u=it.ROt;break;case"#EXT-X-RENDITION-REPORT":var nt=hQ(z,k);x.push(nt);break;case"#EXT-X-PART-INF":g=cQ(z);break;case"#EXT-X-MEDIA-SEQUENCE":X&&vj.FLt(dj,"#EXT-X-MEDIA-SEQUENCE must appear before any media segment tags.");break;case"#EXT-X-DISCONTINUITY-SEQUENCE":X&&vj.FLt(dj,"#EXT-X-DISCONTINUITY-SEQUENCE must appear before any media segment tags.");break;case"#EXT-X-ENDLIST":O=!0;break;case"#EXT-X-PLAYLIST-TYPE":M=fQ(z);break;case"#EXT-X-I-FRAMES-ONLY":L=!0;break;default:if(Fo(q,"#"))b=lQ(b,z,q);else{c=Ui.Pm(z,k);var rt=f?{Syt:f,jOt:v}:void 0,et={UW:wQ(to(I),H),LU:R,QOt:C,ct:o,gq:h,KOt:P,Syt:{iAt:a,XE:c},YOt:rt,JOt:d,EOt:D,ZOt:l,LOt:H,$Ot:W};E.push(et),H++,R=[],C=[],o=void 0,h=void 0,P=!1,a=void 0,c=void 0,d=void 0,D=!1,l=void 0}}}catch(t){vj.FLt(dj,"Ignoring unparsable line: "+z,t)}}if(C.length){var st=f?{Syt:f,jOt:w}:void 0,ut={UW:wQ(to(I),H),LU:R,QOt:C,ct:o,gq:h,KOt:P,Syt:void 0,YOt:st,JOt:d,EOt:D,ZOt:l,LOt:H,$Ot:W};E.push(ut)}var ot,ht=b.ED,at=null!=(ot=b.WOt)&&ot,ct=b.Tn;void 0===ht&&(vj.FLt(dj,"The media playlist has no #EXT-X-VERSION tag, assuming version is 2."),ht=2),void 0===r&&vj.FLt(dj,"Could not parse the HLS media playlist: no #EXT-X-TARGET-DURATION tag was found.");var ft=E.length,vt=ft>0;vt||vj.FLt(dj,"The HLS media playlist contains no segments.");var dt=vt&&E[ft-1].QOt.length>0;return dt&&void 0===g&&vj.FLt(dj,"Could not parse the HLS media playlist: no #EXT-X-PART-TARGET-DURATION tag was found, but it is required when some or all segments contain parts."),dt&&void 0===u&&vj.FLt(dj,"Could not parse the HLS media playlist: The #EXT-X-SERVER-CONTROL tag has no PART-HOLDBACK attribute, but it is required when some or all segments contain parts."),{xOt:T,POt:e,IOt:S,tFt:A,$Ot:m,iFt:O,WOt:at,COt:s,eFt:L,LOt:_,BOt:F,ROt:u,HLt:g,sFt:M,nFt:N,MOt:p,rFt:x,hFt:r,bct:E,Tn:ct,Syt:k,oFt:i,ED:ht}}(t,i,r)}U(),Et(),xt(),Ft(),U(),Et(),xt(),Ft();var mQ=function(){function t(t,i,n){var r,e,s,u;this.o=yQ++,this.sLt=void 0,this.IW=void 0,this.yyt=void 0,this.RRt=void 0,this.Olt=void 0,this.pOt=void 0,this.bOt=void 0,this.yOt=void 0,this.mOt=void 0,this.wyt=void 0,this.uFt=void 0,this.bRt=void 0,this.aFt=!1,this.dFt=[],this.sLt=i,this.IW=t.IW,this.wyt=t.wyt,this.yyt=t.yyt,this.uFt=t.Rrt?pQ(t.Rrt):void 0,this.bRt=this.uFt,this.RRt=t.RRt,this.Olt=t.Olt,this.pOt=null!=(r=t.pOt)?r:"wFt"+this.o,this.bOt=null!=(e=t.bOt)?e:"yFt"+this.o,this.yOt=null!=(s=t.yOt)?s:"bFt"+this.o,this.mOt=null!=(u=t.mOt)?u:"AFt"+this.o,this.dFt=n}var i=t.prototype;return i.gFt=function(t){for(var i,n=Lt(this.dFt);!(i=n()).done;){var r=i.value.sLt.gFt(t);if(void 0!==r)return r}},i.pFt=function(t){for(var i,n=Lt(this.dFt);!(i=n()).done;){var r=i.value.sLt.pFt(t);if(void 0!==r)return r}},i.mFt=function(t){Xn(this.dFt,t)},Nt(t,[{key:"Syt",get:function(){return this.sLt.Syt}},{key:"Rrt",get:function(){return this.bRt},set:function(t){this.bRt=t?pQ(t):void 0,this.aFt=function(t,i){return!(void 0!==(null==t?void 0:t.q9)&&void 0===(null==i?void 0:i.q9)||void 0!==(null==t?void 0:t.W9)&&void 0===(null==i?void 0:i.W9))}(this.uFt,this.bRt)}},{key:"cFt",get:function(){return this.aFt}},{key:"VLt",get:function(){return this.dFt}},{key:"lFt",get:function(){return this.dFt.filter(function(t){return t.Km===Dj.Bk})}},{key:"fFt",get:function(){return this.dFt.filter(function(t){return t.Km===Dj.Mk})}},{key:"vFt",get:function(){return this.dFt.filter(function(t){return t.Km===Dj.HU})}},{key:"_Ft",get:function(){return this.dFt.filter(function(t){return t.Km===Dj.YLt})}}]),t}(),yQ=0;function pQ(t){return Yu({},t,{W9:t.W9?Kv(t.W9):void 0})}U(),Et(),xt(),Ft(),U(),Et(),xt(),Ft(),U(),Et(),xt();var kQ=function(){function t(t,i,n,r,e,s){this.PFt=void 0,this.CFt=void 0,this.ct=void 0,this.Syt=void 0,this.kOt=void 0,this.EOt=void 0,this.kFt=void 0,this.xFt=void 0,this.HO=void 0,this.Get=void 0,this.SFt=void 0,this.PFt=t,this.CFt=i,this.HO=n,this.kFt=r,this.xFt=e,this.ct=s.ct,this.Syt=s.Syt,this.kOt=s.kOt,this.EOt=s.EOt}return t.prototype.IFt=function(t,i,n){this.HO=t,this.kFt=i,this.xFt=n},Nt(t,[{key:"CO",get:function(){var t;return this.HO+(null!=(t=this.SFt)?t:0)}},{key:"TFt",get:function(){return this.kFt}},{key:"EFt",get:function(){return this.xFt}},{key:"UW",get:function(){return this.PFt.UW}}]),t}(),bQ=function(){function t(t,i,n,r,e){this.Zb=void 0,this.JOt=void 0,this.NFt=void 0,this.YOt=void 0,this.EOt=void 0,this.kFt=void 0,this.xFt=void 0,this.LOt=void 0,this.KOt=void 0,this.$Ot=void 0,this.UW=void 0,this.HO=void 0,this.Get=void 0,this.BFt=[],this.LFt=0,this.RFt=void 0,this.HO=t,this.YOt=e.YOt,this.kFt=n,this.xFt=r,this.Zb=e.ct,this.JOt=e.JOt,this.NFt=e.Syt,this.EOt=e.EOt,this.LOt=e.LOt,this.KOt=e.KOt,this.$Ot=i,this.UW=e.UW,this.HFt(e.QOt)}var i=t.prototype;return i.OFt=function(t){return this.BFt[t]},i.FFt=function(t){for(var i=0;i=0;i--){var n=this.BFt[i];if(n.CO<=t)return n}},i.VFt=function(t){for(var i=this.UFt(t);i&&!i.kOt&&i.CFt>0;)i=this.OFt(i.CFt-1);return i},i.IFt=function(t,i,n){var r=t.QOt.length!==this.BFt.length||n!==this.xFt;this.kFt=i,this.xFt=n,this.Zb=t.ct,null!=this.JOt||(this.JOt=t.JOt),void 0===this.NFt&&(this.NFt=t.Syt),r&&this.HFt(t.QOt)},i.HFt=function(t){this.BFt.length>t.length&&(this.BFt.length=t.length);for(var i=0,n=0;n=0;s--)r(s);for(var u,o=Lt(i);!(u=o()).done;){var h=u.value,a=h.uq;if(void 0!==a&&!t.k5(h.o)){var c=n(a),f=new SQ(h,c);PQ(t.L.NI,f),t.nV(f)}}}function CQ(t){for(var i,n=Ju(),r=[],e=Lt(t);!(i=e()).done;){var s=i.value;if(n.has(s.o)){var u=n.get(s.o),o=Yu({},u,Vw(s),{oOt:Yu({},u.oOt,s.oOt)});n.set(s.o,o)}else n.set(s.o,s),r.push(s.o)}return r.map(function(t){return n.get(t)})}function PQ(t,i){var n=Vn(t,function(t){return t.nOt===i.nOt});n&&n.sOt&&n.er({o:n.o,rOt:i.uq})}var DQ=String.fromCharCode(95),NQ=DQ+"HLS_msn",xQ=DQ+"HLS_part",BQ=DQ+"HLS_skip",OQ="HLSMediaPlaylist",MQ=function(){function t(t,i,n){this.Syt=void 0,this.pUt=void 0,this.wUt=void 0,this.CUt=void 0,this.RUt=void 0,this.rUt=void 0,this.hUt=void 0,this.oUt=void 0,this.aUt=void 0,this.Dbt=[],this.yUt=[],this.RFt=void 0,this.uUt=!1,this.cUt=void 0,this.dUt=!1,this.lUt=Bj.yk,this.H4=EA.rL(),this.nUt=EA.rL(),this.Zb=void 0,this.AUt=-1/0,this.UU=void 0,this.FUt=void 0,this.TUt=void 0,this.Syt=t,this.UU=i,this.FUt=n}var i=t.prototype;return i.BLt=function(t){if(!t)return this.Syt;var i=Ui.Dh(this.Syt);return void 0!==t.LOt&&i.searchParams.append(NQ,String(t.LOt)),void 0!==t.kUt&&i.searchParams.append(xQ,String(t.kUt)),void 0!==t.uD&&i.searchParams.append(BQ,t.uD),i.href},i.Oat=function(t){var i=this.EUt(t);return i<0?void 0:this.Dbt[i]},i.EUt=function(t){var i=this.Dbt;if(0===i.length)return-1;var n=t-i[0].LOt;return n<0||n>=i.length?-1:n},i.xUt=function(t){if(0!==this.Dbt.length){var i=nV(LQ.Bg,this.Dbt,t);if(!(i<0)){var n=this.Dbt[i];return t===n.RO&&i+1=n.CO?n:this.xUt(t)}},i.gFt=function(t){var i=this.PUt(t);if(void 0!==i)for(var n=i.LOt-this.Dbt[0].LOt;n>=0;n--){var r=this.Dbt[n];if(void 0!==r.JOt)return new Date(r.JOt.getTime()+1e3*(t-r.CO))}},i.pFt=function(t){for(var i,n,r=Lt(this.Dbt);!(n=r()).done;){var e=n.value;if(FQ(e))if(void 0===i)i=e;else{if(!(e.JOt.getTime()<=t.getTime()))break;i=e}}if(void 0!==i)return i.CO+(t.getTime()-i.JOt.getTime())/1e3},i.IUt=function(t){switch(t){case Nj.JLt:return this.CUt;case Nj.ZLt:return this.RUt;default:return}},i.IFt=function(t){var i;void 0===this.rUt&&(this.rUt=null!=(i=t.hFt)?i:this.DUt(t));void 0===this.oUt&&void 0!==t.COt&&(this.oUt=t.COt),void 0===this.hUt&&void 0!==t.HLt&&(this.hUt=t.HLt),void 0===this.aUt&&void 0!==t.ROt&&(this.aUt=t.ROt),this.uUt=t.xOt,this.cUt=t.POt,this.dUt=t.IOt,this.lUt=t.sFt,this.Lbt(t),this.NUt(t);var n=Fn(t.nFt,function(t){return t.Km===Nj.JLt}),r=Fn(t.nFt,function(t){return t.Km===Nj.ZLt});this.CUt=n?{Syt:n.Syt,Km:n.Km,$Ot:t.$Ot}:void 0,this.RUt=r?{Syt:r.Syt,Km:r.Km,$Ot:t.$Ot}:void 0,this.pUt=Ui.Mg()/1e3;var e=this.H4.An(this.H4.V-1);this.BUt();var s=this.H4.An(this.H4.V-1);(!this.wUt||s-e>0)&&(this.wUt=this.pUt),null!=this.UU||(this.UU=t.Tn)},i.BUt=function(){this.nUt=this.MUt(),this.H4=this.LUt(this.nUt),this.Zb=this.OUt()},i.MUt=function(){var t=this.bct;if(0===t.length)return EA.rL();var i=t[0].CO,n=t[t.length-1].RO;return new EA([i,n])},i.LUt=function(t){if(0===t.V||this.iFt)return t;var i=t.Tn(0),n=t.An(0)-this.ISt;return n0&&this.Dbt.splice(0,i.HUt);var s=t.BOt;if(s>0){if(s>this.Dbt.length)throw new TQ("New playlist skips over missing segments.");var u=this.Dbt[s-1];if(void 0===u.ct)throw new TQ("New playlist skips over an incomplete segment.");n=u.DFt+u.ct,e=u.$Ot-t.$Ot,r=s;for(var o=0;o0&&void 0===w.YOt)w=Yu({},w,{YOt:this.Dbt[this.Dbt.length-1].YOt});var g=new bQ(n,d,c,f,w);g.SFt=this.RFt,this.Dbt.push(g)}void 0!==v&&(n+=v)}}},i.VUt=function(t){if(0===this.Dbt.length)return{HUt:0,WUt:0};var i=this.Dbt[0].LOt,n=this.Dbt[this.Dbt.length-1].LOt,r=t.bct[0].LOt-t.BOt,e=t.bct[t.bct.length-1].LOt,s=0,u=0;if(r0&&(s=c)}}return{HUt:s,WUt:u}},i.NUt=function(t){var i=t.tFt.map(Fj);if(t.IOt&&t.oFt.uD===AQ.zFt&&(i=this.yUt.concat(i)),this.yUt=CQ(i),t.MOt)for(var n,r,e=function(){var t=r.value,i=Hn(n.yUt,function(i){return i.o===t});i>=0&&qn(n.yUt,i)},s=Lt(t.MOt);!(r=s()).done;)n=this,e()},i.qUt=function(t,i){if(this.RFt!==t){this.RFt=t;for(var n,r=Lt(this.Dbt);!(n=r()).done;){n.value.SFt=this.RFt}this.BUt()}this.TUt=i},i.UUt=function(){this.RFt=void 0,this.TUt=void 0},Nt(t,[{key:"iFt",get:function(){return 0!==this.Dbt.length&&this.Dbt[this.Dbt.length-1].EFt}},{key:"ct",get:function(){return this.Zb}},{key:"kP",get:function(){return this.H4}},{key:"sUt",get:function(){return this.nUt}},{key:"WLt",get:function(){return this.rUt}},{key:"HLt",get:function(){return this.hUt}},{key:"COt",get:function(){return this.iFt?0:this.oUt?this.oUt:this.rUt?3*this.rUt:void 0}},{key:"ROt",get:function(){var t;return null!=(t=this.aUt)?t:this.hUt?3*this.hUt:void 0}},{key:"xOt",get:function(){return this.uUt}},{key:"POt",get:function(){return this.cUt}},{key:"IOt",get:function(){return this.dUt}},{key:"sFt",get:function(){return this.lUt}},{key:"fUt",get:function(){return void 0!==this.HLt}},{key:"vUt",get:function(){if(this.iFt)return!0;var t=Ui.Mg()/1e3,i=this._Ut,n=this.gUt;return void 0!==i&&t-it)return ut.reject(new WQ);for(var i,n=[],r=Lt(this.QUt);!(i=r()).done;){var e,s=i.value;if(s0&&this.cVt.every(function(i){return t.sVt.some(function(t){return t.iat===i})})},i.YUt=function(t){if(this.GUt.has(t))return this.GUt.get(t);var i={EU:void 0,KUt:new Va,sVt:[]};return this.GUt.set(t,i),i},i.dVt=function(t){var i=this;this.cVt=t,this.GUt.forEach(function(t,n){return i.aVt(t,n)})},i.lVt=function(){this.eVt=-1},i.jUt=function(){return this.eVt},i.zg=function(){this.GUt.forEach(function(t){return t.KUt.Zg()}),this.GUt.clear()},t}();function XQ(t){return void 0!==t.EU}function qQ(t,i){return-function(t,i){if(t.oVt||i.oVt)return function(t,i){var n=t.gF(i);return t.mF()||i.mF()||(n.aF(A_())?n=n.gF(b_()):n.lF(A_()._F())&&(n=n.gO(b_()))),n}(t.nVt,i.nVt).oF(m_.SF);return t.nVt.oF(i.nVt)}(t,i)||function(t,i){return t.hVt===i.hVt?Nn.rh:t.hVt?Nn.Fg:Nn.Ug}(t,i)||function(t,i){return t.rVt.oF(i.rVt)}(t,i)}var GQ=function(){function t(t,i){this.gVt=[],this.vVt=[],this.TVt=Ju(),this.pVt=new zQ,this.FUt=void 0,this.PVt=void 0,this.PVt=t,this.FUt=i}var i=t.prototype;return i.IFt=function(t,i){if(Pj(t))if(0===this.gVt.length)this.mVt(t);else{if(!i)return void vj.FLt("HLSModel","No rendition was provided to update the playlist. Ignoring the update.");i.sLt.IFt(t)}else{if(0!==this.gVt.length)return void vj.FLt("HLSModel","Master playlist can only be applied once. Ignoring the update.");this.wVt(t)}},i.mVt=function(t){var i=this.yVt(t.Syt);i.IFt(t);var n=this.bVt(Dj.Bk,i),r=this.bVt(Dj.Mk,i),e=new mQ({Syt:i.Syt,IW:0,wyt:0,yyt:NaN,Rrt:void 0,RRt:void 0,Olt:0,gOt:[],wOt:void 0,AOt:void 0,pOt:void 0,bOt:void 0,yOt:void 0,mOt:void 0},i,[n,r]);this.gVt.push(e)},i.wVt=function(t){var i,n,r=function(){var n=e.value,r=s.filter(function(t){return function(t,i){return jQ(t.Km,t.oLt,i)&&(!t.uLt||t.sLt.Syt===i.Syt)}(t,n)});i.SVt(n,r);var u=new mQ(n,i.yVt(n.Syt,t.Tn),r);i.gVt.push(u)};(n=this.vVt).push.apply(n,[].concat(t.UW));for(var e,s=this.AVt(t),u=Lt(t.XOt);!(e=u()).done;)i=this,r()},i.yVt=function(t,i){var n=this.TVt.get(t);return void 0===n&&(n=new MQ(t,i,this.FUt),this.TVt.set(t,n)),n},i.AVt=function(t){for(var i,n=[],r=Lt(t.$D);!(i=r()).done;){var e=i.value;if(void 0===e.Syt)for(var s,u=Lt(t.XOt);!(s=u()).done;){var o=s.value;if(jQ(e.Km,e.oLt,o)){var h=new ZG(e,this.yVt(o.Syt));n.push(h)}}else{var a=new ZG(e,this.yVt(e.Syt));n.push(a)}}return n},i.bVt=function(t,i){return new ZG({Km:t,Syt:void 0,oLt:"",bs:void 0,_Ot:void 0,l:"",nLt:!0,rLt:!1,hLt:!1,cLt:void 0,aLt:void 0,X9:void 0},i)},i.SVt=function(t,i){var n=i.filter(function(t){return t.Km===Dj.Bk}),r=i.filter(function(t){return t.Km===Dj.Mk}),e=t.Rrt&&(t.Rrt.W9||t.Rrt.q9);if((!e||t.Rrt.W9)&&0===r.length){var s=this.bVt(Dj.Mk,this.yVt(t.Syt));i.push(s)}if((!e||t.Rrt.q9)&&0===n.length){var u=this.bVt(Dj.Bk,this.yVt(t.Syt));i.push(u)}t.Rrt&&t.Rrt.fOt},i.kVt=function(t){for(var i,n=Lt(this.gVt);!(i=n()).done;)for(var r,e=Lt(i.value.VLt);!(r=e()).done;){var s=r.value;if(s===t)return s}},i.EVt=function(t){for(var i,n=Lt(this.gVt);!(i=n()).done;){var r=i.value;if(r===t)return r}},i.xVt=function(t){for(var i,n=Lt(this.gVt);!(i=n()).done;){var r=i.value;if(jn(r.VLt,t))return r}},i.zg=function(){Yn(this.gVt),Yn(this.vVt),this.TVt.clear(),this.pVt.zg()},Nt(t,[{key:"fVt",get:function(){return this.vVt}},{key:"_Vt",get:function(){return this.gVt}},{key:"AM",get:function(){return this.pVt}}]),t}();function jQ(t,i,n){switch(t){case Dj.Bk:return n.pOt===i;case Dj.Mk:return n.bOt===i;case Dj.HU:return n.yOt===i;case Dj.YLt:return n.mOt===i}return!1}U(),Et(),Pt();var QQ=function(t){function i(i){var n;return(n=t.call(this,JQ.IVt)||this).fLt=void 0,n.fLt=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var YQ=function(t){function i(i){var n;return(n=t.call(this,JQ.CVt)||this).fLt=void 0,n.fLt=i,n}return Ct(i,t),i}(rh),KQ="HlsModelUpdater",JQ=function(t){return t.IVt="RVt",t.CVt="DVt",t}({}),ZQ=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).aV=void 0,u.Sut=void 0,u.sTt=void 0,u.Pyt=void 0,u.BVt=void 0,u.LVt=void 0,u.YVt=void 0,u.FVt=void 0,u.KVt=void 0,u.aV=i,u.Sut=n,u.sTt=r,u.BVt=!1,u.LVt=!1,u.YVt=void 0,u.FVt=void 0,u.KVt=Zu(),u.Pyt=new GQ(e,s),u}Ct(i,t);var n=i.prototype;return n.UVt=function(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:if(!(i=this.Pyt.PVt))throw new y("HLSModelUpdater - Could not load HLS playlist: The provided source is empty.");return this.So(new KR),[4,this.VVt(i,{},2,!0,t)];case 1:if(n=e.sent(),!Cj(r=n.sLt)&&!Pj(r))throw new y("HLSModelUpdater - Could not load HLS playlist: The playlist is invalid.");return Cj(r)||vj.cN(KQ,"Detected media playlist only HLS stream."),this.HVt(r),n.WVt?(this.LVt=!0,[4,this.qVt(t)]):[3,3];case 2:e.sent(),e.label=3;case 3:return this.BVt=!0,[2]}})}).call(this)},n.zVt=function(t,i,n,r){return Vt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(!(e=this.Pyt.kVt(t)))throw new y("HLSModelUpdater - Could not load HLS playlist for rendition: the rendition does not exist on the internal model.");s={LOt:i,kUt:n,uD:nY(e)},u=fe(b.max(1,3*t.sLt.gUt)),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,this.GVt(e,s,r,u)];case 2:return h.sent(),[3,4];case 3:throw lr(o=h.sent()),this.XVt(e),o;case 4:return[2]}})}).call(this)},n.jVt=function(t,i){var n=this.Pyt.kVt(t);if(!n)throw new y("HLSModelUpdater - Could not load HLS playlist for rendition: the rendition does not exist on the internal model.");var r={LOt:void 0,kUt:void 0,uD:nY(n)},e=fe(b.max(1,3*t.sLt.gUt));return this.GVt(n,r,i,e)},n.QVt=function(t,i){return this.KVt.has(t.JI)||this.KVt.set(t.JI,new Va),gr(this.KVt.get(t.JI).Yy,i)},n.XVt=function(t){this.So(new YQ(t))},n.GVt=function(t,i,n,r){return Vt(function(){var e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:e=t.sLt.BLt(i),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.VVt(e,i,0,this.LVt,n,r)];case 2:return u=a.sent(),s=u.sLt,[3,4];case 3:throw lr(o=a.sent()),t.sLt.bUt=Ui.Mg(),o;case 4:if(!Pj(s))throw new y("HLSModelUpdater - Could not load HLS playlist for rendition: the playlist is not a media playlist.");if(!this.YVt||t===this.YVt||this.YVt.sLt.vUt)return[3,8];a.label=5;case 5:return a.trys.push([5,7,,8]),[4,this.jVt(this.YVt,n)];case 6:return a.sent(),[3,8];case 7:return lr(a.sent()),this.YVt=t,this.JVt(),[3,8];case 8:try{this.HVt(s,t)}catch(e){if(V(e,TQ)&&void 0!==i.uD)return h=Yu({},i,{uD:void 0}),[2,this.GVt(t,h,n,r)];throw e}return this.YVt=t,[2]}})}).call(this)},n.VVt=function(t,i,n,r,e,s){return Vt(function(){var u;return zt(this,function(o){switch(o.label){case 0:return vj.cN(KQ,"Loading HLS playlist at "+t+"."),r?[4,this.ZVt(t,e)]:[3,2];case 1:if(void 0!==(u=o.sent()))return[2,{sLt:u,WVt:!0}];o.label=2;case 2:return[4,this.$Vt(t,i,n,e,s)];case 3:return[2,{sLt:o.sent(),WVt:!1}]}})}).call(this)},n.ZVt=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.Sut.hTt([t])];case 1:return n=r.sent(),dr(i),void 0!==n?[2,_Q(n.responseURL,{},n.data)]:[3,3];case 2:return lr(r.sent()),[3,3];case 3:return[2]}})}).call(this)},n.$Vt=function(t,i,n,r,e){return Vt(function(){var s,u,o;return zt(this,function(h){switch(h.label){case 0:return s=this,u={Yu:t,fk:Ud.LT,Xk:this.sTt,Hk:ml.GET,Km:yl.bk,Yg:r,Wk:e},[4,mT(function(t){return s.tHt(u,t)},r,n)];case 1:return[2,_Q((o=h.sent()).wk,i,o.lk)]}})}).call(this)},n.tHt=function(t,i){return void 0===i&&(i=0),Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,this.aV.vk(t)];case 1:return[4,(n=s.sent()).HT()];case 2:return[2,{lk:s.sent(),wk:n.wk}];case 3:throw vr(r=s.sent())||(e=Yl(r)?r.uE.dk:void 0,this.So(new cH),this.So(new IH(i,e,r.message))),r;case 4:return[2]}})}).call(this)},n.qVt=function(t){return Vt(function(){var i,n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:for(dr(t),i=[],n=Lt(this.Pyt._Vt);!(r=n()).done;)for(e=r.value,s=Lt(e.VLt);!(u=s()).done;)o=u.value,i.push(this.iHt(o,t));return[4,ut.all(i)];case 1:return h.sent(),[2]}})}).call(this)},n.iHt=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,4,,5]),[4,this.Sut.hTt([t.sLt.Syt])];case 1:return n=r.sent(),dr(i),void 0===n||t.sLt.vUt?[3,3]:[4,this.jVt(t,i)];case 2:r.sent(),r.label=3;case 3:return[3,5];case 4:return lr(r.sent()),[3,5];case 5:return[2]}})}).call(this)},n.JVt=function(){for(var t,i=Lt(this.Pyt._Vt);!(t=i()).done;)for(var n,r=Lt(t.value.VLt);!(n=r()).done;){var e=n.value;e!==this.YVt&&(void 0!==e.sLt.SFt&&(e.sLt.vUt?this.eHt(e):e.sLt.UUt()))}},n.eHt=function(t){if(0!==t.sLt.bct.length){if(!this.YVt)return this.YVt=t,void this.YVt.sLt.qUt(0,void 0);if(this.sHt(this.YVt),!this.sHt(t)&&void 0===t.sLt.SFt){var i=this.nHt(t,this.YVt);vj.OLt(KQ,"Assuming global timeline offset of "+i+"s for rendition "+t.sLt.Syt+"."),t.sLt.qUt(i,void 0)}}},n.nHt=function(t,i){if($Q(t)){var n=t.sLt.bct[0],r=i.sLt.bct[0];return vj.OLt(KQ,"Synchronizing by start of VOD: "+r.CO+" vs "+n.CO),r.CO-n.DFt}var e=function(t,i){var n=t.length-1,r=i.length-1;for(;n>=0&&r>=0;){var e=t[n],s=i[r];if(e.$Ot>s.$Ot)n--;else if(e.$Ot=t.sLt.POt/2))return t.sLt.IOt?AQ.zFt:AQ.qFt}var rY=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).nEt=void 0,r.oHt=void 0,r.aHt=function(t){r.NUt(t.fLt)},r.nEt=i,r.nEt.wn(JQ.IVt,r.aHt),r}Ct(i,t);var n=i.prototype;return n.NUt=function(t){if(0!==t.sLt.tFt.length){this.oHt||(this.oHt=this.iV.sI(Jm.zU,void 0,void 0,void 0,void 0,Ng.DATE_RANGE),this.tt(this.oHt));RQ(this.oHt,t.sLt.tFt,function(i){var n;return null!=(n=t.sLt.pFt(i))?n:NaN})}},n.eV=function(t,i,n){var r=ly(t,i,n);return this.oHt===t&&(this.oHt=r),r},i}(dy);U(),Et(),Pt();var eY=function(t){function i(){return t.call(this,JG.ZMt)||this}return Ct(i,t),i}(rh);U(),Et(),xt(),Ft(),U(),Et(),Wt(),xt(),Qt(),U(),Et(),xt();var sY=function(){function t(t){this.Wrt=void 0,this.Dbt=void 0,this.n3=void 0,this.Ipt=void 0,this.Wrt=t,this.Dbt=[],this.n3=void 0,this.Ipt=void 0}var i=t.prototype;return i.cHt=function(t){var i;return null==(i=this.dHt(t))?void 0:i.fLt},i.lHt=function(t){this.n3=t,this.fHt()},i.elt=function(t,i,n,r,e,s){this.Dbt.push({fLt:t,yut:i,vHt:EA.nL(e,s),_Ht:EA.nL(n,r)}),this.fHt()},i.dHt=function(t){return Fn(this.Dbt,function(i){return i._Ht.Cr(t)})},i.Oat=function(t){return Fn(this.Dbt,function(i){return i.yut===t})},i.Qct=function(t,i){return Fn(this.Dbt,function(n){return n.fLt===t&&HQ(n.yut,i)})},i.F3=function(){var t=this.Fx;t.V>0&&(this.Ipt=t.An(t.V-1))},i.fHt=function(){var t=this.Wrt.Fx;this.Dbt=this.Dbt.filter(function(i){return 0!==t.Mn(i._Ht).V})},Nt(t,[{key:"uHt",get:function(){return this.n3}},{key:"Fx",get:function(){return zO(this.Wrt.Fx,this.Wrt.W3)}},{key:"bct",get:function(){return this.Dbt}},{key:"Npt",get:function(){return this.Ipt}}]),t}();U(),Et();var uY=188,oY=function(t){return t[t.yk=0]="yk",t[t.pC=1]="pC",t[t.gHt=2]="gHt",t[t.pHt=3]="pHt",t}({});function hY(t){return aY(t)?1:function(t){return function(t){if(t.length<376)return-1;for(var i=t.length<564?2:3,n=b.min(1e3,t.length-i*uY),r=0;r<=n;r++){for(var e=!0,s=0;s=0}(t)?2:function(t){return null!==LD(_a(t),new Ta)}(t)?3:0}function aY(t){var i=wa(t,0,b.min(t.length,16384));return km.RD(_a(i))}var cY=function(){function t(t,i,n,r,e,s,u){var o=this;this.eb=void 0,this.Yot=void 0,this.DHt=void 0,this.Vp=void 0,this.Opt=void 0,this.ENt=void 0,this.WHt=void 0,this.bHt=void 0,this.hT=new hr,this.yHt=EA.rL(),this.qHt=void 0,this.spt=void 0,this.CHt=!0,this.SHt=!1,this.NHt=function(t){o.bHt&&(t?iR(t)&&fY(o)?o.WHt.iJ(o.eb.Fx.eL)?o.bHt.Qy():o.bHt.Ky(t):vr(t)?o.bHt.Qy():(o.SHt=!0,o.bHt.Ky(t)):o.bHt.Qy(),o.bHt=void 0)},this.Vp=t,this.DHt=n,this.eb=i,this.Yot=r,this.WHt=e,this.Opt=s,this.ENt=u}var i=t.prototype;return i.THt=function(){if(this.yCt)throw new y("Cannot perform new operation while BufferAppender is still busy")},i.kHt=function(t){this.eb!==t&&(this.THt(),this.eb=t,this.Yot=new sY(t))},i.EHt=function(){return this.bHt?this.bHt.Yy:ut.resolve()},i.xHt=function(t){var i=this.Yot.Npt;return void 0!==i&&this.PHt(t,i)},i.PHt=function(t,i){var n,r,e=b.min(t,i);return null!=(r=null==(n=this.Yot.Fx.MM().qM(this.wHt).iL(e))?void 0:n.Cr(i))&&r},i.IHt=function(t){return this.Yot.cHt(t)},i.Zg=function(){this.hT.Zg(),this.hT=new hr,this.CHt=!0},i.J2=function(t){var i=this;this.THt(),this.bHt=new Va;var n=function(n){i.DHt.RHt(t),i.NHt(n)};this.Z2(t,this.hT.Yg).then(n,n)},i.Z2=function(t,i){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return vj.OLt(wj,"Appending initializer",Oj(t.BHt.Syt)),this.spt=t,[4,this.eb.J2(t,i)];case 1:return n.sent(),void 0!==this.ENt&&this.Vp===eg.Mk&&aY(t.lk.lk)&&this.ENt.ght(t.lk.lk),vj.OLt(wj,"Appended initializer",Oj(t.BHt.Syt)),this.CHt=!1,this.Yot.lHt(t),[2]}})}).call(this)},i.Pdt=function(t){var i=this;this.THt(),this.bHt=new Va;var n=function(n){i.DHt.RHt(t),i.NHt(n)};this.MHt(t,this.hT.Yg).then(n,n)},i.MHt=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:if(void 0===(n=t.fLt).sLt.WLt)throw new y("HlsBufferAppender: Cannot append HLSAsset to "+this.Vp+" buffer for a HLSRendition with an undefined targetDuration.");return this.CHt&&void 0!==this.spt?[4,this.Z2(this.spt,i)]:[3,2];case 1:f.sent(),f.label=2;case 2:return r=this.Yot.Fx.IM,e=this.eb.Fx,vj.OLt(wj,"Appending",Oj(t.BHt.Syt)),[4,this.eb.Q2(t,i)];case 3:return f.sent(),void 0!==t.lk&&this.LHt(t.lk,t),vj.OLt(wj,"Appended",Oj(t.BHt.Syt),r,this.Yot.Fx.IM),s=t.CO,u=s+t.ct,o=t.BHt,h=o.CO,c=o.CO+(null!=(a=o.ct)?a:0),this.Yot.elt(n,o,s,u,h,c),this.OHt(n,o,s,u,e),t.BHt.EFt&&this.Yot.F3(),[2]}})}).call(this)},i.OHt=function(t,i,n,r,e){if(this.Km===eg.Mk){var s=this.eb.Fx.qM(e),u=this.Yot.Qct(t,i);if(u)if(this.FHt(u))if(0===s.V){if(void 0===this.Yot.Oat(i)){var o=this.eb.W3.Mn(new EA([n,r]));this.yHt=this.yHt.HM(o)}}else{var h=s.Tn(0),a=new EA([h,r]);if(this.yHt=this.yHt.qM(a),h>n){var c=this.eb.W3.Mn(new EA([n,h]));this.yHt=this.yHt.HM(c)}}else{var f=s.V>0&&s.Tn(0)n?w:n;if(l>g){var _=this.eb.W3.Mn(new EA([g,s.Tn(0)]));this.yHt=this.yHt.HM(_)}}}},i.FHt=function(t){var i=t._Ht,n=i.Tn(0),r=i.An(i.V-1),e=i.RM(0),s=i.NM(i.V-1);return this.yHt.GM(n,r,e,s)},i.LHt=function(t,i){var n;if(aY(t.lk)){var r=i.CO,e=r+i.ct,s=i.EU;if(null==(n=this.Opt)||n.elt(t.lk,r,s),void 0!==this.ENt&&this.Vp===eg.Mk){var u=i.BHt.EFt;this.ENt.elt(t.lk,r,e,s,i.fLt,u)}var o=[];void 0!==this.Opt&&o.push(this.Opt),void 0!==this.ENt&&o.push(this.ENt),vy(this.eb.Fx,o)}},i.UHt=function(t){this.THt(),this.bHt=new Va;try{vj.OLt(wj,"Appending gap from "+t.VHt+" to "+t.HHt,Oj(t.yut.Syt)),this.G3(t.VHt,t.HHt)}finally{this.DHt.RHt(t),this.NHt()}},i.G3=function(t,i){this.eb.G3(t,i)},Nt(t,[{key:"Km",get:function(){return this.Vp}},{key:"mHt",get:function(){return this.Yot}},{key:"wHt",get:function(){return this.yHt}},{key:"yCt",get:function(){return void 0!==this.bHt}},{key:"AHt",get:function(){return this.SHt}}]),t}();function fY(t){return sg(t.Km)}U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et(),Wt(),Qt();var vY=function(){function t(t,i,n){this.XHt=void 0,this.aV=void 0,this.sTt=void 0,this.jHt=void 0,this.XHt=t,this.aV=i,this.sTt=n,this.jHt=void 0}var i=t.prototype;return i.zHt=function(t,i,n,r){return Vt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,this.GHt(i,r)];case 1:return e=s.sent(),[4,this.XHt.zHt(t,e,n)];case 2:return[2,s.sent()]}})}).call(this)},i.GHt=function(t,i){return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return(null==(n=this.jHt)?void 0:n.Yu)===t?[3,3]:(vj.OLt("HLSDecryptor","Fetching new AES-128 decryption key from "+t+"."),[4,this.aV.vk({Yu:t,fk:Ud.NT,Hk:ml.GET,Yg:i,Km:yl.Tk,zk:pl.Nk,Xk:this.sTt})]);case 1:return[4,s.sent().qT()];case 2:r=s.sent(),e=new E(r),this.jHt={Yu:t,lk:e},s.label=3;case 3:return[2,this.jHt.lk]}})}).call(this)},t}();U(),Et(),Wt(),Qt();var dY=function(){function t(t,i,n,r,e){void 0===e&&(e=2),this.aV=void 0,this.Sut=void 0,this.qat=void 0,this.sTt=void 0,this.Srt=void 0,this.aV=t,this.Sut=i,this.qat=n,this.sTt=r,this.Srt=e}var i=t.prototype;return i.vk=function(t,i,n,r,e){return Vt(function(){var s,u;return zt(this,function(o){switch(o.label){case 0:return[4,this.QHt(t,i,n,Ud.NT,r,e)];case 1:return[4,(s=o.sent()).qT(e)];case 2:return u=o.sent(),[2,{httpStatusCode:s.dk,response:new E(u)}]}})}).call(this)},i.KHt=function(t,i,n,r,e){return Vt(function(){return zt(this,function(s){switch(s.label){case 0:return[4,this.QHt(t,i,n,Ud.MT,r,e)];case 1:return[2,s.sent().zT(e)]}})}).call(this)},i.QHt=function(t,i,n,r,e,s){return Vt(function(){var u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:u=this,t.iAt&&0===(o=Rj(t.iAt.Tn,t.iAt.V))[0]&&o[1]===bn&&(o=void 0),h=o?{Range:"bytes="+o[0]+"-"+o[1]}:void 0,a=new Al({Yu:t.XE,fk:r,_k:h,Xk:this.sTt,Hk:ml.GET,Km:i,zk:n,Gk:this.qat,Kk:r===Ud.MT,jk:e,Yg:s}),f.label=1;case 1:return f.trys.push([1,3,,4]),[4,this.Sut.Aut(t.XE,o)];case 2:return c=f.sent(),dr(s),void 0!==c?(null==e||e(c.buffer.byteLength,c.buffer.byteLength),[2,new _l({vk:a,fk:a.fk,lk:c.buffer})]):[3,4];case 3:return lr(f.sent()),[3,4];case 4:return[4,mT(function(){return gr(u.aV.vk(a),a.Yg)},s,this.Srt)];case 5:return[2,f.sent()]}})}).call(this)},t}();U(),Et(),Wt(),Qt();var lY=function(){function t(t,i){this.nEt=void 0,this.JHt=void 0,this.sWt=void 0,this.hWt=new hr,this.En=-1/0,this.$Ht=void 0,this.nWt=!1,this.nEt=t,this.JHt=i,this.iWt()}var i=t.prototype;return i.YHt=function(){return this.JHt.sLt.xOt},i.ZHt=function(t,i,n){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:if(!this.YHt())throw new y("Could not perform blocking playlist update.");return r=this.$Ht,e={LOt:t,kUt:i},void 0!==r&&function(t,i,n){if(t.LOt===i.LOt){if(t.kUt===i.kUt)return!0;if(0===t.kUt&&void 0===i.kUt)return!0}if(t.LOt===i.LOt+1&&0===t.kUt&&void 0!==i.kUt){var r=n.Oat(i.LOt);if(r&&r.Syt&&i.kUt>=r.QOt.length)return!0}return!1}(r,e,this.JHt.sLt)?[3,2]:[4,this.tWt()];case 1:s.sent(),this.iWt(e),s.label=2;case 2:return[2,this.nEt.QVt(this.JHt,n)]}})}).call(this)},i.eWt=function(t){return this.iWt(),this.nEt.QVt(this.JHt,t)},i.iWt=function(t){var i=this;if(!this.sWt&&!this.nWt){var n=function(){i.sWt=void 0};this.sWt=this.rWt(t,this.hWt.Yg).then(n,n)}},i.tWt=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.sWt?(this.hWt.Zg(),this.hWt=new hr,[4,this.sWt.catch(dn)]):[3,2];case 1:t.sent(),this.sWt=void 0,t.label=2;case 2:return[2]}})}).call(this)},i.rWt=function(t,i){return Vt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:n=t,u.label=1;case 1:if(dr(i),this.JHt.sLt.iFt&&this.JHt.sLt.vUt)return[2];null!=n||(n=this.oWt()),this.$Ht=n,u.label=2;case 2:return u.trys.push([2,9,,10]),n?[4,this.nEt.zVt(this.JHt,n.LOt,n.kUt,i)]:[3,4];case 3:return u.sent(),[3,8];case 4:return r=Ui.Mg()-this.En,e=1e3*this.JHt.sLt.gUt,r=t)return!0;if(e=t},i.cWt=function(t,i){for(var n=[],r=0;r0?(a=ka(s,0,h),c=ka(s,h),vj.OLt(gY,"Of the read "+u+" bytes, the first "+h+" will be stored locally for extraction of "+Oj(this.NFt)),this.yWt.lWt(e,a),c.length>0?(vj.OLt(gY,"Extracting "+c.length+" bytes for extraction of "+Oj(this.NFt)),t.enqueue(c),this.pWt(),[2,kr(this.readAndSliceOutAssetBytes(t))]):[3,9]):[3,5];case 5:return e+u<=r?(vj.OLt(gY,"Extracting the read data range for extraction of "+Oj(this.NFt)),t.enqueue(s),this.pWt(),[2,kr(this.readAndSliceOutAssetBytes(t))]):[3,6];case 6:return v=ka(s,0,f=r-e),d=ka(s,f),v.length>0&&(vj.OLt(gY,"Extracting "+v.length+" bytes for extraction of "+Oj(this.NFt)),t.enqueue(v)),vj.OLt(gY,"Of the read "+u+" bytes, the last "+d.length+" will be stored locally for extraction of "+Oj(this.NFt)),this.yWt.lWt(e+f,d),vj.OLt(gY,"Extraction of "+Oj(this.NFt)+" completed as the entire request has been fulfilled."),this.AWt(t),this.SWt?(vj.OLt(gY,"Aborting stream upstream as no more bytes are needed from "+Oj(this.NFt)+"."),[4,this.Wd.gWt("AssetExtraction - AbortOnEnd")]):[3,8];case 7:l.sent(),l.label=8;case 8:return[2];case 9:return[3,3];case 10:return[3,12];case 11:return l.sent(),vj.OLt(gY,"Extraction of "+Oj(this.NFt)+" completed as the entire source stream has been read."),this.AWt(t),[3,12];case 12:return[2]}})}).call(this)},i.AWt=function(t){t.close(),this.pWt(),this.TWt.Qy()},i.start=function(t){vj.OLt(gY,"Preparing to push all collected data to controller for extraction of "+Oj(this.NFt)),this.wWt(t),vj.OLt(gY,"Collected data pushed to controller for extraction of "+Oj(this.NFt));var i=kY(this.NFt.iAt).sAt;this.Wd.fWt>=i?(vj.OLt(gY,"Extraction of "+Oj(this.NFt)+" completed as the entire request has been fulfilled."),this.AWt(t)):(vj.OLt(gY,"Continuing read from original stream for extraction of "+Oj(this.NFt)),kr(this.readAndSliceOutAssetBytes(t)))},i.pull=function(){return this.bWt.Qy(),this.bWt=new Va,this.mWt.Yy},Nt(t,[{key:"kWt",get:function(){return this.TWt.Yy}}]),t}(),pY=function(){function t(t,i){this.NFt=void 0,this.yWt=void 0,this.EWt=void 0,this.xWt=void 0,this.NFt=i;var n=kY(this.NFt.iAt).eAt;this.EWt=new mY(t,n),this.yWt=new _Y}var i=t.prototype;return i.pO=function(t){if(!Mj(this.NFt,t))return!1;var i=kY(t.iAt),n=i.eAt,r=i.sAt;return this.yWt.aWt(this.EWt.fWt,n,r)},i.Fgt=function(t,i){return void 0===i&&(i=!1),Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return n=this.EWt,r=this.yWt,vj.cN(gY,"Extracting data from "+Oj(t)+" out of "+Oj(this.NFt)),this.xWt?(vj.OLt(gY,"Awaiting previous extraction before extracting "+Oj(t)+" out of "+Oj(this.NFt)),[4,this.xWt]):[3,2];case 1:s.sent(),s.label=2;case 2:if(!this.pO(t))throw new y("The extractor does not contain the data requested");return e=new yY(t,n,r,i),this.xWt=e.kWt,[2,new jd(e)]}})}).call(this)},t}();function kY(t){if(t){var i=t.Tn;return{eAt:i,sAt:void 0!==t.V?i+t.V:bn}}return{eAt:0,sAt:bn}}var bY=function(){function t(t,i){this.NFt=void 0,this.PWt=void 0,this.hT=void 0,this.Ypt=void 0,this.NFt=t,this.PWt=i,this.hT=new hr,this.Ypt=this.Un()}var i=t.prototype;return i.Un=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return[4,this.PWt.KHt(this.NFt,yl.Sk,pl.yk,void 0,this.hT.Yg)];case 1:return t=i.sent(),[2,new pY(t,this.NFt)]}})}).call(this)},i.pO=function(t){return Mj(this.NFt,t)},i.Fgt=function(t,i){return void 0===i&&(i=!1),Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.Ypt];case 1:return[4,gr(n.sent().Fgt(t,i),this.hT.Yg)];case 2:return[2,n.sent()]}})}).call(this)},i.Zg=function(){this.Ypt.catch(dn),this.hT.Zg()},t}();U(),Et(),Pt();var AY=function(t){function i(i){var n;return(n=t.call(this,PY.IWt)||this).Gk=void 0,n.Gk=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var TY=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,PY.CWt)||this).uri=void 0,h.RWt=void 0,h.Gk=void 0,h.mediaSequenceNumeber=void 0,h.mediaTrackId=void 0,h.DWt=void 0,h.httpStatusCode=void 0,h.uri=i,h.RWt=n,h.Gk=r,h.mediaSequenceNumeber=e,h.mediaTrackId=s,h.DWt=u,h.httpStatusCode=o,h}return Ct(i,t),i}(rh);function SY(t,i,n){var r=UQ(n)?n:n.PFt;if(i.zUt(r.$Ot)){if(void 0!==n.Get)return i.$Ut(n.Get,n).rF();if(n!==r&&void 0!==r.Get){var e=i.$Ut(r.Get,r).rF();return n.CO+(e-r.CO)}}var s=t.sLt.Oat(r.LOt-1);if(void 0!==s&&i.zUt(s.$Ot)){if(s.QOt.length>0){var u=s.OFt(s.QOt.length-1);if(void 0!==u.Get){var o=i.$Ut(u.Get,u).rF();return n.CO+(o-u.CO)}}if(void 0!==s.Get){var h=i.$Ut(s.Get,s).rF();return n.CO+(h-s.CO)}}var a=t.sLt.Oat(r.LOt+1);if(void 0!==a&&i.zUt(a.$Ot)){if(a.QOt.length>0){var c=a.OFt(0);if(void 0!==c.Get){var f=i.$Ut(c.Get,c).rF();return n.CO+(f-c.CO)}}if(void 0!==a.Get){var v=i.$Ut(a.Get,a).rF();return n.CO+(v-a.CO)}}return n.CO}function EY(t){return void 0!==t.Get}function IY(t,i,n,r){for(var e=i;e=0;e--){var s=t[e];if(s.$Ot!==n)break;if(EY(s))if(r(s,e))break}}U(),Et();var CY="HlsPlaylistDownloader",PY=function(t){return t.IWt="NWt",t.CWt="BWt",t}({}),DY=function(t){function i(i,n,r,e,s,u,o,h){var a;return(a=t.call(this)||this).Vp=void 0,a.nEt=void 0,a.DHt=void 0,a.PWt=void 0,a.Sqt=void 0,a.JHt=void 0,a.LWt=void 0,a.OWt=void 0,a.WWt=void 0,a.Tqt=void 0,a.kqt=0,a.Eqt=0,a.xqt=0,a.Pqt=0,a.GWt=new hr,a.XWt=void 0,a.FWt=0,a.UWt=void 0,a.VWt=void 0,a.HWt=!1,a.QWt=void 0,a.jWt=void 0,a.uqt=0,a.iqt=function(t){a.OWt&&(a.JHt=a.OWt,a.OWt=void 0,a.FWt=0,a.UWt=void 0,a.VWt=void 0,a.HWt=!1),a.WWt&&(t&&!vr(t)?a.WWt.Ky(t):(a.uqt=0,a.WWt.Qy()),a.WWt=void 0)},a.bqt=function(t,i){a.xqt=t,t>0&&0===a.kqt&&(a.kqt=Ui.Mg()),void 0!==i&&(a.Pqt=i),a.So(new AY(a.Vp))},a.Vp=i,a.nEt=r,a.DHt=e,a.JHt=n,a.LWt=new lY(r,n),a.Sqt=new vY(o,s,h),a.PWt=new dY(s,u,function(t){switch(t){case Dj.Mk:return kl.Mk;case Dj.Bk:return kl.Bk;case Dj.HU:case Dj.YLt:return kl.LT;default:return kl.yk}}(n.Km),h),a}Ct(i,t);var n=i.prototype;return n.MWt=function(t){this.LWt.zg(),this.LWt=new lY(this.nEt,t),this.yCt?this.OWt=t:(this.JHt=t,this.FWt=0,this.UWt=void 0,this.VWt=void 0,this.HWt=!1)},n.EHt=function(){return this.WWt?this.WWt.Yy:ut.resolve()},n.zWt=function(){return this.DHt.zWt()},n.Zg=function(){var t,i,n;this.GWt.Zg(),this.GWt=new hr,null==(t=this.XWt)||t.Zg(),this.XWt=void 0,null==(i=this.jWt)||i.Zg(),null==(n=this.QWt)||n.Zg(),this.jWt=void 0,this.QWt=void 0,this.FWt=0,this.UWt=void 0,this.VWt=void 0,this.HWt=!1},n.zg=function(){this.LWt.zg(),this.Vo()},n.KWt=function(t){var i=this.JHt.sLt.xUt(t);if(!i)return!1;if(void 0!==this.UWt){var n=i.LOt===this.UWt;return void 0!==this.VWt?i.FFt(t)===i.OFt(this.VWt)&&n:n}return!1},n.YWt=function(t){var i,n;if(!this.qWt&&(void 0===this.UWt||t=u&&(i=this.JWt(t))}else if(this.JHt.sLt.iFt&&void 0!==this.UWt){if(this.JHt.sLt.Oat(this.UWt).EFt&&void 0!==(i=this.JWt(t))&&i[0].LOt===this.UWt)return}if(i){this.FWt=t;var o=i[0],h=i[1];return 0===(null==h?void 0:h.CFt)&&void 0!==o.ct?[o,void 0]:[o,h]}},n.JWt=function(t){var i,n,r=this.JHt.sLt.bct;if(0!==r.length){var e,s=this.nEt.Br.AM,u=m_.hU(t),o=function(t,i,n){var r=t.sLt.bct;if(0!==r.length){var e=t.sLt.PUt(n.rF());if(i.zUt(e.$Ot)){var s,u,o,h=e.LOt-r[0].LOt,a=e.$Ot,c=0;if(!(RY(r,h,a,function(t,i){return s=t,c=i,!0}),void 0===s&&(IY(r,h+1,a,function(t,i){return s=t,c=i,!0}),void 0===s)||(i.$Ut(s.Get,s).cF(n)?(u=s,IY(r,c+1,a,function(t){return i.$Ut(t.Get,t).hF(n)?(o=t,!0):(u=t,!1)})):(o=s,RY(r,c-1,a,function(t){return i.$Ut(t.Get,t).cF(n)?(u=t,!0):(o=t,!1)})),void 0===u||void 0===o)))return[u,o]}}}(this.JHt,s,u);if(void 0!==o){var h=o[0],a=o[1],c=s.$Ut(h.Get,h),f=s.$Ut(a.Get,a),v=u.gF(c).rF()/f.gF(c).rF()*(a.CO-h.CO);e=h.CO+v}else e=t;var d=r[r.length-1];return d.RO<=e?(i=d,n=d.VFt(e)):n=r[0].CO>e?(i=r[0]).OFt(0):null==(i=this.JHt.sLt.xUt(e))?void 0:i.VFt(e),i?[i,n]:void 0}},n.ZWt=function(t,i){var n,r;if((n=this.JHt.sLt.Oat(t))&&void 0!==i){if(0===n.QOt.length)return[n,void 0];r=n.OFt(i+1)}return void 0!==n&&void 0!==r||(r=null==(n=this.JHt.sLt.Oat(t+1))?void 0:n.OFt(0)),n?[n,r]:void 0},n.THt=function(){if(this.yCt)throw new y("Cannot perform new operation while PlaylistDownloader is still busy")},n.$Wt=function(t,i){this.THt(),this.WWt=new Va;var n=hr.ep([i,this.GWt.Yg]);this.tqt(t,n.Yg).then(this.iqt,this.iqt)},n.eqt=function(){this.LWt.iWt()},n.tqt=function(t,i){return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return this.JHt.sLt.iFt?[2]:(n=this.YWt(t))||!this.LWt.YHt()||void 0===this.UWt?[3,2]:[4,this.LWt.ZHt(void 0===this.VWt?this.UWt+1:this.UWt,void 0!==this.VWt?this.VWt+1:void 0,i)];case 1:e.sent(),n=this.YWt(t),e.label=2;case 2:return n||!this.LWt.YHt()||void 0===this.UWt?[3,4]:[4,this.LWt.ZHt(this.UWt+1,0,i)];case 3:e.sent(),n=this.YWt(t),e.label=4;case 4:return n?[3,6]:(vj.cN(CY,"No next segment / part available, need to update playlist before continuing."),[4,this.LWt.eWt(i)]);case 5:return e.sent(),r=this.fLt.sLt.bct,r[0].CO>t&&(this.VWt=void 0,this.UWt=void 0,this.HWt=!1),r[r.length-1].LOt0&&this.xqt>=this.Pqt)&&!(t-this.kqt<500)))},Nt(i,[{key:"yCt",get:function(){return void 0!==this.WWt}},{key:"qWt",get:function(){return this.HWt}},{key:"fLt",get:function(){var t;return null!=(t=this.OWt)?t:this.JHt}},{key:"jCt",get:function(){if(!this.JHt.sLt.iFt||void 0===this.UWt)return!1;var t=this.JHt.sLt.Oat(this.UWt);if(!t.EFt)return!1;if(void 0!==this.VWt&&!t.OFt(this.VWt).EFt)return!1;return!0}}]),i}(th);function NY(t,i,n,r){return{lk:{lk:n,Km:zR.wZ},Km:wY.JLt,jut:r,BHt:t,$Ot:i.$Ot}}function xY(t,i,n){return{lk:{lk:i,Km:zR.wZ},Km:wY.Ak,jut:n,BHt:t,$Ot:t.$Ot}}function BY(t,i,n){return{lk:{lk:i,Km:zR.wZ},jut:n,Km:wY.ZLt,BHt:t,$Ot:t.PFt.$Ot}}U(),Et(),xt(),Ft();var OY=function(){function t(t){this.Lqt=[],this.Fqt=Ju(),this.pVt=void 0,this.Vqt=void 0,this.Bqt=void 0,this.pVt=t}var i=t.prototype;return i.vqt=function(t){"YOt"===t.Km&&(this.Bqt=t.YOt),this.Lqt.push(t),this.Vqt&&(this.Vqt.Qy(),this.Vqt=void 0)},i.zWt=function(){return this.Lqt[0]},i.Hqt=function(t){Xn(this.Lqt,t)},i.nqt=function(){return null!=this.Vqt||(this.Vqt=new Va),this.Vqt.Yy},i.Wqt=function(t){this.qqt(t.iat).Wqt(t)},i.zqt=function(t){return this.qqt(t).zqt()},i.RHt=function(t){this.qqt(t.iat).RHt(t)},i.Gqt=function(t){var i;null==(i=this.Fqt.get(t))||i.zg()},i.Xqt=function(t){return this.qqt(t).Xqt()},i.qqt=function(t){if(this.Fqt.has(t))return this.Fqt.get(t);var i=new MY;return this.Fqt.set(t,i),i},i.jy=function(){this.jqt(),this.Qqt()},i.jqt=function(){this.Bqt=void 0,Yn(this.Lqt)},i.Qqt=function(){this.Fqt.forEach(function(t){return t.jy()})},i.zg=function(){this.Fqt.forEach(function(t){return t.zg()}),this.Fqt.clear(),this.jy(),this.Vqt&&(this.Vqt.Zg(),this.Vqt=void 0)},Nt(t,[{key:"uHt",get:function(){return this.Bqt}},{key:"Mqt",get:function(){for(var t,i=[],n=Lt(this.Lqt);!(t=n()).done;){var r=t.value;if("yut"===r.Km){var e,s=r.yut.BHt,u=SY(r.fLt,this.pVt,s);i.push({yut:s,fLt:r.fLt,CO:u,RO:u+(null!=(e=s.ct)?e:0)})}else"wqt"===r.Km&&i.push({yut:r.yut,fLt:r.fLt,CO:r.VHt,RO:r.HHt})}return i}},{key:"Oqt",get:function(){var t=[];return this.Fqt.forEach(function(i){for(var n,r=Lt(i.Uqt);!(n=r()).done;){var e=n.value;"yut"===e.Km?t.push({yut:e.BHt,fLt:e.fLt,CO:e.CO,RO:e.CO+e.ct}):"wqt"===e.Km&&t.push({yut:e.yut,fLt:e.fLt,CO:e.VHt,RO:e.HHt})}}),t}}]),t}(),MY=function(){function t(){this.Kqt=[],this.Yqt=void 0}var i=t.prototype;return i.Wqt=function(t){this.Kqt.push(t),this.Yqt&&(this.Yqt.Qy(),this.Yqt=void 0)},i.zqt=function(){return this.Kqt[0]},i.RHt=function(t){Xn(this.Kqt,t)},i.Xqt=function(){return null!=this.Yqt||(this.Yqt=new Va),this.Yqt.Yy},i.jy=function(){Yn(this.Kqt)},i.zg=function(){this.jy(),this.Yqt&&(this.Yqt.Zg(),this.Yqt=void 0)},Nt(t,[{key:"Uqt",get:function(){return this.Kqt}}]),t}();U(),Et(),Wt(),Pt(),Qt(),U(),Et(),xt(),Pt(),Ft(),U(),Et(),Pt();var LY=function(t){function i(i,n){var r;return(r=t.call(this,WY.Jqt)||this).fLt=void 0,r.Rrt=void 0,r.fLt=i,r.Rrt=n,r}return Ct(i,t),i}(rh);U(),Et(),Pt();var FY=function(t){function i(i){var n;return(n=t.call(this,WY.Zqt)||this).fLt=void 0,n.fLt=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var UY=function(t){function i(i,n){var r;return(r=t.call(this,WY.$qt)||this).fLt=void 0,r.Olt=void 0,r.fLt=i,r.Olt=n,r}return Ct(i,t),i}(rh);U(),Et(),Pt();var VY=function(t){function i(i,n){var r;return(r=t.call(this,WY.tzt)||this).fLt=void 0,r.izt=void 0,r.fLt=i,r.izt=n,r}return Ct(i,t),i}(rh);U(),Et(),Pt();var HY=function(t){function i(){return t.call(this,WY.ezt)||this}return Ct(i,t),i}(rh),WY=function(t){return t.Jqt="szt",t.$qt="nzt",t.tzt="rzt",t.Zqt="hzt",t.ezt="ozt",t}({}),zY=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).DHt=void 0,e.pVt=void 0,e.uzt=void 0,e.dzt=void 0,e.hT=new hr,e.DHt=i,e.pVt=n,e.uzt=r,e}Ct(i,t);var n=i.prototype;return n.czt=function(t){for(var i,n=Lt(this.uzt);!(i=n()).done;){var r=i.value;jn(t,r)||this.DHt.Gqt(r)}this.uzt=t},n.EHt=function(){var t,i;return null!=(i=null==(t=this.dzt)?void 0:t.Yy)?i:ut.resolve()},n.THt=function(){if(this.yCt)throw new y("Cannot perform new operation while transmuxer is still busy")},n.lzt=function(t,i){},n.fzt=function(t){var i=this;this.THt(),this.dzt=new Va;var n=function(n){i.vzt(t,n)};this._zt(t,this.hT.Yg).then(n,n)},n.gzt=function(t){var i=this;this.THt(),this.dzt=new Va;var n=function(n){i.vzt(t,n)};this.pzt(t,this.hT.Yg).then(n,n)},n.mzt=function(t){this.THt(),this.dzt=new Va;try{for(var i,n=Lt(this.azt);!(i=n()).done;){var r={Km:"wqt",iat:i.value,VHt:t.VHt,HHt:t.HHt,$Ot:t.$Ot,fLt:t.fLt,yut:t.yut};this.Wqt(r)}}finally{this.vzt(t)}},n.vzt=function(t,i){this.dzt&&(!i||vr(i)||function(t){return V(t,WQ)}(i)?(vr(i)||this.DHt.Hqt(t),this.dzt.Qy(),this.dzt=void 0):this.dzt.Ky(i),this.So(new HY))},n.wzt=function(t,i){this.So(new LY(t,i))},n.yzt=function(t,i){this.So(new UY(t,i))},n.bzt=function(t,i,n){VQ(i)&&this.So(new VY(t,n))},n.Azt=function(t){this.So(new FY(t))},n.Wqt=function(t){jn(this.uzt,t.iat)&&this.DHt.Wqt(t)},n.Szt=function(t){return this.DHt.zqt(t)},n.RHt=function(t){this.DHt.RHt(t)},n.Tzt=function(t){return this.DHt.Xqt(t)},n.Zg=function(){this.hT.Zg(),this.hT=new hr},Nt(i,[{key:"azt",get:function(){return this.uzt}},{key:"yCt",get:function(){return void 0!==this.dzt}}]),i}(th);function XY(t,i){return VQ(t)?0:b.min(t.CO,i)}function qY(t,i){var n;return b.max(t.CO,i)+(null!=(n=t.ct)?n:0)}var GY=function(t){function i(i,n,r){return t.call(this,i,n,[r])||this}Ct(i,t);var n=i.prototype;return n._zt=function(t,i){dr(i);var n={Km:"rRt",lk:t.YOt.lk,iat:this.azt[0],$Ot:t.$Ot,kzt:{Rrt:"",UW:t.UW},CO:t.CO,fLt:t.fLt,BHt:t.YOt.BHt};return this.Wqt(n),ut.resolve()},n.pzt=function(t,i){return Vt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return dr(i),void 0===(n=t.yut.BHt).Get?[3,3]:this.pVt.zUt(t.$Ot)?[3,2]:[4,gr(this.pVt.XUt(t.$Ot),i)];case 1:h.sent(),h.label=2;case 2:return r=this.pVt.$Ut(n.Get,n).rF(),[3,4];case 3:r=n.CO,h.label=4;case 4:return e=XY(n,r),s=qY(n,e),o={Km:"yut",lk:t.yut.lk,iat:this.azt[0],VHt:e,HHt:s,CO:r,ct:null!=(u=n.ct)?u:0,EU:0,$Ot:t.$Ot,fLt:t.fLt,BHt:t.yut.BHt},this.Wqt(o),[2]}})}).call(this)},i}(zY);function jY(t,i){for(var n,r=function(){var r=n.value,s=r.CO;if(r.fLt.sLt.iFt&&VQ(r.yut))s=0;else{var u=function(t){return r.fLt===t.fLt&&HQ(t.yut,r.yut)},o=Fn(t,u);if(void 0!==o)s=b.min(s,o.RO);else{var h=Fn(i,u);void 0!==h&&(s=b.min(s,h._Ht.An(0)))}}e=e.HM(EA.nL(s,r.RO))},e=EA.rL(),s=Lt(t);!(n=s()).done;)r();return e}U(),Et(),Ft();var QY=.001,YY=function(){function t(t,i,n,r,e,s){this.Pzt=void 0,this.Rzt=void 0,this.Izt=void 0,this.Dzt=void 0,this.Nzt=void 0,this.Mz=void 0,this.xzt=void 0,this.Pzt=t,this.Rzt=i,this.Izt=n,this.Dzt=r,this.Nzt=e,this.Mz=s,this.xzt=[]}var i=t.prototype;return i.MWt=function(t){this.Pzt.MWt(t)},i.Czt=function(t){for(var i,n=function(t){var n=i.xzt[t];if(!fY(n))throw new y("Invalid state");var r=Hn(e,function(t){return t.Km===n.Km});r>=0&&!n.AHt?(n.kHt(e[r]),qn(e,r)):qn(i.xzt,t)},r=this.xzt.length>0,e=t.slice(),s=this.xzt.length-1;s>=0;s--)i=this,n(s);for(var u,o=Lt(e);!(u=o()).done;){var h=u.value,a=new sY(h);this.xzt.push(new cY(h.Km,h,this.Rzt,a,this,this.Dzt,this.Nzt))}r&&e.length>0&&this.Rzt.jy();var c=t.map(function(t){return t.Km});this.Izt.czt(c)},i.iJ=function(t){var i,n=(null==(i=this.Mz)?void 0:i.iJ(t))||!1;return n&&(this.Zg(),this.Rzt.jy()),n},i.Bzt=function(t){var i=this.xzt[0];if(void 0!==i){if(i.Km!==eg.LT||i.yCt)throw new y("Invalid state");if(!i.AHt)return void i.kHt(t)}var n=new sY(t),r=new cY(eg.LT,t,this.Rzt,n,this,void 0,void 0);this.xzt=[r]},i.Bat=function(){for(var t,i=Lt(this.xzt);!(t=i()).done;){t.value.mHt.fHt()}},i.Tdt=function(t){var i=this.Mzt.iL(t,QY);return i?i.An(i.V-1):t},i.KWt=function(t){return!!this.Mzt.iL(t,QY)||this.Pzt.KWt(t)},i.Ozt=function(t){return this.Lzt.Cr(t,QY)},i.Fzt=function(t,i,n){for(var r,e=Lt(this.xzt);!(r=e()).done;){var s=r.value.mHt,u=s.Npt;if(void 0!==u&&i>=u&&!s.Fx.MM().Cr(u))return!0}return i-t0){var i=this.xzt[0].mHt.uHt;if(i&&this.xzt.every(function(t){return t.mHt.uHt===i}))return i}}},{key:"Mzt",get:function(){var t,i=jY(this.Rzt.Mqt.concat(this.Rzt.Oqt),Jn(this.xzt,function(t){return t.mHt.bct})).MM();if(0===this.xzt.length)t=i;else{t=EA.hL();for(var n,r=Lt(this.xzt);!(n=r()).done;){var e=n.value;t=t.Mn(e.mHt.Fx)}for(var s,u=Lt(this.xzt);!(s=u()).done;){var o=s.value;t=t.qM(o.wHt)}t=t.HM(i)}return t.VM(QY)}},{key:"Lzt",get:function(){var t,i=jY(this.Rzt.Oqt,Jn(this.xzt,function(t){return t.mHt.bct})).MM();if(0===this.xzt.length)t=i;else{t=EA.hL();for(var n,r=Lt(this.xzt);!(n=r()).done;){var e=n.value;t=t.Mn(e.mHt.Fx)}t=t.HM(i)}return t}}]),t}();U(),Et(),Pt();var KY=function(t){function i(){return t.call(this,JG.iLt)||this}return Ct(i,t),i}(rh);U(),Et(),Pt();var JY=function(t){function i(){return t.call(this,JG.$Mt)||this}return Ct(i,t),i}(rh);U(),Et(),Wt(),xt(),Qt(),U(),Et(),Wt(),xt(),Pt(),Qt();var ZY="LazyMediaBuffer",$Y=function(t){function i(i,n){var r;return(r=t.call(this)||this).Vp=void 0,r.zzt=void 0,r.jS=void 0,r.Wrt=void 0,r.Wzt=void 0,r.KY=void 0,r.ZY=void 0,r.q3=void 0,r.Vp=i,r.zzt=n,r.jS=void 0,r.Wrt=void 0,r.Wzt=new Va,r.KY=20,r.ZY=30,r.q3=new $R,r}Ct(i,t);var n=i.prototype;return n.G3=function(t,i){vj.OLt(ZY,"Marking gap from "+t+" to "+i+"."),this.q3.r$(t,i),this.Wrt&&this.Wrt.G3(t,i)},n.X3=function(t,i){vj.OLt(ZY,"Removing gap from "+t+" to "+i+"."),this.q3.h$(t,i),this.Wrt&&this.Wrt.X3(t,i)},n.Hzt=function(t){this.Wrt=t,this.Wrt.zY=this.ZY,this.Wrt.VY=this.KY;for(var i=this.q3.s$,n=0;n0?s:e;switch(n.WY.type){case $I.BANDWIDTH:var o=n.jY,h=u.filter(function(t){return t.IW<=o});if(h.length>0)return $n(h,function(t){return t.IW});case $I.PERFORMANCE:return Zn(u,function(t){return t.IW});case $I.QUALITY:return $n(u,function(t){return t.IW})}}function hK(t,i){for(var n,r=function(){var i=n.value,r=t.filter(function(t){return t.Rrt&&t.Rrt.q9&&$C(t.Rrt.q9,i)});return 0===r.length?"continue":{v:r}},e=Lt(i);!(n=e()).done;){var s=r();if("object"===W(s))return s.v}}function aK(t,i){return t.filter(function(t){return cK(t,i)})}function cK(t,i){var n=i+2e3,r=0===t.fFt.length||t.fFt.some(function(t){return t.sLt.bUt0&&this.Xx(i.Tn(0),{gGt:!1}),this.bGt?[3,2]:[4,this.RGt()];case 1:n.sent(),n.label=2;case 2:return this.tkt(),[4,t];case 3:return n.sent(),this.tEt(),[2]}})}).call(this)},n.tkt=function(){if(this.bGt&&this.$kt){if(!this.Skt()){var t,i=null==(t=this.vLt)?void 0:t.sLt;if(null==i?void 0:i.iFt){var n=!0,r=0,e=i.Tn;if(!this.$kt&&e&&(n=!e.zOt,(r=e.qOt)<0)){var s=i.sUt;r+=s.An(s.V-1)}this.SGt(r,{iq:n})}else this.SGt(1/0,{iq:!0})}this.NGt()&&this.SGt(1/0,{iq:!0})}},n.Skt=function(){var t,i=this.Tkt;if(0===i.V)return!0;var n=this.zx,r=null==(t=this._Lt)?void 0:t.BGt,e=null==r?void 0:r.zM(n);return(e&&e>0?r.An(e):n)>=i.Tn(0)},n.NGt=function(){var t=this.zx;return TK(t,this.CLt)||TK(t,this.DLt)},n.OEt=function(){this.nq=void 0,this.rq=void 0},n.Qq=function(t){this.nq||(kr(this.hr()),this.nq=cg(t),this.rq=t,this.So(new yb(t)))},n.be=function(){vj.cN(_K,"Showing the player."),this.PL.be()},n.JP=function(){throw new y("Not implemented")},n.ZP=function(){throw new y("Not implemented")},n.$P=function(){},n.tI=function(){this.bGt&&kr(this.MGt({tI:!0}))},n.Ta=function(t,i,n){return Vt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:r={stack:[],error:void 0,hasError:!1},h.label=1;case 1:return h.trys.push([1,9,10,11]),vj.cN(_K,"Setting the player source to "+t.src+"."),this.OEt(),this._Lt?[4,this.hr()]:[3,3];case 2:h.sent(),dr(n),h.label=3;case 3:return ZA(t)?[2]:(e=qt(r,hr.ep([n]),!1),this.pq.BW(t.contentProtection),void 0===this.EGt||this.EGt.Mc!==t?[3,4]:(this._Lt=this.EGt,this._Lt.mn(pK,this.LGt),this.uV=this.OGt,this.uV.$g(e.Yg),this.OGt=new hr,this.FGt=void 0,null==(s=this.UGt)||s.Zg(),this.UGt=void 0,this.EGt=void 0,this.VGt=!1,this.HGt!==this._Lt&&(this.HGt=void 0),this._Lt.WGt(this.PL),[3,8]));case 4:return void 0===this.EGt?[3,7]:[4,this.CP()];case 5:return h.sent(),[4,this.qGt()];case 6:h.sent(),h.label=7;case 7:this.uV=hr.ep([e.Yg]),this._Lt=this.zGt(t,i,void 0,this.PL),h.label=8;case 8:return this._Lt.wn(pK,this.Rs),this._Lt.wn(JG.iLt,this.GGt),this.tO.OI=this._Lt.ht,this.sO.OI=this._Lt.rt,this.XGt.OI=this._Lt.nt,(u=this._Lt.jGt)&&(this.JW=new vW(this,this.PL,u),this.JW.Rt=!0,this.Lz.Ea(this.JW)),Sy(this.Gl),this.QGt(),this.Xkt(),this.KGt.forEach(this.Rs),this.KGt=[],this.RGt(),e.zg(),[3,11];case 9:return o=h.sent(),r.error=o,r.hasError=!0,[3,11];case 10:return Gt(r),[7];case 11:return[2]}})}).call(this)},n.IP=function(t,i,n,r){return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return dr(r),void 0===this.EGt?[3,2]:[4,this.CP()];case 1:e.sent(),e.label=2;case 2:return dr(r),this.EGt=this.zGt(t,i,n,void 0),this.EGt.wn(pK,this.LGt),[2]}})}).call(this)},n.CP=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return void 0===this.EGt?[2]:(this.OGt.Zg(),null==(t=this.UGt)||t.Zg(),this.UGt=void 0,void 0===this.FGt?[3,2]:[4,this.FGt.catch(dn)]);case 1:i.sent(),this.FGt=void 0,i.label=2;case 2:return[4,this.EGt.zg()];case 3:return i.sent(),this.OGt=new hr,this.HGt===this.EGt&&(this.HGt=void 0),this.EGt=void 0,this.VGt=!1,this.KGt=[],[2]}})}).call(this)},n.zGt=function(t,i,n,r){return null!=this.YGt||(this.YGt=this.JGt.jet()),new AK(this,t,i,this.aV,this.Mz,this.ZGt,this.Sut,this.$Gt,this.XHt,this.YGt,this.Ndt,n,r)},n.RGt=function(){return this.Ypt=this.tXt(this.Ypt,this.uV.Yg).catch(this.Lmt),this.Ypt},n.tXt=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return t?[4,t]:[3,2];case 1:r.sent(),dr(i),r.label=2;case 2:return this._Lt?(n=this.oq)===YT.HL||this.d9?[4,this.iXt(i)]:[3,5]:[2];case 3:return r.sent(),[4,this.eXt(i)];case 4:return r.sent(),[3,7];case 5:return n!==YT.zU?[3,7]:[4,this.iXt(i)];case 6:r.sent(),r.label=7;case 7:return[2]}})}).call(this)},n.iXt=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return dr(t),void 0===this._Lt||this._Lt.DGt?[2]:[4,this._Lt.iXt(t)];case 1:return i.sent(),this.Cq.zV(),this.QGt(),[2]}})}).call(this)},n.QGt=function(){var t;if(!this.JW){var i=null==(t=this._Lt)?void 0:t.jGt;i&&(this.JW=new vW(this,this.PL,i),this.Lz.Ea(this.JW))}},n.eXt=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return dr(t),this.bGt?[2]:(this.bGt=!0,[4,this._Lt.MGt(this.CLt,this.DLt,this.cGt,{nXt:!0})]);case 1:return i.sent(),[2]}})}).call(this)},n.rXt=function(){var t=this.EGt;return void 0===t?ut.resolve():(0===t.EU&&(t.EU=this._Lt.EU+this._Lt.ct),null!=this.UGt||(this.UGt=new Va),void 0===this.FGt&&(this.FGt=t.iXt(this.OGt.Yg),this.UGt.$g(this.FGt)),this.UGt.Yy)},n.hXt=function(){var t;return(null!=(t=this.UGt)?t:this.UGt=new Va).Yy},n.mGt=function(t){return this.xGt(t,this.PL.zx)},n.xGt=function(t,i){var n=i;return t===this._Lt&&void 0!==this.EGt&&this.EGt.EU>0&&(n=b.min(n,this.EGt.EU)),void 0!==t&&(n=b.max(0,n-t.EU)),n},n.IGt=function(){return void 0!==this.EGt&&0!==this.EGt.EU&&(!!this.VGt&&this.PL.zx+.25>=this.EGt.EU)},n.uXt=function(){var t,i;return{Ti:this.PL.Ti,Mi:this.PL.Mi,qLt:Cq(this.PL),udt:null==(i=this.bt)||null==(t=i.abr)?void 0:t.restrictToPlayerSize}},n.cXt=function(){return new uK(this.aq)},n.MGt=function(t){void 0===t&&(t={});var i={bLt:t.bLt||!1,SLt:t.SLt||!1,ALt:t.ALt||!1,tI:t.tI||!1,nXt:t.nXt||!1},n=[this.TGt,this.k9].filter(Li);return this.T9.Zg(),this.T9=new hr,this.T9.$g(this.uV.Yg),this.dXt.Zg(),this.dXt=new hr,this.dXt.$g(this.uV.Yg),this.TGt=_r(this.lXt(n,i,this.dXt.Yg),this.dXt).catch(this.kGt),this.TGt},n.lXt=function(t,i,n){return Vt(function(){var r,e,s,u,o,h,a,c,f,v;return zt(this,function(d){switch(d.label){case 0:return this.bGt?[3,2]:[4,this._Lt.fXt(n)];case 1:return d.sent(),[2];case 2:return[4,ut.all(t.map(function(t){return t.catch(dn)}))];case 3:return d.sent(),[4,this.vXt()];case 4:return d.sent(),this._Xt(),[4,this.gXt(n)];case 5:return d.sent(),[4,this.pXt(i.SLt,i.ALt)];case 6:return d.sent(),dr(n),[4,this._Lt.mXt()];case 7:return u=d.sent(),dr(n),[4,this.wXt(u,i.tI,n)];case 8:return o=d.sent(),h=null==(r=this.aq)?void 0:r.e4,a=null==(e=this.aq)?void 0:e.s4,this._Lt.yXt(void 0!==h,void 0!==a,i.bLt||o,i.SLt,i.ALt),this._Lt.bXt(i.bLt),void 0!==this.EGt&&(this.EGt.yXt(void 0!==h,void 0!==a,i.bLt||o,i.SLt,i.ALt),this.EGt.bXt(i.bLt)),this._Lt.Czt(h,a),void 0===this.EGt?[3,10]:[4,this.EGt.mXt()];case 9:(c=d.sent())&&this.aq&&this.aq.IZ(c)?(this.EGt.Czt(h,a),this.VGt=!0):(this.EGt.Czt(void 0,void 0),this.VGt=!1),d.label=10;case 10:this.AXt(),dr(n),d.label=11;case 11:return d.trys.push([11,13,,14]),[4,ut.all([this._Lt.SXt(n),null==(f=this.EGt)?void 0:f.SXt(n)].filter(Li))];case 12:return d.sent(),[3,14];case 13:return lr(d.sent()),[3,14];case 14:if(dr(n),this.V4(),this._Lt.BUt(),null==(s=this.EGt)||s.BUt(),void 0!==this.pGt)return this.SGt(this.pGt,this.wGt),[2];if(!this.$kt){if(v=this._Lt.TXt)return this.SGt(v.YF,{iq:v.iq}),[2];if(this._Lt.EU>0)return this.SGt(0,{iq:!1}),[2]}return this.oXt.length>0&&this.kXt(),[2]}})}).call(this)},n.wXt=function(t,i,n){return Vt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return i||!this.aq?[3,3]:t?this.aq.IZ(t)?[4,this.gXt(n)]:[3,3]:[2,!1];case 1:return h.sent(),[4,this.aq.RZ(t)];case 2:return h.sent(),[2,!1];case 3:for(r=Lt(this._Lt.aXt);!(e=r()).done;)e.value.Ezt.forEach(function(t){return t.Zg()});this.PL.G7(),h.label=4;case 4:return h.trys.push([4,,10,11]),this.aq?[4,this.PL.hr()]:[3,6];case 5:h.sent(),h.label=6;case 6:return t?[4,this.PL.Un(t)]:[3,8];case 7:return s=h.sent(),[3,9];case 8:u=void 0!==this.CLt,o=void 0!==this.DLt,s=new iK(this.PL,u,o),h.label=9;case 9:return this.EXt(s),[3,11];case 10:return this.PL.X7(),[7];case 11:return[2,!0]}})}).call(this)},n.EXt=function(t){this.aq=t,this.V4(),this.WTt(),this.qTt()},n.V4=function(){var t,i,n=this.aq,r=void 0!==this.EGt&&this.VGt?this.EGt:this._Lt;if(n&&void 0!==r&&(r!==this.HGt||S(n.ct))){var e;r!==this.HGt&&n.I3();var s=(null!=(e=r.xXt)?e:NaN)+r.EU;s>0&&n.F4(s),this.HGt=r}null==(t=this._Lt)||t.BUt(),null==(i=this.EGt)||i.BUt()},n.pXt=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.aq?(n=[],t&&this.aq.e4&&n.push(this.aq.e4.pS(0,1/0)),i&&this.aq.s4&&n.push(this.aq.s4.pS(0,1/0)),[4,ut.all(n)]):[2];case 1:return r.sent(),[2]}})}).call(this)},n.WTt=function(){var t=this.aq;t&&(t.s4&&(t.s4.VY=this.Mz.YY),t.e4&&(t.e4.VY=this.Mz.YY))},n.qTt=function(){var t=this.aq;t&&(t.s4&&(t.s4.zY=this.Mz.zY),t.e4&&(t.e4.zY=this.Mz.zY))},n.AXt=function(){var t,i,n,r,e=void 0!==(null==(t=this.aq)?void 0:t.e4),s=void 0!==(null==(i=this.aq)?void 0:i.s4);null==(n=this._Lt)||n.AXt(e,s),null==(r=this.EGt)||r.AXt(e,s)},n.E9=function(t,i,n,r){return Vt(function(){var e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,ut.all(t.map(function(t){return t.catch(dn)}))];case 1:return o.sent(),dr(r),[4,this.vXt()];case 2:return o.sent(),dr(r),this.pGt=void 0,this.yGt=void 0,this.$kt=!0,e=n.zOt?this.sUt:this.Tkt,s=e.LM(i)+this._Lt.EU,u=this.PL.ww(eh.Zw,r),this.PL.Oy(s,n.iq),this.bGt&&this._Lt.aXt.length>0&&(this.Br.AM.lVt(),this.PXt(this.zx),this.kXt()),[4,u];case 3:return o.sent(),this.tEt(),[2]}})}).call(this)},n.tEt=function(){var t=this.JW;if(void 0!==t){var i=this.OL;if(!this.lP&&!this.xP&&void 0!==i)i0?(this.oXt.forEach(function(t){return t.Uzt()}),[4,this._Nt()]):[3,2];case 1:t.sent(),this.vNt(),this.oXt.forEach(function(t){return t.Pzt.eqt()}),t.label=2;case 2:return[2]}})}).call(this)},n.vNt=function(){var t=this;if(!this.BXt){var i=function(){t.BXt=void 0};this.MXt=new hr,this.MXt.$g(this.uV.Yg),this.BXt=_r(this.LXt(this.MXt.Yg),this.MXt).catch(this.kGt).then(i,i)}},n._Nt=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return null==(t=this.MXt)||t.Zg(),i=this.BXt,this.BXt=void 0,i?[4,i]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(this)},n.LXt=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return dr(t),[4,this.OXt(this._Lt,t)];case 1:return i.sent(),dr(t),void 0===this.EGt?[3,4]:[4,gr(this.rXt(),t)];case 2:return i.sent(),dr(t),[4,this.OXt(this.EGt,t)];case 3:i.sent(),i.label=4;case 4:return[2]}})}).call(this)},n.OXt=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a,c,f,v,d,l,w,g,_,m,y,p;return zt(this,function(k){switch(k.label){case 0:dr(i),n=t.aXt,k.label=1;case 1:0,r={stack:[],error:void 0,hasError:!1},k.label=2;case 2:for(k.trys.push([2,4,5,6]),e=[],s=b.max(0,this.PL.zx-t.EU),u=Lt(n);!(o=u()).done;)if(h=o.value,a=h.Pzt,c=h.Tdt(s),a.yCt)e.push(a.EHt());else if(h.Fzt(s,c,this.Mz.YY)||a.qWt){if(f=a.fLt.sLt,void 0===(v=a.YWt(c))){if(f.iFt)continue;(d=f.bct).length&&d[0].CO>c&&(this.zx=1/0),a.rqt(),a.$Wt(c,i)}else l=v[0],w=v[1],a.Lat(l,w,h.uHt),h.Izt.lzt(l,w);e.push(a.EHt())}if(g=qt(r,hr.ep([i]),!1),0===e.length){for(n.every(function(t){return t.Pzt.jCt})||e.push(this.PL.ww(eh.py,g.Yg)),_=Lt(n);!(m=_()).done;)void 0!==(y=m.value).Pzt.zWt()&&e.push(y.Izt.ww([WY.Zqt,WY.ezt],g.Yg));if(0===e.length)return[3,7]}return[4,gr(ut.race(e),g.Yg)];case 3:return k.sent(),[3,6];case 4:return p=k.sent(),r.error=p,r.hasError=!0,[3,6];case 5:return Gt(r),[7];case 6:return[3,1];case 7:return[2]}})}).call(this)},n.RXt=function(){var t=this;if(!this.FXt){var i=function(){t.FXt=void 0};this.UXt=new hr,this.UXt.$g(this.uV.Yg),this.FXt=_r(this.VXt(this.UXt.Yg),this.UXt).catch(this.kGt).then(i,i)}},n.IXt=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return null==(t=this.UXt)||t.Zg(),i=this.FXt,this.FXt=void 0,i?[4,i]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(this)},n.VXt=function(t){return Vt(function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:dr(t),i=this.oXt,a.label=1;case 1:for(n=[],r=Lt(i);!(e=r()).done;)s=e.value,u=s.Pzt,(o=s.Izt).yCt?n.push(o.EHt()):(h=u.zWt())?"yut"===h.Km?(o.gzt(h),n.push(o.EHt())):"YOt"===h.Km?(o.fzt(h),n.push(o.EHt())):"wqt"===h.Km&&(o.mzt(h),n.push(o.EHt())):n.push(u.sqt());return 0!==n.length?[3,2]:[3,5];case 2:return[4,gr(ut.race(n),t)];case 3:a.sent(),a.label=4;case 4:return[3,1];case 5:return[2]}})}).call(this)},n.DXt=function(){var t=this;if(!this.HXt){this.WXt=new hr,this.WXt.$g(this.uV.Yg);var i=function(){t.HXt=void 0};this.HXt=_r(this.qXt(this.WXt.Yg),this.WXt).catch(this.kGt).then(i,i)}},n.CXt=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return null==(t=this.WXt)||t.Zg(),i=this.HXt,this.HXt=void 0,i?[4,i]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(this)},n.qXt=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return dr(t),[4,this.zXt(this._Lt,t)];case 1:return i=n.sent(),void 0!==this.EGt&&this.VGt&&i?(dr(t),[4,gr(this.hXt(),t)]):[3,4];case 2:return n.sent(),dr(t),this.V4(),[4,this.zXt(this.EGt,t)];case 3:i=n.sent(),n.label=4;case 4:return i?this.aq.F3():this.aq.I3(),[2]}})}).call(this)},n.zXt=function(t,i){return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:r=function(){var r,e,s,u,o,h,a,c,f,v,d,l,w;return zt(this,function(g){switch(g.label){case 0:for((r=t.aXt).forEach(function(t){return t.Bat()}),e=b.max(0,n.PL.zx-t.EU),s=[],u=[],o=Lt(r);!(h=o()).done;)for(a=h.value,c=a.Izt,f=Lt(a.Ezt);!(v=f()).done;)d=v.value,l=fY(d)?s:u,d.yCt?l.push(d.EHt()):d.xHt(e)||((w=c.Szt(d.Km))?"yut"===w.Km&&w.$Ot===n._Gt?(d.Pdt(w),l.push(d.EHt())):"rRt"===w.Km&&w.$Ot===n._Gt?(d.J2(w),l.push(d.EHt())):"wqt"===w.Km&&(d.UHt(w),l.push(d.EHt())):u.push(c.Tzt(d.Km)));return 0!==s.length?[3,2]:[4,n.GXt(t,r,e,i)];case 1:if(g.sent())return[2,"continue"];g.label=2;case 2:return 0===s.length&&0===u.length?[2,{v:r.every(function(t){return t.Ezt.length>0&&t.Ezt.every(function(t){return t.xHt(e)})})}]:[4,gr(ut.race([].concat(s,u)),i)];case 3:return g.sent(),[2]}})},s.label=1;case 1:return n=this,[5,Xt(r())];case 2:return"object"===W(e=s.sent())?[2,e.v]:[3,1];case 3:return[2]}})}).call(this)},n.GXt=function(t,i,n,r){return Vt(function(){var e,s,u,o,h,a,c,f,v,d,l,w,g,_,m,y,p,k,b,A,T,S;return zt(this,function(E){switch(E.label){case 0:for(e=[],s=[],u=Lt(i);!(o=u()).done;)for(h=o.value,a=h.Tdt(n),c=Lt(h.Ezt);!(f=c()).done;)if(fY(v=f.value))if(void 0!==(d=h.Izt.Szt(v.Km))){if(d.$Ot===this._Gt)return[2,!1];e.push(d)}else{if(h.yCt||h.Fzt(n,a,this.Mz.YY)||!v.PHt(n,a))return[2,!1];void 0!==(l=v.mHt.uHt)&&s.push(l)}return 0===e.length?[2,!1]:(w=$n(e,function(t){return t.$Ot}).$Ot,e.every(function(t){return"rRt"===t.Km&&t.$Ot===w})?(g=Zn(e,function(t){return t.CO}).CO+t.EU,_=[].concat(e,s),[4,this.XXt(_)]):[3,6]);case 1:return m=E.sent(),this.jXt(m)?(vj.OLt(lj,"Seamless switch from",this.aq.Cd,"to",m),[4,this.aq.RZ(m)]):[3,3];case 2:return E.sent(),vj.OLt(lj,"Seamless switch complete."),[3,5];case 3:return[4,this.QXt(t,g,m,r)];case 4:E.sent(),E.label=5;case 5:return this._Gt=e[0].$Ot,[3,7];case 6:for(y=Lt(i);!(p=y()).done;)for(k=p.value,b=Lt(k.Ezt);!(A=b()).done;)for(T=A.value,S=k.Izt.Szt(T.Km);void 0!==S&&("rRt"!==S.Km||S.$Ot!==w);)vj.OLt(lj,"Removing append for other discontinuity, expecting "+w,S),k.Izt.RHt(S),S=k.Izt.Szt(T.Km);E.label=7;case 7:return[2,!0]}})}).call(this)},n.jXt=function(t){var i,n;switch(null!=(n=null==(i=this.bt)?void 0:i.seamlessSwitchStrategy)?n:LA.HL){case LA.WL:return!0;case LA.qL:return!1;default:return this.aq.IZ(t)}},n.XXt=function(t){return Vt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return i=t.map(function(t){return t.kzt.Rrt}),n=i.map(function(t){return{GT:t}}),r=[].concat(Jn(t,function(t){return t.kzt.UW}),this.Br.fVt),[4,Vj((e=this.bt).contentProtection,i,r,this.aV,e.useCredentials)];case 1:return 0===(s=u.sent()).length&&this.aq&&this.aq.Cd.fq.length>0&&(s=this.aq.Cd.fq),[2,{Km:Iy.SV,q4:n,fq:s,t5:e.useManagedMediaSource}]}})}).call(this)},n.QXt=function(t,i,n,r){return Vt(function(){var e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:if(o=this.aq,h=o.ct,!(a=this.PL.Fx.V>0&&this.PL.zx=i}return this.PL.Qx||this.IGt()}},{key:"lt",get:function(){return this.nq}},{key:"Jx",get:function(){return this.rq}},{key:"$x",get:function(){}},{key:"iP",get:function(){}},{key:"sP",get:function(){return!1}},{key:"rP",get:function(){var t,i;return Yu({},{rO:0,hO:0,oO:0,aO:0,uO:0,cO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.PL.hP(),{uO:null!=(i=null==(t=this._Lt)?void 0:t.uO)?i:0,aO:this.Mz.CY.IW})}},{key:"Br",get:function(){var t;return null==(t=this._Lt)?void 0:t.Br}},{key:"CGt",get:function(){var t;return null==(t=this._Lt)?void 0:t.CGt}},{key:"oP",get:function(){return this.PL.oP},set:function(t){this.PL.oP=t}},{key:"cP",get:function(){var t,i;return null==(i=null==(t=this._Lt)?void 0:t.cP)||i}},{key:"lP",get:function(){return this.PL.lP}},{key:"vP",get:function(){return this.PL.vP},set:function(t){vj.cN(_K,"Setting playback rate to "+t+"."),this.PL.vP=t}},{key:"pP",get:function(){return this.Dkt._s()}},{key:"Dkt",get:function(){var t=this.PL.pP;return void 0!==this._Lt&&(t=t.Ly(-this._Lt.EU).Mn(EA.hL())),t}},{key:"wP",get:function(){return this.oq},set:function(t){this.oq!==t&&(this.oq=t,this.RGt())}},{key:"AP",get:function(){var t,i=this.PL.AP;return(null==(t=this._Lt)?void 0:t.DGt)&&(i=b.max(Dy.Qn,i)),i}},{key:"sUt",get:function(){var t,i;return null!=(i=null==(t=this._Lt)?void 0:t.sUt)?i:EA.rL()}},{key:"kP",get:function(){return this.Tkt._s()}},{key:"Tkt",get:function(){var t,i,n=null!=(i=null==(t=this._Lt)?void 0:t.kP)?i:EA.rL();if(0===n.V)return n;if(this.aq&&this.fGt&&this.aq.ct!==1/0&&(n=new EA([n.Tn(0),this.xGt(this._Lt,this.aq.ct)])),this._Lt&&!this._Lt.iFt){var r=this.Dkt,e=n.An(n.V-1);if(r.V>0&&r.An(r.V-1)>e){var s=r.An(r.V-1),u=this._Lt.sUt;u&&u.V>0&&(s=b.min(s,u.An(u.V-1))),n=n.HM(new EA([e,s]))}}return n}},{key:"xP",get:function(){var t;return null!=(t=this.yGt)?t:this.PL.xP}},{key:"uq",get:function(){}},{key:"nt",get:function(){return this.Gl}},{key:"rt",get:function(){return this.sO}},{key:"DP",get:function(){var t,i;return this.PL.DP||(null==(i=this.vLt)||null==(t=i.RRt)?void 0:t.Mi)||0}},{key:"MP",get:function(){var t,i;return this.PL.MP||(null==(i=this.vLt)||null==(t=i.RRt)?void 0:t.Ti)||0}},{key:"OP",get:function(){return this.PL.OP},set:function(t){vj.cN(_K,"Setting volume to "+t+"."),this.PL.OP=t}},{key:"VP",get:function(){return this.Lz}},{key:"WP",get:function(){return!1},set:function(t){}},{key:"dq",get:function(){return this.lq}},{key:"sXt",get:function(){return this.bGt}},{key:"oXt",get:function(){return void 0===this._Lt?[]:void 0===this.EGt?this._Lt.aXt:this._Lt.aXt.concat(this.EGt.aXt)}}]),i}(th),AK=function(t){function i(i,n,r,e,s,u,o,h,a,c,f,v,d){var l,w,g,_;l=t.call(this)||this,(w=l).oa=void 0,w.Mc=void 0,w.aV=void 0,w.ZGt=void 0,w.Mz=void 0,w.Sut=void 0,w.$Gt=void 0,w.XHt=void 0,w.YGt=void 0,w.Ndt=void 0,w.wjt=void 0,w.iV=void 0,w.tO=new rg,w.sO=new rg,w.Gl=new Rb([]),w.Sjt=void 0,w.Aq=void 0,w.Opt=void 0,w.kq=void 0,w.ENt=void 0,w.nEt=void 0,w.Ajt=void 0,w.uV=void 0,w.Bjt=void 0,w.Ljt=void 0,w.Ojt=void 0,w.Rjt=void 0,w.Kjt=[],w.cjt=void 0,w.djt=void 0,w.ljt=void 0,w.fjt=void 0,w.B4=void 0,w.M4=void 0,w.cQt=void 0,w._jt=void 0,w.gjt=void 0,w.tQt=void 0,w.ASt=!0,w.Hjt=0,w.Vjt=!1,w.H4=EA.rL(),w.Mkt=!1,w.Ekt=0,w.DDt=void 0,w.vjt=[],w.QU=0,w.aHt=function(){w.BUt()},w.fQt=function(t){kr(w.jjt(t.fLt,w.uV.Yg))},w.retryOfflineRenditionsCallback=function(t,i){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return w.fjt!==t&&w.djt!==t&&w.ljt!==t?[2]:[4,w.nEt.jVt(t,i)];case 1:return n.sent(),t.sLt.bUt=-1/0,[2]}})})()},w.hQt=function(t){var i=w.cjt,n=null==i?void 0:i.cFt;if(w.nEt.rHt(t.Rrt,t.fLt.sLt),!n&&(w.nEt.hHt(t.Rrt,t.fLt.sLt),w.Zjt(),i)){var r=void 0!==w.djt&&!jn(i.lFt,w.djt),e=void 0!==w.ljt&&!jn(i.fFt,w.ljt);(r||e)&&w.MGt(r?void 0:w.djt,e?void 0:w.ljt,w.fjt).catch(dn)}},w.oQt=function(t){var i=w.vQt(t.fLt);void 0!==i&&(i.Olt=t.Olt)},w.aQt=function(t){var i=w.vQt(t.fLt);void 0!==i&&(i.byt=t.izt.rF())},w.vQt=function(t){for(var i,n=Lt(w.sO.NI);!(i=n()).done;){var r=i.value.TLt(t);if(void 0!==r)return r}},w.uQt=function(t){w.nEt.sHt(t.fLt)},w.nQt=wn(function(t){t.Gk===eg.Mk&&w.dQt()&&kr(w.lQt())},200),w.rQt=function(t){var i;w.Ekt+=t.DWt;var n=w.sO.V>0?t.Gk===eg.Mk:t.Gk===eg.Bk;"yut"===t.RWt&&n&&kr(w.qjt()),w.So(new yM(function(t){if(t){if(void 0!==t.iAt){var i,n,r=t.iAt.Tn+(null!=(n=t.iAt.V)?n:0);return{Yu:t.XE,Wat:[null==(i=t.iAt)?void 0:i.Tn,r],Xk:!0}}return{Yu:t.XE.toString()||"",Xk:!0}}return{Yu:"",Xk:!0}}(t.uri),(null==(i=w.cjt)?void 0:i.IW)||0,t.mediaSequenceNumeber,t.mediaTrackId,t.Gk,t.httpStatusCode,t.DWt))},w.oa=i,w.Mc=n,w.aV=e,w.Mz=s,w.ZGt=u,w.Sut=o,w.$Gt=h,w.XHt=a,w.YGt=c,w.Ndt=f,w.wjt=v,w.iV=null!=d?d:new VW,w.uV=new hr;var m=null!=(_=null==(g=n.latencyConfiguration)?void 0:g.targetOffset)?_:n.liveOffset;return w.nEt=new ZQ(w.aV,w.Sut,n.useCredentials,Ui.Pm(n.src),m),w.nEt.wn(JQ.IVt,w.aHt),w.nEt.wn(JQ.CVt,w.fQt),w.nEt.wn(kK,w.Rs),w.Sjt=new gK(w,w.iV),w.Gl.qW(w.Sjt.Z),n.hlsDateRange&&(w.Ajt=new rY(w.nEt,w.iV),w.Gl.qW(w.Ajt.Z)),r.textTracks&&(w.Aq=new gy(w.iV,w.aV),w.Gl.qW(w.Aq.Z),w.mq(r.textTracks)),!jn(n.ignoreEmbeddedTextTrackTypes,Ng.CEA608)&&(w.ENt=new CF(w.iV),w.Gl.qW(w.ENt.Z)),!jn(n.ignoreEmbeddedTextTrackTypes,Ng.EMSG)&&(w.Opt=new aW(w.iV),w.kq=new my(w.iV,w.Opt.Z),w.Gl.qW(w.Opt.Z),w.Gl.qW(w.kq.Z)),l}Ct(i,t);var n=i.prototype;return n.BUt=function(){var t,i,n=function(t){if(0===t.length)return EA.rL();for(var i,n,r=0,e=Lt(t);!(n=e()).done;){var s=n.value.sLt.kP;s.V>0&&(i=i?i.Mn(s):s,r=b.max(r,s.Tn(0)))}if(!i)return EA.rL();if(i.V>0)return i;return EA.sL(r)}(this.vGt);0!==n.V&&(this.H4=n,null==(t=this.Opt)||t.jU(n.Tn(0)),null==(i=this.ENt)||i.jU(n.Tn(0)))},n.ajt=function(t){var i=[];if(this.cjt)for(var n,r=Lt(this.aXt);!(n=r()).done;)for(var e,s=Lt(n.value.Ezt);!(e=s()).done;){var u=e.value.IHt(t);u&&!jn(i,u)&&i.push(u)}Kn(this.vjt,i)||(this.vjt=i,this.So(new eY))},n.mq=function(t){for(var i,n=Lt(t);!(i=n()).done;){var r=i.value;r.src&&this.Aq.hV(r)}},n.qlt=function(){var t,i,n=function(){var i=u.value,n=new lg,r=[];n.gO(new hj(o,i)),r.push(i);for(var e,s=Lt(h);!(e=s()).done;){var a=e.value,c=Fn(a.lFt,function(t){return $G(t,i)&&!rj(r,t)});c&&(n.gO(new hj(a,c)),r.push(c))}t.tO.tt(new sj(t,t.Mz,t.tO,n))},r=function(){var t=c.value,n=new lg,r=[];n.gO(new aj(o,t)),r.push(t);for(var e,s=Lt(h);!(e=s()).done;){var u=e.value,a=Fn(u.fFt,function(i){return $G(i,t)&&!rj(r,i)});a&&(n.gO(new aj(u,a)),r.push(a))}i.sO.tt(new uj(i,i.Mz,i.sO,n))},e=this.Br._Vt;if(0!==e.length){for(var s,u,o=null!=(s=Fn(e,function(t){return 0!==t.lFt.length&&0!==t.fFt.length}))?s:e[0],h=e.filter(function(t){return t!==o}),a=Lt(o.lFt);!(u=a()).done;)t=this,n();for(var c,f=Lt(o.fFt);!(c=f()).done;)i=this,r()}else vj.FLt(_K,"The HLSModel contains no variant streams.")},n.iXt=function(t){return Vt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:if(this.Mkt)return[2];if(this.nEt.NVt)return[3,5];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.nEt.UVt(t)];case 2:return u.sent(),[3,4];case 3:throw lr(i=u.sent()),this.cP=!1,new ld(vd.MANIFEST_LOAD_ERROR,"The provided HLS document could not be loaded - "+i.message,i);case 4:this.qlt(),u.label=5;case 5:return[4,this.Tjt()];case 6:return n=u.sent(),this.kjt(n),this.Ejt(n),r=this.xjt(n.lFt),e=this.Pjt(n.fFt),(s=this.Ijt(n.vFt))||this.Cjt(n._Ft),[4,this.MGt(r,e,s,{nXt:!0})];case 7:return u.sent(),this.Mkt=!0,[2]}})}).call(this)},n.Ejt=function(t){var i=this.ENt;if(i)for(var n,r=function(t){for(var i,n=[],r=Lt(t);!(i=r()).done;){var e=i.value,s=sK(e);void 0!==s&&n.push({Sit:s,Tit:e.bs||"",Th:e.l})}return n}(t._Ft),e=Lt(r);!(n=e()).done;){var s=n.value;i.$gt(s)}},n.Tjt=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:if(this.Rjt=this.Br._Vt,!this.Rjt.length)throw new ld(vd.MANIFEST_LOAD_ERROR,"LLHLSPlayer - Could not select initial variant stream: the HLS stream contains no variant streams.");return[4,this.Djt(this.Rjt)];case 1:if(0===(t=n.sent()).length)throw new ld(vd.MANIFEST_LOAD_ERROR,"LLHLSPlayer - Could not select initial variant stream: the HLS stream contains no variant stream with a supported codec.");return[4,this.Njt(t)];case 2:return(i=n.sent()).length>0&&(t=i),vj.cN(_K,"Selecting initial active variant stream."),[2,oK(t,this.Mc.abr,this.Mz,this.Ndt.maximumBackoff)]}})}).call(this)},n.xjt=function(t){if(this.Bjt){var i=this.Mjt(this.Bjt);if(i)return i}return wK(t)},n.Pjt=function(t){if(this.Ljt){var i=this.Mjt(this.Ljt);if(i)return i}return wK(t)},n.Ijt=function(t){for(var i,n=Lt(this.Gl.NI);!(i=n()).done;){var r=i.value;r.Qk===zm.Kn&&(this.Ojt=this.Sjt.aGt(r))}if(this.Ojt){var e=this.Mjt(this.Ojt);if(e)return e}return lK(t)},n.Cjt=function(t){var i=this.ENt;if(i){var n=lK(t);if(void 0!==n){var r=sK(n);i.Jgt(r).Qk=zm.Kn}}},n.wLt=function(t){for(var i,n=Lt(t);!(i=n()).done;){var r=i.value;if(!this.Fjt(r))throw new y("LLHLSPlayer - Could not set an allowed variant stream that does not exists in the internal HLS model.")}this.Rjt=t},n.Fjt=function(t){var i=this.Br;return!!i&&jn(i._Vt,t)},n.Mjt=function(t){if(t&&this.cjt)return Fn(this.cjt.VLt,function(i){return i===t})},n.Ujt=function(){return Vt(function(){var t,i,n,r;return zt(this,function(e){switch(e.label){case 0:return 0!==(i=null!=(t=this.Rjt)?t:this.Br._Vt).length||this.Rjt?1!==i.length||this.Rjt?[4,this.Djt(i)]:(vj.cN(_K,"The HLS stream contains only a single variant stream, skipping ABR selection."),[2,[]]):(vj.cN(_K,"The HLS stream does not contain any variant streams, skipping ABR selection."),[2,[]]);case 1:return 0===(n=e.sent()).length?(vj.FLt(_K,"No variant streams with supported codecs available to perform ABR selection on."),[2,[]]):0!==(r=aK(n,this.Ndt.maximumBackoff)).length?[3,3]:this.Vjt?[2,[]]:(vj.FLt(_K,"No variant streams with online renditions available to perform ABR selection on."),this.Hjt++,[4,this.Wjt(n)]);case 2:return e.sent(),[2,[]];case 3:return[2,r]}})}).call(this)},n.qjt=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return[4,this.QLt()];case 1:return void 0===(t=n.sent())?[2]:(i=!!this.cjt&&t.IWt.IW)&&(this.DDt={gLt:t,wft:Ui.Mg()});var s,u=Ui.Mg()-this.DDt.wft,o=null!=(s=null==(n=this.ljt)?void 0:n.sLt.WLt)?s:1/0;return i>=b.max(o-1,5)||u>1e3},n.Gjt=function(t){return Zn(t,function(t){return t.IW})},n.ujt=function(){return Vt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:return this.DDt=void 0,[4,this.Ujt()];case 1:return 0===(t=r.sent()).length?[2]:[4,this.Njt(t)];case 2:return(i=r.sent()).length>0&&(t=i),void 0===(n=this.Gjt(t))?[3,4]:[4,this.yLt(n,{bLt:!0})];case 3:r.sent(),this.oa.dq.JIt(n.IW),r.label=4;case 4:return[2]}})}).call(this)},n.Wjt=function(t){return Vt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:i=this,this.Vjt=!0,n=!1,r=Lt(t),o.label=1;case 1:if((e=r()).done)return[3,6];s=e.value,o.label=2;case 2:return o.trys.push([2,4,,5]),void 0===(u=this.ljt?Fn(s.fFt,function(t){return $G(t,i.ljt)}):void 0)?[3,5]:[4,this.jVt(u)];case 3:return o.sent(),u.sLt.bUt=-1/0,n=!0,[3,5];case 4:return o.sent(),[3,5];case 5:return[3,1];case 6:return n?(this.Hjt=0,[4,this.oa.NXt()]):[3,8];case 7:return o.sent(),[3,10];case 8:return this.Hjt>=this.Ndt.maxRetries?(this.oa.Qq(new ld(vd.MEDIA_LOAD_ERROR,"The provided video renditions could not be loaded.")),[2]):[4,Ar(b.min(this.Ndt.minimumBackoff*b.pow(2,this.Hjt-1),this.Ndt.maximumBackoff))];case 9:o.sent(),o.label=10;case 10:return this.Vjt=!1,[4,this.qjt()];case 11:return o.sent(),[2]}})}).call(this)},n.Djt=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=this,[4,rr(t,function(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return 0===(r=[(null==(i=t.Rrt)?void 0:i.q9)?'audio/mp4; codecs="'+t.Rrt.q9+'"':void 0,(null==(n=t.Rrt)?void 0:n.W9)?'video/mp4; codecs="'+t.Rrt.W9+'"':void 0].filter(Li)).length?[2,!0]:[4,this.$Gt.$Z(r,this.Mc.useManagedMediaSource)];case 1:return[2,e.sent()]}})}).call(i)})];case 1:return(n=r.sent()).some(function(t){var i;return null==(i=t.Rrt)?void 0:i.W9})&&(n=n.filter(function(t){return!t.Rrt||t.Rrt.W9||0!==t.fFt.length})),n.some(function(t){var i;return null==(i=t.Rrt)?void 0:i.q9})&&(n=n.filter(function(t){return!t.Rrt||t.Rrt.q9||0!==t.lFt.length})),[2,n]}})}).call(this)},n.Njt=function(t){var i=this;return this.nEt.MVt?rr(t,function(t){return function(t,i){return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Lt(t),s.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,[4,i(e)]);case 2:if(!s.sent())return[2,!1];s.label=3;case 3:return[3,1];case 4:return[2,!0]}})})()}([wK(t.lFt),wK(t.fFt),lK(t.vFt),lK(t._Ft)].filter(Li),function(t){return i.Xjt(t)})}):ut.resolve([])},n.Xjt=function(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:if(0===t.sLt.bct.length)return[2,!1];if(!(i=t.sLt.bct[0]).Syt)return[2,!1];n=i.Syt,r=n.iAt?Rj(n.iAt.Tn,n.iAt.V):void 0,e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.Sut.sdt(n.XE,r)];case 2:return[2,e.sent()];case 3:return e.sent(),[2,!1];case 4:return[2]}})}).call(this)},n.RLt=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return this.cjt?(i=this.Mjt(t),t&&!i?(vj.lt(_K,"Trying to set an invalid rendition as the active audio rendition."),[2]):this.djt===i?[2]:(n=Li(i)!==Li(this.djt),vj.cN(_K,"Switching audio rendition"),[4,this.MGt(i,this.ljt,this.fjt,{SLt:!0,bLt:n})])):(this.Bjt=t,[2]);case 1:return r.sent(),[2]}})}).call(this)},n.NLt=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return this.cjt?(i=this.Mjt(t),t&&!i?(vj.lt(_K,"Trying to set an invalid rendition as the active video rendition."),[2]):this.ljt===i?[2]:(n=Li(i)!==Li(this.ljt),vj.cN(_K,"Switching video rendition"),[4,this.MGt(this.djt,i,this.fjt,{ALt:!0,bLt:n})])):(this.Ljt=t,[2]);case 1:return r.sent(),[2]}})}).call(this)},n.uGt=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.cjt?(i=this.Mjt(t),t&&!i?(vj.lt(_K,"Trying to set an invalid rendition as the active subtitle rendition."),[2]):(vj.cN(_K,"Switching subtitle rendition"),[4,this.MGt(this.djt,this.ljt,i)])):(this.Ojt=t,[2]);case 1:return n.sent(),[2]}})}).call(this)},n.jjt=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.Vjt?[2]:(n=0===this.sO.V,t.Km===Dj.Mk||t.Km===Dj.Bk&&n?[3,2]:[4,this.Qjt(t,i)]);case 1:return r.sent(),[3,10];case 2:return this.Rjt&&this.Rjt.length<=1?t.Km!==Dj.Mk||this.ljt===t?[3,4]:[4,this.MGt(this.djt,t,this.fjt)]:[3,8];case 3:return r.sent(),[3,6];case 4:return t.Km===Dj.Bk&&n&&this.djt!==t?[4,this.MGt(t,this.ljt,this.fjt)]:[3,6];case 5:r.sent(),r.label=6;case 6:return[4,this.Qjt(t,i)];case 7:return r.sent(),[3,10];case 8:return[4,this.qjt()];case 9:r.sent(),r.label=10;case 10:return[2]}})}).call(this)},n.jVt=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,5]),[4,this.nEt.jVt(t,i)];case 1:return r.sent(),[3,5];case 2:return lr(n=r.sent()),Ql(n)||Yl(n)?[4,this.jjt(t,i)]:[3,4];case 3:r.sent(),r.label=4;case 4:throw n;case 5:return[2]}})}).call(this)},n.Qjt=function(t,i){return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:if(n=this,jn(this.Kjt,t))return[2];this.Kjt.push(t),s.label=1;case 1:return s.trys.push([1,3,4,7]),r=t.Km===Dj.HU||t.Km===Dj.YLt?1/0:this.Ndt.maxRetries,[4,mT(function(){return n.retryOfflineRenditionsCallback(t,i)},i,r,this.Ndt.minimumBackoff,this.Ndt.maximumBackoff)];case 2:return s.sent(),[3,7];case 3:return e=s.sent(),this.oa.Qq(new ld(vd.MEDIA_LOAD_ERROR,e.message,e)),[3,7];case 4:return Xn(this.Kjt,t),t.sLt.bUt!==-1/0?[3,6]:[4,this.oa.NXt()];case 5:s.sent(),s.label=6;case 6:return[7];case 7:return[2]}})}).call(this)},n.fXt=function(t){return Vt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return n=this.djt,r=this.ljt,(e=[]).push(this.Yjt(r,t)),tj(n,r)||e.push(this.Yjt(n,t)),s=this.fjt,(null==(i=this.Mc.hls)?void 0:i.delaySubtitlePreload)?[4,ut.all(e)]:[3,3];case 1:return o.sent(),[4,this.Yjt(s,t)];case 2:return o.sent(),[3,5];case 3:return u=this.Yjt(s,t),[4,ut.all([].concat(e,[u]))];case 4:o.sent(),o.label=5;case 5:return[2]}})}).call(this)},n.Yjt=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:if(!t)return[2];r.label=1;case 1:return r.trys.push([1,3,,6]),[4,this.nEt.jVt(t,i)];case 2:return r.sent(),[3,6];case 3:return lr(n=r.sent()),Ql(n)||Yl(n)?[4,this.Jjt(t,i)]:[3,5];case 4:r.sent(),r.label=5;case 5:return[3,6];case 6:return[2]}})}).call(this)},n.Jjt=function(t,i){return Vt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return this.Vjt?[2]:(n=0===this.sO.V,t.Km===Dj.Mk||t.Km===Dj.Bk&&n?[3,2]:[4,this.Qjt(t,i)]);case 1:return o.sent(),[3,7];case 2:return this.Rjt&&this.Rjt.length<=1?[4,this.Qjt(t,i)]:[3,4];case 3:return o.sent(),[3,7];case 4:return[4,this.Tjt()];case 5:return r=o.sent(),this.kjt(r),e=this.xjt(r.lFt),s=this.Pjt(r.fFt),u=this.Ijt(r.vFt),[4,this.MGt(e,s,u)];case 6:o.sent(),o.label=7;case 7:return[2]}})}).call(this)},n.MGt=function(t,i,n,r){void 0===r&&(r={});var e={bLt:r.bLt||!1,SLt:r.SLt||!1,ALt:r.ALt||!1,tI:r.tI||!1,nXt:r.nXt||!1};return e.nXt||e.tI||this.djt!==t||this.ljt!==i||this.fjt!==n?void 0===t&&void 0===i?ut.reject(new y("Trying to buffer no media renditions.")):(this.djt=t,this.ljt=i,this.fjt=n,this.BUt(),this.So(new JY),this.oa.MGt(e)):ut.resolve()},n.yLt=function(t,i){return Vt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return n=this,this.oa.sXt?t?this.Fjt(t)?t===this.cjt?(vj.cN(_K,"Trying to set the already active variant stream, ignoring."),[2]):(r=this.djt?Fn(t.lFt,function(t){return $G(t,n.djt)}):void 0,e=this.ljt?Fn(t.fFt,function(t){return $G(t,n.ljt)}):void 0,s=this.fjt?Fn(t.vFt,function(t){return $G(t,n.fjt)}):void 0,this.kjt(t),this.DDt=void 0,[4,this.MGt(r,e,s,i)]):(vj.lt(_K,"Trying to set an active variant stream that does not exists on the internal model."),[2]):(vj.lt(_K,"Cannot explicitly set the active variant stream to undefined."),[2]):(vj.lt(_K,"The LLHLSPlayer is not loaded."),[2]);case 1:return u.sent(),[2]}})}).call(this)},n.kjt=function(t){var i;if(vj.cN(_K,"Setting active variant stream."),this.cjt!==t){var n=(null==(i=this.cjt)?void 0:i.yOt)!==(null==t?void 0:t.yOt);if(this.cjt&&n)for(var r,e=Lt(this.cjt.vFt);!(r=e()).done;){var s=r.value;this.Sjt.mFt(s)}if(this.cjt=t,this.So(new KY),t&&n)for(var u,o=Lt(t.vFt);!(u=o()).done;){var h=u.value;this.Sjt.hGt(h)}}},n.Zjt=function(){this.$jt(this.tO),this.$jt(this.sO)},n.$jt=function(t){for(var i,n=[],r=Lt(t.NI);!(i=r()).done;){for(var e,s=i.value,u=[],o=Lt(s.$I.NI);!(e=o()).done;){var h=e.value;jn(h.gLt.VLt,h.fLt)||u.push(h)}for(var a,c=Lt(u);!(a=c()).done;){var f=a.value;s.$I.pS(f),f.kn()}0===s.$I.V&&n.push(s)}for(var v,d=Lt(n);!(v=d()).done;){var l=v.value;t.it(l),l.kn()}},n.SXt=function(t){return Vt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:i=this,n={stack:[],error:void 0,hasError:!1},u.label=1;case 1:return u.trys.push([1,3,4,5]),r=qt(n,hr.ep([t]),!1),e=[this.ljt,tj(this.djt,this.ljt)?void 0:this.ljt,this.fjt].filter(Li),[4,ut.all(e.filter(function(t){return!t.sLt.vUt}).map(function(t){return i.nEt.QVt(t,r.Yg)}))];case 2:return u.sent(),[3,5];case 3:return s=u.sent(),n.error=s,n.hasError=!0,[3,5];case 4:return Gt(n),[7];case 5:return[2]}})}).call(this)},n.mXt=function(){return Vt(function(){var t,i,n,r,e,s,u,o,h,a,c,f,v,d,l,w,g,_,m,y,p,k;return zt(this,function(b){switch(b.label){case 0:if(r=this.djt,e=this.ljt,s=null==(t=this.cjt)?void 0:t.Rrt,u=[],void 0!==r){if(!(a=null!=(h=null==(o=r.Rrt)?void 0:o.q9)?h:null==s?void 0:s.q9))return[2,void 0];c='audio/mp4; codecs="'+a+'"',vj.cN(_K,"Configuring MediaSource for initial audio rendition with codec: "+c+"."),u.push(c)}if(void 0!==e){if(!(d=null!=(v=null==(f=e.Rrt)?void 0:f.W9)?v:null==s?void 0:s.W9))return[2,void 0];l='video/mp4; codecs="'+d+'"',vj.cN(_K,"Configuring MediaSource for initial video rendition with codec: "+l+"."),u.push(l)}return 0===u.length?(vj.FLt(_K,"No codecs found on the active variant stream."),[2,void 0]):(g=null!=(w=null==e||null==(i=e.sLt.bct[0])?void 0:i.UW)?w:[],m=null!=(_=null==r||null==(n=r.sLt.bct[0])?void 0:n.UW)?_:[],y=this.Mc,p=this.Br,[4,Vj(y.contentProtection,u,[].concat(p.fVt,m,g),this.aV,y.useCredentials)]);case 1:return k=b.sent(),[2,{Km:Iy.SV,q4:u.map(function(t){return{GT:t}}),fq:k,t5:y.useManagedMediaSource}]}})}).call(this)},n.yXt=function(t,i,n,r,e){var s,u,o=this.djt,h=this.ljt,a=t&&tj(o,h);if(i&&h)if(this.gjt)(n||e||a&&r)&&(this.gjt.Zg(),this.gjt.Rzt.jy()),this.gjt.fLt!==h&&this.gjt.MWt(h);else{var c=a?[eg.Mk,eg.Bk]:[eg.Mk];this.gjt=this.iQt(h,c)}else null==(s=this.gjt)||s.zg(),this.gjt=void 0;t&&o&&!a?this._jt?((n||r)&&(this._jt.Zg(),this._jt.Rzt.jy()),this._jt.fLt!==o&&this._jt.MWt(o)):this._jt=this.eQt(o):(null==(u=this._jt)||u.zg(),this._jt=void 0)},n.bXt=function(t){var i=this.fjt;this.tQt&&(this.tQt.fLt===i?t&&(this.tQt.Zg(),this.tQt.Rzt.jy()):(this.tQt.zg(),this.tQt=void 0));if(!this.tQt&&i&&(this.tQt=this.sQt(i)),i){var n=this.Sjt.dGt(i);n.Qk=zm.Kn,this.Bzt(n)}},n.iQt=function(t,i){var n=function(t,i,n,r,e,s,u,o,h,a,c){var f=n.Br.AM,v=new OY(f),d=new DY(eg.Mk,t,n,v,r,e,s,c),l=u._Tt(v,f,i);return new YY(d,v,l,o,h,a)}(t,i,this.nEt,this.aV,this.Sut,this.XHt,this.YGt,this.Opt,this.ENt,this.Mz,this.Mc.useCredentials);return n.Pzt.wn(PY.IWt,this.nQt),n.Pzt.wn(PY.CWt,this.rQt),n.Pzt.wn(eh.iy,this.Rs),n.Izt.wn(WY.Jqt,this.hQt),n.Izt.wn(WY.$qt,this.oQt),n.Izt.wn(WY.tzt,this.aQt),n.Izt.wn(WY.Zqt,this.uQt),n},n.eQt=function(t){var i=function(t,i,n,r,e,s,u,o,h){var a=i.Br.AM,c=new OY(a),f=new DY(eg.Bk,t,i,c,n,r,e,h),v=s._Tt(c,a,[eg.Bk]);return new YY(f,c,v,u,void 0,o)}(t,this.nEt,this.aV,this.Sut,this.XHt,this.YGt,this.Opt,this.Mz,this.Mc.useCredentials);return i.Pzt.wn(PY.CWt,this.rQt),i.Izt.wn(WY.Jqt,this.hQt),i.Izt.wn(WY.Zqt,this.uQt),i},n.sQt=function(t){return function(t,i,n,r,e,s){var u=i.Br.AM,o=new OY(u),h=new DY(eg.LT,t,i,o,n,r,e,s),a=new GY(o,u,eg.LT);return new YY(h,o,a)}(t,this.nEt,this.aV,this.Sut,this.XHt,this.Mc.useCredentials)},n.Czt=function(t,i){if(t?this.B4&&this.B4.$zt(t,this.QU)||(this.B4=new nK(eg.Bk,t,this.QU)):this.B4=void 0,i?this.M4&&this.M4.$zt(i,this.QU)||(this.M4=new nK(eg.Mk,i,this.QU)):this.M4=void 0,void 0!==this.gjt){var n=void 0!==t&&void 0===this._jt,r=[this.M4,n?this.B4:void 0].filter(Li);this.gjt.Czt(r)}if(void 0!==this._jt){var e=this.B4?[this.B4]:[];this._jt.Czt(e)}},n.Bzt=function(t){t?this.cQt&&this.cQt.$zt(t)||(this.cQt=new eK(t,this.Br.AM)):this.cQt=void 0,void 0!==this.tQt&&void 0!==this.cQt&&this.tQt.Bzt(this.cQt)},n.WGt=function(t){if(this.iV!==t){this.iV=t;for(var i,n=Lt(this.bjt);!(i=n()).done;){i.value.tV(t)}var r=this.fjt;if(void 0!==r){var e=this.Sjt.dGt(r);this.Bzt(e)}}},n.AXt=function(t,i){var n=[];t&&n.push(eg.Bk),i&&n.push(eg.Mk),this.Br.AM.dVt(n)},n.dQt=function(){if(void 0===this.gjt)return!1;var t=Ui.Mg();if(!this.gjt.Pzt.Nqt(t))return!1;var i=this.gjt.Pzt.Iqt();if(void 0===i||void 0===i.yut.ct)return!1;var n=this.zx,r=this.oa.vP,e=this.gjt.Mzt.iL(n);return!((void 0!==e?e.An(0)-n:0)>=2*i.yut.ct*r)&&(i.Cqt>0&&0===i.Rqt?i.Dqt>1e3*i.yut.ct*.8:8*i.Rqt/this.Mz.CY.IW>=1.8*i.yut.ct)},n.lQt=function(){return Vt(function(){var t,i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,this.QLt()];case 1:return void 0===(i=o.sent())||void 0===(n=null==(t=this.gjt)?void 0:t.Pzt.Iqt())?[2]:(r=this.cjt,n.Rqt>0&&(e=b.max(0,n.Rqt-n.Cqt),s=n.Rqt*(i.IW/r.IW),e<=s)?[2]:(u=i.IW0&&n.every(function(t){return function(t){return t.sLt.bct.length>0&&!t.sLt.iFt}(t)})?1/0:NaN}},{key:"ct",get:function(){var t;return null!=(t=this.xXt)?t:this.mjt}},{key:"PGt",get:function(){var t;return null!=(t=this.pjt)?t:this.mjt}},{key:"lGt",get:function(){var t=this.vGt;if(0!==t.length&&this.ct===1/0){for(var i,n,r=Lt(t);!(n=r()).done;){var e=n.value,s=e.sLt.kP;if(0!==s.V){var u=s.An(s.V-1)+e.sLt.ISt,o=e.sLt.mUt,h=u+(null!=o?o:0);(!i||it}U(),Et(),Wt(),Qt();var SK=function(){function t(){}var i=t.prototype;return i.Jq=function(t,i){return!!GA(t.type)&&!t.useNativePlayback},i.Zq=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return t.aes128?[2,!0]:[4,Np(t,!0)];case 1:return[2,i.sent()]}})})()},t}();U(),Et(),U(),Et(),Wt(),Qt();var EK=function(){function t(){}var i=t.prototype;return i.zHt=function(t,i,n){return Vt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,crypto.subtle.importKey("raw",i,{name:"AES-CBC"},!1,["decrypt"])];case 1:return r=s.sent(),[4,crypto.subtle.decrypt({name:"AES-CBC",iv:n},r,t)];case 2:return e=s.sent(),[2,new E(e)];case 3:throw s.sent(),new ld(vd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error during AES128 decrypt.");case 4:return[2]}})})()},i.zg=function(){},t.US=function(){return"undefined"!=typeof crypto&&void 0!==crypto.subtle&&void 0!==crypto.subtle.decrypt},t}();U(),Et(),U(),Et(),Wt(),Qt(),U(),Et(),xt(),Pt(),H(),Ft(),U(),Et(),Pt();var IK=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).data=void 0,r.data=n,r}return Ct(i,t),i}(rh),RK=["message","messageerror","error"];U(),Et(),Pt();var CK=function(t){function i(i){var n;return(n=t.call(this,qm.ma)||this).error=void 0,n.error=i,n}return Ct(i,t),i}(rh),PK=function(t){function i(i){var n;return(n=t.call(this)||this).mQt=void 0,n.gQt=void 0,n.wQt=[],n.AQt=function(t){if(n._Qt)t.bQt();else{n.mQt=t,n.mQt.wn(RK,n.Rs);for(var i,r=Lt(n.wQt);!(i=r()).done;){var e=i.value;t.pQt(e.Iy,e.yQt)}Yn(n.wQt)}},n.SQt=function(t){if(!n._Qt){var i=V(t,y)?t:new y("Could not create Worker.");n.So(new CK(i)),n.bQt()}},n.gQt=new hr,i(n.gQt.Yg).then(n.AQt,n.SQt),n}Ct(i,t);var n=i.prototype;return n.pQt=function(t,i){this._Qt||(void 0!==this.mQt?this.mQt.pQt(t,i):this.wQt.push({Iy:t,yQt:i}))},n.bQt=function(){this._Qt||(this.gQt.Zg(),Yn(this.wQt),void 0!==this.mQt&&this.mQt.bQt())},Nt(i,[{key:"_Qt",get:function(){return this.gQt.Yg.Hg}}]),i}(th);U(),Et(),U(),Et(),Pt(),H();var DK=function(t){function i(i,n){var r;return(r=t.call(this)||this).mQt=void 0,r.TQt=function(t){r.So(new IK("message",t.data))},r.kQt=function(t){r.So(new IK("messageerror",t.data))},r.L7=function(t){null==t.preventDefault||t.preventDefault.call(t);var i=V(t.error,y)?t.error:new y(t.message);r.So(new CK(i)),r.bQt()},r.mQt=new I(i,n),r.mQt.addEventListener("message",r.TQt),r.mQt.addEventListener("messageerror",r.kQt),r.mQt.addEventListener("error",r.L7),r}Ct(i,t);var n=i.prototype;return n.pQt=function(t,i){i?this.mQt.postMessage(t,i):this.mQt.postMessage(t)},n.bQt=function(){this.Vo(),this.mQt.removeEventListener("message",this.TQt),this.mQt.removeEventListener("messageerror",this.kQt),this.mQt.removeEventListener("error",this.L7),this.mQt.terminate()},i}(th);U(),Et(),Pt();var NK=0,xK=function(t){function i(i,n){var r;(r=t.call(this)||this).aS=void 0,r.IQt=void 0,r.EQt=void 0,r.CQt=void 0,r.xQt=function(){r.EQt.removeEventListener("load",r.xQt),r.EQt.contentWindow.postMessage({type:"initialize",id:r.aS,script:r.IQt},"*")},r.PQt=function(t){t.origin===r.CQt&&t.data.id===r.aS&&("initialized"===t.data.type||("error"===t.data.type?(r.So(new CK(new y(t.data.data.message))),r.bQt()):r.So(new IK("message",t.data.data))))},r.aS=NK++,r.IQt=i;var e=Ui.Dh("iframe.html",n);return r.EQt=function(t){var i=v.createElement("iframe");return i.width="0",i.height="0",i.style.display="none",i.role="",i.src=t,v.body.appendChild(i),i}(e.href),r.CQt=e.origin,r.EQt.addEventListener("load",r.xQt),self.addEventListener("message",r.PQt),r}Ct(i,t);var n=i.prototype;return n.pQt=function(t,i){i?this.EQt.contentWindow.postMessage({type:"message",data:t},"*",i):this.EQt.contentWindow.postMessage({type:"message",data:t},"*")},n.bQt=function(){var t;this.EQt.removeEventListener("load",this.xQt),self.removeEventListener("message",this.PQt),null==(t=this.EQt.contentWindow)||t.postMessage({type:"terminate"},"*"),Zi(this.EQt)},i}(th);function BK(t,i,n){var r=Ui.Pm(t,i);return new PK(function(t){return function(t,i,n,r){return Vt(function(){var e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,MK(e=new DK(t,n),r)];case 1:return f.sent(),[2,e];case 2:return s=f.sent(),null==e||e.bQt(),lr(s),[3,3];case 3:if(!OK||!Md)return[3,13];f.label=4;case 4:return f.trys.push([4,7,,8]),[4,Ui.Dx.vk({Yu:t,Hk:ml.GET,fk:Ud.LT,Yg:r})];case 5:return[4,f.sent().HT(r)];case 6:return u=f.sent(),[3,8];case 7:return lr(f.sent()),[3,8];case 8:if(!u)return[3,13];f.label=9;case 9:return f.trys.push([9,11,12,13]),h=Md([u],{type:"application/javascript"}),o=URL.createObjectURL(h),[4,MK(e=new DK(o,n),r)];case 10:return f.sent(),[2,e];case 11:return a=f.sent(),null==e||e.bQt(),lr(a),OK=!1,[3,13];case 12:return o&&URL.revokeObjectURL(o),[7];case 13:return f.trys.push([13,15,,16]),[4,MK(e=new xK(t,i),r)];case 14:return f.sent(),[2,e];case 15:throw c=f.sent(),null==e||e.bQt(),c;case 16:return[2]}})})()}(r,i,n,t)})}var OK=!0;function MK(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,t.ww(["message","error"],i)];case 1:if("error"===(n=r.sent()).type)throw function(t){return new ld(vd.CONFIGURATION_ERROR,"THEOplayer workers could not be loaded. Please check the configuration of the libraryLocation.",t)}(n.error);if(!function(t){return zi(t)&&"10.3.0"===t.RQt}(n.data))throw new ld(vd.CONFIGURATION_ERROR,"THEOplayer workers could not be loaded. Please check that the worker's version matches THEOplayer's version (10.3.0).");return[2,n]}})})()}U(),Et();var LK=function(t){return t.DQt="zHt",t.NQt="gWt",t}({}),FK=function(t){return t.BQt="MQt",t.LQt="OQt",t}({}),UK=function(){function t(t){var i=this;this.VQt=void 0,this.UQt=void 0,this.mQt=void 0,this.qQt=0,this.KQt=Ju(),this.HQt=function(t){var n=t.data,r=n.YQt,e=i.KQt.get(r);if(e)if(i.KQt.delete(r),n.JQt===FK.BQt)e.Qy(n.ZQt);else if(n.JQt===FK.LQt){var s=n.$Qt,u=n.tKt?new y(n.tKt):void 0,o=new ld(vd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error during AES128 decrypt. (code: "+s+")",u);e.Ky(o)}},this.WQt=function(t){var n=new ld(vd.CONTENT_PROTECTION_INTERNAL_ERROR,t.error.message,t.error);i.zg(n)},this.VQt=t;try{this.UQt=Ui.Pm("theoplayer.d.js",t)}catch(t){throw new ld(vd.CONFIGURATION_ERROR,"Invalid player configuration: missing libraryLocation",t)}}var i=t.prototype;return i.FQt=function(){var t=BK(this.UQt,this.VQt,{name:"THEOplayer decrypt worker"});return t.wn("message",this.HQt),t.wn("error",this.WQt),t},i.zHt=function(t,i,n){var r=""+ ++this.qQt,e={zQt:LK.DQt,GQt:r,XQt:t,jQt:i,QQt:n},s=new Va;return this.KQt.set(r,s),null!=this.mQt||(this.mQt=this.FQt()),this.mQt.pQt(e),s.Yy},i.zg=function(t){void 0===t&&(t=new fr),this.KQt.forEach(function(i){return i.Ky(t)}),this.KQt.clear(),this.mQt&&(this.mQt.bQt(),this.mQt=void 0)},t}();function VK(t){var i=Fn(t.boxes,oC);if(i){var n=Fn(i.boxes,hC);if(n)return n.handlerType}}function HK(t){var i,n=new mv;return(i=n.boxes).push.apply(i,[].concat(t.boxes)),n}function WK(t){var i,n=new Df;return(i=n.boxes).push.apply(i,[].concat(t.boxes)),n}U(),Et(),Pt(),U(),Et(),Wt(),Pt(),Ft(),Qt(),U(),Et(),Wt(),Pt(),Ft(),Qt(),U(),Et(),H();var zK=8;function XK(t,i){for(var n=function(t){var i,n=new zf;return(i=n.boxes).push.apply(i,[].concat(t.boxes)),n}(t),r=GK(i),e=0;e=0){var h=u.boxes[o],a=WK(u);a.boxes[o]=new rf(new E(h.getSize()-zK)),n.boxes[e]=a}}}return n}function qK(t,i){for(var n=function(t){var i,n=new nv;return(i=n.boxes).push.apply(i,[].concat(t.boxes)),n}(t),r=0;r0){var f=c.samples;if(!c.flags.sampleDurationPresent){c.flags.sampleDurationPresent=!0;for(var v,d=null!=r?r:s.defaultSampleDuration,l=Lt(f);!(v=l()).done;){v.value.duration=d}}f[0].duration+=o.toNumber(),c.samples=f}}}U(),Et(),H(),Ft();var QK="Mp4Transmuxer",YK=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).i3=void 0,i.iKt=void 0,i.rKt=void 0,i.hKt=void 0,i.nKt=void 0,i}Ct(i,t);var n=i.prototype;return n._zt=function(t,i){dr(i);var n=t.fLt,r=WC(_a(t.YOt.lk.lk));if(!r)throw new y("Mp4Transmuxer - Unable to parse "+n.Km+" MP4 initializer.");this.i3=r;var e=function(t){for(var i,n,r,e=Lt(t.Z);!(r=e()).done;){var s=r.value;i||(i=s.N1),n||(n=s.D1)}if(i||n)return{q9:i,W9:n,fOt:void 0};return}(r);e&&this.wzt(n,e);var s=function(t){for(var i,n=Lt(t.Z);!(i=n()).done;){var r=i.value;if(void 0!==r.B1)return r.B1}return}(r);void 0!==s&&this.yzt(n,s);var u=function(t){var i,n,r,e,s,u=Tv(t),o=Fn(u.boxes,eC),h=o.boxes.filter(sC),a=Fn(h,function(t){return VK(t)===df.AUDIO}),c=Fn(h,function(t){return VK(t)===df.VIDEO}),f={q9:{sN:a?GK(a):void 0},W9:{sN:c?GK(c):void 0}},v=null==(i=Fn(o.boxes,aC))?void 0:i.boxes.filter(cC),d=v?{q9:null!=(n=Fn(v,function(t){return t.trackId===f.q9.sN}))?n:void 0,W9:null!=(r=Fn(v,function(t){return t.trackId===f.W9.sN}))?r:void 0}:void 0;if(d&&(f.q9.FB=null==(e=d.q9)?void 0:e.defaultSampleDuration,f.W9.FB=null==(s=d.W9)?void 0:s.defaultSampleDuration),!a||!c)return{q9:a?t:void 0,W9:c?t:void 0,LU:f};var l=HK(u),w=HK(u),g=u.boxes.indexOf(o);l.boxes[g]=XK(o,c),w.boxes[g]=XK(o,a);var _=l.serialize().join(),m=w.serialize().join();return{q9:_,W9:m,LU:f}}(t.YOt.lk.lk);if(this.iKt=u.LU,u.W9){var o=Fn(r.Z,function(t){return t.sN===u.LU.W9.sN}),h={Km:"rRt",lk:{Km:zR.wZ,lk:u.W9},iat:eg.Mk,$Ot:t.$Ot,kzt:{Rrt:'video/mp4; codecs="'+o.D1+'"',UW:t.UW},CO:t.CO,fLt:t.fLt,BHt:t.YOt.BHt};this.Wqt(h)}if(u.q9){var a=Fn(r.Z,function(t){return t.sN===u.LU.q9.sN}),c={Km:"rRt",lk:{Km:zR.wZ,lk:u.q9},iat:eg.Bk,$Ot:t.$Ot,kzt:{Rrt:'audio/mp4; codecs="'+a.N1+'"',UW:t.UW},CO:t.CO,fLt:t.fLt,BHt:t.YOt.BHt};this.Wqt(c)}return ut.resolve()},n.pzt=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a,c,f,v,d,l,w,g,_,m,y,p,k,b,A,T;return zt(this,function(S){switch(S.label){case 0:if(dr(i),n=t.yut.BHt,vj.cN(QK,"Transmuxing fMP4: "+Oj(n.Syt)),r=t.yut.lk,e=KK(r.lk,this.i3),void 0!==(s=tr(e.map(function(t){return t.zet}),y_))&&(n.Get=s,this.Azt(t.fLt)),this.pVt.zUt(t.$Ot))return[3,2];if(u=m_.hU(n.CO),e.length>0){for(o=tr(e.map(function(t){return t.eKt}),y_),h=Lt(this.azt);!(a=h()).done;)c=a.value,this.pVt.iVt(t.$Ot,c,o,u,JK(n),!1);this.Azt(t.fLt)}return this.pVt.zUt(t.$Ot)?[3,2]:[4,gr(this.pVt.XUt(t.$Ot),i)];case 1:S.sent(),S.label=2;case 2:return f=this.pVt.ZUt(t.$Ot),v=n.Get?this.pVt.$Ut(n.Get,n).rF():n.CO,d=XY(n,v),l=qY(n,d),g={VHt:d,HHt:l,CO:v,ct:null!=(w=n.ct)?w:0,EU:f.rF(),$Ot:t.$Ot,fLt:t.fLt,BHt:t.yut.BHt},_=function(t,i){if(void 0===i.q9.sN)return{q9:void 0,W9:t};if(void 0===i.W9.sN)return{q9:t,W9:void 0};for(var n=Tv(t),r=HK(n),e=HK(n),s=0;sa&&(a=m)}var y=m_.yF(t.KB.KB,u.jD);e.push({sN:s,eKt:y,zet:y.gO(m_.bF(h,u.jD)),aKt:y.gO(m_.bF(o,u.jD)),oKt:y.gO(m_.bF(a,u.jD))})},e=[],s=Lt(t.Z);!(n=s()).done;)r();return e}(n,i)}function JK(t){return UQ(t)?t.KOt:0===t.CFt&&t.PFt.KOt}var ZK="MpegtsTransmuxer",$K=function(t){function i(i,n,r,e){var s;return(s=t.call(this,n,r,e)||this).wE=void 0,s._Kt=void 0,s.pKt=void 0,s.wKt=void 0,s.bKt=void 0,s.mKt=-1,s.yKt=-1,s.lKt=void 0,s.fKt=Zu(),s.wE=i,s}Ct(i,t);var n=i.prototype;return n._zt=function(i,n){return t.prototype._zt.call(this,i,n)},n.lzt=function(i,n){if(t.prototype.lzt.call(this,i,n),!this.wE.uKt()){var r,e=null!=(r=null==n?void 0:n.Syt)?r:i.Syt;if(e)/\.(ts|aac|mp3)/i.test(e.XE)&&this.wE.cKt()}},n.dKt=function(t){var i;return t.fLt===this.lKt&&this.fKt.has(t.$Ot)?i=this.fKt.get(t.$Ot):(i=hY(t.yut.lk.lk),this.lKt=t.fLt,this.fKt.set(t.$Ot,i)),i},n.pzt=function(i,n){var r=this;return Vt(function(){var e,s,u,o,h,a,c,f,v,d,l,w,g,_,m,y,p,k,b,A,T,S,E,I,R,C,P,D,N,x,B,O,M;return zt(this,function(L){switch(L.label){case 0:if(dr(n),e=this.dKt(i),s=i.yut,e!==oY.gHt&&e!==oY.pHt)return[2,t.prototype.pzt.call(r,i,n)];if(s.BHt.UW.some(iJ))throw new ld(vd.CONTENT_PROTECTION_NOT_SUPPORTED,"SAMPLE-AES encryption is not supported for MPEG-TS or Packed Audio segments");return u=this.wE.cKt(),e!==oY.gHt?[3,2]:(vj.cN(ZK,"Transmuxing MPEG-TS: "+Oj(s.BHt.Syt)),[4,u.vKt({data:s.lk.lk,metadata:this._Kt})]);case 1:return o=L.sent(),[3,4];case 2:return vj.cN(ZK,"Transmuxing raw audio: "+Oj(s.BHt.Syt)),[4,u.gKt({data:s.lk.lk,metadata:this._Kt})];case 3:o=L.sent(),L.label=4;case 4:if(dr(n),this.wzt(i.fLt,{q9:o.metadata.audio_codec,W9:o.metadata.video_codec,fOt:void 0}),o.metadata.video_frame_rate&&this.yzt(i.fLt,o.metadata.video_frame_rate),h=nJ(o.metadata.first_decode_timestamp),a=nJ(o.metadata.first_presentation_timestamp),c=void 0!==o.metadata.first_video_presentation_timestamp?nJ(o.metadata.first_video_presentation_timestamp):void 0,s.BHt.Get=a,this.Azt(i.fLt),void 0!==c&&this.bzt(i.fLt,s.BHt,function(t,i){var n=t.gF(i);return n.lF(m_.SF)&&(n=n.gO(b_())),n}(c,a)),this.pVt.zUt(i.$Ot))return[3,6];for(f=m_.hU(s.BHt.CO),v=Lt(this.azt);!(d=v()).done;)l=d.value,this.pVt.iVt(i.$Ot,l,h,f,JK(s.BHt),!0);return this.Azt(i.fLt),this.pVt.zUt(i.$Ot)?[3,6]:[4,gr(this.pVt.XUt(i.$Ot),n)];case 5:L.sent(),L.label=6;case 6:if(w=this.pVt.tVt(h,s.BHt),this._Kt=o.metadata,g=this.pVt.$Ut(a,s.BHt).rF(),_=XY(s.BHt,g),m=qY(s.BHt,_),p={VHt:_,HHt:m,CO:g,ct:null!=(y=s.BHt.ct)?y:0,EU:w.rF(),$Ot:i.$Ot,fLt:i.fLt,BHt:s.BHt},void 0===o.data.audio_media&&void 0===o.data.video_media){for(k=Lt(this.azt);!(b=k()).done;)A=b.value,T=Yu({Km:"yut",lk:void 0,iat:A},p),this.Wqt(T);return[2]}return S=[],void 0!==o.data.audio_media?(!o.data.audio_init||this.pKt&&this.mKt===i.$Ot&&Pa(this.pKt,o.data.audio_init)||(E=this.pVt.$Ut(s.BHt.Get,s.BHt).rF(),I={Km:"rRt",lk:{Km:zR.wZ,lk:o.data.audio_init},iat:eg.Bk,$Ot:i.$Ot,kzt:{Rrt:'audio/mp4; codecs="'+o.metadata.audio_codec+'"',UW:s.BHt.UW},CO:E,fLt:i.fLt,BHt:s.BHt},this.pKt=o.data.audio_init,this.mKt=i.$Ot,this.Wqt(I)),R=Yu({Km:"yut",lk:{Km:zR.wZ,lk:o.data.audio_media},iat:eg.Bk},p),this.Wqt(R)):i.yut.BHt.EFt&&jn(this.azt,eg.Bk)&&(C=Yu({Km:"yut",lk:void 0,iat:eg.Bk},p),this.Wqt(C)),void 0!==o.data.video_media?(!o.data.video_init||this.wKt&&this.yKt===i.$Ot&&Pa(this.wKt,o.data.video_init)||(P=this.pVt.$Ut(s.BHt.Get,s.BHt).rF(),D={Km:"rRt",lk:{Km:zR.wZ,lk:o.data.video_init},iat:eg.Mk,$Ot:i.$Ot,kzt:{Rrt:'video/mp4; codecs="'+o.metadata.video_codec+'"',UW:s.BHt.UW},CO:P,fLt:i.fLt,BHt:s.BHt},this.wKt=o.data.video_init,this.yKt=i.$Ot,this.bKt=WC(_a(o.data.video_init)),this.Wqt(D)),N=this.bKt.Z[0],x=KK(o.data.video_media,this.bKt)[0],B=this.sKt(o.data.video_media,N,x,void 0,s.BHt),this.nKt=N,O=Yu({Km:"yut",lk:{Km:zR.wZ,lk:B},iat:eg.Mk},p),this.Wqt(O),S.push(x)):i.yut.BHt.EFt&&jn(this.azt,eg.Mk)&&(M=Yu({Km:"yut",lk:void 0,iat:eg.Mk},p),this.Wqt(M)),this.rKt=s.BHt,this.hKt=S,[2]}})}).call(this)},n.Zg=function(){this.pKt=void 0,this.wKt=void 0,this.mKt=-1,this.yKt=-1,t.prototype.Zg.call(this)},i}(YK),tJ=function(){function t(){}return t.prototype._Tt=function(t,i,n){return new $K(this,t,i,n)},t}();function iJ(t){return t.Hk===xj.tOt}function nJ(t){return m_.yF(ue.fromBits(t.low,t.high),t.base)}U(),Et(),U(),Et();var rJ=function(t){return t[t.MPEGTS_TO_FMP4=0]="MPEGTS_TO_FMP4",t[t.RAW_AUDIO_TO_FMP4=1]="RAW_AUDIO_TO_FMP4",t}({}),eJ=function(){var t=function(){if("undefined"==typeof WebAssembly)return!1;var t=Bi.d_;if(t>0&&t<=56)return!1;try{return void 0!==new WebAssembly.Module(mh("AGFzbQEAAAA="))}catch(t){return!1}}();return eJ=function(){return t},t};var sJ=function(){function t(t){var i=this;this.VQt=void 0,this.UQt=void 0,this.mQt=void 0,this.qQt=0,this.KQt=Zu(),this.HQt=function(t){var n=t.data;if(void 0!==n.requestId){var r=i.KQt.get(n.requestId);if(!r)return;i.KQt.delete(n.requestId),n.success?r.Qy(n.output):r.Ky(new ld(n.errorCode,n.error))}else n.success||i.zg(new ld(n.errorCode,n.error))},this.WQt=function(t){var n=new ld(vd.MEDIA_DECODE_ERROR,t.error.message,t.error);i.zg(n)},this.VQt=t;var n=eJ()?"THEOplayer.transmux.js":"THEOplayer.transmux.asmjs.js";try{this.UQt=Ui.Pm(n,t)}catch(t){throw new ld(vd.CONFIGURATION_ERROR,"Invalid player configuration: missing libraryLocation",t)}this.mQt=this.FQt()}var i=t.prototype;return i.vKt=function(t){return this.AKt(rJ.MPEGTS_TO_FMP4,t)},i.gKt=function(t){return this.AKt(rJ.RAW_AUDIO_TO_FMP4,t)},i.FQt=function(){var t=BK(this.UQt,this.VQt,{name:"THEOplayer transmux worker"});return t.wn("message",this.HQt),t.wn("error",this.WQt),t},i.AKt=function(t,i){var n=++this.qQt,r={type:t,id:n,input:i},e=new Va;return this.KQt.set(n,e),this.mQt.pQt(r),e.Yy},i.zg=function(t){void 0===t&&(t=new fr),this.KQt.forEach(function(i){return i.Ky(t)}),this.KQt.clear(),this.mQt.bQt()},t}(),uJ=function(t){function i(i){var n;return(n=t.call(this)||this).SKt=void 0,n.mQt=void 0,n.SKt=i,n.mQt=void 0,n}Ct(i,t);var n=i.prototype;return n.uKt=function(){return void 0!==this.mQt},n.cKt=function(){var t;return null!=(t=this.mQt)?t:this.mQt=new sJ(this.SKt)},n.zg=function(){this.mQt&&(this.mQt.zg(),this.mQt=void 0)},i}(tJ),oJ=function(){function t(t){this.SKt=void 0,this.SKt=t}return t.prototype.jet=function(){return new uJ(this.SKt)},t}(),hJ=function(t){function i(i,n,r,e,s){var u,o=function(t){return EK.US()?new EK:new UK(t)}(s.libraryLocation),h=new oJ(s.libraryLocation),a=new yW(BW.Bg.Bxt,BW.Bg.Nxt,BW.Bg.bct,BW.Bg.Lxt);return(u=t.call(this,i,n,r,e,o,h,a,s)||this).$xt=void 0,Bi.X_&&(u.$xt=new BO(u)),u}Ct(i,t);var n=i.prototype;return n.zP=function(){return this.PL.zP()},n.kn=function(){var i=this;return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return r.sent(),null==(n=this.$xt)||n.kn(),[2]}})}).call(this)},Nt(i,[{key:"WP",get:function(){return this.PL.WP},set:function(t){this.PL.WP=t}}]),i}(bK),aJ=function(t){function i(i,n,r,e,s){var u,o=new xO(i),h=o.Yq(eg.Mk);return(u=t.call(this,h,n,r,e,s)||this).Nq=void 0,u.Nq=o,u}return Ct(i,t),i.prototype.kn=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.Nq.Dq(this.PL)];case 2:return n.sent(),[2]}})}).call(this)},i}(hJ),cJ=function(t){function i(){return t.apply(this,arguments)||this}Ct(i,t);var n=i.prototype;return n.Jq=function(i,n){return!!Pe(i.useManagedMediaSource)&&(!(!i.useManagedMediaSource&&(Bi.ru||Bi.Tg))&&t.prototype.Jq.call(this,i,n))},n.Zq=function(i){var n=this;return Vt(function(){return zt(this,function(r){return i.clearkey&&!i.fairplay&&Bi.X_?[2,!1]:[2,t.prototype.Zq.call(n,i)]})})()},i}(SK),fJ=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).tz=Ab._C,i}Ct(i,t);var n=i.prototype;return n.DC=function(t,i,n,r,e,s,u){return new aJ(i,n,e,s,r)},n.$q=function(){return!0},i}(cJ);GT(new fJ),vj.Rt=function(){var t;return Boolean(null==(t=f)?void 0:t.THEOplayerDebugLogsEnabled)},U(),Et(),U(),Et(),Wt(),Pt(),Qt(),U(),Et(),Wt(),Pt(),Qt(),U(),Et();var vJ=function(){function t(){}var i=t.prototype;return i.sdt=function(t,i){return ut.resolve(!1)},i.Aut=function(t,i){return ut.resolve(void 0)},i.hTt=function(t){return ut.resolve(void 0)},i.jJ=function(t){return ut.resolve(void 0)},t}(),dJ=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).Ac=void 0,e.nEt=void 0,e.kKt=void 0,e.DKt=void 0,e.i8=void 0,e.xKt=void 0,e.hT=new hr,e.Ac=i,e.nEt=new ZQ(r,new vJ,i.useCredentials,i.src,i.liveOffset),e.nEt.wn(eh.qw,e.Rs),e.i8=!1,e}Ct(i,t);var n=i.prototype;return n.TKt=function(){var t;return null==(t=this.kKt)?void 0:t.sLt},n.Tn=function(){var t=this;kr(mT(function(){return t.EKt(t.hT.Yg)},this.hT.Yg))},n.EKt=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.nEt.UVt(t)];case 1:return i.sent(),this.xKt&&(this.PKt(this.xKt.Ti,this.xKt.Mi),this.xKt=void 0),this.i8=!0,[2]}})}).call(this)},n.IKt=function(t,i){this.i8?this.PKt(t,i):this.xKt={Ti:t,Mi:i}},n.PKt=function(t,i){var n=this.CKt(t,i),r=null==n?void 0:n.fFt[0];r!==this.kKt&&(this.RKt(),void 0!==r&&(this.kKt=r,this.DKt=new lY(this.nEt,r),this.DKt.iWt()))},n.RKt=function(){this.kKt=void 0,this.DKt&&(this.DKt.zg(),this.DKt=void 0)},n.CKt=function(t,i){var n=Fn(this.nEt.Br._Vt,function(n){return void 0!==n.RRt&&n.RRt.Ti===t&&n.RRt.Mi===i});return null!=n?n:this.nEt.Br._Vt[0]},n.kn=function(){this.Vo(),this.hT.Zg(),this.hT.zg(),this.RKt(),this.nEt.zg()},i}(th);U(),Et(),xt(),Pt(),Ft();var lJ=function(t){function i(i){var n;(n=t.call(this)||this).V8=void 0,n.V8=i;for(var r,e=Lt(KT);!(r=e()).done;){var s=r.value;n.V8.wn(s,n.Rs)}return n}Ct(i,t);var n=i.prototype;return n.Xx=function(t,i){this.zx=t},n.YP=function(){return this.V8.YP()},n.qP=function(){return this.V8.qP()},n.Aa=function(){return this.V8.Aa()},n.sI=function(t){return this.V8.sI(t)},n.zP=function(){return this.V8.zP()},n.we=function(){return this.V8.we()},n.$P=function(){return this.V8.$P()},n.tI=function(){return this.V8.tI()},n.jP=function(){return this.V8.jP()},n.QP=function(){return this.V8.QP()},n.hr=function(){return this.V8.hr()},n.Ta=function(t,i,n){return this.V8.Ta(t,i,n)},n.IP=function(t,i,n,r){return this.V8.IP(t,i,n,r)},n.CP=function(){return this.V8.CP()},n.be=function(){return this.V8.be()},n.JP=function(){return this.V8.JP()},n.ZP=function(){return this.V8.ZP()},n.kn=function(){this.Vo();for(var t,i=Lt(KT);!(t=i()).done;){var n=t.value;this.V8.mn(n,this.Rs)}return this.V8.kn()},Nt(i,[{key:"ht",get:function(){return this.V8.ht}},{key:"Fx",get:function(){return this.V8.Fx}},{key:"Vx",get:function(){return this.V8.Vx},set:function(t){this.V8.Vx=t}},{key:"bt",get:function(){return this.V8.bt}},{key:"zx",get:function(){return this.V8.zx},set:function(t){this.V8.zx=t}},{key:"ct",get:function(){return this.V8.ct}},{key:"Qx",get:function(){return this.V8.Qx}},{key:"Jx",get:function(){return this.V8.Jx}},{key:"$x",get:function(){return this.V8.$x}},{key:"iP",get:function(){return this.V8.iP}},{key:"lt",get:function(){return this.V8.lt}},{key:"sP",get:function(){return this.V8.sP}},{key:"rP",get:function(){return this.V8.rP}},{key:"oP",get:function(){return this.V8.oP},set:function(t){this.V8.oP=t}},{key:"cP",get:function(){return this.V8.cP}},{key:"lP",get:function(){return this.V8.lP}},{key:"vP",get:function(){return this.V8.vP},set:function(t){this.V8.vP=t}},{key:"pP",get:function(){return this.V8.pP}},{key:"wP",get:function(){return this.V8.wP},set:function(t){this.V8.wP=t}},{key:"AP",get:function(){return this.V8.AP}},{key:"kP",get:function(){return this.V8.kP}},{key:"xP",get:function(){return this.V8.xP}},{key:"uq",get:function(){return this.V8.uq}},{key:"nt",get:function(){return this.V8.nt}},{key:"DP",get:function(){return this.V8.DP}},{key:"rt",get:function(){return this.V8.rt}},{key:"MP",get:function(){return this.V8.MP}},{key:"OP",get:function(){return this.V8.OP},set:function(t){this.V8.OP=t}},{key:"VP",get:function(){return this.V8.VP}},{key:"WP",get:function(){return this.V8.WP},set:function(t){this.V8.WP=t}},{key:"dq",get:function(){return this.V8.dq}},{key:"OL",get:function(){}}]),i}(nh),wJ=function(t){function i(i,n,r){var e;return(e=t.call(this,i)||this).NKt=void 0,e.BKt=void 0,e.MKt=!1,e.oHt=void 0,e.J9=void 0,e.handleManifestUpdate=function(t){e.So(t);var i=e.NKt.TKt();if(i){var n=e.uq;if(n){var r=n.getTime(),s=e.oHt;s||(s=new IQ,e.oHt=s),s.er(i.tFt,function(t){return(t.getTime()-r)/1e3}),!e.MKt&&s.L.V>0&&(e.nt.tt(s),e.J9.tt(s),e.MKt=!0)}}},e.rjt=function(){e.NKt&&e.NKt.IKt(e.MP,e.DP)},e.BKt=n,e.J9=new JD(e),e.wn(eh.Jw,e.rjt),e}Ct(i,t);var n=i.prototype;return n.Ta=function(i,n,r){var e=this;return Vt(function(){return zt(this,function(s){switch(s.label){case 0:return[4,t.prototype.Ta.call(e,i,n,r)];case 1:return s.sent(),i.hlsDateRange&&this.myt(i,n),[2]}})}).call(this)},n.myt=function(t,i){this.NKt=new dJ(t,i,this.BKt),this.NKt.wn(eh.qw,this.handleManifestUpdate),this.NKt.Tn()},n.hr=function(){return this.oHt&&(this.nt.it(this.oHt),this.J9.it(this.oHt),this.oHt.kn(),this.oHt=void 0,this.MKt=!1),this.NKt&&(this.NKt.kn(),this.NKt=void 0),this.J9.hr(),t.prototype.hr.call(this)},n.kn=function(){return this.mn(eh.Jw,this.rjt),this.NKt&&(this.NKt.kn(),this.NKt=void 0),this.J9.kn(),t.prototype.kn.call(this)},i}(lJ);!function(t){zT.iz().ez(t)}(function(t,i,n){return new wJ(t,i,n)}),U(),Et(),U(),Et(),U(),Et(),Wt(),Pt(),Qt(),U(),Et(),Wt(),Qt(),U(),Et(),xt(),Pt();var gJ=function(t){function i(i,n){var r;return void 0===n&&(n=""),(r=t.call(this,"An error occurred while casting.")||this).errorCode=void 0,r.description=void 0,r.errorCode=i,r.description=n,r}return Ct(i,t),Nt(i,[{key:"name",get:function(){return"CastError"}}]),i}(cr);function _J(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return kJ()?[3,2]:[4,mJ(t)];case 1:i.sent(),i.label=2;case 2:return pJ()?[3,4]:[4,Ar(100,t)];case 3:i.sent(),i.label=4;case 4:return pJ()?[3,6]:(Ui.um('Detected the Chromecast library was loaded without the CAF framework. It is strongly encouraged to load it with the CAF framework by using this URL: "//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"'),[4,yJ()]);case 5:i.sent(),i.label=6;case 6:return[2]}})})()}function mJ(t){return Vt(function(){var i,n,r,e,s,u;return zt(this,function(o){return(null==t?void 0:t.Hg)?[2,ut.reject(new fr)]:(i=function(){var t,i;return{Yy:new ut(function(n,r){t=n,i=r}),Qy:t,Ky:i}}(),n=i.Yy,r=i.Qy,e=i.Ky,s=f.__onGCastApiAvailable,u=function(){f.__onGCastApiAvailable=s,e(new fr)},f.__onGCastApiAvailable=function(i,n){i?r():e(new y(n)),null==t||t.jg(u),f.__onGCastApiAvailable=s,s&&s(i,n)},null==t||t.Xg(u),[2,n])})})()}var yJ=_n(function(){return function(t){return new ut(function(i,n){var r=v.createElement("script");r.onload=function(){return i()},r.onerror=function(t){return n((null==t?void 0:t.error)||t)},r.type="text/javascript",r.src=t,(v.head||v.documentElement).appendChild(r)})}("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js").catch(function(){throw new gJ("API_NOT_INITIALIZED","The Chromecast library could not be loaded successfully.")})});function pJ(){return Boolean("undefined"!=typeof cast&&cast.framework)}function kJ(){return"undefined"!=typeof chrome&&chrome&&chrome.cast&&chrome.cast.isAvailable}function bJ(t,i,n,r){if(Li(i))for(var e,s=Lt(k.keys(i));!(e=s()).done;){var u=e.value;if("type"!==u&&"images"!==u){var o=i[u];Li(o)&&(t[u]=o)}}!function(t,i,n,r){if(!Li(n)&&!Li(null==i?void 0:i.images))return;t.images=[],n&&t.images.push(new r.Image(n));if(null==i?void 0:i.images)if(Xi(i.images))t.images.push(new r.Image(i.images));else if(Vi(i.images))for(var e,s=Lt(i.images);!(e=s()).done;){var u,o,h=e.value,a=void 0;if(Xi(h))a=new r.Image(h);else(a=new r.Image(h.src)).height=null!=(u=h.height)?u:null,a.width=null!=(o=h.width)?o:null;t.images.push(a)}}(t,i,n,r)}function AJ(t,i,n){return void 0===n&&(n=chrome),function(t,i,n){switch(null==t?void 0:t.type){case"movie":var r=new n.MovieMediaMetadata;return bJ(r,t,i,n),r;case"audio":var e=new n.MusicTrackMediaMetadata;return bJ(e,t,i,n),!Li(e.artist)&&Li(t.artistName)&&(e.artist=t.artistName),e;case"tv-show":var s=new n.TvShowMediaMetadata;return bJ(s,t,i,n),!Li(s.title)&&Li(t.episodeTitle)&&(s.title=t.episodeTitle),!Li(s.season)&&Li(t.seasonNumber)&&(s.season=t.seasonNumber),!Li(s.episode)&&Li(t.episodeNumber)&&(s.episode=t.episodeNumber),s;default:var u=new n.GenericMediaMetadata;return bJ(u,t,i,n),u}}(t,i,function(t){return{GenericMediaMetadata:t.cast.media.GenericMediaMetadata,MovieMediaMetadata:t.cast.media.MovieMediaMetadata,TvShowMediaMetadata:t.cast.media.TvShowMediaMetadata,MusicTrackMediaMetadata:t.cast.media.MusicTrackMediaMetadata,Image:t.cast.Image}}(n))}function TJ(t){switch(t){case chrome.cast.ErrorCode.CANCEL:return"CANCEL";case chrome.cast.ErrorCode.TIMEOUT:return"TIMEOUT";case chrome.cast.ErrorCode.API_NOT_INITIALIZED:return"API_NOT_INITIALIZED";case chrome.cast.ErrorCode.INVALID_PARAMETER:return"INVALID_PARAMETER";case chrome.cast.ErrorCode.EXTENSION_NOT_COMPATIBLE:return"EXTENSION_NOT_COMPATIBLE";case chrome.cast.ErrorCode.EXTENSION_MISSING:return"EXTENSION_MISSING";case chrome.cast.ErrorCode.RECEIVER_UNAVAILABLE:return"RECEIVER_UNAVAILABLE";case chrome.cast.ErrorCode.SESSION_ERROR:return"SESSION_ERROR";case chrome.cast.ErrorCode.CHANNEL_ERROR:return"CHANNEL_ERROR";case chrome.cast.ErrorCode.LOAD_MEDIA_FAILED:return"LOAD_MEDIA_FAILED";default:return"CANCEL"}}function SJ(t){if(t.items&&t.items.length>0&&Li(t.currentItemId)&&t.currentItemId>=0)return Fn(t.items,function(i){return i.itemId===t.currentItemId})}U(),Et(),Wt(),Pt(),Ft(),Qt(),U(),Et(),xt(),Pt(),U(),Et(),U(),Et(),Ft(),U(),Et();var EJ="urn:x-cast:com.theoplayer.cast";U(),Et(),U(),Et();var IJ=function(t){return t.LKt="theoplayer_receiver_info",t.OKt="theoplayer_trackpropertychange",t.FKt="theoplayer_propertychange",t}({});U(),Et();var RJ=function(t){return t.SKIP_AD="SKIP_AD",t}({});U(),Et();function CJ(t){v.createElement("img").src=t}U(),Et(),Ft(),U(),Et(),Wt(),xt(),Qt(),U(),Et();var PJ=new RegExp(/^(\d\d):(\d\d):(\d\d)(?:\.(\d{3}))?$/);function DJ(t){if(Xi(t)){var i=t.match(PJ);if(i)return 3600*A(i[1],10)+60*A(i[2],10)+Number(i[3])+(Number(i[4])||0)/1e3}}function NJ(t){if(void 0!==t){var i=t.match(/^([1-9]?\d|100)%$/);if(i)return A(i[1])/100}}function xJ(t,i){return"vmap"===t.type||!Li(t.type)&&!Li(i)}function BJ(t,i){return"vast"===t.type||!Li(t.type)&&Li(i)}U(),Et(),Wt(),H(),Ft(),Qt(),U(),Et(),xt(),Pt(),U(),Et();var OJ=function(){},MJ=function(t){function i(i){var n;return(n=t.call(this)||this).qc=void 0,n.HKt=void 0,n.qc=i.sort(function(t,i){return t.zB-i.zB}),n}return Ct(i,t),i.prototype.VKt=function(){return null!=this.HKt||(this.HKt=Jn(this.qc,function(t){return t.VKt()})),this.HKt},Nt(i,[{key:"UKt",get:function(){return this.qc}}]),i}(OJ);U(),Et(),xt(),Pt(),Ft(),U(),Et(),xt(),Pt();var LJ=function(t){function i(i,n){var r;return(r=t.call(this)||this).WKt=void 0,r.qKt=void 0,r.GKt=void 0,r.WKt=i,r.qKt=n,r.GKt=!1,r}return Ct(i,t),Nt(i,[{key:"o",get:function(){return this.WKt}},{key:"zB",get:function(){return this.qKt}},{key:"zKt",get:function(){return this.GKt}}]),i}(OJ),FJ=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,i,n)||this).KKt=void 0,h.JKt=void 0,h.$Kt=void 0,h.jKt=void 0,h.nq=void 0,h.tYt=void 0,h.KKt=r,h.JKt=e,h.$Kt=s,h.jKt=u,h.nq=o,h}return Ct(i,t),i.prototype.VKt=function(){if(void 0===this.tYt){for(var t,i,n,r,e=[],s=Lt(this.jKt);!(r=s()).done;){var u=r.value;u.iYt&&(t=u.iYt),u.eYt&&(i=u.eYt),u.sYt&&(n=u.sYt),e=e.concat(u.universalAdIds)}this.tYt={ZKt:this.ZKt,iYt:t,nYt:i,sYt:n,lt:this.lt,rYt:e}}return[this.tYt]},Nt(i,[{key:"XKt",get:function(){return this.jKt}},{key:"QKt",get:function(){return this.KKt}},{key:"YKt",get:function(){return this.JKt}},{key:"ZKt",get:function(){return this.$Kt}},{key:"lt",get:function(){return this.nq}}]),i}(LJ);U(),Et(),xt(),Pt(),Ft(),U(),Et(),xt();var UJ=function(){function t(t,i){this.oYt=void 0,this.uYt=void 0,this.oYt=t,this.uYt=i}return Nt(t,[{key:"hYt",get:function(){return this.oYt}},{key:"aYt",get:function(){return this.uYt}}]),t}(),VJ=function(){function t(t,i,n,r,e,s){this.dYt=void 0,this.fYt=void 0,this._Yt=void 0,this.pYt=void 0,this.AYt=void 0,this.yYt=void 0,this.mYt=void 0,this.KKt=void 0,this.dYt=t,this.fYt=i,this._Yt=n,this.pYt=r,this.AYt=!1,this.yYt=e,this.KKt=s}return t.prototype.SYt=function(){this.AYt=!0},Nt(t,[{key:"cYt",get:function(){return this.dYt}},{key:"lYt",get:function(){return this.fYt}},{key:"vYt",get:function(){return this._Yt}},{key:"gYt",get:function(){return this.pYt}},{key:"od",get:function(){return this.mYt},set:function(t){this.mYt=t}},{key:"wYt",get:function(){return this.yYt}},{key:"bYt",get:function(){return this.AYt}},{key:"QKt",get:function(){return this.KKt}}]),t}();U(),Et(),xt();var HJ=function(t){return t.TYt="all",t.kYt="any",t.pz="none",t}({});var WJ=function(){function t(t,i){this.xYt=void 0,this.IYt=void 0,this.xYt=t,this.IYt=i}return Nt(t,[{key:"EYt",get:function(){return this.xYt}},{key:"PYt",get:function(){return this.IYt}}]),t}(),zJ=function(){function t(t,i,n,r,e,s,u,o,h,a,c,f,v,d,l,w){this.lA=void 0,this.fA=void 0,this.aS=void 0,this.RYt=void 0,this.NYt=void 0,this.MYt=void 0,this.OYt=void 0,this.UYt=void 0,this.HYt=void 0,this.qYt=void 0,this.dYt=void 0,this.fYt=void 0,this._Yt=void 0,this.GYt=void 0,this.XYt=void 0,this.QYt=void 0,this.lA=t,this.fA=i,this.aS=n,this.RYt=r,this.NYt=e,this.MYt=s,this.OYt=u,this.UYt=o,this.HYt=h,this.qYt=a,this.dYt=c,this.fYt=f,this._Yt=v,this.GYt=d,this.XYt=l,this.QYt=w}return Nt(t,[{key:"o",get:function(){return this.aS}},{key:"Ti",get:function(){return this.lA}},{key:"Mi",get:function(){return this.fA}},{key:"CYt",get:function(){return this.RYt}},{key:"DYt",get:function(){return this.NYt}},{key:"BYt",get:function(){return this.MYt}},{key:"LYt",get:function(){return this.OYt}},{key:"FYt",get:function(){return this.UYt}},{key:"VYt",get:function(){return this.HYt}},{key:"WYt",get:function(){return this.qYt}},{key:"cYt",get:function(){return this.dYt}},{key:"lYt",get:function(){return this.fYt}},{key:"vYt",get:function(){return this._Yt}},{key:"zYt",get:function(){return this.GYt}},{key:"aYt",get:function(){return this.XYt}},{key:"jYt",get:function(){return this.QYt}}]),t}();U(),Et(),xt();var XJ=function(){function t(t,i){this.aS=void 0,this.NFt=void 0,this.aS=t,this.NFt=i}return Nt(t,[{key:"id",get:function(){return this.aS}},{key:"uri",get:function(){return this.NFt}}]),t}(),qJ=function(){function t(t,i,n,r){this.YYt=void 0,this.ZYt=void 0,this.tJt=void 0,this.eJt=void 0,this.YYt=t,this.ZYt=i,this.tJt=n,this.eJt=r}return Nt(t,[{key:"KYt",get:function(){return this.YYt}},{key:"JYt",get:function(){return this.ZYt}},{key:"$Yt",get:function(){return this.tJt}},{key:"iJt",get:function(){return this.eJt}}]),t}(),GJ=function(t){function i(i,n,r,e,s,u,o,h,a){var c;return(c=t.call(this,i,n)||this).$Kt=void 0,c.nJt=void 0,c.hJt=void 0,c.aJt=void 0,c.cJt=void 0,c.jKt=void 0,c.nq=void 0,c.HKt=void 0,c.$Kt=r,c.nJt=e,c.hJt=s,c.jKt=u,c.aJt=o,c.cJt=h,c.nq=a,c}Ct(i,t);var n=i.prototype;return n.VKt=function(){var t=this;return void 0===this.nJt?[]:(null!=this.HKt||(this.HKt=this.nJt.VKt().map(function(i){return t.dJt(i)})),this.HKt)},n.dJt=function(t){for(var i,n,r,e,s=Lt(this.XKt);!(e=s()).done;){var u=e.value;u.iYt&&(i=u.iYt),u.eYt&&(n=u.eYt),u.sYt&&(r=u.sYt)}var o=t.ZKt.concat(this.ZKt),h=t.iYt;if(i&&t.iYt){var a=new qJ(t.iYt.lJt.KYt,t.iYt.lJt.JYt,t.iYt.lJt.$Yt.concat(i.lJt.$Yt),t.iYt.lJt.iJt.concat(i.lJt.iJt));(h=t.iYt).lJt=a,h.aYt=h.aYt.concat(i.aYt)}var c=t.nYt;if(n&&n.hYt){for(var f,v,d,l=[],w=Lt(n.hYt);!(d=w()).done;){var g=d.value;l.concat(g.gYt.$Yt)}for(var _,m,y,p=[],k=Lt(null!=(_=null==(f=t.nYt)?void 0:f.hYt)?_:[]);!(m=k()).done;){var b,A,T,S=m.value,E=new qJ(S.gYt.KYt,S.gYt.JYt,S.gYt.$Yt.concat(l),(null!=(A=null==(b=t.iYt)?void 0:b.lJt.iJt)?A:[]).concat(null!=(T=null==i?void 0:i.lJt.iJt)?T:[]));p.push(new VJ(S.cYt,S.lYt,S.vYt,E,S.wYt,S.QKt))}c=new UJ(p,(null!=(y=null==(v=t.nYt)?void 0:v.aYt)?y:[]).concat(n.aYt))}var I=t.sYt;if(I){var R,C,P,D=I.EYt;r&&r.EYt&&(D=r.EYt),I=new WJ(D,(null!=(C=null==(R=t.sYt)?void 0:R.PYt)?C:[]).concat(null!=(P=null==r?void 0:r.PYt)?P:[]))}var N=t.lt;return this.lt&&(N=this.lt),{ZKt:o,iYt:h,nYt:c,sYt:I,lt:N,rYt:t.rYt}},Nt(i,[{key:"ZKt",get:function(){return this.$Kt}},{key:"sJt",get:function(){return this.nJt}},{key:"rJt",get:function(){return this.hJt}},{key:"XKt",get:function(){return this.jKt}},{key:"oJt",get:function(){return this.aJt}},{key:"uJt",get:function(){return this.cJt}},{key:"lt",get:function(){return this.nq}}]),i}(LJ);U(),Et(),xt();var jJ=function(){function t(t,i,n,r,e,s,u,o){this.aS=void 0,this.vJt=void 0,this.gJt=void 0,this.UYt=void 0,this.pJt=void 0,this.mJt=void 0,this.wJt=void 0,this.yJt=void 0,this.aS=t,this.vJt=i,this.gJt=n,this.UYt=r,this.pJt=e,this.mJt=s,this.wJt=u,this.yJt=o}return Nt(t,[{key:"o",get:function(){return this.aS}},{key:"fJt",get:function(){return this.vJt}},{key:"_Jt",get:function(){return this.gJt}},{key:"FYt",get:function(){return this.UYt}},{key:"iYt",get:function(){return this.pJt}},{key:"eYt",get:function(){return this.mJt}},{key:"sYt",get:function(){return this.wJt}},{key:"universalAdIds",get:function(){return this.yJt}}]),t}();U(),Et(),xt();var QJ=function(){function t(t,i,n,r,e,s,u,o,h){this.bJt=void 0,this.SJt=void 0,this.IJt=void 0,this.uYt=void 0,this.TJt=void 0,this.EJt=void 0,this.AYt=void 0,this.yYt=void 0,this.mYt=void 0,this.KKt=void 0,this.RJt=void 0,this.NJt=void 0,this.bJt=t,this.SJt=i,this.uYt=n,this.TJt=r,this.EJt=e,this.AYt=!1,this.yYt=s,this.KKt=u,this.RJt=o,this.NJt=h}return t.prototype.SYt=function(){this.AYt=!0},Nt(t,[{key:"ct",get:function(){return this.bJt}},{key:"AJt",get:function(){return this.SJt}},{key:"aYt",get:function(){return this.uYt},set:function(t){this.uYt=t}},{key:"lJt",get:function(){return this.TJt},set:function(t){this.TJt=t}},{key:"kJt",get:function(){return this.EJt},set:function(t){this.EJt=t}},{key:"xJt",get:function(){return this.AYt}},{key:"od",get:function(){return this.mYt},set:function(t){this.mYt=t}},{key:"wYt",get:function(){return this.yYt}},{key:"QKt",get:function(){return this.KKt}},{key:"PJt",get:function(){return this.IJt},set:function(t){this.IJt=t}},{key:"CJt",get:function(){return this.RJt}},{key:"DJt",get:function(){return this.NJt}}]),t}();function YJ(t,i){return $J(t)&&t.getAttribute(i)||void 0}function KJ(t,i){return JJ(t,i,void 0,!1)}function JJ(t,i,n,r){return i===(t.localName?t.localName:t.nodeName)&&(r&&n?n===t.namespaceURI:!n||!t.namespaceURI||n===t.namespaceURI)}function ZJ(t,i){for(var n=[],r=0;r0)throw new y('Invalid document for MIME type "'+i+'"');return n}function iZ(t){return tZ(t,"text/xml")}function nZ(t){return t.replace(/[<>&'"]/g,function(t){switch(t){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return""";default:return t}})}function rZ(t){return"data:application/xml,"+encodeURIComponent(t)}U(),Et(),U(),Et(),xt();var eZ=function(t){return t.BJt="mute",t.MJt="unmute",t.jw="pause",t.LJt="resume",t.OJt="rewind",t.FJt="skip",t.UJt="playerExpand",t.VJt="playerCollapse",t.HJt="fullscreen",t.WJt="exitFullscreen",t.qJt="expand",t.COLLAPSE="collapse",t.tTt="start",t.zJt="firstQuartile",t.GJt="thirdQuartile",t.XJt="midpoint",t.jJt="complete",t.QJt="acceptInvitationLinear",t.KJt="acceptInvitation",t.YJt="timeSpentViewing",t.JJt="otherAdInteraction",t.Qw="progress",t.ZJt="creativeView",t.$Jt="adExpand",t.tZt="adCollapse",t.iZt="minimize",t.eZt="close",t.sZt="closeLinear",t.nZt="overlayViewDuration",t.rZt="breakStart",t.hZt="breakEnd",t.ma="error",t}({});function sZ(t){switch(t){case"breakStart":case"breakEnd":case"error":return!0;default:return!1}}var uZ=["mute","unmute","pause","resume","rewind","skip","closeLinear","close","playerExpand","playerCollapse","fullscreen","exitFullscreen","expand","collapse","creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","acceptInvitationLinear","acceptInvitation","timeSpentViewing","otherAdInteraction","progress"];function oZ(t){return void 0!==t&&-1!==uZ.indexOf(t)}var hZ=["start","firstQuartile","midpoint","thirdQuartile","complete","mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","expand","collapse","fullscreen","exitFullscreen","creativeView","acceptInvitation","adExpand","adCollapse","minimize","close","overlayViewDuration","otherAdInteraction","progress"];function aZ(t){return void 0!==t&&-1!==hZ.indexOf(t)}var cZ=["mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","creativeView"];function fZ(t){return void 0!==t&&-1!==cZ.indexOf(t)}function vZ(t,i){if(void 0!==t&&""!==t&&void 0!==i){var n=t.match(/^(\d+):(\d+):(\d+)$/);return n?T(n[1]||"0")+60*T(n[2]||"0")+T(n[3]||"0"):(n=t.match(/^(100|[1-9]\d|\d)%$/))?T(n[1]||"0")*i/100:void 0}}var dZ=function(){function t(t,i,n){this.oZt=void 0,this.aZt=void 0,this.uZt=void 0,this.oZt=t,this.aZt=i,this.uZt=n}return Nt(t,[{key:"oX",get:function(){return this.oZt}},{key:"ac",get:function(){return this.aZt}},{key:"eventURL",get:function(){return this.uZt}}]),t}();U(),Et(),xt(),Pt();var lZ=function(){function t(t){this.dZt=void 0,this.dZt=t}return Nt(t,[{key:"cZt",get:function(){return this.dZt}}]),t}(),wZ=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i)||this).fZt=void 0,s.QYt=void 0,s.YYt=void 0,s.fZt=n,s.YYt=r,s.QYt=e,s}return Ct(i,t),Nt(i,[{key:"KYt",get:function(){return this.YYt}},{key:"jYt",get:function(){return this.QYt}},{key:"lZt",get:function(){return this.fZt}}]),i}(lZ),gZ=function(t){function i(i){return t.call(this,i)||this}return Ct(i,t),i}(lZ),_Z=function(t){function i(i){return t.call(this,i)||this}return Ct(i,t),i}(lZ);U(),Et(),xt();var mZ={vZt:{Jy:100,Iy:"XML parsing error."},_Zt:{Jy:303,Iy:"Empty or invalid VAST error."},gZt:{Jy:400,Iy:"General linear error"},pZt:{Jy:403,Iy:"Unsupported MIME-type or missing mediafiles error"},mZt:{Jy:500,Iy:"General nonlinear error"},BG:{Jy:900,Iy:"Network error"}},yZ=function(){function t(t){this.yZt=void 0,this.yZt=t}return t.prototype.bZt=function(t){if(this.wZt){var i=this.wZt.replace(/\[ERRORCODE]/,""+t.Jy);CJ(i)}},Nt(t,[{key:"wZt",get:function(){return this.yZt}}]),t}();U(),Et(),xt(),Pt();var pZ=function(t){function i(i,n,r,e){var s;return(s=t.call(this,r||n&&AZ[n]||i,e)||this).SZt=void 0,s.kZt=void 0,s.G2=void 0,s.SZt=i,s.kZt=n,s.G2=r,s}return Ct(i,t),Nt(i,[{key:"AZt",get:function(){return this.SZt}},{key:"TZt",get:function(){var t;return null!=(t=this.kZt)?t:900}}]),i}(cr),kZ=function(t){return t.ADBLOCK="adblock",t.NETWORK="network",t.PARSING="parsing",t.PLAYBACK="playback",t.GENERAL="general",t}({}),bZ=function(t){return t[t.VAST_MALFORMED_RESPONSE=100]="VAST_MALFORMED_RESPONSE",t[t.VAST_SCHEMA_VALIDATION_ERROR=101]="VAST_SCHEMA_VALIDATION_ERROR",t[t.VAST_UNSUPPORTED_VERSION=102]="VAST_UNSUPPORTED_VERSION",t[t.VAST_TRAFFICKING_ERROR=200]="VAST_TRAFFICKING_ERROR",t[t.VAST_UNEXPECTED_LINEARITY=201]="VAST_UNEXPECTED_LINEARITY",t[t.VAST_UNEXPECTED_DURATION_ERROR=202]="VAST_UNEXPECTED_DURATION_ERROR",t[t.UNEXPECTED_SIZE=203]="UNEXPECTED_SIZE",t[t.VAST_WRAPPER_ERROR=300]="VAST_WRAPPER_ERROR",t[t.VAST_LOAD_TIMEOUT=301]="VAST_LOAD_TIMEOUT",t[t.VAST_TOO_MANY_REDIRECTS=302]="VAST_TOO_MANY_REDIRECTS",t[t.VAST_NO_ADS_AFTER_WRAPPER=303]="VAST_NO_ADS_AFTER_WRAPPER",t[t.GENERAL_LINEAR_ERROR=400]="GENERAL_LINEAR_ERROR",t[t.FILE_NOT_FOUND=401]="FILE_NOT_FOUND",t[t.VAST_MEDIA_LOAD_TIMEOUT=402]="VAST_MEDIA_LOAD_TIMEOUT",t[t.VAST_LINEAR_ASSET_MISMATCH=403]="VAST_LINEAR_ASSET_MISMATCH",t[t.VAST_PROBLEM_DISPLAYING_MEDIA_FILE=405]="VAST_PROBLEM_DISPLAYING_MEDIA_FILE",t[t.MEZZANINE_FILE_REQUIRES=406]="MEZZANINE_FILE_REQUIRES",t[t.MEZZANINE_FILE_DOWNLOADED_FIRST_TIME=407]="MEZZANINE_FILE_DOWNLOADED_FIRST_TIME",t[t.AD_IN_VAST_REJECTED=408]="AD_IN_VAST_REJECTED",t[t.INTERACTIVE_CREATIVE_NOT_EXECUTED=409]="INTERACTIVE_CREATIVE_NOT_EXECUTED",t[t.VERIFICATION_CODE_NOT_EXECUTED=410]="VERIFICATION_CODE_NOT_EXECUTED",t[t.GENERAL_NON_LINEAR_ERROR=500]="GENERAL_NON_LINEAR_ERROR",t[t.NONLINEAR_DIMENSIONS_ERROR=501]="NONLINEAR_DIMENSIONS_ERROR",t[t.OVERLAY_AD_LOADING_FAILED=502]="OVERLAY_AD_LOADING_FAILED",t[t.VAST_NONLINEAR_ASSET_MISMATCH=503]="VAST_NONLINEAR_ASSET_MISMATCH",t[t.GENERAL_COMPANION_AD_ERROR=600]="GENERAL_COMPANION_AD_ERROR",t[t.INVALID_DIMENSIONS_COMPANION_AD=601]="INVALID_DIMENSIONS_COMPANION_AD",t[t.COMPANION_REQUIRED_ERROR=602]="COMPANION_REQUIRED_ERROR",t[t.COMPANION_AD_LOADING_FAILED=603]="COMPANION_AD_LOADING_FAILED",t[t.UNABLE_TO_FIND_SUPPORTED_COMPANION=604]="UNABLE_TO_FIND_SUPPORTED_COMPANION",t[t.UNKNOWN_ERROR=900]="UNKNOWN_ERROR",t[t.GENERAL_VPAID_ERROR=901]="GENERAL_VPAID_ERROR",t[t.MALFORMED_URI=1005]="MALFORMED_URI",t[t.VAST_ASSET_NOT_FOUND=1007]="VAST_ASSET_NOT_FOUND",t[t.VAST_EMPTY_RESPONSE=1009]="VAST_EMPTY_RESPONSE",t[t.UNKNOWN_AD_RESPONSE=1010]="UNKNOWN_AD_RESPONSE",t[t.UNSUPPORTED_LOCALE=1011]="UNSUPPORTED_LOCALE",t[t.INVALID_ARGUMENTS=1101]="INVALID_ARGUMENTS",t[t.INVALID_ADX_EXTENSION=1105]="INVALID_ADX_EXTENSION",t[t.AUTOPLAY_DISALLOWED=1205]="AUTOPLAY_DISALLOWED",t}({}),AZ={100:"XML parsing error.",101:"VAST schema validation error.",102:"VAST version of response not supported.",200:"Trafficking error. The video player received an ad type that it was not expecting and/or cannot display.",201:"Video player expecting different linearity.",202:"Video player expecting different duration.",203:"Video player expecting different size.",300:"General wrapper error.",301:"Timeout of VAST URI provided in wrapper element, or of VAST URI provided in a subsequent wrapper element. This includes request errors such as invalid URI, unreachable or request timeout for URI, and security or other exceptions related to requesting a VAST URI.",302:"Wrapper limit reached, as defined by the video player. Too many wrapper responses have been received with no InLine response. This can be caused by a circular loop of daisy chaining (one network bouncing to another and another).",303:"No ads VAST response after one or more wrappers. This also includes the number of empty VAST responses from fallback.",400:"General linear error. The video player is unable to display the linear ad.",401:"File not found. Unable to find Linear/MediaFile from URI.",402:"Unable to download or timeout of MediaFile URI.",403:"Could not find a media file that is supported by this video player, based on the attributes of the MediaFile element.",405:"Problem displaying a media file.",406:"A mezzanine file was required, but not provided.",407:"The mezzanine file was downloaded for the first time, so the ad did not serve. This can occur when an ad insertion is missed because the creative is being transcoded. It continues to occur until the creative is available for insertion.",408:"The ad returned in the VAST response was rejected.",409:"The interactive creative defined in the InteractiveCreativeFile node was not executed.",410:"The code referenced in the Verification node was not executed.",500:"General NonLinearAds error.",501:"Unable to display non-linear ad because creative dimensions do not align with creative display area (in other words, the creative dimension was too large). This can occur if you use CSS styles to set width and height of the video ,content element. You should instead use the width and height HTML attributes.",502:"Unable to fetch NonLinearAds/NonLinear resource.",503:"Could not find NonLinearResource with supported type. This can occur when a creative size is larger than the player size.",600:"General CompanionAds error.",601:"Unable to display companion because creative dimensions do not fit within the companion display area (in other words, space was not available).",602:"Unable to display required companion.",603:"Unable to fetch CompanionAds/Companion resource.",604:"Could not find Companion resource with supported type.",900:"VAST 2 error. Even if you request VAST 3 or your DFP network default is VAST 3, this can occur if you have a VAST redirect that returns a VAST 2 response.",901:"General VPAID error",1005:"URI malformed."};function TZ(t){if(!t)return!1;switch(t.toLocaleLowerCase()){case cA._C:case cA.gC:case cA.vC:return!0;default:return!1}}function SZ(t){var i=Rr();return!!(TZ(t)||t&&i&&(null==i?void 0:i.canPlayType)&&i.canPlayType(t))||(IZ("Invalid or unsupported MediaFile Content delivery type, skipping mediafile"),!1)}function EZ(t,i){for(var n,r=Lt(i);!(n=r()).done;){var e=n.value;new yZ(e).bZt(t)}}function IZ(t){0}U(),Et(),Ft(),U(),Et(),xt();var RZ=function(){function t(t,i){this.xZt=void 0,this.IZt=void 0,this.xZt=t,this.IZt=i}return Nt(t,[{key:"EZt",get:function(){return this.xZt}},{key:"PZt",get:function(){return this.IZt}}]),t}(),CZ=function(){function t(){}var i=t.prototype;return i.CZt=function(i,n){return Vt(function(){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return xJ(i.sources,i.timeOffset)?[4,t.RZt(i.sources.src,n)]:[3,7];case 1:if(r=o.sent(),!(e=r&&r.documentElement))throw new pZ(kZ.NETWORK,bZ.VAST_SCHEMA_VALIDATION_ERROR,"Ad source is not a valid XML document.");return KJ(e,"VMAP")?[4,this.DZt(e,i,n)]:[3,3];case 2:return[2,o.sent()];case 3:return KJ(e,"VAST")?[4,this.NZt(e,n,!1)]:[3,5];case 4:return(s=o.sent())?(u=new BZ("",!0,!0,s),[2,[new NZ("start",u,PZ.BZt,"",[],!1,!0,i)]]):[2,[]];case 5:throw new pZ(kZ.GENERAL,bZ.VAST_MALFORMED_RESPONSE,"Only VMAP and VAST files are allowed as ad source.");case 6:return[3,8];case 7:if(BJ(i.sources,i.timeOffset))return[2,[new xZ(String(i.timeOffset),i,n)]];throw new pZ(kZ.GENERAL,bZ.VAST_MALFORMED_RESPONSE,"Something went wrong parsing the ad source; only VMAP and VAST files are allowed as ad source.");case 8:return[2]}})}).call(this)},i.MZt=function(){return Vt(function(i,n,r,e){var s,u,o;return zt(this,function(h){switch(h.label){case 0:void 0===e&&(e=[]),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,t.RZt(i,n)];case 2:return s=h.sent(),[3,4];case 3:throw u=h.sent(),EZ(V(u,pZ)&&u.TZt===bZ.VAST_MALFORMED_RESPONSE?mZ._Zt:mZ.BG,e),u;case 4:return(o=s&&s.documentElement)&&KJ(o,"VAST")?[4,this.NZt(o,n,r,e)]:[3,6];case 5:return[2,h.sent()];case 6:o&&KJ(o,"VMAP")&&Ui.um("Received VMAP ad when expecting VAST. Please set the type of your ad source in the configuration, or make sure to not set a timeOffset for VMAP ad sources. VMAP ads have their own offsets included."),h.label=7;case 7:return[2,void 0]}})}).apply(this,arguments)},i.LZt=function(t,i,n,r){return Vt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(!(null==(e=t.sources)?void 0:e.src))throw new pZ(kZ.GENERAL,bZ.MALFORMED_URI,"Property src on adSource is missing.");return[4,this.MZt(t.sources.src,r,!1)];case 1:return s=h.sent(),u=new BZ("",!0,!0,s),(o=new NZ(i,u,PZ.BZt,"",[],!1,!0,t)).OZt=n,[2,o]}})}).call(this)},i.NZt=function(){return Vt(function(t,i,n,r){var e,s,u,o,h,a,c,f,v,d,l,w;return zt(this,function(g){switch(g.label){case 0:if(void 0===r&&(r=[]),e=[],s=[],u=[],!t||!KJ(t,"VAST")){if(EZ(mZ._Zt,r),n)throw new pZ(kZ.PARSING,bZ.VAST_NO_ADS_AFTER_WRAPPER,"No VAST element found after wrapper.");throw new pZ(kZ.PARSING,bZ.VAST_EMPTY_RESPONSE,"The VAST element was empty.")}if(0===ZJ(t,"Ad").length)return[3,7];o=Lt(ZJ(t,"Ad")),g.label=1;case 1:if((h=o()).done)return[3,6];a=h.value,g.label=2;case 2:return g.trys.push([2,4,,5]),[4,this.FZt(a,i,r)];case 3:return 0===(c=g.sent()).zB?e.push(c):s.push(c),[3,5];case 4:return f=g.sent(),u.push(f),[3,5];case 5:return[3,1];case 6:if(0===e.length&&0===s.length&&u.length>0)throw u[0];if(1===e.length&&0===s.length)return[2,e[0]];if(0===e.length&&0!==s.length)return[2,new MJ(s)];if(e.length>0||s.length>0)return[2,new MJ(s.concat(e))];g.label=7;case 7:if(0!==ZJ(t,"Error").length)for(v=Lt(ZJ(t,"Error"));!(d=v()).done;)l=d.value,IZ(mZ._Zt.Iy),(w=l.textContent)&&r.push(w.trim());if(EZ(mZ._Zt,r),n)throw new pZ(kZ.PARSING,bZ.VAST_NO_ADS_AFTER_WRAPPER,"No VAST element found after wrapper.");throw new pZ(kZ.PARSING,bZ.VAST_EMPTY_RESPONSE,"The VAST element was empty.")}})}).apply(this,arguments)},i.DZt=function(t,i,n){return Vt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:if(r=[],0===(e=ZJ(t,"AdBreak")).length)throw new pZ(kZ.PARSING,bZ.VAST_EMPTY_RESPONSE,"The VMAP element was empty.");s=Lt(e),c.label=1;case 1:if((u=s()).done)return[3,6];o=u.value,c.label=2;case 2:return c.trys.push([2,4,,5]),[4,this.UZt(o,i,n)];case 3:return(h=c.sent())&&r.push(h),[3,5];case 4:return a=c.sent(),Ui.hm(a),[3,5];case 5:return[3,1];case 6:return[2,r]}})}).call(this)},i.FZt=function(i,n,r){return Vt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return e=YJ(i,"id")||"",(s=gU(YJ(i,"sequence")))||(s=0),u=ZJ(i,"InLine"),0===(o=ZJ(i,"Wrapper")).length?[3,2]:[4,this.VZt(o[0],e,s,n,r)];case 1:return[2,h.sent()];case 2:if(0!==u.length)return[2,t.HZt(u[0],e,s,r)];h.label=3;case 3:throw new pZ(kZ.PARSING,bZ.VAST_SCHEMA_VALIDATION_ERROR,"An Ad tag without a Wrapper or inline element cannot be parsed")}})}).call(this)},i.VZt=function(i,n,r,e,s){return Vt(function(){var u,o,h,a,c,f,v,d,l,w,g,_,m,y,p,k,b;return zt(this,function(A){switch(A.label){case 0:for(u=ZJ(i,"Error")[0],o="",u&&u.textContent&&(o=u.textContent,s.push(o)),h=ZJ(i,"AdSystem")[0],a="",h&&(a=h.textContent||a),c=[],f=Lt(ZJ(i,"Impression"));!(v=f()).done;)(d=v.value).textContent&&c.push(d.textContent);return l=ZJ(i,"VASTAdTagURI")[0],w="",l&&l.textContent&&(w=l.textContent),[4,this.MZt(w,e,!0,s)];case 1:return g=A.sent(),_=t.WZt(ZJ(i,"Extensions")[0]),m=ZJ(i,"Creatives")[0],y=[],m&&(y=t.zZt(m,a,_,s)),(p=mU(YJ(i,"followAdditionalWrappers")))||(p=!0),(k=mU(YJ(i,"allowMultipleAds")))||(k=!0),(b=mU(YJ(i,"fallbackOnNoAd")))||(b=!1),[2,new GJ(n,r,c,g,p,y,k,b,new yZ(o))]}})}).call(this)},i.UZt=function(i,n,r){return Vt(function(){var e,s,u,o,h,a,c,f,v,d,l,w,g,_,m,y,p;return zt(this,function(k){switch(k.label){case 0:if(e=YJ(i,"timeOffset")||"0",s=YJ(i,"breakType")||PZ.yk,u=YJ(i,"breakId"),o=mU(YJ(i,"repeatAfter")),h=void 0!==DZ.$Zt(e),void 0===u&&(u=""),void 0===o&&(o=!1),!h)throw new pZ(kZ.PARSING,bZ.VAST_SCHEMA_VALIDATION_ERROR,"Invalid TimeOffset type");if(a=ZJ(i,"AdSource")[0],c=ZJ(i,"TrackingEvents")[0],f=[],c&&(f=t.QZt(c,sZ,"vmap")),(v=YJ(a,"id"))||(v=""),void 0===(d=mU(YJ(a,"allowMultipleAds")))&&(d=!0),(l=mU(YJ(a,"followRedirects")))||(l=!0),w=ZJ(a,"AdTagURI")[0],g="",_=ZJ(a,"VASTAdData")[0],!w||!w.textContent)return[3,1];try{return g=w.textContent,(m=Lw(n)).sources.src=g,[2,new xZ(e,m,r)]}catch(t){return[2,void 0]}return[3,6];case 1:return _?_.firstElementChild&&JJ(_.firstElementChild,"VAST")?[4,this.NZt(_.firstElementChild,r,!1)]:[3,3]:[3,5];case 2:return(y=k.sent())?(p=new BZ(v,d,l,y),[2,new NZ(e,p,s,u,f,o,!1,n)]):[2,void 0];case 3:throw new pZ(kZ.PARSING,bZ.VAST_SCHEMA_VALIDATION_ERROR,"vmap:VASTAdData does not have a VAST-structure as a child element");case 4:return[3,6];case 5:throw new pZ(kZ.PARSING,bZ.VAST_SCHEMA_VALIDATION_ERROR,"Invalid AdTagURI source or invalid VASTAdData in Adbreak Element");case 6:return[2]}})}).call(this)},t.requestSuccessOnly=function(t,i){return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,i.vk(t)];case 1:return n=e.sent(),[3,3];case 2:throw r=e.sent(),new pZ(kZ.NETWORK,bZ.UNKNOWN_ERROR,"Something went wrong while requesting xml from server.",r);case 3:if(!gl(n))throw new pZ(kZ.NETWORK,bZ.UNKNOWN_ERROR,"Something went wrong while requesting xml from server.");return[2,n]}})})()},t.RZt=function(t,i){return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return n=new Al({Yu:t,fk:Ud.LT,Hk:ml.GET}),[4,this.requestSuccessOnly(n,i)];case 1:r=e.sent(),e.label=2;case 2:return e.trys.push([2,4,,5]),[4,r.lk()];case 3:return[2,iZ.apply(void 0,[e.sent()])];case 4:throw e.sent(),new pZ(kZ.NETWORK,bZ.VAST_MALFORMED_RESPONSE,"The ad source could not be loaded.");case 5:return[2]}})}).call(this)},t.HZt=function(i,n,r,e){var s,u=ZJ(i,"Error")[0];u&&u.textContent&&(s=u.textContent,e.push(s));var o,h=t.WZt(ZJ(i,"Extensions")[0]),a=ZJ(i,"AdSystem")[0],c="";a&&(c=a.textContent||c);var f=ZJ(i,"AdTitle")[0];f&&(o=f.textContent||void 0);for(var v,d=[],l=Lt(ZJ(i,"Impression"));!(v=l()).done;){var w=v.value;w.textContent&&d.push(w.textContent)}var g=t.qZt(ZJ(i,"Creatives")[0],c,h,e);return new FJ(n,r,c,o,d,g,new yZ(s))},t.zZt=function(i,n,r,e){for(var s,u=[],o=Lt(ZJ(i,"Creative"));!(s=o()).done;){var h=s.value,a=YJ(h,"id");a||(a="");var c=gU(YJ(h,"sequence"));c||(c=0);var f=YJ(h,"adId");f||(f="");var v=ZJ(h,"Linear")[0],d=void 0;v&&(d=t.GZt(v,"wrapper",a,n,r,e));var l=ZJ(h,"NonLinearAds")[0],w=void 0;if(l)try{w=t.XZt(l,a,n)}catch(t){}var g=ZJ(h,"CompanionAds")[0],_=void 0;g&&(_=t.jZt(g)),u.push(new jJ(a,f,c,"",d,w,_,[]))}return u},t.qZt=function(i,n,r,e){for(var s,u=[],o=Lt(ZJ(i,"Creative"));!(s=o()).done;){var h=s.value,a=YJ(h,"id");a||(a="");var c=gU(YJ(h,"sequence"));c||(c=0);var f=YJ(h,"adId");f||(f="");var v=YJ(h,"apiFramework");v||(v="");var d=ZJ(h,"Linear")[0],l=void 0;if(d)try{l=t.GZt(d,"inline",a,n,r,e)}catch(t){}if(0===(null==l?void 0:l.ct))throw new pZ(kZ.PARSING,bZ.VAST_UNEXPECTED_DURATION_ERROR,"The VAST response had a duration of 0 seconds, so skipping the ad(s).");var w=ZJ(h,"NonLinearAds")[0],g=void 0;if(w)try{g=t.XZt(w,a,n)}catch(t){}var _=ZJ(h,"CompanionAds")[0],m=void 0;_&&(m=t.jZt(_));var y=ZJ(h,"UniversalAdId"),p=t.parseUniversalAdIds(y);u.push(new jJ(a,f,c,v,l,g,m,p))}return u},t.WZt=function(t){var i=[];if(!t)return i;for(var n,r=Lt(ZJ(t,"Extension"));!(n=r()).done;){var e,s=n.value,u=null!=(e=YJ(s,"type"))?e:"",o=s.outerHTML;i.push({type:u,xml:o})}return i},t.GZt=function(i,n,r,e,s,u){var o=ZJ(i,"Duration")[0],h=0;if(o)h=DJ(o.textContent)||0;else if(!o&&"inline"===n)throw new pZ(kZ.PARSING,bZ.VAST_SCHEMA_VALIDATION_ERROR,"Missing duration element in inLine linear");var a=YJ(i,"skipoffset"),c=-1;if(a){var f=DJ(a);if(void 0===f&&a.indexOf("%")>-1){var v=b.abs(Number(a.replace(/(?![0-9])./g,"")))/100;S(v)||(f=h*v)}void 0!==f&&(c=f)}var d=ZJ(i,"MediaFiles")[0],l=[],w=[];if(d&&(l=function(t,i){for(var n,r=[],e=Lt(ZJ(t,"MediaFile"));!(n=e()).done;){var s=n.value,u=YJ(s,"delivery"),o=YJ(s,"type");if(o){if(i(o)){var h=gU(YJ(s,"width")),a=gU(YJ(s,"height"));h||(IZ(),h=0),a||(IZ(),a=0);var c={delivery:u,type:o,width:h,height:a,contentURL:""+s.textContent};r.push(c)}}else IZ()}return r}(d,SZ),w=function(t){var i=ZJ(t,"ClosedCaptionFiles");if(0===i.length)return[];for(var n,r=[],e=Lt(ZJ(i[0],"ClosedCaptionFile"));!(n=e()).done;){var s=n.value,u=YJ(s,"type");u||IZ();var o=YJ(s,"language");o||IZ();var h={type:null!=u?u:"",language:null!=o?o:"",contentURL:(""+s.textContent).trim()};r.push(h)}return r}(d)),"inline"===n&&(!d||0===l.length))throw EZ(mZ.pZt,u),new pZ(kZ.PARSING,bZ.VAST_LINEAR_ASSET_MISMATCH,"Missing MediaFiles in linear element");var g=ZJ(i,"TrackingEvents")[0],_=[];g&&(_=t.QZt(g,oZ,"linear"));var m=ZJ(i,"VideoClicks")[0],y=t.KZt(m);return new QJ(h,l,_,y,c,r,e,w,s)},t.KZt=function(i){if(!i)return new qJ("","",[],[]);var n,r=ZJ(i,"ClickThrough")[0],e="";r&&(n=r.textContent||void 0,e=YJ(r,"id")||"");var s=t.YZt(ZJ(i,"ClickTracking")),u=t.YZt(ZJ(i,"CustomClick"));return new qJ(n,e,s,u)},t.YZt=function(t){for(var i,n=[],r=Lt(t);!(i=r()).done;){var e=i.value,s=e.textContent;if(s){var u=YJ(e,"id")||"";n.push(new XJ(u,s))}}return n},t.QZt=function(t,i,n){for(var r,e=[],s=Lt(ZJ(t,"Tracking"));!(r=s()).done;){var u=r.value,o=YJ(u,"event");if(i(o)){var h="";"linear"===n&&(h=YJ(t,"offset")||"0");var a=u.textContent;a&&e.push(new dZ(o,h,a))}else IZ()}return e},t.XZt=function(i,n,r){for(var e,s=[],u=Lt(ZJ(i,"NonLinear"));!(e=u()).done;){var o=e.value,h=ZJ(o,"NonLinearClickThrough")[0],a=void 0;h&&(a=h.textContent||void 0);var c=t.YZt(ZJ(o,"NonLinearClickTracking")),f=ZJ(o,"StaticResource")[0],v=void 0;if(f&&f.parentNode){var d=YJ(f,"creativeType"),l=f.textContent||"",w=ZJ(f.parentNode,"NonLinearClickThrough")[0],g="";w&&(g=w.textContent||""),v=new wZ(l,d,g,"")}var _=t.JZt(o),m=t.parseHtmlResource(o);if(v||_||m){var y=new qJ(a,"",c,[]);s.push(new VJ(v,_,m,y,n,r))}else IZ()}if(0===s.length)throw new pZ(kZ.PARSING,bZ.VAST_SCHEMA_VALIDATION_ERROR,"nonLinearAds element found with no nonLinear elements");var p=ZJ(i,"TrackingEvents")[0],k=[];return p&&(k=t.QZt(p,aZ,"nonlinear")),new UJ(s,k)},t.parseUniversalAdIds=function(t){for(var i,n=[],r=Lt(t);!(i=r()).done;){var e,s,u,o=i.value,h=null!=(e=YJ(o,"idRegistry"))?e:"",a=null!=(u=null!=(s=YJ(o,"idValue"))?s:o.textContent)?u:"";n.push(new RZ(h,a))}return n},t.jZt=function(i){var n=YJ(i,"requiredType");(function(t){switch(t){case"all":case"any":case"none":return!0;default:return!1}})(n)||(n=HJ.pz);for(var r,e=[],s=Lt(ZJ(i,"Companion"));!(r=s()).done;){var u=r.value,o=gU(YJ(u,"width")),h=gU(YJ(u,"height")),a=YJ(u,"id"),c=gU(YJ(u,"assetWidth")),f=gU(YJ(u,"assetHeight")),v=gU(YJ(u,"expandedWidth")),d=gU(YJ(u,"rxpandedHeight")),l=YJ(u,"apiFramework"),w=YJ(u,"adSlotId"),g=gU(YJ(u,"pxratio")),_=ZJ(u,"AltText")[0],m=_?_.textContent:"";o||(IZ(),o=0),h||(IZ(),h=0),a||(a=""),c||(c=0),f||(f=0),v||(v=0),d||(d=0),l||(l=""),w||(w=""),g||(g=1),m||(m="");var y=t.ZZt(u),p=t.JZt(u),k=t.parseHtmlResource(u),b=ZJ(u,"TrackingEvents")[0],A=[];b&&(A=t.QZt(b,fZ,"companion"));var T=ZJ(u,"CompanionClickThrough")[0],S=void 0;T&&(S=T.textContent||void 0);var E=t.YZt(ZJ(u,"CompanionClickTracking"));(y||p||k)&&e.push(new zJ(o,h,a,c,f,v,d,l,w,g,y,p,k,new qJ(S,"",E,[]),A,m))}return new WJ(n,e)},t.ZZt=function(t){var i,n=ZJ(t,"StaticResource")[0];if(n&&n.parentNode){var r=YJ(n,"creativeType");r||(r="");var e,s=n.textContent,u=ZJ(n.parentNode,"AltText")[0],o=ZJ(n.parentNode,"CompanionClickThrough")[0],h="";u&&(h=u.textContent||""),o&&(e=o.textContent||void 0),s&&(i=new wZ(s,r,e,h))}return i},t.JZt=function(t){var i,n=ZJ(t,"IFrameResource")[0];if(n){var r=n.textContent||"";i=new gZ(r)}return i},t.parseHtmlResource=function(t){var i,n=ZJ(t,"HTMLResource")[0];if(n){var r=n.textContent||"";i=new _Z(r)}return i},t}(),PZ=function(t){return t.yk="",t.BZt="linear",t.t$t="nonlinear",t.i$t="display",t}({}),DZ=function(){function t(){}return t.e$t=function(t){switch(t){case"linear":case"nonlinear":case"display":return!0;default:return!1}},t.s$t=function(t){},t.n$t=function(t){if(void 0!==t)return"start"===t?0:"end"===t?-1:void 0},t.r$t=function(t){var i=t.split(":"),n=0;return n+=3600*Number(i[0]),n+=60*Number(i[1]),n+=Number(i[2])},t.h$t=function(t){if(t<=0)return"00:00:00.000";var i=b.floor(t),n=t-i;return this.o$t(i/3600,2)+":"+this.o$t(i/60%60,2)+":"+this.o$t(i%60,2)+"."+this.o$t(1e3*n,3)},t.o$t=function(t,i){return("00"+b.floor(t)).slice(-i)},t.a$t=function(t,i){var n=this.$Zt(t);if(0===n)switch(t){case"start":return 0;case"end":return-1}else{if(2===n)return NJ(t)*i;if(1===n)return DJ(t);if(3===n)return this.n$t(t);if(4===n){var r=Number(t);if(!S(r)&&r>=-1)return r}}},t.$Zt=function(t){return"start"===t||"end"===t?0:void 0!==DJ(t.toString())?1:void 0!==NJ(t.toString())?2:void 0!==this.s$t(t.toString())?3:S(Number(t))?void 0:4},t}(),NZ=function(){function t(t,i,n,r,e,s,u,o){this.l$t=void 0,this.XYt=void 0,this.f$t=void 0,this.EJt=-1,this.y$t=void 0,this._$t=void 0,this.p$t=void 0,this.b$t=void 0,this.c$t=void 0,this.w$t=void 0,this.l$t=i,this.f$t=t,this.y$t=n,this._$t=r,this.p$t=s,this.XYt=e,this.b$t=u,this.c$t=o}return t.prototype.Un=function(){return ut.resolve()},Nt(t,[{key:"u$t",get:function(){return this.c$t.integration}},{key:"d$t",get:function(){return this.l$t}},{key:"qOt",get:function(){return this.f$t}},{key:"kJt",get:function(){return this.EJt},set:function(t){this.EJt=t}},{key:"aYt",get:function(){return this.XYt}},{key:"v$t",get:function(){return this._$t}},{key:"g$t",get:function(){return this.p$t}},{key:"irt",get:function(){return this.c$t}},{key:"m$t",get:function(){return this.OZt.dd}},{key:"W",get:function(){return!0}},{key:"OZt",get:function(){return this.w$t},set:function(t){this.w$t=t}}]),t}(),xZ=function(){function t(t,i,n){this.mYt=void 0,this.A$t=void 0,this.dE=!1,this.aV=void 0,this.aV=n,this.mYt=new NZ(t,void 0,"","",[],!1,!1,i)}var i=t.prototype;return i.Un=function(){var t;return null!=(t=this.A$t)?t:this.A$t=this.vE()},i.vE=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return t=new CZ,i=this,[4,t.LZt(this.irt,this.qOt,this.OZt,this.aV)];case 1:return i.mYt=n.sent(),this.dE=!0,[2]}})}).call(this)},Nt(t,[{key:"u$t",get:function(){return this.mYt.u$t}},{key:"d$t",get:function(){return this.mYt.d$t}},{key:"qOt",get:function(){return this.mYt.qOt}},{key:"kJt",get:function(){return this.mYt.kJt},set:function(t){this.mYt.kJt=t}},{key:"aYt",get:function(){return this.mYt.aYt}},{key:"v$t",get:function(){return this.mYt.v$t}},{key:"g$t",get:function(){return this.mYt.g$t}},{key:"irt",get:function(){return this.mYt.irt}},{key:"m$t",get:function(){return this.mYt.m$t}},{key:"W",get:function(){return this.dE}},{key:"OZt",get:function(){return this.mYt.OZt},set:function(t){this.mYt.OZt=t}}]),t}(),BZ=function(){function t(t,i,n,r){this.aS=void 0,this.S$t=void 0,this.k$t=void 0,this.E$t=void 0,this.aS=t,this.S$t=i,this.E$t=r,this.k$t=n}return Nt(t,[{key:"o",get:function(){return this.aS}},{key:"oJt",get:function(){return this.S$t}},{key:"T$t",get:function(){return this.k$t}},{key:"UKt",get:function(){return this.E$t}}]),t}();function OZ(t,i){var n;if(t.vastAdsRequest&&(n=function(t){if(t.adTagUrl)return t.adTagUrl;if(t.adsResponse)return rZ(t.adsResponse);return}(t.vastAdsRequest)),!n){var r=function(t){var i=t.contentUrl||t.contentId;if(!i)return;var n=t.contentType||"video/mp4",r=qA(n)||GA(n)?"streaming":"progressive",e=void 0!==t.duration?""+DZ.h$t(t.duration)+"":"",s=void 0!==t.whenSkippable&&t.whenSkippable>=0?' skipoffset="'+DZ.h$t(t.whenSkippable)+'"':"",u=''+nZ(i)+"",o=t.clickThroughUrl?""+nZ(t.clickThroughUrl)+"":"",h=""+e+""+u+""+o+"",a=t.title?""+nZ(t.title)+"":"";return''+a+""+h+""}(t);r&&(n=rZ(r))}var e=t.customData;if(n){var s={integration:null==e?void 0:e.integration,sources:{src:n,type:"vast"},timeOffset:i};return s.integration&&"csai"!==s.integration&&"theo"!==s.integration||(s.skipOffset=t.whenSkippable),s}}var MZ=function(t){return t.x$t="error",t.P$t="sourceupdate",t}({}),LZ=function(t){function i(i){var n;return(n=t.call(this,"error")||this).lt=void 0,n.lt=i,n}return Ct(i,t),i}(rh),FZ=function(t){function i(i,n){var r;return(r=t.call(this,"sourceupdate")||this).bt=void 0,r.Mc=void 0,r.bt=i,r.Mc=n,r}return Ct(i,t),i}(rh),UZ=function(t){function i(i,n,r){var e;return(e=t.call(this,n)||this).gBt=void 0,e.R$t=void 0,e.I$t=void 0,e.X$t=0,e.V$t=function(t){e.So(new LZ(t))},e.U$t=function(t){var i,n=new gJ(TJ(t.code),null!=(i=t.description)?i:void 0);e.V$t(n)},e.gBt=i,e.R$t=n,e.I$t=r,e}Ct(i,t);var n=i.prototype;return n.C$t=function(t){this.R$t.C$t(t)},n.D$t=function(t){this.R$t.D$t(t)},n.N$t=function(t){this.R$t.N$t(t)},n.B$t=function(t){this.R$t.B$t(t)},n.M$t=function(t){this.I$t.addUpdateListener(t)},n.L$t=function(t){this.I$t.removeUpdateListener(t)},n.O$t=function(){var t=this,i=new Va,n=new chrome.cast.media.GetStatusRequest;return this.I$t.getStatus(n,function(){i.Qy({bt:t.qx(),Mc:t.nu()})},function(t){return i.Ky(t)}),i.Yy},n.qx=function(){var t;return null==(t=this.I$t.customData)?void 0:t.currentSource},n.nu=function(){var t,i;if(null==(t=this.gBt.F$t())?void 0:t.version){var n;i=null==(n=this.I$t.customData)?void 0:n.sourceDescription}else{var r,e=null==(r=SJ(this.I$t))?void 0:r.customData;(function(t){return Wi(t)&&t.theoplayer_version>=1&&Li(t.streamStart)&&Li(t.isLive)&&Li(t.sourceDescription)})(e)&&(i=e.sourceDescription),i||(i=function(t){return{sources:[{src:t.contentId,type:t.contentType}],ads:VZ(t)}}(this.I$t.media))}return i},n.jP=function(){var t=new chrome.cast.media.PauseRequest;this.I$t.pause(t,dn,this.U$t)},n.KP=function(){var t=new chrome.cast.media.StopRequest;this.I$t.stop(t,dn,this.U$t)},n.QP=function(){var t=new chrome.cast.media.PlayRequest;this.I$t.play(t,dn,this.U$t)},n.Oy=function(t,i){var n=this,r=new chrome.cast.media.SeekRequest;return r.currentTime=t===1/0?Number.MAX_VALUE:t,r.resumeState=i?chrome.cast.media.ResumeState.PLAYBACK_PAUSE:chrome.cast.media.ResumeState.PLAYBACK_START,new ut(function(t,i){n.I$t.seek(r,t,function(t){var n;i(new gJ(TJ(t.code),null!=(n=t.description)?n:void 0))})})},n.gP=function(t){this.R$t.Bet(EJ,function(t){return{type:IJ.FKt,properties:{playbackRate:t}}}(t)).catch(this.V$t)},n.H$t=function(t){var i=new chrome.cast.media.EditTracksInfoRequest(t);this.I$t.editTracksInfo(i,dn,this.U$t)},n.W$t=function(){return this.I$t.getEstimatedTime()},n.q$t=function(){return this.I$t.getEstimatedBreakClipTime()},n.z$t=function(){return this.I$t.getEstimatedBreakTime()},n.G$t=function(){this.R$t.Bet("urn:x-cast:com.google.cast.media",{type:RJ.SKIP_AD,requestId:this.X$t++,mediaSessionId:this.I$t.mediaSessionId}).catch(this.V$t)},n.kn=function(){this.Vo()},Nt(i,[{key:"$D",get:function(){return this.I$t}}]),i}(th);function VZ(t){return t.vmapAdsRequest&&t.vmapAdsRequest.adTagUrl?[{sources:{src:t.vmapAdsRequest.adTagUrl,type:"vmap"}}]:t.breaks&&t.breakClips?Jn(t.breaks,function(i){return function(t,i){var n=function(){var n=e.value,s=Fn(i,function(t){return t.id===n});if(s){var u=OZ(s,t.position);u&&r.push(u)}},r=[];if(t.isWatched)return r;for(var e,s=Lt(t.breakClipIds);!(e=s()).done;)n();return r}(i,t.breakClips)}):[]}U(),Et();var HZ=function(){function t(t){this.gBt=void 0,this.gBt=t}var i=t.prototype;return i.j$t=function(t,i){this.gBt.addMessageListener(t,i)},i.Q$t=function(t,i){this.gBt.removeMessageListener(t,i)},i.Bet=function(t,i){var n=this;return new ut(function(r,e){n.gBt.sendMessage(t,i,r,function(t){var i;e(new gJ(TJ(t.code),null!=(i=t.description)?i:void 0))})})},i.kn=function(){},t}();function WZ(t){return"vmap"===t||"adrule"===t}function zZ(t){if(t)return Xi(t)&&""!==t?{src:Gw(t),type:void 0}:function(t){return Wi(t)&&Boolean(t.src)}(t)&&""!==t.src?{src:Gw(t.src),type:XZ(t.type)}:void 0}function XZ(t){if(Xi(t)){var i=t.toLowerCase();switch(i){case"vast":case"vmap":case"adrule":return i;default:return void We("The ad source type provided in the configuration could not be recognized: '"+t+"'.")}}else t||We("For better performance it is highly recommended to add the type to the configuration of your ad sources.")}function qZ(t){if(void 0!==t&&""!==t&&("string"==typeof t||"number"==typeof t)){switch(t){case"start":case"00:00:00":case"00:00:00.000":case"0%":case"0":return 0;case"end":case"100%":return-1}if("string"==typeof t){if(function(t){return PJ.test(t)}(t))return DZ.r$t(t);if(GZ(t))return t}return Number(t)>=0?Number(t):void 0}}function GZ(t){return new RegExp(/^\d{1,2}%$/).test(t)}function jZ(t){for(var i,n=[],r=function(t,i){if(Vi(i))for(var e=0,s=i.length;e-1&&n.push(e)}var s=n.length?n:void 0;this.U0t(s)}},n.U0t=function(t){(function(t,i){return!t&&i||t&&!i||t&&i&&!Kn(t,i)})(this.flt,t)&&(this.flt=t&&this._O.pO(t)?t:void 0,this.So(new eL(this.flt,this)))},n.unload=function(){for(var t,i=Lt(this._O.NI);!(t=i()).done;){t.value.mn("update",this.ILt)}this._O.hr()},Nt(i,[{key:"YI",get:function(){return this._lt}},{key:"tC",get:function(){return this.flt},set:function(t){this.U0t(t),this.So(new m$(this,t))}},{key:"$I",get:function(){return this._O}},{key:"Th",get:function(){return this.bO},set:function(t){t!==this.bO&&(this.bO=t,this.So(new _g(this)))}},{key:"Rt",get:function(){return this.We},set:function(t){this.We!==t&&(this.We=t,this.V0t!==t&&this.So(new _$(this.JI,t)),this.So(new wg(this)))}},{key:"H0t",get:function(){return this.V0t},set:function(t){var i=this.We!==t;this.We=t,this.V0t=t,i&&this.So(new wg(this))}},{key:"Ca",get:function(){return this.hu||(this.hu=tg(this)),this.hu}},{key:"Qk",get:function(){return this.Rt?"enabled":"disabled"}}]),i}(th);U(),Et();var k$=function(t){return t.W0t="legacy",t.q0t="caf",t}({});U(),Et(),xt(),Pt(),Ft(),U(),Et(),xt(),Pt(),H(),Ft(),U(),Et(),U(),Et();var b$=function(){function t(t){this.qc=void 0,this.z0t=0,this.qc=t}var i=t.prototype;return i.Rc=function(){if(!(this.z0t>=this.qc.length)){var t=this.qc[this.z0t];return this.z0t+=1,t}},i.lt=function(){return this.Rc()},t}();function A$(t){var i,n,r;return null!=(r=null==(n=t.d$t)||null==(i=n.UKt)?void 0:i.VKt())?r:[]}var T$=function(){},S$=function(){function t(){this.hu=void 0}return t.prototype.Ont=function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get ads(){return t.Jc.map(function(t){return t.Ont()})},get integration(){return t.u$t},get maxDuration(){return t.G0t},get maxRemainingDuration(){return t.X0t},get timeOffset(){return t.qOt},get customData(){return t.y0t}}}(this)},t}(),E$=function(){function t(t,i){this.Q0t=void 0,this.oa=void 0,this.Q0t=t,this.oa=i}return Nt(t,[{key:"j0t",get:function(){return this.Q0t}},{key:"t",get:function(){return this.oa}}]),t}(),I$=function(t){function i(i,n){var r;return(r=t.call(this)||this).w$t=void 0,r.$0t=void 0,r.Z0t=[],r.t1t=[],r.w$t=i,r.$0t=n,r}Ct(i,t);var n=i.prototype;return n.Y0t=function(t,i,n,r){var e=Fn(this.Z0t,function(i){return i.iYt===t});if(void 0!==e)return e;var s=new D$(t,i,this,this.$0t,n,r);return this.Z0t.push(s),s},n.J0t=function(t,i,n,r,e){var s=Fn(this.t1t,function(i){return i.nYt===t});if(void 0!==s)return s;var u=new P$(t,i,n,this,this.$0t,r,e);return this.t1t.push(u),u},Nt(i,[{key:"OZt",get:function(){return this.w$t}},{key:"Jc",get:function(){for(var t,i=[],n=Lt(this.w$t.K0t);!(t=n()).done;)for(var r,e=t.value,s=Lt(A$(e));!(r=s()).done;){var u,o,h=r.value,a=null!=(o=null==(u=h.sYt)?void 0:u.PYt)?o:[];if(h.iYt&&i.push(this.Y0t(h.iYt,a,h.rYt,e.irt)),h.nYt)for(var c,f=Lt(h.nYt.hYt);!(c=f()).done;){var v=c.value;i.push(this.J0t(v,a,h.nYt,h.rYt,e.irt))}}return i}},{key:"u$t",get:function(){return pS.CSAI}},{key:"qOt",get:function(){var t=this.w$t.dd;return t>=0?t:this.$0t.t.Nd()}},{key:"X0t",get:function(){for(var t,i=0,n=Lt(this.w$t.K0t);!(t=n()).done;)for(var r,e=Lt(A$(t.value));!(r=e()).done;){var s=r.value;s.iYt&&!s.iYt.xJt&&(i+=s.iYt.ct)}return this.$0t&&this.$0t.j0t&&(i+=this.$0t.j0t.ct-this.$0t.j0t.zx),i}},{key:"G0t",get:function(){for(var t,i=0,n=Lt(this.w$t.K0t);!(t=n()).done;)for(var r,e=Lt(A$(t.value));!(r=e()).done;){var s=r.value;s.iYt&&(i+=s.iYt.ct)}return i}},{key:"y0t",get:function(){}}]),i}(S$),R$={height:0,width:0,clickThrough:"",contentHTML:"",resourceURI:"",altText:""},C$=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this)||this).u1t=void 0,o.IYt=void 0,o.mYt=void 0,o.$0t=void 0,o.yJt=void 0,o.c$t=void 0,o.e1t=!1,o.u1t=i,o.IYt=n,o.mYt=r,o.$0t=e,o.yJt=s,o.c$t=u,o}Ct(i,t);var n=i.prototype;return n.i1t=function(){return this.e1t},n.s1t=function(){this.e1t=!0},n.n1t=function(t){return Yu({},R$,{resourceURI:t.cZt||""})},n.r1t=function(t){return Yu({},R$,{contentHTML:t.cZt.trim(),type:"HTMLResource"})},n.h1t=function(t){var i,n;return Yu({},R$,{clickThrough:(null==(i=t.KYt)?void 0:i.trim())||"",resourceURI:(null==(n=t.cZt)?void 0:n.trim())||"",altText:t.jYt||"",type:"StaticResource"})},n.o1t=function(t,i,n){if(t&&i){var r="";return""+r+""}},n.sYt=function(t){var i=this;return t?t.map(function(t){var n,r={adSlotId:t.VYt||"",height:t.Mi||0,width:t.Ti||0};if(t.cYt){var e,s=i.h1t(t.cYt),u=s.clickThrough||(null==(e=t.zYt)?void 0:e.KYt);n=Yu({},s,{contentHTML:i.o1t(s.resourceURI,u,s.altText)||""})}else if(t.vYt)n=i.r1t(t.vYt);else{if(!t.lYt)return;n=i.n1t(t.lYt)}return Mw(n,r)}).filter(function(t){return void 0!==t}):[]},n.a1t=function(){return this.u1t.QKt},Nt(i,[{key:"od",get:function(){return this.mYt}},{key:"irt",get:function(){return this.c$t}},{key:"rYt",get:function(){return this.yJt}}]),i}(T$),P$=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,i,n,e,s,u,o)||this).c1t=void 0,h.hu=void 0,h.c1t=r,h}Ct(i,t);var n=i.prototype;return n.xa=function(){var t=this.mYt,i={companions:this.sYt(this.IYt),type:"nonlinear",id:this.u1t.wYt,skipOffset:this.kJt,integration:this.c$t.integration,adSystem:this.u1t.QKt,get adBreak(){return t.Ont()},creativeId:this.u1t.wYt,universalAdIds:this.yJt.map(function(t){return{adIdRegistry:t.EZt,adIdValue:t.PZt}})};return this.u1t.lYt?Mw(this.n1t(this.u1t.lYt),i):this.u1t.vYt?Mw(this.r1t(this.u1t.vYt),i):this.u1t.cYt?Mw(this.h1t(this.u1t.cYt),i):i},n.Ont=function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()},n.d1t=function(){var t,i;return null!=(i=null==(t=this.u1t.cYt)?void 0:t.cZt)?i:""},n.l1t=function(){var t,i,n;return null!=(n=null==(i=this.u1t)||null==(t=i.cYt)?void 0:t.lZt)?n:""},Nt(i,[{key:"nYt",get:function(){return this.u1t}},{key:"eYt",get:function(){return this.c1t}},{key:"kJt",get:function(){var t,i=this.u1t.od;return i&&i.irt&&void 0!==i.irt.skipOffset?DZ.a$t(i.irt.skipOffset,this.$0t.j0t.ct):(null==(t=this.u1t.od)?void 0:t.kJt)||-1}}]),i}(C$),D$=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,r,e,s,u)||this).hu=void 0,o}Ct(i,t);var n=i.prototype;return n.xa=function(){var t,i=this.mYt,n=this.u1t;return{companions:this.sYt(this.IYt),duration:n.ct,id:n.wYt,mediaFiles:n.AJt,get mediaUrl(){return n.PJt},skipOffset:this.kJt,type:"linear",integration:this.c$t.integration,adSystem:n.QKt,width:void 0,height:void 0,get adBreak(){return i.Ont()},clickThrough:null==(t=n.lJt)?void 0:t.KYt,creativeId:n.wYt,universalAdIds:this.yJt.map(function(t){return{adIdRegistry:t.EZt,adIdValue:t.PZt}}),closedCaptionFiles:n.CJt,extensions:n.DJt}},n.Ont=function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()},n.d1t=function(){return this.u1t.AJt.length>0?this.u1t.AJt[0].contentURL:""},n.l1t=function(){return this.u1t.AJt.length>0?this.u1t.AJt[0].type:""},Nt(i,[{key:"iYt",get:function(){return this.u1t}},{key:"kJt",get:function(){var t=this.u1t.od;return t&&t.irt&&void 0!==t.irt.skipOffset?DZ.a$t(t.irt.skipOffset,this.$0t.j0t.ct):this.u1t.kJt||-1}}]),i}(C$);function N$(t){return V(t,D$)}U(),Et();var x$=function(t){return t.f1t="csai",t.v1t="google-ima",t.so="google-dai",t._1t="freewheel",t.g1t="mediatailor",t.Iv="chromecast",t.knt="theoads",t}({});U(),Et(),Pt();var B$=function(t){function i(i){return t.call(this,"p1t",i)||this}return Ct(i,t),i.prototype.xa=function(){return new O$(this.jnt.Ont())},i}(VB),O$=function(t){function i(i){return t.call(this,"updatead",i)||this}return Ct(i,t),i}(HB);U(),Et(),Pt();var M$=function(t){function i(i){return t.call(this,"m1t",i)||this}return Ct(i,t),i.prototype.xa=function(){return new L$(this.jnt.Ont())},i}(VB),L$=function(t){function i(i){return t.call(this,"adloaded",i)||this}return Ct(i,t),i}(HB),F$=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).oa=void 0,e.I$t=void 0,e.A1t=void 0,e.y1t=[],e.w1t=void 0,e.u1t=void 0,e.hu=void 0,e.eh=function(t){var i;if(t){var n=e.I$t.$D,r=n.breakStatus,s=n.media,u=s.breakClips,o=s.breaks,h=null==(i=SJ(n))?void 0:i.media,a=[];o&&u&&e.T1t(o,u,h,a),e.P1t(r,a);for(var c,f=Lt(a);!(c=f()).done;){var v=c.value;e.So(v)}}},e.oa=i,e.I$t=n,e.A1t=r,e.I$t.M$t(e.eh),e}Ct(i,t);var n=i.prototype;return n.W6=function(t,i,n){throw new p("Scheduling ads while casting is not supported.")},n.uD=function(){this.I$t.G$t()},n.znt=function(t){var i;null==(i=this.A1t)||i.znt(t)},n.Wnt=function(t,i){var n;null==(n=this.A1t)||n.Wnt(t,i)},n.S1t=function(t){return Fn(this.y1t,function(i){return i.o===t})},n.T1t=function(t,i,n,r){for(var e,s=this.y1t,u=[],o=!1,h=Lt(t);!(e=h()).done;){var a=e.value,c=this.S1t(a.id);void 0===c&&(c=new U$(a),r.push(new FB(c))),!Li(c.k1t)&&Li(n)&&(c.k1t=this.E1t(c.x1t,n));var f=c.Jc;c.er(a,i,n,r);for(var v,d=Lt(c.Jc);!(v=d()).done;){var l=v.value;jn(f,l)||(r.push(new WB(l)),o=!0)}u.push(c)}this.y1t=u,o&&r.push(new ZB);for(var w,g=Lt(s);!(w=g()).done;){var _=w.value;jn(u,_)||r.push(new MB(_))}},n.P1t=function(t,i){var n,r,e=this.w1t,s=this.u1t;if(t){var u,o=t.breakId,h=t.breakClipId;n=o?this.S1t(o):void 0,r=h?null==(u=this.w1t)?void 0:u.I1t(h):void 0}if(this.w1t=n,this.u1t=r,n!==e&&(void 0!==e&&(e.C1t=void 0,i.push(new XB(e))),void 0!==n&&(n.C1t=this.I$t,i.push(new GB(n)))),r!==s){var a=this.oa.Gx();void 0!==s&&i.push(new KB(s,a)),void 0!==r&&i.push(new QB(r,a))}},n.E1t=function(t,i){if(i&&i.breaks){var n=Fn(i.breaks,function(i){return i.id===t.id});return n}},n.qnt=function(t){for(var i,n=[],r=Lt(this.y1t);!(i=r()).done;){var e=i.value,s=e.Jc;if(e===this.w1t&&void 0!==this.u1t){var u=s.indexOf(this.u1t);u>=0&&(s=s.slice(u))}else if(e.b1t())continue;for(var o,h=Lt(s);!(o=h()).done;){var a=o.value.R1t();a&&n.push(a)}}for(var c,f=Lt(n);!(c=f()).done;){var v=c.value;t.W6(v,DB.Bnt,!1)}},n.kn=function(){return this.Vo(),this.I$t.L$t(this.eh),void 0!==this.w1t&&(this.w1t.C1t=void 0,this.w1t=void 0),this.u1t=void 0,Yn(this.y1t),ut.resolve(void 0)},n.Hnt=function(t){},Nt(i,[{key:"zc",get:function(){return void 0!==this.w1t}},{key:"Lnt",get:function(){return this.u1t?[this.u1t]:[]}},{key:"Fnt",get:function(){var t;return null!=(t=this.w1t)?t:null}},{key:"Unt",get:function(){var t=this;return Jn(this.y1t,function(i){var n=i.Jc;if(i===t.w1t&&void 0!==t.u1t){var r=n.indexOf(t.u1t);if(r>=0)return n.slice(r+1)}return i.b1t()?[]:n})}},{key:"Vnt",get:function(){var t=this;return this.y1t.filter(function(i){return i===t.w1t||!i.b1t()})}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=NB(this)}}]),i}(nh),U$=function(t){function i(i){var n;return(n=t.call(this)||this).D1t=void 0,n.k1t=void 0,n.qc=[],n.C1t=void 0,n.D1t=i,n}Ct(i,t);var n=i.prototype;return n.b1t=function(){return this.D1t.isWatched},n.I1t=function(t){return Fn(this.qc,function(i){return i.o===t})},n.er=function(t,i,n,r){for(var e,s=function(s){var o=t.breakClipIds[s],h=Fn(i,function(t){return t.id===o});if(void 0===h)return"continue";var a=s0&&(t=Dn(this.qc,function(t){return t.ct}),S(t)&&(t=void 0)),t}},{key:"X0t",get:function(){var t=this.G0t;if(void 0!==t&&void 0!==this.C1t){var i=this.C1t.z$t();if(void 0!==i)return b.max(0,t-i)}return t}},{key:"qOt",get:function(){return this.D1t.position}},{key:"y0t",get:function(){}}]),i}(S$),V$=function(){function t(t,i){this.L1t=void 0,this.N1t=void 0,this.od=void 0,this.hu=void 0,this.L1t=t,this.od=i}var i=t.prototype;return i.a1t=function(){return""},i.l1t=function(){var t;return null!=(t=this.L1t.contentType)?t:""},i.d1t=function(){var t,i;return null!=(i=null!=(t=this.L1t.contentUrl)?t:this.L1t.contentId)?i:""},i.er=function(t,i){var n=this.o,r=this.ct,e=this.L1t.contentUrl;this.L1t=t;var s=this.o,u=this.ct,o=this.L1t.contentUrl;n===s&&(r===u||S(r)&&S(u))&&e===o||i.push(new B$(this)),S(r)&&!S(u)&&i.push(new M$(this))},i.R1t=function(){var t;return this.N1t&&(t=OZ(this.N1t,this.od.qOt)),t||(t=OZ(this.L1t,this.od.qOt)),t},i.Ont=function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()},i.xa=function(){var t=this;return{get extensions(){return[]},get companions(){return t.PYt},get duration(){return t.ct},get id(){return t.o},get mediaFiles(){return t.AJt},get mediaUrl(){return t.PJt},get closedCaptionFiles(){return[]},get skipOffset(){return t.kJt},type:"linear",integration:x$.Iv,get adSystem(){return t.a1t()},width:void 0,height:void 0,get adBreak(){return t.od.Ont()},get resourceURI(){return t.d1t()},get clickThrough(){return t.KYt},get creativeId(){return t.wYt},get customData(){return t.y0t},get isSlate(){return!1},get universalAdIds(){return t.rYt.map(function(t){return{adIdRegistry:t.EZt,adIdValue:t.PZt}})}}},Nt(t,[{key:"M1t",get:function(){return this.L1t}},{key:"o",get:function(){return this.L1t.id}},{key:"PYt",get:function(){return[]}},{key:"ct",get:function(){var t;return null!=(t=this.L1t.duration)?t:NaN}},{key:"AJt",get:function(){var t=this.d1t();return t?[{contentURL:t,delivery:"progressive",type:this.l1t(),width:0,height:0}]:[]}},{key:"PJt",get:function(){return this.d1t()}},{key:"kJt",get:function(){var t=this.L1t.whenSkippable;return void 0===t?void 0:t<0?-1:t}},{key:"KYt",get:function(){return this.L1t.clickThroughUrl}},{key:"wYt",get:function(){}},{key:"rYt",get:function(){return[]}},{key:"y0t",get:function(){}}]),t}();U(),Et(),xt(),Pt();var H$=function(t){function i(i,n){var r;return void 0===n&&(n=Ui.Zs.Ke),(r=t.call(this)||this).wE=void 0,r.Ls=void 0,r.U1t=void 0,r.F1t=void 0,r.We=!1,r.V1t=function(t){t.stopPropagation(),r.So(new rh("clickstart"))},r.H1t=function(t){t.stopPropagation(),r.So(new rh("click"))},r.wE=i,r.U1t=n,r.Ls=v.createElement("a"),r.Ls.style.position="absolute",r.Ls.style.zIndex="11",r.Ls.target="Xu",r.U1t?(mx(r.Ls,"learn more"),r.Ls.className="theoplayer-ad-overlay-component theoplayer-ad-touch-clickthrough",r.Ls.setAttribute("rel","noopener")):an(r.Ls),r.wE.appendChild(r.Ls),r.ZU(),r}Ct(i,t);var n=i.prototype;return n.JU=function(){if(!this.We){this.We=!0,this.Ls.style.display="",this.U1t||(this.wE.style.cursor="pointer");var t=this.U1t?this.Ls:this.wE;Ui.Zs.Ke?(t.addEventListener("touchstart",this.V1t),t.addEventListener("touchend",this.H1t)):(t.addEventListener("mousedown",this.V1t),t.addEventListener("click",this.H1t))}},n.ZU=function(){if(this.We){this.We=!1,this.Ls.style.display="none",this.U1t||(this.wE.style.cursor="");var t=this.U1t?this.Ls:this.wE;Ui.Zs.Ke?(t.removeEventListener("touchstart",this.V1t),t.removeEventListener("touchend",this.H1t)):(t.removeEventListener("mousedown",this.V1t),t.removeEventListener("click",this.H1t))}},n.zg=function(){this.Vo(),this.ZU(),this.wE.removeChild(this.Ls)},Nt(i,[{key:"O1t",get:function(){return this.F1t},set:function(t){this.F1t!==t&&(this.F1t=t,this.Ls.href=null!=t?t:"",t?this.JU():this.ZU())}}]),i}(th);U(),Et(),xt(),Pt(),U(),Et(),Ft();var W$=[1200,992,768,576],z$={1200:"theo-size-xl",992:"theo-size-l",768:"theo-size-m",576:"theo-size-s"},X$=function(){function t(t,i){var n=this;this.Ls=void 0,this.sc=void 0,this.q1t=void 0,this.bn=void 0,this.Ls=t,this.sc=i,this.bn=function(t){n.W1t(t.width)},this.q1t=q$(i.Eu),sn(this.Ls,this.q1t),i.wn(fI.yn,this.bn)}var i=t.prototype;return i.W1t=function(t){var i=q$(t);i!==this.q1t&&(sn(this.Ls,i),function(t,i){if(void 0!==t.classList)t.classList.remove(i);else if(void 0!==t.className){for(var n=" "+rn(t)+" ",r=" "+i+" ";-1!==n.indexOf(r);)n=n.replace(r," ");en(t,n.trim())}}(this.Ls,this.q1t),this.q1t=i)},i.kn=function(){this.sc.mn(fI.yn,this.bn)},t}();function q$(t){for(var i,n=Lt(W$);!(i=n()).done;){var r=i.value;if(t>r)return z$[r]}return"theo-size-xs"}var G$=function(t){function i(i,n){var r;return(r=t.call(this)||this).Ls=void 0,r.K1t=void 0,r.ud=void 0,r.tc=void 0,r.Yo=void 0,r.Q1t=function(){r.So(new rh("uD"))},r.Ls=v.createElement("div"),r.xe.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",r.xe.style.position="absolute",r.ud=v.createElement("span"),r.xe.appendChild(r.ud),n&&(r.K1t=v.createElement("div"),r.K1t.className="theoplayer-ad-skip-poster",r.K1t.style.backgroundImage='url("'+jo(n)+'")',r.xe.appendChild(r.K1t)),r.Yo="countdown",r.tc=new X$(r.xe,i),r}Ct(i,t);var n=i.prototype;return n.z1t=function(t){"countdown"!==this.Yo&&(this.Yo="countdown",this.G1t(),this.xe.classList.remove("theoplayer-ad-skip-button"),this.xe.classList.add("theoplayer-ad-skip-countdown")),this.HT="You can skip in "+b.round(t)+" seconds"},n.X1t=function(){"skip"!==this.Yo&&(this.Yo="skip",this.HT="Skip Ad",this.j1t(),this.xe.classList.remove("theoplayer-ad-skip-countdown"),this.xe.classList.add("theoplayer-ad-skip-button"))},n.j1t=function(){this.xe.addEventListener("mouseup",this.Q1t),this.xe.addEventListener("touchend",this.Q1t)},n.G1t=function(){this.xe.removeEventListener("mouseup",this.Q1t),this.xe.removeEventListener("touchend",this.Q1t)},n.kn=function(){this.Vo(),this.G1t(),this.tc.kn(),Zi(this.Ls),Zi(this.ud),this.K1t&&Zi(this.K1t)},Nt(i,[{key:"xe",get:function(){return this.Ls}},{key:"Qk",get:function(){return this.Yo}},{key:"HT",get:function(){return this.ud.textContent||""},set:function(t){mx(this.ud,t)}}]),i}(th),j$=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).oa=void 0,u.gBt=void 0,u.I$t=void 0,u.rPt=EA.rL(),u.p2t=void 0,u.Zb=void 0,u.h5=!1,u.nq=void 0,u.Cz=void 0,u.Rz=void 0,u.u2t=void 0,u.o5=Dy.zL,u.y2t=!1,u.Ho=EA.rL(),u.H4=void 0,u.Pz=!1,u.x0t=void 0,u.I0t=void 0,u.C0t=void 0,u.tO=new rg,u.sO=new rg,u.Gl=new Km,u.qc=void 0,u.A2t=void 0,u.T2t=void 0,u.x2t=void 0,u.nxt=NaN,u.g2t=void 0,u.a2t=!1,u._2t=NaN,u.f2t=void 0,u.e2t=0,u.I2t=function(t,i){switch(t){case"buffered":u.rPt=new EA(i),u.So(new YR(u.Gx()));break;case"currentProgramDateTime":u.p2t=new Date(i).getTime()-u.Gx();break;case"played":u.Ho=new EA(i);break;case"seekable":u.r2t();break;case"videoHeight":u.l2t(void 0,i);break;case"videoWidth":u.l2t(i,void 0)}},u.u4=function(t){switch(t.type){case eh.$w:u.Je(t.currentTime);break;case eh.Zw:u.Mq();break;case eh.Yw:u.So(new kL(t.representation,t.previousRepresentation));break;case eh.ey:u.So(new QM(t.segmentStartTime,t.error,t.trackType,t.track,t.quality,t.retryCount));break;case eh.Dw:u.So(new gH(t.currentTime,t.initDataType,t.initData));break;case eh.Ew:u.So(new eN(new ug(vd.CONTENT_PROTECTION_ERROR,t.error,void 0,t.licenseAcquisitionURL,t.status,t.statusText,t.licenseAcquisitionMessage,t.systemCode)));break;case eh.xw:u.So(new sN)}},u.g0t=function(t){u.r2t(),u.o2t(),u.hh(),u.c2t(),u.v2t(),u.n2t(),u.Z1t(),u.Y1t(),u.b2t(),u.S2t(),u.E2t(),t||Q$(u.I$t.$D)&&u.Eh()},u.bd=function(){u.v2t(),u.E2t()},u.C2t=function(t){u.So(t)},u.m2t=gn(function(t){return u.E9(t)},50),u.V$t=function(t){u.g2t=void 0,u.So(new LZ(t))},u.k2t=function(){u.jP()},u.P2t=function(){u.qc.uD()},u.oa=i,u.gBt=r,u.I$t=e,u.qc=new F$(i,e,n.Jc),u.x0t=s.R0t(),u.Zb=s.Nd()-u.x0t,u.Cz=s.fP(),u.Rz=s._P(),u.I0t=s.LP(),u.C0t=s.NP(),u.I$t.N$t(u.u4),u.I$t.C$t(u.I2t),u.I$t.M$t(u.g0t),u.I$t.wn(MZ.x$t,u.C2t),u.I$t.O$t().then(function(t){u.So(new FZ(t.bt,t.Mc))},u.V$t),u}Ct(i,t);var n=i.prototype;return n.Y1t=function(){var t=this.I$t.$D.activeTrackIds;if(t){if(this.J1t()){var i=this.sO.NI.map(function(t){return t.o}),n=this.tO.NI.map(function(t){return t.o});jn(i.concat(n),"0")&&t.push(0)}Z$(t,this.tO),Z$(t,this.sO),function(t,i){for(var n,r=!1,e=Lt(i.NI);!(n=e()).done;){var s=n.value;s.O0t=jn(t,s.JI)?zm.Kn:zm.Nh}}(t,this.Gl)}},n.Z1t=function(){var t,i=null==(t=this.I$t.$D.media)?void 0:t.tracks;if(i){var n=i.filter(d$),r=i.filter(l$),e=i.filter(w$);if(this.J1t()&&0===r.length&&0!==this.LP()){var s=this.$1t();r.push(s)}if(this.J1t()&&0===n.length){var u=this.t2t();n.push(u)}K$(this.tO,n.map(function(t){return t.trackId})),K$(this.sO,r.map(function(t){return t.trackId})),K$(this.Gl,e.map(function(t){return t.trackId})),J$(n,this.tO),J$(r,this.sO),function(t,i){for(var n,r=!1,e=Lt(t);!(n=e()).done;){var s=n.value,u=Y$(i,s.trackId);u||(u=new g$(s),i.tt(u),r=!0)}}(e,this.Gl)}},n.i2t=function(){this.Cz||(this.e2t=_(this.bd,250))},n.s2t=function(){m(this.e2t)},n.n2t=function(){this.s2t(),this.i2t()},n.r2t=function(){var t,i,n=this.I$t.$D,r=n.media,e=null!=(i=null==r?void 0:r.duration)?i:NaN,s=(null==r?void 0:r.streamType)===chrome.cast.media.StreamType.LIVE||e<0,u=s?1/0:e;this.Zb=u,this.h2t();var o=n.getEstimatedLiveSeekableRange(),h=null==(t=n.customData)?void 0:t.buffers;if(Li(o)){var a=o.start,c=o.end,f=o.isMovingWindow,v=void 0===f?s:f,d=o.isLiveDone,l=void 0!==d&&d;this.BUt(a,c,v,l)}else if(Li(h)){var w=h.seekable,g=w[0],_=w[1];this.BUt(g,_,s,!1)}else s?this.BUt(void 0,void 0,!0,!1):this.BUt(0,u,!1,!1)},n.o2t=function(){var t=this.I$t.$D,i=function(t){return void 0!==t&&t.playerState===chrome.cast.media.PlayerState.PAUSED}(t)||Q$(t);this.a2t=i,this.Cz!==i&&(this.Cz=i,this.Cz?this.So(new cT(this.Gx())):this.So(new fT(this.Gx())))},n.hh=function(){var t=this.I$t.$D.playbackRate;this.u2t!==t&&(this.u2t=void 0,this.Rz!==t&&(this.Rz=t,this.So(new dT(this.Gx(),t))))},n.c2t=function(){var t;switch(this.I$t.$D.playerState){case chrome.cast.media.PlayerState.IDLE:t=Dy.zL;break;case chrome.cast.media.PlayerState.BUFFERING:t=Dy.Qn;break;case chrome.cast.media.PlayerState.PAUSED:case chrome.cast.media.PlayerState.PLAYING:t=Dy.XL}this.u5(t),this.d2t()},n.BUt=function(t,i,n,r){Li(t)&&Li(i)?this.H4=new oP(t,i,n,n&&!r):this.H4=void 0},n.l2t=function(t,i){this.C0t=null!=i?i:this.C0t,this.I0t=null!=t?t:this.I0t,this.So(new Ey)},n.Je=function(t){this.f2t!==t?(this.Pz=!0,this.So(new wT(this.Gx()))):this.f2t=void 0},n.Mq=function(){if(this.Pz){this.Pz=!1;var t=this.Gx();this.So(new bw(t,this.Hx())),this.So(new gT(t))}},n.Eh=function(){this.h5=!0,this.Kx()&&this.So(new lT(this.Gx()))},n.h2t=function(){var t=this.nxt,i=this.Nd();t===i||S(t)&&S(i)||(this.nxt=i,this.So(new vT(i)))},n.v2t=function(){var t=this.Gx();this.Pz||this._2t===t||(this._2t=t,this.So(new bw(t,this.Hx())))},n.P0t=function(){this.Cz&&(this.Cz=!1,this.So(new fT(this.Gx())),this.u5(Dy.zL))},n._nt=function(){return this.qc},n.Ux=function(){return this.rPt.Ly(this.x0t)},n.Gx=function(){if(this.qc.zc){var t=this.I$t.q$t();if(void 0!==t)return t}return this.nnt()},n.nnt=function(){return void 0!==this.g2t?this.x0t+this.g2t:this.h5?this.Nd():this.x0t+this.I$t.W$t()},n.Hx=function(){if(this.p2t)return new Date(this.nnt()+this.p2t)},n.Nd=function(){if(this.qc.zc){var t,i=null==(t=this.qc.Lnt[0])?void 0:t.ct;if(void 0!==i&&!S(i))return i}return this.x0t+this.Zb},n.Yx=function(){return this.nq},n.Kx=function(){return!this.qc.zc&&this.h5},n.fP=function(){return this.Cz},n._P=function(){return this.Rz},n.gP=function(t){this.Rz!==t&&(this.u2t=this.Rz,this.Rz=t,this.So(new dT(this.Gx(),t)),this.I$t.gP(t))},n.TP=function(){return this.o5},n.mP=function(){return this.qc.zc?EA.nL(0,this.Gx()):this.Ho.Ly(this.x0t)},n.EP=function(){var t,i;if(this.qc.zc)return EA.rL();var n=null!=(i=null==(t=this.H4)?void 0:t.J3().Ly(this.x0t))?i:EA.rL();if(n.V>0){var r=n.An(n.V-1);n=n.HM(EA.nL(r,this.Gx()))}return n},n.PP=function(){return this.Pz},n.Mx=function(){return this.tO},n.BP=function(){return this.sO},n.RP=function(){return this.Gl},n.$1t=function(){return{customData:{activeQuality:{averageBandwidth:0,bandwidth:0,codecs:"",frameRate:0,height:this.NP(),id:"0",name:"",width:this.LP()},enabled:!0,id:"0",kind:"main",label:"",language:"",qualities:[],uid:0},language:"",name:"",trackContentId:"",trackContentType:"",trackId:0,type:f$.Mk}},n.t2t=function(){return{customData:{activeQuality:{averageBandwidth:0,bandwidth:0,codecs:"",id:"0",name:"",audioSamplingRate:0},qualities:[],enabled:!0,id:"0",kind:"main",label:"",language:"",uid:0},language:"",name:"",trackContentId:"",trackContentType:"",trackId:0,type:f$.Bk}},n.J1t=function(){var t,i;return!(void 0!==(null==(t=this.gBt.F$t())?void 0:t.version))||(null==(i=this.gBt.F$t())?void 0:i.sdkType)===k$.q0t},n.H$t=function(t){this.J1t()&&Xn(t,0),this.I$t.H$t(t)},n.LP=function(){return this.I0t},n.NP=function(){return this.C0t},n.QP=function(){this.Cz&&(this.Cz=!1,this.a2t=!1,this.So(new fT(this.Gx()))),this.I$t.QP()},n.jP=function(){this.Cz||(this.Cz=!0,this.a2t=!0,this.So(new cT(this.Gx()))),this.I$t.jP()},n.Oy=function(t){if(!this.qc.zc){var i=b.max(0,t-this.x0t);i=b.round(1e6*i)/1e6;var n=this.g2t;this.g2t=i,this.a2t=this.fP(),this.f2t=i,this.Pz=!0,this.So(new wT(this.Gx())),void 0===n&&(this.J1t()?this.m2t(i):this.E9(i))}},n.E9=function(t){this.I$t.Oy(t,this.a2t).then(this.w2t(t)).catch(this.V$t)},n.w2t=function(t){var i=this;return function(){void 0!==i.g2t&&(i.g2t===t?i.g2t=void 0:i.E9(i.g2t))}},n.u5=function(t){this.o5!==t&&(this.o5=t,this.So(new Py(this.Gx(),t))),void 0===this.g2t&&this.Pz&&t>=Dy.GL&&this.Mq(),this.d2t()},n.d2t=function(){if(this.Cz)this.y2t=!1;else{var t=this.o5>=Dy.XL;this.y2t!==t&&(this.y2t=t,t?this.So(new Ly(this.Gx())):this.So(new By(this.Gx())))}},n.b2t=function(){this.A2t||(this.A2t=v.createElement("div"),this.oa.xe.appendChild(this.A2t),this.A2t.className="theoplayer-ad-linear theoplayer-chromecast-ad",this.A2t.style.zIndex="10",an(this.A2t)),this.A2t.style.display=this.qc.zc?"":"none"},n.S2t=function(){var t,i=null==(t=this.qc.Lnt[0])?void 0:t.KYt;i&&!this.T2t?(this.T2t=new H$(this.A2t,!0),this.T2t.O1t=i,this.T2t.wn("clickstart",this.k2t)):this.T2t&&(this.T2t.O1t=i)},n.E2t=function(){var t,i=null==(t=this.qc.Lnt[0])?void 0:t.kJt;if(void 0===i||i<0)this.x2t&&(this.x2t.kn(),this.x2t=void 0);else{if(!this.x2t){var n,r=null==(n=this.oa.Na)?void 0:n.gi;this.x2t=new G$(this.oa.Wu,r),this.A2t.appendChild(this.x2t.xe),this.x2t.wn("uD",this.P2t)}var e=this.I$t.q$t();void 0!==e&&(e=Dy.Qn&&(r.kV=!0,r.So(new Ny(t.currentTime))),!r.xV&&r.RV<=Dy.Qn&&i>=Dy.GL&&(r.xV=!0,r.So(new xy(t.currentTime))),r.RV<=Dy.GL&&i>=Dy.XL&&r.So(new Oy(t.currentTime)),r.RV<=Dy.XL&&i===Dy.jL&&r.So(new My(t.currentTime)),r.RV=i},r.cA=r.oa.OP,r.Iz=r.oa.oP,r.gBt=n,r.gBt.wn(KZ.x$t,r.C2t),r.gBt.wn(KZ.n0t,r.s3t),r.gBt.wn(KZ.wy,r.n3t),r.gBt.wn(KZ.s0t,r.r3t),r.gBt.wn(KZ.r0t,r.h3t),r.qc=new tO(r),r.mz=r.oa.bt,r.Ac=r.oa.nu(),r.vft=new h$(r,0,r.oa.nnt(),r.oa.Nd(),r.oa.Qx,r.oa.lP,r.oa.vP,r.oa.MP,r.oa.DP),r.V2t(),r}Ct(i,t);var n=i.prototype;return n.Ez=function(t){t&&(Fw(this.mz&&Hw(this.mz),t&&Hw(t))||(this.mz=t,this.So(new CT(t))))},n.R2t=function(t){if(t){var i=cE(t,this.oa.Cd);Fw(this.Ac&&Hw(this.Ac),i&&Hw(i))||(this.Ra.D0t(0),this.Ac=i,this.So(new SB(i)),this.Ra.P0t())}},n.D2t=function(t){for(var i,n=Lt(this.rt.NI);!(i=n()).done;){var r=i.value;if(r.JI===t)return r}for(var e,s=Lt(this.ht.NI);!(e=s()).done;){var u=e.value;if(u.JI===t)return u}},n._nt=function(){return this.qc},n.gnt=function(){return this.Zst},n.Mx=function(){return this.tO},n.Ux=function(){return this.Ra.Ux()._s()},n.Un=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return t?[4,this.m0t(t,null!=(n=t.ads)?n:[],t.streamType,NaN,0,null!=i?i:0)]:[2];case 1:return r.sent(),[2]}})}).call(this)},n.L2t=function(t){return Vt(function(){var i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:return(n=null!=(i=this.M2t)?i:this.Ac)?(e=this.M2t?null!=(r=this.M2t.ads)?r:[]:this.ort(),s=this.oa.Nd(),u=this.oa.EP(),o=function(t,i,n){var r=null==n?void 0:n.streamType;if(!S(t))return t===1/0?"live"===r||"dvr"===r?r:i&&i.length>0&&i.end(i.length-1)-i.start(0)>60?"dvr":"live":"vod";if(r)return r;if(null==n?void 0:n.dvr)return"dvr";switch(KS(n)){case cA.bC:case cA.yC:case cA.wC:case cA.mC:return"live"}}(s,u,n),h=u.length>0?u.start(0):0,a=null!=t?t:this.nnt(),[4,this.m0t(n,e,o,s,h,a)]):[2];case 1:return c.sent(),[2]}})}).call(this)},n.ort=function(){var t=new nO;return this.qc.qnt(t),t.ort()},n.Hx=function(){return this.Ra.Hx()},n.qx=function(){return this.mz},n.Gx=function(){return this.Ra.Gx()},n.nnt=function(){return this.Ra.nnt()},n.Xx=function(t,i){this.O2t||(this.gBt.p0t()||this.O2t||!this.Ac?this.Ra.Oy(t):this.Un(this.Ac,t))},n.Nd=function(){return this.Ra.Nd()},n.Kx=function(){return this.Ra.Kx()},n.Yx=function(){return this.nq},n.Zx=function(){return this.rq},n.tP=function(){return this.eO},n.hP=function(){return this.oa.rP},n.aP=function(){return this.Iz},n.uP=function(t){this.Iz=t,this.So(new _T(this.zx,this.OP)),this.gBt.uP(t)},n.fP=function(){return this.Ra.fP()},n._P=function(){return this.Ra._P()},n.gP=function(t){this.Ra.gP(t)},n.mP=function(){return this.Ra.mP()._s()},n.yP=function(){return YT.HL},n.bP=function(t){},n.TP=function(){return this.Ra.TP()},n.EP=function(){return this.Ra.EP()._s()},n.PP=function(){return this.Ra.PP()},n.nu=function(){return this.Ac},n.Ta=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Ac=t,[4,this.Un(t)];case 1:return i.sent(),this.M2t=void 0,this.Ra.P0t(),[2]}})}).call(this)},n.RP=function(){return this.Gl},n.NP=function(){return this.Ra.NP()},n.LP=function(){return this.Ra.LP()},n.BP=function(){return this.sO},n.FP=function(){return this.cA},n.UP=function(t){this.cA=t,this.So(new _T(this.zx,this.OP)),this.gBt.UP(t)},n.zP=function(){},n.qP=function(){return this.ha},n.GP=function(){},n.QP=function(){this.gBt.p0t()||this.O2t||!this.Ac?this.Ra.QP():this.Un(this.Ac)},n.jP=function(){this.Ra.jP()},n.gr=function(){this.ho=!0},n.mr=function(){this.mz=void 0,this.ho=!1},n.be=function(){},n.we=function(){},n.m0t=function(t,i,n,r,e,s){return Vt(function(){var u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:this.O2t=!0,this.F2t(),this.Ra.D0t(e),o="vod"===n,h=function(t,i,n,r){return{theoplayer_version:1,streamStart:t,isLive:i,sourceDescription:n,configuration:r}}(e,u="live"===n||"dvr"===n,t,this.Cd),a={w0t:t,Jc:i,zx:s>=0&&s!==1/0&&(o||0!==s)?b.max(0,s-e):void 0,ct:r,P0:u?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED,y0t:h},f.label=1;case 1:return f.trys.push([1,3,4,5]),[4,this.gBt.m0t(a)];case 2:return f.sent(),[3,5];case 3:return c=f.sent(),this.U2t(c),[3,5];case 4:return this.O2t=!1,[7];case 5:return[2]}})}).call(this)},n.V2t=function(){this.H2t(this.tO),this.H2t(this.sO),this.W2t(this.Gl)},n.H2t=function(t){for(var i,n=this,r=Lt(t.NI);!(i=r()).done;){var e=i.value;this.q2t(e)}t.wn(Iw.rI,function(t){n.q2t(t.Ht),n.z2t()})},n.W2t=function(t){for(var i,n=this,r=Lt(t.NI);!(i=r()).done;){var e=i.value;this.G2t(e)}t.wn(Iw.rI,function(t){n.G2t(t.Ht),n.z2t()})},n.q2t=function(t){t.wn(a$.B0t,this.imt),t.wn(a$.M0t,this.X2t),t.wn(a$.M0t,this.Y1t)},n.G2t=function(t){t.wn(a$.N0t,this.j2t),t.wn(a$.N0t,this.Y1t)},n.Q2t=function(){for(var t,i=[],n=Lt(this.rt.NI);!(t=n()).done;){var r=t.value;r.Rt&&i.push(r.JI)}for(var e,s=Lt(this.ht.NI);!(e=s()).done;){var u=e.value;u.Rt&&i.push(u.JI)}for(var o,h=Lt(this.nt.NI);!(o=h()).done;){var a=o.value;a.Qk===zm.Kn&&i.push(a.JI)}this.Ra.H$t(i)},n.K2t=function(t,i,n){this.Y2t=t,this.J2t=i,this.Z2t=n},n.$2t=function(t){var i,n;return!!t&&((null!=(n=null==(i=this.gBt.F$t())?void 0:i.version)?n:-1)>=2?t.map(function(t){return t.o}):[t[0].o])},n.t3t=function(t){this.i3t=t},n.$P=function(){},n.tI=function(){},n.sI=function(t){throw new y("Can't add a track while casting.")},n.KP=function(){return Vt(function(){return zt(this,function(t){return this.Ra.KP(),this.F2t(),[2]})}).call(this)},n.F2t=function(){this.RV=Dy.zL,this.kV=!1,this.xV=!1,this.nq=void 0,this.rq=void 0},n.kn=function(){return Vt(function(){return zt(this,function(t){return this.F2t(),this.Vo(),this.vft=this.e3t(),this.gBt.mn(KZ.x$t,this.C2t),this.gBt.mn(KZ.n0t,this.s3t),this.gBt.mn(KZ.wy,this.n3t),this.gBt.mn(KZ.s0t,this.r3t),this.gBt.mn(KZ.r0t,this.h3t),this.gBt.kn(),[2]})}).call(this)},n.e3t=function(){return new h$(this,this.Ra.R0t(),this.Ra.Gx(),this.Ra.Nd(),this.Ra.Kx(),this.Ra.fP(),this.Ra._P(),this.Ra.LP(),this.Ra.NP())},Nt(i,[{key:"vft",get:function(){return this.Ra},set:function(t){var i=this.Ra;i&&(i.mn(MZ.x$t,this.C2t),i.mn(MZ.P$t,this.N2t),i.mn(t0,this.Rs),i.mn(Ry.AI,this.qV),t.D0t(i.R0t()),i.qnt(t._nt())),this.Ra=t,this.tO.OI=t.Mx(),this.sO.OI=t.BP(),this.Gl.OI=t.RP(),this.qc.OI=t._nt(),i&&i.kn(),t.wn(MZ.x$t,this.C2t),t.wn(MZ.P$t,this.N2t),t.wn(t0,this.Rs),t.wn(Ry.AI,this.qV)}},{key:"ro",get:function(){return this.ho}},{key:"Jc",get:function(){return this._nt()}},{key:"B2t",get:function(){return this.M2t||this.Ac},set:function(t){this.M2t=t}},{key:"zx",get:function(){return this.Gx()},set:function(t){this.Xx(t)}},{key:"WP",get:function(){return!1},set:function(t){}}]),i}(Ub);U(),Et(),Pt();var n0=function(t){function i(i){var n;return(n=t.call(this,"error")||this).lt=void 0,n.lt=i,n}return Ct(i,t),i.prototype.xa=function(){return new r0(this.lt)},i}(Aw),r0=function(t){function i(i){var n;return(n=t.call(this,"error")||this).error=void 0,n.error=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var e0=function(t){function i(i){var n;return(n=t.call(this,"statechange")||this).state=void 0,n.state=i,n}return Ct(i,t),i}(rh);function s0(t,i){var n;return{get casting(){return t.xJ},get error(){return t.lt},get receiverName(){return t.o3t},get state(){return t.vft},start:function(){t.Tn()},stop:function(){t.KP()},join:function(){t.a3t()},leave:function(){t.u3t()},set connectionCallback(t){null==i||i.c3t(t)},get connectionCallback(){return null==i?void 0:i.d3t()},get source(){return n||t.Mc},set source(i){n=i,t.Mc=i},addEventListener:function(i,n){var r=Qw(i,Gw);t.wn(r,n)},removeEventListener:function(i,n){var r=Qw(i,Gw);t.mn(r,n)}}}U(),Et();var u0=function(t){function i(i,n,r,e){var s;return(s=t.call(this)||this).ZS=void 0,s.nq=void 0,s.hu=void 0,s.v3t=void 0,s.oa=void 0,s.Ra=VS.UNAVAILABLE,s.p3t=void 0,s.LY=void 0,s.l3t=void 0,s._3t=!1,s.uV=new hr,s.D3t=function(){s.l3t.wn(s$.E0t,s.R3t),s.vft=s.l3t.N3t()},s.R3t=function(t){var i=t.vft;s.vft=i,i!==VS.UNAVAILABLE&&i!==VS.AVAILABLE||s.b3t(!1).catch(s.u8)},s.M2t=void 0,s.u8=function(t){vr(t)||V(t,gJ)&&(s.nq=t,s.So(new n0(t).Ca))},s.LY=i,s.v3t=n,s.l3t=e,s.ZS=r.chromecast,s.p3t=_r(s.l3t.GY(s.ZS,s.uV.Yg),s.uV),s.p3t.then(s.D3t).catch(s.u8),s}Ct(i,t);var n=i.prototype;return n.g3t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:if(!this.p3t)throw new y("Chromecast must be initialized before starting a session");return[4,this.p3t];case 1:return t.sent(),this.l3t.f3t()?[3,3]:[4,this.l3t.m3t()];case 2:t.sent(),t.label=3;case 3:return[2]}})}).call(this)},n.Tn=function(){return Vt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:this._3t=!0,r.label=1;case 1:return r.trys.push([1,5,,6]),this.vft=VS.CONNECTING,[4,this.g3t()];case 2:return r.sent(),[4,this.w3t()];case 3:return r.sent(),this.oa&&(t=this.v3t.nu(),i=this.l3t.y3t(t),this.oa.B2t=i?cE(i,this.v3t.Cd):this.M2t,this.oa.L2t()),this.vft=VS.CONNECTED,[4,this.v3t.KP()];case 4:return r.sent(),[3,6];case 5:return n=r.sent(),this.b3t(!1).catch(dn),this.vft=VS.AVAILABLE,vr(n)||this.u8(n),[3,6];case 6:return[2]}})}).call(this)},n.a3t=function(){return Vt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:this._3t=!0,r.label=1;case 1:return r.trys.push([1,5,,7]),this.vft=VS.CONNECTING,[4,this.g3t()];case 2:return r.sent(),[4,this.w3t()];case 3:return r.sent(),this.oa&&(t=this.v3t.nu(),(i=this.l3t.A3t(t))&&(this.oa.B2t=cE(i,this.v3t.Cd))),this.vft=VS.CONNECTED,[4,this.v3t.KP()];case 4:return r.sent(),[3,7];case 5:return n=r.sent(),[4,this.b3t(!0).catch(dn)];case 6:return r.sent(),this.vft=VS.AVAILABLE,vr(n)||this.u8(n),[3,7];case 7:return[2]}})}).call(this)},n.S3t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.l3t.f3t()?[4,this.Tn()]:[2];case 1:return t.sent(),[2]}})}).call(this)},n.w3t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return null!=this.oa||(this.oa=this.T3t()),this.nq=void 0,this.v3t.jP(),[4,this.LY.k3t(this.oa)];case 1:return t.sent(),[2]}})}).call(this)},n.T3t=function(){var t=new i0(this.v3t,this.l3t.f3t());return t.t3t(this.u8),t},n.E3t=function(){this.oa&&(this.oa.kn(),this.oa=void 0)},n.b3t=function(t){return Vt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:if(this._3t=!1,!this.oa)return[2];i=this.oa.ro,n=this.oa.nu(),r=this.oa.nnt(),s.label=1;case 1:return s.trys.push([1,,4,5]),i?(null!=(e=t?this.l3t.x3t(n):this.l3t.P3t(n))||(e=n),[4,this.LY.I3t(e,e===n)]):[3,3];case 2:s.sent(),this.v3t.Xx(r),this.v3t.QP(),s.label=3;case 3:return[3,5];case 4:return this.E3t(),[7];case 5:return[2]}})}).call(this)},n.u3t=function(){this.xJ&&(this.l3t.C3t(!1),this.b3t(!0).catch(this.u8))},n.KP=function(){this.xJ&&(this.l3t.C3t(!0),this.b3t(!1).catch(this.u8))},n.kn=function(){this.uV.Zg(),this.l3t.mn(s$.E0t,this.R3t),this.Vo(),this.E3t()},Nt(i,[{key:"xJ",get:function(){return this.vft===VS.CONNECTING||this.vft===VS.CONNECTED}},{key:"lt",get:function(){return this.nq}},{key:"Ca",get:function(){return this.hu||(this.hu=s0(this,this.l3t)),this.hu}},{key:"o3t",get:function(){var t;return null==(t=this.l3t.f3t())?void 0:t.A0t()}},{key:"Mc",get:function(){return this.oa?this.oa.B2t:this.M2t},set:function(t){this.M2t=t?cE(t,this.v3t.Cd):void 0,this.oa&&(this.oa.B2t=this.M2t,this.M2t&&this.oa.Un(this.M2t))}},{key:"vft",get:function(){return this.Ra},set:function(t){var i=t;this._3t||i!==VS.CONNECTING&&i!==VS.CONNECTED||(i=VS.AVAILABLE),this.Ra!==i&&(this.Ra=i,this.So(new e0(this.vft)))}}]),i}(nh);U(),Et(),xt(),Pt();var o0=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).hu=void 0,i}Ct(i,t);var n=i.prototype;return n.a3t=function(){Ui.um("Joining a Chromecast session is not possible when JoinStrategy is configured to disabled")},n.u3t=function(){Ui.um("Leaving a Chromecast session is not possible when JoinStrategy is configured to disabled")},n.Tn=function(){Ui.um("Starting a Chromecast session is not possible when JoinStrategy is configured to disabled")},n.KP=function(){Ui.um("Stopping a Chromecast session is not possible when JoinStrategy is configured to disabled")},n.S3t=function(){return ut.resolve()},n.kn=function(){},Nt(i,[{key:"xJ",get:function(){return!1}},{key:"lt",get:function(){}},{key:"o3t",get:function(){}},{key:"Mc",get:function(){},set:function(t){}},{key:"vft",get:function(){return VS.UNAVAILABLE}},{key:"Ca",get:function(){return this.hu||(this.hu=s0(this)),this.hu}}]),i}(nh);function h0(t){return{bt:t.bt,zx:t.Gx(),ct:t.Nd(),Qx:t.Qx,lt:t.Yx(),Jx:t.Zx(),oP:t.oP,lP:t.lP,vP:t.vP,AP:t.AP,xP:t.xP,DP:t.DP,MP:t.MP,OP:t.OP}}U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et();var a0=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).tO=new $b,r.sO=new $b,r.Gl=new tA,r.$L=void 0,r.eO=new sA,r.iO=new VT,r.qc=void 0,r.$L=new OT(i.Sq),r.tO.OI=i.ht,r.sO.OI=i.rt,r.Gl.OI=i.nt,r.eO.OI=i.$x,r.iO.OI=i.iP,r.qc=new tO(r),r.qc.OI=i.Jc,r}Ct(i,t);var n=i.prototype;return n._nt=function(){return this.qc},n.Mx=function(){return this.tO},n.tP=function(){return this.eO},n.eP=function(){return this.iO},n.Aa=function(){return this.$L},n.RP=function(){return this.Gl},n.BP=function(){return this.sO},n.switchContexts=function(t){this.oa=t,this.tO.OI=t.ht,this.sO.OI=t.rt,this.Gl.OI=t.nt,this.$L.OI=t.Sq,this.eO.OI=t.$x,this.iO.OI=t.iP,this.qc.OI=t.Jc},n.B3t=function(t){this.oa!==t&&(this.yz(),this.switchContexts(t),this.wz())},n.nO=function(t){if(this.oa!==t){var i;this.yz(),this.bnt&&(i=h0(this));var n=this.qx(),r=this.qP(),e=this.zP();if(this.switchContexts(t),void 0!==i)IT(this,i,h0(this));var s=this.qx();s!==n&&this.So(new CT(s)),this.qP()!==r&&this.So(new PT),this.zP()!==e&&this.So(new DT),this.wz()}},n.kn=function(i){var n=this;return Vt(function(){return zt(this,function(r){switch(r.label){case 0:return[4,t.prototype.kn.call(n,i)];case 1:return r.sent(),this.$L.kn(i),this.tO.kn(i),this.sO.kn(i),this.Gl.kn(i),this.eO.kn(),this.iO.kn(),[4,this.qc.kn(i)];case 2:return r.sent(),[2]}})}).call(this)},Nt(i,[{key:"$x",get:function(){return this.tP()}},{key:"iP",get:function(){return this.eP()}}]),i}(Ub);U(),Et();function c0(t){var i=v.createElement("div");return sn(i,"theo-ads-sgai-ima-container"),function(t){t.style.boxSizing="border-box",t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%"}(i),t.appendChild(i),i}function f0(t){var i=t.style;i.boxSizing="border-box",i.position="absolute",i.display="none",i.border="0 solid transparent",i.borderWidth="0px",i.width="100%",i.height="100%"}function v0(t){var i=t.style;i.display="",i.backgroundColor="",i.backgroundRepeat="",i.backgroundAttachment="",i.border="",i.borderWidth="",i.flex="",i.transform="",i.transition="",i.backgroundImage="",i.backgroundSize="",i.backgroundPosition="",i.alignItems="",i.position=""}function d0(t,i,n,r,e){var s=i/n,u=1,o=0,h=0;if(s>=r/e){var a=r/s;o=(e-a)/2,u=a/n}else{var c=e*s;h=(r-c)/2,u=c/i}t.style.left=h/r*100+"%",t.style.top=o/e*100+"%",t.style.width=i*u/r*100+"%",t.style.height=n*u/e*100+"%"}function l0(t){return Fo(t,"theo-ads://dai.break")}function w0(t){return t&&t.integration===pS.THEOADS}var g0=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).M3t=void 0,r.U3t=void 0,r.q3t=void 0,r.ta=new bd,r.L3t=void 0,r.H3t=void 0,r.fEt=void 0,r.W3t=void 0,r.z3t=function(t){var i=t.Ht;_0(r.H3t,i)&&(i.Rt=!0)},r.G3t=function(t){var i=t.Ht;_0(r.fEt,i)&&(i.Qk=zm.Kn)},r.X3t=function(t){var i=t.Ht;_0(r.W3t,i)&&(i.Rt=!0)},r.V3t=function(){r.U3t.ht.mn(Iw.rI,r.z3t),r.U3t.nt.mn(Iw.rI,r.G3t),r.U3t.rt.mn(Iw.rI,r.X3t)},r.U3t=i,r.Cd.cast.strategy!==oA.DISABLED?r.M3t=new u0(r,i,r.Cd.cast,n):r.M3t=new o0,r.GX.BJ(r.M3t),r}Ct(i,t);var n=i.prototype;return n.nu=function(){var i=t.prototype.nu.call(this);return!i&&this.M3t.xJ&&this.M3t.Mc?this.M3t.Mc:i},n.Ta=function(i,n){var r=this;return this.ta.Zo(function(n){return r.L3t=new hr,r.L3t.$g(n),_r(t.prototype.Ta.call(r,i,r.L3t.Yg),r.L3t)},n)},n.QP=function(){t.prototype.QP.call(this),this.Cd.cast.strategy!==oA.AUTO||this.M3t.xJ||this.M3t.S3t()},n.k3t=function(t){var i=this;return this.ta.Zo(function(n){return i.O3t(t,n)})},n.I3t=function(t,i){var n=this;return void 0===t&&(t=void 0),void 0===i&&(i=!1),this.ta.Zo(function(r){return n.F3t(t,i,r)})},n.O3t=function(t,i){dr(i),this.U3t.Jc&&this.U3t.Jc.qnt(t.Jc),this.V3t(),this.H3t=Fn(this.U3t.ht.NI,function(t){return t.Rt}),this.fEt=Fn(this.U3t.nt.NI,function(t){return"showing"===t.Qk}),this.W3t=Fn(this.U3t.rt.NI,function(t){return t.Rt}),this.q3t=t,this.q3t.K2t(this.H3t,this.fEt,this.W3t),this.nO(t),this.q3t.gr()},n.F3t=function(t,i,n){return Vt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:if(dr(n),void 0===(r=this.q3t))return[2];u.label=1;case 1:return u.trys.push([1,5,6,7]),t?[4,this.U3t.KP()]:[3,4];case 2:return u.sent(),dr(n),(e=cE(t,this.U3t.Cd)).sources.forEach(function(t){t&&(t.bypassLicense=!0)}),i&&(e.ads=null==(s=e.ads)?void 0:s.filter(w0)),this.L3t=new hr,this.L3t.$g(n),[4,_r(this.U3t.Ta(e,this.L3t.Yg),this.L3t)];case 3:u.sent(),u.label=4;case 4:return i&&this.U3t.Jc&&r.Jc.qnt(this.U3t.Jc),[3,7];case 5:return wr(u.sent()),[3,7];case 6:return r.mr(),this.nO(this.U3t),this.H3t=Fn(this.q3t.ht.NI,function(t){return t.Rt}),this.fEt=Fn(this.q3t.nt.NI,function(t){return"showing"===t.Qk}),this.W3t=Fn(this.q3t.rt.NI,function(t){return t.Rt}),this.U3t.ht.wn(Iw.rI,this.z3t),this.U3t.nt.wn(Iw.rI,this.G3t),this.U3t.rt.wn(Iw.rI,this.X3t),this.U3t.wn(Ry.EM,this.V3t),this.q3t===r&&(this.q3t=void 0),[7];case 7:return[2]}})}).call(this)},n.KP=function(){var i,n=this;return this.H3t=void 0,this.fEt=void 0,this.W3t=void 0,this.V3t(),null==(i=this.L3t)||i.Zg(),this.ta.Zo(function(){return t.prototype.KP.call(n)})},n.kn=function(){var i=this;return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return null==(n=this.L3t)||n.Zg(),this.M3t.kn(),[4,this.I3t()];case 1:return r.sent(),[4,this.ta.kn()];case 2:return r.sent(),[4,t.prototype.kn.call(i)];case 3:return r.sent(),[2]}})}).call(this)},i}(a0);function _0(t,i){return void 0!==t&&void 0!==i&&(t.bs===i.bs&&i.Th===t.Th)}U(),Et(),Wt(),xt(),Qt();var m0=function(){function t(t){this.p3t=void 0,this.hu=void 0,this.l3t=void 0,this.l3t=t}var i=t.prototype;return i.GY=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.p3t||(this.p3t=this.J3t(t)),[4,this.p3t];case 1:return i.sent(),[2]}})}).call(this)},i.J3t=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.l3t.GY(t)];case 1:return i.sent(),[2]}})}).call(this)},i.m3t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:if(!this.p3t)throw new y("Chromecast must be initialized before starting a session");return[4,this.p3t];case 1:return t.sent(),this.l3t.f3t()?[3,3]:[4,this.l3t.m3t()];case 2:t.sent(),t.label=3;case 3:return[2]}})}).call(this)},i.Z3t=function(){this.l3t.C3t(!1)},i.Y3t=function(){this.l3t.C3t(!0)},Nt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{initialize:function(i){var n=t.GY(hA(i));return n.catch(dn),n},startSession:function(){var i=t.m3t();return i.catch(dn),i},endSession:function(){t.Y3t()}}}(this)),this.hu}}]),t}();var y0=new o$,p0=new m0(y0),k0={get chromecast(){return p0.Ca}};qb(function(t){return new g0(t,y0)},zb.Ent),U(),Et(),U(),Et(),U(),Et(),U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et(),Wt(),Qt();var b0=function(){function t(t){this.a4t=void 0,this.n4t=void 0,this.h4t=void 0,this.a4t=t,this.n4t=Ju(),this.h4t=Ju()}var i=t.prototype;return i.$3t=function(t,i,n,r){var e=this;t.Gz.forEach(function(t){if(!e.t4t(t.i4t)){var s=t.e4t(i,n,r);s&&e.s4t(s)}})},i.t4t=function(t){return this.n4t.get(t)},i.s4t=function(t){this.n4t.set(t.r4t,t),this.h4t.set(t.r4t,t.o4t),this.a4t.au(t.u4t)},i.znt=function(t){this.h4t.has(t.r4t)||(this.h4t.set(t.r4t,t),this.a4t.au(t.u4t))},i.c4t=function(t){return this.h4t.forEach(t)},i.d4t=function(t){return this.n4t.forEach(t)},i.l4t=function(t){var i=!1;return this.n4t.forEach(function(n){i=n.l4t(t)||i}),i},i.kn=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=[],this.n4t.forEach(function(i){return t.push(i.kn())}),this.h4t.forEach(function(i){return t.push(i.kn())}),[4,ut.all(t)];case 1:return i.sent(),this.n4t.clear(),this.h4t.clear(),[2]}})}).call(this)},t}();U(),Et(),Pt();var A0=function(t){function i(i,n,r,e){var s;return(s=t.call(this,"_4t")||this).AZt=void 0,s.Iy=void 0,s.Jy=void 0,s.Mc=void 0,s.AZt=i,s.Iy=n,s.Jy=r,s.Mc=e,s}return Ct(i,t),i.prototype.xa=function(){return new T0(this.AZt,this.Iy,this.Jy,this.Mc)},i.f4t=function(t){return new i(kZ.GENERAL,t.Iy,t.TZt)},i.v4t=function(t,n){return new i(t.AZt,t.message,t.TZt,n)},i}(Aw),T0=function(t){function i(i,n,r,e){var s;return(s=t.call(this,"aderror")||this).problemType=void 0,s.message=void 0,s.errorCode=void 0,s.source=void 0,s.problemType=i,s.message=n,s.errorCode=r,s.source=e,s}return Ct(i,t),i}(rh),S0=function(t){function i(i){var n;return(n=t.call(this)||this).A4t=void 0,n.p4t=void 0,n.y4t=!1,n.d9=!1,n.hu=void 0,n.T4t=function(t){if(n.y4t&&t.Jy!==bZ.VAST_NO_ADS_AFTER_WRAPPER&&t.Jy!==bZ.VAST_EMPTY_RESPONSE){var i=new hg(og.ADVERTISEMENT_ERROR,t.Iy),r=new ld(vd.AD_BLOCKER_DETECTED,t.Iy+" Turn off your AdBlocker and try again.",i);n.A4t.Qq(r)}},n.hst=function(){n.d9=!0},n.A4t=i,n.p4t=new b0(n),n.wn("_4t",n.T4t),i.wn(eh.uo,n.hst),n}Ct(i,t);var n=i.prototype;return n.qnt=function(t){this.m4t(function(i){i.qnt(t)})},n.W6=function(t,i,n){try{this.y4t=n;var r=kS.Bg.jz(t);if(r.i4t===x$.knt)return;var e=this.p4t.t4t(r.i4t);if(!e)throw new pZ(kZ.ADBLOCK,void 0,"Ads could not be loaded.");i!==DB.Mnt&&this.d9||this.A4t.b4t(e),r.W6(t,i,e,this.y4t)}catch(i){0,this.So(A0.v4t(i,t.sources))}},n.uD=function(){this.m4t(function(t){t.uD()})},n.Hnt=function(t){this.m4t(function(i){i.Hnt(t)})},n.znt=function(t){this.p4t.znt(t)},n.Wnt=function(t,i){return this.A4t.Wnt(t,i)},n.S4t=function(t){this.p4t.d4t(function(i){i.S4t(t)})},n.l4t=function(t){return this.p4t.l4t(t)},n.m4t=function(t){return this.p4t.c4t(t)},n.GP=function(){this.p4t.d4t(function(t){return t.GP()})},n.hr=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.d9=!1,t=[],this.p4t.d4t(function(i){return t.push(i.KP())}),[4,ut.all(t)];case 1:return i.sent(),[2]}})}).call(this)},n.kn=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),[4,this.p4t.kn()];case 1:return t.sent(),this.A4t.mn(eh.uo,this.hst),this.mn("_4t",this.T4t),[2]}})}).call(this)},Nt(i,[{key:"g4t",get:function(){return this.p4t}},{key:"zc",get:function(){var t=!1;return this.m4t(function(i){t=t||i.w4t}),t}},{key:"Lnt",get:function(){var t=[];return this.m4t(function(i){var n,r=i.Lnt;r.length&&(n=t).push.apply(n,[].concat(r))}),t}},{key:"Fnt",get:function(){var t=null;return this.m4t(function(i){null!=t||(t=i.Fnt)}),t}},{key:"Unt",get:function(){var t=[];return this.m4t(function(i){var n;(n=t).push.apply(n,[].concat(i.Unt))}),t}},{key:"Vnt",get:function(){var t=[];return this.m4t(function(i){var n;(n=t).push.apply(n,[].concat(i.Vnt))}),t}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=NB(this)}}]),i}(xI);U(),Et(),Wt(),xt(),Ft(),Qt(),U(),Et(),xt(),Pt(),U(),Et(),xt(),Pt();var E0=function(t){function i(i){var n;return(n=t.call(this)||this).f$t=void 0,n.qc=void 0,n.k4t=void 0,n.E4t=void 0,n.x4t=void 0,n.I4t=void 0,n.f$t=i,n.qc=[],n.k4t=-1,n.E4t=-1,n.x4t=void 0,n.I4t=!1,n}Ct(i,t);var n=i.prototype;return n.P4t=function(){this.I4t=!0},n.C4t=function(t){this.qc.push(t),this.I4t=!1},n.R4t=function(t){Xn(this.qc,t)},Nt(i,[{key:"Jc",get:function(){return this.qc}},{key:"G0t",get:function(){return this.k4t},set:function(t){this.k4t=t}},{key:"X0t",get:function(){return this.E4t},set:function(t){this.E4t=t}},{key:"qOt",get:function(){return this.f$t},set:function(t){this.f$t=t}},{key:"y0t",get:function(){return this.x4t}},{key:"pP",get:function(){return this.I4t}}]),i}(S$),I0=function(t){function i(i,n){var r;return(r=t.call(this,n.timeOffset)||this).D4t=void 0,r.N4t=[],r.D4t=i,r.er(n),r}Ct(i,t);var n=i.prototype;return n.er=function(t){void 0!==t.maxDuration&&(this.k4t=t.maxDuration),void 0!==t.customData&&(this.x4t=t.customData)},n.B4t=function(t){var i=this.qc.indexOf(t);return i>=0&&i=.25&&this.u4t.So(new W0(t,e)),n<.5&&r>=.5&&this.u4t.So(new X0(t,e)),n<.75&&r>=.75&&this.u4t.So(new G0(t,e))},i.M4t=function(t){jn(this.g5t,t)||(this.g5t.push(t),t.od.M4t(t),this.m5t(t.od),this.u4t.So(new QB(t,this.A4t.Gx())))},i.G$t=function(t){if(jn(this.g5t,t)){var i=t.od.B4t(t);this.u4t.So(new M0(t,t.Q4t)),this.w5t(t,i)}},i.u5t=function(t){if(jn(this.g5t,t)){var i=t.od.B4t(t);this.u4t.So(new KB(t,this.A4t.Gx())),this.w5t(t,i)}},i.R4t=function(t){if(jn(this.qc,t)){var i=t.od.B4t(t);Xn(this.qc,t),t.od.R4t(t),this.u4t.So(new V0(t.od)),this.w5t(t,i)}},i.c5t=function(t){var i=new I0(this.u$t,t);return this.y1t.push(i),this.u4t.So(new FB(i)),i},i.d5t=function(t,i){t.er(i),this.u4t.So(new F0(t))},i.l5t=function(t){if(jn(this.y1t,t)){for(var i,n=Lt(t.Jc.slice());!(i=n()).done;){var r=i.value;this.R4t(r)}Xn(this.y1t,t),this.u4t.So(new MB(t))}},i.f5t=function(){for(var t,i=Lt(this.y1t.slice());!(t=i()).done;){var n=t.value;this.l5t(n)}},i.v5t=function(t){this.u4t.So(new A0(kZ.GENERAL,t.message))},i._5t=function(t,i){var n=new ld(null!=i?i:vd.AD_ERROR,t.message,t);this.A4t.Qq(n)},i.y5t=function(t){return Fn(this.y1t,function(i){return i.qOt===t})},i.p5t=function(t){var i;return null!=(i=this.y5t(t.timeOffset))?i:this.c5t(t)},i.w5t=function(t,i){Xn(this.g5t,t);var n=t.od;0!==this.g5t.length||this.w1t!==n||i||(n.P4t(),this.m5t(void 0))},i.m5t=function(t){this.w1t!==t&&(void 0!==this.w1t&&this.u4t.So(new XB(this.w1t)),this.w1t=t,void 0!==t&&this.u4t.So(new GB(t)))},i.o5t=function(t){var i=Fn(this.qc,function(i){return i.Ont()===t});if(void 0===i)throw new y('Invalid ad for integration "'+this.u$t+'"');return i},i.r5t=function(t){var i=Fn(this.y1t,function(i){return i.Ont()===t});if(void 0===i)throw new y('Invalid ad break for integration "'+this.u$t+'"');return i},i.Ta=function(t,i){return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return dr(i),(null==(n=this.f8)?void 0:n.setSource)?[4,ut.resolve(this.f8.setSource(t))]:[3,2];case 1:return YS(r=e.sent())&&(r=t),[2,cE(r,this.A4t.Cd)];case 2:return[2,t];case 3:return[2]}})}).call(this)},i.b5t=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(null==(t=this.f8)?void 0:t.resetSource)?[4,ut.resolve(this.f8.resetSource())]:[3,2];case 1:return i.sent(),[3,3];case 2:this.f5t(),i.label=3;case 3:return[2]}})}).call(this)},i.kn=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(null==(t=this.f8)?void 0:t.destroy)?[4,ut.resolve(this.f8.destroy()).catch(dn)]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.f5t(),this.m5t(void 0),this.f8=void 0,this.u4t.kn(),[2]}})}).call(this)},Nt(t,[{key:"Jc",get:function(){return this.qc}},{key:"K0t",get:function(){return this.y1t}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get integration(){return t.u$t},get ads(){return t.Jc.map(function(t){return t.Ont()})},get adBreaks(){return t.K0t.map(function(t){return t.Ont()})},createAd:function(i,n){return t.n5t(i,n?t.r5t(n):void 0).Ont()},updateAd:function(i,n){t.h5t(t.o5t(i),n)},updateAdProgress:function(i,n){var r=Tn(Number(n),0,1);t.a5t(t.o5t(i),r)},beginAd:function(i){t.M4t(t.o5t(i))},endAd:function(i){t.u5t(t.o5t(i))},skipAd:function(i){t.G$t(t.o5t(i))},removeAd:function(i){t.R4t(t.o5t(i))},createAdBreak:function(i){return t.c5t(i).Ont()},updateAdBreak:function(i,n){t.d5t(t.r5t(i),n)},removeAdBreak:function(i){t.l5t(t.r5t(i))},removeAllAds:function(){t.f5t()},error:function(i){t.v5t(i)},fatalError:function(i,n){var r=n?Number(n):void 0;t._5t(i,r)}}}(this)}},{key:"uN",get:function(){return this.f8},set:function(t){this.f8=t}},{key:"w4t",get:function(){return this.g5t.some(function(t){return t.V4t===R0.BZt})}},{key:"r4t",get:function(){return this.u$t}},{key:"Lnt",get:function(){return this.g5t}},{key:"Fnt",get:function(){var t;return null!=(t=this.w1t)?t:null}},{key:"Unt",get:function(){return Jn(this.y1t,function(t){return t.Unt})}},{key:"Vnt",get:function(){return this.y1t.filter(function(t){return!t.pP})}}]),t}();U(),Et(),xt();var Y0=function(){function t(t){var i=this;this.oa=void 0,this.r9=void 0,this.A5t=!1,this.Ed=function(t){1!==i.oa.vP&&(i.r9=i.oa.vP,i.oa.vP=1),i.A5t=!0},this.Bd=function(t){i.A5t=!1,void 0!==i.r9&&(i.oa.vP=i.r9,i.r9=void 0)},this.oa=t,this.addAdListeners()}var i=t.prototype;return i.destroy=function(){this.removeAdListeners()},i.addAdListeners=function(){var t,i;null==(t=this.oa.Jc)||t.wn("Ynt",this.Ed),null==(i=this.oa.Jc)||i.wn("Knt",this.Bd)},i.removeAdListeners=function(){var t,i;null==(t=this.oa.Jc)||t.mn("Ynt",this.Ed),null==(i=this.oa.Jc)||i.mn("Knt",this.Bd)},Nt(t,[{key:"player",get:function(){return this.oa},set:function(t){this.oa&&this.removeAdListeners(),this.oa=t,this.addAdListeners()}},{key:"inAdBreak",get:function(){return this.A5t}}]),t}(),K0=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).S5t=void 0,r.U3t=void 0,r.P5t=[],r.k5t=void 0,r.E5t=void 0,r.nq=void 0,r.Wz=void 0,r.C5t=void 0,r.I5t=1,r.U3t=i,r.S5t=new S0(r),r.S5t.g4t.$3t(n,i,r,i.Cd),r}Ct(i,t);var n=i.prototype;return n._nt=function(){return this.S5t},n.GP=function(){this.U3t.GP(),this.S5t.GP()},n.QP=function(){void 0===this.nq?(void 0!==this.E5t&&this.x5t(this.E5t),t.prototype.QP.call(this)):this.So(new yb(this.nq))},n.Ta=function(i,n){var r=this;return Vt(function(){var e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:if(dr(n),!(e=i))return[3,4];s=Lt(this.P5t),f.label=1;case 1:return(u=s()).done?[3,4]:[4,u.value.Ta(e,n)];case 2:e=f.sent(),f.label=3;case 3:return[3,1];case 4:return[4,t.prototype.Ta.call(r,e,n)];case 5:if(f.sent(),dr(n),null==e?void 0:e.ads)for(o=Boolean(e.blockContentIfAdError),this.S5t.S4t(e.playAdsAfterTime),h=Lt(e.ads);!(a=h()).done;)c=a.value,this.S5t.W6(c,DB.Mnt,o);return[2]}})}).call(this)},n.KP=function(){var i=this;return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return this.nq=void 0,this.Wz=void 0,[4,this.S5t.hr()];case 1:return e.sent(),this.I3t(),[4,t.prototype.KP.call(i)];case 2:e.sent(),n=Lt(this.P5t),e.label=3;case 3:return(r=n()).done?[3,6]:[4,r.value.b5t()];case 4:e.sent(),e.label=5;case 5:return[3,3];case 6:return[2]}})}).call(this)},n.x5t=function(t){this.I5t=this.oa.vP;var i=this.oa.OP,n=this.oa.oP;t.UP(i),t.uP(n),this.k5t=t,this.E5t=void 0,this.nO(t)},n.b4t=function(t){void 0===this.k5t&&(this.E5t=t)},n.I3t=function(){this.E5t=void 0,void 0!==this.k5t&&(this.U3t.vP=this.I5t,this.U3t.OP=this.OP,this.U3t.oP=this.oP,this.nO(this.U3t),this.k5t=void 0)},n.Yx=function(){var i;return null!=(i=this.Wz)?i:t.prototype.Yx.call(this)},n.Zx=function(){var i;return null!=(i=this.nq)?i:t.prototype.Zx.call(this)},n.Qq=function(t){void 0===this.Zx()&&(this.nq=t,this.Wz=cg(t),this.So(new yb(t)))},n.eI=function(t){return void 0===this.k5t&&this.S5t.l4t(t)},n.Wnt=function(t,i){try{var n=new Q0(t,this);n.uN=i(n.Ca),this.S5t.znt(n),this.P5t.push(n),t!==pS.UPLYNK&&(this.C5t=new Y0(this))}catch(i){this.S5t.So(new A0(kZ.GENERAL,'Error while constructing ad integration "'+t+'": '+i+'"'))}},n.gP=function(i){var n;(null==(n=this.C5t)?void 0:n.inAdBreak)||t.prototype.gP.call(this,i)},n.kn=function(){var i=this;return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:r=Lt(this.P5t),s.label=1;case 1:return(e=r()).done?[3,4]:[4,e.value.kn().catch(dn)];case 2:s.sent(),s.label=3;case 3:return[3,1];case 4:return[4,this.S5t.kn()];case 5:return s.sent(),this.I3t(),null==(n=this.C5t)||n.destroy(),this.C5t=void 0,[4,t.prototype.kn.call(i)];case 6:return s.sent(),[2]}})}).call(this)},Nt(i,[{key:"T5t",get:function(){return this.k5t}}]),i}(a0);qb(function(t){return new K0(t,kS.Bg)},zb.Ant),U(),Et(),xt(),U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Wt(),xt(),Pt(),Qt();var J0=Bi.ru&&Bi.Q_<12,Z0=function(t){function i(i,n){var r;return(r=t.call(this,i,!0)||this).A4t=void 0,r.M5t=void 0,r.sO=void 0,r.tO=void 0,r.Gl=void 0,r.eO=void 0,r.iO=void 0,r.R5t=void 0,r.ha=void 0,r.cq=void 0,r.L5t=void 0,r.O5t=void 0,r.A4t=n,r.M5t=!1,r.sO=new rg,r.tO=new rg,r.Gl=new Km,r.eO=new iA,r.iO=new MT,r.R5t=new xI,r.ha=new tS,r.cq=new Db,r.L5t=function(){r.oa.be()},r.O5t=function(){r.F5t()},r.oa.wn(eh.Pw,r.Rs),r}Ct(i,t);var n=i.prototype;return n.nnt=function(){return this.oa.nnt()},n.Ux=function(){return EA.rL()._s()},n.Hx=function(){},n.Wx=function(t){},n._P=function(){return 1},n.gP=function(t){},n.mP=function(){return new EA([0,this.zx])._s()},n.PP=function(){return!1},n.RP=function(){return this.Gl},n.BP=function(){return this.sO},n.ds=function(){return this.qP().ds},n.qP=function(){return this.ha},n.Ea=function(){},n.kn=function(){return Vt(function(){return zt(this,function(t){return this.Vo(),this.tO.kn(),this.sO.kn(),this.Gl.kn(),this.R5t.kn(),this.oa.mn(eh.Pw,this.Rs),[2]})}).call(this)},n.D5t=function(){J0&&this.N5t(),this.w4t||this.A4t.x5t(this)},n.I3t=function(){this.w4t&&(J0&&this.B5t(),Bi.Tg&&this.xe.querySelectorAll("video[src]").forEach(function(t){t.src=""}),Ui.Zs.Ep&&this.oa.tI(),this.A4t.I3t())},n.N5t=function(){this.M5t||(f.addEventListener("blur",this.L5t),f.addEventListener("focus",this.O5t),this.M5t=!0)},n.B5t=function(){f.removeEventListener("blur",this.L5t),f.removeEventListener("focus",this.O5t),this.M5t=!1},n.F5t=function(){var t=this;requestAnimationFrame(function(){return t.oa.we()})},Nt(i,[{key:"zx",get:function(){return this.Gx()},set:function(t){this.Xx(t)}},{key:"ct",get:function(){return this.Nd()}},{key:"$x",get:function(){return this.eO}},{key:"iP",get:function(){return this.iO}},{key:"kP",get:function(){return this.EP()}},{key:"VP",get:function(){return this.cq}},{key:"u4t",get:function(){return this.R5t}},{key:"ht",get:function(){return this.tO}},{key:"w4t",get:function(){return this.A4t.T5t===this}}]),i}(Ub);U(),Et(),Wt(),xt(),Ft(),Qt(),U(),Et(),xt(),Ft();var $0=0,t1="theoplayer-wrapper",i1=function(){function t(i,n,r,e){this.V5t=void 0,this.oa=void 0,this.G5t=void 0,this.Z5t=void 0,this.Q5t=void 0,this.$5t=void 0,this.e6t=void 0,this.n6t=void 0,this.r6t=void 0,this.Y5t=void 0,this.o6t=void 0,this.Yst=void 0,this.Iz=void 0,this.W5t=void 0,this.c6t=void 0,this.JI=void 0,this.V5t=n,this.oa=r,this.G5t=e,this.$5t=NaN,this.e6t=!1,this.n6t=!1,this.Y5t=!1,this.o6t=[],this.Yst=!1,this.Iz=!1,this.W5t=[],this.JI=++$0,this.c6t=i.timeOffset,this.Z5t=t.E6t(this.c6t),this.t6t(),this.W5t.push(i)}var i=t.prototype;return i.X5t=function(t){var i=this.j5t===t.timeOffset;return!this.Q5t&&i},i.t6t=function(){if(S(this.$5t)){var t=this.j5t;if(void 0===t)return void(this.$5t=0);if("string"==typeof t&&GZ(t)){var i=this.oa.Nd();S(i)||i===1/0||(t=NJ(t)*i)}S(t)||(this.$5t=t)}},i.a6t=function(t){this.o6t.push(t)},i.u6t=function(){if(!this.Q5t){var t,i,n=this.V5t===DB.Mnt&&void 0===this.c6t&&1===this.W5t.length,r=this.W5t[0];if(!n&&1===this.W5t.length){var e=Ui.Dh(r.sources.src).searchParams.get("output");e&&e.toLowerCase().indexOf("vmap")>-1&&(n=!0,void 0!==this.c6t&&We("Do not set a timeOffset for VMAP ad sources. VMAP ads have their own offsets included."))}if(WZ(r.sources.type)||n)t=r.sources.src;else{if(S(this.oa.Nd())&&"end"===this.d6t())return;i=this.l6t()}var s=this.oa.Nd();(S(s)||s===1/0)&&(s=-3),this.Q5t={f6t:this.oa.xe.offsetWidth,v6t:this.oa.xe.offsetHeight,_6t:this.oa.xe.offsetWidth,g6t:this.oa.xe.offsetHeight,p6t:this.Yst,m6t:this.Iz,w6t:t,y6t:i,b6t:r.omidAccessModeRules,A6t:s}}return this.Q5t},i.l6t=function(){var t=this;return''+this.W5t.map(function(i,n){return t.S6t(i.sources,n)}).join("\n")+""},i.S6t=function(t,i){var n=this.d6t(),r=t.src;return'"},i.d6t=function(){if(0===this.j5t)return"start";if(this.j5t===1/0)return"end";var t=this.j5t;if("string"==typeof t&&GZ(t)){var i=NJ(t)*this.oa.Nd();return DZ.h$t(i)}return DZ.h$t(this.j5t||0)},i.T6t=function(t){this.W5t.push(t)},i.k6t=function(t){for(var i,n=t1+"-"+this.JI+"-",r=Lt(t);!(i=r()).done;){var e=i.value;if(Fo(e,n)){var s=Number(e.slice(n.length));if(!S(s)&&s>=0&&st.dd&&this.P6t.dd!==t.dd},i.N6t=function(t){if(t.length)return t.sort(function(t,i){return t.dd-i.dd})[0]},i.B6t=function(){if(this.Unt.length)return this.N6t(this.M6t(this.t.Gx()))},i.L6t=function(){var t=this;if(!(void 0!==this.R6t&&this.R6t>=0))return this.Unt.filter(function(i){return!i.i6t&&0===i.dd&&i!==t.P6t})[0]},i.M6t=function(t){var i=this;if(!this.O6t&&(this.O6t=!this.Unt.some(function(t){return S(t.dd)}),!this.O6t))return[];var n=this.Unt.filter(function(i){return!i.i6t&&(i.q5t||!S(i.dd)&&t<=i.dd)});return void 0===this.R6t?n:n.filter(function(t){return t.q5t||void 0===t.j5t||t.dd>i.R6t})},Nt(t,[{key:"P6t",get:function(){return this.I6t.P6t}},{key:"C6t",get:function(){return this.I6t.C6t}},{key:"Unt",get:function(){return this.I6t.Unt}},{key:"t",get:function(){return this.I6t.t}}]),t}(),r1=function(t){return t[t.F6t=0]="F6t",t[t.U6t=1]="U6t",t[t.V6t=2]="V6t",t}({}),e1=function(){function t(t,i,n,r,e){var s=this;this.Q6t=void 0,this.N4t=void 0,this.H6t=void 0,this.ko=void 0,this.oa=void 0,this.A4t=void 0,this.u8t=void 0,this.e8t=void 0,this.a8t=void 0,this.Zst=void 0,this.K6t=0,this.Ypt=void 0,this.X6t=void 0,this.c8t=!1,this.vX=function(){for(var t,i=Lt(s.N4t.filter(function(t){return t.J5t}));!(t=i()).done;){var n=t.value;n.t6t();var r=n.j5t;s.X6t.f8t(r,n.dd)}s.ko&&s.d8t&&s.W6t()},this.N4t=[],this.Q6t=t,this.ko=!1,this.H6t=!1,this.oa=i,this.A4t=n,this.P6t=void 0,this.e8t=0,this.a8t=new n1(this),this.Zst=r,this.X6t=e,this.oa.wn(eh.Cw,this.vX)}var i=t.prototype;return i.GP=function(){this.ko=!0,this.H6t&&this.W6t()},i.q6t=function(t,i){this.z6t(t,i);var n=Fn(this.Unt,function(i){return i.X5t(t)});if(n)n.T6t(t);else{var r,e=new i1(t,i,this.oa,null==(r=t.replaceContent)||r);this.N4t.push(e),2===this.G6t&&this.X6t.c5t(e.dd,e,e.j5t),this.j6t(i,e)}},i.Y6t=function(){if(Xn(this.Unt,this.P6t),this.P6t){for(var t,i=Lt(this.P6t.h6t);!(t=i()).done;){t.value;this.X6t.J6t()}this.P6t=void 0}},i.Z6t=function(){for(var t,i=Lt(this.N4t);!(t=i()).done;)for(var n,r=Lt(t.value.h6t);!(n=r()).done;){var e=n.value;this.X6t.$6t(e,!0)}Yn(this.N4t)},i.t8t=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Y6t(),this.i8t=!0,this.P6t=t,this.e8t=t.dd,this.Ypt=this.s8t(t),[4,this.Ypt];case 1:return i.sent(),this.Ypt=void 0,[2]}})}).call(this)},i.s8t=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return[4,this.n8t(t)];case 1:if(r.sent(),!(i=t.u6t()))return this.i8t=!1,this.P6t=void 0,[2];n=this.Q6t.r8t(i),t.i6t=!0,r.label=2;case 2:return r.trys.push([2,4,,6]),[4,n];case 3:return r.sent(),t.U5t===DB.Bnt&&this.Q6t.h8t(),[3,6];case 4:return r.sent(),this.P6t=void 0,[4,this.W6t()];case 5:return r.sent(),[3,6];case 6:return[2]}})}).call(this)},i.n8t=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return t.oP=this.A4t.oP,this.A4t.vO?[4,this.Zst.XK(this.A4t.oP)]:(t.vO=!1,[2]);case 1:switch(i.sent()){case"all":case"muted":t.vO=!0;break;case"none":t.vO=!1}return[2]}})}).call(this)},i.o8t=function(){var t;return null!=(t=this.a8t.L6t())?t:this.a8t.B6t()},i.W6t=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.P6t&&!this.P6t.K5t?[2,this.Ypt]:(t=this.o8t())?[4,this.t8t(t)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})}).call(this)},i.hr=function(){this.Y6t(),Yn(this.N4t),this.e8t=0,this.P6t=void 0,this.Ypt=void 0,this.i8t=!1},i.s6t=function(){this.i8t=!1,this.P6t&&(this.P6t.s6t=!0)},i.j6t=function(t,i){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return t===DB.Bnt&&this.ko&&this.a8t.D6t(i)?this.nXt||"linear"===this.Q6t.V4t||!(!this.P6t||this.P6t&&this.P6t.i6t)?[3,3]:[4,ut.resolve()]:[3,3];case 1:return n.sent(),[4,this.t8t(i)];case 2:n.sent(),n.label=3;case 3:return[2]}})}).call(this)},i.x6t=function(){this.P6t&&this.P6t.x6t()},i.l8t=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.d8t?(t=this.o8t())?[4,this.t8t(t)]:[3,2]:[2];case 1:i.sent(),i.label=2;case 2:return[2]}})}).call(this)},i.z6t=function(t,i){var n=t.sources.type,r=i===DB.Mnt&&void 0===t.timeOffset,e=WZ(n)||r?1:2;e!==this.K6t&&(this.K6t=e,this.Z6t(),this.Q6t.j0t&&!this.nXt&&"linear"!==this.Q6t.V4t&&(this.Q6t.j0t.zg(),this.P6t=void 0,this.Ypt=void 0),this.e8t=0,this.H6t=!0)},i.S4t=function(t){this.a8t.S4t(t)},i.kn=function(){this.oa.mn(eh.Cw,this.vX)},Nt(t,[{key:"C6t",get:function(){return this.Q6t}},{key:"Unt",get:function(){return this.N4t}},{key:"t",get:function(){return this.oa}},{key:"nXt",get:function(){return Boolean(this.Ypt)}},{key:"G6t",get:function(){return this.K6t}},{key:"P6t",get:function(){return this.u8t},set:function(t){this.u8t=t}},{key:"i8t",get:function(){return this.c8t},set:function(t){this.c8t=t}},{key:"d8t",get:function(){var t=this;return!this.nXt&&!this.i8t&&(!(this.P6t&&!this.P6t.K5t)&&(!!this.N4t.filter(function(i){return t.P6t!==i}).length&&Boolean(this.o8t())))}}]),t}();U(),Et(),Wt(),Pt(),Qt(),U(),Et();var s1=function(t){return t.v8t="contentResumeRequested",t._8t="contentPauseRequested",t.g8t="click",t.Cw="durationChange",t.p8t="expandedChanged",t.m8t="start",t.w8t="impression",t.Yz="pause",t.y8t="resume",t.b8t="adProgress",t.A8t="adBuffering",t.S8t="firstQuartile",t.XJt="midpoint",t.T8t="thirdQuartile",t.jJt="complete",t.k8t="userClose",t.E8t="linearChanged",t.x8t="loaded",t.P8t="adCanPlay",t.I8t="adMetadata",t.C8t="adBreakReady",t.R8t="interaction",t.D8t="allAdsCompleted",t.N8t="skip",t.B8t="skippableStateChanged",t.M8t="log",t.L8t="viewableImpression",t.O8t="volumeChange",t.F8t="mute",t}({});U(),Et();var u1=function(t){return t.U8t="adError",t}({});U(),Et();var o1=function(t){return t[t.V8t=-1]="V8t",t[t.H8t=-1]="H8t",t[t.W8t=-1]="W8t",t[t.q8t=101]="q8t",t[t.z8t=102]="z8t",t[t.G8t=200]="G8t",t[t.X8t=201]="X8t",t[t.j8t=202]="j8t",t[t.Q8t=300]="Q8t",t[t.K8t=301]="K8t",t[t.Y8t=302]="Y8t",t[t.J8t=303]="J8t",t[t.Z8t=400]="Z8t",t[t.$8t=402]="$8t",t[t.t9t=403]="t9t",t[t.i9t=405]="i9t",t[t.e9t=500]="e9t",t[t.s9t=501]="s9t",t[t.n9t=-1]="n9t",t[t.r9t=503]="r9t",t[t.h9t=602]="h9t",t[t.o9t=900]="o9t",t[t.a9t=901]="a9t",t[t.u9t=1005]="u9t",t[t.c9t=1007]="c9t",t[t.d9t=1009]="d9t",t[t.l9t=1010]="l9t",t[t.f9t=1011]="f9t",t[t.v9t=1012]="v9t",t[t._9t=1013]="_9t",t[t.g9t=1020]="g9t",t[t.p9t=1021]="p9t",t[t.m9t=1101]="m9t",t[t.w9t=1204]="w9t",t[t.y9t=1205]="y9t",t[t.b9t=1300]="b9t",t[t.A9t=-1]="A9t",t[t.S9t=-1]="S9t",t[t.T9t=-1]="T9t",t[t.k9t=-1]="k9t",t}({}),h1=function(t){return t.E9t="adLoadError",t.x9t="adPlayError",t}({});function a1(t,i){if(t===s1.b8t){var n=i;return{P9t:n.adBreakDuration,I9t:n.adPosition,zx:n.currentTime,ct:n.duration,C9t:n.totalAds}}return i}function c1(t){switch(t){case google.ima.AdError.Type.AD_LOAD:return h1.E9t;case google.ima.AdError.Type.AD_PLAY:return h1.x9t}}function f1(t){return Wi(t)&&Yi(t.getVastErrorCode)}function v1(t){var i=t.getInnerError(),n=i&&f1(i)?v1(i):void 0;return{Iy:t.getMessage(),TZt:t.getErrorCode(),R9t:t.getVastErrorCode(),Km:c1(t.getType()),D9t:n}}function d1(t){if(Li(t))return t}U(),Et(),U(),Et();var l1=function(t){function i(i,n,r){var e,s;return e=t.call(this)||this,(s=e).Q6t=void 0,s.oa=void 0,s.K9t=void 0,s.R7t=void 0,s.x7t=void 0,s.P7t=void 0,s.Q0t=void 0,s.r7t=void 0,s.u7t=void 0,s.c7t=void 0,s.M9t=void 0,s.F9t=void 0,s.U9t=void 0,s.V9t=void 0,s.H9t=void 0,s.W9t=void 0,s.q9t=void 0,s.z9t=void 0,s.L9t=void 0,s.O9t=void 0,s.Q6t=i,s.oa=n,s.K9t=r,s.R7t=!1,s.x7t=void 0,s.P7t=void 0,s.r7t=0,s.u7t=function(t){if(t.jnt&&t.jnt.v7t){var i=t.jnt.v7t;s.K9t.d5t(i.qOt,i.C9t,i.G0t)}},s.c7t=function(t){var i,n,r;if(!(s.r7t>=5)){s.r7t++;var e=t.J9t;if(function(t){return Wi(t)&&void 0!==t.P9t&&void 0!==t.C9t}(e)){var u=null==(r=s.Q0t)||null==(n=r.d7t())||null==(i=n.v7t)?void 0:i.qOt;void 0!==u&&s.K9t.d5t(u,e.C9t,e.P9t)}}},s.M9t=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return t.J9t.D7t?[4,s.i7t(t.J9t.D7t)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})()},s.F9t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return s.R7t=!0,s.Q6t.x6t(),[4,s.O9t()];case 1:return t.sent(),[2]}})})()},s.U9t=function(t){if(t.jnt){0;var i=t.jnt;s.Q6t.w7t(i),s.Q6t.be(),s.Q6t.N7t(),s.Q6t.B7t=!0,s.K9t.M7t(i);var n=i.ct;if(s.Y9t(n),i.h7t){var r=s.Q6t.zx,e=s.Q6t.AP;s.Q6t.a5(Dy.XL),s.N9t(new xy(r,e)),s.N9t(new Oy(r,e)),s.N9t(new My(r,e)),s.Q6t.lP||s.N9t(new Ly(s.Q6t.zx)),s.setCountdownTimer(),s.X9t(!0)}else s.Q6t.I3t(),s.oa.be(),s.Q6t.lP||s.oa.QP()}},s.V9t=function(t){var i;if(t.jnt){0;var n=t.jnt;if(s.vm(),s.K9t.m7t(s.Q6t.ct,n.h7t),s.Q6t.AP!==Dy.zL){var r=Dy.zL;s.Q6t.a5(r);var e=s.Q6t.zx;s.N9t(new aT(e,r))}s.Y9t(NaN),s.Q6t.B7t=!1,null==(i=s.Q0t)||i.UP(s.Q6t.o7t())}},s.H9t=function(t){t.jnt&&(s.V9t(t),s.K9t.H9t(t.jnt,s.Q6t.zx,s.Q6t.ct))},s.W9t=function(t){t.jnt&&(s.K9t.m7t(-1,t.jnt.h7t),s.Q6t.x6t(),!t.jnt.h7t&&s.Q6t.d8t()&&s.Q6t.l8t())},s.q9t=function(t){t.jnt&&(t.jnt.h7t?s.Q6t.jP():s.oa.jP())},s.z9t=function(){var t;(s.Q6t.B7t=!0,s.Q6t.L7t)&&(null==(t=s.Q0t)||t.jP(),s.Q6t.L7t=!1)},s.L9t=function(t){var i;if(t.jnt){0,s.Q6t.E7t&&(s.P7t=s.oa.Gx(),s.oa.$P(),s.oa.WP=!0),s.Q6t.O7t=!0;var n=t.jnt;s.K9t.Ed(n);var r=n.ct;s.Q6t.w7t(n),s.Y9t(r),s.Q6t.G9t(!1),s.Q6t.be(),s.Q6t.D5t(),s.Q6t.E7t||s.oa.we(),s.oa.jP(),s.Q6t.F7t(n),0===(null==(i=n.v7t)?void 0:i.qOt)||s.Q6t.So(new By(s.Q6t.zx))}},s.O9t=function(t){return Vt(function(){var i,n,r,e,u;return zt(this,function(o){switch(o.label){case 0:return i=null==t?void 0:t.jnt,s.Q6t.O7t=!1,"linear"===s.Q6t.V4t&&s.K9t.Bd(),i&&i.ct>=0&&s.Y9t(i.ct),s.oa.Nd()===1/0&&s.Q6t.U7t(),s.Q6t.B7t=!1,s.R7t?[4,s.p7t()]:[3,2];case 1:o.sent(),o.label=2;case 2:s.Q6t.G9t(!0),o.label=3;case 3:return o.trys.push([3,5,,6]),[4,s.k7t()];case 4:return o.sent(),[3,6];case 5:return vr(n=o.sent())||s.So(new CK(n)),[2];case 6:return s.Q6t.I3t(),s.Q6t.we(),s.oa.Qx||s.oa.QP(),i&&s.Q6t.w7t(i),s.Q6t.A7t&&(s.Q6t.E7t&&(e=s.oa.zP(),u=null==(r=s.oa.bt)?void 0:r.src,e&&u&&(e.src=u)),s.Q6t.S7t=!0),s.oa.WP=!1,s.Q6t.d8t()?[4,s.Q6t.l8t()]:[3,8];case 7:o.sent(),o.label=8;case 8:return[2]}})})()},e}Ct(i,t);var n=i.prototype;return n.N9t=function(t){this.Q6t.So(t)},n.B9t=function(t){var i=this;this.Q0t=t,this.Q0t.wn(u1.U8t,this.M9t),this.Q0t.wn(s1._8t,this.L9t),this.Q0t.wn(s1.v8t,this.O9t),this.Q0t.wn(s1.D8t,this.F9t),this.Q0t.wn(s1.m8t,this.U9t),this.Q0t.wn(s1.jJt,this.V9t),this.Q0t.wn(s1.N8t,this.H9t),this.Q0t.wn(s1.k8t,this.W9t),this.Q0t.wn(s1.g8t,this.q9t),this.Q0t.wn(s1.P8t,this.z9t),this.Q0t.wn(s1.Yz,function(){i.Q6t.lP||(i.Q6t.G9t(!0),i.Q6t.So(new cT(i.Q6t.zx))),i.X9t(!0)}),this.Q0t.wn(s1.y8t,function(){i.Q6t.lP&&(i.Q6t.G9t(!1),i.Q6t.So(new fT(i.Q6t.zx)))}),this.Q0t.wn(s1.F8t,function(){var n=t.FP();n>=0&&i.j9t(n)}),this.Q0t.wn(s1.O8t,function(){var n=t.FP();n>=0&&i.j9t(n)}),this.Q0t.wn(s1.I8t,function(t){i.K9t.Q9t(t.type)}),this.Q0t.wn(s1.Cw,function(t){t.jnt&&i.Y9t(t.jnt.ct)}),this.Q0t.wn(s1.M8t,function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=t.J9t.adError,(n=f1(i)?v1(i):void 0)?this.Z9t(n)?[4,this.$9t(t)]:[3,2]:[2];case 1:return r.sent(),[3,5];case 2:return this.t7t(n)?[4,this.i7t(n)]:[3,4];case 3:return r.sent(),[3,5];case 4:this.e7t(n)&&this.s7t(n),r.label=5;case 5:return[2]}})}).call(i)}),this.Q0t.wn(s1.x8t,function(t){if(t.jnt&&(i.Q6t.s6t(),i.K9t.n7t(t.jnt),i.r7t=0,t.jnt.h7t)){var n,r=i.Q6t.AP,e=Dy.zL;i.Q6t.a5(e);var s=i.Q6t.zx,u=i.Q6t.AP;u!==r&&i.N9t(new aT(s,u)),null==(n=i.Q0t)||n.UP(i.Q6t.o7t()),i.N9t(new Ny(s,e))}}),this.Q0t.wn([s1.A8t,s1.w8t,s1.S8t,s1.XJt,s1.T8t],function(t){t.jnt&&i.K9t.a7t(t.jnt,t.type,i.Q6t.zx)}),this.Q0t.wn(s1.S8t,this.u7t),this.Q0t.wn(s1.b8t,this.c7t)},n.switchToPlayerIfNoNextAd=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return this.Q0t?(t=this.Q0t.d7t())&&this.l7t(t)?[3,3]:this.Q6t.d8t()?[4,this.Q6t.l8t()]:[3,2]:[3,4];case 1:return n.sent(),[3,3];case 2:this.Q6t.f7t(),this.oa.lP&&!this.oa.Qx&&this.oa.QP(),n.label=3;case 3:return[3,7];case 4:return this.Q6t.d8t()?[4,this.Q6t.l8t()]:[3,6];case 5:return n.sent(),[3,7];case 6:i=this.Q6t.lP,this.Q6t.f7t(),i||this.oa.QP(),n.label=7;case 7:return[2]}})}).call(this)},n.l7t=function(t){var i=t.v7t,n=null==i?void 0:i.C9t;return(null==i?void 0:i.I9t)!==n},n.vm=function(){this.Q6t.Dc&&(m(this.Q6t.Dc),this.Q6t.Dc=null)},n.e7t=function(t){return t.Km===h1.E9t},n.t7t=function(t){return t.Km===h1.x9t},n.Z9t=function(t){return t.TZt===o1.d9t},n.i7t=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.s7t(t),this._7t(t)?(this.Q6t.g7t.i8t=!1,null==(i=this.Q6t.g7t.P6t)||i.x6t(),[4,this.switchToPlayerIfNoNextAd()]):[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(this)},n._7t=function(t){var i;if(w1(t))return!0;if(this.Q6t.nrt)return!1;var n=[o1.Z8t,o1.a9t,o1.p9t,o1.y9t];return!(jn(n,t.TZt)||jn(n,null==(i=t.D9t)?void 0:i.TZt))},n.s7t=function(t){this.Q6t.v5t(t)},n.p7t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.K9t.J6t(),this.Q6t.x6t(),"nonlinear"===this.Q6t.V4t&&(this.K9t.m7t(-1,!1),this.Q6t.w7t(void 0)),"nonlinear"!==this.Q6t.V4t&&"none"!==this.Q6t.V4t?[3,2]:this.Q6t.d8t()?[4,this.Q6t.l8t()]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.Q6t.y7t(),this.Q6t.w4t?this.Q6t.I3t():this.b7t()&&this.oa.So(new lT(this.oa.Gx())),[2]}})}).call(this)},n.b7t=function(){return this.Q6t.A7t&&!this.Q6t.S7t&&this.oa.Qx},n.setCountdownTimer=function(){var t=this;this.vm(),this.Q6t.Dc=_(function(){return t.X9t()},250)},n.$9t=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return void 0===t.jnt?[2]:(this.Q6t.g7t.i8t=!1,this.Q6t.x6t(),this.Q6t.d8t()?[4,this.Q6t.l8t()]:[3,2]);case 1:return i.sent(),[3,3];case 2:this.Q6t.G9t(!0),i.label=3;case 3:return[2]}})}).call(this)},n.Y9t=function(t){this.Q6t.ct!==t&&t>=0&&(this.Q6t.F4(t),this.N9t(new vT(this.Q6t.ct)))},n.j9t=function(t){this.Q6t.o7t()!==t&&(0===t?this.Q6t.T7t(t,!0,!1):this.Q6t.T7t(t,!1,!1))},n.k7t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Q6t.E7t&&void 0!==this.oa.Yx()?(this.x7t=new hr,[4,_r(this.oa.Ta(this.oa.nu(),this.x7t.Yg),this.x7t)]):[3,2];case 1:t.sent(),this.P7t&&this.oa.Xx(this.P7t),this.P7t=void 0,t.label=2;case 2:return[2]}})}).call(this)},n.X9t=function(t){if(this.Q0t){var i=this.Q0t.I7t();i>this.Q6t.ct&&this.Y9t(b.round(i))}var n=this.Q6t.zx;(t||!this.Q6t.lP&&n!==this.Q6t.C7t)&&(this.Q6t.So(new bw(n,void 0)),this.Q6t.C7t=n)},n.hr=function(){this.x7t&&(this.x7t.Zg(),this.x7t=void 0),this.R7t=!1,this.r7t=0},n.kn=function(){this.hr(),this.Vo()},i}(th);function w1(t){var i,n;return t.R9t===o1.J8t||(null==(i=t.D9t)?void 0:i.R9t)===o1.J8t||t.TZt===o1.d9t||(null==(n=t.D9t)?void 0:n.TZt)===o1.d9t}U(),Et(),xt(),Pt(),Ft(),U(),Et(),xt(),Pt();var g1=function(t){function i(i,n,r){var e;return(e=t.call(this,i)||this).V7t=void 0,e.H7t=void 0,e.V7t=n,e.H7t=r,e}return Ct(i,t),Nt(i,[{key:"u$t",get:function(){return x$.v1t}}]),i}(E0);U(),Et(),xt(),Pt(),U(),Et(),U(),Et(),xt(),Pt();var _1=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).q7t=0,r.z7t=void 0,r}Ct(i,t);var n=i.prototype;return n.a1t=function(){var t;return null==(t=this.z7t)?void 0:t.QKt},n.xa=function(){return function(t,i){return Mw(t,{bitrate:0,contentType:void 0,mediaUrl:void 0,traffickingParameters:void 0,traffickingParametersString:void 0,universalAdIds:[],get description(){return i._N},get apiFramework(){return i.G7t},get creativeId(){return i.wYt},get title(){return i.gq},get wrapperAdIds(){return i.X7t},get wrapperAdSystems(){return i.j7t},get wrapperCreativeIds(){return i.Q7t}})}(D0(this),this)},n.K7t=function(t){this.z7t=t;var i=m1(t);this.O4t(t.fJt,t.Y7t,t.J7t,t.ct,i,-1)},Nt(i,[{key:"W7t",get:function(){return this.q7t},set:function(t){this.q7t=t}},{key:"u$t",get:function(){return x$.so}},{key:"G7t",get:function(){var t;return null==(t=this.z7t)?void 0:t.FYt}},{key:"wYt",get:function(){var t;return null==(t=this.z7t)?void 0:t.wYt}},{key:"_N",get:function(){var t;return null==(t=this.z7t)?void 0:t._N}},{key:"gq",get:function(){var t;return null==(t=this.z7t)?void 0:t.gq}},{key:"X7t",get:function(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.X7t)?i:[]}},{key:"j7t",get:function(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.j7t)?i:[]}},{key:"Q7t",get:function(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.Q7t)?i:[]}}]),i}(P0);function m1(t){return t.sYt.map(function(t){return new N0(t)})}var y1=function(t){function i(i){var n;return(n=t.call(this,i,R0.yk)||this).z7t=void 0,n.IJt=void 0,n}Ct(i,t);var n=i.prototype;return n.xa=function(){return function(t,i){return Mw(t,{get adSystem(){return i.a1t()},get apiFramework(){return i.G7t},get bitrate(){return i.z9},get contentType(){return i.GT},get creativeId(){return i.wYt},get description(){return i._N},get mediaUrl(){return i.PJt},get title(){return i.gq},get traffickingParameters(){return i.Z7t},get traffickingParametersString(){return i.$7t},get wrapperAdIds(){return i.X7t},get wrapperAdSystems(){return i.j7t},get wrapperCreativeIds(){return i.Q7t},get universalAdIds(){return i.rYt}})}(D0(this),this)},n.K7t=function(t){this.z7t=t,this.O4t(t.fJt,t.Y7t,t.J7t,t.ct,m1(t),t.tti),this.H4t=t.h7t?R0.BZt:R0.L4t},n.a1t=function(){return this.z7t?p1(this.z7t.QKt):void 0},Nt(i,[{key:"u$t",get:function(){return x$.v1t}},{key:"G7t",get:function(){return this.z7t?p1(this.z7t.FYt):void 0}},{key:"z9",get:function(){return this.z7t?this.z7t.iti:0}},{key:"GT",get:function(){return this.z7t?p1(this.z7t.GT):void 0}},{key:"wYt",get:function(){return this.z7t?p1(this.z7t.wYt):void 0}},{key:"eti",get:function(){return this.z7t?p1(this.z7t.eti):void 0}},{key:"_N",get:function(){var t;return null==(t=this.z7t)?void 0:t._N}},{key:"PJt",get:function(){var t,i=null==(t=this.z7t)?void 0:t.PJt;return Li(i)?i:this.IJt},set:function(t){this.IJt=t}},{key:"gq",get:function(){var t;return null==(t=this.z7t)?void 0:t.gq}},{key:"Z7t",get:function(){return this.z7t?p1(this.z7t.Z7t):void 0}},{key:"$7t",get:function(){return this.z7t?p1(this.z7t.$7t):void 0}},{key:"X7t",get:function(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.X7t)?i:[]}},{key:"j7t",get:function(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.j7t)?i:[]}},{key:"Q7t",get:function(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.Q7t)?i:[]}},{key:"rYt",get:function(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.rYt.map(function(t){return{adIdRegistry:t.sti,adIdValue:t.nti}}))?i:[]}}]),i}(P0);function p1(t){return null===t?void 0:t}U(),Et(),xt(),U(),Et(),xt();var k1=function(){function t(t,i){this.K9t=void 0,this.rti=void 0,this.K9t=t,this.rti=i}var i=t.prototype;return i.qnt=function(t){this.K9t.qnt(t)},i.uD=function(){this.K9t.uD()},i.Hnt=function(t){this.K9t.Hnt(t)},i.kn=function(){return ut.resolve()},Nt(t,[{key:"u4t",get:function(){return this.K9t.u4t}},{key:"r4t",get:function(){return this.rti}},{key:"w4t",get:function(){return this.K9t.w4t}},{key:"Fnt",get:function(){var t;return null!=(t=this.K9t.Fnt)?t:null}},{key:"Lnt",get:function(){var t=this.K9t.hti;return t?[t]:[]}},{key:"Unt",get:function(){return this.K9t.Unt}},{key:"Vnt",get:function(){return this.K9t.Vnt}}]),t}(),b1=function(){function t(t,i){this.R5t=void 0,this.y1t=void 0,this.u1t=void 0,this.w1t=void 0,this.uti=void 0,this.ati=void 0,this.R5t=t,this.y1t=[],this.uti=!1,this.ati=new k1(this,i)}return Nt(t,[{key:"oti",get:function(){return this.ati}},{key:"u4t",get:function(){return this.R5t}},{key:"w4t",get:function(){return this.uti}},{key:"hti",get:function(){return this.u1t}},{key:"Fnt",get:function(){return this.w1t}},{key:"Unt",get:function(){var t=this;return Jn(this.y1t,function(i){if(i.pP)return[];var n=i.Jc;if(i===t.w1t&&void 0!==t.u1t){var r=n.indexOf(t.u1t);if(r>=0)return n.slice(r+1)}return n})}},{key:"Vnt",get:function(){return this.y1t.filter(function(t){return!t.pP})}}]),t}();U(),Et(),Pt();var A1=function(t){function i(i){return t.call(this,"cti",i)||this}return Ct(i,t),i.prototype.xa=function(){return new T1(this.jnt.Ont())},i}(VB),T1=function(t){function i(i){return t.call(this,"adimpression",i)||this}return Ct(i,t),i}(HB);U(),Et(),Pt();var S1=function(t){function i(i){var n;return(n=t.call(this,"dti")||this).jnt=void 0,n.jnt=i,n}return Ct(i,t),i.prototype.xa=function(){return new E1(this.jnt.Ont())},i}(Aw),E1=function(t){function i(i){var n;return(n=t.call(this,"adbuffering")||this).ad=void 0,n.ad=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var I1=function(t){function i(){return t.call(this,"lti")||this}return Ct(i,t),i.prototype.xa=function(){return new R1},i}(Aw),R1=function(t){function i(){return t.call(this,"admetadata")||this}return Ct(i,t),i}(rh),C1=function(t){function i(i,n){var r;return(r=t.call(this,i,x$.v1t)||this)._ti=void 0,r.mti=void 0,r.pti=void 0,r._ti=n,r.mti=[],r.pti=[],r}Ct(i,t);var n=i.prototype;return n.fti=function(t,i){for(var n=0;ne){var s=i-e;this.fti(s,r),r.G0t=n,this.u4t.So(new F0(r))}}},n.H9t=function(t,n,r){if(this.w1t){var e=i.yti(this.w1t,t);if(e){var s=n/r;this.u4t.So(new M0(e,s))}}},n.a7t=function(t,n,r){if(this.w1t){var e=this.u1t;if(!e){var s=i.yti(this.w1t,t);if(!s||jn(this.pti,s))return void this.mti.push(n);e=s,this.h5t(this.w1t,t),this.gti(e)}this.Q9t(n,e,r)}},n.Q9t=function(t,i,n){t===s1.I8t?this.u4t.So(new I1):t===s1.w8t&&i?this.u4t.So(new A1(i)):t===s1.A8t&&i?this.u4t.So(new S1(i)):t===s1.S8t&&i&&n?this.u4t.So(new W0(i,n)):t===s1.XJt&&i&&n?this.u4t.So(new X0(i,n)):t===s1.T8t&&i&&n&&this.u4t.So(new G0(i,n))},n.uD=function(){this._ti.uD()},n.qnt=function(t){this._ti.qnt(t)},n.hr=function(){var t=Boolean(this.u1t&&this.u1t.V4t===R0.BZt);this.gti(void 0),this.vti(void 0,t);for(var i,n=Lt(this.y1t);!(i=n()).done;){var r=i.value;this.$6t(r)}Yn(this.y1t),Yn(this.mti),Yn(this.pti)},n.kn=function(){this.hr()},n.Hnt=function(t){},i.yti=function(t,i){if(i.v7t)return t.Jc[i.v7t.I9t-1]},Nt(i,[{key:"w4t",get:function(){return this._ti.w4t}}]),i}(b1);function P1(t){var i=f.google.ima.settings;t.ads&&t.ads.vpaidMode&&f.google.ima.settings.setVpaidMode(function(t){var i=f.google.ima.ImaSdkSettings.VpaidMode;switch(t){case VA.ENABLED:return i.ENABLED;case VA.INSECURE:return i.INSECURE;case VA.DISABLED:default:return i.DISABLED}}(t.ads.vpaidMode)),i.setPlayerVersion("10.3.0"),i.setPlayerType("THEOplayer"),i.setAutoPlayAdBreaks(!0),i.setDisableCustomPlaybackForIOS10Plus(!D1(t));var n=function(t){var i,n,r,e=null==(n=t.ads)||null==(i=n.googleIma)?void 0:i.language;if(void 0!==e)return e;var s=null==(r=t.ui)?void 0:r.language;if(Xi(s))return s;return}(t);n&&i.setLocale(n)}function D1(t){return Bi.ru&&t.allowNativeFullscreen}U(),Et(),U(),Et(),Wt(),xt(),Qt();var N1=function(){function t(t,i,n){this.bti=void 0,this.Ati=void 0,this.Sti=void 0,this.Q0t=void 0,this.bti=t,this.Ati=n,this.Sti=i}var i=t.prototype;return i.r8t=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.y7t(),this.bti.GY(),n=this,[4,this.Ati.r8t(t,this.Sti,i)];case 1:return n.Q0t=r.sent(),[2]}})}).call(this)},i.Tti=function(){var t;null==(t=this.Q0t)||t.Tn()},i.kti=function(){var t;null==(t=this.Q0t)||t.kti()},i.jP=function(){var t;null==(t=this.Q0t)||t.jP()},i.uD=function(){var t;null==(t=this.Q0t)||t.uD()},i.UP=function(t){var i;null==(i=this.Q0t)||i.UP(t)},i.Eti=function(t){var i;null==(i=this.Q0t)||i.Eti(t)},i.xti=function(){return Boolean(this.Q0t&&this.Q0t.d7t())},i.d7t=function(){var t;return null==(t=this.Q0t)?void 0:t.d7t()},i.I7t=function(){var t;return null==(t=this.Q0t)?void 0:t.I7t()},i.y7t=function(){this.Q0t&&(this.Ati.Pti(),this.Q0t.KP(),this.Q0t.zg(),this.Q0t=void 0)},i.kn=function(){this.y7t()},Nt(t,[{key:"j0t",get:function(){return this.Q0t},set:function(t){this.Q0t=t}}]),t}(),x1=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,i,n)||this).ko=!1,h.Sti=void 0,h.Cz=void 0,h.o5=void 0,h.Ati=void 0,h.bti=void 0,h.Dc=void 0,h.Zb=void 0,h.Lti=void 0,h.Fti=void 0,h.y4t=!1,h.Uti=void 0,h.Vti=void 0,h.I6t=void 0,h.Kti=void 0,h.eii=-1,h.H4t="none",h.GJ=void 0,h.qti=void 0,h.Hti=!1,h.X6t=void 0,h.Bti=!1,h.zti=new hr,h.R6t=void 0,h.Mti=!1,h.Oti=!1,h.Nti=void 0,h.rii=function(t){h.u4t.So(t)},h.sii=function(t){h.Uti=new hg(og.ADVERTISEMENT_ERROR,"Error while recovering from failed IMA ad.",t.error.message),h.Vti=fg(h.Uti)},h.C7t=NaN,h.Wti=function(){h.ko||h.GP()},h.GJ=r,h.Cz=!0,h.Zb=NaN,h.o5=Dy.zL,h.Lti=!1,h.Fti=!1,h.X6t=new C1(h.u4t,h),h.Kti=new l1(h,h.oa,h.X6t),h.Kti.wn(qm.ma,h.sii),h.oa.wn(eh.uo,h.Wti),h.I6t=new e1(h,h.oa,h.A4t,e,h.X6t),h.Sti=o,h.Ati=u,h.bti=s,h.Nti=new N1(s,o,u),h.we(),h.Ati.wn("nii",h.rii),h}Ct(i,t);var n=i.prototype;return n.Cti=function(t,i,n){i===DB.Mnt&&void 0!==n&&(this.y4t=n),this.I6t.q6t(t,i)},n.qnt=function(t){for(var i,n=Lt(this.Dti());!(i=n()).done;){var r=i.value;xJ(r.sources,r.timeOffset)||t.W6(r,DB.Bnt,!1)}},n.Dti=function(){for(var t,i=[],n=this.o4t,r=n.Lnt,e=n.Unt,s=[],u=Lt(r.concat(e));!(t=u()).done;){var o=t.value,h=o.od.H7t;if(!jn(s,h.JI)){var a,c,f=h.k6t(o.X7t);if(f>=0)(a=i).push.apply(a,[].concat(h.H5t.slice(f)));else(c=i).push.apply(c,[].concat(h.H5t));s.push(h.JI)}}for(var v,d=Lt(this.I6t.Unt);!(v=d()).done;){var l,w=v.value;if(!w.i6t)(l=i).push.apply(l,[].concat(w.H5t))}return nr(i)},n.Gx=function(){var t=this.Nti.I7t();return t?S(this.ct)||t<0?0:this.ct-t:0},n.Xx=function(t,i){},n.Nd=function(){return this.Zb||NaN},n.F4=function(t){this.Zb=t},n.aP=function(){return this.oa.oP},n.uP=function(t){this.T7t(this.OP,t,!0)},n.fP=function(){return this.Cz},n.G9t=function(t){this.Cz=t},n.NP=function(){var t,i;return null!=(i=null==(t=this.Nti.d7t())?void 0:t.J7t)?i:0},n.LP=function(){var t,i;return null!=(i=null==(t=this.Nti.d7t())?void 0:t.Y7t)?i:0},n.Ox=function(){return[]},n.S4t=function(t){this.R6t=t,this.I6t.S4t(t)},n.h8t=function(){!this.Bti&&this.j0t&&(this.Nti.Tti(),this.Bti=!0)},n.w7t=function(t){this.V4t=t?t.h7t?"linear":"nonlinear":"none"},n.EP=function(){return EA.rL()._s()},n.FP=function(){return this.oa.OP},n.UP=function(t){this.T7t(t,this.oP,!0)},n.o7t=function(){return this.oa.oP?0:this.oa.OP},n.T7t=function(t,i,n){var r=this.oa.OP!==t||this.oa.oP!==i;r&&(this.oa.OP=t,this.oa.oP=i),n&&this.Nti.UP(this.o7t()),r&&this.So(new _T(this.zx,this.OP))},n.Kx=function(){return!1},n.Yx=function(){if(this.Uti&&this.y4t)return this.Uti},n.Zx=function(){if(this.Vti&&this.y4t)return this.Vti},n.TP=function(){return this.o5},n.a5=function(t){this.o5=t,this.So(new Py(this.zx,t))},n.GP=function(){this.oa.mn(eh.uo,this.Wti),this.ko||(this.ko=!0,this.I6t.GP(),this.N7t())},n.QP=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:if(this.qti)return[2];this.zti.Zg(),this.zti=new hr,t=this.lP,this.G9t(!1),this.So(new fT(this.zx)),this.Nti.xti()||(this.E7t||this.oa.we(),this.So(new By(this.zx))),this.B7t||(this.L7t=!1),i=Boolean(this.j0t),this.qti=this.I6t.W6t(),n.label=1;case 1:return n.trys.push([1,,3,4]),[4,this.qti];case 2:return n.sent(),[3,4];case 3:return this.qti=void 0,[7];case 4:try{dr(this.zti.Yg)}catch(t){return[2]}if(this.ko||this.Wti(),this.Uti&&this.y4t)return[2];if(this.j0t){if(t)if(i)try{dr(this.zti.Yg),this.Nti.kti(),this.So(new Ly(this.zx))}catch(t){return[2]}else this.h8t()}else this.y4t||(this.I3t(),this.A4t.QP());return[2]}})}).call(this)},n.jP=function(){this.lP||(this.G9t(!0),this.So(new cT(this.zx))),this.zti.Zg(),this.B7t?this.Nti.jP():this.L7t=!0},n.uD=function(){this.Nti.uD()},n.y7t=function(){this.j0t&&(this.Nti.y7t(),this.V4t="none",this.Bti=!1)},n.KP=function(){return Vt(function(){var t;return zt(this,function(i){return this.C7t=0,this.I6t.hr(),this.zti.Zg(),this.G9t(!0),this.Lti=!1,this.Fti=!1,this.B7t=!1,this.X6t.hr(),this.y7t(),this.f7t(),null==(t=this.Sti)||t.hr(),this.L7t=!1,this.Ati.zg(),[2]})}).call(this)},n.be=function(){this.bti.be(),this.E7t&&this.oa.be()},n.we=function(){this.bti.we()},n.Gti=function(){return Boolean(this.j0t)&&jn(this.j0t.Xti(),-1)&&!this.Lti},n.s6t=function(){this.I6t.s6t()},n.d8t=function(){return this.I6t.d8t},n.x6t=function(){this.I6t.x6t()},n.l8t=function(){return this.I6t.l8t()},n.l4t=function(t){if(this.Gti()){if(t.type===eh.jw&&this.oa.Qx)return!0;if(t.type===eh.Nw)return this.Lti=!0,this.Ati.Pti(),!0}return!1},n.r8t=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),this.y7t(),i=this.jti(),[4,this.Nti.r8t(t,i)];case 1:return r.sent(),this.Bti=!1,this.Qti(this.j0t),[3,3];case 2:return n=r.sent(),this.Kti.i7t(n),[3,3];case 3:return[2]}})}).call(this)},n.Qti=function(t){if(t.UP(this.o7t()),this.I6t.G6t===r1.U6t){var i=t.Xti();if(i.length)for(var n,r=Lt(i);!(n=r()).done;){var e=n.value;this.X6t.c5t(e,this.I6t.P6t)}else this.X6t.c5t(this.I6t.P6t.dd,this.I6t.P6t)}this.Kti.hr(),this.Kti.B9t(t)},n.zP=function(){if(this.j0t&&this.E7t&&this.Nti.xti())return this.oa.zP()},n.qP=function(){return this.E7t&&this.w4t?this.oa.Ma:t.prototype.qP.call(this)},n.jti=function(){var t,i,n=!!(this.I6t.G6t===r1.U6t)&&this.Rti;return void 0!==this.GJ.ads.googleIma.uiElements?t=this.GJ.ads.googleIma.uiElements:this.GJ.ads.showCountdown||(t=[]),void 0!==this.GJ.ads.allowedMimeTypes&&(i=this.GJ.ads.allowedMimeTypes),{Yti:i,Jti:t,Zti:n,z9:this.GJ.ads.googleIma.bitrate,$ti:void 0,tii:this.R6t}},n.N7t=function(){if(this.j0t){var t=this.jti();this.Nti.Eti(t)}},n.v5t=function(t){w1(t)||(this.Uti=new hg(og.ADVERTISEMENT_ERROR,t.Iy),this.Vti=new ld(vd.AD_ERROR,"There was a problem playing ads.",this.Uti)),this.u4t.So(A0.f4t(t))},n.f7t=function(){this.w4t&&(this.oa.be(),this.I3t(),this.we())},n.U7t=function(){var t;this.oa.Gx()!==1/0&&0!==this.oa.EP().length&&((null==(t=this.I6t.P6t)?void 0:t.z5t)&&-1!==this.eii&&(this.oa.Xx(this.oa.Gx()+this.eii),this.eii=-1))},n.F7t=function(t){var i,n;this.eii=null!=(n=null==(i=t.v7t)?void 0:i.G0t)?n:-1},n.I3t=function(){t.prototype.I3t.call(this),this.oa.be(),this.E7t&&!this.oa.Qx&&this.oa.QP()},n.F5t=function(){this.E7t||t.prototype.F5t.call(this)},n.kn=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.Kti.mn(qm.ma,this.sii),[4,t.prototype.kn.call(i)];case 1:return n.sent(),this.y7t(),this.Nti.kn(),this.Ati.mn("nii",this.rii),this.Ati.zg(),this.bti.zg(),this.I6t.kn(),this.Kti.kn(),[2]}})}).call(this)},Nt(i,[{key:"o4t",get:function(){return this.X6t.oti}},{key:"Iti",get:function(){return this.X6t}},{key:"g7t",get:function(){return this.I6t}},{key:"E7t",get:function(){return D1(this.GJ)}},{key:"r4t",get:function(){return i.r4t}},{key:"Rti",get:function(){return this.GJ.ads.preload===WA.MIDROLL_AND_POSTROLL}},{key:"V4t",get:function(){return this.H4t},set:function(t){this.H4t=t}},{key:"j0t",get:function(){return this.Nti.j0t},set:function(t){this.Nti.j0t=t,this.Bti=!1}},{key:"B7t",get:function(){return this.Mti},set:function(t){this.Mti=t}},{key:"nrt",get:function(){return this.y4t}},{key:"A7t",get:function(){return this.Lti}},{key:"L7t",get:function(){return this.Oti},set:function(t){this.Oti=t}},{key:"S7t",get:function(){return this.Fti},set:function(t){this.Fti=t}},{key:"O7t",get:function(){return this.Hti},set:function(t){this.Hti=t}}],[{key:"r4t",get:function(){return x$.v1t}}]),i}(Z0);U(),Et();var B1=function(){function t(){this.hii=void 0}var i=t.prototype;return i.registerWebImaAdPlayerConstructor=function(t){this.hii=t},i.createAdPlayer=function(t,i,n){return O1()&&this.hii?this.hii(t,i,n):void 0},t}();function O1(){return!!Boolean(f.google&&f.google.ima)&&!(1===k.keys(f.google.ima).length&&Boolean(f.google.ima.dai))}B1.Bg=new B1;var M1=function(){function t(){}var i=t.prototype;return i.Qz=function(t){return t&&t.integration===pS.GOOGLE_IMA},i.e4t=function(t,i,n){return B1.Bg.createAdPlayer(t,i,n)},i.W6=function(t,i,n,r){n.Cti(t,i,r)},i.uj=function(t){var i=zZ(t.sources);if(i){var n={integration:pS.GOOGLE_IMA,sources:i,omidAccessModeRules:d1(t.omidAccessModeRules)},r=qZ(t.timeOffset);return void 0!==r&&(n.timeOffset=r),n}},Nt(t,[{key:"i4t",get:function(){return x1.r4t}}]),t}();kS.Bg.Kz(new M1),U(),Et(),xt(),U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Pt();var L1=function(t){function i(){return t.call(this,"m1t")||this}return Ct(i,t),i.prototype.xa=function(){return new F1},i}(Aw),F1=function(t){function i(){return t.call(this,"adloaded")||this}return Ct(i,t),i}(rh),U1=-1,V1=function(){function t(t,i){this.y1t=void 0,this.Z5t=void 0,this.aii=void 0,this.e1t=void 0,this.Xp=void 0,this.$0t=void 0,this.lii=void 0,this.dii=void 0,this.y1t=[],this.e1t=!1,this.Z5t=t,this.Xp=0,this.$0t=i,this.lii=NaN,this.dii=!1,this.aii=new I$(this,this.$0t)}var i=t.prototype;return i.fii=function(){return this.Xp0},n.Cii=function(t,i){for(var n,r,e=0,s=Lt(this.mii);!(r=s()).done;){var u=r.value;if(!u.i1t()){var o=u.dd;o>=t&&o<=i&&o>=e&&!S(o)&&(e=(n=u).dd)}}return n},n.Rii=function(t){return this.xii(new bw(t,void 0))},n.Dii=function(){if(!this.Nii&&void 0!==this.R6t){this.Nii=!this.mii.some(function(t){return S(t.dd)});for(var t,i=Lt(this.mii);!(t=i()).done;){var n=t.value;n.dd!==U1&&n.dd<=this.R6t&&!n.i1t()&&n.s1t()}}},n.Bii=function(t){for(var i,n=Lt(t);!(i=n()).done;){i.value.s1t()}this.k5t.Mii(t),0===this.pii&&this.Ro()},n.Iii=function(t,i,n){var r=this;return this.mii.filter(function(e){if(e.i1t())return!1;var s=e.dd;return r.Lii(s,t)||r.Oii(s,t,i,n)})},n.Lii=function(t,i){switch(i){case 0:return 0===t;case U1:return t===U1;default:return!1}},n.Oii=function(t,i,n,r){if(t<0)return!1;var e=t-i;return-1!==e&&e<=n&&e>=-r},n.Fii=function(t){if(t&&t.length>0){for(var n,r=Lt(t);!(n=r()).done;){var e=n.value,s=i.E6t(e.qOt),u=this.Igt(e);-1===u&&(this.Nii=void 0===this.R6t,this.mii.push(new V1(s,this.Uii)),u=this.mii.length-1),this.mii[u].vii(e)}this.No()}},n.Igt=function(t){var n=i.E6t(t.qOt);return Hn(this.mii,function(t){return n===i.E6t(t.uii)})},n.Vii=function(t){Xn(this.mii,t)},n.S4t=function(t){this.R6t=t,this.Nii=void 0===t},i.E6t=function(t){switch(t){case"start":case"00:00:00":case"00:00:00.000":case"0%":case"0":return"0";case"end":case"100%":return"-1";default:return t}},Nt(i,[{key:"pii",get:function(){for(var t,i=0,n=Lt(this.mii);!(t=n()).done;){t.value.i1t()||(i+=1)}return i}},{key:"Unt",get:function(){return this.mii}}]),i}(nh);U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),xt(),Pt(),Ft();var W1,z1=function(t){function i(i,n){var r;return(r=t.call(this)||this).A2t=void 0,r.Kii=[],r.jii=[],r.nq=void 0,r.Jii=void 0,r.Zii=void 0,r.R5t=new nh,r.$ii=function(t){t.stopPropagation(),r.tei()},r.tei=function(){for(var t,i=Lt(r.Kii);!(t=i()).done;)for(var n,e=Lt(t.value.$Yt);!(n=e()).done;){var s=n.value;CJ(s.uri)}},r.A2t=v.createElement("div"),r.A2t.style.display="none",r.Jii=i,r.Zii=n,r}Ct(i,t);var n=i.prototype;return n.qii=function(){this.zii(),this.Gii(),this.nq=void 0},n.Xii=function(t){this.jii=this.jii.concat(t)},n.Qii=function(t){this.Kii=this.Kii.concat(t)},n.Gii=function(){this.jii=[]},n.zii=function(){this.Kii=[]},n.Yii=function(t){for(var i,n=Lt(this.jii);!(i=n()).done;){var r=i.value;r.oX===t&&CJ(r.eventURL)}},n.be=function(){this.Wii.style.display=""},n.we=function(){this.Wii.style.display="none"},n.kn=function(){this.Vo(),this.R5t.Vo(),Zi(this.A2t)},Nt(i,[{key:"Wii",get:function(){return this.A2t}},{key:"u4t",get:function(){return this.R5t}}]),i}(nh);function X1(t,i){var n=i;if(!function(t){return"ui"in t}(t))return n;var r,e=t.ui.language;if(Xi(e)){var s=t.ui.languages;if(!s)return n;r=s[e]}else r=e;return r&&r[i]&&(n=r[i]),n}U(),Et(),U(),Et(),Ft();var q1=((W1={})[cA.vC]=1,W1[cA._C]=2,W1[cA.gC]=2,W1);function G1(t,i){var n=i?i.map(function(t){return t.toLowerCase()}):i;return mn(t.filter(function(t){var i=t.type.toLowerCase();return!!Vi(n)&&-1!==n.indexOf(i)&&TZ(i)}),function(t,i){return q1[t.type]-q1[i.type]}).map(j1)}function j1(t){return lA({src:t.contentURL,type:t.type,isAdvertisement:!0})}function Q1(t,i){return OM(Y1(t),Y1(i))}function Y1(t){return{Mi:t.height,Ti:t.width}}function K1(t,i,n,r){var e,s=function(t,i,n,r){var e,s=1/0,u=t.filter(function(t){return!TZ(t.type)}).filter(function(t){return void 0===r||-1!==r.indexOf(t.type)});if(u.length){for(var o,h=Lt(u);!(o=h()).done;){var a=o.value,c=(b.abs(a.width/i-1)+b.abs(a.height/n-1))/2;c0&&(t.PJt=null==(e=u[0].src)?void 0:e.trim());return cE({sources:u},r)}var J1=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,i,n)||this).Rei=void 0,h.ZS=void 0,h.k5t=void 0,h.sc=void 0,h.sei=void 0,h.rei=void 0,h.pJt=void 0,h.pei=void 0,h.eei=void 0,h.Iei=void 0,h.C4=void 0,h.Cei=void 0,h.Dei=void 0,h.x2t=void 0,h.T2t=void 0,h.hT=void 0,h.hei=void 0,h.Sei=void 0,h.kei=void 0,h.Tei=void 0,h.Aei=void 0,h.wei=void 0,h.yei=void 0,h.bei=void 0,h.vei=void 0,h.lei=void 0,h.Rei=r,h.ZS=e,h.k5t=s,h.sc=u,h.sei=o,h.eei=!1,h.Iei=0,h.C4=-1,h.hT=new hr,h.hei=!0,h.Sei=function(){h.cei()},h.kei=function(){h.hT=void 0,h.eei||(h.xei(),h.eei=!0),h.hei&&(h.hei=!1,h.k5t.wii()),h.Wii.style.display="block",h.sei.mn(Ry.PM,h.kei),h.eei=!0},h.Tei=function(){var t=h.zx,i=h.ct,n=t/i;(0===h.Iei&&n>=.25?(h.Yii(eZ.zJt),h.Iei=1):1===h.Iei&&n>=.5?(h.Yii(eZ.XJt),h.Iei=2):2===h.Iei&&n>=.75&&(h.Yii(eZ.GJt),h.Iei=3),h._ei(t,i),h.Bei(),h.C4=t,h.pJt)&&(-1!==h.pJt.kJt&&h.pJt.kJt1){var e=n.filter(function(t){return t.i1t()}).length;r+=". "+X1(this.ZS,"Ad")+" "+(e+1)+"/"+n.length}mx(this.Dei,r)}},Nt(i,[{key:"iei",get:function(){return this.eei}},{key:"zx",get:function(){return this.sei.zx}},{key:"ct",get:function(){var t=this.sei.ct;return S(t)&&this.pJt&&(t=this.pJt.ct||0),t}},{key:"Qx",get:function(){return this.sei.Qx}},{key:"oP",get:function(){return this.sei.oP},set:function(t){this.sei.oP=t,t?this.Yii(eZ.BJt):this.Yii(eZ.MJt)}},{key:"lP",get:function(){return this.sei.lP}},{key:"AP",get:function(){return this.sei.AP}},{key:"OP",get:function(){return this.sei.OP},set:function(t){this.sei.OP=t}},{key:"DP",get:function(){return this.sei.DP}},{key:"MP",get:function(){return this.sei.MP}},{key:"nei",get:function(){return this.rei}},{key:"Eei",get:function(){return this.pJt&&-1!==this.pJt.kJt&&this.sei.zx>=this.pJt.kJt}}]),i}(z1);U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et(),xt(),Pt();var Z1=function(t){function i(){var n;return(n=t.call(this)||this).Ls=void 0,n.Q1t=function(t){n.So(new rh("uD")),n.Mei(t)},n.Mei=function(t){t.stopPropagation()},n.Ls=i.yr(),n.j1t(),n}Ct(i,t);var n=i.prototype;return n.j1t=function(){this.xe.addEventListener("mouseup",this.Q1t),this.xe.addEventListener("touchend",this.Q1t),this.xe.addEventListener("mousedown",this.Mei)},n.G1t=function(){this.xe.removeEventListener("mouseup",this.Q1t),this.xe.removeEventListener("touchend",this.Q1t),this.xe.removeEventListener("mousedown",this.Mei)},n.kn=function(){this.G1t(),Zi(this.Ls)},i.yr=function(){var t=v.createElement("div");return t.className="theoplayer-ad-nonlinear-close",t.style.position="absolute",t.style.right="0",t.style.top="0",t.style.cursor="pointer",t.style.fontSize="1.7em",t.style.lineHeight="0.75em",t},Nt(i,[{key:"xe",get:function(){return this.Ls}}]),i}(th),$1=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).Oei=void 0,e.c1t=void 0,e.k5t=void 0,e.yu=void 0,e.Wei=void 0,e.Vei=function(){e.zei(),e.Yii(eZ.ZJt),e.Zii()},e.Uei=function(t){var i,n;e.zei(),null==(i=e.nq)||i.bZt(mZ.mZt);var r,s,u,o=null==(n=e.c1t)?void 0:n.hYt[0],h=null!=(s=null!=(r=null==o?void 0:o.lYt)?r:null==o?void 0:o.cYt)?s:null==o?void 0:o.vYt;e.Jii(null!=(u=null==h?void 0:h.cZt)?u:"")},e.qei=function(){e.we(),$i(e.Wii),e.Zii(),e.Oei=void 0,e.c1t=void 0},e.Xei=function(){e.yu||(e.Wei=void 0,e.yu=new Z1,e.Wii.children[0].appendChild(e.yu.xe),e.yu.wn("uD",e.jei))},e.jei=function(){e.Yii(eZ.FJt),e.G$t()},e.Wii.className="theoplayer-ad-nonlinear",e.Wii.style.position="absolute",e.Wii.style.width="100%",e.Wii.style.bottom="3em",e.Wii.style.zIndex="10",e.Wii.style.textAlign="center",e.k5t=r,e}Ct(i,t);var n=i.prototype;return n.qii=function(){t.prototype.qii.call(this),this.Wii&&$i(this.Wii)},n.mei=function(t,i,n){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.c1t&&this.uei(),this.Oei=t,this.c1t=t.eYt,0!==this.c1t.aYt.length&&this.Xii(this.c1t.aYt),this.nq=i,0===this.c1t.hYt.length?[3,2]:(this.Qii(this.c1t.hYt[0].gYt),this.Wii.addEventListener("error",this.Uei),this.Wii.addEventListener("load",this.Vei),[4,this.gei()]);case 1:n.sent(),this.Hei(),n.label=2;case 2:return[2]}})}).call(this)},n.G$t=function(){var t;if(void 0===this.Wei){var i=null==(t=this.c1t)?void 0:t.hYt[0];i&&i.od&&-1!==i.od.kJt&&(this.Yii(eZ.FJt),this.u4t.So(new M0(this.Oei,0)),this.qei())}},n.xei=function(){void 0!==this.Oei&&this.u4t.So(new QB(this.Oei,this.k5t.zx))},n.KP=function(){this.uei(),this.Oei=void 0,this.c1t=void 0},n.uei=function(){this.zei(),void 0!==this.Oei&&(this.Oei.s1t(),this.u4t.So(new KB(this.Oei,this.k5t.zx))),this.qii(),this.Gei(),void 0!==this.Wei&&(g(this.Wei),this.Wei=void 0)},n.zei=function(){this.Wii.removeEventListener("load",this.Vei),this.Wii.removeEventListener("error",this.Uei)},n.gei=function(){return Vt(function(){var t,i,n,r,e,s,u,o,h;return zt(this,function(a){return(t=v.createElement("div")).className="theoplayer-ad-nonlinear-content",t.style.position="relative",t.style.display="inline-block",i=this.c1t.hYt[0],n=v.createElement("a"),i.gYt.KYt&&(n.href=i.gYt.KYt,n.target="Xu",n.setAttribute("rel","noopener")),i.lYt?(r=i.lYt,(e=v.createElement("iframe")).src=r.cZt,n.appendChild(e)):i.cYt?(s=i.cYt,(u=v.createElement("img")).src=s.cZt,n.appendChild(u)):i.vYt&&(o=i.vYt,(h=v.createElement("iframe")).src=o.cZt,n.appendChild(h)),i.SYt(),n.addEventListener("mousedown",this.$ii),n.addEventListener("touchend",this.$ii),this.Wii.firstChild&&($i(this.Wii),this.uei()),t.appendChild(n),this.Wii.appendChild(t),this.be(),[2]})}).call(this)},n.Hei=function(){var t;if(this.c1t){var i=null==(t=this.c1t.hYt[0].od)?void 0:t.kJt;void 0!==i&&-1!==i&&(this.Wei=f.setTimeout(this.Xei,1e3*i))}},n.Gei=function(){this.yu&&(this.yu.mn("uD",this.jei),this.yu.kn()),this.yu=void 0},Nt(i,[{key:"Lei",get:function(){return this.Oei}},{key:"Fei",get:function(){return this.yu}},{key:"Qei",get:function(){return this.k5t.Kei()}}]),i}(z1);U(),Et(),Wt(),Qt();var t2=function(){function t(){}return t.Yei=function(t,i,n){return Vt(function(){var r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:r=[],e=t.shift(),s=[],a.label=1;case 1:if(!e)return[3,6];a.label=2;case 2:return a.trys.push([2,4,,5]),[4,(new CZ).CZt(e,i)];case 3:return u=a.sent(),r=r.concat(u),[3,5];case 4:return o=a.sent(),h=A0.v4t(o,e.sources.src),n.So(h),s.push(h.Jy),[3,5];case 5:return e=t.shift(),[3,1];case 6:return[2,[r,s]]}})})()},t}();U(),Et(),Wt(),xt(),Qt(),U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Pt();var i2=function(t){function i(){return t.call(this,"zot")||this}return Ct(i,t),i.prototype.xa=function(){return new n2},i}(Aw),n2=function(t){function i(){return t.call(this,"statechange")||this}return Ct(i,t),i}(rh);U(),Et();var r2=function(t){return t.IDLE="idle",t.LOADING="loading",t.DONE="done",t.ERROR="error",t.EVICTED="evicted",t}({});U(),Et(),Pt(),U(),Et(),xt(),Pt(),Ft();var e2=function(){function t(){this.nc=[],this.hu=void 0}var i=t.prototype;return i.MI=function(t){return this.nc[t]},i.gO=function(t){this.nc.push(t),this.hu&&this.hu.push(t.Ca),this.Jei(t)},i.Zei=function(t){for(var i,n=Lt(t);!(i=n()).done;){var r=i.value;this.gO(r)}},i.$ei=function(t,i){i>=0&&i<=this.nc.length&&(this.nc.splice(i,0,t),this.hu&&this.hu.splice(i,0,t.Ca),this.Jei(t))},i.pO=function(t){return jn(this.nc,t)},i.pS=function(t){this.tsi(this.nc.indexOf(t))},i.tsi=function(t){if(t>=0&&t0&&this.Fsi=i)return r;return r}(t,s)/8}).reduce(function(t,i){return t+i},0)),E=Ju(),h&&0!==h.length){for(R=function(){var t=D.value,i=t.qualityId,n=new EA(t.startsAndEnds);if(E.has(i))E.get(i).timeRanges=E.get(i).timeRanges.HM(n).VM(5e-4);else{var r,e=Fn(a,function(t){return t.o===i}),s=b.min(I.msi,null!=(r=null==e?void 0:e.AM.ct)?r:1/0);E.set(i,{timeRanges:n,totalQualityDurationToCache:s})}},C=h.reduce(function(t,i){return t+i.byteSize},0),P=Lt(h);!(D=P()).done;)I=this,R();u=new v2(C,E,this.msi)}else{for(N=Lt(a);!(x=N()).done;)B=x.value,E.set(B.o,{timeRanges:EA.rL(),totalQualityDurationToCache:b.min(B.AM.ct,this.msi)});u=new v2(0,E,this.msi)}return this.Wsi=u,[2]}})}).call(this)},n.mi=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.ko];case 1:return i.sent(),[4,this.Gsi(this.URt,t)];case 2:return i.sent(),[2]}})}).call(this)},n.Gsi=function(t,i){return Vt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:if(!t.Psi)throw new y("Unexpected - manifest is missing locations");return[4,this.Xsi()];case 1:for(u.sent(),n=[],r=Lt(t.Amt);!(e=r()).done;)s=e.value,n.push(this.jsi(s,t.Psi[0],i));return[2,br(n)]}})}).call(this)},n.Xsi=function(){return Vt(function(){var t,i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return[4,this.Qsi.Sxt()];case 1:t=u.sent(),i=Lt(t),u.label=2;case 2:return(n=i()).done?[3,9]:(r=n.value,[4,this.Dxt.Bxt.zy(r.key)]);case 3:return(e=u.sent())?[4,Y2(e,this.dTt.o,this.Dxt.Bxt,this.dsi)]:[3,5];case 4:return u.sent(),[3,8];case 5:return u.trys.push([5,7,,8]),[4,this.Dxt.Bxt.uTt(r,this.dsi)];case 6:return u.sent(),[3,8];case 7:throw s=u.sent(),new w2("Unable to store manifest with url: "+r.locationURL,s);case 8:return[3,2];case 9:return[4,this.Qsi.xxt()];case 10:return u.sent(),[2]}})}).call(this)},n.jsi=function(t,i,n){for(var r,e=[],s=Lt(t.qmt);!(r=s()).done;)for(var u,o=Lt(K2(r.value,this.dTt.LS.preferredTrackSelection));!(u=o()).done;){var h=u.value;e.push(this.Ksi(h,i,n))}return br(e)},n.Ksi=function(t,i,n){return Vt(function(){var r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:return r=this.dTt.LS.bandwidth,e=Z2(t.$I,r),t.Km===eg.Mk&&t.Wpt&&t.Wpt.lH.widevine&&"persistent"===t.Wpt.lH.widevine.licenseType?[4,this.Ysi(t.Wpt)]:[3,2];case 1:a.sent(),dr(n),a.label=2;case 2:for(s=[],u=Lt(e);!(o=u()).done;)h=o.value,s.push(this.Jsi(h,i,n));return[2,br(s)]}})}).call(this)},n.Jsi=function(t,i,n){return Vt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:dr(n),r=t.AM.bct[0].CO,e=r+this.msi,s=[],u=!1,o=Lt(t.AM.bct),c.label=1;case 1:return(h=o()).done||((a=h.value).CO>=e||this.stopIfFailed(u))?[3,5]:[4,this.Zsi(n)];case 2:return c.sent(),[4,this.$si.Bsi()];case 3:c.sent(),s.push(this.$si.Osi(this.tni(a,t,i),this.ini).catch(function(t){return u=!0,ut.reject(t)})),c.label=4;case 4:return[3,1];case 5:return[2,br(s)]}})}).call(this)},n.Zsi=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return(null==t?void 0:t.Hg)?[4,this.ini.Yy]:[3,2];case 1:throw i.sent(),new fr;case 2:return[2]}})}).call(this)},n.eni=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.ko.catch(dn)];case 1:return t.sent(),[2,this.URt]}})}).call(this)},n.Ysi=function(t){return ut.resolve()},n.sni=function(){return Ui.um("License renewal unsupported in this SDK."),ut.resolve()},n.tni=function(t,i,n){return Vt(function(){var r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:return r=this,e=this.Dxt.Nxt,s=DH(t.xsi.Yu,t.xsi.Wat),[4,e.zy(s)];case 1:return(u=v.sent())?[4,Y2(u,this.dTt.o,e,this.dsi)]:[3,3];case 2:return v.sent(),this.nni(u,!1),[3,7];case 3:return v.trys.push([3,6,,7]),[4,this.rni(t.xsi)];case 4:return o=v.sent(),h=this.hni(t,i,n,o),a=h.segmentMetadataEntry,c=h.segmentEntry,[4,this.Dxt.Rxt(function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.Nxt.uTt(a,this.dsi)];case 1:return i.sent(),[4,t.bct.uTt(c,this.dsi)];case 2:return i.sent(),[2]}})}).call(r)})];case 5:return v.sent(),this.nni(a,!0),[3,7];case 6:throw f=v.sent(),new w2("Unable to store segment with url: "+t.xsi.Yu,f);case 7:return[2]}})}).call(this)},n.rni=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.$ut.Lat(t,{zat:this.DEFAULT_CACHING_SEGMENT_TIMEOUT,qk:this.DEFAULT_CACHING_SEGMENT_CONNECTION_TIMEOUT})];case 1:return i=n.sent(),[4,this.tct(i)];case 2:return[2,n.sent()]}})}).call(this)},n.tct=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.qT()];case 1:return[2,{buffer:i.sent()}]}})})()},n.hni=function(t,i,n,r){var e=DH(t.xsi.Yu,t.xsi.Wat),s=t.CO,u=t.ct,o=this.oni(r);return{segmentMetadataEntry:{key:e,segmentURLsegmentByteRange:e,manifestURL:PH(n),qualityId:i.o,byteSize:o,startsAndEnds:new EA([s,s+u]).IM,references:[this.dTt.o]},segmentEntry:{key:e,segmentURLsegmentByteRange:e,manifestURL:PH(n),data:r,references:[this.dTt.o]}}},n.oni=function(t){return t.buffer.byteLength},n.nni=function(t,i){var n=t.qualityId,r=this.zsi,e=r._O;e.get(n).timeRanges=e.get(n).timeRanges.HM(new EA(t.startsAndEnds)).VM(5e-4),this.Wsi=new v2(i?r.wsi+t.byteSize:r.wsi,e,this.msi)},n.stopIfFailed=function(t){return!1},Nt(i,[{key:"fsi",get:function(){return this.GP()}},{key:"qsi",get:function(){return this.Hsi}},{key:"Wsi",get:function(){return this.zsi},set:function(t){this.zsi.QO(t)||(this.zsi=t,t.QO(v2.ksi)||this.So(new l2))}}]),i}(th);function Y2(t,i,n,r){return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return jn(t.references,i)?[3,2]:(t.references.push(i),[4,n.uTt(t,r)]);case 1:e.sent(),e.label=2;case 2:return[2]}})})()}function K2(t,i){switch(t.Km){case eg.Bk:return J2(t.Z,i.audioTrackSelection);case eg.LT:return J2(t.Z,i.textTrackSelection);default:return J2(t.Z,[])}}function J2(t,i){if(0===i.length)return t.length?[t[0]]:[];for(var n,r=[],e=Lt(t);!(n=e()).done;){var s=n.value;i.indexOf(s.bs)>-1&&r.push(s)}return r}function Z2(t,i){if(!t.length)return[];var n=[].concat(t).sort(MM),r=n.filter(function(t){return t.IW<=i});return r.length>0?[r.pop()]:[n.shift()]}var $2=function(){function t(t,i,n){this.dTt=void 0,this.Dxt=void 0,this.URt=void 0,this.dTt=t,this.Dxt=i,this.URt=n}var i=t.prototype;return i.ani=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=this,[4,this.Dxt.Rxt(function(i){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.uni(i)];case 1:return t.sent(),[4,this.cni(i)];case 2:return t.sent(),[4,this.dni(i)];case 3:return t.sent(),[4,this.lni(i)];case 4:return t.sent(),[2]}})}).call(t)})];case 1:return i.sent(),[2]}})}).call(this)},i.uni=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=t.Mxt,n=this.dTt.o,[4,i.pS(n)];case 1:return r.sent(),[2]}})}).call(this)},i.cni=function(t){return Vt(function(){var i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:return i=this,n=t.Nxt,r=t.bct,$A(e=this.dTt.Mc.sources[0])?(s=PH(e.src),[4,n.kxt(s,"manifestURL")]):[2];case 1:u=c.sent().filter(function(t){return jn(t.references,i.dTt.o)}),o=Lt(u),c.label=2;case 2:return(h=o()).done?[3,8]:(Xn((a=h.value).references,this.dTt.o),0!==a.references.length?[3,5]:[4,n.pS(a.key)]);case 3:return c.sent(),[4,r.pS(a.key)];case 4:return c.sent(),[3,7];case 5:return[4,n.uTt(a)];case 6:c.sent(),c.label=7;case 7:return[3,2];case 8:return[2]}})}).call(this)},i.dni=function(t){return Vt(function(){var i,n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return i=this,n=t.Bxt,r=this.fni(),[4,n._xt(r)];case 1:e=h.sent().filter(function(t){return jn(t.references,i.dTt.o)}),s=Lt(e),h.label=2;case 2:return(u=s()).done?[3,7]:(Xn((o=u.value).references,this.dTt.o),0!==o.references.length?[3,4]:[4,n.pS(o.key)]);case 3:return h.sent(),[3,6];case 4:return[4,n.uTt(o)];case 5:h.sent(),h.label=6;case 6:return[3,2];case 7:return[2]}})}).call(this)},i.fni=function(){if(!this.URt)return[];var t=this.dTt.Mc.sources[0];if(!$A(t))return[];var i=PH(t.src),n=function(t){if(!t)return[];for(var i,n=[],r=Lt(t.Amt);!(i=r()).done;)for(var e,s=Lt(i.value.qmt);!(e=s()).done;)for(var u,o=Lt(e.value.Z);!(u=o()).done;)for(var h,a=Lt(u.value.$I);!(h=a()).done;){var c=h.value;c.Isi&&n.push(c.Isi)}return function(t){return t.reduce(function(t,i){return t.indexOf(i)<0&&t.push(i),t},[])}(n)}(this.URt).map(function(t){return{src:t}}).map(function(t){return PH(t.src)});return[].concat([i],n)},i.lni=function(t){return Vt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return i=this,[4,(n=t.Lxt).Sxt()];case 1:r=o.sent().filter(function(t){return jn(t.references,i.dTt.o)}),e=Lt(r),o.label=2;case 2:return(s=e()).done?[3,7]:(Xn((u=s.value).references,this.dTt.o),0!==u.references.length?[3,4]:[4,n.pS(u.key)]);case 3:return o.sent(),this.vni(u),[3,6];case 4:return[4,n.uTt(u)];case 5:o.sent(),o.label=6;case 6:return[3,2];case 7:return[2]}})}).call(this)},i.vni=function(t){},t}(),t3=function(){function t(){}return t.prototype.jet=function(t,i,n){return new $2(t,i,n)},t}(),i3=new t3;U(),Et(),Wt(),xt(),Qt(),U(),Et();var n3=function(){function t(t,i){this.wE=void 0,this.pni=void 0,this.hu=void 0,this.wE=t,this.pni=i}var i=t.prototype;return i._ni=function(t){this.gni(t)},i.gni=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.pni.sni(t)];case 1:return i.sent(),[3,3];case 2:return i.sent(),this.wE.$ot(r2.ERROR),[3,3];case 3:return[2]}})}).call(this)},Nt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{renew:function(i){t._ni(i)}}}(this)),this.hu}}]),t}(),r3=function(t){function i(i,n,r,e,s,u){var o;(o=t.call(this)||this).aS=void 0,o.Zot=void 0,o.hu=void 0,o.Ac=void 0,o.Tni=void 0,o.Dxt=void 0,o.pni=void 0,o.Eni=new hr,o.Sni=void 0,o.evictOnLoading=function(){o.mn("zot",o.evictOnLoading),o.xni()},o.aS=i,o.Ac=n,o.Tni=r,o.Dxt=e,o.pni=s.jet(o,o.Dxt,u),o.Sni=new n3(o,o.pni),o.Zot=1===o.pni.Wsi.Ssi?r2.DONE:r2.IDLE,o.pni.wn("Q4t",function(t){o.Rs(t),1===o.yni&&o.$ot(r2.DONE)});var h=new Date,a=o.Tni.expirationDate.getTime()-h.getTime();return function(t){return t<2147483647}(a)&&w(function(){return o.xni()},a),o}Ct(i,t);var n=i.prototype;return n.$ot=function(t){this.Zot!==t&&(this.Zot=t,this.So(new i2))},n.Tn=function(){this.Zot===r2.EVICTED||this.Zot===r2.DONE||this.kni()},n.kni=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,3,4]),this.$ot(r2.LOADING),t=new hr,this.Eni=t,[4,this.pni.mi(t.Yg)];case 1:return i.sent(),this.$ot(r2.DONE),[3,4];case 2:return vr(i.sent())?this.$ot(r2.IDLE):this.$ot(r2.ERROR),[3,4];case 3:return this.Eni.zg(),[7];case 4:return[2]}})}).call(this)},n.jP=function(){this.Eni.Zg()},n.pS=function(){this.dk===r2.LOADING?(this.wn("zot",this.evictOnLoading),this.jP()):this.xni()},n.xni=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.pni.eni()];case 1:return t=i.sent(),[4,i3.jet(this,this.Dxt,t).ani()];case 2:return i.sent(),this.pni.Wsi=v2.ksi,this.$ot(r2.EVICTED),[3,4];case 3:return i.sent(),this.$ot(r2.ERROR),[3,4];case 4:return[2]}})}).call(this)},Nt(i,[{key:"fsi",get:function(){return this.pni.fsi}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get id(){return t.o},get status(){return t.dk},get source(){return t.Mc},get parameters(){return t.LS},get duration(){return t.ct},get cached(){return t.mni._s()},get secondsCached(){return t.wni},get percentageCached(){return t.yni},get bytes(){return t.bni},get bytesCached(){return t.Ani},get license(){return t.pQ.Ca},start:function(){t.Tn()},pause:function(){t.jP()},remove:function(){t.pS()},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new fR(t,["Q4t","zot"],n),n}(this)),this.hu}},{key:"o",get:function(){return this.aS}},{key:"pQ",get:function(){return this.Sni}},{key:"dk",get:function(){return this.Zot}},{key:"Mc",get:function(){return this.Ac}},{key:"LS",get:function(){return this.Tni}},{key:"ct",get:function(){return this.pni.Wsi.eL}},{key:"mni",get:function(){return this.pni.Wsi.Asi}},{key:"wni",get:function(){return this.pni.Wsi.bsi}},{key:"yni",get:function(){return this.pni.Wsi.Ssi}},{key:"bni",get:function(){return this.pni.qsi}},{key:"Ani",get:function(){return this.pni.Wsi.wsi}}]),i}(nh);var e3=function(){function t(t,i){this.Dxt=void 0,this.Pni=void 0,this.Dxt=t,this.Pni=i}var i=t.prototype;return i._si=function(t,i,n){var r=GE();return this.asi(r,t,i,n)},i.asi=function(t,i,n,r){return new r3(t,i,n,this.Dxt,this.Pni,r)},t}();U(),Et();function s3(t){if(!t)throw new y("Unexpected - The cache parameters are undefined");var i=function(t){if(Xi(t)&&!Lo(t,"%"))return A(t);return t}(t.amount);!function(t){if(function(t){return Xi(t)&&Lo(t,"%")}(t)){var i=T(t);if(S(i)||i<0||i>100)throw new y("The amount as percentage must be between 0 and 100 percent.")}if(!Xi(t)&&S(t))throw new y("The amount must be a number or a string")}(i);var n=function(t){if(!t)return function(){var t=new Date;return t.setMinutes(t.getMinutes()+30),t}();return t}(t.expirationDate);!function(t){if(t&&!function(t){return!t||ji(t)&&t>new Date}(t))throw new y("Invalid expiration date for the cache parameters")}(n);var r=function(t){if(void 0===t)return 1/0;return t}(t.bandwidth);!function(t){if(S(t)||t<0)throw new y("The bandwidth must be between zero and infinity.")}(r);var e=function(t){if(!t)return 5;if(S(t))throw new y("The amount must be a number");return t}(t.numberOfParallelTasks);return{amount:i,expirationDate:n,bandwidth:r,parallelTasksThreshold:e,preferredTrackSelection:{audioTrackSelection:[],textTrackSelection:[]}}}var u3=function(){function t(t,i,n,r){var e=this;this.Dxt=void 0,this.pni=void 0,this.Ini=void 0,this.GJ=void 0,this.Nni=[],this.Cni=0,this.Rni=0,this.Dni=void 0,this.hT=void 0,this.aV=void 0,this.Pni=void 0,this.Mz=void 0,this.yii=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(t=this.o8t())?[4,this.tXt(t)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})}).call(e)},this.Sii=function(){var t=e.Nni.shift();null==t||t.pS()},this.Mni=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:n=!1,r.label=1;case 1:return n?[3,3]:[4,t.ww("Q4t")];case 2:return r.sent(),n=1===t.Wsi.Ssi,[3,1];case 3:return i.ct<5&&this.yii(),[2]}})}).call(e)},this.GJ=t,this.aV=i,this.hT=new hr,this.Pni=n,this.Mz=r,this.Dxt=new CW}var i=t.prototype;return i.o8t=function(){if(this.Ini)for(var t=this.Ini.K0t;this.Cni0,o=this.w1t,h=this.eri(o),t.iYt?(t.iYt.od=o,void 0!==o.irt.skipOffset&&void 0!==(a=DZ.a$t(o.irt.skipOffset,t.iYt.ct))&&a0?this.jni():(this.Zni(),this.w1t=o)),[3,10];case 7:return null!==t?[3,9]:[4,this.dri()];case 8:return g.sent(),[3,10];case 9:this.Kni(!0),g.label=10;case 10:return[2]}})}).call(this)},n.dri=function(){var t=this.rri;return this.mei(t&&t.Rc())},n.Kni=function(t){this.ari(eZ.hZt),this.lri(),this.Gni=1;var i=void 0!==this.w1t&&this.w1t.OZt.fii();if(this.$ni=!1,!i||this.Yni){if(!this.w4t)return;this.oa.be(),!this.oa.Qx&&t&&this.oa.QP(),void 0!==this.Jni&&this.oa.Xx(this.Jni),this.I3t(),this.Yni=!1,this.Jni=void 0}else t&&(this.Gni=1,this.jni())},n.I3t=function(){this.fri(),t.prototype.I3t.call(this)},n.fri=function(){if(this.oa.Qx&&(this.Gni=5),this.w1t){var t=this.w1t.OZt;t.gii()&&this.u4t.So(new XB(this.eri(this.w1t))),this.zni.Vii(t),this.w1t=void 0}},n.hri=function(t){this.vri=this.vri.concat(t)},n.lri=function(){this.vri=[]},n._ri=function(t){this.oa.xe.appendChild(t)},n.ari=function(t){for(var i,n=Lt(this.vri);!(i=n()).done;){var r=i.value;r.oX===t&&CJ(r.eventURL)}},n.cri=function(t){this.Hni.Yii(eZ.ZJt);for(var i,n=Lt(t);!(i=n()).done;){var r=i.value;CJ(r)}},n.qnt=function(t){for(var i,n=Lt(this.Dti());!(i=n()).done;){var r=i.value;xJ(r.sources,r.timeOffset)||t.W6(r,DB.Bnt,!1)}},n.Dti=function(){for(var t,i,n=[],r=Lt(this.Lnt.concat(this.Unt));!(i=r()).done;){var e=i.value;n.push(e.irt)}for(var s,u=Lt(this.Xni.concat(this.zni.Unt.filter(function(t){return!t.i1t()})));!(s=u()).done;)for(var o,h=Lt(s.value.K0t);!(o=h()).done;){var a=o.value;a.W||n.push(a.irt)}return(t=n).push.apply(t,[].concat(this.Vni)),nr(n)},n.iri=function(){return!!this.w1t&&A$(this.w1t).some(function(t){return t.iYt})},n.eri=function(t){return t.OZt.oii},n.Kei=function(){return this.gri},n.zP=function(){return this.sei.zP()},n.Ox=function(){return this.sei.Ox()},n.S4t=function(t){this.zni.S4t(t)},n.kn=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),this.oa.mn(eh.uo,this.qni),this.u4t.LK(this.Hni.u4t),this.u4t.LK(this.Rei.u4t),this.u4t.LK(this.zni),this.Hni.kn(),this.Rei.kn(),[4,this.sei.kn()];case 2:return n.sent(),[2]}})}).call(this)},Nt(i,[{key:"o4t",get:function(){return this}},{key:"r4t",get:function(){return i.r4t}},{key:"Fnt",get:function(){return this.w1t?this.eri(this.w1t):null}},{key:"Lnt",get:function(){return this.w1t?[this.Hni.nei,this.Rei.Lei].filter(Li):[]}},{key:"Unt",get:function(){var t=this.Xni.concat(this.zni.Unt.filter(function(t){return!t.i1t()}));return Jn(t,function(t){return t.oii.Jc.filter(function(t){return!t.i1t()})})}},{key:"Vnt",get:function(){return this.zni.Unt.map(function(t){return t.oii})}}],[{key:"r4t",get:function(){return x$.f1t}}]),i}(Z0),l3=function(){function t(){}var i=t.prototype;return i.Qz=function(t){return t&&("string"!=typeof t.integration||t.integration===pS.DEFAULT||t.integration===pS.CSAI||t.integration===pS.THEO)},i.e4t=function(t,i,n){var r=new hB(t.tnt,t.Ql,n);r.Est(t.xe);var e=new sS(t.xe,n,t.Dx,t.Kst,t.VP,r,t.Ql);return new d3(t,i,e,n,t.Kst,t.Dx)},i.W6=function(t,i,n,r){n.Cti(t,i,r)},i.uj=function(t){var i=zZ(t.sources);if(i){var n={integration:pS.CSAI,sources:i};"vast"===n.sources.type&&void 0===t.timeOffset?t.timeOffset=0:"vmap"===n.sources.type&&void 0!==t.timeOffset&&We("Do not set timeOffset for VMAP ad sources. VMAP ads have their own offsets included.");var r=qZ(t.timeOffset);void 0!==r&&(n.timeOffset=r);var e=qZ(t.skipOffset);return void 0!==e&&(n.skipOffset=e),n}},Nt(t,[{key:"i4t",get:function(){return d3.r4t}}]),t}();kS.Bg.Kz(new l3),U(),Et(),U(),Et(),xt();var w3=function(){function t(t,i){this.bti=void 0,this.A2t=void 0,this.vet=void 0,this.Tri=void 0,this.i8=!1,this.vet=t;var n=v.createElement("div");n.className="theoplayer-ima-wrapper",an(n),n.style.zIndex="10",Bi.Ks&&function(t,i){t.addEventListener(i,un)}(n,"mousedown"),i.appendChild(n);var r=v.createElement("div");r.className="theoplayer-ima",r.style.height="100%",this.Tri=r,n.appendChild(r),this.A2t=n,this.bti=new google.ima.AdDisplayContainer(this.Tri,this.vet)}var i=t.prototype;return i.GY=function(){var t;this.i8||(null==(t=this.bti)||t.initialize(),this.i8=!0)},i.xri=function(t){"linear"===t?this.A2t.style.marginTop="0px":"nonlinear"===t&&(this.A2t.style.marginTop="-45px")},i.be=function(){this.A2t.style.opacity="1",this.A2t.style.pointerEvents=""},i.we=function(){this.A2t.style.opacity="0",this.A2t.style.pointerEvents="none"},i.zg=function(){var t;null==(t=this.bti)||t.destroy(),this.bti=void 0},Nt(t,[{key:"Wii",get:function(){return this.A2t}},{key:"Sri",get:function(){return this.Tri.offsetHeight}},{key:"kri",get:function(){return this.Tri.offsetWidth}},{key:"Eri",get:function(){return this.bti}}]),t}();U(),Et(),Wt(),Pt(),Qt(),U(),Et(),Pt(),Ft(),U(),Et(),xt();var g3=function(){function t(t){this.Pri=void 0,this.IYt=void 0,this.Pri=t;var i=new google.ima.CompanionAdSelectionSettings;i.resourceType=google.ima.CompanionAdSelectionSettings.ResourceType.ALL,i.creativeType=google.ima.CompanionAdSelectionSettings.CreativeType.ALL,i.sizeCriteria=google.ima.CompanionAdSelectionSettings.SizeCriteria.IGNORE,this.IYt=t.getCompanionAds(0,0,i)}return Nt(t,[{key:"fJt",get:function(){return this.Pri.getAdId()}},{key:"v7t",get:function(){var t=this.Pri.getAdPodInfo();if(void 0!==t)try{return{I9t:t.getAdPosition(),G0t:t.getMaxDuration(),Iri:t.getPodIndex(),qOt:t.getTimeOffset(),C9t:t.getTotalAds(),Cri:t.getIsBumper()}}catch(t){return}}},{key:"QKt",get:function(){return this.Pri.getAdSystem()}},{key:"Rri",get:function(){return this.Pri.getAdvertiserName()}},{key:"FYt",get:function(){var t;return null!=(t=this.Pri.getApiFramework())?t:void 0}},{key:"sYt",get:function(){return this.IYt.map(function(t){return{VYt:t.getAdSlotId(),GT:t.getContentType(),G4t:t.getContent(),Mi:t.getHeight(),Ti:t.getWidth()}})}},{key:"GT",get:function(){var t;return null!=(t=this.Pri.getContentType())?t:void 0}},{key:"wYt",get:function(){return this.Pri.getCreativeId()}},{key:"eti",get:function(){return this.Pri.getCreativeAdId()}},{key:"Dri",get:function(){return this.Pri.getDealId()}},{key:"_N",get:function(){return this.Pri.getDescription()}},{key:"ct",get:function(){return this.Pri.getDuration()}},{key:"Ti",get:function(){return this.Pri.getWidth()}},{key:"Mi",get:function(){return this.Pri.getHeight()}},{key:"PJt",get:function(){var t;return null!=(t=this.Pri.getMediaUrl())?t:void 0}},{key:"Nri",get:function(){return this.Pri.getMinSuggestedDuration()}},{key:"tti",get:function(){return this.Pri.getSkipTimeOffset()}},{key:"Bri",get:function(){return this.Pri.getSurveyUrl()}},{key:"gq",get:function(){return this.Pri.getTitle()}},{key:"Z7t",get:function(){return this.Pri.getTraffickingParameters()}},{key:"$7t",get:function(){return this.Pri.getTraffickingParametersString()}},{key:"rYt",get:function(){return this.Pri.getUniversalAdIds().map(function(t){return{sti:t.getAdIdRegistry(),nti:t.getAdIdValue()}})}},{key:"Jti",get:function(){return this.Pri.getUiElements()}},{key:"iti",get:function(){return this.Pri.getVastMediaBitrate()}},{key:"J7t",get:function(){return this.Pri.getVastMediaHeight()}},{key:"Y7t",get:function(){return this.Pri.getVastMediaWidth()}},{key:"X7t",get:function(){return this.Pri.getWrapperAdIds()}},{key:"j7t",get:function(){return this.Pri.getWrapperAdSystems()}},{key:"Q7t",get:function(){return this.Pri.getWrapperCreativeIds()}},{key:"h7t",get:function(){return this.Pri.isLinear()}}]),t}();function _3(){return[google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,google.ima.AdEvent.Type.CLICK,google.ima.AdEvent.Type.DURATION_CHANGE,google.ima.AdEvent.Type.EXPANDED_CHANGED,google.ima.AdEvent.Type.STARTED,google.ima.AdEvent.Type.IMPRESSION,google.ima.AdEvent.Type.PAUSED,google.ima.AdEvent.Type.RESUMED,google.ima.AdEvent.Type.AD_PROGRESS,google.ima.AdEvent.Type.AD_BUFFERING,google.ima.AdEvent.Type.FIRST_QUARTILE,google.ima.AdEvent.Type.MIDPOINT,google.ima.AdEvent.Type.THIRD_QUARTILE,google.ima.AdEvent.Type.COMPLETE,google.ima.AdEvent.Type.USER_CLOSE,google.ima.AdEvent.Type.LINEAR_CHANGED,google.ima.AdEvent.Type.LOADED,google.ima.AdEvent.Type.AD_CAN_PLAY,google.ima.AdEvent.Type.AD_METADATA,google.ima.AdEvent.Type.AD_BREAK_READY,google.ima.AdEvent.Type.INTERACTION,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,google.ima.AdEvent.Type.SKIPPED,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,google.ima.AdEvent.Type.LOG,google.ima.AdEvent.Type.VIEWABLE_IMPRESSION,google.ima.AdEvent.Type.VOLUME_CHANGED,google.ima.AdEvent.Type.VOLUME_MUTED]}var m3=function(t){function i(i,n,r){var e;(e=t.call(this)||this).Q0t=void 0,e.bti=void 0,e.sc=void 0,e.qc=[],e.Lri=function(t){t.getAd().isLinear()?e.bti.xri("linear"):e.bti.xri("nonlinear")},e.Mri=function(){e.Q0t.resize(e.bti.kri,e.bti.Sri,google.ima.ViewMode.NORMAL)},e.forwardAdEventListener=function(t){var i=t.getAd(),n=function(t){var i;return((i={})[google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED]=s1.v8t,i[google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED]=s1._8t,i[google.ima.AdEvent.Type.CLICK]=s1.g8t,i[google.ima.AdEvent.Type.DURATION_CHANGE]=s1.Cw,i[google.ima.AdEvent.Type.EXPANDED_CHANGED]=s1.p8t,i[google.ima.AdEvent.Type.STARTED]=s1.m8t,i[google.ima.AdEvent.Type.IMPRESSION]=s1.w8t,i[google.ima.AdEvent.Type.PAUSED]=s1.Yz,i[google.ima.AdEvent.Type.RESUMED]=s1.y8t,i[google.ima.AdEvent.Type.AD_PROGRESS]=s1.b8t,i[google.ima.AdEvent.Type.AD_BUFFERING]=s1.A8t,i[google.ima.AdEvent.Type.FIRST_QUARTILE]=s1.S8t,i[google.ima.AdEvent.Type.MIDPOINT]=s1.XJt,i[google.ima.AdEvent.Type.THIRD_QUARTILE]=s1.T8t,i[google.ima.AdEvent.Type.COMPLETE]=s1.jJt,i[google.ima.AdEvent.Type.USER_CLOSE]=s1.k8t,i[google.ima.AdEvent.Type.LINEAR_CHANGED]=s1.E8t,i[google.ima.AdEvent.Type.LOADED]=s1.x8t,i[google.ima.AdEvent.Type.AD_CAN_PLAY]=s1.P8t,i[google.ima.AdEvent.Type.AD_METADATA]=s1.I8t,i[google.ima.AdEvent.Type.AD_BREAK_READY]=s1.C8t,i[google.ima.AdEvent.Type.INTERACTION]=s1.R8t,i[google.ima.AdEvent.Type.ALL_ADS_COMPLETED]=s1.D8t,i[google.ima.AdEvent.Type.SKIPPED]=s1.N8t,i[google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED]=s1.B8t,i[google.ima.AdEvent.Type.LOG]=s1.M8t,i[google.ima.AdEvent.Type.VIEWABLE_IMPRESSION]=s1.L8t,i[google.ima.AdEvent.Type.VOLUME_CHANGED]=s1.O8t,i[google.ima.AdEvent.Type.VOLUME_MUTED]=s1.F8t,i)[t]}(t.type),r={type:n,date:new Date,jnt:i?e.Ori(i):void 0,J9t:a1(n,t.getAdData())};e.So(r)},e.forwardAdErrorEventListener=function(t){e.So({date:new Date,jnt:void 0,type:u1.U8t,J9t:{D7t:v1(t.getError())}})},e.Q0t=i,e.bti=n,e.sc=r,e.sc.wn(fI.yn,e.Mri),e.Q0t.init(e.bti.kri,e.bti.Sri,google.ima.ViewMode.NORMAL),e.Q0t.addEventListener(google.ima.AdEvent.Type.LOADED,e.Lri),e.Q0t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,e.forwardAdErrorEventListener);for(var s,u=Lt(_3());!(s=u()).done;){var o=s.value;e.Q0t.addEventListener(o,e.forwardAdEventListener)}return e}Ct(i,t);var n=i.prototype;return n.UP=function(t){var i;null==(i=this.Q0t)||i.setVolume(t)},n.FP=function(){return this.Q0t.getVolume()},n.I7t=function(){return this.Q0t.getRemainingTime()},n.zg=function(){Yn(this.qc),this.sc.mn(fI.yn,this.Mri),this.Q0t.removeEventListener(google.ima.AdEvent.Type.LOADED,this.Lri),this.Q0t.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.forwardAdErrorEventListener);for(var t,i=Lt(_3());!(t=i()).done;){var n=t.value;this.Q0t.removeEventListener(n,this.forwardAdEventListener)}this.Q0t.destroy()},n.Tn=function(){this.Q0t.start()},n.kti=function(){this.Q0t.resume()},n.jP=function(){this.Q0t.pause()},n.uD=function(){this.Q0t.skip()},n.KP=function(){this.Q0t.stop()},n.d7t=function(){var t=this.Q0t.getCurrentAd();if(t)return this.Ori(t)},n.Xti=function(){return this.Q0t.getCuePoints()},n.Ori=function(t){var i=Fn(this.qc,function(i){return i.Pri===t});return i||(i=new g3(t),this.qc.push(i)),i},n.Eti=function(t){this.Q0t.updateAdsRenderingSettings(b3(t))},i}(th);U(),Et(),xt(),Pt();var y3=function(t){function i(i,n){var r;return(r=t.call(this,"nii")||this).Uri=void 0,r.A2t=void 0,r.Uri=i,r.A2t=n,r}return Ct(i,t),i.prototype.xa=function(){return new p3(this.Uri)},Nt(i,[{key:"Fri",get:function(){return this.Uri}},{key:"Wii",get:function(){return this.A2t}}]),i}(Aw),p3=function(t){function i(i){var n;return(n=t.call(this,"adsmanagerloaded")||this).Uri=void 0,n.Uri=i,n}return Ct(i,t),Nt(i,[{key:"adsManager",get:function(){return this.Uri}}]),i}(rh),k3=function(t){function i(i,n){var r;return(r=t.call(this)||this).Ati=void 0,r.sc=void 0,r.Hri=void 0,r.Vri=void 0,r.Wri=void 0,r.qri=void 0,r.onAdsManagerLoadedListener=function(t){if(r.Wri&&r.qri&&r.Vri){var i,n=b3(r.qri),e=r.Wri,s=t.getAdsManager({get currentTime(){return e.zx},get duration(){return e.ct}},n),u=new m3(s,r.Hri,r.sc);r.So(new y3(s,r.Hri.Wii)),null==(i=r.Vri)||i.Qy(u),r.Vri=void 0}},r.onAdsManagerErrorListener=function(t){var i,n={Iy:t.getError().getMessage(),R9t:t.getError().getVastErrorCode(),TZt:t.getError().getErrorCode(),Km:c1(t.getError().getType()),D9t:void 0};null==(i=r.Vri)||i.Ky(n),r.Vri=void 0},r.sc=n,r.Hri=i,r}Ct(i,t);var n=i.prototype;return n.Pti=function(){var t;null==(t=this.Ati)||t.contentComplete()},n.r8t=function(t,i,n){return Vt(function(){var r;return zt(this,function(e){if(this.Vri)throw new y("Only one ImaAdsRequest can be made at a time.");if(!this.Hri.Eri)throw new y("AdDisplayContainer is not initialized.");return this.Ati=new google.ima.AdsLoader(this.Hri.Eri),this.Ati.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoadedListener),this.Ati.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsManagerErrorListener),this.Vri=new Va,this.Wri=i,this.qri=n,r=new google.ima.AdsRequest,t.w6t?r.adTagUrl=t.w6t:t.y6t&&(r.adsResponse=t.y6t),r.linearAdSlotWidth=t.f6t,r.linearAdSlotHeight=t.v6t,r.nonLinearAdSlotWidth=t._6t,r.nonLinearAdSlotHeight=t.g6t,r.contentDuration=t.A6t,r.setAdWillAutoPlay(t.p6t),r.setAdWillPlayMuted(t.m6t),t.b6t&&(r.omidAccessModeRules=t.b6t),this.Ati.requestAds(r),[2,this.Vri.Yy]})}).call(this)},n.zg=function(){var t;void 0!==this.Ati&&(this.Ati.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoadedListener),this.Ati.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsManagerErrorListener),this.Ati.destroy(),this.Ati=void 0),null==(t=this.Vri)||t.Ky("AdsLoader destroyed"),this.Vri=void 0},i}(th);function b3(t){var i=new google.ima.AdsRenderingSettings;return i.enablePreloading=t.Zti,t.Jti&&(i.uiElements=t.Jti),i.mimeTypes=t.Yti,void 0!==t.tii&&(i.playAdsAfterTime=t.tii),void 0!==t.$ti&&(i.loadVideoTimeout=t.$ti),void 0!==t.z9&&(i.bitrate=t.z9),void 0!==t.tii&&(i.playAdsAfterTime=t.tii),i.restoreCustomPlaybackStateOnAdBreakComplete=!0,i}U(),Et(),xt(),Pt();var A3=function(t){function i(i){var n;return(n=t.call(this)||this).zri=void 0,n.oa=void 0,n.oa=i,n.zri=n.oa.Gx(),n.oa.wn(eh.py,function(){n.oa.xP||(n.zri=n.oa.Gx()),n.So(new bw(n.zx,void 0))}),n}return Ct(i,t),i.prototype.hr=function(){this.zri=0},Nt(i,[{key:"zx",get:function(){return this.oa.xP?this.zri:this.oa.Gx()}},{key:"ct",get:function(){return this.oa.Nd()}},{key:"oP",get:function(){return this.oa.oP}},{key:"OP",get:function(){return this.oa.OP}}]),i}(th);B1.Bg.registerWebImaAdPlayerConstructor(function(t,i,n){P1(n);var r=D1(n)?t.zP():void 0,e=new w3(r,t.xe),s=new k3(e,t.Wu),u=new A3(t);return new x1(t,i,n,t.Jst,e,s,u)}),U(),Et(),U(),Et(),Wt(),xt(),Pt(),H(),Qt(),U(),Et(),Wt(),xt(),Pt(),Qt();var T3=function(t){function i(i,n,r){var e;return(e=t.call(this,r)||this).dnt=void 0,e.k5t=void 0,e.ehi=!0,e.dnt=i,e.k5t=n,e}Ct(i,t);var n=i.prototype;return n.gr=function(t,i,n,r,e){(e||!r.lP||r.Qx)&&this.oa.lP&&this.oa.QP()},n.Xx=function(t,i){},n.Wx=function(t){},n.Xri=function(i,n){var r=i-this.k5t.jri;return t.prototype.Xx.call(this,r,n)},n.Qri=function(i){return t.prototype.Wx.call(this,i)},n.qx=function(){return this.dnt.bt},n.nu=function(){return this.dnt.nu()},n.Nd=function(){return this.dnt.Nd()},n.EP=function(){var t=EA.jn(this.dnt.EP()).Ly(this.k5t.jri);if(this.Kri())return t._s();var i=EA.jn(this.k5t.EP()),n=i;return a5(this.dnt)||(n=t.HM(i)),(n=n.Mn(EA.nL(0,this.Gx())))._s()},n.Gx=function(){return this.Yri(t.prototype.Gx.call(this))},n.Yri=function(t){return this.k5t.Jri?this.k5t.Jri:this.oa===this.k5t?this.k5t.Zri+t:this.k5t.jri+t},n.Hx=function(){return this.$ri(t.prototype.Gx.call(this))},n.$ri=function(t){return this.k5t.thi?this.k5t.thi:this.oa===this.k5t&&this.k5t.ihi?new Date(this.k5t.ihi.getTime()+1e3*t):this.dnt.Vx},n.Ux=function(){var t=EA.jn(this.dnt.Ux()).Ly(this.k5t.jri);if(this.Kri())return t._s();var i=EA.jn(this.k5t.Ux());return t.An(t.V-1)=r||(this.Roi.push(t),i?this.gai.set(i.JI,t):this.yai.push(t),this.nai.boi(t))},i.bai=function(t){var i=this.gai.get(t.JI);if(void 0!==i){var n=t.oOt["X-RESUME-OFFSET"],r=isFinite(t.RO)?this.nai.lai(t.RO):void 0;i.er({ct:t.ct,RO:r,fhi:void 0!==n?Number(n):void 0})}},i.joi=function(t){this.Aai(t)},i.Aai=function(t){void 0!==this.gai.get(t.JI)&&this.gai.delete(t.JI)},i.Sai=function(t){var i=this;t.forEach(function(t){return i.Aoi(t)})},i.Aoi=function(t){Xn(this.Roi,t)},i.hr=function(){var t,i,n,r;this.fai=void 0,this.zoi(void 0),this.Xoi(void 0);for(var e,s=Lt(this.Foi.slice());!(e=s()).done;){var u=e.value;this.Voi(u)}Yn(this.Foi),Yn(this.Roi),Yn(this.yai),this.gai.clear(),null==(t=this.Noi)||t.removeEventListener("adbreak",this.Boi),null==(i=this.Noi)||i.removeEventListener("overlay",this.Moi),null==(n=this.Noi)||n.removeEventListener("streaminfo",this.Loi),null==(r=this.Noi)||r.close(),this.Noi=void 0},i.kn=function(){this.hr()},Nt(t,[{key:"Coi",get:function(){return this.Roi}}]),t}();function f4(t){if(t){var i=t.sz.default;return Bi.Ks&&t.sz.phone?i=t.sz.phone:Bi.og&&t.sz.tv&&(i=t.sz.tv),{Jhi:t.iu,Zhi:i,phi:t.adTagParameters}}}function v4(t){var i=j3[t.type],n=t.default;return Bi.Ks&&t.phone?n=t.phone:Bi.og&&t.tv&&(n=t.tv),{Km:i,Syt:n}}function d4(t){var i,n,r,e;return t.top&&t.top>=0&&t.top<=100?i=t.top:t.bottom&&t.bottom>=0&&t.bottom<=100?n=t.bottom:i=10,t.left&&t.left>=0&&t.left<=100?r=t.left:t.right&&t.right>=0&&t.right<=100?e=t.right:r=10,{utt:i,att:n,ott:r,htt:e}}function l4(t){return{Ti:t.width&&t.width>=0&&t.width<=100?t.width:10,Mi:t.height&&t.height>=0&&t.height<=100?t.height:10}}U(),Et(),xt(),Pt();var w4=function(t){function i(i){var n;return(n=t.call(this)||this).oa=void 0,n.hu=void 0,n.oa=i,n}return Ct(i,t),i.prototype.doi=function(t){Ji(t)?this.oa.doi(t):Ui.dm("Incorrect ad tag parameters type, expecting a Record.")},Nt(i,[{key:"Tai",get:function(){return this.oa.Tai.map(function(t){return t.Ont()})}},{key:"kai",get:function(){return this.oa.kai.map(function(t){return t.Ont()})}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get currentInterstitials(){return t.Tai},get scheduledInterstitials(){return t.kai},replaceAdTagParameters:function(i){t.doi(i)},addEventListener:function(i,n){t.wn(i,n)},removeEventListener:function(i,n){t.mn(i,n)}}}(this)}}]),i}(th);U(),Et(),xt();var g4=function(){function t(){this.R5t=new xI,this.Eai=void 0}var i=t.prototype;return i.Ioi=function(t){this.Eai=t},i.uD=function(){},i.Hnt=function(t){},i.qnt=function(t){},i.kn=function(){return this.Eai=void 0,ut.resolve()},Nt(t,[{key:"u4t",get:function(){return this.R5t}},{key:"w4t",get:function(){var t;return void 0!==(null==(t=this.Eai)?void 0:t.Fnt)}},{key:"r4t",get:function(){return x$.knt}},{key:"Lnt",get:function(){var t;return(null==(t=this.Eai)?void 0:t.hti)?[this.Eai.hti]:[]}},{key:"Fnt",get:function(){var t,i;return null!=(i=null==(t=this.Eai)?void 0:t.Fnt)?i:null}},{key:"Unt",get:function(){var t=this;return this.Eai?Jn(this.Eai.K0t,function(i){var n,r=i.Jc;if(i===(null==(n=t.Eai)?void 0:n.Fnt)&&void 0!==t.Eai.hti){var e=r.indexOf(t.Eai.hti);if(e>=0)return r.slice(e+1)}return i.pP?[]:r}):[]}},{key:"Vnt",get:function(){var t=this;return this.Eai?this.Eai.K0t.filter(function(i){var n;return i===(null==(n=t.Eai)?void 0:n.Fnt)||!i.pP}):[]}}]),t}();U(),Et(),Wt(),xt(),Qt();var _4=function(){function t(t,i,n){var r=this;this.oa=void 0,this.loi=void 0,this.xai=[],this.Iai=void 0,this.Cai=Ju(),this.Bai=void 0,this.gn=void 0,this.Att=function(t){d0(r.Iai,r.oa.MP,r.oa.DP,t.width,t.height)},this.rjt=function(){d0(r.Iai,r.oa.MP,r.oa.DP,r.gn.Eu,r.gn.Iu)},this.$ii=function(t){t.stopPropagation()},this.oa=t,this.Bai=n;var e=v.createElement("div");e.style.display="none",e.className="theoads-image-overlays-container",an(e),i.appendChild(e),this.Iai=e,this.gn=new AI(i),this.gn._n(),this.gn.wn(fI.yn,this.Att),this.oa.wn(eh.Jw,this.rjt)}var i=t.prototype;return i.Pai=function(t){return Vt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return this.Iai.style.display="",(i=v.createElement("div")).className="theoplayer-theoads-overlay",i.style.display="",this.Cai.set(t.o,i),n=v.createElement("a"),[4,this.Rai(t)];case 1:return(r=s.sent()).clickThroughURI&&(this.Iai.style.zIndex="11",n.href=r.clickThroughURI,n.target="Xu",n.setAttribute("rel","noopener"),n.addEventListener("mousedown",this.$ii),n.addEventListener("touchend",this.$ii)),t.Bhi===G3.image&&(n.style.backgroundImage="url("+r.resourceURI+")",n.style.backgroundSize="contain",n.style.backgroundPosition="center",n.style.backgroundRepeat="no-repeat",r.impressionURI&&((e=v.createElement("img")).src=r.impressionURI,e.style.display="none",n.appendChild(e))),an(n),function(t,i){t.style.position="absolute";var n=i.mo;n.ott&&(t.style.left=n.ott+"%");n.htt&&(t.style.right=n.htt+"%");n.utt&&(t.style.top=n.utt+"%");n.att&&(t.style.bottom=n.att+"%");var r=i.Wy;r.Ti&&(t.style.width=r.Ti+"%");r.Mi&&(t.style.height=r.Mi+"%");i.Mhi&&i.Mhi>0&&i.Mhi<=100&&(t.style.opacity=""+i.Mhi/100)}(i,t),i.appendChild(n),this.Iai.appendChild(i),this.xai.push(t),[2]}})}).call(this)},i.Dai=function(t){var i=this.Cai.get(t.o);i&&(this.Iai.contains(i)&&this.Iai.removeChild(i),this.Cai.delete(t.o),0===this.Cai.size&&(this.Iai.style.display="none"),Xn(this.xai,t))},i.Nai=function(){var t=this;this.Cai.forEach(function(i){t.Iai.contains(i)&&t.Iai.removeChild(i)}),this.Cai.clear(),this.xai=[]},i.Rai=function(t){return Vt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return i={resourceURI:""},t.Lhi?((r=Yu({},this.loi,t.phi))&&!r[$3]&&(r[$3]=i4.noi),[4,this.Bai.Yhi(t.Lhi,r)]):[3,2];case 1:n=o.sent(),o.label=2;case 2:return n?(i.resourceURI=n.image,i.impressionURI=n.impression):t.cZt&&((e=Fn(t.cZt,function(t){return t.Km===j3.svg}))&&(i.resourceURI=e.Syt),(s=Fn(t.cZt,function(t){return t.Km===j3.png}))&&(i.resourceURI=s.Syt)),i.clickThroughURI=null!=(u=null==n?void 0:n.clickThrough)?u:t.KYt,t.er({imageUrl:i.resourceURI,clickThrough:i.clickThroughURI}),[2,i]}})}).call(this)},i.hr=function(){this.Nai(),this.Iai.style.display="none"},Nt(t,[{key:"Tai",get:function(){return this.xai}},{key:"phi",get:function(){return this.loi},set:function(t){this.loi=t}}]),t}();U(),Et(),Pt();var m4=function(t){function i(i){var n;return(n=t.call(this,"addinterstitial")||this).interstitial=void 0,n.interstitial=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var y4=function(t){function i(i){var n;return(n=t.call(this,"Mai")||this).interstitial=void 0,n.interstitial=i,n}return Ct(i,t),i.prototype.xa=function(){return new p4(this.interstitial.Ont())},i}(Aw),p4=function(t){function i(i){var n;return(n=t.call(this,"interstitialend")||this).interstitial=void 0,n.interstitial=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var k4=function(t){function i(i,n){var r;return(r=t.call(this,"Lai")||this).interstitial=void 0,r.Iy=void 0,r.interstitial=i,r.Iy=n,r}return Ct(i,t),i.prototype.xa=function(){return new b4(this.interstitial.Ont(),this.Iy)},i}(Aw),b4=function(t){function i(i,n){var r;return(r=t.call(this,"interstitialerror")||this).interstitial=void 0,r.message=void 0,r.interstitial=i,r.message=n,r}return Ct(i,t),i}(rh);U(),Et(),Wt(),xt(),Pt(),Qt();var A4=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).d9=!1,i.Uai=function(t){!i.d9&&i.xoi&&(i.d9=!0,i.U9t(i.Yri(t.currentTime)))},i.Toi=function(t){i.Bd(i.Yri(t.currentTime))},i}Ct(i,t);var n=i.prototype;return n.Oai=function(){return!1},n.BW=function(t,i,n){return ut.resolve()},n.Fai=function(t,i,n,r){return void 0===r&&(r=!1),Vt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:return e=this.yoi(t,i),[4,this.poi(t,i,n)];case 1:return s=u.sent(),[2,this.Eoi(s,t,n,e,r)]}})}).call(this)},n.poi=function(t,i,n){return Vt(function(){return zt(this,function(i){return this.xoi=t,[2,cE({sources:{src:t.Syt}})]})}).call(this)},n.Soi=function(){t.prototype.Soi.call(this),this.k5t.wn(Ry.PM,this.Uai)},n.koi=function(){this.k5t.mn(Ry.PM,this.Uai),t.prototype.koi.call(this)},n.bd=function(t){if(this.ooi){var i=this.Yri(t.currentTime),n=this.ooi.Q4t;this.ooi.dhi(i);var r=this.ooi.Q4t;n<.25&&r>=.25?this.R5t.So(new W0(this.u1t,i)):n<.5&&r>.5?this.R5t.So(new X0(this.u1t,i)):n<.75&&r>=.75?this.R5t.So(new G0(this.u1t,i)):this.ooi.pP&&this.Bd(i)}else Ui.um("Got timeupdate without a current interstitial")},n.Bd=function(i){t.prototype.Bd.call(this,i),this.d9=!1},n.hr=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return n.sent(),this.d9=!1,[2]}})}).call(this)},Nt(i,[{key:"Vhi",get:function(){return e4.DEFAULT}}]),i}(s4);U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Pt(),H(),U(),Et(),Pt();var T4=function(t){function i(i,n,r){var e;return(e=t.call(this,i,new Date)||this).Vai=void 0,e.jnt=void 0,e.Vai=n,e.jnt=r,e}return Ct(i,t),i}(rh),S4=function(t){return t.LOADED="DAILoaded",t.AD_BREAK_STARTED="DAIAdBreakStarted",t.AD_BREAK_ENDED="DAIAdBreakEnded",t.AD_PERIOD_STARTED="DAIAdPeriodStarted",t.AD_PERIOD_ENDED="DAIAdPeriodEnded",t.AD_PROGRESS="DAIAdProgress",t.CUEPOINTS_CHANGED="DAICuePointsChanged",t.CLICK="DAIClick",t.ERROR="DAIError",t.STARTED="DAIStarted",t.FIRST_QUARTILE="DAIFirstQuartile",t.MIDPOINT="DAIMidpoint",t.STREAM_INITIALIZED="DAIStreamInitialized",t.THIRD_QUARTILE="DAIThirdQuartile",t.COMPLETE="DAIComplete",t}({}),E4=function(t){function i(i,n){return t.call(this,"DAILoaded",i,n)||this}return Ct(i,t),i}(T4),I4=function(t){function i(i,n){return t.call(this,"DAIAdBreakStarted",i,n)||this}return Ct(i,t),i}(T4),R4=function(t){function i(i,n){return t.call(this,"DAIAdBreakEnded",i,n)||this}return Ct(i,t),i}(T4),C4=function(t){function i(i,n){return t.call(this,"DAIAdProgress",i,n)||this}return Ct(i,t),i}(T4),P4=function(t){function i(i,n){return t.call(this,"DAICuePointsChanged",i,n)||this}return Ct(i,t),i}(T4),D4=function(t){function i(i,n){return t.call(this,"DAIClick",i,n)||this}return Ct(i,t),i}(T4),N4=function(t){function i(i,n){return t.call(this,"DAIError",i,n)||this}return Ct(i,t),i}(T4),x4=function(t){function i(i,n){return t.call(this,"DAIStarted",i,n)||this}return Ct(i,t),i}(T4),B4=function(t){function i(i,n){return t.call(this,"DAIFirstQuartile",i,n)||this}return Ct(i,t),i}(T4),O4=function(t){function i(i,n){return t.call(this,"DAIMidpoint",i,n)||this}return Ct(i,t),i}(T4),M4=function(t){function i(i,n){return t.call(this,"DAIStreamInitialized",i,n)||this}return Ct(i,t),i}(T4),L4=function(t){function i(i,n){return t.call(this,"DAIThirdQuartile",i,n)||this}return Ct(i,t),i}(T4),F4=function(t){function i(i,n){return t.call(this,"DAIComplete",i,n)||this}return Ct(i,t),i}(T4);var U4=function(t){function i(i,n,r){var e;(e=t.call(this)||this).Hai=void 0,e.T2t=void 0,e.eui=void 0,e.Gai=void 0,e.iui=void 0,e.Xai=void 0,e.Q1t=void 0,e.jai=void 0,e.Qai=void 0,e.Ts=void 0,e.Kai=void 0,e.Yai=void 0,e.Jai=void 0,e.Zai=void 0,e.$ai=void 0,e.tui=void 0,e.Hai=i,e.T2t=n,e.eui=r,e.Gai=function(t){e.zai(!0);var i=H4(t),n=z4(t);e.So(new I4(i,n))},e.iui=function(t){e.zai(!1);var i=H4(t),n=z4(t);e.So(new R4(i,n))},e.Xai=function(t){var i=H4(t),n=z4(t);e.So(new C4(i,n))},e.Q1t=function(t){var i=H4(t),n=z4(t);e.So(new D4(i,n))},e.jai=function(t){var i=H4(t),n=z4(t);e.So(new F4(i,n))},e.Qai=function(t){var i=H4(t),n=z4(t);e.So(new P4(i,n))},e.Ts=function(t){var i=H4(t),n=z4(t);e.So(new N4(i,n))},e.Kai=function(t){var i=H4(t),n=z4(t);e.So(new B4(i,n))},e.Yai=function(t){var i=H4(t),n=z4(t);e.So(new E4(i,n))},e.Jai=function(t){var i=H4(t),n=z4(t);e.So(new O4(i,n))},e.Zai=function(t){var i=H4(t),n=z4(t);e.So(new x4(i,n))},e.$ai=function(t){var i=H4(t),n=z4(t);e.So(new M4(i,n))},e.tui=function(t){var i=H4(t),n=z4(t);e.So(new L4(i,n))},e.T2t&&(e.T2t.style.display="none",e.Hai.setClickElement(e.T2t));var s=google.ima.dai.api.StreamEvent.Type;return e.Hai.addEventListener(s.AD_BREAK_STARTED,e.Gai),e.Hai.addEventListener(s.AD_PROGRESS,e.Xai),e.Hai.addEventListener(s.CLICK,e.Q1t),e.Hai.addEventListener(s.COMPLETE,e.jai),e.Hai.addEventListener(s.CUEPOINTS_CHANGED,e.Qai),e.Hai.addEventListener(s.ERROR,e.Ts),e.Hai.addEventListener(s.FIRST_QUARTILE,e.Kai),e.Hai.addEventListener(s.LOADED,e.Yai),e.Hai.addEventListener(s.MIDPOINT,e.Jai),e.Hai.addEventListener(s.STARTED,e.Zai),e.Hai.addEventListener(s.STREAM_INITIALIZED,e.$ai),e.Hai.addEventListener(s.THIRD_QUARTILE,e.tui),e.Hai.addEventListener(s.AD_BREAK_ENDED,e.iui),e}Ct(i,t);var n=i.prototype;return n.replaceAdTagParameters=function(t){return this.Hai.replaceAdTagParameters(null!=t?t:null)},n.Wai=function(t){return this.Hai.contentTimeForStreamTime(t)},n.qai=function(t){return this.Hai.streamTimeForContentTime(t)},n.KHt=function(t,i){var n=function(t){return"vod"===t.availabilityType?new f.google.ima.dai.api.VODStreamRequest(Yu({},V4(t),{contentSourceId:t.contentSourceID,videoId:t.videoID})):new f.google.ima.dai.api.LiveStreamRequest(Yu({},V4(t),{assetKey:t.assetKey}))}(t);t.enableNonce&&(n.enableNonce=!0),this.Hai.requestStream(n)},n.hr=function(){this.zai(!1),this.Hai.reset()},n.kn=function(){this.Vo();var t=google.ima.dai.api.StreamEvent.Type;this.Hai.removeEventListener(t.AD_BREAK_STARTED,this.Gai),this.Hai.removeEventListener(t.AD_PROGRESS,this.Xai),this.Hai.removeEventListener(t.CLICK,this.Q1t),this.Hai.removeEventListener(t.COMPLETE,this.jai),this.Hai.removeEventListener(t.CUEPOINTS_CHANGED,this.Qai),this.Hai.removeEventListener(t.ERROR,this.Ts),this.Hai.removeEventListener(t.FIRST_QUARTILE,this.Kai),this.Hai.removeEventListener(t.LOADED,this.Yai),this.Hai.removeEventListener(t.MIDPOINT,this.Jai),this.Hai.removeEventListener(t.STARTED,this.Zai),this.Hai.removeEventListener(t.STREAM_INITIALIZED,this.$ai),this.Hai.removeEventListener(t.THIRD_QUARTILE,this.tui),this.Hai.removeEventListener(t.AD_BREAK_ENDED,this.iui),this.hr(),this.eui&&Zi(this.eui)},n.sui=function(t){this.Hai.onTimedMetadata(t)},n.nui=function(t,i,n){this.Hai.processMetadata(t,i,n)},n.rui=function(t){var i=this.Hai.previousCuePointForStreamTime(t);if(i)return{RO:i.end,CO:i.start,pP:i.played}},n.hui=function(t,i){var n=this.rui(t);if(n){var r=t>i&&n.RO>i,e=n.RO>t&&n.CO<=t;return n.pP||!r&&!e?void 0:n.CO}},n.zai=function(t){this.T2t&&(this.T2t.style.display=t?"block":"none")},i}(th);function V4(t){var i,n=google.ima.dai.api.StreamRequest.StreamFormat;return{apiKey:t.apiKey,authToken:t.authToken,format:"dash"===t.format?n.DASH:n.HLS,networkCode:t.networkCode,streamActivityMonitorId:t.streamActivityMonitorID,adTagParameters:t.adTagParameters,omidAccessModeRules:null!=(i=d1(t.omidAccessModeRules))?i:{}}}function H4(t){var i,n=t.getStreamData(),r=n.adProgressData;return r&&(i={P9t:r.adBreakDuration,oui:r.duration,I9t:r.adPosition,zx:r.currentTime,ct:r.duration,C9t:r.totalAds}),{aui:i,uui:(n.cuepoints||[]).map(function(t){return{CO:t.start,RO:t.end,pP:t.played}}),cui:n.errorMessage||void 0,dui:n.manifestFormat||void 0,lui:n.streamId||void 0,fui:(n.subtitles||[]).map(function(t){return{_ui:t.webvtt,gui:t.ttml,bs:t.language}}),Yu:n.url}}function W4(t){return{VYt:t.getAdSlotId(),G4t:t.getContent(),GT:t.getContentType(),Mi:t.getHeight(),Ti:t.getWidth()}}function z4(t){var i=t.getAd();if(i){var n=i.getAdPodInfo(),r=i.getCompanionAds().map(W4);return{fJt:i.getAdId(),v7t:{I9t:n.getAdPosition(),G0t:n.getMaxDuration(),Iri:n.getPodIndex(),qOt:n.getTimeOffset(),C9t:n.getTotalAds()},QKt:i.getAdSystem(),Rri:i.getAdvertiserName(),FYt:i.getApiFramework(),sYt:r,wYt:i.getCreativeId(),eti:i.getCreativeAdId(),Dri:i.getDealId(),_N:i.getDescription(),ct:i.getDuration(),gq:i.getTitle(),pui:i.getUniversalAdIdRegistry(),mui:i.getUniversalAdIdValue(),J7t:i.getVastMediaHeight(),Y7t:i.getVastMediaWidth(),X7t:i.getWrapperAdIds(),j7t:i.getWrapperAdSystems(),Q7t:i.getWrapperCreativeIds()}}}function X4(){var t=v.body.lastElementChild;if(V(t,HTMLIFrameElement)&&"Advertisement"===t.title)return t}U(),Et(),Pt();var q4=function(t){function i(i){var n;return(n=t.call(this,i)||this).q4t=!0,n.Zb=i.X0t,n}return Ct(i,t),i}(J3);U(),Et(),xt(),Pt();var G4=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).wui=void 0,r.wui=n,r}Ct(i,t);var n=i.prototype;return n.a1t=function(){return this.wui.getAdSystem()},n.d1t=function(){return this.od.Khi.Syt},Nt(i,[{key:"o",get:function(){return this.wui.getAdId()}},{key:"ct",get:function(){return this.wui.getDuration()}},{key:"KYt",get:function(){var t,i;return null==(i=this.wui)||null==(t=i.ad)?void 0:t.clickThroughUrl}},{key:"wYt",get:function(){return this.wui.getCreativeId()}},{key:"kJt",get:function(){return this.wui.getSkipTimeOffset()}}]),i}(J3),j4="urn:google:dai:2018",Q4=function(t){function i(i,n,r,e,s,u,o,h){var a;return void 0===u&&(u={}),(a=t.call(this,i,n,e,s,u)||this).Hai=void 0,a.Pui=void 0,a.Sui=void 0,a.Lui=void 0,a.yui=void 0,a.bui=void 0,a.Eui=void 0,a.Dui=void 0,a.Aui=void 0,a.Fui=-1,a.Uui=void 0,a.Vui=void 0,a.Wn=function(t){var i=t.Ht;a.Bui(i)},a.Mui=function(t){t.PO.wn(Ug.QL,a.Hui)},a.Joi=function(t){t.PO.mn(Ug.QL,a.Hui)},a.Hui=function(t){var i,n;if(a.Pui)if((null==(i=a.Lui)?void 0:i.Km)===Ng.ID3){var r,e=t.PO.U;if(_y(e))if(a.Fui<=t.PO.CO&&a.Uui!==e.text)a.Fui=t.PO.CO,a.Uui=e.text,null==(r=a.Hai)||r.onTimedMetadata({TXXX:e.text})}else if((null==(n=a.Lui)?void 0:n.Km)===Ng.EVENT_STREAM){var s,u,o=t.PO.U;null==(s=a.Hai)||s.onTimedMetadata(((u={})[j4]=o,u))}},a.Oui=function(t){switch(a.w1t&&(a.w1t.X0t=a.k5t.Nd()-a.k5t.Gx()),t.type){case google.ima.dai.api.StreamEvent.Type.ERROR:a.R5t.So(new A0(kZ.GENERAL));break;case google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED:if(a.ooi)break;a.Ed(),a.Vui=Ui.Og(a.Wui,250),a.Cui(a.loi);break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED:a.Vui&&Ui.Lg(a.Vui),a.ooi||a.Ed();break;case google.ima.dai.api.StreamEvent.Type.STARTED:var i,n=t.getAd();a.u1t=new G4(a.w1t,n),null==(i=a.ooi)||i.er({ad:a.u1t}),a.R5t.So(new QB(a.u1t,a.Yri(a.k5t.Gx())));break;case google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE:a.R5t.So(new W0(a.u1t,a.Yri(a.k5t.Gx())));break;case google.ima.dai.api.StreamEvent.Type.MIDPOINT:a.R5t.So(new X0(a.u1t,a.Yri(a.k5t.Gx())));break;case google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE:a.R5t.So(new G0(a.u1t,a.Yri(a.k5t.Gx())));break;case google.ima.dai.api.StreamEvent.Type.COMPLETE:a.R5t.So(new KB(a.u1t,a.Yri(a.k5t.Gx()))),a.u1t=void 0;break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED:if(!a.w1t)break;a.w1t.X0t>1.5&&a.Wui()}},a.Wui=function(){var t;a.u1t=new q4(a.w1t),null==(t=a.ooi)||t.er({ad:a.u1t}),a.R5t.So(new QB(a.u1t,a.Yri(a.k5t.Gx())))},a.Aui=r,a.Eui=o,a.Dui=h,a}Ct(i,t);var n=i.prototype;return n.Oai=function(){return!1},n.BW=function(t,i,n){return Vt(function(){var n,r;return zt(this,function(e){if(!t||!i||t===this.yui&&i===this.bui)return[2];if(void 0===this.Hai){if(void 0===(null==(r=f.google)||null==(n=r.ima)?void 0:n.dai))throw new y("IMA DAI SDK missing for THEOads");this.Hai=new google.ima.dai.api.StreamManager(this.k5t.xe.querySelector("video"),this.Aui)}return this.yui=t,this.bui=i,this.Sui=this.Tui(),[2,this.Sui]})}).call(this)},n.Tui=function(){var t=this,i=this.Hai;if(!i)return ut.resolve();this.kui(i),i.reset();var n=new google.ima.dai.api.PodStreamRequest;n.networkCode=this.yui,n.customAssetKey=this.bui,n.adTagParameters=this.loi,this.Eui&&(n.streamActivityMonitorId=this.Eui),n.format="hls";var r=this.xui(i,[google.ima.dai.api.StreamEvent.Type.STREAM_INITIALIZED,google.ima.dai.api.StreamEvent.Type.ERROR]).then(function(n){if(n.type===google.ima.dai.api.StreamEvent.Type.ERROR)throw new y("DAI stream request failed");t.Pui=n.getStreamData(),t.Iui(i)});return i.requestStream(n),r},n.xui=function(t,i,n){return new ut(function(r,e){if(n&&n.Hg)return e(new fr);for(var s,u=function(t){h(),r(t)},o=function(){h(),e(new fr)},h=function(){for(var r,e=Lt(i);!(r=e()).done;){var s=r.value;t.removeEventListener(s,u)}n&&n.jg(o)},a=Lt(i);!(s=a()).done;){var c=s.value;t.addEventListener(c,u)}n&&n.Xg(o)})},n.doi=function(i){void 0===i&&(i={}),t.prototype.doi.call(this,i),this.Cui(this.loi)},n.Cui=function(t){var i;void 0===t&&(t={}),null==(i=this.Hai)||i.replaceAdTagParameters(t)},n.Rui=function(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return i=this,(null==(n=this.xoi)?void 0:n.ghi)&&!S(this.xoi.ghi)?[2,this.xoi.ghi]:this.Dui&&(null==(r=this.xoi)?void 0:r.Qvt)?[4,mT(function(){return i.Nui()},t,4,500,5e3)]:[2,void 0];case 1:return[2,e.sent()]}})}).call(this)},n.Nui=function(){return Vt(function(){var t,i,n,r;return zt(this,function(e){switch(e.label){case 0:t=this.Dui+"/"+this.yui+"/"+this.bui+"/"+this.xoi.Qvt+".json",i=new Al({Yu:t,fk:Ud.BT,Hk:ml.GET,Wk:1e3}),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.k5t.Dx.vk(i)];case 2:return n=e.sent(),[3,4];case 3:throw e.sent(),new pZ(kZ.NETWORK,bZ.UNKNOWN_AD_RESPONSE,"The ad's PodId could not be loaded.");case 4:if(!gl(n))throw new pZ(kZ.NETWORK,bZ.UNKNOWN_ERROR,"Something went wrong while requesting JSON from server.");return[4,n.lk()];case 5:return(r=e.sent())?[2,r.podid]:[2,void 0]}})}).call(this)},n.Fai=function(t,i,n,r){return void 0===r&&(r=!1),Vt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,this.poi(t,i,n)];case 1:return e=s.sent(),[4,this.Eoi(e,t,n,void 0,r)];case 2:return s.sent(),[2]}})}).call(this)},n.poi=function(t,i,n){return Vt(function(){var r,e,s,u,o,h,a,c,f,v;return zt(this,function(d){switch(d.label){case 0:return this.xoi=t,e=t.Hhi,s=t.Whi,this._oi(t.Ihi),u=Yu({},this.loi,t.phi),this.Cui(u),[4,this.BW(e,s,n)];case 1:return d.sent(),o=Ui.Dh(t.Syt),h=Number(o.searchParams.get("d")),a=b.floor(1e3*b.min(h,t.ahi-i)),[4,this.Rui(n)];case 2:if(!(c=d.sent()))throw new y("Something went wrong with retrieving the PodID from the server.");return(null==(r=this.Pui)?void 0:r.streamId)?[3,4]:[4,this.Sui];case 3:d.sent(),d.label=4;case 4:return f=Ui.Dh("https://dai.google.com/linear/pods/v1/hls/network/"+this.yui+"/custom_asset/"+this.bui),"V2"===t.qhi?f.pathname+="/ad_break_id/"+c+".m3u8":f.pathname+="/pod/"+c+".m3u8",v=this.Pui.streamId,f.searchParams.set("stream_id",v),f.searchParams.set("pd",String(a)),[2,cE({sources:{src:f.toString()}})]}})}).call(this)},n.Soi=function(){var i=this;this.k5t.nt.NI.forEach(function(t){return i.Wn(new Rw(t))}),this.k5t.nt.wn(Iw.rI,this.Wn),t.prototype.Soi.call(this)},n.koi=function(){t.prototype.koi.call(this),this.k5t.nt.mn(Iw.rI,this.Wn)},n.Bui=function(t){if(t.Lt===Jm.zU&&!(t.Km!==Ng.ID3&&t.Km!==Ng.EVENT_STREAM||t.Km===Ng.EVENT_STREAM&&t.eC!==j4)){if(t.wn(Nw.uI,this.Mui),t.wn(Nw.dI,this.Joi),t.L)for(var i,n=Lt(t.L.NI);!(i=n()).done;){var r=i.value;this.Mui(new GP(r))}t.Qk=zm.iC,this.Lui=t}},n.Iui=function(t){t&&(t.addEventListener(google.ima.dai.api.StreamEvent.Type.ERROR,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.CLICK,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.STARTED,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.MIDPOINT,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.COMPLETE,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.RESUMED,this.Oui))},n.kui=function(t){t&&(t.removeEventListener(google.ima.dai.api.StreamEvent.Type.ERROR,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.CLICK,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.STARTED,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.MIDPOINT,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.COMPLETE,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.RESUMED,this.Oui))},n.Ed=function(){this.ooi=this.xoi,this.xoi=void 0,this.w1t=this.y5t(this.ooi),this.w1t?this.R5t.So(new GB(this.w1t)):Ui.dm("Started an ad break without having a current adbreak to our knowledge")},n.Bd=function(i){t.prototype.Bd.call(this,i),this.Fui=-1,this.Uui=void 0},n.hr=function(){var i=this;return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return e.sent(),this.kui(this.Hai),null==(n=this.Hai)||n.reset(),this.Hai=void 0,this.Pui=void 0,this.Sui=void 0,this.Eui=void 0,this.bui=void 0,this.yui=void 0,this.voi=!0,this.Fui=-1,this.Uui=void 0,void 0!==(r=X4())&&Zi(r),[2]}})}).call(this)},n.kn=function(){var i=this;return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return r.sent(),null==(n=this.Lui)||n.kn(),[2]}})}).call(this)},Nt(i,[{key:"Vhi",get:function(){return e4.GOOGLE}}]),i}(s4);U(),Et(),Wt(),Pt(),Qt();var Y4=function(t){function i(i){return t.call(this,i)||this}Ct(i,t);var n=i.prototype;return n.qui=function(){},n.Eoi=function(t,i,n,r){return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,this.oa.Ta(t,r)];case 1:return e.sent(),this.zui(this.oa,i,n),[2]}})}).call(this)},n.zui=function(t,i,n){i&&t.Xx(i),n&&t.QP()},n.Gui=function(t){},i}(a0);U(),Et(),Wt(),xt(),Pt(),Qt(),St();var K4=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).ePt=0,i.Toi=function(t){i.Bd(i.Yri(t.currentTime))},i}Ct(i,t);var n=i.prototype;return n.Oai=function(){return!0},n.BW=function(t,i,n){return ut.resolve()},n.Fai=function(t,i,n,r){return void 0===r&&(r=!1),this.xoi=t,this.yoi(t,i),ut.resolve()},n.Eoi=function(t,i,n,r,e){return Vt(function(){return zt(this,function(t){return[2,ut.resolve()]})})()},n.poi=function(t,i,n){return Vt(function(){return zt(this,function(i){return this.xoi=t,[2,cE({sources:{src:t.Syt}})]})}).call(this)},n.uoi=function(t){this.ePt=t-this.k5t.Gx(),this.U9t(t)},n.bd=function(t){if(this.ooi){var i=this.Yri(t.currentTime);this.ooi.dhi(i),this.ooi.pP&&this.Bd(i)}else Ui.um("Got timeupdate without a current interstitial")},n.Yri=function(t){return this.ePt+t},Nt(i,[{key:"Vhi",get:function(){return e4.COMPANION}}]),i}(s4);U(),Et(),Wt(),Pt(),Qt(),U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),St(),U(),Et(),xt(),Pt();var J4=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).Xui=void 0,r.Xui=n,r}Ct(i,t);var n=i.prototype;return n.a1t=function(){return this.Xui.QKt},n.d1t=function(){return this.od.Khi.Syt},Nt(i,[{key:"o",get:function(){return this.Xui.fJt}},{key:"ct",get:function(){return this.Xui.ct}},{key:"KYt",get:function(){}},{key:"wYt",get:function(){return this.Xui.wYt}},{key:"kJt",get:function(){return this.Xui.tti}}]),i}(J3),Z4=function(t){function i(i,n,r,e,s,u){var o,h;void 0===u&&(u={}),o=t.call(this,n,r,e,s,u)||this,(h=o).Nti=void 0,h.rci=void 0,h.dnt=void 0,h.uci=0,h.M9t=function(t){return Vt(function(){var i;return zt(this,function(n){return h.R5t.So(new A0(kZ.GENERAL,null==(i=t.J9t.D7t)?void 0:i.Iy)),[2]})})()},h.Kui=function(){h.L9t()},h.Yui=function(){h.O9t()},h.F9t=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,h.O9t()];case 1:return t.sent(),[2]}})})()},h.Jui=function(t){var i=t.jnt;i&&h.w1t&&(h.u1t=new J4(h.w1t,i),h.aci())},h.Zui=function(){h.R5t.So(new W0(h.u1t,h.Yri(h.k5t.Gx())))},h.$ui=function(){h.R5t.So(new X0(h.u1t,h.Yri(h.k5t.Gx())))},h.tci=function(){h.R5t.So(new G0(h.u1t,h.Yri(h.k5t.Gx())))},h.ici=function(){h.cci()},h.eci=function(){h.k5t.So(new fT(h.Yri(h.k5t.Gx()))),h.k5t.So(new Ly(h.Yri(h.k5t.Gx())))},h.sci=function(){h.k5t.So(new cT(h.Yri(h.k5t.Gx())))},h.nci=function(){h.Xai()},h.hci=function(){h.xoi?(h.ooi=h.xoi,h.xoi=void 0,h.w1t=h.y5t(h.ooi),h.R5t.So(new GB(h.w1t))):Ui.um("Started an ad break without having a current ad break to our knowledge")},h.Toi=function(t){h.Bd(h.Yri(t.currentTime))},h.dnt=i,h.rci=D1(h.k5t.Cd)?h.k5t.zP():void 0;var a=new w3(h.rci,h.k5t.xe),c=new k3(a,h.k5t.Wu),f=new A3(h.k5t);return h.Nti=new N1(a,f,c),o}Ct(i,t);var n=i.prototype;return n.BW=function(t,i,n){return ut.resolve()},n.QP=function(){this.hoi&&this.Nti.kti()},n.jP=function(){this.hoi&&this.Nti.jP()},n.coi=function(t){this.hoi&&this.Nti.UP(t)},n.Fai=function(t,i,n,r){return void 0===r&&(r=!1),Vt(function(){return zt(this,function(i){return this.xoi=t,[2,this.jui(t)]})}).call(this)},n.jui=function(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return i=this.u6t(this.Qui(t)),n={Yti:void 0,Jti:void 0,Zti:!0,z9:void 0,$ti:void 0,tii:void 0},[4,this.Nti.r8t(i,n)];case 1:return e.sent(),this.Nti.xti()||(r=this.dnt.oP?0:this.dnt.OP,this.Nti.UP(r)),[2]}})}).call(this)},n.u6t=function(t){return{f6t:this.k5t.xe.offsetWidth,v6t:this.k5t.xe.offsetHeight,_6t:this.k5t.xe.offsetWidth,g6t:this.k5t.xe.offsetHeight,p6t:!0,m6t:this.dnt.oP,w6t:t,y6t:void 0,b6t:void 0,A6t:0}},n.poi=function(t,i,n){return Vt(function(){return zt(this,function(i){return this.xoi=t,[2,cE({ads:[{integration:"google-ima",sources:this.Qui(t)}]})]})}).call(this)},n.Qui=function(t){var i=new URL(t.Syt),n=i.searchParams;this._oi(t.Ihi);for(var r,e=Yu({},this.loi,t.phi),s=Lt(k.keys(e));!(r=s()).done;){var u=r.value;n.set(u,e[u])}return i.toString()},n.Soi=function(){t.prototype.Soi.call(this);var i=this.Nti.j0t;null==i||i.wn(u1.U8t,this.M9t),null==i||i.wn(s1._8t,this.Kui),null==i||i.wn(s1.v8t,this.Yui),null==i||i.wn(s1.D8t,this.F9t),null==i||i.wn(s1.m8t,this.Jui),null==i||i.wn(s1.S8t,this.Zui),null==i||i.wn(s1.XJt,this.$ui),null==i||i.wn(s1.T8t,this.tci),null==i||i.wn(s1.jJt,this.ici),null==i||i.wn(s1.y8t,this.eci),null==i||i.wn(s1.Yz,this.sci),null==i||i.wn(s1.b8t,this.nci)},n.koi=function(){var i=this.Nti.j0t;null==i||i.mn(u1.U8t,this.M9t),null==i||i.mn(s1._8t,this.Kui),null==i||i.mn(s1.v8t,this.Yui),null==i||i.mn(s1.D8t,this.F9t),null==i||i.mn(s1.m8t,this.Jui),null==i||i.mn(s1.S8t,this.Zui),null==i||i.mn(s1.XJt,this.$ui),null==i||i.mn(s1.T8t,this.tci),null==i||i.mn(s1.jJt,this.ici),null==i||i.mn(s1.y8t,this.eci),null==i||i.mn(s1.Yz,this.sci),null==i||i.mn(s1.b8t,this.nci),t.prototype.koi.call(this)},n.L9t=function(){if(this.rci&&(this.rci.style.display="block"),!this.hoi){var t=this.dnt.oP?0:this.dnt.OP;this.Nti.UP(t)}this.hci()},n.O9t=function(){return Vt(function(){return zt(this,function(t){return this.w1t?(this.Bd(this.Yri(this.w1t.G0t)),[2]):[2]})}).call(this)},n.aci=function(){var t,i;null==(t=this.ooi)||t.er({ad:this.u1t}),this.uci=this.Yri(null==(i=this.k5t)?void 0:i.Gx()),this.R5t.So(new QB(this.u1t,this.uci))},n.cci=function(){var t=this.uci+this.u1t.ct;this.R5t.So(new KB(this.u1t,t)),this.u1t=void 0},n.hr=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return n.sent(),this.Nti.kn(),this.uci=0,[2]}})}).call(this)},Nt(i,[{key:"Vhi",get:function(){return e4.CSAI}}]),i}(s4),$4=function(t){function i(i,n,r,e,s,u){var o;return void 0===u&&(u={}),(o=t.call(this,i,n,r,e,s,u)||this).dci=function(){o.ooi||o.Nti.Tti()},o.k5t.wn(eh.uo,o.dci),o}Ct(i,t);var n=i.prototype;return n.Oai=function(){return!1},n.Xai=function(){var t=this.Nti.I7t();if(this.w1t&&void 0!==t){var i=this.w1t.G0t-t;this.k5t.Xx(i);var n=this.k5t.ihi?new Date(this.k5t.ihi.getTime()+1e3*i):void 0;this.k5t.So(new bw(i,n))}},n.hr=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return n.sent(),this.k5t.mn(eh.uo,this.dci),[2]}})}).call(this)},i}(Z4);U(),Et(),Wt(),Pt(),Qt();var t5=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).lci=void 0,i.fci=void 0,i}Ct(i,t);var n=i.prototype;return n.Oai=function(){return!0},n.Eoi=function(t,i,n,r,e){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.Fai(i,this.dnt.Gx(),n)];case 1:return t.sent(),this.Nti.Tti(),[2]}})}).call(this)},n.Xai=function(){var t=this.Nti.I7t();if(this.w1t&&void 0!==t){var i,n=null!=(i=this.lci)?i:0;n+=this.w1t.G0t-t,this.dnt.Xx(n);var r=this.fci?new Date(this.fci.getTime()+1e3*n):void 0;this.dnt.So(new bw(n,r))}},n.L9t=function(){t.prototype.L9t.call(this),this.lci=this.dnt.Gx(),this.fci=this.dnt.Vx,this.dnt.jP()},n.O9t=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.O9t.call(i)];case 1:return n.sent(),this.dnt.QP(),[2]}})}).call(this)},n.Yri=function(t){return t},i}(Z4),i5=function(t){function i(i){var n,r,e;return n=t.call(this,i)||this,(r=n).dnt=void 0,r.Eci=void 0,r.Ls=void 0,r.kci=void 0,r.Aui=void 0,r.nq=void 0,r.Wz=void 0,r.pci=void 0,r.bci=void 0,r.gci=void 0,r.Eai=void 0,r.Pci=void 0,r.loi=void 0,r.Wci=void 0,r.Ici=void 0,r.Gci=void 0,r.sdi=void 0,r.Xci=void 0,r.Oci=void 0,r.qci=void 0,r._ci=void 0,r.Bai=void 0,r.vci=void 0,r.Yci=Ju(),r.adi=!0,r.udi=NaN,r.Qci=NaN,r.jci=NaN,r.cdi=void 0,r.odi=!1,r.ldi=!0,r.YG=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return r.dnt.mn(Ry.PM,r.YG),r.pci?r.pci.initializationDelay?(r.cdi=Ui.Og(function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return r.pci?[4,r.Sci(r.pci)]:[2];case 1:return t.sent(),[2]}})})()},1e3*r.pci.initializationDelay),[3,3]):[3,1]:[2];case 1:return[4,r.Sci(r.pci)];case 2:t.sent(),t.label=3;case 3:return[2]}})})()},r.Kq=function(){r.dnt.mn(Ry.EM,r.Kq),r._ci.Ooi(r.oa.nt)},r.mci=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),[4,r.rnt.Fj([mE.THEOADS])];case 1:return i.sent(),[3,4];case 2:return t=i.sent(),[4,r.KP().catch(dn)];case 3:return i.sent(),r.Qq(wd(t,vd.LICENSE_INVALID_FEATURE)),[3,4];case 4:return[2]}})})()},r.Att=function(t){d0(r.Eci,r.oa.MP,r.oa.DP,t.width,t.height)},r.rjt=function(){d0(r.Eci,r.oa.MP,r.oa.DP,r.Wu.Eu,r.Wu.Iu)},r.Cci=function(){r.Jci(r.Gx()),r.Zci()},r.JG=function(){r.Jci(r.Gx()),r.Zci()},r.Nci=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return r.rdi()?r.Xci?[2]:(r.Xci=r.Gci,[4,r.Xci]):[3,2];case 1:return t.sent(),r.Lci(function(){return r.Hci()}),[3,3];case 2:r.Lci(function(){return r.I3t()}),t.label=3;case 3:return[2]}})})()},r.Bci=function(t){return r.Fci(r.Wci,"Error playing the current adbreak: "+t.error),r.Lci(function(){return r.I3t()})},r.Kci=function(t){r.gci.So(t.Ca)},r.dnt=new Y4(i),r.Ls=i.xe,r.Eci=function(){var t=v.createElement("div");return sn(t,"theo-ads-sgai-container"),t}(),r.kci=function(){var t=v.createElement("div");return sn(t,"theo-ads-sgai-content-player"),t}(),r.gci=new w4(r),r.Pci=new g4,null==(e=r.dnt.Jc)||e.znt(r.Pci),r.Bai=new t4(i.Dx),r._ci=new c4(r),r.vci=new _4(r.dnt,r.kci,r.Bai),n}Ct(i,t);var n=i.prototype;return n._nt=function(){return this.dnt.Jc},n.ynt=function(){return this.gci.Ca},n.jx=function(){return this.Ls},n.vnt=function(){return this.dnt.Kst},n.Yx=function(){var i;return null!=(i=this.Wz)?i:t.prototype.Yx.call(this)},n.Zx=function(){var i;return null!=(i=this.nq)?i:t.prototype.Zx.call(this)},n.GP=function(){this.dnt.GP()},n.lai=function(t){return t},n.QP=function(){var i;t.prototype.QP.call(this),null==(i=this.Eai)||i.QP()},n.jP=function(){var i;t.prototype.jP.call(this),null==(i=this.Eai)||i.jP()},n.UP=function(i){var n;t.prototype.UP.call(this,i),null==(n=this.Eai)||n.coi(i)},n.uP=function(i){var n;t.prototype.uP.call(this,i);var r=i?0:this.oa.OP;null==(n=this.Eai)||n.coi(r)},n.Ta=function(i,n){var r=this;return Vt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,this.Xpt()];case 1:return s.sent(),[4,t.prototype.Ta.call(r,i,n)];case 2:return s.sent(),void 0===i||void 0===i.ads?[2]:void 0===(e=Fn(i.ads,w0))?[2]:(this.mci(),this.wci(),this.yci(),this.pci=e,this.bci=e.backdropLShape,this.vci.phi=e.adTagParameters,this._ci.vai=function(t){switch(t){case"single":return x3.SINGLE;case"l-shape":return x3.LSHAPE_AD;case"double":return x3.DOUBLE;case"single-if-mobile":return Bi.Ks?x3.SINGLE:void 0;default:return}}(this.pci.overrideLayout),this._ci.Woi=this.pci.useId3,this.dnt.wn(Ry.EM,this.Kq),this.Wu.wn(fI.yn,this.Att),this.wn(eh.Jw,this.rjt),[4,this.Aci(e4.DEFAULT,void 0,void 0)]);case 3:return s.sent(),this.dnt.wn(Ry.PM,this.YG),[2]}})}).call(this)},n.Sci=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.Tci(),i=void 0===t.networkCode||void 0===t.customAssetKey?e4.DEFAULT:e4.GOOGLE,[4,this.Aci(i,t.networkCode,t.customAssetKey)];case 1:return n.sent(),t.sseEndpoint&&this._ci.Doi(t.sseEndpoint),[2]}})}).call(this)},n.wci=function(){tn(this.Ls,this.kci),an(this.Eci),an(this.kci),this.Eci.appendChild(this.kci),this.Ls.appendChild(this.Eci)},n.xci=function(){tn(this.kci,this.Ls),cn(this.kci),cn(this.Eci),Zi(this.kci),Zi(this.Eci)},n.Aci=function(t,i,n){return Vt(function(){var r,e,s,u,o,h,a,c,f,v;return zt(this,function(d){switch(d.label){case 0:return u=this.t4t(),o=this.Aui,u&&o?t===(null==(r=this.Eai)?void 0:r.Vhi)?[2]:(a=null!=(h=null==(e=this.Eai)?void 0:e.K0t)?h:[],[4,null==(s=this.Eai)?void 0:s.hr()]):[2];case 1:switch(d.sent(),t){case e4.GOOGLE:return[3,2];case e4.COMPANION:return[3,4];case e4.CSAI:return[3,5];case e4.DEFAULT:return[3,6]}return[3,6];case 2:return this.Eai=new Q4(u,this.Pci,o,a,this.Bai,this.phi,null==(c=this.pci)?void 0:c.streamActivityMonitorId,null==(f=this.pci)?void 0:f.retrievePodIdURI),[4,null==(v=this.Eai)?void 0:v.BW(i,n)];case 3:return d.sent(),[3,7];case 4:return this.Eai=new K4(this.dnt,this.Pci,a,this.Bai,this.phi),[3,7];case 5:return u===this.dnt?(this.Eai=new t5(this.dnt,u,this.Pci,a,this.Bai,this.phi),[3,7]):(this.Eai=new $4(this.dnt,u,this.Pci,a,this.Bai,this.phi),[3,7]);case 6:this.Eai=new A4(u,this.Pci,a,this.Bai,this.phi),d.label=7;case 7:return[2]}})}).call(this)},n.eai=function(t,i){return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.Ici||void 0===t||void 0===i?[2]:(null==(n=this.Eai)?void 0:n.Vhi)===e4.GOOGLE?[3,2]:[4,this.Aci(e4.GOOGLE,t,i)];case 1:r.sent(),r.label=2;case 2:return[2]}})}).call(this)},n.Qq=function(t){void 0===this.Zx()&&(this.nq=t,this.Wz=cg(t),this.So(new yb(t)))},n.Tci=function(){this.dnt.wn(eh.py,this.Cci),this.dnt.wn(eh.$w,this.JG)},n.Rci=function(){this.dnt.mn(eh.py,this.Cci),this.dnt.mn(eh.$w,this.JG)},n.Dci=function(){var t,i;this.Pci.u4t.wn("Knt",this.Nci),null==(t=this.Eai)||t.wn(r4.AD_ENDED,this.Nci),null==(i=this.t4t())||i.wn(qm.ma,this.Bci)},n.Mci=function(){var t,i;this.Pci.u4t.mn("Knt",this.Nci),null==(t=this.Eai)||t.wn(r4.AD_ENDED,this.Nci),null==(i=this.t4t())||i.mn(qm.ma,this.Bci)},n.Lci=function(t){var i=this,n=function(){i.Oci=void 0};this.Oci=t().then(n).catch(n)},n.Fci=function(t,i){this.gci.So(new k4(t,i).Ca),t.pP=!0,n5(t)&&this.Oci&&(this.Ici=void 0)},n.Uci=function(){return Vt(function(){var t;return zt(this,function(i){return null==(t=this.Eai)||t.Soi(),this.Vci(),[2]})}).call(this)},n.Hci=function(){return Vt(function(){var t,i,n,r;return zt(this,function(e){switch(e.label){case 0:return this.Aoi(this.Wci),void 0===(i=this.Ici)?[2,this.I3t()]:i.Ihi===x3.LSHAPE_CONTENT?[3,2]:[4,null==(n=this.t4t())?void 0:n.Ta(this.qci,(new hr).Yg)];case 1:e.sent(),null==(r=this.t4t())||r.QP(),e.label=2;case 2:return null==(t=this.Eai)||t.uoi(this.Gx()),this.gci.So(new z3(i).Ca),this.Vci(),[2]}})}).call(this)},n.I3t=function(){return Vt(function(){var t;return zt(this,function(i){return this.zci(),null==(t=this.Eai)||t.koi(),this.Aoi(this.Wci),this.Wci=void 0,[2]})}).call(this)},n.Vci=function(){this.zci(),this.Wci=this.Ici,this.Ici=void 0,this.Gci=void 0,this.Xci=void 0},n.zci=function(){var t=this.oa.DP,i=this.oa.MP;t===this.jci&&i===this.Qci||(this.jci=t,this.Qci=i,this.So(new Ey))},n.boi=function(t){var i;n5(t)&&(null==(i=this.Eai)||i.boi(t),this.pai(this.Gx()));t.wn("ohi",this.Kci),this.gci.So(new m4(t.Ont()))},n.Aoi=function(t){if(jn(this._ci.Coi,t)){var i;if(this._ci.Aoi(t),n5(t))null==(i=this.Eai)||i.Aoi(t);else r5(t)&&(this.vci.Dai(t),this.Yci.delete(t.o));t.mn("ohi",this.Kci),this.gci.So(new y4(t).Ca)}},n.pai=function(t){this.Jci(t),this.Zci()},n.Jci=function(t){this.$ci(t),this.tdi(t),this.idi(t)},n.$ci=function(t){if(void 0===this.Oci){for(var i,n,r=[],e=Lt(this._ci.Coi.filter(n5));!(n=e()).done;){var s=n.value;s.pP?r.push(s):s!==this.Wci&&(t>=s.CO+5||this.Wci&&s.CO+5=t.CO);var s=t.ahi,u=i>=t.CO&&(void 0===s||i=this.Ici.CO&&(void 0===r||t=e||i.pP)return"continue";var u=i.CO,o=i.CO+i.ct;r>=u&&r<=o&&!t.Yci.has(i.o)&&t.Pai(i).catch(function(){n.Fci(i,"Could not load the overlay."),n.Aoi(i)})},n=this,r=this.Gx(),e=[];this.Yci.forEach(function(t){r>=t.CO&&(void 0===t.ahi||r0&&(n.vdi-=n.dnt.Gx())},n.Dxt=BW.Bg,n.ydi=new f3(Ui.Dx),n}Ct(i,t);var n=i.prototype;return n.Nd=function(){var i;return null!=(i=this.Zb)?i:t.prototype.Nd.call(this)},n.nu=function(){var i;return null!=(i=this.Ac)?i:t.prototype.nu.call(this)},n.Gx=function(){return this.lai(t.prototype.Gx.call(this))},n.Hx=function(){return this.fdi?new Date(this.fdi.getTime()+fe(this.dnt.Gx())):t.prototype.Hx.call(this)},n.Ux=function(){var i=t.prototype.Ux.call(this);return EA.jn(i).Ly(this.vdi)._s()},n.EP=function(){var i=t.prototype.EP.call(this);return EA.jn(i).Ly(this.vdi)._s()},n.lai=function(t){return t+this.vdi},n.Ta=function(i,n){var r=this;return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Ta.call(r,i,n)];case 1:return e.sent(),this.pci?(this.Ac=i,this._di=new V3(this.dnt),this._di.gr(this.kci,this.Eci),this.nO(this._di),[2]):[2]}})}).call(this)},n.yci=function(){},n.wci=function(){t.prototype.wci.call(this),this.Aui=c0(this.Eci)},n.Tci=function(){t.prototype.Tci.call(this),this.gdi()},n.Rci=function(){t.prototype.Rci.call(this),this.pdi()},n.gdi=function(){this.dnt.wn(eh.Cw,this.ejt),this.dnt.wn(Ry.PM,this.VV)},n.pdi=function(){this.dnt.mn(eh.Cw,this.ejt),this.dnt.mn(Ry.PM,this.VV)},n.t4t=function(){return this.dnt},n.Xx=function(i,n){this.mdi=!0,t.prototype.Xx.call(this,i,n)},n.QP=function(){t.prototype.QP.call(this),this.So(new fT(this.Gx())),this.ldi=!0,this.wdi=!1},n.jP=function(){this.wdi=!0,t.prototype.jP.call(this)},n.hdi=function(t,i,n){return Vt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return s=this,[4,null==(r=this.Eai)?void 0:r.poi(t,i,n)];case 1:return s.l$t=h.sent(),(null==(e=this.Eai)?void 0:e.Oai())?[2]:(u=new e3(this.Dxt,this.ydi),o=new f2(this.Dxt.Mxt,u,"temporary"),this.bdi=o.asi(this.l$t,s3({amount:30,bandwidth:bb.Bg.pW()||this.Kst.jY}),"temporary"),this.Adi.Zg(),this.Adi=new hr,this.ydi.jet(this.bdi,this.Dxt,"temporary").mi(this.Adi.Yg).catch(dn),[2])}})}).call(this)},n.Sdi=function(t,i){switch(t){case x3.LSHAPE_CONTENT:case x3.LSHAPE_AD:return new W3(this.dnt,i);case x3.SINGLE:default:return new H3(this.dnt)}},n.Tdi=function(t){return Vt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return null==(i=this.sdi)||i.Zg(),this.sdi=new hr,[4,this.Aci(t.Vhi,t.Hhi,t.Whi)];case 1:return o.sent(),null==(n=this._di)||n.mr(this.kci),(null==(r=this.Eai)?void 0:r.Oai())||(this.odi=!0,this.vdi=this.Gx(),this.fdi=this.Hx(),this.dnt.wn(Ry.PM,this.VV)),this.gci.So(new z3(t).Ca),[4,null==(e=this.Eai)?void 0:e.Eoi(this.l$t,t,this.sdi.Yg,void 0,!0)];case 2:return o.sent(),this._di=this.Sdi(t.Ihi,null!=(u=t.Chi)?u:this.bci),this.B3t(this._di),this._di.gr(this.kci,this.Eci),null==(s=this.Eai)||s.uoi(this.Gx()),[2]}})}).call(this)},n.Uci=function(){var i=this;return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return void 0===this.Ici||void 0===this.l$t?[2]:(this.pdi(),this.Rz=this.vP,[4,this.Tdi(this.Ici)]);case 1:return r.sent(),this.Dci(),(null==(n=this.Eai)?void 0:n.Oai())||(this.kdi=!1),[2,t.prototype.Uci.call(i)]}})}).call(this)},n.Hci=function(){var i=this;return Vt(function(){var n;return zt(this,function(r){return(null==(n=this.Eai)?void 0:n.Vhi)!==e4.COMPANION&&(this.odi=!0,this.ehi=!1,this.vdi=this.Gx(),this.fdi=this.Hx(),this._ci.Voi(this.dnt.nt),this.dnt.wn(Ry.kM,this.Edi),this.dnt.wn(Ry.EM,this.Kq),this.dnt.wn(Ry.PM,this.VV)),[2,t.prototype.Hci.call(i)]})}).call(this)},n.I3t=function(){var i=this;return Vt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return this.Wci?(null==(n=this.bdi)||n.pS(),this.bdi=void 0,this.Mci(),(null==(r=this.Eai)?void 0:r.Oai())?[3,2]:(this.odi=!0,this.ehi=!1,this.vdi=this.Gx(),this.fdi=this.Hx(),this._ci.Voi(this.dnt.nt),this.dnt.wn(Ry.kM,this.Edi),this.dnt.wn(Ry.EM,this.Kq),this.dnt.wn(Ry.PM,this.VV),[4,this.dnt.Ta(this.Ac,(new hr).Yg)])):[2];case 1:o.sent(),o.label=2;case 2:return null==(e=this._di)||e.mr(this.kci),this._di=new V3(this.dnt),this._di.gr(this.kci,this.Eci),this.B3t(this._di),(null==(s=this.Eai)?void 0:s.Oai())||(this.vP=null!=(u=this.Rz)?u:1,this.dnt.QP()),this.kdi=!0,this.gdi(),[2,t.prototype.I3t.call(i)]}})}).call(this)},n.Xpt=function(){var i=this;return Vt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this._di=void 0,this.Zb=void 0,this.vdi=0,this.l$t=void 0,this.Rz=void 0,this.fdi=void 0,this.kdi=!0,this.odi=!1,this.ldi=!0,this.wdi=!0,this.Adi.Zg(),this.Adi=new hr,null==(n=this.bdi)||n.pS(),this.bdi=void 0,this.dnt.mn(Ry.kM,this.Edi),[4,t.prototype.Xpt.call(i)];case 1:return r.sent(),[2]}})}).call(this)},n.ddi=function(){return t.prototype.ddi.call(this)||this.odi&&!this.mdi},n.eI=function(i){if(void 0!==this._di)switch(i.type){case eh.uo:return!0;case eh.jw:return!this.wdi||(this.wdi=!1,this.So(new cT(this.lai(i.currentTime))),!0);case Ry.PM:return!this.ldi||(this.ldi=!1,this.So(new Ly(this.lai(i.currentTime))),!0);case Ry.xM:return this.odi||(this.ldi=!0,this.So(new By(this.lai(i.currentTime)))),!0;case eh.Zw:return this.ddi()||(this.mdi=!1,this.So(new gT(this.lai(i.currentTime)))),!0;case eh.$w:return this.ddi()||this.So(new wT(this.lai(i.currentTime))),!0;case eh.Nw:return!this.kdi||(this.So(new lT(this.lai(i.currentTime))),!0);case eh.py:return this.So(new bw(this.lai(i.currentTime),i.currentProgramDateTime)),!0;case eh.Qw:return this.So(new YR(this.lai(i.currentTime))),!0;case eh.Kw:return this.So(new dT(this.lai(i.currentTime),i.playbackRate)),!0;case eh.wy:return this.ehi?(this.So(new _T(this.lai(i.currentTime),i.volume)),!0):(this.ehi=!0,!0);case eh.Rw:return this.So(new aT(this.lai(i.currentTime),i.readyState)),!0;case Ry.SM:return this.So(new Oy(this.lai(i.currentTime),i.readyState)),!0;case Ry.TM:return this.So(new My(this.lai(i.currentTime),i.readyState)),!0;case Ry.kM:return this.So(new xy(this.lai(i.currentTime),i.readyState)),!0;case Ry.EM:return this.So(new Ny(this.lai(i.currentTime),i.readyState)),!0;case Ry.AI:return this.So(new Py(this.lai(i.currentTime),i.readyState)),!0;case eh.Dw:return this.So(new gH(this.lai(i.currentTime),i.initDataType,i.initData)),!0}return t.prototype.eI.call(this,i)},i}(i5);U(),Et(),Wt(),xt(),Pt(),Qt();var s5=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).dnt=void 0,r.k5t=void 0,r.Ndi=void 0,r.Ldi=void 0,r.Mdi=void 0,r.Bdi=void 0,r.Vdi=void 0,r.xdi=0,r.Pdi=void 0,r.Idi=0,r.pGt=void 0,r.Cdi=void 0,r.qdi=0,r.Ddi=0,r.zdi=function(){if(r.dnt.mn(Ry.EM,r.zdi),r.Pdi){var t=r.Pdi;t.setSeconds(r.Pdi.getSeconds()+r.qdi),r.dnt.Vx=t,r.Pdi=void 0}r.Idi-=r.dnt.Gx(),r.pGt=void 0,r.Cdi=void 0},r.HV=function(){r.k5t.QP()},r.WV=function(){r.k5t.jP()},r.dnt=i,r.k5t=n,r}Ct(i,t);var n=i.prototype;return n.Eoi=function(t,i,n,r){return this.k5t.Eoi(t,i,n,r)},n.Rdi=function(t,i,n,r){var e,s;this.xdi=t,r?this.Ddi=0:this.Ddi+=n,this.Pdi=i,null==(s=this.Pdi)||s.setSeconds((null==(e=this.Pdi)?void 0:e.getSeconds())+this.Ddi)},n.rhi=function(){var t;if(void 0===this.Ndi){this.pGt=void 0,this.Cdi=void 0;var i=this.Bdi;this.Bdi=void 0,null==(t=this.Mdi)||t.Zg(),a5(this.dnt)&&(this.Ldi=new hr,this.Ndi=_r(this.Odi(i,this.Ldi.Yg),this.Ldi).catch(wr))}},n.hhi=function(){var t;this.pGt=this.xdi+this.oa.Gx(),this.ihi&&(this.Cdi=new Date(this.ihi.getTime()+1e3*this.oa.Gx()));var i=this.Ndi;this.Ndi=void 0,null==(t=this.Ldi)||t.Zg(),this.Mdi=new hr,this.Bdi=_r(this.Fdi(i,this.Mdi.Yg),this.Mdi).catch(wr)},n.Aa=function(){return this.dnt.Sq},n.Udi=function(){this.Vdi||(this.Vdi={source:this.dnt.nu(),duration:this.dnt.Nd(),currentTime:this.dnt.Gx(),preload:this.dnt.wP,autoplay:this.dnt.vO,playbackRate:this.dnt.vP})},n.Hdi=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.dnt.wP=YT.HL,this.dnt.vO=!1,this.k5t.oP=!0,i=this.k5t.nu(),[4,this.dnt.Ta(i,t)];case 1:return n.sent(),this.dnt.Xx(this.k5t.Gx()),this.dnt.wn(eh.uo,this.HV),this.dnt.wn(eh.jw,this.WV),[2]}})}).call(this)},n.Wdi=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Vdi?(this.dnt.wP=this.Vdi.preload,this.dnt.vO=this.Vdi.autoplay,this.dnt.vP=this.Vdi.playbackRate,[4,this.dnt.Ta(this.Vdi.source,t)]):[2];case 1:return i.sent(),this.Vdi=void 0,[2]}})}).call(this)},n.Odi=function(t,i){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,null==t?void 0:t.catch(dn)];case 1:return n.sent(),this.Udi(),[4,this.dnt.KP()];case 2:return n.sent(),[4,this.Hdi(i)];case 3:return n.sent(),this.B3t(this.dnt),this.dnt.QP(),[2]}})}).call(this)},n.Fdi=function(t,i){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,null==t?void 0:t.catch(dn)];case 1:return n.sent(),this.qdi=this.k5t.Gx(),this.Idi=this.qdi+this.Zri,[4,this.dnt.KP()];case 2:return n.sent(),this.dnt.mn(eh.uo,this.HV),this.dnt.mn(eh.jw,this.WV),[4,this.Wdi(i)];case 3:return n.sent(),this.B3t(this.k5t),this.dnt.wn(Ry.EM,this.zdi),this.dnt.QP(),[2]}})}).call(this)},n.nu=function(){return this.Vdi?this.Vdi.source:t.prototype.nu.call(this)},n.Nd=function(){return this.Vdi?this.Vdi.duration:t.prototype.Nd.call(this)},n.Gdi=function(){return t.prototype.Nd.call(this)},n.EP=function(){var i=t.prototype.EP.call(this);return EA.jn(i).Ly(this.Zri)._s()},n.Ux=function(){var i=t.prototype.Ux.call(this);return EA.jn(i).Ly(this.Zri)._s()},n.KP=function(){return this.k5t.KP()},n.Gui=function(t){return Vt(function(){return zt(this,function(i){return this.k5t.Gui(t),[2]})}).call(this)},n.hr=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return null==(t=this.Ldi)||t.Zg(),this.Ldi=void 0,this.Ndi=void 0,null==(i=this.Mdi)||i.Zg(),this.Mdi=void 0,this.Bdi=void 0,this.Vdi=void 0,this.xdi=0,this.Pdi=void 0,this.Idi=0,this.pGt=void 0,this.Cdi=void 0,this.qdi=0,this.Ddi=0,this.dnt.mn(Ry.EM,this.zdi),this.dnt.mn(eh.uo,this.HV),this.dnt.mn(eh.jw,this.WV),[4,this.k5t.KP()];case 1:return n.sent(),[2]}})}).call(this)},n.kn=function(){var i=this;return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.hr()];case 1:return n.sent(),[4,t.prototype.kn.call(i)];case 2:return n.sent(),[2]}})}).call(this)},Nt(i,[{key:"Zri",get:function(){return this.xdi}},{key:"ihi",get:function(){return this.Pdi}},{key:"jri",get:function(){return this.Idi}},{key:"Jri",get:function(){return this.pGt}},{key:"thi",get:function(){return this.Cdi}}]),i}(Y4);U(),Et(),Pt();var u5=function(t){function i(){return t.apply(this,arguments)||this}return Ct(i,t),i.prototype.Ta=function(i,n){var r;return void 0!==Fn(null!=(r=null==i?void 0:i.ads)?r:[],w0)?ut.reject(new ld(vd.CONFIGURATION_ERROR,"THEOads must be enabled in the player configuration.")):t.prototype.Ta.call(this,i,n)},i}(Ub),o5=1/60,h5=function(t){function i(i){var n;return(n=t.call(this,i)||this).$di=void 0,n.k5t=void 0,n.Ydi=void 0,n.Zdi=void 0,n.ali=!0,n.eli=!0,n.lli=void 0,n.jdi=function(t){switch(t.presentationMode){case"native-picture-in-picture":n.Kdi();break;case"fullscreen":D1(n.Cd)&&n.Kdi()}},n.sli=function(t){n.rli()},n.nli=function(t){n.rli()},n.fli=function(){var t=n.Wci;void 0!==t?(!t.ahi||n.Gx()>=t.ahi)&&(n.dnt.mn(eh.py,n.fli),n.Lci(function(){return n.I3t()})):n.dnt.mn(eh.py,n.fli)},n.cli=function(){n.oa.mn(Ry.PM,n.cli),n.odi=!1,n.ldi=!1},n.Xdi(),n}Ct(i,t);var n=i.prototype;return n.Xdi=function(){this.dnt.ont.wn("presentationmodechange",this.jdi)},n.Qdi=function(){this.dnt.ont.mn("presentationmodechange",this.jdi)},n.Kdi=function(){var t=this;if(this.Ydi&&!P3(this.Ydi)&&this.k5t&&this.Wci)return function(t){return V(t,F3)}(this.Ydi)?(this.Fci(this.Wci,"Cannot play L-shape content ad breaks in this representation"),void this.Lci(function(){return t.I3t()})):void this.Jdi(new R3(this.dnt,this.k5t),!1,!1)},n.uP=function(i){i||this.lP||this.GP(),t.prototype.uP.call(this,i)},n.Ta=function(i,n){var r=this;return Vt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Ta.call(r,i,n)];case 1:return e.sent(),this.pci?(this.Zdi=this.pci.backdropDoubleBox,this.Jdi(new I3(this.dnt,this.k5t),!1,!0),[2]):[2]}})}).call(this)},n.yci=function(){var t=new Y4(function(t,i,n){var r=t.lastElementChild;t.insertBefore(i,r),f0(i);var e=new K0(new yB(i,n,new NE),kS.Bg);return e.wP=YT.HL,e.vO=!1,e}(this.Eci,this.$di,this.oa.Cd));this.k5t=new s5(this.dnt,t)},n.wci=function(){t.prototype.wci.call(this),this.$di=function(){var t=v.createElement("div");return sn(t,"theo-ads-sgai-ad-player"),t}(),this.Eci.appendChild(this.$di),this.Aui=c0(this.$di),this.tli()},n.tli=function(){cn(this.kci),function(t){var i=t.style;i.boxSizing="border-box",i.position="relative",i.alignItems="center",i.border="0 solid transparent",i.borderWidth="0px",i.backgroundColor="transparent",i.backgroundRepeat="no-repeat",i.backgroundAttachment="scroll"}(this.Eci),f0(this.kci),f0(this.$di)},n.xci=function(){this.ili(),t.prototype.xci.call(this),this.$di&&(Zi(this.$di),this.$di=void 0)},n.ili=function(){v0(this.Ls),v0(this.kci)},n.Jdi=function(t,i,n){var r,e=null!=(r=this.Ydi)?r:this,s=null!=t?t:this.dnt;S3(e,s),void 0!==this.Ydi&&(this.Ydi.mr(this.Eci,this.kci,this.$di),this.Ydi.kn()),null==t||t.gr(this.Eci,this.kci,this.$di,e,i),this.Ydi=t,n?this.nO(s):this.B3t(s)},n.t4t=function(){return this.k5t},n.GP=function(){var i;t.prototype.GP.call(this),null==(i=this.k5t)||i.GP()},n.Xx=function(i,n){this.eli=!0,t.prototype.Xx.call(this,i,n)},n.lai=function(t){var i,n;return t+(null!=(n=null==(i=this.k5t)?void 0:i.jri)?n:0)},n.Dci=function(){var i;t.prototype.Dci.call(this),null==(i=this.k5t)||i.wn(eh.py,this.sli),this.dnt.wn(eh.qw,this.nli)},n.Mci=function(){var i;t.prototype.Mci.call(this),null==(i=this.k5t)||i.mn(eh.py,this.sli),this.dnt.mn(eh.qw,this.nli)},n.rli=function(){this.Jci(this.Gx()),this.hli()},n.hli=function(){var t;if(!(this.rdi()||P3(this.Ydi)||(null==(t=this.Ydi)?void 0:t.Kri()))){var i=b.min(this.k5t.Nd(),this.Wci.ct)-this.k5t.Gx(),n=this.oli(i);if(void 0!==n&&!(this.dnt.Gx()>n-.75)){var r=EA.jn(this.k5t.Ux()),e=this.k5t.EP();if(0!==e.length){var s=b.min(e.end(e.length-1),this.Wci.ahi);r.MM().Cr(s)&&!this.dnt.xP&&(this.dnt.lP&&(this.dnt.QP(),this.dnt.oP=!0),this.dnt.Xx(n,{zOt:!0}))}}}},n.oli=function(t){var i,n=this.dnt.EP(),r=null==(i=this.Wci)?void 0:i.ahi;if(0!==n.length&&void 0!==r){var e=n.start(0),s=n.end(n.length-1),u=r-t;if((u=16&&Bi.Q_<18&&(null==(i=this.Eai)?void 0:i.Vhi)!==e4.COMPANION&&(null==(u=this.k5t)||u.Xx(this.k5t.Gx()));this.Jdi(h,this.ldi,!1),Bi.zv&&!h.Kri()&&(null==(n=this.Eai)?void 0:n.Vhi)!==e4.COMPANION&&(v0(this.kci),an(this.kci)),this.gci.So(new z3(t).Ca),this.ali=(null==(r=this.Eai)?void 0:r.Vhi)===e4.COMPANION||(null==(e=this.Eai)?void 0:e.Vhi)===e4.CSAI,null==(s=this.Eai)||s.uoi(this.Gx())},n.uli=function(){var t;a5(this.oa)&&(null==(t=this.Eai)?void 0:t.Vhi)!==e4.COMPANION&&(this.odi=!0,this.oa.wn(Ry.PM,this.cli))},n.Uci=function(){var i=this;return Vt(function(){var n,r,e,s,u,o,h;return zt(this,function(a){return void 0===(s=this.Ici)?[2]:s.Ihi===x3.LSHAPE_CONTENT&&a5(this.dnt)?(this.Fci(s,"Cannot play L-shape content ad breaks in this representation."),[2,this.I3t()]):(null==(n=this.k5t)?void 0:n.Zx())?(this.Fci(s,"Could not load the ad break: "+(null==(o=this.k5t)||null==(u=o.Zx())?void 0:u.message)),[2,this.dli()]):(this.Rci(),this.uli(),(null==(r=this.Eai)?void 0:r.Vhi)!==e4.COMPANION&&(this.lli=this.dnt.Vx,null==(h=this.k5t)||h.Rdi(this.Gx(),this.lli,0,!0)),this.oa.xP&&this.So(new gT(this.Gx())),this.zui(s),!Bi.X_||this.oa.lP||(null==(e=this.Ydi)?void 0:e.Kri())||(this.dnt.oP=!0,this.dnt.QP()),this.Dci(),[2,t.prototype.Uci.call(i)])})}).call(this)},n.Hci=function(){var i=this;return Vt(function(){var n,r,e,s;return zt(this,function(u){return(null==(n=this.Eai)?void 0:n.Vhi)!==e4.COMPANION&&(this.lli=this.lli?new Date(this.lli.getTime()+1e3*this.dnt.Nd()):void 0,null==(r=this.k5t)||r.Rdi(this.Gx(),this.lli,0,!0)),e=this.Ici,this.Wci.Ihi===e.Ihi?function(t){return V(t,O3)}(this.Ydi)&&this.Ydi.mhi(e.Chi):(s=this.Sdi(e.Ihi,e),this.Jdi(s,this.ldi,!1)),[2,t.prototype.Hci.call(i)]})}).call(this)},n.I3t=function(){var i=this;return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return void 0===this.Wci?[2]:(this.Mci(),function(t){return V(t,R3)}(this.Ydi)&&(this._ci.Voi(this.dnt.nt),this.dnt.wn(Ry.EM,this.Kq)),r=null==(n=this.Ydi)?void 0:n.Kri(),this.Jdi(new I3(this.dnt,this.k5t),!0,!1),r||(this.eli=!1,(e=this.oli(0))&&this.dnt.Gx().499)t=2*b.atan2(r,u),i=b.PI/2,n=0;else if(o<-.499)t=-2*b.atan2(r,u),i=-b.PI/2,n=0;else{var h=r*r,a=e*e,c=s*s;t=b.atan2(2*e*u-2*r*s,1-2*a-2*c),i=b.asin(2*o),n=b.atan2(2*r*u-2*e*s,1-2*h-2*c)}return new T5(t,n,i)},i.Vli=function(){var t=b.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return 0===t?(this.x=0,this.y=0,this.z=0,this.w=1):(t=1/t,this.x=this.x*t,this.y=this.y*t,this.z=this.z*t,this.w=this.w*t),this},t}(),T5=function(){function t(t,i,n){this.Qli=void 0,this.Kli=void 0,this.Yli=void 0,this.Qli=t||0,this.Kli=i||0,this.Yli=n||0}var i=t.prototype;return i.Gy=function(t,i,n){return this.Qli=t,this.Kli=i,this.Yli=n,this},i.jft=function(t){return this.Gy(t.Qli,t.Kli,t.Yli)},i.gO=function(t){return this.Qli+=t.Qli,this.Kli+=t.Kli,this.Yli+=t.Yli,this},i.gF=function(t){return this.Qli-=t.Qli,this.Kli-=t.Kli,this.Yli-=t.Yli,this},i.Jli=function(){var t=this.Qli,i=this.Yli,n=this.Kli,r=b.cos(t/2),e=b.cos(i/2),s=b.cos(n/2),u=b.sin(t/2),o=b.sin(i/2),h=b.sin(n/2),a=r*e,c=u*o;return new A5(a*h+c*s,u*e*s+r*o*h,r*o*s-u*e*h,a*s-c*h)},t}();U(),Et();var S5=["Zli","zot","$li","error"];U(),Et();var E5=function(t){return t.Os="unavailable",t.tfi="available",t.Ya="presenting",t}({});U(),Et();var I5=function(){function t(t,i){var n=this;this.ffi=void 0,this.Ls=void 0,this.We=!1,this.gfi=new k5,this.pfi=new k5,this.vfi=new k5,this.cfi=!1,this.ifi=function(t){n.gfi.Gy(t.clientX,t.clientY),n.cfi=!0,t.preventDefault(),t.stopPropagation()},this.efi=function(t){t.touches&&1===t.touches.length&&(n.gfi.Gy(t.touches[0].pageX,t.touches[0].pageY),n.cfi=!0,t.preventDefault())},this.cr=function(t){if(n.cfi||n._fi()){if(n._fi()){var i=t.movementX||t.mozMovementX||0,r=t.movementY||t.mozMovementY||0;n.pfi.Gy(n.gfi.x-i,n.gfi.y-r)}else n.pfi.Gy(t.clientX,t.clientY);n.vfi.Uli(n.pfi,n.gfi),n.gfi.jft(n.pfi),n.dfi()}},this.sfi=function(t){n.cfi&&(n.pfi.Gy(t.touches[0].pageX,t.touches[0].pageY),n.vfi.Uli(n.pfi,n.gfi),n.gfi.jft(n.pfi),n.dfi())},this.nfi=function(){n.ufi()},this.rfi=function(){n.ufi()},this.afi=function(){n.ufi()},this.ffi=t,this.Ls=i}var i=t.prototype;return i.JU=function(){this.We||(this.We=!0,this.Ls.addEventListener("mousedown",this.ifi),this.Ls.addEventListener("touchstart",this.efi),f.addEventListener("mousemove",this.cr),f.addEventListener("touchmove",this.sfi),f.addEventListener("mouseup",this.nfi),f.addEventListener("touchend",this.rfi),this.hfi(f))},i.ZU=function(){this.We&&(this.We=!1,this.Ls.removeEventListener("mousedown",this.ifi),this.Ls.removeEventListener("touchstart",this.efi),f.removeEventListener("mousemove",this.cr),f.removeEventListener("touchmove",this.sfi),f.removeEventListener("mouseup",this.nfi),f.removeEventListener("touchend",this.rfi),this.ofi(f))},i.hfi=function(t){if(function(t){try{return Boolean(t)&&t===t.top}catch(t){return!1}}(t));else if(vn(t))try{t.parent.addEventListener("mouseup",this.nfi),this.hfi(t.parent)}catch(i){t.document.documentElement.addEventListener("mouseleave",this.afi)}},i.ofi=function(t){if(t.document.documentElement.removeEventListener("mouseleave",this.afi),vn(t))try{t.parent.removeEventListener("mouseup",this.nfi),this.ofi(t.parent)}catch(t){}},i.ufi=function(){this.cfi=!1},i.dfi=function(){var t=this.ffi.lfi;t.yaw+=2*b.PI*this.vfi.x*.4/this.Ls.clientWidth,t.pitch+=2*b.PI*this.vfi.y*.5/this.Ls.clientHeight,t.pitch=Tn(t.pitch,-b.PI/2,b.PI/2),this.ffi.lfi=t},i._fi=function(){return(v.pointerLockElement||v.mozPointerLockElement||v.webkitPointerLockElement)===this.Ls},i.kn=function(){this.ZU()},t}();U(),Et(),Pt();var R5=function(t){function i(){return t.call(this,"$li")||this}return Ct(i,t),i.prototype.xa=function(){return new C5},i}(Aw),C5=function(t){function i(){return t.call(this,"stereochange")||this}return Ct(i,t),i}(rh);U(),Et();var P5=function(){function t(){this.hZ=[0,0,0,1],this.yfi=[]}var i=t.prototype;return i.mfi=function(t){var i;(i=t).clearColor.apply(i,[].concat(this.hZ)),t.clear(t.COLOR_BUFFER_BIT)},i.wfi=function(t,i){t.clearDepth(1),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),t.clear(t.DEPTH_BUFFER_BIT),this.yfi.forEach(function(n){n.wfi(t,i)})},i.bfi=function(t){this.yfi.push(t)},i.Afi=function(){this.yfi=[]},t}();U(),Et(),Pt(),U(),Et(),U(),Et(),Pt();var D5=function(){function t(t,i,n,r,e){this.Tfi=void 0,this.eb=void 0,this.kfi=void 0,this.Vp=void 0,this.Efi=void 0,this.xfi=void 0,this.uc=void 0,this.Tfi=t,this.eb=this.Sfi(t,i,n),this.kfi=r,this.Vp=e,this.Efi=!1,this.xfi=0,this.uc=0}return t.prototype.Sfi=function(t,i,n){var r=t.createBuffer();return null===r?(We("Failed to create buffer."),null):(t.bindBuffer(i,r),t.bufferData(i,n,t.STATIC_DRAW),r)},t}(),N5=function(t){function i(i,n,r){return t.call(this,i,i.ARRAY_BUFFER,n,r,i.FLOAT)||this}Ct(i,t);var n=i.prototype;return n.JU=function(t){if(null!==this.eb)if(null!==t){var i=this.Tfi;i.bindBuffer(i.ARRAY_BUFFER,this.eb),i.vertexAttribPointer(t,this.kfi,this.Vp,this.Efi,this.xfi,this.uc),i.enableVertexAttribArray(t)}else We("Attempted to enable attribute without location.");else We("Attempted to enable buffer that failed to initialize.")},n.ZU=function(t){t&&this.Tfi.disableVertexAttribArray(t)},i}(D5);var x5=function(t){function i(i,n){var r;return(r=t.call(this,i,i.ELEMENT_ARRAY_BUFFER,n,1,i.UNSIGNED_SHORT)||this).Ifi=void 0,r.Ifi=n.length,r}return Ct(i,t),i.prototype.Pfi=function(){var t=this.Tfi;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.eb),t.drawElements(t.TRIANGLES,this.Ifi,this.Vp,this.uc)},i}(D5);U(),Et();var B5=function(t){return t.VertexPos="aVertexPosition",t.VertexUV="aVertexUV",t.VertexColor="aVertexColor",t}({}),O5=function(t){return t.ProjectionMat="uProjectionMatrix",t.ModelViewMat="uModelViewMatrix",t.Texture="uTexture",t}({}),M5=function(t){return t.Normal="vNormal",t.Color="vColor",t.UV="vUV",t}({}),L5=function(){function t(t,i,n){this.Nfi=void 0,this.Tfi=void 0,this.Tfi=t,this.Nfi=this.Cfi(this.Tfi,i,n)}var i=t.prototype;return i.Cfi=function(t,i,n){var r=this.Rfi(t,t.VERTEX_SHADER,i),e=this.Rfi(t,t.FRAGMENT_SHADER,n);if(null===r||null===e)return We("Failed to create vertex or fragment shader."),null;var s=t.createProgram();return null===s?(We("Failed to create shader program"),null):(t.attachShader(s,r),t.attachShader(s,e),t.linkProgram(s),t.getProgramParameter(s,t.LINK_STATUS)?s:(We("Failed to initialize shader program"),null))},i.Rfi=function(t,i,n){var r=t.createShader(i);if(null===r)return We("failed to create shader."),null;if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS)){var e=t.getShaderInfoLog(r);return We("Failed to compile shader with error: "+e),t.deleteShader(r),null}return r},i.Dfi=function(){return this.Nfi},i.Bfi=function(t){var i=this.Nfi;if(null===i)return We("Attempted to retrieve attribute location when shader program was not initialized"),null;var n=this.Tfi.getAttribLocation(i,t);return-1===n?null:n},i.Mfi=function(t){var i=this.Nfi;if(null===i)return We("Attempted to retrieve uniform location when shader program was not initialized"),null;var n=this.Tfi.getUniformLocation(i,t);return null===n&&ze("Attempted to retrieve nonexistent uniform: "+t),n},t}(),F5=function(){function t(t,i,n){this.Ofi=void 0,this.Ffi=void 0,this.Ufi=void 0,this.Ofi=t,this.Ffi=i,this.Ufi=n}var i=t.prototype;return i.Lfi=function(){var t,i=this.Ofi.length,n=(t=b).max.apply(t,[].concat(this.Ffi));return n>=i?(ze("Created geometry where largest index ("+n+") is larger than/equal to attribute array size ("+i+")"),!1):(n0)&&c.push(E,I,C),(T!==r-1||a0&&(n.S_i-=1)),null!==e&&void 0!==i){n.c_i=e.requestAnimationFrame(n.f_i);var s=e.renderState.baseLayer,u=i.getViewerPose(n.C_i);if(void 0!==s&&void 0!==u){r.bindFramebuffer(r.FRAMEBUFFER,s.framebuffer);for(var o,h=new T5,a=0,c=Lt(u.views);!(o=c()).done;){var f=o.value,v=new i6(f.eye);if(v.cvi=f.projectionMatrix,n.p_i()){var d=void 0;if(Bi.Ks&&Bi.u_&&null===n.m_i){if(0===(d=f.transform.inverse.orientation).x&&0===d.y&&0===d.z&&1===d.w)return}else d=f.transform.orientation;v.vvi=new A5(d.x,d.y,d.z,d.w)}n.e_i&&v.Pvi(n.N_i.jli()),h=h.gO(v.vvi.jli()),a+=1;var l=s.getViewport(f);l&&r.viewport(l.x,l.y,l.width,l.height),n.jvi.wfi(r,v)}var w=new T5(h.Qli/a,h.Kli/a,h.Yli);n.D_i=w.Jli(),function(t,i){var n=t.qli(i);return 1-n*n=2},n.HNt=function(t,i){this.So(new yb(new ld(i,t)))},n.O_i=function(){var t=this.oa.nu();return t&&t.vr},n.kn=function(){this.uV.Zg(),this.Zvi(),this.Vo(),this.Lvi&&(Zi(this.Lvi),this.Lvi=void 0),this.Tfi=void 0,this.Ovi&&(this.Ovi.kn(),this.Ovi=void 0),this.oa=void 0},Nt(i,[{key:"k_i",get:function(){return this.E_i},set:function(t){var i=this.vft;this.E_i=t,this.vft!==i&&this.So(new i2)}},{key:"Wvi",get:function(){return this.zvi!==XS.NONE}},{key:"zvi",get:function(){return this.x_i},set:function(t){var i=this.vft;this.x_i=t,this.vft!==i&&this.So(new i2)}},{key:"Vvi",get:function(){return this.P_i},set:function(t){var i=this.P_i;this.P_i=t,this.P_i!==i&&this.So(new i2)}},{key:"I_i",get:function(){return this.Vvi}},{key:"l_i",get:function(){return this.h_i||this.e_i}},{key:"h_i",get:function(){return this.m_i},set:function(t){var i=this.vft;this.m_i=t,this.vft!==i&&this.So(new i2)}},{key:"C_i",get:function(){return this.o_i||this.s_i}},{key:"R_i",get:function(){var t=this.D_i.jli();return{yaw:t.Qli*p5,pitch:t.Kli*p5,roll:t.Yli*p5}},set:function(t){var i=u6(t&&t.pitch||0)*y5,n=u6(t&&t.roll||0)*y5,r=u6(t&&t.yaw||0)*y5,e=new T5(r,i,n),s=this.D_i.jli(),u=this.N_i.jli();this.D_i=e.Jli(),this.N_i=e.gF(s).gO(u).Jli()}},{key:"lfi",get:function(){var t=this.N_i.jli();return{yaw:t.Qli,pitch:t.Kli,roll:t.Yli}},set:function(t){var i=o6(t&&t.pitch||0),n=o6(t&&t.roll||0),r=o6(t&&t.yaw||0),e=new T5(r,i,n);this.N_i=e.Jli()}},{key:"vft",get:function(){return this.k_i?this.h_i?E5.Ya:E5.tfi:E5.Os}},{key:"B_i",get:function(){return null!==this.h_i},set:function(t){var i=this.B_i;t&&this.Vvi?this.r_i():this.t_i(),this.B_i!==i&&this.So(new R5)}},{key:"M_i",get:function(){return this.w_i},set:function(t){null===this.m_i&&(this.w_i=t,t&&Bi.ru&&this.b_i())}},{key:"L_i",get:function(){return this.gvi},set:function(t){t&&t>=0&&t<=180&&(this.gvi=t,null!==this.e_i&&this.e_i.updateRenderState({inlineVerticalFieldOfView:this.gvi*y5}))}}]),i}(th);function u6(t){return In(t+180,360)-180}function o6(t){return In(t+b.PI,2*b.PI)-b.PI}function h6(t,i){return"function"==typeof t.getAll?a6(void 0===i?t.getAll():t.getAll(i)):function(t){var i=new Va,n=[];return t.onsuccess=function(){var r=t.result;r&&r.value?(n.push(r.value),r.continue()):i.Qy(n),ot()},t.onerror=function(){i.Ky(t.error),ot()},i.Yy}(void 0===i?t.openCursor():t.openCursor(i))}function a6(t){return new ut(function(i,n){t.onsuccess=function(){i(t.result),ot()},t.onerror=function(){n(t.error),ot()}})}Wb(function(t){return function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).ffi=void 0,r.ffi=new s6(r),r}Ct(i,t);var n=i.prototype;return n.xa=function(){return Mw(t.prototype.xa.call(this),{vr:this.ffi.Ca})},n.kn=function(){this.ffi.kn(),t.prototype.kn.call(this)},i}(t)},Vb.lu),U(),Et(),U(),Et(),U(),Et(),Wt(),xt(),Qt(),U(),Et(),Wt(),Qt(),U(),Et(),Wt(),xt(),Ft(),Qt(),U(),Et(),Wt(),Qt(),St();var c6=function(){function t(t){var i=this;this.Rxt=void 0,this.Yy=void 0,this.ro=void 0,this.Rxt=t,this.ro=!0,this.Yy=new ut(function(t,n){i.Rxt.oncomplete=function(){i.ro=!1,t(),ot()},i.Rxt.onerror=function(){i.ro&&(i.ro=!1,n(i.Rxt.error||new y("Transaction error")),ot())},i.Rxt.onabort=function(){i.ro=!1,n(new y("Transaction aborted")),ot()}})}return t.prototype.Zg=function(){if(this.ro)try{this.Rxt.abort(),this.ro=!1}catch(t){}},t}();function f6(t,i,n){return Vt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:r=new c6(t),u.label=1;case 1:return u.trys.push([1,3,4,5]),[4,ut.all([i(n),r.Yy])];case 2:return e=u.sent(),[2,e[0]];case 3:if(s=u.sent(),!r.ro)throw new w2("IDBTransaction committed prematurely",s);throw s;case 4:return r.Zg(),[7];case 5:return[2]}})})()}var v6=function(){function t(t,i){this.wE=void 0,this.W_i=void 0,this.wE=t,this.W_i=i}var i=t.prototype;return i.yxt=function(t){return ut.resolve("persistent"===t)},i.uTt=function(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?ut.reject(EW(i)):a6(this.H_i(IW.Fxt).put(t))},i.bxt=function(t,i){return void 0===i&&(i="persistent"),Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:if("persistent"!==i)return[2,ut.reject(EW(i))];n=Lt(t),s.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,[4,this.uTt(e,i)]);case 2:s.sent(),s.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},i.qy=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.zy(t)];case 1:return[2,Boolean.apply(void 0,[i.sent()])]}})}).call(this)},i.zy=function(t){return a6(this.H_i(IW.Oxt).get(t))},i.Axt=function(t,i){return a6(this.H_i(IW.Oxt).index(i).get(t))},i._xt=function(t){return Vt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:i=[],n=Lt(t),u.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,[4,this.zy(e)]);case 2:(s=u.sent())&&i.push(s),u.label=3;case 3:return[3,1];case 4:return[2,i]}})}).call(this)},i.Sxt=function(){return h6(this.H_i(IW.Oxt))},i.Txt=function(t){return h6(this.H_i(IW.Oxt),t)},i.kxt=function(t,i){return h6(this.H_i(IW.Oxt).index(i),t)},i.pS=function(t){return a6(this.H_i(IW.Fxt).delete(t))},i.Ext=function(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:i=Lt(t),e.label=1;case 1:return(n=i()).done?[3,4]:(r=n.value,[4,this.pS(r)]);case 2:e.sent(),e.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},i.xxt=function(){return a6(this.H_i(IW.Fxt).clear())},i.H_i=function(t){if(!this.W_i)throw new y("Lock was released");if(!function(t,i){return t===IW.Oxt&&i===IW.Oxt||i===IW.Fxt}(t,this.W_i.mode))throw new y("Incompatible transaction mode: "+this.W_i.mode+", expected "+t);return this.W_i.objectStore(this.l)},i.q_i=function(){this.wE.z_i(this),this.W_i=void 0},Nt(t,[{key:"l",get:function(){return this.wE.l}}]),t}();var d6=function(){function t(t,i){this.j_i=void 0,this.l=void 0,this.nPt=void 0,this.ta=new bd,this.j_i=t,this.l=i}var i=t.prototype;return i.yxt=function(t){return ut.resolve("persistent"===t)},i.uTt=function(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?ut.reject(EW(i)):this.Rxt(IW.Fxt,function(i){return i.uTt(t)})},i.bxt=function(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?ut.reject(EW(i)):this.Rxt(IW.Fxt,function(i){return i.bxt(t)})},i.qy=function(t){return this.Rxt(IW.Oxt,function(i){return i.qy(t)})},i.zy=function(t){return this.Rxt(IW.Oxt,function(i){return i.zy(t)})},i.Axt=function(t,i){return this.Rxt(IW.Oxt,function(n){return n.Axt(t,i)})},i._xt=function(t){return this.Rxt(IW.Oxt,function(i){return i._xt(t)})},i.Sxt=function(){return this.Rxt(IW.Oxt,function(t){return t.Sxt()})},i.Txt=function(t){return this.Rxt(IW.Oxt,function(i){return i.Txt(t)})},i.kxt=function(t,i){return this.Rxt(IW.Oxt,function(n){return n.kxt(t,i)})},i.pS=function(t){return this.Rxt(IW.Fxt,function(i){return i.pS(t)})},i.Ext=function(t){return this.Rxt(IW.Fxt,function(i){return i.Ext(t)})},i.xxt=function(){return this.Rxt(IW.Fxt,function(t){return t.xxt()})},i.gPt=function(t){return this.G_i(),this.nPt=new v6(this,t),this.nPt},i.G_i=function(){if(void 0!==this.nPt)throw new y("Already locked")},i.z_i=function(t){if(this.nPt!==t)throw new y("Incorrect lock");this.nPt=void 0},i.Zo=function(t){return this.ta.Zo(t)},i.Rxt=function(t,i){var n=this;return this.Zo(function(){return n.X_i(t,i)})},i.X_i=function(t,i){return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:this.G_i(),n=this.j_i.transaction(this.l,t),r=this.gPt(n),e.label=1;case 1:return e.trys.push([1,,3,4]),[4,f6(n,i,r)];case 2:return[2,e.sent()];case 3:return r.q_i(),[7];case 4:return[2]}})}).call(this)},i.Q_i=function(t){this.G_i();var i=this.j_i.transaction(this.l,t);return this.gPt(i)},t.K_i=function(t,i){var n,r=new ut(function(t){n=t}),e=t.reduce(function(t,i){return t.then(function(){var t,n=new ut(function(i){t=i});return i.Zo(function(){return t(),r}).catch(dn),n})},ut.resolve());return n(e.then(i)),r},t}();U(),Et(),xt(),U(),Et(),Wt(),Qt(),U(),Et(),U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Wt(),Qt();var l6={ED:17,Y_i:function(t){return Vt(function(){var i,n,r,e;return zt(this,function(s){if(i=t.transaction,n=t.database,(r=i.objectStoreNames)&&r.length)for(e=0;e1)throw new y("Only one youbora analytics configuration expected");var n=i[0];n.integration;return op(n,["integration"])}},i}(t)},Vb.Snt),U(),Et(),U(),Et(),Pt(),Ft(),U(),Et(),xt(),Pt();var N6=1,x6=0,B6=1e3,O6=function(t){function i(i,n,r,e,s,u){var o;return void 0===e&&(e=MMPlayerState),void 0===s&&(s=MMAdState),void 0===u&&(u=MMPresentationInfo),(o=t.call(this)||this).oa=void 0,o.ZS=void 0,o.ugi=void 0,o.Igi=void 0,o.Cgi=void 0,o.cgi=void 0,o.Rgi=void 0,o.fgi=void 0,o.pgi=void 0,o._gi=void 0,o.Dgi=void 0,o.Pgi=void 0,o.Agi=void 0,o.Sgi=void 0,o.Bci=void 0,o.Tgi=void 0,o.xgi=void 0,o.kgi=void 0,o.u8=void 0,o.Egi=void 0,o.dci=void 0,o.YG=void 0,o.iK=void 0,o.ZG=void 0,o.QG=void 0,o.ygi=void 0,o.wgi=void 0,o.oa=i,o.ZS=n,o.ugi=r,o.Igi=e,o.Cgi=s,o.cgi=u,o.Rgi=!0,o.fgi=!1,o.pgi=void 0,o._gi=void 0,o.Dgi=void 0,o.Agi=function(t){var i,n=t.jnt,r=(n.d1t(),i=n.Ont().duration,"linear"===n.Ont().type);n.l1t(),n.a1t();r&&(o.fgi=!0),o.ggi=o.Cgi.AD_IMPRESSION,o.ggi=o.Cgi.AD_STARTED},o.Sgi=function(t){o.fgi=!1,o.ggi=o.Cgi.AD_COMPLETED},o.Bci=function(t){t.AZt===kZ.ADBLOCK?o.ggi=o.Cgi.AD_BLOCKED:o.ggi=o.Cgi.AD_ERROR},o.Tgi=function(){o.ggi=o.Cgi.AD_SKIPPED},o.xgi=function(t){var i,n,r,e;t.Gk===eg.Mk&&(o.Dgi&&t.FX!==o.Dgi&&o.ugi.reportABRSwitch(o.Dgi,t.FX),o.Dgi=t.FX,o.ugi.reportChunkRequest(new MMChunkInformation(t.sN,t.FX,t.zB,t.Iut.Yu,void 0,void 0,null!=(r=null==(i=t.Iut.Wat)?void 0:i[0])?r:0,null!=(e=null==(n=t.Iut.Wat)?void 0:n[1])?e:-1)))},o.kgi=function(t){o.vgi=o.Igi.STOPPED,o.So(t)},o.u8=function(t){o.vgi=o.Igi.ERROR,o.ugi.reportError(t.error,o.dgi())},o.Egi=function(){o.lgi?o.ggi=o.Cgi.AD_PAUSED:o.vgi=o.Igi.PAUSED},o.dci=function(){o.lgi&&(o.ggi=o.Cgi.AD_PLAY)},o.YG=function(){o.lgi?(o.pgi===o.Cgi.AD_PAUSED&&(o.ggi=o.Cgi.AD_RESUMED),o.ggi=o.Cgi.AD_PLAYING):(o.Rgi&&(o.Rgi=!1,o.ogi(),o.vgi=o.Igi.STARTED),o.vgi!==o.Igi.PAUSED&&o.vgi!==o.Igi.BUFFERING||(o.vgi=o.Igi.RESUMED))},o.iK=function(){o.ugi.reportPresentationSize(o.oa.MP,o.oa.DP)},o.ZG=function(t){o.lgi||o.vgi!==o.Igi.PAUSED||o.ugi.reportPlayerSeekCompleted(t.currentTime*B6)},o.QG=function(){o.lgi||(o.vgi=o.Igi.BUFFERING)},o.ygi=function(){o.ugi.reportDownloadRate(b.floor(bb.Bg.pW()))},o.wgi=function(){o.lgi||o.ugi.reportPlaybackPosition(o.dgi())},o.vgi=o.Igi.INITIALIZED,o.QBt(),o.Pgi=o.mgi(),o}Ct(i,t);var n=i.prototype;return n.ogi=function(){var t=this.ct===1/0,i=t?N6:x6,n=t?-1:this.ct,r=Jn(this.oa.rt.NI,this.agi);this.ugi.setPresentationInformation(new this.cgi(i,n,r))},n.agi=function(t){for(var i=t.$I.NI,n=[],r=0;r1)throw new y("Only one Moat analytics configuration expected");return i[0]}},i}(t)},Vb.Snt),U(),Et(),U(),Et(),U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et(),Wt(),xt(),Ft(),Qt();var U6="urn:google:dai:2018",V6=function(){function t(t,i,n,r,e){var s=this;this.oa=void 0,this.upi=void 0,this.Hai=void 0,this.fpi=void 0,this._pi=void 0,this.Lui=void 0,this.nq=void 0,this.rq=void 0,this.T9=new hr,this.ypi=!1,this.cpi=!0,this.mpi=function(t){var i=t.Ht;i.Lt===Jm.zU&&(i.Km===Ng.ID3||i.Km===Ng.EVENT_STREAM&&i.eC===U6)&&(i.Qk=zm.iC,s.Lui=i,i.wn(Nw.uI,s.bpi))},this.bpi=function(t){t.PO.wn(Ug.QL,s.Api)},this.Api=function(t){var i,n;if(s.Hai)if((null==(i=s.Lui)?void 0:i.Km)===Ng.ID3){var r=t.PO.U;"TXXX"===r.id&&s.Hai.sui({TXXX:r.text})}else if((null==(n=s.Lui)?void 0:n.Km)===Ng.EVENT_STREAM){var e=t.PO.U;s.Hai.nui(U6,e,t.YF)}},this.oa=t,this.Hai=i,this.fpi=n,this.upi=r,this._pi=e,n&&i&&this.oa.Jc&&this.oa.Jc.znt(n.oti)}var i=t.prototype;return i.Xx=function(t){this.T9.Zg(),this.T9=new hr,kr(_r(this.Xri(t,this.T9.Yg),this.T9))},i.Xri=function(t,i){return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return dr(i),this.fpi&&this.Hai?this.fpi.Fnt&&!this._pi?[2]:(n=this.oa.Gx(),this.cpi&&(r=this.Hai.hui(t,n))?(this.oa.vpi(r),[4,this.Hai.ww(S4.AD_BREAK_ENDED,i)]):[3,2]):[2,this.oa.vpi(t)];case 1:if(e.sent(),this.Hai.rui(t).RO>t)return[2];e.label=2;case 2:return this.oa.vpi(t),[2]}})}).call(this)},i.EP=function(){var t=this.fpi&&this.fpi.Fnt;if(t){var i=EA.jn(this.oa.gpi()),n=t.qOt,r=n+t.G0t,e=new EA([n,r]);return i.Mn(e)._s()}return this.oa.gpi()},i.drt=function(t,i){return Vt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:if(!t)return[2,this.oa.ppi(t,i)];n=t,s.label=1;case 1:return s.trys.push([1,3,,4]),this.oa.nt.wn(Iw.rI,this.mpi),[4,this.upi.wpi(t,i)];case 2:return n=s.sent(),this.fpi&&this.Hai&&(this.ypi=!0),[3,4];case 3:if(lr(r=s.sent()),r.code===og.LICENSE_INVALID)return[2];throw e=new ld(vd.SOURCE_NOT_SUPPORTED,"Something went wrong while setting up a Google DAI stream.",r),this.nq=cg(e),this.rq=e,this.oa.So(new yb(e)),e;case 4:return[4,this.oa.ppi(n,i)];case 5:return s.sent(),[2]}})}).call(this)},i.hr=function(){if(this.ypi){if(this.oa.nt.mn(Iw.rI,this.mpi),this.Lui){this.Lui.mn(Nw.uI,this.bpi);for(var t,i=Lt(this.Lui.L.NI);!(t=i()).done;){t.value.mn(Ug.QL,this.Api)}this.Lui=void 0}this.nq=void 0,this.rq=void 0,this.T9.Zg(),this.fpi&&this.fpi.hr(),this.Hai&&this.Hai.hr(),this.ypi=!1}},i.kn=function(){this.hr(),this.oa.kpi(),this.Hai&&this.Hai.kn()},Nt(t,[{key:"Ca",get:function(){var t=this,i=this.upi;return{contentTimeForStreamTime:function(i){return t.Hai?t.Hai.Wai(i):i},streamTimeForContentTime:function(i){return t.Hai?t.Hai.qai(i):i},replaceAdTagParameters:function(i){t.Hai&&t.Hai.replaceAdTagParameters(i)},get snapback(){return t.cpi},set snapback(i){t.cpi=i},get sourceTransformer(){return i.lpi},set sourceTransformer(t){i.lpi=t}}}},{key:"lt",get:function(){return this.nq||this.oa.Spi()}},{key:"Jx",get:function(){return this.rq||this.oa.Tpi()}}]),t}();U(),Et(),xt(),Pt(),Ft(),U(),Et(),xt(),Pt();var H6=function(t){function i(i,n,r,e){var s;return void 0===e&&(e=!0),(s=t.call(this,r)||this).xpi=void 0,s.xpi=e,s.k4t=i,s.E4t=n,s}return Ct(i,t),Nt(i,[{key:"Epi",get:function(){return this.xpi}},{key:"u$t",get:function(){return x$.so}}]),i}(E0),W6=function(t){function i(i,n){var r;return(r=t.call(this,new xI,x$.so)||this).Hai=void 0,r.oa=void 0,r.Xai=void 0,r.Qai=void 0,r.Ipi=void 0,r.iui=void 0,r.Hai=i,r.oa=n,r.Xai=function(t){var i=r.w1t;if(i&&r.u1t){var n=t.Vai.aui;r.u1t.W7t=n.zx,function(t,i){var n=i.I9t,r=i.P9t,e=i.zx,s=Dn(t.Jc.slice(0,n-1),function(t){var i;return null!=(i=t.ct)?i:0});t.X0t=r-e-s}(i,n)}},r.Qai=function(t){var i=t.Vai.uui;if(i)for(var n,e=Lt(i);!(n=e()).done;){var s=n.value;if(!r.Bpi(s.CO)){var u=s.RO-s.CO,o=new H6(u,u,s.CO,!0);r.y1t.push(o)}}},r.Ipi=function(t){r.Rpi(t.type),r.Npi(t)},r.iui=function(t){r.uti=!1,r.u1t=void 0;var i=r.Fnt;i&&(i.X0t=0,r.Dpi(t.type,!1,!1),r.w1t=void 0)},r.Ppi(),r}Ct(i,t);var n=i.prototype;return n.Ppi=function(){var t=[S4.STARTED,S4.FIRST_QUARTILE,S4.MIDPOINT,S4.THIRD_QUARTILE,S4.COMPLETE];this.Hai.wn(t,this.Ipi),this.Hai.wn(S4.AD_BREAK_ENDED,this.iui),this.Hai.wn(S4.AD_PROGRESS,this.Xai),this.Hai.wn(S4.CUEPOINTS_CHANGED,this.Qai)},n.Cpi=function(t){var i=t.v7t.qOt,n=this.w1t||this.findAdBreakWithPredicate(i,function(t){return!t.pP});if(!n){var r=t.v7t.G0t;i=this.oa.Gx(),(n=new H6(r,r,i,!1)).P4t(),this.y1t.push(n)}return n},n.Rpi=function(t){switch(t){case S4.STARTED:this.uti=!0;break;case S4.AD_BREAK_ENDED:this.uti=!1}},n.Dpi=function(t,i,n){if(i)switch(t){case S4.STARTED:case S4.FIRST_QUARTILE:case S4.MIDPOINT:case S4.THIRD_QUARTILE:case S4.COMPLETE:this.u4t.So(new GB(this.w1t))}if(n)switch(t){case S4.STARTED:case S4.FIRST_QUARTILE:case S4.MIDPOINT:case S4.THIRD_QUARTILE:case S4.COMPLETE:this.u4t.So(new QB(this.u1t,this.u1t.W7t))}switch(t){case S4.COMPLETE:this.u4t.So(new KB(this.u1t,this.hti.W7t));break;case S4.AD_BREAK_ENDED:this.u4t.So(new XB(this.Fnt))}switch(t){case S4.FIRST_QUARTILE:this.u4t.So(new W0(this.u1t,this.hti.W7t));break;case S4.MIDPOINT:this.u4t.So(new X0(this.u1t,this.hti.W7t));break;case S4.THIRD_QUARTILE:this.u4t.So(new G0(this.u1t,this.hti.W7t))}},n.Npi=function(t){var i=t.jnt,n=this.Cpi(i),r=function(t,i){if(t.Jc.length)return!1;for(var n=0;n=t&&s.qOt<=i&&!s.pP&&(!n||s.qOt>=n.qOt)&&(n=s)}return n},n.uD=function(){},n.qnt=function(t){},n.hr=function(){this.u1t&&(this.u4t.So(new KB(this.u1t,this.u1t.W7t)),this.u1t=void 0),this.w1t&&(this.u4t.So(new XB(this.w1t)),this.w1t=void 0),this.uti=!1,Yn(this.y1t)},n.kn=function(){this.hr(),this.u4t.kn()},n.Hnt=function(t){},Nt(i,[{key:"w4t",get:function(){return this.uti}},{key:"u4t",get:function(){return this.R5t}},{key:"Mpi",get:function(){var t=this.findAdBreakWithPredicate(0,function(t){return t.Epi}),i=0;return t&&(i=t.G0t),i}}]),i}(b1);U(),Et(),Wt(),Ft(),Qt();var z6=function(){function t(t){this.Hai=void 0,this.lpi=void 0,this.Hai=t,this.lpi=function(t){return t}}var i=t.prototype;return i.wpi=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:for(n=[],r=[],e=Lt(t.sources);!(s=e()).done;)if(jA(u=s.value)){if(!this.Hai)continue;n.push(u)}else r.push(u);if(0===n.length)return[2,t];v.label=1;case 1:return void 0!==o||0===n.length?[3,7]:[4,jT.Bg.gz(n,t)];case 2:a=v.sent().Mc,c=a,dr(i),v.label=3;case 3:return v.trys.push([3,5,,6]),[4,this.Opi(c,i)];case 4:return o=v.sent(),r.push(o),[3,6];case 5:return lr(f=v.sent()),h=f,Xn(n,c),[3,6];case 6:return[3,1];case 7:if(0!==t.sources.length&&0===r.length)throw new y("Fatal: unable to play DAI streams.");return h&&We(h.message),[2,Yu({},t,{sources:r})]}})}).call(this)},i.Opi=function(t,i){return Vt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(!this.Hai)throw new y("Could not find Google\u2019s IMA DAI HTML5 SDK, all DAI sources will be ignored.");return n=this.Hai.ww(S4.LOADED,i),r=this.Hai.ww(S4.ERROR,i),e=t.type===cA.vC?"dash":"hls",this.Hai.KHt(Yu({},t.ssai,{format:e})),[4,ut.race([n,r])];case 1:return(s=h.sent()).type!==S4.LOADED?[3,5]:(u=t.type===cA.vC?cA.vC:cA.gC,this.lpi?[4,this.lpi(s.Vai.Yu||"")]:[3,3]);case 2:return o=h.sent(),[3,4];case 3:o=s.Vai.Yu,h.label=4;case 4:return[2,lA(Yu({},t,{src:o,type:u}))];case 5:throw y(s.Vai.cui);case 6:return[2]}})}).call(this)},t}();Wb(function(t){return function(i){return function(i){function n(n,r){var e;(e=i.call(this,n,r)||this).Fpi=void 0,e.Upi=!1,e.T2t=void 0,e.Hpi=void 0,e.Vpi=function(t){13===t.which&&e.T2t.click(),e.jP()};var s,u,o,h=e.zP(),a=r.ads.googleIma.useAdUiElementForSsai,c=null!=(s=r.ads.googleIma.allowSeekingForGoogleDai)&&s;try{var f;a?(e.Hpi=v.createElement("div"),an(e.Hpi),e.Hpi.className="theo-dai-ad-ui"):(e.T2t=v.createElement("button"),e.T2t.className="theo-dai-clickthrough"),u=t(h,e.T2t,e.Hpi),o=new W6(u,e);var d=null!=(f=e.T2t)?f:e.Hpi;d&&e.xe.appendChild(d),e.Upi=!0}catch(t){e.T2t=void 0,e.Hpi=void 0}var l=new z6(u);return e.Fpi=new V6(e,u,o,l,c),e.T2t&&(e.T2t.addEventListener("keydown",e.Vpi),e.T2t.addEventListener("click",e.Vpi)),e}Ct(n,i);var r=n.prototype;return r.xa=function(){var t=i.prototype.xa.call(this),n=t.ads;if(n){var r=this.Fpi.Ca;Mw(n,{get dai(){return r}})}return t},r.vpi=function(t){i.prototype.Xx.call(this,t)},r.Xx=function(t,i){this.Fpi.Xx(t)},r.gpi=function(){return i.prototype.EP.call(this)},r.EP=function(){return this.Fpi.EP()},r.Ta=function(t){return this.Fpi.hr(),i.prototype.Ta.call(this,t)},r.ppi=function(t,n){var r=this;return Vt(function(){return zt(this,function(e){return[2,i.prototype.drt.call(r,t,n)]})})()},r.drt=function(t,i){return Vt(function(){return zt(this,function(n){return[2,this.Fpi.drt(t,i)]})}).call(this)},r.Spi=function(){return i.prototype.Yx.call(this)},r.Tpi=function(){return i.prototype.Zx.call(this)},r.Yx=function(){return this.Fpi.lt},r.Zx=function(){return this.Fpi.Jx},r.kpi=function(){i.prototype.kn.call(this)},r.kn=function(){this.Fpi.kn(),this.T2t&&(Zi(this.T2t),this.T2t.removeEventListener("keydown",this.Vpi),this.T2t.removeEventListener("click",this.Vpi),this.T2t=void 0),this.Hpi&&(Zi(this.Hpi),this.Hpi=void 0)},Nt(n,[{key:"Kl",get:function(){return this.Upi}}]),n}(i)}}(function(t,i,n){if(!(f.google&&f.google.ima&&Wi(f.google.ima.dai)))throw new y("Could not find Google\u2019s IMA DAI HTML5 SDK, all DAI sources will be ignored.");var r=X4(),e=new google.ima.dai.api.StreamManager(t,n),s=X4();return new U4(e,i,s&&s!==r?s:void 0)}),Vb.Ant),U(),Et(),U(),Et(),Pt(),Ft(),U(),Et(),xt();var X6=function(){function t(t,i){var n=this;this.oa=void 0,this.jpi=void 0,this.Gpi=void 0,this.nmi=void 0,this.Zpi=void 0,this.rmi=void 0,this.tmi=void 0,this.fmi=void 0,this.emi=void 0,this.ami=void 0,this.qpi=void 0,this.dci=void 0,this.kgi=void 0,this.Cci=void 0,this.Qpi=void 0,this.Kpi=void 0,this.u8=void 0,this.Ypi=void 0,this.EBt=void 0,this.umi=void 0,this.oa=t,this.jpi=i,this.nmi=!1,this.Zpi=!1,this.rmi=[],this.tmi=-1/0,this.emi=!1,this.dci=function(){n.nmi||(n.jpi.vmi(),n.emi&&n.jpi.omi(),n.nmi=!0)},this.kgi=function(){n.jpi._mi(),n.Zpi=!0},this.Cci=function(){n.tmi0&&(e.Ls.style.cursor="pointer",e.Ls.addEventListener("click",e.lyi))},e.Kwi=function(){e.Ls.style.cursor="",e.Ls.removeEventListener("click",e.lyi)},e.lyi=function(){e.hti&&e.hti.Rwi.getRendererController().processEvent({name:tv.freewheel.SDK.EVENT_AD_CLICK})},e.Ywi=function(t){switch(t.subType){case tv.freewheel.SDK.EVENT_AD_COMPLETE:e.uyi();break;case tv.freewheel.SDK.EVENT_AD_SKIPPED:e.P2t(),e.uyi()}},e}Ct(i,t);var n=i.prototype;return n.Nwi=function(t,i){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return this.Bwi=t,this.Mwi=i,this.Lwi(t),[4,i];case 1:return n.sent(),this.Owi(),[2]}})}).call(this)},n.Owi=function(){this.Gwi()},n.Lwi=function(t){t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.Xwi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.jwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.Qwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION_END,this.Kwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD,this.Ywi)},n.Jwi=function(){this.Bwi&&(this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.Xwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.jwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.Qwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION_END,this.Kwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_AD,this.Ywi))},n.Gwi=function(){this.Uwi=this.Zwi(this.$wi),this.Hwi=this.Zwi(this.tyi).concat(this.Zwi(this.iyi)),this.qwi=this.Zwi(this.eyi),this.zwi=this.Uwi.concat(this.Hwi).concat(this.qwi)},n.Zwi=function(t){if(!this.Bwi)return[];var i=this.Bwi.getSlotsByTimePositionClass(t);return this.syi(i)},n.nyi=function(t){if(this.w1t){var i=t.getSlot().getAdInstances().indexOf(t);-1!==i&&(this.w1t.Cwi=i);var n=this.w1t.Pwi;return n&&(n.Rwi=t),n}},n.ryi=function(t){return Fn(this.zwi,function(i){return i.Ewi===t})},n.syi=function(t){return t.map(function(t){var n=t.getTotalDuration(),r=i.hyi(t);return new h8(n,n,r,t)})},n.P2t=function(){var t=this.hti;t&&this.So(new M0(t,this.ayi()))},n.uyi=function(){var t=this.hti;t&&(this.So(new KB(t,t.Rwi.getPlayheadTime())),this.u1t=void 0)},n.cyi=function(t){var i=this.Fnt;i&&(i.X0t=function(t,i,n){void 0===n&&(n=0);for(var r=0,e=t.Jc.length,s=i;s=0)(i=t).push.apply(i,[].concat(this.w1t.Jc.slice(n+1)))}for(var r,e=Lt(this.zwi);!(r=e()).done;){var s,u=r.value;(s=t).push.apply(s,[].concat(u.Jc))}return t}},{key:"Vnt",get:function(){return this.zwi}}]),i}(nh);U(),Et(),xt(),Pt(),Ft();var v8=function(t){function i(i,n,r,e){var s;return(s=t.call(this)||this).oa=void 0,s.sc=void 0,s.Pyt=void 0,s.A2t=void 0,s.H4=void 0,s.Spt=void 0,s.Cz=void 0,s.cA=void 0,s.Zb=void 0,s.Ayi=void 0,s.h5=void 0,s.o5=void 0,s.xz=void 0,s.Eyi=void 0,s.kyi=void 0,s._yi=void 0,s.pyi=void 0,s.xyi=void 0,s.vm=void 0,s.myi=void 0,s.wyi=void 0,s.yyi=void 0,s.Ed=void 0,s.gyi=void 0,s.oa=i,s.sc=n,s.Pyt=r,s.A2t=e,s.H4=EA.rL()._s(),s.Cz=!0,s.Zb=NaN,s.Ayi=!1,s.h5=!1,s.o5=Dy.zL,s.xz=0,s.kyi=0,s._yi=function(t){switch(t.subType){case tv.freewheel.SDK.EVENT_AD_PAUSE:(function(t){if(!t)return!0;var i=t.Rwi,n=i.getPlayheadTime(),r=i.getDuration();return n>=r||En(r,n)})(s.Pyt.hti)||(s.lP=!0,s.So(new cT(s.zx)));break;case tv.freewheel.SDK.EVENT_AD_RESUME:s.lP=!1,s.So(new Ly(s.zx));break;case tv.freewheel.SDK.EVENT_AD_VOLUME_CHANGE:if(s.Spt){var i=s.Spt.getAdVolume();0===i?s.Ayi=!0:s.cA=i,s.So(new _T(s.zx,s.OP))}}},s.pyi=function(){s.Qx=!1;var t=s.lP;if(s.lP=!1,t&&(s.So(new fT(s.zx)),s.So(new Ly(s.zx))),s.o5=Dy.XL,s.zx=0,s.Pyt.hti){var i=s.Pyt.hti.Rwi;s.Zb=i.getDuration(),s.So(new vT(s.Zb)),s.Eyi=_(function(){if(s.aoi){s.Pyt.cyi(s.zx);var t=i.getPlayheadTime();Sn(t,s.kyi,.001)||s.So(new bw(t,void 0)),s.kyi=t}else s.vm()},250),s.Spt&&s.Spt.setAdVolume(d8(s.oP,s.OP))}},s.xyi=function(){var t=s.Pyt.hti;t&&(t.V4t===R0.L4t?s.oa.jP():s.lP||s.jP())},s.vm=function(){m(s.Eyi),s.Eyi=void 0},s.myi=function(){s.vm(),s.Qx=!0},s.wyi=function(){s.Tyi("pause")},s.yyi=function(){s.Tyi("playing")},s.Ed=function(t){t.od.V4t===R0.BZt&&(s.lP=!1)},s.gyi=function(){s.Spt&&s.Spt.resize(s.sc.Eu,s.sc.Iu)},s.cA=i.OP,r.wn("Ynt",s.Ed),s.sc.wn(fI.yn,s.gyi),s.A2t.addEventListener("click",s.xyi),s}Ct(i,t);var n=i.prototype;return n.fyi=function(){this.Spt&&this.Spt.setAdVolume(d8(this.oP,this.OP))},n.vyi=function(t){this.Spt=t,this.Lwi(t)},n.Lwi=function(t){t.addEventListener(tv.freewheel.SDK.EVENT_AD,this._yi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.gyi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.pyi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_COMPLETE,this.myi),t.addEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_PAUSE_REQUEST,this.wyi),t.addEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_RESUME_REQUEST,this.yyi)},n.byi=function(){var t=this.Spt;t&&(t.removeEventListener(tv.freewheel.SDK.EVENT_AD,this._yi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.gyi),t.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.pyi),t.removeEventListener(tv.freewheel.SDK.EVENT_AD_COMPLETE,this.myi),t.removeEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_PAUSE_REQUEST,this.wyi),t.removeEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_RESUME_REQUEST,this.yyi))},n.QP=function(){this.Pyt.Fnt&&(this.Pyt.Fnt.Ewi.resume(),this.lP=!1)},n.jP=function(){this.Pyt.Fnt&&(this.Pyt.Fnt.Ewi.pause(),this.lP=!0)},n.Tyi=function(t){var n=i.Syi(t);this.Spt&&n&&this.Spt.setVideoState(n)},n.uD=function(){var t=this.Pyt.hti;t&&t.Rwi.skip()},n.hr=function(){if(this.byi(),this.Spt){this.Tyi("stop"),this.Spt.setVideoState(tv.freewheel.SDK.VIDEO_STATE_STOPPED);for(var t,i=Lt(this.Spt.getTemporalSlots());!(t=i()).done;){t.value.stop()}this.Spt.dispose(),this.Spt=void 0}this.Zb=NaN,this.Qx=!1,this.o5=Dy.zL,this.zx=0,this.kyi=0,this.lP=!0,void 0!==this.Eyi&&(m(this.Eyi),this.Eyi=void 0)},n.kn=function(){this.hr(),this.Vo(),this.Pyt.mn("Ynt",this.Ed),this.sc.mn(fI.yn,this.gyi),this.A2t.removeEventListener("click",this.xyi)},i.Syi=function(t){switch(t){case"pause":return tv.freewheel.SDK.VIDEO_STATE_PAUSED;case"playing":return tv.freewheel.SDK.VIDEO_STATE_PLAYING;case"ended":return tv.freewheel.SDK.VIDEO_STATE_COMPLETED;case"stop":return tv.freewheel.SDK.VIDEO_STATE_STOPPED}},Nt(i,[{key:"zx",get:function(){var t=this.Pyt.hti;return t&&(this.zx=t.Rwi.getPlayheadTime()),this.xz},set:function(t){this.xz=t}},{key:"ct",get:function(){return this.Zb}},{key:"aoi",get:function(){return!!this.Pyt&&void 0!==this.Pyt.Fnt}},{key:"lP",get:function(){return this.Cz},set:function(t){this.Cz=t}},{key:"OP",get:function(){return this.cA},set:function(t){this.Spt&&this.Spt.setAdVolume(t),this.cA=t}},{key:"oP",get:function(){return this.Spt&&(this.Ayi=0===this.Spt.getAdVolume()),this.Ayi},set:function(t){this.Spt&&this.Spt.setAdVolume(d8(t,this.OP)),this.Ayi=t}},{key:"kP",get:function(){return this.H4}},{key:"Qx",get:function(){return this.h5},set:function(t){this.h5=t}},{key:"AP",get:function(){return this.o5}}]),i}(nh);function d8(t,i){return t?0:i}U(),Et(),Wt(),Ft(),Qt(),U(),Et(),xt(),Pt();var l8=function(t){function i(){return t.call(this,"A FreeWheel Ad Error occurred")||this}return Ct(i,t),Nt(i,[{key:"name",get:function(){return e8.swi}}]),i}(cr);U(),Et(),xt(),Pt();var w8=function(t){function i(){return t.call(this,"A FreeWheel Reset Error Occurred")||this}return Ct(i,t),Nt(i,[{key:"name",get:function(){return e8.ewi}}]),i}(cr),g8=0;function _8(){return"cue-"+ ++g8}var m8=function(){function t(t,i,n,r){var e=this;this.Spt=void 0,this.Cyi=void 0,this.Ryi=void 0,this.Spt=i,this.Ryi=function(t){e.Spt.removeEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,e.Ryi),t.success?e.Cyi.Qy(void 0):e.Cyi.Ky(new l8)},this.Pyi(t,n,r),i.addEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Ryi),this.Cyi=new Va}var i=t.prototype;return i.Pyi=function(t,i,n){t.setNetwork(i.networkId),t.setServer(i.adServerUrl);var r=this.Spt;if(r.setProfile(i.profile),i.assetId&&i.assetDuration&&r.setVideoAsset(i.assetId,i.assetDuration),i.siteSectionId&&r.setSiteSection(i.siteSectionId),r.registerVideoDisplayBase(n),i.cuePoints&&i.cuePoints.length)for(var e,s=Lt(i.cuePoints);!(e=s()).done;){var u=e.value;r.addTemporalSlot(_8(),u.adUnit,u.timeOffset)}var o=i.customData;if(Wi(o))for(var h,a=Lt(k.keys(o));!(h=a()).done;){var c=h.value,f=o[c];r.addKeyValue(c,f)}},i.Iyi=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Spt.submitRequest(),[4,this.Cyi.Yy];case 1:return t.sent(),[2]}})}).call(this)},i.hr=function(){this.Spt.removeEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Ryi),this.Cyi.Ky(new w8)},t}();U(),Et(),Wt(),Ft(),Qt(),U(),Et(),xt();var y8=function(){function t(t){var i=this;this.Bwi=void 0,this.Jg=void 0,this.jwi=void 0,this.i7t=void 0,this.Bwi=t,this.jwi=function(t){i.Dyi(),i.Jg.Qy(void 0)},this.i7t=function(t){i.Dyi(),i.Jg.Ky(new l8)},this.Jg=new Va,t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.jwi),t.addEventListener(tv.freewheel.SDK.EVENT_ERROR,this.i7t)}var i=t.prototype;return i.Dyi=function(){this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.jwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_ERROR,this.jwi)},i.gWt=function(){this.Dyi(),this.Jg.Ky(new w8)},Nt(t,[{key:"Nyi",get:function(){return this.Jg.Yy}}]),t}(),p8=function(){function t(t,i){var n=this;this.oa=void 0,this.Myi=void 0,this.tMt=void 0,this.Lyi=void 0,this.Bwi=void 0,this.Oyi=void 0,this.oa=t,this.Myi=i,this.tMt=0,this.Oyi=function(){for(var t,i=n.oa.Gx(),r=Lt(n.Myi.Vwi);!(t=r()).done;){var e=t.value,s=new EA([n.tMt,i],[!0,!0]),u=e.Ewi.getTimePosition();if(s.Cr(u))switch(e.Ewi.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL:n.Byi([e]);break;case tv.freewheel.SDK.TIME_POSITION_CLASS_OVERLAY:e.Ewi.play(),e.Ewi.setVisible(!0)}}n.tMt=i},t.wn(eh.py,this.Oyi)}var i=t.prototype;return i.lO=function(t){this.Bwi=t},i.Swi=function(){return this.Byi(this.Myi.Fwi)},i.gwi=function(){this.Byi(this.Myi.Wwi)},i.Byi=function(t){return Vt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(!this.Bwi)return[2];r.label=1;case 1:if(!(t.length>0))return[3,6];this.Lyi=new y8(this.Bwi),i=this.Lyi.Nyi,(n=this.Myi.Fnt)&&n.V4t===R0.L4t&&n.Ewi.stop(),t.shift().Ewi.play(),r.label=2;case 2:return r.trys.push([2,,4,5]),[4,i];case 3:return r.sent(),[3,5];case 4:return this.Lyi=void 0,[7];case 5:return[3,1];case 6:return[2]}})}).call(this)},i.hr=function(){this.Lyi&&(this.Lyi.gWt(),this.Lyi=void 0),this.tMt=0},i.kn=function(){this.oa.mn(eh.py,this.Oyi)},t}(),k8=0,b8=function(t){function i(n,r,e){var s;return(s=t.call(this)||this).oa=void 0,s.pT=void 0,s.Fyi=void 0,s.Uyi=void 0,s.qyi=void 0,s.A2t=void 0,s.K9t=void 0,s.Hyi=void 0,s.Vyi=void 0,s.c$t=void 0,s.Wyi=void 0,s.oa=n,s.pT=r,s.Wyi=!1,s.Uyi=i.createUniqueDisplayBaseId(),s.A2t=i.zyi(n.xe,r,s.Uyi),s.Fyi=new f.tv.freewheel.SDK.AdManager,s.qyi=new f8(s.A2t,s.pT),s.Vyi=new p8(s.oa,s.dwi),s.au(s.dwi),s.K9t=new v8(n,e,s.dwi,s.A2t),s}Ct(i,t);var n=i.prototype;return n.r8t=function(){return Vt(function(){var t,i,n,r;return zt(this,function(e){switch(e.label){case 0:if(!this.c$t)throw new y("Invalid state");t=this.Fyi,(i=t.newContext()).setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_VIDEO_DISPLAY_CONTROLS_WHEN_PAUSE,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL),i.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_CONTENT_VIDEO_ENABLED,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL),n=new m8(t,i,this.c$t,this.Uyi),r=this.dwi.Nwi(i,n.Iyi()),this.Vyi.lO(i),this.fwi.vyi(i),this.Hyi=n,e.label=1;case 1:return e.trys.push([1,,3,4]),[4,r];case 2:return e.sent(),[3,4];case 3:return this.fwi.fyi(),this.Wyi=!0,[7];case 4:return[2]}})}).call(this)},n.l4t=function(t){this.fwi.Tyi(t.type)},n.be=function(){this.A2t.style.display="block",this.pT.style.display="block"},n.we=function(){this.A2t.style.display="none",this.pT.style.display="none"},n.Cti=function(t){this.c$t=t},n.hr=function(){this.Wyi=!1,this.c$t=void 0,this.dwi.hr(),this.Vyi.hr(),this.Hyi&&(this.Hyi.hr(),this.Hyi=void 0),this.fwi.hr(),this.pT.src=""},n.kn=function(){this.hr(),this.K9t.kn(),this.Vyi.kn(),this.dwi.kn(),this.A2t.remove(),Zi(this.A2t)},i.createUniqueDisplayBaseId=function(){return"theo-freewheel-"+ ++k8},i.zyi=function(t,i,n){var r=v.createElement("div");return r.id=n,r.className="theo-freewheel",i.classList.add("theo-freewheel-video"),r.appendChild(i),t.appendChild(r),r},Nt(i,[{key:"_wi",get:function(){return 0!==this.dwi.Wwi.length}},{key:"Awi",get:function(){return 0!==this.dwi.Fwi.length}},{key:"fwi",get:function(){return this.K9t}},{key:"dwi",get:function(){return this.qyi}},{key:"wwi",get:function(){return this.Wyi}},{key:"pwi",get:function(){return this.Vyi}}]),i}(xI);function A8(t){if(f.tv)switch(t){case"preroll":return tv.freewheel.SDK.ADUNIT_PREROLL;case"midroll":return tv.freewheel.SDK.ADUNIT_MIDROLL;case"postroll":return tv.freewheel.SDK.ADUNIT_POSTROLL;case"overlay":return tv.freewheel.SDK.ADUNIT_OVERLAY}}function T8(t,i,n){if(void 0!==i&&S(i)||i<0||i===1/0)return NaN;switch(t){case"preroll":return 0;case"postroll":return n}return qZ(i)}var S8=function(){function t(){}var i=t.prototype;return i.Qz=function(t){return t.integration===pS.FREEWHEEL},i.e4t=function(t,i,n){if(Boolean(f.tv&&f.tv.freewheel&&f.tv.freewheel.SDK&&f.tv.freewheel.SDK.AdManager)){var r=new hB(t.Wu,t.Ql,n,1,[eg.Mk]);r.Est(t.xe);var e=r.Yq(eg.Mk),s=new b8(t,e.hq,t.Wu);return new o8(t,i,r,s,e)}},i.uj=function(t){var i=Lw(t);Vi(i.cuePoints)||(i.cuePoints=[]);for(var n,r=[],e=t.assetDuration||0,s=Lt(i.cuePoints);!(n=s()).done;){var u=n.value,o=T8(u.adUnit,u.timeOffset,e),h=A8(u.adUnit);!S(o)&&Xi(h)?(u.adUnit=h,u.timeOffset=o,r.push(u)):Ui.um("Invalid adUnit/timeOffset combination. Cue was removed.")}return i.cuePoints=r,i},i.W6=function(t,i,n,r){n.Cti(t,i,r)},Nt(t,[{key:"i4t",get:function(){return x$._1t}}]),t}();kS.Bg.Kz(new S8),U(),Et(),U(),Et(),U(),Et(),Pt(),U(),Et(),U(),Et();var E8,I8=self.theoplayerDeviceMetadata;function R8(t){return t.navigator&&t.navigator.userAgent||""}U(),Et(),U(),Et(),U(),Et(),U(),Et();var C8=((E8={})["Windows 10"]=/(Windows 10.0|Windows NT 10.0)/i,E8["Windows 8.1"]=/(Windows 8.1|Windows NT 6.3)/i,E8["Windows 8"]=/(Windows 8|Windows NT 6.2)/i,E8["Windows 7"]=/(Windows 7|Windows NT 6.1)/i,E8["Windows Vista"]=/Windows NT 6.0/i,E8["Windows Server 2003"]=/Windows NT 5.2/i,E8["Windows XP"]=/(Windows NT 5.1|Windows XP)/i,E8["Windows Phone"]=/Windows Phone/i,E8.Android=/Android/i,E8.Linux=/(Linux(?!.*Ubuntu)|X11)/,E8.Ubuntu=/Ubuntu/i,E8.iOS=/(iPhone|iPad|iPod)/i,E8["Mac OS X"]=/Mac OS X/i,E8["Mac OS"]=/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/i,E8["Chrome OS"]=/CrOS/i,E8);function P8(t,i){var n=C8[i];return!!n&&Boolean(R8(t).match(n))}function D8(t){return P8(t,"Android")}function N8(t){return P8(t,"Windows Phone")}function x8(t){return P8(t,"iOS")&&!N8(t)}function B8(t){return P8(t,"Ubuntu")}var O8,M8,L8=/Windows (NT|Phone) ([0-9.]+)/i,F8=/Mac.*?(OS |OS X )(\d+(([_.])\d+)?(([_.])\d+)?)/i,U8=((O8={})["Windows 10"]=L8,O8["Windows 8.1"]=L8,O8["Windows 8"]=L8,O8["Windows 7"]=L8,O8["Windows Vista"]=L8,O8["Windows Server 2003"]=L8,O8["Windows XP"]=L8,O8["Windows Phone"]=/Windows Phone ([0-9.]+)/i,O8.Android=/Android (\d+(([_.])\d+)?(([_.])\d+)?)/i,O8.Linux=void 0,O8.Ubuntu=void 0,O8.iOS=/(iPad|iPhone|iPod).*?(OS |os |OS_)(\d+(([_.])\d+)?(([_.])\d+)?)/i,O8["Mac OS X"]=F8,O8["Mac OS"]=F8,O8["Chrome OS"]=void 0,O8);function V8(t,i){var n=U8[i];return n?R8(t).match(n):null}function H8(t){return t.split(/[_.]/).map(function(t){return A(t,10)})}function W8(t){if(function(t){return Boolean(R8(t).match(/Windows/i))}(t)){if(function(t){return P8(t,"Windows 10")}(t))return"Windows 10";if(N8(t))return"Windows Phone";if(function(t){return P8(t,"Windows 8.1")}(t))return"Windows 8.1";if(function(t){return P8(t,"Windows 8")}(t))return"Windows 8";if(function(t){return P8(t,"Windows 7")}(t))return"Windows 7";if(function(t){return P8(t,"Windows Vista")}(t))return"Windows Vista";if(function(t){return P8(t,"Windows Server 2003")}(t))return"Windows Server 2003";if(function(t){return P8(t,"Windows XP")}(t))return"Windows XP"}else{if(D8(t))return"Android";if(x8(t))return"iOS";if(function(t){return P8(t,"Mac OS X")}(t))return"Mac OS X";if(function(t){return P8(t,"Mac OS")}(t))return"Mac OS";if(B8(t))return"Ubuntu";if(function(t){return P8(t,"Chrome OS")}(t))return"Chrome OS";if(function(t){return P8(t,"Linux")&&!B8(t)}(t))return"Linux"}}function z8(t,i){var n=function(t){var i=V8(t,"Windows 10");return i&&i.length>2?H8(i[2]):void 0}(t),r=function(t){var i=V8(t,"Mac OS X");return i&&i.length>2?H8(i[2]):void 0}(t),e=function(t){var i=V8(t,"Android");return i&&i.length>1?H8(i[1]):void 0}(t),s=function(t){var i=V8(t,"iOS");return i&&i.length>3?H8(i[3]):void 0}(t),u=function(t){var i=V8(t,"Chrome OS");return i&&i.length>0?H8(i[0]):void 0}(t);return n?n.length>i?n[i]:void 0:r?r.length>i?r[i]:void 0:e?e.length>i?e[i]:void 0:s?s.length>i?s[i]:void 0:u&&u.length>i?u[i]:void 0}function X8(t){var i=function(t){return z8(t,0)}(t),n=function(t){return z8(t,1)}(t),r=function(t){return z8(t,2)}(t);if(void 0!==i)return void 0===n?""+i:void 0===r?i+"."+n:i+"."+n+"."+r}var q8=((M8={}).Chrome=/Chrome/i,M8["Chrome Mobile"]=void 0,M8["Chrome iOS"]=/CriOS/i,M8.Chromium=/Chromium/i,M8.HeadlessChrome=/HeadlessChrome/i,M8.Firefox=/Firefox/i,M8.Seamonkey=/Seamonkey/i,M8["Firefox iOS"]=/FxiOS/i,M8.Safari=/Safari/i,M8.Edge=/Edge\/\d+/i,M8["Edge Chromium"]=/Edg\/\d+/i,M8.IE=/Trident/i,M8.Opera=/Opera|OPR/i,M8.Vivaldi=/Vivaldi/i,M8["Android Browser"]=void 0,M8);function G8(t,i){var n=q8[i];return!!n&&Boolean(R8(t).match(n))}function j8(t){return Boolean(R8(t).match(/Mobi/i))}function Q8(t){return Boolean(t.chrome&&t.navigator&&t.navigator.vendor&&/google/i.test(t.navigator.vendor))||Y8(t)}function Y8(t){return G8(t,"Chrome iOS")}function K8(t){return G8(t,"Firefox")&&!Z8(t)}function J8(t){return G8(t,"Firefox Mobile")&&!Z8(t)&&j8(t)}function Z8(t){return G8(t,"Seamonkey")}function $8(t){return G8(t,"Firefox iOS")&&!Z8(t)}function t7(t){return G8(t,"Safari")&&!G8(t,"Chrome")&&!Bi.Wv}function i7(t){return Boolean(c7(t))}function n7(t){return G8(t,"Edge")}function r7(t){return G8(t,"Edge Chromium")}function e7(t){return G8(t,"IE")}function s7(t){return G8(t,"Vivaldi")}var u7,o7=/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i,h7=((u7={}).Chrome=o7,u7["Chrome Mobile"]=o7,u7["Chrome iOS"]=/CriOS\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i,u7.Chromium=o7,u7.HeadlessChrome=o7,u7.Firefox=/Firefox\/([0-9.]+)/i,u7["Firefox iOS"]=/FxiOS\/([0-9.]+)/i,u7.Safari=/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/,u7["Safari Mobile"]=void 0,u7.Edge=/Edge\/(\d+)/i,u7["Edge Chromium"]=/Edg\/(\d+)/i,u7["Edge Mobile"]=void 0,u7.IE=/(MSIE |Trident.*?rv:)(\d+)/i,u7.Opera=/(OPR\/(\d+\.\d+))|(Opera(?=.*Version\/((\d+)\.(\d+))))/i,u7["Opera Mobile"]=void 0,u7.Vivaldi=/Vivaldi\/((\d+)\.(\d+)\.(\d+)(?:\.(\d+))?)/i,u7["Android Browser"]=void 0,u7);function a7(t,i){var n=h7[i];return n?R8(t).match(n):null}function c7(t){return a7(t,"Opera")}function f7(t){var i=function(t){return a7(t,"Firefox")}(t);return i?T(i[1]):0}function v7(t){var i=function(t){return a7(t,"Firefox iOS")}(t);return i?T(i[1].split(".")[0]):0}function d7(t){var i=function(t){return a7(t,"Safari")}(t);return i?T(i[2].split(".")[0]):0}function l7(t){var i=function(t){return a7(t,"Edge")}(t);return i?T(i[1]):0}function w7(t){var i=function(t){return a7(t,"Edge Chromium")}(t);return i?T(i[1]):0}function g7(t){var i=function(t){return a7(t,"IE")}(t);return i?T(i[2]):0}function _7(t){var i=function(t){return a7(t,"Vivaldi")}(t);return i?T(i[1]):0}function m7(t){if(D8(t))return Q8(t)?"Chrome Mobile":K8(t)||J8(t)?"Firefox Mobile":n7(t)?"Edge Mobile":i7(t)?"Opera Mobile":"Android Browser";if(x8(t)){if(Q8(t)||Y8(t))return"Chrome iOS";if(K8(t)||$8(t))return"Firefox iOS";if(n7(t))return"Edge Mobile";if(t7(t)||function(t){return t7(t)&&j8(t)}(t))return"Safari Mobile";if(i7(t))return"Opera Mobile"}return function(t){return G8(t,"Chromium")}(t)?"Chromium":function(t){return G8(t,"HeadlessChrome")}(t)?"HeadlessChrome":Q8(t)?"Chrome":K8(t)?"Firefox":t7(t)?"Safari":n7(t)?"Edge":r7(t)?"Edge Chromium":e7(t)?"IE":i7(t)?"Opera":s7(t)?"Vivaldi":void 0}function y7(t){return s7(t)?_7(t):Y8(t)?Number(function(t){var i=h7["Chrome iOS"];return i&&i.exec(R8(t))||[]}(t)[1]):Q8(t)?Number(function(t){var i=h7.Chrome;return i&&i.exec(R8(t))||[]}(t)[1]):K8(t)||J8(t)?f7(t):$8(t)?v7(t):t7(t)?d7(t):n7(t)?l7(t):r7(t)?w7(t):e7(t)?g7(t):i7(t)?function(t){var i=c7(t);return i&&i[0].indexOf("Opera")>-1?T(i[5]):i?T(i[2].split(".")[0]):0}(t):void 0}var p7=function(t){return t.Gyi="pc",t.Xyi="console",t.jyi="settop",t.Qyi="mobile",t.Kyi="tablet",t.Yyi="smarttv",t.Jyi="searchbot",t}({});function k7(t){var i=R8(t);return i.match(/CrKey|Roku|AFTS|AppleTV|Nexus Player/i)?"settop":i.match(/Xbox|Playstation|Wii|Nintendo/i)?"console":/(iPad|Tablet|(Android(?!.*Mobi))|(Windows(?!.*Phone)(.*Touch))|Kindle|Playbook|Silk|(Puffin(?!.*(IP|AP|WP))))/i.test(i)?"tablet":/Mobi/.test(i)?"mobile":i.match(/GoogleTV|SmartTV|SMART-TV|Internet TV|NetCast|NETTV|boxee|Kylo|DLNADOC|hbbtv|CE-HTML/i)?"smarttv":i.match(/(nuhk|Googlebot|bingbot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/i)?"searchbot":function(t){return Boolean(m7(t))}(t)?"pc":void 0}var b7=function(){function t(t,i){var n=this;this.empClient=void 0,this.agama=void 0,this.ibi=void 0,this.empClient=t,this.agama=i,this.ibi=function(){var t=Ui.Rx;switch(t){case"wifi":n.empClient.setDeviceMetadata(n.agama.DeviceMetadata.DATA_CONNECTION_TYPE,"wlan");break;case"ethernet":n.empClient.setDeviceMetadata(n.agama.DeviceMetadata.DATA_CONNECTION_TYPE,t);break;case"cellular":var i=function(t){switch(t){case"3g":return"mobile/3G";case"4g":return"mobile/4G";default:return}}(Ui.Cx);i&&n.empClient.setDeviceMetadata(n.agama.DeviceMetadata.DATA_CONNECTION_TYPE,i)}}}var i=t.prototype;return i.aj=function(t){this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_ID,t.deviceID||function(){var t=Bd.zy("deviceId");if(t)return t;var i=FS();return Bd.Gy("deviceId",i),i}()),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.PLAYER,"THEOplayer"),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.PLAYER_VERSION,"10.3.0"),this.Zyi(t),this.$yi(),this.tbi(t),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.EMPCLIENT_INTEGRATION_VERSION,"3.0"),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.EMPCLIENT_INTEGRATION_BUILDDATE,"2023-04-17 12:00:00"),t.application&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.APPLICATION,t.application),t.applicationVersion&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.APPLICATION_VERSION,t.applicationVersion),t.userAccountID&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.USER_ACCOUNT_ID,t.userAccountID);var i=t.connectionType;i?this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,i):(this.ibi(),l.connection&&l.connection.addEventListener&&l.connection.addEventListener("change",this.ibi))},i.Zyi=function(t){this.ebi(t);var i=t.deviceManufacturer||I8&&I8.manufacturer;i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_MANUFACTURER,i);var n=t.deviceModel||I8&&I8.model;n&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_MODEL,n)},i.ebi=function(t){var i=t.deviceType||function(){var t=k7(self);switch(t){case p7.Xyi:return"game-console";case p7.Yyi:return"tv";case p7.jyi:return"media-streamer";default:return t}}();i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_TYPE,i)},i.$yi=function(){var t=m7(self);t&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_BROWSER,t);var i=y7(self);void 0!==i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_BROWSER_VERSION,i.toString())},i.tbi=function(t){var i=t.deviceOs||W8(self);i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_OS,i);var n=t.deviceOsVersion||X8(self);n&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_OS_VERSION,n.toString())},i.kn=function(){l.connection&&l.connection.removeEventListener&&l.connection.removeEventListener("change",this.ibi)},t}();var A7=function(t){function i(){var i;return(i=t.call(this)||this).rbi=void 0,i.WG=void 0,i.ko=!1,i.obi=!1,i.nbi=void 0,i.hbi=void 0,i.rbi=f.Agama,i}Ct(i,t);var n=i.prototype;return n.GP=function(t){this.nbi=t,this.rbi&&(this.WG=function(t,i){var n=function(t,i){switch(i){case"info":return t.LogLevel.INFO;case"debug":return t.LogLevel.DEBUG;case"warning":return t.LogLevel.WARNING;case"error":return t.LogLevel.ERROR;default:return t.LogLevel.FATAL}}(i,t.logLevel);i.setLogLevel(n);var r=new i.EMPClient(t.config);return function(t,i){return t.setExternalConfig(i.config),t}(r,t)}(t,this.rbi),this.WG&&(this.hbi=new b7(this.WG,this.rbi),this.ko=!0))},n.hj=function(){return this.rbi||console.warn("Please load the Agama Library (empclient.min.js) in order to use the integration"),Boolean(this.rbi)},n.nj=function(){return this.ko},n.OX=function(t,i){if(this.WG&&this.rbi)switch(t){case AS.oG:this.WG.setMeasurement(this.rbi.Measurement.BUFFER_LENGTH,i);break;case AS.aG:this.WG.setMeasurement(this.rbi.Measurement.BYTES_RECEIVED,i);break;case AS.cG:this.WG.setMeasurement(this.rbi.Measurement.SEGMENT_PROFILE_BITRATE,i);break;case AS.dG:this.WG.setMeasurement(this.rbi.Measurement.VIDEO_PROFILE_BITRATE,i);break;case AS.uG:this.WG.setMeasurement(this.rbi.Measurement.SEGMENT_READ_BITRATE,i);break;case AS.eG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_1XX,i);break;case AS.sG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_2XX,i);break;case AS.nG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_3XX,i);break;case AS.rG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_4XX,i);break;case AS.hG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_5XX,i);break;case AS.fG:this.WG.setMeasurement(this.rbi.Measurement.PLAYBACK_POSITION,i);break;case AS.vG:this.WG.setMeasurement(this.rbi.Measurement.NUMBER_OF_FRAMES_DECODED,i);break;case AS.lG:this.WG.setMeasurement(this.rbi.Measurement.NUMBER_OF_FRAMES_DROPPED,i)}},n.mX=function(t,i){if(this.WG&&this.rbi)switch(t){case TS.wG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.ASSET_DURATION,i);break;case TS.mG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.MANIFEST_URI,i);break;case TS.yG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.NUMBER_OF_CONTENT_PROFILES,i);break;case TS.SG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.SERVICE_NAME,i);break;case TS.bG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.CDN,i);break;case TS.AG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.CONTENT_TITLE,i);break;case TS.TG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.CONTENT_TYPE,i);break;case TS.kG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.CONTENT_DESCRIPTION,i)}},n.aj=function(){this.hbi&&this.nbi&&this.hbi.aj(this.nbi)},n.rj=function(t,i){this.rbi&&this.WG&&(this.qX(),function(t,i,n,r){var e=US(t,n,r);i.abrSession(e,t.ViewState.INITIAL_BUFFERING)}(this.rbi,this.WG,t,i),this.obi=!0)},n.kn=function(){this.hbi&&this.hbi.kn(),this.abi(SS.EG),this.WG=void 0},n.nX=function(t){this.ubi(t)},n.oX=function(t,i){this.WG&&this.WG.event(t.code,i)},n.qX=function(){this.WG&&this.obi&&(this.WG.exitSession(),this.obi=!1)},n.abi=function(t){if(this.WG&&this.rbi&&(this.qX(),t===SS.EG))this.WG.shutdown(this.rbi.ShutdownType.NORMAL_SHUTDOWN)},n.rX=function(t,i,n){this.ubi(t,i,n)},n.ubi=function(t,i,n){if(this.WG&&this.rbi)switch(t){case bS.PM:this.cbi(this.rbi.ViewState.PLAYING,i,n);break;case bS.$z:this.cbi(this.rbi.ViewState.FAILED,i,n);break;case bS.tG:this.cbi(this.rbi.ViewState.INITIAL_BUFFERING,i,n);break;case bS.Yz:this.cbi(this.rbi.ViewState.PAUSED,i,n);break;case bS.Jz:this.cbi(this.rbi.ViewState.SEEK,i,n);break;case bS.Zz:this.cbi(this.rbi.ViewState.STALLED,i,n);break;case bS.iG:this.cbi(this.rbi.ViewState.NO_ACCESS,i,n)}},n.cbi=function(t,i,n){if(this.WG)if(i){var r=function(t){return t||""}(n);this.WG.viewStateExtended(t,i.code,r)}else this.WG.viewStateChanged(t)},i}(RS);Wb(function(t){return function(i){return function(i){function n(n,r){var e;return(e=i.call(this,n,r)||this).WG=new t,e.sbi=void 0,e.sbi=new HS(e,e.WG,r),e}Ct(n,i);var r=n.prototype;return r.Xx=function(t,n){this.sbi&&this.sbi.$G(),i.prototype.Xx.call(this,t)},r.kn=function(){this.sbi&&this.sbi.kn(),i.prototype.kn.call(this)},n}(i)}}(A7),Vb.Snt),U(),Et(),U(),Et(),Pt(),U(),Et(),U(),Et(),Wt(),xt(),Ft(),Qt(),U(),Et();var T7=function(t){return t.PLAY_ALL="play-all",t.PLAY_NONE="play-none",t.PLAY_LAST="play-last",t}({});U(),Et();var S7=function(t){return t.VOD="vod",t.LIVE="live",t}({}),E7=function(){function t(t,i,n,r,e,s,u){var o=this;this.oa=void 0,this.pbi=void 0,this.ybi=void 0,this.fbi=void 0,this.dbi=void 0,this.Pbi=void 0,this.vbi=void 0,this.wbi=void 0,this.nq=void 0,this.rq=void 0,this.T9=void 0,this.bbi=void 0,this.zbi=void 0,this._bi=void 0,this.T2t=void 0,this.Abi=void 0,this.dci=void 0,this.Cci=void 0,this.kgi=void 0,this.Pd=void 0,this.Tbi=void 0,this.hci=void 0,this.kbi=void 0,this.Ebi=void 0,this.xbi=void 0,this.qbi=void 0,this.oa=t,this.pbi=i,this.ybi=n,this.fbi=r,this.dbi=e,this.Pbi=s,this.vbi=u,this.nq=void 0,this.rq=void 0,this.T9=new hr,this.bbi=new hr,this.zbi=void 0,this._bi=!1,this.T2t=void 0,this.Abi=function(t){var i=t.currentSource;if(i&&i.integrationData){var n=i.integrationData,r=n.preplayResponse,e=n.source;o.dbi.Gbi(r),r&&r.type===S7.VOD&&r.ads&&o.fbi.Cbi(r.ads),o.pbi.Xbi=i.integrationData,e.assetInfo&&kr(o.fetchAssetInfo(i))}},this.dci=function(){o._bi=!0},this.Cci=function(){o._bi&&o.Rbi(o.oa.Gx())},this.kgi=function(){o._bi&&(o.Rbi(1/0),o._bi=!1)},this.Pd=function(){kr(o.pbi.Tn())},this.Tbi=function(t){o.T9.Zg(),o.T9=new hr,kr(_r(o.Xri(t.od.RO,o.T9.Yg),o.T9))},this.hci=function(){1!==o.oa.vP&&(o.zbi=o.oa.vP,o.oa.vP=1)},this.kbi=function(){void 0!==o.zbi&&(o.oa.vP=o.zbi,o.zbi=void 0)},this.Ebi=function(t){t.od.wn("Sbi",o.Tbi),t.od.wn("Ynt",o.hci),t.od.wn("Knt",o.kbi)},this.xbi=function(t){t.od.mn("Sbi",o.Tbi),t.od.mn("Ynt",o.hci),t.od.mn("Knt",o.kbi)},this.qbi=function(){o.oa.jP()},this.oa.wn(eh.Pw,this.Abi),this.oa.wn(eh.uo,this.dci),this.oa.wn(eh.py,this.Cci),this.oa.wn(eh.Nw,this.kgi),this.oa.wn(Ry.kM,this.Pd),this.fbi.K0t.wn("Xnt",this.Ebi),this.fbi.K0t.wn("Gnt",this.xbi)}var i=t.prototype;return i.lbi=function(t){this.nq=cg(t),this.rq=t,this.oa.So(new yb(t))},i.Ta=function(t){this.fbi.resetSource(),this.vbi.jy(),this._bi=!1,this.oa.gbi(t)},i.drt=function(t,i){return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return this.pbi.hr(),this._bi=!1,t&&function(t){return t.sources.some(function(t){return t.integration===FA.UPLYNK})}(t)?[3,2]:[4,this.oa.mbi(t,i)];case 1:return[2,e.sent()];case 2:return e.trys.push([2,5,,6]),n=this,[4,this.ybi.wpi(t)];case 3:return n.wbi=e.sent(),[4,this.oa.mbi(this.wbi,i)];case 4:return e.sent(),[3,6];case 5:return r=e.sent(),this.lbi(new ld(vd.MANIFEST_LOAD_ERROR,r.message,r)),[3,6];case 6:return[2]}})}).call(this)},i.kn=function(){this.T9.Zg(),this.bbi.Zg(),this.oa.mn(eh.Pw,this.Abi),this.oa.mn(eh.uo,this.dci),this.oa.mn(eh.py,this.Cci),this.oa.mn(eh.Nw,this.kgi),this.oa.mn(Ry.kM,this.Pd);for(var t,i=Lt(this.fbi.K0t.ec);!(t=i()).done;){var n=t.value;n.mn("Sbi",this.Tbi),n.mn("Ynt",this.hci),n.mn("Knt",this.kbi)}this.fbi.K0t.mn("Xnt",this.Ebi),this.fbi.K0t.mn("Gnt",this.xbi),this.fbi.destroy(),this.T2t&&(this.T2t.zg(),this.T2t=void 0),this._bi=!1},i.fetchAssetInfo=function(t){return Vt(function(){var i;return zt(this,function(n){switch(n.label){case 0:if(!t||!t.integrationData)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.Pbi.KSt(t.integrationData.source.prefix,t.integrationData.source.id,this.bbi.Yg,t.integrationData.preplayResponse.sid)];case 2:return i=n.sent(),this.dbi.Ibi(i),this.vbi.Cbi(i,this.fbi.K0t.ec),[3,4];case 3:return n.sent(),[3,4];case 4:return[2]}})}).call(this)},i.Rbi=function(t){this.fbi.Dbi(t),this.fbi.Lnt.forEach(function(i){return i.Nbi(t)}),this.fbi.Bbi(this.oa.EP()),this.S2t()},i.Xx=function(t){this.fbi.Fnt||(this.T9.Zg(),this.T9=new hr,kr(_r(this.Xri(t,this.T9.Yg),this.T9)))},i.Xri=function(t,i){return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:if(dr(i),t0});if(t){var i=t.Wbi[0];this.T2t||(this.T2t=new H$(this.oa.xe),this.T2t.wn("clickstart",this.qbi)),this.T2t.O1t=i}else this.T2t&&(this.T2t.zg(),this.T2t=void 0)},Nt(t,[{key:"Ca",get:function(){return this.dbi.Ca}},{key:"lt",get:function(){return this.nq}},{key:"Jx",get:function(){return this.rq}}]),t}();U(),Et(),Wt(),Qt(),U(),Et();var I7=Fk({breaksIndex:Pk,adsIndex:Pk,startTime:Pk,endTime:Pk}),R7=Fk({index:Pk,timeOffset:Pk}),C7=Fk({duration:Pk,apiFramework:zk(Dk,Ok),creative:Dk,mimeType:Dk,width:Pk,height:Pk,companions:qk(function(t){return new Qk(t)}(function(){return C7})),extensions:zk(xk,qk(Bk)),fw_parameters:zk(xk,jk(Dk)),events:jk(qk(Dk))}),P7=Fk({type:Hk(["linear","nonlinear"]),position:Hk(["preroll","midroll","postroll","pause","overlay",""]),timeOffset:Pk,duration:Pk,ads:qk(C7),events:jk(qk(Dk))}),D7=Fk({breaks:qk(P7),breakOffsets:zk(xk,qk(R7)),placeholderOffsets:zk(xk,qk(I7))}),N7=Fk({required:zk(xk,Nk),fairplayCertificateURL:zk(xk,Dk),widevineLicenseURL:zk(xk,Dk),playreadyLicenseURL:zk(xk,Dk)}),x7={type:Hk(Uk(S7)),playURL:Dk,prefix:Dk,sid:Dk,drm:zk(xk,N7)},B7=Fk(Yu({},x7,{type:Hk([S7.VOD]),ads:D7,interstitialURL:zk(Dk,Ok,xk)})),O7=zk(B7,Fk(Yu({},x7,{type:Hk([S7.LIVE])})));U(),Et();var M7,L7=Dk,F7=Fk({userId:Dk,externalId:zk(Dk,qk(Dk))}),U7=function(){function t(t){this.aV=void 0,this.aV=t}var i=t.prototype;return i.KSt=function(t){return Vt(function(){return zt(this,function(i){try{return[2,this.jbi(t)]}catch(t){throw t}return[2]})}).call(this)},i.jbi=function(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return[4,H7(t)];case 1:return i=e.sent(),[4,this.aV.vk({Hk:ml.GET,Yu:i,fk:Ud.BT})];case 2:return[4,e.sent().lk()];case 3:return n=e.sent(),r=Yu({},n,{type:t.assetType===jS.ASSET?S7.VOD:S7.LIVE}),O7.jH(r)||O7.KH(r,"PreplayResponse"),[2,r]}})}).call(this)},t}(),V7=((M7={})[jS.ASSET]="",M7[jS.CHANNEL]="channel/",M7[jS.EVENT]="event/",M7);function H7(t){return Vt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return i=t.prefix,n=V7[t.assetType],r=function(t){if(qk(L7).jH(t))return 1===t.length?t[0]:t.join(",")+"/multiple";if(L7.jH(t))return t;if(F7.jH(t)&&Vi(t.externalId))return 1===t.externalId.length?"ext/"+t.userId+"/"+t.externalId[0]:"ext/"+t.userId+"/"+t.externalId.join(",")+"/multiple";if(F7.jH(t))return"ext/"+t.userId+"/"+t.externalId;throw new p("Invalid asset id")}(t.id),[4,W7(t.contentProtected)];case 1:return e=o.sent(),s=function(t,i){var n=z7(t,i);return n?{"ad.cping":"1","ad.pingf":String(n)}:{}}(t.assetType,t.ping),u={},Vi(t.preplayParameters)?t.preplayParameters.forEach(function(t){u[t[0]]=t[1]}):u=t.preplayParameters,[2,El(i+"/preplay/"+n+r+".json",Yu({v:"2"},u,e,s,u))]}})})()}function W7(t){return Vt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return(i=t)?[4,Ui.wm()]:[3,2];case 1:i=e.sent(),e.label=2;case 2:return i?[2,{rmt:"fps",manifest:"m3u8"}]:[3,3];case 3:return(n=t)?[4,Ui.Am()]:[3,5];case 4:n=e.sent(),e.label=5;case 5:return n?[2,{rmt:"wv",manifest:"mpd"}]:[3,6];case 6:return(r=t)?[4,Ui.ym()]:[3,8];case 7:r=e.sent(),e.label=8;case 8:if(r)return[2,{rmt:"pr",manifest:"mpd"}];e.label=9;case 9:return[2,{}]}})})()}function z7(t,i){var n=t!==jS.ASSET;return(!n&&i.adImpressions?1:0)+(!n&&i.freeWheelVideoViews?2:0)+(n&&i.linearAdData?4:0)}U(),Et(),Wt(),Qt(),U(),Et();var X7=Fk({ad_id:Dk,apiFramework:zk(Ok,Dk),companions:qk(Bk),creative:Dk,duration:Pk,mimeType:Dk,height:Pk,width:Pk,extensions:zk(xk,qk(Bk)),fw_parameters:zk(xk,jk(Dk))}),q7=Fk({breakId:Dk,ads:qk(X7),type:Hk(["linear","nonlinear"]),position:Hk(["preroll","midroll","postroll","pause","overlay",""]),timeOffset:Pk,duration:Pk,height:zk(xk,Pk),width:zk(xk,Pk),events:jk(qk(Dk))}),G7=Fk({breaks:qk(q7)}),j7=Fk({next_time:Pk,ads:zk(xk,G7),extensions:zk(xk,qk(Bk)),error:zk(xk,Dk),currentBreakEnd:zk(xk,Pk)}),Q7=function(t){return t.tTt="start",t.Jz="seek",t}({}),Y7=function(){function t(t){this.aV=void 0,this.aV=t}var i=t.prototype;return i.KSt=function(t,i){return Vt(function(){return zt(this,function(n){try{return[2,this.jbi(t,i)]}catch(t){throw t}return[2]})}).call(this)},i.jbi=function(t,i){return Vt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return n=function(t){var i={v:"3",pt:String(t.currentTime)};(function(t){return void 0!==t.seekTime})(t)&&t.hasFreeWheelVideoViews&&(i.ft=String(t.seekTime));t.event&&(i.ev=t.event);return El(t.zonePrefix+"/session/ping/"+t.sessionId+".json",Yu({},i))}(t),[4,this.aV.vk({Hk:ml.GET,Yu:n,fk:Ud.BT,Yg:i})];case 1:return[4,e.sent().lk()];case 2:return r=e.sent(),j7.jH(r)||j7.KH(r,"PingResponse"),[2,r]}})}).call(this)},t}();U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et(),xt(),Pt();var K7=function(t){function i(i){var n;return(n=t.call(this,"Qbi")||this).cE=void 0,n.cE=i,n}return Ct(i,t),i.prototype.xa=function(){return new J7(this.cE)},Nt(i,[{key:"uE",get:function(){return this.cE}}]),i}(Aw),J7=function(t){function i(i){var n;return(n=t.call(this,"pingresponse")||this).response=void 0,n.response=i,n}return Ct(i,t),i}(rh);U(),Et(),xt(),Pt();var Z7=function(t){function i(i){var n;return(n=t.call(this,"Kbi")||this).nq=void 0,n.nq=i,n}return Ct(i,t),i.prototype.xa=function(){return new $7(this.nq)},Nt(i,[{key:"lt",get:function(){return this.nq}}]),i}(Aw),$7=function(t){function i(i){var n;return(n=t.call(this,"pingerror")||this).error=void 0,n.error=i,n}return Ct(i,t),i}(rh),t9=function(t){function i(i,n){var r,e;return r=t.call(this)||this,(e=r).nAi=void 0,e.oa=void 0,e.Ybi=void 0,e.Zbi=void 0,e.sAi=void 0,e.rAi=void 0,e.hAi=void 0,e.hT=void 0,e.eAi=void 0,e.tAi=void 0,e.iAi=void 0,e.nAi=i,e.oa=n,e.Zbi=NaN,e.sAi=void 0,e.rAi=!1,e.hAi=NaN,e.hT=new hr,e.eAi=void 0,e.tAi=function(){return Vt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=e.oa.Gx(),e.hAi=t,e.rAi||Fi(e.sAi)||S(e.Zbi)?[2]:e.Zbi+e.sAi<=t?(e.rAi=!0,[4,e.$bi()]):[3,2];case 1:i.sent(),e.rAi=!1,i.label=2;case 2:return[2]}})})()},e.iAi=function(){if(e.oa.Gx()!==e.Zbi){e.rAi&&e.oAi(),e.hAi=e.oa.Gx();var t=e.hAi-(e.Zbi||0);S(t)?kr(e.$bi(Q7.Jz,0)):kr(e.$bi(Q7.Jz,t))}},r}Ct(i,t);var n=i.prototype;return n.Tn=function(){return Vt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return(t=this.Ybi)?(i=z7(t.source.assetType,t.source.ping),0!==i?(this.Zbi=this.oa.EP().start(0),[4,this.$bi(Q7.tTt)]):[2]):[2];case 1:return n.sent(),this.oa.wn("timeupdate",this.tAi),this.oa.wn("seeking",this.iAi),[2]}})}).call(this)},n.$bi=function(t,i){return Vt(function(){var n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:if(n=this.Ybi.preplayResponse,r={},S(this.Zbi))return[2];if(Li(this.eAi)&&En(this.eAi,this.oa.Gx()-this.Zbi))return[2];void 0!==i&&(r.seekTime=i),void 0!==t&&(r.event=t),e=this.oa.Gx()-this.Zbi,t===Q7.tTt?e=0:t!==Q7.Jz&&this.sAi&&(e=b.min(e,this.sAi)),this.eAi=e,a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,this.nAi.KSt(Yu({zonePrefix:n.prefix,sessionId:n.sid,currentTime:e,hasFreeWheelVideoViews:null==(u=this.Ybi)?void 0:u.source.ping.freeWheelVideoViews},r),this.hT.Yg)];case 2:return o=a.sent(),this.So(new K7(o)),this.sAi=-1!==o.next_time?o.next_time:void 0,s=o.error,[3,5];case 3:return vr(h=a.sent())||(s=h.message),[3,5];case 4:return s&&this.So(new Z7(s)),[7];case 5:return[2]}})}).call(this)},n.hr=function(){this.sAi=void 0,this.Ybi=void 0,this.Zbi=NaN,this.rAi=!1,this.hAi=NaN,this.eAi=void 0,this.oa.mn("seeking",this.iAi),this.oa.mn("timeupdate",this.tAi),this.oAi()},n.oAi=function(){this.hT.Zg(),this.hT=new hr},n.kn=function(){this.hr()},Nt(i,[{key:"Xbi",set:function(t){this.Ybi=t}},{key:"Jbi",get:function(){return this.Zbi}}]),i}(th);U(),Et(),Wt(),Ft(),Qt();var i9=function(){function t(t,i){this.aAi=void 0,this.GJ=void 0,this.aAi=t,this.GJ=i}return t.prototype.wpi=function(t){return Vt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:i=[],n=Lt(t.sources),o.label=1;case 1:return(r=n()).done?[3,6]:QA(e=r.value)?[3,2]:(i.push(e),[3,5]);case 2:return o.trys.push([2,4,,5]),[4,this.aAi.KSt(e)];case 3:return s=o.sent(),u=function(t,i,n){var r,e=t.preplayResponse;t.source.contentProtected&&e.drm&&(r={integration:"uplynk"},e.drm.fairplayCertificateURL&&(r.fairplay={certificateURL:e.drm.fairplayCertificateURL}),e.drm.widevineLicenseURL&&(r.widevine={licenseAcquisitionURL:e.drm.widevineLicenseURL}),e.drm.playreadyLicenseURL&&(r.playready={licenseAcquisitionURL:e.drm.playreadyLicenseURL}));var s=lA({src:e.playURL,contentProtection:r,useNativePlayback:t.source.useNativePlayback,hls:t.source.hls,dash:t.source.dash,seamlessSwitchStrategy:t.source.seamlessSwitchStrategy},i,n);return s.integrationData=t,s}({source:e,preplayResponse:s},t,this.GJ),u.src&&(u.src=El(u.src,e.playbackUrlParameters)),i.push(u),[3,5];case 4:return o.sent(),[3,5];case 5:return[3,1];case 6:if(0!==t.sources.length&&0===i.length)throw new y("Fatal: unable to play UplynkSources.");return[2,Yu({},t,{sources:i})]}})}).call(this)},t}();U(),Et(),xt(),Ft(),U(),Et(),xt(),Pt(),Ft(),U(),Et(),Pt();var n9=function(t){function i(i,n){var r;return(r=t.call(this,"Ynt")||this).od=void 0,r.YF=void 0,r.od=i,r.YF=n,r}return Ct(i,t),i.prototype.xa=function(){return new r9(this.od.Ca)},i}(Aw),r9=function(t){function i(i){var n;return(n=t.call(this,"adbreakbegin")||this).adBreak=void 0,n.adBreak=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var e9=function(t){function i(i,n){var r;return(r=t.call(this,"Knt")||this).od=void 0,r.YF=void 0,r.od=i,r.YF=n,r}return Ct(i,t),i.prototype.xa=function(){return new s9(this.od.Ca)},i}(Aw),s9=function(t){function i(i){var n;return(n=t.call(this,"adbreakend")||this).adBreak=void 0,n.adBreak=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var u9=function(t){function i(i){var n;return(n=t.call(this,"Sbi")||this).od=void 0,n.od=i,n}return Ct(i,t),i.prototype.xa=function(){return new o9(this.od.Ca)},i}(Aw),o9=function(t){function i(i){var n;return(n=t.call(this,"adbreakskip")||this).adBreak=void 0,n.adBreak=i,n}return Ct(i,t),i}(rh);U(),Et(),U(),Et(),Pt();var h9=function(t){function i(i){var n;return(n=t.call(this,"$4t")||this).od=void 0,n.od=i,n}return Ct(i,t),i.prototype.xa=function(){return new a9(this.od.Ca)},i}(Aw),a9=function(t){function i(i){var n;return(n=t.call(this,"updateadbreak")||this).adBreak=void 0,n.adBreak=i,n}return Ct(i,t),i}(rh),c9=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).HO=void 0,u.Zb=void 0,u.qc=void 0,u.emi=void 0,u.hu=void 0,u.ho=void 0,u.EJt=void 0,u.dAi=void 0,u.HO=i,u.Zb=n,u.qc=r,u.emi=e,u.ho=!1,u.dAi=!1,u.EJt=s,u}Ct(i,t);var n=i.prototype;return n.uAi=function(t){this.Zb=t-this.CO;for(var i,n=Lt(this.Jc.ec);!(i=n()).done;){var r=i.value;r.CO>t&&this.Jc.pS(r)}this.So(new h9(this))},n.fct=function(t){return t>=this.CO&&(Fi(this.ct)||t<=this.CO+this.ct)},n.lAi=function(t){return-1!==this.kJt&&(!!Li(this.RO)&&t-this.CO>=this.kJt)},n.uD=function(){this.qc.ec.forEach(function(t){return t.uD()}),this.So(new u9(this))},n.fAi=function(t){var i=Li(this.RO)&&t>=this.RO,n=this.CO<=t&&!i&&!this.ro,r=this.ro&&this.RO&&t>=this.RO;n&&(this.ho=!0,this.So(new n9(this,this.CO))),this.qc.ec.forEach(function(i){return i.fAi(t)}),r&&(this.dAi=!0,this.ho=!1,this.So(new e9(this,this.RO)))},Nt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get startTime(){return t.CO},get endTime(){return t.RO},get duration(){return t.ct},get ads(){return t.Jc.Ca},get skipOffset(){return t.kJt},set skipOffset(i){t.kJt=i},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new vR(t,n),n}(this)),this.hu}},{key:"CO",get:function(){return this.HO}},{key:"RO",get:function(){return this.Zb?this.HO+this.Zb:void 0}},{key:"ct",get:function(){return this.Zb}},{key:"Wat",get:function(){var t=this.RO;return Li(t)?new EA([this.CO,t]):EA.rL()}},{key:"Jc",get:function(){return this.qc}},{key:"cAi",get:function(){return this.dAi}},{key:"ro",get:function(){return this.ho}},{key:"kJt",get:function(){return this.emi?-1:this.EJt},set:function(t){this.emi||(this.EJt=t)}}]),i}(nh);U(),Et(),xt(),Pt(),U(),Et(),Pt();var f9=function(t){function i(i,n){var r;return(r=t.call(this,"Jnt")||this).jnt=void 0,r.YF=void 0,r.jnt=i,r.YF=n,r}return Ct(i,t),i.prototype.xa=function(){return new v9(this.jnt.Ca)},i}(Aw),v9=function(t){function i(i){var n;return(n=t.call(this,"adbegin")||this).ad=void 0,n.ad=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var d9=function(t){function i(i,n){var r;return(r=t.call(this,"Znt")||this).jnt=void 0,r.YF=void 0,r.jnt=i,r.YF=n,r}return Ct(i,t),i.prototype.xa=function(){return new l9(this.jnt.Ca)},i}(Aw),l9=function(t){function i(i){var n;return(n=t.call(this,"adend")||this).ad=void 0,n.ad=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt(),U(),Et(),Pt();var w9=function(t){function i(i){var n;return(n=t.call(this,"vAi")||this).jnt=void 0,n.jnt=i,n}return Ct(i,t),i.prototype.xa=function(){return new g9(this.jnt.Ca)},i}(Aw),g9=function(t){function i(i){var n;return(n=t.call(this,"removead")||this).ad=void 0,n.ad=i,n}return Ct(i,t),i}(rh),_9=function(t){function i(){return t.call(this)||this}Ct(i,t);var n=i.prototype;return n.Jei=function(t){},n.isi=function(t){this.So(new w9(t))},i}(s2);U(),Et(),Pt();var m9=function(t){function i(i){var n;return(n=t.call(this,"i5t")||this).jnt=void 0,n.jnt=i,n}return Ct(i,t),i.prototype.xa=function(){return new y9(this.jnt.Ca)},i}(Aw),y9=function(t){function i(i){var n;return(n=t.call(this,"adfirstquartile")||this).ad=void 0,n.ad=i,n}return Ct(i,t),i}(rh),p9=function(t){function i(i){var n;return(n=t.call(this,"e5t")||this).jnt=void 0,n.jnt=i,n}return Ct(i,t),i.prototype.xa=function(){return new k9(this.jnt.Ca)},i}(Aw),k9=function(t){function i(i){var n;return(n=t.call(this,"admidpoint")||this).ad=void 0,n.ad=i,n}return Ct(i,t),i}(rh),b9=function(t){function i(i){var n;return(n=t.call(this,"s5t")||this).jnt=void 0,n.jnt=i,n}return Ct(i,t),i.prototype.xa=function(){return new A9(this.jnt.Ca)},i}(Aw),A9=function(t){function i(i){var n;return(n=t.call(this,"adthirdquartile")||this).ad=void 0,n.ad=i,n}return Ct(i,t),i}(rh),T9=function(t){function i(i){var n;return(n=t.call(this,"_Ai")||this).jnt=void 0,n.jnt=i,n}return Ct(i,t),i.prototype.xa=function(){return new S9(this.jnt.Ca)},i}(Aw),S9=function(t){function i(i){var n;return(n=t.call(this,"adcomplete")||this).ad=void 0,n.ad=i,n}return Ct(i,t),i}(rh);U(),Et();var E9=function(t){function i(i,n,r,e,s,u,o,h,a,c,f,v){var d;return void 0===a&&(a=[]),void 0===c&&(c={}),void 0===f&&(f={}),(d=t.call(this)||this).HO=void 0,d.Zb=void 0,d.UYt=void 0,d.yAi=void 0,d.IQ=void 0,d.lA=void 0,d.fA=void 0,d.NJt=void 0,d.bAi=void 0,d.Zf=void 0,d.vJt=void 0,d.IYt=void 0,d.hu=void 0,d.ho=void 0,d.AAi=void 0,d.SAi=void 0,d.TAi=void 0,d.kAi=void 0,d.EAi=void 0,d.xAi=void 0,d.HO=i,d.Zb=n,d.UYt=r,d.yAi=e,d.IQ=s,d.lA=u,d.fA=o,d.NJt=a,d.bAi=c,d.Zf=f,d.vJt=v,d.IYt=new _9,d.ho=!1,d.AAi=!1,d.SAi=!1,d.TAi=!1,d.kAi=!1,d.EAi=function(){return d.Nbi(d.HO)},d.xAi=function(){return d.Nbi(d.RO)},d.IYt.Zei(h),d.wn("Jnt",d.EAi),d.wn("Znt",d.xAi),d}Ct(i,t);var n=i.prototype;return n.fAi=function(t){var i=this.CO<=t&&t=.25&&(this.AAi=!0,this.So(new m9(this))),!this.SAi&&i>=.5&&(this.SAi=!0,this.So(new p9(this))),!this.TAi&&i>=.75&&(this.TAi=!0,this.So(new b9(this))),!this.kAi&&i>=.9999&&(this.kAi=!0,this.So(new T9(this)))},n.uD=function(){this.AAi=!0,this.SAi=!0,this.TAi=!0,this.kAi=!0},n.kn=function(){this.mn("Jnt",this.EAi),this.mn("Znt",this.xAi)},i.gAi=function(t,n){return new i(t,n.duration,n.apiFramework||"",n.creative,n.mimeType,n.width,n.height,n.companions.map(function(n){return i.gAi(t,n)}),n.extensions,n.fw_parameters,n.events,void 0)},i.pAi=function(t,n){return new i(t,n.duration,n.apiFramework||"",n.creative,n.mimeType,n.width,n.height,n.companions.map(function(n){return i.pAi(t,n)}),n.extensions,n.fw_parameters,void 0,n.ad_id)},Nt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get apiFramework(){return t.FYt},get companions(){return t.PYt.Ca},get creative(){return t.mAi},get duration(){return t.ct},get endTime(){return t.RO},get events(){return t.fQ},get extensions(){return t.DJt},get freeWheelParameters(){return t.wAi},get height(){return t.Mi},get mimeType(){return t.lQ},get startTime(){return t.CO},get width(){return t.Ti},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new vR(t,n),n}(this)),this.hu}},{key:"CO",get:function(){return this.HO}},{key:"RO",get:function(){return this.HO+this.Zb}},{key:"ct",get:function(){return this.Zb}},{key:"FYt",get:function(){return this.UYt}},{key:"mAi",get:function(){return this.yAi}},{key:"lQ",get:function(){return this.IQ}},{key:"Ti",get:function(){return this.lA}},{key:"Mi",get:function(){return this.fA}},{key:"fQ",get:function(){return this.Zf}},{key:"PYt",get:function(){return this.IYt}},{key:"DJt",get:function(){return this.NJt}},{key:"wAi",get:function(){return this.bAi}},{key:"ro",get:function(){return this.ho}},{key:"Wbi",get:function(){var t;return null!=(t=this.Zf.clickthroughs)?t:[]}}]),i}(nh);U(),Et(),Pt(),U(),Et(),Pt();var I9=function(t){function i(i){var n;return(n=t.call(this,"Xnt")||this).od=void 0,n.od=i,n}return Ct(i,t),i.prototype.xa=function(){return new R9(this.od.Ca)},i}(Aw),R9=function(t){function i(i){var n;return(n=t.call(this,"addadbreak")||this).adBreak=void 0,n.adBreak=i,n}return Ct(i,t),i}(rh);U(),Et(),Pt();var C9=function(t){function i(i){var n;return(n=t.call(this,"Gnt")||this).od=void 0,n.od=i,n}return Ct(i,t),i.prototype.xa=function(){return new P9(this.od.Ca)},i}(Aw),P9=function(t){function i(i){var n;return(n=t.call(this,"removeadbreak")||this).adBreak=void 0,n.adBreak=i,n}return Ct(i,t),i}(rh),D9=function(t){function i(){return t.call(this)||this}Ct(i,t);var n=i.prototype;return n.Jei=function(t){this.So(new I9(t))},n.isi=function(t){this.So(new C9(t))},i}(s2),N9=function(){function t(t,i,n,r){var e,s=this;this.oa=void 0,this.pbi=void 0,this.y1t=void 0,this.CAi=void 0,this.IAi=void 0,this.hu=void 0,this.NAi=void 0,this.RAi=[],this.LAi=void 0,this.FAi=function(t){return s.LAi=t,s},this.MAi=function(t){t.uE.ads&&s.Cbi(t.uE.ads),t.uE.currentBreakEnd&&s.DAi(t.uE.currentBreakEnd)},this.BAi=function(t){if(0!==s.RAi.length&&0!==s.oa.EP().length)for(var i,n=s.oa.EP().end(s.oa.EP().length-1),r=Lt(s.RAi.slice());!(i=r()).done;){var e=i.value;Li(e.mYt.ct)?Xn(s.RAi,e):e.wIte.RO&&this.y1t.pS(e)}},i.Cbi=function(t){for(var i,n=!function(t){return Li(t.breakOffsets)}(t),r=n?this.pbi.Jbi:0,e=Lt(t.breaks);!(i=e()).done;){var s=i.value;if(0!==s.ads.length){for(var u,o=s.timeOffset+r,h=new _9,a=0,c=Lt(s.ads);!(u=c()).done;){var f=u.value,v=n?E9.pAi(o,f):E9.gAi(o,f);h.gO(v),o+=v.ct,a+=v.ct}var d=s.timeOffset+r,l=n?void 0:s.duration,w=new c9(d,l,h,n,this.CAi);n&&this.RAi.push({mYt:w,wIt:d+a}),this.y1t.gO(w)}}},i.DAi=function(t){var i=this.PAi;i&&i.uAi(t+this.pbi.Jbi)},i.Dbi=function(t){this.NAi=t,this.y1t.ec.forEach(function(i){return i.fAi(t)})},i.uD=function(){var t=this.NAi,i=this.Fnt;t&&i&&i.lAi(t)&&i.uD()},i.skipAd=function(t){this.uD()},i.Obi=function(t,i){for(var n,r=[],e=Lt(this.K0t.ec);!(n=e()).done;){var s=n.value;!s.cAi&&s.CO>=t&&s.CO1e4?[4,this.kSi(t)]:[3,2];case 1:return n.sent(),this.CSi=Ui.Mg(),this.ISi=0,[3,4];case 2:return[4,Ar(1e4-i,t)];case 3:n.sent(),n.label=4;case 4:return[3,0];case 5:return[2]}})}).call(this)},i.RSi=function(t){var i=t.JOt;if(i&&this.oa.Vx&&0===this.bSi&&!this.DSi&&0!==b.floor(this.oa.EP().start(0))){var n=(this.oa.Vx.getTime()-i.getTime())/1e3,r=this.oa.Gx()-t.qOt;this.bSi=r-n}},i.kSi=function(t){return Vt(function(){var i,n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:return f.trys.push([0,3,,4]),[4,this.oa.Dx.vk({Yu:this.NSi})];case 1:return[4,f.sent().VT(t)];case 2:if(0===(i=f.sent()).avails.length)return 0!==this.TSi.length&&(this.TSi=[]),[2];if(i.avails.length===this.TSi.length&&i.avails[0].startTimeInSeconds===this.TSi[0].qOt)return this.RSi(this.TSi[0]),[2];for(n=[],r=Lt(i.avails);!(e=r()).done;){for(s=e.value,u=new stt(s.durationInSeconds,s.startTimeInSeconds,s.availProgramDateTime),o=Lt(s.ads);!(h=o()).done;)a=h.value,(c=new ett(u,R0.BZt,a.startTimeInSeconds,a.trackingEvents)).O4t(a.adId,a.width,a.height,a.durationInSeconds,[],a.skipoffset),u.C4t(c);n.push(u),this.RSi(u)}return this.TSi=mn(n,function(t,i){return t.qOt-i.qOt}),[3,4];case 3:throw lr(f.sent()),new y("Failed to poll MediaTailor tracking events");case 4:return[2]}})}).call(this)},i.BSi=function(){var t;null==(t=this.ESi)||t.Zg(),this.ESi=void 0,this.SSi=void 0,this.CSi=-1/0},i.MSi=function(){if(0!==this.TSi.length){var t=this.TSi[this.TSi.length-1],i=this.ySi();if(t.qOt+t.G0tthis.tMt)){var o;if(this.mSi===s)return;return this.wSi=s,void(null==(o=this.oa.Jc)||o.So(new GB(this.wSi)))}}var h;if(this.wSi)null==(h=this.oa.Jc)||h.So(new XB(this.wSi)),this.wSi=void 0}}},i.LSi=function(){var t=this,i=this.Lnt;if(0!==i.length){for(var n,r=[],e=Lt(i);!(n=e()).done;){var s=n.value.aYt.filter(function(i){return jn(t.OSi,i.eventType)});r=r.concat(s)}for(var u,o=Lt(r);!(u=o()).done;){var h=u.value;this.FSi(h.startTimeInSeconds)&&(h.eventType===rtt.COMPLETE&&this.USi(rtt.ENGAGED_VIEW),this.VSi(h))}}},i.HSi=function(t,i){return i.aYt.filter(function(i){return Vo(i.eventType,t)})[0]},i.USi=function(t){var i=this.Lnt;if(0!==i.length){var n=this.HSi(t,i[0]);n&&this.VSi(n)}},i.VSi=function(t){this.Dpi(t.eventType);for(var i,n=Lt(t.beaconUrls);!(i=n()).done;){var r=i.value,e={Hk:ml.GET,Yu:r,XT:"",fk:Ud.BT};0,kr(this.WSi(e))}},i.Dpi=function(t){var i,n,r=this.Lnt;switch(t){case rtt.START:i=new QB(r[r.length-1],this.oa.Gx());break;case rtt.COMPLETE:i=new KB(r[0],this.oa.Gx());break;case rtt.FIRST_QUARTILE:i=new W0(r[0],this.oa.Gx());break;case rtt.MID_POINT:i=new X0(r[0],this.oa.Gx());break;case rtt.THIRD_QUARTILE:i=new G0(r[0],this.oa.Gx())}void 0!==i&&(null==(n=this.oa.Jc)||n.So(i))},i.WSi=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.oa.Dx.vk(t)];case 1:return i.sent().dk,[2]}})}).call(this)},i.FSi=function(t){var i=this.ySi();return t>=this.tMt&&t=s.CO&&this.tMt<=s.CO+s.ct&&n.push(s)}return n}}]),t}();Wb(function(t){return function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).qSi=void 0,r.nq=void 0,r.rq=void 0,r.GSi=void 0,r}Ct(i,t);var n=i.prototype;return n.Ta=function(i){return this.qSi&&(this.qSi.kn(),this.qSi=void 0,this.OEt()),t.prototype.Ta.call(this,i)},n.drt=function(i,n){var r=this,e=function(){return t.prototype.drt};return Vt(function(){var t,s;return zt(this,function(u){switch(u.label){case 0:if(!i||!function(t){return t.sources.some(function(t){return t.integration===FA.MEDIATAILOR})}(i))return[2,e().call(r,i,n)];u.label=1;case 1:return u.trys.push([1,4,,5]),[4,this.zSi(i,n)];case 2:return t=u.sent(),this.GSi=new Y0(this),[4,e().call(r,t,n)];case 3:return u.sent(),[3,5];case 4:return s=u.sent(),this.Qq(new ld(vd.MANIFEST_LOAD_ERROR,s.message,s)),[3,5];case 5:return[2]}})}).call(this)},n.gP=function(i){var n;(null==(n=this.GSi)?void 0:n.inAdBreak)||t.prototype.gP.call(this,i)},n.Xx=function(i,n){var r;(null==(r=this.qSi)?void 0:r.mSi)||t.prototype.Xx.call(this,i,n)},n.Yx=function(){var i;return null!=(i=this.nq)?i:t.prototype.Yx.call(this)},n.Zx=function(){var i;return null!=(i=this.rq)?i:t.prototype.Zx.call(this)},n.Qq=function(t){this.nq=cg(t),this.rq=t,this.So(new yb(t))},n.OEt=function(){this.nq=void 0,this.rq=void 0},n.zSi=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:n=[],r=Lt(t.sources),c.label=1;case 1:return(e=r()).done?[3,4]:KA(s=e.value)&&(u=s).src?[4,this.XSi(u,i)]:(n.push(s),[3,3]);case 2:o=c.sent(),dr(i),h=Yu({},u,{integration:void 0,src:o}),n.push(h),c.label=3;case 3:return[3,1];case 4:return(a=Lw(t)).sources=n,[2,a]}})}).call(this)},n.XSi=function(t,i){return Vt(function(){var n,r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:if(n=this,r=t.src||"",!(e=r.match(/.+?(?=\/v1\/)/)))throw new y("Could not find MediaTailor session initialization url");return s=e[0],u=Lo(r,"?ads."),o=u?{Yu:r,fk:Ud.BT}:{Yu:r,Hk:ml.POST,XT:JSON.stringify({adsParams:t.adsParams}),fk:Ud.BT},[4,mT(function(){return n.jSi(o,i)},i)];case 1:h=v.sent();try{a=s+h.manifestUrl,u||(c=s+h.trackingUrl,f=function(t){return!!t&&/\bmpd\b/i.test(t)}(a),this.qSi=new utt(this,c,f))}catch(t){throw new y("Something went wrong parsing the MediaTailor session initialization response")}return[2,a]}})}).call(this)},n.jSi=function(t,i){return Vt(function(){return zt(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,this.Dx.vk(t)];case 1:return[4,n.sent().VT(i)];case 2:return[2,n.sent()];case 3:throw lr(n.sent()),new y("Failed to initialize MediaTailor session manifest");case 4:return[2]}})}).call(this)},n.kn=function(){var i;this.qSi&&(this.qSi.kn(),this.qSi=void 0),this.OEt(),null==(i=this.GSi)||i.destroy(),this.GSi=void 0,t.prototype.kn.call(this)},i}(t)},Vb.Snt),U(),Et(),U(),Et(),Wt(),Qt(),U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Wt(),xt(),Pt(),Qt(),U(),Et();var ott=function(t){return t[t.QSi=0]="QSi",t[t.PM=1]="PM",t[t.Yz=2]="Yz",t[t.KSi=3]="KSi",t[t.YSi=4]="YSi",t[t.JSi=5]="JSi",t[t.ma=6]="ma",t}({});U(),Et(),xt(),Pt();var htt=function(t){function i(i,n,r,e,s){var u;return void 0===s&&(s=!1),(u=t.call(this)||this).yO=pg(),u._O=new lg,u.vu=void 0,u.bO=void 0,u.I5=void 0,u.hu=void 0,u.CMt=void 0,u.We=void 0,u.vu=i,u.bO=n,u.I5=r,u.We=s,u.CMt=e,u}return Ct(i,t),i.prototype.SO=function(t){this.We=t,t?this.CMt.ZSi(this.vu):this.CMt.$Si(this.vu)},Nt(i,[{key:"YI",get:function(){}},{key:"Rt",get:function(){return this.We},set:function(t){this.SO(t)}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=tg(this)}},{key:"o",get:function(){return String(this.vu.componentTag)||"hbbtvaudiotrack"}},{key:"Lt",get:function(){return this.I5}},{key:"Th",get:function(){return this.bO}},{key:"bs",get:function(){return""}},{key:"Qk",get:function(){return this.Rt?"enabled":"disabled"},set:function(t){this.SO("enabled"===t)}},{key:"$I",get:function(){return this._O}},{key:"tC",get:function(){},set:function(t){}},{key:"JI",get:function(){return this.yO}}]),i}(th);U(),Et(),Wt(),xt(),Pt(),Ft(),Qt(),U(),Et(),Wt(),Pt(),Ft(),Qt(),U(),Et();var att=function(t){return t.qm="urn:dvb:casystemid:19219",t.zm="urn:dvb:casystemid:19156",t}({}),ctt=function(t){return t.qm="application/vnd.ms-playready.initiator+xml",t.zm="application/widevine+xml",t}({});function ftt(t,i,n){switch(t){case"urn:dvb:casystemid:19219":return function(t){return''+(null!=t?t:"")+""}(i);case"urn:dvb:casystemid:19156":if(!n)throw new y("Content URL is needed for Widevine license request");return function(t,i){return''+nZ(null!=i?i:"")+""+nZ(null!=t?t:"")+""}(i,n);default:throw new y("DRM key system is not supported")}}var vtt=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).sTi=void 0,i.hTi=void 0,i.Tu=void 0,i.aTi=void 0,i.oTi=void 0,i.nTi=function(t,n,r){var e,s;if(0!==r){var u=i.uTi(r),o=i.cTi(r),h=new ug(u,o);null==(s=i.oTi)||null==(e=s.Ky)||e.call(s,h)}else{var a,c;null==(c=i.oTi)||null==(a=c.Qy)||a.call(c,t)}},i.rTi=function(t,n,r,e){var s=i.dTi(t),u=i.lTi(t),o=new ug(s,u);i.So(new eN(o))},i}Ct(i,t);var n=i.prototype;return n.tTi=function(t){this.iTi(),this.Tu=t},n.eTi=function(t){return Vt(function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:if(!t.fq.length)return this.iTi(),[2];if(!this.Tu)throw new y("The OIPF DRM agent has to be attached to the DOM");this.sTi||(this.sTi=v.createElement("object"),this.sTi.type="application/oipfDrmAgent",this.Tu.appendChild(this.sTi),this.sTi.onDRMMessageResult=this.nTi,this.sTi.onDRMRightsError=this.rTi,this.hTi=v.createElement("object"),this.hTi.type="application/oipfCapabilities",this.Tu.appendChild(this.hTi)),n=Lt(t.fq),a.label=1;case 1:if((r=n()).done)return[3,6];if(e=r.value,s=void 0,u=void 0,o=void 0,e.xS===Io)s=att.qm,u=ctt.qm,o=ftt(att.qm,e.FW);else{if(e.xS!==Ro)return[3,5];s=att.zm,u=ctt.zm,o=ftt(att.zm,e.FW,t.rC)}a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.Bet(u,o,s)];case 3:return a.sent(),this.So(new sN),[2];case 4:return h=a.sent(),i=h,[3,5];case 5:return[3,1];case 6:return i&&this.So(new eN(i)),[2]}})}).call(this)},n.zg=function(){return this.oTi=void 0,this.Tu=void 0,t.prototype.zg.call(this)},n.Bet=function(t,i,n){var r,e;return this.oTi=new Va,this.aTi=null==(e=this.sTi)||null==(r=e.sendDRMMessage)?void 0:r.call(e,t,i,n),this.aTi||null==this.oTi.Ky||this.oTi.Ky.call(this.oTi,new ug(vd.CONTENT_PROTECTION_INTERNAL_ERROR,"No DRM message returned by OIPF DRM agent")),this.oTi.Yy},n.uTi=function(t){switch(t){case 5:return vd.CONTENT_PROTECTION_NOT_SUPPORTED;case 2:case 1:case 3:case 4:case 6:return vd.CONTENT_PROTECTION_INTERNAL_ERROR;default:return vd.CONTENT_PROTECTION_ERROR}},n.cTi=function(t){switch(t){case 2:return"The DRM agent was unable to complete the request";case 3:return"The specified MIME type is unknown for the specified DRM system";case 4:return"User consent is needed for that action";case 5:return"The specified DRM System is unknown";case 6:return"The license message has the wrong format";default:return"Unspecified error occurred"}},n.dTi=function(t){return 0===t?vd.CONTENT_PROTECTION_LICENSE_ERROR:1===t?vd.CONTENT_PROTECTION_LICENSE_INVALID:vd.CONTENT_PROTECTION_ERROR},n.lTi=function(t){switch(t){case 0:return"No license, consumption of the content is blocked";case 1:return"Invalid license, consumption of the content is blocked";case 2:return"Valid license, consumption of the content is unblocked";default:return"Unknown error occurred"}},n.iTi=function(){this.sTi&&(Zi(this.sTi),this.sTi=void 0),this.hTi&&(Zi(this.hTi),this.hTi=void 0)},n.I8=function(t,i,n){return Vt(function(){return zt(this,function(t){return[2]})})()},i}(dN);U(),Et(),Wt(),xt(),Qt(),U(),Et();var dtt=ut,ltt=function(){function t(t,i,n){this.ZS=void 0,this.PL=void 0,this.DZ=void 0,this.ZS=t,this.PL=i,this.DZ=n}var i=t.prototype;return i.IZ=function(t){return!1},i.RZ=function(t){return dtt.resolve(void 0)},i.eTi=function(t){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.DZ.eTi(this.ZS)];case 1:return t.sent(),[2]}})}).call(this)},i.zg=function(){return dtt.resolve(void 0)},Nt(t,[{key:"kP",get:function(){return EA.nL(0,this.PL.ct)}},{key:"wP",get:function(){return YT.pz},set:function(t){}},{key:"Cd",get:function(){return this.ZS}}]),t}(),wtt=function(t){function i(i,n){var r;return(r=t.call(this)||this).sc=void 0,r.Oz=void 0,r.DZ=void 0,r.ha=void 0,r.ea=void 0,r.mTi=void 0,r.Gl=void 0,r.Y9=void 0,r.J9=void 0,r.bet=void 0,r.Aet=void 0,r.aq=void 0,r.Pz=void 0,r.nq=void 0,r.RV=void 0,r.kz=void 0,r._Ti=void 0,r.pTi=void 0,r.sc=i,r.Oz=n,r.ha=new tS,r.ea=new nS,r.Gl=new Km,r.aq=void 0,r.Pz=!1,r.nq=void 0,r.RV=Dy.zL,r.kz=!0,r._Ti=void 0,r.pTi=function(){var t,i,n,e;(null==(t=r.mTi)?void 0:t.playState)&&((null==(i=r._Ti)?void 0:i.Yy)||2!==r.mTi.playState||r.vTi().catch(dn),3===r.mTi.playState&&(null==(e=r._Ti)||null==(n=e.Qy)||n.call(e,String(r.mTi.playState)),r._Ti=void 0))},r.DZ=new vtt(r),r.DZ.wn(rN,r.Rs),r.Y9=new Rb([r.Gl]),r.J9=new JD(r),r.bet=new xN,r.Aet=new Qx(r.bet.xe,r.Wu,r.nt,r.Ql,r.Ma,r.Sq),r.mTi=r.gTi(),r.vTi().catch(dn),r}Ct(i,t);var n=i.prototype;return n.Y7=function(t){this.DZ.tTi(t),this.bet.Y7(t)},n.$Z=function(t){for(var i,n=Lt(t);!(i=n()).done;){var r=i.value;if(r.Km===Iy.AV)return r}},n.V9=function(t){return ut.resolve({H9:!1})},n.Un=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:if(this.aq)throw new y("Already loaded a media source");return t.Km!==Iy.AV?[3,2]:(this.aq=new ltt(t,this,this.DZ),[4,this.aq.eTi(t)]);case 1:return i.sent(),[2,this.aq];case 2:throw new y("Unsupported media source configuration for HbbTV");case 3:return[2]}})}).call(this)},n.fTi=function(t){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.vTi()];case 1:return t.sent(),[2]}})}).call(this)},n.QP=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.vTi()];case 1:return t.sent(),[2]}})}).call(this)},n.$W=function(t){},n.hr=function(){return Vt(function(){return zt(this,function(t){return this.aq=void 0,this._Ti=void 0,[2]})}).call(this)},n.F8=function(){return Vt(function(){return zt(this,function(t){throw new p("Not supported")})})()},n.zg=function(){return Vt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.hr()];case 1:return t.sent(),this.Gl.kn(),this.Y9.kn(),this.bet.kn(),this.Aet.kn(),this.DZ.mn(rN,this.Rs),[4,this.DZ.zg()];case 2:return t.sent(),[2]}})}).call(this)},n.be=function(){this.kz=!0,this.bet.be()},n.we=function(){this.kz=!1,this.bet.we()},n.wq=function(){return!1},n.bq=function(t,i,n,r,e){throw new y("Adding native sideloaded text tracks is not supported on HbbTV")},n.G7=function(){},n.X7=function(){},n.K7=function(){},n.hP=function(){return{rO:0,hO:0,oO:0}},n.$P=function(){},n.Tq=function(t){throw new y("Adding custom text tracks is not supported on HbbTV")},n.zP=function(){},n.sI=function(t,i,n,r,e,s,u,o,h){var a=new KP(t,i,n,r,e,s,u,h,o);return this.Gl.tt(a),this.J9.tt(a),a},n.Eq=function(){for(var t,i=Lt(this.Gl.NI.slice());!(t=i()).done;){t.value.kn()}this.Gl.hr()},n.rV=function(t){this.Gl.it(t),this.J9.it(t)},n.gTi=function(){for(var t=v.getElementsByTagName("object"),i=0;i=0?n:i.length};return mn(t,function(t,i){return n(t)-n(i)})},Nt(i,[{key:"ht",get:function(){return this.PL.ht}},{key:"Fx",get:function(){return this.PL.Fx._s()}},{key:"OL",get:function(){}},{key:"Vx",get:function(){return this.PL.Vx},set:function(t){t&&this.PL.$W(t)}},{key:"bt",get:function(){return this.Ac}},{key:"zx",get:function(){return this.PL.zx},set:function(t){this.PL.Oy(t)}},{key:"dq",get:function(){return this.lq}},{key:"ct",get:function(){return this.PL.ct}},{key:"Qx",get:function(){return this.PL.Qx}},{key:"Jx",get:function(){return this.rq}},{key:"lt",get:function(){return this.nq}},{key:"$x",get:function(){}},{key:"iP",get:function(){}},{key:"sP",get:function(){return!1}},{key:"WP",get:function(){return this.PL.WP},set:function(t){this.PL.WP=t}},{key:"VP",get:function(){return this.Lz}},{key:"rP",get:function(){return Yu({},{rO:0,hO:0,oO:0,aO:0,uO:0,cO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.PL.hP())}},{key:"oP",get:function(){return this.PL.oP},set:function(t){this.PL.oP=t}},{key:"cP",get:function(){return!0}},{key:"lP",get:function(){return this.PL.lP}},{key:"vP",get:function(){return this.PL.vP},set:function(t){this.PL.vP=t}},{key:"pP",get:function(){return this.PL.pP._s()}},{key:"wP",get:function(){return this.oq},set:function(t){this.oq=t,this.aq&&(this.aq.wP=t)}},{key:"AP",get:function(){return this.PL.AP}},{key:"kP",get:function(){return this.PL.kP._s()}},{key:"xP",get:function(){return this.PL.xP}},{key:"uq",get:function(){return this.PL.uq}},{key:"nt",get:function(){return this.Gl}},{key:"DP",get:function(){return this.PL.DP}},{key:"rt",get:function(){return this.PL.rt}},{key:"MP",get:function(){return this.PL.MP}},{key:"OP",get:function(){return this.PL.OP},set:function(t){this.PL.OP=t}}]),i}(th),ptt=function(){function t(){this.tz=Ab.mW}var i=t.prototype;return i.DC=function(t,i,n,r,e,s,u,o){return new ytt(t,n,s,u)},i.Jq=function(t,i){var n;return!(!Bi.k_||t.type!==cA.pC&&!qA(t.type)&&!GA(t.type))&&!(Cr()&&!(null==(n=t.contentProtection)?void 0:n.useOipfDrmAgent)&&(!t.contentProtection||Ko()))},i.Zq=function(t){return Vt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,Np(t,!0)];case 1:return i.sent()?[2,!0]:[2,!1]}})})()},i.$q=function(){return!1},t}();return GT(new ptt),U(),Et(),c.exports}); //# sourceMappingURL=THEOplayer.chromeless.js.map \ No newline at end of file diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.common.d.ts b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.common.d.ts index fb5a3f58..4cd6fbab 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.common.d.ts +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.common.d.ts @@ -2029,7 +2029,7 @@ interface CsaiAdDescription extends AdDescription { * * @public */ -type BufferSource = ArrayBufferView | ArrayBuffer; +type BufferSource = ArrayBufferView | ArrayBuffer; /** * Describes the key system configuration. @@ -2739,10 +2739,16 @@ interface RetryConfiguration { /** * The values that can be set to define hardware resources on Sony PlayStation® 5. + * + * @category Player + * @public */ type PlayStation5PlayMode = '2K' | '4K'; /** * Describes the configuration that is specific for playback on Sony PlayStation® 5. + * + * @category Player + * @public */ interface PlayStation5Configuration { /** @@ -2934,6 +2940,7 @@ type MutedAutoplayConfiguration = 'none' | 'all' | 'content'; /** * A configuration to configure THEOlive playback. * + * @category THEOlive * @public */ interface TheoLiveConfiguration { @@ -3512,6 +3519,20 @@ interface HlsPlaybackConfiguration { delaySubtitlePreload?: boolean; } +/** + * Describes the DVR configuration for a specific source. + * + * @category Source + * @category DVR + * @internal + */ +interface SourceDVRConfiguration { + /** + * The expected length of the DVR window, in seconds. It must be larger than 60 seconds to enable DVR seeking. + */ + windowLength: number; +} + /** * Fired when a text track cue is entered. * @@ -3817,216 +3838,550 @@ interface THEOplayerError extends Error { } /** - * Fired when an error occurs. + * The events fired by a {@link Quality}. * - * @category Errors - * @category Events + * @category Media and Text Tracks * @public */ -interface ErrorEvent extends Event<'error'> { - /** - * The error that occurred. - * - * @deprecated use {@link ErrorEvent.errorObject | errorObject.message} instead - */ - error: string; +interface QualityEventMap { /** - * An error object containing additional information about the error. + * {@inheritDoc UpdateQualityEvent} */ - errorObject: THEOplayerError; + update: UpdateQualityEvent; } - /** - * An error code whose category is `ErrorCategory.SUBTITLE`. + * Fired when the quality updates. * * @category Media and Text Tracks - * @category Errors + * @category Events * @public */ -type TextTrackErrorCode = ErrorCode.SUBTITLE_LOAD_ERROR | ErrorCode.SUBTITLE_CORS_ERROR | ErrorCode.SUBTITLE_PARSE_ERROR; +interface UpdateQualityEvent extends Event<'update'> { + /** + * The quality which has been updated. + */ + readonly quality: Quality; +} /** - * An error thrown by a text track. + * Represents a quality of a media track. * * @category Media and Text Tracks - * @category Errors * @public */ -interface TextTrackError extends THEOplayerError { +interface Quality extends EventDispatcher { /** - * {@inheritDoc THEOplayerError.code} + * The average bandwidth of the quality, in bits per second. */ - readonly code: TextTrackErrorCode; + readonly averageBandwidth?: number; /** - * The URL of the (sideloaded) text track. + * The required bandwidth for the quality, in bits per second. */ - readonly url: string; + readonly bandwidth: number; /** - * The status code from the HTTP response. + * The codecs of the quality. + * + * @remarks + *
- These are represented as a string containing the codecs as defined by the manifest. */ - readonly status: number; -} - -/** - * The content type of a text track, represented by a value from the following list: - *
- `'srt'`: The track contains SRT (SubRip Text) content. - *
- `'ttml'`: The track contains TTML (Timed Text Markup Language) content. - *
- `'webvtt'`: The track contains WebVTT (Web Video Text Tracks) content. - *
- `'emsg'`: The track contains emsg (Event Message) content. - *
- `'eventstream'`: The track contains Event Stream content. - *
- `'id3'`: The track contains ID3 content. - *
- `'cea608'`: The track contains CEA608 content. - *
- `'daterange'`: The track contains HLS EXT-X-DATERANGE content. - *
- `'millicast'`: The track contains Millicast metadata content. - *
- `''`: The type of the track contents is unknown. - * - * @category Media and Text Tracks - * @public - */ -type TextTrackType = 'srt' | 'ttml' | 'webvtt' | 'emsg' | 'eventstream' | 'id3' | 'cea608' | 'daterange' | 'millicast' | ''; -/** - * The ready state of a text track, represented by a value from the following list: - *
- `0`: Indicates that the text track's cues have not been obtained. - *
- `1`: The text track is loading. Further cues might still be added to the track by the parser. - *
- `2`: The text track has been loaded with no fatal errors. - *
- `3`: An error occurred obtaining the cues for the track. Some or all of the cues are likely missing and will not be obtained. - * - * @category Media and Text Tracks - * @public - */ -type TextTrackReadyState = 0 | 1 | 2 | 3; -/** - * An error event fired by a {@link TextTrack}. - * - * @category Media and Text Tracks - * @category Errors - * @category Events - * @public - */ -interface TextTrackErrorEvent extends ErrorEvent { + readonly codecs: string; /** - * {@inheritDoc ErrorEvent.errorObject} + * The identifier for this quality. This identifier is tied to the stream's internal representation. It may be empty. For a unique id, use {@link Quality.uid}. */ - readonly errorObject: TextTrackError; -} -/** - * Fired when a cue is added to the text track. - * - * @category Media and Text Tracks - * @category Events - * @public - */ -interface TextTrackAddCueEvent extends Event<'addcue'> { + readonly id: string; /** - * The cue that is added to the text track. + * The unique identifier for this quality. */ - readonly cue: TextTrackCue; + readonly uid: number; + /** + * The name of the quality. + */ + readonly name: string; + /** + * The label of the quality. + */ + label: string; + /** + * Whether the quality is available. + * + * @remarks + *
- A quality can be unavailable due to a DRM restriction (e.g. HDCP). + */ + readonly available: boolean; + /** + * The HLS SCORE attribute. + * + * @remarks + *
- Available since v6.8.0. + *
- Only for HLS streams. + */ + readonly score: number | undefined; } /** - * Fired when a cue is removed from the text track. + * Represents a quality of a video track. * * @category Media and Text Tracks - * @category Events * @public */ -interface TextTrackRemoveCueEvent extends Event<'removecue'> { +interface VideoQuality extends Quality { /** - * The cue that is removed from the text track. + * The video height of the video quality, in pixels. */ - readonly cue: TextTrackCue; + readonly height: number; + /** + * The video width of the video quality, in pixels. + */ + readonly width: number; + /** + * The framerate of the video quality. + */ + readonly frameRate: number; + /** + * The timestamp of the first frame of the video quality, in seconds. + */ + readonly firstFrame: number; } /** - * Fired when a cue from the text track is updated. + * Represents a quality of an audio track. * * @category Media and Text Tracks - * @category Events * @public */ -interface TextTrackUpdateCueEvent extends Event<'updatecue'> { +interface AudioQuality extends Quality { /** - * The cue from the text track that is updated. + * The sampling rate of the audio quality. */ - readonly cue: TextTrackCue; + readonly audioSamplingRate: number | [number, number]; } + /** - * Fired when a cue of the text track has entered. + * List of qualities. * * @category Media and Text Tracks - * @category Events * @public */ -interface TextTrackEnterCueEvent extends Event<'entercue'> { +interface QualityList extends Array { /** - * The cue from the text track that has entered. + * Index signature to get the quality at the requested index in the list. */ - readonly cue: TextTrackCue; + [index: number]: Quality; + /** + * Return the quality at the requested index in the list. + * + * @param index - A `number` representing the index of a quality in the list. + * @returns The quality with index `index` in the list. + */ + item(index: number): Quality; } + /** - * Fired when a cue of the text track has exited. + * The type of a media track, represented by a value from the following list: + *
- `'audio'` + *
- `'video'` + *
- `'text'` + *
- `'image'` + *
- `'unknown'` * * @category Media and Text Tracks - * @category Events * @public */ -interface TextTrackExitCueEvent extends Event<'exitcue'> { - /** - * The cue from the text track that has exited. - */ - readonly cue: TextTrackCue; -} +type MediaTrackType = 'audio' | 'video' | 'text' | 'image' | 'unknown'; /** - * Fired when the displaying cues of the text track has changed. + * A quality-related event fired by a {@link MediaTrack}. * * @category Media and Text Tracks * @category Events * @public */ -interface TextTrackCueChangeEvent extends Event<'cuechange'> { +interface QualityEvent extends Event { /** - * The text track which displaying cues has changed. + * The quality. */ - readonly track: TextTrack; + readonly quality: Quality; } /** - * Fired when the {@link TextTrack.readyState | ready state} of the text track has changed. + * Fired when the media track's {@link MediaTrack.targetQuality | target quality} changes. * * @category Media and Text Tracks * @category Events * @public */ -interface TextTrackReadyStateChangeEvent extends Event<'readystatechange'> { +interface TargetQualityChangedEvent extends Event<'targetqualitychanged'> { /** - * The text track which ready state has changed. + * The new target quality. */ - readonly track: TextTrack; + readonly quality: Quality | undefined; /** - * The new {@link TextTrack.readyState | ready state} of the text track. + * The new target qualities. */ - readonly readyState: TextTrackReadyState; + readonly qualities: Quality[]; } /** - * Fired when the {@link TextTrack."type" | type} of the text track has changed. + * The events fired by a {@link MediaTrack}. * * @category Media and Text Tracks - * @category Events * @public */ -interface TextTrackTypeChangeEvent extends Event<'typechange'> { +interface MediaTrackEventMap extends TrackEventMap { /** - * The text track which type has changed. + * Fired when the media track's {@link MediaTrack.activeQuality | active quality} changes. */ - readonly track: TextTrack; + activequalitychanged: QualityEvent<'activequalitychanged'>; + /** + * Fired when the media track's {@link MediaTrack.targetQuality | target quality} changes. + */ + targetqualitychanged: TargetQualityChangedEvent; + /** + * Fired when a quality of the track becomes unavailable. + * + * @remarks + *
- A Quality can become unavailable due to a DRM restriction (e.g. HDCP). + */ + qualityunavailable: QualityEvent<'qualityunavailable'>; } /** - * The events fired by a {@link TextTrack}. + * Represents a media track (audio or video) of a media resource. * * @category Media and Text Tracks * @public */ -interface TextTrackEventMap extends TrackEventMap { +interface MediaTrack extends Track, EventDispatcher { /** - * Fired when a cue is added to the track. + * Whether the track is enabled. + * + * @remarks + *
- Only one track of the same type (e.g. video) can be enabled at the same time. + *
- Enabling a track will disable all other tracks of the same type. + *
- Disabling a track will not enable a different track of the same type. */ - addcue: TextTrackAddCueEvent; + enabled: boolean; + /** + * The identifier of the media track. + * + * @remarks + *
- This identifier can be used to distinguish between related tracks, e.g. tracks in the same list. + */ + readonly id: string; + /** + * A unique identifier of the media track. + * + * @remarks + *
- This identifier is unique across tracks of a THEOplayer instance and can be used to distinguish between tracks. + *
- This identifier is a randomly generated number. + */ + readonly uid: number; + /** + * The kind of the media track, represented by a value from the following list: + *
- `'main'`: The track is the default track for playback + *
- `'alternative'`: The track is not the default track for playback + */ + readonly kind: string; + /** + * The label of the media track. + */ + label: string; + /** + * The language of the media track. + */ + readonly language: string; + /** + * The active quality of the media track, i.e. the quality that is currently being played. + */ + readonly activeQuality: Quality | undefined; + /** + * The qualities of the media track. + */ + readonly qualities: QualityList; + /** + * One or more desired qualities of the media track. + * + * @remarks + *
- If desired qualities are present, the Adaptive Bitrate mechanism of the player will limit itself to these qualities. + *
- If one desired quality is present, the Adaptive Bitrate mechanism of the player will be disabled and the desired quality will be played back. + */ + targetQuality: Quality | Quality[] | undefined; + /** + * {@inheritDoc EventDispatcher.addEventListener} + */ + addEventListener>(type: TType | readonly TType[], listener: EventListener): void; + /** + * {@inheritDoc EventDispatcher.removeEventListener} + */ + removeEventListener>(type: TType | readonly TType[], listener: EventListener): void; +} + +/** + * Fired when an error occurs. + * + * @category Errors + * @category Events + * @public + */ +interface ErrorEvent extends Event<'error'> { + /** + * The error that occurred. + * + * @deprecated use {@link ErrorEvent.errorObject | errorObject.message} instead + */ + error: string; + /** + * An error object containing additional information about the error. + */ + errorObject: THEOplayerError; +} +/** + * Fired when a manifest cannot be loaded. + * + * @category Errors + * @category Events + * @public + */ +interface ManifestErrorEvent extends Event<'manifesterror'> { + /** + * The number of times the loading of a manifest has been tried. + */ + retryCount: number; + /** + * The HTTP status code corresponding to the network error returned by the network request. + */ + statusCode: number | undefined; + /** + * The network status message describing the error that occurred while requesting the manifest. + */ + statusMessage: string | undefined; +} +/** + * Fired when a segment cannot be loaded. + * + * @category Errors + * @category Events + * @public + */ +interface SegmentErrorEvent extends Event<'segmenterror'> { + /** + * The general error message describing the error that occurred while requesting the manifest. + */ + error: string; + /** + * The quality of the track that this segment belongs to, if available. + */ + quality: Quality | undefined; + /** + * The number of times the loading of a manifest has been tried. + */ + retryCount: number; + /** + * The time the segment starts in the stream, in seconds. + */ + segmentStartTime: number; + /** + * The HTTP status code corresponding to the network error returned by the network request. + */ + statusCode: number | undefined; + /** + * The network status message describing the error that occurred while requesting the manifest. + */ + statusMessage: string | undefined; + /** + * The track that this segment belongs to, if available. + */ + track: Track | undefined; + /** + * The type of track that this segment belongs to/ + */ + trackType: MediaTrackType; +} + +/** + * An error code whose category is `ErrorCategory.SUBTITLE`. + * + * @category Media and Text Tracks + * @category Errors + * @public + */ +type TextTrackErrorCode = ErrorCode.SUBTITLE_LOAD_ERROR | ErrorCode.SUBTITLE_CORS_ERROR | ErrorCode.SUBTITLE_PARSE_ERROR; +/** + * An error thrown by a text track. + * + * @category Media and Text Tracks + * @category Errors + * @public + */ +interface TextTrackError extends THEOplayerError { + /** + * {@inheritDoc THEOplayerError.code} + */ + readonly code: TextTrackErrorCode; + /** + * The URL of the (sideloaded) text track. + */ + readonly url: string; + /** + * The status code from the HTTP response. + */ + readonly status: number; +} + +/** + * The content type of a text track, represented by a value from the following list: + *
- `'srt'`: The track contains SRT (SubRip Text) content. + *
- `'ttml'`: The track contains TTML (Timed Text Markup Language) content. + *
- `'webvtt'`: The track contains WebVTT (Web Video Text Tracks) content. + *
- `'emsg'`: The track contains emsg (Event Message) content. + *
- `'eventstream'`: The track contains Event Stream content. + *
- `'id3'`: The track contains ID3 content. + *
- `'cea608'`: The track contains CEA608 content. + *
- `'daterange'`: The track contains HLS EXT-X-DATERANGE content. + *
- `'millicast'`: The track contains Millicast metadata content. + *
- `''`: The type of the track contents is unknown. + * + * @category Media and Text Tracks + * @public + */ +type TextTrackType = 'srt' | 'ttml' | 'webvtt' | 'emsg' | 'eventstream' | 'id3' | 'cea608' | 'daterange' | 'millicast' | ''; +/** + * The ready state of a text track, represented by a value from the following list: + *
- `0`: Indicates that the text track's cues have not been obtained. + *
- `1`: The text track is loading. Further cues might still be added to the track by the parser. + *
- `2`: The text track has been loaded with no fatal errors. + *
- `3`: An error occurred obtaining the cues for the track. Some or all of the cues are likely missing and will not be obtained. + * + * @category Media and Text Tracks + * @public + */ +type TextTrackReadyState = 0 | 1 | 2 | 3; +/** + * An error event fired by a {@link TextTrack}. + * + * @category Media and Text Tracks + * @category Errors + * @category Events + * @public + */ +interface TextTrackErrorEvent extends ErrorEvent { + /** + * {@inheritDoc ErrorEvent.errorObject} + */ + readonly errorObject: TextTrackError; +} +/** + * Fired when a cue is added to the text track. + * + * @category Media and Text Tracks + * @category Events + * @public + */ +interface TextTrackAddCueEvent extends Event<'addcue'> { + /** + * The cue that is added to the text track. + */ + readonly cue: TextTrackCue; +} +/** + * Fired when a cue is removed from the text track. + * + * @category Media and Text Tracks + * @category Events + * @public + */ +interface TextTrackRemoveCueEvent extends Event<'removecue'> { + /** + * The cue that is removed from the text track. + */ + readonly cue: TextTrackCue; +} +/** + * Fired when a cue from the text track is updated. + * + * @category Media and Text Tracks + * @category Events + * @public + */ +interface TextTrackUpdateCueEvent extends Event<'updatecue'> { + /** + * The cue from the text track that is updated. + */ + readonly cue: TextTrackCue; +} +/** + * Fired when a cue of the text track has entered. + * + * @category Media and Text Tracks + * @category Events + * @public + */ +interface TextTrackEnterCueEvent extends Event<'entercue'> { + /** + * The cue from the text track that has entered. + */ + readonly cue: TextTrackCue; +} +/** + * Fired when a cue of the text track has exited. + * + * @category Media and Text Tracks + * @category Events + * @public + */ +interface TextTrackExitCueEvent extends Event<'exitcue'> { + /** + * The cue from the text track that has exited. + */ + readonly cue: TextTrackCue; +} +/** + * Fired when the displaying cues of the text track has changed. + * + * @category Media and Text Tracks + * @category Events + * @public + */ +interface TextTrackCueChangeEvent extends Event<'cuechange'> { + /** + * The text track which displaying cues has changed. + */ + readonly track: TextTrack; +} +/** + * Fired when the {@link TextTrack.readyState | ready state} of the text track has changed. + * + * @category Media and Text Tracks + * @category Events + * @public + */ +interface TextTrackReadyStateChangeEvent extends Event<'readystatechange'> { + /** + * The text track which ready state has changed. + */ + readonly track: TextTrack; + /** + * The new {@link TextTrack.readyState | ready state} of the text track. + */ + readonly readyState: TextTrackReadyState; +} +/** + * Fired when the {@link TextTrack."type" | type} of the text track has changed. + * + * @category Media and Text Tracks + * @category Events + * @public + */ +interface TextTrackTypeChangeEvent extends Event<'typechange'> { + /** + * The text track which type has changed. + */ + readonly track: TextTrack; +} +/** + * The events fired by a {@link TextTrack}. + * + * @category Media and Text Tracks + * @public + */ +interface TextTrackEventMap extends TrackEventMap { + /** + * Fired when a cue is added to the track. + */ + addcue: TextTrackAddCueEvent; /** * Fired when a cue of the track is removed. */ @@ -4166,6 +4521,7 @@ interface TextTrack extends Track, EventDispatcher { * Represents a source for the THEOlive integration. * * @category Source + * @category THEOlive * @public */ interface TheoLiveSource extends TypedSource { @@ -4359,7 +4715,16 @@ interface SourceConfiguration { * {@inheritDoc SourceConfiguration.contentProtection} * @deprecated Superseded by {@link SourceConfiguration.contentProtection}. */ - drm?: DRMConfiguration; + drm?: DRMConfiguration; + /** + * Enables smooth DVR seeking for THEOlive and Millicast streams. + * + * THEOlive and Millicast sources normally only support live playback without DVR functionality. When enabled, this option allows the player to + * seamlessly switch to a fallback HLS or DASH source (specified in [SourceDescription.sources]) when the user seeks away from the live point. + * + * @internal + */ + dvr?: SourceDVRConfiguration; /** * The poster of the media source. * @@ -4920,435 +5285,175 @@ interface UIRelatedContentEventMap extends RelatedContentEventMap { * @remarks *
- Available since v2.14.2. * - * @category UI - * @public - */ -interface UIRelatedContent extends RelatedContent, EventDispatcher { - /** - * Whether the related content menu is showing. - */ - showing: boolean; - /** - * Show the related content menu. - */ - show(): void; - /** - * Hides the related content menu. - */ - hide(): void; - /** - * {@inheritDoc EventDispatcher.addEventListener} - */ - addEventListener>(type: TType | readonly TType[], listener: EventListener): void; - /** - * {@inheritDoc EventDispatcher.removeEventListener} - */ - removeEventListener>(type: TType | readonly TType[], listener: EventListener): void; -} -/** - * Represents a related content source. - * - * @remarks - *
- Available since v2.14.2. - * - * @category UI - * @public - */ -interface RelatedContentSource { - /** - * The duration of the related content source. - */ - duration?: string; - /** - * The image of the related content source. - */ - image: string; - /** - * The target URL for the related content source. - * - * @remarks - *
- Mutually exclusive with {@link RelatedContentSource.source}. - *
- Required if {@link RelatedContentSource.source} is not present. - */ - link?: string; - /** - * The source description of the related content source. - * - * @remarks - *
- Mutually exclusive with {@link RelatedContentSource.link}. - *
- Required if {@link RelatedContentSource.link} is not present. - */ - source?: SourceDescription; - /** - * The title of the related content source. - */ - title?: string; -} - -/** - * The bundled Video.js library, based on version 5.x. - * - * @remarks - *
- See {@link https://docs.videojs.com/ | documentation}. - * - * @category API - * @category UI - * @public - */ -declare namespace videojs { - /** - * An instance of a player UI. - * - * @remarks - *
- See {@link https://docs.videojs.com/player | documentation}. - * - * @public - */ - interface Player { - } -} - -/** - * List of tracks. - * - * @category Media and Text Tracks - * @public - */ -interface TrackList extends ReadonlyArray, EventDispatcher { - /** - * The number of tracks in the list. - */ - readonly length: number; - /** - * Return the track at the requested index in the list. - * - * @param index - A `number` representing the index of a track in the list. - * @returns The track with index `index` in the list. - */ - item(index: number): TTrack; - /** - * Index signature to get the track at the requested index in the list. - */ - readonly [index: number]: TTrack; -} - -/** - * List of text tracks. - * - * @category Media and Text Tracks - * @public - */ -interface TextTracksList extends TrackList { - /** - * The number of text tracks in the list. - */ - readonly length: number; - /** - * Return the text track at the requested index in the list. - * - * @param index - A `number` representing the index of a text track in the list. - * @returns The text track with index `index` in the list. - */ - item(index: number): TextTrack; - /** - * Index signature to get the text track at the requested index in the list. - */ - readonly [index: number]: TextTrack; -} - -/** - * The media error code, represented by a value from the following list: - *
- `1` - ABORTED: The fetching of the associated resource was aborted by the user's request. - *
- `2` - NETWORK: Some kind of network error occurred which prevented the media from being successfully fetched, despite having previously been available. - *
- `3` - DECODE: Despite having previously been determined to be usable, an error occurred while trying to decode the media resource, resulting in an error. - *
- `4` - SRC_NOT_SUPPORTED: The associated resource or media provider object (such as a MediaStream) has been found to be unsuitable. - *
- `5` - ENCRYPTED: Some kind of digital rights management error occurred. - *
- `6` - LICENSE_INVALID: The player's license was determined to be invalid. - *
- `7` - ADVERTISEMENT_ERROR: Some kind of advertisement related error occurred. - * - * @category Errors - * @public - */ -type MediaErrorCode = 1 | 2 | 3 | 4 | 5 | 6 | 7; -/** - * Thrown when a media error occurs. - * - * @category Errors - * @public - */ -interface MediaError extends Error { - /** - * The code of the error. - */ - readonly code: MediaErrorCode; - /** - * The cause of the error, if any. - */ - readonly cause?: string; - /** - * The key system specific error code, if any. - */ - readonly systemCode?: number; -} - -/** - * The events fired by a {@link Quality}. - * - * @category Media and Text Tracks - * @public - */ -interface QualityEventMap { - /** - * {@inheritDoc UpdateQualityEvent} - */ - update: UpdateQualityEvent; -} -/** - * Fired when the quality updates. - * - * @category Media and Text Tracks - * @category Events - * @public - */ -interface UpdateQualityEvent extends Event<'update'> { - /** - * The quality which has been updated. - */ - readonly quality: Quality; -} -/** - * Represents a quality of a media track. - * - * @category Media and Text Tracks - * @public - */ -interface Quality extends EventDispatcher { - /** - * The average bandwidth of the quality, in bits per second. - */ - readonly averageBandwidth?: number; - /** - * The required bandwidth for the quality, in bits per second. - */ - readonly bandwidth: number; - /** - * The codecs of the quality. - * - * @remarks - *
- These are represented as a string containing the codecs as defined by the manifest. - */ - readonly codecs: string; - /** - * The identifier for this quality. This identifier is tied to the stream's internal representation. It may be empty. For a unique id, use {@link Quality.uid}. - */ - readonly id: string; - /** - * The unique identifier for this quality. - */ - readonly uid: number; - /** - * The name of the quality. - */ - readonly name: string; - /** - * The label of the quality. - */ - label: string; - /** - * Whether the quality is available. - * - * @remarks - *
- A quality can be unavailable due to a DRM restriction (e.g. HDCP). - */ - readonly available: boolean; - /** - * The HLS SCORE attribute. - * - * @remarks - *
- Available since v6.8.0. - *
- Only for HLS streams. - */ - readonly score: number | undefined; -} -/** - * Represents a quality of a video track. - * - * @category Media and Text Tracks + * @category UI * @public */ -interface VideoQuality extends Quality { +interface UIRelatedContent extends RelatedContent, EventDispatcher { /** - * The video height of the video quality, in pixels. + * Whether the related content menu is showing. */ - readonly height: number; + showing: boolean; /** - * The video width of the video quality, in pixels. + * Show the related content menu. */ - readonly width: number; + show(): void; /** - * The framerate of the video quality. + * Hides the related content menu. */ - readonly frameRate: number; + hide(): void; /** - * The timestamp of the first frame of the video quality, in seconds. + * {@inheritDoc EventDispatcher.addEventListener} */ - readonly firstFrame: number; -} -/** - * Represents a quality of an audio track. - * - * @category Media and Text Tracks - * @public - */ -interface AudioQuality extends Quality { + addEventListener>(type: TType | readonly TType[], listener: EventListener): void; /** - * The sampling rate of the audio quality. + * {@inheritDoc EventDispatcher.removeEventListener} */ - readonly audioSamplingRate: number | [number, number]; + removeEventListener>(type: TType | readonly TType[], listener: EventListener): void; } - /** - * List of qualities. + * Represents a related content source. * - * @category Media and Text Tracks + * @remarks + *
- Available since v2.14.2. + * + * @category UI * @public */ -interface QualityList extends Array { +interface RelatedContentSource { /** - * Index signature to get the quality at the requested index in the list. + * The duration of the related content source. */ - [index: number]: Quality; + duration?: string; /** - * Return the quality at the requested index in the list. + * The image of the related content source. + */ + image: string; + /** + * The target URL for the related content source. * - * @param index - A `number` representing the index of a quality in the list. - * @returns The quality with index `index` in the list. + * @remarks + *
- Mutually exclusive with {@link RelatedContentSource.source}. + *
- Required if {@link RelatedContentSource.source} is not present. */ - item(index: number): Quality; + link?: string; + /** + * The source description of the related content source. + * + * @remarks + *
- Mutually exclusive with {@link RelatedContentSource.link}. + *
- Required if {@link RelatedContentSource.link} is not present. + */ + source?: SourceDescription; + /** + * The title of the related content source. + */ + title?: string; } /** - * A quality-related event fired by a {@link MediaTrack}. + * The bundled Video.js library, based on version 5.x. * - * @category Media and Text Tracks - * @category Events + * @remarks + *
- See {@link https://docs.videojs.com/ | documentation}. + * + * @category API + * @category UI * @public */ -interface QualityEvent extends Event { +declare namespace videojs { /** - * The quality. + * An instance of a player UI. + * + * @remarks + *
- See {@link https://docs.videojs.com/player | documentation}. + * + * @public */ - readonly quality: Quality; + interface Player { + } } + /** - * Fired when the media track's {@link MediaTrack.targetQuality | target quality} changes. + * List of tracks. * * @category Media and Text Tracks - * @category Events * @public */ -interface TargetQualityChangedEvent extends Event<'targetqualitychanged'> { +interface TrackList extends ReadonlyArray, EventDispatcher { /** - * The new target quality. + * The number of tracks in the list. */ - readonly quality: Quality | undefined; + readonly length: number; /** - * The new target qualities. + * Return the track at the requested index in the list. + * + * @param index - A `number` representing the index of a track in the list. + * @returns The track with index `index` in the list. */ - readonly qualities: Quality[]; + item(index: number): TTrack; + /** + * Index signature to get the track at the requested index in the list. + */ + readonly [index: number]: TTrack; } + /** - * The events fired by a {@link MediaTrack}. + * List of text tracks. * * @category Media and Text Tracks * @public */ -interface MediaTrackEventMap extends TrackEventMap { +interface TextTracksList extends TrackList { /** - * Fired when the media track's {@link MediaTrack.activeQuality | active quality} changes. + * The number of text tracks in the list. */ - activequalitychanged: QualityEvent<'activequalitychanged'>; + readonly length: number; /** - * Fired when the media track's {@link MediaTrack.targetQuality | target quality} changes. + * Return the text track at the requested index in the list. + * + * @param index - A `number` representing the index of a text track in the list. + * @returns The text track with index `index` in the list. */ - targetqualitychanged: TargetQualityChangedEvent; + item(index: number): TextTrack; /** - * Fired when a quality of the track becomes unavailable. - * - * @remarks - *
- A Quality can become unavailable due to a DRM restriction (e.g. HDCP). + * Index signature to get the text track at the requested index in the list. */ - qualityunavailable: QualityEvent<'qualityunavailable'>; + readonly [index: number]: TextTrack; } + /** - * Represents a media track (audio or video) of a media resource. + * The media error code, represented by a value from the following list: + *
- `1` - ABORTED: The fetching of the associated resource was aborted by the user's request. + *
- `2` - NETWORK: Some kind of network error occurred which prevented the media from being successfully fetched, despite having previously been available. + *
- `3` - DECODE: Despite having previously been determined to be usable, an error occurred while trying to decode the media resource, resulting in an error. + *
- `4` - SRC_NOT_SUPPORTED: The associated resource or media provider object (such as a MediaStream) has been found to be unsuitable. + *
- `5` - ENCRYPTED: Some kind of digital rights management error occurred. + *
- `6` - LICENSE_INVALID: The player's license was determined to be invalid. + *
- `7` - ADVERTISEMENT_ERROR: Some kind of advertisement related error occurred. * - * @category Media and Text Tracks + * @category Errors * @public */ -interface MediaTrack extends Track, EventDispatcher { - /** - * Whether the track is enabled. - * - * @remarks - *
- Only one track of the same type (e.g. video) can be enabled at the same time. - *
- Enabling a track will disable all other tracks of the same type. - *
- Disabling a track will not enable a different track of the same type. - */ - enabled: boolean; - /** - * The identifier of the media track. - * - * @remarks - *
- This identifier can be used to distinguish between related tracks, e.g. tracks in the same list. - */ - readonly id: string; - /** - * A unique identifier of the media track. - * - * @remarks - *
- This identifier is unique across tracks of a THEOplayer instance and can be used to distinguish between tracks. - *
- This identifier is a randomly generated number. - */ - readonly uid: number; - /** - * The kind of the media track, represented by a value from the following list: - *
- `'main'`: The track is the default track for playback - *
- `'alternative'`: The track is not the default track for playback - */ - readonly kind: string; - /** - * The label of the media track. - */ - label: string; - /** - * The language of the media track. - */ - readonly language: string; - /** - * The active quality of the media track, i.e. the quality that is currently being played. - */ - readonly activeQuality: Quality | undefined; - /** - * The qualities of the media track. - */ - readonly qualities: QualityList; +type MediaErrorCode = 1 | 2 | 3 | 4 | 5 | 6 | 7; +/** + * Thrown when a media error occurs. + * + * @category Errors + * @public + */ +interface MediaError extends Error { /** - * One or more desired qualities of the media track. - * - * @remarks - *
- If desired qualities are present, the Adaptive Bitrate mechanism of the player will limit itself to these qualities. - *
- If one desired quality is present, the Adaptive Bitrate mechanism of the player will be disabled and the desired quality will be played back. + * The code of the error. */ - targetQuality: Quality | Quality[] | undefined; + readonly code: MediaErrorCode; /** - * {@inheritDoc EventDispatcher.addEventListener} + * The cause of the error, if any. */ - addEventListener>(type: TType | readonly TType[], listener: EventListener): void; + readonly cause?: string; /** - * {@inheritDoc EventDispatcher.removeEventListener} + * The key system specific error code, if any. */ - removeEventListener>(type: TType | readonly TType[], listener: EventListener): void; + readonly systemCode?: number; } /** @@ -6279,6 +6384,20 @@ type ResponseInterceptor = (response: InterceptableResponse) => void | PromiseLi interface HTTPHeaders { [headerName: string]: string; } +/** + * An object that can be used to initialize a {@link HTTPHeaders}. + * + * Can be one of the following types: + *
    + *
  • A plain object or a {@link Map} mapping names to values. For example: \{ "Range": "bytes=0-100" \}
  • + *
  • An array or iterable containing [name, value] pairs. For example: [ ["Range", "bytes=0-100"] ]
  • + *
  • A native {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/Headers | Headers} object.
  • + *
+ * + * @category Network + * @public + */ +type HTTPHeadersInit = HTTPHeaders | Map | ReadonlyArray<[string, string]> | Iterable<[string, string]>; /** * The possible types of an HTTP request body. * @@ -6468,10 +6587,14 @@ interface NetworkEstimatorController { interface NetworkEventMap { /** * Fired when the manifest is online. + * + * @deprecated use {@link PlayerEventMap.manifestupdate} instead */ online: Event<'online'>; /** * Fired when the manifest is offline. + * + * @deprecated use {@link PlayerEventMap.manifesterror} instead */ offline: Event<'offline'>; } @@ -6514,7 +6637,7 @@ interface RequestInit { * * @defaultValue The original request's HTTP headers. */ - headers?: HTTPHeaders; + headers?: HTTPHeadersInit; /** * The request's body. * @@ -6585,7 +6708,7 @@ interface ResponseInit { * * @defaultValue The original response's HTTP headers. */ - headers?: HTTPHeaders; + headers?: HTTPHeadersInit; /** * The response's body. * @@ -8750,7 +8873,7 @@ interface HespApi extends EventDispatcher { * @remarks *
- Undefined if no HESP source is configured. */ - readonly manifest: Object | undefined; + readonly manifest: object | undefined; /** * Returns an overview of the latencies of different parts of the pipeline. * @@ -9304,6 +9427,7 @@ interface TimeRanges { /** * Fired when the loading of a THEOlive distribution starts. * + * @category THEOlive * @public */ interface DistributionLoadStartEvent extends Event<'distributionloadstart'> { @@ -9313,6 +9437,7 @@ interface DistributionLoadStartEvent extends Event<'distributionloadstart'> { * Fired when the loading of a THEOlive endpoint is complete and playback can start. This event is dispatched on every endpoint load, when an error * is encountered and the player recovers by choosing a new one. * + * @category THEOlive * @public */ interface EndpointLoadedEvent extends Event<'endpointloaded'> { @@ -9324,6 +9449,7 @@ interface EndpointLoadedEvent extends Event<'endpointloaded'> { /** * Fired when loading a THEOlive distribution that cannot be played, for example because the publication is stopped or is still starting up. * + * @category THEOlive * @public */ interface DistributionOfflineEvent extends Event<'distributionoffline'> { @@ -9333,6 +9459,7 @@ interface DistributionOfflineEvent extends Event<'distributionoffline'> { * Fired when the player cannot play the current primary publication and would like to fallback. If a fallback has been configured it will fallback, * otherwise only the event is fired. * + * @category THEOlive * @public */ interface IntentToFallbackEvent extends Event<'intenttofallback'> { @@ -9344,6 +9471,7 @@ interface IntentToFallbackEvent extends Event<'intenttofallback'> { /** * Fired when the player enters bad network mode. * + * @category THEOlive * @public */ interface EnterBadNetworkModeEvent extends Event<'enterbadnetworkmode'> { @@ -9351,13 +9479,15 @@ interface EnterBadNetworkModeEvent extends Event<'enterbadnetworkmode'> { /** * Fired when the player exits bad network mode. * + * @category THEOlive * @public */ interface ExitBadNetworkModeEvent extends Event<'exitbadnetworkmode'> { } /** - * A collection of events dispatched by the THEOlive api. + * The events fired by the {@link TheoLiveApi}. * + * @category THEOlive * @public */ interface TheoLiveApiEventMap { @@ -9371,6 +9501,7 @@ interface TheoLiveApiEventMap { /** * A THEOlive publication. * + * @category THEOlive * @public */ interface TheoLivePublication { @@ -9379,6 +9510,7 @@ interface TheoLivePublication { /** * The THEOlive api. * + * @category THEOlive * @public */ interface TheoLiveApi extends EventDispatcher { @@ -9389,16 +9521,35 @@ interface TheoLiveApi extends EventDispatcher { authToken: string | undefined; preloadPublications(publicationIds: string[]): Promise; } +/** + * A THEOlive endpoint. + * + * @category THEOlive + * @public + */ interface Endpoint { hespSrc?: string; hlsSrc?: string; + millicastSrc?: ChannelMillicastSource; adSrc?: string; daiAssetKey?: string; cdn?: string; weight: number; priority: number; contentProtection?: ChannelDrmConfigResponse; + dvrWindow?: number; +} +interface ChannelMillicastSource { + accountId: string; + name: string; + subscriberToken?: string; } +/** + * The DRM configuration of a THEOlive endpoint. + * + * @category THEOlive + * @public + */ interface ChannelDrmConfigResponse { integration: string; widevine?: { @@ -9765,7 +9916,10 @@ interface Interstitial { adTagParameters: Record; } /** - * The layout of the THEOad. + * The layout of a THEOads {@link AdBreakInterstitial}. + * + * @category THEOads + * @public */ type TheoAdsLayout = 'single' | 'l-shape' | 'double'; /** @@ -9849,14 +10003,27 @@ interface OverlaySize { * See the {@link https://millicast.github.io/millicast-sdk/global.html#ConnectionStats | Millicast SDK API reference} for details on the * connection stats included in the event. * + * @category Millicast * @public */ interface MillicastStatsEvent extends Event<'stats'> { stats: Record; } +/** + * The events fired by the {@link Millicast} API. + * + * @category Millicast + * @public + */ interface MillicastEventMap { stats: MillicastStatsEvent; } +/** + * The Millicast API. + * + * @category Millicast + * @public + */ interface Millicast extends EventDispatcher { /** * Returns diagnostics information about the Millicast connection and environment, formatted according to the specified parameters. @@ -10013,12 +10180,21 @@ interface PlayerEventMap { */ manifestupdate: Event<'manifestupdate'>; /** - * Fired when a segment can not be found. + * Fired when the manifest cannot be loaded or parsed. + */ + manifesterror: Event<'manifesterror'>; + /** + * Fired when a segment cannot be found. * * @remarks *
- Only fired on DASH streams. + * @deprecated use {@link PlayerEventMap.segmenterror} instead */ segmentnotfound: Event<'segmentnotfound'>; + /** + * Fired when a segment cannot be found. + */ + segmenterror: Event<'segmenterror'>; /** * Fired when the player encounters key system initialization data in the media data. * @@ -13681,4 +13857,4 @@ declare function registerContentProtectionIntegration(integrationId: string, key */ declare const utils: CommonUtils; -export { ABRConfiguration, ABRMetadata, ABRStrategy, ABRStrategyConfiguration, ABRStrategyType, AES128KeySystemConfiguration, AccessibilityRole, Ad, AdBreak, AdBreakEvent, AdBreakInit, AdBreakInterstitial, AdBufferingEvent, AdDescription, AdEvent, AdInit, AdIntegrationKind, AdMetadataEvent, AdPreloadType, AdReadyState, AdSkipEvent, AdSource, AdSourceType, AdType, AddCachingTaskEvent, AddTrackEvent, AddViewEvent, Ads, AdsConfiguration, AdsEventMap, AdsManagerLoadedEvent, AgamaAnalyticsIntegrationID, AgamaConfiguration, AgamaLogLevelType, AgamaPlayerConfiguration, AgamaServiceName, AgamaSourceConfiguration, AgamaStreamType, AirPlay, AnalyticsDescription, AnalyticsIntegrationID, AudioQuality, AxinomDRMConfiguration, AxinomIntegrationID, AzureDRMConfiguration, AzureIntegrationID, Base64Util, BaseSource, Boundary, BoundaryC3, BoundaryC7, BoundaryHalftime, BoundaryInfo, BufferSource, BufferedSegments, Cache, CacheEventMap, CacheStatus, CacheTaskStatus, CachingTask, CachingTaskEventMap, CachingTaskLicense, CachingTaskList, CachingTaskListEventMap, CachingTaskParameters, CanPlayEvent, CanPlayThroughEvent, Canvas, Cast, CastConfiguration, CastEventMap, CastState, CastStateChangeEvent, CertificateRequest, CertificateResponse, ChannelDrmConfigResponse, Chromecast, ChromecastConfiguration, ChromecastConnectionCallback, ChromecastError, ChromecastErrorCode, ChromecastErrorEvent, ChromecastEventMap, ChromecastMetadataDescription, ChromecastMetadataImage, ChromecastMetadataType, ChromelessPlayer, ClearkeyDecryptionKey, ClearkeyKeySystemConfiguration, Clip, ClipEventMap, ClosedCaptionFile, ComcastDRMConfiguration, ComcastIntegrationID, CommonUtils, CompanionAd, ConaxDRMConfiguration, ConaxIntegrationID, ContentProtectionError, ContentProtectionErrorCode, ContentProtectionErrorEvent, ContentProtectionIntegration, ContentProtectionIntegrationFactory, ContentProtectionRequest, ContentProtectionRequestSubType, ContentProtectionResponse, CrossOriginSetting, CsaiAdDescription, CurrentSourceChangeEvent, CustomAdIntegrationKind, CustomTextTrackMap, CustomTextTrackOptions, CustomWebVTTTextTrack, DAIAvailabilityType, DRMConfiguration, DRMTodayDRMConfiguration, DRMTodayIntegrationID, DashPlaybackConfiguration, DateRangeCue, DeliveryType, DeviceBasedTitaniumDRMConfiguration, DimensionChangeEvent, DirectionChangeEvent, DistributionLoadStartEvent, DistributionOfflineEvent, DurationChangeEvent, EdgeStyle, EmptiedEvent, EmsgCue, EncryptedEvent, EndedEvent, Endpoint, EndpointLoadedEvent, EnterBadNetworkModeEvent, ErrorCategory, ErrorCode, ErrorEvent, Event, EventDispatcher, EventListener, EventMap, EventStreamCue, EventedList, ExitBadNetworkModeEvent, ExpressPlayDRMConfiguration, ExpressPlayIntegrationID, EzdrmDRMConfiguration, EzdrmIntegrationID, FairPlayKeySystemConfiguration, FreeWheelAdDescription, FreeWheelAdUnitType, FreeWheelCue, FullscreenOptions$1 as FullscreenOptions, Geo, GlobalCast, GlobalChromecast, GoogleDAI, GoogleDAIConfiguration, GoogleDAILiveConfiguration, GoogleDAISSAIIntegrationID, GoogleDAITypedSource, GoogleDAIVodConfiguration, GoogleImaAd, GoogleImaConfiguration, HTTPHeaders, HespApi, HespApiEventMap, HespMediaType, HespSourceConfiguration, HespTypedSource, HlsDiscontinuityAlignment, HlsPlaybackConfiguration, ID3AttachedPicture, ID3BaseFrame, ID3Comments, ID3CommercialFrame, ID3Cue, ID3Frame, ID3GenericEncapsulatedObject, ID3InvolvedPeopleList, ID3PositionSynchronisationFrame, ID3PrivateFrame, ID3SynchronizedLyricsText, ID3TermsOfUse, ID3Text, ID3UniqueFileIdentifier, ID3Unknown, ID3UnsynchronisedLyricsTextTranscription, ID3UrlLink, ID3UserDefinedText, ID3UserDefinedUrlLink, ID3Yospace, IMAAdDescription, IntentToFallbackEvent, InterceptableRequest, InterceptableResponse, Interstitial, InterstitialEvent, InterstitialType, IrdetoDRMConfiguration, IrdetoIntegrationID, JoinStrategy, KeyOSDRMConfiguration, KeyOSFairplayKeySystemConfiguration, KeyOSIntegrationID, KeyOSKeySystemConfiguration, KeySystemConfiguration, KeySystemId, Latencies, LatencyConfiguration, LatencyManager, LayoutChangeEvent, LicenseRequest, LicenseResponse, LicenseType, LinearAd, List, LoadedDataEvent, LoadedMetadataEvent, MaybeAsync, MeasurableNetworkEstimator, MediaError, MediaErrorCode, MediaFile, MediaMelonConfiguration, MediaTailorSource, MediaTrack, MediaTrackEventMap, MediaTrackList, MediaType, MetadataDescription, Metrics, Millicast, MillicastEventMap, MillicastMetadataCue, MillicastSource, MillicastStatsEvent, MoatAnalyticsIntegrationID, MoatConfiguration, MultiViewPlayer, MultiViewPlayerEventMap, MultiViewPlayerLayout, MutedAutoplayConfiguration, Network, NetworkEstimator, NetworkEstimatorController, NetworkEventMap, NetworkInterceptorController, NodeStyleVoidCallback, NonLinearAd, OverlayInterstitial, OverlayPosition, OverlaySize, PauseEvent, PiPConfiguration, PiPPosition, PlayEvent, PlayReadyKeySystemConfiguration, PlayStation5Configuration, PlayStation5PlayMode, PlayerConfiguration, PlayerEventMap, PlayerList, PlayingEvent, PreloadType, Presentation, PresentationEventMap, PresentationMode, PresentationModeChangeEvent, ProgressEvent, Quality, QualityEvent, QualityEventMap, QualityList, RateChangeEvent, ReadyStateChangeEvent, RelatedChangeEvent, RelatedContent, RelatedContentEventMap, RelatedContentSource, RelatedHideEvent, RelatedShowEvent, RemoveCachingTaskEvent, RemoveTrackEvent, RemoveViewEvent, Representation, RepresentationChangeEvent, Request, RequestBody, RequestInit, RequestInterceptor, RequestLike, RequestMeasurer, RequestMethod, RequestSubType, RequestType, ResponseBody, ResponseInit, ResponseInterceptor, ResponseLike, ResponseType, RetryConfiguration, SSAIIntegrationId, SeamlessPeriodSwitchStrategy, SeamlessSwitchStrategy, SeekedEvent, SeekingEvent, ServerSideAdInsertionConfiguration, ServerSideAdIntegrationController, ServerSideAdIntegrationFactory, ServerSideAdIntegrationHandler, SkippedAdStrategy, SmartSightConfiguration, SmartSightIntegrationID, Source, SourceAbrConfiguration, SourceChangeEvent, SourceConfiguration, SourceDescription, SourceIntegrationId, SourceLatencyConfiguration, Sources, SpotXAdDescription, SpotxData, SpotxQueryParameter, StateChangeEvent, StereoChangeEvent, StreamOneAnalyticsIntegrationID, StreamOneConfiguration, StreamType, StringKeyOf, StylePropertyRecord, SupportedCustomTextTrackCueTypes, THEOplayerError, TTMLCue, TTMLExtent, TargetQualityChangedEvent, TextTrack, TextTrackAddCueEvent, TextTrackCue, TextTrackCueChangeEvent, TextTrackCueEnterEvent, TextTrackCueEventMap, TextTrackCueExitEvent, TextTrackCueList, TextTrackCueUpdateEvent, TextTrackDescription, TextTrackEnterCueEvent, TextTrackError, TextTrackErrorCode, TextTrackErrorEvent, TextTrackEventMap, TextTrackExitCueEvent, TextTrackReadyState, TextTrackReadyStateChangeEvent, TextTrackRemoveCueEvent, TextTrackStyle, TextTrackStyleEventMap, TextTrackType, TextTrackTypeChangeEvent, TextTrackUpdateCueEvent, TextTracksList, TheoAdDescription, TheoAds, TheoAdsEventsMap, TheoAdsLayout, TheoAdsLayoutOverride, TheoLiveApi, TheoLiveApiEventMap, TheoLiveConfiguration, TheoLivePublication, TheoLiveSource, ThumbnailResolution, TimeRanges, TimeUpdateEvent, TitaniumDRMConfiguration, TitaniumIntegrationID, TokenBasedTitaniumDRMConfiguration, Track, TrackChangeEvent, TrackEventMap, TrackList, TrackListEventMap, TrackUpdateEvent, TypedSource, UIConfiguration, UILanguage, UIPlayerConfiguration, UIRelatedContent, UIRelatedContentEventMap, UniversalAdId, UpdateQualityEvent, Uplynk, UplynkAd, UplynkAdBeginEvent, UplynkAdBreak, UplynkAdBreakBeginEvent, UplynkAdBreakEndEvent, UplynkAdBreakEventMap, UplynkAdBreakList, UplynkAdBreakListEventMap, UplynkAdBreakSkipEvent, UplynkAdCompleteEvent, UplynkAdEndEvent, UplynkAdEventMap, UplynkAdFirstQuartileEvent, UplynkAdList, UplynkAdListEventMap, UplynkAdMidpointEvent, UplynkAdThirdQuartileEvent, UplynkAddAdBreakEvent, UplynkAddAssetEvent, UplynkAds, UplynkAsset, UplynkAssetEventMap, UplynkAssetId, UplynkAssetInfoResponse, UplynkAssetInfoResponseEvent, UplynkAssetList, UplynkAssetMovieRating, UplynkAssetTvRating, UplynkAssetType, UplynkConfiguration, UplynkDRMConfiguration, UplynkEventMap, UplynkExternalId, UplynkIntegrationID, UplynkPingConfiguration, UplynkPingErrorEvent, UplynkPingResponse, UplynkPingResponseEvent, UplynkPreplayBaseResponse, UplynkPreplayLiveResponse, UplynkPreplayResponse, UplynkPreplayResponseEvent, UplynkPreplayResponseType, UplynkPreplayVodResponse, UplynkRemoveAdBreakEvent, UplynkRemoveAdEvent, UplynkRemoveAssetEvent, UplynkResponseDrm, UplynkResponseLiveAd, UplynkResponseLiveAdBreak, UplynkResponseLiveAds, UplynkResponseVodAd, UplynkResponseVodAdBreak, UplynkResponseVodAdBreakOffset, UplynkResponseVodAdPlaceholder, UplynkResponseVodAds, UplynkSource, UplynkUiConfiguration, UplynkUpdateAdBreakEvent, UserActions, VPAIDMode, VR, VRConfiguration, VRDirection, VREventMap, VRPanoramaMode, VRState, VRStereoMode, VTTAlignSetting, VTTDirectionSetting, VTTLine, VTTLineAlignSetting, VTTPosition, VTTPositionAlignSetting, VTTScrollSetting, VastExtension, VendorCast, VendorCastEventMap, VerimatrixDRMConfiguration, VerimatrixIntegrationID, VideoFrameCallbackMetadata, VideoFrameRequestCallback, VideoQuality, View, ViewChangeEvent, ViewPositionChangeEvent, VimondDRMConfiguration, VimondIntegrationID, Visibility, VisibilityObserver, VisibilityObserverCallback, VoidPromiseCallback, VolumeChangeEvent, VudrmDRMConfiguration, VudrmIntegrationID, WaitUntilCallback, WaitingEvent, WebAudio, WebVTTCue, WebVTTRegion, WidevineKeySystemConfiguration, XstreamDRMConfiguration, XstreamIntegrationID, YospaceId, YouboraAnalyticsIntegrationID, YouboraOptions, cache, cast, features, players, registerContentProtectionIntegration, utils, version, videojs }; +export { ABRConfiguration, ABRMetadata, ABRStrategy, ABRStrategyConfiguration, ABRStrategyType, AES128KeySystemConfiguration, AccessibilityRole, Ad, AdBreak, AdBreakEvent, AdBreakInit, AdBreakInterstitial, AdBufferingEvent, AdDescription, AdEvent, AdInit, AdIntegrationKind, AdMetadataEvent, AdPreloadType, AdReadyState, AdSkipEvent, AdSource, AdSourceType, AdType, AddCachingTaskEvent, AddTrackEvent, AddViewEvent, Ads, AdsConfiguration, AdsEventMap, AdsManagerLoadedEvent, AgamaAnalyticsIntegrationID, AgamaConfiguration, AgamaLogLevelType, AgamaPlayerConfiguration, AgamaServiceName, AgamaSourceConfiguration, AgamaStreamType, AirPlay, AnalyticsDescription, AnalyticsIntegrationID, AudioQuality, AxinomDRMConfiguration, AxinomIntegrationID, AzureDRMConfiguration, AzureIntegrationID, Base64Util, BaseSource, Boundary, BoundaryC3, BoundaryC7, BoundaryHalftime, BoundaryInfo, BufferSource, BufferedSegments, Cache, CacheEventMap, CacheStatus, CacheTaskStatus, CachingTask, CachingTaskEventMap, CachingTaskLicense, CachingTaskList, CachingTaskListEventMap, CachingTaskParameters, CanPlayEvent, CanPlayThroughEvent, Canvas, Cast, CastConfiguration, CastEventMap, CastState, CastStateChangeEvent, CertificateRequest, CertificateResponse, ChannelDrmConfigResponse, ChannelMillicastSource, Chromecast, ChromecastConfiguration, ChromecastConnectionCallback, ChromecastError, ChromecastErrorCode, ChromecastErrorEvent, ChromecastEventMap, ChromecastMetadataDescription, ChromecastMetadataImage, ChromecastMetadataType, ChromelessPlayer, ClearkeyDecryptionKey, ClearkeyKeySystemConfiguration, Clip, ClipEventMap, ClosedCaptionFile, ComcastDRMConfiguration, ComcastIntegrationID, CommonUtils, CompanionAd, ConaxDRMConfiguration, ConaxIntegrationID, ContentProtectionError, ContentProtectionErrorCode, ContentProtectionErrorEvent, ContentProtectionIntegration, ContentProtectionIntegrationFactory, ContentProtectionRequest, ContentProtectionRequestSubType, ContentProtectionResponse, CrossOriginSetting, CsaiAdDescription, CurrentSourceChangeEvent, CustomAdIntegrationKind, CustomTextTrackMap, CustomTextTrackOptions, CustomWebVTTTextTrack, DAIAvailabilityType, DRMConfiguration, DRMTodayDRMConfiguration, DRMTodayIntegrationID, DashPlaybackConfiguration, DateRangeCue, DeliveryType, DeviceBasedTitaniumDRMConfiguration, DimensionChangeEvent, DirectionChangeEvent, DistributionLoadStartEvent, DistributionOfflineEvent, DurationChangeEvent, EdgeStyle, EmptiedEvent, EmsgCue, EncryptedEvent, EndedEvent, Endpoint, EndpointLoadedEvent, EnterBadNetworkModeEvent, ErrorCategory, ErrorCode, ErrorEvent, Event, EventDispatcher, EventListener, EventMap, EventStreamCue, EventedList, ExitBadNetworkModeEvent, ExpressPlayDRMConfiguration, ExpressPlayIntegrationID, EzdrmDRMConfiguration, EzdrmIntegrationID, FairPlayKeySystemConfiguration, FreeWheelAdDescription, FreeWheelAdUnitType, FreeWheelCue, FullscreenOptions$1 as FullscreenOptions, Geo, GlobalCast, GlobalChromecast, GoogleDAI, GoogleDAIConfiguration, GoogleDAILiveConfiguration, GoogleDAISSAIIntegrationID, GoogleDAITypedSource, GoogleDAIVodConfiguration, GoogleImaAd, GoogleImaConfiguration, HTTPHeaders, HTTPHeadersInit, HespApi, HespApiEventMap, HespMediaType, HespSourceConfiguration, HespTypedSource, HlsDiscontinuityAlignment, HlsPlaybackConfiguration, ID3AttachedPicture, ID3BaseFrame, ID3Comments, ID3CommercialFrame, ID3Cue, ID3Frame, ID3GenericEncapsulatedObject, ID3InvolvedPeopleList, ID3PositionSynchronisationFrame, ID3PrivateFrame, ID3SynchronizedLyricsText, ID3TermsOfUse, ID3Text, ID3UniqueFileIdentifier, ID3Unknown, ID3UnsynchronisedLyricsTextTranscription, ID3UrlLink, ID3UserDefinedText, ID3UserDefinedUrlLink, ID3Yospace, IMAAdDescription, IntentToFallbackEvent, InterceptableRequest, InterceptableResponse, Interstitial, InterstitialEvent, InterstitialType, IrdetoDRMConfiguration, IrdetoIntegrationID, JoinStrategy, KeyOSDRMConfiguration, KeyOSFairplayKeySystemConfiguration, KeyOSIntegrationID, KeyOSKeySystemConfiguration, KeySystemConfiguration, KeySystemId, Latencies, LatencyConfiguration, LatencyManager, LayoutChangeEvent, LicenseRequest, LicenseResponse, LicenseType, LinearAd, List, LoadedDataEvent, LoadedMetadataEvent, ManifestErrorEvent, MaybeAsync, MeasurableNetworkEstimator, MediaError, MediaErrorCode, MediaFile, MediaMelonConfiguration, MediaTailorSource, MediaTrack, MediaTrackEventMap, MediaTrackList, MediaTrackType, MediaType, MetadataDescription, Metrics, Millicast, MillicastEventMap, MillicastMetadataCue, MillicastSource, MillicastStatsEvent, MoatAnalyticsIntegrationID, MoatConfiguration, MultiViewPlayer, MultiViewPlayerEventMap, MultiViewPlayerLayout, MutedAutoplayConfiguration, Network, NetworkEstimator, NetworkEstimatorController, NetworkEventMap, NetworkInterceptorController, NodeStyleVoidCallback, NonLinearAd, OverlayInterstitial, OverlayPosition, OverlaySize, PauseEvent, PiPConfiguration, PiPPosition, PlayEvent, PlayReadyKeySystemConfiguration, PlayStation5Configuration, PlayStation5PlayMode, PlayerConfiguration, PlayerEventMap, PlayerList, PlayingEvent, PreloadType, Presentation, PresentationEventMap, PresentationMode, PresentationModeChangeEvent, ProgressEvent, Quality, QualityEvent, QualityEventMap, QualityList, RateChangeEvent, ReadyStateChangeEvent, RelatedChangeEvent, RelatedContent, RelatedContentEventMap, RelatedContentSource, RelatedHideEvent, RelatedShowEvent, RemoveCachingTaskEvent, RemoveTrackEvent, RemoveViewEvent, Representation, RepresentationChangeEvent, Request, RequestBody, RequestInit, RequestInterceptor, RequestLike, RequestMeasurer, RequestMethod, RequestSubType, RequestType, ResponseBody, ResponseInit, ResponseInterceptor, ResponseLike, ResponseType, RetryConfiguration, SSAIIntegrationId, SeamlessPeriodSwitchStrategy, SeamlessSwitchStrategy, SeekedEvent, SeekingEvent, SegmentErrorEvent, ServerSideAdInsertionConfiguration, ServerSideAdIntegrationController, ServerSideAdIntegrationFactory, ServerSideAdIntegrationHandler, SkippedAdStrategy, SmartSightConfiguration, SmartSightIntegrationID, Source, SourceAbrConfiguration, SourceChangeEvent, SourceConfiguration, SourceDescription, SourceIntegrationId, SourceLatencyConfiguration, Sources, SpotXAdDescription, SpotxData, SpotxQueryParameter, StateChangeEvent, StereoChangeEvent, StreamOneAnalyticsIntegrationID, StreamOneConfiguration, StreamType, StringKeyOf, StylePropertyRecord, SupportedCustomTextTrackCueTypes, THEOplayerError, TTMLCue, TTMLExtent, TargetQualityChangedEvent, TextTrack, TextTrackAddCueEvent, TextTrackCue, TextTrackCueChangeEvent, TextTrackCueEnterEvent, TextTrackCueEventMap, TextTrackCueExitEvent, TextTrackCueList, TextTrackCueUpdateEvent, TextTrackDescription, TextTrackEnterCueEvent, TextTrackError, TextTrackErrorCode, TextTrackErrorEvent, TextTrackEventMap, TextTrackExitCueEvent, TextTrackReadyState, TextTrackReadyStateChangeEvent, TextTrackRemoveCueEvent, TextTrackStyle, TextTrackStyleEventMap, TextTrackType, TextTrackTypeChangeEvent, TextTrackUpdateCueEvent, TextTracksList, TheoAdDescription, TheoAds, TheoAdsEventsMap, TheoAdsLayout, TheoAdsLayoutOverride, TheoLiveApi, TheoLiveApiEventMap, TheoLiveConfiguration, TheoLivePublication, TheoLiveSource, ThumbnailResolution, TimeRanges, TimeUpdateEvent, TitaniumDRMConfiguration, TitaniumIntegrationID, TokenBasedTitaniumDRMConfiguration, Track, TrackChangeEvent, TrackEventMap, TrackList, TrackListEventMap, TrackUpdateEvent, TypedSource, UIConfiguration, UILanguage, UIPlayerConfiguration, UIRelatedContent, UIRelatedContentEventMap, UniversalAdId, UpdateQualityEvent, Uplynk, UplynkAd, UplynkAdBeginEvent, UplynkAdBreak, UplynkAdBreakBeginEvent, UplynkAdBreakEndEvent, UplynkAdBreakEventMap, UplynkAdBreakList, UplynkAdBreakListEventMap, UplynkAdBreakSkipEvent, UplynkAdCompleteEvent, UplynkAdEndEvent, UplynkAdEventMap, UplynkAdFirstQuartileEvent, UplynkAdList, UplynkAdListEventMap, UplynkAdMidpointEvent, UplynkAdThirdQuartileEvent, UplynkAddAdBreakEvent, UplynkAddAssetEvent, UplynkAds, UplynkAsset, UplynkAssetEventMap, UplynkAssetId, UplynkAssetInfoResponse, UplynkAssetInfoResponseEvent, UplynkAssetList, UplynkAssetMovieRating, UplynkAssetTvRating, UplynkAssetType, UplynkConfiguration, UplynkDRMConfiguration, UplynkEventMap, UplynkExternalId, UplynkIntegrationID, UplynkPingConfiguration, UplynkPingErrorEvent, UplynkPingResponse, UplynkPingResponseEvent, UplynkPreplayBaseResponse, UplynkPreplayLiveResponse, UplynkPreplayResponse, UplynkPreplayResponseEvent, UplynkPreplayResponseType, UplynkPreplayVodResponse, UplynkRemoveAdBreakEvent, UplynkRemoveAdEvent, UplynkRemoveAssetEvent, UplynkResponseDrm, UplynkResponseLiveAd, UplynkResponseLiveAdBreak, UplynkResponseLiveAds, UplynkResponseVodAd, UplynkResponseVodAdBreak, UplynkResponseVodAdBreakOffset, UplynkResponseVodAdPlaceholder, UplynkResponseVodAds, UplynkSource, UplynkUiConfiguration, UplynkUpdateAdBreakEvent, UserActions, VPAIDMode, VR, VRConfiguration, VRDirection, VREventMap, VRPanoramaMode, VRState, VRStereoMode, VTTAlignSetting, VTTDirectionSetting, VTTLine, VTTLineAlignSetting, VTTPosition, VTTPositionAlignSetting, VTTScrollSetting, VastExtension, VendorCast, VendorCastEventMap, VerimatrixDRMConfiguration, VerimatrixIntegrationID, VideoFrameCallbackMetadata, VideoFrameRequestCallback, VideoQuality, View, ViewChangeEvent, ViewPositionChangeEvent, VimondDRMConfiguration, VimondIntegrationID, Visibility, VisibilityObserver, VisibilityObserverCallback, VoidPromiseCallback, VolumeChangeEvent, VudrmDRMConfiguration, VudrmIntegrationID, WaitUntilCallback, WaitingEvent, WebAudio, WebVTTCue, WebVTTRegion, WidevineKeySystemConfiguration, XstreamDRMConfiguration, XstreamIntegrationID, YospaceId, YouboraAnalyticsIntegrationID, YouboraOptions, cache, cast, features, players, registerContentProtectionIntegration, utils, version, videojs }; diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.common.esm.js b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.common.esm.js index f0c68e34..65c59385 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.common.esm.js +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.common.esm.js @@ -34,8 +34,8 @@ THEOplayer is based on patented technology developed by THEO Technologies (https://www.theoplayer.com). - Version: 10.0.0 - Created: 2025-09-12T12:50:32.290Z + Version: 10.3.0 + Created: 2025-10-23T15:33:11.023Z */ -var Io,td,f,Nt,id,ed,sd,nd,y,rd,a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window,h=a.document,hd=a.location,od=a.navigator,u=a.setTimeout,c=a.clearTimeout,v=a.setInterval,p=a.clearInterval,m=a.Error,g=a.TypeError,w=(a.SyntaxError,a.Object),_=a.Math,x=a.parseInt,C=a.parseFloat,S=a.isNaN,j=a.Uint8Array,ad=a.Worker,ud=(a.WorkerGlobalScope,a.XMLHttpRequest),cd=w.create,dd=w.defineProperty,ld=w.getOwnPropertyDescriptor,fd=w.getOwnPropertyNames,vd=w.getPrototypeOf,_d=w.prototype.hasOwnProperty,Qn=(t,i)=>()=>(i||t((i={exports:{}}).exports,i),i.exports),sn=(t,i,e)=>(e=null!=t?cd(vd(t)):{},((t,i,e,s)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let n of fd(i))_d.call(t,n)||n===e||dd(t,n,{get:()=>i[n],enumerable:!(s=ld(i,n))||s.enumerable});return t})(!i&&t&&t.__esModule?e:dd(e,"default",{value:t,enumerable:!0}),t)),r=(y=()=>{"use strict";if("function"==typeof Symbol&&Symbol.iterator)Io=Symbol,td=null!=(ed=Symbol.for)?ed:Symbol,f=Symbol.iterator,Nt=null!=(sd=Symbol.dispose)?sd:td("Symbol.dispose"),id=null!=(nd=Symbol.asyncDispose)?nd:td("Symbol.asyncDispose");else{let t=0;Io=function(i){return"hd"+i+"_"+ ++t},f=(td=function(t){return"hd"+t})("Symbol.iterator"),Nt=td("Symbol.dispose"),id=td("Symbol.asyncDispose"),Io.for=td,Io.iterator=f,Io.dispose=Nt,Io.asyncDispose=id}},()=>(y&&(rd=y(y=0)),rd)),gd=Qn((t,i)=>{r(),function(e,s){"object"==typeof t&&void 0!==i?s(t):"function"==typeof define&&define.amd?define(["exports"],s):s((e=e||self).WebStreamsPolyfill={})}(t,function(t){"use strict";var i="function"==typeof Io&&"symbol"==typeof f?Io:function(t){return"Symbol("+t+")"};function e(){}var s=Number.isNaN||function(t){return t!=t},n=e;function r(t){return"object"==typeof t&&null!==t||"function"==typeof t}function h(t){return t.slice()}function o(t,i,e,s,n){new j(t).set(new j(e,s,n),i)}function a(t){return!1!==function(t){if("number"!=typeof t)return!1;if(s(t))return!1;if(t<0)return!1;return!0}(t)&&t!==1/0}function u(t,i,e){if("function"!=typeof t)throw new g("Argument is not a function");return Function.prototype.apply.call(t,i,e)}function c(t,i,e,s){var n=t[i];if(void 0!==n){if("function"!=typeof n)throw new g(n+" is not a method");switch(e){case 0:return function(){return l(n,t,s)};case 1:return function(i){var e=[i].concat(s);return l(n,t,e)}}}return function(){return k(void 0)}}function d(t,i,e){var s=t[i];if(void 0!==s)return u(s,t,e)}function l(t,i,e){try{return k(u(t,i,e))}catch(t){return E(t)}}function v(t){if(t=Number(t),s(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function p(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new g("size property of a queuing strategy must be a function");return function(i){return t(i)}}var y=Promise,A=Promise.prototype.then,b=Promise.resolve.bind(y),S=Promise.reject.bind(y);function T(t){return new y(t)}function k(t){return b(t)}function E(t){return S(t)}function P(t,i,e){return A.call(t,i,e)}function x(t,i,e){P(P(t,i,e),void 0,n)}function I(t,i){x(t,i)}function R(t,i){x(t,void 0,i)}function C(t,i,e){return P(t,i,e)}function D(t){P(t,void 0,n)}var B=function(){function t(){this.Rd=0,this.Dd=0,this.Ld={Od:[],Fd:void 0},this.Ud=this.Ld,this.Rd=0,this.Dd=0}return w.defineProperty(t.prototype,"length",{get:function(){return this.Dd},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var i=this.Ud,e=i;16383===i.Od.length&&(e={Od:[],Fd:void 0}),i.Od.push(t),e!==i&&(this.Ud=e,i.Fd=e),++this.Dd},t.prototype.shift=function(){var t=this.Ld,i=t,e=this.Rd,s=e+1,n=t.Od,r=n[e];return 16384===s&&(i=t.Fd,s=0),--this.Dd,this.Rd=s,t!==i&&(this.Ld=i),n[e]=void 0,r},t.prototype.forEach=function(t){for(var i=this.Rd,e=this.Ld,s=e.Od;!(i===s.length&&void 0===e.Fd||i===s.length&&(i=0,0===(s=(e=e.Fd).Od).length));)t(s[i]),++i},t.prototype.peek=function(){var t=this.Ld,i=this.Rd;return t.Od[i]},t}();function N(t,i,e){var s=null;!0===e&&(s=w.prototype);var n=w.create(s);return n.value=t,n.done=i,n}function M(t,i){t.Vd=!0,t.Hd=i,i.Wd=t,"readable"===i.Ra?U(t):"closed"===i.Ra?function(t){U(t),W(t)}(t):V(t,i.qd)}function L(t,i){return ji(t.Hd,i)}function O(t){"readable"===t.Hd.Ra?H(t,new g("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,i){V(t,i)}(t,new g("Reader was released and can no longer be used to monitor the stream's closedness")),t.Hd.Wd=void 0,t.Hd=void 0}function F(t){return new g("Cannot "+t+" a stream using a released reader")}function U(t){t.zd=T(function(i,e){t.Gd=i,t.Xd=e})}function V(t,i){U(t),H(t,i)}function H(t,i){D(t.zd),t.Xd(i),t.Gd=void 0,t.Xd=void 0}function W(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0}var q=i("[[CancelSteps]]"),z=i("[[PullSteps]]");function G(t,i){void 0===i&&(i=!1);var e=new $(t);return e.Vd=i,e}function X(t){return T(function(i,e){var s={Qd:i,Kd:e};t.Wd.Yd.push(s)})}function Q(t,i,e){var s=t.Wd;s.Yd.shift().Qd(N(i,e,s.Vd))}function K(t){return t.Wd.Yd.length}function Y(t){var i=t.Wd;return void 0!==i&&!!tt(i)}var J,Z,$=function(){function t(t){if(!1===Gi(t))throw new g("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Xi(t))throw new g("This stream has already been locked for exclusive reading by another reader");M(this,t),this.Yd=new B}return w.defineProperty(t.prototype,"closed",{get:function(){return tt(this)?this.zd:E(et("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return tt(this)?void 0===this.Hd?E(F("cancel")):L(this,t):E(et("cancel"))},t.prototype.read=function(){return tt(this)?void 0===this.Hd?E(F("read from")):it(this):E(et("read"))},t.prototype.releaseLock=function(){if(!tt(this))throw et("releaseLock");if(void 0!==this.Hd){if(this.Yd.length>0)throw new g("Tried to release a reader lock when that reader has pending read() calls un-settled");O(this)}},t}();function tt(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"Yd")}function it(t){var i=t.Hd;return i.Jd=!0,"closed"===i.Ra?k(N(void 0,!0,t.Vd)):"errored"===i.Ra?E(i.qd):i.Zd[z]()}function et(t){return new g("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"==typeof i.asyncIterator&&((J={})[i.asyncIterator]=function(){return this},Z=J,w.defineProperty(Z,i.asyncIterator,{enumerable:!1}));var st={next:function(){if(!1===nt(this))return E(rt("next"));var t=this.$d;return void 0===t.Hd?E(F("iterate")):C(it(t),function(i){var e=i.done;return e&&O(t),N(i.value,e,!0)})},return:function(t){if(!1===nt(this))return E(rt("next"));var i=this.$d;if(void 0===i.Hd)return E(F("finish iterating"));if(i.Yd.length>0)return E(new g("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.ul){var e=L(i,t);return O(i),C(e,function(){return N(t,!0,!0)})}return O(i),k(N(t,!0,!0))}};function nt(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"$d")}function rt(t){return new g("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function ht(t){var i=t.tf.shift();return t.if-=i.size,t.if<0&&(t.if=0),i.value}function ot(t,i,e){if(!a(e=Number(e)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.tf.push({value:i,size:e}),t.if+=e}function at(t){t.tf=new B,t.if=0}void 0!==Z&&w.setPrototypeOf(st,Z),w.defineProperty(st,"next",{enumerable:!1}),w.defineProperty(st,"return",{enumerable:!1});var ut=i("[[AbortSteps]]"),ct=i("[[ErrorSteps]]"),dt=function(){function t(t,i){void 0===t&&(t={}),void 0===i&&(i={}),ft(this);var e=i.size,s=i.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var n=p(e);void 0===s&&(s=1),function(t,i,e,s){var n=w.create(Ct.prototype);function r(){return d(i,"start",[n])}var h=c(i,"write",1,[n]),o=c(i,"close",0,[]),a=c(i,"abort",1,[]);Dt(t,n,r,h,o,a,e,s)}(this,t,s=v(s),n)}return w.defineProperty(t.prototype,"locked",{get:function(){if(!1===vt(this))throw Ut("locked");return _t(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===vt(this)?E(Ut("abort")):!0===_t(this)?E(new g("Cannot abort a stream that already has a writer")):gt(this,t)},t.prototype.close=function(){return!1===vt(this)?E(Ut("close")):!0===_t(this)?E(new g("Cannot close a stream that already has a writer")):!0===At(this)?E(new g("Cannot close an already-closing stream")):pt(this)},t.prototype.getWriter=function(){if(!1===vt(this))throw Ut("getWriter");return lt(this)},t}();function lt(t){return new Tt(t)}function ft(t){t.Ra="writable",t.qd=void 0,t.ef=void 0,t.nf=void 0,t.rf=new B,t.hf=void 0,t.uf=void 0,t.cf=void 0,t.df=void 0,t.lf=!1}function vt(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"nf")}function _t(t){return void 0!==t.ef}function gt(t,i){var e=t.Ra;if("closed"===e||"errored"===e)return k(void 0);if(void 0!==t.df)return t.df.vf;var s=!1;"erroring"===e&&(s=!0,i=void 0);var n=T(function(e,n){t.df={vf:void 0,Qd:e,Kd:n,_f:i,gf:s}});return t.df.vf=n,!1===s&&wt(t,i),n}function pt(t){var i=t.Ra;if("closed"===i||"errored"===i)return E(new g("The stream (in "+i+" state) is not in the writable state and cannot be closed"));var e=T(function(i,e){var s={Qd:i,Kd:e};t.uf=s}),s=t.ef;return void 0!==s&&!0===t.lf&&"writable"===i&&Yt(s),function(t){ot(t,"close",0),Mt(t)}(t.nf),e}function mt(t,i){"writable"!==t.Ra?yt(t):wt(t,i)}function wt(t,i){var e=t.nf;t.Ra="erroring",t.qd=i;var s=t.ef;void 0!==s&&xt(s,i),!1===function(t){if(void 0===t.hf&&void 0===t.cf)return!1;return!0}(t)&&!0===e.pf&&yt(t)}function yt(t){t.Ra="errored",t.nf[ct]();var i=t.qd;if(t.rf.forEach(function(t){t.Kd(i)}),t.rf=new B,void 0!==t.df){var e=t.df;if(t.df=void 0,!0===e.gf)return e.Kd(i),void bt(t);x(t.nf[ut](e._f),function(){e.Qd(),bt(t)},function(i){e.Kd(i),bt(t)})}else bt(t)}function At(t){return void 0!==t.uf||void 0!==t.cf}function bt(t){void 0!==t.uf&&(t.uf.Kd(t.qd),t.uf=void 0);var i=t.ef;void 0!==i&&zt(i,t.qd)}function St(t,i){var e=t.ef;void 0!==e&&i!==t.lf&&(!0===i?function(t){Xt(t)}(e):Yt(e)),t.lf=i}var Tt=function(){function t(t){if(!1===vt(t))throw new g("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===_t(t))throw new g("This stream has already been locked for exclusive writing by another writer");this.mf=t,t.ef=this;var i=t.Ra;if("writable"===i)!1===At(t)&&!0===t.lf?Xt(this):Qt(this),Wt(this);else if("erroring"===i)jt(this,t.qd),Wt(this);else if("closed"===i)Qt(this),function(t){Wt(t),Gt(t)}(this);else{var e=t.qd;jt(this,e),qt(this,e)}}return w.defineProperty(t.prototype,"closed",{get:function(){return!1===kt(this)?E(Vt("closed")):this.zd},enumerable:!0,configurable:!0}),w.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===kt(this))throw Vt("desiredSize");if(void 0===this.mf)throw Ht("desiredSize");return function(t){var i=t.mf,e=i.Ra;if("errored"===e||"erroring"===e)return null;if("closed"===e)return 0;return Nt(i.nf)}(this)},enumerable:!0,configurable:!0}),w.defineProperty(t.prototype,"ready",{get:function(){return!1===kt(this)?E(Vt("ready")):this.wf},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===kt(this)?E(Vt("abort")):void 0===this.mf?E(Ht("abort")):function(t,i){var e=t.mf;return gt(e,i)}(this,t)},t.prototype.close=function(){if(!1===kt(this))return E(Vt("close"));var t=this.mf;return void 0===t?E(Ht("close")):!0===At(t)?E(new g("Cannot close an already-closing stream")):Et(this)},t.prototype.releaseLock=function(){if(!1===kt(this))throw Vt("releaseLock");void 0!==this.mf&&It(this)},t.prototype.write=function(t){return!1===kt(this)?E(Vt("write")):void 0===this.mf?E(Ht("write to")):Rt(this,t)},t}();function kt(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"mf")}function Et(t){return pt(t.mf)}function Pt(t,i){"pending"===t.yf?zt(t,i):function(t,i){qt(t,i)}(t,i)}function xt(t,i){"pending"===t.Af?Kt(t,i):function(t,i){jt(t,i)}(t,i)}function It(t){var i=t.mf,e=new g("Writer was released and can no longer be used to monitor the stream's closedness");xt(t,e),Pt(t,e),i.ef=void 0,t.mf=void 0}function Rt(t,i){var e=t.mf,s=e.nf,n=function(t,i){try{return t.bf(i)}catch(i){return Lt(t,i),1}}(s,i);if(e!==t.mf)return E(Ht("write to"));var r=e.Ra;if("errored"===r)return E(e.qd);if(!0===At(e)||"closed"===r)return E(new g("The stream is closing or closed and cannot be written to"));if("erroring"===r)return E(e.qd);var h=function(t){return T(function(i,e){var s={Qd:i,Kd:e};t.rf.push(s)})}(e);return function(t,i,e){var s={chunk:i};try{ot(t,s,e)}catch(i){return void Lt(t,i)}var n=t.Sf;if(!1===At(n)&&"writable"===n.Ra){St(n,Ot(t))}Mt(t)}(s,i,n),h}var Ct=function(){function t(){throw new g("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){if(!r(t))return!1;if(!w.prototype.hasOwnProperty.call(t,"Sf"))return!1;return!0}(this))throw new g("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.Sf.Ra&&Ft(this,t)},t.prototype[ut]=function(t){var i=this.Tf(t);return Bt(this),i},t.prototype[ct]=function(){at(this)},t}();function Dt(t,i,e,s,n,r,h,o){i.Sf=t,t.nf=i,i.tf=void 0,i.if=void 0,at(i),i.pf=!1,i.bf=o,i.kf=h,i.Ef=s,i.Pf=n,i.Tf=r;var a=Ot(i);St(t,a),x(k(e()),function(){i.pf=!0,Mt(i)},function(e){i.pf=!0,mt(t,e)})}function Bt(t){t.Ef=void 0,t.Pf=void 0,t.Tf=void 0,t.bf=void 0}function Nt(t){return t.kf-t.if}function Mt(t){var i=t.Sf;if(!1!==t.pf&&void 0===i.hf)if("erroring"!==i.Ra){if(0!==t.tf.length){var e=function(t){return t.tf.peek().value}(t);"close"===e?function(t){var i=t.Sf;(function(t){t.cf=t.uf,t.uf=void 0})(i),ht(t);var e=t.Pf();Bt(t),x(e,function(){!function(t){t.cf.Qd(void 0),t.cf=void 0,"erroring"===t.Ra&&(t.qd=void 0,void 0!==t.df&&(t.df.Qd(),t.df=void 0)),t.Ra="closed";var i=t.ef;void 0!==i&&Gt(i)}(i)},function(t){!function(t,i){t.cf.Kd(i),t.cf=void 0,void 0!==t.df&&(t.df.Kd(i),t.df=void 0),mt(t,i)}(i,t)})}(t):function(t,i){var e=t.Sf;!function(t){t.hf=t.rf.shift()}(e);var s=t.Ef(i);x(s,function(){!function(t){t.hf.Qd(void 0),t.hf=void 0}(e);var i=e.Ra;if(ht(t),!1===At(e)&&"writable"===i){var s=Ot(t);St(e,s)}Mt(t)},function(i){"writable"===e.Ra&&Bt(t),function(t,i){t.hf.Kd(i),t.hf=void 0,mt(t,i)}(e,i)})}(t,e.chunk)}}else yt(i)}function Lt(t,i){"writable"===t.Sf.Ra&&Ft(t,i)}function Ot(t){return Nt(t)<=0}function Ft(t,i){var e=t.Sf;Bt(t),wt(e,i)}function Ut(t){return new g("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Vt(t){return new g("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function Ht(t){return new g("Cannot "+t+" a stream using a released writer")}function Wt(t){t.zd=T(function(i,e){t.Gd=i,t.Xd=e,t.yf="pending"})}function qt(t,i){Wt(t),zt(t,i)}function zt(t,i){D(t.zd),t.Xd(i),t.Gd=void 0,t.Xd=void 0,t.yf="rejected"}function Gt(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0,t.yf="resolved"}function Xt(t){t.wf=T(function(i,e){t.xf=i,t.If=e}),t.Af="pending"}function jt(t,i){Xt(t),Kt(t,i)}function Qt(t){Xt(t),Yt(t)}function Kt(t,i){D(t.wf),t.If(i),t.xf=void 0,t.If=void 0,t.Af="rejected"}function Yt(t){t.xf(void 0),t.xf=void 0,t.If=void 0,t.Af="fulfilled"}function Jt(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var Zt="undefined"!=typeof DOMException?DOMException:void 0;var $t,ti=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(Zt)?Zt:(($t=function(t,i){this.message=t||"",this.name=i||"Error",m.captureStackTrace&&m.captureStackTrace(this,this.constructor)}).prototype=w.create(m.prototype),w.defineProperty($t.prototype,"constructor",{value:$t,writable:!0,configurable:!0}),$t);function ii(t,i,s,n,r,h){var o=G(t),a=lt(i);t.Jd=!0;var u=!1,c=k(void 0);return T(function(d,l){var f,v,_,p;if(void 0!==h){if(f=function(){var e=new ti("Aborted","AbortError"),s=[];!1===n&&s.push(function(){return"writable"===i.Ra?gt(i,e):k(void 0)}),!1===r&&s.push(function(){return"readable"===t.Ra?ji(t,e):k(void 0)}),A(function(){return Promise.all(s.map(function(t){return t()}))},!0,e)},!0===h.aborted)return void f();h.addEventListener("abort",f)}if(y(t,o.zd,function(t){!1===n?A(function(){return gt(i,t)},!0,t):b(!0,t)}),y(i,a.zd,function(i){!1===r?A(function(){return ji(t,i)},!0,i):b(!0,i)}),v=t,_=o.zd,p=function(){!1===s?A(function(){return function(t){var i=t.mf,e=i.Ra;return!0===At(i)||"closed"===e?k(void 0):"errored"===e?E(i.qd):Et(t)}(a)}):b()},"closed"===v.Ra?p():I(_,p),!0===At(i)||"closed"===i.Ra){var m=new g("the destination writable stream closed before all data could be piped to it");!1===r?A(function(){return ji(t,m)},!0,m):b(!0,m)}function w(){var t=c;return P(c,function(){return t!==c?w():void 0})}function y(t,i,e){"errored"===t.Ra?e(t.qd):R(i,e)}function A(t,e,s){function n(){x(t(),function(){return S(e,s)},function(t){return S(!0,t)})}!0!==u&&(u=!0,"writable"===i.Ra&&!1===At(i)?I(w(),n):n())}function b(t,e){!0!==u&&(u=!0,"writable"===i.Ra&&!1===At(i)?I(w(),function(){return S(t,e)}):S(t,e))}function S(t,i){It(a),O(o),void 0!==h&&h.removeEventListener("abort",f),t?l(i):d(void 0)}D(T(function(t,i){!function s(n){n?t():P(!0===u?k(!0):P(a.wf,function(){return P(it(o),function(t){return!0===t.done||(c=P(Rt(a,t.value),void 0,e),!1)})}),s,i)}(!1)}))})}var ei=function(){function t(){throw new g}return w.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===si(this))throw fi("desiredSize");return ci(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===si(this))throw fi("close");if(!1===di(this))throw new g("The stream is not in a state that permits close");oi(this)},t.prototype.enqueue=function(t){if(!1===si(this))throw fi("enqueue");if(!1===di(this))throw new g("The stream is not in a state that permits enqueue");return ai(this,t)},t.prototype.error=function(t){if(!1===si(this))throw fi("error");ui(this,t)},t.prototype[q]=function(t){at(this);var i=this.Rf(t);return hi(this),i},t.prototype[z]=function(){var t=this.Cf;if(this.tf.length>0){var i=ht(this);return!0===this.Df&&0===this.tf.length?(hi(this),Qi(t)):ni(this),k(N(i,!1,t.Wd.Vd))}var e=X(t);return ni(this),e},t}();function si(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"Cf")}function ni(t){!1!==ri(t)&&(!0!==t.Bf?(t.Bf=!0,x(t.Nf(),function(){t.Bf=!1,!0===t.Mf&&(t.Mf=!1,ni(t))},function(i){ui(t,i)})):t.Mf=!0)}function ri(t){var i=t.Cf;return!1!==di(t)&&(!1!==t.pf&&(!0===Xi(i)&&K(i)>0||ci(t)>0))}function hi(t){t.Nf=void 0,t.Rf=void 0,t.bf=void 0}function oi(t){var i=t.Cf;t.Df=!0,0===t.tf.length&&(hi(t),Qi(i))}function ai(t,i){var e=t.Cf;if(!0===Xi(e)&&K(e)>0)Q(e,i,!1);else{var s=void 0;try{s=t.bf(i)}catch(i){throw ui(t,i),i}try{ot(t,i,s)}catch(i){throw ui(t,i),i}}ni(t)}function ui(t,i){var e=t.Cf;"readable"===e.Ra&&(at(t),hi(t),Ki(e,i))}function ci(t){var i=t.Cf.Ra;return"errored"===i?null:"closed"===i?0:t.kf-t.if}function di(t){var i=t.Cf.Ra;return!1===t.Df&&"readable"===i}function li(t,i,e,s,n,r,h){i.Cf=t,i.tf=void 0,i.if=void 0,at(i),i.pf=!1,i.Df=!1,i.Mf=!1,i.Bf=!1,i.bf=h,i.kf=r,i.Nf=s,i.Rf=n,t.Zd=i,x(k(e()),function(){i.pf=!0,ni(i)},function(t){ui(i,t)})}function fi(t){return new g("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var vi=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&_.floor(t)===t},_i=function(){function t(){throw new g("ReadableStreamBYOBRequest cannot be used directly")}return w.defineProperty(t.prototype,"view",{get:function(){if(!1===mi(this))throw Ni("view");return this.Lf},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===mi(this))throw Ni("respond");if(void 0===this.Of)throw new g("This BYOB request has been invalidated");this.Lf.buffer,function(t,i){if(i=Number(i),!1===a(i))throw new RangeError("bytesWritten must be a finite");xi(t,i)}(this.Of,t)},t.prototype.respondWithNewView=function(t){if(!1===mi(this))throw Ni("respond");if(void 0===this.Of)throw new g("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new g("You can only respond with array buffer views");t.buffer,function(t,i){var e=t.Ff.peek();if(e.byteOffset+e.bytesFilled!==i.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(e.byteLength!==i.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");e.buffer=i.buffer,xi(t,i.byteLength)}(this.Of,t)},t}(),gi=function(){function t(){throw new g("ReadableByteStreamController constructor cannot be used directly")}return w.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===pi(this))throw Mi("byobRequest");if(void 0===this.Uf&&this.Ff.length>0){var t=this.Ff.peek(),i=new j(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),e=w.create(_i.prototype);!function(t,i,e){t.Of=i,t.Lf=e}(e,this,i),this.Uf=e}return this.Uf},enumerable:!0,configurable:!0}),w.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===pi(this))throw Mi("desiredSize");return Di(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===pi(this))throw Mi("close");if(!0===this.Df)throw new g("The stream has already been closed; do not close it again!");var t=this.Vf.Ra;if("readable"!==t)throw new g("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var i=t.Vf;if(t.if>0)return void(t.Df=!0);if(t.Ff.length>0){if(t.Ff.peek().bytesFilled>0){var e=new g("Insufficient bytes to fill elements in the given buffer");throw Ci(t,e),e}}Ri(t),Qi(i)}(this)},t.prototype.enqueue=function(t){if(!1===pi(this))throw Mi("enqueue");if(!0===this.Df)throw new g("stream is closed or draining");var i=this.Vf.Ra;if("readable"!==i)throw new g("The stream (in "+i+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new g("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,i){var e=t.Vf,s=i.buffer,n=i.byteOffset,r=i.byteLength,h=s;if(!0===Y(e)){if(0===K(e))bi(t,h,n,r);else Q(e,new j(h,n,r),!1)}else!0===Fi(e)?(bi(t,h,n,r),Pi(t)):bi(t,h,n,r);wi(t)}(this,t)},t.prototype.error=function(t){if(!1===pi(this))throw Mi("error");Ci(this,t)},t.prototype[q]=function(t){this.Ff.length>0&&(this.Ff.peek().bytesFilled=0);at(this);var i=this.Rf(t);return Ri(this),i},t.prototype[z]=function(){var t=this.Vf;if(this.if>0){var i=this.tf.shift();this.if-=i.byteLength,ki(this);var e=void 0;try{e=new j(i.buffer,i.byteOffset,i.byteLength)}catch(t){return E(t)}return k(N(e,!1,t.Wd.Vd))}var s=this.Hf;if(void 0!==s){var n=void 0;try{n=new ArrayBuffer(s)}catch(t){return E(t)}var r={buffer:n,byteOffset:0,byteLength:s,bytesFilled:0,elementSize:1,ctor:j,readerType:"default"};this.Ff.push(r)}var h=X(t);return wi(this),h},t}();function pi(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"Vf")}function mi(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"Of")}function wi(t){var i=function(t){var i=t.Vf;if("readable"!==i.Ra)return!1;if(!0===t.Df)return!1;if(!1===t.pf)return!1;if(!0===Y(i)&&K(i)>0)return!0;if(!0===Fi(i)&&Oi(i)>0)return!0;var e=Di(t);if(e>0)return!0;return!1}(t);!1!==i&&(!0!==t.Bf?(t.Bf=!0,x(t.Nf(),function(){t.Bf=!1,!0===t.Mf&&(t.Mf=!1,wi(t))},function(i){Ci(t,i)})):t.Mf=!0)}function yi(t,i){var e=!1;"closed"===t.Ra&&(e=!0);var s=Ai(i);"default"===i.readerType?Q(t,s,e):function(t,i,e){var s=t.Wd,n=s.Wf.shift();n.Qd(N(i,e,s.Vd))}(t,s,e)}function Ai(t){var i=t.bytesFilled,e=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,i/e)}function bi(t,i,e,s){t.tf.push({buffer:i,byteOffset:e,byteLength:s}),t.if+=s}function Si(t,i){var e=i.elementSize,s=i.bytesFilled-i.bytesFilled%e,n=_.min(t.if,i.byteLength-i.bytesFilled),r=i.bytesFilled+n,h=r-r%e,a=n,u=!1;h>s&&(a=h-i.bytesFilled,u=!0);for(var c=t.tf;a>0;){var d=c.peek(),l=_.min(a,d.byteLength),f=i.byteOffset+i.bytesFilled;o(i.buffer,f,d.buffer,d.byteOffset,l),d.byteLength===l?c.shift():(d.byteOffset+=l,d.byteLength-=l),t.if-=l,Ti(t,l,i),a-=l}return u}function Ti(t,i,e){Ei(t),e.bytesFilled+=i}function ki(t){0===t.if&&!0===t.Df?(Ri(t),Qi(t.Vf)):wi(t)}function Ei(t){void 0!==t.Uf&&(t.Uf.Of=void 0,t.Uf.Lf=void 0,t.Uf=void 0)}function Pi(t){for(;t.Ff.length>0;){if(0===t.if)return;var i=t.Ff.peek();!0===Si(t,i)&&(Ii(t),yi(t.Vf,i))}}function xi(t,i){var e=t.Ff.peek();if("closed"===t.Vf.Ra){if(0!==i)throw new g("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,i){i.buffer=i.buffer;var e=t.Vf;if(!0===Fi(e))for(;Oi(e)>0;)yi(e,Ii(t))}(t,e)}else!function(t,i,e){if(e.bytesFilled+i>e.byteLength)throw new RangeError("bytesWritten out of range");if(Ti(t,i,e),!(e.bytesFilled0){var n=e.byteOffset+e.bytesFilled,r=e.buffer.slice(n-s,n);bi(t,r,0,r.byteLength)}e.buffer=e.buffer,e.bytesFilled-=s,yi(t.Vf,e),Pi(t)}}(t,i,e);wi(t)}function Ii(t){var i=t.Ff.shift();return Ei(t),i}function Ri(t){t.Nf=void 0,t.Rf=void 0}function Ci(t,i){var e=t.Vf;"readable"===e.Ra&&(!function(t){Ei(t),t.Ff=new B}(t),at(t),Ri(t),Ki(e,i))}function Di(t){var i=t.Vf.Ra;return"errored"===i?null:"closed"===i?0:t.kf-t.if}function Bi(t,i,e){var s=w.create(gi.prototype);var n=c(i,"pull",0,[s]),r=c(i,"cancel",1,[]),h=i.autoAllocateChunkSize;if(void 0!==h&&(h=Number(h),!1===vi(h)||h<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,i,e,s,n,r,h){i.Vf=t,i.Mf=!1,i.Bf=!1,i.Uf=void 0,i.tf=i.if=void 0,at(i),i.Df=!1,i.pf=!1,i.kf=v(r),i.Nf=s,i.Rf=n,i.Hf=h,i.Ff=new B,t.Zd=i,x(k(e()),function(){i.pf=!0,wi(i)},function(t){Ci(i,t)})}(t,s,function(){return d(i,"start",[s])},n,r,e,h)}function Ni(t){return new g("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Mi(t){return new g("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Li(t){return T(function(i,e){var s={Qd:i,Kd:e};t.Wd.Wf.push(s)})}function Oi(t){return t.Wd.Wf.length}function Fi(t){var i=t.Wd;return void 0!==i&&!!Vi(i)}var Ui=function(){function t(t){if(!Gi(t))throw new g("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===pi(t.Zd))throw new g("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Xi(t))throw new g("This stream has already been locked for exclusive reading by another reader");M(this,t),this.Wf=new B}return w.defineProperty(t.prototype,"closed",{get:function(){return Vi(this)?this.zd:E(Hi("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Vi(this)?void 0===this.Hd?E(F("cancel")):L(this,t):E(Hi("cancel"))},t.prototype.read=function(t){return Vi(this)?void 0===this.Hd?E(F("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?E(new g("view must have non-zero byteLength")):function(t,i){var e=t.Hd;if(e.Jd=!0,"errored"===e.Ra)return E(e.qd);return function(t,i){var e=t.Vf,s=1;i.constructor!==DataView&&(s=i.constructor.BYTES_PER_ELEMENT);var n=i.constructor,r={buffer:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength,bytesFilled:0,elementSize:s,ctor:n,readerType:"byob"};if(t.Ff.length>0)return t.Ff.push(r),Li(e);if("closed"===e.Ra)return k(N(new n(r.buffer,r.byteOffset,0),!0,e.Wd.Vd));if(t.if>0){if(!0===Si(t,r)){var h=Ai(r);return ki(t),k(N(h,!1,e.Wd.Vd))}if(!0===t.Df){var o=new g("Insufficient bytes to fill elements in the given buffer");return Ci(t,o),E(o)}}t.Ff.push(r);var a=Li(e);return wi(t),a}(e.Zd,i)}(this,t)):E(new g("view must be an array buffer view")):E(Hi("read"))},t.prototype.releaseLock=function(){if(!Vi(this))throw Hi("releaseLock");if(void 0!==this.Hd){if(this.Wf.length>0)throw new g("Tried to release a reader lock when that reader has pending read() calls un-settled");O(this)}},t}();function Vi(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"Wf")}function Hi(t){return new g("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var Wi=function(){function t(t,i){void 0===t&&(t={}),void 0===i&&(i={}),zi(this);var e=i.size,s=i.highWaterMark,n=t.type;if("bytes"===String(n)){if(void 0!==e)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===s&&(s=0),Bi(this,t,s=v(s))}else{if(void 0!==n)throw new RangeError("Invalid type is specified");var r=p(e);void 0===s&&(s=1),function(t,i,e,s){var n=w.create(ei.prototype),r=c(i,"pull",0,[n]),h=c(i,"cancel",1,[]);li(t,n,function(){return d(i,"start",[n])},r,h,e,s)}(this,t,s=v(s),r)}}return w.defineProperty(t.prototype,"locked",{get:function(){if(!1===Gi(this))throw Yi("locked");return Xi(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Gi(this)?E(Yi("cancel")):!0===Xi(this)?E(new g("Cannot cancel a stream that already has a reader")):ji(this,t)},t.prototype.getReader=function(t){var i=(void 0===t?{}:t).mode;if(!1===Gi(this))throw Yi("getReader");if(void 0===i)return G(this,!0);if("byob"===(i=String(i)))return function(t,i){void 0===i&&(i=!1);var e=new Ui(t);return e.Vd=i,e}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,i){var e=t.writable,s=t.readable,n=void 0===i?{}:i,r=n.preventClose,h=n.preventAbort,o=n.preventCancel,a=n.signal;if(!1===Gi(this))throw Yi("pipeThrough");if(!1===vt(e))throw new g("writable argument to pipeThrough must be a WritableStream");if(!1===Gi(s))throw new g("readable argument to pipeThrough must be a ReadableStream");if(r=Boolean(r),h=Boolean(h),o=Boolean(o),void 0!==a&&!Jt(a))throw new g("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Xi(this))throw new g("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===_t(e))throw new g("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return D(ii(this,e,r,h,o,a)),s},t.prototype.pipeTo=function(t,i){var e=void 0===i?{}:i,s=e.preventClose,n=e.preventAbort,r=e.preventCancel,h=e.signal;return!1===Gi(this)?E(Yi("pipeTo")):!1===vt(t)?E(new g("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(s=Boolean(s),n=Boolean(n),r=Boolean(r),void 0===h||Jt(h)?!0===Xi(this)?E(new g("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===_t(t)?E(new g("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):ii(this,t,s,n,r,h):E(new g("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Gi(this))throw Yi("tee");var t=function(t){var i,e,s,n,r,o=G(t),a=!1,u=!1,c=!1,d=T(function(t){r=t});function l(){return!0===a||(a=!0,D(C(it(o),function(t){if(a=!1,!0===t.done)return!1===u&&oi(s.Zd),void(!1===c&&oi(n.Zd));var i=t.value,e=i,r=i;!1===u&&ai(s.Zd,e),!1===c&&ai(n.Zd,r)}))),k(void 0)}function f(){}return s=qi(f,l,function(s){if(u=!0,i=s,!0===c){var n=h([i,e]),o=ji(t,n);r(o)}return d}),n=qi(f,l,function(s){if(c=!0,e=s,!0===u){var n=h([i,e]),o=ji(t,n);r(o)}return d}),R(o.zd,function(t){ui(s.Zd,t),ui(n.Zd,t)}),[s,n]}(this);return h(t)},t.prototype.getIterator=function(t){var i=(void 0===t?{}:t).preventCancel,e=void 0!==i&&i;if(!1===Gi(this))throw Yi("getIterator");return function(t,i){void 0===i&&(i=!1);var e=G(t),s=w.create(st);return s.$d=e,s.ul=Boolean(i),s}(this,e)},t}();function qi(t,i,e,s,n){void 0===s&&(s=1),void 0===n&&(n=function(){return 1});var r=w.create(Wi.prototype);return zi(r),li(r,w.create(ei.prototype),t,i,e,s,n),r}function zi(t){t.Ra="readable",t.Wd=void 0,t.qd=void 0,t.Jd=!1}function Gi(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"Zd")}function Xi(t){return void 0!==t.Wd}function ji(t,i){return t.Jd=!0,"closed"===t.Ra?k(void 0):"errored"===t.Ra?E(t.qd):(Qi(t),C(t.Zd[q](i),e))}function Qi(t){t.Ra="closed";var i=t.Wd;void 0!==i&&(tt(i)&&(i.Yd.forEach(function(t){t.Qd(N(void 0,!0,i.Vd))}),i.Yd=new B),W(i))}function Ki(t,i){t.Ra="errored",t.qd=i;var e=t.Wd;void 0!==e&&(tt(e)?(e.Yd.forEach(function(t){t.Kd(i)}),e.Yd=new B):(e.Wf.forEach(function(t){t.Kd(i)}),e.Wf=new B),H(e,i))}function Yi(t){return new g("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"==typeof i.asyncIterator&&w.defineProperty(Wi.prototype,i.asyncIterator,{value:Wi.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var Ji=function(){function t(t){var i=t.highWaterMark;this.highWaterMark=i}return t.prototype.size=function(t){return t.byteLength},t}(),Zi=function(){function t(t){var i=t.highWaterMark;this.highWaterMark=i}return t.prototype.size=function(){return 1},t}(),$i=function(){function t(t,i,e){void 0===t&&(t={}),void 0===i&&(i={}),void 0===e&&(e={});var s=i.size,n=i.highWaterMark,r=e.size,h=e.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var o=p(s);if(void 0===n&&(n=1),n=v(n),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var a,u=p(r);void 0===h&&(h=0),h=v(h),function(t,i,e,s,n,r){function h(){return i}function o(i){return function(t,i){var e=t.qf;if(!0===t.lf){return C(t.zf,function(){var s=t.Gf;if("erroring"===s.Ra)throw s.qd;return ae(e,i)})}return ae(e,i)}(t,i)}function a(i){return function(t,i){return ie(t,i),k(void 0)}(t,i)}function u(){return function(t){var i=t.Xf,e=t.qf,s=e.jf();return he(e),C(s,function(){if("errored"===i.Ra)throw i.qd;var t=i.Zd;!0===di(t)&&oi(t)},function(e){throw ie(t,e),i.qd})}(t)}function c(){return function(t){return se(t,!1),t.zf}(t)}function d(i){return ee(t,i),k(void 0)}t.Gf=function(t,i,e,s,n,r){void 0===n&&(n=1),void 0===r&&(r=function(){return 1});var h=w.create(dt.prototype);return ft(h),Dt(h,w.create(Ct.prototype),t,i,e,s,n,r),h}(h,o,u,a,e,s),t.Xf=qi(h,c,d,n,r),t.lf=void 0,t.zf=void 0,t.Qf=void 0,se(t,!0),t.qf=void 0}(this,T(function(t){a=t}),n,o,h,u),function(t,i){var e=w.create(ne.prototype),s=function(t){try{return oe(e,t),k(void 0)}catch(t){return E(t)}},n=i.transform;if(void 0!==n){if("function"!=typeof n)throw new g("transform is not a method");s=function(t){return l(n,i,[t,e])}}var r=c(i,"flush",0,[e]);!function(t,i,e,s){i.Kf=t,t.qf=i,i.Yf=e,i.jf=s}(t,e,s,r)}(this,t);var f=d(t,"start",[this.qf]);a(f)}return w.defineProperty(t.prototype,"readable",{get:function(){if(!1===te(this))throw ce("readable");return this.Xf},enumerable:!0,configurable:!0}),w.defineProperty(t.prototype,"writable",{get:function(){if(!1===te(this))throw ce("writable");return this.Gf},enumerable:!0,configurable:!0}),t}();function te(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"qf")}function ie(t,i){ui(t.Xf.Zd,i),ee(t,i)}function ee(t,i){he(t.qf),Lt(t.Gf.nf,i),!0===t.lf&&se(t,!1)}function se(t,i){void 0!==t.zf&&t.Qf(),t.zf=T(function(i){t.Qf=i}),t.lf=i}var ne=function(){function t(){throw new g("TransformStreamDefaultController instances cannot be created directly")}return w.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===re(this))throw ue("desiredSize");return ci(this.Kf.Xf.Zd)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===re(this))throw ue("enqueue");oe(this,t)},t.prototype.error=function(t){if(!1===re(this))throw ue("error");!function(t,i){ie(t.Kf,i)}(this,t)},t.prototype.terminate=function(){if(!1===re(this))throw ue("terminate");!function(t){var i=t.Kf,e=i.Xf.Zd;!0===di(e)&&oi(e);var s=new g("TransformStream terminated");ee(i,s)}(this)},t}();function re(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"Kf")}function he(t){t.Yf=void 0,t.jf=void 0}function oe(t,i){var e=t.Kf,s=e.Xf.Zd;if(!1===di(s))throw new g("Readable side is not in a state that permits enqueue");try{ai(s,i)}catch(t){throw ee(e,t),e.Xf.qd}var n=function(t){return!0!==ri(t)}(s);n!==e.lf&&se(e,!0)}function ae(t,i){return C(t.Yf(i),void 0,function(i){throw ie(t.Kf,i),i})}function ue(t){return new g("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function ce(t){return new g("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=Ji,t.CountQueuingStrategy=Zi,t.ReadableStream=Wi,t.TransformStream=$i,t.WritableStream=dt,w.defineProperty(t,"__esModule",{value:!0})})}),pd=Qn(t=>{"use strict";function i(){const t=gd();return i=function(){return t},t}r(),w.defineProperty(t,"__esModule",{value:!0}),function(t,i){for(var e in i)w.defineProperty(t,e,{enumerable:!0,get:w.getOwnPropertyDescriptor(i,e).get})}(t,{get ByteLengthQueuingStrategy(){return i().ByteLengthQueuingStrategy},get CountQueuingStrategy(){return i().CountQueuingStrategy},get ReadableStream(){return i().ReadableStream},get TransformStream(){return i().TransformStream},get WritableStream(){return i().WritableStream}})}),md=Qn((t,i)=>{r(),function(e,s){"object"==typeof t&&typeof i<"u"?s(t):"function"==typeof define&&define.amd?define(["exports"],s):s((e=typeof globalThis<"u"?globalThis:e||self).millicast={})}(t,function(t){"use strict";var i,e=w.defineProperty,n=w.defineProperties,r=w.getOwnPropertyDescriptors,o=w.getOwnPropertySymbols,a=w.prototype.hasOwnProperty,c=w.prototype.propertyIsEnumerable,d=(t,i,s)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s,l=(t,i)=>{for(var e in i||(i={}))a.call(i,e)&&d(t,e,i[e]);if(o)for(var e of o(i))c.call(i,e)&&d(t,e,i[e]);return t},f=(t,i)=>n(t,r(i)),y=(t,i)=>{var e={};for(var s in t)a.call(t,s)&&i.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&o)for(var s of o(t))i.indexOf(s)<0&&c.call(t,s)&&(e[s]=t[s]);return e},A=typeof globalThis<"u"?globalThis:typeof s<"u"?s:typeof global<"u"?global:typeof self<"u"?self:{};function b(t){return t&&t.__esModule&&w.prototype.hasOwnProperty.call(t,"default")?t.default:t}var T,k={exports:{}};var E,P=(T||(T=1,E=k,function(t){var i,e={VERSION:"1.6.1"},s={},n=function(t,i){return function(){return i.apply(t,arguments)}},r=function(){var t,i,e=arguments,s=e[0];for(i=1;i=i.value},trace:function(){this.invoke(e.TRACE,arguments)},debug:function(){this.invoke(e.DEBUG,arguments)},info:function(){this.invoke(e.INFO,arguments)},warn:function(){this.invoke(e.WARN,arguments)},error:function(){this.invoke(e.ERROR,arguments)},time:function(t){"string"==typeof t&&t.length>0&&this.invoke(e.TIME,[t,"start"])},timeEnd:function(t){"string"==typeof t&&t.length>0&&this.invoke(e.TIME,[t,"end"])},invoke:function(t,e){i&&this.enabledFor(t)&&i(e,r({level:t},this.context))}};var a,u=new o({filterLevel:e.OFF});(a=e).enabledFor=n(u,u.enabledFor),a.trace=n(u,u.trace),a.debug=n(u,u.debug),a.time=n(u,u.time),a.timeEnd=n(u,u.timeEnd),a.info=n(u,u.info),a.warn=n(u,u.warn),a.error=n(u,u.error),a.log=a.info,e.setHandler=function(t){i=t},e.setLevel=function(t){for(var i in u.setLevel(t),s)s.hasOwnProperty(i)&&s[i].setLevel(t)},e.getLevel=function(){return u.getLevel()},e.get=function(t){return s[t]||(s[t]=new o(r({name:t},u.context)))},e.createDefaultHandler=function(t){(t=t||{}).formatter=t.formatter||function(t,i){i.name&&t.unshift("["+i.name+"]")};var i={},s=function(t,i){Function.prototype.apply.call(t,console,i)};return typeof console>"u"?function(){}:function(n,r){n=Array.prototype.slice.call(n);var h,o=console.log;r.level===e.TIME?(h=(r.name?"["+r.name+"] ":"")+n[0],"start"===n[1]?console.time?console.time(h):i[h]=(new Date).getTime():console.timeEnd?console.timeEnd(h):s(o,[h+": "+((new Date).getTime()-i[h])+"ms"])):(r.level===e.WARN&&console.warn?o=console.warn:r.level===e.ERROR&&console.error?o=console.error:r.level===e.INFO&&console.info?o=console.info:r.level===e.DEBUG&&console.debug?o=console.debug:r.level===e.TRACE&&console.trace&&(o=console.trace),t.formatter(n,r),s(o,n))}},e.useDefaults=function(t){e.setLevel(t&&t.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(t))},e.setDefaults=e.useDefaults,E.exports?E.exports=e:(e.Jf=t.Logger,e.noConflict=function(){return t.Logger=e.Jf,e},t.Logger=e)}(k.exports)),k.exports);const I=b(P),R="0.6.0",C=(null==(i=null==s?void 0:s.navigator)?void 0:i.userAgent)||"No user agent available";let D="",B="",N="",M="",L="",O="",F="",U=0;const V=[];const H=t=>{D=""===D?t:D},W=t=>{B=""===B?t:B},q=t=>{N=""===N?t:N},z=t=>{M=""===M?t:M},G=t=>{L=""===L?t:L},X=t=>{U=0===U?t:U},Q=t=>{O=t},K=t=>{F=""===F?t:F},Y=t=>{60===V.length&&V.shift(),V.push(t)},J=(t,i)=>{let e;void 0===t&&(t=60),void 0===i&&(i="JSON"),e=!Number.isInteger(t)||t>60||t<=0?60:t;const s={client:"@millicast/millicast-sdk",version:R,timestamp:(new Date).toISOString(),userAgent:C,clusterId:F,accountId:D,streamName:B,subscriberId:N,connection:O,stats:V.slice(-e),connectionDurationMs:(new Date).getTime()-U};return""!==L?s.feedId=L:""!==M&&(s.streamViewId=M),"CMCD"===i?function(t){function i(t,i){return{ts:_.round(i.timestamp)||"",ot:"audio"===t?"a":"v",bl:i.jitterBufferDelay||0,br:_.round(i.bitrateBitsPerSecond||0),pld:i.packetsLostDeltaPerSecond||0,j:i.jitter||0,mtp:i.packetRate||0,mid:i.mid||"",mimeType:i.mimeType||""}}return t.stats=t.stats.reduce((t,e)=>{const s=0!==e.audio.inbounds.length?e.audio.inbounds.map(t=>i("audio",t)):e.audio.outbounds.map(t=>i("audio",t)),n=0!==e.video.inbounds.length?e.video.inbounds.map(t=>i("video",t)):e.video.outbounds.map(t=>i("video",t));return t.concat([...s,...n])},[]),t}(s):s};I.useDefaults({defaultLevel:I.TRACE});const Z=["TRACE","DEBUG","INFO","WARN","ERROR"],tt=(t,i)=>{t.unshift("[".concat(i.name||"Global","] ").concat((new Date).toISOString()," - ").concat(i.level.name," -"))},it=(t,i)=>i?t.value>=ht[i].value:t.value>=rt.value,et=I.createDefaultHandler({formatter:tt});I.setHandler((t,i)=>{((t,i)=>{t=(t=Array.prototype.slice.call(t)).map(t=>"object"==typeof t?JSON.stringify(t):t),tt(t,i),0!==st?(nt.push(t.join(" ")),nt.length>=st&&(nt=nt.slice(-st))):nt=[]})(t,i),it(i.level,i.name)&&et(t,i);for(const{handler:e,level:s}of ot)i.level.value>=s.value&&e(t,i)});let st=1e4,nt=[],rt=I.OFF;const ht={},ot=[],at=f(l({},I),{enabledFor:it,getHistory:()=>nt,getHistoryMaxSize:()=>st,setHistoryMaxSize:t=>{st=t},setLevel:t=>{rt=t;for(const i in ht)ht[i]=t},getLevel:()=>rt,get:t=>{ht[t]||(ht[t]=rt);const i=I.get(t);return i.setLevel=i=>{ht[t]=i},i.getLevel=()=>ht[t],i},setHandler:(t,i)=>{ot.push({handler:t,level:i})},diagnose:t=>{let i;void 0===t&&(t={});const e={statsCount:60,historySize:1e3,minLogLevel:"TRACE",statsFormat:"JSON"};"number"==typeof t?(e.statsCount=t,i=e):i=l(l({},e),t);const{statsCount:s,historySize:n,minLogLevel:r,statsFormat:h}=i,o=J(s,h),a=at.getHistory();if(!Number.isInteger(n)||n<=0)throw new m("Invalid Argument Exception : historySize must be a positive integer.");if(!Z.includes(r.toUpperCase()))throw new m('Invalid Argument Exception : the minLogLevel parameter only excepts "trace", "debug", "info", "warn", and "error" as arguments.');if(Z.includes(r.toUpperCase())){const t=Z.slice(Z.indexOf(r.toUpperCase())),i=a.filter(i=>t.some(t=>i.includes(t)));o.history=i.slice(-n)}return o},JSON:"JSON",CMCD:"CMCD",VERSION:R});var ut,ct={exports:{}};function dt(){if(ut)return ct.exports;ut=1;var t,i="object"==typeof Reflect?Reflect:null,e=i&&"function"==typeof i.apply?i.apply:function(t,i,e){return Function.prototype.apply.call(t,i,e)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:w.getOwnPropertySymbols?function(t){return w.getOwnPropertyNames(t).concat(w.getOwnPropertySymbols(t))}:function(t){return w.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function n(){n.init.call(this)}ct.exports=n,ct.exports.once=function(t,i){return new Promise(function(e,s){function n(e){t.removeListener(i,r),s(e)}function r(){"function"==typeof t.removeListener&&t.removeListener("error",n),e([].slice.call(arguments))}v(t,i,r,{once:!0}),"error"!==i&&function(t,i,e){"function"==typeof t.on&&v(t,"error",i,e)}(t,n,{once:!0})})},n.EventEmitter=n,n.prototype.Zf=void 0,n.prototype.$f=0,n.prototype.rv=void 0;var r=10;function h(t){if("function"!=typeof t)throw new g('The "listener" argument must be of type Function. Received type '+typeof t)}function o(t){return void 0===t.rv?n.defaultMaxListeners:t.rv}function a(t,i,e,s){var n,r,a;if(h(e),void 0===(r=t.Zf)?(r=t.Zf=w.create(null),t.$f=0):(void 0!==r.newListener&&(t.emit("newListener",i,e.listener?e.listener:e),r=t.Zf),a=r[i]),void 0===a)a=r[i]=e,++t.$f;else if("function"==typeof a?a=r[i]=s?[e,a]:[a,e]:s?a.unshift(e):a.push(e),(n=o(t))>0&&a.length>n&&!a.warned){a.warned=!0;var u=new m("Possible EventEmitter memory leak detected. "+a.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=i,u.count=a.length,function(t){console&&console.warn&&console.warn(t)}(u)}return t}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(t,i,e){var s={fired:!1,wrapFn:void 0,target:t,type:i,listener:e},n=u.bind(s);return n.listener=e,s.wrapFn=n,n}function d(t,i,e){var s=t.Zf;if(void 0===s)return[];var n=s[i];return void 0===n?[]:"function"==typeof n?e?[n.listener||n]:[n]:e?function(t){for(var i=new Array(t.length),e=0;e0&&(h=i[0]),h instanceof m)throw h;var o=new m("Unhandled error."+(h?" ("+h.message+")":""));throw o.context=h,o}var a=r[t];if(void 0===a)return!1;if("function"==typeof a)e(a,this,i);else{var u=a.length,c=f(a,u);for(s=0;s=0;r--)if(e[r]===i||e[r].listener===i){o=e[r].listener,n=r;break}if(n<0)return this;0===n?e.shift():function(t,i){for(;i+1=0;s--)this.removeListener(t,i[s]);return this},n.prototype.listeners=function(t){return d(this,t,!0)},n.prototype.rawListeners=function(t){return d(this,t,!1)},n.listenerCount=function(t,i){return"function"==typeof t.listenerCount?t.listenerCount(i):l.call(t,i)},n.prototype.listenerCount=l,n.prototype.eventNames=function(){return this.$f>0?t(this.Zf):[]},ct.exports}const lt=b(dt());var ft,vt={exports:{}};var _t=function(){if(ft)return vt.exports;ft=1,vt.exports=i,vt.exports.filter=function(e,s){var n=new t;return i(e,n,s),n};var t=dt().EventEmitter;function i(t,i,e){Array.isArray(e)||(e=[e]);var s=[];return e.forEach(function(e){var n=function(){var t=[].slice.call(arguments);t.unshift(e),i.emit.apply(i,t)};s.push(n),t.on(e,n)}),function(){e.forEach(function(i,e){t.removeListener(i,s[e])})}}return vt.exports}();const gt=b(_t);var pt,mt={exports:{}};var wt=(pt||(pt=1,function(t){var i;self,i=()=>{return t={7:t=>{var i,e="object"==typeof Reflect?Reflect:null,s=e&&"function"==typeof e.apply?e.apply:function(t,i,e){return Function.prototype.apply.call(t,i,e)};i=e&&"function"==typeof e.ownKeys?e.ownKeys:w.getOwnPropertySymbols?function(t){return w.getOwnPropertyNames(t).concat(w.getOwnPropertySymbols(t))}:function(t){return w.getOwnPropertyNames(t)};var n=Number.isNaN||function(t){return t!=t};function r(){r.init.call(this)}t.exports=r,t.exports.once=function(t,i){return new Promise(function(e,s){function n(e){t.removeListener(i,r),s(e)}function r(){"function"==typeof t.removeListener&&t.removeListener("error",n),e([].slice.call(arguments))}var h,o;_(t,i,r,{once:!0}),"error"!==i&&(o=n,"function"==typeof(h=t).on&&_(h,"error",o,{once:!0}))})},r.EventEmitter=r,r.prototype.Zf=void 0,r.prototype.$f=0,r.prototype.rv=void 0;var h=10;function o(t){if("function"!=typeof t)throw new g('The "listener" argument must be of type Function. Received type '+typeof t)}function a(t){return void 0===t.rv?r.defaultMaxListeners:t.rv}function u(t,i,e,s){var n,r,h,u;if(o(e),void 0===(r=t.Zf)?(r=t.Zf=w.create(null),t.$f=0):(void 0!==r.newListener&&(t.emit("newListener",i,e.listener?e.listener:e),r=t.Zf),h=r[i]),void 0===h)h=r[i]=e,++t.$f;else if("function"==typeof h?h=r[i]=s?[e,h]:[h,e]:s?h.unshift(e):h.push(e),(n=a(t))>0&&h.length>n&&!h.warned){h.warned=!0;var c=new m("Possible EventEmitter memory leak detected. "+h.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=i,c.count=h.length,u=c,console&&console.warn&&console.warn(u)}return t}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,i,e){var s={fired:!1,wrapFn:void 0,target:t,type:i,listener:e},n=c.bind(s);return n.listener=e,s.wrapFn=n,n}function l(t,i,e){var s=t.Zf;if(void 0===s)return[];var n=s[i];return void 0===n?[]:"function"==typeof n?e?[n.listener||n]:[n]:e?function(t){for(var i=new Array(t.length),e=0;e0&&(h=i[0]),h instanceof m)throw h;var o=new m("Unhandled error."+(h?" ("+h.message+")":""));throw o.context=h,o}var a=r[t];if(void 0===a)return!1;if("function"==typeof a)s(a,this,i);else{var u=a.length,c=v(a,u);for(e=0;e=0;r--)if(e[r]===i||e[r].listener===i){h=e[r].listener,n=r;break}if(n<0)return this;0===n?e.shift():function(t,i){for(;i+1=0;s--)this.removeListener(t,i[s]);return this},r.prototype.listeners=function(t){return l(this,t,!0)},r.prototype.rawListeners=function(t){return l(this,t,!1)},r.listenerCount=function(t,i){return"function"==typeof t.listenerCount?t.listenerCount(i):f.call(t,i)},r.prototype.listenerCount=f,r.prototype.eventNames=function(){return this.$f>0?i(this.Zf):[]}},156:function(t,i,e){var s=this&&this.hv||(w.create?function(t,i,e,s){void 0===s&&(s=e);var n=w.getOwnPropertyDescriptor(i,e);n&&!("get"in n?!i.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return i[e]}}),w.defineProperty(t,s,n)}:function(t,i,e,s){void 0===s&&(s=e),t[s]=i[e]}),n=this&&this.ov||function(t,i){for(var e in t)"default"===e||w.prototype.hasOwnProperty.call(i,e)||s(i,t,e)},r=this&&this.uv||function(t){return t&&t.__esModule?t:{default:t}};w.defineProperty(i,"__esModule",{value:!0}),i.Logger=void 0;var h=e(586);w.defineProperty(i,"Logger",{enumerable:!0,get:function(){return r(h).default}}),n(e(284),i),n(e(280),i),n(e(738),i),n(e(767),i)},185:(t,i)=>{w.defineProperty(i,"__esModule",{value:!0}),i.calculatePacketsLostRatio=i.calculateRate=i.getMediaKind=void 0,i.getMediaKind=t=>{let i=t.kind||t.mediaType;return["audio","video"].includes(i)||"inbound-rtp"!==t.type||(i=t.id.toLocaleLowerCase().includes("video")?"video":"audio"),i},i.calculateRate=(t,i,e,s)=>e&&s?(i-s)/((t-e)/1e3):0,i.calculatePacketsLostRatio=(t,i,e,s)=>{const n=t-(null!=e?e:0),r=n+(i-(null!=s?s:0));return 0===r?0:n/r}},280:(t,i)=>{w.defineProperty(i,"__esModule",{value:!0})},284:function(t,i,e){var s,n,r,h,o,a,u,c,d,l,f,_,m,y,A,b,S=this&&this.fv||function(t,i,e,s){return new(e||(e=Promise))(function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e(function(t){t(i)})).then(h,o)}a((s=s.apply(t,i||[])).next())})},T=this&&this.vv||function(t,i,e,s,n){if("m"===s)throw new g("Private method is not writable");if("a"===s&&!n)throw new g("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!n:!i.has(t))throw new g("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,e):n?n.value=e:i.set(t,e),e},k=this&&this._v||function(t,i,e,s){if("a"===e&&!s)throw new g("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new g("Cannot read private member from an object whose class did not declare it");return"m"===e?s:"a"===e?s.call(t):s?s.value:i.get(t)},E=this&&this.uv||function(t){return t&&t.__esModule?t:{default:t}};w.defineProperty(i,"__esModule",{value:!0}),i.WebRTCStats=void 0;const P=e(7),x=E(e(586)),I=e(738),R=e(185);class C extends P.EventEmitter{constructor(t){super(),s.add(this),n.set(this,void 0),r.set(this,void 0),h.set(this,void 0),o.set(this,null),a.set(this,void 0),u.set(this,null),this.start=()=>{k(this,a,"f").info("WebRTC statistics collection is starting..."),T(this,u,null,"f"),T(this,o,v(k(this,c,"f"),k(this,r,"f")),"f")},this.stop=()=>{k(this,o,"f")&&(p(k(this,o,"f")),T(this,o,null,"f"),k(this,a,"f").info("WebRTC statistics collection has stopped."))},c.set(this,()=>S(this,void 0,void 0,function*(){let t,i;try{k(this,a,"f").trace("Requesting WebRTC statistics..."),t=yield k(this,n,"f").call(this),i=(new Date).toISOString()}catch(t){return k(this,a,"f").error("Problem collecting the WebRTC statistics.",t),void this.emit("error","Problem collecting the WebRTC statistics - ".concat(t))}const e=Array.from(t.values()),r={timestamp:i,input:{audio:[],video:[]},output:{audio:[],video:[]}};k(this,h,"f")&&(r.rawStats=t);for(let i=0;it.id===i.id);if(r&&i.timestamp-r.timestamp<=0)return;const h=yield k(this,s,"m",l).call(this,t,i,r),o=w.assign({},h);e.output.audio.push(o)})},_=function(t,i,e){return S(this,void 0,void 0,function*(){var n;const r=null===(n=k(this,u,"f"))||void 0===n?void 0:n.output.video.find(t=>t.id===i.id);if(r&&i.timestamp-r.timestamp<=0)return;const h=yield k(this,s,"m",l).call(this,t,i,r);let o=I.QualityLimitationReason.none;i.qualityLimitationReason&&(o=i.qualityLimitationReason);const a=w.assign(w.assign({},h),{frameWidth:i.frameWidth,frameHeight:i.frameHeight,framesPerSecond:i.framesPerSecond,framesSent:i.framesSent,qualityLimitationReason:o,qualityLimitationDurations:i.qualityLimitationDurations});e.output.video.push(a)})},m=function(t,i,e){return S(this,void 0,void 0,function*(){var n,r;const h=(0,R.calculateRate)(i.timestamp,i.bytesReceived,null==e?void 0:e.timestamp,null==e?void 0:e.totalBytesReceived),o=(0,R.calculateRate)(i.timestamp,i.packetsReceived,null==e?void 0:e.timestamp,null==e?void 0:e.totalPacketsReceived),a=(0,R.calculatePacketsLostRatio)(i.packetsLost,i.packetsReceived,null==e?void 0:e.totalPacketsLost,null==e?void 0:e.totalPacketsReceived),u=(null!==(n=i.packetsLost)&&void 0!==n?n:0)-(null!==(r=null==e?void 0:e.totalPacketsLost)&&void 0!==r?r:0),c=k(this,s,"m",d).call(this,t,i.codecId);return w.assign({id:i.id,timestamp:i.timestamp,mid:i.mid,trackIdentifier:i.trackIdentifier,jitter:i.jitter,jitterBufferDelay:i.jitterBufferDelay,jitterBufferEmittedCount:i.jitterBufferEmittedCount,totalBytesReceived:i.bytesReceived,totalPacketsReceived:i.packetsReceived,totalPacketsLost:i.packetsLost,bitrate:h,packetRate:o,packetLossRatio:a,packetLossDelta:u},c)})},y=function(t,i,e){return S(this,void 0,void 0,function*(){var n;const r=null===(n=k(this,u,"f"))||void 0===n?void 0:n.input.audio.find(t=>t.id===i.id);if(r&&i.timestamp-r.timestamp<=0)return;const h=yield k(this,s,"m",m).call(this,t,i,r);e.input.audio.push(h)})},A=function(t,i,e){return S(this,void 0,void 0,function*(){var n;const r=null===(n=k(this,u,"f"))||void 0===n?void 0:n.input.video.find(t=>t.id===i.id);if(r&&i.timestamp-r.timestamp<=0)return;const h=yield k(this,s,"m",m).call(this,t,i,r),o=w.assign(w.assign({},h),{keyFramesDecoded:i.keyFramesDecoded,frameHeight:i.frameHeight,frameWidth:i.frameWidth,framesDecoded:i.framesDecoded,framesDropped:i.framesDropped,framesPerSecond:i.framesPerSecond,framesReceived:i.framesReceived});e.input.video.push(o)})},b=function(t,i){i.totalRoundTripTime=t.totalRoundTripTime,i.currentRoundTripTime=t.currentRoundTripTime,i.responsesReceived=t.responsesReceived,i.availableOutgoingBitrate=t.availableOutgoingBitrate,i.availableIncomingBitrate=t.availableIncomingBitrate}},586:function(t,i,e){var s,n;!function(){var r,h={VERSION:"1.6.1"},o={},a=function(t,i){return function(){return i.apply(t,arguments)}},u=function(){var t,i,e=arguments,s=e[0];for(i=1;i=i.value},trace:function(){this.invoke(h.TRACE,arguments)},debug:function(){this.invoke(h.DEBUG,arguments)},info:function(){this.invoke(h.INFO,arguments)},warn:function(){this.invoke(h.WARN,arguments)},error:function(){this.invoke(h.ERROR,arguments)},time:function(t){"string"==typeof t&&t.length>0&&this.invoke(h.TIME,[t,"start"])},timeEnd:function(t){"string"==typeof t&&t.length>0&&this.invoke(h.TIME,[t,"end"])},invoke:function(t,i){r&&this.enabledFor(t)&&r(i,u({level:t},this.context))}};var l,f=new d({filterLevel:h.OFF});(l=h).enabledFor=a(f,f.enabledFor),l.trace=a(f,f.trace),l.debug=a(f,f.debug),l.time=a(f,f.time),l.timeEnd=a(f,f.timeEnd),l.info=a(f,f.info),l.warn=a(f,f.warn),l.error=a(f,f.error),l.log=l.info,h.setHandler=function(t){r=t},h.setLevel=function(t){for(var i in f.setLevel(t),o)o.hasOwnProperty(i)&&o[i].setLevel(t)},h.getLevel=function(){return f.getLevel()},h.get=function(t){return o[t]||(o[t]=new d(u({name:t},f.context)))},h.createDefaultHandler=function(t){(t=t||{}).formatter=t.formatter||function(t,i){i.name&&t.unshift("["+i.name+"]")};var i={},e=function(t,i){Function.prototype.apply.call(t,console,i)};return typeof console>"u"?function(){}:function(s,n){s=Array.prototype.slice.call(s);var r,o=console.log;n.level===h.TIME?(r=(n.name?"["+n.name+"] ":"")+s[0],"start"===s[1]?console.time?console.time(r):i[r]=(new Date).getTime():console.timeEnd?console.timeEnd(r):e(o,[r+": "+((new Date).getTime()-i[r])+"ms"])):(n.level===h.WARN&&console.warn?o=console.warn:n.level===h.ERROR&&console.error?o=console.error:n.level===h.INFO&&console.info?o=console.info:n.level===h.DEBUG&&console.debug?o=console.debug:n.level===h.TRACE&&console.trace&&(o=console.trace),t.formatter(s,n),e(o,s))}},h.useDefaults=function(t){h.setLevel(t&&t.defaultLevel||h.DEBUG),h.setHandler(h.createDefaultHandler(t))},h.setDefaults=h.useDefaults,void 0===(n="function"==typeof(s=h)?s.call(i,e,i,t):s)||(t.exports=n)}()},738:(t,i)=>{var e,s;w.defineProperty(i,"__esModule",{value:!0}),i.QualityLimitationReason=void 0,(s=e||(i.QualityLimitationReason=e={}))[s.none=0]="none",s[s.cpu=1]="cpu",s[s.bandwidth=2]="bandwidth",s[s.other=3]="other"},767:(t,i)=>{w.defineProperty(i,"__esModule",{value:!0})}},i={},function e(s){var n=i[s];if(void 0!==n)return n.exports;var r=i[s]={exports:{}};return t[s].call(r.exports,r,r.exports,e),r.exports}(156);var t,i},t.exports=i()}(mt)),mt.exports);const yt=at.get("PeerConnectionStats"),At="stats";class bt extends lt{init(t){if(this.initialized)return void yt.warn("PeerConnectionStats.init() has already been called. Automatic initialization occurs when the PeerConnectionStats object is constructed.");yt.info("Initializing peer connection stats");const i=this.peer;try{this.collection=new wt.WebRTCStats({getStatsInterval:t,getStats:()=>i.getStats(),includeRawStats:!0}),this.collection.on("stats",t=>{const i=(t=>{const i=t,{input:e,output:s,rawStats:n}=i,r=y(i,["input","output","rawStats"]);return f(l({},r),{audio:{inbounds:t.input.audio.map(t=>{var i=t,{packetLossRatio:e,packetLossDelta:s,bitrate:n}=i,r=y(i,["packetLossRatio","packetLossDelta","bitrate"]);return l({packetsLostRatioPerSecond:e,packetsLostDeltaPerSecond:s,bitrateBitsPerSecond:8*n,bitrate:n},r)}),outbounds:t.output.audio.map(t=>{var i=t,{packetLossRatio:e,packetLossDelta:s,bitrate:n}=i,r=y(i,["packetLossRatio","packetLossDelta","bitrate"]);return l({packetsLostRatioPerSecond:e,packetsLostDeltaPerSecond:s,bitrateBitsPerSecond:8*n,bitrate:n},r)})},video:{inbounds:t.input.video.map(t=>{var i=t,{packetLossRatio:e,packetLossDelta:s,bitrate:n}=i,r=y(i,["packetLossRatio","packetLossDelta","bitrate"]);return l({packetsLostRatioPerSecond:e,packetsLostDeltaPerSecond:s,bitrateBitsPerSecond:8*n,bitrate:n},r)}),outbounds:t.output.video.map(t=>{var i=t,{packetLossRatio:e,packetLossDelta:s,bitrate:n}=i,r=y(i,["packetLossRatio","packetLossDelta","bitrate"]);return l({packetsLostRatioPerSecond:e,packetsLostDeltaPerSecond:s,bitrateBitsPerSecond:8*n,bitrate:n},r)})},raw:t.rawStats})})(t);Y(i),this.emit(At,i)}),this.collection.start(),this.initialized=!0}catch(t){yt.error(t)}}parseStats(t){return yt.warn("The parseStats method is deprecated and will be removed in future releases."),null}stop(){yt.info("Stopping peer connection stats"),this.collection.stop()}constructor(t,i={statsIntervalMs:1e3,autoInitStats:!0}){super(),this.peer=t,this.collection=null,this.initialized=!1,i.autoInitStats&&this.init(i.statsIntervalMs)}}var St,Tt,kt,Et,Pt,xt,It,Rt,Ct,Dt,Bt,Nt,Mt,Lt,Ot,Ft,Ut,Vt,Ht,Wt,qt,zt={},Gt={},Xt={},jt={exports:{}};function Qt(){if(St)return jt.exports;St=1;var t=jt.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(t){return t.encoding?"rtpmap:%d %s/%s/%s":t.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(t){return null!=t.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(t){return null!=t.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(t){return"extmap:%d"+(t.direction?"/%s":"%v")+(t["encrypt-uri"]?" %s":"%v")+" %s"+(t.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(t){return null!=t.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(t){var i="candidate:%s %d %s %d %s %d typ %s";return i+=null!=t.raddr?" raddr %s rport %d":"%v%v",i+=null!=t.tcptype?" tcptype %s":"%v",null!=t.generation&&(i+=" generation %d"),i+=null!=t["network-id"]?" network-id %d":"%v",i+=null!=t["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(t){var i="ssrc:%d";return null!=t.attribute&&(i+=" %s",null!=t.value&&(i+=":%s")),i}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(t){return null!=t.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(t){return t.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(t){return"imageattr:%s %s %s"+(t.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(t){return"simulcast:%s %s"+(t.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(t){return"ts-refclk:%s"+(null!=t.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(t){var i="mediaclk:";return i+=null!=t.id?"id=%s %s":"%v%s",i+=null!=t.mediaClockValue?"=%s":"",i+=null!=t.rateNumerator?" rate=%s":"",i+=null!=t.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};return w.keys(t).forEach(function(i){t[i].forEach(function(t){t.reg||(t.reg=/(.*)/),t.format||(t.format="%s")})}),jt.exports}function Kt(){return Tt||(Tt=1,function(t){var i=function(t){return String(Number(t))===t?Number(t):t},e=function(t,e,s){var n=t.name&&t.names;t.push&&!e[t.push]?e[t.push]=[]:n&&!e[t.name]&&(e[t.name]={});var r=t.push?{}:n?e[t.name]:e;(function(t,e,s,n){if(n&&!s)e[n]=i(t[1]);else for(var r=0;r1&&(t[s[0]]=void 0),t};t.parseParams=function(t){return t.split(/;\s?/).reduce(r,{})},t.parseFmtpConfig=t.parseParams,t.parsePayloads=function(t){return t.toString().split(" ").map(Number)},t.parseRemoteCandidates=function(t){for(var e=[],s=t.split(" ").map(i),n=0;n=n)return t;var i=s[e];switch(e+=1,t){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}})},s=function(t,i,s){var n=[t+"="+(i.format instanceof Function?i.format(i.push?s:s[i.name]):i.format)];if(i.names)for(var r=0;r0?o-4:o;for(n=0;n>16&255,u[c++]=s>>8&255,u[c++]=255&s;return 2===a&&(s=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[c++]=255&s),1===a&&(s=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[c++]=s>>8&255,u[c++]=255&s),u},ai.fromByteArray=function(i){for(var e,s=i.length,n=s%3,r=[],h=16383,a=0,u=s-n;au?u:a+h));return 1===n?(e=i[s-1],r.push(t[e>>2]+t[e<<4&63]+"==")):2===n&&(e=(i[s-2]<<8)+i[s-1],r.push(t[e>>10]+t[e>>4&63]+t[e<<2&63]+"=")),r.join("")};for(var t=[],i=[],e=typeof j<"u"?j:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0;n<64;++n)t[n]=s[n],i[s.charCodeAt(n)]=n;function r(t){var i=t.length;if(i%4>0)throw new m("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=i),[e,e===i?0:4-e%4]}function h(i){return t[i>>18&63]+t[i>>12&63]+t[i>>6&63]+t[63&i]}function o(t,i,e){for(var s,n=[],r=i;r>1,c=-7,d=e?n-1:0,l=e?-1:1,f=t[i+d];for(d+=l,r=f&(1<<-c)-1,f>>=-c,c+=o;c>0;r=256*r+t[i+d],d+=l,c-=8);for(h=r&(1<<-c)-1,r>>=-c,c+=s;c>0;h=256*h+t[i+d],d+=l,c-=8);if(0===r)r=1-u;else{if(r===a)return h?NaN:1/0*(f?-1:1);h+=_.pow(2,s),r-=u}return(f?-1:1)*h*_.pow(2,r-s)},Wi.write=function(t,i,e,s,n,r){var h,o,a,u=8*r-n-1,c=(1<>1,l=23===n?_.pow(2,-24)-_.pow(2,-77):0,f=s?0:r-1,v=s?1:-1,g=i<0||0===i&&1/i<0?1:0;for(i=_.abs(i),S(i)||i===1/0?(o=S(i)?1:0,h=c):(h=_.floor(_.log(i)/_.LN2),i*(a=_.pow(2,-h))<1&&(h--,a*=2),(i+=h+d>=1?l/a:l*_.pow(2,1-d))*a>=2&&(h++,a/=2),h+d>=c?(o=0,h=c):h+d>=1?(o=(i*a-1)*_.pow(2,n),h+=d):(o=i*_.pow(2,d-1)*_.pow(2,n),h=0));n>=8;t[e+f]=255&o,f+=v,o/=256,n-=8);for(h=h<0;t[e+f]=255&h,f+=v,h/=256,u-=8);t[e+f-v]|=128*g}),Wi),s="function"==typeof Io&&"function"==typeof td?td("nodejs.util.inspect.custom"):null;t.Buffer=h,t.SlowBuffer=function(t){return+t!=t&&(t=0),h.alloc(+t)},t.INSPECT_MAX_BYTES=50;const n=2147483647;function r(t){if(t>n)throw new RangeError('The value "'+t+'" is invalid for option "size"');const i=new j(t);return w.setPrototypeOf(i,h.prototype),i}function h(t,i,e){if("number"==typeof t){if("string"==typeof i)throw new g('The "string" argument must be of type string. Received type number');return u(t)}return o(t,i,e)}function o(t,i,e){if("string"==typeof t)return function(t,i){if(("string"!=typeof i||""===i)&&(i="utf8"),!h.isEncoding(i))throw new g("Unknown encoding: "+i);const e=0|f(t,i);let s=r(e);const n=s.write(t,i);return n!==e&&(s=s.slice(0,n)),s}(t,i);if(ArrayBuffer.isView(t))return function(t){if(tt(t,j)){const i=new j(t);return d(i.buffer,i.byteOffset,i.byteLength)}return c(t)}(t);if(null==t)throw new g("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(tt(t,ArrayBuffer)||t&&tt(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tt(t,SharedArrayBuffer)||t&&tt(t.buffer,SharedArrayBuffer)))return d(t,i,e);if("number"==typeof t)throw new g('The "value" argument must not be of type number. Received type number');const s=t.valueOf&&t.valueOf();if(null!=s&&s!==t)return h.from(s,i,e);const n=function(t){if(h.isBuffer(t)){const i=0|l(t.length),e=r(i);return 0===e.length||t.copy(e,0,0,i),e}if(void 0!==t.length)return"number"!=typeof t.length||it(t.length)?r(0):c(t);if("Buffer"===t.type&&Array.isArray(t.data))return c(t.data)}(t);if(n)return n;if(typeof Io<"u"&&null!=Io.toPrimitive&&"function"==typeof t[Io.toPrimitive])return h.from(t[Io.toPrimitive]("string"),i,e);throw new g("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function a(t){if("number"!=typeof t)throw new g('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return a(t),r(t<0?0:0|l(t))}function c(t){const i=t.length<0?0:0|l(t.length),e=r(i);for(let s=0;s=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|t}function f(t,i){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||tt(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new g('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const e=t.length,s=arguments.length>2&&!0===arguments[2];if(!s&&0===e)return 0;let n=!1;for(;;)switch(i){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return J(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return Z(t).length;default:if(n)return s?-1:J(t).length;i=(""+i).toLowerCase(),n=!0}}function v(t,i,e){let s=!1;if((void 0===i||i<0)&&(i=0),i>this.length||((void 0===e||e>this.length)&&(e=this.length),e<=0)||(e>>>=0)<=(i>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return N(this,i,e);case"utf8":case"utf-8":return R(this,i,e);case"ascii":return D(this,i,e);case"latin1":case"binary":return B(this,i,e);case"base64":return I(this,i,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,i,e);default:if(s)throw new g("Unknown encoding: "+t);t=(t+"").toLowerCase(),s=!0}}function p(t,i,e){const s=t[i];t[i]=t[e],t[e]=s}function y(t,i,e,s,n){if(0===t.length)return-1;if("string"==typeof e?(s=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),it(e=+e)&&(e=n?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(n)return-1;e=t.length-1}else if(e<0){if(!n)return-1;e=0}if("string"==typeof i&&(i=h.from(i,s)),h.isBuffer(i))return 0===i.length?-1:A(t,i,e,s,n);if("number"==typeof i)return i&=255,"function"==typeof j.prototype.indexOf?n?j.prototype.indexOf.call(t,i,e):j.prototype.lastIndexOf.call(t,i,e):A(t,[i],e,s,n);throw new g("val must be string, number or Buffer")}function A(t,i,e,s,n){let r,h=1,o=t.length,a=i.length;if(void 0!==s&&("ucs2"===(s=String(s).toLowerCase())||"ucs-2"===s||"utf16le"===s||"utf-16le"===s)){if(t.length<2||i.length<2)return-1;h=2,o/=2,a/=2,e/=2}function u(t,i){return 1===h?t[i]:t.readUInt16BE(i*h)}if(n){let s=-1;for(r=e;ro&&(e=o-a),r=e;r>=0;r--){let e=!0;for(let s=0;sn&&(s=n):s=n;const r=i.length;let h;for(s>r/2&&(s=r/2),h=0;h>8,n=e%256,r.push(n),r.push(s);return r}(i,t.length-e),t,e,s)}function I(t,e,s){return 0===e&&s===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,s))}function R(t,i,e){e=_.min(t.length,e);const s=[];let n=i;for(;n239?4:i>223?3:i>191?2:1;if(n+h<=e){let e,s,o,a;switch(h){case 1:i<128&&(r=i);break;case 2:e=t[n+1],128==(192&e)&&(a=(31&i)<<6|63&e,a>127&&(r=a));break;case 3:e=t[n+1],s=t[n+2],128==(192&e)&&128==(192&s)&&(a=(15&i)<<12|(63&e)<<6|63&s,a>2047&&(a<55296||a>57343)&&(r=a));break;case 4:e=t[n+1],s=t[n+2],o=t[n+3],128==(192&e)&&128==(192&s)&&128==(192&o)&&(a=(15&i)<<18|(63&e)<<12|(63&s)<<6|63&o,a>65535&&a<1114112&&(r=a))}}null===r?(r=65533,h=1):r>65535&&(r-=65536,s.push(r>>>10&1023|55296),r=56320|1023&r),s.push(r),n+=h}return function(t){const i=t.length;if(i<=C)return String.fromCharCode.apply(String,t);let e="",s=0;for(;ss.length?(h.isBuffer(i)||(i=h.from(i)),i.copy(s,n)):j.prototype.set.call(s,i,n);else{if(!h.isBuffer(i))throw new g('"list" argument must be an Array of Buffers');i.copy(s,n)}n+=i.length}return s},h.byteLength=f,h.prototype.mv=!0,h.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let i=0;ie&&(i+=" ... "),""},s&&(h.prototype[s]=h.prototype.inspect),h.prototype.compare=function(t,i,e,s,n){if(tt(t,j)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw new g('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===i&&(i=0),void 0===e&&(e=t?t.length:0),void 0===s&&(s=0),void 0===n&&(n=this.length),i<0||e>t.length||s<0||n>this.length)throw new RangeError("out of range index");if(s>=n&&i>=e)return 0;if(s>=n)return-1;if(i>=e)return 1;if(this===t)return 0;let r=(n>>>=0)-(s>>>=0),o=(e>>>=0)-(i>>>=0);const a=_.min(r,o),u=this.slice(s,n),c=t.slice(i,e);for(let t=0;t>>=0,isFinite(e)?(e>>>=0,void 0===s&&(s="utf8")):(s=e,e=void 0)}const n=this.length-i;if((void 0===e||e>n)&&(e=n),t.length>0&&(e<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");s||(s="utf8");let r=!1;for(;;)switch(s){case"hex":return b(this,t,i,e);case"utf8":case"utf-8":return T(this,t,i,e);case"ascii":case"latin1":case"binary":return k(this,t,i,e);case"base64":return E(this,t,i,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,i,e);default:if(r)throw new g("Unknown encoding: "+s);s=(""+s).toLowerCase(),r=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this.yv||this,0)}};const C=4096;function D(t,i,e){let s="";e=_.min(t.length,e);for(let n=i;ns)&&(e=s);let n="";for(let s=i;se)throw new RangeError("Trying to access beyond buffer length")}function O(t,i,e,s,n,r){if(!h.isBuffer(t))throw new g('"buffer" argument must be a Buffer instance');if(i>n||it.length)throw new RangeError("Index out of range")}function F(t,i,e,s,n){X(i,s,n,t,e,7);let r=Number(i&BigInt(4294967295));t[e++]=r,r>>=8,t[e++]=r,r>>=8,t[e++]=r,r>>=8,t[e++]=r;let h=Number(i>>BigInt(32)&BigInt(4294967295));return t[e++]=h,h>>=8,t[e++]=h,h>>=8,t[e++]=h,h>>=8,t[e++]=h,e}function U(t,i,e,s,n){X(i,s,n,t,e,7);let r=Number(i&BigInt(4294967295));t[e+7]=r,r>>=8,t[e+6]=r,r>>=8,t[e+5]=r,r>>=8,t[e+4]=r;let h=Number(i>>BigInt(32)&BigInt(4294967295));return t[e+3]=h,h>>=8,t[e+2]=h,h>>=8,t[e+1]=h,h>>=8,t[e]=h,e+8}function V(t,i,e,s,n,r){if(e+s>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function H(t,i,s,n,r){return i=+i,s>>>=0,r||V(t,0,s,4),e.write(t,i,s,n,23,4),s+4}function W(t,i,s,n,r){return i=+i,s>>>=0,r||V(t,0,s,8),e.write(t,i,s,n,52,8),s+8}h.prototype.slice=function(t,i){const e=this.length;(t=~~t)<0?(t+=e)<0&&(t=0):t>e&&(t=e),(i=void 0===i?e:~~i)<0?(i+=e)<0&&(i=0):i>e&&(i=e),i>>=0,i>>>=0,e||L(t,i,this.length);let s=this[t],n=1,r=0;for(;++r>>=0,i>>>=0,e||L(t,i,this.length);let s=this[t+--i],n=1;for(;i>0&&(n*=256);)s+=this[t+--i]*n;return s},h.prototype.readUint8=h.prototype.readUInt8=function(t,i){return t>>>=0,i||L(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,i){return t>>>=0,i||L(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,i){return t>>>=0,i||L(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,i){return t>>>=0,i||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,i){return t>>>=0,i||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readBigUInt64LE=st(function(t){Q(t>>>=0,"offset");const i=this[t],e=this[t+7];(void 0===i||void 0===e)&&K(t,this.length-8);const s=i+256*this[++t]+65536*this[++t]+this[++t]*2**24,n=this[++t]+256*this[++t]+65536*this[++t]+e*2**24;return BigInt(s)+(BigInt(n)<>>=0,"offset");const i=this[t],e=this[t+7];(void 0===i||void 0===e)&&K(t,this.length-8);const s=i*2**24+65536*this[++t]+256*this[++t]+this[++t],n=this[++t]*2**24+65536*this[++t]+256*this[++t]+e;return(BigInt(s)<>>=0,i>>>=0,e||L(t,i,this.length);let s=this[t],n=1,r=0;for(;++r=n&&(s-=_.pow(2,8*i)),s},h.prototype.readIntBE=function(t,i,e){t>>>=0,i>>>=0,e||L(t,i,this.length);let s=i,n=1,r=this[t+--s];for(;s>0&&(n*=256);)r+=this[t+--s]*n;return n*=128,r>=n&&(r-=_.pow(2,8*i)),r},h.prototype.readInt8=function(t,i){return t>>>=0,i||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,i){t>>>=0,i||L(t,2,this.length);const e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},h.prototype.readInt16BE=function(t,i){t>>>=0,i||L(t,2,this.length);const e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},h.prototype.readInt32LE=function(t,i){return t>>>=0,i||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,i){return t>>>=0,i||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readBigInt64LE=st(function(t){Q(t>>>=0,"offset");const i=this[t],e=this[t+7];(void 0===i||void 0===e)&&K(t,this.length-8);const s=this[t+4]+256*this[t+5]+65536*this[t+6]+(e<<24);return(BigInt(s)<>>=0,"offset");const i=this[t],e=this[t+7];(void 0===i||void 0===e)&&K(t,this.length-8);const s=(i<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(s)<>>=0,i||L(t,4,this.length),e.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,i){return t>>>=0,i||L(t,4,this.length),e.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,i){return t>>>=0,i||L(t,8,this.length),e.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,i){return t>>>=0,i||L(t,8,this.length),e.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,i,e,s){if(t=+t,i>>>=0,e>>>=0,!s){O(this,t,i,e,_.pow(2,8*e)-1,0)}let n=1,r=0;for(this[i]=255&t;++r>>=0,e>>>=0,!s){O(this,t,i,e,_.pow(2,8*e)-1,0)}let n=e-1,r=1;for(this[i+n]=255&t;--n>=0&&(r*=256);)this[i+n]=t/r&255;return i+e},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,1,255,0),this[i]=255&t,i+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,2,65535,0),this[i]=255&t,this[i+1]=t>>>8,i+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,2,65535,0),this[i]=t>>>8,this[i+1]=255&t,i+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,4,4294967295,0),this[i+3]=t>>>24,this[i+2]=t>>>16,this[i+1]=t>>>8,this[i]=255&t,i+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,4,4294967295,0),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=255&t,i+4},h.prototype.writeBigUInt64LE=st(function(t,i){return void 0===i&&(i=0),F(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=st(function(t,i){return void 0===i&&(i=0),U(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(t,i,e,s){if(t=+t,i>>>=0,!s){const s=_.pow(2,8*e-1);O(this,t,i,e,s-1,-s)}let n=0,r=1,h=0;for(this[i]=255&t;++n>>=0,!s){const s=_.pow(2,8*e-1);O(this,t,i,e,s-1,-s)}let n=e-1,r=1,h=0;for(this[i+n]=255&t;--n>=0&&(r*=256);)t<0&&0===h&&0!==this[i+n+1]&&(h=1),this[i+n]=(t/r|0)-h&255;return i+e},h.prototype.writeInt8=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,1,127,-128),t<0&&(t=255+t+1),this[i]=255&t,i+1},h.prototype.writeInt16LE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,2,32767,-32768),this[i]=255&t,this[i+1]=t>>>8,i+2},h.prototype.writeInt16BE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,2,32767,-32768),this[i]=t>>>8,this[i+1]=255&t,i+2},h.prototype.writeInt32LE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,4,2147483647,-2147483648),this[i]=255&t,this[i+1]=t>>>8,this[i+2]=t>>>16,this[i+3]=t>>>24,i+4},h.prototype.writeInt32BE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=255&t,i+4},h.prototype.writeBigInt64LE=st(function(t,i){return void 0===i&&(i=0),F(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=st(function(t,i){return void 0===i&&(i=0),U(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeFloatLE=function(t,i,e){return H(this,t,i,!0,e)},h.prototype.writeFloatBE=function(t,i,e){return H(this,t,i,!1,e)},h.prototype.writeDoubleLE=function(t,i,e){return W(this,t,i,!0,e)},h.prototype.writeDoubleBE=function(t,i,e){return W(this,t,i,!1,e)},h.prototype.copy=function(t,i,e,s){if(!h.isBuffer(t))throw new g("argument should be a Buffer");if(e||(e=0),!s&&0!==s&&(s=this.length),i>=t.length&&(i=t.length),i||(i=0),s>0&&s=this.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),t.length-i>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(n=i;n=s+4;e-=3)i="_".concat(t.slice(e-3,e)).concat(i);return"".concat(t.slice(0,e)).concat(i)}function X(t,i,e,s,n,r){if(t>e||t= 0".concat(e," and < 2").concat(e," ** ").concat(8*(r+1)).concat(e):">= -(2".concat(e," ** ").concat(8*(r+1)-1).concat(e,") and < 2 ** ")+"".concat(8*(r+1)-1).concat(e),new q.ERR_OUT_OF_RANGE("value",s,t)}!function(t,i,e){Q(i,"offset"),(void 0===t[i]||void 0===t[i+e])&&K(i,t.length-(e+1))}(s,n,r)}function Q(t,i){if("number"!=typeof t)throw new q.ERR_INVALID_ARG_TYPE(i,"number",t)}function K(t,i,e){throw _.floor(t)!==t?(Q(t,e),new q.ERR_OUT_OF_RANGE("offset","an integer",t)):i<0?new q.ERR_BUFFER_OUT_OF_BOUNDS:new q.ERR_OUT_OF_RANGE("offset",">= 0 and <= ".concat(i),t)}z("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),z("ERR_INVALID_ARG_TYPE",function(t,i){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(typeof i)},g),z("ERR_OUT_OF_RANGE",function(t,i,e){let s='The value of "'.concat(t,'" is out of range.'),n=e;return Number.isInteger(e)&&_.abs(e)>2**32?n=G(String(e)):"bigint"==typeof e&&(n=String(e),(e>BigInt(2)**BigInt(32)||e<-(BigInt(2)**BigInt(32)))&&(n=G(n)),n+="n"),s+=" It must be ".concat(i,". Received ").concat(n),s},RangeError);const Y=/[^+/0-9A-Za-z-_]/g;function J(t,i){let e;i=i||1/0;const s=t.length;let n=null;const r=[];for(let h=0;h55295&&e<57344){if(!n){if(e>56319){(i-=3)>-1&&r.push(239,191,189);continue}if(h+1===s){(i-=3)>-1&&r.push(239,191,189);continue}n=e;continue}if(e<56320){(i-=3)>-1&&r.push(239,191,189),n=e;continue}e=65536+(n-55296<<10|e-56320)}else n&&(i-=3)>-1&&r.push(239,191,189);if(n=null,e<128){if((i-=1)<0)break;r.push(e)}else if(e<2048){if((i-=2)<0)break;r.push(e>>6|192,63&e|128)}else if(e<65536){if((i-=3)<0)break;r.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new m("Invalid code point");if((i-=4)<0)break;r.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return r}function Z(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(Y,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function $(t,i,e,s){let n;for(n=0;n=i.length||n>=t.length);++n)i[n+e]=t[n];return n}function tt(t,i){return t instanceof i||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===i.name}function it(t){return t!=t}const et=function(){const t="0123456789abcdef",i=new Array(256);for(let e=0;e<16;++e){const s=16*e;for(let n=0;n<16;++n)i[s+n]=t[e]+t[n]}return i}();function st(t){return typeof BigInt>"u"?nt:t}function nt(){throw new m("BigInt not supported")}}(oi)),oi}function zi(){if(li)return ri.exports;li=1;var t=65536;var i=(di||(di=1,function(t,i){var e=qi(),s=e.Buffer;function n(t,i){for(var e in t)i[e]=t[e]}function r(t,i,e){return s(t,i,e)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=e:(n(e,i),i.Buffer=r),r.prototype=w.create(s.prototype),n(s,r),r.from=function(t,i,e){if("number"==typeof t)throw new g("Argument must not be a number");return s(t,i,e)},r.alloc=function(t,i,e){if("number"!=typeof t)throw new g("Argument must be a number");var n=s(t);return void 0!==i?"string"==typeof e?n.fill(i,e):n.fill(i):n.fill(0),n},r.allocUnsafe=function(t){if("number"!=typeof t)throw new g("Argument must be a number");return s(t)},r.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new g("Argument must be a number");return e.SlowBuffer(t)}}(hi,hi.exports)),hi.exports).Buffer,e=A.crypto||A.msCrypto;return e&&e.getRandomValues?ri.exports=function(s,n){if(s>4294967295)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(s);if(s>0)if(s>t)for(var h=0;ht.clone()));for(const e of this.recv)t.addSimulcastAlternativeStreams(i.RECV,e.map(t=>t.clone()));return t}plain(){const t={send:[],recv:[]};for(const i of this.send)t.send.push(i.map(t=>t.plain()));for(const i of this.recv)t.recv.push(i.map(t=>t.plain()));return t}addSimulcastAlternativeStreams(t,e){return t===i.SEND?this.send.push(e):this.recv.push(e)}addSimulcastStream(t,e){return t===i.SEND?this.send.push([e]):this.recv.push([e])}getSimulcastStreams(t){return t===i.SEND?this.send:this.recv}constructor(){this.send=[],this.recv=[]}}return e.expand=function(s){if("SimulcastInfo"===s.constructor.name)return s;const n=new e;for(const e of s.send||[])n.addSimulcastAlternativeStreams(i.SEND,e.map(t.expand));for(const e of s.recv||[])n.addSimulcastAlternativeStreams(i.RECV,e.map(t.expand));return n},e.clone=function(t){return"SimulcastInfo"===t.constructor.name?t.clone():e.expand(t)},Ai=e}function Yi(){if(Ti)return Si;Ti=1;const t=ti()("SENDRECV","SENDONLY","RECVONLY","INACTIVE");return t.byValue=function(i){return t[i.toUpperCase()]},t.toString=function(i){switch(i){case t.SENDRECV:return"sendrecv";case t.SENDONLY:return"sendonly";case t.RECVONLY:return"recvonly";case t.INACTIVE:return"inactive"}},t.reverse=function(i){switch(i){case t.SENDRECV:return t.SENDRECV;case t.SENDONLY:return t.RECVONLY;case t.RECVONLY:return t.SENDONLY;case t.INACTIVE:return t.INACTIVE}},Si=t}function Ji(){if(Ei)return ki;Ei=1;class t{clone(){return new t(this.port,this.maxMessageSize)}plain(){return{port:this.port,maxMessageSize:this.maxMessageSize}}getPort(){return this.port}getMaxMessageSize(){return this.maxMessageSize}constructor(t,i){this.port=t,this.maxMessageSize=i}}return t.expand=function(i){return"DataChannelInfo"===i.constructor.name?i:new t(i.port,i.maxMessageSize)},t.clone=function(i){return"DataChannelInfo"===i.constructor.name?i.clone():t.expand(i)},ki=t}function Zi(){if(xi)return Pi;xi=1;const t=$t(),i=ji(),e=Ki(),s=Yi(),n=Xi();Zt();const r=Ji();class h{clone(){const t=new h(this.id,this.type);t.setDirection(this.direction),t.setBitrate(this.bitrate);for(const i of this.codecs.values())t.addCodec(i.clone());for(const[i,e]of this.extensions.entries())t.addExtension(i,e);for(const i of this.rids.values())t.addRID(i.clone());return this.simulcast&&t.setSimulcast(this.simulcast.clone()),this.control&&t.setControl(this.control),this.dataChannel&&t.setDataChannel(this.dataChannel.clone()),t}plain(){const t={id:this.id,type:this.type,direction:s.toString(this.direction),codecs:[]};this.dataChannel&&(t.dataChannel=this.dataChannel.plain()),this.bitrate&&(t.bitrate=this.bitrate);for(const i of this.codecs.values())t.codecs.push(i.plain());for(const[i,e]of this.extensions.entries())t.extensions||(t.extensions={}),t.extensions[i]=e;for(const i of this.rids.values())t.rids||(t.rids=[]),t.rids.push(i.plain());return this.simulcast&&(t.simulcast=this.simulcast.plain()),this.control&&(t.control=this.control),t}getType(){return this.type}getId(){return this.id}setId(t){this.id=t}addExtension(t,i){this.extensions.set(t,i)}addRID(t){this.rids.set(t.getId(),t)}addCodec(t){this.codecs.set(t.getType(),t)}setCodecs(t){this.codecs=t}getCodecForType(t){return this.codecs.get(t)}getCodec(t){for(const i of this.codecs.values())if(i.getCodec().toLowerCase()===t.toLowerCase())return i;return null}hasCodec(t){return null!==this.getCodec(t)}getCodecs(){return this.codecs}hasRTX(){for(const t of this.codecs.values())if(t.hasRTX())return!0;return!1}getExtensions(){return this.extensions}getRIDs(){return this.rids}getRID(t){return this.rids.get(t)}getBitrate(){return this.bitrate}setBitrate(t){this.bitrate=t}getDirection(){return this.direction}setDirection(t){this.direction=t}hasControl(){return!!this.control}getControl(){return this.control}setControl(t){this.control=t}hasDataChannel(){return!!this.dataChannel}getDataChannel(){return this.dataChannel}setDataChannel(t){this.dataChannel=t}answer(i){const o=new h(this.id,this.type);if(i){o.setDirection(s.reverse(this.direction));const{codecs:h,dataChannel:a}=i;if(h){let e;e=Array.isArray(h)?t.MapFromNames(h,i.rtx,i.rtcpfbs):h;for(let t of this.codecs.values())for(let i of e.values()){if(i.getCodec().toLowerCase()!==t.getCodec().toLowerCase()||"h264"===i.getCodec()&&i.hasParam("packetization-mode")&&i.getParam("packetization-mode")!=t.getParam("packetization-mode","0")||"h264"===i.getCodec()&&i.hasParam("profile-level-id")&&t.hasParam("profile-level-id")&&i.getParam("profile-level-id")!=t.getParam("profile-level-id")||"multiopus"===i.getCodec()&&i.hasParam("num_streams")&&t.hasParam("num_streams")&&i.getParam("num_streams")!=t.getParam("num_streams"))continue;const e=i.clone();e.setType(t.getType()),e.hasRTX()&&e.setRTX(t.getRTX()),t.hasChannels()&&e.setChannels(t.getChannels()),e.addParams(t.getParams()),o.addCodec(e);break}}const u=new Set(i.extensions);for(let[t,i]of this.extensions)u.has(i)&&o.addExtension(t,i);if(i.simulcast&&this.simulcast){const t=new e,i=this.simulcast.getSimulcastStreams(n.SEND);if(i)for(const e of i){const i=e.map(t=>t.clone());t.addSimulcastAlternativeStreams(n.RECV,i)}const s=this.simulcast.getSimulcastStreams(n.RECV);if(s)for(const i of s){const e=i.map(t=>t.clone());t.addSimulcastAlternativeStreams(n.SEND,e)}for(const t of this.rids.values()){const i=t.clone();i.setDirection(n.reverse(t.getDirection())),o.addRID(i)}o.setSimulcast(t)}if(a&&this.dataChannel){const t=new r(this.dataChannel.getPort(),a.maxMessageSize?a.maxMessageSize:this.dataChannel.getMaxMessageSize());o.setDataChannel(t)}}else o.setDirection(s.INACTIVE);return o}getSimulcast(){return this.simulcast}setSimulcast(t){this.simulcast=t}constructor(t,i){this.id=t,this.type=i,this.direction=s.SENDRECV,this.extensions=new Map,this.codecs=new Map,this.rids=new Map,this.simulcast=null,this.bitrate=0,this.control=null,this.dataChannel=null}}function o(t){const i=t.toString();if(!/^\d+$/.test(i))throw new m("invalid integer ".concat(i));return x(i)}return h.create=function(i,e,n){!n&&"string"!=typeof e&&(n=e,e=i);const r=new h(i,e);if(n){const{codecs:i}=n;i&&(Array.isArray(i)?r.setCodecs(t.MapFromNames(i,n.rtx,n.rtcpfbs)):r.setCodecs(i))}else r.setDirection(s.INACTIVE);return r},h.expand=function(n){if("MediaInfo"===n.constructor.name)return n;const a=new h(n.id,n.type);if(n.direction&&a.setDirection(s.byValue(n.direction)),a.setBitrate(n.bitrate),n.dataChannel){const t=r.expand(n.dataChannel);t&&a.setDataChannel(t)}for(const[t,i]of w.entries(n.extensions))a.addExtension(o(t),i);for(const i of n.codecs){const e=t.expand(i);e&&a.addCodec(e)}for(const t of n.rids||[]){const e=i.expand(t);a.addRID(e)}return n.simulcast&&a.setSimulcast(e.expand(n.simulcast)),n.control&&a.setControl(n.control),a},h.clone=function(t){return"MediaInfo"===t.constructor.name?t.clone():h.expand(t)},Pi=h}function $i(){if(Ri)return Ii;Ri=1;class t{clone(){return new t(this.semantics,this.ssrcs)}plain(){const t={semantics:this.semantics,ssrcs:[]};for(let i=0;ii.getSSRCs()[0]===t)}hasSourceGroup(t){for(const i of this.groups)if(i.getSemantics().toLowerCase()===t.toLowerCase())return!0;return!1}getEncodings(){return this.encodings}addEncoding(t){this.encodings.push([t])}addAlternativeEncodings(t){this.encodings.push(t)}setEncodings(t){this.encodings=t}getEncodingSources(){const t=[];if(this.encodings.length)for(const i of this.encodings)for(const e of i){const i={id:e.getId(),rid:e.getId()},s=e.getParams(),n=null==s?void 0:s.get("ssrc");if(void 0!==n){i.media=x(n);for(const t of this.getSourceGroupsForMediaSSRC(i.media))switch(t.getSemantics()){case"FID":i.rtx=t.getSSRCs()[1];break;case"FEC-FR":i.fec=t.getSSRCs()[1]}}t.push(i)}else if(this.hasSourceGroup("SIM")){const i=this.getSourceGroup("SIM").getSSRCs();this.getSourceGroups();for(const e of i){const i={id:String(e),media:e};for(const t of this.getSourceGroupsForMediaSSRC(i.media))switch(t.getSemantics()){case"FID":i.rtx=t.getSSRCs()[1];break;case"FEC-FR":i.fec=t.getSSRCs()[1]}t.push(i)}}else{const i={id:""};if(this.ssrcs.length){i.media=this.ssrcs[0];for(const t of this.getSourceGroupsForMediaSSRC(i.media))switch(t.getSemantics()){case"FID":i.rtx=t.getSSRCs()[1];break;case"FEC-FR":i.fec=t.getSSRCs()[1]}}t.push(i)}return t}constructor(t,i){this.media=t,this.id=i,this.ssrcs=[],this.groups=[],this.encodings=[]}}return e.expand=function(s){var n,r;if("TrackInfo"===s.constructor.name)return s;const h=new e(s.media,s.id);if(s.mediaId&&h.setMediaId(s.mediaId),Array.isArray(s.ssrcs))for(const t of s.ssrcs)h.addSSRC(t);else if(void 0!==(null===(n=s.ssrcs)||void 0===n?void 0:n.media)){const i=s.ssrcs.media;if(h.addSSRC(i),void 0!==s.ssrcs.rtx){const e=s.ssrcs.rtx;h.addSSRC(e),h.addSourceGroup(new t("FID",[i,e]))}if(void 0!==s.ssrcs.fec){const e=s.ssrcs.fec;h.addSSRC(e),h.addSourceGroup(new t("FEC-FR",[i,e]))}}if(s.rid){const t=new i(s.rid);void 0!==(null===(r=s.ssrcs)||void 0===r?void 0:r.media)&&t.addParam("ssrc",s.ssrcs.media),h.addAlternativeEncodings([t])}for(const i of s.groups||[])h.addSourceGroup(t.expand(i));for(const t of s.encodings||[]){const e=[];for(const s of t)e.push(i.expand(s));h.addAlternativeEncodings(e)}return h},e.clone=function(t){return"TrackInfo"===t.constructor.name?t.clone():e.expand(t)},Mi=e}function se(){if(Fi)return Oi;Fi=1;const t=ee();class i{clone(){const t=new i(this.id);for(const i of this.tracks.values())t.addTrack(i.clone());return t}plain(){const t={id:this.id,tracks:[]};for(const i of this.tracks.values())t.tracks.push(i.plain());return t}getId(){return this.id}addTrack(t){this.tracks.set(t.getId(),t)}removeTrack(t){return this.tracks.delete(t.getId())}removeTrackById(t){return this.tracks.delete(t)}getFirstTrack(t){for(let i of this.tracks.values())if(i.getMedia().toLowerCase()===t.toLowerCase())return i;return null}getTracks(){return this.tracks}removeAllTracks(){this.tracks.clear()}getTrack(t){return this.tracks.get(t)}constructor(t){this.id=t,this.tracks=new Map}}return i.expand=function(e){if("StreamInfo"===e.constructor.name)return e;const s=new i(e.id);for(const i of e.tracks||[]){const e=t.expand(i);e&&s.addTrack(e)}return s},i.clone=function(t){return"StreamInfo"===t.constructor.name?t.clone():i.expand(t)},Oi=i}function ne(){if(Vi)return Ui;Vi=1;const t=function(){if(Pt)return Gt;Pt=1;var t=Kt(),i=Yt();return Gt.write=i,Gt.parse=t.parse,Gt.parseParams=t.parseParams,Gt.parseFmtpConfig=t.parseFmtpConfig,Gt.parsePayloads=t.parsePayloads,Gt.parseRemoteCandidates=t.parseRemoteCandidates,Gt.parseImageAttributes=t.parseImageAttributes,Gt.parseSimulcastStreamList=t.parseSimulcastStreamList,Gt}(),i=(It||(It=1,xt=function(t){const i=new Intl.Collator(t,{sensitivity:"base"});return(t,e)=>0==i.compare(t,e)}),xt)("en-US"),e=Jt(),s=$t(),n=Zt(),r=ei(),h=si(),o=Gi(),a=Zi(),u=ii(),c=Yi(),d=Xi(),l=$i(),f=te(),v=se(),_=ee(),g=ie(),p=Ki(),m=Qi(),y=ji(),A=Ji();class b{clone(){const t=new b(this.version);for(const i of this.medias)t.addMedia(i.clone());for(const i of this.streams.values())t.addStream(i.clone());for(const i of this.candidates)t.addCandidate(i.clone());return t.setICE(this.ice.clone()),this.dtls&&t.setDTLS(this.dtls.clone()),this.crypto&&t.setCrypto(this.crypto.clone()),t.setExtmapAllowMixed(this.extmapAllowMixed),t}plain(){const t={version:this.version,streams:[],medias:[],candidates:[]};for(const i of this.medias)t.medias.push(i.plain());for(const i of this.streams.values())t.streams.push(i.plain());for(const i of this.candidates)t.candidates.push(i.plain());return this.ice&&(t.ice=this.ice.plain()),this.dtls&&(t.dtls=this.dtls.plain()),this.crypto&&(t.crypto=this.crypto.plain()),this.extmapAllowMixed||(t.extmapAllowMixedNotSupported=!this.extmapAllowMixed),t}unify(){const t=new b(this.version);for(const i of this.medias)t.addMedia(i.clone());const i={audio:t.getMediasByType("audio"),video:t.getMediasByType("video")};for(const e of this.streams.values()){const s=e.clone();for(const e of s.getTracks().values()){let s=i[e.getMedia()].pop();s||(s=this.getMedia(e.getMedia()).clone(),s.setId(e.getId()),t.addMedia(s)),e.setMediaId(s.getId())}t.addStream(s)}for(const i of this.candidates)t.addCandidate(i.clone());return this.ice&&t.setICE(this.ice.clone()),this.dtls&&t.setDTLS(this.dtls.clone()),this.crypto&&t.setCrypto(this.crypto.clone()),t}setVersion(t){this.version=t}addMedia(t){this.medias.push(t)}getMedia(t){for(let e in this.medias){let s=this.medias[e];if(i(s.getType(),t))return s}return null}getMediasByType(t){let e=[];for(let s in this.medias){let n=this.medias[s];i(n.getType(),t)&&e.push(n)}return e}getMediaById(t){for(const e of this.medias)if(i(e.getId(),t))return e;return null}replaceMedia(t){for(let i in this.medias)if(this.medias[i].getId()==t.getId())return this.medias[i]=t,!0;return!1}getMedias(){return this.medias}getVersion(){return this.version}getDTLS(){return this.dtls}setDTLS(t){this.dtls=t}hasCrypto(){return!!this.crypto}getCrypto(){return this.crypto}setCrypto(t){this.crypto=t}hasICE(){return!!this.ice}getICE(){return this.ice}setICE(t){this.ice=t}addCandidate(t){for(const i of this.candidates)if(i.equals(t))return;this.candidates.push(t)}addCandidates(t){for(const i of t)this.addCandidate(i)}getCandidates(){return this.candidates}getStream(t){return this.streams.get(t)}getStreams(){return this.streams}getFirstStream(){for(const t of this.streams.values())return t;return null}addStream(t){this.streams.set(t.getId(),t)}removeStream(t){return this.streams.delete(t.getId())}removeAllStreams(){this.streams.clear()}getTracksByMediaType(t){let e=[];for(const s of this.streams.values())for(const[n,r]of s.getTracks())i(r.getMedia(),t)&&e.push(r);return e}getTrackByMediaId(t){for(const i of this.streams.values())for(const[e,s]of i.getTracks())if(s.getMediaId()==t)return s;return null}getStreamByMediaId(t){for(const i of this.streams.values())for(const[e,s]of i.getTracks())if(s.getMediaId()==t)return i;return null}getExtmapAllowMixed(){return this.extmapAllowMixed}setExtmapAllowMixed(t){this.extmapAllowMixed=t}answer(t){const i=new b;t.ice&&(t.ice instanceof o?i.setICE(t.ice.clone()):i.setICE(o.expand(t.ice))),t.dtls&&(t.dtls instanceof r?i.setDTLS(t.dtls):i.setDTLS(r.expand(t.dtls))),t.crypto&&(t.crypto instanceof h?i.setCrypto(t.crypto):i.setCrypto(h.expand(t.crypto)));for(let s=0;t.candidates&&s0&&(n.bandwidth.push({type:"AS",limit:t.getBitrate()}),n.bandwidth.push({type:"TIAS",limit:1e3*t.getBitrate()}));let r=this.getCandidates();for(const t of r)n.candidates.push({foundation:t.getFoundation(),component:t.getComponentId(),transport:t.getTransport(),priority:t.getPriority(),ip:t.getAddress(),port:t.getPort(),type:t.getType(),raddr:t.getRelAddr(),rport:t.getRelPort()});if(this.getICE()&&(n.iceUfrag=this.getICE().getUfrag(),n.icePwd=this.getICE().getPwd()),i("audio",t.getType())||i("video",t.getType())){n.rtcpMux="rtcp-mux",n.rtcpRsize="rtcp-rsize",this.getDTLS()?(n.protocol="UDP/TLS/RTP/SAVPF",n.fingerprint={type:this.getDTLS().getHash(),hash:this.getDTLS().getFingerprint()},n.setup=u.toString(this.getDTLS().getSetup())):this.getCrypto()?(n.protocol="RTP/SAVPF",n.crypto=[{id:this.getCrypto().getTag(),suite:this.getCrypto().getSuite(),config:this.getCrypto().getKeyParams()}]):n.protocol="RTP/AVP";for(const e of t.getCodecs().values()){i("video",t.getType())?n.rtp.push({payload:e.getType(),codec:e.getCodec().toUpperCase(),rate:9e4}):i("opus",e.getCodec())||i("multiopus",e.getCodec())?n.rtp.push({payload:e.getType(),codec:e.getCodec(),rate:48e3,encoding:e.getChannels()}):n.rtp.push({payload:e.getType(),codec:e.getCodec(),rate:8e3});for(const t of e.getRTCPFeedbacks())n.rtcpFb.push({payload:e.getType(),type:t.getId(),subtype:t.getParams().join(" ")});e.hasRTX()&&(n.rtp.push({payload:e.getRTX(),codec:"rtx",rate:9e4}),n.fmtp.push({payload:e.getRTX(),config:"apt="+e.getType()}));const s=e.getParams();if(w.keys(s).length){const t={payload:e.getType(),config:""};for(const i in s)t.config.length&&(t.config+=";"),w.hasOwnProperty.call(s,i)?t.config+=i+"="+s[i]:t.config+=i;n.fmtp.push(t)}}const e=[];for(const t of n.rtp)e.push(t.payload);n.payloads=e.join(" ");for(let[i,e]of t.getExtensions().entries())n.ext.push({value:i,uri:e});for(let i of t.getRIDs().values()){let t={id:i.getId(),direction:d.toString(i.getDirection()),params:""};i.getFormats().length&&(t.params="pt="+i.getFormats().join(","));for(let[e,s]of i.getParams().entries())t.params+=(t.params.length?";":"")+e+"="+s;n.rids.push(t)}const s=t.getSimulcast();if(s){let t=1;n.simulcast={};const i=s.getSimulcastStreams(d.SEND),e=s.getSimulcastStreams(d.RECV);if(i&&i.length){let e="";for(const t of i){let i="";for(const e of t)i+=(i.length?",":"")+(e.isPaused()?"~":"")+e.getId();e+=(e.length?";":"")+i}n.simulcast["dir"+t]="send",n.simulcast["list"+t]=e,t++}if(e&&e.length){let i="";for(const t of e){let e="";for(const i of t)e+=(e.length?",":"")+(i.isPaused()?"~":"")+i.getId();i+=(i.length?";":"")+e}n.simulcast["dir"+t]="recv",n.simulcast["list"+t]=i,t++}}}else if(t.hasDataChannel()){n.protocol="UDP/DTLS/SCTP",n.payloads="webrtc-datachannel";const i=t.getDataChannel();n.sctpPort=i.getPort(),n.maxMessageSize=i.getMaxMessageSize()}e.media.push(n)}for(let t of this.streams.values())for(let s of t.getTracks().values())for(let n in e.media){let r=e.media[n];if(s.getMediaId()){if(s.getMediaId()==r.mid){let i=s.getSourceGroups();for(let t in i){let e=i[t];r.ssrcGroups.push({semantics:e.getSemantics(),ssrcs:e.getSSRCs().join(" ")})}let e=s.getSSRCs();for(let i in e)r.ssrcs.push({id:e[i],attribute:"cname",value:t.getId()}),r.ssrcs.push({id:e[i],attribute:"msid",value:t.getId()+" "+s.getId()});r.msid=t.getId()+" "+s.getId();break}}else if(i(r.type,s.getMedia())){let i=s.getSourceGroups();for(let t in i){let e=i[t];r.ssrcGroups.push({semantics:e.getSemantics(),ssrcs:e.getSSRCs().join(" ")})}let e=s.getSSRCs();for(let i in e)r.ssrcs.push({id:e[i],attribute:"cname",value:t.getId()}),r.ssrcs.push({id:e[i],attribute:"msid",value:t.getId()+" "+s.getId()});break}}const n={type:"BUNDLE",mids:s.join(" ")};return e.groups.push(n),t.write(e)}toIceFragmentString(){let i={version:0,media:[],candidates:[]};this.hasICE()&&this.getICE().isLite()&&(i.icelite="ice-lite"),this.getICE()&&(i.iceUfrag=this.getICE().getUfrag(),i.icePwd=this.getICE().getPwd());for(const t of this.getCandidates())i.candidates.push({foundation:t.getFoundation(),component:t.getComponentId(),transport:t.getTransport(),priority:t.getPriority(),ip:t.getAddress(),port:t.getPort(),type:t.getType(),raddr:t.getRelAddr(),rport:t.getRelPort()});return t.write(i).slice(10)}constructor(t){this.version=t||1,this.streams=new Map,this.medias=new Array,this.candidates=new Array,this.ice=null,this.dtls=null,this.crypto=null,this.extmapAllowMixed=!0}}return b.create=function(t){var i;const s=new b;if(t.streams)for(const i of t.streams)s.addStream(v.expand(i));t.ice&&(t.ice instanceof o?s.setICE(t.ice.clone()):s.setICE(o.expand(t.ice))),t.dtls&&(t.dtls instanceof r?s.setDTLS(t.dtls):s.setDTLS(r.expand(t.dtls))),t.crypto&&(t.crypto instanceof h?s.setCrypto(t.crypto):s.setCrypto(h.expand(t.crypto)));for(const i of t.candidates||[])i instanceof e?s.addCandidate(i.clone()):s.addCandidate(e.expand(i));let n=96,u=1,c=0;for(const[e,r]of w.entries(t.capabilities||{}))if(t.unified&&null!==(i=t.streams)&&void 0!==i&&i.length)for(const t of s.getTracksByMediaType(e)){const i=a.create(t.getMediaId(),e,r);for(const[t,e]of i.getCodecs())e.getType()>=96&&e.setType(n++),e.getRTX()&&e.setRTX(n++);if(r.extensions)for(let t of r.extensions)15===u&&u++,i.addExtension(u++,t);s.addMedia(i)}else{const i=a.create(t.unified?String(c++):e,e,r);for(const[t,e]of i.getCodecs())e.getType()>=96&&e.setType(n++),e.getRTX()&&e.setRTX(n++);if(r.extensions)for(let t of r.extensions)15===u&&u++,i.addExtension(u++,t);s.addMedia(i)}return s},b.expand=function(t){if("SDPInfo"===t.constructor.name)return t;const i=new b(t.version);for(const e of t.medias||[]){const t=a.expand(e);t&&i.addMedia(t)}for(const e of t.streams||[]){const t=v.expand(e);t&&i.addStream(t)}for(const s of t.candidates||[]){const t=e.expand(s);t&&i.addCandidate(t)}return t.ice&&i.setICE(o.expand(t.ice)),t.dtls&&i.setDTLS(r.expand(t.dtls)),t.crypto&&i.setCrypto(h.expand(t.crypto)),t.extmapAllowMixedNotSupported&&(this.extmapAllowMixed=!t.extmapAllowMixedNotSupported),i},b.clone=function(t){return"SDPInfo"===t.constructor.name?t.clone():b.expand(t)},b.process=function(t){return b.parse(t)},b.parse=function(w){const S=t.parse(w),T=new b;if(T.setVersion(S.version),S.iceUfrag&&S.icePwd){const t=String(S.iceUfrag),i=String(S.icePwd),e=new o(t,i);e.setLite("ice-lite"==S.icelite),e.setEndOfCandidates("end-of-candidates"==S.endOfCandidates),T.setICE(e)}for(let w in S.media){const b=S.media[w],k=b.type,E=b.mid?b.mid.toString():w,P=new a(E,k);if(b.iceUfrag&&b.icePwd){const t=String(b.iceUfrag),i=String(b.icePwd),e=new o(t,i);e.setLite("ice-lite"==S.icelite),e.setEndOfCandidates("end-of-candidates"==b.endOfCandidates),T.setICE(e)}for(let t=0;b.candidates&&t1&&t.setChannels(i.encoding),P.addCodec(t)}}for(let t of C.entries()){const i=P.getCodecForType(t[0]);i&&i.setRTX(t[1])}for(let t=0;b.rtcpFb&&t0?2===a.length?typeof a[1]==n?this[a[0]]=a[1].call(this,c):this[a[0]]=a[1]:3===a.length?typeof a[1]!==n||a[1].exec&&a[1].test?this[a[0]]=c?c.replace(a[1],a[2]):s:this[a[0]]=c?a[1].call(this,c,a[2]):s:4===a.length&&(this[a[0]]=c?a[3].call(this,c.replace(a[1],a[2])):s):this[a]=c||s;d+=2}},Q=function(t,i){for(var e in i)if(typeof i[e]===h&&i[e].length>0){for(var n=0;n2&&(t[u]="iPad",t[d]=p),t},this.getEngine=function(){var t={};return t[c]=s,t[f]=s,j.call(t,m,y.engine),t},this.getOS=function(){var t={};return t[c]=s,t[f]=s,j.call(t,m,y.os),A&&!t[c]&&w&&w.platform&&"Unknown"!=w.platform&&(t[c]=w.platform.replace(/chrome os/i,V).replace(/macos/i,H)),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return m},this.setUA=function(t){return m=typeof t===o&&t.length>500?X(t,500):t,this},this.setUA(m),this};J.VERSION="0.7.39",J.BROWSER=q([c,f,a]),J.CPU=q([v]),J.DEVICE=q([u,l,d,_,g,m,p,w,y]),J.ENGINE=J.OS=q([c,f]),t.exports&&(i=t.exports=J),i.UAParser=J;var Z=typeof e!==r&&(e.jQuery||e.Zepto);if(Z&&!Z.ua){var $=new J;Z.ua=$.getResult(),Z.ua.get=function(){return $.getUA()},Z.ua.set=function(t){$.setUA(t);var i=$.getResult();for(var e in i)Z.ua[e]=i[e]}}}("object"==typeof s?s:ae)}(oe,oe.exports)),oe.exports);const ce=b(ue),de=["iOS"];class le extends ce{isChromium(){return this.getUA().match(/Chrome/i)}isChrome(){const t=this.getBrowser();if(!t.name)return!1;const i=this.getOS();let e=!0;return e=!new RegExp(de.join("|"),"i").test(i.name),t.name.match(/Chrome/i)&&e}isFirefox(){const t=this.getBrowser();return!!t.name&&t.name.match(/Firefox/i)}isOpera(){const t=this.getBrowser();return!!t.name&&t.name.match(/Opera/i)}isSafari(){const t=this.getBrowser();return!!t.name&&t.name.match(/Safari/i)}constructor(){super(s.navigator.userAgent)}}const fe=at.get("SdpParser"),ve=Array.from({length:31},(t,i)=>i+35),_e=Array.from({length:32},(t,i)=>i+96),ge=Array.from({length:14},(t,i)=>i+1),pe=Array.from({length:240},(t,i)=>i+16),me={setSimulcast(t,i){if(fe.info("Setting simulcast. Codec: ",i),!(new le).isChromium())return fe.warn("Your browser does not appear to support Simulcast. For a better experience, use a Chromium based browser."),t;if("h264"!==i&&"vp8"!==i)return fe.warn("Your selected codec ".concat(i," does not appear to support Simulcast. To broadcast using simulcast, please use H.264 or VP8.")),t;if(!/m=video/.test(t))return fe.warn("There is no available video for simulcast to be enabled."),t;try{const i=new RegExp("m=video.*?a=ssrc:(\\d*) cname:(.+?)\\r\\n","s"),e=new RegExp("m=video.*?a=ssrc:(\\d*) msid:(.+?)\\r\\n","s"),s=i.exec(t),n=s[1],r=s[2],h=e.exec(t)[2],o=2,a=[n];for(let i=0;i(fe.info("Replacing SDP response for support stereo"),t=t.replace(/useinbandfec=1/g,"useinbandfec=1; stereo=1"),fe.info("Replaced SDP response for support stereo"),fe.debug("New SDP value: ",t),t),setDTX:t=>(fe.info("Replacing SDP response for support dtx"),t=t.replace("useinbandfec=1","useinbandfec=1; usedtx=1"),fe.info("Replaced SDP response for support dtx"),fe.debug("New SDP value: ",t),t),setAbsoluteCaptureTime(t){const i="a=extmap:"+me.getAvailableHeaderExtensionIdRange(t)[0]+" http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time\r\n";return t=t.replace(/(m=.*\r\n(?:.*\r\n)*?)(a=extmap.*\r\n)/gm,(t,e,s)=>e+i+s),fe.info("Replaced SDP response for setting absolute capture time"),fe.debug("New SDP value: ",t),t},setDependencyDescriptor(t){const i="a=extmap:"+me.getAvailableHeaderExtensionIdRange(t)[0]+" https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension\r\n";return t=t.replace(/(m=.*\r\n(?:.*\r\n)*?)(a=extmap.*\r\n)/gm,(t,e,s)=>e+i+s),fe.info("Replaced SDP response for setting depency descriptor"),fe.debug("New SDP value: ",t),t},setVideoBitrate(t,i){if(i<1)fe.info("Remove bitrate restrictions"),t=t.replace(/b=AS:.*\r\n/,"").replace(/b=TIAS:.*\r\n/,"");else{const e=he.SDPInfo.parse(t),s=e.getMedia("video");fe.info("Setting video bitrate"),s.setBitrate(i),t=e.toString()}return t},removeSdpLine:(t,i)=>(fe.debug("SDP before trimming: ",t),t=t.split("\n").filter(t=>t.trim()!==i).join("\n"),fe.debug("SDP trimmed result: ",t),t),adaptCodecName(t,i,e){if(!t)return t;const s=new RegExp("".concat(i),"i");return t.replace(s,e)},setMultiopus(t,i){if(!(new le).isFirefox()&&(!i||we(i)))if(t.includes("multiopus/48000/6"))fe.info("Multiopus already setted");else{fe.info("Setting multiopus");const i=/m=audio 9 UDP\/TLS\/RTP\/SAVPF (.*)\r\n/.exec(t)[0],e=me.getAvailablePayloadTypeRange(t)[0],s=i.replace("\r\n"," ")+e+"\r\na=rtpmap:"+e+" multiopus/48000/6\r\na=fmtp:"+e+" channel_mapping=0,4,1,2,3,5;coupled_streams=2;minptime=10;num_streams=4;useinbandfec=1\r\n";t=t.replace(i,s),fe.info("Multiopus offer created"),fe.debug("SDP parsed for multioups: ",t)}return t},getAvailablePayloadTypeRange(t){const i=t.matchAll(/m=(?:.*) (?:.*) UDP\/TLS\/RTP\/SAVPF (.*)\r\n/gm);let e=_e.concat(ve);for(const t of i){const i=t[1].split(" ").map(t=>x(t));e=e.filter(t=>!i.includes(t))}return e},getAvailableHeaderExtensionIdRange(t){const i=t.matchAll(/a=extmap:(\d+)(?:.*)\r\n/gm);let e=ge.concat(pe);for(const t of i){const i=t[1].split(" ").map(t=>x(t));e=e.filter(t=>!i.includes(t))}return e},renegotiate(t,i){const e=he.SDPInfo.parse(t),s=he.SDPInfo.parse(i);for(const t of e.getMedias()){let i=s.getMediaById(t.getId());if(!i){i=new he.MediaInfo(t.getId(),t.getType()),i.setDirection(he.Direction.reverse(t.getDirection()));const e=s.getMedia(t.getType());if(e){i.setCodecs(e.getCodecs());for(const[t,s]of e.getExtensions())i.addExtension(t,s)}s.addMedia(i)}}return s.toString()},updateMissingVideoExtensions(t,i){var e;const s=he.SDPInfo.parse(t),n=null==(e=he.SDPInfo.parse(i).getMediasByType("video")[0])?void 0:e.getExtensions();if(n||n.length){for(const i of s.getMediasByType("video")){const e=i.getExtensions();n.forEach((s,n)=>{if(!e.get(n)){const e=i.getId(),r="a=extmap:"+n+" "+s+"\r\n",h=new RegExp("(a=mid:"+e+"\r\n(?:.*\r\n)*?)","g");t=t.replace(h,(t,i,e)=>i+r)}})}return t}},getCodecPayloadType(t){const i=t.matchAll(/a=rtpmap:(\d+) (\w+)\/\d+/g),e={};for(const t of i)e[t[1]]=t[2];return e}},we=t=>t.getAudioTracks().some(t=>t.getSettings().channelCount>2),ye={VP8:"vp8",VP9:"vp9",H264:"h264",AV1:"av1",H265:"h265"},Ae={OPUS:"opus",MULTIOPUS:"multiopus"},be=at.get("PeerConnection"),Se="Publisher",Te="Viewer",ke={track:"track",connectionStateChange:"connectionStateChange"},Ee={stereo:!1,mediaStream:null,codec:"h264",simulcast:!1,scalabilityMode:null,disableAudio:!1,disableVideo:!1,setSDPToPeer:!0};class Pe extends lt{async createRTCPeer(t,i){void 0===t&&(t={autoInitStats:!0,statsIntervalMs:1e3}),void 0===i&&(i=Te),be.info("Creating new RTCPeerConnection"),be.debug("RTC configuration provided by user: ",t),this.peer=Re(this,t),this.mode=i,t.autoInitStats&&this.initStats(t)}getRTCPeer(){return be.info("Getting RTC Peer"),this.peer}async closeRTCPeer(){var t;be.info("Closing RTCPeerConnection"),null==(t=this.peer)||t.close(),this.peer=null,this.stopStats(),this.emit(ke.connectionStateChange,"closed")}async setRTCRemoteSDP(t){be.info("Setting RTC Remote SDP");const i={type:"answer",sdp:t};try{await this.peer.setRemoteDescription(i),be.info("RTC Remote SDP was set successfully."),be.debug("RTC Remote SDP new value: ",t)}catch(t){throw be.error("Error while setting RTC Remote SDP: ",t),t}}async getRTCLocalSDP(t){void 0===t&&(t=Ee),be.info("Getting RTC Local SDP"),t=l(l({},Ee),t),be.debug("Options: ",t);const i=Ie(t.mediaStream);i?Be(this.peer,i,t):Ne(this.peer,t),be.info("Creating peer offer");const e=await this.peer.createOffer();return be.info("Peer offer created"),be.debug("Peer offer response: ",e.sdp),this.sessionDescription=e,t.disableAudio||(t.stereo&&(this.sessionDescription.sdp=me.setStereo(this.sessionDescription.sdp)),t.dtx&&(this.sessionDescription.sdp=me.setDTX(this.sessionDescription.sdp)),this.sessionDescription.sdp=me.setMultiopus(this.sessionDescription.sdp,i)),!t.disableVideo&&t.simulcast&&(this.sessionDescription.sdp=me.setSimulcast(this.sessionDescription.sdp,t.codec)),t.absCaptureTime&&(this.sessionDescription.sdp=me.setAbsoluteCaptureTime(this.sessionDescription.sdp)),t.dependencyDescriptor&&(this.sessionDescription.sdp=me.setDependencyDescriptor(this.sessionDescription.sdp)),t.setSDPToPeer&&(await this.peer.setLocalDescription(this.sessionDescription),be.info("Peer local description set")),this.sessionDescription.sdp}async addRemoteTrack(t,i){return new Promise((e,s)=>{try{const s=this.peer.addTransceiver(t,{direction:"recvonly",streams:i});this.transceiverMap.set(s,e)}catch(t){s(t)}})}updateBandwidthRestriction(t,i){if(this.mode===Te)throw be.error("Viewer attempting to update bitrate, this is not allowed"),new m("It is not possible for a viewer to update the bitrate.");return be.info("Updating bandwidth restriction, bitrate value: ",i),be.debug("SDP value: ",t),me.setVideoBitrate(t,i)}async updateBitrate(t){if(void 0===t&&(t=0),this.mode===Te)throw be.error("Viewer attempting to update bitrate, this is not allowed"),new m("It is not possible for a viewer to update the bitrate.");if(!this.peer)throw be.error("Cannot update bitrate. No peer found."),new m("Cannot update bitrate. No peer found.");be.info("Updating bitrate to value: ",t),this.sessionDescription=await this.peer.createOffer(),await this.peer.setLocalDescription(this.sessionDescription);const i=this.updateBandwidthRestriction(this.peer.remoteDescription.sdp,t);await this.setRTCRemoteSDP(i),be.info("Bitrate restrictions updated: ","".concat(t>0?t:"unlimited"," kbps"))}getRTCPeerStatus(){if(be.info("Getting RTC peer status"),!this.peer)return null;const t=Me(this.peer);return be.info("RTC peer status getted, value: ",t),t}replaceTrack(t){if(!this.peer)return void be.error("Could not change track if there is not an active connection.");const i=this.peer.getSenders().find(i=>i.track.kind===t.kind);i?i.replaceTrack(t):be.error("There is no ".concat(t.kind," track in active broadcast."))}static getCapabilities(t){const i=new le,e=RTCRtpSender.getCapabilities(t);if(e){const s={};let n=new RegExp("^video/(".concat(w.values(ye).join("|"),")x?$"),"i");"audio"===t&&(n=new RegExp("^audio/(".concat(w.values(Ae).join("|"),")$"),"i"),i.isChrome()&&(s.multiopus={mimeType:"audio/multiopus",channels:6}));for(const t of e.codecs){const i=t.mimeType.match(n);if(i){const e=i[1].toLowerCase();if(s[e]=f(l({},s[e]),{mimeType:t.mimeType}),t.scalabilityModes){let i=s[e].scalabilityModes||[];i=[...i,...t.scalabilityModes],s[e].scalabilityModes=[...new Set(i)]}t.channels&&(s[e].channels=t.channels)}}e.codecs=w.keys(s).map(t=>l({codec:t},s[t]))}return e}getTracks(){var t,i;return null==(i=null==(t=this.peer)?void 0:t.getSenders())?void 0:i.map(t=>t.track)}initStats(t){this.peerConnectionStats?be.warn("PeerConnection.initStats() has already been called. Automatic initialization occurs via View.connect(), Publish.connect() or this.createRTCPeer(). See options"):this.peer?(this.peerConnectionStats=new bt(this.peer,t),gt(this.peerConnectionStats,this,[At])):be.warn("Cannot init peer stats: RTCPeerConnection not initialized")}stopStats(){var t;null==(t=this.peerConnectionStats)||t.stop(),this.peerConnectionStats=null}constructor(){super(),this.mode=null,this.sessionDescription=null,this.peer=null,this.peerConnectionStats=null,this.transceiverMap=new Map}}const xe=t=>(null==t?void 0:t.getAudioTracks().length)<=1&&(null==t?void 0:t.getVideoTracks().length)<=1,Ie=t=>{if(!t)return null;if(t instanceof MediaStream&&xe(t))return t;if(!(t instanceof MediaStream)){be.info("Creating MediaStream to add received tracks.");const i=new MediaStream;for(const e of t)i.addTrack(e);if(xe(i))return i}throw be.error("MediaStream must have 1 audio track and 1 video track, or at least one of them."),new m("MediaStream must have 1 audio track and 1 video track, or at least one of them.")},Re=(t,i)=>{const e=new RTCPeerConnection(i);return De(t,e),e};async function Ce(t){return new Promise(i=>u(i,t))}const De=(t,i)=>{i.ontrack=async i=>{be.info("New track from peer."),be.debug("Track event value: ",i);const e=t.transceiverMap.get(i.transceiver);if(e){for(;!i.transceiver.mid;)await Ce(100);e(i.transceiver),t.transceiverMap.delete(i.transceiver)}u(()=>{t.emit(ke.track,i)},0)},i.connectionState?i.onconnectionstatechange=e=>{be.info("Peer connection state change: ",i.connectionState),t.emit(ke.connectionStateChange,i.connectionState)}:i.oniceconnectionstatechange=e=>{be.info("Peer ICE connection state change: ",i.iceConnectionState),t.emit(ke.connectionStateChange,i.iceConnectionState)},i.onnegotiationneeded=async t=>{if(!i.remoteDescription)return;be.info("Peer onnegotiationneeded, updating local description");const e=await i.createOffer();be.info("Peer onnegotiationneeded, got local offer",e.sdp),e.sdp=me.updateMissingVideoExtensions(e.sdp,i.remoteDescription.sdp),await i.setLocalDescription(e);const s=me.renegotiate(e.sdp,i.remoteDescription.sdp);be.info("Peer onnegotiationneeded, updating remote description",s),await i.setRemoteDescription({type:"answer",sdp:s}),be.info("Peer onnegotiationneeded, renegotiation done")}},Be=(t,i,e)=>{be.info("Adding mediaStream tracks to RTCPeerConnection");for(const s of i.getTracks()){const n={streams:[i]};"audio"===s.kind&&(n.direction=e.disableAudio?"inactive":"sendonly"),"video"===s.kind&&(n.direction=e.disableVideo?"inactive":"sendonly",e.scalabilityMode&&(new le).isChrome()?(be.debug("Video track with scalability mode: ".concat(e.scalabilityMode,".")),n.sendEncodings=[{scalabilityMode:e.scalabilityMode}]):e.scalabilityMode&&be.warn("SVC is only supported in Google Chrome")),t.addTransceiver(s,n),be.info("Track '".concat(s.label,"' added: "),"id: ".concat(s.id),"kind: ".concat(s.kind))}},Ne=(t,i)=>{const e=new le;if(!i.disableVideo){const i=t.addTransceiver("video",{direction:"recvonly"});e.isOpera()&&i.setCodecPreferences(RTCRtpReceiver.getCapabilities("video").codecs.filter(t=>"video/H264"!==t.mimeType||t.sdpFmtpLine.includes("profile-level-id=4")))}i.disableAudio||t.addTransceiver("audio",{direction:"recvonly"});for(let e=0;e{var i;const e=null!=(i=t.connectionState)?i:t.iceConnectionState;switch(e){case"checking":return"connecting";case"completed":return"connected";default:return e}};var Le,Oe,Fe,Ue={};var Ve=function(){if(Fe)return Oe;Fe=1;const{TypedEmitter:t}=(Le||(Le=1,w.defineProperty(Ue,"__esModule",{value:!0}),Ue.TypedEmitter=dt().EventEmitter),Ue);class i extends t{cmd(t,i){return this.tm.cmd(t,i,this.namespace)}event(t,i){return this.tm.event(t,i,this.namespace)}close(){return this.tm.namespaces.delete(this.namespace)}constructor(t,i){super(),this.namespace=t,this.tm=i}}return Oe=class extends t{Av(t){this.transport.send(JSON.stringify(t))}cmd(t,i,e){return void 0===e&&(e=void 0),new Promise((s,n)=>{if(!t||0===t.length)throw new m("Bad command name");const r={type:"cmd",transId:this.maxId++,name:t,data:i};e&&(r.namespace=e),this.transactions.set(r.transId,f(l({},r),{resolve:s,reject:n}));try{this.Av(r)}catch(t){throw this.transactions.delete(r.transId),t}})}event(t,i,e){if(void 0===e&&(e=void 0),!t||0===t.length)throw new m("Bad event name");const s={type:"event",name:t,data:i};e&&(s.namespace=e),this.Av(s)}namespace(t){let e=this.namespaces.get(t);return e||(e=new i(t,this),this.namespaces.set(t,e),e)}close(){for(const t of this.namespaces.values())t.close();this.transport.removeListener?this.transport.removeListener("message",this.listener):this.transport.removeEventListener("message",this.listener)}constructor(t){super(),this.maxId=0,this.namespaces=new Map,this.transactions=new Map,this.transport=t,this.listener=t=>{let i;try{i=JSON.parse(t.utf8Data||t.data||t)}catch(t){return}switch(i.type){case"cmd":const{transId:t}=i,s={name:i.name,data:i.data,namespace:i.namespace,accept:i=>{this.Av({type:"response",transId:t,data:i})},reject:i=>{this.Av({type:"error",transId:t,data:i})}};if(s.namespace){const t=this.namespaces.get(s.namespace);t?t.emit("cmd",s):this.emit("cmd",s)}else this.emit("cmd",s);break;case"response":{const t=this.transactions.get(i.transId);if(!t)return;this.transactions.delete(i.transId),t.resolve(i.data);break}case"error":{const t=this.transactions.get(i.transId);if(!t)return;this.transactions.delete(i.transId),t.reject(i.data);break}case"event":const n={name:i.name,data:i.data,namespace:i.namespace};if(n.namespace){var e=this.namespaces.get(n.namespace);e?e.emit("event",n):this.emit("event",n)}else this.emit("event",n)}},this.transport.addListener?this.transport.addListener("message",this.listener):this.transport.addEventListener("message",this.listener)}}}();const He=b(Ve),We=at.get("Signaling"),qe="wsConnectionSuccess",ze="wsConnectionError",Ge="wsConnectionClose",Xe="broadcastEvent";class je extends lt{async connect(){var t;return We.info("Connecting to Signaling Server"),this.transactionManager&&(null==(t=this.webSocket)?void 0:t.readyState)===WebSocket.OPEN?(We.info("Connected to server: ",this.webSocket.url),We.debug("WebSocket value: ",{url:this.webSocket.url,protocol:this.webSocket.protocol,readyState:this.webSocket.readyState,binaryType:this.webSocket.binaryType,extensions:this.webSocket.extensions}),this.emit(qe,{ws:this.webSocket,tm:this.transactionManager}),this.webSocket):new Promise((t,i)=>{this.webSocket=new WebSocket(this.wsUrl),this.transactionManager=new He(this.webSocket),this.webSocket.onopen=()=>{We.info("WebSocket opened"),this.transactionManager.on("event",t=>{this.emit(Xe,t)}),We.info("Connected to server: ",this.webSocket.url),We.debug("WebSocket value: ",{url:this.webSocket.url,protocol:this.webSocket.protocol,readyState:this.webSocket.readyState,binaryType:this.webSocket.binaryType,extensions:this.webSocket.extensions}),this.emit(qe,{ws:this.webSocket,tm:this.transactionManager}),t(this.webSocket)},this.webSocket.onerror=()=>{We.error("WebSocket not connected: ",this.webSocket.url),this.emit(ze,this.webSocket.url),i(this.webSocket.url)},this.webSocket.onclose=()=>{this.webSocket=null,this.transactionManager=null,We.info("Connection closed with Signaling Server."),this.emit(Ge)}})}close(){var t;We.info("Closing connection with Signaling Server."),null==(t=this.webSocket)||t.close()}async subscribe(t,i,e,s){var n,r,h,o,a;void 0===e&&(e=null),void 0===s&&(s=null),We.info("Starting subscription to streamName: ",this.streamName),We.debug("Subcription local description: ",t);const u=Qe(i,e,s),c={sdp:t=me.adaptCodecName(t,"AV1X",ye.AV1),streamId:this.streamName,pinnedSourceId:u.pinnedSourceId,excludedSourceIds:u.excludedSourceIds,events:["active","inactive","layers","viewercount","vad","updated","migrate","stopped"]};u.vad&&(c.vad=!0),Array.isArray(u.events)&&(c.events=u.events),u.forcePlayoutDelay&&(c.forcePlayoutDelay=u.forcePlayoutDelay),u.layer&&(c.layer=u.layer),u.abrConfiguration&&(c.abr={initialBitrate:null==(n=u.abrConfiguration.metadata)?void 0:n.bitrate,strategy:u.abrConfiguration.strategy}),u.customKeys&&(c.customKeys=u.customKeys),u.forceSmooth&&(c.abr=f(l({},c.abr||{}),{forceSmooth:u.forceSmooth}));try{if(u.disableVideo&&u.disableAudio)throw new m("Not attempting to connect as video and audio are disabled");await this.connect(),We.info("Sending view command",c);const t=await this.transactionManager.cmd("view",c),i=null==(a=null==(o=null==(h=null==(r=RTCRtpReceiver.getCapabilities)?void 0:r.call(RTCRtpReceiver,"video"))?void 0:h.codecs)?void 0:o.find)?void 0:a.call(o,t=>"video/AV1X"===t.mimeType);return t.sdp=i?me.adaptCodecName(t.sdp,ye.AV1,"AV1X"):t.sdp,We.info("Command sent, subscriberId: ",t.subscriberId),We.debug("Command result: ",t),this.serverId=t.subscriberId,this.clusterId=t.clusterId,this.streamViewId=t.streamViewId,W(this.streamName),q(this.serverId),z(t.streamViewId),K(this.clusterId),t.sdp}catch(t){throw We.error("Error sending view command, error: ",t),t}}async publish(t,i,e,s){var n,r,h,o,a,u,c,d;void 0===e&&(e=null),void 0===s&&(s=null);const l=Ke(i,e,s);We.info("Starting publishing to streamName: ".concat(this.streamName,", codec: ").concat(l.codec)),We.debug("Publishing local description: ",t);const f=null!=(o=null==(h=null==(r=null==(n=Pe.getCapabilities)?void 0:n.call(Pe,"video"))?void 0:r.codecs)?void 0:h.map(t=>t.codec))?o:[],v=w.values(ye);if(-1===v.indexOf(l.codec))throw We.error("Invalid codec ".concat(l.codec,". Possible values are: "),v),new m("Invalid codec ".concat(l.codec,". Possible values are: ").concat(v));if(f.length>0&&-1===f.indexOf(l.codec))throw We.error("Unsupported codec ".concat(l.codec,". Possible values are: "),f),new m("Unsupported codec ".concat(l.codec,". Possible values are: ").concat(f));l.codec===ye.AV1&&(t=me.adaptCodecName(t,"AV1X",ye.AV1));const _={name:this.streamName,sdp:t,codec:l.codec,sourceId:l.sourceId};if(l.priority){if(!(Number.isInteger(l.priority)&&l.priority>=-2147483648&&l.priority<=2147483647))throw new m("Invalid value for priority option. It should be a decimal integer between the range [-2^31, +2^31 - 1]");_.priority=l.priority}null!==l.record&&(_.record=l.record),Array.isArray(l.events)&&(_.events=l.events);try{if(l.disableVideo&&l.disableAudio)throw new m("Not attempting to connect as video and audio are disabled");await this.connect(),We.info("Sending publish command");const t=await this.transactionManager.cmd("publish",_);if(l.codec===ye.AV1){const i=null==(d=null==(c=null==(u=null==(a=RTCRtpSender.getCapabilities)?void 0:a.call(RTCRtpSender,"video"))?void 0:u.codecs)?void 0:c.find)?void 0:d.call(c,t=>"video/AV1X"===t.mimeType);t.sdp=i?me.adaptCodecName(t.sdp,ye.AV1,"AV1X"):t.sdp}return We.info("Command sent, publisherId: ",t.publisherId),We.debug("Command result: ",t),this.serverId=t.publisherId,this.clusterId=t.clusterId,W(this.streamName),q(this.serverId),G(t.feedId),K(this.clusterId),t.sdp}catch(t){throw We.error("Error sending publish command, error: ",t),t}}async cmd(t,i){return We.info("Sending cmd: ".concat(t)),this.transactionManager.cmd(t,i)}constructor(t={streamName:null,url:"ws://localhost:8080/"}){super(),this.streamName=t.streamName,this.wsUrl=t.url,this.webSocket=null,this.transactionManager=null,this.serverId=null,this.clusterId=null,this.streamViewId=null}}const Qe=(t,i,e)=>{let s="object"==typeof t?t:{};return 0===w.keys(s).length&&(s={vad:t,pinnedSourceId:i,excludedSourceIds:e}),s},Ke=(t,i,e)=>{let s="object"==typeof t?t:{};if(0===w.keys(s).length){s={codec:null!=t?t:ye.H264,record:i,sourceId:e}}return s};class Ye extends m{constructor(t,i){super(t),this.name="FetchError",this.status=i}}const Je=at.get("Director"),Ze="WebRtc";let $e="",ts="https://director.millicast.com";const is={setEndpoint:t=>{ts=t.replace(/\/$/,"")},getEndpoint:()=>ts,setLiveDomain:t=>{$e=t.replace(/\/$/,"")},getLiveDomain:()=>$e,getPublisher:async(t,i,e)=>{void 0===i&&(i=null),void 0===e&&(e=Ze);const s=es(t,i,e);Je.info("Getting publisher connection path for stream name: ",s.streamName);const n={streamName:s.streamName,streamType:s.streamType},r={"Content-Type":"application/json",Authorization:"Bearer ".concat(s.token)},h="".concat(is.getEndpoint(),"/api/director/publish");try{const t=await fetch(h,{method:"POST",headers:r,body:JSON.stringify(n)});let i=await t.json();if("fail"===i.status)throw new Ye(i.data.message,t.status);return i=ns(i),Je.debug("Getting publisher response: ",i),H(i.data.streamAccountId),i.data}catch(t){throw Je.error("Error while getting publisher connection path. ",t),t}},getSubscriber:async(t,i,e)=>{void 0===i&&(i=null),void 0===e&&(e=null);const s=ss(t,i,e);H(s.streamAccountId),Je.info("Getting subscriber connection data for stream name: ".concat(s.streamName," and account id: ").concat(s.streamAccountId));const n={streamAccountId:s.streamAccountId,streamName:s.streamName};let r={"Content-Type":"application/json"};s.subscriberToken&&(r=f(l({},r),{Authorization:"Bearer ".concat(s.subscriberToken)}));const h="".concat(is.getEndpoint(),"/api/director/subscribe");try{const t=await fetch(h,{method:"POST",headers:r,body:JSON.stringify(n)});let i=await t.json();if("fail"===i.status)throw new Ye(i.data.message,t.status);return i=ns(i),Je.debug("Getting subscriber response: ",i),s.subscriberToken&&(i.data.subscriberToken=s.subscriberToken),i.data}catch(t){throw Je.error("Error while getting subscriber connection path. ",t),t}}},es=(t,i,e)=>{let s="object"==typeof t?t:{};return 0===w.keys(s).length&&(s={token:t,streamName:i,streamType:e}),s},ss=(t,i,e)=>{let s="object"==typeof t?t:{};return 0===w.keys(s).length&&(s={streamName:t,streamAccountId:i,subscriberToken:e}),s},ns=t=>{if(is.getLiveDomain()){const i=/\/\/(.*?)\//,e=t.data.urls.map(t=>{const e=i.exec(t);return t.replace(e[1],is.getLiveDomain())});t.data.urls=e}if(t.data.drmObject){const i=t.data.drmObject.playReadyUrl;i&&(t.data.drmObject.playReadyUrl="".concat(is.getEndpoint()).concat(i));const e=t.data.drmObject.widevineUrl;e&&(t.data.drmObject.widevineUrl="".concat(is.getEndpoint()).concat(e));const s=t.data.drmObject.fairPlayUrl;s&&(t.data.drmObject.fairPlayUrl="".concat(is.getEndpoint()).concat(s));const n=t.data.drmObject.fairPlayCertUrl;n&&(t.data.drmObject.fairPlayCertUrl="".concat(is.getEndpoint()).concat(n))}return t};function rs(t){this.message=t}rs.prototype=new m,rs.prototype.name="InvalidCharacterError";var hs=typeof s<"u"&&s.atob&&s.atob.bind(s)||function(t){var i=String(t).replace(/=+$/,"");if(i.length%4==1)throw new rs("'atob' failed: The string to be decoded is not correctly encoded.");for(var e,s,n=0,r=0,h="";s=i.charAt(r++);~s&&(e=n%4?64*e+s:s,n++%4)?h+=String.fromCharCode(255&e>>(-2*n&6)):0)s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(s);return h};function os(t){this.message=t}function as(t,i){if("string"!=typeof t)throw new os("Invalid token specified");var e=!0===(i=i||{}).header?0:1;try{return JSON.parse(function(t){var i=t.replace(/-/g,"+").replace(/_/g,"/");switch(i.length%4){case 0:break;case 2:i+="==";break;case 3:i+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(hs(i).replace(/(.)/g,function(t,i){var e=i.charCodeAt(0).toString(16).toUpperCase();return e.length<2&&(e="0"+e),"%"+e}))}catch(t){return hs(i)}}(t.split(".")[e]))}catch(t){throw new os("Invalid token specified: "+t.message)}}os.prototype=new m,os.prototype.name="InvalidTokenError";var us,cs={exports:{}};var ds=(us||(us=1,function(t,i){!function(e){if(null!=i&&"number"!=typeof i.nodeType)t.exports=e();else{var s=e(),n=typeof self<"u"?self:$.global;"function"!=typeof n.btoa&&(n.btoa=s.btoa),"function"!=typeof n.atob&&(n.atob=s.atob)}}(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(t){this.message=t}return i.prototype=new m,i.prototype.name="InvalidCharacterError",{btoa:function(e){for(var s,n,r,h,o=String(e),a=0,u="";a255||n>255||r>255)throw new i("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");u+=t.charAt((h=s<<16|n<<8|r)>>18&63)+t.charAt(h>>12&63)+t.charAt(h>>6&63)+t.charAt(63&h)}switch(o.length%3){case 0:return u;case 1:return u.slice(0,-2)+"==";case 2:return u.slice(0,-1)+"="}},atob:function(e){var s=String(e).replace(/[=]+$/,"");if(s.length%4==1)throw new i("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,h=0,o=0,a="";r=s.charAt(o++);~r&&(n=h%4?64*n+r:r,h++%4)?a+=String.fromCharCode(255&n>>(-2*h&6)):0)r=t.indexOf(r);return a}}})}(cs,cs.exports)),cs.exports);function ls(t){var i,e,s;return{lang:null!=(i=null==t?void 0:t.lang)?i:void 0,message:null==t?void 0:t.message,abortEarly:null!=(e=null==t?void 0:t.abortEarly)?e:void 0,abortPipeEarly:null!=(s=null==t?void 0:t.abortPipeEarly)?s:void 0}}function fs(t){var i,e,s;const n=typeof t;return"string"===n?'"'.concat(t,'"'):"number"===n||"bigint"===n||"boolean"===n?"".concat(t):"object"===n||"function"===n?null!=(s=t&&(null==(e=null==(i=w.getPrototypeOf(t))?void 0:i.constructor)?void 0:e.name))?s:"null":n}function vs(t,i,e,s,n){var r,h,o,a,u,c,d,l;const f=n&&"input"in n?n.input:e.value,v=null!=(h=null!=(r=null==n?void 0:n.expected)?r:t.expects)?h:null,_=null!=(o=null==n?void 0:n.received)?o:fs(f),g={kind:t.kind,type:t.type,input:f,expected:v,received:_,message:"Invalid ".concat(i,": ").concat(v?"Expected ".concat(v," but r"):"R","eceived ").concat(_),requirement:t.requirement,path:null==n?void 0:n.path,issues:null==n?void 0:n.issues,lang:s.lang,abortEarly:s.abortEarly,abortPipeEarly:s.abortPipeEarly},p="schema"===t.kind,m=null!=(l=null!=(d=null!=(c=null!=(u=null!=(a=null==n?void 0:n.message)?a:t.message)?u:function(t,i){var e;return null==(e=void 0)?void 0:e.get(i)}(t.reference,g.lang))?c:p?void g.lang:null)?d:s.message)?l:void g.lang;void 0!==m&&(g.message="function"==typeof m?m(g):m),p&&(e.typed=!1),e.issues?e.issues.push(g):e.issues=[g]}function _s(t){return{version:1,vendor:"valibot",validate:i=>t["~run"]({value:i},ls())}}function gs(t,i){return w.hasOwn(t,i)&&"__proto__"!==i&&"prototype"!==i&&"constructor"!==i}function ps(t,i){var e;const s=[...new Set(t)];return s.length>1?"(".concat(s.join(" ".concat(i," ")),")"):null!=(e=s[0])?e:"never"}var ms=class extends m{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function ws(t,i,e){return"function"==typeof t.fallback?t.fallback(i,e):t.fallback}function ys(t,i,e){return"function"==typeof t.default?t.default(i,e):t.default}function As(t,i){return{kind:"schema",type:"array",reference:As,expects:"Array",async:!1,item:t,message:i,get"~standard"(){return _s(this)},"~run"(t,i){var e;const s=t.value;if(Array.isArray(s)){t.typed=!0,t.value=[];for(let n=0;nt.expects),"|"),async:!1,options:t,message:i,get"~standard"(){return _s(this)},"~run"(t,i){let e,s,n;for(const r of this.options){const h=r["~run"]({value:t.value},i);if(h.typed){if(!h.issues){e=h;break}s?s.push(h):s=[h]}else n?n.push(h):n=[h]}if(e)return e;if(s){if(1===s.length)return s[0];vs(this,"type",t,i,{issues:xs(s)}),t.typed=!0}else{if(1===(null==n?void 0:n.length))return n[0];vs(this,"type",t,i,{issues:xs(n)})}return t}}}function Rs(){return{kind:"schema",type:"unknown",reference:Rs,expects:"unknown",async:!1,get"~standard"(){return _s(this)},"~run":t=>(t.typed=!0,t)}}let Cs;class Ds extends lt{getRTCPeerConnection(){return this.webRTCPeer?this.webRTCPeer.getRTCPeer():null}stop(){var t;Cs.info("Stopping"),this.webRTCPeer.closeRTCPeer(),null==(t=this.signaling)||t.close(),this.signaling=null,this.stopReconnection=!0,this.webRTCPeer=new Pe}isActive(){const t=this.webRTCPeer.getRTCPeerStatus();return Cs.info("Broadcast status: ",t||"not_established"),"connected"===t}setReconnect(){this.signaling.on("migrate",()=>this.replaceConnection()),this.autoReconnect&&(this.signaling.on(ze,()=>{(this.firstReconnection||!this.alreadyDisconnected)&&(this.firstReconnection=!1,this.reconnect({error:new m("Signaling error: wsConnectionError")}))}),this.webRTCPeer.on(ke.connectionStateChange,t=>{Q(t),"connected"===t&&X(new Date),("failed"===t||"disconnected"===t&&this.alreadyDisconnected)&&this.firstReconnection?(this.firstReconnection=!1,this.reconnect({error:new m("Connection state change: RTCPeerConnectionState disconnected")})):"disconnected"===t?(this.alreadyDisconnected=!0,u(()=>this.reconnect({error:new m("Connection state change: RTCPeerConnectionState disconnected")}),1500)):this.alreadyDisconnected=!1}))}async reconnect(t){try{Cs.info("Attempting to reconnect..."),!this.isActive()&&!this.stopReconnection&&!this.isReconnecting&&(this.stop(),this.emit("reconnect",{timeout:Bs(this.reconnectionInterval),error:null!=t&&t.error?null==t?void 0:t.error:new m("Attempting to reconnect")}),this.isReconnecting=!0,await this.connect(this.options),this.alreadyDisconnected=!1,this.reconnectionInterval=1e3,this.firstReconnection=!0,this.isReconnecting=!1)}catch(t){this.isReconnecting=!1,this.reconnectionInterval=Bs(this.reconnectionInterval),Cs.error("Reconnection failed, retrying in ".concat(this.reconnectionInterval,"ms. "),t),u(()=>this.reconnect({error:t}),this.reconnectionInterval)}}constructor(t,i,e,s){if(super(),Cs=e,!i)throw Cs.error("Token generator is required to construct this module."),new m("Token generator is required to construct this module.");this.webRTCPeer=new Pe,this.signaling=null,this.autoReconnect=s,this.reconnectionInterval=1e3,this.alreadyDisconnected=!1,this.firstReconnection=!0,this.stopReconnection=!1,this.isReconnecting=!1,this.tokenGenerator=i,this.options=null}}const Bs=t=>t<32e3?2*t:t,Ns=s.RTCRtpSender&&!!RTCRtpSender.prototype.createEncodedStreams&&s.RTCRtpReceiver&&!!RTCRtpReceiver.prototype.createEncodedStreams,Ms="RTCRtpScriptTransform"in s,Ls='(function(){"use strict";function z(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var U={exports:{}};/*!\n * js-logger - http://github.com/jonnyreeves/js-logger\n * Jonny Reeves, http://jonnyreeves.co.uk/\n * js-logger may be freely distributed under the MIT license.\n */var q=U.exports,D;function V(){return D||(D=1,function(t){(function(n){var e={};e.VERSION="1.6.1";var i,r={},o=function(s,u){return function(){return u.apply(s,arguments)}},a=function(){var s=arguments,u=s[0],h,c;for(c=1;c=u.value},trace:function(){this.invoke(e.TRACE,arguments)},debug:function(){this.invoke(e.DEBUG,arguments)},info:function(){this.invoke(e.INFO,arguments)},warn:function(){this.invoke(e.WARN,arguments)},error:function(){this.invoke(e.ERROR,arguments)},time:function(s){typeof s=="string"&&s.length>0&&this.invoke(e.TIME,[s,"start"])},timeEnd:function(s){typeof s=="string"&&s.length>0&&this.invoke(e.TIME,[s,"end"])},invoke:function(s,u){i&&this.enabledFor(s)&&i(u,a({level:s},this.context))}};var f=new l({filterLevel:e.OFF});(function(){var s=e;s.enabledFor=o(f,f.enabledFor),s.trace=o(f,f.trace),s.debug=o(f,f.debug),s.time=o(f,f.time),s.timeEnd=o(f,f.timeEnd),s.info=o(f,f.info),s.warn=o(f,f.warn),s.error=o(f,f.error),s.log=s.info})(),e.setHandler=function(s){i=s},e.setLevel=function(s){f.setLevel(s);for(var u in r)r.hasOwnProperty(u)&&r[u].setLevel(s)},e.getLevel=function(){return f.getLevel()},e.get=function(s){return r[s]||(r[s]=new l(a({name:s},f.context)))},e.createDefaultHandler=function(s){s=s||{},s.formatter=s.formatter||function(p,_){_.name&&p.unshift("["+_.name+"]")};var u={},h=function(c,p){Function.prototype.apply.call(c,console,p)};return typeof console>"u"?function(){}:function(c,p){c=Array.prototype.slice.call(c);var _=console.log,g;p.level===e.TIME?(g=(p.name?"["+p.name+"] ":"")+c[0],c[1]==="start"?console.time?console.time(g):u[g]=new Date().getTime():console.timeEnd?console.timeEnd(g):h(_,[g+": "+(new Date().getTime()-u[g])+"ms"])):(p.level===e.WARN&&console.warn?_=console.warn:p.level===e.ERROR&&console.error?_=console.error:p.level===e.INFO&&console.info?_=console.info:p.level===e.DEBUG&&console.debug?_=console.debug:p.level===e.TRACE&&console.trace&&(_=console.trace),s.formatter(c,p),h(_,c))}},e.useDefaults=function(s){e.setLevel(s&&s.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(s))},e.setDefaults=e.useDefaults,t.exports?t.exports=e:(e._prevLogger=n.Logger,e.noConflict=function(){return n.Logger=e._prevLogger,e},n.Logger=e)})(q)}(U)),U.exports}var j=V(),R=z(j);class w{constructor(n){this.data=n,this.bitOffset=0}readBits(n){if(this.bitOffset+n>this.data.length*8)throw new Error("Attempted to read past the end of the bitstream");let e=0;for(let i=0;i>o&1;e|=a<31||o<0)throw new Error("Invalid seq_parameter_set_id");if(r.includes(i)){const l=e.readExpGolombUnsigned();if(l===3&&e.skip(1),e.readExpGolombUnsigned(),e.readExpGolombUnsigned(),e.skip(1),e.readBits(1)){const s=l!==3?8:12;for(let u=0;u255||i<0)throw new Error("Invalid pic_parameter_set_id");const r=e.readExpGolombUnsigned();this.pps.set(i,{seq_parameter_set_id:r})}collectH265PPS(n){}findActiveSPS(n){const e=new w(n);e.readExpGolombUnsigned(),e.readExpGolombUnsigned();const i=e.readExpGolombUnsigned(),r=this.pps.get(i);if(r){const o=this.sps.get(r.seq_parameter_set_id);if(o){this.activeSPS=o;return}}throw new Error("Cannot find the active SPS")}}const S=new $;function O(t,n){for(;n=e){const a=t[o+2]===1?3:4,d=O(t,o+a+i);if(d>o)r.push(t.subarray(o,d)),e=d;else{r.push(t.subarray(o));break}}else break}return r}function K(t,n){let e=!0;return J(t,n).filter(i=>{const r=i[2]===1?3:4,o=n==="H264"?1:2,a=i[r],d=n==="H264"?a&31:a>>1&63;if(e)switch(d){case m.PPS_H264:case m.PPS_H265:S.collectPPS(T(i.subarray(r+o)));break;case m.SPS_H264:case m.SPS_H265:S.collectSPS(T(i.subarray(r+o)));break;case m.SLICE_IDR:case m.SLICE_NON_IDR:case m.SLICE_PARTITION_A:try{S.findActiveSPS(T(i.subarray(r+o))),e=!1}catch(l){console.info("Failed to find active SPS. Will not be able to extract PIC timing metadata")}break}return[m.SEI_H264,m.SEI_H265_PREFIX,m.SEI_H265_SUFFIX].includes(d)})}function Z(t){let n=0,e=0;for(;t[e]===255;)n+=255,e++;n+=t[e],e++;let i=0;for(;t[e]===255;)i+=255,e++;return i+=t[e],e++,{type:n,content:t.subarray(e,e+i)}}function Q(t){const n=new Uint8Array(L(X)),e=new Uint8Array(L(Y)),i=new Uint8Array(L(P));return n.every((r,o)=>r===t[o])?E.TIMECODE:e.every((r,o)=>r===t[o])?E.LEGACY:i.every((r,o)=>r===t[o])?E.NEW:E.OTHER}function ee(t,n){let e=0;t.uuid=n.subarray(e,e+16),e+=16;const i=Q(t.uuid),r=n.subarray(e);switch(i){case E.LEGACY:case E.OTHER:t.unregistered=r;break;case E.TIMECODE:t.timecode=C(r);break;case E.NEW:{let o=0;const a=H(Date.now()).length,d=r.subarray(o,a);o+=a;const l=r.subarray(o);t.timecode=C(d),t.unregistered=l;break}}}function C(t){const n=t.reduce((o,a)=>(o<=o.length)throw new Error("Invalid pic_struct");const d=o[a],l=[];for(let p=0;p{const r=i[2]===1?3:4,o=n==="H264"?1:2,a=T(i.subarray(r+o)),d=Z(a);switch(d.type){case G.PIC_TIMING:te(e,d.content);break;case G.USER_DATA_UNREGISTERED:ee(e,d.content);break}}),e}function re(t){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(t)}function L(t){return t.replace(/-/g,"").match(/.{1,2}/g).map(n=>parseInt(n,16))}function ie(t,n,e){const i=new Uint8Array(L(t)),r=H(e),o=new TextEncoder().encode(JSON.stringify(n)),a=new Uint8Array(i.length+r.length+o.length);return a.set(i),a.set(r,i.length),a.set(o,r.length+i.length),a}function se(t){const n=[],e=Math.floor(t.byteLength/255),i=t.byteLength%255;for(let r=0;r>BigInt(8*i)&BigInt(255)))}return new Uint8Array(n)}function ae({uuid:t,payload:n,timecode:e}){const i=[0,0,0,1],r=[102],o=ie(t,n,e),a=se(o),d=oe(o),l=new Uint8Array(i.length+r.length+a.length+d.length);return l.set(i),l.set(r,i.length),l.set(a,i.length+r.length),l.set(d,i.length+r.length+a.length),l}function ce({uuid:t,payload:n,timecode:e},i){if(t===""||n==="")throw new Error("uuid and payload cannot be empty");re(t)||(console.warn("Invalid UUID. Using default UUID."),t=P,e=Date.now());const r=ae({uuid:t,payload:n,timecode:e}),o=new DataView(i.data),a=new ArrayBuffer(i.data.byteLength+r.byteLength),d=new DataView(a);for(let l=0;l0)&&self.postMessage({event:"metadata",mid:t,metadata:a})}self.postMessage({event:"complete",frame:{type:n.type,timestamp:n.timestamp,data:n.data}})}e.enqueue(n)}})}function N(t){if(typeof RTCEncodedVideoFrame<"u")try{if(t instanceof RTCEncodedVideoFrame)return!0}catch(n){}return!!(t.constructor&&t.constructor.name==="RTCEncodedVideoFrame"||typeof t.width=="number"&&typeof t.height=="number"||t.type==="video")}function F(){Object.keys(v).sort().join()===I.sort().join()&&(b.shift(),I=[])}function de(t){const n=new Date().getTime();v[t]=n,Object.keys(v).filter(i=>n-v[i]>le).forEach(i=>{delete v[i],delete I[i]}),F()}function W(){return new TransformStream({start(){},flush(){},async transform(t,n){if(N(t)){const i=t.getMetadata().synchronizationSource;if(de(i),!I.includes(i)&&b.length)try{if(!/(h26[4])/.test(y))throw new Error("Sending metadata is not supported with any other codec other than H.264");b[0].uuid===P&&(b[0].timecode=Date.now()),ce(b[0],t),I.push(i)}catch(r){console.error(r)}finally{F()}}n.enqueue(t)}})}function A({readable:t,writable:n},e){t.pipeThrough(e).pipeTo(n)}addEventListener("rtctransform",t=>{let n;if(t.transformer.options.name==="senderTransform")y=t.transformer.options.codec,n=W();else if(t.transformer.options.name==="receiverTransform")k=t.transformer.options.payloadTypeCodec||{},y=t.transformer.options.codec||"",n=M(t.transformer.options.mid);else return;A(t.transformer,n)}),addEventListener("message",t=>{const{action:n}=t.data;switch(n){case"insertable-streams-sender":y=t.data.codec,A(t.data,W());break;case"insertable-streams-receiver":k=t.data.payloadTypeCodec||{},y=t.data.codec||"",A(t.data,M(t.data.mid));break;case"metadata-sei-user-data-unregistered":b.push({uuid:t.data.uuid,payload:t.data.payload});break}})})();\n',Os=typeof self<"u"&&self.Blob&&new Blob([Ls],{type:"text/javascript;charset=utf-8"});function Fs(t){let i;try{if(i=Os&&(self.URL||self.webkitURL).createObjectURL(Os),!i)throw"";const e=new ad(i,{name:null==t?void 0:t.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(i)}),e}catch(i){return new ad("data:text/javascript;charset=utf-8,"+encodeURIComponent(Ls),{name:null==t?void 0:t.name})}finally{i&&(self.URL||self.webkitURL).revokeObjectURL(i)}}const Us=at.get("Publish"),Vs={mediaStream:null,bandwidth:0,metadata:!1,disableVideo:!1,disableAudio:!1,codec:ye.H264,simulcast:!1,scalabilityMode:null,peerConfig:{autoInitStats:!0,statsIntervalMs:1e3}};let Hs;const Ws=t=>{Hs=Hs||Ss({sourceId:Ts(Ps()),stereo:Ts(bs()),dtx:Ts(bs()),absCaptureTime:Ts(bs()),dependencyDescriptor:Ts(bs()),mediaStream:Ts(Is([As(Rs()),Rs()])),bandwidth:Ts(ks()),metadata:Ts(bs()),disableVideo:Ts(bs()),disableAudio:Ts(bs()),codec:Ts(Es(w.values(ye))),simulcast:Ts(bs()),scalabilityMode:Ts(Ps()),peerConfig:Ts(Ss({autoInitStats:Ts(bs()),statsIntervalMs:Ts(ks())})),record:Ts(bs()),events:Ts(As(Es(["active","inactive","viewercount"]))),priority:Ts(ks())});const{success:i,issues:e}=function(t,i,e){const s=t["~run"]({value:i},ls(e));return{typed:s.typed,success:!s.issues,output:s.value,issues:s.issues}}(Hs,t);i||Us.warn(new ms(e),t)};function qs(t){if(!t)return new j;const i=t.length,e=new j(i/2);for(let s=0;s=4&&console[s(323)](this[s(310)],...i)}[hn(331)](){for(var t=arguments.length,i=new Array(t),e=0;e=3&&console[s(331)](this[s(310)],...i)}[hn(320)](){for(var t=arguments.length,i=new Array(t),e=0;e=2&&console[s(320)](this[s(310)],...i)}error(){for(var t=arguments.length,i=new Array(t),e=0;e=1&&console.error(this.tag,...i)}constructor(t){this[on(310)]=t}}function un(t){return new an(t)}const cn={logLevel:3,mediaDumps:{video:{in:{durationMs:0,delimited:!0},out:{durationMs:0}},audio:{in:{durationMs:0},out:{durationMs:0}}}};function dn(){return(new Date)[hn(317)]().slice(11,-1)}function ln(){const t=["mediaBuffer","click","529321KfbOwo","endTimestampMs","28972188cmcnxe","containerFileExt","info","4ZlZeJQ","9kyfNFe","mediaType","172953TzXwsI","byteLength","1327806tybvjI","href","createObjectURL","1089qysnCz","112088WLFXHK","substring","tag","692993ZcAeLj","set","download","810qiScYX","startTimestampMs","8821555KArxhe","toISOString","application/octet-stream","logLevel","warn","revokeObjectURL","42PDuKrJ","debug","targetDurationMs"];return(ln=function(){return t})()}class fn{append(t,i){const e=hn;if(!this[e(325)])return!1;if(this[e(325)]=function(t,i){const e=hn,s=new j((0|t[e(303)])+(0|i.byteLength));return s[e(312)](t,0),s[e(312)](i,0|t.byteLength),s}(this[e(325)],t),void 0!==i)if(-1===this[e(315)])this.startTimestampMs=i,this[e(328)]=i+this[e(324)];else if(i>=this[e(328)]){const t=(new Date)[e(317)]()[e(309)](0,19).replace(/:/g,"-"),i=this.mediaType+"-"+t+"."+this.containerFileExt;return function(t,i,e){void 0===e&&(e=hn(318));const s=hn,n=h.createElement("a"),r=new Blob([t],{type:e});n.href=URL[s(306)](r),n[s(313)]=i,n[s(326)](),URL[s(321)](n[s(305)])}(this[e(325)],i),this.mediaBuffer=null,!1}return!0}constructor(t,i,e){const s=hn;this[s(325)]=null,this[s(315)]=-1,this.endTimestampMs=-1,this[s(301)]=t,this[s(330)]=i,this[s(324)]=e,e>0&&(this[s(325)]=new j)}}const vn=mn;!function(){const t=mn,i=Cn();for(;;)try{if(x(t(160))/1+-x(t(363))/2+-x(t(321))/3*(-x(t(401))/4)+x(t(229))/5+-x(t(276))/6+x(t(400))/7*(-x(t(153))/8)+-x(t(223))/9==858456)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const _n=un("[MUX]"),gn=rn[vn(387)];function pn(t,i){const e=vn;let s=new j((0|t[e(413)])+(0|i[e(413)]));return s.set(t,0),s[e(251)](i,0|t[e(413)]),s}function mn(t,i){const e=Cn();return(mn=function(t,i){return e[t-=147]})(t,i)}function wn(t,i,e){return void 0===i&&(i=0),void 0===e&&(e=1/0),((t,i,e,s)=>{const n=vn,r=s[n(425)]||1;i*=r,e*=r;const h=(u=t)instanceof ArrayBuffer?u:u[vn(366)],o=(t[n(188)]||0)+t[n(413)],a=(t[n(188)]||0)+i;var u;let c=_[n(177)](0,_[n(291)](a,o)),d=_[n(291)](c+_[n(177)](e,0),o);return c/=r,d/=r,new s(h,c,d-c)})(t,i,e,j)}function yn(t){const i=vn,e=Array.from(t)[i(238)](t=>t[i(384)](0));return new j(e)}class An{static get[vn(449)](){return 1}static get[vn(427)](){return 5}static get SEI(){return 6}static get[vn(324)](){return 7}static get[vn(379)](){return 8}static get[vn(272)](){return 9}static get[vn(159)](){const t=vn;return{[An[t(427)]]:t(427),[An[t(273)]]:t(273),[An[t(324)]]:t(324),[An.PPS]:"PPS",[An[t(449)]]:"NDR",[An.AUD]:t(272)}}static[vn(234)](t){const i=vn;return t[i(186)]in An[i(159)]?An[i(159)][t.ntype]:i(344)}[vn(365)](){const t=vn;return An[t(234)](this)+": NRI: "+this[t(209)]()}[vn(209)](){return this[vn(402)]}[vn(234)](){return this[vn(186)]}[vn(306)](){return this[vn(186)]===An.IDR}[vn(203)](){return this[vn(452)]}[vn(327)](){return this[vn(452)].byteLength}[vn(194)](){return 4+this[vn(327)]()}[vn(341)](){const t=vn,i=new j(this[t(194)]());return new DataView(i[t(366)]).setUint32(0,this[t(194)]()-4),i[t(251)](this.getPayload(),4),i}constructor(t){const i=vn;this[i(452)]=t,this[i(402)]=(96&this[i(452)][0])>>5,this[i(186)]=31&this[i(452)][0],this.isvcl=1==this[i(186)]||5==this[i(186)],this[i(309)]="",this.isfmb=!1}}class bn{[vn(433)](t){const i=vn;this.data=t,this[i(368)]=0,this.bitLength=8*t[i(413)]}get[vn(451)](){return this[vn(157)]-this.index}skipBits(t){const i=vn;if(this[i(451)]>>n,h=8-n;if(h>=t)return e&&(this[s(368)]+=t),r>>h-t;{e&&(this[s(368)]+=h);const n=t-h;return r<>>1:-1*(t>>>1)}[vn(239)](){return 1===this[vn(338)](1)}[vn(419)](t){return void 0===t&&(t=1),this.readBits(8*t)}[vn(232)](){return this.readBits(16)}readUInt(){return this[vn(338)](32)}constructor(t){const i=vn;this[i(316)]=t,this[i(368)]=0,this[i(157)]=8*t.byteLength}}class Sn{static[vn(267)](t,i){const e=vn;let s=[],n=!1,r=!1,h=!1,o=!1,a=0,u=0,c=0,d=[];for(;a<=t.byteLength;){if(a1&&(c=u>2?4:3,d.push(a)),u=0):++u}else c=0,d.push(a++);if(d.length>1){const e=d.shift(),l=d[0]-c;if(e1&&3===e&&(u=0,e=t[a++]),0!==e?u=0:++u,i[n++]=e}s.push(i.subarray(0,n))}}}}let l=!0,f=!1;return r||n?r&&n&&(_n[e(265)](e(331)),l=!1):(_n[e(265)]("[H264Parser] No VCL NALUs found"),l=!1),n&&(h&&o?f=!0:_n.warn(e(158))),{valid:l,idr:f,nalus:s}}static[vn(333)](t,i){let e,s=8,n=8;for(let r=0;r0&&t[1]>0&&(f=t[0]/t[1])}a.readBoolean()&&a[i(155)](1),a[i(239)]()&&(a[i(155)](4),a[i(239)]()&&a[i(155)](24)),a[i(239)]()&&(a[i(334)](),a[i(334)]()),a.readBoolean()&&(a.readUInt(),a[i(187)](),a.readBoolean())}return{width:_[i(440)]((16*(n+1)-2*u-2*c)*f),height:(2-h)*(r+1)*16-(h?2:4)*(d+l)}}static[vn(386)](t){const i=vn;let e=new bn(t[i(203)]());e[i(419)](),t[i(196)]=0===e[i(179)](),t[i(309)]=e[i(179)]()}[vn(256)](t){const i=vn;var e=Sn[i(432)](new j(t));this.track[i(237)]=e.width,this[i(233)].height=e.height,this.track[i(382)]=[new j(t)],this.track[i(210)]=i(292);let s=new DataView(t.buffer,t[i(188)]+1,4);for(let t=0;t<3;++t){var n=s[i(313)](t)[i(365)](16);n[i(268)]<2&&(n="0"+n),this.track[i(210)]+=n}}[vn(345)](t){const i=vn;this[i(233)][i(434)]=[new j(t)]}[vn(378)](t){const i=vn;if(!t)return!1;let e=!1;switch(t[i(234)]()){case An[i(427)]:case An.NDR:e=!0;break;case An[i(379)]:!this[i(233)][i(434)]&&(this[i(345)](t.getPayload()),!this[i(175)][i(296)]&&this[i(233)][i(434)]&&this.track[i(382)]&&(this.remuxer[i(296)]=!0)),e=!0;break;case An[i(324)]:!this.track.sps&&(this[i(256)](t[i(203)]()),!this[i(175)][i(296)]&&this[i(233)].pps&&this[i(233)][i(382)]&&(this.remuxer[i(296)]=!0)),e=!0;break;case An[i(272)]:break;case An.SEI:e=!0}return e}constructor(t){const i=vn;this.remuxer=t,this[i(233)]=t.mp4track}}class Tn{on(t,i){const e=vn;return!this[e(270)][t]&&(this.listener[t]=[]),this[e(270)][t].push(i),!0}off(t,i){const e=vn;if(this[e(270)][t]){var s=this[e(270)][t].indexOf(i);return s>-1&&this[e(270)][t][e(369)](s,1),!0}return!1}[vn(219)](){this.listener={}}[vn(225)](t,i){const e=vn;return!!this[e(270)][t]&&(this[e(270)][t].map(t=>{t[e(200)](null,[i])}),!0)}constructor(t){const i=vn;this.listener={},this[i(234)]=""|t}}class kn{static box(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s>>24,r[1]=h>>>16&255,r[2]=h>>>8&255,r[3]=255&h,r[n(251)](t,4),o=0,h=8;o>>24,t>>>16&255,t>>>8&255,255&t,0,0,0,0,85,196,0,0]))}[vn(215)](t){const i=vn;return kn[i(347)](kn[i(212)].mdia,this[i(380)](t[i(274)],t[i(290)]),this[i(190)](t[i(234)]),this[i(230)](t))}[vn(443)](t){const i=vn;return kn.box(kn[i(212)][i(443)],new j([0,0,0,0,t>>>24,t>>>16&255,t>>>8&255,255&t]))}[vn(230)](t){const i=vn;return t[i(234)]===i(407)?kn[i(347)](kn[i(212)][i(230)],kn.box(kn.types[i(255)],kn.SMHD),kn[i(147)],this[i(362)](t)):kn[i(347)](kn.types[i(230)],kn[i(147)],this[i(362)](t),kn[i(347)](kn[i(212)].vmhd,kn[i(438)]))}[vn(370)](t,i,e){const s=vn;return kn[s(347)](kn.types.moof,this[s(443)](t),this[s(293)](e,i))}[vn(295)](t,i,e){const s=vn;let n=t[s(268)],r=[];for(;n--;)r[n]=this.trak(t[n]);return kn.box[s(200)](null,[kn[s(212)][s(295)],this[s(240)](e,i),this[s(447)](t)][s(389)](r)[s(389)](this[s(322)](t)))}[vn(322)](t){const i=vn;let e=t[i(268)],s=[];for(;e--;)s[e]=this[i(305)](t[e]);return kn[i(347)][i(200)](null,[kn[i(212)][i(322)]][i(389)](s))}[vn(240)](t,i){const e=vn;let s=new j([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24,t>>>16&255,t>>>8&255,255&t,i>>>24,i>>>16&255,i>>>8&255,255&i,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 kn[e(347)](kn.types.mvhd,s)}[vn(420)](t){const i=vn;let e=t[i(428)]||[],s=new j(4+e.length);for(let t=0;t>>8&255),r.push(255&n),r=r[i(389)](Array.prototype[i(314)][i(395)](s));for(e=0;e>>8&255),h[i(406)](255&n),h=h.concat(Array.prototype[i(314)].call(s));const o=kn[i(347)](kn[i(212)][i(408)],new j([1,r[3],r[4],r[5],255,224|t.sps[i(268)]].concat(r)[i(389)]([t[i(434)][i(268)]]).concat(h))),a=t[i(237)],u=t[i(374)],c=kn[i(347)](kn.types[i(441)],kn.box(kn[i(212)][i(318)],new j([97,118,99,49])),kn[i(347)](kn[i(212)][i(349)],new j([0,0,0,0,...yn(this[i(285)][i(154)][i(415)][i(201)]),0,1,0,0])),kn.box(kn.types[i(217)],this[i(298)](i(415))));return kn[i(347)](kn[i(212)].encv,new j([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,a>>>8&255,255&a,u>>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,65,86,67,32,67,111,100,105,110,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]),o,c)}[vn(372)](t){const i=vn;let e=t[i(154)][i(413)],s=new j(26+e+3);return s[i(251)]([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5,e]),s[i(251)](t[i(154)],26),s.set([6,1,2],26+e),s}[vn(403)](t){const i=vn,e=t[i(354)];return kn[i(347)](kn[i(212)][i(403)],new j([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t[i(390)],0,16,0,0,0,0,e>>>8&255,255&e,0,0]),kn[i(347)](kn[i(212)][i(372)],this[i(372)](t)))}[vn(266)](t){const i=vn,e=t[i(354)];return new j([0,t[i(390)],1,56,0,0,e>>>8&255,255&e,0,0,0])}[vn(416)](t){const i=vn,e=t.audiosamplerate;return kn[i(347)](kn.types[i(416)],new j([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t[i(390)],0,16,0,0,0,0,e>>>8&255,255&e,0,0]),kn[i(347)](kn[i(212)][i(266)],this[i(266)](t)))}[vn(394)](t){const i=vn,e=kn[i(347)](kn.types[i(266)],this.dOps(t)),s=kn[i(347)](kn.types[i(441)],kn.box(kn.types.frma,new j([79,112,117,115])),kn[i(347)](kn.types.schm,new j([0,0,0,0,...yn(this[i(285)][i(154)].audio[i(201)]),0,1,0,0])),kn.box(kn.types[i(217)],this[i(298)](i(407)))),n=t[i(354)];return kn[i(347)](kn[i(212)].enca,new j([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t[i(390)],0,16,0,0,0,0,n>>>8&255,255&n,0,0]),e,s)}[vn(165)](t){const i=vn;return t[i(234)]===i(407)?kn[i(347)](kn[i(212)][i(165)],kn[i(168)],t[i(199)]?this[i(394)](t):this[i(416)](t)):kn[i(347)](kn.types[i(165)],kn[i(168)],this[i(303)](t))}[vn(278)](t){const i=vn,e=t.id,s=t[i(290)],n=t[i(237)],r=t[i(374)],h=t[i(388)];return kn[i(347)](kn[i(212)].tkhd,new j([0,0,0,7,0,0,0,0,0,0,0,0,e>>>24,e>>>16&255,e>>>8&255,255&e,0,0,0,0,s>>>24,s>>>16&255,s>>>8&255,255&s,0,0,0,0,0,0,0,0,0,0,0,0,255&h,h%1*10&255,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,n>>>8&255,255&n,0,0,r>>>8&255,255&r,0,0]))}[vn(293)](t,i){var e;const s=vn,n=t.id,r=t[s(428)][0][s(171)],h=t.samples[0][s(290)],o=t[s(428)][0].flags,a=kn[s(347)](kn[s(212)].tfhd,new j([0,2,0,58,n>>>24,n>>>16&255,n>>>8&255,255&n,0,0,0,1,h>>>24,n>>>16&255,h>>>8&255,255&h,r>>>24,r>>>16&255,r>>>8&255,255&r,0,o[s(264)],0,0])),u=kn[s(347)](kn[s(212)].tfdt,new j([0,0,0,0,i>>>24,i>>>16&255,i>>>8&255,255&i]));if(t.encrypted){let i,n;if(t[s(234)]===s(415)?(i=!0,n=this[s(350)][s(415)]+(null==(e=t.samples[0][s(191)])?void 0:e.byteLength)):(i=!1,n=this[s(350)].audio),n>0){const e=this[s(242)](n),r=this[s(340)](t[s(428)],i),h=e[s(268)]+20+r[s(268)]+a[s(268)]+u[s(268)]+8+16+8+8,o=this[s(271)](t,h);return kn[s(347)](kn[s(212)][s(293)],a,u,o,e,this.saio(h-r[s(268)]+o.length+8),r)}{const i=this[s(340)](null,!1),e=i.length+a[s(268)]+u[s(268)]+8+16+8+8,n=this[s(271)](t,e);return kn[s(347)](kn.types[s(293)],a,u,n,i)}}return kn.box(kn[s(212)].traf,a,u,this.trun(t,a[s(268)]+u.length+8+16+8+8))}trak(t){const i=vn;return t.duration=t[i(290)]||4294967295,kn.box(kn[i(212)].trak,this[i(278)](t),this[i(215)](t))}[vn(305)](t){const i=vn,e=t.id;return kn[i(347)](kn.types[i(305)],new j([0,0,0,0,e>>>24,e>>>16&255,e>>>8&255,255&e,0,0,0,1,0,0,0,16,0,0,0,0,0,0,0,0]))}trun(t,i){const e=vn;let s=(t[e(428)]||[])[e(268)],n=new j(12);return i+=20,n.set([0,0,0,1,s>>>24,s>>>16&255,s>>>8&255,255&s,i>>>24,i>>>16&255,i>>>8&255,255&i],0),kn[e(347)](kn.types[e(271)],n)}[vn(224)](t,i){const e=vn,s=e(445),n=function(t){const i=function(t){const i=vn;let e="";for(let s=0;s',e(308),"",e(398),e(353),e(216)+n+'"',">",e(412),e(249),e(391),i?""+i+e(423):"",e(351),e(269)].join("")))}pssh(t){const i=vn;if(this[i(285)][i(383)][i(202)](i(178)))return kn[i(347)](kn.types[i(447)],new j([0,0,0,0,237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237,0,0,0,18,18,16,...this[i(285)][i(154)][t[0][i(234)]].keyId]));if(this[i(285)][i(383)]===i(356)){const e=this[i(224)](this[i(285)][i(154)][t[0][i(234)]][i(429)],this.drm[i(371)]),s=e[i(413)];return kn[i(347)](kn[i(212)][i(447)],new j([0,0,0,0,154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149,s>>>24,s>>>16&255,s>>>8&255,255&s,...e]))}return this.drm[i(383)]===i(323)?kn[i(347)](kn[i(212)][i(447)],new j([1,0,0,0,16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75,0,0,0,1,...this.drm[i(154)][t[0].type].keyId,0,0,0,0])):this.drm[i(383)]===i(397)?null:void _n[i(189)](i(393)+this[i(285)][i(383)])}[vn(298)](t){const i=vn;let e,s,n=this[i(285)][i(154)][t];return n[i(201)]===i(226)?(e=new j([16,...n.iv]),s=25):(e=new j([]),s=0),kn[i(347)](kn[i(212)][i(298)],new j([1,0,0,0,0,s,1,this[i(350)][t],...n[i(429)],...e]))}[vn(242)](t){const i=vn;return kn[i(347)](kn[i(212)][i(242)],new j([0,0,0,0,t,0,0,0,1]))}[vn(204)](t){const i=vn;return kn[i(347)](kn[i(212)][i(204)],new j([0,0,0,0,0,0,0,1,t>>>24,t>>>16&255,t>>>8&255,255&t]))}[vn(340)](t,i){const e=vn;let s=null;return t&&(1!==t[e(268)]&&_n[e(189)](e(182)+t[e(268)]+" samples - expected 1"),s=t[0][e(191)]),s&&s[e(413)]?kn[e(347)](kn[e(212)].senc,new j([0,0,0,i?2:0,0,0,0,1,...s])):kn.box(kn[e(212)][e(340)],new j([0,0,0,0,0,0,0,1]))}[vn(439)](t,i,e){const s=vn,n=this[s(295)](t,i,e);let r=new j(kn[s(183)].byteLength+n[s(413)]);return r[s(251)](kn[s(183)]),r[s(251)](n,kn[s(183)][s(413)]),r}constructor(t){var i,e;const s=vn;this[s(285)]=t,this.saiIvSize={video:"cenc"===(null==(i=t.config[s(415)])?void 0:i[s(201)])?16:0,audio:"cenc"===(null==(e=t[s(154)][s(407)])?void 0:e[s(201)])?16:0},kn[s(212)]={avc1:[],encv:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],Opus:[],dOps:[],enca:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],pssh:[],sinf:[],frma:[],schm:[],schi:[],tenc:[],saiz:[],saio:[],senc:[]};for(let t in kn[s(212)])kn.types[t]=[t[s(384)](0),t[s(384)](1),t[s(384)](2),t.charCodeAt(3)];const n=new j([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]),r=new j([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]);kn.HDLR_TYPES={video:n,audio:r};const h=new j([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),o=new j([0,0,0,0,0,0,0,0]);kn.STTS=kn[s(377)]=kn[s(213)]=o,kn.STSZ=new j([0,0,0,0,0,0,0,0,0,0,0,0]),kn[s(438)]=new j([0,0,0,1,0,0,0,0,0,0,0,0]),kn[s(307)]=new j([0,0,0,0,0,0,0,0]),kn[s(168)]=new j([0,0,0,0,0,0,0,1]);const a=new j([105,115,111,109]),u=new j([97,118,99,49]),c=new j([0,0,0,1]);kn[s(183)]=kn[s(347)](kn[s(212)].ftyp,a,c,a,u),kn[s(147)]=kn[s(347)](kn.types.dinf,kn[s(347)](kn[s(212)][s(280)],h))}}let En=1;class Pn{static[vn(411)](){return En++}[vn(246)](){const t=vn;this.mp4track[t(263)]=0,this[t(207)][t(428)]=[]}[vn(211)](){const t=vn;return!(!this[t(296)]||!this[t(428)][t(268)])}constructor(){this.seq=1}}class xn extends Pn{resetTrack(){const t=vn;this[t(437)]=1,this[t(222)]=0,this[t(336)]=0}[vn(181)](t,i,e){const s=vn;if(t[s(268)]>0)for(let n=0;n0&&this.readyToDecode&&(this[s(207)][s(263)]+=r,this[s(428)].push({units:t,size:r,keyFrame:n.keyFrame,duration:n[s(290)],sampleAuxInfo:i,timestamp:e}))}}[vn(161)](){const t=vn;if(!this[t(211)]()||!this[t(428)])return null;let i,e=this.mp4track[t(428)],s=this.samples[t(342)](),n=s.units,r=(1e3*s[t(332)]|0)-this[t(222)]|0;r<5&&(r=5),r>5e3&&_n[t(381)](t(430)+(r/1e3|0)+" s"),this.dts=this[t(222)],this[t(222)]+=r,i={size:s.size,duration:r,cts:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,isNonSync:s[t(148)]?0:1,dependsOn:s[t(148)]?2:1},sampleAuxInfo:s[t(191)]};let h=0;for(const i of n)h+=i[t(194)]();let o=0,a=new j(h);for(const i of n)a[t(251)](i[t(341)](),o),o+=i[t(194)]();return e.push(i),new j(a[t(366)],0,h)}constructor(t,i){const e=vn;super(),this[e(296)]=!1,this[e(222)]=0,this[e(336)]=0,this[e(361)]=i,this[e(207)]={id:Pn[e(411)](),type:e(415),len:0,fragmented:!0,sps:"",pps:"",width:0,height:0,timescale:t,duration:t,samples:[],encrypted:!0},this[e(428)]=[],this[e(302)]=new Sn(this)}}class Rn extends Tn{[vn(281)](t){const i=vn;("video"===t||"both"===t)&&(this[i(357)][i(415)]=new In(this.timescale,this[i(361)]),this[i(335)][i(406)](i(415))),(t===i(407)||t===i(417))&&(this[i(357)][i(407)]=new xn(this.timescale),this.trackTypes[i(406)](i(407)))}[vn(250)](){const t=vn;for(let i of this[t(335)])this.tracks[i].resetTrack();this[t(260)]=!1}[vn(262)](){const t=vn;this.tracks={},this[t(219)]()}[vn(246)](){const t=vn;if(this[t(260)])for(let i of this[t(335)]){let e=this[t(357)][i];for(;;){let s=e[t(161)]();if(!s||!s.byteLength)break;let n={type:i,payload:pn(this[t(164)][t(370)](e[t(437)]++,e[t(336)],e[t(207)]),this.mp4[t(244)](s)),dts:e[t(336)]};this[t(225)](t(366),n),e[t(246)]()}}else this[t(211)]()&&(this[t(225)]("ready"),this.initSegment(),this[t(260)]=!0,this[t(246)]())}[vn(439)](){const t=vn;for(let i of this[t(335)]){let e=this[t(357)][i],s={type:i,payload:this[t(164)][t(439)]([e[t(207)]],this[t(163)],this.timescale)};this[t(225)]("buffer",s)}}isReady(){const t=vn;for(let i of this[t(335)])if(!this.tracks[i][t(296)]||!this[t(357)][i][t(428)][t(268)])return!1;return!0}[vn(181)](t){const i=vn;for(let e of this[i(335)]){let s=t[e];s.length>0&&this[i(357)][e][i(181)](s,"audio"===e?t.audioSampleAuxInfo:t[i(310)],t[i(332)])}this[i(246)]()}constructor(t,i){const e=vn;super(e(175)),this[e(260)]=!1,this.trackTypes=[],this[e(357)]={},this[e(274)]=1e3,this[e(163)]=0,this[e(361)]=t,this.mp4=i}}function Cn(){const t=["stsd","isSupported","src","STSD","endMSE","abort","size","appendBufferError","addSourceBuffer","setupMSE","remuxer","addEventListener","max","com.widevine","readUEG"," - ","remux","Received ","FTYP","readyState","valid","ntype","readUInt","byteOffset","error","hdlr","sampleAuxInfo","webkitsourceopen","Checking codec","getSize","irrecoverableError","isfmb","[MSE] buffer error:","url","encrypted","apply","encryption","startsWith","getPayload","saio","open","[MSE] source buffer error","mp4track","append","getNri","codec","isReady","types","STCO","feed","mdia",'VALUE="',"schi","STSZ","offAll","jmuxer","skipEG","nextDts","1036611gAoRea","generatePlayReadyHeader","dispatch","cbcs","stsc","endOfStream","6576815frVeWy","minf","releaseBuffer","readUShort","track","type","stsz","isvcl","width","map","readBoolean","mvhd","onReady","saiz","reportDiscontinuity","mdat","bufferControllers","flush","patchSampleAuxinfo","readEG","","reset","set","onMSEClose","setUint16","idr","smhd","parseSPS","bind","message","getBits","initialized","sourceBuffer","destroy","len","isNonSync","warn","dOps","extractNALUs","length","","listener","trun","AUD","SEI","timescale","Num frames in chunk: ","7620738FWzrwf","mode","tkhd","dbgMediaDump","dref","addTrack","doAppend","options","[MSE] sourceclose","drm","mediaSource","Failure: Browser doesn't support MSE/MMS",'/mp4; codecs="',"function","duration","min","avc1.","traf","[MSE] sourceopen","moov","readyToDecode","resetTrack","tenc","onMSEOpen","MediaSource","removeSourceBuffer","h264","encv","sourceopen","trex","isKeyframe","SMHD","","stype","videoSampleAuxInfo","ended","getElementById","getUint8","slice","audioSampleAuxInfo","data","ready","frma","mseReady","string","4760043VatbTq","mvex","org.w3.clearkey","SPS","buffered","no video element were found to render, provide a valid video element","getPayloadSize",'","out",'","units","Unsupported DRM type ","enca","call","POSITIVE_INFINITY","com.apple.fps","","getVideoFrames","646233hEZDuD","4LuRDMh","nri","mp4a","ManagedMediaSource","buffer error","push","audio","avcC","onError","Buffered range ","getTrackID","","byteLength","No A/V data","video","Opus","both","HDLR_TYPES","readUByte","sdtp","STTS","hasRedundancy","","revokeObjectURL","BYTES_PER_ELEMENT","webkitsourceclose","IDR","samples","keyId","timestamp gap: ","node","readSPS","setData","pps","onBuffer","remuxController","seq","VMHD","initSegment","ceil","sinf","sourceclose","mfhd","skipLZ","http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader","Browser does not support codec","pssh","mediasource is not available to end: ","NDR","isReset","bitsAvailable","payload","DINF","keyFrame","isDependedOn","isTypeSupported","assign","waitingForIdr","8hmeyto","config","skipBits","remove","bitLength","[H264Parser] IDR without SPS/PPS, not suitable for recovery","TYPES","13659xNePtU","getFramePayload","onBufferError","mediaDuration","mp4"];return(Cn=function(){return t})()}class Dn extends Tn{[vn(262)](){const t=vn;this[t(337)]=null,this[t(279)]=null;try{this[t(261)]&&(this.sourceBuffer[t(170)](),this.mse[t(301)](this[t(261)]),this.sourceBuffer=null)}catch(t){}this.offAll()}[vn(282)](){const t=vn;if(this[t(337)][t(268)]&&this[t(261)]&&!this.sourceBuffer.updating){if(this[t(261)].buffered.length>1){for(let i=0;i0&&(this[n(279)]=new fn(i,n(164),r)),this.sourceBuffer=t,this[n(385)]=e,this[n(195)]=!1,this[n(261)].addEventListener(n(189),t=>{const i=n;_n.warn(i(206),t,this.type),this[i(195)]=!0,this.dispatch("error",{type:this[i(234)],name:i(366),error:i(405)})})}}class Bn extends Tn{static isSupported(t){const i=vn;return s[i(404)]?s.ManagedMediaSource[i(150)](t):!!s[i(300)]&&s[i(300)][i(150)](t)}[vn(348)](){const t=vn;typeof this[t(283)][t(431)]===t(320)&&""==this.options[t(431)]&&_n[t(189)](t(326)),this[t(319)]=!1,this[t(174)]()}[vn(174)](){const t=vn;if(!s.ManagedMediaSource&&!s[t(300)])throw t(287);s.ManagedMediaSource?(this.node[t(373)]=!0,this[t(286)]=new ManagedMediaSource):this[t(286)]=new MediaSource,this[t(198)]=URL.createObjectURL(this[t(286)]),this.node[t(167)]=this[t(198)],this[t(339)]=!1,this[t(286)][t(176)](t(304),this[t(299)][t(257)](this)),this.mediaSource.addEventListener(t(442),this[t(252)][t(257)](this)),this.mediaSource.addEventListener(t(192),this[t(299)][t(257)](this)),this[t(286)][t(176)](t(426),this[t(252)][t(257)](this)),this[t(286)][t(176)](t(189),function(i){const e=t;_n[e(189)](e(343),i[e(258)])})}[vn(169)](){const t=vn;if(!this.mseEnded)try{this[t(339)]=!0,this[t(286)][t(184)]===t(205)&&this[t(286)][t(228)]()}catch(i){_n[t(189)](t(448),i)}}[vn(243)](){const t=vn;_n[t(381)]("Discontinuity!"),this[t(152)]=!0}feed(t){const i=vn;let e={video:[],audio:[]};if(this[i(195)]||this[i(339)]||!t||!this.remuxController)return-1;if(t[i(415)]){e[i(332)]=t.timestamp;const s=this[i(360)](t[i(310)],this[i(164)][i(350)][i(415)]),n=s!=t.video[i(413)];let r=Sn[i(267)](t[i(415)],n);if(!r[i(185)]||r[i(367)].length<1)return 0;if(this.waitingForIdr){if(!r[i(254)])return 0;this[i(152)]=!1}if(!gn&&t[i(310)]){const e=r[i(367)][i(355)]((t,e)=>t+4+e[i(413)],0);e!==s&&this.patchSampleAuxinfo(t[i(310)],this[i(164)][i(350)][i(415)],e-s)}e[i(415)]=this[i(399)](r[i(367)]),e[i(310)]=t[i(310)]}return t[i(407)]&&(e[i(332)]=t.timestamp,e[i(407)]=[{units:t[i(407)]}],e[i(315)]=t[i(315)]),t[i(415)]||t[i(407)]?(this[i(436)][i(181)](e),0):(_n[i(189)](i(414)),0)}[vn(399)](t){const i=vn;let e=[],s=[],n=!1,r=!1;for(let h of t){let t=new An(h);t[i(234)]()!==An[i(427)]&&t[i(234)]()!==An[i(449)]||Sn[i(386)](t),e.length&&r&&(t[i(196)]||!t[i(236)])&&(s[i(406)]({units:e,keyFrame:n}),e=[],n=!1,r=!1),e.push(t),n=n||t.isKeyframe(),r=r||t[i(236)]}if(e[i(268)])if(r)s.push({units:e,keyFrame:n});else{let t=s[i(268)]-1;t>=0&&(s[t][i(392)]=s[t][i(392)].concat(e))}return 1!==s[i(268)]&&_n.warn(i(275)+s[i(268)]),s}[vn(360)](t,i){if(!t)return 0;const e=(t[0]<<8)+t[1],s=i+2+4;let n=0,r=2;for(;0=0&&(t[s]=n>>>8&255,t[s+1]=255&n)}return 0}[vn(376)](){const t=vn;if(this[t(319)]&&this[t(436)]&&this[t(436)][t(211)]()&&!this[t(245)]){this[t(245)]={};for(let i in this[t(436)][t(357)]){let e=this.remuxController[t(357)][i];const s=""[t(389)](i,t(288)).concat(e.mp4track[t(210)],'"');if(_n[t(381)](t(193),s),!Bn[t(166)](s))return _n.error(t(446)),!1;let n=this.mediaSource[t(173)](s);this[t(245)][i]=new Dn(n,i,this[t(286)]),this[t(245)][i].on(t(189),this[t(162)][t(257)](this))}}}[vn(231)](){const t=vn;for(let i in this.bufferControllers)this[t(245)][i][t(282)]()}[vn(435)](t){const i=vn;this[i(319)]&&this[i(245)]&&this[i(245)][t[i(234)]]&&this[i(245)][t[i(234)]].feed(t[i(452)],t[i(336)])}onMSEOpen(){const t=vn;_n[t(381)](t(294)),this[t(286)].readyState!==t(311)&&(this[t(286)][t(290)]=Number[t(396)],this[t(319)]=!0,typeof this[t(283)].onReady===t(289)&&this[t(283)][t(241)][t(395)](null,this.isReset),URL[t(424)](this[t(198)]),this[t(376)]())}[vn(252)](){const t=vn;_n[t(381)](t(284)),this.mseReady=!1,this[t(169)]()}onBufferError(t){const i=vn;_n.warn(i(197),t),this[i(195)]=!0,this.endMSE(),typeof this.options[i(409)]===i(289)&&this[i(283)][i(409)][i(395)](null,t)}constructor(t){const i=vn;super(i(220)),this[i(195)]=!1,this[i(152)]=!0,this[i(450)]=!1,this[i(319)]=!1,this.mseEnded=!1;let e={node:"",mode:i(415),debug:!1,onReady:function(){},onError:function(t){}};this.options=w[i(151)]({},e,t),this[i(431)]=typeof this.options[i(431)]===i(320)?h[i(312)](this[i(283)][i(431)]):this[i(283)][i(431)],this[i(285)]=t.drm,this[i(164)]=new kn(this[i(285)]),this[i(436)]=new Rn(this.node,this[i(164)]),this[i(436)][i(281)](this[i(283)][i(277)]),this[i(436)].on(i(366),this.onBuffer[i(257)](this)),this[i(436)].on(i(317),this[i(376)][i(257)](this)),this[i(348)]()}}function Nn(t,i){const e=Mn();return(Nn=function(t,i){return e[t-=182]})(t,i)}function Mn(){const t=["1247170HwkwNv","bv","gitVersion","352GaBvIm","toISOString","14XlATBT","2568948xDjIMf","1027225mjPCDe","19691yiLZrh","195999uPnZlk","3038288UlnUQm","2033937CLMUfn"];return(Mn=function(){return t})()}!function(){const t=Nn,i=Mn();for(;;)try{if(x(t(182))/1+x(t(192))/2*(x(t(184))/3)+-x(t(185))/4+-x(t(187))/5+x(t(193))/6+-x(t(183))/7*(x(t(190))/8)+-x(t(186))/9==553943)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const Ln=Hn;function On(){const t=["1236858jPUtaw","certificate","11225xsjioT","275391VrsSlK","5816evMpkd","CrsCCAMSEKDc0WAwLAQT1SB2ogyBJEwYv4Tx7gUijgIwggEKAoIBAQC8Xc/GTRwZDtlnBThq8","7299lkgbxa","1470Lkqtku","production","Development","charCodeAt","xUuwokpsqVIHZrJfu62ar+BF8UVUKdK5oYQoiTZd9OzK3kr29kqGGk3lSgM0/p499p/FUL8oH","baseUrl","375060LzZhzk","230861ZKueQt","12pvGCSu","https://lic.drmtoday.com","35fxICRY","pQnNI61gzHO42XZOMuxytMm0F6puNHTTqhyY3Z290YqvSDdOB+UY5QJuXJgjhvOUD9+oaLlvT","Production","development","https://lic.test.drmtoday.com","UrTEfQxfPR4dJTquE+IDLAi5yeVVxzbAgMBAAE6DGNhc3RsYWJzLmNvbUABEoADMmGXpXg/0q","from","RL9KsD0v7ysBQVdUXEbJotcFz71tI5qc3jwr6GjYIPA3VzusD17PN6AGQniMwxJV12z/EgnUo","baigovcoURAZcr1d/G0rpREjLdVLG0Gjqk63Gx688W5gh3TKemsK3R1jV0dOfj3e6uV/kTpsN","pcFB13osydpD2AaDsgWo5RWJcNf+fzCgtUQx/0Au9+xVm5LQBdv8Ja4f2oiHN3dw","V382D1oJAM0F/YgCQtNDLz7vTWJ+QskNGi5Dd2qzO4s48Cnx5BLvL4H0xCRSw2Ed6ekHSdrRU","27eI5MATX39gYtCnn7dDXVxo4/rCYK0A4VemC3HRai2X3pSGcsKY7+6we7h4IycjqtuGtYg8A","HzgsJ7Hajdsyzn0Vs3+VysAgaJAkXZ+k+N6Ka0WBiZlCtcunVJDiHQbz1sF9GvcePUUi2fM/h","Staging","staging","name"];return(On=function(){return t})()}!function(){const t=Hn,i=On();for(;;)try{if(x(t(326))/1+x(t(325))/2+x(t(315))/3+x(t(327))/4*(-x(t(314))/5)+-x(t(312))/6+x(t(329))/7*(x(t(316))/8)+-x(t(318))/9*(x(t(319))/10)==181728)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const Fn=Ln(317)+Ln(306)+"wyoYOE+M/t1oIbccwlTQ7o+BpV1X6TB7fxFyx1jsBtRsBWphU65w121zqmSiwzZzJ4xsXVQCJ"+Ln(330)+"+vwmV2/NJWxKqHBKdL9JqvOnNiQUF0hDI7Wf8Wb63RYSXKE27Ky31hKgx1wuq7TTWkA+kHnJT"+Ln(334)+Ln(323)+Ln(308)+"7hyskG5ZLAyJMzTvgnV3D8/I5Y6mCFBPb/+/Ri+9bEvquPF3Ff9ip3yEHu9mcQeEYCeGe9zR/"+Ln(307)+Ln(304)+Ln(336)+Ln(305),Un=j[Ln(335)](s.atob(Fn),t=>t[Ln(322)](0));class Vn{toString(){return this.name}[Ln(324)](){const t=Ln;switch(this[t(311)]){case"staging":return"https://lic.staging.drmtoday.com";case"development":return t(333);default:return t(328)}}[Ln(313)](){return Un}constructor(t){this[Ln(311)]=t}}function Hn(t,i){const e=On();return(Hn=function(t,i){return e[t-=304]})(t,i)}Vn[Ln(309)]=new Vn(Ln(310)),Vn[Ln(331)]=new Vn(Ln(320)),Vn[Ln(321)]=new Vn(Ln(332));const Wn=qn;function qn(t,i){const e=zn();return(qn=function(t,i){return e[t-=252]})(t,i)}function zn(){const t=["SampleAuxInfo corrupted","error","50012RXzLep","3301necisu","[RTC-DRM]","subarray","buffer","64zGPhLV","162pDdDkb","659466dfDPqj","SampleAuxInfo corrupted (postfix not found)","data","4199670WddvRf","95WaGAXy","getUint8","137436hbCkvG","1351035XuhSnW","getUint16","byteLength","184863QcuifQ"];return(zn=function(){return t})()}!function(){const t=qn,i=zn();for(;;)try{if(-x(t(253))/1*(x(t(258))/2)+x(t(259))/3+x(t(252))/4*(-x(t(263))/5)+-x(t(265))/6+-x(t(269))/7*(-x(t(257))/8)+-x(t(266))/9+x(t(262))/10==173102)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const Gn=un(Wn(254));!function(){const t=jn,i=Yn();for(;;)try{if(x(t(369))/1+x(t(374))/2+x(t(366))/3+-x(t(373))/4+-x(t(365))/5+-x(t(368))/6*(x(t(370))/7)+x(t(367))/8==110661)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const Xn=[];function jn(t,i){const e=Yn();return(jn=function(t,i){return e[t-=365]})(t,i)}let Qn=null,Kn=0;function Yn(){const t=["799144UpkRWz","356926NfeJZx","set","slice","237700RBIjTO","627444ELwjUL","76968OxbdcX","6xPMWky","172231EpHRtx","1480332fEizHX","push","buffer"];return(Yn=function(){return t})()}const Jn=vr;!function(){const t=vr,i=sr();for(;;)try{if(-x(t(452))/1+-x(t(412))/2+-x(t(478))/3*(x(t(441))/4)+-x(t(485))/5*(-x(t(415))/6)+-x(t(400))/7+x(t(460))/8*(-x(t(486))/9)+-x(t(437))/10*(-x(t(470))/11)==412983)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const Zn=un(Jn(424));let $n={licenseUrl:"",onFetch:void 0};const tr={},ir=(t,i,e)=>(void 0===i&&(i=0),void 0===e&&(e=1/0),((t,i,e)=>{const s=Jn,n=j.BYTES_PER_ELEMENT;i*=n,e*=n;const r=(a=t)instanceof ArrayBuffer?a:a[Jn(484)],h=t[s(483)],o=i;var a;let u=_[s(432)](0,_.min(o,h)),c=_.min(u+_[s(432)](e,0),h);return u/=n,c/=n,new j(r,u,c-u)})(t,i,e));const er=t=>{const i=Jn;let e="";for(const s of t){let t=s.toString(16);1==t[i(433)]&&(t="0"+t),e+=t}return e};function sr(){const t=["360308tFqTFd","usable for decryption (status: ","oct","decode","parse","license","parseFromString","message","8pQccIM","No clear key test key provided!","generateRequest","text/xml","Failed to update the session: ","output-downscaled","target","apply","bind","Failed to update the session","24280927IKsRHd","No PR challenge data!","kids","status","getElementsByTagName","rtcdrmerror","CK license request:","A128KW","3KcCnPp","createSession","License acquisition failed with error ","No media keys for media element!","stringify","byteLength","buffer","82765KyOCry","7206525fRtYVA","error","btoa","9a04f07998404286ab92e65be0885f95","set","[PR] License fetched:","getUint16","onFetch","4630892EspqDe","addEventListener","debug","has","json","Previous lic will be reused","internal-error","subarray","fromCharCode","expired","text","temporary","665922eWbQGg","then","[FPS] License fetched:","174puebov","Content-Type","update","POST","{const i=Jn;return s[i(394)](String[i(408)][i(467)](null,t))[i(421)](/\+/g,"-")[i(421)](/\//g,"_")[i(421)](/=*$/,"")},hr=(t,i)=>{const e=Jn,s=(t=>{const i=Jn,e=JSON[i(456)]((new TextDecoder)[i(455)](t));if(Zn[i(402)](i(476),e),null===nr)throw new m(i(461));const s=[];for(const t of e[i(472)]){const e={kty:i(454),alg:i(477),kid:t,k:rr(nr)};s.push(e)}return(new TextEncoder).encode(JSON[i(482)]({keys:s}))})(i.message);i.target.update(s)[e(439)](function(t){const i=e;Zn[i(393)](i(469),t)})},or=t=>{const i=Jn,e=s[i(438)](t.replace(/-/g,"+")[i(421)](/_/g,"/")),n=new j(e[i(433)]);for(let t=0;t2?e-2:0),n=2;n{const e=Jn;ar($n[e(445)],i[e(459)])[e(413)](t=>t[e(404)]()).then(t=>{const s=e;Zn[s(402)](s(425),t[s(457)]);const n=or(t[s(457)])[s(484)];i[s(466)][s(417)](n)[s(439)](t=>{const i=s;Zn[i(393)](i(469),t)})})[e(439)](i=>{const s=e;t[s(446)](new CustomEvent(s(475),{detail:{message:""+i}})),Zn[s(393)](i)})},cr=(t,i)=>{const e=Jn,s=((t,i)=>{const e=Jn,s=new DOMParser;try{const t=function(t,i,e){void 0===e&&(e=!1);const s=Jn;if(!t)return"";let n=t;if(!e&&n[s(483)]%2!=0)throw Zn[s(393)](s(448)),new m("Data does not seem to be UTF-16 encoded!");const r=ir(n);let h;if((255===r[0]&&254===r[1]||254===r[0]&&255===r[1])&&(n=r[s(407)](2)),n instanceof ArrayBuffer)h=n;else{const t=new j(n[s(483)]);t[s(396)](ir(n)),h=t[s(484)]}const o=_[s(447)](n[s(483)]/2),a=new Uint16Array(o),u=new DataView(h);for(let t=0;t-1){const i=s[e(458)](t,e(463))[e(474)]("Challenge")[0].childNodes[0][e(420)];if(null===i)throw new m(e(471));return or(i)}Zn[e(444)]("[PR] Challenge node not found")}catch(i){t[e(446)](new CustomEvent(e(475),{detail:{message:""+i}})),Zn[e(393)](i)}return null})(t,i.message);if(null===s)return t[e(446)](new CustomEvent("rtcdrmerror",{detail:{message:e(471)}})),void Zn[e(393)](e(471));ar($n[e(445)],s[e(484)],!0)[e(413)](t=>t[e(440)]())[e(413)](s=>{const n=e;Zn[n(402)](n(397),s),i[n(466)][n(417)](s)[n(439)](function(i){const e=n;t[e(446)](new CustomEvent(e(475),{detail:{message:e(464)+i}})),Zn[e(393)]("Failed to update the session",i)})}).catch(i=>{const s=e;t.dispatchEvent(new CustomEvent(s(475),{detail:{message:""+i}})),Zn[s(393)](i)})},dr=(t,i)=>{const e=Jn;ar($n.licenseUrl,i[e(459)])[e(413)](t=>{const i=e,s=t[i(410)]();return Zn[i(402)](i(414),t,s),s})[e(413)](t=>{const s=e;i.target[s(417)](or(t))})[e(439)](i=>{const s=e;t[s(446)](new CustomEvent(s(475),{detail:{message:""+i}})),Zn.error(i)})},lr=(t,i)=>{tr[t]=i},fr=rn.isSafari;function vr(t,i){const e=sr();return(vr=function(t,i){return e[t-=393]})(t,i)}let _r=!fr;const gr=new Map;function pr(t){return Gs(this,void 0,void 0,function*(){const i=vr;if(null===t.initData)throw new m(i(442));const e=t[i(466)];if(null===e)throw new m(i(426));const s=e.mediaKeys;if(null===s)throw new m(i(481));const n=er(new j(t[i(423)])),r=n+e.id;let h=null;gr[i(403)](r)&&(h=gr.get(r),null!=h&&h.close(),gr.delete(r)),Zn[i(402)](i(h?405:435));let o=null;try{o=s.createSession(_r?"persistent-license":"temporary")}catch(t){Zn[i(402)]("EME createSession(persistent) failed:",t)}if(!o&&_r){_r=!1;try{o=s[i(479)](i(411))}catch(t){Zn.error("EME createSession(temporary) failed:",t)}}if(o)if(o.addEventListener(i(450),t=>{const s=i;t[s(466)][s(430)][s(431)]((t,i)=>{const n=s;(t===n(409)||"output-restricted"===t||t===n(465)||t===n(406))&&e[n(446)](new CustomEvent(n(475),{detail:{message:"Key "+er(new j(i))+" is not "+(n(453)+t)+")",keyId:i}}))})}),fr?o[i(401)](i(459),dr.bind(null,e),!1):-1!==n.indexOf(i(436))?o[i(401)](i(459),ur[i(468)](null,e),!1):-1!==n[i(434)](i(395))?o.addEventListener(i(459),cr[i(468)](null,e),!1):o.addEventListener(i(459),hr[i(468)](null,e),!1),h)try{(yield o.load(h[i(422)]))?gr[i(396)](r,o):e[i(446)](new CustomEvent(i(475),{detail:{message:i(428)}}))}catch(t){e[i(446)](new CustomEvent(i(475),{detail:{message:i(451)+t}}))}else o[i(462)](t[i(429)],t[i(423)])[i(413)](()=>{_r&&gr[i(396)](r,o)})[i(439)](t=>{const s=i;e.dispatchEvent(new CustomEvent(s(475),{detail:{message:s(427)+t}}))});else e[i(446)](new CustomEvent(i(475),{detail:{message:i(449)}}))})}const mr=Vr;!function(){const t=Vr,i=Or();for(;;)try{if(-x(t(462))/1*(-x(t(532))/2)+-x(t(543))/3+x(t(682))/4+-x(t(692))/5*(x(t(588))/6)+-x(t(539))/7+x(t(496))/8+-x(t(549))/9==672532)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const wr=un(mr(673)),yr=rn[mr(607)],Ar=rn[mr(540)],br=rn[mr(647)],Sr=rn[mr(489)],Tr=rn[mr(478)],kr=rn.platform,Er=rn[mr(620)],Pr=Sr||Tr&&kr===mr(578),xr=1e6*(Ar?82:br?220:120),Ir=Ar?5e3:2e3,Rr=Ar?1.5:.5;function Cr(t){const i=mr;return typeof t!==i(672)||null===t||t instanceof Element||t instanceof Vn?t:(null==(e=t)?void 0:e[mr(584)])instanceof ArrayBuffer&&null!=e&&e.BYTES_PER_ELEMENT?t[i(550)]():Array[i(636)](t)?t.reduce((t,i,e)=>(t[e]=Cr(i),t),[]):t instanceof w?w.keys(t).reduce((i,e)=>(i[e]=Cr(t[e]),i),{}):t;var e}class Dr{constructor(t){const i=mr;this[i(547)]="",this[i(471)]="",this.keySystem="",this[i(603)]=[],this[i(479)]=Cr(t),this.jmuxer=null,this.keyFrameLogCntr=0,this[i(561)]=Date[i(658)](),this[i(585)]=0,this[i(602)]=0,this[i(490)]=-1,this[i(680)]=0,this[i(596)]=0,this[i(491)]=!0,this.keyFrameNeededPosted=!1,this[i(617)]=Ir,this[i(500)]=null,this.dbgMediaDump={video:null,audio:null}}}const Br=new Map,Nr=new j([60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60]),Mr=new j([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]),Lr=new j([213,251,214,184,46,217,62,78,249,138,228,9,49,238,51,183]);function Or(){const t=["isSafari","ansform=$=>{let e=$.transformer;handleTransform(e.options.operation,e.readable,e.writable)}),onmessage=$=>{keyFra","status","DRM config:","key","Development"," will be used","Staging","const DUMMY_IDR_FRAME_SLICE_HDR0=new Uint8Array([32,0,203]),DUMMY_IDR_FRAME_SLICE_HDR1=new Uint8Array([16,0,50]);","enabled","playback at ","now",".experiment","seq","videoElement","data","btoa","PlayReady might not support '","logLevel","cbcs-1-9","encryption"," to ","offset","x-dt-custom-data","let brokenFrame=null,idrFrames=[];function initializeDummyFrames(){brokenFrame=new Uint8Array([0,0,0,1,65,154,255","object","[RTC-DRM]","not-allowed","durationMs","Default transform mode enabled, ","keySystem","timestamp","DRM config keyId must be an instance of 16-byte long Uint8Array.","lastKeyFrameTime","H264 is the only supported video codec.","2533916KeNZJm","out","Applying pre-configured certificate (","buffered","Widevine","x-dt-auth-token"," ms)","com.microsoft.playready.recommendation","error","currentTime","225RwtgWL","end","requestMediaKeySystemAccess","50705YjLCIv","onmessage","environment","wvLicenseUrl","a1d1f1"," requesting a new key frame (latency ","userId","ClearKey","createEncodedStreams","licenseUrl","PlayReady license acquisition might fail without output protection enabled (sessionId is ","feed","dbgMediaDump","jmuxer","MSE (re)init",",255]).buffer,idrFrames.push(new Uint8Array([0,0,0,1,39,100,0,13,172,87,5,6,100,0,0,0,1,40,238,60,176,0,0,0,1,37,","isChrome","config","forEach","Invalid config argument type, DRM config must be an object.","hwSecurity","audioEncrypted","setMediaKeys","fpsCertificate","Unable to create Worker!","GET","customTransform","isEdge","prevSeqNum","keyFrameNeeded","encrypted","targetLatency not set!","opus","FairPlay","7963992IJNztq","streamType","SampleAuxInfo extraction failed (video)"," seeking from ","worker","]: ","video","kind","audio","jitterBufferDelayHint","size","No target media element!","fpsCertificateUrl","wvCertificate","delimited","3000","pipeThrough","/license-server-fairplay/cert/","string",") not found in [","indexOf","warn","ignoreAudio","append","jitterBufferTarget","prLicenseUrl","sessionTypes","authToken","get","RTCRtpScriptTransform","audioElement","catch","trim","join","waitingForIdr","info","52hXHKkY","enqueue","). It has to be a string containing a JWT.","playbackRate","sai","persistent-license","Blob","2699340CvuQCI","isFirefox","transform",'rame:{type:$.type,timestamp:$.timestamp,data:$.data}}),"key"===$.type&&(keyFrameNeeded=!1),$.data=generateDummyFr',"554109usxuWq"," will not be created, use rtcDrmFeedFrame to push frames manually","bind","streams","serverCertificateUrl","includes","3473577nNrBJc","slice","URL","serverCertificate","length","Invalid authToken type (","addEventListener","', it's safer to use 'cbcs' instead.","srcObject","ClearKey is not supported by Safari.","meNeeded=$.data};","value","nextKeyFrameAllowedTime","Error recovery attempted","rtcdrmerror","184,32,0,203,255,38,29,217,24,192,161,96,0,0,12,229,174,166,6,7,20,3,84,0,247,96,193,181,229,128,0,32,32]).buffer"," bytes","both","debug","No valid DRM config found, call rtcDrmConfigure first.","dispatchEvent","certificate","mediaBufferMs","clear","merchant","src","sessionId","reportDiscontinuity","mediaBufferMs should be an integer.","Android","rtcDrmConfigure did not specify audioElement, audio will be dropped","/license-proxy-widevine/cenc/","arrayBuffer","). Edge only supports PlayReady, Widevine and ClearKey.","). Chrome only supports Widevine and ClearKey.","buffer","videoStartTimestamp",'audio/mp4; codecs="opus"',"set","175800AyhMKK","PlayReady","SampleAuxInfo extraction failed (audio)","cenc","codec","videoCapabilities",".. ","Duplicate/reordered frame, prev seq: ","bytesSinceKey","wvCertificateUrl","/license-proxy-headerauth/drmtoday/RightsManager.asmx","robustness","baseUrl","type","audioStartTimestamp","emeConfig","com.widevine.alpha","SW_SECURE_CRYPTO","fpsLicenseUrl","supportsRtpScriptTransform","Target video element (","?audioTransformFunction:videoTransformFunction});e.pipeThrough(a).pipeTo(x)}self.RTCTransformEvent&&(self.onrtctr","createObjectURL","playoutDelayHint","POSITIVE_INFINITY",'ame(keyFrameNeeded),e.enqueue($)}function handleTransform($,e,x){let a=new TransformStream({transform:"audio"===$',"track",'video/mp4; codecs="avc1.640032"',"cbcs","keyFrameRequestInterval","Frame gap: ","keyFrameNeededPosted","isWindows","HW_SECURE_ALL"," bytes, ","GOP is getting too long, requesting a new key frame","temporary","Safari does not support Opus, audio will not be rendered.","stringify","byteLength","message"," frame","H264","mediaDumps","h264","keyFrameLogCntr","requestMediaKeySystemAccess(","Safari doesn't support 'cenc'/AES-CTR, use 'cbcs' instead if possible.","isArray","Invalid DRM type (","DRM config iv must be an instance of 16-byte long Uint8Array.","keyId","pipeTo"," - ","receiver","isInteger","toString","onFetch","next"];return(Or=function(){return t})()}function Fr(t){const i=mr;let e=!1;if((t[i(479)][i(502)]&&t[i(479)].video[i(667)]!==i(572)&&"HW"===t[i(479)][i(502)][i(599)]||t[i(479)][i(504)]&&t[i(479)][i(504)][i(667)]!==i(572)&&"HW"===t.config[i(504)][i(599)])&&(e=!0),t.hwSecurity=e,function(t,i){const e=mr;void 0!==i&&(t[e(479)].mediaBufferMs=i),(void 0===t[e(479)][e(571)]||t.config[e(571)]<0)&&(t[e(479)].mediaBufferMs=100,Ar?t[e(479)][e(571)]=350:!br&&Er&&("PlayReady"===t.config[e(601)]||t[e(482)])&&(t.config[e(571)]=1400))}(t,t[i(479)][i(571)]),void 0===t.config[i(523)]){void 0===t[i(479)][i(468)]&&(t[i(479)][i(468)]="purchase"),void 0===t[i(479)][i(575)]&&(t.config[i(575)]=i(466));const e=s[i(663)](JSON[i(626)]({userId:t[i(479)].userId,sessionId:t.config.sessionId,merchant:t[i(479)].merchant}));lr(i(670),e)}else lr(i(687),t[i(479)][i(523)]);for(const e of[t[i(479)][i(504)],t[i(479)][i(502)]])e&&e.encryption!==i(572)&&(e.keyId||(e[i(639)]=Mr),e.iv||(e.iv=Lr));t[i(552)]=void 0,t[i(547)]="",t[i(471)]="";const n=t[i(479)][i(464)][i(600)]();var r;if(t[i(479)].type===i(469)?(t[i(677)]="org.w3.clearkey",nr=Nr):t[i(479)][i(601)]===i(686)?(t[i(677)]=i(604),Er&&e&&(t[i(677)]+=i(659)),t[i(479)][i(509)]?t[i(552)]=t[i(479)][i(509)]:t[i(479)][i(597)]?t[i(547)]=t.config[i(597)]:t[i(552)]=t.config[i(464)][i(570)](),t[i(479)].wvLicenseUrl?t[i(471)]=t.config[i(465)]:t[i(471)]=n+i(580)):t[i(479)][i(601)]===i(589)?(t.keySystem=i(689),t[i(479)][i(521)]?t[i(471)]=t[i(479)][i(521)]:t[i(471)]=n+i(598)):t.config[i(601)]===i(495)&&(t.keySystem="com.apple.fps",t[i(479)][i(485)]?t[i(552)]=t[i(479)][i(485)]:t[i(479)][i(508)]?t[i(547)]=t.config.fpsCertificateUrl:t[i(547)]=n+i(513)+t[i(479)][i(573)],t[i(479)].fpsLicenseUrl?t[i(471)]=t.config[i(606)]:t[i(471)]=n+"/license-server-fairplay/"),r={licenseUrl:t[i(471)],onFetch:t[i(479)][i(645)]},$n=r,t[i(603)]=[],t[i(479)][i(601)]!==i(495)){t[i(603)].push({initDataTypes:[i(591)],sessionTypes:[i(537),i(624)]});for(const e of[t[i(479)][i(502)],t.config[i(504)]])if(e&&e[i(667)]!==i(572)){const s=e==t.config[i(502)]?i(502):i(504);let n;"Widevine"===t.config[i(601)]?n="HW"===e[i(599)]?i(621):i(605):"PlayReady"===t.config[i(601)]&&(n="HW"===e[i(599)]?i(511):"2000"),"video"===s?t[i(603)][0][i(593)]=[{contentType:i(615),encryptionScheme:e[i(667)]===i(591)?i(591):"cbcs-1-9",robustness:n||void 0}]:t[i(603)][0].audioCapabilities=[{contentType:i(586),encryptionScheme:e[i(667)]===i(591)?i(591):i(666),robustness:n||void 0}]}}else t.emeConfig=[{initDataTypes:["sinf"],videoCapabilities:[{contentType:"video/mp4",robustness:""}],distinctiveIdentifier:i(674),persistentState:"not-allowed",sessionTypes:[i(624)]}];wr[i(567)](i(650),t)}function Ur(t){const i=mr;wr[i(567)](i(476));let e=t[i(479)][i(661)];(!t[i(479)][i(502)]||t[i(479)][i(502)][i(667)]===i(572))&&(e=t.config.audioElement),t[i(475)]=null;const s=!t[i(518)]&&t[i(479)].audio&&t[i(479)][i(504)][i(667)]!==i(572),n=t[i(479)][i(502)]&&t[i(479)].video.encryption!==i(572);t[i(596)]=0,t.keyFrameNeeded=!0,t[i(619)]=!1,t[i(617)]=Ir,t[i(585)]=0,t[i(602)]=0,t[i(490)]=-1,t[i(680)]=0,t[i(475)]=new Bn({node:e,mode:i(s?n?566:504:502),fps:60,drm:t}),br&&t[i(479)][i(661)]&&t.config.videoElement.play().then(()=>{})[i(527)](()=>{})}function Vr(t,i){const e=Or();return(Vr=function(t,i){return e[t-=461]})(t,i)}function Hr(t,i,e){const s=mr;if(t[s(474)][s(502)]){cn.mediaDumps[s(502)].in[s(510)]&&t[s(474)][s(502)][s(519)](new j([0,0,0,1,9,80]));const e=i[s(678)]/90;t[s(474)][s(502)][s(519)](new j(i[s(662)]),e)||(t[s(474)][s(502)]=null)}if(t[s(479)][s(502)]&&"clear"===t[s(479)][s(502)][s(667)])return null==e||e[s(533)](i),!1;const n=Date[s(658)]();if(i[s(601)]===s(651)){const e=cn.logLevel>=4;++t[s(633)]<(e?Number[s(612)]:5)&&(wr.debug(dn()+" "+i[s(601)]+", "+i.data.byteLength+s(622)+(s(657)+t.config[s(661)].currentTime)),e&&1===t.keyFrameLogCntr&&function(t,i,e){void 0===i&&(i=64),void 0===e&&(e=64);const s=mr,n=new j(t[s(662)]);let r="",h=0;for(let t=0;txr&&(wr.info(s(623)),t[s(491)]=!0),t[s(475)]&&(function(t,i){const e=mr;0===t.videoStartTimestamp&&(t.videoStartTimestamp=i.timestamp,t[e(617)]=Ir,t[e(561)]=Date.now()+2e3);let s=null,n=!1;if(i[e(662)][e(627)]<=4)wr[e(517)]("Discarding corrupted video frame (too small)"),n=!0;else{const r=new j(i[e(662)],0,4);0!=r[0]||0!=r[1]||0!=r[2]||1!=r[3]?(wr.warn("Discarding corrupted video frame (no Annex B startcode)"),n=!0):(s=function(t,i){const e=Wn,s=new DataView(t.data),n=t.data[e(268)]-2,r=s[e(267)](n);if(r>>4!=1)return Gn[e(271)]("Unsupported SampleAuxInfo version"),null;const h=new j(r-2);let o=0,a=0;for(;t1&&3===i&&(a=0,i=s.getUint8(t++)),0!==i?a=0:++a,h[o++]=i}const u=new DataView(h[e(256)]),c="cenc"===i?16:0,d=c+2+6*u[e(267)](c);return d+2>o?(Gn[e(271)](e(270)),null):{sai:h[e(255)](0,d),offset:n-r,seq:u[e(267)](d)}}return null}(i,t.config[e(502)][e(667)]),!s&&(wr.warn(e(498)),n=!0))}if(s)if(i[e(601)]===e(651))t[e(490)]=s.seq;else{if(-1===t[e(490)])return 0;{let r=s[e(660)]-t[e(490)];if(r<-32767&&(r+=65536),r<=0)return wr.debug(e(595)+t.prevSeqNum+", curr: "+s.seq),0;r>1&&(n=i[e(601)]!==e(651),wr[e(517)](e(618)+t[e(490)]+e(641)+s[e(660)]+", restart required: "+n)),t.prevSeqNum=s[e(660)]}}let r=0;n&&!t[e(475)][e(530)]&&(r=-1,t[e(475)][e(576)]());const h=(i[e(678)]-t[e(585)])/9e4;return s&&t[e(475)][e(473)]({video:new j(i[e(662)],0,s.offset),videoSampleAuxInfo:s[e(536)],timestamp:h})<0&&(r=-1,wr[e(517)](e(562)),Ur(t)),r>=0&&i[e(601)]===e(651)&&(t[e(680)]=h),r}(t,i)<0?t[s(491)]=!0:function(t){const i=mr,e=t[i(479)][i(661)];if(!e||e[i(685)][i(553)]<1||e.paused||e[i(691)]>>2?.875:i<=e?1:i<7*e>>>2?1.125:i<9*e>>>2?1.25:i<11*e>>>2?1.375:1.5,n!==t.playbackRate&&(t[s(535)]=n)}(e,r,s),!(r>>2))if(t[i(680)]>e[i(691)]+.1){const r=1e3*(n-t.lastKeyFrameTime)|0;r>40&&r>s-100?(wr.debug(dn()+i(499)+(e[i(691)]+i(668)+t.lastKeyFrameTime+" (")+(t[i(680)]-e[i(691)])+")"),e[i(691)]=t[i(680)]):wr[i(567)](dn()+" too close to seek, "+r)}else!t.keyFrameNeeded&&Date[i(658)]()>t[i(561)]&&r>s+100&&r>3*s>>>1&&(wr[i(567)](dn()+i(467)+r+i(688)),t[i(491)]=!0,t[i(617)]<16e3&&(t[i(617)]<<=1))}(t)),e?(!t[s(491)]||!Pr)&&(i[s(662)]=function(t){return!Qn&&function(){const t=jn;Qn=new j([0,0,0,1,65,154,255,255])[t(372)],Xn[t(371)](new j([0,0,0,1,39,100,0,13,172,87,5,6,100,0,0,0,1,40,238,60,176,0,0,0,1,37,184,32,0,203,255,38,29,217,24,192,161,96,0,0,12,229,174,166,6,7,20,3,84,0,247,96,193,181,229,128,0,32,32])[t(372)]),Xn[t(371)](Xn[0][t(376)](0)),new j(Xn[1])[t(375)]([16,0,50],27)}(),t?Qn:(Kn^=1,Xn[Kn])}(t[s(491)]),e[s(533)](i)):t[s(491)]!=t.keyFrameNeededPosted&&(t[s(500)]&&t.worker.postMessage(t[s(491)]),t.keyFrameNeededPosted=t[s(491)]),t.keyFrameNeeded}function Wr(t,i,e){const s=mr;if(t.dbgMediaDump.audio){const e=i[s(678)]/48;t[s(474)][s(504)][s(519)](new j(i.data),e)||(t.dbgMediaDump[s(504)]=null)}return t[s(479)].audio&&t[s(479)].audio[s(667)]!==s(572)?i[s(662)][s(627)]>0&&function(t,i){const e=mr;var s;if(!t[e(475)]||t[e(518)])return 0;0===t[e(602)]&&(t.audioStartTimestamp=i[e(678)]);const n=(i[e(678)]-t[e(602)])/48e3;if((null===(s=t[e(479)][e(504)])||void 0===s?void 0:s[e(667)])===e(616))return t.jmuxer[e(473)]({audio:new j(i[e(662)]),timestamp:n});const r=function(t){const i=Wn,e=new DataView(t[i(261)]),s=t.data[i(268)]-2,n=e[i(267)](s);if(n>>4!=1)return Gn[i(271)]("Unsupported SampleAuxInfo version"),null;const r=new j(n-2);let h=0;for(;t=16)break}return{sai:r,offset:s-n}}return null}(i);r?t.jmuxer[e(473)]({audio:new j(i[e(662)],0,r[e(669)]),audioSampleAuxInfo:r[e(536)],timestamp:n}):wr[e(690)](e(590))}(t,i):e&&e[s(533)](i),!1}function qr(t){const i=mr;var e,s,n,r,h;if(!t||typeof t!==i(672))throw new g(i(481));if(!(t.videoElement instanceof HTMLVideoElement))throw new g("Invalid videoElement, it must be an instance of HTMLVideoElement.");if(t[i(526)]&&!(t[i(526)]instanceof HTMLMediaElement))throw new g("Invalid audioElement, it must be an instance of HTMLMediaElement.");if(void 0!==t[i(571)]&&!Number[i(643)](t[i(571)]))throw new g("DRM config mediaBufferMs should be an integer.");let o=!1,a=!1,u=!1;const c=[i(616),"cenc",i(572)],d=["SW","HW"];for(const e of[t.video,t[i(504)]])if(e){if(!c[i(548)](e[i(667)]))throw new RangeError("DRM config encryption value must be one of: "+c[i(529)](", "));if(br&&e.encryption===i(591))throw new RangeError(i(635));if("clear"!==e[i(667)]){if(a=!0,e.keyId){if(!(e[i(639)]instanceof j)||16!==e[i(639)][i(553)])throw new g(i(679));u=!0}else if(br)throw new ReferenceError(i(558));if(e.iv&&(!(e.iv instanceof j)||16!==e.iv[i(553)]))throw new g(i(638));if(e[i(599)]&&!d[i(548)](e[i(599)]))throw new RangeError("DRM config robustness can only be one of: "+d[i(529)](", "));if(e===t.video&&e.codec!==i(630))throw new RangeError(i(681));br&&e===t.audio&&e[i(592)]===i(494)&&(o=!0,wr.warn(i(625))),t[i(601)]===i(589)&&("cenc"!==e[i(667)]&&wr[i(517)](i(664)+e[i(667)]+i(556)),void 0===t.sessionId||t[i(575)][i(548)]("f1")||wr[i(517)](i(472)+t[i(575)]+", a1d1f1 is recommended)."))}}if(a){const e=[Vn[i(652)],Vn[i(654)],Vn.Production];if(!e[i(548)](t[i(464)]))throw new RangeError("DRM config env value must be one of: "+e.join(", "));if(t[i(523)]&&typeof t.authToken!==i(514))throw new g(i(554)+typeof t[i(523)]+i(534));if(t[i(601)])if(br){if("FairPlay"!==t.type)throw new RangeError(i(637)+t[i(601)]+"). Safari only supports FairPlay.")}else if(Tr){if(t[i(601)]!==i(686)&&"ClearKey"!==t.type)throw new RangeError(i(637)+t[i(601)]+i(583))}else if(Sr&&t[i(601)]!==i(589)&&"Widevine"!==t[i(601)]&&t[i(601)]!==i(469))throw new RangeError(i(637)+t.type+i(582))}if(void 0!==t[i(665)]&&(cn[i(665)]=t[i(665)]),void 0!==t.mediaDumps){if(t.mediaDumps[i(502)]){const r=t[i(631)].video,h=cn[i(631)][i(502)];!(null===(e=r.in)||void 0===e)&&e.durationMs&&(h.in[i(675)]=r.in.durationMs),!(null===(s=r.in)||void 0===s)&&s.delimited&&(h.in.delimited=r.in[i(510)]),null!==(n=r[i(683)])&&void 0!==n&&n.durationMs&&(h[i(683)][i(675)]=r[i(683)].durationMs)}if(t[i(631)][i(504)]){const e=t[i(631)][i(504)],s=cn[i(631)][i(504)];!(null===(r=e.in)||void 0===r)&&r.durationMs&&(s.in.durationMs=e.in.durationMs),null!==(h=e.out)&&void 0!==h&&h[i(675)]&&(s[i(683)][i(675)]=e[i(683)].durationMs)}}let l=Br[i(524)](t[i(661)]);!l&&(l=new Dr(t),Br[i(587)](t.videoElement,l)),l[i(656)]=a,l.ignoreAudio=o,l[i(483)]=!o&&l[i(479)][i(504)]&&l[i(479)][i(504)][i(667)]!==i(572),a&&(l[i(479)][i(601)]||(l[i(479)][i(601)]=br?"FairPlay":i(686)),u||l.config.type===i(469)||(l[i(479)][i(601)]=i(469)),Fr(l),function(t){Gs(this,void 0,void 0,function*(){const i=Vr;var e,s;let n=t.config[i(661)];if((!t.config[i(502)]||t[i(479)].video[i(667)]===i(572))&&(n=t[i(479)][i(526)]),!n)throw new m(i(507));n[i(574)]="",n[i(557)]=null,yield n[i(484)](null);let r=null;try{r=yield od[i(461)](t[i(677)],t[i(603)])}catch(t){}if(!r&&t.emeConfig[0]){const n=null===(e=t.emeConfig[0][i(522)])||void 0===e?void 0:e[i(516)](i(537));if(void 0!==n&&n>=0){null===(s=t[i(603)][0][i(522)])||void 0===s||s.splice(n,1);try{r=yield od[i(461)](t[i(677)],t[i(603)])}catch(t){}}}if(!r){const e=i(634)+t[i(677)]+") failed";return n[i(569)](new CustomEvent(i(563),{detail:{message:e}})),void wr[i(690)](e)}let h=null;try{h=yield r.createMediaKeys()}catch(t){}if(!h){const e="createMediaKeys("+t.keySystem+") failed";return n.dispatchEvent(new CustomEvent(i(563),{detail:{message:e}})),void wr[i(690)](e)}if(t.serverCertificate)wr[i(567)](i(684)+t[i(552)][i(627)]+" bytes)"),yield h.setServerCertificate(t[i(552)]);else if(t[i(547)]){const e={method:i(487)},s=t.serverCertificateUrl;try{const r=yield t.config[i(645)]?t[i(479)][i(645)](s,e):fetch(s,e);if(!r.ok){const t="Server certificate fetch failed with error "+r[i(649)];return void n[i(569)](new CustomEvent(i(563),{detail:{message:t}}))}const o=yield r[i(581)]();wr[i(567)]("Fetched certificate from "+s+", "+o.byteLength+i(565)),yield h.setServerCertificate(o)}catch(t){const e=t.name+": "+t[i(628)];return wr[i(690)](e),void n[i(569)](new CustomEvent("rtcdrmerror",{detail:{message:e}}))}}yield n[i(484)](h),n[i(555)](i(492),pr),Ur(t)})}(l)),l[i(479)][i(661)][i(555)]("play",function(){const t=i;l[t(479)][t(661)][t(691)]>.5&&(l[t(561)]=Date[t(658)]())})}const zr=mr(655)+mr(671)+mr(477)+mr(564)+'),idrFrames.push(idrFrames[0].slice());let $=new Uint8Array(idrFrames[1]);$.set([16,0,50],27)}let idrPicIdToggle=0;function generateDummyFrame($){return(brokenFrame||initializeDummyFrames(),$)?brokenFrame:idrFrames[idrPicIdToggle^=1]}function audioTransformFunction($,e){postMessage({streamType:"audio",frame:{timestamp:$.timestamp,data:$.data}}),e.enqueue($)}let keyFrameNeeded=!1;function videoTransformFunction($,e){postMessage({streamType:"video",f'+mr(542)+mr(613)+mr(609)+mr(648)+mr(559);function Gr(t){const i=mr;if(0===Br[i(506)])throw new g(i(568));let e;if(t&&t[i(661)])e=t.videoElement;else{if(1!==Br[i(506)])throw new g("Several DRM configs detected, rtcDrmOnTrack have to be called with target DRM config.");e=Br.keys()[i(646)]()[i(560)]}const s=Br[i(524)](e);if(!s){let t="";throw Br[i(480)]((i,e)=>{t+=e.id+", "}),t=t[i(550)](0,-2),new g(i(608)+e.id+i(515)+t+"]")}return s}function Xr(t,i){const e=mr;if(t&&t.config[e(661)]){const s=t.config[e(661)];if(s.buffered[e(553)]>0){const t=s.buffered[e(693)](s.buffered[e(553)]-1)-s.currentTime;i[e(611)]=i.jitterBufferDelayHint=i[e(520)]=t}u(Xr,1e3,t,i)}}const jr=at.get("View");jr.setLevel(at.DEBUG);const Qr={metadata:!1,enableDRM:!1,disableVideo:!1,disableAudio:!1,peerConfig:{autoInitStats:!0,statsIntervalMs:1e3}};t.Director=is,t.Logger=at,t.PeerConnection=Pe,t.Publish=class extends Ds{async connect(t){void 0===t&&(t=Vs),Ws(t),this.options=f(l(l({},Vs),t),{peerConfig:l(l({},Vs.peerConfig),t.peerConfig),setSDPToPeer:!1}),this.options.metadata=this.options.metadata&&this.options.codec===ye.H264&&!this.options.disableVideo,await this.initConnection({migrate:!1})}async reconnect(t){var i,e;this.options.mediaStream=null!=(e=null==(i=this.webRTCPeer)?void 0:i.getTracks())?e:this.options.mediaStream,super.reconnect(t)}async replaceConnection(){var t,i;Us.info("Migrating current connection"),this.options.mediaStream=null!=(i=null==(t=this.webRTCPeer)?void 0:t.getTracks())?i:this.options.mediaStream,await this.initConnection({migrate:!0})}async record(){var t;this.recordingAvailable?(this.options.record=!0,await(null==(t=this.signaling)?void 0:t.cmd("record")),Us.info("Broadcaster start recording")):Us.error("Record not available")}async unrecord(){var t;this.recordingAvailable?(this.options.record=!1,await(null==(t=this.signaling)?void 0:t.cmd("unrecord")),Us.info("Broadcaster stop recording")):Us.error("Unrecord not available")}stop(){var t;super.stop(),null==(t=this.worker)||t.terminate(),this.worker=null}async initConnection(t){var i,e;let s,n;if(Us.debug("Broadcast option values: ",this.options),this.stopReconnection=!1,!this.options.mediaStream)throw Us.error("Error while broadcasting. MediaStream required"),new m("MediaStream required");if(!t.migrate&&this.isActive())throw Us.warn("Broadcast currently working"),new m("Broadcast currently working");try{n=await this.tokenGenerator(),this.options.peerConfig.iceServers=null==n?void 0:n.iceServers,this.options.peerConfig.encodedInsertableStreams=this.options.metadata}catch(t){throw Us.error("Error generating token."),t instanceof Ye&&(401!==t.status&&this.autoReconnect?this.reconnect():this.stopReconnection=!0),t}if(!n)throw Us.error("Error while broadcasting. Publisher data required"),new m("Publisher data required");const r=as(n.jwt);if(this.streamName=r.millicast.streamName,this.recordingAvailable=r[ds.atob("bWlsbGljYXN0")].record,this.options.record&&!this.recordingAvailable)throw Us.error("Error while broadcasting. Record option detected but recording is not available"),new m("Record option detected but recording is not available");const h=new je({streamName:this.streamName,url:"".concat(n.urls[0],"?token=").concat(n.jwt)}),o=t.migrate?new Pe:this.webRTCPeer;await o.createRTCPeer(this.options.peerConfig,Se),null==(i=this.stopReemitingWebRTCPeerInstanceEvents)||i.call(this),null==(e=this.stopReemitingSignalingInstanceEvents)||e.call(this),this.stopReemitingWebRTCPeerInstanceEvents=gt(o,this,[ke.connectionStateChange]),this.stopReemitingSignalingInstanceEvents=gt(h,this,[Xe]);const a=o.getRTCLocalSDP(this.options),u=h.connect();s=await Promise.all([a,u]);const c=s[0];this.options.metadata&&(this.worker||(this.worker=new Fs),this.getRTCPeerConnection().getSenders().forEach(t=>{if(Ms)t.transform=new RTCRtpScriptTransform(this.worker,{name:"senderTransform",codec:this.options.codec});else if(Ns){const{readable:i,writable:e}=t.createEncodedStreams();this.worker.postMessage({action:"insertable-streams-sender",codec:this.options.codec,readable:i,writable:e},[i,e])}}));let d=this.signaling;this.signaling=h;const l=this.signaling.publish(c,this.options),f=o.peer.setLocalDescription(o.sessionDescription);s=await Promise.all([l,f]);let v=s[0];!this.options.disableVideo&&this.options.bandwidth>0&&(v=o.updateBandwidthRestriction(v,this.options.bandwidth)),await o.setRTCRemoteSDP(v),Us.info("Broadcasting to streamName: ",this.streamName);let _=this.webRTCPeer;this.webRTCPeer=o,this.setReconnect(),t.migrate&&this.webRTCPeer.on(ke.connectionStateChange,t=>{var i,e;["connected","disconnected","failed","closed"].includes(t)&&(null==(i=null==d?void 0:d.close)||i.call(d),null==(e=null==_?void 0:_.closeRTCPeer)||e.call(_),d=_=null)})}sendMetadata(t,i){var e;if(void 0===i&&(i="d40e38ea-d419-4c62-94ed-20ac37b4e4fa"),null!=(e=this.options)&&e.metadata&&this.worker)this.worker.postMessage({action:"metadata-sei-user-data-unregistered",uuid:i,payload:t});else{let t="Could not send metadata due to:";this.options?this.options.metadata?this.worker||(t+="\n- Stream not being published."):(t+="\n- Metadata option is not enabled.",this.options.codec!==ye.H264&&(t+="\n- Incompatible codec. Only H264 available."),this.options.disableVideo&&(t+="\n- Video disabled.")):t+="\n- Stream not being published.",Us.warn(t)}}constructor(t,i,e=!0){t&&Us.warn("The streamName property has been deprecated. In a future release, this will be removed. Please do not rely on this value. Instead, set via token generator"),super(null,i,Us,e)}},t.Signaling=je,t.View=class extends Ds{async connect(t){void 0===t&&(t=Qr),this.options=f(l(l({},Qr),t),{peerConfig:l(l({},Qr.peerConfig),t.peerConfig),setSDPToPeer:!1}),this.eventQueue.length=0,await this.initConnection({migrate:!1})}async select(t){void 0===t&&(t={}),jr.debug("Viewer select layer values: ",t),await this.signaling.cmd("select",{layer:t}),jr.info("Connected to streamName: ",this.streamName)}async addRemoteTrack(t,i){jr.info("Viewer adding remote track",t);const e=await this.webRTCPeer.addRemoteTrack(t,i);for(const t of i)t.addTrack(e.receiver.track);return e}async project(t,i){for(const t of i){if(!t.trackId&&!t.media)throw jr.error("Error in projection mapping, trackId or mediaId must be set"),new m("Error in projection mapping, trackId or mediaId must be set");const i=this.webRTCPeer.getRTCPeer();if(t.mediaId&&!i.getTransceivers().find(i=>i.mid===t.mediaId.toString()))throw jr.error("Error in projection mapping, ".concat(t.mediaId," mid not found in local transceivers")),new m("Error in projection mapping, ".concat(t.mediaId," mid not found in local transceivers"))}jr.debug("Viewer project source: layer mappings: ",t,i),await this.signaling.cmd("project",{sourceId:t,mapping:i}),jr.info("Projection done")}async unproject(t){jr.debug("Viewer unproject mediaIds: ",t),await this.signaling.cmd("unproject",{mediaIds:t}),jr.info("Unprojection done")}async replaceConnection(){jr.info("Migrating current connection"),await this.initConnection({migrate:!0})}stop(){var t,i;super.stop(),null==(t=this.drmOptionsMap)||t.clear(),this.DRMProfile=null,null==(i=this.worker)||i.terminate(),this.worker=null,this.payloadTypeCodec={},this.tracksMidValues={},this.eventQueue.length=0}async initConnection(t){var i;let e,s;if(jr.debug("Viewer connect options values: ",this.options),this.stopReconnection=!1,t.abrConfiguration&&t.abrConfiguration.metadata){const i=t.abrConfiguration.metadata.bitrate;if(!i||i<0)throw new m("Invalid bitrate ".concat(i," supplied for ABR. The value must be a non-negative integer value."))}if(!t.migrate&&this.isActive())throw jr.warn("Viewer currently subscribed"),new m("Viewer currently subscribed");try{s=await this.tokenGenerator(),this.options.peerConfig.iceServers=null==s?void 0:s.iceServers,this.options.peerConfig.encodedInsertableStreams=Ns&&(this.options.enableDRM||this.options.metadata)}catch(t){throw jr.error("Error generating token."),t instanceof Ye&&(401!==t.status&&this.autoReconnect?this.reconnect():this.stopReconnection=!0),t}if(!s)throw jr.error("Error while subscribing. Subscriber data required"),new m("Subscriber data required");const n=as(s.jwt);this.streamName=n.millicast.streamName;const r=new je({streamName:this.streamName,url:"".concat(s.urls[0],"?token=").concat(s.jwt)});s.subscriberToken&&(this.subscriberToken=s.subscriberToken);const h=t.migrate?new Pe:this.webRTCPeer;await h.createRTCPeer(this.options.peerConfig),null==(i=this.stopReemitingWebRTCPeerInstanceEvents)||i.call(this),this.stopReemitingWebRTCPeerInstanceEvents=gt(h,this,w.values(ke).filter(t=>t!==ke.track)),this.options.metadata&&(this.worker||(this.worker=new Fs),this.worker.onmessage=t=>{if("metadata"===t.data.event){const i=new TextDecoder,e=t.data.metadata;if(e.mid=t.data.mid,e.track=this.tracksMidValues[t.data.mid],e.uuid){const t=e.uuid;e.uuid=t.reduce((t,i)=>t+i.toString(16).padStart(2,"0"),""),e.uuid=e.uuid.replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}if(e.timecode&&(e.timecode=new Date(i.decode(e.timecode))),e.unregistered){const t=i.decode(e.unregistered);try{const i=JSON.parse(t);e.unregistered=i}catch(t){jr.info("The content could not be converted to JSON, returning raw bytes instead")}}this.emit("metadata",e)}}),h.on(ke.track,t=>{this.isMainStreamActive?this.onTrackEvent(t):this.eventQueue.push(t)}),r.on(Xe,async t=>{if(this.isMainStreamActive||"active"!==t.name)"inactive"===t.name&&this.isMainStreamActive&&this.mainSourceId===t.data.sourceId&&(this.isMainStreamActive=!1),this.emit(Xe,t);else{if(this.mainSourceId=t.data.sourceId,!this.DRMProfile&&t.data.encryption){const t=await this.tokenGenerator();t.drmObject&&(this.DRMProfile=t.drmObject)}for(this.emit(Xe,t),this.isMainStreamActive=!0;this.eventQueue.length>0;)this.onTrackEvent(this.eventQueue.shift())}});const o=h.getRTCLocalSDP(f(l({},this.options),{stereo:!0})),a=r.connect();e=await Promise.all([o,a]);const c=e[0];let d=this.signaling;this.signaling=r;const v=this.signaling.subscribe(c,f(l({},this.options),{vad:this.options.multiplexedAudioTracks>0})),_=h.peer.setLocalDescription(h.sessionDescription);e=await Promise.all([v,_]);const g=e[0];this.payloadTypeCodec=me.getCodecPayloadType(g),await h.setRTCRemoteSDP(g),jr.info("Connected to streamName: ",this.streamName);let p=this.webRTCPeer;this.webRTCPeer=h,this.setReconnect(),t.migrate&&this.webRTCPeer.on(ke.connectionStateChange,t=>{var i,e;"connected"===t?u(()=>{var t,i;null==(t=null==d?void 0:d.close)||t.call(d),null==(i=null==p?void 0:p.closeRTCPeer)||i.call(p),d=p=null,jr.info("Current connection migrated")},1e3):["disconnected","failed","closed"].includes(t)&&(null==(i=null==d?void 0:d.close)||i.call(d),null==(e=null==p?void 0:p.closeRTCPeer)||e.call(p),d=p=null)})}onTrackEvent(t){var i,e,n;if(this.tracksMidValues[null==(i=t.transceiver)?void 0:i.mid]=t.track,this.isDRMOn){const i=t.transceiver.mid,e=this.getDRMConfiguration(i);try{!function(t,i){const e=mr;var n,r;const h=t[e(614)][e(503)];h===e(502)&&(t[e(642)][e(611)]=t.receiver[e(505)]=t[e(642)][e(520)]=0);const o=Gr(i),a=o[e(479)][e(661)],u=o.config.audioElement;if(o.enabled){const i=""+e(yr?525:470);if(o[e(479)][e(488)])wr[e(567)](i+e(544));else{if(wr[e(567)](e(676)+i+e(653)),h===e(502)){const t=cn[e(631)][e(502)].in[e(675)];t>0&&(o.dbgMediaDump[e(502)]=new fn(e(502),e(632),t))}else if(h===e(504)){const t=cn[e(631)][e(504)].in[e(675)];t>0&&(o[e(474)][e(504)]=new fn(e(504),e(494),t))}if(yr){if(o[e(500)]=function(t){const i=mr,e=s[i(551)]||s.webkitURL,n=s[i(538)],r=s.Worker;if(!(e&&n&&r&&t))return null;const h=new n([t]);return new r(e[i(610)](h))}(zr),null==o[e(500)])throw new m(e(486));o[e(500)][e(463)]=t=>{const i=e;t[i(662)][i(497)]===i(502)?Hr(o,t.data.frame,null):Wr(o,t.data.frame,null)},t[e(642)][e(541)]=new RTCRtpScriptTransform(o.worker,{operation:h})}else{const i=h===e(502)?Hr:Wr,s={drm:o,transform:(t,e)=>{i(o,t,e)}},n=t[e(642)][e(470)](),r=new TransformStream({transform:s[e(541)][e(545)](s)}),{readable:a,writable:u}=n;a[e(512)](r)[e(640)](u)}}if("audio"===h&&(null===(n=o.config[e(504)])||void 0===n?void 0:n.encryption)===e(572)){if(!u)return void wr[e(517)](e(579));u[e(557)]!==t[e(546)][0]&&(u[e(557)]=t.streams[0]),o[e(479)][e(661)]&&(t[e(642)].playoutDelayHint=t.receiver.jitterBufferDelayHint=t[e(642)][e(520)]=o[e(479)][e(571)],Xr(o,t[e(642)]))}else h===e(502)&&(null===(r=o[e(479)][e(502)])||void 0===r?void 0:r.encryption)===e(572)&&a[e(557)]!==t[e(546)][0]&&(a.srcObject=t[e(546)][0])}else a[e(557)]!==t[e(546)][0]&&(a.srcObject=t[e(546)][0])}(t,e)}catch(t){jr.error("Failed to apply DRM on media Id:",i,"error is: ",t),this.emit("error",new m("Failed to apply DRM on media Id: "+i+" error is: "+t))}this.worker||(this.worker=new Fs),this.worker.addEventListener("message",t=>{"complete"===t.data.event&&function(t,i,e){const s=mr,n=Gr(e);t[s(601)]?Hr(n,t,i):Wr(n,t,i)}(t.data.frame,null,e)})}if(this.options.metadata)if(Ms)t.receiver.transform=new RTCRtpScriptTransform(this.worker,{name:"receiverTransform",payloadTypeCodec:l({},this.payloadTypeCodec),codec:this.options.metadata&&"h264",mid:null==(e=t.transceiver)?void 0:e.mid});else if(Ns){const{readable:i,writable:e}=t.receiver.createEncodedStreams();this.worker.postMessage({action:"insertable-streams-receiver",payloadTypeCodec:l({},this.payloadTypeCodec),codec:this.options.metadata&&"h264",mid:null==(n=t.transceiver)?void 0:n.mid,readable:i,writable:e},[i,e])}this.emit(ke.track,t)}getDRMConfiguration(t){return this.drmOptionsMap?this.drmOptionsMap.get(t):null}async onRtcDrmFetch(t,i){return i.headers||(i.headers=new Headers),i.headers.get("x-dt-custom-data")&&i.headers.delete("x-dt-custom-data"),this.subscriberToken?i.headers.append("Authorization","Bearer ".concat(this.subscriberToken)):jr.warn("onRtcDrmFetch: no subscriberToken"),fetch(t,i)}configureDRM(t){if(!t)throw new m("Required DRM options is not provided");this.drmOptionsMap||(this.drmOptionsMap=new Map);const i={merchant:"dolby",environment:Vn.Production,customTransform:this.options.metadata,videoElement:t.videoElement,audioElement:t.audioElement,video:{codec:"H264",encryption:"cbcs",keyId:qs(t.videoEncryptionParams.keyId),iv:qs(t.videoEncryptionParams.iv)},audio:{codec:"opus",encryption:"clear"},onFetch:this.onRtcDrmFetch.bind(this)};t.mediaBufferMs&&(i.mediaBufferMs=t.mediaBufferMs),this.DRMProfile&&(this.DRMProfile.playReadyUrl&&(i.prLicenseUrl=this.DRMProfile.playReadyUrl),this.DRMProfile.widevineUrl&&(i.wvLicenseUrl=this.DRMProfile.widevineUrl),this.DRMProfile.fairPlayUrl&&(i.fpsLicenseUrl=this.DRMProfile.fairPlayUrl),this.DRMProfile.fairPlayCertUrl&&(i.fpsCertificateUrl=this.DRMProfile.fairPlayCertUrl));try{qr(i),this.drmOptionsMap.set(t.videoMid,i),t.audioMid&&this.drmOptionsMap.set(t.audioMid,i),i.videoElement.addEventListener("rtcdrmerror",t=>{jr.error("DRM error: ",t.detail.message,"in video element:",i.videoElement.id),this.emit("error",new m(t.detail.message))})}catch(i){jr.error("Failed to configure DRM with options:",t,"error is:",i)}}removeDRMConfiguration(t){var i;null==(i=this.drmOptionsMap)||i.delete(t)}get isDRMOn(){return!!this.drmOptionsMap&&this.drmOptionsMap.size>0}exchangeDRMConfiguration(t,i){const e=this.getDRMConfiguration(t),s=this.getDRMConfiguration(i);if(null===e)throw new m("No DRM configuration found for "+t);if(null===s)throw new m("No DRM configuration found for "+i);zs(e.video,s.video,"keyId"),zs(e.video,s.video,"iv");try{qr(e)}catch(t){jr.error("Failed to configure DRM with options:",e,"error is:",t)}try{qr(s)}catch(t){jr.error("Failed to configure DRM with options:",s,"error is:",t)}}constructor(t,i,e=null,s=!0){t&&jr.warn("The streamName property has been deprecated. In a future release, this will be removed. Please do not rely on this value. Instead, set via token generator"),super(null,i,jr,s),this.payloadTypeCodec={},this.tracksMidValues={},this.drmOptionsMap=null,this.eventQueue=[],this.isMainStreamActive=!1,e&&(this.on(ke.track,t=>{e.srcObject=t.streams[0]}),jr.warn("The mediaElement property has been deprecated. In a future release, this will be removed. Please do not rely on this value. Instead, do this in either the `track` or the `active` broadcast event."))}},w.defineProperty(t,Io.toStringTag,{value:"Module"})})}),wd=Qn(t=>{"use strict";function i(){const t=md();return i=function(){return t},t}r(),w.defineProperty(t,"__esModule",{value:!0}),function(t,i){for(var e in i)w.defineProperty(t,e,{enumerable:!0,get:w.getOwnPropertyDescriptor(i,e).get})}(t,{get Director(){return i().Director},get Logger(){return i().Logger},get View(){return i().View}})}),yd=Qn((t,i)=>{r(),i.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),Ad=Qn((t,i)=>{r(),i.exports=function(t,i){var e=i[0],s=i[1],n=i[2],r=i[3],h=e+e,o=s+s,a=n+n,u=e*h,c=s*h,d=s*o,l=n*h,f=n*o,v=n*a,_=r*h,g=r*o,p=r*a;return t[0]=1-d-v,t[1]=c+p,t[2]=l-g,t[3]=0,t[4]=c-p,t[5]=1-u-v,t[6]=f+_,t[7]=0,t[8]=l+g,t[9]=f-_,t[10]=1-u-d,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),bd=Qn((t,i)=>{r(),i.exports=function(t,i,e){var s,n,r,h=e[0],o=e[1],a=e[2],u=_.sqrt(h*h+o*o+a*a);if(_.abs(u)<1e-6)return null;return h*=u=1/u,o*=u,a*=u,s=_.sin(i),n=_.cos(i),r=1-n,t[0]=h*h*r+n,t[1]=o*h*r+a*s,t[2]=a*h*r-o*s,t[3]=0,t[4]=h*o*r-a*s,t[5]=o*o*r+n,t[6]=a*o*r+h*s,t[7]=0,t[8]=h*a*r+o*s,t[9]=o*a*r-h*s,t[10]=a*a*r+n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),Sd=Qn((t,i)=>{r(),i.exports=function(t,i){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=i[0],t[13]=i[1],t[14]=i[2],t[15]=1,t}}),Td=Qn((t,i)=>{r(),i.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),kd=Qn((t,i)=>{r(),i.exports=function(t,i){var e=i[0],s=i[1],n=i[2],r=i[3],h=i[4],o=i[5],a=i[6],u=i[7],c=i[8],d=i[9],l=i[10],f=i[11],v=i[12],_=i[13],g=i[14],p=i[15],m=e*o-s*h,w=e*a-n*h,y=e*u-r*h,A=s*a-n*o,b=s*u-r*o,S=n*u-r*a,T=c*_-d*v,k=c*g-l*v,E=c*p-f*v,P=d*g-l*_,x=d*p-f*_,I=l*p-f*g,R=m*I-w*x+y*P+A*E-b*k+S*T;if(!R)return null;return R=1/R,t[0]=(o*I-a*x+u*P)*R,t[1]=(n*x-s*I-r*P)*R,t[2]=(_*S-g*b+p*A)*R,t[3]=(l*b-d*S-f*A)*R,t[4]=(a*E-h*I-u*k)*R,t[5]=(e*I-n*E+r*k)*R,t[6]=(g*y-v*S-p*w)*R,t[7]=(c*S-l*y+f*w)*R,t[8]=(h*x-o*E+u*T)*R,t[9]=(s*E-e*x-r*T)*R,t[10]=(v*b-_*y+p*m)*R,t[11]=(d*y-c*b-f*m)*R,t[12]=(o*k-h*P-a*T)*R,t[13]=(e*P-s*k+n*T)*R,t[14]=(_*w-v*A-g*m)*R,t[15]=(c*A-d*w+l*m)*R,t}}),Ed=Qn((t,i)=>{r(),i.exports=function(t,i,e){var s=i[0],n=i[1],r=i[2],h=i[3],o=i[4],a=i[5],u=i[6],c=i[7],d=i[8],l=i[9],f=i[10],v=i[11],_=i[12],g=i[13],p=i[14],m=i[15],w=e[0],y=e[1],A=e[2],b=e[3];return t[0]=w*s+y*o+A*d+b*_,t[1]=w*n+y*a+A*l+b*g,t[2]=w*r+y*u+A*f+b*p,t[3]=w*h+y*c+A*v+b*m,w=e[4],y=e[5],A=e[6],b=e[7],t[4]=w*s+y*o+A*d+b*_,t[5]=w*n+y*a+A*l+b*g,t[6]=w*r+y*u+A*f+b*p,t[7]=w*h+y*c+A*v+b*m,w=e[8],y=e[9],A=e[10],b=e[11],t[8]=w*s+y*o+A*d+b*_,t[9]=w*n+y*a+A*l+b*g,t[10]=w*r+y*u+A*f+b*p,t[11]=w*h+y*c+A*v+b*m,w=e[12],y=e[13],A=e[14],b=e[15],t[12]=w*s+y*o+A*d+b*_,t[13]=w*n+y*a+A*l+b*g,t[14]=w*r+y*u+A*f+b*p,t[15]=w*h+y*c+A*v+b*m,t}}),Pd=Qn((t,i)=>{r(),i.exports=function(t,i,e,s,n){var r=1/_.tan(i/2),h=1/(s-n);return t[0]=r/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(n+s)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*n*s*h,t[15]=0,t}}),xd=Qn((t,i)=>{r(),i.exports=function(t,i,e,s){var n,r,h,o,a,u,c,d,l,f,v,g,p,m,w,y,A,b,S,T,k,E,P,x,I=s[0],R=s[1],C=s[2],D=_.sqrt(I*I+R*R+C*C);if(_.abs(D)<1e-6)return null;I*=D=1/D,R*=D,C*=D,n=_.sin(e),r=_.cos(e),h=1-r,o=i[0],a=i[1],u=i[2],c=i[3],d=i[4],l=i[5],f=i[6],v=i[7],g=i[8],p=i[9],m=i[10],w=i[11],y=I*I*h+r,A=R*I*h+C*n,b=C*I*h-R*n,S=I*R*h-C*n,T=R*R*h+r,k=C*R*h+I*n,E=I*C*h+R*n,P=R*C*h-I*n,x=C*C*h+r,t[0]=o*y+d*A+g*b,t[1]=a*y+l*A+p*b,t[2]=u*y+f*A+m*b,t[3]=c*y+v*A+w*b,t[4]=o*S+d*T+g*k,t[5]=a*S+l*T+p*k,t[6]=u*S+f*T+m*k,t[7]=c*S+v*T+w*k,t[8]=o*E+d*P+g*x,t[9]=a*E+l*P+p*x,t[10]=u*E+f*P+m*x,t[11]=c*E+v*P+w*x,i!==t&&(t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15]);return t}}),Id=Qn((t,i)=>{r(),i.exports=function(t,i,e){var s,n,r,h,o,a,u,c,d,l,f,v,_=e[0],g=e[1],p=e[2];i===t?(t[12]=i[0]*_+i[4]*g+i[8]*p+i[12],t[13]=i[1]*_+i[5]*g+i[9]*p+i[13],t[14]=i[2]*_+i[6]*g+i[10]*p+i[14],t[15]=i[3]*_+i[7]*g+i[11]*p+i[15]):(s=i[0],n=i[1],r=i[2],h=i[3],o=i[4],a=i[5],u=i[6],c=i[7],d=i[8],l=i[9],f=i[10],v=i[11],t[0]=s,t[1]=n,t[2]=r,t[3]=h,t[4]=o,t[5]=a,t[6]=u,t[7]=c,t[8]=d,t[9]=l,t[10]=f,t[11]=v,t[12]=s*_+o*g+d*p+i[12],t[13]=n*_+a*g+l*p+i[13],t[14]=r*_+u*g+f*p+i[14],t[15]=h*_+c*g+v*p+i[15]);return t}});r();var Vo=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.PICTURE_IN_PICTURE_ERROR=11001]="PICTURE_IN_PICTURE_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),Je=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(i){const e=_.floor(i/1e3);if(e in t)return e;throw new g("Invalid error code: "+i)}}(Je||(Je={})),r(),r(),r(),r(),r(),r(),r(),r();var ei=function(t){return t.Sv="web",t.Tv="android",t.Ev="android-tv",t.Pv="ios",t.xv="tvos",t.Iv="chromecast",t.Rv="theoliveweb",t}({});var dl=od?od.userAgent:"",Rd=dl.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Cd=dl.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Dd=dl.match(/Android ([0-9\.]+)/i),Bd=dl.match(/Windows NT ([0-9\.]+)/i),Nd=dl.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Md=dl.match(/Firefox\/([0-9\.]+)/i),Ld=dl.match(/OPR\/(\d+\.\d+)/i),Od=dl.match(/Tizen ([0-9\.]+)/i),Fd=dl.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Ud=dl.match(/HbbTV\/([0-9.]+)/i),Vd=dl.match(/(AFT.*) Build/i),Hd=class{get Ke(){return this.Cv}get Dv(){return this.Bv}get Nv(){return this.Mv}get Lv(){return this.Ov}get Fv(){return this.Uv}get Vv(){return this.Hv}get Wv(){return this.qv}get zv(){return this.Gv}get Xv(){return this.Qv}get Kv(){return this.Yv}get Jv(){return this.Zv}get ru(){return this.$v}get t_(){return this.i_}get e_(){return this.s_||this.n_}get vd(){return this.r_}get Ks(){return this.h_}get o_(){return this.a_}get u_(){return this.c_}get d_(){var t;return null!=(t=this.l_)?t:this.f_}get v_(){return this.__}get g_(){var t;return(null==(t=s.chrome)?void 0:t.webview)&&this.p_>0}get m_(){return this.p_}get w_(){return this.y_}get A_(){return this.b_}get S_(){return this.T_}get k_(){return this.E_}get P_(){return this.x_}get I_(){return this.R_}get IS_FIRETV_AFTMM(){return"AFTMM"===this.C_}get D_(){return this.B_}get N_(){return this.M_}get L_(){return this.O_}get F_(){return this.U_}get V_(){return this.H_}get W_(){return this.q_}get z_(){return this.G_}get X_(){return this.j_}get Q_(){return 0===this.K_&&Qt.ru?this.i_:this.K_}get Y_(){return this.J_}get Z_(){return this.eg}get rg(){return this.hg}get og(){return this.ag}get cg(){return!(!this.S_&&!this.w_)&&this.d_<=56}get dg(){return this.fg}get vg(){return this._g}get gg(){return this.pg}get wg(){return this.yg}get Ag(){return this.Sg}get Tg(){return this.Eg}get Pg(){return this.xg}get Ig(){return this.Rg}get Cg(){return this.Dg}get IS_IOS_CHROME(){return this.Bg}constructor(){this.Cv=Boolean("ontouchstart"in self||self.DocumentTouch&&h instanceof self.DocumentTouch||od&&od.msMaxTouchPoints),this.Bv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(dl)||/(macintosh|mac(?=_powerpc)\s)/i.test(dl),this.Mv=/Windows NT/i.test(dl),this.Ov=Bd?C(Bd[1]):0,this.Uv=/Android/i.test(dl),this.Hv=Dd?C(Dd[1]):0,this.qv=/windows phone (8|8\.1)/i.test(dl),this.Gv=/iPhone/i.test(dl),this.Qv=/iPad/i.test(dl),this.Yv=this.Bv&&this.Cv&&!this.Qv,this.Zv=/iPod/i.test(dl),this.r_=/Mobile Safari/i.test(dl),this.s_=/EOS\d*STB/i.test(dl),this.n_=/APP\d*STB/i.test(dl),this.$v=(this.Gv||this.Qv||this.Yv||this.Zv)&&!this.qv,this.i_=Fd?C(Fd[2]):0,this.h_=this.qv||this.$v||this.Uv||this.r_,this.a_=/CriOS/i.test(dl),this.c_=Boolean(self.chrome&&/google/i.test(od.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(od.userAgent),this.p_=Cd?x(Cd[1],10):0,this.Bg=Boolean(/CriOS/i.test(dl)),this.Dg=Boolean(self.chrome||/Chrome/i.test(dl)||this.Bg),this.f_=Rd?x(Rd[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(dl),this.b_=Od?C(Od[1]):0,this.l_=this.b_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.b_):void 0,this.T_=/webos|web0s/i.test(dl),this.E_=/HbbTV/i.test(dl),this.x_=!!Ud&&function(t){if(!t)return!1;const i=t.split(".").map(Number);return 3===i.length&&1===i[0]&&2===i[1]}(Ud[1]),this.R_=/AFT.* Build/i.test(dl),this.C_=Vd?Vd[1]:void 0,this.B_=/VIZIO/i.test(dl),this.M_=/Edge\/\d+/i.test(dl),this.O_=/Trident/i.test(dl),this.U_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.H_=/Vivaldi/i.test(dl),this.q_=/Firefox/i.test(dl)&&!/Seamonkey/i.test(dl),this.G_=Md?C(Md[1]):0,this.j_=/Safari/i.test(dl)&&!/Chrome/i.test(dl)&&!this.qv&&!this.y_,this.K_=Nd?C(Nd[2]):0,this.J_=Boolean(Ld),this.eg=Ld?C(Ld[1]):0,this.hg=/CrKey/.test(dl),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(dl),this.fg=/PlayStation 4/i.test(dl),this._g=/PlayStation 5/i.test(dl),this.pg="web"===ei.Ev,this.yg="web"===ei.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===ei.Pv,this.xg="web"===ei.xv,this.Rg="web"===ei.Iv}};Hd.Ng=new Hd;var Qt=Hd.Ng;r();var La={}.hasOwnProperty,Wd={}.toString;function it(t){return null!=t}function qd(t){return void 0===t}var zd,ul=Array.isArray||function(t){return"[object Array]"===Wd.call(t)};function Pc(t){return Lu(t)&&La.call(t,"length")&&ho(t.length)}function Lu(t){return"object"==typeof t&&null!==t}function Gd(t){return Lu(t)&&t.constructor&&t.constructor===w}function Z(t){return"string"==typeof t}function Xd(t){return"boolean"==typeof t}function ih(t){return it(t)&&"function"==typeof t.then}function jd(t){return"[object Date]"===Wd.call(t)}function ho(t){return"number"==typeof t}function Qd(t){return"function"==typeof t}function ri(t){return Qd(t)||Lu(t)}function Kd(t){return Lu(t)&&!ul(t)}function os(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Yd(t){let i;for(;it(i=t.firstChild);)t.removeChild(i)}function Jd(t,i){let e;for(;it(e=t.firstChild);)i.appendChild(e)}function Zd(t,i){t.insertBefore(i,t.firstChild)}function $d(t){return t&&t.nodeName&&t.nodeName.toLowerCase()||""}function El(t){const i=t.className;return"string"==typeof i?i:i&&"string"==typeof i.baseVal?i.baseVal:""}function Pl(t,i){const e=t.className;"string"==typeof e?t.className=i:e&&"string"==typeof e.baseVal&&(e.baseVal=i)}function Il(t,i){return void 0!==t.classList?t.classList.contains(i):void 0!==t.className&&-1!==(" "+El(t)+" ").indexOf(" "+i+" ")}function fi(t,i){if(void 0!==t.classList)t.classList.add(i);else if(void 0!==t.className){const e=El(t);-1===(" "+e+" ").indexOf(" "+i+" ")&&Pl(t,(e+" "+i).trim())}}function Rl(t,i){if(void 0!==t.classList)t.classList.remove(i);else if(void 0!==t.className){let e=" "+El(t)+" ";const s=" "+i+" ";for(;-1!==e.indexOf(s);)e=e.replace(s," ");Pl(t,e.trim())}}function Dl(t,i,e){void 0===e&&(e=!Il(t,i)),e?fi(t,i):Rl(t,i)}function Bl(t){t.stopPropagation()}function Nl(t,i){Qt.w_&&Qt.A_<3?function(t,i){let e=i;switch(i){case"flex":e="-webkit-flex";break;case"inline-flex":e="-webkit-inline-flex"}t.display=e}(t,i):function(t,i){if(t.display=i,t.display!==i){let e=i;switch(i){case"flex":e="-ms-flexbox";break;case"inline-flex":e="-ms-inline-flexbox"}t.display=e}}(t,i)}function Ll(t,i){const e=i.style;if(e)for(const i of w.keys(t)){const s=t[i];void 0!==s&&(e[i]=s)}}function oa(t){const i=t.style;i.position="absolute",i.left="0",i.right="0",i.top="0",i.bottom="0",i.width="100%",i.height="100%"}function Ol(t){const i=t.style;i.position="",i.left="",i.right="",i.top="",i.bottom="",i.width="",i.height=""}function Fl(t){t.removeAttribute("title")}function Ul(t){t.addEventListener("mouseover",t=>{Fl(t.target)})}function Vl(t){try{return Boolean(t)&&t.parent!==t}catch(t){return!1}}r(),r();var Ct=()=>{},jo=t=>t;function ph(t,i){let e=-1/0;return function(){for(var s=arguments.length,n=new Array(s),r=0;r=i&&(t.apply(this,n),e=h)}}function Hl(t,i){let e=0;return function(){for(var s=arguments.length,n=new Array(s),r=0;r{e=0,t.apply(h,n)},i)}}function mu(t){let i;return()=>(void 0!==t&&(i=t(),t=void 0),i)}function Be(t,i,e){if(null!=i){if("object"!=typeof i&&"function"!=typeof i)throw new g("Object expected.");var s,n;if(e){if(!id)throw new g("Symbol.asyncDispose is not defined.");s=i[id]}if(void 0===s){if(!Nt)throw new g("Symbol.dispose is not defined.");s=i[Nt],e&&(n=s)}if("function"!=typeof s)throw new g("Object not disposable.");n&&(s=function(){try{n.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:i,dispose:s,async:e})}else e&&t.stack.push({async:!0});return i}r(),r(),r();var Wl="function"==typeof SuppressedError?SuppressedError:function(t,i,e){var s=new m(e);return s.name="SuppressedError",s.error=t,s.suppressed=i,s};function Cs(t){function i(i){t.error=t.hasError?new Wl(i,t.error,"An error was suppressed during disposal."):i,t.hasError=!0}var e,s=0;return function n(){for(;e=t.stack.pop();)try{if(!e.async&&1===s)return s=0,t.stack.push(e),Promise.resolve().then(n);if(e.dispose){var r=e.dispose.call(e.value);if(e.async)return s|=2,Promise.resolve(r).then(n,function(t){return i(t),n()})}else s|=1}catch(t){i(t)}if(1===s)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}function xe(t,i){return zl(t.slice(),i)}function ql(t,i){const e=zl(t,i);return e!==t&&Gl(e,void 0,t.length,t),t}function zl(t,i){let e=t;const s=e.length;if(s<=1)return e;let n=new Array(s);for(let t=1;tn&&(u=n),o>n&&(o=n),c=a,d=u;;)if(ct+i(e),0)}var Qc=function(t){return t[t.rh=0]="rh",t[t.Fg=1]="Fg",t[t.Ug=-1]="Ug",t}({}),tf=(t,i)=>(0|t)-(0|i),gu=(t,i)=>t===i?0:ti?1:S(t)?S(i)?0:1:-1;function ef(t,i,e){return uh(t,i,e)?0:gu(t,i)}var sf=(t,i)=>sr(t,i)?0:gu(t,i);var nf="function"==typeof Array.prototype.find?(t,i)=>t.find(i):(t,i)=>{const e=li(t,i);return-1===e?void 0:t[e]},Jr=nf,rf="function"==typeof Array.prototype.findLast?(t,i)=>t.findLast(i):(t,i)=>{const e=of(t,i);return-1===e?void 0:t[e]},hf=rf,li="function"==typeof Array.prototype.findIndex?(t,i)=>t.findIndex(i):(t,i)=>{for(let e=0;et.findLastIndex(i):(t,i)=>{for(let e=t.length-1;e>=0;e-=1){if(i(t[e],e,t))return e}return-1},af="function"==typeof Array.prototype.at?(t,i)=>t.at(i):(t,i)=>{const e=t.length,s=i>=0?i:e+i;return s<0||s>=e?void 0:t[s]};function oi(t,i){const e=t.indexOf(i);return-1!==e&&(ka(t,e),!0)}function ka(t,i){0===i?t.shift():t.splice(i,1)}function uf(t,i){const e=new Array(t.length);let s=0,n=0;for(;nt.flatMap(i):(t,i)=>{const e=[];for(let s=0;sgu(i(t),i(e)))}function lf(t,i){return vf(t,(t,e)=>gu(i(t),i(e)))}function ff(t,i){if(0!==t.length)return t.reduce((t,e)=>i(t,e)<=0?t:e)}function vf(t,i){return ff(t,(t,e)=>i(e,t))}function Bo(t){return t.filter((i,e)=>t.indexOf(i)===e)}function _f(t,i){return Promise.all(t.map(i)).then(i=>t.filter((t,e)=>i[e]))}function gf(t,i,e){if(t.length!==i.length)return!1;for(let s=0;s{s(),i.Vg()},s=()=>{t.jg(e),t.Kg(s),i.jg(e),i.Kg(s)};t.Xg(e),t.Qg(s),i.Xg(e),i.Qg(s)}tp(){const i=new t,e=new t,s=i.Yg,n=e.Yg,r=this.Jg,h=()=>{s.Hg&&n.Wg||n.Hg&&s.Wg?r.Vg():s.Wg&&n.Wg&&r.zg()};s.Xg(h),n.Xg(h),s.Qg(h),n.Qg(h),i.$g(r),e.$g(r);return r.Qg(()=>{s.jg(h),n.jg(h),s.Kg(h),n.Kg(h)}),[i,e]}static ep(i){const e=new t;for(const t of i)void 0!==t&&e.$g(t);return e}[Nt](){this.Zg()}constructor(){this.Jg=new mf}};r(),r();var wf=function(){for(var t=arguments.length,i=new Array(t),e=0;e{if(i.Hg)return t.catch(Ct),s(new dt);const n=()=>{i.jg(n),s(new dt)};i.Xg(n),t.then(t=>{i.jg(n),e(t)},t=>{i.jg(n),s(t)})}):t}async function $e(t,i){const e={stack:[],error:void 0,hasError:!1};try{Be(e,i,!1);return await t}catch(t){e.error=t,e.hasError=!0}finally{Cs(e)}}async function Af(t,i){const e={stack:[],error:void 0,hasError:!1};try{Be(e,i,!1);return await t(i.Yg)}catch(t){e.error=t,e.hasError=!0}finally{Cs(e)}}var bf=Promise.resolve(),ct="function"==typeof queueMicrotask?queueMicrotask:t=>{bf.then(t)};function Wr(t){t.then(Ct,Ct)}async function gn(t){try{return await Promise.all(t)}catch(i){throw await Promise.all(t.map(t=>t.catch(Ct))),i}}function Er(t,i){return new Promise((e,s)=>{if(void 0!==i&&i.Hg)return void s(new dt);const n=zd.Og(()=>{void 0!==i&&i.jg(r),e()},t),r=()=>{zd.Lg(n),s(new dt)};void 0!==i&&i.Xg(r)})}async function Sf(t,i){const e={stack:[],error:void 0,hasError:!1};try{const s=Be(e,new at,!1);return await Promise.race([t,Er(i,s.Yg).then(()=>{throw new m("Timeout")})])}catch(t){e.error=t,e.hasError=!0}finally{Cs(e)}}function Tf(t){return"video"===$d(t)}function kf(t){t.src&&(t.removeAttribute("src"),t.load()),t.srcObject&&(t.srcObject=null,t.load()),t.hasChildNodes()&&(!function(t,i){const e=t.childNodes;for(let s=e.length-1;s>=0;s--){const n=e.item(s);$d(n)===i&&t.removeChild(n)}}(t,"source"),t.load())}function Ef(){return void 0!==h?h.createElement("video"):void 0}var gr=mu(Ef),Pf=mu(()=>"undefined"!=typeof HTMLVideoElement&&gr()instanceof HTMLVideoElement);function xf(t){const i=h.createElement(t);return Tf(i)&&i.addEventListener("contextmenu",Df),Rf(i),i}function If(t){Rf(t),t.removeEventListener("contextmenu",Df)}function Rf(t){t.removeAttribute("id"),t.removeAttribute("class"),t.removeAttribute("style"),Yd(t),kf(t),t.pause(),t.playbackRate=1,t.disableRemotePlayback=!1,t.preload="auto",t.controls=!1,t.style.display="none",Tf(t)&&(t.style.width="100%",t.style.height="100%",t.style.pointerEvents="none",t.playsInline=!0,t.setAttribute("webkit-playsinline",""))}function Cf(t,i){if(i.sp){const i=t.muted;t.muted=!0,t.muted=!1,t.muted=i}else if(t.paused){const i=t.play();ih(i)&&Wr(i),t.pause()}}function Df(t){t.preventDefault()}r(),r(),r();var Bf=null;try{Bf=new WebAssembly.Instance(new WebAssembly.Module(new j([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(y){}function ca(t,i,e){this.low=0|t,this.high=0|i,this.unsigned=!!e}function uo(t){return!0===(t&&t.np)}function Nf(t){var i=_.clz32(t&-t);return t?31-i:i}ca.prototype.np,w.defineProperty(ca.prototype,"np",{value:!0}),ca.isLong=uo;var Mf={},Lf={};function Of(t,i){var e,s,n;return i?(n=0<=(t>>>=0)&&t<256)&&(s=Lf[t])?s:(e=ys(t,0,!0),n&&(Lf[t]=e),e):(n=-128<=(t|=0)&&t<128)&&(s=Mf[t])?s:(e=ys(t,t<0?-1:0,!1),n&&(Mf[t]=e),e)}function Ff(t,i){if(S(t))return i?mr:su;if(i){if(t<0)return mr;if(t>=qf)return Yf}else{if(t<=-zf)return gi;if(t+1>=zf)return Kf}return t<0?Ff(-t,i).neg():ys(t%Wf|0,t/Wf|0,i)}function ys(t,i,e){return new ca(t,i,e)}ca.fromInt=Of,ca.fromNumber=Ff,ca.fromBits=ys;var Uf=_.pow;function Vf(t,i,e){if(0===t.length)throw m("empty string");if("number"==typeof i?(e=i,i=!1):i=!!i,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return i?mr:su;if((e=e||10)<2||360)throw m("interior hyphen");if(0===s)return Vf(t.substring(1),i,e).neg();for(var n=Ff(Uf(e,8)),r=su,h=0;h>>0:this.low},$s.toNumber=function(){return this.unsigned?(this.high>>>0)*Wf+(this.low>>>0):this.high*Wf+(this.low>>>0)},$s.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((r=o).isZero())return a+h;for(;a.length<6;)a="0"+a;h=""+a+h}},$s.getHighBits=function(){return this.high},$s.getHighBitsUnsigned=function(){return this.high>>>0},$s.getLowBits=function(){return this.low},$s.getLowBitsUnsigned=function(){return this.low>>>0},$s.getNumBitsAbs=function(){if(this.isNegative())return this.eq(gi)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,i=31;i>0&&!(t&1<>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},$s.isZero=function(){return 0===this.high&&0===this.low},$s.eqz=$s.isZero,$s.isNegative=function(){return!this.unsigned&&this.high<0},$s.isPositive=function(){return this.unsigned||this.high>=0},$s.isOdd=function(){return!(1&~this.low)},$s.isEven=function(){return!(1&this.low)},$s.equals=function(t){return uo(t)||(t=Hf(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},$s.eq=$s.equals,$s.notEquals=function(t){return!this.eq(t)},$s.neq=$s.notEquals,$s.ne=$s.notEquals,$s.lessThan=function(t){return this.comp(t)<0},$s.lt=$s.lessThan,$s.lessThanOrEqual=function(t){return this.comp(t)<=0},$s.lte=$s.lessThanOrEqual,$s.le=$s.lessThanOrEqual,$s.greaterThan=function(t){return this.comp(t)>0},$s.gt=$s.greaterThan,$s.greaterThanOrEqual=function(t){return this.comp(t)>=0},$s.gte=$s.greaterThanOrEqual,$s.ge=$s.greaterThanOrEqual,$s.compare=function(t){if(uo(t)||(t=Hf(t)),this.eq(t))return 0;var i=this.isNegative(),e=t.isNegative();return i&&!e?-1:!i&&e?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},$s.comp=$s.compare,$s.negate=function(){return!this.unsigned&&this.eq(gi)?gi:this.not().add(Xf)},$s.neg=$s.negate,$s.add=function(t){uo(t)||(t=Hf(t));var i=this.high>>>16,e=65535&this.high,s=this.low>>>16,n=65535&this.low,r=t.high>>>16,h=65535&t.high,o=t.low>>>16,a=0,u=0,c=0,d=0;return c+=(d+=n+(65535&t.low))>>>16,u+=(c+=s+o)>>>16,a+=(u+=e+h)>>>16,a+=i+r,ys((c&=65535)<<16|(d&=65535),(a&=65535)<<16|(u&=65535),this.unsigned)},$s.subtract=function(t){return uo(t)||(t=Hf(t)),this.add(t.neg())},$s.sub=$s.subtract,$s.multiply=function(t){if(this.isZero())return this;if(uo(t)||(t=Hf(t)),Bf)return ys(Bf.mul(this.low,this.high,t.low,t.high),Bf.get_high(),this.unsigned);if(t.isZero())return this.unsigned?mr:su;if(this.eq(gi))return t.isOdd()?gi:su;if(t.eq(gi))return this.isOdd()?gi:su;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(Gf)&&t.lt(Gf))return Ff(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,e=65535&this.high,s=this.low>>>16,n=65535&this.low,r=t.high>>>16,h=65535&t.high,o=t.low>>>16,a=65535&t.low,u=0,c=0,d=0,l=0;return d+=(l+=n*a)>>>16,c+=(d+=s*a)>>>16,d&=65535,c+=(d+=n*o)>>>16,u+=(c+=e*a)>>>16,c&=65535,u+=(c+=s*o)>>>16,c&=65535,u+=(c+=n*h)>>>16,u+=i*a+e*o+s*h+n*r,ys((d&=65535)<<16|(l&=65535),(u&=65535)<<16|(c&=65535),this.unsigned)},$s.mul=$s.multiply,$s.divide=function(t){if(uo(t)||(t=Hf(t)),t.isZero())throw m("division by zero");var i,e,s;if(Bf)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?ys((this.unsigned?Bf.div_u:Bf.div_s)(this.low,this.high,t.low,t.high),Bf.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?mr:su;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return mr;if(t.gt(this.shru(1)))return jf;s=mr}else{if(this.eq(gi))return t.eq(Xf)||t.eq(Qf)?gi:t.eq(gi)?Xf:(i=this.shr(1).div(t).shl(1)).eq(su)?t.isNegative()?Xf:Qf:(e=this.sub(t.mul(i)),s=i.add(e.div(t)));if(t.eq(gi))return this.unsigned?mr:su;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=su}for(e=this;e.gte(t);){i=_.max(1,_.floor(e.toNumber()/t.toNumber()));for(var n=_.ceil(_.log(i)/_.LN2),r=n<=48?1:Uf(2,n-48),h=Ff(i),o=h.mul(t);o.isNegative()||o.gt(e);)o=(h=Ff(i-=r,this.unsigned)).mul(t);h.isZero()&&(h=Xf),s=s.add(h),e=e.sub(o)}return s},$s.div=$s.divide,$s.modulo=function(t){return uo(t)||(t=Hf(t)),Bf?ys((this.unsigned?Bf.rem_u:Bf.rem_s)(this.low,this.high,t.low,t.high),Bf.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},$s.mod=$s.modulo,$s.rem=$s.modulo,$s.not=function(){return ys(~this.low,~this.high,this.unsigned)},$s.countLeadingZeros=function(){return this.high?_.clz32(this.high):_.clz32(this.low)+32},$s.clz=$s.countLeadingZeros,$s.countTrailingZeros=function(){return this.low?Nf(this.low):Nf(this.high)+32},$s.ctz=$s.countTrailingZeros,$s.and=function(t){return uo(t)||(t=Hf(t)),ys(this.low&t.low,this.high&t.high,this.unsigned)},$s.or=function(t){return uo(t)||(t=Hf(t)),ys(this.low|t.low,this.high|t.high,this.unsigned)},$s.xor=function(t){return uo(t)||(t=Hf(t)),ys(this.low^t.low,this.high^t.high,this.unsigned)},$s.shiftLeft=function(t){return uo(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?ys(this.low<>>32-t,this.unsigned):ys(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):ys(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},$s.shr=$s.shiftRight,$s.shiftRightUnsigned=function(t){return uo(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?ys(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):ys(32===t?this.high:this.high>>>t-32,0,this.unsigned)},$s.shru=$s.shiftRightUnsigned,$s.shr_u=$s.shiftRightUnsigned,$s.rotateLeft=function(t){var i;return uo(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?ys(this.high,this.low,this.unsigned):t<32?(i=32-t,ys(this.low<>>i,this.high<>>i,this.unsigned)):(i=32-(t-=32),ys(this.high<>>i,this.low<>>i,this.unsigned))},$s.rotl=$s.rotateLeft,$s.rotateRight=function(t){var i;return uo(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?ys(this.high,this.low,this.unsigned):t<32?(i=32-t,ys(this.high<>>t,this.low<>>t,this.unsigned)):(i=32-(t-=32),ys(this.low<>>t,this.high<>>t,this.unsigned))},$s.rotr=$s.rotateRight,$s.toSigned=function(){return this.unsigned?ys(this.low,this.high,!1):this},$s.toUnsigned=function(){return this.unsigned?this:ys(this.low,this.high,!0)},$s.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},$s.toBytesLE=function(){var t=this.high,i=this.low;return[255&i,i>>>8&255,i>>>16&255,i>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},$s.toBytesBE=function(){var t=this.high,i=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,i>>>24,i>>>16&255,i>>>8&255,255&i]},ca.fromBytes=function(t,i,e){return e?ca.fromBytesLE(t,i):ca.fromBytesBE(t,i)},ca.fromBytesLE=function(t,i){return new ca(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,i)},ca.fromBytesBE=function(t,i){return new ca(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],i)},"function"==typeof BigInt&&(ca.fromBigInt=function(t,i){return ys(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),i)},ca.fromValue=function(t,i){return"bigint"==typeof t?ca.fromBigInt(t,i):Hf(t,i)},$s.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<=2*yt}get Rp(){return!1}get Cp(){return!1}get Dp(){return!1}constructor(){this.hp=void 0,this.Bp=!1,this.Ke=ev,this.Ks=!1,this.sp=!0}},hv=class extends rv{constructor(){super()}};r();var ov=class extends hv{get Sp(){if(Qt.Dv)return 4096}xp(t,i){if(t&&t.Np&&i&&i.Np){const e=av(t.Np,"mp4a.40.2")&&av(i.Np,"mp4a.40.5"),s=av(t.Np,"mp4a.40.5")&&av(i.Np,"mp4a.40.2"),n=av(t.Np,"mp4a.40.2")&&av(i.Np,"mp4a.40.34"),r=av(t.Np,"mp4a.40.34")&&av(i.Np,"mp4a.40.2"),h=av(t.Np,"mp4a.40.5")&&av(i.Np,"mp4a.40.34"),o=av(t.Np,"mp4a.40.34")&&av(i.Np,"mp4a.40.5");return!(e||s||n||r||h||o)}return!0}get Dp(){return!0}};function av(t,i){return t.indexOf(i)>-1}r();var uv=class extends hv{Ip(t){return t>=2}};r();var cv=class extends hv{get Pp(){return Qt.Q_<17}get Rp(){return!0}constructor(){super(),this.Bp=Qt.Q_>=11,this.sp=Qt.X_&&!(Qt.ru&&Qt.Q_<10)}};r();var dv,lv=class extends hv{get Tp(){return!Qt.Nv||(Qt.v_?92!==Qt.m_:Qt.d_>=100)}};r(),r(),r(),r(),r();var fv=function(){const t=Ef();if(!t)return!1;const i=t.muted;return t.muted=!i,t.muted!==i}(),vv=function(){if(Qt.Kv)return!1;const t=Ef();if(!t)return!1;const i=t.volume;return t.volume=i/2+.1,i!==t.volume}();var wi=class extends rv{op(){return this.Mp.rp}get Sp(){return this.Mp.Sp}get Tp(){return this.Mp.Tp}xp(t,i){return this.Mp.xp(t,i)}Ip(t){return this.Mp.Ip(t)}get Pp(){return this.Mp.Pp}get Dp(){return this.Mp.Dp}constructor(t){super(),this.Mp=void 0,this.Mp=t,this.Bp=this.Mp.Bp,this.Ke=this.Mp.Ke,this.sp=fv&&this.Mp.sp}},_v=class extends wi{get bp(){return Qt.ru}constructor(t){super(t),this.Bp=!0,this.Ks=!0}};r();var gv=class{Lp(){return new this.Op}Fp(t){return this.Op.isTypeSupported(t)}constructor(t){this.Op=void 0,this.Op=za(t)}};function za(t){return t&&ri(s.ManagedMediaSource)?s.ManagedMediaSource:ri(s.MediaSource)?s.MediaSource:void 0}var pv=class extends _v{get bp(){return!0}op(){return za(!0)?super.op():1}};r();var mv=class extends wi{get _p(){return Qt.A_<3}get gp(){return Qt.A_>=3}get lp(){return s.tizen&&!this.Up&&s.tizen.systeminfo.getPropertyValue("DISPLAY",t=>{const i=t.resolutionWidth,e=t.resolutionHeight;1===i&&1===e||(this.Up={width:i,height:e})}),this.Up}get kp(){return Qt.A_<3}xp(t,i){return super.xp(t,i)}constructor(...t){super(...t),this.Up=void 0}};r();var wv=class extends wi{get lp(){return s.webOS&&!this.Up&&s.webOS.deviceInfo(t=>{this.Up={width:t.screenWidth,height:t.screenHeight}}),this.Up}get yp(){return!1}constructor(...t){super(...t),this.Up=void 0}};r();var yv=class extends wi{get bp(){return!0}get Rp(){return this.Mp.Rp}};r();var Av=class extends wi{get Cp(){return Qt.IS_FIRETV_AFTMM}};!function(t){dv=t}(function(){const t=function(){if(Qt.W_)return new ov;if(Qt.N_||Qt.L_)return new uv;if(Qt.X_)return new cv;if(Qt.u_)return new lv;return new hv}();return Qt.ru?new pv(t):Qt.I_?new Av(t):Qt.Ks?new _v(t):Qt.w_?new mv(t):Qt.S_?new wv(t):Qt.Dv?new yv(t):new wi(t)}()),r(),r(),r();var bv=!(Qt.L_&&!Qt.F_),Sh=self.console;function Sv(t){if(Lu(t))try{return JSON.stringify(t)}catch(t){}return t}function Tv(t){return t.map(Sv).join(" ")}function kv(t){const i=Sh&&Sh[t];return i?i.bind&&bv?i.bind(Sh):function(){for(var i=arguments.length,e=new Array(i),s=0;s{const t=Sh&&Sh.assert;return t?t.bind&&bv?t.bind(Sh):function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s1?i-1:0),s=1;su&&(r=u),h>u&&(h=u),o=n,a=r;;)if(o=65&&t<=90}function Gv(t){return zv(t)||function(t){return t>=97&&t<=122}(t)}function Xv(t){return t>=48&&t<=57}function jv(t){return Xv(t)||Gv(t)}function Qv(t){return Xv(t)||t>=65&&t<=70||t>=97&&t<=102}function Kv(t){return zv(t)?t+32:t}function Yv(t){return Xv(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Jv(t,i){return void 0===i&&(i=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(i?87:55):-1}var Zv=_.min,$v=String.fromCharCode;function t_(t){for(var i=t.length,e=[],s=0;s= 0x80 (not a basic code point)","invalid-input":"Invalid input"},r_=_.floor,h_=String.fromCharCode;function o_(t){throw new RangeError(n_[t])}function a_(t){for(var i=[],e=0,s=t.length;e=55296&&n<=56319&&e>1,t+=r_(t/i);t>455;s+=36)t=r_(t/35);return r_(s+36*t/(t+38))},f_=function(t){return function(t,i){var e=t.split("@"),s="";e.length>1&&(s=e[0]+"@",t=e[1]);var n=function(t,i){for(var e=[],s=t.length;s--;)e[s]=i(t[s]);return e}((t=t.replace(s_,".")).split("."),i).join(".");return s+n}(t,function(t){return e_.test(t)?"xn--"+function(t){for(var i=[],e=(t=a_(t)).length,s=128,n=0,r=72,h=0,o=t;h=s&&vr_((i_-n)/_)&&o_("overflow"),n+=(d-s)*_,s=d;for(var g=0,p=t;gi_&&o_("overflow"),m==s){for(var w=n,y=36;;y+=36){var A=y<=r?1:y>=r+26?26:y-r;if(w65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|1023&s),i.push(s)}return t_(i)}function v_(t){if(t>=55296&&t<=57343)throw new m("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function __(t,i){return t>>i&63|128}function g_(t,i){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(i.push(t>>18&7|240),i.push(__(t,12)),i.push(__(t,6))):(v_(t),i.push(t>>12&15|224),i.push(__(t,6))):i.push(t>>6&31|192),i.push(63&t|128)):i.push(t)}function p_(t){for(var i=[],e=0;e=c_)throw new m("Invalid byte index");var t=255&u_[Eo];if(Eo++,128==(192&t))return 63&t;throw new m("Invalid continuation byte")}function w_(){var t,i;if(Eo>c_)throw new m("Invalid byte index");if(Eo===c_)return!1;if(t=255&u_[Eo],Eo++,!(128&t))return t;if(192==(224&t)){if((i=(31&t)<<6|m_())>=128)return i;throw new m("Invalid continuation byte")}if(224==(240&t)){if((i=(15&t)<<12|m_()<<6|m_())>=2048)return v_(i),i;throw new m("Invalid continuation byte")}if(240==(248&t)&&(i=(7&t)<<18|m_()<<12|m_()<<6|m_())>=65536&&i<=1114111)return i;throw new m("Invalid UTF-8 detected")}function y_(t){return[37,Jv(t>>4),Jv(15&t)]}function A_(t){return function(t){return t>=0&&t<=31}(t)||t>126}function b_(t){return A_(t)||32===t||34===t||60===t||62===t||96===t}function S_(t){return b_(t)||35===t||63===t||123===t||125===t}function T_(t){return S_(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function k_(t){return t<33||t>126||34===t||35===t||60===t||62===t}function E_(t){return k_(t)||39===t}function P_(t,i){if(!i(t))return[t];for(var e=p_([t]),s=[],n=0;n6)throw new g;for(var a=0;r0){if(!("."===t[r]&&a<4))throw new g;r+=1}if(!Bv.test(t[r]))throw new g;for(;r255)throw new g}r+=1}e[s]=e[s]<<8|u,2!==(a+=1)&&4!==a||(s+=1)}if(4!==a)throw new g;break}if(":"===t[r]){if((r+=1)===i)throw new g}else if(r0;)qv(e,s,n+d-1),s-=1,d-=1}else if(8!==s)throw new g;return e}function D_(t){var i=10,e=Lv;return Mv.test(t)?(t=t.slice(2),i=16,e=Ov):t.length>=2&&"0"===t[0]&&(t=t.slice(1),i=8,e=Fv),""===t?0:e.test(t)?x(t,i):void 0}var So={Vp:4},B_=/[\0\t\n\r #%/:?@\[\\\]]/,N_=/[\0\t\n\r #/:?@\[\\\]]/;function M_(t,i){if("["===t[0]){if("]"!==t[t.length-1])throw new g("Invalid IPv6 address");return{Vp:2,Hp:C_(t.slice(1,-1))}}if(!i)return function(t){if(N_.test(t))throw new g("Invalid code point in opaque host");var i=x_(t,A_);return""===i?So:{Vp:3,Wp:i}}(t);var e=function(t){var i=function(t){return f_(t.toLowerCase())}(t);return i}(R_(t));if(B_.test(e))throw new g("Invalid code point in host");var s=function(t){var i=t.split(".");if(""===i[i.length-1]&&i.pop(),!(i.length>4)){for(var e=[],s=0;s255)throw new g;if(e[e.length-1]>=_.pow(256,5-e.length))throw new g;for(var o=e.pop(),a=0;a>>=8;return i.reverse().join("")}(t.Hp);case 2:return"["+function(t){for(var i="",e=function(t){for(var i=0,e=0,s=0,n=0,r=0;r<8;r++)0===t[r]?(0===n&&(s=r),n++):(n>e&&(i=s,e=n),n=0);return n>e&&(i=s,e=n),e>1?i:null}(t),s=!1,n=0;n<8;n++){if(s){if(0===t[n])continue;s=!1}e!==n?(i+=t[n].toString(16),7!==n&&(i+=":")):(i+=0===n?"::":":",s=!0)}return i}(t.Hp)+"]";case 3:return t.Wp;case 4:return""}}var O_=/\+/g;function F_(t){return 42===t||45===t||46===t||95===t||jv(t)}function U_(t){for(var i=t.split("&"),e=[],s=0;s0&&(i+="&"),i+=H_(p_(a_(s[0])))+"="+H_(p_(a_(s[1])))}return i}function H_(t){for(var i=[],e=0;e0&&"?"===t[0]&&(t=t.slice(1)),this.zp=U_(t)}var i=t.prototype;return i.append=function(t,i){t=Ti(t),i=Ti(i),this.zp.push([t,i]),K_(this)},i.delete=function(t){t=Ti(t);for(var i=this.zp,e=0;e=2))return!1;if(!cg(t.slice(0,2)))return!1;if(2!==i){var e=t[2];if(47!==e&&92!==e&&63!==e&&35!==e)return!1}return!0}function ug(t){return 2===t.length&&Dv.test(t[0])&&(":"===t[1]||"|"===t[1])}function cg(t){return 2===t.length&&ug(t_(t))}function dg(t){return ug(t)&&":"===t[1]}function lg(t){var i=t.Jp;0!==i.length&&("file"===t.Qp&&1===i.length&&dg(i[0])||i.pop())}function fg(t){return null===t.Zp||So===t.Zp||t.$p||"file"===t.Qp}var vg=-1,_g=/\t|\n|\r/g,gg=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function pg(t,i,e,s){void 0===e&&(e=null),void 0===s&&(s=null),e||(e=new wg,t=t.replace(gg,""));var n=null!==s?s:0;i=i||null;for(var r=[],h=!1,o=!1,a=!1,u=a_(t=t.replace(_g,"")),c=u.length,d=0;d<=c;){var l=d65535)throw new g("Invalid port");e.im=y===Ph[e.Qp]?null:y,r.length=0}if(null!==s)return;n=16,d-=1}break;case 13:e.Qp="file",47===l||92===l?n=14:i&&"file"===i.Qp?vg===l?(e.Zp=i.Zp,e.Jp=i.Jp.slice(),e.Gp=i.Gp):63===l?(e.Zp=i.Zp,e.Jp=i.Jp.slice(),e.Gp="",n=19):35===l?(e.Zp=i.Zp,e.Jp=i.Jp.slice(),e.Gp=i.Gp,e.nm="",n=20):(ag(u.slice(d))||(e.Zp=i.Zp,e.Jp=i.Jp.slice(),lg(e)),n=17,d-=1):(n=17,d-=1);break;case 14:47===l||92===l?n=15:(i&&"file"===i.Qp&&!ag(u.slice(d))&&(dg(i.Jp[0])?e.Jp.push(i.Jp[0]):e.Zp=i.Zp),n=17,d-=1);break;case 15:if(vg===l||47===l||92===l||63===l||35===l)if(d-=1,null===s&&cg(r))n=17;else if(0===r.length){if(e.Zp=So,null!==s)return;n=16}else{var A=M_(hn(r),Et(e));if(0===A.Vp&&"localhost"===A.qp&&(A=So),e.Zp=A,null!==s)return;r.length=0,n=16}else r.push(l);break;case 16:Et(e)?(n=17,47!==l&&92!==l&&(d-=1)):null===s&&63===l?(e.Gp="",n=19):null===s&&35===l?(e.nm="",n=20):vg!==l&&(n=17,47!==l&&(d-=1));break;case 17:if(vg===l||47===l||Et(e)&&92===l||null===s&&(63===l||35===l)){var b=hn(r);if(rg(b)?(lg(e),47===l||Et(e)&&92===l||e.Jp.push("")):!ng(b)||47===l||Et(e)&&92===l?ng(b)||("file"===e.Qp&&0===e.Jp.length&&cg(r)&&(So!==e.Zp&&null!==e.Zp&&(e.Zp=So),r[1]=58,b=hn(r)),e.Jp.push(b)):e.Jp.push(""),r.length=0,"file"===e.Qp&&(vg===l||63===l||35===l))for(;e.Jp.length>1&&""===e.Jp[0];)e.Jp.shift();63===l?(e.Gp="",n=19):35===l&&(e.nm="",n=20)}else r.push.apply(r,P_(l,S_));break;case 18:63===l?(e.Gp="",n=19):35===l?(e.nm="",n=20):vg!==l&&(e.Jp[0]+=hn(P_(l,A_)));break;case 19:null===s&&35===l?(e.nm="",n=20):vg!==l&&(e.Gp+=hn(P_(l,Et(e)?E_:k_)));break;case 20:vg===l||0===l||(e.nm+=hn(P_(l,b_)))}d++}return e}function mg(t,i,e,s){try{pg(t,i,e,s)}catch(t){}}var wg=function(){this.Qp="",this.Kp="",this.Yp="",this.Zp=null,this.im=null,this.Jp=[],this.Gp=null,this.nm=null,this.$p=!1};function yg(t){switch(t.Qp){case"blob":var i;try{i=pg(t.Jp[0],null)}catch(t){return ig}return yg(i);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,i,e){return t+"://"+L_(i)+(null===e?"":":"+e)}(t.Qp,t.Zp,t.im);default:return ig}}var Ag=function(){function t(t,i){var e,s=null;if(null!=i)if(function(t){return null!=t&&t instanceof Ag&&"object"==typeof t.rc}(i))s=i.rc;else try{s=pg(String(i),null)}catch(t){throw new g("Invalid base URL: "+t.message)}try{e=pg(String(t),s)}catch(t){throw new g("Invalid URL: "+t.message)}var n=e.Gp;this.rc=e,this.Gp=function(t){var i=new wr;return null!==t&&Q_(i,t),i}(n),this.Gp.rc=this}var i=t.prototype;return i.toString=function(){return this.href},i.toJSON=function(){return this.href},function(t,i,e){i&&Iv(t.prototype,i),e&&Iv(t,e)}(t,[{key:"href",get:function(){return function(t,i){void 0===i&&(i=!1);var e=t.Qp+":";if(null!==t.Zp?(e+="//",og(t)&&(e+=t.Kp,""!==t.Yp&&(e+=":"+t.Yp),e+="@"),e+=L_(t.Zp),null!==t.im&&(e+=":"+t.im)):null===t.Zp&&"file"===t.Qp&&(e+="//"),t.$p)e+=t.Jp[0];else for(var s=0,n=t.Jp;s1?i-1:0),s=1;sself.performance.now():this.Mg=ku}},kg=class{get Lm(){return od.oscpu}get Zs(){return od.platform}get Om(){return od.vendor}get Fm(){return od.vendorSub}};function Eg(){if(self.URL)try{const t=new self.URL("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href}catch(t){}return!1}function Mo(){return Mo=w.assign||function(t){for(var i=1;ii.push(t)),i}r(),r(),r();var Rg="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,Cg=Rg||function(){class t{next(){const t=this.index;return ti)}values(){return new t(this.data,(t,i)=>t[i])}entries(){return new t(this.data,(t,i)=>[i,t[i]])}forEach(t){for(const i in this.data)t(this.data[i],i)}constructor(){this.data=Pg(),this.size=0}}}();var Dg=Rg||function(){class t{next(){const t=this.Vm.next();return t.done?t:{value:this.Hm(t.value),done:!1}}constructor(t,i){this.Vm=void 0,this.Hm=void 0,this.Vm=t,this.Hm=i}}return class{get size(){return this.Wm.size}get(t){return this.Wm.get(""+t)}set(t,i){return this.Wm.set(""+t,i),this}has(t){return this.Wm.has(""+t)}delete(t){return this.Wm.delete(""+t)}clear(){this.Wm.clear()}keys(){return new t(this.Wm.keys(),t=>Number(t))}values(){return this.Wm.values()}entries(){return new t(this.Wm.entries(),t=>{let[i,e]=t;return[Number(i),e]})}forEach(t){this.Wm.forEach((i,e)=>{t(i,Number(e))})}constructor(){this.Wm=qh()}}}();r(),r();var Bg=function(t){return t.qm="9a04f079-9840-4286-ab92-e65be0885f95",t.zm="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",t.Gm="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",t.Xm="e2719d58-a985-b3c9-781a-b030af78d30e",t.jm="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",t}({}),Ng="urn:mpeg:dash:mp4protection:2011",Mg="cenc",Lg="sinf",Og="skd",Fg="keyids",Ug="9a04f079-9840-4286-ab92-e65be0885f95",Vg="urn:uuid:"+Ug,Mu="com.microsoft.playready",Hg="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",Wg="urn:uuid:"+Hg,qg="com.widevine.alpha",zg="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",Gg="urn:uuid:"+zg,Xg="org.w3.clearkey",jg="e2719d58-a985-b3c9-781a-b030af78d30e",Qg="urn:uuid:"+jg,Kg="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",Qs="urn:uuid:"+Kg,Yg="com.apple.fps.1_0",Jg="identity";r();var an=function(t){return t.qm="playready",t.zm="widevine",t.jm="fairplay",t.Gm="clearkey",t.Xm="clearkey_dash_if",t.Qm="aes128",t}({}),Zg={Km:an.qm,Ym:Mu,Jm:"cenc",Zm:Ug,$m:Vg,iw:"PlayReady"},xi={Km:an.zm,Ym:qg,Jm:"cenc",Zm:Hg,$m:Wg,iw:"Widevine"},$g={Km:an.jm,Ym:Yg,Jm:"skd",Zm:Kg,$m:Qs,iw:"FairPlay"},tp={Km:an.jm,Ym:"com.apple.fps",Jm:"sinf",Zm:Kg,$m:Qs,iw:"FairPlay"},ip={Km:an.Gm,Ym:Xg,Jm:"cenc",Zm:zg,$m:Gg,iw:"ClearKey"},ep={Km:an.Xm,Ym:Xg,Jm:"keyids",Zm:jg,$m:Qg,iw:"ClearKey DASH-IF"},sp=[Zg,xi,$g,ip,ep],np=[Zg,xi,tp,ip,ep];function rp(t){return sp.filter(i=>i.$m===t.toLowerCase())}r();var fh="function"==typeof String.prototype.replaceAll?(t,i,e)=>t.replaceAll(i,e):(t,i,e)=>t.split(i).join(e);function Ho(t,i){return it(t)&&-1!==t.indexOf(i)}var Vh="function"==typeof String.prototype.startsWith?(t,i)=>it(t)&&t.startsWith(i):(t,i)=>it(t)&&t.substr(0,i.length)===i,Ju="function"==typeof String.prototype.endsWith?(t,i)=>it(t)&&t.endsWith(i):(t,i)=>it(t)&&t.substr(t.length-i.length,i.length)===i;function Ih(t,i){return t.length===i.length&&t.toUpperCase()===i.toUpperCase()}var hp="function"==typeof String.prototype.repeat?(t,i)=>t.repeat(i):(t,i)=>{let e=0|i;if(0===t.length||0===e)return"";let s=t,n="";for(;1&~e||(n+=s),e>>>=1,0!==e;)s+=s;return n},Na="function"==typeof String.prototype.padStart?(t,i,e)=>(void 0===e&&(e=" "),t.padStart(i,e)):(t,i,e)=>{void 0===e&&(e=" ");let s=e;const n=(0|i)-t.length;return n<=0?t:(n>s.length&&(s+=hp(s,n/s.length)),s.slice(0,n)+t)},op=(String.prototype.padEnd,16384),ap="function"==typeof String.fromCodePoint?t=>t.length<=op?String.fromCodePoint(...t):cp(t,String.fromCodePoint):t=>{const i=[];for(let e of t)e>65535&&(e-=65536,i.push(e>>>10&1023|55296),e=56320|1023&e),i.push(e);return up(i)};function up(t){return t.length<=op?String.fromCharCode(...t):cp(t,String.fromCharCode)}function cp(t,i){const e=[];for(let s=0;s"\\"+t)}var lp=Qt.u_&&Qt.d_>=42||Qt.W_&&Qt.z_>=38||Qt.N_||Qt.F_||Qt.Y_&&Qt.Z_>=29;function fp(t,i){return Ho(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[Mo({contentType:t},i?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Mo({contentType:t},i?{robustness:"SW_SECURE_CRYPTO"}:{})]}}function vp(){return void 0!==od&&"function"==typeof od.requestMediaKeySystemAccess}function _p(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest}var gp=class{Am(){return this.Tm(xi)}pm(){return this.Tm(ip)}ym(){return this.Tm(Zg)}wm(){return this.Tm($g)}Tm(t){const i=t.$m,e=this.ew.get(i);if(e)return e;const s=this.Sm(t,'video/mp4; codecs="avc1.42000a"');return this.ew.set(i,s),s}async Sm(t,i){try{return await this.hw.nw(t.Ym,[fp(i,!0)]),!0}catch(e){try{return await this.hw.nw(t.Ym,[fp(i,!1)]),!0}catch(t){return!1}}}_m(){return this.ow||(this.ow=this.aw()),this.ow}async aw(){return"https:"!==s.location.protocol&&(!!lp&&!await this.pm())}constructor(t){this.hw=void 0,this.ew=qh(),this.ow=void 0,this.hw=t}};function pp(t,i,e){if("function"==typeof e)e.call(t,i);else for(const s of e)s.call(t,i)}r(),r(),r(),r(),r(),r();var Ne=class{wn(t,i){if("function"==typeof i)if("string"==typeof t)this.uw(t,i);else for(const e of t)this.uw(e,i)}uw(t,i){const e=this.cw[t];void 0===e?this.cw[t]=i:"function"==typeof e?this.cw[t]=[e,i]:0===this.dw?e.push(i):this.cw[t]=e.concat(i)}lw(t){if("function"!=typeof t)return;const i=this.fw;void 0===i?this.fw=t:"function"==typeof i?this.fw=[i,t]:0===this.dw?i.push(t):this.fw=i.concat(t)}Vo(){this.cw=Pg(),this.fw=void 0}So(t){this.dw++;const i=this.cw[t.type],e=this.fw;void 0!==i&&pp(this._w,t,i),void 0!==e&&pp(this._w,t,e),this.dw--}mn(t,i){if("function"==typeof i)if("string"==typeof t)this.gw(t,i);else for(const e of t)this.gw(e,i)}gw(t,i){const e=this.cw[t];void 0!==e&&("function"==typeof e?e===i&&(this.cw[t]=void 0):0===this.dw?oi(e,i):this.cw[t]=uf(e,i))}pw(t){if("string"==typeof t)this.cw[t]=void 0;else for(const i of t)this.cw[i]=void 0}mw(t){const i=this.fw;void 0!==i&&("function"==typeof i?i===t&&(this.fw=void 0):0===this.dw?oi(i,t):this.fw=uf(i,t))}ww(t,i){return new Promise((e,s)=>{if(i&&i.Hg)return s(new dt);const n=t=>{h(),e(t)},r=()=>{h(),s(new dt)},h=()=>{this.mn(t,n),i&&i.jg(r)};this.wn(t,n),i&&i.Xg(r)})}constructor(t){this.cw=Pg(),this.fw=void 0,this.dw=0,this._w=void 0,this.Rs=t=>{this.So(t)},this._w=null!=t?t:this}},mp=class extends Ne{So(t){ct(()=>{super.So(t)})}},_o=class extends Ne{lw(t){super.lw(t)}mw(t){super.mw(t)}};r(),r();var wp=class{constructor(t,i=new Date){this.type=void 0,this.date=void 0,this.type=t,this.date=i}};r();var d=function(t){return t.yw="Aw",t.Sw="Tw",t.Ew="contentprotectionerror",t.Pw="contentprotectionsuccess",t.xw="currentsourcechange",t.Iw="destroy",t.Rw="durationchange",t.Cw="emptied",t.Dw="encrypted",t.Bw="ended",t.Nw="Mw",t.Lw="Ow",t.Fw="Uw",t.Vw="Hw",t.Ww="loadstart",t.qw="manifestupdate",t.zw="nosupportedrepresentationfound",t.Gw="offline",t.Xw="online",t.jw="pause",t.uo="play",t.Qw="progress",t.Kw="ratechange",t.Yw="representationchange",t.Jw="resize",t.Zw="seeked",t.$w="seeking",t.iy="segmentnotfound",t.ey="sy",t.oy="uy",t.ly="vy",t.do="sourcechange",t._y="timeupdate",t.gy="volumechange",t.py="wy",t.yy="Ay",t.LICENSE_REQUEST_GENERATED="by",t.Sy="metricschange",t}({}),yp=["cenc"],Ap=["cbcs","cbcs-1-9"],cr=class extends wp{constructor(t){super(d.yy),this.Ty=void 0,this.Ty=t}},bp=class extends wp{constructor(t){super(d.LICENSE_REQUEST_GENERATED),this.Ey=void 0,this.Ey=t}},Bh=class extends wp{constructor(t,i,e,s){super("Py"),this.xy=void 0,this.Iy=void 0,this.Py=void 0,this.Ry=void 0,this.xy=t,this.Iy=i,this.Py=e,this.Ry=s}},Sp=class extends wp{constructor(){super("lt")}},_r=function(t){return t.Dw="Cy",t.Dy="By",t}({}),Tp=class extends wp{constructor(t,i){super("Cy"),this.Jm=void 0,this.Ey=void 0,this.Jm=t,this.Ey=i}},kp=class extends wp{constructor(){super("By")}};r(),r(),r();var dr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Ep=/[\t\n\f\r ]/g;function Pp(t){return 43===t?62:47===t?63:t>=48&&t<=57?t-48+52:t>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:xp()}function xp(){throw new m("Invalid base64 input")}function _c(t){let i=t;Ep.test(i)&&(i=i.replace(Ep,""));let e=i.length;e%4==0&&e>=1&&"="===i[e-1]&&(e>=2&&"="===i[e-2]?e-=2:e-=1,i=i.substr(0,e));const s=e%4;if(1===s)return xp();const n=0===s?0:4-s,r=new j(function(t,i){return 3*(t+i)/4-i}(e,n)),h=n>0?e-4:e;let o,a=0,u=0;for(;a>16&255,r[u++]=o>>8&255,r[u++]=255&o;return 2===n?(o=Pp(i.charCodeAt(a))<<2|Pp(i.charCodeAt(a+1))>>4,r[u++]=255&o):1===n&&(o=Pp(i.charCodeAt(a))<<10|Pp(i.charCodeAt(a+1))<<4|Pp(i.charCodeAt(a+2))>>2,r[u++]=o>>8&255,r[u++]=255&o),r}function Ip(t,i,e){return dr[t>>2]+dr[(3&t)<<4|i>>4]+dr[(15&i)<<2|e>>6]+dr[63&e]}function Rp(t,i,e){const s=[];for(let n=i;n>2]+dr[(3&e)<<4]+"==")}else if(2===e){const e=t[i-2],n=t[i-1];s.push(dr[e>>2]+dr[(3&e)<<4|n>>4]+dr[(15&n)<<2]+"=")}return s.join("")}function Cp(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/[=]/g,"")}function pu(t,i){const e=i.ac,s=t.getUint8(e>>3),n=1<<7-(7&e);return i.Ny(1),(s&n)===n?1:0}function vs(t,i,e){let s=0;for(let n=0;n>16;return e&&(i-=16,t=e),e=t>>8,e&&(i-=8,t=e),e=t>>4,e&&(i-=4,t=e),e=t>>2,e&&(i-=2,t=e),e=t>>1,e?i-2:i-t};function Np(t){if(t>=55296&&t<=57343)throw new m("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Mp(t,i){return t>>i&63|128}function Lp(t,i){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(i.push(t>>18&7|240),i.push(Mp(t,12)),i.push(Mp(t,6))):(Np(t),i.push(t>>12&15|224),i.push(Mp(t,6))):i.push(t>>6&31|192),i.push(63&t|128)):i.push(t)}function Op(t,i){if(i.ac>=t.length)throw new m("Invalid byte index");const e=255&t[i.ac];if(i.Ny(1),128==(192&e))return 63&e;throw new m("Invalid continuation byte")}function Fp(t,i){const e=i.ac;if(e>t.length)throw new m("Invalid byte index");if(e===t.length)return!1;const s=255&t[e];if(i.Ny(1),!(128&s))return s;if(192==(224&s)){const e=(31&s)<<6|Op(t,i);if(e>=128)return e;throw new m("Invalid continuation byte")}if(224==(240&s)){const e=(15&s)<<12|Op(t,i)<<6|Op(t,i);if(e>=2048)return Np(e),e;throw new m("Invalid continuation byte")}if(240==(248&s)){const e=(7&s)<<18|Op(t,i)<<12|Op(t,i)<<6|Op(t,i);if(e>=65536&&e<=1114111)return e}throw new m("Invalid UTF-8 detected")}r(),r();var Up=[128,64,32,16,8,4,2,1],Vp=class{Oy(t){return Hp(this.Fy,t)}constructor(t){this.Fy=void 0,this.Fy=t}};function Hp(t,i){return(t&i)===i}function Lt(t,i){return Hp(t,Up[i])}function ua(t,i){const e=t.getUint8(i.ac);return i.Ny(1),e}function Wp(t,i,e){t.setUint8(i.ac,e),i.Ny(1)}function T(t,i,e){const s=ao(ta(t),i.ac,i.ac+e);return i.Ny(s.byteLength),s}function qp(t,i,e){ta(t).set(ta(e),i.ac),i.Ny(e.byteLength)}function zp(t,i,e){return i.ac+e<=t.byteLength}function Gp(t,i,e,s){return void 0===s&&(s=!1),s?function(t,i,e){let s=0,n=1;for(let r=0;r=55296&&n<=56319&&et&&pi(dm,Wd.call(t)));function lm(t,i){if(t===i)return!0;if(t.byteLength!==i.byteLength)return!1;return L(new j(t),new j(i))}function L(t,i){if(t===i)return!0;if(t.byteLength!==i.byteLength)return!1;if(t.buffer===i.buffer&&t.byteOffset===i.byteOffset)return!0;for(let e=0;et+i.byteLength,0);return _m(t,i)}function _m(t,i){const e=new j(i);let s=0;for(const i of t)e.set(i,s),s+=i.byteLength;return e}function gm(t,i,e){const s=new j(t.byteLength+i.byteLength),n=ao(t,0,e),r=ao(t,e);return s.set(n),s.set(i,e),s.set(r,e+i.byteLength),s}function wu(t){return _c(t).buffer}function pm(t){return Go(new j(t))}function wc(t){return Go(vc(t))}var Cc=new j([0]).buffer,mm=class{get Vy(){return this.nc.length}Hy(t){for(const i of this.nc)if(fm(i[0],t))return!0;return!1}Wy(t){for(const i of this.nc)if(fm(i[0],t))return i[1]}qy(t,i){for(const e of this.nc)if(fm(e[0],t))return void(e[1]=i);this.nc.push([t,i])}zy(t,i){this.nc.forEach(i=>t(i[1],i[0]),i)}Gy(){Yo(this.nc)}constructor(){this.nc=void 0,this.nc=[]}};r();var pa=class{Xy(t){this.Qd&&(this.Qd(t),this.zg())}jy(t){this.Kd&&(this.Kd(t),this.zg())}Zg(){this.Qy.catch(Ct),this.jy(new dt)}$g(t){t.then(t=>this.Xy(t),t=>this.jy(t))}zg(){this.Qd=void 0,this.Kd=void 0}constructor(){this.Qy=void 0,this.Qd=void 0,this.Kd=void 0,this.Qy=new Promise((t,i)=>{this.Qd=t,this.Kd=i})}};function wm(){return new j([8,4]).buffer}function ym(t,i){return t===Mu?function(t){if(t.byteLength<2*Am.length)return t;const i=new DataView(t,0,2*Am.length),e=sm(i,!0);if(e===Am)return t;return function(t){const i='',e='Content-Typetext/xml; charset=utf-8SOAPAction"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"',s=""+i+pm(t)+e;return nm(s,!0).buffer}(t)}(i):i}r();var Am=">8-this.Zy;return(s<0?1:0}},w.defineProperty(t.prototype,"bitLength",{get:function(){return this.Jy.bitLength-this.Zy},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"length",{get:function(){return this.Jy.length},enumerable:!1,configurable:!0})}();r(),r();_.pow(2,-52);function Tm(t,i,e){return _.min(_.max(t,i),e)}function km(t,i){return t>>8-i}function Em(t,i){return t&(1<7&&(this.tA++,this.iA=0)},t.prototype.seek=function(t,i){this.tA=t,this.iA=i},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new m("Cannot read past end of buffer.");return this.$y.get(this.tA)>>7-this.iA&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new m("Cannot read past end of buffer.");if(0===this.iA)return this.$y.get(this.tA++);var t=Em(this.$y.get(this.tA),8-this.iA),i=km(this.$y.get(this.tA+1),this.iA);return this.tA++,t<32)throw new m("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new m("Cannot read past end of buffer.");var i=0;if(0===this.iA&&t%8==0)for(var e=t-8;e>=0;e-=8)i|=this.readByte()<=0;e--)i|=this.readBit()<32)throw new m("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new m("Cannot read past end of buffer.");var i=this.readUInt(t);return 0===(i&1<>3,this.iA=7&i},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new m("Cannot read past end of buffer.");for(var i=[],e=0;ei?1:S(t)?S(i)?0:1:-1},ah=function(){function t(){this.eA=[],this.sA=[],this.nA=0}return t.from=function(){for(var i=[],e=0;e=this.length)){var i=this.findContainingBufferIndex(t),e=t-this.sA[i];return this.eA[i][e]}},w.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.eA.length<1)return-1;if(this.eA.length>1){var i=this.join();this.clear(),this.pushRange(i)}var e=this.eA[0];return"number"==typeof t?Sm(e,t):"undefined"!=typeof Buffer?Buffer.from(e.buffer,e.byteOffset,e.byteLength).indexOf(t):function(t,i){if(0===i.length)return 0;for(var e=i[0],s=i.length,n=t.length-s,r=0;r<=n&&!((r=Sm(t,e,r))<0||r>n);r++){for(var h=r+1,o=r+s,a=1;h4)throw new m("Expected byteLength to be between 0 and 4 but was "+i);if(t<0||t>this.length-i)throw new m("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-i)+")");if(1===i)return this.get(t);for(var e=0,s=0;sn)return new t;if(s===n)return new t;for(var r=new t,h=this.findContainingBufferIndex(s),o=this.eA[h],a=s,u=a-this.sA[h];a+o.length-u=0&&e>=0;){if(0!==s[n])break;if(0===n){if(0===e)return new t;e-=1,n=(s=this.eA[e]).length-1}else n-=1;i-=1}return this.slice(0,i+1)},t}(),xm=function(){function t(i){this.rA=i||t.BUFFER_CHUNK_SIZE,this.hA=!1,this.oA=new ah,this.$y=new j(this.rA),this.aA=0,this.uA=0,this.iA=7}return t.prototype.closeByte=function(){this.$y[this.aA++]=this.uA,this.aA>=this.rA&&this.closeBuffer(),this.uA=0,this.iA=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.aA&&(this.oA.pushRange(this.$y,0,this.aA),t&&(this.$y=new j(this.rA)),this.aA=0)},w.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.iA},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.hA)throw new m("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.hA=!0,this.oA},t.prototype.writeBit=function(t){if(this.hA)throw new m("Cannot write to a closed BitWriter.");this.uA|=t<32)throw new m("The max bitlength that can be provided is 32.");if(t>=_.pow(2,i))throw new m("Uint "+t+" cannot be represented in "+i+" bit(s).");if(this.isWritingStartBit&&i%8==0)for(var e=i-8;e>=0;e-=8)this.writeByte(t>>e&255);else for(e=i-1;e>=0;e--)this.writeBool((t&1<0)},t.prototype.writeInt=function(t,i){if(i>32)throw new m("The max bitlength that can be provided is 32.");if(_.abs(t)>=_.pow(2,i-1))throw new m("Signed integer "+t+" cannot be represented in "+i+" bit(s).");t<0?this.writeUInt(t+_.pow(2,i),i):this.writeUInt(t,i)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new m("Received a negative number.");for(var i=_.floor(_.log2(t+1))+1,e=0;e=t.LARGE_SIZE/8,n=16===this.boxType.length;i.writeUInt(s?1:e,32),i.writeString(n?"uuid":this.boxType),s&&(i.writeUInt(_.floor(e/t.LARGE_SIZE),32),i.writeUInt(e%t.LARGE_SIZE,32)),n&&i.writeString(this.boxType)},t.prototype.getSize=function(){var i=8+(this.boxType.length>4?16:0),e=this.getBoxContentSize()+i;return e>=t.LARGE_SIZE/8&&(e+=8),e},t.prototype.serialize=function(){var t=new Im;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=_.pow(2,32),t}();function ol(t,i){return t instanceof Wt?64===i:t<_.pow(2,i)}function ss(t,i){return _.round(t*_.pow(2,i))}function Rm(t,i){for(var e=0;e65535&&(n-=65536,i.push(n>>>10&1023|55296),n=56320|1023&n),i.push(n)}return Nm(i)}(s)}(t,i,!0)}function Wm(t,i,e){return void 0===i&&(i=0),void 0===e&&(e=t.byteLength),new j(t.buffer,t.byteOffset+i,e-i)}function qm(t,i,e){return void 0===i&&(i=0),void 0===e&&(e=t.byteLength),new DataView(t.buffer,t.byteOffset+i,e-i)}function zm(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Gm(t){return new j(t.buffer,t.byteOffset,t.byteLength)}var Xm=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new Dm(this.offset<<3)},t}();r();var jm=function(){function t(t,i){this.data=t,this.cursor=i}return t.prototype.nextUint8=function(){return Cr(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,i,e){void 0===e&&(e=!1);var s=t.getUint16(i.offset,e);return i.shift(2),s}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,i,e){void 0===e&&(e=!1);var s=t.getInt16(i.offset,e);return i.shift(2),s}(this.data,this.cursor)},t.prototype.nextUint32=function(){return xr(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,i,e){void 0===e&&(e=!1);var s=t.getInt32(i.offset,e);return i.shift(4),s}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,i,e){void 0===e&&(e=!1);var s=xr(t,i,e),n=xr(t,i,e),r=e?n:s,h=e?s:n;return Wt.fromBits(h,r,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Fm(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Lm(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,i,e){for(var s=[],n=0;nt.byteLength){var o=h;return i.seek(e),{complete:!1,neededOffset:o}}var a={type:n.type,offset:e,data:new jm(qm(t,e,h),new Xm(n.headerSize))};return i.seek(h),{complete:!0,box:a}}function ai(t){return{version:t>>24,flags:new Mm(16777215&t)}}function Km(t,i){var e,s,n,r;return 1===i?(e=t.nextUint64(),s=t.nextUint64(),n=t.nextUint32(),r=t.nextUint64()):(e=t.nextUint32(),s=t.nextUint32(),n=t.nextUint32(),r=t.nextUint32()),{creation:e,modification:s,scale:n,duration:r}}function Ym(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function Jm(t){var i=t.nextUint32Array(9);return{a:$t(i[0],16),b:$t(i[1],16),u:$t(i[2],30),c:$t(i[3],16),d:$t(i[4],16),v:$t(i[5],30),x:$t(i[6],16),y:$t(i[7],16),w:$t(i[8],30)}}function go(t){return new Cm(t.type,Wm(Gm(t.data.data),t.data.cursor.offset))}var Zm=function(t){function i(i,e,s,n){void 0===s&&(s=0),void 0===n&&(n=0);var r=t.call(this,"hdlr",s,n)||this;return r.name=e,r.handlerType=i,r}return $o(i,t),w.defineProperty(i.prototype,"handlerType",{get:function(){return this.dA},set:function(t){this.dA=t},enumerable:!1,configurable:!0}),i.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},i.prototype.getBoxContentSize=function(){var i,e;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(e=null===(i=this.name)||void 0===i?void 0:i.length)&&void 0!==e?e:0)+1},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(0,32),i.writer.writeString(this.handlerType),this.serializeReserved(i),this.name&&i.writer.writeString(this.name),i.writer.writeByte(0)},i}(je);function $m(t){var i=t.data,e=ai(i.nextUint32()),s=e.version,n=e.flags;i.skip(4);var r=i.nextChars(4);i.skip(12);var h=i.nextUTF8String();return new Zm(r,h,s,n.raw)}!function(t){function i(){return t.call(this,"mdir")||this}$o(i,t),i.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(Zm);r(),r(),r();var tw=function(){function t(t,i){void 0===i&&(i=!1),this.fixed28BitMode=i,this.tag=t}return t.prototype.encodeSize=function(t){for(var i=[];t>0;)i.length>0&&(i[i.length-1]+=128),i.push(t%128),t>>=7;if(this.fixed28BitMode)for(;i.length<4;)i.push(128);return i.reverse()},w.defineProperty(t.prototype,"tag",{get:function(){return this.lA},set:function(t){if(!ol(t,8))throw new m("Provided tag does not fit in 8 bits.");this.lA=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return this.getDescriptorSize()+1+this.encodeSize(this.getDescriptorSize()).length},t.prototype.serialize=function(t){t.writer.writeByte(this.tag);for(var i=0,e=this.encodeSize(this.getDescriptorSize());i0)throw new m("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,i),void 0!==this.explicitAuxInfoType&&(i.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),i.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),i.writer.writeByte(this.defaultSampleInfoSize),i.writer.writeUInt(this.sampleInfoSizes.length,32);for(var e=0,s=this.sampleInfoSizes;e1)throw new m("Provided balance does not fit in the allowed range [-1, 1].");if(!ol(ss(t,8),16))throw new m("Provided balance does not fit in 16 bits (fixed 8.8).");this.Ob=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(ss(this.balance,8),16),i.writer.writeUInt(0,16)}}(je);r();!function(t){function i(i){var e=t.call(this,"stss",0,0)||this;return e.entries=i,e}$o(i,t),w.defineProperty(i.prototype,"entries",{get:function(){return this.EA},set:function(t){if(!ol(t.length,32))throw new m("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!ol(t,32)}))throw new m("Not all entries can be represented in 32 bits.");this.EA=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.entries.length,32);for(var e=0,s=this.entries;e31)throw new m("The provided compressorName should at most be 31 characters long.");this.Hb=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"frameCount",{get:function(){return this.Wb},set:function(t){if(!ol(t,16))throw new m("Provided frameCount does not fit in 16 bits.");this.Wb=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"depth",{get:function(){return this.qb},set:function(t){if(!ol(t,16))throw new m("Provided depth does not fit in 16 bits.");this.qb=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){var i,e,s,n,r,h;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(e=null===(i=this.clap)||void 0===i?void 0:i.getSize())&&void 0!==e?e:0)+(null!==(n=null===(s=this.pasp)||void 0===s?void 0:s.getSize())&&void 0!==n?n:0)+(null!==(h=null===(r=this.extra)||void 0===r?void 0:r.length)&&void 0!==h?h:0)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(0,16),i.writer.writeUInt(0,16),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),i.writer.writeUInt(this.width,16),i.writer.writeUInt(this.height,16),i.writer.writeUInt(ss(this.horizontalResolution,16),32),i.writer.writeUInt(ss(this.verticalResolution,16),32),i.writer.writeUInt(0,32),i.writer.writeUInt(this.frameCount,16),i.writer.writeByte(this.compressorName.length),i.writer.writeString(this.compressorName);for(var e=0;e<31-this.compressorName.length;e++)i.writer.writeByte(0);i.writer.writeUInt(this.depth,16),i.writer.writeInt(-1,16),this.clap&&i.concat(this.clap.serialize()),this.pasp&&i.concat(this.pasp.serialize()),this.extra&&Rm(i.writer,this.extra)},i}(sw);r(),r();!function(t){function i(i){var e=t.call(this,"esds",0,0)||this;return e.esDescriptor=i,e}$o(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof j?this.esDescriptor.length:this.esDescriptor.getSize())},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor instanceof j?i.concat(ah.from(this.esDescriptor)):this.esDescriptor.serialize(i)}}(je);r();!function(t){function i(i,e,s){var n=t.call(this,"mp4a",i,s)||this;return n.esd=e,n}$o(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.concat(this.esd.serialize())}}(nw);r();!function(t){function i(i,e,s,n){void 0===n&&(n={});var r=t.call(this,"mp4v",i,e,n)||this;return r.esDescriptor=s,r}$o(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor.serialize(i)}}(wy);r();!function(t){function i(i,e){var s=t.call(this,"mp4s",i)||this;return s.esDescriptor=e,s}$o(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor.serialize(i)}}(sw);r(),r();!function(t){function i(i){var e=t.call(this,"avcC")||this;return e.decoderConfig=i,e}$o(i,t),i.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},i.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(Wh);r();!function(){function t(t,i,e,s,n,r){void 0===r&&(r=1),this.lengthSizeMinusOne=e,this.version=r,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=i,this.spsSets=s,this.ppsSets=n}w.defineProperty(t.prototype,"version",{get:function(){return this.zb},set:function(t){if(!ol(t,8))throw new m("Provided version does not fit in 8 bits.");this.zb=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"profileIndication",{get:function(){return this.Gb},set:function(t){if(!ol(t,8))throw new m("Provided profileIndication does not fit in 8 bits.");this.Gb=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.Xb},set:function(t){if(!ol(t,8))throw new m("Provided profileCompatibility does not fit in 8 bits.");this.Xb=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"levelIndication",{get:function(){return this.jb},set:function(t){if(!ol(t,8))throw new m("Provided levelIndication does not fit in 8 bits.");this.jb=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"spsSets",{get:function(){return this.Qb},set:function(t){if(!ol(t.length,5))throw new m("Provided number of spsSets exceeds the max (32)");this.Qb=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"ppsSets",{get:function(){return this.Kb},set:function(t){if(!ol(t.length,8))throw new m("Provided number of ppsSets exceeds the max (256)");this.Kb=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce(function(t,i){return t+i.length},0)+2*this.ppsSets.length+this.ppsSets.reduce(function(t,i){return t+i.length},0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var i=0,e=this.spsSets;i0&&(null!==(n=null===(s=e.constantIv)||void 0===s?void 0:s.length)&&void 0!==n?n:0)>0)throw new m("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return o.kId=e.kId,o.isProtected=null!==(r=e.isProtected)&&void 0!==r?r:1,e.perSampleIvSize>0?o.perSampleIvSize=e.perSampleIvSize:o.constantIv=null!==(h=e.constantIv)&&void 0!==h?h:new j(0),o}return $o(i,t),w.defineProperty(i.prototype,"isProtected",{get:function(){return this.Zb},set:function(t){if(!ol(t,8))throw new m("Provided isProtected does not fit in 1 byte.");this.Zb=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"perSampleIvSize",{get:function(){return this.$b},set:function(t){if(![8,16].includes(t))throw new m("Provided perSampleIvSize does not match any allowed value [8, 16].");this.$b=t,this.tS=new j(0)},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"kId",{get:function(){return this.iS},set:function(t){if(16!==t.length)throw new m("Provided kId length is not 16.");this.iS=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"constantIv",{get:function(){return this.tS},set:function(t){if(![8,16].includes(t.length))throw new m("Provided constant IV length does not match any allowed value [8, 16].");this.tS=t,this.$b=0},enumerable:!1,configurable:!0}),i.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},i.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.serializeOwnContent(i)},i.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),Rm(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),Rm(t.writer,this.constantIv))},i}(je),Ay=(function(t){function i(i){return t.call(this,0,i)||this}$o(i,t)}(yy),function(t){function i(i){var e=t.call(this,1,i)||this;return e.cryptByteBlocks=i.cryptByteBlock,e.skipByteBlocks=i.skipByteBlock,e}return $o(i,t),w.defineProperty(i.prototype,"cryptByteBlocks",{get:function(){return this.eS},set:function(t){if(!ol(t,4))throw new m("Provided cryptByteBlocks does not fit in 4 bits.");this.eS=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"skipByteBlocks",{get:function(){return this.sS},set:function(t){if(!ol(t,4))throw new m("Provided skipByteBlocks does not fit in 4 bits.");this.sS=t},enumerable:!1,configurable:!0}),i.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},i}(yy));!function(t){function i(i){var e=t.call(this)||this;return e.tencBox=new Ay(i),e}$o(i,t),i.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},i.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Cw);function by(t){return void 0!==t.iv}function Sy(t){return void 0!==t.subsamples}r();!function(t){function i(i){var e=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return e.samples=i,e}$o(i,t),w.defineProperty(i.prototype,"samples",{get:function(){return this.wb},set:function(t){var i;if(!ol(t.length,32))throw new m("The number of samples provided does not fit in 32 bits.");for(var e=0,s=t;e{this.pS(i,t)}),this.So(new cr(this.cS))}pS(t,i){if("string"==typeof t){const e=t;t=i,i=e}const e=wa(t);if(this.mS===Mu&&16===e.byteLength&&(Qt.v_||Qt.dg)){const t=dh(e),i=t.getUint32(0,!0),s=t.getUint16(4,!0),n=t.getUint16(6,!0);t.setUint32(0,i,!1),t.setUint16(4,s,!1),t.setUint16(6,n,!1)}this.mS===Mu&&"status-pending"===i&&(i="usable"),this.cS.qy(e,i)}constructor(t,i){super(),this.uS=void 0,this.mS=void 0,this.cS=void 0,this.lS=void 0,this.zd=void 0,this.fS=void 0,this.wS=void 0,this.yS=void 0,this.bS=void 0,this.uS=t,this.mS=i,this.lS=!1,this.wS=()=>{this.gS()},this.yS=t=>{this.So(new Bh(this,t.messageType,ym(this.mS,t.message)))},this.bS=()=>{this.lS=!0,this.cS.Vy>0&&(this.cS.Gy(),this.So(new cr(this.cS))),this.uS.removeEventListener("keystatuseschange",this.wS),this.uS.removeEventListener("message",this.yS)},this.uS.addEventListener("keystatuseschange",this.wS),this.uS.addEventListener("message",this.yS),this.cS=new mm;const e=[];this.uS.closed&&e.push(Promise.resolve(this.uS.closed)),this.fS=new pa,e.push(this.fS.Qy),this.zd=Promise.race(e).then(this.bS,this.bS),this.gS()}};function Dy(t){let i;if(t.message){const e=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);e&&(i=0|x(e[1],16))}throw new dn(t.message,void 0,i,t)}var By=class{async SS(t){return new Cy(this.TS.createSession(t),this.kS)}ES(t){return Promise.resolve(this.TS.setServerCertificate(t))}_n(t){return Promise.resolve(t.setMediaKeys(this.TS))}PS(t){return Promise.resolve(t.setMediaKeys(null))}hr(){return Promise.resolve()}constructor(t,i,e){this.TS=void 0,this.kS=void 0,this.Cd=void 0,this.TS=t,this.kS=i,this.Cd=e}},Ny=class{get kS(){return this.xS.keySystem}async IS(){const t=await this.xS.createMediaKeys();return new By(t,this.mS,this.RS)}CS(){return this.RS}constructor(t,i,e){this.xS=void 0,this.mS=void 0,this.RS=void 0,this.xS=t,this.mS=i,this.RS=e}};r(),r();var My="video/avc",Ly="video/hevc",Oy="video/mp4",Fy="video/mpeg",Uy="video/mpeg2",Vy="video/webm",Hy="video/x-unknown",Wy="audio/mp4",qy="audio/webm",zy="image/jpeg",Gy="application/ttml+xml",Xy="application/mp4",jy="text/vtt";function I(t){return Vh(t,"audio/")}function tt(t){return Vh(t,"video/")}function Hh(t){return Ho(t,Xy)||Ho(t,Oy)||Ho(t,Wy)}function Qy(t){return Ho(t,Vy)||Ho(t,qy)}var Ky=class{DS(t){for(const[i,e]of this.NS)if(i.toLowerCase()===t.toLowerCase())return e}constructor(t,i){this.Km=void 0,this.NS=void 0,this.Km=t,this.NS=i}};function Vc(t){const i=t.trim(),e=i.indexOf(";");if(e<0)return new Ky(i,[]);const s=i.substr(0,e).trim(),n=i.substr(e+1).trim(),r=[];let h=0,o=!1;for(let t=0;tBoolean(t.contentType));o.length&&(r.audioCapabilities=o.filter(s=>tA(t,i,e,s)),h=!0,r.audioCapabilities.length&&(n=!0))}if(s.videoCapabilities){const o=s.videoCapabilities.filter(t=>Boolean(t.contentType));o.length&&(r.videoCapabilities=o.filter(s=>tA(t,i,e,s)),h=!0,r.videoCapabilities.length&&(n=!0))}return h||(n=t(e,"video/mp4")),n?r:void 0}function tA(t,i,e,s){if(!s.contentType)return!1;if(s.encryptionScheme&&!pi(i,s.encryptionScheme))return!1;if(s.robustness)return!1;return t(e,Jy(s.contentType))}function iA(t){if(t.videoCapabilities)for(const i of t.videoCapabilities)if(i.contentType)return i.contentType;if(t.audioCapabilities)for(const i of t.audioCapabilities)if(i.contentType)return i.contentType}function eA(t){const i=[];for(const e of t)e.encryptionScheme&&i.push({contentType:e.contentType,robustness:e.robustness});return t.concat(i)}function sA(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(nA))||!(!t.videoCapabilities||!t.videoCapabilities.some(nA))}function nA(t){return!t.robustness}function rA(t,i){const e=[];for(const s of t)s.robustness?e.push(s):e.push(Mo({},s,{robustness:i}));return e}var hA=class{async nw(t,i){i=i.filter(t=>!t.MS);for(const t of i)t.audioCapabilities&&(t.audioCapabilities=eA(t.audioCapabilities)),t.videoCapabilities&&(t.videoCapabilities=eA(t.videoCapabilities));if(t===qg&&i.some(sA)){const e=i.map(t=>function(t,i){return Mo({},t,{videoCapabilities:t.videoCapabilities?rA(t.videoCapabilities,i):void 0,audioCapabilities:t.audioCapabilities?rA(t.audioCapabilities,i):void 0})}(t,"SW_SECURE_CRYPTO"));try{const i=await od.requestMediaKeySystemAccess(t,e),s=i.getConfiguration();return new Ny(i,t,s)}catch(t){}}const e=await od.requestMediaKeySystemAccess(t,i),s=e.getConfiguration();return new Ny(e,t,s)}static LS(){return vp()}};r(),r(),r(),r();var oA=class extends Ne{get dS(){return this.FS&&this.FS.sessionId||""}get aS(){return NaN}get oS(){return this.US.Qy}get Ty(){return this.VS}async vS(t,i,e){this.HS(),this.WS=new pa,this.SS(wa(i),e),await this.WS.Qy}SS(t,i){if(!t)throw new g("Expected initData to be defined but was "+t+".");const e=i&&i.playready&&i.playready.qS;let s;return s=i?this.zS.createSession(this.GS,t,e):this.zS.createSession(this.GS,t),s.addEventListener("mskeyclose",this.bS),s.addEventListener("mskeymessage",this.XS),s.addEventListener("mskeyerror",this.Ts),s.addEventListener("mskeyadded",this.jS),this.FS=s,this.QS("status-pending"),s}async Un(t){return this.HS(),!0}async er(t){if(this.KS=new pa,this.HS(),!this.FS)return Promise.resolve();const i=wa(t);if(0===i.byteLength)throw new g("Cannot call update with an empty response.");this.FS.update(i),await this.KS.Qy}Xs(){return!this.lS&&this.FS&&(this.lS=!0,this.FS.close()),this.US.Qy}async _S(){this.HS()}HS(){if(this.lS)throw new g("Already closing or closed.")}QS(t){this.VS.Gy(),this.VS.qy(Cc,t),this.So(new cr(this.VS))}constructor(t,i){super(),this.zS=void 0,this.GS=void 0,this.lS=void 0,this.US=void 0,this.KS=void 0,this.WS=void 0,this.VS=void 0,this.FS=void 0,this.bS=void 0,this.XS=void 0,this.Ts=void 0,this.jS=void 0,this.zS=t,this.GS=i,this.lS=!1,this.KS=void 0,this.WS=void 0,this.FS=void 0,this.bS=()=>{this.lS=!0,this.US.Xy(void 0),this.FS&&(this.FS.removeEventListener("mskeyclose",this.bS),this.FS.removeEventListener("mskeymessage",this.XS),this.FS.removeEventListener("mskeyerror",this.Ts),this.FS.removeEventListener("mskeyadded",this.jS))},this.XS=t=>{this.WS&&(this.WS.Xy(void 0),this.WS=void 0),this.So(new Bh(this,"license-request",Gu(t.message).buffer,t.destinationURL||void 0))},this.Ts=()=>{const t=this.FS&&this.FS.error;if(!t)return;const i=new dn("Unknown CDM error",t.code,t.systemCode);if(this.WS)this.WS.jy(i),this.WS=void 0;else if(this.KS)this.KS.jy(i),this.KS=void 0;else switch(i.Ky){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:this.QS("output-not-allowed");break;default:this.QS("internal-error")}},this.jS=()=>{this.WS&&(this.QS("usable"),this.WS.Xy(void 0),this.WS=void 0),this.KS&&(this.QS("usable"),this.KS.Xy(void 0),this.KS=void 0)},this.US=new pa,this.VS=new mm}},aA=class{async SS(t){return new oA(this.zS,this.GS)}ES(t){return Promise.resolve(!1)}_n(t){const i=()=>{t.msSetMediaKeys(this.zS),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.zS):t.addEventListener("loadedmetadata",i),Promise.resolve()}PS(t){return Promise.resolve()}hr(){return Promise.resolve()}constructor(t,i,e){this.zS=void 0,this.kS=void 0,this.Cd=void 0,this.GS=void 0,this.zS=t,this.kS=i,this.Cd=e;const s=iA(e)||"video/mp4";this.GS=Jy(s)}},uA=class{get kS(){return this.mS}CS(){return this.YS}IS(){const t=new s.MSMediaKeys(this.mS);return Promise.resolve(new aA(t,this.mS,this.YS))}constructor(t,i){this.mS=void 0,this.YS=void 0,this.mS=t,this.YS=i}},cA=class{nw(t,i){try{return Promise.resolve(function(t,i){if(!dA())throw new g("Unsupported key system "+t);for(const e of i){const i=$y(lA,yp,t,e);if(i)return new uA(t,i)}throw new g("Unsupported key system configuration for "+t)}(t,i))}catch(t){return Promise.reject(t)}}static LS(){return dA()}};function dA(){return void 0!==s.MSMediaKeys&&"function"==typeof s.MSMediaKeys.isTypeSupported}function lA(t,i){return s.MSMediaKeys.isTypeSupported(t,i)}r(),r(),r(),r();var fA=class extends Ne{get dS(){return this.JS?this.JS.sessionId:""}get aS(){return NaN}get oS(){return this.US.Qy}get Ty(){return this.VS}vS(t,i,e){const s=e&&e.fairplay&&e.fairplay.ZS;if(!s)throw new g("Expected FairPlay contentId to be defined but was "+s+".");const n=function(t,i,e){const s=pc(t),n=2*s.length,r=2*i.length,h=new ArrayBuffer(4+n+4+r+4+e.byteLength),o=new DataView(h),a=new Ui;return di(o,a,n,!0),em(o,a,s,!0),di(o,a,r,!0),em(o,a,i,!0),di(o,a,e.byteLength,!0),qp(o,a,e),new j(h)}(wa(i),s,this.$S);return this.JS=this.tT.createSession(this.GS,n),this.JS.addEventListener("webkitkeymessage",this.XS,!1),this.JS.addEventListener("webkitkeyadded",this.jS,!1),this.JS.addEventListener("webkitkeyerror",this.Ts,!1),this.QS("status-pending"),this.iT.Xy(this.JS),this.iT=new pa,Promise.resolve()}Un(t){return Promise.resolve(!0)}async er(t){const i=wa(t);if(0===i.byteLength)throw new g("Cannot call update with an empty response.");this.eT=new pa;(this.JS||await this.iT.Qy).update(i),await this.eT.Qy}Xs(){var t;const i=this.JS;return i&&(i.removeEventListener("webkitkeymessage",this.XS,!1),i.removeEventListener("webkitkeyadded",this.jS,!1),i.removeEventListener("webkitkeyerror",this.Ts,!1),i.close()),this.iT.Zg(),null==(t=this.eT)||t.Zg(),this.US.Xy(void 0),this.US.Qy}_S(){return Promise.resolve(void 0)}QS(t){this.VS.Gy(),this.VS.qy(Cc,t),this.So(new cr(this.VS))}constructor(t,i,e){super(),this.tT=void 0,this.GS=void 0,this.$S=void 0,this.US=void 0,this.eT=void 0,this.VS=void 0,this.JS=void 0,this.iT=void 0,this.Ts=void 0,this.XS=void 0,this.jS=void 0,this.tT=t,this.GS=i,this.$S=e,this.US=new pa,this.eT=void 0,this.VS=new mm,this.JS=void 0,this.iT=new pa,this.Ts=()=>{const t=this.JS&&this.JS.error;if(!t)return;const i=new dn("Unknown CDM error",t.code,t.systemCode);this.eT?(this.eT.jy(i),this.eT=void 0):i.Ky===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.QS("output-not-allowed"):this.QS("internal-error"),this.So(new Sp)},this.XS=t=>{this.So(new Bh(this,"license-request",Gu(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},this.jS=()=>{this.eT&&(this.eT.Xy(void 0),this.eT=void 0),this.QS("usable")}}};r();var Ga=class extends R{get name(){return"THEOplayerError"}get category(){return Je.fromCode(this.code)}constructor(t,i,e){super(i,e),this.code=void 0,this.code=t}};function vA(t,i){return t instanceof Ga?t:t instanceof m?new Ga(i,t.message,t):new Ga(i,String(t))}var _A=class{getInternalMediaKeys(){return this.tT}async SS(t){if(!this.$S)throw new Ga(Vo.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return new fA(this.tT,this.GS,this.$S)}ES(t){return this.$S=wa(t),Promise.resolve(!0)}_n(t){return t.webkitSetMediaKeys(this.tT),Promise.resolve()}PS(t){return t.webkitSetMediaKeys(null),Promise.resolve()}hr(){return Promise.resolve()}constructor(t,i,e){this.tT=void 0,this.kS=void 0,this.Cd=void 0,this.GS=void 0,this.$S=void 0,this.tT=t,this.kS=i,this.Cd=e,this.$S=void 0;const s=iA(e)||"video/mp4";this.GS=Jy(s)}},gA=class{get kS(){return this.mS}CS(){return this.YS}IS(){const t=new s.WebKitMediaKeys(this.mS);return Promise.resolve(new _A(t,this.mS,this.YS))}constructor(t,i){this.mS=void 0,this.YS=void 0,this.mS=t,this.YS=i}},pA=class{nw(t,i){try{return Promise.resolve(function(t,i){if(t!==Yg)throw new g(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!mA())throw new g("Unsupported key system "+t);for(const e of i){const i=$y(wA,Ap,t,e);if(i)return new gA(t,i)}throw new g("Unsupported key system configuration for "+t)}(t,i))}catch(t){return Promise.reject(t)}}static LS(){return mA()}};function mA(){return void 0!==s.WebKitMediaKeys&&"function"==typeof s.WebKitMediaKeys.isTypeSupported}function wA(t,i){return s.WebKitMediaKeys.isTypeSupported(t,i)}r();var yA=class{async nw(t,i){for(const e of this.sT)try{return await e.nw(t,i)}catch(t){}throw new g("Unsupported key system configuration for "+t)}constructor(t){this.sT=void 0,this.sT=t}};r(),r(),r(),r(),r();var te=class{Zo(t,i){return new Promise(e=>{const s=at.ep([this.nT.Yg,i]),n=()=>{s.zg()};this.rT.push(()=>{const i=AA(t,s.Yg);return e(i),i.then(n,n)}),this.hT||(this.hT=this.oT())})}Zg(){return this.aT(!0)}kn(){return this.uT=void 0,this.aT(!1)}aT(t){const i=this.hT;return this.nT.Zg(),t&&(this.nT=new at),Promise.resolve(i)}constructor(t){this.rT=[],this.hT=void 0,this.nT=new at,this.uT=void 0,this.oT=()=>{if(0===this.rT.length)return this.uT?AA(this.uT,this.nT.Yg).then(this.cT,this.cT):this.cT();return this.rT.shift()().then(this.oT)},this.cT=()=>{if(0!==this.rT.length)return this.oT();this.hT=void 0},this.uT=t}};function AA(t,i){return new Promise(e=>e(t(i)))}var bA=new te,SA=class extends Ne{dT(){this.eT&&(this.QS("usable"),this.eT.Xy(void 0),this.eT=void 0)}lT(t){const i=new dn("Unknown CDM error",t.errorCode,t.systemCode);this.eT?(this.eT.jy(i),this.eT=void 0):this.WS?(this.WS.jy(i),this.WS=void 0):i.Ky===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.QS("output-restricted"):1===i.Yy?this.QS("expired"):this.QS("internal-error")}fT(t){0!==t.message.byteLength?(this.WS&&(this.WS.Xy(void 0),this.WS=void 0),this.So(new Bh(this,"license-request",ym(this.mS,Gu(t.message).buffer),t.defaultURL||void 0))):this.WS&&(this.WS.jy("Empty key message"),this.WS=void 0)}vT(t){this._T||(this._T=t,this.gT.Xy(t))}get Ty(){return this.pT}get dS(){return this.mT}set dS(t){this.mT=t}get oS(){return this.US.Qy}get aS(){return NaN}async Xs(){this.throwIfClosed(),this.eT&&(this.eT.jy(void 0),this.eT=void 0),this.hA=!0,this.US.Xy(void 0)}async vS(t,i){this.throwIfClosed(),this.WS=new pa,this.wT=wa(i);(this._T||await this.gT.Qy).webkitGenerateKeyRequest(this.mS,this.wT),await this.WS.Qy}async Un(t){return this.throwIfClosed(),!1}async _S(){this.throwIfClosed()}async er(t){if(this.throwIfClosed(),this.eT=new pa,Qt.S_||Qt.w_)return bA.Zo(async()=>{await this.doUpdate(t)});await this.doUpdate(t)}async doUpdate(t){if(void 0===this.eT)return;(this._T||await this.gT.Qy).webkitAddKey(this.mS,wa(t),this.wT,this.dS),await this.eT.Qy,Qt.w_&&await Er(500)}throwIfClosed(){if(this.hA)throw new g("Already closing or closed.")}QS(t){this.pT.Gy(),this.pT.qy(Cc,t),this.So(new cr(this.pT))}async yT(){const t=this._T||await this.gT.Qy;if(t.webkitCancelKeyRequest)try{t.webkitCancelKeyRequest(this.mS,this.mT)}catch(t){}finally{await Er(500)}}constructor(t){super(),this.mS=void 0,this.WS=void 0,this.eT=void 0,this.US=void 0,this.hA=void 0,this.wT=void 0,this.mT=void 0,this.pT=void 0,this._T=void 0,this.gT=void 0,this.mS=t,this.WS=void 0,this.eT=void 0,this.hA=!1,this.wT=void 0,this._T=void 0,this.US=new pa,this.mT="",this.gT=new pa,this.pT=new mm}},TA=class{_n(t){return this._T=t,this._T.addEventListener("webkitkeyadded",this.jS),this._T.addEventListener("webkitkeyerror",this.AT),this._T.addEventListener("webkitkeymessage",this.bT),this.ST.forEach((i,e)=>i.vT(t)),this.TT.forEach(i=>i.vT(t)),Promise.resolve()}PS(t){return t.removeEventListener("webkitkeyadded",this.jS),t.removeEventListener("webkitkeyerror",this.AT),t.removeEventListener("webkitkeymessage",this.bT),this._T=void 0,Promise.resolve()}async hr(){const t=this.ST.entries();let i=t.next();for(;!i.done;)await i.value[1].yT(),i=t.next();this.ST.clear()}async SS(t,i,e){const s=new SA(this.kS);return this._T&&s.vT(this._T),this.TT.push(s),s}ES(t){return Promise.resolve(!1)}kT(t){if(!t)return;let i=this.ST.get(t);return i||(i=this.TT.shift(),i?(i.dS=t,this.ST.set(t,i),i):void 0)}constructor(t,i){this.kS=void 0,this.Cd=void 0,this._T=void 0,this.ST=void 0,this.TT=void 0,this.jS=void 0,this.AT=void 0,this.bT=void 0,this.kS=t,this.Cd=i,this._T=void 0,this.ST=qh(),this.TT=[],this.jS=t=>{const i=this.kT(t.sessionId);i&&i.dT()},this.AT=t=>{const i=this.kT(t.sessionId);i&&i.lT(t)},this.bT=t=>{const i=this.kT(t.sessionId);i&&i.fT(t)}}},kA=class{IS(){return Promise.resolve(new TA(this.kS,this.ET))}CS(){return this.ET}constructor(t,i){this.kS=void 0,this.ET=void 0,this.kS=t,this.ET=i}},EA=class{nw(t,i){try{return Promise.resolve(function(t,i){if(!EA.LS())throw new g("Unsupported key system "+t);for(const e of i){const i=$y(PA,yp,t,e);if(i)return new kA(t,i)}throw new g("Unsupported key system configuration for "+t)}(t,i))}catch(t){return Promise.reject(t)}}static LS(){return _p()}};function PA(t,i){const e=gr();return Boolean(e&&e.canPlayType&&""!==e.canPlayType(i,t))}r();var xA,IA=class{nw(t,i){return t===qg||t===Mu?Promise.resolve(void 0):Promise.reject(new m("DRM configuration not supported"))}};function RA(){return xA||(xA=function(){const t=[];pA.LS()&&t.push(new pA);hA.LS()&&t.push(new hA);cA.LS()&&t.push(new cA);EA.LS()&&t.push(new EA);Qt.k_&&t.push(new IA);return new yA(t)}()),xA}r(),r();var CA=class{Gy(t){this.PT.delete(t)}xT(){this.PT.clear()}Wy(t){return this.PT.get(t)}qy(t,i){this.PT.set(t,i)}constructor(){this.PT=qh()}},DA=class t{static IT(){return t.Ng||(t.Ng=BA.LS()?new BA:new CA),t.Ng}static Gy(i){t.IT().Gy(i)}static xT(){t.IT().xT()}static Wy(i){return t.IT().Wy(i)}static qy(i,e){t.IT().qy(i,e)}};DA.Ng=void 0;var BA=class extends DA{static LS(){const t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}}Gy(t){self.sessionStorage.removeItem(t)}xT(){self.sessionStorage.clear()}Wy(t){var i;return null!=(i=self.sessionStorage.getItem(t))?i:void 0}qy(t,i){self.sessionStorage.setItem(t,i)}};r(),r();var NA=(()=>{const t=self.Blob;if(t)try{new t;return function(t){return(i,e)=>new t(i,e)}(t)}catch(t){}const i=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(i)return function(t){return(i,e)=>{const s=new t;if(i)for(const t of i)s.append(t);return s.getBlob(e&&e.type||"")}}(i)})();function MA(t,i,e){const s=NA([i],{type:"application/octet-stream"}),n=URL.createObjectURL(s),r=function(t,i){let e=t;const s=e.indexOf("?");if(s>=0&&(e=e.substr(0,s)),e=e.substr(e.lastIndexOf("/")+1),i){let t=e.indexOf(".");t<0&&(t=e.length),e=e.substr(0,t)+i+e.substr(t)}return e}(t,e),o=h.createElement("a");o.href=n,o.download=r,h.body.appendChild(o),o.click(),h.body.removeChild(o),URL.revokeObjectURL(n)}r();var LA="default";r(),r(),r(),r();var M=function(t){return t.CT="arraybuffer",t.DT="json",t.BT="stream",t.NT="text",t}({});r();var Ra=class t{append(t,i){let e=t,s=i;e=OA(e),s=FA(s);const n=e.toLowerCase();if(this.Wm.hasOwnProperty(n)){const t=this.Wm[n],i=t[1];t[1]=i?i+", "+s:s}else this.Wm[n]=[e,s]}delete(t){const i=OA(t).toLowerCase();delete this.Wm[i]}get(t){const i=OA(t).toLowerCase();return this.Wm.hasOwnProperty(i)?this.Wm[i][1]:null}has(t){const i=OA(t).toLowerCase();return this.Wm.hasOwnProperty(i)}set(t,i){let e=t;e=OA(e);const s=e.toLowerCase();this.Wm[s]=[e,FA(i)]}forEach(t,i){for(const e in this.Wm)this.Wm.hasOwnProperty(e)&&t.call(i,this.Wm[e][1],e,this)}asList(){const t=[];for(const i in this.Wm)if(this.Wm.hasOwnProperty(i)){const[e,s]=this.Wm[i];t.push([e,s])}return t}MT(){const t={};return this.forEach((i,e)=>{t[e]=i}),t}LT(t){t.forEach((t,i)=>{this.append(i,t)})}OT(t){t.forEach((t,i)=>{this.set(i,t)})}constructor(i){this.Wm=void 0,this.Wm={},i instanceof t?i.asList().forEach(t=>{let[i,e]=t;this.append(i,e)}):Array.isArray(i)?i.forEach(t=>{let[i,e]=t;this.append(i,e)}):i&&w.getOwnPropertyNames(i).forEach(t=>{this.append(t,i[t])})}};function OA(t){let i=t;if("string"!=typeof i&&(i=String(i)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(i))throw new g("Invalid character in header field name");return i}function FA(t){let i=t;return"string"!=typeof i&&(i=String(i)),i}r(),r(),r();var no=sn(pd());r();var UA=class extends R{get name(){return"AggregateError"}constructor(t){super(""+t.join("\n"),t[0]),this.causes=void 0,this.causes=t}},fu=a,VA=ri(fu.ReadableStream)&&ri(fu.WritableStream)&&ri(fu.TransformStream)&&Qd(fu.ReadableStream.prototype.pipeThrough)&&!dv.Pp,HA=VA?fu.ReadableStream:no.ReadableStream,Ta=(VA?fu.WritableStream:no.WritableStream,VA?fu.TransformStream:no.TransformStream),WA=(VA&&fu.ByteLengthQueuingStrategy?fu.ByteLengthQueuingStrategy:no.ByteLengthQueuingStrategy,VA&&fu.CountQueuingStrategy?fu.CountQueuingStrategy:no.CountQueuingStrategy);function qA(t){return function(t){return new HA({start(i){for(const e of t)i.enqueue(e);i.close()}})}([t])}function zA(t){return qA(function(t){return new j(t)}(t))}function bn(t,i){return function(t,i){let e=i;const s=t.getReader(),n=new pa,r=()=>{h();const t=new dt;s.cancel(t).catch(Ct),n.jy(t)},h=()=>{e&&(e.jg(r),e=void 0)};e&&(e.Hg?r():e.Xg(r));const o=[],a=t=>t.done?(h(),Promise.resolve(o)):(o.push(t.value),Promise.resolve(s.read()).then(a));return Promise.resolve(s.read()).then(a).then(t=>{h(),n.Xy(t)},t=>{h(),n.jy(t)}),n.Qy}(t,i).then(t=>vm(t).buffer)}function GA(t,i){let e=i;const{readable:s,writable:n}=new Ta,r=n.getWriter(),h=()=>{e&&e.Zg()};return r.closed.then(h,h),t.then(t=>(e=void 0,r.releaseLock(),t.pipeTo(n).catch(Ct)),t=>(e=void 0,r.releaseLock(),n.abort(t).catch(Ct))),s}function XA(t){const{readable:i,writable:e}=new Ta;return t.pipeTo(e,{preventCancel:!0}).catch(i=>{let e;e=ul(i)?i[0]===i[1]||D(i[0])&&D(i[1])?i[0]:new UA(i):i,t.cancel(e).catch(Ct)}),i.tee()}function jA(t){return pc(new j(t))}function QA(t){return br(t).buffer}r();var KA="text/plain;charset=UTF-8",zc=class{FT(t){return this.UT(t).then(JSON.parse)}VT(t,i){switch(t){case M.CT:return this.HT(i);case M.DT:return this.FT(i);case M.BT:return this.WT();case M.NT:return this.UT(i);default:throw new g}}};function YA(t,i,e){if(t instanceof zc)return t;if(t instanceof HA)return function(t,i){return new ZA({Km:0,WT:t,qT:JA(i)})}(t,e);const s=JA(e),n=Promise.resolve(t).then(t=>function(t,i){if(t){if("string"==typeof t)return{Km:M.NT,zT:t,qT:i||KA};if(t instanceof ArrayBuffer||xc(t))return{Km:M.CT,zT:rb(t),qT:i};if(Gd(t)||ul(t))return{Km:M.DT,zT:t,qT:i};throw new g("Unsupported BodyInit type")}return{Km:M.NT,zT:null,qT:i}}(t,s));return new ZA({Km:1,Qy:n,GT:i})}function JA(t){return(t.get("content-type")||"").toLowerCase()}var ZA=class t extends zc{get XT(){return this.jT}get QT(){return 0===this.KT.Km}YT(){return this.JT.Qy}UT(t){return this.ZT($A,t)}FT(t){return this.ZT(ib,t)}HT(t){return this.ZT(sb,t)}WT(){return this.$T(function(t){return 0===t.Km?t.WT:GA(t.Qy.then(nb).then(zA),t.GT)}(this.KT))}ZT(t,i){if(this.jT)return Promise.reject(new g("Already used"));this.jT=!0;const e=t(this.KT,i);return this.JT.$g(e.then(Ct)),e}$T(t){if(this.jT)throw new g("Already used");if(t.locked)throw new g("Body stream is locked");this.jT=!0;const i=new Ta,e=Promise.resolve(t.pipeTo(i.writable));return this.JT.$g(e),i.readable}ek(t){this.KT=t,1===t.Km&&t.Qy.catch(Ct)}nk(){if(this.jT)throw new g("Already used");const i=function(t){if(0===t.Km){const[i,e]=t.WT.tee();return[{Km:t.Km,WT:i,qT:t.qT},{Km:t.Km,WT:e,qT:t.qT}]}{const[i,e]=t.GT.tp();return[{Km:t.Km,Qy:t.Qy,GT:i},{Km:t.Km,Qy:t.Qy,GT:e}]}}(this.KT),e=i[0],s=i[1];return this.ek(e),new t(s)}constructor(t){super(),this.jT=!1,this.KT=void 0,this.JT=new pa,this.JT.Qy.catch(Ct),this.ek(t)}};function $A(t,i){return 0===t.Km?bn(t.WT,i).then(jA):(i&&t.GT.$g(i),$e(t.Qy.then(tb),t.GT))}function tb(t){switch(t.Km){case M.NT:return Promise.resolve(t.zT||"");case M.CT:return Promise.resolve(t.zT).then(jA);case M.DT:return Promise.resolve(t.zT).then(JSON.stringify)}}function ib(t,i){return 0===t.Km?$A(t,i).then(JSON.parse):(i&&t.GT.$g(i),$e(t.Qy.then(eb),t.GT))}function eb(t){return t.Km===M.DT?Promise.resolve(t.zT):tb(t).then(JSON.parse)}function sb(t,i){return 0===t.Km?bn(t.WT,i):(i&&t.GT.$g(i),$e(t.Qy.then(nb),t.GT))}function nb(t){switch(t.Km){case M.CT:return Promise.resolve(t.zT);case M.NT:case M.DT:return tb(t).then(QA)}}function rb(t){return t instanceof ArrayBuffer?t:Gu(ta(t)).buffer}var hb=class extends zc{get XT(){return this.rk.XT}get QT(){return this.rk.QT}YT(){return this.rk.YT()}UT(t){return this.rk.UT(t)}FT(t){return this.rk.FT(t)}HT(t){return this.rk.HT(t)}WT(t){return this.rk.WT(t)}nk(){return this.rk.nk()}constructor(t){super(),this.rk=void 0,this.rk=t}};function jr(t){return t.hk>=200&&t.hk<=299||304===t.hk}var sc=class t extends hb{ck(t){return this.VT(this.dk,t)}Ly(){return new t({ck:this.nk(),lk:this.lk},this)}constructor(t,i){let e,s,n,r,h;i?(e=i.fk,s=i.dk,n=i.hk,r=i.vk,h=i._k):(e=[],s=M.NT,n=200,r="OK",h=!1);const o=t.lk,a=new Ra(t.fk||e),u=t.dk||s,c=t.gk||(i&&i.lk===o?i.gk:o.Yu),d=i?i.rk:null;super(YA(void 0!==t.ck?t.ck:d,t.GT||new at,a)),this.fk=void 0,this.lk=void 0,this.gk=void 0,this.dk=void 0,this.hk=void 0,this.vk=void 0,this._k=void 0,this.fk=a,this.lk=o,this.gk=c,this.dk=u,this.hk=void 0!==t.hk?t.hk:n,this.vk=void 0!==t.vk?String(t.vk):r,this._k=t._k||h}};r();var X=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),Al=function(t){return t.pk="",t.wk="manifest",t.yk="segment",t.Ak="preload-hint",t.bk="content-protection",t}({}),Xa=function(t){return t.pk="",t.Sk="initialization-segment",t.Tk="fairplay-license",t.Ek="fairplay-certificate",t.Pk="widevine-license",t.xk="widevine-certificate",t.Ik="playready-license",t.Rk="clearkey-license",t.Ck="aes128-key",t}({}),Za=function(t){return t.pk="",t.Dk="audio",t.Bk="video",t.NT="text",t.Nk="image",t}({}),ob=function(t){return t.Mk="same-origin",t.Lk="no-cors",t.Ok="cors",t.Fk="navigate",t}({}),$n=class{constructor(t,i){this.zT=void 0,this.fk=void 0,this.Uk=void 0,this.dk=void 0,this.Vk=void 0,this.Hk=void 0,this.Yg=void 0,this.Km=void 0,this.Wk=void 0,this.qk=void 0,this.Yu=void 0,this.zk=void 0,this.Gk=void 0,this.Xk=void 0,this.jk=void 0,this.Qk=void 0;const e=t.Yu;let s,n,r,h,o,a,u,c,d,l,f,v,_,g,p;var m,w,y;i?(s=i.zT,n=i.fk,r=i.Uk,h=i.dk,o=i.Vk,a=i.Hk,u=i.Yg,c=i.Km,d=i.Wk,l=i.qk,f=i.zk,v=i.Gk,_=i.Xk,g=i.jk,p=i.Qk):(s=null,n={},r="GET",h=M.NT,o=0,a=0,c="",d="",l="",f=!1,_=void 0,g=!1,p=void 0),this.Yu=e,this.zT=t.zT||s,this.fk=new Ra(t.fk||n),this.Uk=t.Uk||r,this.dk=t.dk||h,this.Vk=void 0!==t.Vk?Number(t.Vk)||0:o,this.Hk=void 0!==t.Hk?Number(t.Hk)||0:a,this.Yg=t.Yg||u||(new at).Yg,this.Km=t.Km||c,this.Wk=t.Wk||d,this.qk=t.qk||l,this.zk=void 0!==t.zk?Boolean(t.zk):f,this.Gk=t.Gk||v,this.Xk=null!=(m=t.Xk)?m:_,this.jk=null!=(w=t.jk)?w:g,this.Qk=null!=(y=t.Qk)?y:p}},ab=class{lk(t){const i=function(t){return new sc({ck:null,fk:{},lk:t,gk:t.Yu,dk:t.dk,hk:0,vk:d.Gw})}(new $n(t));return Promise.resolve(i)}Kk(t){}kn(){}};var Mr=class t{static get Yk(){return t.Jk||(t.Jk=new t(new ab)),t.Jk}lk(t){const i=this.Zk(t);return this.$k.lk(i)}Kk(t){return this.$k.Kk(this.tE(t))}Zk(i){let e=new $n(i);if(!this.iE){const i=t.eE(e.Yu);e=new $n({Yu:i},e)}return e}tE(i){let e=i.Yu;return this.iE||(e=t.eE(e)),{Yu:e,zT:i.zT}}static eE(t){return zd.Nm&&Vh(t,"http://")?t.replace(":","s:"):t}kn(){this.$k.kn()}constructor(t,i=!0){this.$k=void 0,this.iE=void 0,this.$k=t,this.iE=i}};function Gc(t,i){const e=zd.Dh(t);return ub(e,i),e.toString()}function ub(t,i){for(const e of w.keys(i))t.searchParams.set(e,i[e])}function fn(t,i){let e=zd.xm(t);return i&&!Ju(e,"/")&&(e+="/"),e}Mr.Jk=void 0,r(),r(),r();var cb=/cache:(.+)?(?=&|$)/;function db(t){if(!Vh(t,"http://webcache.googleusercontent.com/search?q=cache:"))return"";const i=zd.Dh(t).search.match(cb);return i&&i.length>1?i[1]:""}function lb(t){return zd.Dh(".",t)}r(),r();var qc=function(t){return t.sE="HttpOpenError",t.nE="HttpResponseError",t.rE="HttpTimeoutError",t}({}),fb=class extends R{get lk(){return this.hE}constructor(t,i,e){super(i,e),this.hE=void 0,this.hE=t}},vb=class extends fb{get name(){return qc.sE}constructor(t,i){super(t,"Error while opening "+t.Yu+".",i)}};r();var An=class extends fb{get name(){return qc.nE}get oE(){return this.aE}constructor(t,i,e){super(t.lk,null!=e?e:function(t){return"Error while loading "+t.lk.Yu+", status code "+t.hk}(t),i),this.aE=void 0,this.aE=t}};r();var Kc=class extends fb{get name(){return qc.rE}constructor(t,i){super(t,function(t){return"Request for "+t.Yu+" timed out after "+t.Vk+" seconds."}(t),i)}};r();var _b=self.fetch,gb=self.Request,pb=self.Response,mb=self.Headers,wb=self.ReadableStream,yb=self.AbortSignal,Ab=self.AbortController,bb=mu(()=>{try{return Qd(_b)&&ri(gb)&&ri(pb)&&ri(mb)&&"forEach"in mb.prototype&&Eg()}catch(t){return!1}}),Sb=["http:","https:"];var Tb=mu(()=>{try{return bb()&&ri(yb)&&ri(Ab)&&"signal"in gb.prototype}catch(t){return!1}}),kb=mu(()=>{try{return bb()&&ri(wb)&&"body"in pb.prototype&&!Qt.e_}catch(t){return!1}});function rt(t){return t instanceof fb}function ll(t){return t instanceof An}function Eb(t){return t instanceof Kc}function Pb(t,i){const e=t.fk.has("content-length")?Number(t.fk.get("content-length")):void 0;let s;return s=t.QT?function(t,i,e){return t.pipeThrough(new Ta(new xb(i,e)))}(t.WT(),i,e):async function(t,i,e){await Promise.resolve(),i(0,e);const s=await t,n=s.byteLength;return i(n,null!=e?e:n),s}(t.HT(),i,e),new sc({ck:s,lk:t.lk},t)}r(),r();var xb=class{transform(t,i){this.uE+=t.byteLength,this.cE(this.uE,this.dE),i.enqueue(t)}flush(t){var i;this.cE(this.uE,null!=(i=this.dE)?i:this.uE)}constructor(t,i){this.cE=void 0,this.dE=void 0,this.uE=void 0,this.cE=t,this.dE=i,this.uE=0}};var Ib=class{async lE(){const t=this.hE;let i,e;t.Vk&&(this.fE=u(()=>{this.vE=!0,this.nT.Zg()},t.Vk),this.nT.Yg.Qg(()=>{c(this.fE)}));try{i=_b(t.Yu,{method:t.Uk,headers:t.fk.MT(),body:t.zT,credentials:t.zk?"include":"same-origin",signal:Db(this.nT.Yg),mode:t.Xk,keepalive:t.Qk})}catch(i){throw new vb(t,i)}try{e=await i}catch(t){const i=this._E(t);throw D(i)&&this.nT.Zg(),i}const s=e.url||t.Yu,n=0===e.status&&"file:"===function(t){return zd.Dh(t).protocol}(s)?200:e.status,r=new Rb(this,e,this.nT);let h=new sc({ck:r,lk:t,dk:t.dk,fk:Bb(e.headers),hk:n,vk:e.statusText,gk:s});if(!jr(h))throw new An(h);return t.Gk&&(h=Pb(h,t.Gk)),h}_E(t){return rt(t)?t:D(t)?this.vE?new Kc(this.hE):new dt(t.message,t):this.aE?new An(this.aE,t):new vb(this.hE,t)}constructor(t){this.oE=void 0,this.hE=void 0,this.nT=new at,this.aE=void 0,this.fE=0,this.vE=!1,this.hE=t,this.nT.$g(t.Yg),this.oE=this.lE()}},Rb=class t extends zc{get XT(){return this.gE.bodyUsed}get QT(){return it(this.gE.body)}YT(){return this.JT.Qy}UT(t){return this.ZT(this.gE.text(),t)}HT(t){return this.ZT(this.gE.arrayBuffer(),t)}WT(){const t=this.gE.body;return t?this.$T(t):GA(this.HT().then(zA),this.nT)}nk(){const i=this.gE.clone(),[e,s]=this.nT.tp();return this.nT=e,new t(this.pE,i,s)}ZT(t,i){i&&this.nT.$g(i);let e=Nc(Promise.resolve(t),this.nT.Yg).catch(t=>{throw this.pE._E(t)});return e=$e(e,this.nT),this.JT.$g(e.then(Ct)),e}$T(t){return new HA(new Nb(t,t=>this.pE._E(t),this.nT,this.JT),{highWaterMark:0})}constructor(t,i,e){super(),this.pE=void 0,this.gE=void 0,this.nT=void 0,this.JT=new pa,this.pE=t,this.gE=i,this.nT=e,this.JT.Qy.catch(Ct)}},Cb="abort";function Db(t){if(!Tb())return;const i=new Ab;if(t.Hg)i.abort();else if(!t.Wg){const e=()=>{s(),i.abort()},s=()=>{i.signal.removeEventListener(Cb,e),t.jg(e),t.Kg(s)};i.signal.addEventListener(Cb,e),t.Xg(e),t.Qg(s)}return i.signal}function Bb(t){if(function(t){return Lu(t)&&"function"==typeof t.forEach}(t)){const i=new Ra;return t.forEach((t,e)=>{Array.isArray(t)&&2===t.length?i.append(t[0],t[1]):i.append(e,t)}),i}return new Ra(t)}var Nb=class{start(t){this.Wd=this.mE.getReader()}async pull(t){let i;try{i=await Nc(this.Wd.read(),this.nT.Yg)}catch(i){const e=this.wE(i);return this.JT.jy(e),this.nT.Zg(),this.Wd.cancel(e).catch(Ct),void t.error(e)}i.done?(this.JT.Xy(),this.nT.Zg(),t.close()):t.enqueue(i.value)}cancel(t){return this.nT.Zg(),this.JT.jy(t),this.Wd.cancel(t)}constructor(t,i,e,s){this.mE=void 0,this.wE=void 0,this.nT=void 0,this.JT=void 0,this.Wd=void 0,this.mE=t,this.wE=i,this.nT=e,this.JT=s}};r();var Mb=class{get oE(){return this.yE.Qy}lE(){const t=this.AE,i=this.hE;if(i.Yg.Hg)return this.bE();t.onreadystatechange=()=>this.SE(),t.onprogress=t=>this.cE(t),t.onload=()=>this.TE(),t.onloadend=()=>this.kE(),t.onerror=()=>this.EE(),t.ontimeout=()=>this.PE(),t.onabort=()=>this.bE(),t.open(i.Uk,i.Yu,!0),t.withCredentials=Boolean(i.zk),"responseType"in t&&i.dk&&(i.dk===M.NT?t.responseType="text":t.responseType="arraybuffer"),i.fk.forEach((i,e)=>{t.setRequestHeader(e,i)}),i.Vk&&(t.timeout=i.Vk),this.nT.Yg.Xg(this.xE);const e=i.zT;e?t.send(e):t.send()}SE(){const t=this.AE;void 0!==t&&t.readyState>=2&&!this.RE&&(this.RE=!0,this.CE())}CE(){var t;const i=this.AE,e=function(t){const i=new Ra,e=t.replace(/\r?\n[\t ]+/g," ");return e.split(/\r?\n/).forEach(t=>{const e=t.split(":"),s=e.shift().trim();if(s){const t=e.join(":").trim();i.append(s,t)}}),i}(i.getAllResponseHeaders()||""),s=this.hE;var n;this.DE=new pa,this.aE=new sc({lk:s,dk:s.dk,ck:this.DE.Qy,hk:i.status,vk:i.statusText,fk:e,gk:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.yE)||t.Xy(this.aE)}TE(){var t;const i=this.AE;if(void 0===i)return;let e=i.response;if(!it(e)){const t=this.hE.dk;e=t===M.NT?i.responseText:t===M.CT?new ArrayBuffer(0):{}}null==(t=this.DE)||t.Xy(e)}kE(){this.kn()}cE(t){void 0!==this.AE&&(null==this.hE.Gk||this.hE.Gk.call(this.hE,t.loaded,t.lengthComputable?t.total:void 0))}EE(){const t=new m("Network request failed");this.aE?this.Ts(new An(this.aE,t)):this.Ts(new vb(this.hE,t))}PE(){this.Ts(new Kc(this.hE))}bE(){this.Ts(new dt),this.kn()}Ts(t){var i,e;null==(i=null!=(e=this.DE)?e:this.yE)||i.jy(t)}kn(){this.AE=void 0,this.aE=void 0,this.yE=void 0,this.DE=void 0,this.nT.zg()}constructor(t){this.AE=void 0,this.hE=void 0,this.nT=new at,this.aE=void 0,this.yE=new pa,this.DE=void 0,this.RE=!1,this.xE=()=>{var t;this.bE(),null==(t=this.AE)||t.abort()},this.hE=t,this.nT.$g(t.Yg),this.AE=new ud,this.lE()}};function Lb(t,i,e){return new Promise((s,n)=>{if(e&&e.Hg)return n(new dt);const r=t=>{o(),s(t)},h=()=>{o(),n(new dt)},o=()=>{t.removeEventListener(i,r),e&&e.jg(h)};t.addEventListener(i,r),e&&e.Xg(h)})}r();var Ob=class{lk(t){return function(t){if(!bb()||!function(t){try{return Sb.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Yu))return!1;if(!kb()&&t.Gk)return!1;if(!t.jk&&t.Uk!==X.POST){if(Qt.S_&&Qt.d_<=68)return!1;if(Qt.w_)return!1}return!0}(t)?new Ib(t).oE:new Mb(t).oE}Kk(t){const i=s.navigator;if(i&&i.sendBeacon)i.sendBeacon(t.Yu,NA([t.zT],{type:t.qT}));else{const i=t.qT?{"Content-type":t.qT}:void 0;this.lk(new $n({Uk:X.POST,Yu:t.Yu,zT:t.zT,fk:i,Xk:ob.Lk})).then(t=>{Wr(t.HT())},Ct)}}kn(){}};r(),r();var xu=function(t){return t[t.BE=1]="BE",t[t.NE=2]="NE",t[t.NT=3]="NT",t[t.LE=4]="LE",t[t.OE=9]="OE",t}({});function to(t){return 1===t.FE}function Fb(t){return 3===t.FE}r();var Ub=class extends R{constructor(t){super("Invalid XML",t)}},Vb=class{UE(t){const i=new DOMParser;let e;try{e=i.parseFromString(t,"text/xml")}catch(t){throw new Ub(t)}if(!e||e.getElementsByTagName("parsererror").length>0)throw new Ub;return new jb(e)}},Hb=class t{get FE(){return xu.NE}get VE(){var t;return null!=(t=this.HE.localName)?t:Yb(this.HE.nodeName)}get l(){return this.HE.nodeName}get WE(){var t;return null!=(t=this.HE.namespaceURI)?t:void 0}get qE(){var t;return null!=(t=this.HE.prefix)?t:void 0}get zE(){return this.HE.nodeValue}GE(t){return this.HE.isEqualNode(t.HE)}XE(i){return new t(this.HE.cloneNode(i))}constructor(t){this.HE=void 0,this.HE=t}},Wb=class{get jE(){return void 0===this.QE&&(this.QE=function(t){const i=[];for(let e=0;eQb(i)&&i.JE===t)}ZE(t,i){return this.jE.filter(e=>Qb(e)&&e.VE===i&&e.WE===t)}get $E(){return this.KE}tP(t){this.KE.appendChild(t.$E),this.QE&&this.QE.push(t)}GE(t){return this.KE.isEqualNode(t.$E)}constructor(t){this.KE=void 0,this.QE=void 0,this.KE=t}},qb=class t extends Wb{get FE(){return xu.BE}get VE(){var t;return null!=(t=this.KE.localName)?t:Yb(this.KE.nodeName)}get WE(){var t;return null!=(t=this.KE.namespaceURI)?t:void 0}get qE(){var t;return null!=(t=this.KE.prefix)?t:void 0}get JE(){return this.KE.nodeName}get iP(){return function(t){const i=[];for(let e=0;e{this.$x(t)||this.So(t)},this.PP=t,t.lw(this.iI)}};r(),r(),r();var Vt=function(t){return t.eI="sI",t.nI="rI",t}({});r(),r(),r(),r();var Oi=class extends wp{get Ca(){return this.hu||(this.hu=this.xa()),this.hu}constructor(t,i){super(t,i),this.hu=void 0}};function Zb(t){return Boolean(t&&t.Ca)}var Js=class extends Oi{constructor(t){super(t)}},Ae=class extends wp{constructor(t){super(t)}},$b=class extends Js{xa(){return new tS(this.Ht.Ca)}constructor(t){super(Vt.eI),this.Ht=void 0,this.Ht=t}},tS=class extends Ae{constructor(t){super("addtrack"),this.track=void 0,this.track=t}};r();var iS=class extends Js{xa(){return new eS(this.Ht.Ca)}constructor(t){super(Vt.nI),this.Ht=void 0,this.Ht=t}},eS=class extends Ae{constructor(t){super("removetrack"),this.track=void 0,this.track=t}};r();var Te=function(t){return t.hI="oI",t.aI="uI",t.cI="dI",t.lI="fI",t.vI="_I",t.gI="pI",t.pa="mI",t.wI="yI",t.AI="bI",t.SI="er",t.TI="kI",t.EI="xI",t.QUALITY_UNAVAILABLE="qualityunavailable",t.NO_QUALITY="noquality",t}({}),eo=class extends Ne{get II(){return this.RI}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}get V(){return this.RI.length}CI(t){return this.RI[t]}tt(t){return!(!t||pi(this.RI,t))&&(this.RI.push(t),this.hu&&this.hu.push(t.Ca),t.wn(Te.pa,this.Rs),this.So(new $b(t)),!0)}it(t){if(!t)return!1;const i=this.RI.indexOf(t);return!(i<0)&&(ka(this.RI,i),this.hu&&ka(this.hu,i),t.mn(Te.pa,this.Rs),this.So(new iS(t)),!0)}DI(t){return pi(this.RI,t)}hr(){const t=this.RI;for(let i=t.length-1;i>=0;i-=1)this.it(t[i])}kn(){this.hr(),this.Vo()}constructor(){super(),this.RI=[],this.hu=void 0}};r();var nr=class extends Js{xa(){return new sS(this.Ht.Ca)}constructor(t){super(Te.pa),this.Ht=void 0,this.Ht=t}},sS=class extends Ae{constructor(t){super("change"),this.track=void 0,this.track=t}},nS=class extends eo{get BI(){return this.NI}set BI(t){const i=this.NI;if(t!==i){if(i){this.MI(i);for(const e of i.II)t&&t.DI(e)||this.it(e)}if(this.NI=t,t){const i=[];for(const e of t.II)this.tt(e),this.LI(e)&&i.push(e);this.OI(t);for(const t of i)t.So(new nr(t))}}}OI(t){t.wn(Vt.eI,this.FI),t.wn(Vt.nI,this.UI)}MI(t){t.mn(Vt.eI,this.FI),t.mn(Vt.nI,this.UI)}kn(t){!t&&this.NI&&this.NI.kn(),super.kn()}constructor(){super(),this.NI=void 0,this.FI=t=>{const i=t.Ht;this.tt(i)},this.UI=t=>{const i=t.Ht;this.it(i)}}};r(),r(),r();var rS=w.freeze||jo;function hS(t,i,e){w.defineProperty(t,i,{writable:!1,enumerable:!0,value:e})}function oS(t){return rS(t)}function po(t,i){for(const e of w.getOwnPropertyNames(i))w.defineProperty(t,e,w.getOwnPropertyDescriptor(i,e));return t}function Ua(t){if(Gd(t)){const i={};for(const e in t)La.call(t,e)&&(i[e]=Ua(t[e]));return i}if(ul(t)){const i=new Array(t.length);for(let e=0;et.Ca);return e.item=i=>{const e=0|i,s=t.CI(e);return s&&s.Ca||void 0},e.addEventListener=(t,e)=>{i.wn(t,e)},e.removeEventListener=(t,e)=>{i.mn(t,e)},i=new mp(e),t.wn(_S,t=>i.So(t.Ca)),e}r();var Tn=function(t){return t[t.VI=0]="VI",t[t.HI=1]="HI",t[t.WI=2]="WI",t[t.qI=3]="qI",t[t.zI=4]="zI",t[t.TRANSCRIBES_SPOKEN_DIALOG=5]="TRANSCRIBES_SPOKEN_DIALOG",t[t.DESCRIBES_MUSIC_AND_SOUND=6]="DESCRIBES_MUSIC_AND_SOUND",t[t.GI=7]="GI",t}({});function pS(t){switch(t){case 0:return"caption";case 2:return"sign";case 1:return"description";case 3:return"enhanced audio intelligibility";case 4:return"easy reader";case 5:return"transcribes spoken dialog";case 6:return"describes music and sound";case 7:return"describes video"}}function mS(){}function fo(t){const i=[Te.SI,Te.pa,Te.TI,Te.EI,Te.QUALITY_UNAVAILABLE];let e;const s={get activeQuality(){return t.XI&&t.XI.Ca},get enabled(){return t.Rt},set enabled(i){t.Rt=Zn(i)},get id(){return t.o},get uid(){return t.jI},get kind(){return t.Lt},get label(){return t.Th},set label(i){t.Th=Hi(i)},get accessibility(){var i,e;return null!=(e=null==(i=t.QI)?void 0:i.map(pS))?e:[]},get language(){return t.bs},get qualities(){return t.KI.Ca},set targetQuality(i){let e;e=i?function(t,i){const e=[];for(const s of t.KI.II)for(const t of i)s.Ca===t&&e.push(s);return e}(t,ul(i)?i:[i]):[],e.length>0?t.YI=e:t.YI=void 0},get targetQuality(){if(t.YI)return 1===t.YI.length?t.YI[0].Ca:t.YI.map(t=>t.Ca)},addEventListener(t,i){const s=$a(t,Hi);e.wn(s,i)},removeEventListener(t,i){const s=$a(t,Hi);e.mn(s,i)}};return e=new mp(s),t.wn(i,t=>e.So(t.Ca)),w.defineProperty(s,"constructor",{value:mS}),s}function wS(){}function yS(t){const i=gS(t);return w.defineProperty(i,"constructor",{value:wS}),i}var He=class extends nS{xa(){return yS(this)}LI(t){return t.Rt}};r(),r(),r();var xh=function(t){return t.Nh="disabled",t.JI="hidden",t.Kn="showing",t}({});function AS(t){if("string"==typeof t){const i=t.toLowerCase();switch(i){case"disabled":case"hidden":case"showing":return i}}else if("number"==typeof t)switch(t){case 0:return"disabled";case 1:return"hidden";case 2:return"showing"}return"disabled"}r();var Mc=function(t){return t.ma="error",t}({});function bS(){}function zh(t){const i=[Te.pa,Te.SI,Te.hI,Te.aI,Te.lI,Te.vI,Te.cI,Te.gI,Te.wI,Te.AI],e=[Mc.ma];let s;const n={get kind(){return t.Lt},get label(){return t.Th},set label(i){t.Th=Hi(i)},get language(){return t.bs},get id(){return t.o},get uid(){return t.jI},get inBandMetadataTrackDispatchType(){return t.ZI},get mode(){return t.Xk},set mode(i){i!==xh.Kn&&i!==xh.JI&&i!==xh.Nh||t.$I(i)},get forced(){return Boolean(t.tR)},get accessibility(){var i,e;return null!=(e=null==(i=t.QI)?void 0:i.map(pS))?e:[]},get type(){return t.Km},get readyState(){return t.Ax},get cues(){return t.Xk===xh.Nh?null:t.L.Ca},get activeCues(){return t.Xk===xh.Nh?null:t.q.Ca},get src(){return t.iR||""},addEventListener(t,i){const e=$a(t,Hi);s.wn(e,i)},removeEventListener(t,i){const e=$a(t,Hi);s.mn(e,i)}};return s=new mp(t),t.wn(i,t=>s.So(t.Ca)),t.wn(e,t=>s.So(t)),w.defineProperty(n,"constructor",{value:bS}),n}function SS(){}function TS(t){const i=gS(t);return w.defineProperty(i,"constructor",{value:SS}),i}var sl=class extends nS{xa(){return TS(this)}LI(t){return t.Xk===xh.Kn}};r(),r();var kS=class extends Ne{get eR(){}get sR(){}get nR(){}get rR(){return!1}get hR(){}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=ES(this)}oR(){}constructor(...t){super(...t),this.hu=void 0}};function ES(t){return{goLive:()=>t.oR(),get isLive(){return t.rR},get latencies(){return t.eR},get videoLatencies(){return t.sR},get audioLatencies(){return t.nR},get manifest(){return t.hR},addEventListener(i,e){t.wn(xS(i),e)},removeEventListener(i,e){t.mn(xS(i),e)}}}var PS=["golive","latencyrecoveryseek"];function xS(t){const i=$a(t,Hi);return(Z(i)?[i]:i).filter(t=>pi(PS,t))}var yl=class extends Ne{set BI(t){const i=this.NI;t!==i&&(i&&this.MI(i),t&&this.OI(t),this.NI=t)}get BI(){return this.NI}get Ca(){return this.hu||(this.hu=ES(this)),this.hu}OI(t){t.wn(PS,this.Rs)}MI(t){t.mn(PS,this.Rs)}oR(){var t;null==(t=this.NI)||t.oR()}get eR(){var t;return null==(t=this.NI)?void 0:t.eR}get sR(){var t;return null==(t=this.NI)?void 0:t.sR}get nR(){var t;return null==(t=this.NI)?void 0:t.nR}get rR(){return!!this.NI&&this.NI.rR}get hR(){var t;return null==(t=this.NI)?void 0:t.hR}kn(){this.Vo(),this.NI&&this.MI(this.NI),this.NI=void 0}constructor(){super(),this.NI=void 0,this.hu=void 0,this.NI=void 0}};r(),r();var IS=function(t){return t.AUTO="auto",t.MANUAL="manual",t.DISABLED="disabled",t}({});function RS(t){return{appID:t&&t.appID?Hi(t.appID):"8E80B9CE"}}r(),r();var Xh=function(t){return t.Lk="",t.aR="anonymous",t.uR="use-credentials",t}({}),Ba=function(t){return t.cR="application/dash+xml",t.dR="application/vnd.apple.mpegurl",t.lR="application/x-mpegurl",t.fR="video/mp4",t.vR="application/vnd.theoplayer.hesp+json",t._R="application/vnd.theo.hesp+json",t.gR="millicast",t.pR="theolive",t}({});function CS(t){if(null!==t)return t}function DS(t){const i={apiKey:t.apiKey,integration:t.integration,streamActivityMonitorID:CS(t.streamActivityMonitorID),adTagParameters:Lu(t.adTagParameters)?t.adTagParameters:{},authToken:CS(t.authToken),omidAccessModeRules:CS(t.omidAccessModeRules)};if(t.enableNonce&&(i.enableNonce=!0),"vod"===(null==t?void 0:t.availabilityType)||function(t){const i=t;return Boolean(i.videoID&&i.contentSourceID)}(t)){const e=t.videoID,s=t.contentSourceID;return e?s?Mo({},i,{availabilityType:"vod",videoID:e,contentSourceID:s}):void zd.um("A VOD DAI configuration was provided without valid contentSourceID which is required."):void zd.um("A VOD DAI configuration was provided without valid videoID which is required.")}if("live"===(null==t?void 0:t.availabilityType)||function(t){const i=t;return Boolean(i.assetKey)}(t)){const e=t.assetKey;return e?Mo({},i,{availabilityType:"live",assetKey:e}):void zd.um("A Live DAI configuration was provided without valid assetKey which is required.")}zd.um("A DAI configuration was provided without a valid availabilityType which is required.")}function BS(t){return"google-dai"===t.integration?DS(t):Mo({},t,{integration:String(t.integration)})}r(),r(),r(),r(),r(),r();var ze,Pr="titanium",NS="conax",MS="ezdrm",LS="irdeto",OS="vudrm",FS="verimatrix",Ar="keyos",US="drmtoday",VS="expressplay",HS="azure",WS="xstream",qS="vimond",zS="axinom",GS="uplynk",XS="comcast",jS="custom";function QS(t,i){if(null==t)return{};var e,s,n={},r=w.keys(t);for(s=0;s=0||(n[e]=t[e]);return n}function KS(t){return it(t.token&&t.deviceId)}function YS(t){var i;const e=null==(i=t.fairplay)?void 0:i.headers;return void 0!==e&&it(e.PreAuthorization)}function JS(t){const i=t;return KS(i)&&""!==i.token&&""!==i.deviceId&&!YS(i)}r(),r(),r(),r(),r(),function(t){t.mR=!1,t.wR=!1,t.yR=!1,t.AR=!1,t.LOG_ADS_DETAILS=!1,t.LOG_CHROMECAST_DETAILS=!1,t.LOG_CUSTOM_DRM=!1,t.LOG_BUFFERING_VIDEO_MAIN=!1,t.LOG_BUFFERING_VIDEO_SELECTION=!1,t.LOG_BUFFERING_AUDIO_MAIN=!1,t.LOG_BUFFERING_AUDIO_SELECTION=!1,t.bR=!1,t.SR=!1,t.LOG_LCEVC_DETAILS=!1}(ze||(ze={})),r();var fs=class extends Ga{get name(){return"ContentProtectionError"}constructor(t,i,e,s,n,r,h,o){super(t,i,e),this.url=void 0,this.status=void 0,this.statusText=void 0,this.response=void 0,this.systemCode=void 0,this.url=s,this.status=n,this.statusText=r,this.response=h,this.systemCode=o}};r();var ZS=class{get kR(){return this.ER}get kS(){return this.mS}PR(t){return function(t){const i=t.onCertificateRequest;if(void 0!==i&&"function"!=typeof i)throw new g("ContentProtectionIntegration.onCertificateRequest is not a function.");const e=t.onCertificateResponse;if(void 0!==e&&"function"!=typeof e)throw new g("ContentProtectionIntegration.onCertificateResponse is not a function.");const s=t.onLicenseRequest;if(void 0!==s&&"function"!=typeof s)throw new g("ContentProtectionIntegration.onLicenseRequest is not a function.");const n=t.onLicenseResponse;if(void 0!==n&&"function"!=typeof n)throw new g("ContentProtectionIntegration.onLicenseResponse is not a function.");const r=t.extractFairplayContentId;if(void 0!==r&&"function"!=typeof r)throw new g("ContentProtectionIntegration.extractFairplayContentId is not a function.");return t}(this.xR.build(t))}constructor(t,i,e){this.ER=void 0,this.mS=void 0,this.xR=void 0,this.ER=t,this.mS=i,this.xR=e}};r();var $S=function(t){return t.FAILED="FAILED",t.OVERRIDDEN="OVERRIDDEN",t.SUCCEEDED="SUCCEEDED",t}({}),tT=class{registerContentProtectionIntegration(t,i,e){switch(this.IR(t,i,e)){case $S.FAILED:throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The keySystem should be 'widevine', 'playready' or 'fairplay', but was "+i+".");case $S.OVERRIDDEN:{const e=ST(i);zd.um("Warning: Overwriting an earlier registered integration for "+t+" and "+e+".");break}case $S.SUCCEEDED:ST(i);0;break}}IR(t,i,e){const s=ST(i);if(!s)return $S.FAILED;let n=$S.SUCCEEDED;for(const i of this.RR.slice())i.kR===t&&i.kS===s&&(n=$S.OVERRIDDEN,oi(this.RR,i));return this.RR.push(new ZS(t,s,e)),n}DR(t,i){return void 0!==this.NR(t,i)}MR(t,i,e){const s=this.NR(t,i);if(!s)throw m("No ContentProtectionIntegrationInit was found for integration id "+t+" and key system "+i);return s.PR(e)}NR(t,i){for(const e of this.RR)if(e.kR===t&&(!i||e.kS===i))return e}constructor(){this.RR=[]}};tT.LR=new tT,r(),r();var Ro=function(t){return t.OR="moov",t.FR="mvhd",t.UR="trak",t.HR="tkhd",t.WR="mdia",t.qR="mdhd",t.zR="hdlr",t.GR="minf",t.XR="stbl",t.jR="stsd",t.QR="stsc",t.KR="mvex",t.YR="trex",t.JR="avc1",t.ZR="avcC",t.$R="hev1",t.tC="hvc1",t.iC="hvcC",t.eC="vp09",t.sC="vpcC",t.nC="av01",t.rC="av1C",t.hC="dvcC",t.oC="dvvC",t.aC="dvwC",t.uC="dac3",t.cC="dec3",t.dC="dvav",t.lC="dva1",t.fC="dvhe",t.vC="dvh1",t._C="ac-3",t.gC="ec-3",t.pC="colr",t.mC="pasp",t.wC="mp4a",t.yC="esds",t.AC="fLaC",t.bC="dfLa",t.SC="wvtt",t.TC="vttC",t.kC="vlab",t.EC="enca",t.xC="encv",t.IC="moof",t.RC="mfhd",t.DC="traf",t.BC="tfhd",t.NC="trun",t.MC="tfdt",t.LC="senc",t.OC="mdat",t.FC="pssh",t.VC="emsg",t.HC="sidx",t.WC="styp",t.qC="ftyp",t.zC="sinf",t.GC="frma",t.XC="schi",t.jC="tenc",t}({}),iT=function(t){return t.ON_SCREEN_COLOURS="nclx",t.RESTRICTED_ICC_PROFILE="rICC",t.UNRESTRICED_ICC_PROFILE="prof",t}({}),Jh=function(t){return t[t.BASE_DATA_OFFSET_PRESENT=1]="BASE_DATA_OFFSET_PRESENT",t[t.SAMPLE_DESCRIPTION_INDEX_PRESENT=2]="SAMPLE_DESCRIPTION_INDEX_PRESENT",t[t.DEFAULT_SAMPLE_DURATION_PRESENT=8]="DEFAULT_SAMPLE_DURATION_PRESENT",t[t.DEFAULT_SAMPLE_SIZE_PRESENT=16]="DEFAULT_SAMPLE_SIZE_PRESENT",t[t.DEFAULT_SAMPLE_FLAGS_PRESENT=32]="DEFAULT_SAMPLE_FLAGS_PRESENT",t[t.DURATION_IS_EMPTY=65536]="DURATION_IS_EMPTY",t[t.DEFAULT_BASE_IS_MOOF=131072]="DEFAULT_BASE_IS_MOOF",t}({}),eT=function(t){return t[t.DATA_OFFSET_PRESENT=1]="DATA_OFFSET_PRESENT",t[t.FIRST_SAMPLE_FLAGS_PRESENT=4]="FIRST_SAMPLE_FLAGS_PRESENT",t[t.SAMPLE_DURATION_PRESENT=256]="SAMPLE_DURATION_PRESENT",t[t.SAMPLE_SIZE_PRESENT=512]="SAMPLE_SIZE_PRESENT",t[t.SAMPLE_FLAGS_PRESENT=1024]="SAMPLE_FLAGS_PRESENT",t[t.SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT=2048]="SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT",t}({});r();var lc=class t{QC(){return ua(this.ck,this.KC)}YC(){return qe(this.ck,this.KC)}JC(){return function(t,i,e){void 0===e&&(e=!1);const s=t.getInt16(i.ac,e);return i.Ny(2),s}(this.ck,this.KC)}ZC(){return Cu(this.ck,this.KC)}$C(){return function(t,i,e){void 0===e&&(e=!1);const s=t.getInt32(i.ac,e);return i.Ny(4),s}(this.ck,this.KC)}tD(){return et(this.ck,this.KC)}iD(t){return T(this.ck,this.KC,t)}eD(t){return function(t,i,e){const s=[];for(let n=0;ni.byteLength){const t=a;return e.My(n),{cD:!1,pD:t}}const u={Km:h.Km,ac:n,ck:new lc(Au(i,n,a),new Ui(h.mD))};return e.My(a),{cD:!0,lD:u}}static _D(t,i){const e=i.ac;if(!zp(t,i,8)){return{cD:!1,pD:i.ac+8}}let s=Cu(t,i),n=Wc(t,i,4);if(1===s){if(!zp(t,i,8)){const t=i.ac+8;return i.My(e),{cD:!1,pD:t}}s=et(t,i).toNumber()}if("uuid"===n){if(!zp(t,i,16)){const t=i.ac+16;return i.My(e),{cD:!1,pD:t}}n=Wc(t,i,16)}return{cD:!0,gD:{Km:n,Vy:s,mD:i.ac-e}}}static wD(t,i,e){const s=t.ck,n=t.KC;let r=ao(ta(s),n.ac,s.byteLength);return e&&(r=Gu(r)),n.Ny(r.byteLength),{Km:i,ck:r}}static yD(i,e,s){const n=i.ZC(),{version:r,flags:h}=hT(n);return{Km:e,bD:r,SD:h,ck:t.wD(i,e,s).ck}}};function Gh(t,i){const e=vo(t,i);if(!e)throw new m("Missing "+i+" atom");return e}function vo(t,i){for(const e of t)if(e.Km===i)return e.ck}function rT(t,i){const e=[];for(const s of t)s.Km===i&&e.push(s.ck);return e}function hT(t){return{version:t>>24,flags:new Vp(16777215&t)}}var jt=class t{static TD(i){const e=[],s=Cl.aD(new lc(i,new Ui));for(const i of s){const s=t.kD(i);s&&e.push(s)}return e}static ED(t){return Cl.uD(t,new Ui,!1).m.some(this.PD)}static xD(i){return rT(Cl.aD(new lc(i,new Ui)),Ro.FC).map(t.RD)}static CD(i){return rT(Cl.aD(i.ck),Ro.FC).map(t.RD)}static PD(t){return t.Km===Ro.qC||t.Km===Ro.WC||t.Km===Ro.OR||t.Km===Ro.IC||t.Km===Ro.OC||t.Km===Ro.HC||t.Km===Ro.VC}static kD(i){switch(i.Km){case Ro.OR:return t.DD(i.ck);case Ro.IC:return t.BD(i.ck,i.ac);case Ro.OC:return t.ND(i.ck);case Ro.HC:return t.MD(i.ck);case Ro.VC:return t.LD(i.ck)}}static DD(i){const e=Cl.aD(i),s=Gh(e,Ro.FR),n=rT(e,Ro.UR),r=vo(e,Ro.KR),h=t.OD(s),o=n.map(t.FD),a=r?t.UD(r):void 0;return{Km:Ro.OR,gD:h,Z:o,VD:a}}static OD(t){const i=t.ZC(),{version:e,flags:s}=hT(i),n=1===e?t.tD():t.ZC(),r=1===e?t.tD():t.ZC(),h=t.ZC(),o=1===e?t.tD():t.ZC(),a=t.ZC(),u=t.YC()>>8;t.rD(2),t.rD(8);const c=t.eD(9);t.rD(24);const d=t.ZC();return{Km:Ro.FR,bD:e,SD:s,HD:n,WD:r,qD:h,ct:o,zD:a,Mx:u,GD:c,XD:d}}static FD(i){const e=Cl.aD(i),s=Gh(e,Ro.HR),n=Gh(e,Ro.WR),r=t.jD(s),h=t.QD(n);return{Km:Ro.UR,gD:r,KD:h}}static jD(t){const i=t.ZC(),{version:e,flags:s}=hT(i),n=1===e?t.tD():t.ZC(),r=1===e?t.tD():t.ZC(),h=t.ZC();t.rD(4);const o=1===e?t.tD():t.ZC();t.rD(8);const a=t.JC(),u=t.JC(),c=t.JC()/256;t.rD(2);const d=t.eD(9),l=t.ZC()/65536,f=t.ZC()/65536;return{Km:Ro.HR,YD:s.Oy(1),JD:s.Oy(2),ZD:s.Oy(4),HD:n,WD:r,$D:h,ct:o,tB:a,iB:u,Mx:c,GD:d,Ti:l,Mi:f}}static QD(i){const e=Cl.aD(i),s=Gh(e,Ro.qR),n=Gh(e,Ro.zR),r=Gh(e,Ro.GR),h=t.eB(s),o=t.sB(n),a=t.nB(r);return{Km:Ro.WR,gD:h,rB:o,hB:a}}static eB(t){const i=t.ZC(),{version:e,flags:s}=hT(i),n=1===e?t.tD():t.ZC(),r=1===e?t.tD():t.ZC(),h=t.ZC(),o=1===e?t.tD():t.ZC();t.YC();return t.rD(2),{Km:Ro.qR,bD:e,SD:s,HD:n,WD:r,qD:h,ct:o}}static sB(t){const i=t.ZC(),{version:e,flags:s}=hT(i);t.rD(4);const n=t.sD(4);t.rD(12);const r=t.nD();return{Km:Ro.zR,bD:e,SD:s,oB:n,l:r}}static nB(i){const e=Gh(Cl.aD(i),Ro.XR),s=t.aB(e);return{Km:Ro.GR,uB:s}}static aB(i){const e=Gh(Cl.aD(i),Ro.jR),s=t.cB(e);return{Km:Ro.XR,dB:s}}static cB(i){const e=i.ZC(),{version:s,flags:n}=hT(e),r=(i.ZC(),[]),h=Cl.aD(i);for(const i of h){const e=t.lB(i.ck,i.Km);e&&r.push(e)}return{Km:Ro.jR,bD:s,SD:n,fB:r}}static lB(i,e){let s=t.vB(i,e);return s||(s=t._B(i,e),s||(e===Ro.SC?t.gB(i):void 0))}static vB(i,e){return e===Ro.wC?t.pB(i):e===Ro.AC||e===Ro.AC.toLowerCase()||e===Ro.AC.toUpperCase()?t.mB(i):e===Ro.EC?t.wB(i):e===Ro._C?t.yB(i):e===Ro.gC?t.AB(i):void 0}static _B(i,e){return e===Ro.JR?t.bB(i):e===Ro.$R||e===Ro.tC?t.SB(i,e):e===Ro.eC?t.TB(i,e):e===Ro.nC?t.kB(i,e):e===Ro.xC?t.EB(i):e===Ro.dC||e===Ro.lC||e===Ro.fC||e===Ro.vC?t.PB(i,e):void 0}static xB(t,i){t.rD(6);return{Km:i,IB:t.YC()}}static RB(i,e){const s=t.xB(i,e);i.rD(8);const n=i.YC(),r=i.YC();i.rD(2),i.rD(2);return Mo({},s,{CB:n,DB:r,BB:i.ZC()>>>16})}static NB(i,e){const s=t.xB(i,e);i.rD(2),i.rD(2),i.rD(12);const n=i.YC(),r=i.YC(),h=i.ZC(),o=i.ZC();i.rD(4);const a=i.YC();i.rD(32);const u=i.YC();return i.rD(2),Mo({},s,{Ti:n,Mi:r,MB:h,LB:o,OB:a,FB:u})}static pB(i){const e=t.RB(i,Ro.wC),s=Gh(Cl.aD(i),Ro.yC);return Mo({},e,{UB:t.VB(s)})}static mB(i){const e=t.RB(i,Ro.AC),s=Gh(Cl.aD(i),Ro.bC);return Mo({},e,{HB:t.WB(s)})}static gB(i){const e=t.xB(i,Ro.SC),s=Cl.aD(i),n=Gh(s,Ro.TC),r=t.qB(n),h=vo(s,Ro.kC);return Mo({},e,{zB:r,GB:h?t.XB(h):void 0})}static qB(t){return{Km:Ro.TC,Cd:t.nD()}}static XB(t){return{Km:Ro.kC,Th:t.nD()}}static VB(t){return Cl.yD(t,Ro.yC,!0)}static WB(t){return Cl.yD(t,Ro.bC,!0)}static bB(i){const e=t.NB(i,Ro.JR),s=Cl.aD(i),n=Gh(s,Ro.ZR),r=vo(s,Ro.mC);return Mo({},e,{jB:t.QB(n),KB:r?t.YB(r):void 0})}static SB(i,e){const s=t.NB(i,e),n=Gh(Cl.aD(i),Ro.iC);return Mo({},s,{JB:t.ZB(n)})}static TB(i,e){const s=t.NB(i,e),n=Gh(Cl.aD(i),Ro.sC);return Mo({},s,{$B:t.tN(n)})}static kB(i,e){const s=t.NB(i,e),n=Cl.aD(i),r=Gh(n,Ro.rC),h=t.iN(r),o=vo(n,Ro.pC);return Mo({},s,{eN:h,sN:o?t.nN(o):void 0})}static EB(i){const e=i.Ly(),s=t.NB(i,Ro.xC),n=Gh(Cl.aD(i),Ro.zC),r=t.rN(n);return Mo({},s,{hN:t._B(e,r.aN.oN),uN:r})}static PB(i,e){const s=t.NB(i,e),n=Cl.aD(i);return Mo({},s,{cN:t.dN(n)})}static yB(i){const e=t.RB(i,Ro._C),s=Gh(Cl.aD(i),Ro.uC);return Mo({},e,{lN:t.fN(s)})}static AB(i){const e=t.RB(i,Ro.gC),s=Gh(Cl.aD(i),Ro.cC);return Mo({},e,{vN:t._N(s)})}static wB(i){const e=i.Ly(),s=t.RB(i,Ro.EC),n=Gh(Cl.aD(i),Ro.zC),r=t.rN(n);return Mo({},s,{hN:t.vB(e,r.aN.oN),uN:r})}static rN(i){const e=Cl.aD(i),s=Gh(e,Ro.GC),n=t.gN(s),r=Gh(e,Ro.XC),h=t.pN(r);return{Km:Ro.zC,aN:n,mN:h}}static gN(t){const i=t.sD(4);return{Km:Ro.GC,oN:i}}static pN(i){const e=Gh(Cl.aD(i),Ro.jC),s=t.wN(e);return{Km:Ro.XC,yN:s}}static wN(t){const i=Cu(t.ck,t.KC),{version:e,flags:s}=hT(i),n=t.QC()>0,r=t.QC(),h=t.iD(16);return{Km:Ro.jC,bD:e,SD:s,AN:n,bN:r,SN:h}}static QB(t){return Cl.wD(t,Ro.ZR,!0)}static ZB(t){return Cl.wD(t,Ro.iC,!0)}static dN(t){const i=vo(t,Ro.hC);if(void 0!==i)return Cl.wD(i,Ro.hC,!0);const e=vo(t,Ro.oC);if(void 0!==e)return Cl.wD(e,Ro.oC,!0);const s=vo(t,Ro.aC);if(void 0!==s)return Cl.wD(s,Ro.aC,!0);throw m("Error parsing Dolby Vision configuration box.")}static fN(t){return Cl.wD(t,Ro.uC,!0)}static _N(t){return Cl.wD(t,Ro.cC,!0)}static tN(t){return Cl.wD(t,Ro.sC,!0)}static iN(t){return Cl.wD(t,Ro.rC,!0)}static nN(t){const i=t.sD(4);switch(i){case"nclx":return{TN:iT.ON_SCREEN_COLOURS,kN:t.YC(),EN:t.YC(),PN:t.YC(),xN:!!(128&t.QC())};case"rICC":return{TN:iT.RESTRICTED_ICC_PROFILE};case"prof":return{TN:iT.UNRESTRICED_ICC_PROFILE};default:throw m("Could not parse ColourInformationBox: unknown type '"+i+"'.")}}static YB(t){const i=t.ZC(),e=t.ZC();return{Km:Ro.mC,RN:i,CN:e}}static UD(i){const e=rT(Cl.aD(i),Ro.YR).map(t.DN);return{Km:Ro.KR,Z:e}}static DN(t){const i=t.ZC(),{version:e,flags:s}=hT(i),n=t.ZC(),r=t.ZC(),h=t.ZC(),o=t.ZC(),a=t.ZC();return{Km:Ro.YR,bD:e,SD:s,$D:n,BN:r,NN:h,MN:o,LN:a}}static BD(i,e){const s=Cl.aD(i),n=Gh(s,Ro.RC),r=rT(s,Ro.DC),h=t.ON(n),o=r.map(t.FN);return{Km:Ro.IC,UN:e,gD:h,Z:o}}static ON(t){const i=t.ZC(),{version:e,flags:s}=hT(i),n=t.ZC();return{Km:Ro.RC,bD:e,SD:s,VN:n}}static FN(i){const e=Cl.aD(i),s=Gh(e,Ro.BC),n=rT(e,Ro.NC),r=vo(e,Ro.MC),h=t.HN(s),o=n.map(i=>t.WN(i,h)),a=r?t.qN(r):void 0;return{Km:Ro.DC,gD:h,zN:o,GN:a}}static HN(t){const i=t.ZC(),{version:e,flags:s}=hT(i),n=t.ZC(),r=s.Oy(Jh.BASE_DATA_OFFSET_PRESENT)?t.tD():void 0,h=s.Oy(Jh.SAMPLE_DESCRIPTION_INDEX_PRESENT)?t.ZC():void 0,o=s.Oy(Jh.DEFAULT_SAMPLE_DURATION_PRESENT)?t.ZC():void 0,a=s.Oy(Jh.DEFAULT_SAMPLE_SIZE_PRESENT)?t.ZC():void 0,u=s.Oy(Jh.DEFAULT_SAMPLE_FLAGS_PRESENT)?t.ZC():void 0;return{Km:Ro.BC,bD:e,SD:s,$D:n,XN:r,jN:h,NN:o,MN:a,LN:u}}static WN(i,e){const s=i.ZC(),{version:n,flags:r}=hT(s),h=i.ZC(),o=r.Oy(eT.DATA_OFFSET_PRESENT)?i.$C():void 0,a=r.Oy(eT.FIRST_SAMPLE_FLAGS_PRESENT)?i.ZC():void 0,u=[];for(let s=0;s0){const t=Cu(e,s);for(let i=0;i>31&1,n=2147483647&t,r=Cu(i,e),h=Cu(i,e),o=h>>31&1,a=h>>28&7,u=268435455&h;d.push({uM:s,cM:n,ct:r,dM:o,lM:a,fM:u})}return{Km:Ro.HC,bD:n,SD:r,vM:h,qD:o,_M:a,gM:u,pM:c,mM:d}}static qN(t){const i=t.ck,e=t.KC,s=Cu(i,e),{version:n,flags:r}=hT(s);let h;return h=0===n?Wt.fromBits(Cu(i,e),0,!0):et(i,e),{Km:Ro.MC,bD:n,SD:r,GN:h}}},oT={playready:"https://pr-keyos.licensekeyserver.com/core/rightsmanager.asmx",widevine:"https://wv-keyos.licensekeyserver.com/",fairplay:"https://fp-keyos.licensekeyserver.com/getkey"};function aT(t){if(!t)return!0;const i=t.licenseAcquisitionURL,e=t.certificateURL,s=t.keys,n=t.headers,r=t.useCredentials,h=t.queryParameters;return!(i||e||s||n||r||h)}function uT(t){return t&&void 0!==t.licenseAcquisitionURL}var cT=uT,dT=uT;function lT(t){if(!t)return!0;if(gT(t))return!1;const i=t.fairplay,e=t.playready,s=t.widevine,n=t.clearkey,r=t.aes128;return aT(i)&&aT(e)&&aT(s)&&void 0===n&&aT(r)}function fT(t){const i=JS(t),e=function(t){var i;const e=t;return YS(e)&&""!==(null==(i=e.fairplay)?void 0:i.headers.PreAuthorization)&&!KS(e)}(t);return(!i||!e)&&(i||e)}function vT(t){return t.integration===LS}function _T(t){const i=t;if(!i)return!1;if(lT(i))return!1;const e=i.fairplay,s=i.playready,n=i.widevine,r=i.clearkey;if(gT(t))return!0;if(e&&!function(t){const i=t;return i&&(void 0!==i.certificateURL||void 0!==i.certificate)}(e))return!1;if(s&&!cT(s))return!1;if(n&&!dT(n))return!1;if(r&&!function(t){return void 0!==t}(r))return!1;if(i.integration){if(tT.LR.DR(i.integration))return!0;switch(i.integration){case Pr:if(!function(t){const i=t,e=i.integration===Pr;return e&&(pT(t)||mT(t))}(t))return!1;break;case OS:if(!wT(t))return!1;break;case FS:if(!function(t){const i=t;return i.integration===FS}(t))return!1;break;case LS:if(!vT(t))return!1;break;case NS:if(!fT(t))return!1;break;case MS:if(!function(t){const i=t;return i.integration===MS}(t))return!1;break;case Ar:if(!gT(t))return!1;break;case US:if(!function(t){const i=t;return i.integration===US&&(void 0!==i.token||function(t){return void 0!==t.merchant&&void 0!==t.sessionId&&void 0!==t.userId}(i))}(t))return!1;break;case VS:if(!function(t){const i=t;return i.integration===VS}(t))return!1;break;case WS:if(!yT(t))return!1;break;case qS:if(!function(t){return t.integration===qS}(t))return!1;break;case zS:if(!AT(t))return!1;break;case HS:if(!function(t){const i=t;return i.integration===HS&&void 0!==i.token}(t))return!1;break;case GS:if(!function(t){const i=t;return i.integration===GS}(t))return!1;break;case XS:if(!function(t){const i=t;return i&&it(i.releasePid)&&it(i.accountId)&&it(i.token)}(t))return!1;break;case jS:return!0;default:return!1}}return!0}function gT(t){return t.integration===Ar}function pT(t){return void 0!==t.authToken}function mT(t){const i=t;return void 0!==i.accountName&&void 0!==i.customerName&&void 0!==i.portalId}function wT(t){const i=t;return i.integration===OS&&void 0!==i.token}function yT(t){const i=t;return i&&i.integration===WS&&Z(i.ticketAcquisitionURL)&&Z(i.streamId)}function AT(t){const i=t;return i.integration===zS&&void 0!==i.token}function bT(t,i){const e=i[t];var s;const n=null!=(s=null==e?void 0:e.licenseAcquisitionURL)?s:oT[t];var r;const h=null!=(r=null==e?void 0:e.customdata)?r:i.customdata,o=h?{customData:h}:{};var a;const u=Mo({},null!=(a=null==e?void 0:e.headers)?a:{},o),c=null!=e?e:{},{customdata:d}=c;return Mo({},QS(c,["customdata"]),{licenseAcquisitionURL:n,headers:u})}function ST(t){switch(t.toLowerCase()){case"widevine":case Wg:return Wg;case"playready":case Vg:return Vg;case"fairplay":case Qs:return Qs}}function TT(t,i){switch(t){case Mg:return function(t){const i={},e=jt.xD(new DataView(t));for(const t of e)i[t.rM]=t.aM;return i}(i);case Lg:case Og:return function(t){return{[Kg]:t}}(i);case Fg:return function(t){return{[jg]:t}}(i);default:throw new Ga(Vo.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Unsupported initDataType "+t)}}async function kT(t,i){return void 0===i&&(i=!1),!(!t.widevine||!await zd.Am())||(!(!t.playready||!await zd.ym())||(!(!t.clearkey||!await zd.pm())||!(i||!t.fairplay||!await zd.wm())))}function ml(t,i,e){const s=function(t,i,e){var s;const{useCredentials:n,crossOrigin:r}=function(t,i){let e=Xh.Lk;return t.useCredentials?e=Xh.uR:t.crossOrigin&&(e=JT(t.crossOrigin)),e===Xh.Lk&&i&&i.vr&&i.vr[360]&&(e=Xh.aR),{useCredentials:e===Xh.uR,crossOrigin:e}}(t,i);let h=t.liveOffset;it(h)||(h=e&&it(e.liveOffset)?e.liveOffset:void 0);let o=t.timeServer;it(o)||(o=i&&it(i.timeServer)?i.timeServer:void 0);let a=t.hlsDateRange;it(a)||(a=e&&it(e.hlsDateRange)?Boolean(e.hlsDateRange):void 0);const u=Boolean(t.experimentalRendering),c=Boolean(t.nativeUiRendering),d=Boolean(t.lowLatency),l=Boolean(t.useNativePlayback),f=Boolean(t.useManagedMediaSource),v=it(t.dash)?PT(t.dash):void 0,_=it(t.hls)?xT(t.hls):void 0,g=DT(CT(t.abr),null==e?void 0:e.abr),p=lS(t.lcevc),m=it(t.ignoreEmbeddedTextTrackTypes)?fk(t.ignoreEmbeddedTextTrackTypes):[];var w;const y=XT(null!=(w=t.seamlessSwitchStrategy)?w:null==(s=t.dash)?void 0:s.useSeamlessPeriodSwitch),A=zT(t.latencyConfiguration);return{crossOrigin:r,useCredentials:n,liveOffset:h,timeServer:o,hlsDateRange:a,experimentalRendering:u,nativeUiRendering:c,lowLatency:d,useNativePlayback:l,useManagedMediaSource:f,dash:v,hls:_,abr:g,lcevc:p,ignoreEmbeddedTextTrackTypes:m,seamlessSwitchStrategy:y,latencyConfiguration:A}}(t,i,e),n=CS(t.src);let r=t.type;r||(r=t.src?_u(t.src):void 0);const h=function(t,i){let e;e=it(t.contentProtection)?t.contentProtection:it(t.drm)?t.drm:it(i)&&it(i.contentProtection)?i.contentProtection:it(i)&&it(i.drm)?i.drm:void 0;return ET(e)}(t,i);return Mo({},s,{src:n,type:r,contentProtection:h,ssai:it(t.ssai)?BS(t.ssai):void 0,integrationData:void 0,isAdvertisement:Boolean(t.isAdvertisement)})}function ET(t){return _T(t)&&t.integration&&t.integration===Ar?function(t){const i=bT(an.zm,t),e=bT(an.qm,t),s=t[an.jm]&&bT(an.jm,t);return Mo({integration:"keyos",widevine:i,playready:e},s?{fairplay:s}:{})}(t):t}function PT(t){return{useSeamlessPeriodSwitch:XT(null==t?void 0:t.useSeamlessPeriodSwitch),needsTimescaleShifting:lS(null==t?void 0:t.needsTimescaleShifting),desiredTimescale:void 0!==(null==t?void 0:t.desiredTimescale)?co(null==t?void 0:t.desiredTimescale):void 0,forceSeekToSynchronize:lS(null==t?void 0:t.forceSeekToSynchronize),ignoreAvailabilityWindow:lS(null==t?void 0:t.ignoreAvailabilityWindow),forceHardSwitchWhenSeekingBackwards:lS(null==t?void 0:t.forceHardSwitchWhenSeekingBackwards),segmentRelativeVttTiming:lS(null==t?void 0:t.segmentRelativeVttTiming),forceRecreateMediaSourceOnAudioSwitch:lS(null==t?void 0:t.forceRecreateMediaSourceOnAudioSwitch)}}function xT(t){return{discontinuityAlignment:IT(null==t?void 0:t.discontinuityAlignment),delaySubtitlePreload:Zn(null==t?void 0:t.delaySubtitlePreload)}}function IT(t){if(!t||!Z(t))return"auto";switch(t){case"playlist":return"playlist";case"media":return"media";default:return"auto"}}r(),r(),r(),r();var Ci=function(t){return t.Dk="audio",t.Bk="video",t.NT="text",t.Nk="image",t.pk="unknown",t}({});function RT(t){return"audio"===t||"video"===t}function CT(t){if(!it(t))return;return BT(vS(null==t?void 0:t.preferredAudioCodecs,Hi),vS(null==t?void 0:t.preferredVideoCodecs,Hi),lS(null==t?void 0:t.restrictToPlayerSize))}function DT(t,i){if(!it(t)&&!it(i))return;var e;return BT(NT(null==t?void 0:t.preferredAudioCodecs,null==i?void 0:i.preferredAudioCodecs),NT(null==t?void 0:t.preferredVideoCodecs,null==i?void 0:i.preferredVideoCodecs),null!=(e=null==t?void 0:t.restrictToPlayerSize)?e:null==i?void 0:i.restrictToPlayerSize)}function BT(t,i,e){if(0!==t.length||0!==i.length||void 0!==e)return{preferredAudioCodecs:0===t.length?void 0:t,preferredVideoCodecs:0===i.length?void 0:i,restrictToPlayerSize:e}}function NT(t,i){return void 0!==t&&(null==t?void 0:t.length)>0?t:null!=i?i:[]}function MT(t,i){if(void 0!==i)switch(t){case Ci.Bk:return i.preferredVideoCodecs;case Ci.Dk:return i.preferredAudioCodecs;default:return}}r(),r(),r();var Vi=!1;r();var Do=function(t){return t.wM="canplay",t.yM="canplaythrough",t.AM="loadeddata",t.bM="loadedmetadata",t.wI="readystatechange",t.SM="waiting",t.TM="playing",t}({}),K=["canplay","canplaythrough","loadeddata","loadedmetadata","readystatechange","waiting","playing"];function LT(t,i,e){return e?t<=i:t=this.V)throw new m("The index provided ("+t+") is greater than the maximum bound ("+this.V+")")}DM(t){if(0===this.V)return 0;if(this.Cr(t))return t;if(t<=this.Tn(0))return this.Tn(0);if(t>=this.An(this.V-1))return this.An(this.V-1);{let i=0,e=1/0;for(let s=0;su||(r===e&&(c=o||c,o=c),h===u&&(d=a||d,a=d),LT(e,h+i,a||c)?(h=u,a=d):(s.push(r,h),n.push(o,a),r=e,h=u,o=c,a=d))}return s.push(r,h),n.push(o,a),new t(s,n).NM()}NM(){const i=[],e=[];for(let t=0;t=0}HM(t,i,e,s,n){return this.WM(t,i,e,s,n)>=0}qM(t,i,e,s,n){return this.zM(t,i,e,s,n)>=0}GM(t){if(t.V!==this.V)return!1;for(let i=0;i=0;t-=1)if(LT(this.Tn(t),e,this.PM(t)))return t;return-1}QM(t,i){void 0===i&&(i=0);const e=t-i;for(let t=0;te)return t;return-1}YM(i){return this.RM(i),new t([this.Tn(i),this.An(i)],[this.PM(i),this.IM(i)])}JM(t,i){const e=this.VM(t,i);return e<0?void 0:this.YM(e)}get ZM(){let t=0;for(let i=0;i>1,this.EM=t,this.xM=i||function(t){const i=new Array(2*t);for(let e=0,s=0;e{var e;return _.max(t,null!=(e=null==i?void 0:i.minimumOffset)?e:0)},t),n=e.reduce((t,i)=>{var e;return _.max(t,null!=(e=null==i?void 0:i.targetOffset)?e:0)},s+UT),r=e.reduce((t,i)=>{var e;return _.max(t,null!=(e=null==i?void 0:i.maximumOffset)?e:0)},n+UT);return{minimumOffset:s,targetOffset:n,maximumOffset:r,forceSeekOffset:e.reduce((t,i)=>{var e;return _.max(t,null!=(e=null==i?void 0:i.forceSeekOffset)?e:0)},r+UT),minimumPlaybackRate:e.reduce((t,i)=>{var e;return _.min(t,null!=(e=i.minimumPlaybackRate)?e:Ot)},Ot),maximumPlaybackRate:e.reduce((t,i)=>{var e;return _.max(t,null!=(e=i.maximumPlaybackRate)?e:Jt)},Jt)}}_L(){var t;const i=null==(t=ve.jn(this.oa.IP).JM(this.oa.MP))?void 0:t.An(0),e=void 0!==i?i-this.oa.MP:0;this.gL=_.min(this.gL,e),this.pL+=1}mL(){if(this.pL<10)return;const t=.25-this.gL,i=ur(this.vL+t,this.vL-.1,this.vL+.1);this.vL=ur(i,this.wL,this.yL),this.gL=1/0,this.pL=0}AL(){this.bL(),this.fE=zd.Og(()=>this.dL(),500)}bL(){void 0!==this.fE&&(zd.Lg(this.fE),this.fE=void 0)}Tn(){this.We&&this.SL&&(this.ho||this.TL.wn(d._y,this.dL),this.kL=zd.fm(()=>this._L(),1e3),this.EL=zd.fm(()=>this.mL(),6e4),this.AL(),this.ho=!0)}Xx(){this.ho&&(this.bL(),this.kL&&zd.vm(this.kL),this.EL&&zd.vm(this.EL),this.TL.mn(d._y,this.dL),this.PL(1),this.ho=!1)}zg(){this.Xx(),this.oa.mn(Do.SM,this.xL),this.oa.mn(Do.TM,this.IL),this.Vo()}PL(t){this.TL.CL.RL||this.oa.ux!==t&&(this.oa.ux=t)}get DL(){return this.oa.BL}constructor(t,i,e){var s;super(),this.oa=void 0,this.TL=void 0,this.ho=!1,this.We=!1,this.vL=void 0,this.rL=void 0,this.wL=void 0,this.yL=void 0,this.fL=void 0,this.oL=[],this.SL=!1,this.lL=0,this.fE=void 0,this.pL=0,this.gL=1/0,this.kL=void 0,this.EL=void 0,this.xL=()=>{const t=this.TL.IP,i=this.TL.MP,e=t.JM(i);e&&(this.lL=ur(e.An(0)-i,this.lL,.5),this.aL())},this.IL=()=>{this.SL=!0,this.oa.mn(Do.TM,this.IL),this.We&&this.Tn()},this.dL=()=>{this.bL(),this.AL();const t=this.DL;if(!t)return;const i=this.NL();if(t>this.rL.forceSeekOffset)return this.So(new wp("latencyrecoveryseek")),void this.oR();const{minimumOffset:e,targetOffset:s,maximumOffset:n}=this.rL,r=this.TL.ux;if(!this.ML(i,e,n))if(i>n&&this.LL()){const t=this.rL.maximumPlaybackRate;Vi,this.PL(t)}else if(i1&&is){const t=1;Vi,this.PL(t)}},this.oa=t,this.TL=i,this.fL=e,this.wL=e.targetOffset,this.yL=e.targetOffset+(null!=(s=e.leniency)?s:0),this.vL=e.targetOffset,this.rL=this.cL(),this.oa.wn(Do.SM,this.xL),this.oa.wn(Do.TM,this.IL)}},HT=.66,WT=1.5,qT=3;function zT(t){if(!it(t))return;const i=zd.Zs.mp?10:0,e=t.targetOffset;var s;var n;var r;var h;var o;var a;return{minimumOffset:null!=(s=t.minimumOffset)?s:e*HT,targetOffset:e,maximumOffset:null!=(n=t.maximumOffset)?n:e*WT,forceSeekOffset:_.max(null!=(r=t.forceSeekOffset)?r:e*qT,i),minimumPlaybackRate:null!=(h=t.minimumPlaybackRate)?h:Ot,maximumPlaybackRate:null!=(o=t.maximumPlaybackRate)?o:Jt,leniency:null!=(a=t.leniency)?a:void 0}}var Oh=function(t){return t.OL="auto",t.FL="always",t.UL="never",t.CLEAR_ONLY="clear-only",t.SAME_DRM_ONLY="same-drm-only",t}({}),GT=function(t){return t.UPLYNK="uplynk",t.MEDIATAILOR="mediatailor",t}({});function XT(t){if(!t||!Z(t))return"auto";switch(t){case"always":return"always";case"never":return"never";case"clear-only":return"clear-only";case"same-drm-only":return"same-drm-only";default:return"auto"}}r(),r();var jT=function(t){return t.ENABLED="enabled",t.INSECURE="insecure",t.DISABLED="disabled",t}({});r();var QT=!1;r();var KT=function(t){return t.NONE="none",t.MIDROLL_AND_POSTROLL="midroll-and-postroll",t}({});r();var nh=function(t){return t.DEFAULT="",t.SRT="srt",t.TTML="ttml",t.WEBVTT="webvtt",t.EMSG="emsg",t.EVENT_STREAM="eventstream",t.ID3="id3",t.CEA608="cea608",t.DATE_RANGE="daterange",t.MILLICAST="millicast",t}({});function YT(t){switch(t){case"":case"srt":case"ttml":case"webvtt":case"emsg":case"eventstream":case"id3":case"cea608":case"daterange":case"millicast":return!0;default:return!1}}function _u(t){const i=null==t?void 0:t.match(/\b(?:m3u8|mpd)\b/i);if(!i)return Ba.fR;switch(i[0].toLowerCase()){case"mpd":return Ba.cR;case"m3u8":return Ba.dR;default:return Ba.fR}}function JT(t){switch(t){case Xh.aR:case Xh.uR:return t;default:return Xh.Lk}}function ZT(t){if(!t)return!1;const i=t.toLowerCase();return Vh(i,Ba.cR)}function $T(t){if(!t)return!1;const i=t.toLowerCase();return Vh(i,Ba.dR)||Vh(i,Ba.lR)}function tk(t){return Lu(t)&&Lu(t.ssai)&&"google-dai"===t.ssai.integration}function Qi(t){return Lu(t)&&"uplynk"===t.integration}function ik(t){return Lu(t)&&"theolive"===t.type}function ek(t){return Lu(t)&&"mediatailor"===t.integration}function bl(t){return Lu(t)&&"millicast"===t.type}function sk(t){if(t.sources)if(ul(t.sources)){for(const i of t.sources)if(bl(i))return!0}else if(Lu(t.sources))return bl(t.sources);return!1}function nk(t){if(Z(t))return!t;if(Qi(t))return!t.id;if(tk(t)){const i=t.ssai,e="live"===i.availabilityType&&i.assetKey,s="vod"===i.availabilityType&&i.contentSourceID&&i.videoID;return Boolean(e&&s)}return bl(t)?!t.src||!t.streamAccountId:!t.src}function pr(t){return Boolean(Lu(t)&&Z(t.src))}function rk(t){return t.type===Ba.vR||t.type===Ba._R}function hk(t){return Z(t)||pr(t)||tk(t)||Qi(t)||bl(t)}function ok(t){if(t){if(hk(t))return nk(t);for(const i of t)if(!nk(i))return!1;return!0}return!0}function ak(){return{crossOrigin:Xh.Lk,useCredentials:!1,liveOffset:void 0,timeServer:void 0,hlsDateRange:void 0,experimentalRendering:!1,nativeUiRendering:!1,lowLatency:!1,useNativePlayback:!1,useManagedMediaSource:!1,dash:void 0,hls:void 0,abr:void 0,lcevc:void 0,ignoreEmbeddedTextTrackTypes:[],seamlessSwitchStrategy:Oh.OL,latencyConfiguration:void 0}}function uk(){return Mo({},ak(),{src:void 0,type:Ba.fR,contentProtection:void 0,ssai:void 0,integrationData:void 0,isAdvertisement:void 0})}function ck(t){const i={allowedMimeTypes:void 0,preload:"midroll-and-postroll",showCountdown:!0,vpaidMode:jT.ENABLED,googleIma:{useNativeIma:!1,useAdUiElementForSsai:!0,bitrate:-1,language:void 0,uiElements:void 0,allowSeekingForGoogleDai:!1},theoads:QT,allowSkipAdBreak:!1};return void 0===t||(void 0!==t.preload&&(i.preload=function(t){return"none"===t?KT.NONE:KT.MIDROLL_AND_POSTROLL}(t.preload)),void 0!==t.showCountdown&&(i.showCountdown=Zn(t.showCountdown)),void 0!==t.vpaidMode&&(i.vpaidMode=function(t){switch(t){case"insecure":return jT.INSECURE;case"disabled":return jT.DISABLED;default:return jT.ENABLED}}(t.vpaidMode)),ul(t.allowedMimeTypes)&&(i.allowedMimeTypes=t.allowedMimeTypes.filter(Z)),void 0!==t.googleIma&&(i.googleIma=function(t){return void 0===t?{useNativeIma:!1,useAdUiElementForSsai:!0,bitrate:-1,language:void 0,uiElements:void 0,allowSeekingForGoogleDai:!1}:{useNativeIma:Zn(t.useNativeIma),useAdUiElementForSsai:null==(i=lS(t.useAdUiElementForSsai))||i,bitrate:null!=(e=t.bitrate)?e:-1,language:it(t.language)?Hi(t.language):void 0,uiElements:t.uiElements,allowSeekingForGoogleDai:Zn(t.allowSeekingForGoogleDai)};var i,e}(t.googleIma)),void 0!==t.theoads?i.theoads=Zn(t.theoads):i.theoads=QT,i.allowSkipAdBreak=Zn(t.allowSkipAdBreak)),i}function dk(t){if(!Pc(t))return[];const i=[];for(const e of t)Lu(e)&&i.push(e);return i}function lk(t){return Z(t.src)||bl(t)}function fk(t){return ul(t)?t.filter(YT):[]}r(),r();var mh=function(t){return t[t.VL=0]="VL",t[t.Qn=1]="Qn",t[t.HL=2]="HL",t[t.WL=3]="WL",t[t.qL=4]="qL",t}({}),G=class extends wp{constructor(t,i=mh.VL){super(d.Cw),this.currentTime=void 0,this.readyState=void 0,this.currentTime=t,this.readyState=i}};r();var hl=class extends wp{constructor(t){super(d.jw),this.currentTime=void 0,this.currentTime=t}};r();var Tc=class extends wp{constructor(t){super(d.uo),this.currentTime=void 0,this.currentTime=t}};r();var ut=class extends wp{constructor(t,i=mh.Qn){super(Do.bM),this.currentTime=void 0,this.readyState=void 0,this.currentTime=t,this.readyState=i}};r();var Rs=class extends wp{constructor(t){super(d.Rw),this.duration=void 0,this.duration=t}};r();var aa=class extends wp{constructor(t,i){super(d.Kw),this.currentTime=void 0,this.playbackRate=void 0,this.currentTime=t,this.playbackRate=i}};r();var Si=class extends wp{constructor(t,i){super(d._y),this.currentTime=void 0,this.currentProgramDateTime=void 0,this.currentTime=t,this.currentProgramDateTime=i}};r();var At=class extends wp{constructor(t){super(d.Bw),this.currentTime=void 0,this.currentTime=t}};r();var ot=class extends wp{constructor(t,i=mh.HL){super(Do.AM),this.currentTime=void 0,this.readyState=void 0,this.currentTime=t,this.readyState=i}};r();var F=class extends wp{constructor(t){super(d.$w),this.currentTime=void 0,this.currentTime=t}};r();var Es=class extends wp{constructor(t){super(d.Zw),this.currentTime=void 0,this.currentTime=t}};r();var Ze=class extends wp{constructor(t,i){super(d.gy),this.currentTime=void 0,this.volume=void 0,this.currentTime=t,this.volume=i}};r();var lo=class extends wp{constructor(t,i=mh.WL){super(Do.wM),this.currentTime=void 0,this.readyState=void 0,this.currentTime=t,this.readyState=i}};r();var qt=class extends wp{constructor(t,i=mh.qL){super(Do.yM),this.currentTime=void 0,this.readyState=void 0,this.currentTime=t,this.readyState=i}};r();var ou=class extends wp{constructor(t,i){super(Do.wI),this.currentTime=void 0,this.readyState=void 0,this.currentTime=t,this.readyState=i}};r();var Pi=class extends Oi{get error(){return this.errorObject.message}xa(){return this}constructor(t){super(Mc.ma),this.errorObject=void 0,this.errorObject=t}};async function $i(t,i,e,s,n){void 0===e&&(e=3),void 0===s&&(s=1e3),void 0===n&&(n=1/0);let r=0;for(;;)try{return await t(i)}catch(t){if(sa(t),rmh.VL&&w===mh.VL)&&t.So(new G(l,w)),p&&!o?t.So(new hl(l)):!p&&o&&t.So(new Tc(l)),w>=mh.Qn&&(s||u=mh.HL&&(s||u=mh.WL&&(s||u=mh.qL&&(s||ut.QL(i),addEventListener(i,e){t.wn(Ik(i),e)},removeEventListener(i,e){t.mn(Ik(i),e)}}}var xk=["stats"];function Ik(t){const i=$a(t,Hi);return(Z(i)?[i]:i).filter(t=>pi(xk,t))}var Rk=class extends Ne{set BI(t){const i=this.NI;t!==i&&(i&&this.MI(i),t&&this.OI(t),this.NI=t)}get BI(){return this.NI}get Ca(){return this.hu||(this.hu=Pk(this)),this.hu}OI(t){t.wn(xk,this.Rs)}MI(t){t.mn(xk,this.Rs)}QL(t){var i,e;return null!=(e=null==(i=this.NI)?void 0:i.QL(t))?e:{}}kn(){this.Vo(),this.NI&&this.MI(this.NI),this.NI=void 0}constructor(){super(),this.NI=void 0,this.hu=void 0,this.NI=void 0}},Ck=class extends Yc{Aa(){return this.KL}EP(){return this.YL}get zP(){return this.GP()}get jP(){var t;return null!=(t=this.QP())?t:this.JL}GP(){return this.ZL}QP(){return this.JL}Ix(){return this.Gl}Dx(){return this.$L}tO(t){const i=this.PP;if(i===t)return;i.mw(this.iI);const e=wk(this),s=this.NP(),n=this.Hx(),r=this.Wx();this.PP=t,this.YL.BI=t.ht,this.$L.BI=t.rt,this.Gl.BI=t.nt,this.KL.BI=t.Aa(),this.ZL.BI=t.zP,this.JL.BI=t.jP,void 0!==e&&Ri(this,e,this);const h=this.NP();h!==s&&this.So(new bk(h)),this.Hx()!==n&&this.So(new lt),this.Wx()!==r&&this.So(new Sk),t.lw(this.iI)}async kn(){await super.kn(),this.KL.kn(),this.YL.kn(),this.$L.kn(),this.Gl.kn(),this.ZL.kn(),this.JL.kn()}constructor(t){super(t),this.YL=new He,this.$L=new He,this.Gl=new sl,this.KL=void 0,this.ZL=new yl,this.JL=new Rk,this.KL=new io(t.Aa()),this.YL.BI=t.ht,this.$L.BI=t.rt,this.Gl.BI=t.nt,this.ZL.BI=t.zP,this.JL.BI=t.jP}};r();var Dk=class extends Ck{ZP(){return function(t){let i=0,e=0,s=0,n=0,r=0,h=0,o=0;for(const a of t)i+=a.iO,e+=a.eO,s+=a.sO,n+=a.nO,r+=a.rO,h+=a.hO.amountOfBufferedAudioSegments,o+=a.hO.amountOfBufferedVideoSegments;return{iO:i,eO:e,sO:s,nO:n,rO:r,hO:{amountOfBufferedAudioSegments:h,amountOfBufferedVideoSegments:o}}}(this.oO.map(t=>t.JP))}Xx(){return gn(this.oO.map(t=>t.Xx())).then(Ct)}hr(){return gn(this.oO.map(t=>t.hr())).then(Ct)}qx(){if(!this.ko){for(const t of this.oO)t.qx();this.ko=!0}}xP(){const t=[];for(const i of this.oO)t.push(...i.xP());return t}Zx(t){let i=!1;for(const e of this.oO)i=e.Zx(t)||i;return i}So(t){this.Zx(t)||super.So(t)}get BI(){return this.PP}set BI(t){this.tO(t)}aO(t){this.oO.push(t)}uO(t){oi(this.oO,t)}tO(t){if(t===this.PP)return;const i=this.PP;i.mr(),super.tO(t),t.gr(i)}Yx(){for(const t of this.oO)t.Yx()}async kn(){this.Vo(),this.PP.mr();for(const t of this.oO)this.PP!==t&&await t.kn();await super.kn()}constructor(t){super(t),this.oO=[],this.ko=!1,this.cO=!1,this.aO(t)}};r();var Bk=function(t){return t[t.ABORTED=1]="ABORTED",t[t.NETWORK=2]="NETWORK",t[t.DECODE=3]="DECODE",t[t.SRC_NOT_SUPPORTED=4]="SRC_NOT_SUPPORTED",t[t.ENCRYPTED=5]="ENCRYPTED",t[t.LICENSE_INVALID=6]="LICENSE_INVALID",t[t.ADVERTISEMENT_ERROR=7]="ADVERTISEMENT_ERROR",t}({}),Nk=class extends wf{get name(){return"MediaError"}constructor(t,i,e,s){super(i),this.code=void 0,this.message=void 0,this.cause=void 0,this.systemCode=void 0,this.code=t,this.message=null!=i?i:"Unknown error",this.cause=e,this.systemCode=s,m.captureStackTrace&&m.captureStackTrace(this,this.constructor)}};function Mk(t){hS(t,"MEDIA_ERR_ABORTED",1),hS(t,"MEDIA_ERR_NETWORK",2),hS(t,"MEDIA_ERR_DECODE",3),hS(t,"MEDIA_ERR_SRC_NOT_SUPPORTED",4),hS(t,"MEDIA_ERR_ENCRYPTED",5)}function P(t){var i,e;return function(t){return t.category===Je.CONTENT_PROTECTION}(t)?new Nk(5,t.message,null==(i=t.cause)?void 0:i.message,t.systemCode):new Nk(Lk(t.code),t.message,null==(e=t.cause)?void 0:e.message)}function Lk(t){if(t===Vo.MEDIA_ABORTED)return 1;if(t===Vo.MANIFEST_LOAD_ERROR||t===Vo.MEDIA_LOAD_ERROR||t===Vo.SUBTITLE_LOAD_ERROR)return 2;if(t===Vo.MEDIA_DECODE_ERROR)return 3;if(t===Vo.MEDIA_NOT_SUPPORTED)return 4;const i=Je.fromCode(t);return i===Je.NETWORK?2:i===Je.SOURCE?4:i===Je.LICENSE?6:i===Je.CONTENT_PROTECTION?5:i===Je.AD?7:3}function Ok(t){return new Ga(Fk(t.code),t.message,t)}function Fk(t){switch(t){case 1:return Vo.MEDIA_ABORTED;case 2:return Vo.NETWORK_ERROR;case 3:return Vo.MEDIA_DECODE_ERROR;case 4:return Vo.SOURCE_NOT_SUPPORTED;case 5:return Vo.CONTENT_PROTECTION_ERROR;case 6:return Vo.LICENSE_ERROR;case 7:return Vo.AD_ERROR}}Mk(Nk),Mk(Nk.prototype),r(),r(),r(),r(),r();var rs=class extends eo{tt(t){return super.tt(t)}xa(){return yS(this)}};r(),r(),r(),r();var Uk=class{get II(){return this.dO}get V(){return this.dO.length}get Ca(){return this.hu||(this.hu=function(t){const i=t.II.map(t=>t.Ca);return i.item=i=>{const e=0|i,s=t.CI(e);return s&&s.Ca||void 0},i}(this)),this.hu}lO(t){this.dO.push(t),this.hu&&this.hu.push(t.Ca)}_S(t){oi(this.dO,t),this.hu&&oi(this.hu,t.Ca)}CI(t){return this.dO[t]}fO(t){return ul(t)?function(t,i){for(const e of i)if(!pi(t,e))return!1;return!0}(this.dO,t):pi(this.dO,t)}hr(){Yo(this.dO),this.hu&&Yo(this.hu)}constructor(){this.dO=[],this.hu=void 0}};r();var Uh=class extends Js{xa(){return new Vk(this.Ht.Ca)}constructor(t){super(Te.SI),this.Ht=void 0,this.Ht=t}},Vk=class extends Ae{constructor(t){super("update"),this.track=void 0,this.track=t}};r();var Hk=0;function ki(){return Hk++}var Wk=0;var qk=0;function zk(){return qk++}var Gk=0;function Xk(){return Gk++}var jk=0;var Qk=class extends Ne{get XI(){}get Rt(){return this.We}set Rt(t){this.We!==t&&(this.We=t,this.vO=t,this.So(new nr(this)))}get vO(){return this._O.enabled}set vO(t){this._O.enabled=t}get Ca(){return this.hu||(this.hu=fo(this)),this.hu}get o(){return this.hS}get jI(){return this.gO}get Lt(){return this._O.kind}get Th(){return this.pO}set Th(t){t!==this.pO&&(this.pO=t,this.So(new Uh(this)))}get bs(){return this._O.language}get Xk(){return this.Rt?"enabled":"disabled"}get mO(){return this._O}get KI(){return this.dO}get YI(){}set YI(t){}wO(t){this.Rt=t}yO(){this.Rt=this.vO}constructor(t){super(),this.Km=Ci.Dk,this._O=void 0,this.hS=void 0,this.pO=void 0,this.gO=void 0,this.We=!1,this.dO=void 0,this.hu=void 0,this._O=t,this.gO=ki(),this.hS=""+jk++,this.pO=t.label,this.dO=new Uk,this.yO()}};r();var Kk=0;var Yk=class extends Ne{get XI(){}get Rt(){return this.We}set Rt(t){this.We!==t&&(this.We=t,this.vO=t,this.So(new nr(this)))}get vO(){return Boolean(this._O.selected)}set vO(t){this._O.selected=t}get Ca(){return this.hu||(this.hu=fo(this)),this.hu}get o(){return this.hS}get jI(){return this.gO}get Lt(){return"main"}get Th(){return this.pO}set Th(t){t!==this.pO&&(this.pO=t,this.So(new Uh(this)))}get bs(){return this._O.language}get Xk(){return this.Rt?"enabled":"disabled"}get mO(){return this._O}get KI(){return this.dO}get YI(){}set YI(t){}yO(){this.Rt=this.vO}wO(t){this.Rt=t}constructor(t){super(),this.Km=Ci.Bk,this._O=void 0,this.hS=void 0,this.gO=void 0,this.We=!1,this.dO=void 0,this.pO=void 0,this.hu=void 0,this._O=t,this.gO=ki(),this.hS=""+Kk++,this.dO=new Uk,this.pO=t.label,this.yO()}};r();var Jk=class extends wp{constructor(t){super(d.yw),this.KP=void 0,this.KP=t}};r(),r();var Zu=function(t){return t[t.NONE=0]="NONE",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED",t[t.ERROR=3]="ERROR",t}({});r(),r();var Zk=function(t){return t.AO="cue",t.bO="region",t.SO="stylesheet",t}({});r(),r();var $k={"line-left":"start",center:"middle","line-right":"end"},tE={start:"line-left",middle:"center",end:"line-right"};function iE(t,i){if("auto"===t)switch(i){case"start":case"left":return"line-left";case"end":case"right":return"line-right";default:return"center"}return t}function eE(t,i){if("auto"===t)switch(i){case"left":return 0;case"right":return 100;default:return 50}return function(t,i){const e="number"==typeof t?t:C(t);return S(e)?i:e}(t,50)}r(),r(),r();var Me=function(t){return t.zL="yo",t.GL="jo",t.SI="er",t}({}),sE=class extends Js{constructor(t,i){super(t),this.TO=void 0,this.TO=i}},nE=class extends Ae{constructor(t,i){super(t),this.cue=void 0,this.cue=i}};function zt(t){const i=[Me.zL,Me.GL,Me.SI];let e;const s={get kO(){return t},get track(){return t.Ht.Ca},get id(){return t.o},get uid(){return t.jI},get startTime(){return t.EO},set startTime(i){t.EO=i},get endTime(){return t.PO},set endTime(i){t.PO=i},get content(){return t.U},addEventListener(t,i){const s=$a(t,Hi);e.wn(s,i)},removeEventListener(t,i){const s=$a(t,Hi);e.mn(s,i)}};return e=new mp(s),t.wn(i,t=>e.So(t.Ca)),s}function rE(){}function hE(t){return po(zt(t),{get align(){return t.xO},get line(){return t.IO},get lineAlign(){return t.RO},get position(){return t.mo},get positionAlign(){return t.CO},get region(){return t.DO?t.DO.Ca:null},get size(){return t.Vy},get snapToLines(){return t.BO},get text(){return t.U},get vertical(){return t.Pt}})}r(),r();var ue=class extends sE{xa(){return new oE(this.TO.Ca)}constructor(t){super(Me.SI,t)}},oE=class extends nE{constructor(t){super("update",t)}};r();var aE=class extends Js{xa(){return new uE(this.TO.Ca)}constructor(t){super(Te.cI),this.TO=void 0,this.TO=t}},uE=class extends Ae{constructor(t){super("updatecue"),this.cue=void 0,this.cue=t}},cE=.02;function dE(t,i){return uh(t.MO,i.MO,cE)&&uh(t.LO,i.LO,cE)&&t.o===i.o}var _h=class extends Ne{get EO(){return this.OO}set EO(t){var i,e;this.OO!==t&&(this.OO=t,null==(i=this.FO)||i.UO(this),this.So(new ue(this)),null==(e=this.FO)||e.So(new aE(this)))}get PO(){return this.VO}set PO(t){var i,e;this.VO!==t&&(this.VO=t,null==(i=this.FO)||i.UO(this),this.So(new ue(this)),null==(e=this.FO)||e.So(new aE(this)))}get o(){return this.hS}get jI(){return this.gO}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}xa(){return zt(this)}get ro(){return this.ho}set ro(t){this.ho=t}get Ht(){return this.FO}set Ht(t){this.FO=t}get U(){return this.HO}set U(t){var i;this.HO!==t&&(this.HO=t,this.So(new ue(this)),null==(i=this.FO)||i.So(new aE(this)))}get WO(){return this.qO}set WO(t){this.qO=t}zO(t){return this===t||uS(this,t)&&dE(this,t)&&this.GO(t)}GO(t){return _t(this.U,t.U)}XO(t,i){this.OO=t,this.VO=i,this.MO=t,this.LO=i}kn(){this.Vo()}constructor(t,i,e,s,n){super(),this.gO=void 0,this.hS=void 0,this.MO=void 0,this.LO=void 0,this.OO=void 0,this.VO=void 0,this.hu=void 0,this.FO=void 0,this.ho=!1,this.HO=void 0,this.qO=void 0,this.jO=-1,this.gO=Xk(),this.OO=t,this.VO=i,this.MO=t,this.LO=i,this.HO=e,this.qO=Boolean(s),this.hS=null!=n?n:""}};function lE(t,i){return t.U===i.U&&t.IO===i.IO&&t.RO===i.RO&&t.mo===i.mo&&t.CO===i.CO&&t.DO===i.DO&&t.BO===i.BO&&t.Vy===i.Vy&&t.xO===i.xO&&t.Pt===i.Pt}var fE=class extends _h{get Ca(){return this.hu||(this.hu=hE(this)),this.hu}get Km(){return Zk.AO}GO(t){return lE(this,t)}constructor(t,i,e,s,n){super(t,i,e,s,n),this.IO="auto",this.RO="start",this.mo="auto",this.CO="auto",this.DO=void 0,this.BO=!0,this.Vy=100,this.xO="center",this.Pt=""}};function vE(t){const i=t.IO,e=ho(i);return e&&!t.BO&&(i<0||i>100)?100:e?Number(i):t.BO?-1:100}function _E(t){return eE(t.mo,t.xO)}function gE(t){return iE(t.CO,t.xO)}function pE(t){const i=gE(t),e=_E(t);let s;switch(i){case"line-left":s=100-e;break;case"line-right":s=e;break;case"center":s=e<=50?2*e:2*(100-e)}return _.min(t.Vy,s)}function mE(t){return{get id(){return t.o},get lines(){return t.QO},get regionAnchorX(){return t.KO},get regionAnchorY(){return t.YO},get scrollValue(){return t.JO},get viewportAnchorX(){return t.ZO},get viewportAnchorY(){return t.$O},get width(){return t.Ti}}}r(),r();var wE=class{get Ca(){return this.hu||(this.hu=mE(this)),this.hu}get Km(){return Zk.bO}constructor(t,i,e,s,n,r,h,o){this.o=void 0,this.Ti=void 0,this.QO=void 0,this.KO=void 0,this.YO=void 0,this.ZO=void 0,this.$O=void 0,this.JO=void 0,this.hu=void 0,this.o=t,this.Ti=i,this.QO=e,this.KO=s,this.YO=n,this.ZO=r,this.$O=h,this.JO=o}};r(),r();var yE=1e6,AE=class{tF(t){return this.iF()*t}eF(t){return this.sF(t)>0}nF(t){return this.sF(t)>=0}rF(t,i){return this.oF(t).hF(i)}zO(t){return 0===this.sF(t)}aF(t){return this.sF(t)<0}hF(t){return this.sF(t)<=0}uF(){return this.cF()?this.dF():this}lF(t){return this.lO(t.dF())}oF(t){return this.lF(t).uF()}};function bE(t,i){return t.fF()?i.fF()?Qc.rh:Qc.Fg:i.fF()?Qc.Ug:t.vF()?i.vF()&&t.cF()===i.cF()?Qc.rh:t.cF()?Qc.Ug:Qc.Fg:i.cF()?Qc.Fg:Qc.Ug}r(),r();var SE=4294967296,TE=SE*SE,kE=TE*TE,EE=kE/2,No=class t{static _F(i,e,s){return s?new t(i.toUnsigned(),e.toUnsigned()):new t(i.toSigned(),e.toSigned())}static gF(i){return i.unsigned?new t(i,Wt.UZERO):new t(i,i.isNegative()?Wt.NEG_ONE:Wt.ZERO)}static pF(i,e){if(S(i))return e?t.mF:t.wF;if(e){if(i<0)return t.mF;if(i>=kE)return t.yF}else{if(i<=-EE)return t.AF;if(i+1>=EE)return t.bF}return i<0?t.pF(-i,e).dF():t._F(Wt.fromNumber(i%TE),Wt.fromNumber(i/TE),e)}SF(){return this.TF.unsigned}kF(){return this.EF.isZero()&&this.TF.isZero()}cF(){return this.TF.isNegative()}PF(){return this.SF()?t._F(this.EF,this.TF,!1):this}xF(){return this.SF()?this:t._F(this.EF,this.TF,!0)}IF(){return this.EF}iF(){return this.cF()?-this.dF().iF():this.TF.toNumber()*TE+this.EF.toUnsigned().toNumber()}RF(){return this.EF.toInt()}zO(t){return(this.SF()===t.SF()||this.TF.getHighBits()>>>31!=1||t.TF.getHighBits()>>>31!=1)&&(this.TF.toUnsigned().eq(t.TF.toUnsigned())&&this.EF.toUnsigned().eq(t.EF.toUnsigned()))}sF(t){if(this.zO(t))return Qc.rh;const i=this.cF(),e=t.cF();if(i&&!e)return Qc.Ug;if(!i&&e)return Qc.Fg;if(!this.SF())return this.lF(t).cF()?Qc.Ug:Qc.Fg;const s=this.xF(),n=t.xF(),r=n.TF.comp(s.TF);return r>0||0===r&&n.EF.gt(s.EF)?Qc.Ug:Qc.Fg}aF(t){return this.sF(t)<0}hF(t){return this.sF(t)<=0}CF(t){return this.sF(t)>0}DF(t){return this.sF(t)>=0}BF(){return new t(this.EF.not(),this.TF.not())}NF(i){return new t(this.EF.and(i.EF),this.TF.and(i.TF))}MF(i){return new t(this.EF.or(i.EF),this.TF.or(i.TF))}LF(i){const e=127&i;return 0===e?this:e<64?t._F(this.EF.shl(e),this.TF.shl(e).or(this.EF.shru(64-e)),this.SF()):t._F(Wt.ZERO,this.EF.shl(e-64),this.SF())}OF(i){const e=127&i;return 0===e?this:e<64?t._F(this.EF.shru(e).or(this.TF.shl(64-e)),this.TF.shr(e),this.SF()):t._F(this.TF.shr(e-64),this.TF.isNegative()?Wt.NEG_ONE:Wt.ZERO,this.SF())}FF(i){const e=127&i;return 0===e?this:e<64?t._F(this.EF.shru(e).or(this.TF.shl(64-e)),this.TF.shru(e),this.SF()):64===e?t._F(this.TF,Wt.ZERO,this.SF()):t._F(this.TF.shru(e-64),Wt.ZERO,this.SF())}lO(i){const e=this.TF.high>>>16,s=65535&this.TF.high,n=this.TF.low>>>16,r=65535&this.TF.low,h=this.EF.high>>>16,o=65535&this.EF.high,a=this.EF.low>>>16,u=65535&this.EF.low,c=i.TF.high>>>16,d=65535&i.TF.high,l=i.TF.low>>>16,f=65535&i.TF.low,v=i.EF.high>>>16,_=65535&i.EF.high,g=i.EF.low>>>16;let p=0,m=0,w=0,y=0,A=0,b=0,S=0,T=0;T+=u+(65535&i.EF.low),S+=T>>>16,T&=65535,S+=a+g,b+=S>>>16,S&=65535,b+=o+_,A+=b>>>16,b&=65535,A+=h+v,y+=A>>>16,A&=65535,y+=r+f,w+=y>>>16,y&=65535,w+=n+l,m+=w>>>16,w&=65535,m+=s+d,p+=m>>>16,m&=65535,p+=e+c,p&=65535;const k=this.SF(),E=Wt.fromBits(w<<16|y,p<<16|m,k),P=Wt.fromBits(S<<16|T,A<<16|b,k);return t._F(P,E,k)}lF(t){return this.lO(t.dF())}dF(){return this.BF().lO(t.UF)}VF(i){if(this.kF()||i.kF())return this.SF()?t.mF:t.wF;if(this.cF())return i.cF()?this.dF().VF(i.dF()):this.dF().VF(i).dF();if(i.cF())return this.VF(i.dF()).dF();if(this.TF.isZero()&&0===this.EF.high&&i.TF.isZero()&&0===i.EF.high)return t.gF(this.EF.multiply(i.EF));const e=Wt.fromBits(4294967295,0,!0),s=this.EF.and(e),n=this.EF.shru(32),r=this.TF.and(e),h=this.TF.shru(32),o=i.EF.and(e),a=i.EF.shru(32),u=i.TF.and(e),c=i.TF.shru(32);let d=Wt.UZERO,l=Wt.UZERO,f=Wt.UZERO,v=Wt.UZERO;d=d.add(s.mul(o)),l=l.add(d.shru(32)),d=d.and(e),l=l.add(n.mul(o)),f=f.add(l.shru(32)),l=l.and(e),l=l.add(s.mul(a)),f=f.add(l.shru(32)),l=l.and(e),f=f.add(r.mul(o)),v=v.add(f.shru(32)),f=f.and(e),f=f.add(n.mul(a)),v=v.add(f.shru(32)),f=f.and(e),f=f.add(s.mul(u)),v=v.add(f.shru(32)),f=f.and(e),v=v.add(h.mul(o)).add(r.mul(a)).add(n.mul(u)).add(s.mul(c)).and(e);const _=Wt.fromBits(d.getLowBitsUnsigned(),l.getLowBitsUnsigned(),!0),g=Wt.fromBits(f.getLowBitsUnsigned(),v.getLowBitsUnsigned(),!0);return t._F(_,g,this.SF())}HF(i){let e,s,n=i;if(n.kF())throw new RangeError("division by zero");if(this.kF())return this.SF()?[t.mF,t.mF]:[t.wF,t.wF];if(this.SF()){if(n.SF()||(n=n.xF()),n.CF(this))return[t.mF,this];if(n.CF(this.FF(1)))return s=t.WF,e=this.lF(n),[s,e];s=t.mF}else{if(this.zO(t.AF)){if(n.zO(t.UF)||n.zO(t.qF))return[t.AF,t.wF];if(n.zO(t.AF))return[t.UF,t.wF];{const i=this.OF(1).zF(n).LF(1);return i.zO(t.wF)?s=n.cF()?t.UF:t.qF:(e=this.lF(n.VF(i)),s=i.lO(e.zF(n))),e=this.lF(n.VF(s)),[s,e]}}if(n.zO(t.AF))return this.SF()?[t.mF,this]:[t.wF,this];if(this.cF())return n.cF()?this.dF().HF(n.dF()):([s,e]=this.dF().HF(n),[s.dF(),e.dF()]);if(n.cF())return[s,e]=this.HF(n.dF()),[s.dF(),e.dF()];s=t.wF}for(e=this;e.DF(n);){let i=_.max(1,_.floor(e.iF()/n.iF()));const r=_.ceil(_.log(i)/_.LN2),h=r<=48?1:2**(r-48);let o=t.pF(i),a=o.VF(n);for(;a.cF()||a.CF(e);)i-=h,o=t.pF(i,this.SF()),a=o.VF(n);o.kF()&&(o=t.UF),s=s.lO(o),e=e.lF(a)}return[s,e]}zF(t){return this.HF(t)[0]}GF(t){return this.HF(t)[1]}toString(i){const e=i||10;if(e<2||e>36)throw new RangeError("radix");if(this.kF())return"0";if(this.cF()){if(this.zO(t.AF)){const i=t.pF(e),s=this.zF(i),n=s.VF(i).lF(this);return s.toString(e)+n.RF().toString(e)}return"-"+this.dF().toString(e)}const s=t.pF(e**6,this.SF());let n=this,r="";for(;;){const t=n.zF(s);let i=(n.lF(t.VF(s)).RF()>>>0).toString(e);if(n=t,n.kF())return i+r;for(;i.length<6;)i="0"+i;r=String(i)+r}}constructor(t,i){this.EF=void 0,this.TF=void 0,this.EF=t,this.TF=i}};No.wF=No.gF(Wt.ZERO),No.mF=No.gF(Wt.UZERO),No.UF=No.gF(Wt.ONE),No.WF=No.gF(Wt.UONE),No.qF=No.gF(Wt.NEG_ONE),No.bF=No._F(Wt.NEG_ONE,Wt.MAX_VALUE,!1),No.yF=No._F(Wt.MAX_UNSIGNED_VALUE,Wt.MAX_UNSIGNED_VALUE,!0),No.AF=No._F(Wt.ZERO,Wt.MIN_VALUE,!1),r();var rn=class t{get vF(){return!isFinite(this.XF)}get dd(){return this.XF/this.qD}static jF(i){return new t(_.ceil(i.XF),i.qD)}static QF(i){return new t(_.floor(i.XF),i.qD)}static KF(t,i){return t.nF(i)?t:i}static YF(t,i){return t.hF(i)?t:i}lO(i){return this.qD>=i.qD?new t(this.XF+i.JF(this.qD).XF,this.qD):new t(this.JF(i.qD).XF+i.XF,i.qD)}eF(t){return t.aF(this)}nF(t){return t.hF(this)}oF(i){if(this.qD>=i.qD){const e=_.abs(this.XF-i.JF(this.qD).XF),s=this.qD;return new t(e,s)}return i.oF(this)}rF(t,i){return this.oF(t).hF(i)}sF(t){return function(t,i){return t.qD>=i.qD?sf(t.XF,i.JF(t.qD).XF):sf(t.JF(i.qD).XF,i.XF)}(this,t)}zO(t){return 0===this.sF(t)}aF(t){return this.sF(t)<0}hF(t){return this.sF(t)<=0}JF(i){return new t(this.XF*(i/this.qD),i)}lF(i){return this.qD>=i.qD?new t(this.XF-i.JF(this.qD).XF,this.qD):new t(this.JF(i.qD).XF-i.XF,i.qD)}ZF(i){return new t(this.XF*i,this.qD)}constructor(t,i=1){this.XF=void 0,this.qD=void 0,this.XF=t,this.qD=i}};rn.fd=new rn(1/6,1),rn.wF=new rn(0),rn.tU=new rn(1/0),rn.iU=1e6;var ko=class t extends AE{static eU(i,e){return void 0===e&&(e=yE),t.pF(i*e,e)}static pF(i,e){return S(i)?t.sU:i===1/0?t.nU:i===-1/0?t.rU:new t(Wt.fromNumber(i),e)}static gF(i,e){return new t(i,e)}static hU(i){return t.eU(i.dd,yE)}static oU(i){return new t(Wt.fromNumber(i.getTime()),1e3)}static KF(t,i){return t.nF(i)?t:i}static YF(t,i){return t.hF(i)?t:i}static aU(i,e,s){return t.KF(e,t.YF(s,i))}cF(){return this.zE.isNegative()}kF(){return 0!==this.qD&&this.zE.isZero()}vF(){return 0===this.qD&&!this.zE.isZero()}fF(){return 0===this.qD&&this.zE.isZero()}iF(){if(0===this.qD)return this.zE.isZero()?NaN:this.zE.isNegative()?-1/0:1/0;const t=this.zE.divide(this.qD),i=this.zE.subtract(t.multiply(this.qD));return t.toNumber()+i.toNumber()/this.qD}IF(){if(0===this.qD)throw new m("Failed to convert timestamp");return this.zE}uU(){return new Date(0===this.qD?NaN:this.JF(1e3).zE.toNumber())}cU(){return new rn(0===this.qD?this.iF():this.zE.toNumber(),this.qD)}JF(i,e){void 0===e&&(e=Ki.dU);const s=this.qD;if(s===i)return this;if(0===s)return this;const n=Zl(s,i),r=function(t,i,e){const[s,n]=t.HF(i);if(n.kF())return s;if(e===Ki.dU)return n.cF()?s.lF(No.UF):s;if(e===Ki.lU)return n.cF()?s:s.lO(No.UF);{const t=n.VF(No.pF(2));return t.cF()?t.dF().aF(i)?s:s.lF(No.UF):t.aF(i)?s:s.lO(No.UF)}}(No.gF(this.zE).VF(No.pF(i/n)),No.pF(s/n),e);return new t(r.IF(),i)}sF(t){if(this===t)return Qc.rh;if(0===this.qD||0===t.qD)return bE(this,t);if(this.kF())return t.kF()?Qc.rh:t.cF()?Qc.Fg:Qc.Ug;if(t.kF())return this.cF()?Qc.Ug:Qc.Fg;const i=_.min(this.qD,t.qD),e=this.JF(i,Ki.fU).zE,s=t.JF(i,Ki.fU).zE;return e.compare(s)}dF(){return 0===this.qD?function(t){0;return t.fF()?t:t.cF()?ko.nU:ko.rU}(this):new t(this.zE.negate(),this.qD)}lO(i){if(0===this.qD||0===i.qD)return function(t,i){0;if(t.fF()||i.fF())return ko.sU;if(t.vF()&&i.vF())return t.cF()===i.cF()?t:ko.sU;return t.vF()?t:i}(this,i);if(this.kF())return i;if(i.kF())return this;const e=_.max(this.qD,i.qD),s=this.JF(e,Ki.fU),n=i.JF(e,Ki.fU);return new t(s.zE.add(n.zE),e)}VF(i){if(this.fF()||S(i))return t.sU;if(this.vF()||!isFinite(i)){if(this.kF()||0===i)return t.sU;{const e=this.cF()?t.rU:t.nU;return i<0?e.dF():e}}return this.kF()?this:new t(0===i?Wt.ZERO:this.zE.multiply(i),this.qD)}zF(i){if(this.fF()||S(i))return t.sU;if(this.vF())return isFinite(i)?0===i?1/i<0?this.dF():this:i<0?this.dF():this:t.sU;if(!isFinite(i))return new t(Wt.ZERO,this.qD);if(this.kF())return 0===i?t.sU:new t(Wt.ZERO,this.qD);if(0===i){const e=this.cF()?t.rU:t.nU;return 1/i<0?e.dF():e}return new t(this.zE.divide(i),this.qD)}vU(){return[this.zE.low,this.zE.high,this.qD]}constructor(t,i){super(),this.zE=void 0,this.qD=void 0,this.zE=t.toSigned(),this.qD=i>>>0}};ko.wF=new ko(Wt.ZERO,yE),ko.sU=new ko(Wt.ZERO,0),ko.nU=new ko(Wt.ONE,0),ko.rU=new ko(Wt.NEG_ONE,0),r();var PE=class t extends AE{static eU(i,e){return void 0===e&&(e=yE),t.pF(i*e,e)}static pF(i,e){return S(i)?t.sU:i===1/0?t.nU:i===-1/0?t.rU:new t(BigInt(_.floor(i)),e)}static gF(i,e){return new t(BigInt(i.high)<>>0),e)}static hU(i){return t.eU(i.dd,yE)}static oU(i){return t.pF(i.getTime(),1e3)}static get wF(){return t._U||(t._U=new t(BigInt(0),yE)),t._U}static get sU(){return t.gU||(t.gU=new t(BigInt(0),0)),t.gU}static get nU(){return t.pU||(t.pU=new t(BigInt(1),0)),t.pU}static get rU(){return t.mU||(t.mU=new t(BigInt(-1),0)),t.mU}static KF(t,i){return t.nF(i)?t:i}static YF(t,i){return t.hF(i)?t:i}static aU(i,e,s){return t.KF(e,t.YF(s,i))}cF(){return this.zE>BigInt(32)&BigInt(4294967295);return Wt.fromBits(Number(t),Number(i))}uU(){return new Date(0===this.qD?NaN:Number(this.JF(1e3).zE))}cU(){return new rn(0===this.qD?this.iF():Number(this.zE),this.qD)}JF(i,e){void 0===e&&(e=Ki.dU);const s=this.qD;if(s===i)return this;if(0===s)return this;const n=Zl(s,i),r=function(t,i,e){const s=t/i,n=t-s*i;if(n===BigInt(0))return s;if(e===Ki.dU)return ns?Qc.Fg:e>>0}};PE._U=void 0,PE.gU=void 0,PE.pU=void 0,PE.mU=void 0;var Ki=function(t){return t[t.dU=0]="dU",t[t.lU=1]="lU",t[t.fU=2]="fU",t}({}),$c=function(){try{return"function"==typeof BigInt&&"bigint"==typeof BigInt(0)}catch(t){return!1}}()?PE:ko;function xE(t,i){return t.sF(i)}function IE(t,i){return void 0!==t?void 0!==i?$c.YF(t,i):t:i}r();var RE=2**33,CE=mu(()=>$c.pF(RE,9e4)),DE=mu(()=>CE().zF(2));r();var BE={yU:0,AU:1/0,bU:0},NE=["WEBVTT","WEBVTT ","WEBVTT\t","WEBVTT\n"],ME=[" ","\t","\n","\f","\r"],LE=/^\d*$/,OE=/.*[0-9]+.*/,FE=/^[\d.-]+$/,UE=/(^\.|\.$)/,VE=/(\D\.|\.\D)/;function HE(t,i,e){void 0===i&&(i=BE),void 0===e&&(e=!0);return WE(hm(dh(t),new Ui),i,e)}function WE(t,i,e){void 0===i&&(i=BE),void 0===e&&(e=!0);const s={L:[],SU:[],TU:[]},n=qE(t),r=new Ui,h=!1;if(tP(n),Ms(n,t=>"\n"!==t,r),r.ac>=n.length)return s;if(r.Ny(1),"\n"!==n.charAt(r.ac)){QE(zE(n,r,h,!0,s,i,e),s)}else r.Ny(1);for(Ms(n,t=>"\n"===t,r);r.ac"\n"===t,r)}return s}function qE(t){const i=fh(t,"\0"," "),e=fh(i,"\r\n","\n");return fh(e,"\r","\n")}function Ms(t,i,e){const s=e.ac;for(;e.ac"\n"!==t,i),a++,i.ac>=t.length?d=!0:i.Ny(1),Ho(o,"--\x3e")){if(s||1!==a&&(2!==a||l)){i.My(u);break}l=!0,u=i.ac,f=new fE(0,0,"",!1,c);try{KE(o,n.SU,f,r,h),c=""}catch(t){zd.um(t),f=null}}else{if(""===o)break;s&&Vh(o,"X-TIMESTAMP-MAP")&&(n.kU=GE(o)),s||2!==a||e||(Ih("STYLE",c.replace(/ /g,""))?(v={Km:Zk.SO},c=""):Ih("REGION",c.replace(/ /g,""))&&(_=new wE("",100,3,0,100,0,100,""),c="")),c&&(c+="\n"),c+=o,u=i.ac}if(f)return f.U=c,f;if(v);else if(_)return function(t,i){const e=t.split(/\s/),s=":";for(const t of e)if(0!==t.length&&Ho(t,s)&&t.charAt(0)!==s&&t.charAt(t.length-1)!==s){const e=t.indexOf(s),n=t.substring(0,e),r=t.substring(e+1,t.length);switch(n.toUpperCase()){case"ID":lP(r,i);break;case"WIDTH":_P(r,i);break;case"LINES":vP(r,i);break;case"REGIONANCHOR":{const t=dP(r);t&&(i.KO=t[0],i.YO=t[1]);break}case"VIEWPORTANCHOR":{const t=dP(r);t&&(i.ZO=t[0],i.$O=t[1]);break}case"SCROLL":fP(r,i)}}}(c,_),_;return null}function GE(t){const i=t.split("=")[1].trim().split(","),e=jE(i[0].trim(),"MPEGTS")?i[0]:i[1],s=jE(i[0].trim(),"LOCAL")?i[0]:i[1];var n;return{EU:XE(Number(e.split(/:(.*)/)[1].trim())||0),bh:$c.eU(null!=(n=ZE(s.split(/:(.*)/)[1].trim(),new Ui))?n:0)}}function XE(t){return $c.pF(t,9e4)}function jE(t,i){return Vh(t,i)}function QE(t,i){t&&function(t){return"cue"===t.Km}(t)?i.L.push(t):t&&function(t){return"region"===t.Km}(t)?i.SU.push(t):t&&function(t){return"stylesheet"===t.Km}(t)&&i.TU.push(t)}function KE(t,i,e,s,n){const r=new Ui;eP(t,r);const h=YE(ZE(t,r),s,n);if(eP(t,r),"--\x3e"!==t.substring(r.ac,r.ac+3))throw m("Something went wrong with parsing a WebVTT Cue");r.Ny(3),eP(t,r);const o=YE(ZE(t,r),s,n);e.XO(h,o);!function(t,i,e){const s=t.split(/\s/),n=":";for(const t of s)if(0!==t.length&&Ho(t,n)&&t.charAt(0)!==n&&t.charAt(t.length-1)!==n){const s=t.indexOf(n),r=t.substring(0,s),h=t.substring(s+1,t.length);switch(r.toUpperCase()){case"REGION":oP(h,i,e);break;case"VERTICAL":uP(h,i);break;case"D":cP(h,i);break;case"LINE":case"L":rP(h,i);break;case"POSITION":case"T":hP(h,i);break;case"SIZE":case"S":aP(h,i);break;case"ALIGN":case"A":nP(h,i)}}}(t.substring(r.ac,t.length),e,i)}function YE(t,i,e){return e?t+i.yU:t}function JE(t){return/^[0-9]$/.test(t)}function ZE(t,i){const e=fh(t,",",".");let s,n,r,h=!1;if(i.ac>=e.length||!JE(e.charAt(i.ac)))throw new m("Something went wrong with parsing a WebVTT Cue timestamp");const o=Ms(e,JE,i),a=x(o,10);if((o.length>2||a>59)&&(h=!0),i.ac>=e.length||":"!==e.charAt(i.ac))throw new m("Something went wrong with parsing a WebVTT Cue timestamp");i.Ny(1);const u=Ms(e,JE,i);if(2!==u.length)throw new m("Something went wrong with parsing a WebVTT Cue timestamp");const c=x(u,10);if(h||i.ac=e.length||":"!==e.charAt(i.ac))throw new m("Something went wrong with parsing a WebVTT Cue timestamp");i.Ny(1);const t=Ms(e,JE,i);if(2!==u.length)throw new m("Something went wrong with parsing a WebVTT Cue timestamp");s=a,n=c,r=x(t,10)}else s=0,n=a,r=c;if(i.ac>=e.length||"."!==e.charAt(i.ac))throw new m("Something went wrong with parsing a WebVTT Cue timestamp");i.Ny(1);const d=Ms(e,JE,i),l=x(d,10);if(c>59||r>59)throw new m("Something went wrong with parsing a WebVTT Cue timestamp");return 60*s*60+60*n+r+l/1e3}function $E(t){return tP(qE(t))}function tP(t){if(t.length<6)return!1;for(const i of NE)if(Vh(t,i))return!0;return!1}function iP(t){return pi(ME,t)}function eP(t,i){for(;i.ac-1){const e=C(t.substring(0,i));if(!S(e)&&e>=0&&e<=100)return e}return null}function nP(t,i){const e=t.toLowerCase();switch(e){case"start":case"center":case"end":case"left":case"right":i.xO=e;break;case"middle":i.xO="center"}}function rP(t,i){let e,s;const n=t.indexOf(",");if(n>=0?(e=t.substring(0,n),s=t.substring(n+1,t.length)):(e=t,s=""),!OE.test(e))return;let r,h;if(Ju(e,"%")){const t=sP(e);if(null===t)return;r=t,h=!1}else{if(!FE.test(e)||e.lastIndexOf("-")>0)return;const t=e.indexOf(".");if(t>=0&&(t!==e.lastIndexOf(".")||!VE.test(e)||UE.test(e)))return;if(r=C(e),S(r))return;h=!0}switch(i.IO=r,i.BO=h,s=s.toLowerCase(),s){case"start":case"center":case"end":i.RO=s;break;case"middle":i.RO="center"}}function hP(t,i){let e,s;const n=t.indexOf(",");n>=0?(e=t.substring(0,n),s=t.substring(n+1,t.length)):(e=t,s="");const r=sP(e);if(null!==r)switch(i.mo=r,s=s.toLowerCase(),s){case"line-left":case"center":case"line-right":case"auto":i.CO=s;break;case"start":i.CO="line-left";break;case"middle":i.CO="center";break;case"end":i.CO="line-right"}}function oP(t,i,e){const s=hf(e,i=>i.o===t);void 0!==s&&(i.DO=s)}function aP(t,i){const e=sP(t);null!==e&&(i.Vy=e)}function uP(t,i){switch(t.toLowerCase()){case"rl":case"vertical:rl":case"vertical-rl":i.Pt="rl";break;case"lr":case"vertical:lr":case"vertical-lr":i.Pt="lr";break;default:i.Pt=""}}function cP(t,i){"VERTICAL"===t.toUpperCase()?i.Pt="rl":"VERTICAL-LR"===t.toUpperCase()&&(i.Pt="lr")}function dP(t){if(t.indexOf(",")>=0){const i=sP(t.substring(0,t.indexOf(","))),e=sP(t.substring(t.indexOf(",")+1,t.length));return[ur(i||0,0,100),ur(e||100,0,100)]}return null}function lP(t,i){i.o=t}function fP(t,i){"up"===t.toLowerCase()&&(i.JO="up")}function vP(t,i){LE.test(t)&&(i.QO=x(t))}function _P(t,i){const e=sP(t);null!==e&&(i.Ti=e)}function gP(t){return t&&"$E"in t?t.$E:t}r(),r(),r();var pP=class extends _h{get PU(){return this.xU}get IU(){return this.RU}get SU(){return this.CU}get DU(){return this.BU}get Ca(){return this.hu||(this.hu=function(t){return po(zt(t),{get extent(){return t.PU},get styles(){return t.IU},get regions(){return t.SU},get metadata(){return gP(t.DU)},get content(){return gP(t.U)}})}(this)),this.hu}GO(t){return!!_t(this.PU,t.PU)&&(!!_t(this.IU,t.IU)&&(!!_t(this.SU,t.SU)&&(this.DU&&t.DU?!!this.DU.GE(t.DU)&&(this.U&&t.U?this.U.GE(t.U):this.U===t.U):this.DU===t.DU)))}constructor(t,i,e,s,n,r,h,o){super(t,i,e,s),this.xU=void 0,this.RU=void 0,this.CU=void 0,this.BU=void 0,this.xU=n,this.RU=r,this.CU=h,this.BU=o||void 0}};r();var mP=class{get NU(){return this.Lf.XE(!0)}get EO(){return this.MU}get PO(){return this.LU}constructor(t,i,e){this.Lf=void 0,this.MU=void 0,this.LU=void 0,this.MU=t,this.LU=i,to(e)?this.Lf=function(t,i,e){for(const t of["begin","end","dur"])e.rP(t);return e}(0,0,e):this.Lf=e}};r();var wP="http://www.w3.org/XML/1998/namespace";function yP(t,i,e,s){let n=t.ZE(e,i);return 0===n.length&&(n=t.YE(s+":"+i)),n}function AP(t){const i={};for(const e of t.iP)i[e.VE]=e.zE;return i}var bP=/^(\d\d+):(\d\d):(\d+)((\.(\d+))?|(:(\d\d+)(\.(\d+))?))$/,SP=/^(\d+)(\.(\d+))?(h|m|s|ms|f|t)$/,TP="http://www.w3.org/ns/ttml";function kP(t,i,e,s){void 0===e&&(e=BE),void 0===s&&(s=Gy);let n=[];const r=dh(t);return s===Xy?n=function(t,i,e){const s=jt.TD(t),n=lr(s,Ro.OC);if(!n)return[];return xP(dh(n.ck),i,e)}(r,i,e):s===Gy&&(n=xP(r,i,e)),n}function EP(t,i,e){return void 0===e&&(e=BE),IP(t,i,e)}function PP(t,i){const e=LP(i.NU),s={};for(const i of e)s[i]=t[i];return s}function xP(t,i,e){return IP(hm(t,new Ui),i,e)}function IP(t,i,e){const s=[];let n;try{n=zd.UE(t)}catch(t){return s}const r=n.uP;if("tt"!==r.VE)return s;const h=r.ZE(TP,"head")[0],o=r.ZE(TP,"body")[0];if(!o||!h)return s;const a=CP(r.sP("tts:extent")),u=a?{width:a[0],height:a[1]}:void 0,c=function(t){const i={},e=t.ZE(TP,"styling")[0],s=e&&e.ZE(TP,"style")||[];for(const t of s){i[t.nP(wP,"id")]=AP(t)}return i}(h),d=function(t){const i={},e=t.ZE(TP,"layout")[0],s=e&&e.ZE(TP,"region")||[];for(const t of s){const e=t.nP(wP,"id");if(!e)continue;i[e]=AP(t);const s=MP(t);for(const t in s)La.call(s,t)&&(i[e][t]=s[t])}return i}(h),l=a?function(t,i){const e=Ua(t);for(const t of w.keys(e)){const s=CP(e[t].extent);if(s){const n=RP(s[0],i[0]),r=RP(s[1],i[1]);e[t].extent=n+" "+r}const n=CP(e[t].origin);if(n){const s=RP(n[0],i[0]),r=RP(n[1],i[1]);e[t].origin=s+" "+r}}return e}(d,a):d,f=h.ZE(TP,"metadata")[0],v=DP(o,e.yU,e.AU,e.bU);for(const t of v){const i=PP(l,t);s.push(new pP(t.EO,t.PO,t.NU,!1,u,c,i,f))}return s}function RP(t,i){return t/i*100+"%"}function CP(t){if(!t)return;const i=t.split(" ",2);if(2!==i.length)return;const[e,s]=i;if(!Ju(e,"px")||!Ju(s,"px"))return;return[Number(e.slice(0,-2)),Number(s.slice(0,-2))]}function DP(t,i,e,s){let n,r=i,h=e,o=[];const a=[];if(to(t)){var u,c;r=null!=(u=NP(t.sP("begin"),s))?u:r,n=NP(t.sP("dur"),0),h=null!=(c=NP(t.sP("end"),s))?c:void 0!==n?r+n:h;const i=t.jE;for(let e=0;e1||(o=o.concat(DP(i[e],r,h,s)))}const d=function(t,i,e){const s=[];s.push(t,i);for(const t of e)s.push(t.EO,t.PO);s.sort(gu);let n=s.length;for(let t=0;t0){const s=t.XE(!1);e.forEach(t=>s.tP(t.NU)),a.push(new mP(d[i],d[i+1],s))}}return a}function BP(t,i,e){const s=[];for(let n=0;n=t&&h<=i||r=i||rt)&&s.push(e[n])}return s}function NP(t,i){if(t){if(bP.test(t)){const e=bP.exec(t);if(!e)return;const s=Number(e[1])||0,n=Number(e[2])||0,r=Number(e[3])||0,h=e[6];return 3600*s+60*n+r+(h?Number(h)*.1**h.length:0)+i}if(SP.test(t)){const e=SP.exec(t);if(!e)return;const s=Number(e[1]);let n;switch(e[4]){case"h":n=3600*s;break;case"m":n=60*s;break;case"s":n=s;break;case"ms":n=.001*s;break;default:n=NaN}return n+i}}}function MP(t){const i={},e=t.YE("style")||[];for(const t of e){const e=AP(t);for(const t in e)La.call(e,t)&&(i[t]=e[t])}return i}function LP(t){let i,e=[];if(to(t)){i=t.sP("region"),i&&e.push(i);const s=t.jE;for(let t=0;te)break;i<=n.PO&&!pi(s,n)&&s.push(n)}}function JP(t,i){return tf(t.jI,i.jI)}function ZP(t,i,e,s){const n=function(t){switch(t){case nh.WEBVTT:return"WebVTT";case nh.SRT:return"SRT";case nh.TTML:return"TTML";default:return""}}(t);return new WP(Vo.SUBTITLE_PARSE_ERROR,"Could not parse the "+(n?n+" ":"")+"subtitle file.",i,e,s)}function St(t,i){const e=[];for(const s of t.L.II)if(s.PO<=i)e.push(s);else if(s.EO>=i)break;for(const i of e)t.WU(i)}function $P(t,i){if(t.V>0){const e=t.Tn(0),s=_.max(0,e-10);for(const t of i)t.qU(s)}}var es=class extends Ne{get bU(){return this.zU}set bU(t){this.zU=t;for(const i of this.Z.II)i.bU=t}tt(t){t.wn(Te.pa,this.GU),t.bU=this.bU,this.Z.tt(t),this.XU(t)}it(t){t.mn(Te.pa,this.GU),t.Xk=xh.Nh,this.Z.it(t)}jU(t){}QU(t){}XU(t){t.Xk!==xh.Nh?this.jU(t):this.QU(t)}KU(){for(const t of this.Z.II)t.mn(Te.pa,this.GU),t.kn()}qU(t){if(t>0)for(const i of this.Z.II)St(i,t)}YU(t){const i=this.JU;if(t===i)return;this.JU=t;const e=this.Z.II.slice();for(const s of e){const e=this.ZU(s,i,t);s!==e&&(this.it(s),this.tt(e),s.kn())}}hr(){return this.KU(),this.Z.hr(),Promise.resolve()}async kn(){this.Vo(),await this.hr(),this.Z.kn()}constructor(t){super(),this.JU=void 0,this.Z=new cc,this.zU=0,this.GU=t=>{const i=t.Ht;this.XU(i)},this.JU=t}};function Ut(t,i,e){const s=e.tI(t.Lt,t.o,t.Th,t.bs,t.$U,t.Km,t.tR,t.QI);s.iR=t.iR,s.Ax=t.Ax,s.ZI=t.ZI,s.bU=t.bU;const n=t.L.II.slice();for(const i of n)t.WU(i),s.tV(i);return s.Xk=t.Xk,i.iV(t),s}r();var tx=class extends Oi{get error(){return this.errorObject.message}xa(){return this}constructor(t){super(Mc.ma),this.errorObject=void 0,this.errorObject=t}},Kh=class extends es{eV(t){if(!t.src)return;const i=t.kind||Ao.OU,e=this.JU.tI(i,t.id,t.label,t.srclang,t.default);return e.iR=fn(t.src),this.tt(e),e}async sV(t,i){t.Ax=Zu.LOADING;const e=new $n({Yu:t.iR,dk:M.NT,Uk:X.GET,Yg:i});let s,n;try{const t=await this.nV.lk(e);n=t.hk,s=await t.UT()}catch(i){return sa(i),t.Ax=Zu.ERROR,void t.So(new tx(function(t,i){let e=i,s=0;if(rt(t)&&t.name===qc.sE)e=t.lk.Yu;else if(ll(t)){const i=t.oE;if(e=i.gk,s=i.hk,0===s)return new WP(Vo.SUBTITLE_CORS_ERROR,"Could not load the subtitle file. Make sure the source is set correctly and that CORS support is enabled.",e,s,t)}return new WP(Vo.SUBTITLE_LOAD_ERROR,"Could not load the subtitle file.",e,s,t)}(i,t.iR)))}try{const i=function(t){return $E(t)?nh.WEBVTT:FP(t)?nh.TTML:nh.SRT}(s);t.Km=i;let e=[];if(i===nh.WEBVTT||i===nh.SRT){e=WE(s).L}else i===nh.TTML&&(e=EP(s,t));for(const i of e)t.tV(i)}catch(i){return sa(i),t.Ax=Zu.ERROR,void t.So(new tx(ZP(t.Km,t.iR,n,i)))}t.Ax=Zu.LOADED}jU(t){pi(this.Z.II,t)&&t.Ax===Zu.NONE&&this.sV(t,this.rV.Yg).catch(yf)}Un(){}ZU(t,i,e){return Ut(t,i,e)}async hr(){this.rV.Zg(),this.rV=new at;for(const t of this.Z.II)this.JU.iV(t);await super.hr()}constructor(t,i){super(t),this.nV=void 0,this.rV=new at,this.nV=i}};function ix(t){return"TXXX"===t.id||"TXX"===t.id}r(),r();var ex=class extends es{hV(){this.oV.wn(Vt.eI,this.aV),this.oV.wn(Vt.nI,this.uV)}cV(){this.oV.mn(Vt.eI,this.aV),this.oV.mn(Vt.nI,this.uV)}dV(t){const i=t.L.II[0];if(!sx(i))return;const e=function(t){const i=t.match(nx);if(!i)return;return{Ht:i[1],bs:i[2]}}(i.U.description),s=e.Ht,n=e.bs;if(this.lV(s,n))return;const r=this.JU.tI(Ao.OU,t.o,s,n,!1,nh.TTML);this.tt(r),this.fV.set(t.jI,r);for(const i of t.L.II)sx(i)&&this.vV(i);t.wn(Te.hI,this._V)}lV(t,i){return this.Z.II.some(e=>e.Th===t&&e.bs===i)}vV(t){if(!t.Ht)return;const i=this.fV.get(t.Ht.jI),e=EP(t.U.text,i,{yU:0,AU:1/0,bU:t.EO});for(const t of e)i.tV(t)}ZU(t,i,e){const s=Ut(t,i,e);return this.fV.forEach((i,e)=>{i===t&&this.fV.set(e,s)}),s}async hr(){for(const t of this.oV.II)t.mn(Te.AI,this.aV),t.mn(Te.hI,this.gV),t.mn(Te.hI,this._V);for(const t of this.Z.II)this.JU.iV(t);this.fV.clear(),await super.hr()}async kn(){this.cV(),await super.kn()}constructor(t,i){super(t),this.oV=void 0,this.fV=void 0,this.pV=void 0,this.aV=void 0,this.gV=void 0,this.uV=void 0,this._V=void 0,this.oV=i,this.fV=ar(),this.pV=t=>{t.mn(Te.AI,this.aV),t.Km?t.Km===nh.ID3&&(t.mn(Te.hI,this.gV),0!==t.L.V?this.dV(t):t.wn(Te.hI,this.gV)):t.wn(Te.AI,this.aV)},this.aV=t=>{this.pV(t.Ht)},this.gV=t=>{this.pV(t.TO.Ht)},this.uV=t=>{const i=t.Ht;if(i.Km!==nh.ID3||!this.fV.has(i.jI))return;const e=this.fV.get(i.jI);this.it(e),this.JU.iV(e),i.mn(Te.AI,this.aV),i.mn(Te.hI,this.gV),i.mn(Te.hI,this._V)},this._V=t=>{sx(t.TO)&&this.vV(t.TO)},this.hV()}};function sx(t){return function(t){return ix(t)&&nx.test(t.description)}(t.U)}var nx=/^Track:(.+),Lang:(.+)$/;function rx(t,i){for(const e of t)if(e.Lt===i&&e.$U)return e}function hx(t,i){ox(rx(t.II,i))}function ox(t){void 0!==t&&(t.Xk=xh.Kn)}function ax(t,i){const e=rx(t.II,i)||function(t,i){for(const e of t)if(e.Lt===i)return e}(t.II,i);ox(e)}function Ds(t){for(const i of UP)i===Ao.Yn?ax(t,i):hx(t,i)}r(),r();var ts=class extends wp{constructor(){super(d.Jw)}};r(),r();var Zr=function(t){return t[t.mV=0]="mV",t[t.wV=1]="wV",t}({});r(),r();var ux=class extends wp{constructor(t){super(Do.SM),this.currentTime=void 0,this.currentTime=t}};r();var ce=class extends wp{constructor(t){super(Do.TM),this.currentTime=void 0,this.currentTime=t}},cx=[Do.wI,Do.TM,d.uo,d.jw],bs=class extends Ne{yV(t,i){!this.AV&&i>=mh.Qn&&(this.AV=!0,this.So(new ut(t,i)))}bV(t,i){!this.SV&&i>=mh.HL&&(this.SV=!0,this.So(new ot(t,i)))}TV(t,i){this.kV||(i>=mh.WL&&this.EV=mh.WL)&&this.So(new ce(t))}RV(t,i){!this.CV(i)||this.PV.UP||this.PV.lt||this.So(new ux(t))}DV(t,i){this.EV<=mh.HL&&i>=mh.WL&&this.So(new lo(t,i))}BV(t,i){i===mh.qL&&this.So(new qt(t,i))}CV(t){const i=!this.PV.hx&&t<=mh.HL,e=!this.NV&&this.EV<=mh.HL;return i&&!e}get xV(){return!this.PV.hx&&this.NV}hr(){this.EV=mh.VL,this.NV=!0,this.SV=!1,this.AV=!1}kn(){this.Vo(),this.kV&&this.PV.mn(Do.TM,this.MV),this.PV.mn(d.uo,this.LV),this.PV.mn(d.jw,this.OV),this.PV.mn(Do.wI,this.FV)}constructor(t,i=!1){super(),this.PV=void 0,this.kV=void 0,this.EV=void 0,this.NV=void 0,this.SV=void 0,this.AV=void 0,this.FV=void 0,this.LV=void 0,this.OV=void 0,this.MV=void 0,this.PV=t,this.kV=i,this.EV=mh.VL,this.NV=!0,this.SV=!1,this.AV=!1,this.FV=t=>{const i=this.PV.MP,e=this.PV.Ax;e!==this.EV&&this.So(new ou(i,e)),e===mh.VL&&(this.SV=!1,this.AV=!1),this.yV(i,e),this.bV(i,e),this.DV(i,e),this.BV(i,e),this.TV(i,e),this.RV(i,e),this.EV=e},this.LV=()=>{const t=this.PV.MP;this.RV(t,this.EV),this.TV(t,this.EV),this.NV=this.PV.hx},this.OV=()=>{this.NV=this.PV.hx},this.MV=()=>{this.So(new ce(this.PV.MP))},this.PV.wn(Do.wI,this.FV),this.PV.wn(d.uo,this.LV),this.PV.wn(d.jw,this.OV),this.kV&&this.PV.wn(Do.TM,this.MV)}};r();var dx=class extends Ne{get MP(){return this.oa.MP}get UP(){return this.oa.UP}get lt(){return this.TL.lt}get hx(){return this.TL.hx}get Ax(){return this.oa.Ax}zg(){this.Vo(),this.TL.mn(cx,this.Rs)}VV(){this.So(new ou(this.MP,this.Ax))}constructor(t,i){super(),this.oa=void 0,this.TL=void 0,this.oa=t,this.TL=i,this.TL.wn(cx,this.Rs)}};r(),r(),r(),r();var Qo=class{HV(){return this.WV}qV(t){this.WV=t}get SP(){return this.nV}get zV(){return!1}get GV(){const t=this.XV.certificate;if(t)return Z(t)?_c(t):wa(t)}jV(){return this.XV.licenseAcquisitionURL||this.HV()}get QV(){return!1}KV(t){return Promise.resolve()}YV(t,i){return Promise.resolve(void 0)}get zk(){return Boolean(this.XV.useCredentials)}async JV(t,i,e,s){const n=this.ZV(t,i,e,s);if(""===n.Yu)throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");try{const t=await this.SP.lk(n);return await t.VT(i)}catch(t){return sa(t),void await this.$V(t,n.Yu,s)}}ZV(t,i,e,s){const n=this.tH().MT(),r=this.zk,h={Yu:this.iH(),dk:i,fk:n,zT:t,zk:r,Uk:X.POST,Vk:0,Yg:s,Km:Al.bk,Wk:e};return new $n(h)}eH(t,i){return Promise.resolve(t)}sH(t,i,e,s){return Promise.resolve(t)}tH(){return new Ra(this.XV.headers||{})}async $V(t,i,e){throw new fs(Vo.CONTENT_PROTECTION_LICENSE_ERROR,"Error during license server request",t)}iH(t,i){let e=i;const s=this.XV.queryParameters;if(!e){const t=this.jV();if(!t)return"";e=t}if(s||t){const i=zd.Dh(e);t&&ub(i,t),s&&ub(i,s),e=i.href}return e}nH(t,i){return lx(t)}rH(t){return new j(t)}async hH(t,i,e){const s=await this.nH(t,e),n=await this.JV(s,this.oH,i,e);return this.rH(n)}kn(){}constructor(t,i,e,s,n){this.kS=void 0,this.aH=void 0,this.uH=void 0,this.XV=void 0,this.nV=void 0,this.WV=void 0,this.oH=void 0,this.kS=t,this.aH=i,this.uH=e,this.nV=s,this.oH=n,this.XV=this.cH(i)}};function lx(t){return Promise.resolve(Gu(t).buffer)}var ic=class extends Qo{cH(t){return t.widevine||{}}async dH(t,i){return this.GV?this.GV:this.lH(new j(t),i)}lH(t,i){return super.hH(t,Xa.Pk,i)}constructor(t,i,e,s){super(xi,t,i,e,s)}};r();var fx=function(t){return t.zm="Widevine",t.fH="PlayreadyV2",t.vH="PlayreadyV3",t.qm="PlayreadyV2",t.jm="Fairplay",t}({}),vx={Widevine:{DRMProvider:"Google",DRMVersion:"1.4.8.86",DRMType:"Widevine"},PlayreadyV2:{DRMProvider:"Microsoft",DRMVersion:"2.9",DRMType:"Playready"},PlayreadyV3:{DRMProvider:"Microsoft",DRMVersion:"3",DRMType:"Playready"},Fairplay:{DRMProvider:"Apple",DRMType:"FairPlay",DRMVersion:"1.0"}};function _x(t,i){var e,s,n,r;const h=vx[i],o=t.accountName;return{CustomerName:t.customerName,AccountName:o,PortalId:t.portalId,FriendlyName:t.friendlyName,DeviceInfo:{FormatVersion:"1",DeviceType:"PC",OSType:null==(e=zd.Em)?void 0:e.Zs,OSVersion:null==(s=zd.Em)?void 0:s.Lm,DRMProvider:h.DRMProvider,DRMVersion:h.DRMVersion,DRMType:h.DRMType,DeviceVendor:null==(n=zd.Em)?void 0:n.Om,DeviceModel:null==(r=zd.Em)?void 0:r.Fm}}}function gx(t,i){if(!t.accountName)throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, accountName is not set.");if(!t.customerName)throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, customerName is not set.");if(!t.portalId)throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, portalId is not set.");throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration.")}function px(t,i,e){let s;if(pT(t))s={AuthToken:t.authToken,Payload:i};else{if(!mT(t))throw gx(t,e);s={LatensRegistration:_x(t,e),Payload:i}}return wc(JSON.stringify(s))}async function mx(t,i,e){const s=t.oE;if(!s)throw new fs(Vo.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium server request",t,i);const n=s;let r,h;try{r=await n.FT(e),h=function(t){if(t){if(t.WvProxyErr)return t.WvProxyErr.desc;if(t.DrmErr)return t.DrmErr.desc}return}(r)}catch(t){h=""}throw new fs(Vo.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium server request",t,n.lk.Yu,n.hk,n.vk,h)}r();var wx=class extends ic{static _H(){return zd.Zs.yp?"required":"optional"}$V(t,i,e){return mx(t,i,e)}KV(t){return this.gH?Nc(this.gH.Qy,t):(this.gH=new pa,Promise.resolve())}async nH(t,i){const e=this.aH;if(!e)throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium Widevine DRM configuration.");return px(e,Go(t),fx.zm)}rH(t){let i;if(!t.license)throw new fs(Vo.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Titanium Widevine license server");return i=_c(t.license),i}pH(t){return Promise.resolve(new j(t))}async dH(t,i){this.mH();const e=await this.nH(t,i),s=await this.JV(e,M.CT,Xa.xk,i);return await this.pH(s)}async lH(t,i){const e=await super.lH(t,i);return this.mH(),e}mH(){this.gH||(this.gH=new pa),this.gH.Xy()}kn(){this.gH&&this.gH.Zg(),super.kn()}constructor(t,i,e){super(t,i,e,M.DT),this.gH=void 0}};r();var yx=class extends ic{get wH(){if(wT(this.aH))return this.aH.token}async nH(t,i){const e=await lx(t),s=this.uH,n=am(new j(e)),r=this.wH;if(void 0===r)throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The Widevine vuDRM token has not been correctly configured.");return JSON.stringify({token:r,drm_info:n,kid:s})}constructor(t,i,e){super(t,i,e,M.CT),this.qV("https://widevine-proxy.drm.technology/proxy")}};function Ax(t,i){let e=i||{};return t.ticket&&t.sessionId&&(e=Mo({},e,{SessionId:t.sessionId,Ticket:t.ticket})),Mo({},e,{CrmId:t.crmId,AccountId:t.accountId,ContentId:t.contentId})}r(),r();var bx=class extends ic{iH(t,i){let e=t;return vT(this.aH)&&(e=Ax(this.aH,e)),super.iH(e,i)}constructor(t,i,e){super(t,i,e,M.CT),this.qV("https://emeademo.dev.ott.irdeto.com/Widevine/getlicense")}};r(),r();var Sx="Conax-Custom-Data";function Tx(t,i,e){const s=t&&fT(t)&&t;if(s&&!e.has(Sx)){const t=JS(s)?s.token:void 0,n=JS(s)?s.deviceId:void 0,r=JSON.stringify({Version:"1.0.0",CxAuthenticationDataToken:t,CxClientInfo:{DeviceType:"Browser",DrmClientType:i+"-HTML5",DrmClientVersion:"1.0.0",CxDeviceId:n}});e.set(Sx,r)}return e}var kx=class extends ic{tH(){const t=super.tH();return Tx(this.aH,"Widevine",t)}constructor(t,i,e){super(t,i,e,M.CT),this.qV("https://connect.conax.com:8094/license")}};function Ex(t){const i=Yh(new j(t));return _c(JSON.parse(i).license)}function Px(t){return"string"==typeof t.token?t.token:wc(JSON.stringify({userId:t.userId,sessionId:t.sessionId,merchant:t.merchant}))}function xx(t,i,e){let s;return s=e.token?"x-dt-auth-token":"dt-custom-data",t.set(s,i),t}r(),r();var Ix=class extends ic{get wH(){return Px(this.aH)}rH(t){return Ex(t)}tH(){return xx(super.tH(),this.wH,this.aH)}constructor(t,i,e){super(t,i,e,M.CT),this.qV("https://lic.drmtoday.com/license-proxy-widevine/cenc/")}};r();var Rx=class extends ic{tH(){const t=super.tH(),i=this.aH.token;return t.set("Authorization","Bearer "+i),t}constructor(t,i,e){super(t,i,e,M.CT)}};async function Cx(t,i,e,s){if(!yT(t))throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Xstream DRM Configuration");const n=new Ra;n.append("Cache-Control","no-cache"),n.append("Content-Type","application/json");const r=t.sessionId;r&&n.append("XSSESSION",r);const h=t.streamId;let o;o=t.fairplay?"persistent"===t.fairplay.licenseType?"persistent":"non-persistent":t.widevine&&"persistent"===t.widevine.licenseType?"persistent":"non-persistent";const a={drmType:i,licenseType:o,streamId:h},u={Yu:t.ticketAcquisitionURL,dk:M.DT,fk:n,Uk:X.POST,zT:JSON.stringify(a),Yg:s},c=await e.lk(u);return await c.FT()}r(),r();var Dx=class extends ic{tH(){const t=super.tH();return t.set("Content-Type","application/json"),t}async nH(t,i){const e=pm(t.buffer),s=this.aH,n=await Cx(s,"widevine_modular",this.SP,i);this.qV(n.licenseServerUrl);const r=vc(JSON.stringify({payload:e,ticket:n.ticket}));return super.nH(r,i)}rH(t){return _c(t.license)}constructor(t,i,e){super(t,i,e,M.DT)}};r();var Bx=class extends ic{tH(){if(!AT(this.aH))throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");const t=super.tH();return t.set("X-AxDRM-Message",this.aH.token),t}constructor(t,i,e){super(t,i,e,M.CT)}};function Nx(t){const i=new j(2*t.length);for(let e=0;e=1&&t[0].jE.length>0}YV(t){const i=this.aH.playready.customData;if(i){const t=Nx(i),e=Nx(''+Go(t)+"");return Promise.resolve({playready:{qS:e}})}return super.YV(t)}async nH(t,i){const e=await lx(t);return this.bH(e)}async bH(t){var i,e;let s=null;const n=so(new DataView(t),new Ui,!0);let r;try{r=zd.UE(n)}catch(t){return s}const h=null==(i=r.YE("PlayReadyKeyMessage")[0])?void 0:i.YE("LicenseAcquisition")[0];var o;const a=null!=(o=null==h?void 0:h.YE("Challenge"))?o:[];this.AH(a)&&(s=wu(a[0].eP));const u=new Ra;var c;const d=null!=(c=null==h||null==(e=h.YE("HttpHeaders")[0])?void 0:e.YE("HttpHeader"))?c:[];for(const t of d){const i=t.YE("name")[0].eP,e=t.YE("value")[0].eP;u.append(i,e)}return this.yH=u,s}dH(t,i){return Promise.resolve(t)}lH(t,i){return super.hH(t,Xa.Ik,i)}constructor(t,i,e){super(Zg,t,i,e,M.CT),this.yH=void 0}};r(),r();var Mx=class t{static SH(t){return"3"===t.version?fx.vH:fx.fH}TH(){const t={};if(this.zb===fx.vH){const i={LatensRegistration:_x(this.kH,fx.vH)};t["X-TITANIUM-DRM-CDATA"]=wc(JSON.stringify(i))}return t}get EH(){return this.zb}get MS(){return this.zb===fx.fH}constructor(i){this.kH=void 0,this.zb=void 0,this.kH=i,this.zb=t.SH(i)}};var Lx=class extends gc{YV(t){const i=this.aH;if(!this.aH)throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium PlayReady DRM configuration.");if(mT(i)){const t={};return t.playready={qS:Ox(i,this.PH.EH)},Promise.resolve(t)}return Promise.reject(gx(i,fx.qm))}tH(){const t=new Ra(this.PH.TH());return t.OT(super.tH()),t}async $V(t,i,e){const s=t.oE;if(!s)throw new fs(Vo.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium PlayReady license request",t,i);let n,r;try{const t=await s.HT(e),i=Yh(new j(t)),o=zd.UE(i);if(o){const t=function(t,i){return function(t,i){const e=t.m.slice(),s=[];for(;e.length>0;){const t=e.shift();i(t)?s.push(t):e.push(...t.m)}return s}(t,t=>t.JE===i)}(o,"CustomData");var h;if(t.length>0)n=JSON.parse(t[0].eP),r=null==(h=n.DrmErr)?void 0:h.desc}}catch(t){}throw new fs(Vo.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium PlayReady license request",t,i,s.hk,s.vk,r)}AH(t){if(1!==t.length)throw new fs(Vo.CONTENT_PROTECTION_INITIALIZATION_INVALID,"PlayReady license message incorrectly formatted, Challenge not found.");return!0}constructor(t,i,e){super(t,i,e),this.PH=void 0,this.PH=new Mx(this.aH)}};function Ox(t,i){const e=_x(t,i),s=e.DeviceInfo.FormatVersion,n=function(t){return t.replace(/</g,"<").replace(/>/g,">")}(function(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}(""+wc(''+e.AccountName+""+e.CustomerName+""+e.PortalId+''+e.DeviceInfo.DeviceType+""+e.DeviceInfo.OSType+""+e.DeviceInfo.OSVersion+""+e.DeviceInfo.DRMProvider+""+e.DeviceInfo.DRMVersion+""+e.DeviceInfo.DRMType+""+e.DeviceInfo.DeviceVendor+""+e.DeviceInfo.DeviceModel+"")+"")),r=nm(n,!0);return nm(''+Go(r)+"",!0)}r();var Fx=class extends gc{get wH(){if(wT(this.aH))return this.aH.token}AH(t){if(1!==t.length)throw new fs(Vo.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Vudrm PlayReady license message incorrectly formatted, Challenge not found.");return!0}iH(t,i){const e=Mo({},t||{},{token:this.wH});return super.iH(e,i)}constructor(t,i,e){super(t,i,e),this.qV("https://playready-license.drm.technology/rightsmanager.asmx")}};r();var Ux=class extends gc{iH(t,i){let e=t;return vT(this.aH)&&(e=Ax(this.aH,e)),super.iH(e,i)}constructor(t,i,e){super(t,i,e),this.qV("https://emeademo.dev.ott.irdeto.com/playready/rightsmanager.asmx")}};r();var Vx=class extends gc{tH(){const t=super.tH();return Tx(this.aH,"PlayReady",t)}constructor(t,i,e){super(t,i,e),this.qV("https://connect.conax.com:8010/cxplayready/rightsmanager.asmx")}};r();var Hx=class extends gc{get wH(){return Px(this.aH)}rH(t){const i=function(t){const i=Yh(new j(t));return Vh(i,"=0)return Promise.resolve(t.substr(i+1));{const i=t.split("skd://").pop();if(i){if(/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/.test(i))return Promise.resolve(i)}const e=t.split("/");return Promise.resolve(e[e.length-1])}}async YV(t){var i;const e=null!=(i=this.FH)?i:pc(new j(t)),s=await this.OH(e);this.MH=s;const n={};return n.fairplay={ZS:s},n}tH(){const t=super.tH();return t.set("Content-Type",this.LH),t}async dH(t,i){return this.GV?this.GV:await this.UH(i)}lH(t,i){return super.hH(t,Xa.Tk,i)}VH(t){const i=this.CH(),e=this.tH(),s={Yu:i,dk:M.CT,fk:e,Uk:X.GET,zk:!1,zT:null,Vk:0,Yg:t,Km:Al.bk,Wk:Xa.Ek};return new $n(s)}async UH(t){const i=this.VH(t),e=await this.SP.lk(i),s=await e.HT();return new j(s)}rH(t){let i;if("string"==typeof t){let e=t.trim();""===e.substr(0,5)&&""===e.substr(-6)&&(e=e.slice(5,-6)),i=_c(e)}else i=new j(t);return i}iH(t,i){let e=super.iH(t,i);return Vh(e,"skd:")&&(e=e.substr(4)),e}constructor(t,i,e,s,n){super(t.kS,i,e,s,n),this.MH="",this.DH=void 0,this.FH=void 0,this.FH=t.HH}};r();var zx=class extends ro{get LH(){return Hu.RH}OH(t){let i=t.split("://",1);return"skd"!==i[0].slice(-3).toLowerCase()?Promise.resolve(""):(i=t.split(";",2),i.length>1?Promise.resolve(i[1]):Promise.resolve(super.OH(t)))}async nH(t){return t}rH(t){return new j(t)}iH(t,i){const e=t||{};return e.p1=ku(),super.iH(e,i)}constructor(t,i,e,s){super(t,i,e,s,M.CT)}};r();var Gx=class extends ro{get LH(){return Hu.DT}get wH(){if(!wT(this.aH))throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Token is required for FairPlay VuDrm.");return this.aH.token}NH(t,i){const e={token:this.wH,contentId:i,payload:Go(t)};return JSON.stringify(e)}rH(t){return new j(t)}tH(){const t=super.tH();return t.set("x-vudrm-token",this.wH),t}constructor(t,i,e,s){super(t,i,e,s,M.CT),this.qV("https://fairplay-license.drm.technology/license"),this.BH("https://fairplay-license.drm.technology/certificate")}};r();var Xx="Verimatrix Fairplay license response incorrectly formatted. Invalid json.",jx="Verimatrix Fairplay license response incorrectly formatted. Ckc not found.",Qx=class extends ro{rH(t){const i=function(t){let i;try{i=JSON.parse(t).ckc}catch(t){throw new fs(Vo.CONTENT_PROTECTION_LICENSE_INVALID,Xx)}if(!i)throw new fs(Vo.CONTENT_PROTECTION_LICENSE_ERROR,jx);return i}(Yh(new DataView(t)));return super.rH(i)}constructor(t,i,e,s){super(t,i,e,s,M.CT)}};r();var Kx=class extends ro{get LH(){return Hu.DT}async nH(t){const i=this.aH;if(!i)throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium Fairplay DRM configuration.");return px(i,Go(t),fx.jm)}rH(t){try{let i;if(Z(t)){const e=t.trim();i=JSON.parse(e)}else i=t;if(i.license){const t=wu(i.license);return new j(t)}throw new fs(Vo.CONTENT_PROTECTION_LICENSE_ERROR,"No license received from the Titanium Fairplay license server")}catch(t){throw new fs(Vo.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Titanium Fairplay license server")}}$V(t,i,e){return mx(t,i,e)}constructor(t,i,e,s){super(t,i,e,s,M.DT)}};r();var Yx=class extends ro{CH(){const t=super.CH();if(!t)return t;const i=zd.Dh(t),e=this.aH;return vT(e)&&ub(i,{accountId:e.accountId,applicationId:e.applicationId||""}),i.href}OH(t){return vT(this.aH)?Promise.resolve(this.aH.contentId):super.OH(t)}async nH(t){return t}rH(t){return new j(t)}get LH(){return Hu.RH}iH(t,i){let e=t;return vT(this.aH)&&(e=function(t,i){return Mo({},Ax(t,i),{KeyId:t.keyId})}(this.aH,e)),super.iH(e,i)}constructor(t,i,e,s){super(t,i,e,s,M.CT),this.qV("https://emeademo.dev.ott.irdeto.com/streaming/getckc"),this.BH("https://emeademo.dev.ott.irdeto.com/streaming/getcertificate")}};r();var Jx=class extends ro{tH(){const t=super.tH();return Tx(this.aH,"FairPlay",t)}async UH(t){const i={Yu:this.CH(),dk:M.CT,fk:{},Uk:X.GET,zk:!1,zT:null,Vk:0,Yg:t,Km:Al.bk,Wk:Xa.Ek},e=await this.SP.lk(i),s=await e.HT();return new j(s)}async nH(t){return t}OH(t){const i=t.indexOf("?");if(0===t.indexOf("skd://")){let e;return e=i>=0?t.substring(6,i):t.substring(6),Promise.resolve(function(t){return Yh(_c(t))}(e))}return Promise.resolve("unknown")}rH(t){try{const i=JSON.parse(t);return new j(wu(i.CkcMessage))}catch(t){throw new m("CFLRW-66")}}constructor(t,i,e,s){if(super(t,i,e,s,M.NT),!fT(i))throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Conax configuration");this.qV("https://connect.conax.com:8097/license")}};r();var Zx=class extends ro{OH(t){return Vh(t,"skd://")?Promise.resolve(t.substring(6,40)):Promise.reject(new fs(Vo.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Error while determining the KeyOS Content ID."))}NH(t,i){return"spc="+Go(t)+"&assetId="+i}constructor(t,i,e,s){super(t,i,e,s,M.NT),this.qV(oT[an.jm])}};r();var $x=class extends ro{get wH(){return Px(this.aH)}NH(t,i){const e="spc="+encodeURIComponent(Go(t))+"&"+encodeURI(i);return"persistent"===this.XV.licenseType?e+"&offline=true":e}tH(){return xx(super.tH(),this.wH,this.aH)}constructor(t,i,e,s){super(t,i,e,s,M.NT),this.qV("https://lic.drmtoday.com/license-server-fairplay/")}};r();var tI=class extends ro{OH(t){let i=t;return Vh(i,"skd:")&&(i="http:"+i.substring(4)),Vh(i,"http:")||Vh(i,"https:")?Promise.resolve(zd.Dh(i).hostname):Promise.reject(new m("Could not parse ExpressPlay FairPlay content ID."))}async nH(t){return t}rH(t){return new j(t)}get LH(){return Hu.RH}constructor(t,i,e,s){super(t,i,e,s,M.CT)}};r();var iI=class extends ro{tH(){const t=super.tH(),i=this.aH.token;return t.set("Authorization","Bearer "+i),t}constructor(t,i,e,s){super(t,i,e,s,M.NT)}};r();var eI=class extends ro{async UH(t){const i=this.CH(),e=this.tH(),s={Yu:i,dk:M.DT,fk:e,Uk:X.POST,Yg:t,Km:Al.bk,Wk:Xa.Ek},n=await this.SP.lk(s),r=await n.FT();return new j(_c(r.certificate))}get LH(){return Hu.DT}async lH(t,i,e){void 0===e&&(e=M.NT);const s=Go(t),n=this.aH,r=await Cx(n,"fairplay",this.SP,i),h=vc(JSON.stringify({spc:s,ticket:r.ticket})),o={Yu:this.jV(),dk:M.DT,fk:this.tH(),Uk:X.POST,zT:h,Vk:0,Yg:i,Km:Al.bk,Wk:Xa.Tk},a=await this.SP.lk(o);return _c((await a.FT()).licence)}constructor(t,i,e,s){if(super(t,i,e,s,M.DT),!yT(i))throw new m("Invalid Xstream DRM configuration")}};r();var sI=class extends ro{NH(t,i){return Go(t)}rH(t){if(0===t.length)throw new fs(Vo.CONTENT_PROTECTION_LICENSE_ERROR,"Vimond license request error.");return super.rH(t)}tH(){const t=super.tH();return t.set("Content-Type","text/plain"),t}constructor(t,i,e,s){super(t,i,e,s,M.NT)}};r();var nI=class extends ro{get LH(){return Hu.DT}NH(t,i){return t}rH(t){return new j(t)}tH(){if(!AT(this.aH))throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");const t=super.tH();return t.set("X-AxDRM-Message",this.aH.token),t}constructor(t,i,e,s){super(t,i,e,s,M.CT)}};r();var rI=class extends ro{get LH(){return Hu.NT}NH(t,i){const e={spc:Go(t)};return JSON.stringify(e)}OH(t){const i=zd.Dh(t);return this.WH=t,i.searchParams.has("b")?Promise.resolve(i.searchParams.get("b")):Promise.reject(new fs(Vo.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Error during license server request: Could not extract content id"))}iH(t,i){let e=this.jV();return!e&&this.WH&&(e=this.WH),e&&(e=e.replace("skd://","https://")),super.iH(t,i||e)}rH(t){try{let i;if(i=Z(t)?JSON.parse(t.trim()):t,i.ckc)return _c(i.ckc)}catch(t){throw new fs(Vo.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Uplynk Fairplay license server")}throw new fs(Vo.CONTENT_PROTECTION_LICENSE_ERROR,"No license received from the Uplynk Fairplay license server")}constructor(t,i,e,s){super(t,i,e,s,M.DT),this.WH=void 0}};r(),r(),r();var Nu=class{qH(t){return this.zH(t)}GH(t,i){throw new g(i+" must be "+this.XH+". (Received: "+t+")")}constructor(t,i){this.zH=void 0,this.XH=void 0,this.zH=t,this.XH=i}},xt=(new Nu(function(t){return!0},"any"),new Nu(ho,"a number")),hi=new Nu(Z,"a string"),hI=new Nu(Xd,"a boolean"),Zh=(new Nu(jd,"a date"),new Nu(qd,"undefined")),Ns=new Nu(Lu,"an object"),oI=new Nu(function(t){return null===t},"null");new Nu(function(t){return null==t},"null or undefined");function aI(t,i){throw new g(i+" has an incorrect type")}var uI=class{qH(t){if(!Lu(t))return!1;for(const i of w.keys(this.Qp)){if(!this.Qp[i].qH(t[i]))return!1}return!0}GH(t,i){if(!Lu(t))throw new g(i+" must be an object.");for(const e of w.keys(this.Qp)){const s=this.Qp[e];if(!s.qH(t[e]))return s.GH(t[e],i+"."+String(e))}throw new g}constructor(t){this.Qp=void 0,this.Qp=t}};function $h(t){return new uI(t)}function cI(t){return w.keys(t).map(i=>t[i])}var dI=class{qH(t){return pi(this.jH,t)}GH(t,i){return aI(0,i)}constructor(t){this.jH=void 0,this.jH=t}};function lI(t){return new dI(t)}var fI=class{qH(t){return this.QH.some(i=>i.qH(t))}GH(t,i){return aI(0,i)}constructor(t){this.QH=void 0,this.QH=t}};function Fs(){for(var t=arguments.length,i=new Array(t),e=0;ethis.KH.qH(t))}GH(t,i){if(!ul(t))throw new g(i+" must be an array.");for(let e=0;ethis.KH.qH(t[i]))}GH(t,i){if(!Lu(t))throw new g(i+" must be an object.");for(const e of w.keys(t))if(!this.KH.qH(t[e]))return this.KH.GH(t[e],i+"."+e);return aI(0,i)}constructor(t){this.KH=void 0,this.KH=t}};function gI(t){return new _I(t)}var pI=class{qH(t){return this.KH().qH(t)}GH(t,i){return this.KH().GH(t,i)}constructor(t){this.KH=void 0,this.KH=mu(t)}};var mI=$h({responseCode:xt,isException:hI,description:hi,title:hi,correlationId:hi});async function wI(t,i,e,s,n){const r=function(t,i,e,s){const n={token:i.token,account:i.accountId,form:"json"},r=decodeURIComponent(Gc(e,n)),h=new Ra({});h.append("Content-Type","application/json");const o=Go(t),a={getFairplayLicense:{releasePid:i.releasePid,spcMessage:o}};return{Yu:r,dk:M.NT,fk:h,Uk:X.POST,zT:JSON.stringify(a),Yg:s,Km:Al.bk,Wk:Xa.Tk}}(t,i,e,n);return await async function(t,i){const e=await i.lk(t),s=await e.FT();if(mI.qH(s))throw new fs(Vo.CONTENT_PROTECTION_LICENSE_ERROR,s.description,void 0,t.Yu,s.responseCode);return _c(s.getFairplayLicenseResponse.ckcResponse)}(r,s)}var yI=class extends ro{OH(t){const i=t.replace("FairPlay",this.YH.releasePid);return super.OH(i)}async lH(t,i){return await wI(t,this.YH,this.jV(),this.SP,i)}constructor(t,i,e,s){super(t,i,e,s,M.CT),this.YH=void 0,this.YH=i}};r();var AI=class extends Qo{cH(t){return t.clearkey||{}}async JV(t,i,e,s){const n=this.XV;if(this.jV())return super.JV(t,this.oH,e,s);if(n.keys&&n.keys.length){const t={keys:n.keys.map(t=>({kty:"oct",kid:t.id,k:t.value}))};return br(JSON.stringify(t)).buffer}throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The clearkey license has not been configured correctly.")}dH(t,i){return Promise.resolve(new j(0))}async lH(t,i){const e=await super.hH(t,Xa.Rk,i),s=JSON.parse(pc(e));if(s.keys)for(const t of s.keys)t.k&&(t.k=Cp(t.k)),t.kid&&(t.kid=Cp(t.kid));return br(JSON.stringify(s))}constructor(t,i,e,s){super(t,i,e,s,M.CT)}},bI=class extends AI{constructor(t,i,e){super(ip,t,i,e)}},SI=class extends AI{constructor(t,i,e){super(ep,t,i,e)}};r();var TI=class extends ic{};r(),r();var kI={url:"",method:"GET",headers:{},body:null,useCredentials:!1};async function EI(t,i,e){const s=BI(i),n=t.onCertificateRequest;if(!n||"function"!=typeof n)return Promise.resolve(i);const r=await Nc(Promise.resolve(n.call(t,s)),e);return om(r)?wa(r):DI(Mo({},kI,r))}async function PI(t,i,e,s,n){const r=t.onCertificateResponse,h=CI(i,e,s);if(!r||"function"!=typeof r)return Promise.resolve(i);return wa(await Nc(Promise.resolve(r.call(t,h)),n))}async function xI(t,i,e,s){const n=await async function(t,i,e,s){const n=null==t?void 0:t.onLicenseRequest,r=RI(i,e);if(!n||"function"!=typeof n)return Promise.resolve(r);0;const h=await Nc(Promise.resolve(n.call(t,r)),s);if(om(h))return wa(h).buffer;return Mo({fairplaySkdUrl:void 0},kI,h)}(t,i,e,s);return n instanceof ArrayBuffer?n:DI(n)}async function II(t,i,e,s,n,r){const h=RI(e,n),o=await async function(t,i,e,s,n){const r=null==t?void 0:t.onLicenseResponse,h=CI(i,e,s);if(!r||"function"!=typeof r)return Promise.resolve(i);0;const o=await Nc(Promise.resolve(r.call(t,h)),n);return wa(o)}(t,new j(i),h,s,r);return wa(o)}function RI(t,i){return Mo({},BI(t),{fairplaySkdUrl:i})}function CI(t,i,e){return{url:e.gk,status:e.hk,statusText:e.vk,headers:e.fk.MT(),body:t,request:i}}function DI(t){return new $n({Yu:t.url,Uk:t.method,fk:t.headers,zT:t.body,zk:t.useCredentials,Km:Al.bk})}function BI(t){var i;return{url:t.Yu,body:null!=(i=NI(t.zT))?i:null,headers:t.fk.MT(),method:t.Uk,useCredentials:t.zk}}function NI(t){if(t)return"string"==typeof t?br(t):t instanceof ArrayBuffer?new j(t):xc(t)?ta(t):void 0}var MI=class extends gc{dH(t,i){return Promise.resolve(t)}async lH(t,i){const e=await this.bH(Gu(t).buffer),s=this.ZV(e,M.CT,Xa.Ik,i),n=await xI(this.JH,s,void 0,i);if(n instanceof ArrayBuffer)return new j(n);if(""===n.Yu)throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");try{const t=await this.SP.lk(n),e=await t.HT(i);return await II(this.JH,e,s,t,void 0,i)}catch(t){throw sa(t),new fs(Vo.CONTENT_PROTECTION_LICENSE_ERROR,"Error during PlayReady license request",t)}}constructor(t,i,e,s){super(t,i,e),this.JH=void 0,this.JH=s}};r();var LI=class extends TI{async dH(t,i){if(this.GV)return this.GV;const e=this.ZV(t,M.CT,Xa.xk,i),s=await EI(this.JH,e,i);if(s instanceof j)return s;if(""===s.Yu)throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The certificate request URL has not been correctly configured.");let n,r;try{n=await this.SP.lk(s),r=await n.HT(i)}catch(t){throw sa(t),new fs(Vo.CONTENT_PROTECTION_CERTIFICATE_ERROR,"Error during Widevine certificate request",t)}const h=RI(e,void 0);return await PI(this.JH,new j(r),h,n,i)}async lH(t,i){const e=this.ZV(t,M.CT,Xa.Pk,i),s=await xI(this.JH,e,void 0,i);if(s instanceof ArrayBuffer)return new j(s);if(""===s.Yu)throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");try{const t=await this.SP.lk(s),n=await t.HT(i);return await II(this.JH,n,e,t,void 0,i)}catch(t){throw sa(t),new fs(Vo.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Widevine license request",t)}}constructor(t,i,e,s){super(t,i,e,M.CT),this.JH=void 0,this.JH=s}};r();var OI=class extends ro{async dH(t,i){if(this.GV)return this.GV;const e=this.VH(i),s=await EI(this.JH,e,i);if(xc(s))return s;try{const t=await this.SP.lk(s),n=await t.HT(),r=RI(e,void 0);return await PI(this.JH,new j(n),r,t,i)}catch(t){throw sa(t),new fs(Vo.CONTENT_PROTECTION_CERTIFICATE_ERROR,"Error during FairPlay certificate request",t)}}async lH(t,i){const e=this.ZV(t,M.CT,Xa.Tk,i),s=await xI(this.JH,e,this.ZH,i);if(s instanceof ArrayBuffer)return new j(s);if(""===s.Yu)throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");try{const t=await this.SP.lk(s),n=await t.HT(i);return await II(this.JH,n,e,t,this.ZH,i)}catch(t){throw sa(t),new fs(Vo.CONTENT_PROTECTION_LICENSE_ERROR,"Error during FairPlay license request",t)}}OH(t){var i;return this.ZH=t,(null==(i=this.JH)?void 0:i.extractFairplayContentId)?Promise.resolve(this.JH.extractFairplayContentId(t)):super.OH(t)}constructor(t,i,e,s,n){super(t,i,e,s,M.CT),this.JH=void 0,this.ZH=void 0,this.JH=n}},FI=class{$H(t,i,e,s){switch(t.kS.Km){case an.zm:return this.tW(i,e,s);case an.qm:return this.iW(i,e,s);case an.jm:return this.eW(t,i,e,s);case an.Xm:return this.sW(i,e,s);case an.Gm:default:return this.nW(i,e,s)}}tW(t,i,e){const s=function(t){return t.integration===jS&&Z(t.customIntegrationId)}(t)?t.customIntegrationId:t.integration;if(s&&tT.LR.DR(s,Wg)){const n=tT.LR.MR(s,Wg,t);return new LI(t,i,e,n)}switch(s){case Pr:return new wx(t,i,e);case OS:return new yx(t,i,e);case LS:return new bx(t,i,e);case NS:return new kx(t,i,e);case US:return new Ix(t,i,e);case HS:return new Rx(t,i,e);case WS:return new Dx(t,i,e);case zS:return new Bx(t,i,e);default:return new TI(t,i,e,M.CT)}}iW(t,i,e){const s=t.integration;if(s&&tT.LR.DR(s,Vg)){const n=tT.LR.MR(s,Vg,t);return new MI(t,i,e,n)}switch(s){case Pr:return new Lx(t,i,e);case OS:return new Fx(t,i,e);case LS:return new Ux(t,i,e);case NS:return new Vx(t,i,e);case US:return new Hx(t,i,e);case WS:return new Wx(t,i,e);case zS:return new qx(t,i,e);default:return new gc(t,i,e)}}eW(t,i,e,s){const n=i.integration;if(n&&tT.LR.DR(n,Qs)){const r=tT.LR.MR(n,Qs,i);return new OI(t,i,e,s,r)}switch(n){case MS:return new zx(t,i,e,s);case OS:return new Gx(t,i,e,s);case FS:return new Qx(t,i,e,s);case Pr:return new Kx(t,i,e,s);case LS:return new Yx(t,i,e,s);case NS:return new Jx(t,i,e,s);case Ar:return new Zx(t,i,e,s);case US:return new $x(t,i,e,s);case VS:return new tI(t,i,e,s);case HS:return new iI(t,i,e,s);case WS:return new eI(t,i,e,s);case qS:return new sI(t,i,e,s);case zS:return new nI(t,i,e,s);case GS:return new rI(t,i,e,s);case XS:return new yI(t,i,e,s);default:return new ro(t,i,e,s,M.NT)}}nW(t,i,e){return new bI(t,i,e)}sW(t,i,e){return new SI(t,i,e)}rW(t){return t.Km===an.qm||t.Km===an.zm||t.Km===an.jm||t.Km===an.Gm||t.Km===an.Xm}MS(t,i){var e;if(t.Km!==an.qm)return!1;if(it(null==(e=i.playready)?void 0:e.customData))return!0;const s=i.integration;return(!s||!tT.LR.DR(s,Qs))&&(s===Pr&&new Mx(i).MS)}_H(t,i){if(t.Km!==an.zm)return;const e=i.integration;return e&&tT.LR.DR(e,Qs)?void 0:e===Pr?wx._H():void 0}};r(),r(),r();var UI="theoplayer-stored-network-info-v2",VI=25e5,HI=class{hW(t){var i;const e=null==(i=zd.mP)?void 0:i.Wy(t);if(void 0===e)return;const s=JSON.parse(e);if(void 0!==s&&void 0!==s[this.oW]){if(!this.aW(s))return s[this.oW].availableBandwidth;var n;null==(n=zd.mP)||n.qy(t,JSON.stringify({}))}}uW(){const t=this.hW(UI);if(void 0!==t)return t;const i=this.hW("theoplayer-stored-network-info");return i?8*i:void 0}aW(t){const i=t[this.oW].storedTimestamp;return!!i&&ku()-i>36e5}cW(t){this.dW=t,this.lW()}fW(){var t;return null!=this.dW||(this.dW=null!=(t=this.uW())?t:VI),this.dW}constructor(){this.oW=LA,this.dW=void 0,this.lW=ph(()=>{var t;const i={[this.oW]:{availableBandwidth:this.dW,storedTimestamp:ku()}};null==(t=zd.mP)||t.qy(UI,JSON.stringify(i))},1e4)}};HI.Ng=new HI,r();var V=function(t){return t[t.vW=0]="vW",t[t._W=1]="_W",t[t.gW=2]="gW",t[t.pW=3]="pW",t[t.mW=4]="mW",t[t.wW=5]="wW",t[t.dR=6]="dR",t[t.yW=7]="yW",t[t.AW=8]="AW",t[t._R=9]="_R",t[t.bW=10]="bW",t[t.gR=11]="gR",t[t.TW=12]="TW",t}({});r();var To=class{get kW(){return 0}get EW(){return 0}PW(t){}};r(),r();var WI=class extends wp{constructor(t){super("contentProtectionsTracked"),this.xW=void 0,this.xW=t}},ya=class extends Ne{IW(t){this.kH=t}_H(t){const i=this.kH;if(void 0!==i)return this.RW._H(t,i)}MS(t){const i=this.kH;return void 0!==i&&this.RW.MS(t,i)}DW(t){const i={kS:t.kS,BW:t.BW||[],NW:t.NW,HH:t.HH,MW:t.MW||[]},e=this.RW.$H(i,this.kH||{},t.uH,this.nV);return i.NW&&e.qV(i.NW),new qI(e)}LW(t){if(!t)return;Jr(t,t=>void 0!==t.uH)&&this.So(new WI(t))}constructor(t,i=new FI){super(),this.nV=void 0,this.RW=void 0,this.kH=void 0,this.nV=t,this.RW=i}},qI=class{KV(t){return this.OW.KV(t)}YV(t,i,e){return this.OW.YV(i,e)}QV(){return this.OW.QV||void 0!==this.OW.GV}dH(t,i){return this.OW.dH(t,i)}lH(t,i,e){return i&&this.OW.qV(i),this.OW.lH(t,e)}zg(){this.OW.kn()}constructor(t){this.OW=void 0,this.OW=t}};r();var Yu=class extends eo{FW(t){this.UW.push(t);for(const i of t.II)this.tt(i);this.VW(t)}WW(t){oi(this.UW,t),this.qW(t);for(const i of t.II)this.zW(i)||this.it(i)}zW(t){for(const i of this.UW)if(i.DI(t))return!0;return!1}VW(t){t.wn(Vt.eI,this.GW),t.wn(Vt.nI,this.uV)}qW(t){t.mn(Vt.eI,this.GW),t.mn(Vt.nI,this.uV)}kn(){for(;this.UW.length>0;)this.WW(this.UW[0]);super.kn()}xa(){return TS(this)}constructor(t){super(),this.UW=[],this.GW=t=>{this.tt(t.Ht)},this.uV=t=>{const i=t.Ht;this.zW(i)||this.it(i)};for(const i of t)this.FW(i)}};r(),r();var zI,GI={forceSeekOffset:0,maximumOffset:0,maximumPlaybackRate:0,minimumOffset:0,minimumPlaybackRate:0,targetOffset:0},XI=class{get Ca(){return null!=this.hu||(this.hu=function(t){return{get enabled(){return t.Rt},set enabled(i){t.Rt=Zn(i)},get monitoringLivePlayback(){return t.XW},get currentLatency(){return t.BL},get currentConfiguration(){return function(t){if(void 0!==t)return{get minimumOffset(){return t.minimumOffset},get maximumOffset(){return t.maximumOffset},get targetOffset(){return t.targetOffset},get forceSeekOffset(){return t.forceSeekOffset},get minimumPlaybackRate(){return t.minimumPlaybackRate},get maximumPlaybackRate(){return t.maximumPlaybackRate}}}(t.Cd)}}}(this)),this.hu}get Rt(){var t,i;return null!=(i=this.We)?i:Boolean(null==(t=this.jW)?void 0:t.Rt)}set Rt(t){this.We=t,this.jW&&(this.jW.Rt=t)}get XW(){var t,i;return null!=(i=null==(t=this.jW)?void 0:t.sL)&&i}get BL(){var t;return null==(t=this.jW)?void 0:t.DL}get Cd(){return this.jW?this.jW.nL:GI}Ea(t){this.jW=t,void 0!==this.We&&(this.jW.Rt=this.We)}hr(){this.jW=void 0,this.We=void 0}constructor(){this.hu=void 0,this.jW=void 0,this.We=void 0}};var jI=Boolean(s&&s.TextTrack),QI=class extends _o{get BL(){}get QW(){const t=this.TL.IP,i=this.MP;return t.Cr(i,.01)}get ht(){return this.YL}get IP(){return this.TL.IP._s()}get CP(){return this.TL.CP}set CP(t){t&&this.TL.KW(t)}get bt(){return this.Ac}get MP(){return void 0!==this.YW?this.YW:this.TL.MP}set MP(t){this.OP(t)}OP(t,i){this.KP&&(this.YW=t),this.TL.My(t)}get ct(){return this.TL.ct}get UP(){return this.TL.UP}get lt(){return this.JW}get WP(){return this.ZW}get zP(){}get jP(){}get KP(){return this.TL.KP}get JP(){return Mo({},{iO:0,eO:0,sO:0,nO:0,rO:0,hO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.TL.ZP())}get $P(){return this.TL.$P}set $P(t){this.TL.$P=t}get sx(){return!0}get hx(){return this.TL.hx}get ux(){return this.TL.ux}set ux(t){this.TL.ux=t}get _x(){return this.TL.$W.played}get mx(){return this.tq}set mx(t){this.tq=t,this.iq&&(this.iq.mx=t)}get Ax(){return this.TL.Ax}get Sx(){return this.TL.Sx._s()}get kx(){return this.TL.kx}get nq(){return this.TL.nq}get nt(){return this.Gl}get rt(){return this.$L}get Rx(){return this.TL.Rx}get Bx(){return this.TL.Bx}get Mx(){return this.TL.Mx}set Mx(t){this.TL.Mx=t}get Fx(){return this.rq}get Vx(){return this.TL.Vx}set Vx(t){this.TL.Vx=t}get hq(){return this.oq}we(){this.TL.we()}be(){this.TL.be()}async Ta(t,i,e){ii(e),this.Ac=t;const s={Km:Zr.mV,iR:t.src,qT:t.type,aq:this.uq(t),mx:this.tq,cq:t.crossOrigin,dq:i.metadata&&i.metadata.title};this.lq.IW(t.contentProtection),this.iq=await this.TL.Un(s),ii(e),i.textTracks&&this.fq(i.textTracks),Ds(this.nt)}Px(t,i,e,s){return Promise.resolve()}xx(){return Promise.resolve()}fq(t){for(const e of t)if(this.TL.vq()&&Qt.ru&&jI&&!KP(e.kind,e.label)&&this._q(e)){var i;const t=null!=(i=e.kind)?i:Ao.OU;this.TL.gq(e.src,t,e.label,e.srclang,e.default)}else{if(void 0===e.src)continue;this.pq.eV(e)}}_q(t){return!t.format||"webvtt"===t.format}async Gx(){try{await this.TL.Gx()}catch(t){}for(;!this.QW;)await this.TL.ww(d.Qw)}zx(){this.TL.zx()}jx(){return void 0!==this.TL.$W.webkitShowPlaybackTargetPicker}Qx(){this.TL.$W.webkitShowPlaybackTargetPicker&&this.TL.$W.webkitShowPlaybackTargetPicker()}Kx(){this.TL.$W.webkitShowPlaybackTargetPicker&&this.TL.$W.webkitShowPlaybackTargetPicker()}Wx(){return this.TL.$W}Hx(){return this.TL.Ma}Aa(){return this.TL.mq}tI(t){return this.TL.wq(t)}async hr(){this.Ac=void 0,this.JW=void 0,this.ZW=void 0,this.iq=void 0,await this.pq.hr(),await this.yq.hr(),this.TL.Aq(),await this.TL.hr(),this.bq.hr(),this.mx=this.tq,this.ht.hr(),this.rt.hr(),this.YW=void 0}async kn(){await this.hr(),this.Vo(),this.Sq(),this.Tq(),this.bq.kn(),this.kq.zg(),this.TL.Eq=void 0,await this.xq.Pq(this.TL),this.YL.kn(),this.$L.kn(),this.Gl.kn(),await this.pq.kn(),await this.yq.kn()}Iq(){this.TL.wn(d.uo,this.Rs),this.TL.wn(d.jw,this.Rs),this.TL.wn(d._y,this.Nc),this.TL.wn(d.Qw,this.Rs),this.TL.wn(d.Ww,this.Rs),this.TL.wn(d.$w,this.Rs),this.TL.wn(d.Zw,this.Rq),this.TL.wn(d.Bw,this.Rs),this.TL.wn(d.Kw,this.Rs),this.TL.wn(d.gy,this.Rs),this.TL.wn(d.Rw,this.Rs),this.TL.wn(d.Jw,this.Cq),this.TL.wn(Do.TM,this.IL),this.TL.wn(Mc.ma,this.Dq),this.TL.wn(d.Pw,this.Rs),this.TL.wn(d.Ew,this.Bq),this.TL.$W.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.Nq)}Sq(){this.TL.mn(d.uo,this.Rs),this.TL.mn(d.jw,this.Rs),this.TL.mn(d._y,this.Nc),this.TL.mn(d.Qw,this.Rs),this.TL.mn(d.Ww,this.Rs),this.TL.mn(d.$w,this.Rs),this.TL.mn(d.Zw,this.Rq),this.TL.mn(d.Bw,this.Rs),this.TL.mn(d.Kw,this.Rs),this.TL.mn(d.gy,this.Rs),this.TL.mn(d.Rw,this.Rs),this.TL.mn(d.Jw,this.Cq),this.TL.mn(Do.TM,this.IL),this.TL.mn(Mc.ma,this.Dq),this.TL.mn(d.Pw,this.Rs),this.TL.mn(d.Ew,this.Bq),this.TL.$W.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.Nq)}uq(t){if(!t.contentProtection||!t.contentProtection.fairplay)return[];return[{kS:$g,Mq:[{initDataTypes:[$g.Jm],videoCapabilities:[{contentType:"video/mp4",encryptionScheme:"cbcs"}]}]}]}Lq(){const t=this.TL.$W.audioTracks,i=this.TL.$W.videoTracks;t&&(t.addEventListener("addtrack",this.Oq),t.addEventListener("removetrack",this.Fq),t.addEventListener("change",this.Uq)),i&&(i.addEventListener("addtrack",this.Vq),i.addEventListener("removetrack",this.Hq),i.addEventListener("change",this.Wq))}Tq(){const t=this.TL.$W.audioTracks,i=this.TL.$W.videoTracks;t&&(t.removeEventListener("addtrack",this.Oq),t.removeEventListener("removetrack",this.Fq),t.removeEventListener("change",this.Uq)),i&&(i.removeEventListener("addtrack",this.Vq),i.removeEventListener("removetrack",this.Hq),i.removeEventListener("change",this.Wq))}dh(t){for(let i=0;i{const i=t.lt,e=i.code,s=new Ga(Fk(e),"Something went wrong during native playback.",i),n=new Nk(e,s.message,i.message);this.qq(s,n)},this.Nc=()=>{this.So(new Si(this.MP,this.CP))},this.zq=()=>{!this.kx&&Qt.ru&&Qt.X_&&this.ct===1/0&&this.OP(1/0)},this.Rq=t=>{this.hx||(this.YW=void 0),this.So(t)},this.IL=t=>{this.YW=void 0},this.Nq=()=>{this.So(new Jk(this.KP))},this.Cq=()=>{this.Bx>0&&this.Rx>0&&this.So(new ts)},this.Oq=t=>{const i=this.TL.$W.audioTracks;if(i)for(let t=0;t{const i=[],e=this.TL.$W.audioTracks;if(e){for(const t of this.YL.II)ZI(e,t.mO)||i.push(t);for(const t of i)this.YL.it(t)}},this.Uq=()=>{this.dh(this.YL)},this.Vq=t=>{const i=this.TL.$W.videoTracks;if(i)for(let t=0;t{const i=[],e=this.TL.$W.videoTracks;if(e){for(const t of this.$L.II)ZI(e,t.mO)||i.push(t);for(const t of i)this.$L.it(t)}},this.Wq=()=>{this.dh(this.$L)},this.Bq=t=>{this.So(t),this.qq(t.errorObject,P(t.errorObject))},this.xq=i,this.nV=e,this.hw=o,this.TL=this.xq.Gq(Ci.Bk),this.tq=this.TL.$W.preload,this.kq=new dx(this,this.TL),this.bq=new bs(this.kq,!0),this.bq.wn(K,this.Rs),this.bq.wn(Do.bM,this.zq),this.lq=new ya(e,h),this.TL.Eq=this.lq,this.Iq(),this.YL=new rs,this.$L=new rs,this.Lq(),this.pq=new Kh(this.TL,this.nV),this.yq=new ex(this.TL,this.TL.nt),this.Gl=new Yu([this.TL.nt,this.pq.Z,this.yq.Z]),this.be()}};function KI(t){var i,e;if(!(null==(i=(zI||(zI=s&&s.document&&s.document.createElement("video")),e=zI).canPlayType)?void 0:i.call(e,t.type)))return!1;if(t.useNativePlayback)return!0;const n=Qt.ru||Qt.Tg;return!t.useManagedMediaSource||!n}var YI=class{PR(t,i,e,s,n,r,h){return new QI(t,i,e,s,n,r)}Xq(t,i){return KI(t)}jq(t){return kT(t)}Qq(){return!1}constructor(){this.Kq=V.TW}};function JI(t,i){for(const e of t.II)if(e.mO===i)return e}function ZI(t,i){for(let e=0;et.$W)}async kn(){await super.kn(),this.Iz.kn(),this.Nz.kn()}constructor(t,i,e,s,n,r,h){const o=new cR;super(eR.Ng,o),this.YS=void 0,this.Iz=void 0,this.Tu=void 0,this.Dz=void 0,this.nV=void 0,this.Rz=void 0,this.Cz=void 0,this.Nz=void 0,this.Tu=t,this.YS=i,this.nV=e,this.Rz=s,this.Cz=n,this.Dz=h,this.Iz=r,o.Pz=r,this.Nz=new sR(this.Tu)}};r(),r();var lR=class extends _o{get ht(){return this.Mz}get IP(){return ve.iL()._s()}get CP(){return new Date(NaN)}set CP(t){}get bt(){}get MP(){return 0}set MP(t){}OP(t,i){}get ct(){return 0}get xe(){return this.Tu}get UP(){return!0}get lt(){return this.Lz}get WP(){return this.Oz}get zP(){}get jP(){}get JP(){return{iO:0,eO:0,sO:0,nO:0,rO:0,hO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}}}get $P(){return!1}set $P(t){}get sx(){return!0}get hx(){return!0}get ux(){return 0}set ux(t){}get _x(){return ve.iL()._s()}get mx(){return q.lz}set mx(t){}get Ax(){return mh.VL}get Sx(){return ve.iL()._s()}get kx(){return!1}get nt(){return this.Fz}get Rx(){return 0}get rt(){return this.Mz}get Bx(){return 0}get Mx(){return 1}set Mx(t){}get Fx(){return this.rq}get Vx(){return!1}set Vx(t){}Zx(t){return!0}we(){}Gx(){throw this.So(new Pi(this.Oz)),this.Lz}zx(){}nu(){}async Ta(t,i){throw ii(i),this.So(new Pi(this.Oz)),this.Lz}Px(t,i,e){return Promise.resolve()}xx(){return Promise.resolve()}be(){}Xx(){return Promise.resolve()}Wx(){}Hx(){return this.ha}Aa(){return this.ea}xP(){return[]}qx(){}gr(t){}mr(){}get KP(){return!1}jx(){return!1}Qx(){}Kx(){}Yx(){}Jx(){}tI(t){}hr(){return Promise.resolve()}kn(){return this.Vo(),this.Mz.kn(),this.Fz.kn(),Promise.resolve()}constructor(t,i,e){super(),this.Tu=void 0,this.Lz=void 0,this.Oz=void 0,this.Mz=void 0,this.Fz=void 0,this.ha=new ls,this.ea=new aR,this.rq=new XI,this.Tu=t,this.Lz=i,this.Mz=new rs,this.Fz=new cc,this.Oz=e}};function fR(t){if(t&&Lu(t))return Mo({},t,{integration:vR(t.integration),fairplay:yR(t.fairplay),widevine:_R(t.widevine),playready:gR(t.playready),clearkey:AR(t.clearkey),aes128:bR(t.aes128),integrationParameters:SR(t.integrationParameters),preferredKeySystems:TR(t.preferredKeySystems),useOipfDrmAgent:Zn(t.useOipfDrmAgent)})}function vR(t){if(Z(t))return t}function _R(t){if(t&&Lu(t))return{persistentState:pR(t.persistentState),distinctiveIdentifier:pR(t.distinctiveIdentifier),audioRobustness:mR(t.audioRobustness),videoRobustness:mR(t.videoRobustness),licenseAcquisitionURL:Z(t.licenseAcquisitionURL)?t.licenseAcquisitionURL:void 0,licenseType:wR(t.licenseType),headers:t.headers,useCredentials:!!Xd(t.useCredentials)&&t.useCredentials,queryParameters:t.queryParameters,certificate:Z(t.certificate)||om(t.certificate)?t.certificate:void 0}}function gR(t){if(!t)return;const i=_R(t);if(!i)return;return Mo({},i,{customData:Z(t.customData)?t.customData:void 0})}function pR(t){switch(null==t?void 0:t.toLowerCase()){case"required":return"required";case"optional":return"optional";case"not-allowed":return"not-allowed"}}function mR(t){switch(t){case"HW_SECURE_ALL":return"HW_SECURE_ALL";case"HW_SECURE_DECODE":return"HW_SECURE_DECODE";case"HW_SECURE_CRYPTO":return"HW_SECURE_CRYPTO";case"SW_SECURE_DECODE":return"SW_SECURE_DECODE";case"SW_SECURE_CRYPTO":return"SW_SECURE_CRYPTO";case"":return""}}function wR(t){switch(null==t?void 0:t.toLowerCase()){case"temporary":return"temporary";case"persistent":return"persistent"}}function yR(t){if(!t)return;const i=_R(t);if(!i)return;return Mo({},i,{certificateURL:Z(t.certificateURL)?t.certificateURL:void 0})}function AR(t){if(!t)return;const i=_R(t);if(!i)return;const e=ul(t.keys)?t.keys.map(t=>function(t){if(!t||!Lu(t))return;const i=t.id,e=t.value;if(!Z(i)||!Z(e))return;return{id:i,value:e}}(t)).filter(it):void 0;return Mo({},i,{keys:e})}function bR(t){if(Lu(t))return{useCredentials:Xd(t.useCredentials)?t.useCredentials:void 0}}function SR(t){if(Lu(t))return t}function TR(t){return t&&ul(t)?t.map(t=>ST(t)).filter(it):[Wg,Vg,Qs]}r(),r(),r(),r();var kR={bt:void 0,MP:0,ct:NaN,UP:!1,lt:void 0,WP:void 0,$P:!1,hx:!0,ux:1,Ax:mh.VL,kx:!1,Rx:0,Bx:0,Mx:1};r();var ru=function(t){return t.DEFAULT="",t.THEO="theo",t.CSAI="csai",t.GOOGLE_IMA="google-ima",t.SPOTX="spotx",t.FREEWHEEL="freewheel",t.MEDIATAILOR="mediatailor",t.THEOADS="theoads",t.UPLYNK="uplynk",t}({}),Qh=class{get Uz(){return this.Vz}Wz(t){const i=this.Vz.filter(i=>i.qz(t));if(i.length>1)0;else if(0===i.length)throw m("Unknown ad integration: "+t.integration);return i[0]||null}zz(t){this.Vz.push(t)}constructor(){this.Vz=[]}};Qh.Ng=new Qh,r(),r(),r(),r();var Un=function(t){return t.TM="PLAYING",t.Gz="PAUSED",t.Xz="SEEK",t.jz="STALLED",t.Qz="FAILED",t.Kz="INITIAL_BUFFERING",t.Yz="NO_ACCESS",t}({}),Ka=function(t){return t.Jz="HTTP_REQUEST_STATUS_CODE_1XX",t.Zz="HTTP_REQUEST_STATUS_CODE_2XX",t.$z="HTTP_REQUEST_STATUS_CODE_3XX",t.tG="HTTP_REQUEST_STATUS_CODE_4XX",t.iG="HTTP_REQUEST_STATUS_CODE_5XX",t.eG="BUFFER_LENGTH",t.sG="BYTES_RECEIVED",t.nG="SEGMENT_READ_BITRATE",t.rG="SEGMENT_PROFILE_BITRATE",t.hG="VIDEO_PROFILE_BITRATE",t.oG="NUMBER_OF_FRAMES_DROPPED",t.aG="PLAYBACK_POSITION",t.uG="NUMBER_OF_FRAMES_DECODED",t.cG="PLAYBACK_DELTA_TO_ORIGIN",t.dG="STREAM_DELTA_TO_ORIGIN",t.lG="ORIGIN_TIMESTAMP",t}({}),yi=function(t){return t.fG="MANIFEST_URI",t.vG="ASSET_DURATION",t._G="NUMBER_OF_CONTENT_PROFILES",t.gG="CDN",t.pG="CONTENT_TITLE",t.mG="SERVICE_NAME",t.wG="CONTENT_TYPE",t.yG="CONTENT_DESCRIPTION",t}({}),ER=function(t){return t.AG="shutdown_normal_shutdown",t}({}),PR=function(t){return t.bG="session/",t.SG="content/",t.TG="internalError/",t.kG="drmError/",t.EG="caError/",t.xG="networkError/",t}({}),xR=class{get code(){return this.category+this.statusCode}constructor(t,i){this.category=void 0,this.statusCode=void 0,this.category=t,this.statusCode=i}},IR=class extends Ne{};r(),r(),r();var RR=function(t){return t.PAUSE="IG",t.RESUME="CG",t}({}),CR=class extends wp{constructor(){super("DG")}},DR=class extends Ne{BG(){this.NG=!0}MG(){}kn(){this.NG=!1,this.OG.mn(RR.PAUSE,this.FG),this.OG.mn(RR.RESUME,this.UG)}VG(){return isFinite(this.oa.Nd())}constructor(t,i){super(),this.oa=void 0,this.OG=void 0,this.NG=void 0,this.FG=void 0,this.UG=void 0,this.oa=t,this.OG=i,this.NG=!1,this.FG=()=>{this.MG(),this.NG=!1},this.UG=()=>{this.NG=!0},this.OG.wn(RR.PAUSE,this.FG),this.OG.wn(RR.RESUME,this.UG)}},BR=class extends DR{BG(){super.BG(),this.HG()}kn(){this.WG(),super.kn()}HG(){this.oa.wn(Do.SM,this.qG),this.oa.wn(d.jw,this.zG),this.oa.wn(Do.TM,this.GG),this.oa.wn(d.$w,this.XG),this.oa.wn(d.Zw,this.jG)}WG(){this.oa.mn(Do.SM,this.qG),this.oa.mn(d.jw,this.zG),this.oa.mn(Do.TM,this.GG),this.oa.mn(d.$w,this.XG),this.oa.mn(d.Zw,this.jG)}QG(){this.KG=!0}YG(){const t=this.oa.HP(),i=new xR(PR.TG,String(t.code));this.JG(Un.Qz,i,t.message)}ZG(t){this.NG&&(this.OG.$G(t),this.So(new CR))}JG(t,i,e){this.OG.tX(t,i,e),this.So(new CR)}iX(t,i){this.OG.eX(t,i)}constructor(...t){super(...t),this.KG=!1,this.sX=!1,this.nX=!1,this.qG=()=>{this.sX&&!this.nX&&this.ZG(Un.jz)},this.GG=()=>{this.oa.hx||(this.sX||this.iX(new xR(PR.SG,"firstFrameDisplayed"),"now"),this.sX=!0,this.ZG(Un.TM))},this.zG=()=>{this.oa.hx&&(this.sX=!0,this.ZG(Un.Gz))},this.XG=()=>{this.KG&&(this.nX=!0,this.KG=!1,this.ZG(Un.Xz))},this.jG=()=>{this.nX=!1,this.oa.hx&&this.ZG(Un.Gz)}}};r();var NR=class extends DR{BG(){super.BG(),this.rX(),this.HG()}kn(){this.WG(),super.kn()}HG(){this.oa.rt.wn(Te.pa,this.rX),this.oa.oX.hX(this.aX),this.oa.wn(d.Rw,this.uX)}WG(){this.oa.rt.mn(Te.pa,this.rX),this.oa.oX.cX(this.aX),this.oa.mn(d.Rw,this.uX)}dX(t){t.serviceName&&this.lX(yi.mG,t.serviceName),t.cdn&&this.lX(yi.gG,t.cdn),t.contentTitle&&this.lX(yi.pG,t.contentTitle),t.contentType&&this.lX(yi.wG,t.contentType),t.contentDescription&&this.lX(yi.yG,t.contentDescription)}lX(t,i){this.NG&&this.OG.fX(t,i)}constructor(...t){super(...t),this.uX=()=>{this.VG()&&this.lX(yi.vG,_.round(this.oa.Nd()))},this.aX=t=>{"manifest"===t.request.type&&this.lX(yi.fG,t.url)},this.rX=()=>{const t=Jr(this.oa.rt.II,t=>t.Rt);t&&this.lX(yi._G,t.KI.V)}}};r();var MR=class extends DR{BG(){super.BG(),this.vX=this.oa.JP.iO,this._X=this.oa.JP.sO,this.HG(),this.gX.push(v(this.pX,1e3))}MG(){super.MG(),this.mX()}kn(){this.mX(),this.WG(),this.gX.forEach(p),Yo(this.gX),super.kn()}HG(){this.oa.oX.hX(this.wX),this.oa.wn(d.ly,this.yX)}WG(){this.oa.oX.cX(this.wX),this.oa.mn(d.ly,this.yX)}AX(){this.mX()}bX(t){this.SX+=t,this.TX(Ka.sG,this.SX)}kX(t,i){const e=this.EX.get(i)||0;this.TX(t,e)}PX(){const t=this.oa.JP.iO-this.vX;this.TX(Ka.oG,t)}xX(){const t=this.oa.JP.sO-this._X;this.TX(Ka.uG,t)}IX(){const t=HI.Ng.fW();this.TX(Ka.nG,cm(t))}RX(t){this.TX(Ka.rG,cm(t)),this.TX(Ka.hG,cm(t))}mX(){if(!this.VG())return;const t=_.round(on(this.oa.LP()));this.TX(Ka.aG,t)}CX(){const t=ve.jn(this.oa.RP()),i=this.oa.LP(),e=t.JM(i),s=e?on(e.An(0)-i):0;this.TX(Ka.eG,s)}TX(t,i){this.NG&&this.OG.DX(t,i)}constructor(...t){super(...t),this.EX=qh(),this.SX=0,this.vX=0,this._X=0,this.gX=[],this.pX=()=>{this.PX(),this.xX(),this.CX()},this.yX=t=>{t.qk===Ci.Bk&&(this.bX(t.rO),this.IX(),this.RX(t.BX),this.mX())},this.wX=t=>{const i=t.status.toString()[0],e=this.EX.get(i)||0;this.EX.set(i,e+1),this.kX(Ka.Jz,"1"),this.kX(Ka.Zz,"2"),this.kX(Ka.$z,"3"),this.kX(Ka.tG,"4"),this.kX(Ka.iG,"5")}}};r();function LR(t){return t&&t.integration===WR}function OR(t){if(!Z(t.asset))throw new g("Agama source configuration: expected 'asset' to be a string");if(!function(t){return!!Z(t)&&("live"===t||"vod"===t)}(t.streamType))throw new g("Agama source configuration: expected 'streamType' to be 'live' or 'vod'");if(void 0!==t.serviceName&&!function(t){return!!Z(t)&&("live"===t||"svod"===t||"nvod"===t||"tvod"===t||"avod"===t||"catchuptv"===t)}(t.serviceName))throw new g("Agama source configuration: expected 'serviceName' to be 'live', 'svod', 'nvod','tvod', 'avod' or 'catchuptv'");if(void 0!==t.cdn&&!Z(t.cdn))throw new g("Agama source configuration: expected 'cdn' to be a string");if(void 0!==t.contentTitle&&!Z(t.contentTitle))throw new g("Agama source configuration: expected 'contentTitle' to be a string");if(void 0!==t.contentType&&!Z(t.contentType))throw new g("Agama source configuration: expected 'contentType' to be a string");if(void 0!==t.contentDescription&&!Z(t.contentDescription))throw new g("Agama source configuration: expected 'contentDescription' to be a string");return t}function FR(t){if(!Z(t.config))throw new g("Agama player configuration: expected 'config' to be a string");if(void 0!==t.logLevel&&!function(t){return!!Z(t)&&("info"===t||"debug"===t||"warning"===t||"error"===t||"fatal"===t)}(t.logLevel))throw new g("Agama player configuration: expected 'logLevel' to be 'info', 'debug', 'warning','error' or 'fatal'");if(void 0!==t.application&&!Z(t.application))throw new g("Agama player configuration: expected 'application' to be a string");if(void 0!==t.applicationVersion&&!Z(t.applicationVersion))throw new g("Agama player configuration: expected 'applicationVersion' to be a string");if(void 0!==t.userAccountID&&!Z(t.userAccountID))throw new g("Agama player configuration: expected 'userAccountID' to be a string");if(void 0!==t.deviceID&&!Z(t.deviceID))throw new g("Agama player configuration: expected 'deviceID' to be a string");return t}function UR(){let t="00000000-0000-0000-0000-000000000000";const i=s.navigator,e=s.screen;let n=""+i.mimeTypes.length;n+=i.userAgent.replace(/\D+/g,""),n+=i.plugins.length,n+=e.height||"",n+=e.width||"",n+=e.pixelDepth||"",n+=_.floor(1e3*_.random());const r=function(t){let i,e,s=0;if(0===t.length)return"0";for(i=0;i{this.ZX(),this.zX()},this.ZX=()=>{const t=this.oa.nu(),i=t&&t.analytics;this.JX=function(t){void 0===t&&(t=[]);for(const i of t)if(LR(i))return OR(i)}(i)},this.zX=()=>{this.NX(),this.oa.mn(d.uo,this.qX),!this.WX()&&this.OG.$X()&&this.oa.bt&&this.JX&&(this.GX(),this.oa.hx||this.oa.UP?this.oa.wn(d.uo,this.qX):this.qX())},this.qX=()=>{this.oa.bt&&this.JX&&(this.OG.tj(this.oa.bt,this.JX),this.BG(),this.dX(this.JX),this.UX(),this.oa.wn(Mc.ma,this.MX),this.oa.mn(d.uo,this.qX))},this.HX=()=>{this.WX()&&this.NX()},this.MX=()=>{this.YX(),this.NX()},this.KX=()=>{this.jX&&this.jX.AX()};const s=function(t){void 0===t&&(t=[]);for(const i of t)if(LR(i))return FR(i)}(e.analytics);s&&this.OG.ij()&&(this.OG.qx(s),this.OG.$X()?(this.OG.ej(),this.oa.wn(d.do,this.fo),this.oa.wn(d.Bw,this.zX)):console.warn("An error occurred while initializing an Agama EMP client. Please check your configuration"))}},WR="agama";r(),r();var Vu=function(t){return t.NONE="",t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t}({});r();var qR=function(t){return t.NONE="",t.PM360="360",t.PM180="180",t}({});function zR(t){switch(t){case"":return Vu.NONE;case"horizontal":return Vu.HORIZONTAL;case"vertical":return Vu.VERTICAL;default:throw new g}}function GR(t,i){if(i)return qR.PM360;if(null==t)return qR.NONE;switch(t){case"":return qR.NONE;case"360":return qR.PM360;case"180":return qR.PM180;default:throw new g("Provided panoramaMode value is not recognized. Expected '', '360' or '180' but value was "+t)}}r();var XR=function(t){return t.ASSET="asset",t.CHANNEL="channel",t.EVENT="event",t}({});r();var jR="https://content.uplynk.com";function qo(t){if(!t)return!0;const i=!function(t){return hk(t)||Pc(t)&&hk(t[0])}(t.sources)||ok(t.sources),e=!t.ads||QR(t.ads),s=""!==t.poster&&!t.poster;return i&&e&&s}function QR(t){return!t||ul(t)&&0===t.length}function KR(t){if(t&&t.sources)return YR(t.sources)}function YR(t){return Z(t)?_u(t):pr(t)?t.type||t.src&&_u(t.src):Pc(t)&&t.length>0?YR(t[0]):void 0}function JR(t){if(t&&t.sources)return ZR(t.sources)}function ZR(t){return Z(t)?t:pr(t)?t.src:Pc(t)&&t.length>0?ZR(t[0]):void 0}function $R(t,i,e){return Qi(t)?function(t,i,e){let s=Mo({},ak(),{ping:{adImpressions:!1,freeWheelVideoViews:!1,linearAdData:!1},integration:GT.UPLYNK,id:"",prefix:jR,preplayParameters:{},playbackUrlParameters:{},assetType:XR.ASSET,contentProtected:!1,assetInfo:!0});s.id=function(t){if(Z(t))return t;if(Pc(t)&&Z(t[0]))return t;if(function(t){return Lu(t)&&Z(t.userId)&&(Pc(t.externalId)||Z(t.externalId))}(t))return t;return""}(t.id),t.preplayParameters&&(s.preplayParameters=t.preplayParameters);t.playbackUrlParameters&&(s.playbackUrlParameters=t.playbackUrlParameters);t.assetType&&(s.assetType=function(t){switch(t){case"channel":return XR.CHANNEL;case"event":return XR.EVENT;default:return XR.ASSET}}(t.assetType));t.contentProtected&&(s.contentProtected=Zn(t.contentProtected));t.assetInfo?s.assetInfo=Zn(t.assetInfo):s.assetInfo="asset"===s.assetType;t.prefix&&(s.prefix=Hi(t.prefix)||jR);return s.ping=function(t,i){let e=!1,s=!1,n=!1;i?(e=!!Xd(i.adImpressions)&&i.adImpressions,s=!!Xd(i.freeWheelVideoViews)&&i.freeWheelVideoViews,n=Xd(i.linearAdData)?i.linearAdData:t!==XR.ASSET):t!==XR.ASSET&&(n=!0);return{adImpressions:e,freeWheelVideoViews:s,linearAdData:n}}(s.assetType,t.ping),s=eC(s,t),s=nC(s,i,e),s=sC(s,t,e),s}(t,i,e):ek(t)?function(t,i,e){var s;return Mo({},tC(t,i,e),{integration:GT.MEDIATAILOR,adsParams:null!=(s=t.adsParams)?s:{}})}(t,i,e):ik(t)?function(t,i,e){return Mo({},tC(t,i,e),{type:"theolive"})}(t,i,e):bl(t)?function(t,i,e){return Mo({},tC(t,i,e),{type:Ba.gR,src:t.src,streamAccountId:t.streamAccountId,subscriberToken:t.subscriberToken,connectOptions:oC(t.connectOptions),apiUrl:t.apiUrl,statsIntervalMs:iC(t.statsIntervalMs)})}(t,i,e):tC(t,i,e)}function tC(t,i,e){let s=uk();const n=i&&(i.contentProtection||i.drm);if(Z(t)){if(s.src=t,s.type=_u(t),n){const t=fR(n);s.contentProtection=ET(t)}}else if(pr(t)||tk(t)||bl(t)){s.src=t.src,s.type=t.type||_u(t.src),s.isAdvertisement=t.isAdvertisement;const i=rk(t)?t.hesp:void 0;void 0!==i&&(s.hesp=i);ek(t)&&(s.integration=t.integration);const e=fR(t.contentProtection||t.drm||n);s.contentProtection=ET(e),t.ssai&&(s.ssai=BS(t.ssai)),s=eC(s,t)}return s=nC(s,i,e),s=sC(s,t,e),s}function iC(t){if(ho(t)&&t>0)return t}function eC(t,i){var e,s;i.useCredentials?t.crossOrigin=Xh.uR:i.crossOrigin&&(t.crossOrigin=JT(i.crossOrigin)),Z(i.timeServer)&&(t.timeServer=i.timeServer),i.liveOffset&&(t.liveOffset=i.liveOffset),i.hlsDateRange&&(t.hlsDateRange=i.hlsDateRange),i.lowLatency&&(t.lowLatency=Zn(i.lowLatency)),i.useNativePlayback&&(t.useNativePlayback=Zn(i.useNativePlayback)),i.useManagedMediaSource&&(t.useManagedMediaSource=Zn(i.useManagedMediaSource)),i.dash&&(t.dash=PT(i.dash)),i.hls&&(t.hls=xT(i.hls)),i.lcevc&&(t.lcevc=Zn(i.lcevc)),i.ignoreEmbeddedTextTrackTypes&&(t.ignoreEmbeddedTextTrackTypes=fk(i.ignoreEmbeddedTextTrackTypes)),i.latencyConfiguration&&(t.latencyConfiguration=zT(i.latencyConfiguration)),t.seamlessSwitchStrategy=XT(null!=(s=i.seamlessSwitchStrategy)?s:null==(e=i.dash)?void 0:e.useSeamlessPeriodSwitch);const n=lS(i.experimentalRendering);void 0!==n&&(t.experimentalRendering=n);const r=lS(i.nativeUiRendering);return void 0!==r&&(t.nativeUiRendering=r),t}function sC(t,i,e){return t.abr=DT(Z(i)?void 0:CT(i.abr),null==e?void 0:e.abr),t}function nC(t,i,e){var s;const n=i&&i.timeServer;return e&&e.liveOffset&&!it(t.liveOffset)&&(t.liveOffset=e.liveOffset),e&&e.hlsDateRange&&!it(t.hlsDateRange)&&(t.hlsDateRange=e.hlsDateRange),t.crossOrigin===Xh.Lk&&(null==i||null==(s=i.vr)?void 0:s[360])&&(t.crossOrigin=Xh.aR),t.useCredentials=t.crossOrigin===Xh.uR,Z(n)&&!t.timeServer&&(t.timeServer=n),t}function rC(t){const i={src:""};if(t&&t.src){if(i.src=Hi(t.src),"default"in t&&(i.default=Zn(t.default)),i.kind=function(t){const i=String(t||"").toLowerCase();return VP(i)?i:i?"metadata":"subtitles"}(t.kind),YT(t.format)&&(i.format=t.format),"srclang"in t){const e=t.srclang;"string"==typeof e&&""!==e&&(i.srclang=e)}if("label"in t){const e=t.label;"string"==typeof e&&""!==e&&(i.label=e)}}return i}function hC(t,i){if(Lu(t))try{return i.Wz(t).sj(t)}catch(t){return}}function oC(t){if(null==t)return t;if(!Lu(t))throw new m("connectOptions must be an object");return t}function Cn(t,i,e){if(void 0===e&&(e=Qh.Ng),qo(t))return{sources:[uk()]};const s=Ua(t);if(s.sources=function(t,i,e){if(hk(t))return[$R(t,i,e)];if(Pc(t)&&hk(t[0])){const s=[];for(const n of t)s.push($R(n,i,e));return s}return[uk()]}(s.sources,s,i),"contentProtection"in s&&delete s.contentProtection,"drm"in s&&delete s.drm,"ads"in s){const t=function(t,i){if(!Pc(t))return[];const e=[];for(let s of t)s=hC(s,i),s&&e.push(s);return e}(s.ads,e);0===t.length?delete s.ads:s.ads=t}const n=!ok(s.sources),r=s.ads&&s.ads.length>0;if(n&&!r?delete s.ads:r&&!n&&(s.sources=[]),"textTracks"in s){const t=function(t){if(!Pc(t))return[];const i=[];for(let e of t)e=rC(e),""!==e.src&&i.push(e);return i}(s.textTracks);0===t.length?delete s.textTracks:s.textTracks=t}"poster"in s&&(s.poster=Hi(s.poster)),"streamType"in s&&(s.streamType=function(t){switch(t){case"live":case"dvr":case"vod":return t}}(s.streamType)),"vr"in s&&(s.vr=function(t){const i=t||{};return i.stereoMode=function(t){return function(t){switch(t){case"":case"horizontal":case"vertical":return!0;default:return!1}}(t)?t:""}(i.stereoMode),{panoramaMode:GR(i.panoramaMode,Boolean(i[360])),stereoMode:i.stereoMode?zR(i.stereoMode):Vu.NONE,nativeVR:Boolean(i.nativeVR)}}(s.vr));if("analytics"in s||(null==i?void 0:i.analytics)){const t=dk(s.analytics),e=i&&i.analytics||[];s.analytics=function(t,i){const e=Ua(t);for(const s of i){const i=!t.some(t=>t.integration===s.integration);i&&s.integration!==WR&&e.push(s)}return e}(t,e)}return"mutedAutoplay"in s&&(s.mutedAutoplay=pk(s.mutedAutoplay)),"timeServer"in s&&delete s.timeServer,"playAdsAfterTime"in s&&(s.playAdsAfterTime=co(s.playAdsAfterTime)),s.blockContentIfAdError=function(t){return void 0!==t&&"boolean"==typeof t&&Boolean(t)}(s.blockContentIfAdError),s}r(),r(),r();var $r=function(){function t(t){this.nj=t}return t.prototype.rj=function(t){var i,e,s,n,r,h,o,a=[];if(!t)return"";var u=t.length%4;if(u>0)for(;u++<4;)t+=this.nj.charAt(64);for(i=0;i>>16&255,s=o>>>8&255,n=255&o,a[i/4]=String.fromCharCode(e,s,n),64===h&&(a[i/4]=String.fromCharCode(e,s)),64===r&&(a[i/4]=String.fromCharCode(e));return a.join("")},t.prototype.hj=function(t,i){var e,s,n,r,h,o,a,u=[],c="";if((o=t.length%3)>0)for(;o++<3;)c+=this.nj.charAt(64),t+="\0";for(o=0;o>18&63,n=e>>12&63,r=e>>6&63,h=63&e,u[o/3]=this.nj.charAt(s)+this.nj.charAt(n)+this.nj.charAt(r)+this.nj.charAt(h);return a=(a=u.join("")).slice(0,a.length-c.length),i||(a+=c),a},t.bh=new t(function(){var t,i,e,s,n=[],r=["object","$","undefined","function","Cannot find module '","MODULE_NOT_FOUND","*","com.widevine.alpha","urn:mpeg:dash:mp4protection:2011","^","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","__proto__","@@iterator","getUTCHours","setUTCFullYear","25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?","SegmentBase","RateChangeEvent","Symbol(","Symbol.",'; codecs="'];for(t=0;tthis.Cj(t,e))){const t="invalidsource",i=MC.Dj(t);throw new Ga(PC(t),i)}}Rj(t,i){for(const e of t)pr(e)&&rk(e)&&!e.bypassLicense&&this.Bj([se.HESP],i)}Nj(i){return this.Mj(i.bj)&&this.Lj(i)?t.Oj(i.mj)?0:1:2}Bj(t,i){for(const e of t)if(!pi(i.wj,e)){const t="invalidfeature",i=MC.Fj(t,e);throw new Ga(PC(t),i)}}Mj(t){return 0===t.length||t.some(t=>this.Uj(t))}Uj(t){return"web"===function(t){switch(t){case dC.ANDROID:return ei.Tv;case dC.ANDROIDTV:case dC.FIRETV:return ei.Ev;case dC.IOS:return ei.Pv;case dC.TVOS:return ei.xv;case dC.CHROMECAST:case dC.CHROMECASTCAF:return ei.Iv;case dC.THEOLIVEWEB:return ei.Rv;default:return ei.Sv}}(t)}static Oj(t){const i=Number(new Date);return!!t&&i<=t}Lj(t){return!(this.Vj&&0!==t.gj.length&&!CC(t.gj))||!!(this.Vj&&this.Hj(t.gj)&&this.Wj(t.gj))}Hj(t){return DC(this.MA.Yu,t)}Wj(t){if(!this.MA.uj)return!0;if(this.qj)return!0;const i=this.zj();return!!i&&DC(i,t)}zj(){if(!this.MA.uj)return;const t=hd.ancestorOrigins;return t&&t.length>0?t[t.length-1]:this.MA.cj?this.MA.cj:void 0}Cj(i,e){return!!t.Gj(i,e.pj)}static Gj(t,i){return DC(this.Xj(t),i)}static Xj(t){return Z(t)?t:pr(t)&&t.src||""}constructor(t,i,e){this.qj=void 0,this.jj=void 0,this.MA=void 0,this.Vj=void 0,this.qj=t,this.jj=i,this.MA=e,this.Vj=NC(this.MA)}},EC=class{Nj(t){return 0}xj(t,i){}Bj(t,i){}};function PC(t){switch(t){case"invaliddomain":return Vo.LICENSE_INVALID_DOMAIN;case"invalidsource":return Vo.LICENSE_INVALID_SOURCE;case"expired":return Vo.LICENSE_EXPIRED;case"invalidfeature":return Vo.LICENSE_INVALID_FEATURE;case"error":return Vo.LICENSE_ERROR}}var xC="25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?",IC=mu(()=>{const t="\\.",i="(\\*|"+xC+")";return new RegExp("ip-range\\("+i+t+i+t+i+t+i+"\\)")});function RC(t,i){let e=t,s=i;if(!e)return!1;if(s=s.trim(),"*"===s)return!0;if(e=e.replace(/\.+$/,""),s===e)return!0;if(Vh(s,"ip-range(")){const t="\\.",i=s.match(IC()),n=t=>"*"===t?"("+xC+")":t;if(null!==i&&5===i.length){const s=new RegExp("^"+i[1]+t+n(i[2])+t+n(i[3])+t+n(i[4])+"$");return null!==e.match(s)}}return s="."+s,-1!==e.indexOf(s,e.length-s.length)}function CC(t){return t.some(t=>"*"===t)}function DC(t,i){const e=zd.Dh(t);if(!BC(e))return!0;for(const s of i){if(RC(e.hostname,s))return!0;if(RC(db(t),s))return!0}return!1}function BC(t){return-1!==AC.indexOf(t.protocol)}function NC(t){const i=zd.Dh(t.Yu);return BC(i)&&!function(t){return RC(t.hostname,"localhost")}(i)&&!function(t){return RC(t.hostname,"theoplayer.doubleclick.net")}(i)}var MC=class{static Fj(t,i){return"The requested feature '"+i+"' is not available with the license for this player."}static Dj(t){return"invaliddomain"===t?this.Qj:"invalidsource"===t?this.Kj:"expired"===t?this.Yj:"invalidfeature"===t?this.Jj:this.Zj}};MC.Zj="The license for this player is invalid.",MC.Yj="The usage license for this video player has expired.",MC.Qj="The current domain is incompatible with the license for this player.",MC.Kj="The provided video source is incompatible with the license for this player.",MC.Jj="The requested feature is not available with the license for this player.",r(),r();var Ir=function(t){return t[t.$j=1]="$j",t[t.tQ=4]="tQ",t[t.iQ=5]="iQ",t[t.eQ=9]="eQ",t}({});function LC(t){const i=[t.VN,t.sQ,t.nQ];switch(t.sQ){case 1:i.push(t.iR);break;case 4:i.push(t.MP),i.push(t.lt);break;case 5:i.push(t.lt);break;case 9:i.push(t.Km)}return i}r();var It=new Array(256);for(let t=0;t<256;t+=1)It[t]=(t<16?"0":"")+t.toString(16);function Ys(){const t=ku(),i=(4294967296*_.random()|0)+t&3029421624,e=(4294967296*_.random()|0)+t&3595553209,s=(4294967296*_.random()|0)+t&1130486254,n=(4294967296*_.random()|0)+t&1284287105;return It[255&i]+It[i>>>8&255]+It[i>>>16&255]+It[i>>>24&255]+"-"+It[255&e]+It[e>>>8&255]+"-"+It[e>>>16&15|64]+It[e>>>24&255]+"-"+It[63&s|128]+It[s>>>8&255]+"-"+It[s>>>16&255]+It[s>>>24&255]+It[255&n]+It[n>>>8&255]+It[n>>>16&255]+It[n>>>24&255]}function OC(t){return um(t.replace(/-/g,""))}function FC(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const i=16*_.random()|0;return("x"===t?i:3&i|8).toString(16)})}function UC(){return zd.Mg()}r(),r(),r();var VC,HC="theoplayer-session-id";function WC(){if(!VC){const t=DA.Wy(HC);t?VC=t:(VC=Ys(),DA.qy(HC,VC))}return VC}r(),r();var qC=/[^\x00-\x7E]/g;function zC(t){return"\\u"+Na(t.charCodeAt(0).toString(16),4,"0")}var GC="https://license.theoplayer.com";function XC(t){const i=function(t){const i=[];return function(t,i,e){return JSON.stringify(t,i,e).replace(qC,zC)}(t,(t,e)=>{if(Lu(e)){if(-1!==i.indexOf(e))return null;i.push(e)}return e})}(function(t){return[t.rQ,t.dS,t._j,t.bD,t.hQ,t.oQ,t.aQ.map(LC)]}(t));return $r.aj.hj(i)}var jC=class{get aQ(){return this.Zf}uQ(){return Boolean(this.hQ)}get hQ(){return this.cQ}async dQ(t){if(!(await this.fQ.lQ()).Sj)return;const i={sQ:Ir.$j,nQ:ku(),iR:t};await this.iX(i)}async vQ(t){if(!(await this.fQ.lQ()).Sj)return;const i={sQ:Ir.eQ,nQ:ku(),Km:t};await this.iX(i)}async _Q(t,i){const e={sQ:Ir.tQ,nQ:ku(),MP:i,lt:t};await this.iX(e)}async gQ(t){const i={sQ:Ir.iQ,nQ:ku(),lt:t};await this.iX(i)}async iX(t){const i=await this.fQ.lQ();"a:n[_O*[C4C-N$_@_MYY $D]iOp]N$_-_]th_:c|aen?C:pH"===this.pQ.hj(i._j)&&t.sQ!==Ir.iQ||(t.sQ===Ir.$j?this.mQ():this.uQ()||this.mQ(),t.VN=this.yb++,this.Zf.push(t),!function(t){return t===Ir.$j||t===Ir.iQ}(t.sQ)?this.Zf.length>this.wQ&&await this.yQ():await this.AQ())}async AQ(t){for(void 0===t&&(t=!1);this.Zf.length>0;)await this.yQ(t)}async bQ(t){const i=await this.fQ.lQ();return{rQ:ku(),dS:WC(),_j:this.pQ.hj(i._j)||"dev",bD:this.zb,hQ:this.cQ,oQ:this.SQ,aQ:t}}async yQ(t){void 0===t&&(t=!1);const i=this.Zf.splice(0,this.TQ),e=await this.bQ(i);t?this.Kk(e):this.kQ(e),this.EQ=UC()}async kQ(t){const i=XC(t),e=new $n({Yu:GC,zT:i,zk:!1,dk:M.NT,fk:{"Content-Type":Hu.IH},Vk:4e3,Uk:X.POST});try{const t=await this.nV.lk(e);await t.HT()}catch(t){(new Image).src="https://licensing.theoplayer.com/t?"+i}}Kk(t){const i=XC(t);this.nV.Kk({Yu:GC,zT:i,qT:Hu.IH})}mQ(){this.uQ()&&this.AQ(),this.cQ=Ys(),this.yb=0}kn(){s.removeEventListener("beforeunload",this.xQ),p(this.IQ),this.AQ()}constructor(t,i,e,n=$r.bh,r=0,h=1){this.zb=void 0,this.nV=void 0,this.fQ=void 0,this.pQ=void 0,this.wQ=void 0,this.TQ=void 0,this.Zf=void 0,this.cQ=void 0,this.EQ=void 0,this.SQ=void 0,this.yb=void 0,this.IQ=void 0,this.RQ=void 0,this.xQ=void 0,this.zb=t,this.nV=i,this.fQ=e,this.pQ=n,this.wQ=r,this.TQ=h,this.Zf=[],this.cQ=null,this.EQ=0,this.SQ="unknown",this.yb=0,this.RQ=()=>{UC()-this.EQ>6e4&&this.AQ()},this.xQ=()=>{this.AQ(!0)},s.addEventListener("beforeunload",this.xQ),this.IQ=v(this.RQ,6e4)}};r(),r(),r();var QC=0;var KC=c,Is=self.requestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame,Ii=self.cancelAnimationFrame||self.webkitCancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelRequestAnimationFrame;Is&&Ii||(Is=function(t){const i=UC(),e=_.max(0,16-(i-QC)),s=u(()=>t(i+e),e);return QC=i+e,s},Ii=KC),Is=Is.bind(self),Ii=Ii.bind(self);var YC=Qt.L_||Qt.ru&&Qt.Q_<13;function JC(t,i,e){const s=t.getImageData(i,e,1,1).data;return 0===s[0]&&0===s[1]&&0===s[2]&&0===s[3]}var ZC=class{get Ca(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{drawImage(i){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;nt.DQ(i,e,s,n,r,h),requestVideoFrameCallback:i=>t.BQ(i),cancelVideoFrameCallback:i=>t.NQ(i)}}(this)}CQ(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s{this.UQ.delete(i),t(e,s)});return()=>e.cancelVideoFrameCallback(s)}{let e;const s=n=>{this.WQ()?(this.UQ.delete(i),this.qQ=!1,t(n,void 0)):e=Is(s)};return e=Is(s),()=>Ii(e)}}WQ(){return(!this.t.hx||this.qQ)&&!this.t.kx&&this.t.Ax>=mh.HL}LQ(t){let i=this.zQ;void 0===i&&(i=h.createElement("canvas"),this.zQ=i);const e=i.getContext("2d"),s=this.t,n=s.Bx,r=s.Rx,o=i.width,a=i.height;e.clearRect(0,0,i.width,i.height),o===n&&a===r||(i.width=n,i.height=r),e.drawImage(t,0,0,n,r);let u=!1;return n>0&&JC(e,n-1,0)&&(i.width=o,u=!0),r>0&&JC(e,0,r-1)&&(i.height=a,u=!0),u&&e.drawImage(t,0,0,n,r),i}kn(){this.UQ.forEach(t=>t.HQ()),this.UQ.clear(),this.t.mn(d.Lw,this.GQ),this.t.mn(d.Zw,this.XQ),this.MQ=void 0,this.zQ=void 0}constructor(t){this.t=void 0,this.MQ=void 0,this.hu=void 0,this.zQ=void 0,this.UQ=ar(),this.OQ=1,this.qQ=!0,this.XQ=()=>{this.qQ=!0},this.GQ=()=>{this.MQ=this.t.Wx(),this.UQ.forEach((t,i)=>{t.HQ(),t.HQ=this.FQ(t.VQ,i)})},this.t=t,this.t.wn(d.Lw,this.GQ),this.t.wn(d.Zw,this.XQ),this.GQ()}};r(),r(),r();var Rh=function(t){return t.yn="dimensionchange",t}({}),$C=class extends wp{constructor(t,i){super(Rh.yn),this.width=void 0,this.height=void 0,this.width=t,this.height=i}};r(),r();var tD,iD=class{constructor(t,i){this.xe=void 0,this.VQ=void 0,this.xe=t,this.VQ=i}},eD=class extends iD{get Iu(){return this.jQ}get Eu(){return this.QQ}kn(){this.KQ.disconnect()}constructor(t,i){super(t,i),this.KQ=void 0,this.jQ=0,this.QQ=0,this.YQ=t=>{if(t.length>0){const i=t[t.length-1].contentRect;this.QQ=i.width,this.jQ=i.height,this.VQ(this.QQ,this.jQ)}},this.KQ=new s.ResizeObserver(this.YQ),this.KQ.observe(this.xe)}};r(),r();var sD=["Webkit","Moz","O","ms"],nD=(()=>{let t=!1;try{if(void 0!==s&&"function"==typeof s.addEventListener){const i=w.defineProperty({},"passive",{get(){t=!0}});s.addEventListener("testPassiveEventSupport",Ct,i),s.removeEventListener("testPassiveEventSupport",Ct,i)}}catch(t){}return t})(),rD=qh();function hD(t){return rD.has(t)||rD.set(t,function(t){const i=(tD||(tD=s&&s.document&&s.document.createElement("span")),tD);if(!i||!i.style)return t;if(void 0!==i.style[t])return t;const e=t.charAt(0).toUpperCase()+t.slice(1);for(const t of sD){const s=t+e;if(void 0!==i.style[s])return s}return t}(t)),rD.get(t)}function oD(t){const i=t.style;i.position="absolute",i.left="0",i.right="0",i.bottom="0",i.top="0",i.overflow="scroll",i.zIndex="-1",i.visibility="hidden"}function aD(t){const i=t.style;i.position="absolute",i.left="0",i.top="0",i[hD("transition")]="0s"}var uD=class extends iD{kn(){Ii(this.JQ),this.JQ=0,this.ZQ.removeEventListener("scroll",this.$Q),this.tK.removeEventListener("scroll",this.$Q),os(this.iK),s&&s.removeEventListener("resize",this.eK)}get Iu(){return this.xe.getBoundingClientRect().height||this.jQ||0}get Eu(){return this.xe.getBoundingClientRect().width||this.QQ||0}constructor(t,i,e){super(t,i),this.iK=void 0,this.JQ=0,this.QQ=NaN,this.jQ=NaN,this.ZQ=void 0,this.sK=void 0,this.tK=void 0,this.nK=void 0,this.rK=void 0,this.hr=()=>{const t=1e5;this.sK.style.width=t+"px",this.sK.style.height=t+"px",this.ZQ.scrollLeft=t,this.ZQ.scrollTop=t,this.tK.scrollLeft=t,this.tK.scrollTop=t,0===this.tK.scrollTop&&Is(this.hr)},this.hK=()=>{const t=this.Eu,i=this.Iu;this.VQ(t,i),this.QQ=t,this.jQ=i,this.hr(),this.JQ=0},this.$Q=()=>{if(this.JQ)return;const t=this.Eu,i=this.Iu;t===this.QQ&&i===this.jQ||(this.JQ=Is(this.hK))},this.eK=()=>{this.rK||(this.rK=u(this.oK,66))},this.oK=()=>{this.rK=void 0,this.aK()},this.aK=()=>{this.$Q()};const n=function(t,i){return s.getComputedStyle(t,void 0).getPropertyValue(i)||t.style[i]}(t,"position");e||"static"!==n||(t.style.position="relative");const r=h.createElement("div");this.iK=r,this.ZQ=h.createElement("div"),this.sK=h.createElement("div"),this.tK=h.createElement("div"),this.nK=h.createElement("div"),oD(this.ZQ),oD(this.tK),aD(this.sK),function(t){aD(t),t.style.width="200%",t.style.height="200%"}(this.nK),r.appendChild(this.ZQ),r.appendChild(this.tK),this.ZQ.appendChild(this.sK),this.tK.appendChild(this.nK),t.appendChild(r),this.ZQ.addEventListener("scroll",this.$Q),this.tK.addEventListener("scroll",this.$Q),s&&s.addEventListener("resize",this.eK),this.$Q()}},Oe=class extends Ne{_n(t){this.KQ||("function"==typeof s.ResizeObserver?this.KQ=new eD(this.xe,this.YQ):this.KQ=new uD(this.xe,this.YQ,t))}kn(){this.Vo(),this.KQ&&(this.KQ.kn(),this.KQ=void 0)}get Iu(){return this.KQ?this.KQ.Iu:0}get Eu(){return this.KQ?this.KQ.Eu:0}constructor(t){super(),this.xe=void 0,this.KQ=void 0,this.YQ=(t,i)=>{this.So(new $C(t,i))},this.xe=t}};r(),r();var cD=class extends wp{constructor(){super(Gi.pa)}};r();var Tt=function(){if(!h)return;const t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];for(const i of t)if(i[1]in h)return{uK:i[0],sa:i[1],cK:i[2],dK:i[3],Ze:i[4],lK:i[5]}}();r();var dD=class extends wp{constructor(){super(Gi.ka)}},lD=class t extends Ne{static la(t){return Boolean(Tt&&h[Tt.dK]&&Tt.uK in t)}yo(){const t=this.xe[Tt.uK]();t&&t.then?t.then(this.fK,this.vK):(h.removeEventListener(Tt.lK,this.vK),h.addEventListener(Tt.lK,this.vK))}jo(){const t=h[Tt.sa]();t&&t.then?t.then(this.fK,this.vK):(h.removeEventListener(Tt.lK,this.vK),h.addEventListener(Tt.lK,this.vK))}_K(){const t=this.ds,i=this.xe===h[Tt.cK];this.ds=i,t!==i&&this.So(new cD)}gK(){this.So(new hR)}kn(){this.Vo(),h.removeEventListener(Tt.Ze,this.fK),h.removeEventListener(Tt.lK,this.vK)}constructor(i){super(),this.xe=void 0,this.ca=void 0,this.ds=!1,this.fK=()=>this._K(),this.vK=()=>this.gK(),this.xe=i,this.ca=t.la(i),h.addEventListener(Tt.Ze,this.fK),this._K()}},fD=class t extends Ne{static la(t){return Qt.ru&&("webkitEnterFullscreen"in t||"webkitSupportsPresentationMode"in t)}yo(){this.xe.webkitSupportsPresentationMode&&this.xe.webkitSupportsPresentationMode("fullscreen")?Qt.ru?requestAnimationFrame(()=>this.xe.webkitSetPresentationMode("fullscreen")):this.xe.webkitSetPresentationMode("fullscreen"):this.xe.webkitEnterFullscreen()}jo(){this.xe.webkitSupportsPresentationMode&&this.xe.webkitSupportsPresentationMode("inline")?this.xe.webkitSetPresentationMode("inline"):this.xe.webkitExitFullscreen()}_K(){const t=this.ds;let i;i=this.xe.webkitPresentationMode?"fullscreen"===this.xe.webkitPresentationMode:Boolean(this.xe.webkitDisplayingFullscreen),this.ds=i,t!==i&&this.So(new cD)}kn(){this.Vo(),this.xe.removeEventListener("webkitbeginfullscreen",this.fK),this.xe.removeEventListener("webkitendfullscreen",this.fK),this.xe.removeEventListener("webkitpresentationmodechanged",this.fK)}constructor(i){super(),this.xe=void 0,this.ca=void 0,this.ds=!1,this.fK=()=>this._K(),this.xe=i,this.ca=t.la(i),this.xe.addEventListener("webkitbeginfullscreen",this.fK),this.xe.addEventListener("webkitendfullscreen",this.fK),this.xe.addEventListener("webkitpresentationmodechanged",this.fK),this._K()}},vD=class extends Ne{get ca(){return!!this.pK&&this.pK.ca}get ds(){return this.mK}yo(){this.pK?this.pK.yo():this.So(new hR)}jo(){for(const t of this.wK)t.ds&&t.jo()}yK(t){this.pK=t}AK(t){this.wK.push(t),t.wn(Gi.pa,this._K),t.wn(Gi.ma,this.Rs),this._K()}bK(t){oi(this.wK,t),t.mn(Gi.pa,this._K),t.mn(Gi.ma,this.Rs)}SK(){for(const t of this.wK)if(t.ds)return!0;return!1}hr(){this.pK=void 0,this.mK=!1;const t=this.wK.slice();for(const i of t)this.bK(i),i.kn();this._K()}kn(){this.Vo(),this.hr()}constructor(...t){super(...t),this.wK=[],this.pK=void 0,this.mK=!1,this._K=()=>{const t=this.mK,i=this.SK();t!==i&&(this.mK=i,this.So(new cD))}}},_D=class extends Ne{get ca(){return!!this.TK&&this.kK.ca}get ds(){return this.kK.ds}yo(){this.TK&&this.kK.yo()}jo(){this.kK.jo()}EK(){this.kK.wn([Gi.pa,Gi.ka],this._K),this.kK.wn(Gi.ma,this.Rs)}PK(){this.kK.mn([Gi.pa,Gi.ka],this._K),this.kK.mn(Gi.ma,this.Rs)}er(){const t=this.kK,i=this.t.Hx();if(t===i)return;this.ga=!0;const e=this.ds,s=this.ca;e&&this.jo(),this.PK(),this.kK=i,this.EK(),e&&!this.ds&&this.ca?this.yo():this.jo(),this.ga=!1,s!==this.ca&&this.So(new dD),e!==this.ds&&this.So(new cD)}kn(){this.Vo(),this.PK(),this.t.mn(d.Nw,this.xK)}constructor(t,i){super(),this.t=void 0,this.TK=void 0,this.kK=void 0,this.ga=!1,this.xK=()=>this.er(),this._K=t=>{this.ga||this.So(t)},this.t=t,this.TK=i,this.kK=new ls,this.EK(),this.t.wn(d.Nw,this.xK),this.er()}};r(),r(),r();var Ku=function(t){return t.MODE_CHANGE="presentationmodechange",t.ERROR="error",t}({}),gD=class extends wp{constructor(t){super(Ku.MODE_CHANGE),this.presentationMode=void 0,this.presentationMode=t}};r(),r();var pD=class extends Ne{au(t){for(const i of this.Zf)t.wn(i,this.IK);this.RK.push(t)}CK(t){for(const i of this.Zf)t.mn(i,this.IK);this.RK.push(t)}kn(){this.Vo();for(const t of this.RK)this.CK(t);Yo(this.RK)}constructor(t,i=!1,e){super(e),this.RK=[],this.Zf=void 0,this.IK=void 0,this.DK=t=>{ct(()=>{this.Rs(t)})},this.Zf=t,this.IK=i?this.DK:this.Rs}},Sc=class extends _o{au(t){t.lw(this.BK),this.RK.push(t)}CK(t){t.mw(this.BK),oi(this.RK,t)}kn(){this.Vo();for(const t of this.RK)t.mw(this.BK);Yo(this.RK)}constructor(t,i=!1){super(t),this.RK=[],this.BK=void 0,this.DK=t=>{ct(()=>{this.Rs(t)})},this.BK=i?this.DK:this.Rs}};r();var mD=class extends Oi{get error(){return this.errorObject.message}xa(){return this}constructor(t){super(Ku.ERROR),this.errorObject=void 0,this.errorObject=t}};r();var wD=class extends Ga{constructor(t,i,e){super(t,i,e)}},yD=class extends _o{get Ca(){return this.hu||(this.hu=this.xa()),this.hu}xa(){return function(t){let i;const e={get currentMode(){return t.Wo()},requestMode(i){const e=Ak(i);e&&t.Jo(e)},supportsMode(i){const e=Ak(i);return!!e&&t.Xo(e)},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new Sc(e,!0),i.au(t),e}(this)}Jo(t){this.Yo!==t&&(this.Yo=t,this.ra=!0,this.Ko(t))}Wo(){return this.Yo}Xo(t){switch(t){case tc.NATIVE_PICTURE_IN_PICTURE:return this.ea.jL;case tc.FULLSCREEN:return this.ha.ca;case tc.INLINE:return!0}return!1}Ko(t){switch(this.ta.Zg(),t){case tc.FULLSCREEN:Wr(this.ta.Zo(t=>this.NK(t)));break;case tc.NATIVE_PICTURE_IN_PICTURE:Wr(this.ta.Zo(t=>this.MK(t)));break;case tc.INLINE:Wr(this.ta.Zo(t=>this.LK(t)))}}async NK(t){ii(t),await this.ea.jo().catch(Ct),ii(t);try{await this.FK(),this.So(new gD(this.Yo))}catch(i){const e=new wD(Vo.FULLSCREEN_ERROR,"Failed to enter fullscreen.");throw this.So(new mD(e)),ii(t),this.Jo(tc.INLINE),e}finally{this.ra=!1}}async MK(t){ii(t),await this.sa().catch(Ct),ii(t);try{await this.ea.yo(),this.So(new gD(this.Yo))}catch(i){const e=new wD(Vo.PICTURE_IN_PICTURE_ERROR,"Failed to enter native picture-in-picture.");throw this.So(new mD(e)),ii(t),this.Jo(tc.INLINE),e}finally{this.ra=!1}}async LK(t){ii(t),await this.sa().catch(Ct),ii(t),await this.ea.jo().catch(Ct),this.So(new gD(this.Yo)),this.ra=!1}async FK(){if(this.ha.ds)return;const t=this.ha.ww([Gi.pa,Gi.ma]);if(this.ha.yo(),await t,!this.ha.ds)throw new m("Failed to enter fullscreen.")}async sa(){if(!this.ha.ds)return;const t=this.ha.ww([Gi.pa,Gi.ma]);if(this.ha.jo(),await t,this.ha.ds)throw new m("Failed to exit fullscreen.")}_i(){this.ra||(this.Yo!==tc.FULLSCREEN||this.ha.ds?this.Yo!==tc.FULLSCREEN&&this.ha.ds&&this.Jo(tc.FULLSCREEN):this.Jo(tc.INLINE))}kn(){this.ha.mn(Gi.pa,this._K),this.ha.mn(Gi.ma,this.gK),this.ea.mn(re.zL,this.UK),this.ea.mn(re.GL,this.UK),this.ea.mn(re.ma,this.VK),this.Vo()}constructor(t,i){super(),this.Yo=tc.INLINE,this.ra=!1,this.ha=void 0,this.ea=void 0,this.ta=new te,this.hu=void 0,this._K=()=>{this._i()},this.gK=()=>{this.ra||(this.So(new Pi(new Ga(Vo.FULLSCREEN_ERROR,"Failed to enter fullscreen."))),this._i())},this.UK=()=>{this.ra||(this.Yo!==tc.NATIVE_PICTURE_IN_PICTURE||this.ea.XL?this.Yo!==tc.NATIVE_PICTURE_IN_PICTURE&&this.ea.XL&&this.Jo(tc.NATIVE_PICTURE_IN_PICTURE):this.Jo(tc.INLINE))},this.VK=()=>{this.ra||(this.So(new mD(new wD(Vo.PICTURE_IN_PICTURE_ERROR,"Unexpected native picture-in-picture error."))),this.UK())},this.ha=t,this.ea=i,this.ha.wn(Gi.pa,this._K),this.ha.wn(Gi.ma,this.gK),this.ea.wn(re.zL,this.UK),this.ea.wn(re.GL,this.UK),this.ea.wn(re.ma,this.VK)}};r();var AD=class t{HK(t){return this.WK.Zo(()=>this.qK(t))}qx(){this.Iz.xz()}async qK(i){const e=this.Iz.Gq(Ci.Bk),s=e.$W,n=await t.zK(s,i);return await this.Iz.Pq(e),n}static async zK(i,e){return Qt.S_||Qt.w_?"all":(i.src||(i.src="data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),await t.GK(),!e&&await t.XK(i,!1)?"all":await t.XK(i,!0)?"muted":"none")}static async XK(t,i){t.muted=i;const e=t.play();try{if(!ih(e))return!Qt.Ks;const t=Er(250);return await Promise.race([e,t]),!0}catch(t){return!1}finally{t.pause(),t.muted=!0}}static GK(){return new Promise(t=>{if("function"==typeof MessageChannel){const i=new MessageChannel;i.port1.onmessage=()=>t(),i.port2.postMessage("")}else u(t,0)})}kn(){this.WK.kn()}constructor(t){this.Iz=void 0,this.WK=void 0,this.Iz=t,this.WK=new te}},bD=AD;function SD(t){bD=t}function TD(t){let i;return{get url(){return t.Yu},get method(){return t.Uk},get headers(){return i||(i=t.fk.MT()),i},get body(){return t.zT},get useCredentials(){return t.zk},get type(){return t.Km},get subType(){return t.Wk},get mediaType(){return t.qk},get responseType(){return t.dk}}}function kD(t){switch(t.toLowerCase()){case"arraybuffer":return M.CT;case"json":return M.DT;case"stream":return M.BT;default:return M.NT}}function ED(t){switch(t.toUpperCase()){case"POST":return X.POST;case"PUT":return X.PUT;case"DELETE":return X.DELETE;case"HEAD":return X.HEAD;case"OPTIONS":return X.OPTIONS;default:return X.GET}}function PD(t){switch(t.toLowerCase()){case"manifest":return Al.wk;case"segment":return Al.yk;case"preload-hint":return Al.Ak;case"content-protection":return Al.bk;default:return Al.pk}}function xD(t){switch(t.toLowerCase()){case"initialization-segment":return Xa.Sk;case"fairplay-license":return Xa.Tk;case"fairplay-certificate":return Xa.Ek;case"widevine-license":return Xa.Pk;case"widevine-certificate":return Xa.xk;case"playready-license":return Xa.Ik;case"clearkey-license":return Xa.Rk;case"aes128-key":return Xa.Ck;default:return Xa.pk}}function ID(t){switch(t.toLowerCase()){case"audio":return Za.Dk;case"video":return Za.Bk;case"text":return Za.NT;case"image":return Za.Nk;default:return Za.pk}}r(),r(),r(),r();var RD=class{get jK(){return this.QK.Qy}get Ca(){return this.hu||(this.hu=this.KK()),this.hu}get YK(){return this.JK}get ZK(){return!this.JK}get $K(){return this.tY>0}get oE(){return this.aE}cD(){this.JK=!0,this.QK.Xy(null)}iY(){this.QK.jy(new UA(this.eY))}sY(t){if(!this.ZK)throw new g("Cannot respond more than once");if(!Lu(t))throw new g("Expected valid response");this.aE=this.nY(t),this.cD()}rY(){try{const t=this.hY(this.Ca);t?this.oY(t):this.$K||this.YK||this.cD()}catch(t){this.eY.push(t),this.iY()}}oY(t){if(this.YK)throw new m("Request has been redirected or a response already exists");if(ih(t))this.aY(t);else{if("function"!=typeof t)throw new g("Expected promise or function");{const i=new pa,e=t=>{t?i.jy(t):i.Xy(void 0)};try{const s=t(e);ih(s)&&i.$g(s)}catch(t){i.jy(t)}this.aY(i.Qy)}}}async aY(t){try{this.tY++,await t,this.tY--,this.$K||this.YK||(this.eY.length?this.iY():this.cD())}catch(t){this.tY--,this.eY.push(t),this.$K||this.YK||this.iY()}}constructor(t,i){this.uY=void 0,this.hY=void 0,this.QK=void 0,this.eY=void 0,this.hu=void 0,this.JK=void 0,this.aE=void 0,this.tY=void 0,this.uY=t,this.hY=i,this.QK=new pa,this.eY=[],this.hu=void 0,this.JK=!1,this.aE=void 0,this.tY=0}},CD=class t extends RD{get zT(){return this.cY}get fk(){return this.uY.fk}get lk(){return this.uY.lk}get oE(){return this.aE}get hk(){return this.uY.hk}get vk(){return this.uY.vk}get Yu(){return this.uY.gk}static dY(t,i,e){const s=void 0===t.body?e:t.body;return new sc({ck:s,lk:i.lk,dk:i.lk.dk,fk:t.headers,hk:t.status,vk:t.statusText,gk:t.url,_k:!0},i)}KK(){return function(t){let i;const e=TD(t.lk);return{get closed(){return!t.ZK},get request(){return e},get url(){return t.Yu},get status(){return t.hk},get statusText(){return t.vk},get headers(){return i||(i=t.fk.MT()),i},get body(){return t.zT},respondWith:i=>t.sY(i),waitUntil:i=>t.oY(i)}}(this)}nY(i){return t.dY(i,this.uY,this.cY)}constructor(t,i,e){super(t,i),this.cY=void 0,this.cY=e,this.rY()}};r();var DD=class extends RD{get zT(){return this.uY.zT}get ZK(){return this.lY&&!this.JK}get fk(){return this.uY.fk}get Uk(){return this.uY.Uk}get fY(){return this.vY}get oE(){return this.aE}get dk(){return this.uY.dk}get Vk(){return this.uY.Vk}get Hk(){return this.uY.Hk}get Yg(){return this.uY.Yg}get Km(){return this.uY.Km}get Wk(){return this.uY.Wk}get qk(){return this.uY.qk}get Yu(){return this.uY.Yu}get zk(){return this.uY.zk}get jk(){return this.uY.jk}get Gk(){return this.uY.Gk}get Xk(){return this.uY.Xk}get Qk(){return this.uY.Qk}KK(){return function(t){let i;return{get url(){return t.Yu},get method(){return t.Uk},get headers(){return i||(i=t.fk.MT()),i},get body(){return t.zT},get closed(){return!t.ZK},get useCredentials(){return t.zk},get type(){return t.Km},get subType(){return t.Wk},get mediaType(){return t.qk},get responseType(){return t.dk},redirect:i=>t._Y(i),respondWith:i=>t.sY(i),waitUntil:i=>t.oY(i)}}(this)}nY(t){const i=this.uY.zT,e=new sc({ck:i,fk:{},lk:this.uY,gk:this.uY.Yu,dk:this.uY.dk,hk:200,vk:"OK"});return CD.dY(t,e,i)}_Y(t){if(!this.ZK)throw new g("Cannot redirect, already redirected or has a response");let i;i=Z(t)?{url:t}:t,this.vY=function(t,i){return new $n({Yu:void 0===t.url?i.Yu:t.url,Uk:void 0!==t.method?ED(t.method):void 0,fk:t.headers,zT:t.body,zk:t.useCredentials,Km:void 0!==t.type?PD(t.type):void 0,Wk:void 0!==t.subType?xD(t.subType):void 0,qk:void 0!==t.mediaType?ID(t.mediaType):void 0,dk:void 0!==t.responseType?kD(t.responseType):void 0},i)}(i,this.uY),this.cD()}constructor(t,i,e){super(t,i),this.vY=void 0,this.lY=void 0,this.lY=e,this.rY()}};var BD=class extends Mr{gY(t){this.pY.gY(t)}mY(t){this.pY.mY(t)}wY(t){this.pY.wY(t)}hX(t){this.pY.hX(t)}cX(t){this.pY.cX(t)}constructor(t,i=!0){const e=new ND(t);super(e,i),this.pY=void 0,this.pY=e}},ND=class{async lk(t){let i;try{i=await this.yY(t,t.Yg)}catch(i){if(i instanceof fb)return await this.AY(i,t.Yg);throw i}if(i=await this.bY(i,t.Yg),jr(i))return i;throw new An(i)}Kk(t){return this.$k.Kk(t)}async yY(t,i){ii(i);let e,s=t;for(const t of this.SY.slice()){ii(i);const n=new DD(s,t,!e);if(!n.YK)try{await n.jK}catch(t){0;continue}n.fY&&!e?s=n.fY:n.oE&&!e&&(e=n.oE)}return e||this.$k.lk(s)}async AY(t,i){let e;if(t instanceof An)e=t.oE;else{const i=t.lk;e=new sc({ck:null,lk:i,dk:i.dk,hk:0,vk:""})}const s=await this.bY(e,i);if(s===e)throw t;if(jr(s))return s;throw new An(s)}async bY(t,i){let e=t;for(const t of this.TY.slice()){ii(i);const s=await Promise.resolve(e.Ly().ck(i)),n=new CD(e,t,s);if(!n.YK)try{await n.jK}catch(t){0;continue}e=n.oE||e}return e}gY(t){this.SY.unshift(t)}mY(t){this.SY.push(t)}wY(t){oi(this.SY,t)}hX(t){this.TY.unshift(t)}cX(t){oi(this.TY,t)}kn(){this.$k.kn(),Yo(this.SY),Yo(this.TY)}constructor(t){this.$k=void 0,this.SY=[],this.TY=[],this.$k=t}};r();var MD=class{get Ca(){return this.hu||(this.hu=function(t){return{addRequestInterceptor(i){t.gY(i)},removeRequestInterceptor(i){t.wY(i)},addResponseInterceptor(i){t.hX(i)},removeResponseInterceptor(i){t.cX(i)}}}(this)),this.hu}gY(t){this.nV.gY(t)}wY(t){this.nV.wY(t)}hX(t){this.nV.hX(t)}cX(t){this.nV.cX(t)}constructor(t){this.nV=void 0,this.hu=void 0,this.nV=t}},LD=class extends Ne{get Ca(){return this.hu||(this.hu=function(t){return{get online(){return t.sx},get estimator(){return function(t){return{get bandwidth(){return t.kW},get roundTripTime(){return t.EW}}}(t.kY)},setEstimator(i){t.EY(function(t){if(!t)return;return{get kW(){return fS(t.bandwidth)},get EW(){return fS(t.roundTripTime)},PW:i=>function(t){if(!t)return;return{PY(i){t.markRequestStart(i)},xY(i){t.markResponseStart(i)},IY(i,e){t.markResponseData(i,e)},RY(i){t.markResponseEnd(i)}}}(t.createMeasurer(TD(i)))}}(i))},addRequestInterceptor(i){t.gY(i)},removeRequestInterceptor(i){t.wY(i)},addResponseInterceptor(i){t.hX(i)},removeResponseInterceptor(i){t.cX(i)},addEventListener(i,e){t.wn(i,e)},removeEventListener(i,e){t.mn(i,e)}}}(this)),this.hu}get sx(){return this.CY.sx}get kY(){return this.Rz.kY}EY(t){this.Rz.EY(t)}gY(t){this.nV.gY(t)}wY(t){this.nV.wY(t)}hX(t){this.nV.hX(t)}cX(t){this.nV.cX(t)}kn(){this.Vo(),this.CY.mn(d.Xw,this.DY),this.CY.mn(d.Gw,this.BY)}constructor(t,i,e){super(i),this.CY=void 0,this.nV=void 0,this.Rz=void 0,this.hu=void 0,this.DY=void 0,this.BY=void 0,this.CY=t,this.nV=i,this.Rz=e,this.DY=t=>{this.So(t)},this.BY=t=>{this.So(t)},this.CY.wn(d.Xw,this.DY),this.CY.wn(d.Gw,this.BY)}};r(),r(),r();var Sa=function(t){return t.PERFORMANCE="performance",t.QUALITY="quality",t.BANDWIDTH="bandwidth",t}({});r();function OD(t,i,e,s,n,r){const h=[];let o=t-_.max(r,1),a=t+n;if(i&&e){const t=ur(e,1,5),s=i-t;o=_.min(o,s);const n=i+e+t;a=_.max(a,n)}0!==o&&s.qM(0,o)&&h.push([0,o]);return s.qM(a,1/0)&&h.push([a,1/0]),h}function FD(t){return t instanceof m&&"QuotaExceededError"===t.name}r();var UD={type:Sa.BANDWIDTH};function VD(t){const i=Ua(UD);return Z(t)?i.type=HD(t):Lu(t)&&function(t){switch(t){case Sa.PERFORMANCE:case Sa.QUALITY:case Sa.BANDWIDTH:return!0;default:return!1}}(t.type)&&(i.type=HD(t.type)),Lu(t)&&Lu(t.metadata)&&(i.metadata=function(t){const i={},e=co(t.bitrate);return S(e)||(i.bitrate=e),i}(t.metadata)),i}function HD(t){switch(t){case"bandwidth":return Sa.BANDWIDTH;case"performance":return Sa.PERFORMANCE;case"quality":return Sa.QUALITY}}r();var WD=class extends wp{constructor(t){super("NY"),this.MY=void 0,this.MY=t}};r();var qD=class extends wp{constructor(t){super("LY"),this.OY=void 0,this.OY=t}};r();var zD=class extends wp{constructor(t){super("FY"),this.UY=void 0,this.UY=t}},GD=class extends Ne{VY(t){this.HY=t}get WY(){switch(this.qY.type){case Sa.PERFORMANCE:return 0;case Sa.QUALITY:return 1/0;case Sa.BANDWIDTH:return this.qY.metadata&&void 0!==this.qY.metadata.bitrate?this.qY.metadata.bitrate:HI.Ng.fW();default:return HI.Ng.fW()}}get Ca(){return this.hu}get OY(){return this.qY}set OY(t){this.qY=t,this.So(new qD(t))}get MY(){return this.zY}set MY(t){this.zY=t,this.So(new WD(t))}get GY(){return _.min(this.zY,this.XY)}get UY(){return this.jY}set UY(t){this.jY=t,this.So(new zD(t))}get QY(){return this.XY}get kY(){var t;return null!=(t=this.KY)?t:this.HY.hq}EY(t){this.KY=t}YY(t){let i=_.min(t,.8*this.XY);if(i=_.max(10,i),this.XY===i)return!1;const e=this.GY;this.XY=i;const s=this.GY;return s!==e&&this.So(new WD(s)),!0}get JY(){return this.ZY}set JY(t){this.ZY=t}constructor(...t){super(...t),this.hu=function(t){return{get strategy(){return function(t){return{metadata:t.metadata,type:t.type}}(t.OY)},set strategy(i){t.OY=VD(i)},get targetBuffer(){return t.MY},set targetBuffer(i){const e=co(i);S(e)||(t.MY=e)},get bufferLookbackWindow(){return t.UY},set bufferLookbackWindow(i){const e=co(i);S(e)||(t.UY=e<=0?30:e)},get maxBufferLength(){return t.QY},get clearBufferWhenSettingTargetQuality(){return t.JY},set clearBufferWhenSettingTargetQuality(i){t.JY=Zn(i)}}}(this),this.qY=UD,this.zY=20,this.jY=30,this.XY=1/0,this.ZY=!1,this.KY=void 0,this.HY=void 0}};r(),r();var XD=class extends Oi{xa(){return new jD}constructor(){super("mI")}},jD=class extends wp{constructor(){super("change")}};r(),r();var QD=class extends Ne{kn(){this.Vo();for(const t of this.Zf)this.$Y.mn(t,this.tJ)}constructor(t,i,e){super(e),this.$Y=void 0,this.Zf=void 0,this.tJ=t=>{Zb(t)&&ct(()=>{this.So(t.Ca)})},this.$Y=t,this.Zf=i;for(const t of this.Zf)this.$Y.wn(t,this.tJ)}},ws=class extends _o{kn(){this.Vo(),this.$Y.mw(this.tJ)}constructor(t,i){super(i),this.$Y=void 0,this.tJ=t=>{Zb(t)&&ct(()=>{this.So(t.Ca)})},this.$Y=t,this.$Y.lw(this.tJ)}};var KD=class extends _o{get EO(){return this.OO}set EO(t){if(this.PO<=t)throw new m("Start time of a clip should be smaller than the end time.");this.OO!==t&&(this.OO=t,this.So(new XD))}get PO(){return this.VO}set PO(t){if(t<=this.EO)throw new m("End time of a clip should be larger than the start time.");this.VO!==t&&(this.VO=t,this.So(new XD))}get Ca(){return this.hu||(this.hu=function(t){let i;const e={get startTime(){return t.EO},set startTime(i){t.EO=i},get endTime(){return t.PO},set endTime(i){t.PO=i},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new ws(t,e),e}(this)),this.hu}hr(){0===this.OO&&this.VO===1/0||(this.OO=0,this.VO=1/0,this.So(new XD))}iJ(){return new ve([this.EO,this.PO],[!0,!0])}constructor(...t){super(...t),this.OO=0,this.VO=1/0,this.hu=void 0}};r();var YD=class t extends Yc{OP(t,i){const e=this.eJ.iJ().DM(t);super.OP(e,i),this.sJ()}VP(){return super.VP()||this.nJ}get rJ(){return this.Tx().length?this.Tx():this.eJ.iJ()._s()}Tx(){return ve.jn(super.Tx()).Mn(this.eJ.iJ())._s()}Gx(){this.VP()?this.OP(this.rJ.start(0)):this.hJ(),super.Gx(),this.sJ()}async Ta(t,i){ii(i),this.nJ=!1,this.eJ.hr(),await super.Ta(t,i)}kn(){return this.eJ.mn("mI",this.oJ),this.PP.mn(d._y,this.Nc),this.aJ(),super.kn()}$x(t){switch(t.type){case d.$w:return this.So(t),this.uJ(),!0;case d.Zw:case d.Cw:return this.So(t),this.cJ(),!0;case d.Bw:if(this.dJ)return!0}return super.$x(t)}get dJ(){return this.eJ.PO=this.eJ.PO-t.fd;this.nJ&&!e?(this.nJ=!1,this.hx&&this.Gx()):this.nJ||!e||this.kx||this.fJ||(this.nJ=!0,this.So(new At(i)),this.zx())}hJ(){if(this.ct===1/0)return;const i=this.rJ,e=ve.jn(i).DM(this.MP);uh(this.MP,e,t.fd)||this.OP(e)}constructor(i,e){super(i),this.eJ=void 0,this.nJ=!1,this.lJ=void 0,this.fJ=!1,this.oJ=()=>{this.hJ(),this.sJ()},this.Nc=()=>{this.aJ(),this.sJ();this.dJ&&this.MP>=this.eJ.PO-t.vJ&&!this.UP&&(this.lJ=Is(this.Nc))},this.uJ=()=>{this.fJ=!0},this.cJ=()=>{this.fJ&&(this.fJ=!1,this.sJ())},this.eJ=e,this.eJ.wn("mI",this.oJ),this.PP.wn(d._y,this.Nc)}};YD.vJ=1,YD.fd=.001,r();var JD=class{get _J(){return this.gJ}set _J(t){this.gJ=t}constructor(){this.gJ=void 0,this.gJ=!1}};r();var ZD=class extends Yc{VP(){return!this.gJ._J&&super.VP()}zx(){this.pJ=!0,super.zx()}Gx(){this.pJ=!1,super.Gx()}$x(t){if(this.gJ._J)switch(t.type){case d.Bw:return this.MP=0,this.pJ||(this.kx?this.mJ=!0:this.Gx()),!0;case d.Zw:this.mJ&&(this.mJ=!1,this.Gx());break;case d.jw:if(this.mJ||super.VP())return!0}return super.$x(t)}constructor(t,i){super(t),this.gJ=void 0,this.mJ=!1,this.pJ=!1,this.gJ=i}};r(),r();var $D=class{get Ca(){return this.hu}get eO(){return this.oa.JP.eO}get nO(){return this.oa.JP.nO}get iO(){return this.oa.JP.iO}get wJ(){throw new m("Not implemented")}get yJ(){throw new m("Not implemented")}get rO(){return this.oa.JP.rO}get sO(){return this.oa.JP.sO}get hO(){return this.oa.JP.hO}constructor(t){this.oa=void 0,this.hu=void 0,this.oa=t,this.hu=function(t){return{get currentBandwidthEstimate(){return t.nO},get corruptedVideoFrames(){return t.eO},get droppedVideoFrames(){return t.iO},get totalVideoFrames(){return t.sO},get totalBytesLoaded(){return t.rO},get bufferedSegments(){return t.hO}}}(this)}};function tB(t){if(!t||!Tf(t))return{iO:0,eO:0,sO:0,nO:0,rO:0,hO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}};if("function"==typeof t.getVideoPlaybackQuality){const i=t.getVideoPlaybackQuality();return{iO:i.droppedVideoFrames,eO:i.corruptedVideoFrames||0,sO:i.totalVideoFrames}}return{iO:t.webkitDroppedFrameCount||0,eO:0,sO:t.webkitDecodedFrameCount||0}}r(),r();var iB=class extends Oi{xa(){return new eB}constructor(){super("AJ")}},eB=class extends wp{constructor(){super("castingchange")}};r();var sB=class extends Ne{get bJ(){var t,i;return(null==(t=this.SJ)?void 0:t.bJ)||(null==(i=this.TJ)?void 0:i.bJ)||!1}get kJ(){return this.SJ}get EJ(){return this.TJ}PJ(t){this.SJ=t,this.xJ(t)}IJ(t){this.TJ=t,this.xJ(t)}xJ(t){t.wn("statechange",this.RJ)}CJ(t){t.mn("statechange",this.RJ)}get Ca(){return this.hu||(this.hu=function(t){let i;const e={get casting(){return t.bJ},get airplay(){var i;return null==(i=t.kJ)?void 0:i.Ca},get chromecast(){var i;return null==(i=t.EJ)?void 0:i.Ca},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new QD(t,["AJ"],e),e}(this)),this.hu}kn(){this.Vo(),this.SJ&&(this.CJ(this.SJ),this.SJ=void 0),this.TJ&&(this.CJ(this.TJ),this.TJ=void 0)}constructor(...t){super(...t),this.SJ=void 0,this.TJ=void 0,this.DJ=!1,this.hu=void 0,this.RJ=()=>{const t=this.DJ,i=this.bJ;t!==i&&(this.DJ=i,this.So(new iB))}}};r(),r();var Ru=class{static async BJ(t,i){try{const e=new $n({Yu:t,dk:M.NT,Uk:X.GET}),s=await i.lk(e);return(await s.ck()).trim()}catch(t){return void D(t)}}static NJ(t){try{const i=wC(t);return new SC(i.key,i.domains_page,i.domains_source,i.expiration_date,i.features,i.customer_id,i.generation_date,i.sdks,i.send_impression)}catch(t){throw new Ga(Vo.LICENSE_ERROR,"Invalid license. No valid license was configured.")}}static MJ(t){void 0===t&&(t=$r.bh),zd.um("The baked-in license is used. Please update the configuration with your license.");const i=t.rj("F2b-iL'[FL[S"),e=JSON.parse('["F$(:_L50F|aY"]').map(i=>t.rj(i)),s=JSON.parse('[".$hsF|b9_Ess*rS:F]Y\\""]').map(i=>t.rj(i)),n=Number(new Date(Number(t.rj('COD|aHpHa:p3Ceo3Co""')))),r=JSON.parse("[]").map(i=>t.rj(i));return new SC(i,e,s,n,r)}static convertLicenseToDummyLicense(t){return new SC(t._j,t.gj,t.pj,864e13,t.wj,t.yj,Date.now(),t.bj,t.Sj)}};r();var ba=class t{static IT(){return t.Ng||(t.Ng=nB.LS()?new nB:new CA),t.Ng}static Gy(i){t.IT().Gy(i)}static xT(){t.IT().xT()}static Wy(i){return t.IT().Wy(i)}static qy(i,e){t.IT().qy(i,e)}static LJ(i){const e=t.Wy(i);if(void 0!==e)return C(e)}static OJ(i){return"true"===t.Wy(i)}};ba.Ng=void 0;var nB=class extends ba{static LS(){const t="foobar";try{return self.localStorage.setItem(t,t),self.localStorage.removeItem(t),!0}catch(t){}return!1}Gy(t){self.localStorage.removeItem(t)}xT(){self.localStorage.clear()}Wy(t){var i;return null!=(i=self.localStorage.getItem(t))?i:void 0}qy(t,i){self.localStorage.setItem(t,i)}},rB="https://validate.theoplayer.com/1/",hB=72e5,oB=_.floor(14399999*_.random()-hB),aB="THEOplayer.license",uB=class{async FJ(){const t=await this.UJ(this.VJ.license,this.VJ.licenseUrl);this.fQ.HJ(t)}async UJ(t,i){let e,s=i;t?e=Ru.NJ(t):s||(e=Ru.MJ()),s||(s=rB+e._j);const n=this.WJ();let r;if(e&&(r=this.qJ.Nj(e),r===Ee.dj)){if(this.zJ(e.mj)&&this.zJ(null==n?void 0:n.mj)){const t=await this.GJ(s);if(t)return t}return e}if(n){if(this.qJ.Nj(n)===Ee.dj){if(this.zJ(null==n?void 0:n.mj)){const t=await this.GJ(s);if(t)return t}return n}ba.Gy(aB)}const h=await Ru.BJ(s,this.nV);let o;if(h){o=Ru.NJ(h);if(this.qJ.Nj(o)===Ee.dj)return ba.qy(aB,h),o;ba.Gy(aB)}else if(!this.Vj&&e&&r===Ee.lj&&s===rB+e._j)return Ru.convertLicenseToDummyLicense(e);if(!e&&!o)throw new Ga(Vo.LICENSE_ERROR,"The given license is invalid!");this.XJ(null!=e?e:o,new Ga(Vo.LICENSE_ERROR,"The given license is invalid!"))}async xj(t){let i=await this.fQ.lQ();if(this.zJ(i.mj)){var e;const t=null!=(e=this.VJ.licenseUrl)?e:rB+i._j,s=await this.GJ(t);s&&(this.fQ.HJ(s),i=s)}try{const e=this.qJ.Nj(i);if(e===Ee.vj){const t=TC.Tj;throw new Ga(PC(t),MC.Dj(t))}if(e===Ee.lj){const t=TC.lj;throw new Ga(PC(t),MC.Dj(t))}this.qJ.xj(t,i)}catch(t){this.jJ(t)}}async Bj(t){const i=await this.fQ.lQ();try{this.qJ.Bj(t,i)}catch(t){this.jJ(t)}}async GJ(t){try{const i=await Ru.BJ(t,this.nV);if(void 0===i)return;const e=Ru.NJ(i);return this.qJ.Nj(e)===Ee.dj?(ba.qy(aB,i),e):void 0}catch(t){return}}zJ(t){return!t||Number(new Date)+2592e5+oB>=t}WJ(){const t=ba.Wy(aB);if(t)return Ru.NJ(t)}XJ(t,i){this.fQ.HJ(t),this.jJ(i)}jJ(t){throw Pv(t.message),this.QJ.gQ(t.message),t}constructor(t,i,e,s,n,r){this.nV=void 0,this.qJ=void 0,this.QJ=void 0,this.fQ=void 0,this.VJ=void 0,this.MA=void 0,this.Vj=void 0,this.nV=t,this.qJ=i,this.QJ=e,this.fQ=s,this.VJ=n,this.MA=r,this.Vj=NC(r)}};r();var cB=class{HJ(t){this.KJ=t,this.YJ.Xy()}get JJ(){return this.KJ}async lQ(){return this.KJ?Promise.resolve(this.KJ):(await this.YJ.Qy,this.KJ)}constructor(){this.KJ=void 0,this.YJ=new pa}};r(),r();var dB=class extends Oi{xa(){return new lB}constructor(){super("mI")}},lB=class extends wp{constructor(){super("change")}};function fB(t){let i;const e={get fontFamily(){return t.ZJ},set fontFamily(i){t.ZJ=i},get fontColor(){return t.$J},set fontColor(i){t.$J=i},get fontSize(){return t.tZ},set fontSize(i){t.tZ=i},get backgroundColor(){return t.iZ},set backgroundColor(i){t.iZ=i},get windowColor(){return t.eZ},set windowColor(i){t.eZ=i},get edgeStyle(){return t.sZ},set edgeStyle(i){t.sZ=i},get marginTop(){return t.nZ},set marginTop(i){t.nZ=i},get marginBottom(){return t.rZ},set marginBottom(i){t.rZ=i},get marginLeft(){return t.hZ},set marginLeft(i){t.hZ=i},get marginRight(){return t.oZ},set marginRight(i){t.oZ=i},addEventListener(t,e){const s=$a(t,Hi);i.wn(s,e)},removeEventListener(t,e){const s=$a(t,Hi);i.mn(s,e)}};return i=new mp(e),t.wn(["mI"],t=>i.So(t.Ca)),e}r();var vB={ZJ:void 0,$J:void 0,tZ:void 0,iZ:void 0,eZ:void 0,sZ:void 0,nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0},_B="THEOplayer.textTrackStyle.",gB=class t extends Ne{get aZ(){return this.uZ}get ZJ(){return this.uZ.ZJ}set ZJ(t){this.er({ZJ:t})}get $J(){return this.uZ.$J}set $J(t){this.er({$J:t})}get tZ(){return this.uZ.tZ}set tZ(t){this.er({tZ:t})}get iZ(){return this.uZ.iZ}set iZ(t){this.er({iZ:t})}get eZ(){return this.uZ.eZ}set eZ(t){this.er({eZ:t})}get sZ(){return this.uZ.sZ}set sZ(t){this.er({sZ:t})}get nZ(){return this.uZ.nZ}set nZ(t){this.er({nZ:t})}get rZ(){return this.uZ.rZ}set rZ(t){this.er({rZ:t})}get oZ(){return this.uZ.oZ}set oZ(t){this.er({oZ:t})}get hZ(){return this.uZ.hZ}set hZ(t){this.er({hZ:t})}get Ca(){return this.hu||(this.hu=fB(this)),this.hu}er(i){this.uZ=Mo({},this.uZ,i),t.cZ(this.uZ),this.So(new dB)}static dZ(){const t=Mo({},vB);return t.ZJ=ba.Wy(_B+"fontFamily")||t.ZJ,t.$J=ba.Wy(_B+"fontColor")||t.$J,t.tZ=ba.Wy(_B+"fontSize")||t.tZ,t.iZ=ba.Wy(_B+"backgroundColor")||t.iZ,t.eZ=ba.Wy(_B+"windowColor")||t.eZ,t.sZ=ba.Wy(_B+"edgeStyle")||t.sZ,t}static cZ(t){ba.qy(_B+"fontFamily",t.ZJ||""),ba.qy(_B+"fontColor",t.$J||""),ba.qy(_B+"fontSize",t.tZ||""),ba.qy(_B+"backgroundColor",t.iZ||""),ba.qy(_B+"windowColor",t.eZ||""),ba.qy(_B+"edgeStyle",t.sZ||"")}constructor(){super(),this.uZ=void 0,this.hu=void 0,this.uZ=t.dZ()}};function pB(t,i){var e,s;t.style.marginLeft=(null!=(e=i.hZ)?e:0)+"px",t.style.marginRight=(null!=(s=i.oZ)?s:0)+"px",t.style.width="calc(100% - "+t.style.marginLeft+" - "+t.style.marginRight+")"}r(),r(),r(),r();var mB=[d.uo,d.jw,Do.TM,d._y,d.Qw,d.Ww,d.$w,d.Zw,d.Bw,d.Kw,d.gy,d.Rw,Do.wI,d.Jw,Mc.ma,_r.Dw,_r.Dy,d.Pw,d.Ew,d.py,d.yy,d.LICENSE_REQUEST_GENERATED,d.Fw,d.Vw,d.Lw,d.Nw],wB={RL:!1};function yB(t){return void 0!==t.Rx}function AB(t){return t.Cd.Km===Zr.wV}r();var Zs=function(t){return t.lZ="fZ",t}({}),bo=["fZ"],Po=function(t){return t[t.vZ=0]="vZ",t[t.BT=1]="BT",t[t._Z=2]="_Z",t}({});r(),r();var bB=["loadstart","encrypted","waitingforkey","webkitneedkey","msneedkey"],SB=function(t){return t.gZ="pZ",t.mZ="wZ",t.yZ="AZ",t}({}),TB=class extends Ne{get Cd(){return this.YS}get $W(){return this._T}async bZ(t,i){const e=await this.hw.nw(t.Ym,i),s=await e.IS();return await this.SZ(s),s}TZ(t){const i=this.TS;return i?0!==t.aq.length&&t.aq.some(t=>t.kS.Ym===i.kS):0!==this.YS.aq.length?t.aq.some(t=>this.YS.aq.some(i=>t.kS===i.kS)):0===t.aq.length||!this.kZ}EZ(t){return this.PZ.EZ(t),this.YS=t,Promise.resolve()}xZ(t){this.PZ.xZ(t)}IZ(){if(!Qt.vg)return"";const t=this.VJ.ps5;return"; pass_through="+t.passThrough+'; playmode="'+t.playMode+'";'}async zg(){this.Vo(),this._T.removeEventListener("loadedmetadata",this.RZ);for(const t of bB)this._T.removeEventListener(t,this.CZ);await this.ta.kn(),this.DZ(),await this.PZ.hr(),await this.BZ(void 0)}NZ(t){t!==this.MZ&&(this.MZ=t,t?this.LZ.Xy(void 0):this.LZ=new pa)}SZ(t){return this.ta.Zo(()=>this.BZ(t))}async BZ(t){if(t&&!this._T.src&&!this._T.srcObject)throw new fs(Vo.CONTENT_PROTECTION_ERROR,"Attempted to attach MediaKeys to a sourceless MediaElement");if(!t&&(this._T.src||this._T.srcObject))throw new fs(Vo.CONTENT_PROTECTION_ERROR,"Attempted to remove MediaKeys from a non-empty MediaElement");t&&!this.MZ&&await this.LZ.Qy;const i=this.TS;i&&(await i.PS(this._T),this.TS=void 0),t&&(await t._n(this._T),this.TS=t)}Ta(t,i){return this.ta.Zo(()=>this.OZ(t,i))}OZ(t,i){this.NZ(!1);const e=this.TL.ux;if(Z(t)&&i){const e=this.FZ(t,i);this._T.appendChild(e)}else if(Z(t))this._T.src=t;else if(function(t){if(void 0!==s.ManagedMediaSource&&t instanceof s.ManagedMediaSource)return!0;if("undefined"!=typeof MediaSource&&t instanceof MediaSource)return!0;return!1}(t))if(function(t){return"srcObject"in t&&Qt.ru&&Qt.Q_>=17}(this._T))try{this._T.srcObject=t}catch(i){this._T.src=URL.createObjectURL(t)}else this._T.src=URL.createObjectURL(t);else kB(t)&&(this._T.srcObject=t);this.TL.ux=e}FZ(t,i){const e=h.createElement("source");return e.src=t,e.type=i+this.IZ(),e}UZ(t){return this.ta.Zo(()=>this.VZ(t))}VZ(t){this.OZ(t),this._T.load()}DZ(){this.NZ(!1),kf(this._T)}async HZ(){this.TS&&await this.TS.hr()}constructor(t,i,e,s,n){super(),this.YS=void 0,this.TL=void 0,this._T=void 0,this.MZ=!1,this.LZ=new pa,this.kZ=!1,this.ta=new te,this.PZ=void 0,this.hw=void 0,this.VJ=void 0,this.TS=void 0,this.RZ=()=>{this.kZ=!0},this.CZ=()=>{this.NZ(!0)},this.YS=t,this.TL=i,this._T=i.$W,this.PZ=e,this.hw=s,this.VJ=n,this._T.addEventListener("loadedmetadata",this.RZ);for(const t of bB)this._T.addEventListener(t,this.CZ)}};function kB(t){return"undefined"!=typeof MediaStream&&t instanceof MediaStream}var EB=class extends TB{get IP(){return ve.jn(this._T.buffered)}get ct(){return this._T.duration}get WZ(){const t=this.ct;if(!isFinite(t))return!1;const i=this.IP;if(0===i.V)return!1;return t-i.An(i.V-1)0||this._T.videoHeight>0))return this.IP}async VY(){const t=this.Cd;switch(t.cq){case Xh.aR:case Xh.uR:this._T.setAttribute("crossorigin",t.cq);break;case Xh.Lk:default:this._T.removeAttribute("crossorigin")}void 0!==t.mx?this._T.preload=t.mx:this._T.preload=q.TW,void 0!==t.dq?this._T.title=t.dq:Fl(this._T),t.GZ?await this.UZ(t.GZ):Qt.vg?await this.Ta(t.iR,t.qT):await this.Ta(t.iR),this.PZ.Un(this,t)}TZ(t){return!1}EZ(t){return Promise.resolve(void 0)}XZ(t){return!1}jZ(){return!kB(this.YS.GZ)}async zg(){Fl(this._T),await super.zg()}static QZ(t,i){return!!i.canPlayType&&Boolean(i.canPlayType(t.qT))}};r();var H=class extends wp{constructor(t){super(d.Qw),this.currentTime=void 0,this.currentTime=t}};r();var Pt=class extends wp{constructor(){super(d.Ww)}};r(),r();var PB=function(t){return t.KZ="YZ",t}({}),xB=class extends wp{constructor(t){super("YZ"),this.JZ=void 0,this.JZ=t}},IB=class extends Ne{get ZZ(){return this.$Z}t$(t,i){const e=new ve([t,i]);this.$Z=this.$Z.OM(e),this.So(new xB(e))}i$(t,i){this.$Z=this.$Z.UM(new ve([t,i]))}hr(){this.$Z=ve.iL()}kn(){this.Vo()}constructor(...t){super(...t),this.$Z=ve.iL()}};function RB(t,i){return void 0===i&&(i=new WA({highWaterMark:1/0})),new HA(new CB(t,i),{highWaterMark:0})}r(),r(),r();var CB=class{start(t){this.YJ=t,this.e$()&&this.s$()}pull(){this.tf.length>0?this.n$():this.r$=!0,this.e$()&&this.s$()}cancel(t){return Yo(this.tf),this.if=0,this.r$=!1,this.Wd.cancel(t)}n$(){if(0===this.tf.length)return;const t=this.tf;this.tf=[],this.if=0,this.r$=!1,this.YJ.enqueue(t)}e$(){if(this.r$)return!0;return this.h$-this.if>0}s$(){if(this.o$)return;const t=this.Wd.read().then(this.a$).catch(this.EE);this.o$=t;const i=()=>{this.o$===t&&(this.o$=void 0)};t.then(i,i)}constructor(t,{size:i=()=>1,highWaterMark:e=1}){this.Wd=void 0,this.u$=void 0,this.h$=void 0,this.tf=[],this.if=0,this.YJ=void 0,this.r$=!1,this.o$=void 0,this.a$=t=>t.done?(this.n$(),void this.YJ.close()):(this.tf.push(t.value),this.if+=this.u$(t.value),this.r$&&this.n$(),this.e$()?this.Wd.read().then(this.a$):void 0),this.EE=t=>{this.n$(),this.YJ.error(t)},this.Wd=t.getReader(),this.u$=i,this.h$=e}};r(),r(),r(),r();var DB=class{c$(t){this.d$.push(t),this.Vy+=t.byteLength}l$(t){if(this.Vy<=t)return this.f$();const i=this.d$;let e=0,s=0;for(;s0&&ethis.tf.Vy)return;switch(this.Ra){case 0:this.E$(t);break;case 1:this.P$(t);break;case 2:this.x$(t)}}}I$(){this.Ra=0,this.k$=8}E$(t){const i=dh(this.tf.v$(this.k$)),e=new Ui,s=Cl._D(i,e);if(!s.cD)return this.k$=s.pD,void(t&&this.k$>this.tf.Vy&&this.R$(this.tf.Vy));const n=s.gD.Km;let r=s.gD.Vy;0===r&&(r=1/0),this.w$(n,r),this.C$(n)?this.D$(r):this.R$(r)}D$(t){this.Ra=1,this.k$=t}P$(t){const i=dh(this.tf.p$(this.k$)),e=new Ui,s=Cl.dD(i,e,!t);if(!s.cD)throw new nT(e.ac);this.y$(),this.B$(s.lD),this.I$()}R$(t){this.Ra=2,this.k$=0,this.N$=t}x$(t){const i=this.tf._$(this.N$);this.N$-=i.Vy;for(const t of i.d$)this.M$(t);(0===this.N$||t&&this.N$===1/0)&&(this.y$(),this.I$())}constructor(){this.tf=new DB,this.Ra=0,this.k$=0,this.N$=0,this.I$()}};function BB(t){return t instanceof Zw}function NB(t){return t instanceof Yw}function MB(t){return t instanceof jw||t instanceof Qw}function LB(t){return t instanceof yw}function OB(t){return t instanceof Zm}function FB(t){return t instanceof al}function UB(t){return t instanceof Fc}function VB(t){return t instanceof ay}function HB(t){return t instanceof Fh}function WB(t){return t instanceof sy}function qB(t){return t instanceof ry}function zB(t,i){const e=Jr(t.boxes,WB);if(e&&e.flags.baseDataOffsetPresent)e.baseDataOffset=e.baseDataOffset.add(i);else for(const e of t.boxes)e instanceof ry&&e.flags.dataOffsetPresent&&(e.dataOffset=e.dataOffset+i)}r();var GB=class extends Xo{start(t){this.YJ=t}transform(t){this.A$(t)}flush(){this.S$()}C$(t){return t===Ro.OR||t===Ro.IC||t===Ro.HC}B$(t){const i=this.L$(t);this.YJ.enqueue(i)}M$(t){this.YJ.enqueue(t)}L$(t){const i=ta(t.ck.ck);switch(t.Km){case"moov":return this.O$(i);case"sidx":return this.F$(i);case"moof":return this.U$(i)}return i}get V$(){if(void 0===this.H$)throw new m("Expected to have found a movie header timescale.");return this.H$}W$(t){const i=this.q$.get(t);if(void 0===i)throw new m("Expected to have found a media header timescale for track ID "+t+".");return i}O$(t){const i=Ey(t);for(let t=0;t>2,o=!!(2&r),a=Gp(t,i,3),u=Cu(t,i),c=Cu(t,i);let d;if(i.ac=e)return;const s=t.Wy(i.byte);return i.byte+=1,s}function tN(t,i){return function(t,i,e){let s=0,n=e;for(;n>0;)n-=1,s=256*s+Wu(t,i);return s}(t,i,2)}r(),r(),r(),r(),r(),r();var iN=class t{U0(t){this.V0=this.V0.concat(t.V0),this.H0+=t.V}W0(t,i,e){const s=this.H0,n=e-i;n>0&&(this.V0.push({q0:i,z0:e,G0:n,X0:s,j0:t}),this.H0+=n)}Wy(t){for(const i of this.V0)if(i.X0<=t&&t=this.H0))if(this.H0=t,0!==t)for(let t=i.length-1;t>=0;t-=1){const s=i[t];if(e<=s.G0)return s.z0-=e,s.G0-=e,void(i.length!==t+1&&(i.length=t+1));e-=s.G0}else i.length=0}get ck(){const t=new Array(this.H0);let i=0;for(const e of this.V0){const s=e.z0;for(let n=e.q0;n0;)n-=1,s=2*s+sN(t,i);return s}function _i(t,i){let e=0;for(;0===sN(t,i)&&e<32;)e+=1;return tu(t,i,e)+2**e-1}function nN(t,i){const e=_i(t,i);return 1&e?_.floor((e+1)/2):-_.floor(e/2)}function rN(t,i){const e=[],s={byte:1};let n;do{e.push(oN(t,i,s)),n=i.Wy(s.byte)}while(void 0!==n&&128!==n);return e}function hN(t,i){let e,s=0;do{e=Wu(t,i),s+=e}while(255===e);return s}function oN(t,i,e){const s=hN(i,e),n=hN(i,e),r=e.byte,h=r+n;return e.byte=h,{Y0:t,J0:s,Z0:n,$0:r,t1:h,i1:i}}var aN=function(t){return t[t.e1=1]="e1",t[t.s1=2]="s1",t[t.n1=3]="n1",t[t.h1=4]="h1",t[t.o1=5]="o1",t[t.a1=6]="a1",t[t.u1=7]="u1",t[t.c1=8]="c1",t[t.d1=9]="d1",t}({}),uN=[void 0,[1,1],[12,11],[10,11],[16,11],[40,33],[24,11],[20,11],[32,11],[80,33],[18,11],[15,11],[64,33],[160,99],[4,3],[3,2],[2,1]];function cN(t,i,e){let s=8,n=8;for(let r=0;r=2&&t.push(i),n=0)}this._1=i-t.length}m1(t){const i=this.v1;let e=t;for(const t of i){if(!(t<=e))return e;e+=1}return e}Wy(t){if(!(t>this.g1.V))return t>this._1&&this.l1(),this.g1.Wy(this.m1(t))}constructor(t){this.g1=void 0,this.v1=[],this._1=0,this.g1=t}};function lN(t){const i=new dN(t);let e,s,n,r,h,o,a=0,u=0,c=0,d=0;const l=i.Wy(1),f={bit:32};if(_i(i,f),100===l||110===l||122===l||144===l){const t=_i(i,f);3===t&&(e=sN(i,f)),_i(i,f),_i(i,f),sN(i,f);if(1===sN(i,f))for(let e=0;e<(3!==t?8:12);e+=1){1===sN(i,f)&&cN(i,f,e<6?16:64)}}const v=_i(i,f),g=_i(i,f);if(0===g)_i(i,f);else if(1===g){sN(i,f),nN(i,f),nN(i,f);const t=_i(i,f);for(let e=0;e>3),i);e.Ny(8*i),r.push({P1:i,I1:s})}A.push({R1:i,C1:s,D1:n,B1:r})}return{D0:s,N1:n,M1:r,L1:h,O1:a,F1:u,U1:c,V1:d,H1:o,W1:l,q1:f,z1:v,G1:_,X1:p,j1:m,Q1:g,L0:w,K1:y,Y1:A}}(dh(t.JB.ck),new Ui);i=function(t,i){let e=t.toString()+".";switch(i.N1){case 0:break;case 1:e+="A";break;case 2:e+="B";break;case 3:e+="C";break;default:return}switch(e+=i.L1.toString()+".",e+=function(t){let i=t;return i=i>>>1&1431655765|(1431655765&i)<<1,i=i>>>2&858993459|(858993459&i)<<2,i=i>>>4&252645135|(252645135&i)<<4,i=i>>>8&16711935|(16711935&i)<<8,i=i>>>16|i<<16,i}(i.H1).toString(16)+".",i.M1){case 0:e+="L";break;case 1:e+="H";break;default:return}e+=i.F1.toString();const s=i.O1.reduce((t,i)=>0===t?i:i+1,0);for(let t=0;tt.$D===s),h=$c.gF(t,r.qD);e&&!h.aF(e)||(e=h)}}return e}(lr(e,Ro.IC),i),n=lr(e,Ro.OC);return{EO:s.iF(),D2:n.ck}}function Ge(t){const i=t.DS("codecs");return i?i.split(",").map(t=>t.trim()):[]}function pN(t,i){return gf(t,i,bN)}function mN(t,i){return!("opus"===t)&&!("opus"===i)||t===i}function wN(t,i){const e=yN(t),s=yN(i);if((e||s)&&zd.Zs.Rp)return!0;const n=e||AN(t),r=s||AN(i);return!n&&!r||t.split(".")[0]===i.split(".")[0]}function yN(t){return/^(ac-3|dac3|ec-3|dec3|ec\+3|ac-4|dac4)/.test(t)}function AN(t){return/^(dvav|dva1|dvhe|dvh1)/.test(t)}function bN(t,i){if(t===i)return!0;const e=t.split("."),s=i.split("."),n=e[0];if(n!==s[0])return!1;if("mp4a"===n){const[,t,i]=e,[,n,r]=s;if(t!==n)return!1;if(Number(i)!==Number(r))return!1}return!0}r(),r(),r();var SN=class extends R{get B2(){return this.N2}get M2(){return this.L2}constructor(t,i,e,s){super(e),this.N2=void 0,this.L2=void 0,this.O2=void 0,this.N2=t,this.L2=i,this.O2=e}};var TN=Qt.X_,kN=class extends Ne{get MY(){return this.zY}set MY(t){this.zY=t}get UY(){return this.jY}set UY(t){this.jY=t}get ga(){return this.F2||this.U2.updating}H2(t,i,e){switch(t.Km){case Po.vZ:case Po.BT:return this.W2(e=>this.q2(t,i,e),e);case Po._Z:throw new m("Opaque segments are not supported on web.")}}z2(t,i){switch(t.Km){case Po.vZ:return this.W2(i=>this.G2(t,i),i);case Po.BT:throw new m("Streaming initialization segments are not supported on web.");case Po._Z:throw new m("Opaque initialization segments are not supported on web.")}}async G2(t,i){this.X2?this.j2=fN(dh(t.ck)):(await this.Q2(t,void 0,i),TN&&(this.K2=!1,this.Y2=t))}async q2(t,i,e){TN&&this.K2&&this.Y2&&await this.G2(this.Y2,e);try{if(ii(e),this.X2&&this.j2){const n=await async function(t,i){switch(t.Km){case Po.vZ:return t;case Po.BT:{const e=await bn(t.ck,i);return ii(i),{Km:Po.vZ,ck:new j(e)}}case Po._Z:throw new m("Cannot convert opaque SegmentData to ArraySegmentData.")}}(t,e),r=gN(n.ck,this.j2);var s;t={Km:Po.vZ,ck:r.D2},i=Mo({},i,{bU:r.EO+(null!=(s=i.bU)?s:0)})}await this.Q2(t,i,e),this.So(new wp(Zs.lZ))}finally{t.Km===Po.BT&&t.ck.cancel(new dt).catch(Ct)}}async Q2(t,i,e){switch(ii(e),i&&await this.J2(i),t.Km){case Po.vZ:if(this.Z2){const i=this.Z2.v0(qA(t.ck));return await this.t3(i,e)}return await this.i3(t.ck);case Po.BT:if(this.Z2){const i=this.Z2.v0(t.ck);return await this.t3(i,e)}return await this.t3(t.ck,e)}}async t3(t,i){const e=this.e3.IP,s=RB(t).getReader();let n=!1;try{for(;;){const t=await Nc(s.read(),i);if(t.done){n=!1;break}ii(i);const e=vm(t.value);n=!0,await this.i3(e)}}catch(t){if(s.cancel(t).catch(Ct),n){await this.s3();const t=this.e3.IP.Mn(e.BM());for(let i=0;ithis.h3(t,i))}async h3(t,i){this.U2.appendWindowStart===t&&this.U2.appendWindowEnd===i||(await this.s3(),this.U2.appendWindowStart=0,this.U2.appendWindowEnd=i,this.U2.appendWindowStart=t)}async J2(t){if(!uh(this.U2.timestampOffset,t.bU,.001))try{this.U2.timestampOffset=t.bU}catch(i){await this.s3(),this.U2.timestampOffset=t.bU}}async i3(t){this.U2.appendBuffer(t),this.o3=!0,await this.a3()}u3(t,i,e){return this.W2(e=>this.n3(t,i,e),e)}async n3(t,i,e){ii(e),this.U2.remove(t,i),await this.a3()}a3(){const t=this.e3.IP;return new Promise((i,e)=>{let s,n=!1;const r=()=>{n=!0},h=()=>{n=!1,s="error"},o=()=>{n=!1,s="aborted"},a=()=>{n=!1,s="sourceclose",u()},u=()=>{c(),n&&!s?(t.GM(this.e3.IP)||this.So(new wp(Zs.lZ)),i()):e(new m(s))},c=()=>{this.U2.removeEventListener("update",r),this.U2.removeEventListener("error",h),this.U2.removeEventListener("abort",o),this.U2.removeEventListener("updateend",u),this.d3.mn(SB.mZ,a)};this.U2.addEventListener("update",r),this.U2.addEventListener("error",h),this.U2.addEventListener("abort",o),this.U2.addEventListener("updateend",u),Qt.w_&&Qt.A_<3&&this.d3.wn(SB.mZ,a)})}l3(){return this.W2(()=>this.s3())}async s3(){if(this.d3.Ax===VN.sE){TN&&(this.K2=!0),this.U2.updating&&(this.F2=!0);try{this.U2.abort()}catch(t){0,this.F2=!1}this.ga&&await this.a3().catch(Ct)}}f3(){return"function"==typeof this.U2.changeType&&!Qt.g_}EZ(t){if(this.v3(),this.d3.Ax===VN._3)return;var i;this.g3=t;const e=null!=(i=this.d3.m3(t.qT))?i:t.qT;if(this.X2=EN(t.qT,this.w3),this.f3()&&this.y3(e)){this.w3=e;const t=this.d3.IZ();this.U2.changeType(""+e+t)}}y3(t){if(Ih(this.w3,t))return!1;const i=Vc(this.w3),e=Vc(t);if(i.Km!==e.Km)return!0;return!pN(Ge(i),Ge(e))||!(Qt.Nv&&Qt.v_)}A3(){this.d3.Ax!==VN.Bw||this.b3||this.ga||(this.U2.timestampOffset=this.U2.timestampOffset,this.d3.S3())}async W2(t,i){this.v3();const e=new at;e.$g(this.T3.Yg),i&&e.$g(i);try{this.b3=t(e.Yg),await this.b3,this.d3.S3(),this.ga&&await this.a3()}finally{this.b3=void 0,e.zg()}}v3(){if(this.b3)throw new m("Internal error")}async zg(){this.Vo(),this.T3.Zg(),this.b3&&(await this.b3.catch(Ct),this.b3=void 0),this.U2.removeEventListener("updateend",this.E3),this.U2.removeEventListener("bufferedchange",this.P3)}constructor(t,i,e,s,n){var r;if(super(),this.d3=void 0,this.e3=void 0,this.U2=void 0,this.g3=void 0,this.w3=void 0,this.zY=20,this.jY=30,this.F2=!1,this.o3=!1,this.b3=void 0,this.T3=new at,this.Z2=void 0,this.K2=!1,this.Y2=void 0,this.X2=!1,this.j2=void 0,this.E3=()=>{this.F2=!1},this.P3=t=>{t.removedRanges&&this.So(new wp(Zs.lZ))},this.d3=i,this.e3=t,this.U2=e,this.U2.addEventListener("updateend",this.E3),this.U2.addEventListener("bufferedchange",this.P3),this.g3=s,this.w3=n,this.X2=EN(s.qT,n),null==(r=i.Cd)?void 0:r.kp){var h;const t=null!=(h=i.Cd.x3)?h:1e5;this.Z2=new QB(t)}}};function EN(t,i){return Vh(t,"audio/mp4")&&Vh(i,"audio/mpeg")}r();var PN=class{get IP(){if(this.I3.Ax===VN._3)return ve.iL();let t=ve.jn(this.U2.buffered).Mn(ve.eL());const i=this.R3;return void 0!==i&&t.V>0&&t.An(t.V-1)===i&&(t=t.OM(ve.$M(i))),t}WZ(){return!!this.R3&&this.IP.CM().Cr(this.R3)}C3(){const t=this.IP;this.R3=t.V>0?t.An(t.V-1):0,this.I3.D3()}A3(){this.R3=void 0}constructor(t,i){this.I3=void 0,this.U2=void 0,this.R3=void 0,this.I3=i,this.U2=t}};function xN(t,i,e,s,n,r,h){const o=new PN(n,t),a=new kN(o,t,n,e,r);return new IN(t,i,e,s,o,a,h)}var IN=class extends Ne{get IP(){return this.e3.IP}get Cd(){return this.YS}get qT(){return this.GS}get B3(){return this.N3}get M3(){return this.L3.ZZ}get MY(){return this.O3.MY}set MY(t){this.O3.MY=t}get UY(){return this.O3.UY}set UY(t){this.O3.UY=t}get ga(){return this.O3.ga}WZ(){return this.e3.WZ()}C3(){this.e3.C3()}A3(){this.e3.A3(),this.O3.A3()}F3(t,i){this.L3.t$(t,i)}U3(t,i){this.L3.i$(t,i)}V3(){return this.O3.l3()}H2(t,i,e){return this.O3.H2(t,i,e)}z2(t,i,e){return this.O3.z2(t,e)}r3(t,i){return Qt.w_&&Qt.A_<3?this.O3.r3(t,1/0):this.O3.r3(t,i)}async _S(t,i,e){this.U3(t,i);const s=this.IP;await this.O3.u3(t,i,e);const n=0!==s.V&&0===this.IP.V;(Qt.rg||Qt.S_)&&n&&this.TL.My(this.TL.MP)}TZ(t){const i=t.qT;if(this.GS===i)return!0;const e=this.H3.get(i);if(void 0!==e)return e;const s=this.W3(t);return this.H3.set(i,s),s}W3(t){const i=this.d3.m3(t.qT);if(void 0===i)return!1;const e=Vc(this.GS),s=Vc(i),n=Ge(e),r=Ge(s);if(this.O3.f3()){if(!function(t,i){return gf(t,i,wN)}(n,r))return!1;if(Qt.og&&!function(t,i){return gf(t,i,mN)}(n,r))return!1}else{if(e.Km!==s.Km)return!1;if(!pN(n,r))return!1}return!0}async EZ(t){const i=t.qT;this.GS!==i&&(this.H3.clear(),this.O3.EZ(t),this.GS=i),this.YS=t,this.d3.q3()}async zg(){this.H3.clear(),this.Vo(),this.L3.kn();try{this.O3.mn(Zs.lZ,this.Rs),await this.O3.zg()}catch(t){}}constructor(t,i,e,s,n,r,h){super(),this.d3=void 0,this.YS=void 0,this.N3=void 0,this.TL=void 0,this.GS=void 0,this.L3=void 0,this.e3=void 0,this.O3=void 0,this.H3=qh(),this.d3=t,this.YS=e,this.GS=e.qT,this.N3=s,this.TL=i,this.e3=n,this.O3=r,this.L3=h,this.O3.wn(Zs.lZ,this.Rs)}};r();var RN=class{z3(){let t=this.Tn,i=this.An;if(this.G3||this.X3){const e=.001*(zd.Mg()-this.j3);this.G3&&(t+=e),this.X3&&(i+=e)}return ve.tL(t,i)}constructor(t,i,e=!1,s=!1){this.Tn=void 0,this.An=void 0,this.G3=void 0,this.X3=void 0,this.j3=void 0,this.Tn=t,this.An=i,this.G3=e,this.X3=s,this.j3=zd.Mg()}};function CN(t){const i=[];if(t.Q3&&i.push(t.Q3.IP),t.K3&&i.push(t.K3.IP),0===i.length)return ve.iL();let e=0;for(const t of i)t.V>0&&(e=_.max(e,t.An(t.V-1)));const s=t.WZ;let n=new ve([0,e],[!0,s]);for(let t of i)s&&t.V>0&&(t=t.OM(new ve([t.An(t.V-1),e],[!0,!0]))),n=n.Mn(t);return n}function DN(t,i,e){const s=t.IP;let n,r=s.VM(i);if(r>=0){if(!(r+1=0))return Promise.resolve();n=s.Tn(r)}return t._S(n,1/0,e)}function BN(t,i,e){if(!t.Cr(i)){const s=t.VM(i,e);if(s>=0){const e=t.Tn(s);if(it.OM(i.ZZ),ve.iL())}kn(){this.t4(),this.i4.mn(Do.wI,this.e4),this.TL.mn(d.Qw,this.e4),this.TL.mn(MN,this.s4),this.J3.forEach(t=>t.mn(PB.KZ,this.Z3)),this.n4(),this.r4=!0}XZ(t){if(this.TL.UP)return!1;if(0!==this.h4)return!1;const i=this.e3.IP,e=i.VM(t);if(e>=0&&t+NN=0?e+1:i.KM(t);if(s<0||s>=i.V)return!1;const n=i.Tn(s);if(ve.tL(t,n).UM(this.ZZ).ZM>1)return!1;if(0===t&&!this.TL.kx)return this.o4(t,n,2e3),!0;if(zd.fP)return this.o4(t,n,250),!0;return!(_.abs(n-t)<=.001)&&(this.a4(n),!0)}o4(t,i,e){this.n4(),this.u4=t,this.TL.wn(d.$w,this.c4),this.h4=zd.Og(()=>{this.u4===this.TL.MP&&this.a4(i),this.n4()},e)}n4(){0!==this.h4&&(this.TL.mn(d.$w,this.c4),zd.Lg(this.h4),this.h4=0)}a4(t){this.TL.My(t,!1,!0)}d4(){0!==this.l4&&(zd.Lg(this.l4),this.l4=0),this.TL.mn(d._y,this.ad)}f4(){this.r4||0===this.v4&&(this.d4(),this.v4=zd.fm(this._4,250))}t4(){0!==this.v4&&(zd.vm(this.v4),this.v4=0),this.d4(),this.TL.kx||(this.g4=0)}m4(){return!this.TL.hx&&(!this.TL.kx||this.w4())&&0!==this.TL.ux&&!this.TL.UP&&!this.TL.lt&&(this.y4()||this.i4.Ax>=mh.WL)}w4(){return!1}y4(){const t=this.TL.MP,i=this.e3.IP,e=i.VM(t);return-1!==e&&i.An(e)>t+NN}A4(t,i){const e=i.VM(t);return e>-1?i.An(e):t}constructor(t,i,e,s){this.e3=void 0,this.i4=void 0,this.TL=void 0,this.r4=void 0,this.J3=void 0,this.h4=void 0,this.l4=void 0,this.b4=void 0,this.u4=void 0,this.g4=void 0,this.v4=void 0,this.S4=void 0,this.T4=void 0,this.E4=void 0,this.Z3=void 0,this.e4=void 0,this.ad=void 0,this.c4=void 0,this.s4=void 0,this._4=void 0,this.e3=t,this.i4=i,this.TL=e,this.r4=!1,this.J3=[],this.h4=0,this.l4=0,this.b4=0,this.u4=0,this.g4=0,this.v4=0,this.S4=1,this.Z3=t=>{const i=this.TL.MP,e=t.JZ.Cr(i),s=t.JZ.Cr(i,NN)&&this.TL.Ax<=mh.HL;(e||s)&&this.XZ(i)},this.e4=Hl(t=>{if(this.r4)return;if(this.i4.Ax<=mh.HL){const t=this.TL.MP;this.XZ(t)||this._4()}else this.n4()},100),this.ad=Hl(t=>{this.f4()},100),this.c4=t=>{t.currentTime!==this.u4&&this.n4()},this.s4=()=>{this.m4()?0===this.v4&&(this.TL.wn(d._y,this.ad),this.l4=zd.Og(()=>{this.f4()},3500)):this.t4()},this._4=()=>{const t=this.b4,i=this.g4,e=this.TL.MP,s=zd.Mg(),n=this.e3.IP;if(t!==e)return this.b4=e,this.g4=s,this.S4=1,void(this.T4=zd._P?2e3:1e3);if(this.m4()&&0!==n.V&&i>0&&s>i+this.T4){let t;const i=this.ZZ.CM().UM(n),s=i.QM(e);if(-1!==s){const n=i.Tn(s);if(n-e<1||this.w4()){const e=i.An(s);0,t=e}}var r;if(!t)t=null==(r=this.E4)?void 0:r.determineStallJumpTarget(),t&&t!==e||(t=e+.01*this.S4,n.Cr(t)||(t=this.A4(e,n)));0,this.b4=t,this.S4++,this.T4=_.min(2*this.T4,1e4),this.a4(t)}},this.i4.wn(Do.wI,this.e4),this.TL.wn(d.Qw,this.e4),this.TL.wn(MN,this.s4),this.E4=s,this.T4=zd._P?2e3:1e3}},ON=class extends LN{w4(){if(!Qt.S_||!this.TL.kx)return!1;const t=this.TL.MP,i=this.e3.IP,e=this.ZZ.CM().UM(i),s=e.QM(t);if(-1===s)return!1;return e.Tn(s)-t<=3e3}},FN=Qt.N_||Qt.L_,UN=Qt.W_||Qt.X_||Qt.ru,VN=function(t){return t._3="closed",t.sE="open",t.Bw="ended",t}({}),HN=class extends TB{get Q3(){return this.P4}get K3(){return this.x4}get ct(){if(void 0!==this.I4)return this.I4;if(void 0!==this.R4)return this.R4;const t=this.iq.duration;return t===Xl?1/0:t}C4(t){if(t<0)throw new m("Invalid duration");this.D4()?this.B4(t):this.I4=t}B4(t){const i=t===1/0;if(i&&this.iq.setLiveSeekableRange){const t=2**39;this.iq.setLiveSeekableRange(0,t)}S(t)?(this.iq.duration=Xl,this.R4=NaN):(this.iq.duration=i?UN?1/0:Xl:t,this.R4=void 0),this.I4=void 0}get IP(){return FN?CN(this):function(t,i){let e=i;return e.V>0&&t.WZ&&(e=e.OM(ve.$M(e.An(e.V-1)))),e}(this,ve.jn(this._T.buffered))}get qZ(){var t;return null==(t=this.P4)?void 0:t.IP}get zZ(){var t;return null==(t=this.x4)?void 0:t.IP}get Sx(){return this.N4.z3().Mn(new ve([0,this.ct],[!0,!0]))}M4(t,i,e,s){this.N4=new RN(t,i,Boolean(e),Boolean(s))}get WZ(){return(!this.P4||this.P4.WZ())&&(!this.x4||this.x4.WZ())}get Ax(){return this.iq.readyState}async VY(){const t=this.YS,i=Jr(t.L4,t=>I(t.qT)),e=Jr(t.L4,t=>tt(t.qT));this._T.disableRemotePlayback=!0,await this.O4();const s=this.IZ();if(i){const t=new IB;var n;this.F4.Y3(t);const e=null!=(n=this.m3(i.qT))?n:i.qT;this.U4=this.iq.addSourceBuffer(""+e+s),this.P4=xN(this,this.TL,i,Ci.Dk,this.U4,e,t),this.P4.wn(Zs.lZ,this.P3)}if(e){const t=new IB;var r;this.F4.Y3(t);const i=null!=(r=this.m3(e.qT))?r:e.qT;this.V4=this.iq.addSourceBuffer(""+i+s),this.x4=xN(this,this.TL,e,Ci.Bk,this.V4,i,t),this.x4.wn(Zs.lZ,this.P3)}this.PZ.Un(this,t)}async O4(){await super.UZ(this.iq),"open"!==this.Ax&&await Lb(this.iq,"sourceopen")}D4(){if("open"!==this.Ax)return!1;const t=this.P4&&this.P4.ga,i=this.x4&&this.x4.ga;return!(t||i)}C3(){this.H4=!0,this.P4&&this.P4.C3(),this.x4&&this.x4.C3(),this.H4=!1,this.W4()}A3(){this.P4&&this.P4.A3(),this.x4&&this.x4.A3()}TZ(t){const i=Jr(t.L4,t=>I(t.qT)),e=Jr(t.L4,t=>tt(t.qT));if(this.P4){if(!i)return!1;if(!this.P4.TZ(i))return!1}else if(i)return!1;if(this.x4){if(!e)return!1;if(!this.x4.TZ(e))return!1}else if(e)return!1;return!!super.TZ(t)}async EZ(t){const i=Jr(t.L4,t=>I(t.qT)),e=Jr(t.L4,t=>tt(t.qT)),s=[];this.P4&&s.push(this.P4.EZ(i)),this.x4&&s.push(this.x4.EZ(e)),await Promise.all(s),await super.EZ(t)}xZ(t){super.xZ(t)}async zg(){if(this.iq.removeEventListener("sourceclose",this.q4),Qt.S_&&await this.HZ(),this.P4){if(await this.P4.zg(),this.P4=void 0,_p()&&(Qt.S_||Qt.w_))try{this.iq.removeSourceBuffer(this.U4)}catch(t){}this.U4=void 0}if(this.x4){if(await this.x4.zg(),this.x4=void 0,_p()&&(Qt.S_||Qt.w_))try{this.iq.removeSourceBuffer(this.V4)}catch(t){}this.V4=void 0}this._T.src&&URL.revokeObjectURL(this._T.src),this._T.disableRemotePlayback=!1,this.TL.mn([d._y,d.$w,d.Fw],this.bd),this.F4.kn(),Qt.w_&&await this.HZ(),await super.zg()}q3(){const t=this.YS,i=t.L4.map(t=>I(t.qT)&&this.P4?this.P4.Cd:tt(t.qT)&&this.x4?this.x4.Cd:t);this.YS=Mo({},t,{L4:i})}D3(){this.H4||this.W4()}get z4(){if(!this.WZ)return!1;const t=this.IP;return 0!==t.V&&t.Tn(t.V-1)<=this.TL.MP}W4(){this.z4&&this.D4()&&(this.iq.endOfStream(),this.I4=void 0,this.R4=void 0,this.So(new wp(SB.gZ)),this.TL.P3())}S3(){this.D4()&&(this.WZ?this.W4():void 0!==this.I4&&this.B4(this.I4))}XZ(t){return this.F4.XZ(t)}jZ(){return!0}m3(t){return WN(this.G4,t)}static QZ(t){const i=za(t.X4);if(void 0===i)return!1;if("function"!=typeof i.isTypeSupported)return!1;const e=new gv(t.X4);for(const i of t.L4)if(void 0===WN(e,i.qT))return!1;return!0}constructor(t,i,e,s,n,r=new gv(t.X4),h,o){super(t,i,s,n,o),this.G4=void 0,this.P4=void 0,this.U4=void 0,this.x4=void 0,this.V4=void 0,this.N4=new RN(0,1/0),this.iq=void 0,this.I4=void 0,this.R4=void 0,this.F4=void 0,this.H4=!1,this.q4=()=>{this.So(new wp(SB.mZ))},this.j4=()=>{this.So(new wp(SB.yZ))},this.bd=()=>{this.W4()},this.P3=()=>{this.TL.P3()},this.G4=r,this.iq=this.G4.Lp(),this.iq.addEventListener("sourceclose",this.q4),this.iq.addEventListener("sourceopen",this.j4),this.TL.wn([d._y,d.$w,d.Fw],this.bd),this.F4=new ON(this,e,this.TL,h)}};function WN(t,i){const e=Vc(i),s=Ge(e),n="audio/mp4"===e.Km,r=n&&1===s.length&&"mp4a.40.34"===s[0];if(t.Fp(i)&&(!r||!Qt.X_))return i;if(r){const i=['audio/mp4; codecs="mp3"',"audio/mpeg"];for(const e of i)if(t.Fp(e))return e}if(n&&1===s.length&&"flac"===s[0].toLowerCase()){const e=["flac","fLaC","FLAC"];for(const s of e){const e='audio/mp4; codecs="'+s+'"';if(t.Fp(i))return e}}}r(),r();var qN=class extends wp{constructor(t){super(d.Fw),this.currentTime=void 0,this.currentTime=t}},zN=[d.gy,d.Kw,d.$w,d.Fw,d.uo,d.jw],GN=class extends Ne{get MP(){return this.bz}get Q4(){return this.K4}get Y4(){return this.J4}get ct(){return this.WA}get UP(){return this.Z4}get hx(){return this.kz}get Ax(){return this.t5}get kx(){return this.Sz}get $P(){return this.Tz}set $P(t){this.$P!==t&&(this.Tz=t,this.So(new Ze(this.MP,this.Mx)))}get ux(){return this.Ez}set ux(t){this.ux!==t&&(this.Ez=t,this.So(new aa(this.MP,this.ux)))}get Mx(){return this.ib}set Mx(t){this.Mx!==t&&(this.ib=t,this.So(new Ze(this.MP,this.Mx)))}My(t,i,e){this.bz!==t&&(this.bz=t,this.K4=i,e&&!this.Sz?(this.J4=!0,this.So(new qN(this.MP))):(this.J4=!1,this.Sz=!0,this.So(new F(this.MP))))}zx(){this.kz||(this.kz=!0,this.So(new hl(this.MP)))}Gx(){this.kz&&(this.kz=!1,this.So(new Tc(this.MP)))}zg(){this.Vo()}constructor(t,i,e,s,n,r,h,o,a,u,c){super(),this.bz=void 0,this.WA=void 0,this.Z4=void 0,this.kz=void 0,this.Sz=void 0,this.Tz=void 0,this.Ez=void 0,this.ib=void 0,this.t5=void 0,this.K4=void 0,this.J4=void 0,this.bz=t,this.WA=i,this.Z4=e,this.kz=s,this.Sz=n,this.Tz=r,this.Ez=h,this.ib=o,this.t5=a,this.K4=u,this.J4=c}};function XN(t){return new GN(t.MP,t.ct,t.UP,t.hx,t.kx,t.$P,t.ux,t.Mx,t.Ax,!1,t.Y4)}function jN(t,i){i.ct===t.ct||S(i.ct)&&S(t.ct)||t.So(new Rs(t.ct)),t.$P=i.$P,t.Mx=i.Mx,t.ux=i.ux,i.hx?t.zx():t.Gx().catch(Ct),i.MP!==t.MP||i.Ax>mh.VL&&t.Ax===mh.VL?t.My(i.MP,i.Q4,i.Y4):!i.kx&&t.kx?t.So(new F(t.MP)):i.kx&&!t.kx&&t.Ax>=mh.HL&&t.So(new Es(t.MP)),!i.UP&&t.UP&&t.So(new At(t.MP))}r(),r();var QN=class extends Ne{get Ax(){return this.bx()}i5(t){this.EV!==t&&(this.EV=t,this.So(new ou(this.TL.MP,t)))}e5(){this.i5(this.bx())}hr(){this.i5(mh.VL)}zg(){this.Vo()}constructor(t){super(),this.TL=void 0,this.EV=mh.VL,this.s5=()=>{this.e5()},this.TL=t}};r();var KN=["emptied","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","timeupdate","progress","seeking","seeked"],YN=class extends QN{bx(){let t=this.TL.$W.readyState;return t>mh.HL&&this.TL.n5?mh.HL:(this.TL.$W.seeking&&t>mh.Qn&&(t=mh.Qn),t)}zg(){for(const t of KN)this.TL.$W.removeEventListener(t,this.s5);super.zg()}constructor(t){super(t);for(const t of KN)this.TL.$W.addEventListener(t,this.s5)}};r();var JN=yt,ZN=class extends QN{bx(){if(this.TL.$W.readyState===mh.VL)return mh.VL;const t=this.r5(),i=t?t.An-t.Tn:0;if(!t)return mh.Qn;const e=this.TL.ux;return this.h5()||i>=3*e?mh.qL:i>=3?mh.WL:mh.HL}r5(){const t=this.TL.MP,i=this.TL.IP.LM(.04),e=i.VM(t);if(!(e<0))return{Tn:t,An:i.An(e)}}h5(){if(this.TL.UP)return!0;const t=this.TL.ct,i=this.r5();return!!i&&t-i.An<=JN}zg(){this.TL.mn([d.$w,d.Fw],this.s5);for(const t of KN)this.TL.$W.removeEventListener(t,this.s5);super.zg()}constructor(t){super(t),this.TL.wn([d.$w,d.Fw],this.s5);for(const t of KN)this.TL.$W.addEventListener(t,this.s5)}};r(),r();var $N=[Do.wI,d.uo,d.jw,d.$w,d.Zw,d.Fw,d.Vw,d.Bw,Mc.ma],tM=class extends Ne{o5(){return(!this.PV.Y4||!this.PV.a5)&&this.PV.Ax{this.er()},this.PV=t,this.PV.wn($N,this.xK)}},iM=class extends tM{u5(){return this.d5&&super.u5()}er(){this.d5&&(this._T.paused||this._T.ended||this._T.error)&&(this.d5=!1),super.er()}hr(){super.hr(),this.d5=!1}zg(){this._T.removeEventListener(Do.TM,this.MV),super.zg()}constructor(t){super(t),this._T=void 0,this.d5=!1,this.MV=()=>{this.d5=!0,this.er()},this._T=t.$W,this._T.addEventListener(Do.TM,this.MV)}};r();var eu=class extends wp{constructor(t){super(Mc.ma),this.lt=void 0,this.lt=t}};function eM(t,i){return t.EO<=i&&t.PO>i}function Sn(t,i){return function(t,i){return ef(t.EO,i.EO,cE)}(t,i)||function(t,i){return ef(t.PO,i.PO,cE)}(t,i)}function sM(t,i){return function(t,i){return ef(t.MO,i.MO,cE)}(t,i)||function(t,i){return ef(t.LO,i.LO,cE)}(t,i)}function nM(t,i,e){let s=function(t,i,e,s,n,r,h){void 0===n&&(n=!1),void 0===r&&(r=0),void 0===h&&(h=t.length);let o=r,a=h-1;for(;o<=a;){const h=o+(a-o>>1),u=s(e(t[h]),i);if(u<0)o=h+1;else if(u>0)a=h-1;else{if(!(n&&h>r&&0===s(e(t[h-1]),i)))return h;a=h-1}}return~o}(t,i,jo,e,!0);if(s<0)return s;for(;s=0?s:-(s+1)}function hM(t){const i=t.Ht;if(!i)return-1;if(t instanceof _h)return i.l5(t);const e=i.L;if(!e)return-1;const s=nM(e.II,t,Sn);return s>=0?s:-1}function oM(t,i){const e=function(t,i,e){const s=t.length,n=i.length;let r=0,h=0;const o=[],a=[];for(;r{const e=0|i,s=t.Wy(e);return s&&s.Ca||void 0},w.defineProperty(i,"constructor",{value:rE}),i}(this)}fO(t){const i=this._5;for(let e=i.length-1;e>=0;e-=1){const s=i[e];if(t.zO(s))return!0}return!1}Wy(t){return this._5[t]}constructor(t){this._5=void 0,this.hu=void 0,this._5=t}};r();var uM=class extends Js{xa(){return new cM(this.Ht.Ca,this.Ax)}constructor(t,i){super(Te.wI),this.Ht=void 0,this.Ax=void 0,this.Ht=t,this.Ax=i}},cM=class extends Ae{constructor(t,i){super("readystatechange"),this.track=void 0,this.readyState=void 0,this.track=t,this.readyState=i}};r();var dM=class extends Js{xa(){return new lM(this.Ht.Ca)}constructor(t){super(Te.AI),this.Ht=void 0,this.Ht=t}},lM=class extends Ae{constructor(t){super("typechange"),this.track=void 0,this.track=t}};r();var Ve=class extends Js{xa(){return new fM(this.TO.Ca)}constructor(t){super(Te.hI),this.TO=void 0,this.TO=t}},fM=class extends Ae{constructor(t){super("addcue"),this.cue=void 0,this.cue=t}};r();var vM=class extends Js{xa(){return new _M(this.TO.Ca)}constructor(t){super(Te.aI),this.TO=void 0,this.TO=t}},_M=class extends Ae{constructor(t){super("removecue"),this.cue=void 0,this.cue=t}},gM=class extends Ne{get q(){return this.g5}get L(){return this.p5}m5(t){return Jr(this.p5.II,i=>i.o===t)}get $U(){return this.w5}set $U(t){this.w5=t}get tR(){return this.y5}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}xa(){return zh(this)}get o(){return this.hS}get jI(){return this.gO}get ZI(){return this.A5}set ZI(t){this.A5=t}get Lt(){return this.b5}get Th(){return this.pO}set Th(t){t!==this.pO&&(this.pO=t,this.So(new Uh(this)))}get bs(){return this.qA}get QI(){return this.S5}get Xk(){return this.Yo}set Xk(t){this.T5(t)}T5(t){const i=AS(t);i!==this.Xk&&(this.Yo=i,i===xh.Nh&&(this.k5.forEach(t=>{t.ro=!1}),Yo(this.k5),this.E5=0),this.So(new nr(this)))}get Ax(){return this.t5}set Ax(t){this.t5!==t&&(this.t5=t,this.So(new uM(this,this.t5)))}get iR(){return this.P5}set iR(t){this.P5=t}get Km(){return this.Vp}set Km(t){this.Vp!==t&&(this.Vp=t,this.So(new dM(this)))}get bU(){return this.zU}set bU(t){this.zU=t}tV(t){if(!t||t.Ht)return;const i=nM(this.x5,t,sM);if(i>=0)return;t.Ht=this;const e=-(i+1);this.x5.splice(e,0,t);const s=rM(this.L.II,t,Sn);this.I5(t,s),this.So(new Ve(t))}I5(t,i){this._5.splice(i,0,t),this.R5(i),t.jO=i,i=0&&ka(e,s);const n=nM(this.x5,t,sM);n>=0&&ka(this.x5,n),t.Ht=void 0,this.C5(t,i),this.So(new vM(t))}C5(t,i){ka(this._5,i),this.R5(i),t.jO=-1,this.E5>i&&--this.E5}UO(t){if(!t||t.Ht!==this)return;const i=this.l5(t);if(i<0)return;this.C5(t,i);const e=rM(this.L.II,t,Sn);this.I5(t,e);const s=li(this.k5,i=>i===t);if(s>=0){ka(this.k5,s);const i=rM(this.k5,t,Sn);this.k5.splice(i,0,t)}}D5(t,i){const e=this.k5,s=this._5;let n=this.E5,r=!1,h=1/0;i&&(n=0);for(let i=e.length-1;i>=0;i--){const s=e[i];eM(s,t)?s.PO=this.B5)&&this.N5(),t.jO}N5(){const t=this._5;for(let i=this.B5;i{this.ro=!0},this.F5=()=>{this.ro=!1},this.gO=Xk(),this.M5=t,this.MO=t.startTime,this.LO=t.endTime,this.M5.addEventListener("enter",this.O5),this.M5.addEventListener("exit",this.F5)}};r();var TM=class extends Js{xa(){return new kM(this.Ht.Ca)}constructor(t){super(Te.gI),this.Ht=void 0,this.Ht=t}},kM=class extends Ae{constructor(t){super("cuechange"),this.track=void 0,this.track=t}};function EM(t){if(!t)return;let i=t.THEOplayerVTTRegion;return i||(i=new PM(t),t.THEOplayerVTTRegion=i),i}r(),r();var PM=class{get U5(){return this.V5}get o(){return this.V5.id||""}get Ti(){return Number(this.V5.width)||0}set Ti(t){this.V5.width=t||0}get QO(){return Number(this.V5.lines)||0}set QO(t){this.V5.lines=t||0}get KO(){return Number(this.V5.regionAnchorX)||0}set KO(t){this.V5.regionAnchorX=t||0}get YO(){return Number(this.V5.regionAnchorY)||0}set YO(t){this.V5.regionAnchorY=t||0}get ZO(){return Number(this.V5.viewportAnchorX)||0}set ZO(t){this.V5.viewportAnchorX=t||0}get $O(){return Number(this.V5.viewportAnchorY)||0}set $O(t){this.V5.viewportAnchorY=t||0}get JO(){return this.V5.scroll||""}get Ca(){return this.hu||(this.hu=mE(this)),this.hu}constructor(t){this.V5=void 0,this.hu=void 0,this.V5=t}};var xM=class extends Xe{get U(){return this.M5.text}set U(t){this.M5.text=t}get Pt(){return this.M5.vertical||""}set Pt(t){this.M5.vertical=t||""}get BO(){return this.M5.snapToLines}set BO(t){this.M5.snapToLines=t}get IO(){return this.M5.line}set IO(t){this.M5.line=t}get Vy(){return Number(this.M5.size)}set Vy(t){this.M5.size=ur(t,0,100)}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}xa(){return hE(this)}GO(t){return lE(this,t)}constructor(t){super(t)}},IM=class extends xM{get DO(){return EM(this.M5.region)}get RO(){return this.M5.lineAlign||"start"}set RO(t){this.M5.lineAlign=t||"start"}get mo(){return this.M5.position}set mo(t){this.M5.position=t}get CO(){return this.M5.positionAlign||"auto"}set CO(t){this.M5.positionAlign=t||"auto"}get xO(){return this.M5.align||"center"}set xO(t){this.M5.align=t||"center"}constructor(t){super(t)}},RM=class extends xM{get DO(){return EM(this.U5)}get U5(){return function(t,i){if(void 0===i)return;const e=t&&t.regions;return e&&e.getRegionById(i)||void 0}(this.M5.track,this.M5.regionId)}get RO(){return function(t){return"middle"===t?"center":t}(this.M5.lineAlign||"start")}set RO(t){this.M5.lineAlign=function(t){return"center"===t?"middle":t}(t||"start")}get mo(){return this.M5.position}set mo(t){this.M5.position=function(t,i){return eE(t,i)}(t,this.xO)}get CO(){return function(t){return tE[t]}(this.M5.positionAlign||"middle")}set CO(t){this.M5.positionAlign=function(t,i){return $k[iE(t,i)]}(t||"center",this.xO)}get xO(){return function(t){return"middle"===t?"center":t}(this.M5.align||"middle")}set xO(t){this.M5.align=function(t){return"center"===t?"middle":t}(t||"center")}constructor(t){super(t)}};function CM(t,i){return t.U===i.U}function DM(t,i){if(0===i.length)return;const e=i.length-1;if(i[e].EOt.EO)return void(t.PO=s.EO);const n=nM(i,t,Sn);if(n>=0)return;const r=-(n+1),h=r-1;if(h>=0){i[h].EO=0&&t[n].EO===s;n--)t[n].PO=e}function NM(t){return zt(t)}r(),r(),r(),r();var MM=class extends Xe{get U(){return this.H5}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}xa(){return NM(this)}GO(t){return CM(this,t)}constructor(t,i){super(t),this.H5=void 0,this.H5=i}};function LM(t){switch(t){case 0:case 1:case 2:case 3:return!0}return!1}function OM(t){switch(t){case 0:return E;case 1:return tm;case 2:return so;case 3:return vr}}function FM(t,i){const e=i.ac,s=t.byteLength,n=ta(t);return i.Ny(s-e),gl(n,e,s).buffer}function UM(t,i){return{id:t||"",data:i instanceof ArrayBuffer?i:void 0}}function VM(t,i,e){const s=ua(t,i);if(!LM(s))return;const n=OM(s);return{id:e,language:Wc(t,i,3),description:n(t,i),text:n(t,i)}}function HM(t,i,e){const s=ua(t,i);if(!LM(s))return;const n=OM(s);return{id:e,mimeType:E(t,i),fileName:n(t,i),description:n(t,i),data:FM(t,i)}}function WM(t,i,e){const s=ua(t,i);if(!LM(s))return;const n=OM(s),r=[];for(;i.act.byteLength)break;c.push({text:e,timestamp:Cu(t,i)})}return{id:e,language:r,format:h,contentType:o,description:a,entries:c}}function zM(t,i,e){return{id:e,ownerIdentifier:E(t,i),identifier:FM(t,i)}}function GM(t,i,e){const s=ua(t,i);if(!LM(s))return;const n=OM(s);return{id:e,language:Wc(t,i,3),description:n(t,i),text:n(t,i)}}function XM(t,i,e){const s=ua(t,i);if(!LM(s))return;return{id:e,text:OM(s)(t,i)}}function jM(t,i,e){return{id:e,url:E(t,i)}}function QM(t,i,e){const s=ua(t,i);if(!LM(s))return;const n=OM(s);return{id:e,description:n(t,i),text:n(t,i)}}function KM(t,i,e){const s=ua(t,i);if(!LM(s))return;return{id:e,description:OM(s)(t,i),url:E(t,i)}}function YM(t,i,e){switch(e){case"COM":return VM(t,i,e);case"GEO":return HM(t,i,e);case"IPL":return WM(t,i,e);case"PIC":return function(t,i,e){const s=ua(t,i);if(!LM(s))return;const n=OM(s),r=Wc(t,i,3),h=ua(t,i),o=n(t,i);let a,u;return"--\x3e"===r?(a=r,u=E(t,i)):(a="image/"+r.toLowerCase(),u=FM(t,i)),{id:e,mimeType:a,pictureType:h,description:o,data:u}}(t,i,e);case"SLT":return qM(t,i,e);case"TXX":return QM(t,i,e);case"UFI":return zM(t,i,e);case"ULT":return GM(t,i,e);case"WXX":return KM(t,i,e);default:if("T"===e.charAt(0))return XM(t,i,e);if("W"===e.charAt(0))return jM(t,i,e)}}function JM(t,i,e){switch(e){case"APIC":return function(t,i,e){const s=ua(t,i);if(!LM(s))return;const n=OM(s),r=E(t,i),h=ua(t,i),o=n(t,i);let a;return a="--\x3e"===r?E(t,i):FM(t,i),{id:e,mimeType:r,pictureType:h,description:o,data:a}}(t,i,e);case"COMM":return VM(t,i,e);case"COMR":return function(t,i,e){const s=ua(t,i);if(!LM(s))return;const n=OM(s),r=E(t,i),h=Wc(t,i,8),o=E(t,i),a=ua(t,i),u=n(t,i),c=n(t,i);let d,l;return i.act.byteLength)return;return{o:Wc(t,i,3),Vy:Gp(t,i,3)}}(t,i);case 3:return function(t,i){if(i.ac+10>t.byteLength)return;const e=Wc(t,i,4),s=Cu(t,i);ua(t,i);const n=ua(t,i);return{o:e,Vy:s,SD:{X5:Lt(n,0),K5:Lt(n,1),groupingIdentity:Lt(n,2)}}}(t,i);case 4:return function(t,i){if(i.ac+10>t.byteLength)return;const e=Wc(t,i,4),s=ZM(t,i);ua(t,i);const n=ua(t,i);return{o:e,Vy:s,SD:{groupingIdentity:Lt(n,1),X5:Lt(n,4),K5:Lt(n,5),W5:Lt(n,6),Y5:Lt(n,7)}}}(t,i)}}function sL(t){const i=ta(t),e=new j(i.byteLength);let s=0;for(let t=0;t{this.h6=!1},50)),this.t6()}tV(t){t.Ht!==this&&(t.Ht=this,this._O.addCue(t.M5),this.o6())}WU(t){t.Ht===this&&(t.Ht=void 0,this._O.removeCue(t.M5),this.o6())}m5(t){var i;const e=null==(i=this._O.cues)?void 0:i.getCueById(t);if(!e)return;const s=cL(e);return s&&Pc(s)?s[0]:s}qU(t){this.a6>=t||(this.a6=t,St(this,t))}t6(){const t=this.Xk;this.n6||t!==xh.Kn?this.e6=t:this.e6=xh.JI}u6(){const t=this.Xk,i=this.e6;t!==i&&(this.n6||t!==xh.Kn||i!==xh.JI)&&("metadata"===this.Lt&&i===xh.Nh?this.Xk=t:this.h6&&i===xh.Nh&&t===xh.Kn?this.e6=t:this.Xk=i)}e5(t){this.t5!==t&&(this.t5=t,this.So(new uM(this,t)))}i6(t){const i=_.max(this.t5,this.s6,t);this.e5(i)}c6(t){let i=cL(t);if(i)return i;if(i=this.d6(t),Pc(i))for(const t of i)t.Ht=this;else i.Ht=this;return i}d6(t){const i=this.l6(t);return t.THEOplayerTextTrackCue=i,i}l6(t){return t.endTime{this.t6(),this._O.removeEventListener("cuechange",this._6)},this.o6=()=>{this.Xk!==xh.Nh&&(this.v6(),this.D5(),this._5.length&&this.i6(Zu.LOADING))},this.g6=()=>{this.i6(Zu.LOADED)},this.p6=()=>{this.i6(Zu.ERROR)},this.hS=t||Ys(),this._O=i,this.r6=s,this._O.addEventListener("cuechange",this._6),this._O.addEventListener("cuechange",this.o6),this.Z5=e,this.Z5&&(this.P5=fn(this.Z5.src),this.Z5.addEventListener("load",this.g6),this.Z5.addEventListener("error",this.p6)),this.gO=ki(),this.pO=i.label||"",this.p5=new aM(this._5),this.g5=new aM(this.k5),this.Xk=this.e6,ct(()=>{this.o6(),this.i6(Zu.NONE)})}};function cL(t){return null==t?void 0:t.THEOplayerTextTrackCue}r(),r();function dL(t,i){return gu(t.XF,i.XF)||function(t,i){return t.Ht===i.Ht?tf(hM(t),hM(i)):JP(t.Ht,i.Ht)}(t.TO,i.TO)||function(t,i){return t===i?Qc.rh:t===Me.zL?Qc.Ug:Qc.Fg}(t.type,i.type)}var lL=class{hr(){Yo(this.m6);for(const t of this.Gl.slice())this.it(t);this.w6(),this.y6=0,this.En=0,Yo(this.A6),this.b6=!1,this.S6=!1,this.T6=0}tt(t){pi(this.Gl,t)||(this.Gl.push(t),t.wn(Te.pa,this.k6),t.Xk!==xh.Nh&&this.E6())}it(t){oi(this.Gl,t)&&(t.mn(Te.pa,this.k6),t.Xk!==xh.Nh&&this.E6())}E6(){const t=this.A6,i=this.Gl.filter(t=>t.Xk!==xh.Nh);this.A6=i;for(const e of t)pi(i,e)||this.P6(e);for(const e of i)pi(t,e)||this.x6(e);this.T6=0}x6(t){if(t.wn(Te.hI,this.I6),t.wn(Te.aI,this.R6),t.wn(Te.cI,this.C6),t.L.V>0){for(const i of t.L.II)this.D6.push(i);this.B6()}}P6(t){if(t.mn(Te.hI,this.I6),t.mn(Te.aI,this.R6),t.mn(Te.cI,this.C6),t.L.V>0){for(const i of t.L.II)oi(this.m6,i),oi(this.D6,i);this.B6()}}N6(){this.oa.kx||this.oa.hx?this.w6():this.B6()}B6(){this.b6&&0!==this.A6.length&&(this.T6-this.oa.MP>.25*this.oa.ux||this.y6||(this.y6=this.L6.M6(this.O6)))}w6(){this.y6&&(this.L6.F6(this.y6),this.y6=0)}U6(t){var i,e;if(0===this.T6)return;const s=null!=(e=null==(i=t.Ht)?void 0:i.bU)?e:0,n=t.EO+s,r=t.PO+s,h=this.oa.MP,o=n<=h&&hi&&e-i<.1&&(n=!1),this.S6=!1;const r=[];let h=1/0;for(const i of t){const t=e-i.bU,s=i.D5(t,n)+i.bU;s=0;t--)pi(r,o[t])&&ka(o,t);const a=[];if(!n)for(let t=o.length-1;t>=0;t--){const s=o[t],n=s.Ht.bU;s.EO+n>i&&s.PO+n<=e&&(a.push(s),ka(o,t))}for(const t of this.D6)t.EO!==t.PO&&oi(a,t);Yo(this.D6);const u=[],c=[];for(const t of a)t.ro||u.push(new pM(t,t.EO)),u.push(new rc(t,_.max(t.EO,t.PO))),t.ro=!1;for(const t of o)t.ro&&(u.push(new rc(t,_.max(t.EO,t.PO))),t.ro=!1);for(const t of r)t.ro||(u.push(new pM(t,t.EO)),t.ro=!0);u.sort(dL);for(const t of u){const i=t.TO;i.So(t);const e=i.Ht;e&&(t.type===Me.zL?e.So(new yM(i)):e.So(new bM(i)),pi(c,e)||c.push(e))}c.sort(JP);for(const t of c)t.So(new TM(t));this.En=e,this.m6=r,this.T6=h}kn(){this.hr(),this.oa.mn(d._y,this.H6),this.oa.mn(d.uo,this.W6),this.oa.mn(Do.TM,this.H6),this.oa.mn(d.jw,this.H6),this.oa.mn(d.$w,this.q6),this.oa.mn(d.Zw,this.H6)}constructor(t,i){this.oa=void 0,this.L6=void 0,this.Gl=[],this.y6=0,this.En=0,this.m6=[],this.D6=[],this.A6=[],this.b6=!1,this.S6=!1,this.T6=0,this.O6=()=>{this.y6=0,this.V6(),this.N6()},this.H6=()=>{this.V6(),this.N6()},this.W6=()=>{this.b6=!0,this.H6()},this.q6=()=>{this.S6=!0,this.T6=0,this.w6()},this.k6=()=>{this.E6(),this.V6(),this.N6()},this.I6=t=>{const i=t.TO;pi(this.D6,i)||this.D6.push(i),this.U6(i),this.B6()},this.R6=t=>{const i=t.TO;oi(this.m6,i),oi(this.D6,i),this.U6(i),this.B6()},this.C6=t=>{const i=t.TO;this.U6(i),this.B6()},this.L6=i,this.oa=t,t.wn(d._y,this.H6),t.wn(d.uo,this.W6),t.wn(Do.TM,this.H6),t.wn(d.jw,this.H6),t.wn(d.$w,this.q6),t.wn(d.Zw,this.H6),this.B6()}};r();var ec=class{M6(t){return Is(t)}F6(t){Ii(t)}},fL=new ec,hu=class extends lL{constructor(t,i=fL){super(t,i)}};r(),r();var vL=class extends _h{get Ca(){return this.hu||(this.hu=NM(this)),this.hu}GO(t){return CM(this,t)}constructor(t,i,e){super(t,1/0,i,!1,e)}};r(),r();var _L=class extends gM{constructor(t,i,e=nh.DEFAULT){super(Ao.VU,"",i||"","",!1,e,!1,t)}},gL=class extends _L{tV(t){DM(t,this._5),super.tV(t)}xa(){return zh(this)}constructor(t,i){super(t,i),this.Km=nh.ID3}},pL=class extends gL{get o(){return this._O.id||""}get ZI(){return this._O.inBandMetadataTrackDispatchType||""}get bs(){return this._O.language||""}T5(t){super.T5(t),this.e6=this.Xk}get e6(){return AS(this._O.mode)}set e6(t){this._O.mode=t}get mO(){return this._O}tV(t){super.tV(t),t.M5.track!==this._O&&this._O.addCue(t.M5)}WU(t){super.WU(t),t.M5.track===this._O&&this._O.removeCue(t.M5)}qU(t){this.a6>=t||(this.a6=t,St(this,t))}i6(t){this.Ax=_.max(this.Ax,t)}v6(){const t=this._O.cues;if(!t)return;const i=t.length,e=[],s=[];for(let h=0;h=this.a6){var r;const t=null!=(r=null==i?void 0:i.THEOplayerTextTrackCue)?r:new mL(i);e.push(t)}else s.push(i)}ql(e,Sn);const h=oM(this.L.II.slice(),e);for(const t of s)this._O.removeCue(t);for(const t of h.v5)t.kn(),this.WU(t);for(const t of h.f5)this.tV(t)}kn(){this._O.removeEventListener("cuechange",this.o6),super.kn()}constructor(t){super(t.inBandMetadataTrackDispatchType,t.label),this._O=void 0,this.a6=0,this.o6=()=>{this.Xk!==xh.Nh&&(this.v6(),this.i6(Zu.LOADED))},this._O=t,this._O.addEventListener("cuechange",this.o6),this.Xk=this.e6,ct(()=>{this.o6()})}},mL=class extends vL{kn(){super.kn(),this.M5.THEOplayerTextTrackCue=void 0}constructor(t){super(t.startTime,aL(t.value),t.id),this.M5=void 0,this.M5=t,this.M5.THEOplayerTextTrackCue=this}};r(),r();var Du=[d.Pw,d.Ew,d.py,d.yy,d.LICENSE_REQUEST_GENERATED];r();var wL=class extends wp{get error(){return this.errorObject.message}get licenseAcquisitionURL(){return this.errorObject.url}get status(){return this.errorObject.status}get statusText(){return this.errorObject.statusText}get licenseAcquisitionMessage(){return this.errorObject.response}get systemCode(){return this.errorObject.systemCode}constructor(t){super(d.Ew),this.errorObject=void 0,this.errorObject=t}};r(),r(),r();var un=class extends wp{constructor(t){super(d.Pw),this.z6=void 0,this.z6=t}};r();var yL=class extends wp{constructor(t){super("wy"),this.z6=void 0,this.z6=t}},AL=new te,bL=class extends wp{constructor(t){super("Xs"),this.session=void 0,this.session=t}},SL=class extends Ne{get G6(){return this.X6}vS(){return this.j6=!0,AL.Zo(t=>this.Q6(t),this.nT.Yg)}async Q6(t){try{ii(t),await this.K6.KV(t);const i=await this.K6.YV(this.Y6.Jm,this.Y6.Ey,t);await this.J6.vS(this.Y6.Jm,this.Y6.Ey,i)}catch(t){sa(t);const i=t instanceof dn?t.Yy:void 0,e=new fs(Vo.CONTENT_PROTECTION_INTERNAL_ERROR,"Error while performing the CDM request",t,void 0,void 0,void 0,void 0,i);throw this.Ts(e),e}}async eH(t,i){let e;try{e=function(t){return lm(t,wm())}(t)?await this.K6.dH(new j(t),this.nT.Yg):await this.K6.lH(new j(t),i,this.nT.Yg)}catch(t){if(D(t))return;throw t}if(this.nT.Yg.Hg)return;const s=this.Z6,n=new pa;this.Z6=n;try{await this.J6.er(e),await Er(100)}catch(t){const i=t instanceof dn?t.Yy:void 0;throw new fs(Vo.CONTENT_PROTECTION_INTERNAL_ERROR,"Error while applying license response",t,void 0,void 0,void 0,void 0,i)}finally{void 0!==s&&await s.Qy,n.Xy(),this.Z6===n&&(this.Z6=void 0)}}Ts(t){const i=t instanceof fs?t:new fs(Vo.CONTENT_PROTECTION_ERROR,t.message,t);this.So(new wL(i)),this.Xs()}t8(){this.J6.mn("Py",this.yS),this.J6.mn(d.yy,this.i8),this.J6.mn("lt",this.e8),this.s8=!1,this.X6=!1,this.nT.Zg(),this.So(new bL(this))}async Xs(){let t;this.Vo();do{t=this.Z6,void 0!==t&&await t.Qy}while(this.Z6!==t);this.t8(),await this.J6.Xs().catch(Ct)}constructor(t,i,e){super(),this.J6=void 0,this.K6=void 0,this.Y6=void 0,this.j6=void 0,this.s8=void 0,this.nT=void 0,this.Z6=void 0,this.X6=void 0,this.yS=void 0,this.i8=void 0,this.e8=void 0,this.J6=t,this.K6=i,this.Y6=e,this.j6=!1,this.s8=!1,this.nT=new at,this.X6=!1,this.yS=t=>{if(!this.nT.Yg.Hg)switch(t.Iy){case"license-request":case"license-renewal":this.eH(t.Py,t.Ry).catch(t=>this.Ts(t));break;default:this.Ts(new fs(Vo.CONTENT_PROTECTION_NOT_SUPPORTED,"Unsupported CDM message type: "+t.Iy))}},this.i8=t=>{this.J6.Ty.zy((t,i)=>{switch(t){case"usable":zd.Og(()=>{this.s8=!0,this.So(new un(i))},100);break;case"expired":case"status-pending":default:break;case"output-restricted":case"internal-error":this.So(new yL(i))}}),this.X6=!0,this.So(t)},this.e8=t=>{this.Ts(new fs(Vo.CONTENT_PROTECTION_INTERNAL_ERROR,"Unknown CDM error"))},t.wn("Py",this.yS),t.wn(d.yy,this.i8),t.wn("lt",this.e8),t.oS.then(()=>this.t8(),t=>this.Ts(t))}},TL=class extends Ne{get kS(){return this.mS}get n8(){return this.r8.every(t=>t.G6)}QV(){return this.h8.QV()}o8(t){return this.a8||(this.a8=this.u8(t)),this.a8}async u8(t){ii(t);const i=await this.h8.dH(new j(wm()),t);if(ii(t),!this.TS)throw new m("Invalid MediaKeys when setting ServerCertificate");await this.TS.ES(i.buffer)}async c8(t){if(!this.TS)throw new m("Invalid MediaKeys when creating KeySession");try{this.d8.push(t);const i=await this.TS.SS("temporary"),e=new SL(i,this.h8,t);return this.r8.push(e),e.wn(Du,this.l8),e.wn("Xs",this.f8),e}finally{oi(this.d8,t)}}v8(t){if(t._8)return!1;for(const i of this.r8)if(kL(i.Y6,t))return!0;for(const i of this.d8)if(kL(i,t))return!0;return!1}async kn(){this.TS=void 0,this.Vo();const t=this.r8.slice();Yo(this.r8),await Promise.all(t.map(t=>t.Xs())),this.g8=void 0,this.h8.zg()}constructor(t,i,e){super(),this.mS=void 0,this.TS=void 0,this.h8=void 0,this.r8=[],this.a8=void 0,this.d8=[],this.g8=void 0,this.l8=t=>{if(t.type===d.yy)return null!=this.g8||(this.g8=new mm),t.Ty.zy((t,i)=>{this.g8.qy(i,t)}),void(this.n8&&this.So(new cr(this.g8)));this.Rs(t)},this.f8=t=>{t.session.mn(Du,this.Rs),t.session.mn("Xs",this.f8),oi(this.r8,t.session),this.g8=void 0},this.mS=t,this.TS=i,this.h8=e}};function kL(t,i){if(t._8)return!1;if(t.Jm!==i.Jm)return!1;if(lm(t.Ey,i.Ey))return!0;if("sinf"===t.Jm&&"sinf"===i.Jm){const i=EL(t),e=EL(t);if(i&&e)return lm(i,e)}return!1}function EL(t){try{const i=vr(dh(new j(t.Ey)),new Ui),e=JSON.parse(i).sinf[0],s=new j(wu(e)),n=new lc(dh(s),new Ui);return jt.rN(n).mN.yN.SN}catch(t){return}}var PL=class extends Ne{get p8(){var t;return null==(t=this.mS)?void 0:t.kS}get Eq(){return this.h8}set Eq(t){this.h8=t}Un(t,i){this.iq=t,this.EZ(i)}EZ(t){this.YS=t,this.m8(this.nT.Yg).catch(yf)}xZ(t){this.w8(t,this.nT.Yg).catch(yf)}async w8(t,i){var e,s;ii(i);var n;if(null==(e=this.YS)?void 0:e.aq)for(const e of null!=(n=null==(s=this.YS)?void 0:s.aq)?n:[]){var r;const s=Jr(t,t=>t.y8===e.kS.$m);if(void 0!==(null==s?void 0:s.A8)&&!(null==(r=e.BW)?void 0:r.some(t=>lm(s.A8,t))))try{return void await this.b8(e.kS.Jm,s.A8,i)}catch(t){sa(t)}}}async m8(t){if(!zd.Zs.gp||!await this.S8(t))return this.YS&&this.YS.T8?await this.k8(t):void 0}async S8(t){var i,e;if(!(null==(i=this.YS)?void 0:i.aq))return!1;let s=!1;var n;for(const i of null!=(n=null==(e=this.YS)?void 0:e.aq)?n:[]){if(i.MW&&0!==i.MW.length){try{const e={kids:i.MW.map(t=>t.id)},n=br(JSON.stringify(e)).buffer;await this.b8(Fg,n,t),s=!0}catch(t){sa(t)}if(s)return!0}var r;for(const e of null!=(r=i.BW)?r:[])try{await this.b8(i.kS.Jm,e,t),s=!0}catch(t){sa(t)}if(s)return!0}return!1}E8(t){return t===Mg||t===Og||t===Lg||t===Fg}async b8(t,i,e){if(ii(e),!i.byteLength)return;if(!this.YS||!this.YS.aq.length)throw new fs(Vo.CONTENT_PROTECTION_CONFIGURATION_MISSING,"Missing configuration for encrypted content");if(!this.E8(t))return void 0;const s=TT(t,i),n=this.YS.aq;let r;const h=[];for(const i of n){ii(e);const n=s[i.kS.Zm];if(n&&i.kS.Jm===t)try{const t=await this.P8(i,e);t.QV()&&await t.o8();const s=this.TL.KP,r={Jm:i.kS.Jm,Ey:n,_8:s};if(h.push(!0),this.x8(t,r)){const i=await t.c8(r);await i.vS(),this.So(new bp(n))}return}catch(t){sa(t),r=t}else i.kS.Km===an.Xm&&h.push(!1)}if(0===h.length||h.some(jo))throw await zd._m()?new fs(Vo.CONTENT_PROTECTION_NOT_SUPPORTED,"Encrypted content over an insecure connection is not supported",r):new fs(Vo.CONTENT_PROTECTION_NOT_SUPPORTED,"Cannot create content decryption session",r)}async k8(t){var i;const e=null==(i=this.YS)?void 0:i.aq;if(e)for(const i of e){ii(t);try{const e=await this.P8(i,t);return void(e.QV()&&await e.o8())}catch(t){sa(t)}}}x8(t,i){return zd.Zs._p||this.TL.CL.RL||!t.v8(i)}P8(t,i){return this.ta.Zo(i=>this.I8(t,i),i)}async I8(t,i){if(ii(i),!this.YS||!this.h8||!this.iq)throw new m("Not initialized");if(this.mS){if(this.mS.kS!==t.kS)throw new m("Internal key system error");return this.mS}const e=this.h8,s=Mo({},t,{Mq:t.Mq.map(i=>{var s;return Mo({},i,{persistentState:null!=(s=i.persistentState)?s:e._H(t.kS),MS:i.MS||e.MS(t.kS)})})}),n=await this.iq.bZ(s.kS,s.Mq),r=e.DW(s),h=new TL(s.kS,n,r);return h.wn(Du,this.Rs),this.mS=h,h}Ts(t){if(D(t))return;const i=t instanceof fs?t:new fs(Vo.CONTENT_PROTECTION_ERROR,t.message,t);this.So(new wL(i))}async hr(){this.iq=void 0,this.YS=void 0,this.nT.Zg(),this.nT=new at,await this.C8()}async C8(){await this.ta.Zg();const t=this.mS;t&&(t.mn(d.py,this.Rs),this.mS=void 0,await t.kn())}async zg(){this.Vo(),this.TL.mn(_r.Dw,this.D8),await this.hr(),await this.ta.kn()}constructor(t){super(),this.TL=void 0,this.nT=new at,this.ta=new te,this.YS=void 0,this.h8=void 0,this.iq=void 0,this.mS=void 0,this.D8=t=>{this.b8(t.Jm,t.Ey,this.nT.Yg).catch(t=>this.Ts(t))},this.TL=t,this.TL.wn(_r.Dw,this.D8)}};r();var xL=class extends wp{constructor(t){super(d.Vw),this.currentTime=void 0,this.currentTime=t}};r();var IL=class extends Ne{get Ax(){return void 0!==this.B8?this.B8.Ax:mh.VL}e5(){var t;null==(t=this.B8)||t.e5()}hr(){var t;null==(t=this.B8)||t.hr()}zg(){this.Vo(),void 0!==this.B8&&(this.B8.zg(),this.B8=void 0)}N8(t){if(this.B8===t)return;const i=this.Ax;void 0!==this.B8&&this.B8.zg(),this.B8=t,void 0!==t&&(t.wn(Do.wI,this.Rs),t.e5());const e=this.Ax;i!==e&&this.So(new ou(this.M8.MP,e))}constructor(t){super(),this.M8=void 0,this.B8=void 0,this.M8=t}};r();var RL=class extends gM{get Ca(){var t;return null!=(t=this.hu)?t:this.hu=CL(this)}L8(t,i,e){const s=new fE(t,i,e,!1);return this.tV(s),s}O8(t){this.WU(t)}constructor(t,i,e){super(t,i,"",e,void 0,nh.WEBVTT)}};function CL(t){return po(zh(t),{get type(){return t.Km},addCue:(i,e,s)=>t.L8(i,e,s).Ca,removeCue(i){t.O8(i.kO)}})}r();var DL=class extends uL{get Ca(){var t;return null!=(t=this.hu)?t:this.hu=CL(this)}L8(t,i,e){const n=this.d6(new s.VTTCue(t,i,e));return this.uE?this.tV(n):this.F8.push(n),n}O8(t){oi(this.F8,t),this.WU(t)}kn(){var t;super.kn(),null==(t=this.Z5)||t.removeEventListener("load",this.U8),Yo(this.F8)}constructor(t,i,e){var s;super(t,i,e),this.uE=!1,this.F8=[],this.U8=()=>{var t;null==(t=this.Z5)||t.removeEventListener("load",this.U8),this.uE=!0;for(const t of this.F8)this.tV(t);Yo(this.F8)},null==(s=this.Z5)||s.addEventListener("load",this.U8),this.Km=nh.WEBVTT}};function BL(t,i){if(void 0!==t.Q3!==i.L4.some(t=>I(t.qT)))return!1;return void 0!==t.K3===i.L4.some(t=>tt(t.qT))}r();var NL=Qt.N_||Qt.L_,ML=Qt.Cg,LL=Qt.X_,OL=Qt.X_&&Qt.ru,FL=class extends Ne{get n5(){return this.V8}get IP(){return this.iq?this.iq.IP:ve.iL()}get CP(){const t=this.nq;if(!t||S(t.getTime()))return;const i=1e3*this.MP;return new Date(t.getTime()+i)}get nq(){if(this.$W.getStartDate)return this.Sz&&this.H8||(this.H8=this.$W.getStartDate()),this.H8}get MP(){return this.W8?this.W8.MP:void 0!==this.q8?this.q8:this._T.currentTime}get Wu(){return this.sc}get ct(){return this.W8?this.W8.ct:this.iq?this.iq.ct:this._T.duration}get UP(){return this.kx?this.z8():this.W8?this.W8.UP:this._T.ended||this.G8}z8(){return void 0!==this.q8&&this.ct===this.q8}get lt(){return this.JW}get $W(){return this._T}get hx(){return this.X8?this.j8:this.W8?this.W8.hx:this._T.paused}get _x(){return this.Ho.OM(ve.jn(this._T.played))}get Mi(){return this._T.offsetHeight*zd.Zs.fp}get Ti(){return this._T.offsetWidth*zd.Zs.fp}get Ma(){return this.ha}get mq(){return this.ea}get Ax(){return this.Q8.Ax}get Sx(){return this.iq?this.iq.Sx:ve.iL()}get kx(){return this.W8?this.W8.kx:this.Sz||this._T.seeking&&!this.J4}get Y4(){return this.W8?this.W8.Y4:this.J4}get a5(){return 0!==this.K8}get $P(){return this.W8?this.W8.$P:this._T.muted}set $P(t){this.W8?this.W8.$P=t:(this._T.muted=t,this.Y8())}get ux(){return this.W8?this.W8.ux:void 0!==this.J8?this.J8:this._T.playbackRate}set ux(t){this.W8?this.W8.ux=t:this.hx||this.V8?(this.J8=t,this.Z8()):(this.J8=void 0,this._T.playbackRate=t,this.Z8())}Z8(){const t=this.ux;this.t7!==t&&(this.t7=t,this.So(new aa(this.MP,t)))}get i7(){return this.yz}get Mx(){return this.W8?this.W8.Mx:this._T.volume}set Mx(t){this.W8?this.W8.Mx=t:(this._T.volume=t,this.Y8())}Y8(){const t=this.Mx,i=this.$P;this.e7===t&&this.s7===i||(this.e7=t,this.s7=i,this.So(new Ze(this.MP,this.Mx)))}ZP(){return tB(this._T)}Gx(){this.n7||(this.n7=!0);const t=this.r7();return this.h7(),t}h7(){this.X8?this.j8&&(this.j8=!1,this.So(new Tc(this.MP))):this.o7()}o7(){if(this.W8)this.W8.Gx();else{Qt.X_&&!Qt.ru&&this._T.preload===q.lz&&(this._T.preload=q.VU);const t=this.ux,i=this._T.play();t!==this.$W.playbackRate&&(this.ux=t),this.G8=!1,ih(i)?i.then(this.a7,this.u7):this.d7.u5()&&this.l7()}}zx(){this.X8?this.j8||(this.j8=!0,this.So(new hl(this.MP))):this.f7()}f7(){this.W8?this.W8.zx():(this._T.pause(),this.d7.er()),this.v7(new dt)}r7(){const t=new pa;return this._7.push(t),t.Qy}g7(){for(const t of this._7)t.Xy(void 0);Yo(this._7)}v7(t){for(const i of this._7)i.jy(t);Yo(this._7)}l7(){this.X8||this.W8||this.g7()}p7(t){this.X8||this.W8||this.v7(t)}My(t,i,e){void 0===i&&(i=!1),void 0===e&&(e=!1),this.W8?this.W8.My(t,i,e):(this.m7.Zg(),this.m7=new at,this.w7=$e(this.y7(t,i,e,this.w7,this.m7.Yg),this.m7).catch(Ct))}KW(t){const i=this.nq;if(!i||S(i.getTime()))return;const e=(t.getTime()-i.getTime())/1e3;this.My(e)}async y7(t,i,e,s,n){try{if(this.q8=t,this.A7=t,this.b7=zd.Mg(),e&&!this.Sz?this.J4=!0:(this.Sz=!0,this.J4=!1),this.G8&&!this.z8()&&(this.G8=!1),this.J4?(this.So(new qN(this.MP)),(Qt.w_||Qt.S_)&&(t+=.05)):this.So(new F(t)),await s.catch(Ct),ii(n),this.iq&&!this.iq.jZ())return void this.S7();for(this.T7&&this.k7(),this.Q8.Ax===mh.VL&&await this.Q8.ww(Do.wI,n);0===this._T.seekable.length||OL&&!this.n7;){const t={stack:[],error:void 0,hasError:!1};try{const i=Be(t,at.ep([n]),!1);await Promise.race([Lb(this._T,"timeupdate",i.Yg),Er(100,i.Yg)]),ii(n)}catch(i){t.error=i,t.hasError=!0}finally{Cs(t)}}let h=BN(this.IP,t,.05),o=this.Sx,a=!0,u=!1;for(;;){const t={stack:[],error:void 0,hasError:!1};try{var r;if(o=this.Sx,o.V>0&&!o.Cr(h)&&(h=o.DM(h),a=!0),i&&(zd.Zs.Dp||!this._T.fastSeek)){const t=this.IP;if(!t.Cr(h)){const i=BN(t,h,1);i!==h&&(h=i,a=!0)}}if(LL){const t=this.E7();void 0!==t&&h>t&&(h=t,a=!0)}if(!u){const t=this.P7();void 0!==t&&h>t&&(u=!0,await this.x7(t,!1,n),await Lb(this._T,"seeked",n),ii(n),a=!0)}if(a){a=!1,await this.x7(h,i,n),ii(n);let t=this.MP;o=this.Sx,h=o.DM(h);let e=1;for(;_.abs(h-t)>=yt;)o=this.Sx,h=VL(h,o,e),await this.x7(h,i,n),ii(n),t=this.MP,e++}if(!(this._T.seeking||this.Q8.Ax{WL(t)&&(t.removeEventListener("cuechange",e),this.L7.tt(new uL(t.id,t,i)))};t.addEventListener("cuechange",e),t.mode=xh.JI}q7(t){const i=this._T.getElementsByTagName("track");for(let e=0;e{if(ii(i),this.iq)throw new m("Already loaded a media source");let e;if(t.Km===Zr.mV)e=new EB(t,this,this.PZ,this.hw,this.VJ),this.T7=!1,this.Q8.N8(this.j7());else{if(t.Km!==Zr.wV)throw new m("Unsupported configuration");{this.T7=NL;const i=this.j7();e=new HN(t,this,i,this.PZ,this.hw,void 0,this.E4,this.VJ),this.Q8.N8(i),ML&&(this.wn(d._y,this.Q7),this.Q8.wn(Do.wI,this.K7))}}return this.iq=e,await e.VY(),e})}j7(){return this.T7?new ZN(this):new YN(this)}Y7(){if(this.V8)return;const t=this.ux;this.V8=!0,this.ux=t,this._T.playbackRate=0,this.Q8&&this.Q8.e5()}J7(){if(!this.V8)return;const t=this.ux;this.V8=!1,this.ux=t,this.Z7()}Z7(){this._T.currentTime=this._T.currentTime,this.Q8&&this.Q8.e5()}t9(){this.Sz=!1,this.J4=!1,this.D7=!1,zd.Lg(this.K8),this.K8=0,this.Ho=ve.iL(),this.m7.Zg(),this.q8=void 0,this.A7=NaN,this.H8=void 0,this.T7=!1,this.X8=!1,this.JW=void 0,this.G8=!1,this.i9=void 0,this.G7=0,this.e9=!1,this.n7=!1,this.s9&&(this.n9(),this.s9=!1),this.v7(new dt),this.Q8.N8(new YN(this)),this.d7.hr(),this.L7.hr(),this.J7(),ML&&(Ii(this.r9),this.r9=0,this.mn(d._y,this.Q7))}async hr(){this.t9(),await this.X7.Zg(),await this.X7.Zo(async()=>{this.iq&&(await this.iq.zg(),this.iq=void 0,Qt.w_&&Qt.A_<3&&this.h9())})}async C8(){const t=this.iq;if(void 0===t||!AB(t)||void 0!==this.JW)throw new g("Invalid state");this.t9(),this._T.pause(),this._T.currentTime=0,await this.X7.Zo(()=>async function(t){t.A3();const i=[t.Q3,t.K3].filter(it);await Promise.all(i.map(t=>t.r3(0,1/0))),t.C4(NaN)}(t))}h9(){this.o9();const t=this._T,i=t.parentElement,e=t.tagName.toLowerCase();this._T=xf(e),this.retainMediaElementState(t),If(t),null==i||i.replaceChild(this._T,t),this.n9(),this.Q8.N8(this.j7()),this.d7.mn(Do.TM,this.a9),this.d7.zg(),this.d7=new iM(this),this.d7.wn(Do.TM,this.a9),this.yz?this.be():this.we(),this.So(new lt),this.So(new Sk)}retainMediaElementState(t){this.$W.muted=t.muted,this.$W.volume=t.volume}async zg(){this.s9=!1,this.o9(),this.Tq(),await this.hr(),await this.X7.kn(),this.d7.zg(),this.Q8.zg(),await this.PZ.zg(),this.Aq(),this.Gl.kn(),this.L7.kn(),this.B7.kn(),this.Vo()}n9(){this.$W.addEventListener("play",this.u9),this.$W.addEventListener("pause",this.c9),this.$W.addEventListener("timeupdate",this.d9),this.$W.addEventListener("progress",this.l9),this.$W.addEventListener("loadstart",this.f9),this.$W.addEventListener("ended",this.v9),this.$W.addEventListener("ratechange",this._9),this.$W.addEventListener("volumechange",this.g9),this.$W.addEventListener("durationchange",this.p9),this.$W.addEventListener("resize",this.m9),this.$W.addEventListener("loadedmetadata",this.m9),this.$W.addEventListener("error",this.w9),this.$W.addEventListener("emptied",this.y9),this.$W.addEventListener("seeked",this.A9),this.$W.addEventListener("seeking",this.b9),vp()?(this._T.addEventListener("encrypted",this.S9),this._T.addEventListener("waitingforkey",this.T9)):void 0!==s.WebKitMediaKeys&&"function"==typeof s.WebKitMediaKeys.isTypeSupported?this._T.addEventListener("webkitneedkey",this.k9):_p()?this._T.addEventListener("webkitneedkey",this.E9):void 0!==s.MSMediaKeys&&"function"==typeof s.MSMediaKeys.isTypeSupported&&this._T.addEventListener("msneedkey",this.P9)}o9(){this.$W.removeEventListener("play",this.u9),this.$W.removeEventListener("pause",this.c9),this.$W.removeEventListener("timeupdate",this.d9),this.$W.removeEventListener("progress",this.l9),this.$W.removeEventListener("loadstart",this.f9),this.$W.removeEventListener("ended",this.v9),this.$W.removeEventListener("ratechange",this._9),this.$W.removeEventListener("volumechange",this.g9),this.$W.removeEventListener("durationchange",this.p9),this.$W.removeEventListener("resize",this.m9),this.$W.removeEventListener("loadedmetadata",this.m9),this.$W.removeEventListener("error",this.w9),this.$W.removeEventListener("encrypted",this.S9),this.$W.removeEventListener("waitingforkey",this.T9),this.$W.removeEventListener("webkitneedkey",this.k9),this.$W.removeEventListener("webkitneedkey",this.E9),this.$W.removeEventListener("msneedkey",this.P9),this.$W.removeEventListener("emptied",this.y9),this.$W.removeEventListener("seeked",this.A9),this.$W.removeEventListener("seeking",this.b9)}x9(){this.W8||(this.Ho=this._x,this.W8=XN(this),this.o9(),this.W8.wn(zN,this.Rs))}I9(){if(!this.W8)return;const t=this.W8;this.W8=void 0,this.Q8.e5(),jN(this,t),t.zg(),this.n9()}C7(){const t=this.MP;this.So(new Si(t,void 0)),this.i9=t}sJ(){this.G8||!this.UP||this.kx||(this.G8=!0,this.So(new At(this.MP)))}qq(t){this.JW=t,this.v7(this.JW),this.So(new eu(this.JW))}get KP(){return Boolean(this._T.webkitCurrentPlaybackTargetIsWireless)}get R9(){return this.C9}get CL(){return Mo({},wB)}D9(){this.C9||(Cf(this._T,zd.Zs),this.C9=!0)}B9(t){t.appendChild(this._T)}P3(){ML&&this.Q7(),this.Q8.e5()}get Eq(){return this.PZ.Eq}set Eq(t){this.PZ.Eq=t}get N9(){return this.E4}set N9(t){this.E4=t}get p8(){return this.PZ.p8}Yx(){this.PZ.C8().catch(Ct),this.L7.hr()}get Vx(){return this.e9}set Vx(t){this.e9=t,this.s9&&!this.e9&&(this.s9=!1,this.n9())}constructor(t,i,e,s,n){super(),this._T=void 0,this.sc=void 0,this.VJ=void 0,this.JW=void 0,this.yz=!0,this.iq=void 0,this.X7=new te,this.W8=void 0,this.Q8=void 0,this.d7=void 0,this.PZ=void 0,this.ha=new ls,this.ea=new aR,this.Gl=void 0,this.Dz=void 0,this.O7=[],this.L7=void 0,this.B7=void 0,this.N7=void 0,this.q8=void 0,this.b7=0,this.A7=NaN,this.H8=void 0,this.D7=!1,this.i9=void 0,this.G7=0,this.Sz=!1,this.J4=!1,this.M9=mh.VL,this.K8=0,this.w7=Promise.resolve(),this.m7=new at,this._7=[],this.Ho=ve.iL(),this.J8=void 0,this.t7=1,this.s7=!1,this.e7=1,this.G8=!1,this.e9=!1,this.s9=!1,this.T7=!1,this.hw=void 0,this.X8=!1,this.j8=!1,this.V8=!1,this.C9=!1,this.r9=0,this.E4=void 0,this.n7=!1,this.F7=t=>{const i=t.track,e=this.q7(i);if(!HL(this.L7,i)){if(Qt.X_){if(i.kind===Ao.VU)return void this.H7(i);if(i.kind===Ao.FU&&""===i.label&&""===i.language&&!WL(i))return void this.W7(i,e)}this.L7.tt(new uL(i.id,i,e))}},this.U7=t=>{const i=HL(this.L7,t.track);i&&this.L7.it(i)},this.V7=()=>{for(let t=0;t{if(void 0===this.iq||!AB(this.iq))return;if(this.hx)return;const t=this.iq,i=t.Q3,e=t.K3;if(!i||!e)return;if(t.WZ)return void this.J7();if(t.Ax===VN._3)return;const s=i.IP,n=e.IP;if(0===s.V&&0===n.V)return void this.J7();const r=this.MP;if(r{this.r9=0,this.Q7()},this.K7=()=>{if(this.kx||this.Y4)return;if(this.Q8.Ax>=mh.WL)return;if(void 0===this.iq||!AB(this.iq))return;const t=this.iq,i=t.Q3,e=t.K3;if(!i||!e)return;const s=this.MP,n=i.IP,r=e.IP;if(!n.Cr(s)||!r.Cr(s))return;n.FM(r).qM(s-5,s)&&(this.V8?this.J7():this.Z7())},this.u9=()=>{this.So(new Tc(this.MP))},this.c9=()=>{this.p7(new dt),this.So(new hl(this.MP))},this.a9=()=>{this.l7(),this.So(new ce(this.MP))},this._9=()=>{this.Z8()},this.p9=()=>{this.So(new Rs(this.ct))},this.l9=()=>{this.So(new H(this.MP))},this.f9=()=>{this.So(new Pt)},this.A9=()=>{this.Sz||this.J4||this.D7?this.D7=!1:this.So(new Es(this.MP))},this.b9=()=>{this.I7(this.MP),this.D7=!1},this.d9=()=>{const t=this.MP,i=this.kx,e=this.Q8.Ax{this.sJ()},this.w9=()=>{if(null!==this._T.error){const i=this._T.error;var t;this.qq(new Nk(null!=(t=i.code)?t:Bk.DECODE,i.message||"Error decoding media",void 0,i.msExtendedCode))}},this.y9=()=>{this.e9&&(this.o9(),this.s9=!0)},this.O9=t=>{if(zd.Lg(this.K8),this.K8=0,t.readyState<=mh.HL)if(this.Sz||this.J4){const i=zd.Mg()-this.b7;if(i<250)return void(this.K8=zd.Og(()=>this.O9(t),250-i))}else if(void 0!==this.iq&&this.iq.XZ(this.MP))return void(this.K8=zd.Og(()=>this.O9(t),250));this.M9!==t.readyState&&(this.M9=t.readyState,this.So(t))},this.g9=()=>{this.Y8()},this.m9=()=>{this.Bx>0&&this.Rx>0&&this.So(new ts)},this.S9=t=>{this.So(new Tp(t.initDataType,t.initData||new ArrayBuffer(0)))},this.T9=()=>{this.So(new kp)},this.P9=t=>{const i=t.initData,e=i?Gu(i).buffer:new ArrayBuffer(0);this.So(new Tp(Mg,e))},this.k9=t=>{if(t.initData){const i=function(t){try{const i=dh(t),e=new Ui,s=T(i,e,Cu(i,e,!0));return vc(sm(s,!0))}catch(t){return}}(t.initData);if(!i)return;this.So(new Tp(Og,i))}else this.So(new Tp(Og,new ArrayBuffer(0)))},this.E9=t=>{const i=t.initData,e=i?Gu(i).buffer:new ArrayBuffer(0);this.So(new Tp(Mg,e))},this.a7=()=>{this.l7()},this.u7=t=>{this.p7(t)},this.F9=t=>{this.So(t),t.type===d.Ew&&this.qq(P(t.errorObject))},this._T=t,this.hw=i,this.sc=e,this.Dz=s,this.VJ=n,this.Q8=new IL(this),this.Q8.wn(Do.wI,this.O9),this.Q8.N8(new YN(this)),this.d7=new iM(this),this.d7.wn(Do.TM,this.a9),this.PZ=new PL(this),this.PZ.wn(Du,this.F9),this.Gl=new cc,this.L7=new cc,this.B7=new Yu([this.Gl,this.L7]),this.N7=new hu(this),this.n9(),this.Lq()}};var UL=.01;function VL(t,i,e){if(void 0===e&&(e=0),!i.V)return 0;let s=i.DM(t);const n=UL*e;return s===i.Tn(0)?s+=n:s===i.An(i.V-1)&&(s-=n),s}function HL(t,i){for(const e of t.II)if(e.mO===i)return e}function WL(t){return!!t.cues&&t.cues.length>0}r();var qL={ZJ:void 0,$J:void 0,tZ:void 0,iZ:void 0,eZ:void 0,sZ:void 0,nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0},zL=class extends Ne{get Ca(){return this.hu||(this.hu=fB(this)),this.hu}get ZJ(){}get $J(){}get tZ(){}get iZ(){}get eZ(){}get sZ(){}get U9(){}get nZ(){}get rZ(){}get hZ(){}get oZ(){}constructor(...t){super(...t),this.hu=void 0}},GL=class extends FL{Wx(){}get Rx(){return 0}get Bx(){return 0}constructor(t,i,e,s){super(t,i,e,new zL,s)}};r(),r();var XL=class{get xe(){return this.V9}we(){this.V9.style.display="none"}be(){this.V9.style.display="block"}B9(t){t.appendChild(this.V9)}kn(){os(this.V9)}constructor(t=5){this.V9=void 0;const i=s.document.createElement("div");i.className="theoplayer-texttracks",i.style.position="absolute",i.style.display="none",i.style.overflow="hidden",i.style.pointerEvents="none",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.width="100%",i.style.height="100%",i.style.lineHeight="1.3em",i.style.zIndex=""+t,this.V9=i,this.be()}};function jL(t,i){return Mo({},i,cS(function(t){return{ZJ:t.ZJ,$J:t.$J,tZ:t.tZ,iZ:t.iZ,eZ:t.eZ,sZ:t.sZ,nZ:t.nZ,rZ:t.rZ,hZ:t.hZ,oZ:t.oZ}}(t)))}function QL(t){return t.tZ&&Ju(t.tZ,"%")?Number(t.tZ.replace("%",""))/100:t.tZ&&Ju(t.tZ,"em")?Number(t.tZ.replace("em","")):1}r(),r(),r(),r(),r();var KL=class t{get H9(){return this.W9+this.Ti}set H9(t){this.W9=t-this.Ti}get q9(){return this.z9+this.Mi}set q9(t){this.z9=t-this.Mi}G9(t){return this.W9t.W9&&this.z9t.z9}fO(t){return this.W9<=t.W9&&t.H9<=this.H9&&this.z9<=t.z9&&t.q9<=this.q9}Ly(){return new t(this.W9,this.z9,this.Ti,this.Mi)}X9(i){const e=this.W9+i,s=this.z9+i,n=_.max(0,this.Ti-2*i),r=_.max(0,this.Mi-2*i);return new t(e,s,n,r)}j9(i){const e=_.min(this.W9,i.W9),s=_.max(this.H9,i.H9),n=_.min(this.z9,i.z9),r=_.max(this.q9,i.q9);return new t(e,n,s-e,r-n)}constructor(t,i,e,s){this.W9=void 0,this.z9=void 0,this.Ti=void 0,this.Mi=void 0,this.W9=t,this.z9=i,this.Ti=e,this.Mi=s}},YL=class{Q9(t){const i=this.K9(t);if(!i)return!1;for(const t of i)os(t);return this.Y9(t),!0}get Ht(){return this.FO}get $W(){return this._T}get Wu(){return this.sc}get J9(){return this.Z9}get ttt(){return this.itt}VY(){this.ett(),this.FO.L.II.forEach(t=>this.tV(t)),this.Wu.wn(Rh.yn,this.stt),this.oe(this.Wu.Eu,this.Wu.Iu)}ntt(t){this.itt=t,this.Z9=jL(this.itt,this.htt),this.Z9.ZJ&&(this.$W.style.fontFamily=this.Z9.ZJ),this.oe(this.Wu.Eu,this.Wu.Iu),this.ott(!0)}att(){return this.Z9}utt(t){return this.ctt.has(t.jI)}ett(){this.FO.wn(Te.hI,this.dtt),this.FO.wn(Te.aI,this.ltt),this.FO.wn(Te.pa,this.ftt)}_tt(){this.FO.mn(Te.hI,this.dtt),this.FO.mn(Te.aI,this.ltt),this.FO.mn(Te.pa,this.ftt)}gtt(t){t.wn(Me.zL,this.ptt),t.wn(Me.GL,this.mtt),t.wn(Me.SI,this.wtt)}ytt(t){t.mn(Me.zL,this.ptt),t.mn(Me.GL,this.mtt),t.mn(Me.SI,this.wtt)}tV(t){this.gtt(t),t.ro&&this.Att(t)}WU(t){this.ytt(t),this.btt(t)}Stt(){this.FO.Xk===xh.Kn?this.Ttt():this.ktt()}Ttt(){if(!this.Ett)return;this.Ett=!1;const t=this.Wu.Eu,i=this.Wu.Iu;this.oe(t,i),this.ott(!1)}ktt(){this.Ett||(this.Ett=!0,this.ott(!0))}Att(t){this.Ett||t.ro&&!this.utt(t)&&this.ott(!1)}btt(t){this.utt(t)&&this.ott(!0)}Ptt(t){(t.ro||this.utt(t))&&this.ott(!0)}ott(t){const i=this.xtt,e=this.Ett?[]:this.FO.q.II.slice();this.Itt(e,i,t),this.xtt=e}K9(t){return this.ctt.get(t.jI)}Rtt(t,i){this.ctt.set(t.jI,i)}Y9(t){this.ctt.delete(t.jI)}Ctt(t){const i=[],e=this.Z9;if(void 0!==e.nZ){const s=t.Ly();s.Mi=e.nZ,i.push(s)}if(void 0!==e.rZ){const s=t.Ly();s.Mi=e.rZ,s.q9=t.q9,i.push(s)}return i}Dtt(){return this.xtt.slice()}kn(){os(this.$W),this.ctt.clear(),this._tt(),this.FO.L.II.forEach(t=>this.ytt(t)),this.Wu.mn(Rh.yn,this.stt)}constructor(t,i,e,s,n){this.ctt=ar(),this.Ett=!0,this.Z9=void 0,this.itt=Mo({},qL),this.xtt=[],this.FO=void 0,this._T=void 0,this.sc=void 0,this.htt=void 0,this.dtt=t=>this.tV(t.TO),this.ltt=t=>this.WU(t.TO),this.ftt=()=>this.Stt(),this.ptt=t=>this.Att(t.TO),this.mtt=t=>this.btt(t.TO),this.wtt=t=>this.Ptt(t.TO),this.stt=t=>this.oe(t.width,t.height),this.FO=t,this.htt=this.Z9=n,this._T=this.Btt(e),this.sc=s,i.appendChild(this._T)}};function JL(t,i,e,s,n){const r=t.Ly();let h=r,o=1,a=!1;const u=C(getComputedStyle(i).lineHeight)/4;if(!S(u)&&u>0){for(let i=0;ic&&(h=t.Ly(),o=c),t=r.Ly()}s.fO(t)||(h=r.Ly())}i.style.left=(h.W9-s.W9)/s.Ti*100+"%",i.style.top=(h.z9-s.z9)/s.Mi*100+"%"}function ZL(t,i){return i.some(i=>t.G9(i))}function $L(t){return new KL(t.left,t.top,t.width,t.height)}var A=function(t){return t[t.POS_X=0]="POS_X",t[t.NEG_X=1]="NEG_X",t[t.POS_Y=2]="POS_Y",t[t.NEG_Y=3]="NEG_Y",t}({});function tO(t,i,e){switch(i){case 0:t.W9+=e;break;case 1:t.W9-=e;break;case 2:t.z9+=e;break;case 3:t.z9-=e}}function iO(t,i,e,s){switch(e){case 0:return t.H9>i.H9+s;case 1:return t.W9i.q9+s;case 3:return t.z9t.iP.some(t=>"id"===t.VE&&t.zE===s));n&&kO(t,n,i,!0)}!function(t,i){const e=i.m[0];if(!e||"metadata"!==e.VE.toLowerCase())return;const s=e.m[0];kO(t,s,i)}(t,i)}(a,t,e),yO(a,t.VE,o);for(const s of t.jE)wO(s,i,e,a,n,r,o)}}else if(Fb(t)){const i=h.createTextNode(t.ck);if("SPAN"!==s.nodeName.toUpperCase()){const t=h.createElement("span");RO(t),yO(t,"span",o),t.appendChild(i),s.appendChild(t)}else s.appendChild(i)}}function yO(t,i,e){const s=t.style;switch(e.ZJ&&(s.fontFamily=e.ZJ),e.$J&&(s.color=e.$J),i.toLowerCase()){case"span":e.iZ&&(s.background=e.iZ);break;case"p":case"div":e.eZ&&(s.backgroundColor=e.eZ);break;case"body":e.sZ&&(s.textShadow=cO(e.sZ))}}function AO(t){const i=t.sP("region");if("p"===t.VE.toLowerCase())return i;const e=[];for(const i of t.m)e.push(AO(i));return Bo(e),0===e.length?i:1===e.length?null!=(s=e[0])?s:i:void 0;var s}function bO(t,i){const e=i.nP(wP,"id");e&&(t.id=e)}function SO(t,i,e,s,n){EO(t,i,e.style,s,t,n);for(const s of w.keys(e))PO(t,i,s,e[s],t,n)}function TO(t,i){if(i(t))return t;for(const e of t.m){const t=TO(e,i);if(t)return t}return null}function kO(t,i,e,s){void 0===s&&(s=!1),s&&(t.style.width=t.style.height="100%");const n=h.createElement("img");n.src=function(t){const i=t&&t.jE.length>0?t.jE[0]:null;return i&&Fb(i)?"data:image/png;base64,"+i.ck:""}(i),n.id=t.id,n.style.height="100%",n.style.maxWidth="100%",function(t,i){const e=t.style;Nl(e,"flex"),e.flexDirection=e.webkitFlexDirection="column";const s=i.sP("smpte:backgroundImageVertical");let n="center";if(s)switch(s.toLowerCase()){case"left":n="flex-start";break;case"center":n="center";break;case"right":n="flex-end";break;case"inherit":n="inherit"}e.justifyContent=e.webkitJustifyContent=n;const r=i.sP("smpte:backgroundImageHorizontal");let h="center";if(r)switch(r.toLowerCase()){case"left":h="flex-start";break;case"center":h="center";break;case"right":h="flex-end";break;case"inherit":h="inherit"}e.alignItems=e.webkitAlignItems=h}(t,e),t.appendChild(n)}function EO(t,i,e,s,n,r){if(e)for(const h of e.split(" "))if(s[h])for(const e of w.keys(s[h]))"style"===e.toLowerCase()?EO(t,i,s[h][e],s,n,r):PO(t,i,e,s[h][e],n,r)}function PO(t,i,e,s,n,r){const h=t.style;switch(e){case"backgroundColor":h.backgroundColor=s;break;case"color":h.color=s;break;case"direction":h.direction=s;break;case"display":"none"===s&&(h.display="none");break;case"fontFamily":var o;h.fontFamily=null!=(o=gO.get(s))?o:s;break;case"fontSize":{let t=s;if(Ju(t,"px")){const i=Number(t.slice(0,-2));t=i*r/16+"em"}else Ju(t,"c")&&(t=t.replace("c","em"));h.fontSize=t,h.lineHeight&&"inherit"!==h.lineHeight||(h.lineHeight=pO);break}case"fontStyle":h.fontStyle=s;break;case"fontWeight":h.fontWeight=s;break;case"lineHeight":{let t=s;if(Ju(t,"px")){const i=Number(t.slice(0,-2));t=i*r+"px"}h.lineHeight=t;break}case"opacity":h.opacity=s;break;case"overflow":h.overflow=s;break;case"padding":h.padding=s;break;case"textAlign":h.textAlign=s;break;case"textDecoration":switch(s){case"lineThrough":h.textDecoration="line-through";break;case"underline":case"overline":h.textDecoration=s;break;case"noUnderline":case"noLineThrough":case"noOverline":h.textDecoration="none"}break;case"unicodeBidi":switch(s){case"bidiOverride":h.unicodeBidi="bidi-override";break;case"normal":case"embed":case"isolate":h.unicodeBidi=s}break;case"visibility":h.visibility=s;break;case"zIndex":h.zIndex=s;break;case"displayAlign":{let t;switch(s.toLowerCase()){case"before":t="flex-start";break;case"center":t="center";break;case"after":t="flex-end";break;case"justify":t="space-between";break;default:return}h.justifyContent=h.webkitJustifyContent=t;break}case"extent":{const e=xO(i.toLowerCase())?n:t;let r,h;const o=s.split(" ",2);2===o.length?(r=o[0],h=o[1]):r=h="100%",e&&(e.style.height=h,e.style.width=r);break}case"origin":{const e=xO(i.toLowerCase())?n:t,[r,h]=s.split(" ",2);e&&(r||h)&&(r&&(e.style.left=r),h&&(e.style.top=h));break}case"showBackground":case"textOutline":break;case"wrapOption":switch(s){case"wrap":h.whiteSpace="normal";break;case"noWrap":h.whiteSpace="nowrap"}break;case"writingMode":{let t,i,e,n;switch(s){case"lrtb":case"lr":t="horizontal-tb";break;case"rltb":t="horizontal-tb",i="rtl",n="bidi-override";break;case"tbrl":case"tb":t="vertical-rl",e="upright";break;case"tblr":t="vertical-lr",e="upright";break;case"rl":t="horizontal-tb",i="rtl";break;default:return}h.writingMode=t,h.setProperty("-webkit-writing-mode",t),i&&(h.direction=i),e&&(h.textOrientation=e,h.setProperty("-webkit-text-orientation",e)),n&&(h.unicodeBidi=n);break}case"linePadding":if(Ju(s,"c")){const t=s.replace("c","em");h.paddingLeft=h.paddingRight=t}break;case"multiRowAlign":"auto"===s.toLowerCase()?h.textAlign="":h.textAlign=s}}function xO(t){return"div"===t||"p"===t||"span"===t}function IO(t){const i=t.style;Nl(i,"flex"),i.flexDirection=i.webkitFlexDirection="column",i.top="auto",i.left="5%",i.width="90%",i.height="100%",i.maxHeight="100%",i.maxWidth="100%",i.overflow="visible",i.position="absolute",i.fontFamily=vO,i.color=vl.WHITE,i.background=vl.TRANSPARENT,i.textShadow=cO("uniform"),i.textAlign="start",i.writingMode="horizontal-tb",i.setProperty("-webkit-writing-mode","horizontal-tb"),i.padding="0",i.margin="0",i.fontSize="inherit",i.lineHeight="inherit"}function RO(t){const i=t.style;i.fontFamily="inherit",i.color="inherit",i.fontSize="inherit",i.lineHeight="inherit",i.textShadow="inherit"}function CO(t){let i=$L(t.getBoundingClientRect());if("visible"===getComputedStyle(t).overflow&&t.scrollHeight>t.clientHeight){const e=t.children;for(let t=0;t":return i.Ny(1),o;case"EOF":return o;default:s=r,e="StartTag"}break;case"StartTag":switch(r){case"\t":case"\f":case" ":e="StartTagAnnotation";break;case"\n":h=r,e="StartTagAnnotation";break;case".":e="StartTagClass";break;case">":return i.Ny(1),{Km:"starttag",JE:s,Utt:[]};case"EOF":return{Km:"starttag",JE:s,Utt:[]};default:s+=r}break;case"StartTagClass":switch(r){case"\t":case"\f":case" ":n.push(h),h="",e="StartTagAnnotation";break;case"\n":n.push(h),h=r,e="StartTagAnnotation";break;case".":n.push(h),h="";break;case">":return i.Ny(1),n.push(h),{Km:"starttag",JE:s,Utt:n};case"EOF":return n.push(h),{Km:"starttag",JE:s,Utt:n};default:h+=r}break;case"StartTagAnnotation":switch(r){case"&":e="CharRefInAnnotation";break;case">":i.Ny(1);let t=h.trim();return t=t.replace(/\s/," "),{Km:"starttag",JE:s,Utt:n,Vtt:t};default:h+=r}break;case"CharRefInAnnotation":let a="";for(let e=i.ac;">"===t.charAt(e);e++)a+=t.charAt(e);h+=a||"&",e="StartTagAnnotation";break;case"EndTag":switch(r){case">":return i.Ny(1),{Km:"endtag",JE:s};case"EOF":return{Km:"endtag",JE:s};default:s+=r}break;case"TimestampTag":switch(r){case">":return i.Ny(1),{Km:"timestamp",Htt:s};case"EOF":return{Km:"timestamp",Htt:s};default:s+=r}}i.Ny(1)}return o}r(),r();var NO=function(t){return t.Wtt="string",t.qtt="starttag",t.ztt="endtag",t.Gtt="timestamp",t}({});function MO(t){let i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};const e=h.documentElement,n=h.body,r=e.clientLeft||n.clientLeft||0,o=s.pageXOffset||n.scrollLeft,a=i.left+o-r,u=e.clientTop||n.clientTop||0,c=s.pageYOffset||n.scrollTop,d=i.top+c-u;return{left:_.round(a),top:_.round(d)}}function LO(t,i,e,s){if(void 0===s&&(s=0),!t||!i)return;t.style.left="0px";const n=t.getClientRects(),r=i.getClientRects();if(0===n.length||0===r.length)return;const h=n[0],o=r[0],a=h.width/2+h.left;OO(t,o.width/2+o.left-a,e,s)}function OO(t,i,e,s){void 0===s&&(s=0),UO(t,i,"left","right",e,s)}function FO(t,i,e,s){void 0===s&&(s=0),UO(t,i,"top","bottom",e,s)}function UO(t,i,e,s,n,r){void 0===r&&(r=0);const h=t.getClientRects();if(n&&h.length>0){const t=h[0];i=ur(i,n[e]+r-t[e],n[s]-r-t[s])}t.style[e]=i+"px"}function Xu(t,i){void 0===t.textContent?t.innerText=i:t.textContent=i}r();var VO={$J:vl.WHITE,ZJ:"sans-serif",tZ:"100%",iZ:"rgba(0,0,0,0.8)",eZ:vl.TRANSPARENT,sZ:"none",nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0},HO="theoplayer-webvtt-region-",WO="theoplayer-webvtt-styling-",qO="theoplayer-webvtt-default-style",zO=5.23,GO=class extends YL{Btt(t){const i=h.createElement("div");i.className="theoplayer-webvtt-texttrack-"+t,oa(i),i.style.overflow="hidden",i.style.pointerEvents="none";const e=this.J9.ZJ;return e&&(i.style.fontFamily=e),i.style.whiteSpace="pre-line",i}VY(){this.$W.appendChild(this.Xtt),super.VY()}oe(t,i){const e=_.min(t/100,i/100),s=QL(this.J9);this.jtt.forEach(t=>{let{DO:i,Qtt:n}=t;this.Ktt(n,e,s,i)}),this.Ktt(this.Xtt,e,s)}ntt(t){pB(this.$W,t),super.ntt(t)}Itt(t,i,e){const s=this.$W,n=this.Wu.Iu/100,r=[];for(const i of t)void 0!==i.DO&&(pi(r,i.DO)||r.push(i.DO));this.jtt.forEach((t,i)=>{let{DO:s,Qtt:n}=t;!e&&pi(r,s)||(os(n),this.jtt.delete(i))});for(const t of i)!e&&t.ro||this.Q9(t);const h=[],o=$L(this.Xtt.getBoundingClientRect());h.push(...this.Ctt(o));for(const t of r){let i;this.jtt.has(t.o)?i=this.jtt.get(t.o).Qtt:(i=ZO(t,n),s.appendChild(i),this.jtt.set(t.o,{DO:t,Qtt:i})),h.push($L(i.getBoundingClientRect()))}t.sort(eF);for(const i of t){const t=this.Ott(i,h,o);void 0!==t&&h.push(t.X9(.1))}}Ott(t,i,e){var s;let n;t.DO?(n=this.jtt.get(t.DO.o).Qtt,"up"===t.DO.JO&&n.children.length>=1&&(n.style.transitionProperty="top",n.style.transitionDuration="0.433s")):n=this.Xtt;let r=null==(s=this.K9(t))?void 0:s[0];if(r||(r=this.Ytt(t),this.Rtt(t,[r])),n.appendChild(r),t.DO||(XO(r,t),t.BO?function(t,i,e,s){const n=$O(t),r=n?e.Mi:e.Ti;let h=C(getComputedStyle(i).lineHeight);if(0===h||S(h))return;const o=$L(i.getBoundingClientRect());let a=_.round(vE(t));"rl"===t.Pt&&(a=-(a+1));let u=h*a;"rl"===t.Pt&&(u=u-o.Ti+h);a<0&&(u+=r,h=-h);n?o.z9+=u:o.W9+=u;const c=o.Ly();let d=!1;for(;!e.fO(o)||ZL(o,s);)if(n)if(h<0&&o.z90&&o.q9>e.q9){if(o.z9=c.z9,d)break;h=-h,d=!0}else o.z9+=h;else if(h<0&&o.W90&&o.H9>e.H9){if(o.W9=c.W9,d)break;h=-h,d=!0}else o.W9+=h;n?i.style.top=(o.z9-e.z9)/e.Mi*100+"%":i.style.left=(o.W9-e.W9)/e.Ti*100+"%"}(t,r,e,i):function(t,i,e,s){const n=$L(i.getBoundingClientRect());if(0===n.Ti||0===n.Mi)return;$O(t)?"center"===t.RO?n.z9-=n.Mi/2:"end"===t.RO&&(n.z9-=n.Mi):"center"===t.RO?n.W9-=n.Ti/2:"end"===t.RO&&(n.W9-=n.Ti);let r;r=""===t.Pt?[A.POS_Y,A.NEG_Y,A.POS_X,A.NEG_X]:"lr"===t.Pt?[A.POS_X,A.NEG_X,A.POS_Y,A.NEG_Y]:[A.NEG_X,A.POS_X,A.POS_Y,A.NEG_Y];JL(n,i,r,e,s)}(t,r,e,i)),!t.DO)return $L(r.getBoundingClientRect())}Ytt(t){const i=new Ui,e=t.U,s=this.Jtt(t),n={Ztt:void 0,xe:s};let r=n,o="",a="";const u=[n],c=[],d=[];for(;i.ac0?d[d.length-1]:"")):"rt"===e&&"ruby"===i?(u.pop(),u.pop(),r=u[u.length-1]):"lang"===i&&(c.pop(),o=c.length>0?c[c.length-1]:"")}else if(t.Km===NO.Gtt){const i=t.Htt,e=new Ui;try{ZE(i,e)}catch(t){Pv("ERROR collecting timestamp",t)}}}return s}$tt(t,i){const e=this.J9,s=this.ttt;e.iZ&&(t.style.background=e.iZ);const n=s.$J||i||e.$J;n&&(t.style.color=n)}Ktt(t,i,e,s){if(s){const n=QO(s,i);t.style.height=n*e+"px",t.style.left=KO(s)+"%",t.style.top=YO(s,i)+"px"}t.style.fontSize=zO*i*e+"px"}Jtt(t){const i=h.createElement("div");i.style.position="absolute",i.style.margin="0",i.style.padding="0",i.style.unicodeBidi="plaintext",i.style.wordWrap="break-word",i.style.overflowWrap="break-word",i.style.width="auto",i.style.textAlign=t.xO,function(t,i){"rl"===i.Pt?t.style.writingMode="vertical-rl":"lr"===i.Pt?t.style.writingMode="vertical-lr":t.style.writingMode="horizontal-tb"}(i,t),function(t,i){const e=pE(i);$O(i)?(t.style.width=e+"%",t.style.height="auto"):(t.style.height=e+"%",t.style.width="auto")}(i,t),XO(i,t);const e=this.J9.eZ;e&&(i.style.background=e);const s=this.J9.$J;return s&&(i.style.color=s),i.style.textShadow=cO(this.J9.sZ),i}constructor(t,i,e,s){super(t,i,e,s,VO),this.jtt=qh(),this.Xtt=JO(3),function(t){const i=function(t){const i=null==t.getRootNode?void 0:t.getRootNode.call(t);if(i&&i.host)return i}(t);var e;const s=null!=(e=null!=i?i:t.ownerDocument)?e:h;if(s.getElementById(qO))return;const n=[];for(const[t,i]of tF)n.push("."+WO+t+" { color: "+i+" !important; }"),n.push("."+WO+"bg"+iF+t+" { background-color: "+i+" !important; }"),n.push("video::cue(."+t+") { color: "+i+"; }"),n.push("video::cue(.bg"+iF+t+") { background-color: "+i+"; }");const r=h.createElement("style");r.id=qO,r.innerHTML=n.join("\n"),i?i.appendChild(r):s.body.appendChild(r)}(i)}};function XO(t,i){let e,s;const n=gE(i),r=_E(i),h=pE(i);if($O(i)){switch(n){case"line-left":e=r;break;case"center":e=r-h/2;break;case"line-right":e=r-h}s=i.BO?0:vE(i)}else{switch(n){case"line-left":s=r;break;case"center":s=r-h/2;break;case"line-right":s=r-h}e=i.BO?0:vE(i)}t.style.left=e+"%",t.style.top=s+"%"}function jO(t,i){for(const e of i)if(e.Ztt){for(const i of e.Ztt.Utt)fi(t,WO+i);"v"===e.Ztt.JE.toLowerCase()&&e.Ztt.Vtt&&fi(t,"theoplayer-webvtt-voice-"+e.Ztt.Vtt)}}function QO(t,i){return t.QO*(zO*i)*1.14}function KO(t){return t.ZO-t.KO*t.Ti/100}function YO(t,i){const e=t.$O,s=t.YO*QO(t,i)/100;return _.max(0,e-s)}function JO(t){const i=h.createElement("div");return i.className=HO+"default",oa(i),i.style.wordWrap="break-word",i.style.writingMode="horizontal-tb",i.style.pointerEvents="none",i.style.width="auto",i.style.height="auto",i.style.maxHeight="100%",i.style.minHeight="0px",i.style.padding="0",i.style.boxSizing="border-box",i.style.fontSize=zO*t+"px",i.style.lineHeight="1.14em",i}function ZO(t,i){const e=JO(i);e.className=HO+t.o;const s=t.Ti,n=QO(t,i);return e.style.width=s+"%",e.style.height=n+"px",e.style.left=KO(t)+"%",e.style.right="",e.style.top=YO(t,i)+"px",e.style.bottom="",e.style.boxSizing="border-box",e}function $O(t){return""===t.Pt}var tF=[["white","#fff"],["lime","#0f0"],["cyan","#0ff"],["red","#f00"],["yellow","#ff0"],["magenta","#f0f"],["blue","#00f"],["black","#000"]],iF=String.fromCharCode(95);function eF(t,i){const e=vE(t),s=vE(i),n=sF(e,t.BO),r=sF(s,i.BO);return n&&r?e-s||Sn(i,t)||i.jI-t.jI:Sn(t,i)||t.jI-i.jI}function sF(t,i){return i?t<0?t>-8:t>8:t>50}r(),r(),r();var nF=function(t){return t.FONT_REGULAR="regular",t.FONT_UNDERLINE="underline",t.FONT_ITALICS="italics",t.FONT_UNDERLINE_ITALICS="underline-italics",t}({}),rF={$J:vl.WHITE,ZJ:sO.nl,tZ:"100%",iZ:vl.BLACK,eZ:"transparent",sZ:"none",tit:"regular",nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0},hF=[{iit:vl.WHITE,tit:"regular",eit:0},{iit:vl.WHITE,tit:"underline",eit:0},{iit:vl.GREEN,tit:"regular",eit:0},{iit:vl.GREEN,tit:"underline",eit:0},{iit:vl.BLUE,tit:"regular",eit:0},{iit:vl.BLUE,tit:"underline",eit:0},{iit:vl.CYAN,tit:"regular",eit:0},{iit:vl.CYAN,tit:"underline",eit:0},{iit:vl.RED,tit:"regular",eit:0},{iit:vl.RED,tit:"underline",eit:0},{iit:vl.YELLOW,tit:"regular",eit:0},{iit:vl.YELLOW,tit:"underline",eit:0},{iit:vl.MAGENTA,tit:"regular",eit:0},{iit:vl.MAGENTA,tit:"underline",eit:0},{iit:vl.WHITE,tit:"italics",eit:0},{iit:vl.WHITE,tit:"underline-italics",eit:0},{iit:vl.WHITE,tit:"regular",eit:0},{iit:vl.WHITE,tit:"underline",eit:0},{iit:vl.WHITE,tit:"regular",eit:4},{iit:vl.WHITE,tit:"underline",eit:4},{iit:vl.WHITE,tit:"regular",eit:8},{iit:vl.WHITE,tit:"underline",eit:8},{iit:vl.WHITE,tit:"regular",eit:12},{iit:vl.WHITE,tit:"underline",eit:12},{iit:vl.WHITE,tit:"regular",eit:16},{iit:vl.WHITE,tit:"underline",eit:16},{iit:vl.WHITE,tit:"regular",eit:20},{iit:vl.WHITE,tit:"underline",eit:20},{iit:vl.WHITE,tit:"regular",eit:24},{iit:vl.WHITE,tit:"underline",eit:24},{iit:vl.WHITE,tit:"regular",eit:28},{iit:vl.WHITE,tit:"underline",eit:28}],oF=[11,-1,1,2,3,4,12,13,14,15,5,6,7,8,9,10];function aF(t,i){return xE(t.sit,i.sit)||tf(t.VN,i.VN)}r();var Ht=32,uF=/CC([1-4])=(.*)/;function cF(t){if(!t)return[];const i=[],e=t.trim().split(";");if(e.every(t=>t.match(uF)))for(const t of e){const[,e,s]=t.match(uF);i.push({nit:Number(e),rit:s})}else for(let t=0;tnew dF(t,this.Dit,this.J9).wr())}Mit(t){const i=(100-t)/2;this.$W.style.left=i+"%",this.$W.style.width=t+"%"}constructor(t,i,e,s){super(t,i,e,s,rF),this.Nit=void 0,this.Dit=void 0}},vF=class t{Lit(t){for(const i of this.Oit)if(i.Ht===t)return i}static Fit(t){switch(t.Km){case nh.TTML:case nh.SRT:case nh.WEBVTT:case nh.CEA608:return!0}return!1}Uit(t){switch(t.Km){case nh.TTML:return new mO(t,this.Vit,t.Th,this.sc);case nh.SRT:case nh.WEBVTT:return new GO(t,this.Vit,t.Th,this.sc);case nh.CEA608:return new fF(t,this.Vit,t.Th,this.sc)}}Hit(t){let i=this.Lit(t);i||(i=this.Uit(t),i&&(i.VY(),i.ntt(this.Dz),this.Oit.push(i),t.Xk===xh.Kn&&i.Ttt()))}Wit(t){const i=this.Oit;for(let e=i.length-1;e>=0;e-=1){const s=i[e];s.Ht===t&&(s.kn(),ka(i,e))}}qit(i){qP(i.Lt)&&t.Fit(i)&&(i.Ax===Zu.ERROR?this.Wit(i):this.Hit(i))}get n6(){return this.zit.ds||this.ea.XL}hr(){for(const t of this.Oit)t.Ht.mn(Te.wI,this.Git),t.Ht.mn(Te.AI,this.Git),t.kn();Yo(this.Oit)}kn(){this.hr();for(const t of this.Oit)t.kn();this.Gl.mn(Vt.eI,this.Xit),this.Gl.mn(Vt.nI,this.jit),this.Gl.mn(Te.pa,this.Git),this.zit.mn(Gi.pa,this.Qit),this.ea.mn([re.zL,re.GL],this.Qit),this.Dz.mn("mI",this.Kit)}constructor(t,i,e,s,n,r){this.Vit=void 0,this.sc=void 0,this.Gl=void 0,this.zit=void 0,this.ea=void 0,this.Oit=[],this.Dz=void 0,this.Xit=t=>{const i=t.Ht;i.wn(Te.wI,this.Git),i.wn(Te.AI,this.Git),i instanceof uL&&(i.n6=this.n6),this.qit(i)},this.Git=t=>{const i=t.Ht;this.qit(i)},this.jit=t=>{const i=t.Ht;i.mn(Te.wI,this.Git),i.mn(Te.AI,this.Git),this.Wit(i)},this.Qit=()=>{const t=this.n6;for(const i of this.Gl.II)i instanceof uL&&(i.n6=t)},this.Kit=()=>{for(const t of this.Oit)t.ntt(this.Dz)},this.Vit=t,this.sc=i,this.Gl=e,this.zit=n,this.ea=r,this.Dz=s,this.Gl.wn(Vt.eI,this.Xit),this.Gl.wn(Vt.nI,this.jit),this.Gl.wn(Te.pa,this.Git),this.zit.wn(Gi.pa,this.Qit),this.ea.wn([re.zL,re.GL],this.Qit),this.Dz.wn("mI",this.Kit),this.Qit()}};r();var _F=class extends Ne{get jL(){var t;return null!=(t=this.Yit.ownerDocument.pictureInPictureEnabled)&&t}get XL(){return this.Jit}async yo(){if(this.jL){if(!this.XL){const t=this.ww([re.zL,re.ma]);await this.Yit.requestPictureInPicture(),await t,this.Jit||this.So(new oR)}}else this.So(new oR)}async jo(){if(this.jL){if(this.Jit){const t=this.ww([re.GL,re.ma]);await this.Yit.ownerDocument.exitPictureInPicture(),await t,this.Jit&&this.So(new oR)}}else this.So(new oR)}kn(){this.Vo(),this.Yit.removeEventListener("enterpictureinpicture",this.Zit),this.Yit.removeEventListener("leavepictureinpicture",this.$it)}constructor(t){super(),this.Yit=void 0,this.Jit=!1,this.Zit=()=>{this.Jit=!0,this.So(new Tk)},this.$it=()=>{this.Jit=!1,this.So(new kk)},this.Yit=t,this.Yit.addEventListener("enterpictureinpicture",this.Zit),this.Yit.addEventListener("leavepictureinpicture",this.$it)}};function gF(t){const i=new vD,e=function(t){const i=[];return lD.la(t)&&i.push(new lD(t)),fD.la(t)&&i.push(new fD(t)),i}(t);if(e.length>0){for(const t of e)i.AK(t);i.yK(e[0])}return i}var pF=class extends FL{get $W(){return this._T}get Rx(){return this._T.videoHeight}get Bx(){return this._T.videoWidth}get Ma(){return this.tet}get mq(){return this.iet}Wx(){return this._T}async zg(){this.iet.kn(),this.tet.kn(),this.eet.kn(),this.net.kn(),await super.zg()}we(){super.we(),this.eet.we()}be(){super.be(),this.eet.be()}B9(t){super.B9(t),this.eet.B9(t)}constructor(t,i,e,s,n){super(t,i,e,s,n),this.eet=void 0,this.net=void 0,this.tet=void 0,this.iet=void 0,this.tet=gF(t),this.iet=new _F(t),this.eet=new XL,this.net=new vF(this.eet.xe,this.Wu,this.nt,this.Ql,this.Ma,this.mq)}};r(),r();r(),r();var mF=function(t){return t.ret="HELLO",t.het="HI_THERE",t.oet="INITIALIZE",t.aet="APPEND_INIT",t.uet="APPEND_DATA",t.cet="ACK",t.det="REMOVE",t.let="DESTROY_SESSION",t}({}),wF=class{fet(t){return this.ta.Zo(async t=>{ii(t);const i=new MessageChannel,e=i.port1,s=i.port2;od.serviceWorker.controller||await Lb(od.serviceWorker,"install",t),"activated"!==od.serviceWorker.controller.state&&await Lb(od.serviceWorker.controller,"activate",t);const n={kind:"HELLO",port:s};od.serviceWorker.controller.postMessage(n,[s]),e.start(),this.im=e;try{const i=await Lb(e,"message",t),s=i.data;if("HI_THERE"!==s.kind)throw new m("Could not set up message channel");this.mT=s.sessionId}catch(t){throw D(t)&&this.vet(),t}},t)}_et(t,i){return this.im,this.ta.Zo(async()=>{if(!this.im)throw new m("MessageSession not set up yet or already closed.");i||(i=[]),this.im.postMessage(t,i);const e=await Lb(this.im,"message");return e.data})}pet(){return this.ta.Zo(()=>this.vet())}vet(){if(!od.serviceWorker.controller)return;if("activated"!==od.serviceWorker.controller.state)return;if(!this.im)return;const t={kind:"DESTROY_SESSION"};this.im.postMessage(t),this.im.close(),this.im=void 0}constructor(){this.im=void 0,this.mT=void 0,this.ta=new te}};r();var yF=class{get met(){return this.wet}yet(t,i){const e=t-i;this.wet=e>this.met?this.wet:e}Aet(t){this.wet=t}constructor(){this.wet=1/0}};r(),r(),r();var On=function(t){return t.Dk="audio",t.Bk="video",t.VU="metadata",t}({}),AF=class extends Ne{get IP(){return void 0===this.bet||void 0===this.Tet?ve.iL():new ve([this.bet,this.Tet])}get Cd(){return{qT:this.SQ}}get B3(){return I(this.SQ)?Ci.Dk:tt(this.SQ)?Ci.Bk:Ci.pk}get oQ(){return this.SQ}get M3(){return ve.iL()}get MY(){return 30}set MY(t){}get UY(){return 30}set UY(t){}F3(t,i){}U3(t,i){}WZ(){return this.ket}get ga(){return this.Eet}get Pet(){return this.bet}get PO(){return this.Tet}async V3(){}async r3(t,i){}async H2(t,i,e){if(t.Km!==Po.vZ)throw new m("Streaming or opaque segments are not supported yet.");const s=t.ck,n=async()=>{const t=s.buffer,e={kind:mF.uet,mediaType:bF(this.SQ),segment:s,startPts:i.xet,totalDuration:i.ct};if(await this.Iet._et(e,[t]),void 0===this.bet){const t=i.xet+i.bU;this.bet=t,this.Tet=t}this.Tet=this.Tet+i.ct,this.So(new wp(Zs.lZ))};return this.ta.Zo(async t=>{ii(t);try{this.Eet=!0,await n()}finally{this.Eet=!1}},e)}async z2(t,i,e){if(t.Km!==Po.vZ)throw new m("Streaming or opaque initialization segments are not supported yet.");const s=t.ck,n=async()=>{const t={kind:mF.aet,mediaType:bF(this.SQ),segment:s};await this.Iet._et(t,[])};return this.ta.Zo(async t=>{ii(t);try{this.Eet=!0,await n()}finally{this.Eet=!1}},e)}C3(){this.ket=!0}A3(){this.ket=!1}async _S(t,i,e){const s=async()=>{const t={kind:mF.det,mediaType:bF(this.SQ),endTime:i};await this.Iet._et(t),this.bet=void 0,this.Tet=void 0,this.So(new wp(Zs.lZ))};return this.ta.Zo(async t=>{ii(t);try{this.Eet=!0,await s()}finally{this.Eet=!1}},e)}TZ(t){return this.SQ===t.qT}EZ(t){return this.SQ=t.qT,Promise.resolve()}async zg(){this.Vo(),await this.ta.kn()}constructor(t,i){super(),this.SQ=void 0,this.Iet=void 0,this.bet=void 0,this.Tet=void 0,this.ta=void 0,this.Eet=void 0,this.ket=void 0,this.SQ=t,this.Iet=i,this.bet=void 0,this.Tet=void 0,this.ta=new te,this.Eet=!1,this.ket=!1}};function bF(t){return t.match(/video/)?On.Bk:On.Dk}var SF=class t{static Ret(i,e,s,n){const r=[];for(let t=0;tt.zg()))}C4(t){}M4(t,i,e,s){}C3(){var t,i;null==(t=this.P4)||t.C3(),null==(i=this.x4)||i.C3()}A3(){var t,i;null==(t=this.P4)||t.A3(),null==(i=this.x4)||i.A3()}TZ(t){return!!BL(this,t)}EZ(t){return this.YS=t,Promise.resolve()}xZ(t){}async bZ(t,i){const e=await this.hw.nw(t.Ym,i),s=await e.IS();return await this.SZ(s),s}async SZ(t){if(t&&!this._T.src)throw new fs(Vo.CONTENT_PROTECTION_ERROR,"Attempted to attach MediaKeys to a sourceless MediaElement");if(!t&&this._T.src)throw new fs(Vo.CONTENT_PROTECTION_ERROR,"Attempted to remove MediaKeys from a non-empty MediaElement");const i=this.TS;i&&(await i.PS(this._T),this.TS=void 0),t&&(await t._n(this._T),this.TS=t)}constructor(t,i,e,s){this.YS=void 0,this.hw=void 0,this._T=void 0,this.P4=void 0,this.x4=void 0,this.TS=void 0,this.YS=t,this.x4=Jr(i,t=>Boolean(t.oQ.match(/video/))),this.P4=Jr(i,t=>Boolean(t.oQ.match(/audio/))),this.hw=e,this._T=s,this.Cet()}},TF=class extends Ne{Bet(){this.Yit.addEventListener("timeupdate",this.Net),this.Yit.addEventListener("ended",this.Met),this.Yit.addEventListener("timeupdate",this.Let),this.Yit.addEventListener("ratechange",this.Oet),this.Yit.addEventListener("volumechange",this.Fet),this.Yit.addEventListener("durationchange",this.Uet),this.Yit.addEventListener("playing",this.Vet),this.Yit.addEventListener("seeking",this.Het),this.Yit.addEventListener("play",this.Wet),this.Yit.addEventListener("pause",this.qet),this.Yit.addEventListener("encrypted",this.S9)}zet(){this.Yit.removeEventListener("timeupdate",this.Net),this.Yit.removeEventListener("ended",this.Met),this.Yit.removeEventListener("timeupdate",this.Let),this.Yit.removeEventListener("ratechange",this.Oet),this.Yit.removeEventListener("volumechange",this.Fet),this.Yit.removeEventListener("durationchange",this.Uet),this.Yit.removeEventListener("playing",this.Vet),this.Yit.removeEventListener("seeking",this.Het),this.Yit.removeEventListener("play",this.Wet),this.Yit.removeEventListener("pause",this.qet)}Get(){this.Q8.wn(Do.wI,this.Rs)}Xet(){this.Q8.mn(Do.wI,this.Rs)}get $W(){return this.Yit}get n5(){return!1}get MP(){return this.Yit.currentTime+this.jet.met}get hx(){return this.Yit.paused}get Mx(){return this.Yit.volume}set Mx(t){this.Yit.volume=t}get ux(){return this.Yit.playbackRate}set ux(t){this.Yit.playbackRate=t}get Qet(){return this.Yit.defaultPlaybackRate}get IP(){var t,i;return null!=(i=null==(t=this.iq)?void 0:t.IP)?i:ve.iL()}get Ket(){return ve.jn(this.Yit.buffered)}get _x(){const t=this.Yet;return this.Ho.OM(t.Ny(this.jet.met))}get Yet(){return ve.jn(this.Yit.played)}get kx(){return this.Sz}get Y4(){return!1}get a5(){return!1}get ct(){return this.Yit.duration}get $P(){return this.Yit.muted}set $P(t){this.Yit.muted=t}get Pit(){return this.Yit.style}get CL(){return Mo({},wB,{RL:!0})}My(t,i,e){this.m7.Zg(),this.m7=new at,this.w7=$e(this.y7(t,this.w7,this.m7.Yg),this.m7).catch(Ct)}async y7(t,i,e){var s;this.Ho=this._x;const n=null==(s=this.iq)?void 0:s.Det;if(!n)return;const r=_.max(...n.map(t=>t.Pet?t.Pet:1/0));this.Sz=!0,this.So(new F(t)),await i.catch(Ct),ii(e);try{for(this.Jet||this.Zet(),this.Yit.load(),this.$et||(this.tst=!1,await Nc(this.Yit.play(),e));this.Ax0))return;i=t[0];const e=i.width,s=this.Yit.videoWidth/this.Yit.videoHeight,n=i.height;let r,h;e/n>s?(r=n*s,h=n):(h=e/s,r=e),this.Yit.style.width=r+"px",this.Yit.style.height=h+"px",this.Yit.style.marginLeft=(e-r)/2+"px",this.Yit.style.marginTop=(n-h)/2+"px",this.Yit.style.backgroundColor="black"}sst(){this.Yit.style.width="100%",this.Yit.style.height="100%",this.Yit.style.marginLeft="",this.Yit.style.marginTop="",this.Yit.style.backgroundColor=""}get Rx(){return this.Yit.videoHeight}get Bx(){return this.Yit.videoWidth}get UP(){return this.Yit.ended}get Mi(){return this.Yit.offsetHeight*zd.Zs.fp}get Ti(){return this.Yit.offsetWidth*zd.Zs.fp}get KP(){return!1}get R9(){return this.C9}get CP(){}get Wu(){return this.nst}get lt(){}get Ma(){return this.tet}get mq(){return this.ea}get Sx(){return this.iq?this.iq.Sx:ve.iL()}get nq(){}get nt(){return this.Gl}get Ql(){return this.Dz}get Vx(){return!1}set Vx(t){}gq(t,i,e,s,n){}tI(t,i,e,s,n,r,h,o,a){const u=new gM(t,i,e,s,n,r,h,a,o);return this.Gl.tt(u),this.N7.tt(u),u}wq(t){throw m("Not supported.")}QZ(t){}ZP(){return tB(this.Yit)}get i7(){return"block"===this.Yit.style.display}be(){this.Yit.style.display="block",this.eet.be()}we(){this.Yit.style.display="none",this.eet.we()}x9(){}async Un(t){if(t.Km===Zr.mV)throw new m("Not yet implemented");await this.Iet.fet();const i=Jr(t.aq,t=>t.kS.Km===an.jm),e={kind:mF.oet,mediaBufferConfigs:t.L4.map(t=>t.qT),fairPlaySdkUri:null==i?void 0:i.HH};return await this.Iet._et(e),this.iq=SF.Ret(t,this.Iet,this.hw,this.Yit),this.PZ.Un(this.iq,t),this.Yit.setAttribute("x-webkit-airplay","deny"),this.Yit.setAttribute("x-webkit-wirelessvideoplaybackdisabled",""),this.Yit.disableRemotePlayback=!0,this.Yit.preload="none",this.Yit.src="https://theo.proxy/"+this.Iet.mT+"/master.m3u8",this.iq}I9(){}iV(t){this.Gl.it(t),this.N7.it(t)}Aq(){for(const t of this.Gl.II.slice())t.kn();this.Gl.hr()}KW(t){}vq(){return!1}B9(t){t.appendChild(this.Yit),this.eet.B9(t)}Wx(){return this.Yit}get Eq(){return this.PZ.Eq}set Eq(t){this.PZ.Eq=t}get N9(){}set N9(t){}get p8(){}Yx(){}constructor(t,i,e,s){super(),this.Jet=!0,this.Iet=new wF,this.jet=new yF,this.iq=void 0,this.Q8=void 0,this.$et=!0,this.ist=new pa,this.Sz=!1,this.w7=Promise.resolve(),this.m7=new at,this.tst=!0,this.Ho=ve.iL(),this.tet=void 0,this.ea=void 0,this.Yit=void 0,this.C9=!1,this.PZ=void 0,this.hw=void 0,this.Gl=void 0,this.N7=void 0,this.eet=void 0,this.net=void 0,this.nst=void 0,this.Dz=void 0,this.Net=()=>{this.hx||this.Ket.V<=0||this.IP.V<=0||this.jet.yet(this.IP.An(this.IP.V-1),this.Ket.An(this.Ket.V-1))},this.Met=()=>{this.So(new At(this.MP))},this.Let=()=>{this.So(new Si(this.MP,this.CP))},this.Oet=()=>{this.So(new aa(this.MP,this.ux))},this.Fet=()=>{this.So(new Ze(this.MP,this.Mx))},this.Uet=()=>{this.So(new Rs(this.ct))},this.Vet=()=>{this.So(new ce(this.MP))},this.Het=()=>{this.My(this.MP)},this.Wet=async()=>{this.tst&&this.So(new Tc(this.MP)),this.$et=!1,this.tst=!0},this.qet=()=>{this.$et=!0,this.So(new hl(this.MP))},this.S9=t=>{const i=t.initDataType;var e;const s=null!=(e=t.initData)?e:new ArrayBuffer(0);this.So(new Tp(i,s))},this.Yit=t,this.Q8=new YN(this),this.nst=e,this.Dz=s,this.Yit.playsInline=!0,this.Yit.style.width="100%",this.Yit.style.height="100%",this.Bet(),this.Get(),this.tet=gF(this.Yit),this.ea=new _F(this.Yit),this.PZ=new PL(this),this.hw=i,this.Gl=new cc,this.N7=new hu(this),this.eet=new XL,this.net=new vF(this.eet.xe,this.Wu,this.nt,this.Ql,this.Ma,this.mq)}},kF=[Ci.Dk,Ci.Bk],EF=class{get Bz(){const t=[];for(const i of this.rst){const e=this.hst.get(i);if(e){const i=e.map(t=>t.ost);t.push(...i)}}return this.ast&&t.push(this.ast),t}ust(t){for(const i of this.Bz)i.B9(t)}Gq(t){const i=this.hst.get(t);if(!i)return;const e=Jr(i,t=>t.cst);return e?(e.cst=!1,e.ost):void 0}dst(t){if(!this.ast){var i;const t=null==(i=this.hst.get(Ci.Bk))?void 0:i[0].ost.$W;if(!t)throw new m("Error creating iOS Safari MediaController");this.ast=new TF(t,this.hw,this.sc,this.Dz),t.parentElement&&this.ast.B9(t.parentElement)}return this.ast}async Pq(t){const i=t.$W,e=i.tagName.toLowerCase();await t.hr(),Rf(i);const s=Jr(this.hst.get(e)||[],i=>t===i.ost);s&&(s.cst=!0)}xz(){for(const t of this.Bz)t.D9()}kn(){for(const t of this.Bz){const i=t.$W;t.zg(),If(i),os(i)}this.hst.clear(),this.ast=void 0}lst(){for(const t of this.rst){const i=[];this.hst.set(t,i);for(let e=0;e{const e=zd.Mg()/1e3;return i.IY(e,new j(t)),i.RY(e),t});const n={ck:s,lk:e.lk};return new sc(n,e)}constructor(t,i){super(t),this.Rz=void 0,this.Rz=i}},IF=class{start(t){this.YJ=t}transform(t){this._st.IY(zd.Mg()/1e3,t),this.YJ.enqueue(t)}flush(){this._st.RY(zd.Mg()/1e3)}constructor(t){this._st=void 0,this.YJ=void 0,this._st=t}};function RF(t){return{get ratio(){return t.qo},get thresholds(){return t.gst.slice()}}}function CF(t){const i=[],e=_.floor(1/t);if(S(e))return[];for(let s=0;s<=e;s++){const e=ur(s*t,0,1);i.push(e)}return i}r(),r(),r();var DF=class{get qo(){return this.pst}get gst(){return this.mst}wst(t){return i=>{const e=i[i.length-1];this.pst=e.intersectionRatio,t(e.intersectionRatio)}}get Ca(){return this.hu||(this.hu=RF(this)),this.hu}Xx(){this.yst.disconnect()}constructor(t,i,e){this.pst=1,this.mst=void 0,this.yst=void 0,this.hu=void 0,this.mst=CF(i);const n=this.wst(e);this.yst=new s.IntersectionObserver(n,{root:null,threshold:this.mst}),this.yst.observe(t)}},BF=class{get qo(){return this.pst}get gst(){return this.mst}get Ca(){return this.hu||(this.hu=RF(this)),this.hu}Ast(t){this.pst=t;const i=this.mst;let e=0;if(t>0)for(;ethis.Ast(this.Tst()),50),this.bo=t,s.addEventListener("scroll",this.kst,!!nD&&{passive:!0}),ct(()=>this.Ast(this.Tst()))}},MF=.1,LF=class{get Est(){return this.Pst}get Lo(){return this.xst}set Lo(t){if(S(t)||t<0||t>1)throw new RangeError("The threshold must be a value between 0 and 1");this.xst=t}get Ca(){return this.hu||(this.hu=function(t){return{get ratio(){return t.Est},get visible(){return t.Est>t.Lo},get visibleThreshold(){return t.Lo},set visibleThreshold(i){i=co(i),t.Lo=i},addObserver:(i,e)=>(i=co(i),t.Do(i,e).Ca),removeObserver(i){const e=t.Ist(i);e&&t.Uo(e)}}}(this)),this.hu}Rst(t){return i=>{this.Pst=i,null==t||t(this.Pst)}}Do(t,i){if(S(t))throw new g("step is not of the right type");if(t>1||t<=0)throw new RangeError("The step must be a number greater than 0 and smaller than or equal to 1");let e;return e="function"==typeof s.IntersectionObserver?new DF(this.bo,t,this.Rst(i)):new NF(this.bo,t,this.Rst(i)),this.Cst.push(e),e}Uo(t){t.Xx(),oi(this.Cst,t)}Ist(t){for(const i of this.Cst)if(i.Ca===t)return i}kn(){for(const t of this.Cst)t.Xx();Yo(this.Cst)}constructor(t){this.bo=void 0,this.Pst=1,this.xst=0,this.Cst=[],this.hu=void 0,this.bo=t,this.Do(.1,this.Rst())}};r();var OF=class extends wp{constructor(){super(d.Iw)}},FF=class extends _o{get Dst(){return this.Rz}get cO(){return this.Bst}set cO(t){this.Bst=t,this.Pa.cO=t}get Nst(){return this.Mst}get ht(){return this.Pa.ht}get VX(){return this.Lst}get Wu(){return this.Ost}get zP(){return this.Pa.zP}get jP(){return this.Pa.jP}get JP(){return this.Fst}get oX(){return this.Ust}get nt(){return this.Pa.nt}get Ql(){return this.Dz}get rt(){return this.Pa.rt}get IP(){return this.RP()}RP(){return this.Pa.IP}get Vst(){return this.eJ}get _J(){return this.gJ}get MP(){return this.LP()}set MP(t){this.OP(t)}LP(){return this.Pa.MP}OP(t,i){this.Pa.OP(t,i)}Hst(){return this.LP()}get CP(){return this.Pa.CP}set CP(t){this.Pa.CP=t}get bt(){return this.Pa.bt}get ct(){return this.Nd()}Nd(){return this.Pa.ct}get xe(){return this.Pa.xe}get UP(){return this.Pa.UP}get lt(){return this.HP()}HP(){return this.Pa.lt}get WP(){return this.qP()}qP(){return this.Pa.WP}get Ma(){return this.Pa.Hx()}get mq(){return this.Pa.Aa()}get Vx(){return this.Pa.Vx}set Vx(t){this.Pa.Vx=t}get $P(){return this.Pa.$P}set $P(t){const i=Boolean(t);this.ix(i)}ix(t){this.Pa.$P=t,t||this.hx||this.qx()}get hx(){return this.Pa.hx}get ux(){return this.lx()}set ux(t){this.vx(t)}lx(){return this.Pa.ux}vx(t){this.Pa.ux=t}get _x(){return this.gx()}gx(){return this.Pa._x}get mx(){return this.Pa.mx}set mx(t){this.Pa.mx=t}get Ax(){return this.Pa.Ax}get Sx(){return this.Tx()}Tx(){return this.Pa.Sx}get kx(){return this.Pa.kx}get jI(){return this.gO}get Rx(){return this.Pa.Rx}get Bx(){return this.Pa.Bx}get Mx(){return this.Pa.Mx}set Mx(t){const i=ur(Number(t),0,1)||0;this.Ox(i)}get Fx(){return this.Cz}Ox(t){this.Pa.Mx=t}Ea(){Ri(this,kR,this)}Gx(){this.Pa.Gx()}zx(){this.Pa.zx()}nu(){return this.gz}async Ta(t,i){if(this.gz=t,t){this.Wst.xj(t).catch(this.qst);const e=function(t){t.sources;const i=t.sources.filter(t=>qd(t.integration));0;return t.sources=i,t}(t);await this.Pa.Ta(e,i)}}Px(t,i,e){return this.Pa.Px(t,i,e)}xx(){return this.Pa.xx()}qx(){if(this.ko)return;this.Pa.qx(),this.Mst.qx();const t=this.xe.getElementsByTagName("video");for(let i=0;i{if(this.Kst)return;this.Kst=!0;const i=this.Qst,e=P(t);this.Pa.BI=new lR(this.xe,e,t),Wr(i.kn())},this.Yst=t=>{t.type!==d.Xw&&t.type!==d.Gw&&this.So(t)};const n=co(i.uid);S(n)?this.gO=Wk++:this.gO=n,this.Cd=i;const r=zd.SP,h=new cB;this.jst=new jC("10.0.0",r,h),this.Rz=new GD,this.Cz=new XI;const o=new xF(r,this.Rz);this.SP=new BD(o,i.allowMixedContent),this.qJ=null!=e?e:new kC(i.isEmbeddable,"10.0.0",yC()),this.Wst=new uB(r,this.qJ,this.jst,h,i,yC()),this.Wst.FJ().catch(this.qst),this.Ost=new Oe(t),this.Ost.wn(Rh.yn,this.Rs),this.Dz=new gB;const a=new(null!=s?s:EF)(this.Ost,this.Dz,i);a.ust(t),this.eJ=new KD,this.gJ=new JD;const u=new dR(t,i,this.SP,this.Rz,this.Cz,a,this.Dz);this.Rz.VY(u);let c=u;c=new YD(c,this.Vst),c=new ZD(c,this._J),this.Qst=c,this.Pa=new Dk(this.Qst),this.Pa.lw(this.Yst),this.Fst=new $D(this.Pa),this.Ust=new LD(this.Pa,this.SP,this.Rz),this.Gst=new ZC(this),this.Xst=new _D(this.Pa,i.allowNativeFullscreen),this.zst=new yD(this.Xst,this.Pa.Aa()),this.Ost._n(),this.Io=new LF(t),this.Iz=new EF(this.Ost,this.Dz,i,1,[Ci.Bk]),this.Mst=new bD(this.Iz),this.Lst=new sB}};r(),r();var Oc=class extends _o{get Dst(){return this.Jst()}Jst(){return this.oa.Dst}get Jc(){return this.Zst()}Zst(){return this.oa.Jc}get jst(){return this.oa.jst}get Nst(){return this.$st()}$st(){return this.oa.Nst}get cO(){return this.oa.cO}set cO(t){this.oa.cO=t}get Gst(){return this.oa.Gst}get VX(){return this.oa.VX}get Vst(){return this.oa.Vst}get Cd(){return this.oa.Cd}get Wu(){return this.oa.Wu}get Ma(){return this.Hx()}Hx(){return this.oa.Ma}get mq(){return this.Aa()}Aa(){return this.oa.mq}get SP(){return this.oa.SP}get Fx(){return this.oa.Fx}get Wst(){return this.oa.Wst}get _J(){return this.oa._J}get oX(){return this.oa.oX}get zst(){return this.oa.zst}get Ost(){return this.oa.Ost}get Pa(){return this.oa.Pa}get Ql(){return this.oa.Ql}get tnt(){return this.int()}int(){return this.oa.tnt}get ent(){return this.snt()}snt(){return this.oa.ent}get jI(){return this.oa.jI}get Io(){return this.oa.Io}get ht(){return this.EP()}EP(){return this.oa.ht}RP(){return this.oa.RP()}get CP(){return this.DP()}set CP(t){this.BP(t)}DP(){return this.oa.CP}BP(t){this.oa.CP=t}get bt(){return this.NP()}NP(){return this.oa.bt}LP(){return this.oa.LP()}OP(t,i){this.oa.OP(t,i)}Hst(){return this.oa.Hst()}Nd(){return this.oa.Nd()}get xe(){return this.FP()}FP(){return this.oa.xe}get UP(){return this.VP()}VP(){return this.oa.UP}HP(){return this.oa.HP()}qP(){return this.oa.qP()}get zP(){return this.GP()}get jP(){return this.QP()}GP(){return this.oa.zP}QP(){return this.oa.jP}get Vx(){return this.oa.Vx}set Vx(t){this.oa.Vx=t}get JP(){return this.ZP()}ZP(){return this.oa.JP}get $P(){return this.tx()}set $P(t){this.ix(t)}tx(){return this.oa.$P}ix(t){this.oa.ix(t)}get hx(){return this.ox()}ox(){return this.oa.hx}get ux(){return this.lx()}set ux(t){this.vx(t)}lx(){return this.oa.ux}vx(t){this.oa.ux=t}gx(){return this.oa.gx()}get mx(){return this.wx()}set mx(t){this.yx(t)}wx(){return this.oa.mx}yx(t){this.oa.mx=t}get Ax(){return this.bx()}bx(){return this.oa.Ax}get Na(){return this.oa.Na}set Na(t){this.oa.Na=t}Tx(){return this.oa.Tx()}get kx(){return this.Ex()}Ex(){return this.oa.kx}get nt(){return this.Ix()}Ix(){return this.oa.nt}get Rx(){return this.Cx()}Cx(){return this.oa.Rx}get rt(){return this.Dx()}Dx(){return this.oa.rt}get Bx(){return this.Nx()}Nx(){return this.oa.Bx}get Mx(){return this.Lx()}set Mx(t){this.Ox(t)}Lx(){return this.oa.Mx}Ox(t){this.oa.Ox(t)}qx(){this.oa.qx()}zx(){this.oa.zx()}Gx(){this.oa.Gx()}be(){this.oa.be()}we(){this.oa.we()}ds(){return this.oa.ds()}Wx(){return this.oa.Wx()}Yx(){this.oa.Yx()}Jx(){this.oa.Jx()}tI(t){return this.oa.tI(t)}Ea(){this.oa.Ea()}nu(){return this.oa.nu()}Ta(t,i){return this.oa.Ta(t,i)}Px(t,i,e){return this.oa.Px(t,i,e)}xx(){return this.oa.xx()}Xx(){return this.oa.Xx()}$x(t){return!1}vz(){this.nnt&&this.oa.lw(this.iI)}_z(){this.nnt&&this.oa.mw(this.iI)}async kn(t){this.Vo(),t||await this.oa.kn(),this._z()}constructor(t,i){super(),this.oa=void 0,this.nnt=void 0,this.iI=t=>{this.$x(t)||this.So(t)},this.oa=t,this.nnt=!i,this.vz()}},zo=function(t){return t[t.lu=0]="lu",t[t.rnt=1]="rnt",t[t.hnt=2]="hnt",t}({}),UF=pf(3,()=>[]);function VF(t,i){UF[i].push(t)}var HF=function(t){return t[t.rnt=0]="rnt",t[t.ont=1]="ont",t[t.ant=2]="ant",t[t.pR=3]="pR",t}({}),WF=pf(4,()=>[]);function Pu(t,i){WF[i].push(t)}var qF=[];function zF(t){for(const i of qF)i(t)}r();var GF=self.CustomEvent;var XF=function(){try{const t=new GF("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?function(t,i){return new CustomEvent(t,i)}:function(t,i){const e=h.createEvent("CustomEvent");return e.initCustomEvent(t,(null==i?void 0:i.bubbles)||!1,(null==i?void 0:i.cancelable)||!1,null==i?void 0:i.detail),e};r();var jF=new class{get V(){return this.oO.length}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=function(t){const i=[];for(let e=0;e{const e=t.unt(i);return e&&e.Ca},i}(this)}CI(t){return this.oO[t]}c$(t){this.oO.push(t),this.Ca.push(t.Ca)}_S(t){const i=this.oO.indexOf(t);i<0||(ka(this.oO,i),this.hu&&ka(this.hu,i))}unt(t){for(const i of this.oO)if(i.jI===t)return i}constructor(){this.oO=[],this.hu=void 0}};function QF(t){let i,e;const s=i=>{e=i;const s=Cn(i,t.Cd);t.Ta(s)},n={get abr(){return t.Dst.Ca},get ads(){var i;return null==(i=t.Jc)?void 0:i.Ca},get audioTracks(){return t.ht.Ca},get autoplay(){return t.cO},set autoplay(i){t.cO=Boolean(i)},get buffered(){return t.RP()},get canvas(){return t.Gst.Ca},get cast(){var i;return null==(i=t.VX)?void 0:i.Ca},get clip(){return t.Vst.Ca},get currentProgramDateTime(){var i;return null!=(i=t.CP)?i:null},set currentProgramDateTime(i){t.CP=null!=i?i:void 0},get currentTime(){return t.LP()},set currentTime(i){t.OP(Number(i))},get duration(){return t.Nd()},get element(){return t.xe},get ended(){return t.UP},get error(){return t.HP()},get errorObject(){return t.qP()},get loop(){return t._J._J},set loop(i){t._J._J=Boolean(i)},get metrics(){return t.JP.Ca},get muted(){return t.$P},set muted(i){t.ix(i)},get network(){return t.oX.Ca},get paused(){return t.hx},get playbackRate(){return t.ux},set playbackRate(i){const e=Number(i);if(e<0)throw new RangeError("playbackRate must be a positive number");t.ux=e},get played(){return t.gx()},get poster(){return t.gi},set poster(i){t.gi=Hi(i)},get preload(){return t.mx},set preload(i){t.mx=function(t){switch(t){case"auto":case"":return"auto";case"metadata":return"metadata";default:return"none"}}(i)},get presentation(){return t.zst.Ca},get readyState(){return t.Ax},get seekable(){return t.Tx()},get seeking(){return t.kx},get source(){return e},set source(t){s(t)},get src(){return JR(t.nu())},set src(t){s({sources:t})},get textTracks(){return t.nt.Ca},get textTrackStyle(){return t.Ql.Ca},get theoLive(){return t.tnt},get uid(){return t.jI},get videoHeight(){return t.Rx},get videoTracks(){return t.rt.Ca},get videoWidth(){return t.Bx},get visibility(){return t.Io.Ca},get volume(){return t.Mx},set volume(i){t.Ox(Number(i))},get latency(){return t.Fx.Ca},get theoads(){return t.ent},get millicast(){return t.jP.Ca},destroy(){t.kn(),t=null,e=void 0},play(){t.cnt()},pause(){t.zx()},stop(){e=void 0,t.Xx()},prepareWithUserAction(){t.qx()},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)},setSource(t){s(t)},addTextTrack:i=>t.tI(function(t){return{Lt:Hi(t.kind),Th:Hi(t.label),bs:Hi(t.language),Km:Hi(t.type)}}(i)).Ca};return i=new Sc(n,!0),i.au(t),i.wn("destroy",()=>{i.kn()}),n}r(),r(),r(),r();var KF=class extends wp{constructor(t){super(d.do),this.source=void 0,this.source=t}};r();var YF=class extends _o{get CP(){}set CP(t){}get MP(){return this.LP()}set MP(t){this.OP(t)}LP(){return this.bz}Hst(){return this.LP()}OP(t,i){this.Sz&&this.bz===t||(this.bz=t,this.Sz=!0,this.So(new F(this.bz)))}get hx(){return this.kz}get ux(){return this.Ez}set ux(t){this.Ez!==t&&(this.Ez=t,this.So(new aa(this.bz,this.ux)))}get Ax(){return mh.VL}get kx(){return this.Sz}Gx(){this.kz&&(this.kz=!1,this.So(new Tc(this.bz)),this.So(new ux(this.bz)))}zx(){this.kz||(this.kz=!0,this.So(new Si(this.bz,this.CP)),this.So(new hl(this.bz)))}hr(){this.bz=0,this.Sz=!1,this.Ez=1,this.zx()}kn(){this.Vo()}we(){}be(){}constructor(){super(),this.bz=void 0,this.kz=void 0,this.Sz=void 0,this.Ez=void 0,this.bz=0,this.kz=!0,this.Sz=!1,this.Ez=1}};r();var JF={zIndex:"1",display:"inline-block",verticalAlign:"middle",backgroundRepeat:"no-repeat",backgroundPosition:"50% 50%",backgroundSize:"contain",cursor:"pointer",margin:"0",padding:"0",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",height:"100%"},ZF={visibility:"hidden"},$F={visibility:"visible"},tU=class{get Yu(){return void 0!==this.dnt?this.dnt:void 0!==this.lnt?this.lnt:void 0}set fnt(t){this.lnt=t,this.er()}er(){const t=this.oa.hx,i=this.vnt;this.Yu?this.Ls.style.backgroundImage='url("'+dp(this.Yu)+'")':this.Ls.style.backgroundImage="",t&&this.Yu&&!i?this.be():this.we()}be(){Ll(ZF,this.oa.xe),Ll($F,this.Ls)}we(){Ll(ZF,this.Ls),Ll($F,this.oa.xe)}vz(){this.oa.wn(d.do,this._nt),this.oa.wn(d.uo,this.LV)}kn(){this.oa.mn(d.do,this._nt),this.oa.mn(d.uo,this.LV),os(this.Ls)}constructor(t){this.Ls=void 0,this.oa=void 0,this.vnt=!1,this.dnt=void 0,this.lnt=void 0,this._nt=t=>{var i;this.vnt=!this.oa.hx,this.dnt=null==(i=t.source)?void 0:i.poster,this.er()},this.LV=()=>{this.vnt=!0,this.we()},this.oa=t,this.vz(),this.Ls=function(){const t=s&&s.document&&s.document.createElement("div");return t.className="theoplayer-poster",Ll(JF,t),t}(),t.xe.appendChild(this.Ls)}};r(),r(),r(),r();var iu=function(t){return t[t.gnt=0]="gnt",t[t.pnt=1]="pnt",t}({});function iU(t){let i;const e={get playing(){return t.zc},get currentAds(){return t.mnt.map(t=>t.wnt())},get currentAdBreak(){var i,e;return null!=(e=null==(i=t.ynt)?void 0:i.wnt())?e:null},get scheduledAds(){return t.Ant.map(t=>t.wnt())},get scheduledAdBreaks(){return t.bnt.map(t=>t.wnt())},skip(){t.rD()},skipAdBreak(i){t.Snt(null!=i?i:void 0)},schedule(i){const e=hC(i,Qh.Ng);e?t.M6(e,iu.gnt,!1):console.error("Invalid ad description")},registerServerSideIntegration(i,e){t.Tnt(i,e)},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new ws(t,e),e}var eU=class extends _o{get zc(){return!!this.qc&&this.qc.zc}get mnt(){return this.qc?this.qc.mnt:[]}get ynt(){return this.qc?this.qc.ynt:null}get Ant(){return this.qc?this.qc.Ant:[]}get bnt(){return this.qc?this.qc.bnt:[]}M6(t,i,e){var s;null==(s=this.qc)||s.M6(t,i,e)}knt(t){var i;null==(i=this.qc)||i.knt(t)}rD(){var t;null==(t=this.qc)||t.rD()}Snt(t){var i;null==(i=this.qc)||i.Snt(t)}Ent(t){var i;null==(i=this.qc)||i.Ent(t)}Tnt(t,i){var e;null==(e=this.qc)||e.Tnt(t,i)}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=iU(this)}async kn(t){this.Vo(),void 0!==this.qc&&(this.qc.mw(this.Rs),t||await this.qc.kn(),this.qc=void 0)}constructor(t){var i;super(),this.qc=void 0,this.hu=void 0,this.qc=t,null==(i=this.qc)||i.lw(this.Rs)}};r(),r();var Gt=class extends Oi{constructor(t,i){super(t),this.od=void 0,this.od=i}},Re=class extends wp{constructor(t,i){super(t),this.adBreak=void 0,this.adBreak=i}},Uu=class extends Gt{xa(){return new sU(this.od.wnt())}constructor(t){super("Pnt",t)}},sU=class extends Re{constructor(t){super("removeadbreak",t)}};r();var nU=class extends Gt{xa(){return new rU(this.od.wnt())}constructor(t){super("xnt",t)}},rU=class extends Re{constructor(t){super("addadbreak",t)}};r(),r();var du=class extends Oi{constructor(t,i){super(t),this.Int=void 0,this.Int=i}},vu=class extends wp{constructor(t,i){super(t),this.ad=void 0,this.ad=i}},Qa=class extends du{xa(){return new hU(this.Int.wnt())}constructor(t){super("Rnt",t)}},hU=class extends vu{constructor(t){super("addad",t)}};r();var Fa=class extends Gt{xa(){return new oU(this.od.wnt())}constructor(t){super("Cnt",t)}},oU=class extends Re{constructor(t){super("adbreakend",t)}};r();var aU=class extends Gt{xa(){return new uU(this.od.wnt())}constructor(t){super("Dnt",t)}},uU=class extends Re{constructor(t){super("adbreakbegin",t)}};r();var dc=class extends du{xa(){return new cU(this.Int.wnt(),this.currentTime)}constructor(t,i){super("Bnt",t),this.currentTime=void 0,this.currentTime=i}},cU=class extends vu{constructor(t,i){super("adbegin",t),this.currentTime=void 0,this.currentTime=i}};r();var bc=class extends du{xa(){return new dU(this.Int.wnt(),this.currentTime)}constructor(t,i){super("Nnt",t),this.currentTime=void 0,this.currentTime=i}},dU=class extends vu{constructor(t,i){super("adend",t),this.currentTime=void 0,this.currentTime=i}};r();var wl=class extends Oi{xa(){return new lU}constructor(){super("Mnt")}},lU=class extends wp{constructor(){super("adadded")}},_l=class extends eU{get BI(){return this.qc}set BI(t){const i=this.qc;if(i===t)return;const e=this.mnt,s=this.ynt,n=this.Ant,r=this.bnt;null==i||i.mw(this.Rs),this.qc=t,null==t||t.lw(this.Rs);const h=this.mnt,o=this.ynt,a=this.Ant,u=this.bnt,c=[];let d=!1;for(const t of r)pi(u,t)||c.push(new Uu(t));for(const t of u)pi(r,t)||c.push(new nU(t));for(const t of a)pi(n,t)||(c.push(new Qa(t)),d=!0);d&&c.push(new wl),s!==o&&(s&&c.push(new Fa(s)),o&&c.push(new aU(o)));for(const t of e)pi(h,t)||c.push(new bc(t,this.oa.LP()));for(const t of h)pi(e,t)||c.push(new dc(t,this.oa.LP()));for(const t of c)this.So(t)}constructor(t){super(void 0),this.oa=void 0,this.oa=t}};r(),r();var fU=class extends _o{get Ca(){var t;return null!=(t=this.hu)?t:this.hu=iU(this)}Ent(t){}Tnt(t,i){}M6(t,i,e){}rD(){}Snt(t){}knt(t){}kn(){return this.Vo(),Promise.resolve()}constructor(...t){super(...t),this.zc=!1,this.ynt=null,this.mnt=[],this.bnt=[],this.Ant=[],this.hu=void 0}},xl=class extends fU{M6(t,i,e){this.Lnt.push({Ont:t,Fnt:i,Unt:e})}rD(){}Ent(t){}Tnt(t,i){this.Vnt.push({kR:t,Hnt:i})}knt(t){const i=this.Vnt.slice(),e=this.Lnt.slice();this.hr();for(const e of i)t.Tnt(e.kR,e.Hnt);for(const i of e)t.M6(i.Ont,i.Fnt,i.Unt)}Wnt(){const t=this.Lnt.map(t=>t.Ont);return this.hr(),t}hr(){Yo(this.Vnt),Yo(this.Lnt)}async kn(){this.hr(),await super.kn()}constructor(...t){super(...t),this.Vnt=[],this.Lnt=[]}};r();var vU=class extends wp{constructor(t){super("tizen2retry"),this.originalErrorEvent=void 0,this.originalErrorEvent=t}};var _U=mu(()=>{let t=FF;t=function(t){return class extends Oc{constructor(i,e){let s=new t(i,e);for(const t of WF)for(const i of t)s=i(s);super(s)}}}(t);let i=function(t){return class extends _o{get jst(){return this.qnt.jst}get Jc(){return this.qc}get Gst(){return this.qnt.Gst}get Cd(){return this.qnt.Cd}get SP(){return this.qnt.SP}get Ma(){return this.qnt.Ma}get mq(){return this.qnt.mq}get zst(){return this.qnt.zst}get Ost(){return this.qnt.Ost}get Pa(){return this.qnt.Pa}get Dst(){return this.qnt.Dst}get cO(){return this.qnt.cO}set cO(t){this.qnt.cO=t,this.znt()}get Nst(){return this.qnt.Nst}get ht(){return this.qnt.ht}get VX(){return this.qnt.VX}get Wu(){return this.qnt.Ost}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}get zP(){return this.qnt.zP}get jP(){return this.qnt.jP}get Vx(){return this.qnt.Vx}set Vx(t){this.qnt.Vx=t}get JP(){return this.qnt.JP}get oX(){return this.qnt.oX}get nt(){return this.qnt.nt}get Ql(){return this.qnt.Ql}get rt(){return this.qnt.rt}get Vst(){return this.qnt.Vst}get _J(){return this.qnt._J}get CP(){return this.oa.CP}set CP(t){this.oa.CP=t}get bt(){return this.qnt.bt}get xe(){return this.qnt.xe}get UP(){return this.qnt.UP}get $P(){return this.qnt.$P}set $P(t){this.ix(t)}get hx(){return this.oa.hx}get gi(){return this.Gnt.Yu||""}set gi(t){this.Gnt.fnt=t}get ux(){return this.lx()}set ux(t){this.vx(t)}lx(){return this.qnt.ux}vx(t){this.oa.ux=t}get mx(){return this.qnt.mx}set mx(t){this.qnt.mx=t}get Ax(){return this.oa.Ax}get Na(){return this.qnt.Na}set Na(t){this.qnt.Na=t}get kx(){return this.oa.kx}get tnt(){return this.qnt.tnt}get ent(){return this.qnt.ent}get jI(){return this.qnt.jI}get Rx(){return this.qnt.Rx}get Bx(){return this.qnt.Bx}get Mx(){return this.qnt.Mx}set Mx(t){this.Ox(t)}get Fx(){return this.qnt.Fx}get Wst(){return this.qnt.Wst}get Io(){return this.qnt.Io}async Zo(t,i){return this.ta.Zo(t,i).catch(yf)}async Xnt(t,i){ii(i),this.qnt.lw(this.jnt);try{await this.qnt.Ta(t,i)}finally{this.qnt.mw(this.jnt)}}async znt(){const t=await this.Qnt();this.Knt(t)}async Qnt(){const t=this.nu();return t&&!qo(t)&&this.cO&&this.hx?this.Nst.HK(this.$P):"none"}Knt(t){var i;const e=(null==(i=this.nu())?void 0:i.mutedAutoplay)||this.Cd.mutedAutoplay;switch(t){case"all":this.cnt();break;case"muted":(this.$P||e===gk.ALL)&&(this.$P=!0,this.Gx())}}Ta(t){qo(this.gz)||this.So(new G(0,mh.VL)),this.hr(),this.gz=t,Wr(this.Zo(async i=>{ii(i);try{await this.Xnt(t,i)}catch(t){return sa(t),this.gz=void 0,void this.qq(vA(t,Vo.SOURCE_NOT_SUPPORTED))}finally{this.Ynt(this.qnt)}const e=await this.Qnt();this.So(new KF(this.nu())),this.Knt(e)}))}OP(t,i){this.oa.OP(t,i)}HP(){var t;return null!=(t=this.Lz)?t:this.qnt.HP()}qP(){var t;return null!=(t=this.JW)?t:this.qnt.qP()}qq(t){void 0===this.qP()&&(this.JW=t,this.Lz=P(t),this.So(new Pi(t)))}Gx(){this.oa.Gx()}cnt(){this.$P||this.qx(),this.Gx()}qx(){this.qnt.qx()}zx(){this.oa.zx()}Xx(){this.Ta(void 0)}be(){this.yz=!0,this.oa.be()}we(){this.yz=!1,this.oa.we()}Ea(){this.qnt.Ea()}Ox(t){this.qnt.Ox(t)}ix(t){this.qnt.ix(t)}Ba(t){this.Jnt=t,t.c$(this)}ds(){return this.qnt.ds()}nu(){return this.gz}Wx(){return this.qnt.Wx()}LP(){return this.oa.LP()}Hst(){return this.oa.Hst()}Nd(){return this.qnt.Nd()}RP(){return this.qnt.RP()}gx(){return this.qnt.gx()}Tx(){return this.qnt.Tx()}Yx(){this.qnt.Yx()}Jx(){this.qnt.Jx()}tI(t){return this.qnt.tI(t)}hr(){this.gz=void 0,this.JW=void 0,this.Lz=void 0,this.Znt=!0,Yo(this.$nt),this.trt.hr(),this.Ynt(this.trt),this.ta.Zg(),Wr(this.ta.Zo(async t=>{ii(t),await this.qnt.Xx()}))}kn(){this.So(new OF),this.Gnt.kn(),this._z(),this.hr(),Wr(this.Zo(async()=>{await this.qnt.kn(),this.Jnt&&(this.Jnt._S(this),this.Jnt=void 0),this.ta.kn()})),this.Vo()}Ynt(t){if(this.oa===t)return;const i=this.oa.hx,e=this.oa.LP(),s=this.oa.ux,n=this.oa.Ax,r=this.oa.kx;this.irt=i,this.M9=n,this._z(),t.lw(this.ert),t===this.qnt?(void 0!==this.qc&&(this.qc.BI=t.Jc,this.nrt.knt(this.qc)),(r||t.LP()!==e)&&t.OP(e),t.ux!==s&&(t.ux=s),i?t.zx():t.Gx()):(void 0!==this.qc&&(this.qc.BI=this.nrt,this.nrt.hr()),this.Cd.retainPlaybackRateOnSourceChange?t.ux=s:1!==s&&this.So(new aa(this.LP(),1))),t.mw(this.ert),this.oa=t,this.vz();for(const t of this.$nt)this.So(t);Yo(this.$nt),this.yz?t.be():t.we()}vz(){this.oa.lw(this.Zx)}_z(){this.oa.mw(this.Zx)}xa(){return QF(this)}constructor(i,e){super(),this.oa=void 0,this.qnt=void 0,this.trt=void 0,this.Gnt=void 0,this.Jnt=void 0,this.ta=void 0,this.$nt=void 0,this.irt=!0,this.M9=mh.VL,this.yz=void 0,this.Znt=!1,this.gz=void 0,this.JW=void 0,this.Lz=void 0,this.qc=void 0,this.nrt=void 0,this.hu=void 0,this.jnt=t=>{t.type!==d.Kw&&this.$nt.push(t)},this.ert=t=>{(t.type!==d.uo||this.oa.hx)&&(t.type===d.jw&&this.oa.hx||t.type===d.$w&&this.oa.kx&&this.oa.LP()===t.currentTime||t.type===d.Kw&&this.oa.ux===t.playbackRate||this.So(t))},this.Zx=t=>{if(this.Znt){if(t.type===Do.SM)return;t.type!==Do.wM&&t.type!==Do.TM||(this.Znt=!1)}if(t.type===d.uo){if(!this.irt)return;this.irt=!1}else if(t.type===d.jw){if(this.irt)return;this.irt=!0}else if(t.type===Do.wI){if(this.M9===t.readyState)return;this.M9=t.readyState}else if(t.type===d.Iw)return;this.So(t)},this.qnt=new t(i,e),this.trt=new YF,this.oa=this.qnt,this.Gnt=new tU(this),this.qnt.Jc&&(this.qc=new _l(this),this.qc.BI=this.qnt.Jc,this.nrt=new xl),this.ta=new te,this.$nt=[],this.yz=!0,this.vz()}}}(t);return Qt.w_&&Qt.A_<3&&(i=function(t){return class extends t{Ta(t){this.rrt=0,super.Ta(t)}So(t){if(t.type===Mc.ma&&this.rrt<3)return this.rrt++,super.So(new vU(t)),void super.Ta(this.nu());super.So(t)}constructor(...t){super(...t),this.rrt=0}}}(i)),i=function(t){let i=t;for(const t of UF)for(const e of t)i=e(i);return i}(i),i});function gU(t,i){const e=mk(i),s=new(_U())(t,e);s.Na=s;let n=s.Ca;return s.Ea(),s.Ba(jF),w.defineProperty(n,"constructor",{value:gU}),n=oS(n),zF(s),n}ct(()=>{self.dispatchEvent&&self.dispatchEvent(XF("theoplayerready"))}),r();var pU={base64:new class{encode(t){return Go(t)}decode(t){return _c(t)}}};r();var mU=JSON.parse('["hbbtv","dash","hesp","millicast","hls","chromecast","ads","theoads","airplay","spotx","vr","cache","webaudio","youbora","mediamelon","moat","google-dai","streamone","lcevc","freewheel","agama","uplynk","mediatailor","ui","relatedcontent","social","upnext","contextmenu","texttrackstyle-ui","activequalitylabel","upcomingadnotification"]');r(),r(),r();var wU=class{get MP(){const t=this.oa.currentTime;return isFinite(t)?t:"now"}get hrt(){return this.oa.src||""}hr(){}constructor(t,i){this.oa=void 0,this.ort=void 0,this.art=!1,this.urt=t=>{this.ort._Q(t.error,this.MP)},this.crt=()=>{this.ort.dQ(this.hrt),this.oa.removeEventListener("playing",this.crt),this.art=!1},this.Ms=()=>{var t,i,e,s;this.art||(this.oa.addEventListener("playing",this.crt),this.art=!0),null==(t=this.oa.ads)||t.removeEventListener("adbegin",this.drt),null==(i=this.oa.theoads)||i.removeEventListener("interstitialbegin",this.lrt);var n,r;(null==(s=this.oa.source)||null==(e=s.ads)?void 0:e.some(t=>"theoads"===t.integration))&&(null==(n=this.oa.ads)||n.addEventListener("adbegin",this.drt),null==(r=this.oa.theoads)||r.addEventListener("interstitialbegin",this.lrt))},this.drt=t=>{"theoads"!==t.ad.integration||t.ad.isSlate||this.ort.vQ("ad")},this.lrt=t=>{const i=t.interstitial;(function(t){return"adbreak"===t.type})(i)||this.ort.vQ(function(t){switch(t){case"adbreak":default:return"ad";case"overlay":return"overlay"}}(i.type))},this.ort=i,this.oa=t,this.oa.addEventListener("error",this.urt),this.oa.addEventListener("sourcechange",this.Ms),this.Ms()}};!function(t){qF.push(t)}(function(t){new wU(t.Ca,t.jst)}),r();var yU="theoplayer-stored-volume",AU="theoplayer-stored-mutedstate";VF(function(t){return class extends t{ix(t){this.Cd.persistVolume&&ba.qy(AU,""+Boolean(t)),super.ix(t)}Ox(t){this.Cd.persistVolume&&ba.qy(yU,""+Number(t)),super.Ox(t)}constructor(t,i){if(super(t,i),i.persistVolume){let t=ba.LJ(yU);(void 0===t||S(t))&&(t=1);const i=ba.OJ(AU)||!1;this.Mx=t,this.$P=i}}}},zo.lu);var bU="10.0.0",SU=jF.Ca,TU=tT.LR.registerContentProtectionIntegration.bind(tT.LR);r(),r();Qt.k_&&Qt.P_?SD(class{HK(t){return Promise.resolve("all")}qx(){}kn(){}}):SD(AD),r(),r(),r(),r();var kU=class{async Xq(t){return ZT(t.type)}async jq(t){return!!await kT(t,!0)}},EU=class extends kU{async Xq(t){return!!za(t.useManagedMediaSource)&&super.Xq(t)}};function PU(t){return yB(t)}function xU(t){const i=Qt.S_||Qt.w_,e=void 0!==t&&void 0!==t.preferredAudioCodecs&&t.preferredAudioCodecs.some(t=>"ac-3"===t||"ec-3"===t),s=i&&!e,n=new gv(!0);return async t=>{const i=t.qT;if(!n.Fp(i)&&!function(t,i){return!!t&&(Hh(t)?zP(i)||XP(i):Ho(t,Gy)||Ho(t,jy)||Ho(t,zy))}(t.oQ,t.frt))return!1;const e=t.frt.some(t=>"ac-3"===t||"ec-3"===t);if(s&&e)return!1;if(t.xW){const e=t.xW,s=De(e,t=>rp(t.y8)).filter(it),n=await async function(t,i){for(const e of t)if(await i(e))return!0;return!1}(s,t=>zd.Sm(t,i));if(!n)return!1}return!0}}r(),r(),r(),r();var IU=class{get Mi(){return this.vrt.offsetHeight*zd.Zs.fp}get Ti(){return this.vrt.offsetWidth*zd.Zs.fp}constructor(t){this.vrt=void 0,this.vrt=t}};r(),r();var RU=class{Gq(t){return this.RW.Gq(t)}dst(t){return this.RW.dst(t)}Pq(t){return this.RW.Pq(t)}constructor(t){this.RW=void 0,this.RW=t}};function CU(t){return class extends t{get $W(){return this.TL.$W}}}r(),r(),r(),r(),r();var DU=class{get Cd(){return this.CS()}CS(){return this.iq.Cd}get Sx(){return this.Tx()}Tx(){return this.iq.Sx}TZ(t){return this.iq.TZ(t)}EZ(t){return this.iq.EZ(t)}zg(){return Promise.resolve()}constructor(t){this.iq=void 0,this.iq=t}},Wo=class extends DU{get Q3(){return this.P4}get K3(){return this.x4}get IP(){return this.RP()}RP(){return this.iq.IP}get ct(){return this.Nd()}Nd(){return this.iq.ct}get WZ(){return this._rt()}_rt(){return this.iq.WZ}C4(t){this.iq.C4(t)}M4(t,i,e,s){this.iq.M4(t,i,e,s)}C3(){this.iq.C3()}A3(){this.iq.A3()}zg(){return this.P4&&(this.P4.zg(),this.P4=void 0),this.x4&&(this.x4.zg(),this.x4=void 0),super.zg()}grt(t){this.iq=t,this.P4?t.Q3?this.P4.prt(t.Q3):(this.P4.zg(),this.P4=void 0):t.Q3&&(this.P4=this.mrt(t.Q3),this.P4.wn(bo,this.wrt)),this.x4?t.K3?this.x4.prt(t.K3):(this.x4.zg(),this.x4=void 0):t.K3&&(this.x4=this.mrt(t.K3),this.x4.wn(bo,this.wrt))}xZ(t){this.iq.xZ(t)}yrt(t){}constructor(t){super(t),this.P4=void 0,this.x4=void 0,this.wrt=t=>this.yrt(t)}};r(),r(),r();var BU=class extends Ne{get UY(){return this.jY}set UY(t){this.jY=t}get IP(){return ve.iL()}get Cd(){return this.YS}get B3(){return Ci.pk}get M3(){return ve.iL()}get Art(){return!1}get MY(){return this.zY}set MY(t){this.zY=t}H2(t,i,e){return Promise.reject(new m("Invalid media buffer"))}V3(){return Promise.reject(new m("Invalid media buffer"))}z2(t,i,e){return Promise.reject(new m("Invalid media buffer"))}WZ(){return!1}C3(){}F3(t,i){}U3(t,i){}_S(t,i,e){return Promise.resolve()}r3(t,i){return Promise.reject(new m("Invalid media buffer"))}wO(t,i){return Promise.reject(new m("Invalid media buffer"))}TZ(t){return!1}EZ(t){return Promise.reject(new m("Invalid media buffer"))}zg(){this.Vo()}constructor(t){super(),this.YS=void 0,this.zY=0,this.jY=0,this.YS=t}},NU=class extends Ne{get UY(){return this.brt()}set UY(t){this.Srt(t)}brt(){return this.Trt.UY}Srt(t){this.Trt.UY=t}get IP(){return this.RP()}RP(){return this.Trt.IP}get Cd(){return this.CS()}CS(){return this.Trt.Cd}get B3(){return this.Trt.B3}get M3(){return this.krt()}krt(){return this.Trt.M3}get MY(){return this.Ert()}set MY(t){this.Prt(t)}Ert(){return this.Trt.MY}Prt(t){this.Trt.MY=t}H2(t,i,e){return this.Trt.H2(t,i,e)}V3(){return this.Trt.V3()}z2(t,i,e){return this.Trt.z2(t,i,e)}F3(t,i){this.Trt.F3(t,i)}U3(t,i){this.Trt.U3(t,i)}_S(t,i,e){return this.Trt._S(t,i,e)}r3(t,i){return this.Trt.r3(t,i)}TZ(t){return this.Trt.TZ(t)}EZ(t){return this.Trt.EZ(t)}Zx(t){this.So(t)}zg(){this.Vo(),this.prt(new BU(this.Cd))}prt(t){this.Trt.mn(bo,this.xrt),this.Trt=t,this.Trt.wn(bo,this.xrt)}constructor(t){super(),this.Trt=void 0,this.xrt=t=>this.Zx(t),this.Trt=t,this.Trt.wn(bo,this.xrt)}},MU=class extends NU{get ost(){return this.TL}set ost(t){this.TL=t}async H2(t,i,e){return ii(e),await this.Irt(this.TL.MP,null==i?void 0:i.xet,null==i?void 0:i.ct),ii(e),t.Km===Po.BT?await this.Rrt(t,i,e):await this.Crt(t,i,e)}async Rrt(t,i,e){let s=t;for(;;){const[t,n]=XA(s.ck);s={Km:Po.BT,ck:t};try{return await this.Drt(s,i,e),void n.cancel(new dt).catch(Ct)}catch(t){if(FD(t)){if(await this.Irt(this.TL.MP,i.xet,i.ct,e)){s={Km:Po.BT,ck:n};continue}}throw n.cancel(t).catch(Ct),t}}}async Crt(t,i,e){for(;;)try{return ii(e),await this.Drt(t,i,e)}catch(t){if(FD(t)){if(await this.Irt(this.TL.MP,i.xet,i.ct,e))continue}throw t}}async Irt(t,i,e,s){const n=OD(t,i,e,this.IP,this.MY,this.UY);for(const[t,i]of n)await this.Brt(t,i,s);return n.length>0}Drt(t,i,e){return super.H2(t,i,e)}Brt(t,i,e){return super._S(t,i,e)}constructor(t){super(t),this.TL=void 0}},LU=class extends Wo{get ost(){return this.TL}set ost(t){this.TL=t,this.P4&&(this.P4.ost=t),this.x4&&(this.x4.ost=t)}mrt(t){const i=new MU(t);return i.ost=this.TL,i}constructor(t){super(t),this.TL=void 0,this.grt(t)}};r();var Jo=class extends DU{get mx(){return this.iq.mx}set mx(t){this.iq.mx=t}};function Sl(t){return class extends t{get $W(){return this.TL.$W}get Bx(){return this.TL.Bx}get Rx(){return this.TL.Rx}Wx(){return this.TL.Wx()}}}r(),r(),r();var OU=class extends Ne{get Nrt(){return this.TL}get IP(){return this.RP()}RP(){return this.TL.IP}get CP(){return this.DP()}DP(){return this.TL.CP}get MP(){return this.LP()}LP(){return this.TL.MP}get Wu(){return this.TL.Wu}get ct(){return this.Nd()}Nd(){return this.TL.ct}get nq(){return this.Mrt()}Mrt(){return this.TL.nq}get UP(){return this.Lrt()}Lrt(){return this.TL.UP}get lt(){return this.TL.lt}get Mi(){return this.TL.Mi}get Ti(){return this.TL.Ti}get Ma(){return this.Hx()}Hx(){return this.TL.Ma}get mq(){return this.Aa()}Aa(){return this.TL.mq}get $P(){return this.TL.$P}set $P(t){this.TL.$P=t}get hx(){return this.Ort()}Ort(){return this.TL.hx}get ux(){return this.TL.ux}set ux(t){this.TL.ux=t}get _x(){return this.gx()}gx(){return this.TL._x}get Ax(){return this.bx()}bx(){return this.TL.Ax}get Sx(){return this.Tx()}Tx(){return this.TL.Sx}get kx(){return this.Ex()}Ex(){return this.TL.kx}get Y4(){return this.Frt()}Frt(){return this.TL.Y4}get a5(){return this.Urt()}Urt(){return this.TL.a5}get nt(){return this.Ix()}Ix(){return this.Vrt}get Ql(){return this.att()}att(){return this.TL.Ql}get i7(){return this.TL.i7}get Mx(){return this.TL.Mx}set Mx(t){this.TL.Mx=t}get R9(){return this.TL.R9}get KP(){return this.TL.KP}get CL(){return this.TL.CL}get Eq(){return this.Hrt()}set Eq(t){this.Wrt(t)}Hrt(){return this.TL.Eq}Wrt(t){this.TL.Eq=t}get N9(){return this.TL.N9}set N9(t){this.qrt(t)}qrt(t){this.TL.N9=t}get p8(){return this.zrt()}zrt(){return this.TL.p8}ZP(){return this.TL.ZP()}Gx(){return this.TL.Gx()}zx(){this.TL.zx()}My(t,i,e){this.TL.My(t,i,e)}KW(t){this.TL.KW(t)}be(){this.TL.be()}we(){this.TL.we()}tI(t,i,e,s,n,r,h,o){return this.TL.tI(t,i,e,s,n,r,h,o)}wq(t){return this.TL.wq(t)}vq(){return this.TL.vq()}gq(t,i,e,s,n){return this.TL.gq(t,i,e,s,n)}iV(t){this.TL.iV(t)}Aq(){this.TL.Aq()}QZ(t){return this.TL.QZ(t)}async Un(t){const i=await this.TL.Un(t);let e;return e=t.Km===Zr.mV?this.Grt(i):this.Xrt(i),this.iq=e,e}async hr(){this.iq&&(await this.iq.zg(),this.iq=void 0),await this.TL.hr()}C8(){return this.TL.C8()}x9(){this.TL.x9()}I9(){this.TL.I9()}async zg(){this.Vo(),this.TL.mn(mB,this.jrt),this.Vrt.BI=void 0,this.Vrt.kn(),this.iq&&(await this.iq.zg(),this.iq=void 0)}D9(){this.TL.D9()}Qrt(t){this.TL.mn(mB,this.jrt),this.TL=t,this.Vrt.BI=t.nt,this.TL.wn(mB,this.jrt)}Zx(t){this.So(t)}constructor(t){super(),this.TL=void 0,this.iq=void 0,this.Vrt=new sl,this.jrt=t=>this.Zx(t),this.TL=t,this.Vrt.BI=t.nt,this.TL.wn(mB,this.jrt)}},$u=class extends OU{get Nrt(){return this.TL}get $W(){return this.TL.$W}get n5(){return this.TL.n5}get Vx(){return this.TL.Vx}set Vx(t){this.TL.Vx=t}B9(t){this.TL.B9(t)}Yx(){this.TL.Yx()}constructor(t){super(t)}},FU=class extends $u{Xrt(t){const i=new LU(t);return i.ost=this,i}Grt(t){return new Jo(t)}},UU=class extends(CU(FU)){constructor(t){super(t)}},VU=class extends(Sl(FU)){constructor(t){super(t)}},Ss=class extends RU{Gq(t){return t===Ci.Bk?new VU(super.Gq(t)):t===Ci.Dk?new UU(super.Gq(t)):void 0}async Pq(t){const i=t;await i.zg(),await super.Pq(i.Nrt)}};r();var HU=class{Krt(){this.oa.Jx()}kn(){s.removeEventListener("pageshow",this.Yrt)}constructor(t){this.oa=void 0,this.Yrt=t=>{t.persisted&&this.Krt()},this.oa=t,s.addEventListener("pageshow",this.Yrt)}};r(),r(),r(),r(),r();var WU=class{Jrt(t,i,e){return Promise.resolve()}Zrt(t,i,e,s){let n=[];if(s){const r={yU:i.EO,AU:i.PO,bU:e.$rt.bU};s.Km===nh.TTML?n=kP(t,s,r,e.oQ):s.Km===nh.WEBVTT&&(n=HE(t,r,this.tht).L)}return n}hr(){}constructor(t){this.tht=void 0,this.tht=t}};r(),r(),r();var qU=function(t){return t.TC="vttc",t.iht="vsid",t.eht="iden",t.sht="ctim",t.nht="sttg",t.rht="payl",t.hht="vtte",t.oht="vtta",t}({}),Ml=class t{static aht(i){return Boolean(t.uht[i])}static TD(i){const e=[],s=Cl.aD(new lc(i,new Ui));for(const i of s)t.aht(i.Km)&&e.push(t.uht[i.Km](i.ck));return e}static cht(i){const e=Cl.aD(i),s=vo(e,qU.iht),n=vo(e,qU.eht),r=vo(e,qU.sht),h=vo(e,qU.nht),o=vo(e,qU.rht);return{Km:qU.TC,dht:s?t.fht(s):void 0,vht:n?t._ht(n):void 0,ght:r?t.pht(r):void 0,mht:h?t.wht(h):void 0,yht:o?t.Aht(o):void 0}}static fht(t){return{Km:qU.iht,bht:t.$C()}}static _ht(t){return{Km:qU.eht,vht:t.nD()}}static pht(t){return{Km:qU.sht,Sht:t.nD()}}static wht(t){return{Km:qU.nht,Tht:t.nD()}}static Aht(t){return{Km:qU.rht,kht:t.nD()}}static Eht(t){return{Km:qU.hht}}static Pht(t){return{Km:qU.oht,xht:t.nD()}}};Ml.uht={[qU.TC]:Ml.cht,[qU.hht]:Ml.Eht,[qU.oht]:Ml.Pht};var zU=class{Jrt(t,i,e){const s=new DataView(t.Iht),n=jt.TD(s),r=Jr(n,t=>t.Km===Ro.OR);return r&&(this.Rht=r.Z[0].KD.gD.qD),Promise.resolve()}Zrt(t,i,e){if(S(this.Rht))return[];const s=dh(t),n=jt.TD(s),r=lr(n,Ro.IC),h=lr(n,Ro.OC);if(!r||0===r.Z.length||!h)return[];const o=function(t,i,e){const s=t.Z[0],n=s.GN?s.GN.GN.toNumber()/e:i.EO,r=[];for(const t of s.zN)r.push(...t.JN);return{Cht:n,JN:r}}(r,i,this.Rht),a=e.$rt.bU;return function(t,i,e,s){const n=Ml.TD(dh(i.ck)),r=t.JN,h=t.Cht+s,o=[];let a=0;for(let t=0;tt.qM(i,e,!1,!1));return t.OM(e)}function jU(t,i){const e=i.Mn(t.BM()).XM((i,e)=>t.Cr(e));return t.OM(e)}r(),r(),r(),r();var Ls=function(t){return t.yot="Aot",t.bot="Sot",t}({});r();var Ou=class extends R{constructor(t,i,e){super("Tot"),this.Tn=void 0,this.An=void 0,this.kot=void 0,this.Tn=t,this.An=i,this.kot=e}},QU=class extends wp{constructor(){super("Eot")}},KU=[d.oy,d.ly,d.iy,d.Sw],YU=class extends Ne{get Pot(){var t,i;return(null==(t=this.Iot.xot)?void 0:t.kot)||(null==(i=this.Iot.Rot)?void 0:i.kot)}get Cot(){return this.Dot}set Bot(t){this.Iot.Bot=t}get Bot(){return this.Iot.Bot}get hk(){return this.Not}Mot(t){this.Not!==t&&(this.Not=t,this.So(new QU))}get Lot(){return this.Dot.Ht.Lot}get lt(){return this.JW}async Tn(t){if(!this.Oot&&!this.Fot)return;const i=this.ww("Eot");this.Oot?(this.Uot.Zg(),this.Uot=new at,$e(this.Vot(this.Uot.Yg),this.Uot)):(this.Hot.Xy(void 0),this.Hot=new pa),await i}get Oot(){return"Wot"===this.Not}get Fot(){return"qot"===this.Not}get zot(){return"Got"===this.Not}get Xot(){return"jot"===this.Not}async Xx(t){if(this.zot||this.Fot)for(0,this.Uot.Zg();!this.Oot&&!this.Xot;)await this.ww("Eot")}async hr(t){this.Xot?(this.JW=void 0,this.Mot("Wot")):await this.Xx(t),this.Iot.hr(),this.Dot.hr()}qq(t){this.JW=t,this.Mot("jot"),this.So(new Pi(t))}Qot(){this.M8.wn(d._y,this.bd),this.M8.wn([d.$w,d.Fw],this.Je),this.Iot.wn(KU,this.Rs),this.Kot.wn(Ls.yot,this.bd)}Yot(){this.M8.mn(d._y,this.bd),this.M8.mn([d.$w,d.Fw],this.Je),this.Iot.mn(KU,this.Rs),this.Kot.mn(Ls.yot,this.bd)}async Jot(t){this.Yot(),this.Zot.Zg(),await this.Xx(null!=t?t:Tu.$ht),this.Iot.hr()}async $ot(t){this.Qot(),await this.Tn(null!=t?t:Tu.Fht)}iat(t,i,e){if(this.Oot)for(const s of t.Dot.eat())s.sat<=e&&i<=s.nat&&this.Kot.rat.some(t=>t.o===s.oat)&&this.Dot.aat(s)}async kn(){this.Vo(),this.Yot(),this.Zot.Zg(),await this.Xx(Tu.tot),this.Iot.kn()}async Vot(t){for(;;)try{ii(t),this.Mot("Got"),await this.Iot.uat(t),ii(t),this.Mot("qot"),await Nc(this.Hot.Qy,t)}catch(t){if(D(t))this.Mot("Wot");else{const i=t instanceof Ga?t:new Ga(Vo.MEDIA_LOAD_ERROR,t.message,t);this.qq(i)}break}}async dat(t){ii(t),await this.Xx(Tu.Zht),this.Iot.hr(),ii(t),await this.Tn(Tu.Lht)}constructor(t,i,e,s,n){super(),this.fat=void 0,this.Kot=void 0,this.Dot=void 0,this.Iot=void 0,this.M8=void 0,this.Not=void 0,this.JW=void 0,this.Hot=void 0,this.Zot=void 0,this.Uot=void 0,this.Je=void 0,this.bd=void 0,this.fat=t,this.Kot=i,this.Dot=e,this.Iot=s,this.M8=n,this.Not="Wot",this.JW=void 0,this.Hot=new pa,this.Zot=new at,this.Uot=new at,this.Je=t=>{if(this.Oot||this.Xot)return;if(!zd.pP&&this.Iot.vat(t.currentTime))return;this.Zot.Zg(),this.Zot=new at;$e(this.dat(this.Zot.Yg),this.Zot).catch(yf)},this.bd=ph(()=>{if(this.Fot){try{this.Iot._at();if(this.Iot.gat())return}catch(t){if(!(t instanceof Ou))throw t}this.Tn(Tu.Oht)}},250),this.Qot()}};r(),r();var JU=class t{pat(t,i){return this.mat(t,!1,i)}wat(t,i){return this.mat(t,!0,i)}async mat(i,e,s){ii(s.Yg);const n=await this.yat(i,e,s);return n.QT?t.Aat(n):this.bat(n)}bat(t){return t}static Aat(t){return t}yat(t,i,e){var s;const n=new $n({Yu:t.Yu,dk:M.CT,fk:t.Sat?{Range:"bytes="+t.Sat[0]+"-"+(null!=(s=t.Sat[1])?s:"")}:void 0,zk:t.zk,Uk:X.GET,Km:Al.yk,Wk:i?Xa.Sk:Xa.pk,qk:this.Tat,Vk:e.Eat,Hk:e.Hk,Yg:e.Yg,jk:e.jk});return this.nV.lk(n)}constructor(t,i){this.nV=void 0,this.Tat=void 0,this.nV=t,this.Tat=i}};r(),r();var ZU=class{Pat(t,i){const e=this.xat**t,s=i*(1-e)+e*this.yet;S(s)||(this.yet=s,this.Iat+=t)}Rat(){const t=1-this.xat**this.Iat;return this.yet/t}constructor(t){this.xat=void 0,this.yet=0,this.Iat=0,this.xat=_.exp(_.log(.5)/t)}},$U=class{Pat(t,i){const e=8e3*i/t,s=t/1e3;this.Cat+=i,this.Dat.Pat(s,e),this.Bat.Pat(s,e)}Rat(){return this.Nat()?_.min(this.Dat.Rat(),this.Bat.Rat()):this.Mat}Nat(){return this.Cat>=this.Lat}constructor(t=2,i=5,e=128e3){this.Dat=void 0,this.Bat=void 0,this.Cat=0,this.Lat=void 0,this.Mat=VI,this.Dat=new ZU(t),this.Bat=new ZU(i),this.Lat=e}},tV=class{get Oat(){return this.Fat.Rat()}get Nat(){return this.Fat.Nat()}Uat(t){const i=t.Vat,e=this.Hat?t.Wat-t.qat:t.Wat-t.zat,s=t.Gat;!s&&i{e.abort(t).catch(Ct)}),[s.readable,i.readable]}(this.Yat);return this.Yat=i,new t(e,this.Qat,this.Kat)}Zat(t){return this.HT(t).then(t=>new Tl(t,this.Qat,this.Kat))}constructor(t,i,e){this.Yat=void 0,this.Qat=void 0,this.Kat=void 0,this.Yat=t,this.Qat=i,this.Kat=e}};r();var sV=class extends R{constructor(t,i,e){super(i,e),this.$at=void 0,this.$at=t}},nV="Cache lookup failed.",rV=class extends Ne{async tut(t,i){ii(i);const e=await this.eut.iut(t.Yu.Yu,t.Yu.Sat);if(ii(i),!e)throw new sV(t,nV);const s=new Tl(e.buffer,e.byteLength,e.reference);return{$at:t.$at,sut:{Km:Po.vZ,ck:s},kot:t.kot,Yu:t.Yu}}async nut(t,i){ii(i);const e=await this.eut.iut(t.Yu,t.Sat);if(ii(i),!e)throw new sV(t,nV);const s=new Tl(e.buffer,e.byteLength,e.reference);return{Km:Po.vZ,ck:s}}kn(){this.Vo()}constructor(t){super(),this.eut=void 0,this.eut=t}};r();var hV=["uy","vy"],oV=class extends Ne{async tut(t,i){let e;for(const s of this.rut)try{return await s.tut(t,i)}catch(t){sa(t),e=t}throw e}async nut(t,i){let e;for(const s of this.rut)try{return await s.nut(t,i)}catch(t){sa(t),e=t}throw e}kn(){for(const t of this.rut)t.mn(hV,this.Rs),t.kn()}constructor(t){super(),this.rut=void 0,this.rut=t;for(const t of this.rut)t.wn(hV,this.Rs)}};function aV(t){return ho(t.hut)}function uV(t){return aV(t)?t.hut:t.aut}r(),r(),r(),r();var cV=class extends wp{constructor(t,i,e,s,n,r){super(t),this.uut=void 0,this.BX=void 0,this.VN=void 0,this.$D=void 0,this.qk=void 0,this.uut=i,this.BX=e,this.VN=s,this.$D=n,this.qk=r}},dV=class extends cV{constructor(t,i,e,s,n){super(d.oy,t,i,e,s,n)}};r(),r();var lV=class{constructor(t,i){this.cut=void 0,this.lut=void 0,this.cut=t,this.lut=i}},fV=class extends lV{get Vat(){return this.fut}start(){}transform(t,i){this.fut+=t.byteLength,i.enqueue(t)}flush(){this.vut(!1)}Zg(){this.vut(!0)}vut(t){this.cut(this.lut,zd.Mg(),this.Vat,t)}constructor(...t){super(...t),this.fut=0}},vV=class extends lV{get Vat(){return this.fut}start(){this.lut=zd.Mg()}transform(t,i){this.fut+=t.byteLength,this._ut||this.gut(t)&&this.vut(!1),i.enqueue(t)}flush(){}Zg(){this.vut(!0)}gut(t){const i=this.mut(t),e=this.wut(i);return Boolean(Jr(e,_V))}mut(t){return this.yut&&void 0!==this.Aut?(this.yut=vm([this.yut,t]),new lc(dh(this.yut),new Ui(this.Aut))):(this.yut=t,new lc(dh(t),new Ui))}wut(t){const i=Cl.uD(t.ck,t.KC,!0);return i.cD?(this.yut=void 0,this.Aut=void 0):this.Aut=t.KC.ac,i.m}vut(t){this._ut||(this.cut(this.lut,zd.Mg(),this.Vat,t),this._ut=!0)}constructor(...t){super(...t),this.fut=0,this._ut=!1,this.yut=void 0,this.Aut=void 0}};function _V(t){return t.Km===Ro.OC}var gV=class{but(t){const i=t._k?this.Sut:zd.Mg(),e=this.Tut(i),s=new Ta(e),n=t.WT().pipeTo(s.writable).then(()=>({JP:{Vat:e.Vat}}),t=>{throw e.Zg(),t});return this.kut.$g(n),s.readable}Eut(t){const i=t._k?this.Sut:zd.Mg(),e=t.HT(),s=e.then(t=>{const e=zd.Mg();return this.Uat(i,e,t.byteLength,!1),{JP:{Vat:t.byteLength}}},t=>{const e=zd.Mg();throw this.Uat(i,e,0,!0),t});return this.kut.$g(s),e}get Put(){return this.kut.Qy}constructor(t){this.xut=void 0,this.kut=void 0,this.Sut=void 0,this.Uat=void 0,this.xut=t,this.kut=new pa,this.Uat=(t,i,e,s)=>{const n={zat:this.Sut,qat:t,Wat:i,Vat:e,Gat:s};this.xut.Uat(n),this.xut.Nat&&HI.Ng.cW(this.xut.Oat)},this.kut.Qy.catch(Ct),this.Sut=zd.Mg()}},pV=class extends gV{Tut(t){return new fV(this.Uat,t)}},mV=class extends gV{Tut(t){return new vV(this.Uat,t)}};r();var wV=class extends cV{constructor(t,i,e,s,n,r,h){super(d.ly,t,i,e,s,n),this.Iut=void 0,this.rO=void 0,this.Iut=r,this.rO=h}};r();var nt=class extends R{constructor(t,i,e){super("Error downloading segment "+uV(i),t),this.Rut=void 0,this.Cut=void 0,this.Dut=void 0,this.Rut=i.EO,this.Cut=i.PO,this.Dut=e}},yV=class extends Ne{But(){return this.Hat?new mV(this.xut):new pV(this.xut)}async tut(t,i){ii(i);const e=t.kot,s=t.Yu,n=t.$at,r=uV(n),h=e.kot?e.kot.jI:-1,o=function(t){const i=t.kot;let e;e=i===function(t){return t.rat.reduce((t,i)=>t.kW=this.Rz.GY}get Hut(){const t=this.Fut.QW;let i;if(t&&t.V>0)i=t.An(0);else{i=this.M8.MP;const t=this.Fut.ZZ,e=t.VM(i);e>=0&&(i=t.An(e))}const e=this.Fut.Sx.Tn(0);if(e>i){if(this.Fut.Tn<=i&&this.Fut.An>=i&&e>i+AV)throw new Ou(i,e);i=e}return i=this.Fut.qut.DM(i),i}constructor(t,i,e,s){this.Fut=void 0,this.M8=void 0,this.i4=void 0,this.Rz=void 0,this.Fut=t,this.M8=i,this.i4=e,this.Rz=s}};r();var SV=class{get zut(){if(0===this.Wm.size)return this.Gut;let t=ve.tL(0,1/0);return t=t.Mn(this.Gut),this.Wm.forEach(i=>{t=t.Mn(i)}),t}Xut(t){return this.Wm.get(t.o)}jut(){let t=this.Gut;return this.Wm.forEach(i=>{t=t.OM(i)}),t}Qut(t){if(this.Gut.Cr(t))return!0;let i=!1;return this.Wm.forEach(e=>{i=i||e.Cr(t)}),i}Kut(t,i){const e=this.Wm.get(i.o);return!!e&&e.Cr(t)}HM(t,i){if(this.Gut.HM(t,i))return!0;let e=!1;return this.Wm.forEach(s=>{e=e||s.HM(t,i)}),e}Yut(t,i){const e=this.Wm.get(i),s=e?e.OM(t):t;this.Wm.set(i,s),this.Gut=this.Gut.OM(t)}Jut(t){this.Wm.forEach((i,e)=>{this.Wm.set(e,i.OM(t))}),this.Gut=this.Gut.OM(t)}Zut(t){this.Wm.forEach((i,e)=>{this.Wm.set(e,i.Mn(t))}),this.Gut=this.Gut.Mn(t)}hr(){this.Wm.forEach((t,i)=>{this.Wm.set(i,ve.iL())}),this.Gut=ve.iL()}constructor(){this.Wm=void 0,this.Gut=void 0,this.Wm=qh(),this.Gut=ve.iL()}},TV=class{get $ut(){return this.tct}get ZZ(){return this.$Z}ict(t){for(const i of this.ect){if(i.sat>t)break;if(i.nat>t)return i}}sct(t){for(const i of this.ect){if(i.nct>t)break;if(i.rct>=t)return i}}hct(t,i){const e=[];for(const s of this.ect){if(s.sat>t)break;s.nat>=i&&e.push(s)}return e}eat(){return this.ect}aat(t){const i=ve.tL(t.nct,t.rct),e=i.BM();this.tct.Zut(e),this.tct.Yut(i,t.oat),this.act(e);const s=li(this.ect,i=>t.sat<=i.sat);if(s<0)this.ect.push(t);else{this.ect[s].nat<=t.nat?this.ect.splice(s,1,t):this.ect.splice(s,0,t)}}t$(t,i){this.$Z.Yut(t,i)}uct(t){this.$Z.Jut(t)}Zut(t){this.tct.Zut(t),this.$Z.Zut(t);const i=this.tct.jut();this.act(i)}act(t){this.ect=this.ect.filter(i=>t.qM(i.nct,i.rct)).map(i=>i.cct&&!t.HM(i.nct,i.rct)?function(t,i){return{oat:t.oat,sat:t.sat,nat:t.nat,nct:t.nct,rct:t.rct,cct:i}}(i,!1):i)}hr(){this.tct.hr(),this.$Z.hr(),this.ect=[]}kn(){this.hr()}constructor(t){this.Ht=void 0,this.tct=void 0,this.$Z=void 0,this.ect=[],this.Ht=t,this.tct=new SV,this.$Z=new SV}};r(),r();var kV=class{get Bot(){return this.dct}set Bot(t){this.dct=t}get Lot(){return this.Dot.Ht.Lot}async lct(t,i,e){let s;ii(e);const n=this.Dot.sct(t);s=n&&uh(n.rct,t,1e-5)?n.nat:t;const r=this.fct(s),h=function(t){return EV.bind(void 0,t)}(s);let o=await this.jp.vct(h,r,i,e);for(ii(e);o&&this._ct(o.$at);){const t=RV(o.$at),s=o.kot;o=await this.jp.vct(t,[s],i,e),ii(e)}if(!o)return void 0;if(!this.gct(o.$at))return o;const a=this.pct(o.$at);if(t=a.An)return await this.findFirstNonAppendedSegmentAfterSegment(o,i,e);if(!o.kot.mct(o.$at))throw new m("Fatal buffering error")}async findFirstNonAppendedSegmentAfterSegment(t,i,e){let s=t;do{const n=RV(s.$at),r=t.kot;s=await this.jp.vct(n,[r],i,e),ii(e)}while(s&&this.gct(s.$at));if(s)return s}async findFirstNonAppendedSegmentBeforeSegment(t,i,e,s){let n=t;do{const s=IV(n.$at),r=t.kot;n=await this.jp.vct(s,[r],i,e),ii(e)}while(n&&this.gct(n.$at));if(!n){0;const i=t.kot.wct.Tn;throw new Ou(i,s.Tn,t.kot)}return n}yct(t){return this.Dot.$ut.Qut(t)}Act(t){return this.Dot.hct(t.EO,t.PO)}gct(t){const i=this.Act(t);return i.length>0&&function(t,i){return function(t){let i=ve.iL();for(const e of t)i=i.OM(ve.tL(e.sat,e.nat));return i}(t).HM(i.EO,i.PO)}(i,t)&&i.every(CV)}_ct(t){return this.Dot.ZZ.HM(t.EO,t.PO)}pct(t){const i=this.Act(t);return{Tn:i[0].nct,An:i[i.length-1].rct}}fct(t){const i=this.bct(t);if(0===i.length){const t=this.dct?this.dct:this.Dot.Ht.rat;return[t[t.length-1]]}const e=i.filter(t=>{var i;return(null==(i=t.kot)?void 0:i.cst)&&!t.Sct});return e.length>0?e:[i[i.length-1]]}bct(t){return(this.dct?this.dct:this.Dot.Ht.rat).filter(i=>!this.Dot.ZZ.Kut(t,i))}constructor(t,i,e){this.fat=void 0,this.Dot=void 0,this.jp=void 0,this.dct=void 0,this.fat=t,this.Dot=i,this.jp=e}};async function EV(t,i,e,s){const n=i.$rt.Tct(t);if(n){if(i.kct(n)){return(await i.Pct(n,e,s)).Ect(t)}return n}}async function PV(t,i,e,s){if(aV(t)){if(0===t.hut)return;const n=i.$rt.xct(t);if(!n)return;return(await i.Pct(n,e,s)).Ict(t.hut-1)}return i.$rt.Rct(t)}async function xV(t,i,e,s){if(aV(t)){const n=i.$rt.xct(t);if(!n)return;const r=await i.Pct(n,e,s);if(t.hut+1===r.V)return;return r.Ict(t.hut+1)}return i.$rt.Cct(t)}function IV(t){return PV.bind(void 0,t)}function RV(t){return xV.bind(void 0,t)}function CV(t){return t.cct}r();var DV=class{async vct(t,i,e,s){ii(s);const n=this.Dct(i,e);if(!n)return;const r=await t(n,this.Bct,s);if(!r)return;const h=n.Nct(r);return{kot:n,$at:r,Yu:h}}Dct(t,i){if(0===t.length)return;const e=this.Lct.Mct(t,this.Oct?i:void 0,this.Fut,this.Rz.WY);return this.Oct||(this.Oct=!0),e}constructor(t,i,e,s){this.Lct=void 0,this.Fut=void 0,this.Rz=void 0,this.Bct=void 0,this.Oct=void 0,this.Lct=t,this.Fut=i,this.Rz=e,this.Bct=s,this.Oct=!1}};r();var BV=class{async vct(t,i,e,s){ii(s);const n=this.Lct.Fct(i,e,this.Fut);if(!n.length)return;let r;for(const i of n)try{ii(s);const e=await t(i,this.Bct,s);if(e){const t=i.Nct(e);if(await this.eut.Uct(t.Yu,t.Sat))return{$at:e,kot:i,Yu:t}}}catch(t){sa(t),r=t}if(r)throw r}constructor(t,i,e,s){this.Lct=void 0,this.Fut=void 0,this.eut=void 0,this.Bct=void 0,this.Lct=t,this.Fut=i,this.eut=e,this.Bct=s}};function NV(t){return void 0!==t.ux}function MV(t,i){const e=t.Ti&&i.Ti,s=t.Mi&&i.Mi;if(e||s){if(e&&s)return t.Ti*t.Mi-i.Ti*i.Mi;if(e)return t.Ti-i.Ti;if(s)return t.Mi-i.Mi;return(t.Ti||1)*(t.Mi||1)-(i.Ti||1)*(i.Mi||1)}return 0}function LV(t,i){return MV(t,i)||function(t,i){return t.kW-i.kW}(t,i)}r(),r();var Br=class t{Mct(i,e,s,n){let r=t.sortByQuality(i);if(void 0!==this.Vct&&void 0===e&&i.length>1){const i=t.Hct(r,this.Vct);i&&(r=i)}const h=this.Fct(r,e,s,n);return h.length?h[h.length-1]:r[0]}Fct(i,e,s,n){var r;const h=t.sortByQuality(i),o={Oat:void 0===n||this.Wct.Nat?this.Wct.Oat:n,ux:NV(s)&&s.ux?s.ux:1,qct:s.Ti,zct:s.Mi,Gct:null==(r=this.Xct)?void 0:r.restrictToPlayerSize};let a=h;for(const t of this.jct)a=t(a,e,o,this.Rm,this.Qct);return a}static Kct(i){return t.sortByQuality(i)[0]}static Yct(i,e){var s;return e?t.Kct(null!=(s=t.Hct(i,e))?s:i):t.Kct(i)}static Hct(t,i){for(const e of i){const i=t.filter(t=>bN(t.Np,e));if(i.length>0)return i}}static sortByQuality(t){const i=[...t];return i.sort(LV),i}constructor(t,i,e,s,n,r){this.Wct=void 0,this.jct=void 0,this.Rm=void 0,this.Xct=void 0,this.Vct=void 0,this.Qct=void 0,this.jct=t,this.Wct=i,this.Rm=e,this.Xct=s,this.Vct=n,this.Qct=r}};r();var OV=(t,i,e,s,n)=>t.filter(t=>n.TZ(t)&&s.xp(i,t));r();var FV=(t,i,e,s)=>void 0===i&&s.Cp?[t[t.length-1]]:t.filter(t=>function(t,i,e){const s=e.Oat;if(s<=0)return!1;return.8*s>t.kW*e.ux}(t,0,e));r();var UV=(t,i,e,s,n)=>{const r=e.Gct;if(void 0===r&&!s.Ks)return t;if(!1===r)return t;if(t.length>0&&t[0].Km!==Ci.Bk)return t;for(let i=t.length-1;i>=0;i--){const s=t[i];if(s.Mi===e.zct&&s.Ti===e.qct)return t.slice(0,i+1);if(s.Mi{if(!1===e.Gct)return t;if(s.dp)return t;const n=s.lp;var r;const h=(null!=(r=null==n?void 0:n.width)?r:e.qct)*zV;var o;const a=(null!=(o=null==n?void 0:n.height)?o:e.zct)*zV;for(let i=t.length-1;i>=0;i--){const e=t[i];if(e.Mi<=a&&e.Ti<=h)return t.slice(0,i+1)}return[]},XV=class{static Ret(t,i,e,s,n,r,h,o,a,u){const c=function(t,i){return new HV([new qV(i),new WV(t)])}(r,h),d=new Br([OV],n,zd.Zs,o,a,u),l=new BV(d,i,h,c),f=new Br([FV,OV,UV,GV],n,zd.Zs,o,a,u),v=new DV(f,i,s,c),_=new VV([l,v]);return new kV(t,e,_)}};r(),r();var jV=class extends wp{constructor(t,i,e,s,n,r=0){super(d.iy),this.segmentStartTime=void 0,this.error=void 0,this.trackType=void 0,this.track=void 0,this.quality=void 0,this.retryCount=void 0,this.segmentStartTime=t,this.error=i,this.trackType=e,this.track=s,this.quality=n,this.retryCount=r}};r();var QV=class extends wp{constructor(t,i){super(d.Sw),this.track=void 0,this.segments=void 0,this.track=t,this.segments=i}},KV=class extends R{constructor(t,i){super(i),this.tdt=void 0,this.tdt=t}},YV=[d.oy,d.ly],JV=class extends Ne{get xot(){return this.idt}get Rot(){return this.edt}set Bot(t){this.sdt.Bot=t}get Bot(){return this.sdt.Bot}get Lot(){return this.Dot.Ht.Lot}ndt(t){return!this.Y2||!t||!lm(this.Y2.Iht,t.Iht)}vat(t){if(!this.idt)return!1;const i=this.idt.$at,e=ve.tL(i.EO,i.PO),s=this.rdt.Uut,n=s.VM(t);return n<0?e.Cr(t,AV):e.qM(t,s.An(n),!0,!0,AV)}async uat(t){const i=this.Dot.Ht.rat;for(;;){let n;try{var e;ii(t),this._at();if(this.gat())break;n=this.hdt();const r=await this.vct(n,t);if(void 0===r)break;if(this.idt=r,!ZV(this.idt)){await this.odt(this.idt,t);continue}var s;if(this.edt&&!pN(this.edt.kot.frt,this.idt.kot.frt)&&await this.Qct.EZ(this.idt.kot),this.idt.kot.xW&&(!this.Rot||(null==(e=this.edt)?void 0:e.kot)!==this.idt.kot))null==(s=this.lq)||s.LW(this.idt.kot.xW);await this.adt(n,this.idt.$at,t),this.Y2=await this.udt(this.idt.kot,t);const h=await this.tut(this.idt,t),o=this.rdt.IP,a=this.edt;this.edt=await this.cdt(h,t);const u=this.rdt.IP;this.ddt(a,this.idt,o,u,n),i.forEach(t=>t.Sct=!1),this.ldt=0,this.fdt=0}catch(e){if(e instanceof Ou){this.F3(e.Tn,e.An,e.kot);continue}if(e instanceof KV){let s=500;if(i.every(t=>t.Sct)){if(2===this.ldt){const t=this.rdt.IP;if(this.vdt(this.idt),this.ddt(this.edt,this.idt,t,t,n),i.forEach(t=>t.Sct=!1),this.fdt+=1,this.ldt=0,this.fdt===this._dt.maxRetries)throw new Ga(Vo.MEDIA_LOAD_ERROR,"The segments could not be loaded.",e);continue}this.ldt++;const t=this._dt.minimumBackoff*2**(this.ldt-1);s=_.min(t,this._dt.maximumBackoff)}await Er(s,t);continue}throw this.gdt=ve.iL(),e}finally{this.idt=void 0}}}ddt(t,i,e,s,n){const r=s.UM(e),h=i.kot,o=h.pdt(i.$at),a=h.mct(i.$at);let u=i.$at.EO,c=i.$at.PO;o&&(u=_.min(u,_.max(0,h.wct.Tn-.05))),a&&(c=_.max(c,h.wct.An));const d=ve.tL(u,c).UM(s);if(0===r.V)return void this.mdt(e,d,u,n);if(o||this.gdt.V>0){const t=d.Mn(ve.tL(u,r.Tn(0)));this.wdt(t)}const l=r.BM().Mn(ve.tL(r.Tn(0),r.An(r.V-1)));if(this.wdt(l),a){const t=d.Mn(ve.tL(r.An(r.V-1),c));this.wdt(t)}if(this.gdt.V>0){const t=this.gdt.UM(r);this.wdt(t),this.gdt=ve.iL()}const f=h.$rt,v=aV(i.$at)?void 0:f.Rct(i.$at);var g;const p=null!=(g=null==t?void 0:t.$at)?g:this.ydt(v)?v:void 0;if(p){const t=this.Dot.hct(p.EO,p.PO);if(t.length>0){const i=ve.tL(t[t.length-1].rct,r.Tn(0));this.wdt(i)}}const m=aV(i.$at)?void 0:f.Cct(i.$at);if(m&&this.ydt(m)){const t=this.Dot.hct(m.EO,m.PO);if(t.length>0){const i=ve.tL(r.An(r.V-1),t[0].nct);this.wdt(i)}}}mdt(t,i,e,s){let n=i;0===this.gdt.V&&(this.gdt=ve.tL(t.An(t.V-1),e)),0===n.V&&void 0!==s&&(n=ve.$M(s)),this.gdt=this.gdt.OM(n),this.Dot.uct(this.gdt)}ydt(t){return!!t&&this.Dot.hct(t.EO,t.PO).length>0}wdt(t){const i=t.UM(this.rdt.IP);for(let t=0;t0)return;var t;const i=this.rdt.Uut.OM(null!=(t=this.rdt.ZZ.CM().JM(this.rdt.Hut))?t:ve.iL());this.Dot.Zut(i),this.Sdt&&!this.Tdt(this.Sdt)&&(this.Sdt=void 0),this.So(new QV(this.Dot.Ht.Lot,this.Dot.eat()))}gat(){return this.edt&&this.edt.kot.mct(this.edt.$at)?(this.Adt.C3(),!0):(this.Sdt&&this.Sdt.kot.mct(this.Sdt.$at)&&this.Tdt(this.Sdt)&&this.Adt.C3(),!!this.rdt.Vut)}Tdt(t){return this.Dot.$ut.HM(t.kdt,t.Edt)}Pdt(t,i,e){(!this.Sdt||this.Sdt.$at.PO=2)return t.kot.Sct=!0,this.Mdt(s,e),this.bdt(Tu.Hht,"Could not fetch the segment.");const n=_.min(this._dt.minimumBackoff*2**e,this._dt.maximumBackoff);await Er(n,i);continue}throw new Ga(Vo.MEDIA_LOAD_ERROR,s.message,s)}}async adt(t,i,e){const s=this.Dot.hct(i.EO,i.PO),n=this.rdt.Uut.JM(t);let r=ve.iL();for(const t of s){ii(e);const i=t.nct,s=t.rct,h=n&&n.qM(i,s)?_.max(i,n.An(0)):i,o=s;ht.Ca))}constructor(t,i){super(Te.EI),this.KI=void 0,this.Ht=void 0,this.KI=t||[],this.Ht=i}},sH=class extends wp{constructor(t){super("targetqualitychanged"),this.qualities=void 0,this.quality=void 0,this.qualities=t,this.quality=this.qualities.length>0?this.qualities[0]:void 0}};r();var nH=class extends Js{xa(){return new rH(this.quality.Ca)}constructor(t){super(Te.QUALITY_UNAVAILABLE),this.quality=void 0,this.quality=t}},rH=class extends Ae{constructor(t){super("qualityunavailable"),this.quality=void 0,this.quality=t}};r();var hH=class extends wp{constructor(){super(Te.NO_QUALITY)}};function oH(t){return{kW:t.kW,Np:t.frt,Mi:aH(t)?t.Mi:0,Km:aH(t)?Ci.Bk:Ci.Dk,Ti:aH(t)?t.Ti:0}}function aH(t){const i=t;return void 0!==i.Mi&&void 0!==i.Ti}r();var uH=0,cH=class extends Ne{get QI(){return this.Kot.Wdt.map(dH).filter(it)}qdt(t){for(const i of t)i.wn("update",this.zdt),this.dO.lO(i)}Gdt(t){if(!this.dO.fO(t))return;t.QU();const i=this.Xdt();if(this.jdt&&pi(this.jdt,t)){const t=this.jdt.filter(t=>t.cst);0===t.length&&i.length>0?this.YI=i:this.YI=t}else this.YI=i;this.So(new nH(t))}Qdt(t){if(!this.dO.fO(t))return;const i=this.Xdt();t.jU(),this.jdt&&!function(t,i){return cf(t,i,(t,i)=>t===i)}(this.jdt,i)||(this.YI=this.Xdt())}Xdt(){return this.dO.II.filter(t=>t.cst)}get XI(){return this.Kdt}Ydt(t){this.Kdt=t.kot,this.So(t)}get Nut(){return this.Kot}get Rt(){return this.We}set Rt(t){this.wO(t)}get Ca(){return this.hu||(this.hu=fo(this)),this.hu}get Jdt(){return this.Zdt}set Jdt(t){this.Zdt=t}get o(){return this.hS}get jI(){return this.gO}get Lt(){return this.b5}get bs(){return this.qA}get Th(){return this.pO}set Th(t){t!==this.pO&&(this.pO=t,this.So(new Uh(this)))}get Xk(){return this.Rt?"enabled":"disabled"}get YI(){return this.jdt}set YI(t){let i;if(t){const e=this.XI?oH(this.XI):void 0;i=t.filter(t=>t.cst&&zd.Zs.xp(e,oH(t)))}else i=this.Xdt();0!==i.length?(this.jdt=t&&this.dO.fO(t)?t:void 0,this.$dt=this.tlt(this.jdt),this.So(new Zo(t,this))):this.So(new hH)}get ilt(){return this.$dt}tlt(t){if(!t||0===t.length)return;const i=[];for(const e of this.rat)for(const s of t)s===e.kot&&s.cst&&i.push(e);return i}get KI(){return this.dO}get rat(){return this.elt}slt(t){this.nlt.push(t),this.elt.push(...t.rat);const i=t.rat.map(t=>t.kot);this.qdt(i)}get Lot(){return this.rlt}get hlt(){return this.nlt}get olt(){return this.rat.every(t=>t.olt)}wO(t){this.We=t,this.Zdt&&(t?this.Zdt.jU(this):this.Zdt.QU(this))}ult(t){this.We=t,this.clt!==t&&(this.clt=t,this.So(new nr(this)))}kn(){for(const t of this.dO.II)t.mn("update",this.zdt);this.dO.hr()}constructor(t,i,e="alternative"){super(),this.Kdt=void 0,this.Kot=void 0,this.We=!1,this.hu=void 0,this.Zdt=void 0,this.hS="",this.gO=void 0,this.b5=void 0,this.pO=void 0,this.qA=void 0,this.clt=!1,this.dO=new Uk,this.elt=[],this.jdt=void 0,this.$dt=void 0,this.rlt=void 0,this.zdt=()=>this.So(new Uh(this)),this.nlt=[],this.Kot=t,this.hS=String(uH++),this.gO=ki(),this.b5=e,this.qA=t.rit,this.pO=t.Th,this.rlt=t.Km,this.elt=t.rat.slice(),this.qdt(i)}};function dH(t){if("urn:mpeg:dash:role:2011"===t.y8)return lH(t);if("urn:tva:metadata:cs:AudioPurposeCS:2007"===t.y8){if("1"===t.zE)return Tn.HI;if("2"===t.zE)return Tn.qI}}function lH(t){if(void 0!==(null==t?void 0:t.zE))switch(t.zE){case"caption":return Tn.VI;case"sign":return Tn.WI;case"description":return Tn.HI;case"enhanced-audio-intelligibility":return Tn.qI;default:return}}var fH=class t extends es{get Rt(){for(const t of this.Z.II)if(t.Xk!==xh.Nh)return!0;return!1}get QW(){const t=this.M8.MP;return this.Uut.JM(t,.01)}get qut(){return ve.eL()}get IP(){var t;return null!=(t=this.dlt&&this.llt.get(this.dlt.jI))?t:ve.iL()}get ZZ(){return this.flt?this.flt.Cot.ZZ.zut:ve.iL()}get Uut(){return XU(this.IP,this.ZZ).LM(2*this.vlt)}get Tn(){return this._lt?this._lt.wct.Tn:NaN}get An(){return this._lt?this._lt.wct.An:NaN}get UP(){const t=this.An;return!!t&&this.M8.MP>=t}get vlt(){var t;const i=this.glt();if(!i)return.04;var e;return 1/(null!=(e=this.dlt&&(null==i||null==(t=i.plt)?void 0:t.iF()))?e:25)}get Mi(){return 0}get B3(){return Ci.NT}get ux(){return this.Ez}set ux(t){this.Ez=t}get _x(){var t;return null!=(t=this.dlt&&this.wlt.get(this.dlt.jI))?t:ve.iL()}get Sx(){if(!this.dlt)return ve.$M(0);const t=this.ylt(this.dlt),i=null==t?void 0:t.Alt,e=null==t?void 0:t.blt;if(void 0===e||void 0===i)return ve.$M(0);const s=_.max(i,this.M8.MP);return new ve([e,s]).CM()}get Ti(){return 0}C3(){}Wut(){return this.Uut.Cr(this.An)}async Odt(t,i,e,s){const n=t.Km===Po.vZ?t.ck.Iht:await t.ck.HT(s),r=this.findTrackForRepresentation(e);let h=this.llt.get(r.jI);const o=i.EO,a=i.PO,u=new ve([o,a]);h||(h=ve.iL(),this.llt.set(r.jI,ve.iL()),this.wlt.set(r.jI,ve.iL())),this.Irt(s);const c=this.Zrt(new j(n),i,e,r);for(const t of c)r.tV(t);return this.llt.set(r.jI,h.OM(u)),{kdt:o,Edt:a}}Irt(t){const i=OD(this.M8.MP,void 0,void 0,this.IP,this.Rz.GY,this.Rz.UY);for(const[e,s]of i)Wr(this.Ldt(e,s,t))}Jrt(t,i,e){return this.Slt.Jrt(t,i,e)}Zrt(t,i,e,s){return this.Slt.Zrt(t,i,e,s)}Ldt(t,i,e){const s=t,n=i;let r=new ve([t,i]);for(const t of this.Z.II){const i=[];for(const e of t.L.II)e.EO>=s&&e.PO<=n?i.push(e):r=r.UM(new ve([e.EO,e.PO]));for(const e of i)t.WU(e);const e=this.llt.get(t.jI);e&&this.llt.set(t.jI,e.UM(r))}return Promise.resolve()}t$(t,i){}i$(t,i){}YY(){return!1}jU(t){if(t&&this.dlt!==t){this.dlt=t;for(const i of this.Z.II)i!==t&&(i.Xk=xh.Nh);if(this.Slt.hr(),this.flt&&(this.flt.kn(),this.flt=void 0),this.dlt){const t=this.ylt(this.dlt);this.flt=new tH(this,this.M8,this.M8,this.nV,this.Rz,!1,this.eut,void 0,void 0,new eH,_k,void 0).Hdt(this.dlt,t),this.flt.wn(Mc.ma,this.Tlt),this.flt.Tn(Tu.Nht)}}}QU(t){this.dlt===t&&(t&&this.dlt===t&&(this.dlt=void 0),this.flt&&(this.flt.kn(),this.flt=void 0))}async Un(t){await this.hr(),this._lt=t,this.klt(t)}Elt(t){const i=function(t){const i=t.rat&&t.rat.length>0&&t.rat[0],e=i&&zP(i.frt),s=zP(t.frt),n=t.oQ===Gy;return e||s||n?nh.TTML:t.oQ===jy||QP(t.oQ,t.frt)?nh.WEBVTT:nh.DEFAULT}(t);if(!i)throw new m("Unknown TextTrack type for Representation");const e=t.Plt.concat(t.Wdt);return this.xlt(function(t){return pi(t.filter(t=>"urn:mpeg:dash:role:2011"===t.y8).map(t=>t.zE).filter(it),"caption")?Ao.FU:Ao.OU}(e),t.Th,t.rit,!1,i,t,function(t){return t.filter(t=>"urn:mpeg:dash:role:2011"===t.y8).some(t=>function(t){return"forced-subtitle"===t||"forced_subtitle"===t}(t.zE))}(t.Plt),t.Wdt.map(lH).filter(it))}klt(t){for(const i of t.Ilt){const t=this.Elt(i);this.Rlt.set(t.jI,i),t.Ax=Zu.LOADED,this.tt(t)}}it(t){this.Rlt.delete(t.jI),super.it(t)}xlt(t,i,e,s,n,r,h,o){var a;const u=Jr(r.rat,t=>""!==t.o);var c,d;const l=null!=(d=null!=(c=null==u?void 0:u.o)?c:null==(a=r.o)?void 0:a.toString())?d:"";return this.JU.tI(t,l,i,e,s,n,h,o)}ZU(t,i,e){const s=Ut(t,i,e),n=this.Rlt.get(t.jI);void 0!==n&&(this.Rlt.set(s.jI,n),this.Rlt.delete(t.jI));const r=this.llt.get(t.jI);void 0!==r&&(this.llt.set(s.jI,r),this.llt.delete(t.jI));const h=this.wlt.get(t.jI);return void 0!==h&&(this.wlt.set(s.jI,h),this.wlt.delete(t.jI)),s}async hr(){await super.hr(),this.flt&&(await this.flt.hr(Tu.eot),this.flt.mn(Mc.ma,this.Tlt),this.flt=void 0),this._lt=void 0,this.llt.clear(),this.wlt.clear()}findTrackForRepresentation(i){for(const e of this.Z.II){const s=this.ylt(e);if(s&&t.Clt(s)===i)return e}}ylt(t){return this.Rlt.get(t.jI)}glt(){if(!this.dlt)return;const i=this.ylt(this.dlt);return i?t.Clt(i):void 0}static Clt(t){return t.rat&&t.rat.length>0?t.rat[0]:void 0}kn(){for(const t of this.Z.II)this.JU.iV(t);return super.kn()}constructor(t,i,e,s,n,r){super(r),this.Ez=1,this.flt=void 0,this.llt=ar(),this.wlt=ar(),this.dlt=void 0,this._lt=void 0,this.Rlt=ar(),this.nV=void 0,this.eut=void 0,this.M8=void 0,this.Rz=void 0,this.Slt=void 0,this.Tlt=t=>{0},this.M8=t,this.nV=i,this.Rz=e,this.Slt=s,this.eut=n}},vH=class{get nt(){return this.Gl}async sV(t){if(t.Km!==Ci.NT)return;const i=function(t,i,e){return zP(i)||t===Gy||t===jy?new WU(e):QP(t,i)?new zU:void 0}(t.oQ,t.frt,this.tht);if(i){const e=this.Dlt(i);return this.Blt(e),await e.Un(t),e}}Dlt(t){return new fH(this.M8,this.nV,this.Rz,t,this.eut,this.JU)}Blt(t){this.Nlt.push(t),this.Gl.FW(t.Z)}async hr(){for(const t of this.Nlt.slice())await t.hr();Yo(this.Nlt),this.Gl.hr()}async kn(){for(const t of this.Nlt)await t.kn();Yo(this.Nlt),this.Gl.kn()}constructor(t,i,e,s,n,r){this.Nlt=[],this.Gl=new Yu([]),this.JU=void 0,this.tht=void 0,this.M8=void 0,this.nV=void 0,this.Rz=void 0,this.eut=void 0,this.M8=t,this.nV=i,this.Rz=e,this.eut=s,this.JU=n,this.tht=r}};r();var _H=class extends wp{constructor(t){super(d.zw),this.error=void 0,this.error=t}};r();var Eh=function(t){return t.mV="static",t.wV="dynamic",t}({});r(),r();var gH=function(t){return t.Mlt="Llt",t}({}),pH=class extends wp{constructor(){super(gH.Mlt)}};r(),r();var mH=class extends wp{constructor(t,i){super(d.Yw),this.representation=void 0,this.previousRepresentation=void 0,this.representation=t,this.previousRepresentation=i}};r(),r(),r();var wH=function(t){return t[t.Olt=0]="Olt",t[t.Flt=1]="Flt",t[t.Ult=2]="Ult",t[t.Vlt=3]="Vlt",t[t.Hlt=4]="Hlt",t[t.Wlt=5]="Wlt",t}({}),qu=function(t){return t[t.qlt=0]="qlt",t[t.zlt=1]="zlt",t[t.Glt=2]="Glt",t[t.Xlt=3]="Xlt",t}({});function yH(t,i,e){return e===wH.Olt?e:i!==qu.qlt&&i!==qu.zlt||e!==wH.Flt&&e!==wH.Ult?t?i===qu.Glt?wH.Hlt:i===qu.Xlt?wH.Vlt:wH.Olt:wH.Wlt:wH.Ult}function AH(t,i,e,s){const n={byte:e};let r=wH.Flt;const h=[],o=31&Wu(i,n,s);n.byte+=1;for(let e=0;e0;)n-=1,s+=bH(t,i);return s}(i,e,4);if("GA94"!==t)return}if(3!==Wu(i,e,s))return;47===r&&(e.byte+=1);const h=t;return h.$lt=e.byte,h}function TH(t){return 4===t.J0}function kH(t){const i=t.filter(TH).map(SH).filter(it),e=[];for(const t of i)e.push(...AH(t.Y0,t.i1,t.$lt,t.t1));return e}r();var EH="und";function PH(t){if(t===EH)return;const i=t.toLowerCase();for(const t of xH)if(t[1]===i||t[2]===i||t["2T"]===i||t["2B"]===i||t[3]===i)return t}var xH=[{l:"Abkhaz",bh:"\u0410\u04a7\u0441\u0443\u0430",1:"ab",2:"abk","2T":"abk","2B":"abk",3:"abk"},{l:"Afar",bh:"Afaraf",1:"aa",2:"aar","2T":"aar","2B":"aar",3:"aar"},{l:"Afrikaans",bh:"Afrikaans",1:"af",2:"afr","2T":"afr","2B":"afr",3:"afr"},{l:"Akan",bh:"Akan",1:"ak",2:"aka","2T":"aka","2B":"aka",3:"aka"},{l:"Albanian",bh:"Shqip",1:"sq",2:"sqi","2T":"sqi","2B":"alb",3:"sqi"},{l:"Amharic",bh:"\u12a0\u121b\u122d\u129b",1:"am",2:"amh","2T":"amh","2B":"amh",3:"amh"},{l:"Arabic",bh:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",1:"ar",2:"ara","2T":"ara","2B":"ara",3:"ara"},{l:"Aragonese",bh:"Aragon\xe9s",1:"an",2:"arg","2T":"arg","2B":"arg",3:"arg"},{l:"Armenian",bh:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",1:"hy",2:"hye","2T":"hye","2B":"arm",3:"hye"},{l:"Assamese",bh:"\u0985\u09b8\u09ae\u09c0\u09af\u09bc\u09be",1:"as",2:"asm","2T":"asm","2B":"asm",3:"asm"},{l:"Avaric",bh:"\u0410\u0432\u0430\u0440",1:"av",2:"ava","2T":"ava","2B":"ava",3:"ava"},{l:"Avestan",bh:"avesta",1:"ae",2:"ave","2T":"ave","2B":"ave",3:"ave"},{l:"Aymara",bh:"Aymar",1:"ay",2:"aym","2T":"aym","2B":"aym",3:"aym"},{l:"Azerbaijani",bh:"Az\u0259rbaycanca",1:"az",2:"aze","2T":"aze","2B":"aze",3:"aze"},{l:"Bambara",bh:"Bamanankan",1:"bm",2:"bam","2T":"bam","2B":"bam",3:"bam"},{l:"Bashkir",bh:"\u0411\u0430\u0448\u04a1\u043e\u0440\u0442\u0441\u0430",1:"ba",2:"bak","2T":"bak","2B":"bak",3:"bak"},{l:"Basque",bh:"Euskara",1:"eu",2:"eus","2T":"eus","2B":"baq",3:"eus"},{l:"Belarusian",bh:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",1:"be",2:"bel","2T":"bel","2B":"bel",3:"bel"},{l:"Bengali",bh:"\u09ac\u09be\u0982\u09b2\u09be",1:"bn",2:"ben","2T":"ben","2B":"ben",3:"ben"},{l:"Bihari",bh:"\u092d\u094b\u091c\u092a\u0941\u0930\u0940",1:"bh",2:"bih","2T":"bih","2B":"bih",3:"bih"},{l:"Bislama",bh:"Bislama",1:"bi",2:"bis","2T":"bis","2B":"bis",3:"bis"},{l:"Bosnian",bh:"Bosanski",1:"bs",2:"bos","2T":"bos","2B":"bos",3:"bos"},{l:"Breton",bh:"Brezhoneg",1:"br",2:"bre","2T":"bre","2B":"bre",3:"bre"},{l:"Bulgarian",bh:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",1:"bg",2:"bul","2T":"bul","2B":"bul",3:"bul"},{l:"Burmese",bh:"\u1019\u103c\u1014\u103a\u1019\u102c\u1018\u102c\u101e\u102c",1:"my",2:"mya","2T":"mya","2B":"bur",3:"mya"},{l:"Catalan",bh:"Catal\xe0",1:"ca",2:"cat","2T":"cat","2B":"cat",3:"cat"},{l:"Chamorro",bh:"Chamoru",1:"ch",2:"cha","2T":"cha","2B":"cha",3:"cha"},{l:"Chechen",bh:"\u041d\u043e\u0445\u0447\u0438\u0439\u043d",1:"ce",2:"che","2T":"che","2B":"che",3:"che"},{l:"Chichewa",bh:"Chichewa",1:"ny",2:"nya","2T":"nya","2B":"nya",3:"nya"},{l:"Chinese",bh:"\u4e2d\u6587",1:"zh",2:"zho","2T":"zho","2B":"chi",3:"zho"},{l:"Chuvash",bh:"\u0427\u04d1\u0432\u0430\u0448\u043b\u0430",1:"cv",2:"chv","2T":"chv","2B":"chv",3:"chv"},{l:"Cornish",bh:"Kernewek",1:"kw",2:"cor","2T":"cor","2B":"cor",3:"cor"},{l:"Corsican",bh:"Corsu",1:"co",2:"cos","2T":"cos","2B":"cos",3:"cos"},{l:"Cree",bh:"\u14c0\u1426\u1403\u152d\u140d\u140f\u1423",1:"cr",2:"cre","2T":"cre","2B":"cre",3:"cre"},{l:"Croatian",bh:"Hrvatski",1:"hr",2:"hrv","2T":"hrv","2B":"hrv",3:"hrv"},{l:"Czech",bh:"\u010ce\u0161tina",1:"cs",2:"ces","2T":"ces","2B":"cze",3:"ces"},{l:"Danish",bh:"Dansk",1:"da",2:"dan","2T":"dan","2B":"dan",3:"dan"},{l:"Divehi",bh:"Divehi",1:"dv",2:"div","2T":"div","2B":"div",3:"div"},{l:"Dutch",bh:"Nederlands",1:"nl",2:"nld","2T":"nld","2B":"dut",3:"nld"},{l:"Dzongkha",bh:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41",1:"dz",2:"dzo","2T":"dzo","2B":"dzo",3:"dzo"},{l:"English",bh:"English",1:"en",2:"eng","2T":"eng","2B":"eng",3:"eng"},{l:"Esperanto",bh:"Esperanto",1:"eo",2:"epo","2T":"epo","2B":"epo",3:"epo"},{l:"Estonian",bh:"Eesti",1:"et",2:"est","2T":"est","2B":"est",3:"est"},{l:"Ewe",bh:"E\u028begbe",1:"ee",2:"ewe","2T":"ewe","2B":"ewe",3:"ewe"},{l:"Faroese",bh:"F\xf8royskt",1:"fo",2:"fao","2T":"fao","2B":"fao",3:"fao"},{l:"Fijian",bh:"Na Vosa Vaka-Viti",1:"fj",2:"fij","2T":"fij","2B":"fij",3:"fij"},{l:"Finnish",bh:"Suomi",1:"fi",2:"fin","2T":"fin","2B":"fin",3:"fin"},{l:"French",bh:"Fran\xe7ais",1:"fr",2:"fra","2T":"fra","2B":"fre",3:"fra"},{l:"Fula",bh:"Fulfulde",1:"ff",2:"ful","2T":"ful","2B":"ful",3:"ful"},{l:"Galician",bh:"Galego",1:"gl",2:"glg","2T":"glg","2B":"glg",3:"glg"},{l:"Georgian",bh:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",1:"ka",2:"kat","2T":"kat","2B":"geo",3:"kat"},{l:"German",bh:"Deutsch",1:"de",2:"deu","2T":"deu","2B":"ger",3:"deu"},{l:"Greek",bh:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",1:"el",2:"ell","2T":"ell","2B":"gre",3:"ell"},{l:"Guaran\xed",bh:"Ava\xf1e'\u1ebd",1:"gn",2:"grn","2T":"grn","2B":"grn",3:"grn"},{l:"Gujarati",bh:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",1:"gu",2:"guj","2T":"guj","2B":"guj",3:"guj"},{l:"Haitian",bh:"Krey\xf2l Ayisyen",1:"ht",2:"hat","2T":"hat","2B":"hat",3:"hat"},{l:"Hausa",bh:"\u0647\u064e\u0648\u064f\u0633\u064e",1:"ha",2:"hau","2T":"hau","2B":"hau",3:"hau"},{l:"Hebrew",bh:"\u05e2\u05d1\u05e8\u05d9\u05ea",1:"he",2:"heb","2T":"heb","2B":"heb",3:"heb"},{l:"Herero",bh:"Otjiherero",1:"hz",2:"her","2T":"her","2B":"her",3:"her"},{l:"Hindi",bh:"\u0939\u093f\u0928\u094d\u0926\u0940",1:"hi",2:"hin","2T":"hin","2B":"hin",3:"hin"},{l:"Hiri Motu",bh:"Hiri Motu",1:"ho",2:"hmo","2T":"hmo","2B":"hmo",3:"hmo"},{l:"Hungarian",bh:"Magyar",1:"hu",2:"hun","2T":"hun","2B":"hun",3:"hun"},{l:"Interlingua",bh:"Interlingua",1:"ia",2:"ina","2T":"ina","2B":"ina",3:"ina"},{l:"Indonesian",bh:"Bahasa Indonesia",1:"id",2:"ind","2T":"ind","2B":"ind",3:"ind"},{l:"Interlingue",bh:"Interlingue",1:"ie",2:"ile","2T":"ile","2B":"ile",3:"ile"},{l:"Irish",bh:"Gaeilge",1:"ga",2:"gle","2T":"gle","2B":"gle",3:"gle"},{l:"Igbo",bh:"Igbo",1:"ig",2:"ibo","2T":"ibo","2B":"ibo",3:"ibo"},{l:"Inupiaq",bh:"I\xf1upiak",1:"ik",2:"ipk","2T":"ipk","2B":"ipk",3:"ipk"},{l:"Ido",bh:"Ido",1:"io",2:"ido","2T":"ido","2B":"ido",3:"ido"},{l:"Icelandic",bh:"\xcdslenska",1:"is",2:"isl","2T":"isl","2B":"ice",3:"isl"},{l:"Italian",bh:"Italiano",1:"it",2:"ita","2T":"ita","2B":"ita",3:"ita"},{l:"Inuktitut",bh:"\u1403\u14c4\u1483\u144e\u1450\u1466",1:"iu",2:"iku","2T":"iku","2B":"iku",3:"iku"},{l:"Japanese",bh:"\u65e5\u672c\u8a9e",1:"ja",2:"jpn","2T":"jpn","2B":"jpn",3:"jpn"},{l:"Javanese",bh:"Basa Jawa",1:"jv",2:"jav","2T":"jav","2B":"jav",3:"jav"},{l:"Kalaallisut",bh:"Kalaallisut",1:"kl",2:"kal","2T":"kal","2B":"kal",3:"kal"},{l:"Kannada",bh:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",1:"kn",2:"kan","2T":"kan","2B":"kan",3:"kan"},{l:"Kanuri",bh:"Kanuri",1:"kr",2:"kau","2T":"kau","2B":"kau",3:"kau"},{l:"Kashmiri",bh:"\u0643\u0634\u0645\u064a\u0631\u064a",1:"ks",2:"kas","2T":"kas","2B":"kas",3:"kas"},{l:"Kazakh",bh:"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",1:"kk",2:"kaz","2T":"kaz","2B":"kaz",3:"kaz"},{l:"Khmer",bh:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",1:"km",2:"khm","2T":"khm","2B":"khm",3:"khm"},{l:"Kikuyu",bh:"G\u0129k\u0169y\u0169",1:"ki",2:"kik","2T":"kik","2B":"kik",3:"kik"},{l:"Kinyarwanda",bh:"Kinyarwanda",1:"rw",2:"kin","2T":"kin","2B":"kin",3:"kin"},{l:"Kyrgyz",bh:"\u041a\u044b\u0440\u0433\u044b\u0437\u0447\u0430",1:"ky",2:"kir","2T":"kir","2B":"kir",3:"kir"},{l:"Komi",bh:"\u041a\u043e\u043c\u0438",1:"kv",2:"kom","2T":"kom","2B":"kom",3:"kom"},{l:"Kongo",bh:"Kongo",1:"kg",2:"kon","2T":"kon","2B":"kon",3:"kon"},{l:"Korean",bh:"\ud55c\uad6d\uc5b4",1:"ko",2:"kor","2T":"kor","2B":"kor",3:"kor"},{l:"Kurdish",bh:"Kurd\xee",1:"ku",2:"kur","2T":"kur","2B":"kur",3:"kur"},{l:"Kwanyama",bh:"Kuanyama",1:"kj",2:"kua","2T":"kua","2B":"kua",3:"kua"},{l:"Latin",bh:"Latina",1:"la",2:"lat","2T":"lat","2B":"lat",3:"lat"},{l:"Luxembourgish",bh:"L\xebtzebuergesch",1:"lb",2:"ltz","2T":"ltz","2B":"ltz",3:"ltz"},{l:"Ganda",bh:"Luganda",1:"lg",2:"lug","2T":"lug","2B":"lug",3:"lug"},{l:"Limburgish",bh:"Limburgs",1:"li",2:"lim","2T":"lim","2B":"lim",3:"lim"},{l:"Lingala",bh:"Ling\xe1la",1:"ln",2:"lin","2T":"lin","2B":"lin",3:"lin"},{l:"Lao",bh:"\u0e9e\u0eb2\u0eaa\u0eb2\u0ea5\u0eb2\u0ea7",1:"lo",2:"lao","2T":"lao","2B":"lao",3:"lao"},{l:"Lithuanian",bh:"Lietuvi\u0173",1:"lt",2:"lit","2T":"lit","2B":"lit",3:"lit"},{l:"Luba-Katanga",bh:"Tshiluba",1:"lu",2:"lub","2T":"lub","2B":"lub",3:"lub"},{l:"Latvian",bh:"Latvie\u0161u",1:"lv",2:"lav","2T":"lav","2B":"lav",3:"lav"},{l:"Manx",bh:"Gaelg",1:"gv",2:"glv","2T":"glv","2B":"glv",3:"glv"},{l:"Macedonian",bh:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438",1:"mk",2:"mkd","2T":"mkd","2B":"mac",3:"mkd"},{l:"Malagasy",bh:"Malagasy",1:"mg",2:"mlg","2T":"mlg","2B":"mlg",3:"mlg"},{l:"Malay",bh:"Bahasa Melayu",1:"ms",2:"msa","2T":"msa","2B":"may",3:"msa"},{l:"Malayalam",bh:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",1:"ml",2:"mal","2T":"mal","2B":"mal",3:"mal"},{l:"Maltese",bh:"Malti",1:"mt",2:"mlt","2T":"mlt","2B":"mlt",3:"mlt"},{l:"M\u0101ori",bh:"M\u0101ori",1:"mi",2:"mri","2T":"mri","2B":"mao",3:"mri"},{l:"Marathi",bh:"\u092e\u0930\u093e\u0920\u0940",1:"mr",2:"mar","2T":"mar","2B":"mar",3:"mar"},{l:"Marshallese",bh:"Kajin M\u0327aje\u013c",1:"mh",2:"mah","2T":"mah","2B":"mah",3:"mah"},{l:"Mongolian",bh:"\u041c\u043e\u043d\u0433\u043e\u043b",1:"mn",2:"mon","2T":"mon","2B":"mon",3:"mon"},{l:"Nauru",bh:"Dorerin Naoero",1:"na",2:"nau","2T":"nau","2B":"nau",3:"nau"},{l:"Navajo",bh:"Din\xe9 Bizaad",1:"nv",2:"nav","2T":"nav","2B":"nav",3:"nav"},{l:"Northern Ndebele",bh:"isiNdebele",1:"nd",2:"nde","2T":"nde","2B":"nde",3:"nde"},{l:"Nepali",bh:"\u0928\u0947\u092a\u093e\u0932\u0940",1:"ne",2:"nep","2T":"nep","2B":"nep",3:"nep"},{l:"Ndonga",bh:"Owambo",1:"ng",2:"ndo","2T":"ndo","2B":"ndo",3:"ndo"},{l:"Norwegian Bokm\xe5l",bh:"Norsk (Bokm\xe5l)",1:"nb",2:"nob","2T":"nob","2B":"nob",3:"nob"},{l:"Norwegian Nynorsk",bh:"Norsk (Nynorsk)",1:"nn",2:"nno","2T":"nno","2B":"nno",3:"nno"},{l:"Norwegian",bh:"Norsk",1:"no",2:"nor","2T":"nor","2B":"nor",3:"nor"},{l:"Nuosu",bh:"\ua188\ua320\ua4bf Nuosuhxop",1:"ii",2:"iii","2T":"iii","2B":"iii",3:"iii"},{l:"Southern Ndebele",bh:"isiNdebele",1:"nr",2:"nbl","2T":"nbl","2B":"nbl",3:"nbl"},{l:"Occitan",bh:"Occitan",1:"oc",2:"oci","2T":"oci","2B":"oci",3:"oci"},{l:"Ojibwe",bh:"\u140a\u14c2\u1511\u14c8\u142f\u14a7\u140e\u14d0",1:"oj",2:"oji","2T":"oji","2B":"oji",3:"oji"},{l:"Old Church Slavonic",bh:"\u0421\u043b\u043e\u0432\u0463\u0301\u043d\u044c\u0441\u043a\u044a",1:"cu",2:"chu","2T":"chu","2B":"chu",3:"chu"},{l:"Oromo",bh:"Afaan Oromoo",1:"om",2:"orm","2T":"orm","2B":"orm",3:"orm"},{l:"Oriya",bh:"\u0b13\u0b21\u0b3f\u0b3c\u0b06",1:"or",2:"ori","2T":"ori","2B":"ori",3:"ori"},{l:"Ossetian",bh:"\u0418\u0440\u043e\u043d \xe6\u0432\u0437\u0430\u0433",1:"os",2:"oss","2T":"oss","2B":"oss",3:"oss"},{l:"Panjabi",bh:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",1:"pa",2:"pan","2T":"pan","2B":"pan",3:"pan"},{l:"P\u0101li",bh:"\u092a\u093e\u0934\u093f",1:"pi",2:"pli","2T":"pli","2B":"pli",3:"pli"},{l:"Persian",bh:"\u0641\u0627\u0631\u0633\u06cc",1:"fa",2:"fas","2T":"fas","2B":"per",3:"fas"},{l:"Polish",bh:"Polski",1:"pl",2:"pol","2T":"pol","2B":"pol",3:"pol"},{l:"Pashto",bh:"\u067e\u069a\u062a\u0648",1:"ps",2:"pus","2T":"pus","2B":"pus",3:"pus"},{l:"Portuguese",bh:"Portugu\xeas",1:"pt",2:"por","2T":"por","2B":"por",3:"por"},{l:"Quechua",bh:"Runa Simi",1:"qu",2:"que","2T":"que","2B":"que",3:"que"},{l:"Romansh",bh:"Rumantsch",1:"rm",2:"roh","2T":"roh","2B":"roh",3:"roh"},{l:"Kirundi",bh:"Kirundi",1:"rn",2:"run","2T":"run","2B":"run",3:"run"},{l:"Romanian",bh:"Rom\xe2n\u0103",1:"ro",2:"ron","2T":"ron","2B":"rum",3:"ron"},{l:"Russian",bh:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",1:"ru",2:"rus","2T":"rus","2B":"rus",3:"rus"},{l:"Sanskrit",bh:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d",1:"sa",2:"san","2T":"san","2B":"san",3:"san"},{l:"Sardinian",bh:"Sardu",1:"sc",2:"srd","2T":"srd","2B":"srd",3:"srd"},{l:"Sindhi",bh:"\u0633\u0646\u068c\u064a\u200e",1:"sd",2:"snd","2T":"snd","2B":"snd",3:"snd"},{l:"Northern Sami",bh:"S\xe1megiella",1:"se",2:"sme","2T":"sme","2B":"sme",3:"sme"},{l:"Samoan",bh:"Gagana S\u0101moa",1:"sm",2:"smo","2T":"smo","2B":"smo",3:"smo"},{l:"Sango",bh:"S\xe4ng\xf6",1:"sg",2:"sag","2T":"sag","2B":"sag",3:"sag"},{l:"Serbian",bh:"\u0421\u0440\u043f\u0441\u043a\u0438",1:"sr",2:"srp","2T":"srp","2B":"srp",3:"srp"},{l:"Gaelic",bh:"G\xe0idhlig",1:"gd",2:"gla","2T":"gla","2B":"gla",3:"gla"},{l:"Shona",bh:"ChiShona",1:"sn",2:"sna","2T":"sna","2B":"sna",3:"sna"},{l:"Sinhala",bh:"\u0dc3\u0dd2\u0d82\u0dc4\u0dbd",1:"si",2:"sin","2T":"sin","2B":"sin",3:"sin"},{l:"Slovak",bh:"Sloven\u010dina",1:"sk",2:"slk","2T":"slk","2B":"slo",3:"slk"},{l:"Slovene",bh:"Sloven\u0161\u010dina",1:"sl",2:"slv","2T":"slv","2B":"slv",3:"slv"},{l:"Somali",bh:"Soomaaliga",1:"so",2:"som","2T":"som","2B":"som",3:"som"},{l:"Southern Sotho",bh:"Sesotho",1:"st",2:"sot","2T":"sot","2B":"sot",3:"sot"},{l:"Spanish",bh:"Espa\xf1ol",1:"es",2:"spa","2T":"spa","2B":"spa",3:"spa"},{l:"Sundanese",bh:"Basa Sunda",1:"su",2:"sun","2T":"sun","2B":"sun",3:"sun"},{l:"Swahili",bh:"Kiswahili",1:"sw",2:"swa","2T":"swa","2B":"swa",3:"swa"},{l:"Swati",bh:"SiSwati",1:"ss",2:"ssw","2T":"ssw","2B":"ssw",3:"ssw"},{l:"Swedish",bh:"Svenska",1:"sv",2:"swe","2T":"swe","2B":"swe",3:"swe"},{l:"Tamil",bh:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",1:"ta",2:"tam","2T":"tam","2B":"tam",3:"tam"},{l:"Telugu",bh:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",1:"te",2:"tel","2T":"tel","2B":"tel",3:"tel"},{l:"Tajik",bh:"\u0422\u043e\u04b7\u0438\u043a\u04e3",1:"tg",2:"tgk","2T":"tgk","2B":"tgk",3:"tgk"},{l:"Thai",bh:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",1:"th",2:"tha","2T":"tha","2B":"tha",3:"tha"},{l:"Tigrinya",bh:"\u1275\u130d\u122d\u129b",1:"ti",2:"tir","2T":"tir","2B":"tir",3:"tir"},{l:"Tibetan Standard",bh:"\u0f56\u0f7c\u0f51\u0f0b\u0f61\u0f72\u0f42",1:"bo",2:"bod","2T":"bod","2B":"tib",3:"bod"},{l:"Turkmen",bh:"T\xfcrkmen\xe7e",1:"tk",2:"tuk","2T":"tuk","2B":"tuk",3:"tuk"},{l:"Tagalog",bh:"Tagalog",1:"tl",2:"tgl","2T":"tgl","2B":"tgl",3:"tgl"},{l:"Tswana",bh:"Setswana",1:"tn",2:"tsn","2T":"tsn","2B":"tsn",3:"tsn"},{l:"Tonga",bh:"faka Tonga",1:"to",2:"ton","2T":"ton","2B":"ton",3:"ton"},{l:"Turkish",bh:"T\xfcrk\xe7e",1:"tr",2:"tur","2T":"tur","2B":"tur",3:"tur"},{l:"Tsonga",bh:"Xitsonga",1:"ts",2:"tso","2T":"tso","2B":"tso",3:"tso"},{l:"Tatar",bh:"\u0422\u0430\u0442\u0430\u0440\u0447\u0430",1:"tt",2:"tat","2T":"tat","2B":"tat",3:"tat"},{l:"Twi",bh:"Twi",1:"tw",2:"twi","2T":"twi","2B":"twi",3:"twi"},{l:"Tahitian",bh:"Reo M\u0101\u2019ohi",1:"ty",2:"tah","2T":"tah","2B":"tah",3:"tah"},{l:"Uyghur",bh:"\u0626\u06c7\u064a\u063a\u06c7\u0631\u0686\u0647",1:"ug",2:"uig","2T":"uig","2B":"uig",3:"uig"},{l:"Ukrainian",bh:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",1:"uk",2:"ukr","2T":"ukr","2B":"ukr",3:"ukr"},{l:"Urdu",bh:"\u0627\u0631\u062f\u0648",1:"ur",2:"urd","2T":"urd","2B":"urd",3:"urd"},{l:"Uzbek",bh:"O\u2018zbek",1:"uz",2:"uzb","2T":"uzb","2B":"uzb",3:"uzb"},{l:"Venda",bh:"Tshiven\u1e13a",1:"ve",2:"ven","2T":"ven","2B":"ven",3:"ven"},{l:"Vietnamese",bh:"Ti\u1ebfng Vi\u1ec7t",1:"vi",2:"vie","2T":"vie","2B":"vie",3:"vie"},{l:"Volap\xfck",bh:"Volap\xfck",1:"vo",2:"vol","2T":"vol","2B":"vol",3:"vol"},{l:"Walloon",bh:"Walon",1:"wa",2:"wln","2T":"wln","2B":"wln",3:"wln"},{l:"Welsh",bh:"Cymraeg",1:"cy",2:"cym","2T":"cym","2B":"wel",3:"cym"},{l:"Wolof",bh:"Wolof",1:"wo",2:"wol","2T":"wol","2B":"wol",3:"wol"},{l:"Western Frisian",bh:"Frysk",1:"fy",2:"fry","2T":"fry","2B":"fry",3:"fry"},{l:"Xhosa",bh:"isiXhosa",1:"xh",2:"xho","2T":"xho","2B":"xho",3:"xho"},{l:"Yiddish",bh:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",1:"yi",2:"yid","2T":"yid","2B":"yid",3:"yid"},{l:"Yoruba",bh:"Yor\xf9b\xe1",1:"yo",2:"yor","2T":"yor","2B":"yor",3:"yor"},{l:"Zhuang",bh:"Cuengh",1:"za",2:"zha","2T":"zha","2B":"zha",3:"zha"},{l:"Zulu",bh:"isiZulu",1:"zu",2:"zul","2T":"zul","2B":"zul",3:"zul"}];r();function IH(t){var i;const e=null!=(i=function(t){const i=t.O0,e=new iN;return e.W0(i,0,i.byteLength),lN(e).w1}(t))?i:24;return t.tft/e}function RH(t){return t.Km===Ro.IC}function CH(t,i,e,s,n){const r=function(t,i,e,s){const n=e.tft,r=Wt.fromNumber(t.ZN||0),h=s.lO($c.gF(r,n));return{ift:s.iF(),eft:s,sft:h,nft:s}}(t,0,e,s),h=$c.pF(t.ct||0,e.tft),o=t.SD||0,a=!(65536&o)&&1!==(o>>24&3);let u;const c=dh(n),d=new Ui;for(;d.act.vU(this,i))}mft(t,i){return new VH(t,i).wft()}},VH=class{wft(){if(this.yft)return[];for(let t=0;t=e)return;const s=De(t,(t,i)=>new VH(t.map(t=>t?t.xft():null),i).wft());return 0!==s.length?new FH(i,e,s):void 0}},qH="black",zH="white";r(),r();var GH=[[42,225],[92,233],[94,237],[95,243],[96,250],[123,231],[124,247],[125,209],[126,241],[127,9608],[128,174],[129,176],[130,189],[131,191],[132,8482],[133,162],[134,163],[135,9834],[136,224],[137,32],[138,232],[139,226],[140,234],[141,238],[142,244],[143,251],[144,193],[145,201],[146,211],[147,218],[148,220],[149,252],[150,8216],[151,161],[152,42],[153,8217],[154,9473],[155,169],[156,8480],[157,8226],[158,8220],[159,8221],[160,192],[161,194],[162,199],[163,200],[164,202],[165,203],[166,235],[167,206],[168,207],[169,239],[170,212],[171,217],[172,249],[173,219],[174,171],[175,187],[176,195],[177,227],[178,205],[179,204],[180,236],[181,210],[182,242],[183,213],[184,245],[185,123],[186,125],[187,92],[188,94],[189,95],[190,124],[191,8764],[192,196],[193,228],[194,214],[195,246],[196,223],[197,165],[198,164],[199,9475],[200,197],[201,229],[202,216],[203,248],[204,9487],[205,9491],[206,9495],[207,9499]].reduce((t,i)=>(t[i[0]]=i[1],t),{}),XH=class{Ift(t){for(let i=0;iHt&&(this.Bft=31)}Nft(t){const i=this.Bft+t;this.Dft(i)}Mft(){this.Nft(-1),this.Rft[this.Bft]=null}vft(t){t>=144&&this.Mft();const i=function(t){return GH[t]?String.fromCharCode(GH[t]):String.fromCharCode(t)}(t);this.addParsedChar(i)}addParsedChar(t){this.Bft>=Ht||(32===Number(t)?(this.Rft[this.Bft]=this.Lft?"
":"",this.Lft=!this.Lft):this.Rft[this.Bft]=t,this.Nft(1))}Oft(t){for(let i=t;i=i)return null;const s=(new UH).pft(this.qft.slice(1));return 0===s.length?null:{TO:new FH(t,i,s),WT:e,zft:this.Hft<<1|this.Wft+1}}hr(){this.Gft(),this.Xft=1}jft(){return this.Xft}Qft(t){this.Xft=t}Dft(t){this.qft[this.Xft].Dft(t)}Nft(t){this.qft[this.Xft].Nft(t)}Kft(){return this.Yft}Jft(t){this.Yft=t}vft(t,i){if(i<32||i>127)return;let e="";switch(t){case 0:e=void 0!==YH[i]?YH[i]:String.fromCharCode(i);break;case 1:e=JH[i];break;case 2:this.Zft(),e=ZH[i];break;case 3:this.Zft(),e=$H[i]}e&&this.qft[this.Xft].addParsedChar(e)}Zft(){this.qft[this.Xft].Mft()}$ft(t,i,e){if(t>=i)for(let s=e-1;s>=0;s--)this.qft[t+s]=this.qft[i+s];else for(let s=0;s0?this.Yft:0,this.Gft()}evt(t){this.svt=t}nvt(t){this.rvt=t}ovt(t){this.avt=t}uvt(t){this.cvt=t}constructor(t,i){this.qft=void 0,this.Xft=void 0,this.Yft=void 0,this.Hft=void 0,this.Wft=void 0,this.svt=void 0,this.rvt=void 0,this.avt=void 0,this.cvt=void 0,this.qft=new Array(QH+1);for(let t=0;t<=QH;t++)this.qft[t]=new XH;this.Xft=1,this.Yft=0,this.Hft=t,this.Wft=i,this.svt=!1,this.rvt=!1,this.avt=zH,this.cvt=qH,this.hr()}},QH=15,KH=function(t){return t[t.dvt=0]="dvt",t[t.lvt=1]="lvt",t[t.fvt=2]="fvt",t[t.vvt=3]="vvt",t}({}),YH={39:"\u2019",42:"\xe1",92:"\xe9",94:"\xed",95:"\xf3",96:"\xfa",123:"\xe7",124:"\xf7",125:"\xd1",126:"\xf1",127:"\u2588"},JH={48:"\xae",49:"\xb0",50:"\xbd",51:"\xbf",52:"\u2122",53:"\xa2",54:"\xa3",55:"\u266a",56:"\xe0",57:"\u2800",58:"\xe8",59:"\xe2",60:"\xea",61:"\xee",62:"\xf4",63:"\xfb"},ZH={32:"\xc1",33:"\xc9",34:"\xd3",35:"\xda",36:"\xdc",37:"\xfc",38:"\u2018",39:"\xa1",40:"*",41:"'",42:"\u2500",43:"\xa9",44:"\u2120",45:"\xb7",46:"\u201c",47:"\u201d",48:"\xc0",49:"\xc2",50:"\xc7",51:"\xc8",52:"\xca",53:"\xcb",54:"\xeb",55:"\xce",56:"\xcf",57:"\xef",58:"\xd4",59:"\xd9",60:"\xf9",61:"\xdb",62:"\xab",63:"\xbb"},$H={32:"\xc3",33:"\xe3",34:"\xcd",35:"\xcc",36:"\xec",37:"\xd2",38:"\xf2",39:"\xd5",40:"\xf5",41:"{",42:"}",43:"\\",44:"^",45:"_",46:"|",47:"~",48:"\xc4",49:"\xe4",50:"\xd6",51:"\xf6",52:"\xdf",53:"\xa5",54:"\xa4",55:"\u2502",56:"\xc5",57:"\xe5",58:"\xd8",59:"\xf8",60:"\u250c",61:"\u2510",62:"\u2514",63:"\u2518"},Rr=class{hr(){this._vt=!0,this.gvt=0,this.Vp=0,this.pvt=this.mvt,this.wvt=void 0,this.mvt.hr(),this.yvt.hr(),this.Avt.hr()}bvt(t,i){return[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&t)<<1|i>>5&1]}Svt(t,i){const e=this.bvt(t,i),s=(30&i)>>1;let n=zH,r=!1;s<7?n=eW[s]:7===s&&(r=!0);const h=!(1&~i);if(4===this.Vp)return;const o=this.pvt;if(3===this.Vp&&e!==o.jft()){const t=1+o.jft()-o.Kft(),i=1+e-o.Kft();o.$ft(i,t,o.Kft()),o.tvt(0,i-1),o.tvt(e+1,QH-e)}o.Qft(e);const a=oF[t<<1&14|i>>5&1]-1;if(a<0)return;const u=function(t,i){const e=i>95?i-96:i-64;return{iit:hF[e].iit,tit:hF[e].tit,eit:hF[e].eit,vit:t}}(a,i);o.Dft(u.eit),this.pvt.evt(h),this.pvt.nvt(r),this.pvt.ovt(n),this.pvt.uvt(qH)}Tvt(t,i){this.pvt.evt(!1),this.pvt.nvt(!1),this.pvt.ovt(zH);const e=this.kvt(t,KH.dvt," ".charCodeAt(0));let s=zH,n=!1;const r=!(1&~i);return s=eW[(14&i)>>1],"white_italics"===s&&(s="white",n=!0),this.pvt.evt(r),this.pvt.nvt(n),this.pvt.ovt(s),e}kvt(t,i,e){if(this.pvt.vft(i,e),2===this.Vp||3===this.Vp){const i=this.Evt(this.pvt,this.gvt,t);return this.gvt=t,i}return null}Evt(t,i,e){return this._vt?null:2===this.Vp||3===this.Vp?t.Vft(e,e+10):t.Vft(i,e)}Pvt(t,i){let e=qH;7&t||(e=iW[(14&i)>>1]),this.pvt.uvt(e)}xvt(t){const i=tW,e=t.Ivt,s=t.Rvt;let n=null;switch(e){case i.RCL:this.Cvt();break;case i.BS:this.Dvt();break;case i.AOD:case i.AON:case i.DER:break;case i.RU2:n=this.Bvt(2,s);break;case i.RU3:n=this.Bvt(3,s);break;case i.RU4:n=this.Bvt(4,s);break;case i.FON:n=this.Nvt(s);break;case i.RDC:this.Mvt(s);break;case i.TR:this.Lvt();break;case i.RTD:this.Ovt();break;case i.EDM:n=this.Fvt(s);break;case i.CR:n=this.Uvt(s);break;case i.ENM:this.Vvt();break;case i.EOC:n=this.Hvt(s)}return n}Uvt(t){const i=this.pvt;if(3!==this.Vp)return null;const e=this.Evt(i,this.gvt,t),s=i.jft()-i.Kft()+1;return i.$ft(s-1,s,i.Kft()),i.tvt(0,s-1),i.tvt(i.jft(),QH-i.jft()),this.gvt=t,e}Bvt(t,i){this.pvt=this.mvt;const e=this.pvt;let s=null;return 3!==this.Vp&&4!==this.Vp&&(s=this.Evt(e,this.gvt,i),this.mvt.ivt(),this.yvt.ivt(),this._vt=!1,e.Qft(QH)),this.Vp=3,e.Jft(t),s}Nvt(t){return this.kvt(t,KH.dvt," ".charCodeAt(0))}Fvt(t){const i=this.mvt;let e=null;return 4!==this.Vp&&(e=this.Evt(i,this.gvt,t)),i.Gft(),this._vt=!1,e}Mvt(t){this.Vp=2,this.pvt=this.mvt,this.pvt.Jft(0),this.gvt=t}Vvt(){this.yvt.Gft()}Hvt(t){let i=null;4!==this.Vp&&(i=this.Evt(this.mvt,this.gvt,t));const e=this.yvt;return this.yvt=this.mvt,this.mvt=e,this.Cvt(),this.gvt=t,i}Cvt(){this.Vp=1,this.pvt=this.yvt,this.pvt.Jft(0)}Dvt(){this.pvt.Zft()}Lvt(){this.Avt.hr(),this._vt=!1,this.Ovt()}Ovt(){this.pvt=this.Avt,this.Vp=4}Wvt(t,i,e){return this.pvt.vft(KH.dvt,i),this.kvt(t,KH.dvt,e)}qvt(t,i,e){const s=1&i?KH.vvt:KH.fvt;return this.kvt(t,s,e)}zvt(t){const i=t.Gvt,e=t.Ivt,s=t.Rvt;if(this.wvt===(i<<8|e))return this.wvt=void 0,null;if(this.wvt=i<<8|e,this.Xvt(i,e))this.Svt(i,e);else{if(this.jvt(i,e))return this.Tvt(s,e);if(this.Qvt(i,e))this.Pvt(i,e);else{if(this.Kvt(i,e))return this.kvt(s,KH.lvt,e);if(this.Yvt(i,e))return this.qvt(s,i,e);if(this.Jvt(i,e))return this.xvt(t);this.isTabOffset(i)&&this.pvt.Nft(e-32)}}return null}isTabOffset(t){return 23===t||31===t}Jvt(t,i){return 20==(246&t)&&32==(240&i)}Xvt(t,i){return 16==(240&t)&&64==(192&i)}jvt(t,i){return 17==(247&t)&&32==(240&i)}Qvt(t,i){return 16==(247&t)&&32==(240&i)||23==(247&t)&&45==(255&i)}Kvt(t,i){return 17==(247&t)&&48==(240&i)}Yvt(t,i){return 18==(246&t)&&32==(224&i)}static Zvt(t){return 16==(112&t)}constructor(t,i){this.Vp=void 0,this.Avt=void 0,this.mvt=void 0,this.yvt=void 0,this.pvt=void 0,this.gvt=void 0,this.wvt=void 0,this._vt=void 0,this.Vp=0,this.Avt=new jH(t,i),this.mvt=new jH(t,i),this.yvt=new jH(t,i),this.pvt=this.mvt,this.gvt=0,this.wvt=void 0,this._vt=!1}},tW={RCL:32,BS:33,AOD:34,AON:35,DER:36,RU2:37,RU3:38,RU4:39,FON:40,RDC:41,TR:42,RTD:43,EDM:44,CR:45,ENM:46,EOC:47},iW=["black","green","blue","cyan","red","yellow","magenta","black"],eW=["white","green","blue","cyan","red","yellow","magenta","white_italics"];r(),r(),r();var sW=class{xft(){return this.$vt}t_t(){return this.svt}i_t(){return this.rvt}e_t(){return this.cvt}s_t(){return this.avt}constructor(t,i,e,s,n){this.$vt=void 0,this.svt=void 0,this.rvt=void 0,this.cvt=void 0,this.avt=void 0,this.$vt=t,this.svt=i,this.rvt=e,this.cvt=s,this.avt=n}},nW=class{n_t(t,i,e,s,n,r,h){this.yz=t,this.r_t=i,this.h_t=e,this.o_t=s,this.a_t=n,this.u_t=r,this.c_t=h}d_t(){this.l_t=[];for(let t=0;t=0,i=this.g_t=0;return t&&i}Re(){return this.yz}m_t(t){let i=0;for(let e=t;e=this.u_t)return this.m_t(1),void(this.g_t=0);this.Xft++,this.g_t=0}y_t(){this.l_t[this.Xft]=this.f_t(),this.g_t=0}Vft(t,i){if(this.OO>=t)return null;const e=WH.Pft(this.l_t,this.OO,t);return e?(this.A_t(t),{TO:e,WT:"svc"+i,zft:i}):null}b_t(t,i){this.Xft=t,this.g_t=i}S_t(t){this.cvt=t}T_t(t){this.avt=t}k_t(t){this.svt=t}E_t(t){this.rvt=t}P_t(){this.Xft=0,this.g_t=0,this.svt=!1,this.rvt=!1,this.avt=zH,this.cvt=qH}x_t(t){this.I_t=t}R_t(){this.yz=!0}we(){this.yz=!1}Mh(){this.yz=!this.yz}A_t(t){this.OO=t}constructor(t){this.C_t=void 0,this.yz=void 0,this.a_t=void 0,this.h_t=void 0,this.r_t=void 0,this.o_t=void 0,this.u_t=void 0,this.c_t=void 0,this.I_t=void 0,this.l_t=void 0,this.OO=void 0,this.Xft=void 0,this.g_t=void 0,this.rvt=void 0,this.svt=void 0,this.avt=void 0,this.cvt=void 0,this.C_t=t,this.yz=!1,this.a_t=!1,this.h_t=0,this.r_t=0,this.o_t=0,this.u_t=0,this.c_t=0,this.I_t=2,this.l_t=[],this.OO=0,this.Xft=0,this.g_t=0,this.rvt=!1,this.svt=!1,this.avt=zH,this.cvt=qH,this.d_t()}},rW=42,hW=15,oW=class{D_t(t){const i=t.B_t();let e=i.zE;const s=i.Rvt;if(e===lW){e=e<<16|t.B_t().zE}return e>=0&&e<=31?this.N_t(e,s):e>=128&&e<=159?this.M_t(t,e,s):(e>=4096&&e<=4127?this.L_t(t,255&e):e>=4224&&e<=4255?this.O_t(t,255&e):e>=32&&e<=127?this.F_t(e):e>=160&&e<=255?this.U_t(e):e>=4128&&e<=4223?this.V_t(255&e):e>=4256&&e<=4351&&this.H_t(255&e),null)}F_t(t){this.W_t&&(127!==t?this.W_t.v_t(String.fromCharCode(t)):this.W_t.v_t("\u266a"))}U_t(t){this.W_t&&this.W_t.v_t(String.fromCharCode(t))}V_t(t){if(!this.W_t)return;if(void 0===fW[t])return void this.W_t.v_t("_");const i=fW[t];this.W_t.v_t(i)}H_t(t){this.W_t&&(160===t?this.W_t.v_t("[CC]"):this.W_t.v_t("_"))}N_t(t,i){if(!this.W_t)return null;const e=this.W_t;let s=null;switch(t){case aW:e.p_t();break;case cW:e.Re()&&(s=e.Vft(i,this.q_t)),e.w_t();break;case dW:e.Re()&&(s=e.Vft(i,this.q_t)),e.y_t();break;case uW:e.Re()&&(s=e.Vft(i,this.q_t)),e.d_t(),e.b_t(0,0)}return s}M_t(t,i,e){if(i>=128&&i<=135){const t=7&i;this.z_t(t)}else{if(136===i){const i=t.B_t().zE;return this.G_t(i,e)}if(137===i){const i=t.B_t().zE;this.X_t(i,e)}else{if(138===i){const i=t.B_t().zE;return this.j_t(i,e)}if(139===i){const i=t.B_t().zE;return this.Q_t(i,e)}if(140===i){const i=t.B_t().zE;return this.K_t(i,e)}if(143===i)return this.hr(e);if(144===i)this.Y_t(t);else if(145===i)this.J_t(t);else if(146===i)this.b_t(t);else if(151===i)this.Z_t(t);else if(i>=152&&i<=159){const s=(15&i)-8;this.n_t(t,s,e)}}}return null}L_t(t,i){i>=8&&i<=15?t.rD(1):i>=16&&i<=23?t.rD(2):i>=24&&i<=31&&t.rD(3)}O_t(t,i){i>=128&&i<=135?t.rD(4):i>=136&&i<=143&&t.rD(5)}z_t(t){this.$_t[t]&&(this.W_t=this.$_t[t])}*tgt(t){for(let i=0;i<8;i++){!(1&~t)&&this.$_t[i]&&(yield i),t>>=1}}G_t(t,i){let e=null;for(const s of this.tgt(t)){const t=this.$_t[s];t.Re()&&(e=t.Vft(i,this.q_t)),t.d_t()}return e}X_t(t,i){for(const e of this.tgt(t)){const t=this.$_t[e];t.Re()||t.A_t(i),t.R_t()}}j_t(t,i){let e=null;for(const s of this.tgt(t)){const t=this.$_t[s];t.Re()&&(e=t.Vft(i,this.q_t)),t.we()}return e}Q_t(t,i){let e=null;for(const s of this.tgt(t)){const t=this.$_t[s];t.Re()?e=t.Vft(i,this.q_t):t.A_t(i),t.Mh()}return e}K_t(t,i){let e=null;for(const s of this.tgt(t)){const t=this.$_t[s];t.Re()&&(e=t.Vft(i,this.q_t)),this.$_t[s]=void 0}return e}hr(t){const i=this.K_t(255,t);return this.Gy(),i}Gy(){this.W_t=void 0,this.$_t=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0]}Y_t(t){t.rD(1);const i=t.B_t().zE;if(!this.W_t)return;const e=(128&i)>0,s=(64&i)>0;this.W_t.E_t(e),this.W_t.k_t(s)}J_t(t){const i=t.B_t().zE,e=t.B_t().zE;if(t.rD(1),!this.W_t)return;const s=3&i,n=(12&i)>>2,r=(48&i)>>4,h=3&e,o=(12&e)>>2,a=(48&e)>>4,u=this.igt(r,n,s),c=this.igt(a,o,h);this.W_t.T_t(u),this.W_t.S_t(c)}b_t(t){const i=t.B_t().zE,e=t.B_t().zE;if(!this.W_t)return;const s=15&i,n=63&e;this.W_t.b_t(s,n)}Z_t(t){t.rD(1),t.rD(1);const i=t.B_t().zE;if(t.rD(1),!this.W_t)return;const e=3&i;this.W_t.x_t(e)}n_t(t,i,e){const s=void 0!==this.$_t[i];if(!s){const t=new nW(i);t.A_t(e),this.$_t[i]=t}const n=t.B_t().zE,r=t.B_t().zE,h=t.B_t().zE,o=t.B_t().zE,a=t.B_t().zE,u=t.B_t().zE,c=(32&n)>0,d=127&r,l=(128&r)>0,f=h,v=1+(15&o),_=(240&o)>>4,g=1+(63&a);s&&0===(7&u)||this.$_t[i].P_t(),this.$_t[i].n_t(c,d,f,_,l,v,g),this.W_t=this.$_t[i]}igt(t,i,e){const s={0:0,1:0,2:1,3:1};return vW[s[t]<<2|s[i]<<1|s[e]]}constructor(t){this.q_t=void 0,this.$_t=void 0,this.W_t=void 0,this.q_t=t,this.$_t=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0],this.W_t=void 0}},aW=8,uW=12,cW=13,dW=14,lW=16,fW={32:" ",33:"\xa0",37:"\u2026",42:"\u0160",44:"\u0152",48:"\u2588",49:"\u2018",50:"\u2019",51:"\u201c",52:"\u201d",53:"\u2022",57:"\u2122",58:"\u0161",60:"\u0153",61:"\u2120",63:"\u0178",118:"\u215b",119:"\u215c",120:"\u215d",121:"\u215e",122:"\u2502",123:"\u2510",124:"\u2514",125:"\u2500",126:"\u2518",127:"\u250c"},vW=["black","blue","green","cyan","red","magenta","yellow","white"];r();var _W=class{egt(t){if(t.Km===qu.Xlt){const i=63&t.zE;return this.sgt=2*i-1,void(this.ngt=[])}if(this.ngt&&(this.sgt>0&&(this.ngt.push(t),this.sgt--),0===this.sgt)){const t=new gW(this.ngt);this.rgt.push(t),this.ngt=null,this.sgt=0}}hgt(){return this.rgt}ogt(){this.rgt=[]}Gy(){this.rgt=[],this.ngt=[],this.sgt=0}constructor(){this.rgt=void 0,this.ngt=void 0,this.sgt=void 0,this.rgt=[],this.ngt=null,this.sgt=0}},gW=class{agt(){return this.ugtthis.cgt.length)throw new Ga(Vo.SUBTITLE_PARSE_ERROR,"Buffer read out of bounds / invalid CEA-708 Data.");this.ugt+=t}constructor(t){this.ugt=void 0,this.cgt=void 0,this.ugt=0,this.cgt=t}},pW=class{Gy(){this.lgt=0,this.fgt=[],this.vgt=[],this._gt.Gy(),this.hr(),this.ggt.forEach(t=>{t.Gy()})}hr(){this.pgt=0,this.mgt=0,this.wgt.forEach(t=>{t.hr()})}ygt(t,i){if(t.Klt){const e=t.Jlt,s=t.Zlt,n=t.Km;n===qu.qlt||n===qu.zlt?this.fgt.push({Rvt:i,Km:n,Gvt:e,Ivt:s,Agt:this.fgt.length}):this.bgt&&(this.vgt.push({Rvt:i,Km:n,zE:e,Agt:this.vgt.length}),this.vgt.push({Rvt:i,Km:qu.Glt,zE:s,Agt:this.vgt.length}))}}rj(){const t=[];this.fgt.sort((t,i)=>t.Rvt-i.Rvt||t.Agt-i.Agt),this.vgt.sort((t,i)=>t.Rvt-i.Rvt||t.Agt-i.Agt);for(const i of this.fgt){const e=this.Sgt(i);e&&t.push(e)}for(const t of this.vgt)this._gt.egt(t);const i=this._gt.hgt();for(const e of i){const i=this.Tgt(e);t.push(...i)}return this._gt.ogt(),this.fgt=[],this.vgt=[],t}Sgt(t){const i=t.Km;if(Rr.Zvt(t.Gvt)){const e=t.Gvt>>3&1;0===i?this.pgt=e:this.mgt=e}const e="CC"+(i<<1|(i?this.mgt:this.pgt)+1),s=this.wgt.get(e);return 255===t.Gvt&&255===t.Ivt||!t.Gvt&&!t.Ivt||!this.kgt(t.Gvt)||!this.kgt(t.Ivt)?(++this.lgt>=45&&this.hr(),null):(this.lgt=0,t.Gvt&=127,t.Ivt&=127,t.Gvt||t.Ivt?Rr.Zvt(t.Gvt)?s.zvt(t):s.Wvt(t.Rvt,t.Gvt,t.Ivt):null)}Tgt(t){const i=[];try{for(;t.agt();){const e=t.B_t().zE;let s=(224&e)>>5;const n=31&e;if(7===s&&0!==n){s=63&t.B_t().zE}if(0!==s){if(!this.ggt.has(s)){const t=new oW(s);this.ggt.set(s,t)}const e=this.ggt.get(s),r=t.dgt();for(;t.dgt()-r>=1;return 1===i}constructor(){this.fgt=void 0,this.vgt=void 0,this._gt=void 0,this.lgt=void 0,this.wgt=void 0,this.pgt=void 0,this.mgt=void 0,this.ggt=void 0,this.bgt=!1,this.fgt=[],this.vgt=[],this._gt=new _W,this.lgt=0,this.wgt=xg({CC1:new Rr(0,0),CC2:new Rr(0,1),CC3:new Rr(1,0),CC4:new Rr(1,1)}),this.pgt=0,this.mgt=0,this.ggt=ar(),this.hr()}};r();var mW=class extends wp{constructor(t,i){super("Egt"),this.zft=void 0,this.TO=void 0,this.zft=t,this.TO=i}},wW=$c.eU(.1),yW=class extends Ne{Pgt(t,i){this.xgt.ygt(t,i)}rj(){const t=this.xgt.rj();for(const i of t)this.So(new mW(i.zft,i.TO))}hr(){this.xgt.Gy()}kn(){this.Vo(),this.xgt.Gy()}constructor(){super(),this.xgt=void 0,this.xgt=new pW}},AW=class extends yW{Igt(t,i,e,s){const n=this.Rgt(t,s);this.Cgt(n,i,e),this.rj()}Rgt(t,i){const e=t.slice().sort(aF),s=this.Dgt;if(0===s.length)return e;if(0===e.length)return s;let n;const r=s[0].sit,h=s[s.length-1].sit,o=e[0].sit,a=s[0].kot===e[0].kot;if(h.lF(o).uF().aF($c.eU(2.5*i))&&a)n=s.concat(e).sort(aF);else if(o.nF(r)){let t=0;for(;tt.Km===Ro.JR);if(!s){const t=e.filter(t=>t.Km===Ro.xC),i=Jr(t,t=>{var i;return(null==(i=t.hN)?void 0:i.Km)===Ro.JR});i&&(s=i.hN)}if(!s)continue;const n=$B(dh(s.jB.ck),new Ui),r=s.KB;return Mo({},t,{$D:i.gD.$D,jB:am(s.jB.ck),Ti:s.Ti,Mi:s.Mi,CN:r&&r.CN,RN:r&&r.RN,t2:n.B0,Vgt:n.N0,i2:n.M0,O0:n.O0[0],F0:n.F0[0]})}}(Jr(i,BH))}Odt(t,i,e,s,n,r){var h;if(!this.Ugt)return;if(!S(this.Hgt)&&uh(this.Hgt,i,1e-5))return;S(this.Wgt)||uh(this.Wgt,i,.1)||this.qgt.hr();const o=function(t,i,e,s,n){const r=[],h=i.filter(RH),o=s(e);for(const i of h){const s=Jr(i.Z,t=>t.gD.$D===e.$D);if(!s)continue;const h=s.gD.NN||0,u=s.gD.MN||0;let c=s.GN?s.GN.GN:Wt.ZERO;var a;const d=i.UN+(null!=(a=s.gD.XN)?a:Wt.ZERO).toNumber();for(const a of s.zN){let s=d+(a.UN||0);for(const d of a.JN){const a=d.Vy||u,l=new iN;l.W0(t,s,s+a);const f=$c.gF(c,e.tft);l.DU=n(d,i,e,f,gl(t,s,s+a)),r.push(l),s+=a,c=c.add(d.ct||h||o)}}}return r}(t,jt.TD(dh(t)),this.Ugt,IH,CH);var a;const u=null!=(a=null==(h=vf(o,t=>t.DU.ct))?void 0:h.DU.ct)?a:0,c=function(t){const i=[];for(const e of t)e.DU.uft&&i.push(...e.DU.uft),delete e.DU.uft;for(let t=0;t{i===t&&this.Ngt.set(e,s)}),s}hr(){return this.qgt.hr(),this.Ngt.forEach(t=>{t.kn(),this.it(t),this.Ggt(t)}),this.Ngt.clear(),this.Ugt=void 0,this.Hgt=NaN,this.Wgt=NaN,super.hr()}kn(){return this.qgt.mn("Egt",this.Xgt),this.qgt.kn(),super.kn()}constructor(t){super(t),this.qgt=void 0,this.Ugt=void 0,this.Hgt=NaN,this.Wgt=NaN,this.Ngt=void 0,this.Xgt=t=>{const i=this.Mgt({nit:t.zft,rit:""}),e=t.TO;for(const t of i.L.II)e.EOt.EO?e.PO=t.EO:e.EO>t.EO&&t.PO>e.EO?t.PO=e.EO:e.EO===t.EO&&(e.PO=t.PO);this.jgt(i,e)},this.Ngt=ar(),this.qgt=new AW,this.qgt.wn("Egt",this.Xgt)}},TW=class extends SW{Ggt(t){}jgt(t,i){if(t.Xk===xh.Nh)return;const e=i.U.map(t=>t.Iit).join("\n"),s=af(t.L.II,-1);s&&s.U===e&&s.EO<=i.EO&&i.EO<=s.PO?s.PO=_.max(s.PO,i.PO):t.L8(i.EO,i.PO,e)}Fgt(t,i,e){return this.JU.wq({Km:"webvtt",Lt:Ao.FU,Th:t,bs:i})}zgt(t,i,e){return t}},kW=class extends SW{Ggt(t){this.JU.iV(t)}jgt(t,i){t.tV(i)}Fgt(t,i,e){return this.JU.tI(Ao.FU,t,t,i,!1,nh.CEA608,void 0,e)}zgt(t,i,e){return Ut(t,i,e)}};r(),r();var EW=/(.*)=(.*)/,PW=/(.*):(.*)/;function xW(t){if(!t)return[];const i=[],e=t.trim().split(";");for(const t of e){const e=t.match(EW);if(e){const[,t,s]=e;let n="",r=!1;for(const t of s.trim().split(","))if(t.match(PW)){const[,i,e]=t.match(PW);switch(i){case"lang":n=e;break;case"er":r=Boolean(Number(e))}}i.push({nit:Number(t),rit:n,Ogt:r})}}return i}var IW={1:1,2:3,3:2,4:4},RW="urn:scte:dash:cc:cea-608:2015",CW="urn:scte:dash:cc:cea-708:2015";r(),r();var DW=class extends Oi{xa(){return new BW(this.kot&&this.kot.Ca)}constructor(t,i,e){super(Te.TI),this.kot=void 0,this.Dut=void 0,this.Qgt=void 0,this.kot=t,this.Dut=i,this.Qgt=e}},BW=class extends wp{constructor(t){super("activequalitychanged"),this.quality=void 0,this.quality=t}},NW=[d.uo,Do.wI,d._y],MW=class extends Ne{Kgt(t){const i=this.flt.Cot;for(const e of i.Ht.rat)if(i.$ut.Kut(t,e))return e}kn(){this.Vo(),this.TL.mn(NW,this.Ygt)}constructor(t,i){super(),this.TL=void 0,this.flt=void 0,this.Jgt=void 0,this.Ygt=t=>{const i=this.Jgt,e=this.Kgt(t.currentTime)||this.flt.Pot;e&&i!==e&&(this.Jgt=e,e.kot&&this.So(new DW(e.kot,null==e?void 0:e.Ca,null==i?void 0:i.Ca)))},this.TL=t,this.TL.wn(NW,this.Ygt),this.flt=i}};function LW(t,i,e){const s=new lc(dh(t),new Ui),n=Cl.vD(s,Ro.OR);if(!n)return;const r=Cl.aD(n.ck),h=Jr(r,t=>t.Km===Ro.UR),o=Jr(r,t=>t.Km===Ro.FC);if(!h)return;const a=Cl.vD(h.ck,Ro.WR);if(!a)return;const u=Cl.vD(a.ck,Ro.GR);if(!u)return;const c=Cl.vD(u.ck,Ro.XR);if(!c)return;const d=Cl.aD(c.ck),l=Jr(d,t=>t.Km===Ro.jR);if(!l)return;const f=Cl.yD(l.ck,Ro.jR,!1),v=new lc(dh(f.ck),new Ui);v.rD(4);const _=Cl.aD(v),g=[];for(const t of _){if(t.Km===Ro.EC||t.Km===Ro.xC)return;t.Km===Ro.JR?g.push({Zgt:t,$gt:Ro.xC}):t.Km===Ro.wC&&g.push({Zgt:t,$gt:Ro.EC})}if(!function(t,i){return void 0===t&&void 0!==i&&i.length>0}(o,i)&&0===g.length)return;let p=Gu(t);const m=Jr(r,t=>t.Km===Ro.KR),w=m?Cl.vD(m.ck,Ro.YR):void 0,y=w?function(t){const i=t.ck.Ly();return i.rD(4),i.rD(4),i.ZC()}(w):1,A=Jr(d,t=>t.Km===Ro.QR);A&&function(t,i,e){const s=UW(dh(t),i),n=Cl.fD(s,new Ui),r=n.ck;r.rD(4);const h=r.ZC();for(let t=0;t=0;t--){const i=g[t];p=FW(p,i.Zgt,l,b,i.$gt,e)}return{tpt:p,ipt:{ept:g.length,BN:y}}}function OW(t,i,e){const s=gm(t,e,i.ck.ck.byteOffset+i.ck.ck.byteLength);return VW(UW(dh(s),i),e.byteLength),s}function FW(t,i,e,s,n,r){const h=function(t,i,e){0;const s=t.ck.ck,n=GW(),r=new j(s.byteLength+n.byteLength),h=dh(r);r.set(ta(s),0),VW(h,n.byteLength),Zp(h,new Ui(QW),i),r.set(n,s.byteLength),Zp(h,new Ui(s.byteLength+XW),t.Km),e&&qp(h,new Ui(s.byteLength+jW),e);return r}(i,n,r),o=gm(t,h,i.ck.ck.byteOffset),a=dh(o);!function(t,i){const e=Cl.fD(t,new Ui),s=Cl.yD(e.ck,Ro.jR,!1),n=dh(s.ck),r=n.getUint32(0);n.setUint32(0,r+i)}(UW(a,e),1);for(const t of s)VW(UW(a,t),h.byteLength);return o}function UW(t,i){const e=i.ck.ck.byteOffset;return Au(t,e,e+i.ck.ck.byteLength)}function VW(t,i){const e=new Ui,s=Cu(t,e);if(0===s);else if(1===s){e.Ny(4);const s=et(t,e.Ly());Qp(t,e,s.add(i))}else e.My(0),di(t,e,s+i)}r();var HW=class extends Xo{start(t){this.YJ=t}transform(t){this.A$(t),this.spt()}flush(){this.S$(),this.spt()}C$(t){return t===Ro.IC}B$(t){let i=Gu(ta(t.ck.ck));const e=Cl.fD(dh(i),new Ui);i=WW(i,e,this.npt),this.rpt.push(i)}M$(t){this.rpt.push(t)}spt(){for(const t of function(t){if(t.length<2)return t;const i=[];let{buffer:e,byteOffset:s,byteLength:n}=t[0];for(let r=1;r=0;t--){const r=n[t];r.Km===Ro.DC&&(s=qW(s,r,i,e))}return s}function qW(t,i,e,s){const n=UW(dh(t),i),r=Cl.fD(n,new Ui),h=Cl.aD(r.ck),o=Jr(h,t=>t.Km===Ro.BC);if(!o)return t;const a=o.ck,u=a.KC.Ly(),c=a.ZC(),{flags:d}=hT(c);a.rD(4),d.Oy(Jh.BASE_DATA_OFFSET_PRESENT)&&a.rD(8);const l=a.KC.Ly();if(d.Oy(Jh.SAMPLE_DESCRIPTION_INDEX_PRESENT)){const i=Cu(a.ck,l);return di(a.ck,a.KC,i+s.ept),t}{di(a.ck,u,c|Jh.SAMPLE_DESCRIPTION_INDEX_PRESENT);const n=new j(4);dh(n).setUint32(0,s.BN+s.ept);const r=a.ck.byteOffset+l.ac;for(const t of h.filter(t=>t.Km===Ro.NC))zW(t,n.byteLength);for(const s of[o,i,e])VW(UW(dh(t),s),n.byteLength);return gm(t,n,r)}}function zW(t,i){const e=t.ck,s=e.ZC(),{flags:n}=hT(s);if(e.rD(4),n.Oy(eT.DATA_OFFSET_PRESENT)){const t=e.Ly().ZC();di(e.ck,e.KC,t+i)}}var GW=mu(()=>new j([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),XW=16,jW=64,QW=4,KW=[Mc.ma,d.iy,d.oy,d.ly,d.Sw],YW=class extends Ne{get hpt(){return this.dlt}get o(){return this.hS}get B3(){return this.N3}get nt(){return this.opt}get plt(){return function(t){const i=29.97,e=1024,s=44100;return t===Ci.Dk?s/e:i}(this.N3)}get vlt(){return 1/this.plt}get Rt(){return Boolean(this.dlt&&this.dlt.Rt)}get ZZ(){const t=this.flt?this.flt.Cot.ZZ.zut:ve.iL();return this.upt().OM(t)}get IP(){let t=this.cpt();const i=this.dpt;return void 0!==i&&t.CM().Cr(i)&&(t=t.OM(ve.$M(i))),t}get Uut(){return XU(this.cpt(),this.ZZ.OM(this.lpt)).LM(2*this.vlt)}get lpt(){const t=this.dpt;if(t&&isFinite(t)){const i=this.fpt.An;if(isFinite(i)&&t=t.Nut.wct.An?_.max(i,this.An):i;return n=_.max(s,n),ve.tL(s,n).CM()}get QW(){return this.Uut.JM(this.MP)}get qut(){return this.fpt.qut}get MP(){return this.TL.MP}get Tn(){return this.dlt?this.dlt.Nut.wct.Tn:NaN}get An(){const t=this.vpt(),i=this.dpt;return void 0===t?NaN:void 0!==i?i:t}vpt(){var t;return null==(t=this.dlt)?void 0:t.Nut.wct.An}get Mi(){return this.fpt.Mi}get Ti(){return this.fpt.Ti}get _pt(){return this.dpt}zot(){return void 0!==this.flt&&this.flt.zot}Wut(){if(void 0===this.dpt)return!1;const t=this.cpt().CM(),i=t.VM(this.dpt);return!(i<0)&&t.Tn(i)!==this.dpt}C3(){const t=this.fpt.qut,i=this.cpt().Mn(t);this.dpt=i.V>0?i.An(i.V-1):0;const e=t.An(0);isFinite(e)&&this.dpt=0;t--){const s=n[t];s.Km===Ro.IC&&(e=WW(e,s,i))}return e}(i,this.Apt)),h={Km:Po.vZ,ck:i}}const o={xet:i.EO,ct:i.ct,bU:s,i2:null==(r=e.kot)?void 0:r.jI},a=this.Trt.IP;await this.bpt(),await this.Trt.H2(h,o,n);return function(t,i,e,s){let n,r,h=i.UM(t.CM());h=h.UM(e.UM(i)),!1;0===h.V?(n=s.PO,r=n):(n=h.Tn(0),r=h.An(0));return{kdt:n,Edt:r}}(a,this.Trt.IP,this.Trt.M3,i)}async Jrt(t,i,e){var s,n;ii(e),this.ypt&&this.ypt.Jrt(new j(t.Iht));let r=new j(t.Iht);if(this.Spt(i)){const t=this.fpt.Tpt;let i,e=[];t&&(e=De(t.kpt,t=>t.BW),i=t.Ept.uH?OC(t.Ept.uH):void 0);const s=LW(r,e,i);s?(this.Apt=s.ipt,r=s.tpt):this.Apt=void 0}if((null==(s=this.Trt)?void 0:s.Cd)&&this.Trt.Cd.qT!==i.qT){const t={qT:i.qT};this.Trt.TZ(t)&&(await this.Trt.EZ(t),ii(e))}const h={Km:Po.vZ,ck:r};await this.bpt(),await this.Trt.z2(h,{i2:null==(n=i.kot)?void 0:n.jI},e)}Ldt(t,i,e){return this.Trt._S(t,i,e)}t$(t,i){this.Trt.F3(t,i)}i$(t,i){this.Trt.U3(t,i)}cpt(){return this.Trt?this.Trt.IP:ve.iL()}upt(){return this.Trt?this.Trt.M3:ve.iL()}Ppt(){return this.Trt?this.Trt._S(0,1/0):Promise.resolve()}xpt(){return this.Trt&&(this.Trt.mn(Zs.lZ,this.Rs),this.Trt=void 0),Promise.resolve()}async Ipt(t){var i;const e=Br.Yct(null!=(i=t.ilt)?i:t.rat,this.Vct).oQ;this.Trt||(this.Trt=this.fpt.Rpt(e),this.Trt.wn(Zs.lZ,this.Rs),this.Qct=new iH(this.Trt)),await this.bpt()}Un(t,i){const e=at.ep([i]);this.rV.Zg(),this.rV=e;const s=this.Cpt(t,this.Dpt,e.Yg);return this.Dpt=s,s}Bpt(t){if(pi(this.Npt,nh.CEA608))return;const i=t.Nut.Wdt;if(function(t){return t.some(t=>t.y8===RW||t.y8===CW)}(i)){this.ypt=new kW(this.JU);const t=function(t){const i=[];for(const e of t)if(e.y8===RW){const t=cF(e.zE);for(const e of t)i.push(e)}else if(e.y8===CW){const t=xW(e.zE);for(const e of t)if(e.nit<=4){const t=IW[e.nit];i.push(Mo({},e,{nit:t}))}}return i}(i);for(const i of t)this.ypt.Mgt(i);this.opt.FW(this.ypt.Z)}}async Cpt(t,i,e){ii(e),i&&await i.catch(Ct),this.dlt===t&&this.Mpt||(await this.Lpt(),ii(e),await this.Ppt(),ii(e),t&&await this.sV(t))}async Lpt(){const t=this.dlt;this.dlt=void 0,this.Mpt=!1,this.dpt=void 0,t&&(t.mn(Te.EI,this.Opt),t.ult(!1),t.mn(Te.NO_QUALITY,this.Rs)),this.Fpt&&(this.Fpt.kn(),this.Fpt=void 0),this.flt&&(await this.flt.kn(),this.flt=void 0),this.ypt&&(this.opt.WW(this.ypt.Z),await this.ypt.kn())}async sV(t){this.dlt=t,this.Bpt(t),t.wn(Te.EI,this.Opt),t.wn(Te.NO_QUALITY,this.Rs),await this.Ipt(t),this.flt=this.Upt(t),this.flt.wn(KW,this.Rs),this.flt.wn("Eot",this.gpt),this.flt.Bot=t.ilt,this.Fpt=new MW(this.TL,this.flt),this.Fpt.wn(Te.TI,this.Ydt),t.ult(!0),this.Mpt=!0}Upt(t){return new tH(this,this.TL,this.TL,this.nV,this.Rz,this.Vdt,this.eut,this.Xct,this.Vct,this.Qct,this._dt,this.lq).Ret(t)}async hr(t){this.rV.Zg(),this.Dpt&&(await this.Dpt.catch(Ct),this.Dpt=void 0),await this.Lpt(),t||await this.Ppt(),await this.xpt()}async Vpt(){await this.Lpt()}Qdt(t){var i;null==(i=this.hpt)||i.Qdt(t)}async Gdt(t,i){var e,s;await this.Jot(),null==(e=this.hpt)||e.Gdt(i);const n=null==(s=this.flt)?void 0:s.Cot.$ut.Xut(t);if(n&&n.V>0)for(let t=0;tthis.Qct.TZ(t)))return this.Wpt(t);this.So(new wp("qpt"))}Wpt(t){this.flt&&this.dlt&&this.dlt===t.Ht&&(this.flt.Bot=this.dlt.ilt)}async Jot(t){this.flt&&await this.flt.Jot(t)}async $ot(t){this.flt&&await this.flt.$ot(t)}YY(){const t=this.IP.ZM;return this.Rz.YY(t)}bpt(){const t=this.fpt.qut,i=_.max(0,t.Tn(0)-.1),e=t.An(0)+.01;return this.Trt.r3(i,e)}Spt(t){if(!Hh(t.oQ))return!1;if(this.fpt.p8)return!0;return void 0!==this.fpt.Tpt}iat(t){if(!RT(this.N3))return;const i=this.flt,e=t.flt;void 0!==i&&void 0!==e&&i.iat(e,this.Tn,this.An)}async kn(t){this.Vo();try{await this.hr(t),await this.Vpt()}catch(t){}}constructor(t,i,e,s,n,r,h,o,a,u,c,d,l){super(),this.hS=void 0,this.N3=void 0,this.dlt=void 0,this.flt=void 0,this.Xct=void 0,this.Vct=void 0,this.Mpt=!1,this.rV=new at,this.Dpt=void 0,this.Fpt=void 0,this.dpt=void 0,this.Trt=void 0,this.Qct=new eH,this.Apt=void 0,this.fpt=void 0,this.TL=void 0,this.nV=void 0,this.Rz=void 0,this.wpt=void 0,this.ypt=void 0,this.opt=new Yu([]),this.JU=void 0,this.eut=void 0,this._dt=void 0,this.Npt=void 0,this.Vdt=void 0,this.lq=void 0,this.gpt=()=>{!this.zot()&&this.Wut()&&this.fpt.gpt()},this.Ydt=t=>{this.dlt.Ydt(t),this.So(new mH(t.Dut,t.Qgt))},this.Opt=t=>{this.Hpt(t)},this.hS=function(){const t=JW;return JW+=1,t}(),this.N3=t,this.nV=s,this.Rz=n,this.fpt=i,this.TL=e,this.eut=r,this.JU=h,this.wpt=o,this.Xct=a,this.Vct=a?MT(t,a):void 0,this._dt=u,this.Npt=c,this.Vdt=d,this.lq=l}};var JW=0;var ZW=class extends Ne{VY(t,i){return this.zpt(t,i)}async zpt(t,i){for(const i of t)this.Gpt(i);await this.Un(i);for(const t of this.jpt.Xpt)t.Km===Ci.NT&&(t.rat&&0!==t.rat.length?await this.Qpt.sV(t):this.So(new _H("No supported representation found in the AdaptationSet with mimetype : "+t.Km)))}get jI(){return this.gO}get ct(){return this.TL.ct}Kpt(t){return new YW(t,this,this.TL,this.nV,this.Rz,this.eut,this.JU,this.wpt,this.Ypt,this._dt,this.Npt,this.Vdt,this.lq)}zot(){return this.Nlt.some(t=>t.zot())}Wut(){return 0!==this.Nlt.length&&this.Nlt.every(t=>t.Wut())}gpt(){this.Jpt()&&this.So(new pH)}Rpt(t){if(I(t)){if(this.d3.Q3)return this.d3.Q3}else if(tt(t)&&this.d3.K3)return this.d3.K3;throw new m("Cannot allocate source buffer for mime type "+t)}Zpt(t){t.wn([Mc.ma,d.Yw,d.iy,d.oy,d.ly,d.Sw],this.Rs),t.wn(Zs.lZ,this.$pt),t.wn("qpt",this.Rs)}get Rt(){return this.Nlt.some(t=>t.Rt)}async tmt(t){await Promise.all(this.Nlt.map(i=>i.kn(t))),Yo(this.Nlt)}get ht(){return this.YL}get IP(){if(0===this.Nlt.length)return ve.iL();const t=this.Nlt.map(t=>t.IP);let i=ve.tL(0,1/0);for(const e of t)i=i.Mn(e);if(0===i.V)return i;if(this.Wut()){const t=i.Mn(this.qut);if(0===t.V)return i;const e=t.An(t.V-1);let s=0;for(const t of this.Nlt)s=_.max(s,t._pt);e<=s&&(i=i.OM(new ve([e,s],[!0,!0])))}return i}get p8(){return this.TL.p8}get MP(){return this.TL.MP}get Tpt(){return this.imt}get An(){if(this.emt){const t=this.ct;if(!S(t)&&t!==Xl)return t}if(!this.Nlt.length)return NaN;let t=0;for(const i of this.Nlt)t=_.max(t,i.An);return t}get emt(){const t=this.jpt.Idt;if(t.Km===Eh.wV)return!1;const i=t.smt;return 0!==i.length&&this.jpt===i[i.length-1]}get Sx(){if(!this.Nlt.length)return ve.iL();let t=ve.eL();for(const i of this.Nlt)t=t.Mn(i.Sx);if(t.V>0&&this.emt&&isFinite(this.ct)){const i=this.ct,e=t.An(t.V-1);i>e&&(t=t.OM(ve.tL(e,i).CM()))}return t}get Mc(){return this.jpt}get nt(){return this.Gl}get rt(){return this.$L}get Ti(){return this.ju.Ti}get Mi(){return this.ju.Mi}get QW(){const t=this.MP,i=this.IP,e=i.VM(t);if(-1!==e)return{Tn:i.Tn(e),An:i.An(e)}}get qut(){const t=this.jpt.Tn,i=this.emt?1/0:this.jpt.An;return ve.tL(t,i)}Jpt(){if(this.zot())return!1;if(!this.Wut())return!1;const t=this.IP;if(0===t.V)return!1;const i=this.MP;if(this.emt)return t.Tn(t.V-1)<=i;{const e=t.Mn(this.qut);if(0===e.V)return!0;const s=e.Tn(e.V-1),n=e.An(e.V-1)+.1;return s<=i&&i<=n}}get nmt(){return this.hmt}async Jot(t){this.hmt||(this.hmt=!0,await Promise.all(this.Nlt.map(i=>i.Jot(t))))}async $ot(t){this.hmt&&(this.hmt=!1,await Promise.all(this.Nlt.map(i=>i.$ot(t))))}async kn(t){this.TL.mn(d.py,this.omt),this.TL.mn(d.Pw,this.amt),this.TL.mn(d.LICENSE_REQUEST_GENERATED,this.umt),this.Vo(),this.jpt.mn(Ls.bot,this.Rs),this.cmt.Zg(),this.Dpt&&(await this.Dpt.catch(Ct),this.Dpt=void 0),await this.tmt(t),await this.Qpt.kn(),this.YL.kn(),this.$L.kn(),this.Gl.kn(),this.dmt()}Gpt(t){this.lmt.push(t),t.wn("fmt",this.vmt);const i=t.Km===Ci.Dk?this.YL:this.$L;for(const e of t.Z)i.tt(e)}_mt(t){const i=t.Km===Ci.Dk?this.YL:this.$L;for(const e of t.Z)i.it(e),e.kn();t.kn(),oi(this.lmt,t)}dmt(){for(let t=this.lmt.length-1;t>=0;t--)this._mt(this.lmt[t])}get gmt(){return this.lmt.map(t=>t.hpt).filter(it)}get pmt(){return this.Nlt.map(t=>t.hpt).filter(it)}Un(t,i){return this.cmt.Zg(),this.cmt=at.ep([i]),this.Dpt=$e(this.lE(t,this.Dpt,this.cmt.Yg),this.cmt).catch(this.mmt),this.Dpt}async lE(t,i,e){i&&await i.catch(Ct),ii(e);const s=[],n=this.Nlt.slice(),r=t.slice();Yo(this.Nlt);for(const t of n){const i=t.hpt;i&&pi(r,i)?(this.Nlt.push(t),s.push(t.Un(i,e)),oi(r,i)):(this.Gl.WW(t.nt),await t.kn(),ii(e))}for(const t of r){const i=this.Kpt(t.Lot);this.Gl.FW(i.nt),this.Nlt.push(i),this.Zpt(i),s.push(i.Un(t,e))}await Promise.all(s)}async EZ(t,i,e){this.d3!==e&&(this.d3=e,await this.tmt(!1)),await this.Un(t),this.imt=i}async wmt(t){for(const i of this.Nlt){const e=i.hpt;if(void 0!==e)for(const s of e.Nut.rat){(s.xW||[]).some(i=>i.uH&&L(wa(t),OC(i.uH)))&&!s.olt&&(s.olt=!0,await i.Gdt(s,s.kot),this.So(new wL(new fs(Vo.CONTENT_PROTECTION_OUTPUT_RESTRICTED,"Content unavailable due to DRM restrictions"))))}}}async ymt(t){for(const i of this.Nlt){const e=i.hpt;if(void 0!==e)for(const s of e.rat){const e=s.xW,n=s.kot;if(void 0===e||0===e.length||void 0===n)continue;if(!e.some(t=>pi(s.Amt,t)))continue;const r=this.bmt(e,t.Ty);n.cst!==r&&(r?i.Qdt(n):await i.Gdt(s,n))}}}bmt(t,i){let e=!1;const s=t.reduce((t,i)=>!i.uH||pi(t,i.uH)?t:[...t,i.uH],[]);return 0===s.length||(i.zy((n,r)=>{if("usable"!==n)return;(t.some(t=>t.uH&&L(wa(r),OC(t.uH)))||fm(r,Cc)&&1===s.length&&1===i.Vy)&&(e=!0)}),e)}iat(t){if(void 0===t)return;const i=t.jpt;if(this.jpt.Smt===i||this.jpt.Tmt===i)for(const i of this.Nlt){const e=Jr(t.Nlt,t=>t.B3===i.B3);void 0!==e&&i.iat(e)}}get kmt(){return this.lmt}constructor(t,i,e,s,n,r,h,o,a,u,c,l,f,v){var _,g;super(),this.gO=void 0,this.YL=new rs,this.$L=new rs,this.Gl=void 0,this.JU=void 0,this.Qpt=void 0,this.nV=void 0,this.Rz=void 0,this.eut=void 0,this.TL=void 0,this.jpt=void 0,this.lmt=[],this.cmt=new at,this.hmt=!0,this.Nlt=[],this.imt=void 0,this.lq=void 0,this.Dpt=void 0,this._dt=void 0,this.Npt=void 0,this.d3=void 0,this.Vdt=void 0,this.ju=void 0,this.wpt=void 0,this.Ypt=void 0,this.$pt=ph(()=>{this.So(new H(this.MP))},350),this.vmt=t=>{const i=t.Emt.hpt;if(i)for(const t of this.lmt){var e;t.hpt&&t.hpt!==i&&t.Km===(null==(e=i.Jdt)?void 0:e.Km)&&(t.mn("fmt",this.vmt),t.hpt.Rt=!1,t.wn("fmt",this.vmt))}this.Rs(t)},this.mmt=t=>{D(t)||this.So(new Pi(vA(t,Vo.MEDIA_LOAD_ERROR)))},this.omt=t=>{const i=t.z6;i&&this.wmt(i).catch(this.mmt)},this.Pmt=t=>{this.ymt(t).catch(this.mmt)},this.umt=t=>{for(const i of this.Nlt){const e=i.hpt;if(void 0!==e)for(const i of e.rat){const e=i.xW;if(void 0===e||0===e.length)continue;const s=t.Ey;e.filter(t=>t.A8&&L(new j(s),new j(t.A8))).forEach(t=>{i.xmt(t)})}}},this.amt=t=>{const i=t.z6;if(i)for(const t of this.pmt)for(const e of t.Nut.rat){const s=(e.xW||[]).some(t=>t.uH&&L(wa(i),OC(t.uH)));e.olt&&s&&(e.olt=!1,e.kot&&t.Qdt(e.kot))}},this.nV=e,this.Rz=s,this.eut=n,this.TL=t,this.gO=ki(),this.lmt=[],this.jpt=h,this.imt=o,this.lq=v,this.JU=u,this.Qpt=new vH(t,e,s,n,u,null==(g=null==r||null==(_=r.dash)?void 0:_.segmentRelativeVttTiming)||g),this.Gl=new Yu([this.Qpt.nt]),this._dt=l,this.Npt=f,this.jpt.wn(Ls.bot,this.Rs),this.ju=a,this.d3=i,this.Vdt=r.lowLatency,this.wpt=c,this.Ypt=r.abr,this.TL.wn(d.py,this.omt),this.TL.wn(d.Pw,this.amt),this.TL.wn(d.LICENSE_REQUEST_GENERATED,this.umt)}};r(),r(),r();var $W=/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d*\.?\d*)S)?)?$/,tq=class t{static TD(i){const e=i.match($W);if(!e)throw new m("The given value could not be parsed as a valid DateTimeInterval");const s=Number(e[1])||0,n=Number(e[2])||0,r=Number(e[3])||0,h=Number(e[4])||0,o=Number(e[5])||0,a=Number(e[6])||0;return new t(31536e3*s+2592e3*n+86400*r+3600*h+60*o+a)}get ift(){return $c.eU(this.Imt,1e3)}Rmt(){return this.Imt}Cmt(){return 1e3*this.Imt}constructor(t){this.Imt=void 0,this.Imt=t}};r();var iq=function(t){return t.Dmt="progressive",t.Bmt="interlaced",t.pk="unknown",t}({});r();var eq=class{iF(){return this.Nmt/this.Mmt}constructor(t,i){this.Nmt=void 0,this.Mmt=void 0,this.Nmt=t,this.Mmt=i}};r();var sq=1886614376;function nq(t){const i=OC(Ug),e=t.byteLength,s=12+i.length+4+e,n=new j(s),r=dh(n),h=new Ui;return di(r,h,s),di(r,h,sq),di(r,h,0),qp(r,h,i),di(r,h,e),qp(r,h,new j(t)),n}var rq=/^(?:true|false)$/i,hq=/^(-?)(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:Z|([+-])(\d{2}):(\d{2}))?$/;function Su(t){if(void 0!==t)return tq.TD(t)}function oq(t){if(void 0===t)return;const i=t.match(hq);if(!i)throw new m("The given value could not be parsed as a valid Date");const[,e,s,n,r,h,o,a,u,c,d,l]=i,f=("-"===e?-1:1)*Number(s),v=Number(n)-1,g=Number(r),p=Number(h);let w=Number(o);const y=Number(a),A=Number("0."+(u||"")),b=_.round(1e3*A);if(c){w-=("-"===c?-1:1)*(60*Number(d)+Number(l))}const T=new Date(Date.UTC(f,v,g,p,w,y,b));if(S(T.getTime()))throw new m("The given value could not be parsed as a valid Date");return T}function aq(t){if(!t)return;const i=/(\d+)-(\d+)/.exec(t);return i?[ti(i[1]),ti(i[2])]:void 0}function uq(t){if(void 0!==t){if(!S(Number(t)))try{return Wt.fromString(t,!0)}catch(t){}throw new m("The given value could not be parsed as a valid unsigned long")}}function ti(t){if(void 0===t)return;const i=Number(t);if(!S(i))return i;throw new m("The given value could not be parsed as a valid Number")}function cq(t){if(void 0===t)return;const i=t.split("/"),e=Number(i[0]),s=Number(i[1]||1);if(!S(e)&&!S(s))return new eq(e,s);throw new m("The given value could not be parsed as a valid frame rate")}function Xn(t){if(void 0!==t){if(rq.test(t))return"true"===t.toLowerCase();if(!S(x(t)))return Boolean(x(t));throw new m("The given value could not be parsed as a valid Boolean.")}}function dq(t){return{Yu:t.eP,Lmt:Xn(t.sP("availabilityTimeComplete")),Omt:ti(t.sP("availabilityTimeOffset"))}}function lq(t){return t.map(dq)}function fq(t){const i=Sq(t),e=function(t,i,e,s){let n=t.nP(e,i);return void 0===n&&(n=t.sP(s+":"+i)),n}(t,"default_KID","urn:mpeg:cenc:2013","cenc");let s;const n=yP(t,"pssh","urn:mpeg:cenc:2013","cenc")[0];if(void 0!==n&&(s=wu(n.eP)),!s){const i=yP(t,"pro","urn:microsoft:playready","mspr")[0];void 0!==i&&(s=function(t){const i=wu(t.eP);return nq(i)}(i))}return{uH:e,A8:s,y8:i.y8,zE:i.zE}}function vq(t){return{Fmt:t.sP("sourceURL"),Sat:aq(t.sP("range"))}}function _q(t,i){const e=t.sP("d"),s=t.sP("t"),n=ti(t.sP("r"));i.push({ct:e,EO:s,Umt:n})}function gq(t){return{aut:t.sP("index"),Vmt:aq(t.sP("indexRange")),KD:t.sP("media"),Hmt:aq(t.sP("mediaRange"))}}function pq(t){const i=wq(t),e=function(t){const i=t.map(gq);return i.length>0?i:void 0}(t.YE("SegmentURL"));return Mo({},i,{Wmt:e,qmt:t.sP("xlink:href"),zmt:t.sP("xlink:actuate")})}function mq(t){const i=Xn(t.sP("availabilityTimeComplete")),e=ti(t.sP("availabilityTimeOffset")),s=aq(t.sP("indexRange")),n=Xn(t.sP("indexRangeExact")),r=t.YE("Initialization");if(r.length>1)throw new m("The provided MPEG-DASH document's "+t.JE+" element can not have more than one Initialization element.");const h=1===r.length?vq(r[0]):void 0,o=uq(t.sP("presentationTimeOffset")),a=t.YE("RepresentationIndex");if(a.length>1)throw new m("The provided MPEG-DASH document's "+t.JE+" element can not have more than one RepresentationIndex element.");return{Lmt:i,Omt:e,Vmt:s,Gmt:n,Xmt:h,jmt:o,Qmt:1===a.length?vq(a[0]):void 0,Kmt:Su(t.sP("timeShiftBufferDepth")),qD:ti(t.sP("timescale"))}}function wq(t){const i=mq(t),e=t.YE("BitstreamSwitching"),s=e.length>0?vq(e[0]):void 0,n=ti(t.sP("duration")),r=t.YE("SegmentTimeline");if(r.length>1)throw new m("The provided MPEG-DASH document's "+t.JE+" element can not have more than one SegmentTimeline element.");const h=1===r.length?function(t){const i=[],e=t.YE("S");for(const t of e)_q(t,i);return i}(r[0]):void 0;return Mo({},i,{Ymt:s,ct:n,$rt:h,Jmt:ti(t.sP("startNumber")),Zmt:ti(t.sP("endNumber"))})}function yq(t){return{$mt:function(t){if(!t)return;const i=t.split(/\s/);return i.length>1?(i.length=2,i.map(ti)):1===i.length?i.map(ti)[0]:void 0}(t.sP("audioSamplingRate")),frt:t.sP("codecs"),twt:Xn(t.sP("codingDependency")),xW:function(t){if(0!==t.length)return t.map(fq)}(t.YE("ContentProtection")),iwt:function(t){return t.map(Tq)}(t.YE("EssentialProperty")),ewt:function(t){return t.map(kq)}(t.YE("SupplementalProperty")),plt:cq(t.sP("frameRate")),Mi:ti(t.sP("height")),swt:ti(t.sP("maxPlayoutRate")),nwt:ti(t.sP("maximumSAPPeriod")),oQ:t.sP("mimeType"),rwt:t.sP("profiles"),hwt:t.sP("sar"),owt:function(t){switch(t){case iq.Dmt:case iq.Bmt:case iq.pk:return t;default:return}}(t.sP("scanType")),awt:t.sP("segmentProfiles"),uwt:ti(t.sP("startWithSAP")),Ti:ti(t.sP("width"))}}function Aq(t){const i=lq(t.YE("BaseURL")),e=t.YE("SegmentBase");if(e.length>1)throw new m("The provided MPEG-DASH document's "+t.VE+" element can not have more than one SegmentBase element.");const s=1===e.length?mq(e[0]):void 0,n=function(t){const i=t.map(pq);return i.length>0?i:void 0}(t.YE("SegmentList")),r=t.YE("SegmentTemplate");if(r.length>1)throw new m("The provided MPEG-DASH document's "+t.VE+" element can not have more than one SegmentTemplate element.");const h=1===r.length?function(t){return Mo({},wq(t),{cwt:t.sP("bitstreamSwitching"),dwt:t.sP("index"),lwt:t.sP("initialization"),fwt:t.sP("media")})}(r[0]):void 0;return{vwt:i,_wt:s,gwt:n,pwt:h}}function bq(t){const i=yq(t),e=Aq(t),s=ti(t.sP("bandwidth")),n=t.sP("dependencyId"),r=t.sP("id"),h=t.sP("mediaStreamStructureId"),o=ti(t.sP("qualityRanking"));if(t.YE("SegmentBase").length>1)throw new m("The provided MPEG-DASH document's Representation element can not have more than one SegmentBase element.");return Mo({},i,e,{kW:s,mwt:n,o:r,wwt:h,ywt:o})}function Sq(t){return{y8:t.sP("schemeIdUri"),zE:t.sP("value")}}function Tq(t){return Sq(t)}function kq(t){return Sq(t)}function Eq(t){return Sq(t)}function Pq(t){return Sq(t)}function xq(t){var i;const e=yq(t),s=Aq(t),n=function(t){return t.map(Pq)}(t.YE("Accessibility")),r=Xn(t.sP("bitstreamSwitching")),h=t.sP("contentType"),o=ti(t.sP("group")),a=ti(t.sP("id")),u=(null==(i=t.YE("Label")[0])?void 0:i.eP)||"",c=t.sP("lang"),d=ti(t.sP("maxBandwidth")),l=cq(t.sP("maxFrameRate")),f=ti(t.sP("maxHeight")),v=ti(t.sP("maxWidth")),_=ti(t.sP("minBandwidth")),g=cq(t.sP("minFrameRate")),p=ti(t.sP("minHeight")),w=ti(t.sP("minWidth")),y=t.sP("par"),A=function(t){return t.map(bq)}(t.YE("Representation"));if(0===A.length)throw new m("The provided MPEG-DASH document has an AdaptationSet with no valid Representation's");const b=function(t){return t.map(Eq)}(t.YE("Role")),S=Xn(t.sP("segmentAlignment"))||!1,T=ti(t.sP("selectionPriority")),k=T||1,E=Xn(t.sP("subsegmentAlignment"))||!1;let P;try{P=ti(t.sP("subsegmentStartsWithSAP"))}catch(t){}return Mo({},e,s,{Wdt:n,Ymt:r,qT:h,Jdt:o,o:a,Th:u,bs:c,Awt:d,bwt:l,Swt:f,Twt:v,kwt:_,Ewt:g,Pwt:p,xwt:w,Iwt:y,rat:A,Plt:b,Rwt:S,Kq:k,Cwt:E,Dwt:P,Bwt:t.sP("xlink:actuate")||"onRequest",Nwt:t.sP("xlink:href")})}function Iq(t){const i=uq(t.sP("presentationTime"))||Wt.ZERO,e=uq(t.sP("duration")),s=ti(t.sP("id")),n=function(t){const i=t.iP,e={};for(let t=0;t1)throw new m("The provided MPEG-DASH document's Period element can not have more than one AssetIdentifier element.");const s=1===e.length?function(t){return Sq(t)}(e[0]):void 0,n=function(t){return t.map(xq)}(t.YE("AdaptationSet")),r=Xn(t.sP("bitstreamSwitching")),h=Su(t.sP("duration")),o=function(t){return t.map(Rq)}(t.YE("EventStream")),a=t.sP("id"),u=Su(t.sP("start")),c=(t.YE("Subset"),t.sP("xlink:href"));return Mo({},i,{Ilt:n,Mwt:s,Ymt:r,ct:h,Lwt:o,o:a,Tn:u,Bwt:t.sP("xlink:actuate"),Nwt:c})}function Dq(t){const i=t.sP("schemeIdUri");if(!i)return;return{y8:i,zE:t.sP("value")}}function Bq(t,i){const e=oq(t.sP("availabilityEndTime")),s=oq(t.sP("availabilityStartTime")),n=lq(t.YE("BaseURL")),r=t.sP("id"),h=function(t){return t.map(t=>""+t.eP)}(t.YE("Location")),o=Su(t.sP("maxSegmentDuration")),a=Su(t.sP("maxSubsegmentDuration")),u=Su(t.sP("mediaPresentationDuration")),c=(t.YE("Metrics"),Su(t.sP("minBufferTime")));if(!c)throw new m("The provided MPEG-DASH document's MPD element does not have the required 'minimumBufferTime' attribute.");const d=Su(t.sP("minimumUpdatePeriod")),l=function(t){return t.map(t=>Cq(t))}(t.YE("Period"));if(!l.length)throw new m("The provided MPEG-DASH document's MPD element does not have the required 'Period' element.");const f=t.sP("profiles");if(!f)throw new m("The provided MPEG-DASH document's MPD element does not have the required 'profiles' attribute.");const v=oq(t.sP("publishTime")),_=Su(t.sP("suggestedPresentationDelay")),g=Su(t.sP("timeShiftBufferDepth")),p=function(t){switch(t){case Eh.mV:case Eh.wV:return t;default:return}}(t.sP("type")),w=function(t){const i=[];for(const e of t){const t=Dq(e);t&&i.push(t)}return i}(t.YE("UTCTiming")),y=function(t){if(0===t.length)return;const i=t[0],e=i.YE("Latency");if(0===e.length)return;const s=function(t){const i=t[0],e=ti(i.sP("target"));if(void 0===e)return;const s=ti(i.sP("min")),n=ti(i.sP("max"));return{Owt:e,YF:s,KF:n}}(e);if(void 0===s)return;const n=function(t){if(0===t.length)return;const i=t[0],e=ti(i.sP("max")),s=ti(i.sP("min"));return{YF:s,KF:e}}(i.YE("PlaybackRate"));return{Fwt:s,ux:n}}(t.YE("ServiceDescription"));return{Uwt:e,Vwt:s,vwt:n,o:r,Hwt:h,Wwt:i,qwt:o,zwt:a,Gwt:u,Xwt:c,Qwt:d,smt:l,rwt:f,Kwt:v,Ywt:_,Kmt:g,Km:p,Jwt:w,Zwt:y}}var Nq=class{$wt(t,i){return function(t,i){if(!t)throw new m("The provided MPEG-DASH document does not contain a valid MPD root element.");return Bq(t,i)}(zd.UE(t).uP,i)}};function Mq(t){return{get bandwidth(){return t.kW},get codecs(){return t.frt},get id(){return t.o},get uid(){return t.jI},get name(){return t.Th},get averageBandwidth(){return t.tyt},get label(){return t.Th},set label(i){t.Th=Hi(i)},get available(){return t.cst},get score(){return t.iyt},addEventListener(i,e){t.wn(i,e)},removeEventListener(i,e){t.mn(i,e)}}}function Lq(t){return po(Mq(t),{get height(){return t.Mi},get width(){return t.Ti},get frameRate(){return t.plt},get firstFrame(){return t.eyt}})}function Oq(t){return po(Mq(t),{get audioSamplingRate(){return t.$mt}})}r(),r(),r(),r(),r(),r(),r(),r();var ea=class extends wp{constructor(t){super("update"),this.quality=void 0,this.quality=t}},Fq=class extends Ne{get Th(){return this.pO}set Th(t){this.pO!==t&&(this.pO=t,this.So(new ea(this.Ca)))}get tyt(){}get cst(){return this.syt}get iyt(){}QU(){this.syt=!1,this.So(new ea(this.Ca))}jU(){this.syt=!0,this.So(new ea(this.Ca))}constructor(t,i,e,s,n){super(),this.o=void 0,this.kW=void 0,this.frt=void 0,this.nyt=void 0,this.jI=void 0,this.pO=void 0,this.syt=void 0,this.o=t,this.kW=i,this.frt=e,this.nyt=n,this.jI=zk(),this.pO=s||"",this.syt=!0}},Uq=class extends Fq{get Ca(){return this.hu||(this.hu=Lq(this)),this.hu}constructor(t,i,e,s,n,r,h,o,a=0){super(t,i,e,s,n),this.plt=void 0,this.Ti=void 0,this.Mi=void 0,this.eyt=void 0,this.hu=void 0,this.plt=r,this.Ti=h,this.Mi=o,this.eyt=a,this.hu=void 0}},Vq=class extends Fq{get Ca(){return this.hu||(this.hu=Oq(this)),this.hu}constructor(t,i,e,s,n,r){super(t,i,e,s,n),this.$mt=void 0,this.hu=void 0,this.$mt=r,this.hu=void 0}};r(),r();var Hq=class extends Ne{get ryt(){const t=this.hyt();return null==t?void 0:t.Tn}get oyt(){const t=this.hyt();return null==t?void 0:t.An}constructor(...t){super(...t),this.ayt=t=>{this.So(t)}}},Wq=class extends Hq{get Nut(){return this.Kot}get $mt(){var t;return null!=(t=this.uyt.ck.$mt)?t:this.Nut.$mt}get kW(){return this.uyt.ck.kW||0}get frt(){const t=this.uyt.ck;return t.frt?[t.frt]:this.Nut.frt}get cyt(){const t=this.uyt.ck;return t.frt?[t.frt]:[]}get Np(){return this.uyt.ck.frt||this.Nut.Np}get twt(){return this.uyt.ck.twt||this.Nut.twt}get xW(){return this.uyt.ck.xW||this.Nut.xW}get Amt(){return this.dyt}get qT(){return this.oQ+'; codecs="'+this.Np+'"'}get iwt(){const t=this.uyt.ck;return t.iwt.length?t.iwt:this.Nut.iwt}get Ca(){return this.hu||(this.hu=function(t){return{get id(){return t.o},get type(){return t.Km},get bandwidth(){return t.kW},get width(){return t.Ti},get height(){return t.Mi},get frameRate(){var i,e;return null!=(e=null==(i=t.plt)?void 0:i.iF())?e:NaN},get audioSamplingRate(){return t.$mt}}}(this))}get plt(){var t;return null!=(t=this.uyt.ck.plt)?t:this.Nut.plt}get Mi(){return this.uyt.ck.Mi||this.Nut.Mi}get o(){return this.uyt.ck.o||""}get Bdt(){return this.lyt}set Bdt(t){this.lyt=t}get Ddt(){const t=this.uyt.fyt();if(t)return{Yu:t.Yu,Sat:t.Sat,zk:this.Idt.zk}}get swt(){return this.uyt.ck.swt||this.Nut.swt||1}get nwt(){return this.uyt.ck.nwt||this.Nut.nwt}get Idt(){return this.wct.Idt}get oQ(){return this.uyt.ck.oQ||this.Nut.oQ}get wct(){return this.Nut.wct}get rwt(){return this.uyt.ck.rwt||this.Nut.rwt}get kot(){return this.vyt}get hwt(){return this.uyt.ck.hwt||this.Nut.hwt}get owt(){return this.uyt.ck.owt||this.Nut.owt}get _yt(){return this.uyt._yt}get awt(){return this.uyt.ck.awt||this.Nut.awt}get $rt(){return this.uyt.$rt}get uwt(){return this.uyt.ck.uwt||this.Nut.uwt}get Km(){const t=this.oQ.split("/")[0];return"application"===t||"text"===t||QP(this.oQ,this.frt)?Ci.NT:"video"===t?Ci.Bk:"audio"===t?Ci.Dk:"image"===t?Ci.Nk:Ci.pk}get Ti(){return this.uyt.ck.Ti||this.Nut.Ti}get Sct(){return this.gyt}set Sct(t){this.gyt=t}get olt(){return this.pyt}set olt(t){this.pyt=t}Nct(t){const i=aV(t)?this.uyt.myt(t):this.uyt.Nct(t);return{Yu:i.Yu,Sat:i.Sat,zk:this.Idt.zk}}wyt(){return this.uyt.wyt()}hyt(){return this.uyt.hyt()}yyt(){return this.uyt.yyt()}kct(t){return this.uyt.kct(t)}Pct(t,i,e){return this.uyt.Pct(t,this.Idt.zk,i,e)}pdt(t){return aV(t)?this.$rt.Ayt(t,this.uyt):this.$rt.pdt(t)}mct(t){return aV(t)?this.$rt.byt(t,this.uyt):this.$rt.mct(t)}xmt(t){pi(this.dyt,t)||this.dyt.push(t)}kn(){this.uyt.mn(Ls.yot,this.ayt),this.dyt=[]}constructor(t,i){if(super(),this.Kot=void 0,this.hu=void 0,this.uyt=void 0,this.vyt=void 0,this.lyt=void 0,this.gyt=!1,this.pyt=!1,this.dyt=[],this.Kot=t,this.uyt=i,this.uyt.wn(Ls.yot,this.ayt),this.Km===Ci.Bk){var e,s;const t=null!=(s=null==(e=this.plt)?void 0:e.iF())?s:NaN;this.vyt=new Uq(this.o,this.kW,this.Np,"","",t,this.Ti,this.Mi)}else this.Km===Ci.Dk?this.vyt=new Vq(this.o,this.kW,this.Np,"","",this.$mt):this.vyt=void 0}},qq=class extends Hq{get Wdt(){return this.uyt.ck.Wdt}get $mt(){var t;return null!=(t=this.uyt.ck.$mt)?t:-1}get frt(){if(this.uyt.ck.frt)return[this.uyt.ck.frt];{const t=[];for(const i of this.rat)i.cyt.length&&-1===t.indexOf(i.Np)&&t.push(i.Np);return t}}get Np(){return this.frt.join()}get twt(){return this.uyt.ck.twt}get xW(){return this.uyt.ck.xW}get qT(){return this.oQ+'; codecs="'+this.Np+'"'}get iwt(){return this.uyt.iwt}get ewt(){return this.uyt.ewt}get plt(){return this.uyt.ck.plt}get Jdt(){return this.uyt.ck.Jdt}get Mi(){return this.uyt.ck.Mi||0}get o(){return this.uyt.ck.o}get Th(){return this.uyt.ck.Th||""}get swt(){return this.uyt.ck.swt}get nwt(){return this.uyt.ck.nwt}get Idt(){return this.wct.Idt}get oQ(){return this.uyt.ck.oQ||this.elt[0].oQ}get wct(){return this.jpt}get rwt(){return this.uyt.ck.rwt}get rat(){return this.elt}get Plt(){return this.uyt.ck.Plt||[]}get hwt(){return this.uyt.ck.hwt}get owt(){return this.uyt.ck.owt}get awt(){return this.uyt.ck.awt}get Kq(){return this.uyt.ck.Kq}get uwt(){return this.uyt.ck.uwt}get Km(){const t=(this.uyt.ck.qT||this.oQ).split("/")[0];return"application"===t||"text"===t||"subtitle"===t||QP(this.oQ,this.frt)?Ci.NT:"video"===t?Ci.Bk:"audio"===t?Ci.Dk:"image"===t?Ci.Nk:Ci.pk}get Ti(){return this.uyt.ck.Ti||0}get rit(){return this.uyt.ck.bs||""}get blt(){return this.ryt}get Alt(){const t=this.blt,i=this.oyt;if(void 0===t||void 0===i)return;const e=_.min(i,this.Idt.Syt);return _.max(t,e)}async er(t,i){if(0===this.elt.length){const e=this.uyt.rat.map(e=>this.Tyt(e,t,i));this.elt=(await Promise.all(e)).filter(it)}this.kyt()}async Tyt(t,i,e){const s=new Wq(this,t),n=await i(s);if(ii(e),n)return s}kyt(){if(!this.elt.length)throw new m("Detected an AdaptationSet without any supported Representations.")}hyt(){return this.uyt.hyt()}yyt(){return this.uyt.yyt()}kn(){this.uyt.mn(Ls.yot,this.ayt);for(const t of this.elt)t.kn();Yo(this.elt)}constructor(t,i){super(),this.uyt=void 0,this.jpt=void 0,this.elt=[],this.jpt=t,this.uyt=i,this.uyt.wn(Ls.yot,this.ayt)}};function zq(t,i){const e=[];for(const s of i)for(const i of t)e.push(zd.Dh(i,s));return e}r(),r(),r(),r(),r(),r(),r();var st=class{Eyt(t){const i=t-this.jpt.Tn;if(i<0||i>=this.jpt.ct)return;const e=this.Pyt();return void 0!==e&&uh(e,i,1e-5)?this.xyt():this.Iyt(i)}Tct(t){const i=t-this.jpt.Tn;if(!(i<0))return this.Ryt(_.min(i,this.jpt.ct))}xyt(){return this.Cyt(0)}Dyt(){const t=this.jpt.ct;if(isFinite(t))return this.Ryt(t)}get Byt(){return this.jpt.Myt.Nyt&&void 0!==this.Lyt()}wyt(t){if(this.jpt.Myt.Km===Eh.wV){if(this.Byt){const i=this.xyt(),e=this.Lyt();if(void 0===i||void 0===e)return;return{Oyt:t,Fyt:i,Uyt:e}}const i=this.Vyt(t);if(!i)return;return{Oyt:t,Fyt:this.Hyt(t),Uyt:i}}{0;const i=this.xyt();if(i)return{Oyt:t,Fyt:i,Uyt:this.Dyt()}}}yyt(t,i){if(i){let t=this.Rdt(i.Fyt);const e=this.Cct(i.Uyt);if(e){const i=this.Cdt(e);(!t||i.getTime()i.getTime();)e=this.Rct(e);if(!e)return;const s=this.Rdt(e);if(s&&s.getTime()<=i.getTime()){const t=this.Rct(e);for(t&&this.Udt(t,i)&&(e=t);e;){if(this.Cdt(e).getTime()>i.getTime())return;if(this.Udt(e,i))break;e=this.Cct(e)}if(!e)return}return e}Udt(t,i){if(this.Byt)return!0;if(this.Cdt(t).getTime()>i.getTime())return!1;const e=this.Rdt(t);return!(e&&i.getTime()>=e.getTime())}Gyt(t,i){if(this.Byt)return!0;if(this.Xyt(t).getTime()>i.getTime())return!1;const e=this.Rdt(t);return!(e&&i.getTime()>=e.getTime())}jyt(t,i,e){const s=Bs(i,this.HA)+this.jpt.Tn;return{aut:t,Qyt:i,EO:s,ct:e,PO:s+e}}Xyt(t){return this.jpt.Myt.Km===Eh.wV?new Date(this.jpt.Myt.Vwt.getTime()+1e3*(t.EO+t.ct)):this.jpt.Myt.Vwt}Cdt(t){const i=this.Xyt(t);return this.jpt.Myt.Km===Eh.wV?new Date(i.getTime()-1e3*this.Wyt):i}Rdt(t){let i=1/0;if(this.jpt.Myt.Km===Eh.wV){const e=this.zyt.Kmt;e&&(i=this.Xyt(t).getTime()+1e3*t.ct+e.Cmt())}const e=this.jpt.Myt.Uwt;return e&&(i=_.min(i,e.getTime())),i===1/0?void 0:new Date(i)}Kyt(t,i){return t.aut+i}get bU(){return this.jpt.Tn-Bs(this.Yyt,this.HA)}get jmt(){return Bs(this.Yyt,this.HA)}kct(t){return!1}Pct(t,i,e,s,n){const r=this.Jyt(t);if(!r)return Promise.reject(new m("Invalid segment"));const h=this.Zyt(r.aut,i);return h?Promise.resolve(h):Nc(this.$yt(r.aut,i,e,s),n)}Zyt(t,i){}$yt(t,i,e,s){return Promise.reject(new m("Not supported"))}Rct(t){const i=this.Jyt(t);if(i)return this.Cyt(i.aut-1)}Cct(t){const i=this.Jyt(t);if(i)return this.Cyt(i.aut+1)}Jyt(t){const i=this.Cyt(t.aut);if(i&&i.EO===t.EO)return i;const e=this.Eyt(t.EO);return e&&e.EO===t.EO?e:void 0}tAt(t,i){const e=this.xct(t);if(!e||!this.kct(e.aut))return;const s=this.Zyt(e.aut,i);return s?s.tAt(t):void 0}xct(t){return this.Cyt(t.iAt)}pdt(t){const i=this.Jyt(t);return!!i&&0===i.aut}Ayt(t,i){const e=this.tAt(t,i);return!!e&&0===e.hut}mct(t){const i=this.Jyt(t);if(!i)return!1;const e=this.Dyt();return!!e&&i.aut===e.aut}byt(t,i){const e=this.tAt(t,i);if(!e)return!1;const s=this.Dyt();if(!s||e.iAt!==s.aut)return!1;const n=this.Zyt(e.iAt,i);return e.hut+1===n.V}zg(){}constructor(t,i){this.jpt=void 0,this.zyt=void 0,this.HA=void 0,this.Wyt=void 0,this.Yyt=void 0,this.jpt=t,this.zyt=i,this.HA=i.qD,this.Wyt=i.Omt,this.Yyt=i.jmt}},Gq=class extends st{Cyt(t){if(t<0)return;const i=this.eAt.multiply(t),e=Bs(i,this.HA),s=this.jpt.ct;if(e>=s)return;const n=this.sAt();if(void 0!==n){if(t>n)return;if(t===n&&isFinite(s))return this.jyt(t,i,s-e)}return isFinite(s)&&e+this.nAt>s?this.jyt(t,i,s-e):this.jyt(t,i,this.nAt)}Pyt(){return 0}Iyt(t){const i=_.floor(t/this.nAt),e=this.sAt();return void 0!==e&&i>=e?this.Cyt(e):this.Cyt(i)}Ryt(t){if(t>=this.jpt.ct){const t=_.ceil(this.jpt.ct/this.nAt)-1,i=this.sAt();return void 0!==i&&t>=i?this.Cyt(i):this.Cyt(t)}return this.Iyt(t)}sAt(){const t=this.zyt.Zmt;var i;if(void 0!==t)return t-(null!=(i=this.zyt.Jmt)?i:1);const e=this.zyt.rAt;return void 0!==e&&e>0?e-1:void 0}Lyt(){if(isFinite(this.jpt.ct))return this.Dyt()}hAt(t,i){return this.eAt.multiply(t.aut+(i-1))}er(){}constructor(t,i){super(i,t),this.nAt=void 0,this.eAt=void 0;const e=t.oAt,s=t.ct;if(void 0===e||void 0===s)throw new m("MultipleSegmentBase does not have a segment duration specified.");this.eAt=e,this.nAt=s}};function Xq(t,i,e){const s=i.length;if(0===s)return-1;let n=0,r=s-1,h=t.aAt(i[n]),o=t.uAt(i[r]);for(;n<=r&&t.cAt(h,e)<=0&&t.cAt(e,o)<0;){const a=n+_.floor(t.dAt(e,h,o)*(r-n)),u=i[a],c=t.aAt(u),d=a+10)return Bs(this.fAt[0].EO,this.HA)}Iyt(t){if(this._At&&Bs(this._At.EO,this.HA)<=t){const i=Bs(this._At.EO,this.HA),e=Bs(this._At.ct,this.HA),s=_.floor((t-i)/e);return this.vAt(s)}if(this.fAt.length>0&&uh(t,Bs(this.fAt[0].EO,this.HA),1e-5))return this.fAt[0].$at;const i=jq(this.fAt,Wt.fromNumber(t*this.HA));return i<0?void 0:this.fAt[i].$at}Ryt(t){if(!this._At&&this.fAt.length>0){const i=this.fAt[this.fAt.length-1];if(function(t,i,e){return ef(t,i,e)>=0}(t,Bs(i.PO,this.HA),1e-5))return i.$at}const i=this.Pyt();return i&&t=r)return;const h=this.fAt.length+t,o=_.min(Bs(e,this.HA),n+r);return this.jyt(h,s,o)}gAt(t){return t.Qyt.add(this.Yyt)}er(){const t=this.zyt.ck.$rt;if(!t)throw new m("MultipleSegmentBaseTO does not have a SegmentTimeline specified.");this.pAt(t)}pAt(t){const i=this.Yyt;this.mAt(t,i);const e=this.wAt(t);this.yAt(t,i,e.AAt,e.iAt)}mAt(t,i){const e=this.fAt;if(0===t.length)Yo(e);else{const s=t[0];let n=0;const r=Bs(s.EO?Wt.fromString(s.EO,!1).subtract(i):Wt.ZERO,this.HA);for(;n0&&e.splice(0,n)}}wAt(t){const i=this.fAt,e=this.Hgt;let s=0,n=0;for(;s=i.length)break;if(i[h].EO.greaterThanOrEqual(e))break;if(i[n].$at.aut===n)n=h+1;else for(;n<=h;)i[n].$at.aut=n,n++;0,s++}return{AAt:s,iAt:n}}yAt(t,i,e,s){const n=this.fAt;let r,h=e,o=s;for(;h0){const t=n[o-1];t.PO.greaterThan(u)&&(t.ct=u.subtract(t.EO),t.PO=t.EO.add(t.ct))}}else u=o>0?n[o-1].PO:Wt.ZERO;if(a<0){if(h+1===t.length){r={EO:u,ct:s};break}const e=Wt.fromString(t[h+1].EO,!1).subtract(i);for(;u.lessThan(e);){const t=u.add(s);this.bAt(n,o,u,s,t),u=t,o++}}else{const t=o+a;for(;o<=t;){const t=u.add(s);this.bAt(n,o,u,s,t),u=t,o++}}h++}o0&&(this.Hgt=n[n.length-1].EO),this._At=r}bAt(t,i,e,s,n){if(i{if("$$"===i)return"$";const r=t[e];if(void 0===r)return i;if(void 0===s)return r.toString();let h=function(t,i){switch(i){case"d":case"i":case"u":return t.toString(10);case"x":return t.toString(16);case"X":return t.toString(16).toUpperCase();case"o":return t.toString(8);default:return}}(r,n);return void 0===h?i:(h=Na(h,Number(s),"0"),h)})}constructor(t){this.xAt=void 0,this.xAt=t}};var tz=class t extends uc{get lwt(){return this.IAt?this.IAt:this.SAt&&this.SAt instanceof t?this.SAt.lwt:void 0}get fwt(){return this.RAt?this.RAt:this.SAt&&this.SAt instanceof t?this.SAt.fwt:void 0}fyt(t){const i=this.lwt;if(!i)return super.fyt(t);const e=i.Xy({Bandwidth:t.ck.kW,RepresentationID:t.ck.o});return{Yu:zd.xm(e,t.vwt[0])}}Nct(t,i){var e;const s=null!=(e=i._yt.Jmt)?e:1,n=this.fwt.Xy({Bandwidth:i.ck.kW,Number:i.$rt.Kyt(t,s),RepresentationID:i.ck.o,Time:i.$rt.hAt(t,s)});return{Yu:zd.xm(n,i.vwt[0])}}myt(t,i){}get rAt(){}constructor(t,i,e){super(t,i,e),this.IAt=void 0,this.RAt=void 0,this.IAt=e.lwt?new $q(e.lwt):void 0,this.RAt=e.fwt?new $q(e.fwt):void 0}};r();var iz=class t extends uc{Nct(t,i){const e=this.Wmt[t.aut],s=i.vwt[0];let n;return n=e.KD?zd.Dh(e.KD,s):s,{Yu:n.href,Sat:e.Hmt}}myt(t,i){}get Wmt(){return void 0!==this.Wp.Wmt?this.Wp.Wmt:this.SAt&&this.SAt instanceof t?this.SAt.Wmt:void 0}get rAt(){var t;return null==(t=this.Wmt)?void 0:t.length}};r(),r(),r(),r();var ez=class{tAt(t){const i=this.Ict(t.hut);if(i&&i.EO===t.EO)return i;const e=this.CAt(t.EO);return e&&e.EO===t.EO?e:void 0}},sz=class extends ez{get V(){return this.DAt.length}Ict(t){if(t>=0&&t0){const t=this.DAt[0];if(i<=Bs(t.EO,this.qD))return this.BAt(t)}const e=jq(this.DAt,Wt.fromNumber(i*this.qD));if(!(e<0))return this.BAt(this.DAt[e])}Ect(t){const i=this.NAt(t),e=af(this.DAt,-1);return void 0!==e&&i>=Bs(e.PO,this.qD)?this.BAt(e):this.CAt(t)}BAt(t){const i=Bs(t.EO,this.qD)-this.jmt,e=i+this.MAt,s=Bs(t.ct,this.qD);return{iAt:this.iAt,hut:t.aut,EO:e,Qyt:Wt.fromNumber(i*this.qD),ct:s,PO:e+s,LAt:[t.OAt,t.FAt]}}NAt(t){return t-this.MAt+this.jmt}constructor(t,i,e,s,n){super(),this.iAt=void 0,this.qD=void 0,this.MAt=void 0,this.jmt=void 0,this.DAt=void 0,this.iAt=t,this.qD=i,this.MAt=e,this.jmt=s,this.DAt=n}};r(),r(),r();var nz=class t{agt(){return this.KC.ac7)throw new RangeError("Invalid EBML ID size");let i=0;for(let e=0;e=1,"Incorrect log2 value"),T(this.ck,this.KC,i)}static qAt(t){if(8===t.length&&224&t[1])throw new g("EBML variable sized integer is too large");let i=0;for(let e=0;e8)throw new RangeError("EMBL integer field size is too large");if(8===t&&224&this.GAt.getUint8(0))throw new RangeError("EMBL integer field value is too large");let i=0;for(let e=0;e0?zq(t.vwt.map(t=>t.Yu),i):i.slice(),this.zyt&&(t.pwt?this.zyt.er(t.pwt):t.gwt?this.zyt.er(t.gwt[0]):t._wt&&this.zyt.er(t._wt))}hyt(){var t;return null==(t=this.ubt)?void 0:t.cbt}yyt(){var t;return null==(t=this.ubt)?void 0:t.dbt}lbt(t){const i=this.fbt,e=this.wct.ct,s=this.ubt,n=this.vbt(t);s&&uh(e,i,1e-5)&&kz(s,n)||(this.fbt=e,this.ubt=n,this.So(new Az))}zg(){this.Vo(),this.zyt&&(this.zyt.zg(),this.zyt=void 0)}constructor(t,i,e){super(),this.pE=void 0,this.Wp=void 0,this.rbt=void 0,this.zyt=void 0,this.fbt=1/0,this.ubt=void 0,this.pE=i,this.abt(t,e)}};function bz(t){let i,e;for(const e of t){const t=e.hyt();if(t){i=t.Tn;break}}if(void 0!==i){for(let i=t.length-1;i>=0;i--){const s=t[i].hyt();if(s){e=s.An;break}}return void 0!==e?{Tn:i,An:e}:void 0}}function Sz(t){if(0===t.length)return;let i=0,e=1/0;for(const s of t){const t=s.hyt();if(!t)return;if(i=_.max(i,t.Tn),e=_.min(e,t.An),i>=e)return}return{Tn:i,An:e}}function Tz(t){let i;for(const e of t){const t=e.yyt();t&&(!i||t.getTime(){for(const e of i.frt)pi(t,e)||t.push(e);return t},[])}get Np(){return this.frt.length>0?this.frt[0]:""}get Km(){return this._bt[0].Km}get o(){return this.hS}get Idt(){return this.jpt.Idt}get oQ(){return this._bt[0].oQ}get wct(){return this.jpt}get rat(){return De(this.Ilt,t=>t.rat)}hyt(){return Sz(this._bt)}yyt(){let t;for(const i of this._bt){const e=i.yyt();e&&(!t||e.getTime()t.o===s)),t||(t={o:s,Ilt:[]},i.push(t)),t.Ilt.push(e)}return i}r();var Iz=class extends Hq{get Ilt(){return this._bt}get Xpt(){return this.gbt}get Mwt(){return this.uyt.ck.Mwt}get ct(){return this.uyt.ct}get An(){return this.Tn+this.ct}get Lwt(){return this.uyt.ck.Lwt||[]}get o(){return this.uyt.o}get Sot(){return this.pbt}get Idt(){return this.mbt}get Tmt(){return this.mbt.wbt(this)}get wct(){return this}get Smt(){return this.mbt.ybt(this)}get Abt(){return this.bbt(1/0,_.min)}get Sbt(){return this.bbt(0,_.max)}bbt(t,i){if(0===this.gbt.length)return;let e=t;for(const t of this.gbt)if(RT(t.Km)){const s=t.oyt;if(void 0===s)return;e=i(e,s)}return e}get Tn(){return this.uyt.Tn}get zk(){return this.Idt.zk}Tbt(){this.pbt||(this.pbt=!0,this.So(new Pz),this.kn())}async er(t,i){0===this._bt.length?(await this.kbt(this.uyt.Ilt,t,i),this.Ebt(this._bt),ii(i)):await this.Pbt(t,i)}async kbt(t,i,e){for(const s of t){const t=new qq(this,s);try{await t.er(i,e),this._bt.push(t)}catch(t){sa(t)}}}Ebt(t){const i=xz(t);for(const t of i){const i=new Ez(this,t.o,t.Ilt);this.gbt.push(i)}}async Pbt(t,i){for(const e of this._bt)await e.er(t,i)}hyt(){return this.uyt.hyt()}yyt(){return this.uyt.yyt()}kn(){this.Vo(),this.uyt.mn(Ls.yot,this.ayt);for(const t of this.gbt)t.kn();for(const t of this._bt)t.kn();Yo(this._bt),Yo(this.gbt)}constructor(t,i){super(),this.uyt=void 0,this._bt=[],this.gbt=[],this.mbt=void 0,this.pbt=!1,this.mbt=t,this.uyt=i,this.uyt.wn(Ls.yot,this.ayt)}};r();var Rz=class extends wp{constructor(){super(d.qw)}};r(),r();var Cz=function(t){return t.xbt="Ibt",t}({}),Dz=class extends wp{constructor(){super(Cz.xbt)}};r(),r(),r(),r();var Bz=class extends ft{get Nut(){return this.Kot}get wct(){return this.Kot.wct}get Myt(){return this.Kot.Myt}get oQ(){return this.Wp.oQ||this.Kot.oQ}get _yt(){return this.hbt()}get $rt(){return this._yt.$rt}kct(t){const i=this.oQ;return!(!Hh(i)&&!Qy(i))&&this.$rt.kct(t.aut)}Pct(t,i,e,s){return this.$rt.Pct(t,this,i,e,s)}fyt(){return this._yt.fyt(this)}Nct(t){return this._yt.Nct(t,this)}myt(t){return this._yt.myt(t,this)}wyt(){return this.Rbt}vbt(t){const i=this.$rt,e=i.wyt(t),s=e&&function(t,i){const{Fyt:e,Uyt:s,Oyt:n}=t,r=e.EO;let h;const o=i.Xyt(s);if(o.getTime()<=n.getTime())h=s.PO;else{const t=(o.getTime()-n.getTime())/1e3,i=_.max(s.ct-t,0);h=s.EO+i}return{Tn:r,An:h}}(e,i),n=this.$rt.yyt(t,e);return this.Rbt=e,{Oyt:t,cbt:s,dbt:n}}er(t){this.abt(t,this.Kot.vwt)}constructor(t,i){super(t,i,i.vwt),this.Kot=void 0,this.Rbt=void 0,this.Kot=i,this.obt(!0)}},Nz=class extends ft{get rat(){return this.elt}get wct(){return this.jpt}get Myt(){return this.jpt.Myt}get Jdt(){return this.Wp.Jdt}get oQ(){var t;return this.Wp.oQ||(null==(t=this.elt[0])?void 0:t.ck.oQ)||""}get iwt(){return this.ck.iwt}get ewt(){return this.ck.ewt}er(t){this.abt(t,this.jpt.vwt);const i=t.rat||[];if(this.elt.length!==i.length)throw new m("Expected "+this.elt.length+' representations in adaptation set "'+t.o+'", found '+i.length);for(let t=0;tnew Bz(t,this))}},Mz=class extends ft{get Ilt(){return this._bt}get Xpt(){return this.gbt}get wct(){return this}get Myt(){return this.Cbt}get o(){return this.Wp.o}get Tn(){return this.MU}get ct(){return this.WA}er(t,i){this.abt(t,this.Cbt.vwt),this.WA=i;const e=t.Ilt||[];if(this._bt.length!==e.length)throw new m("Expected "+this._bt.length+' adaptation sets in period "'+t.o+'", found '+e.length);for(let t=0;tnew Nz(t,this)),this.gbt=xz(this._bt)}};r();var Lz=class{get Dbt(){return this.Bbt.Fwt.YF}get Nbt(){return this.Bbt.Fwt.KF}get Mbt(){return this.Bbt.Fwt.Owt}get Lbt(){var t;return null==(t=this.Bbt.ux)?void 0:t.YF}get Obt(){var t;return null==(t=this.Bbt.ux)?void 0:t.YF}constructor(t){this.Bbt=void 0,this.Bbt=t}},Oz=new Date("2000-01-01"),Fz=class extends Ne{get ck(){return this.Wp}get Km(){return this.Wp.Km||Eh.mV}get Vwt(){return this.Fbt||this.Wp.Vwt||this.Kwt}get Uwt(){return this.Wp.Uwt}get Nyt(){var t,i;return null!=(i=null==(t=this.Ubt)?void 0:t.ignoreAvailabilityWindow)&&i}get Gwt(){return this.Vbt}get vwt(){return this.rbt}get Hwt(){return this.Hbt}get smt(){return this.Wbt}get Kwt(){return this.Wp.Kwt||this.En}get Kmt(){return this.Wp.Kmt}get qbt(){return this.zbt}get Gbt(){return this.En}get Zwt(){return this.Bbt}hyt(){var t;return null==(t=this.ubt)?void 0:t.cbt}yyt(){var t;return null==(t=this.ubt)?void 0:t.dbt}er(t,i,e,s){var n;const r=void 0!==this.Wp&&this.Wp.Km===Eh.wV;this.Wp=t,this.zbt=null!=s?s:e,this.En=e;const h=[lb(i)];this.rbt=t.vwt&&t.vwt.length>0?zq(t.vwt.map(t=>t.Yu),h):h,this.Hbt=t.Hwt&&t.Hwt.length>0?zq(t.Hwt,this.rbt):[];const o=this.Hbt.map(t=>t.href),a=i.href;pi(o,a)||(this.Hbt.push(i),o.push(a));const u=this.Xbt.href;pi(o,u)||(this.Hbt.push(this.Xbt),o.push(u)),this.Vbt=null==(n=t.Gwt)?void 0:n.Rmt(),t.Zwt&&(this.Bbt=new Lz(t.Zwt));const c=t.Km===Eh.wV,d=function(t,i,e){const s=[];for(let e=0;e0&&t[e-1].ct){r=s[e-1]+t[e-1].ct.Rmt()}else{if(0!==e||i)break;r=0}s.push(r)}const n=[];for(let i=0;i0){const r=s.length-1,h=t[r],o=s[r];let a=1/0;i||(a=h.ct?h.ct.Rmt():e-o),n.push({ck:h,Tn:o,ct:a})}return n}(t.smt,c,this.Vbt);this.jbt(d,r,c),this.lbt(e)}jbt(t,i,e){const s=this.Wbt;if(0===t.length)return void Yo(s);const n=t[0].ck.o;let r=0;for(;r0&&t.length>0){var o;const i=null!=(o=Uz(s[0].ck))?o:$c.wF;var a;const e=null!=(a=Uz(t[0].ck))?a:$c.wF;if(e.eF(i)){const n=e.lF(i);void 0!==this.Vbt&&(this.Vbt+=n.iF());for(let i=0;it.href):[this.iSt]}get iSt(){return this.eSt.href}get qwt(){return this.uyt&&this.uyt.ck.qwt}get zwt(){return this.uyt&&this.uyt.ck.zwt}get Gwt(){return this.uyt&&this.uyt.ck.Gwt}get Xwt(){return this.uyt&&this.uyt.ck.Xwt}get Qwt(){var t,i;const e=(null==(i=this.uyt)||null==(t=i.ck.Qwt)?void 0:t.Cmt())||0;return _.max(e,Zz)}get sx(){return this.sSt}nSt(t){const i=this.sx;this.sSt=t,i!==this.sx&&this.So(new Dz)}get smt(){return this.Wbt}get rSt(){return this.Km===Eh.wV?this.Syt:this.hSt}get oSt(){const t=this.rSt;if(void 0!==t)for(const i of this.smt)if(i.Tn<=t&&i.An>t)return i}get rwt(){return this.uyt&&this.uyt.ck.rwt}get Kwt(){return this.uyt&&this.uyt.Kwt}get Abt(){for(let t=this.Wbt.length-1;t>=0;t-=1){const i=this.Wbt[t].Abt;if(i)return i}}get Syt(){const t=this.Abt;if(void 0===t)return;const i=t-this.aSt;return _.max(i,this.hSt)}get hSt(){for(const t of this.Wbt){const i=t.ryt;if(void 0!==i)return i}}get zk(){return Boolean(this.uSt.zk)}get aSt(){var t,i;if(this.uSt.cSt&&this.Km===Eh.wV)return this.uSt.cSt;const e=null==(i=this.uyt)||null==(t=i.ck.Ywt)?void 0:t.Rmt();return void 0!==e?e:this.Km===Eh.wV?1.5*this.Xwt.Rmt():0}get Kmt(){return this.uyt&&this.uyt.Kmt}get Km(){return this.uyt?this.uyt.Km:void 0}get Zwt(){var t;return null==(t=this.uyt)?void 0:t.Zwt}async er(t,i,e){const s=[],n=[],r=t.Wwt?zd.Dh(t.Wwt,this.eSt):this.eSt;void 0===this.uyt?(await this.dSt.VY(t.Jwt),this.uyt=new Fz(t,this.eSt,r,this.xdt(),this.Ubt),this.uyt.wn(Ls.yot,this.Rs)):this.uyt.er(t,r,this.xdt(),i);const h=this.uyt.smt;let o;if(0===h.length)o=this.Wbt.slice(),Yo(this.Wbt);else{const t=h[0].o;let i=0;for(;i0)return this.Wbt[i-1]}wbt(t){const i=this.Wbt.indexOf(t);if(i>=0&&i+10){const e=_.min(i,2147483647);await Er(e,t)}try{await this.mSt(t),this.uyt.Idt.nSt(!0)}catch(t){throw new m("The provided MPEG-DASH manifest could not be loaded - "+t.message)}finally{this.kSt=void 0}}TSt(){const t=this.uyt.Idt.xdt().getTime()-this.uyt.Idt.qbt.getTime();return this.uyt.Idt.Qwt-t}ESt(t){const i=this.uyt.Idt.yyt();if(i){const e=i.getTime()-t.getTime();if(e>0)return e}this.uyt.Idt.lbt(t);const e=this.uyt.Idt.yyt();return e?e.getTime()-t.getTime():NaN}async bSt(t){const i={stack:[],error:void 0,hasError:!1};try{null!=this.kSt||(this.kSt=this.SSt(t));const e=Be(i,at.ep([t]),!1),s=[this.kSt,this.PSt(e.Yg)].filter(it);await Promise.race(s).catch(yf)}catch(t){i.error=t,i.hasError=!0}finally{Cs(i)}}PSt(t){const i=this.uyt.Idt.xdt(),e=this.ESt(i);if(!S(e)&&!this.Br.Idt.Nyt)return this.xSt(e,t)}async xSt(t,i){await Er(t,i);const e=this.uyt.Idt.xdt();this.uyt.Idt.lbt(e)}async ISt(t,i){const e=await this.CSt.RSt(t,{},i);return(new Nq).$wt(e.DSt,e.gk)}kn(){return this.pSt.Zg(),this.wSt=void 0,this.gSt=void 0,this.kSt=void 0,this.uyt.Idt.kn(),Promise.resolve()}constructor(t,i,e,s,n){this.CSt=void 0,this.uyt=void 0,this.wSt=void 0,this.gSt=void 0,this.kSt=void 0,this.pSt=new at,this.mSt=async t=>{try{const i=this.uyt.Idt.xdt(),e=await this.ISt(this.uyt.Idt.Hwt,t);await this.uyt.Idt.er(e,i,t)}catch(t){throw rt(t)&&this.uyt.Idt.nSt(!1),t}},this.CSt=s,this.uyt=new Jz(t,i,e,this.pSt.Yg,n)}};r(),r();var tG=class extends wp{constructor(t,i){super("fmt"),this.Emt=void 0,this.hpt=void 0,this.Emt=t,this.hpt=i}},iG=class extends Ne{get hpt(){return this.dlt}get Km(){return this.Vp}get Z(){return this.RI.slice()}jU(t){t&&this.dlt!==t&&this.BSt(t)}QU(t){this.dlt===t&&this.BSt(void 0)}BSt(t){this.dlt=t,this.So(new tG(this,this.dlt))}kn(){this.Vo();for(const t of this.RI)t.Jdt=void 0;Yo(this.RI)}constructor(t,i){super(),this.dlt=void 0,this.RI=void 0,this.Vp=void 0,this.Vp=t,this.RI=i;for(const t of this.RI)t.Jdt=this}};r(),r(),r();var eG=class extends wp{constructor(t,i,e){super(d.Dw),this.currentTime=void 0,this.initDataType=void 0,this.initData=void 0,this.currentTime=t,this.initDataType=i,this.initData=e}};function mc(t,i,e,s,n){let r=[],h=[];for(const t of i)t.Km===Ci.Dk?r=r.concat(t.Z):t.Km===Ci.Bk&&(h=h.concat(t.Z));return[sG(t,r,e,s,null==n?void 0:n.preferredAudioCodecs),nG(t,h,e,s,null==n?void 0:n.preferredVideoCodecs)].filter(it)}function sG(t,i,e,s,n){const r=Jr(s||[],t=>t.Lot===Ci.Dk&&t.Rt),h=[hG(r,e,t),oG(r),aG(r),uG(r,n),cG(),t=>{const i=t.filter(t=>"main"===t.Lt);return i.length>0?i:t}];return rG(i,h)}function nG(t,i,e,s,n){const r=Jr(s||[],t=>t.Lot===Ci.Bk&&t.Rt),h=[hG(r,e,t),uG(r,n),cG(),t=>{const i=t.filter(t=>"main"===t.Lt);return i.length>0?i:t}];return rG(i,h)}function rG(t,i){if(0===t.length)return;let e=t;for(const t of i){if(1===e.length)return e[0];e=t(e)}return e[0]}function hG(t,i,e){return s=>{const n=t?t.Nut.o:void 0;if(!it(n))return s;const r=null==i?void 0:i.Mwt,h=e.Mwt,o=r&&h&&r.zE===h.zE,a=Jr(s,t=>t.Nut.o===n);return o&&a?[a]:s}}function oG(t){return i=>{const e=t?t.bs:"",s=i.some(t=>""!==t.bs)?i.filter(t=>""!==t.bs):i;if(""===e)return s;const n=s.filter(t=>t.bs===e);return n.length>0?n:s}}function aG(t){return i=>{const e=t?t.Lt:"";if(""===e)return i;const s=i.filter(t=>t.Lt===e);return s.length>0?s:i}}function uG(t,i){return t=>{if(i&&i.length>0)for(const e of i){const i=t.filter(t=>t.KI.II.some(t=>bN(t.frt,e)));if(i.length>0)return i}return t}}function cG(){return t=>{let i=[],e=-1/0;for(const s of t){const t=s.Nut.Kq;t>e?(e=t,i=[s]):t===e&&i.push(s)}return i}}r(),r();var ac=function(t){return t.NSt="api",t.MSt="start",t}({});r();var dG={maxRetries:3,minimumBackoff:1e3,maximumBackoff:1/0},lG=class{LSt(t,i,e){const s=this._dt.maxRetries===1/0?dG:this._dt;return $i(()=>this.OSt(t,i,e),e,s.maxRetries,s.minimumBackoff,s.maximumBackoff)}async OSt(t,i,e){let s;for(const n of t)try{const t=new $n({Yu:n,dk:M.NT,fk:i,zk:this.FSt,Uk:X.GET,Km:Al.wk,Wk:Xa.pk,Yg:e,Vk:15e3,Hk:5e3}),s=await this.nV.lk(t),r=await s.UT(e);return{DSt:r,USt:n,gk:s.gk}}catch(t){s=t}throw s}constructor(t,i,e=dG){this.nV=void 0,this.FSt=void 0,this._dt=void 0,this.nV=t,this.FSt=i,this._dt=e}};function ia(t){return fn(t)}function fG(t,i){const e=fn(t);return i?""+e+i:""+e}r(),r();var vG=class{async RSt(t,i,e){let s;for(const n of this.VSt)try{return await n.RSt(t,i,e)}catch(t){sa(t),s=t}throw s}constructor(t){this.VSt=void 0,this.VSt=t}},_G=class{async RSt(t,i,e){const s=await this.eut.HSt(t);if(s)return{DSt:s.data,USt:s.locationURL,gk:s.responseURL};throw new m("Manifest fetch from cache unsuccesful")}constructor(t){this.eut=void 0,this.eut=t}},gG=class{async RSt(t,i,e){return await this.WSt.LSt(t,i,e)}constructor(t){this.WSt=void 0,this.WSt=t}};function pG(t,i){return new vG([new _G(i),new gG(t)])}var mG=class{async RSt(t,i,e){const s=await this.CSt.RSt(t,i,e);return await this.qSt(s),s}async qSt(t){await this.GSt.zSt({key:ia(t.USt),locationURL:fn(t.USt),responseURL:fn(t.gk),data:t.DSt,references:[this.XSt.o]})}constructor(t,i,e){this.CSt=void 0,this.GSt=void 0,this.XSt=void 0,this.CSt=t,this.GSt=i,this.XSt=e}};r();var gt=class extends wp{constructor(){super(d.Xw)}};r();var Fr=class extends wp{constructor(){super(d.Gw)}};r(),r();var pt=class extends es{jSt(t){return t.Ax=Zu.LOADED,this.tt(t),t}QSt(t){for(const i of this.Z.II)if(i.ZI===t)return i}constructor(t){super(t)}};function wG(t,i){return""===i?t:t+" "+i}r(),r(),r();var yG=class extends _h{get Ca(){return this.hu||(this.hu=function(t){return po(zt(t),{get attributes(){return t.iP},get eventID(){var i;return""+(null!=(i=t.KSt)?i:"")}})}(this)),this.hu}GO(t){return this.U===t.U}constructor(t,i,e,s,n){super(t,i,e,!1,null==n?void 0:n.toString()),this.iP=void 0,this.KSt=void 0,this.iP=s,this.KSt=n}},AG=class extends pt{YSt(t){const i=this.JU.tI(Ao.VU,"","","",void 0,nh.EVENT_STREAM);return i.ZI=t,this.jSt(i),i}JSt(t,i,e){const s=t.y8;var n;const r=null!=(n=t.zE)?n:"";var h;const o=null!=(h=t.qD)?h:1;var a;const u=null!=(a=t.jmt)?a:Wt.ZERO,c=wG(s,r);let d=this.QSt(c);d||(d=this.YSt(c));for(const s of t.aQ)if(!bG(s,d)){const t=SG(s,o,u,i);t.PO>e&&d.tV(t)}}async Un(t){await this.hr(),this.Cbt=t,this.Cbt.wn(d.qw,this.ZSt),this.ZSt()}async hr(){this.Cbt&&(this.Cbt.mn(d.qw,this.ZSt),this.Cbt=void 0);for(const t of this.Z.II)this.JU.iV(t);await super.hr()}ZU(t,i,e){return Ut(t,i,e)}constructor(t){super(t),this.Cbt=void 0,this.ZSt=()=>{var t,i;const e=null!=(i=null==(t=this.Cbt.hyt())?void 0:t.Tn)?i:0;if(e>0)for(const t of this.Z.II)St(t,e);for(const t of this.Cbt.smt)if(t.An>e)for(const i of t.Lwt)this.JSt(i,t,e)}}};function bG(t,i){const e=t.o;if(void 0!==e){if(Jr(i.L.II,i=>i.KSt===e&&i.U===t.ck))return!0}return!1}function SG(t,i,e,s){const n=t.o,r=t.tM.toSigned().subtract(e),h=t.ct,o=t.ck,a=t.iP,u=r.toNumber()/i+s.Tn,c=h?h.toNumber()/i:void 0,d=void 0!==c?u+c:s.Sbt;return new yG(u,d,o,a,n)}function TG(t,i,e,s,n){const r=[],h=Jr(e,t=>t.y8===Ng);if(void 0===h)return;const o=h.zE?function(t){const i=t.split(":",1)[0];switch(i){case"cbcs":case"cenc":return i;default:return}}(h.zE.toLowerCase()):"cenc";if(void 0!==o){for(const i of e)if(i.y8!==Ng)for(const e of rp(i.y8)){var a;const s=n&&i.A8?[i.A8]:[];var u;const h=null!=(u=null==(a=t.clearkey)?void 0:a.keys)?u:[];r.push({kS:e,BW:s,NW:void 0,HH:void 0,MW:h})}if(r.length)return{aH:t,Ept:{$St:o,uH:h.uH},kpt:r,tTt:i===Ci.Dk?s.slice():[],iTt:i===Ci.Bk?s.slice():[],T8:!1}}}function kG(t,i){if(!t)return i;if(!i)return t;const e=[],s=qh();var n;return EG(e,s,t.kpt),EG(e,s,i.kpt),{aH:t.aH,Ept:{$St:t.Ept.$St,uH:null!=(n=t.Ept.uH)?n:i.Ept.uH},kpt:e,tTt:PG(t.tTt,i.tTt,pi),iTt:PG(t.iTt,i.iTt,pi),T8:t.T8||i.T8||!1}}function EG(t,i,e){for(const s of e){const e=s.kS.$m;let n;i.has(e)?(n=i.get(e),n.BW=PG(n.BW,s.BW,xG)):(n=Mo({},s),t.push(n),i.set(e,n))}}function PG(t,i,e){const s=t.slice();for(const t of i)e(s,t)||s.push(t);return s}function xG(t,i){for(const e of t)if(lm(e,i))return!0;return!1}function IG(t,i,e){let s;const n=t.xW;if(n){const r=t.oQ,h=[];for(const i of t.frt)h.push(r+'; codecs="'+i+'"');s=TG(i||{},t.Km,n,h,e)}for(const n of t.rat)s=kG(s,RG(n,i,e));return s}function RG(t,i,e){return TG(i||{},t.Km,t.xW||[],[t.qT],e)}function CG(t){return t?t.kpt.map(i=>{const e=DG(t.aH,i.kS),s=t.Ept.$St;return{kS:i.kS,BW:i.BW,HH:i.HH,Mq:[{initDataTypes:[i.kS.Jm],audioCapabilities:BG(t.tTt,s,null==e?void 0:e.audioRobustness),videoCapabilities:BG(t.iTt,s,null==e?void 0:e.videoRobustness),persistentState:null==e?void 0:e.persistentState,distinctiveIdentifier:null==e?void 0:e.distinctiveIdentifier}],MW:i.MW}}):[]}function DG(t,i){switch(i.Km){case an.zm:return t.widevine;case an.qm:return t.playready;case an.jm:return t.fairplay;case an.Gm:case an.Xm:return t.clearkey}}function BG(t,i,e){if(0!==t.length)return t.map(t=>({contentType:t,encryptionScheme:i,robustness:e}))}function NG(t,i){const e=t=>{const e=i.indexOf(t.kS.$m);return e>=0?e:i.length};return xe(t,(t,i)=>e(t)-e(i))}r(),r();var MG=class extends pt{YSt(t){const i=this.JU.tI(Ao.VU,t.o,"thumbnails","",!1,nh.DEFAULT);return i.Xk=xh.Kn,this.jSt(i),i}async Un(t){await this.hr(),this.Cbt=t,this.Cbt.wn(d.qw,this.er),this.er()}eTt(t){this.sTt(t),this.nTt()}nTt(){const t=[];for(const i of this.Z.II)this.rTt(i)||t.push(i);for(const i of t)this.it(i)}sTt(t){const i=[];for(const e of this.elt)-1===t.indexOf(e)&&i.push(e);for(const t of i)oi(this.elt,t)}async hr(){this.Cbt&&(this.Cbt.mn(d.qw,this.er),this.Cbt=void 0);for(const t of this.elt)t.mn(Ls.yot,this.hTt);this.elt.length=0;for(const t of this.Z.II)this.JU.iV(t);await super.hr()}ZU(t,i,e){return Ut(t,i,e)}kn(){return this.hTt=void 0,super.kn()}oTt(){var t,i;const e=null!=(i=null==(t=this.Cbt.hyt())?void 0:t.Tn)?i:0;if(e>0)for(const t of this.Z.II)St(t,e)}aTt(t){return this.Z.II.some(i=>i.o===t.o)}uTt(t){return Jr(this.Z.II,i=>i.o===t.o)}rTt(t){return this.elt.some(i=>t.o===i.o)}constructor(t){super(t),this.elt=[],this.hTt=void 0,this.Cbt=void 0,this.er=()=>{const t=[];for(const i of this.Cbt.smt)for(const e of i.Ilt)if(e.Km===Ci.Nk&&e.rat.length>0){const i=e.rat[0];t.push(i),this.aTt(i)||this.YSt(i),-1===this.elt.indexOf(i)&&(this.elt.push(i),i.wn(Ls.yot,this.hTt)),this.cTt(i)}this.eTt(t)},this.cTt=t=>{const i=this.uTt(t);i&&t&&i.Xk!==xh.Nh&&(this.oTt(),function(t,i){const e=t.$rt,s=t.wyt();if(!s)return;const n=s.Fyt,r=s.Uyt,h=t.Ti,o=t.Mi,[a,u]=function(t){for(const i of t)if(Ih(i.y8,OG)||Ih(i.y8,FG)){const t=i.zE.match(LG);if(t){const[,i,e]=t;return[Number(i),Number(e)]}}return[1,1]}(t.iwt);let c=n;for(;c&&c.aut<=r.aut;){const s=t._yt.ct||c.ct,n=UG(i,c,t.Nct(c).Yu,h,o,a,u,s);for(const t of n)i.tV(t);c=e.Cct(c)}}(t,i))};const i=this;this.hTt=function(){i.cTt(this)}}},LG=/^(\d+)x(\d+)$/,OG="http://dashif.org/guidelines/thumbnail_tile",FG="http://dashif.org/thumbnail_tile";function UG(t,i,e,s,n,r,h,o){const a=[],u=i.EO,c=r*h,d=s/r,l=n/h,f=_.round(d),v=_.round(l),g=o/c;if(1===c){const i=u+g;return VG(t,u,i,e)?a:[new _h(u,i,e,!1)]}for(let s=0;s=i.PO)return a}return a}function VG(t,i,e,s){return t.L.II.some(t=>t.EO===i&&t.PO===e&&t.U===s)}r(),r(),r(),r();var HG=class extends _h{get $N(){return this.dTt}get zE(){return this.lTt}get fTt(){return this.vTt}get Ca(){return this.hu||(this.hu=function(t){return po(zt(t),{get schemeIDURI(){return t.$N},get value(){return t.zE},get emsgID(){return t.fTt}})}(this)),this.hu}GO(t){return L(this.U,t.U)}constructor(t,i,e,s,n,r){super(t,i,r,!1),this.dTt=void 0,this.lTt=void 0,this.vTt=void 0,this.dTt=e,this.lTt=s,this.vTt=n}},WG=class t extends pt{Odt(i,e,s){const n=jt.TD(dh(i));if(!n)return;const r=function(t,i){const e=[];for(const s of t)sT(s,i)&&e.push(s);return e}(n,Ro.VC);if(r.length){const i=t._Tt(n,e,s);this.gTt(r,i,s)}}gTt(t,i,e){for(const s of t){let t;t=1===s.bD?s.tM.toNumber()/s.qD+e:i+s.sM/s.qD;const n=t+s.iM/s.qD;"https://aomedia.org/emsg/ID3"===s.$N||"https://developer.apple.com/streaming/emsg-id3"===s.$N?this.pTt(s,t):this.mTt(s,t,n)}}mTt(t,i,e){const s=wG(t.$N,t.zE);let n=this.QSt(s);n||(n=this.wTt(s),this.jSt(n)),n.tV(new HG(i,e,t.$N,t.zE,t.o,t.eM))}pTt(t,i){const e=nL(dh(t.eM));if(!e)return;const s=wG(t.$N,t.zE);let n=this.QSt(s);n||(n=this.yTt(s),this.jSt(n));for(const t of e.J5){const e=new vL(i,t);DM(e,n.L.II),n.tV(e)}}static _Tt(t,i,e){const s=lr(t,Ro.HC);return s?Bs(s._M,s.qD)+e:i}wTt(t){const i=this.JU.tI(Ao.VU,"","","",void 0,nh.EMSG);return i.ZI=t,i.Xk=xh.JI,i}yTt(t){const i=this.JU.tI(Ao.VU,"","","",void 0,nh.ID3);return i.ZI=t,i.Xk=xh.JI,i}ZU(t,i,e){return Ut(t,i,e)}async hr(){for(const t of this.Z.II)this.JU.iV(t);await super.hr()}constructor(t){super(t)}},qG=class extends WG{async Un(t){await this.hr(),this.Cbt=t,this.Cbt.wn(d.qw,this.ZSt),this.ZSt()}async hr(){this.Cbt&&(this.Cbt.mn(d.qw,this.ZSt),this.Cbt=void 0),await super.hr()}constructor(...t){super(...t),this.Cbt=void 0,this.ZSt=()=>{var t,i;const e=null!=(i=null==(t=this.Cbt.hyt())?void 0:t.Tn)?i:0;this.qU(e)}}};r(),r();var zG=class{Uct(t,i){return this.ATt?this.eut.Uct(t,i):Promise.resolve(!1)}iut(t,i){return this.ATt?this.eut.iut(t,i):Promise.resolve(void 0)}async HSt(t){const i=await this.eut.HSt(t);return this.ATt=void 0!==i,i}WJ(t){return this.eut.WJ(t)}constructor(t){this.eut=void 0,this.ATt=!1,this.eut=t}};r();var GG=class extends VT{NL(){var t;return null!=(t=this.DL)?t:0}oR(){this.oa.MP=1/0}ML(t,i,e){return!1}LL(){return!0}constructor(t,i,e){super(t,i,e)}},XG=[d.Qw,d.Yw,d.iy,d.zw,d.oy],jG=[d.Kw,d.gy,d.Lw,d.Nw],QG=class t extends Ne{bTt(t){return!!this.iq&&this.iq.TZ(t)}async Lp(t){this.iq=await this.TL.Un(t),this.STt(),this.TTt(),this.iq.C4(this.ct)}kTt(t){return this.iq.EZ(t)}ETt(t){return this.iq.xZ(t)}async PTt(){this.xTt=this.ITt,this.iq&&(await this.TL.hr(),this.iq=void 0)}C3(){this.iq.C3()}A3(){const t=this.ct;this.iq.ct=n||uh(s,n,.001)}hkt(){var t;if(!this.uyt)return!1;if(this.uyt.Idt.Km!==Eh.wV)return!1;const i=null==(t=this.qTt)?void 0:t.Mc;if(i&&i.Sot)return!0;const e=[];for(const t of this.uyt.Idt.smt){const i=t.ryt,s=t.Sbt;void 0!==i&&void 0!==s&&e.push(i,s)}const s=new ve(e).LM();return function(t,i,e){if(!i.V||!e.V)return ve.iL();const s=i.Tn(0),n=i.An(i.V-1),r=t.Mn(e).BM().Mn(t).OM(i);return ve.tL(r.Tn(0),r.An(r.V-1)).FM(r).XM((t,i)=>tyt)}(this.ikt,this.rkt,s).V>0}get JP(){return Mo({},this.ITt,{nO:HI.Ng.fW(),rO:this.okt,hO:{amountOfBufferedAudioSegments:this.akt,amountOfBufferedVideoSegments:this.ukt}})}get ITt(){return function(t,i){return{iO:t.iO+i.iO,eO:t.eO+i.eO,sO:t.sO+i.sO}}(this.xTt,this.TL.ZP())}get $P(){return this.TL.$P}set $P(t){this.TL.$P=t}get hx(){return this.X8?this.ckt:this.qTt&&this.qTt.emt?this.dkt:this.ckt}get ux(){return this.TL.ux}set ux(t){this.TL.ux=t}get _x(){let t=this.Ho;return this.qTt&&(t=t.OM(this.lkt)),t.LM(.1)._s()}get lkt(){return this.TL._x}fkt(t){this.Ho=this.Ho.OM(t)}get mx(){return this.tq}set mx(t){this.tq=t,this.vkt()}get Ax(){let t=this.TL.Ax;return this._kt&&(t=_.max(mh.Qn,t)),t}get rkt(){return this.gkt(!1)}get pkt(){return this.gkt(!0)}get Sx(){return this.rkt._s()}get kx(){return this.Sz||this.mkt}get mkt(){return this.TL.kx}get Y4(){return this.TL.Y4}get nq(){}get wkt(){var t,i;return null!=(i=null==(t=this.uyt)?void 0:t.Idt.Km)?i:Eh.mV}get nt(){return this.Gl}get rt(){return this.$L}get Rx(){var t;return yB(this.TL)&&(this.TL.Rx||(null==(t=this.ykt())?void 0:t.Mi))||0}get Bx(){var t;return yB(this.TL)&&(this.TL.Bx||(null==(t=this.ykt())?void 0:t.Ti))||0}get Mx(){return this.TL.Mx}set Mx(t){this.TL.Mx=ur(t,0,1)}get Fx(){return this.rq}get Vx(){return!1}set Vx(t){}get hq(){return this.oq}Akt(t){t.wn(XG,this.Rs),t.wn(d.ly,this.bkt),t.wn(d.Sw,this.Skt),t.wn(Mc.ma,this.Tkt),t.wn(d.Ew,this.kkt),t.wn(d.Yw,this.Ekt),t.wn("fmt",this.Pkt),t.wn("qpt",this.Pkt)}xkt(t){t.mn(XG,this.Rs),t.mn(d.ly,this.bkt),t.mn(d.Sw,this.Skt),t.mn(Mc.ma,this.Tkt),t.mn(d.Ew,this.kkt),t.mn(d.Yw,this.Ekt),t.mn("fmt",this.Pkt),t.mn("qpt",this.Pkt)}Ikt(t){t.wn(d.Qw,this.Rs)}Rkt(t){t.mn(d.Qw,this.Rs)}ykt(){if(!this.qTt)return;const t=Jr(this.qTt.gmt,t=>t.Lot===Ci.Bk);return t?t.XI:void 0}gkt(t){var i;const e=null==(i=this.uyt)?void 0:i.Idt;if(!e)return ve.iL();const s=e.hSt;let n=t?e.Abt:e.Syt;if(void 0===s||void 0===n)return ve.iL();if(!t){const t=this.lkt;t.V>0&&t.An(t.V-1)>n&&(n=_.min(t.An(t.V-1),e.Abt))}const r=this.ct;return isFinite(r)&&r>n&&(n=r),ve.tL(s,n).CM()}async Un(t,i){let e,s;ii(i);const n=this.uyt.Idt;try{e=n.oSt,s=n.rSt}catch(t){throw new m("Something went wrong determining the start of the provided MPEG-DASH stream")}if(!e)throw new m("Something went wrong determining the initial Period of the provided MPEG-DASH stream");if(void 0===s)throw new m("Something went wrong determining the start time of the provided MPEG-DASH stream");t.textTracks&&this.Ckt(t.textTracks),this.k7();const r=this.klt(e),h=mc(e,r,void 0,void 0,this.Ypt),o=this.zTt(e,h,e,h,!0);h.forEach(t=>t.Rt=!0);const a=this.GTt(h,o);await this.Lp(a),this.YTt=a,ii(i);const u=await this.NTt(e,r,h,o);ii(i),this.Dkt(u),this.R7(),ii(i),await u.$ot(),ii(i),!this.Bkt&&s>0&&this.My(s,!0,ac.MSt),this.Sz||(this.QTt(),this.Nkt())}QTt(){this.OTt.Zg(),this.OTt=new at,this.HTt=$e(this.Mkt(this.HTt,this.UTt,this.OTt.Yg),this.OTt).catch(this.mmt)}Lkt(){this.OTt.Zg()}async Mkt(t,i,e){for(await Promise.all([t,i]),ii(e);;){var s;const t=null==(s=this.qTt)?void 0:s.Mc;if(!t){0;break}if(!await this.Okt(t,e)){0;break}}}async Okt(t,i){var e;ii(i);const s=this.qTt;for(0;this.uyt.Idt.Km===Eh.wV&&void 0===(null==(e=this.wbt(t))?void 0:e.ryt);){try{await Nc(this.Fkt.ASt,i)}catch(t){if(sa(t),this.Ukt())return!0;throw t}await this.Vkt()}for(ii(i),await this.Vkt(),ii(i);!s.Jpt();)await s.ww(gH.Mlt,i),await this.Vkt();ii(i),await this.Vkt(),ii(i);const n=this.wbt(t);return n?(this.Hkt(n)?await this.Wkt(n,i):await this.qkt(n,i),!0):(this.C3(),!1)}Ukt(){const t=this.QW;return it(t)&&t.An>this.MP}Hkt(t){var i,e,s,n,r;const h=null!=(r=null==(i=this.Ac)?void 0:i.seamlessSwitchStrategy)?r:Oh.OL;if(h===Oh.FL)return!0;if(h===Oh.UL)return!1;const o=this.qTt,a=null==o?void 0:o.Mc,u=null==o?void 0:o.gmt,c=mc(t,this.klt(t),a,u,this.Ypt),d=this.zTt(t,c,a,u,!1);if(h===Oh.CLEAR_ONLY&&((null==(e=this.qTt)?void 0:e.Tpt)||d)||h===Oh.SAME_DRM_ONLY&&!((null==(s=this.qTt)?void 0:s.Tpt)&&d||!(null==(n=this.qTt)?void 0:n.Tpt)&&!d))return!1;const l=this.GTt(c,d);return this.bTt(l)}zkt(){return!0}Gkt(t){const i=this.Xkt();for(const e of i)e!==t&&(e.Xk=xh.Nh)}KTt(){if(void 0!==this.jkt){if(this.jkt.tR){const t=Jr(this.ht.II,t=>t.Rt);void 0!==t&&this.jkt.bs===t.bs||(this.jkt.Xk=xh.Nh)}}else this.Qkt()}Qkt(){if(this.Xkt().length)return;const t=Jr(this.ht.II,t=>t.Rt);if(void 0===t)return;const i=this.nt.II.filter(t=>t.tR);for(const e of i)if(e.bs===t.bs)return e.Xk=xh.Kn,void(this.jkt=e)}Xkt(){return this.nt.II.filter(t=>t.Xk===xh.Kn&&(t.Lt===Ao.FU||t.Lt===Ao.OU))}Kkt(t){if(t&&this.jkt){const i=function(t,i){if(""===t.bs)return;return i.filter(i=>i.bs===t.bs)[0]}(this.jkt,t.nt.II);i&&(i.Xk=xh.Kn)}}async Wkt(t,i){var e,s;const n=this.qTt;let r=this.ekt;const h=this.YTt;try{ii(i);const e=n.Mc,s=n.gmt,h=this.klt(t);JG(n.kmt,h);const o=mc(t,h,e,s,this.Ypt),a=this.zTt(t,o,e,s,!1);o.forEach(t=>t.Rt=!0);const u=this.GTt(o,a);for(0,await n.Jot(),this.A3(),ii(i),r&&r.Mc===t?(this.bTt(u)&&await this.kTt(u),this.YTt=u):(r&&await r.kn(!0),this.bTt(u)&&await this.kTt(u),this.YTt=u,r=await this.NTt(t,h,o,a),this.ekt=r,this.Ikt(r),this.Ykt.BI=r.nt,r.iat(n)),await r.$ot(),ii(i);this.ZTt900){this.Zkt=e,this.JTt();const s=_.max(this.ZTt,t.Tn);try{await this.$Tt(s,!1,!0,i)}finally{this.tkt()}}}async qkt(t,i){for(ii(i),await this.qTt.Jot(),this.A3(),await this.RTt(t.Tn),ii(i),this.C3();!this.TL.UP&&this.ZTtt.Rt=!0);const o=this.GTt(r,h);this.qTt&&(this.$kt.mn(Te.pa,this.tEt),await this.qTt.kn(),this.$kt.wn(Te.pa,this.tEt),this.qTt=void 0),this.ekt&&(await this.ekt.kn(),this.ekt=void 0),this.JTt(),this.k7();const a=_.max(this.ZTt,t.Tn);await this.PTt(),await this.Lp(o),this.YTt=o;const u=await this.NTt(t,n,r,h);this.Dkt(u);try{const t={stack:[],error:void 0,hasError:!1};try{const e=this.$Tt(a,!1,!0,i);Wr(e),await u.$ot();const s=Be(t,at.ep([i]),!1);await Promise.race([e,u.ww([gH.Mlt],s.Yg)])}catch(i){t.error=i,t.hasError=!0}finally{Cs(t)}}finally{this.R7(),this.tkt()}}async Vkt(){const t=this.ekt;t&&t.Mc.Sot&&(await t.kn(!0),this.ekt=void 0)}static iEt(t,i){const e=[],s=[];let n=!i.some(t=>t.Plt.some(t=>"main"===t.zE));for(const t of i){if(-1!==e.indexOf(t))continue;const r=KG(t.Wdt.concat(t.Plt),n);n=!1;const h=t.rat.map(t=>t.kot),o=new cH(t,h,r),a=YG(t,i);for(const t of a)o.slt(t),e.push(t);s.push(o)}return new iG(t,s)}klt(i){const e=[],s=[];for(const t of i.Xpt)RT(t.Km)&&(0===t.rat.length?this.So(new _H("No supported representation found in the AdaptationSet with mimetype : "+t.Km)):t.Km===Ci.Dk?e.push(...t.Ilt):s.push(...t.Ilt));const n=[];return e.length>0&&n.push(t.iEt(Ci.Dk,e)),s.length>0&&n.push(t.iEt(Ci.Bk,s)),n}GTt(t,i){var e,s,n,r,h,o,a,u;const c=t.map(t=>{var i;return Br.Yct(null!=(i=t.ilt)?i:t.rat,MT(t.Lot,this.Ypt))}).map(t=>({qT:t.qT})),d=null==(s=this.Ac)||null==(e=s.dash)?void 0:e.desiredTimescale;var l;const f=(null==(n=this.Ac)?void 0:n.seamlessSwitchStrategy)!==Oh.UL&&(null==(r=this.Ac)?void 0:r.seamlessSwitchStrategy)!==Oh.CLEAR_ONLY&&(null==(h=this.Ac)?void 0:h.seamlessSwitchStrategy)!==Oh.SAME_DRM_ONLY&&(null!=(l=null==(a=this.Ac)||null==(o=a.dash)?void 0:o.needsTimescaleShifting)?l:zd.Zs.kp),v=null==(u=this.Ac)?void 0:u.useManagedMediaSource;return{Km:Zr.wV,L4:c,aq:CG(i),T8:null==i?void 0:i.T8,kp:f,x3:d,X4:v}}static eEt(t,i){if(!t.length)return;let e;for(const s of t){const t=0===s.hlt.length;e=kG(e,IG(s.Nut,i,t))}return(null==i?void 0:i.preferredKeySystems)&&e&&(e.kpt=NG(e.kpt,i.preferredKeySystems)),e}zTt(i,e,s,n,r){var h,o;const a=this.Ac.contentProtection;let u=t.eEt(e,a);if(void 0!==u)return u;var c;const d=null!=(c=null==(h=this.Ac)?void 0:h.seamlessSwitchStrategy)?c:Oh.OL;if(d===Oh.UL||d===Oh.CLEAR_ONLY||d===Oh.SAME_DRM_ONLY)return;const l=null==(o=this.qTt)?void 0:o.Tpt;if(!r&&void 0!==l){const t=!l.T8;if(d===Oh.OL&&t&&!this.zkt())return;return l}const f=!r&&d===Oh.OL;return u=this.sEt(i,a,s,n,f),void 0!==u?(u.T8=!0,u):void 0}sEt(i,e,s,n,r){let h=i,o=!1;for(;;){if(h=o?this.ybt(h):this.wbt(h),void 0===h){if(o)return;o=!0,h=i;continue}const a=mc(h,this.klt(h),s,n,this.Ypt),u=t.eEt(a,e);if(r){const t=this.GTt(a,u);if(!this.bTt(t))return}if(void 0!==u)return u}}Ckt(t){for(const i of t)i.src&&this.pq.eV(i);Ds(this.pq.Z)}zx(){var t;const i=this.hx;this.ckt=!0,i||(this.X8||(this.nEt(new dt),this.rEt()),(null==(t=this.jW)?void 0:t.sL)&&this.jW.Xx(),this.hEt())}Gx(){this.oEt||(this.oEt=new pa),this.aEt();const t=this.oEt.Qy;return Wr(t),t}aEt(){if(this.ckt=!1,this.n7=!0,this.uEt=!1,this.vkt(),this.UP){const t=this.rkt;t.V>0&&this.My(t.Tn(0))}this.X8||this.h7().then(this.cEt,this.nEt),this.MTt(),this.hEt()}get dkt(){return this.TL.hx}h7(){return this.TL.Gx()}rEt(){this.TL.zx()}k7(){this.X8||(this.ckt=this.hx,this.X8=!0,this.rEt())}R7(){this.X8&&(this.X8=!1,this.ckt||this.h7().then(this.cEt,this.nEt),this.MTt(),this.hEt())}hEt(){const t=this.NV,i=this.hx;t!==i&&(this.NV=i,i?this.So(new hl(this.MP)):this.So(new Tc(this.MP)))}My(t,i,e){return void 0===i&&(i=!1),void 0===e&&(e=ac.NSt),this.Bkt=!0,this.OTt.Zg(),this.m7.Zg(),this.Sz=!0,this.q8=t,this.uEt=this.uEt&&this.z8(),this.fkt(this.lkt),this.dEt(new F(this.MP)),this.m7=new at,this.w7=$e(this.y7(t,this.HTt,this.w7,this.UTt,this.m7.Yg,i,e),this.m7).catch(this.mmt),this.w7}lEt(){this.m7.Zg()}async y7(t,i,e,s,n,r,h,o){var a;void 0===r&&(r=!1),void 0===h&&(h=ac.NSt),void 0===o&&(o=!1),null==(a=this.jW)||a.Xx();try{var u,c;0,await Promise.all([i,e,s]),ii(n),await Nc(this.WTt.Qy,n);const a=this.rkt.DM(t);this.q8=a;const d=o||(null==(c=this.Ac)||null==(u=c.dash)?void 0:u.forceHardSwitchWhenSeekingBackwards)&&a<=this.MP,l=this.fEt(a),f=this.qTt;if(d||!f||!f.Sx.Cr(a)&&h!==ac.MSt&&f.Mc!==l){if(l){let t=this.ekt;if(this.k7(),f&&await f.Jot(),t&&t.Mc===l&&!d){const i=this.GTt(t.pmt,t.Tpt);this.A3(),this.bTt(i)&&await this.kTt(i),this.YTt=i}else{t&&await t.kn(!0);const i=this.klt(l);f&&JG(f.kmt,i);const e=null==f?void 0:f.Mc,s=null==f?void 0:f.gmt,n=mc(l,i,e,s,this.Ypt);let r=this.zTt(l,n,e,s,!1);n.forEach(t=>t.Rt=!0);let h=this.GTt(n,r);this.Hkt(l)&&!d?(this.A3(),this.bTt(h)&&await this.kTt(h)):(r=this.zTt(l,n,e,s,!0),h=this.GTt(n,r),f&&(this.$kt.mn(Te.pa,this.tEt),await f.kn(),this.$kt.wn(Te.pa,this.tEt),this.qTt=void 0),await this.PTt(),await this.Lp(h)),this.YTt=h,t=await this.NTt(l,i,n,r),this.ekt=t,this.Ykt.BI=t.nt,this.Ikt(t),t.iat(this.qTt)}await t.$ot(Tu.Lht),this.Dkt(t)}}else{0;const t=this.ekt;if(t&&!t.nmt){await t.Jot(),this.A3();const i=this.GTt(f.pmt,f.Tpt);this.bTt(i)&&await this.kTt(i),this.YTt=i}}0;const v=this.$Tt(a,r,!1,n);Wr(v),this.q8=void 0,await this.qTt.$ot(Tu.Lht),ii(n),this.QTt(),await v,ii(n),this.R7(),this.Sz=!1,this.vEt(new Es(this.MP)),this.Nkt()}catch(t){if(D(t))return void 0;0}}Nkt(){if(this.hx||this.kx||void 0===this.BL)return;const t=this.MP;var i,e;this.MP+this.BL-this.Fx.Cd.maximumOffset0){const i=u.DM(t);o!==i&&(u.Cr(o)&&this.uyt.Idt.Km===Eh.wV||(o=i,h=!0))}if(h)h=!1,null==r||r.Zg(),r=new at,r.$g(s),n=$e(this._Et(o,i,e,r.Yg),r),Wr(n);else if(!this.mkt&&!this.Y4)break;const c=Be(a,at.ep([s]),!1);await Promise.race([n,this.ww([d.iy,d.Rw],c.Yg),this.uyt.Idt.ww(Ls.yot,c.Yg)])}catch(t){a.error=t,a.hasError=!0}finally{Cs(a)}}}async _Et(t,i,e,s){for(this.TL.My(t,i,e);this.mkt||this.Y4;)await this.TL.ww([d.Zw,d.Vw],s)}JTt(){void 0===this.skt&&(this.skt=this.ZTt,this.TL.mn(d.$w,this.dEt),this.TL.mn(d.Zw,this.vEt))}tkt(){if(void 0===this.skt)return;const t=this.ZTt;this.skt=void 0,this.TL.wn(d.$w,this.dEt),this.TL.wn(d.Zw,this.vEt),this.ZTt!==t&&this.Nc()}gEt(t){this.Ho=this.Ho.OM(t)}fEt(t){const i=this.uyt.Idt,e=i.smt.filter(t=>t.ct>=.2);if(0===e.length)return;const s=e[0];if(t<=s.Tn)return s;for(const i of e)if(i.An>t)return i;return i.Km!==Eh.wV?e[e.length-1]:void 0}ybt(t){let i=t.Smt;for(;i&&i.ct<.2;)i=i.Smt;return i}wbt(t){let i=t.Tmt;for(;i&&i.ct<.2;)i=i.Tmt;return i}async Ta(t,i,e){const s={stack:[],error:void 0,hasError:!1};try{var n;if(this.lq.IW(t.contentProtection),this.pEt(),this.Ac&&!nk(this.Ac)&&await this.hr(),!t||nk(t))return;const h=Be(s,at.ep([e]),!1);this.rV=at.ep([h.Yg]),this.Ac=t,this.mEt=i,this.Ypt=t.abr,this.Npt=t.ignoreEmbeddedTextTrackTypes;const o=pG(new lG(this.nV,Boolean(this.Ac.useCredentials),this._dt),this.eut);var r;if(this.nSt(!0),this.Fkt=new $z({iR:zd.Dh(this.Ac.src),cSt:null!=(r=null==(n=this.Ac.latencyConfiguration)?void 0:n.targetOffset)?r:this.Ac.liveOffset,_St:this.Ac.timeServer,zk:this.Ac.useCredentials},this.wEt(this.Ypt),this.nV,o,this.Ac.dash),this.uyt=this.Fkt.Br,this.uyt.Idt.wn(d.Ww,this.yEt),this.uyt.Idt.wn(d.qw,this.AEt),this.uyt.Idt.wn(Cz.xbt,this.bEt),this.uyt.Idt.wn(Ls.yot,this.MTt),await this.SEt.Un(this.uyt.Idt),await this.TEt.Un(this.uyt.Idt),pi(this.Npt,nh.EMSG)||(this.wpt=new qG(this.TL),this.Gl.FW(this.wpt.Z),await this.wpt.Un(this.uyt.Idt)),t.latencyConfiguration){const i=t.latencyConfiguration;this.jW=new GG(this,this.TL,i),this.jW.Rt=!0,this.rq.Ea(this.jW)}this.vkt(),h.zg()}catch(t){s.error=t,s.hasError=!0}finally{Cs(s)}}Px(t,i,e,s){return Promise.resolve()}xx(){return Promise.resolve()}async kEt(){const t=this.uyt.Idt.sx;if(this.nSt(t),t)return this.Pkt(),void this.bq.mn(Do.SM,this.EEt);this.Ukt()?this.bq.wn(Do.SM,this.EEt):await this.PEt()}async PEt(){var t,i;throw await Promise.all([null==(t=this.qTt)?void 0:t.Jot(Tu.Jht),null==(i=this.ekt)?void 0:i.Jot(Tu.Jht)].filter(it)),this.Lkt(),this.lEt(),this.FTt.Zg(),new m("The provided MPEG-DASH manifest could not be loaded")}get sx(){return this.sSt}nSt(t){this.sSt!==t&&(this.sSt=t,this.So(t?new gt:new Fr))}vkt(){this.uyt&&(this.xEt=this.IEt(this.xEt,this.rV.Yg).catch(this.mmt))}async IEt(t,i){t&&(await t,ii(i));try{this.mx===q.OL||this.n7?await this.REt(i):this.mx===q.VU&&await this.CEt(i)}catch(t){throw sa(t),this.qq(new Ga(Vo.MANIFEST_LOAD_ERROR,t.message,t)),t}}async REt(t){await this.CEt(t),this.DEt||(this.DEt=!0,this.WTt.$g(this.Un(this.mEt,t)));try{await this.WTt.Qy}catch(t){sa(t),this.qq(new Ga(Vo.MEDIA_DECODE_ERROR,t.message,t))}}async CEt(t){await Nc(this.Fkt.W,t);const i=this.uyt.Idt;if(void 0===this.jW&&i.Km===Eh.wV){const t=i.Zwt,e=(null==t?void 0:t.Mbt)?(null==t?void 0:t.Mbt)/1e3:i.aSt,s={minimumOffset:(null==t?void 0:t.Dbt)?(null==t?void 0:t.Dbt)/1e3:.5*e,maximumOffset:(null==t?void 0:t.Nbt)?(null==t?void 0:t.Nbt)/1e3:1.5*e,targetOffset:e,forceSeekOffset:2.5*e,minimumPlaybackRate:Ot,maximumPlaybackRate:Jt};this.jW=new GG(this,this.TL,s),this.rq.Ea(this.jW)}}Dkt(i){const e=this.qTt;i!==e&&(this.qTt&&this.xkt(this.qTt),this.ekt&&this.Rkt(this.ekt),e&&this.fkt(this.lkt),this.qTt=i,this.ekt=e,this.Akt(this.qTt),this.ekt&&this.Ikt(this.ekt),this.YL.BI=i.ht,this.$L.BI=i.rt,this.Kkt(i),this.$kt.mn(Te.pa,this.tEt),t.BEt(this.$kt),this.$kt.wn(Te.pa,this.tEt),this.$kt.BI=i.nt,this.Ykt.BI=void 0,this.Qkt())}static BEt(t){for(const i of t.II)i.Xk=xh.Nh}be(){this.TL.be()}we(){this.TL.we()}qq(t){this.JW||(Wr(this.hr()),this.JW=P(t),this.ZW=t,this.So(new Pi(t)))}pEt(){this.JW=void 0,this.ZW=void 0}STt(){const t=this.iq;t&&(t.K3&&(t.K3.MY=this.Rz.GY),t.Q3&&(t.Q3.MY=this.Rz.GY))}TTt(){const t=this.iq;t&&(t.K3&&(t.K3.UY=this.Rz.UY),t.Q3&&(t.Q3.UY=this.Rz.UY))}determineStallJumpTarget(){if(this.qTt)return this.qTt.Jpt()&&this.MP>this.qTt.An-NN&&!this.qTt.emt?this.qTt.An:void 0}async hr(){if(this.NEt)return this.NEt;try{this.NEt=this.MEt(),await this.NEt}finally{this.NEt=void 0}}async MEt(){this.ux=1,this.rV.Zg(),this.lEt(),this.Lkt(),this.FTt.Zg(),this.WTt.Zg(),this.Bkt=!1,this.zx(),this.n7=!1,this.uEt=!1,this.YL.BI=void 0,this.$L.BI=void 0,this.$kt.BI=void 0,this.Ykt.BI=void 0,this.xEt&&(await this.xEt.catch(Ct),this.xEt=void 0),await Promise.all([this.HTt,this.w7,this.UTt,this.WTt.Qy.catch(Ct)]),this.qTt&&(await this.qTt.kn(!0),this.qTt=void 0),this.ekt&&(this.Rkt(this.ekt),await this.ekt.kn(!0),this.ekt=void 0),await this.PTt(),this.YTt=void 0,this.jkt=void 0,this.bq.mn(Do.SM,this.EEt),this.bq.hr(),await this.SEt.hr(),await this.TEt.hr(),void 0!==this.wpt&&(this.Gl.WW(this.wpt.Z),await this.wpt.kn(),this.wpt=void 0),this.uyt&&(this.uyt.Idt.mn(d.Ww,this.yEt),this.uyt.Idt.mn(d.qw,this.AEt),this.uyt.Idt.mn(Cz.xbt,this.bEt),await this.Fkt.kn(),this.uyt=void 0),this._kt=!1,this.LEt=NaN,this.OEt=0,this.FEt=0,this.skt=void 0,this.X8=!1,this.Ho=ve.iL(),this.NV=!0,this.q8=void 0,this.UEt=!1,this.Sz=!1,this.DEt=!1,this.WTt=new pa,this.okt=0,this.akt=0,this.ukt=0,this.Ac=void 0,this.mEt=void 0,this.Npt=[],this.Zkt=void 0,this.rq.hr(),this.jW=void 0,this.xTt={iO:0,eO:0,sO:0},await this.pq.hr(),this.TL.Aq(),this.VEt.hr()}async kn(){this.Vo(),this.pEt(),await this.hr(),this.Vo(),this.YL.kn(),this.$L.kn(),this.$kt.kn(),this.Ykt.kn(),this.Gl.kn(),this.bq.kn(),this.kq.zg(),await this.SEt.kn(),await this.TEt.kn(),this.VEt.kn(),this.TL.mn(d.Rw,this.p9),this.TL.mn(_r.Dw,this.D8),this.TL.mn(d.Bw,this.HEt),this.TL.mn(d.$w,this.dEt),this.TL.mn(d.Zw,this.vEt),this.TL.mn(d.Jw,this.Ekt),this.TL.mn(d._y,this.Nc),this.TL.mn([d.uo,d.jw],this.WEt),this.TL.mn(jG,this.Rs),await this.pq.kn(),this.Gl.kn(),this.Rz.mn("NY",this.qEt),this.Rz.mn("FY",this.zEt),this.TL.mn(Mc.ma,this.GEt),this.TL.mn([d.Pw,d.Ew],this.Rs),this.TL.mn(d.yy,this.Pmt),this.TL.mn(d.LICENSE_REQUEST_GENERATED,this.umt),this.TL.Eq=void 0,this.lq.mn("contentProtectionsTracked",this.XEt),this.TL.N9=void 0}Hx(){return this.TL.Ma}Aa(){return this.TL.mq}get KP(){return!1}jx(){return!1}Qx(){}Kx(){}Yx(){}Jx(){this.LTt(!0)}get BL(){var t;const i=null==(t=this.uyt)?void 0:t.Idt;if(i&&i.Km===Eh.wV&&i.Vwt)return i.xdt().getTime()/1e3-i.Vwt.getTime()/1e3-this.MP}tI(t){const i=this.TL.wq(t);return this.VEt.tt(i),i}constructor(t,i,e,s,n,r,h){var o;super(),this.nV=void 0,this.Rz=void 0,this._dt=void 0,this.eut=void 0,this.TL=void 0,this.kq=void 0,this.bq=void 0,this.qTt=void 0,this.ekt=void 0,this.n7=!1,this.LEt=NaN,this.JW=void 0,this.ZW=void 0,this.X8=!1,this.skt=void 0,this.q8=void 0,this.UEt=!1,this.OEt=0,this.FEt=0,this._kt=!1,this.rV=new at,this.WTt=new pa,this.NEt=void 0,this.DEt=!1,this.uyt=void 0,this.Fkt=void 0,this.sSt=!0,this.ckt=!0,this.oEt=void 0,this.Ho=ve.iL(),this.tq=q.lz,this.xEt=void 0,this.NV=!0,this.Ac=void 0,this.mEt=void 0,this.Ypt=void 0,this.Npt=[],this.Sz=!1,this.rq=void 0,this.OTt=new at,this.HTt=Promise.resolve(),this.m7=new at,this.w7=Promise.resolve(),this.Bkt=!1,this.uEt=!1,this.FTt=new at,this.UTt=Promise.resolve(),this.YTt=void 0,this.jkt=void 0,this.YL=void 0,this.$L=void 0,this.Gl=void 0,this.$kt=void 0,this.Ykt=void 0,this.wpt=void 0,this.SEt=void 0,this.TEt=void 0,this.pq=void 0,this.VEt=void 0,this.okt=0,this.akt=0,this.ukt=0,this.oq=new To,this.Zkt=void 0,this.xTt={iO:0,eO:0,sO:0},this.iq=void 0,this.DTt=void 0,this.lq=void 0,this.jW=void 0,this.Pkt=t=>{var i,e,s;let n;"fmt"===(null==t?void 0:t.type)&&(n=t.hpt),n&&(null==(i=n.Jdt)?void 0:i.Km)===Ci.Dk&&(null==(s=this.bt)||null==(e=s.dash)?void 0:e.forceRecreateMediaSourceOnAudioSwitch)?this.LTt(!0):this.LTt()},this.Pmt=t=>{var i;null==(i=this.qTt)||i.Pmt(t)},this.umt=t=>{var i;null==(i=this.qTt)||i.umt(t)},this.Nc=()=>{this.So(new Si(this.MP,this.CP))},this.D8=t=>{this.So(new eG(this.MP,t.Jm,t.Ey))},this.bkt=t=>{this.okt+=t.rO,this.So(t)},this.Skt=t=>{const i=t.segments.filter(t=>t.cct);t.track===Ci.Dk?this.akt=i.length:t.track===Ci.Bk&&(this.ukt=i.length)},this.p9=()=>{const t=this.ct;S(t)||t===this.LEt||(this.LEt=t,this.So(new Rs(this.LEt)))},this.WEt=()=>{this.MTt(),this.hEt()},this.HEt=t=>{this.uEt||!this.UP||this.kx||(this.uEt=!0,this.So(null!=t?t:new At(this.MP)))},this.AEt=t=>{this.Rs(t),this._kt||(this._kt=!0,this.kq.VV())},this.yEt=()=>{this.uyt.Idt.mn(d.Ww,this.yEt),this.So(new Pt)},this.kkt=t=>{var i;if(t.errorObject.code===Vo.CONTENT_PROTECTION_OUTPUT_RESTRICTED&&(null==(i=this.qTt)?void 0:i.pmt.every(t=>!t.olt)))return;this.qq(t.errorObject),this.So(t)},this.Tkt=t=>{this.qq(t.errorObject)},this.mmt=t=>{D(t)||this.qq(new Ga(Vo.MEDIA_DECODE_ERROR,t.message,t))},this.MTt=()=>{if(!this.hx){if(!this.nkt()){const t=this.uyt.Idt.rSt;return void this.My(t,!0)}if(this.hkt()){const t=this.uyt.Idt.rSt;return void this.My(t,!0)}}},this.dEt=t=>{this.UEt=this.kx,this.So(t)},this.vEt=t=>{const i=this.UEt,e=this.kx;this.UEt=e,i&&!e&&this.So(t),this.HEt()},this.Ekt=()=>{const t=this.Bx,i=this.Rx;this.OEt===t&&this.FEt===i||(this.OEt=t,this.FEt=i,this.So(new ts))},this.tEt=t=>{const i=t.Ht;i.Xk===xh.Kn?(this.Gkt(i),this.jkt=i):i===this.jkt&&i.Xk===xh.Nh&&(this.jkt=void 0,this.Qkt())},this.cEt=()=>{this.X8||this.oEt&&(this.oEt.Xy(),this.oEt=void 0)},this.nEt=t=>{this.X8||this.oEt&&(this.oEt.jy(t),this.oEt=void 0)},this.bEt=()=>{this.kEt().catch(this.mmt)},this.EEt=()=>{this.PEt().catch(this.mmt),this.bq.mn(Do.SM,this.EEt)},this.GEt=t=>{this.qq(Ok(t.lt))},this.qEt=()=>{this.STt()},this.zEt=()=>{this.TTt()},this.XEt=t=>{this.ETt(t.xW)},this.nV=t,this.eut=new zG(n),this.TL=r,this.DTt=h,this.Rz=e,this.Rz.wn("NY",this.qEt),this.Rz.wn("FY",this.zEt),this.rq=s,this._dt=Mo({},i.retryConfiguration,{maxRetries:null!=(o=i.retryConfiguration.maxRetries)?o:1/0}),this.YL=new He,this.$L=new He,this.lq=new ya(t),this.lq.wn("contentProtectionsTracked",this.XEt),this.TL.wn(d.Rw,this.p9),this.TL.wn(_r.Dw,this.D8),this.TL.wn(d.Bw,this.HEt),this.TL.wn(d.$w,this.dEt),this.TL.wn(d.Zw,this.vEt),this.TL.wn(d.Jw,this.Ekt),this.TL.wn(d._y,this.Nc),this.TL.wn([d.uo,d.jw],this.WEt),this.TL.wn(jG,this.Rs),this.TL.wn(Mc.ma,this.GEt),this.TL.Eq=this.lq,this.TL.N9=this,this.TL.wn([d.Pw,d.Ew],this.Rs),this.TL.wn(d.yy,this.Pmt),this.TL.wn(d.LICENSE_REQUEST_GENERATED,this.umt),this.kq=new dx(this,this.TL),this.bq=new bs(this.kq,!0),this.bq.wn(Do.SM,this.MTt),this.bq.wn(K,this.Rs),this.$kt=new sl,this.$kt.wn(Te.pa,this.tEt),this.Ykt=new sl,this.SEt=new AG(this.TL),this.TEt=new MG(this.TL),this.pq=new Kh(this.TL,this.nV),this.VEt=new cc,this.Gl=new Yu([this.$kt,this.SEt.Z,this.TEt.Z,this.pq.Z,this.VEt])}};function KG(t,i){const e=t.filter(t=>"urn:mpeg:dash:role:2011"===t.y8).map(t=>t.zE).filter(it);return i||pi(e,"main")?pi(e,"caption")?"captions":pi(e,"subtitle")?"subtitles":pi(e,"dub")?"translation":"main":pi(e,"sign")?"sign":pi(e,"description")?"descriptions":pi(e,"commentary")?"commentary":"alternative"}function YG(t,i){var e;const s=Jr([...t.iwt,...t.ewt],t=>"urn:mpeg:dash:adaptation-set-switching:2016"===t.y8);var n;const r=null!=(n=null==s||null==(e=s.zE)?void 0:e.split(","))?n:[],h=[];for(const t of r){const e=Number(t),s=Jr(i,t=>t.o===e);s&&h.push(s)}return h}function JG(t,i){for(const e of t){const t=Jr(i,t=>t.Km===e.Km);if(!t)continue;const s=e.Z,n=t.Z;for(const t of s){const i=t.YI;if(!i)continue;const e=t.rat.map(t=>t.o),s=Jr(n,t=>{const i=t.rat.map(t=>t.o);return df(e,i)});if(!s)continue;const r=i.map(t=>t.o);s.YI=s.KI.II.filter(t=>pi(r,t.o))}}}r();var bt=class{async HSt(t){return(await this.QEt.jEt(t.map(ia))).shift()}Uct(t,i){const e=fG(t,i);return this.KEt.Hy(e)}async iut(t,i){var e;const s=fG(t,i);return null==(e=await this.YEt.Wy(s))?void 0:e.data}WJ(t){return this.JEt.Wy(t)}constructor(t,i,e,s){this.QEt=void 0,this.KEt=void 0,this.YEt=void 0,this.JEt=void 0,this.QEt=t,this.KEt=i,this.YEt=e,this.JEt=s}};r(),r(),r();var wt=class{ZEt(t){return Promise.resolve(!1)}zSt(t){return Promise.reject(ZG)}$Et(t){return Promise.reject(ZG)}Hy(t){return Promise.resolve(!1)}Wy(t){return Promise.resolve(void 0)}tPt(t,i){return Promise.resolve(void 0)}jEt(t){return Promise.resolve([])}iPt(){return Promise.resolve([])}ePt(t){return Promise.resolve([])}sPt(t,i){return Promise.resolve([])}_S(t){return Promise.reject(ZG)}nPt(t){return Promise.reject(ZG)}rPt(){return Promise.reject(ZG)}},ZG="Storage disabled",$G="Storage disabled";r(),r(),r();var tX=class{get hPt(){return this.Jg.Qy}async ZEt(t){return(this.oPt||await this.hPt).ZEt(t)}async zSt(t,i){return(this.oPt||await this.hPt).zSt(t,i)}async $Et(t,i){return(this.oPt||await this.hPt).$Et(t,i)}async Hy(t){return(this.oPt||await this.hPt).Hy(t)}async Wy(t){return(this.oPt||await this.hPt).Wy(t)}async tPt(t,i){return(this.oPt||await this.hPt).tPt(t,i)}async jEt(t){return(this.oPt||await this.hPt).jEt(t)}async iPt(){return(this.oPt||await this.hPt).iPt()}async ePt(t){return(this.oPt||await this.hPt).ePt(t)}async sPt(t,i){return(this.oPt||await this.hPt).sPt(t,i)}async _S(t){return(this.oPt||await this.hPt)._S(t)}async nPt(t){return(this.oPt||await this.hPt).nPt(t)}async rPt(){return(this.oPt||await this.hPt).rPt()}constructor(t){this.Jg=new pa,this.oPt=void 0,this.Jg.$g(t),this.Jg.Qy.then(t=>{this.oPt=t})}},iX=class{get aPt(){return this.Jg.Qy}async uPt(t){const i=this.cPt||await this.aPt;return await i.uPt(t)}constructor(t){this.Jg=new pa,this.cPt=void 0,this.ect=void 0,this.dPt=void 0,this.lPt=void 0,this.fPt=void 0,this.vPt=void 0,this.Jg.$g(t);const i=this.Jg.Qy;i.then(t=>{this.cPt=t}),this.ect=new tX(i.then(t=>t.ect)),this.dPt=new tX(i.then(t=>t.dPt)),this.lPt=new tX(i.then(t=>t.lPt)),this.fPt=new tX(i.then(t=>t.fPt)),this.vPt=new tX(i.then(t=>t.vPt))}};function Aa(t){return new m("This storage cannot handle persistency type "+t)}r(),r(),r();var cu=function(t){return t._Pt="readonly",t.gPt="readwrite",t}({}),vn=class{ZEt(t){return Promise.resolve("temporary"===t)}zSt(t,i){return void 0===i&&(i="temporary"),"temporary"!==i?Promise.reject(Aa(i)):(this.pPt(t.key),this.EA.push(t),Promise.resolve())}$Et(t,i){if(void 0===i&&(i="temporary"),"temporary"!==i)return Promise.reject(Aa(i));for(const i of t)this.pPt(i.key);for(const i of t)this.EA.push(i);return Promise.resolve()}Hy(t){return Promise.resolve(Boolean(this.mPt(t)))}Wy(t){return Promise.resolve(this.mPt(t))}tPt(t,i){return Promise.resolve(this.wPt(t,i))}jEt(t){const i=t?t.map(t=>this.mPt(t)):this.EA;return Promise.resolve(i.filter(it))}iPt(){return Promise.resolve([...this.EA])}ePt(t){return this.sPt(t,"key")}sPt(t,i){const e=this.EA.filter(e=>e[i]===t);return Promise.resolve(e)}_S(t){return this.pPt(t),Promise.resolve()}nPt(t){for(const i of t)this.pPt(i);return Promise.resolve()}rPt(){return Yo(this.EA),Promise.resolve()}mPt(t){return this.wPt(t,"key")}wPt(t,i){for(const e of this.EA)if(e[i]===t)return e}pPt(t){const i=this.mPt(t);i&&oi(this.EA,i)}constructor(){this.EA=[]}},eX=class t{static Ret(){return Promise.resolve(new t)}uPt(t){return t(this)}constructor(){this.dPt=void 0,this.ect=void 0,this.lPt=void 0,this.fPt=void 0,this.vPt=void 0,this.dPt=new vn,this.ect=new vn,this.lPt=new vn,this.fPt=new vn,this.vPt=new vn}};r(),r();var sX=class{async ZEt(t){for(const i of this.yPt)if(await i.ZEt(t))return!0;return!1}async zSt(t,i){void 0===i&&(i="persistent");for(const e of this.yPt)if(await e.ZEt(i))return e.zSt(t);throw Aa(i)}async $Et(t,i){void 0===i&&(i="persistent");for(const e of this.yPt)if(await e.ZEt(i))return e.$Et(t);throw Aa(i)}async Hy(t){for(const i of this.yPt)if(await i.Hy(t))return!0;return!1}async Wy(t){for(const i of this.yPt){const e=await i.Wy(t);if(e)return e}}async tPt(t,i){for(const e of this.yPt){const s=await e.tPt(t,i);if(s)return s}}async jEt(t){const i=[];for(const e of this.yPt)i.push(...await e.jEt(t));return i}async iPt(){const t=[];for(const i of this.yPt)t.push(...await i.iPt());return t}async ePt(t){const i=[];for(const e of this.yPt)i.push(...await e.ePt(t));return i}async sPt(t,i){const e=[];for(const s of this.yPt)e.push(...await s.sPt(t,i));return e}async _S(t){for(const i of this.yPt)await i._S(t)}async nPt(t){for(const i of this.yPt)await i.nPt(t)}async rPt(){for(const t of this.yPt)await t.rPt()}constructor(t){this.yPt=void 0,this.yPt=t}};function nX(t){return async()=>{const i=await Promise.all(t.map(t=>t()));return rX.Ret(i)}}var rX=class t{static Ret(i){return Promise.resolve(new t(i))}get fPt(){return this.APt}get vPt(){return this.bPt}get lPt(){return this.SPt}get dPt(){return this.TPt}get ect(){return this.kPt}uPt(i){if(0===this.EPt.length)return i(this);const e=[];let s=0;const n=r=>(e.push(r),s++,st.fPt)),this.bPt=new sX(t.map(t=>t.vPt)),this.SPt=new sX(t.map(t=>t.lPt)),this.TPt=new sX(t.map(t=>t.dPt)),this.kPt=new sX(t.map(t=>t.ect))}},Rc=class t{static Ba(i){t.RW.Ba(i)}static get Ng(){var i,e;return null!=(e=(i=t).lAt)?e:i.lAt=t.RW.Ret()}};Rc.RW=new class{Ret(){return new iX(this.PPt())}async PPt(){this.xPt&&(await Promise.resolve(),this.xPt=!1);for(const t of this.IPt)try{return await nX([eX.Ret,t])()}catch(t){}return await nX([eX.Ret,this.RPt])()}Ba(t){if(!this.xPt)throw new m("Registration overdue");this.IPt.push(t)}constructor(t){this.RPt=void 0,this.IPt=[],this.xPt=!0,this.RPt=t}}(class t{static Ret(){return Promise.resolve(new t)}uPt(t){return Promise.reject($G)}constructor(){this.dPt=void 0,this.ect=void 0,this.lPt=void 0,this.fPt=void 0,this.vPt=void 0,this.dPt=new wt,this.ect=new wt,this.lPt=new wt,this.fPt=new wt,this.vPt=new wt}}.Ret),Rc.lAt=void 0;var hX=class extends QG{Wx(){if(PU(this.TL))return this.TL.Wx()}async kn(){var t;await super.kn(),null==(t=this.CPt)||t.kn()}Hkt(t){var i,e;return((null!=(e=null==(i=this.Ac)?void 0:i.seamlessSwitchStrategy)?e:Oh.OL)!==Oh.OL||!Qt.gg)&&super.Hkt(t)}zkt(){return!(Qt.w_&&Qt.A_<3)&&super.zkt()}wEt(t){return xU(t)}constructor(t,i,e,s,n,r){super(t,i,e,s,new bt(Rc.Ng.lPt,Rc.Ng.dPt,Rc.Ng.ect,Rc.Ng.vPt),n,new IU(r)),this.vrt=void 0,this.CPt=void 0,this.vrt=r,Qt.X_&&(this.CPt=new HU(this))}},oX=class extends hX{async kn(){await super.kn(),await this.xq.Pq(this.TL)}constructor(t,i,e,s,n,r,h){const o=new Ss(n);super(t,i,e,s,o.Gq(r),h),this.xq=void 0,this.xq=o}};r(),r(),r(),r(),r();var aX=class extends NU{get DPt(){return this.pE.DPt}RP(){return super.RP().Ny(this.DPt)}krt(){return super.krt().Ny(this.DPt)}H2(t,i,e){const s=this.DPt;return super.H2(t,{xet:i.xet-s,ct:i.ct,bU:i.bU-s},e)}r3(t,i){const e=this.DPt;return super.r3(_.max(0,t-e),_.max(0,i-e))}_S(t,i,e){const s=this.DPt;return super._S(_.max(0,t-s),_.max(0,i-s),e)}F3(t,i){const e=this.DPt;super.F3(_.max(0,t-e),_.max(0,i-e))}U3(t,i){const e=this.DPt;super.U3(_.max(0,t-e),_.max(0,i-e))}constructor(t,i){super(i),this.pE=void 0,this.pE=t}},uX=class extends Wo{get DPt(){return this.pE.DPt}Nd(){return super.Nd()+this.DPt}C4(t){super.C4(t-this.DPt)}Tx(){return super.Tx().Ny(this.DPt)}M4(t,i,e,s){const n=this.DPt;super.M4(t-n,i-n,e,s)}mrt(t){return new aX(this,t)}constructor(t,i){super(i),this.pE=void 0,this.grt(i),this.pE=t}};r(),r();var cX=class{get nt(){return this.Gl}tI(t,i,e,s,n,r,h,o){const a=new gM(t,i,e,s,n,r,h,void 0,o);return this.Gl.tt(a),a}wq(t){const i=new RL(t.Lt,t.Th,t.bs);return this.Gl.tt(i),i}iV(t){this.Gl.it(t)}hr(){this.Gl.hr()}kn(){for(const t of this.Gl.II.slice())t.kn();this.Gl.kn()}constructor(){this.Gl=new cc}},dX=class extends cX{tI(t,i,e,s,n,r,h,o){const a=super.tI(t,i,e,s,n,r,h,o);return this.N7.tt(a),a}iV(t){super.iV(t),this.N7.it(t),t.kn()}wq(t){const i=super.wq(t);return this.N7.tt(i),i}hr(){super.hr(),this.N7.hr()}kn(){super.kn(),this.N7.kn()}constructor(t,i){super(),this.N7=void 0,this.N7=new lL(t,i)}},lX=class extends $u{get DPt(){return this.BPt}set DPt(t){this.BPt=t}RP(){return super.RP().Ny(this.BPt)}DP(){return _X(super.DP(),this.BPt)}LP(){return super.LP()+this.BPt}Nd(){return super.Nd()+this.BPt}gx(){return super.gx().Ny(this.BPt)}Tx(){return super.Tx().Ny(this.BPt)}My(t,i,e){const s=_.max(0,t-this.BPt);super.My(s,i,e)}KW(t){super.KW(_X(t,-this.BPt))}Ix(){return this.Gl}tI(t,i,e,s,n,r,h,o){return this.JU.tI(t,i,e,s,n,r,h,o)}wq(t){return this.JU.wq(t)}iV(t){this.JU.iV(t)}Aq(){this.JU.hr(),super.Aq()}vq(){return!1}gq(t,i,e,s,n){throw new m("Not supported")}zg(){return this.net.kn(),this.eet.kn(),this.JU.kn(),this.Gl.kn(),super.zg()}Xrt(t){return new uX(this,t)}Grt(t){return new Jo(t)}Zx(t){let i;switch(t.type){case d.uo:i=new Tc(t.currentTime+this.BPt);break;case d.jw:i=new hl(t.currentTime+this.BPt);break;case Do.TM:i=new ce(t.currentTime+this.BPt);break;case d._y:i=new Si(t.currentTime+this.BPt,_X(t.currentProgramDateTime,this.BPt));break;case d.Qw:i=new H(t.currentTime+this.BPt);break;case d.$w:i=new F(t.currentTime+this.BPt);break;case d.Zw:i=new Es(t.currentTime+this.BPt);break;case d.Fw:i=new qN(t.currentTime+this.BPt);break;case d.Vw:i=new xL(t.currentTime+this.BPt);break;case d.Bw:i=new At(t.currentTime+this.BPt);break;case d.Kw:i=new aa(t.currentTime+this.BPt,t.playbackRate);break;case d.gy:i=new Ze(t.currentTime+this.BPt,t.volume);break;case d.Rw:i=new Rs(t.duration+this.BPt);break;case Do.wI:i=new ou(t.currentTime+this.BPt,t.readyState);break;default:i=t}super.Zx(i)}we(){super.we(),this.eet.we()}be(){super.be(),this.eet.be()}constructor(t){super(t),this.BPt=0,this.Gl=void 0,this.JU=void 0,this.eet=void 0,this.net=void 0,this.JU=new dX(this,new ec),this.Gl=new Yu([this.JU.nt,super.Ix()]),this.eet=new XL,this.eet.B9(this.$W.parentElement),this.net=new vF(this.eet.xe,this.Wu,this.Gl,this.Ql,this.Ma,this.mq)}},fX=class extends(CU(lX)){constructor(t){super(t)}},vX=class extends(Sl(lX)){constructor(t){super(t)}};function _X(t,i){return t?new Date(t.getTime()+1e3*i):void 0}var gX=class extends RU{Gq(t){return t===Ci.Bk?new vX(super.Gq(t)):t===Ci.Dk?new fX(super.Gq(t)):void 0}async Pq(t){const i=t;await i.zg(),await super.Pq(i.Nrt)}},pX=class extends hX{async Lp(t){await super.Lp(t),void 0===this.NPt&&(this.NPt=this.MPt(),this.TL.DPt=this.NPt)}MPt(){if(this.ct===1/0){const t=this.rkt;if(t.V>0)return _.max(0,t.Tn(0)-300)}return 0}y7(t,i,e,s,n,r,h,o){return void 0===r&&(r=!1),void 0===h&&(h=ac.NSt),void 0===o&&(o=!1),o||(o=this.ct===1/0&&Qt.w_&&Qt.A_<3&&t<=this.MP),super.y7(t,i,e,s,n,r,h,o)}async hr(){await super.hr(),this.NPt=void 0,this.TL.DPt=0}async kn(){await super.kn(),await this.TL.zg(),await this.xq.Pq(this.TL)}static LS(t){var i;return(!t||"google-dai"!==(null==t||null==(i=t.ssai)?void 0:i.integration))&&(Qt.w_&&Qt.A_<4)}constructor(t,i,e,s,n,r,h){const o=new gX(new Ss(n));super(t,i,e,s,o.Gq(r),h),this.xq=void 0,this.NPt=void 0,this.xq=o,this.NPt=void 0}};r(),r(),r(),r(),r();var mX=class extends OU{get Nrt(){return this.TL}get Rx(){return this.TL.Rx}get Bx(){return this.TL.Bx}constructor(t){super(t)}};r(),r(),r();var wX=class extends NU{brt(){return this.LPt?this.jY:super.brt()}Srt(t){this.LPt?this.jY=t:super.Srt(t)}RP(){return this.LPt?this.OPt:super.RP()}CS(){return this.LPt?this.YS:super.CS()}krt(){return this.LPt?this.FPt:super.krt()}Ert(){return this.LPt?this.zY:super.Ert()}Prt(t){this.LPt?this.zY=t:super.Prt(t)}H2(t,i,e){return this.W2(e=>this.UPt(t,i,e),e)}UPt(t,i,e){return super.H2(t,i,e)}V3(){return this.W2(()=>this.VPt())}VPt(){return super.V3()}z2(t,i,e){return this.W2(e=>this.HPt(t,i,e),e)}HPt(t,i,e){return super.z2(t,i,e)}F3(t,i){this.LPt?(this.FPt=this.FPt.OM(new ve([t,i])),this.WPt.push({Km:"Yut",EO:t,PO:i})):this.qPt(t,i)}qPt(t,i){super.F3(t,i)}r3(t,i){return this.W2(()=>this.zPt(t,i))}zPt(t,i){return super.r3(t,i)}U3(t,i){this.LPt?(this.FPt=this.FPt.UM(new ve([t,i])),this.WPt.push({Km:"_S",EO:t,PO:i})):this.GPt(t,i)}GPt(t,i){super.U3(t,i)}_S(t,i,e){return this.W2(e=>this.XPt(t,i,e),e)}XPt(t,i,e){return super._S(t,i,e)}EZ(t){return this.W2(()=>this.jPt(t))}jPt(t){return super.EZ(t)}async W2(t,i){for(this.v3();this.LPt;)await Nc(this.LPt.Qy,i),this.v3();ii(i);try{this.b3=t(i),await this.b3}finally{this.b3=void 0}}v3(){if(this.b3)throw new m("Internal error")}async QPt(){if(this.LPt)throw new g("Already locked");this.LPt=new pa,this.KPt(),this.b3&&(await this.b3.catch(Ct),this.KPt())}YPt(){const t=this.LPt;void 0!==t&&(t.Xy(),this.LPt=void 0,this.JPt())}KPt(){this.YS=super.CS(),this.jY=super.brt(),this.zY=super.Ert(),this.OPt=super.RP(),this.FPt=super.krt(),this.ZPt=!1}JPt(){this.v3(),super.Srt(this.jY),super.Prt(this.zY);const t=this.WPt.slice();Yo(this.WPt);for(const i of t)"Yut"===i.Km?this.qPt(i.EO,i.PO):this.GPt(i.EO,i.PO);this.OPt.GM(super.RP())||this.So(new wp(Zs.lZ))}zg(){var t;null==(t=this.LPt)||t.Zg(),this.LPt=void 0,super.zg()}constructor(t){super(t),this.b3=void 0,this.LPt=void 0,this.jY=0,this.OPt=ve.iL(),this.YS=void 0,this.FPt=ve.iL(),this.WPt=[],this.ZPt=!1,this.zY=0,this.YS=t.Cd}},yX=class extends wX{RP(){var t,i;return super.RP().OM(null!=(i=null==(t=this.$Pt)?void 0:t.IP)?i:ve.iL())}krt(){var t,i;return super.krt().OM(null!=(i=null==(t=this.$Pt)?void 0:t.M3)?i:ve.iL())}Srt(t){super.Srt(t),this.$Pt&&(this.$Pt.UY=t)}Prt(t){super.Prt(t),this.$Pt&&(this.$Pt.MY=t)}qPt(t,i){super.qPt(t,i),this.$Pt&&this.$Pt.F3(t,i)}GPt(t,i){super.GPt(t,i),this.$Pt&&this.$Pt.U3(t,i)}async XPt(t,i,e){ii(e);const s=[];s.push(super.XPt(t,i,e)),this.$Pt&&s.push(this.$Pt._S(t,i,e)),await Promise.all(s)}TZ(t){return!!super.TZ(t)||this.pE.txt(t)}jPt(t){return super.TZ(t)?super.jPt(t):this.pE.ixt(t)}sxt(t){var i,e;null==(i=this.$Pt)||i.mn(bo,this.xrt),this.$Pt=t,null==(e=this.$Pt)||e.wn(bo,this.xrt)}constructor(t,i){super(i),this.pE=void 0,this.$Pt=void 0,this.pE=t}},AX=class extends Wo{TZ(t){return!!BL(this,t)&&(!!super.TZ(t)||(!(!this.nxt||!this.nxt.TZ(t))||this.pE.rxt(t)))}async EZ(t){return super.TZ(t)?await super.EZ(t):this.nxt&&this.nxt.TZ(t)?(this.hxt(),await this.EZ(t)):(await this.pE.oxt(t),await this.EZ(t))}txt(t){return this.TZ(this.axt(t))}ixt(t){return this.EZ(this.axt(t))}axt(t){const i=this.Cd,e=i.L4.map(i=>I(t.qT)&&I(i.qT)||tt(t.qT)&&tt(i.qT)?t:i);return Mo({},i,{L4:e})}M4(t,i,e,s){super.M4(t,i,e,s),this.nxt&&this.nxt.M4(t,i,e,s)}uxt(){return!this.cxt&&this.dxt}Nd(){return void 0!==this.lxt?this.lxt:this.uxt()?this.WA:super.Nd()}C4(t){this.WA=t,this.lxt=void 0,this.uxt()||super.C4(t)}_rt(){return!this.uxt()&&super._rt()}C3(){this.lxt=_.max(bX(this.iq.Q3),bX(this.iq.K3)),this.uxt()||super.C3()}A3(){this.lxt=void 0,this.uxt()||super.A3()}mrt(t){return new yX(this,t)}fxt(){this.cxt=!this.cxt}hxt(){const t=this.iq,i=this.nxt;i&&(this.cxt=!this.cxt,this.grt(i),this.vxt(t),this.uxt()&&this._xt())}vxt(t){var i,e;this.nxt=t,null==(i=this.P4)||i.sxt(null==t?void 0:t.Q3),null==(e=this.x4)||e.sxt(null==t?void 0:t.K3)}gxt(t){const i=this.iq,e=this.nxt;if(!e)return;const s=this.cxt,n=s?i:e,r=(s?e:i).IP.JM(t);if(!r)return;const h=jU(n.IP,this.krt()).JM(r.An(0),yt);return!h||r.An(0)+yt>=h.An(0)?void 0:_.max(r.An(0),h.Tn(0))}pxt(t,i){if(this.dxt)return Promise.resolve();const e=this.cxt?this.nxt:this.iq;return e?(this.dxt=!0,this.mxt(i=>{if(ii(i),this.dxt)return async function(t,i,e){ii(e);const s=[];t.Q3&&s.push(DN(t.Q3,i,e));t.K3&&s.push(DN(t.K3,i,e));await Promise.all(s),t.C3()}(e,t,i)},i)):Promise.resolve()}_xt(){if(!this.dxt)return;const t=this.cxt?this.nxt:this.iq;if(!t)return;var i;this.dxt=!1;const e=null!=(i=this.lxt)?i:this.WA;t.ct0?i.An(i.V-1):0}function SX(t){return t.Cd.Km===Zr.wV}r();var TX=class extends mX{get yxt(){return this.Axt}RP(){return super.RP().OM(this.Axt.IP)}Nd(){if(!this.bxt){const t=this.iq;if(t&&SX(t))return t.ct}return super.Nd()}Lrt(){return!!super.Lrt()&&!(!this.bxt&&!this.WZ())}Ort(){return!!super.Ort()&&!(!this.bxt&&super.Lrt()&&!this.WZ())}WZ(){const t=this.iq;return!(!t||!SX(t))&&t.WZ}gx(){return this.Ho.OM(this.TL._x)}Tx(){return super.Tx().OM(this.Axt.Sx)}bx(){return super.bx()}Mrt(){var t;return null!=(t=super.Mrt())?t:this.Axt.nq}Gx(){return this.kz=!1,super.Gx()}zx(){this.kz=!0,super.zx()}x9(){this.bxt=!0,super.x9(),this.Axt.x9()}I9(){this.bxt=!1,super.I9(),this.Axt.x9()}LP(){var t;return null!=(t=this.q8)?t:super.LP()}Ex(){return void 0!==this.q8||super.Ex()}My(t,i,e){void 0===i&&(i=!1),void 0===e&&(e=!1),this.Sxt.Zg(),this.m7.Zg(),this.m7=new at,this.Txt=$e(this.y7(t,i,e,this.Txt,this.m7.Yg),this.m7).catch(Ct)}async y7(t,i,e,s,n){this.q8=t,this.A7=t,this.So(new F(t)),s&&await s.catch(Ct),ii(n),this.iq&&SX(this.iq)&&this.iq._xt(),this.q8=void 0,super.My(t,i,e),this.Axt.My(t,i,e),this.kxt()}KW(t){const i=this.nq;if(!i||S(i.getTime()))return;const e=(t.getTime()-i.getTime())/1e3;this.My(e)}D9(){super.D9(),this.Axt.D9()}get Rx(){return this.Ext.Rx}get Bx(){return this.Ext.Bx}we(){this.yz&&(this.yz=!1,this.Ext.we())}be(){this.yz||(this.yz=!0,this.Ext.be())}async Pxt(){var t;this.q8=void 0,this.A7=NaN,this.Ho=ve.iL(),null==(t=this.xxt)||t.Zg(),this.Sxt.Zg(),this.m7.Zg(),this.Txt&&(await this.Txt.catch(Ct),this.Txt=void 0)}Wrt(t){super.Wrt(t),this.Axt.Eq=t}qrt(t){super.qrt(t),this.Axt.N9=t}Ix(){return this.Gl}tI(t,i,e,s,n,r,h,o){return this.JU.tI(t,i,e,s,n,r,h,o)}wq(t){return this.JU.wq(t)}gq(t,i,e,s,n){throw new m("Not implemented yet")}vq(){return!1}iV(t){this.JU.iV(t)}Aq(){this.JU.hr(),super.Aq()}async Un(t){const i=await super.Un(t);return SX(i)&&this.kxt(),i}async hr(){await this.Pxt(),await super.hr(),await this.Axt.hr()}async C8(){await this.Pxt(),await super.C8(),await this.Axt.C8()}async zg(){await this.Pxt(),this.JU.kn(),this.Gl.kn(),await super.zg()}Xrt(t){return new AX(this,t)}Grt(t){return new Jo(t)}kxt(){this.Sxt.Zg(),this.Sxt=new at,this.Txt=$e(this.Ixt(this.Txt,this.Sxt.Yg),this.Sxt).catch(Ct)}async Ixt(t,i){if(t&&await t.catch(Ct),this.iq&&SX(this.iq))for(;;){let t;for(ii(i),this.Rxt()&&this.fxt(),this.iq._xt(),ii(i);;){const e={stack:[],error:void 0,hasError:!1};try{if(ii(i),this.Rxt())break;if(t=this.iq.gxt(this.LP()),void 0!==t){0,this.Cxt(),await this.iq.pxt(t,i),ii(i),this.Axt.My(t);break}const s=Be(e,at.ep([i]),!1);await Promise.race([this.ww(d._y,s.Yg),this.Dxt(s.Yg)])}catch(t){e.error=t,e.hasError=!0}finally{Cs(e)}}for(ii(i);!this.Rxt();)await this.TL.ww([d._y,d.Bw,Do.wI],i)}}Rxt(){const t=this.iq;if(void 0===t||!SX(t))return!1;const i=this.LP(),e=this.TL.IP;if(!this.TL.UP&&e.Cr(i))return!1;return!!jU(this.Axt.IP,t.krt()).qM(i,i+yt)}fxt(){if(this.Bxt)return;this.Bxt=!0,this.Ho=this.gx();const t=XN(this),i=this.Ex(),e=this.bx(),s=this.TL,n=this.Axt,r=this.iq;r._xt(),r.fxt(),jN(n,t),this.Qrt(n),this.Axt=s,s.zx(),s.$P=!0,this.Bxt=!1;const h=this.Ex();i!==h&&(h?this.So(new F(this.MP)):this.So(new Es(this.MP)));const o=this.bx();e!==o&&this.So(new ou(this.MP,o)),h||this.Cxt()}Cxt(){const t=this.TL,i=this.Ext;if(i===t)return;const e=this.Bx,s=this.Rx;this.Ext=t,this.yz&&(i.we(),t.be());const n=this.Bx,r=this.Rx;n>0&&r>0&&(e!==n||s!==r)&&this.So(new ts)}rxt(t){return void 0!==this.Axt.QZ([t])}async oxt(t){this.Cxt();const i=this.iq,e=this.Axt;await e.hr();const s=await e.Un(t);i.wxt(s)}Dxt(t){return this.xxt=new pa,Nc(this.xxt.Qy,t)}P3(){var t;null==(t=this.xxt)||t.Xy()}Zx(t){t.type===d.$w&&this.A7===t.currentTime||(t.type===d.Zw&&(this.A7=NaN,this.Cxt()),t.type!==Do.wI&&t.type!==d.jw&&t.type!==d.Bw||this.Bxt||!this.Rxt()?(t.type!==d.Bw||this.UP)&&super.Zx(t):this.kxt())}constructor(t,i,e){super(t),this.Axt=void 0,this.Gl=void 0,this.JU=void 0,this.bxt=!1,this.q8=void 0,this.A7=NaN,this.Ho=ve.iL(),this.kz=!0,this.Bxt=!1,this.yz=!0,this.Ext=void 0,this.xxt=void 0,this.Txt=void 0,this.Sxt=new at,this.m7=new at,this.Axt=i,this.Ext=t,this.TL.be(),this.Axt.we(),this.JU=new dX(this,e),this.Gl=new Yu([this.JU.nt,super.Ix()])}},kX=class extends TX{get Nrt(){return this.TL}get yxt(){return this.Axt}we(){super.we(),this.eet.we()}be(){super.be(),this.eet.be()}get $W(){return this.TL.$W}get n5(){return this.TL.n5}get Vx(){return this.TL.Vx}set Vx(t){this.TL.Vx=t}B9(t){this.TL.B9(t),this.Axt.B9(t)}Yx(){this.TL.Yx(),this.Axt.Yx()}Wx(){return this.TL.Wx()}Aa(){return this.KL}Qrt(t){const i=this.Hx(),e=this.Wx();super.Qrt(t),this.KL.BI=t.mq,this.Hx()!==i&&this.So(new lt),this.Wx()!==e&&this.So(new Sk)}zg(){return this.KL.kn(),this.net.kn(),this.eet.kn(),super.zg()}constructor(t,i){super(t,i,new ec),this.eet=void 0,this.net=void 0,this.KL=void 0,this.KL=new io(t.mq),this.eet=new XL,this.eet.B9(t.$W.parentElement),this.net=new vF(this.eet.xe,this.Wu,this.nt,this.Ql,this.Ma,this.mq)}},EX=class extends RU{Gq(t){if(t===Ci.Bk){const i=super.Gq(t),e=super.Gq(t);return new kX(i,e)}return super.Gq(t)}async Pq(t){t instanceof kX?(await t.zg(),await super.Pq(t.Nrt),await super.Pq(t.yxt)):await super.Pq(t)}},PX=class extends hX{async kn(){await super.kn(),await this.xq.Pq(this.TL)}static LS(t){var i;return!Qt.Ks&&!Qt.og&&!(t&&"google-dai"===(null==(i=t.ssai)?void 0:i.integration))}constructor(t,i,e,s,n,r,h){const o=new Ss(new EX(n));super(t,i,e,s,o.Gq(r),h),this.xq=void 0,this.xq=o}};r(),r(),r();var xX=class extends Wo{mrt(t){return new wX(t)}CS(){return this.Nxt?this.YS:super.CS()}RP(){return this.Nxt?this.OPt:super.RP()}Nd(){return this.Nxt?this.WA:super.Nd()}C4(t){this.Nxt?(this.WA=t,this.Mxt=!0):super.C4(t)}Tx(){return this.Nxt?this.Lxt?this.Lxt.z3():this.N4:super.Tx()}M4(t,i,e,s){this.Nxt?this.Lxt=new RN(t,i,e,s):super.M4(t,i,e,s)}_rt(){return this.Nxt?this.ket&&!1!==this.ZPt:super._rt()}C3(){this.Nxt?this.ZPt=!0:super.C3()}A3(){this.Nxt?this.ZPt=!1:super.A3()}TZ(t){return!this.Nxt&&super.TZ(t)}EZ(t){return this.Nxt?Promise.reject(new g("Not supported")):super.EZ(t)}async QPt(){if(this.Nxt)throw new g("Already locked");this.Nxt=!0,this.KPt();const t=[];this.P4&&t.push(this.P4.QPt()),this.x4&&t.push(this.x4.QPt()),await Promise.all(t)}YPt(){this.Nxt=!1,this.P4&&this.P4.YPt(),this.x4&&this.x4.YPt(),this.JPt()}KPt(){this.YS=super.CS(),this.OPt=super.RP(),this.WA=super.Nd(),this.N4=super.Tx(),this.Mxt=!1,this.ZPt=void 0,this.Lxt=void 0}JPt(){if(this.Mxt&&(super.C4(this.WA),this.Mxt=!1),void 0!==this.Lxt){const t=this.Lxt;super.M4(t.Tn,t.An,t.G3,t.X3),this.Lxt=void 0}void 0!==this.ZPt&&(this.ZPt?super.C3():super.A3(),this.ZPt=void 0)}constructor(t){super(t),this.Nxt=!1,this.OPt=ve.iL(),this.YS=void 0,this.WA=0,this.Mxt=!1,this.ket=!1,this.ZPt=void 0,this.N4=ve.iL(),this.Lxt=void 0,this.grt(t),this.YS=t.Cd}},IX=class extends $u{Gx(){return void 0!==this.iq&&SX(this.iq)&&this.UP&&this.My(0),super.Gx()}My(t,i,e){void 0!==this.iq&&SX(this.iq)&&this.UP&&tt.active))?void 0:i.id})}function UX(t){var i;return Mo({},t,{timeBounds:Mo({},t.timeBounds,{endTime:void 0!==t.timeBounds.duration?t.timeBounds.startTime+t.timeBounds.duration:void 0,scale:null!=(i=t.timeBounds.timescale)?i:1e3})})}function Bt(t){return t&&"-"===t.charAt(0)}function VX(t){let i;try{var e;i=x(null!=(e=t.channels)?e:"2")}catch(t){i=2}return Bt(t.contPattern)||Bt(t.initPattern)?function(t,i){const e=t.initPattern,s=t.contPattern;return t.initPattern=void 0,t.contPattern=void 0,Mo({},OX(t),{baseUrl:NX(t.baseUrl),language:"eng",channels:i,sampleRate:t.samplerate,tracks:t.tracks.map(t=>{var i,n;return t.initPattern=null!=(i=t.initPattern)?i:e,t.contPattern=null!=(n=t.contPattern)?n:s,HX(t)})})}(t,i):Mo({},OX(t),{baseUrl:NX(t.baseUrl),language:"eng",channels:i,sampleRate:t.samplerate,tracks:t.tracks.map(HX)})}function HX(t){let i;try{var e;i=x(null!=(e=t.channels)?e:"2")}catch(t){i=2}return Bt(t.contPattern)||Bt(t.initPattern)?function(t,i){return t.contPattern=t.baseUrl+t.contPattern,t.initPattern=t.baseUrl+t.initPattern,Mo({},FX(t),{baseUrl:"./",channels:i,sampleRate:t.samplerate})}(t,i):Mo({},FX(t),{baseUrl:NX(t.baseUrl),channels:i,sampleRate:t.samplerate})}function WX(t){return Bt(t.contPattern)||Bt(t.initPattern)?function(t){const i=t.initPattern,e=t.contPattern;return t.initPattern=void 0,t.contPattern=void 0,Mo({},OX(t),{baseUrl:NX(t.baseUrl),frameRate:t.framerate?{value:t.framerate.rate,scale:t.framerate.scale}:void 0,tracks:t.tracks.map(t=>(t.initPattern=i,t.contPattern=e,qX(t)))})}(t):Mo({},OX(t),{baseUrl:NX(t.baseUrl),frameRate:t.framerate?{value:t.framerate.rate,scale:t.framerate.scale}:void 0,tracks:t.tracks.map(qX)})}function qX(t){var i,e;return Bt(t.contPattern)||Bt(t.initPattern)?function(t){var i,e;return t.contPattern=t.baseUrl+t.contPattern,t.initPattern=t.baseUrl+t.initPattern,Mo({},FX(t),{baseUrl:"./",frameRate:t.framerate?{value:t.framerate.rate,scale:t.framerate.scale}:void 0,resolution:Mo({},t.resolution,{sarWidth:null==(i=t.resolution.sar)?void 0:i.width,sarHeight:null==(e=t.resolution.sar)?void 0:e.height})})}(t):Mo({},FX(t),{baseUrl:NX(t.baseUrl),frameRate:t.framerate?{value:t.framerate.rate,scale:t.framerate.scale}:void 0,resolution:Mo({},t.resolution,{sarWidth:null==(i=t.resolution.sar)?void 0:i.width,sarHeight:null==(e=t.resolution.sar)?void 0:e.height})})}function zX(t){var i;return Mo({},t,{id:null!=(i=t.id)?i:String(LX++),schemeId:"",tracks:t.tracks.map(GX)})}function GX(t){return Mo({},t,{segments:t.segments.map(jX)})}var XX=0;function jX(t){return{id:XX++,timeBounds:Mo({},t.timeBounds,{scale:t.timeBounds.timescale})}}var QX=0;function KX(t){var i,e;return Mo({},t,{id:null!=(i=t.id)?i:String(QX++),timeBounds:Mo({},t.timestamp,{scale:null!=(e=t.timestamp.timescale)?e:1e3})})}var YX=class{async Qxt(t,i){const e={Yu:t,Km:Al.wk,Yg:i},s=await this.SP.lk(e);let n=await s.FT(i);return function(t){const i=t;if(Z(i.manifestVersion)&&Ho(i.manifestVersion,"alpha"))return!0;let e,s;for(const t of i.presentations){for(const i of[...t.video,...t.audio])if(i.tracks.length>0){e=i.tracks[0],s=i;break}if(it(e))break}return(Z(null==s?void 0:s.initPattern)||Z(null==e?void 0:e.initPattern))&&!Z(null==e?void 0:e.initializationPattern)&&!Z(null==s?void 0:s.initializationPattern)}(n)&&(n=function(t){return Mo({},t,{availabilityDuration:{value:t.dvrDuration?t.dvrDuration.duration/t.dvrDuration.timescale:0},manifestVersion:"1.0.0",presentations:t.presentations.map(MX),contentBaseUrl:t.contentBaseUrl||"./"})}(n)),n}constructor(t){this.SP=void 0,this.SP=t}};r();var JX=class extends Ne{get Ca(){return this.hu||(this.hu=ES(this)),this.hu}oR(){return this.Kxt.oR()}get eR(){return this.Kxt.eR}get sR(){return this.Kxt.sR}get nR(){return this.Kxt.nR}get rR(){return this.Kxt.rR}get hR(){return this.Kxt.hR}wn(t,i){this.Kxt.wn(t,i)}mn(t,i){this.Kxt.mn(t,i)}constructor(t){super(),this.hu=void 0,this.Kxt=void 0,this.Kxt=t}};r(),r(),r();var cn=class{get yet(){const t=1-this.Yxt**this.Jxt;return this.Zxt/t}Pat(t,i){const e=this.Yxt**t,s=i*(1-e)+e*this.Zxt;S(s)||(this.Zxt=s,this.Jxt+=t)}EZ(t){const i=_.exp(_.log(.5)/t);if(i===this.Yxt)return;if(0===this.Jxt)return void(this.Yxt=i);const e=this.yet,s=1-i**this.Jxt;this.Zxt=e*s,this.Yxt=i}constructor(t){this.Yxt=void 0,this.Zxt=0,this.Jxt=0,this.Yxt=_.exp(_.log(.5)/t)}},de=class t{get yet(){return this.Nat()?_.max(this.$xt.yet,this.tIt.yet):this.iIt}Pat(t){const i=zd.Mg(),e=t;this.eIt&&void 0!==this.sIt&&i-this.sIt>=this.nIt&&this.hr(),this.rIt+=1,this.$xt.Pat(1,e),this.tIt.Pat(1,e),this.hIt.push(e),this.hIt.length>this.oIt&&this.hIt.shift(),this.sIt=i}Nat(){return void 0!==this.sIt&&zd.Mg()-this.sIt<=this.nIt}hr(){this.$xt=new cn(this.aIt),this.tIt=new cn(this.uIt),this.rIt=0,this.hIt=[],this.sIt=void 0}constructor(i=t.cIt,e=t.dIt,s=t.Mat,n=!1){this.$xt=void 0,this.tIt=void 0,this.rIt=0,this.hIt=[],this.sIt=void 0,this.nIt=6e4,this.oIt=10,this.aIt=void 0,this.uIt=void 0,this.iIt=void 0,this.eIt=void 0,this.aIt=i,this.uIt=e,this.iIt=s,this.eIt=n,this.$xt=new cn(i),this.tIt=new cn(e)}};de.cIt=2,de.dIt=5,de.Mat=.1,r();var ZX=class{PY(t){for(const i of this.lIt)i.PY(t)}xY(t){for(const i of this.lIt)i.xY(t)}IY(t,i){for(const e of this.lIt)e.IY(t,i)}RY(t){for(const i of this.lIt)i.RY(t)}constructor(t){this.lIt=void 0,this.lIt=t}};r();var $X=class{PY(t){this.fIt=t}xY(t){this.vIt.Pat(t-this.fIt)}IY(t){}RY(t){}constructor(t){this.vIt=void 0,this.fIt=0,this.vIt=t}};r();var tj=class{xY(t){this._It=t}IY(t,i){this.Fat.Pat(t-this._It,i.byteLength),this._It=t}RY(t){}PY(t){}constructor(t){this.Fat=void 0,this._It=0,this.Fat=t}};r();var ij=class{PY(t){}IY(t,i){const e=i.byteLength,s=this.gIt;this.gIt=e;const n=t-this.En;this.En=t,this.pIt.A$(i);const r=!this.pIt.mIt(),h=e>=this.wIt;s!==zd.Zs.Sp&&r&&h&&this.Fat.Pat(n,e)}xY(t){this.En=t}RY(t){}constructor(t,i=0){this.Fat=void 0,this.wIt=void 0,this.pIt=new ej,this.En=0,this.gIt=0,this.Fat=t,this.wIt=i}},ej=class extends Xo{mIt(){return this.yIt}A$(t){this.yIt=!1,super.A$(t)}w$(t,i){this.AIt&&this.AIt!==Ro.OC||(this.yIt=!0),super.w$(t,i),this.AIt=t}C$(t){return!1}B$(t){}M$(t){}constructor(...t){super(...t),this.AIt=void 0,this.yIt=!1}};r();var sj=function(t){return t.bIt="sample",t}({}),nj=class extends Ne{cW(){if(!this.Nat())return;const t=zd.Mg();t-this.SIt>1e3&&(this.SIt=t,HI.Ng.cW(this.yet))}constructor(...t){super(...t),this.SIt=0}};r();var rj=class extends nj{get yet(){return this.Nat()?this.Zxt:this.TIt}Nat(){return this.wb.length>=3}Pat(t,i){if(0===t)return;const e={kW:8*i/t,kIt:i};if(this.wb.push(e),this.EIt+=e.kIt,this.wb.length>30){const t=this.wb.shift();this.EIt-=t.kIt}const s=this.wb.slice().sort((t,i)=>t.kW-i.kW);let n=0;for(let t=0;t=.5)break}this.cW(),this.So(new wp(sj.bIt))}constructor(t){super(),this.TIt=void 0,this.wb=[],this.Zxt=void 0,this.EIt=0,this.TIt=t,this.Zxt=t}};r();var ps=class t extends nj{Pat(t,i){const e=8*i/t;this.$xt.Pat(t,e),this.tIt.Pat(t,e),this.PIt+=i,this.cW(),this.So(new wp(sj.bIt))}get yet(){return this.Nat()?_.min(this.$xt.yet,this.tIt.yet):this.iIt}Nat(){return this.PIt>=this.xIt}constructor(i=t.cIt,e=t.dIt,s=t.IIt,n=t.Mat){super(),this.$xt=void 0,this.tIt=void 0,this.PIt=0,this.iIt=void 0,this.xIt=void 0,this.xIt=s,this.$xt=new cn(i),this.tIt=new cn(e),this.iIt=n}};ps.IIt=128e3,ps.Mat=VI,ps.cIt=.5,ps.dIt=5;var hj=class{RIt(t){var i;null==(i=this.Fat)||i.mn(sj.bIt,this.CIt),this.Fat=new rj(t),this.Fat.wn(sj.bIt,this.CIt)}DIt(t){this.BIt.push(t)}NIt(t){oi(this.BIt,t)}get kW(){var t,i;return null!=(i=null==(t=this.Fat)?void 0:t.yet)?i:this.MIt}get EW(){return this.LIt.yet}PW(t){if("segment"!==t.Km)return;if("video"!==t.qk)return;const i=[new $X(this.LIt)];return this.Fat&&("stream"===t.dk&&"initialization-segment"!==t.Wk?i.push(new ij(this.Fat,1e3)):i.push(new tj(this.Fat))),new ZX(i)}constructor(t,i){this.Fat=void 0,this.BIt=[],this.LIt=void 0,this.MIt=void 0,this.CIt=()=>{for(const t of this.BIt)t()},this.MIt=t>0?t:ps.Mat,this.LIt=new de(de.cIt,de.dIt,i>0?i:de.Mat),this.RIt(this.MIt)}};r();var oj=class{OIt(t,i){const e=i-t;(!this.FIt||et.$at))},h={ct:$l(e,t=>t.ct),xet:e[0].Rvt,bU:-i.kot.eRt};await this.q2(s,h,n);const o=h.xet+h.bU,a=o+h.ct;this.ZIt.QIt(i.kot,ve.tL(o,a))}}catch(t){s.error=t,s.hasError=!0}finally{Cs(s)}}catch(t){throw i.sRt(),t}finally{i.nRt();const t=this.tRt;this.tRt=void 0,null==t||t.Xy()}}async H2(t,i,e,s){if(this.$It)throw new m("Concurrent appends are not supported.");try{const n={stack:[],error:void 0,hasError:!1};try{const r=Be(n,at.ep([s,this.T3.Yg]),!1).Yg;this.tRt=new pa,await this.q2(t,i,r);const h=i.xet+i.bU,o=h+i.ct;this.ZIt.jIt(this.IP),this.ZIt.QIt(e,ve.tL(h,o))}catch(t){n.error=t,n.hasError=!0}finally{Cs(n)}}finally{const t=this.tRt;this.tRt=void 0,null==t||t.Xy()}}async q2(t,i,e){this.Trt.B3===Ci.Bk&&this.rRt.Odt(t.ck,i.xet,i.xet+i.ct,i.bU,this.vyt,!1);const s=this.TL.CL.RL,n=this.Trt.IP.Cr(this.TL.MP);if(s||n)return await this.hRt(e),await this.Trt.H2(t,i,e);this.JIt.push([t,i]);const r=this.JIt[0][1].xet;return this.JIt[this.JIt.length-1][1].xet-r>=.4?await this.hRt(e):void 0}async z2(t,i){if(this.$It)throw new m("Concurrent appends are not supported.");try{const e={stack:[],error:void 0,hasError:!1};try{const s=Be(e,at.ep([i,this.T3.Yg]),!1).Yg;this.tRt=new pa,await this.hRt(s),await this.Trt.z2(t,{},s),this.Trt.B3===Ci.Bk&&this.rRt.Jrt(t.ck)}catch(t){e.error=t,e.hasError=!0}finally{Cs(e)}}finally{const t=this.tRt;this.tRt=void 0,null==t||t.Xy()}}async _S(t,i,e){if(this.$It)throw new m("Concurrent appends are not supported.");try{const s={stack:[],error:void 0,hasError:!1};try{const n=Be(s,at.ep([e,this.T3.Yg]),!1).Yg;this.tRt=new pa,await this.hRt(n),await this.Trt._S(t,i,n),this.ZIt.KIt(ve.tL(t,i))}catch(t){s.error=t,s.hasError=!0}finally{Cs(s)}}finally{const t=this.tRt;this.tRt=void 0,null==t||t.Xy()}}async AQ(t){if(this.$It)throw new m("Concurrent appends are not supported.");try{const i={stack:[],error:void 0,hasError:!1};try{const e=Be(i,at.ep([t,this.T3.Yg]),!1).Yg;this.tRt=new pa,await this.hRt(e)}catch(t){i.error=t,i.hasError=!0}finally{Cs(i)}}finally{const t=this.tRt;this.tRt=void 0,null==t||t.Xy()}}async hRt(t){for(const[i,e]of this.JIt)await this.Trt.H2(i,e,t);Yo(this.JIt)}async zg(){for(this.T3.zg();this.$It;)await this.iRt}constructor(t,i,e,s){super(),this.Trt=void 0,this.ZIt=void 0,this.TL=void 0,this.JIt=[],this.vyt=void 0,this.rRt=void 0,this.tRt=void 0,this.T3=new at,this.TL=i,this.Trt=t,this.vyt=e,this.rRt=s,this.ZIt=new gj,this.Trt.wn(Zs.lZ,this.Rs)}};r(),r();var mj=class{async oRt(t,i){if(this.aRt>=this.uRt.maxRetries)throw t;const e=this.cRt(this.aRt++);await Er(e,i)}cRt(t){let i=0;return 0!==t&&(i+=_.min(this.uRt.maximumBackoff,this.uRt.minimumBackoff*2**(t-1))),i}constructor(t){this.aRt=0,this.uRt=void 0,this.uRt=t}};r(),r();var wj=function(t){return t.dRt="emsgdata",t}({}),yj=class extends wp{constructor(t,i){super("emsgdata"),this.value=void 0,this.data=void 0,this.value=t,this.data=i}};r();var Aj=class{start(t){this.YJ=t}lRt(t){this.YJ.enqueue(t)}constructor(){this.YJ=void 0}};r(),r();var Ur=function(t){return t.fRt="initdata",t.MANIFEST_UPDATE="manifestupdate",t.vRt="timestamps:v1",t}({});function bj(t){if("urn:theo:hesp:2020"!==t.$N)return;const i=t.zE;if(i===Ur.fRt){return function(t){if(!t||!Lu(t))return;const i=t;return!ho(i.index)||!ho(i.offset)||i.index<0&&i.offset<0?void 0:{Km:"initdata",index:i.index,offset:i.offset}}(JSON.parse(vr(dh(t.eM),new Ui)))}if(i===Ur.MANIFEST_UPDATE){return function(t){if(!t||!Lu(t))return;const i=t;return!it(i.url)||Z(i.url)?{Km:"manifestupdate",url:i.url}:void 0}(JSON.parse(vr(dh(t.eM),new Ui)))}if(i===Ur.vRt){const i=dh(t.eM),e=new Ui,s=et(i,e).toNumber()/t.qD,n=et(i,e).toNumber()/1e3,r=Cu(i,e)/1e3;let h;return e.ac+8<=i.byteLength&&(h={hours:Cu(i,e),minutes:Xp(i,e),seconds:Xp(i,e),frames:qe(i,e)}),{Km:Ur.vRt,_Rt:s,gRt:n,pRt:r,mRt:h}}}var Sj=class extends Aj{transform(t){if(t.Km===Ro.VC)try{const i=bj(jt.LD(t.ck));i&&this.wRt.So(new yj(i.Km,i))}catch(t){false}this.lRt(t)}zg(){this.wRt.Vo()}constructor(...t){super(...t),this.wRt=new Ne}};r();var Tj=class{start(t){this.yRt=new kj(t)}transform(t){this.yRt.A$(t)}flush(){this.yRt.S$()}constructor(){this.yRt=void 0}},kj=class extends Xo{C$(t){return!0}B$(t){this.YJ.enqueue(t)}M$(t){}constructor(t){super(),this.YJ=void 0,this.YJ=t}};r(),r();var Ej=Wt.fromNumber(Xl);var Pj=class extends Ne{async lk(t){for(;;)try{return await this.nV.lk(t)}catch(i){if(D(i))throw i;await this.ARt.oRt(i,t.Yg)}}constructor(t,i){super(),this.nV=void 0,this.ARt=void 0,this.nV=t,this.ARt=i}};function xj(t,i,e,s,n,r,h,o){const a=new Ra;return n&&a.OT(function(t,i){return void 0===i&&(i=Ej),new Ra({Range:"bytes="+t.toString()+"-"+i.toString()})}(n.start,n.end)),{Yu:t,fk:a,zk:!1,Yg:o,Km:Al.yk,Wk:e,qk:s,Vk:r,Hk:h,dk:i,jk:i===M.BT}}r(),r();var Ij=function(t){return t[t.INITIALIZER=0]="INITIALIZER",t[t.FRAMES=1]="FRAMES",t}({}),Rj=class extends Aj{transform(t){this.bRt.push(t),t.Km===Ro.OC&&this.SRt(this.bRt.splice(0),Ij.FRAMES)}SRt(t,i){const e={qD:this.HA,oQ:this.SQ},s=vm(t.map(t=>ta(t.ck.ck))),n=Jr(t,Cj),r=jt.TD(n.ck.ck)[0],h={qk:this.Tat,Ey:e,$at:s,Km:i,ct:this.Nd(r)/this.HA,Rvt:Bs(this.TRt(r),this.HA)};this.lRt(h)}Nd(t){const i=t.Z[0];if(!i||0===i.zN.length)return 0;var e;const s=null!=(e=i.gD.NN)?e:0;return $l(i.zN[0].JN,t=>{var i;return null!=(i=t.ct)?i:s})}TRt(t){var i,e;return null!=(e=null==(i=t.Z[0].GN)?void 0:i.GN)?e:Wt.UZERO}constructor(t,i){super(),this.SQ=void 0,this.Tat=void 0,this.HA=void 0,this.bRt=[],this.SQ=t,this.Tat=this.SQ.match(/video/)?On.Bk:On.Dk,this.HA=i}};function Cj(t){return t.Km===Ro.IC}r();var Dj=class extends Ne{get kot(){return this.kRt}Cct(t){return t+1}get ERt(){return!1}get PRt(){return this.xRt}get $It(){return void 0!==this.tRt}get iRt(){return this.tRt?this.tRt.Qy:Promise.resolve()}My(t){this.xRt=t,this.IRt=void 0,this.RRt=void 0}CRt(){return void 0!==this.IRt}async DRt(){if(this.$It)throw new m("Concurrent downloads are not supported.");try{this.tRt=new pa;let t;if("now"===this.xRt)t=zd.xm(this.kRt.BRt("now"),this.kRt.NRt);else{const i=this.xRt,e=0===i?1:this.kRt.MRt(i);t=zd.xm(this.kRt.BRt(e),this.kRt.NRt)}const i=xj(t,M.CT,Xa.Sk,this.Tat,void 0,3e3,1e3,this.LRt.Yg),e=await this.ORt.lk(i),s=await e.HT(this.LRt.Yg),n=new j(s),{FRt:r,KD:h}=function(t){const i=Cl.aD(new lc(dh(t),new Ui)),e=Jr(i,t=>t.Km===Ro.WC||t.Km===Ro.IC);if(void 0===e)return{FRt:t,KD:void 0};const s=ao(t,0,e.ac),n=ao(t,e.ac);return{FRt:s,KD:0===n.byteLength?void 0:n}}(n),o=jt.TD(dh(n));this.HA=function(t){const i=Jr(t,t=>t.Km===Ro.OR);return i.Z[0].KD.gD.qD}(o);const a=function(t){const i=t.filter(t=>t.Km===Ro.VC),e=i.map(t=>bj(t)),s=Jr(e,t=>(null==t?void 0:t.Km)===Ur.fRt);if(!s)throw new m("No init data in init response");return s}(o);let u;if(this.IRt=a.index,this.RRt=a.offset,h){u=function(t,i,e){var s;const n=Jr(t,t=>t.Km===Ro.IC);var r;const h=Bs(null!=(r=null==(s=n.Z[0].GN)?void 0:s.GN)?r:Wt.UZERO,e),o=n.Z[0];var a;const u=null!=(a=o.gD.NN)?a:0,c=o.zN[0],d=$l(c.JN,t=>{var i;return null!=(i=t.ct)?i:u})/e;return{xet:h,ct:d,bU:i}}(jt.TD(dh(n)),-this.kot.eRt,this.HA)}return{initialization:r,data:h,metadata:u}}finally{const t=this.tRt;this.tRt=void 0,null==t||t.Xy()}}URt(){if(this.$It)throw new m("Concurrent downloads are not supported.");this.tRt=new pa;const t=void 0!==this.RRt?Wt.fromNumber(this.RRt):void 0;return GA(this.VRt(this.IRt,t,this.LRt.Yg)).pipeThrough(new Ta(new Rj(this.kot.oQ,this.HA))).pipeThrough(new Ta(new Bj(this.LRt.Yg)))}async VRt(t,i,e){const s=this.HRt(t,i,e);return(await this.ORt.lk(s)).WT().pipeThrough(new Ta(new Tj)).pipeThrough(new Ta(this.WRt))}HRt(t,i,e){const s=this.kRt.qRt(t),n=void 0!==i?{start:i,end:void 0}:void 0;return xj(zd.xm(s,this.kRt.NRt),M.BT,Xa.pk,this.Tat,n,25e3,1e3,e)}sRt(){this.IRt=void 0,this.RRt=void 0}nRt(){void 0!==this.IRt&&(this.IRt=this.Cct(this.IRt)),this.RRt=void 0;const t=this.tRt;this.tRt=void 0,null==t||t.Xy()}cancelDownload(){var t;this.LRt.Zg(),this.LRt=new at,this.tRt=null!=(t=this.tRt)?t:new pa,this.sRt();const i=this.tRt;this.tRt=void 0,null==i||i.Xy()}async zg(){this.Vo(),this.WRt.zg(),this.LRt.Zg(),await this.iRt,this.IRt=void 0,this.RRt=void 0}constructor(t,i,e){super(),this.kRt=void 0,this.ORt=void 0,this.nV=void 0,this.ARt=void 0,this.Tat=void 0,this.WRt=void 0,this.xRt="now",this.IRt=void 0,this.RRt=void 0,this.HA=void 0,this.LRt=new at,this.tRt=void 0,this.kRt=t,this.ARt=new mj(e),this.WRt=new Sj,this.WRt.wRt.wn(wj.dRt,this.Rs),this.nV=i,this.Tat=function(t){switch(t){case On.Dk:return Za.Dk;case On.Bk:return Za.Bk;default:return Za.pk}}(t.Km),this.ORt=new Pj(this.nV,this.ARt)}};var Bj=class{start(t){this.YJ=t,this.Jg.Xg(this.zRt)}flush(){this.Jg.jg(this.zRt)}constructor(t){this.YJ=void 0,this.Jg=void 0,this.zRt=()=>{this.YJ.error(new dt)},this.Jg=t}};function pn(t){var i;return t.value/(null!=(i=t.scale)?i:1)}r(),r(),r(),r(),r();var Nj="{initId}",Mj=/{initId(?::0(?:\d+)d)?}/,Lj=/{segmentId(?::0(?:\d+)d)?}/,Oj=class{get o(){return this.hS}get kW(){return this.dW}get tyt(){return this.GRt}get ect(){return this.fAt}get XRt(){return this.jRt}get QRt(){return this.KRt}get NRt(){return zd.xm(this.YRt,this.JRt.NRt)}get frt(){return this.ZRt}get Th(){return this.pO}get $Rt(){return this.tCt}get iCt(){return this.eCt}get eRt(){return this.sCt}get nCt(){return this.nAt}er(t){this.jRt=t.activeSegment,this.KRt=t.activeSequenceNumber,this.fAt=t.segments}constructor(t,i,e){var s,n,r,h;this.FO=void 0,this.rCt=void 0,this.hS=void 0,this.dW=void 0,this.GRt=void 0,this.YRt=void 0,this.ZRt=void 0,this.tCt=void 0,this.eCt=void 0,this.pO=void 0,this.sCt=void 0,this.nAt=void 0,this.jRt=void 0,this.KRt=void 0,this.fAt=[],this.FO=t,this.rCt=e,this.hS=t.id,this.dW=t.bandwidth,this.GRt=t.averageBandwidth,this.YRt=null!=(s=t.baseUrl)?s:"",this.ZRt=null!=(n=t.codecs)?n:i.codecs,this.tCt=null!=(r=t.continuationPattern)?r:i.continuationPattern,this.eCt=null!=(h=t.initializationPattern)?h:i.initializationPattern,this.pO=t.label,this.sCt=t.mediaTimeOffset?pn(t.mediaTimeOffset):0,this.nAt=t.segmentDuration?pn(t.segmentDuration):0,this.er(t)}},Fj=class extends Oj{get Km(){return On.Dk}get JRt(){return this.rCt}get hCt(){return this.oCt}get plt(){return this.aCt}get BB(){return this.kA}get oQ(){return'audio/mp4; codecs="'+this.frt+'"'}constructor(t,i,e){var s,n,r,h;super(t,i,e),this.oCt=void 0,this.aCt=void 0,this.kA=void 0,this.oCt=null!=(s=t.channels)?s:1,this.aCt=null!=(r=null!=(n=t.frameRate)?n:i.frameRate)?r:1024,this.kA=null!=(h=t.sampleRate)?h:i.sampleRate}},Uj=class extends Oj{get Km(){return On.Bk}get JRt(){return this.rCt}get uCt(){return this.Up}get plt(){return this.aCt}get oQ(){return'video/mp4; codecs="'+this.frt+'"'}constructor(t,i,e){var s;super(t,i,e),this.Up=void 0,this.aCt=void 0,this.Up=t.resolution,this.aCt=pn(null!=(s=t.frameRate)?s:i.frameRate)}};function Vj(t,i){const e=String(i);if(t===Nj||"now"===i)return e;const s=x(t.substring(9,t.lastIndexOf("d")));return Na(e,s,"0")}function Hj(t,i){const e=String(i);if(t===Nj)return e;const s=x(t.substring(12,t.lastIndexOf("d")));return Na(e,s,"0")}var Wj=class{get zst(){return this.cCt}get o(){return this.hS}get dCt(){return this.lCt}get NRt(){return zd.xm(this.YRt,this.zst.NRt)}get Th(){return this.pO}get eRt(){return this.sCt}get fCt(){return this.vCt}er(t){for(const i of this.RI){const e=Jr(t.tracks,t=>i.o===t.id);e&&i.er(e)}}constructor(t,i,e){var s;this.rCt=void 0,this.RI=void 0,this.cCt=void 0,this.hS=void 0,this.lCt=void 0,this.YRt=void 0,this.pO=void 0,this.sCt=void 0,this.vCt=void 0,this.rCt=t,this.RI=e,this.cCt=i,this.hS=t.id,this.lCt=t.alignId,this.YRt=null!=(s=t.baseUrl)?s:"",this.pO=t.label,this.sCt=t.mediaTimeOffset?pn(t.mediaTimeOffset):0,this.vCt=t.protection,this.er(t)}},qj=class extends Wj{get JRt(){return this.rCt}get Z(){return this.RI}get bs(){return this.qA}get hCt(){return this.oCt}er(t){var i,e;super.er(t),this.qA=t.language,this.oCt=null!=(i=t.channels)?i:1,this.SQ=null!=(e=t.mimeType)?e:"audio/mp4"}constructor(t,i){const e=[];super(t,i,e),this.qA=void 0,this.oCt=void 0,this.SQ=void 0;for(const i of t.tracks)e.push(new Fj(i,t,this))}},zj=class extends Wj{get JRt(){return this.rCt}get Z(){return this.RI}get _Ct(){return this.rCt.captions}er(t){var i;super.er(t),this.SQ=null!=(i=t.mimeType)?i:"video/mp4"}constructor(t,i){const e=[];super(t,i,e),this.SQ=void 0;for(const i of t.tracks)e.push(new Uj(i,t,this))}},Gj=class{get o(){return this.hS}get NRt(){return zd.xm(this.YRt,this.pCt.gCt)}get mCt(){return this.wCt}get MP(){return this.bz}get aQ(){return this.Zf}get yCt(){return this.ACt}get bCt(){return this.SCt}er(t){var i;this.wCt=t.timeBounds,this.Zf=null!=(i=t.events)?i:[],this.bz=t.currentTime?pn(t.currentTime):void 0}constructor(t,i){var e,s,n;this.ACt=[],this.SCt=[],this.pCt=void 0,this.hS=void 0,this.YRt=void 0,this.wCt=void 0,this.bz=void 0,this.Zf=void 0,this.pCt=t,this.hS=i.id,this.YRt=null!=(e=i.baseUrl)?e:"";for(const t of null!=(s=i.audio)?s:[])this.ACt.push(new qj(t,this));for(const t of null!=(n=i.video)?n:[])this.SCt.push(new zj(t,this));this.er(i)}},Xj=class{get hR(){return this.pCt}get TCt(){return this.kCt}get ECt(){return this.PCt}get xCt(){return this.ICt}get RCt(){return this.CCt}get DCt(){return this.BCt}get b0(){return this.vA}get NCt(){return this.MCt}get gCt(){var t;return zd.xm(null!=(t=this.LCt)?t:"",this.OCt)}get FCt(){return this.UCt}er(t){var i;this.kCt=pn(t.availabilityDuration),this.PCt=t.creationDate,this.ICt=t.fallbackPollRate,this.CCt=t.manifestVersion,this.vA=t.streamType,this.MCt=t.activePresentation,this.LCt=t.contentBaseUrl,this.UCt=null==(i=t.timeSource)?void 0:i.url,this.pCt=t;for(const i of t.presentations){const t=Jr(this.BCt,t=>t.o===i.id);t?t.er(i):this.BCt.push(new Gj(this,i))}this.BCt=this.BCt.filter(i=>t.presentations.some(t=>t.id===i.o))}constructor(t,i){this.OCt=void 0,this.pCt=void 0,this.kCt=void 0,this.PCt=void 0,this.ICt=void 0,this.CCt=void 0,this.BCt=[],this.vA=void 0,this.MCt=void 0,this.LCt=void 0,this.UCt=void 0,this.OCt=t,this.pCt=i,this.er(i)}};r(),r();var jj=0,Qj=class extends Ne{get cst(){return!0}get tyt(){return this.VCt.tyt}get kW(){return this.VCt.kW}get frt(){return this.VCt.frt}get o(){return this.VCt.o}get Th(){var t;return null!=(t=this.VCt.Th)?t:""}get jI(){return this.gO}get nyt(){return this.VCt.NRt}get iyt(){}get oQ(){return this.VCt.oQ}get eRt(){return this.VCt.eRt}get NRt(){return this.VCt.NRt}get Km(){return this.VCt.Km}MRt(t){const i=(t-this.VCt.JRt.zst.MP)*this.framesPerSecond();return _.round(this.VCt.QRt+i)}HCt(t){return t+1}BRt(t){var i;let e,s=this.VCt.iCt;for(;e=null==(i=s.match(Mj))?void 0:i.pop();)s=s.split(e).join(Vj(e,t));return s+("now"===t?"?uuid="+FC():"")}qRt(t){var i;let e,s=this.VCt.$Rt;for(;e=null==(i=s.match(Lj))?void 0:i.pop();)s=s.split(e).join(Hj(e,t));return s}QU(){}jU(){}constructor(t){super(),this.VCt=void 0,this.gO=jj++,this.VCt=t}},Kj=class extends Qj{get WCt(){return this.VCt}get $mt(){return this.VCt.BB}get Ht(){return this.FO}framesPerSecond(){return this.VCt.BB/this.VCt.plt}get Ca(){return this.hu||(this.hu=Oq(this)),this.hu}constructor(t,i){super(t),this.FO=void 0,this.hu=void 0,this.FO=i}},Yj=class extends Qj{get WCt(){return this.VCt}get eyt(){return 0}get plt(){return this.VCt.plt}get Mi(){return this.VCt.uCt.height}get Ti(){return this.VCt.uCt.width}get uCt(){return this.VCt.uCt}get Ht(){return this.FO}framesPerSecond(){return this.VCt.plt}get Ca(){return this.hu||(this.hu=Lq(this)),this.hu}constructor(t,i){super(t),this.FO=void 0,this.hu=void 0,this.FO=i}};r();var mn=function(t){return t.qCt="alternative",t.zCt="main",t.GCt="commentary",t.XCt="",t.UU="descriptions",t.jCt="main-desc",t.QCt="translation",t}({}),Ca=function(t){return t.qCt="alternative",t.zCt="main",t.GCt="commentary",t.XCt="",t.FU="captions",t.WI="sign",t.OU="subtitles",t}({}),Jj=0,Zj=class extends Ne{get XI(){return this.KCt()}get Rt(){return this.We}set Rt(t){this.Rt!==t&&(this.We=t,t&&this.YCt(),this.ZCt.JCt(),this.So(new nr(this)))}get Ca(){return this.hu||(this.hu=fo(this)),this.hu}get Jdt(){return this.$Ct}get o(){return this.rCt.o}get jI(){return this.gO}get Th(){var t;return null!=(t=this.rCt.Th)?t:""}get Xk(){return this.Rt?"enabled":"disabled"}set Xk(t){"enabled"===t?this.Rt=!0:"disabled"===t&&(this.Rt=!1)}get KI(){return this.dO}get YI(){return this.dct}set YI(t){this.dct=t,this.ZCt.JCt(),this.So(new Zo(t,this))}wO(t){this.Rt=t}tDt(t){for(const i of this.dO.II)i===t&&this.So(new DW(i))}constructor(t,i,e){super(),this.rCt=void 0,this.ZCt=void 0,this.dO=new Uk,this.$Ct=void 0,this.gO=Jj++,this.We=!1,this.dct=void 0,this.hu=void 0,this.rCt=i,this.ZCt=e,this.$Ct=new iG(t,[]);for(const t of i.Z)this.dO.lO(this.createQuality(t))}},$j=class extends Zj{get Km(){return On.Dk}get Lt(){return mn.zCt}get bs(){return this.rCt.bs}get JRt(){return this.rCt}YCt(){this.ZCt.iDt(this)}KCt(){const t=this.ZCt.eDt;return(null==t?void 0:t.Ht)===this?t:void 0}createQuality(t){return new Kj(t,this)}constructor(t,i){super(Ci.Dk,t,i)}},tQ=class extends Zj{get Km(){return On.Bk}get Lt(){return Ca.zCt}get bs(){return""}get JRt(){return this.rCt}get _Ct(){return this.rCt._Ct}YCt(){this.ZCt.sDt(this)}KCt(){const t=this.ZCt.nDt;return(null==t?void 0:t.Ht)===this?t:void 0}createQuality(t){return new Yj(t,this)}constructor(t,i){super(Ci.Bk,t,i)}};function iQ(t,i,e,s){if(!t)return;const n=function(t,i,e){const s=[];for(const t of i){var n;const i=null!=(n=t.mimeType)?n:"audio/mp4";var r;const e=null!=(r=t.codecs)?r:t.tracks.map(t=>t.codecs)[0];s.push(i+'; codecs="'+e+'"')}return eQ(t,i,s,[],e)}(t,i?[i]:[],!s),r=function(t,i,e){const s=[];for(const t of i){var n;const i=null!=(n=t.mimeType)?n:"video/mp4";var r;const e=null!=(r=t.codecs)?r:t.tracks.map(t=>t.codecs)[0];s.push(i+'; codecs="'+e+'"')}return eQ(t,i,[],s,e)}(t,e?[e]:[],!s),h=kG(n,r);return t.preferredKeySystems&&(null==h?void 0:h.kpt)&&(h.kpt=NG(h.kpt,t.preferredKeySystems)),h}function eQ(t,i,e,s,n){const r=i.map(t=>t.protection).filter(it);if(!r.length)return;const h=r[0].type,o=De(r,t=>t.systems),a=De(o,t=>function(t,i){void 0===i&&(i=!0);const e=[],s=i?function(t){return np.filter(i=>i.Zm===t.toLowerCase())}(t.schemeId):function(t){return sp.filter(i=>i.Zm===t.toLowerCase())}(t.schemeId);for(const i of s)e.push({HH:sQ(t)?t.uri:void 0,kS:i,NW:void 0,BW:t.pssh?[_c(t.pssh).buffer]:[],MW:[]});return e}(t,n));return{aH:t,Ept:{$St:h},kpt:a,tTt:e,iTt:s}}function sQ(t){return t.schemeId===Bg.jm&&void 0!==t.keyFormat&&void 0!==t.keyFormatVersions}r(),r(),r();var nQ;function rQ(t){const i=t.MP,e=t.IP.JM(i);return e?e.An(0)-i:0}nQ="Android"===zd.Cm.Dm?200:300;var hQ=zd.Zs.bp?1:.5,oQ=class{Tn(){1!==this.Ra&&(this.Ra=1,this.rDt=zd.fm(()=>{this.hDt()},nQ),this.oDt.DIt(this.aDt),this.TL.hx?this.uDt.wn(Do.TM,this.cDt):this.cDt())}Xx(){0!==this.Ra&&(this.Ra=0,void 0!==this.rDt&&zd.vm(this.rDt),this.oDt.NIt(this.aDt),this.uDt.mn(Do.SM,this.dDt),this.uDt.mn(Do.TM,this.cDt),this.lDt=void 0,this.uL())}get fDt(){return aQ(this.vDt.eDt,this.vDt.nDt)}async hDt(){await this._Dt,this._Dt=this.gDt(),await this._Dt}pDt(t,i){var e,s;const n=this.mDt(t,i),r=this.wDt.OY;if(r.type===Sa.PERFORMANCE)return n[n.length-1];if(r.type===Sa.QUALITY)return n[0];const h=(null==(e=r.metadata)?void 0:e.bitrate)?1.3*(null==(s=r.metadata)?void 0:s.bitrate):this.oDt.kW;for(const t of n){if(t.yDt<=h)return t}return n[n.length-1]}async gDt(){var t,i;const e=null==(t=this.vDt.eDt)?void 0:t.Ht,s=null==(i=this.vDt.nDt)?void 0:i.Ht,n=this.mDt(e,s);if(0===n.length)return void 0;const r=this.maybeSwitchToTargetQuality(n);if(r)return void await this.ADt(r);const h=this.maybeGetUpSwitch(n);h&&await this.ADt(h)}maybeSwitchToTargetQuality(t){const i=this.fDt;if(t.some(t=>uQ(t,i)))return;const e=this.oDt.kW;for(const i of t){if(i.yDt<=e)return i}return t[t.length-1]}maybeGetUpSwitch(t){var i,e;const s=this.oDt.kW;var n;var r;const h=1.3*((null!=(n=null==(i=this.vDt.eDt)?void 0:i.kW)?n:0)+(null!=(r=null==(e=this.vDt.nDt)?void 0:e.kW)?r:0));let o;for(const i of t)if(i.yDth){o={bDt:i,ift:zd.Mg()};break}if(!this.lDt||!uQ(this.lDt.bDt,null==o?void 0:o.bDt))return void(this.lDt=o);const a=zd.Mg()-this.lDt.ift,u=this.lDt.bDt.yDt,c=this.SDt.length>=3&&this.SDt.every(t=>t>u);if(a>1e3&&c){if(this.TL.CL.RL||zd.Zs.pp){const t=2*this.oDt.EW;if(!(rQ(this.TL)>t))return}else{const t=_.max(2*this.oDt.EW+hQ,this.jW.nL.minimumOffset);if(!(rQ(this.TL)>t))return void(this.TDt&&this.TDt.minimumOffset===t||(this.uL(),this.TDt={minimumOffset:t},this.jW.hL(this.TDt)))}return this.lDt.bDt}}async ADt(t,i){void 0===i&&(i=!1),this.lDt=void 0,this.uL();const e=this.fDt;if(e.kDt===t.kDt&&e.EDt===t.EDt)return;const s=t.kDt,n=t.EDt;e.EDt&&n&&e.EDt.kW>n.kW&&i&&(this.oDt.RIt(t.yDt),this.SDt=[]),await this.vDt.PDt(n,s)}uL(){this.TDt&&(this.jW.uL(this.TDt),this.TDt=void 0)}mDt(t,i){let e=[],s=[];var n;t&&(e=(null==(n=t.YI)?void 0:n.length)?t.YI:t.KI.II);if(i){var r;const t=(null==(r=i.YI)?void 0:r.length)?i.YI:i.KI.II,e=t.slice().sort((t,i)=>t.kW-i.kW),n=this.xDt(e);0===n.length&&t.length>0&&n.push(oo(t,t=>t.kW)),s=n}const h=[],o=e.length>0?e:[void 0],a=s.length>0?s:[void 0];for(const t of o)for(const i of a)h.push(aQ(t,i));return function(t){return t.sort((t,i)=>i.yDt-t.yDt)}(h)}xDt(t){const i=Jr(t,t=>t.Mi>=this.TL.Mi&&t.Ti>=this.TL.Ti);return i?t.filter(t=>t.Mi<=i.Mi&&t.Ti<=i.Ti):t.slice()}zg(){this.lDt=void 0,this.uDt.hr(),this.uL()}constructor(t,i,e,s,n,r){this.TL=void 0,this.jW=void 0,this.vDt=void 0,this.IDt=void 0,this.oDt=void 0,this.wDt=void 0,this.uDt=void 0,this.Ra=void 0,this._Dt=void 0,this.rDt=void 0,this.lDt=void 0,this.SDt=void 0,this.TDt=void 0,this.dDt=void 0,this.cDt=void 0,this.aDt=void 0,this.TL=t,this.jW=i,this.vDt=e,this.IDt=s,this.oDt=n,this.wDt=r,this.Ra=0,this._Dt=Promise.resolve(),this.SDt=[],this.TDt=void 0,this.dDt=()=>{var t,i;if(this.IDt.kx)return;const e=null==(t=this.vDt.eDt)?void 0:t.Ht,s=null==(i=this.vDt.nDt)?void 0:i.Ht,n=oo(this.mDt(e,s),t=>t.yDt);n&&(Wr(this.ADt(n,!0)),this.TL.CL.RL&&this.IDt.oR())},this.cDt=()=>{this.uDt.wn(Do.SM,this.dDt),this.uDt.mn(Do.TM,this.cDt)},this.aDt=()=>{if(this.SDt.unshift(this.oDt.kW),this.SDt=this.SDt.slice(0,3),this.lDt){const t=this.lDt.bDt.yDt;this.oDt.kW20&&([s,n,r]=await lQ(t,i,e)),{localTimeMs:s,serverTimeMs:r-n/2}}async function lQ(t,i,e){const s=zd.Mg(),n=await i.lk({Uk:X.GET,Yu:t,Yg:e}),r=zd.Mg()-s,h=await n.UT(e);return[s,r,1e3*Number(h)]}var fQ=class extends wp{constructor(){super("seek")}},vQ=function(t){return t.Xz="seek",t}({}),_Q=[d.uo,Do.wI,d._y],gQ=class extends Ne{get hR(){return this.pCt}get IP(){return this.DDt&&this.BDt?this.DDt.IP.Mn(this.BDt.IP):this.DDt?this.DDt.IP:this.BDt?this.BDt.IP:ve.iL()}get eDt(){return this.NDt}get nDt(){return this.MDt}get ht(){return this.YL}get rt(){return this.$L}get LDt(){return this.ODt.Qy}get W(){return this.FDt.Qy}get Sx(){return this.pCt?function(t,i,e){var s;const n=null==(s=t.DCt[0])?void 0:s.MP,r=t.TCt;if(void 0===n||void 0===r)return e>0&&et.Rt),i=Jr(this.$L.II,t=>t.Rt),e=this.Rz.pDt(t,i);Wr(this.PDt(e.EDt,e.kDt))}qDt(){if(!this.pCt||"live"!==this.pCt.b0||!this.WDt)return;const t=this.pCt.DCt.filter(t=>t.o===this.pCt.NCt)[0].MP,i=this.WDt.CDt+new Date(this.pCt.ECt).getTime()/1e3;this.UDt.UIt(i,t)}createTracksForPresentation(t){var i,e,s,n;for(const i of null!=(s=t.yCt)?s:[])this.YL.tt(new $j(i,this));for(const i of null!=(n=t.bCt)?n:[])this.$L.tt(new tQ(i,this));null==(i=this.YL.CI(0))||i.wO(!0),null==(e=this.$L.CI(0))||e.wO(!0)}get eR(){return oo([this.zDt,this.GDt].filter(it),t=>t.theolive)}get sR(){return this.zDt}get nR(){return this.GDt}get XDt(){const t=this.UDt.GIt;if(void 0!==t)return t}Tn(){this.jDt=!0,this.QDt()}Xx(){var t;this.jDt=!1,this.KDt().catch(this.e8),"live"===(null==(t=this.hR)?void 0:t.b0)&&(this.YDt(),this.JDt())}YDt(){this.ZDt&&this.ZDt.cancelDownload()}JDt(){this.$Dt&&this.$Dt.cancelDownload()}oR(t){this.m7.Zg(),this.m7=new at,this.w7=Af(i=>this.tBt(t,this.w7,i),this.m7).catch(this.e8)}async tBt(t,i,e){if(i&&await i,await Nc(this.W,e),"live"!==this.pCt.b0)throw new m("The current video source does not support Live playback.");if(ii(e),await this.KDt(),ii(e),this.ZDt&&(this.ZDt.CRt()||this.ZDt.PRt!==(null!=t?t:"now"))){var s;if(this.YDt(),this.DDt){for(;this.DDt.$It;)await Nc(this.DDt.iRt,e);await this.DDt._S(0,1/0)}null==(s=this.ZDt)||s.My(null!=t?t:"now")}if(this.$Dt&&(this.$Dt.CRt()||this.$Dt.PRt!==(null!=t?t:"now"))){var n;if(this.JDt(),this.BDt){for(;this.BDt.$It;)await Nc(this.BDt.iRt,e);await this.BDt._S(0,1/0)}null==(n=this.$Dt)||n.My(null!=t?t:"now")}this.So(new fQ),ii(e),this.w7=void 0,this.QDt()}My(t){this.m7.Zg(),this.m7=new at,this.w7=Af(i=>this.y7(t,this.w7,i),this.m7).catch(this.e8)}async y7(t,i,e){var s,n;i&&await i,await Nc(this.W,e),ii(e),await this.KDt(),ii(e),this.ZDt&&(this.ZDt.CRt()||this.ZDt.PRt!==t)&&this.YDt(),this.$Dt&&(this.$Dt.CRt()||this.$Dt.PRt!==t)&&this.JDt(),this.So(new fQ),ii(e),null==(s=this.ZDt)||s.My(t),null==(n=this.$Dt)||n.My(t),this.w7=void 0,this.QDt()}PDt(t,i){var e,s;return(null==(e=this.ZDt)?void 0:e.kot)===i&&(null==(s=this.$Dt)?void 0:s.kot)===t?Promise.resolve():(this.iBt.Zg(),this.iBt=new at,this.eBt=Af(e=>this.sBt(t,i,this.eBt,e),this.iBt).catch(this.e8),this.eBt)}async sBt(t,i,e,s){var n,r;e&&await e,await Nc(this.ODt.Qy,s),ii(s),await this.KDt(),ii(s),await this.nBt(t,i),await this.rBt(t,i),ii(s);for(const i of null!=(r=null==t||null==(n=t.Ht)?void 0:n._Ct)?r:[])this.hBt.Mgt({nit:i.channel,rit:i.language,Th:i.label});this.eBt=void 0,this.QDt()}async nBt(t,i){var e,s,n;const r=null!=(n=this.XDt)?n:"now";if((null==(e=this.ZDt)?void 0:e.kot)!==i){var h;const t=this.ZDt&&!this.ZDt.CRt(),e=null==(h=this.ZDt)?void 0:h.PRt;if(this.ZDt&&(await this.ZDt.zg(),this.ZDt=void 0),this.DDt&&await this.DDt.iRt,i){var o,a;const s=null!=(a=null==(o=this.DDt)?void 0:o.IP)?a:ve.iL(),n=t?e:s.An(s.V-1);this.ZDt=new Dj(i,this.nV,this._dt),this.ZDt.wn(wj.dRt,t=>this.oBt(Ci.Dk,t)),this.ZDt.My(null!=n?n:r)}}if((null==(s=this.$Dt)?void 0:s.kot)!==t){var u;const i=this.$Dt&&!this.$Dt.CRt(),e=null==(u=this.$Dt)?void 0:u.PRt;if(this.$Dt&&(await this.$Dt.zg(),this.$Dt=void 0),this.BDt&&await this.BDt.iRt,t){var c,d;const s=null!=(d=null==(c=this.BDt)?void 0:c.IP)?d:ve.iL(),n=i?e:s.An(s.V-1);this.$Dt=new Dj(t,this.nV,this._dt),this.$Dt.wn(wj.dRt,t=>this.oBt(Ci.Bk,t)),this.$Dt.My(null!=n?n:r)}}}async rBt(t,i){const e=function(t,i,e,s,n){const r=iQ(t,null==i?void 0:i.Ht.JRt.JRt,null==e?void 0:e.Ht.JRt.JRt,s),h=CG(r),o=[];i&&o.push({qT:i.oQ});e&&o.push({qT:e.oQ});return{Km:Zr.wV,L4:o,aq:h,X4:n&&!s}}(this.Ac.contentProtection,i,t,this.TL.CL.RL,this.Ac.useManagedMediaSource);if(this.iq&&this.iq.TZ(e)){var s,n;const t=!(null==(s=this.ZDt)?void 0:s.CRt());if(this.DDt&&t){for(;this.DDt.$It;)await this.DDt.iRt;await this.DDt.AQ()}const i=!(null==(n=this.$Dt)?void 0:n.CRt());if(this.BDt&&i){for(var r,h;null==(r=this.BDt)?void 0:r.$It;)await this.BDt.iRt;await(null==(h=this.BDt)?void 0:h.AQ())}await this.iq.EZ(e)}else{this.YDt(),this.JDt(),this.DDt&&(await this.DDt.zg(),this.DDt=void 0),this.BDt&&(await this.BDt.zg(),this.BDt=void 0),this.TL.x9();try{await this.TL.hr(),this.iq=await this.TL.Un(e),this.FDt.Xy(),this.iq.Q3&&this.ZDt&&(this.iq.Q3.wn(Zs.lZ,this.Rs),this.DDt=new pj(this.iq.Q3,this.TL,i,this.hBt)),this.iq.K3&&this.$Dt&&(this.iq.K3.wn(Zs.lZ,this.Rs),this.BDt=new pj(this.iq.K3,this.TL,t,this.hBt)),"live"===this.pCt.b0&&this.iq.C4(1/0)}finally{this.TL.I9()}}}QDt(){!this.jDt||this.w7||this.eBt||this.aBt||this.uBt||(this.Rz.Tn(),this.cBt=new at,this.$Dt&&this.BDt&&(this.aBt=this.dBt(this.$Dt,this.BDt,this.cBt.Yg).catch(this.e8)),this.ZDt&&this.DDt&&(this.uBt=this.dBt(this.ZDt,this.DDt,this.cBt.Yg).catch(this.e8)))}async KDt(){this.Rz.Xx(),this.cBt&&(this.cBt.Zg(),this.cBt=void 0),this.aBt&&(await this.aBt,this.aBt=void 0),this.uBt&&(await this.uBt,this.uBt=void 0)}async dBt(t,i,e){for(await this.W;t.$It;)await Nc(t.iRt,e);for(;i.$It;)await Nc(i.iRt,e);if(!t.CRt()){const e=zd.Mg()/1e3,s="now"===t.PRt,{initialization:n,data:r,metadata:h}=await t.DRt(),o={Km:Po.vZ,ck:n},a=r?{Km:Po.vZ,ck:r}:void 0,u=i.IP;!zd.Zs.wp&&!this.TL.CL.RL&&h&&u.An(u.V-1)>h.xet&&await i._S(h.xet,1/0),await i.z2(o),a&&await i.H2(a,h,t.kot);const c=i.IP.UM(u);s&&c.V>0&&this.UDt.OIt(e,c.An(c.V-1))}for(;!t.ERt;){ii(e);const s=t.URt();await Nc(i.appendStream(s,t),e)}}async zg(){this.rV.Zg(),this.Dpt&&await this.Dpt.catch(Ct),this.w7&&(this.m7.Zg(),this.YDt(),this.JDt(),await this.w7.catch(Ct)),this.eBt&&(this.iBt.Zg(),this.YDt(),this.JDt(),await this.eBt.catch(Ct)),await this.KDt(),this.ZDt&&await this.ZDt.zg(),this.$Dt&&await this.$Dt.zg(),this.ZDt=void 0,this.$Dt=void 0,this.FDt.Zg(),this.ODt.Zg(),this.iq&&(await this.TL.hr(),this.iq=void 0),this.DDt=void 0,this.BDt=void 0,this.TL.mn(Do.TM,this.IL),this.TL.mn(_Q,this.updateActiveQualities),this.YL.hr(),this.NDt=void 0,this.$L.hr(),this.MDt=void 0,this.pCt=void 0,this.WDt&&(this.WDt.zg(),this.WDt=void 0),this.jDt=!1}constructor(t,i,e,s,n,r,h,o,a,u,c){super(),this.Ac=void 0,this.nV=void 0,this.HDt=void 0,this.TL=void 0,this.UDt=void 0,this._dt=void 0,this.hBt=void 0,this.jDt=!1,this.lBt=!1,this.Rz=void 0,this.YL=new rs,this.$L=new rs,this.fBt=void 0,this.NDt=void 0,this.MDt=void 0,this.pCt=void 0,this.ODt=new pa,this.WDt=void 0,this.GDt=void 0,this.zDt=void 0,this.jW=void 0,this.iq=void 0,this.Dpt=void 0,this.FDt=new pa,this.rV=new at,this.eBt=void 0,this.iBt=new at,this.w7=void 0,this.m7=new at,this.ZDt=void 0,this.DDt=void 0,this.uBt=void 0,this.$Dt=void 0,this.BDt=void 0,this.aBt=void 0,this.cBt=void 0,this.IL=()=>{this.lBt=!0},this.updateActiveQualities=()=>{var t,i;const e=this.TL.MP,s=null==(t=this.DDt)?void 0:t.YIt(e),n=null==(i=this.BDt)?void 0:i.YIt(e);if(this.NDt!==s&&(this.NDt=s,s))for(const t of this.YL.II)t.tDt(s);if(this.MDt!==n&&(this.MDt=n,n))for(const t of this.$L.II)t.tDt(n)},this.oBt=(t,i)=>{const e=i.data;if(e.Km===Ur.vRt){const{gRt:i,pRt:n,_Rt:r,mRt:h}=e;if(this.WDt){const e=this.WDt.Oyt,s=this.TL.MP;if(this.lBt&&0!==s){const h={theolive:e-i+r-s,engine:n,distribution:_.max(e-(i+n),0),player:_.min(r-s,this.jW.nL.forceSeekOffset)};t===Ci.Dk?(this.GDt=h,this.UDt.qIt(this.WDt.CDt+i,r)):(this.zDt=h,this.UDt.HIt(this.WDt.CDt+i,r))}}var s;if(h)null!=this.fBt||(this.fBt=this.TL.tI(Ao.VU,"timecode","timecode",void 0,!1,nh.DEFAULT,!1,void 0)),this.fBt.tV(new _h(r,r,h,!1,void 0)),St(this.fBt,null!=(s=this.TL.IP.Tn(0))?s:-1)}this.So(i)},this.e8=t=>{D(t)||(this.Xx(),this.So(new Pi(new Ga(Vo.MEDIA_LOAD_ERROR,t.message))))},this.Ac=t,this.HDt=i,this.TL=e,this.nV=n,this.UDt=r,this.Rz=new oQ(e,h,this,a,s,c),this._dt=o,this.hBt=u,this.jW=h,this.TL.wn(Do.TM,this.IL),this.TL.wn(_Q,this.updateActiveQualities)}};r();var pQ=class extends VT{NL(){const t=this.TL.IP;return 0===t.V?0:t.An(t.V-1)-this.TL.MP}oR(){this.oa.oR()}ML(t,i,e){if(t>e+2){const e=t-i;if(e<=this.lastAmountToSeekForward&&!this.oa.kx)return this.oa.MP+=e,this.lastAmountToSeekForward=0,!0;this.lastAmountToSeekForward=e}else this.lastAmountToSeekForward=0;return!1}cL(){return vj(super.cL())}LL(){return!zd.Zs.pp}constructor(t,i,e){super(t,i,e),this.lastAmountToSeekForward=0}},mQ=[d.Jw,d.Qw,d._y,d.Bw,d.Kw,d.gy,d.Rw,d.Lw,d.Nw,d.Pw,d.Ew],wQ=class extends Ne{OI(){this.TL.wn(mQ,this.Rs),this.TL.wn(Do.TM,this.GG),this.TL.wn([d.uo,d.jw],this.vBt),this.TL.wn(Mc.ma,this._Bt),this.TL.wn(d._y,this.bd),this.bq.wn(K,this.Rs)}MI(){this.TL.mn(mQ,this.Rs),this.TL.mn(Do.TM,this.GG),this.TL.mn([d.uo,d.jw],this.vBt),this.TL.mn(Mc.ma,this._Bt),this.TL.mn(d._y,this.bd),this.bq.mn(K,this.Rs)}get ht(){return this.YL}get rt(){return this.$L}get hR(){var t,i;return null==(i=this.vDt)||null==(t=i.hR)?void 0:t.hR}get Mx(){return this.TL.Mx}set Mx(t){this.TL.Mx=t}get Vx(){return!1}set Vx(t){}get hq(){return this.oq}jx(){return!1}Hx(){return this.TL.Ma}Aa(){return this.TL.mq}tI(t){return this.TL.wq(t)}we(){this.TL.we()}be(){return this.TL.be()}Yx(){}Jx(){}Qx(){}Kx(){}get $P(){return this.TL.$P}set $P(t){this.TL.$P=t}get MP(){var t;return null!=(t=this.gBt)?t:this.TL.MP}set MP(t){this.OP(t)}OP(t,i){this.m7.Zg(),this.m7=new at,this.w7=Af(i=>this.y7(t,i,this.w7),this.m7)}get CP(){const t=this.pBt();if(t)return new Date(t.getTime()+1e3*this.MP)}set CP(t){const i=this.pBt();t&&i&&(this.MP=i.getTime()-t.getTime())}pBt(){const t=this.hR;if(!t)return;const i=new Date(t.creationDate).getTime();let e=NaN;for(const i of t.presentations)i.currentTime&&(e=i.currentTime.value/(i.currentTime.scale||1)*1e3);return S(e)?void 0:new Date(i-e)}get bt(){return this.Ac}get ux(){return this.TL.ux}set ux(t){this.TL.ux=t}get ct(){const t=this.TL.ct;return t===Xl?1/0:t}get UP(){return!1}get WP(){return this.ZW}get lt(){return this.JW}get zP(){return this.mBt}get jP(){}get KP(){return!1}get JP(){return Mo({},{iO:0,eO:0,sO:0,nO:0,rO:0,hO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.TL.ZP())}get sx(){return!0}get kx(){return this.Sz}get nq(){}get nt(){return this.Gl}get Rx(){return this.TL.Rx}get Bx(){return this.TL.Bx}get IP(){return this.ikt._s()}get ikt(){return this.vDt?this.vDt.IP:ve.iL()}get _x(){return this.TL._x._s()}get Sx(){var t,i;return null!=(i=null==(t=this.vDt)?void 0:t.Sx._s())?i:ve.iL()._s()}get hx(){return this.$et}get rR(){return!0}get Fx(){return this.Cz}get XDt(){var t;return null==(t=this.vDt)?void 0:t.XDt}get BL(){if(this.hx)return;if(!this.lBt)return;const t=this.MP,i=this.UDt.XIt(t);if(void 0===i)return;const e=this.ikt;let s=0;if(e.V>0){const i=e.An(e.V-1);s=_.max(i-t,0)}return _.max(i,s)}get eR(){var t;return null==(t=this.vDt)?void 0:t.eR}get sR(){var t;return null==(t=this.vDt)?void 0:t.sR}get nR(){var t;return null==(t=this.vDt)?void 0:t.nR}get Ax(){return this.TL.Ax}get mx(){return this.wBt}set mx(t){this.wBt=t,this.yBt()}async yBt(){this.wBt!==q.lz&&this.vDt&&(this.vDt.Un(),this.wBt!==q.OL&&this.wBt!==q.TW||(await this.vDt.LDt,"vod"===this.vDt.hR.b0&&this.vDt.Tn()))}async Ta(t,i,e){if(ii(e),await this.hr(),ii(e),!rk(t))return this.ZW=new Ga(Vo.SOURCE_INVALID,"HESP source incorrectly configured"),this.JW=P(this.ZW),this.ABt(this.ZW),Promise.resolve();const s=t;this.Ac=s;const n=new YX(this.nV);this.bBt=this.SBt(t),this.jW=new pQ(this,this.TL,this.bBt),this.jW.Rt=!0,this.jW.wn("latencyrecoveryseek",this.Rs),this.Fx.Ea(this.jW),this.vDt=new gQ(s,n,this.TL,this.oq,this.nV,this.UDt,this.jW,this._dt,this,this.hBt,this.Rz),this.vDt.wn(d.Ww,this.Rs),this.vDt.wn(Mc.ma,this.TBt),this.YL.BI=this.vDt.ht,this.$L.BI=this.vDt.rt,this.lq.IW(t.contentProtection),Wr(this.yBt())}Px(t,i,e,s){return Promise.resolve()}xx(){return Promise.resolve()}SBt(t){return t.latencyConfiguration?t.latencyConfiguration:_j()}async Gx(){var t;if(!this.vDt)return;this.$et=!1,this.vDt.Un(),await this.vDt.W,this.So(new Tc(this.MP));const i=this.vDt.ww(vQ.Xz);this.oR(),await i,this.vDt.Tn(),await this.TL.Gx(),null==(t=this.jW)||t.Tn()}zx(){var t;this.vDt&&(this.$et=!0,this.So(new hl(this.MP)),this.vDt.Xx(),null==(t=this.jW)||t.Xx(),this.TL.zx())}oR(){if(this.NEt)throw new m("Cannot seek while resetting");this.m7.Zg(),this.m7=new at,this.w7=Af(t=>this.tBt(this.w7,t),this.m7)}async y7(t,i,e){if(this.NEt)throw new m("Cannot seek while resetting");let s=t;if(this.kBt(s),this.Sx.length>0&&(s=ve.jn(this.Sx).DM(s),this.kBt(s)),this.vDt){e&&(await e.catch(Ct),ii(i));try{const t=this.TL.ww(d.Zw,i);this.TL.My(s),this.vDt.My(s),await t}catch(t){throw sa(t),this.vDt.Xx(),this.EBt(),t}this.PBt()}}async tBt(t,i){this.So(new wp("golive"));const e=this.XDt;if(this.kBt(e),this.vDt){t&&(await t.catch(Ct),ii(i));try{let t,s=this.jW.nL.targetOffset;if(await this.vDt.LDt,e&&s>=1){if(!this.jW.LL()){s-=_.min(1,.5*s)}t=e-s}else t=this.XDt?this.XDt-.2:void 0;for(this.vDt.oR(t);this.ikt.V>0;)await this.vDt.ww(Zs.lZ,i);const n=this.ikt;for(;0===this.ikt.UM(n).V;)await this.vDt.ww(Zs.lZ,i);t=this.ikt.Tn(this.ikt.V-1),t=this.xBt(t),this.kBt(t);const r=this.TL.ww(d.Zw,i);this.TL.My(t,!0),await r}catch(t){var s;if(D(t))throw null==(s=this.jW)||s.Tn(),t;throw this.vDt.Xx(),await this.vDt.VDt(),this.EBt(),t}this.PBt()}}kBt(t){this.Sz=!0,this.gBt=t,this.So(new F(this.MP))}PBt(){this.Sz&&(this.gBt=void 0,this.Sz=!1,this.So(new Es(this.MP)))}EBt(){this.gBt=void 0,this.Sz=!1}xBt(t){return t}IBt(){var t;null==(t=this.vDt)||t.Xx()}ABt(t){this.So(new Pi(t)),this.IBt()}async MEt(t,i,e){var s;ii(e),null==(s=this.jW)||s.Xx(),t&&await t.catch(Ct),i&&await i.catch(Ct),await this.hBt.hr(),this.vDt&&(await this.vDt.zg(),this.vDt=void 0),ii(e),await this.TL.hr(),ii(e),this.TL.Aq(),this.$L.hr(),this.YL.hr(),this.EBt(),this.bq.hr(),this.UDt.hr(),this.ZW=void 0,this.JW=void 0,this.$et=!0,this.lBt=!1,this.Ac=void 0,this.NEt=void 0,this.bBt=void 0}hr(){return this.m7.Zg(),this.m7=new at,this.RBt.Zg(),this.RBt=new at,this.NEt=this.MEt(this.w7,this.NEt,this.RBt.Yg).catch(t=>yf(t)),this.NEt}async kn(){var t,i;this.MI(),this.bq.kn(),this.kq.zg(),this.Ac&&await this.hr(),this.Vo(),this.TL.Eq=void 0,null==(t=this.jW)||t.mn("latencyrecoveryseek",this.Rs),null==(i=this.jW)||i.zg(),await this.hBt.kn(),this.Gl.kn(),this.YL.kn(),this.$L.kn()}constructor(t,i,e,s,n){var r;super(),this.TL=void 0,this.nV=void 0,this.oq=void 0,this.kq=void 0,this.bq=void 0,this.jW=void 0,this.lq=void 0,this.UDt=void 0,this.Cz=void 0,this.mBt=void 0,this._dt=void 0,this.Rz=void 0,this.Ac=void 0,this.vDt=void 0,this.Sz=!1,this.gBt=void 0,this.m7=new at,this.w7=void 0,this.NEt=void 0,this.RBt=new at,this.$et=!0,this.lBt=!1,this.YL=new He,this.$L=new He,this.Gl=void 0,this.hBt=void 0,this.ZW=void 0,this.JW=void 0,this.wBt=q.lz,this.bBt=void 0,this.bd=()=>{const t=this.IP;t.length>0&&this.hBt.qU(t.start(0))},this.vBt=()=>{this.TL.hx!==this.$et&&(this.TL.hx?this.zx():this.Gx().catch(Ct))},this.GG=()=>{this.lBt=!0},this.TBt=t=>{this.ZW=t.errorObject,this.JW=P(this.ZW),this.ABt(this.ZW)},this._Bt=t=>{this.ZW=Ok(t.lt),this.JW=t.lt,this.ABt(this.ZW)},this.TL=t,this.kq=new dx(this,this.TL),this.bq=new bs(this.kq,!0),this.nV=i,this.Rz=e,this.oq=new hj(e.WY,e.kY.EW),this.lq=new ya(i),this.TL.Eq=this.lq,n.allowNativeFullscreen?this.hBt=new TW(this.TL):this.hBt=new kW(this.TL),this.Gl=new Yu([this.hBt.Z]),this.UDt=new oj,this.mBt=new JX(this),this.Cz=s,this._dt=Mo({},n.retryConfiguration,{maxRetries:null!=(r=n.retryConfiguration.maxRetries)?r:3}),this.OI()}},yQ=class extends wQ{So(t){if(this.CBt){if(t.type===d.Zw)return void this.DBt();if(t.type===Do.SM||t.type===d.$w||t.type===Do.TM)return void this.BBt.push(t)}super.So(t)}DBt(){this.CBt=!1,void 0!==this.NBt&&zd.Lg(this.NBt);const t=Jr(this.BBt,t=>t.type===Do.TM);t&&super.So(t),Yo(this.BBt)}Wx(){if(PU(this.TL))return this.TL.Wx()}async hr(){this.MBt=!1,this.DBt(),await super.hr()}async kn(){h.removeEventListener("visibilitychange",this.LBt),this.DBt(),await super.kn(),await this.TL.zg(),await this.xq.Pq(this.OBt)}xBt(t){return Qt.X_&&Qt.Q_>=15&&Qt.Kv?t+.25:t}constructor(t,i,e,s,n,r){super(t,i,e,s,r),this.xq=void 0,this.OBt=void 0,this.MBt=!1,this.CBt=!1,this.BBt=[],this.NBt=void 0,this.LBt=()=>{const t=this.$P||0===this.Mx;"hidden"!==h.visibilityState||this.hx||!t||this.Aa().XL?"visible"===h.visibilityState&&this.MBt&&(this.CBt=!0,this.NBt=zd.Og(()=>{for(const t of this.BBt)super.So(t);this.NBt=void 0,this.CBt=!1},2e3),Wr(this.Gx()),this.MBt=!1):(this.zx(),this.MBt=!0)},this.xq=n,this.OBt=t,Qt.Cg&&h.addEventListener("visibilitychange",this.LBt)}};r();var AQ=class{get Kq(){return V._R}async Xq(t,i){return function(t){if(!t)return!1;const i=t.toLowerCase();return Vh(i,Ba.vR)||Vh(i,Ba._R)}(t.type)}async jq(t){return kT(t)}};cs(new class extends AQ{PR(t,i,e,s,n,r,h){const o=new Ss(i),a=o.Gq(Ci.Bk);return new yQ(a,e,n,r,o,s)}Xq(t,i){return zd.dP&&VA?Qt.w_||Qt.S_||Qt.D_?Promise.resolve(!1):za(t.useManagedMediaSource)?super.Xq(t,i):Promise.resolve(!1):Promise.resolve(!1)}Qq(){return!1}}),r(),r();var bQ=class extends wQ{Wx(){if(PU(this.TL))return this.TL.Wx()}async kn(){await super.kn(),await this.xq.Pq(this.TL)}constructor(t,i,e,s,n,r){super(t,i,e,s,r),this.xq=void 0,this.xq=n}};Qt.X_&&Qt.ru&&cs(new class extends AQ{get Kq(){return V.bW}async Xq(t,i){var e,s;if(Qt.IS_IOS_CHROME)return!1;const n=await super.Xq(t,i);var r;if(null==(r=null==(s=gr())||null==(e=s.canPlayType)?void 0:e.call(s,Ba.dR))||!r||!n||!("serviceWorker"in od))return!1;try{const t=od.serviceWorker.ready;return await Sf(t,1e3),!0}catch(t){return!1}}async jq(t){return!!t.fairplay&&await super.jq(t)}PR(t,i,e,s,n,r,h){if(t instanceof HTMLDivElement){const t=i.dst(Ci.Bk);return new bQ(t,e,n,r,i,s)}throw new Ga(Vo.CONFIGURATION_ERROR,"Container Div element expected.")}Qq(){return!1}}),r(),r(),r(),r();var SQ="theo_live_user_id",TQ=class{incrementSequenceNumber(){this.yb+=1}get sequenceNumber(){return this.yb}constructor(t){this.externalId=void 0,this.id=void 0,this.userId=void 0,this.yb=void 0,this.externalId=t,this.id=FC(),this.userId=kQ(),this.yb=0}};function kQ(){try{const t=localStorage.getItem(SQ);if(t)return t;const i=FC();return localStorage.setItem(SQ,i),i}catch(t){return FC()}}function EQ(t){var i;return{hespSrc:t.hespSrc,type:"theo.live",hlsSrc:t.hlsSrc,maxMobileBitrate:t.maxMobileBitrate,targetLatency:null==(i=t.metadata.customization)?void 0:i.targetLatency,contentProtection:t.drmConfig?t.drmConfig:void 0}}function PQ(t){const{integration:i,widevine:e,playready:s,fairplay:n}=t;return Mo({integration:i},e&&{widevine:{licenseAcquisitionURL:e.licenseUrl}},s&&{playready:{licenseAcquisitionURL:s.licenseUrl}},n&&{fairplay:{licenseAcquisitionURL:n.licenseUrl,certificateURL:n.certificateUrl}})}function xQ(t,i){return{id:t.id,name:t.name,deleted:"deleted"===t.status,targetLatency:t.source.targetLatency,maxMobileBitrate:t.source.maxMobileBitrate,endpoints:[{hespSrc:t.source.hespSrc,hlsSrc:t.source.hlsSrc,weight:1,priority:1,contentProtection:t.source.contentProtection},t.fallback&&i?{hespSrc:t.fallback.hespSrc,hlsSrc:t.fallback.hlsSrc,weight:1,priority:2,contentProtection:t.fallback.contentProtection}:void 0].filter(it)}}function IQ(t){return void 0!==t.mode}r(),r(),r(),r();var kn=function(t){return t.STARTING="s",t.PLAYING="p",t.SEEKING="k",t.REBUFFERING="r",t.PAUSED="a",t.ENDED="e",t.QUIT="q",t}({}),RQ=function(t){return t.MANIFEST="m",t.AUDIO="a",t.VIDEO="v",t.OTHER="o",t}({});function CQ(t){return 100*_.round(t/100)}function DQ(t){const i=t.LP(),e=t.RP();for(let t=0;tt.Rt)}function BQ(t){return oo(t.KI.II,t=>t.kW)}function NQ(t){return lf(t.KI.II,t=>t.kW)}r(),r();var Yi=class t{static starting(i,e,s){return new t(kn.STARTING,i,e,s)}static playing(i){return new t(kn.PLAYING,i)}static seeking(i,e){return new t(kn.SEEKING,i,e)}static rebuffering(i,e){return new t(kn.REBUFFERING,i,e)}static paused(i){return new t(kn.PAUSED,i)}static ended(i){return new t(kn.ENDED,i)}static quit(i){return new t(kn.QUIT,i)}get ct(){return Date.now()-this.FBt}UBt(){const t=this.oa.oX.kY.kW,i=this.oa.Fx.BL,e=DQ(this.oa);t>0&&void 0!==e&&void 0!==i&&(this.VBt+=1,this.HBt=this.WBt(this.HBt,e),this.qBt=this.WBt(this.qBt,1e3*this.oa.Fx.Cd.targetOffset),this.rq=this.WBt(this.rq,1e3*i),this.zBt=this.WBt(this.zBt,t/1e3))}WBt(t,i){return t+(i-t)/this.VBt}PR(){const t={sta:this.Vp,ts:this.FBt,"theo-vt":this.GBt,"theo-at":this.XBt,"theo-d":this.ct,"theo-r":this._f,"theo-e":this.JW};return this.VBt>0?Mo({},t,{bl:CQ(this.HBt),tbl:CQ(this.qBt),ltc:CQ(this.rq),mtp:CQ(this.zBt),"theo-w":this.VBt}):t}jBt(){return new t(this.Vp,this.oa,this._f)}constructor(t,i,e,s){var n,r,h,o;this.Vp=void 0,this.FBt=Date.now(),this.HBt=0,this.qBt=0,this.GBt=void 0,this.XBt=void 0,this.rq=0,this.zBt=0,this.VBt=0,this._f=void 0,this.JW=void 0,this.oa=void 0,this.Vp=t,this.oa=i,this.GBt=null==(r=Rt(this.oa.rt))||null==(n=r.XI)?void 0:n.o,this.XBt=null==(o=Rt(this.oa.ht))||null==(h=o.XI)?void 0:h.o,this._f=e,this.JW=s}},MQ=class{QBt(){var t;const i=this.oa.Fx.BL,e=DQ(this.oa),s=this.oa.oX.kY.kW;return LQ({bl:void 0!==e?CQ(e):void 0,tbl:CQ(1e3*this.oa.Fx.Cd.targetOffset),ltc:void 0!==i?CQ(1e3*i):void 0,mtp:void 0!==s?CQ(s/1e3):void 0,sta:null==(t=this.KBt)?void 0:t.Vp,su:!this.lBt||void 0,"theo-sq":this.YBt.sequenceNumber})}JBt(t){var i,e;const s=function(t,i){switch(i){case RQ.VIDEO:return Rt(t.rt);case RQ.AUDIO:return Rt(t.ht)}}(this.oa,t);return LQ({br:(null==s||null==(i=s.XI)?void 0:i.kW)?CQ((null==s||null==(e=s.XI)?void 0:e.kW)/1e3):void 0,ot:t,tb:s?CQ(NQ(s).kW/1e3):void 0,lb:s?CQ(BQ(s).kW/1e3):void 0})}ZBt(){return LQ({"theo-cw":this.oa.xe.clientWidth,"theo-ch":this.oa.xe.clientHeight,"theo-m":this.oa.$P,"theo-vo":_.ceil(100*this.oa.Mx)})}$Bt(){var t;return LQ({sf:OQ(this.oa.bt),sid:this.YBt.id,st:"l",v:2,"theo-eid":null==(t=this.YBt.externalId)?void 0:t.substring(0,128),"theo-cn":this.tNt.name.substring(0,128),"theo-v":"10.0.0","theo-t":"web","theo-u":this.YBt.userId})}iNt(){const t={"CMCD-States":btoa(JSON.stringify(this.eNt))};return this.eNt=[],t}sNt(t){this.KBt&&this.eNt.push(this.KBt.PR()),this.KBt=t}async nNt(){this.KBt&&(this.eNt.push(this.KBt.PR()),this.KBt=void 0),this.eNt.push(Yi.quit(this.oa).PR());const t=Mo({},this.iNt(),{"CMCD-Session":this.$Bt()}),i=await this.oa.SP.lk({Yu:this.rNt,fk:t,Qk:!0});await i.ck()}destroy(){this.hNt(),s.removeEventListener("beforeunload",this.hNt),this.oa.mn(Do.TM,this.IL),this.oa.mn(Do.SM,this.xL),this.oa.mn(d.jw,this.oNt),this.oa.zP.mn("latencyrecoveryseek",this.aNt),this.oa.zP.mn("golive",this.uNt),this.oa.rt.mn(Vt.eI,this.GW),this.oa.ht.mn(Vt.eI,this.GW),this.oa.rt.II.forEach(t=>t.mn(Te.TI,this.ih)),this.oa.ht.II.forEach(t=>t.mn(Te.TI,this.ih)),this.oa.tnt.removeEventListener("intenttofallback",this.cNt),this.oa.tnt.removeEventListener("distributionloadstart",this.dNt),this.oa.tnt.removeEventListener("distributionoffline",this.lNt),this.oa.oX.wY(this.fNt),zd.vm(this.vNt)}constructor(t,i,e){this.oa=void 0,this.tNt=void 0,this.rNt=void 0,this.vNt=void 0,this.YBt=void 0,this.eNt=[],this.KBt=void 0,this.lBt=!1,this.nX=!1,this.cNt=t=>{var i,e,s;this.sNt(Yi.starting(this.oa,"fallback",null!=(s=null==(i=t.reason)?void 0:i.message)?s:null==(e=this.oa.qP())?void 0:e.message))},this.dNt=()=>{this.sNt(Yi.starting(this.oa,"loadChannel"))},this.lNt=()=>{this.sNt(Yi.ended(this.oa))},this.GW=t=>{t.Ht.wn(Te.TI,this.ih)},this.ih=()=>{var t,i,e,s;const n=null==(i=Rt(this.oa.rt))||null==(t=i.XI)?void 0:t.o,r=null==(s=Rt(this.oa.ht))||null==(e=s.XI)?void 0:e.o;n&&r&&(this.KBt&&this.KBt.Vp===kn.PLAYING&&this.KBt.GBt===n&&this.KBt.XBt===r||this.sNt(Yi.playing(this.oa)))},this.IL=()=>{this.lBt=!0,this.nX=!1,this.sNt(Yi.playing(this.oa))},this.aNt=()=>{this.lBt&&!this.nX&&(this.nX=!0,this.sNt(Yi.seeking(this.oa,"latencyRecovery")))},this.uNt=()=>{this.lBt&&!this.nX&&(this.nX=!0,this.sNt(Yi.seeking(this.oa,"goLive")))},this.xL=()=>{this.oa.kx||this.sNt(Yi.rebuffering(this.oa,"visible"===h.visibilityState?void 0:"invisible"))},this.oNt=()=>{this.sNt(Yi.paused(this.oa))},this.fNt=t=>{const i=zd.Dh(t.url),e=function(t){const{pathname:i}=t;if(Ju(i,"manifest.json"))return RQ.MANIFEST;if(Ho(i,"/video/"))return RQ.VIDEO;if(Ho(i,"/audio/"))return RQ.AUDIO;return RQ.OTHER}(i);if(e===RQ.OTHER)return;this.YBt.incrementSequenceNumber();let s=Mo({},t.headers,{"CMCD-Request":this.QBt(),"CMCD-Object":this.JBt(e),"CMCD-Status":this.ZBt(),"CMCD-Session":this.$Bt()});e===RQ.VIDEO&&!Ju(i.pathname,".hspi")&&this.KBt&&(this.sNt(this.KBt.jBt()),s=Mo({},s,this.iNt())),t.redirect(Mo({},t,{headers:s}))},this.hNt=()=>{Wr(this.nNt())},this.oa=t,this.tNt=i,this.YBt=e;const n=i.endpoints[0],r=(null==n?void 0:n.hespSrc)||(null==n?void 0:n.hlsSrc)||"";this.rNt=zd.Dh("bye",r).href,s.addEventListener("beforeunload",this.hNt),this.oa.wn(Do.TM,this.IL),this.oa.wn(Do.SM,this.xL),this.oa.wn(d.jw,this.oNt),this.oa.zP.wn("latencyrecoveryseek",this.aNt),this.oa.zP.wn("golive",this.uNt),this.oa.oX.gY(this.fNt),this.oa.rt.wn(Vt.eI,this.GW),this.oa.ht.wn(Vt.eI,this.GW),this.oa.tnt.addEventListener("intenttofallback",this.cNt),this.oa.tnt.addEventListener("distributionloadstart",this.dNt),this.oa.tnt.addEventListener("distributionoffline",this.lNt),this.KBt=Yi.starting(this.oa,"loadchannel"),this.vNt=zd.fm(()=>{var t;null==(t=this.KBt)||t.UBt()},1e3)}};function LQ(t){return w.keys(t).map(i=>function(t,i){switch(typeof i){case"boolean":return i?t:t+"=false";case"number":return t+"="+i;case"string":return t+'="'+i+'"';default:return}}(i,t[i])).filter(Boolean).sort().join(",")}function OQ(t){if(t)return t.type===Ba.dR||t.type===Ba.lR?"h":t.type===Ba._R?"e":void 0}var FQ=class extends Ga{constructor(t,i,e){super(t,"Could not load channel with id "+i+": "+e),this.channelId=void 0,this.reason=void 0,this.channelId=i,this.reason=e}},UQ=class extends FQ{constructor(t){super(Vo.THEO_LIVE_CHANNEL_NOT_FOUND,t,"The channel could not be found")}},VQ=class extends FQ{constructor(t){super(Vo.THEO_LIVE_CHANNEL_NOT_FOUND,t,"This account has been locked")}},HQ=class extends FQ{constructor(t){super(Vo.THEO_LIVE_CHANNEL_NOT_FOUND,t,"The channel got deleted")}},WQ=class{Bgt(t){const i=this._Nt.get(t);if(i)return i;const e=new qQ(t,this.nV,this.gNt);return this._Nt.set(t,e),e}constructor(t,i){this.nV=void 0,this.gNt=void 0,this._Nt=void 0,this.nV=t,this.gNt=i,this._Nt=new Map}},qQ=class{get pNt(){return ku()-this.mNt>36e5}er(){this.wNt=!1,this.mNt=ku(),this.yNt=this.RSt(),this.yNt.catch(()=>this.wNt=!0)}async RSt(){for(const i of this.gNt.discoveryUrls){const e=await this.ANt(this.hS,i,this.bNt);if(e){if(IQ(e)){const{mode:s,status:n,fallback:r,metadata:h}=e;if("locked"===s)throw new VQ(this.hS);if("deleted"===n)throw new HQ(this.hS);var t;return xQ({id:this.hS,name:h.name,mode:s,status:n,source:EQ(e),fallback:r?await this.SNt(r,i,this.bNt):void 0,insights:null==h?void 0:h.insights,enhancedLogging:null==h?void 0:h.enhancedLogging,customization:null==h?void 0:h.customization,sseEndpoint:e.sseEndpoint},null==(t=this.gNt.fallbackEnabled)||t)}return e}}throw new UQ(this.hS)}async SNt(t,i,e){if("theo.live"!==t.type)return{hespSrc:t.src,type:t.type};const s=await this.ANt(t.src,i,e);return s?EQ(s):void 0}async ANt(t,i,e){try{const s=zd.Dh(t,i);s.searchParams.set("osName",function(){const t=zd.Zs.ap;if("ios"===t||"macos"===t)return"apple";return t}()),s.searchParams.set("deviceType",zd.Zs.cp),s.searchParams.set("sdkType","web");const n=await this.nV.lk({Yu:s.toString(),fk:e});return await n.FT()}catch(t){return}}get TNt(){return(this.wNt||this.pNt)&&this.er(),this.yNt}constructor(t,i,e){var s;this.hS=void 0,this.nV=void 0,this.gNt=void 0,this.mNt=void 0,this.yNt=void 0,this.wNt=void 0,this.bNt=void 0,this.hS=t,this.nV=i,this.gNt=e,this.bNt=new Ra,this.gNt.discoveryHeader&&this.bNt.append("x-theolive-discovery",this.gNt.discoveryHeader),this.bNt.set("CMCD-Session",LQ({sid:this.gNt.sessionId,st:"l",v:2,"theo-eid":null==(s=this.gNt.externalSessionId)?void 0:s.substring(0,128),"theo-v":"10.0.0","theo-t":"web","theo-u":this.gNt.userId})),this.er()}};r();var zQ=class extends wp{constructor(t){super("distributionloadstart"),this.distributionId=void 0,this.distributionId=t}},GQ=class extends wp{constructor(t){super("distributionoffline"),this.distributionId=void 0,this.distributionId=t}},XQ=class extends wp{constructor(t){super("endpointloaded"),this.endpoint=void 0,this.endpoint=t}},jQ=class extends wp{constructor(t){super("intenttofallback"),this.reason=void 0,this.reason=t}},QQ=class extends wp{constructor(){super("enterbadnetworkmode")}},KQ=class extends wp{constructor(){super("exitbadnetworkmode")}},YQ=class extends Ne{get Ca(){return this.hu||(this.hu=function(t){return{addEventListener(i,e){t.wn(i,e)},removeEventListener(i,e){t.mn(i,e)},get badNetworkMode(){return t.kNt},set badNetworkMode(i){t.kNt=i},get authToken(){return t.ENt},set authToken(i){t.ENt=i},preloadPublications:async i=>(await t.PNt(i)).map(t=>({name:t.name}))}}(this)),this.hu}get kNt(){return this.oa.kNt}set kNt(t){this.oa.kNt=t}get ENt(){return this.oa.ENt}set ENt(t){this.oa.ENt=t}PNt(t){return this.oa.PNt(t)}constructor(t){super(),this.oa=void 0,this.hu=void 0,this.oa=t}};var JQ=["https://discovery.theo.live/channels/"],ZQ=8e5,$Q=class extends Oc{xNt(){this.oa.zP.wn("latencyrecoveryseek",this.aNt),this.oa.rt.wn(Vt.eI,this.GW)}INt(){this.oa.zP.mn("latencyrecoveryseek",this.aNt),this.oa.rt.mn(Vt.eI,this.GW)}$x(t){if(!this.jDt||this.JW||this.Lz)return super.$x(t);if(t.type===Do.TM)return void 0!==this.RNt?(zd.Lg(this.RNt),this.RNt=void 0,this.lBt||this.So(new ce(this.LP()))):this.So(new ce(this.LP())),this.CNt=0,this.lBt=!0,!0;if(t.type===Do.SM)return this.RNt||(this.RNt=zd.Og(()=>{this.So(new ux(this.LP())),this.RNt=void 0},100)),!0;if(t.type===Mc.ma){var i;this.CNt++;const e=(null==(i=this.fz)?void 0:i.src)&&nK(this.fz.src),s=this.CNt>5;return e||s?(this.dispatchErrorEvent(t.errorObject),!0):(this.DNt.So(new jQ(t.errorObject)),Wr(this.BNt()),!0)}if(t.type===d.uo){if(this.NNt=zd.Mg(),void 0===this.MNt&&(this.MNt=zd.fm(()=>{var t;zd.Mg()-(null!=(t=this.NNt)?t:0)>15e3&&(this.DNt.So(new jQ(new Ga(Vo.THEO_LIVE_UNKNOWN_ERROR,"Indefinite stall detected"))),Wr(this.BNt()))},1e3)),this.oa.bt&&(this.LNt=!1),this.LNt)return!0}else if(t.type===d.jw){if(void 0!==this.MNt&&(zd.vm(this.MNt),this.MNt=void 0),this.oa.bt&&(this.LNt=!0),!this.LNt)return!0}else t.type===d._y?this.NNt=zd.Mg():t.type===Do.bM?this.ONt&&(!function(t,i){const e=Jr(t.rt.II,t=>t.o===i.enabledVideoTrackId),s=Jr(t.rt.II,t=>t.Rt);if(e){var n;s&&s.o===e.o||(e.Rt=!0),e.YI=null==(n=i.targetVideoQualities)?void 0:n.map(t=>Jr(e.KI.II,i=>i.o===t)).filter(it)}else s&&(s.Rt=!1);const r=Jr(t.ht.II,t=>t.o===i.enabledAudioTrackId),h=Jr(t.ht.II,t=>t.Rt);r?h&&h.o===r.o||(r.Rt=!0):h&&(h.Rt=!1);for(const e of t.nt.II){var o;const t=null!=(o=i.textTrackModes.get(e.o))?o:xh.Nh;e.Xk!==t&&(e.Xk=t)}}(this.oa,this.ONt),this.ONt=void 0):t.type===d.ey&&(this.DNt.So(new jQ(new Ga(Vo.THEO_LIVE_UNKNOWN_ERROR,"manifest not found"))),Wr(this.BNt()));return super.$x(t)}int(){return this.DNt.Ca}HP(){return this.jDt?this.Lz:super.HP()}qP(){return this.jDt?this.JW:super.qP()}get kNt(){return this.FNt}set kNt(t){this.jDt&&(t?this.UNt():this.VNt())}UNt(){if(this.FNt)return;if(this.FNt=!0,this.DNt.So(new QQ),0===this.oa.rt.V)return;const t=this.rt.CI(0),i=ff(t.KI.II,t=>t.kW);var e;(null!=(e=i.tyt)?e:i.kW)t.YI=t.KI.II.slice())):this.VNt()}VNt(){if(!this.FNt)return;if(this.FNt=!1,this.DNt.So(new KQ),0===this.oa.rt.V)return;const t=this.oa.rt.CI(0);var i;const e=tK(null!=(i=t.YI)?i:t.KI.II);t.YI=e.length>0?e:tK(t.KI.II)}get ENt(){return this.HNt}set ENt(t){this.HNt=t,this.oa.oX.wY(this.WNt),this.HNt&&this.oa.oX.gY(this.WNt)}PNt(t){return Promise.all(t.map(async t=>{const i=this.qNt.Bgt(t);return await Nc(i.TNt,this.nT.Yg)}))}nu(){var t;return null!=(t=this.Ac)?t:super.nu()}async Ta(t,i){var e;this.jDt=!1;for(const s of null!=(e=null==t?void 0:t.sources)?e:[])if(lk(s)&&s.type===Ba.pR&&s.src){if(this.jDt=!0,this.Ac=t,this.fz=s,this.DNt.So(new zQ(s.src)),this.xNt(),nK(s.src)){const e=Mo({},t,{sources:[Mo({},s,{type:Ba._R,useManagedMediaSource:!0})]});return void await super.Ta(e,i)}this.zNt=this.qNt.Bgt(s.src);try{const t=await this.zNt.TNt;return this.tNt=t,void(this.GNt.analyticsEnabled&&(this.XNt=new MQ(this,t,this.YBt)))}catch(t){throw sa(t),this.jNt(),t}}return await super.Ta(t,i)}ox(){return this.jDt?this.LNt:super.ox()}Gx(){this.n7||(this.n7=!0,this.QNt(!1)),this.LNt=!1,super.Gx()}zx(){this.LNt=!0,super.zx()}async BNt(){null!=this.ONt||(this.ONt=function(t){var i,e;const s=Jr(t.rt.II,t=>t.Rt),n=null==s?void 0:s.o,r=null==s||null==(i=s.YI)?void 0:i.map(t=>t.o),h=null==(e=Jr(t.ht.II,t=>t.Rt))?void 0:e.o,o=qh();return t.nt.II.forEach(t=>o.set(t.o,t.Xk)),{enabledVideoTrackId:n,targetVideoQualities:r,enabledAudioTrackId:h,textTrackModes:o}}(this.oa)),await this.oa.Xx().catch(Ct),this.QNt(!0)}QNt(t){if(!this.zNt)return;if(this.KNt)return;this.jNt();const i=()=>{this.KNt=void 0};this.KNt=this.YNt(this.zNt,t).then(i).catch(i)}async YNt(t,i){i&&t.er();const e=await t.TNt;this.tNt=e;const s=await this.selectEndpoint(e,this.JNt);if(this.JNt=s,s){const t=this.convertEndpointToSource(e,s);try{await this.oa.Ta(t,(new at).Yg)}catch(t){return this.dispatchErrorEvent(t),void this.jNt()}this.DNt.So(new XQ(s)),this.LNt||this.oa.Gx()}else this.DNt.So(new GQ(e.id)),this.ZNt=zd.Og(()=>this.QNt(!0),15e3)}convertEndpointToSource(t,i){var e,s;const n={sources:[this.getHespSource(t,i),this.getHlsSource(i)].filter(it),ads:this.lBt?[]:null==(e=this.Ac)?void 0:e.ads,blockContentIfAdError:null==(s=this.Ac)?void 0:s.blockContentIfAdError,streamType:"live"};if(i.adSrc||i.daiAssetKey){var r;const t=null!=(r=n.ads)?r:[],e=t.filter(t=>"theoads"===t.integration);e.length>0?e.forEach(t=>{const e=t;var s,n;e.sseEndpoint=null!=(s=i.adSrc)?s:e.sseEndpoint,e.daiAssetKey=null!=(n=i.daiAssetKey)?n:e.daiAssetKey}):t.push({integration:"theoads",sseEndpoint:i.adSrc,daiAssetKey:i.daiAssetKey}),n.ads=t}const h=Cn(n);return h.sources[0].bypassLicense=!0,h}getHespSource(t,i){var e,s;if(i.hespSrc)return{type:"application/vnd.theo.hesp+json",src:i.hespSrc,contentProtection:i.contentProtection?PQ(i.contentProtection):void 0,useManagedMediaSource:!0,latencyConfiguration:null!=(s=null==(e=this.fz)?void 0:e.latencyConfiguration)?s:iK(t.targetLatency),hesp:{maxMobileBitrate:t.maxMobileBitrate}}}getHlsSource(t){if(t.hlsSrc)return{type:"application/x-mpegurl",src:t.hlsSrc,contentProtection:t.contentProtection?PQ(t.contentProtection):void 0}}dispatchErrorEvent(t){const i=t instanceof Ga?t:new Ga(Vo.THEO_LIVE_UNKNOWN_ERROR,t.message,t);this.Lz=P(i),this.JW=i,this.jNt(),this.So(new Pi(i))}jNt(){void 0!==this.RNt&&(zd.Lg(this.RNt),this.RNt=void 0),void 0!==this.ZNt&&(zd.Lg(this.ZNt),this.ZNt=void 0),void 0!==this.MNt&&(zd.vm(this.MNt),this.MNt=void 0)}Xx(){var t;return this.nT.Zg(),this.nT=new at,this.INt(),this.jNt(),this.NNt=void 0,this.jDt=!1,this.n7=!1,this.lBt=!1,null==(t=this.XNt)||t.destroy(),this.XNt=void 0,this.Ac=void 0,this.fz=void 0,this.zNt=void 0,this.tNt=void 0,this.JNt=void 0,this.JW=void 0,this.Lz=void 0,this.CNt=0,this.$Nt=[],this.LNt=!0,this.ONt=void 0,this.FNt&&this.VNt(),super.Xx()}async kn(t){var i;this.nT.Zg(),this.oa.oX.wY(this.WNt),void 0!==this.RNt&&(zd.Lg(this.RNt),this.RNt=void 0),this.Vo(),this.INt(),null==(i=this.XNt)||i.destroy(),this.oa.zP.mn("latencyrecoveryseek",this.aNt),await super.kn(t)}async selectEndpoint(t,i){let e=!1;const s=t.endpoints.slice();oi(s,i);const n=Bo(s.map(t=>t.priority)).sort();for(const t of n){const i=s.filter(i=>i.priority===t);for(;i.length>0;){const t=sK(i),s=await eK(t,this.oa.SP);if("online"===s)return t;"invalid-security"===s&&(e=!0),oi(i,t)}}if(i){const t=await eK(i,this.oa.SP);if("online"===t)return i;"invalid-security"===t&&(e=!0)}if(e){const t=new Ga(Vo.MEDIA_LOAD_ERROR,"Trying to play a token protected stream without the correct token configured.");throw this.dispatchErrorEvent(t),t}}constructor(t,i){var e;super(t,i),this.DNt=void 0,this.YBt=void 0,this.qNt=void 0,this.GNt=void 0,this.XNt=void 0,this.Ac=void 0,this.fz=void 0,this.zNt=void 0,this.tNt=void 0,this.JNt=void 0,this.jDt=!1,this.Lz=void 0,this.JW=void 0,this.nT=new at,this.RNt=void 0,this.lBt=!1,this.n7=!1,this.KNt=void 0,this.ZNt=void 0,this.MNt=void 0,this.NNt=void 0,this.$Nt=[],this.FNt=!1,this.HNt=void 0,this.LNt=!0,this.CNt=0,this.ONt=void 0,this.GW=t=>{var i;const e=t.Ht,s=null==(i=this.tNt)?void 0:i.maxMobileBitrate;if(void 0!==s&&zd.Zs.Ks){e.KI.II.filter(t=>t.kW>s).forEach(t=>e.KI._S(t))}var n;e.wn(Te.TI,this.ih);const r=tK(null!=(n=e.YI)?n:e.KI.II);e.YI=r.length>0?r:tK(e.KI.II)},this.ih=t=>{const i=t.kot;var e;(!i||(null!=(e=i.tyt)?e:i.kW)>=ZQ)&&this.VNt()},this.aNt=()=>{this.UNt(),this.$Nt.push(zd.Mg()),this.$Nt=this.$Nt.filter(t=>zd.Mg()-t<=3e5),this.$Nt.length>=3&&(this.$Nt=[],this.DNt.So(new jQ(new Ga(Vo.THEO_LIVE_UNKNOWN_ERROR,"Unstable playback detected."))),Wr(this.BNt()))},this.WNt=t=>{this.jDt&&this.HNt&&("manifest"!==t.type&&"segment"!==t.type||(t.headers.Authorization="Bearer "+this.HNt,t.redirect(t)))},this.DNt=new YQ(this);const s=t.Cd.theoLive;var n,r,h;this.GNt={sessionId:null!=(n=null==s?void 0:s.sessionId)?n:FC(),userId:null!=(r=null==s?void 0:s.userId)?r:kQ(),externalSessionId:null==s?void 0:s.externalSessionId,analyticsEnabled:!1!==(null==s?void 0:s.analyticsEnabled),fallbackEnabled:!1!==(null==s?void 0:s.fallbackEnabled),discoveryUrls:[null==s?void 0:s.discoveryUrl,...null!=(h=null==s?void 0:s.discoveryUrls)?h:[],...JQ].filter(it).map(t=>t.lastIndexOf("/")===t.length-1?t:t+"/")},this.YBt=new TQ(null==(e=this.GNt)?void 0:e.externalSessionId),this.qNt=new WQ(t.SP,this.GNt),this.oa.zP.wn("latencyrecoveryseek",this.aNt)}};function tK(t){return t.filter(t=>{var i;return(null!=(i=t.tyt)?i:t.kW)>=ZQ})}function iK(t){return void 0===t?Mo({},_j(),{forceSeekOffset:20}):{minimumOffset:t-UT,targetOffset:t,maximumOffset:t+UT,forceSeekOffset:20,minimumPlaybackRate:Ot,maximumPlaybackRate:Jt}}async function eK(t,i){try{const e=t.hespSrc||t.hlsSrc,s=await i.lk({Yu:e,Km:Al.wk,Vk:3e3});if(s.hk>=200&&s.hk<300)return"online"}catch(t){if(t instanceof An&&403===t.oE.hk)return"invalid-security"}return"offline"}function sK(t){const i=t.reduce((t,i)=>t+i.weight,0);if(0===i){return t[_.floor(_.random()*t.length)]}const e=_.random()*i;let s=0;for(const i of t)if(s+=i.weight,e<=s)return i;return t[t.length-1]}function nK(t){try{return Ju(zd.Dh(t).pathname,"manifest.json")}catch(t){return!1}}Pu(t=>new $Q(t),HF.pR),r(),r(),r();var rK=sn(wd());r(),r(),r();var hK=class extends Ne{get tB(){return this.tMt}er(t,i){this.ob=t,this.tMt=i,this.hu&&this.So(new ea(this.hu))}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()}get o(){return this.ob.id}get jI(){return this.gO}get kW(){return this.ob.bitrate}get tyt(){}get frt(){return""}get Th(){return""}get nyt(){return""}get cst(){return!0}get iyt(){}jU(){throw new m("Method not implemented.")}QU(){throw new m("Method not implemented.")}kn(){this.Vo()}constructor(t,i){super(),this.gO=zk(),this.ob=void 0,this.tMt=void 0,this.hu=void 0,this.ob=t,this.tMt=i}},oK=class extends hK{xa(){return Lq(this)}get plt(){return 0}get Ti(){return this.ob.width}get Mi(){return this.ob.height}get eyt(){return 0}constructor(t,i){super(t,i)}};r();var aK=class extends Ne{get Rt(){return!0}set Rt(t){}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=fo(this)}wO(t){this.Rt=t}get Jdt(){}get Lt(){return this.b5}get o(){return this.hS||"millitrack"}get jI(){return this.gO}get Th(){return""}get bs(){return""}get Xk(){return this.Rt?"enabled":"disabled"}set Xk(t){this.wO("enabled"===t)}get XI(){}get KI(){return this.dO}get YI(){return this.iMt}set YI(t){if(this.iMt=t,this.Rt){const i=1===(null==t?void 0:t.length)?t[0].tB:void 0;this.eMt(i)}this.So(new Zo(this.dO.II.slice(),this)),((null==t?void 0:t.length)||this.dO.V)&&this.So(new DW((null==t?void 0:t[0])||this.dO.CI(0)))}get QI(){}kn(){this.Vo();for(const t of this.dO.II)t.kn();this.dO.hr()}constructor(t,i){super(),this.gO=ki(),this.dO=new Uk,this.iMt=void 0,this.hS=void 0,this.b5=void 0,this.hu=void 0,this.hS=t,this.b5=i}},uK=class extends aK{er(t){for(const i of t.active){const e=Jr(t.layers,t=>t.encodingId===i.id),s=Jr(this.dO.II,t=>t.o===i.id);s?s.er(i,e):this.dO.lO(new oK(i,e))}this.So(new Uh(this))}get Km(){return Ci.Bk}eMt(t){var i;null==(i=this.sMt)||i.nMt(t)}kn(){this.sMt=void 0,super.kn()}constructor(t,i,e){super(t,i),this.sMt=void 0,this.sMt=e}};r();var cK=class{er(t){this.rMt=t}get kW(){var t,i,e,s,n;var r;return(null!=(n=null==(i=this.rMt)||null==(t=i.video.inbounds)?void 0:t.reduce((t,i)=>t+i.bitrateBitsPerSecond,0))?n:0)+(null!=(r=null==(s=this.rMt)||null==(e=s.audio.inbounds)?void 0:e.reduce((t,i)=>t+i.bitrateBitsPerSecond,0))?r:0)}get EW(){var t,i;return null!=(i=null==(t=this.rMt)?void 0:t.currentRoundTripTime)?i:0}PW(t){}constructor(){this.rMt=void 0}};r(),r();var dK=class extends hK{xa(){return Oq(this)}get $mt(){return this.hMt}constructor(t,i){super(t,i),this.hMt=0}},lK=class extends aK{er(t){for(const i of t.active){const e=Jr(t.layers,t=>t.encodingId===i.id),s=Jr(this.dO.II,t=>t.o===i.id);s?s.er(i,e):this.dO.lO(new dK(i,e))}this.So(new Uh(this))}get Km(){return Ci.Dk}eMt(t){var i;null==(i=this.sMt)||i.oMt(t)}kn(){this.sMt=void 0,super.kn()}constructor(t,i,e){super(t,i),this.sMt=void 0,this.sMt=e}};r();var fK=class extends _h{xa(){return function(t){return po(zt(t),{get mid(){return t.DU.mid},get uuid(){return t.DU.uuid},get timecode(){return t.DU.timecode},get unregistered(){return t.DU.unregistered}})}(this)}constructor(t,i){super(t,t,void 0,!1),this.DU=void 0,this.DU=i}};r(),r();var vK=sn(wd()),_K=class extends Ne{get Ca(){return this.hu||(this.hu=Pk(this)),this.hu}QL(t){return vK.Logger.diagnose(t)}wn(t,i){this.aMt.wn(t,i)}mn(t,i){this.aMt.mn(t,i)}constructor(t){super(),this.hu=void 0,this.aMt=void 0,this.aMt=t}},gK=[d.uo,d.jw,Do.TM,d._y,d.Qw,d.Ww,d.$w,d.Zw,d.Bw,d.Kw,d.gy,d.Rw,d.Jw,d.Pw,d.Ew,d.Lw,d.Nw],pK=["active","inactive","stopped","vad","layers","migrate","viewercount"],mK=1e3,wK=class extends wp{get stats(){return this.rMt}constructor(t){super("stats"),this.rMt=void 0,this.rMt=t}},yK=class extends Ne{nMt(t){var i;null==(i=this.Lf)||i.select(t).catch(this.mmt)}oMt(t){var i;null==(i=this.Lf)||i.select(t).catch(this.mmt)}get Vx(){return!1}Wx(){return this.TL.Wx()}get ht(){return this.YL}get IP(){return this.TL.IP._s()}get CP(){return this.TL.CP}set CP(t){}get bt(){return this.Ac}get MP(){return this.TL.MP}set MP(t){this.OP(t)}OP(t,i){}get ct(){return this.TL.ct}get UP(){return this.TL.UP}get lt(){return this.JW}get WP(){return this.ZW}get zP(){}get jP(){return this.uMt}get KP(){return this.TL.KP}get JP(){var t,i;const e=this.cMt,s=null==e||null==(t=e.video.inbounds)?void 0:t[0],n=null==e||null==(i=e.audio.inbounds)?void 0:i[0];var r,h,o,a;return{nO:this.Rz.kY.kW,iO:null!=(r=null==s?void 0:s.framesDropped)?r:0,eO:0,sO:null!=(h=null==s?void 0:s.framesReceived)?h:0,rO:(null!=(o=null==s?void 0:s.totalBytesReceived)?o:0)+(null!=(a=null==n?void 0:n.totalBytesReceived)?a:0),hO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}}}get $P(){return this.TL.$P}set $P(t){this.TL.$P=t}get sx(){var t,i;return null!=(i=null==(t=this.Lf)?void 0:t.isActive())&&i}get hx(){return this.TL.hx}get ux(){return 1}set ux(t){}get _x(){return this.TL._x._s()}get mx(){return q.lz}set mx(t){}get Ax(){return this.TL.Ax}get Sx(){return this.TL.Sx._s()}get kx(){return this.TL.kx}get nq(){return this.TL.nq}get nt(){return this.TL.nt}get Rx(){return this.TL.Rx}get rt(){return this.$L}get Bx(){return this.TL.Bx}get Mx(){return this.TL.Mx}set Mx(t){this.TL.Mx=t}get Fx(){return this.Cz}get hq(){return this.oq}get BL(){return this.Cz.BL}be(){this.TL.be()}we(){this.TL.we()}async Gx(){this.Un(),await this.TL.Gx()}zx(){this.TL.zx()}async hr(){var t;this.dMt(),this.Ac=void 0,this.nT.Zg(),null==(t=this.Lf)||t.stop(),this.Lf=void 0,this.Dpt&&(await this.Dpt.catch(Ct),this.Dpt=void 0),this.lMt=void 0,await this.TL.hr(),this.fMt=void 0,this.vMt=0,this.TL.Aq();for(const t of this.$L.II)t.kn();this.YL.hr(),this.$L.hr()}async kn(){this.dMt(),this.Vo(),await this.hr(),this.YL.kn(),this.$L.kn(),this.bq.kn(),this.kq.zg(),this.TL.mn(gK,this.Rs),this.TL.mn(Mc.ma,this.Ts),await this.Iz.Pq(this.TL)}async Ta(t,i,e){var s;ii(e),this.pEt(),this.dMt();const n=t;this.Ac=n,this.nT=new at,n.apiUrl&&rK.Director.setEndpoint(n.apiUrl);const r=this._Mt(this.Rz.OY.type);this.Lf=new rK.View(void 0,()=>rK.Director.getSubscriber({streamName:n.src,streamAccountId:n.streamAccountId,subscriberToken:n.subscriberToken}),void 0,!0),this.gMt=Mo({},n.connectOptions,{events:pK,abrConfiguration:{strategy:r,metadata:{bitrate:null==(s=this.Rz.OY.metadata)?void 0:s.bitrate}}}),this.pMt()}_Mt(t){switch(t){case Sa.PERFORMANCE:return"performance";case Sa.BANDWIDTH:return"bandwidth";case Sa.QUALITY:return"quality";default:return}}Px(t,i,e,s){return Promise.resolve()}xx(){return Promise.resolve()}Un(){if(void 0!==this.Dpt)return;const t=this.Lf;void 0!==t&&(this.Dpt=this.lE(t,this.gMt,this.nT.Yg).catch(this.mmt))}async lE(t,i,e){ii(e);try{var s,n;await Nc(t.connect(i),e),t.webRTCPeer.initStats({autoInitStats:!0,statsIntervalMs:_.min(null!=(n=null==(s=this.Ac)?void 0:s.statsIntervalMs)?n:mK,mK)})}catch(i){sa(i),function(t){return Lu(t)&&"FetchError"===t.name}(i)&&400===i.status&&(zd.um("[THEOplayer] Millicast connect error, reconnecting.",i),await Nc(t.reconnect(),e)),this.qq(new Ga(Vo.NETWORK_ERROR,i.message,i))}}async mMt(t,i){ii(i);try{this.TL.x9(),this.lMt=t,await this.TL.hr(),await this.TL.Un({Km:Zr.mV,iR:"",GZ:t,qT:Ba.gR,aq:[]})}finally{this.TL.I9()}}pMt(){var t;const i=this.Lf;i.on("track",t=>this.wMt(t)),i.on("broadcastEvent",t=>this.yMt(t)),i.webRTCPeer.on("stats",t=>{this.cMt=t,this.oq.er(t),this.AMt()}),(null==(t=this.gMt)?void 0:t.metadata)&&i.on("metadata",t=>this.bMt(t))}AMt(){var t,i;void 0===this.SMt&&(this.So(new wK(this.cMt)),this.SMt=zd.fm(()=>{this.So(new wK(this.cMt))},null!=(i=null==(t=this.Ac)?void 0:t.statsIntervalMs)?i:mK))}dMt(){void 0!==this.SMt&&(zd.vm(this.SMt),this.SMt=void 0)}wMt(t){const i=this.YL.V>0,e=this.$L.V>0,s=i&&!e,n=t.streams[0];if(s){const t=n.getVideoTracks().slice();for(const i of t)n.removeTrack(i)}n!==this.lMt&&this.mMt(n,this.nT.Yg).catch(this.mmt)}yMt(t){switch(t.name){case"active":{this.So(new gt);const i=t.data,e=this.gMt;for(const t of i.tracks)if(t.media!==Ci.Bk||e.disableVideo||this.$L.II.some(i=>i.o===t.trackId)){if(t.media===Ci.Dk&&!e.disableAudio&&!this.YL.II.some(i=>i.o===t.trackId)){const i=this.YL.V>0?mn.qCt:mn.zCt;this.YL.tt(new lK(t.trackId,i,this))}}else{const i=this.$L.V>0?Ca.qCt:Ca.zCt;this.$L.tt(new uK(t.trackId,i,this))}break}case"inactive":this.So(new Fr),this.$L.hr(),this.YL.hr();break;case"stopped":this.So(new Fr);break;case"viewercount":default:break;case"layers":{const i=t.data;if(0===this.$L.V){const t=new uK("",Ca.zCt,this);t.er(i.medias[0]),this.$L.tt(t)}else{const t=Jr(this.$L.II,t=>t.Lt===Ca.zCt);null==t||t.er(i.medias[0])}break}}}bMt(t){let i=this.fMt;void 0===i&&(i=this.TL.tI(Ao.VU,void 0,void 0,void 0,void 0,nh.MILLICAST),i.Xk=xh.JI,this.fMt=i);const e=this.MP,s=_.max(0,e-10);this.vMt{this.qq(Ok(t.lt))},this.mmt=t=>{D(t)||this.qq(new Ga(Vo.MEDIA_DECODE_ERROR,t.message,t))},this.TL=this.Iz.Gq(Ci.Bk),this.kq=new dx(this,this.TL),this.bq=new bs(this.kq,!0),this.TL.wn(gK,this.Rs),this.TL.wn(Mc.ma,this.Ts),this.bq.wn(K,this.Rs),this.uMt=new _K(this)}};cs(new class{get Kq(){return V.gR}PR(t,i,e,s,n,r,h,o){return new yK(i,n,r)}Xq(t,i){return t.type===Ba.gR}async jq(t){let i=await kT(t);return i&&(i=Boolean(t.widevine||t.fairplay)),i&&!1}Qq(){return!1}}),r(),r(),r(),r();var AK=function(t){return t.TMt="currentbufferingrenditionchange",t.kMt="EMt",t.PMt="xMt",t}({});r(),r();var bK=class{constructor(t,i){var e,s;this.jI=void 0,this.IMt=void 0,this.Km=void 0,this.RMt=void 0,this.CMt=void 0,this.DMt=void 0,this.l=void 0,this.bs=void 0,this.BMt=void 0,this.NMt=void 0,this.MMt=void 0,this.LMt=void 0,this.frt=void 0,this.jI=zk(),this.IMt=i,this.Km=t.Km,this.RMt=t.RMt,this.CMt=t.CMt,this.DMt=t.DMt,this.l=t.l,this.bs=t.bs,this.BMt=t.BMt,this.NMt=t.NMt,this.MMt=void 0===t.nyt,this.LMt=null!=(s=null==(e=t.LMt)?void 0:e.split(","))?s:[]}};function SK(t,i){return t.Km===i.Km&&(t.l===i.l||!(!t.RMt||!i.RMt))}function TK(t,i){return void 0!==t&&void 0!==i&&kK(t,i)}function kK(t,i){return t.IMt===i.IMt}function EK(t,i){return kK(t,i)&&t.BMt===i.BMt}function PK(t,i){for(const e of t)if(EK(e,i))return!0;return!1}var xK=class extends Ne{get QI(){return this.OMt}get Rt(){const t=this.FMt();if(!t)return!1;for(const i of this.KI.II)if(i.UMt===t)return!0;return!1}set Rt(t){if(t!==this.Rt)if(t){var i;let t=null==(i=this.KI.CI(0))?void 0:i.UMt;const e=this.HMt.VMt;for(const i of this.KI.II)if(i.WMt===e){t=i.UMt;break}this.qMt(t)}else this.qMt(void 0)}get XI(){if(!this.Rt)return;const t=this.HMt.zMt;for(const i of this.KI.II)if(PK(t,i.UMt))return i}get Ca(){return this.hu||(this.hu=fo(this)),this.hu}get o(){return this.gO.toString()}get jI(){return this.gO}get Th(){return this.pO}set Th(t){t!==this.pO&&(this.pO=t,this.So(new Uh(this)))}get bs(){return this.qA}get Xk(){return this.Rt?"enabled":"disabled"}get YI(){return this.dct}set YI(t){let i=[];if(t){i=t.filter(t=>{const i=this.XI?oH(this.XI):void 0;return zd.Zs.xp(i,oH(t))}).filter(i=>this.KI.fO(t)&&i.cst)}else i=this.KI.II.filter(t=>t.cst);if(0!==i.length){if(!(t===this.dct||this.dct&&df(this.dct,i))){if(this.dct=t?i:void 0,this.HMt.GMt(i.map(t=>t.WMt)),1===i.length){const t=i[0].WMt,e=this.Vp===Ci.Bk,s=this.Rz.JY;Wr(this.HMt.XMt(t,{jMt:!0,QMt:s&&e,KMt:s&&!e}))}this.So(new Zo(i,this))}}else this.So(new hH)}wO(t){this.Rt=t}YMt(t){return Jr(this.KI.II,i=>i.UMt===t)}kn(){this.Vo(),this.HMt.mn(AK.TMt,this.JMt),this.HMt.mn(AK.kMt,this.ZMt);for(const t of this.KI.II)t.kn();this.KI.hr()}constructor(t,i,e,s,n){var r;super(),this.Vp=void 0,this.HMt=void 0,this.Rz=void 0,this.wh=void 0,this.KI=void 0,this.pO=void 0,this.qA=void 0,this.OMt=void 0,this.dct=void 0,this.$Mt=void 0,this.tLt=void 0,this.hu=void 0,this.gO=void 0,this.iLt=void 0,this.JMt=void 0,this.ZMt=void 0,this.Vp=t,this.HMt=i,this.Rz=e,this.wh=s,this.KI=n,this.dct=void 0,this.$Mt=void 0,this.iLt=()=>this.So(new Uh(this)),this.JMt=()=>{const t=this.XI;t&&this.$Mt!==t&&(this.$Mt=t,this.So(new DW(t)))},this.ZMt=()=>{const t=this.Rt;this.tLt!==t&&(this.tLt=t,this.wh.So(new nr(this)),this.So(new nr(this)))},this.$Mt=this.XI,this.tLt=this.Rt;const h=n.CI(0);var o,a;this.pO=null!=(o=null==h?void 0:h.UMt.l)?o:"",this.qA=null!=(a=null==h?void 0:h.UMt.bs)?a:"",this.OMt=null==h||null==(r=h.UMt)?void 0:r.LMt.map(NK).filter(it),this.gO=ki(),this.HMt.wn(AK.TMt,this.JMt),this.HMt.wn(AK.kMt,this.ZMt);for(let t=0;t0)||i.some(i=>i.toLowerCase()===t.toLowerCase())}uLt(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s1?i-1:0),s=1;s1?i-1:0),s=1;s1?i-1:0),s=1;s1?i-1:0),s=1;s!1}},B="HLSPlaylistParser",yc="Discontinuity",MK="Buffering";r();var LK=class{get kW(){return this.Fat.yet}get EW(){return this.LIt.yet}PW(t){if("segment"!==t.Km&&"preload-hint"!==t.Km)return;const i=[new $X(this.LIt)];return"stream"!==t.dk||!function(t){return"segment"===t.Km&&"initialization-segment"!==t.Wk}(t)&&"preload-hint"!==t.Km?i.push(new tj(this.Fat)):i.push(new ij(this.Fat,1e3)),new ZX(i)}RIt(t){this.Fat=new ps(ps.cIt,ps.dIt,1,t)}constructor(t){this.Fat=void 0,this.LIt=void 0;const i=t.kW>0?t.kW:ps.Mat,e=t.EW>0?t.EW:de.Mat;this.Fat=new ps(ps.cIt,ps.dIt,1,i),this.LIt=new de(de.cIt,de.dIt,e)}};r();var OK=class{QZ(t,i){const e={Km:Zr.wV,aq:[],L4:t.map(t=>({qT:t})),X4:i};return Promise.resolve(void 0!==this.ost.QZ([e]))}constructor(t){this.ost=void 0,this.ost=t}};r(),r();var FK=(t,i,e,s,n)=>t.filter(t=>!!pi(s,t)||1.1*t.kW<=e.kW),UK=(t,i,e,s,n)=>t.filter(t=>{if(pi(s,t))return!0;let r=1/0;for(const i of t.lLt){var h,o;r=_.min(r,null!=(o=null!=(h=i.IMt.fLt)?h:i.IMt.vLt)?o:1/0)}r===1/0&&(r=1);const a=2*e.EW+t.kW*r/e.kW;return t.kW<=i.kW||n._Lt>a}),VK=(t,i,e,s,n)=>xe(t,(t,i)=>i.kW-t.kW),HK=(t,i,e,s,n)=>t.every(t=>t.iyt&&!S(t.iyt))?xe(t,(t,i)=>i.iyt-t.iyt):t,WK=(t,i,e,s,n)=>0===s.length?t:xe(t,(t,i)=>{const e=pi(s,t)?1:0;return(pi(s,i)?1:0)-e}),qK=(t,i,e,s,n,r)=>t.filter(t=>!t.frt||!i.frt||!(void 0!==i.frt.bCt&&void 0!==t.frt.bCt&&!bN(i.frt.bCt,t.frt.bCt)&&!r.gLt({qT:'video/mp4; codecs="'+t.frt.bCt+'"'}))&&!(void 0!==i.frt.yCt&&void 0!==t.frt.yCt&&!bN(i.frt.yCt,t.frt.yCt)&&!r.pLt({qT:'audio/mp4; codecs="'+t.frt.yCt+'"'}))),zK=(t,i,e,s,n)=>{if(!1===n.Gct)return t;if(zd.Zs.dp)return t;const r=zd.Zs.lp;var h;const o=(null!=(h=null==r?void 0:r.width)?h:n.Ti)*zV;var a;const u=(null!=(a=null==r?void 0:r.height)?a:n.Mi)*zV;for(let i=0;ifunction(t,i){const e=i.Gct;if(void 0===e&&!zd.Zs.Ks)return t;if(!1===e)return t;for(let e=0;et.kW)]}return h}constructor(t){this.Rz=void 0,this.jct=void 0,this.Rz=t,this.jct=[qK,FK,UK,VK,zK,GK,HK,WK]}};function QK(t,i){return[t,void 0!==i?t+i-1:Xl]}function KK(t){return Boolean(t.KD)}function YK(t){return Boolean(t.ect)}r(),r(),r(),r(),r();var nl=function(t){return t[t.Dk=0]="Dk",t[t.Bk=1]="Bk",t[t.OU=2]="OU",t[t.bLt=3]="bLt",t}({}),Qu=function(t){return t[t.SLt=0]="SLt",t[t.TLt=1]="TLt",t}({}),Zt=function(t){return t[t.lz=0]="lz",t[t.kLt=1]="kLt",t[t.ELt=2]="ELt",t}({}),Bn=function(t){return t[t.pk=0]="pk",t[t.PLt=1]="PLt",t[t.xLt=2]="xLt",t}({});function we(t){return t?t.LAt?t.zE+"@"+t.LAt.Tn+"-"+(null!=(i=t.LAt.V)?i:""):""+t.zE:"";var i}function JK(t,i){if(i===t)return!0;if(i.zE!==t.zE)return!1;if(!t.LAt)return!0;if(i.LAt){const e=QK(t.LAt.Tn,t.LAt.V),s=QK(i.LAt.Tn,i.LAt.V);if(e[0]<=s[0])return void 0===e[1]||void 0!==s[1]&&e[1]>=s[1]}return!1}function ZK(t,i){return t===i||t.zE===i.zE&&(t.LAt&&i.LAt?t.LAt.Tn===i.LAt.Tn&&t.LAt.V===i.LAt.V:t.LAt===i.LAt)}function $K(t){const i=!!t.ILt||void 0;return{o:t.o,RLt:t.RLt,nq:t.nq,CLt:t.CLt,ct:t.ct,DLt:t.DLt,ILt:i,BLt:t.NLt,MLt:t.LLt,OLt:t.OLt,FLt:t.FLt}}function tY(t,i){var e,s,n;return{yCt:null!=(e=i.yCt)?e:null==t?void 0:t.yCt,bCt:null!=(s=i.bCt)?s:null==t?void 0:t.bCt,ULt:null!=(n=i.ULt)?n:null==t?void 0:t.ULt}}async function iY(t,i,e,s,n){const r=i.filter(t=>Ho(t,"audio")),h=i.filter(t=>Ho(t,"video")),o=[],a=e.map(t=>async function(t,i,e){if(!t.nyt)return;if(!t.VLt)return;if(t.Uk!==Zt.ELt)return;const s=eY(t.VLt);if(!s)return;if(s.$m===Qs)return{kS:s,BW:[],NW:void 0,HH:t.nyt,MW:[]};if(s.$m===Gg&&t.VLt===Jg)return{kS:s,BW:[],NW:t.nyt,HH:void 0,MW:[]};{Ft.hB("HLSDrmUtils","Fetching key uri "+t.nyt+".");const n=await i.lk({Yu:t.nyt,zk:e});let r=await n.HT();return s.$m===Vg&&(r=function(t){const i=new DataView(t);return i.byteLength>=8&&i.getUint32(4)===sq?t:nq(t)}(r)),{kS:s,BW:[r],NW:void 0,HH:void 0,MW:[]}}}(t,s,n));var u;const c=function(t,i){if(0===i.length)return t;const e=t=>{const e=i.indexOf(t.kS.$m);return e>=0?e:i.length};return xe(t,(t,i)=>e(t)-e(i))}((await Promise.all(a)).filter(it),null!=(u=null==t?void 0:t.preferredKeySystems)?u:[]);for(const i of c){const e=DG(null!=t?t:{},i.kS),s="cbcs";o.push({kS:i.kS,BW:i.BW,NW:i.NW,HH:i.HH,Mq:[{initDataTypes:[i.kS.Jm],audioCapabilities:BG(r,s,null==e?void 0:e.audioRobustness),videoCapabilities:BG(h,s,null==e?void 0:e.videoRobustness),persistentState:null==e?void 0:e.persistentState,distinctiveIdentifier:null==e?void 0:e.distinctiveIdentifier}],MW:i.MW})}return o}function eY(t){return t===Wg?xi:t===Mu?Zg:"com.apple.streamingkeydelivery"===t?tp:t===Jg?ip:void 0}function sY(t){if("#"!==t[0])throw new m("HLSPlaylistParser - Could not extract M3U8 tag or comment: "+t);return t.split(":",1)[0]}function nY(t){return"#"!==t[0]?t:t.split(":",1)[0]}function rY(t){const i=t.indexOf(":");if(-1===i||t.length{const i=t.split(":");return{keysystem:i[0],label:i[1]}}))}const f=s["VIDEO-RANGE"],v=s.AUDIO,_=s.VIDEO,g=s.SUBTITLES,p=s["CLOSED-CAPTIONS"];if(void 0===o?Ft.cLt(B,"#EXT-X-STREAM-INF tag has no valid BANDWIDTH attribute: "+t+"."):void 0!==a&&a>o&&Ft.cLt(B,"#EXT-X-STREAM-INF tag must have BANDWIDTH attribute higher or equal to AVERAGE-BANDWIDTH attribute: "+t+"."),r||Ft.hB(B,"#EXT-X-STREAM-INF tag should have a CODECS attribute: "+t+"."),r&&r.bCt&&void 0===h&&Ft.hB(B,"#EXT-X-STREAM-INF tag should have a valid RESOLUTION attribute if it contains video codecs: "+t+"."),void 0===d||pi(["TYPE-0","TYPE-1","NONE"],d)||Ft.cLt(B,"#EXT-X-STREAM-INF tag has an invalid HDCP-LEVEL attribute: "+t+"."),void 0===f||pi(["SDR","PQ","HLG"],f)||Ft.cLt(B,"#EXT-X-STREAM-INF tag has an invalid VIDEO-RANGE attribute: "+t+"."),void 0===o)throw new m("HLSPlaylistParser - Could not parse #EXT-X-STREAM-INF tag: "+t+".");return{WLt:l,qLt:v,tyt:a,kW:o,zLt:p,frt:r,plt:c,GLt:d,uCt:h,iyt:u,XLt:g,nyt:n,jLt:_,QLt:f}}function cY(t,i){const e=oY(t);if(!e.URI)throw new m("HLSPlaylistParser - Could not parse #EXT-X-I-FRAME-STREAM-INF tag: "+t+".");try{return uY(t,i,e.URI)}catch(i){throw new m("HLSPlaylistParser - Could not parse #EXT-X-I-FRAME-STREAM-INF tag: "+t+".")}}function dY(t){const i=Number(t);return S(i)?void 0:i}function lY(t,i){const e=oY(t);let s,n;try{s=function(t){switch(t){case"NONE":return Zt.lz;case"AES-128":return Zt.kLt;case"SAMPLE-AES":return Zt.ELt;case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return t}throw new m("LLHLSPlaylistParser - Could not parse M3U8 key method: "+t+".")}(e.METHOD),n=e.URI?yY(e.URI,i):void 0}catch(i){throw new m("HLSPlaylistParser - Could not parse #EXT-X-KEY tag: "+t+".")}const r=e.KEYFORMAT,h=e.IV,o=e.KEYFORMATVERSIONS;let a,u,c,d,l;if(s!==Zt.lz){if(c=r||Jg,"SAMPLE-AES-CENC"===s||"SAMPLE-AES-CTR"===s){if(eY(c)!==xi)throw new m("HLSPlaylistParser - #EXT-X-KEY tag with METHOD="+s+" is only compatible with Widevine.");a=Zt.ELt}else a=s;u=n,d=h?um(h):void 0,l=o?o.split("/").map(t=>Number(t)):[1]}else a=Zt.lz,(n||r||o||h)&&Ft.cLt(B,"#EXT-X-KEY tag with METHOD=NONE must not have additional attributes: "+t+".");return{Uk:a,nyt:u,KLt:d,VLt:c,YLt:l}}function fY(t){const i=rY(t);if(!i)return[void 0,""];const[e,s]=i.split(",");return[dY(e),s]}function vY(t,i){const e=t.split("@"),s=dY(e[0]),n=e.length>1?dY(e[1]):i;if(void 0===s||void 0===n)throw new m("HLSPlaylistParser - Could not parse #EXT-X-BYTERANGE tag: "+t+".");return{Tn:n,V:s}}function _Y(t){if(void 0!==t)return vY(t,void 0)}function gY(t,i){return vY(rY(t),i)}function pY(t,i){const e=oY(t);try{const t=yY(e.URI,i);return{zE:t,LAt:_Y(e.BYTERANGE)}}catch(i){throw new m("HLSPlaylistParser - Could not parse #EXT-X-MAP tag: "+t+".")}}function mY(t){const i=rY(t);if(!i)throw new m("HLSPlaylistParser - Could not parse #EXT-X-PROGRAM-DATE-TIME tag: "+t+".");const e=new Date(i.trim());if(!Zf(e))throw new m("HLSPlaylistParser - Could not parse #EXT-X-PROGRAM-DATE-TIME tag: "+t+".");return e}function wY(t){const i=oY(t),e=i["START-DATE"],s=i["END-DATE"],n=dY(i["PLANNED-DURATION"]);let r,h,o,a=dY(i.DURATION);void 0!==i["SCTE35-CMD"]&&(r=um(i["SCTE35-CMD"]).buffer),i["SCTE35-IN"]&&(h=um(i["SCTE35-IN"]).buffer),i["SCTE35-OUT"]&&(o=um(i["SCTE35-OUT"]).buffer);const u="YES"===i["END-ON-NEXT"],c=function(t){const i={};for(const e of w.keys(t)){const s=t[e];void 0!==s&&Vh(e,"X-")&&(i[e]=s)}return i}(i),d=i.ID,l=i.CLASS;let f,v;if(void 0===e)Ft.cLt(B,"Could not parse #EXT-X-DATERANGE tag without START-DATE attribute: "+e+".");else if(f=new Date(e),v=void 0!==s?new Date(s):void 0,Zf(f)||Ft.cLt(B,"Could not parse EXT-X-DATERANGE tag with invalid START-DATE attribute: "+f+"."),void 0!==a){const i=new Date(f.getTime()+1e3*a);v?v.getTime()!==i.getTime()&&(Ft.cLt(B,"DURATION and END-DATE attributes of #EXT-X-DATERANGE tag are not aligned, updating the END-DATE: "+t+"."),v=i):v=i}else v&&(a=(f.getTime()-v.getTime())/1e3);if(u&&(i.CLASS||Ft.cLt(B,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute without CLASS attribute: "+t+"."),i.DURATION&&Ft.cLt(B,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute with DURATION attribute: "+t+"."),v&&Ft.cLt(B,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute with END-DATE attribute: "+t+".")),void 0===d&&Ft.cLt(B,"Could not parse #EXT-X-DATERANGE tag without valid ID attribute: "+t+"."),void 0===d||void 0===f)throw new m("HLSPlaylistParser - Could not parse #EXT-X-DATERANGE tag: "+t+".");return{o:d,RLt:l,nq:f,CLt:v,ct:a,DLt:n,LLt:r,FLt:h,OLt:o,ILt:u,NLt:c}}function yY(t,i){if(void 0===t)throw new m("HLSPlaylistParser - Unable to parse URL from string: "+t+".");return zd.xm(t,i)}function AY(t,i){const e=oY(t),s=dY(e.DURATION),n=yY(e.URI,i),r=_Y(e.BYTERANGE),h="YES"===e.INDEPENDENT,o="YES"===e.GAP;if(void 0===s)throw new m("HLSPlaylistParser - Unable to parse #EXT-X-PART without valid DURATION: "+t);return{ct:s,nyt:{zE:n,LAt:r},JLt:h,ZLt:o}}function bY(t){const i=oY(t);return{$Lt:"YES"===i["CAN-BLOCK-RELOAD"],tOt:dY(i["CAN-SKIP-UNTIL"]),iOt:"YES"===i["CAN-SKIP-DATERANGES"],eOt:dY(i["HOLD-BACK"]),sOt:dY(i["PART-HOLD-BACK"])}}function SY(t,i){const e=oY(t);if(void 0===e.URI)throw new m("HLSPlaylistParser - Could not parse #EXT-X-RENDITION-REPORT: "+t+".");const s=yY(e.URI,i),n=dY(e["LAST-MSN"]),r=dY(e["LAST-PART"]);if(void 0===n)throw new m("HLSPlaylistParser - Could not parse #EXT-X-RENDITION-REPORT: "+t+".");return{nyt:s,nOt:n,rOt:r}}function TY(t,i){var e;const s=oY(t),n=dY(s["SKIPPED-SEGMENTS"]),r=null==(e=s["RECENTLY-REMOVED-DATERANGES"])?void 0:e.split("\t");if(void 0===n)throw new m("HLSPlaylistParser - Could not parse #EXT-X-SKIP tag without valid SKIPPED-SEGMENTS attribute: "+t+".");return{hOt:n,oOt:r,aOt:i}}function kY(t){const i=dY(oY(t)["PART-TARGET"]);if(void 0===i)throw new m("HLSPlaylistParser - Could not parse #EXT-X-PART-TARGET-DURATION tag: "+t+".");return i}function EY(t){switch(rY(t)){case"VOD":return Bn.PLt;case"EVENT":return Bn.xLt;default:return Ft.cLt(B,"Found #EXT-X-PLAYLIST-TYPE tag with invalid value: "+t+"."),Bn.pk}}function PY(t,i){const e=oY(t);let s,n;try{s=function(t){if(void 0===t)throw new m("HLSPlaylistParser - Could not parse PRELOAD-HINT type: "+t+".");if("MAP"===t)return Qu.SLt;if("PART"===t)return Qu.TLt;throw new m("HLSPlaylistParser - Could not parse PRELOAD-HINT type: "+t+".")}(e.TYPE),n=yY(e.URI,i)}catch(i){throw new m("HLSPlaylistParser - Could not parse #EXT-X-PRELOAD-HINT tag: "+t+".")}const r=dY(e["BYTERANGE-START"]),h=dY(e["BYTERANGE-LENGTH"]);let o;return void 0===r&&void 0===h||(o={Tn:r||0,V:h}),{Km:s,nyt:{zE:n,LAt:o}}}r(),r(),r();var xY=class t{uOt(){const t=this.cOt[this.dOt];return this.dOt+=1,t}lOt(){return this.cOt[this.dOt]}Ly(){const i=new t("");return i.dOt=0,i.cOt=this.cOt.slice(this.dOt),i}static fOt(t){if(!t)return[];return t.split(/[\r\n]+/).map(t=>t.trim()).filter(t=>t)}constructor(i){this.dOt=0,this.cOt=void 0,this.cOt=t.fOt(i)}};function IY(t,i,e){const s=t.nyt;let n=t.bD,r=t.vOt,h=t.Tn;switch(e){case"#EXT-X-VERSION":n=function(t){const i=hY(t);return S(i)?(Ft.cLt(B,"Playlist version is NaN: "+t+"."),1):i}(i);break;case"#EXT-X-INDEPENDENT-SEGMENTS":r=!0;break;case"#EXT-X-START":h=function(t){const i=oY(t),e=dY(i["TIME-OFFSET"]);if(void 0===e)throw new m("HLSPlaylistParser - #EXT-X-START is missing a TIME-OFFSET: "+t+".");return{_Ot:e,gOt:"YES"===i.PRECISE}}(i);break;case"#EXT-X-DEFINE":Ft.cLt(B,"Ignoring unsupported #EXT-X-DEFINE: "+i+".");break;default:Ft.hB(B,"Ignoring unrecognized line or comment: "+i+".")}return{nyt:s,bD:n,vOt:r,Tn:h}}function RY(t,i){return t.map(t=>t.Uk===Zt.lz||t.KLt?t:Mo({},t,{KLt:CY(i)}))}function CY(t){const i=new DataView(new ArrayBuffer(16)),e=new Ui;return e.Ny(8),Qp(i,e,Wt.fromNumber(t)),new j(i.buffer)}function DY(t,i,e){Ft.hB(B,"Parsing M3U8 playlist at "+t+".");const s=new xY(e);if("#EXTM3U"!==s.uOt())throw new m("HLSPlaylistParser - Could not parse M3U8 playlist. Playlist does not start with #EXTM3U.");return function(t){return/^#EXT-X-(MEDIA|STREAM-INF|I-FRAME-STREAM-INF|SESSION-DATA|SESSION-KEY):/m.test(t)}(e)?function(t,i){let e;try{e=zd.xm(t)}catch(i){throw Ft.cLt(B,"The master playlist has no valid base URI: "+t+"."),new m("HLSPlaylistParser - Could not parse HLS master playlist: "+t)}let s={nyt:e,vOt:void 0,Tn:void 0,bD:void 0};const n=[],r=[],h=[],o=[];for(;;){const t=i.uOt();if(!t)break;try{const a=sY(t);switch(a){case"#EXT-X-MEDIA":{const i=aY(t,e);n.push(i);break}case"#EXT-X-STREAM-INF":{const s=uY(t,e,i.uOt());r.push(s);break}case"#EXT-X-I-FRAME-STREAM-INF":{const i=cY(t,e);h.push(i);break}case"#EXT-X-SESSION-DATA":Ft.cLt(B,"Ignoring unsupported #EXT-X-SESSION-DATA: "+t+".");break;case"#EXT-X-SESSION-KEY":{const i=lY(t,e);o.push(i);break}default:s=IY(s,t,a)}}catch(i){Ft.cLt(B,"Ignoring unparsable line: "+t,i)}}let a=s.bD;var u;const c=null!=(u=s.vOt)&&u,d=s.Tn;return void 0===a&&(Ft.cLt(B,"The playlist has no #EXT-X-VERSION, assuming version is 2."),a=2),a>=8&&(r.some(t=>void 0!==t.iyt)||h.some(t=>void 0!==t.iyt))&&(r.some(t=>void 0===t.iyt)||h.some(t=>void 0===t.iyt))&&Ft.cLt(B,"If one master playlist variant stream has a SCORE, all variants should have it."),{nyt:e,bD:a,vOt:c,Tn:d,pOt:h,MW:o,KD:n,mOt:r}}(t,s):function(t,i,e){let s={nyt:t,vOt:void 0,Tn:void 0,bD:void 0};const n=[];let r,h,o,a,u=!1,c=!1;const d=[],l=qh();let f,v,_,g,p,w,y,A,b,S=[],T=[],k=!1,E=!1;const P=[],x=[];let I,R,C,D,N,M=0,L=!1,O=Bn.pk,F=!1,U=0;try{N=zd.xm(t)}catch(i){throw Ft.cLt(B,"The media playlist has no valid base URI: "+t+".",i),new m("HLSPlaylistParser - Could not parse HLS media playlist.")}const V=e.Ly();for(;void 0===R||void 0===C;){const t=V.uOt();if(!t)break;try{switch(nY(t)){case"#EXT-X-MEDIA-SEQUENCE":R=hY(t);break;case"#EXT-X-DISCONTINUITY-SEQUENCE":C=hY(t)}}catch(i){Ft.cLt(B,"Ignoring unparsable line: "+t,i)}}void 0===R&&(Ft.hB(B,"#EXT-X-MEDIA-SEQUENCE tag is missing, assuming first segment media sequence number is 0."),R=0),void 0===C&&(Ft.hB(B,"#EXT-X-DISCONTINUITY-SEQUENCE tag is missing, assuming first segment discontinuity sequence number is 0."),C=0);let H=R,W=C;for(;;){const t=e.uOt();if(!t)break;let i=!1;try{const e=nY(t);switch(e){case"#EXTINF":i=!0,[f,v]=fY(t);break;case"#EXT-X-BYTERANGE":i=!0,_=gY(t,M),_&&(M=_.Tn+_.V);break;case"#EXT-X-DISCONTINUITY":i=!0,k=!0,W++;break;case"#EXT-X-KEY":{var q;i=!0;const e=lY(t,N);if(e.Uk===Zt.lz){l.clear(),b=void 0;break}var z;const s=null!=(z=null==(q=e.VLt)?void 0:q.toString())?z:"identity";l.set(s,e),e.Uk===Zt.kLt&&(b=e);break}case"#EXT-X-MAP":i=!0,p=pY(t,N),w=b;break;case"#EXT-X-PROGRAM-DATE-TIME":i=!0,y=mY(t);break;case"#EXT-X-GAP":i=!0,E=!0;break;case"#EXT-X-BITRATE":i=!0,A=hY(t);break;case"#EXT-X-TARGETDURATION":r=hY(t);break;case"#EXT-X-DATERANGE":{const i=wY(t);n.push(i);break}case"#EXT-X-PART":{i=!0;const e=AY(t,N);T.push(e);break}case"#EXT-X-PRELOAD-HINT":{const i=PY(t,N);P.push(i);break}case"#EXT-X-SKIP":{d.length>0&&Ft.cLt(B,"#EXT-X-SKIP must appear before any #EXTINF tags."),i=!0;const e=TY(t,H);U=e.hOt,D=e.oOt,H+=e.hOt;break}case"#EXT-X-SERVER-CONTROL":{const i=bY(t);u=i.$Lt,h=i.tOt,c=i.iOt,o=i.eOt,a=i.sOt;break}case"#EXT-X-RENDITION-REPORT":{const i=SY(t,N);x.push(i);break}case"#EXT-X-PART-INF":I=kY(t);break;case"#EXT-X-MEDIA-SEQUENCE":i&&Ft.cLt(B,"#EXT-X-MEDIA-SEQUENCE must appear before any media segment tags.");break;case"#EXT-X-DISCONTINUITY-SEQUENCE":i&&Ft.cLt(B,"#EXT-X-DISCONTINUITY-SEQUENCE must appear before any media segment tags.");break;case"#EXT-X-ENDLIST":L=!0;break;case"#EXT-X-PLAYLIST-TYPE":O=EY(t);break;case"#EXT-X-I-FRAMES-ONLY":F=!0;break;default:if(Vh(e,"#"))s=IY(s,t,e);else{g=zd.xm(t,N);const i=p?{nyt:p,wOt:w}:void 0,e={MW:RY(Ig(l),H),DU:S,yOt:T,ct:f,dq:v,AOt:k,nyt:{LAt:_,zE:g},bOt:i,SOt:y,ZLt:E,TOt:A,aOt:H,kOt:W};d.push(e),H++,S=[],T=[],f=void 0,v=void 0,k=!1,_=void 0,g=void 0,y=void 0,E=!1,A=void 0}}}catch(i){Ft.cLt(B,"Ignoring unparsable line: "+t,i)}}if(T.length){const t=p?{nyt:p,wOt:b}:void 0,i={MW:RY(Ig(l),H),DU:S,yOt:T,ct:f,dq:v,AOt:k,nyt:void 0,bOt:t,SOt:y,ZLt:E,TOt:A,aOt:H,kOt:W};d.push(i)}let G=s.bD;var X;const j=null!=(X=s.vOt)&&X,Q=s.Tn;void 0===G&&(Ft.cLt(B,"The media playlist has no #EXT-X-VERSION tag, assuming version is 2."),G=2),void 0===r&&Ft.cLt(B,"Could not parse the HLS media playlist: no #EXT-X-TARGET-DURATION tag was found.");const K=d.length,Y=K>0;Y||Ft.cLt(B,"The HLS media playlist contains no segments.");const J=Y&&d[K-1].yOt.length>0;return J&&void 0===I&&Ft.cLt(B,"Could not parse the HLS media playlist: no #EXT-X-PART-TARGET-DURATION tag was found, but it is required when some or all segments contain parts."),J&&void 0===a&&Ft.cLt(B,"Could not parse the HLS media playlist: The #EXT-X-SERVER-CONTROL tag has no PART-HOLDBACK attribute, but it is required when some or all segments contain parts."),{$Lt:u,tOt:h,iOt:c,EOt:n,kOt:C,POt:L,vOt:j,eOt:o,xOt:F,aOt:R,hOt:U,sOt:a,fLt:I,IOt:O,ROt:P,oOt:D,COt:x,DOt:r,ect:d,Tn:Q,nyt:N,BOt:i,bD:G}}(t,i,s)}r(),r();var BY=class{get nyt(){return this.IMt.nyt}get frt(){return this.ZRt}set frt(t){this.ZRt=t?MY(t):void 0,this.NOt=function(t,i){return!(void 0!==(null==t?void 0:t.yCt)&&void 0===(null==i?void 0:i.yCt)||void 0!==(null==t?void 0:t.bCt)&&void 0===(null==i?void 0:i.bCt))}(this.MOt,this.ZRt)}get LOt(){return this.NOt}get lLt(){return this.OOt}get FOt(){return this.OOt.filter(t=>t.Km===nl.Dk)}get UOt(){return this.OOt.filter(t=>t.Km===nl.Bk)}get VOt(){return this.OOt.filter(t=>t.Km===nl.OU)}get HOt(){return this.OOt.filter(t=>t.Km===nl.bLt)}WOt(t){for(const i of this.OOt){const e=i.IMt.WOt(t);if(void 0!==e)return e}}qOt(t){for(const i of this.OOt){const e=i.IMt.qOt(t);if(void 0!==e)return e}}zOt(t){oi(this.OOt,t)}constructor(t,i,e){var s,n,r,h;this.o=NY++,this.IMt=void 0,this.kW=void 0,this.iyt=void 0,this.uCt=void 0,this.plt=void 0,this.qLt=void 0,this.jLt=void 0,this.XLt=void 0,this.zLt=void 0,this.tyt=void 0,this.MOt=void 0,this.ZRt=void 0,this.NOt=!1,this.OOt=[],this.IMt=i,this.kW=t.kW,this.tyt=t.tyt,this.iyt=t.iyt,this.MOt=t.frt?MY(t.frt):void 0,this.ZRt=this.MOt,this.uCt=t.uCt,this.plt=t.plt,this.qLt=null!=(s=t.qLt)?s:"GOt"+this.o,this.jLt=null!=(n=t.jLt)?n:"XOt"+this.o,this.XLt=null!=(r=t.XLt)?r:"jOt"+this.o,this.zLt=null!=(h=t.zLt)?h:"QOt"+this.o,this.OOt=e}},NY=0;function MY(t){return Mo({},t,{bCt:t.bCt?Zy(t.bCt):void 0})}r(),r(),r();var LY=class{get EO(){var t;return this.OO+(null!=(t=this.KOt)?t:0)}get YOt(){return this.JOt}get ZOt(){return this.$Ot}get MW(){return this.tFt.MW}iFt(t,i,e){this.OO=t,this.JOt=i,this.$Ot=e}constructor(t,i,e,s,n,r){this.tFt=void 0,this.eFt=void 0,this.ct=void 0,this.nyt=void 0,this.JLt=void 0,this.ZLt=void 0,this.JOt=void 0,this.$Ot=void 0,this.OO=void 0,this.xet=void 0,this.KOt=void 0,this.tFt=t,this.eFt=i,this.OO=e,this.JOt=s,this.$Ot=n,this.ct=r.ct,this.nyt=r.nyt,this.JLt=r.JLt,this.ZLt=r.ZLt}},OY=class{get EO(){var t;return this.OO+(null!=(t=this.sFt)?t:0)}get nFt(){return this.OO}get ct(){return this.WA}get nyt(){return this.rFt}get YOt(){return this.JOt}get ZOt(){return this.$Ot}get yOt(){return this.hFt}get oFt(){return this.aFt}get PO(){var t;return this.EO+(null!=(t=this.WA)?t:this.aFt)}set KOt(t){this.sFt=t;for(const i of this.hFt)i.KOt=t}get KOt(){return this.sFt}uFt(t){return this.hFt[t]}cFt(t){for(let i=0;i=0;i--){const e=this.hFt[i];if(e.EO<=t)return e}}lFt(t){let i=this.dFt(t);for(;i&&!i.JLt&&i.eFt>0;)i=this.uFt(i.eFt-1);return i}iFt(t,i,e){const s=t.yOt.length!==this.hFt.length||e!==this.$Ot;this.JOt=i,this.$Ot=e,this.WA=t.ct,null!=this.SOt||(this.SOt=t.SOt),void 0===this.rFt&&(this.rFt=t.nyt),s&&this.fFt(t.yOt)}fFt(t){this.hFt.length>t.length&&(this.hFt.length=t.length);let i=0;for(let e=0;e=0;e--){const n=s[e],r=Jr(i,t=>t.o===n.o);r?n.er(r):t.WU(n)}for(const s of i){const i=s.nq;if(void 0!==i&&!t.m5(s.o)){const n=e(i),r=new VY(s,n);GY(t.L.II,r),t.tV(r)}}}function zY(t){const i=qh(),e=[];for(const s of t)if(i.has(s.o)){const t=i.get(s.o),e=Mo({},t,cS(s),{BLt:Mo({},t.BLt,s.BLt)});i.set(s.o,e)}else i.set(s.o,s),e.push(s.o);return e.map(t=>i.get(t))}function GY(t,i){const e=hf(t,t=>t.RLt===i.RLt);e&&e.ILt&&e.er({o:e.o,CLt:i.nq})}var XY=String.fromCharCode(95),jY=XY+"HLS_msn",QY=XY+"HLS_part",KY=XY+"HLS_skip",YY="HLSMediaPlaylist",JY=class{get POt(){if(0===this.fAt.length)return!1;return this.fAt[this.fAt.length-1].ZOt}get ct(){return this.WA}get Sx(){return this.N4}get IFt(){return this.RFt}get vLt(){return this.CFt}get fLt(){return this.DFt}get eOt(){return this.POt?0:this.BFt?this.BFt:this.CFt?3*this.CFt:void 0}get sOt(){var t;return null!=(t=this.NFt)?t:this.DFt?3*this.DFt:void 0}get $Lt(){return this.MFt}get tOt(){return this.LFt}get iOt(){return this.OFt}get IOt(){return this.FFt}get UFt(){return void 0!==this.fLt}get VFt(){if(this.POt)return!0;const t=zd.Mg()/1e3,i=this.HFt,e=this.WFt;return void 0!==i&&t-i=i.length?-1:e}$Ft(t){if(0===this.fAt.length)return;const i=Xq(ZY.Ng,this.fAt,t);if(!(i<0)){const e=this.fAt[i];return t===e.PO&&i+1=e.EO?e:this.$Ft(t)}WOt(t){const i=this.tUt(t);if(void 0===i)return;for(let e=i.aOt-this.fAt[0].aOt;e>=0;e--){const i=this.fAt[e];if(void 0!==i.SOt)return new Date(i.SOt.getTime()+1e3*(t-i.EO))}}qOt(t){let i;for(const e of this.fAt)if($Y(e))if(void 0===i)i=e;else{if(!(e.SOt.getTime()<=t.getTime()))break;i=e}if(void 0!==i)return i.EO+(t.getTime()-i.SOt.getTime())/1e3}iUt(t){switch(t){case Qu.SLt:return this.eUt;case Qu.TLt:return this.sUt;default:return}}iFt(t){var i;void 0===this.CFt&&(this.CFt=null!=(i=t.DOt)?i:this.nUt(t));void 0===this.BFt&&void 0!==t.eOt&&(this.BFt=t.eOt),void 0===this.DFt&&void 0!==t.fLt&&(this.DFt=t.fLt),void 0===this.NFt&&void 0!==t.sOt&&(this.NFt=t.sOt),this.MFt=t.$Lt,this.LFt=t.tOt,this.OFt=t.iOt,this.FFt=t.IOt,this.pAt(t),this.rUt(t);const e=Jr(t.ROt,t=>t.Km===Qu.SLt),s=Jr(t.ROt,t=>t.Km===Qu.TLt);this.eUt=e?{nyt:e.nyt,Km:e.Km,kOt:t.kOt}:void 0,this.sUt=s?{nyt:s.nyt,Km:s.Km,kOt:t.kOt}:void 0,this.qFt=zd.Mg()/1e3;const n=this.N4.An(this.N4.V-1);this.hUt();const r=this.N4.An(this.N4.V-1);(!this.GFt||r-n>0)&&(this.GFt=this.qFt),null!=this.MU||(this.MU=t.Tn)}hUt(){this.RFt=this.oUt(),this.N4=this.aUt(this.RFt),this.WA=this.uUt()}oUt(){const t=this.ect;if(0===t.length)return ve.iL();const i=t[0].EO,e=t[t.length-1].PO;return new ve([i,e])}aUt(t){if(0===t.V||this.POt)return t;const i=t.Tn(0),e=t.An(0)-this.cSt;return e{var i;return null!=(i=t.ct)?i:t.oFt}):1/0}nUt(t){let i;for(const e of t.ect)if(void 0!==e.ct){const t=_.max(1,_.round(e.ct));(void 0===i||i0&&this.fAt.splice(0,i.fUt);const r=t.hOt;if(r>0){if(r>this.fAt.length)throw new UY("New playlist skips over missing segments.");const i=this.fAt[r-1];if(void 0===i.ct)throw new UY("New playlist skips over an incomplete segment.");e=i.nFt+i.ct,n=i.kOt-t.kOt,s=r;for(let t=0;t0&&void 0===t.bOt){t=Mo({},t,{bOt:this.fAt[this.fAt.length-1].bOt})}const i=new OY(e,u,h,o,t);i.KOt=this.sFt,this.fAt.push(i)}void 0!==a&&(e+=a)}}lUt(t){if(0===this.fAt.length)return{fUt:0,vUt:0};const i=this.fAt[0].aOt,e=this.fAt[this.fAt.length-1].aOt,s=t.ect[0].aOt-t.hOt,n=t.ect[t.ect.length-1].aOt;let r=0,h=0;if(svoid 0!==t.SOt);if(void 0===e)return;const s=function(t){let i=0;for(const s of t){if(s.AOt)return;if(s.SOt)return[s,i];var e;i+=null!=(e=s.ct)?e:0}return}(i.ect);if(void 0===s)return;const[n,r]=s;if(e.kOt!==n.kOt)return;const h=(n.SOt.getTime()-e.SOt.getTime())/1e3;return e.nFt+h-r}(this.fAt,t))?o:function(t,i,e){const s=t[t.length-1];var n;const r=null!=(n=s.ct)?n:_.max(e,s.oFt),h=e*(i-s.aOt-1);return s.nFt+r+h}(this.fAt,s,this.CFt),Ft.uLt(YY,"New playlist (starting at "+s+") is entirely after previous playlist (ending at "+e+"), resetting playlist and restarting at "+h+"s"),r=this.fAt.length,this.dUt()}else{0;const t=li(this.fAt,t=>t.aOt===s);0,h=this.fAt[t].nFt,t>0&&(r=t)}}return{fUt:r,vUt:h}}rUt(t){let i=t.EOt.map($K);if(t.iOt&&t.BOt.rD===FY.gFt&&(i=this.XFt.concat(i)),this.XFt=zY(i),t.oOt)for(const i of t.oOt){const t=li(this.XFt,t=>t.o===i);t>=0&&ka(this.XFt,t)}}_Ut(t,i){if(this.sFt!==t){this.sFt=t;for(const t of this.fAt)t.KOt=this.sFt;this.hUt()}this.YFt=i}dUt(){this.sFt=void 0,this.YFt=void 0}constructor(t,i,e){this.nyt=void 0,this.qFt=void 0,this.GFt=void 0,this.eUt=void 0,this.sUt=void 0,this.CFt=void 0,this.DFt=void 0,this.BFt=void 0,this.NFt=void 0,this.fAt=[],this.XFt=[],this.sFt=void 0,this.MFt=!1,this.LFt=void 0,this.OFt=!1,this.FFt=Bn.pk,this.N4=ve.iL(),this.RFt=ve.iL(),this.WA=void 0,this.QFt=-1/0,this.MU=void 0,this.cUt=void 0,this.YFt=void 0,this.nyt=t,this.MU=i,this.cUt=e}},ZY=class t{static get Ng(){return null!=this.lAt||(this.lAt=new t),this.lAt}aAt(t){return t.EO}uAt(t){return t.PO}cAt(t,i){return gu(t,i)}dAt(t,i,e){return(t-i)/(e-i)}};function $Y(t){return void 0!==t.SOt}function tJ(t){return void 0!==t.yOt}function iJ(t){return tJ(t)?t.YOt:0===t.eFt&&t.tFt.YOt}function eJ(t,i){return tJ(t)?tJ(i)?t.aOt+1===i.aOt:0===i.eFt&&eJ(t,i.tFt):t.eFt===t.tFt.yOt.length-1?eJ(t.tFt,i):!tJ(i)&&t.tFt===i.tFt&&t.eFt+1===i.eFt}ZY.lAt=void 0,r(),r(),r();var sJ=class extends R{get name(){return"DiscontinuityMisalignmentError"}constructor(){super("Tried to wait for multiple discontinuity mappings at the same time")}};var nJ=class{gUt(t){const i=this.pUt.get(t);return void 0!==i&&rJ(i)}mUt(t){if(this.wUt()>t)return Promise.reject(new sJ);const i=[];for(const s of this.yUt){var e;if(st.Lot===i)||(h.IUt.push({Lot:i,RUt:e,CUt:s.JF(e.qD),DUt:n,BUt:r}),this.NUt(h,t)))}NUt(t,i){if(t.bU||!this.MUt(t))return;const e=function(t){return vf(t,hJ)}(t.IUt);t.bU=e.CUt.lF(e.RUt),t.AUt.Xy(),Yo(t.IUt),oi(this.yUt,i)}MUt(t){return this.LUt.length>0&&this.LUt.every(i=>t.IUt.some(t=>t.Lot===i))}bUt(t){if(this.pUt.has(t))return this.pUt.get(t);{const i={bU:void 0,AUt:new pa,IUt:[]};return this.pUt.set(t,i),i}}OUt(t){this.LUt=t,this.pUt.forEach((t,i)=>this.NUt(t,i))}FUt(){this.xUt=-1}wUt(){return this.xUt}zg(){this.pUt.forEach(t=>t.AUt.Zg()),this.pUt.clear()}constructor(){this.LUt=[],this.pUt=ar(),this.yUt=[],this.xUt=-1}};function rJ(t){return void 0!==t.bU}function hJ(t,i){return-function(t,i){if(t.BUt||i.BUt)return function(t,i){let e=t.lF(i);return t.vF()||i.vF()||(e.nF(DE())?e=e.lF(CE()):e.aF(DE().dF())&&(e=e.lO(CE()))),e}(t.RUt,i.RUt).sF($c.wF);return t.RUt.sF(i.RUt)}(t,i)||function(t,i){return t.DUt===i.DUt?Qc.rh:t.DUt?Qc.Fg:Qc.Ug}(t,i)||function(t,i){return t.CUt.sF(i.CUt)}(t,i)}var oJ=class{get UUt(){return this.VUt}get HUt(){return this.WUt}get mM(){return this.qUt}iFt(t,i){if(YK(t))if(0===this.WUt.length)this.zUt(t);else{if(!i)return void Ft.cLt("HLSModel","No rendition was provided to update the playlist. Ignoring the update.");i.IMt.iFt(t)}else{if(0!==this.WUt.length)return void Ft.cLt("HLSModel","Master playlist can only be applied once. Ignoring the update.");this.GUt(t)}}zUt(t){const i=this.XUt(t.nyt);i.iFt(t);const e=this.jUt(nl.Dk,i),s=this.jUt(nl.Bk,i),n=new BY({nyt:i.nyt,kW:0,tyt:0,iyt:NaN,frt:void 0,uCt:void 0,plt:0,WLt:[],GLt:void 0,QLt:void 0,qLt:void 0,jLt:void 0,XLt:void 0,zLt:void 0},i,[e,s]);this.WUt.push(n)}GUt(t){this.VUt.push(...t.MW);const i=this.QUt(t);for(const e of t.mOt){const s=i.filter(t=>uJ(t,e));this.KUt(e,s);const n=new BY(e,this.XUt(e.nyt,t.Tn),s);this.WUt.push(n)}}XUt(t,i){let e=this.YUt.get(t);return void 0===e&&(e=new JY(t,i,this.cUt),this.YUt.set(t,e)),e}QUt(t){const i=[];for(const e of t.KD)if(void 0===e.nyt){for(const s of t.mOt)if(aJ(e.Km,e.BMt,s)){const t=new bK(e,this.XUt(s.nyt));i.push(t)}}else{const t=new bK(e,this.XUt(e.nyt));i.push(t)}return i}jUt(t,i){return new bK({Km:t,nyt:void 0,BMt:"",bs:void 0,HLt:void 0,l:"",RMt:!0,CMt:!1,DMt:!1,LMt:void 0,NMt:void 0,hCt:void 0},i)}KUt(t,i){const e=i.filter(t=>t.Km===nl.Dk),s=i.filter(t=>t.Km===nl.Bk),n=t.frt&&(t.frt.bCt||t.frt.yCt);if((!n||t.frt.bCt)&&0===s.length){const e=this.jUt(nl.Bk,this.XUt(t.nyt));i.push(e)}if((!n||t.frt.yCt)&&0===e.length){const e=this.jUt(nl.Dk,this.XUt(t.nyt));i.push(e)}t.frt&&t.frt.ULt}JUt(t){for(const i of this.WUt)for(const e of i.lLt)if(e===t)return e}ZUt(t){for(const i of this.WUt)if(i===t)return i}$Ut(t){for(const i of this.WUt)if(pi(i.lLt,t))return i}zg(){Yo(this.WUt),Yo(this.VUt),this.YUt.clear(),this.qUt.zg()}constructor(t,i){this.WUt=[],this.VUt=[],this.YUt=qh(),this.qUt=new nJ,this.cUt=void 0,this.tVt=void 0,this.tVt=t,this.cUt=i}};function aJ(t,i,e){switch(t){case nl.Dk:return e.qLt===i;case nl.Bk:return e.jLt===i;case nl.OU:return e.XLt===i;case nl.bLt:return e.zLt===i}return!1}function uJ(t,i){return aJ(t.Km,t.BMt,i)&&(!t.MMt||t.IMt.nyt===i.nyt)}r();var cJ=class extends wp{constructor(t){super(vJ.iVt),this.UMt=void 0,this.UMt=t}};r();var dJ=class extends wp{constructor(t){super(vJ.eVt),this.UMt=void 0,this.UMt=t}};r();var lJ=class extends wp{constructor(){super(d.ey)}},fJ="HlsModelUpdater",vJ=function(t){return t.iVt="sVt",t.eVt="nVt",t}({}),_J=class extends Ne{get rVt(){return this.hVt}get oVt(){return this.aVt}get Br(){return this.uyt}get uVt(){return this.cVt}async dVt(t){const i=this.uyt.tVt;if(!i)throw new m("HLSModelUpdater - Could not load HLS playlist: The provided source is empty.");this.So(new Pt);const e=await this.lVt(i,{},2,!0,t),s=e.IMt;if(!KK(s)&&!YK(s))throw new m("HLSModelUpdater - Could not load HLS playlist: The playlist is invalid.");KK(s)||Ft.hB(fJ,"Detected media playlist only HLS stream."),this.fVt(s),e.vVt&&(this.aVt=!0,await this._Vt(t)),this.hVt=!0}async gVt(t,i,e,s){const n=this.uyt.JUt(t);if(!n)throw new m("HLSModelUpdater - Could not load HLS playlist for rendition: the rendition does not exist on the internal model.");const r={aOt:i,JFt:e,rD:wJ(n)},h=on(_.max(1,3*t.IMt.WFt));try{await this.pVt(n,r,s,h)}catch(t){throw sa(t),this.mVt(n),t}}wVt(t,i){const e=this.uyt.JUt(t);if(!e)throw new m("HLSModelUpdater - Could not load HLS playlist for rendition: the rendition does not exist on the internal model.");const s={aOt:void 0,JFt:void 0,rD:wJ(e)},n=on(_.max(1,3*t.IMt.WFt));return this.pVt(e,s,i,n)}yVt(t,i){return this.AVt.has(t.jI)||this.AVt.set(t.jI,new pa),Nc(this.AVt.get(t.jI).Qy,i)}mVt(t){this.So(new dJ(t))}async pVt(t,i,e,s){const n=t.IMt.hLt(i);let r;try{r=(await this.lVt(n,i,0,this.aVt,e,s)).IMt}catch(i){throw sa(i),t.IMt.jFt=zd.Mg(),i}if(!YK(r))throw new m("HLSModelUpdater - Could not load HLS playlist for rendition: the playlist is not a media playlist.");if(this.bVt&&t!==this.bVt&&!this.bVt.IMt.VFt)try{await this.wVt(this.bVt,e)}catch(i){sa(i),this.bVt=t,this.SVt()}try{this.fVt(r,t)}catch(n){if(n instanceof UY&&void 0!==i.rD){const n=Mo({},i,{rD:void 0});return this.pVt(t,n,e,s)}throw n}this.bVt=t}async lVt(t,i,e,s,n,r){if(Ft.hB(fJ,"Loading HLS playlist at "+t+"."),s){const i=await this.TVt(t,n);if(void 0!==i)return{IMt:i,vVt:!0}}return{IMt:await this.kVt(t,i,e,n,r),vVt:!1}}async TVt(t,i){try{const e=await this.eut.HSt([t]);if(ii(i),void 0!==e)return DY(e.responseURL,{},e.data)}catch(t){sa(t)}}async kVt(t,i,e,s,n){const r={Yu:t,dk:M.NT,zk:this.FSt,Uk:X.GET,Km:Al.wk,Yg:s,Vk:n},h=await $i(()=>this.EVt(r),s,e);return DY(h.gk,i,h.ck)}async EVt(t){try{const i=await this.nV.lk(t);return{ck:await i.UT(),gk:i.gk}}catch(t){throw D(t)||this.So(new lJ),t}}async _Vt(t){ii(t);const i=[];for(const e of this.uyt.HUt)for(const s of e.lLt)i.push(this.PVt(s,t));await Promise.all(i)}async PVt(t,i){try{const e=await this.eut.HSt([t.IMt.nyt]);ii(i),void 0===e||t.IMt.VFt||await this.wVt(t,i)}catch(t){sa(t)}}SVt(){for(const t of this.uyt.HUt)for(const i of t.lLt)i!==this.bVt&&void 0!==i.IMt.KOt&&(i.IMt.VFt?this.xVt(i):i.IMt.dUt())}xVt(t){if(0!==t.IMt.ect.length){if(!this.bVt)return this.bVt=t,void this.bVt.IMt._Ut(0,void 0);if(this.IVt(this.bVt),!this.IVt(t)&&void 0===t.IMt.KOt){const i=this.RVt(t,this.bVt);Ft.uLt(fJ,"Assuming global timeline offset of "+i+"s for rendition "+t.IMt.nyt+"."),t.IMt._Ut(i,void 0)}}}RVt(t,i){if(gJ(t)){const e=t.IMt.ect[0],s=i.IMt.ect[0];return Ft.uLt(fJ,"Synchronizing by start of VOD: "+s.EO+" vs "+e.EO),s.EO-e.nFt}const e=function(t,i){let e=t.length-1,s=i.length-1;for(;e>=0&&s>=0;){const n=t[e],r=i[s];if(n.kOt>r.kOt)e--;else if(n.kOtvoid 0!==t.xet&&i.gUt(t.kOt))}(i.IMt.ect,this.uyt.mM);if(void 0===e)return!1;if(i.IMt.KFt===e.kOt)return!0;const s=this.uyt.mM.kUt(e.xet,e).iF()-e.nFt;return Ft.uLt(fJ,"Synchronize by media timestamp: "+s+"s for rendition "+t.IMt.nyt+"."),i.IMt._Ut(s,e.kOt),(void 0===this.bVt||void 0===this.bVt.IMt.KFt||this.bVt.IMt.KFtt.IMt===i);void 0!==s&&void 0!==t.bCt&&(s.frt=tY(s.frt,t));const n=Jr(e.FOt,t=>t.IMt===i);void 0!==n&&void 0!==t.yCt&&(n.frt=tY(n.frt,t)),e.LOt||void 0===s&&void 0===n||(e.frt=tY(e.frt,t))}}DVt(t,i){for(const e of this.uyt.HUt){const s=Jr(e.UOt,t=>t.IMt===i);void 0!==s&&void 0===t.bCt&&e.zOt(s);const n=Jr(e.FOt,t=>t.IMt===i);void 0!==n&&void 0===t.yCt&&e.zOt(n)}}zg(){this.Vo(),this.uyt.zg(),this.AVt.forEach(t=>t.Zg()),this.AVt.clear()}constructor(t,i,e,s,n){super(),this.nV=void 0,this.eut=void 0,this.FSt=void 0,this.uyt=void 0,this.hVt=void 0,this.aVt=void 0,this.bVt=void 0,this.cVt=void 0,this.AVt=void 0,this.nV=t,this.eut=i,this.FSt=e,this.hVt=!1,this.aVt=!1,this.bVt=void 0,this.cVt=void 0,this.AVt=ar(),this.uyt=new oJ(s,n)}};function gJ(t){return t.IMt.POt||t.IMt.IOt===Bn.xLt}function pJ(t){const i=t.IMt.ect;return i[i.length-1].PO}function mJ(t){return hf(t,t=>void 0!==t.SOt)}function wJ(t){if(void 0!==t.IMt.tOt&&!t.IMt.POt&&!(void 0===t.IMt.HFt||zd.Mg()/1e3-t.IMt.HFt>=t.IMt.tOt/2))return t.IMt.iOt?FY.gFt:FY._Ft}var yJ=class extends es{rUt(t){if(0===t.IMt.EOt.length)return;this.BVt||(this.BVt=this.JU.tI(Ao.VU,void 0,void 0,void 0,void 0,nh.DATE_RANGE),this.tt(this.BVt));qY(this.BVt,t.IMt.EOt,i=>{var e;return null!=(e=t.IMt.qOt(i))?e:NaN})}ZU(t,i,e){const s=Ut(t,i,e);return this.BVt===t&&(this.BVt=s),s}constructor(t,i){super(i),this.Fkt=void 0,this.BVt=void 0,this.NVt=t=>{this.rUt(t.UMt)},this.Fkt=t,this.Fkt.wn(vJ.iVt,this.NVt)}};r();var AJ=class extends wp{constructor(){super(AK.TMt)}};r(),r(),r();var bJ=class{get MVt(){return this.Y2}get IP(){return XU(this.Trt.IP,this.Trt.M3)}get ect(){return this.fAt}get _pt(){return this.dpt}LVt(t){var i;return null==(i=this.OVt(t))?void 0:i.UMt}FVt(t){this.Y2=t,this.UVt()}Odt(t,i,e,s,n,r){this.fAt.push({UMt:t,$at:i,VVt:ve.tL(n,r),HVt:ve.tL(e,s)}),this.UVt()}OVt(t){return Jr(this.fAt,i=>i.HVt.Cr(t))}mat(t){return Jr(this.fAt,i=>i.$at===t)}Rct(t,i){return Jr(this.fAt,e=>e.UMt===t&&eJ(e.$at,i))}C3(){const t=this.IP;t.V>0&&(this.dpt=t.An(t.V-1))}UVt(){const t=this.Trt.IP;this.fAt=this.fAt.filter(i=>0!==t.Mn(i.HVt).V)}constructor(t){this.Trt=void 0,this.fAt=void 0,this.Y2=void 0,this.dpt=void 0,this.Trt=t,this.fAt=[],this.Y2=void 0,this.dpt=void 0}};r();var SJ=188,TJ=function(t){return t[t.pk=0]="pk",t[t.fR=1]="fR",t[t.WVt=2]="WVt",t[t.qVt=3]="qVt",t}({});function kJ(t){return EJ(t)?1:function(t){return function(t){if(t.length<376)return-1;const i=t.length<564?2:3,e=_.min(1e3,t.length-i*SJ);for(let s=0;s<=e;s++){let e=!0;for(let n=0;n=0}(t)?2:function(t){return null!==iL(dh(t),new Ui)}(t)?3:0}function EJ(t){const i=ao(t,0,_.min(t.length,16384));return jt.ED(dh(i))}var PJ=class{get Km(){return this.Vp}get zVt(){return this.Dot}get GVt(){return this.XVt}get $It(){return void 0!==this.jVt}get QVt(){return this.KVt}YVt(){if(this.$It)throw new m("Cannot perform new operation while BufferAppender is still busy")}JVt(t){this.$y!==t&&(this.YVt(),this.$y=t,this.Dot=new bJ(t))}ZVt(){return this.jVt?this.jVt.Qy:Promise.resolve()}$Vt(t){const i=this.Dot._pt;return void 0!==i&&this.tHt(t,i)}tHt(t,i){var e;const s=_.min(t,i);var n;return null!=(n=null==(e=this.Dot.IP.CM().UM(this.GVt).JM(s))?void 0:e.Cr(i))&&n}iHt(t){return this.Dot.LVt(t)}Zg(){this.nT.Zg(),this.nT=new at,this.eHt=!0}z2(t){this.YVt(),this.jVt=new pa;const i=i=>{this.nHt.sHt(t),this.rHt(i)};this.G2(t,this.nT.Yg).then(i,i)}async G2(t,i){Ft.uLt(MK,"Appending initializer",we(t.hHt.nyt)),this.Ugt=t,await this.$y.z2(t,i),void 0!==this.hBt&&this.Vp===Ci.Bk&&EJ(t.ck.ck)&&this.hBt.Jrt(t.ck.ck),Ft.uLt(MK,"Appended initializer",we(t.hHt.nyt)),this.eHt=!1,this.Dot.FVt(t)}cdt(t){this.YVt(),this.jVt=new pa;const i=i=>{this.nHt.sHt(t),this.rHt(i)};this.oHt(t,this.nT.Yg).then(i,i)}async oHt(t,i){const e=t.UMt;if(void 0===e.IMt.vLt)throw new m("HlsBufferAppender: Cannot append HLSAsset to "+this.Vp+" buffer for a HLSRendition with an undefined targetDuration.");this.eHt&&void 0!==this.Ugt&&await this.G2(this.Ugt,i);const s=this.Dot.IP.kM,n=this.$y.IP;Ft.uLt(MK,"Appending",we(t.hHt.nyt)),await this.$y.H2(t,i),void 0!==t.ck&&this.aHt(t.ck,t),Ft.uLt(MK,"Appended",we(t.hHt.nyt),s,this.Dot.IP.kM);const r=t.EO,h=r+t.ct,o=t.hHt,a=o.EO;var u;const c=o.EO+(null!=(u=o.ct)?u:0);this.Dot.Odt(e,o,r,h,a,c),this.uHt(e,o,r,h,n),t.hHt.ZOt&&this.Dot.C3()}uHt(t,i,e,s,n){if(this.Km!==Ci.Bk)return;const r=this.$y.IP.UM(n),h=this.Dot.Rct(t,i);if(h)if(this.cHt(h))if(0===r.V){if(void 0===this.Dot.mat(i)){const t=this.$y.M3.Mn(new ve([e,s]));this.XVt=this.XVt.OM(t)}}else{const t=r.Tn(0),i=new ve([t,s]);if(this.XVt=this.XVt.UM(i),t>e){const i=this.$y.M3.Mn(new ve([e,t]));this.XVt=this.XVt.OM(i)}}else{const t=r.V>0&&r.Tn(0)e?s:e;if(t>h){const t=this.$y.M3.Mn(new ve([h,r.Tn(0)]));this.XVt=this.XVt.OM(t)}}}cHt(t){const i=t.HVt,e=i.Tn(0),s=i.An(i.V-1),n=i.PM(0),r=i.IM(i.V-1);return this.XVt.HM(e,s,n,r)}aHt(t,i){var e;if(!EJ(t.ck))return;const s=i.EO,n=s+i.ct,r=i.bU;if(null==(e=this.wpt)||e.Odt(t.ck,s,r),void 0!==this.hBt&&this.Vp===Ci.Bk){const e=i.hHt.ZOt;this.hBt.Odt(t.ck,s,n,r,i.UMt,e)}const h=[];void 0!==this.wpt&&h.push(this.wpt),void 0!==this.hBt&&h.push(this.hBt),$P(this.$y.IP,h)}dHt(t){this.YVt(),this.jVt=new pa;try{Ft.uLt(MK,"Appending gap from "+t.lHt+" to "+t.fHt,we(t.$at.nyt)),this.F3(t.lHt,t.fHt)}finally{this.nHt.sHt(t),this.rHt()}}F3(t,i){this.$y.F3(t,i)}constructor(t,i,e,s,n,r,h){this.$y=void 0,this.Dot=void 0,this.nHt=void 0,this.Vp=void 0,this.wpt=void 0,this.hBt=void 0,this.vHt=void 0,this.jVt=void 0,this.nT=new at,this.XVt=ve.iL(),this._Ht=void 0,this.Ugt=void 0,this.eHt=!0,this.KVt=!1,this.rHt=t=>{this.jVt&&(t?FD(t)&&xJ(this)?this.vHt.YY(this.$y.IP.ZM)?this.jVt.Xy():this.jVt.jy(t):D(t)?this.jVt.Xy():(this.KVt=!0,this.jVt.jy(t)):this.jVt.Xy(),this.jVt=void 0)},this.Vp=t,this.nHt=e,this.$y=i,this.Dot=s,this.vHt=n,this.wpt=r,this.hBt=h}};function xJ(t){return RT(t.Km)}r(),r();var IJ=class{async gHt(t,i,e,s){const n=await this.pHt(i,s);return await this.mHt.gHt(t,n,e)}async pHt(t,i){var e;if((null==(e=this.wHt)?void 0:e.Yu)!==t){Ft.uLt("HLSDecryptor","Fetching new AES-128 decryption key from "+t+".");const e=await this.nV.lk({Yu:t,dk:M.CT,Uk:X.GET,Yg:i,Km:Al.bk,Wk:Xa.Ck,zk:this.FSt}),s=await e.HT(),n=new j(s);this.wHt={Yu:t,ck:n}}return this.wHt.ck}constructor(t,i,e){this.mHt=void 0,this.nV=void 0,this.FSt=void 0,this.wHt=void 0,this.mHt=t,this.nV=i,this.FSt=e,this.wHt=void 0}};r();var RJ=class{async lk(t,i,e,s,n){const r=await this.yHt(t,i,e,M.CT,s,n),h=await r.HT(n);return{httpStatusCode:r.hk,response:new j(h)}}async AHt(t,i,e,s,n){return(await this.yHt(t,i,e,M.BT,s,n)).WT(n)}async yHt(t,i,e,s,n,r){let h;t.LAt&&(h=QK(t.LAt.Tn,t.LAt.V),0===h[0]&&h[1]===Xl&&(h=void 0));const o=h?{Range:"bytes="+h[0]+"-"+h[1]}:void 0,a=new $n({Yu:t.zE,dk:s,fk:o,zk:this.FSt,Uk:X.GET,Km:i,Wk:e,qk:this.Tat,jk:s===M.BT,Gk:n,Yg:r});try{const i=await this.eut.iut(t.zE,h);if(ii(r),void 0!==i)return null==n||n(i.buffer.byteLength,i.buffer.byteLength),new sc({lk:a,dk:a.dk,ck:i.buffer})}catch(t){sa(t)}return await $i(()=>Nc(this.nV.lk(a),a.Yg),r,this.rrt)}constructor(t,i,e,s,n=2){this.nV=void 0,this.eut=void 0,this.Tat=void 0,this.FSt=void 0,this.rrt=void 0,this.nV=t,this.eut=i,this.Tat=e,this.FSt=s,this.rrt=n}};r();var CJ=class{bHt(){return this.SHt.IMt.$Lt}async THt(t,i,e){if(!this.bHt())throw new m("Could not perform blocking playlist update.");const s=this.kHt,n={aOt:t,JFt:i};return void 0!==s&&function(t,i,e){if(t.aOt===i.aOt){if(t.JFt===i.JFt)return!0;if(0===t.JFt&&void 0===i.JFt)return!0}if(t.aOt===i.aOt+1&&0===t.JFt&&void 0!==i.JFt){const t=e.mat(i.aOt);if(t&&t.nyt&&i.JFt>=t.yOt.length)return!0}return!1}(s,n,this.SHt.IMt)||(await this.EHt(),this.PHt(n)),this.Fkt.yVt(this.SHt,e)}xHt(t){return this.PHt(),this.Fkt.yVt(this.SHt,t)}PHt(t){if(!this.IHt&&!this.RHt){const i=()=>{this.IHt=void 0};this.IHt=this.CHt(t,this.DHt.Yg).then(i,i)}}async EHt(){this.IHt&&(this.DHt.Zg(),this.DHt=new at,await this.IHt.catch(Ct),this.IHt=void 0)}async CHt(t,i){let e=t;for(;;){if(ii(i),this.SHt.IMt.POt&&this.SHt.IMt.VFt)return;null!=e||(e=this.BHt()),this.kHt=e;try{if(e)await this.Fkt.gVt(this.SHt,e.aOt,e.JFt,i);else{const t=zd.Mg()-this.En,e=1e3*this.SHt.IMt.WFt;t=t)return!0;if(s=t}LHt(t,i){const e=[];for(let s=0;s0)){if(s+r<=e)return Ft.uLt(ms,"Extracting the read data range for extraction of "+we(this.rFt)),t.enqueue(n),this.qHt(),Wr(this.readAndSliceOutAssetBytes(t));{const i=e-s,h=gl(n,0,i),o=gl(n,i);return h.length>0&&(Ft.uLt(ms,"Extracting "+h.length+" bytes for extraction of "+we(this.rFt)),t.enqueue(h)),Ft.uLt(ms,"Of the read "+r+" bytes, the last "+o.length+" will be stored locally for extraction of "+we(this.rFt)),this.XHt.FHt(s+i,o),Ft.uLt(ms,"Extraction of "+we(this.rFt)+" completed as the entire request has been fulfilled."),this.QHt(t),void(this.KHt&&(Ft.uLt(ms,"Aborting stream upstream as no more bytes are needed from "+we(this.rFt)+"."),await this.Wd.WHt("AssetExtraction - AbortOnEnd")))}}{const i=gl(n,0,h),e=gl(n,h);if(Ft.uLt(ms,"Of the read "+r+" bytes, the first "+h+" will be stored locally for extraction of "+we(this.rFt)),this.XHt.FHt(s,i),e.length>0)return Ft.uLt(ms,"Extracting "+e.length+" bytes for extraction of "+we(this.rFt)),t.enqueue(e),this.qHt(),Wr(this.readAndSliceOutAssetBytes(t))}}}catch(i){Ft.uLt(ms,"Extraction of "+we(this.rFt)+" completed as the entire source stream has been read."),this.QHt(t)}}QHt(t){t.close(),this.qHt(),this.YHt.Xy()}start(t){Ft.uLt(ms,"Preparing to push all collected data to controller for extraction of "+we(this.rFt)),this.GHt(t),Ft.uLt(ms,"Collected data pushed to controller for extraction of "+we(this.rFt));const{FAt:i}=OJ(this.rFt.LAt);this.Wd.UHt>=i?(Ft.uLt(ms,"Extraction of "+we(this.rFt)+" completed as the entire request has been fulfilled."),this.QHt(t)):(Ft.uLt(ms,"Continuing read from original stream for extraction of "+we(this.rFt)),Wr(this.readAndSliceOutAssetBytes(t)))}get JHt(){return this.YHt.Qy}pull(){return this.jHt.Xy(),this.jHt=new pa,this.zHt.Qy}constructor(t,i,e,s){this.rFt=void 0,this.Wd=void 0,this.XHt=void 0,this.KHt=void 0,this.jHt=void 0,this.zHt=void 0,this.YHt=new pa,this.rFt=t,this.Wd=i,this.XHt=e,this.KHt=s,this.jHt=new pa,this.zHt=new pa}},LJ=class{fO(t){if(!JK(this.rFt,t))return!1;const{OAt:i,FAt:e}=OJ(t.LAt);return this.XHt.NHt(this.ZHt.UHt,i,e)}async ygt(t,i){void 0===i&&(i=!1);const e=this.ZHt,s=this.XHt;if(Ft.hB(ms,"Extracting data from "+we(t)+" out of "+we(this.rFt)),this.$Ht&&(Ft.uLt(ms,"Awaiting previous extraction before extracting "+we(t)+" out of "+we(this.rFt)),await this.$Ht),!this.fO(t))throw new m("The extractor does not contain the data requested");const n=new MJ(t,e,s,i);return this.$Ht=n.JHt,new HA(n)}constructor(t,i){this.rFt=void 0,this.XHt=void 0,this.ZHt=void 0,this.$Ht=void 0,this.rFt=i;const{OAt:e}=OJ(this.rFt.LAt);this.ZHt=new NJ(t,e),this.XHt=new BJ}};function OJ(t){if(t){const i=t.Tn;return{OAt:i,FAt:void 0!==t.V?i+t.V:Xl}}return{OAt:0,FAt:Xl}}var FJ=class{async Un(){const t=await this.tWt.AHt(this.rFt,Al.Ak,Xa.pk,void 0,this.nT.Yg);return new LJ(t,this.rFt)}fO(t){return JK(this.rFt,t)}async ygt(t,i){void 0===i&&(i=!1);const e=await this.Dpt;return await Nc(e.ygt(t,i),this.nT.Yg)}Zg(){this.Dpt.catch(Ct),this.nT.Zg()}constructor(t,i){this.rFt=void 0,this.tWt=void 0,this.nT=void 0,this.Dpt=void 0,this.rFt=t,this.tWt=i,this.nT=new at,this.Dpt=this.Un()}};r();var UJ=class extends wp{constructor(t){super(XJ.iWt),this.qk=void 0,this.qk=t}};r();var VJ=class extends wp{constructor(t,i,e,s,n,r,h){super(XJ.eWt),this.uri=void 0,this.sWt=void 0,this.qk=void 0,this.mediaSequenceNumeber=void 0,this.mediaTrackId=void 0,this.nWt=void 0,this.httpStatusCode=void 0,this.uri=t,this.sWt=i,this.qk=e,this.mediaSequenceNumeber=s,this.mediaTrackId=n,this.nWt=r,this.httpStatusCode=h}};function HJ(t,i,e){const s=tJ(e)?e:e.tFt;if(i.gUt(s.kOt)){if(void 0!==e.xet)return i.kUt(e.xet,e).iF();if(e!==s&&void 0!==s.xet){const t=i.kUt(s.xet,s).iF();return e.EO+(t-s.EO)}}const n=t.IMt.mat(s.aOt-1);if(void 0!==n&&i.gUt(n.kOt)){if(n.yOt.length>0){const t=n.uFt(n.yOt.length-1);if(void 0!==t.xet){const s=i.kUt(t.xet,t).iF();return e.EO+(s-t.EO)}}if(void 0!==n.xet){const t=i.kUt(n.xet,n).iF();return e.EO+(t-n.EO)}}const r=t.IMt.mat(s.aOt+1);if(void 0!==r&&i.gUt(r.kOt)){if(r.yOt.length>0){const t=r.uFt(0);if(void 0!==t.xet){const s=i.kUt(t.xet,t).iF();return e.EO+(s-t.EO)}}if(void 0!==r.xet){const t=i.kUt(r.xet,r).iF();return e.EO+(t-r.EO)}}return e.EO}function WJ(t){return void 0!==t.xet}function qJ(t,i,e,s){for(let n=i;n=0;n--){const i=t[n];if(i.kOt!==e)break;if(WJ(i)){if(s(i,n))break}}}r();var GJ="HlsPlaylistDownloader",XJ=function(t){return t.iWt="rWt",t.eWt="hWt",t}({}),jJ=class extends Ne{oWt(t){this.aWt.zg(),this.aWt=new CJ(this.Fkt,t),this.$It?this.uWt=t:(this.SHt=t,this.cWt=0,this.dWt=void 0,this.lWt=void 0,this.fWt=!1)}get $It(){return void 0!==this.vWt}get _Wt(){return this.fWt}ZVt(){return this.vWt?this.vWt.Qy:Promise.resolve()}gWt(){return this.nHt.gWt()}Zg(){var t,i,e;this.pWt.Zg(),this.pWt=new at,null==(t=this.mWt)||t.Zg(),this.mWt=void 0,null==(i=this.wWt)||i.Zg(),null==(e=this.yWt)||e.Zg(),this.wWt=void 0,this.yWt=void 0,this.cWt=0,this.dWt=void 0,this.lWt=void 0,this.fWt=!1}zg(){this.aWt.zg()}get UMt(){var t;return null!=(t=this.uWt)?t:this.SHt}get ERt(){if(!this.SHt.IMt.POt||void 0===this.dWt)return!1;const t=this.SHt.IMt.mat(this.dWt);if(!t.ZOt)return!1;if(void 0!==this.lWt){if(!t.uFt(this.lWt).ZOt)return!1}return!0}AWt(t){const i=this.SHt.IMt.$Ft(t);if(!i)return!1;if(void 0!==this.dWt){const e=i.aOt===this.dWt;return void 0!==this.lWt?i.cFt(t)===i.uFt(this.lWt)&&e:e}return!1}bWt(t){let i;var e;if(!this._Wt&&(void 0===this.dWt||t=r&&(i=this.SWt(t))}else if(this.SHt.IMt.POt&&void 0!==this.dWt){if(this.SHt.IMt.mat(this.dWt).ZOt&&(i=this.SWt(t),void 0!==i&&i[0].aOt===this.dWt))return}if(i){this.cWt=t;const[e,s]=i;return 0===(null==s?void 0:s.eFt)&&void 0!==e.ct?[e,void 0]:[e,s]}}SWt(t){let i,e;const s=this.SHt.IMt.ect;if(0===s.length)return;const n=this.Fkt.Br.mM,r=$c.eU(t),h=function(t,i,e){const s=t.IMt.ect;if(0===s.length)return;const n=t.IMt.tUt(e.iF());if(!i.gUt(n.kOt))return;const r=n.aOt-s[0].aOt,h=n.kOt;let o,a,u,c=0;if(zJ(s,r,h,(t,i)=>(o=t,c=i,!0)),void 0===o&&(qJ(s,r+1,h,(t,i)=>(o=t,c=i,!0)),void 0===o))return;return i.kUt(o.xet,o).hF(e)?(a=o,qJ(s,c+1,h,t=>i.kUt(t.xet,t).eF(e)?(u=t,!0):(a=t,!1))):(u=o,zJ(s,c-1,h,t=>i.kUt(t.xet,t).hF(e)?(a=t,!0):(u=t,!1))),void 0!==a&&void 0!==u?[a,u]:void 0}(this.SHt,n,r);let o;if(void 0!==h){const[t,i]=h,e=n.kUt(t.xet,t),s=n.kUt(i.xet,i),a=r.lF(e).iF()/s.lF(e).iF()*(i.EO-t.EO);o=t.EO+a}else o=t;const a=s[s.length-1];return a.PO<=o?(i=a,e=a.lFt(o)):s[0].EO>o?(i=s[0],e=i.uFt(0)):(i=this.SHt.IMt.$Ft(o),e=null==i?void 0:i.lFt(o)),i?[i,e]:void 0}TWt(t,i){let e,s;if(e=this.SHt.IMt.mat(t),e&&void 0!==i){if(0===e.yOt.length)return[e,void 0];s=e.uFt(i+1)}return void 0!==e&&void 0!==s||(e=this.SHt.IMt.mat(t+1),s=null==e?void 0:e.uFt(0)),e?[e,s]:void 0}YVt(){if(this.$It)throw new m("Cannot perform new operation while PlaylistDownloader is still busy")}kWt(t){this.YVt(),this.vWt=new pa,this.EWt(t,this.pWt.Yg).then(this.PWt,this.PWt)}xWt(){this.aWt.PHt()}async EWt(t,i){if(this.SHt.IMt.POt)return;let e=this.bWt(t);for(!e&&this.aWt.bHt()&&void 0!==this.dWt&&(await this.aWt.THt(void 0===this.lWt?this.dWt+1:this.dWt,void 0!==this.lWt?this.lWt+1:void 0,i),e=this.bWt(t)),!e&&this.aWt.bHt()&&void 0!==this.dWt&&(await this.aWt.THt(this.dWt+1,0,i),e=this.bWt(t));!e;){Ft.hB(GJ,"No next segment / part available, need to update playlist before continuing."),await this.aWt.xHt(i);const s=this.UMt.IMt.ect;s[0].EO>t&&(this.lWt=void 0,this.dWt=void 0,this.fWt=!1);s[s.length-1].aOt{throw sa(t),this.SHt.IMt.jFt=zd.Mg(),this.Fkt.mVt(this.SHt),t}).then(this.PWt,this.PWt)}async NWt(t,i,e,s){let n;if(t.bOt){var r,h;if(!e||!ZK(e.hHt.nyt,null==(r=t.bOt)?void 0:r.nyt)||t.kOt!==e.kOt){var o;null==(o=this.mWt)||o.Zg(),this.mWt=new pa;const i=this.MWt(t.bOt,t,s).then(()=>{this.mWt=void 0});this.mWt.$g(i)}n=null==(h=this.mWt)?void 0:h.Qy}t.ZLt||i&&i.ZLt?await this.LWt(t,i,n,s):await this.OWt(t,i,n,s)}async MWt(t,i,e){const s=await this.FWt(t,i,e),n=s.bOt.ck.ck.byteLength;this.nHt.UWt(s),this.So(new VJ(s.bOt.hHt.nyt,s.Km,this.Vp,i.aOt,s.UMt.jI,n,s.bOt.Iut)),Ft.uLt(MK,"Download initializer complete",we(t.nyt))}async OWt(t,i,e,s){const n=await this.VWt(t,i,s),r=n.$at.ck.ck.byteLength;var h;e&&await Nc(e,s),this.nHt.UWt(n),this.So(new VJ(n.$at.hHt.nyt,n.Km,this.Vp,t.aOt,n.UMt.jI,r,n.$at.Iut)),Ft.uLt(MK,"Download complete",we(null!=(h=null==i?void 0:i.nyt)?h:t.nyt))}async LWt(t,i,e,s){const n=this.HWt(t,i);var r;e&&await Nc(e,s),this.nHt.UWt(n),Ft.uLt(MK,"Download gap complete",we(null!=(r=null==i?void 0:i.nyt)?r:t.nyt))}async VWt(t,i,e){let s;if(i){if(this.wWt)if(this.wWt.fO(i.nyt)){const t=await this.wWt.ygt(i.nyt),n=await bn(t,e),r=new j(n);s=KJ(i,await this.gHt(r,i.MW,e),200)}else this.wWt.Zg(),this.wWt=void 0;s||(Ft.uLt(MK,"Start download",we(i.nyt)),s=await this.WWt(i,e))}else Ft.uLt(MK,"Start download",we(t.nyt)),s=await this.yat(t,e);return this.dWt=t.aOt,this.lWt=null==i?void 0:i.eFt,this.fWt=!1,{Km:"$at",$at:s,UMt:this.SHt,kOt:t.kOt}}async FWt(t,i,e){let s;if(this.yWt){var n;if(this.yWt.fO(t.nyt)){const n=await Nc(this.yWt.ygt(t.nyt),e),r=await bn(n,e),h=new j(r);s=QJ(t,i,await this.gHt(h,t.wOt?[t.wOt]:[],e),200)}Ft.hB(GJ,"MAP is required for segment, downloading MAP data."),null==(n=this.yWt)||n.Zg(),this.yWt=void 0}return s||(Ft.uLt(MK,"Start download",we(t.nyt)),s=await this.qWt(t,i,e)),{Km:"bOt",bOt:s,UMt:this.SHt,EO:i.EO,kOt:i.kOt,MW:i.MW}}HWt(t,i){const e=null!=i?i:t;return this.dWt=t.aOt,this.lWt=null==i?void 0:i.eFt,this.fWt=!0,{Km:"zWt",lHt:e.EO,fHt:e.EO+e.ct,UMt:this.SHt,$at:e,kOt:t.kOt}}async qWt(t,i,e){const{response:s,httpStatusCode:n}=await this.tWt.lk(t.nyt,Al.yk,Xa.Sk,void 0,e),r=t.wOt?[t.wOt]:[];return QJ(t,i,await this.gHt(s,r,e),n)}async yat(t,i){if(!t.nyt)throw new m("Internal error: attempted to download an incomplete segment");let e,s;try{this.GWt(t);const n=await this.tWt.lk(t.nyt,Al.yk,Xa.pk,this.XWt,i);e=n.response,s=n.httpStatusCode}finally{this.jWt()}return function(t,i,e){return{ck:{ck:i,Km:Po.vZ},Km:DJ.yk,Iut:e,hHt:t,kOt:t.kOt}}(t,await this.gHt(e,t.MW,i),s)}async WWt(t,i){let e,s;try{this.GWt(t);const n=await this.tWt.lk(t.nyt,Al.yk,Xa.pk,this.XWt,i);e=n.response,s=n.httpStatusCode}finally{this.jWt()}return KJ(t,await this.gHt(e,t.MW,i),s)}async gHt(t,i,e){const s=Jr(i,t=>t.Uk===Zt.kLt);return s?s.nyt&&s.KLt?await this.QWt.gHt(t,s.nyt,s.KLt,e):(Ft.lt(GJ,"Encountered an AES-128 encrypted segment for which no initialization vector could be determined."),t):t}GWt(t){var i,e,s;this.KWt=t,this.YWt=0,this.JWt=zd.Mg(),this.ZWt=0,this.$Wt=null!=(s=null==(e=t.nyt)||null==(i=e.LAt)?void 0:i.V)?s:0}jWt(){this.KWt=void 0,this.YWt=0,this.JWt=0,this.ZWt=0,this.$Wt=0}tqt(){if(void 0!==this.KWt)return{$at:this.KWt,iqt:this.ZWt,eqt:this.$Wt,sqt:zd.Mg()-this.JWt}}nqt(t){return void 0!==this.KWt&&(0!==this.YWt&&(!(this.$Wt>0&&this.ZWt>=this.$Wt)&&!(t-this.YWt<500)))}constructor(t,i,e,s,n,r,h,o){super(),this.Vp=void 0,this.Fkt=void 0,this.nHt=void 0,this.tWt=void 0,this.QWt=void 0,this.SHt=void 0,this.aWt=void 0,this.uWt=void 0,this.vWt=void 0,this.KWt=void 0,this.YWt=0,this.JWt=0,this.ZWt=0,this.$Wt=0,this.pWt=new at,this.mWt=void 0,this.cWt=0,this.dWt=void 0,this.lWt=void 0,this.fWt=!1,this.yWt=void 0,this.wWt=void 0,this.PWt=t=>{this.uWt&&(this.SHt=this.uWt,this.uWt=void 0,this.cWt=0,this.dWt=void 0,this.lWt=void 0,this.fWt=!1),this.vWt&&(t&&!D(t)?this.vWt.jy(t):this.vWt.Xy(),this.vWt=void 0)},this.XWt=(t,i)=>{this.ZWt=t,t>0&&0===this.YWt&&(this.YWt=zd.Mg()),void 0!==i&&(this.$Wt=i),this.So(new UJ(this.Vp))},this.Vp=t,this.Fkt=e,this.nHt=s,this.SHt=i,this.aWt=new CJ(e,i),this.QWt=new IJ(h,n,o),this.tWt=new RJ(n,r,function(t){switch(t){case nl.Bk:return Za.Bk;case nl.Dk:return Za.Dk;case nl.OU:case nl.bLt:return Za.NT;default:return Za.pk}}(i.Km),o)}};function QJ(t,i,e,s){return{ck:{ck:e,Km:Po.vZ},Km:DJ.SLt,Iut:s,hHt:t,kOt:i.kOt}}function KJ(t,i,e){return{ck:{ck:i,Km:Po.vZ},Iut:e,Km:DJ.TLt,hHt:t,kOt:t.tFt.kOt}}r();var YJ=class{get MVt(){return this.rqt}get hqt(){const t=[];for(const e of this.oqt)if("$at"===e.Km){const s=e.$at.hHt,n=HJ(e.UMt,this.qUt,s);var i;t.push({$at:s,UMt:e.UMt,EO:n,PO:n+(null!=(i=s.ct)?i:0)})}else"zWt"===e.Km&&t.push({$at:e.$at,UMt:e.UMt,EO:e.lHt,PO:e.fHt});return t}get aqt(){const t=[];return this.uqt.forEach(i=>{for(const e of i.cqt)"$at"===e.Km?t.push({$at:e.hHt,UMt:e.UMt,EO:e.EO,PO:e.EO+e.ct}):"zWt"===e.Km&&t.push({$at:e.$at,UMt:e.UMt,EO:e.lHt,PO:e.fHt})}),t}UWt(t){"bOt"===t.Km&&(this.rqt=t.bOt),this.oqt.push(t),this.dqt&&(this.dqt.Xy(),this.dqt=void 0)}gWt(){return this.oqt[0]}lqt(t){oi(this.oqt,t)}RWt(){return null!=this.dqt||(this.dqt=new pa),this.dqt.Qy}fqt(t){this.vqt(t.Lot).fqt(t)}_qt(t){return this.vqt(t)._qt()}sHt(t){this.vqt(t.Lot).sHt(t)}gqt(t){var i;null==(i=this.uqt.get(t))||i.zg()}pqt(t){return this.vqt(t).pqt()}vqt(t){if(this.uqt.has(t))return this.uqt.get(t);{const i=new JJ;return this.uqt.set(t,i),i}}Gy(){this.mqt(),this.wqt()}mqt(){this.rqt=void 0,Yo(this.oqt)}wqt(){this.uqt.forEach(t=>t.Gy())}zg(){this.uqt.forEach(t=>t.zg()),this.uqt.clear(),this.Gy(),this.dqt&&(this.dqt.Zg(),this.dqt=void 0)}constructor(t){this.oqt=[],this.uqt=qh(),this.qUt=void 0,this.dqt=void 0,this.rqt=void 0,this.qUt=t}},JJ=class{get cqt(){return this.yqt}fqt(t){this.yqt.push(t),this.Aqt&&(this.Aqt.Xy(),this.Aqt=void 0)}_qt(){return this.yqt[0]}sHt(t){oi(this.yqt,t)}pqt(){return null!=this.Aqt||(this.Aqt=new pa),this.Aqt.Qy}Gy(){Yo(this.yqt)}zg(){this.Gy(),this.Aqt&&(this.Aqt.Zg(),this.Aqt=void 0)}constructor(){this.yqt=[],this.Aqt=void 0}};r(),r(),r();var ZJ=class extends wp{constructor(t,i){super(sZ.bqt),this.UMt=void 0,this.frt=void 0,this.UMt=t,this.frt=i}};r();var $J=class extends wp{constructor(t){super(sZ.Sqt),this.UMt=void 0,this.UMt=t}};r();var tZ=class extends wp{constructor(t,i){super(sZ.Tqt),this.UMt=void 0,this.plt=void 0,this.UMt=t,this.plt=i}};r();var iZ=class extends wp{constructor(t,i){super(sZ.kqt),this.UMt=void 0,this.Eqt=void 0,this.UMt=t,this.Eqt=i}};r();var eZ=class extends wp{constructor(){super(sZ.Pqt)}},sZ=function(t){return t.bqt="xqt",t.Tqt="Iqt",t.kqt="Rqt",t.Sqt="Cqt",t.Pqt="Dqt",t}({}),nZ=class extends Ne{get Bqt(){return this.Nqt}Mqt(t){for(const i of this.Nqt)pi(t,i)||this.nHt.gqt(i);this.Nqt=t}get $It(){return void 0!==this.Lqt}ZVt(){var t,i;return null!=(i=null==(t=this.Lqt)?void 0:t.Qy)?i:Promise.resolve()}YVt(){if(this.$It)throw new m("Cannot perform new operation while transmuxer is still busy")}Oqt(t,i){}Fqt(t){this.YVt(),this.Lqt=new pa;const i=i=>{this.Uqt(t,i)};this.Vqt(t,this.nT.Yg).then(i,i)}Hqt(t){this.YVt(),this.Lqt=new pa;const i=i=>{this.Uqt(t,i)};this.Wqt(t,this.nT.Yg).then(i,i)}qqt(t){this.YVt(),this.Lqt=new pa;try{for(const i of this.Bqt){const e={Km:"zWt",Lot:i,lHt:t.lHt,fHt:t.fHt,kOt:t.kOt,UMt:t.UMt,$at:t.$at};this.fqt(e)}}finally{this.Uqt(t)}}Uqt(t,i){this.Lqt&&(!i||D(i)||function(t){return t instanceof sJ}(i)?(D(i)||this.nHt.lqt(t),this.Lqt.Xy(),this.Lqt=void 0):this.Lqt.jy(i),this.So(new eZ))}zqt(t,i){this.So(new ZJ(t,i))}Gqt(t,i){this.So(new tZ(t,i))}Xqt(t,i,e){iJ(i)&&this.So(new iZ(t,e))}jqt(t){this.So(new $J(t))}fqt(t){pi(this.Nqt,t.Lot)&&this.nHt.fqt(t)}Qqt(t){return this.nHt._qt(t)}sHt(t){this.nHt.sHt(t)}Kqt(t){return this.nHt.pqt(t)}Zg(){this.nT.Zg(),this.nT=new at}constructor(t,i,e){super(),this.nHt=void 0,this.qUt=void 0,this.Nqt=void 0,this.Lqt=void 0,this.nT=new at,this.nHt=t,this.qUt=i,this.Nqt=e}};function rZ(t,i){return iJ(t)?0:_.min(t.EO,i)}function hZ(t,i){var e;return _.max(t.EO,i)+(null!=(e=t.ct)?e:0)}var oZ=class extends nZ{Vqt(t,i){ii(i);const e={Km:"FRt",ck:t.bOt.ck,Lot:this.Bqt[0],kOt:t.kOt,Yqt:{frt:"",MW:t.MW},EO:t.EO,UMt:t.UMt,hHt:t.bOt.hHt};return this.fqt(e),Promise.resolve()}async Wqt(t,i){ii(i);const e=t.$at.hHt;let s;void 0!==e.xet?(this.qUt.gUt(t.kOt)||await Nc(this.qUt.mUt(t.kOt),i),s=this.qUt.kUt(e.xet,e).iF()):s=e.EO;const n=rZ(e,s),r=hZ(e,n);var h;const o={Km:"$at",ck:t.$at.ck,Lot:this.Bqt[0],lHt:n,fHt:r,EO:s,ct:null!=(h=e.ct)?h:0,bU:0,kOt:t.kOt,UMt:t.UMt,hHt:t.$at.hHt};this.fqt(o)}constructor(t,i,e){super(t,i,[e])}};function aZ(t,i){let e=ve.iL();for(const s of t){let n=s.EO;if(s.UMt.IMt.POt&&iJ(s.$at))n=0;else{const e=t=>s.UMt===t.UMt&&eJ(t.$at,s.$at),r=Jr(t,e);if(void 0!==r)n=_.min(n,r.PO);else{const t=Jr(i,e);void 0!==t&&(n=_.min(n,t.HVt.An(0)))}}e=e.OM(ve.tL(n,s.PO))}return e}r();var uZ=.001,cZ=class{get Jqt(){return this.Zqt}get UMt(){return this.$qt.UMt}oWt(t){this.$qt.oWt(t)}get $It(){return this.$qt.$It||this.tzt.$It||this.Zqt.some(t=>t.$It)}izt(t){const i=this.Zqt.length>0,e=t.slice();for(let t=this.Zqt.length-1;t>=0;t--){const i=this.Zqt[t];if(!xJ(i))throw new m("Invalid state");const s=li(e,t=>t.Km===i.Km);s>=0&&!i.QVt?(i.JVt(e[s]),ka(e,s)):ka(this.Zqt,t)}for(const t of e){const i=new bJ(t);this.Zqt.push(new PJ(t.Km,t,this.ezt,i,this,this.szt,this.nzt))}i&&e.length>0&&this.ezt.Gy();const s=t.map(t=>t.Km);this.tzt.Mqt(s)}YY(t){var i;const e=(null==(i=this.Rz)?void 0:i.YY(t))||!1;return e&&(this.Zg(),this.ezt.Gy()),e}rzt(t){const i=this.Zqt[0];if(void 0!==i){if(i.Km!==Ci.NT||i.$It)throw new m("Invalid state");if(!i.QVt)return void i.JVt(t)}const e=new bJ(t),s=new PJ(Ci.NT,t,this.ezt,e,this,void 0,void 0);this.Zqt=[s]}get MVt(){const t=this.ezt.MVt;if(t)return t;if(this.Zqt.length>0){const t=this.Zqt[0].zVt.MVt;if(t&&this.Zqt.every(i=>i.zVt.MVt===t))return t}}_at(){for(const t of this.Zqt)t.zVt.UVt()}get hzt(){const t=aZ(this.ezt.hqt.concat(this.ezt.aqt),De(this.Zqt,t=>t.zVt.ect)).CM();let i;if(0===this.Zqt.length)i=t;else{i=ve.eL();for(const t of this.Zqt)i=i.Mn(t.zVt.IP);for(const t of this.Zqt)i=i.UM(t.GVt);i=i.OM(t)}return i.LM(uZ)}get ozt(){const t=aZ(this.ezt.aqt,De(this.Zqt,t=>t.zVt.ect)).CM();let i;if(0===this.Zqt.length)i=t;else{i=ve.eL();for(const t of this.Zqt)i=i.Mn(t.zVt.IP);i=i.OM(t)}return i}hdt(t){const i=this.hzt.JM(t,uZ);return i?i.An(i.V-1):t}AWt(t){return!!this.hzt.JM(t,uZ)||this.$qt.AWt(t)}azt(t){return this.ozt.Cr(t,uZ)}uzt(t,i,e){for(const t of this.Zqt){const e=t.zVt,s=e._pt;if(void 0!==s&&i>=s&&!e.IP.CM().Cr(s))return!0}return i-tt.Zg())}zg(){this.Zg(),this.$qt.zg()}constructor(t,i,e,s,n,r){this.$qt=void 0,this.ezt=void 0,this.tzt=void 0,this.szt=void 0,this.nzt=void 0,this.Rz=void 0,this.Zqt=void 0,this.$qt=t,this.ezt=i,this.tzt=e,this.szt=s,this.nzt=n,this.Rz=r,this.Zqt=[]}};r();var dZ=class extends wp{constructor(){super(AK.PMt)}};r();var lZ=class extends wp{constructor(){super(AK.kMt)}};r(),r();var fZ="LazyMediaBuffer",vZ=class extends Ne{get qT(){return this.GS}get B3(){return this.Vp}get Cd(){if(!this.Trt)throw new Ga(Vo.MEDIA_LOAD_ERROR,"Cannot get the configuration of an uninitialized MediaBuffer.");return this.Trt.Cd}get MY(){return this.zY}set MY(t){this.zY=t,this.Trt&&(this.Trt.MY=t)}get IP(){return this.Trt?this.Trt.IP:ve.iL()}get M3(){return this.Trt?this.Trt.M3:this.L3.ZZ}get UY(){return this.jY}set UY(t){this.jY=t,this.Trt&&(this.Trt.UY=t)}F3(t,i){Ft.uLt(fZ,"Marking gap from "+t+" to "+i+"."),this.L3.t$(t,i),this.Trt&&this.Trt.F3(t,i)}U3(t,i){Ft.uLt(fZ,"Removing gap from "+t+" to "+i+"."),this.L3.i$(t,i),this.Trt&&this.Trt.U3(t,i)}lzt(t){this.Trt=t,this.Trt.UY=this.jY,this.Trt.MY=this.zY;const i=this.L3.ZZ;for(let t=0;tt.frt&&t.frt.bCt&&bN(t.frt.bCt,n));if(0===e.length)continue;if(void 0===s)return e;void 0===i&&(i=e);const r=SZ(e,s);if(void 0!==r)return r}if(void 0!==i)return i}if(void 0!==s){const i=SZ(t,s);if(void 0!==i)return i}return t}(t,i),r=TZ(n,s),h=r.length>0?r:n;switch(e.OY.type){case Sa.BANDWIDTH:{const t=e.WY,i=h.filter(i=>i.kW<=t);if(i.length>0)return lf(i,t=>t.kW)}case Sa.PERFORMANCE:return oo(h,t=>t.kW);case Sa.QUALITY:return lf(h,t=>t.kW)}}function SZ(t,i){for(const e of i){const i=t.filter(t=>t.frt&&t.frt.yCt&&bN(t.frt.yCt,e));if(0!==i.length)return i}}function TZ(t,i){return t.filter(t=>kZ(t,i))}function kZ(t,i){const e=i+2e3,s=0===t.UOt.length||t.UOt.some(t=>t.IMt.jFtt.IMt.jFt"*"===i||t===i||Ho(t,i+"-"),!0),EZ((t,i)=>{const e=t.split("-"),s=i.split("-");let n=0,r=0;if("*"!==s[r]&&e[n]!==s[r])return!1;for(n++,r++;r{let e,s=i;for(;;){if("*"===s||t===s)return!0;if(e=s.lastIndexOf("-"),e<0)return!1;"-"===s.charAt(e-2)&&(e-=2),s=s.slice(0,e)}});function xZ(t,i){const e=t&&"string"==typeof t?[t]:t;if(!e||"object"!=typeof e||!("length"in e))throw new m("Invalid "+i+" `"+e+"`, expected non-empty string");return e}function IZ(t){const i=Jr(t,t=>t.RMt),e=t.filter(t=>t.CMt),s=zd.Mm,n=e.map(t=>t.bs).filter(it),r=PZ(n,s);return r?Jr(e,t=>t.bs===r):i}function RZ(t){var i;return null!=(i=IZ(t))?i:t[0]}r();var CZ=class extends es{Czt(t){const i=this.JU.tI(Ao.OU,t.l,t.l,t.bs,t.RMt,void 0,void 0,t.LMt.map(NK).filter(it));this.Dzt.set(t.jI,i),this.tt(i)}zOt(t){const i=this.Dzt.get(t.jI);i&&(this.Dzt.delete(t.jI),this.JU.iV(i))}jU(t){const i=this.Bzt(t);i&&(Wr(this.HMt.Nzt(i)),this.Dzt.forEach(i=>{i!==t&&(i.Xk=xh.Nh)}))}QU(t){const i=this.Bzt(t);i&&this.HMt.Mzt&&this.HMt.Mzt===i&&Wr(this.HMt.Nzt(void 0))}Lzt(t){return this.Dzt.get(t.jI)}Bzt(t){const i=this.HMt.VMt;if(i)return Jr(i.VOt,i=>t===this.Lzt(i))}ZU(t,i,e){const s=Ut(t,i,e);return this.Dzt.forEach((i,e)=>{i===t&&this.Dzt.set(e,s)}),s}async hr(){await super.hr(),this.Dzt.clear()}constructor(t,i){super(i),this.HMt=void 0,this.Dzt=ar(),this.HMt=t}},ra="LLHLSPlayer",DZ=[Do.yM,Do.AM,Do.bM,Do.wI],BZ=[d.Kw,d.Pw,d.Lw,d.Nw],NZ=[d.Ww,d.qw,d.Gw,d.Xw,d.ly,d.iy,d.ey],MZ=class extends Ne{get BL(){var t;if(this.ct!==1/0)return;const i=this.CP;if(i){return(Date.now()-i.getTime())/1e3}const e=null==(t=this.HMt)?void 0:t.Ozt;return e?e-this.MP:void 0}get Fzt(){const t=this.Uzt;for(const i of t){if(!i.IMt.POt)return!1;const t=af(i.IMt.ect,-1);if(t&&t.kOt!==this.Vzt)return!1}return!0}get VMt(){var t;return null==(t=this.HMt)?void 0:t.VMt}get eLt(){var t;return null==(t=this.HMt)?void 0:t.eLt}get nLt(){var t;return null==(t=this.HMt)?void 0:t.nLt}get Mzt(){var t;return null==(t=this.HMt)?void 0:t.Mzt}get Uzt(){return this.HMt?this.HMt.Uzt:[]}get ht(){return this.YL}get IP(){let t=this.TL.IP;return void 0!==this.HMt&&(t=t.Ny(-this.HMt.bU).Mn(ve.eL())),t._s()}get CP(){if(this.VMt){const t=this.MP;return this.VMt.WOt(t)}}set CP(t){if(!t||!this.VMt)return;const i=this.VMt.qOt(t);void 0!==i&&this.OP(i,{Hzt:!1,Wzt:!0})}get bt(){var t;return null==(t=this.HMt)?void 0:t.Mc}get MP(){var t;return null!=(t=this.qzt)?t:this.zzt(this.HMt)}set MP(t){this.OP(t)}OP(t,i){var e,s,n,r;Ft.hB(ra,"Seeking to "+t+" s.");const h={Hzt:null!=(s=null==i?void 0:i.Hzt)?s:t===1/0,Wzt:null==(n=null==i?void 0:i.Wzt)||n,gOt:null!=(r=null==i?void 0:i.gOt)&&r};this.qzt=t,this.Gzt=h,this.Xzt=!0,this.Bkt=!0,null==(e=this.jW)||e.Xx(),this.So(new F(t)),this.m7.Zg(),this.jzt&&(zd.Lg(this.Qzt),h.Wzt?this.Qzt=zd.Og(()=>this.Kzt(t,h),50):this.Kzt(t,h))}Kzt(t,i){zd.Lg(this.Qzt);const e=[this.Dpt,this.Yzt,this.w7].filter(it);this.m7=new at,this.m7.$g(this.rV.Yg),this.w7=$e(this.y7(e,t,i,this.m7.Yg),this.m7).catch(this.Jzt)}get ct(){var t,i;if(void 0===this.Zzt&&this.Fzt){const t=this.TL.ct;if(!S(t))return this.$zt(this.HMt,t)}return null!=(i=null==(t=this.HMt)?void 0:t.ct)?i:NaN}get UP(){if(!this.Fzt)return!1;if(this.kx&&void 0!==this.HMt&&this.jzt){const t=this.MP,i=this.HMt.tGt;return isFinite(i)&&t>=i}return this.TL.UP||this.iGt()}get lt(){return this.JW}get WP(){return this.ZW}get zP(){}get jP(){}get KP(){return!1}get JP(){var t,i;return Mo({},{iO:0,eO:0,sO:0,nO:0,rO:0,hO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.TL.ZP(),{rO:null!=(i=null==(t=this.HMt)?void 0:t.rO)?i:0,nO:this.Rz.kY.kW})}get Br(){var t;return null==(t=this.HMt)?void 0:t.Br}get eGt(){var t;return null==(t=this.HMt)?void 0:t.eGt}get $P(){return this.TL.$P}set $P(t){this.TL.$P=t}get sx(){var t,i;return null==(i=null==(t=this.HMt)?void 0:t.sx)||i}get hx(){return this.TL.hx}get ux(){return this.TL.ux}set ux(t){Ft.hB(ra,"Setting playback rate to "+t+"."),this.TL.ux=t}get _x(){return this.lkt._s()}get lkt(){let t=this.TL._x;return void 0!==this.HMt&&(t=t.Ny(-this.HMt.bU).Mn(ve.eL())),t}get mx(){return this.tq}set mx(t){this.tq!==t&&(this.tq=t,this.sGt())}get Ax(){var t;let i=this.TL.Ax;return(null==(t=this.HMt)?void 0:t.nGt)&&(i=_.max(mh.Qn,i)),i}get IFt(){var t,i;return null!=(i=null==(t=this.HMt)?void 0:t.IFt)?i:ve.iL()}get Sx(){return this.rkt._s()}get rkt(){var t,i;let e=null!=(i=null==(t=this.HMt)?void 0:t.Sx)?i:ve.iL();if(0===e.V)return e;if(this.iq&&this.Fzt&&this.iq.ct!==1/0&&(e=new ve([e.Tn(0),this.$zt(this.HMt,this.iq.ct)])),this.HMt&&!this.HMt.POt){const t=this.lkt,i=e.An(e.V-1);if(t.V>0&&t.An(t.V-1)>i){let s=t.An(t.V-1);const n=this.HMt.IFt;n&&n.V>0&&(s=_.min(s,n.An(n.V-1))),e=e.OM(new ve([i,s]))}}return e}get kx(){var t;return null!=(t=this.Xzt)?t:this.TL.kx}get nq(){}get nt(){return this.Gl}get rt(){return this.$L}get Rx(){var t,i;return this.TL.Rx||(null==(i=this.VMt)||null==(t=i.uCt)?void 0:t.Mi)||0}get Bx(){var t,i;return this.TL.Bx||(null==(i=this.VMt)||null==(t=i.uCt)?void 0:t.Ti)||0}get Mx(){return this.TL.Mx}set Mx(t){Ft.hB(ra,"Setting volume to "+t+"."),this.TL.Mx=t}get Fx(){return this.Cz}get Vx(){return!1}set Vx(t){}get hq(){return this.oq}jx(){return!1}Hx(){return this.TL.Ma}Aa(){return this.TL.mq}tI(t){var i;const e=this.TL.wq(t);var s;return e.bU=null!=(s=null==(i=this.HMt)?void 0:i.bU)?s:0,this.VEt.tt(e),e}we(){Ft.hB(ra,"Hiding the player."),this.TL.we()}zx(){var t;Ft.hB(ra,"Pausing the player."),this.TL.zx(),(null==(t=this.jW)?void 0:t.sL)&&this.jW.Xx()}async Gx(){this.n7=!0;const t=this.TL.Gx();if(this.UP){const t=this.rkt;t.V>0&&this.OP(t.Tn(0),{Wzt:!1})}this.jzt||await this.sGt(),this.MTt(),await t,this.Nkt()}MTt(){if(!this.nkt()){var t;const i=null==(t=this.VMt)?void 0:t.IMt;if(null==i?void 0:i.POt){let t=!0,e=0;const s=i.Tn;if(!this.Bkt&&s&&(t=!s.gOt,e=s._Ot,e<0)){const t=i.IFt;e+=t.An(t.V-1)}this.Kzt(e,{Hzt:t})}else this.Kzt(1/0,{Hzt:!0})}this.rGt()&&this.Kzt(1/0,{Hzt:!0})}nkt(){var t;const i=this.rkt;if(0===i.V)return!0;const e=this.MP,s=null==(t=this.HMt)?void 0:t.hGt,n=null==s?void 0:s.VM(e);return(n&&n>0?s.An(n):e)>=i.Tn(0)}rGt(){const t=this.MP;return OZ(t,this.eLt)||OZ(t,this.nLt)}pEt(){this.JW=void 0,this.ZW=void 0}qq(t){this.JW||(Wr(this.hr()),this.JW=P(t),this.ZW=t,this.So(new Pi(t)))}be(){Ft.hB(ra,"Showing the player."),this.TL.be()}Qx(){throw new m("Not implemented")}Kx(){throw new m("Not implemented")}Yx(){}Jx(){this.jzt&&Wr(this.oGt({Jx:!0}))}async Ta(t,i,e){const s={stack:[],error:void 0,hasError:!1};try{if(Ft.hB(ra,"Setting the player source to "+t.src+"."),this.pEt(),this.HMt&&(await this.hr(),ii(e)),nk(t))return;const r=Be(s,at.ep([e]),!1);var n;if(this.lq.IW(t.contentProtection),void 0!==this.Zzt&&this.Zzt.Mc===t)this.HMt=this.Zzt,this.HMt.mn(NZ,this.aGt),this.rV=this.uGt,this.rV.$g(r.Yg),this.uGt=new at,this.cGt=void 0,null==(n=this.dGt)||n.Zg(),this.dGt=void 0,this.Zzt=void 0,this.lGt=!1,this.fGt!==this.HMt&&(this.fGt=void 0),this.HMt.vGt(this.TL);else void 0!==this.Zzt&&(await this.xx(),await this._Gt()),this.rV=at.ep([r.Yg]),this.HMt=this.gGt(t,i,void 0,this.TL);this.HMt.wn(NZ,this.Rs),this.HMt.wn(AK.PMt,this.pGt),this.YL.BI=this.HMt.ht,this.$L.BI=this.HMt.rt,this.mGt.BI=this.HMt.nt;const h=this.HMt.wGt;h&&(this.jW=new GG(this,this.TL,h),this.jW.Rt=!0,this.Cz.Ea(this.jW)),Ds(this.Gl),this.yGt(),this.Ekt(),this.AGt.forEach(this.Rs),this.AGt=[],this.sGt(),r.zg()}catch(t){s.error=t,s.hasError=!0}finally{Cs(s)}}async Px(t,i,e,s){ii(s),void 0!==this.Zzt&&await this.xx(),ii(s),this.Zzt=this.gGt(t,i,e,void 0),this.Zzt.wn(NZ,this.aGt)}async xx(){var t;void 0!==this.Zzt&&(this.uGt.Zg(),null==(t=this.dGt)||t.Zg(),this.dGt=void 0,void 0!==this.cGt&&(await this.cGt.catch(Ct),this.cGt=void 0),await this.Zzt.zg(),this.uGt=new at,this.fGt===this.Zzt&&(this.fGt=void 0),this.Zzt=void 0,this.lGt=!1,this.AGt=[])}gGt(t,i,e,s){return null!=this.bGt||(this.bGt=this.SGt.Ret()),new LZ(this,t,i,this.nV,this.Rz,this.TGt,this.eut,this.kGt,this.mHt,this.bGt,this._dt,e,s)}sGt(){return this.Dpt=this.EGt(this.Dpt,this.rV.Yg).catch(this.mmt),this.Dpt}async EGt(t,i){if(t&&(await t,ii(i)),!this.HMt)return;const e=this.tq;e===q.OL||this.n7?(await this.PGt(i),await this.xGt(i)):e===q.VU&&await this.PGt(i)}async PGt(t){ii(t),void 0===this.HMt||this.HMt.nGt||(await this.HMt.PGt(t),this.kq.VV(),this.yGt())}yGt(){var t;if(this.jW)return;const i=null==(t=this.HMt)?void 0:t.wGt;i&&(this.jW=new GG(this,this.TL,i),this.Cz.Ea(this.jW))}get IGt(){return this.jzt}async xGt(t){ii(t),this.jzt||(this.jzt=!0,await this.HMt.oGt(this.eLt,this.nLt,this.Mzt,{RGt:!0}))}CGt(){const t=this.Zzt;return void 0===t?Promise.resolve():(0===t.bU&&(t.bU=this.HMt.bU+this.HMt.ct),null!=this.dGt||(this.dGt=new pa),void 0===this.cGt&&(this.cGt=t.PGt(this.uGt.Yg),this.dGt.$g(this.cGt)),this.dGt.Qy)}DGt(){var t;return(null!=(t=this.dGt)?t:this.dGt=new pa).Qy}zzt(t){return this.$zt(t,this.TL.MP)}$zt(t,i){let e=i;return t===this.HMt&&void 0!==this.Zzt&&this.Zzt.bU>0&&(e=_.min(e,this.Zzt.bU)),void 0!==t&&(e=_.max(0,e-t.bU)),e}iGt(){if(void 0===this.Zzt||0===this.Zzt.bU)return!1;if(!this.lGt)return!1;return this.TL.MP+.25>=this.Zzt.bU}get BGt(){return void 0===this.HMt?[]:void 0===this.Zzt?this.HMt.NGt:this.HMt.NGt.concat(this.Zzt.NGt)}MGt(){var t,i;return{Ti:this.TL.Ti,Mi:this.TL.Mi,_Lt:rQ(this.TL),Gct:null==(i=this.bt)||null==(t=i.abr)?void 0:t.restrictToPlayerSize}}LGt(){return new AZ(this.iq)}oGt(t){void 0===t&&(t={});const i={jMt:t.jMt||!1,KMt:t.KMt||!1,QMt:t.QMt||!1,Jx:t.Jx||!1,RGt:t.RGt||!1},e=[this.Yzt,this.w7].filter(it);return this.m7.Zg(),this.m7=new at,this.m7.$g(this.rV.Yg),this.OGt.Zg(),this.OGt=new at,this.OGt.$g(this.rV.Yg),this.Yzt=$e(this.FGt(e,i,this.OGt.Yg),this.OGt).catch(this.Jzt),this.Yzt}async FGt(t,i,e){var s,n,r;if(!this.jzt)return void await this.HMt.UGt(e);await Promise.all(t.map(t=>t.catch(Ct))),this.VGt(),await this.HGt(e),await this.WGt(),await this.qGt(i.KMt,i.QMt),ii(e);const h=await this.HMt.zGt();ii(e);const o=await this.GGt(h,i.Jx,e),a=null==(s=this.iq)?void 0:s.Q3,u=null==(n=this.iq)?void 0:n.K3;if(this.HMt.XGt(void 0!==a,void 0!==u,i.jMt||o,i.KMt,i.QMt),this.HMt.jGt(i.jMt),void 0!==this.Zzt&&(this.Zzt.XGt(void 0!==a,void 0!==u,i.jMt||o,i.KMt,i.QMt),this.Zzt.jGt(i.jMt)),this.HMt.izt(a,u),void 0!==this.Zzt){const t=await this.Zzt.zGt();t&&this.iq&&this.iq.TZ(t)?(this.Zzt.izt(a,u),this.lGt=!0):(this.Zzt.izt(void 0,void 0),this.lGt=!1)}this.QGt(),ii(e);try{var c;await Promise.all([this.HMt.KGt(e),null==(c=this.Zzt)?void 0:c.KGt(e)].filter(it))}catch(t){sa(t)}if(ii(e),this.B4(),this.HMt.hUt(),null==(r=this.Zzt)||r.hUt(),void 0===this.qzt){if(!this.Bkt){const t=this.HMt.YGt;if(t)return void this.Kzt(t.XF,{Hzt:t.Hzt});if(this.HMt.bU>0)return void this.Kzt(0,{Hzt:!1})}this.BGt.length>0&&this.JGt()}else this.Kzt(this.qzt,this.Gzt)}async GGt(t,i,e){if(!i&&this.iq){if(!t)return!1;if(this.iq.TZ(t))return await this.HGt(e),await this.iq.EZ(t),!1}for(const t of this.HMt.NGt)t.Jqt.forEach(t=>t.Zg());this.TL.x9();try{let i;if(this.iq&&await this.TL.hr(),t)i=await this.TL.Un(t);else{const t=void 0!==this.eLt,e=void 0!==this.nLt;i=new gZ(this.TL,t,e)}this.ZGt(i)}finally{this.TL.I9()}return!0}ZGt(t){this.iq=t,this.B4(),this.STt(),this.TTt()}B4(){var t,i;const e=this.iq,s=void 0!==this.Zzt&&this.lGt?this.Zzt:this.HMt;if(e&&void 0!==s&&(s!==this.fGt||S(e.ct))){var n;s!==this.fGt&&e.A3();const t=(null!=(n=s.$Gt)?n:NaN)+s.bU;t>0&&e.C4(t),this.fGt=s}null==(t=this.HMt)||t.hUt(),null==(i=this.Zzt)||i.hUt()}async qGt(t,i){if(!this.iq)return;const e=[];t&&this.iq.Q3&&e.push(this.iq.Q3._S(0,1/0)),i&&this.iq.K3&&e.push(this.iq.K3._S(0,1/0)),await Promise.all(e)}STt(){const t=this.iq;t&&(t.K3&&(t.K3.MY=this.Rz.GY),t.Q3&&(t.Q3.MY=this.Rz.GY))}TTt(){const t=this.iq;t&&(t.K3&&(t.K3.UY=this.Rz.UY),t.Q3&&(t.Q3.UY=this.Rz.UY))}QGt(){var t,i,e,s;const n=void 0!==(null==(t=this.iq)?void 0:t.Q3),r=void 0!==(null==(i=this.iq)?void 0:i.K3);null==(e=this.HMt)||e.QGt(n,r),null==(s=this.Zzt)||s.QGt(n,r)}async y7(t,i,e,s){await Promise.all(t.map(t=>t.catch(Ct))),ii(s),await this.WGt(),ii(s),this.qzt=void 0,this.Xzt=void 0,this.Bkt=!0;const n=(e.gOt?this.IFt:this.rkt).DM(i+this.HMt.bU),r=this.TL.ww(d.Zw,s);this.TL.My(n,e.Hzt),this.jzt&&this.HMt.NGt.length>0&&(this.Br.mM.FUt(),this.tXt(this.MP),this.JGt()),await r,this.Nkt()}Nkt(){const t=this.jW;if(void 0===t)return;const i=this.BL;if(this.hx||this.kx||void 0===i)return;i0&&(this.BGt.forEach(t=>t.czt()),await this.KDt(),this.QDt(),this.BGt.forEach(t=>t.$qt.xWt()))}QDt(){if(this.hXt)return;const t=()=>{this.hXt=void 0};this.oXt=new at,this.oXt.$g(this.rV.Yg),this.hXt=$e(this.aXt(this.oXt.Yg),this.oXt).catch(this.Jzt).then(t,t)}async KDt(){var t;null==(t=this.oXt)||t.Zg();const i=this.hXt;this.hXt=void 0,i&&await i}async aXt(t){ii(t),await this.uXt(this.HMt,t),ii(t),void 0!==this.Zzt&&(await Nc(this.CGt(),t),ii(t),await this.uXt(this.Zzt,t))}async uXt(t,i){ii(i);const e=t.NGt;for(;;){const s={stack:[],error:void 0,hasError:!1};try{const n=[],r=_.max(0,this.TL.MP-t.bU);for(const t of e){const i=t.$qt,e=t.hdt(r);if(i.$It)n.push(i.ZVt());else if(t.uzt(r,e,this.Rz.GY)||i._Wt){const s=i.UMt.IMt,r=i.bWt(e);if(void 0===r){if(s.POt)continue;const t=s.ect;t.length&&t[0].EO>e&&(this.MP=1/0),i.CWt(),i.kWt(e)}else{const[e,s]=r;i.pat(e,s,t.MVt),t.tzt.Oqt(e,s)}n.push(i.ZVt())}}const h=Be(s,at.ep([i]),!1);if(0===n.length){e.every(t=>t.$qt.ERt)||n.push(this.TL.ww(d._y,h.Yg));for(const t of e)void 0!==t.$qt.gWt()&&n.push(t.tzt.ww([sZ.Sqt,sZ.Pqt],h.Yg));if(0===n.length)break}await Nc(Promise.race(n),h.Yg)}catch(t){s.error=t,s.hasError=!0}finally{Cs(s)}}}sXt(){if(this.cXt)return;const t=()=>{this.cXt=void 0};this.dXt=new at,this.dXt.$g(this.rV.Yg),this.cXt=$e(this.lXt(this.dXt.Yg),this.dXt).catch(this.Jzt).then(t,t)}async iXt(){var t;null==(t=this.dXt)||t.Zg();const i=this.cXt;this.cXt=void 0,i&&await i}async lXt(t){ii(t);const i=this.BGt;for(;;){const e=[];for(const t of i){const i=t.$qt,s=t.tzt;if(s.$It)e.push(s.ZVt());else{const t=i.gWt();t?"$at"===t.Km?(s.Hqt(t),e.push(s.ZVt())):"bOt"===t.Km?(s.Fqt(t),e.push(s.ZVt())):"zWt"===t.Km&&(s.qqt(t),e.push(s.ZVt())):e.push(i.IWt())}}if(0===e.length)break;await Nc(Promise.race(e),t)}}nXt(){if(this.fXt)return;this.vXt=new at,this.vXt.$g(this.rV.Yg);const t=()=>{this.fXt=void 0};this.fXt=$e(this._Xt(this.vXt.Yg),this.vXt).catch(this.Jzt).then(t,t)}async eXt(){var t;null==(t=this.vXt)||t.Zg();const i=this.fXt;this.fXt=void 0,i&&await i}async _Xt(t){ii(t);let i=await this.gXt(this.HMt,t);void 0!==this.Zzt&&this.lGt&&i&&(ii(t),await Nc(this.DGt(),t),ii(t),this.B4(),i=await this.gXt(this.Zzt,t)),i?this.iq.C3():this.iq.A3()}async gXt(t,i){for(;;){const e=t.NGt;e.forEach(t=>t._at());const s=_.max(0,this.TL.MP-t.bU),n=[],r=[];for(const t of e){const i=t.tzt;for(const e of t.Jqt){const t=xJ(e)?n:r;if(e.$It)t.push(e.ZVt());else if(!e.$Vt(s)){const s=i.Qqt(e.Km);s?"$at"===s.Km&&s.kOt===this.Vzt?(e.cdt(s),t.push(e.ZVt())):"FRt"===s.Km&&s.kOt===this.Vzt?(e.z2(s),t.push(e.ZVt())):"zWt"===s.Km&&(e.dHt(s),t.push(e.ZVt())):r.push(i.Kqt(e.Km))}}}if(0===n.length){if(await this.pXt(t,e,s,i))continue}if(0===n.length&&0===r.length){return e.every(t=>t.Jqt.length>0&&t.Jqt.every(t=>t.$Vt(s)))}await Nc(Promise.race([...n,...r]),i)}}async pXt(t,i,e,s){const n=[],r=[];for(const t of i){const i=t.hdt(e);for(const s of t.Jqt){if(!xJ(s))continue;const h=t.tzt.Qqt(s.Km);if(void 0!==h){if(h.kOt===this.Vzt)return!1;n.push(h)}else{if(t.$It||t.uzt(e,i,this.Rz.GY)||!s.tHt(e,i))return!1;{const t=s.zVt.MVt;void 0!==t&&r.push(t)}}}}if(0===n.length)return!1;const h=lf(n,t=>t.kOt).kOt;if(n.every(t=>"FRt"===t.Km&&t.kOt===h)){const i=oo(n,t=>t.EO).EO+t.bU,e=[...n,...r],h=await this.mXt(e);this.wXt(h)?(Ft.uLt(yc,"Seamless switch from",this.iq.Cd,"to",h),await this.iq.EZ(h),Ft.uLt(yc,"Seamless switch complete.")):await this.yXt(t,i,h,s),this.Vzt=n[0].kOt}else for(const t of i)for(const i of t.Jqt){let e=t.tzt.Qqt(i.Km);for(;void 0!==e&&("FRt"!==e.Km||e.kOt!==h);)Ft.uLt(yc,"Removing append for other discontinuity, expecting "+h,e),t.tzt.sHt(e),e=t.tzt.Qqt(i.Km)}return!0}wXt(t){var i,e;switch(null!=(e=null==(i=this.bt)?void 0:i.seamlessSwitchStrategy)?e:Oh.OL){case Oh.FL:return!0;case Oh.UL:return!1;default:return this.iq.TZ(t)}}async mXt(t){const i=t.map(t=>t.Yqt.frt),e=i.map(t=>({qT:t})),s=[...De(t,t=>t.Yqt.MW),...this.Br.UUt],n=this.bt;let r=await iY(n.contentProtection,i,s,this.nV,n.useCredentials);return 0===r.length&&this.iq&&this.iq.Cd.aq.length>0&&(r=this.iq.Cd.aq),{Km:Zr.wV,L4:e,aq:r,X4:n.useManagedMediaSource}}async yXt(t,i,e,s){var n,r,h;const o=this.iq,a=o.ct,u=this.TL.IP.V>0&&this.TL.MPt.Jqt.map(t=>t.ZVt()))),t)}Ekt(){const t=this.Bx,i=this.Rx;this.OEt===t&&this.FEt===i||(this.OEt=t,this.FEt=i,this.So(new ts))}async kn(){Ft.hB(ra,"Unloading the player."),this.AXt(),this.pEt(),void 0!==this.Zzt&&await this.xx(),await this.hr(),this.TL.Eq=void 0,this.YL.kn(),this.$L.kn(),this.Gl.kn(),this.VEt.kn(),this.bXt.kn(),this.kq.zg(),this.mHt.zg(),this.bGt&&(this.bGt.zg(),this.bGt=void 0)}async hr(){Ft.hB(ra,"Resetting the player."),this.Vzt=-1,this.rV.Zg(),this.m7.Zg(),this.m7=new at,this.m7.$g(this.rV.Yg),this.OGt.Zg(),this.OGt=new at,this.OGt.$g(this.rV.Yg);const t=[this.Dpt,this.w7,this.Yzt].filter(it);await Promise.all(t.map(t=>t.catch(Ct))),this.Dpt=void 0,this.w7=void 0,this.Yzt=void 0,this.VGt(),await this.WGt(),this.HMt&&(this.YL.BI=void 0,this.$L.BI=void 0,this.mGt.BI=void 0,await this.HMt.zg(),this.fGt===this.HMt&&(this.fGt=void 0),this.HMt=void 0),this.jW=void 0,this.Cz.hr(),this.TL.Aq(),void 0!==this.Zzt&&void 0!==this.iq&&void 0===this.TL.lt?await this.TL.C8():await this._Gt(),this.jzt=!1,this.qzt=void 0,this.LEt=void 0,this.OEt=0,this.FEt=0,this.Xzt=void 0,this.Bkt=!1,this.n7=!1,zd.Lg(this.Qzt),this.SXt=!1,this.bXt.hr(),this.TXt(),this.So(new G(this.MP,this.Ax))}async _Gt(){this.iq=void 0,await this.TL.hr()}TXt(){for(const t of this.Gl.II)t.kn();this.mGt.hr(),this.VEt.hr(),this.Gl.hr()}kXt(){this.bXt.wn(DZ,this.Rs),this.bXt.wn(Do.TM,this.IL),this.bXt.wn(Do.SM,this.EXt),this.bXt.wn(Do.wM,this.PXt),this.Rz.wn("NY",this.qEt),this.Rz.wn("FY",this.zEt),this.TL.wn(BZ,this.Rs),this.TL.wn(Mc.ma,this.GEt),this.TL.wn(d.Ew,this.kkt),this.TL.wn(d.Rw,this.xXt),this.TL.wn(d.Bw,this.Eh),this.TL.wn(d.jw,this.oNt),this.TL.wn(d.uo,this.IXt),this.TL.wn(d.Qw,this.RXt),this.TL.wn(Do.wI,this.FV),this.TL.wn(d._y,this.H6),this.TL.wn(d.$w,this.Je),this.TL.wn(d.Zw,this.Rq),this.TL.wn(d.Jw,this.CXt),this.TL.wn(d.gy,this.DXt)}AXt(){this.bXt.mn(DZ,this.Rs),this.bXt.mn(Do.TM,this.IL),this.bXt.mn(Do.SM,this.EXt),this.bXt.mn(Do.wM,this.PXt),this.Rz.mn("NY",this.qEt),this.Rz.mn("FY",this.zEt),this.TL.mn(BZ,this.Rs),this.TL.mn(Mc.ma,this.GEt),this.TL.mn(d.Ew,this.kkt),this.TL.mn(d.Rw,this.xXt),this.TL.mn(d.Bw,this.Eh),this.TL.mn(d.jw,this.oNt),this.TL.mn(d.uo,this.IXt),this.TL.mn(d.Qw,this.RXt),this.TL.mn(Do.wI,this.FV),this.TL.mn(d._y,this.H6),this.TL.mn(d.$w,this.Je),this.TL.mn(d.Zw,this.Rq),this.TL.mn(d.Jw,this.CXt),this.TL.mn(d.gy,this.DXt)}constructor(t,i,e,s,n,r,h,o){var a;super(),this.Rz=void 0,this.Cz=void 0,this.mHt=void 0,this.SGt=void 0,this.TL=void 0,this.nV=void 0,this.oq=void 0,this.lq=void 0,this.kq=void 0,this.bXt=void 0,this.kGt=void 0,this.TGt=void 0,this.eut=void 0,this._dt=void 0,this.YL=void 0,this.$L=void 0,this.mGt=void 0,this.VEt=void 0,this.Gl=void 0,this.jzt=void 0,this.HMt=void 0,this.Zzt=void 0,this.lGt=void 0,this.fGt=void 0,this.iq=void 0,this.Dpt=void 0,this.rV=void 0,this.cGt=void 0,this.dGt=void 0,this.uGt=void 0,this.bGt=void 0,this.OGt=void 0,this.Yzt=void 0,this.m7=void 0,this.w7=void 0,this.Vzt=void 0,this.oXt=void 0,this.dXt=void 0,this.vXt=void 0,this.hXt=void 0,this.cXt=void 0,this.fXt=void 0,this.tq=void 0,this.JW=void 0,this.ZW=void 0,this.qzt=void 0,this.Gzt=void 0,this.Bkt=void 0,this.n7=void 0,this.LEt=void 0,this.OEt=void 0,this.FEt=void 0,this.Xzt=void 0,this.Qzt=void 0,this.SXt=void 0,this.AGt=void 0,this.BXt=void 0,this.jW=void 0,this.kkt=void 0,this.GEt=void 0,this.xXt=void 0,this.Eh=void 0,this.oNt=void 0,this.IXt=void 0,this.IL=void 0,this.RXt=void 0,this.FV=void 0,this.H6=void 0,this.Je=void 0,this.Rq=void 0,this.CXt=void 0,this.DXt=void 0,this.EXt=void 0,this.PXt=void 0,this.Jzt=void 0,this.mmt=void 0,this.aGt=void 0,this.qEt=void 0,this.zEt=void 0,this.pGt=void 0,this.Rz=e,this.Cz=s,this.mHt=n,this.SGt=r,this.VEt=new cc,this.jzt=!1,this.HMt=void 0,this.Zzt=void 0,this.lGt=!1,this.fGt=void 0,this.iq=void 0,this.Dpt=void 0,this.rV=new at,this.cGt=void 0,this.dGt=void 0,this.uGt=new at,this.bGt=void 0,this.OGt=new at,this.Yzt=void 0,this.m7=new at,this.w7=void 0,this.Vzt=-1,this.oXt=void 0,this.dXt=void 0,this.vXt=void 0,this.hXt=void 0,this.cXt=void 0,this.fXt=void 0,this.tq=q.lz,this.JW=void 0,this.ZW=void 0,this.qzt=void 0,this.Gzt=void 0,this.Bkt=!1,this.n7=!1,this.LEt=void 0,this.OEt=0,this.FEt=0,this.Xzt=void 0,this.Qzt=0,this.SXt=!1,this.AGt=[],this.BXt=void 0,this.kkt=t=>{this.JW=P(t.errorObject),this.ZW=t.errorObject,this.Rs(t)},this.GEt=t=>{this.qq(Ok(t.lt))},this.xXt=()=>{var t;null==(t=this.HMt)||t.hUt();const i=this.ct;i!==this.LEt&&(this.LEt=i,this.So(new Rs(this.LEt)))},this.Eh=()=>{this.UP&&this.So(new At(this.MP))},this.oNt=()=>{this.So(new hl(this.MP))},this.IXt=()=>{this.MTt(),this.So(new Tc(this.MP))},this.IL=()=>{void 0!==this.BXt&&(zd.Lg(this.BXt),this.BXt=void 0),this.So(new ce(this.MP))},this.RXt=()=>{this.So(new H(this.MP))},this.FV=()=>{this.So(new ou(this.MP,this.Ax))},this.H6=()=>{var t;const i=this.MP,e=this.CP;null==(t=this.HMt)||t.NXt(i),this.So(new Si(i,e)),!this.hx&&this.iGt()&&(this.zx(),this.Eh())},this.Je=()=>{this.So(new F(this.MP))},this.Rq=()=>{this.So(new Es(this.MP))},this.CXt=()=>{this.Ekt()},this.DXt=()=>{this.So(new Ze(this.MP,this.Mx))},this.EXt=()=>{this.TL.kx?this.So(new ux(this.MP)):(null!=this.BXt||(this.BXt=zd.Og(()=>{this.HMt&&this.SXt&&Wr(this.HMt.MXt())},2500)),this.MTt(),this.So(new ux(this.MP)))},this.PXt=()=>{this.SXt=!0,this.So(new lo(this.MP,this.Ax))},this.Jzt=t=>{D(t)||rt(t)||ll(t)||(this.VGt(),Wr(this.WGt()),!function(t){return t instanceof SN}(t)?this.qq(new Ga(Vo.MEDIA_LOAD_ERROR,t.message,t)):Wr(this.oGt({Jx:!0})))},this.mmt=t=>{if(D(t))return;const i=t instanceof Ga?t:new Ga(Vo.MEDIA_DECODE_ERROR,t.message,t);this.qq(i)},this.aGt=t=>{this.AGt.push(t)},this.qEt=()=>{this.STt()},this.zEt=()=>{this.TTt()},this.pGt=()=>{this.Ekt()},this.eut=new zG(h),this.TL=t,this.nV=i,this.oq=new LK(this.Rz.kY),this.kGt=new OK(this.TL),this.TGt=new jK(this.Rz),this._dt=Mo({},o.retryConfiguration,{maxRetries:null!=(a=o.retryConfiguration.maxRetries)?a:1/0}),this.YL=new He,this.$L=new He,this.mGt=new sl,this.Gl=new Yu([this.mGt,this.VEt]),this.lq=new ya(this.nV),this.TL.Eq=this.lq,this.kq=new dx(this,this.TL),this.bXt=new bs(this.kq,!0),this.kXt()}},LZ=class extends Ne{get VMt(){return this.LXt}get eLt(){return this.OXt}get nLt(){return this.FXt}get Mzt(){return this.UXt}get Uzt(){return[this.OXt,this.FXt].filter(it)}get ht(){return this.YL}get Br(){return this.Fkt.Br}get eGt(){return this.Fkt}get IFt(){const t=this.Uzt;return 0===t.length?ve.iL():t.reduce((t,i)=>t.Mn(i.IMt.IFt),ve.eL())}get zMt(){return this.VXt}get MP(){return this.oa.zzt(this)}get hGt(){var t,i;const e=null==(t=this.HXt)?void 0:t.hzt,s=null==(i=this.WXt)?void 0:i.hzt;return e&&s?s.Mn(e):null!=s?s:e}get Sx(){return this.N4}get nt(){return this.Gl}get rt(){return this.$L}get POt(){var t,i;return(null==(t=this.OXt)?void 0:t.IMt.POt)||(null==(i=this.FXt)?void 0:i.IMt.POt)||!1}get $Gt(){var t,i,e;return null!=(e=null==(t=this.OXt)?void 0:t.IMt.ct)?e:null==(i=this.FXt)?void 0:i.IMt.ct}get qXt(){var t,i;const e=null==(t=this.OXt)?void 0:t.IMt.ct,s=null==(i=this.OXt)?void 0:i.IMt.ct;return void 0!==e&&void 0!==s?_.min(e,s):null!=e?e:s}get zXt(){var t;const i=null==(t=this.Fkt.uVt)?void 0:t.IMt.ct;if(void 0!==i)return i;const e=this.Uzt;return e.length>0&&e.every(t=>function(t){return t.IMt.ect.length>0&&!t.IMt.POt}(t))?1/0:NaN}get ct(){var t;return null!=(t=this.$Gt)?t:this.zXt}get tGt(){var t;return null!=(t=this.qXt)?t:this.zXt}get Ozt(){const t=this.Uzt;if(0===t.length||this.ct!==1/0)return;let i;for(const e of t){const t=e.IMt.Sx;if(0===t.V)continue;const s=t.An(t.V-1)+e.IMt.cSt,n=e.IMt.zFt,r=s+(null!=n?n:0);(!i||i0&&(i=i.Mn(t),e=_.max(e,t.Tn(0)))}if(i.V>0)return i;return ve.$M(e)}(this.Uzt);0!==e.V&&(this.N4=e,null==(t=this.wpt)||t.qU(e.Tn(0)),null==(i=this.hBt)||i.qU(e.Tn(0)))}NXt(t){const i=[];if(this.LXt)for(const e of this.NGt)for(const s of e.Jqt){const e=s.iHt(t);e&&!pi(i,e)&&i.push(e)}df(this.VXt,i)||(this.VXt=i,this.So(new AJ))}get wGt(){if(this.Mc.latencyConfiguration)return this.Mc.latencyConfiguration;const t=this.Uzt;if(0===t.length)return;if(this.POt)return;const i=_.max(...t.map(t=>{var i;return null!=(i=t.IMt.cSt)?i:0}));return{minimumOffset:.66*i,maximumOffset:2*i,targetOffset:1*i,forceSeekOffset:3*i,minimumPlaybackRate:Ot,maximumPlaybackRate:Jt}}get nGt(){return this._kt}get sx(){return this.sSt}set sx(t){this.sSt!==t&&(this.sSt=t,this.So(t?new gt:new Fr))}get rO(){return this.okt}get bU(){return this.zU}set bU(t){this.zU=t;for(const i of this.jXt)i.bU=t}get jXt(){return[this.QXt,this.KXt,this.pq,this.wpt,this.yq,this.hBt].filter(it)}fq(t){for(const i of t)i.src&&this.pq.eV(i)}klt(){const t=this.Br.HUt;if(0===t.length)return void Ft.cLt(ra,"The HLSModel contains no variant streams.");var i;const e=null!=(i=Jr(t,t=>0!==t.FOt.length&&0!==t.UOt.length))?i:t[0],s=t.filter(t=>t!==e);for(const t of e.FOt){const i=new Uk,n=[];i.lO(new DK(e,t)),n.push(t);for(const e of s){const s=Jr(e.FOt,i=>SK(i,t)&&!PK(n,i));s&&(i.lO(new DK(e,s)),n.push(s))}this.YL.tt(new IK(this,this.Rz,this.YL,i))}for(const t of e.UOt){const i=new Uk,n=[];i.lO(new BK(e,t)),n.push(t);for(const e of s){const s=Jr(e.UOt,i=>SK(i,t)&&!PK(n,i));s&&(i.lO(new BK(e,s)),n.push(s))}this.$L.tt(new RK(this,this.Rz,this.$L,i))}}async PGt(t){if(this._kt)return;if(!this.Fkt.rVt){try{await this.Fkt.dVt(t)}catch(t){throw sa(t),this.sx=!1,new Ga(Vo.MANIFEST_LOAD_ERROR,"The provided HLS document could not be loaded - "+t.message,t)}this.klt()}const i=await this.YXt();this.JXt(i),this.ZXt(i);const e=this.$Xt(i.FOt),s=this.tjt(i.UOt),n=this.ijt(i.VOt);n||this.ejt(i.HOt),await this.oGt(e,s,n,{RGt:!0}),this._kt=!0}ZXt(t){const i=this.hBt;if(!i)return;const e=function(t){const i=[];for(const e of t){const t=yZ(e);void 0!==t&&i.push({nit:t,rit:e.bs||"",Th:e.l})}return i}(t.HOt);for(const t of e)i.Mgt(t)}async YXt(){if(this.sjt=this.Br.HUt,!this.sjt.length)throw new Ga(Vo.MANIFEST_LOAD_ERROR,"LLHLSPlayer - Could not select initial variant stream: the HLS stream contains no variant streams.");let t=await this.njt(this.sjt);if(0===t.length)throw new Ga(Vo.MANIFEST_LOAD_ERROR,"LLHLSPlayer - Could not select initial variant stream: the HLS stream contains no variant stream with a supported codec.");const i=await this.rjt(t);return i.length>0&&(t=i),Ft.hB(ra,"Selecting initial active variant stream."),bZ(t,this.Mc.abr,this.Rz,this._dt.maximumBackoff)}$Xt(t){if(this.hjt){const t=this.ojt(this.hjt);if(t)return t}return RZ(t)}tjt(t){if(this.ajt){const t=this.ojt(this.ajt);if(t)return t}return RZ(t)}ijt(t){for(const t of this.Gl.II)t.Xk===xh.Kn&&(this.ujt=this.KXt.Bzt(t));if(this.ujt){const t=this.ojt(this.ujt);if(t)return t}return IZ(t)}ejt(t){const i=this.hBt;if(!i)return;const e=IZ(t);if(void 0!==e){const t=yZ(e);i.Bgt(t).Xk=xh.Kn}}GMt(t){for(const i of t)if(!this.cjt(i))throw new m("LLHLSPlayer - Could not set an allowed variant stream that does not exists in the internal HLS model.");this.sjt=t}cjt(t){const i=this.Br;return!!i&&pi(i.HUt,t)}ojt(t){if(t&&this.LXt)return Jr(this.LXt.lLt,i=>i===t)}async djt(){var t;const i=null!=(t=this.sjt)?t:this.Br.HUt;if(0===i.length&&!this.sjt)return Ft.hB(ra,"The HLS stream does not contain any variant streams, skipping ABR selection."),[];if(1===i.length&&!this.sjt)return Ft.hB(ra,"The HLS stream contains only a single variant stream, skipping ABR selection."),[];const e=await this.njt(i);if(0===e.length)return Ft.cLt(ra,"No variant streams with supported codecs available to perform ABR selection on."),[];const s=TZ(e,this._dt.maximumBackoff);return 0===s.length?(this.ljt||(Ft.cLt(ra,"No variant streams with online renditions available to perform ABR selection on."),this.fjt++,await this.vjt(e)),[]):s}async _jt(){const t=await this.yLt();if(void 0===t)return;const i=!!this.LXt&&t.kWt.kW)&&(this.lDt={WMt:t,ift:zd.Mg()});const r=zd.Mg()-this.lDt.ift;var h;const o=null!=(h=null==(e=this.FXt)?void 0:e.IMt.vLt)?h:1/0;return i>=_.max(o-1,5)||r>1e3}pjt(t){return oo(t,t=>t.kW)}async MXt(){this.lDt=void 0;let t=await this.djt();if(0===t.length)return;const i=await this.rjt(t);i.length>0&&(t=i);const e=this.pjt(t);void 0!==e&&(await this.XMt(e,{jMt:!0}),this.oa.hq.RIt(e.kW))}async vjt(t){this.ljt=!0;let i=!1;for(const e of t)try{const t=this.FXt?Jr(e.UOt,t=>SK(t,this.FXt)):void 0;if(void 0===t)continue;await this.wVt(t),t.IMt.jFt=-1/0,i=!0}catch(t){}if(i)this.fjt=0,await this.oa.rXt();else{if(this.fjt>=this._dt.maxRetries)return void this.oa.qq(new Ga(Vo.MEDIA_LOAD_ERROR,"The provided video renditions could not be loaded."));const t=_.min(this._dt.minimumBackoff*2**(this.fjt-1),this._dt.maximumBackoff);await Er(t)}this.ljt=!1,await this._jt()}async njt(t){let i=await _f(t,async t=>{var i,e;const s=[(null==(i=t.frt)?void 0:i.yCt)?'audio/mp4; codecs="'+t.frt.yCt+'"':void 0,(null==(e=t.frt)?void 0:e.bCt)?'video/mp4; codecs="'+t.frt.bCt+'"':void 0].filter(it);return 0===s.length||await this.kGt.QZ(s,this.Mc.useManagedMediaSource)});return i.some(t=>{var i;return null==(i=t.frt)?void 0:i.bCt})&&(i=i.filter(t=>!t.frt||t.frt.bCt||0!==t.UOt.length)),i.some(t=>{var i;return null==(i=t.frt)?void 0:i.yCt})&&(i=i.filter(t=>!t.frt||t.frt.yCt||0!==t.FOt.length)),i}rjt(t){return this.Fkt.oVt?_f(t,t=>async function(t,i){for(const e of t)if(!await i(e))return!1;return!0}([RZ(t.FOt),RZ(t.UOt),IZ(t.VOt),IZ(t.HOt)].filter(it),t=>this.mjt(t))):Promise.resolve([])}async mjt(t){if(0===t.IMt.ect.length)return!1;const i=t.IMt.ect[0];if(!i.nyt)return!1;const e=i.nyt,s=e.LAt?QK(e.LAt.Tn,e.LAt.V):void 0;try{return await this.eut.Uct(e.zE,s)}catch(t){return!1}}async sLt(t){if(!this.LXt)return void(this.hjt=t);const i=this.ojt(t);if(t&&!i)return void Ft.lt(ra,"Trying to set an invalid rendition as the active audio rendition.");if(this.OXt===i)return;const e=it(i)!==it(this.OXt);Ft.hB(ra,"Switching audio rendition"),await this.oGt(i,this.FXt,this.UXt,{KMt:!0,jMt:e})}async rLt(t){if(!this.LXt)return void(this.ajt=t);const i=this.ojt(t);if(t&&!i)return void Ft.lt(ra,"Trying to set an invalid rendition as the active video rendition.");if(this.FXt===i)return;const e=it(i)!==it(this.FXt);Ft.hB(ra,"Switching video rendition"),await this.oGt(this.OXt,i,this.UXt,{QMt:!0,jMt:e})}async Nzt(t){if(!this.LXt)return void(this.ujt=t);const i=this.ojt(t);!t||i?(Ft.hB(ra,"Switching subtitle rendition"),await this.oGt(this.OXt,this.FXt,i)):Ft.lt(ra,"Trying to set an invalid rendition as the active subtitle rendition.")}async wjt(t,i){if(this.ljt)return;const e=0===this.$L.V;t.Km===nl.Bk||t.Km===nl.Dk&&e?this.sjt&&this.sjt.length<=1?(t.Km===nl.Bk&&this.FXt!==t?await this.oGt(this.OXt,t,this.UXt):t.Km===nl.Dk&&e&&this.OXt!==t&&await this.oGt(t,this.FXt,this.UXt),await this.yjt(t,i)):await this._jt():await this.yjt(t,i)}async wVt(t,i){try{await this.Fkt.wVt(t,i)}catch(e){throw sa(e),(rt(e)||ll(e))&&await this.wjt(t,i),e}}async yjt(t,i){if(!pi(this.Ajt,t)){this.Ajt.push(t);try{const e=t.Km===nl.OU||t.Km===nl.bLt?1/0:this._dt.maxRetries;await $i(()=>this.retryOfflineRenditionsCallback(t,i),i,e,this._dt.minimumBackoff,this._dt.maximumBackoff)}catch(t){this.oa.qq(new Ga(Vo.MEDIA_LOAD_ERROR,t.message,t))}finally{oi(this.Ajt,t),t.IMt.jFt===-1/0&&await this.oa.rXt()}}}async UGt(t){var i;const e=this.OXt,s=this.FXt,n=[];n.push(this.bjt(s,t)),TK(e,s)||n.push(this.bjt(e,t));const r=this.UXt;if(null==(i=this.Mc.hls)?void 0:i.delaySubtitlePreload)await Promise.all(n),await this.bjt(r,t);else{const i=this.bjt(r,t);await Promise.all([...n,i])}}async bjt(t,i){if(t)try{await this.Fkt.wVt(t,i)}catch(e){sa(e),(rt(e)||ll(e))&&await this.Sjt(t,i)}}async Sjt(t,i){if(this.ljt)return;const e=0===this.$L.V;if(t.Km===nl.Bk||t.Km===nl.Dk&&e)if(this.sjt&&this.sjt.length<=1)await this.yjt(t,i);else{const t=await this.YXt();this.JXt(t);const i=this.$Xt(t.FOt),e=this.tjt(t.UOt),s=this.ijt(t.VOt);await this.oGt(i,e,s)}else await this.yjt(t,i)}oGt(t,i,e,s){void 0===s&&(s={});const n={jMt:s.jMt||!1,KMt:s.KMt||!1,QMt:s.QMt||!1,Jx:s.Jx||!1,RGt:s.RGt||!1};return n.RGt||n.Jx||this.OXt!==t||this.FXt!==i||this.UXt!==e?void 0===t&&void 0===i?Promise.reject(new m("Trying to buffer no media renditions.")):(this.OXt=t,this.FXt=i,this.UXt=e,this.hUt(),this.So(new lZ),this.oa.oGt(n)):Promise.resolve()}async XMt(t,i){if(!this.oa.IGt)return void Ft.lt(ra,"The LLHLSPlayer is not loaded.");if(!t)return void Ft.lt(ra,"Cannot explicitly set the active variant stream to undefined.");if(!this.cjt(t))return void Ft.lt(ra,"Trying to set an active variant stream that does not exists on the internal model.");if(t===this.LXt)return void Ft.hB(ra,"Trying to set the already active variant stream, ignoring.");const e=this.OXt?Jr(t.FOt,t=>SK(t,this.OXt)):void 0,s=this.FXt?Jr(t.UOt,t=>SK(t,this.FXt)):void 0,n=this.UXt?Jr(t.VOt,t=>SK(t,this.UXt)):void 0;this.JXt(t),this.lDt=void 0,await this.oGt(e,s,n,i)}JXt(t){var i;if(Ft.hB(ra,"Setting active variant stream."),this.LXt===t)return;const e=(null==(i=this.LXt)?void 0:i.XLt)!==(null==t?void 0:t.XLt);if(this.LXt&&e)for(const t of this.LXt.VOt)this.KXt.zOt(t);if(this.LXt=t,this.So(new dZ),t&&e)for(const i of t.VOt)this.KXt.Czt(i)}Tjt(){this.kjt(this.YL),this.kjt(this.$L)}kjt(t){const i=[];for(const e of t.II){const t=[];for(const i of e.KI.II)pi(i.WMt.lLt,i.UMt)||t.push(i);for(const i of t)e.KI._S(i),i.kn();0===e.KI.V&&i.push(e)}for(const e of i)t.it(e),e.kn()}async KGt(t){const i={stack:[],error:void 0,hasError:!1};try{const e=Be(i,at.ep([t]),!1),s=[this.FXt,TK(this.OXt,this.FXt)?void 0:this.FXt,this.UXt].filter(it);await Promise.all(s.filter(t=>!t.IMt.VFt).map(t=>this.Fkt.yVt(t,e.Yg)))}catch(t){i.error=t,i.hasError=!0}finally{Cs(i)}}async zGt(){var t,i,e;const s=this.OXt,n=this.FXt,r=null==(t=this.LXt)?void 0:t.frt,h=[];if(void 0!==s){var o,a;const t=null!=(a=null==(o=s.frt)?void 0:o.yCt)?a:null==r?void 0:r.yCt;if(!t)return;{const i='audio/mp4; codecs="'+t+'"';Ft.hB(ra,"Configuring MediaSource for initial audio rendition with codec: "+i+"."),h.push(i)}}if(void 0!==n){var u,c;const t=null!=(c=null==(u=n.frt)?void 0:u.bCt)?c:null==r?void 0:r.bCt;if(!t)return;{const i='video/mp4; codecs="'+t+'"';Ft.hB(ra,"Configuring MediaSource for initial video rendition with codec: "+i+"."),h.push(i)}}if(0===h.length)return void Ft.cLt(ra,"No codecs found on the active variant stream.");var d;const l=null!=(d=null==n||null==(i=n.IMt.ect[0])?void 0:i.MW)?d:[];var f;const v=null!=(f=null==s||null==(e=s.IMt.ect[0])?void 0:e.MW)?f:[],_=this.Mc,g=this.Br,p=await iY(_.contentProtection,h,[...g.UUt,...v,...l],this.nV,_.useCredentials);return{Km:Zr.wV,L4:h.map(t=>({qT:t})),aq:p,X4:_.useManagedMediaSource}}get NGt(){return[this.HXt,this.WXt,this.Ejt].filter(it)}XGt(t,i,e,s,n){const r=this.OXt,h=this.FXt,o=t&&TK(r,h);var a,u;if(i&&h)if(this.WXt)(e||n||o&&s)&&(this.WXt.Zg(),this.WXt.ezt.Gy()),this.WXt.UMt!==h&&this.WXt.oWt(h);else{const t=o?[Ci.Bk,Ci.Dk]:[Ci.Bk];this.WXt=this.Pjt(h,t)}else null==(a=this.WXt)||a.zg(),this.WXt=void 0;t&&r&&!o?this.HXt?((e||s)&&(this.HXt.Zg(),this.HXt.ezt.Gy()),this.HXt.UMt!==r&&this.HXt.oWt(r)):this.HXt=this.xjt(r):(null==(u=this.HXt)||u.zg(),this.HXt=void 0)}jGt(t){const i=this.UXt;if(this.Ejt){this.Ejt.UMt===i?t&&(this.Ejt.Zg(),this.Ejt.ezt.Gy()):(this.Ejt.zg(),this.Ejt=void 0)}if(!this.Ejt&&i&&(this.Ejt=this.Ijt(i)),i){const t=this.KXt.Lzt(i);t.Xk=xh.Kn,this.rzt(t)}}Pjt(t,i){const e=function(t,i,e,s,n,r,h,o,a,u,c){const d=e.Br.mM,l=new YJ(d),f=new jJ(Ci.Bk,t,e,l,s,n,r,c),v=h.YSt(l,d,i);return new cZ(f,l,v,o,a,u)}(t,i,this.Fkt,this.nV,this.eut,this.mHt,this.bGt,this.wpt,this.hBt,this.Rz,this.Mc.useCredentials);return e.$qt.wn(XJ.iWt,this.Rjt),e.$qt.wn(XJ.eWt,this.Cjt),e.tzt.wn(sZ.bqt,this.Djt),e.tzt.wn(sZ.Tqt,this.Bjt),e.tzt.wn(sZ.kqt,this.Njt),e.tzt.wn(sZ.Sqt,this.Mjt),e}xjt(t){const i=function(t,i,e,s,n,r,h,o,a){const u=i.Br.mM,c=new YJ(u),d=new jJ(Ci.Dk,t,i,c,e,s,n,a),l=r.YSt(c,u,[Ci.Dk]);return new cZ(d,c,l,h,void 0,o)}(t,this.Fkt,this.nV,this.eut,this.mHt,this.bGt,this.wpt,this.Rz,this.Mc.useCredentials);return i.$qt.wn(XJ.eWt,this.Cjt),i.tzt.wn(sZ.bqt,this.Djt),i.tzt.wn(sZ.Sqt,this.Mjt),i}Ijt(t){return function(t,i,e,s,n,r){const h=i.Br.mM,o=new YJ(h),a=new jJ(Ci.NT,t,i,o,e,s,n,r),u=new oZ(o,h,Ci.NT);return new cZ(a,o,u)}(t,this.Fkt,this.nV,this.eut,this.mHt,this.Mc.useCredentials)}izt(t,i){if(t?this.P4&&this.P4.Tzt(t,this.zU)||(this.P4=new pZ(Ci.Dk,t,this.zU)):this.P4=void 0,i?this.x4&&this.x4.Tzt(i,this.zU)||(this.x4=new pZ(Ci.Bk,i,this.zU)):this.x4=void 0,void 0!==this.WXt){const i=void 0!==t&&void 0===this.HXt,e=[this.x4,i?this.P4:void 0].filter(it);this.WXt.izt(e)}if(void 0!==this.HXt){const t=this.P4?[this.P4]:[];this.HXt.izt(t)}}rzt(t){t?this.Ljt&&this.Ljt.Tzt(t)||(this.Ljt=new wZ(t,this.Br.mM)):this.Ljt=void 0,void 0!==this.Ejt&&void 0!==this.Ljt&&this.Ejt.rzt(this.Ljt)}vGt(t){if(this.JU===t)return;this.JU=t;for(const i of this.jXt)i.YU(t);const i=this.UXt;if(void 0!==i){const t=this.KXt.Lzt(i);this.rzt(t)}}QGt(t,i){const e=[];t&&e.push(Ci.Dk),i&&e.push(Ci.Bk),this.Br.mM.OUt(e)}Ojt(){if(void 0===this.WXt)return!1;const t=zd.Mg();if(!this.WXt.$qt.nqt(t))return!1;const i=this.WXt.$qt.tqt();if(void 0===i||void 0===i.$at.ct)return!1;const e=this.MP,s=this.oa.ux,n=this.WXt.hzt.JM(e);if((void 0!==n?n.An(0)-e:0)>=2*i.$at.ct*s)return!1;if(i.iqt>0&&0===i.eqt)return i.sqt>1e3*i.$at.ct*.8;return 8*i.eqt/this.Rz.kY.kW>=1.8*i.$at.ct}async Fjt(){var t;const i=await this.yLt();if(void 0===i)return;const e=null==(t=this.WXt)?void 0:t.$qt.tqt();if(void 0===e)return;const s=this.LXt;if(e.eqt>0){if(_.max(0,e.eqt-e.iqt)<=e.eqt*(i.kW/s.kW))return}const n=i.kW{this.hUt()},this.Ujt=t=>{Wr(this.wjt(t.UMt,this.rV.Yg))},this.retryOfflineRenditionsCallback=async(t,i)=>{this.UXt!==t&&this.OXt!==t&&this.FXt!==t||(await this.Fkt.wVt(t,i),t.IMt.jFt=-1/0)},this.Djt=t=>{const i=this.LXt,e=null==i?void 0:i.LOt;if(this.Fkt.CVt(t.frt,t.UMt.IMt),!e&&(this.Fkt.DVt(t.frt,t.UMt.IMt),this.Tjt(),i)){const t=void 0!==this.OXt&&!pi(i.FOt,this.OXt),e=void 0!==this.FXt&&!pi(i.UOt,this.FXt);(t||e)&&this.oGt(t?void 0:this.OXt,e?void 0:this.FXt,this.UXt).catch(Ct)}},this.Bjt=t=>{const i=this.Vjt(t.UMt);void 0!==i&&(i.plt=t.plt)},this.Njt=t=>{const i=this.Vjt(t.UMt);void 0!==i&&(i.eyt=t.Eqt.iF())},this.Vjt=t=>{for(const i of this.$L.II){const e=i.YMt(t);if(void 0!==e)return e}},this.Mjt=t=>{this.Fkt.IVt(t.UMt)},this.Rjt=ph(t=>{t.qk===Ci.Bk&&this.Ojt()&&Wr(this.Fjt())},200),this.Cjt=t=>{var i;this.okt+=t.nWt;const e=this.$L.V>0?t.qk===Ci.Bk:t.qk===Ci.Dk;"$at"===t.sWt&&e&&Wr(this._jt()),this.So(new wV(function(t){if(t){if(void 0!==t.LAt){var i,e;const s=t.LAt.Tn+(null!=(e=t.LAt.V)?e:0);return{Yu:t.zE,Sat:[null==(i=t.LAt)?void 0:i.Tn,s],zk:!0}}return{Yu:t.zE.toString()||"",zk:!0}}return{Yu:"",zk:!0}}(t.uri),(null==(i=this.LXt)?void 0:i.kW)||0,t.mediaSequenceNumeber,t.mediaTrackId,t.qk,t.httpStatusCode,t.nWt))},this.oa=t,this.Mc=i,this.nV=s,this.Rz=n,this.TGt=r,this.eut=h,this.kGt=o,this.mHt=a,this.bGt=u,this._dt=c,this.GXt=l,this.JU=null!=f?f:new cX,this.rV=new at;const g=null!=(_=null==(v=i.latencyConfiguration)?void 0:v.targetOffset)?_:i.liveOffset;this.Fkt=new _J(this.nV,this.eut,i.useCredentials,zd.xm(i.src),g),this.Fkt.wn(vJ.iVt,this.NVt),this.Fkt.wn(vJ.eVt,this.Ujt),this.Fkt.wn([d.Ww,d.qw,d.ey],this.Rs),this.KXt=new CZ(this,this.JU),this.Gl.FW(this.KXt.Z),i.hlsDateRange&&(this.QXt=new yJ(this.Fkt,this.JU),this.Gl.FW(this.QXt.Z)),e.textTracks&&(this.pq=new Kh(this.JU,this.nV),this.Gl.FW(this.pq.Z),this.fq(e.textTracks));!pi(i.ignoreEmbeddedTextTrackTypes,nh.CEA608)&&(this.hBt=new kW(this.JU),this.Gl.FW(this.hBt.Z));!pi(i.ignoreEmbeddedTextTrackTypes,nh.EMSG)&&(this.wpt=new WG(this.JU),this.yq=new ex(this.JU,this.wpt.Z),this.Gl.FW(this.wpt.Z),this.Gl.FW(this.yq.Z))}};function OZ(t,i){if(!i||i.IMt.POt)return!1;const e=i.IMt.ect;return 0!==e.length&&e[0].EO>t}r();var FZ=class{Xq(t,i){return!!$T(t.type)&&!t.useNativePlayback}async jq(t){return!!t.aes128||await kT(t,!0)}};r(),r();var UZ=class{async gHt(t,i,e){try{const s=await crypto.subtle.importKey("raw",i,{name:"AES-CBC"},!1,["decrypt"]),n=await crypto.subtle.decrypt({name:"AES-CBC",iv:e},s,t);return new j(n)}catch(t){throw new Ga(Vo.CONTENT_PROTECTION_INTERNAL_ERROR,"Error during AES128 decrypt.")}}zg(){}static LS(){return"undefined"!=typeof crypto&&void 0!==crypto.subtle&&void 0!==crypto.subtle.decrypt}};r(),r(),r(),r();var kc=class extends wp{constructor(t,i){super(t),this.data=void 0,this.data=i}},VZ=["message","messageerror","error"];r();var HZ=class extends wp{constructor(t){super(Mc.ma),this.error=void 0,this.error=t}},WZ=class extends Ne{get Hjt(){return this.Wjt.Yg.Hg}qjt(t,i){this.Hjt||(void 0!==this.zjt?this.zjt.qjt(t,i):this.Gjt.push({Py:t,Xjt:i}))}jjt(){this.Hjt||(this.Wjt.Zg(),Yo(this.Gjt),void 0!==this.zjt&&this.zjt.jjt())}constructor(t){super(),this.zjt=void 0,this.Wjt=void 0,this.Gjt=[],this.Qjt=t=>{if(this.Hjt)t.jjt();else{this.zjt=t,this.zjt.wn(VZ,this.Rs);for(const i of this.Gjt)t.qjt(i.Py,i.Xjt);Yo(this.Gjt)}},this.Kjt=t=>{if(this.Hjt)return;const i=t instanceof m?t:new m("Could not create Worker.");this.So(new HZ(i)),this.jjt()},this.Wjt=new at,t(this.Wjt.Yg).then(this.Qjt,this.Kjt)}};r(),r();var qZ=class extends Ne{qjt(t,i){i?this.zjt.postMessage(t,i):this.zjt.postMessage(t)}jjt(){this.Vo(),this.zjt.removeEventListener("message",this.Yjt),this.zjt.removeEventListener("messageerror",this.Jjt),this.zjt.removeEventListener("error",this.w9),this.zjt.terminate()}constructor(t,i){super(),this.zjt=void 0,this.Yjt=t=>{this.So(new kc("message",t.data))},this.Jjt=t=>{this.So(new kc("messageerror",t.data))},this.w9=t=>{null==t.preventDefault||t.preventDefault.call(t);const i=t.error instanceof m?t.error:new m(t.message);this.So(new HZ(i)),this.jjt()},this.zjt=new ad(t,i),this.zjt.addEventListener("message",this.Yjt),this.zjt.addEventListener("messageerror",this.Jjt),this.zjt.addEventListener("error",this.w9)}};r();var zZ=0,GZ=class extends Ne{qjt(t,i){i?this.Zjt.contentWindow.postMessage({type:"message",data:t},"*",i):this.Zjt.contentWindow.postMessage({type:"message",data:t},"*")}jjt(){var t;this.Zjt.removeEventListener("load",this.$jt),self.removeEventListener("message",this.tQt),null==(t=this.Zjt.contentWindow)||t.postMessage({type:"terminate"},"*"),os(this.Zjt)}constructor(t,i){super(),this.hS=void 0,this.iQt=void 0,this.Zjt=void 0,this.eQt=void 0,this.$jt=()=>{this.Zjt.removeEventListener("load",this.$jt),this.Zjt.contentWindow.postMessage({type:"initialize",id:this.hS,script:this.iQt},"*")},this.tQt=t=>{t.origin===this.eQt&&t.data.id===this.hS&&("initialized"===t.data.type||("error"===t.data.type?(this.So(new HZ(new m(t.data.data.message))),this.jjt()):this.So(new kc("message",t.data.data))))},this.hS=zZ++,this.iQt=t;const e=zd.Dh("iframe.html",i);this.Zjt=function(t){const i=h.createElement("iframe");return i.width="0",i.height="0",i.style.display="none",i.role="",i.src=t,h.body.appendChild(i),i}(e.href),this.eQt=e.origin,this.Zjt.addEventListener("load",this.$jt),self.addEventListener("message",this.tQt)}};function XZ(t,i,e){const s=zd.xm(t,i);return new WZ(t=>async function(t,i,e,s){let n;try{return n=new qZ(t,e),await QZ(n,s),n}catch(t){null==n||n.jjt(),sa(t)}if(jZ&&NA){let i;try{const e=await zd.SP.lk({Yu:t,Uk:X.GET,dk:M.NT,Yg:s});i=await e.UT(s)}catch(t){sa(t)}if(i){let t;try{const r=NA([i],{type:"application/javascript"});return t=URL.createObjectURL(r),n=new qZ(t,e),await QZ(n,s),n}catch(t){null==n||n.jjt(),sa(t),jZ=!1}finally{t&&URL.revokeObjectURL(t)}}}try{return n=new GZ(t,i),await QZ(n,s),n}catch(t){throw null==n||n.jjt(),t}}(s,i,e,t))}var jZ=!0;async function QZ(t,i){const e=await t.ww(["message","error"],i);if("error"===e.type)throw function(t){return new Ga(Vo.CONFIGURATION_ERROR,"THEOplayer workers could not be loaded. Please check the configuration of the libraryLocation.",t)}(e.error);if(!function(t){return Gd(t)&&"10.0.0"===t.sQt}(e.data))throw new Ga(Vo.CONFIGURATION_ERROR,"THEOplayer workers could not be loaded. Please check that the worker's version matches THEOplayer's version (10.0.0).");return e}r();var KZ=function(t){return t.nQt="gHt",t.rQt="WHt",t}({}),YZ=function(t){return t.hQt="oQt",t.aQt="uQt",t}({}),JZ=class{cQt(){const t=XZ(this.dQt,this.lQt,{name:"THEOplayer decrypt worker"});return t.wn("message",this.fQt),t.wn("error",this.vQt),t}gHt(t,i,e){const s=""+ ++this._Qt,n={gQt:KZ.nQt,pQt:s,mQt:t,wQt:i,yQt:e},r=new pa;return this.AQt.set(s,r),null!=this.zjt||(this.zjt=this.cQt()),this.zjt.qjt(n),r.Qy}zg(t){void 0===t&&(t=new dt),this.AQt.forEach(i=>i.jy(t)),this.AQt.clear(),this.zjt&&(this.zjt.jjt(),this.zjt=void 0)}constructor(t){this.lQt=void 0,this.dQt=void 0,this.zjt=void 0,this._Qt=0,this.AQt=qh(),this.fQt=t=>{const i=t.data,e=i.bQt,s=this.AQt.get(e);if(s)if(this.AQt.delete(e),i.SQt===YZ.hQt)s.Xy(i.TQt);else if(i.SQt===YZ.aQt){const t=i.kQt,e=i.EQt?new m(i.EQt):void 0,n=new Ga(Vo.CONTENT_PROTECTION_INTERNAL_ERROR,"Error during AES128 decrypt. (code: "+t+")",e);s.jy(n)}},this.vQt=t=>{const i=new Ga(Vo.CONTENT_PROTECTION_INTERNAL_ERROR,t.error.message,t.error);this.zg(i)},this.lQt=t;try{this.dQt=zd.xm("theoplayer.d.js",t)}catch(t){throw new Ga(Vo.CONFIGURATION_ERROR,"Invalid player configuration: missing libraryLocation",t)}}};function ZZ(t){const i=Jr(t.boxes,LB);if(!i)return;const e=Jr(i.boxes,OB);return e?e.handlerType:void 0}function $Z(t){const i=new Ty;return i.boxes.push(...t.boxes),i}function t$(t){const i=new al;return i.boxes.push(...t.boxes),i}r(),r(),r(),r();var i$=8;function e$(t,i){const e=function(t){const i=new Zw;return i.boxes.push(...t.boxes),i}(t),s=n$(i);for(let t=0;tt instanceof Fc&&t.trackId===s);if(r>=0){const s=i.boxes[r],n=t$(i);n.boxes[r]=new vw(new j(s.getSize()-i$)),e.boxes[t]=n}}}return e}function s$(t,i){const e=function(t){const i=new ay;return i.boxes.push(...t.boxes),i}(t);for(let t=0;t0){const t=o.samples;if(!o.flags.sampleDurationPresent){o.flags.sampleDurationPresent=!0;const i=null!=s?s:n.defaultSampleDuration;for(const e of t)e.duration=i}t[0].duration+=h.toNumber(),o.samples=t}}r();var h$="Mp4Transmuxer",o$=class extends nZ{Vqt(t,i){ii(i);const e=t.UMt,s=fN(dh(t.bOt.ck.ck));if(!s)throw new m("Mp4Transmuxer - Unable to parse "+e.Km+" MP4 initializer.");this.j2=s;const n=function(t){let i,e;for(const s of t.Z)i||(i=s.T1),e||(e=s.S1);if(i||e)return{yCt:i,bCt:e,ULt:void 0};return}(s);n&&this.zqt(e,n);const r=function(t){for(const i of t.Z)if(void 0!==i.E1)return i.E1;return}(s);void 0!==r&&this.Gqt(e,r);const h=function(t){var i;const e=Ry(t),s=Jr(e.boxes,BB),n=s.boxes.filter(NB),r=Jr(n,t=>ZZ(t)===Tw.AUDIO),h=Jr(n,t=>ZZ(t)===Tw.VIDEO),o={yCt:{$D:r?n$(r):void 0},bCt:{$D:h?n$(h):void 0}},a=null==(i=Jr(s.boxes,FB))?void 0:i.boxes.filter(UB);var u,c;const d=a?{yCt:null!=(u=Jr(a,t=>t.trackId===o.yCt.$D))?u:void 0,bCt:null!=(c=Jr(a,t=>t.trackId===o.bCt.$D))?c:void 0}:void 0;var l,f;if(d&&(o.yCt.NN=null==(l=d.yCt)?void 0:l.defaultSampleDuration,o.bCt.NN=null==(f=d.bCt)?void 0:f.defaultSampleDuration),!r||!h)return{yCt:r?t:void 0,bCt:h?t:void 0,DU:o};const v=$Z(e),_=$Z(e),g=e.boxes.indexOf(s);v.boxes[g]=e$(s,h),_.boxes[g]=e$(s,r);const p=v.serialize().join(),m=_.serialize().join();return{yCt:p,bCt:m,DU:o}}(t.bOt.ck.ck);if(this.PQt=h.DU,h.bCt){const i=Jr(s.Z,t=>t.$D===h.DU.bCt.$D),e={Km:"FRt",ck:{Km:Po.vZ,ck:h.bCt},Lot:Ci.Bk,kOt:t.kOt,Yqt:{frt:'video/mp4; codecs="'+i.S1+'"',MW:t.MW},EO:t.EO,UMt:t.UMt,hHt:t.bOt.hHt};this.fqt(e)}if(h.yCt){const i=Jr(s.Z,t=>t.$D===h.DU.yCt.$D),e={Km:"FRt",ck:{Km:Po.vZ,ck:h.yCt},Lot:Ci.Dk,kOt:t.kOt,Yqt:{frt:'audio/mp4; codecs="'+i.T1+'"',MW:t.MW},EO:t.EO,UMt:t.UMt,hHt:t.bOt.hHt};this.fqt(e)}return Promise.resolve()}async Wqt(t,i){ii(i);const e=t.$at.hHt;Ft.hB(h$,"Transmuxing fMP4: "+we(e.nyt));const s=t.$at.ck,n=a$(s.ck,this.j2),r=ff(n.map(t=>t.Pet),xE);if(void 0!==r&&(e.xet=r,this.jqt(t.UMt)),!this.qUt.gUt(t.kOt)){const s=$c.eU(e.EO);if(n.length>0){const i=ff(n.map(t=>t.xQt),xE);for(const n of this.Bqt)this.qUt.PUt(t.kOt,n,i,s,u$(e),!1);this.jqt(t.UMt)}this.qUt.gUt(t.kOt)||await Nc(this.qUt.mUt(t.kOt),i)}const h=this.qUt.TUt(t.kOt),o=e.xet?this.qUt.kUt(e.xet,e).iF():e.EO,a=rZ(e,o);var u;const c={lHt:a,fHt:hZ(e,a),EO:o,ct:null!=(u=e.ct)?u:0,bU:h.iF(),kOt:t.kOt,UMt:t.UMt,hHt:t.$at.hHt},d=function(t,i){if(void 0===i.yCt.$D)return{yCt:void 0,bCt:t};if(void 0===i.bCt.$D)return{yCt:t,bCt:void 0};const e=Ry(t),s=$Z(e),n=$Z(e);for(let t=0;tt.$D===i),h=Jr(n,t=>t.$D===i),o=this.IQt(d.bCt,s,h,null==(l=this.PQt)?void 0:l.bCt.NN,e);this.RQt=s,this.Xqt(t.UMt,e,h.Pet.lF(r));const a=Mo({Km:"$at",ck:{Km:Po.vZ,ck:o},Lot:Ci.Bk},c);this.fqt(a)}if(d.yCt){const t=Mo({Km:"$at",ck:{Km:Po.vZ,ck:d.yCt},Lot:Ci.Dk},c);this.fqt(t)}this.CQt=e,this.DQt=n}IQt(t,i,e,s,n){if(!u$(n))return t;if(!this.CQt||!this.RQt||!this.DQt)return t;const r=this.RQt.$D,h=Jr(this.DQt,t=>t.$D===r),o=this.qUt.kUt(h.BQt,this.CQt),a=this.qUt.kUt(e.Pet,n).lF(o).JF(i.qD);if(a.hF($c.wF))return t;if(a.eF($c.eU(.5)))return t;const u=tJ(n)?n:n.tFt;return Ft.uLt(h$,"Stretching first video frame of segment #"+u.aOt+" to fill gap of "+a.iF()+"s"),function(t,i,e,s){const n=Ry(t),r=Jr(n.boxes,VB);if(r){const t=r.getSize();for(const t of r.boxes)t instanceof Fh&&r$(t,i,e,s);const n=r.getSize();if(n!==t){const i=n-t;for(const t of r.boxes)t instanceof Fh&&zB(t,i)}}return n.serialize().join()}(t,i.qD,a,s)}constructor(...t){super(...t),this.j2=void 0,this.PQt=void 0,this.CQt=void 0,this.DQt=void 0,this.RQt=void 0}};function a$(t,i){const e=lr(jt.TD(dh(t)),Ro.IC);if(!e)throw new m("Mp4Transmuxer - Unable to parse segment or part.");return function(t,i){const e=[];for(const n of t.Z){if(!n.GN||0===n.zN.length||0===n.zN[0].JN.length)continue;const t=n.gD.$D,r=Jr(i.Z,i=>i.$D===t);let h=0,o=1/0,a=0;const u=n.gD.NN||0;for(const t of n.zN)for(const i of t.JN){const t=i.ZN||0,e=h+t;var s;h+=null!=(s=i.ct)?s:u;const n=h+t;ea&&(a=n)}const c=$c.gF(n.GN.GN,r.qD);e.push({$D:t,xQt:c,Pet:c.lO($c.pF(o,r.qD)),NQt:c.lO($c.pF(h,r.qD)),BQt:c.lO($c.pF(a,r.qD))})}return e}(e,i)}function u$(t){return tJ(t)?t.AOt:0===t.eFt&&t.tFt.AOt}var c$="MpegtsTransmuxer",d$=class extends o${Vqt(t,i){return super.Vqt(t,i)}Oqt(t,i){if(super.Oqt(t,i),this.pE.MQt())return;var e;const s=null!=(e=null==i?void 0:i.nyt)?e:t.nyt;if(!s)return;/\.(ts|aac|mp3)/i.test(s.zE)&&this.pE.LQt()}OQt(t){let i;return t.UMt===this.FQt&&this.UQt.has(t.kOt)?i=this.UQt.get(t.kOt):(i=kJ(t.$at.ck.ck),this.FQt=t.UMt,this.UQt.set(t.kOt,i)),i}async Wqt(t,i){ii(i);const e=this.OQt(t),s=t.$at;if(e!==TJ.WVt&&e!==TJ.qVt)return super.Wqt(t,i);if(s.hHt.MW.some(f$))throw new Ga(Vo.CONTENT_PROTECTION_NOT_SUPPORTED,"SAMPLE-AES encryption is not supported for MPEG-TS or Packed Audio segments");const n=this.pE.LQt();let r;e===TJ.WVt?(Ft.hB(c$,"Transmuxing MPEG-TS: "+we(s.hHt.nyt)),r=await n.VQt({data:s.ck.ck,metadata:this.HQt})):(Ft.hB(c$,"Transmuxing raw audio: "+we(s.hHt.nyt)),r=await n.WQt({data:s.ck.ck,metadata:this.HQt})),ii(i),this.zqt(t.UMt,{yCt:r.metadata.audio_codec,bCt:r.metadata.video_codec,ULt:void 0}),r.metadata.video_frame_rate&&this.Gqt(t.UMt,r.metadata.video_frame_rate);const h=v$(r.metadata.first_decode_timestamp),o=v$(r.metadata.first_presentation_timestamp),a=void 0!==r.metadata.first_video_presentation_timestamp?v$(r.metadata.first_video_presentation_timestamp):void 0;if(s.hHt.xet=o,this.jqt(t.UMt),void 0!==a&&this.Xqt(t.UMt,s.hHt,function(t,i){let e=t.lF(i);return e.aF($c.wF)&&(e=e.lO(CE())),e}(a,o)),!this.qUt.gUt(t.kOt)){const e=$c.eU(s.hHt.EO);for(const i of this.Bqt)this.qUt.PUt(t.kOt,i,h,e,u$(s.hHt),!0);this.jqt(t.UMt),this.qUt.gUt(t.kOt)||await Nc(this.qUt.mUt(t.kOt),i)}const u=this.qUt.EUt(h,s.hHt);this.HQt=r.metadata;const c=this.qUt.kUt(o,s.hHt).iF(),d=rZ(s.hHt,c);var l;const f={lHt:d,fHt:hZ(s.hHt,d),EO:c,ct:null!=(l=s.hHt.ct)?l:0,bU:u.iF(),kOt:t.kOt,UMt:t.UMt,hHt:s.hHt};if(void 0===r.data.audio_media&&void 0===r.data.video_media){for(const t of this.Bqt){const i=Mo({Km:"$at",ck:void 0,Lot:t},f);this.fqt(i)}return}const v=[];if(void 0!==r.data.audio_media){if(r.data.audio_init&&(!this.qQt||this.zQt!==t.kOt||!L(this.qQt,r.data.audio_init))){const i=this.qUt.kUt(s.hHt.xet,s.hHt).iF(),e={Km:"FRt",ck:{Km:Po.vZ,ck:r.data.audio_init},Lot:Ci.Dk,kOt:t.kOt,Yqt:{frt:'audio/mp4; codecs="'+r.metadata.audio_codec+'"',MW:s.hHt.MW},EO:i,UMt:t.UMt,hHt:s.hHt};this.qQt=r.data.audio_init,this.zQt=t.kOt,this.fqt(e)}const i=Mo({Km:"$at",ck:{Km:Po.vZ,ck:r.data.audio_media},Lot:Ci.Dk},f);this.fqt(i)}else if(t.$at.hHt.ZOt&&pi(this.Bqt,Ci.Dk)){const t=Mo({Km:"$at",ck:void 0,Lot:Ci.Dk},f);this.fqt(t)}if(void 0!==r.data.video_media){if(r.data.video_init&&(!this.GQt||this.XQt!==t.kOt||!L(this.GQt,r.data.video_init))){const i=this.qUt.kUt(s.hHt.xet,s.hHt).iF(),e={Km:"FRt",ck:{Km:Po.vZ,ck:r.data.video_init},Lot:Ci.Bk,kOt:t.kOt,Yqt:{frt:'video/mp4; codecs="'+r.metadata.video_codec+'"',MW:s.hHt.MW},EO:i,UMt:t.UMt,hHt:s.hHt};this.GQt=r.data.video_init,this.XQt=t.kOt,this.jQt=fN(dh(r.data.video_init)),this.fqt(e)}const i=this.jQt.Z[0],e=a$(r.data.video_media,this.jQt)[0],n=this.IQt(r.data.video_media,i,e,void 0,s.hHt);this.RQt=i;const h=Mo({Km:"$at",ck:{Km:Po.vZ,ck:n},Lot:Ci.Bk},f);this.fqt(h),v.push(e)}else if(t.$at.hHt.ZOt&&pi(this.Bqt,Ci.Bk)){const t=Mo({Km:"$at",ck:void 0,Lot:Ci.Bk},f);this.fqt(t)}this.CQt=s.hHt,this.DQt=v}Zg(){this.qQt=void 0,this.GQt=void 0,this.zQt=-1,this.XQt=-1,super.Zg()}constructor(t,i,e,s){super(i,e,s),this.pE=void 0,this.HQt=void 0,this.qQt=void 0,this.GQt=void 0,this.jQt=void 0,this.zQt=-1,this.XQt=-1,this.FQt=void 0,this.UQt=ar(),this.pE=t}},l$=class{YSt(t,i,e){return new d$(this,t,i,e)}};function f$(t){return t.Uk===Zt.ELt}function v$(t){return $c.gF(Wt.fromBits(t.low,t.high),t.base)}r(),r();var _$=function(t){return t[t.MPEGTS_TO_FMP4=0]="MPEGTS_TO_FMP4",t[t.RAW_AUDIO_TO_FMP4=1]="RAW_AUDIO_TO_FMP4",t}({}),g$=()=>{const t=function(){if("undefined"==typeof WebAssembly)return!1;const t=Qt.d_;if(t>0&&t<=56)return!1;try{return void 0!==new WebAssembly.Module(_c("AGFzbQEAAAA="))}catch(t){return!1}}();return g$=()=>t,t};var p$=class{VQt(t){return this.QQt(_$.MPEGTS_TO_FMP4,t)}WQt(t){return this.QQt(_$.RAW_AUDIO_TO_FMP4,t)}cQt(){const t=XZ(this.dQt,this.lQt,{name:"THEOplayer transmux worker"});return t.wn("message",this.fQt),t.wn("error",this.vQt),t}QQt(t,i){const e=++this._Qt,s={type:t,id:e,input:i},n=new pa;return this.AQt.set(e,n),this.zjt.qjt(s),n.Qy}zg(t){void 0===t&&(t=new dt),this.AQt.forEach(i=>i.jy(t)),this.AQt.clear(),this.zjt.jjt()}constructor(t){this.lQt=void 0,this.dQt=void 0,this.zjt=void 0,this._Qt=0,this.AQt=ar(),this.fQt=t=>{const i=t.data;if(void 0!==i.requestId){const t=this.AQt.get(i.requestId);if(!t)return;this.AQt.delete(i.requestId),i.success?t.Xy(i.output):t.jy(new Ga(i.errorCode,i.error))}else i.success||this.zg(new Ga(i.errorCode,i.error))},this.vQt=t=>{const i=new Ga(Vo.MEDIA_DECODE_ERROR,t.error.message,t.error);this.zg(i)},this.lQt=t;const i=g$()?"THEOplayer.transmux.js":"THEOplayer.transmux.asmjs.js";try{this.dQt=zd.xm(i,t)}catch(t){throw new Ga(Vo.CONFIGURATION_ERROR,"Invalid player configuration: missing libraryLocation",t)}this.zjt=this.cQt()}},m$=class extends l${MQt(){return void 0!==this.zjt}LQt(){var t;return null!=(t=this.zjt)?t:this.zjt=new p$(this.KQt)}zg(){this.zjt&&(this.zjt.zg(),this.zjt=void 0)}constructor(t){super(),this.KQt=void 0,this.zjt=void 0,this.KQt=t,this.zjt=void 0}},w$=class{Ret(){return new m$(this.KQt)}constructor(t){this.KQt=void 0,this.KQt=t}},y$=class extends MZ{Wx(){return this.TL.Wx()}get Vx(){return this.TL.Vx}set Vx(t){this.TL.Vx=t}async kn(){var t;await super.kn(),null==(t=this.CPt)||t.kn()}constructor(t,i,e,s,n){const r=function(t){return UZ.LS()?new UZ:new JZ(t)}(n.libraryLocation);super(t,i,e,s,r,new w$(n.libraryLocation),new bt(Rc.Ng.lPt,Rc.Ng.dPt,Rc.Ng.ect,Rc.Ng.vPt),n),this.CPt=void 0,Qt.X_&&(this.CPt=new HU(this))}},A$=class extends y${async kn(){await super.kn(),await this.xq.Pq(this.TL)}constructor(t,i,e,s,n){const r=new Ss(t);super(r.Gq(Ci.Bk),i,e,s,n),this.xq=void 0,this.xq=r}},b$=class extends FZ{Xq(t,i){return!!za(t.useManagedMediaSource)&&(!(!t.useManagedMediaSource&&(Qt.ru||Qt.Tg))&&super.Xq(t,i))}async jq(t){return!(t.clearkey&&!t.fairplay&&Qt.X_)&&super.jq(t)}};cs(new class extends b${PR(t,i,e,s,n,r,h){return new A$(i,e,n,r,s)}Qq(){return!0}constructor(...t){super(...t),this.Kq=V.dR}}),Ft.Rt=()=>{var t;return Boolean(null==(t=s)?void 0:t.THEOplayerDebugLogsEnabled)},r(),r(),r(),r();var S$=class{Uct(t,i){return Promise.resolve(!1)}iut(t,i){return Promise.resolve(void 0)}HSt(t){return Promise.resolve(void 0)}WJ(t){return Promise.resolve(void 0)}},T$=class extends Ne{YQt(){var t;return null==(t=this.JQt)?void 0:t.IMt}Tn(){Wr($i(()=>this.ZQt(this.nT.Yg),this.nT.Yg))}async ZQt(t){await this.Fkt.dVt(t),this.$Qt&&(this.tKt(this.$Qt.Ti,this.$Qt.Mi),this.$Qt=void 0),this.j6=!0}iKt(t,i){this.j6?this.tKt(t,i):this.$Qt={Ti:t,Mi:i}}tKt(t,i){const e=this.eKt(t,i),s=null==e?void 0:e.UOt[0];s!==this.JQt&&(this.sKt(),void 0!==s&&(this.JQt=s,this.nKt=new CJ(this.Fkt,s),this.nKt.PHt()))}sKt(){this.JQt=void 0,this.nKt&&(this.nKt.zg(),this.nKt=void 0)}eKt(t,i){const e=Jr(this.Fkt.Br.HUt,e=>void 0!==e.uCt&&e.uCt.Ti===t&&e.uCt.Mi===i);return null!=e?e:this.Fkt.Br.HUt[0]}kn(){this.Vo(),this.nT.Zg(),this.nT.zg(),this.sKt(),this.Fkt.zg()}constructor(t,i,e){super(),this.Ac=void 0,this.Fkt=void 0,this.JQt=void 0,this.nKt=void 0,this.j6=void 0,this.$Qt=void 0,this.nT=new at,this.Ac=t,this.Fkt=new _J(e,new S$,t.useCredentials,t.src,t.liveOffset),this.Fkt.wn(d.qw,this.Rs),this.j6=!1}};r();var k$=class extends _o{get ht(){return this.B8.ht}get IP(){return this.B8.IP}get CP(){return this.B8.CP}set CP(t){this.B8.CP=t}get bt(){return this.B8.bt}get MP(){return this.B8.MP}set MP(t){this.B8.MP=t}OP(t,i){this.MP=t}get ct(){return this.B8.ct}get UP(){return this.B8.UP}get WP(){return this.B8.WP}get zP(){return this.B8.zP}get jP(){return this.B8.jP}get lt(){return this.B8.lt}get KP(){return this.B8.KP}get JP(){return this.B8.JP}get $P(){return this.B8.$P}set $P(t){this.B8.$P=t}get sx(){return this.B8.sx}get hx(){return this.B8.hx}get ux(){return this.B8.ux}set ux(t){this.B8.ux=t}get _x(){return this.B8._x}get mx(){return this.B8.mx}set mx(t){this.B8.mx=t}get Ax(){return this.B8.Ax}get Sx(){return this.B8.Sx}get kx(){return this.B8.kx}get nq(){return this.B8.nq}get nt(){return this.B8.nt}get Rx(){return this.B8.Rx}get rt(){return this.B8.rt}get Bx(){return this.B8.Bx}get Mx(){return this.B8.Mx}set Mx(t){this.B8.Mx=t}get Fx(){return this.B8.Fx}get Vx(){return this.B8.Vx}set Vx(t){this.B8.Vx=t}get hq(){return this.B8.hq}get BL(){}jx(){return this.B8.jx()}Hx(){return this.B8.Hx()}Aa(){return this.B8.Aa()}tI(t){return this.B8.tI(t)}Wx(){return this.B8.Wx()}we(){return this.B8.we()}Yx(){return this.B8.Yx()}Jx(){return this.B8.Jx()}zx(){return this.B8.zx()}Gx(){return this.B8.Gx()}hr(){return this.B8.hr()}Ta(t,i,e){return this.B8.Ta(t,i,e)}Px(t,i,e,s){return this.B8.Px(t,i,e,s)}xx(){return this.B8.xx()}be(){return this.B8.be()}Qx(){return this.B8.Qx()}Kx(){return this.B8.Kx()}kn(){this.Vo();for(const t of nR)this.B8.mn(t,this.Rs);return this.B8.kn()}constructor(t){super(),this.B8=void 0,this.B8=t;for(const t of nR)this.B8.wn(t,this.Rs)}},E$=class extends k${async Ta(t,i,e){await super.Ta(t,i,e),t.hlsDateRange&&this.$wt(t,i)}$wt(t,i){this.rKt=new T$(t,i,this.hKt),this.rKt.wn(d.qw,this.handleManifestUpdate),this.rKt.Tn()}hr(){return this.BVt&&(this.nt.it(this.BVt),this.N7.it(this.BVt),this.BVt.kn(),this.BVt=void 0,this.oKt=!1),this.rKt&&(this.rKt.kn(),this.rKt=void 0),this.N7.hr(),super.hr()}kn(){return this.mn(d.Jw,this.CXt),this.rKt&&(this.rKt.kn(),this.rKt=void 0),this.N7.kn(),super.kn()}constructor(t,i,e){super(t),this.rKt=void 0,this.hKt=void 0,this.oKt=!1,this.BVt=void 0,this.N7=void 0,this.handleManifestUpdate=t=>{this.So(t);const i=this.rKt.YQt();if(i){const t=this.nq;if(t){const e=t.getTime();let s=this.BVt;s||(s=new WY,this.BVt=s),s.er(i.EOt,t=>(t.getTime()-e)/1e3),!this.oKt&&s.L.V>0&&(this.nt.tt(s),this.N7.tt(s),this.oKt=!0)}}},this.CXt=()=>{this.rKt&&this.rKt.iKt(this.Bx,this.Rx)},this.hKt=i,this.N7=new hu(this),this.wn(d.Jw,this.CXt)}};!function(t){$I.Yq().Jq(t)}(function(t,i,e){return new E$(t,i,e)}),r(),r(),r(),r();var Vs=class extends R{get name(){return"CastError"}constructor(t,i=""){super("An error occurred while casting."),this.errorCode=void 0,this.description=void 0,this.errorCode=t,this.description=i}};async function P$(t){R$()||await async function(t){if(null==t?void 0:t.Hg)return Promise.reject(new dt);const{Qy:i,Xy:e,jy:n}=function(){let t,i;return{Qy:new Promise((e,s)=>{t=e,i=s}),Xy:t,jy:i}}(),r=s.__onGCastApiAvailable,h=()=>{s.__onGCastApiAvailable=r,n(new dt)};return s.__onGCastApiAvailable=(i,o)=>{i?e():n(new m(o)),null==t||t.jg(h),s.__onGCastApiAvailable=r,r&&r(i,o)},null==t||t.Xg(h),i}(t),I$()||await Er(100,t),I$()||(zd.um('Detected the Chromecast library was loaded without the CAF framework. It is strongly encouraged to load it with the CAF framework by using this URL: "//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"'),await x$())}var x$=mu(()=>function(t){return new Promise((i,e)=>{const s=h.createElement("script");s.onload=()=>i(),s.onerror=t=>e((null==t?void 0:t.error)||t),s.type="text/javascript",s.src=t,(h.head||h.documentElement).appendChild(s)})}("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js").catch(()=>{throw new Vs("API_NOT_INITIALIZED","The Chromecast library could not be loaded successfully.")}));function I$(){return Boolean("undefined"!=typeof cast&&cast.framework)}function R$(){return"undefined"!=typeof chrome&&chrome&&chrome.cast&&chrome.cast.isAvailable}function C$(t,i,e,s){if(it(i))for(const e of w.keys(i)){if("type"===e||"images"===e)continue;const s=i[e];it(s)&&(t[e]=s)}!function(t,i,e,s){if(!it(e)&&!it(null==i?void 0:i.images))return;t.images=[],e&&t.images.push(new s.Image(e));if(null==i?void 0:i.images)if(Z(i.images))t.images.push(new s.Image(i.images));else if(ul(i.images))for(const e of i.images){let i;var n,r;if(Z(e))i=new s.Image(e);else i=new s.Image(e.src),i.height=null!=(n=e.height)?n:null,i.width=null!=(r=e.width)?r:null;t.images.push(i)}}(t,i,e,s)}function D$(t,i,e){return void 0===e&&(e=chrome),function(t,i,e){switch(null==t?void 0:t.type){case"movie":{const s=new e.MovieMediaMetadata;return C$(s,t,i,e),s}case"audio":{const s=new e.MusicTrackMediaMetadata;return C$(s,t,i,e),!it(s.artist)&&it(t.artistName)&&(s.artist=t.artistName),s}case"tv-show":{const s=new e.TvShowMediaMetadata;return C$(s,t,i,e),!it(s.title)&&it(t.episodeTitle)&&(s.title=t.episodeTitle),!it(s.season)&&it(t.seasonNumber)&&(s.season=t.seasonNumber),!it(s.episode)&&it(t.episodeNumber)&&(s.episode=t.episodeNumber),s}default:{const s=new e.GenericMediaMetadata;return C$(s,t,i,e),s}}}(t,i,function(t){return{GenericMediaMetadata:t.cast.media.GenericMediaMetadata,MovieMediaMetadata:t.cast.media.MovieMediaMetadata,TvShowMediaMetadata:t.cast.media.TvShowMediaMetadata,MusicTrackMediaMetadata:t.cast.media.MusicTrackMediaMetadata,Image:t.cast.Image}}(e))}function wn(t){switch(t){case chrome.cast.ErrorCode.CANCEL:return"CANCEL";case chrome.cast.ErrorCode.TIMEOUT:return"TIMEOUT";case chrome.cast.ErrorCode.API_NOT_INITIALIZED:return"API_NOT_INITIALIZED";case chrome.cast.ErrorCode.INVALID_PARAMETER:return"INVALID_PARAMETER";case chrome.cast.ErrorCode.EXTENSION_NOT_COMPATIBLE:return"EXTENSION_NOT_COMPATIBLE";case chrome.cast.ErrorCode.EXTENSION_MISSING:return"EXTENSION_MISSING";case chrome.cast.ErrorCode.RECEIVER_UNAVAILABLE:return"RECEIVER_UNAVAILABLE";case chrome.cast.ErrorCode.SESSION_ERROR:return"SESSION_ERROR";case chrome.cast.ErrorCode.CHANNEL_ERROR:return"CHANNEL_ERROR";case chrome.cast.ErrorCode.LOAD_MEDIA_FAILED:return"LOAD_MEDIA_FAILED";default:return"CANCEL"}}function B$(t){if(t.items&&t.items.length>0&&it(t.currentItemId)&&t.currentItemId>=0)return Jr(t.items,i=>i.itemId===t.currentItemId)}r(),r(),r(),r(),r();var xn="urn:x-cast:com.theoplayer.cast";r(),r();var N$=function(t){return t.aKt="theoplayer_receiver_info",t.uKt="theoplayer_trackpropertychange",t.cKt="theoplayer_propertychange",t}({});r();var M$=function(t){return t.SKIP_AD="SKIP_AD",t}({});r();function L$(t){h.createElement("img").src=t}r(),r(),r();var O$=new RegExp(/^(\d\d):(\d\d):(\d\d)(?:\.(\d{3}))?$/);function F$(t){if(!Z(t))return;const i=t.match(O$);return i?3600*x(i[1],10)+60*x(i[2],10)+Number(i[3])+(Number(i[4])||0)/1e3:void 0}function U$(t){if(void 0===t)return;const i=t.match(/^([1-9]?\d|100)%$/);return i?x(i[1])/100:void 0}function V$(t,i){return"vmap"===t.type||!it(t.type)&&!it(i)}function H$(t,i){return"vast"===t.type||!it(t.type)&&it(i)}r(),r(),r();var W$=class{},q$=class extends W${get dKt(){return this.qc}lKt(){return null!=this.fKt||(this.fKt=De(this.qc,t=>t.lKt())),this.fKt}constructor(t){super(),this.qc=void 0,this.fKt=void 0,this.qc=t.sort((t,i)=>t.VN-i.VN)}};r(),r();var z$=class extends W${get o(){return this.vKt}get VN(){return this._Kt}get gKt(){return this.pKt}constructor(t,i){super(),this.vKt=void 0,this._Kt=void 0,this.pKt=void 0,this.vKt=t,this._Kt=i,this.pKt=!1}},G$=class extends z${get mKt(){return this.wKt}get yKt(){return this.AKt}get bKt(){return this.SKt}get TKt(){return this.kKt}get lt(){return this.JW}lKt(){if(void 0===this.EKt){let t,i,e,s=[];for(const n of this.wKt)n.PKt&&(t=n.PKt),n.xKt&&(i=n.xKt),n.IKt&&(e=n.IKt),s=s.concat(n.universalAdIds);this.EKt={TKt:this.TKt,PKt:t,RKt:i,IKt:e,lt:this.lt,CKt:s}}return[this.EKt]}constructor(t,i,e,s,n,r,h){super(t,i),this.AKt=void 0,this.SKt=void 0,this.kKt=void 0,this.wKt=void 0,this.JW=void 0,this.EKt=void 0,this.AKt=e,this.SKt=s,this.kKt=n,this.wKt=r,this.JW=h}};r(),r();var X$=class{get DKt(){return this.BKt}get NKt(){return this.MKt}constructor(t,i){this.BKt=void 0,this.MKt=void 0,this.BKt=t,this.MKt=i}},j$=class{get LKt(){return this.OKt}get FKt(){return this.UKt}get VKt(){return this.HKt}get WKt(){return this.qKt}get od(){return this.zKt}set od(t){this.zKt=t}get GKt(){return this.XKt}get jKt(){return this.QKt}KKt(){this.QKt=!0}get yKt(){return this.AKt}constructor(t,i,e,s,n,r){this.OKt=void 0,this.UKt=void 0,this.HKt=void 0,this.qKt=void 0,this.QKt=void 0,this.XKt=void 0,this.zKt=void 0,this.AKt=void 0,this.OKt=t,this.UKt=i,this.HKt=e,this.qKt=s,this.QKt=!1,this.XKt=n,this.AKt=r}};r();var Q$=function(t){return t.YKt="all",t.JKt="any",t.lz="none",t}({});var K$=class{get ZKt(){return this.$Kt}get tYt(){return this.iYt}constructor(t,i){this.$Kt=void 0,this.iYt=void 0,this.$Kt=t,this.iYt=i}},Y$=class{get o(){return this.hS}get Ti(){return this.sb}get Mi(){return this.hb}get eYt(){return this.sYt}get nYt(){return this.rYt}get hYt(){return this.oYt}get aYt(){return this.uYt}get cYt(){return this.dYt}get lYt(){return this.fYt}get vYt(){return this._Yt}get LKt(){return this.OKt}get FKt(){return this.UKt}get VKt(){return this.HKt}get gYt(){return this.pYt}get NKt(){return this.mYt}get wYt(){return this.yYt}constructor(t,i,e,s,n,r,h,o,a,u,c,d,l,f,v,_){this.sb=void 0,this.hb=void 0,this.hS=void 0,this.sYt=void 0,this.rYt=void 0,this.oYt=void 0,this.uYt=void 0,this.dYt=void 0,this.fYt=void 0,this._Yt=void 0,this.OKt=void 0,this.UKt=void 0,this.HKt=void 0,this.pYt=void 0,this.mYt=void 0,this.yYt=void 0,this.sb=t,this.hb=i,this.hS=e,this.sYt=s,this.rYt=n,this.oYt=r,this.uYt=h,this.dYt=o,this.fYt=a,this._Yt=u,this.OKt=c,this.UKt=d,this.HKt=l,this.pYt=f,this.mYt=v,this.yYt=_}};r();var J$=class{get id(){return this.hS}get uri(){return this.rFt}constructor(t,i){this.hS=void 0,this.rFt=void 0,this.hS=t,this.rFt=i}},_n=class{get AYt(){return this.bYt}get SYt(){return this.TYt}get kYt(){return this.EYt}get PYt(){return this.xYt}constructor(t,i,e,s){this.bYt=void 0,this.TYt=void 0,this.EYt=void 0,this.xYt=void 0,this.bYt=t,this.TYt=i,this.EYt=e,this.xYt=s}},Z$=class extends z${get TKt(){return this.kKt}get IYt(){return this.RYt}get CYt(){return this.DYt}get mKt(){return this.wKt}get BYt(){return this.NYt}get MYt(){return this.LYt}get lt(){return this.JW}lKt(){return void 0===this.RYt?[]:(null!=this.fKt||(this.fKt=this.RYt.lKt().map(t=>this.OYt(t))),this.fKt)}OYt(t){let i,e,s;for(const t of this.mKt)t.PKt&&(i=t.PKt),t.xKt&&(e=t.xKt),t.IKt&&(s=t.IKt);const n=t.TKt.concat(this.TKt);let r=t.PKt;if(i&&t.PKt){const e=new _n(t.PKt.FYt.AYt,t.PKt.FYt.SYt,t.PKt.FYt.kYt.concat(i.FYt.kYt),t.PKt.FYt.PYt.concat(i.FYt.PYt));r=t.PKt,r.FYt=e,r.NKt=r.NKt.concat(i.NKt)}let h=t.RKt;if(e&&e.DKt){var o,a;const s=[];for(const t of e.DKt)s.concat(t.WKt.kYt);const n=[];var u,c;for(const e of null!=(u=null==(o=t.RKt)?void 0:o.DKt)?u:[]){var d,l,f;const r=new _n(e.WKt.AYt,e.WKt.SYt,e.WKt.kYt.concat(s),(null!=(l=null==(d=t.PKt)?void 0:d.FYt.PYt)?l:[]).concat(null!=(f=null==i?void 0:i.FYt.PYt)?f:[]));n.push(new j$(e.LKt,e.FKt,e.VKt,r,e.GKt,e.yKt))}h=new X$(n,(null!=(c=null==(a=t.RKt)?void 0:a.NKt)?c:[]).concat(e.NKt))}let v=t.IKt;if(v){var _;let i=v.ZKt;var g,p;s&&s.ZKt&&(i=s.ZKt),v=new K$(i,(null!=(g=null==(_=t.IKt)?void 0:_.tYt)?g:[]).concat(null!=(p=null==s?void 0:s.tYt)?p:[]))}let m=t.lt;return this.lt&&(m=this.lt),{TKt:n,PKt:r,RKt:h,IKt:v,lt:m,CKt:t.CKt}}constructor(t,i,e,s,n,r,h,o,a){super(t,i),this.kKt=void 0,this.RYt=void 0,this.DYt=void 0,this.NYt=void 0,this.LYt=void 0,this.wKt=void 0,this.JW=void 0,this.fKt=void 0,this.kKt=e,this.RYt=s,this.DYt=n,this.wKt=r,this.NYt=h,this.LYt=o,this.JW=a}};r();var $$=class{get o(){return this.hS}get UYt(){return this.VYt}get HYt(){return this.WYt}get cYt(){return this.dYt}get PKt(){return this.qYt}get xKt(){return this.zYt}get IKt(){return this.GYt}get universalAdIds(){return this.XYt}constructor(t,i,e,s,n,r,h,o){this.hS=void 0,this.VYt=void 0,this.WYt=void 0,this.dYt=void 0,this.qYt=void 0,this.zYt=void 0,this.GYt=void 0,this.XYt=void 0,this.hS=t,this.VYt=i,this.WYt=e,this.dYt=s,this.qYt=n,this.zYt=r,this.GYt=h,this.XYt=o}};r();var t0=class{get ct(){return this.jYt}get QYt(){return this.KYt}get NKt(){return this.MKt}set NKt(t){this.MKt=t}set FYt(t){this.YYt=t}get FYt(){return this.YYt}get JYt(){return this.ZYt}set JYt(t){this.ZYt=t}get $Yt(){return this.QKt}get od(){return this.zKt}set od(t){this.zKt=t}get GKt(){return this.XKt}get yKt(){return this.AKt}KKt(){this.QKt=!0}get tJt(){return this.iJt}set tJt(t){this.iJt=t}get eJt(){return this.sJt}get nJt(){return this.rJt}constructor(t,i,e,s,n,r,h,o,a){this.jYt=void 0,this.KYt=void 0,this.iJt=void 0,this.MKt=void 0,this.YYt=void 0,this.ZYt=void 0,this.QKt=void 0,this.XKt=void 0,this.zKt=void 0,this.AKt=void 0,this.sJt=void 0,this.rJt=void 0,this.jYt=t,this.KYt=i,this.MKt=e,this.YYt=s,this.ZYt=n,this.QKt=!1,this.XKt=r,this.AKt=h,this.sJt=o,this.rJt=a}};function he(t,i){return e0(t)&&t.getAttribute(i)||void 0}function Ec(t,i){return i0(t,i,void 0,!1)}function i0(t,i,e,s){return i===(t.localName?t.localName:t.nodeName)&&(s&&e?e===t.namespaceURI:!e||!t.namespaceURI||e===t.namespaceURI)}function ds(t,i){const e=[];for(let s=0;s0)throw new m('Invalid document for MIME type "'+i+'"');return e}function n0(t){return t.replace(/[<>&'"]/g,t=>{switch(t){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return""";default:return t}})}function r0(t){return"data:application/xml,"+encodeURIComponent(t)}r(),r();var kl=function(t){return t.hJt="mute",t.oJt="unmute",t.jw="pause",t.aJt="resume",t.uJt="rewind",t.cJt="skip",t.dJt="playerExpand",t.lJt="playerCollapse",t.fJt="fullscreen",t.vJt="exitFullscreen",t._Jt="expand",t.COLLAPSE="collapse",t.MSt="start",t.gJt="firstQuartile",t.pJt="thirdQuartile",t.mJt="midpoint",t.wJt="complete",t.yJt="acceptInvitationLinear",t.AJt="acceptInvitation",t.bJt="timeSpentViewing",t.SJt="otherAdInteraction",t.Qw="progress",t.TJt="creativeView",t.kJt="adExpand",t.EJt="adCollapse",t.PJt="minimize",t.xJt="close",t.IJt="closeLinear",t.RJt="overlayViewDuration",t.CJt="breakStart",t.DJt="breakEnd",t.ma="error",t}({});function h0(t){switch(t){case"breakStart":case"breakEnd":case"error":return!0;default:return!1}}var o0=["mute","unmute","pause","resume","rewind","skip","closeLinear","close","playerExpand","playerCollapse","fullscreen","exitFullscreen","expand","collapse","creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","acceptInvitationLinear","acceptInvitation","timeSpentViewing","otherAdInteraction","progress"];function a0(t){return void 0!==t&&-1!==o0.indexOf(t)}var u0=["start","firstQuartile","midpoint","thirdQuartile","complete","mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","expand","collapse","fullscreen","exitFullscreen","creativeView","acceptInvitation","adExpand","adCollapse","minimize","close","overlayViewDuration","otherAdInteraction","progress"];function c0(t){return void 0!==t&&-1!==u0.indexOf(t)}var d0=["mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","creativeView"];function l0(t){return void 0!==t&&-1!==d0.indexOf(t)}function f0(t,i){if(void 0===t||""===t||void 0===i)return;let e=t.match(/^(\d+):(\d+):(\d+)$/);return e?C(e[1]||"0")+60*C(e[2]||"0")+C(e[3]||"0"):(e=t.match(/^(100|[1-9]\d|\d)%$/),e?C(e[1]||"0")*i/100:void 0)}var v0=class{get eX(){return this.BJt}get ac(){return this.NJt}get eventURL(){return this.MJt}constructor(t,i,e){this.BJt=void 0,this.NJt=void 0,this.MJt=void 0,this.BJt=t,this.NJt=i,this.MJt=e}};r();var _0=class{get LJt(){return this.OJt}constructor(t){this.OJt=void 0,this.OJt=t}},g0=class extends _0{get AYt(){return this.bYt}get wYt(){return this.yYt}get FJt(){return this.UJt}constructor(t,i,e,s){super(t),this.UJt=void 0,this.yYt=void 0,this.bYt=void 0,this.UJt=i,this.bYt=e,this.yYt=s}},p0=class extends _0{constructor(t){super(t)}},m0=class extends _0{constructor(t){super(t)}};r();var yr={VJt:{Ky:100,Py:"XML parsing error."},HJt:{Ky:303,Py:"Empty or invalid VAST error."},WJt:{Ky:400,Py:"General linear error"},qJt:{Ky:403,Py:"Unsupported MIME-type or missing mediafiles error"},zJt:{Ky:500,Py:"General nonlinear error"},xG:{Ky:900,Py:"Network error"}},w0=class{get GJt(){return this.XJt}jJt(t){if(!this.GJt)return;const i=this.GJt.replace(/\[ERRORCODE]/,""+t.Ky);L$(i)}constructor(t){this.XJt=void 0,this.XJt=t}};r();var Co=class extends R{get QJt(){return this.KJt}get YJt(){var t;return null!=(t=this.JJt)?t:900}constructor(t,i,e,s){super(e||i&&y0[i]||t,s),this.KJt=void 0,this.JJt=void 0,this.O2=void 0,this.KJt=t,this.JJt=i,this.O2=e}},Ic=function(t){return t.ADBLOCK="adblock",t.NETWORK="network",t.PARSING="parsing",t.PLAYBACK="playback",t.GENERAL="general",t}({}),Wi=function(t){return t[t.VAST_MALFORMED_RESPONSE=100]="VAST_MALFORMED_RESPONSE",t[t.VAST_SCHEMA_VALIDATION_ERROR=101]="VAST_SCHEMA_VALIDATION_ERROR",t[t.VAST_UNSUPPORTED_VERSION=102]="VAST_UNSUPPORTED_VERSION",t[t.VAST_TRAFFICKING_ERROR=200]="VAST_TRAFFICKING_ERROR",t[t.VAST_UNEXPECTED_LINEARITY=201]="VAST_UNEXPECTED_LINEARITY",t[t.VAST_UNEXPECTED_DURATION_ERROR=202]="VAST_UNEXPECTED_DURATION_ERROR",t[t.UNEXPECTED_SIZE=203]="UNEXPECTED_SIZE",t[t.VAST_WRAPPER_ERROR=300]="VAST_WRAPPER_ERROR",t[t.VAST_LOAD_TIMEOUT=301]="VAST_LOAD_TIMEOUT",t[t.VAST_TOO_MANY_REDIRECTS=302]="VAST_TOO_MANY_REDIRECTS",t[t.VAST_NO_ADS_AFTER_WRAPPER=303]="VAST_NO_ADS_AFTER_WRAPPER",t[t.GENERAL_LINEAR_ERROR=400]="GENERAL_LINEAR_ERROR",t[t.FILE_NOT_FOUND=401]="FILE_NOT_FOUND",t[t.VAST_MEDIA_LOAD_TIMEOUT=402]="VAST_MEDIA_LOAD_TIMEOUT",t[t.VAST_LINEAR_ASSET_MISMATCH=403]="VAST_LINEAR_ASSET_MISMATCH",t[t.VAST_PROBLEM_DISPLAYING_MEDIA_FILE=405]="VAST_PROBLEM_DISPLAYING_MEDIA_FILE",t[t.MEZZANINE_FILE_REQUIRES=406]="MEZZANINE_FILE_REQUIRES",t[t.MEZZANINE_FILE_DOWNLOADED_FIRST_TIME=407]="MEZZANINE_FILE_DOWNLOADED_FIRST_TIME",t[t.AD_IN_VAST_REJECTED=408]="AD_IN_VAST_REJECTED",t[t.INTERACTIVE_CREATIVE_NOT_EXECUTED=409]="INTERACTIVE_CREATIVE_NOT_EXECUTED",t[t.VERIFICATION_CODE_NOT_EXECUTED=410]="VERIFICATION_CODE_NOT_EXECUTED",t[t.GENERAL_NON_LINEAR_ERROR=500]="GENERAL_NON_LINEAR_ERROR",t[t.NONLINEAR_DIMENSIONS_ERROR=501]="NONLINEAR_DIMENSIONS_ERROR",t[t.OVERLAY_AD_LOADING_FAILED=502]="OVERLAY_AD_LOADING_FAILED",t[t.VAST_NONLINEAR_ASSET_MISMATCH=503]="VAST_NONLINEAR_ASSET_MISMATCH",t[t.GENERAL_COMPANION_AD_ERROR=600]="GENERAL_COMPANION_AD_ERROR",t[t.INVALID_DIMENSIONS_COMPANION_AD=601]="INVALID_DIMENSIONS_COMPANION_AD",t[t.COMPANION_REQUIRED_ERROR=602]="COMPANION_REQUIRED_ERROR",t[t.COMPANION_AD_LOADING_FAILED=603]="COMPANION_AD_LOADING_FAILED",t[t.UNABLE_TO_FIND_SUPPORTED_COMPANION=604]="UNABLE_TO_FIND_SUPPORTED_COMPANION",t[t.UNKNOWN_ERROR=900]="UNKNOWN_ERROR",t[t.GENERAL_VPAID_ERROR=901]="GENERAL_VPAID_ERROR",t[t.MALFORMED_URI=1005]="MALFORMED_URI",t[t.VAST_ASSET_NOT_FOUND=1007]="VAST_ASSET_NOT_FOUND",t[t.VAST_EMPTY_RESPONSE=1009]="VAST_EMPTY_RESPONSE",t[t.UNKNOWN_AD_RESPONSE=1010]="UNKNOWN_AD_RESPONSE",t[t.UNSUPPORTED_LOCALE=1011]="UNSUPPORTED_LOCALE",t[t.INVALID_ARGUMENTS=1101]="INVALID_ARGUMENTS",t[t.INVALID_ADX_EXTENSION=1105]="INVALID_ADX_EXTENSION",t[t.AUTOPLAY_DISALLOWED=1205]="AUTOPLAY_DISALLOWED",t}({}),y0={100:"XML parsing error.",101:"VAST schema validation error.",102:"VAST version of response not supported.",200:"Trafficking error. The video player received an ad type that it was not expecting and/or cannot display.",201:"Video player expecting different linearity.",202:"Video player expecting different duration.",203:"Video player expecting different size.",300:"General wrapper error.",301:"Timeout of VAST URI provided in wrapper element, or of VAST URI provided in a subsequent wrapper element. This includes request errors such as invalid URI, unreachable or request timeout for URI, and security or other exceptions related to requesting a VAST URI.",302:"Wrapper limit reached, as defined by the video player. Too many wrapper responses have been received with no InLine response. This can be caused by a circular loop of daisy chaining (one network bouncing to another and another).",303:"No ads VAST response after one or more wrappers. This also includes the number of empty VAST responses from fallback.",400:"General linear error. The video player is unable to display the linear ad.",401:"File not found. Unable to find Linear/MediaFile from URI.",402:"Unable to download or timeout of MediaFile URI.",403:"Could not find a media file that is supported by this video player, based on the attributes of the MediaFile element.",405:"Problem displaying a media file.",406:"A mezzanine file was required, but not provided.",407:"The mezzanine file was downloaded for the first time, so the ad did not serve. This can occur when an ad insertion is missed because the creative is being transcoded. It continues to occur until the creative is available for insertion.",408:"The ad returned in the VAST response was rejected.",409:"The interactive creative defined in the InteractiveCreativeFile node was not executed.",410:"The code referenced in the Verification node was not executed.",500:"General NonLinearAds error.",501:"Unable to display non-linear ad because creative dimensions do not align with creative display area (in other words, the creative dimension was too large). This can occur if you use CSS styles to set width and height of the video ,content element. You should instead use the width and height HTML attributes.",502:"Unable to fetch NonLinearAds/NonLinear resource.",503:"Could not find NonLinearResource with supported type. This can occur when a creative size is larger than the player size.",600:"General CompanionAds error.",601:"Unable to display companion because creative dimensions do not fit within the companion display area (in other words, space was not available).",602:"Unable to display required companion.",603:"Unable to fetch CompanionAds/Companion resource.",604:"Could not find Companion resource with supported type.",900:"VAST 2 error. Even if you request VAST 3 or your DFP network default is VAST 3, this can occur if you have a VAST redirect that returns a VAST 2 response.",901:"General VPAID error",1005:"URI malformed."};function A0(t){if(!t)return!1;switch(t.toLocaleLowerCase()){case Ba.dR:case Ba.lR:case Ba.cR:return!0;default:return!1}}function b0(t){const i=gr();return!!(A0(t)||t&&i&&(null==i?void 0:i.canPlayType)&&i.canPlayType(t))||(T0("Invalid or unsupported MediaFile Content delivery type, skipping mediafile"),!1)}function S0(t,i){for(const e of i){new w0(e).jJt(t)}}function T0(t){0}r(),r();var k0=class{get ZJt(){return this.$Jt}get tZt(){return this.iZt}constructor(t,i){this.$Jt=void 0,this.iZt=void 0,this.$Jt=t,this.iZt=i}},E0=class t{async eZt(i,e){if(V$(i.sources,i.timeOffset)){const s=await t.sZt(i.sources.src,e),n=s&&s.documentElement;if(!n)throw new Co(Ic.NETWORK,Wi.VAST_SCHEMA_VALIDATION_ERROR,"Ad source is not a valid XML document.");if(Ec(n,"VMAP"))return await this.nZt(n,i,e);if(Ec(n,"VAST")){const t=await this.rZt(n,e,!1);if(t){const e=new R0("",!0,!0,t);return[new x0("start",e,P0.hZt,"",[],!1,!0,i)]}return[]}throw new Co(Ic.GENERAL,Wi.VAST_MALFORMED_RESPONSE,"Only VMAP and VAST files are allowed as ad source.")}if(H$(i.sources,i.timeOffset))return[new I0(String(i.timeOffset),i,e)];throw new Co(Ic.GENERAL,Wi.VAST_MALFORMED_RESPONSE,"Something went wrong parsing the ad source; only VMAP and VAST files are allowed as ad source.")}async oZt(i,e,s,n){let r;void 0===n&&(n=[]);try{r=await t.sZt(i,e)}catch(t){throw S0(t instanceof Co&&t.YJt===Wi.VAST_MALFORMED_RESPONSE?yr.HJt:yr.xG,n),t}const h=r&&r.documentElement;if(h&&Ec(h,"VAST"))return await this.rZt(h,e,s,n);h&&Ec(h,"VMAP")&&Ye("Received VMAP ad when expecting VAST. Please set the type of your ad source in the configuration, or make sure to not set a timeOffset for VMAP ad sources. VMAP ads have their own offsets included.")}async aZt(t,i,e,s){var n;if(!(null==(n=t.sources)?void 0:n.src))throw new Co(Ic.GENERAL,Wi.MALFORMED_URI,"Property src on adSource is missing.");const r=await this.oZt(t.sources.src,s,!1),h=new R0("",!0,!0,r),o=new x0(i,h,P0.hZt,"",[],!1,!0,t);return o.uZt=e,o}static async requestSuccessOnly(t,i){let e;try{e=await i.lk(t)}catch(t){throw new Co(Ic.NETWORK,Wi.UNKNOWN_ERROR,"Something went wrong while requesting xml from server.",t)}if(!jr(e))throw new Co(Ic.NETWORK,Wi.UNKNOWN_ERROR,"Something went wrong while requesting xml from server.");return e}static async sZt(t,i){const e=new $n({Yu:t,dk:M.NT,Uk:X.GET}),s=await this.requestSuccessOnly(e,i);try{return function(t){return s0(t,"text/xml")}(await s.ck())}catch(t){throw new Co(Ic.NETWORK,Wi.VAST_MALFORMED_RESPONSE,"The ad source could not be loaded.")}}async rZt(t,i,e,s){void 0===s&&(s=[]);const n=[],r=[],h=[];if(!t||!Ec(t,"VAST")){if(S0(yr.HJt,s),e)throw new Co(Ic.PARSING,Wi.VAST_NO_ADS_AFTER_WRAPPER,"No VAST element found after wrapper.");throw new Co(Ic.PARSING,Wi.VAST_EMPTY_RESPONSE,"The VAST element was empty.")}if(0!==ds(t,"Ad").length){for(const e of ds(t,"Ad"))try{const t=await this.cZt(e,i,s);0===t.VN?n.push(t):r.push(t)}catch(t){h.push(t)}if(0===n.length&&0===r.length&&h.length>0)throw h[0];if(1===n.length&&0===r.length)return n[0];if(0===n.length&&0!==r.length)return new q$(r);if(n.length>0||r.length>0)return new q$(r.concat(n))}if(0!==ds(t,"Error").length)for(const i of ds(t,"Error")){T0(yr.HJt.Py);const t=i.textContent;t&&s.push(t.trim())}if(S0(yr.HJt,s),e)throw new Co(Ic.PARSING,Wi.VAST_NO_ADS_AFTER_WRAPPER,"No VAST element found after wrapper.");throw new Co(Ic.PARSING,Wi.VAST_EMPTY_RESPONSE,"The VAST element was empty.")}async nZt(t,i,e){const s=[],n=ds(t,"AdBreak");if(0===n.length)throw new Co(Ic.PARSING,Wi.VAST_EMPTY_RESPONSE,"The VMAP element was empty.");for(const t of n)try{const n=await this.dZt(t,i,e);n&&s.push(n)}catch(t){zd.hm(t)}return s}async cZt(i,e,s){const n=he(i,"id")||"";let r=ti(he(i,"sequence"));r||(r=0);const h=ds(i,"InLine"),o=ds(i,"Wrapper");if(0!==o.length)return await this.lZt(o[0],n,r,e,s);if(0!==h.length)return t.fZt(h[0],n,r,s);throw new Co(Ic.PARSING,Wi.VAST_SCHEMA_VALIDATION_ERROR,"An Ad tag without a Wrapper or inline element cannot be parsed")}static fZt(i,e,s,n){const r=ds(i,"Error")[0];let h;r&&r.textContent&&(h=r.textContent,n.push(h));const o=t.vZt(ds(i,"Extensions")[0]),a=ds(i,"AdSystem")[0];let u,c="";a&&(c=a.textContent||c);const d=ds(i,"AdTitle")[0];d&&(u=d.textContent||void 0);const l=[];for(const t of ds(i,"Impression"))t.textContent&&l.push(t.textContent);const f=t._Zt(ds(i,"Creatives")[0],c,o,n);return new G$(e,s,c,u,l,f,new w0(h))}async lZt(i,e,s,n,r){const h=ds(i,"Error")[0];let o="";h&&h.textContent&&(o=h.textContent,r.push(o));const a=ds(i,"AdSystem")[0];let u="";a&&(u=a.textContent||u);const c=[];for(const t of ds(i,"Impression"))t.textContent&&c.push(t.textContent);const d=ds(i,"VASTAdTagURI")[0];let l="";d&&d.textContent&&(l=d.textContent);const f=await this.oZt(l,n,!0,r),v=t.vZt(ds(i,"Extensions")[0]),_=ds(i,"Creatives")[0];let g=[];_&&(g=t.gZt(_,u,v,r));let p=Xn(he(i,"followAdditionalWrappers"));p||(p=!0);let m=Xn(he(i,"allowMultipleAds"));m||(m=!0);let w=Xn(he(i,"fallbackOnNoAd"));return w||(w=!1),new Z$(e,s,c,f,p,g,m,w,new w0(o))}static gZt(i,e,s,n){const r=[];for(const h of ds(i,"Creative")){let i=he(h,"id");i||(i="");let o=ti(he(h,"sequence"));o||(o=0);let a=he(h,"adId");a||(a="");const u=ds(h,"Linear")[0];let c;u&&(c=t.pZt(u,"wrapper",i,e,s,n));const d=ds(h,"NonLinearAds")[0];let l,f;if(d)try{f=t.mZt(d,i,e),l=f}catch(t){}const v=ds(h,"CompanionAds")[0];let _;v&&(_=t.wZt(v)),r.push(new $$(i,a,o,"",c,l,_,[]))}return r}static _Zt(i,e,s,n){const r=[];for(const h of ds(i,"Creative")){let i=he(h,"id");i||(i="");let o=ti(he(h,"sequence"));o||(o=0);let a=he(h,"adId");a||(a="");let u=he(h,"apiFramework");u||(u="");const c=ds(h,"Linear")[0];let d;if(c)try{d=t.pZt(c,"inline",i,e,s,n)}catch(t){}if(0===(null==d?void 0:d.ct))throw new Co(Ic.PARSING,Wi.VAST_UNEXPECTED_DURATION_ERROR,"The VAST response had a duration of 0 seconds, so skipping the ad(s).");const l=ds(h,"NonLinearAds")[0];let f,v;if(l)try{v=t.mZt(l,i,e),f=v}catch(t){}const _=ds(h,"CompanionAds")[0];let g;_&&(g=t.wZt(_));const p=ds(h,"UniversalAdId"),m=t.parseUniversalAdIds(p);r.push(new $$(i,a,o,u,d,f,g,m))}return r}static vZt(t){const i=[];if(!t)return i;for(const s of ds(t,"Extension")){var e;const t=null!=(e=he(s,"type"))?e:"",n=s.outerHTML;i.push({type:t,xml:n})}return i}static pZt(i,e,s,n,r,h){const o=ds(i,"Duration")[0];let a=0;if(o)a=F$(o.textContent)||0;else if(!o&&"inline"===e)throw new Co(Ic.PARSING,Wi.VAST_SCHEMA_VALIDATION_ERROR,"Missing duration element in inLine linear");const u=he(i,"skipoffset");let c=-1;if(u){let t=F$(u);if(void 0===t&&u.indexOf("%")>-1){const i=_.abs(Number(u.replace(/(?![0-9])./g,"")))/100;S(i)||(t=a*i)}void 0!==t&&(c=t)}const d=ds(i,"MediaFiles")[0];let l=[],f=[];if(d&&(l=function(t,i){const e=[];for(const s of ds(t,"MediaFile")){const t=he(s,"delivery"),n=he(s,"type");if(!n){T0();continue}if(!i(n))continue;let r=ti(he(s,"width")),h=ti(he(s,"height"));r||(T0(),r=0),h||(T0(),h=0);const o={delivery:t,type:n,width:r,height:h,contentURL:""+s.textContent};e.push(o)}return e}(d,b0),f=function(t){const i=ds(t,"ClosedCaptionFiles");if(0===i.length)return[];const e=i[0],s=[];for(const t of ds(e,"ClosedCaptionFile")){const i=he(t,"type");i||T0();const e=he(t,"language");e||T0();const n={type:null!=i?i:"",language:null!=e?e:"",contentURL:(""+t.textContent).trim()};s.push(n)}return s}(d)),"inline"===e&&(!d||0===l.length))throw S0(yr.qJt,h),new Co(Ic.PARSING,Wi.VAST_LINEAR_ASSET_MISMATCH,"Missing MediaFiles in linear element");const v=ds(i,"TrackingEvents")[0];let g=[];v&&(g=t.yZt(v,a0,"linear"));const p=ds(i,"VideoClicks")[0],m=t.AZt(p);return new t0(a,l,g,m,c,s,n,f,r)}static AZt(i){if(!i)return new _n("","",[],[]);const e=ds(i,"ClickThrough")[0];let s,n="";e&&(s=e.textContent||void 0,n=he(e,"id")||"");const r=t.bZt(ds(i,"ClickTracking")),h=t.bZt(ds(i,"CustomClick"));return new _n(s,n,r,h)}static bZt(t){const i=[];for(const e of t){const t=e.textContent;if(!t)continue;const s=he(e,"id")||"";i.push(new J$(s,t))}return i}static yZt(t,i,e){const s=[];for(const n of ds(t,"Tracking")){const r=he(n,"event");if(!i(r)){T0();continue}let h="";"linear"===e&&(h=he(t,"offset")||"0");const o=n.textContent;o&&s.push(new v0(r,h,o))}return s}static mZt(i,e,s){const n=[];for(const r of ds(i,"NonLinear")){const i=ds(r,"NonLinearClickThrough")[0];let h;i&&(h=i.textContent||void 0);const o=t.bZt(ds(r,"NonLinearClickTracking")),a=ds(r,"StaticResource")[0];let u;if(a&&a.parentNode){const t=he(a,"creativeType"),i=a.textContent||"",e=ds(a.parentNode,"NonLinearClickThrough")[0];let s="";e&&(s=e.textContent||""),u=new g0(i,t,s,"")}const c=t.SZt(r),d=t.parseHtmlResource(r);if(!u&&!c&&!d){T0();continue}const l=new _n(h,"",o,[]);n.push(new j$(u,c,d,l,e,s))}if(0===n.length)throw new Co(Ic.PARSING,Wi.VAST_SCHEMA_VALIDATION_ERROR,"nonLinearAds element found with no nonLinear elements");const r=ds(i,"TrackingEvents")[0];let h=[];return r&&(h=t.yZt(r,c0,"nonlinear")),new X$(n,h)}static parseUniversalAdIds(t){const i=[];for(const r of t){var e;const t=null!=(e=he(r,"idRegistry"))?e:"";var s,n;const h=null!=(n=null!=(s=he(r,"idValue"))?s:r.textContent)?n:"";i.push(new k0(t,h))}return i}static wZt(i){let e=he(i,"requiredType");(function(t){switch(t){case"all":case"any":case"none":return!0;default:return!1}})(e)||(e=Q$.lz);const s=[];for(const e of ds(i,"Companion")){let i=ti(he(e,"width")),n=ti(he(e,"height")),r=he(e,"id"),h=ti(he(e,"assetWidth")),o=ti(he(e,"assetHeight")),a=ti(he(e,"expandedWidth")),u=ti(he(e,"rxpandedHeight")),c=he(e,"apiFramework"),d=he(e,"adSlotId"),l=ti(he(e,"pxratio"));const f=ds(e,"AltText")[0];let v=f?f.textContent:"";i||(T0(),i=0),n||(T0(),n=0),r||(r=""),h||(h=0),o||(o=0),a||(a=0),u||(u=0),c||(c=""),d||(d=""),l||(l=1),v||(v="");const _=t.TZt(e),g=t.SZt(e),p=t.parseHtmlResource(e),m=ds(e,"TrackingEvents")[0];let w=[];m&&(w=t.yZt(m,l0,"companion"));const y=ds(e,"CompanionClickThrough")[0];let A;y&&(A=y.textContent||void 0);const b=t.bZt(ds(e,"CompanionClickTracking"));(_||g||p)&&s.push(new Y$(i,n,r,h,o,a,u,c,d,l,_,g,p,new _n(A,"",b,[]),w,v))}return new K$(e,s)}static TZt(t){const i=ds(t,"StaticResource")[0];let e;if(i&&i.parentNode){let t=he(i,"creativeType");t||(t="");const s=i.textContent,n=ds(i.parentNode,"AltText")[0],r=ds(i.parentNode,"CompanionClickThrough")[0];let h,o="";n&&(o=n.textContent||""),r&&(h=r.textContent||void 0),s&&(e=new g0(s,t,h,o))}return e}static SZt(t){const i=ds(t,"IFrameResource")[0];let e;if(i){const t=i.textContent||"";e=new p0(t)}return e}static parseHtmlResource(t){const i=ds(t,"HTMLResource")[0];let e;if(i){const t=i.textContent||"";e=new m0(t)}return e}async dZt(i,e,s){const n=he(i,"timeOffset")||"0",r=he(i,"breakType")||P0.pk;let h=he(i,"breakId"),o=Xn(he(i,"repeatAfter"));if(void 0===h&&(h=""),void 0===o&&(o=!1),!(void 0!==Ha.kZt(n)))throw new Co(Ic.PARSING,Wi.VAST_SCHEMA_VALIDATION_ERROR,"Invalid TimeOffset type");const a=ds(i,"AdSource")[0],u=ds(i,"TrackingEvents")[0];let c=[];u&&(c=t.yZt(u,h0,"vmap"));let d=he(a,"id");d||(d="");let l=Xn(he(a,"allowMultipleAds"));void 0===l&&(l=!0);let f=Xn(he(a,"followRedirects"));f||(f=!0);const v=ds(a,"AdTagURI")[0];let _="";const g=ds(a,"VASTAdData")[0];if(!v||!v.textContent){if(g){if(g.firstElementChild&&i0(g.firstElementChild,"VAST")){const t=await this.rZt(g.firstElementChild,s,!1);if(t){const i=new R0(d,l,f,t);return new x0(n,i,r,h,c,o,!1,e)}return}throw new Co(Ic.PARSING,Wi.VAST_SCHEMA_VALIDATION_ERROR,"vmap:VASTAdData does not have a VAST-structure as a child element")}throw new Co(Ic.PARSING,Wi.VAST_SCHEMA_VALIDATION_ERROR,"Invalid AdTagURI source or invalid VASTAdData in Adbreak Element")}try{_=v.textContent;const t=Ua(e);return t.sources.src=_,new I0(n,t,s)}catch(t){return}}},P0=function(t){return t.pk="",t.hZt="linear",t.EZt="nonlinear",t.PZt="display",t}({}),Ha=class{static xZt(t){switch(t){case"linear":case"nonlinear":case"display":return!0;default:return!1}}static IZt(t){}static RZt(t){if(void 0!==t)return"start"===t?0:"end"===t?-1:void 0}static CZt(t){const i=t.split(":");let e=0;return e+=3600*Number(i[0]),e+=60*Number(i[1]),e+=Number(i[2]),e}static DZt(t){if(t<=0)return"00:00:00.000";const i=_.floor(t),e=t-i;return this.BZt(i/3600,2)+":"+this.BZt(i/60%60,2)+":"+this.BZt(i%60,2)+"."+this.BZt(1e3*e,3)}static BZt(t,i){return("00"+_.floor(t)).slice(-i)}static NZt(t,i){const e=this.kZt(t);if(0===e)switch(t){case"start":return 0;case"end":return-1}else{if(2===e)return U$(t)*i;if(1===e)return F$(t);if(3===e)return this.RZt(t);if(4===e){const i=Number(t);if(!S(i)&&i>=-1)return i}}}static kZt(t){return"start"===t||"end"===t?0:void 0!==F$(t.toString())?1:void 0!==U$(t.toString())?2:void 0!==this.IZt(t.toString())?3:S(Number(t))?void 0:4}},x0=class{get MZt(){return this.LZt.integration}get OZt(){return this.FZt}get _Ot(){return this.UZt}get JYt(){return this.ZYt}set JYt(t){this.ZYt=t}get NKt(){return this.mYt}get VZt(){return this.HZt}get WZt(){return this.qZt}get Ont(){return this.LZt}get zZt(){return this.uZt.dd}get W(){return!0}Un(){return Promise.resolve()}get uZt(){return this.GZt}set uZt(t){this.GZt=t}constructor(t,i,e,s,n,r,h,o){this.FZt=void 0,this.mYt=void 0,this.UZt=void 0,this.ZYt=-1,this.XZt=void 0,this.HZt=void 0,this.qZt=void 0,this.jZt=void 0,this.LZt=void 0,this.GZt=void 0,this.FZt=i,this.UZt=t,this.XZt=e,this.HZt=s,this.qZt=r,this.mYt=n,this.jZt=h,this.LZt=o}},I0=class{get MZt(){return this.zKt.MZt}get OZt(){return this.zKt.OZt}get _Ot(){return this.zKt._Ot}get JYt(){return this.zKt.JYt}set JYt(t){this.zKt.JYt=t}get NKt(){return this.zKt.NKt}get VZt(){return this.zKt.VZt}get WZt(){return this.zKt.WZt}get Ont(){return this.zKt.Ont}get zZt(){return this.zKt.zZt}get W(){return this.uE}Un(){var t;return null!=(t=this.QZt)?t:this.QZt=this.lE()}async lE(){const t=new E0;this.zKt=await t.aZt(this.Ont,this._Ot,this.uZt,this.nV),this.uE=!0}get uZt(){return this.zKt.uZt}set uZt(t){this.zKt.uZt=t}constructor(t,i,e){this.zKt=void 0,this.QZt=void 0,this.uE=!1,this.nV=void 0,this.nV=e,this.zKt=new x0(t,void 0,"","",[],!1,!1,i)}},R0=class{get o(){return this.hS}get BYt(){return this.KZt}get YZt(){return this.JZt}get dKt(){return this.ZZt}constructor(t,i,e,s){this.hS=void 0,this.KZt=void 0,this.JZt=void 0,this.ZZt=void 0,this.hS=t,this.KZt=i,this.ZZt=s,this.JZt=e}};function C0(t,i){let e;if(t.vastAdsRequest&&(e=function(t){if(t.adTagUrl)return t.adTagUrl;if(t.adsResponse)return r0(t.adsResponse);return}(t.vastAdsRequest)),!e){const i=function(t){const i=t.contentUrl||t.contentId;if(!i)return;const e=t.contentType||"video/mp4",s=ZT(e)||$T(e)?"streaming":"progressive",n=void 0!==t.duration?""+Ha.DZt(t.duration)+"":"",r=void 0!==t.whenSkippable&&t.whenSkippable>=0?' skipoffset="'+Ha.DZt(t.whenSkippable)+'"':"",h=''+n0(i)+"",o=t.clickThroughUrl?""+n0(t.clickThroughUrl)+"":"",a=""+n+""+h+""+o+"",u=t.title?""+n0(t.title)+"":"";return''+u+""+a+""}(t);i&&(e=r0(i))}const s=t.customData;if(e){const n={integration:null==s?void 0:s.integration,sources:{src:e,type:"vast"},timeOffset:i};return n.integration&&"csai"!==n.integration&&"theo"!==n.integration||(n.skipOffset=t.whenSkippable),n}}var D0=function(t){return t.$Zt="error",t.t$t="sourceupdate",t}({}),B0=class extends wp{constructor(t){super("error"),this.lt=void 0,this.lt=t}},N0=class extends wp{constructor(t,i){super("sourceupdate"),this.bt=void 0,this.Mc=void 0,this.bt=t,this.Mc=i}},M0=class extends Ne{get KD(){return this.i$t}e$t(t){this.s$t.e$t(t)}n$t(t){this.s$t.n$t(t)}r$t(t){this.s$t.r$t(t)}h$t(t){this.s$t.h$t(t)}o$t(t){this.i$t.addUpdateListener(t)}a$t(t){this.i$t.removeUpdateListener(t)}u$t(){const t=new pa,i=new chrome.cast.media.GetStatusRequest;return this.i$t.getStatus(i,()=>{t.Xy({bt:this.NP(),Mc:this.nu()})},i=>t.jy(i)),t.Qy}NP(){var t;return null==(t=this.i$t.customData)?void 0:t.currentSource}nu(){var t;let i;if(null==(t=this.YBt.c$t())?void 0:t.version){var e;i=null==(e=this.i$t.customData)?void 0:e.sourceDescription}else{var s;const t=null==(s=B$(this.i$t))?void 0:s.customData;(function(t){return Lu(t)&&t.theoplayer_version>=1&&it(t.streamStart)&&it(t.isLive)&&it(t.sourceDescription)})(t)&&(i=t.sourceDescription),i||(i=function(t){return{sources:[{src:t.contentId,type:t.contentType}],ads:L0(t)}}(this.i$t.media))}return i}zx(){const t=new chrome.cast.media.PauseRequest;this.i$t.pause(t,Ct,this.d$t)}Xx(){const t=new chrome.cast.media.StopRequest;this.i$t.stop(t,Ct,this.d$t)}Gx(){const t=new chrome.cast.media.PlayRequest;this.i$t.play(t,Ct,this.d$t)}My(t,i){const e=new chrome.cast.media.SeekRequest;return e.currentTime=t,e.resumeState=i?chrome.cast.media.ResumeState.PLAYBACK_PAUSE:chrome.cast.media.ResumeState.PLAYBACK_START,new Promise((t,i)=>{this.i$t.seek(e,t,t=>{var e;i(new Vs(wn(t.code),null!=(e=t.description)?e:void 0))})})}vx(t){this.s$t._et(xn,function(t){return{type:N$.cKt,properties:{playbackRate:t}}}(t)).catch(this.l$t)}f$t(t){const i=new chrome.cast.media.EditTracksInfoRequest(t);this.i$t.editTracksInfo(i,Ct,this.d$t)}v$t(){return this.i$t.getEstimatedTime()}_$t(){return this.i$t.getEstimatedBreakClipTime()}g$t(){return this.i$t.getEstimatedBreakTime()}p$t(){this.s$t._et("urn:x-cast:com.google.cast.media",{type:M$.SKIP_AD,requestId:this.m$t++,mediaSessionId:this.i$t.mediaSessionId}).catch(this.l$t)}kn(){this.Vo()}constructor(t,i,e){super(i),this.YBt=void 0,this.s$t=void 0,this.i$t=void 0,this.m$t=0,this.l$t=t=>{this.So(new B0(t))},this.d$t=t=>{var i;const e=new Vs(wn(t.code),null!=(i=t.description)?i:void 0);this.l$t(e)},this.YBt=t,this.s$t=i,this.i$t=e}};function L0(t){return t.vmapAdsRequest&&t.vmapAdsRequest.adTagUrl?[{sources:{src:t.vmapAdsRequest.adTagUrl,type:"vmap"}}]:t.breaks&&t.breakClips?De(t.breaks,i=>function(t,i){const e=[];if(t.isWatched)return e;for(const s of t.breakClipIds){const n=Jr(i,t=>t.id===s);if(n){const i=C0(n,t.position);i&&e.push(i)}}return e}(i,t.breakClips)):[]}r();var O0=class{w$t(t,i){this.YBt.addMessageListener(t,i)}y$t(t,i){this.YBt.removeMessageListener(t,i)}_et(t,i){return new Promise((e,s)=>{this.YBt.sendMessage(t,i,e,t=>{var i;s(new Vs(wn(t.code),null!=(i=t.description)?i:void 0))})})}kn(){}constructor(t){this.YBt=void 0,this.YBt=t}};function F0(t){return"vmap"===t||"adrule"===t}function U0(t){if(t)return Z(t)&&""!==t?{src:Hi(t),type:void 0}:function(t){return Lu(t)&&Boolean(t.src)}(t)&&""!==t.src?{src:Hi(t.src),type:V0(t.type)}:void 0}function V0(t){if(Z(t)){const i=t.toLowerCase();switch(i){case"vast":case"vmap":case"adrule":return i;default:return void Ye("The ad source type provided in the configuration could not be recognized: '"+t+"'.")}}else t||Ye("For better performance it is highly recommended to add the type to the configuration of your ad sources.")}function Ac(t){if(void 0!==t&&""!==t&&("string"==typeof t||"number"==typeof t)){switch(t){case"start":case"00:00:00":case"00:00:00.000":case"0%":case"0":return 0;case"end":case"100%":return-1}if("string"==typeof t){if(function(t){return O$.test(t)}(t))return Ha.CZt(t);if(H0(t))return t}return Number(t)>=0?Number(t):void 0}}function H0(t){return new RegExp(/^\d{1,2}%$/).test(t)}function W0(t){const i=[],e=(t,s)=>{if(ul(s))for(let i=0,n=s.length;i{i.push(t+"="+encodeURIComponent(null!=e?e:""))})(t,String(s))};for(const i of w.keys(t))e(encodeURIComponent(i),t[i]);return i.join("&")}r(),r(),r();var q0=function(t){return t.aKt="receiver_info",t.xLt="event",t.A$t="propertychange",t.uKt="trackevent",t}({}),z0=class{b$t(t){let i;try{i=JSON.parse(t)}catch(t){0}return i}e$t(t){this.S$t.push(t)}n$t(t){oi(this.S$t,t)}r$t(t){this.T$t.push(t)}h$t(t){oi(this.T$t,t)}k$t(t){this.E$t=t}_et(t,i){return this.P$t._et(t,i)}kn(){this.P$t.y$t(xn,this.x$t),Yo(this.T$t),Yo(this.S$t),this.E$t=void 0}constructor(t){this.P$t=void 0,this.S$t=[],this.T$t=[],this.E$t=void 0,this.x$t=(t,i)=>{const e=this.b$t(i);if(e)if(e.type===q0.A$t)for(const t of this.S$t)for(const i of w.keys(e.properties))t(i,e.properties[i]);else if(e.type===q0.xLt)for(const t of this.T$t)t(e.event);else e.type===q0.uKt&&this.E$t&&e.event.trackState&&this.E$t(e.event.trackId,e.event.trackState.targetQualityIds)},this.P$t=t,this.P$t.w$t(xn,this.x$t)}};r(),r();var kr=function(t){return t.I$t="medialoadedchange",t.gy="volumechange",t.$Zt="casterror",t.R$t="playererror",t.C$t="targetqualitychanged",t.D$t="receiverinfochanged",t}({}),G0=class extends wp{constructor(){super("medialoadedchange")}},X0=class extends wp{constructor(t,i){super("volumechange"),this.Mx=void 0,this.$P=void 0,this.Mx=t,this.$P=i}},j0=class extends wp{constructor(t){super("casterror"),this.lt=void 0,this.lt=t}},Q0=class extends wp{constructor(t){super("playererror"),this.lt=void 0,this.lt=t}},K0=class extends wp{constructor(t,i){super("targetqualitychanged"),this.$D=void 0,this.B$t=void 0,this.$D=t,this.B$t=i}},Y0=class extends wp{constructor(){super("receiverinfochanged")}},J0=class extends Ne{N$t(t,i,e){this.s$t._et(xn,function(t,i,e){return{type:N$.uKt,trackID:t,trackType:i,properties:{targetQuality:e}}}(t,i,e)).catch(this.l$t)}M$t(){this.P$t.w$t(xn,this.L$t),this.s$t._et(xn,{type:N$.aKt}).catch(Ct)}c$t(){return this.O$t}F$t(){return this.YBt.getSessionObj()}U$t(t){!this.V$t&&t&&t.idleReason!==chrome.cast.media.IdleReason.FINISHED&&(this.V$t=new M0(this,this.s$t,t),this.H$t(),this.So(new G0),this.V$t.o$t(this.W$t))}q$t(){return this.V$t}async z$t(t){const i=function(t){const i=function(t,i,e,s){const[n,r]=function(t){for(const e of t.sources)if(pr(e)){const t=e.src;if(t){var i;const s=null!=(i=e.type)?i:_u(t);if(Z0(s))return[t,s]}}var e,s;return[null!=(e=JR(t))?e:"",null!=(s=KR(t))?s:""]}(t),h=new chrome.cast.media.MediaInfo(n,r);return h.metadata=D$(t.metadata,t.poster),h.streamType=s,function(t,i,e){const s=[],n=[];let r,h=0,o=0;for(const t of i){const i=U0(t.sources);if(i)if(V$(i,t.timeOffset))r=new chrome.cast.media.VastAdsRequest,r.adTagUrl=i.src;else if(H$(i,t.timeOffset)){var a;const r=null!=(a=t.timeOffset)?a:0,c=t.skipOffset;var u;const d=null!=(u=Ha.NZt(r,e))?u:0,l=void 0!==c?Ha.NZt(c,e):void 0,f=new chrome.cast.media.BreakClip("bc"+o++);f.vastAdsRequest=new chrome.cast.media.VastAdsRequest,f.vastAdsRequest.adTagUrl=i.src,f.whenSkippable=l,f.customData={integration:t.integration};let v=Jr(n,t=>t.position===d);void 0===v&&(v=new chrome.cast.media.Break("b"+h++,[],d),n.push(v)),v.breakClipIds.push(f.id),s.push(f)}else 0;else 0}t.breakClips=s,t.breaks=n,t.vmapAdsRequest=r}(h,i,e),h}(t.G$t,t.Jc,t.ct,t.b0),e=new chrome.cast.media.LoadRequest(i);return e.autoplay=!0,e.currentTime=t.MP,e.customData=t.X$t,e}(t);let e;try{e=await this.YBt.loadMedia(i)}catch(t){e=t}if(e)throw new Vs(wn(e))}ix(t){this.F$t().setReceiverMuted(t,Ct,this.j$t)}Ox(t){this.F$t().setReceiverVolumeLevel(t,Ct,this.j$t)}Q$t(){return this.F$t().receiver.friendlyName}kn(){this.Vo(),this.YBt.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.K$t),this.F$t().removeUpdateListener(this.H$t),this.P$t.y$t(xn,this.L$t),this.s$t.kn(),this.P$t.kn()}constructor(t){super(),this.YBt=void 0,this.P$t=void 0,this.s$t=void 0,this.O$t=void 0,this.V$t=void 0,this.l$t=t=>{this.So(new j0(t))},this.Y$t=(t,i)=>{"error"===t&&this.So(new Q0(i))},this.J$t=(t,i)=>{this.So(new K0(t,i))},this.L$t=(t,i)=>{const e=JSON.parse(i);e.type===q0.aKt&&(this.O$t=e.info,this.So(new Y0))},this.H$t=()=>{const t=this.F$t(),{level:i,muted:e}=t.receiver.volume;this.So(new X0(null!=i?i:void 0,null!=e?e:void 0))},this.K$t=()=>this.U$t(this.YBt.getMediaSession()),this.W$t=t=>{var i;t||(null==(i=this.V$t)||i.a$t(this.W$t),this.V$t=void 0,this.So(new G0))},this.j$t=t=>{var i;const e=new Vs(wn(t.code),null!=(i=t.description)?i:void 0);this.l$t(e)},this.YBt=t,this.YBt.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.K$t),this.P$t=new O0(t.getSessionObj()),this.s$t=new z0(this.P$t),this.s$t.e$t(this.Y$t),this.s$t.k$t(this.J$t),this.F$t().addUpdateListener(this.H$t),this.H$t(),this.M$t();const i=this.YBt.getMediaSession();i&&this.U$t(i)}};function Z0(t){switch(t){case Ba.dR:case Ba.cR:case Ba.lR:case Ba.fR:return!0}return!1}var $0=function(t){return t.Z$t="statechange",t}({}),t1=class extends wp{constructor(t){super("statechange"),this.Ylt=void 0,this.Ylt=t}};r(),r(),r(),r();var i1=class extends Ne{Zst(){return this.qc}RP(){return ve.iL()}LP(){return this.bz+this.$$t}Hst(){return this.LP()}DP(){}Nd(){return this.WA}VP(){return this.Z4}HP(){}ox(){return this.kz}t0t(){}lx(){return this.Ez}vx(t){this.Ez!==t&&(this.Ez=t,this.So(new aa(this.oa.MP,t)))}bx(){return mh.VL}gx(){return ve.iL()}Tx(){return ve.iL()}Ex(){return!1}EP(){return this.YL}Dx(){return this.$L}Ix(){return this.Gl}f$t(t){}Nx(){return this.i0t}Cx(){return this.e0t}Gx(){this.kz=!1}zx(){this.kz=!0}My(t){this.bz=t-this.$$t}s0t(){return this.$$t}n0t(t){this.$$t=t}knt(t){this.qc.knt(t)}Xx(){}kn(){this.Vo(),this.YL.kn(),this.$L.kn(),this.Gl.kn(),this.qc.kn()}constructor(t,i,e,s,n,r,h,o,a){super(),this.oa=void 0,this.bz=void 0,this.WA=void 0,this.Z4=void 0,this.kz=void 0,this.Ez=void 0,this.$$t=void 0,this.i0t=void 0,this.e0t=void 0,this.YL=void 0,this.$L=void 0,this.Gl=void 0,this.qc=void 0,this.oa=t,this.$$t=0,this.YL=new rs,this.$L=new rs,this.Gl=new cc,this.qc=new xl,this.$$t=i,this.bz=e-i,this.WA=s,this.Z4=n,this.kz=r,this.Ez=h,this.i0t=o,this.e0t=a}};r(),r(),r(),r();var ma=function(t){return t.r0t="ccmodechangerequest",t.h0t="cctargetqualitychangerequest",t.o0t="cctrackchangerequest",t}({}),e1=class extends wp{constructor(t,i,e){super(ma.r0t),this.track=void 0,this.trackId=void 0,this.mode=void 0,this.track=t,this.trackId=i,this.mode=e}};r();var s1=function(t){return t.NT="TEXT",t.Dk="AUDIO",t.Bk="VIDEO",t}({}),n1=function(t){return t.OU="SUBTITLES",t.FU="CAPTIONS",t.UU="DESCRIPTIONS",t.Yn="CHAPTERS",t.VU="METADATA",t}({});function r1(t){return"AUDIO"===t.type}function h1(t){return"VIDEO"===t.type}function o1(t){return"TEXT"===t.type}var a1=class extends Ne{get Ca(){return this.hu||(this.hu=zh(this)),this.hu}get Th(){return this.pO}set Th(t){t!==this.pO&&(this.pO=t,this.So(new Uh(this)))}get q(){return this.g5}get L(){return this.p5}get Xk(){return this.Yo}set Xk(t){const i=AS(t);this.Yo!==i&&(this.Yo=i,this.a0t!==i&&this.So(new e1(this,this.jI,i)),this.So(new nr(this)))}get u0t(){return this.a0t}set u0t(t){const i=AS(t),e=this.Yo!==i;this.Yo=i,this.a0t=i,e&&this.So(new nr(this))}m5(t){return Jr(this.p5.II,i=>i.o===t)}$I(t){this.Xk=t}c0t(t){}kn(){}hr(){}constructor(t){super(),this.o=void 0,this.jI=void 0,this.ZI=void 0,this.Lt=void 0,this.bs=void 0,this.Ax=void 0,this.Km=void 0,this.pO=void 0,this._5=void 0,this.k5=void 0,this.p5=void 0,this.g5=void 0,this.Yo=void 0,this.a0t=void 0,this.hu=void 0;const i=t.customData;this.jI=Number(t.trackId)||0,this.o=""+(i&&i.id||this.jI),this.pO=i&&i.label||t.name||"",this.bs=i&&i.language||t.language||"",this.ZI=i&&i.inBandMetadataTrackDispatchType||"",this.Lt=i&&i.kind||function(t){switch(t){case n1.OU:return Ao.OU;case n1.FU:return Ao.FU;case n1.UU:return Ao.UU;case n1.Yn:return Ao.Yn;case n1.VU:return Ao.VU}return}(t.subtype)||"subtitles",this.Ax=Zu.NONE,this.Km=i&&void 0!==i.type?function(t){return YT(t)?t:nh.DEFAULT}(i.type):nh.WEBVTT,this._5=[],this.p5=new aM(this._5),this.k5=[],this.g5=new aM(this.k5),this.Yo=AS(i&&i.mode||xh.Nh),this.a0t=this.Yo}};r(),r();var u1=class extends wp{constructor(t,i){super(ma.o0t),this.trackId=void 0,this.enabled=void 0,this.trackId=t,this.enabled=i}};r();var c1=class extends wp{constructor(t,i){super(ma.h0t),this.track=void 0,this.targetQuality=void 0,this.track=t,this.targetQuality=i}};r();var d1=function(t){return t.Dk="audio",t.Bk="video",t.NT="text",t}({}),l1=class extends Ne{get XI(){return this.Kdt}get YI(){return this.jdt}set YI(t){this.d0t(t),this.So(new c1(this,t))}get KI(){return this.dO}get Th(){return this.pO}set Th(t){t!==this.pO&&(this.pO=t,this.So(new Uh(this)))}get Rt(){return this.We}set Rt(t){this.We!==t&&(this.We=t,this.l0t!==t&&this.So(new u1(this.jI,t)),this.So(new nr(this)))}get f0t(){return this.l0t}set f0t(t){const i=this.We!==t;this.We=t,this.l0t=t,i&&this.So(new nr(this))}get Ca(){return this.hu||(this.hu=fo(this)),this.hu}get Xk(){return this.Rt?"enabled":"disabled"}wO(t){this.Rt=t}c0t(t){if(t.targetQualityIds){const i=[];for(const e of this.dO.II)t.targetQualityIds.indexOf(e.o)>-1&&i.push(e);const e=i.length?i:void 0;this.d0t(e)}}d0t(t){(function(t,i){return!t&&i||t&&!i||t&&i&&!df(t,i)})(this.jdt,t)&&(this.jdt=t&&this.dO.fO(t)?t:void 0,this.So(new Zo(this.jdt,this)))}unload(){for(const t of this.dO.II)t.mn("update",this.iLt);this.dO.hr()}constructor(t){super(),this.o=void 0,this.jI=void 0,this.Lt=void 0,this.bs=void 0,this.B3=void 0,this.pO=void 0,this.Kdt=void 0,this.dO=new Uk,this.jdt=void 0,this.We=void 0,this.l0t=void 0,this.hu=void 0,this.iLt=()=>this.So(new Uh(this));const i=t.customData;if(this.jI=Number(t.trackId)||0,this.o=""+(i&&i.id||this.jI),this.pO=i&&i.label||t.name||"",this.bs=i&&i.language||t.language||"",this.Lt=i&&i.kind||"main",this.We=i&&i.enabled,this.l0t=this.We,r1(t)){this.B3=d1.Dk;const i=t.customData&&t.customData.qualities;if(i)for(const t of i){const i=new Vq(t.id,t.bandwidth,t.codecs,t.name,"",t.audioSamplingRate);i.wn("update",this.iLt),this.dO.lO(i)}}else{this.B3=d1.Bk;const i=t.customData&&t.customData.qualities;if(i)for(const t of i){const i=new Uq(t.id,t.bandwidth,t.codecs,t.name,"",t.frameRate,t.width,t.height);i.wn("update",this.iLt),this.dO.lO(i)}}}};r();var f1=function(t){return t.v0t="legacy",t._0t="caf",t}({});r(),r(),r(),r();var v1=class{Rc(){if(this.g0t>=this.qc.length)return;const t=this.qc[this.g0t];return this.g0t+=1,t}lt(){return this.Rc()}constructor(t){this.qc=void 0,this.g0t=0,this.qc=t}};function Pn(t){var i,e,s;return null!=(s=null==(e=t.OZt)||null==(i=e.dKt)?void 0:i.lKt())?s:[]}var _1=class{},g1=class{wnt(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get ads(){return t.Jc.map(t=>t.wnt())},get integration(){return t.MZt},get maxDuration(){return t.p0t},get maxRemainingDuration(){return t.m0t},get timeOffset(){return t._Ot},get customData(){return t.X$t}}}(this)}constructor(){this.hu=void 0}},p1=class{get w0t(){return this.y0t}get t(){return this.oa}constructor(t,i){this.y0t=void 0,this.oa=void 0,this.y0t=t,this.oa=i}},m1=class extends g1{get uZt(){return this.GZt}get Jc(){const t=[];for(const s of this.GZt.A0t)for(const n of Pn(s)){var i,e;const r=null!=(e=null==(i=n.IKt)?void 0:i.tYt)?e:[];if(n.PKt&&t.push(this.b0t(n.PKt,r,n.CKt,s.Ont)),n.RKt)for(const i of n.RKt.DKt)t.push(this.S0t(i,r,n.RKt,n.CKt,s.Ont))}return t}b0t(t,i,e,s){const n=Jr(this.T0t,i=>i.PKt===t);if(void 0!==n)return n;const r=new b1(t,i,this,this.k0t,e,s);return this.T0t.push(r),r}S0t(t,i,e,s,n){const r=Jr(this.E0t,i=>i.RKt===t);if(void 0!==r)return r;const h=new A1(t,i,e,this,this.k0t,s,n);return this.E0t.push(h),h}get MZt(){return ru.CSAI}get _Ot(){const t=this.GZt.dd;return t>=0?t:this.k0t.t.Nd()}get m0t(){let t=0;for(const i of this.GZt.A0t)for(const e of Pn(i))e.PKt&&!e.PKt.$Yt&&(t+=e.PKt.ct);return this.k0t&&this.k0t.w0t&&(t+=this.k0t.w0t.ct-this.k0t.w0t.MP),t}get p0t(){let t=0;for(const i of this.GZt.A0t)for(const e of Pn(i))e.PKt&&(t+=e.PKt.ct);return t}get X$t(){}constructor(t,i){super(),this.GZt=void 0,this.k0t=void 0,this.T0t=[],this.E0t=[],this.GZt=t,this.k0t=i}},w1={height:0,width:0,clickThrough:"",contentHTML:"",resourceURI:"",altText:""},y1=class extends _1{get od(){return this.zKt}get Ont(){return this.LZt}get CKt(){return this.XYt}P0t(){return this.x0t}I0t(){this.x0t=!0}R0t(t){return Mo({},w1,{resourceURI:t.LJt||""})}C0t(t){return Mo({},w1,{contentHTML:t.LJt.trim(),type:"HTMLResource"})}D0t(t){var i,e;return Mo({},w1,{clickThrough:(null==(i=t.AYt)?void 0:i.trim())||"",resourceURI:(null==(e=t.LJt)?void 0:e.trim())||"",altText:t.wYt||"",type:"StaticResource"})}B0t(t,i,e){if(!t||!i)return;const s="";return""+s+""}IKt(t){return t?t.map(t=>{let i;const e={adSlotId:t.lYt||"",height:t.Mi||0,width:t.Ti||0};if(t.LKt){var s;const e=this.D0t(t.LKt),n=e.clickThrough||(null==(s=t.gYt)?void 0:s.AYt);i=Mo({},e,{contentHTML:this.B0t(e.resourceURI,n,e.altText)||""})}else if(t.VKt)i=this.C0t(t.VKt);else{if(!t.FKt)return;i=this.R0t(t.FKt)}return po(i,e)}).filter(t=>void 0!==t):[]}N0t(){return this.M0t.yKt}constructor(t,i,e,s,n,r){super(),this.M0t=void 0,this.iYt=void 0,this.zKt=void 0,this.k0t=void 0,this.XYt=void 0,this.LZt=void 0,this.x0t=!1,this.M0t=t,this.iYt=i,this.zKt=e,this.k0t=s,this.XYt=n,this.LZt=r}},A1=class extends y1{get RKt(){return this.M0t}get xKt(){return this.L0t}xa(){const t=this.zKt,i={companions:this.IKt(this.iYt),type:"nonlinear",id:this.M0t.GKt,skipOffset:this.JYt,integration:this.LZt.integration,adSystem:this.M0t.yKt,get adBreak(){return t.wnt()},creativeId:this.M0t.GKt,universalAdIds:this.XYt.map(t=>({adIdRegistry:t.ZJt,adIdValue:t.tZt}))};return this.M0t.FKt?po(this.R0t(this.M0t.FKt),i):this.M0t.VKt?po(this.C0t(this.M0t.VKt),i):this.M0t.LKt?po(this.D0t(this.M0t.LKt),i):i}wnt(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()}O0t(){var t,i;return null!=(i=null==(t=this.M0t.LKt)?void 0:t.LJt)?i:""}F0t(){var t,i,e;return null!=(e=null==(i=this.M0t)||null==(t=i.LKt)?void 0:t.FJt)?e:""}get JYt(){const t=this.M0t.od;return t&&t.Ont&&void 0!==t.Ont.skipOffset?Ha.NZt(t.Ont.skipOffset,this.k0t.w0t.ct):(null==(i=this.M0t.od)?void 0:i.JYt)||-1;var i}constructor(t,i,e,s,n,r,h){super(t,i,s,n,r,h),this.L0t=void 0,this.hu=void 0,this.L0t=e}},b1=class extends y1{get PKt(){return this.M0t}xa(){var t;const i=this.zKt,e=this.M0t;return{companions:this.IKt(this.iYt),duration:e.ct,id:e.GKt,mediaFiles:e.QYt,get mediaUrl(){return e.tJt},skipOffset:this.JYt,type:"linear",integration:this.LZt.integration,adSystem:e.yKt,width:void 0,height:void 0,get adBreak(){return i.wnt()},clickThrough:null==(t=e.FYt)?void 0:t.AYt,creativeId:e.GKt,universalAdIds:this.XYt.map(t=>({adIdRegistry:t.ZJt,adIdValue:t.tZt})),closedCaptionFiles:e.eJt,extensions:e.nJt}}wnt(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()}O0t(){return this.M0t.QYt.length>0?this.M0t.QYt[0].contentURL:""}F0t(){return this.M0t.QYt.length>0?this.M0t.QYt[0].type:""}get JYt(){const t=this.M0t.od;return t&&t.Ont&&void 0!==t.Ont.skipOffset?Ha.NZt(t.Ont.skipOffset,this.k0t.w0t.ct):this.M0t.JYt||-1}constructor(t,i,e,s,n,r){super(t,i,e,s,n,r),this.hu=void 0}};function S1(t){return t instanceof b1}r();var mt=function(t){return t.U0t="csai",t.V0t="google-ima",t.so="google-dai",t.H0t="freewheel",t.W0t="mediatailor",t.Iv="chromecast",t.ont="theoads",t}({});r();var T1=class extends du{xa(){return new k1(this.Int.wnt())}constructor(t){super("q0t",t)}},k1=class extends vu{constructor(t){super("updatead",t)}};r();var E1=class extends du{xa(){return new P1(this.Int.wnt())}constructor(t){super("z0t",t)}},P1=class extends vu{constructor(t){super("adloaded",t)}},x1=class extends _o{get zc(){return void 0!==this.G0t}get mnt(){return this.M0t?[this.M0t]:[]}get ynt(){var t;return null!=(t=this.G0t)?t:null}get Ant(){return De(this.X0t,t=>{const i=t.Jc;if(t===this.G0t&&void 0!==this.M0t){const t=i.indexOf(this.M0t);if(t>=0)return i.slice(t+1)}return t.j0t()?[]:i})}get bnt(){return this.X0t.filter(t=>t===this.G0t||!t.j0t())}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=iU(this)}M6(t,i,e){throw new g("Scheduling ads while casting is not supported.")}rD(){this.i$t.p$t()}Ent(t){var i;null==(i=this.Q0t)||i.Ent(t)}Tnt(t,i){var e;null==(e=this.Q0t)||e.Tnt(t,i)}K0t(t){return Jr(this.X0t,i=>i.o===t)}Y0t(t,i,e,s){const n=this.X0t,r=[];let h=!1;for(const n of t){let t=this.K0t(n.id);void 0===t&&(t=new I1(n),s.push(new nU(t))),!it(t.J0t)&&it(e)&&(t.J0t=this.Z0t(t.$0t,e));const o=t.Jc;t.er(n,i,e,s);const a=t.Jc;for(const t of a)pi(o,t)||(s.push(new Qa(t)),h=!0);r.push(t)}this.X0t=r,h&&s.push(new wl);for(const t of n)pi(r,t)||s.push(new Uu(t))}t1t(t,i){const e=this.G0t,s=this.M0t;let n,r;if(t){var h;const{breakId:i,breakClipId:e}=t;n=i?this.K0t(i):void 0,r=e?null==(h=this.G0t)?void 0:h.i1t(e):void 0}if(this.G0t=n,this.M0t=r,n!==e&&(void 0!==e&&(e.e1t=void 0,i.push(new Fa(e))),void 0!==n&&(n.e1t=this.i$t,i.push(new aU(n)))),r!==s){const t=this.oa.LP();void 0!==s&&i.push(new bc(s,t)),void 0!==r&&i.push(new dc(r,t))}}Z0t(t,i){if(!i||!i.breaks)return;const e=Jr(i.breaks,i=>i.id===t.id);return e}knt(t){const i=[];for(const t of this.X0t){let e=t.Jc;if(t===this.G0t&&void 0!==this.M0t){const t=e.indexOf(this.M0t);t>=0&&(e=e.slice(t))}else if(t.j0t())continue;for(const t of e){const e=t.s1t();e&&i.push(e)}}for(const e of i)t.M6(e,iu.gnt,!1)}kn(){return this.Vo(),this.i$t.a$t(this.eh),void 0!==this.G0t&&(this.G0t.e1t=void 0,this.G0t=void 0),this.M0t=void 0,Yo(this.X0t),Promise.resolve(void 0)}Snt(t){}constructor(t,i,e){super(),this.oa=void 0,this.i$t=void 0,this.Q0t=void 0,this.X0t=[],this.G0t=void 0,this.M0t=void 0,this.hu=void 0,this.eh=t=>{var i;if(!t)return;const e=this.i$t.KD,{breakStatus:s}=e,{breakClips:n,breaks:r}=e.media,h=null==(i=B$(e))?void 0:i.media,o=[];r&&n&&this.Y0t(r,n,h,o),this.t1t(s,o);for(const t of o)this.So(t)},this.oa=t,this.i$t=i,this.Q0t=e,this.i$t.o$t(this.eh)}},I1=class extends g1{get $0t(){return this.n1t}get o(){return this.n1t.id}get Jc(){return this.qc}get MZt(){return mt.Iv}get p0t(){let t=this.n1t.duration;return void 0===t&&this.qc.length>0&&(t=$l(this.qc,t=>t.ct),S(t)&&(t=void 0)),t}get m0t(){const t=this.p0t;if(void 0!==t&&void 0!==this.e1t){const i=this.e1t.g$t();if(void 0!==i)return _.max(0,t-i)}return t}get _Ot(){return this.n1t.position}get X$t(){}j0t(){return this.n1t.isWatched}i1t(t){return Jr(this.qc,i=>i.o===t)}er(t,i,e,s){const n=[];for(let r=0;rt.id===h);if(void 0===o)continue;const a=rt.id===i);if(!s){var n;const i=null==(n=this.J0t)?void 0:n.breakClipIds[e];i&&(s=Jr(t.breakClips,t=>t.id===i))}return s}constructor(t){super(),this.n1t=void 0,this.J0t=void 0,this.qc=[],this.e1t=void 0,this.n1t=t}},R1=class{get o1t(){return this.a1t}get o(){return this.a1t.id}get tYt(){return[]}get ct(){var t;return null!=(t=this.a1t.duration)?t:NaN}get QYt(){const t=this.O0t();return t?[{contentURL:t,delivery:"progressive",type:this.F0t(),width:0,height:0}]:[]}get tJt(){return this.O0t()}get JYt(){const{whenSkippable:t}=this.a1t;return void 0===t?void 0:t<0?-1:t}get AYt(){return this.a1t.clickThroughUrl}get GKt(){}get CKt(){return[]}get X$t(){}N0t(){return""}F0t(){var t;return null!=(t=this.a1t.contentType)?t:""}O0t(){var t,i;return null!=(i=null!=(t=this.a1t.contentUrl)?t:this.a1t.contentId)?i:""}er(t,i){const e=this.o,s=this.ct,n=this.a1t.contentUrl;this.a1t=t;const r=this.o,h=this.ct,o=this.a1t.contentUrl;e===r&&(s===h||S(s)&&S(h))&&n===o||i.push(new T1(this)),S(s)&&!S(h)&&i.push(new E1(this))}s1t(){let t;return this.r1t&&(t=C0(this.r1t,this.od._Ot)),t||(t=C0(this.a1t,this.od._Ot)),t}wnt(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()}xa(){const t=this;return{get extensions(){return[]},get companions(){return t.tYt},get duration(){return t.ct},get id(){return t.o},get mediaFiles(){return t.QYt},get mediaUrl(){return t.tJt},get closedCaptionFiles(){return[]},get skipOffset(){return t.JYt},type:"linear",integration:mt.Iv,get adSystem(){return t.N0t()},width:void 0,height:void 0,get adBreak(){return t.od.wnt()},get resourceURI(){return t.O0t()},get clickThrough(){return t.AYt},get creativeId(){return t.GKt},get customData(){return t.X$t},get isSlate(){return!1},get universalAdIds(){return t.CKt.map(t=>({adIdRegistry:t.ZJt,adIdValue:t.tZt}))}}}constructor(t,i){this.a1t=void 0,this.r1t=void 0,this.od=void 0,this.hu=void 0,this.a1t=t,this.od=i}};r();var C1=class extends Ne{get u1t(){return this.c1t}set u1t(t){this.c1t!==t&&(this.c1t=t,this.Ls.href=null!=t?t:"",t?this.jU():this.QU())}jU(){if(this.We)return;this.We=!0,this.Ls.style.display="",this.d1t||(this.pE.style.cursor="pointer");const t=this.d1t?this.Ls:this.pE;zd.Zs.Ke?(t.addEventListener("touchstart",this.l1t),t.addEventListener("touchend",this.f1t)):(t.addEventListener("mousedown",this.l1t),t.addEventListener("click",this.f1t))}QU(){if(!this.We)return;this.We=!1,this.Ls.style.display="none",this.d1t||(this.pE.style.cursor="");const t=this.d1t?this.Ls:this.pE;zd.Zs.Ke?(t.removeEventListener("touchstart",this.l1t),t.removeEventListener("touchend",this.f1t)):(t.removeEventListener("mousedown",this.l1t),t.removeEventListener("click",this.f1t))}zg(){this.Vo(),this.QU(),this.pE.removeChild(this.Ls)}constructor(t,i=zd.Zs.Ke){super(),this.pE=void 0,this.Ls=void 0,this.d1t=void 0,this.c1t=void 0,this.We=!1,this.l1t=t=>{t.stopPropagation(),this.So(new wp("clickstart"))},this.f1t=t=>{t.stopPropagation(),this.So(new wp("click"))},this.pE=t,this.d1t=i,this.Ls=h.createElement("a"),this.Ls.style.position="absolute",this.Ls.style.zIndex="11",this.Ls.target="Xu",this.d1t?(Xu(this.Ls,"learn more"),this.Ls.className="theoplayer-ad-overlay-component theoplayer-ad-touch-clickthrough",this.Ls.setAttribute("rel","noopener")):oa(this.Ls),this.pE.appendChild(this.Ls),this.QU()}};r(),r();var D1=[1200,992,768,576],B1={1200:"theo-size-xl",992:"theo-size-l",768:"theo-size-m",576:"theo-size-s"},N1=class{v1t(t){const i=M1(t);i!==this._1t&&(fi(this.Ls,i),Rl(this.Ls,this._1t),this._1t=i)}kn(){this.sc.mn(Rh.yn,this.bn)}constructor(t,i){this.Ls=void 0,this.sc=void 0,this._1t=void 0,this.bn=void 0,this.Ls=t,this.sc=i,this.bn=t=>{this.v1t(t.width)},this._1t=M1(i.Eu),fi(this.Ls,this._1t),i.wn(Rh.yn,this.bn)}};function M1(t){for(const i of D1)if(t>i)return B1[i];return"theo-size-xs"}var L1=class extends Ne{get xe(){return this.Ls}get Xk(){return this.Yo}get UT(){return this.ud.textContent||""}set UT(t){Xu(this.ud,t)}g1t(t){"countdown"!==this.Yo&&(this.Yo="countdown",this.p1t(),this.xe.classList.remove("theoplayer-ad-skip-button"),this.xe.classList.add("theoplayer-ad-skip-countdown")),this.UT="You can skip in "+_.round(t)+" seconds"}m1t(){"skip"!==this.Yo&&(this.Yo="skip",this.UT="Skip Ad",this.w1t(),this.xe.classList.remove("theoplayer-ad-skip-countdown"),this.xe.classList.add("theoplayer-ad-skip-button"))}w1t(){this.xe.addEventListener("mouseup",this.y1t),this.xe.addEventListener("touchend",this.y1t)}p1t(){this.xe.removeEventListener("mouseup",this.y1t),this.xe.removeEventListener("touchend",this.y1t)}kn(){this.Vo(),this.p1t(),this.tc.kn(),os(this.Ls),os(this.ud),this.A1t&&os(this.A1t)}constructor(t,i){super(),this.Ls=void 0,this.A1t=void 0,this.ud=void 0,this.tc=void 0,this.Yo=void 0,this.y1t=()=>{this.So(new wp("rD"))},this.Ls=h.createElement("div"),this.xe.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.xe.style.position="absolute",this.ud=h.createElement("span"),this.xe.appendChild(this.ud),i&&(this.A1t=h.createElement("div"),this.A1t.className="theoplayer-ad-skip-poster",this.A1t.style.backgroundImage='url("'+dp(i)+'")',this.xe.appendChild(this.A1t)),this.Yo="countdown",this.tc=new N1(this.xe,t)}},O1=class extends Ne{b1t(){const t=this.i$t.KD.activeTrackIds;if(t){if(this.S1t()){const i=this.$L.II.map(t=>t.o),e=this.YL.II.map(t=>t.o);pi(i.concat(e),"0")&&t.push(0)}W1(t,this.YL),W1(t,this.$L),function(t,i){const e=!1;for(const e of i.II)e.u0t=pi(t,e.jI)?xh.Kn:xh.Nh}(t,this.Gl)}}T1t(){var t;const i=null==(t=this.i$t.KD.media)?void 0:t.tracks;if(!i)return;const e=i.filter(r1),s=i.filter(h1),n=i.filter(o1);if(this.S1t()&&0===s.length&&0!==this.Nx()){const t=this.k1t();s.push(t)}if(this.S1t()&&0===e.length){const t=this.E1t();e.push(t)}V1(this.YL,e.map(t=>t.trackId)),V1(this.$L,s.map(t=>t.trackId)),V1(this.Gl,n.map(t=>t.trackId)),H1(e,this.YL),H1(s,this.$L),function(t,i){let e=!1;for(const s of t){let t=U1(i,s.trackId);t||(t=new a1(s),i.tt(t),e=!0)}}(n,this.Gl)}P1t(){this.kz||(this.x1t=v(this.bd,250))}I1t(){p(this.x1t)}R1t(){this.I1t(),this.P1t()}C1t(){var t;const i=this.i$t.KD,e=i.media;var s;const n=null!=(s=null==e?void 0:e.duration)?s:NaN,r=(null==e?void 0:e.streamType)===chrome.cast.media.StreamType.LIVE||n<0,h=r?1/0:n;this.WA=h,this.D1t();const o=i.getEstimatedLiveSeekableRange(),a=null==(t=i.customData)?void 0:t.buffers;if(it(o)){const{start:t,end:i,isMovingWindow:e=r,isLiveDone:s=!1}=o;this.hUt(t,i,e,s)}else if(it(a)){const[t,i]=a.seekable;this.hUt(t,i,r,!1)}else r?this.hUt(void 0,void 0,!0,!1):this.hUt(0,h,!1,!1)}B1t(){const t=this.i$t.KD,i=function(t){return void 0!==t&&t.playerState===chrome.cast.media.PlayerState.PAUSED}(t)||F1(t);this.N1t=i,this.kz!==i&&(this.kz=i,this.kz?this.So(new hl(this.LP())):this.So(new Tc(this.LP())))}hh(){const{playbackRate:t}=this.i$t.KD;this.M1t!==t&&(this.M1t=void 0,this.Ez!==t&&(this.Ez=t,this.So(new aa(this.LP(),t))))}L1t(){const{playerState:t}=this.i$t.KD;let i;switch(t){case chrome.cast.media.PlayerState.IDLE:i=mh.VL;break;case chrome.cast.media.PlayerState.BUFFERING:i=mh.Qn;break;case chrome.cast.media.PlayerState.PAUSED:case chrome.cast.media.PlayerState.PLAYING:i=mh.WL}this.e5(i),this.O1t()}hUt(t,i,e,s){it(t)&&it(i)?this.N4=new RN(t,i,e,e&&!s):this.N4=void 0}F1t(t,i){this.e0t=null!=i?i:this.e0t,this.i0t=null!=t?t:this.i0t,this.So(new ts)}Je(t){this.U1t!==t?(this.Sz=!0,this.So(new F(this.LP()))):this.U1t=void 0}Rq(){if(!this.Sz)return;this.Sz=!1;const t=this.LP();this.So(new Si(t,this.DP())),this.So(new Es(t))}Eh(){this.Z4=!0,this.VP()&&this.So(new At(this.LP()))}D1t(){const t=this.LEt,i=this.Nd();t===i||S(t)&&S(i)||(this.LEt=i,this.So(new Rs(i)))}V1t(){const t=this.LP();this.Sz||this.H1t===t||(this.H1t=t,this.So(new Si(t,this.DP())))}t0t(){this.kz&&(this.kz=!1,this.So(new Tc(this.LP())),this.e5(mh.VL))}Zst(){return this.qc}RP(){return this.OPt.Ny(this.$$t)}LP(){if(this.qc.zc){const t=this.i$t._$t();if(void 0!==t)return t}return this.Hst()}Hst(){return void 0!==this.W1t?this.$$t+this.W1t:this.Z4?this.Nd():this.$$t+this.i$t.v$t()}DP(){if(this.q1t)return new Date(this.Hst()+this.q1t)}Nd(){if(this.qc.zc){var t;const i=null==(t=this.qc.mnt[0])?void 0:t.ct;if(void 0!==i&&!S(i))return i}return this.$$t+this.WA}HP(){return this.JW}VP(){return!this.qc.zc&&this.Z4}ox(){return this.kz}lx(){return this.Ez}vx(t){this.Ez!==t&&(this.M1t=this.Ez,this.Ez=t,this.So(new aa(this.LP(),t)),this.i$t.vx(t))}bx(){return this.t5}gx(){return this.qc.zc?ve.tL(0,this.LP()):this.Ho.Ny(this.$$t)}Tx(){var t,i;if(this.qc.zc)return ve.iL();let e=null!=(i=null==(t=this.N4)?void 0:t.z3().Ny(this.$$t))?i:ve.iL();if(e.V>0){const t=e.An(e.V-1);e=e.OM(ve.tL(t,this.LP()))}return e}Ex(){return this.Sz}EP(){return this.YL}Dx(){return this.$L}Ix(){return this.Gl}k1t(){return{customData:{activeQuality:{averageBandwidth:0,bandwidth:0,codecs:"",frameRate:0,height:this.Cx(),id:"0",name:"",width:this.Nx()},enabled:!0,id:"0",kind:"main",label:"",language:"",qualities:[],uid:0},language:"",name:"",trackContentId:"",trackContentType:"",trackId:0,type:s1.Bk}}E1t(){return{customData:{activeQuality:{averageBandwidth:0,bandwidth:0,codecs:"",id:"0",name:"",audioSamplingRate:0},qualities:[],enabled:!0,id:"0",kind:"main",label:"",language:"",uid:0},language:"",name:"",trackContentId:"",trackContentType:"",trackId:0,type:s1.Dk}}S1t(){var t,i;return!(void 0!==(null==(t=this.YBt.c$t())?void 0:t.version))||(null==(i=this.YBt.c$t())?void 0:i.sdkType)===f1._0t}f$t(t){this.S1t()&&oi(t,0),this.i$t.f$t(t)}Nx(){return this.i0t}Cx(){return this.e0t}Gx(){this.kz&&(this.kz=!1,this.N1t=!1,this.So(new Tc(this.LP()))),this.i$t.Gx()}zx(){this.kz||(this.kz=!0,this.N1t=!0,this.So(new hl(this.LP()))),this.i$t.zx()}My(t){if(this.qc.zc)return;let i=_.max(0,t-this.$$t);i=_.round(1e6*i)/1e6;const e=this.W1t;this.W1t=i,this.N1t=this.ox(),this.U1t=i,this.Sz=!0,this.So(new F(this.LP())),void 0===e&&(this.S1t()?this.z1t(i):this.y7(i))}y7(t){this.i$t.My(t,this.N1t).then(this.G1t(t)).catch(this.l$t)}G1t(t){return()=>{void 0!==this.W1t&&(this.W1t===t?this.W1t=void 0:this.y7(this.W1t))}}e5(t){this.t5!==t&&(this.t5=t,this.So(new ou(this.LP(),t))),void 0===this.W1t&&this.Sz&&t>=mh.HL&&this.Rq(),this.O1t()}O1t(){if(this.kz)return void(this.X1t=!1);const t=this.t5>=mh.WL;this.X1t!==t&&(this.X1t=t,t?this.So(new ce(this.LP())):this.So(new ux(this.LP())))}j1t(){this.Q1t||(this.Q1t=h.createElement("div"),this.oa.xe.appendChild(this.Q1t),this.Q1t.className="theoplayer-ad-linear theoplayer-chromecast-ad",this.Q1t.style.zIndex="10",oa(this.Q1t)),this.Q1t.style.display=this.qc.zc?"":"none"}K1t(){var t;const i=null==(t=this.qc.mnt[0])?void 0:t.AYt;i&&!this.Y1t?(this.Y1t=new C1(this.Q1t,!0),this.Y1t.u1t=i,this.Y1t.wn("clickstart",this.J1t)):this.Y1t&&(this.Y1t.u1t=i)}Z1t(){var t;const i=null==(t=this.qc.mnt[0])?void 0:t.JYt;if(void 0===i||i<0)return void(this.$1t&&(this.$1t.kn(),this.$1t=void 0));if(!this.$1t){var e;const t=null==(e=this.oa.Na)?void 0:e.gi;this.$1t=new L1(this.oa.Wu,t),this.Q1t.appendChild(this.$1t.xe),this.$1t.wn("rD",this.t2t)}const s=this.i$t._$t();void 0!==s&&(s{switch(t){case"buffered":this.OPt=new ve(i),this.So(new H(this.LP()));break;case"currentProgramDateTime":this.q1t=new Date(i).getTime()-this.LP();break;case"played":this.Ho=new ve(i);break;case"seekable":this.C1t();break;case"videoHeight":this.F1t(void 0,i);break;case"videoWidth":this.F1t(i,void 0)}},this.e4=t=>{switch(t.type){case d.$w:this.Je(t.currentTime);break;case d.Zw:this.Rq();break;case d.Yw:this.So(new mH(t.representation,t.previousRepresentation));break;case d.iy:this.So(new jV(t.segmentStartTime,t.error,t.trackType,t.track,t.quality,t.retryCount));break;case d.Dw:this.So(new eG(t.currentTime,t.initDataType,t.initData));break;case d.Ew:this.So(new wL(new fs(Vo.CONTENT_PROTECTION_ERROR,t.error,void 0,t.licenseAcquisitionURL,t.status,t.statusText,t.licenseAcquisitionMessage,t.systemCode)));break;case d.Pw:this.So(new un)}},this.W$t=t=>{this.C1t(),this.B1t(),this.hh(),this.L1t(),this.V1t(),this.R1t(),this.T1t(),this.b1t(),this.j1t(),this.K1t(),this.Z1t(),t||F1(this.i$t.KD)&&this.Eh()},this.bd=()=>{this.V1t(),this.Z1t()},this.e2t=t=>{this.So(t)},this.z1t=Hl(t=>this.y7(t),50),this.l$t=t=>{this.W1t=void 0,this.So(new B0(t))},this.J1t=()=>{this.zx()},this.t2t=()=>{this.qc.rD()},this.oa=t,this.YBt=e,this.i$t=s,this.qc=new x1(t,s,i.Jc),this.$$t=n.s0t(),this.WA=n.Nd()-this.$$t,this.kz=n.ox(),this.Ez=n.lx(),this.i0t=n.Nx(),this.e0t=n.Cx(),this.i$t.r$t(this.e4),this.i$t.e$t(this.i2t),this.i$t.o$t(this.W$t),this.i$t.wn(D0.$Zt,this.e2t),this.i$t.u$t().then(t=>{this.So(new N0(t.bt,t.Mc))},this.l$t)}};function F1(t){return void 0!==t&&t.playerState===chrome.cast.media.PlayerState.IDLE&&t.idleReason===chrome.cast.media.IdleReason.FINISHED}function U1(t,i){for(const e of t.II)if(e.jI===i)return e}function V1(t,i){let e=!1;for(let s=0;s0){if(i.end(i.length-1)-i.start(0)>60)return"dvr"}return"live"}return"vod"}var G1=[d.Bw,d.Rw,d.Kw,d.Jw,d.jw,d.uo,d.Qw,d._y,d.$w,d.Zw,Do.SM,Do.TM,d.Yw,d.iy,d.Dw,d.Ew,d.Pw],X1=class extends Oc{Az(t){if(!t)return;_t(this.fz&&dS(this.fz),t&&dS(t))||(this.fz=t,this.So(new bk(t)))}s2t(t){if(!t)return;const i=Cn(t,this.oa.Cd);_t(this.Ac&&dS(this.Ac),i&&dS(i))||(this.Ra.n0t(0),this.Ac=i,this.So(new KF(i)),this.Ra.t0t())}n2t(t){for(const i of this.rt.II)if(i.jI===t)return i;for(const i of this.ht.II)if(i.jI===t)return i}get Ylt(){return this.Ra}set Ylt(t){const i=this.Ra;i&&(i.mn(D0.$Zt,this.e2t),i.mn(D0.t$t,this.r2t),i.mn(G1,this.Rs),i.mn(Do.wI,this.FV),t.n0t(i.s0t()),i.knt(t.Zst())),this.Ra=t,this.YL.BI=t.EP(),this.$L.BI=t.Dx(),this.Gl.BI=t.Ix(),this.qc.BI=t.Zst(),i&&i.kn(),t.wn(D0.$Zt,this.e2t),t.wn(D0.t$t,this.r2t),t.wn(G1,this.Rs),t.wn(Do.wI,this.FV)}get ro(){return this.ho}get Jc(){return this.Zst()}Zst(){return this.qc}$st(){return this.Mst}EP(){return this.YL}RP(){return this.Ra.RP()._s()}get h2t(){return this.o2t||this.Ac}set h2t(t){this.o2t=t}async Un(t,i){var e;t&&await this.z$t(t,null!=(e=t.ads)?e:[],t.streamType,NaN,0,null!=i?i:0)}async a2t(t){var i;const e=null!=(i=this.o2t)?i:this.Ac;if(!e)return;var s;const n=this.o2t?null!=(s=this.o2t.ads)?s:[]:this.Wnt(),r=this.oa.Nd(),h=this.oa.Tx(),o=z1(r,h,e.streamType),a=h.length>0?h.start(0):0,u=null!=t?t:this.Hst();await this.z$t(e,n,o,r,a,u)}Wnt(){const t=new xl;return this.qc.knt(t),t.Wnt()}DP(){return this.Ra.DP()}NP(){return this.fz}get MP(){return this.LP()}set MP(t){this.OP(t)}LP(){return this.Ra.LP()}Hst(){return this.Ra.Hst()}OP(t,i){this.u2t||(this.YBt.q$t()||this.u2t||!this.Ac?this.Ra.My(t):this.Un(this.Ac,t))}Nd(){return this.Ra.Nd()}VP(){return this.Ra.VP()}HP(){return this.JW}qP(){return this.ZW}GP(){return this.ZL}ZP(){return this.oa.JP}tx(){return this.Tz}ix(t){this.Tz=t,this.So(new Ze(this.MP,this.Mx)),this.YBt.ix(t)}ox(){return this.Ra.ox()}lx(){return this.Ra.lx()}vx(t){this.Ra.vx(t)}gx(){return this.Ra.gx()._s()}wx(){return q.OL}yx(t){}bx(){return this.Ra.bx()}Tx(){return this.Ra.Tx()._s()}Ex(){return this.Ra.Ex()}nu(){return this.Ac}async Ta(t){this.Ac=t,await this.Un(t),this.o2t=void 0,this.Ra.t0t()}Ix(){return this.Gl}Cx(){return this.Ra.Cx()}Nx(){return this.Ra.Nx()}Dx(){return this.$L}Lx(){return this.ib}Ox(t){this.ib=t,this.So(new Ze(this.MP,this.Mx)),this.YBt.Ox(t)}get Vx(){return!1}set Vx(t){}Wx(){}Hx(){return this.ha}qx(){}Gx(){this.YBt.q$t()||this.u2t||!this.Ac?this.Ra.Gx():this.Un(this.Ac)}zx(){this.Ra.zx()}gr(){this.ho=!0}mr(){this.fz=void 0,this.ho=!1}be(){}we(){}async z$t(t,i,e,s,n,r){this.u2t=!0,this.c2t(),this.Ra.n0t(n);const h="live"===e||"dvr"===e,o=function(t,i,e,s){return{theoplayer_version:1,streamStart:t,isLive:i,sourceDescription:e,configuration:s}}(n,h,t,this.Cd),a={G$t:t,Jc:i,MP:_.max(0,r-n),ct:s,b0:h?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED,X$t:o};try{await this.YBt.z$t(a)}catch(t){this.d2t(t)}finally{this.u2t=!1}}l2t(){this.f2t(this.YL),this.f2t(this.$L),this.v2t(this.Gl)}f2t(t){for(const i of t.II)this._2t(i);t.wn(Vt.eI,t=>{this._2t(t.Ht),this.g2t()})}v2t(t){for(const i of t.II)this.p2t(i);t.wn(Vt.eI,t=>{this.p2t(t.Ht),this.g2t()})}_2t(t){t.wn(ma.h0t,this.Opt),t.wn(ma.o0t,this.m2t),t.wn(ma.o0t,this.b1t)}p2t(t){t.wn(ma.r0t,this.w2t),t.wn(ma.r0t,this.b1t)}y2t(){const t=[];for(const i of this.rt.II)i.Rt&&t.push(i.jI);for(const i of this.ht.II)i.Rt&&t.push(i.jI);for(const i of this.nt.II)i.Xk===xh.Kn&&t.push(i.jI);this.Ra.f$t(t)}A2t(t,i,e){this.b2t=t,this.S2t=i,this.T2t=e}k2t(t){var i,e;if(!t)return!1;return(null!=(e=null==(i=this.YBt.c$t())?void 0:i.version)?e:-1)>=2?t.map(t=>t.o):[t[0].o]}E2t(t){this.P2t=t}Yx(){}Jx(){}tI(t){throw new m("Can't add a track while casting.")}async Xx(){this.Ra.Xx(),this.c2t()}c2t(){this.EV=mh.VL,this.AV=!1,this.SV=!1,this.JW=void 0,this.ZW=void 0}async kn(){this.c2t(),this.Vo(),this.Ylt=this.x2t(),this.YBt.mn(kr.$Zt,this.e2t),this.YBt.mn(kr.R$t,this.I2t),this.YBt.mn(kr.gy,this.R2t),this.YBt.mn(kr.I$t,this.C2t),this.YBt.mn(kr.C$t,this.D2t),this.YBt.kn()}x2t(){return new i1(this,this.Ra.s0t(),this.Ra.LP(),this.Ra.Nd(),this.Ra.VP(),this.Ra.ox(),this.Ra.lx(),this.Ra.Nx(),this.Ra.Cx())}constructor(t,i){super(t,!0),this.ho=!1,this.P2t=Ct,this.EV=mh.VL,this.AV=!1,this.SV=!1,this.u2t=!1,this.o2t=void 0,this.YBt=void 0,this.ib=void 0,this.Tz=void 0,this.Ra=void 0,this.fz=void 0,this.Ac=void 0,this.JW=void 0,this.ZW=void 0,this.YL=new He,this.$L=new He,this.Gl=new sl,this.qc=void 0,this.ha=new ls,this.ZL=new kS,this.Mst=new q1,this.b2t=void 0,this.S2t=void 0,this.T2t=void 0,this.R2t=t=>{var i,e;(it(t.Mx)&&!uh(t.Mx,this.ib,1e-5)||it(t.$P)&&t.$P!==this.Tz)&&(this.ib=null!=(i=t.Mx)?i:this.ib,this.Tz=null!=(e=t.$P)?e:this.Tz,this.So(new Ze(this.MP,this.ib)))},this.C2t=()=>{const t=this.YBt.q$t();this.Ylt=t?new O1(this,this.oa,this.YBt,t,this.Ra):this.x2t()},this.r2t=t=>{this.Az(t.bt),this.s2t(t.Mc)},this.D2t=t=>{const i=this.n2t(t.$D);if(!i)return void 0;const e={targetQualityIds:t.B$t};i.c0t(e)},this.e2t=t=>{this.d2t(t.lt)},this.d2t=t=>{this.P2t&&this.P2t(t)},this.I2t=t=>{this.JW=t.lt,this.ZW=Ok(this.JW),this.So(new Pi(this.ZW))},this.m2t=t=>{if(!t.enabled)return;const i=this.rt.II.some(i=>i.jI===t.trackId)?this.rt:this.ht;for(const e of i.II)e.Rt&&e.jI!==t.trackId&&(e.Rt=!1)},this.w2t=t=>{if(t.mode===xh.Kn)for(const i of this.nt.II)i.Xk===xh.Kn&&i.jI!==t.trackId&&HP(i.Lt,t.track.Lt)&&(i.Xk=xh.Nh)},this.b1t=Hl(()=>{this.y2t()},50),this.g2t=()=>{const t=[];var i;const e=null!=(i=Jr(this.ht.II,t=>Bc(t,this.b2t)))?i:Jr(this.ht.II,t=>t.Rt);var s;e&&t.push(e.jI);const n=null!=(s=Jr(this.nt.II,t=>Bc(t,this.S2t)))?s:Jr(this.nt.II,t=>t.Xk===xh.Kn);var r;n&&t.push(n.jI);const h=null!=(r=Jr(this.rt.II,t=>Bc(t,this.T2t)))?r:Jr(this.rt.II,t=>t.Rt);h&&t.push(h.jI),0!==t.length&&this.Ra.f$t(t)},this.Opt=t=>{const i=this.k2t(t.targetQuality),e=t.track;this.YBt.N$t(e.jI,e.B3,i)},this.FV=t=>{this.So(t);const i=t.readyState;!this.AV&&this.EV===mh.VL&&i>=mh.Qn&&(this.AV=!0,this.So(new ut(t.currentTime))),!this.SV&&this.EV<=mh.Qn&&i>=mh.HL&&(this.SV=!0,this.So(new ot(t.currentTime))),this.EV<=mh.HL&&i>=mh.WL&&this.So(new lo(t.currentTime)),this.EV<=mh.WL&&i===mh.qL&&this.So(new qt(t.currentTime)),this.EV=i},this.ib=this.oa.Mx,this.Tz=this.oa.$P,this.YBt=i,this.YBt.wn(kr.$Zt,this.e2t),this.YBt.wn(kr.R$t,this.I2t),this.YBt.wn(kr.gy,this.R2t),this.YBt.wn(kr.I$t,this.C2t),this.YBt.wn(kr.C$t,this.D2t),this.qc=new _l(this),this.fz=this.oa.bt,this.Ac=this.oa.nu(),this.Ylt=new i1(this,0,this.oa.Hst(),this.oa.Nd(),this.oa.UP,this.oa.hx,this.oa.ux,this.oa.Bx,this.oa.Rx),this.l2t()}};r();var j1=class extends Oi{xa(){return new Q1(this.lt)}constructor(t){super("error"),this.lt=void 0,this.lt=t}},Q1=class extends wp{constructor(t){super("error"),this.error=void 0,this.error=t}};r();var K1=class extends wp{constructor(t){super("statechange"),this.state=void 0,this.state=t}};function Y1(t,i){let e;return{get casting(){return t.bJ},get error(){return t.lt},get receiverName(){return t.B2t},get state(){return t.Ylt},start(){t.Tn()},stop(){t.Xx()},join(){t.N2t()},leave(){t.M2t()},set connectionCallback(t){null==i||i.L2t(t)},get connectionCallback(){return null==i?void 0:i.O2t()},get source(){return e||t.Mc},set source(i){e=i,t.Mc=i},addEventListener(i,e){const s=$a(i,Hi);t.wn(s,e)},removeEventListener(i,e){const s=$a(i,Hi);t.mn(s,e)}}}r();var J1=class extends _o{get bJ(){return this.Ylt===Yr.CONNECTING||this.Ylt===Yr.CONNECTED}get lt(){return this.JW}get Ca(){return this.hu||(this.hu=Y1(this,this.F2t)),this.hu}get B2t(){var t;return null==(t=this.F2t.U2t())?void 0:t.Q$t()}get Mc(){return this.oa?this.oa.h2t:this.o2t}set Mc(t){this.o2t=t?Cn(t,this.V2t.Cd):void 0,this.oa&&(this.oa.h2t=this.o2t,this.o2t&&this.oa.Un(this.o2t))}get Ylt(){return this.Ra}set Ylt(t){let i=t;this.H2t||i!==Yr.CONNECTING&&i!==Yr.CONNECTED||(i=Yr.AVAILABLE),this.Ra!==i&&(this.Ra=i,this.So(new K1(this.Ylt)))}async W2t(){if(!this.q2t)throw new m("Chromecast must be initialized before starting a session");await this.q2t,this.F2t.U2t()||await this.F2t.z2t()}async Tn(){this.H2t=!0;try{if(this.Ylt=Yr.CONNECTING,await this.W2t(),await this.G2t(),this.oa){const t=this.V2t.nu(),i=this.F2t.X2t(t);this.oa.h2t=i?Cn(i,this.V2t.Cd):this.o2t,this.oa.a2t()}this.Ylt=Yr.CONNECTED,await this.V2t.Xx()}catch(t){this.j2t(!1).catch(Ct),this.Ylt=Yr.AVAILABLE,D(t)||this.e8(t)}}async N2t(){this.H2t=!0;try{if(this.Ylt=Yr.CONNECTING,await this.W2t(),await this.G2t(),this.oa){const t=this.V2t.nu(),i=this.F2t.Q2t(t);i&&(this.oa.h2t=Cn(i,this.V2t.Cd))}this.Ylt=Yr.CONNECTED,await this.V2t.Xx()}catch(t){await this.j2t(!0).catch(Ct),this.Ylt=Yr.AVAILABLE,D(t)||this.e8(t)}}async K2t(){this.F2t.U2t()&&await this.Tn()}async G2t(){null!=this.oa||(this.oa=this.Y2t()),this.JW=void 0,this.V2t.zx(),await this.CY.J2t(this.oa)}Y2t(){const t=new X1(this.V2t,this.F2t.U2t());return t.E2t(this.e8),t}Z2t(){this.oa&&(this.oa.kn(),this.oa=void 0)}async j2t(t){if(this.H2t=!1,!this.oa)return;const i=this.oa.ro,e=this.oa.nu(),s=this.oa.Hst();try{if(i){let i;i=t?this.F2t.$2t(e):this.F2t.t3t(e),null!=i||(i=e),await this.CY.i3t(i,i===e),this.V2t.OP(s),this.V2t.Gx()}}finally{this.Z2t()}}M2t(){this.bJ&&(this.F2t.e3t(!1),this.j2t(!0).catch(this.e8))}Xx(){this.bJ&&(this.F2t.e3t(!0),this.j2t(!1).catch(this.e8))}kn(){this.rV.Zg(),this.F2t.mn($0.Z$t,this.s3t),this.Vo(),this.Z2t()}constructor(t,i,e,s){super(),this.YS=void 0,this.JW=void 0,this.hu=void 0,this.V2t=void 0,this.oa=void 0,this.Ra=Yr.UNAVAILABLE,this.q2t=void 0,this.CY=void 0,this.F2t=void 0,this.H2t=!1,this.rV=new at,this.n3t=()=>{this.F2t.wn($0.Z$t,this.s3t),this.Ylt=this.F2t.r3t()},this.s3t=t=>{const i=t.Ylt;this.Ylt=i,i!==Yr.UNAVAILABLE&&i!==Yr.AVAILABLE||this.j2t(!1).catch(this.e8)},this.o2t=void 0,this.e8=t=>{D(t)||t instanceof Vs&&(this.JW=t,this.So(new j1(t).Ca))},this.CY=t,this.V2t=i,this.F2t=s,this.YS=e.chromecast,this.q2t=$e(this.F2t.VY(this.YS,this.rV.Yg),this.rV),this.q2t.then(this.n3t).catch(this.e8)}};r();var Z1=class extends _o{get bJ(){return!1}get lt(){}get B2t(){}get Mc(){}set Mc(t){}get Ylt(){return Yr.UNAVAILABLE}get Ca(){return this.hu||(this.hu=Y1(this)),this.hu}N2t(){zd.um("Joining a Chromecast session is not possible when JoinStrategy is configured to disabled")}M2t(){zd.um("Leaving a Chromecast session is not possible when JoinStrategy is configured to disabled")}Tn(){zd.um("Starting a Chromecast session is not possible when JoinStrategy is configured to disabled")}Xx(){zd.um("Stopping a Chromecast session is not possible when JoinStrategy is configured to disabled")}K2t(){return Promise.resolve()}kn(){}constructor(...t){super(...t),this.hu=void 0}};function $1(t){return{bt:t.bt,MP:t.LP(),ct:t.Nd(),UP:t.UP,lt:t.HP(),WP:t.qP(),$P:t.$P,hx:t.hx,ux:t.ux,Ax:t.Ax,kx:t.kx,Rx:t.Rx,Bx:t.Bx,Mx:t.Mx}}r(),r();var In=class extends Oc{Zst(){return this.qc}EP(){return this.YL}get zP(){return this.GP()}get jP(){return this.QP()}GP(){return this.ZL}QP(){return this.JL}Aa(){return this.KL}Ix(){return this.Gl}Dx(){return this.$L}switchContexts(t){this.oa=t,this.YL.BI=t.ht,this.$L.BI=t.rt,this.Gl.BI=t.nt,this.KL.BI=t.mq,this.ZL.BI=t.zP,this.JL.BI=t.jP,this.qc.BI=t.Jc}h3t(t){this.oa!==t&&(this._z(),this.switchContexts(t),this.vz())}tO(t){if(this.oa===t)return;let i;this._z(),this.nnt&&(i=$1(this));const e=this.NP(),s=this.Hx(),n=this.Wx();if(this.switchContexts(t),void 0!==i){Ri(this,i,$1(this))}const r=this.NP();r!==e&&this.So(new bk(r)),this.Hx()!==s&&this.So(new lt),this.Wx()!==n&&this.So(new Sk),this.vz()}async kn(t){await super.kn(t),this.KL.kn(t),this.YL.kn(t),this.$L.kn(t),this.Gl.kn(t),this.ZL.kn(),this.JL.kn(),await this.qc.kn(t)}constructor(t,i){super(t,i),this.YL=new He,this.$L=new He,this.Gl=new sl,this.KL=void 0,this.ZL=new yl,this.JL=new Rk,this.qc=void 0,this.KL=new io(t.mq),this.YL.BI=t.ht,this.$L.BI=t.rt,this.Gl.BI=t.nt,this.ZL.BI=t.zP,this.JL.BI=t.jP,this.qc=new _l(this),this.qc.BI=t.Jc}};r();function t2(t){const i=h.createElement("div");return fi(i,"theo-ads-sgai-ima-container"),function(t){t.style.boxSizing="border-box",t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%"}(i),t.appendChild(i),i}function i2(t){const i=t.style;i.boxSizing="border-box",i.position="absolute",i.display="none",i.border="0 solid transparent",i.borderWidth="0px",i.width="100%",i.height="100%"}function e2(t){const i=t.style;i.display="",i.backgroundColor="",i.backgroundRepeat="",i.backgroundAttachment="",i.border="",i.borderWidth="",i.flex="",i.transform="",i.transition="",i.backgroundImage="",i.backgroundSize="",i.backgroundPosition="",i.alignItems="",i.position=""}function s2(t,i,e,s,n){const r=i/e;let h=1,o=0,a=0;if(r>=s/n){const t=s/r;o=(n-t)/2,h=t/e}else{const t=n*r;a=(s-t)/2,h=t/i}t.style.left=a/s*100+"%",t.style.top=o/n*100+"%",t.style.width=i*h/s*100+"%",t.style.height=e*h/n*100+"%"}function n2(t){return Vh(t,"theo-ads://dai.break")}function r2(t){return t&&t.integration===ru.THEOADS}var h2=class extends In{nu(){const t=super.nu();return!t&&this.o3t.bJ&&this.o3t.Mc?this.o3t.Mc:t}Ta(t,i){return this.ta.Zo(i=>(this.a3t=new at,this.a3t.$g(i),$e(super.Ta(t,this.a3t.Yg),this.a3t)),i)}Gx(){super.Gx(),this.Cd.cast.strategy!==IS.AUTO||this.o3t.bJ||this.o3t.K2t()}J2t(t){return this.ta.Zo(i=>this.u3t(t,i))}i3t(t,i){return void 0===t&&(t=void 0),void 0===i&&(i=!1),this.ta.Zo(e=>this.c3t(t,i,e))}u3t(t,i){ii(i),this.d3t.Jc&&this.d3t.Jc.knt(t.Jc),this.l3t(),this.f3t=Jr(this.d3t.ht.II,t=>t.Rt),this.jkt=Jr(this.d3t.nt.II,t=>"showing"===t.Xk),this.v3t=Jr(this.d3t.rt.II,t=>t.Rt),this._3t=t,this._3t.A2t(this.f3t,this.jkt,this.v3t),this.tO(t),this._3t.gr()}async c3t(t,i,e){ii(e);const s=this._3t;if(void 0!==s)try{if(t){await this.d3t.Xx(),ii(e);const s=Cn(t,this.d3t.Cd);var n;if(i)s.ads=null==(n=s.ads)?void 0:n.filter(r2);this.a3t=new at,this.a3t.$g(e),await $e(this.d3t.Ta(s,this.a3t.Yg),this.a3t)}i&&this.d3t.Jc&&s.Jc.knt(this.d3t.Jc)}catch(t){yf(t)}finally{s.mr(),this.tO(this.d3t),this.f3t=Jr(this._3t.ht.II,t=>t.Rt),this.jkt=Jr(this._3t.nt.II,t=>"showing"===t.Xk),this.v3t=Jr(this._3t.rt.II,t=>t.Rt),this.d3t.ht.wn(Vt.eI,this.g3t),this.d3t.nt.wn(Vt.eI,this.p3t),this.d3t.rt.wn(Vt.eI,this.m3t),this.d3t.wn(Do.bM,this.l3t),this._3t===s&&(this._3t=void 0)}}Xx(){var t;return this.f3t=void 0,this.jkt=void 0,this.v3t=void 0,this.l3t(),null==(t=this.a3t)||t.Zg(),this.ta.Zo(()=>super.Xx())}async kn(){var t;null==(t=this.a3t)||t.Zg(),this.o3t.kn(),await this.i3t(),await this.ta.kn(),await super.kn()}constructor(t,i){super(t),this.o3t=void 0,this.d3t=void 0,this._3t=void 0,this.ta=new te,this.a3t=void 0,this.f3t=void 0,this.jkt=void 0,this.v3t=void 0,this.g3t=t=>{const i=t.Ht;Bc(this.f3t,i)&&(i.Rt=!0)},this.p3t=t=>{const i=t.Ht;Bc(this.jkt,i)&&(i.Xk=xh.Kn)},this.m3t=t=>{const i=t.Ht;Bc(this.v3t,i)&&(i.Rt=!0)},this.l3t=()=>{this.d3t.ht.mn(Vt.eI,this.g3t),this.d3t.nt.mn(Vt.eI,this.p3t),this.d3t.rt.mn(Vt.eI,this.m3t)},this.d3t=t,this.Cd.cast.strategy!==IS.DISABLED?this.o3t=new J1(this,t,this.Cd.cast,i):this.o3t=new Z1,this.VX.IJ(this.o3t)}};function Bc(t,i){return void 0!==t&&void 0!==i&&(t.bs===i.bs&&i.Th===t.Th)}r();var o2=new class extends Ne{L2t(t){this.w3t=t}O2t(){return this.w3t}U2t(){return this.y3t}r3t(){switch(this.A3t.getCastState()){case cast.framework.CastState.CONNECTED:return Yr.CONNECTED;case cast.framework.CastState.CONNECTING:return Yr.CONNECTING;case cast.framework.CastState.NOT_CONNECTED:return Yr.AVAILABLE;case cast.framework.CastState.NO_DEVICES_AVAILABLE:default:return Yr.UNAVAILABLE}}async VY(t,i){await P$(i),this.A3t=cast.framework.CastContext.getInstance(),this.A3t.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.RJ),this.A3t.setOptions({receiverApplicationId:t.appID,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED})}async z2t(){try{const t=await this.A3t.requestSession();if(t)throw t}catch(t){throw new Vs(wn(t))}}X2t(t){var i;return null==(i=this.w3t)?void 0:i.onStart(t)}t3t(t){var i;return null==(i=this.w3t)?void 0:i.onStop(t)}Q2t(t){var i;return null==(i=this.w3t)?void 0:i.onJoin(t)}$2t(t){var i;return null==(i=this.w3t)?void 0:i.onLeave(t)}e3t(t){this.A3t.endCurrentSession(t)}constructor(...t){super(...t),this.A3t=void 0,this.y3t=void 0,this.w3t=void 0,this.RJ=()=>{const t=this.r3t();this.y3t=t===Yr.CONNECTED?new J0(this.A3t.getCurrentSession()):void 0,this.So(new t1(t))}}},a2=new class{get Ca(){return this.hu||(this.hu=function(t){return{initialize(i){const e=t.VY(RS(i));return e.catch(Ct),e},startSession(){const i=t.z2t();return i.catch(Ct),i},endSession(){t.b3t()}}}(this)),this.hu}async VY(t){this.q2t||(this.q2t=this.S3t(t)),await this.q2t}async S3t(t){await this.F2t.VY(t)}async z2t(){if(!this.q2t)throw new m("Chromecast must be initialized before starting a session");await this.q2t,this.F2t.U2t()||await this.F2t.z2t()}T3t(){this.F2t.e3t(!1)}b3t(){this.F2t.e3t(!0)}constructor(t){this.q2t=void 0,this.hu=void 0,this.F2t=void 0,this.F2t=t}}(o2),u2={get chromecast(){return a2.Ca}};Pu(t=>new h2(t,o2),HF.ant),r(),r(),r(),r(),r(),r(),r();var c2=class{k3t(t,i,e,s){t.Uz.forEach(t=>{if(!this.E3t(t.P3t)){const n=t.x3t(i,e,s);n&&this.I3t(n)}})}E3t(t){return this.R3t.get(t)}I3t(t){this.R3t.set(t.C3t,t),this.D3t.set(t.C3t,t.B3t),this.N3t.au(t.M3t)}Ent(t){this.D3t.has(t.C3t)||(this.D3t.set(t.C3t,t),this.N3t.au(t.M3t))}L3t(t){return this.D3t.forEach(t)}O3t(t){return this.R3t.forEach(t)}F3t(t){let i=!1;return this.R3t.forEach(e=>{i=e.F3t(t)||i}),i}async kn(){const t=[];this.R3t.forEach(i=>t.push(i.kn())),this.D3t.forEach(i=>t.push(i.kn())),await Promise.all(t),this.R3t.clear(),this.D3t.clear()}constructor(t){this.N3t=void 0,this.R3t=void 0,this.D3t=void 0,this.N3t=t,this.R3t=qh(),this.D3t=qh()}};r();var Pa=class t extends Oi{xa(){return new d2(this.QJt,this.Py,this.Ky,this.Mc)}static U3t(i){return new t(Ic.GENERAL,i.Py,i.YJt)}static V3t(i,e){return new t(i.QJt,i.message,i.YJt,e)}constructor(t,i,e,s){super("H3t"),this.QJt=void 0,this.Py=void 0,this.Ky=void 0,this.Mc=void 0,this.QJt=t,this.Py=i,this.Ky=e,this.Mc=s}},d2=class extends wp{constructor(t,i,e,s){super("aderror"),this.problemType=void 0,this.message=void 0,this.errorCode=void 0,this.source=void 0,this.problemType=t,this.message=i,this.errorCode=e,this.source=s}},l2=class extends Sc{get W3t(){return this.q3t}get zc(){let t=!1;return this.z3t(i=>{t=t||i.G3t}),t}get mnt(){const t=[];return this.z3t(i=>{const e=i.mnt;e.length&&t.push(...e)}),t}get ynt(){let t=null;return this.z3t(i=>{null!=t||(t=i.ynt)}),t}get Ant(){const t=[];return this.z3t(i=>{t.push(...i.Ant)}),t}get bnt(){const t=[];return this.z3t(i=>{t.push(...i.bnt)}),t}knt(t){this.z3t(i=>{i.knt(t)})}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=iU(this)}M6(t,i,e){try{this.X3t=e;const s=Qh.Ng.Wz(t);if(s.P3t===mt.ont)return;const n=this.q3t.E3t(s.P3t);if(!n)throw new Co(Ic.ADBLOCK,void 0,"Ads could not be loaded.");i!==iu.pnt&&this.n7||this.Q3t.j3t(n),s.M6(t,i,n,this.X3t)}catch(i){0,this.So(Pa.V3t(i,t.sources))}}rD(){this.z3t(t=>{t.rD()})}Snt(t){this.z3t(i=>{i.Snt(t)})}Ent(t){this.q3t.Ent(t)}Tnt(t,i){return this.Q3t.Tnt(t,i)}K3t(t){this.q3t.O3t(i=>{i.K3t(t)})}F3t(t){return this.q3t.F3t(t)}z3t(t){return this.q3t.L3t(t)}qx(){this.q3t.O3t(t=>t.qx())}async hr(){this.n7=!1;const t=[];this.q3t.O3t(i=>t.push(i.Xx())),await Promise.all(t)}async kn(){this.Vo(),await this.q3t.kn(),this.Q3t.mn(d.uo,this.Wet),this.mn("H3t",this.Y3t)}constructor(t){super(),this.Q3t=void 0,this.q3t=void 0,this.X3t=!1,this.n7=!1,this.hu=void 0,this.Y3t=t=>{if(!this.X3t)return;if(t.Ky===Wi.VAST_NO_ADS_AFTER_WRAPPER||t.Ky===Wi.VAST_EMPTY_RESPONSE)return;const i=new Nk(Bk.ADVERTISEMENT_ERROR,t.Py),e=new Ga(Vo.AD_BLOCKER_DETECTED,t.Py+" Turn off your AdBlocker and try again.",i);this.Q3t.qq(e)},this.Wet=()=>{this.n7=!0},this.Q3t=t,this.q3t=new c2(this),this.wn("H3t",this.Y3t),t.wn(d.uo,this.Wet)}};r(),r(),r();var Le=class extends g1{get Jc(){return this.qc}get p0t(){return this.J3t}set p0t(t){this.J3t=t}get m0t(){return this.Z3t}set m0t(t){this.Z3t=t}set _Ot(t){this.UZt=t}get _Ot(){return this.UZt}get X$t(){return this.$3t}t4t(){this.i4t=!0}e4t(t){this.qc.push(t),this.i4t=!1}s4t(t){oi(this.qc,t)}get _x(){return this.i4t}constructor(t){super(),this.UZt=void 0,this.qc=void 0,this.J3t=void 0,this.Z3t=void 0,this.$3t=void 0,this.i4t=void 0,this.UZt=t,this.qc=[],this.J3t=-1,this.Z3t=-1,this.$3t=void 0,this.i4t=!1}},f2=class extends Le{get MZt(){return this.n4t}get Ant(){return this.r4t}er(t){void 0!==t.maxDuration&&(this.J3t=t.maxDuration),void 0!==t.customData&&(this.$3t=t.customData)}h4t(t){const i=this.qc.indexOf(t);return i>=0&&it.Ca)},get resourceURI(){return t.O0t()},get clickThrough(){return t.AYt},get width(){return t.Ti},get type(){return function(t){switch(t){case"linear":case"unknown":return"linear";case"nonlinear":return"nonlinear"}}(t.l4t)},get height(){return t.Mi},get id(){return t.o},get skipOffset(){return t.JYt},get integration(){return t.MZt},get creativeId(){return t.GKt},get universalAdIds(){return t.CKt},get customData(){return t.X$t},get isSlate(){return t.v4t}}}r();var _2=class{get lYt(){return this.fYt}get wYt(){return this.yYt}get p4t(){return this.m4t}get AYt(){return this.bYt}get Mi(){return this.hb}get LJt(){return this.g4t}get Ti(){return this.sb}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get adSlotId(){return t.lYt},get altText(){return t.wYt},get contentHTML(){return t.p4t},get clickThrough(){return t.AYt},get height(){return t.Mi},get resourceURI(){return t.LJt},get width(){return t.Ti}}}(this)}w4t(t){if(t.AYt&&t.LJt)return;const i=function(t){try{return s0(t,"text/html")}catch(t){return}}(t.p4t);i&&(this.bYt=g2(i,"a","href"),this.g4t=g2(i,"img","src"))}constructor(t){var i;this.hu=void 0,this.sb=void 0,this.hb=void 0,this.m4t=void 0,this.fYt=void 0,this.bYt=void 0,this.g4t=void 0,this.yYt=void 0,this.fYt=t.lYt,this.sb=t.Ti,this.hb=t.Mi,this.m4t=t.p4t,this.bYt=t.AYt,this.g4t=t.LJt,this.yYt=null!=(i=t.wYt)?i:"",this.w4t(t)}};function g2(t,i,e){const s=t.querySelector(i);return s&&s.getAttribute(e)||""}var p2=class extends Ps{get MZt(){return this.n4t}get y4t(){return this.A4t}set y4t(t){this.A4t=t}xa(){return _a(this)}er(t){t.id&&(this.hS=t.id),void 0!==t.skipOffset&&(this.ZYt=t.skipOffset),void 0!==t.width&&(this.sb=t.width),void 0!==t.height&&(this.hb=t.height),void 0!==t.duration&&(this.WA=t.duration),void 0!==t.readyState&&(this.c4t=function(t){return"ready"===t?v2.READY:v2.NONE}(t.readyState)),void 0!==t.resourceURI&&(this.g4t=t.resourceURI),void 0!==t.clickThrough&&(this.bYt=t.clickThrough),void 0!==t.companions&&(this.iYt=[...t.companions].map(m2)),void 0!==t.creativeId&&(this.XKt=t.creativeId),void 0!==t.universalAdIds&&(this.XYt=t.universalAdIds),void 0!==t.customData&&(this.$3t=t.customData)}constructor(t,i,e){super(e,function(t){return"linear"===t?bi.hZt:"nonlinear"===t?bi.a4t:bi.pk}(i.type)),this.n4t=void 0,this.A4t=0,this.n4t=t,this.er(i)}};function m2(t){const i={lYt:t.adSlotId,wYt:t.altText,p4t:t.contentHTML,qT:void 0,AYt:t.clickThrough,Mi:t.height,LJt:t.resourceURI,Ti:t.width};return new _2(i)}r();var da=class extends du{xa(){return new w2(this.Int.wnt(),this.b4t)}get b4t(){return this.S4t}constructor(t,i){super("T4t",t),this.S4t=void 0,this.S4t=i}},w2=class extends vu{constructor(t,i){super("adskip",t),this.playedPercentage=void 0,this.playedPercentage=i}};r();var y2=class extends Gt{xa(){return new A2(this.od.wnt())}constructor(t){super("k4t",t)}},A2=class extends Re{constructor(t){super("updateadbreak",t)}};r();var b2=class extends Gt{xa(){return new S2(this.od.wnt())}constructor(t){super("E4t",t)}},S2=class extends Re{constructor(t){super("adbreakchange",t)}};r();var _s=class extends du{xa(){return new T2(this.Int.wnt(),this.currentTime)}constructor(t,i){super("P4t",t),this.currentTime=void 0,this.currentTime=i}},T2=class extends vu{constructor(t,i){super("adfirstquartile",t),this.currentTime=void 0,this.currentTime=i}};r();var ks=class extends du{xa(){return new k2(this.Int.wnt(),this.currentTime)}constructor(t,i){super("x4t",t),this.currentTime=void 0,this.currentTime=i}},k2=class extends vu{constructor(t,i){super("admidpoint",t),this.currentTime=void 0,this.currentTime=i}};r();var oe=class extends du{xa(){return new E2(this.Int.wnt(),this.currentTime)}constructor(t,i){super("I4t",t),this.currentTime=void 0,this.currentTime=i}},E2=class extends vu{constructor(t,i){super("adthirdquartile",t),this.ad=void 0,this.currentTime=void 0,this.ad=t,this.currentTime=i}},P2=class{get Jc(){return this.qc}get A0t(){return this.X0t}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get integration(){return t.MZt},get ads(){return t.Jc.map(t=>t.wnt())},get adBreaks(){return t.A0t.map(t=>t.wnt())},createAd:(i,e)=>t.R4t(i,e?t.C4t(e):void 0).wnt(),updateAd(i,e){t.D4t(t.B4t(i),e)},updateAdProgress(i,e){const s=ur(Number(e),0,1);t.N4t(t.B4t(i),s)},beginAd(i){t.o4t(t.B4t(i))},endAd(i){t.M4t(t.B4t(i))},skipAd(i){t.p$t(t.B4t(i))},removeAd(i){t.s4t(t.B4t(i))},createAdBreak:i=>t.L4t(i).wnt(),updateAdBreak(i,e){t.O4t(t.C4t(i),e)},removeAdBreak(i){t.F4t(t.C4t(i))},removeAllAds(){t.U4t()},error(i){t.V4t(i)},fatalError(i,e){const s=e?Number(e):void 0;t.H4t(i,s)}}}(this)}get rB(){return this.h8}set rB(t){this.h8=t}get G3t(){return this.W4t.some(t=>t.l4t===bi.hZt)}get C3t(){return this.MZt}get mnt(){return this.W4t}get ynt(){var t;return null!=(t=this.G0t)?t:null}get Ant(){return De(this.X0t,t=>t.Ant)}get bnt(){return this.X0t.filter(t=>!t._x)}rD(){var t;if(0===this.W4t.length)return;const i=this.W4t[0];(null==(t=this.h8)?void 0:t.skipAd)?this.h8.skipAd(i.wnt()):this.p$t(i)}Snt(t){}knt(t){}R4t(t,i){var e;const s=null!=i?i:this.q4t({timeOffset:null!=(e=t.timeOffset)?e:0}),n=new p2(this.MZt,t,s);return s.e4t(n),this.qc.push(n),this.M3t.So(new Qa(n)),n}D4t(t,i){t.er(i),this.M3t.So(new T1(t))}N4t(t,i){if(!pi(this.W4t,t))throw new m("Cannot update ad progress on a non-started ad");const e=t.y4t,s=_.max(e,i);t.y4t=s;const n=this.Q3t.LP();e<.25&&s>=.25&&this.M3t.So(new _s(t,n)),e<.5&&s>=.5&&this.M3t.So(new ks(t,n)),e<.75&&s>=.75&&this.M3t.So(new oe(t,n))}o4t(t){pi(this.W4t,t)||(this.W4t.push(t),t.od.o4t(t),this.z4t(t.od),this.M3t.So(new dc(t,this.Q3t.LP())))}p$t(t){if(!pi(this.W4t,t))return;const i=t.od.h4t(t);this.M3t.So(new da(t,t.y4t)),this.G4t(t,i)}M4t(t){if(!pi(this.W4t,t))return;const i=t.od.h4t(t);this.M3t.So(new bc(t,this.Q3t.LP())),this.G4t(t,i)}s4t(t){if(!pi(this.qc,t))return;const i=t.od.h4t(t);oi(this.qc,t),t.od.s4t(t),this.M3t.So(new b2(t.od)),this.G4t(t,i)}L4t(t){const i=new f2(this.MZt,t);return this.X0t.push(i),this.M3t.So(new nU(i)),i}O4t(t,i){t.er(i),this.M3t.So(new y2(t))}F4t(t){if(pi(this.X0t,t)){for(const i of t.Jc.slice())this.s4t(i);oi(this.X0t,t),this.M3t.So(new Uu(t))}}U4t(){for(const t of this.X0t.slice())this.F4t(t)}V4t(t){this.M3t.So(new Pa(Ic.GENERAL,t.message))}H4t(t,i){const e=new Ga(null!=i?i:Vo.AD_ERROR,t.message,t);this.Q3t.qq(e)}X4t(t){return Jr(this.X0t,i=>i._Ot===t)}q4t(t){var i;return null!=(i=this.X4t(t.timeOffset))?i:this.L4t(t)}G4t(t,i){oi(this.W4t,t);const e=t.od;0!==this.W4t.length||this.G0t!==e||i||(e.t4t(),this.z4t(void 0))}z4t(t){this.G0t!==t&&(void 0!==this.G0t&&this.M3t.So(new Fa(this.G0t)),this.G0t=t,void 0!==t&&this.M3t.So(new aU(t)))}B4t(t){const i=Jr(this.qc,i=>i.wnt()===t);if(void 0===i)throw new m('Invalid ad for integration "'+this.MZt+'"');return i}C4t(t){const i=Jr(this.X0t,i=>i.wnt()===t);if(void 0===i)throw new m('Invalid ad break for integration "'+this.MZt+'"');return i}async Ta(t,i){var e;if(ii(i),null==(e=this.h8)?void 0:e.setSource){let i=await Promise.resolve(this.h8.setSource(t));return qo(i)&&(i=t),Cn(i,this.Q3t.Cd)}return t}async j4t(){var t;(null==(t=this.h8)?void 0:t.resetSource)?await Promise.resolve(this.h8.resetSource()):this.U4t()}async kn(){var t;(null==(t=this.h8)?void 0:t.destroy)&&await Promise.resolve(this.h8.destroy()).catch(Ct),this.U4t(),this.z4t(void 0),this.h8=void 0,this.M3t.kn()}constructor(t,i){this.MZt=void 0,this.Q3t=void 0,this.h8=void 0,this.M3t=new Sc,this.qc=[],this.X0t=[],this.W4t=[],this.G0t=void 0,this.hu=void 0,this.MZt=t,this.Q3t=i}};r();var x2=class{destroy(){this.removeAdListeners()}get player(){return this.oa}set player(t){this.oa&&this.removeAdListeners(),this.oa=t,this.addAdListeners()}get inAdBreak(){return this.Q4t}addAdListeners(){var t,i;null==(t=this.oa.Jc)||t.wn("Dnt",this.Ed),null==(i=this.oa.Jc)||i.wn("Cnt",this.Bd)}removeAdListeners(){var t,i;null==(t=this.oa.Jc)||t.mn("Dnt",this.Ed),null==(i=this.oa.Jc)||i.mn("Cnt",this.Bd)}constructor(t){this.oa=void 0,this.J8=void 0,this.Q4t=!1,this.Ed=t=>{1!==this.oa.ux&&(this.J8=this.oa.ux,this.oa.ux=1),this.Q4t=!0},this.Bd=t=>{this.Q4t=!1,void 0!==this.J8&&(this.oa.ux=this.J8,this.J8=void 0)},this.oa=t,this.addAdListeners()}},I2=class extends In{Zst(){return this.K4t}get Y4t(){return this.J4t}qx(){this.d3t.qx(),this.K4t.qx()}Gx(){void 0===this.JW?(void 0!==this.Z4t&&this.$4t(this.Z4t),super.Gx()):this.So(new Pi(this.JW))}async Ta(t,i){ii(i);let e=t;if(e)for(const t of this.t5t)e=await t.Ta(e,i);if(await super.Ta(e,i),ii(i),null==e?void 0:e.ads){const t=Boolean(e.blockContentIfAdError);this.K4t.K3t(e.playAdsAfterTime);for(const i of e.ads)this.K4t.M6(i,iu.pnt,t)}}async Xx(){this.JW=void 0,this.Lz=void 0,await this.K4t.hr(),this.i3t(),await super.Xx();for(const t of this.t5t)await t.j4t()}$4t(t){this.i5t=this.oa.ux;const i=this.oa.Mx,e=this.oa.$P;t.Ox(i),t.ix(e),this.J4t=t,this.Z4t=void 0,this.tO(t)}j3t(t){void 0===this.J4t&&(this.Z4t=t)}i3t(){this.Z4t=void 0,void 0!==this.J4t&&(this.d3t.ux=this.i5t,this.d3t.Mx=this.Mx,this.d3t.$P=this.$P,this.tO(this.d3t),this.J4t=void 0)}HP(){var t;return null!=(t=this.Lz)?t:super.HP()}qP(){var t;return null!=(t=this.JW)?t:super.qP()}qq(t){void 0===this.qP()&&(this.JW=t,this.Lz=P(t),this.So(new Pi(t)))}$x(t){return void 0===this.J4t&&this.K4t.F3t(t)}Tnt(t,i){try{const e=new P2(t,this);e.rB=i(e.Ca),this.K4t.Ent(e),this.t5t.push(e),t!==ru.UPLYNK&&(this.e5t=new x2(this))}catch(i){this.K4t.So(new Pa(Ic.GENERAL,'Error while constructing ad integration "'+t+'": '+i+'"'))}}vx(t){var i;(null==(i=this.e5t)?void 0:i.inAdBreak)||super.vx(t)}async kn(){var t;for(const t of this.t5t)await t.kn().catch(Ct);await this.K4t.kn(),this.i3t(),null==(t=this.e5t)||t.destroy(),this.e5t=void 0,await super.kn()}constructor(t,i){super(t),this.K4t=void 0,this.d3t=void 0,this.t5t=[],this.J4t=void 0,this.Z4t=void 0,this.JW=void 0,this.Lz=void 0,this.e5t=void 0,this.i5t=1,this.d3t=t,this.K4t=new l2(this),this.K4t.W3t.k3t(i,t,this,t.Cd)}};Pu(t=>new I2(t,Qh.Ng),HF.rnt),r(),r(),r();var R2=Qt.ru&&Qt.Q_<12,C2=class extends Oc{get MP(){return this.LP()}set MP(t){this.OP(t)}Hst(){return this.oa.Hst()}get ct(){return this.Nd()}get zP(){return this.ZL}get jP(){return this.JL}get Sx(){return this.Tx()}get Fx(){return this.rq}get M3t(){return this.s5t}get ht(){return this.YL}get G3t(){return this.Q3t.Y4t===this}RP(){return ve.iL()._s()}DP(){}BP(t){}lx(){return 1}vx(t){}gx(){return new ve([0,this.MP])._s()}Ex(){return!1}Ix(){return this.Gl}Dx(){return this.$L}ds(){return this.Hx().ds}Hx(){return this.ha}Ea(){}async kn(){this.Vo(),this.YL.kn(),this.$L.kn(),this.Gl.kn(),this.s5t.kn(),this.oa.mn(d.xw,this.Rs)}n5t(){R2&&this.r5t(),this.G3t||this.Q3t.$4t(this)}i3t(){this.G3t&&(R2&&this.h5t(),Qt.Tg&&this.xe.querySelectorAll("video[src]").forEach(t=>{t.src=""}),zd.Zs.Ep&&this.oa.Jx(),this.Q3t.i3t())}r5t(){this.o5t||(s.addEventListener("blur",this.a5t),s.addEventListener("focus",this.u5t),this.o5t=!0)}h5t(){s.removeEventListener("blur",this.a5t),s.removeEventListener("focus",this.u5t),this.o5t=!1}c5t(){requestAnimationFrame(()=>this.oa.we())}constructor(t,i){super(t,!0),this.Q3t=void 0,this.o5t=void 0,this.$L=void 0,this.YL=void 0,this.Gl=void 0,this.ZL=void 0,this.JL=void 0,this.s5t=void 0,this.ha=void 0,this.rq=void 0,this.a5t=void 0,this.u5t=void 0,this.Q3t=i,this.o5t=!1,this.$L=new rs,this.YL=new rs,this.Gl=new cc,this.ZL=new kS,this.JL=new Ek,this.s5t=new Sc,this.ha=new ls,this.rq=new XI,this.a5t=()=>{this.oa.be()},this.u5t=()=>{this.c5t()},this.oa.wn(d.xw,this.Rs)}};r(),r();var D2=0,B2="theoplayer-wrapper",N2=class t{get d5t(){return this.l5t}get f5t(){return this.v5t}get _5t(){return 1===this.v5t.length&&F0(this.v5t[0].sources.type)}get g5t(){return this.p5t}m5t(t){const i=this.w5t===t.timeOffset;return!this.y5t&&i}get A5t(){return this.b5t}get S5t(){return H0(this.T5t)&&!this.y5t}get w5t(){return this.T5t}get dd(){return this.k5t}E5t(){if(S(this.k5t)){let t=this.w5t;if(void 0===t)return void(this.k5t=0);if("string"==typeof t&&H0(t)){const i=this.oa.Nd();S(i)||i===1/0||(t=U$(t)*i)}S(t)||(this.k5t=t)}}get P5t(){return this.x5t}set P5t(t){this.x5t=t}get I5t(){return this.R5t}set I5t(t){this.R5t=t,this.C5t=!1}get D5t(){return this.B5t}N5t(t){this.B5t.push(t)}M5t(){if(!this.y5t){let t,i,e=this.l5t===iu.pnt&&void 0===this.L5t&&1===this.v5t.length;const s=this.v5t[0];if(!e&&1===this.v5t.length){const t=zd.Dh(s.sources.src).searchParams.get("output");t&&t.toLowerCase().indexOf("vmap")>-1&&(e=!0,void 0!==this.L5t&&Ye("Do not set a timeOffset for VMAP ad sources. VMAP ads have their own offsets included."))}if(F0(s.sources.type)||e)t=s.sources.src;else{if(S(this.oa.Nd())&&"end"===this.O5t())return;i=this.F5t()}let n=this.oa.Nd();(S(n)||n===1/0)&&(n=-3),this.y5t={U5t:this.oa.xe.offsetWidth,V5t:this.oa.xe.offsetHeight,H5t:this.oa.xe.offsetWidth,W5t:this.oa.xe.offsetHeight,q5t:this.Bst,z5t:this.Tz,G5t:t,X5t:i,j5t:s.omidAccessModeRules,Q5t:n}}return this.y5t}F5t(){return''+this.v5t.map((t,i)=>this.K5t(t.sources,i)).join("\n")+""}K5t(t,i){const e=this.O5t(),s=t.src;return'"}O5t(){if(0===this.w5t)return"start";if(this.w5t===1/0)return"end";const t=this.w5t;if("string"==typeof t&&H0(t)){const i=U$(t)*this.oa.Nd();return Ha.DZt(i)}return Ha.DZt(this.w5t||0)}Y5t(t){this.v5t.push(t)}J5t(t){const i=B2+"-"+this.jI+"-";for(const e of t)if(Vh(e,i)){const t=Number(e.slice(i.length));if(!S(t)&&t>=0&&tt.dd&&this.t6t.dd!==t.dd}r6t(t){if(t.length)return t.sort((t,i)=>t.dd-i.dd)[0]}h6t(){if(this.Ant.length)return this.r6t(this.o6t(this.t.LP()))}a6t(){if(!(void 0!==this.s6t&&this.s6t>=0))return this.Ant.filter(t=>!t.P5t&&0===t.dd&&t!==this.t6t)[0]}o6t(t){if(!this.u6t&&(this.u6t=!this.Ant.some(t=>S(t.dd)),!this.u6t))return[];const i=this.Ant.filter(i=>!i.P5t&&(i._5t||!S(i.dd)&&t<=i.dd));return void 0===this.s6t?i:i.filter(t=>t._5t||void 0===t.w5t||t.dd>this.s6t)}constructor(t){this.i6t=void 0,this.s6t=void 0,this.u6t=!1,this.i6t=t,this.s6t=void 0}},L2=function(t){return t[t.c6t=0]="c6t",t[t.d6t=1]="d6t",t[t.l6t=2]="l6t",t}({}),O2=class{qx(){this.ko=!0,this.f6t&&this.v6t()}_6t(t,i){this.g6t(t,i);const e=Jr(this.Ant,i=>i.m5t(t));if(e)e.Y5t(t);else{var s;const e=new N2(t,i,this.oa,null==(s=t.replaceContent)||s);this.r4t.push(e),2===this.p6t&&this.m6t.L4t(e.dd,e,e.w5t),this.w6t(i,e)}}get e6t(){return this.y6t}get Ant(){return this.r4t}get t(){return this.oa}get RGt(){return Boolean(this.Dpt)}get p6t(){return this.A6t}b6t(){if(oi(this.Ant,this.t6t),this.t6t){for(const t of this.t6t.D5t)this.m6t.S6t();this.t6t=void 0}}T6t(){for(const t of this.r4t)for(const i of t.D5t)this.m6t.k6t(i,!0);Yo(this.r4t)}async E6t(t){this.b6t(),this.P6t=!0,this.t6t=t,this.x6t=t.dd,this.Dpt=this.I6t(t),await this.Dpt,this.Dpt=void 0}async I6t(t){await this.R6t(t);const i=t.M5t();if(!i)return this.P6t=!1,void(this.t6t=void 0);const e=this.y6t.C6t(i);t.P5t=!0;try{await e,t.d5t===iu.gnt&&this.y6t.D6t()}catch(t){0,this.t6t=void 0,await this.v6t()}}async R6t(t){if(t.$P=this.Q3t.$P,!this.Q3t.cO)return void(t.cO=!1);switch(await this.Mst.HK(this.Q3t.$P)){case"all":case"muted":t.cO=!0;break;case"none":t.cO=!1}}B6t(){var t;return null!=(t=this.N6t.a6t())?t:this.N6t.h6t()}async v6t(){if(this.t6t&&!this.t6t.A5t)return this.Dpt;const t=this.B6t();t&&await this.E6t(t)}get t6t(){return this.M6t}set t6t(t){this.M6t=t}get P6t(){return this.L6t}set P6t(t){this.L6t=t}hr(){this.b6t(),Yo(this.r4t),this.x6t=0,this.t6t=void 0,this.Dpt=void 0,this.P6t=!1}I5t(){this.P6t=!1,this.t6t&&(this.t6t.I5t=!0)}async w6t(t,i){t===iu.gnt&&this.ko&&this.N6t.n6t(i)&&!this.RGt&&"linear"!==this.y6t.l4t&&(!this.t6t||this.t6t&&this.t6t.P5t)&&(await Promise.resolve(),await this.E6t(i))}$5t(){this.t6t&&this.t6t.$5t()}get O6t(){if(this.RGt||this.P6t)return!1;if(this.t6t&&!this.t6t.A5t)return!1;return!!this.r4t.filter(t=>this.t6t!==t).length&&Boolean(this.B6t())}async F6t(){if(!this.O6t)return void 0;const t=this.B6t();t&&await this.E6t(t)}g6t(t,i){const e=t.sources.type,s=i===iu.pnt&&void 0===t.timeOffset,n=F0(e)||s?1:2;n!==this.A6t&&(this.A6t=n,this.T6t(),this.y6t.w0t&&!this.RGt&&"linear"!==this.y6t.l4t&&(this.y6t.w0t.zg(),this.t6t=void 0,this.Dpt=void 0),this.x6t=0,this.f6t=!0)}K3t(t){this.N6t.K3t(t)}kn(){this.oa.mn(d.Rw,this.uX)}constructor(t,i,e,s,n){this.y6t=void 0,this.r4t=void 0,this.f6t=void 0,this.ko=void 0,this.oa=void 0,this.Q3t=void 0,this.M6t=void 0,this.x6t=void 0,this.N6t=void 0,this.Mst=void 0,this.A6t=0,this.Dpt=void 0,this.m6t=void 0,this.L6t=!1,this.uX=()=>{const t=this.r4t.filter(t=>t.S5t);for(const i of t){i.E5t();const t=i.w5t;this.m6t.U6t(t,i.dd)}this.ko&&this.O6t&&this.v6t()},this.r4t=[],this.y6t=t,this.ko=!1,this.f6t=!1,this.oa=i,this.Q3t=e,this.t6t=void 0,this.x6t=0,this.N6t=new M2(this),this.Mst=s,this.m6t=n,this.oa.wn(d.Rw,this.uX)}};r(),r();var Ce=function(t){return t.V6t="contentResumeRequested",t.H6t="contentPauseRequested",t.W6t="click",t.Rw="durationChange",t.q6t="expandedChanged",t.z6t="start",t.G6t="impression",t.Gz="pause",t.X6t="resume",t.j6t="adProgress",t.Q6t="adBuffering",t.K6t="firstQuartile",t.mJt="midpoint",t.Y6t="thirdQuartile",t.wJt="complete",t.J6t="userClose",t.Z6t="linearChanged",t.$6t="loaded",t.t8t="adCanPlay",t.i8t="adMetadata",t.e8t="adBreakReady",t.s8t="interaction",t.n8t="allAdsCompleted",t.r8t="skip",t.h8t="skippableStateChanged",t.o8t="log",t.a8t="viewableImpression",t.u8t="volumeChange",t.c8t="mute",t}({});r();var F2=function(t){return t.d8t="adError",t}({});r();var jn=function(t){return t[t.l8t=-1]="l8t",t[t.f8t=-1]="f8t",t[t.v8t=-1]="v8t",t[t._8t=101]="_8t",t[t.g8t=102]="g8t",t[t.p8t=200]="p8t",t[t.m8t=201]="m8t",t[t.w8t=202]="w8t",t[t.y8t=300]="y8t",t[t.A8t=301]="A8t",t[t.b8t=302]="b8t",t[t.S8t=303]="S8t",t[t.T8t=400]="T8t",t[t.k8t=402]="k8t",t[t.E8t=403]="E8t",t[t.P8t=405]="P8t",t[t.x8t=500]="x8t",t[t.I8t=501]="I8t",t[t.R8t=-1]="R8t",t[t.C8t=503]="C8t",t[t.D8t=602]="D8t",t[t.B8t=900]="B8t",t[t.N8t=901]="N8t",t[t.M8t=1005]="M8t",t[t.L8t=1007]="L8t",t[t.O8t=1009]="O8t",t[t.F8t=1010]="F8t",t[t.U8t=1011]="U8t",t[t.V8t=1012]="V8t",t[t.H8t=1013]="H8t",t[t.W8t=1020]="W8t",t[t.q8t=1021]="q8t",t[t.z8t=1101]="z8t",t[t.G8t=1204]="G8t",t[t.X8t=1205]="X8t",t[t.j8t=1300]="j8t",t[t.Q8t=-1]="Q8t",t[t.K8t=-1]="K8t",t[t.Y8t=-1]="Y8t",t[t.J8t=-1]="J8t",t}({}),U2=function(t){return t.Z8t="adLoadError",t.$8t="adPlayError",t}({});function V2(t,i){if(t===Ce.j6t){const t=i;return{t7t:t.adBreakDuration,i7t:t.adPosition,MP:t.currentTime,ct:t.duration,e7t:t.totalAds}}return i}function H2(t){switch(t){case google.ima.AdError.Type.AD_LOAD:return U2.Z8t;case google.ima.AdError.Type.AD_PLAY:return U2.$8t}}function W2(t){return Lu(t)&&Qd(t.getVastErrorCode)}function q2(t){const i=t.getInnerError(),e=i&&W2(i)?q2(i):void 0;return{Py:t.getMessage(),YJt:t.getErrorCode(),s7t:t.getVastErrorCode(),Km:H2(t.getType()),n7t:e}}function z2(t){if(it(t))return t}r(),r();var G2=class extends Ne{r7t(t){this.y6t.So(t)}h7t(t){this.y0t=t,this.y0t.wn(F2.d8t,this.o7t),this.y0t.wn(Ce.H6t,this.a7t),this.y0t.wn(Ce.V6t,this.u7t),this.y0t.wn(Ce.n8t,this.c7t),this.y0t.wn(Ce.z6t,this.d7t),this.y0t.wn(Ce.wJt,this.l7t),this.y0t.wn(Ce.r8t,this.f7t),this.y0t.wn(Ce.J6t,this.v7t),this.y0t.wn(Ce.W6t,this._7t),this.y0t.wn(Ce.t8t,this.g7t),this.y0t.wn(Ce.Gz,()=>{this.y6t.hx||(this.y6t.p7t(!0),this.y6t.So(new hl(this.y6t.MP))),this.m7t(!0)}),this.y0t.wn(Ce.X6t,()=>{this.y6t.hx&&(this.y6t.p7t(!1),this.y6t.So(new Tc(this.y6t.MP)))}),this.y0t.wn(Ce.c8t,()=>{const i=t.Lx();i>=0&&this.w7t(i)}),this.y0t.wn(Ce.u8t,()=>{const i=t.Lx();i>=0&&this.w7t(i)}),this.y0t.wn(Ce.i8t,t=>{this.A7t.y7t(t.type)}),this.y0t.wn(Ce.Rw,t=>{t.Int&&this.b7t(t.Int.ct)}),this.y0t.wn(Ce.o8t,async t=>{const i=t.S7t.adError,e=W2(i)?q2(i):void 0;e&&(this.T7t(e)?await this.k7t(t):this.E7t(e)?await this.P7t(e):this.x7t(e)&&this.I7t(e))}),this.y0t.wn(Ce.$6t,t=>{if(t.Int&&(this.y6t.I5t(),this.A7t.R7t(t.Int),this.C7t=0,t.Int.D7t)){var i;const t=this.y6t.Ax,e=mh.VL;this.y6t.i5(e);const s=this.y6t.MP,n=this.y6t.Ax;n!==t&&this.r7t(new G(s,n)),null==(i=this.y0t)||i.Ox(this.y6t.B7t()),this.r7t(new ut(s,e))}}),this.y0t.wn([Ce.Q6t,Ce.G6t,Ce.K6t,Ce.mJt,Ce.Y6t],t=>{t.Int&&this.A7t.N7t(t.Int,t.type,this.y6t.MP)}),this.y0t.wn(Ce.K6t,this.M7t),this.y0t.wn(Ce.j6t,this.L7t)}async switchToPlayerIfNoNextAd(){if(this.y0t){const t=this.y0t.O7t();t&&this.F7t(t)||(this.y6t.O6t()?await this.y6t.F6t():(this.y6t.U7t(),this.oa.hx&&!this.oa.UP&&this.oa.Gx()))}else if(this.y6t.O6t())await this.y6t.F6t();else{const t=this.y6t.hx;this.y6t.U7t(),t||this.oa.Gx()}}F7t(t){const i=t.V7t,e=null==i?void 0:i.e7t;return(null==i?void 0:i.i7t)!==e}vm(){this.y6t.Dc&&(p(this.y6t.Dc),this.y6t.Dc=null)}x7t(t){return t.Km===U2.Z8t}E7t(t){return t.Km===U2.$8t}T7t(t){return t.YJt===jn.O8t}async P7t(t){var i;(this.I7t(t),this.H7t(t))&&(this.y6t.W7t.P6t=!1,null==(i=this.y6t.W7t.t6t)||i.$5t(),await this.switchToPlayerIfNoNextAd())}H7t(t){var i;if(X2(t))return!0;if(this.y6t.Unt)return!1;const e=[jn.T8t,jn.N8t,jn.q8t,jn.X8t];return!(pi(e,t.YJt)||pi(e,null==(i=t.n7t)?void 0:i.YJt))}I7t(t){this.y6t.V4t(t)}async q7t(){this.A7t.S6t(),this.y6t.$5t(),"nonlinear"===this.y6t.l4t&&(this.A7t.z7t(-1,!1),this.y6t.G7t(void 0)),"nonlinear"!==this.y6t.l4t&&"none"!==this.y6t.l4t||this.y6t.O6t()&&await this.y6t.F6t(),this.y6t.X7t(),this.y6t.G3t?this.y6t.i3t():this.j7t()&&this.oa.So(new At(this.oa.LP()))}j7t(){return this.y6t.Q7t&&!this.y6t.K7t&&this.oa.UP}setCountdownTimer(){this.vm(),this.y6t.Dc=v(()=>this.m7t(),250)}async k7t(t){void 0!==t.Int&&(this.y6t.W7t.P6t=!1,this.y6t.$5t(),this.y6t.O6t()?await this.y6t.F6t():this.y6t.p7t(!0))}b7t(t){this.y6t.ct!==t&&t>=0&&(this.y6t.C4(t),this.r7t(new Rs(this.y6t.ct)))}w7t(t){this.y6t.B7t()!==t&&(0===t?this.y6t.Y7t(t,!0,!1):this.y6t.Y7t(t,!1,!1))}async J7t(){this.y6t.Z7t&&void 0!==this.oa.HP()&&(this.$7t=new at,await $e(this.oa.Ta(this.oa.nu(),this.$7t.Yg),this.$7t),this.t9t&&this.oa.OP(this.t9t),this.t9t=void 0)}m7t(t){if(this.y0t){const t=this.y0t.i9t();t>this.y6t.ct&&this.b7t(_.round(t))}const i=this.y6t.MP;(t||!this.y6t.hx&&i!==this.y6t.e9t)&&(this.y6t.So(new Si(i,void 0)),this.y6t.e9t=i)}hr(){this.$7t&&(this.$7t.Zg(),this.$7t=void 0),this.s9t=!1,this.C7t=0}kn(){this.hr(),this.Vo()}constructor(t,i,e){super(),this.y6t=void 0,this.oa=void 0,this.A7t=void 0,this.s9t=void 0,this.$7t=void 0,this.t9t=void 0,this.y0t=void 0,this.C7t=void 0,this.M7t=void 0,this.L7t=void 0,this.o7t=void 0,this.c7t=void 0,this.d7t=void 0,this.l7t=void 0,this.f7t=void 0,this.v7t=void 0,this._7t=void 0,this.g7t=void 0,this.a7t=void 0,this.u7t=void 0,this.y6t=t,this.oa=i,this.A7t=e,this.s9t=!1,this.$7t=void 0,this.t9t=void 0,this.C7t=0,this.M7t=t=>{if(!t.Int||!t.Int.V7t)return;const i=t.Int.V7t;this.A7t.O4t(i._Ot,i.e7t,i.p0t)},this.L7t=t=>{var i,e,s;if(this.C7t>=5)return;this.C7t++;const n=t.S7t;if(!function(t){return Lu(t)&&void 0!==t.t7t&&void 0!==t.e7t}(n))return;const r=null==(s=this.y0t)||null==(e=s.O7t())||null==(i=e.V7t)?void 0:i._Ot;void 0!==r&&this.A7t.O4t(r,n.e7t,n.t7t)},this.o7t=async t=>{t.S7t.n9t&&await this.P7t(t.S7t.n9t)},this.c7t=async()=>{this.s9t=!0,this.y6t.$5t(),await this.u7t()},this.d7t=t=>{if(!t.Int)return;const i=t.Int;this.y6t.G7t(i),this.y6t.be(),this.y6t.r9t(),this.y6t.h9t=!0,this.A7t.o9t(i);const e=i.ct;if(this.b7t(e),i.D7t){const t=this.y6t.MP,i=this.y6t.Ax;this.y6t.i5(mh.WL),this.r7t(new ot(t,i)),this.r7t(new lo(t,i)),this.r7t(new qt(t,i)),this.y6t.hx||this.r7t(new ce(this.y6t.MP)),this.setCountdownTimer(),this.m7t(!0)}else this.y6t.i3t(),this.oa.be(),this.y6t.hx||this.oa.Gx()},this.l7t=t=>{var i;if(!t.Int)return;const e=t.Int;if(this.vm(),this.A7t.z7t(this.y6t.ct,e.D7t),this.y6t.Ax!==mh.VL){const t=mh.VL;this.y6t.i5(t);const i=this.y6t.MP;this.r7t(new G(i,t))}this.b7t(NaN),this.y6t.h9t=!1,null==(i=this.y0t)||i.Ox(this.y6t.B7t())},this.f7t=t=>{t.Int&&(this.l7t(t),this.A7t.f7t(t.Int,this.y6t.MP,this.y6t.ct))},this.v7t=t=>{t.Int&&(this.A7t.z7t(-1,t.Int.D7t),this.y6t.$5t(),!t.Int.D7t&&this.y6t.O6t()&&this.y6t.F6t())},this._7t=t=>{t.Int&&(t.Int.D7t?this.y6t.zx():this.oa.zx())},this.g7t=()=>{var t;(this.y6t.h9t=!0,this.y6t.a9t)&&(null==(t=this.y0t)||t.zx(),this.y6t.a9t=!1)},this.a7t=t=>{var i;if(!t.Int)return;this.y6t.Z7t&&(this.t9t=this.oa.LP(),this.oa.Yx(),this.oa.Vx=!0),this.y6t.u9t=!0;const e=t.Int;this.A7t.Ed(e);const s=e.ct;this.y6t.G7t(e),this.b7t(s),this.y6t.p7t(!1),this.y6t.be(),this.y6t.n5t(),this.y6t.Z7t||this.oa.we(),this.oa.zx(),this.y6t.c9t(e);0===(null==(i=e.V7t)?void 0:i._Ot)||this.y6t.So(new ux(this.y6t.MP))},this.u7t=async t=>{const i=null==t?void 0:t.Int;this.y6t.u9t=!1,"linear"===this.y6t.l4t&&this.A7t.Bd(),i&&i.ct>=0&&this.b7t(i.ct),this.oa.Nd()===1/0&&this.y6t.d9t(),this.y6t.h9t=!1,this.s9t&&await this.q7t(),this.y6t.p7t(!0);try{await this.J7t()}catch(t){return void(D(t)||this.So(new HZ(t)))}if(this.y6t.i3t(),this.y6t.we(),this.oa.UP||this.oa.Gx(),i&&this.y6t.G7t(i),this.y6t.Q7t){if(this.y6t.Z7t){var e;const t=this.oa.Wx(),i=null==(e=this.oa.bt)?void 0:e.src;t&&i&&(t.src=i)}this.y6t.K7t=!0}this.oa.Vx=!1,this.y6t.O6t()&&await this.y6t.F6t()}}};function X2(t){var i,e;return t.s7t===jn.S8t||(null==(i=t.n7t)?void 0:i.s7t)===jn.S8t||t.YJt===jn.O8t||(null==(e=t.n7t)?void 0:e.YJt)===jn.O8t}r(),r();var j2=class extends Le{get MZt(){return mt.V0t}constructor(t,i,e){super(t),this.l9t=void 0,this.f9t=void 0,this.l9t=i,this.f9t=e}};r(),r(),r();var Q2=class extends Ps{set v9t(t){this._9t=t}get v9t(){return this._9t}get MZt(){return mt.so}N0t(){var t;return null==(t=this.g9t)?void 0:t.yKt}get p9t(){var t;return null==(t=this.g9t)?void 0:t.cYt}get GKt(){var t;return null==(t=this.g9t)?void 0:t.GKt}get dB(){var t;return null==(t=this.g9t)?void 0:t.dB}get dq(){var t;return null==(t=this.g9t)?void 0:t.dq}get m9t(){var t,i;return null!=(i=null==(t=this.g9t)?void 0:t.m9t)?i:[]}get w9t(){var t,i;return null!=(i=null==(t=this.g9t)?void 0:t.w9t)?i:[]}get y9t(){var t,i;return null!=(i=null==(t=this.g9t)?void 0:t.y9t)?i:[]}xa(){return function(t,i){return po(t,{bitrate:0,contentType:void 0,mediaUrl:void 0,traffickingParameters:void 0,traffickingParametersString:void 0,universalAdIds:[],get description(){return i.dB},get apiFramework(){return i.p9t},get creativeId(){return i.GKt},get title(){return i.dq},get wrapperAdIds(){return i.m9t},get wrapperAdSystems(){return i.w9t},get wrapperCreativeIds(){return i.y9t}})}(_a(this),this)}A9t(t){this.g9t=t;const i=K2(t);this.u4t(t.UYt,t.b9t,t.S9t,t.ct,i,-1)}constructor(t,i){super(t,i),this._9t=0,this.g9t=void 0}};function K2(t){return t.IKt.map(t=>new _2(t))}var Y2=class extends Ps{xa(){return function(t,i){return po(t,{get adSystem(){return i.N0t()},get apiFramework(){return i.p9t},get bitrate(){return i.T9t},get contentType(){return i.qT},get creativeId(){return i.GKt},get description(){return i.dB},get mediaUrl(){return i.tJt},get title(){return i.dq},get traffickingParameters(){return i.k9t},get traffickingParametersString(){return i.E9t},get wrapperAdIds(){return i.m9t},get wrapperAdSystems(){return i.w9t},get wrapperCreativeIds(){return i.y9t},get universalAdIds(){return i.CKt}})}(_a(this),this)}A9t(t){this.g9t=t,this.u4t(t.UYt,t.b9t,t.S9t,t.ct,K2(t),t.P9t),this.f4t=t.D7t?bi.hZt:bi.a4t}get MZt(){return mt.V0t}N0t(){return this.g9t?J2(this.g9t.yKt):void 0}get p9t(){return this.g9t?J2(this.g9t.cYt):void 0}get T9t(){return this.g9t?this.g9t.x9t:0}get qT(){return this.g9t?J2(this.g9t.qT):void 0}get GKt(){return this.g9t?J2(this.g9t.GKt):void 0}get I9t(){return this.g9t?J2(this.g9t.I9t):void 0}get dB(){var t;return null==(t=this.g9t)?void 0:t.dB}get tJt(){var t;const i=null==(t=this.g9t)?void 0:t.tJt;return it(i)?i:this.iJt}set tJt(t){this.iJt=t}get dq(){var t;return null==(t=this.g9t)?void 0:t.dq}get k9t(){return this.g9t?J2(this.g9t.k9t):void 0}get E9t(){return this.g9t?J2(this.g9t.E9t):void 0}get m9t(){var t,i;return null!=(i=null==(t=this.g9t)?void 0:t.m9t)?i:[]}get w9t(){var t,i;return null!=(i=null==(t=this.g9t)?void 0:t.w9t)?i:[]}get y9t(){var t,i;return null!=(i=null==(t=this.g9t)?void 0:t.y9t)?i:[]}get CKt(){var t,i;return null!=(i=null==(t=this.g9t)?void 0:t.CKt.map(t=>({adIdRegistry:t.R9t,adIdValue:t.C9t})))?i:[]}constructor(t){super(t,bi.pk),this.g9t=void 0,this.iJt=void 0}};function J2(t){return null===t?void 0:t}r(),r();var Z2=class{get M3t(){return this.A7t.M3t}get C3t(){return this.D9t}get G3t(){return this.A7t.G3t}get ynt(){var t;return null!=(t=this.A7t.ynt)?t:null}get mnt(){const t=this.A7t.B9t;return t?[t]:[]}get Ant(){return this.A7t.Ant}get bnt(){return this.A7t.bnt}knt(t){this.A7t.knt(t)}rD(){this.A7t.rD()}Snt(t){this.A7t.Snt(t)}kn(){return Promise.resolve()}constructor(t,i){this.A7t=void 0,this.D9t=void 0,this.A7t=t,this.D9t=i}},$2=class{get N9t(){return this.M9t}get M3t(){return this.s5t}get G3t(){return this.L9t}get B9t(){return this.M0t}get ynt(){return this.G0t}get Ant(){return De(this.X0t,t=>{if(t._x)return[];const i=t.Jc;if(t===this.G0t&&void 0!==this.M0t){const t=i.indexOf(this.M0t);if(t>=0)return i.slice(t+1)}return i})}get bnt(){return this.X0t.filter(t=>!t._x)}constructor(t,i){this.s5t=void 0,this.X0t=void 0,this.M0t=void 0,this.G0t=void 0,this.L9t=void 0,this.M9t=void 0,this.s5t=t,this.X0t=[],this.L9t=!1,this.M9t=new Z2(this,i)}};r();var t3=class extends du{xa(){return new i3(this.Int.wnt())}constructor(t){super("O9t",t)}},i3=class extends vu{constructor(t){super("adimpression",t)}};r();var e3=class extends Oi{xa(){return new s3(this.Int.wnt())}constructor(t){super("F9t"),this.Int=void 0,this.Int=t}},s3=class extends wp{constructor(t){super("adbuffering"),this.ad=void 0,this.ad=t}};r();var n3=class extends Oi{xa(){return new r3}constructor(){super("U9t")}},r3=class extends wp{constructor(){super("admetadata")}},h3=class t extends $2{V9t(t,i){for(let e=0;euh(i._Ot,t,.01))[0]}static j9t(t,i){if(i.V7t)return t.Jc[i.V7t.i7t-1]}Ed(t){if(!t.V7t)return;const i=t.V7t,e=this.X9t(i._Ot);e&&(Yo(this.G9t),this.H9t(e,t.D7t))}Bd(){this.ynt&&this.M3t.So(new Fa(this.ynt)),Yo(this.G9t),this.S6t()}o9t(i){if(!this.G0t&&i.V7t){const t=this.X9t(i.V7t._Ot);this.H9t(t,i.D7t)}if(this.G0t){const e=t.j9t(this.G0t,i);if(!e)return;this.D4t(this.G0t,i);const s=i.tJt;it(s)&&!it(e.tJt)&&(e.tJt=s,this.M3t.So(new T1(e))),this.q9t(e),this.M3t.So(new dc(this.M0t,e.od._Ot))}else 0}z7t(t,i){if(this.q9t(void 0),!i&&this.ynt){const t=this.ynt;this.H9t(void 0,!1),this.k6t(t)}}R7t(t){const i=t.V7t;if(!i)return;const e=this.X9t(i._Ot);if(!e)return;this.O4t(i._Ot,i.e7t,i.p0t);const s=this.D4t(e,t);s&&this.M3t.So(new E1(s))}O4t(t,i,e){const s=this.X9t(t);if(!s)return;const n=s.Jc.length;if(i>n){const t=i-n;this.V9t(t,s),s.p0t=e,this.M3t.So(new y2(s))}}f7t(i,e,s){if(!this.G0t)return;const n=t.j9t(this.G0t,i);if(n){const t=e/s;this.M3t.So(new da(n,t))}}N7t(i,e,s){if(!this.G0t)return;let n=this.M0t;if(!n){const s=t.j9t(this.G0t,i);if(!s||pi(this.z9t,s))return void this.G9t.push(e);n=s,this.D4t(this.G0t,i),this.q9t(n)}this.y7t(e,n,s)}y7t(t,i,e){t===Ce.i8t?this.M3t.So(new n3):t===Ce.G6t&&i?this.M3t.So(new t3(i)):t===Ce.Q6t&&i?this.M3t.So(new e3(i)):t===Ce.K6t&&i&&e?this.M3t.So(new _s(i,e)):t===Ce.mJt&&i&&e?this.M3t.So(new ks(i,e)):t===Ce.Y6t&&i&&e&&this.M3t.So(new oe(i,e))}rD(){this.W9t.rD()}knt(t){this.W9t.knt(t)}hr(){const t=Boolean(this.M0t&&this.M0t.l4t===bi.hZt);this.q9t(void 0),this.H9t(void 0,t);for(const t of this.X0t)this.k6t(t);Yo(this.X0t),Yo(this.G9t),Yo(this.z9t)}kn(){this.hr()}Snt(t){}constructor(t,i){super(t,mt.V0t),this.W9t=void 0,this.G9t=void 0,this.z9t=void 0,this.W9t=i,this.G9t=[],this.z9t=[]}};function o3(t){const i=s.google.ima.settings;t.ads&&t.ads.vpaidMode&&s.google.ima.settings.setVpaidMode(function(t){const i=s.google.ima.ImaSdkSettings.VpaidMode;switch(t){case jT.ENABLED:return i.ENABLED;case jT.INSECURE:return i.INSECURE;case jT.DISABLED:default:return i.DISABLED}}(t.ads.vpaidMode)),i.setPlayerVersion("10.0.0"),i.setPlayerType("THEOplayer"),i.setAutoPlayAdBreaks(!0),i.setDisableCustomPlaybackForIOS10Plus(!a3(t));const e=function(t){var i,e,s;const n=null==(e=t.ads)||null==(i=e.googleIma)?void 0:i.language;if(void 0!==n)return n;const r=null==(s=t.ui)?void 0:s.language;if(Z(r))return r;return}(t);e&&i.setLocale(e)}function a3(t){return Qt.ru&&t.allowNativeFullscreen}r();var u3=class t extends C2{get B3t(){return this.m6t.N9t}get Q9t(){return this.m6t}get W7t(){return this.i6t}get Z7t(){return a3(this.VJ)}K9t(t,i,e){i===iu.pnt&&void 0!==e&&(this.X3t=e),this.i6t._6t(t,i)}static get C3t(){return mt.V0t}get C3t(){return t.C3t}get Y9t(){return this.VJ.ads.preload===KT.MIDROLL_AND_POSTROLL}knt(t){const i=this.J9t();for(const e of i)V$(e.sources,e.timeOffset)||t.M6(e,iu.gnt,!1)}J9t(){const t=[],{mnt:i,Ant:e}=this.B3t,s=[];for(const n of i.concat(e)){const i=n.od.f9t;if(pi(s,i.jI))continue;const e=i.J5t(n.m9t);e>=0?t.push(...i.f5t.slice(e)):t.push(...i.f5t),s.push(i.jI)}for(const i of this.i6t.Ant)i.P5t||t.push(...i.f5t);return Bo(t)}set l4t(t){this.f4t=t}get l4t(){return this.f4t}get w0t(){return this.y0t}set w0t(t){this.y0t=t,this.Z9t=!1}LP(){if(!this.w0t)return 0;const t=this.w0t.i9t();return S(this.ct)||t<0?0:this.ct-t}OP(t,i){}Nd(){return this.WA||NaN}C4(t){this.WA=t}tx(){return this.oa.$P}ix(t){this.Y7t(this.Mx,t,!0)}ox(){return this.kz}p7t(t){this.kz=t}get h9t(){return this.$9t}set h9t(t){this.$9t=t}get Unt(){return this.X3t}get Q7t(){return this.tti}get a9t(){return this.iti}set a9t(t){this.iti=t}get K7t(){return this.eti}set K7t(t){this.eti=t}Cx(){var t,i,e;return null!=(e=null==(i=this.w0t)||null==(t=i.O7t())?void 0:t.S9t)?e:0}Nx(){var t,i,e;return null!=(e=null==(i=this.w0t)||null==(t=i.O7t())?void 0:t.b9t)?e:0}xP(){return[]}K3t(t){this.s6t=t,this.i6t.K3t(t)}D6t(){!this.Z9t&&this.w0t&&(this.w0t.Tn(),this.Z9t=!0)}G7t(t){this.l4t=t?t.D7t?"linear":"nonlinear":"none"}Tx(){return ve.iL()._s()}Lx(){return this.oa.Mx}Ox(t){this.Y7t(t,this.$P,!0)}B7t(){return this.oa.$P?0:this.oa.Mx}Y7t(t,i,e){const s=this.oa.Mx!==t||this.oa.$P!==i;s&&(this.oa.Mx=t,this.oa.$P=i),this.w0t&&e&&this.w0t.Ox(this.B7t()),s&&this.So(new Ze(this.MP,this.Mx))}VP(){return!1}HP(){if(this.sti&&this.X3t)return this.sti}qP(){if(this.nti&&this.X3t)return this.nti}bx(){return this.t5}i5(t){this.t5=t,this.So(new ou(this.MP,t))}get u9t(){return this.rti}set u9t(t){this.rti=t}qx(){this.oa.mn(d.uo,this.hti),this.ko||(this.ko=!0,this.i6t.qx(),this.r9t())}async Gx(){if(this.oti)return;this.ati.Zg(),this.ati=new at;const t=this.hx;this.p7t(!1),this.So(new Tc(this.MP)),this.uti()||(this.Z7t||this.oa.we(),this.So(new ux(this.MP))),this.h9t||(this.a9t=!1);const i=Boolean(this.w0t);this.oti=this.i6t.v6t();try{await this.oti}finally{this.oti=void 0}try{ii(this.ati.Yg)}catch(t){return}if(this.ko||this.hti(),!this.sti||!this.X3t)if(this.w0t){if(t)if(i)try{ii(this.ati.Yg),this.w0t.cti(),this.So(new ce(this.MP))}catch(t){return}else this.D6t()}else this.X3t||(this.i3t(),this.Q3t.Gx())}zx(){var t;this.hx||(this.p7t(!0),this.So(new hl(this.MP))),this.ati.Zg(),this.h9t?null==(t=this.w0t)||t.zx():this.a9t=!0}rD(){var t;null==(t=this.w0t)||t.rD()}X7t(){this.w0t&&(this.lti.dti(),this.w0t.Xx(),this.w0t.zg(),this.w0t=void 0,this.l4t="none",this.Z9t=!1)}async Xx(){var t;this.e9t=0,this.i6t.hr(),this.ati.Zg(),this.p7t(!0),this.tti=!1,this.eti=!1,this.h9t=!1,this.m6t.hr(),this.X7t(),this.U7t(),null==(t=this.fti)||t.hr(),this.a9t=!1,this.lti.zg()}be(){this.vti.be(),this.Z7t&&this.oa.be()}we(){this.vti.we()}_ti(){return Boolean(this.w0t)&&pi(this.w0t.gti(),-1)&&!this.tti}I5t(){this.i6t.I5t()}O6t(){return this.i6t.O6t}$5t(){this.i6t.$5t()}F6t(){return this.i6t.F6t()}F3t(t){if(this._ti()){if(t.type===d.jw&&this.oa.UP)return!0;if(t.type===d.Bw)return this.tti=!0,this.lti.dti(),!0}return!1}uti(){return Boolean(this.w0t&&this.w0t.O7t())}async C6t(t){try{this.X7t();const i=this.pti();this.vti.VY(),this.w0t=await this.lti.C6t(t,this.fti,i),this.mti(this.w0t)}catch(t){this.wti.P7t(t)}}mti(t){if(t.Ox(this.B7t()),this.i6t.p6t===L2.d6t){const i=t.gti();if(i.length)for(const t of i)this.m6t.L4t(t,this.i6t.t6t);else this.m6t.L4t(this.i6t.t6t.dd,this.i6t.t6t)}this.wti.hr(),this.wti.h7t(t)}Wx(){if(this.y0t&&this.Z7t&&this.uti())return this.oa.Wx()}Hx(){return this.Z7t&&this.G3t?this.oa.Ma:super.Hx()}pti(){const t=!!(this.i6t.p6t===L2.d6t)&&this.Y9t;let i,e;void 0!==this.VJ.ads.googleIma.uiElements?i=this.VJ.ads.googleIma.uiElements:this.VJ.ads.showCountdown||(i=[]),void 0!==this.VJ.ads.allowedMimeTypes&&(e=this.VJ.ads.allowedMimeTypes);return{yti:e,Ati:i,bti:t,T9t:this.VJ.ads.googleIma.bitrate,Sti:void 0,Tti:this.s6t}}r9t(){if(this.y0t){const t=this.pti();this.y0t.kti(t)}}V4t(t){X2(t)||(this.sti=new Nk(Bk.ADVERTISEMENT_ERROR,t.Py),this.nti=new Ga(Vo.AD_ERROR,"There was a problem playing ads.",this.sti)),this.M3t.So(Pa.U3t(t))}U7t(){this.G3t&&(this.oa.be(),this.i3t(),this.we())}d9t(){var t;if(this.oa.LP()===1/0||0===this.oa.Tx().length)return;(null==(t=this.i6t.t6t)?void 0:t.g5t)&&-1!==this.Eti&&(this.oa.OP(this.oa.LP()+this.Eti),this.Eti=-1)}c9t(t){var i,e;this.Eti=null!=(e=null==(i=t.V7t)?void 0:i.p0t)?e:-1}i3t(){super.i3t(),this.oa.be(),this.Z7t&&!this.oa.UP&&this.oa.Gx()}c5t(){this.Z7t||super.c5t()}async kn(){this.wti.mn(Mc.ma,this.Pti),await super.kn(),this.X7t(),this.lti.mn("xti",this.Iti),this.lti.zg(),this.vti.zg(),this.i6t.kn(),this.wti.kn()}constructor(t,i,e,s,n,r,h){super(t,i),this.ko=!1,this.fti=void 0,this.kz=void 0,this.t5=void 0,this.y0t=void 0,this.lti=void 0,this.vti=void 0,this.Dc=void 0,this.WA=void 0,this.tti=void 0,this.eti=void 0,this.X3t=!1,this.sti=void 0,this.nti=void 0,this.i6t=void 0,this.wti=void 0,this.Eti=-1,this.f4t="none",this.VJ=void 0,this.oti=void 0,this.rti=!1,this.m6t=void 0,this.Z9t=!1,this.ati=new at,this.s6t=void 0,this.$9t=!1,this.iti=!1,this.Iti=t=>{this.M3t.So(t)},this.Pti=t=>{this.sti=new Nk(Bk.ADVERTISEMENT_ERROR,"Error while recovering from failed IMA ad.",t.error.message),this.nti=Ok(this.sti)},this.e9t=NaN,this.hti=()=>{this.ko||this.qx()},this.VJ=e,this.kz=!0,this.WA=NaN,this.t5=mh.VL,this.tti=!1,this.eti=!1,this.m6t=new h3(this.M3t,this),this.wti=new G2(this,this.oa,this.m6t),this.wti.wn(Mc.ma,this.Pti),this.oa.wn(d.uo,this.hti),this.i6t=new O2(this,this.oa,this.Q3t,s,this.m6t),this.fti=h,this.lti=r,this.vti=n,this.we(),this.lti.wn("xti",this.Iti)}};r();var c3=class{registerWebImaAdPlayerConstructor(t){this.Rti=t}createAdPlayer(t,i,e){return d3()&&this.Rti?this.Rti(t,i,e):void 0}constructor(){this.Rti=void 0}};function d3(){if(Boolean(s.google&&s.google.ima)){return!(1===w.keys(s.google.ima).length&&Boolean(s.google.ima.dai))}return!1}c3.Ng=new c3;var l3=class{get P3t(){return u3.C3t}qz(t){return t&&t.integration===ru.GOOGLE_IMA}x3t(t,i,e){return c3.Ng.createAdPlayer(t,i,e)}M6(t,i,e,s){e.K9t(t,i,s)}sj(t){const i=U0(t.sources);if(!i)return;const e={integration:ru.GOOGLE_IMA,sources:i,omidAccessModeRules:z2(t.omidAccessModeRules)},s=Ac(t.timeOffset);return void 0!==s&&(e.timeOffset=s),e}};Qh.Ng.zz(new l3),r(),r(),r(),r();var f3=class extends Oi{xa(){return new v3}constructor(){super("z0t")}},v3=class extends wp{constructor(){super("adloaded")}},jc=-1,_3=class{get A0t(){return this.X0t}get Cti(){return this.Dti}get aut(){return this.Xp}get Bti(){return this.T5t}get Nti(){return this.Mti}get dd(){if(S(this.Lti)){const t=Ha.NZt(this.T5t,this.k0t.t.Nd());void 0===t||S(t)||(this.Lti=t)}return this.Lti}Oti(){return this.XpPn(t).some(t=>t.PKt))}constructor(t,i){this.X0t=void 0,this.T5t=void 0,this.Dti=void 0,this.x0t=void 0,this.Xp=void 0,this.k0t=void 0,this.Lti=void 0,this.Mti=void 0,this.X0t=[],this.x0t=!1,this.T5t=t,this.Xp=0,this.k0t=i,this.Lti=NaN,this.Mti=!1,this.Dti=new m1(this,this.k0t)}},g3=class t extends _o{get Hti(){let t=0;for(const i of this.Wti)i.P0t()||(t+=1);return t}qti(){this.Gti.zti()}Tn(){this.No(),this.Xti.wn("Nnt",this.Gti.jti)}An(){this.Ro(),this.Xti.mn("Nnt",this.Gti.jti),this.b4=this.OO,this.Gti.hr();for(const t of this.Wti)t.I0t();Yo(this.Wti)}No(){this.Qti||(this.oa.wn(d._y,this.Kti),this.Qti=!0)}Ro(){this.Qti&&(this.oa.mn(d._y,this.Kti),this.Qti=!1)}get Ant(){return this.Wti}Yti(){return this.Jti(new Si(jc,void 0))}Zti(t){return this.$ti(t,0,0).length>0}tii(t,i){let e,s=0;for(const n of this.Wti){if(n.P0t())continue;const r=n.dd;r>=t&&r<=i&&r>=s&&!S(r)&&(e=n,s=e.dd)}return e}eii(t){return this.Jti(new Si(t,void 0))}sii(){if(!this.nii&&void 0!==this.s6t){this.nii=!this.Wti.some(t=>S(t.dd));for(const t of this.Wti)t.dd!==jc&&t.dd<=this.s6t&&!t.P0t()&&t.I0t()}}rii(t){for(const i of t)i.I0t();this.J4t.hii(t),0===this.Hti&&this.Ro()}$ti(t,i,e){return this.Wti.filter(s=>{if(s.P0t())return!1;const n=s.dd;return this.oii(n,t)||this.aii(n,t,i,e)})}oii(t,i){switch(i){case 0:return 0===t;case jc:return t===jc;default:return!1}}aii(t,i,e,s){if(t<0)return!1;const n=t-i;return-1!==n&&n<=e&&n>=-s}uii(i){if(i&&i.length>0){for(const e of i){const i=t.Z5t(e._Ot);let s=this.dgt(e);-1===s&&(this.nii=void 0===this.s6t,this.Wti.push(new _3(i,this.cii)),s=this.Wti.length-1);this.Wti[s].Fti(e)}this.No()}}static Z5t(t){switch(t){case"start":case"00:00:00":case"00:00:00.000":case"0%":case"0":return"0";case"end":case"100%":return"-1";default:return t}}dgt(i){const e=t.Z5t(i._Ot);return li(this.Wti,i=>e===t.Z5t(i.Bti))}dii(t){oi(this.Wti,t)}K3t(t){this.s6t=t,this.nii=void 0===t}constructor(t,i,e,s){super(),this.Wti=void 0,this.oa=void 0,this.cii=void 0,this.OO=void 0,this.Xti=void 0,this.b4=void 0,this.J4t=void 0,this.Gti=void 0,this.Qti=void 0,this.s6t=void 0,this.nii=!1,this.Kti=t=>Wr(this.Jti(t)),this.Jti=async t=>{this.sii();const i=t.currentTime,e=t.currentTime!==jc?this.tii(this.b4,t.currentTime):this.$ti(t.currentTime,0,0)[0];let s,n;const r=this.oa.Nd()-10;if(n=this.Zti(jc)&&_.ceil(i)===_.ceil(r)?this.$ti(jc,10,0).filter(t=>!t.Nti):this.$ti(i,10,0).filter(t=>!t.Nti),n.length){const t=(await Promise.all(n.map(t=>t.Uti(this.Xti)))).some(t=>!0===t);t&&this.So(new f3),(!t||!this.Gti.lii||n[0].dd{t.stopPropagation(),this.kii()},this.kii=()=>{for(const t of this.yii)for(const i of t.kYt)L$(i.uri)},this.Q1t=h.createElement("div"),this.Q1t.style.display="none",this.bii=t,this.Sii=i}};function m3(t,i){let e=i;if(!function(t){return"ui"in t}(t))return e;const s=t.ui.language;let n;if(Z(s)){const i=t.ui.languages;if(!i)return e;n=i[s]}else n=s;return n&&n[i]&&(e=n[i]),e}r(),r();var w3={[Ba.cR]:1,[Ba.dR]:2,[Ba.lR]:2};function y3(t,i){const e=i?i.map(t=>t.toLowerCase()):i;return xe(t.filter(t=>{const i=t.type.toLowerCase();return!!ul(e)&&-1!==e.indexOf(i)&&A0(i)}),(t,i)=>w3[t.type]-w3[i.type]).map(A3)}function A3(t){return ml({src:t.contentURL,type:t.type,isAdvertisement:!0})}function b3(t,i){return MV(S3(t),S3(i))}function S3(t){return{Mi:t.height,Ti:t.width}}function T3(t,i,e,s){const n=function(t,i,e,s){let n,r=1/0;const h=t.filter(t=>!A0(t.type)).filter(t=>void 0===s||-1!==s.indexOf(t.type));if(h.length){for(const t of h){const s=(_.abs(t.width/i-1)+_.abs(t.height/e-1))/2;s0&&(t.tJt=null==(h=r[0].src)?void 0:h.trim());return Cn({sources:r},s)}var k3=class extends p3{get Eii(){return this.Pii}get MP(){return this.xii.MP}get ct(){let t=this.xii.ct;return S(t)&&this.qYt&&(t=this.qYt.ct||0),t}get UP(){return this.xii.UP}get $P(){return this.xii.$P}set $P(t){this.xii.$P=t,t?this.Aii(kl.hJt):this.Aii(kl.oJt)}get hx(){return this.xii.hx}get Ax(){return this.xii.Ax}get Mx(){return this.xii.Mx}set Mx(t){this.xii.Mx=t}get Rx(){return this.xii.Rx}get Bx(){return this.xii.Bx}get Iii(){return this.Rii}Gx(){this.xii.hx&&(this.xii.Gx(),this.So(new Tc(this.MP)),this.Pii&&this.Aii(kl.aJt),this.Pii=!0)}zx(){this.xii.hx||(this.xii.zx(),this.So(new hl(this.MP)),this.Aii(kl.jw))}async Xx(){var t;null==(t=this.nT)||t.Zg(),this.nT=void 0,this.we(),this.Pii=!1,this.Cii=!0,this.Dii(),this.Bii(),await this.Nii()}Mii(t){void 0===t&&(t=!0),this.Pii=!1,t&&this.Aii(kl.wJt),this.we(),this.Sii()}Lii(){var t;const i=null==(t=this.J4t.Na)?void 0:t.gi,e=new L1(this.sc,i);return this.fii.appendChild(e.xe),e.wn("rD",this.Oii),e}Fii(){this.qYt&&this.qYt.FYt.AYt&&(this.Y1t=new C1(this.fii),this.Y1t.u1t=this.qYt.FYt.AYt,this.Y1t.wn("clickstart",this.Uii),this.Y1t.wn("click",this.kii))}Vii(t,i){for(const e of this.mii)if(e.eX===kl.Qw){const s=f0(e.ac,i);void 0!==s&&this.b4=this.qYt.JYt}Zii(){this.Aii(kl.MSt),this.Rii&&this.M3t.So(new dc(this.Rii,this.MP))}async Nii(){this.xii.mn(Mc.ma,this.jii),this.xii.mn(d.Bw,this.Qii),this.xii.mn(d._y,this.Kii),this.xii.mn(Do.TM,this.Rs),this.xii.mn(Do.TM,this.Yii),this.xii.mn(d.Jw,this.Rs),this.xii.mn(d._y,this.zii),this.xii.mn(d.Rw,this.Gii),this.xii.mn(d.gy,this.Xii),this.xii.mn(K,this.Rs),this.Rii&&(this.Rii.I0t(),this.M3t.So(new bc(this.Rii,this.MP))),this.$ii(),this.vii(),this.Dii(),this.Bii(),this.Rii=void 0,this.qYt=void 0,this.Wii=void 0,await this.xii.hr(),this.xii.we(),this.fii.style.cursor="",this.tei=0,this.b4=-1,this.iei&&(this.eei.Nii(),this.iei=!1)}$ii(){this.Y1t&&(this.Y1t.zg(),this.Y1t=void 0)}Bii(){this.sei&&(os(this.sei),this.sei=void 0)}Dii(){this.$1t&&(this.$1t.kn(),this.$1t=void 0)}nei(){this.iei=!0}rei(){var t;this.sei||(this.sei=h.createElement("div"),this.sei.className="theoplayer-ad-overlay-component theo-ad-remaining-container",this.fii.appendChild(this.sei));const i=null==(t=this.Rii)?void 0:t.od;if(!i)return;const e=i.Jc.filter(S1);let s=m3(this.YS,"The content will play in")+" "+_.round(i.m0t)+" "+m3(this.YS,"seconds");if(e.length>1){const t=e.filter(t=>t.P0t()).length;s+=". "+m3(this.YS,"Ad")+" "+(t+1)+"/"+e.length}Xu(this.sei,s)}constructor(t,i,e,s,n,r,h){super(t,i),this.eei=void 0,this.YS=void 0,this.J4t=void 0,this.sc=void 0,this.xii=void 0,this.Rii=void 0,this.qYt=void 0,this.Wii=void 0,this.Pii=void 0,this.tei=void 0,this.b4=void 0,this.iei=void 0,this.sei=void 0,this.$1t=void 0,this.Y1t=void 0,this.nT=void 0,this.Cii=void 0,this.Qii=void 0,this.Yii=void 0,this.Kii=void 0,this.jii=void 0,this.zii=void 0,this.Gii=void 0,this.Xii=void 0,this.Uii=void 0,this.Oii=void 0,this.eei=e,this.YS=s,this.J4t=n,this.sc=r,this.xii=h,this.Pii=!1,this.tei=0,this.b4=-1,this.nT=new at,this.Cii=!0,this.Qii=()=>{this.Mii()},this.Yii=()=>{this.nT=void 0,this.Pii||(this.Zii(),this.Pii=!0),this.Cii&&(this.Cii=!1,this.J4t.qti()),this.fii.style.display="block",this.xii.mn(Do.TM,this.Yii),this.Pii=!0},this.Kii=()=>{const t=this.MP,i=this.ct,e=t/i;(0===this.tei&&e>=.25?(this.Aii(kl.gJt),this.tei=1):1===this.tei&&e>=.5?(this.Aii(kl.mJt),this.tei=2):2===this.tei&&e>=.75&&(this.Aii(kl.pJt),this.tei=3),this.Vii(t,i),this.rei(),this.b4=t,this.qYt)&&(-1!==this.qYt.JYt&&this.qYt.JYt{var t,i;this.nT=void 0,this.xii.mn(Mc.ma,this.jii),this.Cii=!0,null==(t=this.JW)||t.jJt(yr.WJt),this.Pii=!1,this.xii.we();const e=(null==(i=this.xii.bt)?void 0:i.src)||"";this.bii(e)},this.zii=()=>{this.Rs(new Si(this.MP,void 0))},this.Gii=()=>{this.Rs(new Rs(this.ct))},this.Xii=()=>{this.Rs(new Ze(this.MP,this.Mx))},this.Uii=()=>{this.J4t.zx()},this.Oii=()=>{this.Rii&&(this.Aii(kl.cJt),this.M3t.So(new da(this.Rii,this.MP/this.ct)),this.Mii(!1))},this.fii.className="theoplayer-ad-linear",this.fii.style.zIndex="10",oa(this.fii),this.xii.we(),this.iei=!1}};r(),r();var E3=class t extends Ne{get xe(){return this.Ls}w1t(){this.xe.addEventListener("mouseup",this.y1t),this.xe.addEventListener("touchend",this.y1t),this.xe.addEventListener("mousedown",this.hei)}p1t(){this.xe.removeEventListener("mouseup",this.y1t),this.xe.removeEventListener("touchend",this.y1t),this.xe.removeEventListener("mousedown",this.hei)}static yr(){const t=h.createElement("div");return t.className="theoplayer-ad-nonlinear-close",t.style.position="absolute",t.style.right="0",t.style.top="0",t.style.cursor="pointer",t.style.fontSize="1.7em",t.style.lineHeight="0.75em",t}kn(){this.p1t(),os(this.Ls)}constructor(){super(),this.Ls=void 0,this.y1t=t=>{this.So(new wp("rD")),this.hei(t)},this.hei=t=>{t.stopPropagation()},this.Ls=t.yr(),this.w1t()}},P3=class extends p3{get oei(){return this.aei}get uei(){return this.yu}vii(){super.vii(),this.fii&&Yd(this.fii)}async qii(t,i,e){this.L0t&&this.Nii(),this.aei=t,this.L0t=t.xKt,0!==this.L0t.NKt.length&&this.pii(this.L0t.NKt),this.JW=i,0!==this.L0t.DKt.length&&(this.wii(this.L0t.DKt[0].WKt),this.fii.addEventListener("error",this.cei),this.fii.addEventListener("load",this.dei),await this.Hii(),this.lei())}p$t(){var t;if(void 0!==this.fei)return;const i=null==(t=this.L0t)?void 0:t.DKt[0];i&&i.od&&-1!==i.od.JYt&&(this.Aii(kl.cJt),this.M3t.So(new da(this.aei,0)),this.vei())}Zii(){void 0!==this.aei&&this.M3t.So(new dc(this.aei,this.J4t.MP))}Xx(){this.Nii(),this.aei=void 0,this.L0t=void 0}Nii(){this._ei(),void 0!==this.aei&&(this.aei.I0t(),this.M3t.So(new bc(this.aei,this.J4t.MP))),this.vii(),this.gei(),void 0!==this.fei&&(c(this.fei),this.fei=void 0)}_ei(){this.fii.removeEventListener("load",this.dei),this.fii.removeEventListener("error",this.cei)}async Hii(){const t=h.createElement("div");t.className="theoplayer-ad-nonlinear-content",t.style.position="relative",t.style.display="inline-block";const i=this.L0t.DKt[0],e=h.createElement("a");if(i.WKt.AYt&&(e.href=i.WKt.AYt,e.target="Xu",e.setAttribute("rel","noopener")),i.FKt){const t=i.FKt,s=h.createElement("iframe");s.src=t.LJt,e.appendChild(s)}else if(i.LKt){const t=i.LKt,s=h.createElement("img");s.src=t.LJt,e.appendChild(s)}else if(i.VKt){const t=i.VKt,s=h.createElement("iframe");s.src=t.LJt,e.appendChild(s)}i.KKt(),e.addEventListener("mousedown",this.Tii),e.addEventListener("touchend",this.Tii),this.fii.firstChild&&(Yd(this.fii),this.Nii()),t.appendChild(e),this.fii.appendChild(t),this.be()}lei(){var t;if(!this.L0t)return;const i=null==(t=this.L0t.DKt[0].od)?void 0:t.JYt;void 0!==i&&-1!==i&&(this.fei=s.setTimeout(this.pei,1e3*i))}gei(){this.yu&&(this.yu.mn("rD",this.mei),this.yu.kn()),this.yu=void 0}get wei(){return this.J4t.yei()}constructor(t,i,e){super(t,i),this.aei=void 0,this.L0t=void 0,this.J4t=void 0,this.yu=void 0,this.fei=void 0,this.dei=()=>{this._ei(),this.Aii(kl.TJt),this.Sii()},this.cei=t=>{var i,e;this._ei(),null==(i=this.JW)||i.jJt(yr.zJt);const s=null==(e=this.L0t)?void 0:e.DKt[0];var n,r;const h=null!=(r=null!=(n=null==s?void 0:s.FKt)?n:null==s?void 0:s.LKt)?r:null==s?void 0:s.VKt;var o;this.bii(null!=(o=null==h?void 0:h.LJt)?o:"")},this.vei=()=>{this.we(),Yd(this.fii),this.Sii(),this.aei=void 0,this.L0t=void 0},this.pei=()=>{this.yu||(this.fei=void 0,this.yu=new E3,this.fii.children[0].appendChild(this.yu.xe),this.yu.wn("rD",this.mei))},this.mei=()=>{this.Aii(kl.cJt),this.p$t()},this.fii.className="theoplayer-ad-nonlinear",this.fii.style.position="absolute",this.fii.style.width="100%",this.fii.style.bottom="3em",this.fii.style.zIndex="10",this.fii.style.textAlign="center",this.J4t=e}};r();var x3=class{static async Aei(t,i,e){let s=[],n=t.shift();const r=[];for(;n;){try{const t=await(new E0).eZt(n,i);s=s.concat(t)}catch(t){0;const i=Pa.V3t(t,n.sources.src);e.So(i),r.push(i.Ky)}n=t.shift()}return[s,r]}};r(),r(),r();var Tr=class extends Oi{xa(){return new I3}constructor(){super("Eot")}},I3=class extends wp{constructor(){super("statechange")}};r();var Yt=function(t){return t.IDLE="idle",t.LOADING="loading",t.DONE="done",t.ERROR="error",t.EVICTED="evicted",t}({});r(),r();var R3=class{get ec(){return this.nc}get V(){return this.nc.length}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}CI(t){return this.nc[t]}lO(t){this.nc.push(t),this.hu&&this.hu.push(t.Ca),this.bei(t)}Sei(t){for(const i of t)this.lO(i)}Tei(t,i){i>=0&&i<=this.nc.length&&(this.nc.splice(i,0,t),this.hu&&this.hu.splice(i,0,t.Ca),this.bei(t))}fO(t){return pi(this.nc,t)}_S(t){this.kei(this.nc.indexOf(t))}kei(t){if(!(t>=0&&tt.Ca);return i.item=i=>{const e=0|i,s=t.CI(e);return s&&s.Ca||void 0},i}(t),e=new ws(t,i);return i.addEventListener=(t,i)=>{e.wn(t,i)},i.removeEventListener=(t,i)=>{e.mn(t,i)},i}(this)}wn(t,i){this.Pei.wn(t,i)}lw(t){this.Pei.lw(t)}Vo(){this.Pei.Vo()}So(t){this.Pei.So(t)}mn(t,i){this.Pei.mn(t,i)}pw(t){this.Pei.pw(t)}mw(t){this.Pei.mw(t)}ww(t,i){return this.Pei.ww(t,i)}constructor(...t){super(...t),this.Pei=new _o,this.Rs=t=>{this.So(t)}}};r();var D3=class extends wp{constructor(t){super("addtask"),this.task=void 0,this.task=t}},B3=class extends Oi{xa(){return new D3(this.xei.Ca)}constructor(t){super("Iei"),this.xei=void 0,this.xei=t}};r();var N3=class extends wp{constructor(t){super("removetask"),this.task=void 0,this.task=t}},M3=class extends Oi{xa(){return new N3(this.task.Ca)}constructor(t){super("Rei"),this.task=void 0,this.task=t}},L3=class extends C3{bei(t){this.So(new B3(t))}Eei(t){this.So(new M3(t))}constructor(){super()}},O3=class extends Ne{async qx(){await this.Cei(),this.Mot("initialised")}async Cei(){try{await this.Dei()}catch(t){0}}async Dei(){const t=await this.GSt.iPt();for(const i of t){const t=this.Nei.Bei(i.id,i.sourceDescription,i.parameters,this.Mei);this.Lei(t),this.rT.lO(t),await t.Oei}}get hk(){return this.Not}Mot(t){this.Not=t,this.So(new Tr)}get Fei(){return this.rT}Bei(t,i,e){void 0===e&&(e="persistent");const s=this.Nei.Uei(t,i,e);return this.Vei(s,e),this.rT.lO(s),this.Lei(s),s}async Vei(t,i){try{await this.Hei(t,i)}catch(t){throw m("Unable to persist task - "+t)}}async Hei(t,i){await this.GSt.zSt({key:t.o,id:t.o,sourceDescription:t.Mc,parameters:t.NS},i)}Lei(t){t.wn("Eot",()=>{t.hk===Yt.EVICTED&&this.rT._S(t)})}constructor(t,i,e){super(),this.Not="uninitialised",this.rT=new L3,this.GSt=void 0,this.Mei=void 0,this.Nei=void 0,this.Nei=i,this.Mei=e,this.GSt=t,this.qx()}};r(),r(),r(),r();var Os=class{get ZM(){return this.Wei}get qei(){return this.zei}get Gei(){return this.Xei.ZM}get jei(){let t=0,i=0;return this.dO.forEach(e=>{t+=e.timeRanges.ZM,i+=e.totalQualityDurationToCache}),0===i?0:_.min(1,t/i)}get Xei(){return this.Qei}zO(t){return!!_t(this.dO,t.dO)&&(!!Jl(this.zei,t.zei)&&(!!Jl(this.ZM,t.ZM)&&(!!Jl(this.Gei,t.Gei)&&this.Xei.GM(t.Xei))))}constructor(t,i,e){if(this.zei=void 0,this.dO=void 0,this.Wei=void 0,this.Qei=void 0,this.zei=t,this.dO=i,this.Wei=e,0===this.dO.size)this.Qei=ve.iL();else{let t=new ve([-1/0,1/0]);this.dO.forEach(i=>{t=t.Mn(i.timeRanges)}),this.Qei=t}}};Os.QUALITY_TIME_RANGES_NULL_OBJECT=qh(),Os.CACHE_PROGRESSION_NULL_OBJECT=new Os(0,Os.QUALITY_TIME_RANGES_NULL_OBJECT,NaN),Os.Kei=Os.CACHE_PROGRESSION_NULL_OBJECT,r(),r(),r(),r();var F3=class extends wp{constructor(){super("progress")}},U3=class extends Oi{xa(){return new F3}constructor(){super("y4t")}};r(),r();var V3=class extends R{get name(){return"Yei"}constructor(t,i){super(t,i)}};r(),r(),r();var H3=function(t){return t[t.cR=0]="cR",t[t.dR=1]="dR",t}({});async function W3(t,i,e){const s=[];for(const n of t.Xpt)s.push(q3(n,i,e));return{kmt:await Promise.all(s)}}async function q3(t,i,e){const s=[];for(const n of t.Ilt)z3(n)||s.push(j3(n,i,e));return{Z:await Promise.all(s),Km:t.Km}}function z3(t){return t.rat.every(X3)}var G3=1;function X3(t){return t.swt!==G3&&Boolean(t.swt)}async function j3(t,i,e){const s=[];for(const i of t.rat)X3(i)||s.push(Q3(i,e));const n=await Promise.all(s),r=t.frt[0],h=t.xW,o=h?function(t,i){const e=[],s=function(t){return t?Ho(t,"avc")?My:Ho(t,"hev")||Ho(t,"hvc")||Ho(t,"hvt")||Ho(t,"lhv")||Ho(t,"lhe")||Ho(t,"lht")?Ly:Ho(t,"mp4")?Oy:Ho(t,"mpeg2")?Uy:Ho(t,"mpeg")?Fy:Hy:Hy}(t);for(const t of i){const i=t.y8.split(":").pop(),n=t.A8;e.push({mimeType:s,uuid:i,data:n})}const n=H3.cR,r=Mg;return{type:n,schemeType:r,schemeDatas:e}}(r,h):void 0,a=IG(t,i,!0);return{KI:n,bs:t.rit,Km:t.Km,aq:o,Tpt:a}}async function Q3(t,i){const e={stack:[],error:void 0,hasError:!1};try{const r=Be(e,new at,!1),h=await async function(t,i,e){const s=[],n=t.$rt;t.Ddt&&s.push({EO:0,ct:0,Jei:t.Ddt});const r=n.xyt();let h=r;for(;h;){if(t.kct(h)){const n=await t.Pct(h,i,e);for(let i=0;i{for(const i of t.KD){let s=e.get(t.Km);s||(s=qh(),e.set(t.Km,s));let n=s.get(i.l);n||(n=[],s.set(i.l,n)),n.push(i)}}),e}(t);return function(t,i){const e=ar();return t.forEach((t,s)=>{const n=qh();t.forEach((t,e)=>{const r=[];for(const e of t){const t=Z3(e,s,i);r.push(t)}n.set(e,r)}),e.set(s,n)}),e}(e,i)}function Z3(t,i,e){const s=t.BMt,n={UMt:t,HUt:[]};for(const t of e)aJ(i,s,t)&&n.HUt.push(t);return n}async function $3(t,i){const e=await i.RSt([t],{});return DY(e.gk,{},e.DSt)}async function t4(t,i){return KK(t)?async function(t,i){const e=J3(t.KD,t.mOt),s=await async function(t,i){const e=[],s=t.entries();for(let t=s.next();!t.done;t=s.next()){const[s,n]=t.value,r=await s4(n,s,i);e.push(r)}return e}(e,i),n=await async function(t,i){const e=[];for(const o of t){var s,n;const t=await o4(o.nyt,i);var r,h;t.kW=o.kW,t.Np=o.frt?e4(o.frt):"",t.Mi=null!=(r=null==(s=o.uCt)?void 0:s.Mi)?r:0,t.Ti=null!=(h=null==(n=o.uCt)?void 0:n.Ti)?h:0,e.push(t)}return{Km:Ci.pk,Z:[{bs:EH,Km:Ci.pk,KI:e}]}}(t.mOt,i);return s.push(n),{ct:i4(s),Zei:[t.nyt],smt:[{kmt:s}]}}(t,i):function(t){const i=a4(t);return{ct:i.ct,Zei:[t.nyt],smt:[{kmt:[{Km:Ci.pk,Z:[{Km:Ci.pk,bs:EH,KI:[{o:t.nyt,mM:i,kW:0,Np:"",Mi:0,Km:Ci.pk,Ti:0}]}]}]}]}}(t)}function i4(t){let i=-1/0;for(const e of t)for(const t of e.Z)i=_.max(i,...t.KI.map(t=>t.mM.ct));return i}function e4(t){return[t.yCt,t.bCt,t.ULt].filter(it).join(",")}async function s4(t,i,e){const s=[],n=t.entries();for(let t=n.next();!t.done;t=n.next()){const[,i]=t.value,n=await n4(i,e);s.push(n)}return{Km:r4(i),Z:s}}async function n4(t,i){const e=[],s=t[0].UMt;for(const s of t){const t=await h4(s,i);e.push(t)}return{bs:s.bs||EH,Km:r4(s.Km),KI:e}}function r4(t){switch(t){case nl.Dk:return Ci.Dk;case nl.Bk:return Ci.Bk;case nl.OU:case nl.bLt:return Ci.NT;default:return Ci.pk}}function h4(t,i){const e=function(t){const i=t.UMt.nyt,e=t.HUt.map(t=>t.nyt);return i||(e.length?e[0]:void 0)}(t);return o4(e,i)}async function o4(t,i){let e={ct:0,ect:[]};if(t){const s=await $3(t,i);YK(s)&&(e=a4(s))}return{o:t||"default",$ei:t,mM:e,kW:0,Np:"",Mi:0,Km:Ci.pk,Ti:0}}function a4(t){const i=[];let e,s=0;for(const n of t.ect){const t=s;!n.bOt||void 0!==e&&ZK(n.bOt.nyt,e)||(i.push(u4(n.bOt,t)),e=n.bOt.nyt),i.push(c4(n,t)),s+=n.ct}return{ct:s,ect:i}}function u4(t,i){return{EO:i,ct:0,Jei:d4(t.nyt)}}function c4(t,i){return{EO:i,ct:t.ct,Jei:d4(t.nyt)}}function d4(t){return{Yu:t.zE,Sat:t.LAt?[t.LAt.Tn,t.LAt.Tn+t.LAt.V]:void 0,zk:!1}}r(),r();var l4=class{async tsi(t){if(!t.src)throw new m("Invalid typed source");const i=t.type;if($T(i))return await this.isi(t);if(ZT(i))return await this.esi(t);throw new m("Unexpected source type")}async isi(t){try{const i=await $3(t.src,this.CSt);return await t4(i,this.CSt)}catch(t){throw new m("Unable to fetch HLS manifest")}}async esi(t){try{const i=new $z({iR:zd.Dh(t.src),cSt:t.liveOffset,_St:t.timeServer,zk:t.useCredentials},this.ssi,Mr.Yk,this.CSt,t.dash);return await i.W,await async function(t,i,e){const s=[];for(const n of t.smt)s.push(W3(n,i,e));const n=await Promise.all(s);return{ct:t.Gwt.Rmt(),Zei:[t.iSt],smt:n}}(i.Br.Idt,t.contentProtection,this.Bct)}catch(t){throw new m("Unable to fetch DASH manifest")}}constructor(t,i,e){this.CSt=void 0,this.Bct=void 0,this.ssi=void 0,this.CSt=t,this.Bct=i,this.ssi=e}};r();var f4=class{nsi(){const t=new pa;return this.rsi.push(t),this.hsi(),t.Qy}async osi(t,i){try{await t}finally{this.asi-=1,this.hsi(),0===this.rsi.length&&0===this.asi&&i.Xy(!0)}}hsi(){if(this.rsi.length>0&&this.asipi(t.references,this.XSt.o)),r=[],h=this.XSt.NS.bandwidth;for(const t of this.pCt.smt)for(const i of t.kmt)for(const t of g4(i,this.XSt.NS.preferredTrackSelection))for(const i of m4(t.KI,h))r.push(i);this.lsi=_.ceil(r.map(t=>t.kW*function(t,i){let e=0;for(const s of t.mM.ect.map(t=>t.ct))if(e+=s,e>=i)return e;return e}(t,i)/8).reduce((t,i)=>t+i,0));const o=qh();if(n&&0!==n.length){const t=n.reduce((t,i)=>t+i.byteSize,0);for(const t of n){const i=t.qualityId,e=new ve(t.startsAndEnds);if(o.has(i))o.get(i).timeRanges=o.get(i).timeRanges.OM(e).LM(5e-4);else{const t=Jr(r,t=>t.o===i);var a;const s=_.min(this.Wei,null!=(a=null==t?void 0:t.mM.ct)?a:1/0);o.set(i,{timeRanges:e,totalQualityDurationToCache:s})}}e=new Os(t,o,this.Wei)}else{for(const t of r)o.set(t.o,{timeRanges:ve.iL(),totalQualityDurationToCache:_.min(t.mM.ct,this.Wei)});e=new Os(0,o,this.Wei)}this.fsi=e}get vsi(){return this.lsi}get fsi(){return this._si}set fsi(t){this._si.zO(t)||(this._si=t,t.zO(Os.Kei)||this.So(new U3))}async mi(t){await this.ko,await this.gsi(this.pCt,t)}async gsi(t,i){if(!t.Zei)throw new m("Unexpected - manifest is missing locations");await this.psi();const e=[];for(const s of t.smt)e.push(this.msi(s,t.Zei[0],i));return gn(e)}async psi(){const t=await this.wsi.iPt();for(const i of t){const t=await this.cPt.lPt.Wy(i.key);if(t)await _4(t,this.XSt.o,this.cPt.lPt,this.Mei);else try{await this.cPt.lPt.zSt(i,this.Mei)}catch(t){throw new V3("Unable to store manifest with url: "+i.locationURL,t)}}await this.wsi.rPt()}msi(t,i,e){const s=[];for(const n of t.kmt){const t=g4(n,this.XSt.NS.preferredTrackSelection);for(const n of t)s.push(this.ysi(n,i,e))}return gn(s)}async ysi(t,i,e){const s=this.XSt.NS.bandwidth,n=m4(t.KI,s);t.Km===Ci.Bk&&t.Tpt&&t.Tpt.aH.widevine&&"persistent"===t.Tpt.aH.widevine.licenseType&&(await this.Asi(t.Tpt),ii(e));const r=[];for(const t of n)r.push(this.bsi(t,i,e));return gn(r)}async bsi(t,i,e){ii(e);const s=t.mM.ect[0].EO+this.Wei,n=[];let r=!1;for(const h of t.mM.ect){if(h.EO>=s||this.stopIfFailed(r))break;await this.Ssi(e),await this.Tsi.nsi(),n.push(this.Tsi.osi(this.ksi(h,t,i),this.Esi).catch(t=>(r=!0,Promise.reject(t))))}return gn(n)}async Ssi(t){if(null==t?void 0:t.Hg)throw await this.Esi.Qy,new dt}async Psi(){return await this.ko.catch(Ct),this.pCt}Asi(t){return Promise.resolve()}xsi(){return zd.um("License renewal unsupported in this SDK."),Promise.resolve()}async ksi(t,i,e){const s=this.cPt.dPt,n=fG(t.Jei.Yu,t.Jei.Sat),r=await s.Wy(n);if(r)await _4(r,this.XSt.o,s,this.Mei),this.Isi(r,!1);else try{const s=await this.Rsi(t.Jei),{segmentMetadataEntry:n,segmentEntry:r}=this.Csi(t,i,e,s);await this.cPt.uPt(async t=>{await t.dPt.zSt(n,this.Mei),await t.ect.zSt(r,this.Mei)}),this.Isi(n,!0)}catch(i){throw new V3("Unable to store segment with url: "+t.Jei.Yu,i)}}async Rsi(t){const i=await this.Mut.pat(t,{Eat:this.DEFAULT_CACHING_SEGMENT_TIMEOUT,Hk:this.DEFAULT_CACHING_SEGMENT_CONNECTION_TIMEOUT});return await this.Lut(i)}async Lut(t){return{buffer:await t.HT()}}Csi(t,i,e,s){const n=fG(t.Jei.Yu,t.Jei.Sat),r=t.EO,h=t.ct,o=this.Dsi(s);return{segmentMetadataEntry:{key:n,segmentURLsegmentByteRange:n,manifestURL:ia(e),qualityId:i.o,byteSize:o,startsAndEnds:new ve([r,r+h]).kM,references:[this.XSt.o]},segmentEntry:{key:n,segmentURLsegmentByteRange:n,manifestURL:ia(e),data:s,references:[this.XSt.o]}}}Dsi(t){return t.buffer.byteLength}Isi(t,i){const e=t.qualityId,s=this._si,n=s.dO;n.get(e).timeRanges=n.get(e).timeRanges.OM(new ve(t.startsAndEnds)).LM(5e-4),this.fsi=new Os(i?s.qei+t.byteSize:s.qei,n,this.Wei)}stopIfFailed(t){return!1}constructor(t,i,e,s,n,r,h,o){super(),this.DEFAULT_CACHING_SEGMENT_TIMEOUT=3e4,this.DEFAULT_CACHING_SEGMENT_CONNECTION_TIMEOUT=0,this.XSt=void 0,this.cPt=void 0,this.Mei=void 0,this.pCt=void 0,this.Tsi=void 0,this.Esi=new pa,this.dsi=void 0,this.wsi=void 0,this.CSt=void 0,this.Mut=void 0,this.Bct=void 0,this.ssi=void 0,this.ko=void 0,this.Wei=void 0,this.lsi=void 0,this._si=Os.Kei,this.XSt=t,this.cPt=i,this.CSt=e,this.wsi=s,this.Mut=n,this.Bct=r,this.ssi=o,this.Mei=h,this.lsi=-1;const a=this.XSt.Mc.sources[0];this.dsi=a,this.ko=this.qx(),this.Tsi=new f4(this.XSt.NS.parallelTasksThreshold)}};async function _4(t,i,e,s){pi(t.references,i)||(t.references.push(i),await e.zSt(t,s))}function g4(t,i){switch(t.Km){case Ci.Dk:return p4(t.Z,i.audioTrackSelection);case Ci.NT:return p4(t.Z,i.textTrackSelection);default:return p4(t.Z,[])}}function p4(t,i){if(0===i.length)return t.length?[t[0]]:[];const e=[];for(const s of t)i.indexOf(s.bs)>-1&&e.push(s);return e}function m4(t,i){if(!t.length)return[];const e=[...t].sort(LV),s=e.filter(t=>t.kW<=i);return s.length>0?[s.pop()]:[e.shift()]}var w4=class{async Bsi(){await this.cPt.uPt(async t=>{await this.Nsi(t),await this.Msi(t),await this.Lsi(t),await this.Osi(t)})}async Nsi(t){const i=t.fPt,e=this.XSt.o;await i._S(e)}async Msi(t){const i=t.dPt,e=t.ect,s=this.XSt.Mc.sources[0];if(!pr(s))return;const n=ia(s.src),r=(await i.sPt(n,"manifestURL")).filter(t=>pi(t.references,this.XSt.o));for(const t of r)oi(t.references,this.XSt.o),0===t.references.length?(await i._S(t.key),await e._S(t.key)):await i.zSt(t)}async Lsi(t){const i=t.lPt,e=this.Fsi(),s=(await i.jEt(e)).filter(t=>pi(t.references,this.XSt.o));for(const t of s)oi(t.references,this.XSt.o),0===t.references.length?await i._S(t.key):await i.zSt(t)}Fsi(){if(!this.pCt)return[];const t=this.XSt.Mc.sources[0];if(!pr(t))return[];const i=ia(t.src),e=function(t){if(!t)return[];const i=[];for(const e of t.smt)for(const t of e.kmt)for(const e of t.Z)for(const t of e.KI)t.$ei&&i.push(t.$ei);return function(t){return t.reduce((t,i)=>(t.indexOf(i)<0&&t.push(i),t),[])}(i)}(this.pCt).map(t=>({src:t})).map(t=>ia(t.src));return[i,...e]}async Osi(t){const i=t.vPt,e=(await i.iPt()).filter(t=>pi(t.references,this.XSt.o));for(const t of e)oi(t.references,this.XSt.o),0===t.references.length?(await i._S(t.key),this.Usi(t)):await i.zSt(t)}Usi(t){}constructor(t,i,e){this.XSt=void 0,this.cPt=void 0,this.pCt=void 0,this.XSt=t,this.cPt=i,this.pCt=e}},y4=new class{Ret(t,i,e){return new w4(t,i,e)}};r(),r();var A4=class{get Ca(){return this.hu||(this.hu=function(t){return{renew(i){t.Vsi(i)}}}(this)),this.hu}Vsi(t){this.Hsi(t)}async Hsi(t){try{await this.Wsi.xsi(t)}catch(t){0,this.pE.Mot(Yt.ERROR)}}constructor(t,i){this.pE=void 0,this.Wsi=void 0,this.hu=void 0,this.pE=t,this.Wsi=i}},b4=class extends _o{get Oei(){return this.Wsi.Oei}get Ca(){return this.hu||(this.hu=function(t){let i;const e={get id(){return t.o},get status(){return t.hk},get source(){return t.Mc},get parameters(){return t.NS},get duration(){return t.ct},get cached(){return t.qsi._s()},get secondsCached(){return t.zsi},get percentageCached(){return t.Gsi},get bytes(){return t.Xsi},get bytesCached(){return t.jsi},get license(){return t.lQ.Ca},start(){t.Tn()},pause(){t.zx()},remove(){t._S()},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new QD(t,["y4t","Eot"],e),e}(this)),this.hu}get o(){return this.hS}get lQ(){return this.Qsi}get hk(){return this.Not}Mot(t){this.Not!==t&&(this.Not=t,this.So(new Tr))}get Mc(){return this.Ac}get NS(){return this.Ksi}get ct(){return this.Wsi.fsi.ZM}get qsi(){return this.Wsi.fsi.Xei}get zsi(){return this.Wsi.fsi.Gei}get Gsi(){return this.Wsi.fsi.jei}get Xsi(){return this.Wsi.vsi}get jsi(){return this.Wsi.fsi.qei}Tn(){this.Not===Yt.EVICTED||this.Not===Yt.DONE||this.Ysi()}async Ysi(){try{this.Mot(Yt.LOADING);const t=new at;this.Jsi=t,await this.Wsi.mi(t.Yg),this.Mot(Yt.DONE)}catch(t){D(t)?this.Mot(Yt.IDLE):this.Mot(Yt.ERROR)}finally{this.Jsi.zg()}}zx(){this.Jsi.Zg()}_S(){this.hk===Yt.LOADING?(this.wn("Eot",this.evictOnLoading),this.zx()):this.Zsi()}async Zsi(){try{const t=await this.Wsi.Psi();await y4.Ret(this,this.cPt,t).Bsi(),this.Wsi.fsi=Os.Kei,this.Mot(Yt.EVICTED)}catch(t){0,this.Mot(Yt.ERROR)}}constructor(t,i,e,s,n,r){super(),this.hS=void 0,this.Not=void 0,this.hu=void 0,this.Ac=void 0,this.Ksi=void 0,this.cPt=void 0,this.Wsi=void 0,this.Jsi=new at,this.Qsi=void 0,this.evictOnLoading=()=>{this.mn("Eot",this.evictOnLoading),this.Zsi()},this.hS=t,this.Ac=i,this.Ksi=e,this.cPt=s,this.Wsi=n.Ret(this,this.cPt,r),this.Qsi=new A4(this,this.Wsi),this.Not=1===this.Wsi.fsi.jei?Yt.DONE:Yt.IDLE,this.Wsi.wn("y4t",t=>{this.Rs(t),1===this.Gsi&&this.Mot(Yt.DONE)});const h=new Date,o=this.Ksi.expirationDate.getTime()-h.getTime();(function(t){return t<2147483647})(o)&&u(()=>this.Zsi(),o)}};var S4=class{Uei(t,i,e){const s=Ys();return this.Bei(s,t,i,e)}Bei(t,i,e,s){return new b4(t,i,e,this.cPt,this.$si,s)}constructor(t,i){this.cPt=void 0,this.$si=void 0,this.cPt=t,this.$si=i}};r();function T4(t){if(!t)throw new m("Unexpected - The cache parameters are undefined");const i=function(t){if(Z(t)&&!Ho(t,"%"))return x(t);return t}(t.amount);!function(t){if(function(t){return Z(t)&&Ho(t,"%")}(t)){const i=C(t);if(S(i)||i<0||i>100)throw new m("The amount as percentage must be between 0 and 100 percent.")}if(!Z(t)&&S(t))throw new m("The amount must be a number or a string")}(i);const e=function(t){if(!t)return function(){const t=new Date;return t.setMinutes(t.getMinutes()+30),t}();return t}(t.expirationDate);!function(t){if(t&&!function(t){return!t||jd(t)&&t>new Date}(t))throw new m("Invalid expiration date for the cache parameters")}(e);const s=function(t){if(void 0===t)return 1/0;return t}(t.bandwidth);!function(t){if(S(t)||t<0)throw new m("The bandwidth must be between zero and infinity.")}(s);const n=function(t){if(!t)return 5;if(S(t))throw new m("The amount must be a number");return t}(t.numberOfParallelTasks);return{amount:i,expirationDate:e,bandwidth:s,parallelTasksThreshold:n,preferredTrackSelection:{audioTrackSelection:[],textTrackSelection:[]}}}var k4=class{set lii(t){this.tni=t,this.ini=0,this.eni=0,this.sni=void 0}get lii(){return this.tni}B6t(){if(!this.tni)return;const t=this.tni.A0t;for(;this.ini{const t=this.B6t();t&&await this.EGt(t)},this.jti=()=>{const t=this.nni.shift();null==t||t._S()},this.hni=async(t,i)=>{let e=!1;for(;!e;)await t.ww("y4t"),e=1===t.fsi.jei;i.ct<5&&this.zti()},this.VJ=t,this.nV=i,this.nT=new at,this.$si=e,this.Rz=s,this.cPt=new eX}};r(),r();var E4={key:"",segmentURLsegmentByteRange:"",manifestURL:"",qualityId:"",byteSize:0,startsAndEnds:new ve([0,0]).kM,references:[]},P4={key:"",segmentURLsegmentByteRange:"",manifestURL:"",data:""},x4=class t extends qV{async Zct(t,i,e,s){try{return await super.Zct(t,i,e,s)}catch(t){sa(t)}const n=await this.oni.Zct(t,i,e,s);return await this.ani(t,i,n),n}async ani(i,e,s){if(void 0===this.uni)return;const n=this.cPt.dPt,r=fG(i,e),h=await n.Wy(r);if(h)await _4(h,this.uni,n,this.Mei);else try{const i={buffer:s},{segmentMetadataEntry:e,segmentEntry:n}=t.Csi(r,i,this.uni);await this.cPt.uPt(async t=>{await t.dPt.zSt(e,this.Mei),await t.ect.zSt(n,this.Mei)})}catch(t){throw new V3("Unable to store segment with url: "+i,t)}}static Csi(t,i,e){return{segmentMetadataEntry:Mo({},E4,{key:t,segmentURLsegmentByteRange:t,references:[e]}),segmentEntry:Mo({},P4,{key:t,segmentURLsegmentByteRange:t,data:i,references:[e]})}}constructor(t,i,e,s,n){super(t),this.oni=void 0,this.uni=void 0,this.cPt=void 0,this.Mei=void 0,this.oni=new WV(i),this.cPt=e,this.uni=s,this.Mei=n}};var I4=class{Ret(t,i,e){void 0===e&&(e="persistent");const s=t.Mc.sources[0];if(ik(s))throw new m("Caching THEOlive sources is not supported");const n=Boolean(s.useCredentials),r=new JU(this.nV,Za.pk),h=new lG(this.nV,n),o=new bt(i.lPt,i.dPt,i.ect,i.vPt),a=function(t,i,e,s,n){return new x4(i,t,e,s,n)}(this.nV,o,i,t.o,e),u=new vn,c=new mG(pG(h,o),u,t);return this.cni(t,i,c,u,r,a,e)}constructor(t){this.nV=void 0,this.nV=t}},R4=class extends I4{cni(t,i,e,s,n,r,h){return new v4(t,i,e,s,n,r,h,xU())}},C4=R4,D4=class t extends C2{get B3t(){return this}static get C3t(){return mt.U0t}get C3t(){return t.C3t}K9t(t,i,e){i===iu.gnt&&this.n7?Wr(this.C6t([t])):this.dni.push(t)}LP(){return this.lni.Eii?this.lni.MP:this.Hst()}OP(t,i){}Nd(){return this.lni.ct}VP(){return this.lni.UP}HP(){}qP(){}tx(){return this.lni.$P}ix(t){this.$P!==t&&(this.lni.$P=t,this.So(new Ze(this.MP,this.Mx)))}ox(){return this.lni.hx}bx(){return this.lni.Ax}Tx(){return ve.iL()._s()}Cx(){return this.lni.Rx}Nx(){return this.lni.Bx}Lx(){return this.lni.Mx}Ox(t){this.Mx!==t&&(this.lni.Mx=t,this.So(new Ze(this.MP,this.Mx)))}async Gx(){if(this.fni)return;this.So(new Tc(this.MP)),this.vni(),this.dni.length&&(this.fni=this.C6t(this.dni),await this.fni,this.fni=void 0),await this._ni.eii(this.oa.LP());const t=this.gni;4!==t&&1!==t&&5!==t||(!this.G0t&&this.pni.length?this.mni():this.G0t?(this.wni=!0,this.lni.Gx()):(this.i3t(),this.oa.Gx()),this.gni=3)}zx(){3===this.gni&&(this.lni.zx(),this.gni=4)}qti(){this._ni.qti()}Tn(){this.gni=1,this._ni.Tn()}async Xx(){this._ni&&(this._ni.An(),this.yni(!1),this.eei.Xx(),this.gni=5,this.G0t&&(this._ni.dii(this.G0t.uZt),this.G0t=void 0)),this.n7=!1,this.wni=!1,Yo(this.pni),this.G3t&&(this.i3t(),this.oa.be()),Yo(this.dni),await this.lni.Xx(),await this.xii.hr()}rD(){this.lni.p$t(),this.eei.p$t()}Snt(t){this.Cd.ads.allowSkipAdBreak&&(this.Ani=!0,this.bni=t,this.rD())}qx(){this.xii.qx(),this.vni()}F3t(t){return!(t.type!==d.Bw||!this._ni||!this._ni.Zti(-1))&&(this._ni.Yti().then(Ct),!0)}be(){void 0!==this.lni.Iii&&(this.xii.be(),this.lni.be()),void 0!==this.eei.oei&&this.eei.be()}we(){this.xii.we(),this.lni.we(),this.eei.we()}async C6t(t){const[i,e]=await x3.Aei(t,this.nV,this.M3t);if(i.length)this._ni.uii(i),this.M3t.So(new wl),this.G3t||this.oa.hx||await this._ni.eii(this.oa.LP()),0!==this.gni&&5!==this.gni||this.Tn();else{if(0===e.length||e.some(t=>t!==Wi.VAST_EMPTY_RESPONSE&&t!==Wi.VAST_NO_ADS_AFTER_WRAPPER)){const t="Ads could not be loaded.";this.M3t.So(Pa.V3t(new Co(Ic.ADBLOCK,Wi.FILE_NOT_FOUND),t))}this.n7&&!this.G0t&&0===this.pni.length&&this.Sni()}}hii(t){for(const i of t)pi(this.pni,i)||this.pni.push(i);for(const i of t)this.n7&&!this.G3t&&this.mni()}async mni(){if(2!==this.gni&&!this.Tni){0,this.Tni=!0,this.gni=2;const t=this.G0t;this.kni(),this.G0t?(await this.G0t.uZt.Uti(this.M3t),this.Eni()||(this.Tni=!1),this.M3t.So(new b2(this.Pni(this.G0t))),await this.xni()):((null==t?void 0:t.uZt.Vti())&&this.M3t.So(new Fa(this.Pni(t))),this.Tni=!1,this.gni=1,this.Sni())}}Sni(){this.i3t(),this.oa.be(),this.oa.UP?this.oa.So(new At(this.oa.LP())):this.oa.Gx()}kni(){let t;if(this.G0t&&this.Eni())t=this.G0t.uZt;else{if(0===this.pni.length)return;t=this.pni.shift()}if(!t)return;const i=t.Rc();i?this.G0t=i:(this.G0t&&(this._ni.dii(this.G0t.uZt),this.G0t=void 0),this.G0t=void 0)}async xni(){const t=this.G0t?function(t){var i,e;const s=null==(e=t.OZt)||null==(i=e.dKt)?void 0:i.lKt();return void 0===s?void 0:new v1(s)}(this.G0t):void 0;if(t){if(!this.G0t)return;this.Ini=t,this.Rni(this.G0t.NKt),this.Cni(kl.CJt);const i=this.Ini.Rc();this.G0t.uZt.Vti()&&(this.eei.Nii(),1===this.G0t.uZt.aut&&this.M3t.So(new aU(this.Pni(this.G0t)))),await this.qii(i)}else this.gni=1,this.Tni=!1,this.G0t=void 0,this.mni()}async qii(t){if(t){var i;let s=it(t.PKt),n=it(t.RKt);var e;const r=null!=(e=null==(i=t.IKt)?void 0:i.tYt)?e:[],h=r.length>0,o=this.G0t,a=this.Pni(o);if(t.PKt){if(t.PKt.od=o,void 0!==o.Ont.skipOffset){const i=Ha.NZt(o.Ont.skipOffset,t.PKt.ct);void 0!==i&&i0?this.mni():(this.Sni(),this.G0t=o))}else null===t?await this.Bni():this.yni(!0)}Bni(){const t=this.Ini;return this.qii(t&&t.Rc())}yni(t){this.Cni(kl.DJt),this.Nni(),this.gni=1;const i=void 0!==this.G0t&&this.G0t.uZt.Oti();if(this.Tni=!1,!i||this.Ani){if(!this.G3t)return;this.oa.be(),!this.oa.UP&&t&&this.oa.Gx(),void 0!==this.bni&&this.oa.OP(this.bni),this.i3t(),this.Ani=!1,this.bni=void 0}else t&&(this.gni=1,this.mni())}i3t(){this.Mni(),super.i3t()}Mni(){if(this.oa.UP&&(this.gni=5),this.G0t){const t=this.G0t.uZt;t.Vti()&&this.M3t.So(new Fa(this.Pni(this.G0t))),this._ni.dii(t),this.G0t=void 0}}Rni(t){this.Lni=this.Lni.concat(t)}Nni(){this.Lni=[]}Oni(t){this.oa.xe.appendChild(t)}Cni(t){for(const i of this.Lni)i.eX===t&&L$(i.eventURL)}Dni(t){this.lni.Aii(kl.TJt);for(const i of t)L$(i)}get ynt(){return this.G0t?this.Pni(this.G0t):null}get mnt(){return this.G0t?[this.lni.Iii,this.eei.oei].filter(it):[]}get Ant(){const t=this.pni.concat(this._ni.Ant.filter(t=>!t.P0t()));return De(t,t=>t.Cti.Jc.filter(t=>!t.P0t()))}get bnt(){return this._ni.Ant.map(t=>t.Cti)}knt(t){const i=this.J9t();for(const e of i)V$(e.sources,e.timeOffset)||t.M6(e,iu.gnt,!1)}J9t(){const t=[];for(const i of this.mnt.concat(this.Ant))t.push(i.Ont);const i=this.pni.concat(this._ni.Ant.filter(t=>!t.P0t()));for(const e of i)for(const i of e.A0t)i.W||t.push(i.Ont);return t.push(...this.dni),Bo(t)}Eni(){return!!this.G0t&&Pn(this.G0t).some(t=>t.PKt)}Pni(t){return t.uZt.Cti}yei(){return this.Fni}Wx(){return this.xii.Wx()}xP(){return this.xii.xP()}K3t(t){this._ni.K3t(t)}async kn(){await super.kn(),this.oa.mn(d.uo,this.vni),this.M3t.CK(this.lni.M3t),this.M3t.CK(this.eei.M3t),this.M3t.CK(this._ni),this.lni.kn(),this.eei.kn(),await this.xii.kn()}constructor(t,i,e,s,n,r){super(t,i),this.fni=void 0,this.lni=void 0,this.eei=void 0,this._ni=void 0,this.pni=[],this.gni=0,this.G0t=void 0,this.Ini=void 0,this.Lni=[],this.Fni=void 0,this.Tni=!1,this.n7=!1,this.wni=!0,this.xii=void 0,this.Ani=!1,this.bni=void 0,this.dni=[],this.nV=void 0,this.Uni=t=>{t.type===d.uo&&this.wni?this.wni=!1:this.So(t)},this.vni=()=>{this.n7=!0},this.Vni=async()=>(this.gni=1,await this.lni.Nii(),this.qii(this.Ini.Rc())),this.Hni=async t=>{const i=new Co(Ic.PLAYBACK,Wi.GENERAL_LINEAR_ERROR,"There was a problem playing a linear ad.");return this.M3t.So(Pa.V3t(i,t)),await this.lni.Nii(),this.qii(this.Ini.Rc())},this.Wni=()=>(this.eei.Nii(),this.qii(this.Ini.Rc())),this.qni=t=>{const i=new Co(Ic.PLAYBACK,Wi.GENERAL_NON_LINEAR_ERROR,"There was a problem playing a non linear ad.");return this.M3t.So(Pa.V3t(i,t)),this.eei.Nii(),this.qii(this.Ini.Rc())},this.nV=r,this.xii=e,this.eei=new P3(this.qni,this.Wni,this),this.lni=new k3(this.Hni,this.Vni,this.eei,s,this,t.Wu,e),this.Oni(this.eei.fii),this.Oni(this.lni.fii);const h=new k4(s,r,R4,n);this._ni=new g3(this.oa,this,this.M3t,h),this.lni.lw(this.Uni),this.eei.lw(this.Rs),this.M3t.au(this.lni.M3t),this.M3t.au(this.eei.M3t),this.M3t.au(this._ni),this.Fni=new p1(this,this.oa),this.Wu.wn(Rh.yn,this.Rs),this.oa.wn(d.uo,this.vni)}};Qh.Ng.zz(new class{get P3t(){return D4.C3t}qz(t){return t&&("string"!=typeof t.integration||t.integration===ru.DEFAULT||t.integration===ru.CSAI||t.integration===ru.THEO)}x3t(t,i,e){const s=new EF(t.Ost,t.Ql,e);s.ust(t.xe);const n=new dR(t.xe,e,t.SP,t.Dst,t.Fx,s,t.Ql);return new D4(t,i,n,e,t.Dst,t.SP)}M6(t,i,e,s){e.K9t(t,i,s)}sj(t){const i=U0(t.sources);if(!i)return;const e={integration:ru.CSAI,sources:i};"vast"===e.sources.type&&void 0===t.timeOffset?t.timeOffset=0:"vmap"===e.sources.type&&void 0!==t.timeOffset&&Ye("Do not set timeOffset for VMAP ad sources. VMAP ads have their own offsets included.");const s=Ac(t.timeOffset);void 0!==s&&(e.timeOffset=s);const n=Ac(t.skipOffset);return void 0!==n&&(e.skipOffset=n),e}}),r(),r();var B4=class{VY(){var t;this.j6||(null==(t=this.vti)||t.initialize(),this.j6=!0)}get fii(){return this.Q1t}get zni(){return this.Gni.offsetHeight}get Xni(){return this.Gni.offsetWidth}get jni(){return this.vti}Qni(t){"linear"===t?this.Q1t.style.marginTop="0px":"nonlinear"===t&&(this.Q1t.style.marginTop="-45px")}be(){this.Q1t.style.opacity="1",this.Q1t.style.pointerEvents=""}we(){this.Q1t.style.opacity="0",this.Q1t.style.pointerEvents="none"}zg(){var t;null==(t=this.vti)||t.destroy(),this.vti=void 0}constructor(t,i){this.vti=void 0,this.Q1t=void 0,this.Yit=void 0,this.Gni=void 0,this.j6=!1,this.Yit=t;const e=h.createElement("div");e.className="theoplayer-ima-wrapper",oa(e),e.style.zIndex="10",Qt.Ks&&function(t,i){t.addEventListener(i,Bl)}(e,"mousedown"),i.appendChild(e);const s=h.createElement("div");s.className="theoplayer-ima",s.style.height="100%",this.Gni=s,e.appendChild(s),this.Q1t=e,this.vti=new google.ima.AdDisplayContainer(this.Gni,this.Yit)}};r(),r(),r();var N4=class{get UYt(){return this.Kni.getAdId()}get V7t(){const t=this.Kni.getAdPodInfo();if(void 0!==t)try{return{i7t:t.getAdPosition(),p0t:t.getMaxDuration(),Yni:t.getPodIndex(),_Ot:t.getTimeOffset(),e7t:t.getTotalAds(),Jni:t.getIsBumper()}}catch(t){return}}get yKt(){return this.Kni.getAdSystem()}get Zni(){return this.Kni.getAdvertiserName()}get cYt(){var t;return null!=(t=this.Kni.getApiFramework())?t:void 0}get IKt(){return this.iYt.map(t=>({lYt:t.getAdSlotId(),qT:t.getContentType(),p4t:t.getContent(),Mi:t.getHeight(),Ti:t.getWidth()}))}get qT(){var t;return null!=(t=this.Kni.getContentType())?t:void 0}get GKt(){return this.Kni.getCreativeId()}get I9t(){return this.Kni.getCreativeAdId()}get $ni(){return this.Kni.getDealId()}get dB(){return this.Kni.getDescription()}get ct(){return this.Kni.getDuration()}get Ti(){return this.Kni.getWidth()}get Mi(){return this.Kni.getHeight()}get tJt(){var t;return null!=(t=this.Kni.getMediaUrl())?t:void 0}get tri(){return this.Kni.getMinSuggestedDuration()}get P9t(){return this.Kni.getSkipTimeOffset()}get iri(){return this.Kni.getSurveyUrl()}get dq(){return this.Kni.getTitle()}get k9t(){return this.Kni.getTraffickingParameters()}get E9t(){return this.Kni.getTraffickingParametersString()}get CKt(){return this.Kni.getUniversalAdIds().map(t=>({R9t:t.getAdIdRegistry(),C9t:t.getAdIdValue()}))}get Ati(){return this.Kni.getUiElements()}get x9t(){return this.Kni.getVastMediaBitrate()}get S9t(){return this.Kni.getVastMediaHeight()}get b9t(){return this.Kni.getVastMediaWidth()}get m9t(){return this.Kni.getWrapperAdIds()}get w9t(){return this.Kni.getWrapperAdSystems()}get y9t(){return this.Kni.getWrapperCreativeIds()}get D7t(){return this.Kni.isLinear()}constructor(t){this.Kni=void 0,this.iYt=void 0,this.Kni=t;const i=new google.ima.CompanionAdSelectionSettings;i.resourceType=google.ima.CompanionAdSelectionSettings.ResourceType.ALL,i.creativeType=google.ima.CompanionAdSelectionSettings.CreativeType.ALL,i.sizeCriteria=google.ima.CompanionAdSelectionSettings.SizeCriteria.IGNORE,this.iYt=t.getCompanionAds(0,0,i)}};function M4(){return[google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,google.ima.AdEvent.Type.CLICK,google.ima.AdEvent.Type.DURATION_CHANGE,google.ima.AdEvent.Type.EXPANDED_CHANGED,google.ima.AdEvent.Type.STARTED,google.ima.AdEvent.Type.IMPRESSION,google.ima.AdEvent.Type.PAUSED,google.ima.AdEvent.Type.RESUMED,google.ima.AdEvent.Type.AD_PROGRESS,google.ima.AdEvent.Type.AD_BUFFERING,google.ima.AdEvent.Type.FIRST_QUARTILE,google.ima.AdEvent.Type.MIDPOINT,google.ima.AdEvent.Type.THIRD_QUARTILE,google.ima.AdEvent.Type.COMPLETE,google.ima.AdEvent.Type.USER_CLOSE,google.ima.AdEvent.Type.LINEAR_CHANGED,google.ima.AdEvent.Type.LOADED,google.ima.AdEvent.Type.AD_CAN_PLAY,google.ima.AdEvent.Type.AD_METADATA,google.ima.AdEvent.Type.AD_BREAK_READY,google.ima.AdEvent.Type.INTERACTION,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,google.ima.AdEvent.Type.SKIPPED,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,google.ima.AdEvent.Type.LOG,google.ima.AdEvent.Type.VIEWABLE_IMPRESSION,google.ima.AdEvent.Type.VOLUME_CHANGED,google.ima.AdEvent.Type.VOLUME_MUTED]}var L4=class extends Ne{Ox(t){var i;null==(i=this.y0t)||i.setVolume(t)}Lx(){return this.y0t.getVolume()}i9t(){return this.y0t.getRemainingTime()}zg(){Yo(this.qc),this.sc.mn(Rh.yn,this.eri),this.y0t.removeEventListener(google.ima.AdEvent.Type.LOADED,this.sri),this.y0t.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.forwardAdErrorEventListener);for(const t of M4())this.y0t.removeEventListener(t,this.forwardAdEventListener);this.y0t.destroy()}Tn(){this.y0t.start()}cti(){this.y0t.resume()}zx(){this.y0t.pause()}rD(){this.y0t.skip()}Xx(){this.y0t.stop()}O7t(){const t=this.y0t.getCurrentAd();if(t)return this.rri(t)}gti(){return this.y0t.getCuePoints()}rri(t){let i=Jr(this.qc,i=>i.Kni===t);return i||(i=new N4(t),this.qc.push(i)),i}kti(t){this.y0t.updateAdsRenderingSettings(V4(t))}constructor(t,i,e){super(),this.y0t=void 0,this.vti=void 0,this.sc=void 0,this.qc=[],this.sri=t=>{t.getAd().isLinear()?this.vti.Qni("linear"):this.vti.Qni("nonlinear")},this.eri=()=>{this.y0t.resize(this.vti.Xni,this.vti.zni,google.ima.ViewMode.NORMAL)},this.forwardAdEventListener=t=>{const i=t.getAd(),e=function(t){return{[google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED]:Ce.V6t,[google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED]:Ce.H6t,[google.ima.AdEvent.Type.CLICK]:Ce.W6t,[google.ima.AdEvent.Type.DURATION_CHANGE]:Ce.Rw,[google.ima.AdEvent.Type.EXPANDED_CHANGED]:Ce.q6t,[google.ima.AdEvent.Type.STARTED]:Ce.z6t,[google.ima.AdEvent.Type.IMPRESSION]:Ce.G6t,[google.ima.AdEvent.Type.PAUSED]:Ce.Gz,[google.ima.AdEvent.Type.RESUMED]:Ce.X6t,[google.ima.AdEvent.Type.AD_PROGRESS]:Ce.j6t,[google.ima.AdEvent.Type.AD_BUFFERING]:Ce.Q6t,[google.ima.AdEvent.Type.FIRST_QUARTILE]:Ce.K6t,[google.ima.AdEvent.Type.MIDPOINT]:Ce.mJt,[google.ima.AdEvent.Type.THIRD_QUARTILE]:Ce.Y6t,[google.ima.AdEvent.Type.COMPLETE]:Ce.wJt,[google.ima.AdEvent.Type.USER_CLOSE]:Ce.J6t,[google.ima.AdEvent.Type.LINEAR_CHANGED]:Ce.Z6t,[google.ima.AdEvent.Type.LOADED]:Ce.$6t,[google.ima.AdEvent.Type.AD_CAN_PLAY]:Ce.t8t,[google.ima.AdEvent.Type.AD_METADATA]:Ce.i8t,[google.ima.AdEvent.Type.AD_BREAK_READY]:Ce.e8t,[google.ima.AdEvent.Type.INTERACTION]:Ce.s8t,[google.ima.AdEvent.Type.ALL_ADS_COMPLETED]:Ce.n8t,[google.ima.AdEvent.Type.SKIPPED]:Ce.r8t,[google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED]:Ce.h8t,[google.ima.AdEvent.Type.LOG]:Ce.o8t,[google.ima.AdEvent.Type.VIEWABLE_IMPRESSION]:Ce.a8t,[google.ima.AdEvent.Type.VOLUME_CHANGED]:Ce.u8t,[google.ima.AdEvent.Type.VOLUME_MUTED]:Ce.c8t}[t]}(t.type),s={type:e,date:new Date,Int:i?this.rri(i):void 0,S7t:V2(e,t.getAdData())};this.So(s)},this.forwardAdErrorEventListener=t=>{this.So({date:new Date,Int:void 0,type:F2.d8t,S7t:{n9t:q2(t.getError())}})},this.y0t=t,this.vti=i,this.sc=e,this.sc.wn(Rh.yn,this.eri),this.y0t.init(this.vti.Xni,this.vti.zni,google.ima.ViewMode.NORMAL),this.y0t.addEventListener(google.ima.AdEvent.Type.LOADED,this.sri),this.y0t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.forwardAdErrorEventListener);for(const t of M4())this.y0t.addEventListener(t,this.forwardAdEventListener)}};r();var O4=class extends Oi{get hri(){return this.ari}get fii(){return this.Q1t}xa(){return new F4(this.ari)}constructor(t,i){super("xti"),this.ari=void 0,this.Q1t=void 0,this.ari=t,this.Q1t=i}},F4=class extends wp{get adsManager(){return this.ari}constructor(t){super("adsmanagerloaded"),this.ari=void 0,this.ari=t}},U4=class extends Ne{dti(){var t;null==(t=this.lti)||t.contentComplete()}async C6t(t,i,e){if(this.cri)throw new m("Only one ImaAdsRequest can be made at a time.");if(!this.dri.jni)throw new m("AdDisplayContainer is not initialized.");this.lti=new google.ima.AdsLoader(this.dri.jni),this.lti.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoadedListener),this.lti.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsManagerErrorListener),this.cri=new pa,this.lri=i,this.fri=e;const s=new google.ima.AdsRequest;return t.G5t?s.adTagUrl=t.G5t:t.X5t&&(s.adsResponse=t.X5t),s.linearAdSlotWidth=t.U5t,s.linearAdSlotHeight=t.V5t,s.nonLinearAdSlotWidth=t.H5t,s.nonLinearAdSlotHeight=t.W5t,s.contentDuration=t.Q5t,s.setAdWillAutoPlay(t.q5t),s.setAdWillPlayMuted(t.z5t),t.j5t&&(s.omidAccessModeRules=t.j5t),this.lti.requestAds(s),this.cri.Qy}zg(){var t;void 0!==this.lti&&(this.lti.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoadedListener),this.lti.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsManagerErrorListener),this.lti.destroy(),this.lti=void 0),null==(t=this.cri)||t.jy("AdsLoader destroyed"),this.cri=void 0}constructor(t,i){super(),this.lti=void 0,this.sc=void 0,this.dri=void 0,this.cri=void 0,this.lri=void 0,this.fri=void 0,this.onAdsManagerLoadedListener=t=>{if(this.lri&&this.fri&&this.cri){var i;const e=V4(this.fri),s=this.lri,n=t.getAdsManager({get currentTime(){return s.MP},get duration(){return s.ct}},e),r=new L4(n,this.dri,this.sc);this.So(new O4(n,this.dri.fii)),null==(i=this.cri)||i.Xy(r),this.cri=void 0}},this.onAdsManagerErrorListener=t=>{var i;const e={Py:t.getError().getMessage(),s7t:t.getError().getVastErrorCode(),YJt:t.getError().getErrorCode(),Km:H2(t.getError().getType()),n7t:void 0};null==(i=this.cri)||i.jy(e),this.cri=void 0},this.sc=i,this.dri=t}};function V4(t){const i=new google.ima.AdsRenderingSettings;return i.enablePreloading=t.bti,t.Ati&&(i.uiElements=t.Ati),i.mimeTypes=t.yti,void 0!==t.Tti&&(i.playAdsAfterTime=t.Tti),void 0!==t.Sti&&(i.loadVideoTimeout=t.Sti),void 0!==t.T9t&&(i.bitrate=t.T9t),void 0!==t.Tti&&(i.playAdsAfterTime=t.Tti),i.restoreCustomPlaybackStateOnAdBreakComplete=!0,i}r();var H4=class extends Ne{get MP(){return this.oa.kx?this.vri:this.oa.LP()}get ct(){return this.oa.Nd()}get $P(){return this.oa.$P}get Mx(){return this.oa.Mx}hr(){this.vri=0}constructor(t){super(),this.vri=void 0,this.oa=void 0,this.oa=t,this.vri=this.oa.LP(),this.oa.wn(d._y,()=>{this.oa.kx||(this.vri=this.oa.LP()),this.So(new Si(this.MP,void 0))})}};c3.Ng.registerWebImaAdPlayerConstructor(function(t,i,e){o3(e);const s=a3(e)?t.Wx():void 0,n=new B4(s,t.xe),r=new U4(n,t.Wu),h=new H4(t);return new u3(t,i,e,t.Nst,n,r,h)}),r(),r(),r();var W4=class extends Oc{get _ri(){return this.oa===this.Qst?this.J4t:this.Qst}gr(t,i,e,s,n){(n||!s.hx||s.UP)&&this.oa.hx&&this.oa.Gx()}OP(t,i){}BP(t){}gri(t,i){const e=t-this.J4t.pri;return super.OP(e,i)}wri(t){return super.BP(t)}NP(){return this.Qst.bt}nu(){return this.Qst.nu()}Nd(){return this.Qst.Nd()}Tx(){const t=ve.jn(this.Qst.Tx()).Ny(this.J4t.pri);if(this.yri())return t._s();const i=ve.jn(this.J4t.Tx());let e=i;return m6(this.Qst)||(e=t.OM(i)),e=e.Mn(ve.tL(0,this.LP())),e._s()}LP(){return this.Ari(super.LP())}Ari(t){return this.J4t.bri?this.J4t.bri:this.oa===this.J4t?this.J4t.Sri+t:this.J4t.pri+t}DP(){return this.Tri(super.LP())}Tri(t){return this.J4t.kri?this.J4t.kri:this.oa===this.J4t&&this.J4t.Eri?new Date(this.J4t.Eri.getTime()+1e3*t):this.Qst.CP}RP(){const t=ve.jn(this.Qst.RP()).Ny(this.J4t.pri);if(this.yri())return t._s();const i=ve.jn(this.J4t.RP());if(t.An(t.V-1){var i;t.target.removeEventListener("transitionend",this.Xri);const e=null==(i=this.Gri)?void 0:i.parentElement;void 0!==this.Gri&&e&&(e.removeChild(this.Gri),this.Gri=void 0)},this.Wri=s,this.qri=n,this.zri=r}},Z4=class extends J4{yri(){return!0}gr(t,i,e,s,n){super.gr(t,i,e,s,n),q4(this.oa,this._ri),this._ri.$P=!0,this.jri=this.Qst.nt.II.filter(t=>t.Xk===xh.Kn);for(const t of this.jri)t.Xk=xh.Nh;i.style.display="block",i.style.width="45%",i.style.height="45%",i.style.top="27.5%",i.style.transform="scale("+100/45+")",i.style.transformOrigin="left center",e.style.right="0",e.style.top="27.5%",e.style.display="block",e.style.width="45%",e.style.height="45%",e.style.transformOrigin="right center",e.style.transform="scale(0)",e.getBoundingClientRect(),e.style.transition="transform 1s ease-in-out",e.style.transform="scale(1) translateX(-"+2.5/45*100+"%)",i.style.transition="transform 1s ease-in-out",i.style.transform="scale(1) translateX("+2.5/45*100+"%)"}mr(t,i,e){var s;super.mr(t,i,e),i.style.width="100%",i.style.height="100%",i.style.top="",i.style.transform="scale(0.45) translateX("+2.5/45*100+"%)",i.style.transformOrigin="left center",i.style.transition="",i.getBoundingClientRect(),i.style.transform="",i.style.transition="transform 1s ease-in-out",i.addEventListener("transitionend",this.Qri),e.style.transform="scale(0)",e.addEventListener("transitionend",this.Kri);for(const t of null!=(s=this.jri)?s:[])t.Xk=xh.Kn;this.jri=void 0}HP(){return this.Qst.HP()||this.J4t.HP()}qP(){return this.Qst.qP()||this.J4t.qP()}bx(){return _.min(this.Qst.Ax,this.J4t.Ax)}Gx(){this.Qst.Gx(),this.J4t.Gx()}constructor(t,i,e,s,n){super(t,i,i,e,s,n),this.jri=void 0,this.Qri=t=>{const i=t.target;i.removeEventListener("transitionend",this.Qri),i.style.transform="",i.style.transition="",i.style.transformOrigin=""},this.Kri=t=>{const i=t.target;i.removeEventListener("transitionend",this.Kri),i.style.display="none",i.style.width="100%",i.style.height="100%",i.style.right="",i.style.top="",i.style.transition="",i.style.transform="",i.style.transformOrigin=""}}};r();var $4=class extends J4{gr(t,i,e,s,n){super.gr(t,i,e,s,n),this._ri.zx();const r=this.xri(i,e);r.style.display="block",r.getBoundingClientRect()}constructor(t,i,e,s,n,r){super(t,i,e,s,n,r),this.Yri=t=>{const i=t.target;i.removeEventListener("transitionend",this.Yri),i.style.transition=""}}},t5=class extends $4{yri(){return!0}xri(t,i){return t}Iri(t,i){return i}gr(t,i,e,s,n){super.gr(t,i,e,s,n);const r=this.xri(i,e);r.style.transform="\n translate(-50%, -50%)\n scale(calc(43/60))\n translate(calc(50% + 100%/30), calc(50% + 100%/30))\n ",r.style.transition="transform 1s ease-in-out"}mr(t,i,e){super.mr(t,i,e);const s=this.xri(i,e);s.style.display="",s.style.transform="",s.addEventListener("transitionend",this.Yri)}constructor(t,i,e,s,n){super(t,i,t,e,s,n)}},i5=class extends $4{yri(){return!1}xri(t,i){return i}Iri(t,i){return t}gr(t,i,e,s,n){super.gr(t,i,e,s,n);for(const t of[i,e])t.style.transform="\n translate(-50%, -50%)\n scale(calc(43/60))\n translate(calc(50% + 100%/30), calc(50% + 100%/30))\n ",t.style.transition="transform 1s ease-in-out"}mr(t,i,e){super.mr(t,i,e);const s=this.xri(i,e);s.style.display="none",s.style.transform="",s.style.transition="";const n=this.Iri(i,e);n.style.display="",n.getBoundingClientRect(),n.style.transform="",n.addEventListener("transitionend",this.Yri)}Gx(){super.Gx(),Qt.X_&&(this._ri.$P=!0,this._ri.Gx())}constructor(t,i,e,s,n){super(t,i,i,e,s,n)}};r(),r(),r();var e5=class extends Oc{gr(t,i){}mr(t){}},s5=class extends e5{OP(t,i){}},n5=class extends e5{OP(t,i){}gr(t,i){i.style.backgroundImage="url('"+this.Wri+"')",i.style.backgroundSize="contain",i.style.backgroundPosition="center",t.style.transition="transform 1s ease-in-out",t.style.transform="\n translate(-50%, -50%)\n scale(calc(43/60))\n translate(calc(50% + 100%/30), calc(50% + 100%/30))\n "}mr(t){t.style.transform="",t.addEventListener("transitionend",this.Yri)}constructor(t,i){super(t),this.Wri=void 0,this.Yri=t=>{const i=t.target;i.removeEventListener("transitionend",this.Yri),i.style.transition="transform 1s ease-in-out"},this.Wri=i}};r();var r5=class extends Oi{xa(){return new h5(this.interstitial.wnt())}constructor(t){super("Jri"),this.interstitial=void 0,this.interstitial=t}},h5=class extends wp{constructor(t){super("interstitialbegin"),this.interstitial=void 0,this.interstitial=t}};function o5(t){return{get id(){return t.o},get duration(){return t.ct},get startTime(){return t.EO},get type(){return"adbreak"},get layout(){return function(t){switch(t){case Ws.SINGLE:return"single";case Ws.DOUBLE:return"double";case Ws.LSHAPE_CONTENT:case Ws.LSHAPE_AD:return"l-shape"}}(t.Zri)},get ads(){return t.Jc.map(t=>t.wnt())},get backdropUri(){return t.$ri},get adTagParameters(){return t.Hri},set adTagParameters(i){Kd(i)?t.Hri=i:zd.dm("Incorrect ad tag parameters type, expecting a Record.")}}}r(),r(),r(),r();var a5=function(t){return t.image="image",t}({}),u5=function(t){return t.png="png",t.svg="svg",t}({}),c5=class extends Y4{get Km(){return"overlay"}get AYt(){return this.thi}get ihi(){return this.ehi}er(t){var i,e;this.ehi=null!=(i=t.imageUrl)?i:this.ehi,this.thi=null!=(e=t.clickThrough)?e:this.thi,super.er(t)}wnt(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get type(){return"overlay"},get id(){return t.o},get duration(){return t.ct},get startTime(){return t.EO},get clickThrough(){return t.AYt},get imageUrl(){return t.ihi},get position(){return function(t){return{get top(){return t.z9},get bottom(){return t.q9},get left(){return t.W9},get right(){return t.H9}}}(t.mo)},get size(){return function(t){return{get width(){return t.Ti},get height(){return t.Mi}}}(t.Vy)},get adTagParameters(){return t.Hri},set adTagParameters(i){Kd(i)?t.Hri=i:zd.dm("Incorrect ad tag parameters type, expecting a Record.")}}}(this)}constructor(t){super(t),this.hu=void 0,this.shi=void 0,this.mo=void 0,this.Vy=void 0,this.nhi=void 0,this.rhi=void 0,this.LJt=void 0,this.thi=void 0,this.ehi=void 0,this.shi=t.Km,this.mo=t.mo,this.Vy=t.Vy,this.nhi=t.nhi,this.rhi=t.rhi,this.LJt=t.LJt,this.thi=t.hhi}};r();var d5=class extends Y4{get Km(){return"adbreak"}get Jc(){return this.qc}er(t){var i;t.ad&&this.qc.push(t.ad),this.$ri=null!=(i=t.backdropUri)?i:this.$ri,this.ohi=t.backdropClickThrough,this.ahi=t.backdropImpressionUrl,super.er(t)}wnt(){var t;return null!=(t=this.hu)?t:this.hu=o5(this)}constructor(t){super(t),this.hu=void 0,this.qc=[],this.nyt=void 0,this.uhi=void 0,this.Zri=void 0,this.dhi=void 0,this.lhi=void 0,this.fhi=void 0,this.vhi=void 0,this.$ri=void 0,this.ohi=void 0,this.ahi=void 0,this.nyt=t.nyt,this.uhi=t.uhi,this.Zri=t.Zri||Ws.SINGLE,this.dhi=t.dhi,this.lhi=t.lhi,this.vhi=t._hi,this.$ri=t.ghi,this.fhi=t.fhi}};r(),r();var l5=class extends Le{phi(t){this.qc.push(t)}get _x(){return this.mhi._x}get MZt(){return mt.ont}get p0t(){var t;return null!=(t=this.mhi.ct)?t:-1}get _Ot(){return this.mhi.EO}get X$t(){}get whi(){return this.mhi}constructor(t){var i;super(t.EO),this.mhi=void 0,this.mhi=t,this.m0t=null!=(i=this.mhi.ct)?i:-1}};r(),r();var Fn=class extends Ps{xa(){return _a(this)}get MZt(){return mt.ont}constructor(t){super(t,function(t){return t===Ws.LSHAPE_CONTENT?bi.a4t:bi.hZt}(t.whi.Zri)),t.phi(this)}};var f5=class extends Fn{constructor(t,i){super(t),this.WA=_.min(i,this.od.p0t)}};r();var Wn="ott_placement",v5=class{async yhi(t,i,e){const s=new wr(i);s.set("iu",t.Ahi),s.set("sz",t.bhi),s.set("c",String(this.Shi));const n="https://securepubads.g.doubleclick.net/gampad/adx?"+s.toString();return await this.Thi(n,e)}async Thi(t,i){const e=new $n({Yu:t,dk:M.DT,Uk:X.GET,Yg:i});try{const t=await this.nV.lk(e);return await t.ck()}catch(t){throw new Co(Ic.NETWORK,Wi.UNKNOWN_AD_RESPONSE,"The ad source could not be loaded.",t)}}constructor(t){this.Shi=(new Date).getTime(),this.nV=void 0,this.nV=t}},_5=function(t){return t.khi="0",t.jw="1",t.Ehi="2",t.PICTURE_IN_PICTURE="3",t.Phi="4",t.xhi="5",t.Ihi="99",t}({});function g5(t){switch(t){case Ws.DOUBLE:return"3";case Ws.SINGLE:return"0";case Ws.LSHAPE_AD:case Ws.LSHAPE_CONTENT:return"4"}}var p5=function(t){return t.AD_LOADING="adloading",t.AD_LOADED="adloaded",t.AD_PAUSED="adpaused",t.AD_ERROR="aderror",t.AD_ENDED="adended",t}({}),Qr=function(t){return t[t.GOOGLE=0]="GOOGLE",t[t.DEFAULT=1]="DEFAULT",t[t.COMPANION=2]="COMPANION",t[t.CSAI=3]="CSAI",t}({}),Ln=class extends Ne{get A0t(){return this.X0t}get Rhi(){return this.Chi}get ynt(){return this.G0t}get B9t(){return this.M0t}Dhi(){return Boolean(this.Chi)}Bhi(t){}Nhi(t){}Mhi(t){this.Lhi=this.Ohi(t),this.Fhi=!t[Wn]}Ohi(t){const i=Ua(t);return t[Wn]||(i[Wn]=g5(Ws.SINGLE)),i}Uhi(t){if(!this.Fhi)return;const i=this.Lhi[Wn],e=g5(t);i!==e&&(this.Lhi[Wn]=e)}async Vhi(t,i){if(t.vhi)try{const e={ott_placement:_5.Phi},s=await this.Hhi.yhi(t.vhi,e,i);t.er({backdropUri:null==s?void 0:s.image,backdropClickThrough:null==s?void 0:s.clickThrough,backdropImpressionUrl:null==s?void 0:s.impression})}catch(t){throw new m("Could not load the backdrop")}}Whi(t,i){let e;if(t.EOi.whi===t)}Ghi(){this.J4t.wn(d.Ww,this.Xhi),this.J4t.wn(Do.yM,this.jhi),this.J4t.wn(d._y,this.H6),this.J4t.wn(d.Bw,this.Qhi),this.J4t.wn(Mc.ma,this.vQt)}Khi(){this.J4t.mn(d.Ww,this.Xhi),this.J4t.mn(Do.yM,this.jhi),this.J4t.mn(d._y,this.H6),this.J4t.mn(d.Bw,this.Qhi),this.J4t.mn(Mc.ma,this.vQt)}bd(t){var i;null==(i=this.Chi)||i.Mri(this.Ari(t.currentTime))}async Yhi(t,i,e,s){const n={stack:[],error:void 0,hasError:!1};try{var r;null==(r=this.rV)||r.Zg();const h=Be(n,at.ep([i]),!1);this.rV=h;const o=h.Yg;return ii(o),await this.J4t.Yhi(Cn(t),e,s,o)}catch(t){n.error=t,n.hasError=!0}finally{Cs(n)}}d7t(t){void 0!==this.Jhi?(this.Chi=this.Jhi,this.Jhi=void 0,this.G0t=this.X4t(this.Chi),this.M0t=new f5(this.G0t,this.J4t.Nd()),this.Chi.er({ad:this.B9t}),this.s5t.So(new aU(this.G0t)),this.s5t.So(new dc(this.M0t,t))):zd.um("Expected an ad to start.")}Bd(t){this.Chi&&(this.Chi.Mri(t),this.Chi._x=!0,this.zhi(this.Chi),this.Chi=void 0),this.M0t&&(this.s5t.So(new bc(this.M0t,t)),this.M0t=void 0),this.G0t?(this.s5t.So(new Fa(this.G0t)),this.G0t=void 0):(zd.um("An ad break has ended without realizing we are in an ad break."),this.So(new wp("adended")))}Ari(t){var i,e;return(null!=(e=null==(i=this.Chi)?void 0:i.EO)?e:0)+t}async hr(){var t;null==(t=this.rV)||t.Zg(),this.rV=void 0,this.Khi(),this.X0t=[],this.M0t=void 0,this.G0t=void 0,this.Chi=void 0,this.Jhi=void 0}async kn(){await this.hr(),await this.Zhi.kn()}constructor(t,i,e,s,n={}){super(),this.J4t=void 0,this.Zhi=void 0,this.s5t=new Sc,this.Hhi=void 0,this.X0t=[],this.G0t=void 0,this.M0t=void 0,this.Chi=void 0,this.Jhi=void 0,this.Lhi=void 0,this.Fhi=!0,this.rV=void 0,this.H6=t=>{this.bd(t)},this.Xhi=()=>{this.So(new wp("adloading"))},this.jhi=()=>{this.So(new wp("adloaded"))},this.Qhi=t=>{this.Bd(this.Ari(this.J4t.LP()))},this.vQt=()=>{this.So(new Pa(Ic.GENERAL))},this.J4t=t,this.Zhi=i,this.X0t=e,this.Hhi=s,this.Zhi.$hi(this),this.s5t=i.M3t,this.Lhi=this.Ohi(n),this.Fhi=!n[Wn]}},m5="com.theoplayer.theoads.interstitial",w5="com.theoplayer.theoads.overlay",y5="X-ASSET-URI",A5="X-ASSET-URI-VAST",b5=class{get toi(){return this.ioi}eoi(t){this.soi=new EventSource(t),this.soi.addEventListener("adbreak",this.noi),this.soi.addEventListener("overlay",this.roi),this.soi.addEventListener("streaminfo",this.hoi)}ooi(t){if(!pi(this.aoi,t)){this.aoi.push(t);for(const i of t.II)this.uoi(i);t.wn(Vt.eI,this.Wn),t.wn(Vt.nI,this.Gn)}}coi(t){if(pi(this.aoi,t)){oi(this.aoi,t),t.mn(Vt.eI,this.Wn),t.mn(Vt.nI,this.Gn);for(const i of t.II)this.doi(i)}}uoi(t){!this.loi&&function(t){return t.Lt===Ao.VU&&t.Km===nh.DATE_RANGE}(t)&&this.foi!==t?this.voi(t):this.loi&&function(t){return t.Lt===Ao.VU&&t.Km===nh.ID3}(t)&&this._oi!==t&&this.goi(t)}doi(t){this.foi===t?this.voi(void 0):this._oi===t&&this.goi(void 0)}voi(t){const i=this.foi;if(void 0!==i){if(i.L)for(const t of i.L.II)this.poi(t);i.mn(Te.hI,this.moi),i.mn(Te.cI,this.woi),i.mn(Te.lI,this.yoi),i.mn(Te.aI,this.Aoi),i.Xk=xh.JI}if(this.foi=t,void 0!==t){if(t.L)for(const i of t.L.II)this.boi(i);t.wn(Te.hI,this.moi),t.wn(Te.cI,this.woi),t.wn(Te.lI,this.yoi),t.wn(Te.aI,this.Aoi),t.Xk=xh.JI}}goi(t){const i=this._oi;if(void 0!==i){if(i.L)for(const t of i.L.II)this.poi(t);i.mn(Te.hI,this.Soi),i.mn(Te.lI,this.yoi),i.mn(Te.aI,this.Aoi),i.Xk=xh.JI}if(this._oi=t,void 0!==t){if(t.L)for(const i of t.L.II)this.Toi(i);t.wn(Te.hI,this.Soi),t.wn(Te.lI,this.yoi),t.wn(Te.aI,this.Aoi),t.Xk=xh.JI}}koi(t){try{var i,e;const s=JSON.parse(t.data),n=s.networkCode,r=null==(i=s.assetKeys)?void 0:i[0];this.Poi.Eoi(n,r),null==(e=this.soi)||e.removeEventListener("streaminfo",this.hoi)}catch(t){zd.dm("Error parsing the Server sent stream info",t)}}xoi(t){const i=this.Poi.CP;if(void 0!==i)try{const n=JSON.parse(t.data);var e;const r=null!=(e=n.podDuration)?e:n.adBreakDuration;if(void 0===r)return void zd.dm("Tried to schedule an ad break without knowing the duration");const h=(Date.parse(n.startDate)-i.getTime())/1e3;if(h<=-r)return;const o=this.Poi.LP()+h,a=n.networkCode,u=n.assetKey,c=n.podId?x(n.podId):void 0,d=this.Ioi(Ws[n.layout]),l=n.assetURIVAST,f=void 0!==u&&void 0!==a||c,v=!f&&void 0!==l;var s;let _=null!=(s=n.assetURI)?s:"";f?_="theo-ads://dai.break/?d="+r:v&&(_=l);const g=this.Roi(d,_,v),p=new d5({o:n.id,EO:o,nyt:_,uhi:g,Zri:d,dhi:a,lhi:u,DLt:r,Vri:c,ghi:n.backdropURI,_hi:S5(n.backdropURIGamProperties),Rvt:n.startPTS,fhi:n.eabnVersion});this.qhi(p,void 0)}catch(t){zd.dm("Error parsing the Server sent event",t)}else zd.dm("Tried to schedule an ad break without knowing the Program Date Time of the player")}Coi(t){const i=this.Poi.CP;if(void 0!==i)try{var e;const s=JSON.parse(t.data),n=s.duration;if(void 0===n)return void zd.dm("Tried to schedule an overlay without knowing the duration");const r=(Date.parse(s.startDate)-i.getTime())/1e3;if(r<=-n)return;const h=this.Poi.LP()+r,o=a5[s.type],a=new c5({o:s.id,Km:o||a5.image,EO:h,DLt:n,mo:k5(s.position),Vy:E5(s.size),nhi:s.opacity,rhi:S5(s.gamProperties),LJt:null==(e=s.resourceURI)?void 0:e.map(t=>T5(t)),hhi:s.clickThroughURI});this.qhi(a,void 0)}catch(t){zd.dm(t)}else zd.dm("Tried to schedule an overlay without knowing the Program Date Time of the player")}boi(t){if((t.RLt===m5||t.RLt===w5)&&(t.BLt[y5]||t.BLt[A5]))switch(t.RLt){case w5:this.Doi(t);break;case m5:this.Boi(t)}}Doi(t){try{var i;if(void 0===t.ct&&void 0===t.DLt)return;const e=atob(t.BLt["X-COM-THEOPLAYER-THEOADS-OVERLAY-PROPERTIES"]),s=JSON.parse(e),n=a5[s.type],r=this.Poi.Noi(t.EO),h=isFinite(t.PO)?this.Poi.Noi(t.PO):void 0,o=new c5({o:t.o,Km:n||a5.image,EO:r,PO:h,ct:t.ct,DLt:t.DLt,mo:k5(s.position),Vy:E5(s.size),nhi:s.opacity,rhi:S5(s.gamProperties),LJt:null==(i=s.resourceURI)?void 0:i.map(t=>T5(t)),hhi:s.clickThroughURI});this.qhi(o,t)}catch(t){zd.dm(t)}}Boi(t){const i=t.BLt["X-RESUME-OFFSET"];if(void 0===t.ct&&void 0===t.DLt&&void 0===i)return;const e=t.BLt[y5],s=t.BLt[A5],n=n2(e)?function(t){const i=t.split("?")[1],e={},s=new URLSearchParams(i);return e.d=Number(s.get("d"))||void 0,e.k=s.get("k")||void 0,e.n=s.get("n")||void 0,e.p=Number(s.get("p"))||void 0,e}(e):void 0,r=null==n?void 0:n.n,h=null==n?void 0:n.k,o=this.Poi.Noi(t.EO),a=isFinite(t.PO)?this.Poi.Noi(t.PO):void 0,u=this.Ioi(Ws[t.BLt["X-COM-THEOPLAYER-THEOADS-LAYOUT"]]),c=t.BLt["X-COM-THEOPLAYER-THEOADS-BACKDROP-GAMPROPERTIES"],d=c?JSON.parse(atob(c)):void 0,l=null==n?void 0:n.p,f=!(void 0!==r&&void 0!==h||l)&&void 0!==t.BLt[A5],v=f?s:e,_=this.Roi(u,v,f),g=new d5({o:t.o,EO:o,nyt:v,uhi:_,Zri:u,dhi:r,lhi:h,ghi:t.BLt["X-COM-THEOPLAYER-THEOADS-BACKDROP"],_hi:S5(d),PO:a,ct:t.ct,DLt:t.DLt,Vri:l,Ori:void 0!==i?Number(i):void 0});this.qhi(g,t),this.Moi=g}Ioi(t){return t===Ws.LSHAPE_CONTENT?t:this.Loi||t}Roi(t,i,e){return t===Ws.LSHAPE_CONTENT?Qr.COMPANION:e?Qr.CSAI:n2(i)?Qr.GOOGLE:Qr.DEFAULT}Toi(t){const i=t.U;if(!function(t){return"GEO"===t.id||"GEOB"===t.id}(i)||!function(t){return"Anvatos"===t.description&&"application/json"===t.mimeType}(i))return;const e=vr(new DataView(i.data),new Ui),s=new wr(e),n=s.get("type");if("cue"===n){let i=Number(s.get("duration"))/1e3||void 0;const e=new wr(s.get("payload")),n=Number(e.get("dur"))||void 0,r=Number(e.get("s_bd"))||void 0;if(void 0!==n?i=n:void 0!==r&&(i=r/10),!i)return void 0;const h="theo-ads://dai.break/?d="+i,o=Number(s.get("pts"))||void 0,a=this.Poi.Noi(t.EO),u=this.Ioi(Ws.SINGLE),c=new d5({o:t.o,EO:a,nyt:h,uhi:Qr.GOOGLE,Zri:u,DLt:i,Rvt:o});this.qhi(c,t)}else if("cue_end"===n){const i=this.Moi;i&&i.er({ct:this.Poi.Noi(t.EO)-i.EO})}}Ooi(t){const i=this.Foi.get(t.jI);i&&this.Poi.Uoi(i.EO)}Voi(t){for(const i of this.ioi)if(t.o===i.o&&t.Km===i.Km)return!0;return!1}Hoi(t){const i=[];if(0===this.Poi.Tx().length)return zd.um("Seekable is undefined."),!1;const e=this.Poi.Tx().start(0);for(const s of this.Woi)if(s.Bri=s||(this.ioi.push(t),i?this.Foi.set(i.jI,t):this.Woi.push(t),this.Poi.qhi(t))}qoi(t){const i=this.Foi.get(t.jI);if(void 0===i)return;const e=t.BLt["X-RESUME-OFFSET"],s=isFinite(t.PO)?this.Poi.Noi(t.PO):void 0;i.er({ct:t.ct,PO:s,Ori:void 0!==e?Number(e):void 0})}poi(t){this.zoi(t)}zoi(t){void 0!==this.Foi.get(t.jI)&&this.Foi.delete(t.jI)}Goi(t){t.forEach(t=>this.zhi(t))}zhi(t){oi(this.ioi,t)}hr(){var t,i,e,s;this.Moi=void 0,this.voi(void 0),this.goi(void 0);for(const t of this.aoi.slice())this.coi(t);Yo(this.aoi),Yo(this.ioi),Yo(this.Woi),this.Foi.clear(),null==(t=this.soi)||t.removeEventListener("adbreak",this.noi),null==(i=this.soi)||i.removeEventListener("overlay",this.roi),null==(e=this.soi)||e.removeEventListener("streaminfo",this.hoi),null==(s=this.soi)||s.close(),this.soi=void 0}kn(){this.hr()}constructor(t){this.Poi=void 0,this.loi=!1,this.Loi=void 0,this.ioi=[],this.Woi=[],this.Foi=ar(),this.Moi=void 0,this.aoi=[],this.foi=void 0,this._oi=void 0,this.soi=void 0,this.Wn=t=>{this.uoi(t.Ht)},this.Gn=t=>{this.doi(t.Ht)},this.moi=t=>{this.boi(t.TO)},this.Soi=t=>{this.Toi(t.TO)},this.yoi=t=>{this.Ooi(t.TO)},this.Aoi=t=>{this.poi(t.TO)},this.woi=t=>{this.qoi(t.TO)},this.noi=t=>{this.xoi(t)},this.roi=t=>{this.Coi(t)},this.hoi=t=>{this.koi(t)},this.Poi=t}};function S5(t){if(!t)return;let i=t.sz.default;return Qt.Ks&&t.sz.phone?i=t.sz.phone:Qt.og&&t.sz.tv&&(i=t.sz.tv),{Ahi:t.iu,bhi:i}}function T5(t){const i=u5[t.type];let e=t.default;return Qt.Ks&&t.phone?e=t.phone:Qt.og&&t.tv&&(e=t.tv),{Km:i,nyt:e}}function k5(t){let i,e,s,n;return t.top&&t.top>=0&&t.top<=100?i=t.top:t.bottom&&t.bottom>=0&&t.bottom<=100?e=t.bottom:i=10,t.left&&t.left>=0&&t.left<=100?s=t.left:t.right&&t.right>=0&&t.right<=100?n=t.right:s=10,{z9:i,q9:e,W9:s,H9:n}}function E5(t){let i,e;return i=t.width&&t.width>=0&&t.width<=100?t.width:10,e=t.height&&t.height>=0&&t.height<=100?t.height:10,{Ti:i,Mi:e}}r();var P5=class extends Ne{get Xoi(){return this.oa.Xoi.map(t=>t.wnt())}get joi(){return this.oa.joi.map(t=>t.wnt())}Mhi(t){Kd(t)?this.oa.Mhi(t):zd.dm("Incorrect ad tag parameters type, expecting a Record.")}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get currentInterstitials(){return t.Xoi},get scheduledInterstitials(){return t.joi},replaceAdTagParameters(i){t.Mhi(i)},addEventListener(i,e){t.wn(i,e)},removeEventListener(i,e){t.mn(i,e)}}}(this)}constructor(t){super(),this.oa=void 0,this.hu=void 0,this.oa=t}};r();var x5=class{$hi(t){this.Qoi=t}get M3t(){return this.s5t}get G3t(){var t;return void 0!==(null==(t=this.Qoi)?void 0:t.ynt)}get C3t(){return mt.ont}get mnt(){var t;return(null==(t=this.Qoi)?void 0:t.B9t)?[this.Qoi.B9t]:[]}get ynt(){var t,i;return null!=(i=null==(t=this.Qoi)?void 0:t.ynt)?i:null}get Ant(){return this.Qoi?De(this.Qoi.A0t,t=>{var i;const e=t.Jc;if(t===(null==(i=this.Qoi)?void 0:i.ynt)&&void 0!==this.Qoi.B9t){const t=e.indexOf(this.Qoi.B9t);if(t>=0)return e.slice(t+1)}return t._x?[]:e}):[]}get bnt(){return this.Qoi?this.Qoi.A0t.filter(t=>{var i;return t===(null==(i=this.Qoi)?void 0:i.ynt)||!t._x}):[]}rD(){}Snt(t){}knt(t){}kn(){return this.Qoi=void 0,Promise.resolve()}constructor(){this.s5t=new Sc,this.Qoi=void 0}};r();var I5=class{get Xoi(){return this.Koi}get Hri(){return this.Lhi}set Hri(t){this.Lhi=t}async Yoi(t){this.Koi.push(t),this.Joi.style.display="";const i=h.createElement("div");i.className="theoplayer-theoads-overlay",i.style.display="",this.Zoi.set(t.o,i);const e=h.createElement("a"),s=await this.$oi(t);if(s.clickThroughURI&&(this.Joi.style.zIndex="11",e.href=s.clickThroughURI,e.target="Xu",e.setAttribute("rel","noopener"),e.addEventListener("mousedown",this.Tii),e.addEventListener("touchend",this.Tii)),t.shi===a5.image&&(e.style.backgroundImage="url("+s.resourceURI+")",e.style.backgroundSize="contain",e.style.backgroundPosition="center",e.style.backgroundRepeat="no-repeat",s.impressionURI)){const t=h.createElement("img");t.src=s.impressionURI,t.style.display="none",e.appendChild(t)}oa(e),function(t,i){t.style.position="absolute";const e=i.mo;e.W9&&(t.style.left=e.W9+"%");e.H9&&(t.style.right=e.H9+"%");e.z9&&(t.style.top=e.z9+"%");e.q9&&(t.style.bottom=e.q9+"%");const s=i.Vy;s.Ti&&(t.style.width=s.Ti+"%");s.Mi&&(t.style.height=s.Mi+"%");i.nhi&&i.nhi>0&&i.nhi<=100&&(t.style.opacity=""+i.nhi/100)}(i,t),i.appendChild(e),this.Joi.appendChild(i)}tai(t){const i=this.Zoi.get(t.o);i&&(this.Joi.contains(i)&&this.Joi.removeChild(i),this.Zoi.delete(t.o),0===this.Zoi.size&&(this.Joi.style.display="none"),oi(this.Koi,t))}iai(){this.Zoi.forEach(t=>{this.Joi.contains(t)&&this.Joi.removeChild(t)}),this.Zoi.clear(),this.Koi=[]}async $oi(t){const i={resourceURI:""};let e;if(t.rhi){const i=Mo({},this.Lhi,t.Hri);i&&!i[Wn]&&(i[Wn]=_5.xhi),e=await this.eai.yhi(t.rhi,i)}if(e)i.resourceURI=e.image,i.impressionURI=e.impression;else if(t.LJt){const e=Jr(t.LJt,t=>t.Km===u5.svg);e&&(i.resourceURI=e.nyt);const s=Jr(t.LJt,t=>t.Km===u5.png);s&&(i.resourceURI=s.nyt)}var s;return i.clickThroughURI=null!=(s=null==e?void 0:e.clickThrough)?s:t.AYt,t.er({imageUrl:i.resourceURI,clickThrough:i.clickThroughURI}),i}hr(){this.iai(),this.Joi.style.display="none"}constructor(t,i,e){this.oa=void 0,this.Lhi=void 0,this.Koi=[],this.Joi=void 0,this.Zoi=qh(),this.eai=void 0,this.gn=void 0,this.stt=t=>{s2(this.Joi,this.oa.Bx,this.oa.Rx,t.width,t.height)},this.CXt=()=>{s2(this.Joi,this.oa.Bx,this.oa.Rx,this.gn.Eu,this.gn.Iu)},this.Tii=t=>{t.stopPropagation()},this.oa=t,this.eai=e;const s=h.createElement("div");s.style.display="none",s.className="theoads-image-overlays-container",oa(s),i.appendChild(s),this.Joi=s,this.gn=new Oe(i),this.gn._n(),this.gn.wn(Rh.yn,this.stt),this.oa.wn(d.Jw,this.CXt)}};r();var R5=class extends wp{constructor(t){super("addinterstitial"),this.interstitial=void 0,this.interstitial=t}};r();var C5=class extends Oi{xa(){return new D5(this.interstitial.wnt())}constructor(t){super("nai"),this.interstitial=void 0,this.interstitial=t}},D5=class extends wp{constructor(t){super("interstitialend"),this.interstitial=void 0,this.interstitial=t}};r();var rh=class extends Oi{xa(){return new B5(this.interstitial.wnt(),this.Py)}constructor(t,i){super("rai"),this.interstitial=void 0,this.Py=void 0,this.interstitial=t,this.Py=i}},B5=class extends wp{constructor(t,i){super("interstitialerror"),this.interstitial=void 0,this.message=void 0,this.interstitial=t,this.message=i}};r();var N5=class extends Ln{get uhi(){return Qr.DEFAULT}IW(t,i,e){return Promise.resolve()}hai(t,i,e,s){void 0===s&&(s=!1),this.Jhi=t;const n=this.Whi(t,i),r={sources:{src:t.nyt}};return this.Yhi(r,e,n,s)}async oai(t,i,e){return this.Jhi=t,t.nyt}Ghi(){super.Ghi(),this.J4t.wn(Do.TM,this.aai)}Khi(){this.J4t.mn(Do.TM,this.aai),super.Khi()}bd(t){if(!this.Chi)return void zd.um("Got timeupdate without a current interstitial");const i=this.Ari(t.currentTime),e=this.Chi.y4t;this.Chi.Mri(i);const s=this.Chi.y4t;e<.25&&s>=.25?this.s5t.So(new _s(this.M0t,i)):e<.5&&s>.5?this.s5t.So(new ks(this.M0t,i)):e<.75&&s>=.75?this.s5t.So(new oe(this.M0t,i)):this.Chi._x&&this.Bd(i)}Bd(t){super.Bd(t),this.n7=!1}async hr(){await super.hr(),this.n7=!1}constructor(...t){super(...t),this.n7=!1,this.aai=t=>{!this.n7&&this.Jhi&&(this.n7=!0,this.d7t(this.Ari(t.currentTime)))},this.Qhi=t=>{this.Bd(this.Ari(t.currentTime))}}};r(),r(),r();var Rn=class extends wp{constructor(t,i,e){super(t,new Date),this.uai=void 0,this.Int=void 0,this.uai=i,this.Int=e}},nn=function(t){return t.LOADED="DAILoaded",t.AD_BREAK_STARTED="DAIAdBreakStarted",t.AD_BREAK_ENDED="DAIAdBreakEnded",t.AD_PERIOD_STARTED="DAIAdPeriodStarted",t.AD_PERIOD_ENDED="DAIAdPeriodEnded",t.AD_PROGRESS="DAIAdProgress",t.CUEPOINTS_CHANGED="DAICuePointsChanged",t.CLICK="DAIClick",t.ERROR="DAIError",t.STARTED="DAIStarted",t.FIRST_QUARTILE="DAIFirstQuartile",t.MIDPOINT="DAIMidpoint",t.STREAM_INITIALIZED="DAIStreamInitialized",t.THIRD_QUARTILE="DAIThirdQuartile",t.COMPLETE="DAIComplete",t}({}),M5=class extends Rn{constructor(t,i){super("DAILoaded",t,i)}},L5=class extends Rn{constructor(t,i){super("DAIAdBreakStarted",t,i)}},O5=class extends Rn{constructor(t,i){super("DAIAdBreakEnded",t,i)}},F5=class extends Rn{constructor(t,i){super("DAIAdProgress",t,i)}},U5=class extends Rn{constructor(t,i){super("DAICuePointsChanged",t,i)}},V5=class extends Rn{constructor(t,i){super("DAIClick",t,i)}},H5=class extends Rn{constructor(t,i){super("DAIError",t,i)}},W5=class extends Rn{constructor(t,i){super("DAIStarted",t,i)}},q5=class extends Rn{constructor(t,i){super("DAIFirstQuartile",t,i)}},z5=class extends Rn{constructor(t,i){super("DAIMidpoint",t,i)}},G5=class extends Rn{constructor(t,i){super("DAIStreamInitialized",t,i)}},X5=class extends Rn{constructor(t,i){super("DAIThirdQuartile",t,i)}},j5=class extends Rn{constructor(t,i){super("DAIComplete",t,i)}};var Q5=class extends Ne{replaceAdTagParameters(t){return this.cai.replaceAdTagParameters(null!=t?t:null)}lai(t){return this.cai.contentTimeForStreamTime(t)}fai(t){return this.cai.streamTimeForContentTime(t)}AHt(t,i){const e=function(t){return"vod"===t.availabilityType?new s.google.ima.dai.api.VODStreamRequest(Mo({},K5(t),{contentSourceId:t.contentSourceID,videoId:t.videoID})):new s.google.ima.dai.api.LiveStreamRequest(Mo({},K5(t),{assetKey:t.assetKey}))}(t);t.enableNonce&&(e.enableNonce=!0),this.cai.requestStream(e)}hr(){this.vai(!1),this.cai.reset()}kn(){this.Vo();const t=google.ima.dai.api.StreamEvent.Type;this.cai.removeEventListener(t.AD_BREAK_STARTED,this._ai),this.cai.removeEventListener(t.AD_PROGRESS,this.gai),this.cai.removeEventListener(t.CLICK,this.y1t),this.cai.removeEventListener(t.COMPLETE,this.pai),this.cai.removeEventListener(t.CUEPOINTS_CHANGED,this.mai),this.cai.removeEventListener(t.ERROR,this.Ts),this.cai.removeEventListener(t.FIRST_QUARTILE,this.wai),this.cai.removeEventListener(t.LOADED,this.yai),this.cai.removeEventListener(t.MIDPOINT,this.Aai),this.cai.removeEventListener(t.STARTED,this.bai),this.cai.removeEventListener(t.STREAM_INITIALIZED,this.Sai),this.cai.removeEventListener(t.THIRD_QUARTILE,this.Tai),this.cai.removeEventListener(t.AD_BREAK_ENDED,this.kai),this.hr(),this.Eai&&os(this.Eai)}Pai(t){this.cai.onTimedMetadata(t)}xai(t,i,e){this.cai.processMetadata(t,i,e)}Iai(t){const i=this.cai.previousCuePointForStreamTime(t);if(i)return{PO:i.end,EO:i.start,_x:i.played}}Rai(t,i){const e=this.Iai(t);if(!e)return;const s=t>i&&e.PO>i,n=e.PO>t&&e.EO<=t;return e._x||!s&&!n?void 0:e.EO}vai(t){this.Y1t&&(this.Y1t.style.display=t?"block":"none")}constructor(t,i,e){super(),this.cai=void 0,this.Y1t=void 0,this.Eai=void 0,this._ai=void 0,this.kai=void 0,this.gai=void 0,this.y1t=void 0,this.pai=void 0,this.mai=void 0,this.Ts=void 0,this.wai=void 0,this.yai=void 0,this.Aai=void 0,this.bai=void 0,this.Sai=void 0,this.Tai=void 0,this.cai=t,this.Y1t=i,this.Eai=e,this._ai=t=>{this.vai(!0);const i=Y5(t),e=Z5(t);this.So(new L5(i,e))},this.kai=t=>{this.vai(!1);const i=Y5(t),e=Z5(t);this.So(new O5(i,e))},this.gai=t=>{const i=Y5(t),e=Z5(t);this.So(new F5(i,e))},this.y1t=t=>{const i=Y5(t),e=Z5(t);this.So(new V5(i,e))},this.pai=t=>{const i=Y5(t),e=Z5(t);this.So(new j5(i,e))},this.mai=t=>{const i=Y5(t),e=Z5(t);this.So(new U5(i,e))},this.Ts=t=>{const i=Y5(t),e=Z5(t);this.So(new H5(i,e))},this.wai=t=>{const i=Y5(t),e=Z5(t);this.So(new q5(i,e))},this.yai=t=>{const i=Y5(t),e=Z5(t);this.So(new M5(i,e))},this.Aai=t=>{const i=Y5(t),e=Z5(t);this.So(new z5(i,e))},this.bai=t=>{const i=Y5(t),e=Z5(t);this.So(new W5(i,e))},this.Sai=t=>{const i=Y5(t),e=Z5(t);this.So(new G5(i,e))},this.Tai=t=>{const i=Y5(t),e=Z5(t);this.So(new X5(i,e))},this.Y1t&&(this.Y1t.style.display="none",this.cai.setClickElement(this.Y1t));const s=google.ima.dai.api.StreamEvent.Type;this.cai.addEventListener(s.AD_BREAK_STARTED,this._ai),this.cai.addEventListener(s.AD_PROGRESS,this.gai),this.cai.addEventListener(s.CLICK,this.y1t),this.cai.addEventListener(s.COMPLETE,this.pai),this.cai.addEventListener(s.CUEPOINTS_CHANGED,this.mai),this.cai.addEventListener(s.ERROR,this.Ts),this.cai.addEventListener(s.FIRST_QUARTILE,this.wai),this.cai.addEventListener(s.LOADED,this.yai),this.cai.addEventListener(s.MIDPOINT,this.Aai),this.cai.addEventListener(s.STARTED,this.bai),this.cai.addEventListener(s.STREAM_INITIALIZED,this.Sai),this.cai.addEventListener(s.THIRD_QUARTILE,this.Tai),this.cai.addEventListener(s.AD_BREAK_ENDED,this.kai)}};function K5(t){const i=google.ima.dai.api.StreamRequest.StreamFormat;var e;return{apiKey:t.apiKey,authToken:t.authToken,format:"dash"===t.format?i.DASH:i.HLS,networkCode:t.networkCode,streamActivityMonitorId:t.streamActivityMonitorID,adTagParameters:t.adTagParameters,omidAccessModeRules:null!=(e=z2(t.omidAccessModeRules))?e:{}}}function Y5(t){const i=t.getStreamData(),e=i.adProgressData;let s;e&&(s={t7t:e.adBreakDuration,Cai:e.duration,i7t:e.adPosition,MP:e.currentTime,ct:e.duration,e7t:e.totalAds});return{Dai:s,Bai:(i.cuepoints||[]).map(t=>({EO:t.start,PO:t.end,_x:t.played})),Nai:i.errorMessage||void 0,Mai:i.manifestFormat||void 0,Lai:i.streamId||void 0,Oai:(i.subtitles||[]).map(t=>({Fai:t.webvtt,Uai:t.ttml,bs:t.language})),Yu:i.url}}function J5(t){return{lYt:t.getAdSlotId(),p4t:t.getContent(),qT:t.getContentType(),Mi:t.getHeight(),Ti:t.getWidth()}}function Z5(t){const i=t.getAd();if(!i)return;const e=i.getAdPodInfo(),s=i.getCompanionAds().map(J5);return{UYt:i.getAdId(),V7t:{i7t:e.getAdPosition(),p0t:e.getMaxDuration(),Yni:e.getPodIndex(),_Ot:e.getTimeOffset(),e7t:e.getTotalAds()},yKt:i.getAdSystem(),Zni:i.getAdvertiserName(),cYt:i.getApiFramework(),IKt:s,GKt:i.getCreativeId(),I9t:i.getCreativeAdId(),$ni:i.getDealId(),dB:i.getDescription(),ct:i.getDuration(),dq:i.getTitle(),Vai:i.getUniversalAdIdRegistry(),Hai:i.getUniversalAdIdValue(),S9t:i.getVastMediaHeight(),b9t:i.getVastMediaWidth(),m9t:i.getWrapperAdIds(),w9t:i.getWrapperAdSystems(),y9t:i.getWrapperCreativeIds()}}function $5(){const t=h.body.lastElementChild;if(t instanceof HTMLIFrameElement&&"Advertisement"===t.title)return t}r();var t6=class extends Fn{N0t(){return this.Wai.getAdSystem()}O0t(){return this.od.whi.nyt}get o(){return this.Wai.getAdId()}get ct(){return this.Wai.getDuration()}get AYt(){var t,i;return null==(i=this.Wai)||null==(t=i.ad)?void 0:t.clickThroughUrl}get GKt(){return this.Wai.getCreativeId()}get JYt(){return this.Wai.getSkipTimeOffset()}constructor(t,i){super(t),this.Wai=void 0,this.Wai=i}};r();var i6=class extends Fn{constructor(t){super(t),this._4t=!0,this.WA=t.m0t}},e6="urn:google:dai:2018",s6=class extends Ln{get uhi(){return Qr.GOOGLE}Bhi(t){if(t){const t=this.cai;this.cai=this.qai,this.qai=t;const i=this.zai;this.zai=this.Gai,this.Gai=i}for(const t of this.J4t.nt.II)this.Xai(t)}async IW(t,i,e){if(!t||!i||t===this.jai&&i===this.Qai)return;if(void 0===this.cai){var n,r;if(void 0===(null==(r=s.google)||null==(n=r.ima)?void 0:n.dai))throw new m("IMA DAI SDK missing for THEOads");this.cai=new google.ima.dai.api.StreamManager(this.J4t.xe.querySelector("video"),this.Kai)}this.jai=t,this.Qai=i;const h=this.Yai(!1),o=this.Yai(!0);this.Jai=Nc(Promise.all([h,o]),e),await this.Jai}Yai(t){let i=this.cai;if(t&&(i=this.qai),!i)return Promise.resolve();this.Zai(i),i.reset();const e=new google.ima.dai.api.PodStreamRequest;e.networkCode=this.jai,e.customAssetKey=this.Qai,e.adTagParameters=this.Lhi,this.$ai&&(e.streamActivityMonitorId=this.$ai),e.format="hls";const s=this.tui(i,[google.ima.dai.api.StreamEvent.Type.STREAM_INITIALIZED,google.ima.dai.api.StreamEvent.Type.ERROR]).then(e=>{if(e.type===google.ima.dai.api.StreamEvent.Type.ERROR)throw new m("DAI stream request failed");t?this.Gai=e.getStreamData():this.zai=e.getStreamData(),this.iui(i)});return i.requestStream(e),s}tui(t,i,e){return new Promise((s,n)=>{if(e&&e.Hg)return n(new dt);const r=t=>{o(),s(t)},h=()=>{o(),n(new dt)},o=()=>{for(const e of i)t.removeEventListener(e,r);e&&e.jg(h)};for(const e of i)t.addEventListener(e,r);e&&e.Xg(h)})}Mhi(t){void 0===t&&(t={}),super.Mhi(t),this.eui(this.Lhi)}eui(t){var i,e;void 0===t&&(t={}),null==(i=this.cai)||i.replaceAdTagParameters(t),null==(e=this.qai)||e.replaceAdTagParameters(t)}async sui(t){var i,e;return(null==(i=this.Jhi)?void 0:i.Vri)&&!S(this.Jhi.Vri)?this.Jhi.Vri:this.nui&&(null==(e=this.Jhi)?void 0:e.Rvt)?await $i(()=>this.rui(),t,4,500,5e3):void 0}async rui(){const t=this.nui+"/"+this.jai+"/"+this.Qai+"/"+this.Jhi.Rvt+".json",i=new $n({Yu:t,dk:M.DT,Uk:X.GET,Vk:1e3});let e;try{e=await this.J4t.SP.lk(i)}catch(t){throw new Co(Ic.NETWORK,Wi.UNKNOWN_AD_RESPONSE,"The ad's PodId could not be loaded.")}if(!jr(e))throw new Co(Ic.NETWORK,Wi.UNKNOWN_ERROR,"Something went wrong while requesting JSON from server.");const s=await e.ck();if(s)return s.podid}async hai(t,i,e,s){void 0===s&&(s=!1);const n={sources:{src:await this.oai(t,i,e)}};await this.Yhi(n,e,void 0,s)}async oai(t,i,e){var s;this.Jhi=t;const n=t.dhi,r=t.lhi;this.Uhi(t.Zri);const h=Mo({},this.Lhi,t.Hri);this.eui(h),await this.IW(n,r,e);const o=zd.Dh(t.nyt),a=Number(o.searchParams.get("d")),u=_.floor(1e3*_.min(a,t.Bri-i)),c=await this.sui(e);if(!c)throw new m("Something went wrong with retrieving the PodID from the server.");(null==(s=this.zai)?void 0:s.streamId)||await this.Jai;const d=zd.Dh("https://dai.google.com/linear/pods/v1/hls/network/"+this.jai+"/custom_asset/"+this.Qai);"V2"===t.fhi?d.pathname+="/ad_break_id/"+c+".m3u8":d.pathname+="/pod/"+c+".m3u8";let l=this.zai.streamId;if(this.Chi){const t=this.J4t.hui();void 0!==t&&void 0===this.qai&&(this.qai=new google.ima.dai.api.StreamManager(t.xe.querySelector("video"),this.Kai),await Nc(this.Yai(!0),e)),this.Gai&&(l=this.Gai.streamId)}return d.searchParams.set("stream_id",l),d.searchParams.set("pd",String(u)),d.toString()}Ghi(){this.J4t.nt.wn(Vt.eI,this.Wn),super.Ghi()}Khi(){super.Khi(),this.J4t.nt.mn(Vt.eI,this.Wn)}Xai(t){if(t.Lt===Ao.VU&&!(t.Km!==nh.ID3&&t.Km!==nh.EVENT_STREAM||t.Km===nh.EVENT_STREAM&&t.ZI!==e6)){if(t.wn(Te.hI,this.oui),t.wn(Te.aI,this.Aoi),t.L)for(const i of t.L.II)this.oui(new Ve(i));t.Xk=xh.JI,this.aui=t}}iui(t){t&&(t.addEventListener(google.ima.dai.api.StreamEvent.Type.ERROR,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.CLICK,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.STARTED,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.MIDPOINT,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.COMPLETE,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.RESUMED,this.uui))}Zai(t){t&&(t.removeEventListener(google.ima.dai.api.StreamEvent.Type.ERROR,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.CLICK,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.STARTED,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.MIDPOINT,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.COMPLETE,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.RESUMED,this.uui))}Bd(t){super.Bd(t),this.cui=-1,this.dui=void 0}async hr(){var t,i;await super.hr(),this.Zai(this.cai),this.Zai(this.qai),null==(t=this.cai)||t.reset(),this.cai=void 0,null==(i=this.qai)||i.reset(),this.qai=void 0,this.zai=void 0,this.Gai=void 0,this.Jai=void 0,this.$ai=void 0,this.Qai=void 0,this.jai=void 0,this.Fhi=!0,this.cui=-1,this.dui=void 0;const e=$5();void 0!==e&&os(e)}async kn(){var t;await super.kn(),null==(t=this.aui)||t.kn()}constructor(t,i,e,s,n,r={},h,o){super(t,i,s,n,r),this.cai=void 0,this.zai=void 0,this.qai=void 0,this.Gai=void 0,this.Jai=void 0,this.aui=void 0,this.jai=void 0,this.Qai=void 0,this.$ai=void 0,this.nui=void 0,this.Kai=void 0,this.cui=-1,this.dui=void 0,this.lui=void 0,this.Wn=t=>{const i=t.Ht;this.Xai(i)},this.oui=t=>{t.TO.wn(Me.zL,this.fui)},this.Aoi=t=>{t.TO.mn(Me.zL,this.fui)},this.fui=t=>{var i,e;if(this.zai)if((null==(i=this.aui)?void 0:i.Km)===nh.ID3){const i=t.TO.U;var s;if(ix(i))if(this.cui<=t.TO.EO&&this.dui!==i.text)this.cui=t.TO.EO,this.dui=i.text,null==(s=this.cai)||s.processMetadata("ID3",i.text,t.TO.EO)}else if((null==(e=this.aui)?void 0:e.Km)===nh.EVENT_STREAM){var n;const i=t.TO.U;null==(n=this.cai)||n.processMetadata(e6,i,t.TO.EO)}},this.uui=t=>{switch(this.G0t&&(this.G0t.m0t=this.J4t.Nd()-this.J4t.LP()),t.type){case google.ima.dai.api.StreamEvent.Type.ERROR:this.s5t.So(new Pa(Ic.GENERAL));break;case google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED:if(this.Chi)break;if(this.Chi=this.Jhi,this.Jhi=void 0,this.G0t=this.X4t(this.Chi),!this.G0t){zd.dm("Started an ad break without having a current adbreak to our knowledge");break}this.s5t.So(new aU(this.G0t)),this.lui=zd.Og(this.vui,250),this.eui(this.Lhi);break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED:zd.Lg(this.lui);break;case google.ima.dai.api.StreamEvent.Type.STARTED:{var i;const e=t.getAd();this.M0t=new t6(this.G0t,e),null==(i=this.Chi)||i.er({ad:this.M0t}),this.s5t.So(new dc(this.M0t,this.Ari(this.J4t.LP())));break}case google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE:this.s5t.So(new _s(this.M0t,this.Ari(this.J4t.LP())));break;case google.ima.dai.api.StreamEvent.Type.MIDPOINT:this.s5t.So(new ks(this.M0t,this.Ari(this.J4t.LP())));break;case google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE:this.s5t.So(new oe(this.M0t,this.Ari(this.J4t.LP())));break;case google.ima.dai.api.StreamEvent.Type.COMPLETE:this.s5t.So(new bc(this.M0t,this.Ari(this.J4t.LP()))),this.M0t=void 0;break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED:if(!this.G0t)break;this.G0t.m0t>1&&this.vui()}},this.vui=()=>{var t;this.M0t=new i6(this.G0t),null==(t=this.Chi)||t.er({ad:this.M0t}),this.s5t.So(new dc(this.M0t,this.Ari(this.J4t.LP())))},this.Kai=e,this.$ai=h,this.nui=o}};r();var n6=class extends In{hui(){}async Yhi(t,i,e,s){await this.oa.Ta(t,s),this._ui(this.oa,i,e)}_ui(t,i,e){Qt.ru&&Qt.X_&&(t.Gx(),t.zx()),i&&t.OP(i),e&&t.Gx()}gui(t){}constructor(t){super(t)}};r(),r();var Xr=Promise,r6=class extends Ln{get uhi(){return Qr.COMPANION}IW(t,i,e){return Xr.resolve()}hai(t,i,e,s){return void 0===s&&(s=!1),this.Jhi=t,this.Whi(t,i),Xr.resolve()}async Yhi(t,i,e,s){return Xr.resolve()}async oai(t,i,e){return this.Jhi=t,t.nyt}Nhi(t){this.NPt=t-this.J4t.LP(),this.d7t(t)}bd(t){if(!this.Chi)return void zd.um("Got timeupdate without a current interstitial");const i=this.Ari(t.currentTime);this.Chi.Mri(i),this.Chi._x&&this.Bd(i)}Ari(t){return this.NPt+t}constructor(...t){super(...t),this.NPt=0,this.Qhi=t=>{this.Bd(this.Ari(t.currentTime))}}};r(),r();var h6=class extends Fn{N0t(){return this.pui.N0t()}O0t(){return this.od.whi.nyt}get o(){return this.pui.o}get ct(){return this.pui.ct}get AYt(){return this.pui.AYt}get GKt(){return this.pui.GKt}get JYt(){return this.pui.JYt}constructor(t,i){super(t),this.pui=void 0,this.pui=i}},o6=class extends Ln{get uhi(){return Qr.CSAI}IW(t,i,e){return Xr.resolve()}hai(t,i,e,s){return void 0===s&&(s=!1),this.Jhi=t,this.Yhi({ads:[{integration:"google-ima",sources:this.mui(t)}]},e,void 0,s)}async oai(t,i,e){return this.Jhi=t,this.mui(t)}mui(t){const i=new URL(t.nyt),e=i.searchParams;this.Uhi(t.Zri);const s=Mo({},this.Lhi,t.Hri);for(const t of w.keys(s))e.set(t,s[t]);return i.toString()}Ghi(){var t,i,e,s,n,r,h;super.Ghi(),null==(t=this.J4t.Jc)||t.wn("Dnt",this.wui),null==(i=this.J4t.Jc)||i.wn("Bnt",this.yui),null==(e=this.J4t.Jc)||e.wn("P4t",this.Aui),null==(s=this.J4t.Jc)||s.wn("x4t",this.bui),null==(n=this.J4t.Jc)||n.wn("I4t",this.Sui),null==(r=this.J4t.Jc)||r.wn("Nnt",this.Tui),null==(h=this.J4t.Jc)||h.wn("Cnt",this.kui)}Khi(){var t,i,e,s,n,r,h;null==(t=this.J4t.Jc)||t.mn("Dnt",this.wui),null==(i=this.J4t.Jc)||i.mn("Bnt",this.yui),null==(e=this.J4t.Jc)||e.mn("P4t",this.Aui),null==(s=this.J4t.Jc)||s.mn("x4t",this.bui),null==(n=this.J4t.Jc)||n.mn("I4t",this.Sui),null==(r=this.J4t.Jc)||r.mn("Nnt",this.Tui),null==(h=this.J4t.Jc)||h.mn("Cnt",this.kui),super.Khi()}async hr(){await super.hr(),this.Eui=0}constructor(t,i,e,s,n={}){super(t,i,e,s,n),this.Eui=0,this.Qhi=t=>{this.Bd(this.Ari(t.currentTime))},this.wui=()=>{this.Jhi?(this.Chi=this.Jhi,this.Jhi=void 0,this.G0t=this.X4t(this.Chi),this.s5t.So(new aU(this.G0t))):zd.um("Started an ad break without having a current adbreak to our knowledge")},this.yui=t=>{var i,e;const s=t.Int;this.M0t=new h6(this.G0t,s),null==(i=this.Chi)||i.er({ad:this.M0t}),this.Eui=this.Ari(null==(e=this.J4t)?void 0:e.LP()),this.s5t.So(new dc(this.M0t,this.Eui))},this.Aui=()=>{this.s5t.So(new _s(this.M0t,this.Ari(this.J4t.LP())))},this.bui=()=>{this.s5t.So(new ks(this.M0t,this.Ari(this.J4t.LP())))},this.Sui=()=>{this.s5t.So(new oe(this.M0t,this.Ari(this.J4t.LP())))},this.Tui=()=>{const t=this.Eui+this.M0t.ct;this.s5t.So(new bc(this.M0t,t)),this.M0t=void 0},this.kui=()=>{this.Bd(this.Ari(this.G0t.p0t))}}},a6=class extends In{get Xoi(){var t;return[null==(t=this.Qoi)?void 0:t.Rhi,...this.Pui.Xoi].filter(it)}get joi(){return this.xui.toi}Zst(){return this.Qst.Jc}snt(){return this.Iui.Ca}get Hri(){var t,i,e;return null!=(e=null!=(i=this.Lhi)?i:null==(t=this.Rui)?void 0:t.adTagParameters)?e:{}}FP(){return this.Ls}Jst(){return this.Qst.Dst}HP(){var t;return null!=(t=this.Lz)?t:super.HP()}qP(){var t;return null!=(t=this.JW)?t:super.qP()}qx(){this.Qst.qx()}Noi(t){return t}async Ta(t,i){if(await this.xpt(),await super.Ta(t,i),void 0===t||void 0===t.ads)return;const e=Jr(t.ads,r2);void 0!==e&&(this.Cui(),this.Dui(),this.Bui(),this.Rui=e,this.Nui=e.backdropLShape,this.Pui.Hri=e.adTagParameters,this.xui.Loi=function(t){switch(t){case"single":return Ws.SINGLE;case"l-shape":return Ws.LSHAPE_AD;case"double":return Ws.DOUBLE;case"single-if-mobile":return Qt.Ks?Ws.SINGLE:void 0;default:return}}(this.Rui.overrideLayout),this.xui.loi=this.Rui.useId3,this.Qst.wn(Do.AM,this.Pd),this.Wu.wn(Rh.yn,this.stt),this.wn(d.Jw,this.CXt),await this.Mui(Qr.DEFAULT,void 0,void 0),this.Qst.wn(Do.TM,this.GG))}async Lui(t){this.Oui();const i=void 0===t.networkCode||void 0===t.customAssetKey?Qr.DEFAULT:Qr.GOOGLE;await this.Mui(i,t.networkCode,t.customAssetKey),t.sseEndpoint&&this.xui.eoi(t.sseEndpoint)}Dui(){Jd(this.Ls,this.Fui),oa(this.Uui),oa(this.Fui),this.Uui.appendChild(this.Fui),this.Ls.appendChild(this.Uui)}Vui(){Jd(this.Fui,this.Ls),Ol(this.Fui),Ol(this.Uui),os(this.Fui),os(this.Uui)}async Mui(t,i,e){var s,n,r;const h=this.E3t(),o=this.Kai;if(!h||!o)return;if(t===(null==(s=this.Qoi)?void 0:s.uhi))return;var a;const u=null!=(a=null==(n=this.Qoi)?void 0:n.A0t)?a:[];switch(await(null==(r=this.Qoi)?void 0:r.hr()),t){case Qr.GOOGLE:var c,d,l;this.Qoi=new s6(h,this.Hui,o,u,this.eai,this.Hri,null==(c=this.Rui)?void 0:c.streamActivityMonitorId,null==(d=this.Rui)?void 0:d.retrievePodIdURI),await(null==(l=this.Qoi)?void 0:l.IW(i,e));break;case Qr.COMPANION:this.Qoi=new r6(this.Qst,this.Hui,u,this.eai);break;case Qr.CSAI:this.Qoi=new o6(h,this.Hui,u,this.eai,this.Hri);break;case Qr.DEFAULT:default:this.Qoi=new N5(h,this.Hui,u,this.eai)}}async Eoi(t,i){var e;this.Wui||void 0===t||void 0===i||(null==(e=this.Qoi)?void 0:e.uhi)!==Qr.GOOGLE&&await this.Mui(Qr.GOOGLE,t,i)}qq(t){void 0===this.qP()&&(this.JW=t,this.Lz=P(t),this.So(new Pi(t)))}Oui(){this.Qst.wn(d._y,this.qui),this.Qst.wn(d.$w,this.XG)}zui(){this.Qst.mn(d._y,this.qui),this.Qst.mn(d.$w,this.XG)}Gui(){var t,i;this.Hui.M3t.wn("Cnt",this.Xui),null==(t=this.Qoi)||t.wn(p5.AD_ENDED,this.Xui),null==(i=this.E3t())||i.wn(Mc.ma,this.jui)}Qui(){var t,i;this.Hui.M3t.mn("Cnt",this.Xui),null==(t=this.Qoi)||t.wn(p5.AD_ENDED,this.Xui),null==(i=this.E3t())||i.mn(Mc.ma,this.jui)}Kui(t){const i=()=>{this.Yui=void 0};this.Yui=t().then(i).catch(i)}Jui(t,i){this.Iui.So(new rh(t,i).Ca),t._x=!0,this.Yui&&(this.Wui=void 0)}async Zui(){var t;null==(t=this.Qoi)||t.Ghi(),this.$ui()}async tci(){this.$ui()}async i3t(){var t;this.ici(),null==(t=this.Qoi)||t.Khi(),this.zhi(this.eci),this.eci=void 0}$ui(){this.ici(),this.eci=this.Wui,this.Wui=void 0,this.sci=void 0,this.nci=void 0}ici(){const t=this.oa.Rx,i=this.oa.Bx;t===this.rci&&i===this.hci||(this.rci=t,this.hci=i,this.So(new ts))}qhi(t){var i;u6(t)&&(null==(i=this.Qoi)||i.qhi(t),this.Uoi(this.LP()));t.wn("Dri",this.aci),this.Iui.So(new R5(t.wnt()))}zhi(t){if(pi(this.xui.toi,t)){var i;if(this.xui.zhi(t),u6(t))null==(i=this.Qoi)||i.zhi(t);else c6(t)&&(this.Pui.tai(t),this.uci.delete(t.o));t.mn("Dri",this.aci),this.Iui.So(new C5(t).Ca)}}Uoi(t){this.cci(t),this.dci()}cci(t){this.lci(t),this.fci(t),this.vci(t)}lci(t){if(void 0!==this.Yui)return;let i;const e=[];for(const s of this.xui.toi.filter(u6))s._x?e.push(s):s!==this.eci&&(t>=s.EO+5||this.eci&&s.EO+5=t.EO);const n=t.Bri,r=i>=t.EO&&(void 0===n||i{D(t)||this.Jui(i,"Could not load the ad break: "+t.message)}))}vci(t){if(void 0===this.Wui||void 0!==this.nci||void 0!==this.eci)return;const i=this.Wui.Bri;var e;t>=this.Wui.EO&&(void 0===i||t{this.Kui(()=>this.Zui())}))}Mhi(t){var i,e,s;this.Lhi=t,null==(e=this.Qoi)||e.Mhi(null!=(s=null!=t?t:null==(i=this.Rui)?void 0:i.adTagParameters)?s:{}),this.Pui.Hri=t}dci(){const t=this.LP(),i=[];this.uci.forEach(e=>{t>=e.EO&&(void 0===e.Bri||t{this.Pui.tai(t),this.uci.delete(t.o)});for(const i of this.xui.toi.filter(c6)){const e=i.Bri;if(void 0!==e&&t>=e)continue;const s=i.EO,n=i.EO+i.ct;t>=s&&t<=n&&!this.uci.has(i.o)&&(this.Pui.Yoi(i).catch(()=>{this.Iui.So(new rh(i,"Could not load the overlay.").Ca)}),this.Iui.So(new r5(i).Ca),this.uci.set(i.o,i))}}mci(){return void 0!==this.eci&&void 0!==this.Wui&&uh(this.eci.Bri,this.Wui.EO,5)}async xpt(){var t,i;this.JW=void 0,this.Lz=void 0,this.Rui=void 0,this.wci=!1,this.yci=!0,this.Aci=NaN,this.hci=NaN,this.rci=NaN,this.eci=void 0,null==(t=this.gci)||t.Zg(),this.sci=void 0,this.nci=void 0,this.Wui=void 0,this.Yui=void 0,await(null==(i=this.Qoi)?void 0:i.hr()),this.Qoi=void 0,this.xui.hr(),this.Pui.hr(),this.uci.clear(),this.Wu.mn(Rh.yn,this.stt),this.oa.mn(d.Jw,this.CXt),this.Qst.mn(Do.AM,this.Pd),this.Qst.mn(Do.TM,this.GG),this.zui(),this.Qui(),this.Vui(),this.bci&&zd.Lg(this.bci),this.bci=void 0}async Xx(){await this.xpt(),await super.Xx()}async kn(){var t;await this.Xx().catch(Ct),this.xui.kn(),await(null==(t=this.Qoi)?void 0:t.kn()),await super.kn()}$x(t){switch(t.type){case d.Ww:case d.xw:case Do.bM:return!this.yci;case Do.AM:return!this.yci||(this.yci=!1,!1);case d.Rw:{const t=this.Nd();return t!==this.Aci&&(this.Aci=t,this.So(new Rs(t))),!0}case d.Jw:return this.ici(),!0;case Mc.ma:return void 0!==this.eci}return super.$x(t)}constructor(t){var i;super(t),this.Qst=void 0,this.Uui=void 0,this.Ls=void 0,this.Fui=void 0,this.Kai=void 0,this.JW=void 0,this.Lz=void 0,this.Rui=void 0,this.Nui=void 0,this.Iui=void 0,this.Qoi=void 0,this.Hui=void 0,this.Lhi=void 0,this.eci=void 0,this.Wui=void 0,this.sci=void 0,this.gci=void 0,this.nci=void 0,this.Yui=void 0,this.xui=void 0,this.eai=void 0,this.Pui=void 0,this.uci=qh(),this.yci=!0,this.Aci=NaN,this.hci=NaN,this.rci=NaN,this.bci=void 0,this.wci=!1,this.Sci=!0,this.GG=async()=>{this.Qst.mn(Do.TM,this.GG),this.Rui&&(this.Rui.initializationDelay?this.bci=zd.Og(async()=>{this.Rui&&await this.Lui(this.Rui)},1e3*this.Rui.initializationDelay):await this.Lui(this.Rui))},this.Pd=()=>{this.Qst.mn(Do.AM,this.Pd),this.xui.ooi(this.oa.nt)},this.Cui=async()=>{try{await this.Wst.Bj([se.THEOADS])}catch(t){await this.Xx().catch(Ct),this.qq(vA(t,Vo.LICENSE_INVALID_FEATURE))}},this.stt=t=>{s2(this.Uui,this.oa.Bx,this.oa.Rx,t.width,t.height)},this.CXt=()=>{s2(this.Uui,this.oa.Bx,this.oa.Rx,this.Wu.Eu,this.Wu.Iu)},this.qui=()=>{this.cci(this.LP()),this.dci()},this.XG=()=>{this.cci(this.LP()),this.dci()},this.Xui=async()=>{if(this.mci()){if(this.nci)return;this.nci=this.sci,await this.nci,this.Kui(()=>this.tci())}else this.Kui(()=>this.i3t())},this.jui=t=>(this.Jui(this.eci,"Error playing the current adbreak: "+t.error),this.Kui(()=>this.i3t())),this.aci=t=>{this.Iui.So(t.Ca)},this.Qst=new n6(t),this.Ls=t.xe,this.Uui=function(){const t=h.createElement("div");return fi(t,"theo-ads-sgai-container"),t}(),this.Fui=function(){const t=h.createElement("div");return fi(t,"theo-ads-sgai-content-player"),t}(),this.Iui=new P5(this),this.Hui=new x5,null==(i=this.Qst.Jc)||i.Ent(this.Hui),this.eai=new v5(t.SP),this.xui=new b5(this),this.Pui=new I5(this.Qst,this.Fui,this.eai)}};function u6(t){return"adbreak"===t.Km}function c6(t){return"overlay"===t.Km}var d6=class extends a6{Nd(){var t;return null!=(t=this.WA)?t:super.Nd()}nu(){var t;return null!=(t=this.Ac)?t:super.nu()}LP(){return this.Noi(super.LP())}DP(){return this.Tci?new Date(this.Tci.getTime()+on(this.Qst.LP())):super.DP()}RP(){const t=super.RP();return ve.jn(t).Ny(this.kci)._s()}Tx(){const t=super.Tx();return ve.jn(t).Ny(this.kci)._s()}Noi(t){return t+this.kci}async Ta(t,i){await super.Ta(t,i),this.Rui&&(this.Ac=t,this.Eci=new e5(this.Qst),this.Eci.gr(this.Fui,this.Uui),this.tO(this.Eci))}Bui(){}Dui(){super.Dui(),this.Kai=t2(this.Uui)}Oui(){super.Oui(),this.Pci()}zui(){super.zui(),this.xci()}Pci(){this.Qst.wn(d.Rw,this.xXt),this.Qst.wn(Do.TM,this.MV)}xci(){this.Qst.mn(d.Rw,this.xXt),this.Qst.mn(Do.TM,this.MV)}E3t(){return this.Qst}OP(t,i){this.Ici=!0,super.OP(t,i)}Gx(){super.Gx(),this.So(new Tc(this.LP())),this.Sci=!0,this.Rci=!1}zx(){this.Rci=!0,super.zx()}async hai(t,i,e){var s,n;if(await this.Mui(t.uhi,t.dhi,t.lhi),this.Cci=await(null==(s=this.Qoi)?void 0:s.oai(t,i,e)),await(null==(n=this.Qoi)?void 0:n.Vhi(t,e).catch(()=>{this.Iui.So(new rh(t,"Could not load the backdrop.").Ca)})),t.uhi===Qr.COMPANION)return;const r=new S4(this.cPt,this.Dci),h=new O3(this.cPt.fPt,r,"temporary");this.Bci=h.Bei(Cn(Cn({sources:{src:this.Cci}})),T4({amount:30,bandwidth:HI.Ng.fW()||this.Dst.WY}),"temporary"),this.Nci.Zg(),this.Nci=new at;this.Dci.Ret(this.Bci,this.cPt,"temporary").mi(this.Nci.Yg).catch(Ct)}Mci(t,i){switch(t){case Ws.LSHAPE_CONTENT:case Ws.LSHAPE_AD:return new n5(this.Qst,i);case Ws.SINGLE:default:return new s5(this.Qst)}}async Lci(t){var i,e,s,n,r,h;null==(i=this.gci)||i.Zg(),this.gci=new at,await this.Mui(t.uhi,t.dhi,t.lhi),null==(e=this.Eci)||e.mr(this.Fui),(null==(s=this.Qoi)?void 0:s.uhi)!==Qr.COMPANION&&(this.wci=!0,this.kci=this.LP(),this.Tci=this.DP(),this.Qst.wn(Do.TM,this.MV)),this.Iui.So(new r5(t).Ca),await(null==(n=this.Qoi)?void 0:n.Yhi({sources:{src:this.Cci}},this.gci.Yg,void 0,!0)),this.Eci=this.Mci(t.Zri,null!=(h=t.$ri)?h:this.Nui),this.h3t(this.Eci),this.Eci.gr(this.Fui,this.Uui),null==(r=this.Qoi)||r.Nhi(this.LP())}async Zui(){var t;if(void 0!==this.Wui&&void 0!==this.Cci)return this.xci(),this.Ez=this.ux,await this.Lci(this.Wui),this.Gui(),(null==(t=this.Qoi)?void 0:t.uhi)!==Qr.COMPANION&&(this.Oci=!1),super.Zui()}async tci(){return this.zhi(this.eci),void 0===this.Wui?this.i3t():(await this.Lci(this.Wui),super.tci())}async i3t(){var t,i,e,s;if(this.eci){var n;if(null==(t=this.Bci)||t._S(),this.Bci=void 0,this.Qui(),(null==(i=this.Qoi)?void 0:i.uhi)!==Qr.COMPANION&&(this.wci=!0,this.Pri=!1,this.kci=this.LP(),this.Tci=this.DP(),this.xui.coi(this.Qst.nt),this.Qst.wn(Do.AM,this.Fci),this.Qst.wn(Do.AM,this.Pd),this.Qst.wn(Do.TM,this.MV),await this.Qst.Ta(this.Ac,(new at).Yg)),null==(e=this.Eci)||e.mr(this.Fui),this.Eci=new e5(this.Qst),this.Eci.gr(this.Fui,this.Uui),this.h3t(this.Eci),(null==(s=this.Qoi)?void 0:s.uhi)!==Qr.COMPANION)this.ux=null!=(n=this.Ez)?n:1,this.Qst.Gx();return this.Oci=!0,this.Pci(),super.i3t()}}async xpt(){var t;this.Eci=void 0,this.WA=void 0,this.kci=0,this.Cci=void 0,this.Ez=void 0,this.Tci=void 0,this.Oci=!0,this.wci=!1,this.Sci=!0,this.Rci=!0,this.Nci.Zg(),this.Nci=new at,null==(t=this.Bci)||t._S(),this.Bci=void 0,this.Qst.mn(Do.AM,this.Fci),await super.xpt()}$x(t){if(void 0!==this.Eci)switch(t.type){case d.uo:return!0;case d.jw:return!this.Rci||(this.Rci=!1,this.So(new hl(this.Noi(t.currentTime))),!0);case Do.TM:return!this.Sci||(this.Sci=!1,this.So(new ce(this.Noi(t.currentTime))),!0);case Do.SM:return this.wci||(this.Sci=!0,this.So(new ux(this.Noi(t.currentTime)))),!0;case d.Zw:return this.wci&&!this.Ici||(this.Ici=!1,this.So(new Es(this.Noi(t.currentTime)))),!0;case d.$w:return this.wci&&!this.Ici||this.So(new F(this.Noi(t.currentTime))),!0;case d.Bw:return!this.Oci||(this.So(new At(this.Noi(t.currentTime))),!0);case d._y:return this.So(new Si(this.Noi(t.currentTime),t.currentProgramDateTime)),!0;case d.Qw:return this.So(new H(this.Noi(t.currentTime))),!0;case d.Kw:return this.So(new aa(this.Noi(t.currentTime),t.playbackRate)),!0;case d.gy:return this.Pri?(this.So(new Ze(this.Noi(t.currentTime),t.volume)),!0):(this.Pri=!0,!0);case d.Cw:return this.So(new G(this.Noi(t.currentTime),t.readyState)),!0;case Do.wM:return this.So(new lo(this.Noi(t.currentTime),t.readyState)),!0;case Do.yM:return this.So(new qt(this.Noi(t.currentTime),t.readyState)),!0;case Do.AM:return this.So(new ot(this.Noi(t.currentTime),t.readyState)),!0;case Do.bM:return this.So(new ut(this.Noi(t.currentTime),t.readyState)),!0;case Do.wI:return this.So(new ou(this.Noi(t.currentTime),t.readyState)),!0;case d.Dw:return this.So(new eG(this.Noi(t.currentTime),t.initDataType,t.initData)),!0}return super.$x(t)}constructor(t){super(t),this.Ac=void 0,this.WA=void 0,this.Cci=void 0,this.Ez=void 0,this.Eci=void 0,this.kci=0,this.Ici=!1,this.Tci=void 0,this.cPt=void 0,this.Dci=void 0,this.Nci=new at,this.Bci=void 0,this.Rci=!0,this.Oci=!0,this.Pri=!0,this.xXt=t=>{this.WA=t.duration},this.MV=()=>{this.Qst.mn(Do.TM,this.MV),this.wci=!1},this.Fci=()=>{this.Qst.mn(Do.AM,this.Fci),this.Tci&&(this.Qst.CP=this.Tci,this.Tci=void 0),this.Qst.LP()>0&&(this.kci-=this.Qst.LP())},this.cPt=Rc.Ng,this.Dci=new R4(zd.SP)}};r(),r();var l6=class extends n6{hui(){if(void 0===this.Uci){const t=function(){const t=h.createElement("div");return fi(t,"theo-ads-sgai-ad-player-two"),t}();this.Uci=f6(this.Vci,t,this.oa.Cd)}return this.oa===this.Hci?this.Uci:this.Hci}async Yhi(t,i,e,s){let n;n=this.oa.nu()?this.hui():this.oa,await n.Ta(t,s),this._ui(n,i,e)}async gui(t){t?await this.hui().Xx():await this.oa.Xx()}async Wci(){q4(this.oa,this.hui()),this.h3t(this.hui()),this.oa.xe.style.display="",this.hui().xe.style.display="none",await this.hui().Xx()}async hr(){await this.oa.Xx(),await this.hui().Xx()}constructor(t,i){const e=function(){const t=h.createElement("div");return fi(t,"theo-ads-sgai-ad-player-one"),t}(),s=f6(t,e,i);e.style.display="block",super(s),this.Vci=void 0,this.Hci=void 0,this.Uci=void 0,this.Vci=t,this.Hci=s}};function f6(t,i,e){const s=t.children[t.children.length-1];t.insertBefore(i,s),i2(i);const n=new I2(new FF(i,e,new EC),Qh.Ng);return n.mx=q.OL,n.cO=!1,n}var v6=class extends n6{get Sri(){return this.qci}get Eri(){return this.zci}get pri(){return this.Gci}get bri(){return this.qzt}get kri(){return this.Xci}hui(){return this.J4t.hui()}Yhi(t,i,e,s){return this.J4t.Yhi(t,i,e,s)}jci(t,i,e,s){var n,r;this.qci=t,s?this.Qci=0:this.Qci+=e,this.zci=i,null==(r=this.zci)||r.setSeconds((null==(n=this.zci)?void 0:n.getSeconds())+this.Qci)}Rri(){var t;if(void 0!==this.Kci)return;this.qzt=void 0,this.Xci=void 0;const i=this.Yci;this.Yci=void 0,null==(t=this.Jci)||t.Zg(),m6(this.Qst)&&(this.Zci=new at,this.Kci=$e(this.$ci(i,this.Zci.Yg),this.Zci).catch(yf))}Cri(){var t;this.qzt=this.qci+this.oa.LP(),this.Eri&&(this.Xci=new Date(this.Eri.getTime()+1e3*this.oa.LP()));const i=this.Kci;this.Kci=void 0,null==(t=this.Zci)||t.Zg(),this.Jci=new at,this.Yci=$e(this.tdi(i,this.Jci.Yg),this.Jci).catch(yf)}Aa(){return this.Qst.mq}idi(){this.edi||(this.edi={source:this.Qst.nu(),duration:this.Qst.Nd(),currentTime:this.Qst.LP(),preload:this.Qst.mx,autoplay:this.Qst.cO,playbackRate:this.Qst.ux})}async sdi(t){this.Qst.mx=q.OL,this.Qst.cO=!1,this.J4t.$P=!0;const i=this.J4t.nu();await this.Qst.Ta(i,t),this.Qst.OP(this.J4t.LP()),this.Qst.wn(d.uo,this.LV),this.Qst.wn(d.jw,this.OV)}async ndi(t){this.edi&&(this.Qst.mx=this.edi.preload,this.Qst.cO=this.edi.autoplay,this.Qst.ux=this.edi.playbackRate,await this.Qst.Ta(this.edi.source,t),this.edi=void 0)}async $ci(t,i){await(null==t?void 0:t.catch(Ct)),this.idi(),await this.Qst.Xx(),await this.sdi(i),this.h3t(this.Qst),this.Qst.Gx()}async tdi(t,i){await(null==t?void 0:t.catch(Ct)),this.rdi=this.J4t.LP(),this.Gci=this.rdi+this.Sri,await this.Qst.Xx(),this.Qst.mn(d.uo,this.LV),this.Qst.mn(d.jw,this.OV),await this.ndi(i),this.h3t(this.J4t),this.Qst.wn(Do.bM,this.hdi),this.Qst.Gx()}nu(){return this.edi?this.edi.source:super.nu()}Nd(){return this.edi?this.edi.duration:super.Nd()}odi(){return super.Nd()}Tx(){const t=super.Tx();return ve.jn(t).Ny(this.Sri)._s()}RP(){const t=super.RP();return ve.jn(t).Ny(this.Sri)._s()}Xx(){return this.J4t.Xx()}async Wci(){await this.J4t.Wci(),this.h3t(this.J4t)}async gui(t){await this.J4t.gui(t)}async hr(){var t,i;null==(t=this.Zci)||t.Zg(),this.Zci=void 0,this.Kci=void 0,null==(i=this.Jci)||i.Zg(),this.Jci=void 0,this.Yci=void 0,this.edi=void 0,this.qci=0,this.zci=void 0,this.Gci=0,this.qzt=void 0,this.Xci=void 0,this.rdi=0,this.Qci=0,this.Qst.mn(Do.bM,this.hdi),this.Qst.mn(d.uo,this.LV),this.Qst.mn(d.jw,this.OV),await this.J4t.hr()}async kn(){await this.hr(),await super.kn()}constructor(t,i,e){const s=new l6(i,e);super(s),this.Qst=void 0,this.J4t=void 0,this.Kci=void 0,this.Zci=void 0,this.Jci=void 0,this.Yci=void 0,this.edi=void 0,this.qci=0,this.zci=void 0,this.Gci=0,this.qzt=void 0,this.Xci=void 0,this.rdi=0,this.Qci=0,this.hdi=()=>{if(this.Qst.mn(Do.bM,this.hdi),this.zci){const t=this.zci;t.setSeconds(this.zci.getSeconds()+this.rdi),this.Qst.CP=t,this.zci=void 0}this.Gci-=this.Qst.LP(),this.qzt=void 0,this.Xci=void 0},this.LV=()=>{this.J4t.Gx()},this.OV=()=>{this.J4t.zx()},this.Qst=t,this.J4t=s}};r();var _6=class extends Oc{Ta(t,i){var e;return void 0!==Jr(null!=(e=null==t?void 0:t.ads)?e:[],r2)?Promise.reject(new Ga(Vo.CONFIGURATION_ERROR,"THEOads must be enabled in the player configuration.")):super.Ta(t,i)}},g6=1/60,p6=class extends a6{adi(){this.Qst.zst.wn("presentationmodechange",this.udi)}cdi(){this.Qst.zst.mn("presentationmodechange",this.udi)}ddi(){if(this.ldi&&!j4(this.ldi)&&this.J4t&&this.eci)return function(t){return t instanceof t5}(this.ldi)?(this.Jui(this.eci,"Cannot play L-shape content ad breaks in this representation"),void this.Kui(()=>this.i3t())):void this.fdi(new Lc(this.Qst,this.J4t),!1,!1)}ix(t){t||this.hx||this.qx(),super.ix(t)}get zst(){return this.Qst.zst}async Ta(t,i){await super.Ta(t,i),this.Rui&&(this.vdi=this.Rui.backdropDoubleBox,this.fdi(new G4(this.Qst,this.J4t),!1,!0))}Bui(){this.J4t=new v6(this.Qst,this.Vci,this.oa.Cd)}Dui(){super.Dui(),this.Vci=function(){const t=h.createElement("div");return fi(t,"theo-ads-sgai-ad-player"),t}(),this.Uui.appendChild(this.Vci),this.Kai=t2(this.Vci),this._di()}_di(){Ol(this.Fui),function(t){const i=t.style;i.boxSizing="border-box",i.position="relative",i.alignItems="center",i.border="0 solid transparent",i.borderWidth="0px",i.backgroundColor="transparent",i.backgroundRepeat="no-repeat",i.backgroundAttachment="scroll"}(this.Uui),i2(this.Fui),i2(this.Vci)}Vui(){this.gdi(),super.Vui(),this.Vci&&(os(this.Vci),this.Vci=void 0)}gdi(){e2(this.Ls),e2(this.Fui)}fdi(t,i,e){var s;const n=null!=(s=this.ldi)?s:this,r=null!=t?t:this.Qst;q4(n,r),void 0!==this.ldi&&(this.ldi.mr(this.Uui,this.Fui,this.Vci),this.ldi.kn()),null==t||t.gr(this.Uui,this.Fui,this.Vci,n,i),this.ldi=t,e?this.tO(r):this.h3t(r)}E3t(){return this.J4t}qx(){var t;super.qx(),null==(t=this.J4t)||t.qx()}OP(t,i){this.pdi=!0,super.OP(t,i)}Noi(t){var i,e;return t+(null!=(e=null==(i=this.J4t)?void 0:i.pri)?e:0)}Gui(){var t;super.Gui(),null==(t=this.J4t)||t.wn(d._y,this.mdi),this.Qst.wn(d.qw,this.wdi)}Qui(){var t;super.Qui(),null==(t=this.J4t)||t.mn(d._y,this.mdi),this.Qst.mn(d.qw,this.wdi)}ydi(){this.cci(this.LP()),this.Adi()}Adi(){var t;if(this.mci()||j4(this.ldi)||(null==(t=this.ldi)?void 0:t.yri()))return;const i=_.min(this.J4t.Nd(),this.eci.ct)-this.J4t.LP(),e=this.bdi(i);if(void 0===e)return;if(this.Qst.LP()>e-.75)return;const s=ve.jn(this.J4t.RP()),n=this.J4t.Tx();if(0===n.length)return;const r=_.min(n.end(n.length-1),this.eci.Bri);s.CM().Cr(r)&&!this.Qst.kx&&(this.Qst.hx&&(this.Qst.Gx(),this.Qst.$P=!0),this.Qst.OP(e,{gOt:!0}))}bdi(t){var i;const e=this.Qst.Tx(),s=null==(i=this.eci)?void 0:i.Bri;if(0===e.length||void 0===s)return;const n=e.start(0),r=e.end(e.length-1);let h=s-t;return(h{this.Iui.So(new rh(t,"Could not load the backdrop.").Ca)}))}Mci(t,i){if(m6(this.Qst))return new Lc(this.Qst,this.J4t);const e=i.$ri,s=i.ohi,n=i.ahi;switch(t){case Ws.DOUBLE:return e||i.er({backdropUri:this.vdi}),new Z4(this.Qst,this.J4t,e,s,n);case Ws.LSHAPE_AD:return i.$ri||i.er({backdropUri:this.Nui}),new i5(this.Qst,this.J4t,e,s,n);case Ws.LSHAPE_CONTENT:return i.$ri||i.er({backdropUri:this.Nui}),new t5(this.Qst,this.J4t,e,s,n);case Ws.SINGLE:default:return new X4(this.Qst,this.J4t)}}_ui(t){var i,e,s,n;const r=t.Zri,h=this.Mci(r,t);var o;Qt.X_&&Qt.Q_>=16&&Qt.Q_<18&&(null==(i=this.Qoi)?void 0:i.uhi)!==Qr.COMPANION&&(null==(o=this.J4t)||o.OP(this.J4t.LP()));this.fdi(h,this.Sci,!1),Qt.zv&&!h.yri()&&(null==(e=this.Qoi)?void 0:e.uhi)!==Qr.COMPANION&&(e2(this.Fui),oa(this.Fui)),this.Iui.So(new r5(t).Ca),this.Sdi=(null==(s=this.Qoi)?void 0:s.uhi)===Qr.COMPANION,null==(n=this.Qoi)||n.Nhi(this.LP())}pci(t,i){let e=!1;if(this.mci()){var s,n;if(!(null==(s=this.Qoi)?void 0:s.Dhi()))return!1;const t=null==(n=this.J4t)?void 0:n.RP();if(t&&t.length>0){let i=t.end(t.length-1);i-=this.J4t.Sri;e=_.min(this.J4t.Nd(),this.eci.ct)-5{switch(t.presentationMode){case"native-picture-in-picture":this.ddi();break;case"fullscreen":a3(this.Cd)&&this.ddi();break}},this.mdi=t=>{this.ydi()},this.wdi=t=>{this.ydi()},this.xdi=()=>{const t=this.eci;void 0!==t?(!t.Bri||this.LP()>=t.Bri)&&(this.Qst.mn(d._y,this.xdi),this.Kui(()=>this.i3t())):this.Qst.mn(d._y,this.xdi)},this.kdi=()=>{this.oa.mn(Do.TM,this.kdi),this.wci=!1,this.Sci=!1},this.adi()}};function m6(t){const i=t.zst.Wo()===tc.FULLSCREEN&&a3(t.Cd);return t.mq.XL||i}Pu(t=>t.Cd.ads.theoads?Qt.w_||Qt.S_||Qt.D_?new d6(t):new p6(t):new _6(t),HF.ont),r();Qh.Ng.zz(new class{get P3t(){return mt.ont}qz(t){return r2(t)}x3t(t,i,e){}M6(t,i,e,s){}sj(t){const i={integration:ru.THEOADS,adTagParameters:Lu(t.adTagParameters)?t.adTagParameters:{},useId3:Boolean(t.useId3)};return Z(t.networkCode)&&(i.networkCode=Hi(t.networkCode)),Z(t.customAssetKey)&&(i.customAssetKey=Hi(t.customAssetKey)),Z(t.backdropDoubleBox)&&(i.backdropDoubleBox=Hi(t.backdropDoubleBox)),Z(t.backdropLShape)&&(i.backdropLShape=Hi(t.backdropLShape)),Z(t.overrideLayout)&&(i.overrideLayout=function(t){switch(t){case"single":case"l-shape":case"double":case"single-if-mobile":return t;default:return}}(t.overrideLayout)),Z(t.retrievePodIdURI)&&(i.retrievePodIdURI=Hi(t.retrievePodIdURI)),Z(t.sseEndpoint)&&(i.sseEndpoint=Hi(t.sseEndpoint)),Z(t.streamActivityMonitorId)&&(i.streamActivityMonitorId=Hi(t.streamActivityMonitorId)),ho(t.initializationDelay)&&(i.initializationDelay=co(t.initializationDelay)),Z(t.daiAssetKey)&&(i.daiAssetKey=Hi(t.daiAssetKey)),i}}),r(),r(),r(),r(),r();var w6=class extends Ne{get Ca(){return this.hu||(this.hu=function(t){return{get casting(){return t.bJ},get state(){return t.Ylt},start(){t.Qx()},stop(){t.Kx()},addEventListener(i,e){const s=$a(i,Hi);t.wn(s,e)},removeEventListener(i,e){const s=$a(i,Hi);t.mn(s,e)}}}(this)),this.hu}constructor(...t){super(...t),this.hu=void 0}},y6=class extends w6{get bJ(){return this.Ylt===Yr.CONNECTED}get Ylt(){return this.Ra}Idi(){this.Rdi(),this.fpt.wn(d.do,this.Cdi),this.Ua(Yr.AVAILABLE)}Rdi(){this.oa&&this.oa.mn(d.yw,this.handleAirplayChangedEvent),this.Ddi?this.oa=this.CY:this.oa=this.Bdi,this.oa.wn(d.yw,this.handleAirplayChangedEvent)}get Ddi(){return this.CY.jx()}async Ndi(){if(this.oa){if(this.Ddi){if(!this.oa.hx){const t=Er(800,this.Mdi.Yg),i=this.oa.ww(d.jw,this.Mdi.Yg);await Promise.race([i,t]).catch(Ct)}this.oa.Gx()}else{this.Ldi=this.CY.MP,this.Odi=this.CY.CP,this.Bdi.wn(d._y,this.handleAirplayPlayerTimeUpdate),this.Fdi=this.CY.BI,this.CY.BI=this.Bdi,this.Fdi.zx(),this.Fdi.we(),this.Bdi.be(),this.Bdi.$P=this.Fdi.$P,this.Bdi.ux=this.Fdi.ux,this.Bdi.Mx=this.Fdi.Mx;const t=this.Bdi.ww(d.Zw);this.Bdi.MP=this.Fdi.MP,await t,this.Bdi.Gx(),this.Bdi.$P=this.Fdi.$P,this.Bdi.ux=this.Fdi.ux,this.Bdi.Mx=this.Fdi.Mx}this.Ua(Yr.CONNECTED)}}Udi(){if(this.Fdi){this.Bdi.mn(d._y,this.handleAirplayPlayerTimeUpdate),this.Fdi.$P=this.Bdi.$P,this.Fdi.ux=this.Bdi.ux,this.Fdi.Mx=this.Bdi.Mx;Qt.X_&&!Qt.ru&&this.CY.ct===1/0?this.Odi?this.Fdi.CP=this.Odi:this.Fdi.MP=1/0:this.Fdi.MP=this.Ldi,this.Odi=void 0,this.Ldi=void 0,this.Fdi.be(),this.Bdi.we(),this.Bdi.hx||this.Fdi.Gx(),this.CY.BI=this.Fdi,this.Bdi.hr(),this.Fdi=void 0}else this.oa&&(this.oa.MP=this.oa.MP+1e-4);this.Ua(Yr.AVAILABLE)}preloadPlayer(t){if(ii(t),this.oa.Ax{var t;const i=null==(t=this.CY.nu())?void 0:t.sources.filter(lk);(null==i?void 0:i.some(KI))?this.Ua(Yr.AVAILABLE):this.Ua(Yr.UNAVAILABLE)},this.handleAirplayChangedEvent=()=>{this.oa&&this.oa.KP?this.Ndi():this.Ylt===Yr.CONNECTED&&this.Udi()},this.handleAirplayPlayerTimeUpdate=t=>{this.Ldi=t.currentTime,this.Odi=this.CY.CP},this.fpt=t,this.CY=i,this.Bdi=e,this.Bdi.we(),i.aO(e),this.Idi()}};r();var A6=class extends w6{get bJ(){return!1}get Ylt(){return Yr.UNAVAILABLE}Qx(){}Kx(){}};r();var b6=class extends _o{Jx(){this.Wdi.Jx()}tI(t){throw new m("Can't add a track while using AirPlay.")}get ht(){return this.Wdi.ht}get IP(){return this.Wdi.IP}get bt(){return this.fz}get MP(){return this.Wdi.MP}set MP(t){this.OP(t)}OP(t,i){this.Wdi.OP(t,i)}get CP(){return this.Wdi.CP}get ct(){return this.Wdi.ct}get xe(){return this.Ls}get UP(){return this.Wdi.UP}get lt(){return this.Wdi.lt}get WP(){return this.Wdi.WP}get zP(){return this.Wdi.zP}get jP(){return this.Wdi.jP}get KP(){return this.Wdi.KP}get Vx(){return this.Wdi.Vx}get Fx(){return this.Wdi.Fx}get JP(){return this.Wdi.JP}get $P(){return this.Wdi.$P}set $P(t){this.Wdi.$P=t}get sx(){return this.Wdi.sx}get hx(){return this.Wdi.hx}get ux(){return this.Wdi.ux}set ux(t){this.Wdi.ux=t}get _x(){return this.Wdi._x}get mx(){return this.Wdi.mx}set mx(t){this.Wdi.mx=t}get Ax(){return this.Wdi.Ax}get Sx(){return this.Wdi.Sx}get kx(){return this.Wdi.kx}jx(){return this.Wdi.jx()}Qx(){this.Wdi.Qx()}Kx(){this.Wdi.Kx()}get nt(){return this.Wdi.nt}get Rx(){return this.Wdi.Rx}get Bx(){return this.Wdi.Bx}get rt(){return this.Wdi.rt}get Mx(){return this.Wdi.Mx}set Mx(t){this.Wdi.Mx=t}Gx(){Wr(this.Wdi.Gx())}zx(){this.Wdi.zx()}async Xx(){}nu(){return this.Ac}async Ta(t,i){let e;if(ii(i),this.Ac=t,ok(t.sources))e=ml({src:""});else{const i=t.sources.filter(lk);for(const t of i)if(KI(t)){e=t;break}}if(!e)throw new m("Unsupported source.");await this.Wdi.Ta(e,t,i),this.Az(e)}Px(t,i,e){return Promise.resolve()}xx(){return Promise.resolve()}Az(t){this.fz!==t&&(this.fz=t,this.So(new bk(t)))}Wx(){return this.Wdi.Wx()}xP(){return[]}qx(){this.qdi.xz()}gr(t){yk(this,t)}mr(){}Zx(t){return!1}Yx(){this.Wdi.Yx()}async hr(){this.fz=void 0,this.Ac=void 0,await this.Wdi.hr()}be(){this.Wdi.be()}we(){this.Wdi.we()}Hx(){return this.Wdi.Hx()}Aa(){return this.Wdi.Aa()}async kn(){this.Vo(),this.qdi.kn(),await this.Wdi.kn(),this.YL.kn(),this.$L.kn(),this.Gl.kn()}constructor(t,i,e,s,n,r,h){super(),this.Ls=void 0,this.qdi=void 0,this.Wdi=void 0,this.fz=void 0,this.Ac=void 0,this.YL=new He,this.$L=new He,this.Gl=new sl,this.Ls=t,this.qdi=new EF(r,h,e,1,[Ci.Bk]),this.qdi.ust(t),this.Wdi=new QI(t,this.qdi,i,e,s,n),this.Wdi.lw(this.Rs),this.YL.BI=this.Wdi.ht,this.$L.BI=this.Wdi.rt,this.Gl.BI=this.Wdi.nt}},S6=class extends Oc{async kn(){this.zdi.kn(),await super.kn()}constructor(t){super(t),this.zdi=void 0;const i=new b6(this.Pa.xe,this.SP,this.Cd,this.Dst,this.Fx,this.Ost,this.Ql);this.zdi=new y6(this,this.Pa,i),this.VX.PJ(this.zdi),this.wn(d.xw,()=>{this.zdi.Rdi()})}};Pu(t=>zd.Zs.vp?new S6(t):(t.VX.PJ(new A6),t),HF.ant),r(),r();var T6="VPAID";function k6(t){return"spotx"===t.integration}Qh.Ng.zz(new class t{get P3t(){return this.Gdi.P3t}qz(t){return k6(t)}x3t(i,e,s){return s.ads||(s.ads=ck({})),s.ads.vpaidMode=s.ads.vpaidMode||t.Xdi(),this.Gdi.x3t(i,e,s)}M6(i,e,s,n){!function(t){if(!k6(t))throw new m("Unknown ad integration: "+t.integration)}(i);const r=t.jdi(i,s.xe);this.Gdi.M6(r,e,s,n)}sj(t){const i=Ua(t);if(!S(i.id))return i.queryParameters||(i.queryParameters={}),i.custom&&(i.queryParameters.custom?Ye('"custom" parameter is redefined in queryParameters! Please use "queryParameters.custom" only!'):(i.queryParameters.custom=i.custom,delete i.custom)),i.app&&(i.queryParameters.app?Ye('"app" parameter is redefined in queryParameters! Please use "queryParameters.app" only!'):(i.queryParameters.app=i.app,delete i.app)),i.device&&(i.queryParameters.device?Ye('"device" parameter is redefined in queryParameters! Please use "queryParameters.device" only!'):(i.queryParameters.device=i.device,delete i.device)),i.user&&(i.queryParameters.user?Ye('"user" parameter is redefined in queryParameters! Please use "queryParameters.user" only!'):(i.queryParameters.user=i.user,delete i.user)),i.ipAddress&&(i.queryParameters.ip_addr?Ye('"ipAddress" parameter is redefined in queryParameters! Please use "queryParameters.ip_addr" or "ipAddress" only!'):(i.queryParameters.ip_addr=i.ipAddress,delete i.ipAddress)),i.maximumAdDuration&&(i.queryParameters.VMaxd?Ye('"maximumAdDuration" parameter is redefined in queryParameters! Please use "queryParameters.VMaxd" or "maximumAdDuration" only!'):(i.queryParameters.VMaxd=i.maximumAdDuration,delete i.maximumAdDuration)),i}static jdi(i,e){return{integration:ru.SPOTX,sources:{src:t.Qdi(i,s.location.href,e.offsetWidth,e.offsetHeight,Qt.Tg)}}}static Qdi(i,e,s,n,r){if(i.sources)return i.sources;let h=n,o=s;r&&0===o&&(o=320,h=180);const a={custom_skin:1,player_width:o,player_height:h};i.cacheBuster&&(a.cb=_.random()),t.Kdi(e)&&(a.content_page_url=e);const u=Mo({},a,i.queryParameters);return u[T6]||u.VPI||(u[T6]="js"),"https://search.spotxchange.com/vast/2.0/"+i.id+"?"+t.Ydi(u)}static Kdi(t){return Vh(t,"http://")||Vh(t,"https://")}static Ydi(t){return W0(t)}static Xdi(){return Qt.N_?jT.ENABLED:jT.INSECURE}constructor(){this.Gdi=new l3}}),r(),r(),r(),r();var E6=_.PI/180,P6=180/_.PI,x6=class{qy(t,i){return this.x=t,this.y=i,this}Ift(t){return this.x=t.x,this.y=t.y,this}Jdi(t){return this.qy(t[0],t[1])}Zdi(){const t=new Float32Array(2);return t[0]=this.x,t[1]=this.y,t}$di(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this}constructor(t,i){this.x=void 0,this.y=void 0,this.x=t||0,this.y=i||0}},Sr=class{qy(t,i,e){return this.x=t,this.y=i,this.z=e,this}Ift(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}Jdi(t){return this.qy(t[0],t[1],t[2])}Zdi(){const t=new Float32Array(3);return t[0]=this.x,t[1]=this.y,t[2]=this.z,t}V(){return _.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}tli(){const t=this.V();if(0!==t){const i=1/t;this.ili(i)}else this.x=0,this.y=0,this.z=0;return this}ili(t){this.x*=t,this.y*=t,this.z*=t}eli(t){const i=this.x,e=this.y,s=this.z,n=t.x,r=t.y,h=t.z,o=t.w,a=o*i+r*s-h*e,u=o*e+h*i-n*s,c=o*s+n*e-r*i,d=-n*i-r*e-h*s;return this.x=a*o+d*-n+u*-h-c*-r,this.y=u*o+d*-r+c*-n-a*-h,this.z=c*o+d*-h+a*-r-u*-n,this}sli(t){return this.x*t.x+this.y*t.y+this.z*t.z}nli(t,i){const e=t.x,s=t.y,n=t.z,r=i.x,h=i.y,o=i.z;return this.x=s*o-n*h,this.y=n*r-e*o,this.z=e*h-s*r,this}constructor(t,i,e){this.x=void 0,this.y=void 0,this.z=void 0,this.x=t||0,this.y=i||0,this.z=e||0}},Ma=class{qy(t,i,e,s){return this.x=t,this.y=i,this.z=e,this.w=s,this}Ift(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}Jdi(t){return this.qy(t[0],t[1],t[2],t[3])}Zdi(){const t=new Float32Array(4);return t[0]=this.x,t[1]=this.y,t[2]=this.z,t[3]=this.w,t}sli(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}VF(t){return this.rli(this,t)}rli(t,i){const e=t.x,s=t.y,n=t.z,r=t.w,h=i.x,o=i.y,a=i.z,u=i.w;return this.x=e*u+r*h+s*a-n*o,this.y=s*u+r*o+n*h-e*a,this.z=n*u+r*a+e*o-s*h,this.w=r*u-e*h-s*o-n*a,this}hli(){return this.x*=-1,this.y*=-1,this.z*=-1,this.tli(),this}oli(){const t=this.x,i=this.y,e=this.z,s=this.w,n=t*i+e*s;let r,h,o;if(n>.499)r=2*_.atan2(t,s),h=_.PI/2,o=0;else if(n<-.499)r=-2*_.atan2(t,s),h=-_.PI/2,o=0;else{const a=t*t,u=i*i,c=e*e;r=_.atan2(2*i*s-2*t*e,1-2*u-2*c),h=_.asin(2*n),o=_.atan2(2*t*s-2*i*e,1-2*a-2*c)}return new I6(r,o,h)}tli(){let t=_.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return 0===t?(this.x=0,this.y=0,this.z=0,this.w=1):(t=1/t,this.x=this.x*t,this.y=this.y*t,this.z=this.z*t,this.w=this.w*t),this}constructor(t,i,e,s){this.x=void 0,this.y=void 0,this.z=void 0,this.w=void 0,this.x=t||0,this.y=i||0,this.z=e||0,this.w=void 0!==s?s:1}},I6=class{qy(t,i,e){return this.ali=t,this.uli=i,this.cli=e,this}Ift(t){return this.qy(t.ali,t.uli,t.cli)}lO(t){return this.ali+=t.ali,this.uli+=t.uli,this.cli+=t.cli,this}lF(t){return this.ali-=t.ali,this.uli-=t.uli,this.cli-=t.cli,this}dli(){const t=this.ali,i=this.cli,e=this.uli,s=_.cos(t/2),n=_.cos(i/2),r=_.cos(e/2),h=_.sin(t/2),o=_.sin(i/2),a=_.sin(e/2),u=s*n,c=h*o;return new Ma(u*a+c*r,h*n*r+s*o*a,s*o*r-h*n*a,u*r-c*a)}constructor(t,i,e){this.ali=void 0,this.uli=void 0,this.cli=void 0,this.ali=t||0,this.uli=i||0,this.cli=e||0}};r();var R6=["lli","Eot","fli","error"];r();var C6=function(t){return t.Os="unavailable",t.vli="available",t.Ya="presenting",t}({});r();var D6=class{jU(){this.We||(this.We=!0,this.Ls.addEventListener("mousedown",this._li),this.Ls.addEventListener("touchstart",this.gli),s.addEventListener("mousemove",this.cr),s.addEventListener("touchmove",this.mli),s.addEventListener("mouseup",this.wli),s.addEventListener("touchend",this.yli),this.Ali(s))}QU(){this.We&&(this.We=!1,this.Ls.removeEventListener("mousedown",this._li),this.Ls.removeEventListener("touchstart",this.gli),s.removeEventListener("mousemove",this.cr),s.removeEventListener("touchmove",this.mli),s.removeEventListener("mouseup",this.wli),s.removeEventListener("touchend",this.yli),this.bli(s))}Ali(t){if(function(t){try{return Boolean(t)&&t===t.top}catch(t){return!1}}(t));else if(Vl(t))try{t.parent.addEventListener("mouseup",this.wli),this.Ali(t.parent)}catch(i){t.document.documentElement.addEventListener("mouseleave",this.Sli)}}bli(t){if(t.document.documentElement.removeEventListener("mouseleave",this.Sli),Vl(t))try{t.parent.removeEventListener("mouseup",this.wli),this.bli(t.parent)}catch(t){}}Tli(){this.kli=!1}Eli(){const t=this.xli.Pli;t.yaw+=2*_.PI*this.Ili.x*.4/this.Ls.clientWidth,t.pitch+=2*_.PI*this.Ili.y*.5/this.Ls.clientHeight,t.pitch=ur(t.pitch,-_.PI/2,_.PI/2),this.xli.Pli=t}Rli(){return(h.pointerLockElement||h.mozPointerLockElement||h.webkitPointerLockElement)===this.Ls}kn(){this.QU()}constructor(t,i){this.xli=void 0,this.Ls=void 0,this.We=!1,this.Cli=new x6,this.Dli=new x6,this.Ili=new x6,this.kli=!1,this._li=t=>{this.Cli.qy(t.clientX,t.clientY),this.kli=!0,t.preventDefault(),t.stopPropagation()},this.gli=t=>{t.touches&&1===t.touches.length&&(this.Cli.qy(t.touches[0].pageX,t.touches[0].pageY),this.kli=!0,t.preventDefault())},this.cr=t=>{if(this.kli||this.Rli()){if(this.Rli()){const i=t.movementX||t.mozMovementX||0,e=t.movementY||t.mozMovementY||0;this.Dli.qy(this.Cli.x-i,this.Cli.y-e)}else this.Dli.qy(t.clientX,t.clientY);this.Ili.$di(this.Dli,this.Cli),this.Cli.Ift(this.Dli),this.Eli()}},this.mli=t=>{this.kli&&(this.Dli.qy(t.touches[0].pageX,t.touches[0].pageY),this.Ili.$di(this.Dli,this.Cli),this.Cli.Ift(this.Dli),this.Eli())},this.wli=()=>{this.Tli()},this.yli=()=>{this.Tli()},this.Sli=()=>{this.Tli()},this.xli=t,this.Ls=i}};r();var B6=class extends Oi{xa(){return new N6}constructor(){super("fli")}},N6=class extends wp{constructor(){super("stereochange")}};r();var M6=class{Bli(t){t.clearColor(...this.iZ),t.clear(t.COLOR_BUFFER_BIT)}Nli(t,i){t.clearDepth(1),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),t.clear(t.DEPTH_BUFFER_BIT),this.Mli.forEach(e=>{e.Nli(t,i)})}Lli(t){this.Mli.push(t)}Oli(){this.Mli=[]}constructor(){this.iZ=[0,0,0,1],this.Mli=[]}};r(),r(),r();var L6=class{Fli(t,i,e){const s=t.createBuffer();return null===s?(Ye("Failed to create buffer."),null):(t.bindBuffer(i,s),t.bufferData(i,e,t.STATIC_DRAW),s)}constructor(t,i,e,s,n){this.Uli=void 0,this.$y=void 0,this.Vli=void 0,this.Vp=void 0,this.Hli=void 0,this.Wli=void 0,this.uc=void 0,this.Uli=t,this.$y=this.Fli(t,i,e),this.Vli=s,this.Vp=n,this.Hli=!1,this.Wli=0,this.uc=0}},O6=class extends L6{jU(t){if(null===this.$y)return void Ye("Attempted to enable buffer that failed to initialize.");if(null===t)return void Ye("Attempted to enable attribute without location.");const i=this.Uli;i.bindBuffer(i.ARRAY_BUFFER,this.$y),i.vertexAttribPointer(t,this.Vli,this.Vp,this.Hli,this.Wli,this.uc),i.enableVertexAttribArray(t)}QU(t){t&&this.Uli.disableVertexAttribArray(t)}constructor(t,i,e){super(t,t.ARRAY_BUFFER,i,e,t.FLOAT)}};var F6=class extends L6{qli(){const t=this.Uli;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.$y),t.drawElements(t.TRIANGLES,this.zli,this.Vp,this.uc)}constructor(t,i){super(t,t.ELEMENT_ARRAY_BUFFER,i,1,t.UNSIGNED_SHORT),this.zli=void 0,this.zli=i.length}};r();var U6=function(t){return t.VertexPos="aVertexPosition",t.VertexUV="aVertexUV",t.VertexColor="aVertexColor",t}({}),Ea=function(t){return t.ProjectionMat="uProjectionMatrix",t.ModelViewMat="uModelViewMatrix",t.Texture="uTexture",t}({}),V6=function(t){return t.Normal="vNormal",t.Color="vColor",t.UV="vUV",t}({}),H6=class{Gli(t,i,e){const s=this.Xli(t,t.VERTEX_SHADER,i),n=this.Xli(t,t.FRAGMENT_SHADER,e);if(null===s||null===n)return Ye("Failed to create vertex or fragment shader."),null;const r=t.createProgram();return null===r?(Ye("Failed to create shader program"),null):(t.attachShader(r,s),t.attachShader(r,n),t.linkProgram(r),t.getProgramParameter(r,t.LINK_STATUS)?r:(Ye("Failed to initialize shader program"),null))}Xli(t,i,e){const s=t.createShader(i);if(null===s)return Ye("failed to create shader."),null;if(t.shaderSource(s,e),t.compileShader(s),!t.getShaderParameter(s,t.COMPILE_STATUS)){const i=t.getShaderInfoLog(s);return Ye("Failed to compile shader with error: "+i),t.deleteShader(s),null}return s}jli(){return this.Qli}Kli(t){const i=this.Qli;if(null===i)return Ye("Attempted to retrieve attribute location when shader program was not initialized"),null;const e=this.Uli.getAttribLocation(i,t);return-1===e?null:e}Yli(t){const i=this.Qli;if(null===i)return Ye("Attempted to retrieve uniform location when shader program was not initialized"),null;const e=this.Uli.getUniformLocation(i,t);return null===e&&Pv("Attempted to retrieve nonexistent uniform: "+t),e}constructor(t,i,e){this.Qli=void 0,this.Uli=void 0,this.Uli=t,this.Qli=this.Gli(this.Uli,i,e)}},W6=class{Jli(){const t=this.Zli.length,i=_.max(...this.$li);return i>=t?(Pv("Created geometry where largest index ("+i+") is larger than/equal to attribute array size ("+t+")"),!1):(i{e.push(t.x,t.y,t.z)}),new O6(t,new Float32Array(e),3)}(t,this.Zli),s=function(t,i){return new F6(t,new Uint16Array(i))}(t,this.$li),n=function(t,i){const e=[];return i.forEach(t=>{e.push(t.x,t.y)}),new O6(t,new Float32Array(e),2)}(t,this.tfi);return new q6(e,s,n,i)}constructor(t,i,e){this.Zli=void 0,this.$li=void 0,this.tfi=void 0,this.Zli=t,this.$li=i,this.tfi=e}},q6=class{efi(){this.Zli.jU(this.sfi),null!==this.nfi&&this.tfi.jU(this.nfi)}rfi(){this.Zli.QU(this.sfi),null!==this.nfi&&this.tfi.QU(this.nfi)}Nli(){this.$li.qli()}constructor(t,i,e,s){this.Zli=void 0,this.sfi=void 0,this.tfi=void 0,this.nfi=void 0,this.$li=void 0,this.Zli=t;const n=s.Kli(U6.VertexPos);if(null===n)throw new m("Failed to get position attribute location.");this.sfi=n,this.tfi=e,this.nfi=s.Kli(U6.VertexUV),this.$li=i}},z6=class extends W6{constructor(t=1,i=32,e=16,s=0,n=2*_.PI,r=0,h=_.PI){let o=0;const a=_.min(r+h,_.PI),u=[],c=[],d=[],l=[];for(let u=0;u<=e;u++){const f=[],v=u/e;let g=0;0===u&&0===r?g=.5/i:u===e&&a===_.PI&&(g=-.5/i);for(let e=0;e<=i;e++){const a=e/i,u=-t*_.cos(s+a*n)*_.sin(r+v*h),l=t*_.cos(r+v*h),p=t*_.sin(s+a*n)*_.sin(r+v*h);c.push(new Sr(u,l,p)),d.push(new x6(a+g,1-v)),f.push(o++)}l.push(f)}for(let t=0;t0)&&u.push(i,n,o),(t!==e-1||a<_.PI)&&u.push(n,h,o)}super(c,u,d)}};r(),r();var G6=[0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255],X6=class{hfi(){const t=this.Uli;t.activeTexture(this.ofi),t.bindTexture(t.TEXTURE_2D,this.afi)}gr(){const t=this.Uli;t.activeTexture(this.ofi),t.bindTexture(t.TEXTURE_2D,this.afi),t.uniform1i(this.ufi,0)}cfi(t){const i=this.Uli;i.bindTexture(i.TEXTURE_2D,this.afi),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0),i.texImage2D(i.TEXTURE_2D,this.i2,this.dfi,this.lfi,this.ffi,t),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1)}vfi(t){const i=this.Uli;i.bindTexture(i.TEXTURE_2D,this.afi),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0),t.Gst.DQ(i,i.TEXTURE_2D,this.i2,this.dfi,this.lfi,this.ffi),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1)}constructor(t,i){if(this.Uli=void 0,this.afi=void 0,this.ufi=void 0,this.i2=void 0,this.dfi=void 0,this.lfi=void 0,this.ffi=void 0,this.ofi=void 0,this.Uli=t,this.afi=t.createTexture(),null===this.afi)throw new m("Failed to create texture");const e=i.Yli(Ea.Texture);if(null===e)throw new m("Failed to get texture location.");this.ufi=e,t.bindTexture(t.TEXTURE_2D,this.afi),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),this.ofi=t.TEXTURE0,this.i2=0,this.dfi=t.RGBA,this.lfi=t.RGBA,this.ffi=t.UNSIGNED_BYTE,t.texImage2D(t.TEXTURE_2D,this.i2,this.dfi,2,2,0,this.lfi,this.ffi,new j(G6))}},j6="\n attribute vec4 "+U6.VertexPos+";\n attribute vec2 "+U6.VertexUV+";\n\n uniform mat4 "+Ea.ModelViewMat+";\n uniform mat4 "+Ea.ProjectionMat+";\n \n varying mediump vec2 "+V6.UV+";\n \n void main() {\n gl_Position = "+Ea.ProjectionMat+" * "+Ea.ModelViewMat+" * "+U6.VertexPos+";\n "+V6.UV+" = "+U6.VertexUV+";\n }\n",Q6="\n varying mediump vec2 "+V6.UV+";\n \n uniform sampler2D "+Ea.Texture+";\n\n void main() {\n gl_FragColor = texture2D("+Ea.Texture+", "+V6.UV+");\n }\n",K6=class{jli(){return this.Qli}jU(){this.Uli.useProgram(this.Qli.jli()),this.afi.gr()}_fi(t){this.afi.cfi(t)}gfi(t){this.afi.vfi(t)}constructor(t){this.Uli=void 0,this.Qli=void 0,this.afi=void 0,this.Uli=t,this.Qli=new H6(t,j6,Q6),this.afi=new X6(t,this.Qli)}};r(),r();var Y6=sn(yd()),J6=sn(Ad()),Z6=(sn(bd()),sn(Sd())),$6=(sn(Td()),sn(kd())),t8=sn(Ed()),i8=sn(Pd()),e8=sn(xd()),s8=sn(Id()),n8=class{Nli(t,i){if(this.pfi(i.mfi)){this.wfi.efi(),this.yfi.jU();const e=this.Afi,s=i.bfi,n=(0,t8.default)(s,s,e);t.uniformMatrix4fv(this.Sfi,!1,n);const r=i.Tfi;t.uniformMatrix4fv(this.kfi,!1,r),this.wfi.Nli(),this.wfi.rfi()}}pfi(t){return"none"===this.mfi||"right"!==t&&"left"===this.mfi||"right"===t&&"right"===this.mfi}get Afi(){const t=(0,Y6.default)(),i=this.mo;return(0,s8.default)(t,t,i.Zdi()),(0,e8.default)(t,t,this.Efi.x,new Float32Array([1,0,0])),(0,e8.default)(t,t,this.Efi.y,new Float32Array([0,1,0])),(0,e8.default)(t,t,this.Efi.z,new Float32Array([0,0,1])),t}constructor(t,i,e,s){this.wfi=void 0,this.yfi=void 0,this.Sfi=void 0,this.kfi=void 0,this.mo=new Sr,this.Efi=new Sr,this.mfi="none",this.yfi=e;const n=e.jli();this.wfi=i.ifi(t,n),s&&(this.mfi=s);const r=n.Yli(Ea.ModelViewMat);if(null===r)throw new m("Failed to get model view matrix location.");this.Sfi=r;const h=n.Yli(Ea.ProjectionMat);if(null===h)throw new m("Failed to get projection matrix location.");this.kfi=h}};r();var r8=class{Pfi(){const t=(0,Y6.default)();return(0,i8.default)(t,this.xfi,this.Ifi,this.Rfi,this.Cfi)}Dfi(){this.Bfi=this.Pfi()}get Tfi(){return new Float32Array(this.Bfi)}set Tfi(t){this.Bfi=t}Nfi(){const t=(0,Y6.default)(),i=(0,Z6.default)((0,Y6.default)(),this.Mfi.Zdi()),e=(0,J6.default)((0,Y6.default)(),this.Lfi.Zdi());return(0,t8.default)(t,i,e),(0,$6.default)(t,t),t}Ofi(){this.Ffi=this.Nfi()}get bfi(){return new Float32Array(this.Ffi)}Ufi(){this.Ofi(),this.Dfi()}hr(){this.Mfi=new Sr,this.Efi=new Ma,this.Ufi()}Vfi(t){const i=this.Lfi.oli();i.lO(t),this.Efi=i.dli()}Hfi(t){this.Efi=t.dli()}get Wfi(){return this.xfi}set Wfi(t){this.xfi=t,this.Dfi()}get qfi(){return this.Ifi}set qfi(t){this.Ifi=t,this.Dfi()}get mo(){return(new Sr).Ift(this.Mfi)}set mo(t){this.Mfi=t,this.Ofi()}get Efi(){return(new Ma).Ift(this.Lfi)}set Efi(t){this.Lfi=t,this.Ofi()}constructor(t){this.xfi=72*_.PI/180,this.Ifi=1.77,this.Rfi=.1,this.Cfi=100,this.mfi="none",this.Mfi=void 0,this.Lfi=void 0,this.Bfi=void 0,this.Ffi=void 0,this.Mfi=new Sr,this.Lfi=new Ma,this.Bfi=this.Pfi(),this.Ffi=this.Nfi(),t&&(this.mfi=t)}};r();var h8=class extends Oi{xa(){return new o8}constructor(){super("lli")}},o8=class extends wp{constructor(){super("directionchange")}},a8=1e-4,u8=class extends Ne{zfi(){od.xr?(od.xr.addEventListener("devicechange",this.Gfi),this.Gfi()):this.ABt("Your browser does not support WebXR",Vo.VR_PLATFORM_UNSUPPORTED)}Xfi(){this.oa.Ma.wn(Gi.pa,this.bn),this.oa.wn(Rh.yn,this.bn),this.oa.wn(d.do,this.fo),this.oa.wn(d.Zw,this.jG)}jfi(){var t;this.Qfi||(this.Qfi=h.createElement("canvas"),this.Qfi.className="theoplayer-vr",this.Qfi.style.zIndex="2",this.Qfi.style.background="black",this.Qfi.style.display="none",this.oa.xe.appendChild(this.Qfi),oa(this.Qfi));const i=null!=(t=this.Qfi.getContext("webgl2"))?t:this.Qfi.getContext("webgl");i?(this.Uli=i,this.Kfi=new D6(this,this.Qfi)):this.ABt("Your browser does not support WebGL",Vo.VR_PLATFORM_UNSUPPORTED)}async Yfi(){if(!od.xr)return this.Jfi=!1,void(this.Zfi=!1);await Promise.all([od.xr.isSessionSupported("inline").then(t=>{this.Jfi=t}).catch(t=>{this.Jfi=!1,this.ABt("exception when calling xr.isSessionSupported for inline session: "+t,Vo.VR_PRESENTATION_ERROR)}),od.xr.isSessionSupported("immersive-vr").then(t=>{this.Zfi=t}).catch(t=>{this.Zfi=!1,this.ABt("exception when calling xr.isSessionSupported for immersive-vr session: "+t,Vo.VR_PRESENTATION_ERROR)})])}$fi(){this.tvi&&(this.ivi(this.evi,this.nvi),this.rvi())}ivi(t,i){const e=this.Uli;if(!e||t===qR.NONE)return;let s,n;this.hvi.Oli(),t===qR.PM360?(s=2*_.PI,n=-_.PI/2):(s=_.PI,n=-_.PI);const r=new z6(16,60,40,0,s),h=[],o=[];for(let t=0;t{t.x*=-1});const a=new W6(r.Zli,r.$li,h),u=new W6(r.Zli,r.$li,o);this.ovi=new K6(e);const c=new n8(e,a,this.ovi,"left");c.Efi.y=n,this.hvi.Lli(c);const d=new n8(e,u,this.ovi,"right");d.Efi.y=n,this.hvi.Lli(d)}rvi(){this.Uli&&(this.Qfi.style.display="block",this.avi(),this.oa.mn(d.uo,this.uvi),this.Jfi&&(this.oa.hx?this.oa.wn(d.uo,this.uvi):this.uvi()))}cvi(){this.fvi(),this.oa.mn(d.uo,this.uvi),this.Qfi&&(this.Qfi.style.display="none")}vvi(){this._vi(),this.gvi()}async pvi(){if(!this.mvi&&this.Jfi)try{const t=await Nc(od.xr.requestSession("inline"),this.rV.Yg);let i;i=Qt.Ks?Qt.u_?"viewer":"local":"viewer";const e=await t.requestReferenceSpace(i);t.addEventListener("end",this._vi),this.wvi=e,this.mvi=t,this.Kfi.jU(),this.yvi(),await t.updateRenderState({baseLayer:new XRWebGLLayer(t,this.Uli),inlineVerticalFieldOfView:this.xfi*E6})}catch(t){this._vi(),this.ABt(t,Vo.VR_PRESENTATION_ERROR)}}_vi(){this.mvi&&(this.fvi(),this.Kfi.QU(),this.mvi.removeEventListener("end",this._vi),this.mvi.end().catch(Ct),this.mvi=null,this.avi())}async Avi(){if(!this.bvi&&this.Zfi){this.fvi();try{const t=await Nc(od.xr.requestSession("immersive-vr"),this.rV.Yg),i=await t.requestReferenceSpace("local");t.addEventListener("end",this.gvi),this.Svi=i,this.bvi=t,await this.Tvi(),this.yvi()}catch(t){this.gvi(),this.ABt(t,Vo.VR_PRESENTATION_ERROR)}}}async Tvi(){const t=this.Uli,i=this.bvi;this.Qfi&&t&&i&&!this.kvi&&(this.Qfi.addEventListener("webglcontextlost",t=>{t.preventDefault()}),this.Qfi.addEventListener("webglcontextrestored",()=>{this.ivi(this.evi,this.nvi)}),this.kvi=!0,await t.makeXRCompatible(),await i.updateRenderState({baseLayer:new XRWebGLLayer(i,t)}))}avi(){if(!this.bvi&&this.Uli){const t=this.Uli,i=this.Qfi.clientWidth,e=this.Qfi.clientHeight;if(0===i||0===e)return;const s=zd.Zs.fp;this.Qfi.width=i*s,this.Qfi.height=e*s,t.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight)}}yvi(){null===this.Evi&&(this.Pvi(),this.xvi?this.Evi=this.xvi.requestAnimationFrame(this.Ivi):this.Rvi())}fvi(){null!==this.Evi&&(this.Rvi(),this.xvi&&this.xvi.cancelAnimationFrame(this.Evi),this.Evi=null)}Pvi(){if(null!==this.Cvi)return;const t=this.oa.Wx();if(void 0===t||!(t instanceof HTMLVideoElement))return void 0;if("function"!=typeof t.requestVideoFrameCallback)return;const i=()=>{this.ovi.gfi(this.oa),this.Cvi=t.requestVideoFrameCallback(i)};this.Dvi=t,this.Cvi=t.requestVideoFrameCallback(i)}Rvi(){var t,i;null!==this.Cvi&&(null==(i=this.Dvi)||null==(t=i.cancelVideoFrameCallback)||t.call(i,this.Cvi),this.Dvi=null,this.Cvi=null)}Bvi(){return!!this.Nvi||(Qt.ru?this.Mvi&&this.Lvi:this.Mvi)}Ovi(){const t=DeviceMotionEvent.requestPermission;"function"==typeof t&&t().then(t=>{this.Lvi="granted"===t})}Fvi(){return(!this.hx()||Boolean(this.Uvi))&&this.Vvi()}hx(){return this.oa.hx}Vvi(){return this.oa.Ax>=2}get Hvi(){return this.Wvi}set Hvi(t){const i=this.Ylt;this.Wvi=t,this.Ylt!==i&&this.So(new Tr)}get tvi(){return this.evi!==qR.NONE}get evi(){return this.qvi}set evi(t){const i=this.Ylt;this.qvi=t,this.Ylt!==i&&this.So(new Tr)}get Zfi(){return this.zvi}set Zfi(t){const i=this.zvi;this.zvi=t,this.zvi!==i&&this.So(new Tr)}get Gvi(){return this.Zfi}get xvi(){return this.bvi||this.mvi}get bvi(){return this.Nvi}set bvi(t){const i=this.Ylt;this.Nvi=t,this.Ylt!==i&&this.So(new Tr)}get Xvi(){return this.Svi||this.wvi}get jvi(){const t=this.Qvi.oli();return{yaw:t.ali*P6,pitch:t.uli*P6,roll:t.cli*P6}}set jvi(t){const i=c8(t&&t.pitch||0)*E6,e=c8(t&&t.roll||0)*E6,s=c8(t&&t.yaw||0)*E6,n=new I6(s,i,e),r=this.Qvi.oli(),h=this.Kvi.oli();this.Qvi=n.dli(),this.Kvi=n.lF(r).lO(h).dli()}get Pli(){const t=this.Kvi.oli();return{yaw:t.ali,pitch:t.uli,roll:t.cli}}set Pli(t){const i=d8(t&&t.pitch||0),e=d8(t&&t.roll||0),s=d8(t&&t.yaw||0),n=new I6(s,i,e);this.Kvi=n.dli()}get Ylt(){return this.Hvi?this.bvi?C6.Ya:C6.vli:C6.Os}get Yvi(){return null!==this.bvi}set Yvi(t){const i=this.Yvi;t&&this.Zfi?this.Avi():this.gvi(),this.Yvi!==i&&this.So(new B6)}get Jvi(){return this.Mvi}set Jvi(t){null===this.Nvi&&(this.Mvi=t,t&&Qt.ru&&this.Ovi())}get Zvi(){return this.xfi}set Zvi(t){t&&t>=0&&t<=180&&(this.xfi=t,null!==this.mvi&&this.mvi.updateRenderState({inlineVerticalFieldOfView:this.xfi*E6}))}ABt(t,i){this.So(new Pi(new Ga(i,t)))}$vi(){const t=this.oa.nu();return t&&t.vr}kn(){this.rV.Zg(),this.vvi(),this.Vo(),this.Qfi&&(os(this.Qfi),this.Qfi=void 0),this.Uli=void 0,this.Kfi&&(this.Kfi.kn(),this.Kfi=void 0),this.oa=void 0}constructor(t){super(),this.oa=void 0,this.Ca=void 0,this.rV=new at,this.Jfi=!1,this.zvi=!1,this.Qvi=new Ma,this.t_i=new Ma,this.Kvi=new Ma,this.xfi=74,this.Mvi=!1,this.YS=void 0,this.nvi=Vu.NONE,this.Wvi=!1,this.qvi=qR.NONE,this.Qfi=void 0,this.ovi=void 0,this.Uli=void 0,this.hvi=new M6,this.Kfi=void 0,this.mvi=null,this.Nvi=null,this.wvi=null,this.Svi=null,this.kvi=!1,this.Evi=null,this.Dvi=null,this.Cvi=null,this.Uvi=0,this.Lvi=!1,this.Gfi=()=>{const t=this.Jfi;this.Yfi().then(()=>{this.Jfi?t||this.mvi||this.Nvi||this.$fi():this.ABt("Inline session not available. Panorama functionality will not work.",Vo.VR_PRESENTATION_ERROR)})},this.fo=()=>{var t;this.cvi(),this.vvi(),null==(t=od.xr)||t.removeEventListener("devicechange",this.Gfi);const i=this.$vi();this.YS=i,this.Hvi=it(i),this.nvi=(null==i?void 0:i.stereoMode)||Vu.NONE,this.evi=(null==i?void 0:i.panoramaMode)||qR.NONE,i&&(this.jfi(),this.$fi(),this.zfi())},this.uvi=()=>{this.pvi()},this.gvi=()=>{this.bvi&&(this.fvi(),this.bvi.removeEventListener("end",this.gvi),this.bvi.end().catch(Ct),this.bvi=null,this.Svi=null,this.kvi=!1,this.mvi?this.yvi():this.pvi())},this.bn=()=>{this.avi()},this.Ivi=(t,i)=>{if(!this.Uli)return;const e=this.Uli,s=this.xvi;if(null===this.Cvi&&this.Fvi()&&(this.ovi.gfi(this.oa),this.Uvi>0&&(this.Uvi-=1)),null===s||void 0===i)return void 0;this.Evi=s.requestAnimationFrame(this.Ivi);const n=s.renderState.baseLayer,r=i.getViewerPose(this.Xvi);if(void 0===n||void 0===r)return void 0;e.bindFramebuffer(e.FRAMEBUFFER,n.framebuffer);let h=new I6,o=0;for(const t of r.views){const i=new r8(t.eye);if(i.Tfi=t.projectionMatrix,this.Bvi()){let e;if(Qt.Ks&&Qt.u_&&null===this.Nvi){if(e=t.transform.inverse.orientation,0===e.x&&0===e.y&&0===e.z&&1===e.w)return}else e=t.transform.orientation;i.Efi=new Ma(e.x,e.y,e.z,e.w)}this.mvi&&i.Vfi(this.Kvi.oli()),h=h.lO(i.Efi.oli()),o+=1;const s=n.getViewport(t);s&&e.viewport(s.x,s.y,s.width,s.height),this.hvi.Nli(e,i)}const a=new I6(h.ali/o,h.uli/o,h.cli);this.Qvi=a.dli(),function(t,i){const e=t.sli(i);return 1-e*e{this.Uvi=5},this.oa=t,this.Ca=function(t){let i;const e={get stereo(){return t.Yvi},set stereo(i){t.Yvi=i},get useDeviceMotionControls(){return t.Jvi},set useDeviceMotionControls(i){t.Jvi=i},get direction(){return t.jvi},set direction(i){t.jvi=i},get verticalFOV(){return t.Zvi},set verticalFOV(i){t.Zvi=i},get canPresentVR(){return t.Gvi},get state(){return t.Ylt},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new QD(t,R6,e),e}(this),this.Xfi()}};function c8(t){return Kl(t+180,360)-180}function d8(t){return Kl(t+_.PI,2*_.PI)-_.PI}VF(function(t){return class extends t{xa(){return po(super.xa(),{vr:this.xli.Ca})}kn(){this.xli.kn(),super.kn()}constructor(t,i){super(t,i),this.xli=void 0,this.xli=new u8(this)}}},zo.lu),r(),r();var l8=class extends _o{get Ca(){return this.hu||(this.hu=function(t){let i;const e={get status(){return t.hk},get tasks(){return t.Fei},get network(){return t.oX.Ca},createTask:(i,e)=>t.i_i(i,e),addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new ws(t,e),e}(this)),this.hu}get hk(){return this.e_i.hk}get Fei(){return this.e_i.Fei.Ca}get oX(){return this.Ust}i_i(t,i,e){let s,n;if(void 0===e&&(e="persistent"),!t)throw new m("Unexpected - The source description is undefined");if(s=Cn(t),n=T4(i),qo(s))throw new m("Invalid source description");return this.e_i.Bei(s,n).Ca}constructor(t,i){super(),this.e_i=void 0,this.Ust=void 0,this.hu=void 0,this.e_i=t,this.Ust=i,this.e_i.wn("Eot",this.Rs)}};var f8=function(){const t=new BD(zd.SP,!1),i=Rc.Ng,e=new C4(t),s=new S4(i,e),n=new MD(t),r=new O3(i.fPt,s,"persistent");return new l8(r,n)}().Ca;function v8(t,i){if("function"==typeof t.getAll){return eh(void 0===i?t.getAll():t.getAll(i))}return function(t){const i=new pa,e=[];return t.onsuccess=()=>{const s=t.result;s&&s.value?(e.push(s.value),s.continue()):i.Xy(e)},t.onerror=()=>{i.jy(t.error)},i.Qy}(void 0===i?t.openCursor():t.openCursor(i))}function eh(t){return new Promise((i,e)=>{t.onsuccess=()=>{i(t.result)},t.onerror=()=>{e(t.error)}})}r(),r(),r(),r(),r(),r();var _8=class{Zg(){if(this.ro)try{this.uPt.abort(),this.ro=!1}catch(t){}}constructor(t){this.uPt=void 0,this.Qy=void 0,this.ro=void 0,this.uPt=t,this.ro=!0,this.Qy=new Promise((t,i)=>{this.uPt.oncomplete=()=>{this.ro=!1,t()},this.uPt.onerror=()=>{this.ro&&(this.ro=!1,i(this.uPt.error||new m("Transaction error")))},this.uPt.onabort=()=>{this.ro=!1,i(new m("Transaction aborted"))}})}};async function g8(t,i,e){const s=new _8(t);try{const[t]=await Promise.all([i(e),s.Qy]);return t}catch(t){if(!s.ro)throw new V3("IDBTransaction committed prematurely",t);throw t}finally{s.Zg()}}var p8=class{get l(){return this.pE.l}ZEt(t){return Promise.resolve("persistent"===t)}zSt(t,i){if(void 0===i&&(i="persistent"),"persistent"!==i)return Promise.reject(Aa(i));return eh(this.s_i(cu.gPt).put(t))}async $Et(t,i){if(void 0===i&&(i="persistent"),"persistent"!==i)return Promise.reject(Aa(i));for(const e of t)await this.zSt(e,i)}async Hy(t){return Boolean(await this.Wy(t))}Wy(t){return eh(this.s_i(cu._Pt).get(t))}tPt(t,i){return eh(this.s_i(cu._Pt).index(i).get(t))}async jEt(t){const i=[];for(const e of t){const t=await this.Wy(e);t&&i.push(t)}return i}iPt(){return v8(this.s_i(cu._Pt))}ePt(t){return v8(this.s_i(cu._Pt),t)}sPt(t,i){return v8(this.s_i(cu._Pt).index(i),t)}_S(t){return eh(this.s_i(cu.gPt).delete(t))}async nPt(t){for(const i of t)await this._S(i)}rPt(){return eh(this.s_i(cu.gPt).clear())}s_i(t){if(!this.n_i)throw new m("Lock was released");if(!function(t,i){return t===cu._Pt&&i===cu._Pt||i===cu.gPt}(t,this.n_i.mode))throw new m("Incompatible transaction mode: "+this.n_i.mode+", expected "+t);return this.n_i.objectStore(this.l)}r_i(){this.pE.h_i(this),this.n_i=void 0}constructor(t,i){this.pE=void 0,this.n_i=void 0,this.pE=t,this.n_i=i}};var m8=class{ZEt(t){return Promise.resolve("persistent"===t)}zSt(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?Promise.reject(Aa(i)):this.uPt(cu.gPt,i=>i.zSt(t))}$Et(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?Promise.reject(Aa(i)):this.uPt(cu.gPt,i=>i.$Et(t))}Hy(t){return this.uPt(cu._Pt,i=>i.Hy(t))}Wy(t){return this.uPt(cu._Pt,i=>i.Wy(t))}tPt(t,i){return this.uPt(cu._Pt,e=>e.tPt(t,i))}jEt(t){return this.uPt(cu._Pt,i=>i.jEt(t))}iPt(){return this.uPt(cu._Pt,t=>t.iPt())}ePt(t){return this.uPt(cu._Pt,i=>i.ePt(t))}sPt(t,i){return this.uPt(cu._Pt,e=>e.sPt(t,i))}_S(t){return this.uPt(cu.gPt,i=>i._S(t))}nPt(t){return this.uPt(cu.gPt,i=>i.nPt(t))}rPt(){return this.uPt(cu.gPt,t=>t.rPt())}QPt(t){return this.o_i(),this.LPt=new p8(this,t),this.LPt}o_i(){if(void 0!==this.LPt)throw new m("Already locked")}h_i(t){if(this.LPt!==t)throw new m("Incorrect lock");this.LPt=void 0}Zo(t){return this.ta.Zo(t)}uPt(t,i){return this.Zo(()=>this.a_i(t,i))}async a_i(t,i){this.o_i();const e=this.u_i.transaction(this.l,t),s=this.QPt(e);try{return await g8(e,i,s)}finally{s.r_i()}}c_i(t){this.o_i();const i=this.u_i.transaction(this.l,t);return this.QPt(i)}static d_i(t,i){let e;const s=new Promise(t=>{e=t}),n=t.reduce((t,i)=>t.then(()=>{let t;const e=new Promise(i=>{t=i});return i.Zo(()=>(t(),s)).catch(Ct),e}),Promise.resolve());return e(n.then(i)),s}constructor(t,i){this.u_i=void 0,this.l=void 0,this.LPt=void 0,this.ta=new te,this.u_i=t,this.l=i}};r(),r(),r(),r(),r();var w8={bD:17,l_i:async t=>{const{transaction:i,database:e}=t,s=i.objectStoreNames;if(s&&s.length)for(let t=0;tnew A8(t)}},S8="cachingTask",T8="licences",k8="manifest",E8="segment",P8="segmentMetadata";async function x8(){!function(){if("undefined"==typeof indexedDB)throw new m("Indexed database unavailable")}();const t=indexedDB.open("theoplayer-cache-database",18);return t.addEventListener("upgradeneeded",I8),await eh(t)}async function I8(t){const i=t.oldVersion<=18?t.oldVersion:-1,e=t.target,s=e.result,n=e.transaction,r=b8.Ret(i),h={database:s,transaction:n};await g8(n,t=>r.f_i(t),h)}var R8=class{static get Ng(){return this.lAt||(this.lAt=x8()),this.lAt}};R8.lAt=void 0,r();var C8=class{uPt(t){return t(this)}r_i(){this.dPt.r_i(),this.ect.r_i(),this.lPt.r_i(),this.fPt.r_i(),this.vPt.r_i()}constructor(t,i){this.dPt=void 0,this.ect=void 0,this.lPt=void 0,this.fPt=void 0,this.vPt=void 0,this.dPt=t.dPt.QPt(i),this.ect=t.ect.QPt(i),this.lPt=t.lPt.QPt(i),this.fPt=t.fPt.QPt(i),this.vPt=t.vPt.QPt(i)}};Rc.Ba(class t{static async Ret(){const i=await R8.Ng;return new t(i)}uPt(t){const i=this.allCollections;return m8.d_i(i,()=>this.a_i(i,t))}async a_i(t,i){const e=t.map(t=>t.l),s=this.u_i.transaction(e,cu.gPt),n=new C8(this,s);try{return await g8(s,i,n)}finally{n.r_i()}}get allCollections(){return[this.ect,this.dPt,this.lPt,this.fPt,this.vPt]}constructor(t){this.u_i=void 0,this.dPt=void 0,this.ect=void 0,this.lPt=void 0,this.fPt=void 0,this.vPt=void 0,this.u_i=t,this.dPt=new m8(t,P8),this.ect=new m8(t,E8),this.lPt=new m8(t,k8),this.fPt=new m8(t,S8),this.vPt=new m8(t,T8)}}.Ret),r(),r(),r();var D8=class{m_i(t){const i=this.CY.xP(),e=t.createGain();for(const s of i){t.createMediaElementSource(s).connect(e)}return e}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}xa(){const t=this;return{createAudioSourceNode:i=>t.m_i(i)}}constructor(t){this.CY=void 0,this.hu=void 0,this.CY=t}};VF(function(t){return class extends t{xa(){const t=this.w_i.Ca;return po(super.xa(),{get audio(){return t}})}constructor(t,i){super(t,i),this.w_i=void 0,this.w_i=new D8(this.Pa)}}},zo.lu),r(),r();VF(function(t){return class i extends t{Ta(t){const e=i.y_i(this.Cd.analytics),s=i.y_i(t?t.analytics:void 0);e||s?this.A_i(Mo({},e,s)):this.b_i&&this.b_i.disable(),super.Ta(t)}A_i(t){if(this.b_i)this.b_i.enable(),this.b_i.setOptions(t);else{const i=s.youbora;if(!i)throw new m("Youbora JavaScript library not loaded.");if(!i.adapters.TheoPlayer2)throw new m("TheoPlayer2 adapter not available on Youbora JavasScript library");const e=new i.Plugin(t);e.setAdapter(new i.adapters.TheoPlayer2(this.Ca)),this.Jc&&i.adapters.TheoPlayer2.NativeAdsAdapter&&e.setAdsAdapter(new i.adapters.TheoPlayer2.NativeAdsAdapter(this.Ca)),this.b_i=e}}static y_i(t){if(t){const i=t.filter(t=>"youbora"===t.integration);if(0===i.length)return;if(i.length>1)throw new m("Only one youbora analytics configuration expected");const e=i[0],{integration:s}=e;return QS(e,["integration"])}}kn(){this.b_i&&this.b_i.disable(),super.kn()}constructor(t,i){super(t,i),this.b_i=void 0}}},zo.hnt),r(),r(),r();var B8=1,N8=0,M8=1e3,L8=class t extends Jb{S_i(){const t=this.ct===1/0,i=t?B8:N8,e=t?-1:this.ct,s=De(this.oa.rt.II,this.T_i);this.k_i.setPresentationInformation(new this.E_i(i,e,s))}T_i(t){const i=t.KI.II,e=[];for(let t=0;t{this.M_i(),this.L_i()},t.O_i)}xNt(){this.oa.Jc&&(this.oa.Jc.wn("Bnt",this.yui),this.oa.Jc.wn("Nnt",this.Tui),this.oa.Jc.wn("H3t",this.jui),this.oa.Jc.wn("T4t",this.F_i)),this.oa.wn(d.Bw,this.U_i),this.oa.wn(Mc.ma,this.e8),this.oa.wn(d.jw,this.V_i),this.oa.wn(d.uo,this.uvi),this.oa.wn(Do.TM,this.GG),this.oa.wn(d.Jw,this.YQ),this.oa.wn(d.Zw,this.jG),this.oa.wn(Do.SM,this.qG),this.oa.wn(d.oy,this.H_i)}INt(){this.oa.Jc&&(this.oa.Jc.mn("Bnt",this.yui),this.oa.Jc.mn("Nnt",this.Tui),this.oa.Jc.mn("H3t",this.jui),this.oa.Jc.mn("T4t",this.F_i)),this.oa.mn(d.Bw,this.U_i),this.oa.mn(Mc.ma,this.e8),this.oa.mn(d.jw,this.V_i),this.oa.mn(d.uo,this.uvi),this.oa.mn(Do.TM,this.GG),this.oa.mn(d.Jw,this.YQ),this.oa.mn(d.Zw,this.jG),this.oa.mn(Do.SM,this.qG),this.oa.mn(d.oy,this.H_i)}kn(){p(this.W_i),this.INt()}constructor(t,i,e,s=MMPlayerState,n=MMAdState,r=MMPresentationInfo){super(),this.oa=void 0,this.YS=void 0,this.k_i=void 0,this.q_i=void 0,this.z_i=void 0,this.E_i=void 0,this.G_i=void 0,this.I_i=void 0,this.B_i=void 0,this.C_i=void 0,this.X_i=void 0,this.W_i=void 0,this.yui=void 0,this.Tui=void 0,this.jui=void 0,this.F_i=void 0,this.H_i=void 0,this.U_i=void 0,this.e8=void 0,this.V_i=void 0,this.uvi=void 0,this.GG=void 0,this.YQ=void 0,this.jG=void 0,this.qG=void 0,this.L_i=void 0,this.M_i=void 0,this.oa=t,this.YS=i,this.k_i=e,this.q_i=s,this.z_i=n,this.E_i=r,this.G_i=!0,this.I_i=!1,this.B_i=void 0,this.C_i=void 0,this.X_i=void 0,this.yui=t=>{const i=t.Int;i.O0t();var e;e=i.wnt().duration;const s="linear"===i.wnt().type;i.F0t(),i.N0t();s&&(this.I_i=!0),this.D_i=this.z_i.AD_IMPRESSION,this.D_i=this.z_i.AD_STARTED},this.Tui=t=>{this.I_i=!1,this.D_i=this.z_i.AD_COMPLETED},this.jui=t=>{t.QJt===Ic.ADBLOCK?this.D_i=this.z_i.AD_BLOCKED:this.D_i=this.z_i.AD_ERROR},this.F_i=()=>{this.D_i=this.z_i.AD_SKIPPED},this.H_i=t=>{var i,e,s,n;t.qk===Ci.Bk&&(this.X_i&&t.BX!==this.X_i&&this.k_i.reportABRSwitch(this.X_i,t.BX),this.X_i=t.BX,this.k_i.reportChunkRequest(new MMChunkInformation(t.$D,t.BX,t.VN,t.uut.Yu,void 0,void 0,null!=(s=null==(i=t.uut.Sat)?void 0:i[0])?s:0,null!=(n=null==(e=t.uut.Sat)?void 0:e[1])?n:-1)))},this.U_i=t=>{this.R_i=this.q_i.STOPPED,this.So(t)},this.e8=t=>{this.R_i=this.q_i.ERROR,this.k_i.reportError(t.error,this.P_i())},this.V_i=()=>{this.x_i?this.D_i=this.z_i.AD_PAUSED:this.R_i=this.q_i.PAUSED},this.uvi=()=>{this.x_i&&(this.D_i=this.z_i.AD_PLAY)},this.GG=()=>{this.x_i?(this.B_i===this.z_i.AD_PAUSED&&(this.D_i=this.z_i.AD_RESUMED),this.D_i=this.z_i.AD_PLAYING):(this.G_i&&(this.G_i=!1,this.S_i(),this.R_i=this.q_i.STARTED),this.R_i!==this.q_i.PAUSED&&this.R_i!==this.q_i.BUFFERING||(this.R_i=this.q_i.RESUMED))},this.YQ=()=>{this.k_i.reportPresentationSize(this.oa.Bx,this.oa.Rx)},this.jG=t=>{this.x_i||this.R_i!==this.q_i.PAUSED||this.k_i.reportPlayerSeekCompleted(t.currentTime*M8)},this.qG=()=>{this.x_i||(this.R_i=this.q_i.BUFFERING)},this.L_i=()=>{this.k_i.reportDownloadRate(_.floor(HI.Ng.fW()))},this.M_i=()=>{this.x_i||this.k_i.reportPlaybackPosition(this.P_i())},this.R_i=this.q_i.INITIALIZED,this.xNt(),this.W_i=this.N_i()}};L8.O_i=2e3,VF(function(t){return class extends t{kn(){super.kn(),this.j_i()}constructor(t,i){super(t,i),this.Q_i=void 0,this.K_i=void 0,this.Y_i=()=>{this.K_i=void 0,this.j_i();const t=super.nu();t&&(this.K_i=function(t,i){const e=function(t,i){if(t&&t.analytics)for(const i of t.analytics)if("smartsight"===i.integration)return i;if(i&&i.analytics)for(const t of i.analytics)if("smartsight"===t.integration)return t;return}(t,i);if(!e)return;return e}(t,this.Cd)),this.J_i()},this.J_i=()=>{if(!this.Q_i&&this.K_i&&this.bt&&this.bt.src&&!this.hx){const t=MMSmartStreaming.getInstance();!function(t,i,e){t.registerMMSmartStreaming(e.playerName,e.customerID,e.subscriberID,e.domainName),t.reportComponent("THEOSDK"),t.reportPlayerInfo("THEOplayer","THEOplayer","10.0.0"),t.reportDeviceInfo(void 0,void 0,void 0,void 0,void 0,s.innerWidth,s.innerHeight),t.initializeSession("QBRModeDisabled",i,e.metaURL,e.assetID)}(t,this.bt.src,this.K_i),this.Q_i=new L8(this,this.K_i,t),this.Q_i.wn("ended",this.j_i)}},this.j_i=()=>{this.Q_i&&(this.Q_i.kn(),this.Q_i=void 0)},this.wn(d.do,this.Y_i),this.wn(d.xw,this.J_i),this.wn(d.uo,this.J_i)}}},zo.hnt),r(),r();var O8=String.fromCharCode(95);var F8=class t{get Ca(){return this.hu||(this.hu=function(t){return{get adsManager(){return t.adsManager},get ids(){return t.ids},get adContainer(){return t.adContainer},get imaSDK(){return t.imaSDK},get sendEvent(){return t.sendEvent},set sendEvent(i){t.sendEvent=i}}}(this)),this.hu}get id(){return this.hS}get adsManager(){return this.ari}get ids(){return this.Z_i}get adContainer(){return this.Q1t}get sendEvent(){return this.$_i}set sendEvent(t){for(const t of this.tgi)this.ari.removeEventListener(t.type,t.listener);this.tgi=[],this.$_i=t,this.igi()}get imaSDK(){return!0}egi(){for(const t in google.ima.AdEvent.Type){const i=google.ima.AdEvent.Type[t];this.ari.addEventListener(i,this.sgi),this.tgi.push({type:i,listener:this.sgi})}}ngi(){Yo(this.tgi);for(const t in google.ima.AdEvent.Type){const i=google.ima.AdEvent.Type[t];this.ari.removeEventListener(i,this.sgi)}}rgi(t){this.Zf.push({type:t.type,adVolume:this.adsManager.getVolume()})}igi(){null==this.$_i||this.$_i.call(this,this.Zf),this.Zf=[]}static hgi(i){return t.ogi[i]||i}constructor(i,e,s,n){this.hu=void 0,this.hS=void 0,this.ari=void 0,this.Z_i=void 0,this.Q1t=void 0,this.tgi=void 0,this.$_i=void 0,this.Zf=void 0,this.sgi=i=>{this.rgi({type:t.hgi(i.type)})},this.hS=i,this.ari=e,this.Z_i=s,this.Q1t=n,this.tgi=[],this.Zf=[]}};F8.ogi={loaded:"AdLoaded",impression:"AdImpression",start:"AdVideoStart",firstQuartile:"AdVideoFirstQuartile",midpoint:"AdVideoMidpoint",thirdQuartile:"AdVideoThirdQuartile",complete:"AdVideoComplete",pause:"AdPaused",skip:"AdSkipped",volumeChange:"AdVolumeChange"};var U8=class{agi(t,i){this.ugi=h.createElement("script"),this.ugi.id=t.id,this.ugi.type="text/javascript",t.adContainer.appendChild(this.ugi),this.ugi.src="https://z.moatads.com/"+i+"/moatvideo.js#"+t.id,this.cgi=t.id,s[this.cgi]=t.Ca}dgi(){this.ugi&&os(this.ugi),this.cgi&&(s[this.cgi]=void 0)}constructor(){this.ugi=void 0,this.cgi=void 0}};VF(function(t){return class i extends t{Ta(t){var e,s,n;this.lgi(),null==(e=this.fgi)||e.removeEventListener(google.ima.AdEvent.Type.COMPLETE,this.vgi),null==(s=this.fgi)||s.removeEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.lgi),null==(n=this.fgi)||n.removeEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this._gi),this.fgi=void 0,this.Q1t=void 0,super.Ta(t);const r=t&&t.analytics;this.ggi=i.pgi(r);this.Jc&&this.ggi&&d3()&&this.mgi()}kn(){var t,i,e;this.lgi(),null==(t=this.fgi)||t.removeEventListener(google.ima.AdEvent.Type.COMPLETE,this.vgi),null==(i=this.fgi)||i.removeEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.lgi),null==(e=this.fgi)||e.removeEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this._gi),this.fgi=void 0,this.Q1t=void 0,this.Jc&&this.Jc.mn("xti",this.Iti),super.kn()}mgi(){this.Jc&&this.Jc.wn("xti",this.Iti)}wgi(t,i,e){const s=O8+"moatApi"+_.floor(1e8*_.random());this.ygi=new F8(s,t,i,e),this.ygi.egi(),this.Agi.agi(this.ygi,this.ggi.partnerCode)}static pgi(t){if(t){const i=t.filter(t=>"moat"===t.integration);if(0===i.length)return;if(i.length>1)throw new m("Only one Moat analytics configuration expected");return i[0]}}constructor(t,i){super(t,i),this.Agi=void 0,this.ggi=void 0,this.ygi=void 0,this.fgi=void 0,this.Q1t=void 0,this._gi=()=>{this.wgi(this.fgi,{partnerCode:this.ggi.partnerCode,viewMode:google.ima.ViewMode.NORMAL},this.Q1t)},this.Iti=t=>{this.fgi=t.hri,this.Q1t=t.fii,this.lgi(),this.fgi.addEventListener(google.ima.AdEvent.Type.COMPLETE,this.vgi),this.fgi.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.lgi),this.fgi.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this._gi)},this.vgi=t=>{const i=t.getAd().getAdPodInfo();i.getAdPosition(){this.ygi&&(this.ygi.ngi(),this.ygi=void 0),this.Agi.dgi()},this.Agi=new U8}}},zo.hnt),r(),r(),r(),r();var V8="theo-dai-clickthrough",H8="urn:google:dai:2018",W8=class{get Ca(){const t=this,i=this.bgi;return{contentTimeForStreamTime:i=>t.cai?t.cai.lai(i):i,streamTimeForContentTime:i=>t.cai?t.cai.fai(i):i,replaceAdTagParameters(i){t.cai&&t.cai.replaceAdTagParameters(i)},get snapback(){return t.Sgi},set snapback(i){t.Sgi=i},get sourceTransformer(){return i.Tgi},set sourceTransformer(t){i.Tgi=t}}}OP(t){this.m7.Zg(),this.m7=new at;Wr($e(this.gri(t,this.m7.Yg),this.m7))}async gri(t,i){if(ii(i),!this.kgi||!this.cai)return this.oa.Egi(t);if(this.kgi.ynt&&!this.Pgi)return;const e=this.oa.LP();if(this.Sgi){const s=this.cai.Rai(t,e);if(s){this.oa.Egi(s),await this.cai.ww(nn.AD_BREAK_ENDED,i);if(this.cai.Iai(t).PO>t)return}}this.oa.Egi(t)}Tx(){const t=this.kgi&&this.kgi.ynt;if(t){const i=ve.jn(this.oa.xgi()),e=t._Ot,s=e+t.p0t,n=new ve([e,s]);return i.Mn(n)._s()}return this.oa.xgi()}async Xnt(t,i){if(!t)return this.oa.Igi(t,i);let e=t;try{this.oa.nt.wn(Vt.eI,this.Rgi),e=await this.bgi.Cgi(t,i),this.kgi&&this.cai&&(this.Dgi=!0)}catch(t){if(sa(t),t.code===Bk.LICENSE_INVALID)return;const i=new Ga(Vo.SOURCE_NOT_SUPPORTED,"Something went wrong while setting up a Google DAI stream.",t);throw this.JW=P(i),this.ZW=i,this.oa.So(new Pi(i)),i}await this.oa.Igi(e,i)}hr(){if(this.Dgi){if(this.oa.nt.mn(Vt.eI,this.Rgi),this.aui){this.aui.mn(Te.hI,this.Bgi);for(const t of this.aui.L.II)t.mn(Me.zL,this.Ngi);this.aui=void 0}this.JW=void 0,this.ZW=void 0,this.m7.Zg(),this.kgi&&this.kgi.hr(),this.cai&&this.cai.hr(),this.Dgi=!1}}get lt(){return this.JW||this.oa.Mgi()}get WP(){return this.ZW||this.oa.Lgi()}kn(){this.hr(),this.oa.Ogi(),this.cai&&this.cai.kn()}constructor(t,i,e,s,n){this.oa=void 0,this.bgi=void 0,this.cai=void 0,this.kgi=void 0,this.Pgi=void 0,this.aui=void 0,this.JW=void 0,this.ZW=void 0,this.m7=new at,this.Dgi=!1,this.Sgi=!0,this.Rgi=t=>{const i=t.Ht;i.Lt===Ao.VU&&(i.Km===nh.ID3||i.Km===nh.EVENT_STREAM&&i.ZI===H8)&&(i.Xk=xh.JI,this.aui=i,i.wn(Te.hI,this.Bgi))},this.Bgi=t=>{t.TO.wn(Me.zL,this.Ngi)},this.Ngi=t=>{var i,e;if(this.cai)if((null==(i=this.aui)?void 0:i.Km)===nh.ID3){const i=t.TO.U;"TXXX"===i.id&&this.cai.Pai({TXXX:i.text})}else if((null==(e=this.aui)?void 0:e.Km)===nh.EVENT_STREAM){const i=t.TO.U;this.cai.xai(H8,i,t.XF)}},this.oa=t,this.cai=i,this.kgi=e,this.bgi=s,this.Pgi=n,e&&i&&this.oa.Jc&&this.oa.Jc.Ent(e.N9t)}};r(),r();var q8=class extends Le{get Fgi(){return this.Ugi}get MZt(){return mt.so}constructor(t,i,e,s=!0){super(e),this.Ugi=void 0,this.Ugi=s,this.J3t=t,this.Z3t=i}},z8=class extends $2{Vgi(){const t=[nn.STARTED,nn.FIRST_QUARTILE,nn.MIDPOINT,nn.THIRD_QUARTILE,nn.COMPLETE];this.cai.wn(t,this.Hgi),this.cai.wn(nn.AD_BREAK_ENDED,this.kai),this.cai.wn(nn.AD_PROGRESS,this.gai),this.cai.wn(nn.CUEPOINTS_CHANGED,this.mai)}get G3t(){return this.L9t}get M3t(){return this.s5t}Wgi(t){let i=t.V7t._Ot,e=this.G0t||this.findAdBreakWithPredicate(i,t=>!t._x);if(!e){const s=t.V7t.p0t;i=this.oa.LP(),e=new q8(s,s,i,!1),e.t4t(),this.X0t.push(e)}return e}qgi(t){switch(t){case nn.STARTED:this.L9t=!0;break;case nn.AD_BREAK_ENDED:this.L9t=!1}}zgi(t,i,e){if(i)switch(t){case nn.STARTED:case nn.FIRST_QUARTILE:case nn.MIDPOINT:case nn.THIRD_QUARTILE:case nn.COMPLETE:this.M3t.So(new aU(this.G0t))}if(e)switch(t){case nn.STARTED:case nn.FIRST_QUARTILE:case nn.MIDPOINT:case nn.THIRD_QUARTILE:case nn.COMPLETE:this.M3t.So(new dc(this.M0t,this.M0t.v9t))}switch(t){case nn.COMPLETE:this.M3t.So(new bc(this.M0t,this.B9t.v9t));break;case nn.AD_BREAK_ENDED:this.M3t.So(new Fa(this.ynt))}switch(t){case nn.FIRST_QUARTILE:this.M3t.So(new _s(this.M0t,this.B9t.v9t));break;case nn.MIDPOINT:this.M3t.So(new ks(this.M0t,this.B9t.v9t));break;case nn.THIRD_QUARTILE:this.M3t.So(new oe(this.M0t,this.B9t.v9t))}}Ggi(t){const i=t.Int,e=this.Wgi(i),s=function(t,i){if(t.Jc.length)return!1;for(let e=0;et.Fgi);let i=0;return t&&(i=t.p0t),i}Qgi(t,i){let e;for(const s of this.X0t)s._Ot>=t&&s._Ot<=i&&!s._x&&(!e||s._Ot>=e._Ot)&&(e=s);return e}rD(){}knt(t){}hr(){this.M0t&&(this.M3t.So(new bc(this.M0t,this.M0t.v9t)),this.M0t=void 0),this.G0t&&(this.M3t.So(new Fa(this.G0t)),this.G0t=void 0),this.L9t=!1,Yo(this.X0t)}kn(){this.hr(),this.M3t.kn()}Snt(t){}constructor(t,i){super(new Sc,mt.so),this.cai=void 0,this.oa=void 0,this.gai=void 0,this.mai=void 0,this.Hgi=void 0,this.kai=void 0,this.cai=t,this.oa=i,this.gai=t=>{const i=this.G0t;if(!i||!this.M0t)return;const e=t.uai.Dai;this.M0t.v9t=e.MP,function(t,i){const e=i.i7t,s=i.t7t,n=i.MP,r=$l(t.Jc.slice(0,e-1),t=>{var i;return null!=(i=t.ct)?i:0});t.m0t=s-n-r}(i,e)},this.mai=t=>{const i=t.uai.Bai;if(i)for(const t of i)if(!this.Xgi(t.EO)){const i=t.PO-t.EO,e=new q8(i,i,t.EO,!0);this.X0t.push(e)}},this.Hgi=t=>{this.qgi(t.type),this.Ggi(t)},this.kai=t=>{this.L9t=!1,this.M0t=void 0;const i=this.ynt;i&&(i.m0t=0,this.zgi(t.type,!1,!1),this.G0t=void 0)},this.Vgi()}};function G8(t){if(t.sources)if(ul(t.sources)){for(const i of t.sources)if(tk(i))return!0}else if(Lu(t.sources))return tk(t.sources);return!1}r();var X8=class{async Cgi(t,i){const e=[],s=[];for(const i of t.sources)if(tk(i)){if(!this.cai)continue;e.push(i)}else s.push(i);if(0===e.length)return t;let n,r;for(;void 0===n&&0!==e.length;){const{Mc:h}=await eR.Ng.cz(e,t),o=h;ii(i);try{n=await this.Kgi(o,i),s.push(n)}catch(t){sa(t),r=t,oi(e,o)}}if(0!==t.sources.length&&0===s.length)throw new m("Fatal: unable to play DAI streams.");return r&&Ye(r.message),Mo({},t,{sources:s})}async Kgi(t,i){if(!this.cai)throw new m("Could not find Google\u2019s IMA DAI HTML5 SDK, all DAI sources will be ignored.");const e=this.cai.ww(nn.LOADED,i),s=this.cai.ww(nn.ERROR,i),n=t.type===Ba.cR?"dash":"hls";this.cai.AHt(Mo({},t.ssai,{format:n}));const r=await Promise.race([e,s]);if(r.type===nn.LOADED){const i=t.type===Ba.cR?Ba.cR:Ba.lR;return ml(Mo({},t,{src:this.Tgi?await this.Tgi(r.uai.Yu||""):r.uai.Yu,type:i}))}throw m(r.uai.Nai)}constructor(t){this.cai=void 0,this.Tgi=void 0,this.cai=t,this.Tgi=t=>t}};VF(function(t){return i=>class extends i{xa(){const t=super.xa(),i=t.ads;if(i){const t=this.Ygi.Ca;po(i,{get dai(){return t}})}return t}get Kl(){return this.Jgi}Egi(t){super.OP(t)}OP(t,i){this.Ygi.OP(t)}xgi(){return super.Tx()}Tx(){return this.Ygi.Tx()}Ta(t){return this.Ygi.hr(),super.Ta(t)}async Igi(t,i){return super.Xnt(t,i)}async Xnt(t,i){return this.Ygi.Xnt(t,i)}Mgi(){return super.HP()}Lgi(){return super.qP()}HP(){return this.Ygi.lt}qP(){return this.Ygi.WP}Ogi(){super.kn()}kn(){this.Ygi.kn(),this.Y1t&&(os(this.Y1t),this.Y1t.removeEventListener("keydown",this.Zgi),this.Y1t.removeEventListener("click",this.Zgi),this.Y1t=void 0),this.$gi&&(os(this.$gi),this.$gi=void 0)}constructor(i,e){super(i,e),this.Ygi=void 0,this.Jgi=!1,this.Y1t=void 0,this.$gi=void 0,this.Zgi=t=>{13===t.which&&this.Y1t.click(),this.zx()};const s=this.Wx(),n=e.ads.googleIma.useAdUiElementForSsai;var r;const o=null!=(r=e.ads.googleIma.allowSeekingForGoogleDai)&&r;let a,u;try{var c;n?(this.$gi=h.createElement("div"),oa(this.$gi),this.$gi.className="theo-dai-ad-ui"):(this.Y1t=h.createElement("button"),this.Y1t.className=V8),a=t(s,this.Y1t,this.$gi),u=new z8(a,this);const i=null!=(c=this.Y1t)?c:this.$gi;i&&this.xe.appendChild(i),this.Jgi=!0}catch(t){this.Y1t=void 0,this.$gi=void 0}const d=new X8(a);this.Ygi=new W8(this,a,u,d,o),this.Y1t&&(this.Y1t.addEventListener("keydown",this.Zgi),this.Y1t.addEventListener("click",this.Zgi))}}}(function(t,i,e){if(!(s.google&&s.google.ima&&Lu(s.google.ima.dai)))throw new m("Could not find Google\u2019s IMA DAI HTML5 SDK, all DAI sources will be ignored.");const n=$5(),r=new google.ima.dai.api.StreamManager(t,e),h=$5();return new Q5(r,i,h&&h!==n?h:void 0)}),zo.rnt),r(),r(),r();var j8=class{get tpi(){return void 0===this.ipi?0:(performance.now()-this.ipi)/1e3}epi(t){this.spi=t,this.rpi.npi(t),this.oa.wn(d.uo,this.uvi),this.oa.wn(d.Bw,this.U_i),this.oa.wn(d._y,this.qui),this.oa.wn(Mc.ma,this.e8),this.oa.wn(Do.SM,this.hpi),this.oa.wn([Do.wM,Do.yM,Do.TM],this.opi),this.oa.wn(d.Rw,this.upi),s.addEventListener("beforeunload",this.hNt)}cpi(){this.oa.mn(d.uo,this.uvi),this.oa.mn(d.Bw,this.U_i),this.oa.mn(d._y,this.qui),this.oa.mn(Mc.ma,this.e8),this.oa.mn(Do.SM,this.hpi),this.oa.mn([Do.wM,Do.yM,Do.TM],this.opi),this.oa.mn(d.Rw,this.upi),s.removeEventListener("beforeunload",this.hNt),this.lpi||(this.rpi.fpi(this.vpi),this.rpi._pi()),this.gpi&&this.ppi(),this.spi=void 0,this.mpi=!1,this.lpi=!1,this.vpi=-1/0,Yo(this.wpi)}ypi(){this.mpi&&this.rpi.Api(),this.ipi=performance.now(),this.bpi=v(this.Spi,6e4)}ppi(){this.rpi.Tpi(this.tpi),this.gpi=!1,this.ipi=void 0,this.bpi&&(p(this.bpi),this.bpi=void 0)}kpi(){if(S(this.oa.Nd()))return;const t=10*function(t,i){return _.floor(t/i)}(this.oa.LP()/this.oa.Nd()*100,10);pi(this.wpi,t)||(this.wpi.push(t),this.rpi.Epi(t))}constructor(t,i){this.oa=void 0,this.rpi=void 0,this.spi=void 0,this.mpi=void 0,this.lpi=void 0,this.wpi=void 0,this.vpi=void 0,this.Ppi=void 0,this.gpi=void 0,this.bpi=void 0,this.ipi=void 0,this.uvi=void 0,this.U_i=void 0,this.qui=void 0,this.hpi=void 0,this.opi=void 0,this.e8=void 0,this.upi=void 0,this.hNt=void 0,this.Spi=void 0,this.oa=t,this.rpi=i,this.mpi=!1,this.lpi=!1,this.wpi=[],this.vpi=-1/0,this.gpi=!1,this.uvi=()=>{this.mpi||(this.rpi.xpi(),this.gpi&&this.rpi.Api(),this.mpi=!0)},this.U_i=()=>{this.rpi.Ipi(),this.lpi=!0},this.qui=()=>{this.vpi{this.mpi&&(this.Ppi=performance.now(),this.rpi.Rpi(this.oa.LP()))},this.opi=()=>{this.Ppi&&(this.rpi.Cpi((performance.now()-this.Ppi)/1e3),this.Ppi=void 0)},this.e8=()=>{this.vpi{const t=this.oa.Nd()===1/0;t&&!this.gpi&&(this.gpi=t,this.ypi())},this.hNt=()=>{this.rpi.fpi(this.vpi),this.rpi.Dpi()},this.Spi=()=>{void 0!==this.ipi&&this.rpi.Bpi(this.tpi)}}};r();var Q8=class{npi(t){this.Npi(["setDocumentTitle",t.itemTitle]),this.Npi(["setCustomUrl","https://content.streamone.net/embed/cust=Xo9oT45EptMG/account="+t.accountID+"/item="+t.itemID]),this.Npi(["trackPageView"])}xpi(){this.Mpi("item first play","viewing","1")}_pi(){this.Mpi("item skipped","skipped","1")}Epi(t){this.Mpi("item progress","percent",""+t)}Dpi(){this.Mpi("item abandoned","window closed","1")}fpi(t){this.Mpi("item time","watched",""+t)}Ipi(){this.Mpi("item finished","ended","1")}Rpi(t){this.Mpi("buffering started","timestamp",""+t)}Cpi(t){this.Mpi("buffering ended","duration",""+t)}urt(t){this.Mpi("error","message",""+t)}Api(){this.Mpi("livestream first play","viewing","1")}Bpi(t){this.Mpi("livestream progress","duration",""+t)}Tpi(t){this.Mpi("livestream time","watched",""+t)}Mpi(t,i,e){this.Npi(["trackEvent","Video",t,i,e])}Npi(t){const i="undefined"!=typeof _paq?_paq:void 0;i?i.push(t):console.warn("The Piwik library required for the StreamOne pre-integration was not found. Make sure it is loaded before instantiating THEOplayer.")}};r();var K8=class{get Lpi(){if(!this.Opi)return;const t=this.oa.LP()/this.Opi;return _.floor(4*t)+1}get Fpi(){return void 0!==this.Opi}epi(){this.qc.wn("Bnt",this.yui),this.qc.wn("Nnt",this.Tui),this.qc.wn("T4t",this.F_i),this.qc.wn("H3t",this.jui),this.oa.wn(d._y,this.qui),s.addEventListener("beforeunload",this.hNt)}cpi(){this.qc.mn("Bnt",this.yui),this.qc.mn("Nnt",this.Tui),this.qc.mn("T4t",this.F_i),this.qc.mn("H3t",this.jui),this.oa.mn(d._y,this.qui),Yo(this.Upi),s.removeEventListener("beforeunload",this.hNt),this.Opi=void 0}constructor(t,i,e){this.oa=void 0,this.qc=void 0,this.rpi=void 0,this.Opi=void 0,this.Upi=void 0,this.yui=void 0,this.Tui=void 0,this.F_i=void 0,this.jui=void 0,this.qui=void 0,this.hNt=void 0,this.oa=t,this.qc=i,this.rpi=e,this.Upi=[],this.yui=()=>{this.Opi=this.oa.Nd(),this.rpi.Vpi(this.Opi)},this.Tui=()=>{this.Opi&&(this.rpi.Hpi(this.Opi),Yo(this.Upi),this.Opi=void 0)},this.F_i=t=>{if(!this.Opi)return;const i=this.Opi-this.Opi*t.b4t;this.rpi.Wpi(i),this.Opi=void 0},this.jui=()=>{this.Opi=this.oa.Nd(),this.rpi.qpi()},this.qui=()=>{const t=this.Lpi;if(this.Fpi&&t&&!pi(this.Upi,t)){switch(t){case 1:this.rpi.zpi();break;case 2:this.rpi.Gpi();break;case 3:this.rpi.Xpi();break;case 4:this.rpi.jpi()}this.Upi.push(t)}},this.hNt=()=>{this.rpi.Qpi()}}};r();var Y8=class{Vpi(t){this.rpi.Mpi("ad start","duration",""+t)}Hpi(t){this.rpi.Mpi("ad finished","duration",""+t)}Wpi(t){this.rpi.Mpi("ad skipped","remaining time",""+t)}qpi(){this.rpi.Mpi("ad blocker","detected","1")}zpi(){this.rpi.Mpi("ad progress","firstQuartile","")}Gpi(){this.rpi.Mpi("ad progress","secondQuartile","")}Xpi(){this.rpi.Mpi("ad progress","thirdQuartile","")}jpi(){this.rpi.Mpi("ad progress","fourthQuartile","")}Qpi(){this.rpi.Mpi("ad abandoned","window closed","1")}constructor(t){this.rpi=void 0,this.rpi=t}};function J8(t){return t&&"streamone"===t.integration}VF(function(t){return class extends t{kn(){this.mn(d.do,this.fo),this.Kpi&&(this.Ypi&&this.Ypi.cpi(),this.Jpi&&this.Jpi.cpi(),this.Kpi=!1),super.kn()}constructor(t,i){super(t,i),this.Ypi=void 0,this.Jpi=void 0,this.Kpi=!1,this.fo=()=>{this.Kpi&&(this.Ypi.cpi(),this.Jpi&&this.Jpi.cpi());const t=this.nu();if(this.Kpi=!1,!t)return;const i=function(t){if(t.analytics)for(const i of t.analytics)if(J8(i))return i}(t);i&&(this.Kpi=!0,this.Ypi.epi(i),this.Jpi&&this.Jpi.epi())};const e=new Q8;if(this.Ypi=new j8(this,e),this.Jc){const t=new Y8(e);this.Jpi=new K8(this,this.Jc,t)}this.wn(d.do,this.fo)}}},zo.hnt),r(),r(),r(),r(),r(),r();var Z8=class extends NU{async z2(t,i,e){const s=await $8(t);await super.z2(s,i,e),this.Zpi(s,i)}async H2(t,i,e){const s=await $8(t);await super.H2(s,i,e),this.Zpi(s,i)}Zpi(t,i){const e=this.tmi.$pi;if(void 0===e)return;const s=i.i2;let n;if(this.imi!==s&&(this.imi=s,e.setLevelSwitching(s),e.setContainerFormat(2)),function(t){return La.call(t,"xet")}(i)){const t=i.xet,r=i.xet+i.ct;n=i.bU,e.newPts(t,r,"video",s)}else 0;e.appendBuffer(t.ck,"video",s,n)}async _S(t,i,e){var s;await super._S(t,i,e),null==(s=this.tmi.$pi)||s.flushBuffer(t,i)}constructor(t,i){super(t),this.tmi=void 0,this.imi=void 0,this.tmi=i,this.imi=void 0}};async function $8(t){switch(t.Km){case Po.vZ:return t;case Po.BT:{const i=await bn(t.ck);return{Km:Po.vZ,ck:new j(i)}}case Po._Z:throw new m("Opaque initialization segments are not supported on web.")}}var t7=class extends Wo{mrt(t){return t.B3===Ci.Bk?new Z8(t,this.tmi):new NU(t)}constructor(t,i){super(t),this.tmi=void 0,this.tmi=i,this.grt(t)}},i7=class extends(Sl($u)){get $pi(){return this.emi}smi(){this.emi=new LCEVCdec.LCEVCdec(this.$W,this.nmi,{})}be(){super.be(),this.rmi()}we(){super.we(),this.nmi.style.display="none"}hr(){return this.nmi.style.display="none",void 0!==this.emi&&(this.emi.close(),this.smi()),super.hr()}zg(){return this.hmi=!0,void 0!==this.emi&&(this.emi.close(),this.emi=void 0),os(this.nmi),super.zg()}qq(t){this.So(new eu(new Nk(Bk.ABORTED,t)))}rmi(){this.TL.$W.style.display="none",this.nmi.style.display="block"}Xrt(t){return new t7(t,this)}Grt(t){return new Jo(t)}constructor(t){super(t),this.nmi=void 0,this.emi=void 0,this.hmi=!1,this.omi=t=>{this.hmi||(t||this.qq("LCEVC SDK failed to initialize."),this.smi())},this.ami=()=>{this.hmi||this.qq("LCEVC SDK failed to initialize.")},this.nmi=h.createElement("canvas"),oa(this.nmi),this.nmi.style.display="none";const i=t.$W;var e;i.parentElement.insertBefore(this.nmi,null!=(e=i.nextSibling)?e:null),LCEVCdec.ready.then(this.omi,this.ami)}},e7=class extends RU{Gq(t){return t===Ci.Bk?(this.umi=new i7(super.Gq(t)),this.umi):super.Gq(t)}async Pq(t){if(t instanceof i7){this.umi=void 0;const i=t;await i.zg(),await super.Pq(i.Nrt)}else await super.Pq(t)}get cmi(){return this.umi}constructor(...t){super(...t),this.umi=void 0}},s7=class extends hX{async kn(){for(const t of this.$L.II)t.mn(Te.TI,this.dmi);this.rt.mn(Vt.eI,this.lmi),this.rt.mn(Vt.nI,this.fmi),await super.kn(),await this.TL.zg(),await this.xq.Pq(this.TL)}constructor(t,i,e,s,n,r,h){const o=new e7(n),a=new Ss(o);super(t,i,e,s,a.Gq(r),h),this.xq=void 0,this.vmi=void 0,this.lmi=t=>{t.Ht.wn(Te.TI,this.dmi)},this.fmi=t=>{t.Ht.mn(Te.TI,this.dmi)},this.dmi=t=>{var i;const e=null==(i=this.vmi.cmi)?void 0:i.$pi,s=t.kot.jI;null==e||e.setCurrentLevel(s)},this.xq=a,this.vmi=o,this.$L.wn(Vt.eI,this.lmi),this.$L.wn(Vt.nI,this.fmi)}};cs(new class extends EU{PR(t,i,e,s,n,r,h){let o=i;return DX.LS()&&(o=new DX(o)),new s7(e,s,n,r,o,Ci.Bk,t)}async Xq(t){if(!t.lcevc)return!1;if(!await super.Xq(t))return!1;if(void 0===s.LCEVCdec)throw new Ga(Vo.CONFIGURATION_ERROR,"LCEVC SDK is not loaded.");return!0}Qq(){return!1}constructor(...t){super(...t),this.Kq=V._W}}),r();var n7=class extends y${async kn(){const t=this.rt;for(const i of t.II)i.mn(Te.TI,this.dmi);t.mn(Vt.eI,this.lmi),t.mn(Vt.nI,this.fmi),await super.kn(),await this.xq.Pq(this.TL)}constructor(t,i,e,s,n){const r=new e7(t),h=new Ss(r);super(h.Gq(Ci.Bk),i,e,s,n),this.xq=void 0,this.vmi=void 0,this.lmi=t=>{t.Ht.wn(Te.TI,this.dmi)},this.fmi=t=>{t.Ht.mn(Te.TI,this.dmi)},this.dmi=t=>{var i;const e=null==(i=this.vmi.cmi)?void 0:i.$pi,s=t.kot.UMt.jI;null==e||e.setCurrentLevel(s)},this.xq=h,this.vmi=r;const o=this.rt;o.wn(Vt.eI,this.lmi),o.wn(Vt.nI,this.fmi)}};cs(new class extends b${PR(t,i,e,s,n,r,h){return new n7(i,e,n,r,s)}Xq(t,i){if(!t.lcevc)return!1;if(!super.Xq(t,i))return!1;if(void 0===s.LCEVCdec)throw new Ga(Vo.CONFIGURATION_ERROR,"LCEVC SDK is not loaded.");return!0}Qq(){return!1}constructor(...t){super(...t),this.Kq=V.wW}}),r(),r(),r(),r();var r7=function(t){return t._mi="hr",t.gmi="pmi",t}({}),h7="freewheel-nonlinear-ad",o7=[d.Rw,d._y,d.gy,d.jw,Do.TM,d.uo],a7=class t extends C2{qx(){this.xq.xz()}mmi(){this.wmi.wn("Dnt",this.ymi),this.wmi.wn(["Bnt","Nnt"],this.Ami),this.wmi.wn("Cnt",this.Sni)}bmi(){this.wmi.mn("Dnt",this.ymi),this.wmi.mn(["Bnt","Nnt"],this.Ami),this.wmi.mn("Cnt",this.Sni)}Smi(){this.M3t.au(this.wmi.Tmi)}kmi(){this.wmi.Emi.wn(o7,this.Rs)}Pmi(){this.wmi.Emi.mn(o7,this.Rs)}get B3t(){return this}static get C3t(){return mt.H0t}get C3t(){return t.C3t}get ynt(){var t;return null!=(t=this.wmi.Tmi.ynt)?t:null}get mnt(){const t=this.wmi.Tmi.B9t;return t?[t]:[]}knt(t){}LP(){return this.wmi.Emi.MP}OP(t,i){}Nd(){return this.wmi.Emi.ct}VP(){return this.wmi.Emi.UP}HP(){return this.JW}qP(){return this.ZW}Cx(){return 0}Nx(){return 0}Lx(){return this.wmi.Emi.Mx}Ox(t){this.wmi.Emi.Mx=t}tx(){return this.wmi.Emi.$P}ix(t){this.wmi.Emi.$P=t}bx(){return this.wmi.Emi.Ax}get Ant(){return this.wmi.Tmi.Ant}get bnt(){return this.wmi.Tmi.bnt}Tx(){return this.wmi.Emi.Sx}ox(){return this.wmi.Emi.hx}F3t(t){if(this.G3t||this.wmi.F3t(t),this.wmi.xmi){if(t.type===d.jw&&this.oa.UP)return!0;if(t.type===d.Bw)return this.wmi.Rmi.Imi(),!0}return!1}we(){this.wmi.we()}zx(){this.hx||this.wmi.Emi.zx()}async Cmi(){if(!this.wmi.Dmi)try{await this.wmi.C6t()}catch(t){this.Bmi(t,Ic.GENERAL)}}async Nmi(){if(this.wmi.Emi.Dhi)return this.wmi.Emi.Gx(),!1;if(this.wmi.Mmi)try{await this.wmi.Rmi.Lmi()}catch(t){this.Bmi(t,Ic.PLAYBACK)}return!0}get Omi(){return it(this.HP())}Bmi(t,i){t.name!==r7._mi&&this.M3t.So(new Pa(i,"Ads could not be loaded."))}async Gx(){if(this.hx&&this.So(new Tc(this.MP)),await this.Cmi(),this.Omi)return;const t=await this.Nmi();!this.Omi&&t&&this.Sni()}K9t(t,i,e){i===iu.pnt&&this.wmi.K9t(t)}be(){this.wmi.be()}rD(){this.wmi.Emi.rD()}Snt(t){}Wx(){return this.Yit}xP(){return this.xq.Bz.map(t=>t.$W)}K3t(t){}async kn(){await this.Xx(),this.wmi.kn(),await this.xq.Pq(this.TL),this.bmi(),this.Pmi(),this.M3t.CK(this.wmi.Tmi)}async Xx(){this.wmi.hr(),this.G3t&&(this.oa.be(),this.i3t(),this.we())}constructor(t,i,e,s,n){super(t,i),this.wmi=void 0,this.JW=void 0,this.ZW=void 0,this.Yit=void 0,this.xq=void 0,this.TL=void 0,this.Ami=t=>{const i=t.Int,e="Bnt"===t.type;if(i.l4t===bi.a4t){const t=this.oa.xe.classList;e?t.add(h7):t.remove(h7)}e?this.be():this.we()},this.ymi=()=>{this.n5t(),this.oa.zx(),this.oa.we()},this.Sni=()=>{this.wmi.Dmi&&(this.oa.UP||this.oa.Gx(),this.we(),this.oa.be(),this.i3t())},this.wmi=s,this.xq=e,this.TL=n,this.Yit=n.$W,this.Yit.controls=!1,this.mmi(),this.Smi(),this.kmi()}};r(),r(),r();var u7=class extends Le{get Fmi(){return this.Umi}get Vmi(){return this.Jc[this.Hmi]}set Wmi(t){this.Hmi=t}get Wmi(){return this.Hmi}get l4t(){return this.f4t}get MZt(){return mt.H0t}constructor(t,i,e,s){super(e),this.Umi=void 0,this.Hmi=void 0,this.f4t=void 0,this.Umi=s,this.Hmi=0,this.f4t=d7(s),this.J3t=t,this.Z3t=i}};r();var c7=class extends Ps{get qmi(){return this.zmi}set qmi(t){this.zmi!==t&&(this.zmi=t)}get Mi(){return this.od.Fmi.getHeight()}get Ti(){return this.od.Fmi.getWidth()}get AYt(){return this.qmi.getEventCallbackUrls(tv.freewheel.SDK.EVENT_AD_CLICK,tv.freewheel.SDK.EVENT_TYPE_CLICK)[0]}get MZt(){return mt.H0t}xa(){return _a(this)}constructor(t,i,e){super(t,i),this.zmi=void 0,this.zmi=e}};function d7(t){return t.getTimePositionClass()===tv.freewheel.SDK.TIME_POSITION_CLASS_OVERLAY?bi.a4t:bi.hZt}var l7=class t extends _o{async Gmi(t,i){this.Xmi=t,this.jmi=i,this.Qmi(t),await i,this.Kmi()}get Ymi(){return this.Jmi}get Zmi(){return this.$mi}get iwi(){return this.ewi}get ynt(){return this.G0t}get B9t(){return this.M0t}get Ant(){const t=[];if(this.G0t){const i=this.G0t.Wmi;i>=0&&t.push(...this.G0t.Jc.slice(i+1))}for(const i of this.swi)t.push(...i.Jc);return t}get bnt(){return this.swi}Kmi(){this.nwi()}Qmi(t){t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.rwi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.hwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.owi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION_END,this.awi),t.addEventListener(tv.freewheel.SDK.EVENT_AD,this.uwi)}cwi(){this.Xmi&&(this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.rwi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.hwi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.owi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION_END,this.awi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_AD,this.uwi))}nwi(){this.Jmi=this.dwi(this.lwi),this.$mi=this.dwi(this.fwi).concat(this.dwi(this.vwi)),this.ewi=this.dwi(this._wi),this.swi=this.Jmi.concat(this.$mi).concat(this.ewi)}dwi(t){if(!this.Xmi)return[];const i=this.Xmi.getSlotsByTimePositionClass(t);return this.gwi(i)}pwi(t){if(!this.G0t)return void 0;const i=t.getSlot().getAdInstances().indexOf(t);-1!==i&&(this.G0t.Wmi=i);const e=this.G0t.Vmi;return e&&(e.qmi=t),e}mwi(t){return Jr(this.swi,i=>i.Fmi===t)}gwi(i){return i.map(i=>{const e=i.getTotalDuration(),s=t.wwi(i);return new u7(e,e,s,i)})}static ywi(t,i){const e=t.getAdInstances(),s=[];for(const t of e){const e=d7(t.getSlot()),n=new c7(i,e,t),r=[];n.u4t(t.getAdId(),t.getSlot().getWidth(),t.getSlot().getHeight(),t.getDuration(),r,0),i.e4t(n),s.push(n)}return s}t2t(){const t=this.B9t;t&&this.So(new da(t,this.Awi()))}bwi(){const t=this.B9t;t&&(this.So(new bc(t,t.qmi.getPlayheadTime())),this.M0t=void 0)}Swi(t){const i=this.ynt;i&&(i.m0t=function(t,i,e){void 0===e&&(e=0);let s=0;const n=t.Jc.length;for(let r=i;r{const e=i.slot,s=this.mwi(e);s&&(t.ywi(e,s),this.G0t=s,s.t4t(),this.kwi(s),s.l4t===bi.hZt&&this.So(new aU(s)))},this.hwi=()=>{const t=this.ynt;t&&t.l4t===bi.hZt&&(this.So(new Fa(t)),this._T.src=""),this.G0t=void 0},this.owi=t=>{const i=this.pwi(t.adInstance);i&&(this.So(new dc(i,i.qmi.getPlayheadTime())),this.M0t=i),t.adInstance.getEventCallbackUrls(tv.freewheel.SDK.EVENT_AD_CLICK,tv.freewheel.SDK.EVENT_TYPE_CLICK).length>0&&(this.Ls.style.cursor="pointer",this.Ls.addEventListener("click",this.Ewi))},this.awi=()=>{this.Ls.style.cursor="",this.Ls.removeEventListener("click",this.Ewi)},this.Ewi=()=>{this.B9t&&this.B9t.qmi.getRendererController().processEvent({name:tv.freewheel.SDK.EVENT_AD_CLICK})},this.uwi=t=>{switch(t.subType){case tv.freewheel.SDK.EVENT_AD_COMPLETE:this.bwi();break;case tv.freewheel.SDK.EVENT_AD_SKIPPED:this.t2t(),this.bwi()}}}};r();var f7=class t extends _o{Pwi(){if(this.npt){this.npt.setAdVolume(v7(this.$P,this.Mx))}}xwi(t){this.npt=t,this.Qmi(t)}Qmi(t){t.addEventListener(tv.freewheel.SDK.EVENT_AD,this.Iwi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.Rwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.Cwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_COMPLETE,this.Dwi),t.addEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_PAUSE_REQUEST,this.Bwi),t.addEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_RESUME_REQUEST,this.Nwi)}Mwi(){const t=this.npt;t&&(t.removeEventListener(tv.freewheel.SDK.EVENT_AD,this.Iwi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.Rwi),t.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.Cwi),t.removeEventListener(tv.freewheel.SDK.EVENT_AD_COMPLETE,this.Dwi),t.removeEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_PAUSE_REQUEST,this.Bwi),t.removeEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_RESUME_REQUEST,this.Nwi))}Gx(){this.uyt.ynt&&(this.uyt.ynt.Fmi.resume(),this.hx=!1)}zx(){this.uyt.ynt&&(this.uyt.ynt.Fmi.pause(),this.hx=!0)}get MP(){const t=this.uyt.B9t;return t&&(this.MP=t.qmi.getPlayheadTime()),this.bz}set MP(t){this.bz=t}get ct(){return this.WA}get Dhi(){return!!this.uyt&&void 0!==this.uyt.ynt}get hx(){return this.kz}set hx(t){this.kz=t}get Mx(){return this.ib}set Mx(t){this.npt&&this.npt.setAdVolume(t),this.ib=t}get $P(){return this.npt&&(this.Lwi=0===this.npt.getAdVolume()),this.Lwi}set $P(t){this.npt&&this.npt.setAdVolume(v7(t,this.Mx)),this.Lwi=t}get Sx(){return this.N4}get UP(){return this.Z4}set UP(t){this.Z4=t}get Ax(){return this.t5}static Owi(t){switch(t){case"pause":return tv.freewheel.SDK.VIDEO_STATE_PAUSED;case"playing":return tv.freewheel.SDK.VIDEO_STATE_PLAYING;case"ended":return tv.freewheel.SDK.VIDEO_STATE_COMPLETED;case"stop":return tv.freewheel.SDK.VIDEO_STATE_STOPPED}}Fwi(i){const e=t.Owi(i);this.npt&&e&&this.npt.setVideoState(e)}rD(){const t=this.uyt.B9t;t&&t.qmi.skip()}hr(){if(this.Mwi(),this.npt){this.Fwi("stop"),this.npt.setVideoState(tv.freewheel.SDK.VIDEO_STATE_STOPPED);const t=this.npt.getTemporalSlots();for(const i of t)i.stop();this.npt.dispose(),this.npt=void 0}this.WA=NaN,this.UP=!1,this.t5=mh.VL,this.MP=0,this.Uwi=0,this.hx=!0,void 0!==this.Vwi&&(p(this.Vwi),this.Vwi=void 0)}kn(){this.hr(),this.Vo(),this.uyt.mn("Dnt",this.Ed),this.sc.mn(Rh.yn,this.Rwi),this.Q1t.removeEventListener("click",this.Hwi)}constructor(t,i,e,s){super(),this.oa=void 0,this.sc=void 0,this.uyt=void 0,this.Q1t=void 0,this.N4=void 0,this.npt=void 0,this.kz=void 0,this.ib=void 0,this.WA=void 0,this.Lwi=void 0,this.Z4=void 0,this.t5=void 0,this.bz=void 0,this.Vwi=void 0,this.Uwi=void 0,this.Iwi=void 0,this.Cwi=void 0,this.Hwi=void 0,this.vm=void 0,this.Dwi=void 0,this.Bwi=void 0,this.Nwi=void 0,this.Ed=void 0,this.Rwi=void 0,this.oa=t,this.sc=i,this.uyt=e,this.Q1t=s,this.N4=ve.iL()._s(),this.kz=!0,this.WA=NaN,this.Lwi=!1,this.Z4=!1,this.t5=mh.VL,this.bz=0,this.Uwi=0,this.Iwi=t=>{switch(t.subType){case tv.freewheel.SDK.EVENT_AD_PAUSE:(function(t){if(!t)return!0;const i=t.qmi,e=i.getPlayheadTime(),s=i.getDuration();return e>=s||sr(s,e)})(this.uyt.B9t)||(this.hx=!0,this.So(new hl(this.MP)));break;case tv.freewheel.SDK.EVENT_AD_RESUME:this.hx=!1,this.So(new ce(this.MP));break;case tv.freewheel.SDK.EVENT_AD_VOLUME_CHANGE:if(this.npt){const t=this.npt.getAdVolume();0===t?this.Lwi=!0:this.ib=t,this.So(new Ze(this.MP,this.Mx))}}},this.Cwi=()=>{this.UP=!1;const t=this.hx;if(this.hx=!1,t&&(this.So(new Tc(this.MP)),this.So(new ce(this.MP))),this.t5=mh.WL,this.MP=0,!this.uyt.B9t)return;const i=this.uyt.B9t.qmi;this.WA=i.getDuration(),this.So(new Rs(this.WA)),this.Vwi=v(()=>{if(!this.Dhi)return void this.vm();this.uyt.Swi(this.MP);const t=i.getPlayheadTime();uh(t,this.Uwi,.001)||this.So(new Si(t,void 0)),this.Uwi=t},250),this.npt&&this.npt.setAdVolume(v7(this.$P,this.Mx))},this.Hwi=()=>{const t=this.uyt.B9t;t&&(t.l4t===bi.a4t?this.oa.zx():this.hx||this.zx())},this.vm=()=>{p(this.Vwi),this.Vwi=void 0},this.Dwi=()=>{this.vm(),this.UP=!0},this.Bwi=()=>{this.Fwi("pause")},this.Nwi=()=>{this.Fwi("playing")},this.Ed=t=>{t.od.l4t===bi.hZt&&(this.hx=!1)},this.Rwi=()=>{this.npt&&this.npt.resize(this.sc.Eu,this.sc.Iu)},this.ib=t.Mx,e.wn("Dnt",this.Ed),this.sc.wn(Rh.yn,this.Rwi),this.Q1t.addEventListener("click",this.Hwi)}};function v7(t,i){return t?0:i}r(),r();var _7=class extends R{get name(){return r7.gmi}constructor(){super("A FreeWheel Ad Error occurred")}};r();var g7=class extends R{get name(){return r7._mi}constructor(){super("A FreeWheel Reset Error Occurred")}},p7=0;function m7(){return"cue-"+ ++p7}var w7=class{Wwi(t,i,e){t.setNetwork(i.networkId),t.setServer(i.adServerUrl);const s=this.npt;if(s.setProfile(i.profile),i.assetId&&i.assetDuration&&s.setVideoAsset(i.assetId,i.assetDuration),i.siteSectionId&&s.setSiteSection(i.siteSectionId),s.registerVideoDisplayBase(e),i.cuePoints&&i.cuePoints.length)for(const t of i.cuePoints)s.addTemporalSlot(m7(),t.adUnit,t.timeOffset);const n=i.customData;if(Lu(n)){const t=w.keys(n);for(const i of t){const t=n[i];s.addKeyValue(i,t)}}}async qwi(){this.npt.submitRequest(),await this.zwi.Qy}hr(){this.npt.removeEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Gwi),this.zwi.jy(new g7)}constructor(t,i,e,s){this.npt=void 0,this.zwi=void 0,this.Gwi=void 0,this.npt=i,this.Gwi=t=>{this.npt.removeEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Gwi),t.success?this.zwi.Xy(void 0):this.zwi.jy(new _7)},this.Wwi(t,e,s),i.addEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Gwi),this.zwi=new pa}};r(),r();var y7=class{Xwi(){this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.hwi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_ERROR,this.hwi)}get jwi(){return this.Jg.Qy}WHt(){this.Xwi(),this.Jg.jy(new g7)}constructor(t){this.Xmi=void 0,this.Jg=void 0,this.hwi=void 0,this.P7t=void 0,this.Xmi=t,this.hwi=t=>{this.Xwi(),this.Jg.Xy(void 0)},this.P7t=t=>{this.Xwi(),this.Jg.jy(new _7)},this.Jg=new pa,t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.hwi),t.addEventListener(tv.freewheel.SDK.EVENT_ERROR,this.P7t)}},A7=class{aO(t){this.Xmi=t}Lmi(){return this.Qwi(this.Kwi.Ymi)}Imi(){this.Qwi(this.Kwi.iwi)}async Qwi(t){if(this.Xmi)for(;t.length>0;){this.Ywi=new y7(this.Xmi);const i=this.Ywi.jwi,e=this.Kwi.ynt;e&&e.l4t===bi.a4t&&e.Fmi.stop();t.shift().Fmi.play();try{await i}finally{this.Ywi=void 0}}}hr(){this.Ywi&&(this.Ywi.WHt(),this.Ywi=void 0),this.NNt=0}kn(){this.oa.mn(d._y,this.Jwi)}constructor(t,i){this.oa=void 0,this.Kwi=void 0,this.NNt=void 0,this.Ywi=void 0,this.Xmi=void 0,this.Jwi=void 0,this.oa=t,this.Kwi=i,this.NNt=0,this.Jwi=()=>{const t=this.oa.LP();for(const i of this.Kwi.Zmi){const e=new ve([this.NNt,t],[!0,!0]),s=i.Fmi.getTimePosition();if(e.Cr(s))switch(i.Fmi.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL:this.Qwi([i]);break;case tv.freewheel.SDK.TIME_POSITION_CLASS_OVERLAY:i.Fmi.play(),i.Fmi.setVisible(!0)}}this.NNt=t},t.wn(d._y,this.Jwi)}},b7=0,S7=class t extends Sc{static createUniqueDisplayBaseId(){return"theo-freewheel-"+ ++b7}get xmi(){return 0!==this.Tmi.iwi.length}get Mmi(){return 0!==this.Tmi.Ymi.length}async C6t(){if(!this.LZt)throw new m("Invalid state");const t=this.Zwi,i=t.newContext();i.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_VIDEO_DISPLAY_CONTROLS_WHEN_PAUSE,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL),i.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_CONTENT_VIDEO_ENABLED,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);const e=new w7(t,i,this.LZt,this.$wi),s=this.Tmi.Gmi(i,e.qwi());this.tyi.aO(i),this.Emi.xwi(i),this.iyi=e;try{await s}finally{this.Emi.Pwi(),this.eyi=!0}}get Emi(){return this.A7t}get Tmi(){return this.syi}get Dmi(){return this.eyi}static nyi(t,i,e){const s=h.createElement("div");return s.id=e,s.className="theo-freewheel",i.classList.add("theo-freewheel-video"),s.appendChild(i),t.appendChild(s),s}get Rmi(){return this.tyi}F3t(t){this.Emi.Fwi(t.type)}be(){this.Q1t.style.display="block",this._T.style.display="block"}we(){this.Q1t.style.display="none",this._T.style.display="none"}K9t(t){this.LZt=t}hr(){this.eyi=!1,this.LZt=void 0,this.Tmi.hr(),this.tyi.hr(),this.iyi&&(this.iyi.hr(),this.iyi=void 0),this.Emi.hr(),this._T.src=""}kn(){this.hr(),this.A7t.kn(),this.tyi.kn(),this.Tmi.kn(),this.Q1t.remove(),os(this.Q1t)}constructor(i,e,n){super(),this.oa=void 0,this._T=void 0,this.Zwi=void 0,this.$wi=void 0,this.syi=void 0,this.Q1t=void 0,this.A7t=void 0,this.iyi=void 0,this.tyi=void 0,this.LZt=void 0,this.eyi=void 0,this.oa=i,this._T=e,this.eyi=!1,this.$wi=t.createUniqueDisplayBaseId(),this.Q1t=t.nyi(i.xe,e,this.$wi),this.Zwi=new s.tv.freewheel.SDK.AdManager,this.syi=new l7(this.Q1t,this._T),this.tyi=new A7(this.oa,this.Tmi),this.au(this.Tmi),this.A7t=new f7(i,n,this.Tmi,this.Q1t)}};function T7(t){if(s.tv)switch(t){case"preroll":return tv.freewheel.SDK.ADUNIT_PREROLL;case"midroll":return tv.freewheel.SDK.ADUNIT_MIDROLL;case"postroll":return tv.freewheel.SDK.ADUNIT_POSTROLL;case"overlay":return tv.freewheel.SDK.ADUNIT_OVERLAY}}function k7(t,i,e){if(void 0!==i&&S(i)||i<0||i===1/0)return NaN;switch(t){case"preroll":return 0;case"postroll":return e}return Ac(i)}Qh.Ng.zz(new class{get P3t(){return mt.H0t}qz(t){return t.integration===ru.FREEWHEEL}x3t(t,i,e){if(!Boolean(s.tv&&s.tv.freewheel&&s.tv.freewheel.SDK&&s.tv.freewheel.SDK.AdManager))return;const n=new EF(t.Wu,t.Ql,e,1,[Ci.Bk]);n.ust(t.xe);const r=n.Gq(Ci.Bk),h=new S7(t,r.$W,t.Wu);return new a7(t,i,n,h,r)}sj(t){const i=Ua(t);ul(i.cuePoints)||(i.cuePoints=[]);const e=[],s=t.assetDuration||0;for(const t of i.cuePoints){const i=k7(t.adUnit,t.timeOffset,s),n=T7(t.adUnit);!S(i)&&Z(n)?(t.adUnit=n,t.timeOffset=i,e.push(t)):zd.um("Invalid adUnit/timeOffset combination. Cue was removed.")}return i.cuePoints=e,i}M6(t,i,e,s){e.K9t(t,i,s)}}),r(),r(),r(),r(),r();var E7=self.theoplayerDeviceMetadata;function ja(t){return t.navigator&&t.navigator.userAgent||""}r(),r(),r(),r();var P7={"Windows 10":/(Windows 10.0|Windows NT 10.0)/i,"Windows 8.1":/(Windows 8.1|Windows NT 6.3)/i,"Windows 8":/(Windows 8|Windows NT 6.2)/i,"Windows 7":/(Windows 7|Windows NT 6.1)/i,"Windows Vista":/Windows NT 6.0/i,"Windows Server 2003":/Windows NT 5.2/i,"Windows XP":/(Windows NT 5.1|Windows XP)/i,"Windows Phone":/Windows Phone/i,Android:/Android/i,Linux:/(Linux(?!.*Ubuntu)|X11)/,Ubuntu:/Ubuntu/i,iOS:/(iPhone|iPad|iPod)/i,"Mac OS X":/Mac OS X/i,"Mac OS":/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/i,"Chrome OS":/CrOS/i};function Vn(t,i){const e=P7[i];return!!e&&Boolean(ja(t).match(e))}function x7(t){return Vn(t,"Android")}function I7(t){return Vn(t,"Windows Phone")}function R7(t){return Vn(t,"iOS")&&!I7(t)}function C7(t){return Vn(t,"Ubuntu")}var D7=/Windows (NT|Phone) ([0-9.]+)/i,B7=/Mac.*?(OS |OS X )(\d+(([_.])\d+)?(([_.])\d+)?)/i,N7={"Windows 10":D7,"Windows 8.1":D7,"Windows 8":D7,"Windows 7":D7,"Windows Vista":D7,"Windows Server 2003":D7,"Windows XP":D7,"Windows Phone":/Windows Phone ([0-9.]+)/i,Android:/Android (\d+(([_.])\d+)?(([_.])\d+)?)/i,Linux:void 0,Ubuntu:void 0,iOS:/(iPad|iPhone|iPod).*?(OS |os |OS_)(\d+(([_.])\d+)?(([_.])\d+)?)/i,"Mac OS X":B7,"Mac OS":B7,"Chrome OS":void 0};function M7(t,i){const e=N7[i];return e?ja(t).match(e):null}function L7(t){return t.split(/[_.]/).map(t=>x(t,10))}function O7(t){if(function(t){return Boolean(ja(t).match(/Windows/i))}(t)){if(function(t){return Vn(t,"Windows 10")}(t))return"Windows 10";if(I7(t))return"Windows Phone";if(function(t){return Vn(t,"Windows 8.1")}(t))return"Windows 8.1";if(function(t){return Vn(t,"Windows 8")}(t))return"Windows 8";if(function(t){return Vn(t,"Windows 7")}(t))return"Windows 7";if(function(t){return Vn(t,"Windows Vista")}(t))return"Windows Vista";if(function(t){return Vn(t,"Windows Server 2003")}(t))return"Windows Server 2003";if(function(t){return Vn(t,"Windows XP")}(t))return"Windows XP"}else{if(x7(t))return"Android";if(R7(t))return"iOS";if(function(t){return Vn(t,"Mac OS X")}(t))return"Mac OS X";if(function(t){return Vn(t,"Mac OS")}(t))return"Mac OS";if(C7(t))return"Ubuntu";if(function(t){return Vn(t,"Chrome OS")}(t))return"Chrome OS";if(function(t){return Vn(t,"Linux")&&!C7(t)}(t))return"Linux"}}function F7(t,i){const e=function(t){const i=M7(t,"Windows 10");return i&&i.length>2?L7(i[2]):void 0}(t),s=function(t){const i=M7(t,"Mac OS X");return i&&i.length>2?L7(i[2]):void 0}(t),n=function(t){const i=M7(t,"Android");return i&&i.length>1?L7(i[1]):void 0}(t),r=function(t){const i=M7(t,"iOS");return i&&i.length>3?L7(i[3]):void 0}(t),h=function(t){const i=M7(t,"Chrome OS");return i&&i.length>0?L7(i[0]):void 0}(t);return e?e.length>i?e[i]:void 0:s?s.length>i?s[i]:void 0:n?n.length>i?n[i]:void 0:r?r.length>i?r[i]:void 0:h&&h.length>i?h[i]:void 0}function U7(t){const i=function(t){return F7(t,0)}(t),e=function(t){return F7(t,1)}(t),s=function(t){return F7(t,2)}(t);if(void 0!==i)return void 0===e?""+i:void 0===s?i+"."+e:i+"."+e+"."+s}var V7={Chrome:/Chrome/i,"Chrome Mobile":void 0,"Chrome iOS":/CriOS/i,Chromium:/Chromium/i,HeadlessChrome:/HeadlessChrome/i,Firefox:/Firefox/i,Seamonkey:/Seamonkey/i,"Firefox iOS":/FxiOS/i,Safari:/Safari/i,Edge:/Edge\/\d+/i,"Edge Chromium":/Edg\/\d+/i,IE:/Trident/i,Opera:/Opera|OPR/i,Vivaldi:/Vivaldi/i,"Android Browser":void 0};function H7(t,i){const e=V7[i];return!!e&&Boolean(ja(t).match(e))}function W7(t){return Boolean(ja(t).match(/Mobi/i))}function q7(t){return Boolean(t.chrome&&t.navigator&&t.navigator.vendor&&/google/i.test(t.navigator.vendor))||z7(t)}function z7(t){return H7(t,"Chrome iOS")}function G7(t){return H7(t,"Firefox")&&!j7(t)}function X7(t){return H7(t,"Firefox Mobile")&&!j7(t)&&W7(t)}function j7(t){return H7(t,"Seamonkey")}function Q7(t){return H7(t,"Firefox iOS")&&!j7(t)}function K7(t){return H7(t,"Safari")&&!H7(t,"Chrome")&&!Qt.Wv}function Y7(t){return Boolean(n9(t))}function J7(t){return H7(t,"Edge")}function Z7(t){return H7(t,"Edge Chromium")}function $7(t){return H7(t,"IE")}function t9(t){return H7(t,"Vivaldi")}var i9=/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i,e9={Chrome:i9,"Chrome Mobile":i9,"Chrome iOS":/CriOS\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i,Chromium:i9,HeadlessChrome:i9,Firefox:/Firefox\/([0-9.]+)/i,"Firefox iOS":/FxiOS\/([0-9.]+)/i,Safari:/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/,"Safari Mobile":void 0,Edge:/Edge\/(\d+)/i,"Edge Chromium":/Edg\/(\d+)/i,"Edge Mobile":void 0,IE:/(MSIE |Trident.*?rv:)(\d+)/i,Opera:/(OPR\/(\d+\.\d+))|(Opera(?=.*Version\/((\d+)\.(\d+))))/i,"Opera Mobile":void 0,Vivaldi:/Vivaldi\/((\d+)\.(\d+)\.(\d+)(?:\.(\d+))?)/i,"Android Browser":void 0};function s9(t,i){const e=e9[i];return e?ja(t).match(e):null}function n9(t){return s9(t,"Opera")}function r9(t){const i=function(t){return s9(t,"Firefox")}(t);return i?C(i[1]):0}function h9(t){const i=function(t){return s9(t,"Firefox iOS")}(t);return i?C(i[1].split(".")[0]):0}function o9(t){const i=function(t){return s9(t,"Safari")}(t);return i?C(i[2].split(".")[0]):0}function a9(t){const i=function(t){return s9(t,"Edge")}(t);return i?C(i[1]):0}function u9(t){const i=function(t){return s9(t,"Edge Chromium")}(t);return i?C(i[1]):0}function c9(t){const i=function(t){return s9(t,"IE")}(t);return i?C(i[2]):0}function d9(t){const i=function(t){return s9(t,"Vivaldi")}(t);return i?C(i[1]):0}function l9(t){if(x7(t))return q7(t)?"Chrome Mobile":G7(t)||X7(t)?"Firefox Mobile":J7(t)?"Edge Mobile":Y7(t)?"Opera Mobile":"Android Browser";if(R7(t)){if(q7(t)||z7(t))return"Chrome iOS";if(G7(t)||Q7(t))return"Firefox iOS";if(J7(t))return"Edge Mobile";if(K7(t)||function(t){return K7(t)&&W7(t)}(t))return"Safari Mobile";if(Y7(t))return"Opera Mobile"}return function(t){return H7(t,"Chromium")}(t)?"Chromium":function(t){return H7(t,"HeadlessChrome")}(t)?"HeadlessChrome":q7(t)?"Chrome":G7(t)?"Firefox":K7(t)?"Safari":J7(t)?"Edge":Z7(t)?"Edge Chromium":$7(t)?"IE":Y7(t)?"Opera":t9(t)?"Vivaldi":void 0}function f9(t){return t9(t)?d9(t):z7(t)?Number(function(t){const i=e9["Chrome iOS"];return i&&i.exec(ja(t))||[]}(t)[1]):q7(t)?Number(function(t){const i=e9.Chrome;return i&&i.exec(ja(t))||[]}(t)[1]):G7(t)||X7(t)?r9(t):Q7(t)?h9(t):K7(t)?o9(t):J7(t)?a9(t):Z7(t)?u9(t):$7(t)?c9(t):Y7(t)?function(t){const i=n9(t);return i&&i[0].indexOf("Opera")>-1?C(i[5]):i?C(i[2].split(".")[0]):0}(t):void 0}var v9=function(t){return t.ryi="pc",t.hyi="console",t.oyi="settop",t.ayi="mobile",t.uyi="tablet",t.cyi="smarttv",t.dyi="searchbot",t}({});function _9(t){const i=ja(t);return i.match(/CrKey|Roku|AFTS|AppleTV|Nexus Player/i)?"settop":i.match(/Xbox|Playstation|Wii|Nintendo/i)?"console":/(iPad|Tablet|(Android(?!.*Mobi))|(Windows(?!.*Phone)(.*Touch))|Kindle|Playbook|Silk|(Puffin(?!.*(IP|AP|WP))))/i.test(i)?"tablet":/Mobi/.test(i)?"mobile":i.match(/GoogleTV|SmartTV|SMART-TV|Internet TV|NetCast|NETTV|boxee|Kylo|DLNADOC|hbbtv|CE-HTML/i)?"smarttv":i.match(/(nuhk|Googlebot|bingbot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/i)?"searchbot":function(t){return Boolean(l9(t))}(t)?"pc":void 0}var g9=class{ej(t){this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_ID,t.deviceID||function(){const t=DA.Wy("deviceId");if(t)return t;const i=UR();return DA.qy("deviceId",i),i}()),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.PLAYER,"THEOplayer"),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.PLAYER_VERSION,"10.0.0"),this.lyi(t),this.fyi(),this.vyi(t),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.EMPCLIENT_INTEGRATION_VERSION,"3.0"),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.EMPCLIENT_INTEGRATION_BUILDDATE,"2023-04-17 12:00:00"),t.application&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.APPLICATION,t.application),t.applicationVersion&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.APPLICATION_VERSION,t.applicationVersion),t.userAccountID&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.USER_ACCOUNT_ID,t.userAccountID);const i=t.connectionType;i?this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,i):(this._yi(),od.connection&&od.connection.addEventListener&&od.connection.addEventListener("change",this._yi))}lyi(t){this.gyi(t);const i=t.deviceManufacturer||E7&&E7.manufacturer;i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_MANUFACTURER,i);const e=t.deviceModel||E7&&E7.model;e&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_MODEL,e)}gyi(t){const i=t.deviceType||function(){const t=_9(self);switch(t){case v9.hyi:return"game-console";case v9.cyi:return"tv";case v9.oyi:return"media-streamer";default:return t}}();i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_TYPE,i)}fyi(){const t=l9(self);t&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_BROWSER,t);const i=f9(self);void 0!==i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_BROWSER_VERSION,i.toString())}vyi(t){const i=t.deviceOs||O7(self);i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_OS,i);const e=t.deviceOsVersion||U7(self);e&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_OS_VERSION,e.toString())}kn(){od.connection&&od.connection.removeEventListener&&od.connection.removeEventListener("change",this._yi)}constructor(t,i){this.empClient=void 0,this.agama=void 0,this._yi=void 0,this.empClient=t,this.agama=i,this._yi=()=>{const t=zd.bP;switch(t){case"wifi":this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,"wlan");break;case"ethernet":this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,t);break;case"cellular":const i=function(t){switch(t){case"3g":return"mobile/3G";case"4g":return"mobile/4G";default:return}}(zd.AP);i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,i)}}}};VF(function(t){return i=>class extends i{OP(t,i){this.pyi&&this.pyi.QG(),super.OP(t)}kn(){this.pyi&&this.pyi.kn(),super.kn()}constructor(i,e){super(i,e),this.OG=new t,this.pyi=void 0,this.pyi=new HR(this,this.OG,e)}}}(class extends IR{qx(t){this.myi=t,this.wyi&&(this.OG=function(t,i){const e=function(t,i){switch(i){case"info":return t.LogLevel.INFO;case"debug":return t.LogLevel.DEBUG;case"warning":return t.LogLevel.WARNING;case"error":return t.LogLevel.ERROR;default:return t.LogLevel.FATAL}}(i,t.logLevel);i.setLogLevel(e);const s=new i.EMPClient(t.config);return function(t,i){return t.setExternalConfig(i.config),t}(s,t)}(t,this.wyi),this.OG&&(this.yyi=new g9(this.OG,this.wyi),this.ko=!0))}ij(){return this.wyi||console.warn("Please load the Agama Library (empclient.min.js) in order to use the integration"),Boolean(this.wyi)}$X(){return this.ko}DX(t,i){if(this.OG&&this.wyi)switch(t){case Ka.eG:this.OG.setMeasurement(this.wyi.Measurement.BUFFER_LENGTH,i);break;case Ka.sG:this.OG.setMeasurement(this.wyi.Measurement.BYTES_RECEIVED,i);break;case Ka.rG:this.OG.setMeasurement(this.wyi.Measurement.SEGMENT_PROFILE_BITRATE,i);break;case Ka.hG:this.OG.setMeasurement(this.wyi.Measurement.VIDEO_PROFILE_BITRATE,i);break;case Ka.nG:this.OG.setMeasurement(this.wyi.Measurement.SEGMENT_READ_BITRATE,i);break;case Ka.Jz:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_1XX,i);break;case Ka.Zz:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_2XX,i);break;case Ka.$z:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_3XX,i);break;case Ka.tG:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_4XX,i);break;case Ka.iG:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_5XX,i);break;case Ka.aG:this.OG.setMeasurement(this.wyi.Measurement.PLAYBACK_POSITION,i);break;case Ka.uG:this.OG.setMeasurement(this.wyi.Measurement.NUMBER_OF_FRAMES_DECODED,i);break;case Ka.oG:this.OG.setMeasurement(this.wyi.Measurement.NUMBER_OF_FRAMES_DROPPED,i)}}fX(t,i){if(this.OG&&this.wyi)switch(t){case yi.vG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.ASSET_DURATION,i);break;case yi.fG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.MANIFEST_URI,i);break;case yi._G:this.OG.setSessionMetadata(this.wyi.SessionMetadata.NUMBER_OF_CONTENT_PROFILES,i);break;case yi.mG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.SERVICE_NAME,i);break;case yi.gG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.CDN,i);break;case yi.pG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.CONTENT_TITLE,i);break;case yi.wG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.CONTENT_TYPE,i);break;case yi.yG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.CONTENT_DESCRIPTION,i)}}ej(){this.yyi&&this.myi&&this.yyi.ej(this.myi)}tj(t,i){this.wyi&&this.OG&&(this.FX(),function(t,i,e,s){const n=VR(t,e,s);i.abrSession(n,t.ViewState.INITIAL_BUFFERING)}(this.wyi,this.OG,t,i),this.Ayi=!0)}kn(){this.yyi&&this.yyi.kn(),this.byi(ER.AG),this.OG=void 0}$G(t){this.Syi(t)}eX(t,i){this.OG&&this.OG.event(t.code,i)}FX(){this.OG&&this.Ayi&&(this.OG.exitSession(),this.Ayi=!1)}byi(t){if(this.OG&&this.wyi&&(this.FX(),t===ER.AG))this.OG.shutdown(this.wyi.ShutdownType.NORMAL_SHUTDOWN)}tX(t,i,e){this.Syi(t,i,e)}Syi(t,i,e){if(this.OG&&this.wyi)switch(t){case Un.TM:this.Tyi(this.wyi.ViewState.PLAYING,i,e);break;case Un.Qz:this.Tyi(this.wyi.ViewState.FAILED,i,e);break;case Un.Kz:this.Tyi(this.wyi.ViewState.INITIAL_BUFFERING,i,e);break;case Un.Gz:this.Tyi(this.wyi.ViewState.PAUSED,i,e);break;case Un.Xz:this.Tyi(this.wyi.ViewState.SEEK,i,e);break;case Un.jz:this.Tyi(this.wyi.ViewState.STALLED,i,e);break;case Un.Yz:this.Tyi(this.wyi.ViewState.NO_ACCESS,i,e)}}Tyi(t,i,e){if(this.OG)if(i){const s=function(t){return t||""}(e);this.OG.viewStateExtended(t,i.code,s)}else this.OG.viewStateChanged(t)}constructor(){super(),this.wyi=void 0,this.OG=void 0,this.ko=!1,this.Ayi=!1,this.myi=void 0,this.yyi=void 0,this.wyi=s.Agama}}),zo.hnt),r(),r(),r(),r(),r();var p9=function(t){return t.PLAY_ALL="play-all",t.PLAY_NONE="play-none",t.PLAY_LAST="play-last",t}({});r();var m9=function(t){return t.VOD="vod",t.LIVE="live",t}({}),w9=class{get Ca(){return this.kyi.Ca}get lt(){return this.JW}get WP(){return this.ZW}Eyi(t){this.JW=P(t),this.ZW=t,this.oa.So(new Pi(t))}Ta(t){this.Pyi.resetSource(),this.xyi.Gy(),this.Iyi=!1,this.oa.Ryi(t)}async Xnt(t,i){if(this.Cyi.hr(),this.Iyi=!1,!t||!function(t){return t.sources.some(t=>t.integration===GT.UPLYNK)}(t))return await this.oa.Dyi(t,i);try{this.Byi=await this.Nyi.Cgi(t),await this.oa.Dyi(this.Byi,i)}catch(t){this.Eyi(new Ga(Vo.MANIFEST_LOAD_ERROR,t.message,t))}}kn(){this.m7.Zg(),this.Myi.Zg(),this.oa.mn(d.xw,this.Lyi),this.oa.mn(d.uo,this.uvi),this.oa.mn(d._y,this.qui),this.oa.mn(d.Bw,this.U_i),this.oa.mn(Do.AM,this.Pd);for(const t of this.Pyi.A0t.ec)t.mn("Oyi",this.Fyi),t.mn("Dnt",this.wui),t.mn("Cnt",this.kui);this.Pyi.A0t.mn("xnt",this.Uyi),this.Pyi.A0t.mn("Pnt",this.Vyi),this.Pyi.destroy(),this.Y1t&&(this.Y1t.zg(),this.Y1t=void 0),this.Iyi=!1}async fetchAssetInfo(t){if(t&&t.integrationData)try{const i=await this.Hyi.RSt(t.integrationData.source.prefix,t.integrationData.source.id,this.Myi.Yg,t.integrationData.preplayResponse.sid);this.kyi.Wyi(i),this.xyi.qyi(i,this.Pyi.A0t.ec)}catch(t){0}}zyi(t){this.Pyi.Gyi(t),this.Pyi.mnt.forEach(i=>i.Xyi(t)),this.Pyi.jyi(this.oa.Tx()),this.K1t()}OP(t){if(this.Pyi.ynt)return;this.m7.Zg(),this.m7=new at;Wr($e(this.gri(t,this.m7.Yg),this.m7))}async gri(t,i){if(ii(i),ti.Sat.Cr(t));i?this.oa.$yi(i.EO):this.oa.$yi(t)}Zyi(t){const i=this.Pyi.Yyi(this.oa.LP(),t).pop();i&&i.Sat.Cr(t)?this.oa.$yi(i.PO):this.oa.$yi(t)}async Jyi(t,i,e){for(const t of i)await this.tAi(t,e);const s=af(i,-1);s&&s.Sat.Cr(t)?this.oa.LP()t.iAi.length>0);if(t){const i=t.iAi[0];this.Y1t||(this.Y1t=new C1(this.oa.xe),this.Y1t.wn("clickstart",this.eAi)),this.Y1t.u1t=i}else this.Y1t&&(this.Y1t.zg(),this.Y1t=void 0)}constructor(t,i,e,s,n,r,h){this.oa=void 0,this.Cyi=void 0,this.Nyi=void 0,this.Pyi=void 0,this.kyi=void 0,this.Hyi=void 0,this.xyi=void 0,this.Byi=void 0,this.JW=void 0,this.ZW=void 0,this.m7=void 0,this.Myi=void 0,this.sAi=void 0,this.Iyi=void 0,this.Y1t=void 0,this.Lyi=void 0,this.uvi=void 0,this.qui=void 0,this.U_i=void 0,this.Pd=void 0,this.Fyi=void 0,this.wui=void 0,this.kui=void 0,this.Uyi=void 0,this.Vyi=void 0,this.eAi=void 0,this.oa=t,this.Cyi=i,this.Nyi=e,this.Pyi=s,this.kyi=n,this.Hyi=r,this.xyi=h,this.JW=void 0,this.ZW=void 0,this.m7=new at,this.Myi=new at,this.sAi=void 0,this.Iyi=!1,this.Y1t=void 0,this.Lyi=t=>{const i=t.currentSource;if(!i||!i.integrationData)return;const{preplayResponse:e,source:s}=i.integrationData;this.kyi.nAi(e),e&&e.type===m9.VOD&&e.ads&&this.Pyi.qyi(e.ads),this.Cyi.rAi=i.integrationData,s.assetInfo&&Wr(this.fetchAssetInfo(i))},this.uvi=()=>{this.Iyi=!0},this.qui=()=>{this.Iyi&&this.zyi(this.oa.LP())},this.U_i=()=>{this.Iyi&&(this.zyi(1/0),this.Iyi=!1)},this.Pd=()=>{Wr(this.Cyi.Tn())},this.Fyi=t=>{this.m7.Zg(),this.m7=new at;Wr($e(this.gri(t.od.PO,this.m7.Yg),this.m7))},this.wui=()=>{1!==this.oa.ux&&(this.sAi=this.oa.ux,this.oa.ux=1)},this.kui=()=>{void 0!==this.sAi&&(this.oa.ux=this.sAi,this.sAi=void 0)},this.Uyi=t=>{t.od.wn("Oyi",this.Fyi),t.od.wn("Dnt",this.wui),t.od.wn("Cnt",this.kui)},this.Vyi=t=>{t.od.mn("Oyi",this.Fyi),t.od.mn("Dnt",this.wui),t.od.mn("Cnt",this.kui)},this.eAi=()=>{this.oa.zx()},this.oa.wn(d.xw,this.Lyi),this.oa.wn(d.uo,this.uvi),this.oa.wn(d._y,this.qui),this.oa.wn(d.Bw,this.U_i),this.oa.wn(Do.AM,this.Pd),this.Pyi.A0t.wn("xnt",this.Uyi),this.Pyi.A0t.wn("Pnt",this.Vyi)}};r(),r();var y9=$h({breaksIndex:xt,adsIndex:xt,startTime:xt,endTime:xt}),A9=$h({index:xt,timeOffset:xt}),b9=$h({duration:xt,apiFramework:Fs(hi,oI),creative:hi,mimeType:hi,width:xt,height:xt,companions:ln(function(t){return new pI(t)}(()=>b9)),extensions:Fs(Zh,ln(Ns)),fw_parameters:Fs(Zh,gI(hi)),events:gI(ln(hi))}),S9=$h({type:lI(["linear","nonlinear"]),position:lI(["preroll","midroll","postroll","pause","overlay",""]),timeOffset:xt,duration:xt,ads:ln(b9),events:gI(ln(hi))}),T9=$h({breaks:ln(S9),breakOffsets:Fs(Zh,ln(A9)),placeholderOffsets:Fs(Zh,ln(y9))}),k9=$h({required:Fs(Zh,hI),fairplayCertificateURL:Fs(Zh,hi),widevineLicenseURL:Fs(Zh,hi),playreadyLicenseURL:Fs(Zh,hi)}),E9={type:lI(cI(m9)),playURL:hi,prefix:hi,sid:hi,drm:Fs(Zh,k9)},P9=$h(Mo({},E9,{type:lI([m9.VOD]),ads:T9,interstitialURL:Fs(hi,oI,Zh)})),x9=Fs(P9,$h(Mo({},E9,{type:lI([m9.LIVE])})));r();var I9=hi,R9=$h({userId:hi,externalId:Fs(hi,ln(hi))}),C9=class{async RSt(t){try{return this.hAi(t)}catch(t){throw t}}async hAi(t){const i=await async function(t){const i=t.prefix,e=D9[t.assetType],s=function(t){if(ln(I9).qH(t))return 1===t.length?t[0]:t.join(",")+"/multiple";if(I9.qH(t))return t;if(R9.qH(t)&&ul(t.externalId))return 1===t.externalId.length?"ext/"+t.userId+"/"+t.externalId[0]:"ext/"+t.userId+"/"+t.externalId.join(",")+"/multiple";if(R9.qH(t))return"ext/"+t.userId+"/"+t.externalId;throw new g("Invalid asset id")}(t.id),n=await async function(t){if(t&&await zd.wm())return{rmt:"fps",manifest:"m3u8"};if(t&&await zd.Am())return{rmt:"wv",manifest:"mpd"};if(t&&await zd.ym())return{rmt:"pr",manifest:"mpd"};return{}}(t.contentProtected),r=function(t,i){const e=B9(t,i);return e?{"ad.cping":"1","ad.pingf":String(e)}:{}}(t.assetType,t.ping);let h={};ul(t.preplayParameters)?t.preplayParameters.forEach(t=>{h[t[0]]=t[1]}):h=t.preplayParameters;const o=i+"/preplay/"+e+s+".json";return Gc(o,Mo({v:"2"},h,n,r,h))}(t),e=this.nV.lk({Uk:X.GET,Yu:i,dk:M.DT}),s=await e,n=Mo({},await s.ck(),{type:t.assetType===XR.ASSET?m9.VOD:m9.LIVE});return x9.qH(n)||x9.GH(n,"PreplayResponse"),n}constructor(t){this.nV=void 0,this.nV=t}},D9={[XR.ASSET]:"",[XR.CHANNEL]:"channel/",[XR.EVENT]:"event/"};function B9(t,i){const e=t!==XR.ASSET;return(!e&&i.adImpressions?1:0)+(!e&&i.freeWheelVideoViews?2:0)+(e&&i.linearAdData?4:0)}r(),r();var N9=$h({ad_id:hi,apiFramework:Fs(oI,hi),companions:ln(Ns),creative:hi,duration:xt,mimeType:hi,height:xt,width:xt,extensions:Fs(Zh,ln(Ns)),fw_parameters:Fs(Zh,gI(hi))}),M9=$h({breakId:hi,ads:ln(N9),type:lI(["linear","nonlinear"]),position:lI(["preroll","midroll","postroll","pause","overlay",""]),timeOffset:xt,duration:xt,height:Fs(Zh,xt),width:Fs(Zh,xt),events:gI(ln(hi))}),L9=$h({breaks:ln(M9)}),O9=$h({next_time:xt,ads:Fs(Zh,L9),extensions:Fs(Zh,ln(Ns)),error:Fs(Zh,hi),currentBreakEnd:Fs(Zh,xt)}),F9=function(t){return t.MSt="start",t.Xz="seek",t}({}),U9=class{async RSt(t,i){try{return this.hAi(t,i)}catch(t){throw t}}async hAi(t,i){const e=function(t){const i={v:"3",pt:String(t.currentTime)};(function(t){return void 0!==t.seekTime})(t)&&t.hasFreeWheelVideoViews&&(i.ft=String(t.seekTime));t.event&&(i.ev=t.event);return Gc(t.zonePrefix+"/session/ping/"+t.sessionId+".json",Mo({},i))}(t),s=this.nV.lk({Uk:X.GET,Yu:e,dk:M.DT,Yg:i}),n=await s,r=await n.ck();return O9.qH(r)||O9.GH(r,"PingResponse"),r}constructor(t){this.nV=void 0,this.nV=t}};r(),r();var V9=class extends Oi{get oE(){return this.aE}xa(){return new H9(this.aE)}constructor(t){super("oAi"),this.aE=void 0,this.aE=t}},H9=class extends wp{constructor(t){super("pingresponse"),this.response=void 0,this.response=t}};r();var W9=class extends Oi{get lt(){return this.JW}xa(){return new q9(this.JW)}constructor(t){super("aAi"),this.JW=void 0,this.JW=t}},q9=class extends wp{constructor(t){super("pingerror"),this.error=void 0,this.error=t}},z9=class extends Ne{set rAi(t){this.uAi=t}get cAi(){return this.dAi}async Tn(){const t=this.uAi;if(!t)return;0!==B9(t.source.assetType,t.source.ping)&&(this.dAi=this.oa.Tx().start(0),await this.lAi(F9.MSt),this.oa.wn("timeupdate",this.fAi),this.oa.wn("seeking",this.vAi))}async lAi(t,i){const e=this.uAi.preplayResponse,s={};if(S(this.dAi))return void 0;if(it(this._Ai)&&sr(this._Ai,this.oa.LP()-this.dAi))return;void 0!==i&&(s.seekTime=i),void 0!==t&&(s.event=t);let n,r=this.oa.LP()-this.dAi;t===F9.MSt?r=0:t!==F9.Xz&&this.gAi&&(r=_.min(r,this.gAi)),this._Ai=r;try{var h;const t=await this.pAi.RSt(Mo({zonePrefix:e.prefix,sessionId:e.sid,currentTime:r,hasFreeWheelVideoViews:null==(h=this.uAi)?void 0:h.source.ping.freeWheelVideoViews},s),this.nT.Yg);this.So(new V9(t)),this.gAi=-1!==t.next_time?t.next_time:void 0,n=t.error}catch(t){D(t)||(n=t.message)}finally{n&&this.So(new W9(n))}}hr(){this.gAi=void 0,this.uAi=void 0,this.dAi=NaN,this.mAi=!1,this.wAi=NaN,this._Ai=void 0,this.oa.mn("seeking",this.vAi),this.oa.mn("timeupdate",this.fAi),this.yAi()}yAi(){this.nT.Zg(),this.nT=new at}kn(){this.hr()}constructor(t,i){super(),this.pAi=void 0,this.oa=void 0,this.uAi=void 0,this.dAi=void 0,this.gAi=void 0,this.mAi=void 0,this.wAi=void 0,this.nT=void 0,this._Ai=void 0,this.fAi=void 0,this.vAi=void 0,this.pAi=t,this.oa=i,this.dAi=NaN,this.gAi=void 0,this.mAi=!1,this.wAi=NaN,this.nT=new at,this._Ai=void 0,this.fAi=async()=>{const t=this.oa.LP();if(this.wAi=t,this.mAi||qd(this.gAi)||S(this.dAi))return;this.dAi+this.gAi<=t&&(this.mAi=!0,await this.lAi(),this.mAi=!1)},this.vAi=()=>{if(this.oa.LP()===this.dAi)return;this.mAi&&this.yAi(),this.wAi=this.oa.LP();const t=this.wAi-(this.dAi||0);S(t)?Wr(this.lAi(F9.Xz,0)):Wr(this.lAi(F9.Xz,t))}}};r();var G9=class{async Cgi(t){const i=[];for(const e of t.sources)if(Qi(e))try{const s=j9({source:e,preplayResponse:await this.AAi.RSt(e)},t,this.VJ);s.src&&(s.src=Gc(s.src,e.playbackUrlParameters)),i.push(s)}catch(t){0}else i.push(e);if(0!==t.sources.length&&0===i.length)throw new m("Fatal: unable to play UplynkSources.");return Mo({},t,{sources:i})}constructor(t,i){this.AAi=void 0,this.VJ=void 0,this.AAi=t,this.VJ=i}};function X9(t){return!!t.sources&&(ul(t.sources)?t.sources.some(Qi):Qi(t.sources))}function j9(t,i,e){const s=t.preplayResponse;let n;t.source.contentProtected&&s.drm&&(n={integration:"uplynk"},s.drm.fairplayCertificateURL&&(n.fairplay={certificateURL:s.drm.fairplayCertificateURL}),s.drm.widevineLicenseURL&&(n.widevine={licenseAcquisitionURL:s.drm.widevineLicenseURL}),s.drm.playreadyLicenseURL&&(n.playready={licenseAcquisitionURL:s.drm.playreadyLicenseURL}));const r=ml({src:s.playURL,contentProtection:n,useNativePlayback:t.source.useNativePlayback,hls:t.source.hls,dash:t.source.dash,seamlessSwitchStrategy:t.source.seamlessSwitchStrategy},i,e);return r.integrationData=t,r}r(),r(),r();var Q9=class extends Oi{xa(){return new K9(this.od.Ca)}constructor(t,i){super("Dnt"),this.od=void 0,this.XF=void 0,this.od=t,this.XF=i}},K9=class extends wp{constructor(t){super("adbreakbegin"),this.adBreak=void 0,this.adBreak=t}};r();var Y9=class extends Oi{xa(){return new J9(this.od.Ca)}constructor(t,i){super("Cnt"),this.od=void 0,this.XF=void 0,this.od=t,this.XF=i}},J9=class extends wp{constructor(t){super("adbreakend"),this.adBreak=void 0,this.adBreak=t}};r();var Z9=class extends Oi{xa(){return new $9(this.od.Ca)}constructor(t){super("Oyi"),this.od=void 0,this.od=t}},$9=class extends wp{constructor(t){super("adbreakskip"),this.adBreak=void 0,this.adBreak=t}};r(),r();var ttt=class extends Oi{xa(){return new itt(this.od.Ca)}constructor(t){super("k4t"),this.od=void 0,this.od=t}},itt=class extends wp{constructor(t){super("updateadbreak"),this.adBreak=void 0,this.adBreak=t}},ett=class extends _o{get Ca(){return this.hu||(this.hu=function(t){let i;const e={get startTime(){return t.EO},get endTime(){return t.PO},get duration(){return t.ct},get ads(){return t.Jc.Ca},get skipOffset(){return t.JYt},set skipOffset(i){t.JYt=i},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new ws(t,e),e}(this)),this.hu}get EO(){return this.OO}get PO(){return this.WA?this.OO+this.WA:void 0}bAi(t){this.WA=t-this.EO;for(const i of this.Jc.ec)i.EO>t&&this.Jc._S(i);this.So(new ttt(this))}get ct(){return this.WA}get Sat(){const t=this.PO;return it(t)?new ve([this.EO,t]):ve.iL()}get Jc(){return this.qc}get SAi(){return this.TAi}get ro(){return this.ho}get JYt(){return this.gpi?-1:this.ZYt}set JYt(t){this.gpi||(this.ZYt=t)}Qut(t){return t>=this.EO&&(qd(this.ct)||t<=this.EO+this.ct)}kAi(t){return-1!==this.JYt&&(!!it(this.PO)&&t-this.EO>=this.JYt)}rD(){this.qc.ec.forEach(t=>t.rD()),this.So(new Z9(this))}EAi(t){const i=it(this.PO)&&t>=this.PO,e=this.EO<=t&&!i&&!this.ro,s=this.ro&&this.PO&&t>=this.PO;e&&(this.ho=!0,this.So(new Q9(this,this.EO))),this.qc.ec.forEach(i=>i.EAi(t)),s&&(this.TAi=!0,this.ho=!1,this.So(new Y9(this,this.PO)))}constructor(t,i,e,s,n){super(),this.OO=void 0,this.WA=void 0,this.qc=void 0,this.gpi=void 0,this.hu=void 0,this.ho=void 0,this.ZYt=void 0,this.TAi=void 0,this.OO=t,this.WA=i,this.qc=e,this.gpi=s,this.ho=!1,this.TAi=!1,this.ZYt=n}};r(),r();var stt=class extends Oi{xa(){return new ntt(this.Int.Ca)}constructor(t,i){super("Bnt"),this.Int=void 0,this.XF=void 0,this.Int=t,this.XF=i}},ntt=class extends wp{constructor(t){super("adbegin"),this.ad=void 0,this.ad=t}};r();var rtt=class extends Oi{xa(){return new htt(this.Int.Ca)}constructor(t,i){super("Nnt"),this.Int=void 0,this.XF=void 0,this.Int=t,this.XF=i}},htt=class extends wp{constructor(t){super("adend"),this.ad=void 0,this.ad=t}};r(),r();var ott=class extends Oi{xa(){return new att(this.Int.Ca)}constructor(t){super("PAi"),this.Int=void 0,this.Int=t}},att=class extends wp{constructor(t){super("removead"),this.ad=void 0,this.ad=t}},utt=class extends C3{bei(t){}Eei(t){this.So(new ott(t))}constructor(){super()}};r();var ctt=class extends Oi{xa(){return new dtt(this.Int.Ca)}constructor(t){super("P4t"),this.Int=void 0,this.Int=t}},dtt=class extends wp{constructor(t){super("adfirstquartile"),this.ad=void 0,this.ad=t}},ltt=class extends Oi{xa(){return new ftt(this.Int.Ca)}constructor(t){super("x4t"),this.Int=void 0,this.Int=t}},ftt=class extends wp{constructor(t){super("admidpoint"),this.ad=void 0,this.ad=t}},vtt=class extends Oi{xa(){return new _tt(this.Int.Ca)}constructor(t){super("I4t"),this.Int=void 0,this.Int=t}},_tt=class extends wp{constructor(t){super("adthirdquartile"),this.ad=void 0,this.ad=t}},gtt=class extends Oi{xa(){return new ptt(this.Int.Ca)}constructor(t){super("xAi"),this.Int=void 0,this.Int=t}},ptt=class extends wp{constructor(t){super("adcomplete"),this.ad=void 0,this.ad=t}};r();var mtt=class t extends _o{static IAi(i,e){return new t(i,e.duration,e.apiFramework||"",e.creative,e.mimeType,e.width,e.height,e.companions.map(e=>t.IAi(i,e)),e.extensions,e.fw_parameters,e.events,void 0)}static RAi(i,e){return new t(i,e.duration,e.apiFramework||"",e.creative,e.mimeType,e.width,e.height,e.companions.map(e=>t.RAi(i,e)),e.extensions,e.fw_parameters,void 0,e.ad_id)}get Ca(){return this.hu||(this.hu=function(t){let i;const e={get apiFramework(){return t.cYt},get companions(){return t.tYt.Ca},get creative(){return t.CAi},get duration(){return t.ct},get endTime(){return t.PO},get events(){return t.aQ},get extensions(){return t.nJt},get freeWheelParameters(){return t.DAi},get height(){return t.Mi},get mimeType(){return t.oQ},get startTime(){return t.EO},get width(){return t.Ti},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new ws(t,e),e}(this)),this.hu}get EO(){return this.OO}get PO(){return this.OO+this.WA}get ct(){return this.WA}get cYt(){return this.dYt}get CAi(){return this.BAi}get oQ(){return this.SQ}get Ti(){return this.sb}get Mi(){return this.hb}get aQ(){return this.Zf}get tYt(){return this.iYt}get nJt(){return this.rJt}get DAi(){return this.NAi}get ro(){return this.ho}get iAi(){var t;return null!=(t=this.Zf.clickthroughs)?t:[]}EAi(t){const i=this.EO<=t&&t=.25&&(this.MAi=!0,this.So(new ctt(this))),!this.LAi&&i>=.5&&(this.LAi=!0,this.So(new ltt(this))),!this.OAi&&i>=.75&&(this.OAi=!0,this.So(new vtt(this))),!this.FAi&&i>=.9999&&(this.FAi=!0,this.So(new gtt(this)))}rD(){this.MAi=!0,this.LAi=!0,this.OAi=!0,this.FAi=!0}kn(){this.mn("Bnt",this.UAi),this.mn("Nnt",this.VAi)}constructor(t,i,e,s,n,r,h,o,a=[],u={},c={},d){super(),this.OO=void 0,this.WA=void 0,this.dYt=void 0,this.BAi=void 0,this.SQ=void 0,this.sb=void 0,this.hb=void 0,this.rJt=void 0,this.NAi=void 0,this.Zf=void 0,this.VYt=void 0,this.iYt=void 0,this.hu=void 0,this.ho=void 0,this.MAi=void 0,this.LAi=void 0,this.OAi=void 0,this.FAi=void 0,this.UAi=void 0,this.VAi=void 0,this.OO=t,this.WA=i,this.dYt=e,this.BAi=s,this.SQ=n,this.sb=r,this.hb=h,this.rJt=a,this.NAi=u,this.Zf=c,this.VYt=d,this.iYt=new utt,this.ho=!1,this.MAi=!1,this.LAi=!1,this.OAi=!1,this.FAi=!1,this.UAi=()=>this.Xyi(this.OO),this.VAi=()=>this.Xyi(this.PO),this.iYt.Sei(o),this.wn("Bnt",this.UAi),this.wn("Nnt",this.VAi)}};r(),r();var wtt=class extends Oi{xa(){return new ytt(this.od.Ca)}constructor(t){super("xnt"),this.od=void 0,this.od=t}},ytt=class extends wp{constructor(t){super("addadbreak"),this.adBreak=void 0,this.adBreak=t}};r();var Att=class extends Oi{xa(){return new btt(this.od.Ca)}constructor(t){super("Pnt"),this.od=void 0,this.od=t}},btt=class extends wp{constructor(t){super("removeadbreak"),this.adBreak=void 0,this.adBreak=t}},Stt=class extends C3{bei(t){this.So(new wtt(t))}Eei(t){this.So(new Att(t))}constructor(){super()}},Ttt=class{get Ca(){return this.hu||(this.hu=function(t){return{get adBreaks(){return t.A0t.Ca},get currentAdBreak(){if(t.ynt)return t.ynt.Ca},get currentAds(){return t.ynt?t.ynt.Jc.Ca:(new utt).Ca},skip(){t.rD()}}}(this)),this.hu}get A0t(){return this.X0t}get ynt(){return Jr(this.X0t.ec,t=>t.ro)}get mnt(){return this.ynt?this.ynt.Jc.ec.filter(t=>t.ro):[]}get HAi(){if(0===this.A0t.V||0===this.oa.Tx().length)return;const t=this.oa.Tx().end(this.oa.Tx().length-1);return Jr(this.A0t.ec,i=>i.Qut(t))}get Kyi(){return this.WAi}jyi(t){if(0===t.length)return;const i=ve.jn(t);for(const t of this.X0t.ec.slice())it(t.PO)&&i.Tn(0)>t.PO&&this.X0t._S(t)}qyi(t){const i=!function(t){return it(t.breakOffsets)}(t),e=i?this.Cyi.cAi:0;for(const s of t.breaks){if(0===s.ads.length)continue;let t=s.timeOffset+e;const n=new utt;let r=0;for(const e of s.ads){const s=i?mtt.RAi(t,e):mtt.IAi(t,e);n.lO(s),t+=s.ct,r+=s.ct}const h=s.timeOffset+e,o=i?void 0:s.duration,a=new ett(h,o,n,i,this.qAi);i&&this.zAi.push({zKt:a,Zxt:h+r}),this.X0t.lO(a)}}GAi(t){const i=this.HAi;i&&i.bAi(t+this.Cyi.cAi)}Gyi(t){this.XAi=t,this.X0t.ec.forEach(i=>i.EAi(t))}rD(){const t=this.XAi,i=this.ynt;t&&i&&i.kAi(t)&&i.rD()}skipAd(t){this.rD()}Yyi(t,i){const e=[];for(const s of this.A0t.ec)!s.SAi&&s.EO>=t&&s.EOi.creativeId===t.CAi)}constructor(t,i,e,s){var n;this.oa=void 0,this.Cyi=void 0,this.X0t=void 0,this.qAi=void 0,this.WAi=void 0,this.hu=void 0,this.XAi=void 0,this.zAi=[],this.KAi=void 0,this.JAi=t=>(this.KAi=t,this),this.QAi=t=>{t.oE.ads&&this.qyi(t.oE.ads),t.oE.currentBreakEnd&&this.GAi(t.oE.currentBreakEnd)},this.jAi=t=>{if(0===this.zAi.length||0===this.oa.Tx().length)return;const i=this.oa.Tx().end(this.oa.Tx().length-1);for(const t of this.zAi.slice())it(t.zKt.ct)?oi(this.zAi,t):t.Zxt{var i;const e=null==(i=this.KAi)?void 0:i.createAdBreak({timeOffset:t.od.EO,maxDuration:t.od.ct,customData:t.od});t.od.wn("Oyi",this.ZAi);for(const i of t.od.Jc.ec){var s,n;const r={type:"linear",timeOffset:i.EO,duration:i.ct,creativeId:i.CAi,skipOffset:t.od.JYt,clickThrough:null==(s=i.iAi)?void 0:s[0],customData:i};null==(n=this.KAi)||n.createAd(r,e),i.wn("Bnt",this.o9t),i.wn("Nnt",this.$Ai),i.wn("P4t",this.tbi),i.wn("x4t",this.ibi),i.wn("I4t",this.ebi),i.wn("xAi",this.bwi)}},this.ZAi=t=>{for(const s of t.od.Jc.ec){const t=this.YAi(s);var i,e;if(t)null==(i=this.KAi)||i.beginAd(t),null==(e=this.KAi)||e.skipAd(t)}},this.Td=t=>{for(const i of t.od.Jc.ec)i.Vo();t.od.Vo()},this.o9t=t=>{const i=this.YAi(t.Int);var e;i&&(null==(e=this.KAi)||e.beginAd(i))},this.$Ai=t=>{const i=this.YAi(t.Int);var e;i&&(null==(e=this.KAi)||e.endAd(i))},this.tbi=t=>{const i=this.YAi(t.Int);var e;i&&(null==(e=this.KAi)||e.updateAdProgress(i,.25))},this.ibi=t=>{const i=this.YAi(t.Int);var e;i&&(null==(e=this.KAi)||e.updateAdProgress(i,.5))},this.ebi=t=>{const i=this.YAi(t.Int);var e;i&&(null==(e=this.KAi)||e.updateAdProgress(i,.75))},this.bwi=t=>{const i=this.YAi(t.Int);var e;i&&(null==(e=this.KAi)||e.updateAdProgress(i,1))},this.oa=t,this.Cyi=i,this.X0t=new Stt,this.X0t.wn("xnt",this.jd),this.X0t.wn("Pnt",this.Td),this.qAi=e,this.WAi=s,t.wn("timeupdate",this.jAi),this.Cyi.wn("oAi",this.QAi),null==(n=this.oa.Jc)||n.Tnt(ru.UPLYNK,this.JAi)}};r(),r(),r();var ktt=function(t){return t[t.NOT_AVAILABLE=-1]="NOT_AVAILABLE",t[t.NOT_APPLICABLE=0]="NOT_APPLICABLE",t[t.G=1]="G",t[t.PG=2]="PG",t[t.PG_13=3]="PG_13",t[t.R=4]="R",t[t.NC_17=5]="NC_17",t[t.X=6]="X",t[t.NOT_RATED=7]="NOT_RATED",t}({}),Ett=function(t){return t[t.NOT_AVAILABLE=-1]="NOT_AVAILABLE",t[t.NOT_APPLICABLE=0]="NOT_APPLICABLE",t[t.TV_Y=1]="TV_Y",t[t.TV_Y7=2]="TV_Y7",t[t.TV_G=3]="TV_G",t[t.TV_PG=4]="TV_PG",t[t.TV_14=5]="TV_14",t[t.TV_MA=6]="TV_MA",t[t.NOT_RATED=7]="NOT_RATED",t}({}),Ptt=class t{static sbi(i,e,s){const n=new Vp(i.rating_flags);return new t(e,s,i.duration,Boolean(i.audio_only),i.boundary_details,Boolean(i.error),i.tv_rating,i.max_slice,i.thumb_prefix,i.slice_dur,i.movie_rating,i.owner,i.meta,i.rates,i.thumbs,i.poster_url,i.default_poster_url,i.desc,n.Oy(1),n.Oy(2),n.Oy(4),n.Oy(8),i.external_id,Boolean(i.is_ad),i.asset)}get Ca(){return this.hu||(this.hu=function(t){return{startTime:t.EO,endTime:t.PO,duration:t.ct,audioOnly:t.nbi,boundaryDetails:t.rbi,error:t.lt,tvRating:t.hbi,maxSlice:t.obi,thumbPrefix:t.abi,sliceDuration:t.ubi,movieRating:t.cbi,ownerId:t.dbi,metadata:t.DU,rates:t.lbi,thumbnailResolutions:t.fbi,posterUrl:t.vbi,defaultPosterUrl:t._bi,description:t.dB,hasAdultLanguage:t.gbi,hasSexualSituations:t.pbi,hasViolence:t.mbi,hasDrugSituations:t.wbi,externalId:t.ybi,isAd:t.Abi,assetId:t.bbi}}(this)),this.hu}constructor(t,i,e,s,n,r,h,o,a,u,c,d,l,f,v,_,g,p,m,w,y,A,b,S,T){this.EO=void 0,this.PO=void 0,this.ct=void 0,this.nbi=void 0,this.rbi=void 0,this.lt=void 0,this.hbi=void 0,this.obi=void 0,this.abi=void 0,this.ubi=void 0,this.cbi=void 0,this.dbi=void 0,this.DU=void 0,this.lbi=void 0,this.fbi=void 0,this.vbi=void 0,this._bi=void 0,this.dB=void 0,this.gbi=void 0,this.pbi=void 0,this.mbi=void 0,this.wbi=void 0,this.ybi=void 0,this.Abi=void 0,this.bbi=void 0,this.hu=void 0,this.EO=t,this.PO=i,this.ct=e,this.nbi=s,this.rbi=n,this.lt=r,this.hbi=h,this.obi=o,this.abi=a,this.ubi=u,this.cbi=c,this.dbi=d,this.DU=l,this.lbi=f,this.fbi=v,this.vbi=_,this._bi=g,this.dB=p,this.gbi=m,this.pbi=w,this.mbi=y,this.wbi=A,this.ybi=b,this.Abi=S,this.bbi=T}};var xtt=$h({duration:xt,offset:xt}),Itt=$h({c3:xtt}),Rtt=$h({c7:xtt}),Ctt=$h({halftime:xtt}),Dtt=lI(cI(Ett)),Btt=lI(cI(ktt)),Ntt=$h({width:Fs(Zh,xt),prefix:hi,bw:xt,bh:xt,height:Fs(Zh,xt)}),Mtt=$h({audio_only:xt,boundary_details:Fs(Zh,ln(Fs(Itt,Rtt,Ctt))),error:xt,tv_rating:Dtt,max_slice:xt,thumb_prefix:hi,slice_dur:xt,movie_rating:Btt,owner:hi,meta:Ns,rates:ln(xt),thumbs:ln(Ntt),poster_url:hi,duration:xt,default_poster_url:hi,desc:hi,rating_flags:xt,external_id:hi,is_ad:xt,asset:hi}),Ltt=class{async RSt(t,i,e,s){const n=function(t,i,e){if(I9.qH(i))return[Ott(t,i,e)];if(ln(I9).qH(i))return i.map(i=>Ott(t,i,e));if(R9.qH(i)){return(ul(i.externalId)?i.externalId:[i.externalId]).map(s=>Ott(t,"ext/"+i.userId+"/"+s,e))}throw new g("Invalid asset id")}(t,i,s),r=n.map(t=>$i(()=>this.hAi(t),e));return(await Promise.all(r)).filter(it)}async hAi(t){const i=this.nV.lk({Uk:X.GET,Yu:t,dk:M.DT}),e=await i,s=await e.ck();return Mtt.qH(s)||Mtt.GH(s,"AssetInfoResponse"),s}constructor(t){this.nV=void 0,this.nV=t}};function Ott(t,i,e){return e?t+"/player/assetinfo/"+i+".json?pbs="+e:t+"/player/assetinfo/"+i+".json"}r(),r();var Ftt=class extends Oi{xa(){return new Utt(this.pd.Ca)}constructor(t){super("Sbi"),this.pd=void 0,this.pd=t}},Utt=class extends wp{constructor(t){super("removeasset"),this.asset=void 0,this.asset=t}};r();var Vtt=class extends Oi{xa(){return new Htt(this.pd.Ca)}constructor(t){super("Tbi"),this.pd=void 0,this.pd=t}},Htt=class extends wp{constructor(t){super("addasset"),this.asset=void 0,this.asset=t}},Wtt=class extends C3{qyi(t,i){let e,s=0;for(const n of t){e=s+n.duration;for(const t of i)s<=t.EO&&t.EOthis.So(new Gtt(t)))}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}xa(){let t;const i=this,e={get ads(){return i.Pyi.Ca},get assets(){return i.xyi.Ca},addEventListener(i,e){t.wn(i,e)},removeEventListener(i,e){t.mn(i,e)}};return t=new ws(i,e),e}constructor(t,i,e){super(),this.hu=void 0,this.Pyi=void 0,this.xyi=void 0,this.Cyi=void 0,this.Pyi=t,this.xyi=i,this.Cyi=e,e.wn("oAi",this.Rs),e.wn("aAi",this.Rs)}},Qtt=class{Pbi(t,i){const e=new C9(t.SP),s=new U9(t.SP),n=function(t){if(t.uplynk&&it(t.uplynk.defaultSkipOffset))return function(t){return ho(t)?t:-1}(t.uplynk.defaultSkipOffset);return-1}(i),r=function(t){var i,e;const s=null!=(e=null==(i=t.uplynk)?void 0:i.onSeekOverAd)?e:void 0;return function(t){if(!t)return"play-none";switch(t.toLowerCase()){case"play-all":return"play-all";case"play-none":default:return"play-none";case"play-last":return"play-last"}}(s)}(i),h=new z9(s,t),o=new G9(e,i),a=new Ttt(t,h,n,r),u=new Ltt(t.SP),c=new Wtt,d=new jtt(a,c,h);return new w9(t,h,o,a,d,u,c)}};VF(function(t){return class extends t{Ryi(t){super.Ta(t)}Dyi(t,i){return super.Xnt(t,i)}$yi(t){super.OP(t)}HP(){var t;return null!=(t=this.xbi.lt)?t:super.HP()}qP(){var t;return null!=(t=this.xbi.WP)?t:super.qP()}OP(t,i){this.xbi.OP(t)}Ta(t){this.xbi.Ta(t)}Xnt(t,i){return this.xbi.Xnt(t,i)}xa(){const t=this.xbi.Ca;return po(super.xa(),{get uplynk(){return t}})}kn(){this.xbi.kn(),super.kn()}constructor(t,i){super(t,i),this.xbi=void 0,this.xbi=(new Qtt).Pbi(this,i)}}},zo.rnt),r(),r(),r(),r();var bu=function(t){return t.CREATIVE_VIEW="creativeView",t.START="start",t.FIRST_QUARTILE="firstQuartile",t.MID_POINT="midpoint",t.THIRD_QUARTILE="thirdQuartile",t.COMPLETE="complete",t.MUTE="mute",t.UNMUTE="unmute",t.PAUSE="pause",t.REWIND="rewind",t.RESUME="resume",t.FULL_SCREEN="fullscreen",t.EXIT_FULL_SCREEN="exitFullscreen",t.EXPAND="expand",t.COLLAPSE="collapse",t.ACCEPT_INVITATION_LINEAR="acceptInvitationLinear",t.ACCEPT_INVITATION="acceptInvitation",t.CLOSE_LINEAR="closeLinear",t.CLOSE="close",t.SKIP="skip",t.SKIP_SHOWN="skipShown",t.PROGRESS="progress",t.ENGAGED_VIEW="engagedView",t.IMPRESSION="impression",t.ERROR="error",t}({});r();var Ktt=class extends Ps{xa(){return _a(this)}get MZt(){return mt.W0t}get EO(){return this.OO}get NKt(){return this.mYt}constructor(t,i,e,s){super(t,i),this.mYt=void 0,this.OO=void 0,this.mYt=s,this.OO=e}};r();var Ytt=class extends Le{get SOt(){return this.Ibi}get MZt(){return mt.W0t}constructor(t,i,e){if(super(i),this.Ibi=void 0,this.J3t=t,this.Z3t=t,e){const t=new Date(e);Zf(t)&&(this.Ibi=t)}}},Jtt=class{OI(){this.oa.wn(Do.TM,this.IL),this.oa.wn(d.jw,this.oNt),this.oa.wn(d.uo,this.IXt),this.oa.wn(d.$w,this.Je),this.oa.wn(d.Bw,this.Eh),this.oa.wn(d._y,this.bd),this.oa.wn(d.gy,this.R2t),this.oa.wn(Ku.MODE_CHANGE,this.Rbi)}MI(){this.oa.mn(Do.TM,this.IL),this.oa.mn(d.jw,this.oNt),this.oa.mn(d.uo,this.IXt),this.oa.mn(d.$w,this.Je),this.oa.mn(d.Bw,this.Eh),this.oa.mn(d._y,this.bd),this.oa.mn(d.gy,this.R2t),this.oa.mn(Ku.MODE_CHANGE,this.Rbi)}get Cbi(){return this.Dbi}get mnt(){const t=this.Cbi;if(!t)return[];const i=[],e=this.Bbi();for(const s of t.Jc)e>=s.EO&&this.NNt<=s.EO+s.ct&&i.push(s);return i}Bbi(){return this.oa.LP()-this.Nbi}Mbi(){if(this.Lbi)return;if(this.oa.Nd()!==1/0)return void(0===this.Obi.length&&(this.Lbi=this.Fbi()));const t=()=>{var t;null==(t=this.Ubi)||t.zg(),this.Ubi=void 0,this.Lbi=void 0};this.Ubi=new at,this.Lbi=this.Vbi(this.Ubi.Yg).catch(this.e8).then(t,t)}async Hbi(){const t=_.min(1e3*2**this.Wbi,3e4);try{var i;await Er(t,null==(i=this.Ubi)?void 0:i.Yg),this.Wbi++}catch(t){if(D(t))return void(this.Wbi=0)}this.Mbi()}async Vbi(t){for(;ii(t),!this.oa.hx;){const i=zd.Mg()-this.qbi;if(i>1e4)await this.Fbi(t),this.qbi=zd.Mg(),this.Wbi=0;else{const e=1e4-i;await Er(e,t)}}}zbi(t){const i=t.SOt;if(i&&this.oa.CP&&0===this.Nbi&&!this.Gbi&&0!==_.floor(this.oa.Tx().start(0))){const e=(this.oa.CP.getTime()-i.getTime())/1e3,s=this.oa.LP()-t._Ot;this.Nbi=s-e}}async Fbi(t){try{const i=await this.oa.SP.lk({Yu:this.Xbi}),e=await i.FT(t);if(0===e.avails.length)return void(0!==this.Obi.length&&(this.Obi=[]));if(e.avails.length===this.Obi.length&&e.avails[0].startTimeInSeconds===this.Obi[0]._Ot)return void this.zbi(this.Obi[0]);const s=[];for(const t of e.avails){const i=new Ytt(t.durationInSeconds,t.startTimeInSeconds,t.availProgramDateTime);for(const e of t.ads){const t=new Ktt(i,bi.hZt,e.startTimeInSeconds,e.trackingEvents);t.u4t(e.adId,e.width,e.height,e.durationInSeconds,[],e.skipoffset),i.e4t(t)}s.push(i),this.zbi(i)}this.Obi=xe(s,(t,i)=>t._Ot-i._Ot)}catch(t){throw sa(t),new m("Failed to poll MediaTailor tracking events")}}jbi(){var t;null==(t=this.Ubi)||t.Zg(),this.Ubi=void 0,this.Lbi=void 0,this.qbi=-1/0}Qbi(){if(0===this.Obi.length)return;const t=this.Obi[this.Obi.length-1],i=this.Bbi();if(t._Ot+t.p0tthis.NNt)){var s;if(this.Cbi===t)return;return this.Dbi=t,void(null==(s=this.oa.Jc)||s.So(new aU(this.Dbi)))}}var n;if(this.Dbi)null==(n=this.oa.Jc)||n.So(new Fa(this.Dbi)),this.Dbi=void 0}}Kbi(){const t=this.mnt;if(0===t.length)return;let i=[];for(const e of t){const t=e.NKt.filter(t=>pi(this.Ybi,t.eventType));i=i.concat(t)}for(const t of i)this.Jbi(t.startTimeInSeconds)&&(t.eventType===bu.COMPLETE&&this.Zbi(bu.ENGAGED_VIEW),this.$bi(t))}tSi(t,i){return i.NKt.filter(i=>Ih(i.eventType,t))[0]}Zbi(t){const i=this.mnt;if(0===i.length)return;const e=this.tSi(t,i[0]);e&&this.$bi(e)}$bi(t){this.zgi(t.eventType);for(const i of t.beaconUrls){const t={Uk:X.GET,Yu:i,zT:"",dk:M.DT};0,Wr(this.iSi(t))}}zgi(t){let i;const e=this.mnt;switch(t){case bu.START:i=new dc(e[e.length-1],this.oa.LP());break;case bu.COMPLETE:i=new bc(e[0],this.oa.LP());break;case bu.FIRST_QUARTILE:i=new _s(e[0],this.oa.LP());break;case bu.MID_POINT:i=new ks(e[0],this.oa.LP());break;case bu.THIRD_QUARTILE:i=new oe(e[0],this.oa.LP())}var s;void 0!==i&&(null==(s=this.oa.Jc)||s.So(i))}async iSi(t){const i=await this.oa.SP.lk(t);i.hk}Jbi(t){const i=this.Bbi();return t>=this.NNt&&t{this.Mbi()},this.IXt=()=>{this.Zbi(bu.RESUME)},this.oNt=()=>{this.jbi(),this.Zbi(bu.PAUSE)},this.Je=()=>{this.jbi(),this.NNt=-1},this.Eh=()=>{this.jbi()},this.bd=()=>{-1===this.NNt&&(this.NNt=this.Bbi()),this.Qbi(),this.Kbi(),this.NNt=this.Bbi()},this.R2t=()=>{if(this.Lwi!==this.oa.$P){this.Lwi=this.oa.$P;const t=this.Lwi?bu.MUTE:bu.UNMUTE;this.Zbi(t)}},this.Rbi=()=>{if(this.mK!==this.oa.ds()){this.mK=this.oa.ds();const t=this.mK?bu.FULL_SCREEN:bu.EXIT_FULL_SCREEN;this.Zbi(t)}},this.e8=t=>{D(t)||(this.Zbi(bu.ERROR),Wr(this.Hbi()))},this.Ybi=[bu.START,bu.FIRST_QUARTILE,bu.MID_POINT,bu.THIRD_QUARTILE,bu.COMPLETE,bu.IMPRESSION,bu.CREATIVE_VIEW],this.oa=t,this.Xbi=i,this.Gbi=e,this.OI()}};VF(function(t){return class extends t{Ta(t){return this.eSi&&(this.eSi.kn(),this.eSi=void 0,this.pEt()),super.Ta(t)}async Xnt(t,i){if(!t||!function(t){return t.sources.some(t=>t.integration===GT.MEDIATAILOR)}(t))return super.Xnt(t,i);try{const e=await this.sSi(t,i);this.nSi=new x2(this),await super.Xnt(e,i)}catch(t){this.qq(new Ga(Vo.MANIFEST_LOAD_ERROR,t.message,t))}}vx(t){var i;(null==(i=this.nSi)?void 0:i.inAdBreak)||super.vx(t)}OP(t,i){var e;(null==(e=this.eSi)?void 0:e.Cbi)||super.OP(t,i)}HP(){var t;return null!=(t=this.JW)?t:super.HP()}qP(){var t;return null!=(t=this.ZW)?t:super.qP()}qq(t){this.JW=P(t),this.ZW=t,this.So(new Pi(t))}pEt(){this.JW=void 0,this.ZW=void 0}async sSi(t,i){const e=[];for(const s of t.sources){if(!ek(s)){e.push(s);continue}const t=s;if(!t.src){e.push(s);continue}const n=await this.rSi(t,i);ii(i);const r=Mo({},t,{integration:void 0,src:n});e.push(r)}const s=Ua(t);return s.sources=e,s}async rSi(t,i){const e=t.src||"",s=e.match(/.+?(?=\/v1\/)/);if(!s)throw new m("Could not find MediaTailor session initialization url");const n=s[0],r=Ho(e,"?ads."),h=r?{Yu:e,dk:M.DT}:{Yu:e,Uk:X.POST,zT:JSON.stringify({adsParams:t.adsParams}),dk:M.DT},o=await $i(()=>this.hSi(h,i),i);let a;try{if(a=n+o.manifestUrl,!r){const t=n+o.trackingUrl,i=function(t){return!!t&&/\bmpd\b/i.test(t)}(a);this.eSi=new Jtt(this,t,i)}}catch(t){throw new m("Something went wrong parsing the MediaTailor session initialization response")}return a}async hSi(t,i){try{const e=await this.SP.lk(t);return await e.FT(i)}catch(t){throw sa(t),new m("Failed to initialize MediaTailor session manifest")}}kn(){var t;this.eSi&&(this.eSi.kn(),this.eSi=void 0),this.pEt(),null==(t=this.nSi)||t.destroy(),this.nSi=void 0,super.kn()}constructor(t,i){super(t,i),this.eSi=void 0,this.JW=void 0,this.ZW=void 0,this.nSi=void 0}}},zo.hnt),r(),r(),r(),r(),r();var Da=function(t){return t[t.oSi=0]="oSi",t[t.TM=1]="TM",t[t.Gz=2]="Gz",t[t.aSi=3]="aSi",t[t.uSi=4]="uSi",t[t.cSi=5]="cSi",t[t.ma=6]="ma",t}({});r();var Ztt=class extends Ne{get XI(){}get Rt(){return this.We}set Rt(t){this.wO(t)}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=fo(this)}get o(){return String(this.vu.componentTag)||"hbbtvaudiotrack"}get Lt(){return this.b5}get Th(){return this.pO}get bs(){return""}get Xk(){return this.Rt?"enabled":"disabled"}set Xk(t){this.wO("enabled"===t)}get KI(){return this.dO}get YI(){}set YI(t){}get jI(){return this.gO}wO(t){this.We=t,t?this.sMt.dSi(this.vu):this.sMt.lSi(this.vu)}constructor(t,i,e,s,n=!1){super(),this.gO=ki(),this.dO=new Uk,this.vu=void 0,this.pO=void 0,this.b5=void 0,this.hu=void 0,this.sMt=void 0,this.We=void 0,this.vu=t,this.pO=i,this.b5=e,this.We=n,this.sMt=s}};r(),r(),r();var $tt=function(t){return t.qm="urn:dvb:casystemid:19219",t.zm="urn:dvb:casystemid:19156",t}({}),tit=function(t){return t.qm="application/vnd.ms-playready.initiator+xml",t.zm="application/widevine+xml",t}({});function iit(t,i,e){switch(t){case"urn:dvb:casystemid:19219":return function(t){return''+(null!=t?t:"")+""}(i);case"urn:dvb:casystemid:19156":if(!e)throw new m("Content URL is needed for Widevine license request");return function(t,i){return''+n0(null!=i?i:"")+""+n0(null!=t?t:"")+""}(i,e);default:throw new m("DRM key system is not supported")}}var eit=class extends PL{fSi(t){this.vSi(),this.Tu=t}async _Si(t){if(!t.aq.length)return void this.vSi();if(!this.Tu)throw new m("The OIPF DRM agent has to be attached to the DOM");let i;this.gSi||(this.gSi=h.createElement("object"),this.gSi.type="application/oipfDrmAgent",this.Tu.appendChild(this.gSi),this.gSi.onDRMMessageResult=this.pSi,this.gSi.onDRMRightsError=this.mSi,this.wSi=h.createElement("object"),this.wSi.type="application/oipfCapabilities",this.Tu.appendChild(this.wSi));for(const e of t.aq){let s,n,r;if(e.kS===Zg)s=$tt.qm,n=tit.qm,r=iit($tt.qm,e.NW);else{if(e.kS!==xi)continue;s=$tt.zm,n=tit.zm,r=iit($tt.zm,e.NW,t.iR)}try{return await this._et(n,r,s),void this.So(new un)}catch(t){i=t}}i&&this.So(new wL(i))}zg(){return this.ySi=void 0,this.Tu=void 0,super.zg()}_et(t,i,e){var s,n;return this.ySi=new pa,this.ASi=null==(n=this.gSi)||null==(s=n.sendDRMMessage)?void 0:s.call(n,t,i,e),this.ASi||null==this.ySi.jy||this.ySi.jy.call(this.ySi,new fs(Vo.CONTENT_PROTECTION_INTERNAL_ERROR,"No DRM message returned by OIPF DRM agent")),this.ySi.Qy}bSi(t){switch(t){case 5:return Vo.CONTENT_PROTECTION_NOT_SUPPORTED;case 2:case 1:case 3:case 4:case 6:return Vo.CONTENT_PROTECTION_INTERNAL_ERROR;default:return Vo.CONTENT_PROTECTION_ERROR}}SSi(t){switch(t){case 2:return"The DRM agent was unable to complete the request";case 3:return"The specified MIME type is unknown for the specified DRM system";case 4:return"User consent is needed for that action";case 5:return"The specified DRM System is unknown";case 6:return"The license message has the wrong format";default:return"Unspecified error occurred"}}TSi(t){return 0===t?Vo.CONTENT_PROTECTION_LICENSE_ERROR:1===t?Vo.CONTENT_PROTECTION_LICENSE_INVALID:Vo.CONTENT_PROTECTION_ERROR}kSi(t){switch(t){case 0:return"No license, consumption of the content is blocked";case 1:return"Invalid license, consumption of the content is blocked";case 2:return"Valid license, consumption of the content is unblocked";default:return"Unknown error occurred"}}vSi(){this.gSi&&(os(this.gSi),this.gSi=void 0),this.wSi&&(os(this.wSi),this.wSi=void 0)}async b8(t,i,e){}constructor(...t){super(...t),this.gSi=void 0,this.wSi=void 0,this.Tu=void 0,this.ASi=void 0,this.ySi=void 0,this.pSi=(t,i,e)=>{var s,n,r,h;if(0===e)return void(null==(h=this.ySi)||null==(r=h.Xy)||r.call(h,t));const o=this.bSi(e),a=this.SSi(e),u=new fs(o,a);null==(n=this.ySi)||null==(s=n.jy)||s.call(n,u)},this.mSi=(t,i,e,s)=>{const n=this.TSi(t),r=this.kSi(t),h=new fs(n,r);this.So(new wL(h))}}};r();var sit=class{get Sx(){return ve.tL(0,this.TL.ct)}get mx(){return q.lz}set mx(t){}get Cd(){return this.YS}TZ(t){return!1}EZ(t){return Xr.resolve(void 0)}async _Si(t){await this.PZ._Si(this.YS)}zg(){return Xr.resolve(void 0)}constructor(t,i,e){this.YS=void 0,this.TL=void 0,this.PZ=void 0,this.YS=t,this.TL=i,this.PZ=e}},nit=class extends Ne{get IP(){return ve.iL()}get CP(){}get nq(){}get Wu(){return this.sc}get Sx(){var t,i;return null!=(i=null==(t=this.iq)?void 0:t.Sx)?i:ve.iL()}get kx(){return this.Sz}get a5(){return!1}get KP(){return!1}get CL(){return Mo({},wB)}get lt(){return this.JW}get n5(){return!1}get Ma(){return this.ha}get R9(){return!0}get Y4(){return!1}get Vx(){return!0}set Vx(t){}get Ql(){return this.Dz}get nt(){return this.B7}get i7(){return this.yz}get mq(){return this.ea}B9(t){this.PZ.fSi(t),this.eet.B9(t)}QZ(t){for(const i of t)if(i.Km===Zr.mV)return i}async Un(t){if(this.iq)throw new m("Already loaded a media source");if(t.Km===Zr.mV)return this.iq=new sit(t,this,this.PZ),await this.iq._Si(t),this.iq;throw new m("Unsupported media source configuration for HbbTV")}async ESi(t){await this.PSi()}async Gx(){await this.PSi()}KW(t){}async hr(){this.iq=void 0,this.xSi=void 0}async C8(){throw new g("Not supported")}async zg(){await this.hr(),this.Gl.kn(),this.B7.kn(),this.eet.kn(),this.net.kn(),this.PZ.mn(Du,this.Rs),await this.PZ.zg()}be(){this.yz=!0,this.eet.be()}we(){this.yz=!1,this.eet.we()}vq(){return!1}gq(t,i,e,s,n){throw new m("Adding native sideloaded text tracks is not supported on HbbTV")}x9(){}I9(){}D9(){}ZP(){return{iO:0,eO:0,sO:0}}Yx(){}wq(t){throw new m("Adding custom text tracks is not supported on HbbTV")}Wx(){}tI(t,i,e,s,n,r,h,o,a){const u=new gM(t,i,e,s,n,r,h,a,o);return this.Gl.tt(u),this.N7.tt(u),u}Aq(){for(const t of this.Gl.II.slice())t.kn();this.Gl.hr()}iV(t){this.Gl.it(t),this.N7.it(t)}ISi(){const t=h.getElementsByTagName("object");for(let i=0;i{var t,i,e,s;(null==(t=this.CSi)?void 0:t.playState)&&((null==(i=this.xSi)?void 0:i.Qy)||2!==this.CSi.playState||this.PSi().catch(Ct),3===this.CSi.playState&&(null==(s=this.xSi)||null==(e=s.Xy)||e.call(s,String(this.CSi.playState)),this.xSi=void 0))},this.PZ=new eit(this),this.PZ.wn(Du,this.Rs),this.B7=new Yu([this.Gl]),this.N7=new hu(this),this.eet=new XL,this.net=new vF(this.eet.xe,this.Wu,this.nt,this.Ql,this.Ma,this.mq),this.CSi=this.ISi(),this.PSi().catch(Ct)}},rit=class extends nit{get $W(){}get ht(){return this.YL}get rt(){return this.$L}get ux(){return this.Ez}set ux(t){this.Ez=t,this.hx||this.DSi.play(t)}get $P(){return this.DSi.muted}set $P(t){this.DSi.muted=t}get Mx(){var t,i;return(null!=(i=null!=(t=this.DSi.volume)?t:null==this.DSi.getVolume?void 0:this.DSi.getVolume.call(this.DSi))?i:100)/100}set Mx(t){null==this.DSi.setVolume||this.DSi.setVolume.call(this.DSi,100*t)}get MP(){return this.DSi.playPosition?this.DSi.playPosition/1e3:0}get ct(){return!this.DSi.playTime||this.DSi.playTime<0?1/0:this.DSi.playTime/1e3}get UP(){return this.DSi.playState===Da.cSi}get Mi(){return this.DSi.offsetHeight*zd.Zs.fp}get Ti(){return this.DSi.offsetWidth*zd.Zs.fp}get hx(){return this.DSi.playState===Da.Gz}get _x(){return ve.iL()}get Ax(){return this.t5}get Rx(){return 0}get Bx(){return 0}B9(t){super.B9(t),t.appendChild(this.DSi)}async Un(t){if(t.Km===Zr.mV){const i=await super.Un(t);return await this.ESi(t),this.DSi.onPlayStateChange=this.BSi,i}throw new m("Unsupported media source configuration for HbbTV")}async ESi(t){this.DSi.type=_u(t.iR),this.DSi.data=t.iR,await super.ESi(t)}async Gx(){await super.Gx(),this.DSi.play(this.Ez),this.So(new Tc(this.MP))}zx(){this.DSi.play(0),this.So(new hl(this.MP))}My(t,i,e){this.DSi.seek(1e3*t),this.Sz=!0,this.So(new F(this.MP))}async hr(){void 0!==this.iq&&this.DSi.stop(),this.NSi&&(zd.vm(this.NSi),this.NSi=void 0),await super.hr(),Yd(this.DSi),this.DSi.data&&this.DSi.removeAttribute("data"),this.YL.hr(),this.$L.hr()}async zg(){await super.zg(),os(this.DSi)}be(){super.be(),this.DSi.style.display="block"}we(){super.we(),this.DSi.style.display="none"}dSi(t){const i=this.MSi(t);if(!i)throw new m("Selected track does not exist on HbbTV");null==this.DSi.selectComponent||this.DSi.selectComponent.call(this.DSi,i)}lSi(t){const i=this.MSi(t);if(!i)throw new m("Selected track does not exist on HbbTV");null==this.DSi.unselectComponent||this.DSi.unselectComponent.call(this.DSi,i)}MSi(t){var i;const e=null!=(i=null==this.DSi.getComponents?void 0:this.DSi.getComponents.call(this.DSi,t.type))?i:this.LSi();return this.OSi(e,t)}FSi(t){var i;const e=null!=(i=null==this.DSi.getCurrentActiveComponents?void 0:this.DSi.getCurrentActiveComponents.call(this.DSi,1))?i:this.LSi();this.YL.hr();for(let i=0;i{}}}USi(t,i){return void 0!==this.OSi(t,i)}OSi(t,i){for(let e=0;e{if(!this.DSi.playState)return;this.EV=this.t5,this.qSi=this.zSi,this.zSi=this.DSi.playState;const t=this.ct;switch(t!==this.GSi&&(this.So(new Rs(t)),this.GSi=t),this.NSi&&this.zSi!==Da.TM&&(zd.vm(this.NSi),this.NSi=void 0),this.zSi){case Da.aSi:this.t5=mh.VL;break;case Da.uSi:if(this.qSi===Da.aSi){var i;const t=null!=(i=null==this.DSi.getComponents?void 0:this.DSi.getComponents.call(this.DSi,1))?i:this.LSi();var e;const s=null!=(e=null==this.DSi.getComponents?void 0:this.DSi.getComponents.call(this.DSi,0))?e:this.LSi();if(0===t.length&&0===s.length)break;this.FSi(t),this.VSi(s)}this.t5=mh.Qn;break;case Da.TM:this.Sz&&(this.Sz=!1,this.So(new Es(this.MP))),this.So(new ce(this.MP)),this.t5=mh.WL,this.NSi=zd.fm(this.XSi,250);break;case Da.ma:this.t5=mh.VL,this.So(new eu(new Nk(this.WSi(this.DSi.error))));break;case Da.cSi:this.So(new At(this.MP));case Da.Gz:case Da.oSi:}this.t5!==this.EV&&this.So(new ou(this.MP,this.t5))},this.XSi=()=>{this.So(new Si(this.MP,void 0))}}};r();var hit=class extends nit{get $W(){return this._T}get ht(){return this.YL}get rt(){return this.$L}get ux(){return this._T.playbackRate}set ux(t){this._T.playbackRate=t}get $P(){return this._T.muted}set $P(t){this._T.muted=t}get Mx(){return this._T.volume}set Mx(t){this._T.volume=t}get MP(){return this._T.currentTime}get ct(){return this._T.duration}get UP(){return this._T.ended}get Mi(){return this._T.offsetHeight*zd.Zs.fp}get Ti(){return this._T.offsetWidth*zd.Zs.fp}get hx(){return this._T.paused}get _x(){return ve.jn(this._T.played)}get Ax(){return this.Q8.Ax}get Rx(){return this._T.videoHeight}get Bx(){return this._T.videoWidth}B9(t){super.B9(t),t.appendChild(this._T)}async Un(t){if(t.Km===Zr.mV){const i=await super.Un(t);return await this.ESi(t),i}throw new m("Unsupported media source configuration for HbbTV")}async ESi(t){switch(t.cq){case Xh.aR:case Xh.uR:this._T.setAttribute("crossorigin",t.cq);break;case Xh.Lk:default:this._T.removeAttribute("crossorigin")}void 0!==t.mx?this._T.preload=t.mx:this._T.preload=q.TW,void 0!==t.dq?this._T.title=t.dq:Fl(this._T);const i=this.ux;this._T.src=t.iR,this.ux=i,await super.ESi(t)}async Gx(){await super.Gx(),await this._T.play()}zx(){this._T.pause()}My(t,i,e){i&&this._T.fastSeek?this._T.fastSeek(t):this._T.currentTime=t,this.Sz=!0,this.So(new F(this.MP))}async hr(){await super.hr(),Yd(this._T),this._T.src&&this._T.removeAttribute("src"),this.YL.hr(),this.$L.hr()}async zg(){await super.zg(),this.d7.zg(),this.Q8.zg(),this.o9(),this.Tq(),os(this._T)}be(){super.be(),this._T.style.display="block",this._T.style.height="100%",this._T.style.width="100%"}we(){super.we(),this._T.style.display="none"}n9(){this.$W.addEventListener("play",this.LV),this.$W.addEventListener("pause",this.OV),this.$W.addEventListener("timeupdate",this.Nc),this.$W.addEventListener("progress",this.jSi),this.$W.addEventListener("loadstart",this.As),this.$W.addEventListener("ended",this.Ec),this.$W.addEventListener("ratechange",this.QSi),this.$W.addEventListener("volumechange",this.DXt),this.$W.addEventListener("durationchange",this.xXt),this.$W.addEventListener("loadedmetadata",this.KSi),this.$W.addEventListener("emptied",this.YSi),this.$W.addEventListener("seeked",this.JSi),this.$W.addEventListener("seeking",this.ZSi),this.$W.addEventListener("error",this.$Si),vp()&&this.$W.addEventListener("encrypted",this.D8)}o9(){this.$W.removeEventListener("play",this.LV),this.$W.removeEventListener("pause",this.OV),this.$W.removeEventListener("timeupdate",this.Nc),this.$W.removeEventListener("progress",this.jSi),this.$W.removeEventListener("loadstart",this.As),this.$W.removeEventListener("ended",this.Ec),this.$W.removeEventListener("ratechange",this.QSi),this.$W.removeEventListener("volumechange",this.DXt),this.$W.removeEventListener("durationchange",this.xXt),this.$W.removeEventListener("loadedmetadata",this.KSi),this.$W.removeEventListener("emptied",this.YSi),this.$W.removeEventListener("seeked",this.JSi),this.$W.removeEventListener("seeking",this.ZSi),this.$W.removeEventListener("error",this.$Si),this.$W.removeEventListener("encrypted",this.D8)}qq(t){this.JW=t,this.So(new eu(this.JW))}Lq(){const t=this._T.audioTracks,i=this._T.videoTracks;t&&(t.addEventListener("addtrack",this.tTi),t.addEventListener("removetrack",this.iTi),t.addEventListener("change",this.eTi)),i&&(i.addEventListener("addtrack",this.sTi),i.addEventListener("removetrack",this.nTi),i.addEventListener("change",this.rTi))}Tq(){const t=this._T.audioTracks,i=this._T.videoTracks;t&&(t.removeEventListener("addtrack",this.tTi),t.removeEventListener("removetrack",this.iTi),t.removeEventListener("change",this.eTi)),i&&(i.removeEventListener("addtrack",this.sTi),i.removeEventListener("removetrack",this.nTi),i.removeEventListener("change",this.rTi))}dh(t){for(let i=0;i{this.So(new Tc(this.MP))},this.OV=()=>{this.So(new hl(this.MP))},this.Nc=()=>{const t=this.MP,i=this.kx,e=void 0!==this.hTi,s=e&&this.hTi!==t;(i||!e||s)&&(this.So(new Si(t,void 0)),this.hTi=t)},this.jSi=()=>{this.So(new H(this.MP))},this.As=()=>{this.So(new Pt)},this.Ec=()=>{this.So(new At(this.MP))},this.QSi=()=>{this.So(new aa(this.MP,this.ux))},this.DXt=()=>{this.So(new Ze(this.MP,this.Mx))},this.xXt=()=>{this.So(new Rs(this.ct))},this.KSi=()=>{},this.YSi=()=>{},this.JSi=()=>{this.Sz&&(this.Sz=!1),this.So(new Es(this.MP))},this.ZSi=()=>{this.So(new F(this.MP))},this.FV=t=>{this.EV!==t.readyState&&(this.EV=t.readyState,this.So(t))},this.MV=()=>{this.So(new ce(this.MP))},this.$Si=()=>{if(null!==this._T.error){const i=this._T.error;var t;this.qq(new Nk(null!=(t=i.code)?t:Bk.DECODE,i.message||"Error decoding media",void 0,i.msExtendedCode))}},this.D8=t=>{this.So(new Tp(t.initDataType,t.initData||new ArrayBuffer(0)))},this.sTi=t=>{const i=this._T.videoTracks;if(i)for(let t=0;t{const i=[],e=this._T.videoTracks;if(e){for(const t of this.$L.II)ZI(e,t.mO)||i.push(t);for(const t of i)this.$L.it(t)}},this.rTi=t=>{this.dh(this.$L)},this.tTi=t=>{const i=this._T.audioTracks;if(i)for(let t=0;t{const i=[],e=this._T.audioTracks;if(e){for(const t of this.YL.II)ZI(e,t.mO)||i.push(t);for(const t of i)this.YL.it(t)}},this.eTi=t=>{this.dh(this.YL)},this.Q8=new IL(this),this.Q8.wn(Do.wI,this.FV),this.Q8.N8(new YN(this)),this.d7=new iM(this),this.d7.wn(Do.TM,this.MV),this.n9(),this.Lq()}},oit=[d.uo,d.jw,Do.TM,d.$w,d.Zw,d.Bw,d.Rw,d.Pw,d.Ew,d._y,d.Qw,d.Ww,d.Kw,d.gy,d.Jw,d.Lw,d.Nw],ait=class extends Ne{get ht(){return this.TL.ht}get IP(){return this.TL.IP._s()}get BL(){}get CP(){return this.TL.CP}set CP(t){t&&this.TL.KW(t)}get bt(){return this.Ac}get MP(){return this.TL.MP}set MP(t){this.TL.My(t)}get hq(){return this.oq}get ct(){return this.TL.ct}get UP(){return this.TL.UP}get WP(){return this.ZW}get lt(){return this.JW}get zP(){}get jP(){}get KP(){return!1}get Vx(){return this.TL.Vx}set Vx(t){this.TL.Vx=t}get Fx(){return this.Cz}get JP(){return Mo({},{iO:0,eO:0,sO:0,nO:0,rO:0,hO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.TL.ZP())}get $P(){return this.TL.$P}set $P(t){this.TL.$P=t}get sx(){return!0}get hx(){return this.TL.hx}get ux(){return this.TL.ux}set ux(t){this.TL.ux=t}get _x(){return this.TL._x._s()}get mx(){return this.tq}set mx(t){this.tq=t,this.iq&&(this.iq.mx=t)}get Ax(){return this.TL.Ax}get Sx(){return this.TL.Sx._s()}get kx(){return this.TL.kx}get nq(){return this.TL.nq}get nt(){return this.Gl}get Rx(){return this.TL.Rx}get rt(){return this.TL.rt}get Bx(){return this.TL.Bx}get Mx(){return this.TL.Mx}set Mx(t){this.TL.Mx=t}tI(t){return this.TL.wq(t)}jx(){return!1}Hx(){return this.TL.Ma}Wx(){}we(){this.TL.we()}Yx(){this.TL.Yx()}zx(){this.TL.zx()}async Gx(){await this.TL.Gx()}Jx(){throw new m("Recreate media source is not supported on HbbTV")}OP(t,i){this.TL.My(t)}async Ta(t,i,e){var s;ii(e),this.Ac=t;const n={Km:Zr.mV,iR:t.src,qT:t.type,aq:this.uq(t),mx:this.tq,cq:t.crossOrigin,dq:null==(s=i.metadata)?void 0:s.title};this.iq=await this.TL.Un(n),i.textTracks&&this.fq(i.textTracks),Ds(this.nt)}Px(t,i,e,s){return Promise.resolve()}xx(){return Promise.resolve()}be(){this.TL.be()}Qx(){}Kx(){}Aa(){return this.TL.mq}async hr(){this.Ac=void 0,this.JW=void 0,this.ZW=void 0,this.iq=void 0,await this.pq.hr(),this.TL.Aq(),await this.TL.hr()}async kn(){await this.hr(),this.bq.kn(),this.kq.zg(),this.TL.mn(oit,this.Rs),this.TL.mn(Mc.ma,this.Dq),await this.TL.zg(),this.gn.kn(),this.Gl.kn(),await this.pq.kn()}qq(t,i){this.JW||(this.JW=i,this.ZW=t,this.So(new Pi(t)))}fq(t){for(const i of t)void 0!==i.src&&this.pq.eV(i)}uq(t){if(!t.contentProtection)return[];const i=[];return t.contentProtection.widevine&&i.push({kS:xi,NW:t.contentProtection.widevine.licenseAcquisitionURL,Mq:[]}),t.contentProtection.playready&&i.push({kS:Zg,NW:t.contentProtection.playready.licenseAcquisitionURL,Mq:[]}),this.oTi(i,t.contentProtection.preferredKeySystems)}oTi(t,i){if(void 0===i||0===i.length)return t;const e=t=>{const e=i.indexOf(t.kS.$m);return e>=0?e:i.length};return xe(t,(t,i)=>e(t)-e(i))}constructor(t,i,e,s){super(),this.gn=void 0,this.TL=void 0,this.iq=void 0,this.Gl=void 0,this.oq=new To,this.Cz=void 0,this.kq=void 0,this.bq=void 0,this.pq=void 0,this.Ac=void 0,this.JW=void 0,this.ZW=void 0,this.tq=q.lz,this.Dq=t=>{const i=t.lt,e=i.code,s=new Ga(Fk(e),"Something went wrong during HbbTV playback.",i),n=P(s);this.qq(s,n)},this.gn=new Oe(t),this.gn._n(),this.TL=Pf()?new hit(h.createElement(Ci.Bk),this.gn,s):new rit(h.createElement("object"),this.gn,s),this.TL.B9(t),this.TL.wn(oit,this.Rs),this.TL.wn(Mc.ma,this.Dq),this.kq=new dx(this,this.TL),this.bq=new bs(this.kq,!0),this.bq.wn(K,this.Rs),this.pq=new Kh(this.TL,i),this.Gl=new Yu([this.TL.nt,this.pq.Z]),this.Cz=e}};cs(new class{PR(t,i,e,s,n,r,h,o){return new ait(t,e,r,h)}Xq(t,i){var e;return!(!Qt.k_||t.type!==Ba.fR&&!ZT(t.type)&&!$T(t.type))&&!(Pf()&&!(null==(e=t.contentProtection)?void 0:e.useOipfDrmAgent)&&(!t.contentProtection||vp()))}async jq(t){return!!await kT(t,!0)}Qq(){return!1}constructor(){this.Kq=V.vW}});export{Io as a,f as b,r as c,Qt as d,it as e,ul as f,Lu as g,Z as h,os as i,Zd as j,Il as k,fi as l,Rl as m,Dl as n,oa as o,Fl as p,Ul as q,zd as r,Ct as s,ph as t,mu as u,xe as v,ur as w,Qc as x,gu as y,Jr as z,oi as A,pi as B,Yo as C,ii as D,Wr as E,fv as F,vv as G,Sg as H,Mo as I,Ho as J,dp as K,Ne as L,wp as M,d as N,Vo as O,Je as P,oS as Q,po as R,_t as S,aS as T,Zn as U,co as V,Lk as W,Zu as X,rn as Y,xh as Z,Ao as _,HP as $,qP as aa,mh as ba,ux as ca,zo as da,VF as ea,zF as fa,ve as ga,sk as ha,G as ia,Rs as ja,tc as ka,mk as la,Ak as ma,Gi as na,Yr as oa,QR as pa,Is as qa,Rh as ra,$C as sa,hD as ta,Oe as ua,cD as va,Tt as wa,lD as xa,Ku as ya,gD as za,pD as Aa,yD as Ba,Pt as Ca,sO as Da,nO as Ea,rO as Fa,oO as Ga,aO as Ha,uO as Ia,MO as Ja,LO as Ka,OO as La,FO as Ma,Xu as Na,MF as Oa,LF as Pa,jF as Qa,_U as Ra,gU as Sa,pU as Ta,mU as Ua,bU as Va,SU as Wa,TU as Xa,EH as Ya,PH as Za,mt as _a,N1 as $a,z1 as ab,u2 as bb,C6 as cb,f8 as db,V8 as eb,G8 as fb,X9 as gb}; +var Io,td,f,Nt,id,ed,sd,nd,y,rd,a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window,h=a.document,hd=a.location,od=a.navigator,u=a.setTimeout,c=a.clearTimeout,v=a.setInterval,p=a.clearInterval,m=a.Error,g=a.TypeError,w=(a.SyntaxError,a.Object),_=a.Math,x=a.parseInt,C=a.parseFloat,S=a.isNaN,j=a.Uint8Array,ad=a.Worker,ud=(a.WorkerGlobalScope,a.XMLHttpRequest),cd=w.create,dd=w.defineProperty,ld=w.getOwnPropertyDescriptor,fd=w.getOwnPropertyNames,vd=w.getPrototypeOf,_d=w.prototype.hasOwnProperty,E=(t,i)=>()=>(i||t((i={exports:{}}).exports,i),i.exports),gd=(t,i,e)=>(e=null!=t?cd(vd(t)):{},((t,i,e,s)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let n of fd(i))_d.call(t,n)||n===e||dd(t,n,{get:()=>i[n],enumerable:!(s=ld(i,n))||s.enumerable});return t})(!i&&t&&t.__esModule?e:dd(e,"default",{value:t,enumerable:!0}),t)),r=(y=()=>{"use strict";if("function"==typeof Symbol&&Symbol.iterator)Io=Symbol,td=null!=(ed=Symbol.for)?ed:Symbol,f=Symbol.iterator,Nt=null!=(sd=Symbol.dispose)?sd:td("Symbol.dispose"),id=null!=(nd=Symbol.asyncDispose)?nd:td("Symbol.asyncDispose");else{let t=0;Io=function(i){return"hd"+i+"_"+ ++t},f=(td=function(t){return"hd"+t})("Symbol.iterator"),Nt=td("Symbol.dispose"),id=td("Symbol.asyncDispose"),Io.for=td,Io.iterator=f,Io.dispose=Nt,Io.asyncDispose=id}},()=>(y&&(rd=y(y=0)),rd)),pd=E((t,i)=>{r(),function(e,s){"object"==typeof t&&void 0!==i?s(t):"function"==typeof define&&define.amd?define(["exports"],s):s((e=e||self).WebStreamsPolyfill={})}(t,function(t){"use strict";var i="function"==typeof Io&&"symbol"==typeof f?Io:function(t){return"Symbol("+t+")"};function e(){}var s=Number.isNaN||function(t){return t!=t},n=e;function r(t){return"object"==typeof t&&null!==t||"function"==typeof t}function h(t){return t.slice()}function o(t,i,e,s,n){new j(t).set(new j(e,s,n),i)}function a(t){return!1!==function(t){if("number"!=typeof t)return!1;if(s(t))return!1;if(t<0)return!1;return!0}(t)&&t!==1/0}function u(t,i,e){if("function"!=typeof t)throw new g("Argument is not a function");return Function.prototype.apply.call(t,i,e)}function c(t,i,e,s){var n=t[i];if(void 0!==n){if("function"!=typeof n)throw new g(n+" is not a method");switch(e){case 0:return function(){return l(n,t,s)};case 1:return function(i){var e=[i].concat(s);return l(n,t,e)}}}return function(){return k(void 0)}}function d(t,i,e){var s=t[i];if(void 0!==s)return u(s,t,e)}function l(t,i,e){try{return k(u(t,i,e))}catch(t){return E(t)}}function v(t){if(t=Number(t),s(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function p(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new g("size property of a queuing strategy must be a function");return function(i){return t(i)}}var y=Promise,b=Promise.prototype.then,A=Promise.resolve.bind(y),S=Promise.reject.bind(y);function T(t){return new y(t)}function k(t){return A(t)}function E(t){return S(t)}function x(t,i,e){return b.call(t,i,e)}function P(t,i,e){x(x(t,i,e),void 0,n)}function I(t,i){P(t,i)}function C(t,i){P(t,void 0,i)}function R(t,i,e){return x(t,i,e)}function D(t){x(t,void 0,n)}var N=function(){function t(){this.Rd=0,this.Dd=0,this.Ld={Od:[],Fd:void 0},this.Ud=this.Ld,this.Rd=0,this.Dd=0}return w.defineProperty(t.prototype,"length",{get:function(){return this.Dd},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var i=this.Ud,e=i;16383===i.Od.length&&(e={Od:[],Fd:void 0}),i.Od.push(t),e!==i&&(this.Ud=e,i.Fd=e),++this.Dd},t.prototype.shift=function(){var t=this.Ld,i=t,e=this.Rd,s=e+1,n=t.Od,r=n[e];return 16384===s&&(i=t.Fd,s=0),--this.Dd,this.Rd=s,t!==i&&(this.Ld=i),n[e]=void 0,r},t.prototype.forEach=function(t){for(var i=this.Rd,e=this.Ld,s=e.Od;!(i===s.length&&void 0===e.Fd||i===s.length&&(i=0,0===(s=(e=e.Fd).Od).length));)t(s[i]),++i},t.prototype.peek=function(){var t=this.Ld,i=this.Rd;return t.Od[i]},t}();function B(t,i,e){var s=null;!0===e&&(s=w.prototype);var n=w.create(s);return n.value=t,n.done=i,n}function M(t,i){t.Vd=!0,t.Hd=i,i.Wd=t,"readable"===i.Ra?U(t):"closed"===i.Ra?function(t){U(t),W(t)}(t):V(t,i.qd)}function L(t,i){return ji(t.Hd,i)}function O(t){"readable"===t.Hd.Ra?H(t,new g("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,i){V(t,i)}(t,new g("Reader was released and can no longer be used to monitor the stream's closedness")),t.Hd.Wd=void 0,t.Hd=void 0}function F(t){return new g("Cannot "+t+" a stream using a released reader")}function U(t){t.zd=T(function(i,e){t.Gd=i,t.Xd=e})}function V(t,i){U(t),H(t,i)}function H(t,i){D(t.zd),t.Xd(i),t.Gd=void 0,t.Xd=void 0}function W(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0}var q=i("[[CancelSteps]]"),z=i("[[PullSteps]]");function G(t,i){void 0===i&&(i=!1);var e=new $(t);return e.Vd=i,e}function X(t){return T(function(i,e){var s={Qd:i,Kd:e};t.Wd.Yd.push(s)})}function Q(t,i,e){var s=t.Wd;s.Yd.shift().Qd(B(i,e,s.Vd))}function K(t){return t.Wd.Yd.length}function Y(t){var i=t.Wd;return void 0!==i&&!!tt(i)}var J,Z,$=function(){function t(t){if(!1===Gi(t))throw new g("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Xi(t))throw new g("This stream has already been locked for exclusive reading by another reader");M(this,t),this.Yd=new N}return w.defineProperty(t.prototype,"closed",{get:function(){return tt(this)?this.zd:E(et("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return tt(this)?void 0===this.Hd?E(F("cancel")):L(this,t):E(et("cancel"))},t.prototype.read=function(){return tt(this)?void 0===this.Hd?E(F("read from")):it(this):E(et("read"))},t.prototype.releaseLock=function(){if(!tt(this))throw et("releaseLock");if(void 0!==this.Hd){if(this.Yd.length>0)throw new g("Tried to release a reader lock when that reader has pending read() calls un-settled");O(this)}},t}();function tt(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"Yd")}function it(t){var i=t.Hd;return i.Jd=!0,"closed"===i.Ra?k(B(void 0,!0,t.Vd)):"errored"===i.Ra?E(i.qd):i.Zd[z]()}function et(t){return new g("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"==typeof i.asyncIterator&&((J={})[i.asyncIterator]=function(){return this},Z=J,w.defineProperty(Z,i.asyncIterator,{enumerable:!1}));var st={next:function(){if(!1===nt(this))return E(rt("next"));var t=this.$d;return void 0===t.Hd?E(F("iterate")):R(it(t),function(i){var e=i.done;return e&&O(t),B(i.value,e,!0)})},return:function(t){if(!1===nt(this))return E(rt("next"));var i=this.$d;if(void 0===i.Hd)return E(F("finish iterating"));if(i.Yd.length>0)return E(new g("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.ul){var e=L(i,t);return O(i),R(e,function(){return B(t,!0,!0)})}return O(i),k(B(t,!0,!0))}};function nt(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"$d")}function rt(t){return new g("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function ht(t){var i=t.tf.shift();return t.if-=i.size,t.if<0&&(t.if=0),i.value}function ot(t,i,e){if(!a(e=Number(e)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.tf.push({value:i,size:e}),t.if+=e}function at(t){t.tf=new N,t.if=0}void 0!==Z&&w.setPrototypeOf(st,Z),w.defineProperty(st,"next",{enumerable:!1}),w.defineProperty(st,"return",{enumerable:!1});var ut=i("[[AbortSteps]]"),ct=i("[[ErrorSteps]]"),dt=function(){function t(t,i){void 0===t&&(t={}),void 0===i&&(i={}),ft(this);var e=i.size,s=i.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var n=p(e);void 0===s&&(s=1),function(t,i,e,s){var n=w.create(Rt.prototype);function r(){return d(i,"start",[n])}var h=c(i,"write",1,[n]),o=c(i,"close",0,[]),a=c(i,"abort",1,[]);Dt(t,n,r,h,o,a,e,s)}(this,t,s=v(s),n)}return w.defineProperty(t.prototype,"locked",{get:function(){if(!1===vt(this))throw Ut("locked");return _t(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===vt(this)?E(Ut("abort")):!0===_t(this)?E(new g("Cannot abort a stream that already has a writer")):gt(this,t)},t.prototype.close=function(){return!1===vt(this)?E(Ut("close")):!0===_t(this)?E(new g("Cannot close a stream that already has a writer")):!0===bt(this)?E(new g("Cannot close an already-closing stream")):pt(this)},t.prototype.getWriter=function(){if(!1===vt(this))throw Ut("getWriter");return lt(this)},t}();function lt(t){return new Tt(t)}function ft(t){t.Ra="writable",t.qd=void 0,t.ef=void 0,t.nf=void 0,t.rf=new N,t.hf=void 0,t.uf=void 0,t.cf=void 0,t.df=void 0,t.lf=!1}function vt(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"nf")}function _t(t){return void 0!==t.ef}function gt(t,i){var e=t.Ra;if("closed"===e||"errored"===e)return k(void 0);if(void 0!==t.df)return t.df.vf;var s=!1;"erroring"===e&&(s=!0,i=void 0);var n=T(function(e,n){t.df={vf:void 0,Qd:e,Kd:n,_f:i,gf:s}});return t.df.vf=n,!1===s&&wt(t,i),n}function pt(t){var i=t.Ra;if("closed"===i||"errored"===i)return E(new g("The stream (in "+i+" state) is not in the writable state and cannot be closed"));var e=T(function(i,e){var s={Qd:i,Kd:e};t.uf=s}),s=t.ef;return void 0!==s&&!0===t.lf&&"writable"===i&&Yt(s),function(t){ot(t,"close",0),Mt(t)}(t.nf),e}function mt(t,i){"writable"!==t.Ra?yt(t):wt(t,i)}function wt(t,i){var e=t.nf;t.Ra="erroring",t.qd=i;var s=t.ef;void 0!==s&&Pt(s,i),!1===function(t){if(void 0===t.hf&&void 0===t.cf)return!1;return!0}(t)&&!0===e.pf&&yt(t)}function yt(t){t.Ra="errored",t.nf[ct]();var i=t.qd;if(t.rf.forEach(function(t){t.Kd(i)}),t.rf=new N,void 0!==t.df){var e=t.df;if(t.df=void 0,!0===e.gf)return e.Kd(i),void At(t);P(t.nf[ut](e._f),function(){e.Qd(),At(t)},function(i){e.Kd(i),At(t)})}else At(t)}function bt(t){return void 0!==t.uf||void 0!==t.cf}function At(t){void 0!==t.uf&&(t.uf.Kd(t.qd),t.uf=void 0);var i=t.ef;void 0!==i&&zt(i,t.qd)}function St(t,i){var e=t.ef;void 0!==e&&i!==t.lf&&(!0===i?function(t){Xt(t)}(e):Yt(e)),t.lf=i}var Tt=function(){function t(t){if(!1===vt(t))throw new g("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===_t(t))throw new g("This stream has already been locked for exclusive writing by another writer");this.mf=t,t.ef=this;var i=t.Ra;if("writable"===i)!1===bt(t)&&!0===t.lf?Xt(this):Qt(this),Wt(this);else if("erroring"===i)jt(this,t.qd),Wt(this);else if("closed"===i)Qt(this),function(t){Wt(t),Gt(t)}(this);else{var e=t.qd;jt(this,e),qt(this,e)}}return w.defineProperty(t.prototype,"closed",{get:function(){return!1===kt(this)?E(Vt("closed")):this.zd},enumerable:!0,configurable:!0}),w.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===kt(this))throw Vt("desiredSize");if(void 0===this.mf)throw Ht("desiredSize");return function(t){var i=t.mf,e=i.Ra;if("errored"===e||"erroring"===e)return null;if("closed"===e)return 0;return Bt(i.nf)}(this)},enumerable:!0,configurable:!0}),w.defineProperty(t.prototype,"ready",{get:function(){return!1===kt(this)?E(Vt("ready")):this.wf},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===kt(this)?E(Vt("abort")):void 0===this.mf?E(Ht("abort")):function(t,i){var e=t.mf;return gt(e,i)}(this,t)},t.prototype.close=function(){if(!1===kt(this))return E(Vt("close"));var t=this.mf;return void 0===t?E(Ht("close")):!0===bt(t)?E(new g("Cannot close an already-closing stream")):Et(this)},t.prototype.releaseLock=function(){if(!1===kt(this))throw Vt("releaseLock");void 0!==this.mf&&It(this)},t.prototype.write=function(t){return!1===kt(this)?E(Vt("write")):void 0===this.mf?E(Ht("write to")):Ct(this,t)},t}();function kt(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"mf")}function Et(t){return pt(t.mf)}function xt(t,i){"pending"===t.yf?zt(t,i):function(t,i){qt(t,i)}(t,i)}function Pt(t,i){"pending"===t.bf?Kt(t,i):function(t,i){jt(t,i)}(t,i)}function It(t){var i=t.mf,e=new g("Writer was released and can no longer be used to monitor the stream's closedness");Pt(t,e),xt(t,e),i.ef=void 0,t.mf=void 0}function Ct(t,i){var e=t.mf,s=e.nf,n=function(t,i){try{return t.Af(i)}catch(i){return Lt(t,i),1}}(s,i);if(e!==t.mf)return E(Ht("write to"));var r=e.Ra;if("errored"===r)return E(e.qd);if(!0===bt(e)||"closed"===r)return E(new g("The stream is closing or closed and cannot be written to"));if("erroring"===r)return E(e.qd);var h=function(t){return T(function(i,e){var s={Qd:i,Kd:e};t.rf.push(s)})}(e);return function(t,i,e){var s={chunk:i};try{ot(t,s,e)}catch(i){return void Lt(t,i)}var n=t.Sf;if(!1===bt(n)&&"writable"===n.Ra){St(n,Ot(t))}Mt(t)}(s,i,n),h}var Rt=function(){function t(){throw new g("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){if(!r(t))return!1;if(!w.prototype.hasOwnProperty.call(t,"Sf"))return!1;return!0}(this))throw new g("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.Sf.Ra&&Ft(this,t)},t.prototype[ut]=function(t){var i=this.Tf(t);return Nt(this),i},t.prototype[ct]=function(){at(this)},t}();function Dt(t,i,e,s,n,r,h,o){i.Sf=t,t.nf=i,i.tf=void 0,i.if=void 0,at(i),i.pf=!1,i.Af=o,i.kf=h,i.Ef=s,i.xf=n,i.Tf=r;var a=Ot(i);St(t,a),P(k(e()),function(){i.pf=!0,Mt(i)},function(e){i.pf=!0,mt(t,e)})}function Nt(t){t.Ef=void 0,t.xf=void 0,t.Tf=void 0,t.Af=void 0}function Bt(t){return t.kf-t.if}function Mt(t){var i=t.Sf;if(!1!==t.pf&&void 0===i.hf)if("erroring"!==i.Ra){if(0!==t.tf.length){var e=function(t){return t.tf.peek().value}(t);"close"===e?function(t){var i=t.Sf;(function(t){t.cf=t.uf,t.uf=void 0})(i),ht(t);var e=t.xf();Nt(t),P(e,function(){!function(t){t.cf.Qd(void 0),t.cf=void 0,"erroring"===t.Ra&&(t.qd=void 0,void 0!==t.df&&(t.df.Qd(),t.df=void 0)),t.Ra="closed";var i=t.ef;void 0!==i&&Gt(i)}(i)},function(t){!function(t,i){t.cf.Kd(i),t.cf=void 0,void 0!==t.df&&(t.df.Kd(i),t.df=void 0),mt(t,i)}(i,t)})}(t):function(t,i){var e=t.Sf;!function(t){t.hf=t.rf.shift()}(e);var s=t.Ef(i);P(s,function(){!function(t){t.hf.Qd(void 0),t.hf=void 0}(e);var i=e.Ra;if(ht(t),!1===bt(e)&&"writable"===i){var s=Ot(t);St(e,s)}Mt(t)},function(i){"writable"===e.Ra&&Nt(t),function(t,i){t.hf.Kd(i),t.hf=void 0,mt(t,i)}(e,i)})}(t,e.chunk)}}else yt(i)}function Lt(t,i){"writable"===t.Sf.Ra&&Ft(t,i)}function Ot(t){return Bt(t)<=0}function Ft(t,i){var e=t.Sf;Nt(t),wt(e,i)}function Ut(t){return new g("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Vt(t){return new g("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function Ht(t){return new g("Cannot "+t+" a stream using a released writer")}function Wt(t){t.zd=T(function(i,e){t.Gd=i,t.Xd=e,t.yf="pending"})}function qt(t,i){Wt(t),zt(t,i)}function zt(t,i){D(t.zd),t.Xd(i),t.Gd=void 0,t.Xd=void 0,t.yf="rejected"}function Gt(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0,t.yf="resolved"}function Xt(t){t.wf=T(function(i,e){t.Pf=i,t.If=e}),t.bf="pending"}function jt(t,i){Xt(t),Kt(t,i)}function Qt(t){Xt(t),Yt(t)}function Kt(t,i){D(t.wf),t.If(i),t.Pf=void 0,t.If=void 0,t.bf="rejected"}function Yt(t){t.Pf(void 0),t.Pf=void 0,t.If=void 0,t.bf="fulfilled"}function Jt(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var Zt="undefined"!=typeof DOMException?DOMException:void 0;var $t,ti=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(Zt)?Zt:(($t=function(t,i){this.message=t||"",this.name=i||"Error",m.captureStackTrace&&m.captureStackTrace(this,this.constructor)}).prototype=w.create(m.prototype),w.defineProperty($t.prototype,"constructor",{value:$t,writable:!0,configurable:!0}),$t);function ii(t,i,s,n,r,h){var o=G(t),a=lt(i);t.Jd=!0;var u=!1,c=k(void 0);return T(function(d,l){var f,v,_,p;if(void 0!==h){if(f=function(){var e=new ti("Aborted","AbortError"),s=[];!1===n&&s.push(function(){return"writable"===i.Ra?gt(i,e):k(void 0)}),!1===r&&s.push(function(){return"readable"===t.Ra?ji(t,e):k(void 0)}),b(function(){return Promise.all(s.map(function(t){return t()}))},!0,e)},!0===h.aborted)return void f();h.addEventListener("abort",f)}if(y(t,o.zd,function(t){!1===n?b(function(){return gt(i,t)},!0,t):A(!0,t)}),y(i,a.zd,function(i){!1===r?b(function(){return ji(t,i)},!0,i):A(!0,i)}),v=t,_=o.zd,p=function(){!1===s?b(function(){return function(t){var i=t.mf,e=i.Ra;return!0===bt(i)||"closed"===e?k(void 0):"errored"===e?E(i.qd):Et(t)}(a)}):A()},"closed"===v.Ra?p():I(_,p),!0===bt(i)||"closed"===i.Ra){var m=new g("the destination writable stream closed before all data could be piped to it");!1===r?b(function(){return ji(t,m)},!0,m):A(!0,m)}function w(){var t=c;return x(c,function(){return t!==c?w():void 0})}function y(t,i,e){"errored"===t.Ra?e(t.qd):C(i,e)}function b(t,e,s){function n(){P(t(),function(){return S(e,s)},function(t){return S(!0,t)})}!0!==u&&(u=!0,"writable"===i.Ra&&!1===bt(i)?I(w(),n):n())}function A(t,e){!0!==u&&(u=!0,"writable"===i.Ra&&!1===bt(i)?I(w(),function(){return S(t,e)}):S(t,e))}function S(t,i){It(a),O(o),void 0!==h&&h.removeEventListener("abort",f),t?l(i):d(void 0)}D(T(function(t,i){!function s(n){n?t():x(!0===u?k(!0):x(a.wf,function(){return x(it(o),function(t){return!0===t.done||(c=x(Ct(a,t.value),void 0,e),!1)})}),s,i)}(!1)}))})}var ei=function(){function t(){throw new g}return w.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===si(this))throw fi("desiredSize");return ci(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===si(this))throw fi("close");if(!1===di(this))throw new g("The stream is not in a state that permits close");oi(this)},t.prototype.enqueue=function(t){if(!1===si(this))throw fi("enqueue");if(!1===di(this))throw new g("The stream is not in a state that permits enqueue");return ai(this,t)},t.prototype.error=function(t){if(!1===si(this))throw fi("error");ui(this,t)},t.prototype[q]=function(t){at(this);var i=this.Cf(t);return hi(this),i},t.prototype[z]=function(){var t=this.Rf;if(this.tf.length>0){var i=ht(this);return!0===this.Df&&0===this.tf.length?(hi(this),Qi(t)):ni(this),k(B(i,!1,t.Wd.Vd))}var e=X(t);return ni(this),e},t}();function si(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"Rf")}function ni(t){!1!==ri(t)&&(!0!==t.Nf?(t.Nf=!0,P(t.Bf(),function(){t.Nf=!1,!0===t.Mf&&(t.Mf=!1,ni(t))},function(i){ui(t,i)})):t.Mf=!0)}function ri(t){var i=t.Rf;return!1!==di(t)&&(!1!==t.pf&&(!0===Xi(i)&&K(i)>0||ci(t)>0))}function hi(t){t.Bf=void 0,t.Cf=void 0,t.Af=void 0}function oi(t){var i=t.Rf;t.Df=!0,0===t.tf.length&&(hi(t),Qi(i))}function ai(t,i){var e=t.Rf;if(!0===Xi(e)&&K(e)>0)Q(e,i,!1);else{var s=void 0;try{s=t.Af(i)}catch(i){throw ui(t,i),i}try{ot(t,i,s)}catch(i){throw ui(t,i),i}}ni(t)}function ui(t,i){var e=t.Rf;"readable"===e.Ra&&(at(t),hi(t),Ki(e,i))}function ci(t){var i=t.Rf.Ra;return"errored"===i?null:"closed"===i?0:t.kf-t.if}function di(t){var i=t.Rf.Ra;return!1===t.Df&&"readable"===i}function li(t,i,e,s,n,r,h){i.Rf=t,i.tf=void 0,i.if=void 0,at(i),i.pf=!1,i.Df=!1,i.Mf=!1,i.Nf=!1,i.Af=h,i.kf=r,i.Bf=s,i.Cf=n,t.Zd=i,P(k(e()),function(){i.pf=!0,ni(i)},function(t){ui(i,t)})}function fi(t){return new g("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var vi=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&_.floor(t)===t},_i=function(){function t(){throw new g("ReadableStreamBYOBRequest cannot be used directly")}return w.defineProperty(t.prototype,"view",{get:function(){if(!1===mi(this))throw Bi("view");return this.Lf},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===mi(this))throw Bi("respond");if(void 0===this.Of)throw new g("This BYOB request has been invalidated");this.Lf.buffer,function(t,i){if(i=Number(i),!1===a(i))throw new RangeError("bytesWritten must be a finite");Pi(t,i)}(this.Of,t)},t.prototype.respondWithNewView=function(t){if(!1===mi(this))throw Bi("respond");if(void 0===this.Of)throw new g("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new g("You can only respond with array buffer views");t.buffer,function(t,i){var e=t.Ff.peek();if(e.byteOffset+e.bytesFilled!==i.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(e.byteLength!==i.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");e.buffer=i.buffer,Pi(t,i.byteLength)}(this.Of,t)},t}(),gi=function(){function t(){throw new g("ReadableByteStreamController constructor cannot be used directly")}return w.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===pi(this))throw Mi("byobRequest");if(void 0===this.Uf&&this.Ff.length>0){var t=this.Ff.peek(),i=new j(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),e=w.create(_i.prototype);!function(t,i,e){t.Of=i,t.Lf=e}(e,this,i),this.Uf=e}return this.Uf},enumerable:!0,configurable:!0}),w.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===pi(this))throw Mi("desiredSize");return Di(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===pi(this))throw Mi("close");if(!0===this.Df)throw new g("The stream has already been closed; do not close it again!");var t=this.Vf.Ra;if("readable"!==t)throw new g("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var i=t.Vf;if(t.if>0)return void(t.Df=!0);if(t.Ff.length>0){if(t.Ff.peek().bytesFilled>0){var e=new g("Insufficient bytes to fill elements in the given buffer");throw Ri(t,e),e}}Ci(t),Qi(i)}(this)},t.prototype.enqueue=function(t){if(!1===pi(this))throw Mi("enqueue");if(!0===this.Df)throw new g("stream is closed or draining");var i=this.Vf.Ra;if("readable"!==i)throw new g("The stream (in "+i+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new g("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,i){var e=t.Vf,s=i.buffer,n=i.byteOffset,r=i.byteLength,h=s;if(!0===Y(e)){if(0===K(e))Ai(t,h,n,r);else Q(e,new j(h,n,r),!1)}else!0===Fi(e)?(Ai(t,h,n,r),xi(t)):Ai(t,h,n,r);wi(t)}(this,t)},t.prototype.error=function(t){if(!1===pi(this))throw Mi("error");Ri(this,t)},t.prototype[q]=function(t){this.Ff.length>0&&(this.Ff.peek().bytesFilled=0);at(this);var i=this.Cf(t);return Ci(this),i},t.prototype[z]=function(){var t=this.Vf;if(this.if>0){var i=this.tf.shift();this.if-=i.byteLength,ki(this);var e=void 0;try{e=new j(i.buffer,i.byteOffset,i.byteLength)}catch(t){return E(t)}return k(B(e,!1,t.Wd.Vd))}var s=this.Hf;if(void 0!==s){var n=void 0;try{n=new ArrayBuffer(s)}catch(t){return E(t)}var r={buffer:n,byteOffset:0,byteLength:s,bytesFilled:0,elementSize:1,ctor:j,readerType:"default"};this.Ff.push(r)}var h=X(t);return wi(this),h},t}();function pi(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"Vf")}function mi(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"Of")}function wi(t){var i=function(t){var i=t.Vf;if("readable"!==i.Ra)return!1;if(!0===t.Df)return!1;if(!1===t.pf)return!1;if(!0===Y(i)&&K(i)>0)return!0;if(!0===Fi(i)&&Oi(i)>0)return!0;var e=Di(t);if(e>0)return!0;return!1}(t);!1!==i&&(!0!==t.Nf?(t.Nf=!0,P(t.Bf(),function(){t.Nf=!1,!0===t.Mf&&(t.Mf=!1,wi(t))},function(i){Ri(t,i)})):t.Mf=!0)}function yi(t,i){var e=!1;"closed"===t.Ra&&(e=!0);var s=bi(i);"default"===i.readerType?Q(t,s,e):function(t,i,e){var s=t.Wd,n=s.Wf.shift();n.Qd(B(i,e,s.Vd))}(t,s,e)}function bi(t){var i=t.bytesFilled,e=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,i/e)}function Ai(t,i,e,s){t.tf.push({buffer:i,byteOffset:e,byteLength:s}),t.if+=s}function Si(t,i){var e=i.elementSize,s=i.bytesFilled-i.bytesFilled%e,n=_.min(t.if,i.byteLength-i.bytesFilled),r=i.bytesFilled+n,h=r-r%e,a=n,u=!1;h>s&&(a=h-i.bytesFilled,u=!0);for(var c=t.tf;a>0;){var d=c.peek(),l=_.min(a,d.byteLength),f=i.byteOffset+i.bytesFilled;o(i.buffer,f,d.buffer,d.byteOffset,l),d.byteLength===l?c.shift():(d.byteOffset+=l,d.byteLength-=l),t.if-=l,Ti(t,l,i),a-=l}return u}function Ti(t,i,e){Ei(t),e.bytesFilled+=i}function ki(t){0===t.if&&!0===t.Df?(Ci(t),Qi(t.Vf)):wi(t)}function Ei(t){void 0!==t.Uf&&(t.Uf.Of=void 0,t.Uf.Lf=void 0,t.Uf=void 0)}function xi(t){for(;t.Ff.length>0;){if(0===t.if)return;var i=t.Ff.peek();!0===Si(t,i)&&(Ii(t),yi(t.Vf,i))}}function Pi(t,i){var e=t.Ff.peek();if("closed"===t.Vf.Ra){if(0!==i)throw new g("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,i){i.buffer=i.buffer;var e=t.Vf;if(!0===Fi(e))for(;Oi(e)>0;)yi(e,Ii(t))}(t,e)}else!function(t,i,e){if(e.bytesFilled+i>e.byteLength)throw new RangeError("bytesWritten out of range");if(Ti(t,i,e),!(e.bytesFilled0){var n=e.byteOffset+e.bytesFilled,r=e.buffer.slice(n-s,n);Ai(t,r,0,r.byteLength)}e.buffer=e.buffer,e.bytesFilled-=s,yi(t.Vf,e),xi(t)}}(t,i,e);wi(t)}function Ii(t){var i=t.Ff.shift();return Ei(t),i}function Ci(t){t.Bf=void 0,t.Cf=void 0}function Ri(t,i){var e=t.Vf;"readable"===e.Ra&&(!function(t){Ei(t),t.Ff=new N}(t),at(t),Ci(t),Ki(e,i))}function Di(t){var i=t.Vf.Ra;return"errored"===i?null:"closed"===i?0:t.kf-t.if}function Ni(t,i,e){var s=w.create(gi.prototype);var n=c(i,"pull",0,[s]),r=c(i,"cancel",1,[]),h=i.autoAllocateChunkSize;if(void 0!==h&&(h=Number(h),!1===vi(h)||h<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,i,e,s,n,r,h){i.Vf=t,i.Mf=!1,i.Nf=!1,i.Uf=void 0,i.tf=i.if=void 0,at(i),i.Df=!1,i.pf=!1,i.kf=v(r),i.Bf=s,i.Cf=n,i.Hf=h,i.Ff=new N,t.Zd=i,P(k(e()),function(){i.pf=!0,wi(i)},function(t){Ri(i,t)})}(t,s,function(){return d(i,"start",[s])},n,r,e,h)}function Bi(t){return new g("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Mi(t){return new g("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Li(t){return T(function(i,e){var s={Qd:i,Kd:e};t.Wd.Wf.push(s)})}function Oi(t){return t.Wd.Wf.length}function Fi(t){var i=t.Wd;return void 0!==i&&!!Vi(i)}var Ui=function(){function t(t){if(!Gi(t))throw new g("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===pi(t.Zd))throw new g("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Xi(t))throw new g("This stream has already been locked for exclusive reading by another reader");M(this,t),this.Wf=new N}return w.defineProperty(t.prototype,"closed",{get:function(){return Vi(this)?this.zd:E(Hi("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Vi(this)?void 0===this.Hd?E(F("cancel")):L(this,t):E(Hi("cancel"))},t.prototype.read=function(t){return Vi(this)?void 0===this.Hd?E(F("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?E(new g("view must have non-zero byteLength")):function(t,i){var e=t.Hd;if(e.Jd=!0,"errored"===e.Ra)return E(e.qd);return function(t,i){var e=t.Vf,s=1;i.constructor!==DataView&&(s=i.constructor.BYTES_PER_ELEMENT);var n=i.constructor,r={buffer:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength,bytesFilled:0,elementSize:s,ctor:n,readerType:"byob"};if(t.Ff.length>0)return t.Ff.push(r),Li(e);if("closed"===e.Ra)return k(B(new n(r.buffer,r.byteOffset,0),!0,e.Wd.Vd));if(t.if>0){if(!0===Si(t,r)){var h=bi(r);return ki(t),k(B(h,!1,e.Wd.Vd))}if(!0===t.Df){var o=new g("Insufficient bytes to fill elements in the given buffer");return Ri(t,o),E(o)}}t.Ff.push(r);var a=Li(e);return wi(t),a}(e.Zd,i)}(this,t)):E(new g("view must be an array buffer view")):E(Hi("read"))},t.prototype.releaseLock=function(){if(!Vi(this))throw Hi("releaseLock");if(void 0!==this.Hd){if(this.Wf.length>0)throw new g("Tried to release a reader lock when that reader has pending read() calls un-settled");O(this)}},t}();function Vi(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"Wf")}function Hi(t){return new g("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var Wi=function(){function t(t,i){void 0===t&&(t={}),void 0===i&&(i={}),zi(this);var e=i.size,s=i.highWaterMark,n=t.type;if("bytes"===String(n)){if(void 0!==e)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===s&&(s=0),Ni(this,t,s=v(s))}else{if(void 0!==n)throw new RangeError("Invalid type is specified");var r=p(e);void 0===s&&(s=1),function(t,i,e,s){var n=w.create(ei.prototype),r=c(i,"pull",0,[n]),h=c(i,"cancel",1,[]);li(t,n,function(){return d(i,"start",[n])},r,h,e,s)}(this,t,s=v(s),r)}}return w.defineProperty(t.prototype,"locked",{get:function(){if(!1===Gi(this))throw Yi("locked");return Xi(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Gi(this)?E(Yi("cancel")):!0===Xi(this)?E(new g("Cannot cancel a stream that already has a reader")):ji(this,t)},t.prototype.getReader=function(t){var i=(void 0===t?{}:t).mode;if(!1===Gi(this))throw Yi("getReader");if(void 0===i)return G(this,!0);if("byob"===(i=String(i)))return function(t,i){void 0===i&&(i=!1);var e=new Ui(t);return e.Vd=i,e}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,i){var e=t.writable,s=t.readable,n=void 0===i?{}:i,r=n.preventClose,h=n.preventAbort,o=n.preventCancel,a=n.signal;if(!1===Gi(this))throw Yi("pipeThrough");if(!1===vt(e))throw new g("writable argument to pipeThrough must be a WritableStream");if(!1===Gi(s))throw new g("readable argument to pipeThrough must be a ReadableStream");if(r=Boolean(r),h=Boolean(h),o=Boolean(o),void 0!==a&&!Jt(a))throw new g("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Xi(this))throw new g("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===_t(e))throw new g("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return D(ii(this,e,r,h,o,a)),s},t.prototype.pipeTo=function(t,i){var e=void 0===i?{}:i,s=e.preventClose,n=e.preventAbort,r=e.preventCancel,h=e.signal;return!1===Gi(this)?E(Yi("pipeTo")):!1===vt(t)?E(new g("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(s=Boolean(s),n=Boolean(n),r=Boolean(r),void 0===h||Jt(h)?!0===Xi(this)?E(new g("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===_t(t)?E(new g("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):ii(this,t,s,n,r,h):E(new g("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Gi(this))throw Yi("tee");var t=function(t){var i,e,s,n,r,o=G(t),a=!1,u=!1,c=!1,d=T(function(t){r=t});function l(){return!0===a||(a=!0,D(R(it(o),function(t){if(a=!1,!0===t.done)return!1===u&&oi(s.Zd),void(!1===c&&oi(n.Zd));var i=t.value,e=i,r=i;!1===u&&ai(s.Zd,e),!1===c&&ai(n.Zd,r)}))),k(void 0)}function f(){}return s=qi(f,l,function(s){if(u=!0,i=s,!0===c){var n=h([i,e]),o=ji(t,n);r(o)}return d}),n=qi(f,l,function(s){if(c=!0,e=s,!0===u){var n=h([i,e]),o=ji(t,n);r(o)}return d}),C(o.zd,function(t){ui(s.Zd,t),ui(n.Zd,t)}),[s,n]}(this);return h(t)},t.prototype.getIterator=function(t){var i=(void 0===t?{}:t).preventCancel,e=void 0!==i&&i;if(!1===Gi(this))throw Yi("getIterator");return function(t,i){void 0===i&&(i=!1);var e=G(t),s=w.create(st);return s.$d=e,s.ul=Boolean(i),s}(this,e)},t}();function qi(t,i,e,s,n){void 0===s&&(s=1),void 0===n&&(n=function(){return 1});var r=w.create(Wi.prototype);return zi(r),li(r,w.create(ei.prototype),t,i,e,s,n),r}function zi(t){t.Ra="readable",t.Wd=void 0,t.qd=void 0,t.Jd=!1}function Gi(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"Zd")}function Xi(t){return void 0!==t.Wd}function ji(t,i){return t.Jd=!0,"closed"===t.Ra?k(void 0):"errored"===t.Ra?E(t.qd):(Qi(t),R(t.Zd[q](i),e))}function Qi(t){t.Ra="closed";var i=t.Wd;void 0!==i&&(tt(i)&&(i.Yd.forEach(function(t){t.Qd(B(void 0,!0,i.Vd))}),i.Yd=new N),W(i))}function Ki(t,i){t.Ra="errored",t.qd=i;var e=t.Wd;void 0!==e&&(tt(e)?(e.Yd.forEach(function(t){t.Kd(i)}),e.Yd=new N):(e.Wf.forEach(function(t){t.Kd(i)}),e.Wf=new N),H(e,i))}function Yi(t){return new g("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"==typeof i.asyncIterator&&w.defineProperty(Wi.prototype,i.asyncIterator,{value:Wi.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var Ji=function(){function t(t){var i=t.highWaterMark;this.highWaterMark=i}return t.prototype.size=function(t){return t.byteLength},t}(),Zi=function(){function t(t){var i=t.highWaterMark;this.highWaterMark=i}return t.prototype.size=function(){return 1},t}(),$i=function(){function t(t,i,e){void 0===t&&(t={}),void 0===i&&(i={}),void 0===e&&(e={});var s=i.size,n=i.highWaterMark,r=e.size,h=e.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var o=p(s);if(void 0===n&&(n=1),n=v(n),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var a,u=p(r);void 0===h&&(h=0),h=v(h),function(t,i,e,s,n,r){function h(){return i}function o(i){return function(t,i){var e=t.qf;if(!0===t.lf){return R(t.zf,function(){var s=t.Gf;if("erroring"===s.Ra)throw s.qd;return ae(e,i)})}return ae(e,i)}(t,i)}function a(i){return function(t,i){return ie(t,i),k(void 0)}(t,i)}function u(){return function(t){var i=t.Xf,e=t.qf,s=e.jf();return he(e),R(s,function(){if("errored"===i.Ra)throw i.qd;var t=i.Zd;!0===di(t)&&oi(t)},function(e){throw ie(t,e),i.qd})}(t)}function c(){return function(t){return se(t,!1),t.zf}(t)}function d(i){return ee(t,i),k(void 0)}t.Gf=function(t,i,e,s,n,r){void 0===n&&(n=1),void 0===r&&(r=function(){return 1});var h=w.create(dt.prototype);return ft(h),Dt(h,w.create(Rt.prototype),t,i,e,s,n,r),h}(h,o,u,a,e,s),t.Xf=qi(h,c,d,n,r),t.lf=void 0,t.zf=void 0,t.Qf=void 0,se(t,!0),t.qf=void 0}(this,T(function(t){a=t}),n,o,h,u),function(t,i){var e=w.create(ne.prototype),s=function(t){try{return oe(e,t),k(void 0)}catch(t){return E(t)}},n=i.transform;if(void 0!==n){if("function"!=typeof n)throw new g("transform is not a method");s=function(t){return l(n,i,[t,e])}}var r=c(i,"flush",0,[e]);!function(t,i,e,s){i.Kf=t,t.qf=i,i.Yf=e,i.jf=s}(t,e,s,r)}(this,t);var f=d(t,"start",[this.qf]);a(f)}return w.defineProperty(t.prototype,"readable",{get:function(){if(!1===te(this))throw ce("readable");return this.Xf},enumerable:!0,configurable:!0}),w.defineProperty(t.prototype,"writable",{get:function(){if(!1===te(this))throw ce("writable");return this.Gf},enumerable:!0,configurable:!0}),t}();function te(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"qf")}function ie(t,i){ui(t.Xf.Zd,i),ee(t,i)}function ee(t,i){he(t.qf),Lt(t.Gf.nf,i),!0===t.lf&&se(t,!1)}function se(t,i){void 0!==t.zf&&t.Qf(),t.zf=T(function(i){t.Qf=i}),t.lf=i}var ne=function(){function t(){throw new g("TransformStreamDefaultController instances cannot be created directly")}return w.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===re(this))throw ue("desiredSize");return ci(this.Kf.Xf.Zd)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===re(this))throw ue("enqueue");oe(this,t)},t.prototype.error=function(t){if(!1===re(this))throw ue("error");!function(t,i){ie(t.Kf,i)}(this,t)},t.prototype.terminate=function(){if(!1===re(this))throw ue("terminate");!function(t){var i=t.Kf,e=i.Xf.Zd;!0===di(e)&&oi(e);var s=new g("TransformStream terminated");ee(i,s)}(this)},t}();function re(t){return!!r(t)&&!!w.prototype.hasOwnProperty.call(t,"Kf")}function he(t){t.Yf=void 0,t.jf=void 0}function oe(t,i){var e=t.Kf,s=e.Xf.Zd;if(!1===di(s))throw new g("Readable side is not in a state that permits enqueue");try{ai(s,i)}catch(t){throw ee(e,t),e.Xf.qd}var n=function(t){return!0!==ri(t)}(s);n!==e.lf&&se(e,!0)}function ae(t,i){return R(t.Yf(i),void 0,function(i){throw ie(t.Kf,i),i})}function ue(t){return new g("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function ce(t){return new g("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=Ji,t.CountQueuingStrategy=Zi,t.ReadableStream=Wi,t.TransformStream=$i,t.WritableStream=dt,w.defineProperty(t,"__esModule",{value:!0})})}),md=E(t=>{"use strict";function i(){const t=pd();return i=function(){return t},t}r(),w.defineProperty(t,"__esModule",{value:!0}),function(t,i){for(var e in i)w.defineProperty(t,e,{enumerable:!0,get:w.getOwnPropertyDescriptor(i,e).get})}(t,{get ByteLengthQueuingStrategy(){return i().ByteLengthQueuingStrategy},get CountQueuingStrategy(){return i().CountQueuingStrategy},get ReadableStream(){return i().ReadableStream},get TransformStream(){return i().TransformStream},get WritableStream(){return i().WritableStream}})}),wd=E((t,i)=>{r(),function(e,s){"object"==typeof t&&typeof i<"u"?s(t):"function"==typeof define&&define.amd?define(["exports"],s):s((e=typeof globalThis<"u"?globalThis:e||self).millicast={})}(t,function(t){"use strict";var i,e=w.defineProperty,n=w.defineProperties,r=w.getOwnPropertyDescriptors,o=w.getOwnPropertySymbols,a=w.prototype.hasOwnProperty,c=w.prototype.propertyIsEnumerable,d=(t,i,s)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s,l=(t,i)=>{for(var e in i||(i={}))a.call(i,e)&&d(t,e,i[e]);if(o)for(var e of o(i))c.call(i,e)&&d(t,e,i[e]);return t},f=(t,i)=>n(t,r(i)),y=(t,i)=>{var e={};for(var s in t)a.call(t,s)&&i.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&o)for(var s of o(t))i.indexOf(s)<0&&c.call(t,s)&&(e[s]=t[s]);return e},b=typeof globalThis<"u"?globalThis:typeof s<"u"?s:typeof global<"u"?global:typeof self<"u"?self:{};function A(t){return t&&t.__esModule&&w.prototype.hasOwnProperty.call(t,"default")?t.default:t}var T,k={exports:{}};var E,P=(T||(T=1,E=k,function(t){var i,e={VERSION:"1.6.1"},s={},n=function(t,i){return function(){return i.apply(t,arguments)}},r=function(){var t,i,e=arguments,s=e[0];for(i=1;i=i.value},trace:function(){this.invoke(e.TRACE,arguments)},debug:function(){this.invoke(e.DEBUG,arguments)},info:function(){this.invoke(e.INFO,arguments)},warn:function(){this.invoke(e.WARN,arguments)},error:function(){this.invoke(e.ERROR,arguments)},time:function(t){"string"==typeof t&&t.length>0&&this.invoke(e.TIME,[t,"start"])},timeEnd:function(t){"string"==typeof t&&t.length>0&&this.invoke(e.TIME,[t,"end"])},invoke:function(t,e){i&&this.enabledFor(t)&&i(e,r({level:t},this.context))}};var a,u=new o({filterLevel:e.OFF});(a=e).enabledFor=n(u,u.enabledFor),a.trace=n(u,u.trace),a.debug=n(u,u.debug),a.time=n(u,u.time),a.timeEnd=n(u,u.timeEnd),a.info=n(u,u.info),a.warn=n(u,u.warn),a.error=n(u,u.error),a.log=a.info,e.setHandler=function(t){i=t},e.setLevel=function(t){for(var i in u.setLevel(t),s)s.hasOwnProperty(i)&&s[i].setLevel(t)},e.getLevel=function(){return u.getLevel()},e.get=function(t){return s[t]||(s[t]=new o(r({name:t},u.context)))},e.createDefaultHandler=function(t){(t=t||{}).formatter=t.formatter||function(t,i){i.name&&t.unshift("["+i.name+"]")};var i={},s=function(t,i){Function.prototype.apply.call(t,console,i)};return typeof console>"u"?function(){}:function(n,r){n=Array.prototype.slice.call(n);var h,o=console.log;r.level===e.TIME?(h=(r.name?"["+r.name+"] ":"")+n[0],"start"===n[1]?console.time?console.time(h):i[h]=(new Date).getTime():console.timeEnd?console.timeEnd(h):s(o,[h+": "+((new Date).getTime()-i[h])+"ms"])):(r.level===e.WARN&&console.warn?o=console.warn:r.level===e.ERROR&&console.error?o=console.error:r.level===e.INFO&&console.info?o=console.info:r.level===e.DEBUG&&console.debug?o=console.debug:r.level===e.TRACE&&console.trace&&(o=console.trace),t.formatter(n,r),s(o,n))}},e.useDefaults=function(t){e.setLevel(t&&t.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(t))},e.setDefaults=e.useDefaults,E.exports?E.exports=e:(e.Jf=t.Logger,e.noConflict=function(){return t.Logger=e.Jf,e},t.Logger=e)}(k.exports)),k.exports);const I=A(P),C="0.6.0",R=(null==(i=null==s?void 0:s.navigator)?void 0:i.userAgent)||"No user agent available";let D="",N="",B="",M="",L="",O="",F="",U=0;const V=[];const H=t=>{D=""===D?t:D},W=t=>{N=""===N?t:N},q=t=>{B=""===B?t:B},z=t=>{M=""===M?t:M},G=t=>{L=""===L?t:L},X=t=>{U=0===U?t:U},Q=t=>{O=t},K=t=>{F=""===F?t:F},Y=t=>{60===V.length&&V.shift(),V.push(t)},J=(t,i)=>{let e;void 0===t&&(t=60),void 0===i&&(i="JSON"),e=!Number.isInteger(t)||t>60||t<=0?60:t;const s={client:"@millicast/millicast-sdk",version:C,timestamp:(new Date).toISOString(),userAgent:R,clusterId:F,accountId:D,streamName:N,subscriberId:B,connection:O,stats:V.slice(-e),connectionDurationMs:(new Date).getTime()-U};return""!==L?s.feedId=L:""!==M&&(s.streamViewId=M),"CMCD"===i?function(t){function i(t,i){return{ts:_.round(i.timestamp)||"",ot:"audio"===t?"a":"v",bl:i.jitterBufferDelay||0,br:_.round(i.bitrateBitsPerSecond||0),pld:i.packetsLostDeltaPerSecond||0,j:i.jitter||0,mtp:i.packetRate||0,mid:i.mid||"",mimeType:i.mimeType||""}}return t.stats=t.stats.reduce((t,e)=>{const s=0!==e.audio.inbounds.length?e.audio.inbounds.map(t=>i("audio",t)):e.audio.outbounds.map(t=>i("audio",t)),n=0!==e.video.inbounds.length?e.video.inbounds.map(t=>i("video",t)):e.video.outbounds.map(t=>i("video",t));return t.concat([...s,...n])},[]),t}(s):s};I.useDefaults({defaultLevel:I.TRACE});const Z=["TRACE","DEBUG","INFO","WARN","ERROR"],tt=(t,i)=>{t.unshift("[".concat(i.name||"Global","] ").concat((new Date).toISOString()," - ").concat(i.level.name," -"))},it=(t,i)=>i?t.value>=ht[i].value:t.value>=rt.value,et=I.createDefaultHandler({formatter:tt});I.setHandler((t,i)=>{((t,i)=>{t=(t=Array.prototype.slice.call(t)).map(t=>"object"==typeof t?JSON.stringify(t):t),tt(t,i),0!==st?(nt.push(t.join(" ")),nt.length>=st&&(nt=nt.slice(-st))):nt=[]})(t,i),it(i.level,i.name)&&et(t,i);for(const{handler:e,level:s}of ot)i.level.value>=s.value&&e(t,i)});let st=1e4,nt=[],rt=I.OFF;const ht={},ot=[],at=f(l({},I),{enabledFor:it,getHistory:()=>nt,getHistoryMaxSize:()=>st,setHistoryMaxSize:t=>{st=t},setLevel:t=>{rt=t;for(const i in ht)ht[i]=t},getLevel:()=>rt,get:t=>{ht[t]||(ht[t]=rt);const i=I.get(t);return i.setLevel=i=>{ht[t]=i},i.getLevel=()=>ht[t],i},setHandler:(t,i)=>{ot.push({handler:t,level:i})},diagnose:t=>{let i;void 0===t&&(t={});const e={statsCount:60,historySize:1e3,minLogLevel:"TRACE",statsFormat:"JSON"};"number"==typeof t?(e.statsCount=t,i=e):i=l(l({},e),t);const{statsCount:s,historySize:n,minLogLevel:r,statsFormat:h}=i,o=J(s,h),a=at.getHistory();if(!Number.isInteger(n)||n<=0)throw new m("Invalid Argument Exception : historySize must be a positive integer.");if(!Z.includes(r.toUpperCase()))throw new m('Invalid Argument Exception : the minLogLevel parameter only excepts "trace", "debug", "info", "warn", and "error" as arguments.');if(Z.includes(r.toUpperCase())){const t=Z.slice(Z.indexOf(r.toUpperCase())),i=a.filter(i=>t.some(t=>i.includes(t)));o.history=i.slice(-n)}return o},JSON:"JSON",CMCD:"CMCD",VERSION:C});var ut,ct={exports:{}};function dt(){if(ut)return ct.exports;ut=1;var t,i="object"==typeof Reflect?Reflect:null,e=i&&"function"==typeof i.apply?i.apply:function(t,i,e){return Function.prototype.apply.call(t,i,e)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:w.getOwnPropertySymbols?function(t){return w.getOwnPropertyNames(t).concat(w.getOwnPropertySymbols(t))}:function(t){return w.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function n(){n.init.call(this)}ct.exports=n,ct.exports.once=function(t,i){return new Promise(function(e,s){function n(e){t.removeListener(i,r),s(e)}function r(){"function"==typeof t.removeListener&&t.removeListener("error",n),e([].slice.call(arguments))}v(t,i,r,{once:!0}),"error"!==i&&function(t,i,e){"function"==typeof t.on&&v(t,"error",i,e)}(t,n,{once:!0})})},n.EventEmitter=n,n.prototype.Zf=void 0,n.prototype.$f=0,n.prototype.rv=void 0;var r=10;function h(t){if("function"!=typeof t)throw new g('The "listener" argument must be of type Function. Received type '+typeof t)}function o(t){return void 0===t.rv?n.defaultMaxListeners:t.rv}function a(t,i,e,s){var n,r,a;if(h(e),void 0===(r=t.Zf)?(r=t.Zf=w.create(null),t.$f=0):(void 0!==r.newListener&&(t.emit("newListener",i,e.listener?e.listener:e),r=t.Zf),a=r[i]),void 0===a)a=r[i]=e,++t.$f;else if("function"==typeof a?a=r[i]=s?[e,a]:[a,e]:s?a.unshift(e):a.push(e),(n=o(t))>0&&a.length>n&&!a.warned){a.warned=!0;var u=new m("Possible EventEmitter memory leak detected. "+a.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=i,u.count=a.length,function(t){console&&console.warn&&console.warn(t)}(u)}return t}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(t,i,e){var s={fired:!1,wrapFn:void 0,target:t,type:i,listener:e},n=u.bind(s);return n.listener=e,s.wrapFn=n,n}function d(t,i,e){var s=t.Zf;if(void 0===s)return[];var n=s[i];return void 0===n?[]:"function"==typeof n?e?[n.listener||n]:[n]:e?function(t){for(var i=new Array(t.length),e=0;e0&&(h=i[0]),h instanceof m)throw h;var o=new m("Unhandled error."+(h?" ("+h.message+")":""));throw o.context=h,o}var a=r[t];if(void 0===a)return!1;if("function"==typeof a)e(a,this,i);else{var u=a.length,c=f(a,u);for(s=0;s=0;r--)if(e[r]===i||e[r].listener===i){o=e[r].listener,n=r;break}if(n<0)return this;0===n?e.shift():function(t,i){for(;i+1=0;s--)this.removeListener(t,i[s]);return this},n.prototype.listeners=function(t){return d(this,t,!0)},n.prototype.rawListeners=function(t){return d(this,t,!1)},n.listenerCount=function(t,i){return"function"==typeof t.listenerCount?t.listenerCount(i):l.call(t,i)},n.prototype.listenerCount=l,n.prototype.eventNames=function(){return this.$f>0?t(this.Zf):[]},ct.exports}const lt=A(dt());var ft,vt={exports:{}};var _t=function(){if(ft)return vt.exports;ft=1,vt.exports=i,vt.exports.filter=function(e,s){var n=new t;return i(e,n,s),n};var t=dt().EventEmitter;function i(t,i,e){Array.isArray(e)||(e=[e]);var s=[];return e.forEach(function(e){var n=function(){var t=[].slice.call(arguments);t.unshift(e),i.emit.apply(i,t)};s.push(n),t.on(e,n)}),function(){e.forEach(function(i,e){t.removeListener(i,s[e])})}}return vt.exports}();const gt=A(_t);var pt,mt={exports:{}};var wt=(pt||(pt=1,function(t){var i;self,i=()=>{return t={7:t=>{var i,e="object"==typeof Reflect?Reflect:null,s=e&&"function"==typeof e.apply?e.apply:function(t,i,e){return Function.prototype.apply.call(t,i,e)};i=e&&"function"==typeof e.ownKeys?e.ownKeys:w.getOwnPropertySymbols?function(t){return w.getOwnPropertyNames(t).concat(w.getOwnPropertySymbols(t))}:function(t){return w.getOwnPropertyNames(t)};var n=Number.isNaN||function(t){return t!=t};function r(){r.init.call(this)}t.exports=r,t.exports.once=function(t,i){return new Promise(function(e,s){function n(e){t.removeListener(i,r),s(e)}function r(){"function"==typeof t.removeListener&&t.removeListener("error",n),e([].slice.call(arguments))}var h,o;_(t,i,r,{once:!0}),"error"!==i&&(o=n,"function"==typeof(h=t).on&&_(h,"error",o,{once:!0}))})},r.EventEmitter=r,r.prototype.Zf=void 0,r.prototype.$f=0,r.prototype.rv=void 0;var h=10;function o(t){if("function"!=typeof t)throw new g('The "listener" argument must be of type Function. Received type '+typeof t)}function a(t){return void 0===t.rv?r.defaultMaxListeners:t.rv}function u(t,i,e,s){var n,r,h,u;if(o(e),void 0===(r=t.Zf)?(r=t.Zf=w.create(null),t.$f=0):(void 0!==r.newListener&&(t.emit("newListener",i,e.listener?e.listener:e),r=t.Zf),h=r[i]),void 0===h)h=r[i]=e,++t.$f;else if("function"==typeof h?h=r[i]=s?[e,h]:[h,e]:s?h.unshift(e):h.push(e),(n=a(t))>0&&h.length>n&&!h.warned){h.warned=!0;var c=new m("Possible EventEmitter memory leak detected. "+h.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=i,c.count=h.length,u=c,console&&console.warn&&console.warn(u)}return t}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,i,e){var s={fired:!1,wrapFn:void 0,target:t,type:i,listener:e},n=c.bind(s);return n.listener=e,s.wrapFn=n,n}function l(t,i,e){var s=t.Zf;if(void 0===s)return[];var n=s[i];return void 0===n?[]:"function"==typeof n?e?[n.listener||n]:[n]:e?function(t){for(var i=new Array(t.length),e=0;e0&&(h=i[0]),h instanceof m)throw h;var o=new m("Unhandled error."+(h?" ("+h.message+")":""));throw o.context=h,o}var a=r[t];if(void 0===a)return!1;if("function"==typeof a)s(a,this,i);else{var u=a.length,c=v(a,u);for(e=0;e=0;r--)if(e[r]===i||e[r].listener===i){h=e[r].listener,n=r;break}if(n<0)return this;0===n?e.shift():function(t,i){for(;i+1=0;s--)this.removeListener(t,i[s]);return this},r.prototype.listeners=function(t){return l(this,t,!0)},r.prototype.rawListeners=function(t){return l(this,t,!1)},r.listenerCount=function(t,i){return"function"==typeof t.listenerCount?t.listenerCount(i):f.call(t,i)},r.prototype.listenerCount=f,r.prototype.eventNames=function(){return this.$f>0?i(this.Zf):[]}},156:function(t,i,e){var s=this&&this.hv||(w.create?function(t,i,e,s){void 0===s&&(s=e);var n=w.getOwnPropertyDescriptor(i,e);n&&!("get"in n?!i.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return i[e]}}),w.defineProperty(t,s,n)}:function(t,i,e,s){void 0===s&&(s=e),t[s]=i[e]}),n=this&&this.ov||function(t,i){for(var e in t)"default"===e||w.prototype.hasOwnProperty.call(i,e)||s(i,t,e)},r=this&&this.uv||function(t){return t&&t.__esModule?t:{default:t}};w.defineProperty(i,"__esModule",{value:!0}),i.Logger=void 0;var h=e(586);w.defineProperty(i,"Logger",{enumerable:!0,get:function(){return r(h).default}}),n(e(284),i),n(e(280),i),n(e(738),i),n(e(767),i)},185:(t,i)=>{w.defineProperty(i,"__esModule",{value:!0}),i.calculatePacketsLostRatio=i.calculateRate=i.getMediaKind=void 0,i.getMediaKind=t=>{let i=t.kind||t.mediaType;return["audio","video"].includes(i)||"inbound-rtp"!==t.type||(i=t.id.toLocaleLowerCase().includes("video")?"video":"audio"),i},i.calculateRate=(t,i,e,s)=>e&&s?(i-s)/((t-e)/1e3):0,i.calculatePacketsLostRatio=(t,i,e,s)=>{const n=t-(null!=e?e:0),r=n+(i-(null!=s?s:0));return 0===r?0:n/r}},280:(t,i)=>{w.defineProperty(i,"__esModule",{value:!0})},284:function(t,i,e){var s,n,r,h,o,a,u,c,d,l,f,_,m,y,b,A,S=this&&this.fv||function(t,i,e,s){return new(e||(e=Promise))(function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e(function(t){t(i)})).then(h,o)}a((s=s.apply(t,i||[])).next())})},T=this&&this.vv||function(t,i,e,s,n){if("m"===s)throw new g("Private method is not writable");if("a"===s&&!n)throw new g("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!n:!i.has(t))throw new g("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,e):n?n.value=e:i.set(t,e),e},k=this&&this._v||function(t,i,e,s){if("a"===e&&!s)throw new g("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new g("Cannot read private member from an object whose class did not declare it");return"m"===e?s:"a"===e?s.call(t):s?s.value:i.get(t)},E=this&&this.uv||function(t){return t&&t.__esModule?t:{default:t}};w.defineProperty(i,"__esModule",{value:!0}),i.WebRTCStats=void 0;const x=e(7),P=E(e(586)),I=e(738),C=e(185);class R extends x.EventEmitter{constructor(t){super(),s.add(this),n.set(this,void 0),r.set(this,void 0),h.set(this,void 0),o.set(this,null),a.set(this,void 0),u.set(this,null),this.start=()=>{k(this,a,"f").info("WebRTC statistics collection is starting..."),T(this,u,null,"f"),T(this,o,v(k(this,c,"f"),k(this,r,"f")),"f")},this.stop=()=>{k(this,o,"f")&&(p(k(this,o,"f")),T(this,o,null,"f"),k(this,a,"f").info("WebRTC statistics collection has stopped."))},c.set(this,()=>S(this,void 0,void 0,function*(){let t,i;try{k(this,a,"f").trace("Requesting WebRTC statistics..."),t=yield k(this,n,"f").call(this),i=(new Date).toISOString()}catch(t){return k(this,a,"f").error("Problem collecting the WebRTC statistics.",t),void this.emit("error","Problem collecting the WebRTC statistics - ".concat(t))}const e=Array.from(t.values()),r={timestamp:i,input:{audio:[],video:[]},output:{audio:[],video:[]}};k(this,h,"f")&&(r.rawStats=t);for(let i=0;it.id===i.id);if(r&&i.timestamp-r.timestamp<=0)return;const h=yield k(this,s,"m",l).call(this,t,i,r),o=w.assign({},h);e.output.audio.push(o)})},_=function(t,i,e){return S(this,void 0,void 0,function*(){var n;const r=null===(n=k(this,u,"f"))||void 0===n?void 0:n.output.video.find(t=>t.id===i.id);if(r&&i.timestamp-r.timestamp<=0)return;const h=yield k(this,s,"m",l).call(this,t,i,r);let o=I.QualityLimitationReason.none;i.qualityLimitationReason&&(o=i.qualityLimitationReason);const a=w.assign(w.assign({},h),{frameWidth:i.frameWidth,frameHeight:i.frameHeight,framesPerSecond:i.framesPerSecond,framesSent:i.framesSent,qualityLimitationReason:o,qualityLimitationDurations:i.qualityLimitationDurations});e.output.video.push(a)})},m=function(t,i,e){return S(this,void 0,void 0,function*(){var n,r;const h=(0,C.calculateRate)(i.timestamp,i.bytesReceived,null==e?void 0:e.timestamp,null==e?void 0:e.totalBytesReceived),o=(0,C.calculateRate)(i.timestamp,i.packetsReceived,null==e?void 0:e.timestamp,null==e?void 0:e.totalPacketsReceived),a=(0,C.calculatePacketsLostRatio)(i.packetsLost,i.packetsReceived,null==e?void 0:e.totalPacketsLost,null==e?void 0:e.totalPacketsReceived),u=(null!==(n=i.packetsLost)&&void 0!==n?n:0)-(null!==(r=null==e?void 0:e.totalPacketsLost)&&void 0!==r?r:0),c=k(this,s,"m",d).call(this,t,i.codecId);return w.assign({id:i.id,timestamp:i.timestamp,mid:i.mid,trackIdentifier:i.trackIdentifier,jitter:i.jitter,jitterBufferDelay:i.jitterBufferDelay,jitterBufferEmittedCount:i.jitterBufferEmittedCount,totalBytesReceived:i.bytesReceived,totalPacketsReceived:i.packetsReceived,totalPacketsLost:i.packetsLost,bitrate:h,packetRate:o,packetLossRatio:a,packetLossDelta:u},c)})},y=function(t,i,e){return S(this,void 0,void 0,function*(){var n;const r=null===(n=k(this,u,"f"))||void 0===n?void 0:n.input.audio.find(t=>t.id===i.id);if(r&&i.timestamp-r.timestamp<=0)return;const h=yield k(this,s,"m",m).call(this,t,i,r);e.input.audio.push(h)})},b=function(t,i,e){return S(this,void 0,void 0,function*(){var n;const r=null===(n=k(this,u,"f"))||void 0===n?void 0:n.input.video.find(t=>t.id===i.id);if(r&&i.timestamp-r.timestamp<=0)return;const h=yield k(this,s,"m",m).call(this,t,i,r),o=w.assign(w.assign({},h),{keyFramesDecoded:i.keyFramesDecoded,frameHeight:i.frameHeight,frameWidth:i.frameWidth,framesDecoded:i.framesDecoded,framesDropped:i.framesDropped,framesPerSecond:i.framesPerSecond,framesReceived:i.framesReceived});e.input.video.push(o)})},A=function(t,i){i.totalRoundTripTime=t.totalRoundTripTime,i.currentRoundTripTime=t.currentRoundTripTime,i.responsesReceived=t.responsesReceived,i.availableOutgoingBitrate=t.availableOutgoingBitrate,i.availableIncomingBitrate=t.availableIncomingBitrate}},586:function(t,i,e){var s,n;!function(){var r,h={VERSION:"1.6.1"},o={},a=function(t,i){return function(){return i.apply(t,arguments)}},u=function(){var t,i,e=arguments,s=e[0];for(i=1;i=i.value},trace:function(){this.invoke(h.TRACE,arguments)},debug:function(){this.invoke(h.DEBUG,arguments)},info:function(){this.invoke(h.INFO,arguments)},warn:function(){this.invoke(h.WARN,arguments)},error:function(){this.invoke(h.ERROR,arguments)},time:function(t){"string"==typeof t&&t.length>0&&this.invoke(h.TIME,[t,"start"])},timeEnd:function(t){"string"==typeof t&&t.length>0&&this.invoke(h.TIME,[t,"end"])},invoke:function(t,i){r&&this.enabledFor(t)&&r(i,u({level:t},this.context))}};var l,f=new d({filterLevel:h.OFF});(l=h).enabledFor=a(f,f.enabledFor),l.trace=a(f,f.trace),l.debug=a(f,f.debug),l.time=a(f,f.time),l.timeEnd=a(f,f.timeEnd),l.info=a(f,f.info),l.warn=a(f,f.warn),l.error=a(f,f.error),l.log=l.info,h.setHandler=function(t){r=t},h.setLevel=function(t){for(var i in f.setLevel(t),o)o.hasOwnProperty(i)&&o[i].setLevel(t)},h.getLevel=function(){return f.getLevel()},h.get=function(t){return o[t]||(o[t]=new d(u({name:t},f.context)))},h.createDefaultHandler=function(t){(t=t||{}).formatter=t.formatter||function(t,i){i.name&&t.unshift("["+i.name+"]")};var i={},e=function(t,i){Function.prototype.apply.call(t,console,i)};return typeof console>"u"?function(){}:function(s,n){s=Array.prototype.slice.call(s);var r,o=console.log;n.level===h.TIME?(r=(n.name?"["+n.name+"] ":"")+s[0],"start"===s[1]?console.time?console.time(r):i[r]=(new Date).getTime():console.timeEnd?console.timeEnd(r):e(o,[r+": "+((new Date).getTime()-i[r])+"ms"])):(n.level===h.WARN&&console.warn?o=console.warn:n.level===h.ERROR&&console.error?o=console.error:n.level===h.INFO&&console.info?o=console.info:n.level===h.DEBUG&&console.debug?o=console.debug:n.level===h.TRACE&&console.trace&&(o=console.trace),t.formatter(s,n),e(o,s))}},h.useDefaults=function(t){h.setLevel(t&&t.defaultLevel||h.DEBUG),h.setHandler(h.createDefaultHandler(t))},h.setDefaults=h.useDefaults,void 0===(n="function"==typeof(s=h)?s.call(i,e,i,t):s)||(t.exports=n)}()},738:(t,i)=>{var e,s;w.defineProperty(i,"__esModule",{value:!0}),i.QualityLimitationReason=void 0,(s=e||(i.QualityLimitationReason=e={}))[s.none=0]="none",s[s.cpu=1]="cpu",s[s.bandwidth=2]="bandwidth",s[s.other=3]="other"},767:(t,i)=>{w.defineProperty(i,"__esModule",{value:!0})}},i={},function e(s){var n=i[s];if(void 0!==n)return n.exports;var r=i[s]={exports:{}};return t[s].call(r.exports,r,r.exports,e),r.exports}(156);var t,i},t.exports=i()}(mt)),mt.exports);const yt=at.get("PeerConnectionStats"),bt="stats";class At extends lt{init(t){if(this.initialized)return void yt.warn("PeerConnectionStats.init() has already been called. Automatic initialization occurs when the PeerConnectionStats object is constructed.");yt.info("Initializing peer connection stats");const i=this.peer;try{this.collection=new wt.WebRTCStats({getStatsInterval:t,getStats:()=>i.getStats(),includeRawStats:!0}),this.collection.on("stats",t=>{const i=(t=>{const i=t,{input:e,output:s,rawStats:n}=i,r=y(i,["input","output","rawStats"]);return f(l({},r),{audio:{inbounds:t.input.audio.map(t=>{var i=t,{packetLossRatio:e,packetLossDelta:s,bitrate:n}=i,r=y(i,["packetLossRatio","packetLossDelta","bitrate"]);return l({packetsLostRatioPerSecond:e,packetsLostDeltaPerSecond:s,bitrateBitsPerSecond:8*n,bitrate:n},r)}),outbounds:t.output.audio.map(t=>{var i=t,{packetLossRatio:e,packetLossDelta:s,bitrate:n}=i,r=y(i,["packetLossRatio","packetLossDelta","bitrate"]);return l({packetsLostRatioPerSecond:e,packetsLostDeltaPerSecond:s,bitrateBitsPerSecond:8*n,bitrate:n},r)})},video:{inbounds:t.input.video.map(t=>{var i=t,{packetLossRatio:e,packetLossDelta:s,bitrate:n}=i,r=y(i,["packetLossRatio","packetLossDelta","bitrate"]);return l({packetsLostRatioPerSecond:e,packetsLostDeltaPerSecond:s,bitrateBitsPerSecond:8*n,bitrate:n},r)}),outbounds:t.output.video.map(t=>{var i=t,{packetLossRatio:e,packetLossDelta:s,bitrate:n}=i,r=y(i,["packetLossRatio","packetLossDelta","bitrate"]);return l({packetsLostRatioPerSecond:e,packetsLostDeltaPerSecond:s,bitrateBitsPerSecond:8*n,bitrate:n},r)})},raw:t.rawStats})})(t);Y(i),this.emit(bt,i)}),this.collection.start(),this.initialized=!0}catch(t){yt.error(t)}}parseStats(t){return yt.warn("The parseStats method is deprecated and will be removed in future releases."),null}stop(){yt.info("Stopping peer connection stats"),this.collection.stop()}constructor(t,i={statsIntervalMs:1e3,autoInitStats:!0}){super(),this.peer=t,this.collection=null,this.initialized=!1,i.autoInitStats&&this.init(i.statsIntervalMs)}}var St,Tt,kt,Et,xt,Pt,It,Ct,Rt,Dt,Nt,Bt,Mt,Lt,Ot,Ft,Ut,Vt,Ht,Wt,qt,zt={},Gt={},Xt={},jt={exports:{}};function Qt(){if(St)return jt.exports;St=1;var t=jt.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(t){return t.encoding?"rtpmap:%d %s/%s/%s":t.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(t){return null!=t.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(t){return null!=t.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(t){return"extmap:%d"+(t.direction?"/%s":"%v")+(t["encrypt-uri"]?" %s":"%v")+" %s"+(t.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(t){return null!=t.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(t){var i="candidate:%s %d %s %d %s %d typ %s";return i+=null!=t.raddr?" raddr %s rport %d":"%v%v",i+=null!=t.tcptype?" tcptype %s":"%v",null!=t.generation&&(i+=" generation %d"),i+=null!=t["network-id"]?" network-id %d":"%v",i+=null!=t["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(t){var i="ssrc:%d";return null!=t.attribute&&(i+=" %s",null!=t.value&&(i+=":%s")),i}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(t){return null!=t.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(t){return t.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(t){return"imageattr:%s %s %s"+(t.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(t){return"simulcast:%s %s"+(t.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(t){return"ts-refclk:%s"+(null!=t.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(t){var i="mediaclk:";return i+=null!=t.id?"id=%s %s":"%v%s",i+=null!=t.mediaClockValue?"=%s":"",i+=null!=t.rateNumerator?" rate=%s":"",i+=null!=t.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};return w.keys(t).forEach(function(i){t[i].forEach(function(t){t.reg||(t.reg=/(.*)/),t.format||(t.format="%s")})}),jt.exports}function Kt(){return Tt||(Tt=1,function(t){var i=function(t){return String(Number(t))===t?Number(t):t},e=function(t,e,s){var n=t.name&&t.names;t.push&&!e[t.push]?e[t.push]=[]:n&&!e[t.name]&&(e[t.name]={});var r=t.push?{}:n?e[t.name]:e;(function(t,e,s,n){if(n&&!s)e[n]=i(t[1]);else for(var r=0;r1&&(t[s[0]]=void 0),t};t.parseParams=function(t){return t.split(/;\s?/).reduce(r,{})},t.parseFmtpConfig=t.parseParams,t.parsePayloads=function(t){return t.toString().split(" ").map(Number)},t.parseRemoteCandidates=function(t){for(var e=[],s=t.split(" ").map(i),n=0;n=n)return t;var i=s[e];switch(e+=1,t){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}})},s=function(t,i,s){var n=[t+"="+(i.format instanceof Function?i.format(i.push?s:s[i.name]):i.format)];if(i.names)for(var r=0;r0?o-4:o;for(n=0;n>16&255,u[c++]=s>>8&255,u[c++]=255&s;return 2===a&&(s=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[c++]=255&s),1===a&&(s=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[c++]=s>>8&255,u[c++]=255&s),u},ai.fromByteArray=function(i){for(var e,s=i.length,n=s%3,r=[],h=16383,a=0,u=s-n;au?u:a+h));return 1===n?(e=i[s-1],r.push(t[e>>2]+t[e<<4&63]+"==")):2===n&&(e=(i[s-2]<<8)+i[s-1],r.push(t[e>>10]+t[e>>4&63]+t[e<<2&63]+"=")),r.join("")};for(var t=[],i=[],e=typeof j<"u"?j:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0;n<64;++n)t[n]=s[n],i[s.charCodeAt(n)]=n;function r(t){var i=t.length;if(i%4>0)throw new m("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=i),[e,e===i?0:4-e%4]}function h(i){return t[i>>18&63]+t[i>>12&63]+t[i>>6&63]+t[63&i]}function o(t,i,e){for(var s,n=[],r=i;r>1,c=-7,d=e?n-1:0,l=e?-1:1,f=t[i+d];for(d+=l,r=f&(1<<-c)-1,f>>=-c,c+=o;c>0;r=256*r+t[i+d],d+=l,c-=8);for(h=r&(1<<-c)-1,r>>=-c,c+=s;c>0;h=256*h+t[i+d],d+=l,c-=8);if(0===r)r=1-u;else{if(r===a)return h?NaN:1/0*(f?-1:1);h+=_.pow(2,s),r-=u}return(f?-1:1)*h*_.pow(2,r-s)},Wi.write=function(t,i,e,s,n,r){var h,o,a,u=8*r-n-1,c=(1<>1,l=23===n?_.pow(2,-24)-_.pow(2,-77):0,f=s?0:r-1,v=s?1:-1,g=i<0||0===i&&1/i<0?1:0;for(i=_.abs(i),S(i)||i===1/0?(o=S(i)?1:0,h=c):(h=_.floor(_.log(i)/_.LN2),i*(a=_.pow(2,-h))<1&&(h--,a*=2),(i+=h+d>=1?l/a:l*_.pow(2,1-d))*a>=2&&(h++,a/=2),h+d>=c?(o=0,h=c):h+d>=1?(o=(i*a-1)*_.pow(2,n),h+=d):(o=i*_.pow(2,d-1)*_.pow(2,n),h=0));n>=8;t[e+f]=255&o,f+=v,o/=256,n-=8);for(h=h<0;t[e+f]=255&h,f+=v,h/=256,u-=8);t[e+f-v]|=128*g}),Wi),s="function"==typeof Io&&"function"==typeof td?td("nodejs.util.inspect.custom"):null;t.Buffer=h,t.SlowBuffer=function(t){return+t!=t&&(t=0),h.alloc(+t)},t.INSPECT_MAX_BYTES=50;const n=2147483647;function r(t){if(t>n)throw new RangeError('The value "'+t+'" is invalid for option "size"');const i=new j(t);return w.setPrototypeOf(i,h.prototype),i}function h(t,i,e){if("number"==typeof t){if("string"==typeof i)throw new g('The "string" argument must be of type string. Received type number');return u(t)}return o(t,i,e)}function o(t,i,e){if("string"==typeof t)return function(t,i){if(("string"!=typeof i||""===i)&&(i="utf8"),!h.isEncoding(i))throw new g("Unknown encoding: "+i);const e=0|f(t,i);let s=r(e);const n=s.write(t,i);return n!==e&&(s=s.slice(0,n)),s}(t,i);if(ArrayBuffer.isView(t))return function(t){if(tt(t,j)){const i=new j(t);return d(i.buffer,i.byteOffset,i.byteLength)}return c(t)}(t);if(null==t)throw new g("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(tt(t,ArrayBuffer)||t&&tt(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tt(t,SharedArrayBuffer)||t&&tt(t.buffer,SharedArrayBuffer)))return d(t,i,e);if("number"==typeof t)throw new g('The "value" argument must not be of type number. Received type number');const s=t.valueOf&&t.valueOf();if(null!=s&&s!==t)return h.from(s,i,e);const n=function(t){if(h.isBuffer(t)){const i=0|l(t.length),e=r(i);return 0===e.length||t.copy(e,0,0,i),e}if(void 0!==t.length)return"number"!=typeof t.length||it(t.length)?r(0):c(t);if("Buffer"===t.type&&Array.isArray(t.data))return c(t.data)}(t);if(n)return n;if(typeof Io<"u"&&null!=Io.toPrimitive&&"function"==typeof t[Io.toPrimitive])return h.from(t[Io.toPrimitive]("string"),i,e);throw new g("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function a(t){if("number"!=typeof t)throw new g('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return a(t),r(t<0?0:0|l(t))}function c(t){const i=t.length<0?0:0|l(t.length),e=r(i);for(let s=0;s=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|t}function f(t,i){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||tt(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new g('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const e=t.length,s=arguments.length>2&&!0===arguments[2];if(!s&&0===e)return 0;let n=!1;for(;;)switch(i){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return J(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return Z(t).length;default:if(n)return s?-1:J(t).length;i=(""+i).toLowerCase(),n=!0}}function v(t,i,e){let s=!1;if((void 0===i||i<0)&&(i=0),i>this.length||((void 0===e||e>this.length)&&(e=this.length),e<=0)||(e>>>=0)<=(i>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return B(this,i,e);case"utf8":case"utf-8":return C(this,i,e);case"ascii":return D(this,i,e);case"latin1":case"binary":return N(this,i,e);case"base64":return I(this,i,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,i,e);default:if(s)throw new g("Unknown encoding: "+t);t=(t+"").toLowerCase(),s=!0}}function p(t,i,e){const s=t[i];t[i]=t[e],t[e]=s}function y(t,i,e,s,n){if(0===t.length)return-1;if("string"==typeof e?(s=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),it(e=+e)&&(e=n?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(n)return-1;e=t.length-1}else if(e<0){if(!n)return-1;e=0}if("string"==typeof i&&(i=h.from(i,s)),h.isBuffer(i))return 0===i.length?-1:b(t,i,e,s,n);if("number"==typeof i)return i&=255,"function"==typeof j.prototype.indexOf?n?j.prototype.indexOf.call(t,i,e):j.prototype.lastIndexOf.call(t,i,e):b(t,[i],e,s,n);throw new g("val must be string, number or Buffer")}function b(t,i,e,s,n){let r,h=1,o=t.length,a=i.length;if(void 0!==s&&("ucs2"===(s=String(s).toLowerCase())||"ucs-2"===s||"utf16le"===s||"utf-16le"===s)){if(t.length<2||i.length<2)return-1;h=2,o/=2,a/=2,e/=2}function u(t,i){return 1===h?t[i]:t.readUInt16BE(i*h)}if(n){let s=-1;for(r=e;ro&&(e=o-a),r=e;r>=0;r--){let e=!0;for(let s=0;sn&&(s=n):s=n;const r=i.length;let h;for(s>r/2&&(s=r/2),h=0;h>8,n=e%256,r.push(n),r.push(s);return r}(i,t.length-e),t,e,s)}function I(t,e,s){return 0===e&&s===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,s))}function C(t,i,e){e=_.min(t.length,e);const s=[];let n=i;for(;n239?4:i>223?3:i>191?2:1;if(n+h<=e){let e,s,o,a;switch(h){case 1:i<128&&(r=i);break;case 2:e=t[n+1],128==(192&e)&&(a=(31&i)<<6|63&e,a>127&&(r=a));break;case 3:e=t[n+1],s=t[n+2],128==(192&e)&&128==(192&s)&&(a=(15&i)<<12|(63&e)<<6|63&s,a>2047&&(a<55296||a>57343)&&(r=a));break;case 4:e=t[n+1],s=t[n+2],o=t[n+3],128==(192&e)&&128==(192&s)&&128==(192&o)&&(a=(15&i)<<18|(63&e)<<12|(63&s)<<6|63&o,a>65535&&a<1114112&&(r=a))}}null===r?(r=65533,h=1):r>65535&&(r-=65536,s.push(r>>>10&1023|55296),r=56320|1023&r),s.push(r),n+=h}return function(t){const i=t.length;if(i<=R)return String.fromCharCode.apply(String,t);let e="",s=0;for(;ss.length?(h.isBuffer(i)||(i=h.from(i)),i.copy(s,n)):j.prototype.set.call(s,i,n);else{if(!h.isBuffer(i))throw new g('"list" argument must be an Array of Buffers');i.copy(s,n)}n+=i.length}return s},h.byteLength=f,h.prototype.mv=!0,h.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let i=0;ie&&(i+=" ... "),""},s&&(h.prototype[s]=h.prototype.inspect),h.prototype.compare=function(t,i,e,s,n){if(tt(t,j)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw new g('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===i&&(i=0),void 0===e&&(e=t?t.length:0),void 0===s&&(s=0),void 0===n&&(n=this.length),i<0||e>t.length||s<0||n>this.length)throw new RangeError("out of range index");if(s>=n&&i>=e)return 0;if(s>=n)return-1;if(i>=e)return 1;if(this===t)return 0;let r=(n>>>=0)-(s>>>=0),o=(e>>>=0)-(i>>>=0);const a=_.min(r,o),u=this.slice(s,n),c=t.slice(i,e);for(let t=0;t>>=0,isFinite(e)?(e>>>=0,void 0===s&&(s="utf8")):(s=e,e=void 0)}const n=this.length-i;if((void 0===e||e>n)&&(e=n),t.length>0&&(e<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");s||(s="utf8");let r=!1;for(;;)switch(s){case"hex":return A(this,t,i,e);case"utf8":case"utf-8":return T(this,t,i,e);case"ascii":case"latin1":case"binary":return k(this,t,i,e);case"base64":return E(this,t,i,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,i,e);default:if(r)throw new g("Unknown encoding: "+s);s=(""+s).toLowerCase(),r=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this.yv||this,0)}};const R=4096;function D(t,i,e){let s="";e=_.min(t.length,e);for(let n=i;ns)&&(e=s);let n="";for(let s=i;se)throw new RangeError("Trying to access beyond buffer length")}function O(t,i,e,s,n,r){if(!h.isBuffer(t))throw new g('"buffer" argument must be a Buffer instance');if(i>n||it.length)throw new RangeError("Index out of range")}function F(t,i,e,s,n){X(i,s,n,t,e,7);let r=Number(i&BigInt(4294967295));t[e++]=r,r>>=8,t[e++]=r,r>>=8,t[e++]=r,r>>=8,t[e++]=r;let h=Number(i>>BigInt(32)&BigInt(4294967295));return t[e++]=h,h>>=8,t[e++]=h,h>>=8,t[e++]=h,h>>=8,t[e++]=h,e}function U(t,i,e,s,n){X(i,s,n,t,e,7);let r=Number(i&BigInt(4294967295));t[e+7]=r,r>>=8,t[e+6]=r,r>>=8,t[e+5]=r,r>>=8,t[e+4]=r;let h=Number(i>>BigInt(32)&BigInt(4294967295));return t[e+3]=h,h>>=8,t[e+2]=h,h>>=8,t[e+1]=h,h>>=8,t[e]=h,e+8}function V(t,i,e,s,n,r){if(e+s>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function H(t,i,s,n,r){return i=+i,s>>>=0,r||V(t,0,s,4),e.write(t,i,s,n,23,4),s+4}function W(t,i,s,n,r){return i=+i,s>>>=0,r||V(t,0,s,8),e.write(t,i,s,n,52,8),s+8}h.prototype.slice=function(t,i){const e=this.length;(t=~~t)<0?(t+=e)<0&&(t=0):t>e&&(t=e),(i=void 0===i?e:~~i)<0?(i+=e)<0&&(i=0):i>e&&(i=e),i>>=0,i>>>=0,e||L(t,i,this.length);let s=this[t],n=1,r=0;for(;++r>>=0,i>>>=0,e||L(t,i,this.length);let s=this[t+--i],n=1;for(;i>0&&(n*=256);)s+=this[t+--i]*n;return s},h.prototype.readUint8=h.prototype.readUInt8=function(t,i){return t>>>=0,i||L(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,i){return t>>>=0,i||L(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,i){return t>>>=0,i||L(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,i){return t>>>=0,i||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,i){return t>>>=0,i||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readBigUInt64LE=st(function(t){Q(t>>>=0,"offset");const i=this[t],e=this[t+7];(void 0===i||void 0===e)&&K(t,this.length-8);const s=i+256*this[++t]+65536*this[++t]+this[++t]*2**24,n=this[++t]+256*this[++t]+65536*this[++t]+e*2**24;return BigInt(s)+(BigInt(n)<>>=0,"offset");const i=this[t],e=this[t+7];(void 0===i||void 0===e)&&K(t,this.length-8);const s=i*2**24+65536*this[++t]+256*this[++t]+this[++t],n=this[++t]*2**24+65536*this[++t]+256*this[++t]+e;return(BigInt(s)<>>=0,i>>>=0,e||L(t,i,this.length);let s=this[t],n=1,r=0;for(;++r=n&&(s-=_.pow(2,8*i)),s},h.prototype.readIntBE=function(t,i,e){t>>>=0,i>>>=0,e||L(t,i,this.length);let s=i,n=1,r=this[t+--s];for(;s>0&&(n*=256);)r+=this[t+--s]*n;return n*=128,r>=n&&(r-=_.pow(2,8*i)),r},h.prototype.readInt8=function(t,i){return t>>>=0,i||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,i){t>>>=0,i||L(t,2,this.length);const e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},h.prototype.readInt16BE=function(t,i){t>>>=0,i||L(t,2,this.length);const e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},h.prototype.readInt32LE=function(t,i){return t>>>=0,i||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,i){return t>>>=0,i||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readBigInt64LE=st(function(t){Q(t>>>=0,"offset");const i=this[t],e=this[t+7];(void 0===i||void 0===e)&&K(t,this.length-8);const s=this[t+4]+256*this[t+5]+65536*this[t+6]+(e<<24);return(BigInt(s)<>>=0,"offset");const i=this[t],e=this[t+7];(void 0===i||void 0===e)&&K(t,this.length-8);const s=(i<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(s)<>>=0,i||L(t,4,this.length),e.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,i){return t>>>=0,i||L(t,4,this.length),e.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,i){return t>>>=0,i||L(t,8,this.length),e.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,i){return t>>>=0,i||L(t,8,this.length),e.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,i,e,s){if(t=+t,i>>>=0,e>>>=0,!s){O(this,t,i,e,_.pow(2,8*e)-1,0)}let n=1,r=0;for(this[i]=255&t;++r>>=0,e>>>=0,!s){O(this,t,i,e,_.pow(2,8*e)-1,0)}let n=e-1,r=1;for(this[i+n]=255&t;--n>=0&&(r*=256);)this[i+n]=t/r&255;return i+e},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,1,255,0),this[i]=255&t,i+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,2,65535,0),this[i]=255&t,this[i+1]=t>>>8,i+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,2,65535,0),this[i]=t>>>8,this[i+1]=255&t,i+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,4,4294967295,0),this[i+3]=t>>>24,this[i+2]=t>>>16,this[i+1]=t>>>8,this[i]=255&t,i+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,4,4294967295,0),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=255&t,i+4},h.prototype.writeBigUInt64LE=st(function(t,i){return void 0===i&&(i=0),F(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=st(function(t,i){return void 0===i&&(i=0),U(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(t,i,e,s){if(t=+t,i>>>=0,!s){const s=_.pow(2,8*e-1);O(this,t,i,e,s-1,-s)}let n=0,r=1,h=0;for(this[i]=255&t;++n>>=0,!s){const s=_.pow(2,8*e-1);O(this,t,i,e,s-1,-s)}let n=e-1,r=1,h=0;for(this[i+n]=255&t;--n>=0&&(r*=256);)t<0&&0===h&&0!==this[i+n+1]&&(h=1),this[i+n]=(t/r|0)-h&255;return i+e},h.prototype.writeInt8=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,1,127,-128),t<0&&(t=255+t+1),this[i]=255&t,i+1},h.prototype.writeInt16LE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,2,32767,-32768),this[i]=255&t,this[i+1]=t>>>8,i+2},h.prototype.writeInt16BE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,2,32767,-32768),this[i]=t>>>8,this[i+1]=255&t,i+2},h.prototype.writeInt32LE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,4,2147483647,-2147483648),this[i]=255&t,this[i+1]=t>>>8,this[i+2]=t>>>16,this[i+3]=t>>>24,i+4},h.prototype.writeInt32BE=function(t,i,e){return t=+t,i>>>=0,e||O(this,t,i,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=255&t,i+4},h.prototype.writeBigInt64LE=st(function(t,i){return void 0===i&&(i=0),F(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=st(function(t,i){return void 0===i&&(i=0),U(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeFloatLE=function(t,i,e){return H(this,t,i,!0,e)},h.prototype.writeFloatBE=function(t,i,e){return H(this,t,i,!1,e)},h.prototype.writeDoubleLE=function(t,i,e){return W(this,t,i,!0,e)},h.prototype.writeDoubleBE=function(t,i,e){return W(this,t,i,!1,e)},h.prototype.copy=function(t,i,e,s){if(!h.isBuffer(t))throw new g("argument should be a Buffer");if(e||(e=0),!s&&0!==s&&(s=this.length),i>=t.length&&(i=t.length),i||(i=0),s>0&&s=this.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),t.length-i>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(n=i;n=s+4;e-=3)i="_".concat(t.slice(e-3,e)).concat(i);return"".concat(t.slice(0,e)).concat(i)}function X(t,i,e,s,n,r){if(t>e||t= 0".concat(e," and < 2").concat(e," ** ").concat(8*(r+1)).concat(e):">= -(2".concat(e," ** ").concat(8*(r+1)-1).concat(e,") and < 2 ** ")+"".concat(8*(r+1)-1).concat(e),new q.ERR_OUT_OF_RANGE("value",s,t)}!function(t,i,e){Q(i,"offset"),(void 0===t[i]||void 0===t[i+e])&&K(i,t.length-(e+1))}(s,n,r)}function Q(t,i){if("number"!=typeof t)throw new q.ERR_INVALID_ARG_TYPE(i,"number",t)}function K(t,i,e){throw _.floor(t)!==t?(Q(t,e),new q.ERR_OUT_OF_RANGE("offset","an integer",t)):i<0?new q.ERR_BUFFER_OUT_OF_BOUNDS:new q.ERR_OUT_OF_RANGE("offset",">= 0 and <= ".concat(i),t)}z("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),z("ERR_INVALID_ARG_TYPE",function(t,i){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(typeof i)},g),z("ERR_OUT_OF_RANGE",function(t,i,e){let s='The value of "'.concat(t,'" is out of range.'),n=e;return Number.isInteger(e)&&_.abs(e)>2**32?n=G(String(e)):"bigint"==typeof e&&(n=String(e),(e>BigInt(2)**BigInt(32)||e<-(BigInt(2)**BigInt(32)))&&(n=G(n)),n+="n"),s+=" It must be ".concat(i,". Received ").concat(n),s},RangeError);const Y=/[^+/0-9A-Za-z-_]/g;function J(t,i){let e;i=i||1/0;const s=t.length;let n=null;const r=[];for(let h=0;h55295&&e<57344){if(!n){if(e>56319){(i-=3)>-1&&r.push(239,191,189);continue}if(h+1===s){(i-=3)>-1&&r.push(239,191,189);continue}n=e;continue}if(e<56320){(i-=3)>-1&&r.push(239,191,189),n=e;continue}e=65536+(n-55296<<10|e-56320)}else n&&(i-=3)>-1&&r.push(239,191,189);if(n=null,e<128){if((i-=1)<0)break;r.push(e)}else if(e<2048){if((i-=2)<0)break;r.push(e>>6|192,63&e|128)}else if(e<65536){if((i-=3)<0)break;r.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new m("Invalid code point");if((i-=4)<0)break;r.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return r}function Z(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(Y,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function $(t,i,e,s){let n;for(n=0;n=i.length||n>=t.length);++n)i[n+e]=t[n];return n}function tt(t,i){return t instanceof i||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===i.name}function it(t){return t!=t}const et=function(){const t="0123456789abcdef",i=new Array(256);for(let e=0;e<16;++e){const s=16*e;for(let n=0;n<16;++n)i[s+n]=t[e]+t[n]}return i}();function st(t){return typeof BigInt>"u"?nt:t}function nt(){throw new m("BigInt not supported")}}(oi)),oi}function zi(){if(li)return ri.exports;li=1;var t=65536;var i=(di||(di=1,function(t,i){var e=qi(),s=e.Buffer;function n(t,i){for(var e in t)i[e]=t[e]}function r(t,i,e){return s(t,i,e)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=e:(n(e,i),i.Buffer=r),r.prototype=w.create(s.prototype),n(s,r),r.from=function(t,i,e){if("number"==typeof t)throw new g("Argument must not be a number");return s(t,i,e)},r.alloc=function(t,i,e){if("number"!=typeof t)throw new g("Argument must be a number");var n=s(t);return void 0!==i?"string"==typeof e?n.fill(i,e):n.fill(i):n.fill(0),n},r.allocUnsafe=function(t){if("number"!=typeof t)throw new g("Argument must be a number");return s(t)},r.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new g("Argument must be a number");return e.SlowBuffer(t)}}(hi,hi.exports)),hi.exports).Buffer,e=b.crypto||b.msCrypto;return e&&e.getRandomValues?ri.exports=function(s,n){if(s>4294967295)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(s);if(s>0)if(s>t)for(var h=0;ht.clone()));for(const e of this.recv)t.addSimulcastAlternativeStreams(i.RECV,e.map(t=>t.clone()));return t}plain(){const t={send:[],recv:[]};for(const i of this.send)t.send.push(i.map(t=>t.plain()));for(const i of this.recv)t.recv.push(i.map(t=>t.plain()));return t}addSimulcastAlternativeStreams(t,e){return t===i.SEND?this.send.push(e):this.recv.push(e)}addSimulcastStream(t,e){return t===i.SEND?this.send.push([e]):this.recv.push([e])}getSimulcastStreams(t){return t===i.SEND?this.send:this.recv}constructor(){this.send=[],this.recv=[]}}return e.expand=function(s){if("SimulcastInfo"===s.constructor.name)return s;const n=new e;for(const e of s.send||[])n.addSimulcastAlternativeStreams(i.SEND,e.map(t.expand));for(const e of s.recv||[])n.addSimulcastAlternativeStreams(i.RECV,e.map(t.expand));return n},e.clone=function(t){return"SimulcastInfo"===t.constructor.name?t.clone():e.expand(t)},bi=e}function Yi(){if(Ti)return Si;Ti=1;const t=ti()("SENDRECV","SENDONLY","RECVONLY","INACTIVE");return t.byValue=function(i){return t[i.toUpperCase()]},t.toString=function(i){switch(i){case t.SENDRECV:return"sendrecv";case t.SENDONLY:return"sendonly";case t.RECVONLY:return"recvonly";case t.INACTIVE:return"inactive"}},t.reverse=function(i){switch(i){case t.SENDRECV:return t.SENDRECV;case t.SENDONLY:return t.RECVONLY;case t.RECVONLY:return t.SENDONLY;case t.INACTIVE:return t.INACTIVE}},Si=t}function Ji(){if(Ei)return ki;Ei=1;class t{clone(){return new t(this.port,this.maxMessageSize)}plain(){return{port:this.port,maxMessageSize:this.maxMessageSize}}getPort(){return this.port}getMaxMessageSize(){return this.maxMessageSize}constructor(t,i){this.port=t,this.maxMessageSize=i}}return t.expand=function(i){return"DataChannelInfo"===i.constructor.name?i:new t(i.port,i.maxMessageSize)},t.clone=function(i){return"DataChannelInfo"===i.constructor.name?i.clone():t.expand(i)},ki=t}function Zi(){if(Pi)return xi;Pi=1;const t=$t(),i=ji(),e=Ki(),s=Yi(),n=Xi();Zt();const r=Ji();class h{clone(){const t=new h(this.id,this.type);t.setDirection(this.direction),t.setBitrate(this.bitrate);for(const i of this.codecs.values())t.addCodec(i.clone());for(const[i,e]of this.extensions.entries())t.addExtension(i,e);for(const i of this.rids.values())t.addRID(i.clone());return this.simulcast&&t.setSimulcast(this.simulcast.clone()),this.control&&t.setControl(this.control),this.dataChannel&&t.setDataChannel(this.dataChannel.clone()),t}plain(){const t={id:this.id,type:this.type,direction:s.toString(this.direction),codecs:[]};this.dataChannel&&(t.dataChannel=this.dataChannel.plain()),this.bitrate&&(t.bitrate=this.bitrate);for(const i of this.codecs.values())t.codecs.push(i.plain());for(const[i,e]of this.extensions.entries())t.extensions||(t.extensions={}),t.extensions[i]=e;for(const i of this.rids.values())t.rids||(t.rids=[]),t.rids.push(i.plain());return this.simulcast&&(t.simulcast=this.simulcast.plain()),this.control&&(t.control=this.control),t}getType(){return this.type}getId(){return this.id}setId(t){this.id=t}addExtension(t,i){this.extensions.set(t,i)}addRID(t){this.rids.set(t.getId(),t)}addCodec(t){this.codecs.set(t.getType(),t)}setCodecs(t){this.codecs=t}getCodecForType(t){return this.codecs.get(t)}getCodec(t){for(const i of this.codecs.values())if(i.getCodec().toLowerCase()===t.toLowerCase())return i;return null}hasCodec(t){return null!==this.getCodec(t)}getCodecs(){return this.codecs}hasRTX(){for(const t of this.codecs.values())if(t.hasRTX())return!0;return!1}getExtensions(){return this.extensions}getRIDs(){return this.rids}getRID(t){return this.rids.get(t)}getBitrate(){return this.bitrate}setBitrate(t){this.bitrate=t}getDirection(){return this.direction}setDirection(t){this.direction=t}hasControl(){return!!this.control}getControl(){return this.control}setControl(t){this.control=t}hasDataChannel(){return!!this.dataChannel}getDataChannel(){return this.dataChannel}setDataChannel(t){this.dataChannel=t}answer(i){const o=new h(this.id,this.type);if(i){o.setDirection(s.reverse(this.direction));const{codecs:h,dataChannel:a}=i;if(h){let e;e=Array.isArray(h)?t.MapFromNames(h,i.rtx,i.rtcpfbs):h;for(let t of this.codecs.values())for(let i of e.values()){if(i.getCodec().toLowerCase()!==t.getCodec().toLowerCase()||"h264"===i.getCodec()&&i.hasParam("packetization-mode")&&i.getParam("packetization-mode")!=t.getParam("packetization-mode","0")||"h264"===i.getCodec()&&i.hasParam("profile-level-id")&&t.hasParam("profile-level-id")&&i.getParam("profile-level-id")!=t.getParam("profile-level-id")||"multiopus"===i.getCodec()&&i.hasParam("num_streams")&&t.hasParam("num_streams")&&i.getParam("num_streams")!=t.getParam("num_streams"))continue;const e=i.clone();e.setType(t.getType()),e.hasRTX()&&e.setRTX(t.getRTX()),t.hasChannels()&&e.setChannels(t.getChannels()),e.addParams(t.getParams()),o.addCodec(e);break}}const u=new Set(i.extensions);for(let[t,i]of this.extensions)u.has(i)&&o.addExtension(t,i);if(i.simulcast&&this.simulcast){const t=new e,i=this.simulcast.getSimulcastStreams(n.SEND);if(i)for(const e of i){const i=e.map(t=>t.clone());t.addSimulcastAlternativeStreams(n.RECV,i)}const s=this.simulcast.getSimulcastStreams(n.RECV);if(s)for(const i of s){const e=i.map(t=>t.clone());t.addSimulcastAlternativeStreams(n.SEND,e)}for(const t of this.rids.values()){const i=t.clone();i.setDirection(n.reverse(t.getDirection())),o.addRID(i)}o.setSimulcast(t)}if(a&&this.dataChannel){const t=new r(this.dataChannel.getPort(),a.maxMessageSize?a.maxMessageSize:this.dataChannel.getMaxMessageSize());o.setDataChannel(t)}}else o.setDirection(s.INACTIVE);return o}getSimulcast(){return this.simulcast}setSimulcast(t){this.simulcast=t}constructor(t,i){this.id=t,this.type=i,this.direction=s.SENDRECV,this.extensions=new Map,this.codecs=new Map,this.rids=new Map,this.simulcast=null,this.bitrate=0,this.control=null,this.dataChannel=null}}function o(t){const i=t.toString();if(!/^\d+$/.test(i))throw new m("invalid integer ".concat(i));return x(i)}return h.create=function(i,e,n){!n&&"string"!=typeof e&&(n=e,e=i);const r=new h(i,e);if(n){const{codecs:i}=n;i&&(Array.isArray(i)?r.setCodecs(t.MapFromNames(i,n.rtx,n.rtcpfbs)):r.setCodecs(i))}else r.setDirection(s.INACTIVE);return r},h.expand=function(n){if("MediaInfo"===n.constructor.name)return n;const a=new h(n.id,n.type);if(n.direction&&a.setDirection(s.byValue(n.direction)),a.setBitrate(n.bitrate),n.dataChannel){const t=r.expand(n.dataChannel);t&&a.setDataChannel(t)}for(const[t,i]of w.entries(n.extensions))a.addExtension(o(t),i);for(const i of n.codecs){const e=t.expand(i);e&&a.addCodec(e)}for(const t of n.rids||[]){const e=i.expand(t);a.addRID(e)}return n.simulcast&&a.setSimulcast(e.expand(n.simulcast)),n.control&&a.setControl(n.control),a},h.clone=function(t){return"MediaInfo"===t.constructor.name?t.clone():h.expand(t)},xi=h}function $i(){if(Ci)return Ii;Ci=1;class t{clone(){return new t(this.semantics,this.ssrcs)}plain(){const t={semantics:this.semantics,ssrcs:[]};for(let i=0;ii.getSSRCs()[0]===t)}hasSourceGroup(t){for(const i of this.groups)if(i.getSemantics().toLowerCase()===t.toLowerCase())return!0;return!1}getEncodings(){return this.encodings}addEncoding(t){this.encodings.push([t])}addAlternativeEncodings(t){this.encodings.push(t)}setEncodings(t){this.encodings=t}getEncodingSources(){const t=[];if(this.encodings.length)for(const i of this.encodings)for(const e of i){const i={id:e.getId(),rid:e.getId()},s=e.getParams(),n=null==s?void 0:s.get("ssrc");if(void 0!==n){i.media=x(n);for(const t of this.getSourceGroupsForMediaSSRC(i.media))switch(t.getSemantics()){case"FID":i.rtx=t.getSSRCs()[1];break;case"FEC-FR":i.fec=t.getSSRCs()[1]}}t.push(i)}else if(this.hasSourceGroup("SIM")){const i=this.getSourceGroup("SIM").getSSRCs();this.getSourceGroups();for(const e of i){const i={id:String(e),media:e};for(const t of this.getSourceGroupsForMediaSSRC(i.media))switch(t.getSemantics()){case"FID":i.rtx=t.getSSRCs()[1];break;case"FEC-FR":i.fec=t.getSSRCs()[1]}t.push(i)}}else{const i={id:""};if(this.ssrcs.length){i.media=this.ssrcs[0];for(const t of this.getSourceGroupsForMediaSSRC(i.media))switch(t.getSemantics()){case"FID":i.rtx=t.getSSRCs()[1];break;case"FEC-FR":i.fec=t.getSSRCs()[1]}}t.push(i)}return t}constructor(t,i){this.media=t,this.id=i,this.ssrcs=[],this.groups=[],this.encodings=[]}}return e.expand=function(s){var n,r;if("TrackInfo"===s.constructor.name)return s;const h=new e(s.media,s.id);if(s.mediaId&&h.setMediaId(s.mediaId),Array.isArray(s.ssrcs))for(const t of s.ssrcs)h.addSSRC(t);else if(void 0!==(null===(n=s.ssrcs)||void 0===n?void 0:n.media)){const i=s.ssrcs.media;if(h.addSSRC(i),void 0!==s.ssrcs.rtx){const e=s.ssrcs.rtx;h.addSSRC(e),h.addSourceGroup(new t("FID",[i,e]))}if(void 0!==s.ssrcs.fec){const e=s.ssrcs.fec;h.addSSRC(e),h.addSourceGroup(new t("FEC-FR",[i,e]))}}if(s.rid){const t=new i(s.rid);void 0!==(null===(r=s.ssrcs)||void 0===r?void 0:r.media)&&t.addParam("ssrc",s.ssrcs.media),h.addAlternativeEncodings([t])}for(const i of s.groups||[])h.addSourceGroup(t.expand(i));for(const t of s.encodings||[]){const e=[];for(const s of t)e.push(i.expand(s));h.addAlternativeEncodings(e)}return h},e.clone=function(t){return"TrackInfo"===t.constructor.name?t.clone():e.expand(t)},Mi=e}function se(){if(Fi)return Oi;Fi=1;const t=ee();class i{clone(){const t=new i(this.id);for(const i of this.tracks.values())t.addTrack(i.clone());return t}plain(){const t={id:this.id,tracks:[]};for(const i of this.tracks.values())t.tracks.push(i.plain());return t}getId(){return this.id}addTrack(t){this.tracks.set(t.getId(),t)}removeTrack(t){return this.tracks.delete(t.getId())}removeTrackById(t){return this.tracks.delete(t)}getFirstTrack(t){for(let i of this.tracks.values())if(i.getMedia().toLowerCase()===t.toLowerCase())return i;return null}getTracks(){return this.tracks}removeAllTracks(){this.tracks.clear()}getTrack(t){return this.tracks.get(t)}constructor(t){this.id=t,this.tracks=new Map}}return i.expand=function(e){if("StreamInfo"===e.constructor.name)return e;const s=new i(e.id);for(const i of e.tracks||[]){const e=t.expand(i);e&&s.addTrack(e)}return s},i.clone=function(t){return"StreamInfo"===t.constructor.name?t.clone():i.expand(t)},Oi=i}function ne(){if(Vi)return Ui;Vi=1;const t=function(){if(xt)return Gt;xt=1;var t=Kt(),i=Yt();return Gt.write=i,Gt.parse=t.parse,Gt.parseParams=t.parseParams,Gt.parseFmtpConfig=t.parseFmtpConfig,Gt.parsePayloads=t.parsePayloads,Gt.parseRemoteCandidates=t.parseRemoteCandidates,Gt.parseImageAttributes=t.parseImageAttributes,Gt.parseSimulcastStreamList=t.parseSimulcastStreamList,Gt}(),i=(It||(It=1,Pt=function(t){const i=new Intl.Collator(t,{sensitivity:"base"});return(t,e)=>0==i.compare(t,e)}),Pt)("en-US"),e=Jt(),s=$t(),n=Zt(),r=ei(),h=si(),o=Gi(),a=Zi(),u=ii(),c=Yi(),d=Xi(),l=$i(),f=te(),v=se(),_=ee(),g=ie(),p=Ki(),m=Qi(),y=ji(),b=Ji();class A{clone(){const t=new A(this.version);for(const i of this.medias)t.addMedia(i.clone());for(const i of this.streams.values())t.addStream(i.clone());for(const i of this.candidates)t.addCandidate(i.clone());return t.setICE(this.ice.clone()),this.dtls&&t.setDTLS(this.dtls.clone()),this.crypto&&t.setCrypto(this.crypto.clone()),t.setExtmapAllowMixed(this.extmapAllowMixed),t}plain(){const t={version:this.version,streams:[],medias:[],candidates:[]};for(const i of this.medias)t.medias.push(i.plain());for(const i of this.streams.values())t.streams.push(i.plain());for(const i of this.candidates)t.candidates.push(i.plain());return this.ice&&(t.ice=this.ice.plain()),this.dtls&&(t.dtls=this.dtls.plain()),this.crypto&&(t.crypto=this.crypto.plain()),this.extmapAllowMixed||(t.extmapAllowMixedNotSupported=!this.extmapAllowMixed),t}unify(){const t=new A(this.version);for(const i of this.medias)t.addMedia(i.clone());const i={audio:t.getMediasByType("audio"),video:t.getMediasByType("video")};for(const e of this.streams.values()){const s=e.clone();for(const e of s.getTracks().values()){let s=i[e.getMedia()].pop();s||(s=this.getMedia(e.getMedia()).clone(),s.setId(e.getId()),t.addMedia(s)),e.setMediaId(s.getId())}t.addStream(s)}for(const i of this.candidates)t.addCandidate(i.clone());return this.ice&&t.setICE(this.ice.clone()),this.dtls&&t.setDTLS(this.dtls.clone()),this.crypto&&t.setCrypto(this.crypto.clone()),t}setVersion(t){this.version=t}addMedia(t){this.medias.push(t)}getMedia(t){for(let e in this.medias){let s=this.medias[e];if(i(s.getType(),t))return s}return null}getMediasByType(t){let e=[];for(let s in this.medias){let n=this.medias[s];i(n.getType(),t)&&e.push(n)}return e}getMediaById(t){for(const e of this.medias)if(i(e.getId(),t))return e;return null}replaceMedia(t){for(let i in this.medias)if(this.medias[i].getId()==t.getId())return this.medias[i]=t,!0;return!1}getMedias(){return this.medias}getVersion(){return this.version}getDTLS(){return this.dtls}setDTLS(t){this.dtls=t}hasCrypto(){return!!this.crypto}getCrypto(){return this.crypto}setCrypto(t){this.crypto=t}hasICE(){return!!this.ice}getICE(){return this.ice}setICE(t){this.ice=t}addCandidate(t){for(const i of this.candidates)if(i.equals(t))return;this.candidates.push(t)}addCandidates(t){for(const i of t)this.addCandidate(i)}getCandidates(){return this.candidates}getStream(t){return this.streams.get(t)}getStreams(){return this.streams}getFirstStream(){for(const t of this.streams.values())return t;return null}addStream(t){this.streams.set(t.getId(),t)}removeStream(t){return this.streams.delete(t.getId())}removeAllStreams(){this.streams.clear()}getTracksByMediaType(t){let e=[];for(const s of this.streams.values())for(const[n,r]of s.getTracks())i(r.getMedia(),t)&&e.push(r);return e}getTrackByMediaId(t){for(const i of this.streams.values())for(const[e,s]of i.getTracks())if(s.getMediaId()==t)return s;return null}getStreamByMediaId(t){for(const i of this.streams.values())for(const[e,s]of i.getTracks())if(s.getMediaId()==t)return i;return null}getExtmapAllowMixed(){return this.extmapAllowMixed}setExtmapAllowMixed(t){this.extmapAllowMixed=t}answer(t){const i=new A;t.ice&&(t.ice instanceof o?i.setICE(t.ice.clone()):i.setICE(o.expand(t.ice))),t.dtls&&(t.dtls instanceof r?i.setDTLS(t.dtls):i.setDTLS(r.expand(t.dtls))),t.crypto&&(t.crypto instanceof h?i.setCrypto(t.crypto):i.setCrypto(h.expand(t.crypto)));for(let s=0;t.candidates&&s0&&(n.bandwidth.push({type:"AS",limit:t.getBitrate()}),n.bandwidth.push({type:"TIAS",limit:1e3*t.getBitrate()}));let r=this.getCandidates();for(const t of r)n.candidates.push({foundation:t.getFoundation(),component:t.getComponentId(),transport:t.getTransport(),priority:t.getPriority(),ip:t.getAddress(),port:t.getPort(),type:t.getType(),raddr:t.getRelAddr(),rport:t.getRelPort()});if(this.getICE()&&(n.iceUfrag=this.getICE().getUfrag(),n.icePwd=this.getICE().getPwd()),i("audio",t.getType())||i("video",t.getType())){n.rtcpMux="rtcp-mux",n.rtcpRsize="rtcp-rsize",this.getDTLS()?(n.protocol="UDP/TLS/RTP/SAVPF",n.fingerprint={type:this.getDTLS().getHash(),hash:this.getDTLS().getFingerprint()},n.setup=u.toString(this.getDTLS().getSetup())):this.getCrypto()?(n.protocol="RTP/SAVPF",n.crypto=[{id:this.getCrypto().getTag(),suite:this.getCrypto().getSuite(),config:this.getCrypto().getKeyParams()}]):n.protocol="RTP/AVP";for(const e of t.getCodecs().values()){i("video",t.getType())?n.rtp.push({payload:e.getType(),codec:e.getCodec().toUpperCase(),rate:9e4}):i("opus",e.getCodec())||i("multiopus",e.getCodec())?n.rtp.push({payload:e.getType(),codec:e.getCodec(),rate:48e3,encoding:e.getChannels()}):n.rtp.push({payload:e.getType(),codec:e.getCodec(),rate:8e3});for(const t of e.getRTCPFeedbacks())n.rtcpFb.push({payload:e.getType(),type:t.getId(),subtype:t.getParams().join(" ")});e.hasRTX()&&(n.rtp.push({payload:e.getRTX(),codec:"rtx",rate:9e4}),n.fmtp.push({payload:e.getRTX(),config:"apt="+e.getType()}));const s=e.getParams();if(w.keys(s).length){const t={payload:e.getType(),config:""};for(const i in s)t.config.length&&(t.config+=";"),w.hasOwnProperty.call(s,i)?t.config+=i+"="+s[i]:t.config+=i;n.fmtp.push(t)}}const e=[];for(const t of n.rtp)e.push(t.payload);n.payloads=e.join(" ");for(let[i,e]of t.getExtensions().entries())n.ext.push({value:i,uri:e});for(let i of t.getRIDs().values()){let t={id:i.getId(),direction:d.toString(i.getDirection()),params:""};i.getFormats().length&&(t.params="pt="+i.getFormats().join(","));for(let[e,s]of i.getParams().entries())t.params+=(t.params.length?";":"")+e+"="+s;n.rids.push(t)}const s=t.getSimulcast();if(s){let t=1;n.simulcast={};const i=s.getSimulcastStreams(d.SEND),e=s.getSimulcastStreams(d.RECV);if(i&&i.length){let e="";for(const t of i){let i="";for(const e of t)i+=(i.length?",":"")+(e.isPaused()?"~":"")+e.getId();e+=(e.length?";":"")+i}n.simulcast["dir"+t]="send",n.simulcast["list"+t]=e,t++}if(e&&e.length){let i="";for(const t of e){let e="";for(const i of t)e+=(e.length?",":"")+(i.isPaused()?"~":"")+i.getId();i+=(i.length?";":"")+e}n.simulcast["dir"+t]="recv",n.simulcast["list"+t]=i,t++}}}else if(t.hasDataChannel()){n.protocol="UDP/DTLS/SCTP",n.payloads="webrtc-datachannel";const i=t.getDataChannel();n.sctpPort=i.getPort(),n.maxMessageSize=i.getMaxMessageSize()}e.media.push(n)}for(let t of this.streams.values())for(let s of t.getTracks().values())for(let n in e.media){let r=e.media[n];if(s.getMediaId()){if(s.getMediaId()==r.mid){let i=s.getSourceGroups();for(let t in i){let e=i[t];r.ssrcGroups.push({semantics:e.getSemantics(),ssrcs:e.getSSRCs().join(" ")})}let e=s.getSSRCs();for(let i in e)r.ssrcs.push({id:e[i],attribute:"cname",value:t.getId()}),r.ssrcs.push({id:e[i],attribute:"msid",value:t.getId()+" "+s.getId()});r.msid=t.getId()+" "+s.getId();break}}else if(i(r.type,s.getMedia())){let i=s.getSourceGroups();for(let t in i){let e=i[t];r.ssrcGroups.push({semantics:e.getSemantics(),ssrcs:e.getSSRCs().join(" ")})}let e=s.getSSRCs();for(let i in e)r.ssrcs.push({id:e[i],attribute:"cname",value:t.getId()}),r.ssrcs.push({id:e[i],attribute:"msid",value:t.getId()+" "+s.getId()});break}}const n={type:"BUNDLE",mids:s.join(" ")};return e.groups.push(n),t.write(e)}toIceFragmentString(){let i={version:0,media:[],candidates:[]};this.hasICE()&&this.getICE().isLite()&&(i.icelite="ice-lite"),this.getICE()&&(i.iceUfrag=this.getICE().getUfrag(),i.icePwd=this.getICE().getPwd());for(const t of this.getCandidates())i.candidates.push({foundation:t.getFoundation(),component:t.getComponentId(),transport:t.getTransport(),priority:t.getPriority(),ip:t.getAddress(),port:t.getPort(),type:t.getType(),raddr:t.getRelAddr(),rport:t.getRelPort()});return t.write(i).slice(10)}constructor(t){this.version=t||1,this.streams=new Map,this.medias=new Array,this.candidates=new Array,this.ice=null,this.dtls=null,this.crypto=null,this.extmapAllowMixed=!0}}return A.create=function(t){var i;const s=new A;if(t.streams)for(const i of t.streams)s.addStream(v.expand(i));t.ice&&(t.ice instanceof o?s.setICE(t.ice.clone()):s.setICE(o.expand(t.ice))),t.dtls&&(t.dtls instanceof r?s.setDTLS(t.dtls):s.setDTLS(r.expand(t.dtls))),t.crypto&&(t.crypto instanceof h?s.setCrypto(t.crypto):s.setCrypto(h.expand(t.crypto)));for(const i of t.candidates||[])i instanceof e?s.addCandidate(i.clone()):s.addCandidate(e.expand(i));let n=96,u=1,c=0;for(const[e,r]of w.entries(t.capabilities||{}))if(t.unified&&null!==(i=t.streams)&&void 0!==i&&i.length)for(const t of s.getTracksByMediaType(e)){const i=a.create(t.getMediaId(),e,r);for(const[t,e]of i.getCodecs())e.getType()>=96&&e.setType(n++),e.getRTX()&&e.setRTX(n++);if(r.extensions)for(let t of r.extensions)15===u&&u++,i.addExtension(u++,t);s.addMedia(i)}else{const i=a.create(t.unified?String(c++):e,e,r);for(const[t,e]of i.getCodecs())e.getType()>=96&&e.setType(n++),e.getRTX()&&e.setRTX(n++);if(r.extensions)for(let t of r.extensions)15===u&&u++,i.addExtension(u++,t);s.addMedia(i)}return s},A.expand=function(t){if("SDPInfo"===t.constructor.name)return t;const i=new A(t.version);for(const e of t.medias||[]){const t=a.expand(e);t&&i.addMedia(t)}for(const e of t.streams||[]){const t=v.expand(e);t&&i.addStream(t)}for(const s of t.candidates||[]){const t=e.expand(s);t&&i.addCandidate(t)}return t.ice&&i.setICE(o.expand(t.ice)),t.dtls&&i.setDTLS(r.expand(t.dtls)),t.crypto&&i.setCrypto(h.expand(t.crypto)),t.extmapAllowMixedNotSupported&&(this.extmapAllowMixed=!t.extmapAllowMixedNotSupported),i},A.clone=function(t){return"SDPInfo"===t.constructor.name?t.clone():A.expand(t)},A.process=function(t){return A.parse(t)},A.parse=function(w){const S=t.parse(w),T=new A;if(T.setVersion(S.version),S.iceUfrag&&S.icePwd){const t=String(S.iceUfrag),i=String(S.icePwd),e=new o(t,i);e.setLite("ice-lite"==S.icelite),e.setEndOfCandidates("end-of-candidates"==S.endOfCandidates),T.setICE(e)}for(let w in S.media){const A=S.media[w],k=A.type,E=A.mid?A.mid.toString():w,P=new a(E,k);if(A.iceUfrag&&A.icePwd){const t=String(A.iceUfrag),i=String(A.icePwd),e=new o(t,i);e.setLite("ice-lite"==S.icelite),e.setEndOfCandidates("end-of-candidates"==A.endOfCandidates),T.setICE(e)}for(let t=0;A.candidates&&t1&&t.setChannels(i.encoding),P.addCodec(t)}}for(let t of R.entries()){const i=P.getCodecForType(t[0]);i&&i.setRTX(t[1])}for(let t=0;A.rtcpFb&&t0?2===a.length?typeof a[1]==n?this[a[0]]=a[1].call(this,c):this[a[0]]=a[1]:3===a.length?typeof a[1]!==n||a[1].exec&&a[1].test?this[a[0]]=c?c.replace(a[1],a[2]):s:this[a[0]]=c?a[1].call(this,c,a[2]):s:4===a.length&&(this[a[0]]=c?a[3].call(this,c.replace(a[1],a[2])):s):this[a]=c||s;d+=2}},Q=function(t,i){for(var e in i)if(typeof i[e]===h&&i[e].length>0){for(var n=0;n2&&(t[u]="iPad",t[d]=p),t},this.getEngine=function(){var t={};return t[c]=s,t[f]=s,j.call(t,m,y.engine),t},this.getOS=function(){var t={};return t[c]=s,t[f]=s,j.call(t,m,y.os),b&&!t[c]&&w&&w.platform&&"Unknown"!=w.platform&&(t[c]=w.platform.replace(/chrome os/i,V).replace(/macos/i,H)),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return m},this.setUA=function(t){return m=typeof t===o&&t.length>500?X(t,500):t,this},this.setUA(m),this};J.VERSION="0.7.39",J.BROWSER=q([c,f,a]),J.CPU=q([v]),J.DEVICE=q([u,l,d,_,g,m,p,w,y]),J.ENGINE=J.OS=q([c,f]),t.exports&&(i=t.exports=J),i.UAParser=J;var Z=typeof e!==r&&(e.jQuery||e.Zepto);if(Z&&!Z.ua){var $=new J;Z.ua=$.getResult(),Z.ua.get=function(){return $.getUA()},Z.ua.set=function(t){$.setUA(t);var i=$.getResult();for(var e in i)Z.ua[e]=i[e]}}}("object"==typeof s?s:ae)}(oe,oe.exports)),oe.exports);const ce=A(ue),de=["iOS"];class le extends ce{isChromium(){return this.getUA().match(/Chrome/i)}isChrome(){const t=this.getBrowser();if(!t.name)return!1;const i=this.getOS();let e=!0;return e=!new RegExp(de.join("|"),"i").test(i.name),t.name.match(/Chrome/i)&&e}isFirefox(){const t=this.getBrowser();return!!t.name&&t.name.match(/Firefox/i)}isOpera(){const t=this.getBrowser();return!!t.name&&t.name.match(/Opera/i)}isSafari(){const t=this.getBrowser();return!!t.name&&t.name.match(/Safari/i)}constructor(){super(s.navigator.userAgent)}}const fe=at.get("SdpParser"),ve=Array.from({length:31},(t,i)=>i+35),_e=Array.from({length:32},(t,i)=>i+96),ge=Array.from({length:14},(t,i)=>i+1),pe=Array.from({length:240},(t,i)=>i+16),me={setSimulcast(t,i){if(fe.info("Setting simulcast. Codec: ",i),!(new le).isChromium())return fe.warn("Your browser does not appear to support Simulcast. For a better experience, use a Chromium based browser."),t;if("h264"!==i&&"vp8"!==i)return fe.warn("Your selected codec ".concat(i," does not appear to support Simulcast. To broadcast using simulcast, please use H.264 or VP8.")),t;if(!/m=video/.test(t))return fe.warn("There is no available video for simulcast to be enabled."),t;try{const i=new RegExp("m=video.*?a=ssrc:(\\d*) cname:(.+?)\\r\\n","s"),e=new RegExp("m=video.*?a=ssrc:(\\d*) msid:(.+?)\\r\\n","s"),s=i.exec(t),n=s[1],r=s[2],h=e.exec(t)[2],o=2,a=[n];for(let i=0;i(fe.info("Replacing SDP response for support stereo"),t=t.replace(/useinbandfec=1/g,"useinbandfec=1; stereo=1"),fe.info("Replaced SDP response for support stereo"),fe.debug("New SDP value: ",t),t),setDTX:t=>(fe.info("Replacing SDP response for support dtx"),t=t.replace("useinbandfec=1","useinbandfec=1; usedtx=1"),fe.info("Replaced SDP response for support dtx"),fe.debug("New SDP value: ",t),t),setAbsoluteCaptureTime(t){const i="a=extmap:"+me.getAvailableHeaderExtensionIdRange(t)[0]+" http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time\r\n";return t=t.replace(/(m=.*\r\n(?:.*\r\n)*?)(a=extmap.*\r\n)/gm,(t,e,s)=>e+i+s),fe.info("Replaced SDP response for setting absolute capture time"),fe.debug("New SDP value: ",t),t},setDependencyDescriptor(t){const i="a=extmap:"+me.getAvailableHeaderExtensionIdRange(t)[0]+" https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension\r\n";return t=t.replace(/(m=.*\r\n(?:.*\r\n)*?)(a=extmap.*\r\n)/gm,(t,e,s)=>e+i+s),fe.info("Replaced SDP response for setting depency descriptor"),fe.debug("New SDP value: ",t),t},setVideoBitrate(t,i){if(i<1)fe.info("Remove bitrate restrictions"),t=t.replace(/b=AS:.*\r\n/,"").replace(/b=TIAS:.*\r\n/,"");else{const e=he.SDPInfo.parse(t),s=e.getMedia("video");fe.info("Setting video bitrate"),s.setBitrate(i),t=e.toString()}return t},removeSdpLine:(t,i)=>(fe.debug("SDP before trimming: ",t),t=t.split("\n").filter(t=>t.trim()!==i).join("\n"),fe.debug("SDP trimmed result: ",t),t),adaptCodecName(t,i,e){if(!t)return t;const s=new RegExp("".concat(i),"i");return t.replace(s,e)},setMultiopus(t,i){if(!(new le).isFirefox()&&(!i||we(i)))if(t.includes("multiopus/48000/6"))fe.info("Multiopus already setted");else{fe.info("Setting multiopus");const i=/m=audio 9 UDP\/TLS\/RTP\/SAVPF (.*)\r\n/.exec(t)[0],e=me.getAvailablePayloadTypeRange(t)[0],s=i.replace("\r\n"," ")+e+"\r\na=rtpmap:"+e+" multiopus/48000/6\r\na=fmtp:"+e+" channel_mapping=0,4,1,2,3,5;coupled_streams=2;minptime=10;num_streams=4;useinbandfec=1\r\n";t=t.replace(i,s),fe.info("Multiopus offer created"),fe.debug("SDP parsed for multioups: ",t)}return t},getAvailablePayloadTypeRange(t){const i=t.matchAll(/m=(?:.*) (?:.*) UDP\/TLS\/RTP\/SAVPF (.*)\r\n/gm);let e=_e.concat(ve);for(const t of i){const i=t[1].split(" ").map(t=>x(t));e=e.filter(t=>!i.includes(t))}return e},getAvailableHeaderExtensionIdRange(t){const i=t.matchAll(/a=extmap:(\d+)(?:.*)\r\n/gm);let e=ge.concat(pe);for(const t of i){const i=t[1].split(" ").map(t=>x(t));e=e.filter(t=>!i.includes(t))}return e},renegotiate(t,i){const e=he.SDPInfo.parse(t),s=he.SDPInfo.parse(i);for(const t of e.getMedias()){let i=s.getMediaById(t.getId());if(!i){i=new he.MediaInfo(t.getId(),t.getType()),i.setDirection(he.Direction.reverse(t.getDirection()));const e=s.getMedia(t.getType());if(e){i.setCodecs(e.getCodecs());for(const[t,s]of e.getExtensions())i.addExtension(t,s)}s.addMedia(i)}}return s.toString()},updateMissingVideoExtensions(t,i){var e;const s=he.SDPInfo.parse(t),n=null==(e=he.SDPInfo.parse(i).getMediasByType("video")[0])?void 0:e.getExtensions();if(n||n.length){for(const i of s.getMediasByType("video")){const e=i.getExtensions();n.forEach((s,n)=>{if(!e.get(n)){const e=i.getId(),r="a=extmap:"+n+" "+s+"\r\n",h=new RegExp("(a=mid:"+e+"\r\n(?:.*\r\n)*?)","g");t=t.replace(h,(t,i,e)=>i+r)}})}return t}},getCodecPayloadType(t){const i=t.matchAll(/a=rtpmap:(\d+) (\w+)\/\d+/g),e={};for(const t of i)e[t[1]]=t[2];return e}},we=t=>t.getAudioTracks().some(t=>t.getSettings().channelCount>2),ye={VP8:"vp8",VP9:"vp9",H264:"h264",AV1:"av1",H265:"h265"},be={OPUS:"opus",MULTIOPUS:"multiopus"},Ae=at.get("PeerConnection"),Se="Publisher",Te="Viewer",ke={track:"track",connectionStateChange:"connectionStateChange"},Ee={stereo:!1,mediaStream:null,codec:"h264",simulcast:!1,scalabilityMode:null,disableAudio:!1,disableVideo:!1,setSDPToPeer:!0};class xe extends lt{async createRTCPeer(t,i){void 0===t&&(t={autoInitStats:!0,statsIntervalMs:1e3}),void 0===i&&(i=Te),Ae.info("Creating new RTCPeerConnection"),Ae.debug("RTC configuration provided by user: ",t),this.peer=Ce(this,t),this.mode=i,t.autoInitStats&&this.initStats(t)}getRTCPeer(){return Ae.info("Getting RTC Peer"),this.peer}async closeRTCPeer(){var t;Ae.info("Closing RTCPeerConnection"),null==(t=this.peer)||t.close(),this.peer=null,this.stopStats(),this.emit(ke.connectionStateChange,"closed")}async setRTCRemoteSDP(t){Ae.info("Setting RTC Remote SDP");const i={type:"answer",sdp:t};try{await this.peer.setRemoteDescription(i),Ae.info("RTC Remote SDP was set successfully."),Ae.debug("RTC Remote SDP new value: ",t)}catch(t){throw Ae.error("Error while setting RTC Remote SDP: ",t),t}}async getRTCLocalSDP(t){void 0===t&&(t=Ee),Ae.info("Getting RTC Local SDP"),t=l(l({},Ee),t),Ae.debug("Options: ",t);const i=Ie(t.mediaStream);i?Ne(this.peer,i,t):Be(this.peer,t),Ae.info("Creating peer offer");const e=await this.peer.createOffer();return Ae.info("Peer offer created"),Ae.debug("Peer offer response: ",e.sdp),this.sessionDescription=e,t.disableAudio||(t.stereo&&(this.sessionDescription.sdp=me.setStereo(this.sessionDescription.sdp)),t.dtx&&(this.sessionDescription.sdp=me.setDTX(this.sessionDescription.sdp)),this.sessionDescription.sdp=me.setMultiopus(this.sessionDescription.sdp,i)),!t.disableVideo&&t.simulcast&&(this.sessionDescription.sdp=me.setSimulcast(this.sessionDescription.sdp,t.codec)),t.absCaptureTime&&(this.sessionDescription.sdp=me.setAbsoluteCaptureTime(this.sessionDescription.sdp)),t.dependencyDescriptor&&(this.sessionDescription.sdp=me.setDependencyDescriptor(this.sessionDescription.sdp)),t.setSDPToPeer&&(await this.peer.setLocalDescription(this.sessionDescription),Ae.info("Peer local description set")),this.sessionDescription.sdp}async addRemoteTrack(t,i){return new Promise((e,s)=>{try{const s=this.peer.addTransceiver(t,{direction:"recvonly",streams:i});this.transceiverMap.set(s,e)}catch(t){s(t)}})}updateBandwidthRestriction(t,i){if(this.mode===Te)throw Ae.error("Viewer attempting to update bitrate, this is not allowed"),new m("It is not possible for a viewer to update the bitrate.");return Ae.info("Updating bandwidth restriction, bitrate value: ",i),Ae.debug("SDP value: ",t),me.setVideoBitrate(t,i)}async updateBitrate(t){if(void 0===t&&(t=0),this.mode===Te)throw Ae.error("Viewer attempting to update bitrate, this is not allowed"),new m("It is not possible for a viewer to update the bitrate.");if(!this.peer)throw Ae.error("Cannot update bitrate. No peer found."),new m("Cannot update bitrate. No peer found.");Ae.info("Updating bitrate to value: ",t),this.sessionDescription=await this.peer.createOffer(),await this.peer.setLocalDescription(this.sessionDescription);const i=this.updateBandwidthRestriction(this.peer.remoteDescription.sdp,t);await this.setRTCRemoteSDP(i),Ae.info("Bitrate restrictions updated: ","".concat(t>0?t:"unlimited"," kbps"))}getRTCPeerStatus(){if(Ae.info("Getting RTC peer status"),!this.peer)return null;const t=Me(this.peer);return Ae.info("RTC peer status getted, value: ",t),t}replaceTrack(t){if(!this.peer)return void Ae.error("Could not change track if there is not an active connection.");const i=this.peer.getSenders().find(i=>i.track.kind===t.kind);i?i.replaceTrack(t):Ae.error("There is no ".concat(t.kind," track in active broadcast."))}static getCapabilities(t){const i=new le,e=RTCRtpSender.getCapabilities(t);if(e){const s={};let n=new RegExp("^video/(".concat(w.values(ye).join("|"),")x?$"),"i");"audio"===t&&(n=new RegExp("^audio/(".concat(w.values(be).join("|"),")$"),"i"),i.isChrome()&&(s.multiopus={mimeType:"audio/multiopus",channels:6}));for(const t of e.codecs){const i=t.mimeType.match(n);if(i){const e=i[1].toLowerCase();if(s[e]=f(l({},s[e]),{mimeType:t.mimeType}),t.scalabilityModes){let i=s[e].scalabilityModes||[];i=[...i,...t.scalabilityModes],s[e].scalabilityModes=[...new Set(i)]}t.channels&&(s[e].channels=t.channels)}}e.codecs=w.keys(s).map(t=>l({codec:t},s[t]))}return e}getTracks(){var t,i;return null==(i=null==(t=this.peer)?void 0:t.getSenders())?void 0:i.map(t=>t.track)}initStats(t){this.peerConnectionStats?Ae.warn("PeerConnection.initStats() has already been called. Automatic initialization occurs via View.connect(), Publish.connect() or this.createRTCPeer(). See options"):this.peer?(this.peerConnectionStats=new At(this.peer,t),gt(this.peerConnectionStats,this,[bt])):Ae.warn("Cannot init peer stats: RTCPeerConnection not initialized")}stopStats(){var t;null==(t=this.peerConnectionStats)||t.stop(),this.peerConnectionStats=null}constructor(){super(),this.mode=null,this.sessionDescription=null,this.peer=null,this.peerConnectionStats=null,this.transceiverMap=new Map}}const Pe=t=>(null==t?void 0:t.getAudioTracks().length)<=1&&(null==t?void 0:t.getVideoTracks().length)<=1,Ie=t=>{if(!t)return null;if(t instanceof MediaStream&&Pe(t))return t;if(!(t instanceof MediaStream)){Ae.info("Creating MediaStream to add received tracks.");const i=new MediaStream;for(const e of t)i.addTrack(e);if(Pe(i))return i}throw Ae.error("MediaStream must have 1 audio track and 1 video track, or at least one of them."),new m("MediaStream must have 1 audio track and 1 video track, or at least one of them.")},Ce=(t,i)=>{const e=new RTCPeerConnection(i);return De(t,e),e};async function Re(t){return new Promise(i=>u(i,t))}const De=(t,i)=>{i.ontrack=async i=>{Ae.info("New track from peer."),Ae.debug("Track event value: ",i);const e=t.transceiverMap.get(i.transceiver);if(e){for(;!i.transceiver.mid;)await Re(100);e(i.transceiver),t.transceiverMap.delete(i.transceiver)}u(()=>{t.emit(ke.track,i)},0)},i.connectionState?i.onconnectionstatechange=e=>{Ae.info("Peer connection state change: ",i.connectionState),t.emit(ke.connectionStateChange,i.connectionState)}:i.oniceconnectionstatechange=e=>{Ae.info("Peer ICE connection state change: ",i.iceConnectionState),t.emit(ke.connectionStateChange,i.iceConnectionState)},i.onnegotiationneeded=async t=>{if(!i.remoteDescription)return;Ae.info("Peer onnegotiationneeded, updating local description");const e=await i.createOffer();Ae.info("Peer onnegotiationneeded, got local offer",e.sdp),e.sdp=me.updateMissingVideoExtensions(e.sdp,i.remoteDescription.sdp),await i.setLocalDescription(e);const s=me.renegotiate(e.sdp,i.remoteDescription.sdp);Ae.info("Peer onnegotiationneeded, updating remote description",s),await i.setRemoteDescription({type:"answer",sdp:s}),Ae.info("Peer onnegotiationneeded, renegotiation done")}},Ne=(t,i,e)=>{Ae.info("Adding mediaStream tracks to RTCPeerConnection");for(const s of i.getTracks()){const n={streams:[i]};"audio"===s.kind&&(n.direction=e.disableAudio?"inactive":"sendonly"),"video"===s.kind&&(n.direction=e.disableVideo?"inactive":"sendonly",e.scalabilityMode&&(new le).isChrome()?(Ae.debug("Video track with scalability mode: ".concat(e.scalabilityMode,".")),n.sendEncodings=[{scalabilityMode:e.scalabilityMode}]):e.scalabilityMode&&Ae.warn("SVC is only supported in Google Chrome")),t.addTransceiver(s,n),Ae.info("Track '".concat(s.label,"' added: "),"id: ".concat(s.id),"kind: ".concat(s.kind))}},Be=(t,i)=>{const e=new le;if(!i.disableVideo){const i=t.addTransceiver("video",{direction:"recvonly"});e.isOpera()&&i.setCodecPreferences(RTCRtpReceiver.getCapabilities("video").codecs.filter(t=>"video/H264"!==t.mimeType||t.sdpFmtpLine.includes("profile-level-id=4")))}i.disableAudio||t.addTransceiver("audio",{direction:"recvonly"});for(let e=0;e{var i;const e=null!=(i=t.connectionState)?i:t.iceConnectionState;switch(e){case"checking":return"connecting";case"completed":return"connected";default:return e}};var Le,Oe,Fe,Ue={};var Ve=function(){if(Fe)return Oe;Fe=1;const{TypedEmitter:t}=(Le||(Le=1,w.defineProperty(Ue,"__esModule",{value:!0}),Ue.TypedEmitter=dt().EventEmitter),Ue);class i extends t{cmd(t,i){return this.tm.cmd(t,i,this.namespace)}event(t,i){return this.tm.event(t,i,this.namespace)}close(){return this.tm.namespaces.delete(this.namespace)}constructor(t,i){super(),this.namespace=t,this.tm=i}}return Oe=class extends t{bv(t){this.transport.send(JSON.stringify(t))}cmd(t,i,e){return void 0===e&&(e=void 0),new Promise((s,n)=>{if(!t||0===t.length)throw new m("Bad command name");const r={type:"cmd",transId:this.maxId++,name:t,data:i};e&&(r.namespace=e),this.transactions.set(r.transId,f(l({},r),{resolve:s,reject:n}));try{this.bv(r)}catch(t){throw this.transactions.delete(r.transId),t}})}event(t,i,e){if(void 0===e&&(e=void 0),!t||0===t.length)throw new m("Bad event name");const s={type:"event",name:t,data:i};e&&(s.namespace=e),this.bv(s)}namespace(t){let e=this.namespaces.get(t);return e||(e=new i(t,this),this.namespaces.set(t,e),e)}close(){for(const t of this.namespaces.values())t.close();this.transport.removeListener?this.transport.removeListener("message",this.listener):this.transport.removeEventListener("message",this.listener)}constructor(t){super(),this.maxId=0,this.namespaces=new Map,this.transactions=new Map,this.transport=t,this.listener=t=>{let i;try{i=JSON.parse(t.utf8Data||t.data||t)}catch(t){return}switch(i.type){case"cmd":const{transId:t}=i,s={name:i.name,data:i.data,namespace:i.namespace,accept:i=>{this.bv({type:"response",transId:t,data:i})},reject:i=>{this.bv({type:"error",transId:t,data:i})}};if(s.namespace){const t=this.namespaces.get(s.namespace);t?t.emit("cmd",s):this.emit("cmd",s)}else this.emit("cmd",s);break;case"response":{const t=this.transactions.get(i.transId);if(!t)return;this.transactions.delete(i.transId),t.resolve(i.data);break}case"error":{const t=this.transactions.get(i.transId);if(!t)return;this.transactions.delete(i.transId),t.reject(i.data);break}case"event":const n={name:i.name,data:i.data,namespace:i.namespace};if(n.namespace){var e=this.namespaces.get(n.namespace);e?e.emit("event",n):this.emit("event",n)}else this.emit("event",n)}},this.transport.addListener?this.transport.addListener("message",this.listener):this.transport.addEventListener("message",this.listener)}}}();const He=A(Ve),We=at.get("Signaling"),qe="wsConnectionSuccess",ze="wsConnectionError",Ge="wsConnectionClose",Xe="broadcastEvent";class je extends lt{async connect(){var t;return We.info("Connecting to Signaling Server"),this.transactionManager&&(null==(t=this.webSocket)?void 0:t.readyState)===WebSocket.OPEN?(We.info("Connected to server: ",this.webSocket.url),We.debug("WebSocket value: ",{url:this.webSocket.url,protocol:this.webSocket.protocol,readyState:this.webSocket.readyState,binaryType:this.webSocket.binaryType,extensions:this.webSocket.extensions}),this.emit(qe,{ws:this.webSocket,tm:this.transactionManager}),this.webSocket):new Promise((t,i)=>{this.webSocket=new WebSocket(this.wsUrl),this.transactionManager=new He(this.webSocket),this.webSocket.onopen=()=>{We.info("WebSocket opened"),this.transactionManager.on("event",t=>{this.emit(Xe,t)}),We.info("Connected to server: ",this.webSocket.url),We.debug("WebSocket value: ",{url:this.webSocket.url,protocol:this.webSocket.protocol,readyState:this.webSocket.readyState,binaryType:this.webSocket.binaryType,extensions:this.webSocket.extensions}),this.emit(qe,{ws:this.webSocket,tm:this.transactionManager}),t(this.webSocket)},this.webSocket.onerror=()=>{We.error("WebSocket not connected: ",this.webSocket.url),this.emit(ze,this.webSocket.url),i(this.webSocket.url)},this.webSocket.onclose=()=>{this.webSocket=null,this.transactionManager=null,We.info("Connection closed with Signaling Server."),this.emit(Ge)}})}close(){var t;We.info("Closing connection with Signaling Server."),null==(t=this.webSocket)||t.close()}async subscribe(t,i,e,s){var n,r,h,o,a;void 0===e&&(e=null),void 0===s&&(s=null),We.info("Starting subscription to streamName: ",this.streamName),We.debug("Subcription local description: ",t);const u=Qe(i,e,s),c={sdp:t=me.adaptCodecName(t,"AV1X",ye.AV1),streamId:this.streamName,pinnedSourceId:u.pinnedSourceId,excludedSourceIds:u.excludedSourceIds,events:["active","inactive","layers","viewercount","vad","updated","migrate","stopped"]};u.vad&&(c.vad=!0),Array.isArray(u.events)&&(c.events=u.events),u.forcePlayoutDelay&&(c.forcePlayoutDelay=u.forcePlayoutDelay),u.layer&&(c.layer=u.layer),u.abrConfiguration&&(c.abr={initialBitrate:null==(n=u.abrConfiguration.metadata)?void 0:n.bitrate,strategy:u.abrConfiguration.strategy}),u.customKeys&&(c.customKeys=u.customKeys),u.forceSmooth&&(c.abr=f(l({},c.abr||{}),{forceSmooth:u.forceSmooth}));try{if(u.disableVideo&&u.disableAudio)throw new m("Not attempting to connect as video and audio are disabled");await this.connect(),We.info("Sending view command",c);const t=await this.transactionManager.cmd("view",c),i=null==(a=null==(o=null==(h=null==(r=RTCRtpReceiver.getCapabilities)?void 0:r.call(RTCRtpReceiver,"video"))?void 0:h.codecs)?void 0:o.find)?void 0:a.call(o,t=>"video/AV1X"===t.mimeType);return t.sdp=i?me.adaptCodecName(t.sdp,ye.AV1,"AV1X"):t.sdp,We.info("Command sent, subscriberId: ",t.subscriberId),We.debug("Command result: ",t),this.serverId=t.subscriberId,this.clusterId=t.clusterId,this.streamViewId=t.streamViewId,W(this.streamName),q(this.serverId),z(t.streamViewId),K(this.clusterId),t.sdp}catch(t){throw We.error("Error sending view command, error: ",t),t}}async publish(t,i,e,s){var n,r,h,o,a,u,c,d;void 0===e&&(e=null),void 0===s&&(s=null);const l=Ke(i,e,s);We.info("Starting publishing to streamName: ".concat(this.streamName,", codec: ").concat(l.codec)),We.debug("Publishing local description: ",t);const f=null!=(o=null==(h=null==(r=null==(n=xe.getCapabilities)?void 0:n.call(xe,"video"))?void 0:r.codecs)?void 0:h.map(t=>t.codec))?o:[],v=w.values(ye);if(-1===v.indexOf(l.codec))throw We.error("Invalid codec ".concat(l.codec,". Possible values are: "),v),new m("Invalid codec ".concat(l.codec,". Possible values are: ").concat(v));if(f.length>0&&-1===f.indexOf(l.codec))throw We.error("Unsupported codec ".concat(l.codec,". Possible values are: "),f),new m("Unsupported codec ".concat(l.codec,". Possible values are: ").concat(f));l.codec===ye.AV1&&(t=me.adaptCodecName(t,"AV1X",ye.AV1));const _={name:this.streamName,sdp:t,codec:l.codec,sourceId:l.sourceId};if(l.priority){if(!(Number.isInteger(l.priority)&&l.priority>=-2147483648&&l.priority<=2147483647))throw new m("Invalid value for priority option. It should be a decimal integer between the range [-2^31, +2^31 - 1]");_.priority=l.priority}null!==l.record&&(_.record=l.record),Array.isArray(l.events)&&(_.events=l.events);try{if(l.disableVideo&&l.disableAudio)throw new m("Not attempting to connect as video and audio are disabled");await this.connect(),We.info("Sending publish command");const t=await this.transactionManager.cmd("publish",_);if(l.codec===ye.AV1){const i=null==(d=null==(c=null==(u=null==(a=RTCRtpSender.getCapabilities)?void 0:a.call(RTCRtpSender,"video"))?void 0:u.codecs)?void 0:c.find)?void 0:d.call(c,t=>"video/AV1X"===t.mimeType);t.sdp=i?me.adaptCodecName(t.sdp,ye.AV1,"AV1X"):t.sdp}return We.info("Command sent, publisherId: ",t.publisherId),We.debug("Command result: ",t),this.serverId=t.publisherId,this.clusterId=t.clusterId,W(this.streamName),q(this.serverId),G(t.feedId),K(this.clusterId),t.sdp}catch(t){throw We.error("Error sending publish command, error: ",t),t}}async cmd(t,i){return We.info("Sending cmd: ".concat(t)),this.transactionManager.cmd(t,i)}constructor(t={streamName:null,url:"ws://localhost:8080/"}){super(),this.streamName=t.streamName,this.wsUrl=t.url,this.webSocket=null,this.transactionManager=null,this.serverId=null,this.clusterId=null,this.streamViewId=null}}const Qe=(t,i,e)=>{let s="object"==typeof t?t:{};return 0===w.keys(s).length&&(s={vad:t,pinnedSourceId:i,excludedSourceIds:e}),s},Ke=(t,i,e)=>{let s="object"==typeof t?t:{};if(0===w.keys(s).length){s={codec:null!=t?t:ye.H264,record:i,sourceId:e}}return s};class Ye extends m{constructor(t,i){super(t),this.name="FetchError",this.status=i}}const Je=at.get("Director"),Ze="WebRtc";let $e="",ts="https://director.millicast.com";const is={setEndpoint:t=>{ts=t.replace(/\/$/,"")},getEndpoint:()=>ts,setLiveDomain:t=>{$e=t.replace(/\/$/,"")},getLiveDomain:()=>$e,getPublisher:async(t,i,e)=>{void 0===i&&(i=null),void 0===e&&(e=Ze);const s=es(t,i,e);Je.info("Getting publisher connection path for stream name: ",s.streamName);const n={streamName:s.streamName,streamType:s.streamType},r={"Content-Type":"application/json",Authorization:"Bearer ".concat(s.token)},h="".concat(is.getEndpoint(),"/api/director/publish");try{const t=await fetch(h,{method:"POST",headers:r,body:JSON.stringify(n)});let i=await t.json();if("fail"===i.status)throw new Ye(i.data.message,t.status);return i=ns(i),Je.debug("Getting publisher response: ",i),H(i.data.streamAccountId),i.data}catch(t){throw Je.error("Error while getting publisher connection path. ",t),t}},getSubscriber:async(t,i,e)=>{void 0===i&&(i=null),void 0===e&&(e=null);const s=ss(t,i,e);H(s.streamAccountId),Je.info("Getting subscriber connection data for stream name: ".concat(s.streamName," and account id: ").concat(s.streamAccountId));const n={streamAccountId:s.streamAccountId,streamName:s.streamName};let r={"Content-Type":"application/json"};s.subscriberToken&&(r=f(l({},r),{Authorization:"Bearer ".concat(s.subscriberToken)}));const h="".concat(is.getEndpoint(),"/api/director/subscribe");try{const t=await fetch(h,{method:"POST",headers:r,body:JSON.stringify(n)});let i=await t.json();if("fail"===i.status)throw new Ye(i.data.message,t.status);return i=ns(i),Je.debug("Getting subscriber response: ",i),s.subscriberToken&&(i.data.subscriberToken=s.subscriberToken),i.data}catch(t){throw Je.error("Error while getting subscriber connection path. ",t),t}}},es=(t,i,e)=>{let s="object"==typeof t?t:{};return 0===w.keys(s).length&&(s={token:t,streamName:i,streamType:e}),s},ss=(t,i,e)=>{let s="object"==typeof t?t:{};return 0===w.keys(s).length&&(s={streamName:t,streamAccountId:i,subscriberToken:e}),s},ns=t=>{if(is.getLiveDomain()){const i=/\/\/(.*?)\//,e=t.data.urls.map(t=>{const e=i.exec(t);return t.replace(e[1],is.getLiveDomain())});t.data.urls=e}if(t.data.drmObject){const i=t.data.drmObject.playReadyUrl;i&&(t.data.drmObject.playReadyUrl="".concat(is.getEndpoint()).concat(i));const e=t.data.drmObject.widevineUrl;e&&(t.data.drmObject.widevineUrl="".concat(is.getEndpoint()).concat(e));const s=t.data.drmObject.fairPlayUrl;s&&(t.data.drmObject.fairPlayUrl="".concat(is.getEndpoint()).concat(s));const n=t.data.drmObject.fairPlayCertUrl;n&&(t.data.drmObject.fairPlayCertUrl="".concat(is.getEndpoint()).concat(n))}return t};function rs(t){this.message=t}rs.prototype=new m,rs.prototype.name="InvalidCharacterError";var hs=typeof s<"u"&&s.atob&&s.atob.bind(s)||function(t){var i=String(t).replace(/=+$/,"");if(i.length%4==1)throw new rs("'atob' failed: The string to be decoded is not correctly encoded.");for(var e,s,n=0,r=0,h="";s=i.charAt(r++);~s&&(e=n%4?64*e+s:s,n++%4)?h+=String.fromCharCode(255&e>>(-2*n&6)):0)s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(s);return h};function os(t){this.message=t}function as(t,i){if("string"!=typeof t)throw new os("Invalid token specified");var e=!0===(i=i||{}).header?0:1;try{return JSON.parse(function(t){var i=t.replace(/-/g,"+").replace(/_/g,"/");switch(i.length%4){case 0:break;case 2:i+="==";break;case 3:i+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(hs(i).replace(/(.)/g,function(t,i){var e=i.charCodeAt(0).toString(16).toUpperCase();return e.length<2&&(e="0"+e),"%"+e}))}catch(t){return hs(i)}}(t.split(".")[e]))}catch(t){throw new os("Invalid token specified: "+t.message)}}os.prototype=new m,os.prototype.name="InvalidTokenError";var us,cs={exports:{}};var ds=(us||(us=1,function(t,i){!function(e){if(null!=i&&"number"!=typeof i.nodeType)t.exports=e();else{var s=e(),n=typeof self<"u"?self:$.global;"function"!=typeof n.btoa&&(n.btoa=s.btoa),"function"!=typeof n.atob&&(n.atob=s.atob)}}(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(t){this.message=t}return i.prototype=new m,i.prototype.name="InvalidCharacterError",{btoa:function(e){for(var s,n,r,h,o=String(e),a=0,u="";a255||n>255||r>255)throw new i("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");u+=t.charAt((h=s<<16|n<<8|r)>>18&63)+t.charAt(h>>12&63)+t.charAt(h>>6&63)+t.charAt(63&h)}switch(o.length%3){case 0:return u;case 1:return u.slice(0,-2)+"==";case 2:return u.slice(0,-1)+"="}},atob:function(e){var s=String(e).replace(/[=]+$/,"");if(s.length%4==1)throw new i("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,h=0,o=0,a="";r=s.charAt(o++);~r&&(n=h%4?64*n+r:r,h++%4)?a+=String.fromCharCode(255&n>>(-2*h&6)):0)r=t.indexOf(r);return a}}})}(cs,cs.exports)),cs.exports);function ls(t){var i,e,s;return{lang:null!=(i=null==t?void 0:t.lang)?i:void 0,message:null==t?void 0:t.message,abortEarly:null!=(e=null==t?void 0:t.abortEarly)?e:void 0,abortPipeEarly:null!=(s=null==t?void 0:t.abortPipeEarly)?s:void 0}}function fs(t){var i,e,s;const n=typeof t;return"string"===n?'"'.concat(t,'"'):"number"===n||"bigint"===n||"boolean"===n?"".concat(t):"object"===n||"function"===n?null!=(s=t&&(null==(e=null==(i=w.getPrototypeOf(t))?void 0:i.constructor)?void 0:e.name))?s:"null":n}function vs(t,i,e,s,n){var r,h,o,a,u,c,d,l;const f=n&&"input"in n?n.input:e.value,v=null!=(h=null!=(r=null==n?void 0:n.expected)?r:t.expects)?h:null,_=null!=(o=null==n?void 0:n.received)?o:fs(f),g={kind:t.kind,type:t.type,input:f,expected:v,received:_,message:"Invalid ".concat(i,": ").concat(v?"Expected ".concat(v," but r"):"R","eceived ").concat(_),requirement:t.requirement,path:null==n?void 0:n.path,issues:null==n?void 0:n.issues,lang:s.lang,abortEarly:s.abortEarly,abortPipeEarly:s.abortPipeEarly},p="schema"===t.kind,m=null!=(l=null!=(d=null!=(c=null!=(u=null!=(a=null==n?void 0:n.message)?a:t.message)?u:function(t,i){var e;return null==(e=void 0)?void 0:e.get(i)}(t.reference,g.lang))?c:p?void g.lang:null)?d:s.message)?l:void g.lang;void 0!==m&&(g.message="function"==typeof m?m(g):m),p&&(e.typed=!1),e.issues?e.issues.push(g):e.issues=[g]}function _s(t){return{version:1,vendor:"valibot",validate:i=>t["~run"]({value:i},ls())}}function gs(t,i){return w.hasOwn(t,i)&&"__proto__"!==i&&"prototype"!==i&&"constructor"!==i}function ps(t,i){var e;const s=[...new Set(t)];return s.length>1?"(".concat(s.join(" ".concat(i," ")),")"):null!=(e=s[0])?e:"never"}var ms=class extends m{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function ws(t,i,e){return"function"==typeof t.fallback?t.fallback(i,e):t.fallback}function ys(t,i,e){return"function"==typeof t.default?t.default(i,e):t.default}function bs(t,i){return{kind:"schema",type:"array",reference:bs,expects:"Array",async:!1,item:t,message:i,get"~standard"(){return _s(this)},"~run"(t,i){var e;const s=t.value;if(Array.isArray(s)){t.typed=!0,t.value=[];for(let n=0;nt.expects),"|"),async:!1,options:t,message:i,get"~standard"(){return _s(this)},"~run"(t,i){let e,s,n;for(const r of this.options){const h=r["~run"]({value:t.value},i);if(h.typed){if(!h.issues){e=h;break}s?s.push(h):s=[h]}else n?n.push(h):n=[h]}if(e)return e;if(s){if(1===s.length)return s[0];vs(this,"type",t,i,{issues:Ps(s)}),t.typed=!0}else{if(1===(null==n?void 0:n.length))return n[0];vs(this,"type",t,i,{issues:Ps(n)})}return t}}}function Cs(){return{kind:"schema",type:"unknown",reference:Cs,expects:"unknown",async:!1,get"~standard"(){return _s(this)},"~run":t=>(t.typed=!0,t)}}let Rs;class Ds extends lt{getRTCPeerConnection(){return this.webRTCPeer?this.webRTCPeer.getRTCPeer():null}stop(){var t;Rs.info("Stopping"),this.webRTCPeer.closeRTCPeer(),null==(t=this.signaling)||t.close(),this.signaling=null,this.stopReconnection=!0,this.webRTCPeer=new xe}isActive(){const t=this.webRTCPeer.getRTCPeerStatus();return Rs.info("Broadcast status: ",t||"not_established"),"connected"===t}setReconnect(){this.signaling.on("migrate",()=>this.replaceConnection()),this.autoReconnect&&(this.signaling.on(ze,()=>{(this.firstReconnection||!this.alreadyDisconnected)&&(this.firstReconnection=!1,this.reconnect({error:new m("Signaling error: wsConnectionError")}))}),this.webRTCPeer.on(ke.connectionStateChange,t=>{Q(t),"connected"===t&&X(new Date),("failed"===t||"disconnected"===t&&this.alreadyDisconnected)&&this.firstReconnection?(this.firstReconnection=!1,this.reconnect({error:new m("Connection state change: RTCPeerConnectionState disconnected")})):"disconnected"===t?(this.alreadyDisconnected=!0,u(()=>this.reconnect({error:new m("Connection state change: RTCPeerConnectionState disconnected")}),1500)):this.alreadyDisconnected=!1}))}async reconnect(t){try{Rs.info("Attempting to reconnect..."),!this.isActive()&&!this.stopReconnection&&!this.isReconnecting&&(this.stop(),this.emit("reconnect",{timeout:Ns(this.reconnectionInterval),error:null!=t&&t.error?null==t?void 0:t.error:new m("Attempting to reconnect")}),this.isReconnecting=!0,await this.connect(this.options),this.alreadyDisconnected=!1,this.reconnectionInterval=1e3,this.firstReconnection=!0,this.isReconnecting=!1)}catch(t){this.isReconnecting=!1,this.reconnectionInterval=Ns(this.reconnectionInterval),Rs.error("Reconnection failed, retrying in ".concat(this.reconnectionInterval,"ms. "),t),u(()=>this.reconnect({error:t}),this.reconnectionInterval)}}constructor(t,i,e,s){if(super(),Rs=e,!i)throw Rs.error("Token generator is required to construct this module."),new m("Token generator is required to construct this module.");this.webRTCPeer=new xe,this.signaling=null,this.autoReconnect=s,this.reconnectionInterval=1e3,this.alreadyDisconnected=!1,this.firstReconnection=!0,this.stopReconnection=!1,this.isReconnecting=!1,this.tokenGenerator=i,this.options=null}}const Ns=t=>t<32e3?2*t:t,Bs=s.RTCRtpSender&&!!RTCRtpSender.prototype.createEncodedStreams&&s.RTCRtpReceiver&&!!RTCRtpReceiver.prototype.createEncodedStreams,Ms="RTCRtpScriptTransform"in s,Ls='(function(){"use strict";function z(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var U={exports:{}};/*!\n * js-logger - http://github.com/jonnyreeves/js-logger\n * Jonny Reeves, http://jonnyreeves.co.uk/\n * js-logger may be freely distributed under the MIT license.\n */var q=U.exports,D;function V(){return D||(D=1,function(t){(function(n){var e={};e.VERSION="1.6.1";var i,r={},o=function(s,u){return function(){return u.apply(s,arguments)}},a=function(){var s=arguments,u=s[0],h,c;for(c=1;c=u.value},trace:function(){this.invoke(e.TRACE,arguments)},debug:function(){this.invoke(e.DEBUG,arguments)},info:function(){this.invoke(e.INFO,arguments)},warn:function(){this.invoke(e.WARN,arguments)},error:function(){this.invoke(e.ERROR,arguments)},time:function(s){typeof s=="string"&&s.length>0&&this.invoke(e.TIME,[s,"start"])},timeEnd:function(s){typeof s=="string"&&s.length>0&&this.invoke(e.TIME,[s,"end"])},invoke:function(s,u){i&&this.enabledFor(s)&&i(u,a({level:s},this.context))}};var f=new l({filterLevel:e.OFF});(function(){var s=e;s.enabledFor=o(f,f.enabledFor),s.trace=o(f,f.trace),s.debug=o(f,f.debug),s.time=o(f,f.time),s.timeEnd=o(f,f.timeEnd),s.info=o(f,f.info),s.warn=o(f,f.warn),s.error=o(f,f.error),s.log=s.info})(),e.setHandler=function(s){i=s},e.setLevel=function(s){f.setLevel(s);for(var u in r)r.hasOwnProperty(u)&&r[u].setLevel(s)},e.getLevel=function(){return f.getLevel()},e.get=function(s){return r[s]||(r[s]=new l(a({name:s},f.context)))},e.createDefaultHandler=function(s){s=s||{},s.formatter=s.formatter||function(p,_){_.name&&p.unshift("["+_.name+"]")};var u={},h=function(c,p){Function.prototype.apply.call(c,console,p)};return typeof console>"u"?function(){}:function(c,p){c=Array.prototype.slice.call(c);var _=console.log,g;p.level===e.TIME?(g=(p.name?"["+p.name+"] ":"")+c[0],c[1]==="start"?console.time?console.time(g):u[g]=new Date().getTime():console.timeEnd?console.timeEnd(g):h(_,[g+": "+(new Date().getTime()-u[g])+"ms"])):(p.level===e.WARN&&console.warn?_=console.warn:p.level===e.ERROR&&console.error?_=console.error:p.level===e.INFO&&console.info?_=console.info:p.level===e.DEBUG&&console.debug?_=console.debug:p.level===e.TRACE&&console.trace&&(_=console.trace),s.formatter(c,p),h(_,c))}},e.useDefaults=function(s){e.setLevel(s&&s.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(s))},e.setDefaults=e.useDefaults,t.exports?t.exports=e:(e._prevLogger=n.Logger,e.noConflict=function(){return n.Logger=e._prevLogger,e},n.Logger=e)})(q)}(U)),U.exports}var j=V(),R=z(j);class w{constructor(n){this.data=n,this.bitOffset=0}readBits(n){if(this.bitOffset+n>this.data.length*8)throw new Error("Attempted to read past the end of the bitstream");let e=0;for(let i=0;i>o&1;e|=a<31||o<0)throw new Error("Invalid seq_parameter_set_id");if(r.includes(i)){const l=e.readExpGolombUnsigned();if(l===3&&e.skip(1),e.readExpGolombUnsigned(),e.readExpGolombUnsigned(),e.skip(1),e.readBits(1)){const s=l!==3?8:12;for(let u=0;u255||i<0)throw new Error("Invalid pic_parameter_set_id");const r=e.readExpGolombUnsigned();this.pps.set(i,{seq_parameter_set_id:r})}collectH265PPS(n){}findActiveSPS(n){const e=new w(n);e.readExpGolombUnsigned(),e.readExpGolombUnsigned();const i=e.readExpGolombUnsigned(),r=this.pps.get(i);if(r){const o=this.sps.get(r.seq_parameter_set_id);if(o){this.activeSPS=o;return}}throw new Error("Cannot find the active SPS")}}const S=new $;function O(t,n){for(;n=e){const a=t[o+2]===1?3:4,d=O(t,o+a+i);if(d>o)r.push(t.subarray(o,d)),e=d;else{r.push(t.subarray(o));break}}else break}return r}function K(t,n){let e=!0;return J(t,n).filter(i=>{const r=i[2]===1?3:4,o=n==="H264"?1:2,a=i[r],d=n==="H264"?a&31:a>>1&63;if(e)switch(d){case m.PPS_H264:case m.PPS_H265:S.collectPPS(T(i.subarray(r+o)));break;case m.SPS_H264:case m.SPS_H265:S.collectSPS(T(i.subarray(r+o)));break;case m.SLICE_IDR:case m.SLICE_NON_IDR:case m.SLICE_PARTITION_A:try{S.findActiveSPS(T(i.subarray(r+o))),e=!1}catch(l){console.info("Failed to find active SPS. Will not be able to extract PIC timing metadata")}break}return[m.SEI_H264,m.SEI_H265_PREFIX,m.SEI_H265_SUFFIX].includes(d)})}function Z(t){let n=0,e=0;for(;t[e]===255;)n+=255,e++;n+=t[e],e++;let i=0;for(;t[e]===255;)i+=255,e++;return i+=t[e],e++,{type:n,content:t.subarray(e,e+i)}}function Q(t){const n=new Uint8Array(L(X)),e=new Uint8Array(L(Y)),i=new Uint8Array(L(P));return n.every((r,o)=>r===t[o])?E.TIMECODE:e.every((r,o)=>r===t[o])?E.LEGACY:i.every((r,o)=>r===t[o])?E.NEW:E.OTHER}function ee(t,n){let e=0;t.uuid=n.subarray(e,e+16),e+=16;const i=Q(t.uuid),r=n.subarray(e);switch(i){case E.LEGACY:case E.OTHER:t.unregistered=r;break;case E.TIMECODE:t.timecode=C(r);break;case E.NEW:{let o=0;const a=H(Date.now()).length,d=r.subarray(o,a);o+=a;const l=r.subarray(o);t.timecode=C(d),t.unregistered=l;break}}}function C(t){const n=t.reduce((o,a)=>(o<=o.length)throw new Error("Invalid pic_struct");const d=o[a],l=[];for(let p=0;p{const r=i[2]===1?3:4,o=n==="H264"?1:2,a=T(i.subarray(r+o)),d=Z(a);switch(d.type){case G.PIC_TIMING:te(e,d.content);break;case G.USER_DATA_UNREGISTERED:ee(e,d.content);break}}),e}function re(t){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(t)}function L(t){return t.replace(/-/g,"").match(/.{1,2}/g).map(n=>parseInt(n,16))}function ie(t,n,e){const i=new Uint8Array(L(t)),r=H(e),o=new TextEncoder().encode(JSON.stringify(n)),a=new Uint8Array(i.length+r.length+o.length);return a.set(i),a.set(r,i.length),a.set(o,r.length+i.length),a}function se(t){const n=[],e=Math.floor(t.byteLength/255),i=t.byteLength%255;for(let r=0;r>BigInt(8*i)&BigInt(255)))}return new Uint8Array(n)}function ae({uuid:t,payload:n,timecode:e}){const i=[0,0,0,1],r=[102],o=ie(t,n,e),a=se(o),d=oe(o),l=new Uint8Array(i.length+r.length+a.length+d.length);return l.set(i),l.set(r,i.length),l.set(a,i.length+r.length),l.set(d,i.length+r.length+a.length),l}function ce({uuid:t,payload:n,timecode:e},i){if(t===""||n==="")throw new Error("uuid and payload cannot be empty");re(t)||(console.warn("Invalid UUID. Using default UUID."),t=P,e=Date.now());const r=ae({uuid:t,payload:n,timecode:e}),o=new DataView(i.data),a=new ArrayBuffer(i.data.byteLength+r.byteLength),d=new DataView(a);for(let l=0;l0)&&self.postMessage({event:"metadata",mid:t,metadata:a})}self.postMessage({event:"complete",frame:{type:n.type,timestamp:n.timestamp,data:n.data}})}e.enqueue(n)}})}function N(t){if(typeof RTCEncodedVideoFrame<"u")try{if(t instanceof RTCEncodedVideoFrame)return!0}catch(n){}return!!(t.constructor&&t.constructor.name==="RTCEncodedVideoFrame"||typeof t.width=="number"&&typeof t.height=="number"||t.type==="video")}function F(){Object.keys(v).sort().join()===I.sort().join()&&(b.shift(),I=[])}function de(t){const n=new Date().getTime();v[t]=n,Object.keys(v).filter(i=>n-v[i]>le).forEach(i=>{delete v[i],delete I[i]}),F()}function W(){return new TransformStream({start(){},flush(){},async transform(t,n){if(N(t)){const i=t.getMetadata().synchronizationSource;if(de(i),!I.includes(i)&&b.length)try{if(!/(h26[4])/.test(y))throw new Error("Sending metadata is not supported with any other codec other than H.264");b[0].uuid===P&&(b[0].timecode=Date.now()),ce(b[0],t),I.push(i)}catch(r){console.error(r)}finally{F()}}n.enqueue(t)}})}function A({readable:t,writable:n},e){t.pipeThrough(e).pipeTo(n)}addEventListener("rtctransform",t=>{let n;if(t.transformer.options.name==="senderTransform")y=t.transformer.options.codec,n=W();else if(t.transformer.options.name==="receiverTransform")k=t.transformer.options.payloadTypeCodec||{},y=t.transformer.options.codec||"",n=M(t.transformer.options.mid);else return;A(t.transformer,n)}),addEventListener("message",t=>{const{action:n}=t.data;switch(n){case"insertable-streams-sender":y=t.data.codec,A(t.data,W());break;case"insertable-streams-receiver":k=t.data.payloadTypeCodec||{},y=t.data.codec||"",A(t.data,M(t.data.mid));break;case"metadata-sei-user-data-unregistered":b.push({uuid:t.data.uuid,payload:t.data.payload});break}})})();\n',Os=typeof self<"u"&&self.Blob&&new Blob([Ls],{type:"text/javascript;charset=utf-8"});function Fs(t){let i;try{if(i=Os&&(self.URL||self.webkitURL).createObjectURL(Os),!i)throw"";const e=new ad(i,{name:null==t?void 0:t.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(i)}),e}catch(i){return new ad("data:text/javascript;charset=utf-8,"+encodeURIComponent(Ls),{name:null==t?void 0:t.name})}finally{i&&(self.URL||self.webkitURL).revokeObjectURL(i)}}const Us=at.get("Publish"),Vs={mediaStream:null,bandwidth:0,metadata:!1,disableVideo:!1,disableAudio:!1,codec:ye.H264,simulcast:!1,scalabilityMode:null,peerConfig:{autoInitStats:!0,statsIntervalMs:1e3}};let Hs;const Ws=t=>{Hs=Hs||Ss({sourceId:Ts(xs()),stereo:Ts(As()),dtx:Ts(As()),absCaptureTime:Ts(As()),dependencyDescriptor:Ts(As()),mediaStream:Ts(Is([bs(Cs()),Cs()])),bandwidth:Ts(ks()),metadata:Ts(As()),disableVideo:Ts(As()),disableAudio:Ts(As()),codec:Ts(Es(w.values(ye))),simulcast:Ts(As()),scalabilityMode:Ts(xs()),peerConfig:Ts(Ss({autoInitStats:Ts(As()),statsIntervalMs:Ts(ks())})),record:Ts(As()),events:Ts(bs(Es(["active","inactive","viewercount"]))),priority:Ts(ks())});const{success:i,issues:e}=function(t,i,e){const s=t["~run"]({value:i},ls(e));return{typed:s.typed,success:!s.issues,output:s.value,issues:s.issues}}(Hs,t);i||Us.warn(new ms(e),t)};function qs(t){if(!t)return new j;const i=t.length,e=new j(i/2);for(let s=0;s=4&&console[s(323)](this[s(310)],...i)}[hn(331)](){for(var t=arguments.length,i=new Array(t),e=0;e=3&&console[s(331)](this[s(310)],...i)}[hn(320)](){for(var t=arguments.length,i=new Array(t),e=0;e=2&&console[s(320)](this[s(310)],...i)}error(){for(var t=arguments.length,i=new Array(t),e=0;e=1&&console.error(this.tag,...i)}constructor(t){this[on(310)]=t}}function un(t){return new an(t)}const cn={logLevel:3,mediaDumps:{video:{in:{durationMs:0,delimited:!0},out:{durationMs:0}},audio:{in:{durationMs:0},out:{durationMs:0}}}};function dn(){return(new Date)[hn(317)]().slice(11,-1)}function ln(){const t=["mediaBuffer","click","529321KfbOwo","endTimestampMs","28972188cmcnxe","containerFileExt","info","4ZlZeJQ","9kyfNFe","mediaType","172953TzXwsI","byteLength","1327806tybvjI","href","createObjectURL","1089qysnCz","112088WLFXHK","substring","tag","692993ZcAeLj","set","download","810qiScYX","startTimestampMs","8821555KArxhe","toISOString","application/octet-stream","logLevel","warn","revokeObjectURL","42PDuKrJ","debug","targetDurationMs"];return(ln=function(){return t})()}class fn{append(t,i){const e=hn;if(!this[e(325)])return!1;if(this[e(325)]=function(t,i){const e=hn,s=new j((0|t[e(303)])+(0|i.byteLength));return s[e(312)](t,0),s[e(312)](i,0|t.byteLength),s}(this[e(325)],t),void 0!==i)if(-1===this[e(315)])this.startTimestampMs=i,this[e(328)]=i+this[e(324)];else if(i>=this[e(328)]){const t=(new Date)[e(317)]()[e(309)](0,19).replace(/:/g,"-"),i=this.mediaType+"-"+t+"."+this.containerFileExt;return function(t,i,e){void 0===e&&(e=hn(318));const s=hn,n=h.createElement("a"),r=new Blob([t],{type:e});n.href=URL[s(306)](r),n[s(313)]=i,n[s(326)](),URL[s(321)](n[s(305)])}(this[e(325)],i),this.mediaBuffer=null,!1}return!0}constructor(t,i,e){const s=hn;this[s(325)]=null,this[s(315)]=-1,this.endTimestampMs=-1,this[s(301)]=t,this[s(330)]=i,this[s(324)]=e,e>0&&(this[s(325)]=new j)}}const vn=mn;!function(){const t=mn,i=Rn();for(;;)try{if(x(t(160))/1+-x(t(363))/2+-x(t(321))/3*(-x(t(401))/4)+x(t(229))/5+-x(t(276))/6+x(t(400))/7*(-x(t(153))/8)+-x(t(223))/9==858456)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const _n=un("[MUX]"),gn=rn[vn(387)];function pn(t,i){const e=vn;let s=new j((0|t[e(413)])+(0|i[e(413)]));return s.set(t,0),s[e(251)](i,0|t[e(413)]),s}function mn(t,i){const e=Rn();return(mn=function(t,i){return e[t-=147]})(t,i)}function wn(t,i,e){return void 0===i&&(i=0),void 0===e&&(e=1/0),((t,i,e,s)=>{const n=vn,r=s[n(425)]||1;i*=r,e*=r;const h=(u=t)instanceof ArrayBuffer?u:u[vn(366)],o=(t[n(188)]||0)+t[n(413)],a=(t[n(188)]||0)+i;var u;let c=_[n(177)](0,_[n(291)](a,o)),d=_[n(291)](c+_[n(177)](e,0),o);return c/=r,d/=r,new s(h,c,d-c)})(t,i,e,j)}function yn(t){const i=vn,e=Array.from(t)[i(238)](t=>t[i(384)](0));return new j(e)}class bn{static get[vn(449)](){return 1}static get[vn(427)](){return 5}static get SEI(){return 6}static get[vn(324)](){return 7}static get[vn(379)](){return 8}static get[vn(272)](){return 9}static get[vn(159)](){const t=vn;return{[bn[t(427)]]:t(427),[bn[t(273)]]:t(273),[bn[t(324)]]:t(324),[bn.PPS]:"PPS",[bn[t(449)]]:"NDR",[bn.AUD]:t(272)}}static[vn(234)](t){const i=vn;return t[i(186)]in bn[i(159)]?bn[i(159)][t.ntype]:i(344)}[vn(365)](){const t=vn;return bn[t(234)](this)+": NRI: "+this[t(209)]()}[vn(209)](){return this[vn(402)]}[vn(234)](){return this[vn(186)]}[vn(306)](){return this[vn(186)]===bn.IDR}[vn(203)](){return this[vn(452)]}[vn(327)](){return this[vn(452)].byteLength}[vn(194)](){return 4+this[vn(327)]()}[vn(341)](){const t=vn,i=new j(this[t(194)]());return new DataView(i[t(366)]).setUint32(0,this[t(194)]()-4),i[t(251)](this.getPayload(),4),i}constructor(t){const i=vn;this[i(452)]=t,this[i(402)]=(96&this[i(452)][0])>>5,this[i(186)]=31&this[i(452)][0],this.isvcl=1==this[i(186)]||5==this[i(186)],this[i(309)]="",this.isfmb=!1}}class An{[vn(433)](t){const i=vn;this.data=t,this[i(368)]=0,this.bitLength=8*t[i(413)]}get[vn(451)](){return this[vn(157)]-this.index}skipBits(t){const i=vn;if(this[i(451)]>>n,h=8-n;if(h>=t)return e&&(this[s(368)]+=t),r>>h-t;{e&&(this[s(368)]+=h);const n=t-h;return r<>>1:-1*(t>>>1)}[vn(239)](){return 1===this[vn(338)](1)}[vn(419)](t){return void 0===t&&(t=1),this.readBits(8*t)}[vn(232)](){return this.readBits(16)}readUInt(){return this[vn(338)](32)}constructor(t){const i=vn;this[i(316)]=t,this[i(368)]=0,this[i(157)]=8*t.byteLength}}class Sn{static[vn(267)](t,i){const e=vn;let s=[],n=!1,r=!1,h=!1,o=!1,a=0,u=0,c=0,d=[];for(;a<=t.byteLength;){if(a1&&(c=u>2?4:3,d.push(a)),u=0):++u}else c=0,d.push(a++);if(d.length>1){const e=d.shift(),l=d[0]-c;if(e1&&3===e&&(u=0,e=t[a++]),0!==e?u=0:++u,i[n++]=e}s.push(i.subarray(0,n))}}}}let l=!0,f=!1;return r||n?r&&n&&(_n[e(265)](e(331)),l=!1):(_n[e(265)]("[H264Parser] No VCL NALUs found"),l=!1),n&&(h&&o?f=!0:_n.warn(e(158))),{valid:l,idr:f,nalus:s}}static[vn(333)](t,i){let e,s=8,n=8;for(let r=0;r0&&t[1]>0&&(f=t[0]/t[1])}a.readBoolean()&&a[i(155)](1),a[i(239)]()&&(a[i(155)](4),a[i(239)]()&&a[i(155)](24)),a[i(239)]()&&(a[i(334)](),a[i(334)]()),a.readBoolean()&&(a.readUInt(),a[i(187)](),a.readBoolean())}return{width:_[i(440)]((16*(n+1)-2*u-2*c)*f),height:(2-h)*(r+1)*16-(h?2:4)*(d+l)}}static[vn(386)](t){const i=vn;let e=new An(t[i(203)]());e[i(419)](),t[i(196)]=0===e[i(179)](),t[i(309)]=e[i(179)]()}[vn(256)](t){const i=vn;var e=Sn[i(432)](new j(t));this.track[i(237)]=e.width,this[i(233)].height=e.height,this.track[i(382)]=[new j(t)],this.track[i(210)]=i(292);let s=new DataView(t.buffer,t[i(188)]+1,4);for(let t=0;t<3;++t){var n=s[i(313)](t)[i(365)](16);n[i(268)]<2&&(n="0"+n),this.track[i(210)]+=n}}[vn(345)](t){const i=vn;this[i(233)][i(434)]=[new j(t)]}[vn(378)](t){const i=vn;if(!t)return!1;let e=!1;switch(t[i(234)]()){case bn[i(427)]:case bn.NDR:e=!0;break;case bn[i(379)]:!this[i(233)][i(434)]&&(this[i(345)](t.getPayload()),!this[i(175)][i(296)]&&this[i(233)][i(434)]&&this.track[i(382)]&&(this.remuxer[i(296)]=!0)),e=!0;break;case bn[i(324)]:!this.track.sps&&(this[i(256)](t[i(203)]()),!this[i(175)][i(296)]&&this[i(233)].pps&&this[i(233)][i(382)]&&(this.remuxer[i(296)]=!0)),e=!0;break;case bn[i(272)]:break;case bn.SEI:e=!0}return e}constructor(t){const i=vn;this.remuxer=t,this[i(233)]=t.mp4track}}class Tn{on(t,i){const e=vn;return!this[e(270)][t]&&(this.listener[t]=[]),this[e(270)][t].push(i),!0}off(t,i){const e=vn;if(this[e(270)][t]){var s=this[e(270)][t].indexOf(i);return s>-1&&this[e(270)][t][e(369)](s,1),!0}return!1}[vn(219)](){this.listener={}}[vn(225)](t,i){const e=vn;return!!this[e(270)][t]&&(this[e(270)][t].map(t=>{t[e(200)](null,[i])}),!0)}constructor(t){const i=vn;this.listener={},this[i(234)]=""|t}}class kn{static box(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s>>24,r[1]=h>>>16&255,r[2]=h>>>8&255,r[3]=255&h,r[n(251)](t,4),o=0,h=8;o>>24,t>>>16&255,t>>>8&255,255&t,0,0,0,0,85,196,0,0]))}[vn(215)](t){const i=vn;return kn[i(347)](kn[i(212)].mdia,this[i(380)](t[i(274)],t[i(290)]),this[i(190)](t[i(234)]),this[i(230)](t))}[vn(443)](t){const i=vn;return kn.box(kn[i(212)][i(443)],new j([0,0,0,0,t>>>24,t>>>16&255,t>>>8&255,255&t]))}[vn(230)](t){const i=vn;return t[i(234)]===i(407)?kn[i(347)](kn[i(212)][i(230)],kn.box(kn.types[i(255)],kn.SMHD),kn[i(147)],this[i(362)](t)):kn[i(347)](kn.types[i(230)],kn[i(147)],this[i(362)](t),kn[i(347)](kn[i(212)].vmhd,kn[i(438)]))}[vn(370)](t,i,e){const s=vn;return kn[s(347)](kn.types.moof,this[s(443)](t),this[s(293)](e,i))}[vn(295)](t,i,e){const s=vn;let n=t[s(268)],r=[];for(;n--;)r[n]=this.trak(t[n]);return kn.box[s(200)](null,[kn[s(212)][s(295)],this[s(240)](e,i),this[s(447)](t)][s(389)](r)[s(389)](this[s(322)](t)))}[vn(322)](t){const i=vn;let e=t[i(268)],s=[];for(;e--;)s[e]=this[i(305)](t[e]);return kn[i(347)][i(200)](null,[kn[i(212)][i(322)]][i(389)](s))}[vn(240)](t,i){const e=vn;let s=new j([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24,t>>>16&255,t>>>8&255,255&t,i>>>24,i>>>16&255,i>>>8&255,255&i,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 kn[e(347)](kn.types.mvhd,s)}[vn(420)](t){const i=vn;let e=t[i(428)]||[],s=new j(4+e.length);for(let t=0;t>>8&255),r.push(255&n),r=r[i(389)](Array.prototype[i(314)][i(395)](s));for(e=0;e>>8&255),h[i(406)](255&n),h=h.concat(Array.prototype[i(314)].call(s));const o=kn[i(347)](kn[i(212)][i(408)],new j([1,r[3],r[4],r[5],255,224|t.sps[i(268)]].concat(r)[i(389)]([t[i(434)][i(268)]]).concat(h))),a=t[i(237)],u=t[i(374)],c=kn[i(347)](kn.types[i(441)],kn.box(kn[i(212)][i(318)],new j([97,118,99,49])),kn[i(347)](kn[i(212)][i(349)],new j([0,0,0,0,...yn(this[i(285)][i(154)][i(415)][i(201)]),0,1,0,0])),kn.box(kn.types[i(217)],this[i(298)](i(415))));return kn[i(347)](kn[i(212)].encv,new j([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,a>>>8&255,255&a,u>>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,65,86,67,32,67,111,100,105,110,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]),o,c)}[vn(372)](t){const i=vn;let e=t[i(154)][i(413)],s=new j(26+e+3);return s[i(251)]([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5,e]),s[i(251)](t[i(154)],26),s.set([6,1,2],26+e),s}[vn(403)](t){const i=vn,e=t[i(354)];return kn[i(347)](kn[i(212)][i(403)],new j([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t[i(390)],0,16,0,0,0,0,e>>>8&255,255&e,0,0]),kn[i(347)](kn[i(212)][i(372)],this[i(372)](t)))}[vn(266)](t){const i=vn,e=t[i(354)];return new j([0,t[i(390)],1,56,0,0,e>>>8&255,255&e,0,0,0])}[vn(416)](t){const i=vn,e=t.audiosamplerate;return kn[i(347)](kn.types[i(416)],new j([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t[i(390)],0,16,0,0,0,0,e>>>8&255,255&e,0,0]),kn[i(347)](kn[i(212)][i(266)],this[i(266)](t)))}[vn(394)](t){const i=vn,e=kn[i(347)](kn.types[i(266)],this.dOps(t)),s=kn[i(347)](kn.types[i(441)],kn.box(kn.types.frma,new j([79,112,117,115])),kn[i(347)](kn.types.schm,new j([0,0,0,0,...yn(this[i(285)][i(154)].audio[i(201)]),0,1,0,0])),kn.box(kn.types[i(217)],this[i(298)](i(407)))),n=t[i(354)];return kn[i(347)](kn[i(212)].enca,new j([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t[i(390)],0,16,0,0,0,0,n>>>8&255,255&n,0,0]),e,s)}[vn(165)](t){const i=vn;return t[i(234)]===i(407)?kn[i(347)](kn[i(212)][i(165)],kn[i(168)],t[i(199)]?this[i(394)](t):this[i(416)](t)):kn[i(347)](kn.types[i(165)],kn[i(168)],this[i(303)](t))}[vn(278)](t){const i=vn,e=t.id,s=t[i(290)],n=t[i(237)],r=t[i(374)],h=t[i(388)];return kn[i(347)](kn[i(212)].tkhd,new j([0,0,0,7,0,0,0,0,0,0,0,0,e>>>24,e>>>16&255,e>>>8&255,255&e,0,0,0,0,s>>>24,s>>>16&255,s>>>8&255,255&s,0,0,0,0,0,0,0,0,0,0,0,0,255&h,h%1*10&255,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,n>>>8&255,255&n,0,0,r>>>8&255,255&r,0,0]))}[vn(293)](t,i){var e;const s=vn,n=t.id,r=t[s(428)][0][s(171)],h=t.samples[0][s(290)],o=t[s(428)][0].flags,a=kn[s(347)](kn[s(212)].tfhd,new j([0,2,0,58,n>>>24,n>>>16&255,n>>>8&255,255&n,0,0,0,1,h>>>24,n>>>16&255,h>>>8&255,255&h,r>>>24,r>>>16&255,r>>>8&255,255&r,0,o[s(264)],0,0])),u=kn[s(347)](kn[s(212)].tfdt,new j([0,0,0,0,i>>>24,i>>>16&255,i>>>8&255,255&i]));if(t.encrypted){let i,n;if(t[s(234)]===s(415)?(i=!0,n=this[s(350)][s(415)]+(null==(e=t.samples[0][s(191)])?void 0:e.byteLength)):(i=!1,n=this[s(350)].audio),n>0){const e=this[s(242)](n),r=this[s(340)](t[s(428)],i),h=e[s(268)]+20+r[s(268)]+a[s(268)]+u[s(268)]+8+16+8+8,o=this[s(271)](t,h);return kn[s(347)](kn[s(212)][s(293)],a,u,o,e,this.saio(h-r[s(268)]+o.length+8),r)}{const i=this[s(340)](null,!1),e=i.length+a[s(268)]+u[s(268)]+8+16+8+8,n=this[s(271)](t,e);return kn[s(347)](kn.types[s(293)],a,u,n,i)}}return kn.box(kn[s(212)].traf,a,u,this.trun(t,a[s(268)]+u.length+8+16+8+8))}trak(t){const i=vn;return t.duration=t[i(290)]||4294967295,kn.box(kn[i(212)].trak,this[i(278)](t),this[i(215)](t))}[vn(305)](t){const i=vn,e=t.id;return kn[i(347)](kn.types[i(305)],new j([0,0,0,0,e>>>24,e>>>16&255,e>>>8&255,255&e,0,0,0,1,0,0,0,16,0,0,0,0,0,0,0,0]))}trun(t,i){const e=vn;let s=(t[e(428)]||[])[e(268)],n=new j(12);return i+=20,n.set([0,0,0,1,s>>>24,s>>>16&255,s>>>8&255,255&s,i>>>24,i>>>16&255,i>>>8&255,255&i],0),kn[e(347)](kn.types[e(271)],n)}[vn(224)](t,i){const e=vn,s=e(445),n=function(t){const i=function(t){const i=vn;let e="";for(let s=0;s',e(308),"",e(398),e(353),e(216)+n+'"',">",e(412),e(249),e(391),i?""+i+e(423):"",e(351),e(269)].join("")))}pssh(t){const i=vn;if(this[i(285)][i(383)][i(202)](i(178)))return kn[i(347)](kn.types[i(447)],new j([0,0,0,0,237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237,0,0,0,18,18,16,...this[i(285)][i(154)][t[0][i(234)]].keyId]));if(this[i(285)][i(383)]===i(356)){const e=this[i(224)](this[i(285)][i(154)][t[0][i(234)]][i(429)],this.drm[i(371)]),s=e[i(413)];return kn[i(347)](kn[i(212)][i(447)],new j([0,0,0,0,154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149,s>>>24,s>>>16&255,s>>>8&255,255&s,...e]))}return this.drm[i(383)]===i(323)?kn[i(347)](kn[i(212)][i(447)],new j([1,0,0,0,16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75,0,0,0,1,...this.drm[i(154)][t[0].type].keyId,0,0,0,0])):this.drm[i(383)]===i(397)?null:void _n[i(189)](i(393)+this[i(285)][i(383)])}[vn(298)](t){const i=vn;let e,s,n=this[i(285)][i(154)][t];return n[i(201)]===i(226)?(e=new j([16,...n.iv]),s=25):(e=new j([]),s=0),kn[i(347)](kn[i(212)][i(298)],new j([1,0,0,0,0,s,1,this[i(350)][t],...n[i(429)],...e]))}[vn(242)](t){const i=vn;return kn[i(347)](kn[i(212)][i(242)],new j([0,0,0,0,t,0,0,0,1]))}[vn(204)](t){const i=vn;return kn[i(347)](kn[i(212)][i(204)],new j([0,0,0,0,0,0,0,1,t>>>24,t>>>16&255,t>>>8&255,255&t]))}[vn(340)](t,i){const e=vn;let s=null;return t&&(1!==t[e(268)]&&_n[e(189)](e(182)+t[e(268)]+" samples - expected 1"),s=t[0][e(191)]),s&&s[e(413)]?kn[e(347)](kn[e(212)].senc,new j([0,0,0,i?2:0,0,0,0,1,...s])):kn.box(kn[e(212)][e(340)],new j([0,0,0,0,0,0,0,1]))}[vn(439)](t,i,e){const s=vn,n=this[s(295)](t,i,e);let r=new j(kn[s(183)].byteLength+n[s(413)]);return r[s(251)](kn[s(183)]),r[s(251)](n,kn[s(183)][s(413)]),r}constructor(t){var i,e;const s=vn;this[s(285)]=t,this.saiIvSize={video:"cenc"===(null==(i=t.config[s(415)])?void 0:i[s(201)])?16:0,audio:"cenc"===(null==(e=t[s(154)][s(407)])?void 0:e[s(201)])?16:0},kn[s(212)]={avc1:[],encv:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],Opus:[],dOps:[],enca:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],pssh:[],sinf:[],frma:[],schm:[],schi:[],tenc:[],saiz:[],saio:[],senc:[]};for(let t in kn[s(212)])kn.types[t]=[t[s(384)](0),t[s(384)](1),t[s(384)](2),t.charCodeAt(3)];const n=new j([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]),r=new j([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]);kn.HDLR_TYPES={video:n,audio:r};const h=new j([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),o=new j([0,0,0,0,0,0,0,0]);kn.STTS=kn[s(377)]=kn[s(213)]=o,kn.STSZ=new j([0,0,0,0,0,0,0,0,0,0,0,0]),kn[s(438)]=new j([0,0,0,1,0,0,0,0,0,0,0,0]),kn[s(307)]=new j([0,0,0,0,0,0,0,0]),kn[s(168)]=new j([0,0,0,0,0,0,0,1]);const a=new j([105,115,111,109]),u=new j([97,118,99,49]),c=new j([0,0,0,1]);kn[s(183)]=kn[s(347)](kn[s(212)].ftyp,a,c,a,u),kn[s(147)]=kn[s(347)](kn.types.dinf,kn[s(347)](kn[s(212)][s(280)],h))}}let En=1;class xn{static[vn(411)](){return En++}[vn(246)](){const t=vn;this.mp4track[t(263)]=0,this[t(207)][t(428)]=[]}[vn(211)](){const t=vn;return!(!this[t(296)]||!this[t(428)][t(268)])}constructor(){this.seq=1}}class Pn extends xn{resetTrack(){const t=vn;this[t(437)]=1,this[t(222)]=0,this[t(336)]=0}[vn(181)](t,i,e){const s=vn;if(t[s(268)]>0)for(let n=0;n0&&this.readyToDecode&&(this[s(207)][s(263)]+=r,this[s(428)].push({units:t,size:r,keyFrame:n.keyFrame,duration:n[s(290)],sampleAuxInfo:i,timestamp:e}))}}[vn(161)](){const t=vn;if(!this[t(211)]()||!this[t(428)])return null;let i,e=this.mp4track[t(428)],s=this.samples[t(342)](),n=s.units,r=(1e3*s[t(332)]|0)-this[t(222)]|0;r<5&&(r=5),r>5e3&&_n[t(381)](t(430)+(r/1e3|0)+" s"),this.dts=this[t(222)],this[t(222)]+=r,i={size:s.size,duration:r,cts:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,isNonSync:s[t(148)]?0:1,dependsOn:s[t(148)]?2:1},sampleAuxInfo:s[t(191)]};let h=0;for(const i of n)h+=i[t(194)]();let o=0,a=new j(h);for(const i of n)a[t(251)](i[t(341)](),o),o+=i[t(194)]();return e.push(i),new j(a[t(366)],0,h)}constructor(t,i){const e=vn;super(),this[e(296)]=!1,this[e(222)]=0,this[e(336)]=0,this[e(361)]=i,this[e(207)]={id:xn[e(411)](),type:e(415),len:0,fragmented:!0,sps:"",pps:"",width:0,height:0,timescale:t,duration:t,samples:[],encrypted:!0},this[e(428)]=[],this[e(302)]=new Sn(this)}}class Cn extends Tn{[vn(281)](t){const i=vn;("video"===t||"both"===t)&&(this[i(357)][i(415)]=new In(this.timescale,this[i(361)]),this[i(335)][i(406)](i(415))),(t===i(407)||t===i(417))&&(this[i(357)][i(407)]=new Pn(this.timescale),this.trackTypes[i(406)](i(407)))}[vn(250)](){const t=vn;for(let i of this[t(335)])this.tracks[i].resetTrack();this[t(260)]=!1}[vn(262)](){const t=vn;this.tracks={},this[t(219)]()}[vn(246)](){const t=vn;if(this[t(260)])for(let i of this[t(335)]){let e=this[t(357)][i];for(;;){let s=e[t(161)]();if(!s||!s.byteLength)break;let n={type:i,payload:pn(this[t(164)][t(370)](e[t(437)]++,e[t(336)],e[t(207)]),this.mp4[t(244)](s)),dts:e[t(336)]};this[t(225)](t(366),n),e[t(246)]()}}else this[t(211)]()&&(this[t(225)]("ready"),this.initSegment(),this[t(260)]=!0,this[t(246)]())}[vn(439)](){const t=vn;for(let i of this[t(335)]){let e=this[t(357)][i],s={type:i,payload:this[t(164)][t(439)]([e[t(207)]],this[t(163)],this.timescale)};this[t(225)]("buffer",s)}}isReady(){const t=vn;for(let i of this[t(335)])if(!this.tracks[i][t(296)]||!this[t(357)][i][t(428)][t(268)])return!1;return!0}[vn(181)](t){const i=vn;for(let e of this[i(335)]){let s=t[e];s.length>0&&this[i(357)][e][i(181)](s,"audio"===e?t.audioSampleAuxInfo:t[i(310)],t[i(332)])}this[i(246)]()}constructor(t,i){const e=vn;super(e(175)),this[e(260)]=!1,this.trackTypes=[],this[e(357)]={},this[e(274)]=1e3,this[e(163)]=0,this[e(361)]=t,this.mp4=i}}function Rn(){const t=["stsd","isSupported","src","STSD","endMSE","abort","size","appendBufferError","addSourceBuffer","setupMSE","remuxer","addEventListener","max","com.widevine","readUEG"," - ","remux","Received ","FTYP","readyState","valid","ntype","readUInt","byteOffset","error","hdlr","sampleAuxInfo","webkitsourceopen","Checking codec","getSize","irrecoverableError","isfmb","[MSE] buffer error:","url","encrypted","apply","encryption","startsWith","getPayload","saio","open","[MSE] source buffer error","mp4track","append","getNri","codec","isReady","types","STCO","feed","mdia",'VALUE="',"schi","STSZ","offAll","jmuxer","skipEG","nextDts","1036611gAoRea","generatePlayReadyHeader","dispatch","cbcs","stsc","endOfStream","6576815frVeWy","minf","releaseBuffer","readUShort","track","type","stsz","isvcl","width","map","readBoolean","mvhd","onReady","saiz","reportDiscontinuity","mdat","bufferControllers","flush","patchSampleAuxinfo","readEG","","reset","set","onMSEClose","setUint16","idr","smhd","parseSPS","bind","message","getBits","initialized","sourceBuffer","destroy","len","isNonSync","warn","dOps","extractNALUs","length","","listener","trun","AUD","SEI","timescale","Num frames in chunk: ","7620738FWzrwf","mode","tkhd","dbgMediaDump","dref","addTrack","doAppend","options","[MSE] sourceclose","drm","mediaSource","Failure: Browser doesn't support MSE/MMS",'/mp4; codecs="',"function","duration","min","avc1.","traf","[MSE] sourceopen","moov","readyToDecode","resetTrack","tenc","onMSEOpen","MediaSource","removeSourceBuffer","h264","encv","sourceopen","trex","isKeyframe","SMHD","","stype","videoSampleAuxInfo","ended","getElementById","getUint8","slice","audioSampleAuxInfo","data","ready","frma","mseReady","string","4760043VatbTq","mvex","org.w3.clearkey","SPS","buffered","no video element were found to render, provide a valid video element","getPayloadSize",'","out",'","units","Unsupported DRM type ","enca","call","POSITIVE_INFINITY","com.apple.fps","","getVideoFrames","646233hEZDuD","4LuRDMh","nri","mp4a","ManagedMediaSource","buffer error","push","audio","avcC","onError","Buffered range ","getTrackID","","byteLength","No A/V data","video","Opus","both","HDLR_TYPES","readUByte","sdtp","STTS","hasRedundancy","","revokeObjectURL","BYTES_PER_ELEMENT","webkitsourceclose","IDR","samples","keyId","timestamp gap: ","node","readSPS","setData","pps","onBuffer","remuxController","seq","VMHD","initSegment","ceil","sinf","sourceclose","mfhd","skipLZ","http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader","Browser does not support codec","pssh","mediasource is not available to end: ","NDR","isReset","bitsAvailable","payload","DINF","keyFrame","isDependedOn","isTypeSupported","assign","waitingForIdr","8hmeyto","config","skipBits","remove","bitLength","[H264Parser] IDR without SPS/PPS, not suitable for recovery","TYPES","13659xNePtU","getFramePayload","onBufferError","mediaDuration","mp4"];return(Rn=function(){return t})()}class Dn extends Tn{[vn(262)](){const t=vn;this[t(337)]=null,this[t(279)]=null;try{this[t(261)]&&(this.sourceBuffer[t(170)](),this.mse[t(301)](this[t(261)]),this.sourceBuffer=null)}catch(t){}this.offAll()}[vn(282)](){const t=vn;if(this[t(337)][t(268)]&&this[t(261)]&&!this.sourceBuffer.updating){if(this[t(261)].buffered.length>1){for(let i=0;i0&&(this[n(279)]=new fn(i,n(164),r)),this.sourceBuffer=t,this[n(385)]=e,this[n(195)]=!1,this[n(261)].addEventListener(n(189),t=>{const i=n;_n.warn(i(206),t,this.type),this[i(195)]=!0,this.dispatch("error",{type:this[i(234)],name:i(366),error:i(405)})})}}class Nn extends Tn{static isSupported(t){const i=vn;return s[i(404)]?s.ManagedMediaSource[i(150)](t):!!s[i(300)]&&s[i(300)][i(150)](t)}[vn(348)](){const t=vn;typeof this[t(283)][t(431)]===t(320)&&""==this.options[t(431)]&&_n[t(189)](t(326)),this[t(319)]=!1,this[t(174)]()}[vn(174)](){const t=vn;if(!s.ManagedMediaSource&&!s[t(300)])throw t(287);s.ManagedMediaSource?(this.node[t(373)]=!0,this[t(286)]=new ManagedMediaSource):this[t(286)]=new MediaSource,this[t(198)]=URL.createObjectURL(this[t(286)]),this.node[t(167)]=this[t(198)],this[t(339)]=!1,this[t(286)][t(176)](t(304),this[t(299)][t(257)](this)),this.mediaSource.addEventListener(t(442),this[t(252)][t(257)](this)),this.mediaSource.addEventListener(t(192),this[t(299)][t(257)](this)),this[t(286)][t(176)](t(426),this[t(252)][t(257)](this)),this[t(286)][t(176)](t(189),function(i){const e=t;_n[e(189)](e(343),i[e(258)])})}[vn(169)](){const t=vn;if(!this.mseEnded)try{this[t(339)]=!0,this[t(286)][t(184)]===t(205)&&this[t(286)][t(228)]()}catch(i){_n[t(189)](t(448),i)}}[vn(243)](){const t=vn;_n[t(381)]("Discontinuity!"),this[t(152)]=!0}feed(t){const i=vn;let e={video:[],audio:[]};if(this[i(195)]||this[i(339)]||!t||!this.remuxController)return-1;if(t[i(415)]){e[i(332)]=t.timestamp;const s=this[i(360)](t[i(310)],this[i(164)][i(350)][i(415)]),n=s!=t.video[i(413)];let r=Sn[i(267)](t[i(415)],n);if(!r[i(185)]||r[i(367)].length<1)return 0;if(this.waitingForIdr){if(!r[i(254)])return 0;this[i(152)]=!1}if(!gn&&t[i(310)]){const e=r[i(367)][i(355)]((t,e)=>t+4+e[i(413)],0);e!==s&&this.patchSampleAuxinfo(t[i(310)],this[i(164)][i(350)][i(415)],e-s)}e[i(415)]=this[i(399)](r[i(367)]),e[i(310)]=t[i(310)]}return t[i(407)]&&(e[i(332)]=t.timestamp,e[i(407)]=[{units:t[i(407)]}],e[i(315)]=t[i(315)]),t[i(415)]||t[i(407)]?(this[i(436)][i(181)](e),0):(_n[i(189)](i(414)),0)}[vn(399)](t){const i=vn;let e=[],s=[],n=!1,r=!1;for(let h of t){let t=new bn(h);t[i(234)]()!==bn[i(427)]&&t[i(234)]()!==bn[i(449)]||Sn[i(386)](t),e.length&&r&&(t[i(196)]||!t[i(236)])&&(s[i(406)]({units:e,keyFrame:n}),e=[],n=!1,r=!1),e.push(t),n=n||t.isKeyframe(),r=r||t[i(236)]}if(e[i(268)])if(r)s.push({units:e,keyFrame:n});else{let t=s[i(268)]-1;t>=0&&(s[t][i(392)]=s[t][i(392)].concat(e))}return 1!==s[i(268)]&&_n.warn(i(275)+s[i(268)]),s}[vn(360)](t,i){if(!t)return 0;const e=(t[0]<<8)+t[1],s=i+2+4;let n=0,r=2;for(;0=0&&(t[s]=n>>>8&255,t[s+1]=255&n)}return 0}[vn(376)](){const t=vn;if(this[t(319)]&&this[t(436)]&&this[t(436)][t(211)]()&&!this[t(245)]){this[t(245)]={};for(let i in this[t(436)][t(357)]){let e=this.remuxController[t(357)][i];const s=""[t(389)](i,t(288)).concat(e.mp4track[t(210)],'"');if(_n[t(381)](t(193),s),!Nn[t(166)](s))return _n.error(t(446)),!1;let n=this.mediaSource[t(173)](s);this[t(245)][i]=new Dn(n,i,this[t(286)]),this[t(245)][i].on(t(189),this[t(162)][t(257)](this))}}}[vn(231)](){const t=vn;for(let i in this.bufferControllers)this[t(245)][i][t(282)]()}[vn(435)](t){const i=vn;this[i(319)]&&this[i(245)]&&this[i(245)][t[i(234)]]&&this[i(245)][t[i(234)]].feed(t[i(452)],t[i(336)])}onMSEOpen(){const t=vn;_n[t(381)](t(294)),this[t(286)].readyState!==t(311)&&(this[t(286)][t(290)]=Number[t(396)],this[t(319)]=!0,typeof this[t(283)].onReady===t(289)&&this[t(283)][t(241)][t(395)](null,this.isReset),URL[t(424)](this[t(198)]),this[t(376)]())}[vn(252)](){const t=vn;_n[t(381)](t(284)),this.mseReady=!1,this[t(169)]()}onBufferError(t){const i=vn;_n.warn(i(197),t),this[i(195)]=!0,this.endMSE(),typeof this.options[i(409)]===i(289)&&this[i(283)][i(409)][i(395)](null,t)}constructor(t){const i=vn;super(i(220)),this[i(195)]=!1,this[i(152)]=!0,this[i(450)]=!1,this[i(319)]=!1,this.mseEnded=!1;let e={node:"",mode:i(415),debug:!1,onReady:function(){},onError:function(t){}};this.options=w[i(151)]({},e,t),this[i(431)]=typeof this.options[i(431)]===i(320)?h[i(312)](this[i(283)][i(431)]):this[i(283)][i(431)],this[i(285)]=t.drm,this[i(164)]=new kn(this[i(285)]),this[i(436)]=new Cn(this.node,this[i(164)]),this[i(436)][i(281)](this[i(283)][i(277)]),this[i(436)].on(i(366),this.onBuffer[i(257)](this)),this[i(436)].on(i(317),this[i(376)][i(257)](this)),this[i(348)]()}}function Bn(t,i){const e=Mn();return(Bn=function(t,i){return e[t-=182]})(t,i)}function Mn(){const t=["1247170HwkwNv","Av","gitVersion","352GaBvIm","toISOString","14XlATBT","2568948xDjIMf","1027225mjPCDe","19691yiLZrh","195999uPnZlk","3038288UlnUQm","2033937CLMUfn"];return(Mn=function(){return t})()}!function(){const t=Bn,i=Mn();for(;;)try{if(x(t(182))/1+x(t(192))/2*(x(t(184))/3)+-x(t(185))/4+-x(t(187))/5+x(t(193))/6+-x(t(183))/7*(x(t(190))/8)+-x(t(186))/9==553943)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const Ln=Hn;function On(){const t=["1236858jPUtaw","certificate","11225xsjioT","275391VrsSlK","5816evMpkd","CrsCCAMSEKDc0WAwLAQT1SB2ogyBJEwYv4Tx7gUijgIwggEKAoIBAQC8Xc/GTRwZDtlnBThq8","7299lkgbxa","1470Lkqtku","production","Development","charCodeAt","xUuwokpsqVIHZrJfu62ar+BF8UVUKdK5oYQoiTZd9OzK3kr29kqGGk3lSgM0/p499p/FUL8oH","baseUrl","375060LzZhzk","230861ZKueQt","12pvGCSu","https://lic.drmtoday.com","35fxICRY","pQnNI61gzHO42XZOMuxytMm0F6puNHTTqhyY3Z290YqvSDdOB+UY5QJuXJgjhvOUD9+oaLlvT","Production","development","https://lic.test.drmtoday.com","UrTEfQxfPR4dJTquE+IDLAi5yeVVxzbAgMBAAE6DGNhc3RsYWJzLmNvbUABEoADMmGXpXg/0q","from","RL9KsD0v7ysBQVdUXEbJotcFz71tI5qc3jwr6GjYIPA3VzusD17PN6AGQniMwxJV12z/EgnUo","baigovcoURAZcr1d/G0rpREjLdVLG0Gjqk63Gx688W5gh3TKemsK3R1jV0dOfj3e6uV/kTpsN","pcFB13osydpD2AaDsgWo5RWJcNf+fzCgtUQx/0Au9+xVm5LQBdv8Ja4f2oiHN3dw","V382D1oJAM0F/YgCQtNDLz7vTWJ+QskNGi5Dd2qzO4s48Cnx5BLvL4H0xCRSw2Ed6ekHSdrRU","27eI5MATX39gYtCnn7dDXVxo4/rCYK0A4VemC3HRai2X3pSGcsKY7+6we7h4IycjqtuGtYg8A","HzgsJ7Hajdsyzn0Vs3+VysAgaJAkXZ+k+N6Ka0WBiZlCtcunVJDiHQbz1sF9GvcePUUi2fM/h","Staging","staging","name"];return(On=function(){return t})()}!function(){const t=Hn,i=On();for(;;)try{if(x(t(326))/1+x(t(325))/2+x(t(315))/3+x(t(327))/4*(-x(t(314))/5)+-x(t(312))/6+x(t(329))/7*(x(t(316))/8)+-x(t(318))/9*(x(t(319))/10)==181728)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const Fn=Ln(317)+Ln(306)+"wyoYOE+M/t1oIbccwlTQ7o+BpV1X6TB7fxFyx1jsBtRsBWphU65w121zqmSiwzZzJ4xsXVQCJ"+Ln(330)+"+vwmV2/NJWxKqHBKdL9JqvOnNiQUF0hDI7Wf8Wb63RYSXKE27Ky31hKgx1wuq7TTWkA+kHnJT"+Ln(334)+Ln(323)+Ln(308)+"7hyskG5ZLAyJMzTvgnV3D8/I5Y6mCFBPb/+/Ri+9bEvquPF3Ff9ip3yEHu9mcQeEYCeGe9zR/"+Ln(307)+Ln(304)+Ln(336)+Ln(305),Un=j[Ln(335)](s.atob(Fn),t=>t[Ln(322)](0));class Vn{toString(){return this.name}[Ln(324)](){const t=Ln;switch(this[t(311)]){case"staging":return"https://lic.staging.drmtoday.com";case"development":return t(333);default:return t(328)}}[Ln(313)](){return Un}constructor(t){this[Ln(311)]=t}}function Hn(t,i){const e=On();return(Hn=function(t,i){return e[t-=304]})(t,i)}Vn[Ln(309)]=new Vn(Ln(310)),Vn[Ln(331)]=new Vn(Ln(320)),Vn[Ln(321)]=new Vn(Ln(332));const Wn=qn;function qn(t,i){const e=zn();return(qn=function(t,i){return e[t-=252]})(t,i)}function zn(){const t=["SampleAuxInfo corrupted","error","50012RXzLep","3301necisu","[RTC-DRM]","subarray","buffer","64zGPhLV","162pDdDkb","659466dfDPqj","SampleAuxInfo corrupted (postfix not found)","data","4199670WddvRf","95WaGAXy","getUint8","137436hbCkvG","1351035XuhSnW","getUint16","byteLength","184863QcuifQ"];return(zn=function(){return t})()}!function(){const t=qn,i=zn();for(;;)try{if(-x(t(253))/1*(x(t(258))/2)+x(t(259))/3+x(t(252))/4*(-x(t(263))/5)+-x(t(265))/6+-x(t(269))/7*(-x(t(257))/8)+-x(t(266))/9+x(t(262))/10==173102)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const Gn=un(Wn(254));!function(){const t=jn,i=Yn();for(;;)try{if(x(t(369))/1+x(t(374))/2+x(t(366))/3+-x(t(373))/4+-x(t(365))/5+-x(t(368))/6*(x(t(370))/7)+x(t(367))/8==110661)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const Xn=[];function jn(t,i){const e=Yn();return(jn=function(t,i){return e[t-=365]})(t,i)}let Qn=null,Kn=0;function Yn(){const t=["799144UpkRWz","356926NfeJZx","set","slice","237700RBIjTO","627444ELwjUL","76968OxbdcX","6xPMWky","172231EpHRtx","1480332fEizHX","push","buffer"];return(Yn=function(){return t})()}const Jn=vr;!function(){const t=vr,i=sr();for(;;)try{if(-x(t(452))/1+-x(t(412))/2+-x(t(478))/3*(x(t(441))/4)+-x(t(485))/5*(-x(t(415))/6)+-x(t(400))/7+x(t(460))/8*(-x(t(486))/9)+-x(t(437))/10*(-x(t(470))/11)==412983)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const Zn=un(Jn(424));let $n={licenseUrl:"",onFetch:void 0};const tr={},ir=(t,i,e)=>(void 0===i&&(i=0),void 0===e&&(e=1/0),((t,i,e)=>{const s=Jn,n=j.BYTES_PER_ELEMENT;i*=n,e*=n;const r=(a=t)instanceof ArrayBuffer?a:a[Jn(484)],h=t[s(483)],o=i;var a;let u=_[s(432)](0,_.min(o,h)),c=_.min(u+_[s(432)](e,0),h);return u/=n,c/=n,new j(r,u,c-u)})(t,i,e));const er=t=>{const i=Jn;let e="";for(const s of t){let t=s.toString(16);1==t[i(433)]&&(t="0"+t),e+=t}return e};function sr(){const t=["360308tFqTFd","usable for decryption (status: ","oct","decode","parse","license","parseFromString","message","8pQccIM","No clear key test key provided!","generateRequest","text/xml","Failed to update the session: ","output-downscaled","target","apply","bind","Failed to update the session","24280927IKsRHd","No PR challenge data!","kids","status","getElementsByTagName","rtcdrmerror","CK license request:","A128KW","3KcCnPp","createSession","License acquisition failed with error ","No media keys for media element!","stringify","byteLength","buffer","82765KyOCry","7206525fRtYVA","error","btoa","9a04f07998404286ab92e65be0885f95","set","[PR] License fetched:","getUint16","onFetch","4630892EspqDe","addEventListener","debug","has","json","Previous lic will be reused","internal-error","subarray","fromCharCode","expired","text","temporary","665922eWbQGg","then","[FPS] License fetched:","174puebov","Content-Type","update","POST","{const i=Jn;return s[i(394)](String[i(408)][i(467)](null,t))[i(421)](/\+/g,"-")[i(421)](/\//g,"_")[i(421)](/=*$/,"")},hr=(t,i)=>{const e=Jn,s=(t=>{const i=Jn,e=JSON[i(456)]((new TextDecoder)[i(455)](t));if(Zn[i(402)](i(476),e),null===nr)throw new m(i(461));const s=[];for(const t of e[i(472)]){const e={kty:i(454),alg:i(477),kid:t,k:rr(nr)};s.push(e)}return(new TextEncoder).encode(JSON[i(482)]({keys:s}))})(i.message);i.target.update(s)[e(439)](function(t){const i=e;Zn[i(393)](i(469),t)})},or=t=>{const i=Jn,e=s[i(438)](t.replace(/-/g,"+")[i(421)](/_/g,"/")),n=new j(e[i(433)]);for(let t=0;t2?e-2:0),n=2;n{const e=Jn;ar($n[e(445)],i[e(459)])[e(413)](t=>t[e(404)]()).then(t=>{const s=e;Zn[s(402)](s(425),t[s(457)]);const n=or(t[s(457)])[s(484)];i[s(466)][s(417)](n)[s(439)](t=>{const i=s;Zn[i(393)](i(469),t)})})[e(439)](i=>{const s=e;t[s(446)](new CustomEvent(s(475),{detail:{message:""+i}})),Zn[s(393)](i)})},cr=(t,i)=>{const e=Jn,s=((t,i)=>{const e=Jn,s=new DOMParser;try{const t=function(t,i,e){void 0===e&&(e=!1);const s=Jn;if(!t)return"";let n=t;if(!e&&n[s(483)]%2!=0)throw Zn[s(393)](s(448)),new m("Data does not seem to be UTF-16 encoded!");const r=ir(n);let h;if((255===r[0]&&254===r[1]||254===r[0]&&255===r[1])&&(n=r[s(407)](2)),n instanceof ArrayBuffer)h=n;else{const t=new j(n[s(483)]);t[s(396)](ir(n)),h=t[s(484)]}const o=_[s(447)](n[s(483)]/2),a=new Uint16Array(o),u=new DataView(h);for(let t=0;t-1){const i=s[e(458)](t,e(463))[e(474)]("Challenge")[0].childNodes[0][e(420)];if(null===i)throw new m(e(471));return or(i)}Zn[e(444)]("[PR] Challenge node not found")}catch(i){t[e(446)](new CustomEvent(e(475),{detail:{message:""+i}})),Zn[e(393)](i)}return null})(t,i.message);if(null===s)return t[e(446)](new CustomEvent("rtcdrmerror",{detail:{message:e(471)}})),void Zn[e(393)](e(471));ar($n[e(445)],s[e(484)],!0)[e(413)](t=>t[e(440)]())[e(413)](s=>{const n=e;Zn[n(402)](n(397),s),i[n(466)][n(417)](s)[n(439)](function(i){const e=n;t[e(446)](new CustomEvent(e(475),{detail:{message:e(464)+i}})),Zn[e(393)]("Failed to update the session",i)})}).catch(i=>{const s=e;t.dispatchEvent(new CustomEvent(s(475),{detail:{message:""+i}})),Zn[s(393)](i)})},dr=(t,i)=>{const e=Jn;ar($n.licenseUrl,i[e(459)])[e(413)](t=>{const i=e,s=t[i(410)]();return Zn[i(402)](i(414),t,s),s})[e(413)](t=>{const s=e;i.target[s(417)](or(t))})[e(439)](i=>{const s=e;t[s(446)](new CustomEvent(s(475),{detail:{message:""+i}})),Zn.error(i)})},lr=(t,i)=>{tr[t]=i},fr=rn.isSafari;function vr(t,i){const e=sr();return(vr=function(t,i){return e[t-=393]})(t,i)}let _r=!fr;const gr=new Map;function pr(t){return Gs(this,void 0,void 0,function*(){const i=vr;if(null===t.initData)throw new m(i(442));const e=t[i(466)];if(null===e)throw new m(i(426));const s=e.mediaKeys;if(null===s)throw new m(i(481));const n=er(new j(t[i(423)])),r=n+e.id;let h=null;gr[i(403)](r)&&(h=gr.get(r),null!=h&&h.close(),gr.delete(r)),Zn[i(402)](i(h?405:435));let o=null;try{o=s.createSession(_r?"persistent-license":"temporary")}catch(t){Zn[i(402)]("EME createSession(persistent) failed:",t)}if(!o&&_r){_r=!1;try{o=s[i(479)](i(411))}catch(t){Zn.error("EME createSession(temporary) failed:",t)}}if(o)if(o.addEventListener(i(450),t=>{const s=i;t[s(466)][s(430)][s(431)]((t,i)=>{const n=s;(t===n(409)||"output-restricted"===t||t===n(465)||t===n(406))&&e[n(446)](new CustomEvent(n(475),{detail:{message:"Key "+er(new j(i))+" is not "+(n(453)+t)+")",keyId:i}}))})}),fr?o[i(401)](i(459),dr.bind(null,e),!1):-1!==n.indexOf(i(436))?o[i(401)](i(459),ur[i(468)](null,e),!1):-1!==n[i(434)](i(395))?o.addEventListener(i(459),cr[i(468)](null,e),!1):o.addEventListener(i(459),hr[i(468)](null,e),!1),h)try{(yield o.load(h[i(422)]))?gr[i(396)](r,o):e[i(446)](new CustomEvent(i(475),{detail:{message:i(428)}}))}catch(t){e[i(446)](new CustomEvent(i(475),{detail:{message:i(451)+t}}))}else o[i(462)](t[i(429)],t[i(423)])[i(413)](()=>{_r&&gr[i(396)](r,o)})[i(439)](t=>{const s=i;e.dispatchEvent(new CustomEvent(s(475),{detail:{message:s(427)+t}}))});else e[i(446)](new CustomEvent(i(475),{detail:{message:i(449)}}))})}const mr=Vr;!function(){const t=Vr,i=Or();for(;;)try{if(-x(t(462))/1*(-x(t(532))/2)+-x(t(543))/3+x(t(682))/4+-x(t(692))/5*(x(t(588))/6)+-x(t(539))/7+x(t(496))/8+-x(t(549))/9==672532)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const wr=un(mr(673)),yr=rn[mr(607)],br=rn[mr(540)],Ar=rn[mr(647)],Sr=rn[mr(489)],Tr=rn[mr(478)],kr=rn.platform,Er=rn[mr(620)],xr=Sr||Tr&&kr===mr(578),Pr=1e6*(br?82:Ar?220:120),Ir=br?5e3:2e3,Cr=br?1.5:.5;function Rr(t){const i=mr;return typeof t!==i(672)||null===t||t instanceof Element||t instanceof Vn?t:(null==(e=t)?void 0:e[mr(584)])instanceof ArrayBuffer&&null!=e&&e.BYTES_PER_ELEMENT?t[i(550)]():Array[i(636)](t)?t.reduce((t,i,e)=>(t[e]=Rr(i),t),[]):t instanceof w?w.keys(t).reduce((i,e)=>(i[e]=Rr(t[e]),i),{}):t;var e}class Dr{constructor(t){const i=mr;this[i(547)]="",this[i(471)]="",this.keySystem="",this[i(603)]=[],this[i(479)]=Rr(t),this.jmuxer=null,this.keyFrameLogCntr=0,this[i(561)]=Date[i(658)](),this[i(585)]=0,this[i(602)]=0,this[i(490)]=-1,this[i(680)]=0,this[i(596)]=0,this[i(491)]=!0,this.keyFrameNeededPosted=!1,this[i(617)]=Ir,this[i(500)]=null,this.dbgMediaDump={video:null,audio:null}}}const Nr=new Map,Br=new j([60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60]),Mr=new j([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]),Lr=new j([213,251,214,184,46,217,62,78,249,138,228,9,49,238,51,183]);function Or(){const t=["isSafari","ansform=$=>{let e=$.transformer;handleTransform(e.options.operation,e.readable,e.writable)}),onmessage=$=>{keyFra","status","DRM config:","key","Development"," will be used","Staging","const DUMMY_IDR_FRAME_SLICE_HDR0=new Uint8Array([32,0,203]),DUMMY_IDR_FRAME_SLICE_HDR1=new Uint8Array([16,0,50]);","enabled","playback at ","now",".experiment","seq","videoElement","data","btoa","PlayReady might not support '","logLevel","cbcs-1-9","encryption"," to ","offset","x-dt-custom-data","let brokenFrame=null,idrFrames=[];function initializeDummyFrames(){brokenFrame=new Uint8Array([0,0,0,1,65,154,255","object","[RTC-DRM]","not-allowed","durationMs","Default transform mode enabled, ","keySystem","timestamp","DRM config keyId must be an instance of 16-byte long Uint8Array.","lastKeyFrameTime","H264 is the only supported video codec.","2533916KeNZJm","out","Applying pre-configured certificate (","buffered","Widevine","x-dt-auth-token"," ms)","com.microsoft.playready.recommendation","error","currentTime","225RwtgWL","end","requestMediaKeySystemAccess","50705YjLCIv","onmessage","environment","wvLicenseUrl","a1d1f1"," requesting a new key frame (latency ","userId","ClearKey","createEncodedStreams","licenseUrl","PlayReady license acquisition might fail without output protection enabled (sessionId is ","feed","dbgMediaDump","jmuxer","MSE (re)init",",255]).buffer,idrFrames.push(new Uint8Array([0,0,0,1,39,100,0,13,172,87,5,6,100,0,0,0,1,40,238,60,176,0,0,0,1,37,","isChrome","config","forEach","Invalid config argument type, DRM config must be an object.","hwSecurity","audioEncrypted","setMediaKeys","fpsCertificate","Unable to create Worker!","GET","customTransform","isEdge","prevSeqNum","keyFrameNeeded","encrypted","targetLatency not set!","opus","FairPlay","7963992IJNztq","streamType","SampleAuxInfo extraction failed (video)"," seeking from ","worker","]: ","video","kind","audio","jitterBufferDelayHint","size","No target media element!","fpsCertificateUrl","wvCertificate","delimited","3000","pipeThrough","/license-server-fairplay/cert/","string",") not found in [","indexOf","warn","ignoreAudio","append","jitterBufferTarget","prLicenseUrl","sessionTypes","authToken","get","RTCRtpScriptTransform","audioElement","catch","trim","join","waitingForIdr","info","52hXHKkY","enqueue","). It has to be a string containing a JWT.","playbackRate","sai","persistent-license","Blob","2699340CvuQCI","isFirefox","transform",'rame:{type:$.type,timestamp:$.timestamp,data:$.data}}),"key"===$.type&&(keyFrameNeeded=!1),$.data=generateDummyFr',"554109usxuWq"," will not be created, use rtcDrmFeedFrame to push frames manually","bind","streams","serverCertificateUrl","includes","3473577nNrBJc","slice","URL","serverCertificate","length","Invalid authToken type (","addEventListener","', it's safer to use 'cbcs' instead.","srcObject","ClearKey is not supported by Safari.","meNeeded=$.data};","value","nextKeyFrameAllowedTime","Error recovery attempted","rtcdrmerror","184,32,0,203,255,38,29,217,24,192,161,96,0,0,12,229,174,166,6,7,20,3,84,0,247,96,193,181,229,128,0,32,32]).buffer"," bytes","both","debug","No valid DRM config found, call rtcDrmConfigure first.","dispatchEvent","certificate","mediaBufferMs","clear","merchant","src","sessionId","reportDiscontinuity","mediaBufferMs should be an integer.","Android","rtcDrmConfigure did not specify audioElement, audio will be dropped","/license-proxy-widevine/cenc/","arrayBuffer","). Edge only supports PlayReady, Widevine and ClearKey.","). Chrome only supports Widevine and ClearKey.","buffer","videoStartTimestamp",'audio/mp4; codecs="opus"',"set","175800AyhMKK","PlayReady","SampleAuxInfo extraction failed (audio)","cenc","codec","videoCapabilities",".. ","Duplicate/reordered frame, prev seq: ","bytesSinceKey","wvCertificateUrl","/license-proxy-headerauth/drmtoday/RightsManager.asmx","robustness","baseUrl","type","audioStartTimestamp","emeConfig","com.widevine.alpha","SW_SECURE_CRYPTO","fpsLicenseUrl","supportsRtpScriptTransform","Target video element (","?audioTransformFunction:videoTransformFunction});e.pipeThrough(a).pipeTo(x)}self.RTCTransformEvent&&(self.onrtctr","createObjectURL","playoutDelayHint","POSITIVE_INFINITY",'ame(keyFrameNeeded),e.enqueue($)}function handleTransform($,e,x){let a=new TransformStream({transform:"audio"===$',"track",'video/mp4; codecs="avc1.640032"',"cbcs","keyFrameRequestInterval","Frame gap: ","keyFrameNeededPosted","isWindows","HW_SECURE_ALL"," bytes, ","GOP is getting too long, requesting a new key frame","temporary","Safari does not support Opus, audio will not be rendered.","stringify","byteLength","message"," frame","H264","mediaDumps","h264","keyFrameLogCntr","requestMediaKeySystemAccess(","Safari doesn't support 'cenc'/AES-CTR, use 'cbcs' instead if possible.","isArray","Invalid DRM type (","DRM config iv must be an instance of 16-byte long Uint8Array.","keyId","pipeTo"," - ","receiver","isInteger","toString","onFetch","next"];return(Or=function(){return t})()}function Fr(t){const i=mr;let e=!1;if((t[i(479)][i(502)]&&t[i(479)].video[i(667)]!==i(572)&&"HW"===t[i(479)][i(502)][i(599)]||t[i(479)][i(504)]&&t[i(479)][i(504)][i(667)]!==i(572)&&"HW"===t.config[i(504)][i(599)])&&(e=!0),t.hwSecurity=e,function(t,i){const e=mr;void 0!==i&&(t[e(479)].mediaBufferMs=i),(void 0===t[e(479)][e(571)]||t.config[e(571)]<0)&&(t[e(479)].mediaBufferMs=100,br?t[e(479)][e(571)]=350:!Ar&&Er&&("PlayReady"===t.config[e(601)]||t[e(482)])&&(t.config[e(571)]=1400))}(t,t[i(479)][i(571)]),void 0===t.config[i(523)]){void 0===t[i(479)][i(468)]&&(t[i(479)][i(468)]="purchase"),void 0===t[i(479)][i(575)]&&(t.config[i(575)]=i(466));const e=s[i(663)](JSON[i(626)]({userId:t[i(479)].userId,sessionId:t.config.sessionId,merchant:t[i(479)].merchant}));lr(i(670),e)}else lr(i(687),t[i(479)][i(523)]);for(const e of[t[i(479)][i(504)],t[i(479)][i(502)]])e&&e.encryption!==i(572)&&(e.keyId||(e[i(639)]=Mr),e.iv||(e.iv=Lr));t[i(552)]=void 0,t[i(547)]="",t[i(471)]="";const n=t[i(479)][i(464)][i(600)]();var r;if(t[i(479)].type===i(469)?(t[i(677)]="org.w3.clearkey",nr=Br):t[i(479)][i(601)]===i(686)?(t[i(677)]=i(604),Er&&e&&(t[i(677)]+=i(659)),t[i(479)][i(509)]?t[i(552)]=t[i(479)][i(509)]:t[i(479)][i(597)]?t[i(547)]=t.config[i(597)]:t[i(552)]=t.config[i(464)][i(570)](),t[i(479)].wvLicenseUrl?t[i(471)]=t.config[i(465)]:t[i(471)]=n+i(580)):t[i(479)][i(601)]===i(589)?(t.keySystem=i(689),t[i(479)][i(521)]?t[i(471)]=t[i(479)][i(521)]:t[i(471)]=n+i(598)):t.config[i(601)]===i(495)&&(t.keySystem="com.apple.fps",t[i(479)][i(485)]?t[i(552)]=t[i(479)][i(485)]:t[i(479)][i(508)]?t[i(547)]=t.config.fpsCertificateUrl:t[i(547)]=n+i(513)+t[i(479)][i(573)],t[i(479)].fpsLicenseUrl?t[i(471)]=t.config[i(606)]:t[i(471)]=n+"/license-server-fairplay/"),r={licenseUrl:t[i(471)],onFetch:t[i(479)][i(645)]},$n=r,t[i(603)]=[],t[i(479)][i(601)]!==i(495)){t[i(603)].push({initDataTypes:[i(591)],sessionTypes:[i(537),i(624)]});for(const e of[t[i(479)][i(502)],t.config[i(504)]])if(e&&e[i(667)]!==i(572)){const s=e==t.config[i(502)]?i(502):i(504);let n;"Widevine"===t.config[i(601)]?n="HW"===e[i(599)]?i(621):i(605):"PlayReady"===t.config[i(601)]&&(n="HW"===e[i(599)]?i(511):"2000"),"video"===s?t[i(603)][0][i(593)]=[{contentType:i(615),encryptionScheme:e[i(667)]===i(591)?i(591):"cbcs-1-9",robustness:n||void 0}]:t[i(603)][0].audioCapabilities=[{contentType:i(586),encryptionScheme:e[i(667)]===i(591)?i(591):i(666),robustness:n||void 0}]}}else t.emeConfig=[{initDataTypes:["sinf"],videoCapabilities:[{contentType:"video/mp4",robustness:""}],distinctiveIdentifier:i(674),persistentState:"not-allowed",sessionTypes:[i(624)]}];wr[i(567)](i(650),t)}function Ur(t){const i=mr;wr[i(567)](i(476));let e=t[i(479)][i(661)];(!t[i(479)][i(502)]||t[i(479)][i(502)][i(667)]===i(572))&&(e=t.config.audioElement),t[i(475)]=null;const s=!t[i(518)]&&t[i(479)].audio&&t[i(479)][i(504)][i(667)]!==i(572),n=t[i(479)][i(502)]&&t[i(479)].video.encryption!==i(572);t[i(596)]=0,t.keyFrameNeeded=!0,t[i(619)]=!1,t[i(617)]=Ir,t[i(585)]=0,t[i(602)]=0,t[i(490)]=-1,t[i(680)]=0,t[i(475)]=new Nn({node:e,mode:i(s?n?566:504:502),fps:60,drm:t}),Ar&&t[i(479)][i(661)]&&t.config.videoElement.play().then(()=>{})[i(527)](()=>{})}function Vr(t,i){const e=Or();return(Vr=function(t,i){return e[t-=461]})(t,i)}function Hr(t,i,e){const s=mr;if(t[s(474)][s(502)]){cn.mediaDumps[s(502)].in[s(510)]&&t[s(474)][s(502)][s(519)](new j([0,0,0,1,9,80]));const e=i[s(678)]/90;t[s(474)][s(502)][s(519)](new j(i[s(662)]),e)||(t[s(474)][s(502)]=null)}if(t[s(479)][s(502)]&&"clear"===t[s(479)][s(502)][s(667)])return null==e||e[s(533)](i),!1;const n=Date[s(658)]();if(i[s(601)]===s(651)){const e=cn.logLevel>=4;++t[s(633)]<(e?Number[s(612)]:5)&&(wr.debug(dn()+" "+i[s(601)]+", "+i.data.byteLength+s(622)+(s(657)+t.config[s(661)].currentTime)),e&&1===t.keyFrameLogCntr&&function(t,i,e){void 0===i&&(i=64),void 0===e&&(e=64);const s=mr,n=new j(t[s(662)]);let r="",h=0;for(let t=0;tPr&&(wr.info(s(623)),t[s(491)]=!0),t[s(475)]&&(function(t,i){const e=mr;0===t.videoStartTimestamp&&(t.videoStartTimestamp=i.timestamp,t[e(617)]=Ir,t[e(561)]=Date.now()+2e3);let s=null,n=!1;if(i[e(662)][e(627)]<=4)wr[e(517)]("Discarding corrupted video frame (too small)"),n=!0;else{const r=new j(i[e(662)],0,4);0!=r[0]||0!=r[1]||0!=r[2]||1!=r[3]?(wr.warn("Discarding corrupted video frame (no Annex B startcode)"),n=!0):(s=function(t,i){const e=Wn,s=new DataView(t.data),n=t.data[e(268)]-2,r=s[e(267)](n);if(r>>4!=1)return Gn[e(271)]("Unsupported SampleAuxInfo version"),null;const h=new j(r-2);let o=0,a=0;for(;t1&&3===i&&(a=0,i=s.getUint8(t++)),0!==i?a=0:++a,h[o++]=i}const u=new DataView(h[e(256)]),c="cenc"===i?16:0,d=c+2+6*u[e(267)](c);return d+2>o?(Gn[e(271)](e(270)),null):{sai:h[e(255)](0,d),offset:n-r,seq:u[e(267)](d)}}return null}(i,t.config[e(502)][e(667)]),!s&&(wr.warn(e(498)),n=!0))}if(s)if(i[e(601)]===e(651))t[e(490)]=s.seq;else{if(-1===t[e(490)])return 0;{let r=s[e(660)]-t[e(490)];if(r<-32767&&(r+=65536),r<=0)return wr.debug(e(595)+t.prevSeqNum+", curr: "+s.seq),0;r>1&&(n=i[e(601)]!==e(651),wr[e(517)](e(618)+t[e(490)]+e(641)+s[e(660)]+", restart required: "+n)),t.prevSeqNum=s[e(660)]}}let r=0;n&&!t[e(475)][e(530)]&&(r=-1,t[e(475)][e(576)]());const h=(i[e(678)]-t[e(585)])/9e4;return s&&t[e(475)][e(473)]({video:new j(i[e(662)],0,s.offset),videoSampleAuxInfo:s[e(536)],timestamp:h})<0&&(r=-1,wr[e(517)](e(562)),Ur(t)),r>=0&&i[e(601)]===e(651)&&(t[e(680)]=h),r}(t,i)<0?t[s(491)]=!0:function(t){const i=mr,e=t[i(479)][i(661)];if(!e||e[i(685)][i(553)]<1||e.paused||e[i(691)]>>2?.875:i<=e?1:i<7*e>>>2?1.125:i<9*e>>>2?1.25:i<11*e>>>2?1.375:1.5,n!==t.playbackRate&&(t[s(535)]=n)}(e,r,s),!(r>>2))if(t[i(680)]>e[i(691)]+.1){const r=1e3*(n-t.lastKeyFrameTime)|0;r>40&&r>s-100?(wr.debug(dn()+i(499)+(e[i(691)]+i(668)+t.lastKeyFrameTime+" (")+(t[i(680)]-e[i(691)])+")"),e[i(691)]=t[i(680)]):wr[i(567)](dn()+" too close to seek, "+r)}else!t.keyFrameNeeded&&Date[i(658)]()>t[i(561)]&&r>s+100&&r>3*s>>>1&&(wr[i(567)](dn()+i(467)+r+i(688)),t[i(491)]=!0,t[i(617)]<16e3&&(t[i(617)]<<=1))}(t)),e?(!t[s(491)]||!xr)&&(i[s(662)]=function(t){return!Qn&&function(){const t=jn;Qn=new j([0,0,0,1,65,154,255,255])[t(372)],Xn[t(371)](new j([0,0,0,1,39,100,0,13,172,87,5,6,100,0,0,0,1,40,238,60,176,0,0,0,1,37,184,32,0,203,255,38,29,217,24,192,161,96,0,0,12,229,174,166,6,7,20,3,84,0,247,96,193,181,229,128,0,32,32])[t(372)]),Xn[t(371)](Xn[0][t(376)](0)),new j(Xn[1])[t(375)]([16,0,50],27)}(),t?Qn:(Kn^=1,Xn[Kn])}(t[s(491)]),e[s(533)](i)):t[s(491)]!=t.keyFrameNeededPosted&&(t[s(500)]&&t.worker.postMessage(t[s(491)]),t.keyFrameNeededPosted=t[s(491)]),t.keyFrameNeeded}function Wr(t,i,e){const s=mr;if(t.dbgMediaDump.audio){const e=i[s(678)]/48;t[s(474)][s(504)][s(519)](new j(i.data),e)||(t.dbgMediaDump[s(504)]=null)}return t[s(479)].audio&&t[s(479)].audio[s(667)]!==s(572)?i[s(662)][s(627)]>0&&function(t,i){const e=mr;var s;if(!t[e(475)]||t[e(518)])return 0;0===t[e(602)]&&(t.audioStartTimestamp=i[e(678)]);const n=(i[e(678)]-t[e(602)])/48e3;if((null===(s=t[e(479)][e(504)])||void 0===s?void 0:s[e(667)])===e(616))return t.jmuxer[e(473)]({audio:new j(i[e(662)]),timestamp:n});const r=function(t){const i=Wn,e=new DataView(t[i(261)]),s=t.data[i(268)]-2,n=e[i(267)](s);if(n>>4!=1)return Gn[i(271)]("Unsupported SampleAuxInfo version"),null;const r=new j(n-2);let h=0;for(;t=16)break}return{sai:r,offset:s-n}}return null}(i);r?t.jmuxer[e(473)]({audio:new j(i[e(662)],0,r[e(669)]),audioSampleAuxInfo:r[e(536)],timestamp:n}):wr[e(690)](e(590))}(t,i):e&&e[s(533)](i),!1}function qr(t){const i=mr;var e,s,n,r,h;if(!t||typeof t!==i(672))throw new g(i(481));if(!(t.videoElement instanceof HTMLVideoElement))throw new g("Invalid videoElement, it must be an instance of HTMLVideoElement.");if(t[i(526)]&&!(t[i(526)]instanceof HTMLMediaElement))throw new g("Invalid audioElement, it must be an instance of HTMLMediaElement.");if(void 0!==t[i(571)]&&!Number[i(643)](t[i(571)]))throw new g("DRM config mediaBufferMs should be an integer.");let o=!1,a=!1,u=!1;const c=[i(616),"cenc",i(572)],d=["SW","HW"];for(const e of[t.video,t[i(504)]])if(e){if(!c[i(548)](e[i(667)]))throw new RangeError("DRM config encryption value must be one of: "+c[i(529)](", "));if(Ar&&e.encryption===i(591))throw new RangeError(i(635));if("clear"!==e[i(667)]){if(a=!0,e.keyId){if(!(e[i(639)]instanceof j)||16!==e[i(639)][i(553)])throw new g(i(679));u=!0}else if(Ar)throw new ReferenceError(i(558));if(e.iv&&(!(e.iv instanceof j)||16!==e.iv[i(553)]))throw new g(i(638));if(e[i(599)]&&!d[i(548)](e[i(599)]))throw new RangeError("DRM config robustness can only be one of: "+d[i(529)](", "));if(e===t.video&&e.codec!==i(630))throw new RangeError(i(681));Ar&&e===t.audio&&e[i(592)]===i(494)&&(o=!0,wr.warn(i(625))),t[i(601)]===i(589)&&("cenc"!==e[i(667)]&&wr[i(517)](i(664)+e[i(667)]+i(556)),void 0===t.sessionId||t[i(575)][i(548)]("f1")||wr[i(517)](i(472)+t[i(575)]+", a1d1f1 is recommended)."))}}if(a){const e=[Vn[i(652)],Vn[i(654)],Vn.Production];if(!e[i(548)](t[i(464)]))throw new RangeError("DRM config env value must be one of: "+e.join(", "));if(t[i(523)]&&typeof t.authToken!==i(514))throw new g(i(554)+typeof t[i(523)]+i(534));if(t[i(601)])if(Ar){if("FairPlay"!==t.type)throw new RangeError(i(637)+t[i(601)]+"). Safari only supports FairPlay.")}else if(Tr){if(t[i(601)]!==i(686)&&"ClearKey"!==t.type)throw new RangeError(i(637)+t[i(601)]+i(583))}else if(Sr&&t[i(601)]!==i(589)&&"Widevine"!==t[i(601)]&&t[i(601)]!==i(469))throw new RangeError(i(637)+t.type+i(582))}if(void 0!==t[i(665)]&&(cn[i(665)]=t[i(665)]),void 0!==t.mediaDumps){if(t.mediaDumps[i(502)]){const r=t[i(631)].video,h=cn[i(631)][i(502)];!(null===(e=r.in)||void 0===e)&&e.durationMs&&(h.in[i(675)]=r.in.durationMs),!(null===(s=r.in)||void 0===s)&&s.delimited&&(h.in.delimited=r.in[i(510)]),null!==(n=r[i(683)])&&void 0!==n&&n.durationMs&&(h[i(683)][i(675)]=r[i(683)].durationMs)}if(t[i(631)][i(504)]){const e=t[i(631)][i(504)],s=cn[i(631)][i(504)];!(null===(r=e.in)||void 0===r)&&r.durationMs&&(s.in.durationMs=e.in.durationMs),null!==(h=e.out)&&void 0!==h&&h[i(675)]&&(s[i(683)][i(675)]=e[i(683)].durationMs)}}let l=Nr[i(524)](t[i(661)]);!l&&(l=new Dr(t),Nr[i(587)](t.videoElement,l)),l[i(656)]=a,l.ignoreAudio=o,l[i(483)]=!o&&l[i(479)][i(504)]&&l[i(479)][i(504)][i(667)]!==i(572),a&&(l[i(479)][i(601)]||(l[i(479)][i(601)]=Ar?"FairPlay":i(686)),u||l.config.type===i(469)||(l[i(479)][i(601)]=i(469)),Fr(l),function(t){Gs(this,void 0,void 0,function*(){const i=Vr;var e,s;let n=t.config[i(661)];if((!t.config[i(502)]||t[i(479)].video[i(667)]===i(572))&&(n=t[i(479)][i(526)]),!n)throw new m(i(507));n[i(574)]="",n[i(557)]=null,yield n[i(484)](null);let r=null;try{r=yield od[i(461)](t[i(677)],t[i(603)])}catch(t){}if(!r&&t.emeConfig[0]){const n=null===(e=t.emeConfig[0][i(522)])||void 0===e?void 0:e[i(516)](i(537));if(void 0!==n&&n>=0){null===(s=t[i(603)][0][i(522)])||void 0===s||s.splice(n,1);try{r=yield od[i(461)](t[i(677)],t[i(603)])}catch(t){}}}if(!r){const e=i(634)+t[i(677)]+") failed";return n[i(569)](new CustomEvent(i(563),{detail:{message:e}})),void wr[i(690)](e)}let h=null;try{h=yield r.createMediaKeys()}catch(t){}if(!h){const e="createMediaKeys("+t.keySystem+") failed";return n.dispatchEvent(new CustomEvent(i(563),{detail:{message:e}})),void wr[i(690)](e)}if(t.serverCertificate)wr[i(567)](i(684)+t[i(552)][i(627)]+" bytes)"),yield h.setServerCertificate(t[i(552)]);else if(t[i(547)]){const e={method:i(487)},s=t.serverCertificateUrl;try{const r=yield t.config[i(645)]?t[i(479)][i(645)](s,e):fetch(s,e);if(!r.ok){const t="Server certificate fetch failed with error "+r[i(649)];return void n[i(569)](new CustomEvent(i(563),{detail:{message:t}}))}const o=yield r[i(581)]();wr[i(567)]("Fetched certificate from "+s+", "+o.byteLength+i(565)),yield h.setServerCertificate(o)}catch(t){const e=t.name+": "+t[i(628)];return wr[i(690)](e),void n[i(569)](new CustomEvent("rtcdrmerror",{detail:{message:e}}))}}yield n[i(484)](h),n[i(555)](i(492),pr),Ur(t)})}(l)),l[i(479)][i(661)][i(555)]("play",function(){const t=i;l[t(479)][t(661)][t(691)]>.5&&(l[t(561)]=Date[t(658)]())})}const zr=mr(655)+mr(671)+mr(477)+mr(564)+'),idrFrames.push(idrFrames[0].slice());let $=new Uint8Array(idrFrames[1]);$.set([16,0,50],27)}let idrPicIdToggle=0;function generateDummyFrame($){return(brokenFrame||initializeDummyFrames(),$)?brokenFrame:idrFrames[idrPicIdToggle^=1]}function audioTransformFunction($,e){postMessage({streamType:"audio",frame:{timestamp:$.timestamp,data:$.data}}),e.enqueue($)}let keyFrameNeeded=!1;function videoTransformFunction($,e){postMessage({streamType:"video",f'+mr(542)+mr(613)+mr(609)+mr(648)+mr(559);function Gr(t){const i=mr;if(0===Nr[i(506)])throw new g(i(568));let e;if(t&&t[i(661)])e=t.videoElement;else{if(1!==Nr[i(506)])throw new g("Several DRM configs detected, rtcDrmOnTrack have to be called with target DRM config.");e=Nr.keys()[i(646)]()[i(560)]}const s=Nr[i(524)](e);if(!s){let t="";throw Nr[i(480)]((i,e)=>{t+=e.id+", "}),t=t[i(550)](0,-2),new g(i(608)+e.id+i(515)+t+"]")}return s}function Xr(t,i){const e=mr;if(t&&t.config[e(661)]){const s=t.config[e(661)];if(s.buffered[e(553)]>0){const t=s.buffered[e(693)](s.buffered[e(553)]-1)-s.currentTime;i[e(611)]=i.jitterBufferDelayHint=i[e(520)]=t}u(Xr,1e3,t,i)}}const jr=at.get("View");jr.setLevel(at.DEBUG);const Qr={metadata:!1,enableDRM:!1,disableVideo:!1,disableAudio:!1,peerConfig:{autoInitStats:!0,statsIntervalMs:1e3}};t.Director=is,t.Logger=at,t.PeerConnection=xe,t.Publish=class extends Ds{async connect(t){void 0===t&&(t=Vs),Ws(t),this.options=f(l(l({},Vs),t),{peerConfig:l(l({},Vs.peerConfig),t.peerConfig),setSDPToPeer:!1}),this.options.metadata=this.options.metadata&&this.options.codec===ye.H264&&!this.options.disableVideo,await this.initConnection({migrate:!1})}async reconnect(t){var i,e;this.options.mediaStream=null!=(e=null==(i=this.webRTCPeer)?void 0:i.getTracks())?e:this.options.mediaStream,super.reconnect(t)}async replaceConnection(){var t,i;Us.info("Migrating current connection"),this.options.mediaStream=null!=(i=null==(t=this.webRTCPeer)?void 0:t.getTracks())?i:this.options.mediaStream,await this.initConnection({migrate:!0})}async record(){var t;this.recordingAvailable?(this.options.record=!0,await(null==(t=this.signaling)?void 0:t.cmd("record")),Us.info("Broadcaster start recording")):Us.error("Record not available")}async unrecord(){var t;this.recordingAvailable?(this.options.record=!1,await(null==(t=this.signaling)?void 0:t.cmd("unrecord")),Us.info("Broadcaster stop recording")):Us.error("Unrecord not available")}stop(){var t;super.stop(),null==(t=this.worker)||t.terminate(),this.worker=null}async initConnection(t){var i,e;let s,n;if(Us.debug("Broadcast option values: ",this.options),this.stopReconnection=!1,!this.options.mediaStream)throw Us.error("Error while broadcasting. MediaStream required"),new m("MediaStream required");if(!t.migrate&&this.isActive())throw Us.warn("Broadcast currently working"),new m("Broadcast currently working");try{n=await this.tokenGenerator(),this.options.peerConfig.iceServers=null==n?void 0:n.iceServers,this.options.peerConfig.encodedInsertableStreams=this.options.metadata}catch(t){throw Us.error("Error generating token."),t instanceof Ye&&(401!==t.status&&this.autoReconnect?this.reconnect():this.stopReconnection=!0),t}if(!n)throw Us.error("Error while broadcasting. Publisher data required"),new m("Publisher data required");const r=as(n.jwt);if(this.streamName=r.millicast.streamName,this.recordingAvailable=r[ds.atob("bWlsbGljYXN0")].record,this.options.record&&!this.recordingAvailable)throw Us.error("Error while broadcasting. Record option detected but recording is not available"),new m("Record option detected but recording is not available");const h=new je({streamName:this.streamName,url:"".concat(n.urls[0],"?token=").concat(n.jwt)}),o=t.migrate?new xe:this.webRTCPeer;await o.createRTCPeer(this.options.peerConfig,Se),null==(i=this.stopReemitingWebRTCPeerInstanceEvents)||i.call(this),null==(e=this.stopReemitingSignalingInstanceEvents)||e.call(this),this.stopReemitingWebRTCPeerInstanceEvents=gt(o,this,[ke.connectionStateChange]),this.stopReemitingSignalingInstanceEvents=gt(h,this,[Xe]);const a=o.getRTCLocalSDP(this.options),u=h.connect();s=await Promise.all([a,u]);const c=s[0];this.options.metadata&&(this.worker||(this.worker=new Fs),this.getRTCPeerConnection().getSenders().forEach(t=>{if(Ms)t.transform=new RTCRtpScriptTransform(this.worker,{name:"senderTransform",codec:this.options.codec});else if(Bs){const{readable:i,writable:e}=t.createEncodedStreams();this.worker.postMessage({action:"insertable-streams-sender",codec:this.options.codec,readable:i,writable:e},[i,e])}}));let d=this.signaling;this.signaling=h;const l=this.signaling.publish(c,this.options),f=o.peer.setLocalDescription(o.sessionDescription);s=await Promise.all([l,f]);let v=s[0];!this.options.disableVideo&&this.options.bandwidth>0&&(v=o.updateBandwidthRestriction(v,this.options.bandwidth)),await o.setRTCRemoteSDP(v),Us.info("Broadcasting to streamName: ",this.streamName);let _=this.webRTCPeer;this.webRTCPeer=o,this.setReconnect(),t.migrate&&this.webRTCPeer.on(ke.connectionStateChange,t=>{var i,e;["connected","disconnected","failed","closed"].includes(t)&&(null==(i=null==d?void 0:d.close)||i.call(d),null==(e=null==_?void 0:_.closeRTCPeer)||e.call(_),d=_=null)})}sendMetadata(t,i){var e;if(void 0===i&&(i="d40e38ea-d419-4c62-94ed-20ac37b4e4fa"),null!=(e=this.options)&&e.metadata&&this.worker)this.worker.postMessage({action:"metadata-sei-user-data-unregistered",uuid:i,payload:t});else{let t="Could not send metadata due to:";this.options?this.options.metadata?this.worker||(t+="\n- Stream not being published."):(t+="\n- Metadata option is not enabled.",this.options.codec!==ye.H264&&(t+="\n- Incompatible codec. Only H264 available."),this.options.disableVideo&&(t+="\n- Video disabled.")):t+="\n- Stream not being published.",Us.warn(t)}}constructor(t,i,e=!0){t&&Us.warn("The streamName property has been deprecated. In a future release, this will be removed. Please do not rely on this value. Instead, set via token generator"),super(null,i,Us,e)}},t.Signaling=je,t.View=class extends Ds{async connect(t){void 0===t&&(t=Qr),this.options=f(l(l({},Qr),t),{peerConfig:l(l({},Qr.peerConfig),t.peerConfig),setSDPToPeer:!1}),this.eventQueue.length=0,await this.initConnection({migrate:!1})}async select(t){void 0===t&&(t={}),jr.debug("Viewer select layer values: ",t),await this.signaling.cmd("select",{layer:t}),jr.info("Connected to streamName: ",this.streamName)}async addRemoteTrack(t,i){jr.info("Viewer adding remote track",t);const e=await this.webRTCPeer.addRemoteTrack(t,i);for(const t of i)t.addTrack(e.receiver.track);return e}async project(t,i){for(const t of i){if(!t.trackId&&!t.media)throw jr.error("Error in projection mapping, trackId or mediaId must be set"),new m("Error in projection mapping, trackId or mediaId must be set");const i=this.webRTCPeer.getRTCPeer();if(t.mediaId&&!i.getTransceivers().find(i=>i.mid===t.mediaId.toString()))throw jr.error("Error in projection mapping, ".concat(t.mediaId," mid not found in local transceivers")),new m("Error in projection mapping, ".concat(t.mediaId," mid not found in local transceivers"))}jr.debug("Viewer project source: layer mappings: ",t,i),await this.signaling.cmd("project",{sourceId:t,mapping:i}),jr.info("Projection done")}async unproject(t){jr.debug("Viewer unproject mediaIds: ",t),await this.signaling.cmd("unproject",{mediaIds:t}),jr.info("Unprojection done")}async replaceConnection(){jr.info("Migrating current connection"),await this.initConnection({migrate:!0})}stop(){var t,i;super.stop(),null==(t=this.drmOptionsMap)||t.clear(),this.DRMProfile=null,null==(i=this.worker)||i.terminate(),this.worker=null,this.payloadTypeCodec={},this.tracksMidValues={},this.eventQueue.length=0}async initConnection(t){var i;let e,s;if(jr.debug("Viewer connect options values: ",this.options),this.stopReconnection=!1,t.abrConfiguration&&t.abrConfiguration.metadata){const i=t.abrConfiguration.metadata.bitrate;if(!i||i<0)throw new m("Invalid bitrate ".concat(i," supplied for ABR. The value must be a non-negative integer value."))}if(!t.migrate&&this.isActive())throw jr.warn("Viewer currently subscribed"),new m("Viewer currently subscribed");try{s=await this.tokenGenerator(),this.options.peerConfig.iceServers=null==s?void 0:s.iceServers,this.options.peerConfig.encodedInsertableStreams=Bs&&(this.options.enableDRM||this.options.metadata)}catch(t){throw jr.error("Error generating token."),t instanceof Ye&&(401!==t.status&&this.autoReconnect?this.reconnect():this.stopReconnection=!0),t}if(!s)throw jr.error("Error while subscribing. Subscriber data required"),new m("Subscriber data required");const n=as(s.jwt);this.streamName=n.millicast.streamName;const r=new je({streamName:this.streamName,url:"".concat(s.urls[0],"?token=").concat(s.jwt)});s.subscriberToken&&(this.subscriberToken=s.subscriberToken);const h=t.migrate?new xe:this.webRTCPeer;await h.createRTCPeer(this.options.peerConfig),null==(i=this.stopReemitingWebRTCPeerInstanceEvents)||i.call(this),this.stopReemitingWebRTCPeerInstanceEvents=gt(h,this,w.values(ke).filter(t=>t!==ke.track)),this.options.metadata&&(this.worker||(this.worker=new Fs),this.worker.onmessage=t=>{if("metadata"===t.data.event){const i=new TextDecoder,e=t.data.metadata;if(e.mid=t.data.mid,e.track=this.tracksMidValues[t.data.mid],e.uuid){const t=e.uuid;e.uuid=t.reduce((t,i)=>t+i.toString(16).padStart(2,"0"),""),e.uuid=e.uuid.replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}if(e.timecode&&(e.timecode=new Date(i.decode(e.timecode))),e.unregistered){const t=i.decode(e.unregistered);try{const i=JSON.parse(t);e.unregistered=i}catch(t){jr.info("The content could not be converted to JSON, returning raw bytes instead")}}this.emit("metadata",e)}}),h.on(ke.track,t=>{this.isMainStreamActive?this.onTrackEvent(t):this.eventQueue.push(t)}),r.on(Xe,async t=>{if(this.isMainStreamActive||"active"!==t.name)"inactive"===t.name&&this.isMainStreamActive&&this.mainSourceId===t.data.sourceId&&(this.isMainStreamActive=!1),this.emit(Xe,t);else{if(this.mainSourceId=t.data.sourceId,!this.DRMProfile&&t.data.encryption){const t=await this.tokenGenerator();t.drmObject&&(this.DRMProfile=t.drmObject)}for(this.emit(Xe,t),this.isMainStreamActive=!0;this.eventQueue.length>0;)this.onTrackEvent(this.eventQueue.shift())}});const o=h.getRTCLocalSDP(f(l({},this.options),{stereo:!0})),a=r.connect();e=await Promise.all([o,a]);const c=e[0];let d=this.signaling;this.signaling=r;const v=this.signaling.subscribe(c,f(l({},this.options),{vad:this.options.multiplexedAudioTracks>0})),_=h.peer.setLocalDescription(h.sessionDescription);e=await Promise.all([v,_]);const g=e[0];this.payloadTypeCodec=me.getCodecPayloadType(g),await h.setRTCRemoteSDP(g),jr.info("Connected to streamName: ",this.streamName);let p=this.webRTCPeer;this.webRTCPeer=h,this.setReconnect(),t.migrate&&this.webRTCPeer.on(ke.connectionStateChange,t=>{var i,e;"connected"===t?u(()=>{var t,i;null==(t=null==d?void 0:d.close)||t.call(d),null==(i=null==p?void 0:p.closeRTCPeer)||i.call(p),d=p=null,jr.info("Current connection migrated")},1e3):["disconnected","failed","closed"].includes(t)&&(null==(i=null==d?void 0:d.close)||i.call(d),null==(e=null==p?void 0:p.closeRTCPeer)||e.call(p),d=p=null)})}onTrackEvent(t){var i,e,n;if(this.tracksMidValues[null==(i=t.transceiver)?void 0:i.mid]=t.track,this.isDRMOn){const i=t.transceiver.mid,e=this.getDRMConfiguration(i);try{!function(t,i){const e=mr;var n,r;const h=t[e(614)][e(503)];h===e(502)&&(t[e(642)][e(611)]=t.receiver[e(505)]=t[e(642)][e(520)]=0);const o=Gr(i),a=o[e(479)][e(661)],u=o.config.audioElement;if(o.enabled){const i=""+e(yr?525:470);if(o[e(479)][e(488)])wr[e(567)](i+e(544));else{if(wr[e(567)](e(676)+i+e(653)),h===e(502)){const t=cn[e(631)][e(502)].in[e(675)];t>0&&(o.dbgMediaDump[e(502)]=new fn(e(502),e(632),t))}else if(h===e(504)){const t=cn[e(631)][e(504)].in[e(675)];t>0&&(o[e(474)][e(504)]=new fn(e(504),e(494),t))}if(yr){if(o[e(500)]=function(t){const i=mr,e=s[i(551)]||s.webkitURL,n=s[i(538)],r=s.Worker;if(!(e&&n&&r&&t))return null;const h=new n([t]);return new r(e[i(610)](h))}(zr),null==o[e(500)])throw new m(e(486));o[e(500)][e(463)]=t=>{const i=e;t[i(662)][i(497)]===i(502)?Hr(o,t.data.frame,null):Wr(o,t.data.frame,null)},t[e(642)][e(541)]=new RTCRtpScriptTransform(o.worker,{operation:h})}else{const i=h===e(502)?Hr:Wr,s={drm:o,transform:(t,e)=>{i(o,t,e)}},n=t[e(642)][e(470)](),r=new TransformStream({transform:s[e(541)][e(545)](s)}),{readable:a,writable:u}=n;a[e(512)](r)[e(640)](u)}}if("audio"===h&&(null===(n=o.config[e(504)])||void 0===n?void 0:n.encryption)===e(572)){if(!u)return void wr[e(517)](e(579));u[e(557)]!==t[e(546)][0]&&(u[e(557)]=t.streams[0]),o[e(479)][e(661)]&&(t[e(642)].playoutDelayHint=t.receiver.jitterBufferDelayHint=t[e(642)][e(520)]=o[e(479)][e(571)],Xr(o,t[e(642)]))}else h===e(502)&&(null===(r=o[e(479)][e(502)])||void 0===r?void 0:r.encryption)===e(572)&&a[e(557)]!==t[e(546)][0]&&(a.srcObject=t[e(546)][0])}else a[e(557)]!==t[e(546)][0]&&(a.srcObject=t[e(546)][0])}(t,e)}catch(t){jr.error("Failed to apply DRM on media Id:",i,"error is: ",t),this.emit("error",new m("Failed to apply DRM on media Id: "+i+" error is: "+t))}this.worker||(this.worker=new Fs),this.worker.addEventListener("message",t=>{"complete"===t.data.event&&function(t,i,e){const s=mr,n=Gr(e);t[s(601)]?Hr(n,t,i):Wr(n,t,i)}(t.data.frame,null,e)})}if(this.options.metadata)if(Ms)t.receiver.transform=new RTCRtpScriptTransform(this.worker,{name:"receiverTransform",payloadTypeCodec:l({},this.payloadTypeCodec),codec:this.options.metadata&&"h264",mid:null==(e=t.transceiver)?void 0:e.mid});else if(Bs){const{readable:i,writable:e}=t.receiver.createEncodedStreams();this.worker.postMessage({action:"insertable-streams-receiver",payloadTypeCodec:l({},this.payloadTypeCodec),codec:this.options.metadata&&"h264",mid:null==(n=t.transceiver)?void 0:n.mid,readable:i,writable:e},[i,e])}this.emit(ke.track,t)}getDRMConfiguration(t){return this.drmOptionsMap?this.drmOptionsMap.get(t):null}async onRtcDrmFetch(t,i){return i.headers||(i.headers=new Headers),i.headers.get("x-dt-custom-data")&&i.headers.delete("x-dt-custom-data"),this.subscriberToken?i.headers.append("Authorization","Bearer ".concat(this.subscriberToken)):jr.warn("onRtcDrmFetch: no subscriberToken"),fetch(t,i)}configureDRM(t){if(!t)throw new m("Required DRM options is not provided");this.drmOptionsMap||(this.drmOptionsMap=new Map);const i={merchant:"dolby",environment:Vn.Production,customTransform:this.options.metadata,videoElement:t.videoElement,audioElement:t.audioElement,video:{codec:"H264",encryption:"cbcs",keyId:qs(t.videoEncryptionParams.keyId),iv:qs(t.videoEncryptionParams.iv)},audio:{codec:"opus",encryption:"clear"},onFetch:this.onRtcDrmFetch.bind(this)};t.mediaBufferMs&&(i.mediaBufferMs=t.mediaBufferMs),this.DRMProfile&&(this.DRMProfile.playReadyUrl&&(i.prLicenseUrl=this.DRMProfile.playReadyUrl),this.DRMProfile.widevineUrl&&(i.wvLicenseUrl=this.DRMProfile.widevineUrl),this.DRMProfile.fairPlayUrl&&(i.fpsLicenseUrl=this.DRMProfile.fairPlayUrl),this.DRMProfile.fairPlayCertUrl&&(i.fpsCertificateUrl=this.DRMProfile.fairPlayCertUrl));try{qr(i),this.drmOptionsMap.set(t.videoMid,i),t.audioMid&&this.drmOptionsMap.set(t.audioMid,i),i.videoElement.addEventListener("rtcdrmerror",t=>{jr.error("DRM error: ",t.detail.message,"in video element:",i.videoElement.id),this.emit("error",new m(t.detail.message))})}catch(i){jr.error("Failed to configure DRM with options:",t,"error is:",i)}}removeDRMConfiguration(t){var i;null==(i=this.drmOptionsMap)||i.delete(t)}get isDRMOn(){return!!this.drmOptionsMap&&this.drmOptionsMap.size>0}exchangeDRMConfiguration(t,i){const e=this.getDRMConfiguration(t),s=this.getDRMConfiguration(i);if(null===e)throw new m("No DRM configuration found for "+t);if(null===s)throw new m("No DRM configuration found for "+i);zs(e.video,s.video,"keyId"),zs(e.video,s.video,"iv");try{qr(e)}catch(t){jr.error("Failed to configure DRM with options:",e,"error is:",t)}try{qr(s)}catch(t){jr.error("Failed to configure DRM with options:",s,"error is:",t)}}constructor(t,i,e=null,s=!0){t&&jr.warn("The streamName property has been deprecated. In a future release, this will be removed. Please do not rely on this value. Instead, set via token generator"),super(null,i,jr,s),this.payloadTypeCodec={},this.tracksMidValues={},this.drmOptionsMap=null,this.eventQueue=[],this.isMainStreamActive=!1,e&&(this.on(ke.track,t=>{e.srcObject=t.streams[0]}),jr.warn("The mediaElement property has been deprecated. In a future release, this will be removed. Please do not rely on this value. Instead, do this in either the `track` or the `active` broadcast event."))}},w.defineProperty(t,Io.toStringTag,{value:"Module"})})}),yd=E(t=>{"use strict";function i(){const t=wd();return i=function(){return t},t}r(),w.defineProperty(t,"__esModule",{value:!0}),function(t,i){for(var e in i)w.defineProperty(t,e,{enumerable:!0,get:w.getOwnPropertyDescriptor(i,e).get})}(t,{get Director(){return i().Director},get Logger(){return i().Logger},get View(){return i().View}})}),bd=E((t,i)=>{r(),i.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),Ad=E((t,i)=>{r(),i.exports=function(t,i){var e=i[0],s=i[1],n=i[2],r=i[3],h=e+e,o=s+s,a=n+n,u=e*h,c=s*h,d=s*o,l=n*h,f=n*o,v=n*a,_=r*h,g=r*o,p=r*a;return t[0]=1-d-v,t[1]=c+p,t[2]=l-g,t[3]=0,t[4]=c-p,t[5]=1-u-v,t[6]=f+_,t[7]=0,t[8]=l+g,t[9]=f-_,t[10]=1-u-d,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),Sd=E((t,i)=>{r(),i.exports=function(t,i,e){var s,n,r,h=e[0],o=e[1],a=e[2],u=_.sqrt(h*h+o*o+a*a);if(_.abs(u)<1e-6)return null;return h*=u=1/u,o*=u,a*=u,s=_.sin(i),n=_.cos(i),r=1-n,t[0]=h*h*r+n,t[1]=o*h*r+a*s,t[2]=a*h*r-o*s,t[3]=0,t[4]=h*o*r-a*s,t[5]=o*o*r+n,t[6]=a*o*r+h*s,t[7]=0,t[8]=h*a*r+o*s,t[9]=o*a*r-h*s,t[10]=a*a*r+n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),Td=E((t,i)=>{r(),i.exports=function(t,i){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=i[0],t[13]=i[1],t[14]=i[2],t[15]=1,t}}),kd=E((t,i)=>{r(),i.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),Ed=E((t,i)=>{r(),i.exports=function(t,i){var e=i[0],s=i[1],n=i[2],r=i[3],h=i[4],o=i[5],a=i[6],u=i[7],c=i[8],d=i[9],l=i[10],f=i[11],v=i[12],_=i[13],g=i[14],p=i[15],m=e*o-s*h,w=e*a-n*h,y=e*u-r*h,b=s*a-n*o,A=s*u-r*o,S=n*u-r*a,T=c*_-d*v,k=c*g-l*v,E=c*p-f*v,x=d*g-l*_,P=d*p-f*_,I=l*p-f*g,C=m*I-w*P+y*x+b*E-A*k+S*T;if(!C)return null;return C=1/C,t[0]=(o*I-a*P+u*x)*C,t[1]=(n*P-s*I-r*x)*C,t[2]=(_*S-g*A+p*b)*C,t[3]=(l*A-d*S-f*b)*C,t[4]=(a*E-h*I-u*k)*C,t[5]=(e*I-n*E+r*k)*C,t[6]=(g*y-v*S-p*w)*C,t[7]=(c*S-l*y+f*w)*C,t[8]=(h*P-o*E+u*T)*C,t[9]=(s*E-e*P-r*T)*C,t[10]=(v*A-_*y+p*m)*C,t[11]=(d*y-c*A-f*m)*C,t[12]=(o*k-h*x-a*T)*C,t[13]=(e*x-s*k+n*T)*C,t[14]=(_*w-v*b-g*m)*C,t[15]=(c*b-d*w+l*m)*C,t}}),xd=E((t,i)=>{r(),i.exports=function(t,i,e){var s=i[0],n=i[1],r=i[2],h=i[3],o=i[4],a=i[5],u=i[6],c=i[7],d=i[8],l=i[9],f=i[10],v=i[11],_=i[12],g=i[13],p=i[14],m=i[15],w=e[0],y=e[1],b=e[2],A=e[3];return t[0]=w*s+y*o+b*d+A*_,t[1]=w*n+y*a+b*l+A*g,t[2]=w*r+y*u+b*f+A*p,t[3]=w*h+y*c+b*v+A*m,w=e[4],y=e[5],b=e[6],A=e[7],t[4]=w*s+y*o+b*d+A*_,t[5]=w*n+y*a+b*l+A*g,t[6]=w*r+y*u+b*f+A*p,t[7]=w*h+y*c+b*v+A*m,w=e[8],y=e[9],b=e[10],A=e[11],t[8]=w*s+y*o+b*d+A*_,t[9]=w*n+y*a+b*l+A*g,t[10]=w*r+y*u+b*f+A*p,t[11]=w*h+y*c+b*v+A*m,w=e[12],y=e[13],b=e[14],A=e[15],t[12]=w*s+y*o+b*d+A*_,t[13]=w*n+y*a+b*l+A*g,t[14]=w*r+y*u+b*f+A*p,t[15]=w*h+y*c+b*v+A*m,t}}),Pd=E((t,i)=>{r(),i.exports=function(t,i,e,s,n){var r=1/_.tan(i/2),h=1/(s-n);return t[0]=r/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(n+s)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*n*s*h,t[15]=0,t}}),Id=E((t,i)=>{r(),i.exports=function(t,i,e,s){var n,r,h,o,a,u,c,d,l,f,v,g,p,m,w,y,b,A,S,T,k,E,x,P,I=s[0],C=s[1],R=s[2],D=_.sqrt(I*I+C*C+R*R);if(_.abs(D)<1e-6)return null;I*=D=1/D,C*=D,R*=D,n=_.sin(e),r=_.cos(e),h=1-r,o=i[0],a=i[1],u=i[2],c=i[3],d=i[4],l=i[5],f=i[6],v=i[7],g=i[8],p=i[9],m=i[10],w=i[11],y=I*I*h+r,b=C*I*h+R*n,A=R*I*h-C*n,S=I*C*h-R*n,T=C*C*h+r,k=R*C*h+I*n,E=I*R*h+C*n,x=C*R*h-I*n,P=R*R*h+r,t[0]=o*y+d*b+g*A,t[1]=a*y+l*b+p*A,t[2]=u*y+f*b+m*A,t[3]=c*y+v*b+w*A,t[4]=o*S+d*T+g*k,t[5]=a*S+l*T+p*k,t[6]=u*S+f*T+m*k,t[7]=c*S+v*T+w*k,t[8]=o*E+d*x+g*P,t[9]=a*E+l*x+p*P,t[10]=u*E+f*x+m*P,t[11]=c*E+v*x+w*P,i!==t&&(t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15]);return t}}),Cd=E((t,i)=>{r(),i.exports=function(t,i,e){var s,n,r,h,o,a,u,c,d,l,f,v,_=e[0],g=e[1],p=e[2];i===t?(t[12]=i[0]*_+i[4]*g+i[8]*p+i[12],t[13]=i[1]*_+i[5]*g+i[9]*p+i[13],t[14]=i[2]*_+i[6]*g+i[10]*p+i[14],t[15]=i[3]*_+i[7]*g+i[11]*p+i[15]):(s=i[0],n=i[1],r=i[2],h=i[3],o=i[4],a=i[5],u=i[6],c=i[7],d=i[8],l=i[9],f=i[10],v=i[11],t[0]=s,t[1]=n,t[2]=r,t[3]=h,t[4]=o,t[5]=a,t[6]=u,t[7]=c,t[8]=d,t[9]=l,t[10]=f,t[11]=v,t[12]=s*_+o*g+d*p+i[12],t[13]=n*_+a*g+l*p+i[13],t[14]=r*_+u*g+f*p+i[14],t[15]=h*_+c*g+v*p+i[15]);return t}});r();var me=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.PICTURE_IN_PICTURE_ERROR=11001]="PICTURE_IN_PICTURE_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),L=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(i){const e=_.floor(i/1e3);if(e in t)return e;throw new g("Invalid error code: "+i)}}(L||(L={})),r(),r(),r(),r(),r(),r(),r(),r();var W=function(t){return t.Sv="web",t.Tv="android",t.Ev="android-tv",t.xv="ios",t.Pv="tvos",t.Iv="chromecast",t.Cv="theoliveweb",t}({});var F=od?od.userAgent:"",Rd=F.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Dd=F.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Nd=F.match(/Android ([0-9\.]+)/i),Bd=F.match(/Windows NT ([0-9\.]+)/i),Md=F.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Ld=F.match(/Firefox\/([0-9\.]+)/i),Od=F.match(/OPR\/(\d+\.\d+)/i),Fd=F.match(/Tizen ([0-9\.]+)/i),Ud=F.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Vd=F.match(/HbbTV\/([0-9.]+)/i),Hd=F.match(/(AFT.*) Build/i),Wd=class{get Ke(){return this.Rv}get Dv(){return this.Nv}get Bv(){return this.Mv}get Lv(){return this.Ov}get Fv(){return this.Uv}get Vv(){return this.Hv}get Wv(){return this.qv}get zv(){return this.Gv}get Xv(){return this.Qv}get Kv(){return this.Yv}get Jv(){return this.Zv}get ru(){return this.$v}get t_(){return this.i_}get e_(){return this.s_||this.n_}get vd(){return this.r_}get Ks(){return this.h_}get o_(){return this.a_}get u_(){return this.c_}get d_(){var t;return null!=(t=this.l_)?t:this.f_}get v_(){return this.__}get g_(){var t;return(null==(t=s.chrome)?void 0:t.webview)&&this.p_>0}get m_(){return this.p_}get w_(){return this.y_}get b_(){return this.A_}get S_(){return this.T_}get k_(){return this.E_}get x_(){return this.P_}get I_(){return this.C_}get IS_FIRETV_AFTMM(){return"AFTMM"===this.R_}get D_(){return this.N_}get B_(){return this.M_}get L_(){return this.O_}get F_(){return this.U_}get V_(){return this.H_}get W_(){return this.q_}get z_(){return this.G_}get X_(){return this.j_}get Q_(){return 0===this.K_&&zs.ru?this.i_:this.K_}get Y_(){return this.J_}get Z_(){return this.eg}get rg(){return this.hg}get og(){return this.ag}get cg(){return!(!this.S_&&!this.w_)&&this.d_<=56}get dg(){return this.fg}get vg(){return this._g}get gg(){return this.pg}get wg(){return this.yg}get Ag(){return this.Sg}get Tg(){return this.Eg}get xg(){return this.Pg}get Ig(){return this.Cg}get Rg(){return this.Dg}get IS_IOS_CHROME(){return this.Ng}constructor(){this.Rv=Boolean("ontouchstart"in self||self.DocumentTouch&&h instanceof self.DocumentTouch||od&&od.msMaxTouchPoints),this.Nv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(F)||/(macintosh|mac(?=_powerpc)\s)/i.test(F),this.Mv=/Windows NT/i.test(F),this.Ov=Bd?C(Bd[1]):0,this.Uv=/Android/i.test(F),this.Hv=Nd?C(Nd[1]):0,this.qv=/windows phone (8|8\.1)/i.test(F),this.Gv=/iPhone/i.test(F),this.Qv=/iPad/i.test(F),this.Yv=this.Nv&&this.Rv&&!this.Qv,this.Zv=/iPod/i.test(F),this.r_=/Mobile Safari/i.test(F),this.s_=/EOS\d*STB/i.test(F),this.n_=/APP\d*STB/i.test(F),this.$v=(this.Gv||this.Qv||this.Yv||this.Zv)&&!this.qv,this.i_=Ud?C(Ud[2]):0,this.h_=this.qv||this.$v||this.Uv||this.r_,this.a_=/CriOS/i.test(F),this.c_=Boolean(self.chrome&&/google/i.test(od.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(od.userAgent),this.p_=Dd?x(Dd[1],10):0,this.Ng=Boolean(/CriOS/i.test(F)),this.Dg=Boolean(self.chrome||/Chrome/i.test(F)||this.Ng),this.f_=Rd?x(Rd[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(F),this.A_=Fd?C(Fd[1]):0,this.l_=this.A_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.A_):void 0,this.T_=/webos|web0s/i.test(F),this.E_=/HbbTV/i.test(F),this.P_=!!Vd&&function(t){if(!t)return!1;const i=t.split(".").map(Number);return 3===i.length&&1===i[0]&&2===i[1]}(Vd[1]),this.C_=/AFT.* Build/i.test(F),this.R_=Hd?Hd[1]:void 0,this.N_=/VIZIO/i.test(F),this.M_=/Edge\/\d+/i.test(F),this.O_=/Trident/i.test(F),this.U_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.H_=/Vivaldi/i.test(F),this.q_=/Firefox/i.test(F)&&!/Seamonkey/i.test(F),this.G_=Ld?C(Ld[1]):0,this.j_=/Safari/i.test(F)&&!/Chrome/i.test(F)&&!this.qv&&!this.y_,this.K_=Md?C(Md[2]):0,this.J_=Boolean(Od),this.eg=Od?C(Od[1]):0,this.hg=/CrKey/.test(F),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(F),this.fg=/PlayStation 4/i.test(F),this._g=/PlayStation 5/i.test(F),this.pg="web"===W.Ev,this.yg="web"===W.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===W.xv,this.Pg="web"===W.Pv,this.Cg="web"===W.Iv}};Wd.Bg=new Wd;var zs=Wd.Bg;r();var _u={}.hasOwnProperty,qd={}.toString;function it(t){return null!=t}function vc(t){return void 0===t}var zd,hi=Array.isArray||function(t){return"[object Array]"===qd.call(t)};function ln(t){return Mc(t)&&_u.call(t,"length")&&lo(t.length)}function Mc(t){return"object"==typeof t&&null!==t}function Gd(t){return Mc(t)&&t.constructor&&t.constructor===w}function Q(t){return"string"==typeof t}function _r(t){return"boolean"==typeof t}function vo(t){return it(t)&&"function"==typeof t.then}function Xd(t){return"[object Date]"===qd.call(t)}function lo(t){return"number"==typeof t}function jd(t){return"function"==typeof t}function I(t){return jd(t)||Mc(t)}function Qd(t){return Mc(t)&&!hi(t)}function Ao(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function no(t){let i;for(;it(i=t.firstChild);)t.removeChild(i)}function Kd(t,i){let e;for(;it(e=t.firstChild);)i.appendChild(e)}function Yd(t,i){t.insertBefore(i,t.firstChild)}function Jd(t){return t&&t.nodeName&&t.nodeName.toLowerCase()||""}function Zd(t){const i=t.className;return"string"==typeof i?i:i&&"string"==typeof i.baseVal?i.baseVal:""}function $d(t,i){const e=t.className;"string"==typeof e?t.className=i:e&&"string"==typeof e.baseVal&&(e.baseVal=i)}function El(t,i){return void 0!==t.classList?t.classList.contains(i):void 0!==t.className&&-1!==(" "+Zd(t)+" ").indexOf(" "+i+" ")}function Pl(t,i){if(void 0!==t.classList)t.classList.add(i);else if(void 0!==t.className){const e=Zd(t);-1===(" "+e+" ").indexOf(" "+i+" ")&&$d(t,(e+" "+i).trim())}}function Il(t,i){if(void 0!==t.classList)t.classList.remove(i);else if(void 0!==t.className){let e=" "+Zd(t)+" ";const s=" "+i+" ";for(;-1!==e.indexOf(s);)e=e.replace(s," ");$d(t,e.trim())}}function Rl(t,i,e){void 0===e&&(e=!El(t,i)),e?Pl(t,i):Il(t,i)}function Dl(t){t.stopPropagation()}function Nl(t,i){zs.w_&&zs.b_<3?function(t,i){let e=i;switch(i){case"flex":e="-webkit-flex";break;case"inline-flex":e="-webkit-inline-flex"}t.display=e}(t,i):function(t,i){if(t.display=i,t.display!==i){let e=i;switch(i){case"flex":e="-ms-flexbox";break;case"inline-flex":e="-ms-inline-flexbox"}t.display=e}}(t,i)}function Bl(t,i){const e=i.style;if(e)for(const i of w.keys(t)){const s=t[i];void 0!==s&&(e[i]=s)}}function Go(t){const i=t.style;i.position="absolute",i.left="0",i.right="0",i.top="0",i.bottom="0",i.width="100%",i.height="100%"}function Ll(t){const i=t.style;i.position="",i.left="",i.right="",i.top="",i.bottom="",i.width="",i.height=""}function Ol(t){t.removeAttribute("title")}function Fl(t){t.addEventListener("mouseover",t=>{Ol(t.target)})}function Ul(t){try{return Boolean(t)&&t.parent!==t}catch(t){return!1}}r(),r();var gs=()=>{},pc=t=>t;function to(t,i){let e=-1/0;return function(){for(var s=arguments.length,n=new Array(s),r=0;r=i&&(t.apply(this,n),e=h)}}function Vl(t,i){let e=0;return function(){for(var s=arguments.length,n=new Array(s),r=0;r{e=0,t.apply(h,n)},i)}}function Oc(t){let i;return()=>(void 0!==t&&(i=t(),t=void 0),i)}function Es(t,i,e){if(null!=i){if("object"!=typeof i&&"function"!=typeof i)throw new g("Object expected.");var s,n;if(e){if(!id)throw new g("Symbol.asyncDispose is not defined.");s=i[id]}if(void 0===s){if(!Nt)throw new g("Symbol.dispose is not defined.");s=i[Nt],e&&(n=s)}if("function"!=typeof s)throw new g("Object not disposable.");n&&(s=function(){try{n.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:i,dispose:s,async:e})}else e&&t.stack.push({async:!0});return i}r(),r(),r();var Hl="function"==typeof SuppressedError?SuppressedError:function(t,i,e){var s=new m(e);return s.name="SuppressedError",s.error=t,s.suppressed=i,s};function Zs(t){function i(i){t.error=t.hasError?new Hl(i,t.error,"An error was suppressed during disposal."):i,t.hasError=!0}var e,s=0;return function n(){for(;e=t.stack.pop();)try{if(!e.async&&1===s)return s=0,t.stack.push(e),Promise.resolve().then(n);if(e.dispose){var r=e.dispose.call(e.value);if(e.async)return s|=2,Promise.resolve(r).then(n,function(t){return i(t),n()})}else s|=1}catch(t){i(t)}if(1===s)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}function Xn(t,i){return ql(t.slice(),i)}function Wl(t,i){const e=ql(t,i);return e!==t&&zl(e,void 0,t.length,t),t}function ql(t,i){let e=t;const s=e.length;if(s<=1)return e;let n=new Array(s);for(let t=1;tn&&(u=n),o>n&&(o=n),c=a,d=u;;)if(ct+i(e),0)}var hl=function(t){return t[t.rh=0]="rh",t[t.Fg=1]="Fg",t[t.Ug=-1]="Ug",t}({}),xc=(t,i)=>(0|t)-(0|i),Nu=(t,i)=>t===i?0:ti?1:S(t)?S(i)?0:1:-1;function tf(t,i,e){return rs(t,i,e)?0:Nu(t,i)}var ef=(t,i)=>Ql(t,i)?0:Nu(t,i);var sf="function"==typeof Array.prototype.find?(t,i)=>t.find(i):(t,i)=>{const e=tt(t,i);return-1===e?void 0:t[e]},hh=sf,nf="function"==typeof Array.prototype.findLast?(t,i)=>t.findLast(i):(t,i)=>{const e=rf(t,i);return-1===e?void 0:t[e]},dr=nf,tt="function"==typeof Array.prototype.findIndex?(t,i)=>t.findIndex(i):(t,i)=>{for(let e=0;et.findLastIndex(i):(t,i)=>{for(let e=t.length-1;e>=0;e-=1){if(i(t[e],e,t))return e}return-1},hf="function"==typeof Array.prototype.at?(t,i)=>t.at(i):(t,i)=>{const e=t.length,s=i>=0?i:e+i;return s<0||s>=e?void 0:t[s]};function _e(t,i){const e=t.indexOf(i);return-1!==e&&(Ra(t,e),!0)}function Ra(t,i){0===i?t.shift():t.splice(i,1)}function of(t,i){const e=new Array(t.length);let s=0,n=0;for(;nt.flatMap(i):(t,i)=>{const e=[];for(let s=0;sNu(i(t),i(e)))}function uf(t,i){return df(t,(t,e)=>Nu(i(t),i(e)))}function cf(t,i){if(0!==t.length)return t.reduce((t,e)=>i(t,e)<=0?t:e)}function df(t,i){return cf(t,(t,e)=>i(e,t))}function Cc(t){return t.filter((i,e)=>t.indexOf(i)===e)}function lf(t,i){return Promise.all(t.map(i)).then(i=>t.filter((t,e)=>i[e]))}function ff(t,i,e){if(t.length!==i.length)return!1;for(let s=0;s{s(),i.Vg()},s=()=>{t.jg(e),t.Kg(s),i.jg(e),i.Kg(s)};t.Xg(e),t.Qg(s),i.Xg(e),i.Qg(s)}tp(){const i=new t,e=new t,s=i.Yg,n=e.Yg,r=this.Jg,h=()=>{s.Hg&&n.Wg||n.Hg&&s.Wg?r.Vg():s.Wg&&n.Wg&&r.zg()};s.Xg(h),n.Xg(h),s.Qg(h),n.Qg(h),i.$g(r),e.$g(r);return r.Qg(()=>{s.jg(h),n.jg(h),s.Kg(h),n.Kg(h)}),[i,e]}static ep(i){const e=new t;for(const t of i)void 0!==t&&e.$g(t);return e}[Nt](){this.Zg()}constructor(){this.Jg=new _f}};r(),r();var gf=function(){for(var t=arguments.length,i=new Array(t),e=0;e{if(i.Hg)return t.catch(gs),s(new Qc);const n=()=>{i.jg(n),s(new Qc)};i.Xg(n),t.then(t=>{i.jg(n),e(t)},t=>{i.jg(n),s(t)})}):t}async function Cu(t,i){const e={stack:[],error:void 0,hasError:!1};try{Es(e,i,!1);return await t}catch(t){e.error=t,e.hasError=!0}finally{Zs(e)}}async function pf(t,i){const e={stack:[],error:void 0,hasError:!1};try{Es(e,i,!1);return await t(i.Yg)}catch(t){e.error=t,e.hasError=!0}finally{Zs(e)}}var mf=Promise.resolve(),Ht="function"==typeof queueMicrotask?queueMicrotask:t=>{mf.then(t)};function Wr(t){t.then(gs,gs)}async function pr(t){try{return await Promise.all(t)}catch(i){throw await Promise.all(t.map(t=>t.catch(gs))),i}}function Ze(t,i){return new Promise((e,s)=>{if(void 0!==i&&i.Hg)return void s(new Qc);const n=zd.Og(()=>{void 0!==i&&i.jg(r),e()},t),r=()=>{zd.Lg(n),s(new Qc)};void 0!==i&&i.Xg(r)})}async function wf(t,i){const e={stack:[],error:void 0,hasError:!1};try{const s=Es(e,new Zc,!1);return await Promise.race([t,Ze(i,s.Yg).then(()=>{throw new m("Timeout")})])}catch(t){e.error=t,e.hasError=!0}finally{Zs(e)}}function br(t){return"video"===Jd(t)}function yf(t){t.src&&(t.removeAttribute("src"),t.load()),t.srcObject&&(t.srcObject=null,t.load()),t.hasChildNodes()&&(!function(t,i){const e=t.childNodes;for(let s=e.length-1;s>=0;s--){const n=e.item(s);Jd(n)===i&&t.removeChild(n)}}(t,"source"),t.load())}function bf(){return void 0!==h?h.createElement("video"):void 0}var Af=Oc(bf),Sf=Oc(()=>"undefined"!=typeof HTMLVideoElement&&Af()instanceof HTMLVideoElement);function Tf(t){const i=h.createElement(t);return br(i)&&i.addEventListener("contextmenu",Pf),Ef(i),i}function kf(t){Ef(t),t.removeEventListener("contextmenu",Pf)}function Ef(t){t.removeAttribute("id"),t.removeAttribute("class"),t.removeAttribute("style"),no(t),yf(t),t.pause(),t.playbackRate=1,t.disableRemotePlayback=!1,t.preload="auto",t.controls=!1,t.style.display="none",br(t)&&(t.style.width="100%",t.style.height="100%",t.style.pointerEvents="none",t.playsInline=!0,t.setAttribute("webkit-playsinline",""))}function xf(t,i){if(i.sp){const i=t.muted;t.muted=!0,t.muted=!1,t.muted=i}else if(t.paused){const i=t.play();vo(i)&&Wr(i),t.pause()}}function Pf(t){t.preventDefault()}r(),r(),r();var If=null;try{If=new WebAssembly.Instance(new WebAssembly.Module(new j([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(y){}function ta(t,i,e){this.low=0|t,this.high=0|i,this.unsigned=!!e}function Ki(t){return!0===(t&&t.np)}function Cf(t){var i=_.clz32(t&-t);return t?31-i:i}ta.prototype.np,w.defineProperty(ta.prototype,"np",{value:!0}),ta.isLong=Ki;var Rf={},Df={};function Nf(t,i){var e,s,n;return i?(n=0<=(t>>>=0)&&t<256)&&(s=Df[t])?s:(e=At(t,0,!0),n&&(Df[t]=e),e):(n=-128<=(t|=0)&&t<128)&&(s=Rf[t])?s:(e=At(t,t<0?-1:0,!1),n&&(Rf[t]=e),e)}function Bf(t,i){if(S(t))return i?Cr:Vu;if(i){if(t<0)return Cr;if(t>=Uf)return Xf}else{if(t<=-Vf)return rt;if(t+1>=Vf)return Gf}return t<0?Bf(-t,i).neg():At(t%Ff|0,t/Ff|0,i)}function At(t,i,e){return new ta(t,i,e)}ta.fromInt=Nf,ta.fromNumber=Bf,ta.fromBits=At;var Mf=_.pow;function Lf(t,i,e){if(0===t.length)throw m("empty string");if("number"==typeof i?(e=i,i=!1):i=!!i,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return i?Cr:Vu;if((e=e||10)<2||360)throw m("interior hyphen");if(0===s)return Lf(t.substring(1),i,e).neg();for(var n=Bf(Mf(e,8)),r=Vu,h=0;h>>0:this.low},$s.toNumber=function(){return this.unsigned?(this.high>>>0)*Ff+(this.low>>>0):this.high*Ff+(this.low>>>0)},$s.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((r=o).isZero())return a+h;for(;a.length<6;)a="0"+a;h=""+a+h}},$s.getHighBits=function(){return this.high},$s.getHighBitsUnsigned=function(){return this.high>>>0},$s.getLowBits=function(){return this.low},$s.getLowBitsUnsigned=function(){return this.low>>>0},$s.getNumBitsAbs=function(){if(this.isNegative())return this.eq(rt)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,i=31;i>0&&!(t&1<>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},$s.isZero=function(){return 0===this.high&&0===this.low},$s.eqz=$s.isZero,$s.isNegative=function(){return!this.unsigned&&this.high<0},$s.isPositive=function(){return this.unsigned||this.high>=0},$s.isOdd=function(){return!(1&~this.low)},$s.isEven=function(){return!(1&this.low)},$s.equals=function(t){return Ki(t)||(t=Of(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},$s.eq=$s.equals,$s.notEquals=function(t){return!this.eq(t)},$s.neq=$s.notEquals,$s.ne=$s.notEquals,$s.lessThan=function(t){return this.comp(t)<0},$s.lt=$s.lessThan,$s.lessThanOrEqual=function(t){return this.comp(t)<=0},$s.lte=$s.lessThanOrEqual,$s.le=$s.lessThanOrEqual,$s.greaterThan=function(t){return this.comp(t)>0},$s.gt=$s.greaterThan,$s.greaterThanOrEqual=function(t){return this.comp(t)>=0},$s.gte=$s.greaterThanOrEqual,$s.ge=$s.greaterThanOrEqual,$s.compare=function(t){if(Ki(t)||(t=Of(t)),this.eq(t))return 0;var i=this.isNegative(),e=t.isNegative();return i&&!e?-1:!i&&e?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},$s.comp=$s.compare,$s.negate=function(){return!this.unsigned&&this.eq(rt)?rt:this.not().add(Wf)},$s.neg=$s.negate,$s.add=function(t){Ki(t)||(t=Of(t));var i=this.high>>>16,e=65535&this.high,s=this.low>>>16,n=65535&this.low,r=t.high>>>16,h=65535&t.high,o=t.low>>>16,a=0,u=0,c=0,d=0;return c+=(d+=n+(65535&t.low))>>>16,u+=(c+=s+o)>>>16,a+=(u+=e+h)>>>16,a+=i+r,At((c&=65535)<<16|(d&=65535),(a&=65535)<<16|(u&=65535),this.unsigned)},$s.subtract=function(t){return Ki(t)||(t=Of(t)),this.add(t.neg())},$s.sub=$s.subtract,$s.multiply=function(t){if(this.isZero())return this;if(Ki(t)||(t=Of(t)),If)return At(If.mul(this.low,this.high,t.low,t.high),If.get_high(),this.unsigned);if(t.isZero())return this.unsigned?Cr:Vu;if(this.eq(rt))return t.isOdd()?rt:Vu;if(t.eq(rt))return this.isOdd()?rt:Vu;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(Hf)&&t.lt(Hf))return Bf(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,e=65535&this.high,s=this.low>>>16,n=65535&this.low,r=t.high>>>16,h=65535&t.high,o=t.low>>>16,a=65535&t.low,u=0,c=0,d=0,l=0;return d+=(l+=n*a)>>>16,c+=(d+=s*a)>>>16,d&=65535,c+=(d+=n*o)>>>16,u+=(c+=e*a)>>>16,c&=65535,u+=(c+=s*o)>>>16,c&=65535,u+=(c+=n*h)>>>16,u+=i*a+e*o+s*h+n*r,At((d&=65535)<<16|(l&=65535),(u&=65535)<<16|(c&=65535),this.unsigned)},$s.mul=$s.multiply,$s.divide=function(t){if(Ki(t)||(t=Of(t)),t.isZero())throw m("division by zero");var i,e,s;if(If)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?At((this.unsigned?If.div_u:If.div_s)(this.low,this.high,t.low,t.high),If.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?Cr:Vu;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Cr;if(t.gt(this.shru(1)))return qf;s=Cr}else{if(this.eq(rt))return t.eq(Wf)||t.eq(zf)?rt:t.eq(rt)?Wf:(i=this.shr(1).div(t).shl(1)).eq(Vu)?t.isNegative()?Wf:zf:(e=this.sub(t.mul(i)),s=i.add(e.div(t)));if(t.eq(rt))return this.unsigned?Cr:Vu;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=Vu}for(e=this;e.gte(t);){i=_.max(1,_.floor(e.toNumber()/t.toNumber()));for(var n=_.ceil(_.log(i)/_.LN2),r=n<=48?1:Mf(2,n-48),h=Bf(i),o=h.mul(t);o.isNegative()||o.gt(e);)o=(h=Bf(i-=r,this.unsigned)).mul(t);h.isZero()&&(h=Wf),s=s.add(h),e=e.sub(o)}return s},$s.div=$s.divide,$s.modulo=function(t){return Ki(t)||(t=Of(t)),If?At((this.unsigned?If.rem_u:If.rem_s)(this.low,this.high,t.low,t.high),If.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},$s.mod=$s.modulo,$s.rem=$s.modulo,$s.not=function(){return At(~this.low,~this.high,this.unsigned)},$s.countLeadingZeros=function(){return this.high?_.clz32(this.high):_.clz32(this.low)+32},$s.clz=$s.countLeadingZeros,$s.countTrailingZeros=function(){return this.low?Cf(this.low):Cf(this.high)+32},$s.ctz=$s.countTrailingZeros,$s.and=function(t){return Ki(t)||(t=Of(t)),At(this.low&t.low,this.high&t.high,this.unsigned)},$s.or=function(t){return Ki(t)||(t=Of(t)),At(this.low|t.low,this.high|t.high,this.unsigned)},$s.xor=function(t){return Ki(t)||(t=Of(t)),At(this.low^t.low,this.high^t.high,this.unsigned)},$s.shiftLeft=function(t){return Ki(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?At(this.low<>>32-t,this.unsigned):At(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):At(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},$s.shr=$s.shiftRight,$s.shiftRightUnsigned=function(t){return Ki(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?At(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):At(32===t?this.high:this.high>>>t-32,0,this.unsigned)},$s.shru=$s.shiftRightUnsigned,$s.shr_u=$s.shiftRightUnsigned,$s.rotateLeft=function(t){var i;return Ki(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?At(this.high,this.low,this.unsigned):t<32?(i=32-t,At(this.low<>>i,this.high<>>i,this.unsigned)):(i=32-(t-=32),At(this.high<>>i,this.low<>>i,this.unsigned))},$s.rotl=$s.rotateLeft,$s.rotateRight=function(t){var i;return Ki(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?At(this.high,this.low,this.unsigned):t<32?(i=32-t,At(this.high<>>t,this.low<>>t,this.unsigned)):(i=32-(t-=32),At(this.low<>>t,this.high<>>t,this.unsigned))},$s.rotr=$s.rotateRight,$s.toSigned=function(){return this.unsigned?At(this.low,this.high,!1):this},$s.toUnsigned=function(){return this.unsigned?this:At(this.low,this.high,!0)},$s.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},$s.toBytesLE=function(){var t=this.high,i=this.low;return[255&i,i>>>8&255,i>>>16&255,i>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},$s.toBytesBE=function(){var t=this.high,i=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,i>>>24,i>>>16&255,i>>>8&255,255&i]},ta.fromBytes=function(t,i,e){return e?ta.fromBytesLE(t,i):ta.fromBytesBE(t,i)},ta.fromBytesLE=function(t,i){return new ta(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,i)},ta.fromBytesBE=function(t,i){return new ta(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],i)},"function"==typeof BigInt&&(ta.fromBigInt=function(t,i){return At(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),i)},ta.fromValue=function(t,i){return"bigint"==typeof t?ta.fromBigInt(t,i):Of(t,i)},$s.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<=2*Zt}get Cp(){return!1}get Rp(){return!1}get Dp(){return!0}constructor(){this.hp=void 0,this.Np=!1,this.Ke=Jf,this.Ks=!1,this.sp=!0}},ev=class extends iv{constructor(){super()}};r();var sv=class extends ev{get Sp(){if(zs.Dv)return 4096}Pp(t,i){if(t&&t.Bp&&i&&i.Bp){const e=nv(t.Bp,"mp4a.40.2")&&nv(i.Bp,"mp4a.40.5"),s=nv(t.Bp,"mp4a.40.5")&&nv(i.Bp,"mp4a.40.2"),n=nv(t.Bp,"mp4a.40.2")&&nv(i.Bp,"mp4a.40.34"),r=nv(t.Bp,"mp4a.40.34")&&nv(i.Bp,"mp4a.40.2"),h=nv(t.Bp,"mp4a.40.5")&&nv(i.Bp,"mp4a.40.34"),o=nv(t.Bp,"mp4a.40.34")&&nv(i.Bp,"mp4a.40.5");return!(e||s||n||r||h||o)}return!0}};function nv(t,i){return t.indexOf(i)>-1}r();var rv=class extends ev{Ip(t){return t>=2}};r();var hv=class extends ev{get xp(){return zs.Q_<17}get Cp(){return!0}constructor(){super(),this.Np=zs.Q_>=11,this.sp=zs.X_&&!(zs.ru&&zs.Q_<10)}};r();var ov,av=class extends ev{get Tp(){return!(zs.d_>=133)}};r(),r(),r(),r(),r();var uv=function(){const t=bf();if(!t)return!1;const i=t.muted;return t.muted=!i,t.muted!==i}(),cv=function(){if(zs.Kv)return!1;const t=bf();if(!t)return!1;const i=t.volume;return t.volume=i/2+.1,i!==t.volume}();var K=class extends iv{op(){return this.Mp.rp}get Sp(){return this.Mp.Sp}get Tp(){return this.Mp.Tp}Pp(t,i){return this.Mp.Pp(t,i)}Ip(t){return this.Mp.Ip(t)}get xp(){return this.Mp.xp}constructor(t){super(),this.Mp=void 0,this.Mp=t,this.Np=this.Mp.Np,this.Ke=this.Mp.Ke,this.sp=uv&&this.Mp.sp}},dv=class extends K{get Ap(){return zs.ru}constructor(t){super(t),this.Np=!0,this.Ks=!0}};r();var lv=class{Lp(){return new this.Op}Fp(t){return this.Op.isTypeSupported(t)}constructor(t){this.Op=void 0,this.Op=fv(t)}};function fv(t){return t&&I(s.ManagedMediaSource)?s.ManagedMediaSource:I(s.MediaSource)?s.MediaSource:void 0}var vv=class extends dv{get Ap(){return!0}op(){return fv(!0)?super.op():1}};r();var _v=class extends K{get _p(){return zs.b_<3}get gp(){return zs.b_>=3}get lp(){return s.tizen&&!this.Up&&s.tizen.systeminfo.getPropertyValue("DISPLAY",t=>{const i=t.resolutionWidth,e=t.resolutionHeight;1===i&&1===e||(this.Up={width:i,height:e})}),this.Up}get kp(){return zs.b_<3}Pp(t,i){return super.Pp(t,i)}constructor(...t){super(...t),this.Up=void 0}};r();var gv=class extends K{get lp(){return s.webOS&&!this.Up&&s.webOS.deviceInfo(t=>{this.Up={width:t.screenWidth,height:t.screenHeight}}),this.Up}get yp(){return!1}constructor(...t){super(...t),this.Up=void 0}};r();var pv=class extends K{get Ap(){return!0}get Cp(){return this.Mp.Cp}};r();var mv=class extends K{get Rp(){return zs.IS_FIRETV_AFTMM}};!function(t){ov=t}(function(){const t=function(){if(zs.W_)return new sv;if(zs.B_||zs.L_)return new rv;if(zs.X_)return new hv;if(zs.Rg)return new av;return new ev}();return zs.ru?new vv(t):zs.I_?new mv(t):zs.Ks?new dv(t):zs.w_?new _v(t):zs.S_?new gv(t):zs.Dv?new pv(t):new K(t)}()),r(),r(),r();var wv=!(zs.L_&&!zs.F_),Dc=self.console;function yv(t){if(Mc(t))try{return JSON.stringify(t)}catch(t){}return t}function bv(t){return t.map(yv).join(" ")}function Av(t){const i=Dc&&Dc[t];return i?i.bind&&wv?i.bind(Dc):function(){for(var i=arguments.length,e=new Array(i),s=0;s{const t=Dc&&Dc.assert;return t?t.bind&&wv?t.bind(Dc):function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s1?i-1:0),s=1;su&&(r=u),h>u&&(h=u),o=n,a=r;;)if(o=65&&t<=90}function Wv(t){return Hv(t)||function(t){return t>=97&&t<=122}(t)}function qv(t){return t>=48&&t<=57}function zv(t){return qv(t)||Wv(t)}function Gv(t){return qv(t)||t>=65&&t<=70||t>=97&&t<=102}function Xv(t){return Hv(t)?t+32:t}function jv(t){return qv(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Qv(t,i){return void 0===i&&(i=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(i?87:55):-1}var Kv=_.min,Yv=String.fromCharCode;function Jv(t){for(var i=t.length,e=[],s=0;s= 0x80 (not a basic code point)","invalid-input":"Invalid input"},e_=_.floor,s_=String.fromCharCode;function n_(t){throw new RangeError(i_[t])}function r_(t){for(var i=[],e=0,s=t.length;e=55296&&n<=56319&&e>1,t+=e_(t/i);t>455;s+=36)t=e_(t/35);return e_(s+36*t/(t+38))},c_=function(t){return function(t,i){var e=t.split("@"),s="";e.length>1&&(s=e[0]+"@",t=e[1]);var n=function(t,i){for(var e=[],s=t.length;s--;)e[s]=i(t[s]);return e}((t=t.replace(t_,".")).split("."),i).join(".");return s+n}(t,function(t){return $v.test(t)?"xn--"+function(t){for(var i=[],e=(t=r_(t)).length,s=128,n=0,r=72,h=0,o=t;h=s&&ve_((Zv-n)/_)&&n_("overflow"),n+=(d-s)*_,s=d;for(var g=0,p=t;gZv&&n_("overflow"),m==s){for(var w=n,y=36;;y+=36){var b=y<=r?1:y>=r+26?26:y-r;if(w65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|1023&s),i.push(s)}return Jv(i)}function l_(t){if(t>=55296&&t<=57343)throw new m("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function f_(t,i){return t>>i&63|128}function v_(t,i){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(i.push(t>>18&7|240),i.push(f_(t,12)),i.push(f_(t,6))):(l_(t),i.push(t>>12&15|224),i.push(f_(t,6))):i.push(t>>6&31|192),i.push(63&t|128)):i.push(t)}function __(t){for(var i=[],e=0;e=o_)throw new m("Invalid byte index");var t=255&h_[al];if(al++,128==(192&t))return 63&t;throw new m("Invalid continuation byte")}function p_(){var t,i;if(al>o_)throw new m("Invalid byte index");if(al===o_)return!1;if(t=255&h_[al],al++,!(128&t))return t;if(192==(224&t)){if((i=(31&t)<<6|g_())>=128)return i;throw new m("Invalid continuation byte")}if(224==(240&t)){if((i=(15&t)<<12|g_()<<6|g_())>=2048)return l_(i),i;throw new m("Invalid continuation byte")}if(240==(248&t)&&(i=(7&t)<<18|g_()<<12|g_()<<6|g_())>=65536&&i<=1114111)return i;throw new m("Invalid UTF-8 detected")}function m_(t){return[37,Qv(t>>4),Qv(15&t)]}function w_(t){return function(t){return t>=0&&t<=31}(t)||t>126}function y_(t){return w_(t)||32===t||34===t||60===t||62===t||96===t}function b_(t){return y_(t)||35===t||63===t||123===t||125===t}function A_(t){return b_(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function S_(t){return t<33||t>126||34===t||35===t||60===t||62===t}function T_(t){return S_(t)||39===t}function k_(t,i){if(!i(t))return[t];for(var e=__([t]),s=[],n=0;n6)throw new g;for(var a=0;r0){if(!("."===t[r]&&a<4))throw new g;r+=1}if(!Cv.test(t[r]))throw new g;for(;r255)throw new g}r+=1}e[s]=e[s]<<8|u,2!==(a+=1)&&4!==a||(s+=1)}if(4!==a)throw new g;break}if(":"===t[r]){if((r+=1)===i)throw new g}else if(r0;)Vv(e,s,n+d-1),s-=1,d-=1}else if(8!==s)throw new g;return e}function C_(t){var i=10,e=Nv;return Dv.test(t)?(t=t.slice(2),i=16,e=Bv):t.length>=2&&"0"===t[0]&&(t=t.slice(1),i=8,e=Mv),""===t?0:e.test(t)?x(t,i):void 0}var Fc={Vp:4},R_=/[\0\t\n\r #%/:?@\[\\\]]/,D_=/[\0\t\n\r #/:?@\[\\\]]/;function N_(t,i){if("["===t[0]){if("]"!==t[t.length-1])throw new g("Invalid IPv6 address");return{Vp:2,Hp:I_(t.slice(1,-1))}}if(!i)return function(t){if(D_.test(t))throw new g("Invalid code point in opaque host");var i=E_(t,w_);return""===i?Fc:{Vp:3,Wp:i}}(t);var e=function(t){var i=function(t){return c_(t.toLowerCase())}(t);return i}(P_(t));if(R_.test(e))throw new g("Invalid code point in host");var s=function(t){var i=t.split(".");if(""===i[i.length-1]&&i.pop(),!(i.length>4)){for(var e=[],s=0;s255)throw new g;if(e[e.length-1]>=_.pow(256,5-e.length))throw new g;for(var o=e.pop(),a=0;a>>=8;return i.reverse().join("")}(t.Hp);case 2:return"["+function(t){for(var i="",e=function(t){for(var i=0,e=0,s=0,n=0,r=0;r<8;r++)0===t[r]?(0===n&&(s=r),n++):(n>e&&(i=s,e=n),n=0);return n>e&&(i=s,e=n),e>1?i:null}(t),s=!1,n=0;n<8;n++){if(s){if(0===t[n])continue;s=!1}e!==n?(i+=t[n].toString(16),7!==n&&(i+=":")):(i+=0===n?"::":":",s=!0)}return i}(t.Hp)+"]";case 3:return t.Wp;case 4:return""}}var M_=/\+/g;function L_(t){return 42===t||45===t||46===t||95===t||zv(t)}function O_(t){for(var i=t.split("&"),e=[],s=0;s0&&(i+="&"),i+=U_(__(r_(s[0])))+"="+U_(__(r_(s[1])))}return i}function U_(t){for(var i=[],e=0;e0&&"?"===t[0]&&(t=t.slice(1)),this.zp=O_(t)}var i=t.prototype;return i.append=function(t,i){t=ut(t),i=ut(i),this.zp.push([t,i]),j_(this)},i.delete=function(t){t=ut(t);for(var i=this.zp,e=0;e=2))return!1;if(!ag(t.slice(0,2)))return!1;if(2!==i){var e=t[2];if(47!==e&&92!==e&&63!==e&&35!==e)return!1}return!0}function og(t){return 2===t.length&&Iv.test(t[0])&&(":"===t[1]||"|"===t[1])}function ag(t){return 2===t.length&&og(Jv(t))}function ug(t){return og(t)&&":"===t[1]}function cg(t){var i=t.Jp;0!==i.length&&("file"===t.Qp&&1===i.length&&ug(i[0])||i.pop())}function dg(t){return null===t.Zp||Fc===t.Zp||t.$p||"file"===t.Qp}var lg=-1,fg=/\t|\n|\r/g,vg=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function _g(t,i,e,s){void 0===e&&(e=null),void 0===s&&(s=null),e||(e=new pg,t=t.replace(vg,""));var n=null!==s?s:0;i=i||null;for(var r=[],h=!1,o=!1,a=!1,u=r_(t=t.replace(fg,"")),c=u.length,d=0;d<=c;){var l=d65535)throw new g("Invalid port");e.im=y===eo[e.Qp]?null:y,r.length=0}if(null!==s)return;n=16,d-=1}break;case 13:e.Qp="file",47===l||92===l?n=14:i&&"file"===i.Qp?lg===l?(e.Zp=i.Zp,e.Jp=i.Jp.slice(),e.Gp=i.Gp):63===l?(e.Zp=i.Zp,e.Jp=i.Jp.slice(),e.Gp="",n=19):35===l?(e.Zp=i.Zp,e.Jp=i.Jp.slice(),e.Gp=i.Gp,e.nm="",n=20):(hg(u.slice(d))||(e.Zp=i.Zp,e.Jp=i.Jp.slice(),cg(e)),n=17,d-=1):(n=17,d-=1);break;case 14:47===l||92===l?n=15:(i&&"file"===i.Qp&&!hg(u.slice(d))&&(ug(i.Jp[0])?e.Jp.push(i.Jp[0]):e.Zp=i.Zp),n=17,d-=1);break;case 15:if(lg===l||47===l||92===l||63===l||35===l)if(d-=1,null===s&&ag(r))n=17;else if(0===r.length){if(e.Zp=Fc,null!==s)return;n=16}else{var b=N_(d_(r),Yt(e));if(0===b.Vp&&"localhost"===b.qp&&(b=Fc),e.Zp=b,null!==s)return;r.length=0,n=16}else r.push(l);break;case 16:Yt(e)?(n=17,47!==l&&92!==l&&(d-=1)):null===s&&63===l?(e.Gp="",n=19):null===s&&35===l?(e.nm="",n=20):lg!==l&&(n=17,47!==l&&(d-=1));break;case 17:if(lg===l||47===l||Yt(e)&&92===l||null===s&&(63===l||35===l)){var A=d_(r);if(sg(A)?(cg(e),47===l||Yt(e)&&92===l||e.Jp.push("")):!eg(A)||47===l||Yt(e)&&92===l?eg(A)||("file"===e.Qp&&0===e.Jp.length&&ag(r)&&(Fc!==e.Zp&&null!==e.Zp&&(e.Zp=Fc),r[1]=58,A=d_(r)),e.Jp.push(A)):e.Jp.push(""),r.length=0,"file"===e.Qp&&(lg===l||63===l||35===l))for(;e.Jp.length>1&&""===e.Jp[0];)e.Jp.shift();63===l?(e.Gp="",n=19):35===l&&(e.nm="",n=20)}else r.push.apply(r,k_(l,b_));break;case 18:63===l?(e.Gp="",n=19):35===l?(e.nm="",n=20):lg!==l&&(e.Jp[0]+=d_(k_(l,w_)));break;case 19:null===s&&35===l?(e.nm="",n=20):lg!==l&&(e.Gp+=d_(k_(l,Yt(e)?T_:S_)));break;case 20:lg===l||0===l||(e.nm+=d_(k_(l,y_)))}d++}return e}function gg(t,i,e,s){try{_g(t,i,e,s)}catch(t){}}var pg=function(){this.Qp="",this.Kp="",this.Yp="",this.Zp=null,this.im=null,this.Jp=[],this.Gp=null,this.nm=null,this.$p=!1};function mg(t){switch(t.Qp){case"blob":var i;try{i=_g(t.Jp[0],null)}catch(t){return $_}return mg(i);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,i,e){return t+"://"+B_(i)+(null===e?"":":"+e)}(t.Qp,t.Zp,t.im);default:return $_}}var wg=function(){function t(t,i){var e,s=null;if(null!=i)if(function(t){return null!=t&&t instanceof wg&&"object"==typeof t.rc}(i))s=i.rc;else try{s=_g(String(i),null)}catch(t){throw new g("Invalid base URL: "+t.message)}try{e=_g(String(t),s)}catch(t){throw new g("Invalid URL: "+t.message)}var n=e.Gp;this.rc=e,this.Gp=function(t){var i=new xr;return null!==t&&X_(i,t),i}(n),this.Gp.rc=this}var i=t.prototype;return i.toString=function(){return this.href},i.toJSON=function(){return this.href},function(t,i,e){i&&Ev(t.prototype,i),e&&Ev(t,e)}(t,[{key:"href",get:function(){return function(t,i){void 0===i&&(i=!1);var e=t.Qp+":";if(null!==t.Zp?(e+="//",rg(t)&&(e+=t.Kp,""!==t.Yp&&(e+=":"+t.Yp),e+="@"),e+=B_(t.Zp),null!==t.im&&(e+=":"+t.im)):null===t.Zp&&"file"===t.Qp&&(e+="//"),t.$p)e+=t.Jp[0];else for(var s=0,n=t.Jp;s1?i-1:0),s=1;sself.performance.now():this.Mg=zo}},Sg=class{get Lm(){return od.oscpu}get Zs(){return od.platform}get Om(){return od.vendor}get Fm(){return od.vendorSub}};function Tg(){if(self.URL)try{const t=new self.URL("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href}catch(t){}return!1}function Y(){return Y=w.assign||function(t){for(var i=1;ii.push(t)),i}r(),r(),r();var Pg="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,Ig=Pg||function(){class t{next(){const t=this.index;return ti)}values(){return new t(this.data,(t,i)=>t[i])}entries(){return new t(this.data,(t,i)=>[i,t[i]])}forEach(t){for(const i in this.data)t(this.data[i],i)}constructor(){this.data=kg(),this.size=0}}}();var Cg=Pg||function(){class t{next(){const t=this.Vm.next();return t.done?t:{value:this.Hm(t.value),done:!1}}constructor(t,i){this.Vm=void 0,this.Hm=void 0,this.Vm=t,this.Hm=i}}return class{get size(){return this.Wm.size}get(t){return this.Wm.get(""+t)}set(t,i){return this.Wm.set(""+t,i),this}has(t){return this.Wm.has(""+t)}delete(t){return this.Wm.delete(""+t)}clear(){this.Wm.clear()}keys(){return new t(this.Wm.keys(),t=>Number(t))}values(){return this.Wm.values()}entries(){return new t(this.Wm.entries(),t=>{let[i,e]=t;return[Number(i),e]})}forEach(t){this.Wm.forEach((i,e)=>{t(i,Number(e))})}constructor(){this.Wm=Ba()}}}();r(),r();var Rg=function(t){return t.qm="9a04f079-9840-4286-ab92-e65be0885f95",t.zm="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",t.Gm="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",t.Xm="e2719d58-a985-b3c9-781a-b030af78d30e",t.jm="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",t}({}),Dg="urn:mpeg:dash:mp4protection:2011",Ng="cenc",Bg="sinf",Mg="skd",Lg="keyids",Og="9a04f079-9840-4286-ab92-e65be0885f95",Fg="urn:uuid:"+Og,Ug="com.microsoft.playready",Vg="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",Hg="urn:uuid:"+Vg,Wg="com.widevine.alpha",qg="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",zg="urn:uuid:"+qg,Gg="org.w3.clearkey",Xg="e2719d58-a985-b3c9-781a-b030af78d30e",jg="urn:uuid:"+Xg,Qg="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",de="urn:uuid:"+Qg,Kg="com.apple.fps.1_0",Yg="identity";r();var po=function(t){return t.qm="playready",t.zm="widevine",t.jm="fairplay",t.Gm="clearkey",t.Xm="clearkey_dash_if",t.Qm="aes128",t}({}),Jg={Km:po.qm,Ym:Ug,Jm:"cenc",Zm:Og,$m:Fg,iw:"PlayReady"},ot={Km:po.zm,Ym:Wg,Jm:"cenc",Zm:Vg,$m:Hg,iw:"Widevine"},Zg={Km:po.jm,Ym:Kg,Jm:"skd",Zm:Qg,$m:de,iw:"FairPlay"},$g={Km:po.jm,Ym:"com.apple.fps",Jm:"sinf",Zm:Qg,$m:de,iw:"FairPlay"},Xc={Km:po.Gm,Ym:Gg,Jm:"cenc",Zm:qg,$m:zg,iw:"ClearKey"},tp={Km:po.Xm,Ym:Gg,Jm:"keyids",Zm:Xg,$m:jg,iw:"ClearKey DASH-IF"},ip=[Jg,ot,Zg,Xc,tp],ep=[Jg,ot,$g,Xc,tp];function sp(t){return ip.filter(i=>i.$m===t.toLowerCase())}r();var zh="function"==typeof String.prototype.replaceAll?(t,i,e)=>t.replaceAll(i,e):(t,i,e)=>t.split(i).join(e);function nl(t,i){return it(t)&&-1!==t.indexOf(i)}var Xt="function"==typeof String.prototype.startsWith?(t,i)=>it(t)&&t.startsWith(i):(t,i)=>it(t)&&t.substr(0,i.length)===i,Rc="function"==typeof String.prototype.endsWith?(t,i)=>it(t)&&t.endsWith(i):(t,i)=>it(t)&&t.substr(t.length-i.length,i.length)===i;function Jh(t,i){return t.length===i.length&&t.toUpperCase()===i.toUpperCase()}var np="function"==typeof String.prototype.repeat?(t,i)=>t.repeat(i):(t,i)=>{let e=0|i;if(0===t.length||0===e)return"";let s=t,n="";for(;1&~e||(n+=s),e>>>=1,0!==e;)s+=s;return n},Wa="function"==typeof String.prototype.padStart?(t,i,e)=>(void 0===e&&(e=" "),t.padStart(i,e)):(t,i,e)=>{void 0===e&&(e=" ");let s=e;const n=(0|i)-t.length;return n<=0?t:(n>s.length&&(s+=np(s,n/s.length)),s.slice(0,n)+t)},rp=(String.prototype.padEnd,16384),hp="function"==typeof String.fromCodePoint?t=>t.length<=rp?String.fromCodePoint(...t):ap(t,String.fromCodePoint):t=>{const i=[];for(let e of t)e>65535&&(e-=65536,i.push(e>>>10&1023|55296),e=56320|1023&e),i.push(e);return op(i)};function op(t){return t.length<=rp?String.fromCharCode(...t):ap(t,String.fromCharCode)}function ap(t,i){const e=[];for(let s=0;s"\\"+t)}var cp=zs.u_&&zs.d_>=42||zs.W_&&zs.z_>=38||zs.B_||zs.F_||zs.Y_&&zs.Z_>=29;function dp(t,i){return nl(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[Y({contentType:t},i?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Y({contentType:t},i?{robustness:"SW_SECURE_CRYPTO"}:{})]}}function Vc(){return void 0!==od&&"function"==typeof od.requestMediaKeySystemAccess}function lp(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest}var fp=class{Am(){return this.Tm(ot)}pm(){return this.Tm(Xc)}ym(){return this.Tm(Jg)}wm(){return this.Tm(Zg)}Tm(t){const i=t.$m,e=this.ew.get(i);if(e)return e;const s=this.Sm(t,'video/mp4; codecs="avc1.42000a"');return this.ew.set(i,s),s}async Sm(t,i){try{return await this.hw.nw(t.Ym,[dp(i,!0)]),!0}catch(e){try{return await this.hw.nw(t.Ym,[dp(i,!1)]),!0}catch(t){return!1}}}_m(){return this.ow||(this.ow=this.aw()),this.ow}async aw(){return"https:"!==s.location.protocol&&(!!cp&&!await this.pm())}constructor(t){this.hw=void 0,this.ew=Ba(),this.ow=void 0,this.hw=t}};function vp(t,i,e){if("function"==typeof e)e.call(t,i);else for(const s of e)s.call(t,i)}r(),r(),r(),r(),r(),r();var Ne=class{wn(t,i){if("function"==typeof i)if("string"==typeof t)this.uw(t,i);else for(const e of t)this.uw(e,i)}uw(t,i){const e=this.cw[t];void 0===e?this.cw[t]=i:"function"==typeof e?this.cw[t]=[e,i]:0===this.dw?e.push(i):this.cw[t]=e.concat(i)}lw(t){if("function"!=typeof t)return;const i=this.fw;void 0===i?this.fw=t:"function"==typeof i?this.fw=[i,t]:0===this.dw?i.push(t):this.fw=i.concat(t)}Vo(){this.cw=kg(),this.fw=void 0}So(t){this.dw++;const i=this.cw[t.type],e=this.fw;void 0!==i&&vp(this._w,t,i),void 0!==e&&vp(this._w,t,e),this.dw--}mn(t,i){if("function"==typeof i)if("string"==typeof t)this.gw(t,i);else for(const e of t)this.gw(e,i)}gw(t,i){const e=this.cw[t];void 0!==e&&("function"==typeof e?e===i&&(this.cw[t]=void 0):0===this.dw?_e(e,i):this.cw[t]=of(e,i))}pw(t){if("string"==typeof t)this.cw[t]=void 0;else for(const i of t)this.cw[i]=void 0}mw(t){const i=this.fw;void 0!==i&&("function"==typeof i?i===t&&(this.fw=void 0):0===this.dw?_e(i,t):this.fw=of(i,t))}ww(t,i){return new Promise((e,s)=>{if(i&&i.Hg)return s(new Qc);const n=t=>{h(),e(t)},r=()=>{h(),s(new Qc)},h=()=>{this.mn(t,n),i&&i.jg(r)};this.wn(t,n),i&&i.Xg(r)})}constructor(t){this.cw=kg(),this.fw=void 0,this.dw=0,this._w=void 0,this.Rs=t=>{this.So(t)},this._w=null!=t?t:this}},_p=class extends Ne{So(t){Ht(()=>{super.So(t)})}},je=class extends Ne{lw(t){super.lw(t)}mw(t){super.mw(t)}};r(),r();var gp=class{constructor(t,i=new Date){this.type=void 0,this.date=void 0,this.type=t,this.date=i}};r();var d=function(t){return t.yw="Aw",t.Sw="Tw",t.Ew="contentprotectionerror",t.xw="contentprotectionsuccess",t.Pw="currentsourcechange",t.Iw="destroy",t.Cw="durationchange",t.Rw="emptied",t.Dw="encrypted",t.Nw="ended",t.Bw="Mw",t.Lw="Ow",t.Fw="Uw",t.Vw="Hw",t.Ww="loadstart",t.qw="manifestupdate",t.zw="nosupportedrepresentationfound",t.Gw="offline",t.Xw="online",t.jw="pause",t.uo="play",t.Qw="progress",t.Kw="ratechange",t.Yw="representationchange",t.Jw="resize",t.Zw="seeked",t.$w="seeking",t.iy="segmenterror",t.ey="segmentnotfound",t.sy="manifesterror",t.oy="uy",t.ly="vy",t._y="gy",t.do="sourcechange",t.py="timeupdate",t.wy="volumechange",t.yy="by",t.Ay="Sy",t.LICENSE_REQUEST_GENERATED="Ty",t.Ey="metricschange",t}({}),pp=["cenc"],mp=["cbcs","cbcs-1-9"],wp=class extends gp{constructor(t){super(d.Ay),this.xy=void 0,this.xy=t}},yp=class extends gp{constructor(t){super(d.LICENSE_REQUEST_GENERATED),this.Py=void 0,this.Py=t}},bp=class extends gp{constructor(t,i,e,s){super("Iy"),this.Cy=void 0,this.Ry=void 0,this.Iy=void 0,this.Dy=void 0,this.Cy=t,this.Ry=i,this.Iy=e,this.Dy=s}},Ap=class extends gp{constructor(){super("lt")}},jr=function(t){return t.Dw="Ny",t.By="My",t}({}),Sp=class extends gp{constructor(t,i){super("Ny"),this.Jm=void 0,this.Py=void 0,this.Jm=t,this.Py=i}},Tp=class extends gp{constructor(){super("My")}};r(),r(),r();var Pr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),kp=/[\t\n\f\r ]/g;function Mr(t){return 43===t?62:47===t?63:t>=48&&t<=57?t-48+52:t>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:Ep()}function Ep(){throw new m("Invalid base64 input")}function Cn(t){let i=t;kp.test(i)&&(i=i.replace(kp,""));let e=i.length;e%4==0&&e>=1&&"="===i[e-1]&&(e>=2&&"="===i[e-2]?e-=2:e-=1,i=i.substr(0,e));const s=e%4;if(1===s)return Ep();const n=0===s?0:4-s,r=new j(function(t,i){return 3*(t+i)/4-i}(e,n)),h=n>0?e-4:e;let o,a=0,u=0;for(;a>16&255,r[u++]=o>>8&255,r[u++]=255&o;return 2===n?(o=Mr(i.charCodeAt(a))<<2|Mr(i.charCodeAt(a+1))>>4,r[u++]=255&o):1===n&&(o=Mr(i.charCodeAt(a))<<10|Mr(i.charCodeAt(a+1))<<4|Mr(i.charCodeAt(a+2))>>2,r[u++]=o>>8&255,r[u++]=255&o),r}function xp(t,i,e){return Pr[t>>2]+Pr[(3&t)<<4|i>>4]+Pr[(15&i)<<2|e>>6]+Pr[63&e]}function Pp(t,i,e){const s=[];for(let n=i;n>2]+Pr[(3&e)<<4]+"==")}else if(2===e){const e=t[i-2],n=t[i-1];s.push(Pr[e>>2]+Pr[(3&e)<<4|n>>4]+Pr[(15&n)<<2]+"=")}return s.join("")}function Ip(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/[=]/g,"")}function Ru(t,i){const e=i.ac,s=t.getUint8(e>>3),n=1<<7-(7&e);return i.Ly(1),(s&n)===n?1:0}function vs(t,i,e){let s=0;for(let n=0;n>16;return e&&(i-=16,t=e),e=t>>8,e&&(i-=8,t=e),e=t>>4,e&&(i-=4,t=e),e=t>>2,e&&(i-=2,t=e),e=t>>1,e?i-2:i-t};function Dp(t){if(t>=55296&&t<=57343)throw new m("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Np(t,i){return t>>i&63|128}function Bp(t,i){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(i.push(t>>18&7|240),i.push(Np(t,12)),i.push(Np(t,6))):(Dp(t),i.push(t>>12&15|224),i.push(Np(t,6))):i.push(t>>6&31|192),i.push(63&t|128)):i.push(t)}function Mp(t,i){if(i.ac>=t.length)throw new m("Invalid byte index");const e=255&t[i.ac];if(i.Ly(1),128==(192&e))return 63&e;throw new m("Invalid continuation byte")}function Lp(t,i){const e=i.ac;if(e>t.length)throw new m("Invalid byte index");if(e===t.length)return!1;const s=255&t[e];if(i.Ly(1),!(128&s))return s;if(192==(224&s)){const e=(31&s)<<6|Mp(t,i);if(e>=128)return e;throw new m("Invalid continuation byte")}if(224==(240&s)){const e=(15&s)<<12|Mp(t,i)<<6|Mp(t,i);if(e>=2048)return Dp(e),e;throw new m("Invalid continuation byte")}if(240==(248&s)){const e=(7&s)<<18|Mp(t,i)<<12|Mp(t,i)<<6|Mp(t,i);if(e>=65536&&e<=1114111)return e}throw new m("Invalid UTF-8 detected")}r(),r();var Op=[128,64,32,16,8,4,2,1],Fp=class{Uy(t){return Up(this.Vy,t)}constructor(t){this.Vy=void 0,this.Vy=t}};function Up(t,i){return(t&i)===i}function Ut(t,i){return Up(t,Op[i])}function Cl(t,i){const e=t.getUint8(i.ac);return i.Ly(1),e}function Vp(t,i,e){t.setUint8(i.ac,e),i.Ly(1)}function kt(t,i,e){const s=yi(ye(t),i.ac,i.ac+e);return i.Ly(s.byteLength),s}function Ar(t,i,e){ye(t).set(ye(e),i.ac),i.Ly(e.byteLength)}function Hp(t,i,e){return i.ac+e<=t.byteLength}function Wp(t,i,e,s){return void 0===s&&(s=!1),s?function(t,i,e){let s=0,n=1;for(let r=0;r=55296&&n<=56319&&et&&Ct(dm,qd.call(t)));function Qo(t,i){if(t===i)return!0;if(t.byteLength!==i.byteLength)return!1;return ko(new j(t),new j(i))}function ko(t,i){if(t===i)return!0;if(t.byteLength!==i.byteLength)return!1;if(t.buffer===i.buffer&&t.byteOffset===i.byteOffset)return!0;for(let e=0;et+i.byteLength,0);return vm(t,i)}function vm(t,i){const e=new j(i);let s=0;for(const i of t)e.set(i,s),s+=i.byteLength;return e}function _m(t,i,e){const s=new j(t.byteLength+i.byteLength),n=yi(t,0,e),r=yi(t,e);return s.set(n),s.set(i,e),s.set(r,e+i.byteLength),s}function gm(t){return Cn(t).buffer}function pm(t){return wa(new j(t))}function ll(t){return wa(Gc(t))}var Yc=new j([0]).buffer,mm=class{get Wy(){return this.nc.length}qy(t){for(const i of this.nc)if(lm(i[0],t))return!0;return!1}zy(t){for(const i of this.nc)if(lm(i[0],t))return i[1]}Gy(t,i){for(const e of this.nc)if(lm(e[0],t))return void(e[1]=i);this.nc.push([t,i])}Xy(t,i){this.nc.forEach(i=>t(i[1],i[0]),i)}jy(){Wt(this.nc)}constructor(){this.nc=void 0,this.nc=[]}};r();var Ga=class{Qy(t){this.Qd&&(this.Qd(t),this.zg())}Ky(t){this.Kd&&(this.Kd(t),this.zg())}Zg(){this.Yy.catch(gs),this.Ky(new Qc)}$g(t){t.then(t=>this.Qy(t),t=>this.Ky(t))}zg(){this.Qd=void 0,this.Kd=void 0}constructor(){this.Yy=void 0,this.Qd=void 0,this.Kd=void 0,this.Yy=new Promise((t,i)=>{this.Qd=t,this.Kd=i})}};function wm(){return new j([8,4]).buffer}function ym(t,i){return t===Ug?function(t){if(t.byteLength<2*bm.length)return t;const i=new DataView(t,0,2*bm.length),e=im(i,!0);if(e===bm)return t;return function(t){const i='',e='Content-Typetext/xml; charset=utf-8SOAPAction"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"',s=""+i+pm(t)+e;return em(s,!0).buffer}(t)}(i):i}r();var bm=">8-this.ib;return(s<0?1:0}},w.defineProperty(t.prototype,"bitLength",{get:function(){return this.$y.bitLength-this.ib},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"length",{get:function(){return this.$y.length},enumerable:!1,configurable:!0}),t}();r(),r();_.pow(2,-52);function xm(t,i,e){return _.min(_.max(t,i),e)}function Pm(t){if(t<=0)return 0;for(var i=0;t>>i>0;)i++;return i>0&&t===1<>8-i}function Cm(t,i){return t&(1<7&&(this.sb++,this.hb=0)},t.prototype.seek=function(t,i){this.sb=t,this.hb=i},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new m("Cannot read past end of buffer.");return this.eb.get(this.sb)>>7-this.hb&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new m("Cannot read past end of buffer.");if(0===this.hb)return this.eb.get(this.sb++);var t=Cm(this.eb.get(this.sb),8-this.hb),i=Im(this.eb.get(this.sb+1),this.hb);return this.sb++,t<32)throw new m("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new m("Cannot read past end of buffer.");var i=0;if(0===this.hb&&t%8==0)for(var e=t-8;e>=0;e-=8)i|=this.readByte()<=0;e--)i|=this.readBit()<32)throw new m("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new m("Cannot read past end of buffer.");var i=this.readUInt(t);return 0===(i&1<>3,this.hb=7&i},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new m("Cannot read past end of buffer.");for(var i=[],e=0;ei?1:S(t)?S(i)?0:1:-1},Pi=function(){function t(){this.ob=[],this.ub=[],this.fb=0}return t.from=function(){for(var i=[],e=0;e=this.length)){var i=this.findContainingBufferIndex(t),e=t-this.ub[i];return this.ob[i][e]}},w.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.ob.length<1)return-1;if(this.ob.length>1){var i=this.join();this.clear(),this.pushRange(i)}var e=this.ob[0];return"number"==typeof t?km(e,t):"undefined"!=typeof Buffer?Buffer.from(e.buffer,e.byteOffset,e.byteLength).indexOf(t):function(t,i){if(0===i.length)return 0;for(var e=i[0],s=i.length,n=t.length-s,r=0;r<=n&&!((r=km(t,e,r))<0||r>n);r++){for(var h=r+1,o=r+s,a=1;h4)throw new m("Expected byteLength to be between 0 and 4 but was "+i);if(t<0||t>this.length-i)throw new m("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-i)+")");if(1===i)return this.get(t);for(var e=0,s=0;sn)return new t;if(s===n)return new t;for(var r=new t,h=this.findContainingBufferIndex(s),o=this.ob[h],a=s,u=a-this.ub[h];a+o.length-u=0&&e>=0;){if(0!==s[n])break;if(0===n){if(0===e)return new t;e-=1,n=(s=this.ob[e]).length-1}else n-=1;i-=1}return this.slice(0,i+1)},t}(),Dm=function(){function t(i){this._b=i||t.BUFFER_CHUNK_SIZE,this.gb=!1,this.pb=new Pi,this.eb=new j(this._b),this.mb=0,this.wb=0,this.hb=7}return t.prototype.closeByte=function(){this.eb[this.mb++]=this.wb,this.mb>=this._b&&this.closeBuffer(),this.wb=0,this.hb=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.mb&&(this.pb.pushRange(this.eb,0,this.mb),t&&(this.eb=new j(this._b)),this.mb=0)},w.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.hb},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.gb)throw new m("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.gb=!0,this.pb},t.prototype.writeBit=function(t){if(this.gb)throw new m("Cannot write to a closed BitWriter.");this.wb|=t<32)throw new m("The max bitlength that can be provided is 32.");if(t>=_.pow(2,i))throw new m("Uint "+t+" cannot be represented in "+i+" bit(s).");if(this.isWritingStartBit&&i%8==0)for(var e=i-8;e>=0;e-=8)this.writeByte(t>>e&255);else for(e=i-1;e>=0;e--)this.writeBool((t&1<0)},t.prototype.writeInt=function(t,i){if(i>32)throw new m("The max bitlength that can be provided is 32.");if(_.abs(t)>=_.pow(2,i-1))throw new m("Signed integer "+t+" cannot be represented in "+i+" bit(s).");t<0?this.writeUInt(t+_.pow(2,i),i):this.writeUInt(t,i)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new m("Received a negative number.");for(var i=_.floor(_.log2(t+1))+1,e=0;e=t.LARGE_SIZE/8,n=16===this.boxType.length;i.writeUInt(s?1:e,32),i.writeString(n?"uuid":this.boxType),s&&(i.writeUInt(_.floor(e/t.LARGE_SIZE),32),i.writeUInt(e%t.LARGE_SIZE,32)),n&&i.writeString(this.boxType)},t.prototype.getSize=function(){var i=8+(this.boxType.length>4?16:0),e=this.getBoxContentSize()+i;return e>=t.LARGE_SIZE/8&&(e+=8),e},t.prototype.serialize=function(){var t=new Nm;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=_.pow(2,32),t}();function fa(t,i){return t instanceof yo?64===i:t<_.pow(2,i)}function P(t,i){return _.round(t*_.pow(2,i))}function Mm(t,i){for(var e=0;e65535&&(n-=65536,i.push(n>>>10&1023|55296),n=56320|1023&n),i.push(n)}return Um(i)}(s)}(t,i,!0)}function jm(t,i,e){return void 0===i&&(i=0),void 0===e&&(e=t.byteLength),new j(t.buffer,t.byteOffset+i,e-i)}function Qm(t,i,e){return void 0===i&&(i=0),void 0===e&&(e=t.byteLength),new DataView(t.buffer,t.byteOffset+i,e-i)}function Km(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Ym(t){return new j(t.buffer,t.byteOffset,t.byteLength)}var Jm=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new Om(this.offset<<3)},t}();r();var Zm=function(){function t(t,i){this.data=t,this.cursor=i}return t.prototype.nextUint8=function(){return $r(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,i,e){void 0===e&&(e=!1);var s=t.getUint16(i.offset,e);return i.shift(2),s}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,i,e){void 0===e&&(e=!1);var s=t.getInt16(i.offset,e);return i.shift(2),s}(this.data,this.cursor)},t.prototype.nextUint32=function(){return Ir(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,i,e){void 0===e&&(e=!1);var s=t.getInt32(i.offset,e);return i.shift(4),s}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,i,e){void 0===e&&(e=!1);var s=Ir(t,i,e),n=Ir(t,i,e),r=e?n:s,h=e?s:n;return yo.fromBits(h,r,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return qm(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Hm(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,i,e){for(var s=[],n=0;nt.byteLength){var o=h;return i.seek(e),{complete:!1,neededOffset:o}}var a={type:n.type,offset:e,data:new Zm(Qm(t,e,h),new Jm(n.headerSize))};return i.seek(h),{complete:!0,box:a}}function _i(t){return{version:t>>24,flags:new Vm(16777215&t)}}function tw(t,i){var e,s,n,r;return 1===i?(e=t.nextUint64(),s=t.nextUint64(),n=t.nextUint32(),r=t.nextUint64()):(e=t.nextUint32(),s=t.nextUint32(),n=t.nextUint32(),r=t.nextUint32()),{creation:e,modification:s,scale:n,duration:r}}function iw(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function ew(t){var i=t.nextUint32Array(9);return{a:qr(i[0],16),b:qr(i[1],16),u:qr(i[2],30),c:qr(i[3],16),d:qr(i[4],16),v:qr(i[5],30),x:qr(i[6],16),y:qr(i[7],16),w:qr(i[8],30)}}function ts(t){return new Lm(t.type,jm(Ym(t.data.data),t.data.cursor.offset))}var sw=function(t){function i(i,e,s,n){void 0===s&&(s=0),void 0===n&&(n=0);var r=t.call(this,"hdlr",s,n)||this;return r.name=e,r.handlerType=i,r}return Dt(i,t),w.defineProperty(i.prototype,"handlerType",{get:function(){return this.bb},set:function(t){this.bb=t},enumerable:!1,configurable:!0}),i.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},i.prototype.getBoxContentSize=function(){var i,e;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(e=null===(i=this.name)||void 0===i?void 0:i.length)&&void 0!==e?e:0)+1},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(0,32),i.writer.writeString(this.handlerType),this.serializeReserved(i),this.name&&i.writer.writeString(this.name),i.writer.writeByte(0)},i}(en);function nw(t){var i=t.data,e=_i(i.nextUint32()),s=e.version,n=e.flags;i.skip(4);var r=i.nextChars(4);i.skip(12);var h=i.nextUTF8String();return new sw(r,h,s,n.raw)}!function(t){function i(){return t.call(this,"mdir")||this}Dt(i,t),i.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(sw);r(),r(),r();var yl=function(){function t(t,i){void 0===i&&(i=!1),this.fixed28BitMode=i,this.tag=t}return t.prototype.encodeSize=function(t){for(var i=[];t>0;)i.length>0&&(i[i.length-1]+=128),i.push(t%128),t>>=7;if(this.fixed28BitMode)for(;i.length<4;)i.push(128);return i.reverse()},w.defineProperty(t.prototype,"tag",{get:function(){return this.Ab},set:function(t){if(!fa(t,8))throw new m("Provided tag does not fit in 8 bits.");this.Ab=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return this.getDescriptorSize()+1+this.encodeSize(this.getDescriptorSize()).length},t.prototype.serialize=function(t){t.writer.writeByte(this.tag);for(var i=0,e=this.encodeSize(this.getDescriptorSize());i0)throw new m("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,i),void 0!==this.explicitAuxInfoType&&(i.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),i.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),i.writer.writeByte(this.defaultSampleInfoSize),i.writer.writeUInt(this.sampleInfoSizes.length,32);for(var e=0,s=this.sampleInfoSizes;e1)throw new m("Provided balance does not fit in the allowed range [-1, 1].");if(!fa(P(t,8),16))throw new m("Provided balance does not fit in 16 bits (fixed 8.8).");this.UA=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(P(this.balance,8),16),i.writer.writeUInt(0,16)}}(en);r();!function(t){function i(i){var e=t.call(this,"stss",0,0)||this;return e.entries=i,e}Dt(i,t),w.defineProperty(i.prototype,"entries",{get:function(){return this.Lb},set:function(t){if(!fa(t.length,32))throw new m("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!fa(t,32)}))throw new m("Not all entries can be represented in 32 bits.");this.Lb=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.entries.length,32);for(var e=0,s=this.entries;e31)throw new m("The provided compressorName should at most be 31 characters long.");this.qA=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"frameCount",{get:function(){return this.zA},set:function(t){if(!fa(t,16))throw new m("Provided frameCount does not fit in 16 bits.");this.zA=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"depth",{get:function(){return this.GA},set:function(t){if(!fa(t,16))throw new m("Provided depth does not fit in 16 bits.");this.GA=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){var i,e,s,n,r,h;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(e=null===(i=this.clap)||void 0===i?void 0:i.getSize())&&void 0!==e?e:0)+(null!==(n=null===(s=this.pasp)||void 0===s?void 0:s.getSize())&&void 0!==n?n:0)+(null!==(h=null===(r=this.extra)||void 0===r?void 0:r.length)&&void 0!==h?h:0)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(0,16),i.writer.writeUInt(0,16),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),i.writer.writeUInt(this.width,16),i.writer.writeUInt(this.height,16),i.writer.writeUInt(P(this.horizontalResolution,16),32),i.writer.writeUInt(P(this.verticalResolution,16),32),i.writer.writeUInt(0,32),i.writer.writeUInt(this.frameCount,16),i.writer.writeByte(this.compressorName.length),i.writer.writeString(this.compressorName);for(var e=0;e<31-this.compressorName.length;e++)i.writer.writeByte(0);i.writer.writeUInt(this.depth,16),i.writer.writeInt(-1,16),this.clap&&i.concat(this.clap.serialize()),this.pasp&&i.concat(this.pasp.serialize()),this.extra&&Mm(i.writer,this.extra)},i}(ow);r(),r();!function(t){function i(i){var e=t.call(this,"esds",0,0)||this;return e.esDescriptor=i,e}Dt(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof j?this.esDescriptor.length:this.esDescriptor.getSize())},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor instanceof j?i.concat(Pi.from(this.esDescriptor)):this.esDescriptor.serialize(i)}}(en);r();!function(t){function i(i,e,s){var n=t.call(this,"mp4a",i,s)||this;return n.esd=e,n}Dt(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.concat(this.esd.serialize())}}(aw);r();!function(t){function i(i,e,s,n){void 0===n&&(n={});var r=t.call(this,"mp4v",i,e,n)||this;return r.esDescriptor=s,r}Dt(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor.serialize(i)}}(Ty);r();!function(t){function i(i,e){var s=t.call(this,"mp4s",i)||this;return s.esDescriptor=e,s}Dt(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor.serialize(i)}}(ow);r(),r();!function(t){function i(i){var e=t.call(this,"avcC")||this;return e.decoderConfig=i,e}Dt(i,t),i.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},i.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(Bm);r();!function(){function t(t,i,e,s,n,r){void 0===r&&(r=1),this.lengthSizeMinusOne=e,this.version=r,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=i,this.spsSets=s,this.ppsSets=n}w.defineProperty(t.prototype,"version",{get:function(){return this.XA},set:function(t){if(!fa(t,8))throw new m("Provided version does not fit in 8 bits.");this.XA=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"profileIndication",{get:function(){return this.jA},set:function(t){if(!fa(t,8))throw new m("Provided profileIndication does not fit in 8 bits.");this.jA=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.QA},set:function(t){if(!fa(t,8))throw new m("Provided profileCompatibility does not fit in 8 bits.");this.QA=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"levelIndication",{get:function(){return this.KA},set:function(t){if(!fa(t,8))throw new m("Provided levelIndication does not fit in 8 bits.");this.KA=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"spsSets",{get:function(){return this.YA},set:function(t){if(!fa(t.length,5))throw new m("Provided number of spsSets exceeds the max (32)");this.YA=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"ppsSets",{get:function(){return this.JA},set:function(t){if(!fa(t.length,8))throw new m("Provided number of ppsSets exceeds the max (256)");this.JA=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce(function(t,i){return t+i.length},0)+2*this.ppsSets.length+this.ppsSets.reduce(function(t,i){return t+i.length},0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var i=0,e=this.spsSets;i0&&(null!==(n=null===(s=e.constantIv)||void 0===s?void 0:s.length)&&void 0!==n?n:0)>0)throw new m("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return o.kId=e.kId,o.isProtected=null!==(r=e.isProtected)&&void 0!==r?r:1,e.perSampleIvSize>0?o.perSampleIvSize=e.perSampleIvSize:o.constantIv=null!==(h=e.constantIv)&&void 0!==h?h:new j(0),o}return Dt(i,t),w.defineProperty(i.prototype,"isProtected",{get:function(){return this.tS},set:function(t){if(!fa(t,8))throw new m("Provided isProtected does not fit in 1 byte.");this.tS=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"perSampleIvSize",{get:function(){return this.iS},set:function(t){if(![8,16].includes(t))throw new m("Provided perSampleIvSize does not match any allowed value [8, 16].");this.iS=t,this.eS=new j(0)},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"kId",{get:function(){return this.sS},set:function(t){if(16!==t.length)throw new m("Provided kId length is not 16.");this.sS=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"constantIv",{get:function(){return this.eS},set:function(t){if(![8,16].includes(t.length))throw new m("Provided constant IV length does not match any allowed value [8, 16].");this.eS=t,this.iS=0},enumerable:!1,configurable:!0}),i.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},i.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.serializeOwnContent(i)},i.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),Mm(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),Mm(t.writer,this.constantIv))},i}(en),Ey=(function(t){function i(i){return t.call(this,0,i)||this}Dt(i,t)}(ky),function(t){function i(i){var e=t.call(this,1,i)||this;return e.cryptByteBlocks=i.cryptByteBlock,e.skipByteBlocks=i.skipByteBlock,e}return Dt(i,t),w.defineProperty(i.prototype,"cryptByteBlocks",{get:function(){return this.nS},set:function(t){if(!fa(t,4))throw new m("Provided cryptByteBlocks does not fit in 4 bits.");this.nS=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"skipByteBlocks",{get:function(){return this.rS},set:function(t){if(!fa(t,4))throw new m("Provided skipByteBlocks does not fit in 4 bits.");this.rS=t},enumerable:!1,configurable:!0}),i.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},i}(ky));!function(t){function i(i){var e=t.call(this)||this;return e.tencBox=new Ey(i),e}Dt(i,t),i.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},i.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Mw);function xy(t){return void 0!==t.iv}function Py(t){return void 0!==t.subsamples}r();!function(t){function i(i){var e=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return e.samples=i,e}Dt(i,t),w.defineProperty(i.prototype,"samples",{get:function(){return this.bA},set:function(t){var i;if(!fa(t.length,32))throw new m("The number of samples provided does not fit in 32 bits.");for(var e=0,s=t;e{this.wS(i,t)}),this.So(new wp(this.lS))}wS(t,i){if("string"==typeof t){const e=t;t=i,i=e}const e=aa(t);if(this.yS===Ug&&16===e.byteLength&&(zs.v_||zs.dg)){const t=dh(e),i=t.getUint32(0,!0),s=t.getUint16(4,!0),n=t.getUint16(6,!0);t.setUint32(0,i,!1),t.setUint16(4,s,!1),t.setUint16(6,n,!1)}this.yS===Ug&&"status-pending"===i&&(i="usable"),this.lS.Gy(e,i)}constructor(t,i){super(),this.dS=void 0,this.yS=void 0,this.lS=void 0,this.vS=void 0,this.zd=void 0,this._S=void 0,this.bS=void 0,this.SS=void 0,this.TS=void 0,this.dS=t,this.yS=i,this.vS=!1,this.bS=()=>{this.mS()},this.SS=t=>{this.So(new bp(this,t.messageType,ym(this.yS,t.message)))},this.TS=()=>{this.vS=!0,this.lS.Wy>0&&(this.lS.jy(),this.So(new wp(this.lS))),this.dS.removeEventListener("keystatuseschange",this.bS),this.dS.removeEventListener("message",this.SS)},this.dS.addEventListener("keystatuseschange",this.bS),this.dS.addEventListener("message",this.SS),this.lS=new mm;const e=[];this.dS.closed&&e.push(Promise.resolve(this.dS.closed)),this._S=new Ga,e.push(this._S.Yy),this.zd=Promise.race(e).then(this.TS,this.TS),this.mS()}};function Oy(t){let i;if(t.message){const e=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);e&&(i=0|x(e[1],16))}throw new Am(t.message,void 0,i,t)}var Fy=class{async kS(t){return new Ly(this.ES.createSession(t),this.xS)}PS(t){return Promise.resolve(this.ES.setServerCertificate(t))}_n(t){return Promise.resolve(t.setMediaKeys(this.ES))}IS(t){return Promise.resolve(t.setMediaKeys(null))}hr(){return Promise.resolve()}constructor(t,i,e){this.ES=void 0,this.xS=void 0,this.Cd=void 0,this.ES=t,this.xS=i,this.Cd=e}},Uy=class{get xS(){return this.CS.keySystem}async RS(){const t=await this.CS.createMediaKeys();return new Fy(t,this.yS,this.DS)}NS(){return this.DS}constructor(t,i,e){this.CS=void 0,this.yS=void 0,this.DS=void 0,this.CS=t,this.yS=i,this.DS=e}};r(),r();var Vy="video/avc",Hy="video/hevc",Wy="video/mp4",qy="video/mpeg",zy="video/mpeg2",Gy="video/webm",Xy="video/x-unknown",jy="audio/mp4",Qy="audio/webm",Ky="image/jpeg",Yy="application/ttml+xml",Jy="application/mp4",Zy="text/vtt";function St(t){return Xt(t,"audio/")}function $y(t){return Xt(t,"video/")}function To(t){return nl(t,Jy)||nl(t,Wy)||nl(t,jy)}function tb(t){return nl(t,Gy)||nl(t,Qy)}var ib=class{MS(t){for(const[i,e]of this.LS)if(i.toLowerCase()===t.toLowerCase())return e}constructor(t,i){this.Km=void 0,this.LS=void 0,this.Km=t,this.LS=i}};function eb(t){const i=t.trim(),e=i.indexOf(";");if(e<0)return new ib(i,[]);const s=i.substr(0,e).trim(),n=i.substr(e+1).trim(),r=[];let h=0,o=!1;for(let t=0;tBoolean(t.contentType));o.length&&(r.audioCapabilities=o.filter(s=>ob(t,i,e,s)),h=!0,r.audioCapabilities.length&&(n=!0))}if(s.videoCapabilities){const o=s.videoCapabilities.filter(t=>Boolean(t.contentType));o.length&&(r.videoCapabilities=o.filter(s=>ob(t,i,e,s)),h=!0,r.videoCapabilities.length&&(n=!0))}return h||(n=t(e,"video/mp4")),n?r:void 0}function ob(t,i,e,s){if(!s.contentType)return!1;if(s.encryptionScheme&&!Ct(i,s.encryptionScheme))return!1;if(s.robustness)return!1;return t(e,nb(s.contentType))}function ab(t){if(t.videoCapabilities)for(const i of t.videoCapabilities)if(i.contentType)return i.contentType;if(t.audioCapabilities)for(const i of t.audioCapabilities)if(i.contentType)return i.contentType}function ub(t){const i=[];for(const e of t)e.encryptionScheme&&i.push({contentType:e.contentType,robustness:e.robustness});return t.concat(i)}function cb(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(db))||!(!t.videoCapabilities||!t.videoCapabilities.some(db))}function db(t){return!t.robustness}function lb(t,i){const e=[];for(const s of t)s.robustness?e.push(s):e.push(Y({},s,{robustness:i}));return e}var fb=class{async nw(t,i){i=i.filter(t=>!t.FS);for(const t of i)t.audioCapabilities&&(t.audioCapabilities=ub(t.audioCapabilities)),t.videoCapabilities&&(t.videoCapabilities=ub(t.videoCapabilities));if(t===Wg&&i.some(cb)){const e=i.map(t=>function(t,i){return Y({},t,{videoCapabilities:t.videoCapabilities?lb(t.videoCapabilities,i):void 0,audioCapabilities:t.audioCapabilities?lb(t.audioCapabilities,i):void 0})}(t,"SW_SECURE_CRYPTO"));try{const i=await od.requestMediaKeySystemAccess(t,e),s=i.getConfiguration();return new Uy(i,t,s)}catch(t){}}const e=await od.requestMediaKeySystemAccess(t,i),s=e.getConfiguration();return new Uy(e,t,s)}static US(){return Vc()}};r(),r(),r(),r();var vb=class extends Ne{get fS(){return this.VS&&this.VS.sessionId||""}get cS(){return NaN}get uS(){return this.HS.Yy}get xy(){return this.WS}async gS(t,i,e){this.qS(),this.zS=new Ga,this.kS(aa(i),e),await this.zS.Yy}kS(t,i){if(!t)throw new g("Expected initData to be defined but was "+t+".");const e=i&&i.playready&&i.playready.GS;let s;return s=i?this.XS.createSession(this.jS,t,e):this.XS.createSession(this.jS,t),s.addEventListener("mskeyclose",this.TS),s.addEventListener("mskeymessage",this.QS),s.addEventListener("mskeyerror",this.Ts),s.addEventListener("mskeyadded",this.KS),this.VS=s,this.YS("status-pending"),s}async Un(t){return this.qS(),!0}async er(t){if(this.JS=new Ga,this.qS(),!this.VS)return Promise.resolve();const i=aa(t);if(0===i.byteLength)throw new g("Cannot call update with an empty response.");this.VS.update(i),await this.JS.Yy}Xs(){return!this.vS&&this.VS&&(this.vS=!0,this.VS.close()),this.HS.Yy}async pS(){this.qS()}qS(){if(this.vS)throw new g("Already closing or closed.")}YS(t){this.WS.jy(),this.WS.Gy(Yc,t),this.So(new wp(this.WS))}constructor(t,i){super(),this.XS=void 0,this.jS=void 0,this.vS=void 0,this.HS=void 0,this.JS=void 0,this.zS=void 0,this.WS=void 0,this.VS=void 0,this.TS=void 0,this.QS=void 0,this.Ts=void 0,this.KS=void 0,this.XS=t,this.jS=i,this.vS=!1,this.JS=void 0,this.zS=void 0,this.VS=void 0,this.TS=()=>{this.vS=!0,this.HS.Qy(void 0),this.VS&&(this.VS.removeEventListener("mskeyclose",this.TS),this.VS.removeEventListener("mskeymessage",this.QS),this.VS.removeEventListener("mskeyerror",this.Ts),this.VS.removeEventListener("mskeyadded",this.KS))},this.QS=t=>{this.zS&&(this.zS.Qy(void 0),this.zS=void 0),this.So(new bp(this,"license-request",nr(t.message).buffer,t.destinationURL||void 0))},this.Ts=()=>{const t=this.VS&&this.VS.error;if(!t)return;const i=new Am("Unknown CDM error",t.code,t.systemCode);if(this.zS)this.zS.Ky(i),this.zS=void 0;else if(this.JS)this.JS.Ky(i),this.JS=void 0;else switch(i.Jy){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:this.YS("output-not-allowed");break;default:this.YS("internal-error")}},this.KS=()=>{this.zS&&(this.YS("usable"),this.zS.Qy(void 0),this.zS=void 0),this.JS&&(this.YS("usable"),this.JS.Qy(void 0),this.JS=void 0)},this.HS=new Ga,this.WS=new mm}},_b=class{async kS(t){return new vb(this.XS,this.jS)}PS(t){return Promise.resolve(!1)}_n(t){const i=()=>{t.msSetMediaKeys(this.XS),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.XS):t.addEventListener("loadedmetadata",i),Promise.resolve()}IS(t){return Promise.resolve()}hr(){return Promise.resolve()}constructor(t,i,e){this.XS=void 0,this.xS=void 0,this.Cd=void 0,this.jS=void 0,this.XS=t,this.xS=i,this.Cd=e;const s=ab(e)||"video/mp4";this.jS=nb(s)}},gb=class{get xS(){return this.yS}NS(){return this.ZS}RS(){const t=new s.MSMediaKeys(this.yS);return Promise.resolve(new _b(t,this.yS,this.ZS))}constructor(t,i){this.yS=void 0,this.ZS=void 0,this.yS=t,this.ZS=i}},pb=class{nw(t,i){try{return Promise.resolve(function(t,i){if(!mb())throw new g("Unsupported key system "+t);for(const e of i){const i=hb(wb,pp,t,e);if(i)return new gb(t,i)}throw new g("Unsupported key system configuration for "+t)}(t,i))}catch(t){return Promise.reject(t)}}static US(){return mb()}};function mb(){return void 0!==s.MSMediaKeys&&"function"==typeof s.MSMediaKeys.isTypeSupported}function wb(t,i){return s.MSMediaKeys.isTypeSupported(t,i)}r(),r(),r(),r();var yb=class extends Ne{get fS(){return this.$S?this.$S.sessionId:""}get cS(){return NaN}get uS(){return this.HS.Yy}get xy(){return this.WS}gS(t,i,e){const s=e&&e.fairplay&&e.fairplay.tT;if(!s)throw new g("Expected FairPlay contentId to be defined but was "+s+".");const n=function(t,i,e){const s=qc(t),n=2*s.length,r=2*i.length,h=new ArrayBuffer(4+n+4+r+4+e.byteLength),o=new DataView(h),a=new oi;return kl(o,a,n,!0),tm(o,a,s,!0),kl(o,a,r,!0),tm(o,a,i,!0),kl(o,a,e.byteLength,!0),Ar(o,a,e),new j(h)}(aa(i),s,this.iT);return this.$S=this.eT.createSession(this.jS,n),this.$S.addEventListener("webkitkeymessage",this.QS,!1),this.$S.addEventListener("webkitkeyadded",this.KS,!1),this.$S.addEventListener("webkitkeyerror",this.Ts,!1),this.YS("status-pending"),this.sT.Qy(this.$S),this.sT=new Ga,Promise.resolve()}Un(t){return Promise.resolve(!0)}async er(t){const i=aa(t);if(0===i.byteLength)throw new g("Cannot call update with an empty response.");this.nT=new Ga;(this.$S||await this.sT.Yy).update(i),await this.nT.Yy}Xs(){var t;const i=this.$S;return i&&(i.removeEventListener("webkitkeymessage",this.QS,!1),i.removeEventListener("webkitkeyadded",this.KS,!1),i.removeEventListener("webkitkeyerror",this.Ts,!1),i.close()),this.sT.Zg(),null==(t=this.nT)||t.Zg(),this.HS.Qy(void 0),this.HS.Yy}pS(){return Promise.resolve(void 0)}YS(t){this.WS.jy(),this.WS.Gy(Yc,t),this.So(new wp(this.WS))}constructor(t,i,e){super(),this.eT=void 0,this.jS=void 0,this.iT=void 0,this.HS=void 0,this.nT=void 0,this.WS=void 0,this.$S=void 0,this.sT=void 0,this.Ts=void 0,this.QS=void 0,this.KS=void 0,this.eT=t,this.jS=i,this.iT=e,this.HS=new Ga,this.nT=void 0,this.WS=new mm,this.$S=void 0,this.sT=new Ga,this.Ts=()=>{const t=this.$S&&this.$S.error;if(!t)return;const i=new Am("Unknown CDM error",t.code,t.systemCode);this.nT?(this.nT.Ky(i),this.nT=void 0):i.Jy===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.YS("output-not-allowed"):this.YS("internal-error"),this.So(new Ap)},this.QS=t=>{this.So(new bp(this,"license-request",nr(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},this.KS=()=>{this.nT&&(this.nT.Qy(void 0),this.nT=void 0),this.YS("usable")}}};r();var as=class extends Qr{get name(){return"THEOplayerError"}get category(){return L.fromCode(this.code)}constructor(t,i,e){super(i,e),this.code=void 0,this.code=t}};function bb(t,i){return t instanceof as?t:t instanceof m?new as(i,t.message,t):new as(i,String(t))}var Ab=class{getInternalMediaKeys(){return this.eT}async kS(t){if(!this.iT)throw new as(me.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return new yb(this.eT,this.jS,this.iT)}PS(t){return this.iT=aa(t),Promise.resolve(!0)}_n(t){return t.webkitSetMediaKeys(this.eT),Promise.resolve()}IS(t){return t.webkitSetMediaKeys(null),Promise.resolve()}hr(){return Promise.resolve()}constructor(t,i,e){this.eT=void 0,this.xS=void 0,this.Cd=void 0,this.jS=void 0,this.iT=void 0,this.eT=t,this.xS=i,this.Cd=e,this.iT=void 0;const s=ab(e)||"video/mp4";this.jS=nb(s)}},Sb=class{get xS(){return this.yS}NS(){return this.ZS}RS(){const t=new s.WebKitMediaKeys(this.yS);return Promise.resolve(new Ab(t,this.yS,this.ZS))}constructor(t,i){this.yS=void 0,this.ZS=void 0,this.yS=t,this.ZS=i}},Tb=class{nw(t,i){try{return Promise.resolve(function(t,i){if(t!==Kg)throw new g(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!kb())throw new g("Unsupported key system "+t);for(const e of i){const i=hb(Eb,mp,t,e);if(i)return new Sb(t,i)}throw new g("Unsupported key system configuration for "+t)}(t,i))}catch(t){return Promise.reject(t)}}static US(){return kb()}};function kb(){return void 0!==s.WebKitMediaKeys&&"function"==typeof s.WebKitMediaKeys.isTypeSupported}function Eb(t,i){return s.WebKitMediaKeys.isTypeSupported(t,i)}r();var xb=class{async nw(t,i){for(const e of this.rT)try{return await e.nw(t,i)}catch(t){}throw new g("Unsupported key system configuration for "+t)}constructor(t){this.rT=void 0,this.rT=t}};r(),r(),r(),r(),r();var Zn=class{Zo(t,i){return new Promise(e=>{const s=Zc.ep([this.hT.Yg,i]),n=()=>{s.zg()};this.oT.push(()=>{const i=Pb(t,s.Yg);return e(i),i.then(n,n)}),this.aT||(this.aT=this.uT())})}Zg(){return this.cT(!0)}kn(){return this.dT=void 0,this.cT(!1)}cT(t){const i=this.aT;return this.hT.Zg(),t&&(this.hT=new Zc),Promise.resolve(i)}constructor(t){this.oT=[],this.aT=void 0,this.hT=new Zc,this.dT=void 0,this.uT=()=>{if(0===this.oT.length)return this.dT?Pb(this.dT,this.hT.Yg).then(this.lT,this.lT):this.lT();return this.oT.shift()().then(this.uT)},this.lT=()=>{if(0!==this.oT.length)return this.uT();this.aT=void 0},this.dT=t}};function Pb(t,i){return new Promise(e=>e(t(i)))}var Ib=new Zn,Cb=class extends Ne{fT(){this.nT&&(this.YS("usable"),this.nT.Qy(void 0),this.nT=void 0)}vT(t){const i=new Am("Unknown CDM error",t.errorCode,t.systemCode);this.nT?(this.nT.Ky(i),this.nT=void 0):this.zS?(this.zS.Ky(i),this.zS=void 0):i.Jy===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.YS("output-restricted"):1===i.Zy?this.YS("expired"):this.YS("internal-error")}_T(t){0!==t.message.byteLength?(this.zS&&(this.zS.Qy(void 0),this.zS=void 0),this.So(new bp(this,"license-request",ym(this.yS,nr(t.message).buffer),t.defaultURL||void 0))):this.zS&&(this.zS.Ky("Empty key message"),this.zS=void 0)}gT(t){this.pT||(this.pT=t,this.mT.Qy(t))}get xy(){return this.wT}get fS(){return this.yT}set fS(t){this.yT=t}get uS(){return this.HS.Yy}get cS(){return NaN}async Xs(){this.throwIfClosed(),this.nT&&(this.nT.Ky(void 0),this.nT=void 0),this.gb=!0,this.HS.Qy(void 0)}async gS(t,i){this.throwIfClosed(),this.zS=new Ga,this.bT=aa(i);(this.pT||await this.mT.Yy).webkitGenerateKeyRequest(this.yS,this.bT),await this.zS.Yy}async Un(t){return this.throwIfClosed(),!1}async pS(){this.throwIfClosed()}async er(t){if(this.throwIfClosed(),this.nT=new Ga,zs.S_||zs.w_)return Ib.Zo(async()=>{await this.doUpdate(t)});await this.doUpdate(t)}async doUpdate(t){if(void 0===this.nT)return;(this.pT||await this.mT.Yy).webkitAddKey(this.yS,aa(t),this.bT,this.fS),await this.nT.Yy,zs.w_&&await Ze(500)}throwIfClosed(){if(this.gb)throw new g("Already closing or closed.")}YS(t){this.wT.jy(),this.wT.Gy(Yc,t),this.So(new wp(this.wT))}async AT(){const t=this.pT||await this.mT.Yy;if(t.webkitCancelKeyRequest)try{t.webkitCancelKeyRequest(this.yS,this.yT)}catch(t){}finally{await Ze(500)}}constructor(t){super(),this.yS=void 0,this.zS=void 0,this.nT=void 0,this.HS=void 0,this.gb=void 0,this.bT=void 0,this.yT=void 0,this.wT=void 0,this.pT=void 0,this.mT=void 0,this.yS=t,this.zS=void 0,this.nT=void 0,this.gb=!1,this.bT=void 0,this.pT=void 0,this.HS=new Ga,this.yT="",this.mT=new Ga,this.wT=new mm}},Rb=class{_n(t){return this.pT=t,this.pT.addEventListener("webkitkeyadded",this.KS),this.pT.addEventListener("webkitkeyerror",this.ST),this.pT.addEventListener("webkitkeymessage",this.TT),this.kT.forEach((i,e)=>i.gT(t)),this.ET.forEach(i=>i.gT(t)),Promise.resolve()}IS(t){return t.removeEventListener("webkitkeyadded",this.KS),t.removeEventListener("webkitkeyerror",this.ST),t.removeEventListener("webkitkeymessage",this.TT),this.pT=void 0,Promise.resolve()}async hr(){const t=this.kT.entries();let i=t.next();for(;!i.done;)await i.value[1].AT(),i=t.next();this.kT.clear()}async kS(t,i,e){const s=new Cb(this.xS);return this.pT&&s.gT(this.pT),this.ET.push(s),s}PS(t){return Promise.resolve(!1)}xT(t){if(!t)return;let i=this.kT.get(t);return i||(i=this.ET.shift(),i?(i.fS=t,this.kT.set(t,i),i):void 0)}constructor(t,i){this.xS=void 0,this.Cd=void 0,this.pT=void 0,this.kT=void 0,this.ET=void 0,this.KS=void 0,this.ST=void 0,this.TT=void 0,this.xS=t,this.Cd=i,this.pT=void 0,this.kT=Ba(),this.ET=[],this.KS=t=>{const i=this.xT(t.sessionId);i&&i.fT()},this.ST=t=>{const i=this.xT(t.sessionId);i&&i.vT(t)},this.TT=t=>{const i=this.xT(t.sessionId);i&&i._T(t)}}},Db=class{RS(){return Promise.resolve(new Rb(this.xS,this.PT))}NS(){return this.PT}constructor(t,i){this.xS=void 0,this.PT=void 0,this.xS=t,this.PT=i}},Nb=class{nw(t,i){try{return Promise.resolve(function(t,i){if(!Nb.US())throw new g("Unsupported key system "+t);for(const e of i){const i=hb(Bb,pp,t,e);if(i)return new Db(t,i)}throw new g("Unsupported key system configuration for "+t)}(t,i))}catch(t){return Promise.reject(t)}}static US(){return lp()}};function Bb(t,i){const e=Af();return Boolean(e&&e.canPlayType&&""!==e.canPlayType(i,t))}r();var Mb,Lb=class{nw(t,i){return t===Wg||t===Ug?Promise.resolve(void 0):Promise.reject(new m("DRM configuration not supported"))}};function Ob(){return Mb||(Mb=function(){const t=[];Tb.US()&&t.push(new Tb);fb.US()&&t.push(new fb);pb.US()&&t.push(new pb);Nb.US()&&t.push(new Nb);zs.k_&&t.push(new Lb);return new xb(t)}()),Mb}r(),r();var Fb=class{jy(t){this.IT.delete(t)}CT(){this.IT.clear()}zy(t){return this.IT.get(t)}Gy(t,i){this.IT.set(t,i)}constructor(){this.IT=Ba()}},Ub=class t{static DT(){return t.Bg||(t.Bg=Vb.US()?new Vb:new Fb),t.Bg}static jy(i){t.DT().jy(i)}static CT(){t.DT().CT()}static zy(i){return t.DT().zy(i)}static Gy(i,e){t.DT().Gy(i,e)}};Ub.Bg=void 0;var Vb=class extends Ub{static US(){const t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}}jy(t){self.sessionStorage.removeItem(t)}CT(){self.sessionStorage.clear()}zy(t){var i;return null!=(i=self.sessionStorage.getItem(t))?i:void 0}Gy(t,i){self.sessionStorage.setItem(t,i)}};r(),r();var Hb=(()=>{const t=self.Blob;if(t)try{new t;return function(t){return(i,e)=>new t(i,e)}(t)}catch(t){}const i=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(i)return function(t){return(i,e)=>{const s=new t;if(i)for(const t of i)s.append(t);return s.getBlob(e&&e.type||"")}}(i)})();function Wb(t,i,e){const s=Hb([i],{type:"application/octet-stream"}),n=URL.createObjectURL(s),r=function(t,i){let e=t;const s=e.indexOf("?");if(s>=0&&(e=e.substr(0,s)),e=e.substr(e.lastIndexOf("/")+1),i){let t=e.indexOf(".");t<0&&(t=e.length),e=e.substr(0,t)+i+e.substr(t)}return e}(t,e),o=h.createElement("a");o.href=n,o.download=r,h.body.appendChild(o),o.click(),h.body.removeChild(o),URL.revokeObjectURL(n)}r();var qb="default";r(),r(),r(),r();var Bi=function(t){return t.NT="arraybuffer",t.BT="json",t.MT="stream",t.LT="text",t}({});r();var cc=class t{append(t,i){let e=t,s=i;e=zb(e),s=Gb(s);const n=e.toLowerCase();if(this.Wm.hasOwnProperty(n)){const t=this.Wm[n],i=t[1];t[1]=i?i+", "+s:s}else this.Wm[n]=[e,s]}delete(t){const i=zb(t).toLowerCase();delete this.Wm[i]}get(t){const i=zb(t).toLowerCase();return this.Wm.hasOwnProperty(i)?this.Wm[i][1]:null}has(t){const i=zb(t).toLowerCase();return this.Wm.hasOwnProperty(i)}set(t,i){let e=t;e=zb(e);const s=e.toLowerCase();this.Wm[s]=[e,Gb(i)]}forEach(t,i){for(const e in this.Wm)this.Wm.hasOwnProperty(e)&&t.call(i,this.Wm[e][1],e,this)}asList(){const t=[];for(const i in this.Wm)if(this.Wm.hasOwnProperty(i)){const[e,s]=this.Wm[i];t.push([e,s])}return t}OT(){const t={};return this.forEach((i,e)=>{t[e]=i}),t}FT(t){t.forEach((t,i)=>{this.append(i,t)})}UT(t){t.forEach((t,i)=>{this.set(i,t)})}constructor(i){if(this.Wm=void 0,this.Wm={},i)if(i instanceof t)i.asList().forEach(t=>{let[i,e]=t;this.append(i,e)});else if(function(t){return Mc(t)&&"function"==typeof t.forEach}(i))i.forEach((t,i)=>{Array.isArray(t)&&2===t.length?this.append(t[0],t[1]):this.append(i,t)});else if(function(t){return void 0!==f&&Mc(t)&&f in t}(i))for(const[t,e]of i)this.append(t,e);else w.getOwnPropertyNames(i).forEach(t=>{this.append(t,i[t])});else;}};function zb(t){let i=t;if("string"!=typeof i&&(i=String(i)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(i))throw new g("Invalid character in header field name");return i}function Gb(t){let i=t;return"string"!=typeof i&&(i=String(i)),i}r(),r(),r();var ya=gd(md());r();var Xb=class extends Qr{get name(){return"AggregateError"}constructor(t){super(""+t.join("\n"),t[0]),this.causes=void 0,this.causes=t}},jb=a,Qb=I(jb.ReadableStream)&&I(jb.WritableStream)&&I(jb.TransformStream)&&jd(jb.ReadableStream.prototype.pipeThrough)&&!ov.xp,Kb=Qb?jb.ReadableStream:ya.ReadableStream,Yb=(Qb?jb.WritableStream:ya.WritableStream,Qb?jb.TransformStream:ya.TransformStream),Jb=(Qb&&jb.ByteLengthQueuingStrategy?jb.ByteLengthQueuingStrategy:ya.ByteLengthQueuingStrategy,Qb&&jb.CountQueuingStrategy?jb.CountQueuingStrategy:ya.CountQueuingStrategy);function Zb(t){return function(t){return new Kb({start(i){for(const e of t)i.enqueue(e);i.close()}})}([t])}function $b(t){return Zb(function(t){return new j(t)}(t))}function tA(t,i){return function(t,i){let e=i;const s=t.getReader(),n=new Ga,r=()=>{h();const t=new Qc;s.cancel(t).catch(gs),n.Ky(t)},h=()=>{e&&(e.jg(r),e=void 0)};e&&(e.Hg?r():e.Xg(r));const o=[],a=t=>t.done?(h(),Promise.resolve(o)):(o.push(t.value),Promise.resolve(s.read()).then(a));return Promise.resolve(s.read()).then(a).then(t=>{h(),n.Qy(t)},t=>{h(),n.Ky(t)}),n.Yy}(t,i).then(t=>fm(t).buffer)}function iA(t,i){let e=i;const{readable:s,writable:n}=new Yb,r=n.getWriter(),h=()=>{e&&e.Zg()};return r.closed.then(h,h),t.then(t=>(e=void 0,r.releaseLock(),t.pipeTo(n).catch(gs)),t=>(e=void 0,r.releaseLock(),n.abort(t).catch(gs))),s}function eA(t){const{readable:i,writable:e}=new Yb;return t.pipeTo(e,{preventCancel:!0}).catch(i=>{let e;e=hi(i)?i[0]===i[1]||Ce(i[0])&&Ce(i[1])?i[0]:new Xb(i):i,t.cancel(e).catch(gs)}),i.tee()}function sA(t){return qc(new j(t))}function nA(t){return rm(t).buffer}r();var rA="text/plain;charset=UTF-8",Qi=class{VT(t){return this.HT(t).then(JSON.parse)}WT(t,i){switch(t){case Bi.NT:return this.qT(i);case Bi.BT:return this.VT(i);case Bi.MT:return this.zT();case Bi.LT:return this.HT(i);default:throw new g}}};function hA(t,i,e){if(t instanceof Qi)return t;if(t instanceof Kb)return function(t,i){return new aA({Km:0,zT:t,GT:oA(i)})}(t,e);const s=oA(e),n=Promise.resolve(t).then(t=>function(t,i){if(t){if("string"==typeof t)return{Km:Bi.LT,XT:t,GT:i||rA};if(t instanceof ArrayBuffer||Kc(t))return{Km:Bi.NT,XT:_A(t),GT:i};if(Gd(t)||hi(t))return{Km:Bi.BT,XT:t,GT:i};throw new g("Unsupported BodyInit type")}return{Km:Bi.LT,XT:null,GT:i}}(t,s));return new aA({Km:1,Yy:n,jT:i})}function oA(t){return(t.get("content-type")||"").toLowerCase()}var aA=class t extends Qi{get QT(){return this.KT}get YT(){return 0===this.JT.Km}ZT(){return this.$T.Yy}HT(t){return this.ek(uA,t)}VT(t){return this.ek(dA,t)}qT(t){return this.ek(fA,t)}zT(){return this.nk(function(t){return 0===t.Km?t.zT:iA(t.Yy.then(vA).then($b),t.jT)}(this.JT))}ek(t,i){if(this.KT)return Promise.reject(new g("Already used"));this.KT=!0;const e=t(this.JT,i);return this.$T.$g(e.then(gs)),e}nk(t){if(this.KT)throw new g("Already used");if(t.locked)throw new g("Body stream is locked");this.KT=!0;const i=new Yb,e=Promise.resolve(t.pipeTo(i.writable));return this.$T.$g(e),i.readable}rk(t){this.JT=t,1===t.Km&&t.Yy.catch(gs)}hk(){if(this.KT)throw new g("Already used");const i=function(t){if(0===t.Km){const[i,e]=t.zT.tee();return[{Km:t.Km,zT:i,GT:t.GT},{Km:t.Km,zT:e,GT:t.GT}]}{const[i,e]=t.jT.tp();return[{Km:t.Km,Yy:t.Yy,jT:i},{Km:t.Km,Yy:t.Yy,jT:e}]}}(this.JT),e=i[0],s=i[1];return this.rk(e),new t(s)}constructor(t){super(),this.KT=!1,this.JT=void 0,this.$T=new Ga,this.$T.Yy.catch(gs),this.rk(t)}};function uA(t,i){return 0===t.Km?tA(t.zT,i).then(sA):(i&&t.jT.$g(i),Cu(t.Yy.then(cA),t.jT))}function cA(t){switch(t.Km){case Bi.LT:return Promise.resolve(t.XT||"");case Bi.NT:return Promise.resolve(t.XT).then(sA);case Bi.BT:return Promise.resolve(t.XT).then(JSON.stringify)}}function dA(t,i){return 0===t.Km?uA(t,i).then(JSON.parse):(i&&t.jT.$g(i),Cu(t.Yy.then(lA),t.jT))}function lA(t){return t.Km===Bi.BT?Promise.resolve(t.XT):cA(t).then(JSON.parse)}function fA(t,i){return 0===t.Km?tA(t.zT,i):(i&&t.jT.$g(i),Cu(t.Yy.then(vA),t.jT))}function vA(t){switch(t.Km){case Bi.NT:return Promise.resolve(t.XT);case Bi.LT:case Bi.BT:return cA(t).then(nA)}}function _A(t){return t instanceof ArrayBuffer?t:nr(ye(t)).buffer}var gA=class extends Qi{get QT(){return this.ck.QT}get YT(){return this.ck.YT}ZT(){return this.ck.ZT()}HT(t){return this.ck.HT(t)}VT(t){return this.ck.VT(t)}qT(t){return this.ck.qT(t)}zT(t){return this.ck.zT(t)}hk(){return this.ck.hk()}constructor(t){super(),this.ck=void 0,this.ck=t}};function pA(t){return t.dk>=200&&t.dk<=299||304===t.dk}var il=class t extends gA{lk(t){return this.WT(this.fk,t)}Fy(){return new t({lk:this.hk(),vk:this.vk},this)}constructor(t,i){let e,s,n,r,h;i?(e=i._k,s=i.fk,n=i.dk,r=i.gk,h=i.pk):(e=[],s=Bi.LT,n=200,r="OK",h=!1);const o=t.vk,a=new cc(t._k||e),u=t.fk||s,c=t.wk||(i&&i.vk===o?i.wk:o.Yu),d=i?i.ck:null;super(hA(void 0!==t.lk?t.lk:d,t.jT||new Zc,a)),this._k=void 0,this.vk=void 0,this.wk=void 0,this.fk=void 0,this.dk=void 0,this.gk=void 0,this.pk=void 0,this._k=a,this.vk=o,this.wk=c,this.fk=u,this.dk=void 0!==t.dk?t.dk:n,this.gk=void 0!==t.gk?String(t.gk):r,this.pk=t.pk||h}};r();var Qe=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),q=function(t){return t.yk="",t.bk="manifest",t.Ak="segment",t.Sk="preload-hint",t.Tk="content-protection",t}({}),he=function(t){return t.yk="",t.Ek="initialization-segment",t.xk="fairplay-license",t.Pk="fairplay-certificate",t.Ik="widevine-license",t.Ck="widevine-certificate",t.Rk="playready-license",t.Dk="clearkey-license",t.Nk="aes128-key",t}({}),$a=function(t){return t.yk="",t.Bk="audio",t.Mk="video",t.LT="text",t.Lk="image",t}({}),mA=function(t){return t.Ok="same-origin",t.Fk="no-cors",t.Uk="cors",t.Vk="navigate",t}({}),ro=class{constructor(t,i){this.XT=void 0,this._k=void 0,this.Hk=void 0,this.fk=void 0,this.Wk=void 0,this.qk=void 0,this.Yg=void 0,this.Km=void 0,this.zk=void 0,this.Gk=void 0,this.Yu=void 0,this.Xk=void 0,this.jk=void 0,this.Qk=void 0,this.Kk=void 0,this.Yk=void 0;const e=t.Yu;let s,n,r,h,o,a,u,c,d,l,f,v,_,g,p;var m,w,y;i?(s=i.XT,n=i._k,r=i.Hk,h=i.fk,o=i.Wk,a=i.qk,u=i.Yg,c=i.Km,d=i.zk,l=i.Gk,f=i.Xk,v=i.jk,_=i.Qk,g=i.Kk,p=i.Yk):(s=null,n={},r="GET",h=Bi.LT,o=0,a=0,c="",d="",l="",f=!1,_=void 0,g=!1,p=void 0),this.Yu=e,this.XT=t.XT||s,this._k=new cc(t._k||n),this.Hk=t.Hk||r,this.fk=t.fk||h,this.Wk=void 0!==t.Wk?Number(t.Wk)||0:o,this.qk=void 0!==t.qk?Number(t.qk)||0:a,this.Yg=t.Yg||u||(new Zc).Yg,this.Km=t.Km||c,this.zk=t.zk||d,this.Gk=t.Gk||l,this.Xk=void 0!==t.Xk?Boolean(t.Xk):f,this.jk=t.jk||v,this.Qk=null!=(m=t.Qk)?m:_,this.Kk=null!=(w=t.Kk)?w:g,this.Yk=null!=(y=t.Yk)?y:p}},wA=class{vk(t){const i=function(t){return new il({lk:null,_k:{},vk:t,wk:t.Yu,fk:t.fk,dk:0,gk:d.Gw})}(new ro(t));return Promise.resolve(i)}Jk(t){}kn(){}};var yA=class t{static get Zk(){return t.$k||(t.$k=new t(new wA)),t.$k}vk(t){const i=this.tE(t);return this.iE.vk(i)}Jk(t){return this.iE.Jk(this.eE(t))}tE(i){let e=new ro(i);if(!this.sE){const i=t.nE(e.Yu);e=new ro({Yu:i},e)}return e}eE(i){let e=i.Yu;return this.sE||(e=t.nE(e)),{Yu:e,XT:i.XT}}static nE(t){return zd.Bm&&Xt(t,"http://")?t.replace(":","s:"):t}kn(){this.iE.kn()}constructor(t,i=!0){this.iE=void 0,this.sE=void 0,this.iE=t,this.sE=i}};function bA(t,i){const e=zd.Dh(t);return AA(e,i),e.toString()}function AA(t,i){for(const e of w.keys(i))t.searchParams.set(e,i[e])}function Vn(t,i){let e=zd.Pm(t);return i&&!Rc(e,"/")&&(e+="/"),e}yA.$k=void 0,r(),r(),r();var SA=/cache:(.+)?(?=&|$)/;function TA(t){if(!Xt(t,"http://webcache.googleusercontent.com/search?q=cache:"))return"";const i=zd.Dh(t).search.match(SA);return i&&i.length>1?i[1]:""}function kA(t){return zd.Dh(".",t)}r(),r();var EA=function(t){return t.rE="HttpOpenError",t.hE="HttpResponseError",t.oE="HttpTimeoutError",t}({}),xA=class extends Qr{get vk(){return this.aE}constructor(t,i,e){super(i,e),this.aE=void 0,this.aE=t}},PA=class extends xA{get name(){return EA.rE}constructor(t,i){super(t,"Error while opening "+t.Yu+".",i)}};r();var ir=class extends xA{get name(){return EA.hE}get uE(){return this.cE}constructor(t,i,e){super(t.vk,null!=e?e:function(t){return"Error while loading "+t.vk.Yu+", status code "+t.dk}(t),i),this.cE=void 0,this.cE=t}};r();var Ri=class extends xA{get name(){return EA.oE}constructor(t,i){super(t,function(t){return"Request for "+t.Yu+" timed out after "+t.Wk+" seconds."}(t),i)}};r();var IA=self.fetch,CA=self.Request,RA=self.Response,DA=self.Headers,NA=self.ReadableStream,BA=self.AbortSignal,MA=self.AbortController,LA=Oc(()=>{try{return jd(IA)&&I(CA)&&I(RA)&&I(DA)&&"forEach"in DA.prototype&&Tg()}catch(t){return!1}}),OA=["http:","https:"];var FA=Oc(()=>{try{return LA()&&I(BA)&&I(MA)&&"signal"in CA.prototype}catch(t){return!1}}),UA=Oc(()=>{try{return LA()&&I(NA)&&"body"in RA.prototype&&!zs.e_}catch(t){return!1}});function Ei(t){return t instanceof xA}function Qn(t){return t instanceof ir}function VA(t){return t instanceof Ri}function HA(t,i){const e=t._k.has("content-length")?Number(t._k.get("content-length")):void 0;let s;return s=t.YT?function(t,i,e){return t.pipeThrough(new Yb(new WA(i,e)))}(t.zT(),i,e):async function(t,i,e){await Promise.resolve(),i(0,e);const s=await t,n=s.byteLength;return i(n,null!=e?e:n),s}(t.qT(),i,e),new il({lk:s,vk:t.vk},t)}r(),r();var WA=class{transform(t,i){this.dE+=t.byteLength,this.lE(this.dE,this.fE),i.enqueue(t)}flush(t){var i;this.lE(this.dE,null!=(i=this.fE)?i:this.dE)}constructor(t,i){this.lE=void 0,this.fE=void 0,this.dE=void 0,this.lE=t,this.fE=i,this.dE=0}};var qA=class{async vE(){const t=this.aE;let i,e;t.Wk&&(this._E=u(()=>{this.gE=!0,this.hT.Zg()},t.Wk),this.hT.Yg.Qg(()=>{c(this._E)}));try{i=IA(t.Yu,{method:t.Hk,headers:t._k.OT(),body:t.XT,credentials:t.Xk?"include":"same-origin",signal:XA(this.hT.Yg),mode:t.Qk,keepalive:t.Yk})}catch(i){throw new PA(t,i)}try{e=await i}catch(t){const i=this.pE(t);throw Ce(i)&&this.hT.Zg(),i}const s=e.url||t.Yu,n=0===e.status&&"file:"===function(t){return zd.Dh(t).protocol}(s)?200:e.status,r=new zA(this,e,this.hT);let h=new il({lk:r,vk:t,fk:t.fk,_k:new cc(e.headers),dk:n,gk:e.statusText,wk:s});if(!pA(h))throw new ir(h);return t.jk&&(h=HA(h,t.jk)),h}pE(t){return Ei(t)?t:Ce(t)?this.gE?new Ri(this.aE):new Qc(t.message,t):this.cE?new ir(this.cE,t):new PA(this.aE,t)}constructor(t){this.uE=void 0,this.aE=void 0,this.hT=new Zc,this.cE=void 0,this._E=0,this.gE=!1,this.aE=t,this.hT.$g(t.Yg),this.uE=this.vE()}},zA=class t extends Qi{get QT(){return this.mE.bodyUsed}get YT(){return it(this.mE.body)}ZT(){return this.$T.Yy}HT(t){return this.ek(this.mE.text(),t)}qT(t){return this.ek(this.mE.arrayBuffer(),t)}zT(){const t=this.mE.body;return t?this.nk(t):iA(this.qT().then($b),this.hT)}hk(){const i=this.mE.clone(),[e,s]=this.hT.tp();return this.hT=e,new t(this.wE,i,s)}ek(t,i){i&&this.hT.$g(i);let e=ua(Promise.resolve(t),this.hT.Yg).catch(t=>{throw this.wE.pE(t)});return e=Cu(e,this.hT),this.$T.$g(e.then(gs)),e}nk(t){return new Kb(new jA(t,t=>this.wE.pE(t),this.hT,this.$T),{highWaterMark:0})}constructor(t,i,e){super(),this.wE=void 0,this.mE=void 0,this.hT=void 0,this.$T=new Ga,this.wE=t,this.mE=i,this.hT=e,this.$T.Yy.catch(gs)}},GA="abort";function XA(t){if(!FA())return;const i=new MA;if(t.Hg)i.abort();else if(!t.Wg){const e=()=>{s(),i.abort()},s=()=>{i.signal.removeEventListener(GA,e),t.jg(e),t.Kg(s)};i.signal.addEventListener(GA,e),t.Xg(e),t.Qg(s)}return i.signal}var jA=class{start(t){this.Wd=this.yE.getReader()}async pull(t){let i;try{i=await ua(this.Wd.read(),this.hT.Yg)}catch(i){const e=this.bE(i);return this.$T.Ky(e),this.hT.Zg(),this.Wd.cancel(e).catch(gs),void t.error(e)}i.done?(this.$T.Qy(),this.hT.Zg(),t.close()):t.enqueue(i.value)}cancel(t){return this.hT.Zg(),this.$T.Ky(t),this.Wd.cancel(t)}constructor(t,i,e,s){this.yE=void 0,this.bE=void 0,this.hT=void 0,this.$T=void 0,this.Wd=void 0,this.yE=t,this.bE=i,this.hT=e,this.$T=s}};r();var QA=class{get uE(){return this.AE.Yy}vE(){const t=this.SE,i=this.aE;if(i.Yg.Hg)return this.TE();t.onreadystatechange=()=>this.kE(),t.onprogress=t=>this.lE(t),t.onload=()=>this.EE(),t.onloadend=()=>this.xE(),t.onerror=()=>this.PE(),t.ontimeout=()=>this.CE(),t.onabort=()=>this.TE(),t.open(i.Hk,i.Yu,!0),t.withCredentials=Boolean(i.Xk),"responseType"in t&&i.fk&&(i.fk===Bi.LT?t.responseType="text":t.responseType="arraybuffer"),i._k.forEach((i,e)=>{t.setRequestHeader(e,i)}),i.Wk&&(t.timeout=i.Wk),this.hT.Yg.Xg(this.RE);const e=i.XT;e?t.send(e):t.send()}kE(){const t=this.SE;void 0!==t&&t.readyState>=2&&!this.DE&&(this.DE=!0,this.NE())}NE(){var t;const i=this.SE,e=function(t){const i=new cc,e=t.replace(/\r?\n[\t ]+/g," ");return e.split(/\r?\n/).forEach(t=>{const e=t.split(":"),s=e.shift().trim();if(s){const t=e.join(":").trim();i.append(s,t)}}),i}(i.getAllResponseHeaders()||""),s=this.aE;var n;this.BE=new Ga,this.cE=new il({vk:s,fk:s.fk,lk:this.BE.Yy,dk:i.status,gk:i.statusText,_k:e,wk:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.AE)||t.Qy(this.cE)}EE(){var t;const i=this.SE;if(void 0===i)return;let e=i.response;if(!it(e)){const t=this.aE.fk;e=t===Bi.LT?i.responseText:t===Bi.NT?new ArrayBuffer(0):{}}null==(t=this.BE)||t.Qy(e)}xE(){this.kn()}lE(t){void 0!==this.SE&&(null==this.aE.jk||this.aE.jk.call(this.aE,t.loaded,t.lengthComputable?t.total:void 0))}PE(){const t=new m("Network request failed");this.cE?this.Ts(new ir(this.cE,t)):this.Ts(new PA(this.aE,t))}CE(){this.Ts(new Ri(this.aE))}TE(){this.Ts(new Qc),this.kn()}Ts(t){var i,e;null==(i=null!=(e=this.BE)?e:this.AE)||i.Ky(t)}kn(){this.SE=void 0,this.cE=void 0,this.AE=void 0,this.BE=void 0,this.hT.zg()}constructor(t){this.SE=void 0,this.aE=void 0,this.hT=new Zc,this.cE=void 0,this.AE=new Ga,this.BE=void 0,this.DE=!1,this.RE=()=>{var t;this.TE(),null==(t=this.SE)||t.abort()},this.aE=t,this.hT.$g(t.Yg),this.SE=new ud,this.vE()}};function KA(t,i,e){return new Promise((s,n)=>{if(e&&e.Hg)return n(new Qc);const r=t=>{o(),s(t)},h=()=>{o(),n(new Qc)},o=()=>{t.removeEventListener(i,r),e&&e.jg(h)};t.addEventListener(i,r),e&&e.Xg(h)})}r();var YA=class{vk(t){return function(t){if(!LA()||!function(t){try{return OA.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Yu))return!1;if(!UA()&&t.jk)return!1;if(!t.Kk&&t.Hk!==Qe.POST){if(zs.S_&&zs.d_<=68)return!1;if(zs.w_)return!1}return!0}(t)?new qA(t).uE:new QA(t).uE}Jk(t){const i=s.navigator;if(i&&i.sendBeacon)i.sendBeacon(t.Yu,Hb([t.XT],{type:t.GT}));else{const i=t.GT?{"Content-type":t.GT}:void 0;this.vk(new ro({Hk:Qe.POST,Yu:t.Yu,XT:t.XT,_k:i,Qk:mA.Fk})).then(t=>{Wr(t.qT())},gs)}}kn(){}};r(),r();var Xu=function(t){return t[t.LE=1]="LE",t[t.OE=2]="OE",t[t.LT=3]="LT",t[t.FE=4]="FE",t[t.UE=9]="UE",t}({});function JA(t){return 1===t.VE}function ZA(t){return 3===t.VE}r();var $A=class extends Qr{constructor(t){super("Invalid XML",t)}},tS=class{HE(t){const i=new DOMParser;let e;try{e=i.parseFromString(t,"text/xml")}catch(t){throw new $A(t)}if(!e||e.getElementsByTagName("parsererror").length>0)throw new $A;return new oS(e)}},iS=class t{get VE(){return Xu.OE}get WE(){var t;return null!=(t=this.qE.localName)?t:cS(this.qE.nodeName)}get l(){return this.qE.nodeName}get zE(){var t;return null!=(t=this.qE.namespaceURI)?t:void 0}get GE(){var t;return null!=(t=this.qE.prefix)?t:void 0}get XE(){return this.qE.nodeValue}jE(t){return this.qE.isEqualNode(t.qE)}QE(i){return new t(this.qE.cloneNode(i))}constructor(t){this.qE=void 0,this.qE=t}},eS=class{get KE(){return void 0===this.YE&&(this.YE=function(t){const i=[];for(let e=0;eaS(i)&&i.$E===t)}tx(t,i){return this.KE.filter(e=>aS(e)&&e.WE===i&&e.zE===t)}get ix(){return this.JE}sx(t){this.JE.appendChild(t.ix),this.YE&&this.YE.push(t)}jE(t){return this.JE.isEqualNode(t.ix)}constructor(t){this.JE=void 0,this.YE=void 0,this.JE=t}},sS=class t extends eS{get VE(){return Xu.LE}get WE(){var t;return null!=(t=this.JE.localName)?t:cS(this.JE.nodeName)}get zE(){var t;return null!=(t=this.JE.namespaceURI)?t:void 0}get GE(){var t;return null!=(t=this.JE.prefix)?t:void 0}get $E(){return this.JE.nodeName}get nx(){return function(t){const i=[];for(let e=0;e{this.eI(t)||this.So(t)},this.Lx=t,t.lw(this.nI)}};r(),r(),r();var N=function(t){return t.rI="hI",t.oI="aI",t}({});r(),r(),r(),r();var Oi=class extends gp{get Ca(){return this.hu||(this.hu=this.xa()),this.hu}constructor(t,i){super(t,i),this.hu=void 0}};function fS(t){return Boolean(t&&t.Ca)}var Fs=class extends Oi{constructor(t){super(t)}},Eh=class extends gp{constructor(t){super(t)}},vS=class extends Fs{xa(){return new _S(this.Ht.Ca)}constructor(t){super(N.rI),this.Ht=void 0,this.Ht=t}},_S=class extends Eh{constructor(t){super("addtrack"),this.track=void 0,this.track=t}};r();var gS=class extends Fs{xa(){return new pS(this.Ht.Ca)}constructor(t){super(N.oI),this.Ht=void 0,this.Ht=t}},pS=class extends Eh{constructor(t){super("removetrack"),this.track=void 0,this.track=t}};r();var Te=function(t){return t.uI="cI",t.dI="lI",t.fI="vI",t._I="gI",t.pI="mI",t.wI="yI",t.pa="bI",t.AI="TI",t.kI="EI",t.xI="er",t.II="CI",t.RI="DI",t.QUALITY_UNAVAILABLE="qualityunavailable",t.NO_QUALITY="noquality",t}({}),mS=class extends Ne{get NI(){return this.BI}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}get V(){return this.BI.length}MI(t){return this.BI[t]}tt(t){return!(!t||Ct(this.BI,t))&&(this.BI.push(t),this.hu&&this.hu.push(t.Ca),t.wn(Te.pa,this.Rs),this.So(new vS(t)),!0)}it(t){if(!t)return!1;const i=this.BI.indexOf(t);return!(i<0)&&(Ra(this.BI,i),this.hu&&Ra(this.hu,i),t.mn(Te.pa,this.Rs),this.So(new gS(t)),!0)}LI(t){return Ct(this.BI,t)}hr(){const t=this.BI;for(let i=t.length-1;i>=0;i-=1)this.it(t[i])}kn(){this.hr(),this.Vo()}constructor(){super(),this.BI=[],this.hu=void 0}};r();var Rh=class extends Fs{xa(){return new wS(this.Ht.Ca)}constructor(t){super(Te.pa),this.Ht=void 0,this.Ht=t}},wS=class extends Eh{constructor(t){super("change"),this.track=void 0,this.track=t}},yS=class extends mS{get OI(){return this.FI}set OI(t){const i=this.FI;if(t!==i){if(i){this.UI(i);for(const e of i.NI)t&&t.LI(e)||this.it(e)}if(this.FI=t,t){const i=[];for(const e of t.NI)this.tt(e),this.VI(e)&&i.push(e);this.HI(t);for(const t of i)t.So(new Rh(t))}}}HI(t){t.wn(N.rI,this.WI),t.wn(N.oI,this.qI)}UI(t){t.mn(N.rI,this.WI),t.mn(N.oI,this.qI)}kn(t){!t&&this.FI&&this.FI.kn(),super.kn()}constructor(){super(),this.FI=void 0,this.WI=t=>{const i=t.Ht;this.tt(i)},this.qI=t=>{const i=t.Ht;this.it(i)}}};r(),r(),r();var bS=w.freeze||pc;function AS(t,i,e){w.defineProperty(t,i,{writable:!1,enumerable:!0,value:e})}function SS(t){return bS(t)}function Gi(t,i){for(const e of w.getOwnPropertyNames(i))w.defineProperty(t,e,w.getOwnPropertyDescriptor(i,e));return t}function ru(t){if(Gd(t)){const i={};for(const e in t)_u.call(t,e)&&(i[e]=ru(t[e]));return i}if(hi(t)){const i=new Array(t.length);for(let e=0;et.Ca);return e.item=i=>{const e=0|i,s=t.MI(e);return s&&s.Ca||void 0},e.addEventListener=(t,e)=>{i.wn(t,e)},e.removeEventListener=(t,e)=>{i.mn(t,e)},i=new _p(e),t.wn(CS,t=>i.So(t.Ca)),e}r();var Je=function(t){return t[t.zI=0]="zI",t[t.GI=1]="GI",t[t.XI=2]="XI",t[t.jI=3]="jI",t[t.QI=4]="QI",t[t.TRANSCRIBES_SPOKEN_DIALOG=5]="TRANSCRIBES_SPOKEN_DIALOG",t[t.DESCRIBES_MUSIC_AND_SOUND=6]="DESCRIBES_MUSIC_AND_SOUND",t[t.KI=7]="KI",t}({});function DS(t){switch(t){case 0:return"caption";case 2:return"sign";case 1:return"description";case 3:return"enhanced audio intelligibility";case 4:return"easy reader";case 5:return"transcribes spoken dialog";case 6:return"describes music and sound";case 7:return"describes video"}}function NS(){}function cs(t){const i=[Te.xI,Te.pa,Te.II,Te.RI,Te.QUALITY_UNAVAILABLE];let e;const s={get activeQuality(){return t.YI&&t.YI.Ca},get enabled(){return t.Rt},set enabled(i){t.Rt=Th(i)},get id(){return t.o},get uid(){return t.JI},get kind(){return t.Lt},get label(){return t.Th},set label(i){t.Th=Ts(i)},get accessibility(){var i,e;return null!=(e=null==(i=t.ZI)?void 0:i.map(DS))?e:[]},get language(){return t.bs},get qualities(){return t.$I.Ca},set targetQuality(i){let e;e=i?function(t,i){const e=[];for(const s of t.$I.NI)for(const t of i)s.Ca===t&&e.push(s);return e}(t,hi(i)?i:[i]):[],e.length>0?t.tC=e:t.tC=void 0},get targetQuality(){if(t.tC)return 1===t.tC.length?t.tC[0].Ca:t.tC.map(t=>t.Ca)},addEventListener(t,i){const s=vu(t,Ts);e.wn(s,i)},removeEventListener(t,i){const s=vu(t,Ts);e.mn(s,i)}};return e=new _p(s),t.wn(i,t=>e.So(t.Ca)),w.defineProperty(s,"constructor",{value:NS}),s}function BS(){}function MS(t){const i=RS(t);return w.defineProperty(i,"constructor",{value:BS}),i}var Gh=class extends yS{xa(){return MS(this)}VI(t){return t.Rt}};r(),r(),r();var xh=function(t){return t.Nh="disabled",t.iC="hidden",t.Kn="showing",t}({});function LS(t){if("string"==typeof t){const i=t.toLowerCase();switch(i){case"disabled":case"hidden":case"showing":return i}}else if("number"==typeof t)switch(t){case 0:return"disabled";case 1:return"hidden";case 2:return"showing"}return"disabled"}r();var hc=function(t){return t.ma="error",t}({});function OS(){}function qo(t){const i=[Te.pa,Te.xI,Te.uI,Te.dI,Te._I,Te.pI,Te.fI,Te.wI,Te.AI,Te.kI],e=[hc.ma];let s;const n={get kind(){return t.Lt},get label(){return t.Th},set label(i){t.Th=Ts(i)},get language(){return t.bs},get id(){return t.o},get uid(){return t.JI},get inBandMetadataTrackDispatchType(){return t.eC},get mode(){return t.Qk},set mode(i){i!==xh.Kn&&i!==xh.iC&&i!==xh.Nh||t.sC(i)},get forced(){return Boolean(t.nC)},get accessibility(){var i,e;return null!=(e=null==(i=t.ZI)?void 0:i.map(DS))?e:[]},get type(){return t.Km},get readyState(){return t.AP},get cues(){return t.Qk===xh.Nh?null:t.L.Ca},get activeCues(){return t.Qk===xh.Nh?null:t.q.Ca},get src(){return t.rC||""},addEventListener(t,i){const e=vu(t,Ts);s.wn(e,i)},removeEventListener(t,i){const e=vu(t,Ts);s.mn(e,i)}};return s=new _p(t),t.wn(i,t=>s.So(t.Ca)),t.wn(e,t=>s.So(t)),w.defineProperty(n,"constructor",{value:OS}),n}function FS(){}function US(t){const i=RS(t);return w.defineProperty(i,"constructor",{value:FS}),i}var ai=class extends yS{xa(){return US(this)}VI(t){return t.Qk===xh.Kn}};r(),r();var VS=class extends Ne{get hC(){}get oC(){}get aC(){}get uC(){return!1}get cC(){}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=HS(this)}dC(){}constructor(...t){super(...t),this.hu=void 0}};function HS(t){return{goLive:()=>t.dC(),get isLive(){return t.uC},get latencies(){return t.hC},get videoLatencies(){return t.oC},get audioLatencies(){return t.aC},get manifest(){return t.cC},addEventListener(i,e){t.wn(qS(i),e)},removeEventListener(i,e){t.mn(qS(i),e)}}}var WS=["golive","latencyrecoveryseek"];function qS(t){const i=vu(t,Ts);return(Q(i)?[i]:i).filter(t=>Ct(WS,t))}var zS=class extends Ne{set OI(t){const i=this.FI;t!==i&&(i&&this.UI(i),t&&this.HI(t),this.FI=t)}get OI(){return this.FI}get Ca(){return this.hu||(this.hu=HS(this)),this.hu}HI(t){t.wn(WS,this.Rs)}UI(t){t.mn(WS,this.Rs)}dC(){var t;null==(t=this.FI)||t.dC()}get hC(){var t;return null==(t=this.FI)?void 0:t.hC}get oC(){var t;return null==(t=this.FI)?void 0:t.oC}get aC(){var t;return null==(t=this.FI)?void 0:t.aC}get uC(){return!!this.FI&&this.FI.uC}get cC(){var t;return null==(t=this.FI)?void 0:t.cC}kn(){this.Vo(),this.FI&&this.UI(this.FI),this.FI=void 0}constructor(){super(),this.FI=void 0,this.hu=void 0,this.FI=void 0}};r(),r();var GS=function(t){return t.AUTO="auto",t.MANUAL="manual",t.DISABLED="disabled",t}({});function XS(t){return{appID:t&&t.appID?Ts(t.appID):"8E80B9CE"}}r(),r();var Fa=function(t){return t.Fk="",t.lC="anonymous",t.fC="use-credentials",t}({}),Hi=function(t){return t.vC="application/dash+xml",t._C="application/vnd.apple.mpegurl",t.gC="application/x-mpegurl",t.pC="video/mp4",t.mC="application/vnd.theoplayer.hesp+json",t.wC="application/vnd.theo.hesp+json",t.yC="millicast",t.bC="theolive",t}({});function jS(t){if(null!==t)return t}function QS(t){const i={apiKey:t.apiKey,integration:t.integration,streamActivityMonitorID:jS(t.streamActivityMonitorID),adTagParameters:Mc(t.adTagParameters)?t.adTagParameters:{},authToken:jS(t.authToken),omidAccessModeRules:jS(t.omidAccessModeRules)};if(t.enableNonce&&(i.enableNonce=!0),"vod"===(null==t?void 0:t.availabilityType)||function(t){const i=t;return Boolean(i.videoID&&i.contentSourceID)}(t)){const e=t.videoID,s=t.contentSourceID;return e?s?Y({},i,{availabilityType:"vod",videoID:e,contentSourceID:s}):void zd.um("A VOD DAI configuration was provided without valid contentSourceID which is required."):void zd.um("A VOD DAI configuration was provided without valid videoID which is required.")}if("live"===(null==t?void 0:t.availabilityType)||function(t){const i=t;return Boolean(i.assetKey)}(t)){const e=t.assetKey;return e?Y({},i,{availabilityType:"live",assetKey:e}):void zd.um("A Live DAI configuration was provided without valid assetKey which is required.")}zd.um("A DAI configuration was provided without a valid availabilityType which is required.")}function KS(t){return"google-dai"===t.integration?QS(t):Y({},t,{integration:String(t.integration)})}r(),r(),r(),r(),r(),r();var Uh,Br="titanium",YS="conax",JS="ezdrm",ZS="irdeto",$S="vudrm",tT="verimatrix",iT="keyos",eT="drmtoday",sT="expressplay",nT="azure",rT="xstream",hT="vimond",oT="axinom",aT="uplynk",uT="comcast",cT="custom";function dT(t,i){if(null==t)return{};var e,s,n={},r=w.keys(t);for(s=0;s=0||(n[e]=t[e]);return n}function lT(t){return it(t.token&&t.deviceId)}function fT(t){var i;const e=null==(i=t.fairplay)?void 0:i.headers;return void 0!==e&&it(e.PreAuthorization)}function vT(t){const i=t;return lT(i)&&""!==i.token&&""!==i.deviceId&&!fT(i)}r(),r(),r(),r(),r(),function(t){t.AC=!1,t.SC=!1,t.TC=!1,t.kC=!1,t.LOG_ADS_DETAILS=!1,t.LOG_CHROMECAST_DETAILS=!1,t.LOG_CUSTOM_DRM=!1,t.LOG_BUFFERING_VIDEO_MAIN=!1,t.LOG_BUFFERING_VIDEO_SELECTION=!1,t.LOG_BUFFERING_AUDIO_MAIN=!1,t.LOG_BUFFERING_AUDIO_SELECTION=!1,t.EC=!1,t.xC=!1,t.LOG_LCEVC_DETAILS=!1}(Uh||(Uh={})),r();var fs=class extends as{get name(){return"ContentProtectionError"}constructor(t,i,e,s,n,r,h,o){super(t,i,e),this.url=void 0,this.status=void 0,this.statusText=void 0,this.response=void 0,this.systemCode=void 0,this.url=s,this.status=n,this.statusText=r,this.response=h,this.systemCode=o}};r();var _T=class{get IC(){return this.RC}get xS(){return this.yS}DC(t){return function(t){const i=t.onCertificateRequest;if(void 0!==i&&"function"!=typeof i)throw new g("ContentProtectionIntegration.onCertificateRequest is not a function.");const e=t.onCertificateResponse;if(void 0!==e&&"function"!=typeof e)throw new g("ContentProtectionIntegration.onCertificateResponse is not a function.");const s=t.onLicenseRequest;if(void 0!==s&&"function"!=typeof s)throw new g("ContentProtectionIntegration.onLicenseRequest is not a function.");const n=t.onLicenseResponse;if(void 0!==n&&"function"!=typeof n)throw new g("ContentProtectionIntegration.onLicenseResponse is not a function.");const r=t.extractFairplayContentId;if(void 0!==r&&"function"!=typeof r)throw new g("ContentProtectionIntegration.extractFairplayContentId is not a function.");return t}(this.NC.build(t))}constructor(t,i,e){this.RC=void 0,this.yS=void 0,this.NC=void 0,this.RC=t,this.yS=i,this.NC=e}};r();var gT=function(t){return t.FAILED="FAILED",t.OVERRIDDEN="OVERRIDDEN",t.SUCCEEDED="SUCCEEDED",t}({}),A=class{registerContentProtectionIntegration(t,i,e){switch(this.BC(t,i,e)){case gT.FAILED:throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The keySystem should be 'widevine', 'playready' or 'fairplay', but was "+i+".");case gT.OVERRIDDEN:{const e=FT(i);zd.um("Warning: Overwriting an earlier registered integration for "+t+" and "+e+".");break}case gT.SUCCEEDED:FT(i);0;break}}BC(t,i,e){const s=FT(i);if(!s)return gT.FAILED;let n=gT.SUCCEEDED;for(const i of this.MC.slice())i.IC===t&&i.xS===s&&(n=gT.OVERRIDDEN,_e(this.MC,i));return this.MC.push(new _T(t,s,e)),n}LC(t,i){return void 0!==this.OC(t,i)}FC(t,i,e){const s=this.OC(t,i);if(!s)throw m("No ContentProtectionIntegrationInit was found for integration id "+t+" and key system "+i);return s.DC(e)}OC(t,i){for(const e of this.MC)if(e.IC===t&&(!i||e.xS===i))return e}constructor(){this.MC=[]}};A.VC=new A,r(),r();var ui=function(t){return t.HC="moov",t.WC="mvhd",t.qC="trak",t.zC="tkhd",t.GC="mdia",t.XC="mdhd",t.jC="hdlr",t.QC="minf",t.KC="stbl",t.YC="stsd",t.JC="stsc",t.ZC="mvex",t.$C="trex",t.tR="avc1",t.iR="avcC",t.eR="hev1",t.sR="hvc1",t.nR="hvcC",t.rR="vp09",t.hR="vpcC",t.oR="av01",t.aR="av1C",t.uR="dvcC",t.cR="dvvC",t.dR="dvwC",t.lR="dac3",t.fR="dec3",t.vR="dvav",t._R="dva1",t.gR="dvhe",t.pR="dvh1",t.mR="ac-3",t.wR="ec-3",t.yR="colr",t.bR="pasp",t.AR="mp4a",t.SR="esds",t.kR="fLaC",t.ER="dfLa",t.xR="wvtt",t.PR="vttC",t.IR="vlab",t.RR="enca",t.DR="encv",t.NR="moof",t.MR="mfhd",t.LR="traf",t.OR="tfhd",t.FR="trun",t.UR="tfdt",t.HR="senc",t.WR="mdat",t.qR="pssh",t.zR="emsg",t.GR="sidx",t.XR="styp",t.jR="ftyp",t.QR="sinf",t.KR="frma",t.YR="schi",t.JR="tenc",t}({}),pT=function(t){return t.ON_SCREEN_COLOURS="nclx",t.RESTRICTED_ICC_PROFILE="rICC",t.UNRESTRICED_ICC_PROFILE="prof",t}({}),bo=function(t){return t[t.BASE_DATA_OFFSET_PRESENT=1]="BASE_DATA_OFFSET_PRESENT",t[t.SAMPLE_DESCRIPTION_INDEX_PRESENT=2]="SAMPLE_DESCRIPTION_INDEX_PRESENT",t[t.DEFAULT_SAMPLE_DURATION_PRESENT=8]="DEFAULT_SAMPLE_DURATION_PRESENT",t[t.DEFAULT_SAMPLE_SIZE_PRESENT=16]="DEFAULT_SAMPLE_SIZE_PRESENT",t[t.DEFAULT_SAMPLE_FLAGS_PRESENT=32]="DEFAULT_SAMPLE_FLAGS_PRESENT",t[t.DURATION_IS_EMPTY=65536]="DURATION_IS_EMPTY",t[t.DEFAULT_BASE_IS_MOOF=131072]="DEFAULT_BASE_IS_MOOF",t}({}),Rr=function(t){return t[t.DATA_OFFSET_PRESENT=1]="DATA_OFFSET_PRESENT",t[t.FIRST_SAMPLE_FLAGS_PRESENT=4]="FIRST_SAMPLE_FLAGS_PRESENT",t[t.SAMPLE_DURATION_PRESENT=256]="SAMPLE_DURATION_PRESENT",t[t.SAMPLE_SIZE_PRESENT=512]="SAMPLE_SIZE_PRESENT",t[t.SAMPLE_FLAGS_PRESENT=1024]="SAMPLE_FLAGS_PRESENT",t[t.SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT=2048]="SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT",t}({});r();var yu=class t{ZR(){return Cl(this.lk,this.$R)}tD(){return Rn(this.lk,this.$R)}iD(){return function(t,i,e){void 0===e&&(e=!1);const s=t.getInt16(i.ac,e);return i.Ly(2),s}(this.lk,this.$R)}eD(){return ti(this.lk,this.$R)}sD(){return function(t,i,e){void 0===e&&(e=!1);const s=t.getInt32(i.ac,e);return i.Ly(4),s}(this.lk,this.$R)}nD(){return qt(this.lk,this.$R)}rD(t){return kt(this.lk,this.$R,t)}hD(t){return function(t,i,e){const s=[];for(let n=0;ni.byteLength){const t=a;return e.Oy(n),{vD:!1,bD:t}}const u={Km:h.Km,ac:n,lk:new yu(Wu(i,n,a),new oi(h.SD))};return e.Oy(a),{vD:!0,gD:u}}static wD(t,i){const e=i.ac;if(!Hp(t,i,8)){return{vD:!1,bD:i.ac+8}}let s=ti(t,i),n=jp(t,i,4);if(1===s){if(!Hp(t,i,8)){const t=i.ac+8;return i.Oy(e),{vD:!1,bD:t}}s=qt(t,i).toNumber()}if("uuid"===n){if(!Hp(t,i,16)){const t=i.ac+16;return i.Oy(e),{vD:!1,bD:t}}n=jp(t,i,16)}return{vD:!0,yD:{Km:n,Wy:s,SD:i.ac-e}}}static TD(t,i,e){const s=t.lk,n=t.$R;let r=yi(ye(s),n.ac,s.byteLength);return e&&(r=nr(r)),n.Ly(r.byteLength),{Km:i,lk:r}}static kD(i,e,s){const n=i.eD(),{version:r,flags:h}=AT(n);return{Km:e,ED:r,xD:h,lk:t.TD(i,e,s).lk}}};function Wh(t,i){const e=ls(t,i);if(!e)throw new m("Missing "+i+" atom");return e}function ls(t,i){for(const e of t)if(e.Km===i)return e.lk}function bT(t,i){const e=[];for(const s of t)s.Km===i&&e.push(s.lk);return e}function AT(t){return{version:t>>24,flags:new Fp(16777215&t)}}var Hn=class t{static PD(i){const e=[],s=ha.lD(new yu(i,new oi));for(const i of s){const s=t.CD(i);s&&e.push(s)}return e}static RD(t){return ha.fD(t,new oi,!1).m.some(this.DD)}static ND(i){return bT(ha.lD(new yu(i,new oi)),ui.qR).map(t.BD)}static MD(i){return bT(ha.lD(i.lk),ui.qR).map(t.BD)}static DD(t){return t.Km===ui.jR||t.Km===ui.XR||t.Km===ui.HC||t.Km===ui.NR||t.Km===ui.WR||t.Km===ui.GR||t.Km===ui.zR}static CD(i){switch(i.Km){case ui.HC:return t.LD(i.lk);case ui.NR:return t.OD(i.lk,i.ac);case ui.WR:return t.FD(i.lk);case ui.GR:return t.UD(i.lk);case ui.zR:return t.VD(i.lk)}}static LD(i){const e=ha.lD(i),s=Wh(e,ui.WC),n=bT(e,ui.qC),r=ls(e,ui.ZC),h=t.HD(s),o=n.map(t.WD),a=r?t.qD(r):void 0;return{Km:ui.HC,yD:h,Z:o,zD:a}}static HD(t){const i=t.eD(),{version:e,flags:s}=AT(i),n=1===e?t.nD():t.eD(),r=1===e?t.nD():t.eD(),h=t.eD(),o=1===e?t.nD():t.eD(),a=t.eD(),u=t.tD()>>8;t.uD(2),t.uD(8);const c=t.hD(9);t.uD(24);const d=t.eD();return{Km:ui.WC,ED:e,xD:s,GD:n,XD:r,jD:h,ct:o,QD:a,OP:u,KD:c,YD:d}}static WD(i){const e=ha.lD(i),s=Wh(e,ui.zC),n=Wh(e,ui.GC),r=t.JD(s),h=t.ZD(n);return{Km:ui.qC,yD:r,$D:h}}static JD(t){const i=t.eD(),{version:e,flags:s}=AT(i),n=1===e?t.nD():t.eD(),r=1===e?t.nD():t.eD(),h=t.eD();t.uD(4);const o=1===e?t.nD():t.eD();t.uD(8);const a=t.iD(),u=t.iD(),c=t.iD()/256;t.uD(2);const d=t.hD(9),l=t.eD()/65536,f=t.eD()/65536;return{Km:ui.zC,tN:s.Uy(1),iN:s.Uy(2),eN:s.Uy(4),GD:n,XD:r,sN:h,ct:o,nN:a,rN:u,OP:c,KD:d,Ti:l,Mi:f}}static ZD(i){const e=ha.lD(i),s=Wh(e,ui.XC),n=Wh(e,ui.jC),r=Wh(e,ui.QC),h=t.hN(s),o=t.oN(n),a=t.aN(r);return{Km:ui.GC,yD:h,uN:o,cN:a}}static hN(t){const i=t.eD(),{version:e,flags:s}=AT(i),n=1===e?t.nD():t.eD(),r=1===e?t.nD():t.eD(),h=t.eD(),o=1===e?t.nD():t.eD();t.tD();return t.uD(2),{Km:ui.XC,ED:e,xD:s,GD:n,XD:r,jD:h,ct:o}}static oN(t){const i=t.eD(),{version:e,flags:s}=AT(i);t.uD(4);const n=t.oD(4);t.uD(12);const r=t.aD();return{Km:ui.jC,ED:e,xD:s,dN:n,l:r}}static aN(i){const e=Wh(ha.lD(i),ui.KC),s=t.lN(e);return{Km:ui.QC,fN:s}}static lN(i){const e=Wh(ha.lD(i),ui.YC),s=t.vN(e);return{Km:ui.KC,_N:s}}static vN(i){const e=i.eD(),{version:s,flags:n}=AT(e),r=(i.eD(),[]),h=ha.lD(i);for(const i of h){const e=t.gN(i.lk,i.Km);e&&r.push(e)}return{Km:ui.YC,ED:s,xD:n,pN:r}}static gN(i,e){let s=t.mN(i,e);return s||(s=t.wN(i,e),s||(e===ui.xR?t.yN(i):void 0))}static mN(i,e){return e===ui.AR?t.bN(i):e===ui.kR||e===ui.kR.toLowerCase()||e===ui.kR.toUpperCase()?t.AN(i):e===ui.RR?t.SN(i):e===ui.mR?t.TN(i):e===ui.wR?t.kN(i):void 0}static wN(i,e){return e===ui.tR?t.EN(i):e===ui.eR||e===ui.sR?t.xN(i,e):e===ui.rR?t.PN(i,e):e===ui.oR?t.CN(i,e):e===ui.DR?t.RN(i):e===ui.vR||e===ui._R||e===ui.gR||e===ui.pR?t.DN(i,e):void 0}static NN(t,i){t.uD(6);return{Km:i,BN:t.tD()}}static MN(i,e){const s=t.NN(i,e);i.uD(8);const n=i.tD(),r=i.tD();i.uD(2),i.uD(2);return Y({},s,{LN:n,ON:r,FN:i.eD()>>>16})}static UN(i,e){const s=t.NN(i,e);i.uD(2),i.uD(2),i.uD(12);const n=i.tD(),r=i.tD(),h=i.eD(),o=i.eD();i.uD(4);const a=i.tD();i.uD(32);const u=i.tD();return i.uD(2),Y({},s,{Ti:n,Mi:r,VN:h,HN:o,WN:a,qN:u})}static bN(i){const e=t.MN(i,ui.AR),s=Wh(ha.lD(i),ui.SR);return Y({},e,{zN:t.GN(s)})}static AN(i){const e=t.MN(i,ui.kR),s=Wh(ha.lD(i),ui.ER);return Y({},e,{XN:t.jN(s)})}static yN(i){const e=t.NN(i,ui.xR),s=ha.lD(i),n=Wh(s,ui.PR),r=t.QN(n),h=ls(s,ui.IR);return Y({},e,{KN:r,YN:h?t.JN(h):void 0})}static QN(t){return{Km:ui.PR,Cd:t.aD()}}static JN(t){return{Km:ui.IR,Th:t.aD()}}static GN(t){return ha.kD(t,ui.SR,!0)}static jN(t){return ha.kD(t,ui.ER,!0)}static EN(i){const e=t.UN(i,ui.tR),s=ha.lD(i),n=Wh(s,ui.iR),r=ls(s,ui.bR);return Y({},e,{ZN:t.$N(n),tB:r?t.iB(r):void 0})}static xN(i,e){const s=t.UN(i,e),n=Wh(ha.lD(i),ui.nR);return Y({},s,{eB:t.sB(n)})}static PN(i,e){const s=t.UN(i,e),n=Wh(ha.lD(i),ui.hR);return Y({},s,{nB:t.rB(n)})}static CN(i,e){const s=t.UN(i,e),n=ha.lD(i),r=Wh(n,ui.aR),h=t.hB(r),o=ls(n,ui.yR);return Y({},s,{oB:h,aB:o?t.uB(o):void 0})}static RN(i){const e=i.Fy(),s=t.UN(i,ui.DR),n=Wh(ha.lD(i),ui.QR),r=t.cB(n);return Y({},s,{dB:t.wN(e,r.fB.lB),vB:r})}static DN(i,e){const s=t.UN(i,e),n=ha.lD(i);return Y({},s,{_B:t.gB(n)})}static TN(i){const e=t.MN(i,ui.mR),s=Wh(ha.lD(i),ui.lR);return Y({},e,{pB:t.mB(s)})}static kN(i){const e=t.MN(i,ui.wR),s=Wh(ha.lD(i),ui.fR);return Y({},e,{wB:t.yB(s)})}static SN(i){const e=i.Fy(),s=t.MN(i,ui.RR),n=Wh(ha.lD(i),ui.QR),r=t.cB(n);return Y({},s,{dB:t.mN(e,r.fB.lB),vB:r})}static cB(i){const e=ha.lD(i),s=Wh(e,ui.KR),n=t.bB(s),r=Wh(e,ui.YR),h=t.AB(r);return{Km:ui.QR,fB:n,SB:h}}static bB(t){const i=t.oD(4);return{Km:ui.KR,lB:i}}static AB(i){const e=Wh(ha.lD(i),ui.JR),s=t.TB(e);return{Km:ui.YR,kB:s}}static TB(t){const i=ti(t.lk,t.$R),{version:e,flags:s}=AT(i),n=t.ZR()>0,r=t.ZR(),h=t.rD(16);return{Km:ui.JR,ED:e,xD:s,EB:n,xB:r,PB:h}}static $N(t){return ha.TD(t,ui.iR,!0)}static sB(t){return ha.TD(t,ui.nR,!0)}static gB(t){const i=ls(t,ui.uR);if(void 0!==i)return ha.TD(i,ui.uR,!0);const e=ls(t,ui.cR);if(void 0!==e)return ha.TD(e,ui.cR,!0);const s=ls(t,ui.dR);if(void 0!==s)return ha.TD(s,ui.dR,!0);throw m("Error parsing Dolby Vision configuration box.")}static mB(t){return ha.TD(t,ui.lR,!0)}static yB(t){return ha.TD(t,ui.fR,!0)}static rB(t){return ha.TD(t,ui.hR,!0)}static hB(t){return ha.TD(t,ui.aR,!0)}static uB(t){const i=t.oD(4);switch(i){case"nclx":return{IB:pT.ON_SCREEN_COLOURS,CB:t.tD(),RB:t.tD(),DB:t.tD(),NB:!!(128&t.ZR())};case"rICC":return{IB:pT.RESTRICTED_ICC_PROFILE};case"prof":return{IB:pT.UNRESTRICED_ICC_PROFILE};default:throw m("Could not parse ColourInformationBox: unknown type '"+i+"'.")}}static iB(t){const i=t.eD(),e=t.eD();return{Km:ui.bR,BB:i,MB:e}}static qD(i){const e=bT(ha.lD(i),ui.$C).map(t.LB);return{Km:ui.ZC,Z:e}}static LB(t){const i=t.eD(),{version:e,flags:s}=AT(i),n=t.eD(),r=t.eD(),h=t.eD(),o=t.eD(),a=t.eD();return{Km:ui.$C,ED:e,xD:s,sN:n,OB:r,FB:h,UB:o,VB:a}}static OD(i,e){const s=ha.lD(i),n=Wh(s,ui.MR),r=bT(s,ui.LR),h=t.HB(n),o=r.map(t.WB);return{Km:ui.NR,qB:e,yD:h,Z:o}}static HB(t){const i=t.eD(),{version:e,flags:s}=AT(i),n=t.eD();return{Km:ui.MR,ED:e,xD:s,zB:n}}static WB(i){const e=ha.lD(i),s=Wh(e,ui.OR),n=bT(e,ui.FR),r=ls(e,ui.UR),h=t.GB(s),o=n.map(i=>t.XB(i,h)),a=r?t.jB(r):void 0;return{Km:ui.LR,yD:h,QB:o,KB:a}}static GB(t){const i=t.eD(),{version:e,flags:s}=AT(i),n=t.eD(),r=s.Uy(bo.BASE_DATA_OFFSET_PRESENT)?t.nD():void 0,h=s.Uy(bo.SAMPLE_DESCRIPTION_INDEX_PRESENT)?t.eD():void 0,o=s.Uy(bo.DEFAULT_SAMPLE_DURATION_PRESENT)?t.eD():void 0,a=s.Uy(bo.DEFAULT_SAMPLE_SIZE_PRESENT)?t.eD():void 0,u=s.Uy(bo.DEFAULT_SAMPLE_FLAGS_PRESENT)?t.eD():void 0;return{Km:ui.OR,ED:e,xD:s,sN:n,YB:r,JB:h,FB:o,UB:a,VB:u}}static XB(i,e){const s=i.eD(),{version:n,flags:r}=AT(s),h=i.eD(),o=r.Uy(Rr.DATA_OFFSET_PRESENT)?i.sD():void 0,a=r.Uy(Rr.FIRST_SAMPLE_FLAGS_PRESENT)?i.eD():void 0,u=[];for(let s=0;s0){const t=ti(e,s);for(let i=0;i>31&1,n=2147483647&t,r=ti(i,e),h=ti(i,e),o=h>>31&1,a=h>>28&7,u=268435455&h;d.push({fM:s,vM:n,ct:r,_M:o,gM:a,pM:u})}return{Km:ui.GR,ED:n,xD:r,mM:h,jD:o,wM:a,yM:u,bM:c,AM:d}}static jB(t){const i=t.lk,e=t.$R,s=ti(i,e),{version:n,flags:r}=AT(s);let h;return h=0===n?yo.fromBits(ti(i,e),0,!0):qt(i,e),{Km:ui.UR,ED:n,xD:r,KB:h}}},ST={playready:"https://pr-keyos.licensekeyserver.com/core/rightsmanager.asmx",widevine:"https://wv-keyos.licensekeyserver.com/",fairplay:"https://fp-keyos.licensekeyserver.com/getkey"};function TT(t){if(!t)return!0;const i=t.licenseAcquisitionURL,e=t.certificateURL,s=t.keys,n=t.headers,r=t.useCredentials,h=t.queryParameters;return!(i||e||s||n||r||h)}function kT(t){return t&&void 0!==t.licenseAcquisitionURL}var ET=kT,xT=kT;function PT(t){if(!t)return!0;if(RT(t))return!1;const i=t.fairplay,e=t.playready,s=t.widevine,n=t.clearkey,r=t.aes128;return TT(i)&&TT(e)&&TT(s)&&void 0===n&&TT(r)}function IT(t){const i=vT(t),e=function(t){var i;const e=t;return fT(e)&&""!==(null==(i=e.fairplay)?void 0:i.headers.PreAuthorization)&&!lT(e)}(t);return(!i||!e)&&(i||e)}function Fr(t){return t.integration===ZS}function CT(t){const i=t;if(!i)return!1;if(PT(i))return!1;const e=i.fairplay,s=i.playready,n=i.widevine,r=i.clearkey;if(RT(t))return!0;if(e&&!function(t){const i=t;return i&&(void 0!==i.certificateURL||void 0!==i.certificate)}(e))return!1;if(s&&!ET(s))return!1;if(n&&!xT(n))return!1;if(r&&!function(t){return void 0!==t}(r))return!1;if(i.integration){if(A.VC.LC(i.integration))return!0;switch(i.integration){case Br:if(!function(t){const i=t,e=i.integration===Br;return e&&(DT(t)||NT(t))}(t))return!1;break;case $S:if(!BT(t))return!1;break;case tT:if(!function(t){const i=t;return i.integration===tT}(t))return!1;break;case ZS:if(!Fr(t))return!1;break;case YS:if(!IT(t))return!1;break;case JS:if(!function(t){const i=t;return i.integration===JS}(t))return!1;break;case iT:if(!RT(t))return!1;break;case eT:if(!function(t){const i=t;return i.integration===eT&&(void 0!==i.token||function(t){return void 0!==t.merchant&&void 0!==t.sessionId&&void 0!==t.userId}(i))}(t))return!1;break;case sT:if(!function(t){const i=t;return i.integration===sT}(t))return!1;break;case rT:if(!MT(t))return!1;break;case hT:if(!function(t){return t.integration===hT}(t))return!1;break;case oT:if(!LT(t))return!1;break;case nT:if(!function(t){const i=t;return i.integration===nT&&void 0!==i.token}(t))return!1;break;case aT:if(!function(t){const i=t;return i.integration===aT}(t))return!1;break;case uT:if(!function(t){const i=t;return i&&it(i.releasePid)&&it(i.accountId)&&it(i.token)}(t))return!1;break;case cT:return!0;default:return!1}}return!0}function RT(t){return t.integration===iT}function DT(t){return void 0!==t.authToken}function NT(t){const i=t;return void 0!==i.accountName&&void 0!==i.customerName&&void 0!==i.portalId}function BT(t){const i=t;return i.integration===$S&&void 0!==i.token}function MT(t){const i=t;return i&&i.integration===rT&&Q(i.ticketAcquisitionURL)&&Q(i.streamId)}function LT(t){const i=t;return i.integration===oT&&void 0!==i.token}function OT(t,i){const e=i[t];var s;const n=null!=(s=null==e?void 0:e.licenseAcquisitionURL)?s:ST[t];var r;const h=null!=(r=null==e?void 0:e.customdata)?r:i.customdata,o=h?{customData:h}:{};var a;const u=Y({},null!=(a=null==e?void 0:e.headers)?a:{},o),c=null!=e?e:{},{customdata:d}=c;return Y({},dT(c,["customdata"]),{licenseAcquisitionURL:n,headers:u})}function FT(t){switch(t.toLowerCase()){case"widevine":case Hg:return Hg;case"playready":case Fg:return Fg;case"fairplay":case de:return de}}function UT(t,i){switch(t){case Ng:return function(t){const i={},e=Hn.ND(new DataView(t));for(const t of e)i[t.uM]=t.lM;return i}(i);case Bg:case Mg:return function(t){return{[Qg]:t}}(i);case Lg:return function(t){return{[Xg]:t}}(i);default:throw new as(me.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Unsupported initDataType "+t)}}async function VT(t,i){return void 0===i&&(i=!1),!(!t.widevine||!await zd.Am())||(!(!t.playready||!await zd.ym())||(!(!t.clearkey||!await zd.pm())||!(i||!t.fairplay||!await zd.wm())))}function ue(t,i,e){const s=function(t,i,e){var s;const{useCredentials:n,crossOrigin:r}=function(t,i){let e=Fa.Fk;return t.useCredentials?e=Fa.fC:t.crossOrigin&&(e=_k(t.crossOrigin)),e===Fa.Fk&&i&&i.vr&&i.vr[360]&&(e=Fa.lC),{useCredentials:e===Fa.fC,crossOrigin:e}}(t,i);let h=t.liveOffset;it(h)||(h=e&&it(e.liveOffset)?e.liveOffset:void 0);let o=t.timeServer;it(o)||(o=i&&it(i.timeServer)?i.timeServer:void 0);let a=t.hlsDateRange;it(a)||(a=e&&it(e.hlsDateRange)?Boolean(e.hlsDateRange):void 0);const u=Boolean(t.experimentalRendering),c=Boolean(t.nativeUiRendering),d=Boolean(t.lowLatency),l=Boolean(t.useNativePlayback),f=Boolean(t.useManagedMediaSource),v=it(t.dash)?WT(t.dash):void 0,_=it(t.hls)?qT(t.hls):void 0,g=jT(XT(t.abr),null==e?void 0:e.abr),p=Lt(t.lcevc),m=it(t.ignoreEmbeddedTextTrackTypes)?Pk(t.ignoreEmbeddedTextTrackTypes):[];var w;const y=ck(null!=(w=t.seamlessSwitchStrategy)?w:null==(s=t.dash)?void 0:s.useSeamlessPeriodSwitch),b=ok(t.latencyConfiguration);return{crossOrigin:r,useCredentials:n,liveOffset:h,timeServer:o,hlsDateRange:a,experimentalRendering:u,nativeUiRendering:c,lowLatency:d,useNativePlayback:l,useManagedMediaSource:f,dash:v,hls:_,abr:g,lcevc:p,ignoreEmbeddedTextTrackTypes:m,seamlessSwitchStrategy:y,latencyConfiguration:b}}(t,i,e),n=jS(t.src);let r=t.type;r||(r=t.src?qu(t.src):void 0);const h=function(t,i){let e;e=it(t.contentProtection)?t.contentProtection:it(t.drm)?t.drm:it(i)&&it(i.contentProtection)?i.contentProtection:it(i)&&it(i.drm)?i.drm:void 0;return HT(e)}(t,i);return Y({},s,{src:n,type:r,contentProtection:h,ssai:it(t.ssai)?KS(t.ssai):void 0,integrationData:void 0,isAdvertisement:Boolean(t.isAdvertisement)})}function HT(t){return CT(t)&&t.integration&&t.integration===iT?function(t){const i=OT(po.zm,t),e=OT(po.qm,t),s=t[po.jm]&&OT(po.jm,t);return Y({integration:"keyos",widevine:i,playready:e},s?{fairplay:s}:{})}(t):t}function WT(t){return{useSeamlessPeriodSwitch:ck(null==t?void 0:t.useSeamlessPeriodSwitch),needsTimescaleShifting:Lt(null==t?void 0:t.needsTimescaleShifting),desiredTimescale:void 0!==(null==t?void 0:t.desiredTimescale)?bs(null==t?void 0:t.desiredTimescale):void 0,forceSeekToSynchronize:Lt(null==t?void 0:t.forceSeekToSynchronize),ignoreAvailabilityWindow:Lt(null==t?void 0:t.ignoreAvailabilityWindow),forceHardSwitchWhenSeekingBackwards:Lt(null==t?void 0:t.forceHardSwitchWhenSeekingBackwards),segmentRelativeVttTiming:Lt(null==t?void 0:t.segmentRelativeVttTiming),forceRecreateMediaSourceOnAudioSwitch:Lt(null==t?void 0:t.forceRecreateMediaSourceOnAudioSwitch)}}function qT(t){return{discontinuityAlignment:zT(null==t?void 0:t.discontinuityAlignment),delaySubtitlePreload:Th(null==t?void 0:t.delaySubtitlePreload)}}function zT(t){if(!t||!Q(t))return"auto";switch(t){case"playlist":return"playlist";case"media":return"media";default:return"auto"}}r(),r(),r(),r();var at=function(t){return t.Bk="audio",t.Mk="video",t.LT="text",t.Lk="image",t.yk="unknown",t}({});function GT(t){return"audio"===t||"video"===t}function XT(t){if(!it(t))return;return QT(IS(null==t?void 0:t.preferredAudioCodecs,Ts),IS(null==t?void 0:t.preferredVideoCodecs,Ts),Lt(null==t?void 0:t.restrictToPlayerSize))}function jT(t,i){if(!it(t)&&!it(i))return;var e;return QT(KT(null==t?void 0:t.preferredAudioCodecs,null==i?void 0:i.preferredAudioCodecs),KT(null==t?void 0:t.preferredVideoCodecs,null==i?void 0:i.preferredVideoCodecs),null!=(e=null==t?void 0:t.restrictToPlayerSize)?e:null==i?void 0:i.restrictToPlayerSize)}function QT(t,i,e){if(0!==t.length||0!==i.length||void 0!==e)return{preferredAudioCodecs:0===t.length?void 0:t,preferredVideoCodecs:0===i.length?void 0:i,restrictToPlayerSize:e}}function KT(t,i){return void 0!==t&&(null==t?void 0:t.length)>0?t:null!=i?i:[]}function YT(t,i){if(void 0!==i)switch(t){case at.Mk:return i.preferredVideoCodecs;case at.Bk:return i.preferredAudioCodecs;default:return}}r(),r(),r();var JT=!1;r();var Jr=function(t){return t.SM="canplay",t.TM="canplaythrough",t.kM="loadeddata",t.EM="loadedmetadata",t.AI="readystatechange",t.xM="waiting",t.PM="playing",t}({}),Ii=["canplay","canplaythrough","loadeddata","loadedmetadata","readystatechange","waiting","playing"];function ZT(t,i,e){return e?t<=i:t=this.V)throw new m("The index provided ("+t+") is greater than the maximum bound ("+this.V+")")}LM(t){if(0===this.V)return 0;if(this.Cr(t))return t;if(t<=this.Tn(0))return this.Tn(0);if(t>=this.An(this.V-1))return this.An(this.V-1);{let i=0,e=1/0;for(let s=0;su||(r===e&&(c=o||c,o=c),h===u&&(d=a||d,a=d),ZT(e,h+i,a||c)?(h=u,a=d):(s.push(r,h),n.push(o,a),r=e,h=u,o=c,a=d))}return s.push(r,h),n.push(o,a),new t(s,n).FM()}FM(){const i=[],e=[];for(let t=0;t=0}GM(t,i,e,s,n){return this.XM(t,i,e,s,n)>=0}jM(t,i,e,s,n){return this.QM(t,i,e,s,n)>=0}KM(t){if(t.V!==this.V)return!1;for(let i=0;i=0;t-=1)if(ZT(this.Tn(t),e,this.RM(t)))return t;return-1}ZM(t,i){void 0===i&&(i=0);const e=t-i;for(let t=0;te)return t;return-1}tL(i){return this.BM(i),new t([this.Tn(i),this.An(i)],[this.RM(i),this.NM(i)])}iL(t,i){const e=this.zM(t,i);return e<0?void 0:this.tL(e)}get eL(){let t=0;for(let i=0;i>1,this.CM=t,this.DM=i||function(t){const i=new Array(2*t);for(let e=0,s=0;e{var e;return _.max(t,null!=(e=null==i?void 0:i.minimumOffset)?e:0)},t),n=e.reduce((t,i)=>{var e;return _.max(t,null!=(e=null==i?void 0:i.targetOffset)?e:0)},s+ek),r=e.reduce((t,i)=>{var e;return _.max(t,null!=(e=null==i?void 0:i.maximumOffset)?e:0)},n+ek);return{minimumOffset:s,targetOffset:n,maximumOffset:r,forceSeekOffset:e.reduce((t,i)=>{var e;return _.max(t,null!=(e=null==i?void 0:i.forceSeekOffset)?e:0)},r+ek),minimumPlaybackRate:e.reduce((t,i)=>{var e;return _.min(t,null!=(e=i.minimumPlaybackRate)?e:ik)},ik),maximumPlaybackRate:e.reduce((t,i)=>{var e;return _.max(t,null!=(e=i.maximumPlaybackRate)?e:ih)},ih)}}wL(){var t;const i=null==(t=Uo.jn(this.oa.Fx).iL(this.oa.zx))?void 0:t.An(0),e=void 0!==i?i-this.oa.zx:0;this.yL=_.min(this.yL,e),this.bL+=1}AL(){if(this.bL<10)return;const t=.25-this.yL,i=No(this.mL+t,this.mL-.1,this.mL+.1);this.mL=No(i,this.SL,this.TL),this.yL=1/0,this.bL=0}kL(){this.EL(),this._E=zd.Og(()=>this._L(),500)}EL(){void 0!==this._E&&(zd.Lg(this._E),this._E=void 0)}Tn(){this.We&&this.xL&&(this.ho||this.PL.wn(d.py,this._L),this.IL=zd.fm(()=>this.wL(),1e3),this.CL=zd.fm(()=>this.AL(),6e4),this.kL(),this.ho=!0)}KP(){this.ho&&(this.EL(),this.IL&&zd.vm(this.IL),this.CL&&zd.vm(this.CL),this.PL.mn(d.py,this._L),this.RL(1),this.ho=!1)}zg(){this.KP(),this.oa.mn(Jr.xM,this.DL),this.oa.mn(Jr.PM,this.NL),this.Vo()}RL(t){this.PL.ML.BL||this.oa.vP!==t&&(this.oa.vP=t)}get LL(){return this.oa.OL}constructor(t,i,e){var s;super(),this.oa=void 0,this.PL=void 0,this.ho=!1,this.We=!1,this.mL=void 0,this.uL=void 0,this.SL=void 0,this.TL=void 0,this.pL=void 0,this.dL=[],this.xL=!1,this.gL=0,this._E=void 0,this.bL=0,this.yL=1/0,this.IL=void 0,this.CL=void 0,this.DL=()=>{const t=this.PL.Fx,i=this.PL.zx,e=t.iL(i);e&&(this.gL=No(e.An(0)-i,this.gL,.5),this.lL())},this.NL=()=>{this.xL=!0,this.oa.mn(Jr.PM,this.NL),this.We&&this.Tn()},this._L=()=>{this.EL(),this.kL();const t=this.LL;if(!t)return;const i=this.FL();if(t>this.uL.forceSeekOffset)return this.So(new gp("latencyrecoveryseek")),void this.dC();const{minimumOffset:e,targetOffset:s,maximumOffset:n}=this.uL,r=this.PL.vP;if(!this.UL(i,e,n))if(i>n&&this.VL()){const t=this.uL.maximumPlaybackRate;JT,this.RL(t)}else if(i1&&is){const t=1;JT,this.RL(t)}},this.oa=t,this.PL=i,this.pL=e,this.SL=e.targetOffset,this.TL=e.targetOffset+(null!=(s=e.leniency)?s:0),this.mL=e.targetOffset,this.uL=this.vL(),this.oa.wn(Jr.xM,this.DL),this.oa.wn(Jr.PM,this.NL)}},nk=.66,rk=1.5,hk=3;function ok(t){if(!it(t))return;const i=zd.Zs.mp?10:0,e=t.targetOffset;var s;var n;var r;var h;var o;var a;return{minimumOffset:null!=(s=t.minimumOffset)?s:e*nk,targetOffset:e,maximumOffset:null!=(n=t.maximumOffset)?n:e*rk,forceSeekOffset:_.max(null!=(r=t.forceSeekOffset)?r:e*hk,i),minimumPlaybackRate:null!=(h=t.minimumPlaybackRate)?h:ik,maximumPlaybackRate:null!=(o=t.maximumPlaybackRate)?o:ih,leniency:null!=(a=t.leniency)?a:void 0}}var ak=function(t){return t.HL="auto",t.WL="always",t.qL="never",t.CLEAR_ONLY="clear-only",t.SAME_DRM_ONLY="same-drm-only",t}({}),uk=function(t){return t.UPLYNK="uplynk",t.MEDIATAILOR="mediatailor",t}({});function ck(t){if(!t||!Q(t))return"auto";switch(t){case"always":return"always";case"never":return"never";case"clear-only":return"clear-only";case"same-drm-only":return"same-drm-only";default:return"auto"}}r(),r();var dk=function(t){return t.ENABLED="enabled",t.INSECURE="insecure",t.DISABLED="disabled",t}({});r();var lk=!1;r();var fk=function(t){return t.NONE="none",t.MIDROLL_AND_POSTROLL="midroll-and-postroll",t}({});r();var nh=function(t){return t.DEFAULT="",t.SRT="srt",t.TTML="ttml",t.WEBVTT="webvtt",t.EMSG="emsg",t.EVENT_STREAM="eventstream",t.ID3="id3",t.CEA608="cea608",t.DATE_RANGE="daterange",t.MILLICAST="millicast",t}({});function vk(t){switch(t){case"":case"srt":case"ttml":case"webvtt":case"emsg":case"eventstream":case"id3":case"cea608":case"daterange":case"millicast":return!0;default:return!1}}function qu(t){const i=null==t?void 0:t.match(/\b(?:m3u8|mpd)\b/i);if(!i)return Hi.pC;switch(i[0].toLowerCase()){case"mpd":return Hi.vC;case"m3u8":return Hi._C;default:return Hi.pC}}function _k(t){switch(t){case Fa.lC:case Fa.fC:return t;default:return Fa.Fk}}function tu(t){if(!t)return!1;const i=t.toLowerCase();return Xt(i,Hi.vC)}function gk(t){if(!t)return!1;const i=t.toLowerCase();return Xt(i,Hi._C)||Xt(i,Hi.gC)}function pk(t){return Mc(t)&&Mc(t.ssai)&&"google-dai"===t.ssai.integration}function mk(t){return Mc(t)&&"uplynk"===t.integration}function wk(t){return Mc(t)&&"theolive"===t.type}function yk(t){return Mc(t)&&"mediatailor"===t.integration}function Xo(t){return Mc(t)&&"millicast"===t.type}function bk(t){if(t.sources)if(hi(t.sources)){for(const i of t.sources)if(Xo(i))return!0}else if(Mc(t.sources))return Xo(t.sources);return!1}function Ak(t){if(Q(t))return!t;if(mk(t))return!t.id;if(pk(t)){const i=t.ssai,e="live"===i.availabilityType&&i.assetKey,s="vod"===i.availabilityType&&i.contentSourceID&&i.videoID;return Boolean(e&&s)}return Xo(t)?!t.src||!t.streamAccountId:!t.src}function ei(t){return Boolean(Mc(t)&&Q(t.src))}function Ms(t){return t.type===Hi.mC||t.type===Hi.wC}function Ds(t){return Q(t)||ei(t)||pk(t)||mk(t)||Xo(t)}function Ns(t){if(t){if(Ds(t))return Ak(t);for(const i of t)if(!Ak(i))return!1;return!0}return!0}function Sk(){return{crossOrigin:Fa.Fk,useCredentials:!1,liveOffset:void 0,timeServer:void 0,hlsDateRange:void 0,experimentalRendering:!1,nativeUiRendering:!1,lowLatency:!1,useNativePlayback:!1,useManagedMediaSource:!1,dash:void 0,hls:void 0,abr:void 0,lcevc:void 0,ignoreEmbeddedTextTrackTypes:[],seamlessSwitchStrategy:ak.HL,latencyConfiguration:void 0}}function Tk(){return Y({},Sk(),{src:void 0,type:Hi.pC,contentProtection:void 0,ssai:void 0,integrationData:void 0,isAdvertisement:void 0})}function kk(t){const i={allowedMimeTypes:void 0,preload:"midroll-and-postroll",showCountdown:!0,vpaidMode:dk.ENABLED,googleIma:{useNativeIma:!1,useAdUiElementForSsai:!0,bitrate:-1,language:void 0,uiElements:void 0,allowSeekingForGoogleDai:!1},theoads:lk,allowSkipAdBreak:!1};return void 0===t||(void 0!==t.preload&&(i.preload=function(t){return"none"===t?fk.NONE:fk.MIDROLL_AND_POSTROLL}(t.preload)),void 0!==t.showCountdown&&(i.showCountdown=Th(t.showCountdown)),void 0!==t.vpaidMode&&(i.vpaidMode=function(t){switch(t){case"insecure":return dk.INSECURE;case"disabled":return dk.DISABLED;default:return dk.ENABLED}}(t.vpaidMode)),hi(t.allowedMimeTypes)&&(i.allowedMimeTypes=t.allowedMimeTypes.filter(Q)),void 0!==t.googleIma&&(i.googleIma=function(t){return void 0===t?{useNativeIma:!1,useAdUiElementForSsai:!0,bitrate:-1,language:void 0,uiElements:void 0,allowSeekingForGoogleDai:!1}:{useNativeIma:Th(t.useNativeIma),useAdUiElementForSsai:null==(i=Lt(t.useAdUiElementForSsai))||i,bitrate:null!=(e=t.bitrate)?e:-1,language:it(t.language)?Ts(t.language):void 0,uiElements:t.uiElements,allowSeekingForGoogleDai:Th(t.allowSeekingForGoogleDai)};var i,e}(t.googleIma)),void 0!==t.theoads?i.theoads=Th(t.theoads):i.theoads=lk,i.allowSkipAdBreak=Th(t.allowSkipAdBreak)),i}function Ek(t){if(!ln(t))return[];const i=[];for(const e of t)Mc(e)&&i.push(e);return i}function xk(t){return Q(t.src)||Xo(t)}function Pk(t){return hi(t)?t.filter(vk):[]}r(),r();var Lr=function(t){return t[t.zL=0]="zL",t[t.Qn=1]="Qn",t[t.GL=2]="GL",t[t.XL=3]="XL",t[t.jL=4]="jL",t}({}),ho=class extends gp{constructor(t,i=Lr.zL){super(d.Rw),this.currentTime=void 0,this.readyState=void 0,this.currentTime=t,this.readyState=i}};r();var Si=class extends gp{constructor(t){super(d.jw),this.currentTime=void 0,this.currentTime=t}};r();var vt=class extends gp{constructor(t){super(d.uo),this.currentTime=void 0,this.currentTime=t}};r();var Tt=class extends gp{constructor(t,i=Lr.Qn){super(Jr.EM),this.currentTime=void 0,this.readyState=void 0,this.currentTime=t,this.readyState=i}};r();var zr=class extends gp{constructor(t){super(d.Cw),this.duration=void 0,this.duration=t}};r();var Ik=class extends gp{constructor(t,i){super(d.Kw),this.currentTime=void 0,this.playbackRate=void 0,this.currentTime=t,this.playbackRate=i}};r();var B=class extends gp{constructor(t,i){super(d.py),this.currentTime=void 0,this.currentProgramDateTime=void 0,this.currentTime=t,this.currentProgramDateTime=i}};r();var ur=class extends gp{constructor(t){super(d.Nw),this.currentTime=void 0,this.currentTime=t}};r();var M=class extends gp{constructor(t,i=Lr.GL){super(Jr.kM),this.currentTime=void 0,this.readyState=void 0,this.currentTime=t,this.readyState=i}};r();var ji=class extends gp{constructor(t){super(d.$w),this.currentTime=void 0,this.currentTime=t}};r();var Yr=class extends gp{constructor(t){super(d.Zw),this.currentTime=void 0,this.currentTime=t}};r();var Wi=class extends gp{constructor(t,i){super(d.wy),this.currentTime=void 0,this.volume=void 0,this.currentTime=t,this.volume=i}};r();var Is=class extends gp{constructor(t,i=Lr.XL){super(Jr.SM),this.currentTime=void 0,this.readyState=void 0,this.currentTime=t,this.readyState=i}};r();var Zi=class extends gp{constructor(t,i=Lr.jL){super(Jr.TM),this.currentTime=void 0,this.readyState=void 0,this.currentTime=t,this.readyState=i}};r();var Ka=class extends gp{constructor(t,i){super(Jr.AI),this.currentTime=void 0,this.readyState=void 0,this.currentTime=t,this.readyState=i}};r();var el=class extends Oi{get error(){return this.errorObject.message}xa(){return this}constructor(t){super(hc.ma),this.errorObject=void 0,this.errorObject=t}};async function ws(t,i,e,s,n){void 0===e&&(e=3),void 0===s&&(s=1e3),void 0===n&&(n=1/0);let r=0;for(;;)try{return await t(r,i)}catch(t){if(sa(t),rLr.zL&&w===Lr.zL)&&t.So(new ho(l,w)),p&&!o?t.So(new Si(l)):!p&&o&&t.So(new vt(l)),w>=Lr.Qn&&(s||u=Lr.GL&&(s||u=Lr.XL&&(s||u=Lr.jL&&(s||ut.ZL(i),addEventListener(i,e){t.wn(Qk(i),e)},removeEventListener(i,e){t.mn(Qk(i),e)}}}var jk=["stats"];function Qk(t){const i=vu(t,Ts);return(Q(i)?[i]:i).filter(t=>Ct(jk,t))}var se=class extends Ne{set OI(t){const i=this.FI;t!==i&&(i&&this.UI(i),t&&this.HI(t),this.FI=t)}get OI(){return this.FI}get Ca(){return this.hu||(this.hu=Xk(this)),this.hu}HI(t){t.wn(jk,this.Rs)}UI(t){t.mn(jk,this.Rs)}ZL(t){var i,e;return null!=(e=null==(i=this.FI)?void 0:i.ZL(t))?e:{}}kn(){this.Vo(),this.FI&&this.UI(this.FI),this.FI=void 0}constructor(){super(),this.FI=void 0,this.hu=void 0,this.FI=void 0}},Kk=class extends lS{Aa(){return this.$L}Mx(){return this.tO}get $x(){return this.tP()}get iP(){var t;return null!=(t=this.eP())?t:this.iO}tP(){return this.eO}eP(){return this.iO}RP(){return this.Gl}BP(){return this.sO}nO(t){const i=this.Lx;if(i===t)return;i.mw(this.nI);const e=Mk(this),s=this.qx(),n=this.qP(),r=this.zP();this.Lx=t,this.tO.OI=t.ht,this.sO.OI=t.rt,this.Gl.OI=t.nt,this.$L.OI=t.Aa(),this.eO.OI=t.$x,this.iO.OI=t.iP,void 0!==e&&Ok(this,e,this);const h=this.qx();h!==s&&this.So(new Uk(h)),this.qP()!==n&&this.So(new Vk),this.zP()!==r&&this.So(new Hk),t.lw(this.nI)}async kn(){await super.kn(),this.$L.kn(),this.tO.kn(),this.sO.kn(),this.Gl.kn(),this.eO.kn(),this.iO.kn()}constructor(t){super(t),this.tO=new Gh,this.sO=new Gh,this.Gl=new ai,this.$L=void 0,this.eO=new zS,this.iO=new se,this.$L=new zk(t.Aa()),this.tO.OI=t.ht,this.sO.OI=t.rt,this.Gl.OI=t.nt,this.eO.OI=t.$x,this.iO.OI=t.iP}};r();var Yk=class extends Kk{hP(){return function(t){let i=0,e=0,s=0,n=0,r=0,h=0,o=0;for(const a of t)i+=a.rO,e+=a.hO,s+=a.oO,n+=a.aO,r+=a.uO,h+=a.cO.amountOfBufferedAudioSegments,o+=a.cO.amountOfBufferedVideoSegments;return{rO:i,hO:e,oO:s,aO:n,uO:r,cO:{amountOfBufferedAudioSegments:h,amountOfBufferedVideoSegments:o}}}(this.dO.map(t=>t.rP))}KP(){return pr(this.dO.map(t=>t.KP())).then(gs)}hr(){return pr(this.dO.map(t=>t.hr())).then(gs)}GP(){if(!this.ko){for(const t of this.dO)t.GP();this.ko=!0}}Ox(){const t=[];for(const i of this.dO)t.push(...i.Ox());return t}iI(t){let i=!1;for(const e of this.dO)i=e.iI(t)||i;return i}So(t){this.iI(t)||super.So(t)}get OI(){return this.Lx}set OI(t){this.nO(t)}lO(t){this.dO.push(t)}fO(t){_e(this.dO,t)}nO(t){if(t===this.Lx)return;const i=this.Lx;i.mr(),super.nO(t),t.gr(i)}$P(){for(const t of this.dO)t.$P()}async kn(){this.Vo(),this.Lx.mr();for(const t of this.dO)this.Lx!==t&&await t.kn();await super.kn()}constructor(t){super(t),this.dO=[],this.ko=!1,this.vO=!1,this.lO(t)}};r();var Mi=function(t){return t[t.ABORTED=1]="ABORTED",t[t.NETWORK=2]="NETWORK",t[t.DECODE=3]="DECODE",t[t.SRC_NOT_SUPPORTED=4]="SRC_NOT_SUPPORTED",t[t.ENCRYPTED=5]="ENCRYPTED",t[t.LICENSE_INVALID=6]="LICENSE_INVALID",t[t.ADVERTISEMENT_ERROR=7]="ADVERTISEMENT_ERROR",t}({}),mu=class extends gf{get name(){return"MediaError"}constructor(t,i,e,s){super(i),this.code=void 0,this.message=void 0,this.cause=void 0,this.systemCode=void 0,this.code=t,this.message=null!=i?i:"Unknown error",this.cause=e,this.systemCode=s,m.captureStackTrace&&m.captureStackTrace(this,this.constructor)}};function Jk(t){AS(t,"MEDIA_ERR_ABORTED",1),AS(t,"MEDIA_ERR_NETWORK",2),AS(t,"MEDIA_ERR_DECODE",3),AS(t,"MEDIA_ERR_SRC_NOT_SUPPORTED",4),AS(t,"MEDIA_ERR_ENCRYPTED",5)}function ar(t){var i,e;return function(t){return t.category===L.CONTENT_PROTECTION}(t)?new mu(5,t.message,null==(i=t.cause)?void 0:i.message,t.systemCode):new mu(Zk(t.code),t.message,null==(e=t.cause)?void 0:e.message)}function Zk(t){if(t===me.MEDIA_ABORTED)return 1;if(t===me.MANIFEST_LOAD_ERROR||t===me.MEDIA_LOAD_ERROR||t===me.SUBTITLE_LOAD_ERROR)return 2;if(t===me.MEDIA_DECODE_ERROR)return 3;if(t===me.MEDIA_NOT_SUPPORTED)return 4;const i=L.fromCode(t);return i===L.NETWORK?2:i===L.SOURCE?4:i===L.LICENSE?6:i===L.CONTENT_PROTECTION?5:i===L.AD?7:3}function $k(t){return new as(tE(t.code),t.message,t)}function tE(t){switch(t){case 1:return me.MEDIA_ABORTED;case 2:return me.NETWORK_ERROR;case 3:return me.MEDIA_DECODE_ERROR;case 4:return me.SOURCE_NOT_SUPPORTED;case 5:return me.CONTENT_PROTECTION_ERROR;case 6:return me.LICENSE_ERROR;case 7:return me.AD_ERROR}}Jk(mu),Jk(mu.prototype),r(),r(),r(),r(),r();var Ws=class extends mS{tt(t){return super.tt(t)}xa(){return MS(this)}};r(),r(),r(),r();var iE=class{get NI(){return this._O}get V(){return this._O.length}get Ca(){return this.hu||(this.hu=function(t){const i=t.NI.map(t=>t.Ca);return i.item=i=>{const e=0|i,s=t.MI(e);return s&&s.Ca||void 0},i}(this)),this.hu}gO(t){this._O.push(t),this.hu&&this.hu.push(t.Ca)}pS(t){_e(this._O,t),this.hu&&_e(this.hu,t.Ca)}MI(t){return this._O[t]}pO(t){return hi(t)?function(t,i){for(const e of i)if(!Ct(t,e))return!1;return!0}(this._O,t):Ct(this._O,t)}hr(){Wt(this._O),this.hu&&Wt(this.hu)}constructor(){this._O=[],this.hu=void 0}};r();var Xh=class extends Fs{xa(){return new eE(this.Ht.Ca)}constructor(t){super(Te.xI),this.Ht=void 0,this.Ht=t}},eE=class extends Eh{constructor(t){super("update"),this.track=void 0,this.track=t}};r();var sE=0;function mi(){return sE++}var nE=0;var rE=0;function hE(){return rE++}var oE=0;function aE(){return oE++}var uE=0;var cE=class extends Ne{get YI(){}get Rt(){return this.We}set Rt(t){this.We!==t&&(this.We=t,this.mO=t,this.So(new Rh(this)))}get mO(){return this.wO.enabled}set mO(t){this.wO.enabled=t}get Ca(){return this.hu||(this.hu=cs(this)),this.hu}get o(){return this.aS}get JI(){return this.yO}get Lt(){return this.wO.kind}get Th(){return this.bO}set Th(t){t!==this.bO&&(this.bO=t,this.So(new Xh(this)))}get bs(){return this.wO.language}get Qk(){return this.Rt?"enabled":"disabled"}get AO(){return this.wO}get $I(){return this._O}get tC(){}set tC(t){}SO(t){this.Rt=t}TO(){this.Rt=this.mO}constructor(t){super(),this.Km=at.Bk,this.wO=void 0,this.aS=void 0,this.bO=void 0,this.yO=void 0,this.We=!1,this._O=void 0,this.hu=void 0,this.wO=t,this.yO=mi(),this.aS=""+uE++,this.bO=t.label,this._O=new iE,this.TO()}};r();var dE=0;var lE=class extends Ne{get YI(){}get Rt(){return this.We}set Rt(t){this.We!==t&&(this.We=t,this.mO=t,this.So(new Rh(this)))}get mO(){return Boolean(this.wO.selected)}set mO(t){this.wO.selected=t}get Ca(){return this.hu||(this.hu=cs(this)),this.hu}get o(){return this.aS}get JI(){return this.yO}get Lt(){return"main"}get Th(){return this.bO}set Th(t){t!==this.bO&&(this.bO=t,this.So(new Xh(this)))}get bs(){return this.wO.language}get Qk(){return this.Rt?"enabled":"disabled"}get AO(){return this.wO}get $I(){return this._O}get tC(){}set tC(t){}TO(){this.Rt=this.mO}SO(t){this.Rt=t}constructor(t){super(),this.Km=at.Mk,this.wO=void 0,this.aS=void 0,this.yO=void 0,this.We=!1,this._O=void 0,this.bO=void 0,this.hu=void 0,this.wO=t,this.yO=mi(),this.aS=""+dE++,this._O=new iE,this.bO=t.label,this.TO()}};r();var fE=class extends gp{constructor(t){super(d.yw),this.sP=void 0,this.sP=t}};r(),r();var dc=function(t){return t[t.NONE=0]="NONE",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED",t[t.ERROR=3]="ERROR",t}({});r(),r();var vE=function(t){return t.kO="cue",t.EO="region",t.xO="stylesheet",t}({});r(),r();var _E={"line-left":"start",center:"middle","line-right":"end"},gE={start:"line-left",middle:"center",end:"line-right"};function pE(t,i){if("auto"===t)switch(i){case"start":case"left":return"line-left";case"end":case"right":return"line-right";default:return"center"}return t}function mE(t,i){if("auto"===t)switch(i){case"left":return 0;case"right":return 100;default:return 50}return function(t,i){const e="number"==typeof t?t:C(t);return S(e)?i:e}(t,50)}r(),r(),r();var Js=function(t){return t.QL="yo",t.KL="jo",t.xI="er",t}({}),Ee=class extends Fs{constructor(t,i){super(t),this.PO=void 0,this.PO=i}},Ys=class extends Eh{constructor(t,i){super(t),this.cue=void 0,this.cue=i}};function U(t){const i=[Js.QL,Js.KL,Js.xI];let e;const s={get IO(){return t},get track(){return t.Ht.Ca},get id(){return t.o},get uid(){return t.JI},get startTime(){return t.CO},set startTime(i){t.CO=i},get endTime(){return t.RO},set endTime(i){t.RO=i},get content(){return t.U},addEventListener(t,i){const s=vu(t,Ts);e.wn(s,i)},removeEventListener(t,i){const s=vu(t,Ts);e.mn(s,i)}};return e=new _p(s),t.wn(i,t=>e.So(t.Ca)),s}function wE(){}function yE(t){return Gi(U(t),{get align(){return t.DO},get line(){return t.BO},get lineAlign(){return t.MO},get position(){return t.mo},get positionAlign(){return t.LO},get region(){return t.OO?t.OO.Ca:null},get size(){return t.Wy},get snapToLines(){return t.FO},get text(){return t.U},get vertical(){return t.Pt}})}r(),r();var bE=class extends Ee{xa(){return new AE(this.PO.Ca)}constructor(t){super(Js.xI,t)}},AE=class extends Ys{constructor(t){super("update",t)}};r();var Oe=class extends Fs{xa(){return new SE(this.PO.Ca)}constructor(t){super(Te.fI),this.PO=void 0,this.PO=t}},SE=class extends Eh{constructor(t){super("updatecue"),this.cue=void 0,this.cue=t}},TE=.02;function kE(t,i){return rs(t.UO,i.UO,TE)&&rs(t.VO,i.VO,TE)&&t.o===i.o}var Oh=class extends Ne{get CO(){return this.HO}set CO(t){var i,e;this.HO!==t&&(this.HO=t,null==(i=this.WO)||i.qO(this),this.So(new bE(this)),null==(e=this.WO)||e.So(new Oe(this)))}get RO(){return this.zO}set RO(t){var i,e;this.zO!==t&&(this.zO=t,null==(i=this.WO)||i.qO(this),this.So(new bE(this)),null==(e=this.WO)||e.So(new Oe(this)))}get o(){return this.aS}get JI(){return this.yO}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}xa(){return U(this)}get ro(){return this.ho}set ro(t){this.ho=t}get Ht(){return this.WO}set Ht(t){this.WO=t}get U(){return this.GO}set U(t){var i;this.GO!==t&&(this.GO=t,this.So(new bE(this)),null==(i=this.WO)||i.So(new Oe(this)))}get XO(){return this.jO}set XO(t){this.jO=t}QO(t){return this===t||kS(this,t)&&kE(this,t)&&this.KO(t)}KO(t){return Gr(this.U,t.U)}YO(t,i){this.HO=t,this.zO=i,this.UO=t,this.VO=i}kn(){this.Vo()}constructor(t,i,e,s,n){super(),this.yO=void 0,this.aS=void 0,this.UO=void 0,this.VO=void 0,this.HO=void 0,this.zO=void 0,this.hu=void 0,this.WO=void 0,this.ho=!1,this.GO=void 0,this.jO=void 0,this.JO=-1,this.yO=aE(),this.HO=t,this.zO=i,this.UO=t,this.VO=i,this.GO=e,this.jO=Boolean(s),this.aS=null!=n?n:""}};function EE(t,i){return t.U===i.U&&t.BO===i.BO&&t.MO===i.MO&&t.mo===i.mo&&t.LO===i.LO&&t.OO===i.OO&&t.FO===i.FO&&t.Wy===i.Wy&&t.DO===i.DO&&t.Pt===i.Pt}var xE=class extends Oh{get Ca(){return this.hu||(this.hu=yE(this)),this.hu}get Km(){return vE.kO}KO(t){return EE(this,t)}constructor(t,i,e,s,n){super(t,i,e,s,n),this.BO="auto",this.MO="start",this.mo="auto",this.LO="auto",this.OO=void 0,this.FO=!0,this.Wy=100,this.DO="center",this.Pt=""}};function PE(t){const i=t.BO,e=lo(i);return e&&!t.FO&&(i<0||i>100)?100:e?Number(i):t.FO?-1:100}function IE(t){return mE(t.mo,t.DO)}function CE(t){return pE(t.LO,t.DO)}function RE(t){const i=CE(t),e=IE(t);let s;switch(i){case"line-left":s=100-e;break;case"line-right":s=e;break;case"center":s=e<=50?2*e:2*(100-e)}return _.min(t.Wy,s)}function DE(t){return{get id(){return t.o},get lines(){return t.ZO},get regionAnchorX(){return t.$O},get regionAnchorY(){return t.tF},get scrollValue(){return t.iF},get viewportAnchorX(){return t.eF},get viewportAnchorY(){return t.sF},get width(){return t.Ti}}}r(),r();var NE=class{get Ca(){return this.hu||(this.hu=DE(this)),this.hu}get Km(){return vE.EO}constructor(t,i,e,s,n,r,h,o){this.o=void 0,this.Ti=void 0,this.ZO=void 0,this.$O=void 0,this.tF=void 0,this.eF=void 0,this.sF=void 0,this.iF=void 0,this.hu=void 0,this.o=t,this.Ti=i,this.ZO=e,this.$O=s,this.tF=n,this.eF=r,this.sF=h,this.iF=o}};r(),r();var Ur=1e6,BE=class{nF(t){return this.rF()*t}hF(t){return this.oF(t)>0}aF(t){return this.oF(t)>=0}uF(t,i){return this.dF(t).cF(i)}QO(t){return 0===this.oF(t)}lF(t){return this.oF(t)<0}cF(t){return this.oF(t)<=0}fF(){return this.vF()?this._F():this}gF(t){return this.gO(t._F())}dF(t){return this.gF(t).fF()}};function ME(t,i){return t.pF()?i.pF()?hl.rh:hl.Fg:i.pF()?hl.Ug:t.mF()?i.mF()&&t.vF()===i.vF()?hl.rh:t.vF()?hl.Ug:hl.Fg:i.vF()?hl.Fg:hl.Ug}r(),r();var LE=4294967296,OE=LE*LE,FE=OE*OE,UE=FE/2,Ae=class t{static wF(i,e,s){return s?new t(i.toUnsigned(),e.toUnsigned()):new t(i.toSigned(),e.toSigned())}static yF(i){return i.unsigned?new t(i,yo.UZERO):new t(i,i.isNegative()?yo.NEG_ONE:yo.ZERO)}static bF(i,e){if(S(i))return e?t.AF:t.SF;if(e){if(i<0)return t.AF;if(i>=FE)return t.TF}else{if(i<=-UE)return t.kF;if(i+1>=UE)return t.EF}return i<0?t.bF(-i,e)._F():t.wF(yo.fromNumber(i%OE),yo.fromNumber(i/OE),e)}xF(){return this.PF.unsigned}IF(){return this.CF.isZero()&&this.PF.isZero()}vF(){return this.PF.isNegative()}RF(){return this.xF()?t.wF(this.CF,this.PF,!1):this}DF(){return this.xF()?this:t.wF(this.CF,this.PF,!0)}NF(){return this.CF}rF(){return this.vF()?-this._F().rF():this.PF.toNumber()*OE+this.CF.toUnsigned().toNumber()}BF(){return this.CF.toInt()}QO(t){return(this.xF()===t.xF()||this.PF.getHighBits()>>>31!=1||t.PF.getHighBits()>>>31!=1)&&(this.PF.toUnsigned().eq(t.PF.toUnsigned())&&this.CF.toUnsigned().eq(t.CF.toUnsigned()))}oF(t){if(this.QO(t))return hl.rh;const i=this.vF(),e=t.vF();if(i&&!e)return hl.Ug;if(!i&&e)return hl.Fg;if(!this.xF())return this.gF(t).vF()?hl.Ug:hl.Fg;const s=this.DF(),n=t.DF(),r=n.PF.comp(s.PF);return r>0||0===r&&n.CF.gt(s.CF)?hl.Ug:hl.Fg}lF(t){return this.oF(t)<0}cF(t){return this.oF(t)<=0}MF(t){return this.oF(t)>0}LF(t){return this.oF(t)>=0}OF(){return new t(this.CF.not(),this.PF.not())}FF(i){return new t(this.CF.and(i.CF),this.PF.and(i.PF))}UF(i){return new t(this.CF.or(i.CF),this.PF.or(i.PF))}VF(i){const e=127&i;return 0===e?this:e<64?t.wF(this.CF.shl(e),this.PF.shl(e).or(this.CF.shru(64-e)),this.xF()):t.wF(yo.ZERO,this.CF.shl(e-64),this.xF())}HF(i){const e=127&i;return 0===e?this:e<64?t.wF(this.CF.shru(e).or(this.PF.shl(64-e)),this.PF.shr(e),this.xF()):t.wF(this.PF.shr(e-64),this.PF.isNegative()?yo.NEG_ONE:yo.ZERO,this.xF())}WF(i){const e=127&i;return 0===e?this:e<64?t.wF(this.CF.shru(e).or(this.PF.shl(64-e)),this.PF.shru(e),this.xF()):64===e?t.wF(this.PF,yo.ZERO,this.xF()):t.wF(this.PF.shru(e-64),yo.ZERO,this.xF())}gO(i){const e=this.PF.high>>>16,s=65535&this.PF.high,n=this.PF.low>>>16,r=65535&this.PF.low,h=this.CF.high>>>16,o=65535&this.CF.high,a=this.CF.low>>>16,u=65535&this.CF.low,c=i.PF.high>>>16,d=65535&i.PF.high,l=i.PF.low>>>16,f=65535&i.PF.low,v=i.CF.high>>>16,_=65535&i.CF.high,g=i.CF.low>>>16;let p=0,m=0,w=0,y=0,b=0,A=0,S=0,T=0;T+=u+(65535&i.CF.low),S+=T>>>16,T&=65535,S+=a+g,A+=S>>>16,S&=65535,A+=o+_,b+=A>>>16,A&=65535,b+=h+v,y+=b>>>16,b&=65535,y+=r+f,w+=y>>>16,y&=65535,w+=n+l,m+=w>>>16,w&=65535,m+=s+d,p+=m>>>16,m&=65535,p+=e+c,p&=65535;const k=this.xF(),E=yo.fromBits(w<<16|y,p<<16|m,k),x=yo.fromBits(S<<16|T,b<<16|A,k);return t.wF(x,E,k)}gF(t){return this.gO(t._F())}_F(){return this.OF().gO(t.qF)}zF(i){if(this.IF()||i.IF())return this.xF()?t.AF:t.SF;if(this.vF())return i.vF()?this._F().zF(i._F()):this._F().zF(i)._F();if(i.vF())return this.zF(i._F())._F();if(this.PF.isZero()&&0===this.CF.high&&i.PF.isZero()&&0===i.CF.high)return t.yF(this.CF.multiply(i.CF));const e=yo.fromBits(4294967295,0,!0),s=this.CF.and(e),n=this.CF.shru(32),r=this.PF.and(e),h=this.PF.shru(32),o=i.CF.and(e),a=i.CF.shru(32),u=i.PF.and(e),c=i.PF.shru(32);let d=yo.UZERO,l=yo.UZERO,f=yo.UZERO,v=yo.UZERO;d=d.add(s.mul(o)),l=l.add(d.shru(32)),d=d.and(e),l=l.add(n.mul(o)),f=f.add(l.shru(32)),l=l.and(e),l=l.add(s.mul(a)),f=f.add(l.shru(32)),l=l.and(e),f=f.add(r.mul(o)),v=v.add(f.shru(32)),f=f.and(e),f=f.add(n.mul(a)),v=v.add(f.shru(32)),f=f.and(e),f=f.add(s.mul(u)),v=v.add(f.shru(32)),f=f.and(e),v=v.add(h.mul(o)).add(r.mul(a)).add(n.mul(u)).add(s.mul(c)).and(e);const _=yo.fromBits(d.getLowBitsUnsigned(),l.getLowBitsUnsigned(),!0),g=yo.fromBits(f.getLowBitsUnsigned(),v.getLowBitsUnsigned(),!0);return t.wF(_,g,this.xF())}GF(i){let e,s,n=i;if(n.IF())throw new RangeError("division by zero");if(this.IF())return this.xF()?[t.AF,t.AF]:[t.SF,t.SF];if(this.xF()){if(n.xF()||(n=n.DF()),n.MF(this))return[t.AF,this];if(n.MF(this.WF(1)))return s=t.XF,e=this.gF(n),[s,e];s=t.AF}else{if(this.QO(t.kF)){if(n.QO(t.qF)||n.QO(t.jF))return[t.kF,t.SF];if(n.QO(t.kF))return[t.qF,t.SF];{const i=this.HF(1).QF(n).VF(1);return i.QO(t.SF)?s=n.vF()?t.qF:t.jF:(e=this.gF(n.zF(i)),s=i.gO(e.QF(n))),e=this.gF(n.zF(s)),[s,e]}}if(n.QO(t.kF))return this.xF()?[t.AF,this]:[t.SF,this];if(this.vF())return n.vF()?this._F().GF(n._F()):([s,e]=this._F().GF(n),[s._F(),e._F()]);if(n.vF())return[s,e]=this.GF(n._F()),[s._F(),e._F()];s=t.SF}for(e=this;e.LF(n);){let i=_.max(1,_.floor(e.rF()/n.rF()));const r=_.ceil(_.log(i)/_.LN2),h=r<=48?1:2**(r-48);let o=t.bF(i),a=o.zF(n);for(;a.vF()||a.MF(e);)i-=h,o=t.bF(i,this.xF()),a=o.zF(n);o.IF()&&(o=t.qF),s=s.gO(o),e=e.gF(a)}return[s,e]}QF(t){return this.GF(t)[0]}KF(t){return this.GF(t)[1]}toString(i){const e=i||10;if(e<2||e>36)throw new RangeError("radix");if(this.IF())return"0";if(this.vF()){if(this.QO(t.kF)){const i=t.bF(e),s=this.QF(i),n=s.zF(i).gF(this);return s.toString(e)+n.BF().toString(e)}return"-"+this._F().toString(e)}const s=t.bF(e**6,this.xF());let n=this,r="";for(;;){const t=n.QF(s);let i=(n.gF(t.zF(s)).BF()>>>0).toString(e);if(n=t,n.IF())return i+r;for(;i.length<6;)i="0"+i;r=String(i)+r}}constructor(t,i){this.CF=void 0,this.PF=void 0,this.CF=t,this.PF=i}};Ae.SF=Ae.yF(yo.ZERO),Ae.AF=Ae.yF(yo.UZERO),Ae.qF=Ae.yF(yo.ONE),Ae.XF=Ae.yF(yo.UONE),Ae.jF=Ae.yF(yo.NEG_ONE),Ae.EF=Ae.wF(yo.NEG_ONE,yo.MAX_VALUE,!1),Ae.TF=Ae.wF(yo.MAX_UNSIGNED_VALUE,yo.MAX_UNSIGNED_VALUE,!0),Ae.kF=Ae.wF(yo.ZERO,yo.MIN_VALUE,!1),r();var VE=class t{get mF(){return!isFinite(this.YF)}get dd(){return this.YF/this.jD}static JF(i){return new t(_.ceil(i.YF),i.jD)}static ZF(i){return new t(_.floor(i.YF),i.jD)}static tU(t,i){return t.aF(i)?t:i}static iU(t,i){return t.cF(i)?t:i}gO(i){return this.jD>=i.jD?new t(this.YF+i.eU(this.jD).YF,this.jD):new t(this.eU(i.jD).YF+i.YF,i.jD)}hF(t){return t.lF(this)}aF(t){return t.cF(this)}dF(i){if(this.jD>=i.jD){const e=_.abs(this.YF-i.eU(this.jD).YF),s=this.jD;return new t(e,s)}return i.dF(this)}uF(t,i){return this.dF(t).cF(i)}oF(t){return function(t,i){return t.jD>=i.jD?ef(t.YF,i.eU(t.jD).YF):ef(t.eU(i.jD).YF,i.YF)}(this,t)}QO(t){return 0===this.oF(t)}lF(t){return this.oF(t)<0}cF(t){return this.oF(t)<=0}eU(i){return new t(this.YF*(i/this.jD),i)}gF(i){return this.jD>=i.jD?new t(this.YF-i.eU(this.jD).YF,this.jD):new t(this.eU(i.jD).YF-i.YF,i.jD)}sU(i){return new t(this.YF*i,this.jD)}constructor(t,i=1){this.YF=void 0,this.jD=void 0,this.YF=t,this.jD=i}};VE.fd=new VE(1/6,1),VE.SF=new VE(0),VE.nU=new VE(1/0),VE.rU=1e6;var ps=class t extends BE{static hU(i,e){return void 0===e&&(e=Ur),t.bF(i*e,e)}static bF(i,e){return S(i)?t.oU:i===1/0?t.aU:i===-1/0?t.uU:new t(yo.fromNumber(i),e)}static yF(i,e){return new t(i,e)}static cU(i){return t.hU(i.dd,Ur)}static dU(i){return new t(yo.fromNumber(i.getTime()),1e3)}static tU(t,i){return t.aF(i)?t:i}static iU(t,i){return t.cF(i)?t:i}static lU(i,e,s){return t.tU(e,t.iU(s,i))}vF(){return this.XE.isNegative()}IF(){return 0!==this.jD&&this.XE.isZero()}mF(){return 0===this.jD&&!this.XE.isZero()}pF(){return 0===this.jD&&this.XE.isZero()}rF(){if(0===this.jD)return this.XE.isZero()?NaN:this.XE.isNegative()?-1/0:1/0;const t=this.XE.divide(this.jD),i=this.XE.subtract(t.multiply(this.jD));return t.toNumber()+i.toNumber()/this.jD}NF(){if(0===this.jD)throw new m("Failed to convert timestamp");return this.XE}fU(){return new Date(0===this.jD?NaN:this.eU(1e3).XE.toNumber())}vU(){return new VE(0===this.jD?this.rF():this.XE.toNumber(),this.jD)}eU(i,e){void 0===e&&(e=Ss._U);const s=this.jD;if(s===i)return this;if(0===s)return this;const n=Zl(s,i),r=function(t,i,e){const[s,n]=t.GF(i);if(n.IF())return s;if(e===Ss._U)return n.vF()?s.gF(Ae.qF):s;if(e===Ss.gU)return n.vF()?s:s.gO(Ae.qF);{const t=n.zF(Ae.bF(2));return t.vF()?t._F().lF(i)?s:s.gF(Ae.qF):t.lF(i)?s:s.gO(Ae.qF)}}(Ae.yF(this.XE).zF(Ae.bF(i/n)),Ae.bF(s/n),e);return new t(r.NF(),i)}oF(t){if(this===t)return hl.rh;if(0===this.jD||0===t.jD)return ME(this,t);if(this.IF())return t.IF()?hl.rh:t.vF()?hl.Fg:hl.Ug;if(t.IF())return this.vF()?hl.Ug:hl.Fg;const i=_.min(this.jD,t.jD),e=this.eU(i,Ss.pU).XE,s=t.eU(i,Ss.pU).XE;return e.compare(s)}_F(){return 0===this.jD?function(t){0;return t.pF()?t:t.vF()?ps.aU:ps.uU}(this):new t(this.XE.negate(),this.jD)}gO(i){if(0===this.jD||0===i.jD)return function(t,i){0;if(t.pF()||i.pF())return ps.oU;if(t.mF()&&i.mF())return t.vF()===i.vF()?t:ps.oU;return t.mF()?t:i}(this,i);if(this.IF())return i;if(i.IF())return this;const e=_.max(this.jD,i.jD),s=this.eU(e,Ss.pU),n=i.eU(e,Ss.pU);return new t(s.XE.add(n.XE),e)}zF(i){if(this.pF()||S(i))return t.oU;if(this.mF()||!isFinite(i)){if(this.IF()||0===i)return t.oU;{const e=this.vF()?t.uU:t.aU;return i<0?e._F():e}}return this.IF()?this:new t(0===i?yo.ZERO:this.XE.multiply(i),this.jD)}QF(i){if(this.pF()||S(i))return t.oU;if(this.mF())return isFinite(i)?0===i?1/i<0?this._F():this:i<0?this._F():this:t.oU;if(!isFinite(i))return new t(yo.ZERO,this.jD);if(this.IF())return 0===i?t.oU:new t(yo.ZERO,this.jD);if(0===i){const e=this.vF()?t.uU:t.aU;return 1/i<0?e._F():e}return new t(this.XE.divide(i),this.jD)}mU(){return[this.XE.low,this.XE.high,this.jD]}constructor(t,i){super(),this.XE=void 0,this.jD=void 0,this.XE=t.toSigned(),this.jD=i>>>0}};ps.SF=new ps(yo.ZERO,Ur),ps.oU=new ps(yo.ZERO,0),ps.aU=new ps(yo.ONE,0),ps.uU=new ps(yo.NEG_ONE,0),r();var HE=class t extends BE{static hU(i,e){return void 0===e&&(e=Ur),t.bF(i*e,e)}static bF(i,e){return S(i)?t.oU:i===1/0?t.aU:i===-1/0?t.uU:new t(BigInt(_.floor(i)),e)}static yF(i,e){return new t(BigInt(i.high)<>>0),e)}static cU(i){return t.hU(i.dd,Ur)}static dU(i){return t.bF(i.getTime(),1e3)}static get SF(){return t.wU||(t.wU=new t(BigInt(0),Ur)),t.wU}static get oU(){return t.yU||(t.yU=new t(BigInt(0),0)),t.yU}static get aU(){return t.bU||(t.bU=new t(BigInt(1),0)),t.bU}static get uU(){return t.AU||(t.AU=new t(BigInt(-1),0)),t.AU}static tU(t,i){return t.aF(i)?t:i}static iU(t,i){return t.cF(i)?t:i}static lU(i,e,s){return t.tU(e,t.iU(s,i))}vF(){return this.XE>BigInt(32)&BigInt(4294967295);return yo.fromBits(Number(t),Number(i))}fU(){return new Date(0===this.jD?NaN:Number(this.eU(1e3).XE))}vU(){return new VE(0===this.jD?this.rF():Number(this.XE),this.jD)}eU(i,e){void 0===e&&(e=Ss._U);const s=this.jD;if(s===i)return this;if(0===s)return this;const n=Zl(s,i),r=function(t,i,e){const s=t/i,n=t-s*i;if(n===BigInt(0))return s;if(e===Ss._U)return ns?hl.Fg:e>>0}};HE.wU=void 0,HE.yU=void 0,HE.bU=void 0,HE.AU=void 0;var Ss=function(t){return t[t._U=0]="_U",t[t.gU=1]="gU",t[t.pU=2]="pU",t}({}),ul=function(){try{return"function"==typeof BigInt&&"bigint"==typeof BigInt(0)}catch(t){return!1}}()?HE:ps;function WE(t,i){return t.oF(i)}function qE(t,i){return void 0!==t?void 0!==i?ul.iU(t,i):t:i}r();var zE=2**33,GE=Oc(()=>ul.bF(zE,9e4)),XE=Oc(()=>GE().QF(2));r();var jE={TU:0,kU:1/0,EU:0},QE=["WEBVTT","WEBVTT ","WEBVTT\t","WEBVTT\n"],KE=[" ","\t","\n","\f","\r"],YE=/^\d*$/,JE=/.*[0-9]+.*/,ZE=/^[\d.-]+$/,$E=/(^\.|\.$)/,tx=/(\D\.|\.\D)/;function ix(t,i,e){void 0===i&&(i=jE),void 0===e&&(e=!0);return ex(hm(dh(t),new oi),i,e)}function ex(t,i,e){void 0===i&&(i=jE),void 0===e&&(e=!0);const s={L:[],xU:[],PU:[]},n=sx(t),r=new oi,h=!1;if(fx(n),Ue(n,t=>"\n"!==t,r),r.ac>=n.length)return s;if(r.Ly(1),"\n"!==n.charAt(r.ac)){ax(nx(n,r,h,!0,s,i,e),s)}else r.Ly(1);for(Ue(n,t=>"\n"===t,r);r.ac"\n"===t,r)}return s}function sx(t){const i=zh(t,"\0"," "),e=zh(i,"\r\n","\n");return zh(e,"\r","\n")}function Ue(t,i,e){const s=e.ac;for(;e.ac"\n"!==t,i),a++,i.ac>=t.length?d=!0:i.Ly(1),nl(o,"--\x3e")){if(s||1!==a&&(2!==a||l)){i.Oy(u);break}l=!0,u=i.ac,f=new xE(0,0,"",!1,c);try{ux(o,n.xU,f,r,h),c=""}catch(t){zd.um(t),f=null}}else{if(""===o)break;s&&Xt(o,"X-TIMESTAMP-MAP")&&(n.IU=rx(o)),s||2!==a||e||(Jh("STYLE",c.replace(/ /g,""))?(v={Km:vE.xO},c=""):Jh("REGION",c.replace(/ /g,""))&&(_=new NE("",100,3,0,100,0,100,""),c="")),c&&(c+="\n"),c+=o,u=i.ac}if(f)return f.U=c,f;if(v);else if(_)return function(t,i){const e=t.split(/\s/),s=":";for(const t of e)if(0!==t.length&&nl(t,s)&&t.charAt(0)!==s&&t.charAt(t.length-1)!==s){const e=t.indexOf(s),n=t.substring(0,e),r=t.substring(e+1,t.length);switch(n.toUpperCase()){case"ID":kx(r,i);break;case"WIDTH":Px(r,i);break;case"LINES":xx(r,i);break;case"REGIONANCHOR":{const t=Tx(r);t&&(i.$O=t[0],i.tF=t[1]);break}case"VIEWPORTANCHOR":{const t=Tx(r);t&&(i.eF=t[0],i.sF=t[1]);break}case"SCROLL":Ex(r,i)}}}(c,_),_;return null}function rx(t){const i=t.split("=")[1].trim().split(","),e=ox(i[0].trim(),"MPEGTS")?i[0]:i[1],s=ox(i[0].trim(),"LOCAL")?i[0]:i[1];var n;return{CU:hx(Number(e.split(/:(.*)/)[1].trim())||0),bh:ul.hU(null!=(n=Ku(s.split(/:(.*)/)[1].trim(),new oi))?n:0)}}function hx(t){return ul.bF(t,9e4)}function ox(t,i){return Xt(t,i)}function ax(t,i){t&&function(t){return"cue"===t.Km}(t)?i.L.push(t):t&&function(t){return"region"===t.Km}(t)?i.xU.push(t):t&&function(t){return"stylesheet"===t.Km}(t)&&i.PU.push(t)}function ux(t,i,e,s,n){const r=new oi;_x(t,r);const h=cx(Ku(t,r),s,n);if(_x(t,r),"--\x3e"!==t.substring(r.ac,r.ac+3))throw m("Something went wrong with parsing a WebVTT Cue");r.Ly(3),_x(t,r);const o=cx(Ku(t,r),s,n);e.YO(h,o);!function(t,i,e){const s=t.split(/\s/),n=":";for(const t of s)if(0!==t.length&&nl(t,n)&&t.charAt(0)!==n&&t.charAt(t.length-1)!==n){const s=t.indexOf(n),r=t.substring(0,s),h=t.substring(s+1,t.length);switch(r.toUpperCase()){case"REGION":yx(h,i,e);break;case"VERTICAL":Ax(h,i);break;case"D":Sx(h,i);break;case"LINE":case"L":mx(h,i);break;case"POSITION":case"T":wx(h,i);break;case"SIZE":case"S":bx(h,i);break;case"ALIGN":case"A":px(h,i)}}}(t.substring(r.ac,t.length),e,i)}function cx(t,i,e){return e?t+i.TU:t}function dx(t){return/^[0-9]$/.test(t)}function Ku(t,i){const e=zh(t,",",".");let s,n,r,h=!1;if(i.ac>=e.length||!dx(e.charAt(i.ac)))throw new m("Something went wrong with parsing a WebVTT Cue timestamp");const o=Ue(e,dx,i),a=x(o,10);if((o.length>2||a>59)&&(h=!0),i.ac>=e.length||":"!==e.charAt(i.ac))throw new m("Something went wrong with parsing a WebVTT Cue timestamp");i.Ly(1);const u=Ue(e,dx,i);if(2!==u.length)throw new m("Something went wrong with parsing a WebVTT Cue timestamp");const c=x(u,10);if(h||i.ac=e.length||":"!==e.charAt(i.ac))throw new m("Something went wrong with parsing a WebVTT Cue timestamp");i.Ly(1);const t=Ue(e,dx,i);if(2!==u.length)throw new m("Something went wrong with parsing a WebVTT Cue timestamp");s=a,n=c,r=x(t,10)}else s=0,n=a,r=c;if(i.ac>=e.length||"."!==e.charAt(i.ac))throw new m("Something went wrong with parsing a WebVTT Cue timestamp");i.Ly(1);const d=Ue(e,dx,i),l=x(d,10);if(c>59||r>59)throw new m("Something went wrong with parsing a WebVTT Cue timestamp");return 60*s*60+60*n+r+l/1e3}function lx(t){return fx(sx(t))}function fx(t){if(t.length<6)return!1;for(const i of QE)if(Xt(t,i))return!0;return!1}function vx(t){return Ct(KE,t)}function _x(t,i){for(;i.ac-1){const e=C(t.substring(0,i));if(!S(e)&&e>=0&&e<=100)return e}return null}function px(t,i){const e=t.toLowerCase();switch(e){case"start":case"center":case"end":case"left":case"right":i.DO=e;break;case"middle":i.DO="center"}}function mx(t,i){let e,s;const n=t.indexOf(",");if(n>=0?(e=t.substring(0,n),s=t.substring(n+1,t.length)):(e=t,s=""),!JE.test(e))return;let r,h;if(Rc(e,"%")){const t=gx(e);if(null===t)return;r=t,h=!1}else{if(!ZE.test(e)||e.lastIndexOf("-")>0)return;const t=e.indexOf(".");if(t>=0&&(t!==e.lastIndexOf(".")||!tx.test(e)||$E.test(e)))return;if(r=C(e),S(r))return;h=!0}switch(i.BO=r,i.FO=h,s=s.toLowerCase(),s){case"start":case"center":case"end":i.MO=s;break;case"middle":i.MO="center"}}function wx(t,i){let e,s;const n=t.indexOf(",");n>=0?(e=t.substring(0,n),s=t.substring(n+1,t.length)):(e=t,s="");const r=gx(e);if(null!==r)switch(i.mo=r,s=s.toLowerCase(),s){case"line-left":case"center":case"line-right":case"auto":i.LO=s;break;case"start":i.LO="line-left";break;case"middle":i.LO="center";break;case"end":i.LO="line-right"}}function yx(t,i,e){const s=dr(e,i=>i.o===t);void 0!==s&&(i.OO=s)}function bx(t,i){const e=gx(t);null!==e&&(i.Wy=e)}function Ax(t,i){switch(t.toLowerCase()){case"rl":case"vertical:rl":case"vertical-rl":i.Pt="rl";break;case"lr":case"vertical:lr":case"vertical-lr":i.Pt="lr";break;default:i.Pt=""}}function Sx(t,i){"VERTICAL"===t.toUpperCase()?i.Pt="rl":"VERTICAL-LR"===t.toUpperCase()&&(i.Pt="lr")}function Tx(t){if(t.indexOf(",")>=0){const i=gx(t.substring(0,t.indexOf(","))),e=gx(t.substring(t.indexOf(",")+1,t.length));return[No(i||0,0,100),No(e||100,0,100)]}return null}function kx(t,i){i.o=t}function Ex(t,i){"up"===t.toLowerCase()&&(i.iF="up")}function xx(t,i){YE.test(t)&&(i.ZO=x(t))}function Px(t,i){const e=gx(t);null!==e&&(i.Ti=e)}function Ix(t){return t&&"ix"in t?t.ix:t}r(),r(),r();var Cx=class extends Oh{get RU(){return this.DU}get NU(){return this.BU}get xU(){return this.MU}get LU(){return this.OU}get Ca(){return this.hu||(this.hu=function(t){return Gi(U(t),{get extent(){return t.RU},get styles(){return t.NU},get regions(){return t.xU},get metadata(){return Ix(t.LU)},get content(){return Ix(t.U)}})}(this)),this.hu}KO(t){return!!Gr(this.RU,t.RU)&&(!!Gr(this.NU,t.NU)&&(!!Gr(this.xU,t.xU)&&(this.LU&&t.LU?!!this.LU.jE(t.LU)&&(this.U&&t.U?this.U.jE(t.U):this.U===t.U):this.LU===t.LU)))}constructor(t,i,e,s,n,r,h,o){super(t,i,e,s),this.DU=void 0,this.BU=void 0,this.MU=void 0,this.OU=void 0,this.DU=n,this.BU=r,this.MU=h,this.OU=o||void 0}};r();var Rx=class{get FU(){return this.Lf.QE(!0)}get CO(){return this.UU}get RO(){return this.VU}constructor(t,i,e){this.Lf=void 0,this.UU=void 0,this.VU=void 0,this.UU=t,this.VU=i,JA(e)?this.Lf=function(t,i,e){for(const t of["begin","end","dur"])e.lx(t);return e}(0,0,e):this.Lf=e}};r();var Dx="http://www.w3.org/XML/1998/namespace";function Nx(t,i,e,s){let n=t.tx(e,i);return 0===n.length&&(n=t.ZE(s+":"+i)),n}function Bx(t){const i={};for(const e of t.nx)i[e.WE]=e.XE;return i}var Mx=/^(\d\d+):(\d\d):(\d+)((\.(\d+))?|(:(\d\d+)(\.(\d+))?))$/,Lx=/^(\d+)(\.(\d+))?(h|m|s|ms|f|t)$/,Ox="http://www.w3.org/ns/ttml";function Fx(t,i,e,s){void 0===e&&(e=jE),void 0===s&&(s=Yy);let n=[];const r=dh(t);return s===Jy?n=function(t,i,e){const s=Hn.PD(t),n=wT(s,ui.WR);if(!n)return[];return Hx(dh(n.lk),i,e)}(r,i,e):s===Yy&&(n=Hx(r,i,e)),n}function Ux(t,i,e){return void 0===e&&(e=jE),Wx(t,i,e)}function Vx(t,i){const e=Kx(i.FU),s={};for(const i of e)s[i]=t[i];return s}function Hx(t,i,e){return Wx(hm(t,new oi),i,e)}function Wx(t,i,e){const s=[];let n;try{n=zd.HE(t)}catch(t){return s}const r=n.mx;if("tt"!==r.WE)return s;const h=r.tx(Ox,"head")[0],o=r.tx(Ox,"body")[0];if(!o||!h)return s;const a=zx(r.ox("tts:extent")),u=a?{width:a[0],height:a[1]}:void 0,c=function(t){const i={},e=t.tx(Ox,"styling")[0],s=e&&e.tx(Ox,"style")||[];for(const t of s){i[t.ux(Dx,"id")]=Bx(t)}return i}(h),d=function(t){const i={},e=t.tx(Ox,"layout")[0],s=e&&e.tx(Ox,"region")||[];for(const t of s){const e=t.ux(Dx,"id");if(!e)continue;i[e]=Bx(t);const s=Qx(t);for(const t in s)_u.call(s,t)&&(i[e][t]=s[t])}return i}(h),l=a?function(t,i){const e=ru(t);for(const t of w.keys(e)){const s=zx(e[t].extent);if(s){const n=qx(s[0],i[0]),r=qx(s[1],i[1]);e[t].extent=n+" "+r}const n=zx(e[t].origin);if(n){const s=qx(n[0],i[0]),r=qx(n[1],i[1]);e[t].origin=s+" "+r}}return e}(d,a):d,f=h.tx(Ox,"metadata")[0],v=Gx(o,e.TU,e.kU,e.EU);for(const t of v){const i=Vx(l,t);s.push(new Cx(t.CO,t.RO,t.FU,!1,u,c,i,f))}return s}function qx(t,i){return t/i*100+"%"}function zx(t){if(!t)return;const i=t.split(" ",2);if(2!==i.length)return;const[e,s]=i;if(!Rc(e,"px")||!Rc(s,"px"))return;return[Number(e.slice(0,-2)),Number(s.slice(0,-2))]}function Gx(t,i,e,s){let n,r=i,h=e,o=[];const a=[];if(JA(t)){var u,c;r=null!=(u=jx(t.ox("begin"),s))?u:r,n=jx(t.ox("dur"),0),h=null!=(c=jx(t.ox("end"),s))?c:void 0!==n?r+n:h;const i=t.KE;for(let e=0;e1||(o=o.concat(Gx(i[e],r,h,s)))}const d=function(t,i,e){const s=[];s.push(t,i);for(const t of e)s.push(t.CO,t.RO);s.sort(Nu);let n=s.length;for(let t=0;t0){const s=t.QE(!1);e.forEach(t=>s.sx(t.FU)),a.push(new Rx(d[i],d[i+1],s))}}return a}function Xx(t,i,e){const s=[];for(let n=0;n=t&&h<=i||r=i||rt)&&s.push(e[n])}return s}function jx(t,i){if(t){if(Mx.test(t)){const e=Mx.exec(t);if(!e)return;const s=Number(e[1])||0,n=Number(e[2])||0,r=Number(e[3])||0,h=e[6];return 3600*s+60*n+r+(h?Number(h)*.1**h.length:0)+i}if(Lx.test(t)){const e=Lx.exec(t);if(!e)return;const s=Number(e[1]);let n;switch(e[4]){case"h":n=3600*s;break;case"m":n=60*s;break;case"s":n=s;break;case"ms":n=.001*s;break;default:n=NaN}return n+i}}}function Qx(t){const i={},e=t.ZE("style")||[];for(const t of e){const e=Bx(t);for(const t in e)_u.call(e,t)&&(i[t]=e[t])}return i}function Kx(t){let i,e=[];if(JA(t)){i=t.ox("region"),i&&e.push(i);const s=t.KE;for(let t=0;te)break;i<=n.RO&&!Ct(s,n)&&s.push(n)}}function cP(t,i){return xc(t.JI,i.JI)}function dP(t,i,e,s){const n=function(t){switch(t){case nh.WEBVTT:return"WebVTT";case nh.SRT:return"SRT";case nh.TTML:return"TTML";default:return""}}(t);return new iP(me.SUBTITLE_PARSE_ERROR,"Could not parse the "+(n?n+" ":"")+"subtitle file.",i,e,s)}function Re(t,i){const e=[];for(const s of t.L.NI)if(s.RO<=i)e.push(s);else if(s.CO>=i)break;for(const i of e)t.XU(i)}function lP(t,i){if(t.V>0){const e=t.Tn(0),s=_.max(0,e-10);for(const t of i)t.jU(s)}}var ms=class extends Ne{get EU(){return this.QU}set EU(t){this.QU=t;for(const i of this.Z.NI)i.EU=t}tt(t){t.wn(Te.pa,this.KU),t.EU=this.EU,this.Z.tt(t),this.YU(t)}it(t){t.mn(Te.pa,this.KU),t.Qk=xh.Nh,this.Z.it(t)}JU(t){}ZU(t){}YU(t){t.Qk!==xh.Nh?this.JU(t):this.ZU(t)}$U(){for(const t of this.Z.NI)t.mn(Te.pa,this.KU),t.kn()}jU(t){if(t>0)for(const i of this.Z.NI)Re(i,t)}tV(t){const i=this.iV;if(t===i)return;this.iV=t;const e=this.Z.NI.slice();for(const s of e){const e=this.eV(s,i,t);s!==e&&(this.it(s),this.tt(e),s.kn())}}hr(){return this.$U(),this.Z.hr(),Promise.resolve()}async kn(){this.Vo(),await this.hr(),this.Z.kn()}constructor(t){super(),this.iV=void 0,this.Z=new bc,this.QU=0,this.KU=t=>{const i=t.Ht;this.YU(i)},this.iV=t}};function ht(t,i,e){const s=e.sI(t.Lt,t.o,t.Th,t.bs,t.sV,t.Km,t.nC,t.ZI);s.rC=t.rC,s.AP=t.AP,s.eC=t.eC,s.EU=t.EU;const n=t.L.NI.slice();for(const i of n)t.XU(i),s.nV(i);return s.Qk=t.Qk,i.rV(t),s}r();var fP=class extends Oi{get error(){return this.errorObject.message}xa(){return this}constructor(t){super(hc.ma),this.errorObject=void 0,this.errorObject=t}},eu=class extends ms{hV(t){if(!t.src)return;const i=t.kind||us.HU,e=this.iV.sI(i,t.id,t.label,t.srclang,t.default);return e.rC=Vn(t.src),this.tt(e),e}async oV(t,i){t.AP=dc.LOADING;const e=new ro({Yu:t.rC,fk:Bi.LT,Hk:Qe.GET,Yg:i});let s,n;try{const t=await this.aV.vk(e);n=t.dk,s=await t.HT()}catch(i){return sa(i),t.AP=dc.ERROR,void t.So(new fP(function(t,i){let e=i,s=0;if(Ei(t)&&t.name===EA.rE)e=t.vk.Yu;else if(Qn(t)){const i=t.uE;if(e=i.wk,s=i.dk,0===s)return new iP(me.SUBTITLE_CORS_ERROR,"Could not load the subtitle file. Make sure the source is set correctly and that CORS support is enabled.",e,s,t)}return new iP(me.SUBTITLE_LOAD_ERROR,"Could not load the subtitle file.",e,s,t)}(i,t.rC)))}try{const i=function(t){return lx(t)?nh.WEBVTT:Jx(t)?nh.TTML:nh.SRT}(s);t.Km=i;let e=[];if(i===nh.WEBVTT||i===nh.SRT){e=ex(s).L}else i===nh.TTML&&(e=Ux(s,t));for(const i of e)t.nV(i)}catch(i){return sa(i),t.AP=dc.ERROR,void t.So(new fP(dP(t.Km,t.rC,n,i)))}t.AP=dc.LOADED}JU(t){Ct(this.Z.NI,t)&&t.AP===dc.NONE&&this.oV(t,this.uV.Yg).catch(bu)}Un(){}eV(t,i,e){return ht(t,i,e)}async hr(){this.uV.Zg(),this.uV=new Zc;for(const t of this.Z.NI)this.iV.rV(t);await super.hr()}constructor(t,i){super(t),this.aV=void 0,this.uV=new Zc,this.aV=i}};function vP(t){return"TXXX"===t.id||"TXX"===t.id}r(),r();var _P=class extends ms{cV(){this.dV.wn(N.rI,this.lV),this.dV.wn(N.oI,this.fV)}vV(){this.dV.mn(N.rI,this.lV),this.dV.mn(N.oI,this.fV)}_V(t){const i=t.L.NI[0];if(!gP(i))return;const e=function(t){const i=t.match(pP);if(!i)return;return{Ht:i[1],bs:i[2]}}(i.U.description),s=e.Ht,n=e.bs;if(this.gV(s,n))return;const r=this.iV.sI(us.HU,t.o,s,n,!1,nh.TTML);this.tt(r),this.pV.set(t.JI,r);for(const i of t.L.NI)gP(i)&&this.mV(i);t.wn(Te.uI,this.wV)}gV(t,i){return this.Z.NI.some(e=>e.Th===t&&e.bs===i)}mV(t){if(!t.Ht)return;const i=this.pV.get(t.Ht.JI),e=Ux(t.U.text,i,{TU:0,kU:1/0,EU:t.CO});for(const t of e)i.nV(t)}eV(t,i,e){const s=ht(t,i,e);return this.pV.forEach((i,e)=>{i===t&&this.pV.set(e,s)}),s}async hr(){for(const t of this.dV.NI)t.mn(Te.kI,this.lV),t.mn(Te.uI,this.yV),t.mn(Te.uI,this.wV);for(const t of this.Z.NI)this.iV.rV(t);this.pV.clear(),await super.hr()}async kn(){this.vV(),await super.kn()}constructor(t,i){super(t),this.dV=void 0,this.pV=void 0,this.bV=void 0,this.lV=void 0,this.yV=void 0,this.fV=void 0,this.wV=void 0,this.dV=i,this.pV=re(),this.bV=t=>{t.mn(Te.kI,this.lV),t.Km?t.Km===nh.ID3&&(t.mn(Te.uI,this.yV),0!==t.L.V?this._V(t):t.wn(Te.uI,this.yV)):t.wn(Te.kI,this.lV)},this.lV=t=>{this.bV(t.Ht)},this.yV=t=>{this.bV(t.PO.Ht)},this.fV=t=>{const i=t.Ht;if(i.Km!==nh.ID3||!this.pV.has(i.JI))return;const e=this.pV.get(i.JI);this.it(e),this.iV.rV(e),i.mn(Te.kI,this.lV),i.mn(Te.uI,this.yV),i.mn(Te.uI,this.wV)},this.wV=t=>{gP(t.PO)&&this.mV(t.PO)},this.cV()}};function gP(t){return function(t){return vP(t)&&pP.test(t.description)}(t.U)}var pP=/^Track:(.+),Lang:(.+)$/;function mP(t,i){for(const e of t)if(e.Lt===i&&e.sV)return e}function wP(t,i){yP(mP(t.NI,i))}function yP(t){void 0!==t&&(t.Qk=xh.Kn)}function bP(t,i){const e=mP(t.NI,i)||function(t,i){for(const e of t)if(e.Lt===i)return e}(t.NI,i);yP(e)}function AP(t){for(const i of Zx)i===us.Yn?bP(t,i):wP(t,i)}r(),r();var Vs=class extends gp{constructor(){super(d.Jw)}};r(),r();var O=function(t){return t[t.AV=0]="AV",t[t.SV=1]="SV",t}({});r(),r();var SP=class extends gp{constructor(t){super(Jr.xM),this.currentTime=void 0,this.currentTime=t}};r();var mo=class extends gp{constructor(t){super(Jr.PM),this.currentTime=void 0,this.currentTime=t}},TP=[Jr.AI,Jr.PM,d.uo,d.jw],_s=class extends Ne{TV(t,i){!this.kV&&i>=Lr.Qn&&(this.kV=!0,this.So(new Tt(t,i)))}EV(t,i){!this.xV&&i>=Lr.GL&&(this.xV=!0,this.So(new M(t,i)))}PV(t,i){this.CV||(i>=Lr.XL&&this.RV=Lr.XL)&&this.So(new mo(t))}BV(t,i){!this.MV(i)||this.DV.Qx||this.DV.lt||this.So(new SP(t))}LV(t,i){this.RV<=Lr.GL&&i>=Lr.XL&&this.So(new Is(t,i))}OV(t,i){i===Lr.jL&&this.So(new Zi(t,i))}MV(t){const i=!this.DV.lP&&t<=Lr.GL,e=!this.FV&&this.RV<=Lr.GL;return i&&!e}get NV(){return!this.DV.lP&&this.FV}hr(){this.RV=Lr.zL,this.FV=!0,this.xV=!1,this.kV=!1}kn(){this.Vo(),this.CV&&this.DV.mn(Jr.PM,this.VV),this.DV.mn(d.uo,this.HV),this.DV.mn(d.jw,this.WV),this.DV.mn(Jr.AI,this.qV)}constructor(t,i=!1){super(),this.DV=void 0,this.CV=void 0,this.RV=void 0,this.FV=void 0,this.xV=void 0,this.kV=void 0,this.qV=void 0,this.HV=void 0,this.WV=void 0,this.VV=void 0,this.DV=t,this.CV=i,this.RV=Lr.zL,this.FV=!0,this.xV=!1,this.kV=!1,this.qV=t=>{const i=this.DV.zx,e=this.DV.AP;e!==this.RV&&this.So(new Ka(i,e)),e===Lr.zL&&(this.xV=!1,this.kV=!1),this.TV(i,e),this.EV(i,e),this.LV(i,e),this.OV(i,e),this.PV(i,e),this.BV(i,e),this.RV=e},this.HV=()=>{const t=this.DV.zx;this.BV(t,this.RV),this.PV(t,this.RV),this.FV=this.DV.lP},this.WV=()=>{this.FV=this.DV.lP},this.VV=()=>{this.So(new mo(this.DV.zx))},this.DV.wn(Jr.AI,this.qV),this.DV.wn(d.uo,this.HV),this.DV.wn(d.jw,this.WV),this.CV&&this.DV.wn(Jr.PM,this.VV)}};r();var Gt=class extends Ne{get zx(){return this.oa.zx}get Qx(){return this.oa.Qx}get lt(){return this.PL.lt}get lP(){return this.PL.lP}get AP(){return this.oa.AP}zg(){this.Vo(),this.PL.mn(TP,this.Rs)}zV(){this.So(new Ka(this.zx,this.AP))}constructor(t,i){super(),this.oa=void 0,this.PL=void 0,this.oa=t,this.PL=i,this.PL.wn(TP,this.Rs)}};r(),r(),r(),r();var Du=class{GV(){return this.XV}jV(t){this.XV=t}get Dx(){return this.aV}get QV(){return!1}get KV(){const t=this.YV.certificate;if(t)return Q(t)?Cn(t):aa(t)}JV(){return this.YV.licenseAcquisitionURL||this.GV()}get ZV(){return!1}$V(t){return Promise.resolve()}tH(t,i){return Promise.resolve(void 0)}get Xk(){return Boolean(this.YV.useCredentials)}async iH(t,i,e,s){const n=this.eH(t,i,e,s);if(""===n.Yu)throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");try{const t=await this.Dx.vk(n);return await t.WT(i)}catch(t){return sa(t),void await this.sH(t,n.Yu,s)}}eH(t,i,e,s){const n=this.nH().OT(),r=this.Xk,h={Yu:this.rH(),fk:i,_k:n,XT:t,Xk:r,Hk:Qe.POST,Wk:0,Yg:s,Km:q.Tk,zk:e};return new ro(h)}hH(t,i){return Promise.resolve(t)}oH(t,i,e,s){return Promise.resolve(t)}nH(){return new cc(this.YV.headers||{})}async sH(t,i,e){throw new fs(me.CONTENT_PROTECTION_LICENSE_ERROR,"Error during license server request",t)}rH(t,i){let e=i;const s=this.YV.queryParameters;if(!e){const t=this.JV();if(!t)return"";e=t}if(s||t){const i=zd.Dh(e);t&&AA(i,t),s&&AA(i,s),e=i.href}return e}aH(t,i){return kP(t)}uH(t){return new j(t)}async cH(t,i,e){const s=await this.aH(t,e),n=await this.iH(s,this.dH,i,e);return this.uH(n)}kn(){}constructor(t,i,e,s,n){this.xS=void 0,this.lH=void 0,this.fH=void 0,this.YV=void 0,this.aV=void 0,this.XV=void 0,this.dH=void 0,this.xS=t,this.lH=i,this.fH=e,this.aV=s,this.dH=n,this.YV=this.vH(i)}};function kP(t){return Promise.resolve(nr(t).buffer)}var Hc=class extends Du{vH(t){return t.widevine||{}}async _H(t,i){return this.KV?this.KV:this.gH(new j(t),i)}gH(t,i){return super.cH(t,he.Ik,i)}constructor(t,i,e,s){super(ot,t,i,e,s)}};r();var Wo=function(t){return t.zm="Widevine",t.pH="PlayreadyV2",t.mH="PlayreadyV3",t.qm="PlayreadyV2",t.jm="Fairplay",t}({}),EP={Widevine:{DRMProvider:"Google",DRMVersion:"1.4.8.86",DRMType:"Widevine"},PlayreadyV2:{DRMProvider:"Microsoft",DRMVersion:"2.9",DRMType:"Playready"},PlayreadyV3:{DRMProvider:"Microsoft",DRMVersion:"3",DRMType:"Playready"},Fairplay:{DRMProvider:"Apple",DRMType:"FairPlay",DRMVersion:"1.0"}};function xP(t,i){var e,s,n,r;const h=EP[i],o=t.accountName;return{CustomerName:t.customerName,AccountName:o,PortalId:t.portalId,FriendlyName:t.friendlyName,DeviceInfo:{FormatVersion:"1",DeviceType:"PC",OSType:null==(e=zd.Em)?void 0:e.Zs,OSVersion:null==(s=zd.Em)?void 0:s.Lm,DRMProvider:h.DRMProvider,DRMVersion:h.DRMVersion,DRMType:h.DRMType,DeviceVendor:null==(n=zd.Em)?void 0:n.Om,DeviceModel:null==(r=zd.Em)?void 0:r.Fm}}}function PP(t,i){if(!t.accountName)throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, accountName is not set.");if(!t.customerName)throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, customerName is not set.");if(!t.portalId)throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, portalId is not set.");throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration.")}function IP(t,i,e){let s;if(DT(t))s={AuthToken:t.authToken,Payload:i};else{if(!NT(t))throw PP(t,e);s={LatensRegistration:xP(t,e),Payload:i}}return ll(JSON.stringify(s))}async function CP(t,i,e){const s=t.uE;if(!s)throw new fs(me.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium server request",t,i);const n=s;let r,h;try{r=await n.VT(e),h=function(t){if(t){if(t.WvProxyErr)return t.WvProxyErr.desc;if(t.DrmErr)return t.DrmErr.desc}return}(r)}catch(t){h=""}throw new fs(me.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium server request",t,n.vk.Yu,n.dk,n.gk,h)}r();var RP=class extends Hc{static wH(){return zd.Zs.yp?"required":"optional"}sH(t,i,e){return CP(t,i,e)}$V(t){return this.yH?ua(this.yH.Yy,t):(this.yH=new Ga,Promise.resolve())}async aH(t,i){const e=this.lH;if(!e)throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium Widevine DRM configuration.");return IP(e,wa(t),Wo.zm)}uH(t){let i;if(!t.license)throw new fs(me.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Titanium Widevine license server");return i=Cn(t.license),i}bH(t){return Promise.resolve(new j(t))}async _H(t,i){this.AH();const e=await this.aH(t,i),s=await this.iH(e,Bi.NT,he.Ck,i);return await this.bH(s)}async gH(t,i){const e=await super.gH(t,i);return this.AH(),e}AH(){this.yH||(this.yH=new Ga),this.yH.Qy()}kn(){this.yH&&this.yH.Zg(),super.kn()}constructor(t,i,e){super(t,i,e,Bi.BT),this.yH=void 0}};r();var DP=class extends Hc{get SH(){if(BT(this.lH))return this.lH.token}async aH(t,i){const e=await kP(t),s=this.fH,n=am(new j(e)),r=this.SH;if(void 0===r)throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The Widevine vuDRM token has not been correctly configured.");return JSON.stringify({token:r,drm_info:n,kid:s})}constructor(t,i,e){super(t,i,e,Bi.NT),this.jV("https://widevine-proxy.drm.technology/proxy")}};function NP(t,i){let e=i||{};return t.ticket&&t.sessionId&&(e=Y({},e,{SessionId:t.sessionId,Ticket:t.ticket})),Y({},e,{CrmId:t.crmId,AccountId:t.accountId,ContentId:t.contentId})}r(),r();var BP=class extends Hc{rH(t,i){let e=t;return Fr(this.lH)&&(e=NP(this.lH,e)),super.rH(e,i)}constructor(t,i,e){super(t,i,e,Bi.NT),this.jV("https://emeademo.dev.ott.irdeto.com/Widevine/getlicense")}};r(),r();var MP="Conax-Custom-Data";function LP(t,i,e){const s=t&&IT(t)&&t;if(s&&!e.has(MP)){const t=vT(s)?s.token:void 0,n=vT(s)?s.deviceId:void 0,r=JSON.stringify({Version:"1.0.0",CxAuthenticationDataToken:t,CxClientInfo:{DeviceType:"Browser",DrmClientType:i+"-HTML5",DrmClientVersion:"1.0.0",CxDeviceId:n}});e.set(MP,r)}return e}var OP=class extends Hc{nH(){const t=super.nH();return LP(this.lH,"Widevine",t)}constructor(t,i,e){super(t,i,e,Bi.NT),this.jV("https://connect.conax.com:8094/license")}};function FP(t){const i=io(new j(t));return Cn(JSON.parse(i).license)}function UP(t){return"string"==typeof t.token?t.token:ll(JSON.stringify({userId:t.userId,sessionId:t.sessionId,merchant:t.merchant}))}function VP(t,i,e){let s;return s=e.token?"x-dt-auth-token":"dt-custom-data",t.set(s,i),t}r(),r();var HP=class extends Hc{get SH(){return UP(this.lH)}uH(t){return FP(t)}nH(){return VP(super.nH(),this.SH,this.lH)}constructor(t,i,e){super(t,i,e,Bi.NT),this.jV("https://lic.drmtoday.com/license-proxy-widevine/cenc/")}};r();var WP=class extends Hc{nH(){const t=super.nH(),i=this.lH.token;return t.set("Authorization","Bearer "+i),t}constructor(t,i,e){super(t,i,e,Bi.NT)}};async function qP(t,i,e,s){if(!MT(t))throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Xstream DRM Configuration");const n=new cc;n.append("Cache-Control","no-cache"),n.append("Content-Type","application/json");const r=t.sessionId;r&&n.append("XSSESSION",r);const h=t.streamId;let o;o=t.fairplay?"persistent"===t.fairplay.licenseType?"persistent":"non-persistent":t.widevine&&"persistent"===t.widevine.licenseType?"persistent":"non-persistent";const a={drmType:i,licenseType:o,streamId:h},u={Yu:t.ticketAcquisitionURL,fk:Bi.BT,_k:n,Hk:Qe.POST,XT:JSON.stringify(a),Yg:s},c=await e.vk(u);return await c.VT()}r(),r();var zP=class extends Hc{nH(){const t=super.nH();return t.set("Content-Type","application/json"),t}async aH(t,i){const e=pm(t.buffer),s=this.lH,n=await qP(s,"widevine_modular",this.Dx,i);this.jV(n.licenseServerUrl);const r=Gc(JSON.stringify({payload:e,ticket:n.ticket}));return super.aH(r,i)}uH(t){return Cn(t.license)}constructor(t,i,e){super(t,i,e,Bi.BT)}};r();var GP=class extends Hc{nH(){if(!LT(this.lH))throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");const t=super.nH();return t.set("X-AxDRM-Message",this.lH.token),t}constructor(t,i,e){super(t,i,e,Bi.NT)}};function XP(t){const i=new j(2*t.length);for(let e=0;e=1&&t[0].KE.length>0}tH(t){const i=this.lH.playready.customData;if(i){const t=XP(i),e=XP(''+wa(t)+"");return Promise.resolve({playready:{GS:e}})}return super.tH(t)}async aH(t,i){const e=await kP(t);return this.EH(e)}async EH(t){var i,e;let s=null;const n=zc(new DataView(t),new oi,!0);let r;try{r=zd.HE(n)}catch(t){return s}const h=null==(i=r.ZE("PlayReadyKeyMessage")[0])?void 0:i.ZE("LicenseAcquisition")[0];var o;const a=null!=(o=null==h?void 0:h.ZE("Challenge"))?o:[];this.kH(a)&&(s=gm(a[0].hx));const u=new cc;var c;const d=null!=(c=null==h||null==(e=h.ZE("HttpHeaders")[0])?void 0:e.ZE("HttpHeader"))?c:[];for(const t of d){const i=t.ZE("name")[0].hx,e=t.ZE("value")[0].hx;u.append(i,e)}return this.TH=u,s}_H(t,i){return Promise.resolve(t)}gH(t,i){return super.cH(t,he.Rk,i)}constructor(t,i,e){super(Jg,t,i,e,Bi.NT),this.TH=void 0}};r(),r();var jP=class t{static xH(t){return"3"===t.version?Wo.mH:Wo.pH}PH(){const t={};if(this.XA===Wo.mH){const i={LatensRegistration:xP(this.IH,Wo.mH)};t["X-TITANIUM-DRM-CDATA"]=ll(JSON.stringify(i))}return t}get CH(){return this.XA}get FS(){return this.XA===Wo.pH}constructor(i){this.IH=void 0,this.XA=void 0,this.IH=i,this.XA=t.xH(i)}};var QP=class extends Jc{tH(t){const i=this.lH;if(!this.lH)throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium PlayReady DRM configuration.");if(NT(i)){const t={};return t.playready={GS:KP(i,this.RH.CH)},Promise.resolve(t)}return Promise.reject(PP(i,Wo.qm))}nH(){const t=new cc(this.RH.PH());return t.UT(super.nH()),t}async sH(t,i,e){const s=t.uE;if(!s)throw new fs(me.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium PlayReady license request",t,i);let n,r;try{const t=await s.qT(e),i=io(new j(t)),o=zd.HE(i);if(o){const t=function(t,i){return function(t,i){const e=t.m.slice(),s=[];for(;e.length>0;){const t=e.shift();i(t)?s.push(t):e.push(...t.m)}return s}(t,t=>t.$E===i)}(o,"CustomData");var h;if(t.length>0)n=JSON.parse(t[0].hx),r=null==(h=n.DrmErr)?void 0:h.desc}}catch(t){}throw new fs(me.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium PlayReady license request",t,i,s.dk,s.gk,r)}kH(t){if(1!==t.length)throw new fs(me.CONTENT_PROTECTION_INITIALIZATION_INVALID,"PlayReady license message incorrectly formatted, Challenge not found.");return!0}constructor(t,i,e){super(t,i,e),this.RH=void 0,this.RH=new jP(this.lH)}};function KP(t,i){const e=xP(t,i),s=e.DeviceInfo.FormatVersion,n=function(t){return t.replace(/</g,"<").replace(/>/g,">")}(function(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}(""+ll(''+e.AccountName+""+e.CustomerName+""+e.PortalId+''+e.DeviceInfo.DeviceType+""+e.DeviceInfo.OSType+""+e.DeviceInfo.OSVersion+""+e.DeviceInfo.DRMProvider+""+e.DeviceInfo.DRMVersion+""+e.DeviceInfo.DRMType+""+e.DeviceInfo.DeviceVendor+""+e.DeviceInfo.DeviceModel+"")+"")),r=em(n,!0);return em(''+wa(r)+"",!0)}r();var YP=class extends Jc{get SH(){if(BT(this.lH))return this.lH.token}kH(t){if(1!==t.length)throw new fs(me.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Vudrm PlayReady license message incorrectly formatted, Challenge not found.");return!0}rH(t,i){const e=Y({},t||{},{token:this.SH});return super.rH(e,i)}constructor(t,i,e){super(t,i,e),this.jV("https://playready-license.drm.technology/rightsmanager.asmx")}};r();var JP=class extends Jc{rH(t,i){let e=t;return Fr(this.lH)&&(e=NP(this.lH,e)),super.rH(e,i)}constructor(t,i,e){super(t,i,e),this.jV("https://emeademo.dev.ott.irdeto.com/playready/rightsmanager.asmx")}};r();var ZP=class extends Jc{nH(){const t=super.nH();return LP(this.lH,"PlayReady",t)}constructor(t,i,e){super(t,i,e),this.jV("https://connect.conax.com:8010/cxplayready/rightsmanager.asmx")}};r();var $P=class extends Jc{get SH(){return UP(this.lH)}uH(t){const i=function(t){const i=io(new j(t));return Xt(i,"=0)return Promise.resolve(t.substr(i+1));{const i=t.split("skd://").pop();if(i){if(/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/.test(i))return Promise.resolve(i)}const e=t.split("/");return Promise.resolve(e[e.length-1])}}async tH(t){var i;const e=null!=(i=this.WH)?i:qc(new j(t)),s=await this.HH(e);this.UH=s;const n={};return n.fairplay={tT:s},n}nH(){const t=super.nH();return t.set("Content-Type",this.VH),t}async _H(t,i){return this.KV?this.KV:await this.qH(i)}gH(t,i){return super.cH(t,he.xk,i)}zH(t){const i=this.MH(),e=this.nH(),s={Yu:i,fk:Bi.NT,_k:e,Hk:Qe.GET,Xk:!1,XT:null,Wk:0,Yg:t,Km:q.Tk,zk:he.Pk};return new ro(s)}async qH(t){const i=this.zH(t),e=await this.Dx.vk(i),s=await e.qT();return new j(s)}uH(t){let i;if("string"==typeof t){let e=t.trim();""===e.substr(0,5)&&""===e.substr(-6)&&(e=e.slice(5,-6)),i=Cn(e)}else i=new j(t);return i}rH(t,i){let e=super.rH(t,i);return Xt(e,"skd:")&&(e=e.substr(4)),e}constructor(t,i,e,s,n){super(t.xS,i,e,s,n),this.UH="",this.LH=void 0,this.WH=void 0,this.WH=t.GH}};r();var eI=class extends ce{get VH(){return Ju.BH}HH(t){let i=t.split("://",1);return"skd"!==i[0].slice(-3).toLowerCase()?Promise.resolve(""):(i=t.split(";",2),i.length>1?Promise.resolve(i[1]):Promise.resolve(super.HH(t)))}async aH(t){return t}uH(t){return new j(t)}rH(t,i){const e=t||{};return e.p1=zo(),super.rH(e,i)}constructor(t,i,e,s){super(t,i,e,s,Bi.NT)}};r();var sI=class extends ce{get VH(){return Ju.BT}get SH(){if(!BT(this.lH))throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Token is required for FairPlay VuDrm.");return this.lH.token}FH(t,i){const e={token:this.SH,contentId:i,payload:wa(t)};return JSON.stringify(e)}uH(t){return new j(t)}nH(){const t=super.nH();return t.set("x-vudrm-token",this.SH),t}constructor(t,i,e,s){super(t,i,e,s,Bi.NT),this.jV("https://fairplay-license.drm.technology/license"),this.OH("https://fairplay-license.drm.technology/certificate")}};r();var nI="Verimatrix Fairplay license response incorrectly formatted. Invalid json.",rI="Verimatrix Fairplay license response incorrectly formatted. Ckc not found.",hI=class extends ce{uH(t){const i=function(t){let i;try{i=JSON.parse(t).ckc}catch(t){throw new fs(me.CONTENT_PROTECTION_LICENSE_INVALID,nI)}if(!i)throw new fs(me.CONTENT_PROTECTION_LICENSE_ERROR,rI);return i}(io(new DataView(t)));return super.uH(i)}constructor(t,i,e,s){super(t,i,e,s,Bi.NT)}};r();var oI=class extends ce{get VH(){return Ju.BT}async aH(t){const i=this.lH;if(!i)throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium Fairplay DRM configuration.");return IP(i,wa(t),Wo.jm)}uH(t){try{let i;if(Q(t)){const e=t.trim();i=JSON.parse(e)}else i=t;if(i.license){const t=gm(i.license);return new j(t)}throw new fs(me.CONTENT_PROTECTION_LICENSE_ERROR,"No license received from the Titanium Fairplay license server")}catch(t){throw new fs(me.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Titanium Fairplay license server")}}sH(t,i,e){return CP(t,i,e)}constructor(t,i,e,s){super(t,i,e,s,Bi.BT)}};r();var aI=class extends ce{MH(){const t=super.MH();if(!t)return t;const i=zd.Dh(t),e=this.lH;return Fr(e)&&AA(i,{accountId:e.accountId,applicationId:e.applicationId||""}),i.href}HH(t){return Fr(this.lH)?Promise.resolve(this.lH.contentId):super.HH(t)}async aH(t){return t}uH(t){return new j(t)}get VH(){return Ju.BH}rH(t,i){let e=t;return Fr(this.lH)&&(e=function(t,i){return Y({},NP(t,i),{KeyId:t.keyId})}(this.lH,e)),super.rH(e,i)}constructor(t,i,e,s){super(t,i,e,s,Bi.NT),this.jV("https://emeademo.dev.ott.irdeto.com/streaming/getckc"),this.OH("https://emeademo.dev.ott.irdeto.com/streaming/getcertificate")}};r();var uI=class extends ce{nH(){const t=super.nH();return LP(this.lH,"FairPlay",t)}async qH(t){const i={Yu:this.MH(),fk:Bi.NT,_k:{},Hk:Qe.GET,Xk:!1,XT:null,Wk:0,Yg:t,Km:q.Tk,zk:he.Pk},e=await this.Dx.vk(i),s=await e.qT();return new j(s)}async aH(t){return t}HH(t){const i=t.indexOf("?");if(0===t.indexOf("skd://")){let e;return e=i>=0?t.substring(6,i):t.substring(6),Promise.resolve(function(t){return io(Cn(t))}(e))}return Promise.resolve("unknown")}uH(t){try{const i=JSON.parse(t);return new j(gm(i.CkcMessage))}catch(t){throw new m("CFLRW-66")}}constructor(t,i,e,s){if(super(t,i,e,s,Bi.LT),!IT(i))throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Conax configuration");this.jV("https://connect.conax.com:8097/license")}};r();var cI=class extends ce{HH(t){return Xt(t,"skd://")?Promise.resolve(t.substring(6,40)):Promise.reject(new fs(me.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Error while determining the KeyOS Content ID."))}FH(t,i){return"spc="+wa(t)+"&assetId="+i}constructor(t,i,e,s){super(t,i,e,s,Bi.LT),this.jV(ST[po.jm])}};r();var dI=class extends ce{get SH(){return UP(this.lH)}FH(t,i){const e="spc="+encodeURIComponent(wa(t))+"&"+encodeURI(i);return"persistent"===this.YV.licenseType?e+"&offline=true":e}nH(){return VP(super.nH(),this.SH,this.lH)}constructor(t,i,e,s){super(t,i,e,s,Bi.LT),this.jV("https://lic.drmtoday.com/license-server-fairplay/")}};r();var lI=class extends ce{HH(t){let i=t;return Xt(i,"skd:")&&(i="http:"+i.substring(4)),Xt(i,"http:")||Xt(i,"https:")?Promise.resolve(zd.Dh(i).hostname):Promise.reject(new m("Could not parse ExpressPlay FairPlay content ID."))}async aH(t){return t}uH(t){return new j(t)}get VH(){return Ju.BH}constructor(t,i,e,s){super(t,i,e,s,Bi.NT)}};r();var fI=class extends ce{nH(){const t=super.nH(),i=this.lH.token;return t.set("Authorization","Bearer "+i),t}constructor(t,i,e,s){super(t,i,e,s,Bi.LT)}};r();var vI=class extends ce{async qH(t){const i=this.MH(),e=this.nH(),s={Yu:i,fk:Bi.BT,_k:e,Hk:Qe.POST,Yg:t,Km:q.Tk,zk:he.Pk},n=await this.Dx.vk(s),r=await n.VT();return new j(Cn(r.certificate))}get VH(){return Ju.BT}async gH(t,i,e){void 0===e&&(e=Bi.LT);const s=wa(t),n=this.lH,r=await qP(n,"fairplay",this.Dx,i),h=Gc(JSON.stringify({spc:s,ticket:r.ticket})),o={Yu:this.JV(),fk:Bi.BT,_k:this.nH(),Hk:Qe.POST,XT:h,Wk:0,Yg:i,Km:q.Tk,zk:he.xk},a=await this.Dx.vk(o);return Cn((await a.VT()).licence)}constructor(t,i,e,s){if(super(t,i,e,s,Bi.BT),!MT(i))throw new m("Invalid Xstream DRM configuration")}};r();var _I=class extends ce{FH(t,i){return wa(t)}uH(t){if(0===t.length)throw new fs(me.CONTENT_PROTECTION_LICENSE_ERROR,"Vimond license request error.");return super.uH(t)}nH(){const t=super.nH();return t.set("Content-Type","text/plain"),t}constructor(t,i,e,s){super(t,i,e,s,Bi.LT)}};r();var gI=class extends ce{get VH(){return Ju.BT}FH(t,i){return t}uH(t){return new j(t)}nH(){if(!LT(this.lH))throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");const t=super.nH();return t.set("X-AxDRM-Message",this.lH.token),t}constructor(t,i,e,s){super(t,i,e,s,Bi.NT)}};r();var pI=class extends ce{get VH(){return Ju.LT}FH(t,i){const e={spc:wa(t)};return JSON.stringify(e)}HH(t){const i=zd.Dh(t);return this.XH=t,i.searchParams.has("b")?Promise.resolve(i.searchParams.get("b")):Promise.reject(new fs(me.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Error during license server request: Could not extract content id"))}rH(t,i){let e=this.JV();return!e&&this.XH&&(e=this.XH),e&&(e=e.replace("skd://","https://")),super.rH(t,i||e)}uH(t){try{let i;if(i=Q(t)?JSON.parse(t.trim()):t,i.ckc)return Cn(i.ckc)}catch(t){throw new fs(me.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Uplynk Fairplay license server")}throw new fs(me.CONTENT_PROTECTION_LICENSE_ERROR,"No license received from the Uplynk Fairplay license server")}constructor(t,i,e,s){super(t,i,e,s,Bi.BT),this.XH=void 0}};r(),r(),r();var mI=class{jH(t){return this.QH(t)}KH(t,i){throw new g(i+" must be "+this.YH+". (Received: "+t+")")}constructor(t,i){this.QH=void 0,this.YH=void 0,this.QH=t,this.YH=i}},an=(new mI(function(t){return!0},"any"),new mI(lo,"a number")),Ye=new mI(Q,"a string"),wI=new mI(_r,"a boolean"),Pa=(new mI(Xd,"a date"),new mI(vc,"undefined")),yI=new mI(Mc,"an object"),bI=new mI(function(t){return null===t},"null");new mI(function(t){return null==t},"null or undefined");function AI(t,i){throw new g(i+" has an incorrect type")}var SI=class{jH(t){if(!Mc(t))return!1;for(const i of w.keys(this.Qp)){if(!this.Qp[i].jH(t[i]))return!1}return!0}KH(t,i){if(!Mc(t))throw new g(i+" must be an object.");for(const e of w.keys(this.Qp)){const s=this.Qp[e];if(!s.jH(t[e]))return s.KH(t[e],i+"."+String(e))}throw new g}constructor(t){this.Qp=void 0,this.Qp=t}};function Zh(t){return new SI(t)}function TI(t){return w.keys(t).map(i=>t[i])}var kI=class{jH(t){return Ct(this.JH,t)}KH(t,i){return AI(0,i)}constructor(t){this.JH=void 0,this.JH=t}};function EI(t){return new kI(t)}var xI=class{jH(t){return this.ZH.some(i=>i.jH(t))}KH(t,i){return AI(0,i)}constructor(t){this.ZH=void 0,this.ZH=t}};function Dh(){for(var t=arguments.length,i=new Array(t),e=0;ethis.$H.jH(t))}KH(t,i){if(!hi(t))throw new g(i+" must be an array.");for(let e=0;ethis.$H.jH(t[i]))}KH(t,i){if(!Mc(t))throw new g(i+" must be an object.");for(const e of w.keys(t))if(!this.$H.jH(t[e]))return this.$H.KH(t[e],i+"."+e);return AI(0,i)}constructor(t){this.$H=void 0,this.$H=t}};function CI(t){return new II(t)}var RI=class{jH(t){return this.$H().jH(t)}KH(t,i){return this.$H().KH(t,i)}constructor(t){this.$H=void 0,this.$H=Oc(t)}};var DI=Zh({responseCode:an,isException:wI,description:Ye,title:Ye,correlationId:Ye});async function NI(t,i,e,s,n){const r=function(t,i,e,s){const n={token:i.token,account:i.accountId,form:"json"},r=decodeURIComponent(bA(e,n)),h=new cc({});h.append("Content-Type","application/json");const o=wa(t),a={getFairplayLicense:{releasePid:i.releasePid,spcMessage:o}};return{Yu:r,fk:Bi.LT,_k:h,Hk:Qe.POST,XT:JSON.stringify(a),Yg:s,Km:q.Tk,zk:he.xk}}(t,i,e,n);return await async function(t,i){const e=await i.vk(t),s=await e.VT();if(DI.jH(s))throw new fs(me.CONTENT_PROTECTION_LICENSE_ERROR,s.description,void 0,t.Yu,s.responseCode);return Cn(s.getFairplayLicenseResponse.ckcResponse)}(r,s)}var BI=class extends ce{HH(t){const i=t.replace("FairPlay",this.tW.releasePid);return super.HH(i)}async gH(t,i){return await NI(t,this.tW,this.JV(),this.Dx,i)}constructor(t,i,e,s){super(t,i,e,s,Bi.NT),this.tW=void 0,this.tW=i}};r();var MI=class extends Du{vH(t){return t.clearkey||{}}async iH(t,i,e,s){const n=this.YV;if(this.JV())return super.iH(t,this.dH,e,s);if(n.keys&&n.keys.length){const t={keys:n.keys.map(t=>({kty:"oct",kid:t.id,k:t.value}))};return rm(JSON.stringify(t)).buffer}throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The clearkey license has not been configured correctly.")}_H(t,i){return Promise.resolve(new j(0))}async gH(t,i){const e=await super.cH(t,he.Dk,i),s=JSON.parse(qc(e));if(s.keys)for(const t of s.keys)t.k&&(t.k=Ip(t.k)),t.kid&&(t.kid=Ip(t.kid));return rm(JSON.stringify(s))}constructor(t,i,e,s){super(t,i,e,s,Bi.NT)}},LI=class extends MI{constructor(t,i,e){super(Xc,t,i,e)}},OI=class extends MI{constructor(t,i,e){super(tp,t,i,e)}};r();var FI=class extends Hc{};r(),r();var UI={url:"",method:"GET",headers:{},body:null,useCredentials:!1};async function VI(t,i,e){const s=jI(i),n=t.onCertificateRequest;if(!n||"function"!=typeof n)return Promise.resolve(i);const r=await ua(Promise.resolve(n.call(t,s)),e);return om(r)?aa(r):XI(Y({},UI,r))}async function HI(t,i,e,s,n){const r=t.onCertificateResponse,h=GI(i,e,s);if(!r||"function"!=typeof r)return Promise.resolve(i);return aa(await ua(Promise.resolve(r.call(t,h)),n))}async function WI(t,i,e,s){const n=await async function(t,i,e,s){const n=null==t?void 0:t.onLicenseRequest,r=zI(i,e);if(!n||"function"!=typeof n)return Promise.resolve(r);0;const h=await ua(Promise.resolve(n.call(t,r)),s);if(om(h))return aa(h).buffer;return Y({fairplaySkdUrl:void 0},UI,h)}(t,i,e,s);return n instanceof ArrayBuffer?n:XI(n)}async function qI(t,i,e,s,n,r){const h=zI(e,n),o=await async function(t,i,e,s,n){const r=null==t?void 0:t.onLicenseResponse,h=GI(i,e,s);if(!r||"function"!=typeof r)return Promise.resolve(i);0;const o=await ua(Promise.resolve(r.call(t,h)),n);return aa(o)}(t,new j(i),h,s,r);return aa(o)}function zI(t,i){return Y({},jI(t),{fairplaySkdUrl:i})}function GI(t,i,e){return{url:e.wk,status:e.dk,statusText:e.gk,headers:e._k.OT(),body:t,request:i}}function XI(t){return new ro({Yu:t.url,Hk:t.method,_k:t.headers,XT:t.body,Xk:t.useCredentials,Km:q.Tk})}function jI(t){var i;return{url:t.Yu,body:null!=(i=QI(t.XT))?i:null,headers:t._k.OT(),method:t.Hk,useCredentials:t.Xk}}function QI(t){if(t)return"string"==typeof t?rm(t):t instanceof ArrayBuffer?new j(t):Kc(t)?ye(t):void 0}var KI=class extends Jc{_H(t,i){return Promise.resolve(t)}async gH(t,i){const e=await this.EH(nr(t).buffer),s=this.eH(e,Bi.NT,he.Rk,i),n=await WI(this.iW,s,void 0,i);if(n instanceof ArrayBuffer)return new j(n);if(""===n.Yu)throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");try{const t=await this.Dx.vk(n),e=await t.qT(i);return await qI(this.iW,e,s,t,void 0,i)}catch(t){throw sa(t),new fs(me.CONTENT_PROTECTION_LICENSE_ERROR,"Error during PlayReady license request",t)}}constructor(t,i,e,s){super(t,i,e),this.iW=void 0,this.iW=s}};r();var YI=class extends FI{async _H(t,i){if(this.KV)return this.KV;const e=this.eH(t,Bi.NT,he.Ck,i),s=await VI(this.iW,e,i);if(s instanceof j)return s;if(""===s.Yu)throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The certificate request URL has not been correctly configured.");let n,r;try{n=await this.Dx.vk(s),r=await n.qT(i)}catch(t){throw sa(t),new fs(me.CONTENT_PROTECTION_CERTIFICATE_ERROR,"Error during Widevine certificate request",t)}const h=zI(e,void 0);return await HI(this.iW,new j(r),h,n,i)}async gH(t,i){const e=this.eH(t,Bi.NT,he.Ik,i),s=await WI(this.iW,e,void 0,i);if(s instanceof ArrayBuffer)return new j(s);if(""===s.Yu)throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");try{const t=await this.Dx.vk(s),n=await t.qT(i);return await qI(this.iW,n,e,t,void 0,i)}catch(t){throw sa(t),new fs(me.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Widevine license request",t)}}constructor(t,i,e,s){super(t,i,e,Bi.NT),this.iW=void 0,this.iW=s}};r();var JI=class extends ce{async _H(t,i){if(this.KV)return this.KV;const e=this.zH(i),s=await VI(this.iW,e,i);if(Kc(s))return s;try{const t=await this.Dx.vk(s),n=await t.qT(),r=zI(e,void 0);return await HI(this.iW,new j(n),r,t,i)}catch(t){throw sa(t),new fs(me.CONTENT_PROTECTION_CERTIFICATE_ERROR,"Error during FairPlay certificate request",t)}}async gH(t,i){const e=this.eH(t,Bi.NT,he.xk,i),s=await WI(this.iW,e,this.eW,i);if(s instanceof ArrayBuffer)return new j(s);if(""===s.Yu)throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");try{const t=await this.Dx.vk(s),n=await t.qT(i);return await qI(this.iW,n,e,t,this.eW,i)}catch(t){throw sa(t),new fs(me.CONTENT_PROTECTION_LICENSE_ERROR,"Error during FairPlay license request",t)}}HH(t){var i;return this.eW=t,(null==(i=this.iW)?void 0:i.extractFairplayContentId)?Promise.resolve(this.iW.extractFairplayContentId(t)):super.HH(t)}constructor(t,i,e,s,n){super(t,i,e,s,Bi.NT),this.iW=void 0,this.eW=void 0,this.iW=n}},ZI=class{sW(t,i,e,s){switch(t.xS.Km){case po.zm:return this.nW(i,e,s);case po.qm:return this.rW(i,e,s);case po.jm:return this.hW(t,i,e,s);case po.Xm:return this.oW(i,e,s);case po.Gm:default:return this.aW(i,e,s)}}nW(t,i,e){const s=function(t){return t.integration===cT&&Q(t.customIntegrationId)}(t)?t.customIntegrationId:t.integration;if(s&&A.VC.LC(s,Hg)){const n=A.VC.FC(s,Hg,t);return new YI(t,i,e,n)}switch(s){case Br:return new RP(t,i,e);case $S:return new DP(t,i,e);case ZS:return new BP(t,i,e);case YS:return new OP(t,i,e);case eT:return new HP(t,i,e);case nT:return new WP(t,i,e);case rT:return new zP(t,i,e);case oT:return new GP(t,i,e);default:return new FI(t,i,e,Bi.NT)}}rW(t,i,e){const s=t.integration;if(s&&A.VC.LC(s,Fg)){const n=A.VC.FC(s,Fg,t);return new KI(t,i,e,n)}switch(s){case Br:return new QP(t,i,e);case $S:return new YP(t,i,e);case ZS:return new JP(t,i,e);case YS:return new ZP(t,i,e);case eT:return new $P(t,i,e);case rT:return new tI(t,i,e);case oT:return new iI(t,i,e);default:return new Jc(t,i,e)}}hW(t,i,e,s){const n=i.integration;if(n&&A.VC.LC(n,de)){const r=A.VC.FC(n,de,i);return new JI(t,i,e,s,r)}switch(n){case JS:return new eI(t,i,e,s);case $S:return new sI(t,i,e,s);case tT:return new hI(t,i,e,s);case Br:return new oI(t,i,e,s);case ZS:return new aI(t,i,e,s);case YS:return new uI(t,i,e,s);case iT:return new cI(t,i,e,s);case eT:return new dI(t,i,e,s);case sT:return new lI(t,i,e,s);case nT:return new fI(t,i,e,s);case rT:return new vI(t,i,e,s);case hT:return new _I(t,i,e,s);case oT:return new gI(t,i,e,s);case aT:return new pI(t,i,e,s);case uT:return new BI(t,i,e,s);default:return new ce(t,i,e,s,Bi.LT)}}aW(t,i,e){return new LI(t,i,e)}oW(t,i,e){return new OI(t,i,e)}uW(t){return t.Km===po.qm||t.Km===po.zm||t.Km===po.jm||t.Km===po.Gm||t.Km===po.Xm}FS(t,i){var e;if(t.Km!==po.qm)return!1;if(it(null==(e=i.playready)?void 0:e.customData))return!0;const s=i.integration;return(!s||!A.VC.LC(s,de))&&(s===Br&&new jP(i).FS)}wH(t,i){if(t.Km!==po.zm)return;const e=i.integration;return e&&A.VC.LC(e,de)?void 0:e===Br?RP.wH():void 0}};r(),r(),r();var $I="theoplayer-stored-network-info-v2",tC=25e5,sc=class{cW(t){var i;const e=null==(i=zd.xx)?void 0:i.zy(t);if(void 0===e)return;const s=JSON.parse(e);if(void 0!==s&&void 0!==s[this.dW]){if(!this.lW(s))return s[this.dW].availableBandwidth;var n;null==(n=zd.xx)||n.Gy(t,JSON.stringify({}))}}fW(){const t=this.cW($I);if(void 0!==t)return t;const i=this.cW("theoplayer-stored-network-info");return i?8*i:void 0}lW(t){const i=t[this.dW].storedTimestamp;return!!i&&zo()-i>36e5}vW(t){this._W=t,this.gW()}pW(){var t;return null!=this._W||(this._W=null!=(t=this.fW())?t:tC),this._W}constructor(){this.dW=qb,this._W=void 0,this.gW=to(()=>{var t;const i={[this.dW]:{availableBandwidth:this._W,storedTimestamp:zo()}};null==(t=zd.xx)||t.Gy($I,JSON.stringify(i))},1e4)}};sc.Bg=new sc,r();var $=function(t){return t[t.mW=0]="mW",t[t.wW=1]="wW",t[t.yW=2]="yW",t[t.bW=3]="bW",t[t.AW=4]="AW",t[t.TW=5]="TW",t[t._C=6]="_C",t[t.kW=7]="kW",t[t.EW=8]="EW",t[t.wC=9]="wC",t[t.xW=10]="xW",t[t.yC=11]="yC",t[t.PW=12]="PW",t}({});r();var hu=class{get IW(){return 0}get RW(){return 0}DW(t){}};r(),r();var iC=class extends gp{constructor(t){super("contentProtectionsTracked"),this.NW=void 0,this.NW=t}},eC=class extends Ne{BW(t){this.IH=t}wH(t){const i=this.IH;if(void 0!==i)return this.MW.wH(t,i)}FS(t){const i=this.IH;return void 0!==i&&this.MW.FS(t,i)}LW(t){const i={xS:t.xS,OW:t.OW||[],FW:t.FW,GH:t.GH,UW:t.UW||[]},e=this.MW.sW(i,this.IH||{},t.fH,this.aV);return i.FW&&e.jV(i.FW),new sC(e)}VW(t){if(!t)return;hh(t,t=>void 0!==t.fH)&&this.So(new iC(t))}constructor(t,i=new ZI){super(),this.aV=void 0,this.MW=void 0,this.IH=void 0,this.aV=t,this.MW=i}},sC=class{$V(t){return this.WW.$V(t)}tH(t,i,e){return this.WW.tH(i,e)}ZV(){return this.WW.ZV||void 0!==this.WW.KV}_H(t,i){return this.WW._H(t,i)}gH(t,i,e){return i&&this.WW.jV(i),this.WW.gH(t,e)}zg(){this.WW.kn()}constructor(t){this.WW=void 0,this.WW=t}};r();var Tu=class extends mS{qW(t){this.zW.push(t);for(const i of t.NI)this.tt(i);this.GW(t)}XW(t){_e(this.zW,t),this.jW(t);for(const i of t.NI)this.QW(i)||this.it(i)}QW(t){for(const i of this.zW)if(i.LI(t))return!0;return!1}GW(t){t.wn(N.rI,this.KW),t.wn(N.oI,this.fV)}jW(t){t.mn(N.rI,this.KW),t.mn(N.oI,this.fV)}kn(){for(;this.zW.length>0;)this.XW(this.zW[0]);super.kn()}xa(){return US(this)}constructor(t){super(),this.zW=[],this.KW=t=>{this.tt(t.Ht)},this.fV=t=>{const i=t.Ht;this.QW(i)||this.it(i)};for(const i of t)this.qW(i)}};r(),r();var nC,rC={forceSeekOffset:0,maximumOffset:0,maximumPlaybackRate:0,minimumOffset:0,minimumPlaybackRate:0,targetOffset:0},Jo=class{get Ca(){return null!=this.hu||(this.hu=function(t){return{get enabled(){return t.Rt},set enabled(i){t.Rt=Th(i)},get monitoringLivePlayback(){return t.YW},get currentLatency(){return t.OL},get currentConfiguration(){return function(t){if(void 0!==t)return{get minimumOffset(){return t.minimumOffset},get maximumOffset(){return t.maximumOffset},get targetOffset(){return t.targetOffset},get forceSeekOffset(){return t.forceSeekOffset},get minimumPlaybackRate(){return t.minimumPlaybackRate},get maximumPlaybackRate(){return t.maximumPlaybackRate}}}(t.Cd)}}}(this)),this.hu}get Rt(){var t,i;return null!=(i=this.We)?i:Boolean(null==(t=this.JW)?void 0:t.Rt)}set Rt(t){this.We=t,this.JW&&(this.JW.Rt=t)}get YW(){var t,i;return null!=(i=null==(t=this.JW)?void 0:t.oL)&&i}get OL(){var t;return null==(t=this.JW)?void 0:t.LL}get Cd(){return this.JW?this.JW.aL:rC}Ea(t){this.JW=t,void 0!==this.We&&(this.JW.Rt=this.We)}hr(){this.JW=void 0,this.We=void 0}constructor(){this.hu=void 0,this.JW=void 0,this.We=void 0}};var hC=Boolean(s&&s.TextTrack),oC=class extends je{get OL(){}get ZW(){const t=this.PL.Fx,i=this.zx;return t.Cr(i,.01)}get ht(){return this.tO}get Fx(){return this.PL.Fx._s()}get Vx(){return this.PL.Vx}set Vx(t){t&&this.PL.$W(t)}get bt(){return this.Ac}get zx(){return void 0!==this.tq?this.tq:this.PL.zx}set zx(t){this.Xx(t)}Xx(t,i){this.sP&&(this.tq=t),this.PL.Oy(t,null==i?void 0:i.iq)}get ct(){return this.PL.ct}get Qx(){return this.PL.Qx}get lt(){return this.nq}get Jx(){return this.rq}get $x(){}get iP(){}get sP(){return this.PL.sP}get rP(){return Y({},{rO:0,hO:0,oO:0,aO:0,uO:0,cO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.PL.hP())}get oP(){return this.PL.oP}set oP(t){this.PL.oP=t}get cP(){return!0}get lP(){return this.PL.lP}get vP(){return this.PL.vP}set vP(t){this.PL.vP=t}get pP(){return this.PL.hq.played}get wP(){return this.oq}set wP(t){this.oq=t,this.aq&&(this.aq.wP=t)}get AP(){return this.PL.AP}get kP(){return this.PL.kP._s()}get xP(){return this.PL.xP}get uq(){return this.PL.uq}get nt(){return this.Gl}get rt(){return this.sO}get DP(){return this.PL.DP}get MP(){return this.PL.MP}get OP(){return this.PL.OP}set OP(t){this.PL.OP=t}get VP(){return this.cq}get WP(){return this.PL.WP}set WP(t){this.PL.WP=t}get dq(){return this.lq}we(){this.PL.we()}be(){this.PL.be()}async Ta(t,i,e){fr(e),this.Ac=t;const s={Km:O.AV,rC:t.src,GT:t.type,fq:this.vq(t),wP:this.oq,_q:t.crossOrigin,gq:i.metadata&&i.metadata.title};this.pq.BW(t.contentProtection),this.aq=await this.PL.Un(s),fr(e),i.textTracks&&this.mq(i.textTracks),AP(this.nt)}IP(t,i,e,s){return Promise.resolve()}CP(){return Promise.resolve()}mq(t){for(const e of t)if(this.PL.wq()&&zs.ru&&hC&&!aP(e.kind,e.label)&&this.yq(e)){var i;const t=null!=(i=e.kind)?i:us.HU;this.PL.bq(e.src,t,e.label,e.srclang,e.default)}else{if(void 0===e.src)continue;this.Aq.hV(e)}}yq(t){return!t.format||"webvtt"===t.format}async QP(){try{await this.PL.QP()}catch(t){}for(;!this.ZW;)await this.PL.ww(d.Qw)}jP(){this.PL.jP()}YP(){return void 0!==this.PL.hq.webkitShowPlaybackTargetPicker}JP(){this.PL.hq.webkitShowPlaybackTargetPicker&&this.PL.hq.webkitShowPlaybackTargetPicker()}ZP(){this.PL.hq.webkitShowPlaybackTargetPicker&&this.PL.hq.webkitShowPlaybackTargetPicker()}zP(){return this.PL.hq}qP(){return this.PL.Ma}Aa(){return this.PL.Sq}sI(t){return this.PL.Tq(t)}async hr(){this.Ac=void 0,this.nq=void 0,this.rq=void 0,this.aq=void 0,await this.Aq.hr(),await this.kq.hr(),this.PL.Eq(),await this.PL.hr(),this.xq.hr(),this.wP=this.oq,this.ht.hr(),this.rt.hr(),this.tq=void 0}async kn(){await this.hr(),this.Vo(),this.Pq(),this.Iq(),this.xq.kn(),this.Cq.zg(),this.PL.Rq=void 0,await this.Nq.Dq(this.PL),this.tO.kn(),this.sO.kn(),this.Gl.kn(),await this.Aq.kn(),await this.kq.kn()}Bq(){this.PL.wn(d.uo,this.Rs),this.PL.wn(d.jw,this.Rs),this.PL.wn(d.py,this.Nc),this.PL.wn(d.Qw,this.Rs),this.PL.wn(d.Ww,this.Rs),this.PL.wn(d.$w,this.Rs),this.PL.wn(d.Zw,this.Mq),this.PL.wn(d.Nw,this.Rs),this.PL.wn(d.Kw,this.Rs),this.PL.wn(d.wy,this.Rs),this.PL.wn(d.Cw,this.Rs),this.PL.wn(d.Jw,this.Lq),this.PL.wn(Jr.PM,this.NL),this.PL.wn(hc.ma,this.Oq),this.PL.wn(d.xw,this.Rs),this.PL.wn(d.Ew,this.Fq),this.PL.hq.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.Uq)}Pq(){this.PL.mn(d.uo,this.Rs),this.PL.mn(d.jw,this.Rs),this.PL.mn(d.py,this.Nc),this.PL.mn(d.Qw,this.Rs),this.PL.mn(d.Ww,this.Rs),this.PL.mn(d.$w,this.Rs),this.PL.mn(d.Zw,this.Mq),this.PL.mn(d.Nw,this.Rs),this.PL.mn(d.Kw,this.Rs),this.PL.mn(d.wy,this.Rs),this.PL.mn(d.Cw,this.Rs),this.PL.mn(d.Jw,this.Lq),this.PL.mn(Jr.PM,this.NL),this.PL.mn(hc.ma,this.Oq),this.PL.mn(d.xw,this.Rs),this.PL.mn(d.Ew,this.Fq),this.PL.hq.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.Uq)}vq(t){if(!t.contentProtection||!t.contentProtection.fairplay)return[];return[{xS:Zg,Vq:[{initDataTypes:[Zg.Jm],videoCapabilities:[{contentType:"video/mp4",encryptionScheme:"cbcs"}]}]}]}Hq(){const t=this.PL.hq.audioTracks,i=this.PL.hq.videoTracks;t&&(t.addEventListener("addtrack",this.Wq),t.addEventListener("removetrack",this.qq),t.addEventListener("change",this.zq)),i&&(i.addEventListener("addtrack",this.Gq),i.addEventListener("removetrack",this.Xq),i.addEventListener("change",this.jq))}Iq(){const t=this.PL.hq.audioTracks,i=this.PL.hq.videoTracks;t&&(t.removeEventListener("addtrack",this.Wq),t.removeEventListener("removetrack",this.qq),t.removeEventListener("change",this.zq)),i&&(i.removeEventListener("addtrack",this.Gq),i.removeEventListener("removetrack",this.Xq),i.removeEventListener("change",this.jq))}dh(t){for(let i=0;i{const i=t.lt,e=i.code,s=new as(tE(e),"Something went wrong during native playback.",i),n=new mu(e,s.message,i.message);this.Qq(s,n)},this.Nc=()=>{this.So(new B(this.zx,this.Vx))},this.Kq=()=>{zs.X_&&this.ct===1/0&&this.Xx(1/0)},this.Mq=t=>{this.lP||(this.tq=void 0),this.So(t)},this.NL=t=>{this.tq=void 0},this.Uq=()=>{this.So(new fE(this.sP))},this.Lq=()=>{this.MP>0&&this.DP>0&&this.So(new Vs)},this.Wq=t=>{const i=this.PL.hq.audioTracks;if(i)for(let t=0;t{const i=[],e=this.PL.hq.audioTracks;if(e){for(const t of this.tO.NI)dC(e,t.AO)||i.push(t);for(const t of i)this.tO.it(t)}},this.zq=()=>{this.dh(this.tO)},this.Gq=t=>{const i=this.PL.hq.videoTracks;if(i)for(let t=0;t{const i=[],e=this.PL.hq.videoTracks;if(e){for(const t of this.sO.NI)dC(e,t.AO)||i.push(t);for(const t of i)this.sO.it(t)}},this.jq=()=>{this.dh(this.sO)},this.Fq=t=>{this.So(t),this.Qq(t.errorObject,ar(t.errorObject))},this.Nq=i,this.aV=e,this.hw=o,this.PL=this.Nq.Yq(at.Mk),this.oq=this.PL.hq.preload,this.Cq=new Gt(this,this.PL),this.xq=new _s(this.Cq,!0),this.xq.wn(Ii,this.Rs),this.xq.wn(Jr.EM,this.Kq),this.pq=new eC(e,h),this.PL.Rq=this.pq,this.Bq(),this.tO=new Ws,this.sO=new Ws,this.Hq(),this.Aq=new eu(this.PL,this.aV),this.kq=new _P(this.PL,this.PL.nt),this.Gl=new Tu([this.PL.nt,this.Aq.Z,this.kq.Z]),this.be()}};function aC(t){var i,e;if(!(null==(i=(nC||(nC=s&&s.document&&s.document.createElement("video")),e=nC).canPlayType)?void 0:i.call(e,t.type)))return!1;if(t.useNativePlayback)return!0;const n=zs.ru||zs.Tg;return!t.useManagedMediaSource||!n}var uC=class{DC(t,i,e,s,n,r,h){return new oC(t,i,e,s,n,r)}Jq(t,i){return aC(t)}Zq(t){return VT(t)}$q(){return!1}constructor(){this.tz=$.PW}};function cC(t,i){for(const e of t.NI)if(e.AO===i)return e}function dC(t,i){for(let e=0;et.hq)}async kn(){await super.kn(),this.Bz.kn(),this.Uz.kn()}constructor(t,i,e,s,n,r,h){const o=new AC;super(_C.Bg,o),this.ZS=void 0,this.Bz=void 0,this.Tu=void 0,this.Oz=void 0,this.aV=void 0,this.Mz=void 0,this.Lz=void 0,this.Uz=void 0,this.Tu=t,this.ZS=i,this.aV=e,this.Mz=s,this.Lz=n,this.Oz=h,this.Bz=r,o.Dz=r,this.Uz=new gC(this.Tu)}};r(),r();var TC=class extends je{get ht(){return this.Vz}get Fx(){return Uo.rL()._s()}get Vx(){return new Date(NaN)}set Vx(t){}get bt(){}get zx(){return 0}set zx(t){}Xx(t,i){}get ct(){return 0}get xe(){return this.Tu}get Qx(){return!0}get lt(){return this.Wz}get Jx(){return this.qz}get $x(){}get iP(){}get rP(){return{rO:0,hO:0,oO:0,aO:0,uO:0,cO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}}}get oP(){return!1}set oP(t){}get cP(){return!0}get lP(){return!0}get vP(){return 0}set vP(t){}get pP(){return Uo.rL()._s()}get wP(){return Dn.pz}set wP(t){}get AP(){return Lr.zL}get kP(){return Uo.rL()._s()}get xP(){return!1}get nt(){return this.zz}get DP(){return 0}get rt(){return this.Vz}get MP(){return 0}get OP(){return 1}set OP(t){}get VP(){return this.cq}get WP(){return!1}set WP(t){}iI(t){return!0}we(){}QP(){throw this.So(new el(this.qz)),this.Wz}jP(){}nu(){}async Ta(t,i){throw fr(i),this.So(new el(this.qz)),this.Wz}IP(t,i,e){return Promise.resolve()}CP(){return Promise.resolve()}be(){}KP(){return Promise.resolve()}zP(){}qP(){return this.ha}Aa(){return this.ea}Ox(){return[]}GP(){}gr(t){}mr(){}get sP(){return!1}YP(){return!1}JP(){}ZP(){}$P(){}tI(){}sI(t){}hr(){return Promise.resolve()}kn(){return this.Vo(),this.Vz.kn(),this.zz.kn(),Promise.resolve()}constructor(t,i,e){super(),this.Tu=void 0,this.Wz=void 0,this.qz=void 0,this.Vz=void 0,this.zz=void 0,this.ha=new ks,this.ea=new Pu,this.cq=new Jo,this.Tu=t,this.Wz=i,this.Vz=new Ws,this.zz=new bc,this.qz=e}};function kC(t){if(t&&Mc(t))return Y({},t,{integration:EC(t.integration),fairplay:DC(t.fairplay),widevine:xC(t.widevine),playready:PC(t.playready),clearkey:NC(t.clearkey),aes128:BC(t.aes128),integrationParameters:MC(t.integrationParameters),preferredKeySystems:LC(t.preferredKeySystems),useOipfDrmAgent:Th(t.useOipfDrmAgent)})}function EC(t){if(Q(t))return t}function xC(t){if(t&&Mc(t))return{persistentState:IC(t.persistentState),distinctiveIdentifier:IC(t.distinctiveIdentifier),audioRobustness:CC(t.audioRobustness),videoRobustness:CC(t.videoRobustness),licenseAcquisitionURL:Q(t.licenseAcquisitionURL)?t.licenseAcquisitionURL:void 0,licenseType:RC(t.licenseType),headers:t.headers,useCredentials:!!_r(t.useCredentials)&&t.useCredentials,queryParameters:t.queryParameters,certificate:Q(t.certificate)||om(t.certificate)?t.certificate:void 0}}function PC(t){if(!t)return;const i=xC(t);if(!i)return;return Y({},i,{customData:Q(t.customData)?t.customData:void 0})}function IC(t){switch(null==t?void 0:t.toLowerCase()){case"required":return"required";case"optional":return"optional";case"not-allowed":return"not-allowed"}}function CC(t){switch(t){case"HW_SECURE_ALL":return"HW_SECURE_ALL";case"HW_SECURE_DECODE":return"HW_SECURE_DECODE";case"HW_SECURE_CRYPTO":return"HW_SECURE_CRYPTO";case"SW_SECURE_DECODE":return"SW_SECURE_DECODE";case"SW_SECURE_CRYPTO":return"SW_SECURE_CRYPTO";case"":return""}}function RC(t){switch(null==t?void 0:t.toLowerCase()){case"temporary":return"temporary";case"persistent":return"persistent"}}function DC(t){if(!t)return;const i=xC(t);if(!i)return;return Y({},i,{certificateURL:Q(t.certificateURL)?t.certificateURL:void 0})}function NC(t){if(!t)return;const i=xC(t);if(!i)return;const e=hi(t.keys)?t.keys.map(t=>function(t){if(!t||!Mc(t))return;const i=t.id,e=t.value;if(!Q(i)||!Q(e))return;return{id:i,value:e}}(t)).filter(it):void 0;return Y({},i,{keys:e})}function BC(t){if(Mc(t))return{useCredentials:_r(t.useCredentials)?t.useCredentials:void 0}}function MC(t){if(Mc(t))return t}function LC(t){return t&&hi(t)?t.map(t=>FT(t)).filter(it):[Hg,Fg,de]}r(),r(),r(),r();var OC={bt:void 0,zx:0,ct:NaN,Qx:!1,lt:void 0,Jx:void 0,oP:!1,lP:!0,vP:1,AP:Lr.zL,xP:!1,DP:0,MP:0,OP:1};r();var FC=function(t){return t.DEFAULT="",t.THEO="theo",t.CSAI="csai",t.GOOGLE_IMA="google-ima",t.SPOTX="spotx",t.FREEWHEEL="freewheel",t.MEDIATAILOR="mediatailor",t.THEOADS="theoads",t.UPLYNK="uplynk",t}({}),va=class{get Gz(){return this.Xz}jz(t){const i=this.Xz.filter(i=>i.Qz(t));if(i.length>1)0;else if(0===i.length)throw m("Unknown ad integration: "+t.integration);return i[0]||null}Kz(t){this.Xz.push(t)}constructor(){this.Xz=[]}};va.Bg=new va,r(),r(),r(),r();var ri=function(t){return t.PM="PLAYING",t.Yz="PAUSED",t.Jz="SEEK",t.Zz="STALLED",t.$z="FAILED",t.tG="INITIAL_BUFFERING",t.iG="NO_ACCESS",t}({}),ba=function(t){return t.eG="HTTP_REQUEST_STATUS_CODE_1XX",t.sG="HTTP_REQUEST_STATUS_CODE_2XX",t.nG="HTTP_REQUEST_STATUS_CODE_3XX",t.rG="HTTP_REQUEST_STATUS_CODE_4XX",t.hG="HTTP_REQUEST_STATUS_CODE_5XX",t.oG="BUFFER_LENGTH",t.aG="BYTES_RECEIVED",t.uG="SEGMENT_READ_BITRATE",t.cG="SEGMENT_PROFILE_BITRATE",t.dG="VIDEO_PROFILE_BITRATE",t.lG="NUMBER_OF_FRAMES_DROPPED",t.fG="PLAYBACK_POSITION",t.vG="NUMBER_OF_FRAMES_DECODED",t._G="PLAYBACK_DELTA_TO_ORIGIN",t.gG="STREAM_DELTA_TO_ORIGIN",t.pG="ORIGIN_TIMESTAMP",t}({}),ct=function(t){return t.mG="MANIFEST_URI",t.wG="ASSET_DURATION",t.yG="NUMBER_OF_CONTENT_PROFILES",t.bG="CDN",t.AG="CONTENT_TITLE",t.SG="SERVICE_NAME",t.TG="CONTENT_TYPE",t.kG="CONTENT_DESCRIPTION",t}({}),UC=function(t){return t.EG="shutdown_normal_shutdown",t}({}),VC=function(t){return t.xG="session/",t.IG="content/",t.CG="internalError/",t.DG="drmError/",t.NG="caError/",t.BG="networkError/",t}({}),HC=class{get code(){return this.category+this.statusCode}constructor(t,i){this.category=void 0,this.statusCode=void 0,this.category=t,this.statusCode=i}},WC=class extends Ne{};r(),r(),r();var qC=function(t){return t.PAUSE="MG",t.RESUME="OG",t}({}),zC=class extends gp{constructor(){super("FG")}},Ge=class extends Ne{UG(){this.VG=!0}HG(){}kn(){this.VG=!1,this.WG.mn(qC.PAUSE,this.qG),this.WG.mn(qC.RESUME,this.zG)}GG(){return isFinite(this.oa.Nd())}constructor(t,i){super(),this.oa=void 0,this.WG=void 0,this.VG=void 0,this.qG=void 0,this.zG=void 0,this.oa=t,this.WG=i,this.VG=!1,this.qG=()=>{this.HG(),this.VG=!1},this.zG=()=>{this.VG=!0},this.WG.wn(qC.PAUSE,this.qG),this.WG.wn(qC.RESUME,this.zG)}},GC=class extends Ge{UG(){super.UG(),this.XG()}kn(){this.jG(),super.kn()}XG(){this.oa.wn(Jr.xM,this.QG),this.oa.wn(d.jw,this.KG),this.oa.wn(Jr.PM,this.YG),this.oa.wn(d.$w,this.JG),this.oa.wn(d.Zw,this.ZG)}jG(){this.oa.mn(Jr.xM,this.QG),this.oa.mn(d.jw,this.KG),this.oa.mn(Jr.PM,this.YG),this.oa.mn(d.$w,this.JG),this.oa.mn(d.Zw,this.ZG)}$G(){this.tX=!0}iX(){const t=this.oa.Yx(),i=new HC(VC.CG,String(t.code));this.eX(ri.$z,i,t.message)}sX(t){this.VG&&(this.WG.nX(t),this.So(new zC))}eX(t,i,e){this.WG.rX(t,i,e),this.So(new zC)}hX(t,i){this.WG.oX(t,i)}constructor(...t){super(...t),this.tX=!1,this.aX=!1,this.uX=!1,this.QG=()=>{this.aX&&!this.uX&&this.sX(ri.Zz)},this.YG=()=>{this.oa.lP||(this.aX||this.hX(new HC(VC.IG,"firstFrameDisplayed"),"now"),this.aX=!0,this.sX(ri.PM))},this.KG=()=>{this.oa.lP&&(this.aX=!0,this.sX(ri.Yz))},this.JG=()=>{this.tX&&(this.uX=!0,this.tX=!1,this.sX(ri.Jz))},this.ZG=()=>{this.uX=!1,this.oa.lP&&this.sX(ri.Yz)}}};r();var XC=class extends Ge{UG(){super.UG(),this.cX(),this.XG()}kn(){this.jG(),super.kn()}XG(){this.oa.rt.wn(Te.pa,this.cX),this.oa.lX.dX(this.fX),this.oa.wn(d.Cw,this.vX)}jG(){this.oa.rt.mn(Te.pa,this.cX),this.oa.lX._X(this.fX),this.oa.mn(d.Cw,this.vX)}gX(t){t.serviceName&&this.pX(ct.SG,t.serviceName),t.cdn&&this.pX(ct.bG,t.cdn),t.contentTitle&&this.pX(ct.AG,t.contentTitle),t.contentType&&this.pX(ct.TG,t.contentType),t.contentDescription&&this.pX(ct.kG,t.contentDescription)}pX(t,i){this.VG&&this.WG.mX(t,i)}constructor(...t){super(...t),this.vX=()=>{this.GG()&&this.pX(ct.wG,_.round(this.oa.Nd()))},this.fX=t=>{"manifest"===t.request.type&&this.pX(ct.mG,t.url)},this.cX=()=>{const t=hh(this.oa.rt.NI,t=>t.Rt);t&&this.pX(ct.yG,t.$I.V)}}};r();var jC=class extends Ge{UG(){super.UG(),this.wX=this.oa.rP.rO,this.yX=this.oa.rP.oO,this.XG(),this.bX.push(v(this.AX,1e3))}HG(){super.HG(),this.SX()}kn(){this.SX(),this.jG(),this.bX.forEach(p),Wt(this.bX),super.kn()}XG(){this.oa.lX.dX(this.TX),this.oa.wn(d._y,this.kX)}jG(){this.oa.lX._X(this.TX),this.oa.mn(d._y,this.kX)}EX(){this.SX()}xX(t){this.PX+=t,this.IX(ba.aG,this.PX)}CX(t,i){const e=this.RX.get(i)||0;this.IX(t,e)}DX(){const t=this.oa.rP.rO-this.wX;this.IX(ba.lG,t)}NX(){const t=this.oa.rP.oO-this.yX;this.IX(ba.vG,t)}BX(){const t=sc.Bg.pW();this.IX(ba.uG,cm(t))}MX(t){this.IX(ba.cG,cm(t)),this.IX(ba.dG,cm(t))}SX(){if(!this.GG())return;const t=_.round(rn(this.oa.Gx()));this.IX(ba.fG,t)}LX(){const t=Uo.jn(this.oa.Ux()),i=this.oa.Gx(),e=t.iL(i),s=e?rn(e.An(0)-i):0;this.IX(ba.oG,s)}IX(t,i){this.VG&&this.WG.OX(t,i)}constructor(...t){super(...t),this.RX=Ba(),this.PX=0,this.wX=0,this.yX=0,this.bX=[],this.AX=()=>{this.DX(),this.NX(),this.LX()},this.kX=t=>{t.Gk===at.Mk&&(this.xX(t.uO),this.BX(),this.MX(t.FX),this.SX())},this.TX=t=>{const i=t.status.toString()[0],e=this.RX.get(i)||0;this.RX.set(i,e+1),this.CX(ba.eG,"1"),this.CX(ba.sG,"2"),this.CX(ba.nG,"3"),this.CX(ba.rG,"4"),this.CX(ba.hG,"5")}}};r();function QC(t){return t&&t.integration===tR}function KC(t){if(!Q(t.asset))throw new g("Agama source configuration: expected 'asset' to be a string");if(!function(t){return!!Q(t)&&("live"===t||"vod"===t)}(t.streamType))throw new g("Agama source configuration: expected 'streamType' to be 'live' or 'vod'");if(void 0!==t.serviceName&&!function(t){return!!Q(t)&&("live"===t||"svod"===t||"nvod"===t||"tvod"===t||"avod"===t||"catchuptv"===t)}(t.serviceName))throw new g("Agama source configuration: expected 'serviceName' to be 'live', 'svod', 'nvod','tvod', 'avod' or 'catchuptv'");if(void 0!==t.cdn&&!Q(t.cdn))throw new g("Agama source configuration: expected 'cdn' to be a string");if(void 0!==t.contentTitle&&!Q(t.contentTitle))throw new g("Agama source configuration: expected 'contentTitle' to be a string");if(void 0!==t.contentType&&!Q(t.contentType))throw new g("Agama source configuration: expected 'contentType' to be a string");if(void 0!==t.contentDescription&&!Q(t.contentDescription))throw new g("Agama source configuration: expected 'contentDescription' to be a string");return t}function YC(t){if(!Q(t.config))throw new g("Agama player configuration: expected 'config' to be a string");if(void 0!==t.logLevel&&!function(t){return!!Q(t)&&("info"===t||"debug"===t||"warning"===t||"error"===t||"fatal"===t)}(t.logLevel))throw new g("Agama player configuration: expected 'logLevel' to be 'info', 'debug', 'warning','error' or 'fatal'");if(void 0!==t.application&&!Q(t.application))throw new g("Agama player configuration: expected 'application' to be a string");if(void 0!==t.applicationVersion&&!Q(t.applicationVersion))throw new g("Agama player configuration: expected 'applicationVersion' to be a string");if(void 0!==t.userAccountID&&!Q(t.userAccountID))throw new g("Agama player configuration: expected 'userAccountID' to be a string");if(void 0!==t.deviceID&&!Q(t.deviceID))throw new g("Agama player configuration: expected 'deviceID' to be a string");return t}function JC(){let t="00000000-0000-0000-0000-000000000000";const i=s.navigator,e=s.screen;let n=""+i.mimeTypes.length;n+=i.userAgent.replace(/\D+/g,""),n+=i.plugins.length,n+=e.height||"",n+=e.width||"",n+=e.pixelDepth||"",n+=_.floor(1e3*_.random());const r=function(t){let i,e,s=0;if(0===t.length)return"0";for(i=0;i{this.sj(),this.KX()},this.sj=()=>{const t=this.oa.nu(),i=t&&t.analytics;this.ej=function(t){void 0===t&&(t=[]);for(const i of t)if(QC(i))return KC(i)}(i)},this.KX=()=>{this.UX(),this.oa.mn(d.uo,this.QX),!this.jX()&&this.WG.nj()&&this.oa.bt&&this.ej&&(this.YX(),this.oa.lP||this.oa.Qx?this.oa.wn(d.uo,this.QX):this.QX())},this.QX=()=>{this.oa.bt&&this.ej&&(this.WG.rj(this.oa.bt,this.ej),this.UG(),this.gX(this.ej),this.zX(),this.oa.wn(hc.ma,this.VX),this.oa.mn(d.uo,this.QX))},this.XX=()=>{this.jX()&&this.UX()},this.VX=()=>{this.ij(),this.UX()},this.tj=()=>{this.ZX&&this.ZX.EX()};const s=function(t){void 0===t&&(t=[]);for(const i of t)if(QC(i))return YC(i)}(e.analytics);s&&this.WG.hj()&&(this.WG.GP(s),this.WG.nj()?(this.WG.aj(),this.oa.wn(d.do,this.fo),this.oa.wn(d.Nw,this.KX)):console.warn("An error occurred while initializing an Agama EMP client. Please check your configuration"))}},tR="agama";r(),r();var Qu=function(t){return t.NONE="",t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t}({});r();var Zo=function(t){return t.NONE="",t.PM360="360",t.PM180="180",t}({});function iR(t){switch(t){case"":return Qu.NONE;case"horizontal":return Qu.HORIZONTAL;case"vertical":return Qu.VERTICAL;default:throw new g}}function eR(t,i){if(i)return Zo.PM360;if(null==t)return Zo.NONE;switch(t){case"":return Zo.NONE;case"360":return Zo.PM360;case"180":return Zo.PM180;default:throw new g("Provided panoramaMode value is not recognized. Expected '', '360' or '180' but value was "+t)}}r();var sR=function(t){return t.ASSET="asset",t.CHANNEL="channel",t.EVENT="event",t}({});r();var nR="https://content.uplynk.com";function Uu(t){if(!t)return!0;const i=!function(t){return Ds(t)||ln(t)&&Ds(t[0])}(t.sources)||Ns(t.sources),e=!t.ads||rR(t.ads),s=""!==t.poster&&!t.poster;return i&&e&&s}function rR(t){return!t||hi(t)&&0===t.length}function hR(t){if(t&&t.sources)return oR(t.sources)}function oR(t){return Q(t)?qu(t):ei(t)?t.type||t.src&&qu(t.src):ln(t)&&t.length>0?oR(t[0]):void 0}function aR(t){if(t&&t.sources)return uR(t.sources)}function uR(t){return Q(t)?t:ei(t)?t.src:ln(t)&&t.length>0?uR(t[0]):void 0}function cR(t,i,e){return mk(t)?function(t,i,e){let s=Y({},Sk(),{ping:{adImpressions:!1,freeWheelVideoViews:!1,linearAdData:!1},integration:uk.UPLYNK,id:"",prefix:nR,preplayParameters:{},playbackUrlParameters:{},assetType:sR.ASSET,contentProtected:!1,assetInfo:!0});s.id=function(t){if(Q(t))return t;if(ln(t)&&Q(t[0]))return t;if(function(t){return Mc(t)&&Q(t.userId)&&(ln(t.externalId)||Q(t.externalId))}(t))return t;return""}(t.id),t.preplayParameters&&(s.preplayParameters=t.preplayParameters);t.playbackUrlParameters&&(s.playbackUrlParameters=t.playbackUrlParameters);t.assetType&&(s.assetType=function(t){switch(t){case"channel":return sR.CHANNEL;case"event":return sR.EVENT;default:return sR.ASSET}}(t.assetType));t.contentProtected&&(s.contentProtected=Th(t.contentProtected));t.assetInfo?s.assetInfo=Th(t.assetInfo):s.assetInfo="asset"===s.assetType;t.prefix&&(s.prefix=Ts(t.prefix)||nR);return s.ping=function(t,i){let e=!1,s=!1,n=!1;i?(e=!!_r(i.adImpressions)&&i.adImpressions,s=!!_r(i.freeWheelVideoViews)&&i.freeWheelVideoViews,n=_r(i.linearAdData)?i.linearAdData:t!==sR.ASSET):t!==sR.ASSET&&(n=!0);return{adImpressions:e,freeWheelVideoViews:s,linearAdData:n}}(s.assetType,t.ping),s=vR(s,t),s=gR(s,i,e),s=_R(s,t,e),s}(t,i,e):yk(t)?function(t,i,e){var s;return Y({},dR(t,i,e),{integration:uk.MEDIATAILOR,adsParams:null!=(s=t.adsParams)?s:{}})}(t,i,e):wk(t)?function(t,i,e){return Y({},dR(t,i,e),{type:"theolive"})}(t,i,e):Xo(t)?lR(t,i,e):dR(t,i,e)}function dR(t,i,e){let s=Tk();const n=i&&(i.contentProtection||i.drm);if(Q(t)){if(s.src=t,s.type=qu(t),n){const t=kC(n);s.contentProtection=HT(t)}}else if(ei(t)||pk(t)||Xo(t)){s.src=t.src,s.type=t.type||qu(t.src),s.isAdvertisement=t.isAdvertisement;const i=Ms(t)?t.hesp:void 0;void 0!==i&&(s.hesp=i);yk(t)&&(s.integration=t.integration);const e=kC(t.contentProtection||t.drm||n);s.contentProtection=HT(e),t.ssai&&(s.ssai=KS(t.ssai)),s=vR(s,t)}return s=gR(s,i,e),s=_R(s,t,e),s}function lR(t,i,e){return Y({},dR(t,i,e),{type:Hi.yC,src:t.src,streamAccountId:t.streamAccountId,subscriberToken:t.subscriberToken,connectOptions:wR(t.connectOptions),apiUrl:t.apiUrl,statsIntervalMs:fR(t.statsIntervalMs)})}function fR(t){if(lo(t)&&t>0)return t}function vR(t,i){var e,s;i.useCredentials?t.crossOrigin=Fa.fC:i.crossOrigin&&(t.crossOrigin=_k(i.crossOrigin)),Q(i.timeServer)&&(t.timeServer=i.timeServer),i.liveOffset&&(t.liveOffset=i.liveOffset),i.hlsDateRange&&(t.hlsDateRange=i.hlsDateRange),i.lowLatency&&(t.lowLatency=Th(i.lowLatency)),i.useNativePlayback&&(t.useNativePlayback=Th(i.useNativePlayback)),i.useManagedMediaSource&&(t.useManagedMediaSource=Th(i.useManagedMediaSource)),i.dash&&(t.dash=WT(i.dash)),i.hls&&(t.hls=qT(i.hls)),i.lcevc&&(t.lcevc=Th(i.lcevc)),i.ignoreEmbeddedTextTrackTypes&&(t.ignoreEmbeddedTextTrackTypes=Pk(i.ignoreEmbeddedTextTrackTypes)),i.latencyConfiguration&&(t.latencyConfiguration=ok(i.latencyConfiguration)),t.seamlessSwitchStrategy=ck(null!=(s=i.seamlessSwitchStrategy)?s:null==(e=i.dash)?void 0:e.useSeamlessPeriodSwitch);const n=Lt(i.experimentalRendering);void 0!==n&&(t.experimentalRendering=n);const r=Lt(i.nativeUiRendering);return void 0!==r&&(t.nativeUiRendering=r),t}function _R(t,i,e){return t.abr=jT(Q(i)?void 0:XT(i.abr),null==e?void 0:e.abr),t}function gR(t,i,e){var s;const n=i&&i.timeServer;return e&&e.liveOffset&&!it(t.liveOffset)&&(t.liveOffset=e.liveOffset),e&&e.hlsDateRange&&!it(t.hlsDateRange)&&(t.hlsDateRange=e.hlsDateRange),t.crossOrigin===Fa.Fk&&(null==i||null==(s=i.vr)?void 0:s[360])&&(t.crossOrigin=Fa.lC),t.useCredentials=t.crossOrigin===Fa.fC,Q(n)&&!t.timeServer&&(t.timeServer=n),t}function pR(t){const i={src:""};if(t&&t.src){if(i.src=Ts(t.src),"default"in t&&(i.default=Th(t.default)),i.kind=function(t){const i=String(t||"").toLowerCase();return $x(i)?i:i?"metadata":"subtitles"}(t.kind),vk(t.format)&&(i.format=t.format),"srclang"in t){const e=t.srclang;"string"==typeof e&&""!==e&&(i.srclang=e)}if("label"in t){const e=t.label;"string"==typeof e&&""!==e&&(i.label=e)}}return i}function mR(t,i){if(Mc(t))try{return i.jz(t).uj(t)}catch(t){return}}function wR(t){if(null==t)return t;if(!Mc(t))throw new m("connectOptions must be an object");return t}function ra(t,i,e){if(void 0===e&&(e=va.Bg),Uu(t))return{sources:[Tk()]};const s=ru(t);if(s.sources=function(t,i,e){if(Ds(t))return[cR(t,i,e)];if(ln(t)&&Ds(t[0])){const s=[];for(const n of t)s.push(cR(n,i,e));return s}return[Tk()]}(s.sources,s,i),"contentProtection"in s&&delete s.contentProtection,"drm"in s&&delete s.drm,"ads"in s){const t=function(t,i){if(!ln(t))return[];const e=[];for(let s of t)s=mR(s,i),s&&e.push(s);return e}(s.ads,e);0===t.length?delete s.ads:s.ads=t}const n=!Ns(s.sources),r=s.ads&&s.ads.length>0;if(n&&!r?delete s.ads:r&&!n&&(s.sources=[]),"textTracks"in s){const t=function(t){if(!ln(t))return[];const i=[];for(let e of t)e=pR(e),""!==e.src&&i.push(e);return i}(s.textTracks);0===t.length?delete s.textTracks:s.textTracks=t}"poster"in s&&(s.poster=Ts(s.poster)),"streamType"in s&&(s.streamType=function(t){switch(t){case"live":case"dvr":case"vod":return t}}(s.streamType)),"vr"in s&&(s.vr=function(t){const i=t||{};return i.stereoMode=function(t){return function(t){switch(t){case"":case"horizontal":case"vertical":return!0;default:return!1}}(t)?t:""}(i.stereoMode),{panoramaMode:eR(i.panoramaMode,Boolean(i[360])),stereoMode:i.stereoMode?iR(i.stereoMode):Qu.NONE,nativeVR:Boolean(i.nativeVR)}}(s.vr));if("analytics"in s||(null==i?void 0:i.analytics)){const t=Ek(s.analytics),e=i&&i.analytics||[];s.analytics=function(t,i){const e=ru(t);for(const s of i){const i=!t.some(t=>t.integration===s.integration);i&&s.integration!==tR&&e.push(s)}return e}(t,e)}return"mutedAutoplay"in s&&(s.mutedAutoplay=Nk(s.mutedAutoplay)),"timeServer"in s&&delete s.timeServer,"playAdsAfterTime"in s&&(s.playAdsAfterTime=bs(s.playAdsAfterTime)),s.blockContentIfAdError=function(t){return void 0!==t&&"boolean"==typeof t&&Boolean(t)}(s.blockContentIfAdError),s}r(),r(),r();var yR=function(){function t(t){this.cj=t}return t.prototype.dj=function(t){var i,e,s,n,r,h,o,a=[];if(!t)return"";var u=t.length%4;if(u>0)for(;u++<4;)t+=this.cj.charAt(64);for(i=0;i>>16&255,s=o>>>8&255,n=255&o,a[i/4]=String.fromCharCode(e,s,n),64===h&&(a[i/4]=String.fromCharCode(e,s)),64===r&&(a[i/4]=String.fromCharCode(e));return a.join("")},t.prototype.lj=function(t,i){var e,s,n,r,h,o,a,u=[],c="";if((o=t.length%3)>0)for(;o++<3;)c+=this.cj.charAt(64),t+="\0";for(o=0;o>18&63,n=e>>12&63,r=e>>6&63,h=63&e,u[o/3]=this.cj.charAt(s)+this.cj.charAt(n)+this.cj.charAt(r)+this.cj.charAt(h);return a=(a=u.join("")).slice(0,a.length-c.length),i||(a+=c),a},t.bh=new t(function(){var t,i,e,s,n=[],r=["object","$","undefined","function","Cannot find module '","MODULE_NOT_FOUND","*","com.widevine.alpha","urn:mpeg:dash:mp4protection:2011","^","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","__proto__","@@iterator","getUTCHours","setUTCFullYear","25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?","SegmentBase","RateChangeEvent","Symbol(","Symbol.",'; codecs="'];for(t=0;tthis.Lj(t,e))){const t="invalidsource",i=ea.Oj(t);throw new as(VR(t),i)}}Mj(t,i){for(const e of t)ei(e)&&Ms(e)&&!e.bypassLicense&&this.Fj([kR.HESP],i)}Uj(i){return this.Vj(i.Pj)&&this.Hj(i)?t.Wj(i.Sj)?0:1:2}Fj(t,i){for(const e of t)if(!Ct(i.Tj,e)){const t="invalidfeature",i=ea.qj(t,e);throw new as(VR(t),i)}}Vj(t){return 0===t.length||t.some(t=>this.zj(t))}zj(t){return"web"===function(t){switch(t){case SR.ANDROID:return W.Tv;case SR.ANDROIDTV:case SR.FIRETV:return W.Ev;case SR.IOS:return W.xv;case SR.TVOS:return W.Pv;case SR.CHROMECAST:case SR.CHROMECASTCAF:return W.Iv;case SR.THEOLIVEWEB:return W.Cv;default:return W.Sv}}(t)}static Wj(t){const i=Number(new Date);return!!t&&i<=t}Hj(t){return!(this.Gj&&0!==t.bj.length&&!zR(t.bj))||!!(this.Gj&&this.Xj(t.bj)&&this.jj(t.bj))}Xj(t){return GR(this.Gb.Yu,t)}jj(t){if(!this.Gb._j)return!0;if(this.Qj)return!0;const i=this.Kj();return!!i&&GR(i,t)}Kj(){if(!this.Gb._j)return;const t=hd.ancestorOrigins;return t&&t.length>0?t[t.length-1]:this.Gb.gj?this.Gb.gj:void 0}Lj(i,e){return!!t.Yj(i,e.Aj)}static Yj(t,i){return GR(this.Jj(t),i)}static Jj(t){return Q(t)?t:ei(t)&&t.src||""}constructor(t,i,e){this.Qj=void 0,this.Zj=void 0,this.Gb=void 0,this.Gj=void 0,this.Qj=t,this.Zj=i,this.Gb=e,this.Gj=jR(this.Gb)}},UR=class{Uj(t){return 0}Nj(t,i){}Fj(t,i){}};function VR(t){switch(t){case"invaliddomain":return me.LICENSE_INVALID_DOMAIN;case"invalidsource":return me.LICENSE_INVALID_SOURCE;case"expired":return me.LICENSE_EXPIRED;case"invalidfeature":return me.LICENSE_INVALID_FEATURE;case"error":return me.LICENSE_ERROR}}var HR="25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?",WR=Oc(()=>{const t="\\.",i="(\\*|"+HR+")";return new RegExp("ip-range\\("+i+t+i+t+i+t+i+"\\)")});function qR(t,i){let e=t,s=i;if(!e)return!1;if(s=s.trim(),"*"===s)return!0;if(e=e.replace(/\.+$/,""),s===e)return!0;if(Xt(s,"ip-range(")){const t="\\.",i=s.match(WR()),n=t=>"*"===t?"("+HR+")":t;if(null!==i&&5===i.length){const s=new RegExp("^"+i[1]+t+n(i[2])+t+n(i[3])+t+n(i[4])+"$");return null!==e.match(s)}}return s="."+s,-1!==e.indexOf(s,e.length-s.length)}function zR(t){return t.some(t=>"*"===t)}function GR(t,i){const e=zd.Dh(t);if(!XR(e))return!0;for(const s of i){if(qR(e.hostname,s))return!0;if(qR(TA(t),s))return!0}return!1}function XR(t){return-1!==NR.indexOf(t.protocol)}function jR(t){const i=zd.Dh(t.Yu);return XR(i)&&!function(t){return qR(t.hostname,"localhost")}(i)&&!function(t){return qR(t.hostname,"theoplayer.doubleclick.net")}(i)}var ea=class{static qj(t,i){return"The requested feature '"+i+"' is not available with the license for this player."}static Oj(t){return"invaliddomain"===t?this.$j:"invalidsource"===t?this.tQ:"expired"===t?this.iQ:"invalidfeature"===t?this.eQ:this.sQ}};ea.sQ="The license for this player is invalid.",ea.iQ="The usage license for this video player has expired.",ea.$j="The current domain is incompatible with the license for this player.",ea.tQ="The provided video source is incompatible with the license for this player.",ea.eQ="The requested feature is not available with the license for this player.",r(),r();var QR=function(t){return t[t.nQ=1]="nQ",t[t.rQ=4]="rQ",t[t.hQ=5]="hQ",t[t.oQ=9]="oQ",t}({});function KR(t){const i=[t.zB,t.aQ,t.uQ];switch(t.aQ){case 1:i.push(t.rC);break;case 4:i.push(t.zx),i.push(t.lt);break;case 5:i.push(t.lt);break;case 9:i.push(t.Km)}return i}r();var oo=new Array(256);for(let t=0;t<256;t+=1)oo[t]=(t<16?"0":"")+t.toString(16);function Ve(){const t=zo(),i=(4294967296*_.random()|0)+t&3029421624,e=(4294967296*_.random()|0)+t&3595553209,s=(4294967296*_.random()|0)+t&1130486254,n=(4294967296*_.random()|0)+t&1284287105;return oo[255&i]+oo[i>>>8&255]+oo[i>>>16&255]+oo[i>>>24&255]+"-"+oo[255&e]+oo[e>>>8&255]+"-"+oo[e>>>16&15|64]+oo[e>>>24&255]+"-"+oo[63&s|128]+oo[s>>>8&255]+"-"+oo[s>>>16&255]+oo[s>>>24&255]+oo[255&n]+oo[n>>>8&255]+oo[n>>>16&255]+oo[n>>>24&255]}function Xe(t){return um(t.replace(/-/g,""))}function un(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const i=16*_.random()|0;return("x"===t?i:3&i|8).toString(16)})}function YR(){return zd.Mg()}r(),r(),r();var JR,ZR="theoplayer-session-id";function $R(){if(!JR){const t=Ub.zy(ZR);t?JR=t:(JR=Ve(),Ub.Gy(ZR,JR))}return JR}r(),r();var tD=/[^\x00-\x7E]/g;function iD(t){return"\\u"+Wa(t.charCodeAt(0).toString(16),4,"0")}var eD="https://license.theoplayer.com";function sD(t){const i=function(t){const i=[];return function(t,i,e){return JSON.stringify(t,i,e).replace(tD,iD)}(t,(t,e)=>{if(Mc(e)){if(-1!==i.indexOf(e))return null;i.push(e)}return e})}(function(t){return[t.cQ,t.fS,t.yj,t.ED,t.dQ,t.lQ,t.fQ.map(KR)]}(t));return yR.vj.lj(i)}var nD=class{get fQ(){return this.Zf}vQ(){return Boolean(this.dQ)}get dQ(){return this._Q}async gQ(t){if(!(await this.mQ.pQ()).Ij)return;const i={aQ:QR.nQ,uQ:zo(),rC:t};await this.hX(i)}async wQ(t){if(!(await this.mQ.pQ()).Ij)return;const i={aQ:QR.oQ,uQ:zo(),Km:t};await this.hX(i)}async yQ(t,i){const e={aQ:QR.rQ,uQ:zo(),zx:i,lt:t};await this.hX(e)}async bQ(t){const i={aQ:QR.hQ,uQ:zo(),lt:t};await this.hX(i)}async hX(t){const i=await this.mQ.pQ();"a:n[_O*[C4C-N$_@_MYY $D]iOp]N$_-_]th_:c|aen?C:pH"===this.AQ.lj(i.yj)&&t.aQ!==QR.hQ||(t.aQ===QR.nQ?this.SQ():this.vQ()||this.SQ(),t.zB=this.AA++,this.Zf.push(t),!function(t){return t===QR.nQ||t===QR.hQ}(t.aQ)?this.Zf.length>this.TQ&&await this.kQ():await this.EQ())}async EQ(t){for(void 0===t&&(t=!1);this.Zf.length>0;)await this.kQ(t)}async xQ(t){const i=await this.mQ.pQ();return{cQ:zo(),fS:$R(),yj:this.AQ.lj(i.yj)||"dev",ED:this.XA,dQ:this._Q,lQ:this.IQ,fQ:t}}async kQ(t){void 0===t&&(t=!1);const i=this.Zf.splice(0,this.CQ),e=await this.xQ(i);t?this.Jk(e):this.RQ(e),this.DQ=YR()}async RQ(t){const i=sD(t),e=new ro({Yu:eD,XT:i,Xk:!1,fk:Bi.LT,_k:{"Content-Type":Ju.NH},Wk:4e3,Hk:Qe.POST});try{const t=await this.aV.vk(e);await t.qT()}catch(t){(new Image).src="https://licensing.theoplayer.com/t?"+i}}Jk(t){const i=sD(t);this.aV.Jk({Yu:eD,XT:i,GT:Ju.NH})}SQ(){this.vQ()&&this.EQ(),this._Q=Ve(),this.AA=0}kn(){s.removeEventListener("beforeunload",this.NQ),p(this.BQ),this.EQ()}constructor(t,i,e,n=yR.bh,r=0,h=1){this.XA=void 0,this.aV=void 0,this.mQ=void 0,this.AQ=void 0,this.TQ=void 0,this.CQ=void 0,this.Zf=void 0,this._Q=void 0,this.DQ=void 0,this.IQ=void 0,this.AA=void 0,this.BQ=void 0,this.MQ=void 0,this.NQ=void 0,this.XA=t,this.aV=i,this.mQ=e,this.AQ=n,this.TQ=r,this.CQ=h,this.Zf=[],this._Q=null,this.DQ=0,this.IQ="unknown",this.AA=0,this.MQ=()=>{YR()-this.DQ>6e4&&this.EQ()},this.NQ=()=>{this.EQ(!0)},s.addEventListener("beforeunload",this.NQ),this.BQ=v(this.MQ,6e4)}};r(),r(),r();var rD=0;var hD=c,Os=self.requestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame,Le=self.cancelAnimationFrame||self.webkitCancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelRequestAnimationFrame;Os&&Le||(Os=function(t){const i=YR(),e=_.max(0,16-(i-rD)),s=u(()=>t(i+e),e);return rD=i+e,s},Le=hD),Os=Os.bind(self),Le=Le.bind(self);var oD=zs.L_||zs.ru&&zs.Q_<13;function aD(t,i,e){const s=t.getImageData(i,e,1,1).data;return 0===s[0]&&0===s[1]&&0===s[2]&&0===s[3]}var uD=class{get Ca(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{drawImage(i){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;nt.OQ(i,e,s,n,r,h),requestVideoFrameCallback:i=>t.FQ(i),cancelVideoFrameCallback:i=>t.UQ(i)}}(this)}LQ(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s{this.zQ.delete(i),t(e,s)});return()=>e.cancelVideoFrameCallback(s)}{let e;const s=n=>{this.jQ()?(this.zQ.delete(i),this.QQ=!1,t(n,void 0)):e=Os(s)};return e=Os(s),()=>Le(e)}}jQ(){return(!this.t.lP||this.QQ)&&!this.t.xP&&this.t.AP>=Lr.GL}HQ(t){let i=this.KQ;void 0===i&&(i=h.createElement("canvas"),this.KQ=i);const e=i.getContext("2d"),s=this.t,n=s.MP,r=s.DP,o=i.width,a=i.height;e.clearRect(0,0,i.width,i.height),o===n&&a===r||(i.width=n,i.height=r),e.drawImage(t,0,0,n,r);let u=!1;return n>0&&aD(e,n-1,0)&&(i.width=o,u=!0),r>0&&aD(e,0,r-1)&&(i.height=a,u=!0),u&&e.drawImage(t,0,0,n,r),i}kn(){this.zQ.forEach(t=>t.XQ()),this.zQ.clear(),this.t.mn(d.Lw,this.YQ),this.t.mn(d.Zw,this.JQ),this.VQ=void 0,this.KQ=void 0}constructor(t){this.t=void 0,this.VQ=void 0,this.hu=void 0,this.KQ=void 0,this.zQ=re(),this.WQ=1,this.QQ=!0,this.JQ=()=>{this.QQ=!0},this.YQ=()=>{this.VQ=this.t.zP(),this.zQ.forEach((t,i)=>{t.XQ(),t.XQ=this.qQ(t.GQ,i)})},this.t=t,this.t.wn(d.Lw,this.YQ),this.t.wn(d.Zw,this.JQ),this.YQ()}};r(),r(),r();var Qh=function(t){return t.yn="dimensionchange",t}({}),cD=class extends gp{constructor(t,i){super(Qh.yn),this.width=void 0,this.height=void 0,this.width=t,this.height=i}};r(),r();var dD,lD=class{constructor(t,i){this.xe=void 0,this.GQ=void 0,this.xe=t,this.GQ=i}},fD=class extends lD{get Iu(){return this.ZQ}get Eu(){return this.$Q}kn(){this.tK.disconnect()}constructor(t,i){super(t,i),this.tK=void 0,this.ZQ=0,this.$Q=0,this.iK=t=>{if(t.length>0){const i=t[t.length-1].contentRect;this.$Q=i.width,this.ZQ=i.height,this.GQ(this.$Q,this.ZQ)}},this.tK=new s.ResizeObserver(this.iK),this.tK.observe(this.xe)}};r(),r();var vD=["Webkit","Moz","O","ms"],_D=(()=>{let t=!1;try{if(void 0!==s&&"function"==typeof s.addEventListener){const i=w.defineProperty({},"passive",{get(){t=!0}});s.addEventListener("testPassiveEventSupport",gs,i),s.removeEventListener("testPassiveEventSupport",gs,i)}}catch(t){}return t})(),gD=Ba();function pD(t){return gD.has(t)||gD.set(t,function(t){const i=(dD||(dD=s&&s.document&&s.document.createElement("span")),dD);if(!i||!i.style)return t;if(void 0!==i.style[t])return t;const e=t.charAt(0).toUpperCase()+t.slice(1);for(const t of vD){const s=t+e;if(void 0!==i.style[s])return s}return t}(t)),gD.get(t)}function mD(t){const i=t.style;i.position="absolute",i.left="0",i.right="0",i.bottom="0",i.top="0",i.overflow="scroll",i.zIndex="-1",i.visibility="hidden"}function wD(t){const i=t.style;i.position="absolute",i.left="0",i.top="0",i[pD("transition")]="0s"}var yD=class extends lD{kn(){Le(this.eK),this.eK=0,this.sK.removeEventListener("scroll",this.nK),this.rK.removeEventListener("scroll",this.nK),Ao(this.hK),s&&s.removeEventListener("resize",this.oK)}get Iu(){return this.xe.getBoundingClientRect().height||this.ZQ||0}get Eu(){return this.xe.getBoundingClientRect().width||this.$Q||0}constructor(t,i,e){super(t,i),this.hK=void 0,this.eK=0,this.$Q=NaN,this.ZQ=NaN,this.sK=void 0,this.aK=void 0,this.rK=void 0,this.uK=void 0,this.cK=void 0,this.hr=()=>{const t=1e5;this.aK.style.width=t+"px",this.aK.style.height=t+"px",this.sK.scrollLeft=t,this.sK.scrollTop=t,this.rK.scrollLeft=t,this.rK.scrollTop=t,0===this.rK.scrollTop&&Os(this.hr)},this.dK=()=>{const t=this.Eu,i=this.Iu;this.GQ(t,i),this.$Q=t,this.ZQ=i,this.hr(),this.eK=0},this.nK=()=>{if(this.eK)return;const t=this.Eu,i=this.Iu;t===this.$Q&&i===this.ZQ||(this.eK=Os(this.dK))},this.oK=()=>{this.cK||(this.cK=u(this.lK,66))},this.lK=()=>{this.cK=void 0,this.fK()},this.fK=()=>{this.nK()};const n=function(t,i){return s.getComputedStyle(t,void 0).getPropertyValue(i)||t.style[i]}(t,"position");e||"static"!==n||(t.style.position="relative");const r=h.createElement("div");this.hK=r,this.sK=h.createElement("div"),this.aK=h.createElement("div"),this.rK=h.createElement("div"),this.uK=h.createElement("div"),mD(this.sK),mD(this.rK),wD(this.aK),function(t){wD(t),t.style.width="200%",t.style.height="200%"}(this.uK),r.appendChild(this.sK),r.appendChild(this.rK),this.sK.appendChild(this.aK),this.rK.appendChild(this.uK),t.appendChild(r),this.sK.addEventListener("scroll",this.nK),this.rK.addEventListener("scroll",this.nK),s&&s.addEventListener("resize",this.oK),this.nK()}},bD=class extends Ne{_n(t){this.tK||("function"==typeof s.ResizeObserver?this.tK=new fD(this.xe,this.iK):this.tK=new yD(this.xe,this.iK,t))}kn(){this.Vo(),this.tK&&(this.tK.kn(),this.tK=void 0)}get Iu(){return this.tK?this.tK.Iu:0}get Eu(){return this.tK?this.tK.Eu:0}constructor(t){super(),this.xe=void 0,this.tK=void 0,this.iK=(t,i)=>{this.So(new cD(t,i))},this.xe=t}};r(),r();var AD=class extends gp{constructor(){super(Bs.pa)}};r();var Ps=function(){if(!h)return;const t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];for(const i of t)if(i[1]in h)return{vK:i[0],sa:i[1],_K:i[2],gK:i[3],Ze:i[4],pK:i[5]}}();r();var SD=class extends gp{constructor(){super(Bs.ka)}},TD=class t extends Ne{static la(t){return Boolean(Ps&&h[Ps.gK]&&Ps.vK in t)}yo(){const t=this.xe[Ps.vK]();t&&t.then?t.then(this.mK,this.wK):(h.removeEventListener(Ps.pK,this.wK),h.addEventListener(Ps.pK,this.wK))}jo(){const t=h[Ps.sa]();t&&t.then?t.then(this.mK,this.wK):(h.removeEventListener(Ps.pK,this.wK),h.addEventListener(Ps.pK,this.wK))}yK(){const t=this.ds,i=this.xe===h[Ps._K];this.ds=i,t!==i&&this.So(new AD)}bK(){this.So(new wC)}kn(){this.Vo(),h.removeEventListener(Ps.Ze,this.mK),h.removeEventListener(Ps.pK,this.wK)}constructor(i){super(),this.xe=void 0,this.ca=void 0,this.ds=!1,this.mK=()=>this.yK(),this.wK=()=>this.bK(),this.xe=i,this.ca=t.la(i),h.addEventListener(Ps.Ze,this.mK),this.yK()}},kD=class t extends Ne{static la(t){return zs.ru&&("webkitEnterFullscreen"in t||"webkitSupportsPresentationMode"in t)}yo(){this.xe.webkitSupportsPresentationMode&&this.xe.webkitSupportsPresentationMode("fullscreen")?zs.ru?requestAnimationFrame(()=>this.xe.webkitSetPresentationMode("fullscreen")):this.xe.webkitSetPresentationMode("fullscreen"):this.xe.webkitEnterFullscreen()}jo(){this.xe.webkitSupportsPresentationMode&&this.xe.webkitSupportsPresentationMode("inline")?this.xe.webkitSetPresentationMode("inline"):this.xe.webkitExitFullscreen()}yK(){const t=this.ds;let i;i=this.xe.webkitPresentationMode?"fullscreen"===this.xe.webkitPresentationMode:Boolean(this.xe.webkitDisplayingFullscreen),this.ds=i,t!==i&&this.So(new AD)}kn(){this.Vo(),this.xe.removeEventListener("webkitbeginfullscreen",this.mK),this.xe.removeEventListener("webkitendfullscreen",this.mK),this.xe.removeEventListener("webkitpresentationmodechanged",this.mK)}constructor(i){super(),this.xe=void 0,this.ca=void 0,this.ds=!1,this.mK=()=>this.yK(),this.xe=i,this.ca=t.la(i),this.xe.addEventListener("webkitbeginfullscreen",this.mK),this.xe.addEventListener("webkitendfullscreen",this.mK),this.xe.addEventListener("webkitpresentationmodechanged",this.mK),this.yK()}},ED=class extends Ne{get ca(){return!!this.AK&&this.AK.ca}get ds(){return this.SK}yo(){this.AK?this.AK.yo():this.So(new wC)}jo(){for(const t of this.TK)t.ds&&t.jo()}kK(t){this.AK=t}EK(t){this.TK.push(t),t.wn(Bs.pa,this.yK),t.wn(Bs.ma,this.Rs),this.yK()}xK(t){_e(this.TK,t),t.mn(Bs.pa,this.yK),t.mn(Bs.ma,this.Rs)}PK(){for(const t of this.TK)if(t.ds)return!0;return!1}hr(){this.AK=void 0,this.SK=!1;const t=this.TK.slice();for(const i of t)this.xK(i),i.kn();this.yK()}kn(){this.Vo(),this.hr()}constructor(...t){super(...t),this.TK=[],this.AK=void 0,this.SK=!1,this.yK=()=>{const t=this.SK,i=this.PK();t!==i&&(this.SK=i,this.So(new AD))}}},xD=class extends Ne{get ca(){return!!this.IK&&this.CK.ca}get ds(){return this.CK.ds}yo(){this.IK&&this.CK.yo()}jo(){this.CK.jo()}RK(){this.CK.wn([Bs.pa,Bs.ka],this.yK),this.CK.wn(Bs.ma,this.Rs)}DK(){this.CK.mn([Bs.pa,Bs.ka],this.yK),this.CK.mn(Bs.ma,this.Rs)}er(){const t=this.CK,i=this.t.qP();if(t===i)return;this.ga=!0;const e=this.ds,s=this.ca;e&&this.jo(),this.DK(),this.CK=i,this.RK(),e&&!this.ds&&this.ca?this.yo():this.jo(),this.ga=!1,s!==this.ca&&this.So(new SD),e!==this.ds&&this.So(new AD)}kn(){this.Vo(),this.DK(),this.t.mn(d.Bw,this.NK)}constructor(t,i){super(),this.t=void 0,this.IK=void 0,this.CK=void 0,this.ga=!1,this.NK=()=>this.er(),this.yK=t=>{this.ga||this.So(t)},this.t=t,this.IK=i,this.CK=new ks,this.RK(),this.t.wn(d.Bw,this.NK),this.er()}};r(),r(),r();var oc=function(t){return t.MODE_CHANGE="presentationmodechange",t.ERROR="error",t}({}),PD=class extends gp{constructor(t){super(oc.MODE_CHANGE),this.presentationMode=void 0,this.presentationMode=t}};r(),r();var ID=class extends Ne{au(t){for(const i of this.Zf)t.wn(i,this.BK);this.MK.push(t)}LK(t){for(const i of this.Zf)t.mn(i,this.BK);this.MK.push(t)}kn(){this.Vo();for(const t of this.MK)this.LK(t);Wt(this.MK)}constructor(t,i=!1,e){super(e),this.MK=[],this.Zf=void 0,this.BK=void 0,this.FK=t=>{Ht(()=>{this.Rs(t)})},this.Zf=t,this.BK=i?this.FK:this.Rs}},tl=class extends je{au(t){t.lw(this.UK),this.MK.push(t)}LK(t){t.mw(this.UK),_e(this.MK,t)}kn(){this.Vo();for(const t of this.MK)t.mw(this.UK);Wt(this.MK)}constructor(t,i=!1){super(t),this.MK=[],this.UK=void 0,this.FK=t=>{Ht(()=>{this.Rs(t)})},this.UK=i?this.FK:this.Rs}};r();var CD=class extends Oi{get error(){return this.errorObject.message}xa(){return this}constructor(t){super(oc.ERROR),this.errorObject=void 0,this.errorObject=t}};r();var RD=class extends as{constructor(t,i,e){super(t,i,e)}},DD=class extends je{get Ca(){return this.hu||(this.hu=this.xa()),this.hu}xa(){return function(t){let i;const e={get currentMode(){return t.Wo()},requestMode(i){const e=Fk(i);e&&t.Jo(e)},supportsMode(i){const e=Fk(i);return!!e&&t.Xo(e)},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new tl(e,!0),i.au(t),e}(this)}Jo(t){this.Yo!==t&&(this.Yo=t,this.ra=!0,this.Ko(t))}Wo(){return this.Yo}Xo(t){switch(t){case Yu.NATIVE_PICTURE_IN_PICTURE:return this.ea.JL;case Yu.FULLSCREEN:return this.ha.ca;case Yu.INLINE:return!0}return!1}Ko(t){switch(this.ta.Zg(),t){case Yu.FULLSCREEN:Wr(this.ta.Zo(t=>this.VK(t)));break;case Yu.NATIVE_PICTURE_IN_PICTURE:Wr(this.ta.Zo(t=>this.HK(t)));break;case Yu.INLINE:Wr(this.ta.Zo(t=>this.WK(t)))}}async VK(t){fr(t),await this.ea.jo().catch(gs),fr(t);try{await this.qK(),this.So(new PD(this.Yo))}catch(i){const e=new RD(me.FULLSCREEN_ERROR,"Failed to enter fullscreen.");throw this.So(new CD(e)),fr(t),this.Jo(Yu.INLINE),e}finally{this.ra=!1}}async HK(t){fr(t),await this.sa().catch(gs),fr(t);try{await this.ea.yo(),this.So(new PD(this.Yo))}catch(i){const e=new RD(me.PICTURE_IN_PICTURE_ERROR,"Failed to enter native picture-in-picture.");throw this.So(new CD(e)),fr(t),this.Jo(Yu.INLINE),e}finally{this.ra=!1}}async WK(t){fr(t),await this.sa().catch(gs),fr(t),await this.ea.jo().catch(gs),this.So(new PD(this.Yo)),this.ra=!1}async qK(){if(this.ha.ds)return;const t=this.ha.ww([Bs.pa,Bs.ma]);if(this.ha.yo(),await t,!this.ha.ds)throw new m("Failed to enter fullscreen.")}async sa(){if(!this.ha.ds)return;const t=this.ha.ww([Bs.pa,Bs.ma]);if(this.ha.jo(),await t,this.ha.ds)throw new m("Failed to exit fullscreen.")}_i(){this.ra||(this.Yo!==Yu.FULLSCREEN||this.ha.ds?this.Yo!==Yu.FULLSCREEN&&this.ha.ds&&this.Jo(Yu.FULLSCREEN):this.Jo(Yu.INLINE))}kn(){this.ha.mn(Bs.pa,this.yK),this.ha.mn(Bs.ma,this.bK),this.ea.mn(na.QL,this.zK),this.ea.mn(na.KL,this.zK),this.ea.mn(na.ma,this.GK),this.Vo()}constructor(t,i){super(),this.Yo=Yu.INLINE,this.ra=!1,this.ha=void 0,this.ea=void 0,this.ta=new Zn,this.hu=void 0,this.yK=()=>{this._i()},this.bK=()=>{this.ra||(this.So(new el(new as(me.FULLSCREEN_ERROR,"Failed to enter fullscreen."))),this._i())},this.zK=()=>{this.ra||(this.Yo!==Yu.NATIVE_PICTURE_IN_PICTURE||this.ea.YL?this.Yo!==Yu.NATIVE_PICTURE_IN_PICTURE&&this.ea.YL&&this.Jo(Yu.NATIVE_PICTURE_IN_PICTURE):this.Jo(Yu.INLINE))},this.GK=()=>{this.ra||(this.So(new CD(new RD(me.PICTURE_IN_PICTURE_ERROR,"Unexpected native picture-in-picture error."))),this.zK())},this.ha=t,this.ea=i,this.ha.wn(Bs.pa,this.yK),this.ha.wn(Bs.ma,this.bK),this.ea.wn(na.QL,this.zK),this.ea.wn(na.KL,this.zK),this.ea.wn(na.ma,this.GK)}};r();var ND=class t{XK(t){return this.jK.Zo(()=>this.QK(t))}GP(){this.Bz.Nz()}async QK(i){const e=this.Bz.Yq(at.Mk),s=e.hq,n=await t.KK(s,i);return await this.Bz.Dq(e),n}static async KK(i,e){return zs.S_||zs.w_?"all":(i.src||(i.src="data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),await t.YK(),!e&&await t.JK(i,!1)?"all":await t.JK(i,!0)?"muted":"none")}static async JK(t,i){t.muted=i;const e=t.play();try{if(!vo(e))return!zs.Ks;const t=Ze(250);return await Promise.race([e,t]),!0}catch(t){return!1}finally{t.pause(),t.muted=!0}}static YK(){return new Promise(t=>{if("function"==typeof MessageChannel){const i=new MessageChannel;i.port1.onmessage=()=>t(),i.port2.postMessage("")}else u(t,0)})}kn(){this.jK.kn()}constructor(t){this.Bz=void 0,this.jK=void 0,this.Bz=t,this.jK=new Zn}},BD=ND;function MD(t){BD=t}function LD(t){let i;return{get url(){return t.Yu},get method(){return t.Hk},get headers(){return i||(i=t._k.OT()),i},get body(){return t.XT},get useCredentials(){return t.Xk},get type(){return t.Km},get subType(){return t.zk},get mediaType(){return t.Gk},get responseType(){return t.fk}}}function OD(t){switch(t.toLowerCase()){case"arraybuffer":return Bi.NT;case"json":return Bi.BT;case"stream":return Bi.MT;default:return Bi.LT}}function FD(t){switch(t.toUpperCase()){case"POST":return Qe.POST;case"PUT":return Qe.PUT;case"DELETE":return Qe.DELETE;case"HEAD":return Qe.HEAD;case"OPTIONS":return Qe.OPTIONS;default:return Qe.GET}}function UD(t){switch(t.toLowerCase()){case"manifest":return q.bk;case"segment":return q.Ak;case"preload-hint":return q.Sk;case"content-protection":return q.Tk;default:return q.yk}}function VD(t){switch(t.toLowerCase()){case"initialization-segment":return he.Ek;case"fairplay-license":return he.xk;case"fairplay-certificate":return he.Pk;case"widevine-license":return he.Ik;case"widevine-certificate":return he.Ck;case"playready-license":return he.Rk;case"clearkey-license":return he.Dk;case"aes128-key":return he.Nk;default:return he.yk}}function HD(t){switch(t.toLowerCase()){case"audio":return $a.Bk;case"video":return $a.Mk;case"text":return $a.LT;case"image":return $a.Lk;default:return $a.yk}}r(),r(),r(),r();var WD=class{get ZK(){return this.$K.Yy}get Ca(){return this.hu||(this.hu=this.tY()),this.hu}get iY(){return this.eY}get sY(){return!this.eY}get nY(){return this.rY>0}get uE(){return this.cE}vD(){this.eY=!0,this.$K.Qy(null)}hY(){this.$K.Ky(new Xb(this.oY))}aY(t){if(!this.sY)throw new g("Cannot respond more than once");if(!Mc(t))throw new g("Expected valid response");this.cE=this.uY(t),this.vD()}cY(){try{const t=this.dY(this.Ca);t?this.lY(t):this.nY||this.iY||this.vD()}catch(t){this.oY.push(t),this.hY()}}lY(t){if(this.iY)throw new m("Request has been redirected or a response already exists");if(vo(t))this.fY(t);else{if("function"!=typeof t)throw new g("Expected promise or function");{const i=new Ga,e=t=>{t?i.Ky(t):i.Qy(void 0)};try{const s=t(e);vo(s)&&i.$g(s)}catch(t){i.Ky(t)}this.fY(i.Yy)}}}async fY(t){try{this.rY++,await t,this.rY--,this.nY||this.iY||(this.oY.length?this.hY():this.vD())}catch(t){this.rY--,this.oY.push(t),this.nY||this.iY||this.hY()}}constructor(t,i){this.vY=void 0,this.dY=void 0,this.$K=void 0,this.oY=void 0,this.hu=void 0,this.eY=void 0,this.cE=void 0,this.rY=void 0,this.vY=t,this.dY=i,this.$K=new Ga,this.oY=[],this.hu=void 0,this.eY=!1,this.cE=void 0,this.rY=0}},qD=class t extends WD{get XT(){return this._Y}get _k(){return this.vY._k}get vk(){return this.vY.vk}get uE(){return this.cE}get dk(){return this.vY.dk}get gk(){return this.vY.gk}get Yu(){return this.vY.wk}static gY(t,i,e){const s=void 0===t.body?e:t.body;return new il({lk:s,vk:i.vk,fk:i.vk.fk,_k:t.headers,dk:t.status,gk:t.statusText,wk:t.url,pk:!0},i)}tY(){return function(t){let i;const e=LD(t.vk);return{get closed(){return!t.sY},get request(){return e},get url(){return t.Yu},get status(){return t.dk},get statusText(){return t.gk},get headers(){return i||(i=t._k.OT()),i},get body(){return t.XT},respondWith:i=>t.aY(i),waitUntil:i=>t.lY(i)}}(this)}uY(i){return t.gY(i,this.vY,this._Y)}constructor(t,i,e){super(t,i),this._Y=void 0,this._Y=e,this.cY()}};r();var zD=class extends WD{get XT(){return this.vY.XT}get sY(){return this.pY&&!this.eY}get _k(){return this.vY._k}get Hk(){return this.vY.Hk}get mY(){return this.wY}get uE(){return this.cE}get fk(){return this.vY.fk}get Wk(){return this.vY.Wk}get qk(){return this.vY.qk}get Yg(){return this.vY.Yg}get Km(){return this.vY.Km}get zk(){return this.vY.zk}get Gk(){return this.vY.Gk}get Yu(){return this.vY.Yu}get Xk(){return this.vY.Xk}get Kk(){return this.vY.Kk}get jk(){return this.vY.jk}get Qk(){return this.vY.Qk}get Yk(){return this.vY.Yk}tY(){return function(t){let i;return{get url(){return t.Yu},get method(){return t.Hk},get headers(){return i||(i=t._k.OT()),i},get body(){return t.XT},get closed(){return!t.sY},get useCredentials(){return t.Xk},get type(){return t.Km},get subType(){return t.zk},get mediaType(){return t.Gk},get responseType(){return t.fk},redirect:i=>t.yY(i),respondWith:i=>t.aY(i),waitUntil:i=>t.lY(i)}}(this)}uY(t){const i=this.vY.XT,e=new il({lk:i,_k:{},vk:this.vY,wk:this.vY.Yu,fk:this.vY.fk,dk:200,gk:"OK"});return qD.gY(t,e,i)}yY(t){if(!this.sY)throw new g("Cannot redirect, already redirected or has a response");let i;i=Q(t)?{url:t}:t,this.wY=function(t,i){return new ro({Yu:void 0===t.url?i.Yu:t.url,Hk:void 0!==t.method?FD(t.method):void 0,_k:t.headers,XT:t.body,Xk:t.useCredentials,Km:void 0!==t.type?UD(t.type):void 0,zk:void 0!==t.subType?VD(t.subType):void 0,Gk:void 0!==t.mediaType?HD(t.mediaType):void 0,fk:void 0!==t.responseType?OD(t.responseType):void 0},i)}(i,this.vY),this.vD()}constructor(t,i,e){super(t,i),this.wY=void 0,this.pY=void 0,this.pY=e,this.cY()}};var GD=class extends yA{bY(t){this.AY.bY(t)}SY(t){this.AY.SY(t)}TY(t){this.AY.TY(t)}dX(t){this.AY.dX(t)}_X(t){this.AY._X(t)}constructor(t,i=!0){const e=new XD(t);super(e,i),this.AY=void 0,this.AY=e}},XD=class{async vk(t){let i;try{i=await this.kY(t,t.Yg)}catch(i){if(i instanceof xA)return await this.EY(i,t.Yg);throw i}if(i=await this.xY(i,t.Yg),pA(i))return i;throw new ir(i)}Jk(t){return this.iE.Jk(t)}async kY(t,i){fr(i);let e,s=t;for(const t of this.PY.slice()){fr(i);const n=new zD(s,t,!e);if(!n.iY)try{await n.ZK}catch(t){0;continue}n.mY&&!e?s=n.mY:n.uE&&!e&&(e=n.uE)}return e||this.iE.vk(s)}async EY(t,i){let e;if(t instanceof ir)e=t.uE;else{const i=t.vk;e=new il({lk:null,vk:i,fk:i.fk,dk:0,gk:""})}const s=await this.xY(e,i);if(s===e)throw t;if(pA(s))return s;throw new ir(s)}async xY(t,i){let e=t;for(const t of this.IY.slice()){fr(i);const s=await Promise.resolve(e.Fy().lk(i)),n=new qD(e,t,s);if(!n.iY)try{await n.ZK}catch(t){0;continue}e=n.uE||e}return e}bY(t){this.PY.unshift(t)}SY(t){this.PY.push(t)}TY(t){_e(this.PY,t)}dX(t){this.IY.unshift(t)}_X(t){_e(this.IY,t)}kn(){this.iE.kn(),Wt(this.PY),Wt(this.IY)}constructor(t){this.iE=void 0,this.PY=[],this.IY=[],this.iE=t}};r();var jD=class{get Ca(){return this.hu||(this.hu=function(t){return{addRequestInterceptor(i){t.bY(i)},removeRequestInterceptor(i){t.TY(i)},addResponseInterceptor(i){t.dX(i)},removeResponseInterceptor(i){t._X(i)}}}(this)),this.hu}bY(t){this.aV.bY(t)}TY(t){this.aV.TY(t)}dX(t){this.aV.dX(t)}_X(t){this.aV._X(t)}constructor(t){this.aV=void 0,this.hu=void 0,this.aV=t}},QD=class extends Ne{get Ca(){return this.hu||(this.hu=function(t){return{get online(){return t.cP},get estimator(){return function(t){return{get bandwidth(){return t.IW},get roundTripTime(){return t.RW}}}(t.CY)},setEstimator(i){t.RY(function(t){if(!t)return;return{get IW(){return PS(t.bandwidth)},get RW(){return PS(t.roundTripTime)},DW:i=>function(t){if(!t)return;return{DY(i){t.markRequestStart(i)},NY(i){t.markResponseStart(i)},BY(i,e){t.markResponseData(i,e)},MY(i){t.markResponseEnd(i)}}}(t.createMeasurer(LD(i)))}}(i))},addRequestInterceptor(i){t.bY(i)},removeRequestInterceptor(i){t.TY(i)},addResponseInterceptor(i){t.dX(i)},removeResponseInterceptor(i){t._X(i)},addEventListener(i,e){t.wn(i,e)},removeEventListener(i,e){t.mn(i,e)}}}(this)),this.hu}get cP(){return this.LY.cP}get CY(){return this.Mz.CY}RY(t){this.Mz.RY(t)}bY(t){this.aV.bY(t)}TY(t){this.aV.TY(t)}dX(t){this.aV.dX(t)}_X(t){this.aV._X(t)}kn(){this.Vo(),this.LY.mn(d.Xw,this.OY),this.LY.mn(d.Gw,this.FY)}constructor(t,i,e){super(i),this.LY=void 0,this.aV=void 0,this.Mz=void 0,this.hu=void 0,this.OY=void 0,this.FY=void 0,this.LY=t,this.aV=i,this.Mz=e,this.OY=t=>{this.So(t)},this.FY=t=>{this.So(t)},this.LY.wn(d.Xw,this.OY),this.LY.wn(d.Gw,this.FY)}};r(),r(),r();var xa=function(t){return t.PERFORMANCE="performance",t.QUALITY="quality",t.BANDWIDTH="bandwidth",t}({});r();function KD(t,i,e,s,n,r){const h=[];let o=t-_.max(r,1),a=t+n;if(i&&e){const t=No(e,1,5),s=i-t;o=_.min(o,s);const n=i+e+t;a=_.max(a,n)}0!==o&&s.jM(0,o)&&h.push([0,o]);return s.jM(a,1/0)&&h.push([a,1/0]),h}function YD(t){return t instanceof m&&"QuotaExceededError"===t.name}r();var JD={type:xa.BANDWIDTH};function ZD(t){const i=ru(JD);return Q(t)?i.type=$D(t):Mc(t)&&function(t){switch(t){case xa.PERFORMANCE:case xa.QUALITY:case xa.BANDWIDTH:return!0;default:return!1}}(t.type)&&(i.type=$D(t.type)),Mc(t)&&Mc(t.metadata)&&(i.metadata=function(t){const i={},e=bs(t.bitrate);return S(e)||(i.bitrate=e),i}(t.metadata)),i}function $D(t){switch(t){case"bandwidth":return xa.BANDWIDTH;case"performance":return xa.PERFORMANCE;case"quality":return xa.QUALITY}}r();var tN=class extends gp{constructor(t){super("UY"),this.VY=void 0,this.VY=t}};r();var iN=class extends gp{constructor(t){super("HY"),this.WY=void 0,this.WY=t}};r();var eN=class extends gp{constructor(t){super("qY"),this.zY=void 0,this.zY=t}},sN=class extends Ne{GY(t){this.XY=t}get jY(){switch(this.QY.type){case xa.PERFORMANCE:return 0;case xa.QUALITY:return 1/0;case xa.BANDWIDTH:return this.QY.metadata&&void 0!==this.QY.metadata.bitrate?this.QY.metadata.bitrate:sc.Bg.pW();default:return sc.Bg.pW()}}get Ca(){return this.hu}get WY(){return this.QY}set WY(t){this.QY=t,this.So(new iN(t))}get VY(){return this.KY}set VY(t){this.KY=t,this.So(new tN(t))}get YY(){return _.min(this.KY,this.JY)}get zY(){return this.ZY}set zY(t){this.ZY=t,this.So(new eN(t))}get $Y(){return this.JY}get CY(){var t;return null!=(t=this.tJ)?t:this.XY.dq}RY(t){this.tJ=t}iJ(t){let i=_.min(t,.8*this.JY);if(i=_.max(10,i),this.JY===i)return!1;const e=this.YY;this.JY=i;const s=this.YY;return s!==e&&this.So(new tN(s)),!0}get eJ(){return this.sJ}set eJ(t){this.sJ=t}constructor(...t){super(...t),this.hu=function(t){return{get strategy(){return function(t){return{metadata:t.metadata,type:t.type}}(t.WY)},set strategy(i){t.WY=ZD(i)},get targetBuffer(){return t.VY},set targetBuffer(i){const e=bs(i);S(e)||(t.VY=e)},get bufferLookbackWindow(){return t.zY},set bufferLookbackWindow(i){const e=bs(i);S(e)||(t.zY=e<=0?30:e)},get maxBufferLength(){return t.$Y},get clearBufferWhenSettingTargetQuality(){return t.eJ},set clearBufferWhenSettingTargetQuality(i){t.eJ=Th(i)}}}(this),this.QY=JD,this.KY=20,this.ZY=30,this.JY=1/0,this.sJ=!1,this.tJ=void 0,this.XY=void 0}};r(),r();var nN=class extends Oi{xa(){return new rN}constructor(){super("bI")}},rN=class extends gp{constructor(){super("change")}};r(),r();var hN=class extends Ne{kn(){this.Vo();for(const t of this.Zf)this.nJ.mn(t,this.rJ)}constructor(t,i,e){super(e),this.nJ=void 0,this.Zf=void 0,this.rJ=t=>{fS(t)&&Ht(()=>{this.So(t.Ca)})},this.nJ=t,this.Zf=i;for(const t of this.Zf)this.nJ.wn(t,this.rJ)}},le=class extends je{kn(){this.Vo(),this.nJ.mw(this.rJ)}constructor(t,i){super(i),this.nJ=void 0,this.rJ=t=>{fS(t)&&Ht(()=>{this.So(t.Ca)})},this.nJ=t,this.nJ.lw(this.rJ)}};var oN=class extends je{get CO(){return this.HO}set CO(t){if(this.RO<=t)throw new m("Start time of a clip should be smaller than the end time.");this.HO!==t&&(this.HO=t,this.So(new nN))}get RO(){return this.zO}set RO(t){if(t<=this.CO)throw new m("End time of a clip should be larger than the start time.");this.zO!==t&&(this.zO=t,this.So(new nN))}get Ca(){return this.hu||(this.hu=function(t){let i;const e={get startTime(){return t.CO},set startTime(i){t.CO=i},get endTime(){return t.RO},set endTime(i){t.RO=i},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new le(t,e),e}(this)),this.hu}hr(){0===this.HO&&this.zO===1/0||(this.HO=0,this.zO=1/0,this.So(new nN))}hJ(){return new Uo([this.CO,this.RO],[!0,!0])}constructor(...t){super(...t),this.HO=0,this.zO=1/0,this.hu=void 0}};r();var aN=class t extends lS{Xx(t,i){const e=this.oJ.hJ().LM(t);super.Xx(e,i),this.aJ()}Kx(){return super.Kx()||this.uJ}get cJ(){return this.EP().length?this.EP():this.oJ.hJ()._s()}EP(){return Uo.jn(super.EP()).Mn(this.oJ.hJ())._s()}QP(){this.Kx()?this.Xx(this.cJ.start(0)):this.dJ(),super.QP(),this.aJ()}async Ta(t,i){fr(i),this.uJ=!1,this.oJ.hr(),await super.Ta(t,i)}kn(){return this.oJ.mn("bI",this.lJ),this.Lx.mn(d.py,this.Nc),this.fJ(),super.kn()}eI(t){switch(t.type){case d.$w:return this.So(t),this.vJ(),!0;case d.Zw:case d.Rw:return this.So(t),this._J(),!0;case d.Nw:if(this.gJ)return!0}return super.eI(t)}get gJ(){return this.oJ.RO=this.oJ.RO-t.fd;this.uJ&&!e?(this.uJ=!1,this.lP&&this.QP()):this.uJ||!e||this.xP||this.mJ||(this.uJ=!0,this.So(new ur(i)),this.jP())}dJ(){if(this.ct===1/0)return;const i=this.cJ,e=Uo.jn(i).LM(this.zx);rs(this.zx,e,t.fd)||this.Xx(e)}constructor(i,e){super(i),this.oJ=void 0,this.uJ=!1,this.pJ=void 0,this.mJ=!1,this.lJ=()=>{this.dJ(),this.aJ()},this.Nc=()=>{this.fJ(),this.aJ();this.gJ&&this.zx>=this.oJ.RO-t.wJ&&!this.Qx&&(this.pJ=Os(this.Nc))},this.vJ=()=>{this.mJ=!0},this._J=()=>{this.mJ&&(this.mJ=!1,this.aJ())},this.oJ=e,this.oJ.wn("bI",this.lJ),this.Lx.wn(d.py,this.Nc)}};aN.wJ=1,aN.fd=.001,r();var uN=class{get yJ(){return this.bJ}set yJ(t){this.bJ=t}constructor(){this.bJ=void 0,this.bJ=!1}};r();var cN=class extends lS{Kx(){return!this.bJ.yJ&&super.Kx()}jP(){this.AJ=!0,super.jP()}QP(){this.AJ=!1,super.QP()}eI(t){if(this.bJ.yJ)switch(t.type){case d.Nw:return this.zx=0,this.AJ||(this.xP?this.SJ=!0:this.QP()),!0;case d.Zw:this.SJ&&(this.SJ=!1,this.QP());break;case d.jw:if(this.SJ||super.Kx())return!0}return super.eI(t)}constructor(t,i){super(t),this.bJ=void 0,this.SJ=!1,this.AJ=!1,this.bJ=i}};r(),r();var dN=class{get Ca(){return this.hu}get hO(){return this.oa.rP.hO}get aO(){return this.oa.rP.aO}get rO(){return this.oa.rP.rO}get TJ(){throw new m("Not implemented")}get kJ(){throw new m("Not implemented")}get uO(){return this.oa.rP.uO}get oO(){return this.oa.rP.oO}get cO(){return this.oa.rP.cO}constructor(t){this.oa=void 0,this.hu=void 0,this.oa=t,this.hu=function(t){return{get currentBandwidthEstimate(){return t.aO},get corruptedVideoFrames(){return t.hO},get droppedVideoFrames(){return t.rO},get totalVideoFrames(){return t.oO},get totalBytesLoaded(){return t.uO},get bufferedSegments(){return t.cO}}}(this)}};function lN(t){if(!t||!br(t))return{rO:0,hO:0,oO:0,aO:0,uO:0,cO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}};if("function"==typeof t.getVideoPlaybackQuality){const i=t.getVideoPlaybackQuality();return{rO:i.droppedVideoFrames,hO:i.corruptedVideoFrames||0,oO:i.totalVideoFrames}}return{rO:t.webkitDroppedFrameCount||0,hO:0,oO:t.webkitDecodedFrameCount||0}}r(),r();var fN=class extends Oi{xa(){return new vN}constructor(){super("EJ")}},vN=class extends gp{constructor(){super("castingchange")}};r();var _N=class extends Ne{get xJ(){var t,i;return(null==(t=this.PJ)?void 0:t.xJ)||(null==(i=this.IJ)?void 0:i.xJ)||!1}get CJ(){return this.PJ}get RJ(){return this.IJ}DJ(t){this.PJ=t,this.NJ(t)}BJ(t){this.IJ=t,this.NJ(t)}NJ(t){t.wn("statechange",this.MJ)}LJ(t){t.mn("statechange",this.MJ)}get Ca(){return this.hu||(this.hu=function(t){let i;const e={get casting(){return t.xJ},get airplay(){var i;return null==(i=t.CJ)?void 0:i.Ca},get chromecast(){var i;return null==(i=t.RJ)?void 0:i.Ca},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new hN(t,["EJ"],e),e}(this)),this.hu}kn(){this.Vo(),this.PJ&&(this.LJ(this.PJ),this.PJ=void 0),this.IJ&&(this.LJ(this.IJ),this.IJ=void 0)}constructor(...t){super(...t),this.PJ=void 0,this.IJ=void 0,this.OJ=!1,this.hu=void 0,this.MJ=()=>{const t=this.OJ,i=this.xJ;t!==i&&(this.OJ=i,this.So(new fN))}}};r(),r();var gN=class{static async FJ(t,i){try{const e=new ro({Yu:t,fk:Bi.LT,Hk:Qe.GET}),s=await i.vk(e);return(await s.lk()).trim()}catch(t){return void Ce(t)}}static UJ(t){try{const i=RR(t);return new LR(i.key,i.domains_page,i.domains_source,i.expiration_date,i.features,i.customer_id,i.generation_date,i.sdks,i.send_impression)}catch(t){throw new as(me.LICENSE_ERROR,"Invalid license. No valid license was configured.")}}static VJ(t){void 0===t&&(t=yR.bh),zd.um("The baked-in license is used. Please update the configuration with your license.");const i=t.dj("F2b-iL'[FL[S"),e=JSON.parse('["F$(:_L50F|aY"]').map(i=>t.dj(i)),s=JSON.parse('[".$hsF|b9_Ess*rS:F]Y\\""]').map(i=>t.dj(i)),n=Number(new Date(Number(t.dj('COD|aHpHa:p3Ceo3Co""')))),r=JSON.parse("[]").map(i=>t.dj(i));return new LR(i,e,s,n,r)}static convertLicenseToDummyLicense(t){return new LR(t.yj,t.bj,t.Aj,864e13,t.Tj,t.Ej,Date.now(),t.Pj,t.Ij)}};r();var cu=class t{static DT(){return t.Bg||(t.Bg=pN.US()?new pN:new Fb),t.Bg}static jy(i){t.DT().jy(i)}static CT(){t.DT().CT()}static zy(i){return t.DT().zy(i)}static Gy(i,e){t.DT().Gy(i,e)}static HJ(i){const e=t.zy(i);if(void 0!==e)return C(e)}static WJ(i){return"true"===t.zy(i)}};cu.Bg=void 0;var pN=class extends cu{static US(){const t="foobar";try{return self.localStorage.setItem(t,t),self.localStorage.removeItem(t),!0}catch(t){}return!1}jy(t){self.localStorage.removeItem(t)}CT(){self.localStorage.clear()}zy(t){var i;return null!=(i=self.localStorage.getItem(t))?i:void 0}Gy(t,i){self.localStorage.setItem(t,i)}},mN="https://validate.theoplayer.com/1/",wN=72e5,yN=_.floor(14399999*_.random()-wN),bN="THEOplayer.license",AN=class{async qJ(){const t=await this.zJ(this.GJ.license,this.GJ.licenseUrl);this.mQ.XJ(t)}async zJ(t,i){let e,s=i;t?e=gN.UJ(t):s||(e=gN.VJ()),s||(s=mN+e.yj);const n=this.jJ();let r;if(e&&(r=this.QJ.Uj(e),r===MR.pj)){if(this.KJ(e.Sj)&&this.KJ(null==n?void 0:n.Sj)){const t=await this.YJ(s);if(t)return t}return e}if(n){if(this.QJ.Uj(n)===MR.pj){if(this.KJ(null==n?void 0:n.Sj)){const t=await this.YJ(s);if(t)return t}return n}cu.jy(bN)}const h=await gN.FJ(s,this.aV);let o;if(h){o=gN.UJ(h);if(this.QJ.Uj(o)===MR.pj)return cu.Gy(bN,h),o;cu.jy(bN)}else if(!this.Gj&&e&&r===MR.mj&&s===mN+e.yj)return gN.convertLicenseToDummyLicense(e);if(!e&&!o)throw new as(me.LICENSE_ERROR,"The given license is invalid!");this.JJ(null!=e?e:o,new as(me.LICENSE_ERROR,"The given license is invalid!"))}async Nj(t){let i=await this.mQ.pQ();if(this.KJ(i.Sj)){var e;const t=null!=(e=this.GJ.licenseUrl)?e:mN+i.yj,s=await this.YJ(t);s&&(this.mQ.XJ(s),i=s)}try{const e=this.QJ.Uj(i);if(e===MR.wj){const t=OR.Cj;throw new as(VR(t),ea.Oj(t))}if(e===MR.mj){const t=OR.mj;throw new as(VR(t),ea.Oj(t))}this.QJ.Nj(t,i)}catch(t){this.ZJ(t)}}async Fj(t){const i=await this.mQ.pQ();try{this.QJ.Fj(t,i)}catch(t){this.ZJ(t)}}async YJ(t){try{const i=await gN.FJ(t,this.aV);if(void 0===i)return;const e=gN.UJ(i);return this.QJ.Uj(e)===MR.pj?(cu.Gy(bN,i),e):void 0}catch(t){return}}KJ(t){return!t||Number(new Date)+2592e5+yN>=t}jJ(){const t=cu.zy(bN);if(t)return gN.UJ(t)}JJ(t,i){this.mQ.XJ(t),this.ZJ(i)}ZJ(t){throw Tv(t.message),this.$J.bQ(t.message),t}constructor(t,i,e,s,n,r){this.aV=void 0,this.QJ=void 0,this.$J=void 0,this.mQ=void 0,this.GJ=void 0,this.Gb=void 0,this.Gj=void 0,this.aV=t,this.QJ=i,this.$J=e,this.mQ=s,this.GJ=n,this.Gb=r,this.Gj=jR(r)}};r();var SN=class{XJ(t){this.tZ=t,this.iZ.Qy()}get eZ(){return this.tZ}async pQ(){return this.tZ?Promise.resolve(this.tZ):(await this.iZ.Yy,this.tZ)}constructor(){this.tZ=void 0,this.iZ=new Ga}};r(),r();var TN=class extends Oi{xa(){return new kN}constructor(){super("bI")}},kN=class extends gp{constructor(){super("change")}};function EN(t){let i;const e={get fontFamily(){return t.sZ},set fontFamily(i){t.sZ=i},get fontColor(){return t.nZ},set fontColor(i){t.nZ=i},get fontSize(){return t.rZ},set fontSize(i){t.rZ=i},get backgroundColor(){return t.hZ},set backgroundColor(i){t.hZ=i},get windowColor(){return t.oZ},set windowColor(i){t.oZ=i},get edgeStyle(){return t.aZ},set edgeStyle(i){t.aZ=i},get marginTop(){return t.uZ},set marginTop(i){t.uZ=i},get marginBottom(){return t.cZ},set marginBottom(i){t.cZ=i},get marginLeft(){return t.dZ},set marginLeft(i){t.dZ=i},get marginRight(){return t.lZ},set marginRight(i){t.lZ=i},addEventListener(t,e){const s=vu(t,Ts);i.wn(s,e)},removeEventListener(t,e){const s=vu(t,Ts);i.mn(s,e)}};return i=new _p(e),t.wn(["bI"],t=>i.So(t.Ca)),e}r();var xN={sZ:void 0,nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0,aZ:void 0,uZ:void 0,cZ:void 0,dZ:void 0,lZ:void 0},ia="THEOplayer.textTrackStyle.",PN=class t extends Ne{get fZ(){return this.vZ}get sZ(){return this.vZ.sZ}set sZ(t){this.er({sZ:t})}get nZ(){return this.vZ.nZ}set nZ(t){this.er({nZ:t})}get rZ(){return this.vZ.rZ}set rZ(t){this.er({rZ:t})}get hZ(){return this.vZ.hZ}set hZ(t){this.er({hZ:t})}get oZ(){return this.vZ.oZ}set oZ(t){this.er({oZ:t})}get aZ(){return this.vZ.aZ}set aZ(t){this.er({aZ:t})}get uZ(){return this.vZ.uZ}set uZ(t){this.er({uZ:t})}get cZ(){return this.vZ.cZ}set cZ(t){this.er({cZ:t})}get lZ(){return this.vZ.lZ}set lZ(t){this.er({lZ:t})}get dZ(){return this.vZ.dZ}set dZ(t){this.er({dZ:t})}get Ca(){return this.hu||(this.hu=EN(this)),this.hu}hr(){this.er(xN)}er(i){this.vZ=Y({},this.vZ,i),t._Z(this.vZ),this.So(new TN)}static gZ(){const t=Y({},xN);return t.sZ=cu.zy(ia+"fontFamily")||t.sZ,t.nZ=cu.zy(ia+"fontColor")||t.nZ,t.rZ=cu.zy(ia+"fontSize")||t.rZ,t.hZ=cu.zy(ia+"backgroundColor")||t.hZ,t.oZ=cu.zy(ia+"windowColor")||t.oZ,t.aZ=cu.zy(ia+"edgeStyle")||t.aZ,t}static _Z(t){cu.Gy(ia+"fontFamily",t.sZ||""),cu.Gy(ia+"fontColor",t.nZ||""),cu.Gy(ia+"fontSize",t.rZ||""),cu.Gy(ia+"backgroundColor",t.hZ||""),cu.Gy(ia+"windowColor",t.oZ||""),cu.Gy(ia+"edgeStyle",t.aZ||"")}constructor(){super(),this.vZ=void 0,this.hu=void 0,this.vZ=t.gZ()}};function IN(t,i){var e,s;t.style.marginLeft=(null!=(e=i.dZ)?e:0)+"px",t.style.marginRight=(null!=(s=i.lZ)?s:0)+"px",t.style.width="calc(100% - "+t.style.marginLeft+" - "+t.style.marginRight+")"}function CN(t){return(null==t?void 0:t.Cd.Km)===O.AV}function yr(t){return(null==t?void 0:t.Cd.Km)===O.SV}r(),r(),r(),r(),r();var RN=[d.uo,d.jw,Jr.PM,d.py,d.Qw,d.Ww,d.$w,d.Zw,d.Nw,d.Kw,d.wy,d.Cw,Jr.AI,d.Jw,hc.ma,jr.Dw,jr.By,d.xw,d.Ew,d.yy,d.Ay,d.LICENSE_REQUEST_GENERATED,d.Fw,d.Vw,d.Lw,d.Bw],DN={BL:!1};function NN(t){return void 0!==t.DP}function BN(t){return t.Cd.Km===O.SV}r();var bi=function(t){return t.pZ="mZ",t}({}),MN=["mZ"],We=function(t){return t[t.wZ=0]="wZ",t[t.MT=1]="MT",t[t.yZ=2]="yZ",t}({});r(),r();var LN=["loadstart","encrypted","waitingforkey","webkitneedkey","msneedkey"],ON=function(t){return t.bZ="AZ",t.SZ="TZ",t.kZ="EZ",t}({}),FN=class extends Ne{get Cd(){return this.ZS}get hq(){return this.pT}async xZ(t,i){const e=await this.hw.nw(t.Ym,i),s=await e.RS();return await this.PZ(s),s}IZ(t){const i=this.ES;return i?0!==t.fq.length&&t.fq.some(t=>t.xS.Ym===i.xS):0!==this.ZS.fq.length?t.fq.some(t=>this.ZS.fq.some(i=>t.xS===i.xS)):0===t.fq.length||!this.CZ}RZ(t){return this.DZ.RZ(t),this.ZS=t,Promise.resolve()}NZ(t){this.DZ.NZ(t)}BZ(){if(!zs.vg)return"";const t=this.GJ.ps5;return"; pass_through="+t.passThrough+'; playmode="'+t.playMode+'";'}async zg(){this.Vo(),this.pT.removeEventListener("loadedmetadata",this.MZ);for(const t of LN)this.pT.removeEventListener(t,this.LZ);await this.ta.kn(),this.OZ(),await this.DZ.hr(),await this.FZ(void 0)}UZ(t){t!==this.VZ&&(this.VZ=t,t?this.HZ.Qy(void 0):this.HZ=new Ga)}PZ(t){return this.ta.Zo(()=>this.FZ(t))}async FZ(t){if(t&&!this.pT.src&&!this.pT.srcObject)throw new fs(me.CONTENT_PROTECTION_ERROR,"Attempted to attach MediaKeys to a sourceless MediaElement");if(!t&&(this.pT.src||this.pT.srcObject))throw new fs(me.CONTENT_PROTECTION_ERROR,"Attempted to remove MediaKeys from a non-empty MediaElement");t&&!this.VZ&&await this.HZ.Yy;const i=this.ES;i&&(await i.IS(this.pT),this.ES=void 0),t&&(await t._n(this.pT),this.ES=t)}Ta(t,i){return this.ta.Zo(()=>this.WZ(t,i))}WZ(t,i){this.UZ(!1);const e=this.PL.vP;if(Q(t)&&i){const e=this.qZ(t,i);this.pT.appendChild(e)}else if(Q(t))this.pT.src=t;else if(function(t){if(void 0!==s.ManagedMediaSource&&t instanceof s.ManagedMediaSource)return!0;if("undefined"!=typeof MediaSource&&t instanceof MediaSource)return!0;return!1}(t))if(function(t){return"srcObject"in t&&zs.ru&&zs.Q_>=17}(this.pT))try{this.pT.srcObject=t}catch(i){this.pT.src=URL.createObjectURL(t)}else this.pT.src=URL.createObjectURL(t);else UN(t)&&(this.pT.srcObject=t);this.PL.vP=e}qZ(t,i){const e=h.createElement("source");return e.src=t,e.type=i+this.BZ(),e}zZ(t){return this.ta.Zo(()=>this.GZ(t))}GZ(t){this.WZ(t),this.pT.load()}OZ(){this.UZ(!1),yf(this.pT)}async XZ(){this.ES&&await this.ES.hr()}constructor(t,i,e,s,n){super(),this.ZS=void 0,this.PL=void 0,this.pT=void 0,this.VZ=!1,this.HZ=new Ga,this.CZ=!1,this.ta=new Zn,this.DZ=void 0,this.hw=void 0,this.GJ=void 0,this.ES=void 0,this.MZ=()=>{this.CZ=!0},this.LZ=()=>{this.UZ(!0)},this.ZS=t,this.PL=i,this.pT=i.hq,this.DZ=e,this.hw=s,this.GJ=n,this.pT.addEventListener("loadedmetadata",this.MZ);for(const t of LN)this.pT.addEventListener(t,this.LZ)}};function UN(t){return"undefined"!=typeof MediaStream&&t instanceof MediaStream}var VN=class extends FN{get Fx(){return Uo.jn(this.pT.buffered)}get ct(){return this.pT.duration}get jZ(){const t=this.ct;if(!isFinite(t))return!1;const i=this.Fx;if(0===i.V)return!1;return t-i.An(i.V-1)0||this.pT.videoHeight>0))return this.Fx}async GY(){const t=this.Cd;switch(t._q){case Fa.lC:case Fa.fC:this.pT.setAttribute("crossorigin",t._q);break;case Fa.Fk:default:this.pT.removeAttribute("crossorigin")}void 0!==t.wP?this.pT.preload=t.wP:this.pT.preload=Dn.PW,void 0!==t.gq?this.pT.title=t.gq:Ol(this.pT),t.YZ?await this.zZ(t.YZ):zs.vg?await this.Ta(t.rC,t.GT):await this.Ta(t.rC),this.DZ.Un(this,t)}IZ(t){return!1}RZ(t){return Promise.resolve(void 0)}JZ(t){return!1}ZZ(){return!UN(this.ZS.YZ)}async zg(){Ol(this.pT),await super.zg()}static $Z(t,i){return!!i.canPlayType&&Boolean(i.canPlayType(t.GT))}};r();var Et=class extends gp{constructor(t){super(d.Qw),this.currentTime=void 0,this.currentTime=t}};r();var ke=class extends gp{constructor(){super(d.Ww)}};r(),r();var HN=function(t){return t.t$="i$",t}({}),WN=class extends gp{constructor(t){super("i$"),this.e$=void 0,this.e$=t}},qN=class extends Ne{get s$(){return this.n$}r$(t,i){if(rs(t,i,1e-5))return;const e=new Uo([t,i]);this.n$=this.n$.HM(e),this.So(new WN(e))}h$(t,i){this.n$=this.n$.qM(new Uo([t,i]))}hr(){this.n$=Uo.rL()}kn(){this.Vo()}constructor(...t){super(...t),this.n$=Uo.rL()}};function zN(t,i){return void 0===i&&(i=new Jb({highWaterMark:1/0})),new Kb(new GN(t,i),{highWaterMark:0})}r(),r(),r();var GN=class{start(t){this.iZ=t,this.o$()&&this.a$()}pull(){this.tf.length>0?this.u$():this.c$=!0,this.o$()&&this.a$()}cancel(t){return Wt(this.tf),this.if=0,this.c$=!1,this.Wd.cancel(t)}u$(){if(0===this.tf.length)return;const t=this.tf;this.tf=[],this.if=0,this.c$=!1,this.iZ.enqueue(t)}o$(){if(this.c$)return!0;return this.d$-this.if>0}a$(){if(this.l$)return;const t=this.Wd.read().then(this.f$).catch(this.PE);this.l$=t;const i=()=>{this.l$===t&&(this.l$=void 0)};t.then(i,i)}constructor(t,{size:i=()=>1,highWaterMark:e=1}){this.Wd=void 0,this.v$=void 0,this.d$=void 0,this.tf=[],this.if=0,this.iZ=void 0,this.c$=!1,this.l$=void 0,this.f$=t=>t.done?(this.u$(),void this.iZ.close()):(this.tf.push(t.value),this.if+=this.v$(t.value),this.c$&&this.u$(),this.o$()?this.Wd.read().then(this.f$):void 0),this.PE=t=>{this.u$(),this.iZ.error(t)},this.Wd=t.getReader(),this.v$=i,this.d$=e}};r(),r(),r(),r();var XN=class{_$(t){this.g$.push(t),this.Wy+=t.byteLength}p$(t){if(this.Wy<=t)return this.m$();const i=this.g$;let e=0,s=0;for(;s0&&ethis.tf.Wy)return;switch(this.Ra){case 0:this.R$(t);break;case 1:this.D$(t);break;case 2:this.N$(t)}}}B$(){this.Ra=0,this.C$=8}R$(t){const i=dh(this.tf.w$(this.C$)),e=new oi,s=ha.wD(i,e);if(!s.vD)return this.C$=s.bD,void(t&&this.C$>this.tf.Wy&&this.M$(this.tf.Wy));const n=s.yD.Km;let r=s.yD.Wy;0===r&&(r=1/0),this.T$(n,r),this.L$(n)?this.O$(r):this.M$(r)}O$(t){this.Ra=1,this.C$=t}D$(t){const i=dh(this.tf.A$(this.C$)),e=new oi,s=ha._D(i,e,!t);if(!s.vD)throw new yT(e.ac);this.k$(),this.F$(s.gD),this.B$()}M$(t){this.Ra=2,this.C$=0,this.U$=t}N$(t){const i=this.tf.y$(this.U$);this.U$-=i.Wy;for(const t of i.g$)this.V$(t);(0===this.U$||t&&this.U$===1/0)&&(this.k$(),this.B$())}constructor(){this.tf=new XN,this.Ra=0,this.C$=0,this.U$=0,this.B$()}};function jN(t){return t instanceof ey}function QN(t){return t instanceof ty}function KN(t){return t instanceof Jw||t instanceof Zw}function YN(t){return t instanceof Tw}function JN(t){return t instanceof sw}function ZN(t){return t instanceof bl}function $N(t){return t instanceof Vi}function tB(t){return t instanceof fy}function iB(t){return t instanceof Kh}function eB(t){return t instanceof ay}function sB(t){return t instanceof cy}function nB(t,i){const e=hh(t.boxes,eB);if(e&&e.flags.baseDataOffsetPresent)e.baseDataOffset=e.baseDataOffset.add(i);else for(const e of t.boxes)e instanceof cy&&e.flags.dataOffsetPresent&&(e.dataOffset=e.dataOffset+i)}r();var rB=class extends Qa{start(t){this.iZ=t}transform(t){this.E$(t)}flush(){this.P$()}L$(t){return t===ui.HC||t===ui.NR||t===ui.GR}F$(t){const i=this.H$(t);this.iZ.enqueue(i)}V$(t){this.iZ.enqueue(t)}H$(t){const i=ye(t.lk.lk);switch(t.Km){case"moov":return this.W$(i);case"sidx":return this.q$(i);case"moof":return this.z$(i)}return i}get G$(){if(void 0===this.X$)throw new m("Expected to have found a movie header timescale.");return this.X$}j$(t){const i=this.Q$.get(t);if(void 0===i)throw new m("Expected to have found a media header timescale for track ID "+t+".");return i}W$(t){const i=Ry(t);for(let t=0;t>2,o=!!(2&r),a=Wp(t,i,3),u=ti(t,i),c=ti(t,i);let d;if(i.ac=e)return;const s=t.zy(i.byte);return i.byte+=1,s}function vB(t,i){return function(t,i,e){let s=0,n=e;for(;n>0;)n-=1,s=256*s+kr(t,i);return s}(t,i,2)}r(),r(),r(),r(),r(),r();var wl=class t{G0(t){this.X0=this.X0.concat(t.X0),this.j0+=t.V}Q0(t,i,e){const s=this.j0,n=e-i;n>0&&(this.X0.push({K0:i,Y0:e,J0:n,Z0:s,$0:t}),this.j0+=n)}zy(t){for(const i of this.X0)if(i.Z0<=t&&t=this.j0))if(this.j0=t,0!==t)for(let t=i.length-1;t>=0;t-=1){const s=i[t];if(e<=s.J0)return s.Y0-=e,s.J0-=e,void(i.length!==t+1&&(i.length=t+1));e-=s.J0}else i.length=0}get lk(){const t=new Array(this.j0);let i=0;for(const e of this.X0){const s=e.Y0;for(let n=e.K0;n0;)n-=1,s=2*s+ku(t,i);return s}function yt(t,i){let e=0;for(;0===ku(t,i)&&e<32;)e+=1;return $u(t,i,e)+2**e-1}function gB(t,i){const e=yt(t,i);return 1&e?_.floor((e+1)/2):-_.floor(e/2)}function pB(t,i){const e=[],s={byte:1};let n;do{e.push(wB(t,i,s)),n=i.zy(s.byte)}while(void 0!==n&&128!==n);return e}function mB(t,i){let e,s=0;do{e=kr(t,i),s+=e}while(255===e);return s}function wB(t,i,e){const s=mB(i,e),n=mB(i,e),r=e.byte,h=r+n;return e.byte=h,{e1:t,s1:s,n1:n,h1:r,o1:h,a1:i}}var yB=function(t){return t[t.u1=1]="u1",t[t.c1=2]="c1",t[t.d1=3]="d1",t[t.v1=4]="v1",t[t._1=5]="_1",t[t.g1=6]="g1",t[t.m1=7]="m1",t[t.w1=8]="w1",t[t.b1=9]="b1",t}({}),bB=[void 0,[1,1],[12,11],[10,11],[16,11],[40,33],[24,11],[20,11],[32,11],[80,33],[18,11],[15,11],[64,33],[160,99],[4,3],[3,2],[2,1]];function AB(t,i,e){let s=8,n=8;for(let r=0;r=2&&t.push(i),n=0)}this.T1=i-t.length}P1(t){const i=this.S1;let e=t;for(const t of i){if(!(t<=e))return e;e+=1}return e}zy(t){if(!(t>this.E1.V))return t>this.T1&&this.A1(),this.E1.zy(this.P1(t))}constructor(t){this.E1=void 0,this.S1=[],this.T1=0,this.E1=t}};function TB(t){const i=new SB(t);let e,s,n,r,h,o,a=0,u=0,c=0,d=0;const l=i.zy(1),f={bit:32};if(yt(i,f),100===l||110===l||122===l||144===l){const t=yt(i,f);3===t&&(e=ku(i,f)),yt(i,f),yt(i,f),ku(i,f);if(1===ku(i,f))for(let e=0;e<(3!==t?8:12);e+=1){1===ku(i,f)&&AB(i,f,e<6?16:64)}}const v=yt(i,f),g=yt(i,f);if(0===g)yt(i,f);else if(1===g){ku(i,f),gB(i,f),gB(i,f);const t=yt(i,f);for(let e=0;e>3),i);e.Ly(8*i),r.push({M1:i,L1:s})}b.push({O1:i,F1:s,U1:n,V1:r})}return{F0:s,H1:n,W1:r,q1:h,z1:a,G1:u,X1:c,j1:d,Q1:o,K1:l,Y1:f,J1:v,Z1:_,t2:p,i2:m,e2:g,W0:w,s2:y,n2:b}}(dh(t.eB.lk),new oi);i=function(t,i){let e=t.toString()+".";switch(i.H1){case 0:break;case 1:e+="A";break;case 2:e+="B";break;case 3:e+="C";break;default:return}switch(e+=i.q1.toString()+".",e+=function(t){let i=t;return i=i>>>1&1431655765|(1431655765&i)<<1,i=i>>>2&858993459|(858993459&i)<<2,i=i>>>4&252645135|(252645135&i)<<4,i=i>>>8&16711935|(16711935&i)<<8,i=i>>>16|i<<16,i}(i.Q1).toString(16)+".",i.W1){case 0:e+="L";break;case 1:e+="H";break;default:return}e+=i.G1.toString();const s=i.z1.reduce((t,i)=>0===t?i:i+1,0);for(let t=0;tt.sN===s),h=ul.yF(t,r.jD);e&&!h.lF(e)||(e=h)}}return e}(wT(e,ui.NR),i),n=wT(e,ui.WR);return{CO:s.rF(),U2:n.lk}}function _l(t){const i=t.MS("codecs");return i?i.split(",").map(t=>t.trim()):[]}function IB(t,i){return ff(t,i,Tr)}function CB(t,i){return!("opus"===t)&&!("opus"===i)||t===i}function RB(t,i){const e=DB(t),s=DB(i);if((e||s)&&zd.Zs.Cp)return!0;const n=e||NB(t),r=s||NB(i);return!n&&!r||t.split(".")[0]===i.split(".")[0]}function DB(t){return/^(ac-3|dac3|ec-3|dec3|ec\+3|ac-4|dac4)/.test(t)}function NB(t){return/^(dvav|dva1|dvhe|dvh1)/.test(t)}function Tr(t,i){if(t===i)return!0;const e=t.split("."),s=i.split("."),n=e[0];if(n!==s[0])return!1;if("mp4a"===n){const[,t,i]=e,[,n,r]=s;if(t!==n)return!1;if(Number(i)!==Number(r))return!1}return!0}r(),r(),r();var BB=class extends Qr{get H2(){return this.W2}get q2(){return this.z2}constructor(t,i,e,s){super(e),this.W2=void 0,this.z2=void 0,this.G2=void 0,this.W2=t,this.z2=i,this.G2=e}};var MB=zs.X_,LB=class extends Ne{get VY(){return this.KY}set VY(t){this.KY=t}get zY(){return this.ZY}set zY(t){this.ZY=t}get ga(){return this.X2||this.j2.updating}Q2(t,i,e){switch(t.Km){case We.wZ:case We.MT:return this.K2(e=>this.Y2(t,i,e),e);case We.yZ:throw new m("Opaque segments are not supported on web.")}}J2(t,i){switch(t.Km){case We.wZ:return this.K2(i=>this.Z2(t,i),i);case We.MT:throw new m("Streaming initialization segments are not supported on web.");case We.yZ:throw new m("Opaque initialization segments are not supported on web.")}}async Z2(t,i){this.t3?this.i3=kB(dh(t.lk)):(await this.e3(t,void 0,i),MB&&(this.s3=!1,this.n3=t))}async Y2(t,i,e){MB&&this.s3&&this.n3&&await this.Z2(this.n3,e);try{if(fr(e),this.t3&&this.i3){const n=await async function(t,i){switch(t.Km){case We.wZ:return t;case We.MT:{const e=await tA(t.lk,i);return fr(i),{Km:We.wZ,lk:new j(e)}}case We.yZ:throw new m("Cannot convert opaque SegmentData to ArraySegmentData.")}}(t,e),r=PB(n.lk,this.i3);var s;t={Km:We.wZ,lk:r.U2},i=Y({},i,{EU:r.CO+(null!=(s=i.EU)?s:0)})}await this.e3(t,i,e),this.So(new gp(bi.pZ))}finally{t.Km===We.MT&&t.lk.cancel(new Qc).catch(gs)}}async e3(t,i,e){switch(fr(e),i&&await this.r3(i),t.Km){case We.wZ:if(this.h3){const i=this.h3.y0(Zb(t.lk));return await this.o3(i,e)}return await this.a3(t.lk);case We.MT:if(this.h3){const i=this.h3.y0(t.lk);return await this.o3(i,e)}return await this.o3(t.lk,e)}}async o3(t,i){const e=this.u3.Fx,s=zN(t).getReader();let n=!1;try{for(;;){const t=await ua(s.read(),i);if(t.done){n=!1;break}fr(i);const e=fm(t.value);n=!0,await this.a3(e)}}catch(t){if(s.cancel(t).catch(gs),n){await this.d3();const t=this.u3.Fx.Mn(e.OM());for(let i=0;ithis.v3(t,i))}async v3(t,i){this.j2.appendWindowStart===t&&this.j2.appendWindowEnd===i||(await this.d3(),this.j2.appendWindowStart=0,this.j2.appendWindowEnd=i,this.j2.appendWindowStart=t)}async r3(t){if(!rs(this.j2.timestampOffset,t.EU,.001))try{this.j2.timestampOffset=t.EU}catch(i){await this.d3(),this.j2.timestampOffset=t.EU}}async a3(t){this.j2.appendBuffer(t),this._3=!0,await this.g3()}m3(t,i,e){return this.K2(e=>this.l3(t,i,e),e)}async l3(t,i,e){fr(e),this.j2.remove(t,i),await this.g3()}g3(){const t=this.u3.Fx;return new Promise((i,e)=>{let s,n=!1;const r=()=>{n=!0},h=()=>{n=!1,s="error"},o=()=>{n=!1,s="aborted"},a=()=>{n=!1,s="sourceclose",u()},u=()=>{c(),n&&!s?(t.KM(this.u3.Fx)||this.So(new gp(bi.pZ)),i()):e(new m(s))},c=()=>{this.j2.removeEventListener("update",r),this.j2.removeEventListener("error",h),this.j2.removeEventListener("abort",o),this.j2.removeEventListener("updateend",u),this.w3.mn(ON.SZ,a)};this.j2.addEventListener("update",r),this.j2.addEventListener("error",h),this.j2.addEventListener("abort",o),this.j2.addEventListener("updateend",u),zs.w_&&zs.b_<3&&this.w3.wn(ON.SZ,a)})}y3(){return this.K2(()=>this.d3())}async d3(){if(this.w3.AP===xl.rE){MB&&(this.s3=!0),this.j2.updating&&(this.X2=!0);try{this.j2.abort()}catch(t){0,this.X2=!1}this.ga&&await this.g3().catch(gs)}}b3(){return"function"==typeof this.j2.changeType&&!zs.g_}RZ(t){if(this.A3(),this.w3.AP===xl.S3)return;var i;this.T3=t;const e=null!=(i=this.w3.E3(t.GT))?i:t.GT;if(this.t3=OB(t.GT,this.x3),this.b3()&&this.P3(e)){this.x3=e;const t=this.w3.BZ();this.j2.changeType(""+e+t)}}P3(t){if(Jh(this.x3,t))return!1;const i=eb(this.x3),e=eb(t);if(i.Km!==e.Km)return!0;return!IB(_l(i),_l(e))||!(zs.Bv&&zs.v_)}I3(){this.w3.AP!==xl.Nw||this.C3||this.ga||(this.j2.timestampOffset=this.j2.timestampOffset,this.w3.R3())}async K2(t,i){this.A3();const e=new Zc;e.$g(this.D3.Yg),i&&e.$g(i);try{this.C3=t(e.Yg),await this.C3,this.w3.R3(),this.ga&&await this.g3()}finally{this.C3=void 0,e.zg()}}A3(){if(this.C3)throw new m("Internal error")}async zg(){this.Vo(),this.D3.Zg(),this.C3&&(await this.C3.catch(gs),this.C3=void 0),this.j2.removeEventListener("updateend",this.N3),this.j2.removeEventListener("bufferedchange",this.B3)}constructor(t,i,e,s,n){var r;if(super(),this.w3=void 0,this.u3=void 0,this.j2=void 0,this.T3=void 0,this.x3=void 0,this.KY=20,this.ZY=30,this.X2=!1,this._3=!1,this.C3=void 0,this.D3=new Zc,this.h3=void 0,this.s3=!1,this.n3=void 0,this.t3=!1,this.i3=void 0,this.N3=()=>{this.X2=!1},this.B3=t=>{t.removedRanges&&this.So(new gp(bi.pZ))},this.w3=i,this.u3=t,this.j2=e,this.j2.addEventListener("updateend",this.N3),this.j2.addEventListener("bufferedchange",this.B3),this.T3=s,this.x3=n,this.t3=OB(s.GT,n),null==(r=i.Cd)?void 0:r.kp){var h;const t=null!=(h=i.Cd.M3)?h:1e5;this.h3=new aB(t)}}};function OB(t,i){return Xt(t,"audio/mp4")&&Xt(i,"audio/mpeg")}r();var FB=class{get Fx(){if(this.L3.AP===xl.S3)return Uo.rL();let t=Uo.jn(this.j2.buffered).Mn(Uo.hL());const i=this.O3;return void 0!==i&&t.V>0&&t.An(t.V-1)===i&&(t=t.HM(Uo.sL(i))),t}jZ(){return!!this.O3&&this.Fx.MM().Cr(this.O3)}F3(){const t=this.Fx;this.O3=t.V>0?t.An(t.V-1):0,this.L3.U3()}I3(){this.O3=void 0}constructor(t,i){this.L3=void 0,this.j2=void 0,this.O3=void 0,this.L3=i,this.j2=t}};function UB(t,i,e,s,n,r,h){const o=new FB(n,t),a=new LB(o,t,n,e,r);return new VB(t,i,e,s,o,a,h)}var VB=class extends Ne{get Fx(){return this.u3.Fx}get Cd(){return this.ZS}get GT(){return this.jS}get V3(){return this.H3}get W3(){return this.q3.s$}get VY(){return this.z3.VY}set VY(t){this.z3.VY=t}get zY(){return this.z3.zY}set zY(t){this.z3.zY=t}get ga(){return this.z3.ga}jZ(){return this.u3.jZ()}F3(){this.u3.F3()}I3(){this.u3.I3(),this.z3.I3()}G3(t,i){this.q3.r$(t,i)}X3(t,i){this.q3.h$(t,i)}j3(){return this.z3.y3()}Q2(t,i,e){return this.z3.Q2(t,i,e)}J2(t,i,e){return this.z3.J2(t,e)}f3(t,i){return zs.w_&&zs.b_<3?this.z3.f3(t,1/0):this.z3.f3(t,i)}async pS(t,i,e){this.X3(t,i);const s=this.Fx;await this.z3.m3(t,i,e);const n=0!==s.V&&0===this.Fx.V;(zs.rg||zs.S_)&&n&&this.PL.Oy(this.PL.zx)}IZ(t){const i=t.GT;if(this.jS===i)return!0;const e=this.Q3.get(i);if(void 0!==e)return e;const s=this.K3(t);return this.Q3.set(i,s),s}K3(t){const i=this.w3.E3(t.GT);if(void 0===i)return!1;const e=eb(this.jS),s=eb(i),n=_l(e),r=_l(s);if(this.z3.b3()){if(!function(t,i){return ff(t,i,RB)}(n,r))return!1;if(zs.og&&!function(t,i){return ff(t,i,CB)}(n,r))return!1}else{if(e.Km!==s.Km)return!1;if(!IB(n,r))return!1}return!0}async RZ(t){const i=t.GT;this.jS!==i&&(this.Q3.clear(),this.z3.RZ(t),this.jS=i),this.ZS=t,this.w3.Y3()}async zg(){this.Q3.clear(),this.Vo(),this.q3.kn();try{this.z3.mn(bi.pZ,this.Rs),await this.z3.zg()}catch(t){}}constructor(t,i,e,s,n,r,h){super(),this.w3=void 0,this.ZS=void 0,this.H3=void 0,this.PL=void 0,this.jS=void 0,this.q3=void 0,this.u3=void 0,this.z3=void 0,this.Q3=Ba(),this.w3=t,this.ZS=e,this.jS=e.GT,this.H3=s,this.PL=i,this.u3=n,this.z3=r,this.q3=h,this.z3.wn(bi.pZ,this.Rs)}};r();var rh=class{J3(){let t=this.Tn,i=this.An;if(this.Z3||this.t4){const e=.001*(zd.Mg()-this.i4);this.Z3&&(t+=e),this.t4&&(i+=e)}return Uo.nL(t,i)}constructor(t,i,e=!1,s=!1){this.Tn=void 0,this.An=void 0,this.Z3=void 0,this.t4=void 0,this.i4=void 0,this.Tn=t,this.An=i,this.Z3=e,this.t4=s,this.i4=zd.Mg()}};function HB(t){const i=[];if(t.e4&&i.push(t.e4.Fx),t.s4&&i.push(t.s4.Fx),0===i.length)return Uo.rL();let e=0;for(const t of i)t.V>0&&(e=_.max(e,t.An(t.V-1)));const s=t.jZ;let n=new Uo([0,e],[!0,s]);for(let t of i)s&&t.V>0&&(t=t.HM(new Uo([t.An(t.V-1),e],[!0,!0]))),n=n.Mn(t);return n}function WB(t,i,e){const s=t.Fx;let n,r=s.zM(i);if(r>=0){if(!(r+1=0))return Promise.resolve();n=s.Tn(r)}return t.pS(n,1/0,e)}function qB(t,i,e){if(!t.Cr(i)){const s=t.zM(i,e);if(s>=0){const e=t.Tn(s);if(it.HM(i.s$),Uo.rL())}kn(){this.o4(),this.a4.mn(Jr.AI,this.u4),this.PL.mn(d.Qw,this.u4),this.PL.mn(GB,this.c4),this.r4.forEach(t=>t.mn(HN.t$,this.h4)),this.d4(),this.l4=!0}JZ(t){if(this.PL.Qx)return!1;if(0!==this.f4)return!1;const i=this.u3.Fx,e=i.zM(t);if(e>=0&&t+zB=0?e+1:i.$M(t);if(s<0||s>=i.V)return!1;const n=i.Tn(s);if(Uo.nL(t,n).qM(this.s$).eL>1)return!1;if(0===t&&!this.PL.xP)return this.v4(t,n,2e3),!0;if(zd.Ax)return this.v4(t,n,250),!0;return!(_.abs(n-t)<=.001)&&(this._4(n),!0)}v4(t,i,e){this.d4(),this.g4=t,this.PL.wn(d.$w,this.m4),this.f4=zd.Og(()=>{this.g4===this.PL.zx&&this._4(i),this.d4()},e)}d4(){0!==this.f4&&(this.PL.mn(d.$w,this.m4),zd.Lg(this.f4),this.f4=0)}_4(t){this.PL.Oy(t,!1,!0)}w4(){0!==this.y4&&(zd.Lg(this.y4),this.y4=0),this.PL.mn(d.py,this.ad)}b4(){this.l4||0===this.A4&&(this.w4(),this.A4=zd.fm(this.S4,250))}o4(){0!==this.A4&&(zd.vm(this.A4),this.A4=0),this.w4(),this.PL.xP||(this.T4=0)}E4(){return!this.PL.lP&&(!this.PL.xP||this.x4())&&0!==this.PL.vP&&!this.PL.Qx&&!this.PL.lt&&(this.P4()||this.a4.AP>=Lr.XL)}x4(){return!1}P4(){const t=this.PL.zx,i=this.u3.Fx,e=i.zM(t);return-1!==e&&i.An(e)>t+zB}I4(t,i){const e=i.zM(t);return e>-1?i.An(e):t}constructor(t,i,e,s){this.u3=void 0,this.a4=void 0,this.PL=void 0,this.l4=void 0,this.r4=void 0,this.f4=void 0,this.y4=void 0,this.C4=void 0,this.g4=void 0,this.T4=void 0,this.A4=void 0,this.R4=void 0,this.D4=void 0,this.N4=void 0,this.h4=void 0,this.u4=void 0,this.ad=void 0,this.m4=void 0,this.c4=void 0,this.S4=void 0,this.u3=t,this.a4=i,this.PL=e,this.l4=!1,this.r4=[],this.f4=0,this.y4=0,this.C4=0,this.g4=0,this.T4=0,this.A4=0,this.R4=1,this.h4=t=>{const i=this.PL.zx,e=t.e$.Cr(i),s=t.e$.Cr(i,zB)&&this.PL.AP<=Lr.GL;(e||s)&&this.JZ(i)},this.u4=Vl(t=>{if(this.l4)return;if(this.a4.AP<=Lr.GL){const t=this.PL.zx;this.JZ(t)||this.S4()}else this.d4()},100),this.ad=Vl(t=>{this.b4()},100),this.m4=t=>{t.currentTime!==this.g4&&this.d4()},this.c4=()=>{this.E4()?0===this.A4&&(this.PL.wn(d.py,this.ad),this.y4=zd.Og(()=>{this.b4()},3500)):this.o4()},this.S4=()=>{const t=this.C4,i=this.T4,e=this.PL.zx,s=zd.Mg(),n=this.u3.Fx;if(t!==e)return this.C4=e,this.T4=s,this.R4=1,void(this.D4=zd.Tx?5e3:1e3);if(this.E4()&&0!==n.V&&i>0&&s>i+this.D4){let t;const i=this.s$.MM().qM(n),s=i.ZM(e);if(-1!==s){const n=i.Tn(s);if(n-e<1||this.x4()){const e=i.An(s);0,t=e}}var r;if(!t)t=null==(r=this.N4)?void 0:r.determineStallJumpTarget(),t&&t!==e||(t=e+.01*this.R4,n.Cr(t)||(t=this.I4(e,n)));0,this.C4=t,this.R4++,this.D4=_.min(2*this.D4,1e4),this._4(t)}},this.a4.wn(Jr.AI,this.u4),this.PL.wn(d.Qw,this.u4),this.PL.wn(GB,this.c4),this.N4=s,this.D4=zd.Tx?5e3:1e3}},jB=class extends XB{x4(){if(!zs.S_||!this.PL.xP)return!1;const t=this.PL.zx,i=this.u3.Fx,e=this.s$.MM().qM(i),s=e.ZM(t);if(-1===s)return!1;return e.Tn(s)-t<=3e3}},QB=zs.B_||zs.L_,KB=zs.W_||zs.X_||zs.ru,xl=function(t){return t.S3="closed",t.rE="open",t.Nw="ended",t}({}),YB=class extends FN{get e4(){return this.B4}get s4(){return this.M4}get ct(){if(void 0!==this.L4)return this.L4;if(void 0!==this.O4)return this.O4;const t=this.aq.duration;return t===Gl?1/0:t}F4(t){if(t<0)throw new m("Invalid duration");this.U4()?this.V4(t):this.L4=t}V4(t){const i=t===1/0;if(i&&this.aq.setLiveSeekableRange){const t=2**39;this.aq.setLiveSeekableRange(0,t)}S(t)?(this.aq.duration=Gl,this.O4=NaN):(this.aq.duration=i?KB?1/0:Gl:t,this.O4=void 0),this.L4=void 0}get Fx(){return QB?HB(this):function(t,i){let e=i;return e.V>0&&t.jZ&&(e=e.HM(Uo.sL(e.An(e.V-1)))),e}(this,Uo.jn(this.pT.buffered))}get QZ(){var t;return null==(t=this.B4)?void 0:t.Fx}get KZ(){var t;return null==(t=this.M4)?void 0:t.Fx}get kP(){return this.H4.J3().Mn(new Uo([0,this.ct],[!0,!0]))}W4(t,i,e,s){this.H4=new rh(t,i,Boolean(e),Boolean(s))}get jZ(){return(!this.B4||this.B4.jZ())&&(!this.M4||this.M4.jZ())}get AP(){return this.aq.readyState}async GY(){const t=this.ZS,i=hh(t.q4,t=>St(t.GT)),e=hh(t.q4,t=>$y(t.GT));this.pT.disableRemotePlayback=!0,await this.z4();const s=this.BZ();if(i){const t=new qN;var n;this.G4.n4(t);const e=null!=(n=this.E3(i.GT))?n:i.GT;this.X4=this.aq.addSourceBuffer(""+e+s),this.B4=UB(this,this.PL,i,at.Bk,this.X4,e,t),this.B4.wn(bi.pZ,this.B3)}if(e){const t=new qN;var r;this.G4.n4(t);const i=null!=(r=this.E3(e.GT))?r:e.GT;this.j4=this.aq.addSourceBuffer(""+i+s),this.M4=UB(this,this.PL,e,at.Mk,this.j4,i,t),this.M4.wn(bi.pZ,this.B3)}this.DZ.Un(this,t)}async z4(){await super.zZ(this.aq),"open"!==this.AP&&await KA(this.aq,"sourceopen")}U4(){if("open"!==this.AP)return!1;const t=this.B4&&this.B4.ga,i=this.M4&&this.M4.ga;return!(t||i)}F3(){this.Q4=!0,this.B4&&this.B4.F3(),this.M4&&this.M4.F3(),this.Q4=!1,this.K4()}I3(){this.B4&&this.B4.I3(),this.M4&&this.M4.I3()}IZ(t){const i=hh(t.q4,t=>St(t.GT)),e=hh(t.q4,t=>$y(t.GT));if(this.B4){if(!i)return!1;if(!this.B4.IZ(i))return!1}else if(i)return!1;if(this.M4){if(!e)return!1;if(!this.M4.IZ(e))return!1}else if(e)return!1;return!!super.IZ(t)}async RZ(t){const i=hh(t.q4,t=>St(t.GT)),e=hh(t.q4,t=>$y(t.GT)),s=[];this.B4&&s.push(this.B4.RZ(i)),this.M4&&s.push(this.M4.RZ(e)),await Promise.all(s),await super.RZ(t)}NZ(t){super.NZ(t)}async zg(){if(this.aq.removeEventListener("sourceclose",this.Y4),zs.S_&&await this.XZ(),this.B4){if(await this.B4.zg(),this.B4=void 0,lp()&&(zs.S_||zs.w_))try{this.aq.removeSourceBuffer(this.X4)}catch(t){}this.X4=void 0}if(this.M4){if(await this.M4.zg(),this.M4=void 0,lp()&&(zs.S_||zs.w_))try{this.aq.removeSourceBuffer(this.j4)}catch(t){}this.j4=void 0}this.pT.src&&URL.revokeObjectURL(this.pT.src),this.pT.disableRemotePlayback=!1,this.PL.mn([d.py,d.$w,d.Fw],this.bd),this.G4.kn(),zs.w_&&await this.XZ(),await super.zg()}Y3(){const t=this.ZS,i=t.q4.map(t=>St(t.GT)&&this.B4?this.B4.Cd:$y(t.GT)&&this.M4?this.M4.Cd:t);this.ZS=Y({},t,{q4:i})}U3(){this.Q4||this.K4()}get J4(){if(!this.jZ)return!1;const t=this.Fx;return 0!==t.V&&t.Tn(t.V-1)<=this.PL.zx}K4(){this.J4&&this.U4()&&(this.aq.endOfStream(),this.L4=void 0,this.O4=void 0,this.So(new gp(ON.bZ)),this.PL.B3())}R3(){this.U4()&&(this.jZ?this.K4():void 0!==this.L4&&this.V4(this.L4))}JZ(t){return this.G4.JZ(t)}ZZ(){return!0}E3(t){return JB(this.Z4,t)}static $Z(t){const i=fv(t.t5);if(void 0===i)return!1;if("function"!=typeof i.isTypeSupported)return!1;const e=new lv(t.t5);for(const i of t.q4)if(void 0===JB(e,i.GT))return!1;return!0}constructor(t,i,e,s,n,r=new lv(t.t5),h,o){super(t,i,s,n,o),this.Z4=void 0,this.B4=void 0,this.X4=void 0,this.M4=void 0,this.j4=void 0,this.H4=new rh(0,1/0),this.aq=void 0,this.L4=void 0,this.O4=void 0,this.G4=void 0,this.Q4=!1,this.Y4=()=>{this.So(new gp(ON.SZ))},this.i5=()=>{this.So(new gp(ON.kZ))},this.bd=()=>{this.K4()},this.B3=()=>{this.PL.B3()},this.Z4=r,this.aq=this.Z4.Lp(),this.aq.addEventListener("sourceclose",this.Y4),this.aq.addEventListener("sourceopen",this.i5),this.PL.wn([d.py,d.$w,d.Fw],this.bd),this.G4=new jB(this,e,this.PL,h)}};function JB(t,i){const e=eb(i),s=_l(e),n="audio/mp4"===e.Km,r=n&&1===s.length&&"mp4a.40.34"===s[0];if(t.Fp(i)&&(!r||!zs.X_))return i;if(r){const i=['audio/mp4; codecs="mp3"',"audio/mpeg"];for(const e of i)if(t.Fp(e))return e}if(n&&1===s.length&&"flac"===s[0].toLowerCase()){const e=["flac","fLaC","FLAC"];for(const s of e){const e='audio/mp4; codecs="'+s+'"';if(t.Fp(i))return e}}}r(),r();var Xr=class extends gp{constructor(t){super(d.Fw),this.currentTime=void 0,this.currentTime=t}},ZB=[d.wy,d.Kw,d.$w,d.Fw,d.uo,d.jw],$B=class extends Ne{get zx(){return this.xz}get e5(){return this.s5}get n5(){return this.r5}get ct(){return this.Zb}get Qx(){return this.h5}get lP(){return this.Cz}get AP(){return this.o5}get xP(){return this.Pz}get oP(){return this.Iz}set oP(t){this.oP!==t&&(this.Iz=t,this.So(new Wi(this.zx,this.OP)))}get vP(){return this.Rz}set vP(t){this.vP!==t&&(this.Rz=t,this.So(new Ik(this.zx,this.vP)))}get OP(){return this.cA}set OP(t){this.OP!==t&&(this.cA=t,this.So(new Wi(this.zx,this.OP)))}Oy(t,i,e){this.xz!==t&&(this.xz=t,this.s5=i,e&&!this.Pz?(this.r5=!0,this.So(new Xr(this.zx))):(this.r5=!1,this.Pz=!0,this.So(new ji(this.zx))))}jP(){this.Cz||(this.Cz=!0,this.So(new Si(this.zx)))}QP(){this.Cz&&(this.Cz=!1,this.So(new vt(this.zx)))}zg(){this.Vo()}constructor(t,i,e,s,n,r,h,o,a,u,c){super(),this.xz=void 0,this.Zb=void 0,this.h5=void 0,this.Cz=void 0,this.Pz=void 0,this.Iz=void 0,this.Rz=void 0,this.cA=void 0,this.o5=void 0,this.s5=void 0,this.r5=void 0,this.xz=t,this.Zb=i,this.h5=e,this.Cz=s,this.Pz=n,this.Iz=r,this.Rz=h,this.cA=o,this.o5=a,this.s5=u,this.r5=c}};function tM(t){return new $B(t.zx,t.ct,t.Qx,t.lP,t.xP,t.oP,t.vP,t.OP,t.AP,!1,t.n5)}function iM(t,i){i.ct===t.ct||S(i.ct)&&S(t.ct)||t.So(new zr(t.ct)),t.oP=i.oP,t.OP=i.OP,t.vP=i.vP,i.lP?t.jP():t.QP().catch(gs),i.zx!==t.zx||i.AP>Lr.zL&&t.AP===Lr.zL?t.Oy(i.zx,i.e5,i.n5):!i.xP&&t.xP?t.So(new ji(t.zx)):i.xP&&!t.xP&&t.AP>=Lr.GL&&t.So(new Yr(t.zx)),!i.Qx&&t.Qx&&t.So(new ur(t.zx))}r(),r();var eM=class extends Ne{get AP(){return this.TP()}a5(t){this.RV!==t&&(this.RV=t,this.So(new Ka(this.PL.zx,t)))}u5(){this.a5(this.TP())}hr(){this.a5(Lr.zL)}zg(){this.Vo()}constructor(t){super(),this.PL=void 0,this.RV=Lr.zL,this.c5=()=>{this.u5()},this.PL=t}};r();var sM=["emptied","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","timeupdate","progress","seeking","seeked"],Ou=class extends eM{TP(){let t=this.PL.hq.readyState;return t>Lr.GL&&this.PL.d5?Lr.GL:(this.PL.hq.seeking&&t>Lr.Qn&&(t=Lr.Qn),t)}zg(){for(const t of sM)this.PL.hq.removeEventListener(t,this.c5);super.zg()}constructor(t){super(t);for(const t of sM)this.PL.hq.addEventListener(t,this.c5)}};r();var nM=Zt,rM=class extends eM{TP(){if(this.PL.hq.readyState===Lr.zL)return Lr.zL;const t=this.l5(),i=t?t.An-t.Tn:0;if(!t)return Lr.Qn;const e=this.PL.vP;return this.f5()||i>=3*e?Lr.jL:i>=3?Lr.XL:Lr.GL}l5(){const t=this.PL.zx,i=this.PL.Fx.VM(.04),e=i.zM(t);if(!(e<0))return{Tn:t,An:i.An(e)}}f5(){if(this.PL.Qx)return!0;const t=this.PL.ct,i=this.l5();return!!i&&t-i.An<=nM}zg(){this.PL.mn([d.$w,d.Fw],this.c5);for(const t of sM)this.PL.hq.removeEventListener(t,this.c5);super.zg()}constructor(t){super(t),this.PL.wn([d.$w,d.Fw],this.c5);for(const t of sM)this.PL.hq.addEventListener(t,this.c5)}};r(),r();var hM=[Jr.AI,d.uo,d.jw,d.$w,d.Zw,d.Fw,d.Vw,d.Nw,hc.ma],oM=class extends Ne{v5(){return(!this.DV.n5||!this.DV._5)&&this.DV.AP{this.er()},this.DV=t,this.DV.wn(hM,this.NK)}},aM=class extends oM{g5(){return this.m5&&super.g5()}er(){this.m5&&(this.pT.paused||this.pT.ended||this.pT.error)&&(this.m5=!1),super.er()}hr(){super.hr(),this.m5=!1}zg(){this.pT.removeEventListener(Jr.PM,this.VV),super.zg()}constructor(t){super(t),this.pT=void 0,this.m5=!1,this.VV=()=>{this.m5=!0,this.er()},this.pT=t.hq,this.pT.addEventListener(Jr.PM,this.VV)}};r();var uM=class extends gp{constructor(t){super(hc.ma),this.lt=void 0,this.lt=t}};function cM(t,i){return t.CO<=i&&t.RO>i}function fi(t,i){return function(t,i){return tf(t.CO,i.CO,TE)}(t,i)||function(t,i){return tf(t.RO,i.RO,TE)}(t,i)}function dM(t,i){return function(t,i){return tf(t.UO,i.UO,TE)}(t,i)||function(t,i){return tf(t.VO,i.VO,TE)}(t,i)}function Sl(t,i,e){let s=function(t,i,e,s,n,r,h){void 0===n&&(n=!1),void 0===r&&(r=0),void 0===h&&(h=t.length);let o=r,a=h-1;for(;o<=a;){const h=o+(a-o>>1),u=s(e(t[h]),i);if(u<0)o=h+1;else if(u>0)a=h-1;else{if(!(n&&h>r&&0===s(e(t[h-1]),i)))return h;a=h-1}}return~o}(t,i,pc,e,!0);if(s<0)return s;for(;s=0?s:-(s+1)}function fM(t){const i=t.Ht;if(!i)return-1;if(t instanceof Oh)return i.w5(t);const e=i.L;if(!e)return-1;const s=Sl(e.NI,t,fi);return s>=0?s:-1}function vM(t,i){const e=function(t,i,e){const s=t.length,n=i.length;let r=0,h=0;const o=[],a=[];for(;r{const e=0|i,s=t.zy(e);return s&&s.Ca||void 0},w.defineProperty(i,"constructor",{value:wE}),i}(this)}pO(t){const i=this.A5;for(let e=i.length-1;e>=0;e-=1){const s=i[e];if(t.QO(s))return!0}return!1}zy(t){return this.A5[t]}constructor(t){this.A5=void 0,this.hu=void 0,this.A5=t}};r();var _M=class extends Fs{xa(){return new gM(this.Ht.Ca,this.AP)}constructor(t,i){super(Te.AI),this.Ht=void 0,this.AP=void 0,this.Ht=t,this.AP=i}},gM=class extends Eh{constructor(t,i){super("readystatechange"),this.track=void 0,this.readyState=void 0,this.track=t,this.readyState=i}};r();var pM=class extends Fs{xa(){return new mM(this.Ht.Ca)}constructor(t){super(Te.kI),this.Ht=void 0,this.Ht=t}},mM=class extends Eh{constructor(t){super("typechange"),this.track=void 0,this.track=t}};r();var Ml=class extends Fs{xa(){return new wM(this.PO.Ca)}constructor(t){super(Te.uI),this.PO=void 0,this.PO=t}},wM=class extends Eh{constructor(t){super("addcue"),this.cue=void 0,this.cue=t}};r();var yM=class extends Fs{xa(){return new bM(this.PO.Ca)}constructor(t){super(Te.dI),this.PO=void 0,this.PO=t}},bM=class extends Eh{constructor(t){super("removecue"),this.cue=void 0,this.cue=t}},Ji=class extends Ne{get q(){return this.S5}get L(){return this.T5}k5(t){return hh(this.T5.NI,i=>i.o===t)}get sV(){return this.E5}set sV(t){this.E5=t}get nC(){return this.x5}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}xa(){return qo(this)}get o(){return this.aS}get JI(){return this.yO}get eC(){return this.P5}set eC(t){this.P5=t}get Lt(){return this.I5}get Th(){return this.bO}set Th(t){t!==this.bO&&(this.bO=t,this.So(new Xh(this)))}get bs(){return this.$b}get ZI(){return this.C5}get Qk(){return this.Yo}set Qk(t){this.R5(t)}R5(t){const i=LS(t);i!==this.Qk&&(this.Yo=i,i===xh.Nh&&(this.D5.forEach(t=>{t.ro=!1}),Wt(this.D5),this.N5=0),this.So(new Rh(this)))}get AP(){return this.o5}set AP(t){this.o5!==t&&(this.o5=t,this.So(new _M(this,this.o5)))}get rC(){return this.B5}set rC(t){this.B5=t}get Km(){return this.Vp}set Km(t){this.Vp!==t&&(this.Vp=t,this.So(new pM(this)))}get EU(){return this.QU}set EU(t){this.QU=t}nV(t){if(!t||t.Ht)return;const i=Sl(this.M5,t,dM);if(i>=0)return;t.Ht=this;const e=-(i+1);this.M5.splice(e,0,t);const s=lM(this.L.NI,t,fi);this.L5(t,s),this.So(new Ml(t))}L5(t,i){this.A5.splice(i,0,t),this.O5(i),t.JO=i,i=0&&Ra(e,s);const n=Sl(this.M5,t,dM);n>=0&&Ra(this.M5,n),t.Ht=void 0,this.F5(t,i),this.So(new yM(t))}F5(t,i){Ra(this.A5,i),this.O5(i),t.JO=-1,this.N5>i&&--this.N5}qO(t){if(!t||t.Ht!==this)return;const i=this.w5(t);if(i<0)return;this.F5(t,i);const e=lM(this.L.NI,t,fi);this.L5(t,e);const s=tt(this.D5,i=>i===t);if(s>=0){Ra(this.D5,s);const i=lM(this.D5,t,fi);this.D5.splice(i,0,t)}}U5(t,i){const e=this.D5,s=this.A5;let n=this.N5,r=!1,h=1/0;i&&(n=0);for(let i=e.length-1;i>=0;i--){const s=e[i];cM(s,t)?s.RO=this.V5)&&this.H5(),t.JO}H5(){const t=this.A5;for(let i=this.V5;i{this.ro=!0},this.G5=()=>{this.ro=!1},this.yO=aE(),this.W5=t,this.UO=t.startTime,this.VO=t.endTime,this.W5.addEventListener("enter",this.z5),this.W5.addEventListener("exit",this.G5)}};r();var PM=class extends Fs{xa(){return new IM(this.Ht.Ca)}constructor(t){super(Te.wI),this.Ht=void 0,this.Ht=t}},IM=class extends Eh{constructor(t){super("cuechange"),this.track=void 0,this.track=t}};function CM(t){if(!t)return;let i=t.THEOplayerVTTRegion;return i||(i=new RM(t),t.THEOplayerVTTRegion=i),i}r(),r();var RM=class{get X5(){return this.j5}get o(){return this.j5.id||""}get Ti(){return Number(this.j5.width)||0}set Ti(t){this.j5.width=t||0}get ZO(){return Number(this.j5.lines)||0}set ZO(t){this.j5.lines=t||0}get $O(){return Number(this.j5.regionAnchorX)||0}set $O(t){this.j5.regionAnchorX=t||0}get tF(){return Number(this.j5.regionAnchorY)||0}set tF(t){this.j5.regionAnchorY=t||0}get eF(){return Number(this.j5.viewportAnchorX)||0}set eF(t){this.j5.viewportAnchorX=t||0}get sF(){return Number(this.j5.viewportAnchorY)||0}set sF(t){this.j5.viewportAnchorY=t||0}get iF(){return this.j5.scroll||""}get Ca(){return this.hu||(this.hu=DE(this)),this.hu}constructor(t){this.j5=void 0,this.hu=void 0,this.j5=t}};var DM=class extends Tl{get U(){return this.W5.text}set U(t){this.W5.text=t}get Pt(){return this.W5.vertical||""}set Pt(t){this.W5.vertical=t||""}get FO(){return this.W5.snapToLines}set FO(t){this.W5.snapToLines=t}get BO(){return this.W5.line}set BO(t){this.W5.line=t}get Wy(){return Number(this.W5.size)}set Wy(t){this.W5.size=No(t,0,100)}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}xa(){return yE(this)}KO(t){return EE(this,t)}constructor(t){super(t)}},NM=class extends DM{get OO(){return CM(this.W5.region)}get MO(){return this.W5.lineAlign||"start"}set MO(t){this.W5.lineAlign=t||"start"}get mo(){return this.W5.position}set mo(t){this.W5.position=t}get LO(){return this.W5.positionAlign||"auto"}set LO(t){this.W5.positionAlign=t||"auto"}get DO(){return this.W5.align||"center"}set DO(t){this.W5.align=t||"center"}constructor(t){super(t)}},BM=class extends DM{get OO(){return CM(this.X5)}get X5(){return function(t,i){if(void 0===i)return;const e=t&&t.regions;return e&&e.getRegionById(i)||void 0}(this.W5.track,this.W5.regionId)}get MO(){return function(t){return"middle"===t?"center":t}(this.W5.lineAlign||"start")}set MO(t){this.W5.lineAlign=function(t){return"center"===t?"middle":t}(t||"start")}get mo(){return this.W5.position}set mo(t){this.W5.position=function(t,i){return mE(t,i)}(t,this.DO)}get LO(){return function(t){return gE[t]}(this.W5.positionAlign||"middle")}set LO(t){this.W5.positionAlign=function(t,i){return _E[pE(t,i)]}(t||"center",this.DO)}get DO(){return function(t){return"middle"===t?"center":t}(this.W5.align||"middle")}set DO(t){this.W5.align=function(t){return"center"===t?"middle":t}(t||"center")}constructor(t){super(t)}};function MM(t,i){return t.U===i.U}function LM(t,i){if(0===i.length)return;const e=i.length-1;if(i[e].COt.CO)return void(t.RO=s.CO);const n=Sl(i,t,fi);if(n>=0)return;const r=-(n+1),h=r-1;if(h>=0){i[h].CO=0&&t[n].CO===s;n--)t[n].RO=e}function FM(t){return U(t)}r(),r(),r(),r();var UM=class extends Tl{get U(){return this.Q5}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}xa(){return FM(this)}KO(t){return MM(this,t)}constructor(t,i){super(t),this.Q5=void 0,this.Q5=i}};function Aa(t){switch(t){case 0:case 1:case 2:case 3:return!0}return!1}function Ca(t){switch(t){case 0:return lt;case 1:return Zp;case 2:return zc;case 3:return nm}}function VM(t,i){const e=i.ac,s=t.byteLength,n=ye(t);return i.Ly(s-e),di(n,e,s).buffer}function HM(t,i){return{id:t||"",data:i instanceof ArrayBuffer?i:void 0}}function WM(t,i,e){const s=Cl(t,i);if(!Aa(s))return;const n=Ca(s);return{id:e,language:jp(t,i,3),description:n(t,i),text:n(t,i)}}function qM(t,i,e){const s=Cl(t,i);if(!Aa(s))return;const n=Ca(s);return{id:e,mimeType:lt(t,i),fileName:n(t,i),description:n(t,i),data:VM(t,i)}}function zM(t,i,e){const s=Cl(t,i);if(!Aa(s))return;const n=Ca(s),r=[];for(;i.act.byteLength)break;c.push({text:e,timestamp:ti(t,i)})}return{id:e,language:r,format:h,contentType:o,description:a,entries:c}}function XM(t,i,e){return{id:e,ownerIdentifier:lt(t,i),identifier:VM(t,i)}}function jM(t,i,e){const s=Cl(t,i);if(!Aa(s))return;const n=Ca(s);return{id:e,language:jp(t,i,3),description:n(t,i),text:n(t,i)}}function QM(t,i,e){const s=Cl(t,i);if(!Aa(s))return;return{id:e,text:Ca(s)(t,i)}}function KM(t,i,e){return{id:e,url:lt(t,i)}}function YM(t,i,e){const s=Cl(t,i);if(!Aa(s))return;const n=Ca(s);return{id:e,description:n(t,i),text:n(t,i)}}function JM(t,i,e){const s=Cl(t,i);if(!Aa(s))return;return{id:e,description:Ca(s)(t,i),url:lt(t,i)}}function ZM(t,i,e){switch(e){case"COM":return WM(t,i,e);case"GEO":return qM(t,i,e);case"IPL":return zM(t,i,e);case"PIC":return function(t,i,e){const s=Cl(t,i);if(!Aa(s))return;const n=Ca(s),r=jp(t,i,3),h=Cl(t,i),o=n(t,i);let a,u;return"--\x3e"===r?(a=r,u=lt(t,i)):(a="image/"+r.toLowerCase(),u=VM(t,i)),{id:e,mimeType:a,pictureType:h,description:o,data:u}}(t,i,e);case"SLT":return GM(t,i,e);case"TXX":return YM(t,i,e);case"UFI":return XM(t,i,e);case"ULT":return jM(t,i,e);case"WXX":return JM(t,i,e);default:if("T"===e.charAt(0))return QM(t,i,e);if("W"===e.charAt(0))return KM(t,i,e)}}function $M(t,i,e){switch(e){case"APIC":return function(t,i,e){const s=Cl(t,i);if(!Aa(s))return;const n=Ca(s),r=lt(t,i),h=Cl(t,i),o=n(t,i);let a;return a="--\x3e"===r?lt(t,i):VM(t,i),{id:e,mimeType:r,pictureType:h,description:o,data:a}}(t,i,e);case"COMM":return WM(t,i,e);case"COMR":return function(t,i,e){const s=Cl(t,i);if(!Aa(s))return;const n=Ca(s),r=lt(t,i),h=jp(t,i,8),o=lt(t,i),a=Cl(t,i),u=n(t,i),c=n(t,i);let d,l;return i.act.byteLength)return;return{o:jp(t,i,3),Wy:Wp(t,i,3)}}(t,i);case 3:return function(t,i){if(i.ac+10>t.byteLength)return;const e=jp(t,i,4),s=ti(t,i);Cl(t,i);const n=Cl(t,i);return{o:e,Wy:s,xD:{t6:Ut(n,0),s6:Ut(n,1),groupingIdentity:Ut(n,2)}}}(t,i);case 4:return function(t,i){if(i.ac+10>t.byteLength)return;const e=jp(t,i,4),s=tL(t,i);Cl(t,i);const n=Cl(t,i);return{o:e,Wy:s,xD:{groupingIdentity:Ut(n,1),t6:Ut(n,4),s6:Ut(n,5),K5:Ut(n,6),n6:Ut(n,7)}}}(t,i)}}function rL(t){const i=ye(t),e=new j(i.byteLength);let s=0;for(let t=0;t{this.f6=!1},50)),this.o6()}nV(t){t.Ht!==this&&(t.Ht=this,this.wO.addCue(t.W5),this.v6())}XU(t){t.Ht===this&&(t.Ht=void 0,this.wO.removeCue(t.W5),this.v6())}k5(t){var i;const e=null==(i=this.wO.cues)?void 0:i.getCueById(t);if(!e)return;const s=lL(e);return s&&ln(s)?s[0]:s}jU(t){this._6>=t||(this._6=t,Re(this,t))}o6(){const t=this.Qk;this.d6||t!==xh.Kn?this.u6=t:this.u6=xh.iC}g6(){const t=this.Qk,i=this.u6;t!==i&&(this.d6||t!==xh.Kn||i!==xh.iC)&&("metadata"===this.Lt&&i===xh.Nh?this.Qk=t:this.f6&&i===xh.Nh&&t===xh.Kn?this.u6=t:this.Qk=i)}u5(t){this.o5!==t&&(this.o5=t,this.So(new _M(this,t)))}a6(t){const i=_.max(this.o5,this.c6,t);this.u5(i)}p6(t){let i=lL(t);if(i)return i;if(i=this.m6(t),ln(i))for(const t of i)t.Ht=this;else i.Ht=this;return i}m6(t){const i=this.w6(t);return t.THEOplayerTextTrackCue=i,i}w6(t){return t.endTime{this.o6(),this.wO.removeEventListener("cuechange",this.A6)},this.v6=()=>{this.Qk!==xh.Nh&&(this.b6(),this.U5(),this.A5.length&&this.a6(dc.LOADING))},this.S6=()=>{this.a6(dc.LOADED)},this.T6=()=>{this.a6(dc.ERROR)},this.aS=t||Ve(),this.wO=i,this.l6=s,this.wO.addEventListener("cuechange",this.A6),this.wO.addEventListener("cuechange",this.v6),this.h6=e,this.h6&&(this.B5=Vn(this.h6.src),this.h6.addEventListener("load",this.S6),this.h6.addEventListener("error",this.T6)),this.yO=mi(),this.bO=i.label||"",this.T5=new Sr(this.A5),this.S5=new Sr(this.D5),this.Qk=this.u6,Ht(()=>{this.v6(),this.a6(dc.NONE)})}};function lL(t){return null==t?void 0:t.THEOplayerTextTrackCue}r(),r();function fL(t,i){return Nu(t.YF,i.YF)||function(t,i){return t.Ht===i.Ht?xc(fM(t),fM(i)):cP(t.Ht,i.Ht)}(t.PO,i.PO)||function(t,i){return t===i?hl.rh:t===Js.QL?hl.Ug:hl.Fg}(t.type,i.type)}var vL=class{hr(){Wt(this.k6);for(const t of this.Gl.slice())this.it(t);this.E6(),this.x6=0,this.En=0,Wt(this.P6),this.I6=!1,this.C6=!1,this.R6=0}tt(t){Ct(this.Gl,t)||(this.Gl.push(t),t.wn(Te.pa,this.D6),t.Qk!==xh.Nh&&this.N6())}it(t){_e(this.Gl,t)&&(t.mn(Te.pa,this.D6),t.Qk!==xh.Nh&&this.N6())}N6(){const t=this.P6,i=this.Gl.filter(t=>t.Qk!==xh.Nh);this.P6=i;for(const e of t)Ct(i,e)||this.B6(e);for(const e of i)Ct(t,e)||this.M6(e);this.R6=0}M6(t){if(t.wn(Te.uI,this.L6),t.wn(Te.dI,this.O6),t.wn(Te.fI,this.F6),t.L.V>0){for(const i of t.L.NI)this.U6.push(i);this.V6()}}B6(t){if(t.mn(Te.uI,this.L6),t.mn(Te.dI,this.O6),t.mn(Te.fI,this.F6),t.L.V>0){for(const i of t.L.NI)_e(this.k6,i),_e(this.U6,i);this.V6()}}H6(){this.oa.xP||this.oa.lP?this.E6():this.V6()}V6(){this.I6&&0!==this.P6.length&&(this.R6-this.oa.zx>.25*this.oa.vP||this.x6||(this.x6=this.q6.W6(this.z6)))}E6(){this.x6&&(this.q6.G6(this.x6),this.x6=0)}X6(t){var i,e;if(0===this.R6)return;const s=null!=(e=null==(i=t.Ht)?void 0:i.EU)?e:0,n=t.CO+s,r=t.RO+s,h=this.oa.zx,o=n<=h&&hi&&e-i<.1&&(n=!1),this.C6=!1;const r=[];let h=1/0;for(const i of t){const t=e-i.EU,s=i.U5(t,n)+i.EU;s=0;t--)Ct(r,o[t])&&Ra(o,t);const a=[];if(!n)for(let t=o.length-1;t>=0;t--){const s=o[t],n=s.Ht.EU;s.CO+n>i&&s.RO+n<=e&&(a.push(s),Ra(o,t))}for(const t of this.U6)t.CO!==t.RO&&_e(a,t);Wt(this.U6);const u=[],c=[];for(const t of a)t.ro||u.push(new uc(t,t.CO)),u.push(new mc(t,_.max(t.CO,t.RO))),t.ro=!1;for(const t of o)t.ro&&(u.push(new mc(t,_.max(t.CO,t.RO))),t.ro=!1);for(const t of r)t.ro||(u.push(new uc(t,t.CO)),t.ro=!0);u.sort(fL);for(const t of u){const i=t.PO;i.So(t);const e=i.Ht;e&&(t.type===Js.QL?e.So(new TM(i)):e.So(new EM(i)),Ct(c,e)||c.push(e))}c.sort(cP);for(const t of c)t.So(new PM(t));this.En=e,this.k6=r,this.R6=h}kn(){this.hr(),this.oa.mn(d.py,this.Q6),this.oa.mn(d.uo,this.K6),this.oa.mn(Jr.PM,this.Q6),this.oa.mn(d.jw,this.Q6),this.oa.mn(d.$w,this.Y6),this.oa.mn(d.Zw,this.Q6)}constructor(t,i){this.oa=void 0,this.q6=void 0,this.Gl=[],this.x6=0,this.En=0,this.k6=[],this.U6=[],this.P6=[],this.I6=!1,this.C6=!1,this.R6=0,this.z6=()=>{this.x6=0,this.j6(),this.H6()},this.Q6=()=>{this.j6(),this.H6()},this.K6=()=>{this.I6=!0,this.Q6()},this.Y6=()=>{this.C6=!0,this.R6=0,this.E6()},this.D6=()=>{this.N6(),this.j6(),this.H6()},this.L6=t=>{const i=t.PO;Ct(this.U6,i)||this.U6.push(i),this.X6(i),this.V6()},this.O6=t=>{const i=t.PO;_e(this.k6,i),_e(this.U6,i),this.X6(i),this.V6()},this.F6=t=>{const i=t.PO;this.X6(i),this.V6()},this.q6=i,this.oa=t,t.wn(d.py,this.Q6),t.wn(d.uo,this.K6),t.wn(Jr.PM,this.Q6),t.wn(d.jw,this.Q6),t.wn(d.$w,this.Y6),t.wn(d.Zw,this.Q6),this.V6()}};r();var ac=class{W6(t){return Os(t)}G6(t){Le(t)}},_L=new ac,gL=class extends vL{constructor(t,i=_L){super(t,i)}};r(),r();var pL=class extends Oh{get Ca(){return this.hu||(this.hu=FM(this)),this.hu}KO(t){return MM(this,t)}constructor(t,i,e){super(t,1/0,i,!1,e)}};r(),r();var mL=class extends Ji{constructor(t,i,e=nh.DEFAULT){super(us.zU,"",i||"","",!1,e,!1,t)}},wL=class extends mL{nV(t){LM(t,this.A5),super.nV(t)}xa(){return qo(this)}constructor(t,i){super(t,i),this.Km=nh.ID3}},yL=class extends wL{get o(){return this.wO.id||""}get eC(){return this.wO.inBandMetadataTrackDispatchType||""}get bs(){return this.wO.language||""}R5(t){super.R5(t),this.u6=this.Qk}get u6(){return LS(this.wO.mode)}set u6(t){this.wO.mode=t}get AO(){return this.wO}nV(t){super.nV(t),t.W5.track!==this.wO&&this.wO.addCue(t.W5)}XU(t){super.XU(t),t.W5.track===this.wO&&this.wO.removeCue(t.W5)}jU(t){this._6>=t||(this._6=t,Re(this,t))}a6(t){this.AP=_.max(this.AP,t)}b6(){const t=this.wO.cues;if(!t)return;const i=t.length,e=[],s=[];for(let h=0;h=this._6){var r;const t=null!=(r=null==i?void 0:i.THEOplayerTextTrackCue)?r:new bL(i);e.push(t)}else s.push(i)}Wl(e,fi);const h=vM(this.L.NI.slice(),e);for(const t of s)this.wO.removeCue(t);for(const t of h.b5)t.kn(),this.XU(t);for(const t of h.y5)this.nV(t)}kn(){this.wO.removeEventListener("cuechange",this.v6),super.kn()}constructor(t){super(t.inBandMetadataTrackDispatchType,t.label),this.wO=void 0,this._6=0,this.v6=()=>{this.Qk!==xh.Nh&&(this.b6(),this.a6(dc.LOADED))},this.wO=t,this.wO.addEventListener("cuechange",this.v6),this.Qk=this.u6,Ht(()=>{this.v6()})}},bL=class extends pL{kn(){super.kn(),this.W5.THEOplayerTextTrackCue=void 0}constructor(t){super(t.startTime,cL(t.value),t.id),this.W5=void 0,this.W5=t,this.W5.THEOplayerTextTrackCue=this}};r(),r();var Su=[d.xw,d.Ew,d.yy,d.Ay,d.LICENSE_REQUEST_GENERATED];r();var AL=class extends gp{get error(){return this.errorObject.message}get licenseAcquisitionURL(){return this.errorObject.url}get status(){return this.errorObject.status}get statusText(){return this.errorObject.statusText}get licenseAcquisitionMessage(){return this.errorObject.response}get systemCode(){return this.errorObject.systemCode}constructor(t){super(d.Ew),this.errorObject=void 0,this.errorObject=t}};r(),r(),r();var nt=class extends gp{constructor(t){super(d.xw),this.J6=void 0,this.J6=t}};r();var SL=class extends gp{constructor(t){super("by"),this.J6=void 0,this.J6=t}},TL=new Zn,kL=class extends gp{constructor(t){super("Xs"),this.session=void 0,this.session=t}},EL=class extends Ne{get Z6(){return this.t8}gS(){return this.i8=!0,TL.Zo(t=>this.e8(t),this.hT.Yg)}async e8(t){try{fr(t),await this.s8.$V(t);const i=await this.s8.tH(this.n8.Jm,this.n8.Py,t);await this.r8.gS(this.n8.Jm,this.n8.Py,i)}catch(t){sa(t);const i=t instanceof Am?t.Zy:void 0,e=new fs(me.CONTENT_PROTECTION_INTERNAL_ERROR,"Error while performing the CDM request",t,void 0,void 0,void 0,void 0,i);throw this.Ts(e),e}}async hH(t,i){let e;try{e=function(t){return Qo(t,wm())}(t)?await this.s8._H(new j(t),this.hT.Yg):await this.s8.gH(new j(t),i,this.hT.Yg)}catch(t){if(Ce(t))return;throw t}if(this.hT.Yg.Hg)return;const s=this.h8,n=new Ga;this.h8=n;try{await this.r8.er(e),await Ze(100)}catch(t){const i=t instanceof Am?t.Zy:void 0;throw new fs(me.CONTENT_PROTECTION_INTERNAL_ERROR,"Error while applying license response",t,void 0,void 0,void 0,void 0,i)}finally{void 0!==s&&await s.Yy,n.Qy(),this.h8===n&&(this.h8=void 0)}}Ts(t){const i=t instanceof fs?t:new fs(me.CONTENT_PROTECTION_ERROR,t.message,t);this.So(new AL(i)),this.Xs()}o8(){this.r8.mn("Iy",this.SS),this.r8.mn(d.Ay,this.a8),this.r8.mn("lt",this.u8),this.c8=!1,this.t8=!1,this.hT.Zg(),this.So(new kL(this))}async Xs(){let t;this.Vo();do{t=this.h8,void 0!==t&&await t.Yy}while(this.h8!==t);this.o8(),await this.r8.Xs().catch(gs)}constructor(t,i,e){super(),this.r8=void 0,this.s8=void 0,this.n8=void 0,this.i8=void 0,this.c8=void 0,this.hT=void 0,this.h8=void 0,this.t8=void 0,this.SS=void 0,this.a8=void 0,this.u8=void 0,this.r8=t,this.s8=i,this.n8=e,this.i8=!1,this.c8=!1,this.hT=new Zc,this.t8=!1,this.SS=t=>{if(!this.hT.Yg.Hg)switch(t.Ry){case"license-request":case"license-renewal":this.hH(t.Iy,t.Dy).catch(t=>this.Ts(t));break;default:this.Ts(new fs(me.CONTENT_PROTECTION_NOT_SUPPORTED,"Unsupported CDM message type: "+t.Ry))}},this.a8=t=>{this.r8.xy.Xy((t,i)=>{switch(t){case"usable":zd.Og(()=>{this.c8=!0,this.So(new nt(i))},100);break;case"expired":case"status-pending":default:break;case"output-restricted":case"internal-error":this.So(new SL(i))}}),this.t8=!0,this.So(t)},this.u8=t=>{this.Ts(new fs(me.CONTENT_PROTECTION_INTERNAL_ERROR,"Unknown CDM error"))},t.wn("Iy",this.SS),t.wn(d.Ay,this.a8),t.wn("lt",this.u8),t.uS.then(()=>this.o8(),t=>this.Ts(t))}},xL=class extends Ne{get xS(){return this.yS}get d8(){return this.l8.every(t=>t.Z6)}ZV(){return this.f8.ZV()}v8(t){return this._8||(this._8=this.g8(t)),this._8}async g8(t){fr(t);const i=await this.f8._H(new j(wm()),t);if(fr(t),!this.ES)throw new m("Invalid MediaKeys when setting ServerCertificate");await this.ES.PS(i.buffer)}async p8(t){if(!this.ES)throw new m("Invalid MediaKeys when creating KeySession");try{this.m8.push(t);const i=await this.ES.kS("temporary"),e=new EL(i,this.f8,t);return this.l8.push(e),e.wn(Su,this.w8),e.wn("Xs",this.y8),e}finally{_e(this.m8,t)}}b8(t){if(t.A8)return!1;for(const i of this.l8)if(PL(i.n8,t))return!0;for(const i of this.m8)if(PL(i,t))return!0;return!1}async kn(){this.ES=void 0,this.Vo();const t=this.l8.slice();Wt(this.l8),await Promise.all(t.map(t=>t.Xs())),this.S8=void 0,this.f8.zg()}constructor(t,i,e){super(),this.yS=void 0,this.ES=void 0,this.f8=void 0,this.l8=[],this._8=void 0,this.m8=[],this.S8=void 0,this.w8=t=>{if(t.type===d.Ay)return null!=this.S8||(this.S8=new mm),t.xy.Xy((t,i)=>{this.S8.Gy(i,t)}),void(this.d8&&this.So(new wp(this.S8)));this.Rs(t)},this.y8=t=>{t.session.mn(Su,this.Rs),t.session.mn("Xs",this.y8),_e(this.l8,t.session),this.S8=void 0},this.yS=t,this.ES=i,this.f8=e}};function PL(t,i){if(t.A8)return!1;if(t.Jm!==i.Jm)return!1;if(Qo(t.Py,i.Py))return!0;if("sinf"===t.Jm&&"sinf"===i.Jm){const i=IL(t),e=IL(t);if(i&&e)return ko(i,e)}return!1}function IL(t){try{const i=nm(dh(new j(t.Py)),new oi),e=JSON.parse(i).sinf[0],s=new j(gm(e)),n=new yu(dh(s),new oi);return Hn.cB(n).SB.kB.PB}catch(t){return}}var CL=class extends Ne{get T8(){var t;return null==(t=this.yS)?void 0:t.xS}get Rq(){return this.f8}set Rq(t){this.f8=t}Un(t,i){this.aq=t,this.RZ(i)}RZ(t){this.ZS=t,this.k8(this.hT.Yg).catch(bu)}NZ(t){this.E8(t,this.hT.Yg).catch(bu)}async E8(t,i){var e,s;fr(i);var n;if(null==(e=this.ZS)?void 0:e.fq)for(const e of null!=(n=null==(s=this.ZS)?void 0:s.fq)?n:[]){var r;const s=hh(t,t=>t.x8===e.xS.$m);if(void 0!==(null==s?void 0:s.P8)&&!(null==(r=e.OW)?void 0:r.some(t=>Qo(s.P8,t))))try{return void await this.I8(e.xS.Jm,s.P8,i)}catch(t){sa(t)}}}async k8(t){if(!zd.Zs.gp||!await this.C8(t))return this.ZS&&this.ZS.D8?await this.N8(t):void 0}async C8(t){var i,e;if(!(null==(i=this.ZS)?void 0:i.fq))return!1;let s=!1;var n;for(const i of null!=(n=null==(e=this.ZS)?void 0:e.fq)?n:[]){if(i.UW&&0!==i.UW.length){try{const e={kids:i.UW.map(t=>t.id)},n=rm(JSON.stringify(e)).buffer;await this.I8(Lg,n,t),s=!0}catch(t){sa(t)}if(s)return!0}var r;for(const e of null!=(r=i.OW)?r:[])try{await this.I8(i.xS.Jm,e,t),s=!0}catch(t){sa(t)}if(s)return!0}return!1}B8(t){return t===Ng||t===Mg||t===Bg||t===Lg}async I8(t,i,e){if(fr(e),!i.byteLength)return;if(!this.ZS||!this.ZS.fq.length)throw new fs(me.CONTENT_PROTECTION_CONFIGURATION_MISSING,"Missing configuration for encrypted content");if(!this.B8(t))return void 0;const s=UT(t,i),n=this.ZS.fq;let r;const h=[];for(const i of n){fr(e);const n=s[i.xS.Zm];if(n&&i.xS.Jm===t)try{const t=await this.M8(i,e);t.ZV()&&await t.v8();const s=this.PL.sP,r={Jm:i.xS.Jm,Py:n,A8:s};if(h.push(!0),this.L8(t,r)){const i=await t.p8(r);await i.gS(),this.So(new yp(n))}return}catch(t){sa(t),r=t}else i.xS.Km===po.Xm&&h.push(!1)}if(0===h.length||h.some(pc))throw await zd._m()?new fs(me.CONTENT_PROTECTION_NOT_SUPPORTED,"Encrypted content over an insecure connection is not supported",r):new fs(me.CONTENT_PROTECTION_NOT_SUPPORTED,"Cannot create content decryption session",r)}async N8(t){var i;const e=null==(i=this.ZS)?void 0:i.fq;if(e)for(const i of e){fr(t);try{const e=await this.M8(i,t);return void(e.ZV()&&await e.v8())}catch(t){sa(t)}}}L8(t,i){return zd.Zs._p||this.PL.ML.BL||!t.b8(i)}M8(t,i){return this.ta.Zo(i=>this.O8(t,i),i)}async O8(t,i){if(fr(i),!this.ZS||!this.f8||!this.aq)throw new m("Not initialized");if(this.yS){if(this.yS.xS!==t.xS)throw new m("Internal key system error");return this.yS}const e=this.f8,s=Y({},t,{Vq:t.Vq.map(i=>{var s;return Y({},i,{persistentState:null!=(s=i.persistentState)?s:e.wH(t.xS),FS:i.FS||e.FS(t.xS)})})}),n=await this.aq.xZ(s.xS,s.Vq),r=e.LW(s),h=new xL(s.xS,n,r);return h.wn(Su,this.Rs),this.yS=h,h}Ts(t){if(Ce(t))return;const i=t instanceof fs?t:new fs(me.CONTENT_PROTECTION_ERROR,t.message,t);this.So(new AL(i))}async hr(){this.aq=void 0,this.ZS=void 0,this.hT.Zg(),this.hT=new Zc,await this.F8()}async F8(){await this.ta.Zg();const t=this.yS;t&&(t.mn(d.yy,this.Rs),this.yS=void 0,await t.kn())}async zg(){this.Vo(),this.PL.mn(jr.Dw,this.U8),await this.hr(),await this.ta.kn()}constructor(t){super(),this.PL=void 0,this.hT=new Zc,this.ta=new Zn,this.ZS=void 0,this.f8=void 0,this.aq=void 0,this.yS=void 0,this.U8=t=>{this.I8(t.Jm,t.Py,this.hT.Yg).catch(t=>this.Ts(t))},this.PL=t,this.PL.wn(jr.Dw,this.U8)}};r();var RL=class extends gp{constructor(t){super(d.Vw),this.currentTime=void 0,this.currentTime=t}};r();var DL=class extends Ne{get AP(){return void 0!==this.V8?this.V8.AP:Lr.zL}u5(){var t;null==(t=this.V8)||t.u5()}hr(){var t;null==(t=this.V8)||t.hr()}zg(){this.Vo(),void 0!==this.V8&&(this.V8.zg(),this.V8=void 0)}H8(t){if(this.V8===t)return;const i=this.AP;void 0!==this.V8&&this.V8.zg(),this.V8=t,void 0!==t&&(t.wn(Jr.AI,this.Rs),t.u5());const e=this.AP;i!==e&&this.So(new Ka(this.W8.zx,e))}constructor(t){super(),this.W8=void 0,this.V8=void 0,this.W8=t}};r();var NL=class extends Ji{get Ca(){var t;return null!=(t=this.hu)?t:this.hu=BL(this)}q8(t,i,e){const s=new xE(t,i,e,!1);return this.nV(s),s}z8(t){this.XU(t)}constructor(t,i,e){super(t,i,"",e,void 0,nh.WEBVTT)}};function BL(t){return Gi(qo(t),{get type(){return t.Km},addCue:(i,e,s)=>t.q8(i,e,s).Ca,removeCue(i){t.z8(i.IO)}})}r();var ML=class extends dL{get Ca(){var t;return null!=(t=this.hu)?t:this.hu=BL(this)}q8(t,i,e){const n=this.m6(new s.VTTCue(t,i,e));return this.dE?this.nV(n):this.G8.push(n),n}z8(t){_e(this.G8,t),this.XU(t)}kn(){var t;super.kn(),null==(t=this.h6)||t.removeEventListener("load",this.X8),Wt(this.G8)}constructor(t,i,e){var s;super(t,i,e),this.dE=!1,this.G8=[],this.X8=()=>{var t;null==(t=this.h6)||t.removeEventListener("load",this.X8),this.dE=!0;for(const t of this.G8)this.nV(t);Wt(this.G8)},null==(s=this.h6)||s.addEventListener("load",this.X8),this.Km=nh.WEBVTT}};function LL(t,i){if(void 0!==t.e4!==i.q4.some(t=>St(t.GT)))return!1;return void 0!==t.s4===i.q4.some(t=>$y(t.GT))}r(),r();var OL=.05,FL=zs.B_||zs.L_,UL=zs.Rg,VL=zs.X_,HL=zs.X_&&zs.ru,WL=class extends Ne{get d5(){return this.j8}get Fx(){return this.aq?this.aq.Fx:Uo.rL()}get Vx(){const t=this.uq;if(!t||S(t.getTime()))return;const i=1e3*this.zx;return new Date(t.getTime()+i)}get uq(){if(this.hq.getStartDate)return this.Pz&&this.Q8||(this.Q8=this.hq.getStartDate()),this.Q8}get zx(){return this.K8?this.K8.zx:void 0!==this.Y8?this.Y8:this.pT.currentTime}get Wu(){return this.sc}get ct(){return this.K8?this.K8.ct:this.aq?this.aq.ct:this.pT.duration}get Qx(){return this.xP?this.J8():this.K8?this.K8.Qx:this.pT.ended||this.Z8}J8(){return void 0!==this.Y8&&this.ct===this.Y8}get lt(){return this.nq}get hq(){return this.pT}get lP(){return this.t9?this.i9:this.K8?this.K8.lP:this.pT.paused}get pP(){return this.Ho.HM(Uo.jn(this.pT.played))}get Mi(){return this.pT.offsetHeight*zd.Zs.fp}get Ti(){return this.pT.offsetWidth*zd.Zs.fp}get Ma(){return this.ha}get Sq(){return this.ea}get AP(){return this.e9.AP}get kP(){return this.aq?this.aq.kP:Uo.rL()}get xP(){return this.K8?this.K8.xP:this.Pz||this.pT.seeking&&!this.r5}get n5(){return this.K8?this.K8.n5:this.r5}get _5(){return 0!==this.s9}get oP(){return this.K8?this.K8.oP:this.pT.muted}set oP(t){this.K8?this.K8.oP=t:(this.pT.muted=t,this.n9())}get vP(){return this.K8?this.K8.vP:void 0!==this.r9?this.r9:this.pT.playbackRate}set vP(t){this.K8?this.K8.vP=t:this.lP||this.j8?(this.r9=t,this.h9()):(this.r9=void 0,this.pT.playbackRate=t,this.h9())}h9(){const t=this.vP;this.o9!==t&&(this.o9=t,this.So(new Ik(this.zx,t)))}get a9(){return this.kz}get OP(){return this.K8?this.K8.OP:this.pT.volume}set OP(t){this.K8?this.K8.OP=t:(this.pT.volume=t,this.n9())}n9(){const t=this.OP,i=this.oP;this.u9===t&&this.c9===i||(this.u9=t,this.c9=i,this.So(new Wi(this.zx,this.OP)))}hP(){return lN(this.pT)}QP(){this.d9||(this.d9=!0);const t=this.l9();return this.f9(),t}f9(){this.t9?this.i9&&(this.i9=!1,this.So(new vt(this.zx))):this.v9()}v9(){if(this.K8)this.K8.QP();else{zs.X_&&!zs.ru&&this.pT.preload===Dn.pz&&(this.pT.preload=Dn.zU);const t=this.vP,i=this.pT.play();t!==this.hq.playbackRate&&(this.vP=t),this.Z8=!1,vo(i)?i.then(this._9,this.g9):this.p9.g5()&&this.m9()}}jP(){this.t9?this.i9||(this.i9=!0,this.So(new Si(this.zx))):this.w9()}w9(){this.K8?this.K8.jP():(this.pT.pause(),this.p9.er()),this.y9(new Qc)}l9(){const t=new Ga;return this.b9.push(t),t.Yy}A9(){for(const t of this.b9)t.Qy(void 0);Wt(this.b9)}y9(t){for(const i of this.b9)i.Ky(t);Wt(this.b9)}m9(){this.t9||this.K8||this.A9()}S9(t){this.t9||this.K8||this.y9(t)}Oy(t,i,e){void 0===i&&(i=!1),void 0===e&&(e=!1),this.K8?this.K8.Oy(t,i,e):(this.T9.Zg(),this.T9=new Zc,this.k9=Cu(this.E9(t,i,e,this.k9,this.T9.Yg),this.T9).catch(gs))}$W(t){const i=this.uq;if(!i||S(i.getTime()))return;const e=(t.getTime()-i.getTime())/1e3;this.Oy(e)}async E9(t,i,e,s,n){try{if(this.Y8=t,this.x9=t,this.P9=zd.Mg(),e&&!this.Pz?this.r5=!0:(this.Pz=!0,this.r5=!1),this.Z8&&!this.J8()&&(this.Z8=!1),this.r5?(this.So(new Xr(this.zx)),(zs.w_||zs.S_)&&(t+=OL)):this.So(new ji(t)),await s.catch(gs),fr(n),this.aq&&!this.aq.ZZ())return void this.I9();for(this.C9&&this.R9(),this.e9.AP===Lr.zL&&await this.e9.ww(Jr.AI,n);0===this.pT.seekable.length||zs.X_&&this.pT.seekable.end(0)===1/0||HL&&!this.d9;){const t={stack:[],error:void 0,hasError:!1};try{if(void 0!==this.D9&&0===this.pT.seekable.length)return void this.I9();const i=Es(t,Zc.ep([n]),!1);await Promise.race([KA(this.pT,"timeupdate",i.Yg),Ze(100,i.Yg)]),fr(n)}catch(i){t.error=i,t.hasError=!0}finally{Zs(t)}}let h=qB(this.Fx,t,OL),o=this.kP,a=!0,u=!1;for(;;){const t={stack:[],error:void 0,hasError:!1};try{var r;if(o=this.kP,o.V>0&&!o.Cr(h)){let t=o.LM(h);t===o.An(0)&&zs.X_&&this.ct===1/0&&CN(this.aq)&&o.Cr(t-OL)&&(t-=OL),h=t,a=!0}if(i&&(zd.Zs.Dp||!this.pT.fastSeek)){const t=this.Fx;if(!t.Cr(h)){const i=qB(t,h,1);i!==h&&(h=i,a=!0)}}if(VL){const t=this.N9();void 0!==t&&h>t&&(h=t,a=!0)}if(!u){const t=this.B9();void 0!==t&&h>t&&(u=!0,await this.M9(t,!1,n),await KA(this.pT,"seeked",n),fr(n),a=!0)}if(a){a=!1,await this.M9(h,i,n),fr(n);let t=this.zx;o=this.kP,h=o.LM(h);let e=1;for(;_.abs(h-t)>=Zt;)o=this.kP,h=zL(h,o,e),await this.M9(h,i,n),fr(n),t=this.zx,e++}if(!(this.pT.seeking||this.e9.AP{XL(t)&&(t.removeEventListener("cuechange",e),this.t7.tt(new dL(t.id,t,i)))};t.addEventListener("cuechange",e),t.mode=xh.iC}o7(t){const i=this.pT.getElementsByTagName("track");for(let e=0;e{if(fr(i),this.aq)throw new m("Already loaded a media source");let e;if(t.Km===O.AV)e=new VN(t,this,this.DZ,this.hw,this.GJ),this.C9=!1,this.e9.H8(this.l7());else{if(t.Km!==O.SV)throw new m("Unsupported configuration");{this.C9=FL;const i=this.l7();e=new YB(t,this,i,this.DZ,this.hw,void 0,this.N4,this.GJ),this.e9.H8(i),UL&&(this.wn(d.py,this.f7),this.e9.wn(Jr.AI,this.v7))}}return this.aq=e,await e.GY(),e})}l7(){return this.C9?new rM(this):new Ou(this)}_7(){if(this.j8)return;const t=this.vP;this.j8=!0,this.vP=t,this.pT.playbackRate=0,this.e9&&this.e9.u5()}g7(){if(!this.j8)return;const t=this.vP;this.j8=!1,this.vP=t,this.p7()}p7(){this.pT.currentTime=this.pT.currentTime,this.e9&&this.e9.u5()}m7(){this.Pz=!1,this.r5=!1,this.U9=!1,zd.Lg(this.s9),this.s9=0,this.Ho=Uo.rL(),this.T9.Zg(),this.Y8=void 0,this.x9=NaN,this.Q8=void 0,this.C9=!1,this.t9=!1,this.nq=void 0,this.Z8=!1,this.D9=void 0,this.u7=0,this.w7=!1,this.d9=!1,this.y7&&(this.b7(),this.y7=!1),this.y9(new Qc),this.e9.H8(new Ou(this)),this.p9.hr(),this.t7.hr(),this.g7(),UL&&(Le(this.A7),this.A7=0,this.mn(d.py,this.f7))}async hr(){this.m7(),await this.d7.Zg(),await this.d7.Zo(async()=>{this.aq&&(await this.aq.zg(),this.aq=void 0,zs.w_&&zs.b_<3&&this.S7())})}async F8(){const t=this.aq;if(void 0===t||!BN(t)||void 0!==this.nq)throw new g("Invalid state");this.m7(),this.pT.pause(),this.pT.currentTime=0,await this.d7.Zo(()=>async function(t){t.I3();const i=[t.e4,t.s4].filter(it);await Promise.all(i.map(t=>t.f3(0,1/0))),t.F4(NaN)}(t))}S7(){this.T7();const t=this.pT,i=t.parentElement,e=t.tagName.toLowerCase();this.pT=Tf(e),this.retainMediaElementState(t),kf(t),null==i||i.replaceChild(this.pT,t),this.b7(),this.e9.H8(this.l7()),this.p9.mn(Jr.PM,this.k7),this.p9.zg(),this.p9=new aM(this),this.p9.wn(Jr.PM,this.k7),this.kz?this.be():this.we(),this.So(new Vk),this.So(new Hk)}retainMediaElementState(t){this.hq.muted=t.muted,this.hq.volume=t.volume}async zg(){this.y7=!1,this.T7(),this.Iq(),await this.hr(),await this.d7.kn(),this.p9.zg(),this.e9.zg(),await this.DZ.zg(),this.Eq(),this.Gl.kn(),this.t7.kn(),this.Y9.kn(),this.Vo()}b7(){this.hq.addEventListener("play",this.E7),this.hq.addEventListener("pause",this.x7),this.hq.addEventListener("timeupdate",this.P7),this.hq.addEventListener("progress",this.I7),this.hq.addEventListener("loadstart",this.C7),this.hq.addEventListener("ended",this.R7),this.hq.addEventListener("ratechange",this.D7),this.hq.addEventListener("volumechange",this.N7),this.hq.addEventListener("durationchange",this.B7),this.hq.addEventListener("resize",this.M7),this.hq.addEventListener("loadedmetadata",this.M7),this.hq.addEventListener("error",this.L7),this.hq.addEventListener("emptied",this.O7),this.hq.addEventListener("seeked",this.F7),this.hq.addEventListener("seeking",this.U7),Vc()?(this.pT.addEventListener("encrypted",this.V7),this.pT.addEventListener("waitingforkey",this.H7)):void 0!==s.WebKitMediaKeys&&"function"==typeof s.WebKitMediaKeys.isTypeSupported?this.pT.addEventListener("webkitneedkey",this.W7):lp()?this.pT.addEventListener("webkitneedkey",this.q7):void 0!==s.MSMediaKeys&&"function"==typeof s.MSMediaKeys.isTypeSupported&&this.pT.addEventListener("msneedkey",this.z7)}T7(){this.hq.removeEventListener("play",this.E7),this.hq.removeEventListener("pause",this.x7),this.hq.removeEventListener("timeupdate",this.P7),this.hq.removeEventListener("progress",this.I7),this.hq.removeEventListener("loadstart",this.C7),this.hq.removeEventListener("ended",this.R7),this.hq.removeEventListener("ratechange",this.D7),this.hq.removeEventListener("volumechange",this.N7),this.hq.removeEventListener("durationchange",this.B7),this.hq.removeEventListener("resize",this.M7),this.hq.removeEventListener("loadedmetadata",this.M7),this.hq.removeEventListener("error",this.L7),this.hq.removeEventListener("encrypted",this.V7),this.hq.removeEventListener("waitingforkey",this.H7),this.hq.removeEventListener("webkitneedkey",this.W7),this.hq.removeEventListener("webkitneedkey",this.q7),this.hq.removeEventListener("msneedkey",this.z7),this.hq.removeEventListener("emptied",this.O7),this.hq.removeEventListener("seeked",this.F7),this.hq.removeEventListener("seeking",this.U7)}G7(){this.K8||(this.Ho=this.pP,this.K8=tM(this),this.T7(),this.K8.wn(ZB,this.Rs))}X7(){if(!this.K8)return;const t=this.K8;this.K8=void 0,this.e9.u5(),iM(this,t),t.zg(),this.b7()}F9(){const t=this.zx;this.So(new B(t,void 0)),this.D9=t}aJ(){this.Z8||!this.Qx||this.xP||(this.Z8=!0,this.So(new ur(this.zx)))}Qq(t){this.nq=t,this.y9(this.nq),this.So(new uM(this.nq))}get sP(){return Boolean(this.pT.webkitCurrentPlaybackTargetIsWireless)}get j7(){return this.Q7}get ML(){return Y({},DN)}K7(){this.Q7||(xf(this.pT,zd.Zs),this.Q7=!0)}Y7(t){t.appendChild(this.pT)}B3(){UL&&this.f7(),this.e9.u5()}get Rq(){return this.DZ.Rq}set Rq(t){this.DZ.Rq=t}get J7(){return this.N4}set J7(t){this.N4=t}get T8(){return this.DZ.T8}$P(){this.DZ.F8().catch(gs),this.t7.hr()}get WP(){return this.w7}set WP(t){this.w7=t,this.y7&&!this.w7&&(this.y7=!1,this.b7())}constructor(t,i,e,s,n){super(),this.pT=void 0,this.sc=void 0,this.GJ=void 0,this.nq=void 0,this.kz=!0,this.aq=void 0,this.d7=new Zn,this.K8=void 0,this.e9=void 0,this.p9=void 0,this.DZ=void 0,this.ha=new ks,this.ea=new Pu,this.Gl=void 0,this.Oz=void 0,this.i7=[],this.t7=void 0,this.Y9=void 0,this.J9=void 0,this.Y8=void 0,this.P9=0,this.x9=NaN,this.Q8=void 0,this.U9=!1,this.D9=void 0,this.u7=0,this.Pz=!1,this.r5=!1,this.Z7=Lr.zL,this.s9=0,this.k9=Promise.resolve(),this.T9=new Zc,this.b9=[],this.Ho=Uo.rL(),this.r9=void 0,this.o9=1,this.c9=!1,this.u9=1,this.Z8=!1,this.w7=!1,this.y7=!1,this.C9=!1,this.hw=void 0,this.t9=!1,this.i9=!1,this.j8=!1,this.Q7=!1,this.A7=0,this.N4=void 0,this.d9=!1,this.e7=t=>{const i=t.track,e=this.o7(i);if(!GL(this.t7,i)){if(zs.X_){if(i.kind===us.zU)return void this.r7(i);if(i.kind===us.WU&&""===i.label&&""===i.language&&!XL(i))return void this.h7(i,e)}this.t7.tt(new dL(i.id,i,e))}},this.s7=t=>{const i=GL(this.t7,t.track);i&&this.t7.it(i)},this.n7=()=>{for(let t=0;t{if(void 0===this.aq||!BN(this.aq))return;if(this.lP)return;const t=this.aq,i=t.e4,e=t.s4;if(!i||!e)return;if(t.jZ)return void this.g7();if(t.AP===xl.S3)return;const s=i.Fx,n=e.Fx;if(0===s.V&&0===n.V)return void this.g7();const r=this.zx;if(r{this.A7=0,this.f7()},this.v7=()=>{if(this.xP||this.n5)return;if(this.e9.AP>=Lr.XL)return;if(void 0===this.aq||!BN(this.aq))return;const t=this.aq,i=t.e4,e=t.s4;if(!i||!e)return;const s=this.zx,n=i.Fx,r=e.Fx;if(!n.Cr(s)||!r.Cr(s))return;n.WM(r).jM(s-5,s)&&(this.j8?this.g7():this.p7())},this.E7=()=>{this.So(new vt(this.zx))},this.x7=()=>{this.S9(new Qc),this.So(new Si(this.zx))},this.k7=()=>{this.m9(),this.So(new mo(this.zx))},this.D7=()=>{this.h9()},this.B7=()=>{this.So(new zr(this.ct))},this.I7=()=>{this.So(new Et(this.zx))},this.C7=()=>{this.So(new ke)},this.F7=()=>{this.Pz||this.r5||this.U9?this.U9=!1:this.So(new Yr(this.zx))},this.U7=()=>{this.L9(this.zx),this.U9=!1},this.P7=()=>{const t=this.zx,i=this.xP,e=this.e9.AP{this.aJ()},this.L7=()=>{if(null!==this.pT.error){const i=this.pT.error;var t;this.Qq(new mu(null!=(t=i.code)?t:Mi.DECODE,i.message||"Error decoding media",void 0,i.msExtendedCode))}},this.O7=()=>{this.w7&&(this.T7(),this.y7=!0)},this.itt=t=>{if(zd.Lg(this.s9),this.s9=0,t.readyState<=Lr.GL)if(this.Pz||this.r5){const i=zd.Mg()-this.P9;if(i<250)return void(this.s9=zd.Og(()=>this.itt(t),250-i))}else if(void 0!==this.aq&&this.aq.JZ(this.zx))return void(this.s9=zd.Og(()=>this.itt(t),250));this.Z7!==t.readyState&&(this.Z7=t.readyState,this.So(t))},this.N7=()=>{this.n9()},this.M7=()=>{this.MP>0&&this.DP>0&&this.So(new Vs)},this.V7=t=>{this.So(new Sp(t.initDataType,t.initData||new ArrayBuffer(0)))},this.H7=()=>{this.So(new Tp)},this.z7=t=>{const i=t.initData,e=i?nr(i).buffer:new ArrayBuffer(0);this.So(new Sp(Ng,e))},this.W7=t=>{const i=t.initData;if(i){const t=function(t){try{const i=dh(t),e=new oi,s=kt(i,e,ti(i,e,!0));return Gc(im(s,!0))}catch(t){return}}(i);if(!t)return;this.So(new Sp(Mg,t.buffer))}else this.So(new Sp(Mg,new ArrayBuffer(0)))},this.q7=t=>{const i=t.initData,e=i?nr(i).buffer:new ArrayBuffer(0);this.So(new Sp(Ng,e))},this._9=()=>{this.m9()},this.g9=t=>{this.S9(t)},this.ett=t=>{this.So(t),t.type===d.Ew&&this.Qq(ar(t.errorObject))},this.pT=t,this.hw=i,this.sc=e,this.Oz=s,this.GJ=n,this.e9=new DL(this),this.e9.wn(Jr.AI,this.itt),this.e9.H8(new Ou(this)),this.p9=new aM(this),this.p9.wn(Jr.PM,this.k7),this.DZ=new CL(this),this.DZ.wn(Su,this.ett),this.Gl=new bc,this.t7=new bc,this.Y9=new Tu([this.Gl,this.t7]),this.J9=new gL(this),this.b7(),this.Hq()}};var qL=.01;function zL(t,i,e){if(void 0===e&&(e=0),!i.V)return 0;let s=i.LM(t);const n=qL*e;return s===i.Tn(0)?s+=n:s===i.An(i.V-1)&&(s-=n),s}function GL(t,i){for(const e of t.NI)if(e.AO===i)return e}function XL(t){return!!t.cues&&t.cues.length>0}r();var jL={sZ:void 0,nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0,aZ:void 0,uZ:void 0,cZ:void 0,dZ:void 0,lZ:void 0},QL=class extends Ne{get Ca(){return this.hu||(this.hu=EN(this)),this.hu}get sZ(){}get nZ(){}get rZ(){}get hZ(){}get oZ(){}get aZ(){}get stt(){}get uZ(){}get cZ(){}get dZ(){}get lZ(){}constructor(...t){super(...t),this.hu=void 0}},KL=class extends WL{zP(){}get DP(){return 0}get MP(){return 0}constructor(t,i,e,s){super(t,i,e,new QL,s)}};r(),r();var ma=class{get xe(){return this.ntt}we(){this.ntt.style.display="none"}be(){this.ntt.style.display="block"}Y7(t){t.appendChild(this.ntt)}kn(){Ao(this.ntt)}constructor(t=5){this.ntt=void 0;const i=s.document.createElement("div");i.className="theoplayer-texttracks",i.style.position="absolute",i.style.display="none",i.style.overflow="hidden",i.style.pointerEvents="none",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.width="100%",i.style.height="100%",i.style.lineHeight="1.3em",i.style.zIndex=""+t,this.ntt=i,this.be()}};function YL(t,i){return Y({},i,ES(function(t){return{sZ:t.sZ,nZ:t.nZ,rZ:t.rZ,hZ:t.hZ,oZ:t.oZ,aZ:t.aZ,uZ:t.uZ,cZ:t.cZ,dZ:t.dZ,lZ:t.lZ}}(t)))}function JL(t){return t.rZ&&Rc(t.rZ,"%")?Number(t.rZ.replace("%",""))/100:t.rZ&&Rc(t.rZ,"em")?Number(t.rZ.replace("em","")):1}r(),r(),r(),r(),r();var ZL=class t{get htt(){return this.ott+this.Ti}set htt(t){this.ott=t-this.Ti}get att(){return this.utt+this.Mi}set att(t){this.utt=t-this.Mi}ctt(t){return this.ottt.ott&&this.uttt.utt}pO(t){return this.ott<=t.ott&&t.htt<=this.htt&&this.utt<=t.utt&&t.att<=this.att}Fy(){return new t(this.ott,this.utt,this.Ti,this.Mi)}dtt(i){const e=this.ott+i,s=this.utt+i,n=_.max(0,this.Ti-2*i),r=_.max(0,this.Mi-2*i);return new t(e,s,n,r)}ltt(i){const e=_.min(this.ott,i.ott),s=_.max(this.htt,i.htt),n=_.min(this.utt,i.utt),r=_.max(this.att,i.att);return new t(e,n,s-e,r-n)}constructor(t,i,e,s){this.ott=void 0,this.utt=void 0,this.Ti=void 0,this.Mi=void 0,this.ott=t,this.utt=i,this.Ti=e,this.Mi=s}},$L=class{ftt(t){const i=this._tt(t);if(!i)return!1;for(const t of i)Ao(t);return this.gtt(t),!0}get Ht(){return this.WO}get hq(){return this.pT}get Wu(){return this.sc}get ptt(){return this.mtt}get wtt(){return this.ytt}GY(){this.btt(),this.WO.L.NI.forEach(t=>this.nV(t)),this.Wu.wn(Qh.yn,this.Att),this.oe(this.Wu.Eu,this.Wu.Iu)}Stt(t){this.ytt=t,this.mtt=YL(this.ytt,this.Ttt),this.mtt.sZ&&(this.hq.style.fontFamily=this.mtt.sZ),this.oe(this.Wu.Eu,this.Wu.Iu),this.ktt(!0)}Ett(){return this.mtt}xtt(t){return this.Ptt.has(t.JI)}btt(){this.WO.wn(Te.uI,this.Itt),this.WO.wn(Te.dI,this.Ctt),this.WO.wn(Te.pa,this.Rtt)}Dtt(){this.WO.mn(Te.uI,this.Itt),this.WO.mn(Te.dI,this.Ctt),this.WO.mn(Te.pa,this.Rtt)}Ntt(t){t.wn(Js.QL,this.Btt),t.wn(Js.KL,this.Mtt),t.wn(Js.xI,this.Ltt)}Ott(t){t.mn(Js.QL,this.Btt),t.mn(Js.KL,this.Mtt),t.mn(Js.xI,this.Ltt)}nV(t){this.Ntt(t),t.ro&&this.Ftt(t)}XU(t){this.Ott(t),this.Utt(t)}Vtt(){this.WO.Qk===xh.Kn?this.Htt():this.Wtt()}Htt(){if(!this.qtt)return;this.qtt=!1;const t=this.Wu.Eu,i=this.Wu.Iu;this.oe(t,i),this.ktt(!1)}Wtt(){this.qtt||(this.qtt=!0,this.ktt(!0))}Ftt(t){this.qtt||t.ro&&!this.xtt(t)&&this.ktt(!1)}Utt(t){this.xtt(t)&&this.ktt(!0)}ztt(t){(t.ro||this.xtt(t))&&this.ktt(!0)}ktt(t){const i=this.Gtt,e=this.qtt?[]:this.WO.q.NI.slice();this.Xtt(e,i,t),this.Gtt=e}_tt(t){return this.Ptt.get(t.JI)}jtt(t,i){this.Ptt.set(t.JI,i)}gtt(t){this.Ptt.delete(t.JI)}Qtt(t){const i=[],e=this.mtt;if(void 0!==e.uZ){const s=t.Fy();s.Mi=e.uZ,i.push(s)}if(void 0!==e.cZ){const s=t.Fy();s.Mi=e.cZ,s.att=t.att,i.push(s)}return i}Ktt(){return this.Gtt.slice()}kn(){Ao(this.hq),this.Ptt.clear(),this.Dtt(),this.WO.L.NI.forEach(t=>this.Ott(t)),this.Wu.mn(Qh.yn,this.Att)}constructor(t,i,e,s,n){this.Ptt=re(),this.qtt=!0,this.mtt=void 0,this.ytt=Y({},jL),this.Gtt=[],this.WO=void 0,this.pT=void 0,this.sc=void 0,this.Ttt=void 0,this.Itt=t=>this.nV(t.PO),this.Ctt=t=>this.XU(t.PO),this.Rtt=()=>this.Vtt(),this.Btt=t=>this.Ftt(t.PO),this.Mtt=t=>this.Utt(t.PO),this.Ltt=t=>this.ztt(t.PO),this.Att=t=>this.oe(t.width,t.height),this.WO=t,this.Ttt=this.mtt=n,this.pT=this.Ytt(e),this.sc=s,i.appendChild(this.pT)}};function tO(t,i,e,s,n){const r=t.Fy();let h=r,o=1,a=!1;const u=C(getComputedStyle(i).lineHeight)/4;if(!S(u)&&u>0){for(let i=0;ic&&(h=t.Fy(),o=c),t=r.Fy()}s.pO(t)||(h=r.Fy())}i.style.left=(h.ott-s.ott)/s.Ti*100+"%",i.style.top=(h.utt-s.utt)/s.Mi*100+"%"}function iO(t,i){return i.some(i=>t.ctt(i))}function eO(t){return new ZL(t.left,t.top,t.width,t.height)}var T=function(t){return t[t.POS_X=0]="POS_X",t[t.NEG_X=1]="NEG_X",t[t.POS_Y=2]="POS_Y",t[t.NEG_Y=3]="NEG_Y",t}({});function sO(t,i,e){switch(i){case 0:t.ott+=e;break;case 1:t.ott-=e;break;case 2:t.utt+=e;break;case 3:t.utt-=e}}function nO(t,i,e,s){switch(e){case 0:return t.htt>i.htt+s;case 1:return t.otti.att+s;case 3:return t.uttt.nx.some(t=>"id"===t.WE&&t.XE===s));n&&PO(t,n,i,!0)}!function(t,i){const e=i.m[0];if(!e||"metadata"!==e.WE.toLowerCase())return;const s=e.m[0];PO(t,s,i)}(t,i)}(a,t,e),SO(a,t.WE,o);for(const s of t.KE)AO(s,i,e,a,n,r,o)}}else if(ZA(t)){const i=h.createTextNode(t.lk);if("SPAN"!==s.nodeName.toUpperCase()){const t=h.createElement("span");NO(t),SO(t,"span",o),t.appendChild(i),s.appendChild(t)}else s.appendChild(i)}}function SO(t,i,e){const s=t.style;switch(e.sZ&&(s.fontFamily=e.sZ),e.nZ&&(s.color=e.nZ),i.toLowerCase()){case"span":e.hZ&&(s.background=e.hZ);break;case"p":case"div":e.oZ&&(s.backgroundColor=e.oZ);break;case"body":e.aZ&&(s.textShadow=fO(e.aZ))}}function TO(t){const i=t.ox("region");if("p"===t.WE.toLowerCase())return i;const e=[];for(const i of t.m)e.push(TO(i));return Cc(e),0===e.length?i:1===e.length?null!=(s=e[0])?s:i:void 0;var s}function kO(t,i){const e=i.ux(Dx,"id");e&&(t.id=e)}function EO(t,i,e,s,n){IO(t,i,e.style,s,t,n);for(const s of w.keys(e))CO(t,i,s,e[s],t,n)}function xO(t,i){if(i(t))return t;for(const e of t.m){const t=xO(e,i);if(t)return t}return null}function PO(t,i,e,s){void 0===s&&(s=!1),s&&(t.style.width=t.style.height="100%");const n=h.createElement("img");n.src=function(t){const i=t&&t.KE.length>0?t.KE[0]:null;return i&&ZA(i)?"data:image/png;base64,"+i.lk:""}(i),n.id=t.id,n.style.height="100%",n.style.maxWidth="100%",function(t,i){const e=t.style;Nl(e,"flex"),e.flexDirection=e.webkitFlexDirection="column";const s=i.ox("smpte:backgroundImageVertical");let n="center";if(s)switch(s.toLowerCase()){case"left":n="flex-start";break;case"center":n="center";break;case"right":n="flex-end";break;case"inherit":n="inherit"}e.justifyContent=e.webkitJustifyContent=n;const r=i.ox("smpte:backgroundImageHorizontal");let h="center";if(r)switch(r.toLowerCase()){case"left":h="flex-start";break;case"center":h="center";break;case"right":h="flex-end";break;case"inherit":h="inherit"}e.alignItems=e.webkitAlignItems=h}(t,e),t.appendChild(n)}function IO(t,i,e,s,n,r){if(e)for(const h of e.split(" "))if(s[h])for(const e of w.keys(s[h]))"style"===e.toLowerCase()?IO(t,i,s[h][e],s,n,r):CO(t,i,e,s[h][e],n,r)}function CO(t,i,e,s,n,r){const h=t.style;switch(e){case"backgroundColor":h.backgroundColor=s;break;case"color":h.color=s;break;case"direction":h.direction=s;break;case"display":"none"===s&&(h.display="none");break;case"fontFamily":var o;h.fontFamily=null!=(o=wO.get(s))?o:s;break;case"fontSize":{let t=s;if(Rc(t,"px")){const i=Number(t.slice(0,-2));t=i*r/16+"em"}else Rc(t,"c")&&(t=t.replace("c","em"));h.fontSize=t,h.lineHeight&&"inherit"!==h.lineHeight||(h.lineHeight=yO);break}case"fontStyle":h.fontStyle=s;break;case"fontWeight":h.fontWeight=s;break;case"lineHeight":{let t=s;if(Rc(t,"px")){const i=Number(t.slice(0,-2));t=i*r+"px"}h.lineHeight=t;break}case"opacity":h.opacity=s;break;case"overflow":h.overflow=s;break;case"padding":h.padding=s;break;case"textAlign":h.textAlign=s;break;case"textDecoration":switch(s){case"lineThrough":h.textDecoration="line-through";break;case"underline":case"overline":h.textDecoration=s;break;case"noUnderline":case"noLineThrough":case"noOverline":h.textDecoration="none"}break;case"unicodeBidi":switch(s){case"bidiOverride":h.unicodeBidi="bidi-override";break;case"normal":case"embed":case"isolate":h.unicodeBidi=s}break;case"visibility":h.visibility=s;break;case"zIndex":h.zIndex=s;break;case"displayAlign":{let t;switch(s.toLowerCase()){case"before":t="flex-start";break;case"center":t="center";break;case"after":t="flex-end";break;case"justify":t="space-between";break;default:return}h.justifyContent=h.webkitJustifyContent=t;break}case"extent":{const e=RO(i.toLowerCase())?n:t;let r,h;const o=s.split(" ",2);2===o.length?(r=o[0],h=o[1]):r=h="100%",e&&(e.style.height=h,e.style.width=r);break}case"origin":{const e=RO(i.toLowerCase())?n:t,[r,h]=s.split(" ",2);e&&(r||h)&&(r&&(e.style.left=r),h&&(e.style.top=h));break}case"showBackground":case"textOutline":break;case"wrapOption":switch(s){case"wrap":h.whiteSpace="normal";break;case"noWrap":h.whiteSpace="nowrap"}break;case"writingMode":{let t,i,e,n;switch(s){case"lrtb":case"lr":t="horizontal-tb";break;case"rltb":t="horizontal-tb",i="rtl",n="bidi-override";break;case"tbrl":case"tb":t="vertical-rl",e="upright";break;case"tblr":t="vertical-lr",e="upright";break;case"rl":t="horizontal-tb",i="rtl";break;default:return}h.writingMode=t,h.setProperty("-webkit-writing-mode",t),i&&(h.direction=i),e&&(h.textOrientation=e,h.setProperty("-webkit-text-orientation",e)),n&&(h.unicodeBidi=n);break}case"linePadding":if(Rc(s,"c")){const t=s.replace("c","em");h.paddingLeft=h.paddingRight=t}break;case"multiRowAlign":"auto"===s.toLowerCase()?h.textAlign="":h.textAlign=s}}function RO(t){return"div"===t||"p"===t||"span"===t}function DO(t){const i=t.style;Nl(i,"flex"),i.flexDirection=i.webkitFlexDirection="column",i.top="auto",i.left="5%",i.width="90%",i.height="100%",i.maxHeight="100%",i.maxWidth="100%",i.overflow="visible",i.position="absolute",i.fontFamily=pO,i.color=xt.WHITE,i.background=xt.TRANSPARENT,i.textShadow=fO("uniform"),i.textAlign="start",i.writingMode="horizontal-tb",i.setProperty("-webkit-writing-mode","horizontal-tb"),i.padding="0",i.margin="0",i.fontSize="inherit",i.lineHeight="inherit"}function NO(t){const i=t.style;i.fontFamily="inherit",i.color="inherit",i.fontSize="inherit",i.lineHeight="inherit",i.textShadow="inherit"}function BO(t){let i=eO(t.getBoundingClientRect());if("visible"===getComputedStyle(t).overflow&&t.scrollHeight>t.clientHeight){const e=t.children;for(let t=0;t":return i.Ly(1),o;case"EOF":return o;default:s=r,e="StartTag"}break;case"StartTag":switch(r){case"\t":case"\f":case" ":e="StartTagAnnotation";break;case"\n":h=r,e="StartTagAnnotation";break;case".":e="StartTagClass";break;case">":return i.Ly(1),{Km:"starttag",$E:s,eit:[]};case"EOF":return{Km:"starttag",$E:s,eit:[]};default:s+=r}break;case"StartTagClass":switch(r){case"\t":case"\f":case" ":n.push(h),h="",e="StartTagAnnotation";break;case"\n":n.push(h),h=r,e="StartTagAnnotation";break;case".":n.push(h),h="";break;case">":return i.Ly(1),n.push(h),{Km:"starttag",$E:s,eit:n};case"EOF":return n.push(h),{Km:"starttag",$E:s,eit:n};default:h+=r}break;case"StartTagAnnotation":switch(r){case"&":e="CharRefInAnnotation";break;case">":i.Ly(1);let t=h.trim();return t=t.replace(/\s/," "),{Km:"starttag",$E:s,eit:n,sit:t};default:h+=r}break;case"CharRefInAnnotation":let a="";for(let e=i.ac;">"===t.charAt(e);e++)a+=t.charAt(e);h+=a||"&",e="StartTagAnnotation";break;case"EndTag":switch(r){case">":return i.Ly(1),{Km:"endtag",$E:s};case"EOF":return{Km:"endtag",$E:s};default:s+=r}break;case"TimestampTag":switch(r){case">":return i.Ly(1),{Km:"timestamp",nit:s};case"EOF":return{Km:"timestamp",nit:s};default:s+=r}}i.Ly(1)}return o}r(),r();var OO=function(t){return t.rit="string",t.hit="starttag",t.oit="endtag",t.ait="timestamp",t}({});function FO(t){let i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};const e=h.documentElement,n=h.body,r=e.clientLeft||n.clientLeft||0,o=s.pageXOffset||n.scrollLeft,a=i.left+o-r,u=e.clientTop||n.clientTop||0,c=s.pageYOffset||n.scrollTop,d=i.top+c-u;return{left:_.round(a),top:_.round(d)}}function UO(t,i,e,s){if(void 0===s&&(s=0),!t||!i)return;t.style.left="0px";const n=t.getClientRects(),r=i.getClientRects();if(0===n.length||0===r.length)return;const h=n[0],o=r[0],a=h.width/2+h.left;VO(t,o.width/2+o.left-a,e,s)}function VO(t,i,e,s){void 0===s&&(s=0),WO(t,i,"left","right",e,s)}function HO(t,i,e,s){void 0===s&&(s=0),WO(t,i,"top","bottom",e,s)}function WO(t,i,e,s,n,r){void 0===r&&(r=0);const h=t.getClientRects();if(n&&h.length>0){const t=h[0];i=No(i,n[e]+r-t[e],n[s]-r-t[s])}t.style[e]=i+"px"}function Nr(t,i){void 0===t.textContent?t.innerText=i:t.textContent=i}r();var qO={nZ:xt.WHITE,sZ:"sans-serif",rZ:"100%",hZ:"rgba(0,0,0,0.8)",oZ:xt.TRANSPARENT,aZ:"none",uZ:void 0,cZ:void 0,dZ:void 0,lZ:void 0},zO="theoplayer-webvtt-region-",GO="theoplayer-webvtt-styling-",XO="theoplayer-webvtt-default-style",jO=5.23,QO=class extends $L{Ytt(t){const i=h.createElement("div");i.className="theoplayer-webvtt-texttrack-"+t,Go(i),i.style.overflow="hidden",i.style.pointerEvents="none";const e=this.ptt.sZ;return e&&(i.style.fontFamily=e),i.style.whiteSpace="pre-line",i}GY(){this.hq.appendChild(this.uit),super.GY()}oe(t,i){const e=_.min(t/100,i/100),s=JL(this.ptt);this.cit.forEach(t=>{let{OO:i,dit:n}=t;this.fit(n,e,s,i)}),this.fit(this.uit,e,s)}Stt(t){IN(this.hq,t),super.Stt(t)}Xtt(t,i,e){const s=this.hq,n=this.Wu.Iu/100,r=[];for(const i of t)void 0!==i.OO&&(Ct(r,i.OO)||r.push(i.OO));this.cit.forEach((t,i)=>{let{OO:s,dit:n}=t;!e&&Ct(r,s)||(Ao(n),this.cit.delete(i))});for(const t of i)!e&&t.ro||this.ftt(t);const h=[],o=eO(this.uit.getBoundingClientRect());h.push(...this.Qtt(o));for(const t of r){let i;this.cit.has(t.o)?i=this.cit.get(t.o).dit:(i=iF(t,n),s.appendChild(i),this.cit.set(t.o,{OO:t,dit:i})),h.push(eO(i.getBoundingClientRect()))}t.sort(rF);for(const i of t){const t=this.tit(i,h,o);void 0!==t&&h.push(t.dtt(.1))}}tit(t,i,e){var s;let n;t.OO?(n=this.cit.get(t.OO.o).dit,"up"===t.OO.iF&&n.children.length>=1&&(n.style.transitionProperty="top",n.style.transitionDuration="0.433s")):n=this.uit;let r=null==(s=this._tt(t))?void 0:s[0];if(r||(r=this.vit(t),this.jtt(t,[r])),n.appendChild(r),t.OO||(KO(r,t),t.FO?function(t,i,e,s){const n=eF(t),r=n?e.Mi:e.Ti;let h=C(getComputedStyle(i).lineHeight);if(0===h||S(h))return;const o=eO(i.getBoundingClientRect());let a=_.round(PE(t));"rl"===t.Pt&&(a=-(a+1));let u=h*a;"rl"===t.Pt&&(u=u-o.Ti+h);a<0&&(u+=r,h=-h);n?o.utt+=u:o.ott+=u;const c=o.Fy();let d=!1;for(;!e.pO(o)||iO(o,s);)if(n)if(h<0&&o.utt0&&o.att>e.att){if(o.utt=c.utt,d)break;h=-h,d=!0}else o.utt+=h;else if(h<0&&o.ott0&&o.htt>e.htt){if(o.ott=c.ott,d)break;h=-h,d=!0}else o.ott+=h;n?i.style.top=(o.utt-e.utt)/e.Mi*100+"%":i.style.left=(o.ott-e.ott)/e.Ti*100+"%"}(t,r,e,i):function(t,i,e,s){const n=eO(i.getBoundingClientRect());if(0===n.Ti||0===n.Mi)return;eF(t)?"center"===t.MO?n.utt-=n.Mi/2:"end"===t.MO&&(n.utt-=n.Mi):"center"===t.MO?n.ott-=n.Ti/2:"end"===t.MO&&(n.ott-=n.Ti);let r;r=""===t.Pt?[T.POS_Y,T.NEG_Y,T.POS_X,T.NEG_X]:"lr"===t.Pt?[T.POS_X,T.NEG_X,T.POS_Y,T.NEG_Y]:[T.NEG_X,T.POS_X,T.POS_Y,T.NEG_Y];tO(n,i,r,e,s)}(t,r,e,i)),!t.OO)return eO(r.getBoundingClientRect())}vit(t){const i=new oi,e=t.U,s=this._it(t),n={git:void 0,xe:s};let r=n,o="",a="";const u=[n],c=[],d=[];for(;i.ac0?d[d.length-1]:"")):"rt"===e&&"ruby"===i?(u.pop(),u.pop(),r=u[u.length-1]):"lang"===i&&(c.pop(),o=c.length>0?c[c.length-1]:"")}else if(t.Km===OO.ait){const i=t.nit,e=new oi;try{Ku(i,e)}catch(t){Tv("ERROR collecting timestamp",t)}}}return s}pit(t,i){const e=this.ptt,s=this.wtt;e.hZ&&(t.style.background=e.hZ);const n=s.nZ||i||e.nZ;n&&(t.style.color=n)}fit(t,i,e,s){if(s){const n=JO(s,i);t.style.height=n*e+"px",t.style.left=ZO(s)+"%",t.style.top=$O(s,i)+"px"}t.style.fontSize=jO*i*e+"px"}_it(t){const i=h.createElement("div");i.style.position="absolute",i.style.margin="0",i.style.padding="0",i.style.unicodeBidi="plaintext",i.style.wordWrap="break-word",i.style.overflowWrap="break-word",i.style.width="auto",i.style.textAlign=t.DO,function(t,i){"rl"===i.Pt?t.style.writingMode="vertical-rl":"lr"===i.Pt?t.style.writingMode="vertical-lr":t.style.writingMode="horizontal-tb"}(i,t),function(t,i){const e=RE(i);eF(i)?(t.style.width=e+"%",t.style.height="auto"):(t.style.height=e+"%",t.style.width="auto")}(i,t),KO(i,t);const e=this.ptt.oZ;e&&(i.style.background=e);const s=this.ptt.nZ;return s&&(i.style.color=s),i.style.textShadow=fO(this.ptt.aZ),i}constructor(t,i,e,s){super(t,i,e,s,qO),this.cit=Ba(),this.uit=tF(3),function(t){const i=function(t){const i=null==t.getRootNode?void 0:t.getRootNode.call(t);if(i&&i.host)return i}(t);var e;const s=null!=(e=null!=i?i:t.ownerDocument)?e:h;if(s.getElementById(XO))return;const n=[];for(const[t,i]of sF)n.push("."+GO+t+" { color: "+i+" !important; }"),n.push("."+GO+"bg"+nF+t+" { background-color: "+i+" !important; }"),n.push("video::cue(."+t+") { color: "+i+"; }"),n.push("video::cue(.bg"+nF+t+") { background-color: "+i+"; }");const r=h.createElement("style");r.id=XO,r.innerHTML=n.join("\n"),i?i.appendChild(r):s.body.appendChild(r)}(i)}};function KO(t,i){let e,s;const n=CE(i),r=IE(i),h=RE(i);if(eF(i)){switch(n){case"line-left":e=r;break;case"center":e=r-h/2;break;case"line-right":e=r-h}s=i.FO?0:PE(i)}else{switch(n){case"line-left":s=r;break;case"center":s=r-h/2;break;case"line-right":s=r-h}e=i.FO?0:PE(i)}t.style.left=e+"%",t.style.top=s+"%"}function YO(t,i){for(const e of i)if(e.git){for(const i of e.git.eit)Pl(t,GO+i);"v"===e.git.$E.toLowerCase()&&e.git.sit&&Pl(t,"theoplayer-webvtt-voice-"+e.git.sit)}}function JO(t,i){return t.ZO*(jO*i)*1.14}function ZO(t){return t.eF-t.$O*t.Ti/100}function $O(t,i){const e=t.sF,s=t.tF*JO(t,i)/100;return _.max(0,e-s)}function tF(t){const i=h.createElement("div");return i.className=zO+"default",Go(i),i.style.wordWrap="break-word",i.style.writingMode="horizontal-tb",i.style.pointerEvents="none",i.style.width="auto",i.style.height="auto",i.style.maxHeight="100%",i.style.minHeight="0px",i.style.padding="0",i.style.boxSizing="border-box",i.style.fontSize=jO*t+"px",i.style.lineHeight="1.14em",i}function iF(t,i){const e=tF(i);e.className=zO+t.o;const s=t.Ti,n=JO(t,i);return e.style.width=s+"%",e.style.height=n+"px",e.style.left=ZO(t)+"%",e.style.right="",e.style.top=$O(t,i)+"px",e.style.bottom="",e.style.boxSizing="border-box",e}function eF(t){return""===t.Pt}var sF=[["white","#fff"],["lime","#0f0"],["cyan","#0ff"],["red","#f00"],["yellow","#ff0"],["magenta","#f0f"],["blue","#00f"],["black","#000"]],nF=String.fromCharCode(95);function rF(t,i){const e=PE(t),s=PE(i),n=hF(e,t.FO),r=hF(s,i.FO);return n&&r?e-s||fi(i,t)||i.JI-t.JI:fi(t,i)||t.JI-i.JI}function hF(t,i){return i?t<0?t>-8:t>8:t>50}r(),r(),r();var oF=function(t){return t.FONT_REGULAR="regular",t.FONT_UNDERLINE="underline",t.FONT_ITALICS="italics",t.FONT_UNDERLINE_ITALICS="underline-italics",t}({}),aF={nZ:xt.WHITE,sZ:hO.nl,rZ:"100%",hZ:xt.BLACK,oZ:"transparent",aZ:"none",mit:"regular",uZ:void 0,cZ:void 0,dZ:void 0,lZ:void 0},uF=[{wit:xt.WHITE,mit:"regular",yit:0},{wit:xt.WHITE,mit:"underline",yit:0},{wit:xt.GREEN,mit:"regular",yit:0},{wit:xt.GREEN,mit:"underline",yit:0},{wit:xt.BLUE,mit:"regular",yit:0},{wit:xt.BLUE,mit:"underline",yit:0},{wit:xt.CYAN,mit:"regular",yit:0},{wit:xt.CYAN,mit:"underline",yit:0},{wit:xt.RED,mit:"regular",yit:0},{wit:xt.RED,mit:"underline",yit:0},{wit:xt.YELLOW,mit:"regular",yit:0},{wit:xt.YELLOW,mit:"underline",yit:0},{wit:xt.MAGENTA,mit:"regular",yit:0},{wit:xt.MAGENTA,mit:"underline",yit:0},{wit:xt.WHITE,mit:"italics",yit:0},{wit:xt.WHITE,mit:"underline-italics",yit:0},{wit:xt.WHITE,mit:"regular",yit:0},{wit:xt.WHITE,mit:"underline",yit:0},{wit:xt.WHITE,mit:"regular",yit:4},{wit:xt.WHITE,mit:"underline",yit:4},{wit:xt.WHITE,mit:"regular",yit:8},{wit:xt.WHITE,mit:"underline",yit:8},{wit:xt.WHITE,mit:"regular",yit:12},{wit:xt.WHITE,mit:"underline",yit:12},{wit:xt.WHITE,mit:"regular",yit:16},{wit:xt.WHITE,mit:"underline",yit:16},{wit:xt.WHITE,mit:"regular",yit:20},{wit:xt.WHITE,mit:"underline",yit:20},{wit:xt.WHITE,mit:"regular",yit:24},{wit:xt.WHITE,mit:"underline",yit:24},{wit:xt.WHITE,mit:"regular",yit:28},{wit:xt.WHITE,mit:"underline",yit:28}],cF=[11,-1,1,2,3,4,12,13,14,15,5,6,7,8,9,10];function dF(t,i){return WE(t.Ait,i.Ait)||xc(t.zB,i.zB)}r();var uo=32,lF=/CC([1-4])=(.*)/;function fF(t){if(!t)return[];const i=[],e=t.trim().split(";");if(e.every(t=>t.match(lF)))for(const t of e){const[,e,s]=t.match(lF);i.push({Sit:Number(e),Tit:s})}else for(let t=0;tnew vF(t,this.Kit,this.ptt).wr())}Zit(t){const i=(100-t)/2;this.hq.style.left=i+"%",this.hq.style.width=t+"%"}constructor(t,i,e,s){super(t,i,e,s,aF),this.Jit=void 0,this.Kit=void 0}},_a=class t{$it(t){for(const i of this.tet)if(i.Ht===t)return i}static iet(t){switch(t.Km){case nh.TTML:case nh.SRT:case nh.WEBVTT:case nh.CEA608:return!0}return!1}eet(t){switch(t.Km){case nh.TTML:return new bO(t,this.net,t.Th,this.sc);case nh.SRT:case nh.WEBVTT:return new QO(t,this.net,t.Th,this.sc);case nh.CEA608:return new gF(t,this.net,t.Th,this.sc)}}ret(t){let i=this.$it(t);i||(i=this.eet(t),i&&(i.GY(),i.Stt(this.Oz),this.tet.push(i),t.Qk===xh.Kn&&i.Htt()))}het(t){const i=this.tet;for(let e=i.length-1;e>=0;e-=1){const s=i[e];s.Ht===t&&(s.kn(),Ra(i,e))}}oet(i){eP(i.Lt)&&t.iet(i)&&(i.AP===dc.ERROR?this.het(i):this.ret(i))}get d6(){return this.aet.ds||this.ea.YL}hr(){for(const t of this.tet)t.Ht.mn(Te.AI,this.uet),t.Ht.mn(Te.kI,this.uet),t.kn();Wt(this.tet)}kn(){this.hr();for(const t of this.tet)t.kn();this.Gl.mn(N.rI,this.cet),this.Gl.mn(N.oI,this.det),this.Gl.mn(Te.pa,this.uet),this.aet.mn(Bs.pa,this.let),this.ea.mn([na.QL,na.KL],this.let),this.Oz.mn("bI",this.fet)}constructor(t,i,e,s,n,r){this.net=void 0,this.sc=void 0,this.Gl=void 0,this.aet=void 0,this.ea=void 0,this.tet=[],this.Oz=void 0,this.cet=t=>{const i=t.Ht;i.wn(Te.AI,this.uet),i.wn(Te.kI,this.uet),i instanceof dL&&(i.d6=this.d6),this.oet(i)},this.uet=t=>{const i=t.Ht;this.oet(i)},this.det=t=>{const i=t.Ht;i.mn(Te.AI,this.uet),i.mn(Te.kI,this.uet),this.het(i)},this.let=()=>{const t=this.d6;for(const i of this.Gl.NI)i instanceof dL&&(i.d6=t)},this.fet=()=>{for(const t of this.tet)t.Stt(this.Oz)},this.net=t,this.sc=i,this.Gl=e,this.aet=n,this.ea=r,this.Oz=s,this.Gl.wn(N.rI,this.cet),this.Gl.wn(N.oI,this.det),this.Gl.wn(Te.pa,this.uet),this.aet.wn(Bs.pa,this.let),this.ea.wn([na.QL,na.KL],this.let),this.Oz.wn("bI",this.fet),this.let()}};r();var pF=class extends Ne{get JL(){var t;return null!=(t=this.vet.ownerDocument.pictureInPictureEnabled)&&t}get YL(){return this._et}async yo(){if(this.JL){if(!this.YL){const t=this.ww([na.QL,na.ma]);await this.vet.requestPictureInPicture(),await t,this._et||this.So(new yC)}}else this.So(new yC)}async jo(){if(this.JL){if(this._et){const t=this.ww([na.KL,na.ma]);await this.vet.ownerDocument.exitPictureInPicture(),await t,this._et&&this.So(new yC)}}else this.So(new yC)}kn(){this.Vo(),this.vet.removeEventListener("enterpictureinpicture",this.pet),this.vet.removeEventListener("leavepictureinpicture",this.met)}constructor(t){super(),this.vet=void 0,this._et=!1,this.pet=()=>{this._et=!0,this.So(new Wk)},this.met=()=>{this._et=!1,this.So(new qk)},this.vet=t,this.vet.addEventListener("enterpictureinpicture",this.pet),this.vet.addEventListener("leavepictureinpicture",this.met)}};function mF(t){const i=new ED,e=function(t){const i=[];return TD.la(t)&&i.push(new TD(t)),kD.la(t)&&i.push(new kD(t)),i}(t);if(e.length>0){for(const t of e)i.EK(t);i.kK(e[0])}return i}var wF=class extends WL{get hq(){return this.pT}get DP(){return this.pT.videoHeight}get MP(){return this.pT.videoWidth}get Ma(){return this.wet}get Sq(){return this.yet}zP(){return this.pT}async zg(){this.yet.kn(),this.wet.kn(),this.bet.kn(),this.Aet.kn(),await super.zg()}we(){super.we(),this.bet.we()}be(){super.be(),this.bet.be()}Y7(t){super.Y7(t),this.bet.Y7(t)}constructor(t,i,e,s,n){super(t,i,e,s,n),this.bet=void 0,this.Aet=void 0,this.wet=void 0,this.yet=void 0,this.wet=mF(t),this.yet=new pF(t),this.bet=new ma,this.Aet=new _a(this.bet.xe,this.Wu,this.nt,this.Ql,this.Ma,this.Sq)}};r(),r();r(),r();var yF=function(t){return t.Tet="HELLO",t.ket="HI_THERE",t.Eet="INITIALIZE",t.xet="APPEND_INIT",t.Pet="APPEND_DATA",t.Iet="ACK",t.Cet="REMOVE",t.Ret="DESTROY_SESSION",t}({}),bF=class{Det(t){return this.ta.Zo(async t=>{fr(t);const i=new MessageChannel,e=i.port1,s=i.port2;od.serviceWorker.controller||await KA(od.serviceWorker,"install",t),"activated"!==od.serviceWorker.controller.state&&await KA(od.serviceWorker.controller,"activate",t);const n={kind:"HELLO",port:s};od.serviceWorker.controller.postMessage(n,[s]),e.start(),this.im=e;try{const i=await KA(e,"message",t),s=i.data;if("HI_THERE"!==s.kind)throw new m("Could not set up message channel");this.yT=s.sessionId}catch(t){throw Ce(t)&&this.Net(),t}},t)}Bet(t,i){return this.im,this.ta.Zo(async()=>{if(!this.im)throw new m("MessageSession not set up yet or already closed.");i||(i=[]),this.im.postMessage(t,i);const e=await KA(this.im,"message");return e.data})}Met(){return this.ta.Zo(()=>this.Net())}Net(){if(!od.serviceWorker.controller)return;if("activated"!==od.serviceWorker.controller.state)return;if(!this.im)return;const t={kind:"DESTROY_SESSION"};this.im.postMessage(t),this.im.close(),this.im=void 0}constructor(){this.im=void 0,this.yT=void 0,this.ta=new Zn}};r();var AF=class{get Let(){return this.Oet}Fet(t,i){const e=t-i;this.Oet=e>this.Let?this.Oet:e}Uet(t){this.Oet=t}constructor(){this.Oet=1/0}};r(),r(),r();var li=function(t){return t.Bk="audio",t.Mk="video",t.zU="metadata",t}({}),SF=class extends Ne{get Fx(){return void 0===this.Vet||void 0===this.Het?Uo.rL():new Uo([this.Vet,this.Het])}get Cd(){return{GT:this.IQ}}get V3(){return St(this.IQ)?at.Bk:$y(this.IQ)?at.Mk:at.yk}get lQ(){return this.IQ}get W3(){return Uo.rL()}get VY(){return 30}set VY(t){}get zY(){return 30}set zY(t){}G3(t,i){}X3(t,i){}jZ(){return this.Wet}get ga(){return this.qet}get zet(){return this.Vet}get RO(){return this.Het}async j3(){}async f3(t,i){}async Q2(t,i,e){if(t.Km!==We.wZ)throw new m("Streaming or opaque segments are not supported yet.");const s=t.lk,n=async()=>{const t=s.buffer,e={kind:yF.Pet,mediaType:TF(this.IQ),segment:s,startPts:i.Get,totalDuration:i.ct};if(await this.Xet.Bet(e,[t]),void 0===this.Vet){const t=i.Get+i.EU;this.Vet=t,this.Het=t}this.Het=this.Het+i.ct,this.So(new gp(bi.pZ))};return this.ta.Zo(async t=>{fr(t);try{this.qet=!0,await n()}finally{this.qet=!1}},e)}async J2(t,i,e){if(t.Km!==We.wZ)throw new m("Streaming or opaque initialization segments are not supported yet.");const s=t.lk,n=async()=>{const t={kind:yF.xet,mediaType:TF(this.IQ),segment:s};await this.Xet.Bet(t,[])};return this.ta.Zo(async t=>{fr(t);try{this.qet=!0,await n()}finally{this.qet=!1}},e)}F3(){this.Wet=!0}I3(){this.Wet=!1}async pS(t,i,e){const s=async()=>{const t={kind:yF.Cet,mediaType:TF(this.IQ),endTime:i};await this.Xet.Bet(t),this.Vet=void 0,this.Het=void 0,this.So(new gp(bi.pZ))};return this.ta.Zo(async t=>{fr(t);try{this.qet=!0,await s()}finally{this.qet=!1}},e)}IZ(t){return this.IQ===t.GT}RZ(t){return this.IQ=t.GT,Promise.resolve()}async zg(){this.Vo(),await this.ta.kn()}constructor(t,i){super(),this.IQ=void 0,this.Xet=void 0,this.Vet=void 0,this.Het=void 0,this.ta=void 0,this.qet=void 0,this.Wet=void 0,this.IQ=t,this.Xet=i,this.Vet=void 0,this.Het=void 0,this.ta=new Zn,this.qet=!1,this.Wet=!1}};function TF(t){return t.match(/video/)?li.Mk:li.Bk}var kF=class t{static jet(i,e,s,n){const r=[];for(let t=0;tt.zg()))}F4(t){}W4(t,i,e,s){}F3(){var t,i;null==(t=this.B4)||t.F3(),null==(i=this.M4)||i.F3()}I3(){var t,i;null==(t=this.B4)||t.I3(),null==(i=this.M4)||i.I3()}IZ(t){return!!LL(this,t)}RZ(t){return this.ZS=t,Promise.resolve()}NZ(t){}async xZ(t,i){const e=await this.hw.nw(t.Ym,i),s=await e.RS();return await this.PZ(s),s}async PZ(t){if(t&&!this.pT.src)throw new fs(me.CONTENT_PROTECTION_ERROR,"Attempted to attach MediaKeys to a sourceless MediaElement");if(!t&&this.pT.src)throw new fs(me.CONTENT_PROTECTION_ERROR,"Attempted to remove MediaKeys from a non-empty MediaElement");const i=this.ES;i&&(await i.IS(this.pT),this.ES=void 0),t&&(await t._n(this.pT),this.ES=t)}constructor(t,i,e,s){this.ZS=void 0,this.hw=void 0,this.pT=void 0,this.B4=void 0,this.M4=void 0,this.ES=void 0,this.ZS=t,this.M4=hh(i,t=>Boolean(t.lQ.match(/video/))),this.B4=hh(i,t=>Boolean(t.lQ.match(/audio/))),this.hw=e,this.pT=s,this.Qet()}},EF=class extends Ne{Yet(){this.vet.addEventListener("timeupdate",this.Jet),this.vet.addEventListener("ended",this.Zet),this.vet.addEventListener("timeupdate",this.$et),this.vet.addEventListener("ratechange",this.tst),this.vet.addEventListener("volumechange",this.ist),this.vet.addEventListener("durationchange",this.sst),this.vet.addEventListener("playing",this.nst),this.vet.addEventListener("seeking",this.rst),this.vet.addEventListener("play",this.hst),this.vet.addEventListener("pause",this.ost),this.vet.addEventListener("encrypted",this.V7)}ast(){this.vet.removeEventListener("timeupdate",this.Jet),this.vet.removeEventListener("ended",this.Zet),this.vet.removeEventListener("timeupdate",this.$et),this.vet.removeEventListener("ratechange",this.tst),this.vet.removeEventListener("volumechange",this.ist),this.vet.removeEventListener("durationchange",this.sst),this.vet.removeEventListener("playing",this.nst),this.vet.removeEventListener("seeking",this.rst),this.vet.removeEventListener("play",this.hst),this.vet.removeEventListener("pause",this.ost)}ust(){this.e9.wn(Jr.AI,this.Rs)}cst(){this.e9.mn(Jr.AI,this.Rs)}get hq(){return this.vet}get d5(){return!1}get zx(){return this.vet.currentTime+this.dst.Let}get lP(){return this.vet.paused}get OP(){return this.vet.volume}set OP(t){this.vet.volume=t}get vP(){return this.vet.playbackRate}set vP(t){this.vet.playbackRate=t}get lst(){return this.vet.defaultPlaybackRate}get Fx(){var t,i;return null!=(i=null==(t=this.aq)?void 0:t.Fx)?i:Uo.rL()}get fst(){return Uo.jn(this.vet.buffered)}get pP(){const t=this.vst;return this.Ho.HM(t.Ly(this.dst.Let))}get vst(){return Uo.jn(this.vet.played)}get xP(){return this.Pz}get n5(){return!1}get _5(){return!1}get ct(){return this.vet.duration}get oP(){return this.vet.muted}set oP(t){this.vet.muted=t}get zit(){return this.vet.style}get ML(){return Y({},DN,{BL:!0})}Oy(t,i,e){this.T9.Zg(),this.T9=new Zc,this.k9=Cu(this.E9(t,this.k9,this.T9.Yg),this.T9).catch(gs)}async E9(t,i,e){var s;this.Ho=this.pP;const n=null==(s=this.aq)?void 0:s.Ket;if(!n)return;const r=_.max(...n.map(t=>t.zet?t.zet:1/0));this.Pz=!0,this.So(new ji(t)),await i.catch(gs),fr(e);try{for(this._st||this.gst(),this.vet.load(),this.pst||(this.mst=!1,await ua(this.vet.play(),e));this.AP0))return;i=t[0];const e=i.width,s=this.vet.videoWidth/this.vet.videoHeight,n=i.height;let r,h;e/n>s?(r=n*s,h=n):(h=e/s,r=e),this.vet.style.width=r+"px",this.vet.style.height=h+"px",this.vet.style.marginLeft=(e-r)/2+"px",this.vet.style.marginTop=(n-h)/2+"px",this.vet.style.backgroundColor="black"}yst(){this.vet.style.width="100%",this.vet.style.height="100%",this.vet.style.marginLeft="",this.vet.style.marginTop="",this.vet.style.backgroundColor=""}get DP(){return this.vet.videoHeight}get MP(){return this.vet.videoWidth}get Qx(){return this.vet.ended}get Mi(){return this.vet.offsetHeight*zd.Zs.fp}get Ti(){return this.vet.offsetWidth*zd.Zs.fp}get sP(){return!1}get j7(){return this.Q7}get Vx(){}get Wu(){return this.bst}get lt(){}get Ma(){return this.wet}get Sq(){return this.ea}get kP(){return this.aq?this.aq.kP:Uo.rL()}get uq(){}get nt(){return this.Gl}get Ql(){return this.Oz}get WP(){return!1}set WP(t){}bq(t,i,e,s,n){}sI(t,i,e,s,n,r,h,o,a){const u=new Ji(t,i,e,s,n,r,h,a,o);return this.Gl.tt(u),this.J9.tt(u),u}Tq(t){throw m("Not supported.")}$Z(t){}V9(t){return Promise.resolve({H9:!1})}hP(){return lN(this.vet)}get a9(){return"block"===this.vet.style.display}be(){this.vet.style.display="block",this.bet.be()}we(){this.vet.style.display="none",this.bet.we()}G7(){}async Un(t){if(t.Km===O.AV)throw new m("Not yet implemented");await this.Xet.Det();const i=hh(t.fq,t=>t.xS.Km===po.jm),e={kind:yF.Eet,mediaBufferConfigs:t.q4.map(t=>t.GT),fairPlaySdkUri:null==i?void 0:i.GH};return await this.Xet.Bet(e),this.aq=kF.jet(t,this.Xet,this.hw,this.vet),this.DZ.Un(this.aq,t),this.vet.setAttribute("x-webkit-airplay","deny"),this.vet.setAttribute("x-webkit-wirelessvideoplaybackdisabled",""),this.vet.disableRemotePlayback=!0,this.vet.preload="none",this.vet.src="https://theo.proxy/"+this.Xet.yT+"/master.m3u8",this.aq}X7(){}rV(t){this.Gl.it(t),this.J9.it(t)}Eq(){for(const t of this.Gl.NI.slice())t.kn();this.Gl.hr()}$W(t){}wq(){return!1}Y7(t){t.appendChild(this.vet),this.bet.Y7(t)}zP(){return this.vet}get Rq(){return this.DZ.Rq}set Rq(t){this.DZ.Rq=t}get J7(){}set J7(t){}get T8(){}$P(){}constructor(t,i,e,s){super(),this._st=!0,this.Xet=new bF,this.dst=new AF,this.aq=void 0,this.e9=void 0,this.pst=!0,this.wst=new Ga,this.Pz=!1,this.k9=Promise.resolve(),this.T9=new Zc,this.mst=!0,this.Ho=Uo.rL(),this.wet=void 0,this.ea=void 0,this.vet=void 0,this.Q7=!1,this.DZ=void 0,this.hw=void 0,this.Gl=void 0,this.J9=void 0,this.bet=void 0,this.Aet=void 0,this.bst=void 0,this.Oz=void 0,this.Jet=()=>{this.lP||this.fst.V<=0||this.Fx.V<=0||this.dst.Fet(this.Fx.An(this.Fx.V-1),this.fst.An(this.fst.V-1))},this.Zet=()=>{this.So(new ur(this.zx))},this.$et=()=>{this.So(new B(this.zx,this.Vx))},this.tst=()=>{this.So(new Ik(this.zx,this.vP))},this.ist=()=>{this.So(new Wi(this.zx,this.OP))},this.sst=()=>{this.So(new zr(this.ct))},this.nst=()=>{this.So(new mo(this.zx))},this.rst=()=>{this.Oy(this.zx)},this.hst=async()=>{this.mst&&this.So(new vt(this.zx)),this.pst=!1,this.mst=!0},this.ost=()=>{this.pst=!0,this.So(new Si(this.zx))},this.V7=t=>{const i=t.initDataType;var e;const s=null!=(e=t.initData)?e:new ArrayBuffer(0);this.So(new Sp(i,s))},this.vet=t,this.e9=new Ou(this),this.bst=e,this.Oz=s,this.vet.playsInline=!0,this.vet.style.width="100%",this.vet.style.height="100%",this.Yet(),this.ust(),this.wet=mF(this.vet),this.ea=new pF(this.vet),this.DZ=new CL(this),this.hw=i,this.Gl=new bc,this.J9=new gL(this),this.bet=new ma,this.Aet=new _a(this.bet.xe,this.Wu,this.nt,this.Ql,this.Ma,this.Sq)}},xF=[at.Bk,at.Mk],Dr=class{get Fz(){const t=[];for(const i of this.Ast){const e=this.Sst.get(i);if(e){const i=e.map(t=>t.Tst);t.push(...i)}}return this.kst&&t.push(this.kst),t}Est(t){for(const i of this.Fz)i.Y7(t)}Yq(t){const i=this.Sst.get(t);if(!i)return;const e=hh(i,t=>t.xst);return e?(e.xst=!1,e.Tst):void 0}Pst(t){if(!this.kst){var i;const t=null==(i=this.Sst.get(at.Mk))?void 0:i[0].Tst.hq;if(!t)throw new m("Error creating iOS Safari MediaController");this.kst=new EF(t,this.hw,this.sc,this.Oz),t.parentElement&&this.kst.Y7(t.parentElement)}return this.kst}async Dq(t){const i=t.hq,e=i.tagName.toLowerCase();await t.hr(),Ef(i);const s=hh(this.Sst.get(e)||[],i=>t===i.Tst);s&&(s.xst=!0)}Nz(){for(const t of this.Fz)t.K7()}kn(){for(const t of this.Fz){const i=t.hq;t.zg(),kf(i),Ao(i)}this.Sst.clear(),this.kst=void 0}Ist(){for(const t of this.Ast){const i=[];this.Sst.set(t,i);for(let e=0;e{const e=zd.Mg()/1e3;return i.BY(e,new j(t)),i.MY(e),t});const n={lk:s,vk:e.vk};return new il(n,e)}constructor(t,i){super(t),this.Mz=void 0,this.Mz=i}},CF=class{start(t){this.iZ=t}transform(t){this.Dst.BY(zd.Mg()/1e3,t),this.iZ.enqueue(t)}flush(){this.Dst.MY(zd.Mg()/1e3)}constructor(t){this.Dst=void 0,this.iZ=void 0,this.Dst=t}};function RF(t){return{get ratio(){return t.qo},get thresholds(){return t.Nst.slice()}}}function DF(t){const i=[],e=_.floor(1/t);if(S(e))return[];for(let s=0;s<=e;s++){const e=No(s*t,0,1);i.push(e)}return i}r(),r(),r();var NF=class{get qo(){return this.Bst}get Nst(){return this.Mst}Lst(t){return i=>{const e=i[i.length-1];this.Bst=e.intersectionRatio,t(e.intersectionRatio)}}get Ca(){return this.hu||(this.hu=RF(this)),this.hu}KP(){this.Ost.disconnect()}constructor(t,i,e){this.Bst=1,this.Mst=void 0,this.Ost=void 0,this.hu=void 0,this.Mst=DF(i);const n=this.Lst(e);this.Ost=new s.IntersectionObserver(n,{root:null,threshold:this.Mst}),this.Ost.observe(t)}},BF=class{get qo(){return this.Bst}get Nst(){return this.Mst}get Ca(){return this.hu||(this.hu=RF(this)),this.hu}Fst(t){this.Bst=t;const i=this.Mst;let e=0;if(t>0)for(;ethis.Fst(this.Hst()),50),this.bo=t,s.addEventListener("scroll",this.Wst,!!_D&&{passive:!0}),Ht(()=>this.Fst(this.Hst()))}},LF=.1,OF=class{get qst(){return this.zst}get Lo(){return this.Gst}set Lo(t){if(S(t)||t<0||t>1)throw new RangeError("The threshold must be a value between 0 and 1");this.Gst=t}get Ca(){return this.hu||(this.hu=function(t){return{get ratio(){return t.qst},get visible(){return t.qst>t.Lo},get visibleThreshold(){return t.Lo},set visibleThreshold(i){i=bs(i),t.Lo=i},addObserver:(i,e)=>(i=bs(i),t.Do(i,e).Ca),removeObserver(i){const e=t.Xst(i);e&&t.Uo(e)}}}(this)),this.hu}jst(t){return i=>{this.zst=i,null==t||t(this.zst)}}Do(t,i){if(S(t))throw new g("step is not of the right type");if(t>1||t<=0)throw new RangeError("The step must be a number greater than 0 and smaller than or equal to 1");let e;return e="function"==typeof s.IntersectionObserver?new NF(this.bo,t,this.jst(i)):new MF(this.bo,t,this.jst(i)),this.Qst.push(e),e}Uo(t){t.KP(),_e(this.Qst,t)}Xst(t){for(const i of this.Qst)if(i.Ca===t)return i}kn(){for(const t of this.Qst)t.KP();Wt(this.Qst)}constructor(t){this.bo=void 0,this.zst=1,this.Gst=0,this.Qst=[],this.hu=void 0,this.bo=t,this.Do(.1,this.jst())}};r();var FF=class extends gp{constructor(){super(d.Iw)}},UF=class extends je{get Kst(){return this.Mz}get vO(){return this.Yst}set vO(t){this.Yst=t,this.Pa.vO=t}get Jst(){return this.Zst}get ht(){return this.Pa.ht}get GX(){return this.$st}get Wu(){return this.tnt}get $x(){return this.Pa.$x}get iP(){return this.Pa.iP}get rP(){return this.int}get lX(){return this.ent}get nt(){return this.Pa.nt}get Ql(){return this.Oz}get rt(){return this.Pa.rt}get Fx(){return this.Ux()}Ux(){return this.Pa.Fx}get snt(){return this.oJ}get yJ(){return this.bJ}get zx(){return this.Gx()}set zx(t){this.Xx(t)}Gx(){return this.Pa.zx}Xx(t,i){this.Pa.Xx(t,i)}nnt(){return this.Gx()}get Vx(){return this.Pa.Vx}set Vx(t){this.Pa.Vx=t}get bt(){return this.Pa.bt}get ct(){return this.Nd()}Nd(){return this.Pa.ct}get xe(){return this.Pa.xe}get Qx(){return this.Pa.Qx}get lt(){return this.Yx()}Yx(){return this.Pa.lt}get Jx(){return this.Zx()}Zx(){return this.Pa.Jx}get Ma(){return this.Pa.qP()}get Sq(){return this.Pa.Aa()}get WP(){return this.Pa.WP}set WP(t){this.Pa.WP=t}get oP(){return this.Pa.oP}set oP(t){const i=Boolean(t);this.uP(i)}uP(t){this.Pa.oP=t,t||this.lP||this.GP()}get lP(){return this.Pa.lP}get vP(){return this._P()}set vP(t){this.gP(t)}_P(){return this.Pa.vP}gP(t){this.Pa.vP=t}get pP(){return this.mP()}mP(){return this.Pa.pP}get wP(){return this.Pa.wP}set wP(t){this.Pa.wP=t}get AP(){return this.Pa.AP}get kP(){return this.EP()}EP(){return this.Pa.kP}get xP(){return this.Pa.xP}get JI(){return this.yO}get DP(){return this.Pa.DP}get MP(){return this.Pa.MP}get OP(){return this.Pa.OP}set OP(t){const i=No(Number(t),0,1)||0;this.UP(i)}get VP(){return this.Lz}UP(t){this.Pa.OP=t}Ea(){Ok(this,OC,this)}QP(){this.Pa.QP()}jP(){this.Pa.jP()}nu(){return this.bz}async Ta(t,i){if(this.bz=t,t){this.rnt.Nj(t).catch(this.hnt);const e=function(t){t.sources;const i=t.sources.filter(t=>vc(t.integration));0;return t.sources=i,t}(t);await this.Pa.Ta(e,i)}}IP(t,i,e){return this.Pa.IP(t,i,e)}CP(){return this.Pa.CP()}GP(){if(this.ko)return;this.Pa.GP(),this.Zst.GP();const t=this.xe.getElementsByTagName("video");for(let i=0;i{if(this.lnt)return;this.lnt=!0;const i=this.dnt,e=ar(t);this.Pa.OI=new TC(this.xe,e,t),Wr(i.kn())},this.fnt=t=>{t.type!==d.Xw&&t.type!==d.Gw&&this.So(t)};const n=bs(i.uid);S(n)?this.yO=nE++:this.yO=n,this.Cd=i;const r=zd.Dx,h=new SN;this.cnt=new nD("10.3.0",r,h),this.Mz=new sN,this.Lz=new Jo;const o=new IF(r,this.Mz);this.Dx=new GD(o,i.allowMixedContent),this.QJ=null!=e?e:new FR(i.isEmbeddable,"10.3.0",DR()),this.rnt=new AN(r,this.QJ,this.cnt,h,i,DR()),this.rnt.qJ().catch(this.hnt),this.tnt=new bD(t),this.tnt.wn(Qh.yn,this.Rs),this.Oz=new PN;const a=new(null!=s?s:Dr)(this.tnt,this.Oz,i);a.Est(t),this.oJ=new oN,this.bJ=new uN;const u=new SC(t,i,this.Dx,this.Mz,this.Lz,a,this.Oz);this.Mz.GY(u);let c=u;c=new aN(c,this.snt),c=new cN(c,this.yJ),this.dnt=c,this.Pa=new Yk(this.dnt),this.Pa.lw(this.fnt),this.int=new dN(this.Pa),this.ent=new QD(this.Pa,this.Dx,this.Mz),this.ant=new uD(this),this.unt=new xD(this.Pa,i.allowNativeFullscreen),this.ont=new DD(this.unt,this.Pa.Aa()),this.tnt._n(),this.Io=new OF(t),this.Bz=new Dr(this.tnt,this.Oz,i,1,[at.Mk]),this.Zst=new BD(this.Bz),this.$st=new _N}};r(),r();var VF=class extends je{get Kst(){return this.vnt()}vnt(){return this.oa.Kst}get Jc(){return this._nt()}_nt(){return this.oa.Jc}get cnt(){return this.oa.cnt}get Jst(){return this.gnt()}gnt(){return this.oa.Jst}get vO(){return this.oa.vO}set vO(t){this.oa.vO=t}get ant(){return this.oa.ant}get GX(){return this.oa.GX}get snt(){return this.oa.snt}get Cd(){return this.oa.Cd}get Wu(){return this.oa.Wu}get Ma(){return this.qP()}qP(){return this.oa.Ma}get Sq(){return this.Aa()}Aa(){return this.oa.Sq}get Dx(){return this.oa.Dx}get VP(){return this.oa.VP}get rnt(){return this.oa.rnt}get yJ(){return this.oa.yJ}get lX(){return this.oa.lX}get ont(){return this.oa.ont}get tnt(){return this.oa.tnt}get Pa(){return this.oa.Pa}get Ql(){return this.oa.Ql}get pnt(){return this.mnt()}mnt(){return this.oa.pnt}get wnt(){return this.ynt()}ynt(){return this.oa.wnt}get JI(){return this.oa.JI}get Io(){return this.oa.Io}get ht(){return this.Mx()}Mx(){return this.oa.ht}Ux(){return this.oa.Ux()}get Vx(){return this.Hx()}set Vx(t){this.Wx(t)}Hx(){return this.oa.Vx}Wx(t){this.oa.Vx=t}get bt(){return this.qx()}qx(){return this.oa.bt}Gx(){return this.oa.Gx()}Xx(t,i){this.oa.Xx(t,i)}nnt(){return this.oa.nnt()}Nd(){return this.oa.Nd()}get xe(){return this.jx()}jx(){return this.oa.xe}get Qx(){return this.Kx()}Kx(){return this.oa.Qx}Yx(){return this.oa.Yx()}Zx(){return this.oa.Zx()}get $x(){return this.tP()}get iP(){return this.eP()}tP(){return this.oa.$x}eP(){return this.oa.iP}get WP(){return this.oa.WP}set WP(t){this.oa.WP=t}get rP(){return this.hP()}hP(){return this.oa.rP}get oP(){return this.aP()}set oP(t){this.uP(t)}aP(){return this.oa.oP}uP(t){this.oa.uP(t)}get lP(){return this.fP()}fP(){return this.oa.lP}get vP(){return this._P()}set vP(t){this.gP(t)}_P(){return this.oa.vP}gP(t){this.oa.vP=t}mP(){return this.oa.mP()}get wP(){return this.yP()}set wP(t){this.bP(t)}yP(){return this.oa.wP}bP(t){this.oa.wP=t}get AP(){return this.TP()}TP(){return this.oa.AP}get Na(){return this.oa.Na}set Na(t){this.oa.Na=t}EP(){return this.oa.EP()}get xP(){return this.PP()}PP(){return this.oa.xP}get nt(){return this.RP()}RP(){return this.oa.nt}get DP(){return this.NP()}NP(){return this.oa.DP}get rt(){return this.BP()}BP(){return this.oa.rt}get MP(){return this.LP()}LP(){return this.oa.MP}get OP(){return this.FP()}set OP(t){this.UP(t)}FP(){return this.oa.OP}UP(t){this.oa.UP(t)}GP(){this.oa.GP()}jP(){this.oa.jP()}QP(){this.oa.QP()}be(){this.oa.be()}we(){this.oa.we()}ds(){return this.oa.ds()}zP(){return this.oa.zP()}$P(){this.oa.$P()}tI(){this.oa.tI()}sI(t){return this.oa.sI(t)}Ea(){this.oa.Ea()}nu(){return this.oa.nu()}Ta(t,i){return this.oa.Ta(t,i)}IP(t,i,e){return this.oa.IP(t,i,e)}CP(){return this.oa.CP()}KP(){return this.oa.KP()}eI(t){return!1}wz(){this.bnt&&this.oa.lw(this.nI)}yz(){this.bnt&&this.oa.mw(this.nI)}async kn(t){this.Vo(),t||await this.oa.kn(),this.yz()}constructor(t,i){super(),this.oa=void 0,this.bnt=void 0,this.nI=t=>{this.eI(t)||this.So(t)},this.oa=t,this.bnt=!i,this.wz()}},Oa=function(t){return t[t.lu=0]="lu",t[t.Ant=1]="Ant",t[t.Snt=2]="Snt",t}({}),HF=vf(3,()=>[]);function Na(t,i){HF[i].push(t)}var da=function(t){return t[t.Tnt=0]="Tnt",t[t.Ant=1]="Ant",t[t.knt=2]="knt",t[t.Ent=3]="Ent",t[t.bC=4]="bC",t}({}),WF=vf(5,()=>[]);function Ma(t,i){WF[i].push(t)}var qF=[];function zF(t){for(const i of qF)i(t)}r();var GF=self.CustomEvent;var XF=function(){try{const t=new GF("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?function(t,i){return new CustomEvent(t,i)}:function(t,i){const e=h.createEvent("CustomEvent");return e.initCustomEvent(t,(null==i?void 0:i.bubbles)||!1,(null==i?void 0:i.cancelable)||!1,null==i?void 0:i.detail),e};r();var jF=new class{get V(){return this.dO.length}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=function(t){const i=[];for(let e=0;e{const e=t.xnt(i);return e&&e.Ca},i}(this)}MI(t){return this.dO[t]}_$(t){this.dO.push(t),this.Ca.push(t.Ca)}pS(t){const i=this.dO.indexOf(t);i<0||(Ra(this.dO,i),this.hu&&Ra(this.hu,i))}xnt(t){for(const i of this.dO)if(i.JI===t)return i}constructor(){this.dO=[],this.hu=void 0}};function QF(t){let i,e;const s=i=>{e=i;const s=ra(i,t.Cd);t.Ta(s)},n={get abr(){return t.Kst.Ca},get ads(){var i;return null==(i=t.Jc)?void 0:i.Ca},get audioTracks(){return t.ht.Ca},get autoplay(){return t.vO},set autoplay(i){t.vO=Boolean(i)},get buffered(){return t.Ux()},get canvas(){return t.ant.Ca},get cast(){var i;return null==(i=t.GX)?void 0:i.Ca},get clip(){return t.snt.Ca},get currentProgramDateTime(){var i;return null!=(i=t.Vx)?i:null},set currentProgramDateTime(i){t.Vx=null!=i?i:void 0},get currentTime(){return t.Gx()},set currentTime(i){t.Xx(Number(i))},get duration(){return t.Nd()},get element(){return t.xe},get ended(){return t.Qx},get error(){return t.Yx()},get errorObject(){return t.Zx()},get loop(){return t.yJ.yJ},set loop(i){t.yJ.yJ=Boolean(i)},get metrics(){return t.rP.Ca},get muted(){return t.oP},set muted(i){t.uP(i)},get network(){return t.lX.Ca},get paused(){return t.lP},get playbackRate(){return t.vP},set playbackRate(i){const e=Number(i);if(e<0)throw new RangeError("playbackRate must be a positive number");t.vP=e},get played(){return t.mP()},get poster(){return t.gi},set poster(i){t.gi=Ts(i)},get preload(){return t.wP},set preload(i){t.wP=function(t){switch(t){case"auto":case"":return"auto";case"metadata":return"metadata";default:return"none"}}(i)},get presentation(){return t.ont.Ca},get readyState(){return t.AP},get seekable(){return t.EP()},get seeking(){return t.xP},get source(){return e},set source(t){s(t)},get src(){return aR(t.nu())},set src(t){s({sources:t})},get textTracks(){return t.nt.Ca},get textTrackStyle(){return t.Ql.Ca},get theoLive(){return t.pnt},get uid(){return t.JI},get videoHeight(){return t.DP},get videoTracks(){return t.rt.Ca},get videoWidth(){return t.MP},get visibility(){return t.Io.Ca},get volume(){return t.OP},set volume(i){t.UP(Number(i))},get latency(){return t.VP.Ca},get theoads(){return t.wnt},get millicast(){return t.iP.Ca},destroy(){t.kn(),t=null,e=void 0},play(){t.Pnt()},pause(){t.jP()},stop(){e=void 0,t.KP()},prepareWithUserAction(){t.GP()},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)},setSource(t){s(t)},addTextTrack:i=>t.sI(function(t){return{Lt:Ts(t.kind),Th:Ts(t.label),bs:Ts(t.language),Km:Ts(t.type)}}(i)).Ca};return i=new tl(n,!0),i.au(t),i.wn("destroy",()=>{i.kn()}),n}r(),r(),r(),r();var KF=class extends gp{constructor(t){super(d.do),this.source=void 0,this.source=t}};r();var YF=class extends je{get Vx(){}set Vx(t){}get zx(){return this.Gx()}set zx(t){this.Xx(t)}Gx(){return this.xz}nnt(){return this.Gx()}Xx(t,i){this.Pz&&this.xz===t||(this.xz=t,this.Pz=!0,this.So(new ji(this.xz)))}get lP(){return this.Cz}get vP(){return this.Rz}set vP(t){this.Rz!==t&&(this.Rz=t,this.So(new Ik(this.xz,this.vP)))}get AP(){return Lr.zL}get xP(){return this.Pz}QP(){this.Cz&&(this.Cz=!1,this.So(new vt(this.xz)),this.So(new SP(this.xz)))}jP(){this.Cz||(this.Cz=!0,this.So(new B(this.xz,this.Vx)),this.So(new Si(this.xz)))}hr(){this.xz=0,this.Pz=!1,this.Rz=1,this.jP()}kn(){this.Vo()}we(){}be(){}constructor(){super(),this.xz=void 0,this.Cz=void 0,this.Pz=void 0,this.Rz=void 0,this.xz=0,this.Cz=!0,this.Pz=!1,this.Rz=1}};r();var JF={zIndex:"1",display:"inline-block",verticalAlign:"middle",backgroundRepeat:"no-repeat",backgroundPosition:"50% 50%",backgroundSize:"contain",cursor:"pointer",margin:"0",padding:"0",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",height:"100%"},ZF={visibility:"hidden"},$F={visibility:"visible"},tU=class{get Yu(){return void 0!==this.Int?this.Int:void 0!==this.Cnt?this.Cnt:void 0}set Rnt(t){this.Cnt=t,this.er()}er(){const t=this.oa.lP,i=this.Dnt;this.Yu?this.Ls.style.backgroundImage='url("'+up(this.Yu)+'")':this.Ls.style.backgroundImage="",t&&this.Yu&&!i?this.be():this.we()}be(){Bl(ZF,this.oa.xe),Bl($F,this.Ls)}we(){Bl(ZF,this.Ls),Bl($F,this.oa.xe)}wz(){this.oa.wn(d.do,this.Nnt),this.oa.wn(d.uo,this.HV)}kn(){this.oa.mn(d.do,this.Nnt),this.oa.mn(d.uo,this.HV),Ao(this.Ls)}constructor(t){this.Ls=void 0,this.oa=void 0,this.Dnt=!1,this.Int=void 0,this.Cnt=void 0,this.Nnt=t=>{var i;this.Dnt=!this.oa.lP,this.Int=null==(i=t.source)?void 0:i.poster,this.er()},this.HV=()=>{this.Dnt=!0,this.we()},this.oa=t,this.wz(),this.Ls=function(){const t=s&&s.document&&s.document.createElement("div");return t.className="theoplayer-poster",Bl(JF,t),t}(),t.xe.appendChild(this.Ls)}};r(),r(),r(),r();var Hu=function(t){return t[t.Bnt=0]="Bnt",t[t.Mnt=1]="Mnt",t}({});function iU(t){let i;const e={get playing(){return t.zc},get currentAds(){return t.Lnt.map(t=>t.Ont())},get currentAdBreak(){var i,e;return null!=(e=null==(i=t.Fnt)?void 0:i.Ont())?e:null},get scheduledAds(){return t.Unt.map(t=>t.Ont())},get scheduledAdBreaks(){return t.Vnt.map(t=>t.Ont())},skip(){t.uD()},skipAdBreak(i){t.Hnt(null!=i?i:void 0)},schedule(i){const e=mR(i,va.Bg);e?t.W6(e,Hu.Bnt,!1):console.error("Invalid ad description")},registerServerSideIntegration(i,e){t.Wnt(i,e)},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new le(t,e),e}var eU=class extends je{get zc(){return!!this.qc&&this.qc.zc}get Lnt(){return this.qc?this.qc.Lnt:[]}get Fnt(){return this.qc?this.qc.Fnt:null}get Unt(){return this.qc?this.qc.Unt:[]}get Vnt(){return this.qc?this.qc.Vnt:[]}W6(t,i,e){var s;null==(s=this.qc)||s.W6(t,i,e)}qnt(t){var i;null==(i=this.qc)||i.qnt(t)}uD(){var t;null==(t=this.qc)||t.uD()}Hnt(t){var i;null==(i=this.qc)||i.Hnt(t)}znt(t){var i;null==(i=this.qc)||i.znt(t)}Wnt(t,i){var e;null==(e=this.qc)||e.Wnt(t,i)}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=iU(this)}async kn(t){this.Vo(),void 0!==this.qc&&(this.qc.mw(this.Rs),t||await this.qc.kn(),this.qc=void 0)}constructor(t){var i;super(),this.qc=void 0,this.hu=void 0,this.qc=t,null==(i=this.qc)||i.lw(this.Rs)}};r(),r();var sU=class extends Oi{constructor(t,i){super(t),this.od=void 0,this.od=i}},Ke=class extends gp{constructor(t,i){super(t),this.adBreak=void 0,this.adBreak=i}},nU=class extends sU{xa(){return new rU(this.od.Ont())}constructor(t){super("Gnt",t)}},rU=class extends Ke{constructor(t){super("removeadbreak",t)}};r();var vn=class extends sU{xa(){return new hU(this.od.Ont())}constructor(t){super("Xnt",t)}},hU=class extends Ke{constructor(t){super("addadbreak",t)}};r(),r();var oU=class extends Oi{constructor(t,i){super(t),this.jnt=void 0,this.jnt=i}},aU=class extends gp{constructor(t,i){super(t),this.ad=void 0,this.ad=i}},cn=class extends oU{xa(){return new uU(this.jnt.Ont())}constructor(t){super("Qnt",t)}},uU=class extends aU{constructor(t){super("addad",t)}};r();var Za=class extends sU{xa(){return new cU(this.od.Ont())}constructor(t){super("Knt",t)}},cU=class extends Ke{constructor(t){super("adbreakend",t)}};r();var Ta=class extends sU{xa(){return new dU(this.od.Ont())}constructor(t){super("Ynt",t)}},dU=class extends Ke{constructor(t){super("adbreakbegin",t)}};r();var nc=class extends oU{xa(){return new lU(this.jnt.Ont(),this.currentTime)}constructor(t,i){super("Jnt",t),this.currentTime=void 0,this.currentTime=i}},lU=class extends aU{constructor(t,i){super("adbegin",t),this.currentTime=void 0,this.currentTime=i}};r();var fc=class extends oU{xa(){return new fU(this.jnt.Ont(),this.currentTime)}constructor(t,i){super("Znt",t),this.currentTime=void 0,this.currentTime=i}},fU=class extends aU{constructor(t,i){super("adend",t),this.currentTime=void 0,this.currentTime=i}};r();var vU=class extends Oi{xa(){return new _U}constructor(){super("$nt")}},_U=class extends gp{constructor(){super("adadded")}},gU=class extends eU{get OI(){return this.qc}set OI(t){const i=this.qc;if(i===t)return;const e=this.Lnt,s=this.Fnt,n=this.Unt,r=this.Vnt;null==i||i.mw(this.Rs),this.qc=t,null==t||t.lw(this.Rs);const h=this.Lnt,o=this.Fnt,a=this.Unt,u=this.Vnt,c=[];let d=!1;for(const t of r)Ct(u,t)||c.push(new nU(t));for(const t of u)Ct(r,t)||c.push(new vn(t));for(const t of a)Ct(n,t)||(c.push(new cn(t)),d=!0);d&&c.push(new vU),s!==o&&(s&&c.push(new Za(s)),o&&c.push(new Ta(o)));for(const t of e)Ct(h,t)||c.push(new fc(t,this.oa.Gx()));for(const t of h)Ct(e,t)||c.push(new nc(t,this.oa.Gx()));for(const t of c)this.So(t)}constructor(t){super(void 0),this.oa=void 0,this.oa=t}};r(),r();var pU=class extends je{get Ca(){var t;return null!=(t=this.hu)?t:this.hu=iU(this)}znt(t){}Wnt(t,i){}W6(t,i,e){}uD(){}Hnt(t){}qnt(t){}kn(){return this.Vo(),Promise.resolve()}constructor(...t){super(...t),this.zc=!1,this.Fnt=null,this.Lnt=[],this.Vnt=[],this.Unt=[],this.hu=void 0}},st=class extends pU{W6(t,i,e){this.trt.push({irt:t,ert:i,nrt:e})}uD(){}znt(t){}Wnt(t,i){this.rrt.push({IC:t,hrt:i})}qnt(t){const i=this.rrt.slice(),e=this.trt.slice();this.hr();for(const e of i)t.Wnt(e.IC,e.hrt);for(const i of e)t.W6(i.irt,i.ert,i.nrt)}ort(){const t=this.trt.map(t=>t.irt);return this.hr(),t}hr(){Wt(this.rrt),Wt(this.trt)}async kn(){this.hr(),await super.kn()}constructor(...t){super(...t),this.rrt=[],this.trt=[]}};r();var mU=class extends gp{constructor(t){super("tizen2retry"),this.originalErrorEvent=void 0,this.originalErrorEvent=t}};var wU=Oc(()=>{let t=UF;t=function(t){return class extends VF{constructor(i,e){let s=new t(i,e);for(const t of WF)for(const i of t)s=i(s);super(s)}}}(t);let i=function(t){return class extends je{get cnt(){return this.art.cnt}get Jc(){return this.qc}get ant(){return this.art.ant}get Cd(){return this.art.Cd}get Dx(){return this.art.Dx}get Ma(){return this.art.Ma}get Sq(){return this.art.Sq}get ont(){return this.art.ont}get tnt(){return this.art.tnt}get Pa(){return this.art.Pa}get Kst(){return this.art.Kst}get vO(){return this.art.vO}set vO(t){this.art.vO=t,this.urt()}get Jst(){return this.art.Jst}get ht(){return this.art.ht}get GX(){return this.art.GX}get Wu(){return this.art.tnt}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}get $x(){return this.art.$x}get iP(){return this.art.iP}get WP(){return this.art.WP}set WP(t){this.art.WP=t}get rP(){return this.art.rP}get lX(){return this.art.lX}get nt(){return this.art.nt}get Ql(){return this.art.Ql}get rt(){return this.art.rt}get snt(){return this.art.snt}get yJ(){return this.art.yJ}get Vx(){return this.oa.Vx}set Vx(t){this.oa.Vx=t}get bt(){return this.art.bt}get xe(){return this.art.xe}get Qx(){return this.art.Qx}get oP(){return this.art.oP}set oP(t){this.uP(t)}get lP(){return this.oa.lP}get gi(){return this.crt.Yu||""}set gi(t){this.crt.Rnt=t}get vP(){return this._P()}set vP(t){this.gP(t)}_P(){return this.art.vP}gP(t){this.oa.vP=t}get wP(){return this.art.wP}set wP(t){this.art.wP=t}get AP(){return this.oa.AP}get Na(){return this.art.Na}set Na(t){this.art.Na=t}get xP(){return this.oa.xP}get pnt(){return this.art.pnt}get wnt(){return this.art.wnt}get JI(){return this.art.JI}get DP(){return this.art.DP}get MP(){return this.art.MP}get OP(){return this.art.OP}set OP(t){this.UP(t)}get VP(){return this.art.VP}get rnt(){return this.art.rnt}get Io(){return this.art.Io}async Zo(t,i){return this.ta.Zo(t,i).catch(bu)}async drt(t,i){fr(i),this.art.lw(this.lrt);try{await this.art.Ta(t,i)}finally{this.art.mw(this.lrt)}}async urt(){const t=await this.frt();this.vrt(t)}async frt(){const t=this.nu();return t&&!Uu(t)&&this.vO&&this.lP?this.Jst.XK(this.oP):"none"}vrt(t){var i;const e=(null==(i=this.nu())?void 0:i.mutedAutoplay)||this.Cd.mutedAutoplay;switch(t){case"all":this.Pnt();break;case"muted":(this.oP||e===Dk.ALL)&&(this.oP=!0,this.QP())}}Ta(t){Uu(this.bz)||this.So(new ho(0,Lr.zL)),this.hr(),this.bz=t,Wr(this.Zo(async i=>{fr(i);try{await this.drt(t,i)}catch(t){return sa(t),this.bz=void 0,void this.Qq(bb(t,me.SOURCE_NOT_SUPPORTED))}finally{this._rt(this.art)}const e=await this.frt();this.So(new KF(this.nu())),this.vrt(e)}))}Xx(t,i){this.oa.Xx(t,i)}Yx(){var t;return null!=(t=this.Wz)?t:this.art.Yx()}Zx(){var t;return null!=(t=this.nq)?t:this.art.Zx()}Qq(t){void 0===this.Zx()&&(this.nq=t,this.Wz=ar(t),this.So(new el(t)))}QP(){this.oa.QP()}Pnt(){this.oP||this.GP(),this.QP()}GP(){this.art.GP()}jP(){this.oa.jP()}KP(){this.Ta(void 0)}be(){this.kz=!0,this.oa.be()}we(){this.kz=!1,this.oa.we()}Ea(){this.art.Ea()}UP(t){this.art.UP(t)}uP(t){this.art.uP(t)}Ba(t){this.grt=t,t._$(this)}ds(){return this.art.ds()}nu(){return this.bz}zP(){return this.art.zP()}Gx(){return this.oa.Gx()}nnt(){return this.oa.nnt()}Nd(){return this.art.Nd()}Ux(){return this.art.Ux()}mP(){return this.art.mP()}EP(){return this.art.EP()}$P(){this.art.$P()}tI(){this.art.tI()}sI(t){return this.art.sI(t)}hr(){this.bz=void 0,this.nq=void 0,this.Wz=void 0,this.prt=!0,Wt(this.mrt),this.wrt.hr(),this._rt(this.wrt),this.ta.Zg(),Wr(this.ta.Zo(async t=>{fr(t),await this.art.KP()}))}kn(){this.So(new FF),this.crt.kn(),this.yz(),this.hr(),Wr(this.Zo(async()=>{await this.art.kn(),this.grt&&(this.grt.pS(this),this.grt=void 0),this.ta.kn()})),this.Vo()}_rt(t){if(this.oa===t)return;const i=this.oa.lP,e=this.oa.Gx(),s=this.oa.vP,n=this.oa.AP,r=this.oa.xP;this.yrt=i,this.Z7=n,this.yz(),t.lw(this.brt),t===this.art?(void 0!==this.qc&&(this.qc.OI=t.Jc,this.Art.qnt(this.qc)),(r||t.Gx()!==e)&&t.Xx(e),t.vP!==s&&(t.vP=s),i?t.jP():t.QP()):(void 0!==this.qc&&(this.qc.OI=this.Art,this.Art.hr()),this.Cd.retainPlaybackRateOnSourceChange?t.vP=s:1!==s&&this.So(new Ik(this.Gx(),1))),t.mw(this.brt),this.oa=t,this.wz();for(const t of this.mrt)this.So(t);Wt(this.mrt),this.kz?t.be():t.we()}wz(){this.oa.lw(this.iI)}yz(){this.oa.mw(this.iI)}xa(){return QF(this)}constructor(i,e){super(),this.oa=void 0,this.art=void 0,this.wrt=void 0,this.crt=void 0,this.grt=void 0,this.ta=void 0,this.mrt=void 0,this.yrt=!0,this.Z7=Lr.zL,this.kz=void 0,this.prt=!1,this.bz=void 0,this.nq=void 0,this.Wz=void 0,this.qc=void 0,this.Art=void 0,this.hu=void 0,this.lrt=t=>{t.type!==d.Kw&&this.mrt.push(t)},this.brt=t=>{(t.type!==d.uo||this.oa.lP)&&(t.type===d.jw&&this.oa.lP||t.type===d.$w&&this.oa.xP&&this.oa.Gx()===t.currentTime||t.type===d.Kw&&this.oa.vP===t.playbackRate||this.So(t))},this.iI=t=>{if(this.prt){if(t.type===Jr.xM)return;t.type!==Jr.SM&&t.type!==Jr.PM||(this.prt=!1)}if(t.type===d.uo){if(!this.yrt)return;this.yrt=!1}else if(t.type===d.jw){if(this.yrt)return;this.yrt=!0}else if(t.type===Jr.AI){if(this.Z7===t.readyState)return;this.Z7=t.readyState}else if(t.type===d.Iw)return;this.So(t)},this.art=new t(i,e),this.wrt=new YF,this.oa=this.art,this.crt=new tU(this),this.art.Jc&&(this.qc=new gU(this),this.qc.OI=this.art.Jc,this.Art=new st),this.ta=new Zn,this.mrt=[],this.kz=!0,this.wz()}}}(t);return zs.w_&&zs.b_<3&&(i=function(t){return class extends t{Ta(t){this.Srt=0,super.Ta(t)}So(t){if(t.type===hc.ma&&this.Srt<3)return this.Srt++,super.So(new mU(t)),void super.Ta(this.nu());super.So(t)}constructor(...t){super(...t),this.Srt=0}}}(i)),i=function(t){let i=t;for(const t of HF)for(const e of t)i=e(i);return i}(i),i});function yU(t,i){const e=Bk(i),s=new(wU())(t,e);s.Na=s;let n=s.Ca;return s.Ea(),s.Ba(jF),w.defineProperty(n,"constructor",{value:yU}),n=SS(n),zF(s),n}Ht(()=>{self.dispatchEvent&&self.dispatchEvent(XF("theoplayerready"))}),r();var bU={base64:new class{encode(t){return wa(t)}decode(t){return Cn(t)}}};r();var AU=JSON.parse('["hbbtv","dash","hesp","millicast","hls","chromecast","ads","theoads","airplay","spotx","vr","cache","webaudio","youbora","mediamelon","moat","google-dai","streamone","lcevc","freewheel","agama","uplynk","mediatailor","ui","relatedcontent","social","upnext","contextmenu","texttrackstyle-ui","activequalitylabel","upcomingadnotification"]');r(),r(),r();var SU=class{get zx(){const t=this.oa.currentTime;return isFinite(t)?t:"now"}get Trt(){return this.oa.src||""}hr(){}constructor(t,i){this.oa=void 0,this.krt=void 0,this.Ert=!1,this.xrt=t=>{this.krt.yQ(t.error,this.zx)},this.Prt=()=>{this.krt.gQ(this.Trt),this.oa.removeEventListener("playing",this.Prt),this.Ert=!1},this.Ms=()=>{var t,i,e,s;this.Ert||(this.oa.addEventListener("playing",this.Prt),this.Ert=!0),null==(t=this.oa.ads)||t.removeEventListener("adbegin",this.Irt),null==(i=this.oa.theoads)||i.removeEventListener("interstitialbegin",this.Crt);var n,r;(null==(s=this.oa.source)||null==(e=s.ads)?void 0:e.some(t=>"theoads"===t.integration))&&(null==(n=this.oa.ads)||n.addEventListener("adbegin",this.Irt),null==(r=this.oa.theoads)||r.addEventListener("interstitialbegin",this.Crt))},this.Irt=t=>{"theoads"!==t.ad.integration||t.ad.isSlate||this.krt.wQ("ad")},this.Crt=t=>{const i=t.interstitial;(function(t){return"adbreak"===t.type})(i)||this.krt.wQ(function(t){switch(t){case"adbreak":default:return"ad";case"overlay":return"overlay"}}(i.type))},this.krt=i,this.oa=t,this.oa.addEventListener("error",this.xrt),this.oa.addEventListener("sourcechange",this.Ms),this.Ms()}};!function(t){qF.push(t)}(function(t){new SU(t.Ca,t.cnt)}),r();var TU="theoplayer-stored-volume",kU="theoplayer-stored-mutedstate";Na(function(t){return class extends t{uP(t){this.Cd.persistVolume&&cu.Gy(kU,""+Boolean(t)),super.uP(t)}UP(t){this.Cd.persistVolume&&cu.Gy(TU,""+Number(t)),super.UP(t)}constructor(t,i){if(super(t,i),i.persistVolume){let t=cu.HJ(TU);(void 0===t||S(t))&&(t=1);const i=cu.WJ(kU)||!1;this.OP=t,this.oP=i}}}},Oa.lu);var EU="10.3.0",xU=jF.Ca,PU=A.VC.registerContentProtectionIntegration.bind(A.VC);r(),r();zs.k_&&zs.x_?MD(class{XK(t){return Promise.resolve("all")}GP(){}kn(){}}):MD(ND),r(),r(),r(),r();var IU=class{async Jq(t){return tu(t.type)}async Zq(t){return!!await VT(t,!0)}},CU=class extends IU{async Jq(t){return!!fv(t.useManagedMediaSource)&&super.Jq(t)}};function RU(t){return NN(t)}function DU(t){const i=zs.S_||zs.w_,e=void 0!==t&&void 0!==t.preferredAudioCodecs&&t.preferredAudioCodecs.some(t=>"ac-3"===t||"ec-3"===t),s=i&&!e,n=new lv(!0);return async t=>{const i=t.GT;if(!n.Fp(i)&&!function(t,i){return!!t&&(To(t)?sP(i)||rP(i):nl(t,Yy)||nl(t,Zy)||nl(t,Ky))}(t.lQ,t.Rrt))return!1;const e=t.Rrt.some(t=>"ac-3"===t||"ec-3"===t);if(s&&e)return!1;if(t.NW){const e=t.NW,s=hs(e,t=>sp(t.x8)).filter(it),n=await async function(t,i){for(const e of t)if(await i(e))return!0;return!1}(s,t=>zd.Sm(t,i));if(!n)return!1}return!0}}r(),r(),r(),r();var NU=class{get Mi(){return this.Drt.offsetHeight*zd.Zs.fp}get Ti(){return this.Drt.offsetWidth*zd.Zs.fp}constructor(t){this.Drt=void 0,this.Drt=t}};r(),r();var Ea=class{Yq(t){return this.MW.Yq(t)}Pst(t){return this.MW.Pst(t)}Dq(t){return this.MW.Dq(t)}constructor(t){this.MW=void 0,this.MW=t}};function BU(t){return class extends t{get hq(){return this.PL.hq}}}r(),r(),r(),r(),r();var MU=class{get Cd(){return this.NS()}NS(){return this.aq.Cd}get kP(){return this.EP()}EP(){return this.aq.kP}IZ(t){return this.aq.IZ(t)}RZ(t){return this.aq.RZ(t)}zg(){return Promise.resolve()}constructor(t){this.aq=void 0,this.aq=t}},ja=class extends MU{get e4(){return this.B4}get s4(){return this.M4}get Fx(){return this.Ux()}Ux(){return this.aq.Fx}get ct(){return this.Nd()}Nd(){return this.aq.ct}get jZ(){return this.Nrt()}Nrt(){return this.aq.jZ}F4(t){this.aq.F4(t)}W4(t,i,e,s){this.aq.W4(t,i,e,s)}F3(){this.aq.F3()}I3(){this.aq.I3()}zg(){return this.B4&&(this.B4.zg(),this.B4=void 0),this.M4&&(this.M4.zg(),this.M4=void 0),super.zg()}Brt(t){this.aq=t,this.B4?t.e4?this.B4.Mrt(t.e4):(this.B4.zg(),this.B4=void 0):t.e4&&(this.B4=this.Lrt(t.e4),this.B4.wn(MN,this.Ort)),this.M4?t.s4?this.M4.Mrt(t.s4):(this.M4.zg(),this.M4=void 0):t.s4&&(this.M4=this.Lrt(t.s4),this.M4.wn(MN,this.Ort))}NZ(t){this.aq.NZ(t)}Frt(t){}constructor(t){super(t),this.B4=void 0,this.M4=void 0,this.Ort=t=>this.Frt(t)}};r(),r(),r();var LU=class extends Ne{get zY(){return this.ZY}set zY(t){this.ZY=t}get Fx(){return Uo.rL()}get Cd(){return this.ZS}get V3(){return at.yk}get W3(){return Uo.rL()}get Urt(){return!1}get VY(){return this.KY}set VY(t){this.KY=t}Q2(t,i,e){return Promise.reject(new m("Invalid media buffer"))}j3(){return Promise.reject(new m("Invalid media buffer"))}J2(t,i,e){return Promise.reject(new m("Invalid media buffer"))}jZ(){return!1}F3(){}G3(t,i){}X3(t,i){}pS(t,i,e){return Promise.resolve()}f3(t,i){return Promise.reject(new m("Invalid media buffer"))}SO(t,i){return Promise.reject(new m("Invalid media buffer"))}IZ(t){return!1}RZ(t){return Promise.reject(new m("Invalid media buffer"))}zg(){this.Vo()}constructor(t){super(),this.ZS=void 0,this.KY=0,this.ZY=0,this.ZS=t}},Da=class extends Ne{get zY(){return this.Vrt()}set zY(t){this.Hrt(t)}Vrt(){return this.Wrt.zY}Hrt(t){this.Wrt.zY=t}get Fx(){return this.Ux()}Ux(){return this.Wrt.Fx}get Cd(){return this.NS()}NS(){return this.Wrt.Cd}get V3(){return this.Wrt.V3}get W3(){return this.qrt()}qrt(){return this.Wrt.W3}get VY(){return this.zrt()}set VY(t){this.Grt(t)}zrt(){return this.Wrt.VY}Grt(t){this.Wrt.VY=t}Q2(t,i,e){return this.Wrt.Q2(t,i,e)}j3(){return this.Wrt.j3()}J2(t,i,e){return this.Wrt.J2(t,i,e)}G3(t,i){this.Wrt.G3(t,i)}X3(t,i){this.Wrt.X3(t,i)}pS(t,i,e){return this.Wrt.pS(t,i,e)}f3(t,i){return this.Wrt.f3(t,i)}IZ(t){return this.Wrt.IZ(t)}RZ(t){return this.Wrt.RZ(t)}iI(t){this.So(t)}zg(){this.Vo(),this.Mrt(new LU(this.Cd))}Mrt(t){this.Wrt.mn(MN,this.Xrt),this.Wrt=t,this.Wrt.wn(MN,this.Xrt)}constructor(t){super(),this.Wrt=void 0,this.Xrt=t=>this.iI(t),this.Wrt=t,this.Wrt.wn(MN,this.Xrt)}},OU=class extends Da{get Tst(){return this.PL}set Tst(t){this.PL=t}async Q2(t,i,e){return fr(e),await this.jrt(this.PL.zx,null==i?void 0:i.Get,null==i?void 0:i.ct),fr(e),t.Km===We.MT?await this.Qrt(t,i,e):await this.Krt(t,i,e)}async Qrt(t,i,e){let s=t;for(;;){const[t,n]=eA(s.lk);s={Km:We.MT,lk:t};try{return await this.Yrt(s,i,e),void n.cancel(new Qc).catch(gs)}catch(t){if(YD(t)){if(await this.jrt(this.PL.zx,i.Get,i.ct,e)){s={Km:We.MT,lk:n};continue}}throw n.cancel(t).catch(gs),t}}}async Krt(t,i,e){for(;;)try{return fr(e),await this.Yrt(t,i,e)}catch(t){if(YD(t)){if(await this.jrt(this.PL.zx,i.Get,i.ct,e))continue}throw t}}async jrt(t,i,e,s){const n=KD(t,i,e,this.Fx,this.VY,this.zY);for(const[t,i]of n)await this.Jrt(t,i,s);return n.length>0}Yrt(t,i,e){return super.Q2(t,i,e)}Jrt(t,i,e){return super.pS(t,i,e)}constructor(t){super(t),this.PL=void 0}},FU=class extends ja{get Tst(){return this.PL}set Tst(t){this.PL=t,this.B4&&(this.B4.Tst=t),this.M4&&(this.M4.Tst=t)}Lrt(t){const i=new OU(t);return i.Tst=this.PL,i}constructor(t){super(t),this.PL=void 0,this.Brt(t)}};r();var Ia=class extends MU{get wP(){return this.aq.wP}set wP(t){this.aq.wP=t}};function ft(t){return class extends t{get hq(){return this.PL.hq}get MP(){return this.PL.MP}get DP(){return this.PL.DP}zP(){return this.PL.zP()}}}r(),r(),r();var UU=class extends Ne{get Zrt(){return this.PL}get Fx(){return this.Ux()}Ux(){return this.PL.Fx}get Vx(){return this.Hx()}Hx(){return this.PL.Vx}get zx(){return this.Gx()}Gx(){return this.PL.zx}get Wu(){return this.PL.Wu}get ct(){return this.Nd()}Nd(){return this.PL.ct}get uq(){return this.$rt()}$rt(){return this.PL.uq}get Qx(){return this.tht()}tht(){return this.PL.Qx}get lt(){return this.PL.lt}get Mi(){return this.PL.Mi}get Ti(){return this.PL.Ti}get Ma(){return this.qP()}qP(){return this.PL.Ma}get Sq(){return this.Aa()}Aa(){return this.PL.Sq}get oP(){return this.PL.oP}set oP(t){this.PL.oP=t}get lP(){return this.iht()}iht(){return this.PL.lP}get vP(){return this.PL.vP}set vP(t){this.PL.vP=t}get pP(){return this.mP()}mP(){return this.PL.pP}get AP(){return this.TP()}TP(){return this.PL.AP}get kP(){return this.EP()}EP(){return this.PL.kP}get xP(){return this.PP()}PP(){return this.PL.xP}get n5(){return this.eht()}eht(){return this.PL.n5}get _5(){return this.sht()}sht(){return this.PL._5}get nt(){return this.RP()}RP(){return this.nht}get Ql(){return this.Ett()}Ett(){return this.PL.Ql}get a9(){return this.PL.a9}get OP(){return this.PL.OP}set OP(t){this.PL.OP=t}get j7(){return this.PL.j7}get sP(){return this.PL.sP}get ML(){return this.PL.ML}get Rq(){return this.rht()}set Rq(t){this.hht(t)}rht(){return this.PL.Rq}hht(t){this.PL.Rq=t}get J7(){return this.PL.J7}set J7(t){this.oht(t)}oht(t){this.PL.J7=t}get T8(){return this.aht()}aht(){return this.PL.T8}hP(){return this.PL.hP()}QP(){return this.PL.QP()}jP(){this.PL.jP()}Oy(t,i,e){this.PL.Oy(t,i,e)}$W(t){this.PL.$W(t)}be(){this.PL.be()}we(){this.PL.we()}sI(t,i,e,s,n,r,h,o){return this.PL.sI(t,i,e,s,n,r,h,o)}Tq(t){return this.PL.Tq(t)}wq(){return this.PL.wq()}bq(t,i,e,s,n){return this.PL.bq(t,i,e,s,n)}rV(t){this.PL.rV(t)}Eq(){this.PL.Eq()}$Z(t){return this.PL.$Z(t)}V9(t){return this.PL.V9(t)}async Un(t){const i=await this.PL.Un(t);let e;return e=t.Km===O.AV?this.uht(i):this.cht(i),this.aq=e,e}async hr(){this.aq&&(await this.aq.zg(),this.aq=void 0),await this.PL.hr()}F8(){return this.PL.F8()}G7(){this.PL.G7()}X7(){this.PL.X7()}async zg(){this.Vo(),this.PL.mn(RN,this.dht),this.nht.OI=void 0,this.nht.kn(),this.aq&&(await this.aq.zg(),this.aq=void 0)}K7(){this.PL.K7()}fht(t){this.PL.mn(RN,this.dht),this.PL=t,this.nht.OI=t.nt,this.PL.wn(RN,this.dht)}iI(t){this.So(t)}constructor(t){super(),this.PL=void 0,this.aq=void 0,this.nht=new ai,this.dht=t=>this.iI(t),this.PL=t,this.nht.OI=t.nt,this.PL.wn(RN,this.dht)}},pn=class extends UU{get Zrt(){return this.PL}get hq(){return this.PL.hq}get d5(){return this.PL.d5}get WP(){return this.PL.WP}set WP(t){this.PL.WP=t}Y7(t){this.PL.Y7(t)}$P(){this.PL.$P()}constructor(t){super(t)}},VU=class extends pn{cht(t){const i=new FU(t);return i.Tst=this,i}uht(t){return new Ia(t)}},HU=class extends(BU(VU)){constructor(t){super(t)}},WU=class extends(ft(VU)){constructor(t){super(t)}},qs=class extends Ea{Yq(t){return t===at.Mk?new WU(super.Yq(t)):t===at.Bk?new HU(super.Yq(t)):void 0}async Dq(t){const i=t;await i.zg(),await super.Dq(i.Zrt)}};r();var qU=class{vht(){this.oa.tI()}kn(){s.removeEventListener("pageshow",this._ht)}constructor(t){this.oa=void 0,this._ht=t=>{t.persisted&&this.vht()},this.oa=t,s.addEventListener("pageshow",this._ht)}};r(),r(),r(),r(),r();var zU=class{ght(t,i,e){return Promise.resolve()}pht(t,i,e,s){let n=[];if(s){const r={TU:i.CO,kU:i.RO,EU:e.mht.EU};s.Km===nh.TTML?n=Fx(t,s,r,e.lQ):s.Km===nh.WEBVTT&&(n=ix(t,r,this.wht).L)}return n}hr(){}constructor(t){this.wht=void 0,this.wht=t}};r(),r(),r();var ki=function(t){return t.PR="vttc",t.yht="vsid",t.bht="iden",t.Aht="ctim",t.Sht="sttg",t.Tht="payl",t.kht="vtte",t.Eht="vtta",t}({}),GU=class t{static xht(i){return Boolean(t.Pht[i])}static PD(i){const e=[],s=ha.lD(new yu(i,new oi));for(const i of s)t.xht(i.Km)&&e.push(t.Pht[i.Km](i.lk));return e}static Iht(i){const e=ha.lD(i),s=ls(e,ki.yht),n=ls(e,ki.bht),r=ls(e,ki.Aht),h=ls(e,ki.Sht),o=ls(e,ki.Tht);return{Km:ki.PR,Cht:s?t.Rht(s):void 0,Dht:n?t.Nht(n):void 0,Bht:r?t.Mht(r):void 0,Lht:h?t.Oht(h):void 0,Fht:o?t.Uht(o):void 0}}static Rht(t){return{Km:ki.yht,Vht:t.sD()}}static Nht(t){return{Km:ki.bht,Dht:t.aD()}}static Mht(t){return{Km:ki.Aht,Hht:t.aD()}}static Oht(t){return{Km:ki.Sht,Wht:t.aD()}}static Uht(t){return{Km:ki.Tht,qht:t.aD()}}static zht(t){return{Km:ki.kht}}static Ght(t){return{Km:ki.Eht,Xht:t.aD()}}};GU.Pht={[ki.PR]:GU.Iht,[ki.kht]:GU.zht,[ki.Eht]:GU.Ght};var XU=class{ght(t,i,e){const s=new DataView(t.jht),n=Hn.PD(s),r=hh(n,t=>t.Km===ui.HC);return r&&(this.Qht=r.Z[0].$D.yD.jD),Promise.resolve()}pht(t,i,e){if(S(this.Qht))return[];const s=dh(t),n=Hn.PD(s),r=wT(n,ui.NR),h=wT(n,ui.WR);if(!r||0===r.Z.length||!h)return[];const o=function(t,i,e){const s=t.Z[0],n=s.KB?s.KB.KB.toNumber()/e:i.CO,r=[];for(const t of s.QB)r.push(...t.iM);return{Kht:n,iM:r}}(r,i,this.Qht),a=e.mht.EU;return function(t,i,e,s){const n=GU.PD(dh(i.lk)),r=t.iM,h=t.Kht+s,o=[];let a=0;for(let t=0;tt.jM(i,e,!1,!1));return t.HM(e)}function KU(t,i){const e=i.Mn(t.OM()).YM((i,e)=>t.Cr(e));return t.HM(e)}r(),r(),r(),r();var jt=function(t){return t.Fot="Uot",t.Vot="Hot",t}({});r();var mn=class extends Qr{constructor(t,i,e){super("Wot"),this.Tn=void 0,this.An=void 0,this.qot=void 0,this.Tn=t,this.An=i,this.qot=e}},YU=class extends gp{constructor(){super("zot")}},JU=[d.ly,d._y,d.ey,d.iy,d.Sw],ZU=class extends Ne{get Got(){var t,i;return(null==(t=this.jot.Xot)?void 0:t.qot)||(null==(i=this.jot.Qot)?void 0:i.qot)}get Kot(){return this.Yot}set Jot(t){this.jot.Jot=t}get Jot(){return this.jot.Jot}get dk(){return this.Zot}$ot(t){this.Zot!==t&&(this.Zot=t,this.So(new YU))}get iat(){return this.Yot.Ht.iat}get lt(){return this.nq}async Tn(t){if(!this.eat&&!this.sat)return;const i=this.ww("zot");this.eat?(this.nat.Zg(),this.nat=new Zc,Cu(this.rat(this.nat.Yg),this.nat)):(this.oat.Qy(void 0),this.oat=new Ga),await i}get eat(){return"aat"===this.Zot}get sat(){return"uat"===this.Zot}get dat(){return"fat"===this.Zot}get vat(){return"_at"===this.Zot}async KP(t){if(this.dat||this.sat)for(0,this.nat.Zg();!this.eat&&!this.vat;)await this.ww("zot")}async hr(t){this.vat?(this.nq=void 0,this.$ot("aat")):await this.KP(t),this.jot.hr(),this.Yot.hr()}Qq(t){this.nq=t,this.$ot("_at"),this.So(new el(t))}gat(){this.pat(),this.W8.wn(d.py,this.bd),this.W8.wn([d.$w,d.Fw],this.Je),this.jot.wn(JU,this.Rs),this.mat.wn(jt.Fot,this.bd)}pat(){this.W8.mn(d.py,this.bd),this.W8.mn([d.$w,d.Fw],this.Je),this.jot.mn(JU,this.Rs),this.mat.mn(jt.Fot,this.bd)}async wat(t){this.pat(),this.yat.Zg(),await this.KP(null!=t?t:Pc.wot),this.jot.hr()}async bat(t){this.gat(),await this.Tn(null!=t?t:Pc.eot)}Aat(t,i,e){if(this.eat)for(const s of t.Yot.Sat())s.Tat<=e&&i<=s.Eat&&this.mat.xat.some(t=>t.o===s.Pat)&&this.Yot.Iat(s)}async kn(){this.Vo(),this.pat(),this.yat.Zg(),await this.KP(Pc.yot),this.jot.kn()}async rat(t){for(;;)try{fr(t),this.$ot("fat"),await this.jot.Cat(t),fr(t),this.$ot("uat"),await ua(this.oat.Yy,t)}catch(t){if(Ce(t))this.$ot("aat");else{const i=t instanceof as?t:new as(me.MEDIA_LOAD_ERROR,t.message,t);this.Qq(i)}break}}async Rat(t){fr(t),await this.KP(Pc.mot),this.jot.hr(),fr(t),await this.Tn(Pc.tot)}constructor(t,i,e,s,n){super(),this.Dat=void 0,this.mat=void 0,this.Yot=void 0,this.jot=void 0,this.W8=void 0,this.Zot=void 0,this.nq=void 0,this.oat=void 0,this.yat=void 0,this.nat=void 0,this.Je=void 0,this.bd=void 0,this.Dat=t,this.mat=i,this.Yot=e,this.jot=s,this.W8=n,this.Zot="aat",this.nq=void 0,this.oat=new Ga,this.yat=new Zc,this.nat=new Zc,this.Je=t=>{if(this.eat||this.vat)return;if(!zd.Ex&&this.jot.Nat(t.currentTime))return;this.yat.Zg(),this.yat=new Zc;Cu(this.Rat(this.yat.Yg),this.yat).catch(bu)},this.bd=to(()=>{if(this.sat){try{this.jot.Bat();if(this.jot.Mat())return}catch(t){if(!(t instanceof mn))throw t}this.Tn(Pc.iot)}},250),this.gat()}};r(),r();var $U=class t{Lat(t,i){return this.Oat(t,!1,i)}Fat(t,i){return this.Oat(t,!0,i)}async Oat(i,e,s){fr(s.Yg);const n=await this.Uat(i,e,s);return n.YT?t.Vat(n):this.Hat(n)}Hat(t){return t}static Vat(t){return t}Uat(t,i,e){var s;const n=new ro({Yu:t.Yu,fk:Bi.NT,_k:t.Wat?{Range:"bytes="+t.Wat[0]+"-"+(null!=(s=t.Wat[1])?s:"")}:void 0,Xk:t.Xk,Hk:Qe.GET,Km:q.Ak,zk:i?he.Ek:he.yk,Gk:this.qat,Wk:e.zat,qk:e.qk,Yg:e.Yg,Kk:e.Kk});return this.aV.vk(n)}constructor(t,i){this.aV=void 0,this.qat=void 0,this.aV=t,this.qat=i}};r(),r();var tV=class{Gat(t,i){const e=this.Xat**t,s=i*(1-e)+e*this.Fet;S(s)||(this.Fet=s,this.jat+=t)}Qat(){const t=1-this.Xat**this.jat;return this.Fet/t}constructor(t){this.Xat=void 0,this.Fet=0,this.jat=0,this.Xat=_.exp(_.log(.5)/t)}},iV=class{Gat(t,i){const e=8e3*i/t,s=t/1e3;this.Kat+=i,this.Yat.Gat(s,e),this.Jat.Gat(s,e)}Qat(){return this.Zat()?_.min(this.Yat.Qat(),this.Jat.Qat()):this.$at}Zat(){return this.Kat>=this.tut}constructor(t=2,i=5,e=128e3){this.Yat=void 0,this.Jat=void 0,this.Kat=0,this.tut=void 0,this.$at=tC,this.Yat=new tV(t),this.Jat=new tV(i),this.tut=e}},eV=class{get iut(){return this.eut.Qat()}get Zat(){return this.eut.Zat()}sut(t){const i=t.nut,e=this.rut?t.hut-t.aut:t.hut-t.uut,s=t.cut;!s&&i{e.abort(t).catch(gs)}),[s.readable,i.readable]}(this.gut);return this.gut=i,new t(e,this.vut,this._ut)}wut(t){return this.qT(t).then(t=>new gt(t,this.vut,this._ut))}constructor(t,i,e){this.gut=void 0,this.vut=void 0,this._ut=void 0,this.gut=t,this.vut=i,this._ut=e}};r();var rV=class extends Qr{constructor(t,i,e){super(i,e),this.yut=void 0,this.yut=t}},hV="Cache lookup failed.",oV=class extends Ne{async but(t,i){fr(i);const e=await this.Sut.Aut(t.Yu.Yu,t.Yu.Wat);if(fr(i),!e)throw new rV(t,hV);const s=new gt(e.buffer,e.byteLength,e.reference);return{yut:t.yut,Tut:{Km:We.wZ,lk:s},qot:t.qot,Yu:t.Yu}}async kut(t,i){fr(i);const e=await this.Sut.Aut(t.Yu,t.Wat);if(fr(i),!e)throw new rV(t,hV);const s=new gt(e.buffer,e.byteLength,e.reference);return{Km:We.wZ,lk:s}}kn(){this.Vo()}constructor(t){super(),this.Sut=void 0,this.Sut=t}};r();var aV=["vy","gy"],uV=class extends Ne{async but(t,i){let e;for(const s of this.Eut)try{return await s.but(t,i)}catch(t){sa(t),e=t}throw e}async kut(t,i){let e;for(const s of this.Eut)try{return await s.kut(t,i)}catch(t){sa(t),e=t}throw e}kn(){for(const t of this.Eut)t.mn(aV,this.Rs),t.kn()}constructor(t){super(),this.Eut=void 0,this.Eut=t;for(const t of this.Eut)t.wn(aV,this.Rs)}};function cV(t){return lo(t.xut)}function dV(t){return cV(t)?t.xut:t.Put}r(),r(),r(),r();var lV=class extends gp{constructor(t,i,e,s,n,r){super(t),this.Iut=void 0,this.FX=void 0,this.zB=void 0,this.sN=void 0,this.Gk=void 0,this.Iut=i,this.FX=e,this.zB=s,this.sN=n,this.Gk=r}},fV=class extends lV{constructor(t,i,e,s,n){super(d.ly,t,i,e,s,n)}};r(),r();var vV=class{constructor(t,i){this.Cut=void 0,this.Rut=void 0,this.Cut=t,this.Rut=i}},_V=class extends vV{get nut(){return this.Dut}start(){}transform(t,i){this.Dut+=t.byteLength,i.enqueue(t)}flush(){this.Nut(!1)}Zg(){this.Nut(!0)}Nut(t){this.Cut(this.Rut,zd.Mg(),this.nut,t)}constructor(...t){super(...t),this.Dut=0}},gV=class extends vV{get nut(){return this.Dut}start(){this.Rut=zd.Mg()}transform(t,i){this.Dut+=t.byteLength,this.But||this.Mut(t)&&this.Nut(!1),i.enqueue(t)}flush(){}Zg(){this.Nut(!0)}Mut(t){const i=this.Lut(t),e=this.Out(i);return Boolean(hh(e,pV))}Lut(t){return this.Fut&&void 0!==this.Uut?(this.Fut=fm([this.Fut,t]),new yu(dh(this.Fut),new oi(this.Uut))):(this.Fut=t,new yu(dh(t),new oi))}Out(t){const i=ha.fD(t.lk,t.$R,!0);return i.vD?(this.Fut=void 0,this.Uut=void 0):this.Uut=t.$R.ac,i.m}Nut(t){this.But||(this.Cut(this.Rut,zd.Mg(),this.nut,t),this.But=!0)}constructor(...t){super(...t),this.Dut=0,this.But=!1,this.Fut=void 0,this.Uut=void 0}};function pV(t){return t.Km===ui.WR}var mV=class{Vut(t){const i=t.pk?this.Hut:zd.Mg(),e=this.Wut(i),s=new Yb(e),n=t.zT().pipeTo(s.writable).then(()=>({rP:{nut:e.nut}}),t=>{throw e.Zg(),t});return this.qut.$g(n),s.readable}zut(t){const i=t.pk?this.Hut:zd.Mg(),e=t.qT(),s=e.then(t=>{const e=zd.Mg();return this.sut(i,e,t.byteLength,!1),{rP:{nut:t.byteLength}}},t=>{const e=zd.Mg();throw this.sut(i,e,0,!0),t});return this.qut.$g(s),e}get Gut(){return this.qut.Yy}constructor(t){this.Xut=void 0,this.qut=void 0,this.Hut=void 0,this.sut=void 0,this.Xut=t,this.qut=new Ga,this.sut=(t,i,e,s)=>{const n={uut:this.Hut,aut:t,hut:i,nut:e,cut:s};this.Xut.sut(n),this.Xut.Zat&&sc.Bg.vW(this.Xut.iut)},this.qut.Yy.catch(gs),this.Hut=zd.Mg()}},wV=class extends mV{Wut(t){return new _V(this.sut,t)}},yV=class extends mV{Wut(t){return new gV(this.sut,t)}};r();var bV=class extends lV{constructor(t,i,e,s,n,r,h){super(d._y,t,i,e,s,n),this.jut=void 0,this.uO=void 0,this.jut=r,this.uO=h}};r();var pt=class extends Qr{constructor(t,i,e){super("Error downloading segment "+dV(i),t),this.Qut=void 0,this.Kut=void 0,this.Yut=void 0,this.Qut=i.CO,this.Kut=i.RO,this.Yut=e}},AV=class extends Ne{Jut(){return this.rut?new yV(this.Xut):new wV(this.Xut)}async but(t,i){fr(i);const e=t.qot,s=t.Yu,n=t.yut,r=dV(n),h=e.qot?e.qot.JI:-1,o=function(t){const i=t.qot;let e;e=i===function(t){return t.xat.reduce((t,i)=>t.IW=this.Mz.YY}get rct(){const t=this.ect.ZW;let i;if(t&&t.V>0)i=t.An(0);else{i=this.W8.zx;const t=this.ect.s$,e=t.zM(i);e>=0&&(i=t.An(e))}const e=this.ect.kP.Tn(0);if(e>i){if(this.ect.Tn<=i&&this.ect.An>=i&&e>i+SV)throw new mn(i,e);i=e}return i=this.ect.act.LM(i),i}constructor(t,i,e,s){this.ect=void 0,this.W8=void 0,this.a4=void 0,this.Mz=void 0,this.ect=t,this.W8=i,this.a4=e,this.Mz=s}};r();var kV=class{get uct(){if(0===this.Wm.size)return this.cct;let t=Uo.nL(0,1/0);return t=t.Mn(this.cct),this.Wm.forEach(i=>{t=t.Mn(i)}),t}dct(t){return this.Wm.get(t.o)}lct(){let t=this.cct;return this.Wm.forEach(i=>{t=t.HM(i)}),t}fct(t){if(this.cct.Cr(t))return!0;let i=!1;return this.Wm.forEach(e=>{i=i||e.Cr(t)}),i}vct(t,i){const e=this.Wm.get(i.o);return!!e&&e.Cr(t)}GM(t,i){if(this.cct.GM(t,i))return!0;let e=!1;return this.Wm.forEach(s=>{e=e||s.GM(t,i)}),e}_ct(t,i){const e=this.Wm.get(i),s=e?e.HM(t):t;this.Wm.set(i,s),this.cct=this.cct.HM(t)}gct(t){this.Wm.forEach((i,e)=>{this.Wm.set(e,i.HM(t))}),this.cct=this.cct.HM(t)}pct(t){this.Wm.forEach((i,e)=>{this.Wm.set(e,i.Mn(t))}),this.cct=this.cct.Mn(t)}hr(){this.Wm.forEach((t,i)=>{this.Wm.set(i,Uo.rL())}),this.cct=Uo.rL()}constructor(){this.Wm=void 0,this.cct=void 0,this.Wm=Ba(),this.cct=Uo.rL()}},EV=class{get mct(){return this.wct}get s$(){return this.n$}yct(t){for(const i of this.bct){if(i.Tat>t)break;if(i.Eat>t)return i}}Act(t){for(const i of this.bct){if(i.Sct>t)break;if(i.Tct>=t)return i}}kct(t,i){const e=[];for(const s of this.bct){if(s.Tat>t)break;s.Eat>=i&&e.push(s)}return e}Sat(){return this.bct}Iat(t){const i=Uo.nL(t.Sct,t.Tct),e=i.OM();this.wct.pct(e),this.wct._ct(i,t.Pat),this.Ect(e);const s=tt(this.bct,i=>t.Tat<=i.Tat);if(s<0)this.bct.push(t);else{this.bct[s].Eat<=t.Eat?this.bct.splice(s,1,t):this.bct.splice(s,0,t)}}r$(t,i){this.n$._ct(t,i)}xct(t){this.n$.gct(t)}pct(t){this.wct.pct(t),this.n$.pct(t);const i=this.wct.lct();this.Ect(i)}Ect(t){this.bct=this.bct.filter(i=>t.jM(i.Sct,i.Tct)).map(i=>i.Pct&&!t.GM(i.Sct,i.Tct)?function(t,i){return{Pat:t.Pat,Tat:t.Tat,Eat:t.Eat,Sct:t.Sct,Tct:t.Tct,Pct:i}}(i,!1):i)}hr(){this.wct.hr(),this.n$.hr(),this.bct=[]}kn(){this.hr()}constructor(t){this.Ht=void 0,this.wct=void 0,this.n$=void 0,this.bct=[],this.Ht=t,this.wct=new kV,this.n$=new kV}};r(),r();var xV=class{get Jot(){return this.Ict}set Jot(t){this.Ict=t}get iat(){return this.Yot.Ht.iat}async Cct(t,i,e){let s;fr(e);const n=this.Yot.Act(t);s=n&&rs(n.Tct,t,1e-5)?n.Eat:t;const r=this.Rct(s),h=function(t){return PV.bind(void 0,t)}(s);let o=await this.jp.Dct(h,r,i,e);for(fr(e);o&&this.Nct(o.yut);){const t=DV(o.yut),s=o.qot;o=await this.jp.Dct(t,[s],i,e),fr(e)}if(!o)return void 0;if(!this.Bct(o.yut))return o;const a=this.Mct(o.yut);if(t=a.An)return await this.findFirstNonAppendedSegmentAfterSegment(o,i,e);if(!o.qot.Lct(o.yut))throw new m("Fatal buffering error")}async findFirstNonAppendedSegmentAfterSegment(t,i,e){let s=t;do{const n=DV(s.yut),r=t.qot;s=await this.jp.Dct(n,[r],i,e),fr(e)}while(s&&this.Bct(s.yut));if(s)return s}async findFirstNonAppendedSegmentBeforeSegment(t,i,e,s){let n=t;do{const s=RV(n.yut),r=t.qot;n=await this.jp.Dct(s,[r],i,e),fr(e)}while(n&&this.Bct(n.yut));if(!n){0;const i=t.qot.Oct.Tn;throw new mn(i,s.Tn,t.qot)}return n}Fct(t){return this.Yot.mct.fct(t)}Uct(t){return this.Yot.kct(t.CO,t.RO)}Bct(t){const i=this.Uct(t);return i.length>0&&function(t,i){return function(t){let i=Uo.rL();for(const e of t)i=i.HM(Uo.nL(e.Tat,e.Eat));return i}(t).GM(i.CO,i.RO)}(i,t)&&i.every(NV)}Nct(t){return this.Yot.s$.GM(t.CO,t.RO)}Mct(t){const i=this.Uct(t);return{Tn:i[0].Sct,An:i[i.length-1].Tct}}Rct(t){const i=this.Vct(t);if(0===i.length){const t=this.Ict?this.Ict:this.Yot.Ht.xat;return[t[t.length-1]]}const e=i.filter(t=>{var i;return(null==(i=t.qot)?void 0:i.xst)&&!t.Hct});return e.length>0?e:[i[i.length-1]]}Vct(t){return(this.Ict?this.Ict:this.Yot.Ht.xat).filter(i=>!this.Yot.s$.vct(t,i))}constructor(t,i,e){this.Dat=void 0,this.Yot=void 0,this.jp=void 0,this.Ict=void 0,this.Dat=t,this.Yot=i,this.jp=e}};async function PV(t,i,e,s){const n=i.mht.Wct(t);if(n){if(i.qct(n)){return(await i.Gct(n,e,s)).zct(t)}return n}}async function IV(t,i,e,s){if(cV(t)){if(0===t.xut)return;const n=i.mht.Xct(t);if(!n)return;return(await i.Gct(n,e,s)).jct(t.xut-1)}return i.mht.Qct(t)}async function CV(t,i,e,s){if(cV(t)){const n=i.mht.Xct(t);if(!n)return;const r=await i.Gct(n,e,s);if(t.xut+1===r.V)return;return r.jct(t.xut+1)}return i.mht.Kct(t)}function RV(t){return IV.bind(void 0,t)}function DV(t){return CV.bind(void 0,t)}function NV(t){return t.Pct}r();var BV=class{async Dct(t,i,e,s){fr(s);const n=this.Yct(i,e);if(!n)return;const r=await t(n,this.Jct,s);if(!r)return;const h=n.Zct(r);return{qot:n,yut:r,Yu:h}}Yct(t,i){if(0===t.length)return;const e=this.tdt.$ct(t,this.idt?i:void 0,this.ect,this.Mz.jY);return this.idt||(this.idt=!0),e}constructor(t,i,e,s){this.tdt=void 0,this.ect=void 0,this.Mz=void 0,this.Jct=void 0,this.idt=void 0,this.tdt=t,this.ect=i,this.Mz=e,this.Jct=s,this.idt=!1}};r();var MV=class{async Dct(t,i,e,s){fr(s);const n=this.tdt.edt(i,e,this.ect);if(!n.length)return;let r;for(const i of n)try{fr(s);const e=await t(i,this.Jct,s);if(e){const t=i.Zct(e);if(await this.Sut.sdt(t.Yu,t.Wat))return{yut:e,qot:i,Yu:t}}}catch(t){sa(t),r=t}if(r)throw r}constructor(t,i,e,s){this.tdt=void 0,this.ect=void 0,this.Sut=void 0,this.Jct=void 0,this.tdt=t,this.ect=i,this.Sut=e,this.Jct=s}};function LV(t){return void 0!==t.vP}function OV(t,i){const e=t.Ti&&i.Ti,s=t.Mi&&i.Mi;if(e||s){if(e&&s)return t.Ti*t.Mi-i.Ti*i.Mi;if(e)return t.Ti-i.Ti;if(s)return t.Mi-i.Mi;return(t.Ti||1)*(t.Mi||1)-(i.Ti||1)*(i.Mi||1)}return 0}function FV(t,i){return OV(t,i)||function(t,i){return t.IW-i.IW}(t,i)}r(),r();var eh=class t{$ct(i,e,s,n){let r=t.sortByQuality(i);if(void 0!==this.ndt&&void 0===e&&i.length>1){const i=t.rdt(r,this.ndt);i&&(r=i)}const h=this.edt(r,e,s,n);return h.length?h[h.length-1]:r[0]}edt(i,e,s,n){var r;const h=t.sortByQuality(i),o={iut:void 0===n||this.hdt.Zat?this.hdt.iut:n,vP:LV(s)&&s.vP?s.vP:1,odt:s.Ti,adt:s.Mi,udt:null==(r=this.cdt)?void 0:r.restrictToPlayerSize};let a=h;for(const t of this.ddt)a=t(a,e,o,this.Cm,this.ldt);return a}static fdt(i){return t.sortByQuality(i)[0]}static vdt(i,e){var s;return e?t.fdt(null!=(s=t.rdt(i,e))?s:i):t.fdt(i)}static rdt(t,i){for(const e of i){const i=t.filter(t=>Tr(t.Bp,e));if(i.length>0)return i}}static sortByQuality(t){const i=[...t];return i.sort(FV),i}constructor(t,i,e,s,n,r){this.hdt=void 0,this.ddt=void 0,this.Cm=void 0,this.cdt=void 0,this.ndt=void 0,this.ldt=void 0,this.ddt=t,this.hdt=i,this.Cm=e,this.cdt=s,this.ndt=n,this.ldt=r}};r();var UV=(t,i,e,s,n)=>t.filter(t=>n.IZ(t)&&s.Pp(i,t));r();var VV=(t,i,e,s)=>void 0===i&&s.Rp?[t[t.length-1]]:t.filter(t=>function(t,i,e){const s=e.iut;if(s<=0)return!1;return.8*s>t.IW*e.vP}(t,0,e));r();var HV=(t,i,e,s,n)=>{const r=e.udt;if(void 0===r&&!s.Ks)return t;if(!1===r)return t;if(t.length>0&&t[0].Km!==at.Mk)return t;for(let i=t.length-1;i>=0;i--){const s=t[i];if(s.Mi===e.adt&&s.Ti===e.odt)return t.slice(0,i+1);if(s.Mi{if(!1===e.udt)return t;if(s.dp)return t;const n=s.lp;var r;const h=(null!=(r=null==n?void 0:n.width)?r:e.odt)*XV;var o;const a=(null!=(o=null==n?void 0:n.height)?o:e.adt)*XV;for(let i=t.length-1;i>=0;i--){const e=t[i];if(e.Mi<=a&&e.Ti<=h)return t.slice(0,i+1)}return[]},QV=class{static jet(t,i,e,s,n,r,h,o,a,u){const c=function(t,i){return new qV([new GV(i),new zV(t)])}(r,h),d=new eh([UV],n,zd.Zs,o,a,u),l=new MV(d,i,h,c),f=new eh([VV,UV,HV,jV],n,zd.Zs,o,a,u),v=new BV(f,i,s,c),_=new WV([l,v]);return new xV(t,e,_)}};r(),r();var KV=class extends gp{constructor(t,i,e,s,n,r=0){super(d.ey),this.segmentStartTime=void 0,this.error=void 0,this.trackType=void 0,this.track=void 0,this.quality=void 0,this.retryCount=void 0,this.segmentStartTime=t,this.error=i,this.trackType=e,this.track=s,this.quality=n,this.retryCount=r}};r();var YV=class extends gp{constructor(t,i){super(d.Sw),this.track=void 0,this.segments=void 0,this.track=t,this.segments=i}};r();var JV=class extends gp{constructor(t,i,e,s,n,r=0,h=void 0){super(d.iy),this.segmentStartTime=void 0,this.error=void 0,this.trackType=void 0,this.track=void 0,this.quality=void 0,this.retryCount=void 0,this.statusCode=void 0,this.segmentStartTime=t,this.error=i,this.trackType=e,this.track=s,this.quality=n,this.retryCount=r,this.statusCode=h}},ZV=class extends Qr{constructor(t,i){super(i),this.mdt=void 0,this.mdt=t}},$V=[d.ly,d._y],tH=class extends Ne{get Xot(){return this.wdt}get Qot(){return this.ydt}set Jot(t){this.bdt.Jot=t}get Jot(){return this.bdt.Jot}get iat(){return this.Yot.Ht.iat}Adt(t){return!this.n3||!t||!Qo(this.n3.jht,t.jht)}Nat(t){if(!this.wdt)return!1;const i=this.wdt.yut,e=Uo.nL(i.CO,i.RO),s=this.Sdt.sct,n=s.zM(t);return n<0?e.Cr(t,SV):e.jM(t,s.An(n),!0,!0,SV)}async Cat(t){const i=this.Yot.Ht.xat;for(;;){let n;try{var e;fr(t),this.Bat();if(this.Mat())break;n=this.Tdt();const r=await this.Dct(n,t);if(void 0===r)break;if(this.wdt=r,!iH(this.wdt)){await this.kdt(this.wdt,t);continue}var s;if(this.ydt&&!IB(this.ydt.qot.Rrt,this.wdt.qot.Rrt)&&await this.ldt.RZ(this.wdt.qot),this.wdt.qot.NW&&(!this.Qot||(null==(e=this.ydt)?void 0:e.qot)!==this.wdt.qot))null==(s=this.pq)||s.VW(this.wdt.qot.NW);await this.Edt(n,this.wdt.yut,t),this.n3=await this.xdt(this.wdt.qot,t);const h=await this.but(this.wdt,t),o=this.Sdt.Fx,a=this.ydt;this.ydt=await this.Pdt(h,t);const u=this.Sdt.Fx;this.Idt(a,this.wdt,o,u,n),i.forEach(t=>t.Hct=!1),this.Cdt=0,this.Rdt=0}catch(e){if(e instanceof mn){this.G3(e.Tn,e.An,e.qot);continue}if(e instanceof ZV){let s=500;if(i.every(t=>t.Hct)){if(2===this.Cdt){const t=this.Sdt.Fx;if(this.Ddt(this.wdt),this.Idt(this.ydt,this.wdt,t,t,n),i.forEach(t=>t.Hct=!1),this.Rdt+=1,this.Cdt=0,this.Rdt===this.Ndt.maxRetries)throw new as(me.MEDIA_LOAD_ERROR,"The segments could not be loaded.",e);continue}this.Cdt++;const t=this.Ndt.minimumBackoff*2**(this.Cdt-1);s=_.min(t,this.Ndt.maximumBackoff)}await Ze(s,t);continue}throw this.Bdt=Uo.rL(),e}finally{this.wdt=void 0}}}Idt(t,i,e,s,n){const r=s.qM(e),h=i.qot,o=h.Mdt(i.yut),a=h.Lct(i.yut);let u=i.yut.CO,c=i.yut.RO;o&&(u=_.min(u,_.max(0,h.Oct.Tn-.05))),a&&(c=_.max(c,h.Oct.An));const d=Uo.nL(u,c).qM(s);if(0===r.V)return void this.Ldt(e,d,u,n);if(o||this.Bdt.V>0){const t=d.Mn(Uo.nL(u,r.Tn(0)));this.Odt(t)}const l=r.OM().Mn(Uo.nL(r.Tn(0),r.An(r.V-1)));if(this.Odt(l),a){const t=d.Mn(Uo.nL(r.An(r.V-1),c));this.Odt(t)}if(this.Bdt.V>0){const t=this.Bdt.qM(r);this.Odt(t),this.Bdt=Uo.rL()}const f=h.mht,v=cV(i.yut)?void 0:f.Qct(i.yut);var g;const p=null!=(g=null==t?void 0:t.yut)?g:this.Fdt(v)?v:void 0;if(p){const t=this.Yot.kct(p.CO,p.RO);if(t.length>0){const i=Uo.nL(t[t.length-1].Tct,r.Tn(0));this.Odt(i)}}const m=cV(i.yut)?void 0:f.Kct(i.yut);if(m&&this.Fdt(m)){const t=this.Yot.kct(m.CO,m.RO);if(t.length>0){const i=Uo.nL(r.An(r.V-1),t[0].Sct);this.Odt(i)}}}Ldt(t,i,e,s){let n=i;0===this.Bdt.V&&(this.Bdt=Uo.nL(t.An(t.V-1),e)),0===n.V&&void 0!==s&&(n=Uo.sL(s)),this.Bdt=this.Bdt.HM(n),this.Yot.xct(this.Bdt)}Fdt(t){return!!t&&this.Yot.kct(t.CO,t.RO).length>0}Odt(t){const i=t.qM(this.Sdt.Fx);for(let t=0;t0)return;var t;const i=this.Sdt.sct.HM(null!=(t=this.Sdt.s$.MM().iL(this.Sdt.rct))?t:Uo.rL());this.Yot.pct(i),this.Hdt&&!this.Wdt(this.Hdt)&&(this.Hdt=void 0),this.So(new YV(this.Yot.Ht.iat,this.Yot.Sat()))}Mat(){return this.ydt&&this.ydt.qot.Lct(this.ydt.yut)?(this.Udt.F3(),!0):(this.Hdt&&this.Hdt.qot.Lct(this.Hdt.yut)&&this.Wdt(this.Hdt)&&this.Udt.F3(),!!this.Sdt.nct)}Wdt(t){return this.Yot.mct.GM(t.qdt,t.zdt)}Gdt(t,i,e){(!this.Hdt||this.Hdt.yut.RO=2)return t.qot.Hct=!0,this.$dt(s,e),this.tlt(s,e),this.Vdt(Pc.oot,"Could not fetch the segment.");this.tlt(s,e);const n=_.min(this.Ndt.minimumBackoff*2**e,this.Ndt.maximumBackoff);await Ze(n,i);continue}throw new as(me.MEDIA_LOAD_ERROR,s.message,s)}}async Edt(t,i,e){const s=this.Yot.kct(i.CO,i.RO),n=this.Sdt.sct.iL(t);let r=Uo.rL();for(const t of s){fr(e);const i=t.Sct,s=t.Tct,h=n&&n.jM(i,s)?_.max(i,n.An(0)):i,o=s;ht.Ca))}constructor(t,i){super(Te.RI),this.$I=void 0,this.Ht=void 0,this.$I=t||[],this.Ht=i}},hH=class extends gp{constructor(t){super("targetqualitychanged"),this.qualities=void 0,this.quality=void 0,this.qualities=t,this.quality=this.qualities.length>0?this.qualities[0]:void 0}};r();var oH=class extends Fs{xa(){return new aH(this.quality.Ca)}constructor(t){super(Te.QUALITY_UNAVAILABLE),this.quality=void 0,this.quality=t}},aH=class extends Eh{constructor(t){super("qualityunavailable"),this.quality=void 0,this.quality=t}};r();var uH=class extends gp{constructor(){super(Te.NO_QUALITY)}};function cH(t){return{IW:t.IW,Bp:t.Rrt,Mi:dH(t)?t.Mi:0,Km:dH(t)?at.Mk:at.Bk,Ti:dH(t)?t.Ti:0}}function dH(t){const i=t;return void 0!==i.Mi&&void 0!==i.Ti}r();var lH=0,fH=class extends Ne{get ZI(){return this.mat.olt.map(vH).filter(it)}ult(t){for(const i of t)i.wn("update",this.clt),this._O.gO(i)}dlt(t){if(!this._O.pO(t))return;t.ZU();const i=this.llt();if(this.flt&&Ct(this.flt,t)){const t=this.flt.filter(t=>t.xst);0===t.length&&i.length>0?this.tC=i:this.tC=t}else this.tC=i;this.So(new oH(t))}vlt(t){if(!this._O.pO(t))return;const i=this.llt();t.JU(),this.flt&&!function(t,i){return af(t,i,(t,i)=>t===i)}(this.flt,i)||(this.tC=this.llt())}llt(){return this._O.NI.filter(t=>t.xst)}get YI(){return this._lt}glt(t){this._lt=t.qot,this.So(t)}get Zut(){return this.mat}get Rt(){return this.We}set Rt(t){this.SO(t)}get Ca(){return this.hu||(this.hu=cs(this)),this.hu}get plt(){return this.wlt}set plt(t){this.wlt=t}get o(){return this.aS}get JI(){return this.yO}get Lt(){return this.I5}get bs(){return this.$b}get Th(){return this.bO}set Th(t){t!==this.bO&&(this.bO=t,this.So(new Xh(this)))}get Qk(){return this.Rt?"enabled":"disabled"}get tC(){return this.flt}set tC(t){let i;if(t){const e=this.YI?cH(this.YI):void 0;i=t.filter(t=>t.xst&&zd.Zs.Pp(e,cH(t)))}else i=this.llt();0!==i.length?(this.flt=t&&this._O.pO(t)?t:void 0,this.ylt=this.blt(this.flt),this.So(new qa(t,this))):this.So(new uH)}get Alt(){return this.ylt}blt(t){if(!t||0===t.length)return;const i=[];for(const e of this.xat)for(const s of t)s===e.qot&&s.xst&&i.push(e);return i}get $I(){return this._O}get xat(){return this.Slt}Tlt(t){this.klt.push(t),this.Slt.push(...t.xat);const i=t.xat.map(t=>t.qot);this.ult(i)}get iat(){return this.Elt}get xlt(){return this.klt}get Plt(){return this.xat.every(t=>t.Plt)}SO(t){this.We=t,this.wlt&&(t?this.wlt.JU(this):this.wlt.ZU(this))}Ilt(t){this.We=t,this.Clt!==t&&(this.Clt=t,this.So(new Rh(this)))}kn(){for(const t of this._O.NI)t.mn("update",this.clt);this._O.hr()}constructor(t,i,e="alternative"){super(),this._lt=void 0,this.mat=void 0,this.We=!1,this.hu=void 0,this.wlt=void 0,this.aS="",this.yO=void 0,this.I5=void 0,this.bO=void 0,this.$b=void 0,this.Clt=!1,this._O=new iE,this.Slt=[],this.flt=void 0,this.ylt=void 0,this.Elt=void 0,this.clt=()=>this.So(new Xh(this)),this.klt=[],this.mat=t,this.aS=String(lH++),this.yO=mi(),this.I5=e,this.$b=t.Tit,this.bO=t.Th,this.Elt=t.Km,this.Slt=t.xat.slice(),this.ult(i)}};function vH(t){if("urn:mpeg:dash:role:2011"===t.x8)return _H(t);if("urn:tva:metadata:cs:AudioPurposeCS:2007"===t.x8){if("1"===t.XE)return Je.GI;if("2"===t.XE)return Je.jI}}function _H(t){if(void 0!==(null==t?void 0:t.XE))switch(t.XE){case"caption":return Je.zI;case"sign":return Je.XI;case"description":return Je.GI;case"enhanced-audio-intelligibility":return Je.jI;default:return}}var gH=class t extends ms{get Rt(){for(const t of this.Z.NI)if(t.Qk!==xh.Nh)return!0;return!1}get ZW(){const t=this.W8.zx;return this.sct.iL(t,.01)}get act(){return Uo.hL()}get Fx(){var t;return null!=(t=this.Rlt&&this.Dlt.get(this.Rlt.JI))?t:Uo.rL()}get s$(){return this.Nlt?this.Nlt.Kot.s$.uct:Uo.rL()}get sct(){return QU(this.Fx,this.s$).VM(2*this.Blt)}get Tn(){return this.Mlt?this.Mlt.Oct.Tn:NaN}get An(){return this.Mlt?this.Mlt.Oct.An:NaN}get Qx(){const t=this.An;return!!t&&this.W8.zx>=t}get Blt(){var t;const i=this.Llt();if(!i)return.04;var e;return 1/(null!=(e=this.Rlt&&(null==i||null==(t=i.Olt)?void 0:t.rF()))?e:25)}get Mi(){return 0}get V3(){return at.LT}get vP(){return this.Rz}set vP(t){this.Rz=t}get kP(){if(!this.Rlt)return Uo.sL(0);const t=this.Flt(this.Rlt),i=null==t?void 0:t.Ult,e=null==t?void 0:t.Vlt;if(void 0===e||void 0===i)return Uo.sL(0);const s=_.max(i,this.W8.zx);return new Uo([e,s]).MM()}get Ti(){return 0}F3(){}hct(){return this.sct.Cr(this.An)}async elt(t,i,e,s){const n=t.Km===We.wZ?t.lk.jht:await t.lk.qT(s),r=this.findTrackForRepresentation(e),h=i.CO,o=i.RO,a=new Uo([h,o]);this.jrt(s);const u=this.pht(new j(n),i,e,r);for(const t of u)r.nV(t);var c;const d=null!=(c=this.Dlt.get(r.JI))?c:Uo.rL();return this.Dlt.set(r.JI,d.HM(a)),{qdt:h,zdt:o}}jrt(t){const i=KD(this.W8.zx,void 0,void 0,this.Fx,this.Mz.YY,this.Mz.zY);for(const[e,s]of i)Wr(this.ilt(e,s,t))}ght(t,i,e){return this.Hlt.ght(t,i,e)}pht(t,i,e,s){return this.Hlt.pht(t,i,e,s)}ilt(t,i,e){fr(e);const s=t,n=i;let r=new Uo([t,i]);for(const t of this.Z.NI){const i=[];for(const e of t.L.NI)e.CO>=s&&e.RO<=n?i.push(e):r=r.qM(new Uo([e.CO,e.RO]));for(const e of i)t.XU(e);const e=this.Dlt.get(t.JI);e&&this.Dlt.set(t.JI,e.qM(r))}return Promise.resolve()}r$(t,i){}h$(t,i){}iJ(){return!1}JU(t){if(t&&this.Rlt!==t){this.Rlt=t;for(const i of this.Z.NI)i!==t&&(i.Qk=xh.Nh);if(this.Hlt.hr(),this.Nlt&&(this.Nlt.kn(),this.Nlt=void 0),this.Rlt){const t=this.Flt(this.Rlt);this.Nlt=new sH(this,this.W8,this.W8,this.aV,this.Mz,!1,this.Sut,void 0,void 0,new rH,Rk,void 0).hlt(this.Rlt,t),this.Nlt.wn(hc.ma,this.Wlt),this.Nlt.Tn(Pc.Zht)}}}ZU(t){this.Rlt===t&&(t&&this.Rlt===t&&(this.Rlt=void 0),this.Nlt&&(this.Nlt.kn(),this.Nlt=void 0))}async Un(t){await this.hr(),this.Mlt=t,this.qlt(t)}zlt(t){const i=function(t){const i=t.xat&&t.xat.length>0&&t.xat[0],e=i&&sP(i.Rrt),s=sP(t.Rrt),n=t.lQ===Yy;return e||s||n?nh.TTML:t.lQ===Zy||oP(t.lQ,t.Rrt)?nh.WEBVTT:nh.DEFAULT}(t);if(!i)throw new m("Unknown TextTrack type for Representation");const e=t.Glt.concat(t.olt);return this.Xlt(function(t){return Ct(t.filter(t=>"urn:mpeg:dash:role:2011"===t.x8).map(t=>t.XE).filter(it),"caption")?us.WU:us.HU}(e),t.Th,t.Tit,!1,i,t,function(t){return t.filter(t=>"urn:mpeg:dash:role:2011"===t.x8).some(t=>function(t){return"forced-subtitle"===t||"forced_subtitle"===t}(t.XE))}(t.Glt),t.olt.map(_H).filter(it))}qlt(t){for(const i of t.jlt){const t=this.zlt(i);this.Qlt.set(t.JI,i),t.AP=dc.LOADED,this.tt(t)}}it(t){this.Qlt.delete(t.JI),super.it(t)}Xlt(t,i,e,s,n,r,h,o){var a;const u=hh(r.xat,t=>""!==t.o);var c,d;const l=null!=(d=null!=(c=null==u?void 0:u.o)?c:null==(a=r.o)?void 0:a.toString())?d:"";return this.iV.sI(t,l,i,e,s,n,h,o)}eV(t,i,e){const s=ht(t,i,e),n=this.Qlt.get(t.JI);void 0!==n&&(this.Qlt.set(s.JI,n),this.Qlt.delete(t.JI));const r=this.Dlt.get(t.JI);return void 0!==r&&(this.Dlt.set(s.JI,r),this.Dlt.delete(t.JI)),s}async hr(){await super.hr(),this.Nlt&&(await this.Nlt.hr(Pc.Aot),this.Nlt.mn(hc.ma,this.Wlt),this.Nlt=void 0),this.Mlt=void 0,this.Dlt.clear()}findTrackForRepresentation(i){for(const e of this.Z.NI){const s=this.Flt(e);if(s&&t.Klt(s)===i)return e}}Flt(t){return this.Qlt.get(t.JI)}Llt(){if(!this.Rlt)return;const i=this.Flt(this.Rlt);return i?t.Klt(i):void 0}static Klt(t){return t.xat&&t.xat.length>0?t.xat[0]:void 0}kn(){for(const t of this.Z.NI)this.iV.rV(t);return super.kn()}constructor(t,i,e,s,n,r){super(r),this.Rz=1,this.Nlt=void 0,this.Dlt=re(),this.Rlt=void 0,this.Mlt=void 0,this.Qlt=re(),this.aV=void 0,this.Sut=void 0,this.W8=void 0,this.Mz=void 0,this.Hlt=void 0,this.Wlt=t=>{0},this.W8=t,this.aV=i,this.Mz=e,this.Hlt=s,this.Sut=n}},pH=class{get nt(){return this.Gl}async oV(t){if(t.Km!==at.LT)return;const i=function(t,i,e){return sP(i)||t===Yy||t===Zy?new zU(e):oP(t,i)?new XU:void 0}(t.lQ,t.Rrt,this.wht);if(i){const e=this.Ylt(i);return this.Jlt(e),await e.Un(t),e}}Ylt(t){return new gH(this.W8,this.aV,this.Mz,t,this.Sut,this.iV)}Jlt(t){this.Zlt.push(t),this.Gl.qW(t.Z)}async hr(){for(const t of this.Zlt.slice())await t.hr();Wt(this.Zlt),this.Gl.hr()}async kn(){for(const t of this.Zlt)await t.kn();Wt(this.Zlt),this.Gl.kn()}constructor(t,i,e,s,n,r){this.Zlt=[],this.Gl=new Tu([]),this.iV=void 0,this.wht=void 0,this.W8=void 0,this.aV=void 0,this.Mz=void 0,this.Sut=void 0,this.W8=t,this.aV=i,this.Mz=e,this.Sut=s,this.iV=n,this.wht=r}};r();var mH=class extends gp{constructor(t){super(d.zw),this.error=void 0,this.error=t}};r();var Lh=function(t){return t.AV="static",t.SV="dynamic",t}({});r(),r();var wH=function(t){return t.$lt="tft",t}({}),yH=class extends gp{constructor(){super(wH.$lt)}};r(),r();var bH=class extends gp{constructor(t,i){super(d.Yw),this.representation=void 0,this.previousRepresentation=void 0,this.representation=t,this.previousRepresentation=i}};r(),r(),r();var kn=function(t){return t[t.ift=0]="ift",t[t.eft=1]="eft",t[t.sft=2]="sft",t[t.nft=3]="nft",t[t.rft=4]="rft",t[t.hft=5]="hft",t}({}),Vr=function(t){return t[t.oft=0]="oft",t[t.aft=1]="aft",t[t.uft=2]="uft",t[t.cft=3]="cft",t}({});function AH(t,i,e){return e===kn.ift?e:i!==Vr.oft&&i!==Vr.aft||e!==kn.eft&&e!==kn.sft?t?i===Vr.uft?kn.rft:i===Vr.cft?kn.nft:kn.ift:kn.hft:kn.sft}function SH(t,i,e,s){const n={byte:e};let r=kn.eft;const h=[],o=31&kr(i,n,s);n.byte+=1;for(let e=0;e0;)n-=1,s+=TH(t,i);return s}(i,e,4);if("GA94"!==t)return}if(3!==kr(i,e,s))return;47===r&&(e.byte+=1);const h=t;return h.pft=e.byte,h}function EH(t){return 4===t.s1}function xH(t){const i=t.filter(EH).map(kH).filter(it),e=[];for(const t of i)e.push(...SH(t.e1,t.a1,t.pft,t.o1));return e}r();var PH="und";function IH(t){if(t===PH)return;const i=t.toLowerCase();for(const t of CH)if(t[1]===i||t[2]===i||t["2T"]===i||t["2B"]===i||t[3]===i)return t}var CH=[{l:"Abkhaz",bh:"\u0410\u04a7\u0441\u0443\u0430",1:"ab",2:"abk","2T":"abk","2B":"abk",3:"abk"},{l:"Afar",bh:"Afaraf",1:"aa",2:"aar","2T":"aar","2B":"aar",3:"aar"},{l:"Afrikaans",bh:"Afrikaans",1:"af",2:"afr","2T":"afr","2B":"afr",3:"afr"},{l:"Akan",bh:"Akan",1:"ak",2:"aka","2T":"aka","2B":"aka",3:"aka"},{l:"Albanian",bh:"Shqip",1:"sq",2:"sqi","2T":"sqi","2B":"alb",3:"sqi"},{l:"Amharic",bh:"\u12a0\u121b\u122d\u129b",1:"am",2:"amh","2T":"amh","2B":"amh",3:"amh"},{l:"Arabic",bh:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",1:"ar",2:"ara","2T":"ara","2B":"ara",3:"ara"},{l:"Aragonese",bh:"Aragon\xe9s",1:"an",2:"arg","2T":"arg","2B":"arg",3:"arg"},{l:"Armenian",bh:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",1:"hy",2:"hye","2T":"hye","2B":"arm",3:"hye"},{l:"Assamese",bh:"\u0985\u09b8\u09ae\u09c0\u09af\u09bc\u09be",1:"as",2:"asm","2T":"asm","2B":"asm",3:"asm"},{l:"Avaric",bh:"\u0410\u0432\u0430\u0440",1:"av",2:"ava","2T":"ava","2B":"ava",3:"ava"},{l:"Avestan",bh:"avesta",1:"ae",2:"ave","2T":"ave","2B":"ave",3:"ave"},{l:"Aymara",bh:"Aymar",1:"ay",2:"aym","2T":"aym","2B":"aym",3:"aym"},{l:"Azerbaijani",bh:"Az\u0259rbaycanca",1:"az",2:"aze","2T":"aze","2B":"aze",3:"aze"},{l:"Bambara",bh:"Bamanankan",1:"bm",2:"bam","2T":"bam","2B":"bam",3:"bam"},{l:"Bashkir",bh:"\u0411\u0430\u0448\u04a1\u043e\u0440\u0442\u0441\u0430",1:"ba",2:"bak","2T":"bak","2B":"bak",3:"bak"},{l:"Basque",bh:"Euskara",1:"eu",2:"eus","2T":"eus","2B":"baq",3:"eus"},{l:"Belarusian",bh:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",1:"be",2:"bel","2T":"bel","2B":"bel",3:"bel"},{l:"Bengali",bh:"\u09ac\u09be\u0982\u09b2\u09be",1:"bn",2:"ben","2T":"ben","2B":"ben",3:"ben"},{l:"Bihari",bh:"\u092d\u094b\u091c\u092a\u0941\u0930\u0940",1:"bh",2:"bih","2T":"bih","2B":"bih",3:"bih"},{l:"Bislama",bh:"Bislama",1:"bi",2:"bis","2T":"bis","2B":"bis",3:"bis"},{l:"Bosnian",bh:"Bosanski",1:"bs",2:"bos","2T":"bos","2B":"bos",3:"bos"},{l:"Breton",bh:"Brezhoneg",1:"br",2:"bre","2T":"bre","2B":"bre",3:"bre"},{l:"Bulgarian",bh:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",1:"bg",2:"bul","2T":"bul","2B":"bul",3:"bul"},{l:"Burmese",bh:"\u1019\u103c\u1014\u103a\u1019\u102c\u1018\u102c\u101e\u102c",1:"my",2:"mya","2T":"mya","2B":"bur",3:"mya"},{l:"Catalan",bh:"Catal\xe0",1:"ca",2:"cat","2T":"cat","2B":"cat",3:"cat"},{l:"Chamorro",bh:"Chamoru",1:"ch",2:"cha","2T":"cha","2B":"cha",3:"cha"},{l:"Chechen",bh:"\u041d\u043e\u0445\u0447\u0438\u0439\u043d",1:"ce",2:"che","2T":"che","2B":"che",3:"che"},{l:"Chichewa",bh:"Chichewa",1:"ny",2:"nya","2T":"nya","2B":"nya",3:"nya"},{l:"Chinese",bh:"\u4e2d\u6587",1:"zh",2:"zho","2T":"zho","2B":"chi",3:"zho"},{l:"Chuvash",bh:"\u0427\u04d1\u0432\u0430\u0448\u043b\u0430",1:"cv",2:"chv","2T":"chv","2B":"chv",3:"chv"},{l:"Cornish",bh:"Kernewek",1:"kw",2:"cor","2T":"cor","2B":"cor",3:"cor"},{l:"Corsican",bh:"Corsu",1:"co",2:"cos","2T":"cos","2B":"cos",3:"cos"},{l:"Cree",bh:"\u14c0\u1426\u1403\u152d\u140d\u140f\u1423",1:"cr",2:"cre","2T":"cre","2B":"cre",3:"cre"},{l:"Croatian",bh:"Hrvatski",1:"hr",2:"hrv","2T":"hrv","2B":"hrv",3:"hrv"},{l:"Czech",bh:"\u010ce\u0161tina",1:"cs",2:"ces","2T":"ces","2B":"cze",3:"ces"},{l:"Danish",bh:"Dansk",1:"da",2:"dan","2T":"dan","2B":"dan",3:"dan"},{l:"Divehi",bh:"Divehi",1:"dv",2:"div","2T":"div","2B":"div",3:"div"},{l:"Dutch",bh:"Nederlands",1:"nl",2:"nld","2T":"nld","2B":"dut",3:"nld"},{l:"Dzongkha",bh:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41",1:"dz",2:"dzo","2T":"dzo","2B":"dzo",3:"dzo"},{l:"English",bh:"English",1:"en",2:"eng","2T":"eng","2B":"eng",3:"eng"},{l:"Esperanto",bh:"Esperanto",1:"eo",2:"epo","2T":"epo","2B":"epo",3:"epo"},{l:"Estonian",bh:"Eesti",1:"et",2:"est","2T":"est","2B":"est",3:"est"},{l:"Ewe",bh:"E\u028begbe",1:"ee",2:"ewe","2T":"ewe","2B":"ewe",3:"ewe"},{l:"Faroese",bh:"F\xf8royskt",1:"fo",2:"fao","2T":"fao","2B":"fao",3:"fao"},{l:"Fijian",bh:"Na Vosa Vaka-Viti",1:"fj",2:"fij","2T":"fij","2B":"fij",3:"fij"},{l:"Finnish",bh:"Suomi",1:"fi",2:"fin","2T":"fin","2B":"fin",3:"fin"},{l:"French",bh:"Fran\xe7ais",1:"fr",2:"fra","2T":"fra","2B":"fre",3:"fra"},{l:"Fula",bh:"Fulfulde",1:"ff",2:"ful","2T":"ful","2B":"ful",3:"ful"},{l:"Galician",bh:"Galego",1:"gl",2:"glg","2T":"glg","2B":"glg",3:"glg"},{l:"Georgian",bh:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",1:"ka",2:"kat","2T":"kat","2B":"geo",3:"kat"},{l:"German",bh:"Deutsch",1:"de",2:"deu","2T":"deu","2B":"ger",3:"deu"},{l:"Greek",bh:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",1:"el",2:"ell","2T":"ell","2B":"gre",3:"ell"},{l:"Guaran\xed",bh:"Ava\xf1e'\u1ebd",1:"gn",2:"grn","2T":"grn","2B":"grn",3:"grn"},{l:"Gujarati",bh:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",1:"gu",2:"guj","2T":"guj","2B":"guj",3:"guj"},{l:"Haitian",bh:"Krey\xf2l Ayisyen",1:"ht",2:"hat","2T":"hat","2B":"hat",3:"hat"},{l:"Hausa",bh:"\u0647\u064e\u0648\u064f\u0633\u064e",1:"ha",2:"hau","2T":"hau","2B":"hau",3:"hau"},{l:"Hebrew",bh:"\u05e2\u05d1\u05e8\u05d9\u05ea",1:"he",2:"heb","2T":"heb","2B":"heb",3:"heb"},{l:"Herero",bh:"Otjiherero",1:"hz",2:"her","2T":"her","2B":"her",3:"her"},{l:"Hindi",bh:"\u0939\u093f\u0928\u094d\u0926\u0940",1:"hi",2:"hin","2T":"hin","2B":"hin",3:"hin"},{l:"Hiri Motu",bh:"Hiri Motu",1:"ho",2:"hmo","2T":"hmo","2B":"hmo",3:"hmo"},{l:"Hungarian",bh:"Magyar",1:"hu",2:"hun","2T":"hun","2B":"hun",3:"hun"},{l:"Interlingua",bh:"Interlingua",1:"ia",2:"ina","2T":"ina","2B":"ina",3:"ina"},{l:"Indonesian",bh:"Bahasa Indonesia",1:"id",2:"ind","2T":"ind","2B":"ind",3:"ind"},{l:"Interlingue",bh:"Interlingue",1:"ie",2:"ile","2T":"ile","2B":"ile",3:"ile"},{l:"Irish",bh:"Gaeilge",1:"ga",2:"gle","2T":"gle","2B":"gle",3:"gle"},{l:"Igbo",bh:"Igbo",1:"ig",2:"ibo","2T":"ibo","2B":"ibo",3:"ibo"},{l:"Inupiaq",bh:"I\xf1upiak",1:"ik",2:"ipk","2T":"ipk","2B":"ipk",3:"ipk"},{l:"Ido",bh:"Ido",1:"io",2:"ido","2T":"ido","2B":"ido",3:"ido"},{l:"Icelandic",bh:"\xcdslenska",1:"is",2:"isl","2T":"isl","2B":"ice",3:"isl"},{l:"Italian",bh:"Italiano",1:"it",2:"ita","2T":"ita","2B":"ita",3:"ita"},{l:"Inuktitut",bh:"\u1403\u14c4\u1483\u144e\u1450\u1466",1:"iu",2:"iku","2T":"iku","2B":"iku",3:"iku"},{l:"Japanese",bh:"\u65e5\u672c\u8a9e",1:"ja",2:"jpn","2T":"jpn","2B":"jpn",3:"jpn"},{l:"Javanese",bh:"Basa Jawa",1:"jv",2:"jav","2T":"jav","2B":"jav",3:"jav"},{l:"Kalaallisut",bh:"Kalaallisut",1:"kl",2:"kal","2T":"kal","2B":"kal",3:"kal"},{l:"Kannada",bh:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",1:"kn",2:"kan","2T":"kan","2B":"kan",3:"kan"},{l:"Kanuri",bh:"Kanuri",1:"kr",2:"kau","2T":"kau","2B":"kau",3:"kau"},{l:"Kashmiri",bh:"\u0643\u0634\u0645\u064a\u0631\u064a",1:"ks",2:"kas","2T":"kas","2B":"kas",3:"kas"},{l:"Kazakh",bh:"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",1:"kk",2:"kaz","2T":"kaz","2B":"kaz",3:"kaz"},{l:"Khmer",bh:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",1:"km",2:"khm","2T":"khm","2B":"khm",3:"khm"},{l:"Kikuyu",bh:"G\u0129k\u0169y\u0169",1:"ki",2:"kik","2T":"kik","2B":"kik",3:"kik"},{l:"Kinyarwanda",bh:"Kinyarwanda",1:"rw",2:"kin","2T":"kin","2B":"kin",3:"kin"},{l:"Kyrgyz",bh:"\u041a\u044b\u0440\u0433\u044b\u0437\u0447\u0430",1:"ky",2:"kir","2T":"kir","2B":"kir",3:"kir"},{l:"Komi",bh:"\u041a\u043e\u043c\u0438",1:"kv",2:"kom","2T":"kom","2B":"kom",3:"kom"},{l:"Kongo",bh:"Kongo",1:"kg",2:"kon","2T":"kon","2B":"kon",3:"kon"},{l:"Korean",bh:"\ud55c\uad6d\uc5b4",1:"ko",2:"kor","2T":"kor","2B":"kor",3:"kor"},{l:"Kurdish",bh:"Kurd\xee",1:"ku",2:"kur","2T":"kur","2B":"kur",3:"kur"},{l:"Kwanyama",bh:"Kuanyama",1:"kj",2:"kua","2T":"kua","2B":"kua",3:"kua"},{l:"Latin",bh:"Latina",1:"la",2:"lat","2T":"lat","2B":"lat",3:"lat"},{l:"Luxembourgish",bh:"L\xebtzebuergesch",1:"lb",2:"ltz","2T":"ltz","2B":"ltz",3:"ltz"},{l:"Ganda",bh:"Luganda",1:"lg",2:"lug","2T":"lug","2B":"lug",3:"lug"},{l:"Limburgish",bh:"Limburgs",1:"li",2:"lim","2T":"lim","2B":"lim",3:"lim"},{l:"Lingala",bh:"Ling\xe1la",1:"ln",2:"lin","2T":"lin","2B":"lin",3:"lin"},{l:"Lao",bh:"\u0e9e\u0eb2\u0eaa\u0eb2\u0ea5\u0eb2\u0ea7",1:"lo",2:"lao","2T":"lao","2B":"lao",3:"lao"},{l:"Lithuanian",bh:"Lietuvi\u0173",1:"lt",2:"lit","2T":"lit","2B":"lit",3:"lit"},{l:"Luba-Katanga",bh:"Tshiluba",1:"lu",2:"lub","2T":"lub","2B":"lub",3:"lub"},{l:"Latvian",bh:"Latvie\u0161u",1:"lv",2:"lav","2T":"lav","2B":"lav",3:"lav"},{l:"Manx",bh:"Gaelg",1:"gv",2:"glv","2T":"glv","2B":"glv",3:"glv"},{l:"Macedonian",bh:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438",1:"mk",2:"mkd","2T":"mkd","2B":"mac",3:"mkd"},{l:"Malagasy",bh:"Malagasy",1:"mg",2:"mlg","2T":"mlg","2B":"mlg",3:"mlg"},{l:"Malay",bh:"Bahasa Melayu",1:"ms",2:"msa","2T":"msa","2B":"may",3:"msa"},{l:"Malayalam",bh:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",1:"ml",2:"mal","2T":"mal","2B":"mal",3:"mal"},{l:"Maltese",bh:"Malti",1:"mt",2:"mlt","2T":"mlt","2B":"mlt",3:"mlt"},{l:"M\u0101ori",bh:"M\u0101ori",1:"mi",2:"mri","2T":"mri","2B":"mao",3:"mri"},{l:"Marathi",bh:"\u092e\u0930\u093e\u0920\u0940",1:"mr",2:"mar","2T":"mar","2B":"mar",3:"mar"},{l:"Marshallese",bh:"Kajin M\u0327aje\u013c",1:"mh",2:"mah","2T":"mah","2B":"mah",3:"mah"},{l:"Mongolian",bh:"\u041c\u043e\u043d\u0433\u043e\u043b",1:"mn",2:"mon","2T":"mon","2B":"mon",3:"mon"},{l:"Nauru",bh:"Dorerin Naoero",1:"na",2:"nau","2T":"nau","2B":"nau",3:"nau"},{l:"Navajo",bh:"Din\xe9 Bizaad",1:"nv",2:"nav","2T":"nav","2B":"nav",3:"nav"},{l:"Northern Ndebele",bh:"isiNdebele",1:"nd",2:"nde","2T":"nde","2B":"nde",3:"nde"},{l:"Nepali",bh:"\u0928\u0947\u092a\u093e\u0932\u0940",1:"ne",2:"nep","2T":"nep","2B":"nep",3:"nep"},{l:"Ndonga",bh:"Owambo",1:"ng",2:"ndo","2T":"ndo","2B":"ndo",3:"ndo"},{l:"Norwegian Bokm\xe5l",bh:"Norsk (Bokm\xe5l)",1:"nb",2:"nob","2T":"nob","2B":"nob",3:"nob"},{l:"Norwegian Nynorsk",bh:"Norsk (Nynorsk)",1:"nn",2:"nno","2T":"nno","2B":"nno",3:"nno"},{l:"Norwegian",bh:"Norsk",1:"no",2:"nor","2T":"nor","2B":"nor",3:"nor"},{l:"Nuosu",bh:"\ua188\ua320\ua4bf Nuosuhxop",1:"ii",2:"iii","2T":"iii","2B":"iii",3:"iii"},{l:"Southern Ndebele",bh:"isiNdebele",1:"nr",2:"nbl","2T":"nbl","2B":"nbl",3:"nbl"},{l:"Occitan",bh:"Occitan",1:"oc",2:"oci","2T":"oci","2B":"oci",3:"oci"},{l:"Ojibwe",bh:"\u140a\u14c2\u1511\u14c8\u142f\u14a7\u140e\u14d0",1:"oj",2:"oji","2T":"oji","2B":"oji",3:"oji"},{l:"Old Church Slavonic",bh:"\u0421\u043b\u043e\u0432\u0463\u0301\u043d\u044c\u0441\u043a\u044a",1:"cu",2:"chu","2T":"chu","2B":"chu",3:"chu"},{l:"Oromo",bh:"Afaan Oromoo",1:"om",2:"orm","2T":"orm","2B":"orm",3:"orm"},{l:"Oriya",bh:"\u0b13\u0b21\u0b3f\u0b3c\u0b06",1:"or",2:"ori","2T":"ori","2B":"ori",3:"ori"},{l:"Ossetian",bh:"\u0418\u0440\u043e\u043d \xe6\u0432\u0437\u0430\u0433",1:"os",2:"oss","2T":"oss","2B":"oss",3:"oss"},{l:"Panjabi",bh:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",1:"pa",2:"pan","2T":"pan","2B":"pan",3:"pan"},{l:"P\u0101li",bh:"\u092a\u093e\u0934\u093f",1:"pi",2:"pli","2T":"pli","2B":"pli",3:"pli"},{l:"Persian",bh:"\u0641\u0627\u0631\u0633\u06cc",1:"fa",2:"fas","2T":"fas","2B":"per",3:"fas"},{l:"Polish",bh:"Polski",1:"pl",2:"pol","2T":"pol","2B":"pol",3:"pol"},{l:"Pashto",bh:"\u067e\u069a\u062a\u0648",1:"ps",2:"pus","2T":"pus","2B":"pus",3:"pus"},{l:"Portuguese",bh:"Portugu\xeas",1:"pt",2:"por","2T":"por","2B":"por",3:"por"},{l:"Quechua",bh:"Runa Simi",1:"qu",2:"que","2T":"que","2B":"que",3:"que"},{l:"Romansh",bh:"Rumantsch",1:"rm",2:"roh","2T":"roh","2B":"roh",3:"roh"},{l:"Kirundi",bh:"Kirundi",1:"rn",2:"run","2T":"run","2B":"run",3:"run"},{l:"Romanian",bh:"Rom\xe2n\u0103",1:"ro",2:"ron","2T":"ron","2B":"rum",3:"ron"},{l:"Russian",bh:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",1:"ru",2:"rus","2T":"rus","2B":"rus",3:"rus"},{l:"Sanskrit",bh:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d",1:"sa",2:"san","2T":"san","2B":"san",3:"san"},{l:"Sardinian",bh:"Sardu",1:"sc",2:"srd","2T":"srd","2B":"srd",3:"srd"},{l:"Sindhi",bh:"\u0633\u0646\u068c\u064a\u200e",1:"sd",2:"snd","2T":"snd","2B":"snd",3:"snd"},{l:"Northern Sami",bh:"S\xe1megiella",1:"se",2:"sme","2T":"sme","2B":"sme",3:"sme"},{l:"Samoan",bh:"Gagana S\u0101moa",1:"sm",2:"smo","2T":"smo","2B":"smo",3:"smo"},{l:"Sango",bh:"S\xe4ng\xf6",1:"sg",2:"sag","2T":"sag","2B":"sag",3:"sag"},{l:"Serbian",bh:"\u0421\u0440\u043f\u0441\u043a\u0438",1:"sr",2:"srp","2T":"srp","2B":"srp",3:"srp"},{l:"Gaelic",bh:"G\xe0idhlig",1:"gd",2:"gla","2T":"gla","2B":"gla",3:"gla"},{l:"Shona",bh:"ChiShona",1:"sn",2:"sna","2T":"sna","2B":"sna",3:"sna"},{l:"Sinhala",bh:"\u0dc3\u0dd2\u0d82\u0dc4\u0dbd",1:"si",2:"sin","2T":"sin","2B":"sin",3:"sin"},{l:"Slovak",bh:"Sloven\u010dina",1:"sk",2:"slk","2T":"slk","2B":"slo",3:"slk"},{l:"Slovene",bh:"Sloven\u0161\u010dina",1:"sl",2:"slv","2T":"slv","2B":"slv",3:"slv"},{l:"Somali",bh:"Soomaaliga",1:"so",2:"som","2T":"som","2B":"som",3:"som"},{l:"Southern Sotho",bh:"Sesotho",1:"st",2:"sot","2T":"sot","2B":"sot",3:"sot"},{l:"Spanish",bh:"Espa\xf1ol",1:"es",2:"spa","2T":"spa","2B":"spa",3:"spa"},{l:"Sundanese",bh:"Basa Sunda",1:"su",2:"sun","2T":"sun","2B":"sun",3:"sun"},{l:"Swahili",bh:"Kiswahili",1:"sw",2:"swa","2T":"swa","2B":"swa",3:"swa"},{l:"Swati",bh:"SiSwati",1:"ss",2:"ssw","2T":"ssw","2B":"ssw",3:"ssw"},{l:"Swedish",bh:"Svenska",1:"sv",2:"swe","2T":"swe","2B":"swe",3:"swe"},{l:"Tamil",bh:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",1:"ta",2:"tam","2T":"tam","2B":"tam",3:"tam"},{l:"Telugu",bh:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",1:"te",2:"tel","2T":"tel","2B":"tel",3:"tel"},{l:"Tajik",bh:"\u0422\u043e\u04b7\u0438\u043a\u04e3",1:"tg",2:"tgk","2T":"tgk","2B":"tgk",3:"tgk"},{l:"Thai",bh:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",1:"th",2:"tha","2T":"tha","2B":"tha",3:"tha"},{l:"Tigrinya",bh:"\u1275\u130d\u122d\u129b",1:"ti",2:"tir","2T":"tir","2B":"tir",3:"tir"},{l:"Tibetan Standard",bh:"\u0f56\u0f7c\u0f51\u0f0b\u0f61\u0f72\u0f42",1:"bo",2:"bod","2T":"bod","2B":"tib",3:"bod"},{l:"Turkmen",bh:"T\xfcrkmen\xe7e",1:"tk",2:"tuk","2T":"tuk","2B":"tuk",3:"tuk"},{l:"Tagalog",bh:"Tagalog",1:"tl",2:"tgl","2T":"tgl","2B":"tgl",3:"tgl"},{l:"Tswana",bh:"Setswana",1:"tn",2:"tsn","2T":"tsn","2B":"tsn",3:"tsn"},{l:"Tonga",bh:"faka Tonga",1:"to",2:"ton","2T":"ton","2B":"ton",3:"ton"},{l:"Turkish",bh:"T\xfcrk\xe7e",1:"tr",2:"tur","2T":"tur","2B":"tur",3:"tur"},{l:"Tsonga",bh:"Xitsonga",1:"ts",2:"tso","2T":"tso","2B":"tso",3:"tso"},{l:"Tatar",bh:"\u0422\u0430\u0442\u0430\u0440\u0447\u0430",1:"tt",2:"tat","2T":"tat","2B":"tat",3:"tat"},{l:"Twi",bh:"Twi",1:"tw",2:"twi","2T":"twi","2B":"twi",3:"twi"},{l:"Tahitian",bh:"Reo M\u0101\u2019ohi",1:"ty",2:"tah","2T":"tah","2B":"tah",3:"tah"},{l:"Uyghur",bh:"\u0626\u06c7\u064a\u063a\u06c7\u0631\u0686\u0647",1:"ug",2:"uig","2T":"uig","2B":"uig",3:"uig"},{l:"Ukrainian",bh:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",1:"uk",2:"ukr","2T":"ukr","2B":"ukr",3:"ukr"},{l:"Urdu",bh:"\u0627\u0631\u062f\u0648",1:"ur",2:"urd","2T":"urd","2B":"urd",3:"urd"},{l:"Uzbek",bh:"O\u2018zbek",1:"uz",2:"uzb","2T":"uzb","2B":"uzb",3:"uzb"},{l:"Venda",bh:"Tshiven\u1e13a",1:"ve",2:"ven","2T":"ven","2B":"ven",3:"ven"},{l:"Vietnamese",bh:"Ti\u1ebfng Vi\u1ec7t",1:"vi",2:"vie","2T":"vie","2B":"vie",3:"vie"},{l:"Volap\xfck",bh:"Volap\xfck",1:"vo",2:"vol","2T":"vol","2B":"vol",3:"vol"},{l:"Walloon",bh:"Walon",1:"wa",2:"wln","2T":"wln","2B":"wln",3:"wln"},{l:"Welsh",bh:"Cymraeg",1:"cy",2:"cym","2T":"cym","2B":"wel",3:"cym"},{l:"Wolof",bh:"Wolof",1:"wo",2:"wol","2T":"wol","2B":"wol",3:"wol"},{l:"Western Frisian",bh:"Frysk",1:"fy",2:"fry","2T":"fry","2B":"fry",3:"fry"},{l:"Xhosa",bh:"isiXhosa",1:"xh",2:"xho","2T":"xho","2B":"xho",3:"xho"},{l:"Yiddish",bh:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",1:"yi",2:"yid","2T":"yid","2B":"yid",3:"yid"},{l:"Yoruba",bh:"Yor\xf9b\xe1",1:"yo",2:"yor","2T":"yor","2B":"yor",3:"yor"},{l:"Zhuang",bh:"Cuengh",1:"za",2:"zha","2T":"zha","2B":"zha",3:"zha"},{l:"Zulu",bh:"isiZulu",1:"zu",2:"zul","2T":"zul","2B":"zul",3:"zul"}];r();function RH(t){var i;const e=null!=(i=function(t){const i=t.q0,e=new wl;return e.Q0(i,0,i.byteLength),TB(e).I1}(t))?i:24;return t.mft/e}function DH(t){return t.Km===ui.NR}function NH(t,i,e,s,n){const r=function(t,i,e,s){const n=e.mft,r=yo.fromNumber(t.eM||0),h=s.gO(ul.yF(r,n));return{wft:s.rF(),yft:s,bft:h,Aft:s}}(t,0,e,s),h=ul.bF(t.ct||0,e.mft),o=t.xD||0,a=!(65536&o)&&1!==(o>>24&3);let u;const c=dh(n),d=new oi;for(;d.act.mU(this,i))}Lft(t,i){return new WH(t,i).Oft()}},WH=class{Oft(){if(this.Fft)return[];for(let t=0;t=e)return;const s=hs(t,(t,i)=>new WH(t.map(t=>t?t.Xft():null),i).Oft());return 0!==s.length?new VH(i,e,s):void 0}},GH="black",XH="white";r(),r();var jH=[[42,225],[92,233],[94,237],[95,243],[96,250],[123,231],[124,247],[125,209],[126,241],[127,9608],[128,174],[129,176],[130,189],[131,191],[132,8482],[133,162],[134,163],[135,9834],[136,224],[137,32],[138,232],[139,226],[140,234],[141,238],[142,244],[143,251],[144,193],[145,201],[146,211],[147,218],[148,220],[149,252],[150,8216],[151,161],[152,42],[153,8217],[154,9473],[155,169],[156,8480],[157,8226],[158,8220],[159,8221],[160,192],[161,194],[162,199],[163,200],[164,202],[165,203],[166,235],[167,206],[168,207],[169,239],[170,212],[171,217],[172,249],[173,219],[174,171],[175,187],[176,195],[177,227],[178,205],[179,204],[180,236],[181,210],[182,242],[183,213],[184,245],[185,123],[186,125],[187,92],[188,94],[189,95],[190,124],[191,8764],[192,196],[193,228],[194,214],[195,246],[196,223],[197,165],[198,164],[199,9475],[200,197],[201,229],[202,216],[203,248],[204,9487],[205,9491],[206,9495],[207,9499]].reduce((t,i)=>(t[i[0]]=i[1],t),{}),QH=class{jft(t){for(let i=0;iuo&&(this.Jft=31)}Zft(t){const i=this.Jft+t;this.Yft(i)}$ft(){this.Zft(-1),this.Qft[this.Jft]=null}Dft(t){t>=144&&this.$ft();const i=function(t){return jH[t]?String.fromCharCode(jH[t]):String.fromCharCode(t)}(t);this.addParsedChar(i)}addParsedChar(t){this.Jft>=uo||(32===Number(t)?(this.Qft[this.Jft]=this.tvt?"":"",this.tvt=!this.tvt):this.Qft[this.Jft]=t,this.Zft(1))}ivt(t){for(let i=t;i=i)return null;const s=(new HH).Mft(this.avt.slice(1));return 0===s.length?null:{PO:new VH(t,i,s),zT:e,uvt:this.rvt<<1|this.ovt+1}}hr(){this.cvt(),this.dvt=1}lvt(){return this.dvt}fvt(t){this.dvt=t}Yft(t){this.avt[this.dvt].Yft(t)}Zft(t){this.avt[this.dvt].Zft(t)}vvt(){return this._vt}gvt(t){this._vt=t}Dft(t,i){if(i<32||i>127)return;let e="";switch(t){case 0:e=void 0!==YH[i]?YH[i]:String.fromCharCode(i);break;case 1:e=JH[i];break;case 2:this.pvt(),e=ZH[i];break;case 3:this.pvt(),e=$H[i]}e&&this.avt[this.dvt].addParsedChar(e)}pvt(){this.avt[this.dvt].$ft()}mvt(t,i,e){if(t>=i)for(let s=e-1;s>=0;s--)this.avt[t+s]=this.avt[i+s];else for(let s=0;s0?this._vt:0,this.cvt()}bvt(t){this.Avt=t}Svt(t){this.Tvt=t}kvt(t){this.Evt=t}xvt(t){this.Pvt=t}constructor(t,i){this.avt=void 0,this.dvt=void 0,this._vt=void 0,this.rvt=void 0,this.ovt=void 0,this.Avt=void 0,this.Tvt=void 0,this.Evt=void 0,this.Pvt=void 0,this.avt=new Array(yc+1);for(let t=0;t<=yc;t++)this.avt[t]=new QH;this.dvt=1,this._vt=0,this.rvt=t,this.ovt=i,this.Avt=!1,this.Tvt=!1,this.Evt=XH,this.Pvt=GH,this.hr()}},yc=15,bt=function(t){return t[t.Ivt=0]="Ivt",t[t.Cvt=1]="Cvt",t[t.Rvt=2]="Rvt",t[t.Dvt=3]="Dvt",t}({}),YH={39:"\u2019",42:"\xe1",92:"\xe9",94:"\xed",95:"\xf3",96:"\xfa",123:"\xe7",124:"\xf7",125:"\xd1",126:"\xf1",127:"\u2588"},JH={48:"\xae",49:"\xb0",50:"\xbd",51:"\xbf",52:"\u2122",53:"\xa2",54:"\xa3",55:"\u266a",56:"\xe0",57:"\u2800",58:"\xe8",59:"\xe2",60:"\xea",61:"\xee",62:"\xf4",63:"\xfb"},ZH={32:"\xc1",33:"\xc9",34:"\xd3",35:"\xda",36:"\xdc",37:"\xfc",38:"\u2018",39:"\xa1",40:"*",41:"'",42:"\u2500",43:"\xa9",44:"\u2120",45:"\xb7",46:"\u201c",47:"\u201d",48:"\xc0",49:"\xc2",50:"\xc7",51:"\xc8",52:"\xca",53:"\xcb",54:"\xeb",55:"\xce",56:"\xcf",57:"\xef",58:"\xd4",59:"\xd9",60:"\xf9",61:"\xdb",62:"\xab",63:"\xbb"},$H={32:"\xc3",33:"\xe3",34:"\xcd",35:"\xcc",36:"\xec",37:"\xd2",38:"\xf2",39:"\xd5",40:"\xf5",41:"{",42:"}",43:"\\",44:"^",45:"_",46:"|",47:"~",48:"\xc4",49:"\xe4",50:"\xd6",51:"\xf6",52:"\xdf",53:"\xa5",54:"\xa4",55:"\u2502",56:"\xc5",57:"\xe5",58:"\xd8",59:"\xf8",60:"\u250c",61:"\u2510",62:"\u2514",63:"\u2518"},tW=class{hr(){this.Nvt=!0,this.Bvt=0,this.Vp=0,this.Mvt=this.Lvt,this.Ovt=void 0,this.Lvt.hr(),this.Fvt.hr(),this.Uvt.hr()}Vvt(t,i){return[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&t)<<1|i>>5&1]}Hvt(t,i){const e=this.Vvt(t,i),s=(30&i)>>1;let n=XH,r=!1;s<7?n=sW[s]:7===s&&(r=!0);const h=!(1&~i);if(4===this.Vp)return;const o=this.Mvt;if(3===this.Vp&&e!==o.lvt()){const t=1+o.lvt()-o.vvt(),i=1+e-o.vvt();o.mvt(i,t,o.vvt()),o.wvt(0,i-1),o.wvt(e+1,yc-e)}o.fvt(e);const a=cF[t<<1&14|i>>5&1]-1;if(a<0)return;const u=function(t,i){const e=i>95?i-96:i-64;return{wit:uF[e].wit,mit:uF[e].mit,yit:uF[e].yit,Dit:t}}(a,i);o.Yft(u.yit),this.Mvt.bvt(h),this.Mvt.Svt(r),this.Mvt.kvt(n),this.Mvt.xvt(GH)}Wvt(t,i){this.Mvt.bvt(!1),this.Mvt.Svt(!1),this.Mvt.kvt(XH);const e=this.qvt(t,bt.Ivt," ".charCodeAt(0));let s=XH,n=!1;const r=!(1&~i);return s=sW[(14&i)>>1],"white_italics"===s&&(s="white",n=!0),this.Mvt.bvt(r),this.Mvt.Svt(n),this.Mvt.kvt(s),e}qvt(t,i,e){if(this.Mvt.Dft(i,e),2===this.Vp||3===this.Vp){const i=this.zvt(this.Mvt,this.Bvt,t);return this.Bvt=t,i}return null}zvt(t,i,e){return this.Nvt?null:2===this.Vp||3===this.Vp?t.nvt(e,e+10):t.nvt(i,e)}Gvt(t,i){let e=GH;7&t||(e=eW[(14&i)>>1]),this.Mvt.xvt(e)}Xvt(t){const i=iW,e=t.jvt,s=t.Qvt;let n=null;switch(e){case i.RCL:this.Kvt();break;case i.BS:this.Yvt();break;case i.AOD:case i.AON:case i.DER:break;case i.RU2:n=this.Jvt(2,s);break;case i.RU3:n=this.Jvt(3,s);break;case i.RU4:n=this.Jvt(4,s);break;case i.FON:n=this.Zvt(s);break;case i.RDC:this.$vt(s);break;case i.TR:this.t_t();break;case i.RTD:this.i_t();break;case i.EDM:n=this.e_t(s);break;case i.CR:n=this.s_t(s);break;case i.ENM:this.n_t();break;case i.EOC:n=this.r_t(s)}return n}s_t(t){const i=this.Mvt;if(3!==this.Vp)return null;const e=this.zvt(i,this.Bvt,t),s=i.lvt()-i.vvt()+1;return i.mvt(s-1,s,i.vvt()),i.wvt(0,s-1),i.wvt(i.lvt(),yc-i.lvt()),this.Bvt=t,e}Jvt(t,i){this.Mvt=this.Lvt;const e=this.Mvt;let s=null;return 3!==this.Vp&&4!==this.Vp&&(s=this.zvt(e,this.Bvt,i),this.Lvt.yvt(),this.Fvt.yvt(),this.Nvt=!1,e.fvt(yc)),this.Vp=3,e.gvt(t),s}Zvt(t){return this.qvt(t,bt.Ivt," ".charCodeAt(0))}e_t(t){const i=this.Lvt;let e=null;return 4!==this.Vp&&(e=this.zvt(i,this.Bvt,t)),i.cvt(),this.Nvt=!1,e}$vt(t){this.Vp=2,this.Mvt=this.Lvt,this.Mvt.gvt(0),this.Bvt=t}n_t(){this.Fvt.cvt()}r_t(t){let i=null;4!==this.Vp&&(i=this.zvt(this.Lvt,this.Bvt,t));const e=this.Fvt;return this.Fvt=this.Lvt,this.Lvt=e,this.Kvt(),this.Bvt=t,i}Kvt(){this.Vp=1,this.Mvt=this.Fvt,this.Mvt.gvt(0)}Yvt(){this.Mvt.pvt()}t_t(){this.Uvt.hr(),this.Nvt=!1,this.i_t()}i_t(){this.Mvt=this.Uvt,this.Vp=4}h_t(t,i,e){return this.Mvt.Dft(bt.Ivt,i),this.qvt(t,bt.Ivt,e)}o_t(t,i,e){const s=1&i?bt.Dvt:bt.Rvt;return this.qvt(t,s,e)}a_t(t){const i=t.u_t,e=t.jvt,s=t.Qvt;if(this.Ovt===(i<<8|e))return this.Ovt=void 0,null;if(this.Ovt=i<<8|e,this.c_t(i,e))this.Hvt(i,e);else{if(this.d_t(i,e))return this.Wvt(s,e);if(this.l_t(i,e))this.Gvt(i,e);else{if(this.f_t(i,e))return this.qvt(s,bt.Cvt,e);if(this.v_t(i,e))return this.o_t(s,i,e);if(this.__t(i,e))return this.Xvt(t);this.isTabOffset(i)&&this.Mvt.Zft(e-32)}}return null}isTabOffset(t){return 23===t||31===t}__t(t,i){return 20==(246&t)&&32==(240&i)}c_t(t,i){return 16==(240&t)&&64==(192&i)}d_t(t,i){return 17==(247&t)&&32==(240&i)}l_t(t,i){return 16==(247&t)&&32==(240&i)||23==(247&t)&&45==(255&i)}f_t(t,i){return 17==(247&t)&&48==(240&i)}v_t(t,i){return 18==(246&t)&&32==(224&i)}static g_t(t){return 16==(112&t)}constructor(t,i){this.Vp=void 0,this.Uvt=void 0,this.Lvt=void 0,this.Fvt=void 0,this.Mvt=void 0,this.Bvt=void 0,this.Ovt=void 0,this.Nvt=void 0,this.Vp=0,this.Uvt=new KH(t,i),this.Lvt=new KH(t,i),this.Fvt=new KH(t,i),this.Mvt=this.Lvt,this.Bvt=0,this.Ovt=void 0,this.Nvt=!1}},iW={RCL:32,BS:33,AOD:34,AON:35,DER:36,RU2:37,RU3:38,RU4:39,FON:40,RDC:41,TR:42,RTD:43,EDM:44,CR:45,ENM:46,EOC:47},eW=["black","green","blue","cyan","red","yellow","magenta","black"],sW=["white","green","blue","cyan","red","yellow","magenta","white_italics"];r(),r(),r();var nW=class{Xft(){return this.p_t}m_t(){return this.Avt}w_t(){return this.Tvt}y_t(){return this.Pvt}b_t(){return this.Evt}constructor(t,i,e,s,n){this.p_t=void 0,this.Avt=void 0,this.Tvt=void 0,this.Pvt=void 0,this.Evt=void 0,this.p_t=t,this.Avt=i,this.Tvt=e,this.Pvt=s,this.Evt=n}},rW=class{A_t(t,i,e,s,n,r,h){this.kz=t,this.S_t=i,this.T_t=e,this.k_t=s,this.E_t=n,this.x_t=r,this.P_t=h}I_t(){this.C_t=[];for(let t=0;t=0,i=this.B_t=0;return t&&i}Re(){return this.kz}L_t(t){let i=0;for(let e=t;e=this.x_t)return this.L_t(1),void(this.B_t=0);this.dvt++,this.B_t=0}F_t(){this.C_t[this.dvt]=this.R_t(),this.B_t=0}nvt(t,i){if(this.HO>=t)return null;const e=zH.Gft(this.C_t,this.HO,t);return e?(this.U_t(t),{PO:e,zT:"svc"+i,uvt:i}):null}V_t(t,i){this.dvt=t,this.B_t=i}H_t(t){this.Pvt=t}W_t(t){this.Evt=t}q_t(t){this.Avt=t}z_t(t){this.Tvt=t}G_t(){this.dvt=0,this.B_t=0,this.Avt=!1,this.Tvt=!1,this.Evt=XH,this.Pvt=GH}X_t(t){this.j_t=t}Q_t(){this.kz=!0}we(){this.kz=!1}Mh(){this.kz=!this.kz}U_t(t){this.HO=t}constructor(t){this.K_t=void 0,this.kz=void 0,this.E_t=void 0,this.T_t=void 0,this.S_t=void 0,this.k_t=void 0,this.x_t=void 0,this.P_t=void 0,this.j_t=void 0,this.C_t=void 0,this.HO=void 0,this.dvt=void 0,this.B_t=void 0,this.Tvt=void 0,this.Avt=void 0,this.Evt=void 0,this.Pvt=void 0,this.K_t=t,this.kz=!1,this.E_t=!1,this.T_t=0,this.S_t=0,this.k_t=0,this.x_t=0,this.P_t=0,this.j_t=2,this.C_t=[],this.HO=0,this.dvt=0,this.B_t=0,this.Tvt=!1,this.Avt=!1,this.Evt=XH,this.Pvt=GH,this.I_t()}},hW=42,oW=15,aW=class{Y_t(t){const i=t.J_t();let e=i.XE;const s=i.Qvt;if(e===fW){e=e<<16|t.J_t().XE}return e>=0&&e<=31?this.Z_t(e,s):e>=128&&e<=159?this.$_t(t,e,s):(e>=4096&&e<=4127?this.tgt(t,255&e):e>=4224&&e<=4255?this.igt(t,255&e):e>=32&&e<=127?this.egt(e):e>=160&&e<=255?this.sgt(e):e>=4128&&e<=4223?this.ngt(255&e):e>=4256&&e<=4351&&this.rgt(255&e),null)}egt(t){this.hgt&&(127!==t?this.hgt.D_t(String.fromCharCode(t)):this.hgt.D_t("\u266a"))}sgt(t){this.hgt&&this.hgt.D_t(String.fromCharCode(t))}ngt(t){if(!this.hgt)return;if(void 0===vW[t])return void this.hgt.D_t("_");const i=vW[t];this.hgt.D_t(i)}rgt(t){this.hgt&&(160===t?this.hgt.D_t("[CC]"):this.hgt.D_t("_"))}Z_t(t,i){if(!this.hgt)return null;const e=this.hgt;let s=null;switch(t){case uW:e.M_t();break;case dW:e.Re()&&(s=e.nvt(i,this.ogt)),e.O_t();break;case lW:e.Re()&&(s=e.nvt(i,this.ogt)),e.F_t();break;case cW:e.Re()&&(s=e.nvt(i,this.ogt)),e.I_t(),e.V_t(0,0)}return s}$_t(t,i,e){if(i>=128&&i<=135){const t=7&i;this.agt(t)}else{if(136===i){const i=t.J_t().XE;return this.ugt(i,e)}if(137===i){const i=t.J_t().XE;this.cgt(i,e)}else{if(138===i){const i=t.J_t().XE;return this.dgt(i,e)}if(139===i){const i=t.J_t().XE;return this.lgt(i,e)}if(140===i){const i=t.J_t().XE;return this.fgt(i,e)}if(143===i)return this.hr(e);if(144===i)this.vgt(t);else if(145===i)this._gt(t);else if(146===i)this.V_t(t);else if(151===i)this.ggt(t);else if(i>=152&&i<=159){const s=(15&i)-8;this.A_t(t,s,e)}}}return null}tgt(t,i){i>=8&&i<=15?t.uD(1):i>=16&&i<=23?t.uD(2):i>=24&&i<=31&&t.uD(3)}igt(t,i){i>=128&&i<=135?t.uD(4):i>=136&&i<=143&&t.uD(5)}agt(t){this.pgt[t]&&(this.hgt=this.pgt[t])}*mgt(t){for(let i=0;i<8;i++){!(1&~t)&&this.pgt[i]&&(yield i),t>>=1}}ugt(t,i){let e=null;for(const s of this.mgt(t)){const t=this.pgt[s];t.Re()&&(e=t.nvt(i,this.ogt)),t.I_t()}return e}cgt(t,i){for(const e of this.mgt(t)){const t=this.pgt[e];t.Re()||t.U_t(i),t.Q_t()}}dgt(t,i){let e=null;for(const s of this.mgt(t)){const t=this.pgt[s];t.Re()&&(e=t.nvt(i,this.ogt)),t.we()}return e}lgt(t,i){let e=null;for(const s of this.mgt(t)){const t=this.pgt[s];t.Re()?e=t.nvt(i,this.ogt):t.U_t(i),t.Mh()}return e}fgt(t,i){let e=null;for(const s of this.mgt(t)){const t=this.pgt[s];t.Re()&&(e=t.nvt(i,this.ogt)),this.pgt[s]=void 0}return e}hr(t){const i=this.fgt(255,t);return this.jy(),i}jy(){this.hgt=void 0,this.pgt=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0]}vgt(t){t.uD(1);const i=t.J_t().XE;if(!this.hgt)return;const e=(128&i)>0,s=(64&i)>0;this.hgt.z_t(e),this.hgt.q_t(s)}_gt(t){const i=t.J_t().XE,e=t.J_t().XE;if(t.uD(1),!this.hgt)return;const s=3&i,n=(12&i)>>2,r=(48&i)>>4,h=3&e,o=(12&e)>>2,a=(48&e)>>4,u=this.wgt(r,n,s),c=this.wgt(a,o,h);this.hgt.W_t(u),this.hgt.H_t(c)}V_t(t){const i=t.J_t().XE,e=t.J_t().XE;if(!this.hgt)return;const s=15&i,n=63&e;this.hgt.V_t(s,n)}ggt(t){t.uD(1),t.uD(1);const i=t.J_t().XE;if(t.uD(1),!this.hgt)return;const e=3&i;this.hgt.X_t(e)}A_t(t,i,e){const s=void 0!==this.pgt[i];if(!s){const t=new rW(i);t.U_t(e),this.pgt[i]=t}const n=t.J_t().XE,r=t.J_t().XE,h=t.J_t().XE,o=t.J_t().XE,a=t.J_t().XE,u=t.J_t().XE,c=(32&n)>0,d=127&r,l=(128&r)>0,f=h,v=1+(15&o),_=(240&o)>>4,g=1+(63&a);s&&0===(7&u)||this.pgt[i].G_t(),this.pgt[i].A_t(c,d,f,_,l,v,g),this.hgt=this.pgt[i]}wgt(t,i,e){const s={0:0,1:0,2:1,3:1};return _W[s[t]<<2|s[i]<<1|s[e]]}constructor(t){this.ogt=void 0,this.pgt=void 0,this.hgt=void 0,this.ogt=t,this.pgt=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0],this.hgt=void 0}},uW=8,cW=12,dW=13,lW=14,fW=16,vW={32:" ",33:"\xa0",37:"\u2026",42:"\u0160",44:"\u0152",48:"\u2588",49:"\u2018",50:"\u2019",51:"\u201c",52:"\u201d",53:"\u2022",57:"\u2122",58:"\u0161",60:"\u0153",61:"\u2120",63:"\u0178",118:"\u215b",119:"\u215c",120:"\u215d",121:"\u215e",122:"\u2502",123:"\u2510",124:"\u2514",125:"\u2500",126:"\u2518",127:"\u250c"},_W=["black","blue","green","cyan","red","magenta","yellow","white"];r();var gW=class{ygt(t){if(t.Km===Vr.cft){const i=63&t.XE;return this.bgt=2*i-1,void(this.Agt=[])}if(this.Agt&&(this.bgt>0&&(this.Agt.push(t),this.bgt--),0===this.bgt)){const t=new pW(this.Agt);this.Sgt.push(t),this.Agt=null,this.bgt=0}}Tgt(){return this.Sgt}kgt(){this.Sgt=[]}jy(){this.Sgt=[],this.Agt=[],this.bgt=0}constructor(){this.Sgt=void 0,this.Agt=void 0,this.bgt=void 0,this.Sgt=[],this.Agt=null,this.bgt=0}},pW=class{Egt(){return this.xgtthis.Pgt.length)throw new as(me.SUBTITLE_PARSE_ERROR,"Buffer read out of bounds / invalid CEA-708 Data.");this.xgt+=t}constructor(t){this.xgt=void 0,this.Pgt=void 0,this.xgt=0,this.Pgt=t}},mW=class{jy(){this.Cgt=0,this.Rgt=[],this.Dgt=[],this.Ngt.jy(),this.hr(),this.Bgt.forEach(t=>{t.jy()})}hr(){this.Mgt=0,this.Lgt=0,this.Ogt.forEach(t=>{t.hr()})}Fgt(t,i){if(t.fft){const e=t._ft,s=t.gft,n=t.Km;n===Vr.oft||n===Vr.aft?this.Rgt.push({Qvt:i,Km:n,u_t:e,jvt:s,Ugt:this.Rgt.length}):this.Vgt&&(this.Dgt.push({Qvt:i,Km:n,XE:e,Ugt:this.Dgt.length}),this.Dgt.push({Qvt:i,Km:Vr.uft,XE:s,Ugt:this.Dgt.length}))}}dj(){const t=[];this.Rgt.sort((t,i)=>t.Qvt-i.Qvt||t.Ugt-i.Ugt),this.Dgt.sort((t,i)=>t.Qvt-i.Qvt||t.Ugt-i.Ugt);for(const i of this.Rgt){const e=this.Hgt(i);e&&t.push(e)}for(const t of this.Dgt)this.Ngt.ygt(t);const i=this.Ngt.Tgt();for(const e of i){const i=this.Wgt(e);t.push(...i)}return this.Ngt.kgt(),this.Rgt=[],this.Dgt=[],t}Hgt(t){const i=t.Km;if(tW.g_t(t.u_t)){const e=t.u_t>>3&1;0===i?this.Mgt=e:this.Lgt=e}const e="CC"+(i<<1|(i?this.Lgt:this.Mgt)+1),s=this.Ogt.get(e);return 255===t.u_t&&255===t.jvt||!t.u_t&&!t.jvt||!this.qgt(t.u_t)||!this.qgt(t.jvt)?(++this.Cgt>=45&&this.hr(),null):(this.Cgt=0,t.u_t&=127,t.jvt&=127,t.u_t||t.jvt?tW.g_t(t.u_t)?s.a_t(t):s.h_t(t.Qvt,t.u_t,t.jvt):null)}Wgt(t){const i=[];try{for(;t.Egt();){const e=t.J_t().XE;let s=(224&e)>>5;const n=31&e;if(7===s&&0!==n){s=63&t.J_t().XE}if(0!==s){if(!this.Bgt.has(s)){const t=new aW(s);this.Bgt.set(s,t)}const e=this.Bgt.get(s),r=t.Igt();for(;t.Igt()-r>=1;return 1===i}constructor(){this.Rgt=void 0,this.Dgt=void 0,this.Ngt=void 0,this.Cgt=void 0,this.Ogt=void 0,this.Mgt=void 0,this.Lgt=void 0,this.Bgt=void 0,this.Vgt=!1,this.Rgt=[],this.Dgt=[],this.Ngt=new gW,this.Cgt=0,this.Ogt=Eg({CC1:new tW(0,0),CC2:new tW(0,1),CC3:new tW(1,0),CC4:new tW(1,1)}),this.Mgt=0,this.Lgt=0,this.Bgt=re(),this.hr()}};r();var wW=class extends gp{constructor(t,i){super("zgt"),this.uvt=void 0,this.PO=void 0,this.uvt=t,this.PO=i}},yW=ul.hU(.1),bW=class extends Ne{Ggt(t,i){this.Xgt.Fgt(t,i)}dj(){const t=this.Xgt.dj();for(const i of t)this.So(new wW(i.uvt,i.PO))}hr(){this.Xgt.jy()}kn(){this.Vo(),this.Xgt.jy()}constructor(){super(),this.Xgt=void 0,this.Xgt=new mW}},AW=class extends bW{jgt(t,i,e,s){const n=this.Qgt(t,s);this.Kgt(n,i,e),this.dj()}Qgt(t,i){const e=t.slice().sort(dF),s=this.Ygt;if(0===s.length)return e;if(0===e.length)return s;let n;const r=s[0].Ait,h=s[s.length-1].Ait,o=e[0].Ait,a=s[0].qot===e[0].qot;if(h.gF(o).fF().lF(ul.hU(2.5*i))&&a)n=s.concat(e).sort(dF);else if(o.aF(r)){let t=0;for(;tt.Km===ui.tR);if(!s){const t=e.filter(t=>t.Km===ui.DR),i=hh(t,t=>{var i;return(null==(i=t.dB)?void 0:i.Km)===ui.tR});i&&(s=i.dB)}if(!s)continue;const n=fB(dh(s.ZN.lk),new oi),r=s.tB;return Y({},t,{sN:i.yD.sN,ZN:am(s.ZN.lk),Ti:s.Ti,Mi:s.Mi,MB:r&&r.MB,BB:r&&r.BB,a2:n.U0,npt:n.V0,u2:n.H0,q0:n.q0[0],z0:n.z0[0]})}}(hh(i,MH))}elt(t,i,e,s,n,r){var h;if(!this.spt)return;if(!S(this.rpt)&&rs(this.rpt,i,1e-5))return;S(this.hpt)||rs(this.hpt,i,.1)||this.opt.hr();const o=function(t,i,e,s,n){const r=[],h=i.filter(DH),o=s(e);for(const i of h){const s=hh(i.Z,t=>t.yD.sN===e.sN);if(!s)continue;const h=s.yD.FB||0,u=s.yD.UB||0;let c=s.KB?s.KB.KB:yo.ZERO;var a;const d=i.qB+(null!=(a=s.yD.YB)?a:yo.ZERO).toNumber();for(const a of s.QB){let s=d+(a.qB||0);for(const d of a.iM){const a=d.Wy||u,l=new wl;l.Q0(t,s,s+a);const f=ul.yF(c,e.mft);l.LU=n(d,i,e,f,di(t,s,s+a)),r.push(l),s+=a,c=c.add(d.ct||h||o)}}}return r}(t,Hn.PD(dh(t)),this.spt,RH,NH);var a;const u=null!=(a=null==(h=df(o,t=>t.LU.ct))?void 0:h.LU.ct)?a:0,c=function(t){const i=[];for(const e of t)e.LU.xft&&i.push(...e.LU.xft),delete e.LU.xft;for(let t=0;t{i===t&&this.Zgt.set(e,s)}),s}hr(){return this.opt.hr(),this.Zgt.forEach(t=>{t.kn(),this.it(t),this.cpt(t)}),this.Zgt.clear(),this.spt=void 0,this.rpt=NaN,this.hpt=NaN,super.hr()}kn(){return this.opt.mn("zgt",this.dpt),this.opt.kn(),super.kn()}constructor(t){super(t),this.opt=void 0,this.spt=void 0,this.rpt=NaN,this.hpt=NaN,this.Zgt=void 0,this.dpt=t=>{const i=this.$gt({Sit:t.uvt,Tit:""}),e=t.PO;for(const t of i.L.NI)e.COt.CO?e.RO=t.CO:e.CO>t.CO&&t.RO>e.CO?t.RO=e.CO:e.CO===t.CO&&(e.RO=t.RO);this.lpt(i,e)},this.Zgt=re(),this.opt=new AW,this.opt.wn("zgt",this.dpt)}},kW=class extends TW{cpt(t){}lpt(t,i){if(t.Qk===xh.Nh)return;const e=i.U.map(t=>t.Xit).join("\n"),s=hf(t.L.NI,-1);s&&s.U===e&&s.CO<=i.CO&&i.CO<=s.RO?s.RO=_.max(s.RO,i.RO):t.q8(i.CO,i.RO,e)}ept(t,i,e){return this.iV.Tq({Km:"webvtt",Lt:us.WU,Th:t,bs:i})}upt(t,i,e){return t}},wt=class extends TW{cpt(t){this.iV.rV(t)}lpt(t,i){t.nV(i)}ept(t,i,e){return this.iV.sI(us.WU,t,t,i,!1,nh.CEA608,void 0,e)}upt(t,i,e){return ht(t,i,e)}};r(),r();var EW=/(.*)=(.*)/,xW=/(.*):(.*)/;function PW(t){if(!t)return[];const i=[],e=t.trim().split(";");for(const t of e){const e=t.match(EW);if(e){const[,t,s]=e;let n="",r=!1;for(const t of s.trim().split(","))if(t.match(xW)){const[,i,e]=t.match(xW);switch(i){case"lang":n=e;break;case"er":r=Boolean(Number(e))}}i.push({Sit:Number(t),Tit:n,ipt:r})}}return i}var IW={1:1,2:3,3:2,4:4},CW="urn:scte:dash:cc:cea-608:2015",RW="urn:scte:dash:cc:cea-708:2015";r(),r();var DW=class extends Oi{xa(){return new NW(this.qot&&this.qot.Ca)}constructor(t,i,e){super(Te.II),this.qot=void 0,this.Yut=void 0,this.fpt=void 0,this.qot=t,this.Yut=i,this.fpt=e}},NW=class extends gp{constructor(t){super("activequalitychanged"),this.quality=void 0,this.quality=t}},BW=[d.uo,Jr.AI,d.py],MW=class extends Ne{vpt(t){const i=this.Nlt.Kot;for(const e of i.Ht.xat)if(i.mct.vct(t,e))return e}kn(){this.Vo(),this.PL.mn(BW,this._pt)}constructor(t,i){super(),this.PL=void 0,this.Nlt=void 0,this.gpt=void 0,this._pt=t=>{const i=this.gpt,e=this.vpt(t.currentTime)||this.Nlt.Got;e&&i!==e&&(this.gpt=e,e.qot&&this.So(new DW(e.qot,null==e?void 0:e.Ca,null==i?void 0:i.Ca)))},this.PL=t,this.PL.wn(BW,this._pt),this.Nlt=i}};function LW(t,i,e){const s=new yu(dh(t),new oi),n=ha.mD(s,ui.HC);if(!n)return;const r=ha.lD(n.lk),h=hh(r,t=>t.Km===ui.qC),o=hh(r,t=>t.Km===ui.qR);if(!h)return;const a=ha.mD(h.lk,ui.GC);if(!a)return;const u=ha.mD(a.lk,ui.QC);if(!u)return;const c=ha.mD(u.lk,ui.KC);if(!c)return;const d=ha.lD(c.lk),l=hh(d,t=>t.Km===ui.YC);if(!l)return;const f=ha.kD(l.lk,ui.YC,!1),v=new yu(dh(f.lk),new oi);v.uD(4);const _=ha.lD(v),g=[];for(const t of _){if(t.Km===ui.RR||t.Km===ui.DR)return;t.Km===ui.tR?g.push({ppt:t,mpt:ui.DR}):t.Km===ui.AR&&g.push({ppt:t,mpt:ui.RR})}if(!function(t,i){return void 0===t&&void 0!==i&&i.length>0}(o,i)&&0===g.length)return;let p=nr(t);const m=hh(r,t=>t.Km===ui.ZC),w=m?ha.mD(m.lk,ui.$C):void 0,y=w?function(t){const i=t.lk.Fy();return i.uD(4),i.uD(4),i.eD()}(w):1,b=hh(d,t=>t.Km===ui.JC);b&&function(t,i,e){const s=UW(dh(t),i),n=ha.pD(s,new oi),r=n.lk;r.uD(4);const h=r.eD();for(let t=0;t=0;t--){const i=g[t];p=FW(p,i.ppt,l,A,i.mpt,e)}return{wpt:p,ypt:{bpt:g.length,OB:y}}}function OW(t,i,e){const s=_m(t,e,i.lk.lk.byteOffset+i.lk.lk.byteLength);return VW(UW(dh(s),i),e.byteLength),s}function FW(t,i,e,s,n,r){const h=function(t,i,e){0;const s=t.lk.lk,n=GW(),r=new j(s.byteLength+n.byteLength),h=dh(r);r.set(ye(s),0),VW(h,n.byteLength),Yp(h,new oi(QW),i),r.set(n,s.byteLength),Yp(h,new oi(s.byteLength+XW),t.Km),e&&Ar(h,new oi(s.byteLength+jW),e);return r}(i,n,r),o=_m(t,h,i.lk.lk.byteOffset),a=dh(o);!function(t,i){const e=ha.pD(t,new oi),s=ha.kD(e.lk,ui.YC,!1),n=dh(s.lk),r=n.getUint32(0);n.setUint32(0,r+i)}(UW(a,e),1);for(const t of s)VW(UW(a,t),h.byteLength);return o}function UW(t,i){const e=i.lk.lk.byteOffset;return Wu(t,e,e+i.lk.lk.byteLength)}function VW(t,i){const e=new oi,s=ti(t,e);if(0===s);else if(1===s){e.Ly(4);const s=qt(t,e.Fy());Gp(t,e,s.add(i))}else e.Oy(0),kl(t,e,s+i)}r();var HW=class extends Qa{start(t){this.iZ=t}transform(t){this.E$(t),this.Apt()}flush(){this.P$(),this.Apt()}L$(t){return t===ui.NR}F$(t){let i=nr(ye(t.lk.lk));const e=ha.pD(dh(i),new oi);i=WW(i,e,this.Spt),this.Tpt.push(i)}V$(t){this.Tpt.push(t)}Apt(){for(const t of function(t){if(t.length<2)return t;const i=[];let{buffer:e,byteOffset:s,byteLength:n}=t[0];for(let r=1;r=0;t--){const r=n[t];r.Km===ui.LR&&(s=qW(s,r,i,e))}return s}function qW(t,i,e,s){const n=UW(dh(t),i),r=ha.pD(n,new oi),h=ha.lD(r.lk),o=hh(h,t=>t.Km===ui.OR);if(!o)return t;const a=o.lk,u=a.$R.Fy(),c=a.eD(),{flags:d}=AT(c);a.uD(4),d.Uy(bo.BASE_DATA_OFFSET_PRESENT)&&a.uD(8);const l=a.$R.Fy();if(d.Uy(bo.SAMPLE_DESCRIPTION_INDEX_PRESENT)){const i=ti(a.lk,l);return kl(a.lk,a.$R,i+s.bpt),t}{kl(a.lk,u,c|bo.SAMPLE_DESCRIPTION_INDEX_PRESENT);const n=new j(4);dh(n).setUint32(0,s.OB+s.bpt);const r=a.lk.byteOffset+l.ac;for(const t of h.filter(t=>t.Km===ui.FR))zW(t,n.byteLength);for(const s of[o,i,e])VW(UW(dh(t),s),n.byteLength);return _m(t,n,r)}}function zW(t,i){const e=t.lk,s=e.eD(),{flags:n}=AT(s);if(e.uD(4),n.Uy(Rr.DATA_OFFSET_PRESENT)){const t=e.Fy().eD();kl(e.lk,e.$R,t+i)}}var GW=Oc(()=>new j([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),XW=16,jW=64,QW=4,KW=[hc.ma,d.ey,d.iy,d.ly,d._y,d.Sw],YW=class extends Ne{get kpt(){return this.Rlt}get o(){return this.aS}get V3(){return this.H3}get nt(){return this.Ept}get Olt(){return function(t){const i=29.97,e=1024,s=44100;return t===at.Bk?s/e:i}(this.H3)}get Blt(){return 1/this.Olt}get Rt(){return Boolean(this.Rlt&&this.Rlt.Rt)}get s$(){const t=this.Nlt?this.Nlt.Kot.s$.uct:Uo.rL();return this.xpt().HM(t)}get Fx(){let t=this.Ppt();const i=this.Ipt;return void 0!==i&&t.MM().Cr(i)&&(t=t.HM(Uo.sL(i))),t}get sct(){return QU(this.Ppt(),this.s$.HM(this.Cpt)).VM(2*this.Blt)}get Cpt(){const t=this.Ipt;if(t&&isFinite(t)){const i=this.Rpt.An;if(isFinite(i)&&t=t.Zut.Oct.An?_.max(i,this.An):i;return n=_.max(s,n),Uo.nL(s,n).MM()}get ZW(){return this.sct.iL(this.zx)}get act(){return this.Rpt.act}get zx(){return this.PL.zx}get Tn(){return this.Rlt?this.Rlt.Zut.Oct.Tn:NaN}get An(){const t=this.Dpt(),i=this.Ipt;return void 0===t?NaN:void 0!==i?i:t}Dpt(){var t;return null==(t=this.Rlt)?void 0:t.Zut.Oct.An}get Mi(){return this.Rpt.Mi}get Ti(){return this.Rpt.Ti}get Npt(){return this.Ipt}dat(){return void 0!==this.Nlt&&this.Nlt.dat}hct(){if(void 0===this.Ipt)return!1;const t=this.Ppt().MM(),i=t.zM(this.Ipt);return!(i<0)&&t.Tn(i)!==this.Ipt}F3(){const t=this.Rpt.act,i=this.Ppt().Mn(t);this.Ipt=i.V>0?i.An(i.V-1):0;const e=t.An(0);isFinite(e)&&this.Ipt=0;t--){const s=n[t];s.Km===ui.NR&&(e=WW(e,s,i))}return e}(i,this.Upt)),h={Km:We.wZ,lk:i}}const o={Get:i.CO,ct:i.ct,EU:s,u2:null==(r=e.qot)?void 0:r.JI},a=this.Wrt.Fx;await this.Vpt(),await this.Wrt.Q2(h,o,n);return function(t,i,e,s){let n,r,h=i.qM(t.MM());h=h.qM(e.qM(i)),!1;0===h.V?(n=s.RO,r=n):(n=h.Tn(0),r=h.An(0));return{qdt:n,zdt:r}}(a,this.Wrt.Fx,this.Wrt.W3,i)}async ght(t,i,e){var s,n;fr(e),this.Fpt&&this.Fpt.ght(new j(t.jht));let r=new j(t.jht);if(this.Hpt(i)){const t=this.Rpt.Wpt;let i,e=[];t&&(e=hs(t.qpt,t=>t.OW),i=t.zpt.fH?Xe(t.zpt.fH):void 0);const s=LW(r,e,i);s?(this.Upt=s.ypt,r=s.wpt):this.Upt=void 0}if((null==(s=this.Wrt)?void 0:s.Cd)&&this.Wrt.Cd.GT!==i.GT){const t={GT:i.GT};this.Wrt.IZ(t)&&(await this.Wrt.RZ(t),fr(e))}const h={Km:We.wZ,lk:r};await this.Vpt(),await this.Wrt.J2(h,{u2:null==(n=i.qot)?void 0:n.JI},e)}ilt(t,i,e){return this.Wrt.pS(t,i,e)}r$(t,i){this.Wrt.G3(t,i)}h$(t,i){this.Wrt.X3(t,i)}Ppt(){return this.Wrt?this.Wrt.Fx:Uo.rL()}xpt(){return this.Wrt?this.Wrt.W3:Uo.rL()}Gpt(){return this.Wrt?this.Wrt.pS(0,1/0):Promise.resolve()}Xpt(){return this.Wrt&&(this.Wrt.mn(bi.pZ,this.Rs),this.Wrt=void 0),Promise.resolve()}async jpt(t){var i;const e=eh.vdt(null!=(i=t.Alt)?i:t.xat,this.ndt).lQ;this.Wrt||(this.Wrt=this.Rpt.Qpt(e),this.Wrt.wn(bi.pZ,this.Rs),this.ldt=new nH(this.Wrt)),await this.Vpt()}Un(t,i){const e=Zc.ep([i]);this.uV.Zg(),this.uV=e;const s=this.Kpt(t,this.Ypt,e.Yg);return this.Ypt=s,s}Jpt(t){if(Ct(this.Zpt,nh.CEA608))return;const i=t.Zut.olt;if(function(t){return t.some(t=>t.x8===CW||t.x8===RW)}(i)){this.Fpt=new wt(this.iV);const t=function(t){const i=[];for(const e of t)if(e.x8===CW){const t=fF(e.XE);for(const e of t)i.push(e)}else if(e.x8===RW){const t=PW(e.XE);for(const e of t)if(e.Sit<=4){const t=IW[e.Sit];i.push(Y({},e,{Sit:t}))}}return i}(i);for(const i of t)this.Fpt.$gt(i);this.Ept.qW(this.Fpt.Z)}}async Kpt(t,i,e){fr(e),i&&await i.catch(gs),this.Rlt===t&&this.$pt||(await this.tmt(),fr(e),await this.Gpt(),fr(e),t&&await this.oV(t))}async tmt(){const t=this.Rlt;this.Rlt=void 0,this.$pt=!1,this.Ipt=void 0,t&&(t.mn(Te.RI,this.imt),t.Ilt(!1),t.mn(Te.NO_QUALITY,this.Rs)),this.emt&&(this.emt.kn(),this.emt=void 0),this.Nlt&&(await this.Nlt.kn(),this.Nlt=void 0),this.Fpt&&(this.Ept.XW(this.Fpt.Z),await this.Fpt.kn())}async oV(t){this.Rlt=t,this.Jpt(t),t.wn(Te.RI,this.imt),t.wn(Te.NO_QUALITY,this.Rs),await this.jpt(t),this.Nlt=this.smt(t),this.Nlt.wn(KW,this.Rs),this.Nlt.wn("zot",this.Bpt),this.Nlt.Jot=t.Alt,this.emt=new MW(this.PL,this.Nlt),this.emt.wn(Te.II,this.glt),t.Ilt(!0),this.$pt=!0}smt(t){return new sH(this,this.PL,this.PL,this.aV,this.Mz,this.rlt,this.Sut,this.cdt,this.ndt,this.ldt,this.Ndt,this.pq).jet(t)}async hr(t){this.uV.Zg(),this.Ypt&&(await this.Ypt.catch(gs),this.Ypt=void 0),await this.tmt(),t||await this.Gpt(),await this.Xpt()}async nmt(){await this.tmt()}vlt(t){var i;null==(i=this.kpt)||i.vlt(t)}async dlt(t,i){var e,s;await this.wat(),null==(e=this.kpt)||e.dlt(i);const n=null==(s=this.Nlt)?void 0:s.Kot.mct.dct(t);if(n&&n.V>0)for(let t=0;tthis.ldt.IZ(t)))return this.omt(t);this.So(new gp("amt"))}omt(t){this.Nlt&&this.Rlt&&this.Rlt===t.Ht&&(this.Nlt.Jot=this.Rlt.Alt)}async wat(t){this.Nlt&&await this.Nlt.wat(t)}async bat(t){this.Nlt&&await this.Nlt.bat(t)}iJ(){const t=this.Fx.eL;return this.Mz.iJ(t)}Vpt(){const t=this.Rpt.act,i=_.max(0,t.Tn(0)-.1),e=t.An(0)+.01;return this.Wrt.f3(i,e)}Hpt(t){if(!To(t.lQ))return!1;if(this.Rpt.T8)return!0;return void 0!==this.Rpt.Wpt}Aat(t){if(!GT(this.H3))return;const i=this.Nlt,e=t.Nlt;void 0!==i&&void 0!==e&&i.Aat(e,this.Tn,this.An)}async kn(t){this.Vo();try{await this.hr(t),await this.nmt()}catch(t){}}constructor(t,i,e,s,n,r,h,o,a,u,c,d,l){super(),this.aS=void 0,this.H3=void 0,this.Rlt=void 0,this.Nlt=void 0,this.cdt=void 0,this.ndt=void 0,this.$pt=!1,this.uV=new Zc,this.Ypt=void 0,this.emt=void 0,this.Ipt=void 0,this.Wrt=void 0,this.ldt=new rH,this.Upt=void 0,this.Rpt=void 0,this.PL=void 0,this.aV=void 0,this.Mz=void 0,this.Opt=void 0,this.Fpt=void 0,this.Ept=new Tu([]),this.iV=void 0,this.Sut=void 0,this.Ndt=void 0,this.Zpt=void 0,this.rlt=void 0,this.pq=void 0,this.Bpt=()=>{!this.dat()&&this.hct()&&this.Rpt.Bpt()},this.glt=t=>{this.Rlt.glt(t),this.So(new bH(t.Yut,t.fpt))},this.imt=t=>{this.hmt(t)},this.aS=function(){const t=JW;return JW+=1,t}(),this.H3=t,this.aV=s,this.Mz=n,this.Rpt=i,this.PL=e,this.Sut=r,this.iV=h,this.Opt=o,this.cdt=a,this.ndt=a?YT(t,a):void 0,this.Ndt=u,this.Zpt=c,this.rlt=d,this.pq=l}};var JW=0;var ZW=class extends Ne{GY(t,i){return this.umt(t,i)}async umt(t,i){for(const i of t)this.cmt(i);await this.Un(i);for(const t of this.lmt.dmt)t.Km===at.LT&&(t.xat&&0!==t.xat.length?await this.fmt.oV(t):this.So(new mH("No supported representation found in the AdaptationSet with mimetype : "+t.Km)))}get JI(){return this.yO}get ct(){return this.PL.ct}vmt(t){return new YW(t,this,this.PL,this.aV,this.Mz,this.Sut,this.iV,this.Opt,this._mt,this.Ndt,this.Zpt,this.rlt,this.pq)}dat(){return this.Zlt.some(t=>t.dat())}hct(){return 0!==this.Zlt.length&&this.Zlt.every(t=>t.hct())}Bpt(){this.gmt()&&this.So(new yH)}Qpt(t){if(St(t)){if(this.w3.e4)return this.w3.e4}else if($y(t)&&this.w3.s4)return this.w3.s4;throw new m("Cannot allocate source buffer for mime type "+t)}pmt(t){t.wn([hc.ma,d.Yw,d.ey,d.iy,d.ly,d._y,d.Sw],this.Rs),t.wn(bi.pZ,this.mmt),t.wn("amt",this.Rs)}get Rt(){return this.Zlt.some(t=>t.Rt)}async wmt(t){await Promise.all(this.Zlt.map(i=>i.kn(t))),Wt(this.Zlt)}get ht(){return this.tO}get Fx(){if(0===this.Zlt.length)return Uo.rL();const t=this.Zlt.map(t=>t.Fx);let i=Uo.nL(0,1/0);for(const e of t)i=i.Mn(e);if(0===i.V)return i;if(this.hct()){const t=i.Mn(this.act);if(0===t.V)return i;const e=t.An(t.V-1);let s=0;for(const t of this.Zlt)s=_.max(s,t.Npt);e<=s&&(i=i.HM(new Uo([e,s],[!0,!0])))}return i}get T8(){return this.PL.T8}get zx(){return this.PL.zx}get Wpt(){return this.ymt}get An(){if(this.bmt){const t=this.ct;if(!S(t)&&t!==Gl)return t}if(!this.Zlt.length)return NaN;let t=0;for(const i of this.Zlt)t=_.max(t,i.An);return t}get bmt(){const t=this.lmt.jdt;if(t.Km===Lh.SV)return!1;const i=t.Amt;return 0!==i.length&&this.lmt===i[i.length-1]}get kP(){if(!this.Zlt.length)return Uo.rL();let t=Uo.hL();for(const i of this.Zlt)t=t.Mn(i.kP);if(t.V>0&&this.bmt&&isFinite(this.ct)){const i=this.ct,e=t.An(t.V-1);i>e&&(t=t.HM(Uo.nL(e,i).MM()))}return t}get Mc(){return this.lmt}get nt(){return this.Gl}get rt(){return this.sO}get Ti(){return this.ju.Ti}get Mi(){return this.ju.Mi}get ZW(){const t=this.zx,i=this.Fx,e=i.zM(t);if(-1!==e)return{Tn:i.Tn(e),An:i.An(e)}}get act(){const t=this.lmt.Tn,i=this.bmt?1/0:this.lmt.An;return Uo.nL(t,i)}gmt(){if(this.dat())return!1;if(!this.hct())return!1;const t=this.Fx;if(0===t.V)return!1;const i=this.zx;if(this.bmt)return t.Tn(t.V-1)<=i;{const e=t.Mn(this.act);if(0===e.V)return!0;const s=e.Tn(e.V-1),n=e.An(e.V-1)+.1;return s<=i&&i<=n}}get Smt(){return this.Tmt}async wat(t){this.Tmt||(this.Tmt=!0,await Promise.all(this.Zlt.map(i=>i.wat(t))))}async bat(t){this.Tmt&&(this.Tmt=!1,await Promise.all(this.Zlt.map(i=>i.bat(t))))}async kn(t){this.PL.mn(d.yy,this.kmt),this.PL.mn(d.xw,this.Emt),this.PL.mn(d.LICENSE_REQUEST_GENERATED,this.xmt),this.Vo(),this.lmt.mn(jt.Vot,this.Rs),this.Pmt.Zg(),this.Ypt&&(await this.Ypt.catch(gs),this.Ypt=void 0),await this.wmt(t),await this.fmt.kn(),this.tO.kn(),this.sO.kn(),this.Gl.kn(),this.Imt()}cmt(t){this.Cmt.push(t),t.wn("Rmt",this.Dmt);const i=t.Km===at.Bk?this.tO:this.sO;for(const e of t.Z)i.tt(e)}Nmt(t){const i=t.Km===at.Bk?this.tO:this.sO;for(const e of t.Z)i.it(e),e.kn();t.kn(),_e(this.Cmt,t)}Imt(){for(let t=this.Cmt.length-1;t>=0;t--)this.Nmt(this.Cmt[t])}get Bmt(){return this.Cmt.map(t=>t.kpt).filter(it)}get Mmt(){return this.Zlt.map(t=>t.kpt).filter(it)}Un(t,i){return this.Pmt.Zg(),this.Pmt=Zc.ep([i]),this.Ypt=Cu(this.vE(t,this.Ypt,this.Pmt.Yg),this.Pmt).catch(this.Lmt),this.Ypt}async vE(t,i,e){i&&await i.catch(gs),fr(e);const s=[],n=this.Zlt.slice(),r=t.slice();Wt(this.Zlt);for(const t of n){const i=t.kpt;i&&Ct(r,i)?(this.Zlt.push(t),s.push(t.Un(i,e)),_e(r,i)):(this.Gl.XW(t.nt),await t.kn(),fr(e))}for(const t of r){const i=this.vmt(t.iat);this.Gl.qW(i.nt),this.Zlt.push(i),this.pmt(i),s.push(i.Un(t,e))}await Promise.all(s)}async RZ(t,i,e){this.w3!==e&&(this.w3=e,await this.wmt(!1)),await this.Un(t),this.ymt=i}async Omt(t){for(const i of this.Zlt){const e=i.kpt;if(void 0!==e)for(const s of e.Zut.xat){(s.NW||[]).some(i=>i.fH&&ko(aa(t),Xe(i.fH)))&&!s.Plt&&(s.Plt=!0,await i.dlt(s,s.qot),this.So(new AL(new fs(me.CONTENT_PROTECTION_OUTPUT_RESTRICTED,"Content unavailable due to DRM restrictions"))))}}}async Fmt(t){for(const i of this.Zlt){const e=i.kpt;if(void 0!==e)for(const s of e.xat){const e=s.NW,n=s.qot;if(void 0===e||0===e.length||void 0===n)continue;if(!e.some(t=>Ct(s.Umt,t)))continue;const r=this.Vmt(e,t.xy);n.xst!==r&&(r?i.vlt(n):await i.dlt(s,n))}}}Vmt(t,i){let e=!1;const s=t.reduce((t,i)=>!i.fH||Ct(t,i.fH)?t:[...t,i.fH],[]);return 0===s.length||(i.Xy((n,r)=>{if("usable"!==n)return;(t.some(t=>t.fH&&ko(aa(r),Xe(t.fH)))||lm(r,Yc)&&1===s.length&&1===i.Wy)&&(e=!0)}),e)}Aat(t){if(void 0===t)return;const i=t.lmt;if(this.lmt.Hmt===i||this.lmt.Wmt===i)for(const i of this.Zlt){const e=hh(t.Zlt,t=>t.V3===i.V3);void 0!==e&&i.Aat(e)}}get qmt(){return this.Cmt}constructor(t,i,e,s,n,r,h,o,a,u,c,l,f,v){var _,g;super(),this.yO=void 0,this.tO=new Ws,this.sO=new Ws,this.Gl=void 0,this.iV=void 0,this.fmt=void 0,this.aV=void 0,this.Mz=void 0,this.Sut=void 0,this.PL=void 0,this.lmt=void 0,this.Cmt=[],this.Pmt=new Zc,this.Tmt=!0,this.Zlt=[],this.ymt=void 0,this.pq=void 0,this.Ypt=void 0,this.Ndt=void 0,this.Zpt=void 0,this.w3=void 0,this.rlt=void 0,this.ju=void 0,this.Opt=void 0,this._mt=void 0,this.mmt=to(()=>{this.So(new Et(this.zx))},350),this.Dmt=t=>{const i=t.zmt.kpt;if(i)for(const t of this.Cmt){var e;t.kpt&&t.kpt!==i&&t.Km===(null==(e=i.plt)?void 0:e.Km)&&(t.mn("Rmt",this.Dmt),t.kpt.Rt=!1,t.wn("Rmt",this.Dmt))}this.Rs(t)},this.Lmt=t=>{Ce(t)||this.So(new el(bb(t,me.MEDIA_LOAD_ERROR)))},this.kmt=t=>{const i=t.J6;i&&this.Omt(i).catch(this.Lmt)},this.Gmt=t=>{this.Fmt(t).catch(this.Lmt)},this.xmt=t=>{for(const i of this.Zlt){const e=i.kpt;if(void 0!==e)for(const i of e.xat){const e=i.NW;if(void 0===e||0===e.length)continue;const s=t.Py;e.filter(t=>t.P8&&ko(new j(s),new j(t.P8))).forEach(t=>{i.Xmt(t)})}}},this.Emt=t=>{const i=t.J6;if(i)for(const t of this.Mmt)for(const e of t.Zut.xat){const s=(e.NW||[]).some(t=>t.fH&&ko(aa(i),Xe(t.fH)));e.Plt&&s&&(e.Plt=!1,e.qot&&t.vlt(e.qot))}},this.aV=e,this.Mz=s,this.Sut=n,this.PL=t,this.yO=mi(),this.Cmt=[],this.lmt=h,this.ymt=o,this.pq=v,this.iV=u,this.fmt=new pH(t,e,s,n,u,null==(g=null==r||null==(_=r.dash)?void 0:_.segmentRelativeVttTiming)||g),this.Gl=new Tu([this.fmt.nt]),this.Ndt=l,this.Zpt=f,this.lmt.wn(jt.Vot,this.Rs),this.ju=a,this.w3=i,this.rlt=r.lowLatency,this.Opt=c,this._mt=r.abr,this.PL.wn(d.yy,this.kmt),this.PL.wn(d.xw,this.Emt),this.PL.wn(d.LICENSE_REQUEST_GENERATED,this.xmt)}};r(),r(),r();var $W=/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d*\.?\d*)S)?)?$/,tq=class t{static PD(i){const e=i.match($W);if(!e)throw new m("The given value could not be parsed as a valid DateTimeInterval");const s=Number(e[1])||0,n=Number(e[2])||0,r=Number(e[3])||0,h=Number(e[4])||0,o=Number(e[5])||0,a=Number(e[6])||0;return new t(31536e3*s+2592e3*n+86400*r+3600*h+60*o+a)}get wft(){return ul.hU(this.jmt,1e3)}Qmt(){return this.jmt}Kmt(){return 1e3*this.jmt}constructor(t){this.jmt=void 0,this.jmt=t}};r();var iq=function(t){return t.Ymt="progressive",t.Jmt="interlaced",t.yk="unknown",t}({});r();var eq=class{rF(){return this.Zmt/this.$mt}constructor(t,i){this.Zmt=void 0,this.$mt=void 0,this.Zmt=t,this.$mt=i}};r();var sq=1886614376;function nq(t){const i=Xe(Og),e=t.byteLength,s=12+i.length+4+e,n=new j(s),r=dh(n),h=new oi;return kl(r,h,s),kl(r,h,sq),kl(r,h,0),Ar(r,h,i),kl(r,h,e),Ar(r,h,new j(t)),n.buffer}var rq=/^(?:true|false)$/i,hq=/^(-?)(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:Z|([+-])(\d{2}):(\d{2}))?$/;function Bn(t){if(void 0!==t)return tq.PD(t)}function oq(t){if(void 0===t)return;const i=t.match(hq);if(!i)throw new m("The given value could not be parsed as a valid Date");const[,e,s,n,r,h,o,a,u,c,d,l]=i,f=("-"===e?-1:1)*Number(s),v=Number(n)-1,g=Number(r),p=Number(h);let w=Number(o);const y=Number(a),b=Number("0."+(u||"")),A=_.round(1e3*b);if(c){w-=("-"===c?-1:1)*(60*Number(d)+Number(l))}const T=new Date(Date.UTC(f,v,g,p,w,y,A));if(S(T.getTime()))throw new m("The given value could not be parsed as a valid Date");return T}function aq(t){if(!t)return;const i=/(\d+)-(\d+)/.exec(t);return i?[dt(i[1]),dt(i[2])]:void 0}function uq(t){if(void 0!==t){if(!S(Number(t)))try{return yo.fromString(t,!0)}catch(t){}throw new m("The given value could not be parsed as a valid unsigned long")}}function dt(t){if(void 0===t)return;const i=Number(t);if(!S(i))return i;throw new m("The given value could not be parsed as a valid Number")}function cq(t){if(void 0===t)return;const i=t.split("/"),e=Number(i[0]),s=Number(i[1]||1);if(!S(e)&&!S(s))return new eq(e,s);throw new m("The given value could not be parsed as a valid frame rate")}function gi(t){if(void 0!==t){if(rq.test(t))return"true"===t.toLowerCase();if(!S(x(t)))return Boolean(x(t));throw new m("The given value could not be parsed as a valid Boolean.")}}function dq(t){return{Yu:t.hx,twt:gi(t.ox("availabilityTimeComplete")),iwt:dt(t.ox("availabilityTimeOffset"))}}function lq(t){return t.map(dq)}function fq(t){const i=Sq(t),e=function(t,i,e,s){let n=t.ux(e,i);return void 0===n&&(n=t.ox(s+":"+i)),n}(t,"default_KID","urn:mpeg:cenc:2013","cenc");let s;const n=Nx(t,"pssh","urn:mpeg:cenc:2013","cenc")[0];if(void 0!==n&&(s=gm(n.hx)),!s){const i=Nx(t,"pro","urn:microsoft:playready","mspr")[0];void 0!==i&&(s=function(t){const i=gm(t.hx);return nq(i)}(i))}return{fH:e,P8:s,x8:i.x8,XE:i.XE}}function vq(t){return{ewt:t.ox("sourceURL"),Wat:aq(t.ox("range"))}}function _q(t,i){const e=t.ox("d"),s=t.ox("t"),n=dt(t.ox("r"));i.push({ct:e,CO:s,swt:n})}function gq(t){return{Put:t.ox("index"),nwt:aq(t.ox("indexRange")),$D:t.ox("media"),rwt:aq(t.ox("mediaRange"))}}function pq(t){const i=wq(t),e=function(t){const i=t.map(gq);return i.length>0?i:void 0}(t.ZE("SegmentURL"));return Y({},i,{hwt:e,owt:t.ox("xlink:href"),awt:t.ox("xlink:actuate")})}function mq(t){const i=gi(t.ox("availabilityTimeComplete")),e=dt(t.ox("availabilityTimeOffset")),s=aq(t.ox("indexRange")),n=gi(t.ox("indexRangeExact")),r=t.ZE("Initialization");if(r.length>1)throw new m("The provided MPEG-DASH document's "+t.$E+" element can not have more than one Initialization element.");const h=1===r.length?vq(r[0]):void 0,o=uq(t.ox("presentationTimeOffset")),a=t.ZE("RepresentationIndex");if(a.length>1)throw new m("The provided MPEG-DASH document's "+t.$E+" element can not have more than one RepresentationIndex element.");return{twt:i,iwt:e,nwt:s,uwt:n,cwt:h,dwt:o,lwt:1===a.length?vq(a[0]):void 0,fwt:Bn(t.ox("timeShiftBufferDepth")),jD:dt(t.ox("timescale"))}}function wq(t){const i=mq(t),e=t.ZE("BitstreamSwitching"),s=e.length>0?vq(e[0]):void 0,n=dt(t.ox("duration")),r=t.ZE("SegmentTimeline");if(r.length>1)throw new m("The provided MPEG-DASH document's "+t.$E+" element can not have more than one SegmentTimeline element.");const h=1===r.length?function(t){const i=[],e=t.ZE("S");for(const t of e)_q(t,i);return i}(r[0]):void 0;return Y({},i,{vwt:s,ct:n,mht:h,_wt:dt(t.ox("startNumber")),gwt:dt(t.ox("endNumber"))})}function yq(t){return{mwt:function(t){if(!t)return;const i=t.split(/\s/);return i.length>1?(i.length=2,i.map(dt)):1===i.length?i.map(dt)[0]:void 0}(t.ox("audioSamplingRate")),Rrt:t.ox("codecs"),wwt:gi(t.ox("codingDependency")),NW:function(t){if(0!==t.length)return t.map(fq)}(t.ZE("ContentProtection")),ywt:function(t){return t.map(Tq)}(t.ZE("EssentialProperty")),bwt:function(t){return t.map(kq)}(t.ZE("SupplementalProperty")),Olt:cq(t.ox("frameRate")),Mi:dt(t.ox("height")),Awt:dt(t.ox("maxPlayoutRate")),Swt:dt(t.ox("maximumSAPPeriod")),lQ:t.ox("mimeType"),Twt:t.ox("profiles"),kwt:t.ox("sar"),Ewt:function(t){switch(t){case iq.Ymt:case iq.Jmt:case iq.yk:return t;default:return}}(t.ox("scanType")),xwt:t.ox("segmentProfiles"),Pwt:dt(t.ox("startWithSAP")),Ti:dt(t.ox("width"))}}function bq(t){const i=lq(t.ZE("BaseURL")),e=t.ZE("SegmentBase");if(e.length>1)throw new m("The provided MPEG-DASH document's "+t.WE+" element can not have more than one SegmentBase element.");const s=1===e.length?mq(e[0]):void 0,n=function(t){const i=t.map(pq);return i.length>0?i:void 0}(t.ZE("SegmentList")),r=t.ZE("SegmentTemplate");if(r.length>1)throw new m("The provided MPEG-DASH document's "+t.WE+" element can not have more than one SegmentTemplate element.");const h=1===r.length?function(t){return Y({},wq(t),{Iwt:t.ox("bitstreamSwitching"),Cwt:t.ox("index"),Rwt:t.ox("initialization"),Dwt:t.ox("media")})}(r[0]):void 0;return{Nwt:i,Bwt:s,Mwt:n,Lwt:h}}function Aq(t){const i=yq(t),e=bq(t),s=dt(t.ox("bandwidth")),n=t.ox("dependencyId"),r=t.ox("id"),h=t.ox("mediaStreamStructureId"),o=dt(t.ox("qualityRanking"));if(t.ZE("SegmentBase").length>1)throw new m("The provided MPEG-DASH document's Representation element can not have more than one SegmentBase element.");return Y({},i,e,{IW:s,Owt:n,o:r,Fwt:h,Uwt:o})}function Sq(t){return{x8:t.ox("schemeIdUri"),XE:t.ox("value")}}function Tq(t){return Sq(t)}function kq(t){return Sq(t)}function Eq(t){return Sq(t)}function xq(t){return Sq(t)}function Pq(t){var i;const e=yq(t),s=bq(t),n=function(t){return t.map(xq)}(t.ZE("Accessibility")),r=gi(t.ox("bitstreamSwitching")),h=t.ox("contentType"),o=dt(t.ox("group")),a=dt(t.ox("id")),u=(null==(i=t.ZE("Label")[0])?void 0:i.hx)||"",c=t.ox("lang"),d=dt(t.ox("maxBandwidth")),l=cq(t.ox("maxFrameRate")),f=dt(t.ox("maxHeight")),v=dt(t.ox("maxWidth")),_=dt(t.ox("minBandwidth")),g=cq(t.ox("minFrameRate")),p=dt(t.ox("minHeight")),w=dt(t.ox("minWidth")),y=t.ox("par"),b=function(t){return t.map(Aq)}(t.ZE("Representation"));if(0===b.length)throw new m("The provided MPEG-DASH document has an AdaptationSet with no valid Representation's");const A=function(t){return t.map(Eq)}(t.ZE("Role")),S=gi(t.ox("segmentAlignment"))||!1,T=dt(t.ox("selectionPriority")),k=T||1,E=gi(t.ox("subsegmentAlignment"))||!1;let x;try{x=dt(t.ox("subsegmentStartsWithSAP"))}catch(t){}return Y({},e,s,{olt:n,vwt:r,GT:h,plt:o,o:a,Th:u,bs:c,Vwt:d,Hwt:l,Wwt:f,qwt:v,zwt:_,Gwt:g,Xwt:p,Qwt:w,Kwt:y,xat:b,Glt:A,Ywt:S,tz:k,Jwt:E,Zwt:x,$wt:t.ox("xlink:actuate")||"onRequest",tyt:t.ox("xlink:href")})}function Iq(t){const i=uq(t.ox("presentationTime"))||yo.ZERO,e=uq(t.ox("duration")),s=dt(t.ox("id")),n=function(t){const i=t.nx,e={};for(let t=0;t1)throw new m("The provided MPEG-DASH document's Period element can not have more than one AssetIdentifier element.");const s=1===e.length?function(t){return Sq(t)}(e[0]):void 0,n=function(t){return t.map(Pq)}(t.ZE("AdaptationSet")),r=gi(t.ox("bitstreamSwitching")),h=Bn(t.ox("duration")),o=function(t){return t.map(Cq)}(t.ZE("EventStream")),a=t.ox("id"),u=Bn(t.ox("start")),c=(t.ZE("Subset"),t.ox("xlink:href"));return Y({},i,{jlt:n,iyt:s,vwt:r,ct:h,eyt:o,o:a,Tn:u,$wt:t.ox("xlink:actuate"),tyt:c})}function Dq(t){const i=t.ox("schemeIdUri");if(!i)return;return{x8:i,XE:t.ox("value")}}function Nq(t,i){const e=oq(t.ox("availabilityEndTime")),s=oq(t.ox("availabilityStartTime")),n=lq(t.ZE("BaseURL")),r=t.ox("id"),h=function(t){return t.map(t=>""+t.hx)}(t.ZE("Location")),o=Bn(t.ox("maxSegmentDuration")),a=Bn(t.ox("maxSubsegmentDuration")),u=Bn(t.ox("mediaPresentationDuration")),c=(t.ZE("Metrics"),Bn(t.ox("minBufferTime")));if(!c)throw new m("The provided MPEG-DASH document's MPD element does not have the required 'minimumBufferTime' attribute.");const d=Bn(t.ox("minimumUpdatePeriod")),l=function(t){return t.map(t=>Rq(t))}(t.ZE("Period"));if(!l.length)throw new m("The provided MPEG-DASH document's MPD element does not have the required 'Period' element.");const f=t.ox("profiles");if(!f)throw new m("The provided MPEG-DASH document's MPD element does not have the required 'profiles' attribute.");const v=oq(t.ox("publishTime")),_=Bn(t.ox("suggestedPresentationDelay")),g=Bn(t.ox("timeShiftBufferDepth")),p=function(t){switch(t){case Lh.AV:case Lh.SV:return t;default:return}}(t.ox("type")),w=function(t){const i=[];for(const e of t){const t=Dq(e);t&&i.push(t)}return i}(t.ZE("UTCTiming")),y=function(t){if(0===t.length)return;const i=t[0],e=i.ZE("Latency");if(0===e.length)return;const s=function(t){const i=t[0],e=dt(i.ox("target"));if(void 0===e)return;const s=dt(i.ox("min")),n=dt(i.ox("max"));return{syt:e,iU:s,tU:n}}(e);if(void 0===s)return;const n=function(t){if(0===t.length)return;const i=t[0],e=dt(i.ox("max")),s=dt(i.ox("min"));return{iU:s,tU:e}}(i.ZE("PlaybackRate"));return{nyt:s,vP:n}}(t.ZE("ServiceDescription"));return{ryt:e,hyt:s,Nwt:n,o:r,oyt:h,ayt:i,uyt:o,cyt:a,dyt:u,lyt:c,fyt:d,Amt:l,Twt:f,vyt:v,_yt:_,fwt:g,Km:p,gyt:w,pyt:y}}var Bq=class{myt(t,i){return function(t,i){if(!t)throw new m("The provided MPEG-DASH document does not contain a valid MPD root element.");return Nq(t,i)}(zd.HE(t).mx,i)}};function Mq(t){return{get bandwidth(){return t.IW},get codecs(){return t.Rrt},get id(){return t.o},get uid(){return t.JI},get name(){return t.Th},get averageBandwidth(){return t.wyt},get label(){return t.Th},set label(i){t.Th=Ts(i)},get available(){return t.xst},get score(){return t.yyt},addEventListener(i,e){t.wn(i,e)},removeEventListener(i,e){t.mn(i,e)}}}function Lq(t){return Gi(Mq(t),{get height(){return t.Mi},get width(){return t.Ti},get frameRate(){return t.Olt},get firstFrame(){return t.byt}})}function Oq(t){return Gi(Mq(t),{get audioSamplingRate(){return t.mwt}})}r(),r(),r(),r(),r(),r(),r(),r();var Va=class extends gp{constructor(t){super("update"),this.quality=void 0,this.quality=t}},Fq=class extends Ne{get Th(){return this.bO}set Th(t){this.bO!==t&&(this.bO=t,this.So(new Va(this.Ca)))}get wyt(){}get xst(){return this.Ayt}get yyt(){}ZU(){this.Ayt=!1,this.So(new Va(this.Ca))}JU(){this.Ayt=!0,this.So(new Va(this.Ca))}constructor(t,i,e,s,n){super(),this.o=void 0,this.IW=void 0,this.Rrt=void 0,this.Syt=void 0,this.JI=void 0,this.bO=void 0,this.Ayt=void 0,this.o=t,this.IW=i,this.Rrt=e,this.Syt=n,this.JI=hE(),this.bO=s||"",this.Ayt=!0}},Uq=class extends Fq{get Ca(){return this.hu||(this.hu=Lq(this)),this.hu}constructor(t,i,e,s,n,r,h,o,a=0){super(t,i,e,s,n),this.Olt=void 0,this.Ti=void 0,this.Mi=void 0,this.byt=void 0,this.hu=void 0,this.Olt=r,this.Ti=h,this.Mi=o,this.byt=a,this.hu=void 0}},Vq=class extends Fq{get Ca(){return this.hu||(this.hu=Oq(this)),this.hu}constructor(t,i,e,s,n,r){super(t,i,e,s,n),this.mwt=void 0,this.hu=void 0,this.mwt=r,this.hu=void 0}};r(),r();var Hq=class extends Ne{get Tyt(){const t=this.kyt();return null==t?void 0:t.Tn}get Eyt(){const t=this.kyt();return null==t?void 0:t.An}constructor(...t){super(...t),this.xyt=t=>{this.So(t)}}},Wq=class extends Hq{get Zut(){return this.mat}get mwt(){var t;return null!=(t=this.Pyt.lk.mwt)?t:this.Zut.mwt}get IW(){return this.Pyt.lk.IW||0}get Rrt(){const t=this.Pyt.lk;return t.Rrt?[t.Rrt]:this.Zut.Rrt}get Iyt(){const t=this.Pyt.lk;return t.Rrt?[t.Rrt]:[]}get Bp(){return this.Pyt.lk.Rrt||this.Zut.Bp}get wwt(){return this.Pyt.lk.wwt||this.Zut.wwt}get NW(){return this.Pyt.lk.NW||this.Zut.NW}get Umt(){return this.Cyt}get GT(){return this.lQ+'; codecs="'+this.Bp+'"'}get ywt(){const t=this.Pyt.lk;return t.ywt.length?t.ywt:this.Zut.ywt}get Ca(){return this.hu||(this.hu=function(t){return{get id(){return t.o},get type(){return t.Km},get bandwidth(){return t.IW},get width(){return t.Ti},get height(){return t.Mi},get frameRate(){var i,e;return null!=(e=null==(i=t.Olt)?void 0:i.rF())?e:NaN},get audioSamplingRate(){return t.mwt}}}(this))}get Olt(){var t;return null!=(t=this.Pyt.lk.Olt)?t:this.Zut.Olt}get Mi(){return this.Pyt.lk.Mi||this.Zut.Mi}get o(){return this.Pyt.lk.o||""}get Jdt(){return this.Ryt}set Jdt(t){this.Ryt=t}get Ydt(){const t=this.Pyt.Dyt();if(t)return{Yu:t.Yu,Wat:t.Wat,Xk:this.jdt.Xk}}get Awt(){return this.Pyt.lk.Awt||this.Zut.Awt||1}get Swt(){return this.Pyt.lk.Swt||this.Zut.Swt}get jdt(){return this.Oct.jdt}get lQ(){return this.Pyt.lk.lQ||this.Zut.lQ}get Oct(){return this.Zut.Oct}get Twt(){return this.Pyt.lk.Twt||this.Zut.Twt}get qot(){return this.Nyt}get kwt(){return this.Pyt.lk.kwt||this.Zut.kwt}get Ewt(){return this.Pyt.lk.Ewt||this.Zut.Ewt}get Byt(){return this.Pyt.Byt}get xwt(){return this.Pyt.lk.xwt||this.Zut.xwt}get mht(){return this.Pyt.mht}get Pwt(){return this.Pyt.lk.Pwt||this.Zut.Pwt}get Km(){const t=this.lQ.split("/")[0];return"application"===t||"text"===t||oP(this.lQ,this.Rrt)?at.LT:"video"===t?at.Mk:"audio"===t?at.Bk:"image"===t?at.Lk:at.yk}get Ti(){return this.Pyt.lk.Ti||this.Zut.Ti}get Hct(){return this.Myt}set Hct(t){this.Myt=t}get Plt(){return this.Lyt}set Plt(t){this.Lyt=t}Zct(t){const i=cV(t)?this.Pyt.Oyt(t):this.Pyt.Zct(t);return{Yu:i.Yu,Wat:i.Wat,Xk:this.jdt.Xk}}Fyt(){return this.Pyt.Fyt()}kyt(){return this.Pyt.kyt()}Uyt(){return this.Pyt.Uyt()}qct(t){return this.Pyt.qct(t)}Gct(t,i,e){return this.Pyt.Gct(t,this.jdt.Xk,i,e)}Mdt(t){return cV(t)?this.mht.Vyt(t,this.Pyt):this.mht.Mdt(t)}Lct(t){return cV(t)?this.mht.Hyt(t,this.Pyt):this.mht.Lct(t)}Xmt(t){Ct(this.Cyt,t)||this.Cyt.push(t)}kn(){this.Pyt.mn(jt.Fot,this.xyt),this.Cyt=[]}constructor(t,i){if(super(),this.mat=void 0,this.hu=void 0,this.Pyt=void 0,this.Nyt=void 0,this.Ryt=void 0,this.Myt=!1,this.Lyt=!1,this.Cyt=[],this.mat=t,this.Pyt=i,this.Pyt.wn(jt.Fot,this.xyt),this.Km===at.Mk){var e,s;const t=null!=(s=null==(e=this.Olt)?void 0:e.rF())?s:NaN;this.Nyt=new Uq(this.o,this.IW,this.Bp,"","",t,this.Ti,this.Mi)}else this.Km===at.Bk?this.Nyt=new Vq(this.o,this.IW,this.Bp,"","",this.mwt):this.Nyt=void 0}},qq=class extends Hq{get olt(){return this.Pyt.lk.olt}get mwt(){var t;return null!=(t=this.Pyt.lk.mwt)?t:-1}get Rrt(){if(this.Pyt.lk.Rrt)return[this.Pyt.lk.Rrt];{const t=[];for(const i of this.xat)i.Iyt.length&&-1===t.indexOf(i.Bp)&&t.push(i.Bp);return t}}get Bp(){return this.Rrt.join()}get wwt(){return this.Pyt.lk.wwt}get NW(){return this.Pyt.lk.NW}get GT(){return this.lQ+'; codecs="'+this.Bp+'"'}get ywt(){return this.Pyt.ywt}get bwt(){return this.Pyt.bwt}get Olt(){return this.Pyt.lk.Olt}get plt(){return this.Pyt.lk.plt}get Mi(){return this.Pyt.lk.Mi||0}get o(){return this.Pyt.lk.o}get Th(){return this.Pyt.lk.Th||""}get Awt(){return this.Pyt.lk.Awt}get Swt(){return this.Pyt.lk.Swt}get jdt(){return this.Oct.jdt}get lQ(){return this.Pyt.lk.lQ||this.Slt[0].lQ}get Oct(){return this.lmt}get Twt(){return this.Pyt.lk.Twt}get xat(){return this.Slt}get Glt(){return this.Pyt.lk.Glt||[]}get kwt(){return this.Pyt.lk.kwt}get Ewt(){return this.Pyt.lk.Ewt}get xwt(){return this.Pyt.lk.xwt}get tz(){return this.Pyt.lk.tz}get Pwt(){return this.Pyt.lk.Pwt}get Km(){const t=(this.Pyt.lk.GT||this.lQ).split("/")[0];return"application"===t||"text"===t||"subtitle"===t||oP(this.lQ,this.Rrt)?at.LT:"video"===t?at.Mk:"audio"===t?at.Bk:"image"===t?at.Lk:at.yk}get Ti(){return this.Pyt.lk.Ti||0}get Tit(){return this.Pyt.lk.bs||""}get Vlt(){return this.Tyt}get Ult(){const t=this.Vlt,i=this.Eyt;if(void 0===t||void 0===i)return;const e=_.min(i,this.jdt.Wyt);return _.max(t,e)}async er(t,i){if(0===this.Slt.length){const e=this.Pyt.xat.map(e=>this.qyt(e,t,i));this.Slt=(await Promise.all(e)).filter(it)}this.zyt()}async qyt(t,i,e){const s=new Wq(this,t),n=await i(s);if(fr(e),n)return s}zyt(){if(!this.Slt.length)throw new m("Detected an AdaptationSet without any supported Representations.")}kyt(){return this.Pyt.kyt()}Uyt(){return this.Pyt.Uyt()}kn(){this.Pyt.mn(jt.Fot,this.xyt);for(const t of this.Slt)t.kn();Wt(this.Slt)}constructor(t,i){super(),this.Pyt=void 0,this.lmt=void 0,this.Slt=[],this.lmt=t,this.Pyt=i,this.Pyt.wn(jt.Fot,this.xyt)}};function zq(t,i){const e=[];for(const s of i)for(const i of t)e.push(zd.Dh(i,s));return e}r(),r(),r(),r(),r(),r(),r();var Gq=class{Gyt(t){const i=t-this.lmt.Tn;if(i<0||i>=this.lmt.ct)return;const e=this.Xyt();return void 0!==e&&rs(e,i,1e-5)?this.jyt():this.Qyt(i)}Wct(t){const i=t-this.lmt.Tn;if(!(i<0))return this.Kyt(_.min(i,this.lmt.ct))}jyt(){return this.Yyt(0)}Jyt(){const t=this.lmt.ct;if(isFinite(t))return this.Kyt(t)}get Zyt(){return this.lmt.tbt.$yt&&void 0!==this.ibt()}Fyt(t){if(this.lmt.tbt.Km===Lh.SV){if(this.Zyt){const i=this.jyt(),e=this.ibt();if(void 0===i||void 0===e)return;return{ebt:t,sbt:i,nbt:e}}const i=this.rbt(t);if(!i)return;return{ebt:t,sbt:this.hbt(t),nbt:i}}{0;const i=this.jyt();if(i)return{ebt:t,sbt:i,nbt:this.Jyt()}}}Uyt(t,i){if(i){let t=this.Qdt(i.sbt);const e=this.Kct(i.nbt);if(e){const i=this.Kdt(e);(!t||i.getTime()i.getTime();)e=this.Qct(e);if(!e)return;const s=this.Qdt(e);if(s&&s.getTime()<=i.getTime()){const t=this.Qct(e);for(t&&this.nlt(t,i)&&(e=t);e;){if(this.Kdt(e).getTime()>i.getTime())return;if(this.nlt(e,i))break;e=this.Kct(e)}if(!e)return}return e}nlt(t,i){if(this.Zyt)return!0;if(this.Kdt(t).getTime()>i.getTime())return!1;const e=this.Qdt(t);return!(e&&i.getTime()>=e.getTime())}cbt(t,i){if(this.Zyt)return!0;if(this.dbt(t).getTime()>i.getTime())return!1;const e=this.Qdt(t);return!(e&&i.getTime()>=e.getTime())}lbt(t,i,e){const s=Ls(i,this.Jb)+this.lmt.Tn;return{Put:t,fbt:i,CO:s,ct:e,RO:s+e}}dbt(t){return this.lmt.tbt.Km===Lh.SV?new Date(this.lmt.tbt.hyt.getTime()+1e3*(t.CO+t.ct)):this.lmt.tbt.hyt}Kdt(t){const i=this.dbt(t);return this.lmt.tbt.Km===Lh.SV?new Date(i.getTime()-1e3*this.obt):i}Qdt(t){let i=1/0;if(this.lmt.tbt.Km===Lh.SV){const e=this.ubt.fwt;e&&(i=this.dbt(t).getTime()+1e3*t.ct+e.Kmt())}const e=this.lmt.tbt.ryt;return e&&(i=_.min(i,e.getTime())),i===1/0?void 0:new Date(i)}vbt(t,i){return t.Put+i}get EU(){return this.lmt.Tn-Ls(this._bt,this.Jb)}get dwt(){return Ls(this._bt,this.Jb)}qct(t){return!1}Gct(t,i,e,s,n){const r=this.gbt(t);if(!r)return Promise.reject(new m("Invalid segment"));const h=this.pbt(r.Put,i);return h?Promise.resolve(h):ua(this.mbt(r.Put,i,e,s),n)}pbt(t,i){}mbt(t,i,e,s){return Promise.reject(new m("Not supported"))}Qct(t){const i=this.gbt(t);if(i)return this.Yyt(i.Put-1)}Kct(t){const i=this.gbt(t);if(i)return this.Yyt(i.Put+1)}gbt(t){const i=this.Yyt(t.Put);if(i&&i.CO===t.CO)return i;const e=this.Gyt(t.CO);return e&&e.CO===t.CO?e:void 0}wbt(t,i){const e=this.Xct(t);if(!e||!this.qct(e.Put))return;const s=this.pbt(e.Put,i);return s?s.wbt(t):void 0}Xct(t){return this.Yyt(t.ybt)}Mdt(t){const i=this.gbt(t);return!!i&&0===i.Put}Vyt(t,i){const e=this.wbt(t,i);return!!e&&0===e.xut}Lct(t){const i=this.gbt(t);if(!i)return!1;const e=this.Jyt();return!!e&&i.Put===e.Put}Hyt(t,i){const e=this.wbt(t,i);if(!e)return!1;const s=this.Jyt();if(!s||e.ybt!==s.Put)return!1;const n=this.pbt(e.ybt,i);return e.xut+1===n.V}zg(){}constructor(t,i){this.lmt=void 0,this.ubt=void 0,this.Jb=void 0,this.obt=void 0,this._bt=void 0,this.lmt=t,this.ubt=i,this.Jb=i.jD,this.obt=i.iwt,this._bt=i.dwt}},Xq=class extends Gq{Yyt(t){if(t<0)return;const i=this.bbt.multiply(t),e=Ls(i,this.Jb),s=this.lmt.ct;if(e>=s)return;const n=this.Abt();if(void 0!==n){if(t>n)return;if(t===n&&isFinite(s))return this.lbt(t,i,s-e)}return isFinite(s)&&e+this.Sbt>s?this.lbt(t,i,s-e):this.lbt(t,i,this.Sbt)}Xyt(){return 0}Qyt(t){const i=_.floor(t/this.Sbt),e=this.Abt();return void 0!==e&&i>=e?this.Yyt(e):this.Yyt(i)}Kyt(t){if(t>=this.lmt.ct){const t=_.ceil(this.lmt.ct/this.Sbt)-1,i=this.Abt();return void 0!==i&&t>=i?this.Yyt(i):this.Yyt(t)}return this.Qyt(t)}Abt(){const t=this.ubt.gwt;var i;if(void 0!==t)return t-(null!=(i=this.ubt._wt)?i:1);const e=this.ubt.Tbt;return void 0!==e&&e>0?e-1:void 0}ibt(){if(isFinite(this.lmt.ct))return this.Jyt()}kbt(t,i){return this.bbt.multiply(t.Put+(i-1))}er(){}constructor(t,i){super(i,t),this.Sbt=void 0,this.bbt=void 0;const e=t.Ebt,s=t.ct;if(void 0===e||void 0===s)throw new m("MultipleSegmentBase does not have a segment duration specified.");this.bbt=e,this.Sbt=s}};function jq(t,i,e){const s=i.length;if(0===s)return-1;let n=0,r=s-1,h=t.xbt(i[n]),o=t.Pbt(i[r]);for(;n<=r&&t.Ibt(h,e)<=0&&t.Ibt(e,o)<0;){const a=n+_.floor(t.Cbt(e,h,o)*(r-n)),u=i[a],c=t.xbt(u),d=a+10)return Ls(this.Dbt[0].CO,this.Jb)}Qyt(t){if(this.Bbt&&Ls(this.Bbt.CO,this.Jb)<=t){const i=Ls(this.Bbt.CO,this.Jb),e=Ls(this.Bbt.ct,this.Jb),s=_.floor((t-i)/e);return this.Nbt(s)}if(this.Dbt.length>0&&rs(t,Ls(this.Dbt[0].CO,this.Jb),1e-5))return this.Dbt[0].yut;const i=Qq(this.Dbt,yo.fromNumber(t*this.Jb));return i<0?void 0:this.Dbt[i].yut}Kyt(t){if(!this.Bbt&&this.Dbt.length>0){const i=this.Dbt[this.Dbt.length-1];if(function(t,i,e){return tf(t,i,e)>=0}(t,Ls(i.RO,this.Jb),1e-5))return i.yut}const i=this.Xyt();return i&&t=r)return;const h=this.Dbt.length+t,o=_.min(Ls(e,this.Jb),n+r);return this.lbt(h,s,o)}Mbt(t){return t.fbt.add(this._bt)}er(){const t=this.ubt.lk.mht;if(!t)throw new m("MultipleSegmentBaseTO does not have a SegmentTimeline specified.");this.Lbt(t)}Lbt(t){const i=this._bt;this.Obt(t,i);const e=this.Fbt(t);this.Ubt(t,i,e.Vbt,e.ybt)}Obt(t,i){const e=this.Dbt;if(0===t.length)Wt(e);else{const s=t[0];let n=0;const r=Ls(s.CO?yo.fromString(s.CO,!1).subtract(i):yo.ZERO,this.Jb);for(;n0&&e.splice(0,n)}}Fbt(t){const i=this.Dbt,e=this.rpt;let s=0,n=0;for(;s=i.length)break;if(i[h].CO.greaterThanOrEqual(e))break;if(i[n].yut.Put===n)n=h+1;else for(;n<=h;)i[n].yut.Put=n,n++;0,s++}return{Vbt:s,ybt:n}}Ubt(t,i,e,s){const n=this.Dbt;let r,h=e,o=s;for(;h0){const t=n[o-1];t.RO.greaterThan(u)&&(t.ct=u.subtract(t.CO),t.RO=t.CO.add(t.ct))}}else u=o>0?n[o-1].RO:yo.ZERO;if(a<0){if(h+1===t.length){r={CO:u,ct:s};break}const e=yo.fromString(t[h+1].CO,!1).subtract(i);for(;u.lessThan(e);){const t=u.add(s);this.Hbt(n,o,u,s,t),u=t,o++}}else{const t=o+a;for(;o<=t;){const t=u.add(s);this.Hbt(n,o,u,s,t),u=t,o++}}h++}o0&&(this.rpt=n[n.length-1].CO),this.Bbt=r}Hbt(t,i,e,s,n){if(i{if("$$"===i)return"$";const r=t[e];if(void 0===r)return i;if(void 0===s)return r.toString();let h=function(t,i){switch(i){case"d":case"i":case"u":return t.toString(10);case"x":return t.toString(16);case"X":return t.toString(16).toUpperCase();case"o":return t.toString(8);default:return}}(r,n);return void 0===h?i:(h=Wa(h,Number(s),"0"),h)})}constructor(t){this.jbt=void 0,this.jbt=t}};var ez=class t extends $q{get Rwt(){return this.Qbt?this.Qbt:this.Wbt&&this.Wbt instanceof t?this.Wbt.Rwt:void 0}get Dwt(){return this.Kbt?this.Kbt:this.Wbt&&this.Wbt instanceof t?this.Wbt.Dwt:void 0}Dyt(t){const i=this.Rwt;if(!i)return super.Dyt(t);const e=i.Qy({Bandwidth:t.lk.IW,RepresentationID:t.lk.o});return{Yu:zd.Pm(e,t.Nwt[0])}}Zct(t,i){var e;const s=null!=(e=i.Byt._wt)?e:1,n=this.Dwt.Qy({Bandwidth:i.lk.IW,Number:i.mht.vbt(t,s),RepresentationID:i.lk.o,Time:i.mht.kbt(t,s)});return{Yu:zd.Pm(n,i.Nwt[0])}}Oyt(t,i){}get Tbt(){}constructor(t,i,e){super(t,i,e),this.Qbt=void 0,this.Kbt=void 0,this.Qbt=e.Rwt?new iz(e.Rwt):void 0,this.Kbt=e.Dwt?new iz(e.Dwt):void 0}};r();var sz=class t extends $q{Zct(t,i){const e=this.hwt[t.Put],s=i.Nwt[0];let n;return n=e.$D?zd.Dh(e.$D,s):s,{Yu:n.href,Wat:e.rwt}}Oyt(t,i){}get hwt(){return void 0!==this.Wp.hwt?this.Wp.hwt:this.Wbt&&this.Wbt instanceof t?this.Wbt.hwt:void 0}get Tbt(){var t;return null==(t=this.hwt)?void 0:t.length}};r(),r(),r(),r();var nz=class{wbt(t){const i=this.jct(t.xut);if(i&&i.CO===t.CO)return i;const e=this.Ybt(t.CO);return e&&e.CO===t.CO?e:void 0}},rz=class extends nz{get V(){return this.Jbt.length}jct(t){if(t>=0&&t0){const t=this.Jbt[0];if(i<=Ls(t.CO,this.jD))return this.Zbt(t)}const e=Qq(this.Jbt,yo.fromNumber(i*this.jD));if(!(e<0))return this.Zbt(this.Jbt[e])}zct(t){const i=this.$bt(t),e=hf(this.Jbt,-1);return void 0!==e&&i>=Ls(e.RO,this.jD)?this.Zbt(e):this.Ybt(t)}Zbt(t){const i=Ls(t.CO,this.jD)-this.dwt,e=i+this.tAt,s=Ls(t.ct,this.jD);return{ybt:this.ybt,xut:t.Put,CO:e,fbt:yo.fromNumber(i*this.jD),ct:s,RO:e+s,iAt:[t.eAt,t.sAt]}}$bt(t){return t-this.tAt+this.dwt}constructor(t,i,e,s,n){super(),this.ybt=void 0,this.jD=void 0,this.tAt=void 0,this.dwt=void 0,this.Jbt=void 0,this.ybt=t,this.jD=i,this.tAt=e,this.dwt=s,this.Jbt=n}};r(),r(),r();var hz=class t{Egt(){return this.$R.ac7)throw new RangeError("Invalid EBML ID size");let i=0;for(let e=0;e=1,"Incorrect log2 value"),kt(this.lk,this.$R,i)}static aAt(t){if(8===t.length&&224&t[1])throw new g("EBML variable sized integer is too large");let i=0;for(let e=0;e8)throw new RangeError("EMBL integer field size is too large");if(8===t&&224&this.cAt.getUint8(0))throw new RangeError("EMBL integer field value is too large");let i=0;for(let e=0;e0?zq(t.Nwt.map(t=>t.Yu),i):i.slice(),this.ubt&&(t.Lwt?this.ubt.er(t.Lwt):t.Mwt?this.ubt.er(t.Mwt[0]):t.Bwt&&this.ubt.er(t.Bwt))}kyt(){var t;return null==(t=this.PAt)?void 0:t.IAt}Uyt(){var t;return null==(t=this.PAt)?void 0:t.CAt}RAt(t){const i=this.DAt,e=this.Oct.ct,s=this.PAt,n=this.NAt(t);s&&rs(e,i,1e-5)&&xz(s,n)||(this.DAt=e,this.PAt=n,this.So(new Sz))}zg(){this.Vo(),this.ubt&&(this.ubt.zg(),this.ubt=void 0)}constructor(t,i,e){super(),this.wE=void 0,this.Wp=void 0,this.TAt=void 0,this.ubt=void 0,this.DAt=1/0,this.PAt=void 0,this.wE=i,this.xAt(t,e)}};function Tz(t){let i,e;for(const e of t){const t=e.kyt();if(t){i=t.Tn;break}}if(void 0!==i){for(let i=t.length-1;i>=0;i--){const s=t[i].kyt();if(s){e=s.An;break}}return void 0!==e?{Tn:i,An:e}:void 0}}function kz(t){if(0===t.length)return;let i=0,e=1/0;for(const s of t){const t=s.kyt();if(!t)return;if(i=_.max(i,t.Tn),e=_.min(e,t.An),i>=e)return}return{Tn:i,An:e}}function Ez(t){let i;for(const e of t){const t=e.Uyt();t&&(!i||t.getTime(){for(const e of i.Rrt)Ct(t,e)||t.push(e);return t},[])}get Bp(){return this.Rrt.length>0?this.Rrt[0]:""}get Km(){return this.BAt[0].Km}get o(){return this.aS}get jdt(){return this.lmt.jdt}get lQ(){return this.BAt[0].lQ}get Oct(){return this.lmt}get xat(){return hs(this.jlt,t=>t.xat)}kyt(){return kz(this.BAt)}Uyt(){let t;for(const i of this.BAt){const e=i.Uyt();e&&(!t||e.getTime()t.o===s)),t||(t={o:s,jlt:[]},i.push(t)),t.jlt.push(e)}return i}r();var Rz=class extends Hq{get jlt(){return this.BAt}get dmt(){return this.MAt}get iyt(){return this.Pyt.lk.iyt}get ct(){return this.Pyt.ct}get An(){return this.Tn+this.ct}get eyt(){return this.Pyt.lk.eyt||[]}get o(){return this.Pyt.o}get Hot(){return this.LAt}get jdt(){return this.OAt}get Wmt(){return this.OAt.FAt(this)}get Oct(){return this}get Hmt(){return this.OAt.UAt(this)}get VAt(){return this.HAt(1/0,_.min)}get WAt(){return this.HAt(0,_.max)}HAt(t,i){if(0===this.MAt.length)return;let e=t;for(const t of this.MAt)if(GT(t.Km)){const s=t.Eyt;if(void 0===s)return;e=i(e,s)}return e}get Tn(){return this.Pyt.Tn}get Xk(){return this.jdt.Xk}qAt(){this.LAt||(this.LAt=!0,this.So(new Iz),this.kn())}async er(t,i){0===this.BAt.length?(await this.zAt(this.Pyt.jlt,t,i),this.GAt(this.BAt),fr(i)):await this.XAt(t,i)}async zAt(t,i,e){for(const s of t){const t=new qq(this,s);try{await t.er(i,e),this.BAt.push(t)}catch(t){sa(t)}}}GAt(t){const i=Cz(t);for(const t of i){const i=new Pz(this,t.o,t.jlt);this.MAt.push(i)}}async XAt(t,i){for(const e of this.BAt)await e.er(t,i)}kyt(){return this.Pyt.kyt()}Uyt(){return this.Pyt.Uyt()}kn(){this.Vo(),this.Pyt.mn(jt.Fot,this.xyt);for(const t of this.MAt)t.kn();for(const t of this.BAt)t.kn();Wt(this.BAt),Wt(this.MAt)}constructor(t,i){super(),this.Pyt=void 0,this.BAt=[],this.MAt=[],this.OAt=void 0,this.LAt=!1,this.OAt=t,this.Pyt=i,this.Pyt.wn(jt.Fot,this.xyt)}};r();var Dz=class extends gp{constructor(){super(d.qw)}};r(),r();var Nz=function(t){return t.jAt="QAt",t}({}),Bz=class extends gp{constructor(){super(Nz.jAt)}};r(),r(),r(),r();var Mz=class extends Bt{get Zut(){return this.mat}get Oct(){return this.mat.Oct}get tbt(){return this.mat.tbt}get lQ(){return this.Wp.lQ||this.mat.lQ}get Byt(){return this.kAt()}get mht(){return this.Byt.mht}qct(t){const i=this.lQ;return!(!To(i)&&!tb(i))&&this.mht.qct(t.Put)}Gct(t,i,e,s){return this.mht.Gct(t,this,i,e,s)}Dyt(){return this.Byt.Dyt(this)}Zct(t){return this.Byt.Zct(t,this)}Oyt(t){return this.Byt.Oyt(t,this)}Fyt(){return this.KAt}NAt(t){const i=this.mht,e=i.Fyt(t),s=e&&function(t,i){const{sbt:e,nbt:s,ebt:n}=t,r=e.CO;let h;const o=i.dbt(s);if(o.getTime()<=n.getTime())h=s.RO;else{const t=(o.getTime()-n.getTime())/1e3,i=_.max(s.ct-t,0);h=s.CO+i}return{Tn:r,An:h}}(e,i),n=this.mht.Uyt(t,e);return this.KAt=e,{ebt:t,IAt:s,CAt:n}}er(t){this.xAt(t,this.mat.Nwt)}constructor(t,i){super(t,i,i.Nwt),this.mat=void 0,this.KAt=void 0,this.mat=i,this.EAt(!0)}},Lz=class extends Bt{get xat(){return this.Slt}get Oct(){return this.lmt}get tbt(){return this.lmt.tbt}get plt(){return this.Wp.plt}get lQ(){var t;return this.Wp.lQ||(null==(t=this.Slt[0])?void 0:t.lk.lQ)||""}get ywt(){return this.lk.ywt}get bwt(){return this.lk.bwt}er(t){this.xAt(t,this.lmt.Nwt);const i=t.xat||[];if(this.Slt.length!==i.length)throw new m("Expected "+this.Slt.length+' representations in adaptation set "'+t.o+'", found '+i.length);for(let t=0;tnew Mz(t,this))}},Oz=class extends Bt{get jlt(){return this.BAt}get dmt(){return this.MAt}get Oct(){return this}get tbt(){return this.YAt}get o(){return this.Wp.o}get Tn(){return this.UU}get ct(){return this.Zb}er(t,i){this.xAt(t,this.YAt.Nwt),this.Zb=i;const e=t.jlt||[];if(this.BAt.length!==e.length)throw new m("Expected "+this.BAt.length+' adaptation sets in period "'+t.o+'", found '+e.length);for(let t=0;tnew Lz(t,this)),this.MAt=Cz(this.BAt)}};r();var Fz=class{get JAt(){return this.ZAt.nyt.iU}get $At(){return this.ZAt.nyt.tU}get tSt(){return this.ZAt.nyt.syt}get iSt(){var t;return null==(t=this.ZAt.vP)?void 0:t.iU}get eSt(){var t;return null==(t=this.ZAt.vP)?void 0:t.iU}constructor(t){this.ZAt=void 0,this.ZAt=t}},Uz=new Date("2000-01-01"),Vz=class extends Ne{get lk(){return this.Wp}get Km(){return this.Wp.Km||Lh.AV}get hyt(){return this.sSt||this.Wp.hyt||this.vyt}get ryt(){return this.Wp.ryt}get $yt(){var t,i;return null!=(i=null==(t=this.nSt)?void 0:t.ignoreAvailabilityWindow)&&i}get dyt(){return this.rSt}get Nwt(){return this.TAt}get oyt(){return this.hSt}get Amt(){return this.oSt}get vyt(){return this.Wp.vyt||this.En}get fwt(){return this.Wp.fwt}get aSt(){return this.uSt}get cSt(){return this.En}get pyt(){return this.ZAt}kyt(){var t;return null==(t=this.PAt)?void 0:t.IAt}Uyt(){var t;return null==(t=this.PAt)?void 0:t.CAt}er(t,i,e,s){var n;const r=void 0!==this.Wp&&this.Wp.Km===Lh.SV;this.Wp=t,this.uSt=null!=s?s:e,this.En=e;const h=[kA(i)];this.TAt=t.Nwt&&t.Nwt.length>0?zq(t.Nwt.map(t=>t.Yu),h):h,this.hSt=t.oyt&&t.oyt.length>0?zq(t.oyt,this.TAt):[];const o=this.hSt.map(t=>t.href),a=i.href;Ct(o,a)||(this.hSt.push(i),o.push(a));const u=this.dSt.href;Ct(o,u)||(this.hSt.push(this.dSt),o.push(u)),this.rSt=null==(n=t.dyt)?void 0:n.Qmt(),t.pyt&&(this.ZAt=new Fz(t.pyt));const c=t.Km===Lh.SV,d=function(t,i,e){const s=[];for(let e=0;e0&&t[e-1].ct){r=s[e-1]+t[e-1].ct.Qmt()}else{if(0!==e||i)break;r=0}s.push(r)}const n=[];for(let i=0;i0){const r=s.length-1,h=t[r],o=s[r];let a=1/0;i||(a=h.ct?h.ct.Qmt():e-o),n.push({lk:h,Tn:o,ct:a})}return n}(t.Amt,c,this.rSt);this.lSt(d,r,c),this.RAt(e)}lSt(t,i,e){const s=this.oSt;if(0===t.length)return void Wt(s);const n=t[0].lk.o;let r=0;for(;r0&&t.length>0){var o;const i=null!=(o=Hz(s[0].lk))?o:ul.SF;var a;const e=null!=(a=Hz(t[0].lk))?a:ul.SF;if(e.hF(i)){const n=e.gF(i);void 0!==this.rSt&&(this.rSt+=n.rF());for(let i=0;it.href):[this.ySt]}get ySt(){return this.bSt.href}get uyt(){return this.Pyt&&this.Pyt.lk.uyt}get cyt(){return this.Pyt&&this.Pyt.lk.cyt}get dyt(){return this.Pyt&&this.Pyt.lk.dyt}get lyt(){return this.Pyt&&this.Pyt.lk.lyt}get fyt(){var t,i;const e=(null==(i=this.Pyt)||null==(t=i.lk.fyt)?void 0:t.Kmt())||0;return _.max(e,iG)}get cP(){return this.ASt}SSt(t){const i=this.cP;this.ASt=t,i!==this.cP&&this.So(new Bz)}get Amt(){return this.oSt}get TSt(){return this.Km===Lh.SV?this.Wyt:this.kSt}get ESt(){const t=this.TSt;if(void 0!==t)for(const i of this.Amt)if(i.Tn<=t&&i.An>t)return i}get Twt(){return this.Pyt&&this.Pyt.lk.Twt}get vyt(){return this.Pyt&&this.Pyt.vyt}get VAt(){for(let t=this.oSt.length-1;t>=0;t-=1){const i=this.oSt[t].VAt;if(i)return i}}get Wyt(){const t=this.VAt;if(void 0===t)return;const i=t-this.xSt;return _.max(i,this.kSt)}get kSt(){for(const t of this.oSt){const i=t.Tyt;if(void 0!==i)return i}}get Xk(){return Boolean(this.PSt.Xk)}get xSt(){var t,i;if(this.PSt.ISt&&this.Km===Lh.SV)return this.PSt.ISt;const e=null==(i=this.Pyt)||null==(t=i.lk._yt)?void 0:t.Qmt();return void 0!==e?e:this.Km===Lh.SV?1.5*this.lyt.Qmt():0}get fwt(){return this.Pyt&&this.Pyt.fwt}get Km(){return this.Pyt?this.Pyt.Km:void 0}get pyt(){var t;return null==(t=this.Pyt)?void 0:t.pyt}async er(t,i,e){const s=[],n=[],r=t.ayt?zd.Dh(t.ayt,this.bSt):this.bSt;void 0===this.Pyt?(await this.CSt.GY(t.gyt),this.Pyt=new Vz(t,this.bSt,r,this.Xdt(),this.nSt),this.Pyt.wn(jt.Fot,this.Rs)):this.Pyt.er(t,r,this.Xdt(),i);const h=this.Pyt.Amt;let o;if(0===h.length)o=this.oSt.slice(),Wt(this.oSt);else{const t=h[0].o;let i=0;for(;i0)return this.oSt[i-1]}FAt(t){const i=this.oSt.indexOf(t);if(i>=0&&i+10){const e=_.min(i,2147483647);await Ze(e,t)}try{await this.OSt(t),this.Pyt.jdt.SSt(!0)}catch(t){throw new m("The provided MPEG-DASH manifest could not be loaded - "+t.message)}finally{this.zSt=void 0}}qSt(){const t=this.Pyt.jdt.Xdt().getTime()-this.Pyt.jdt.aSt.getTime();return this.Pyt.jdt.fyt-t}GSt(t){const i=this.Pyt.jdt.Uyt();if(i){const e=i.getTime()-t.getTime();if(e>0)return e}this.Pyt.jdt.RAt(t);const e=this.Pyt.jdt.Uyt();return e?e.getTime()-t.getTime():NaN}async HSt(t){const i={stack:[],error:void 0,hasError:!1};try{null!=this.zSt||(this.zSt=this.WSt(t));const e=Es(i,Zc.ep([t]),!1),s=[this.zSt,this.XSt(e.Yg)].filter(it);await Promise.race(s).catch(bu)}catch(t){i.error=t,i.hasError=!0}finally{Zs(i)}}XSt(t){const i=this.Pyt.jdt.Xdt(),e=this.GSt(i);if(!S(e)&&!this.Br.jdt.$yt)return this.jSt(e,t)}async jSt(t,i){await Ze(t,i);const e=this.Pyt.jdt.Xdt();this.Pyt.jdt.RAt(e)}async QSt(t,i){const e=await this.YSt.KSt(t,{},i);return(new Bq).myt(e.JSt,e.wk)}kn(){return this.LSt.Zg(),this.FSt=void 0,this.MSt=void 0,this.zSt=void 0,this.Pyt.jdt.kn(),Promise.resolve()}constructor(t,i,e,s,n){this.YSt=void 0,this.Pyt=void 0,this.FSt=void 0,this.MSt=void 0,this.zSt=void 0,this.LSt=new Zc,this.OSt=async t=>{try{const i=this.Pyt.jdt.Xdt(),e=await this.QSt(this.Pyt.jdt.oyt,t);await this.Pyt.jdt.er(e,i,t)}catch(t){throw Ei(t)&&(this.Pyt.jdt.SSt(!1),this.Pyt.jdt.So(new tG)),t}},this.YSt=s,this.Pyt=new $z(t,i,e,this.LSt.Yg,n)}};r(),r();var sG=class extends gp{constructor(t,i){super("Rmt"),this.zmt=void 0,this.kpt=void 0,this.zmt=t,this.kpt=i}},nG=class extends Ne{get kpt(){return this.Rlt}get Km(){return this.Vp}get Z(){return this.BI.slice()}JU(t){t&&this.Rlt!==t&&this.ZSt(t)}ZU(t){this.Rlt===t&&this.ZSt(void 0)}ZSt(t){this.Rlt=t,this.So(new sG(this,this.Rlt))}kn(){this.Vo();for(const t of this.BI)t.plt=void 0;Wt(this.BI)}constructor(t,i){super(),this.Rlt=void 0,this.BI=void 0,this.Vp=void 0,this.Vp=t,this.BI=i;for(const t of this.BI)t.plt=this}};r(),r(),r();var wn=class extends gp{constructor(t,i,e){super(d.Dw),this.currentTime=void 0,this.initDataType=void 0,this.initData=void 0,this.currentTime=t,this.initDataType=i,this.initData=e}};function rG(t,i,e,s,n){let r=[],h=[];for(const t of i)t.Km===at.Bk?r=r.concat(t.Z):t.Km===at.Mk&&(h=h.concat(t.Z));return[hG(t,r,e,s,null==n?void 0:n.preferredAudioCodecs),oG(t,h,e,s,null==n?void 0:n.preferredVideoCodecs)].filter(it)}function hG(t,i,e,s,n){const r=hh(s||[],t=>t.iat===at.Bk&&t.Rt),h=[uG(r,e,t),cG(r),dG(r),lG(r,n),fG(),t=>{const i=t.filter(t=>"main"===t.Lt);return i.length>0?i:t}];return aG(i,h)}function oG(t,i,e,s,n){const r=hh(s||[],t=>t.iat===at.Mk&&t.Rt),h=[uG(r,e,t),lG(r,n),fG(),t=>{const i=t.filter(t=>"main"===t.Lt);return i.length>0?i:t}];return aG(i,h)}function aG(t,i){if(0===t.length)return;let e=t;for(const t of i){if(1===e.length)return e[0];e=t(e)}return e[0]}function uG(t,i,e){return s=>{const n=t?t.Zut.o:void 0;if(!it(n))return s;const r=null==i?void 0:i.iyt,h=e.iyt,o=r&&h&&r.XE===h.XE,a=hh(s,t=>t.Zut.o===n);return o&&a?[a]:s}}function cG(t){return i=>{const e=t?t.bs:"",s=i.some(t=>""!==t.bs)?i.filter(t=>""!==t.bs):i;if(""===e)return s;const n=s.filter(t=>t.bs===e);return n.length>0?n:s}}function dG(t){return i=>{const e=t?t.Lt:"";if(""===e)return i;const s=i.filter(t=>t.Lt===e);return s.length>0?s:i}}function lG(t,i){return t=>{if(i&&i.length>0)for(const e of i){const i=t.filter(t=>t.$I.NI.some(t=>Tr(t.Rrt,e)));if(i.length>0)return i}return t}}function fG(){return t=>{let i=[],e=-1/0;for(const s of t){const t=s.Zut.tz;t>e?(e=t,i=[s]):t===e&&i.push(s)}return i}}r(),r();var vG=function(t){return t.$St="api",t.tTt="start",t}({});r(),r();var _G=class extends gp{constructor(t=0,i=void 0,e=void 0){super(d.sy),this.retryCount=void 0,this.statusCode=void 0,this.statusMessage=void 0,this.retryCount=t,this.statusCode=i,this.statusMessage=e}},gG={maxRetries:3,minimumBackoff:1e3,maximumBackoff:1/0},pG=class extends Ne{iTt(t,i,e){const s=this.Ndt.maxRetries===1/0?gG:this.Ndt;return ws((e,s)=>this.eTt(t,i,s,e),e,s.maxRetries,s.minimumBackoff,s.maximumBackoff)}async eTt(t,i,e,s){let n;for(const r of t)try{const t=new ro({Yu:r,fk:Bi.LT,_k:i,Xk:this.sTt,Hk:Qe.GET,Km:q.bk,zk:he.yk,Yg:e,Wk:15e3,qk:5e3}),s=await this.aV.vk(t),n=await s.HT(e);return{JSt:n,nTt:r,wk:s.wk}}catch(t){n=t;const i=Qn(t)?t.uE.dk:void 0;this.So(new _G(s,i,t.message))}throw n}constructor(t,i,e=gG){super(),this.aV=void 0,this.sTt=void 0,this.Ndt=void 0,this.aV=t,this.sTt=i,this.Ndt=e}};function mG(t){return Vn(t)}function Rt(t,i){const e=Vn(t);return i?""+e+i:""+e}r(),r();var wG=class{async KSt(t,i,e){let s;for(const n of this.rTt)try{return await n.KSt(t,i,e)}catch(t){sa(t),s=t}throw s}constructor(t){this.rTt=void 0,this.rTt=t}},yG=class{async KSt(t,i,e){const s=await this.Sut.hTt(t);if(s)return{JSt:s.data,nTt:s.locationURL,wk:s.responseURL};throw new m("Manifest fetch from cache unsuccesful")}constructor(t){this.Sut=void 0,this.Sut=t}},bG=class{async KSt(t,i,e){return await this.oTt.iTt(t,i,e)}constructor(t){this.oTt=void 0,this.oTt=t}};function AG(t,i){return new wG([new yG(i),new bG(t)])}var SG=class{async KSt(t,i,e){const s=await this.YSt.KSt(t,i,e);return await this.aTt(s),s}async aTt(t){await this.cTt.uTt({key:mG(t.nTt),locationURL:Vn(t.nTt),responseURL:Vn(t.wk),data:t.JSt,references:[this.dTt.o]})}constructor(t,i,e){this.YSt=void 0,this.cTt=void 0,this.dTt=void 0,this.YSt=t,this.cTt=i,this.dTt=e}};r();var TG=class extends gp{constructor(){super(d.Xw)}};r();var lh=class extends gp{constructor(){super(d.Gw)}};r(),r();var kG=class extends ms{lTt(t){return t.AP=dc.LOADED,this.tt(t),t}fTt(t){for(const i of this.Z.NI)if(i.eC===t)return i}constructor(t){super(t)}};function EG(t,i){return""===i?t:t+" "+i}r(),r(),r();var xG=class extends Oh{get Ca(){return this.hu||(this.hu=function(t){return Gi(U(t),{get attributes(){return t.nx},get eventID(){var i;return""+(null!=(i=t.vTt)?i:"")}})}(this)),this.hu}KO(t){return this.U===t.U}constructor(t,i,e,s,n){super(t,i,e,!1,null==n?void 0:n.toString()),this.nx=void 0,this.vTt=void 0,this.nx=s,this.vTt=n}},PG=class extends kG{_Tt(t){const i=this.iV.sI(us.zU,"","","",void 0,nh.EVENT_STREAM);return i.eC=t,this.lTt(i),i}gTt(t,i,e){const s=t.x8;var n;const r=null!=(n=t.XE)?n:"";var h;const o=null!=(h=t.jD)?h:1;var a;const u=null!=(a=t.dwt)?a:yo.ZERO,c=EG(s,r);let d=this.fTt(c);d||(d=this._Tt(c));for(const s of t.fQ)if(!IG(s,d)){const t=CG(s,o,u,i);t.RO>e&&d.nV(t)}}async Un(t){await this.hr(),this.YAt=t,this.YAt.wn(d.qw,this.pTt),this.pTt()}async hr(){this.YAt&&(this.YAt.mn(d.qw,this.pTt),this.YAt=void 0);for(const t of this.Z.NI)this.iV.rV(t);await super.hr()}eV(t,i,e){return ht(t,i,e)}constructor(t){super(t),this.YAt=void 0,this.pTt=()=>{var t,i;const e=null!=(i=null==(t=this.YAt.kyt())?void 0:t.Tn)?i:0;if(e>0)for(const t of this.Z.NI)Re(t,e);for(const t of this.YAt.Amt)if(t.An>e)for(const i of t.eyt)this.gTt(i,t,e)}}};function IG(t,i){const e=t.o;if(void 0!==e){if(hh(i.L.NI,i=>i.vTt===e&&i.U===t.lk))return!0}return!1}function CG(t,i,e,s){const n=t.o,r=t.nM.toSigned().subtract(e),h=t.ct,o=t.lk,a=t.nx,u=r.toNumber()/i+s.Tn,c=h?h.toNumber()/i:void 0,d=void 0!==c?u+c:s.WAt;return new xG(u,d,o,a,n)}function RG(t,i,e,s,n){const r=[],h=hh(e,t=>t.x8===Dg);if(void 0===h)return;const o=h.XE?function(t){const i=t.split(":",1)[0];switch(i){case"cbcs":case"cenc":return i;default:return}}(h.XE.toLowerCase()):"cenc";if(void 0!==o){for(const i of e)if(i.x8!==Dg)for(const e of sp(i.x8)){var a;const s=n&&i.P8?[i.P8]:[];var u;const h=null!=(u=null==(a=t.clearkey)?void 0:a.keys)?u:[];r.push({xS:e,OW:s,FW:void 0,GH:void 0,UW:h})}if(r.length)return{lH:t,zpt:{mTt:o,fH:h.fH},qpt:r,wTt:i===at.Bk?s.slice():[],yTt:i===at.Mk?s.slice():[],D8:!1}}}function DG(t,i){if(!t)return i;if(!i)return t;const e=[],s=Ba();var n;return NG(e,s,t.qpt),NG(e,s,i.qpt),{lH:t.lH,zpt:{mTt:t.zpt.mTt,fH:null!=(n=t.zpt.fH)?n:i.zpt.fH},qpt:e,wTt:BG(t.wTt,i.wTt,Ct),yTt:BG(t.yTt,i.yTt,Ct),D8:t.D8||i.D8||!1}}function NG(t,i,e){for(const s of e){const e=s.xS.$m;let n;i.has(e)?(n=i.get(e),n.OW=BG(n.OW,s.OW,MG)):(n=Y({},s),t.push(n),i.set(e,n))}}function BG(t,i,e){const s=t.slice();for(const t of i)e(s,t)||s.push(t);return s}function MG(t,i){for(const e of t)if(Qo(e,i))return!0;return!1}function LG(t,i,e){let s;const n=t.NW;if(n){const r=t.lQ,h=[];for(const i of t.Rrt)h.push(r+'; codecs="'+i+'"');s=RG(i||{},t.Km,n,h,e)}for(const n of t.xat)s=DG(s,OG(n,i,e));return s}function OG(t,i,e){return RG(i||{},t.Km,t.NW||[],[t.GT],e)}function FG(t){return t?t.qpt.map(i=>{const e=UG(t.lH,i.xS),s=t.zpt.mTt;return{xS:i.xS,OW:i.OW,GH:i.GH,Vq:[{initDataTypes:[i.xS.Jm],audioCapabilities:VG(t.wTt,s,null==e?void 0:e.audioRobustness),videoCapabilities:VG(t.yTt,s,null==e?void 0:e.videoRobustness),persistentState:null==e?void 0:e.persistentState,distinctiveIdentifier:null==e?void 0:e.distinctiveIdentifier}],UW:i.UW}}):[]}function UG(t,i){switch(i.Km){case po.zm:return t.widevine;case po.qm:return t.playready;case po.jm:return t.fairplay;case po.Gm:case po.Xm:return t.clearkey}}function VG(t,i,e){if(0!==t.length)return t.map(t=>({contentType:t,encryptionScheme:i,robustness:e}))}function HG(t,i){const e=t=>{const e=i.indexOf(t.xS.$m);return e>=0?e:i.length};return Xn(t,(t,i)=>e(t)-e(i))}r(),r();var WG=class extends kG{_Tt(t){const i=this.iV.sI(us.zU,t.o,"thumbnails","",!1,nh.DEFAULT);return i.Qk=xh.Kn,this.lTt(i),i}async Un(t){await this.hr(),this.YAt=t,this.YAt.wn(d.qw,this.er),this.er()}bTt(t){this.ATt(t),this.STt()}STt(){const t=[];for(const i of this.Z.NI)this.TTt(i)||t.push(i);for(const i of t)this.it(i)}ATt(t){const i=[];for(const e of this.Slt)-1===t.indexOf(e)&&i.push(e);for(const t of i)_e(this.Slt,t)}async hr(){this.YAt&&(this.YAt.mn(d.qw,this.er),this.YAt=void 0);for(const t of this.Slt)t.mn(jt.Fot,this.kTt);this.Slt.length=0;for(const t of this.Z.NI)this.iV.rV(t);await super.hr()}eV(t,i,e){return ht(t,i,e)}kn(){return this.kTt=void 0,super.kn()}ETt(){var t,i;const e=null!=(i=null==(t=this.YAt.kyt())?void 0:t.Tn)?i:0;if(e>0)for(const t of this.Z.NI)Re(t,e)}xTt(t){return this.Z.NI.some(i=>i.o===t.o)}PTt(t){return hh(this.Z.NI,i=>i.o===t.o)}TTt(t){return this.Slt.some(i=>t.o===i.o)}constructor(t){super(t),this.Slt=[],this.kTt=void 0,this.YAt=void 0,this.er=()=>{const t=[];for(const i of this.YAt.Amt)for(const e of i.jlt)if(e.Km===at.Lk&&e.xat.length>0){const i=e.xat[0];t.push(i),this.xTt(i)||this._Tt(i),-1===this.Slt.indexOf(i)&&(this.Slt.push(i),i.wn(jt.Fot,this.kTt)),this.ITt(i)}this.bTt(t)},this.ITt=t=>{const i=this.PTt(t);i&&t&&i.Qk!==xh.Nh&&(this.ETt(),function(t,i){const e=t.mht,s=t.Fyt();if(!s)return;const n=s.sbt,r=s.nbt,h=t.Ti,o=t.Mi,[a,u]=function(t){for(const i of t)if(Jh(i.x8,zG)||Jh(i.x8,GG)){const t=i.XE.match(qG);if(t){const[,i,e]=t;return[Number(i),Number(e)]}}return[1,1]}(t.ywt);let c=n;for(;c&&c.Put<=r.Put;){const s=t.Byt.ct||c.ct,n=XG(i,c,t.Zct(c).Yu,h,o,a,u,s);for(const t of n)i.nV(t);c=e.Kct(c)}}(t,i))};const i=this;this.kTt=function(){i.ITt(this)}}},qG=/^(\d+)x(\d+)$/,zG="http://dashif.org/guidelines/thumbnail_tile",GG="http://dashif.org/thumbnail_tile";function XG(t,i,e,s,n,r,h,o){const a=[],u=i.CO,c=r*h,d=s/r,l=n/h,f=_.round(d),v=_.round(l),g=o/c;if(1===c){const i=u+g;return jG(t,u,i,e)?a:[new Oh(u,i,e,!1)]}for(let s=0;s=i.RO)return a}return a}function jG(t,i,e,s){return t.L.NI.some(t=>t.CO===i&&t.RO===e&&t.U===s)}r(),r(),r(),r();var QG=class extends Oh{get sM(){return this.CTt}get XE(){return this.RTt}get DTt(){return this.NTt}get Ca(){return this.hu||(this.hu=function(t){return Gi(U(t),{get schemeIDURI(){return t.sM},get value(){return t.XE},get emsgID(){return t.DTt}})}(this)),this.hu}KO(t){return ko(this.U,t.U)}constructor(t,i,e,s,n,r){super(t,i,r,!1),this.CTt=void 0,this.RTt=void 0,this.NTt=void 0,this.CTt=e,this.RTt=s,this.NTt=n}},KG=class t extends kG{elt(i,e,s){const n=Hn.PD(dh(i));if(!n)return;const r=function(t,i){const e=[];for(const s of t)mT(s,i)&&e.push(s);return e}(n,ui.zR);if(r.length){const i=t.BTt(n,e,s);this.MTt(r,i,s)}}MTt(t,i,e){for(const s of t){let t;t=1===s.ED?s.nM.toNumber()/s.jD+e:i+s.oM/s.jD;const n=t+s.rM/s.jD;"https://aomedia.org/emsg/ID3"===s.sM||"https://developer.apple.com/streaming/emsg-id3"===s.sM?this.LTt(s,t):this.OTt(s,t,n)}}OTt(t,i,e){const s=EG(t.sM,t.XE);let n=this.fTt(s);n||(n=this.FTt(s),this.lTt(n)),n.nV(new QG(i,e,t.sM,t.XE,t.o,t.hM))}LTt(t,i){const e=hL(dh(t.hM));if(!e)return;const s=EG(t.sM,t.XE);let n=this.fTt(s);n||(n=this.UTt(s),this.lTt(n));for(const t of e.r6){const e=new pL(i,t);LM(e,n.L.NI),n.nV(e)}}static BTt(t,i,e){const s=wT(t,ui.GR);return s?Ls(s.wM,s.jD)+e:i}FTt(t){const i=this.iV.sI(us.zU,"","","",void 0,nh.EMSG);return i.eC=t,i.Qk=xh.iC,i}UTt(t){const i=this.iV.sI(us.zU,"","","",void 0,nh.ID3);return i.eC=t,i.Qk=xh.iC,i}eV(t,i,e){return ht(t,i,e)}async hr(){for(const t of this.Z.NI)this.iV.rV(t);await super.hr()}constructor(t){super(t)}},YG=class extends KG{async Un(t){await this.hr(),this.YAt=t,this.YAt.wn(d.qw,this.pTt),this.pTt()}async hr(){this.YAt&&(this.YAt.mn(d.qw,this.pTt),this.YAt=void 0),await super.hr()}constructor(...t){super(...t),this.YAt=void 0,this.pTt=()=>{var t,i;const e=null!=(i=null==(t=this.YAt.kyt())?void 0:t.Tn)?i:0;this.jU(e)}}};r(),r();var JG=class{sdt(t,i){return this.VTt?this.Sut.sdt(t,i):Promise.resolve(!1)}Aut(t,i){return this.VTt?this.Sut.Aut(t,i):Promise.resolve(void 0)}async hTt(t){const i=await this.Sut.hTt(t);return this.VTt=void 0!==i,i}jJ(t){return this.Sut.jJ(t)}constructor(t){this.Sut=void 0,this.VTt=!1,this.Sut=t}};r();var ZG=class extends sk{FL(){var t;return null!=(t=this.LL)?t:0}dC(){this.oa.zx=1/0}UL(t,i,e){return!1}VL(){return!0}constructor(t,i,e){super(t,i,e)}},$G=[d.Qw,d.Yw,d.ey,d.iy,d.zw,d.ly],tX=[d.Kw,d.wy,d.Lw,d.Bw],iX=class t extends Ne{HTt(t){return!!this.aq&&this.aq.IZ(t)}async Lp(t){this.aq=await this.PL.Un(t),this.WTt(),this.qTt(),this.aq.F4(this.ct)}zTt(t){return this.aq.RZ(t)}GTt(t){return this.aq.NZ(t)}async XTt(){this.jTt=this.QTt,this.aq&&(await this.PL.hr(),this.aq=void 0)}F3(){this.aq.F3()}I3(){const t=this.ct;this.aq.ct=n||rs(s,n,.001)}kkt(){var t;if(!this.Pyt)return!1;if(this.Pyt.jdt.Km!==Lh.SV)return!1;const i=null==(t=this.akt)?void 0:t.Mc;if(i&&i.Hot)return!0;const e=[];for(const t of this.Pyt.jdt.Amt){const i=t.Tyt,s=t.WAt;void 0!==i&&void 0!==s&&e.push(i,s)}const s=new Uo(e).VM();return function(t,i,e){if(!i.V||!e.V)return Uo.rL();const s=i.Tn(0),n=i.An(i.V-1),r=t.Mn(e).OM().Mn(t).HM(i);return Uo.nL(r.Tn(0),r.An(r.V-1)).WM(r).YM((t,i)=>tZt)}(this.ykt,this.Tkt,s).V>0}get rP(){return Y({},this.QTt,{aO:sc.Bg.pW(),uO:this.Ekt,cO:{amountOfBufferedAudioSegments:this.xkt,amountOfBufferedVideoSegments:this.Pkt}})}get QTt(){return function(t,i){return{rO:t.rO+i.rO,hO:t.hO+i.hO,oO:t.oO+i.oO}}(this.jTt,this.PL.hP())}get oP(){return this.PL.oP}set oP(t){this.PL.oP=t}get lP(){return this.t9||this.Ikt&&this.PL.Qx?this.Ckt:this.Rkt}get vP(){return this.PL.vP}set vP(t){this.PL.vP=t}get pP(){let t=this.Ho;return this.akt&&(t=t.HM(this.Dkt)),t.VM(.1)._s()}get Dkt(){return this.PL.pP}Nkt(t){this.Ho=this.Ho.HM(t)}get wP(){return this.oq}set wP(t){this.oq=t,this.Bkt()}get AP(){let t=this.PL.AP;return this.Mkt&&(t=_.max(Lr.Qn,t)),t}get Tkt(){return this.Lkt(!1)}get Okt(){return this.Lkt(!0)}get kP(){return this.Tkt._s()}get xP(){return this.Pz||this.Fkt}get Fkt(){return this.PL.xP}get n5(){return this.PL.n5}get uq(){}get Ukt(){var t,i;return null!=(i=null==(t=this.Pyt)?void 0:t.jdt.Km)?i:Lh.AV}get nt(){return this.Gl}get rt(){return this.sO}get DP(){var t;return NN(this.PL)&&(this.PL.DP||(null==(t=this.Vkt())?void 0:t.Mi))||0}get MP(){var t;return NN(this.PL)&&(this.PL.MP||(null==(t=this.Vkt())?void 0:t.Ti))||0}get OP(){return this.PL.OP}set OP(t){this.PL.OP=No(t,0,1)}get VP(){return this.cq}get WP(){return!1}set WP(t){}get dq(){return this.lq}Hkt(t){t.wn($G,this.Rs),t.wn(d._y,this.Wkt),t.wn(d.Sw,this.qkt),t.wn(hc.ma,this.zkt),t.wn(d.Ew,this.Gkt),t.wn(d.Yw,this.Xkt),t.wn("Rmt",this.jkt),t.wn("amt",this.jkt)}Qkt(t){t.mn($G,this.Rs),t.mn(d._y,this.Wkt),t.mn(d.Sw,this.qkt),t.mn(hc.ma,this.zkt),t.mn(d.Ew,this.Gkt),t.mn(d.Yw,this.Xkt),t.mn("Rmt",this.jkt),t.mn("amt",this.jkt)}Kkt(t){t.wn(d.Qw,this.Rs)}Ykt(t){t.mn(d.Qw,this.Rs)}Vkt(){if(!this.akt)return;const t=hh(this.akt.Bmt,t=>t.iat===at.Mk);return t?t.YI:void 0}Lkt(t){var i;const e=null==(i=this.Pyt)?void 0:i.jdt;if(!e)return Uo.rL();const s=e.kSt;let n=t?e.VAt:e.Wyt;if(void 0===s||void 0===n)return Uo.rL();if(!t){const t=this.Dkt;t.V>0&&t.An(t.V-1)>n&&(n=_.min(t.An(t.V-1),e.VAt))}const r=this.ct;return isFinite(r)&&r>n&&(n=r),Uo.nL(s,n).MM()}async Un(t,i){let e,s;fr(i);const n=this.Pyt.jdt;try{e=n.ESt,s=n.TSt}catch(t){throw new m("Something went wrong determining the start of the provided MPEG-DASH stream")}if(!e)throw new m("Something went wrong determining the initial Period of the provided MPEG-DASH stream");if(void 0===s)throw new m("Something went wrong determining the start time of the provided MPEG-DASH stream");t.textTracks&&this.Jkt(t.textTracks),this.R9();const r=this.qlt(e),h=rG(e,r,void 0,void 0,this._mt),o=this.ukt(e,h,e,h,!0);h.forEach(t=>t.Rt=!0);const a=this.ckt(h,o);await this.Lp(a),this._kt=a,fr(i);const u=await this.$Tt(e,r,h,o);fr(i),this.Zkt(u),this.O9(),fr(i),await u.bat(),fr(i),!this.$kt&&s>0&&this.Oy(s,!0,vG.tTt),this.Pz||(this.fkt(),this.tEt())}fkt(){this.ekt.Zg(),this.ekt=new Zc,this.hkt=Cu(this.iEt(this.hkt,this.nkt,this.ekt.Yg),this.ekt).catch(this.Lmt)}eEt(){this.ekt.Zg()}async iEt(t,i,e){for(await Promise.all([t,i]),fr(e);;){var s;const t=null==(s=this.akt)?void 0:s.Mc;if(!t){0;break}if(!await this.sEt(t,e)){0;break}}}async sEt(t,i){var e;fr(i);const s=this.akt;for(0;this.Pyt.jdt.Km===Lh.SV&&void 0===(null==(e=this.FAt(t))?void 0:e.Tyt);){try{await ua(this.nEt.VSt,i)}catch(t){if(sa(t),this.rEt())return!0;throw t}await this.hEt()}for(fr(i),await this.hEt(),fr(i);!s.gmt();)await s.ww(wH.$lt,i),await this.hEt();fr(i),await this.hEt(),fr(i);const n=this.FAt(t);return n?(this.oEt(n)?await this.aEt(n,i):await this.uEt(n,i),!0):(this.F3(),!1)}rEt(){const t=this.ZW;return it(t)&&t.An>this.zx}oEt(t){var i,e,s,n,r;const h=null!=(r=null==(i=this.Ac)?void 0:i.seamlessSwitchStrategy)?r:ak.HL;if(h===ak.WL)return!0;if(h===ak.qL)return!1;const o=this.akt,a=null==o?void 0:o.Mc,u=null==o?void 0:o.Bmt,c=rG(t,this.qlt(t),a,u,this._mt),d=this.ukt(t,c,a,u,!1);if(h===ak.CLEAR_ONLY&&((null==(e=this.akt)?void 0:e.Wpt)||d)||h===ak.SAME_DRM_ONLY&&!((null==(s=this.akt)?void 0:s.Wpt)&&d||!(null==(n=this.akt)?void 0:n.Wpt)&&!d))return!1;const l=this.ckt(c,d);return this.HTt(l)}cEt(){return!0}dEt(t){const i=this.lEt();for(const e of i)e!==t&&(e.Qk=xh.Nh)}vkt(){if(void 0!==this.fEt){if(this.fEt.nC){const t=hh(this.ht.NI,t=>t.Rt);void 0!==t&&this.fEt.bs===t.bs||(this.fEt.Qk=xh.Nh)}}else this.vEt()}vEt(){if(this.lEt().length)return;const t=hh(this.ht.NI,t=>t.Rt);if(void 0===t)return;const i=this.nt.NI.filter(t=>t.nC);for(const e of i)if(e.bs===t.bs)return e.Qk=xh.Kn,void(this.fEt=e)}lEt(){return this.nt.NI.filter(t=>t.Qk===xh.Kn&&(t.Lt===us.WU||t.Lt===us.HU))}_Et(t){if(t&&this.fEt){const i=function(t,i){if(""===t.bs)return;return i.filter(i=>i.bs===t.bs)[0]}(this.fEt,t.nt.NI);i&&(i.Qk=xh.Kn)}}async aEt(t,i){var e,s;const n=this.akt;let r=this.bkt;const h=this._kt;try{fr(i);const e=n.Mc,s=n.Bmt,h=this.qlt(t);nX(n.qmt,h);const o=rG(t,h,e,s,this._mt),a=this.ukt(t,o,e,s,!1);o.forEach(t=>t.Rt=!0);const u=this.ckt(o,a);for(0,await n.wat(),this.I3(),fr(i),r&&r.Mc===t?(this.HTt(u)&&await this.zTt(u),this._kt=u):(r&&await r.kn(!0),this.HTt(u)&&await this.zTt(u),this._kt=u,r=await this.$Tt(t,h,o,a),this.bkt=r,this.Kkt(r),this.gEt.OI=r.nt,r.Aat(n)),await r.bat(),fr(i);this.pkt900){this.mEt=e,this.gkt();const s=_.max(this.pkt,t.Tn);try{await this.mkt(s,!1,!0,i)}finally{this.wkt()}}}async uEt(t,i){fr(i),await this.akt.wat(),this.I3(),await this.KTt(t.Tn),fr(i);try{for(0,this.F3(),this.Ikt=!0;!this.PL.Qx&&this.pktt.Rt=!0);const o=this.ckt(r,h);this.akt&&(this.wEt.mn(Te.pa,this.yEt),await this.akt.kn(),this.wEt.wn(Te.pa,this.yEt),this.akt=void 0),this.bkt&&(await this.bkt.kn(),this.bkt=void 0),this.gkt(),this.R9();const a=_.max(this.pkt,t.Tn);await this.XTt(),await this.Lp(o),this._kt=o;const u=await this.$Tt(t,n,r,h);this.Zkt(u);try{const t={stack:[],error:void 0,hasError:!1};try{const e=this.mkt(a,!1,!0,i);Wr(e),await u.bat();const s=Es(t,Zc.ep([i]),!1);await Promise.race([e,u.ww([wH.$lt],s.Yg)])}catch(i){t.error=i,t.hasError=!0}finally{Zs(t)}}finally{this.O9(),this.wkt()}}async hEt(){const t=this.bkt;t&&t.Mc.Hot&&(await t.kn(!0),this.bkt=void 0)}static bEt(t,i){const e=[],s=[];let n=!i.some(t=>t.Glt.some(t=>"main"===t.XE));for(const t of i){if(-1!==e.indexOf(t))continue;const r=eX(t.olt.concat(t.Glt),n);n=!1;const h=t.xat.map(t=>t.qot),o=new fH(t,h,r),a=sX(t,i);for(const t of a)o.Tlt(t),e.push(t);s.push(o)}return new nG(t,s)}qlt(i){const e=[],s=[];for(const t of i.dmt)GT(t.Km)&&(0===t.xat.length?this.So(new mH("No supported representation found in the AdaptationSet with mimetype : "+t.Km)):t.Km===at.Bk?e.push(...t.jlt):s.push(...t.jlt));const n=[];return e.length>0&&n.push(t.bEt(at.Bk,e)),s.length>0&&n.push(t.bEt(at.Mk,s)),n}ckt(t,i){var e,s,n,r,h,o,a,u;const c=t.map(t=>{var i;return eh.vdt(null!=(i=t.Alt)?i:t.xat,YT(t.iat,this._mt))}).map(t=>({GT:t.GT})),d=null==(s=this.Ac)||null==(e=s.dash)?void 0:e.desiredTimescale;var l;const f=(null==(n=this.Ac)?void 0:n.seamlessSwitchStrategy)!==ak.qL&&(null==(r=this.Ac)?void 0:r.seamlessSwitchStrategy)!==ak.CLEAR_ONLY&&(null==(h=this.Ac)?void 0:h.seamlessSwitchStrategy)!==ak.SAME_DRM_ONLY&&(null!=(l=null==(a=this.Ac)||null==(o=a.dash)?void 0:o.needsTimescaleShifting)?l:zd.Zs.kp),v=null==(u=this.Ac)?void 0:u.useManagedMediaSource;return{Km:O.SV,q4:c,fq:FG(i),D8:null==i?void 0:i.D8,kp:f,M3:d,t5:v}}static AEt(t,i){if(!t.length)return;let e;for(const s of t){const t=0===s.xlt.length;e=DG(e,LG(s.Zut,i,t))}return(null==i?void 0:i.preferredKeySystems)&&e&&(e.qpt=HG(e.qpt,i.preferredKeySystems)),e}ukt(i,e,s,n,r){var h,o;const a=this.Ac.contentProtection;let u=t.AEt(e,a);if(void 0!==u)return u;var c;const d=null!=(c=null==(h=this.Ac)?void 0:h.seamlessSwitchStrategy)?c:ak.HL;if(d===ak.qL||d===ak.CLEAR_ONLY||d===ak.SAME_DRM_ONLY)return;const l=null==(o=this.akt)?void 0:o.Wpt;if(!r&&void 0!==l){const t=!l.D8;if(d===ak.HL&&t&&!this.cEt())return;return l}const f=!r&&d===ak.HL;return u=this.SEt(i,a,s,n,f),void 0!==u?(u.D8=!0,u):void 0}SEt(i,e,s,n,r){let h=i,o=!1;for(;;){if(h=o?this.UAt(h):this.FAt(h),void 0===h){if(o)return;o=!0,h=i;continue}const a=rG(h,this.qlt(h),s,n,this._mt),u=t.AEt(a,e);if(r){const t=this.ckt(a,u);if(!this.HTt(t))return}if(void 0!==u)return u}}Jkt(t){for(const i of t)i.src&&this.Aq.hV(i);AP(this.Aq.Z)}jP(){var t;const i=this.lP;this.Ckt=!0,i||(this.t9||(this.TEt(new Qc),this.kEt()),(null==(t=this.JW)?void 0:t.oL)&&this.JW.KP(),this.EEt())}QP(){this.xEt||(this.xEt=new Ga),this.PEt();const t=this.xEt.Yy;return Wr(t),t}PEt(){if(this.Ckt=!1,this.d9=!0,this.IEt=!1,this.Bkt(),this.Qx){const t=this.Tkt;t.V>0&&this.Oy(t.Tn(0))}this.t9||this.f9().then(this.CEt,this.TEt),this.tkt(),this.EEt()}get Rkt(){return this.PL.lP}f9(){return this.PL.QP()}kEt(){this.PL.jP()}R9(){this.t9||(this.Ckt=this.lP,this.t9=!0,this.kEt())}O9(){this.t9&&(this.t9=!1,this.Ckt||this.f9().then(this.CEt,this.TEt),this.tkt(),this.EEt())}EEt(){const t=this.FV,i=this.lP;t!==i&&(this.FV=i,this.Ckt=i,i?this.So(new Si(this.zx)):this.So(new vt(this.zx)))}Oy(t,i,e){return void 0===i&&(i=!1),void 0===e&&(e=vG.$St),this.$kt=!0,this.ekt.Zg(),this.T9.Zg(),this.Pz=!0,this.Y8=t,this.IEt=this.IEt&&this.J8(),this.Nkt(this.Dkt),this.REt(new ji(this.zx)),this.T9=new Zc,this.k9=Cu(this.E9(t,this.hkt,this.k9,this.nkt,this.T9.Yg,i,e),this.T9).catch(this.Lmt),this.k9}DEt(){this.T9.Zg()}async E9(t,i,e,s,n,r,h,o){var a;void 0===r&&(r=!1),void 0===h&&(h=vG.$St),void 0===o&&(o=!1),null==(a=this.JW)||a.KP();try{var u,c;0,await Promise.all([i,e,s]),fr(n),await ua(this.okt.Yy,n);const a=this.Tkt.LM(t);this.Y8=a;const d=o||(null==(c=this.Ac)||null==(u=c.dash)?void 0:u.forceHardSwitchWhenSeekingBackwards)&&a<=this.zx,l=this.NEt(a),f=this.akt;if(d||!f||!f.kP.Cr(a)&&h!==vG.tTt&&f.Mc!==l){if(l){let t=this.bkt;if(this.R9(),f&&await f.wat(),t&&t.Mc===l&&!d){const i=this.ckt(t.Mmt,t.Wpt);this.I3(),this.HTt(i)&&await this.zTt(i),this._kt=i}else{t&&await t.kn(!0);const i=this.qlt(l);f&&nX(f.qmt,i);const e=null==f?void 0:f.Mc,s=null==f?void 0:f.Bmt,n=rG(l,i,e,s,this._mt);let r=this.ukt(l,n,e,s,!1);n.forEach(t=>t.Rt=!0);let h=this.ckt(n,r);this.oEt(l)&&!d?(this.I3(),this.HTt(h)&&await this.zTt(h)):(r=this.ukt(l,n,e,s,!0),h=this.ckt(n,r),f&&(this.wEt.mn(Te.pa,this.yEt),await f.kn(),this.wEt.wn(Te.pa,this.yEt),this.akt=void 0),await this.XTt(),await this.Lp(h)),this._kt=h,t=await this.$Tt(l,i,n,r),this.bkt=t,this.gEt.OI=t.nt,this.Kkt(t),t.Aat(this.akt)}await t.bat(Pc.tot),this.Zkt(t)}}else{0;const t=this.bkt;if(t&&!t.Smt){await t.wat(),this.I3();const i=this.ckt(f.Mmt,f.Wpt);this.HTt(i)&&await this.zTt(i),this._kt=i}}0;const v=this.mkt(a,r,!1,n);Wr(v),this.Y8=void 0,await this.akt.bat(Pc.tot),fr(n),this.fkt(),await v,fr(n),this.O9(),this.Pz=!1,this.BEt(new Yr(this.zx)),this.tEt()}catch(t){if(Ce(t))return void 0;0}}tEt(){if(this.lP||this.xP||void 0===this.OL)return;const t=this.zx;var i,e;this.zx+this.OL-this.VP.Cd.maximumOffset0){const i=u.LM(t);o!==i&&(u.Cr(o)&&this.Pyt.jdt.Km===Lh.SV||(o=i,h=!0))}if(h)h=!1,null==r||r.Zg(),r=new Zc,r.$g(s),n=Cu(this.MEt(o,i,e,r.Yg),r),Wr(n);else if(!this.Fkt&&!this.n5)break;const c=Es(a,Zc.ep([s]),!1);await Promise.race([n,this.ww([d.ey,d.iy,d.Cw],c.Yg),this.Pyt.jdt.ww(jt.Fot,c.Yg)])}catch(t){a.error=t,a.hasError=!0}finally{Zs(a)}}}async MEt(t,i,e,s){for(this.PL.Oy(t,i,e);this.Fkt||this.n5;)await this.PL.ww([d.Zw,d.Vw],s)}gkt(){void 0===this.Akt&&(this.Akt=this.pkt,this.PL.mn(d.$w,this.REt),this.PL.mn(d.Zw,this.BEt))}wkt(){if(void 0===this.Akt)return;const t=this.pkt;this.Akt=void 0,this.PL.wn(d.$w,this.REt),this.PL.wn(d.Zw,this.BEt),this.pkt!==t&&this.Nc()}LEt(t){this.Ho=this.Ho.HM(t)}NEt(t){const i=this.Pyt.jdt,e=i.Amt.filter(t=>t.ct>=.2);if(0===e.length)return;const s=e[0];if(t<=s.Tn)return s;for(const i of e)if(i.An>t)return i;return i.Km!==Lh.SV?e[e.length-1]:void 0}UAt(t){let i=t.Hmt;for(;i&&i.ct<.2;)i=i.Hmt;return i}FAt(t){let i=t.Wmt;for(;i&&i.ct<.2;)i=i.Wmt;return i}async Ta(t,i,e){const s={stack:[],error:void 0,hasError:!1};try{var n;if(this.pq.BW(t.contentProtection),this.OEt(),this.Ac&&!Ak(this.Ac)&&await this.hr(),!t||Ak(t))return;const h=Es(s,Zc.ep([e]),!1);this.uV=Zc.ep([h.Yg]),this.Ac=t,this.FEt=i,this._mt=t.abr,this.Zpt=t.ignoreEmbeddedTextTrackTypes,this.UEt=new pG(this.aV,Boolean(this.Ac.useCredentials),this.Ndt),this.UEt.wn(d.sy,this.Rs);const o=AG(this.UEt,this.Sut);var r;if(this.SSt(!0),this.nEt=new eG({rC:zd.Dh(this.Ac.src),ISt:null!=(r=null==(n=this.Ac.latencyConfiguration)?void 0:n.targetOffset)?r:this.Ac.liveOffset,BSt:this.Ac.timeServer,Xk:this.Ac.useCredentials},this.VEt(this._mt),this.aV,o,this.Ac.dash),this.Pyt=this.nEt.Br,this.Pyt.jdt.wn(d.Ww,this.HEt),this.Pyt.jdt.wn(d.qw,this.WEt),this.Pyt.jdt.wn(Nz.jAt,this.qEt),this.Pyt.jdt.wn(jt.Fot,this.tkt),this.Pyt.jdt.wn(d.oy,this.Rs),await this.zEt.Un(this.Pyt.jdt),await this.GEt.Un(this.Pyt.jdt),Ct(this.Zpt,nh.EMSG)||(this.Opt=new YG(this.PL),this.Gl.qW(this.Opt.Z),await this.Opt.Un(this.Pyt.jdt)),t.latencyConfiguration){const i=t.latencyConfiguration;this.JW=new ZG(this,this.PL,i),this.JW.Rt=!0,this.cq.Ea(this.JW)}this.Bkt(),h.zg()}catch(t){s.error=t,s.hasError=!0}finally{Zs(s)}}IP(t,i,e,s){return Promise.resolve()}CP(){return Promise.resolve()}async XEt(){const t=this.Pyt.jdt.cP;if(this.SSt(t),t)return this.jkt(),void this.xq.mn(Jr.xM,this.jEt);this.rEt()?this.xq.wn(Jr.xM,this.jEt):await this.QEt()}async QEt(){var t,i;throw await Promise.all([null==(t=this.akt)?void 0:t.wat(Pc.pot),null==(i=this.bkt)?void 0:i.wat(Pc.pot)].filter(it)),this.eEt(),this.DEt(),this.skt.Zg(),new m("The provided MPEG-DASH manifest could not be loaded")}get cP(){return this.ASt}SSt(t){this.ASt!==t&&(this.ASt=t,this.So(t?new TG:new lh))}Bkt(){this.Pyt&&(this.KEt=this.YEt(this.KEt,this.uV.Yg).catch(this.Lmt))}async YEt(t,i){t&&(await t,fr(i));try{this.wP===Dn.HL||this.d9?await this.JEt(i):this.wP===Dn.zU&&await this.ZEt(i)}catch(t){throw sa(t),this.Qq(new as(me.MANIFEST_LOAD_ERROR,t.message,t)),t}}async JEt(t){await this.ZEt(t),this.$Et||(this.$Et=!0,this.okt.$g(this.Un(this.FEt,t)));try{await this.okt.Yy}catch(t){sa(t),this.Qq(new as(me.MEDIA_DECODE_ERROR,t.message,t))}}async ZEt(t){await ua(this.nEt.W,t);const i=this.Pyt.jdt;if(void 0===this.JW&&i.Km===Lh.SV){const t=i.pyt,e=(null==t?void 0:t.tSt)?(null==t?void 0:t.tSt)/1e3:i.xSt,s={minimumOffset:(null==t?void 0:t.JAt)?(null==t?void 0:t.JAt)/1e3:.5*e,maximumOffset:(null==t?void 0:t.$At)?(null==t?void 0:t.$At)/1e3:1.5*e,targetOffset:e,forceSeekOffset:2.5*e,minimumPlaybackRate:ik,maximumPlaybackRate:ih};this.JW=new ZG(this,this.PL,s),this.cq.Ea(this.JW)}}Zkt(i){const e=this.akt;i!==e&&(this.akt&&this.Qkt(this.akt),this.bkt&&this.Ykt(this.bkt),e&&this.Nkt(this.Dkt),this.akt=i,this.bkt=e,this.Hkt(this.akt),this.bkt&&this.Kkt(this.bkt),this.tO.OI=i.ht,this.sO.OI=i.rt,this._Et(i),this.wEt.mn(Te.pa,this.yEt),t.txt(this.wEt),this.wEt.wn(Te.pa,this.yEt),this.wEt.OI=i.nt,this.gEt.OI=void 0,this.vEt())}static txt(t){for(const i of t.NI)i.Qk=xh.Nh}be(){this.PL.be()}we(){this.PL.we()}Qq(t){this.nq||(Wr(this.hr()),this.nq=ar(t),this.rq=t,this.So(new el(t)))}OEt(){this.nq=void 0,this.rq=void 0}WTt(){const t=this.aq;t&&(t.s4&&(t.s4.VY=this.Mz.YY),t.e4&&(t.e4.VY=this.Mz.YY))}qTt(){const t=this.aq;t&&(t.s4&&(t.s4.zY=this.Mz.zY),t.e4&&(t.e4.zY=this.Mz.zY))}determineStallJumpTarget(){if(this.akt)return this.akt.gmt()&&this.zx>this.akt.An-zB&&!this.akt.bmt?this.akt.An:void 0}async hr(){if(this.ixt)return this.ixt;try{this.ixt=this.sxt(),await this.ixt}finally{this.ixt=void 0}}async sxt(){this.vP=1,this.uV.Zg(),this.DEt(),this.eEt(),this.skt.Zg(),this.okt.Zg(),this.$kt=!1,this.jP(),this.d9=!1,this.IEt=!1,this.tO.OI=void 0,this.sO.OI=void 0,this.wEt.OI=void 0,this.gEt.OI=void 0,this.KEt&&(await this.KEt.catch(gs),this.KEt=void 0),await Promise.all([this.hkt,this.k9,this.nkt,this.okt.Yy.catch(gs)]),this.akt&&(await this.akt.kn(!0),this.akt=void 0),this.bkt&&(this.Ykt(this.bkt),await this.bkt.kn(!0),this.bkt=void 0),await this.XTt(),this._kt=void 0,this.fEt=void 0,this.xq.mn(Jr.xM,this.jEt),this.xq.hr(),await this.zEt.hr(),await this.GEt.hr(),void 0!==this.Opt&&(this.Gl.XW(this.Opt.Z),await this.Opt.kn(),this.Opt=void 0),this.UEt&&(this.UEt.mn(d.sy,this.Rs),this.UEt=void 0),this.Pyt&&(this.Pyt.jdt.mn(d.Ww,this.HEt),this.Pyt.jdt.mn(d.qw,this.WEt),this.Pyt.jdt.mn(Nz.jAt,this.qEt),this.Pyt.jdt.mn(jt.Fot,this.tkt),this.Pyt.jdt.mn(d.oy,this.Rs),await this.nEt.kn(),this.Pyt=void 0),this.Mkt=!1,this.nxt=NaN,this.rxt=0,this.hxt=0,this.Akt=void 0,this.t9=!1,this.Ho=Uo.rL(),this.FV=!0,this.Y8=void 0,this.oxt=!1,this.Pz=!1,this.$Et=!1,this.okt=new Ga,this.Ekt=0,this.xkt=0,this.Pkt=0,this.Ac=void 0,this.FEt=void 0,this.Zpt=[],this.mEt=void 0,this.cq.hr(),this.JW=void 0,this.jTt={rO:0,hO:0,oO:0},await this.Aq.hr(),this.PL.Eq(),this.axt.hr()}async kn(){this.Vo(),this.OEt(),await this.hr(),this.Vo(),this.tO.kn(),this.sO.kn(),this.wEt.kn(),this.gEt.kn(),this.Gl.kn(),this.xq.kn(),this.Cq.zg(),await this.zEt.kn(),await this.GEt.kn(),this.axt.kn(),this.PL.mn(d.Cw,this.B7),this.PL.mn(jr.Dw,this.U8),this.PL.mn(d.Nw,this.uxt),this.PL.mn(d.$w,this.REt),this.PL.mn(d.Zw,this.BEt),this.PL.mn(d.Jw,this.Xkt),this.PL.mn(d.py,this.Nc),this.PL.mn([d.uo,d.jw],this.cxt),this.PL.mn(tX,this.Rs),await this.Aq.kn(),this.Gl.kn(),this.Mz.mn("UY",this.dxt),this.Mz.mn("qY",this.lxt),this.PL.mn(hc.ma,this.fxt),this.PL.mn([d.xw,d.Ew],this.Rs),this.PL.mn(d.Ay,this.Gmt),this.PL.mn(d.LICENSE_REQUEST_GENERATED,this.xmt),this.PL.Rq=void 0,this.pq.mn("contentProtectionsTracked",this.vxt),this.PL.J7=void 0}qP(){return this.PL.Ma}Aa(){return this.PL.Sq}get sP(){return!1}YP(){return!1}JP(){}ZP(){}$P(){}tI(){this.ikt(!0)}get OL(){var t;const i=null==(t=this.Pyt)?void 0:t.jdt;if(i&&i.Km===Lh.SV&&i.hyt)return i.Xdt().getTime()/1e3-i.hyt.getTime()/1e3-this.zx}sI(t){const i=this.PL.Tq(t);return this.axt.tt(i),i}constructor(t,i,e,s,n,r,h){var o;super(),this.aV=void 0,this.Mz=void 0,this.Ndt=void 0,this.Sut=void 0,this.PL=void 0,this.Cq=void 0,this.xq=void 0,this.akt=void 0,this.bkt=void 0,this.d9=!1,this.nxt=NaN,this.nq=void 0,this.rq=void 0,this.t9=!1,this.Akt=void 0,this.Y8=void 0,this.oxt=!1,this.rxt=0,this.hxt=0,this.Mkt=!1,this.uV=new Zc,this.okt=new Ga,this.ixt=void 0,this.$Et=!1,this.Pyt=void 0,this.nEt=void 0,this.UEt=void 0,this.ASt=!0,this.Ckt=!0,this.xEt=void 0,this.Ho=Uo.rL(),this.oq=Dn.pz,this.KEt=void 0,this.FV=!0,this.Ac=void 0,this.FEt=void 0,this._mt=void 0,this.Zpt=[],this.Pz=!1,this.cq=void 0,this.ekt=new Zc,this.hkt=Promise.resolve(),this.T9=new Zc,this.k9=Promise.resolve(),this.$kt=!1,this.IEt=!1,this.skt=new Zc,this.nkt=Promise.resolve(),this._kt=void 0,this.fEt=void 0,this.Ikt=!1,this.tO=void 0,this.sO=void 0,this.Gl=void 0,this.wEt=void 0,this.gEt=void 0,this.Opt=void 0,this.zEt=void 0,this.GEt=void 0,this.Aq=void 0,this.axt=void 0,this.Ekt=0,this.xkt=0,this.Pkt=0,this.lq=new hu,this.mEt=void 0,this.jTt={rO:0,hO:0,oO:0},this.aq=void 0,this.JTt=void 0,this.pq=void 0,this.JW=void 0,this.jkt=t=>{var i,e,s;let n;"Rmt"===(null==t?void 0:t.type)&&(n=t.kpt),n&&(null==(i=n.plt)?void 0:i.Km)===at.Bk&&(null==(s=this.bt)||null==(e=s.dash)?void 0:e.forceRecreateMediaSourceOnAudioSwitch)?this.ikt(!0):this.ikt()},this.Gmt=t=>{var i;null==(i=this.akt)||i.Gmt(t)},this.xmt=t=>{var i;null==(i=this.akt)||i.xmt(t)},this.Nc=()=>{this.So(new B(this.zx,this.Vx))},this.U8=t=>{this.So(new wn(this.zx,t.Jm,t.Py))},this.Wkt=t=>{this.Ekt+=t.uO,this.So(t)},this.qkt=t=>{const i=t.segments.filter(t=>t.Pct);t.track===at.Bk?this.xkt=i.length:t.track===at.Mk&&(this.Pkt=i.length)},this.B7=()=>{const t=this.ct;S(t)||t===this.nxt||(this.nxt=t,this.So(new zr(this.nxt)))},this.cxt=()=>{this.tkt(),this.EEt()},this.uxt=t=>{this.IEt||!this.Qx||this.xP||(this.IEt=!0,this.So(null!=t?t:new ur(this.zx)))},this.WEt=t=>{this.Rs(t),this.Mkt||(this.Mkt=!0,this.Cq.zV())},this.HEt=()=>{this.Pyt.jdt.mn(d.Ww,this.HEt),this.So(new ke)},this.Gkt=t=>{var i;if(t.errorObject.code===me.CONTENT_PROTECTION_OUTPUT_RESTRICTED&&(null==(i=this.akt)?void 0:i.Mmt.every(t=>!t.Plt)))return;this.Qq(t.errorObject),this.So(t)},this.zkt=t=>{this.Qq(t.errorObject)},this.Lmt=t=>{Ce(t)||this.Qq(new as(me.MEDIA_DECODE_ERROR,t.message,t))},this.tkt=()=>{if(!this.lP){if(!this.Skt()){const t=this.Pyt.jdt.TSt;return void this.Oy(t,!0)}if(this.kkt()){const t=this.Pyt.jdt.TSt;return void this.Oy(t,!0)}}},this.REt=t=>{this.oxt=this.xP,this.So(t)},this.BEt=t=>{const i=this.oxt,e=this.xP;this.oxt=e,i&&!e&&this.So(t),this.uxt()},this.Xkt=()=>{const t=this.MP,i=this.DP;this.rxt===t&&this.hxt===i||(this.rxt=t,this.hxt=i,this.So(new Vs))},this.yEt=t=>{const i=t.Ht;i.Qk===xh.Kn?(this.dEt(i),this.fEt=i):i===this.fEt&&i.Qk===xh.Nh&&(this.fEt=void 0,this.vEt())},this.CEt=()=>{this.t9||this.xEt&&(this.xEt.Qy(),this.xEt=void 0)},this.TEt=t=>{this.t9||this.xEt&&(this.xEt.Ky(t),this.xEt=void 0)},this.qEt=()=>{this.XEt().catch(this.Lmt)},this.jEt=()=>{this.QEt().catch(this.Lmt),this.xq.mn(Jr.xM,this.jEt)},this.fxt=t=>{this.Qq($k(t.lt))},this.dxt=()=>{this.WTt()},this.lxt=()=>{this.qTt()},this.vxt=t=>{this.GTt(t.NW)},this.aV=t,this.Sut=new JG(n),this.PL=r,this.JTt=h,this.Mz=e,this.Mz.wn("UY",this.dxt),this.Mz.wn("qY",this.lxt),this.cq=s,this.Ndt=Y({},i.retryConfiguration,{maxRetries:null!=(o=i.retryConfiguration.maxRetries)?o:1/0}),this.tO=new Gh,this.sO=new Gh,this.pq=new eC(t),this.pq.wn("contentProtectionsTracked",this.vxt),this.PL.wn(d.Cw,this.B7),this.PL.wn(jr.Dw,this.U8),this.PL.wn(d.Nw,this.uxt),this.PL.wn(d.$w,this.REt),this.PL.wn(d.Zw,this.BEt),this.PL.wn(d.Jw,this.Xkt),this.PL.wn(d.py,this.Nc),this.PL.wn([d.uo,d.jw],this.cxt),this.PL.wn(tX,this.Rs),this.PL.wn(hc.ma,this.fxt),this.PL.Rq=this.pq,this.PL.J7=this,this.PL.wn([d.xw,d.Ew],this.Rs),this.PL.wn(d.Ay,this.Gmt),this.PL.wn(d.LICENSE_REQUEST_GENERATED,this.xmt),this.Cq=new Gt(this,this.PL),this.xq=new _s(this.Cq,!0),this.xq.wn(Jr.xM,this.tkt),this.xq.wn(Ii,this.Rs),this.wEt=new ai,this.wEt.wn(Te.pa,this.yEt),this.gEt=new ai,this.zEt=new PG(this.PL),this.GEt=new WG(this.PL),this.Aq=new eu(this.PL,this.aV),this.axt=new bc,this.Gl=new Tu([this.wEt,this.zEt.Z,this.GEt.Z,this.Aq.Z,this.axt])}};function eX(t,i){const e=t.filter(t=>"urn:mpeg:dash:role:2011"===t.x8).map(t=>t.XE).filter(it);return i||Ct(e,"main")?Ct(e,"caption")?"captions":Ct(e,"subtitle")?"subtitles":Ct(e,"dub")?"translation":"main":Ct(e,"sign")?"sign":Ct(e,"description")?"descriptions":Ct(e,"commentary")?"commentary":"alternative"}function sX(t,i){var e;const s=hh([...t.ywt,...t.bwt],t=>"urn:mpeg:dash:adaptation-set-switching:2016"===t.x8);var n;const r=null!=(n=null==s||null==(e=s.XE)?void 0:e.split(","))?n:[],h=[];for(const t of r){const e=Number(t),s=hh(i,t=>t.o===e);s&&h.push(s)}return h}function nX(t,i){for(const e of t){const t=hh(i,t=>t.Km===e.Km);if(!t)continue;const s=e.Z,n=t.Z;for(const t of s){const i=t.tC;if(!i)continue;const e=t.xat.map(t=>t.o),s=hh(n,t=>{const i=t.xat.map(t=>t.o);return wc(e,i)});if(!s)continue;const r=i.map(t=>t.o);s.tC=s.$I.NI.filter(t=>Ct(r,t.o))}}}r();var rX=class{async hTt(t){return(await this.gxt._xt(t.map(mG))).shift()}sdt(t,i){const e=Rt(t,i);return this.pxt.qy(e)}async Aut(t,i){var e;const s=Rt(t,i);return null==(e=await this.mxt.zy(s))?void 0:e.data}jJ(t){return this.wxt.zy(t)}constructor(t,i,e,s){this.gxt=void 0,this.pxt=void 0,this.mxt=void 0,this.wxt=void 0,this.gxt=t,this.pxt=i,this.mxt=e,this.wxt=s}};r(),r(),r();var hX=class{yxt(t){return Promise.resolve(!1)}uTt(t){return Promise.reject(oX)}bxt(t){return Promise.reject(oX)}qy(t){return Promise.resolve(!1)}zy(t){return Promise.resolve(void 0)}Axt(t,i){return Promise.resolve(void 0)}_xt(t){return Promise.resolve([])}Sxt(){return Promise.resolve([])}Txt(t){return Promise.resolve([])}kxt(t,i){return Promise.resolve([])}pS(t){return Promise.reject(oX)}Ext(t){return Promise.reject(oX)}xxt(){return Promise.reject(oX)}},oX="Storage disabled",aX="Storage disabled";r(),r(),r();var uX=class{get Pxt(){return this.Jg.Yy}async yxt(t){return(this.Ixt||await this.Pxt).yxt(t)}async uTt(t,i){return(this.Ixt||await this.Pxt).uTt(t,i)}async bxt(t,i){return(this.Ixt||await this.Pxt).bxt(t,i)}async qy(t){return(this.Ixt||await this.Pxt).qy(t)}async zy(t){return(this.Ixt||await this.Pxt).zy(t)}async Axt(t,i){return(this.Ixt||await this.Pxt).Axt(t,i)}async _xt(t){return(this.Ixt||await this.Pxt)._xt(t)}async Sxt(){return(this.Ixt||await this.Pxt).Sxt()}async Txt(t){return(this.Ixt||await this.Pxt).Txt(t)}async kxt(t,i){return(this.Ixt||await this.Pxt).kxt(t,i)}async pS(t){return(this.Ixt||await this.Pxt).pS(t)}async Ext(t){return(this.Ixt||await this.Pxt).Ext(t)}async xxt(){return(this.Ixt||await this.Pxt).xxt()}constructor(t){this.Jg=new Ga,this.Ixt=void 0,this.Jg.$g(t),this.Jg.Yy.then(t=>{this.Ixt=t})}},cX=class{get Cxt(){return this.Jg.Yy}async Rxt(t){const i=this.Dxt||await this.Cxt;return await i.Rxt(t)}constructor(t){this.Jg=new Ga,this.Dxt=void 0,this.bct=void 0,this.Nxt=void 0,this.Bxt=void 0,this.Mxt=void 0,this.Lxt=void 0,this.Jg.$g(t);const i=this.Jg.Yy;i.then(t=>{this.Dxt=t}),this.bct=new uX(i.then(t=>t.bct)),this.Nxt=new uX(i.then(t=>t.Nxt)),this.Bxt=new uX(i.then(t=>t.Bxt)),this.Mxt=new uX(i.then(t=>t.Mxt)),this.Lxt=new uX(i.then(t=>t.Lxt))}};function lu(t){return new m("This storage cannot handle persistency type "+t)}r(),r(),r();var Bu=function(t){return t.Oxt="readonly",t.Fxt="readwrite",t}({}),xn=class{yxt(t){return Promise.resolve("temporary"===t)}uTt(t,i){return void 0===i&&(i="temporary"),"temporary"!==i?Promise.reject(lu(i)):(this.Uxt(t.key),this.Lb.push(t),Promise.resolve())}bxt(t,i){if(void 0===i&&(i="temporary"),"temporary"!==i)return Promise.reject(lu(i));for(const i of t)this.Uxt(i.key);for(const i of t)this.Lb.push(i);return Promise.resolve()}qy(t){return Promise.resolve(Boolean(this.Vxt(t)))}zy(t){return Promise.resolve(this.Vxt(t))}Axt(t,i){return Promise.resolve(this.Hxt(t,i))}_xt(t){const i=t?t.map(t=>this.Vxt(t)):this.Lb;return Promise.resolve(i.filter(it))}Sxt(){return Promise.resolve([...this.Lb])}Txt(t){return this.kxt(t,"key")}kxt(t,i){const e=this.Lb.filter(e=>e[i]===t);return Promise.resolve(e)}pS(t){return this.Uxt(t),Promise.resolve()}Ext(t){for(const i of t)this.Uxt(i);return Promise.resolve()}xxt(){return Wt(this.Lb),Promise.resolve()}Vxt(t){return this.Hxt(t,"key")}Hxt(t,i){for(const e of this.Lb)if(e[i]===t)return e}Uxt(t){const i=this.Vxt(t);i&&_e(this.Lb,i)}constructor(){this.Lb=[]}},kc=class t{static jet(){return Promise.resolve(new t)}Rxt(t){return t(this)}constructor(){this.Nxt=void 0,this.bct=void 0,this.Bxt=void 0,this.Mxt=void 0,this.Lxt=void 0,this.Nxt=new xn,this.bct=new xn,this.Bxt=new xn,this.Mxt=new xn,this.Lxt=new xn}};r(),r();var dX=class{async yxt(t){for(const i of this.Wxt)if(await i.yxt(t))return!0;return!1}async uTt(t,i){void 0===i&&(i="persistent");for(const e of this.Wxt)if(await e.yxt(i))return e.uTt(t);throw lu(i)}async bxt(t,i){void 0===i&&(i="persistent");for(const e of this.Wxt)if(await e.yxt(i))return e.bxt(t);throw lu(i)}async qy(t){for(const i of this.Wxt)if(await i.qy(t))return!0;return!1}async zy(t){for(const i of this.Wxt){const e=await i.zy(t);if(e)return e}}async Axt(t,i){for(const e of this.Wxt){const s=await e.Axt(t,i);if(s)return s}}async _xt(t){const i=[];for(const e of this.Wxt)i.push(...await e._xt(t));return i}async Sxt(){const t=[];for(const i of this.Wxt)t.push(...await i.Sxt());return t}async Txt(t){const i=[];for(const e of this.Wxt)i.push(...await e.Txt(t));return i}async kxt(t,i){const e=[];for(const s of this.Wxt)e.push(...await s.kxt(t,i));return e}async pS(t){for(const i of this.Wxt)await i.pS(t)}async Ext(t){for(const i of this.Wxt)await i.Ext(t)}async xxt(){for(const t of this.Wxt)await t.xxt()}constructor(t){this.Wxt=void 0,this.Wxt=t}};function lX(t){return async()=>{const i=await Promise.all(t.map(t=>t()));return fX.jet(i)}}var fX=class t{static jet(i){return Promise.resolve(new t(i))}get Mxt(){return this.qxt}get Lxt(){return this.zxt}get Bxt(){return this.Gxt}get Nxt(){return this.Xxt}get bct(){return this.jxt}Rxt(i){if(0===this.Qxt.length)return i(this);const e=[];let s=0;const n=r=>(e.push(r),s++,st.Mxt)),this.zxt=new dX(t.map(t=>t.Lxt)),this.Gxt=new dX(t.map(t=>t.Bxt)),this.Xxt=new dX(t.map(t=>t.Nxt)),this.jxt=new dX(t.map(t=>t.bct))}},Wc=class t{static Ba(i){t.MW.Ba(i)}static get Bg(){var i,e;return null!=(e=(i=t).Rbt)?e:i.Rbt=t.MW.jet()}};Wc.MW=new class{jet(){return new cX(this.Kxt())}async Kxt(){this.Yxt&&(await Promise.resolve(),this.Yxt=!1);for(const t of this.Jxt)try{return await lX([kc.jet,t])()}catch(t){}return await lX([kc.jet,this.Zxt])()}Ba(t){if(!this.Yxt)throw new m("Registration overdue");this.Jxt.push(t)}constructor(t){this.Zxt=void 0,this.Jxt=[],this.Yxt=!0,this.Zxt=t}}(class t{static jet(){return Promise.resolve(new t)}Rxt(t){return Promise.reject(aX)}constructor(){this.Nxt=void 0,this.bct=void 0,this.Bxt=void 0,this.Mxt=void 0,this.Lxt=void 0,this.Nxt=new hX,this.bct=new hX,this.Bxt=new hX,this.Mxt=new hX,this.Lxt=new hX}}.jet),Wc.Rbt=void 0;var vX=class extends iX{zP(){if(RU(this.PL))return this.PL.zP()}async kn(){var t;await super.kn(),null==(t=this.$xt)||t.kn()}oEt(t){var i,e;return((null!=(e=null==(i=this.Ac)?void 0:i.seamlessSwitchStrategy)?e:ak.HL)!==ak.HL||!zs.gg)&&super.oEt(t)}cEt(){return!(zs.w_&&zs.b_<3)&&super.cEt()}VEt(t){return DU(t)}constructor(t,i,e,s,n,r){super(t,i,e,s,new rX(Wc.Bg.Bxt,Wc.Bg.Nxt,Wc.Bg.bct,Wc.Bg.Lxt),n,new NU(r)),this.Drt=void 0,this.$xt=void 0,this.Drt=r,zs.X_&&(this.$xt=new qU(this))}},_X=class extends vX{async kn(){await super.kn(),await this.Nq.Dq(this.PL)}constructor(t,i,e,s,n,r,h){const o=new qs(n);super(t,i,e,s,o.Yq(r),h),this.Nq=void 0,this.Nq=o}};r(),r(),r(),r(),r();var gX=class extends Da{get tPt(){return this.wE.tPt}Ux(){return super.Ux().Ly(this.tPt)}qrt(){return super.qrt().Ly(this.tPt)}Q2(t,i,e){const s=this.tPt;return super.Q2(t,{Get:i.Get-s,ct:i.ct,EU:i.EU-s},e)}f3(t,i){const e=this.tPt;return super.f3(_.max(0,t-e),_.max(0,i-e))}pS(t,i,e){const s=this.tPt;return super.pS(_.max(0,t-s),_.max(0,i-s),e)}G3(t,i){const e=this.tPt;super.G3(_.max(0,t-e),_.max(0,i-e))}X3(t,i){const e=this.tPt;super.X3(_.max(0,t-e),_.max(0,i-e))}constructor(t,i){super(i),this.wE=void 0,this.wE=t}},pX=class extends ja{get tPt(){return this.wE.tPt}Nd(){return super.Nd()+this.tPt}F4(t){super.F4(t-this.tPt)}EP(){return super.EP().Ly(this.tPt)}W4(t,i,e,s){const n=this.tPt;super.W4(t-n,i-n,e,s)}Lrt(t){return new gX(this,t)}constructor(t,i){super(i),this.wE=void 0,this.Brt(i),this.wE=t}};r(),r();var mX=class{get nt(){return this.Gl}sI(t,i,e,s,n,r,h,o){const a=new Ji(t,i,e,s,n,r,h,void 0,o);return this.Gl.tt(a),a}Tq(t){const i=new NL(t.Lt,t.Th,t.bs);return this.Gl.tt(i),i}rV(t){this.Gl.it(t)}hr(){this.Gl.hr()}kn(){for(const t of this.Gl.NI.slice())t.kn();this.Gl.kn()}constructor(){this.Gl=new bc}},wX=class extends mX{sI(t,i,e,s,n,r,h,o){const a=super.sI(t,i,e,s,n,r,h,o);return this.J9.tt(a),a}rV(t){super.rV(t),this.J9.it(t),t.kn()}Tq(t){const i=super.Tq(t);return this.J9.tt(i),i}hr(){super.hr(),this.J9.hr()}kn(){super.kn(),this.J9.kn()}constructor(t,i){super(),this.J9=void 0,this.J9=new vL(t,i)}},yX=class extends pn{get tPt(){return this.iPt}set tPt(t){this.iPt=t}Ux(){return super.Ux().Ly(this.iPt)}Hx(){return SX(super.Hx(),this.iPt)}Gx(){return super.Gx()+this.iPt}Nd(){return super.Nd()+this.iPt}mP(){return super.mP().Ly(this.iPt)}EP(){return super.EP().Ly(this.iPt)}Oy(t,i,e){const s=_.max(0,t-this.iPt);super.Oy(s,i,e)}$W(t){super.$W(SX(t,-this.iPt))}RP(){return this.Gl}sI(t,i,e,s,n,r,h,o){return this.iV.sI(t,i,e,s,n,r,h,o)}Tq(t){return this.iV.Tq(t)}rV(t){this.iV.rV(t)}Eq(){this.iV.hr(),super.Eq()}wq(){return!1}bq(t,i,e,s,n){throw new m("Not supported")}zg(){return this.Aet.kn(),this.bet.kn(),this.iV.kn(),this.Gl.kn(),super.zg()}cht(t){return new pX(this,t)}uht(t){return new Ia(t)}iI(t){let i;switch(t.type){case d.uo:i=new vt(t.currentTime+this.iPt);break;case d.jw:i=new Si(t.currentTime+this.iPt);break;case Jr.PM:i=new mo(t.currentTime+this.iPt);break;case d.py:i=new B(t.currentTime+this.iPt,SX(t.currentProgramDateTime,this.iPt));break;case d.Qw:i=new Et(t.currentTime+this.iPt);break;case d.$w:i=new ji(t.currentTime+this.iPt);break;case d.Zw:i=new Yr(t.currentTime+this.iPt);break;case d.Fw:i=new Xr(t.currentTime+this.iPt);break;case d.Vw:i=new RL(t.currentTime+this.iPt);break;case d.Nw:i=new ur(t.currentTime+this.iPt);break;case d.Kw:i=new Ik(t.currentTime+this.iPt,t.playbackRate);break;case d.wy:i=new Wi(t.currentTime+this.iPt,t.volume);break;case d.Cw:i=new zr(t.duration+this.iPt);break;case Jr.AI:i=new Ka(t.currentTime+this.iPt,t.readyState);break;default:i=t}super.iI(i)}we(){super.we(),this.bet.we()}be(){super.be(),this.bet.be()}constructor(t){super(t),this.iPt=0,this.Gl=void 0,this.iV=void 0,this.bet=void 0,this.Aet=void 0,this.iV=new wX(this,new ac),this.Gl=new Tu([this.iV.nt,super.RP()]),this.bet=new ma,this.bet.Y7(this.hq.parentElement),this.Aet=new _a(this.bet.xe,this.Wu,this.Gl,this.Ql,this.Ma,this.Sq)}},bX=class extends(BU(yX)){constructor(t){super(t)}},AX=class extends(ft(yX)){constructor(t){super(t)}};function SX(t,i){return t?new Date(t.getTime()+1e3*i):void 0}var TX=class extends Ea{Yq(t){return t===at.Mk?new AX(super.Yq(t)):t===at.Bk?new bX(super.Yq(t)):void 0}async Dq(t){const i=t;await i.zg(),await super.Dq(i.Zrt)}},kX=class extends vX{async Lp(t){await super.Lp(t),void 0===this.ePt&&(this.ePt=this.sPt(),this.PL.tPt=this.ePt)}sPt(){if(this.ct===1/0){const t=this.Tkt;if(t.V>0)return _.max(0,t.Tn(0)-300)}return 0}E9(t,i,e,s,n,r,h,o){return void 0===r&&(r=!1),void 0===h&&(h=vG.$St),void 0===o&&(o=!1),o||(o=this.ct===1/0&&zs.w_&&zs.b_<3&&t<=this.zx),super.E9(t,i,e,s,n,r,h,o)}async hr(){await super.hr(),this.ePt=void 0,this.PL.tPt=0}async kn(){await super.kn(),await this.PL.zg(),await this.Nq.Dq(this.PL)}static US(t){var i;return(!t||"google-dai"!==(null==t||null==(i=t.ssai)?void 0:i.integration))&&(zs.w_&&zs.b_<4)}constructor(t,i,e,s,n,r,h){const o=new TX(new qs(n));super(t,i,e,s,o.Yq(r),h),this.Nq=void 0,this.ePt=void 0,this.Nq=o,this.ePt=void 0}};r(),r(),r(),r(),r();var EX=class extends UU{get Zrt(){return this.PL}get DP(){return this.PL.DP}get MP(){return this.PL.MP}constructor(t){super(t)}};r(),r(),r();var xX=class extends Da{Vrt(){return this.nPt?this.ZY:super.Vrt()}Hrt(t){this.nPt?this.ZY=t:super.Hrt(t)}Ux(){return this.nPt?this.rPt:super.Ux()}NS(){return this.nPt?this.ZS:super.NS()}qrt(){return this.nPt?this.hPt:super.qrt()}zrt(){return this.nPt?this.KY:super.zrt()}Grt(t){this.nPt?this.KY=t:super.Grt(t)}Q2(t,i,e){return this.K2(e=>this.oPt(t,i,e),e)}oPt(t,i,e){return super.Q2(t,i,e)}j3(){return this.K2(()=>this.aPt())}aPt(){return super.j3()}J2(t,i,e){return this.K2(e=>this.uPt(t,i,e),e)}uPt(t,i,e){return super.J2(t,i,e)}G3(t,i){this.nPt?(this.hPt=this.hPt.HM(new Uo([t,i])),this.cPt.push({Km:"_ct",CO:t,RO:i})):this.dPt(t,i)}dPt(t,i){super.G3(t,i)}f3(t,i){return this.K2(()=>this.lPt(t,i))}lPt(t,i){return super.f3(t,i)}X3(t,i){this.nPt?(this.hPt=this.hPt.qM(new Uo([t,i])),this.cPt.push({Km:"pS",CO:t,RO:i})):this.fPt(t,i)}fPt(t,i){super.X3(t,i)}pS(t,i,e){return this.K2(e=>this.vPt(t,i,e),e)}vPt(t,i,e){return super.pS(t,i,e)}RZ(t){return this.K2(()=>this._Pt(t))}_Pt(t){return super.RZ(t)}async K2(t,i){for(this.A3();this.nPt;)await ua(this.nPt.Yy,i),this.A3();fr(i);try{this.C3=t(i),await this.C3}finally{this.C3=void 0}}A3(){if(this.C3)throw new m("Internal error")}async gPt(){if(this.nPt)throw new g("Already locked");this.nPt=new Ga,this.pPt(),this.C3&&(await this.C3.catch(gs),this.pPt())}mPt(){const t=this.nPt;void 0!==t&&(t.Qy(),this.nPt=void 0,this.wPt())}pPt(){this.ZS=super.NS(),this.ZY=super.Vrt(),this.KY=super.zrt(),this.rPt=super.Ux(),this.hPt=super.qrt(),this.yPt=!1}wPt(){this.A3(),super.Hrt(this.ZY),super.Grt(this.KY);const t=this.cPt.slice();Wt(this.cPt);for(const i of t)"_ct"===i.Km?this.dPt(i.CO,i.RO):this.fPt(i.CO,i.RO);this.rPt.KM(super.Ux())||this.So(new gp(bi.pZ))}zg(){var t;null==(t=this.nPt)||t.Zg(),this.nPt=void 0,super.zg()}constructor(t){super(t),this.C3=void 0,this.nPt=void 0,this.ZY=0,this.rPt=Uo.rL(),this.ZS=void 0,this.hPt=Uo.rL(),this.cPt=[],this.yPt=!1,this.KY=0,this.ZS=t.Cd}},PX=class extends xX{Ux(){var t,i;return super.Ux().HM(null!=(i=null==(t=this.bPt)?void 0:t.Fx)?i:Uo.rL())}qrt(){var t,i;return super.qrt().HM(null!=(i=null==(t=this.bPt)?void 0:t.W3)?i:Uo.rL())}Hrt(t){super.Hrt(t),this.bPt&&(this.bPt.zY=t)}Grt(t){super.Grt(t),this.bPt&&(this.bPt.VY=t)}dPt(t,i){super.dPt(t,i),this.bPt&&this.bPt.G3(t,i)}fPt(t,i){super.fPt(t,i),this.bPt&&this.bPt.X3(t,i)}async vPt(t,i,e){fr(e);const s=[];s.push(super.vPt(t,i,e)),this.bPt&&s.push(this.bPt.pS(t,i,e)),await Promise.all(s)}IZ(t){return!!super.IZ(t)||this.wE.APt(t)}_Pt(t){return super.IZ(t)?super._Pt(t):this.wE.SPt(t)}TPt(t){var i,e;null==(i=this.bPt)||i.mn(MN,this.Xrt),this.bPt=t,null==(e=this.bPt)||e.wn(MN,this.Xrt)}constructor(t,i){super(i),this.wE=void 0,this.bPt=void 0,this.wE=t}},IX=class extends ja{IZ(t){return!!LL(this,t)&&(!!super.IZ(t)||(!(!this.kPt||!this.kPt.IZ(t))||this.wE.EPt(t)))}async RZ(t){return super.IZ(t)?await super.RZ(t):this.kPt&&this.kPt.IZ(t)?(this.xPt(),await this.RZ(t)):(await this.wE.PPt(t),await this.RZ(t))}APt(t){return this.IZ(this.IPt(t))}SPt(t){return this.RZ(this.IPt(t))}IPt(t){const i=this.Cd,e=i.q4.map(i=>St(t.GT)&&St(i.GT)||$y(t.GT)&&$y(i.GT)?t:i);return Y({},i,{q4:e})}W4(t,i,e,s){super.W4(t,i,e,s),this.kPt&&this.kPt.W4(t,i,e,s)}CPt(){return!this.RPt&&this.DPt}Nd(){return void 0!==this.NPt?this.NPt:this.CPt()?this.Zb:super.Nd()}F4(t){this.Zb=t,this.NPt=void 0,this.CPt()||super.F4(t)}Nrt(){return!this.CPt()&&super.Nrt()}F3(){this.NPt=_.max(CX(this.aq.e4),CX(this.aq.s4)),this.CPt()||super.F3()}I3(){this.NPt=void 0,this.CPt()||super.I3()}Lrt(t){return new PX(this,t)}BPt(){this.RPt=!this.RPt}xPt(){const t=this.aq,i=this.kPt;i&&(this.RPt=!this.RPt,this.Brt(i),this.MPt(t),this.CPt()&&this.LPt())}MPt(t){var i,e;this.kPt=t,null==(i=this.B4)||i.TPt(null==t?void 0:t.e4),null==(e=this.M4)||e.TPt(null==t?void 0:t.s4)}OPt(t){const i=this.aq,e=this.kPt;if(!e)return;const s=this.RPt,n=s?i:e,r=(s?e:i).Fx.iL(t);if(!r)return;const h=KU(n.Fx,this.qrt()).iL(r.An(0),Zt);return!h||r.An(0)+Zt>=h.An(0)?void 0:_.max(r.An(0),h.Tn(0))}FPt(t,i){if(this.DPt)return Promise.resolve();const e=this.RPt?this.kPt:this.aq;return e?(this.DPt=!0,this.UPt(i=>{if(fr(i),this.DPt)return async function(t,i,e){fr(e);const s=[];t.e4&&s.push(WB(t.e4,i,e));t.s4&&s.push(WB(t.s4,i,e));await Promise.all(s),t.F3()}(e,t,i)},i)):Promise.resolve()}LPt(){if(!this.DPt)return;const t=this.RPt?this.kPt:this.aq;if(!t)return;var i;this.DPt=!1;const e=null!=(i=this.NPt)?i:this.Zb;t.ct0?i.An(i.V-1):0}var RX=class extends EX{get HPt(){return this.WPt}Ux(){return super.Ux().HM(this.WPt.Fx)}Nd(){if(!this.qPt){const t=this.aq;if(t&&yr(t))return t.ct}return super.Nd()}tht(){return!!super.tht()&&!(!this.qPt&&!this.jZ())}iht(){return!!super.iht()&&!(!this.qPt&&super.tht()&&!this.jZ())}jZ(){const t=this.aq;return!(!t||!yr(t))&&t.jZ}mP(){return this.Ho.HM(this.PL.pP)}EP(){return super.EP().HM(this.WPt.kP)}TP(){return super.TP()}$rt(){var t;return null!=(t=super.$rt())?t:this.WPt.uq}QP(){return this.Cz=!1,super.QP()}jP(){this.Cz=!0,super.jP()}G7(){this.qPt=!0,super.G7(),this.WPt.G7()}X7(){this.qPt=!1,super.X7(),this.WPt.G7()}Gx(){var t;return null!=(t=this.Y8)?t:super.Gx()}PP(){return void 0!==this.Y8||super.PP()}Oy(t,i,e){void 0===i&&(i=!1),void 0===e&&(e=!1),this.zPt.Zg(),this.T9.Zg(),this.T9=new Zc,this.GPt=Cu(this.E9(t,i,e,this.GPt,this.T9.Yg),this.T9).catch(gs)}async E9(t,i,e,s,n){this.Y8=t,this.x9=t,this.So(new ji(t)),s&&await s.catch(gs),fr(n),this.aq&&yr(this.aq)&&this.aq.LPt(),this.Y8=void 0,super.Oy(t,i,e),this.WPt.Oy(t,i,e),this.XPt()}$W(t){const i=this.uq;if(!i||S(i.getTime()))return;const e=(t.getTime()-i.getTime())/1e3;this.Oy(e)}K7(){super.K7(),this.WPt.K7()}get DP(){return this.jPt.DP}get MP(){return this.jPt.MP}we(){this.kz&&(this.kz=!1,this.jPt.we())}be(){this.kz||(this.kz=!0,this.jPt.be())}async QPt(){var t;this.Y8=void 0,this.x9=NaN,this.Ho=Uo.rL(),null==(t=this.KPt)||t.Zg(),this.zPt.Zg(),this.T9.Zg(),this.GPt&&(await this.GPt.catch(gs),this.GPt=void 0)}hht(t){super.hht(t),this.WPt.Rq=t}oht(t){super.oht(t),this.WPt.J7=t}RP(){return this.Gl}sI(t,i,e,s,n,r,h,o){return this.iV.sI(t,i,e,s,n,r,h,o)}Tq(t){return this.iV.Tq(t)}bq(t,i,e,s,n){throw new m("Not implemented yet")}wq(){return!1}rV(t){this.iV.rV(t)}Eq(){this.iV.hr(),super.Eq()}async Un(t){const i=await super.Un(t);return yr(i)&&this.XPt(),i}async hr(){await this.QPt(),await super.hr(),await this.WPt.hr()}async F8(){await this.QPt(),await super.F8(),await this.WPt.F8()}async zg(){await this.QPt(),this.iV.kn(),this.Gl.kn(),await super.zg()}cht(t){return new IX(this,t)}uht(t){return new Ia(t)}XPt(){this.zPt.Zg(),this.zPt=new Zc,this.GPt=Cu(this.YPt(this.GPt,this.zPt.Yg),this.zPt).catch(gs)}async YPt(t,i){if(t&&await t.catch(gs),this.aq&&yr(this.aq))for(;;){let t;for(fr(i),this.JPt()&&this.BPt(),this.aq.LPt(),fr(i);;){const e={stack:[],error:void 0,hasError:!1};try{if(fr(i),this.JPt())break;if(t=this.aq.OPt(this.Gx()),void 0!==t){0,this.ZPt(),await this.aq.FPt(t,i),fr(i),this.WPt.Oy(t);break}const s=Es(e,Zc.ep([i]),!1);await Promise.race([this.ww(d.py,s.Yg),this.$Pt(s.Yg)])}catch(t){e.error=t,e.hasError=!0}finally{Zs(e)}}for(fr(i);!this.JPt();)await this.PL.ww([d.py,d.Nw,Jr.AI],i)}}JPt(){const t=this.aq;if(void 0===t||!yr(t))return!1;const i=this.Gx(),e=this.PL.Fx;if(!this.PL.Qx&&e.Cr(i))return!1;return!!KU(this.WPt.Fx,t.qrt()).jM(i,i+Zt)}BPt(){if(this.tIt)return;this.tIt=!0,this.Ho=this.mP();const t=tM(this),i=this.PP(),e=this.TP(),s=this.PL,n=this.WPt,r=this.aq;r.LPt(),r.BPt(),iM(n,t),this.fht(n),this.WPt=s,s.jP(),s.oP=!0,this.tIt=!1;const h=this.PP();i!==h&&(h?this.So(new ji(this.zx)):this.So(new Yr(this.zx)));const o=this.TP();e!==o&&this.So(new Ka(this.zx,o)),h||this.ZPt()}ZPt(){const t=this.PL,i=this.jPt;if(i===t)return;const e=this.MP,s=this.DP;this.jPt=t,this.kz&&(i.we(),t.be());const n=this.MP,r=this.DP;n>0&&r>0&&(e!==n||s!==r)&&this.So(new Vs)}EPt(t){return void 0!==this.WPt.$Z([t])}async PPt(t){this.ZPt();const i=this.aq,e=this.WPt;await e.hr();const s=await e.Un(t);i.VPt(s)}$Pt(t){return this.KPt=new Ga,ua(this.KPt.Yy,t)}B3(){var t;null==(t=this.KPt)||t.Qy()}iI(t){t.type===d.$w&&this.x9===t.currentTime||(t.type===d.Zw&&(this.x9=NaN,this.ZPt()),t.type!==Jr.AI&&t.type!==d.jw&&t.type!==d.Nw||this.tIt||!this.JPt()?(t.type!==d.Nw||this.Qx)&&super.iI(t):this.XPt())}constructor(t,i,e){super(t),this.WPt=void 0,this.Gl=void 0,this.iV=void 0,this.qPt=!1,this.Y8=void 0,this.x9=NaN,this.Ho=Uo.rL(),this.Cz=!0,this.tIt=!1,this.kz=!0,this.jPt=void 0,this.KPt=void 0,this.GPt=void 0,this.zPt=new Zc,this.T9=new Zc,this.WPt=i,this.jPt=t,this.PL.be(),this.WPt.we(),this.iV=new wX(this,e),this.Gl=new Tu([this.iV.nt,super.RP()])}},DX=class extends RX{get Zrt(){return this.PL}get HPt(){return this.WPt}we(){super.we(),this.bet.we()}be(){super.be(),this.bet.be()}get hq(){return this.PL.hq}get d5(){return this.PL.d5}get WP(){return this.PL.WP}set WP(t){this.PL.WP=t}Y7(t){this.PL.Y7(t),this.WPt.Y7(t)}$P(){this.PL.$P(),this.WPt.$P()}zP(){return this.PL.zP()}Aa(){return this.$L}fht(t){const i=this.qP(),e=this.zP();super.fht(t),this.$L.OI=t.Sq,this.qP()!==i&&this.So(new Vk),this.zP()!==e&&this.So(new Hk)}zg(){return this.$L.kn(),this.Aet.kn(),this.bet.kn(),super.zg()}constructor(t,i){super(t,i,new ac),this.bet=void 0,this.Aet=void 0,this.$L=void 0,this.$L=new zk(t.Sq),this.bet=new ma,this.bet.Y7(t.hq.parentElement),this.Aet=new _a(this.bet.xe,this.Wu,this.nt,this.Ql,this.Ma,this.Sq)}},NX=class extends Ea{Yq(t){if(t===at.Mk){const i=super.Yq(t),e=super.Yq(t);return new DX(i,e)}return super.Yq(t)}async Dq(t){t instanceof DX?(await t.zg(),await super.Dq(t.Zrt),await super.Dq(t.HPt)):await super.Dq(t)}},BX=class extends vX{async kn(){await super.kn(),await this.Nq.Dq(this.PL)}static US(t){var i;return!zs.Ks&&!zs.og&&!(t&&"google-dai"===(null==(i=t.ssai)?void 0:i.integration))}constructor(t,i,e,s,n,r,h){const o=new qs(new NX(n));super(t,i,e,s,o.Yq(r),h),this.Nq=void 0,this.Nq=o}};r(),r(),r();var MX=class extends ja{Lrt(t){return new xX(t)}NS(){return this.iIt?this.ZS:super.NS()}Ux(){return this.iIt?this.rPt:super.Ux()}Nd(){return this.iIt?this.Zb:super.Nd()}F4(t){this.iIt?(this.Zb=t,this.eIt=!0):super.F4(t)}EP(){return this.iIt?this.sIt?this.sIt.J3():this.H4:super.EP()}W4(t,i,e,s){this.iIt?this.sIt=new rh(t,i,e,s):super.W4(t,i,e,s)}Nrt(){return this.iIt?this.Wet&&!1!==this.yPt:super.Nrt()}F3(){this.iIt?this.yPt=!0:super.F3()}I3(){this.iIt?this.yPt=!1:super.I3()}IZ(t){return!this.iIt&&super.IZ(t)}RZ(t){return this.iIt?Promise.reject(new g("Not supported")):super.RZ(t)}async gPt(){if(this.iIt)throw new g("Already locked");this.iIt=!0,this.pPt();const t=[];this.B4&&t.push(this.B4.gPt()),this.M4&&t.push(this.M4.gPt()),await Promise.all(t)}mPt(){this.iIt=!1,this.B4&&this.B4.mPt(),this.M4&&this.M4.mPt(),this.wPt()}pPt(){this.ZS=super.NS(),this.rPt=super.Ux(),this.Zb=super.Nd(),this.H4=super.EP(),this.eIt=!1,this.yPt=void 0,this.sIt=void 0}wPt(){if(this.eIt&&(super.F4(this.Zb),this.eIt=!1),void 0!==this.sIt){const t=this.sIt;super.W4(t.Tn,t.An,t.Z3,t.t4),this.sIt=void 0}void 0!==this.yPt&&(this.yPt?super.F3():super.I3(),this.yPt=void 0)}constructor(t){super(t),this.iIt=!1,this.rPt=Uo.rL(),this.ZS=void 0,this.Zb=0,this.eIt=!1,this.Wet=!1,this.yPt=void 0,this.H4=Uo.rL(),this.sIt=void 0,this.Brt(t),this.ZS=t.Cd}},LX=class extends pn{QP(){return void 0!==this.aq&&yr(this.aq)&&this.Qx&&this.Oy(0),super.QP()}Oy(t,i,e){void 0!==this.aq&&yr(this.aq)&&this.Qx&&tt.active))?void 0:i.id})}function GX(t){var i;return Y({},t,{timeBounds:Y({},t.timeBounds,{endTime:void 0!==t.timeBounds.duration?t.timeBounds.startTime+t.timeBounds.duration:void 0,scale:null!=(i=t.timeBounds.timescale)?i:1e3})})}function XX(t){return t&&"-"===t.charAt(0)}function jX(t){let i;try{var e;i=x(null!=(e=t.channels)?e:"2")}catch(t){i=2}return XX(t.contPattern)||XX(t.initPattern)?function(t,i){const e=t.initPattern,s=t.contPattern;return t.initPattern=void 0,t.contPattern=void 0,Y({},qX(t),{baseUrl:Or(t.baseUrl),language:"eng",channels:i,sampleRate:t.samplerate,tracks:t.tracks.map(t=>{var i,n;return t.initPattern=null!=(i=t.initPattern)?i:e,t.contPattern=null!=(n=t.contPattern)?n:s,QX(t)})})}(t,i):Y({},qX(t),{baseUrl:Or(t.baseUrl),language:"eng",channels:i,sampleRate:t.samplerate,tracks:t.tracks.map(QX)})}function QX(t){let i;try{var e;i=x(null!=(e=t.channels)?e:"2")}catch(t){i=2}return XX(t.contPattern)||XX(t.initPattern)?function(t,i){return t.contPattern=t.baseUrl+t.contPattern,t.initPattern=t.baseUrl+t.initPattern,Y({},zX(t),{baseUrl:"./",channels:i,sampleRate:t.samplerate})}(t,i):Y({},zX(t),{baseUrl:Or(t.baseUrl),channels:i,sampleRate:t.samplerate})}function KX(t){return XX(t.contPattern)||XX(t.initPattern)?function(t){const i=t.initPattern,e=t.contPattern;return t.initPattern=void 0,t.contPattern=void 0,Y({},qX(t),{baseUrl:Or(t.baseUrl),frameRate:t.framerate?{value:t.framerate.rate,scale:t.framerate.scale}:void 0,tracks:t.tracks.map(t=>(t.initPattern=i,t.contPattern=e,YX(t)))})}(t):Y({},qX(t),{baseUrl:Or(t.baseUrl),frameRate:t.framerate?{value:t.framerate.rate,scale:t.framerate.scale}:void 0,tracks:t.tracks.map(YX)})}function YX(t){var i,e;return XX(t.contPattern)||XX(t.initPattern)?function(t){var i,e;return t.contPattern=t.baseUrl+t.contPattern,t.initPattern=t.baseUrl+t.initPattern,Y({},zX(t),{baseUrl:"./",frameRate:t.framerate?{value:t.framerate.rate,scale:t.framerate.scale}:void 0,resolution:Y({},t.resolution,{sarWidth:null==(i=t.resolution.sar)?void 0:i.width,sarHeight:null==(e=t.resolution.sar)?void 0:e.height})})}(t):Y({},zX(t),{baseUrl:Or(t.baseUrl),frameRate:t.framerate?{value:t.framerate.rate,scale:t.framerate.scale}:void 0,resolution:Y({},t.resolution,{sarWidth:null==(i=t.resolution.sar)?void 0:i.width,sarHeight:null==(e=t.resolution.sar)?void 0:e.height})})}function JX(t){var i;return Y({},t,{id:null!=(i=t.id)?i:String(WX++),schemeId:"",tracks:t.tracks.map(ZX)})}function ZX(t){return Y({},t,{segments:t.segments.map(tj)})}var $X=0;function tj(t){return{id:$X++,timeBounds:Y({},t.timeBounds,{scale:t.timeBounds.timescale})}}var ij=0;function ej(t){var i,e;return Y({},t,{id:null!=(i=t.id)?i:String(ij++),timeBounds:Y({},t.timestamp,{scale:null!=(e=t.timestamp.timescale)?e:1e3})})}var sj=class{async _It(t,i){const e={Yu:t,Km:q.bk,Yg:i},s=await this.Dx.vk(e);let n=await s.VT(i);return function(t){const i=t;if(Q(i.manifestVersion)&&nl(i.manifestVersion,"alpha"))return!0;let e,s;for(const t of i.presentations){for(const i of[...t.video,...t.audio])if(i.tracks.length>0){e=i.tracks[0],s=i;break}if(it(e))break}return(Q(null==s?void 0:s.initPattern)||Q(null==e?void 0:e.initPattern))&&!Q(null==e?void 0:e.initializationPattern)&&!Q(null==s?void 0:s.initializationPattern)}(n)&&(n=function(t){return Y({},t,{availabilityDuration:{value:t.dvrDuration?t.dvrDuration.duration/t.dvrDuration.timescale:0},manifestVersion:"1.0.0",presentations:t.presentations.map(HX),contentBaseUrl:t.contentBaseUrl||"./"})}(n)),n}constructor(t){this.Dx=void 0,this.Dx=t}};r();var nj=class extends Ne{get Ca(){return this.hu||(this.hu=HS(this)),this.hu}dC(){return this.gIt.dC()}get hC(){return this.gIt.hC}get oC(){return this.gIt.oC}get aC(){return this.gIt.aC}get uC(){return this.gIt.uC}get cC(){return this.gIt.cC}wn(t,i){this.gIt.wn(t,i)}mn(t,i){this.gIt.mn(t,i)}constructor(t){super(),this.hu=void 0,this.gIt=void 0,this.gIt=t}};r(),r(),r();var rj=class{get Fet(){const t=1-this.pIt**this.mIt;return this.wIt/t}Gat(t,i){const e=this.pIt**t,s=i*(1-e)+e*this.wIt;S(s)||(this.wIt=s,this.mIt+=t)}RZ(t){const i=_.exp(_.log(.5)/t);if(i===this.pIt)return;if(0===this.mIt)return void(this.pIt=i);const e=this.Fet,s=1-i**this.mIt;this.wIt=e*s,this.pIt=i}constructor(t){this.pIt=void 0,this.wIt=0,this.mIt=0,this.pIt=_.exp(_.log(.5)/t)}},wi=class t{get Fet(){return this.Zat()?_.max(this.yIt.Fet,this.bIt.Fet):this.AIt}Gat(t){const i=zd.Mg(),e=t;this.SIt&&void 0!==this.TIt&&i-this.TIt>=this.kIt&&this.hr(),this.EIt+=1,this.yIt.Gat(1,e),this.bIt.Gat(1,e),this.xIt.push(e),this.xIt.length>this.PIt&&this.xIt.shift(),this.TIt=i}Zat(){return void 0!==this.TIt&&zd.Mg()-this.TIt<=this.kIt}hr(){this.yIt=new rj(this.IIt),this.bIt=new rj(this.CIt),this.EIt=0,this.xIt=[],this.TIt=void 0}constructor(i=t.RIt,e=t.DIt,s=t.$at,n=!1){this.yIt=void 0,this.bIt=void 0,this.EIt=0,this.xIt=[],this.TIt=void 0,this.kIt=6e4,this.PIt=10,this.IIt=void 0,this.CIt=void 0,this.AIt=void 0,this.SIt=void 0,this.IIt=i,this.CIt=e,this.AIt=s,this.SIt=n,this.yIt=new rj(i),this.bIt=new rj(e)}};wi.RIt=2,wi.DIt=5,wi.$at=.1,r();var hj=class{DY(t){for(const i of this.NIt)i.DY(t)}NY(t){for(const i of this.NIt)i.NY(t)}BY(t,i){for(const e of this.NIt)e.BY(t,i)}MY(t){for(const i of this.NIt)i.MY(t)}constructor(t){this.NIt=void 0,this.NIt=t}};r();var oj=class{DY(t){this.BIt=t}NY(t){this.MIt.Gat(t-this.BIt)}BY(t){}MY(t){}constructor(t){this.MIt=void 0,this.BIt=0,this.MIt=t}};r();var aj=class{NY(t){this.LIt=t}BY(t,i){this.eut.Gat(t-this.LIt,i.byteLength),this.LIt=t}MY(t){}DY(t){}constructor(t){this.eut=void 0,this.LIt=0,this.eut=t}};r();var uj=class{DY(t){}BY(t,i){const e=i.byteLength,s=this.OIt;this.OIt=e;const n=t-this.En;this.En=t,this.FIt.E$(i);const r=!this.FIt.UIt(),h=e>=this.VIt;s!==zd.Zs.Sp&&r&&h&&this.eut.Gat(n,e)}NY(t){this.En=t}MY(t){}constructor(t,i=0){this.eut=void 0,this.VIt=void 0,this.FIt=new cj,this.En=0,this.OIt=0,this.eut=t,this.VIt=i}},cj=class extends Qa{UIt(){return this.HIt}E$(t){this.HIt=!1,super.E$(t)}T$(t,i){this.WIt&&this.WIt!==ui.WR||(this.HIt=!0),super.T$(t,i),this.WIt=t}L$(t){return!1}F$(t){}V$(t){}constructor(...t){super(...t),this.WIt=void 0,this.HIt=!1}};r();var Ec=function(t){return t.qIt="sample",t}({}),dj=class extends Ne{vW(){if(!this.Zat())return;const t=zd.Mg();t-this.zIt>1e3&&(this.zIt=t,sc.Bg.vW(this.Fet))}constructor(...t){super(...t),this.zIt=0}};r();var lj=class extends dj{get Fet(){return this.Zat()?this.wIt:this.GIt}Zat(){return this.bA.length>=3}Gat(t,i){if(0===t)return;const e={IW:8*i/t,XIt:i};if(this.bA.push(e),this.jIt+=e.XIt,this.bA.length>30){const t=this.bA.shift();this.jIt-=t.XIt}const s=this.bA.slice().sort((t,i)=>t.IW-i.IW);let n=0;for(let t=0;t=.5)break}this.vW(),this.So(new gp(Ec.qIt))}constructor(t){super(),this.GIt=void 0,this.bA=[],this.wIt=void 0,this.jIt=0,this.GIt=t,this.wIt=t}};r();var Xs=class t extends dj{Gat(t,i){const e=8*i/t;this.yIt.Gat(t,e),this.bIt.Gat(t,e),this.QIt+=i,this.vW(),this.So(new gp(Ec.qIt))}get Fet(){return this.Zat()?_.min(this.yIt.Fet,this.bIt.Fet):this.AIt}Zat(){return this.QIt>=this.KIt}constructor(i=t.RIt,e=t.DIt,s=t.YIt,n=t.$at){super(),this.yIt=void 0,this.bIt=void 0,this.QIt=0,this.AIt=void 0,this.KIt=void 0,this.KIt=s,this.yIt=new rj(i),this.bIt=new rj(e),this.AIt=n}};Xs.YIt=128e3,Xs.$at=tC,Xs.RIt=.5,Xs.DIt=5;var fj=class{JIt(t){var i;null==(i=this.eut)||i.mn(Ec.qIt,this.ZIt),this.eut=new lj(t),this.eut.wn(Ec.qIt,this.ZIt)}$It(t){this.tCt.push(t)}iCt(t){_e(this.tCt,t)}get IW(){var t,i;return null!=(i=null==(t=this.eut)?void 0:t.Fet)?i:this.eCt}get RW(){return this.sCt.Fet}DW(t){if("segment"!==t.Km)return;if("video"!==t.Gk)return;const i=[new oj(this.sCt)];return this.eut&&("stream"===t.fk&&"initialization-segment"!==t.zk?i.push(new uj(this.eut,1e3)):i.push(new aj(this.eut))),new hj(i)}constructor(t,i){this.eut=void 0,this.tCt=[],this.sCt=void 0,this.eCt=void 0,this.ZIt=()=>{for(const t of this.tCt)t()},this.eCt=t>0?t:Xs.$at,this.sCt=new wi(wi.RIt,wi.DIt,i>0?i:wi.$at),this.JIt(this.eCt)}};r();var vj=class{nCt(t,i){const e=i-t;(!this.rCt||et.yut)),h={ct:$l(e,t=>t.ct),Get:e[0].Qvt,EU:-i.qot.SCt};await this.Y2(s,h,n);const o=h.Get+h.EU,a=o+h.ct;this.wCt._Ct(i.qot,Uo.nL(o,a))}}catch(t){s.error=t,s.hasError=!0}finally{Zs(s)}}catch(t){throw i.TCt(),t}finally{i.kCt();const t=this.bCt;this.bCt=void 0,null==t||t.Qy()}}async Q2(t,i,e,s){if(this.yCt)throw new m("Concurrent appends are not supported.");try{const n={stack:[],error:void 0,hasError:!1};try{const r=Es(n,Zc.ep([s,this.D3.Yg]),!1).Yg;this.bCt=new Ga,await this.Y2(t,i,r);const h=i.Get+i.EU,o=h+i.ct;this.wCt.vCt(this.Fx),this.wCt._Ct(e,Uo.nL(h,o))}catch(t){n.error=t,n.hasError=!0}finally{Zs(n)}}finally{const t=this.bCt;this.bCt=void 0,null==t||t.Qy()}}async Y2(t,i,e){this.Wrt.V3===at.Mk&&this.ECt.elt(t,i.Get,i.Get+i.ct,i.EU,this.Nyt,!1);const s=this.PL.ML.BL,n=this.Wrt.Fx.Cr(this.PL.zx);if(s||n)return await this.xCt(e),await this.Wrt.Q2({Km:We.wZ,lk:t},i,e);this.mCt.push([t,i]);const r=this.mCt[0][1].Get;return this.mCt[this.mCt.length-1][1].Get-r>=.4?await this.xCt(e):void 0}async J2(t,i){if(this.yCt)throw new m("Concurrent appends are not supported.");try{const e={stack:[],error:void 0,hasError:!1};try{const s=Es(e,Zc.ep([i,this.D3.Yg]),!1).Yg;this.bCt=new Ga,await this.xCt(s),await this.Wrt.J2({Km:We.wZ,lk:t},{},s),this.Wrt.V3===at.Mk&&this.ECt.ght(t)}catch(t){e.error=t,e.hasError=!0}finally{Zs(e)}}finally{const t=this.bCt;this.bCt=void 0,null==t||t.Qy()}}async pS(t,i,e){if(this.yCt)throw new m("Concurrent appends are not supported.");try{const s={stack:[],error:void 0,hasError:!1};try{const n=Es(s,Zc.ep([e,this.D3.Yg]),!1).Yg;this.bCt=new Ga,await this.xCt(n),await this.Wrt.pS(t,i,n),this.wCt.gCt(Uo.nL(t,i))}catch(t){s.error=t,s.hasError=!0}finally{Zs(s)}}finally{const t=this.bCt;this.bCt=void 0,null==t||t.Qy()}}async EQ(t){if(this.yCt)throw new m("Concurrent appends are not supported.");try{const i={stack:[],error:void 0,hasError:!1};try{const e=Es(i,Zc.ep([t,this.D3.Yg]),!1).Yg;this.bCt=new Ga,await this.xCt(e)}catch(t){i.error=t,i.hasError=!0}finally{Zs(i)}}finally{const t=this.bCt;this.bCt=void 0,null==t||t.Qy()}}async xCt(t){for(const[i,e]of this.mCt)await this.Wrt.Q2({Km:We.wZ,lk:i},e,t);Wt(this.mCt)}async zg(){for(this.D3.zg();this.yCt;)await this.ACt}constructor(t,i,e,s){super(),this.Wrt=void 0,this.wCt=void 0,this.PL=void 0,this.mCt=[],this.Nyt=void 0,this.ECt=void 0,this.bCt=void 0,this.D3=new Zc,this.PL=i,this.Wrt=t,this.Nyt=e,this.ECt=s,this.wCt=new Sj,this.Wrt.wn(bi.pZ,this.Rs)}};r(),r();var kj=class{async PCt(t,i){if(this.ICt>=this.CCt.maxRetries)throw t;const e=this.RCt(this.ICt++);await Ze(e,i)}RCt(t){let i=0;return 0!==t&&(i+=_.min(this.CCt.maximumBackoff,this.CCt.minimumBackoff*2**(t-1))),i}constructor(t){this.ICt=0,this.CCt=void 0,this.CCt=t}};r(),r();var Ej=function(t){return t.DCt="emsgdata",t}({}),xj=class extends gp{constructor(t,i){super("emsgdata"),this.value=void 0,this.data=void 0,this.value=t,this.data=i}};r();var Pj=class{start(t){this.iZ=t}NCt(t){this.iZ.enqueue(t)}constructor(){this.iZ=void 0}};r(),r();var wh=function(t){return t.BCt="initdata",t.MANIFEST_UPDATE="manifestupdate",t.MCt="timestamps:v1",t}({});function Ij(t){if("urn:theo:hesp:2020"!==t.sM)return;const i=t.XE;if(i===wh.BCt){return function(t){if(!t||!Mc(t))return;const i=t;return!lo(i.index)||!lo(i.offset)||i.index<0&&i.offset<0?void 0:{Km:"initdata",index:i.index,offset:i.offset}}(JSON.parse(nm(dh(t.hM),new oi)))}if(i===wh.MANIFEST_UPDATE){return function(t){if(!t||!Mc(t))return;const i=t;return!it(i.url)||Q(i.url)?{Km:"manifestupdate",url:i.url}:void 0}(JSON.parse(nm(dh(t.hM),new oi)))}if(i===wh.MCt){const i=dh(t.hM),e=new oi,s=qt(i,e).toNumber()/t.jD,n=qt(i,e).toNumber()/1e3,r=ti(i,e)/1e3;let h;return e.ac+8<=i.byteLength&&(h={hours:ti(i,e),minutes:qp(i,e),seconds:qp(i,e),frames:Rn(i,e)}),{Km:wh.MCt,LCt:s,OCt:n,FCt:r,UCt:h}}}var Cj=class extends Pj{transform(t){if(t.Km===ui.zR)try{const i=Ij(Hn.VD(t.lk));i&&this.VCt.So(new xj(i.Km,i))}catch(t){false}this.NCt(t)}zg(){this.VCt.Vo()}constructor(...t){super(...t),this.VCt=new Ne}};r();var Rj=class{start(t){this.HCt=new Dj(t)}transform(t){this.HCt.E$(t)}flush(){this.HCt.P$()}constructor(){this.HCt=void 0}},Dj=class extends Qa{L$(t){return!0}F$(t){this.iZ.enqueue(t)}V$(t){}constructor(t){super(),this.iZ=void 0,this.iZ=t}};r(),r();var Nj=yo.fromNumber(Gl);var Bj=class extends Ne{async vk(t){for(;;)try{return await this.aV.vk(t)}catch(i){if(Ce(i))throw i;await this.WCt.PCt(i,t.Yg)}}constructor(t,i){super(),this.aV=void 0,this.WCt=void 0,this.aV=t,this.WCt=i}};function Mj(t,i,e,s,n,r,h,o){const a=new cc;return n&&a.UT(function(t,i){return void 0===i&&(i=Nj),new cc({Range:"bytes="+t.toString()+"-"+i.toString()})}(n.start,n.end)),{Yu:t,_k:a,Xk:!1,Yg:o,Km:q.Ak,zk:e,Gk:s,Wk:r,qk:h,fk:i,Kk:i===Bi.MT}}r(),r(),r();var _c,vl,Lj=function(t){return t[t.INITIALIZER=0]="INITIALIZER",t[t.FRAMES=1]="FRAMES",t}({});r(),r(),function(t){t[t.NON_IDR_PICTURE=1]="NON_IDR_PICTURE",t[t.PARTITION_A_DATA=2]="PARTITION_A_DATA",t[t.PARTITION_B_DATA=3]="PARTITION_B_DATA",t[t.PARTITION_C_DATA=4]="PARTITION_C_DATA",t[t.IDR_PICTURE=5]="IDR_PICTURE",t[t.SUPPLEMENTAL_ENHANCEMENT_INFORMATION=6]="SUPPLEMENTAL_ENHANCEMENT_INFORMATION",t[t.SEQUENCE_PARAMETER_SET=7]="SEQUENCE_PARAMETER_SET",t[t.PICTURE_PARAMETER_SET=8]="PICTURE_PARAMETER_SET",t[t.ACCESS_UNIT_DELIMITER=9]="ACCESS_UNIT_DELIMITER",t[t.END_OF_SEQUENCE=10]="END_OF_SEQUENCE",t[t.END_OF_STREAM=11]="END_OF_STREAM",t[t.FILTER_DATA=12]="FILTER_DATA",t[t.SEQUENCE_PARAMETER_EXTENSION_SET=13]="SEQUENCE_PARAMETER_EXTENSION_SET",t[t.PREFIX_NAL_UNIT=14]="PREFIX_NAL_UNIT",t[t.SUBSET_SEQUENCE_PARAMETER_SET=15]="SUBSET_SEQUENCE_PARAMETER_SET",t[t.DEPTH_PARAMETER_SET=16]="DEPTH_PARAMETER_SET",t[t.CODED_SLICE_WITHOUT_PARITIONING=19]="CODED_SLICE_WITHOUT_PARITIONING",t[t.CODED_SLICE_EXTENSION=20]="CODED_SLICE_EXTENSION",t[t.CODED_SLICE_FOR_DEPTH_VIEW=21]="CODED_SLICE_FOR_DEPTH_VIEW"}(_c||(_c={})),r(),r(),r(),function(t){t[t.P=0]="P",t[t.B=1]="B",t[t.I=2]="I",t[t.SP=3]="SP",t[t.SI=4]="SI"}(vl||(vl={})),r();var Oj=255,Fj=[44,83,86,100,110,118,122,128,134,135,138,139,244],Uj=[44,86,100,110,122,244];function Vj(t){return t.separateColourPlaneFlag?0:t.chromaFormatIDC}function Hj(t){return t.parsed&&t.header.type===_c.SEQUENCE_PARAMETER_SET}r(),r(),r(),r();var Wj=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.emulationTracker=0,i.emulationsSkipped=0,i}return Dt(i,t),w.defineProperty(i.prototype,"skippedEmulationBytes",{get:function(){return this.emulationsSkipped},enumerable:!0,configurable:!0}),i.prototype.peekBit=function(){var i=t.prototype.peekBit.call(this);return 1===i||0===this.emulationTracker&&0!==this.location.bit?this.emulationTracker=0:22===++this.emulationTracker&&(t.prototype.skipBits.call(this,8),this.emulationsSkipped++,this.emulationTracker=0),i},i.prototype.readByte=function(){for(var t=0,i=7;i>=0;i--)t+=this.readBit()<9))return t%5}(P),C=h.readExponentialGolombCode();if(void 0===I)throw new m("Could not read the slice header slice type.");i.separateColourPlaneFlag&&(o=h.readUInt(2));var R=h.readUInt(i.log2MaxFrameNumMinus4+4);(i.frameMbsOnlyFlag||(a=h.readBool())&&(u=h.readBool()),t.header.type===_c.IDR_PICTURE&&(c=h.readExponentialGolombCode()),0===i.picOrderCntType?(d=h.readUInt(i.log2MaxPicOrderCntLsbMinus4+4),e.bottomFieldPicOrderInFramePresentFlag&&(l=h.readSignedExponentialGolombCode())):1!==i.picOrderCntType||i.deltaPicOrderAlwaysZeroFlag||(f.push(h.readSignedExponentialGolombCode()),e.bottomFieldPicOrderInFramePresentFlag?f.push(h.readSignedExponentialGolombCode()):f.push(0)),e.redundantPicCntPresentFlag&&(v=h.readExponentialGolombCode()),I===vl.B&&(_=h.readBool()),[vl.B,vl.P,vl.SP].includes(I)&&(g=h.readBool())&&(p=h.readExponentialGolombCode(),I===vl.B&&(w=h.readExponentialGolombCode())),s=t.header.type===_c.CODED_SLICE_EXTENSION||t.header.type===_c.CODED_SLICE_FOR_DEPTH_VIEW?zj(h,I,!0):zj(h,I),(e.weightedPredFlag&&(I===vl.P||I===vl.SP)||1===e.weightedBipredIdc&&I===vl.B)&&(n=function(t,i,e,s,n){var r,h=0,o=t.readExponentialGolombCode();0!==e&&(h=t.readExponentialGolombCode());var a=qj(t,e,s,o,h);return i===vl.B&&(r=qj(t,e,n,o,h)),{chromaLog2WeightDenom:h,lumaLog2WeightDenom:o,l0:a,l1:r}}(h,I,Vj(i),p,w)),0!==t.header.refIdc)&&(r=function(t,i){var e=!1,s=!1,n=!1,r=[],h=[],o=[],a=[],u=[];if(i)e=t.readBool(),s=t.readBool();else if(n=t.readBool()){var c=-1,d=void 0;do{h.push(0),o.push(0),a.push(0),u.push(0),c++,d=t.readExponentialGolombCode(),r.push(d),1!==d&&3!==d||(h[c]=t.readExponentialGolombCode()),2===d&&(o[c]=t.readExponentialGolombCode()),3!==d&&6!==d||(a[c]=t.readExponentialGolombCode()),4===d&&(u[c]=t.readExponentialGolombCode())}while(0!==d)}return{noOutputOfPriorPicsFlag:e,longTermReferenceFlag:s,adaptiveRefPicMarkingModeFlag:n,memoryManagementControlOperation:r,differenceOfPicNumsMinus1:h,longTermPicNum:o,longTermFrameIdx:a,maxLongTermFrameIdxPlus1:u}}(h,t.header.type===_c.IDR_PICTURE));e.entropyCodingModeFlag&&I!==vl.I&&I!==vl.SI&&(y=h.readExponentialGolombCode());var D=h.readSignedExponentialGolombCode();return I!==vl.SP&&I!==vl.SI||(I===vl.SP&&(b=h.readBool()),A=h.readSignedExponentialGolombCode()),e.deblockingFilterControlPresentFlag&&1!==(S=h.readExponentialGolombCode())&&(T=h.readSignedExponentialGolombCode(),k=h.readSignedExponentialGolombCode()),e.numSliceGroupsMinus1>0&&e.sliceGroupMapType>=3&&e.sliceGroupMapType<=5&&(E=h.readUInt(Pm(e.picSizeInMapUnitsMinus1+e.sliceGroupChangeRateMinus1+1))),e.entropyCodingModeFlag&&h.location.bit>0&&h.skipBits(8-h.location.bit),{header:Tm(Tm({},t.header),{firstMbInSlice:x,sliceType:I,origSliceType:P,picParameterSetID:C,colourPlaneID:o,frameNum:R,fieldPicFlag:a,bottomFieldFlag:u,idrPicID:c,picOrderCntLsb:d,deltaPicOrderCntBottom:l,deltaPicOrderCnt:f,redundantPicCnt:v,directSpatialMvPredFlag:_,numRefIdxActiveOverrideFlag:g,numRefIdxL0ActiveMinus1:p,numRefIdxL1ActiveMinus1:w,cabacInitIdc:y,sliceQpDelta:D,spForSwitchFlag:b,sliceQsDelta:A,disableDeblockingFilterIdc:S,sliceAlphaC0OffsetDiv2:T,sliceBetaOffsetDiv2:k,sliceGroupChangeCycle:E,rplm:s,pwt:n,drpm:r}),parsed:!0,data:new Em(t.data.slice(h.location.byte,t.data.length),h.location.bit)}}function jj(t){var i=function(t,i){return 11===t&&i[3]?Qj["1b"]:Qj[(t/10).toFixed(1)]}(t.levelIDC,t.constraintFlags),e=(t.frameMbsOnlyFlag?1:2)*(t.picHeightInMapUnitsMinus1+1);return _.min(16,i.maxDpbMbs/((t.picWidthInMbsMinus1+1)*e))}r(),r(),r(),r(),r();var Qj={"1.0":{maxMbps:1485,maxFs:99,maxDpbMbs:396,maxBr:64,maxCpb:175},"1b":{maxMbps:1485,maxFs:99,maxDpbMbs:396,maxBr:128,maxCpb:350},1.1:{maxMbps:3e3,maxFs:396,maxDpbMbs:900,maxBr:192,maxCpb:500},1.2:{maxMbps:6e3,maxFs:396,maxDpbMbs:2376,maxBr:384,maxCpb:1e3},1.3:{maxMbps:11880,maxFs:396,maxDpbMbs:2376,maxBr:384,maxCpb:2e3},"2.0":{maxMbps:11880,maxFs:396,maxDpbMbs:2376,maxBr:768,maxCpb:2e3},2.1:{maxMbps:19800,maxFs:792,maxDpbMbs:4752,maxBr:4e3,maxCpb:4e3},2.2:{maxMbps:20250,maxFs:1620,maxDpbMbs:8100,maxBr:4e3,maxCpb:4e3},"3.0":{maxMbps:40500,maxFs:1620,maxDpbMbs:8100,maxBr:1e4,maxCpb:1e4},3.1:{maxMbps:108e3,maxFs:3600,maxDpbMbs:18e3,maxBr:14e3,maxCpb:14e3},3.2:{maxMbps:216e3,maxFs:5120,maxDpbMbs:20480,maxBr:2e4,maxCpb:2e4},"4.0":{maxMbps:245760,maxFs:8192,maxDpbMbs:32768,maxBr:2e4,maxCpb:25e3},4.1:{maxMbps:245760,maxFs:8192,maxDpbMbs:32768,maxBr:5e4,maxCpb:62500},4.2:{maxMbps:522240,maxFs:8704,maxDpbMbs:34816,maxBr:5e4,maxCpb:62500},"5.0":{maxMbps:589824,maxFs:22080,maxDpbMbs:110400,maxBr:135e3,maxCpb:135e3},5.1:{maxMbps:983040,maxFs:36864,maxDpbMbs:184320,maxBr:24e4,maxCpb:24e4},5.2:{maxMbps:2073600,maxFs:36864,maxDpbMbs:184320,maxBr:24e4,maxCpb:24e4},"6.0":{maxMbps:4177920,maxFs:139264,maxDpbMbs:696320,maxBr:24e4,maxCpb:24e4},6.1:{maxMbps:8355840,maxFs:139264,maxDpbMbs:696320,maxBr:48e4,maxCpb:48e4},6.2:{maxMbps:16711680,maxFs:139264,maxDpbMbs:696320,maxBr:8e5,maxCpb:8e5}};function Kj(t,i){for(var e,s=!1,n=[],r=8,h=8,o=0;o0)if(0===(s=e.readExponentialGolombCode()))for(var S=0;S<=A;S++)n.push(e.readExponentialGolombCode());else if(2===s)for(S=0;S=this.lengthSize;){var e=this.currentBuffer.readUIntBE(0,this.lengthSize);if(this.lengthSize+e>this.currentBuffer.length)break;var s=this.currentBuffer.slice(this.lengthSize,this.lengthSize+e);i.push($j(s)),this.currentBuffer=this.currentBuffer.slice(this.lengthSize+e)}return i},t}();r(),r();var eQ=new j([0,0,1]),sQ=new j([0,0,0,1]);function nQ(t){return!1===t.parsed}var rQ=function(){function t(){this.currentData=new Pi,this.startFound=!1}return t.prototype.extractNals=function(i){this.currentData=this.currentData.concat(tQ(i));var e=[];if(!this.startFound){var s=this.currentData.indexOf(sQ);if(-1===s)return e;this.currentData=this.currentData.slice(s+4),this.startFound=!0}for(;this.currentData.length>0;){var n=t.findNextIndex(this.currentData);if(void 0===n)break;var r=n[0],h=n[1];e.push($j(this.currentData.slice(0,r))),this.currentData=this.currentData.slice(r+h)}return e},t.findNextIndex=function(t){var i=t.indexOf(sQ),e=t.indexOf(eQ);if(-1!==i||-1!==e)return-1===i||i>e?[e,3]:[i,4]},t}(),hQ=function(){function t(){}return t.createStreamingAnnexBExtractor=function(){return new rQ},t.createStreamingAvccExtractor=function(t){return new iQ(t)},t.extractAnnexB=function(t){var i=new rQ,e=tQ(t);return e.pushRange(new j([0,0,0,1])),i.extractNals(e)},t.extractAvcc=function(t,i){return new iQ(i).extractNals(tQ(t))},t.extractParsedAnnexB=function(t){return(new Zj).parseNals(this.extractAnnexB(t))},t.extractParsedAvcc=function(t,i){return(new Zj).parseNals(this.extractAvcc(t,i))},t}();r(),r(),r(),r();var oQ=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.emulationTracker=0,i}return Dt(i,t),i.prototype.writeBit=function(i){if(22===this.emulationTracker){for(var e=0,s=[1,1,0,0,0,0,0,0];e0)&&(this.emulationTracker+=1),t.prototype.writeBit.call(this,i)},i.prototype.writeByte=function(t){for(var i=7;i>=0;i--)this.writeBool((t&1<0)},i.prototype.writeBuffer=function(i){var e;for(e=0;e0&&e.sliceGroupMapType>=3&&e.sliceGroupMapType<=5&&n.writeUInt(s.sliceGroupChangeCycle,Pm(e.picSizeInMapUnitsMinus1+e.sliceGroupChangeRateMinus1+1)),e.entropyCodingModeFlag&&n.padByte(1),n.writeBuffer(t.data),{header:{refIdc:s.refIdc,type:s.type},parsed:!1,data:n.close()}}function lQ(t){var i=t.header,e=new oQ;e.writeByte(i.profileIDC);for(var s=0,n=i.constraintFlags;s0)if(s.writeExponentialGolombCode(e.sliceGroupMapType),0===e.sliceGroupMapType)for(var n=0,r=e.runLengthMinus1;n=_.pow(2,8*i))throw new m("NAL length size "+i+" is too small, serialized NAL is "+h+"B long.");var o=new Dm;o.writeUInt(h,i),e.pushRange(o.close().join()),e=e.concat(r)}return e}(i,e).join():t.serializeAvcc((new vQ).writeNals(i),e)},t}();r();!function(){function t(){}t.createAvccDecoderConfig=function(t,i){var e=t.header,s=new vQ,n=gQ.serializeNal(s.writeNal(t)),r=gQ.serializeNal(s.writeNal(i)),h=n.length,o=r.length,a=new Dm;return a.writeUInt(1,8),a.writeUInt(e.profileIDC,8),a.writeUInt(this.toNumber(e.constraintFlags),8),a.writeUInt(e.levelIDC,8),a.writeUInt(255,8),a.writeUInt(225,8),a.writeUInt((65280&h)>>8,8),a.writeUInt(255&h,8),a.writeBytes(n),a.writeUInt(1,8),a.writeUInt((65280&o)>>8,8),a.writeUInt(255&o,8),a.writeBytes(r),a.close().join()},t.createCodecInformation=function(t){var i=this.toHex(t.header.profileIDC),e=this.toHex(this.toNumber(function(){for(var t=0,i=0,e=arguments.length;iye(t.lk.lk))),n=hh(t,mQ),r=Hn.PD(n.lk.lk)[0],h={Gk:this.qat,Py:e,yut:s,Km:i,ct:this.Nd(r)/this.Jb,Qvt:Ls(this.GCt(r),this.Jb)};this.NCt(h)}Nd(t){const i=t.Z[0];if(!i||0===i.QB.length)return 0;var e;const s=null!=(e=i.yD.FB)?e:0;return $l(i.QB[0].iM,t=>{var i;return null!=(i=t.ct)?i:s})}GCt(t){var i,e;return null!=(e=null==(i=t.Z[0].KB)?void 0:i.KB)?e:yo.UZERO}constructor(t,i){super(),this.IQ=void 0,this.qat=void 0,this.Jb=void 0,this.qCt=[],this.IQ=t,this.qat=this.IQ.match(/video/)?li.Mk:li.Bk,this.Jb=i}};function mQ(t){return t.Km===ui.NR}var wQ=class extends pQ{zCt(t,i){let e=t;i===Lj.FRAMES&&(e=yQ(e)),super.zCt(e,i)}};function yQ(t){const i=hh(t,t=>t.Km===ui.NR),e=function(t){const i=ye(t.lk.lk),e=hQ.extractAvcc(yi(i,t.lk.$R.ac),4),s=[];for(const t of e){if(t.header.type===_c.SEQUENCE_PARAMETER_SET){const i=(new Zj).parseNal(t);if(Hj(i)){i.header.maxNumRefFrames=2**(i.header.log2MaxFrameNumMinus4+4),s.push((new vQ).writeNal(i));continue}}s.push(t)}const n=gQ.serializeAvcc(s,32),r=new DataView(new ArrayBuffer(8+n.byteLength)),h=new oi;return kl(r,h,n.byteLength+8),Yp(r,h,"mdat"),Ar(r,h,n),ha.pD(dh(r),new oi)}(hh(t,t=>t.Km===ui.WR)),s=function(t,i){const e=Ny(ye(t.lk.lk)),s=hh(e.boxes,t=>t.boxType===ui.LR),n=hh(s.boxes,t=>t.boxType===ui.HR);if(n)throw new m("HESP DRM streams are unsupported on Windows Chrome < 100");const r=hh(s.boxes,t=>t.boxType===ui.FR),h=r.samples[0];return h.size=i.lk.lk.byteLength-i.lk.$R.ac,r.samples=[h],ha.pD(dh(e.serialize().join()),new oi)}(i,e);return t.map(t=>t.Km===ui.NR?s:t.Km===ui.WR?e:t)}var bQ=class extends Ne{get qot(){return this.XCt}Kct(t){return t+1}get jCt(){return!1}get QCt(){return this.KCt}get yCt(){return void 0!==this.bCt}get ACt(){return this.bCt?this.bCt.Yy:Promise.resolve()}Oy(t){this.KCt=t,this.YCt=void 0,this.JCt=void 0}ZCt(){return void 0!==this.YCt}async $Ct(){if(this.yCt)throw new m("Concurrent downloads are not supported.");try{this.bCt=new Ga;let t;if("now"===this.KCt)t=zd.Pm(this.XCt.tRt("now"),this.XCt.iRt);else{const i=this.KCt,e=0===i?1:this.XCt.eRt(i);t=zd.Pm(this.XCt.tRt(e),this.XCt.iRt)}const i=Mj(t,Bi.NT,he.Ek,this.qat,void 0,3e3,1e3,this.sRt.Yg),e=await this.nRt.vk(i),s=await e.qT(this.sRt.Yg),n=function(t){const i=ha.lD(new yu(dh(t),new oi)),e=hh(i,t=>t.Km===ui.XR||t.Km===ui.NR);if(void 0===e)return{rRt:t,$D:void 0};const s=yi(t,0,e.ac),n=yi(t,e.ac);return{rRt:s,$D:0===n.byteLength?void 0:n}}(new j(s)),r=n.rRt;let h=n.$D;const o=Hn.PD(dh(r));this.Jb=function(t){const i=hh(t,t=>t.Km===ui.HC);return i.Z[0].$D.yD.jD}(o);const a=function(t){const i=t.filter(t=>t.Km===ui.zR),e=i.map(t=>Ij(t)),s=hh(e,t=>(null==t?void 0:t.Km)===wh.BCt);if(!s)throw new m("No init data in init response");return s}(o);let u;if(this.YCt=a.index,this.JCt=a.offset,h){if(await this.hRt()){let t=ha.lD(new yu(dh(h),new oi));t=yQ(t),h=fm(t.map(t=>ye(t.lk.lk)))}u=function(t,i,e){var s;const n=hh(t,t=>t.Km===ui.NR);var r;const h=Ls(null!=(r=null==(s=n.Z[0].KB)?void 0:s.KB)?r:yo.UZERO,e),o=n.Z[0];var a;const u=null!=(a=o.yD.FB)?a:0,c=o.QB[0],d=$l(c.iM,t=>{var i;return null!=(i=t.ct)?i:u})/e;return{Get:h,ct:d,EU:i}}(Hn.PD(dh(h)),-this.qot.SCt,this.Jb)}return{initialization:r,data:h,metadata:u}}finally{const t=this.bCt;this.bCt=void 0,null==t||t.Qy()}}oRt(){if(this.yCt)throw new m("Concurrent downloads are not supported.");this.bCt=new Ga;const t=void 0!==this.JCt?yo.fromNumber(this.JCt):void 0;return iA(this.aRt(this.YCt,t,this.sRt.Yg)).pipeThrough(new Yb(new TQ(this.sRt.Yg)))}async aRt(t,i,e){const s=this.uRt(t,i,e),n=await this.nRt.vk(s),r=await this.hRt();return n.zT().pipeThrough(new Yb(new Rj)).pipeThrough(new Yb(this.cRt)).pipeThrough(new Yb(r?new wQ(this.qot.lQ,this.Jb):new pQ(this.qot.lQ,this.Jb)))}uRt(t,i,e){const s=this.XCt.dRt(t),n=void 0!==i?{start:i,end:void 0}:void 0;return Mj(zd.Pm(s,this.XCt.iRt),Bi.MT,he.yk,this.qat,n,25e3,1e3,e)}TCt(){this.YCt=void 0,this.JCt=void 0}kCt(){void 0!==this.YCt&&(this.YCt=this.Kct(this.YCt)),this.JCt=void 0;const t=this.bCt;this.bCt=void 0,null==t||t.Qy()}cancelDownload(){var t;this.sRt.Zg(),this.sRt=new Zc,this.bCt=null!=(t=this.bCt)?t:new Ga,this.TCt();const i=this.bCt;this.bCt=void 0,null==i||i.Qy()}async zg(){this.Vo(),this.cRt.zg(),this.sRt.Zg(),await this.ACt,this.YCt=void 0,this.JCt=void 0}constructor(t,i,e){super(),this.XCt=void 0,this.nRt=void 0,this.aV=void 0,this.WCt=void 0,this.qat=void 0,this.cRt=void 0,this.KCt="now",this.YCt=void 0,this.JCt=void 0,this.Jb=void 0,this.sRt=new Zc,this.bCt=void 0,this.XCt=t,this.WCt=new kj(e),this.cRt=new Cj,this.cRt.VCt.wn(Ej.DCt,this.Rs),this.aV=i,this.qat=function(t){switch(t){case li.Bk:return $a.Bk;case li.Mk:return $a.Mk;default:return $a.yk}}(t.Km),this.nRt=new Bj(this.aV,this.WCt)}},AQ=class extends bQ{hRt(){return Promise.resolve(!1)}},SQ=class extends bQ{async hRt(){if(zd.Zs.Tp)return!1;if(void 0===this.lRt){const t=this.XCt;this.lRt=this.PL.V9({Km:O.SV,W9:{GT:t.lQ,z9:t.IW,G9:t.Olt,Ti:t.Ti,Mi:t.Mi}}).then(t=>t.H9&&!0!==t.K9)}return await this.lRt}constructor(t,i,e,s){super(t,i,e),this.PL=void 0,this.lRt=void 0,this.PL=s}};var TQ=class{start(t){this.iZ=t,this.Jg.Xg(this.fRt)}flush(){this.Jg.jg(this.fRt)}constructor(t){this.iZ=void 0,this.Jg=void 0,this.fRt=()=>{this.iZ.error(new Qc)},this.Jg=t}};function _n(t){var i;return t.value/(null!=(i=t.scale)?i:1)}r(),r(),r(),r(),r();var kQ="{initId}",EQ=/{initId(?::0(?:\d+)d)?}/,xQ=/{segmentId(?::0(?:\d+)d)?}/,PQ=class{get o(){return this.aS}get IW(){return this._W}get wyt(){return this.vRt}get bct(){return this.Dbt}get _Rt(){return this.gRt}get pRt(){return this.mRt}get iRt(){return zd.Pm(this.wRt,this.yRt.iRt)}get Rrt(){return this.bRt}get Th(){return this.bO}get ARt(){return this.SRt}get TRt(){return this.kRt}get SCt(){return this.ERt}get xRt(){return this.Sbt}er(t){this.gRt=t.activeSegment,this.mRt=t.activeSequenceNumber,this.Dbt=t.segments}constructor(t,i,e){var s,n,r,h;this.WO=void 0,this.PRt=void 0,this.aS=void 0,this._W=void 0,this.vRt=void 0,this.wRt=void 0,this.bRt=void 0,this.SRt=void 0,this.kRt=void 0,this.bO=void 0,this.ERt=void 0,this.Sbt=void 0,this.gRt=void 0,this.mRt=void 0,this.Dbt=[],this.WO=t,this.PRt=e,this.aS=t.id,this._W=t.bandwidth,this.vRt=t.averageBandwidth,this.wRt=null!=(s=t.baseUrl)?s:"",this.bRt=null!=(n=t.codecs)?n:i.codecs,this.SRt=null!=(r=t.continuationPattern)?r:i.continuationPattern,this.kRt=null!=(h=t.initializationPattern)?h:i.initializationPattern,this.bO=t.label,this.ERt=t.mediaTimeOffset?_n(t.mediaTimeOffset):0,this.Sbt=t.segmentDuration?_n(t.segmentDuration):0,this.er(t)}},IQ=class extends PQ{get Km(){return li.Bk}get yRt(){return this.PRt}get X9(){return this.IRt}get Olt(){return this.CRt}get FN(){return this.Mb}get lQ(){return'audio/mp4; codecs="'+this.Rrt+'"'}constructor(t,i,e){var s,n,r,h;super(t,i,e),this.IRt=void 0,this.CRt=void 0,this.Mb=void 0,this.IRt=null!=(s=t.channels)?s:1,this.CRt=null!=(r=null!=(n=t.frameRate)?n:i.frameRate)?r:1024,this.Mb=null!=(h=t.sampleRate)?h:i.sampleRate}},CQ=class extends PQ{get Km(){return li.Mk}get yRt(){return this.PRt}get RRt(){return this.Up}get Olt(){return this.CRt}get lQ(){return'video/mp4; codecs="'+this.Rrt+'"'}constructor(t,i,e){var s;super(t,i,e),this.Up=void 0,this.CRt=void 0,this.Up=t.resolution,this.CRt=_n(null!=(s=t.frameRate)?s:i.frameRate)}};function RQ(t,i){const e=String(i);if(t===kQ||"now"===i)return e;const s=x(t.substring(9,t.lastIndexOf("d")));return Wa(e,s,"0")}function DQ(t,i){const e=String(i);if(t===kQ)return e;const s=x(t.substring(12,t.lastIndexOf("d")));return Wa(e,s,"0")}var NQ=class{get ont(){return this.DRt}get o(){return this.aS}get NRt(){return this.BRt}get iRt(){return zd.Pm(this.wRt,this.ont.iRt)}get Th(){return this.bO}get SCt(){return this.ERt}get MRt(){return this.LRt}er(t){for(const i of this.BI){const e=hh(t.tracks,t=>i.o===t.id);e&&i.er(e)}}constructor(t,i,e){var s;this.PRt=void 0,this.BI=void 0,this.DRt=void 0,this.aS=void 0,this.BRt=void 0,this.wRt=void 0,this.bO=void 0,this.ERt=void 0,this.LRt=void 0,this.PRt=t,this.BI=e,this.DRt=i,this.aS=t.id,this.BRt=t.alignId,this.wRt=null!=(s=t.baseUrl)?s:"",this.bO=t.label,this.ERt=t.mediaTimeOffset?_n(t.mediaTimeOffset):0,this.LRt=t.protection,this.er(t)}},BQ=class extends NQ{get yRt(){return this.PRt}get Z(){return this.BI}get bs(){return this.$b}get X9(){return this.IRt}er(t){var i,e;super.er(t),this.$b=t.language,this.IRt=null!=(i=t.channels)?i:1,this.IQ=null!=(e=t.mimeType)?e:"audio/mp4"}constructor(t,i){const e=[];super(t,i,e),this.$b=void 0,this.IRt=void 0,this.IQ=void 0;for(const i of t.tracks)e.push(new IQ(i,t,this))}},MQ=class extends NQ{get yRt(){return this.PRt}get Z(){return this.BI}get ORt(){return this.PRt.captions}er(t){var i;super.er(t),this.IQ=null!=(i=t.mimeType)?i:"video/mp4"}constructor(t,i){const e=[];super(t,i,e),this.IQ=void 0;for(const i of t.tracks)e.push(new CQ(i,t,this))}},LQ=class{get o(){return this.aS}get iRt(){return zd.Pm(this.wRt,this.URt.FRt)}get VRt(){return this.HRt}get zx(){return this.xz}get fQ(){return this.Zf}get q9(){return this.WRt}get W9(){return this.qRt}er(t){var i;this.HRt=t.timeBounds,this.Zf=null!=(i=t.events)?i:[],this.xz=t.currentTime?_n(t.currentTime):void 0}constructor(t,i){var e,s,n;this.WRt=[],this.qRt=[],this.URt=void 0,this.aS=void 0,this.wRt=void 0,this.HRt=void 0,this.xz=void 0,this.Zf=void 0,this.URt=t,this.aS=i.id,this.wRt=null!=(e=i.baseUrl)?e:"";for(const t of null!=(s=i.audio)?s:[])this.WRt.push(new BQ(t,this));for(const t of null!=(n=i.video)?n:[])this.qRt.push(new MQ(t,this));this.er(i)}},OQ=class{get cC(){return this.URt}get zRt(){return this.GRt}get XRt(){return this.jRt}get QRt(){return this.KRt}get YRt(){return this.JRt}get ZRt(){return this.$Rt}get P0(){return this.Tb}get tDt(){return this.iDt}get FRt(){var t;return zd.Pm(null!=(t=this.eDt)?t:"",this.sDt)}get nDt(){return this.rDt}er(t){var i;this.GRt=_n(t.availabilityDuration),this.jRt=t.creationDate,this.KRt=t.fallbackPollRate,this.JRt=t.manifestVersion,this.Tb=t.streamType,this.iDt=t.activePresentation,this.eDt=t.contentBaseUrl,this.rDt=null==(i=t.timeSource)?void 0:i.url,this.URt=t;for(const i of t.presentations){const t=hh(this.$Rt,t=>t.o===i.id);t?t.er(i):this.$Rt.push(new LQ(this,i))}this.$Rt=this.$Rt.filter(i=>t.presentations.some(t=>t.id===i.o))}constructor(t,i){this.sDt=void 0,this.URt=void 0,this.GRt=void 0,this.jRt=void 0,this.KRt=void 0,this.JRt=void 0,this.$Rt=[],this.Tb=void 0,this.iDt=void 0,this.eDt=void 0,this.rDt=void 0,this.sDt=t,this.URt=i,this.er(i)}};r(),r();var FQ=0,UQ=class extends Ne{get xst(){return!0}get wyt(){return this.hDt.wyt}get IW(){return this.hDt.IW}get Rrt(){return this.hDt.Rrt}get o(){return this.hDt.o}get Th(){var t;return null!=(t=this.hDt.Th)?t:""}get JI(){return this.yO}get Syt(){return this.hDt.iRt}get yyt(){}get lQ(){return this.hDt.lQ}get SCt(){return this.hDt.SCt}get iRt(){return this.hDt.iRt}get Km(){return this.hDt.Km}eRt(t){const i=(t-this.hDt.yRt.ont.zx)*this.framesPerSecond();return _.round(this.hDt.pRt+i)}oDt(t){return t+1}tRt(t){var i;let e,s=this.hDt.TRt;for(;e=null==(i=s.match(EQ))?void 0:i.pop();)s=s.split(e).join(RQ(e,t));return s+("now"===t?"?uuid="+un():"")}dRt(t){var i;let e,s=this.hDt.ARt;for(;e=null==(i=s.match(xQ))?void 0:i.pop();)s=s.split(e).join(DQ(e,t));return s}ZU(){}JU(){}constructor(t){super(),this.hDt=void 0,this.yO=FQ++,this.hDt=t}},VQ=class extends UQ{get aDt(){return this.hDt}get mwt(){return this.hDt.FN}get Ht(){return this.WO}framesPerSecond(){return this.hDt.FN/this.hDt.Olt}get Ca(){return this.hu||(this.hu=Oq(this)),this.hu}constructor(t,i){super(t),this.WO=void 0,this.hu=void 0,this.WO=i}},HQ=class extends UQ{get aDt(){return this.hDt}get byt(){return 0}get Olt(){return this.hDt.Olt}get Mi(){return this.hDt.RRt.height}get Ti(){return this.hDt.RRt.width}get RRt(){return this.hDt.RRt}get Ht(){return this.WO}framesPerSecond(){return this.hDt.Olt}get Ca(){return this.hu||(this.hu=Lq(this)),this.hu}constructor(t,i){super(t),this.WO=void 0,this.hu=void 0,this.WO=i}};r();var Pn=function(t){return t.uDt="alternative",t.cDt="main",t.dDt="commentary",t.lDt="",t.qU="descriptions",t.fDt="main-desc",t.vDt="translation",t}({}),Ja=function(t){return t.uDt="alternative",t.cDt="main",t.dDt="commentary",t.lDt="",t.WU="captions",t.XI="sign",t.HU="subtitles",t}({}),WQ=0,qQ=class extends Ne{get YI(){return this._Dt()}get Rt(){return this.We}set Rt(t){this.Rt!==t&&(this.We=t,t&&this.gDt(),this.mDt.pDt(),this.So(new Rh(this)))}get Ca(){return this.hu||(this.hu=cs(this)),this.hu}get plt(){return this.wDt}get o(){return this.PRt.o}get JI(){return this.yO}get Th(){var t;return null!=(t=this.PRt.Th)?t:""}get Qk(){return this.Rt?"enabled":"disabled"}set Qk(t){"enabled"===t?this.Rt=!0:"disabled"===t&&(this.Rt=!1)}get $I(){return this._O}get tC(){return this.Ict}set tC(t){this.Ict=t,this.mDt.pDt(),this.So(new qa(t,this))}SO(t){this.Rt=t}yDt(t){for(const i of this._O.NI)i===t&&this.So(new DW(i))}constructor(t,i,e){super(),this.PRt=void 0,this.mDt=void 0,this._O=new iE,this.wDt=void 0,this.yO=WQ++,this.We=!1,this.Ict=void 0,this.hu=void 0,this.PRt=i,this.mDt=e,this.wDt=new nG(t,[]);for(const t of i.Z)this._O.gO(this.createQuality(t))}},zQ=class extends qQ{get Km(){return li.Bk}get Lt(){return Pn.cDt}get bs(){return this.PRt.bs}get yRt(){return this.PRt}gDt(){this.mDt.bDt(this)}_Dt(){const t=this.mDt.ADt;return(null==t?void 0:t.Ht)===this?t:void 0}createQuality(t){return new VQ(t,this)}constructor(t,i){super(at.Bk,t,i)}},GQ=class extends qQ{get Km(){return li.Mk}get Lt(){return Ja.cDt}get bs(){return""}get yRt(){return this.PRt}get ORt(){return this.PRt.ORt}gDt(){this.mDt.SDt(this)}_Dt(){const t=this.mDt.TDt;return(null==t?void 0:t.Ht)===this?t:void 0}createQuality(t){return new HQ(t,this)}constructor(t,i){super(at.Mk,t,i)}};function XQ(t,i,e,s){if(!t)return;const n=function(t,i,e){const s=[];for(const t of i){var n;const i=null!=(n=t.mimeType)?n:"audio/mp4";var r;const e=null!=(r=t.codecs)?r:t.tracks.map(t=>t.codecs)[0];s.push(i+'; codecs="'+e+'"')}return jQ(t,i,s,[],e)}(t,i?[i]:[],!s),r=function(t,i,e){const s=[];for(const t of i){var n;const i=null!=(n=t.mimeType)?n:"video/mp4";var r;const e=null!=(r=t.codecs)?r:t.tracks.map(t=>t.codecs)[0];s.push(i+'; codecs="'+e+'"')}return jQ(t,i,[],s,e)}(t,e?[e]:[],!s),h=DG(n,r);return t.preferredKeySystems&&(null==h?void 0:h.qpt)&&(h.qpt=HG(h.qpt,t.preferredKeySystems)),h}function jQ(t,i,e,s,n){const r=i.map(t=>t.protection).filter(it);if(!r.length)return;const h=r[0].type,o=hs(r,t=>t.systems),a=hs(o,t=>function(t,i){void 0===i&&(i=!0);const e=[],s=i?function(t){return ep.filter(i=>i.Zm===t.toLowerCase())}(t.schemeId):function(t){return ip.filter(i=>i.Zm===t.toLowerCase())}(t.schemeId);for(const i of s)e.push({GH:QQ(t)?t.uri:void 0,xS:i,FW:void 0,OW:t.pssh?[Cn(t.pssh).buffer]:[],UW:[]});return e}(t,n));return{lH:t,zpt:{mTt:h},qpt:a,wTt:e,yTt:s}}function QQ(t){return t.schemeId===Rg.jm&&void 0!==t.keyFormat&&void 0!==t.keyFormatVersions}r(),r(),r();var KQ;function YQ(t){const i=t.zx,e=t.Fx.iL(i);return e?e.An(0)-i:0}KQ="Android"===zd.Rm.Dm?200:300;var JQ=zd.Zs.Ap?1:.5,ZQ=class{Tn(){1!==this.Ra&&(this.Ra=1,this.kDt=zd.fm(()=>{this.EDt()},KQ),this.xDt.$It(this.PDt),this.PL.lP?this.IDt.wn(Jr.PM,this.CDt):this.CDt())}KP(){0!==this.Ra&&(this.Ra=0,void 0!==this.kDt&&zd.vm(this.kDt),this.xDt.iCt(this.PDt),this.IDt.mn(Jr.xM,this.RDt),this.IDt.mn(Jr.PM,this.CDt),this.DDt=void 0,this.fL())}get NDt(){return $Q(this.BDt.ADt,this.BDt.TDt)}async EDt(){await this.MDt,this.MDt=this.LDt(),await this.MDt}ODt(t,i){var e,s;const n=this.FDt(t,i),r=this.UDt.WY;if(r.type===xa.PERFORMANCE)return n[n.length-1];if(r.type===xa.QUALITY)return n[0];const h=(null==(e=r.metadata)?void 0:e.bitrate)?1.3*(null==(s=r.metadata)?void 0:s.bitrate):this.xDt.IW;for(const t of n){if(t.VDt<=h)return t}return n[n.length-1]}async LDt(){var t,i;const e=null==(t=this.BDt.ADt)?void 0:t.Ht,s=null==(i=this.BDt.TDt)?void 0:i.Ht,n=this.FDt(e,s);if(0===n.length)return void 0;const r=this.maybeSwitchToTargetQuality(n);if(r)return void await this.HDt(r);const h=this.maybeGetUpSwitch(n);h&&await this.HDt(h)}maybeSwitchToTargetQuality(t){const i=this.NDt;if(t.some(t=>tK(t,i)))return;const e=this.xDt.IW;for(const i of t){if(i.VDt<=e)return i}return t[t.length-1]}maybeGetUpSwitch(t){var i,e;const s=this.xDt.IW;var n;var r;const h=1.3*((null!=(n=null==(i=this.BDt.ADt)?void 0:i.IW)?n:0)+(null!=(r=null==(e=this.BDt.TDt)?void 0:e.IW)?r:0));let o;for(const i of t)if(i.VDth){o={WDt:i,wft:zd.Mg()};break}if(!this.DDt||!tK(this.DDt.WDt,null==o?void 0:o.WDt))return void(this.DDt=o);const a=zd.Mg()-this.DDt.wft,u=this.DDt.WDt.VDt,c=this.qDt.length>=3&&this.qDt.every(t=>t>u);if(a>1e3&&c){if(this.PL.ML.BL||zd.Zs.pp){const t=2*this.xDt.RW;if(!(YQ(this.PL)>t))return}else{const t=_.max(2*this.xDt.RW+JQ,this.JW.aL.minimumOffset);if(!(YQ(this.PL)>t))return void(this.zDt&&this.zDt.minimumOffset===t||(this.fL(),this.zDt={minimumOffset:t},this.JW.cL(this.zDt)))}return this.DDt.WDt}}async HDt(t,i){void 0===i&&(i=!1),this.DDt=void 0,this.fL();const e=this.NDt;if(e.GDt===t.GDt&&e.XDt===t.XDt)return;const s=t.GDt,n=t.XDt;e.XDt&&n&&e.XDt.IW>n.IW&&i&&(this.xDt.JIt(t.VDt),this.qDt=[]),await this.BDt.jDt(n,s)}fL(){this.zDt&&(this.JW.fL(this.zDt),this.zDt=void 0)}FDt(t,i){let e=[],s=[];var n;t&&(e=(null==(n=t.tC)?void 0:n.length)?t.tC:t.$I.NI);if(i){var r;const t=(null==(r=i.tC)?void 0:r.length)?i.tC:i.$I.NI,e=t.slice().sort((t,i)=>t.IW-i.IW),n=this.QDt(e);0===n.length&&t.length>0&&n.push($i(t,t=>t.IW)),s=n}const h=[],o=e.length>0?e:[void 0],a=s.length>0?s:[void 0];for(const t of o)for(const i of a)h.push($Q(t,i));return function(t){return t.sort((t,i)=>i.VDt-t.VDt)}(h)}QDt(t){const i=hh(t,t=>t.Mi>=this.PL.Mi&&t.Ti>=this.PL.Ti);return i?t.filter(t=>t.Mi<=i.Mi&&t.Ti<=i.Ti):t.slice()}zg(){this.DDt=void 0,this.IDt.hr(),this.fL()}constructor(t,i,e,s,n,r){this.PL=void 0,this.JW=void 0,this.BDt=void 0,this.KDt=void 0,this.xDt=void 0,this.UDt=void 0,this.IDt=void 0,this.Ra=void 0,this.MDt=void 0,this.kDt=void 0,this.DDt=void 0,this.qDt=void 0,this.zDt=void 0,this.RDt=void 0,this.CDt=void 0,this.PDt=void 0,this.PL=t,this.JW=i,this.BDt=e,this.KDt=s,this.xDt=n,this.UDt=r,this.Ra=0,this.MDt=Promise.resolve(),this.qDt=[],this.zDt=void 0,this.RDt=()=>{var t,i;if(this.KDt.xP)return;const e=null==(t=this.BDt.ADt)?void 0:t.Ht,s=null==(i=this.BDt.TDt)?void 0:i.Ht,n=$i(this.FDt(e,s),t=>t.VDt);n&&(Wr(this.HDt(n,!0)),this.PL.ML.BL&&this.KDt.dC())},this.CDt=()=>{this.IDt.wn(Jr.xM,this.RDt),this.IDt.mn(Jr.PM,this.CDt)},this.PDt=()=>{if(this.qDt.unshift(this.xDt.IW),this.qDt=this.qDt.slice(0,3),this.DDt){const t=this.DDt.WDt.VDt;this.xDt.IW20&&([s,n,r]=await sK(t,i,e)),{localTimeMs:s,serverTimeMs:r-n/2}}async function sK(t,i,e){const s=zd.Mg(),n=await i.vk({Hk:Qe.GET,Yu:t,Yg:e}),r=zd.Mg()-s,h=await n.HT(e);return[s,r,1e3*Number(h)]}var nK=class extends gp{constructor(){super("seek")}},rK=function(t){return t.Jz="seek",t}({}),hK=[d.uo,Jr.AI,d.py],oK=class extends Ne{get cC(){return this.URt}get Fx(){return this.ZDt&&this.$Dt?this.ZDt.Fx.Mn(this.$Dt.Fx):this.ZDt?this.ZDt.Fx:this.$Dt?this.$Dt.Fx:Uo.rL()}get ADt(){return this.tNt}get TDt(){return this.iNt}get ht(){return this.tO}get rt(){return this.sO}get eNt(){return this.sNt.Yy}get W(){return this.nNt.Yy}get kP(){return this.URt?function(t,i,e){var s;const n=null==(s=t.ZRt[0])?void 0:s.zx,r=t.zRt;if(void 0===n||void 0===r)return e>0&&et.Rt),i=hh(this.sO.NI,t=>t.Rt),e=this.Mz.ODt(t,i);Wr(this.jDt(e.XDt,e.GDt))}uNt(){if(!this.URt||"live"!==this.URt.P0||!this.aNt)return;const t=this.URt.ZRt.filter(t=>t.o===this.URt.tDt)[0].zx,i=this.aNt.JDt+new Date(this.URt.XRt).getTime()/1e3;this.rNt.hCt(i,t)}createTracksForPresentation(t){var i,e,s,n;for(const i of null!=(s=t.q9)?s:[])this.tO.tt(new zQ(i,this));for(const i of null!=(n=t.W9)?n:[])this.sO.tt(new GQ(i,this));null==(i=this.tO.MI(0))||i.SO(!0),null==(e=this.sO.MI(0))||e.SO(!0)}get hC(){return $i([this.cNt,this.dNt].filter(it),t=>t.theolive)}get oC(){return this.cNt}get aC(){return this.dNt}get lNt(){const t=this.rNt.lCt;if(void 0!==t)return t}Tn(){this.fNt=!0,this.vNt()}KP(){var t;this.fNt=!1,this._Nt().catch(this.u8),"live"===(null==(t=this.cC)?void 0:t.P0)&&(this.gNt(),this.pNt())}gNt(){this.mNt&&this.mNt.cancelDownload()}pNt(){this.wNt&&this.wNt.cancelDownload()}dC(t){this.T9.Zg(),this.T9=new Zc,this.k9=pf(i=>this.yNt(t,this.k9,i),this.T9).catch(this.u8)}async yNt(t,i,e){if(i&&await i,await ua(this.W,e),"live"!==this.URt.P0)throw new m("The current video source does not support Live playback.");if(fr(e),await this._Nt(),fr(e),this.mNt&&(this.mNt.ZCt()||this.mNt.QCt!==(null!=t?t:"now"))){var s;if(this.gNt(),this.ZDt){for(;this.ZDt.yCt;)await ua(this.ZDt.ACt,e);await this.ZDt.pS(0,1/0)}null==(s=this.mNt)||s.Oy(null!=t?t:"now")}if(this.wNt&&(this.wNt.ZCt()||this.wNt.QCt!==(null!=t?t:"now"))){var n;if(this.pNt(),this.$Dt){for(;this.$Dt.yCt;)await ua(this.$Dt.ACt,e);await this.$Dt.pS(0,1/0)}null==(n=this.wNt)||n.Oy(null!=t?t:"now")}this.So(new nK),fr(e),this.k9=void 0,this.vNt()}Oy(t){this.T9.Zg(),this.T9=new Zc,this.k9=pf(i=>this.E9(t,this.k9,i),this.T9).catch(this.u8)}async E9(t,i,e){var s,n;i&&await i,await ua(this.W,e),fr(e),await this._Nt(),fr(e),this.mNt&&(this.mNt.ZCt()||this.mNt.QCt!==t)&&this.gNt(),this.wNt&&(this.wNt.ZCt()||this.wNt.QCt!==t)&&this.pNt(),this.So(new nK),fr(e),null==(s=this.mNt)||s.Oy(t),null==(n=this.wNt)||n.Oy(t),this.k9=void 0,this.vNt()}jDt(t,i){var e,s;return(null==(e=this.mNt)?void 0:e.qot)===i&&(null==(s=this.wNt)?void 0:s.qot)===t?Promise.resolve():(this.bNt.Zg(),this.bNt=new Zc,this.ANt=pf(e=>this.SNt(t,i,this.ANt,e),this.bNt).catch(this.u8),this.ANt)}async SNt(t,i,e,s){var n,r;e&&await e,await ua(this.sNt.Yy,s),fr(s),await this._Nt(),fr(s),await this.TNt(t,i),await this.kNt(t,i),fr(s);for(const i of null!=(r=null==t||null==(n=t.Ht)?void 0:n.ORt)?r:[])this.ENt.$gt({Sit:i.channel,Tit:i.language,Th:i.label});this.ANt=void 0,this.vNt()}async TNt(t,i){var e,s,n;const r=null!=(n=this.lNt)?n:"now";if((null==(e=this.mNt)?void 0:e.qot)!==i){var h;const t=this.mNt&&!this.mNt.ZCt(),e=null==(h=this.mNt)?void 0:h.QCt;if(this.mNt&&(await this.mNt.zg(),this.mNt=void 0),this.ZDt&&await this.ZDt.ACt,i){var o,a;const s=null!=(a=null==(o=this.ZDt)?void 0:o.Fx)?a:Uo.rL(),n=t?e:s.An(s.V-1);this.mNt=new AQ(i,this.aV,this.Ndt),this.mNt.wn(Ej.DCt,t=>this.xNt(at.Bk,t)),this.mNt.Oy(null!=n?n:r)}}if((null==(s=this.wNt)?void 0:s.qot)!==t){var u;const i=this.wNt&&!this.wNt.ZCt(),e=null==(u=this.wNt)?void 0:u.QCt;if(this.wNt&&(await this.wNt.zg(),this.wNt=void 0),this.$Dt&&await this.$Dt.ACt,t){var c,d;const s=null!=(d=null==(c=this.$Dt)?void 0:c.Fx)?d:Uo.rL(),n=i?e:s.An(s.V-1);this.wNt=new SQ(t,this.aV,this.Ndt,this.PL),this.wNt.wn(Ej.DCt,t=>this.xNt(at.Mk,t)),this.wNt.Oy(null!=n?n:r)}}}async kNt(t,i){const e=function(t,i,e,s,n){const r=XQ(t,null==i?void 0:i.Ht.yRt.yRt,null==e?void 0:e.Ht.yRt.yRt,s),h=FG(r),o=[];i&&o.push({GT:i.lQ});e&&o.push({GT:e.lQ});return{Km:O.SV,q4:o,fq:h,t5:n&&!s}}(this.Ac.contentProtection,i,t,this.PL.ML.BL,this.Ac.useManagedMediaSource);if(this.aq&&this.aq.IZ(e)){var s,n;const t=!(null==(s=this.mNt)?void 0:s.ZCt());if(this.ZDt&&t){for(;this.ZDt.yCt;)await this.ZDt.ACt;await this.ZDt.EQ()}const i=!(null==(n=this.wNt)?void 0:n.ZCt());if(this.$Dt&&i){for(var r,h;null==(r=this.$Dt)?void 0:r.yCt;)await this.$Dt.ACt;await(null==(h=this.$Dt)?void 0:h.EQ())}await this.aq.RZ(e)}else{this.gNt(),this.pNt(),this.ZDt&&(await this.ZDt.zg(),this.ZDt=void 0),this.$Dt&&(await this.$Dt.zg(),this.$Dt=void 0),this.PL.G7();try{await this.PL.hr(),this.aq=await this.PL.Un(e),this.nNt.Qy(),this.aq.e4&&this.mNt&&(this.aq.e4.wn(bi.pZ,this.Rs),this.ZDt=new Tj(this.aq.e4,this.PL,i,this.ENt)),this.aq.s4&&this.wNt&&(this.aq.s4.wn(bi.pZ,this.Rs),this.$Dt=new Tj(this.aq.s4,this.PL,t,this.ENt)),"live"===this.URt.P0&&this.aq.F4(1/0)}finally{this.PL.X7()}}}vNt(){!this.fNt||this.k9||this.ANt||this.PNt||this.INt||(this.Mz.Tn(),this.CNt=new Zc,this.wNt&&this.$Dt&&(this.PNt=this.RNt(this.wNt,this.$Dt,this.CNt.Yg).catch(this.u8)),this.mNt&&this.ZDt&&(this.INt=this.RNt(this.mNt,this.ZDt,this.CNt.Yg).catch(this.u8)))}async _Nt(){this.Mz.KP(),this.CNt&&(this.CNt.Zg(),this.CNt=void 0),this.PNt&&(await this.PNt,this.PNt=void 0),this.INt&&(await this.INt,this.INt=void 0)}async RNt(t,i,e){for(await this.W;t.yCt;)await ua(t.ACt,e);for(;i.yCt;)await ua(i.ACt,e);if(!t.ZCt()){const e=zd.Mg()/1e3,s="now"===t.QCt,{initialization:n,data:r,metadata:h}=await t.$Ct(),o=i.Fx;!zd.Zs.wp&&!this.PL.ML.BL&&h&&o.An(o.V-1)>h.Get&&await i.pS(h.Get,1/0),await i.J2(n),r&&await i.Q2(r,h,t.qot);const a=i.Fx.qM(o);s&&a.V>0&&this.rNt.nCt(e,a.An(a.V-1))}for(;!t.jCt;){fr(e);const s=t.oRt();await ua(i.appendStream(s,t),e)}}async zg(){this.uV.Zg(),this.Ypt&&await this.Ypt.catch(gs),this.k9&&(this.T9.Zg(),this.gNt(),this.pNt(),await this.k9.catch(gs)),this.ANt&&(this.bNt.Zg(),this.gNt(),this.pNt(),await this.ANt.catch(gs)),await this._Nt(),this.mNt&&await this.mNt.zg(),this.wNt&&await this.wNt.zg(),this.mNt=void 0,this.wNt=void 0,this.nNt.Zg(),this.sNt.Zg(),this.aq&&(await this.PL.hr(),this.aq=void 0),this.ZDt=void 0,this.$Dt=void 0,this.PL.mn(Jr.PM,this.NL),this.PL.mn(hK,this.updateActiveQualities),this.tO.hr(),this.tNt=void 0,this.sO.hr(),this.iNt=void 0,this.URt=void 0,this.aNt&&(this.aNt.zg(),this.aNt=void 0),this.fNt=!1}constructor(t,i,e,s,n,r,h,o,a,u,c){super(),this.Ac=void 0,this.aV=void 0,this.oNt=void 0,this.PL=void 0,this.rNt=void 0,this.Ndt=void 0,this.ENt=void 0,this.fNt=!1,this.DNt=!1,this.Mz=void 0,this.tO=new Ws,this.sO=new Ws,this.NNt=void 0,this.tNt=void 0,this.iNt=void 0,this.URt=void 0,this.sNt=new Ga,this.aNt=void 0,this.dNt=void 0,this.cNt=void 0,this.JW=void 0,this.aq=void 0,this.Ypt=void 0,this.nNt=new Ga,this.uV=new Zc,this.ANt=void 0,this.bNt=new Zc,this.k9=void 0,this.T9=new Zc,this.mNt=void 0,this.ZDt=void 0,this.INt=void 0,this.wNt=void 0,this.$Dt=void 0,this.PNt=void 0,this.CNt=void 0,this.NL=()=>{this.DNt=!0},this.updateActiveQualities=()=>{var t,i;const e=this.PL.zx,s=null==(t=this.ZDt)?void 0:t.pCt(e),n=null==(i=this.$Dt)?void 0:i.pCt(e);if(this.tNt!==s&&(this.tNt=s,s))for(const t of this.tO.NI)t.yDt(s);if(this.iNt!==n&&(this.iNt=n,n))for(const t of this.sO.NI)t.yDt(n)},this.xNt=(t,i)=>{const e=i.data;if(e.Km===wh.MCt){const{OCt:i,FCt:n,LCt:r,UCt:h}=e;if(this.aNt){const e=this.aNt.ebt,s=this.PL.zx;if(this.DNt&&0!==s){const h={theolive:e-i+r-s,engine:n,distribution:_.max(e-(i+n),0),player:_.min(r-s,this.JW.aL.forceSeekOffset)};t===at.Bk?(this.dNt=h,this.rNt.cCt(this.aNt.JDt+i,r)):(this.cNt=h,this.rNt.aCt(this.aNt.JDt+i,r))}}var s;if(h)null!=this.NNt||(this.NNt=this.PL.sI(us.zU,"timecode","timecode",void 0,!1,nh.DEFAULT,!1,void 0)),this.NNt.nV(new Oh(r,r,h,!1,void 0)),Re(this.NNt,null!=(s=this.PL.Fx.Tn(0))?s:-1)}this.So(i)},this.u8=t=>{Ce(t)||(this.KP(),this.So(new el(new as(me.MEDIA_LOAD_ERROR,t.message))))},this.Ac=t,this.oNt=i,this.PL=e,this.aV=n,this.rNt=r,this.Mz=new ZQ(e,h,this,a,s,c),this.Ndt=o,this.ENt=u,this.JW=h,this.PL.wn(Jr.PM,this.NL),this.PL.wn(hK,this.updateActiveQualities)}};r();var aK=class extends sk{FL(){const t=this.PL.Fx;return 0===t.V?0:t.An(t.V-1)-this.PL.zx}dC(){this.oa.dC()}UL(t,i,e){if(t>e+2){const e=t-i;if(e<=this.lastAmountToSeekForward&&!this.oa.xP)return this.oa.zx+=e,this.lastAmountToSeekForward=0,!0;this.lastAmountToSeekForward=e}else this.lastAmountToSeekForward=0;return!1}vL(){return bj(super.vL())}VL(){return!zd.Zs.pp}constructor(t,i,e){super(t,i,e),this.lastAmountToSeekForward=0}},uK=[d.Jw,d.Qw,d.Nw,d.Kw,d.wy,d.Cw,d.Lw,d.Bw,d.xw,d.Ew],cK=class extends Ne{HI(){this.PL.wn(uK,this.Rs),this.PL.wn(Jr.PM,this.YG),this.PL.wn([d.uo,d.jw],this.BNt),this.PL.wn(hc.ma,this.MNt),this.PL.wn(d.py,this.bd),this.xq.wn(Ii,this.Rs)}UI(){this.PL.mn(uK,this.Rs),this.PL.mn(Jr.PM,this.YG),this.PL.mn([d.uo,d.jw],this.BNt),this.PL.mn(hc.ma,this.MNt),this.PL.mn(d.py,this.bd),this.xq.mn(Ii,this.Rs)}get ht(){return this.tO}get rt(){return this.sO}get cC(){var t,i;return null==(i=this.BDt)||null==(t=i.cC)?void 0:t.cC}get OP(){return this.PL.OP}set OP(t){this.PL.OP=t}get WP(){return!1}set WP(t){}get dq(){return this.lq}YP(){return!1}qP(){return this.PL.Ma}Aa(){return this.PL.Sq}sI(t){return this.PL.Tq(t)}we(){this.PL.we()}be(){return this.PL.be()}$P(){}tI(){}JP(){}ZP(){}get oP(){return this.PL.oP}set oP(t){this.PL.oP=t}get zx(){var t;return null!=(t=this.LNt)?t:this.PL.zx}set zx(t){this.Xx(t)}Xx(t,i){this.T9.Zg(),this.T9=new Zc,this.k9=pf(i=>this.E9(t,i,this.k9),this.T9)}get Vx(){const t=this.ONt();if(t)return new Date(t.getTime()+1e3*this.zx)}set Vx(t){const i=this.ONt();t&&i&&(this.zx=i.getTime()-t.getTime())}ONt(){const t=this.cC;if(!t)return;const i=new Date(t.creationDate).getTime();let e=NaN;for(const i of t.presentations)i.currentTime&&(e=i.currentTime.value/(i.currentTime.scale||1)*1e3);return S(e)?void 0:new Date(i-e)}get bt(){return this.Ac}get vP(){return this.PL.vP}set vP(t){this.PL.vP=t}get ct(){const t=this.PL.ct;return t===Gl?1/0:t}get Qx(){return!1}get Jx(){return this.rq}get lt(){return this.nq}get $x(){return this.FNt}get iP(){}get sP(){return!1}get rP(){return Y({},{rO:0,hO:0,oO:0,aO:0,uO:0,cO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.PL.hP())}get cP(){return!0}get xP(){return this.Pz}get uq(){}get nt(){return this.Gl}get DP(){return this.PL.DP}get MP(){return this.PL.MP}get Fx(){return this.ykt._s()}get ykt(){return this.BDt?this.BDt.Fx:Uo.rL()}get pP(){return this.PL.pP._s()}get kP(){var t,i;return null!=(i=null==(t=this.BDt)?void 0:t.kP._s())?i:Uo.rL()._s()}get lP(){return this.pst}get uC(){return!0}get VP(){return this.Lz}get lNt(){var t;return null==(t=this.BDt)?void 0:t.lNt}get OL(){if(this.lP)return;if(!this.DNt)return;const t=this.zx,i=this.rNt.fCt(t);if(void 0===i)return;const e=this.ykt;let s=0;if(e.V>0){const i=e.An(e.V-1);s=_.max(i-t,0)}return _.max(i,s)}get hC(){var t;return null==(t=this.BDt)?void 0:t.hC}get oC(){var t;return null==(t=this.BDt)?void 0:t.oC}get aC(){var t;return null==(t=this.BDt)?void 0:t.aC}get AP(){return this.PL.AP}get wP(){return this.UNt}set wP(t){this.UNt=t,this.VNt()}async VNt(){this.UNt!==Dn.pz&&this.BDt&&(this.BDt.Un(),this.UNt!==Dn.HL&&this.UNt!==Dn.PW||(await this.BDt.eNt,"vod"===this.BDt.cC.P0&&this.BDt.Tn()))}async Ta(t,i,e){if(fr(e),await this.hr(),fr(e),!Ms(t))return this.rq=new as(me.SOURCE_INVALID,"HESP source incorrectly configured"),this.nq=ar(this.rq),this.HNt(this.rq),Promise.resolve();const s=t;this.Ac=s,this.FEt=i;const n=new sj(this.aV);this.WNt=this.qNt(t),this.JW=new aK(this,this.PL,this.WNt),this.JW.Rt=!0,this.JW.wn("latencyrecoveryseek",this.Rs),this.VP.Ea(this.JW),this.BDt=new oK(s,n,this.PL,this.lq,this.aV,this.rNt,this.JW,this.Ndt,this,this.ENt,this.Mz),this.BDt.wn(d.Ww,this.Rs),this.BDt.wn(hc.ma,this.zNt),this.tO.OI=this.BDt.ht,this.sO.OI=this.BDt.rt,this.pq.BW(t.contentProtection),Wr(this.VNt())}IP(t,i,e,s){return Promise.resolve()}CP(){return Promise.resolve()}qNt(t){return t.latencyConfiguration?t.latencyConfiguration:Aj()}async QP(){var t;if(!this.BDt)return;this.pst=!1,this.BDt.Un(),await this.BDt.W,this.So(new vt(this.zx));const i=this.BDt.ww(rK.Jz);this.dC(),await i,this.BDt.Tn(),await this.PL.QP(),null==(t=this.JW)||t.Tn()}jP(){var t;this.BDt&&(this.pst=!0,this.So(new Si(this.zx)),this.BDt.KP(),null==(t=this.JW)||t.KP(),this.PL.jP())}dC(){if(this.ixt)throw new m("Cannot seek while resetting");this.T9.Zg(),this.T9=new Zc,this.k9=pf(t=>this.yNt(this.k9,t),this.T9)}async E9(t,i,e){if(this.ixt)throw new m("Cannot seek while resetting");let s=t;if(this.GNt(s),this.kP.length>0&&(s=Uo.jn(this.kP).LM(s),this.GNt(s)),this.BDt){e&&(await e.catch(gs),fr(i));try{const t=this.PL.ww(d.Zw,i);this.PL.Oy(s),this.BDt.Oy(s),await t}catch(t){throw sa(t),this.BDt.KP(),this.XNt(),t}this.jNt()}}async yNt(t,i){this.So(new gp("golive"));const e=this.lNt;if(this.GNt(e),this.BDt){t&&(await t.catch(gs),fr(i));try{let t,s=this.JW.aL.targetOffset;if(await this.BDt.eNt,e&&s>=1){if(!this.JW.VL()){s-=_.min(1,.5*s)}t=e-s}else t=this.lNt?this.lNt-.2:void 0;for(this.BDt.dC(t);this.ykt.V>0;)await this.BDt.ww(bi.pZ,i);const n=this.ykt;for(;0===this.ykt.qM(n).V;)await this.BDt.ww(bi.pZ,i);t=this.ykt.Tn(this.ykt.V-1),t=this.QNt(t),this.GNt(t);const r=this.PL.ww(d.Zw,i);this.PL.Oy(t,!0),await r}catch(t){var s;if(Ce(t))throw null==(s=this.JW)||s.Tn(),t;throw this.BDt.KP(),await this.BDt.hNt(),this.XNt(),t}this.jNt()}}GNt(t){this.Pz=!0,this.LNt=t,this.So(new ji(this.zx))}jNt(){this.Pz&&(this.LNt=void 0,this.Pz=!1,this.So(new Yr(this.zx)))}XNt(){this.LNt=void 0,this.Pz=!1}QNt(t){return t}KNt(){var t;null==(t=this.BDt)||t.KP()}HNt(t){this.So(new el(t)),this.KNt()}async sxt(t,i,e){var s;fr(e),null==(s=this.JW)||s.KP(),t&&await t.catch(gs),i&&await i.catch(gs),await this.ENt.hr(),this.BDt&&(await this.BDt.zg(),this.BDt=void 0),fr(e),await this.PL.hr(),fr(e),this.PL.Eq(),this.sO.hr(),this.tO.hr(),this.XNt(),this.xq.hr(),this.rNt.hr(),this.rq=void 0,this.nq=void 0,this.pst=!0,this.DNt=!1,this.Ac=void 0,this.ixt=void 0,this.WNt=void 0}hr(){return this.T9.Zg(),this.T9=new Zc,this.YNt.Zg(),this.YNt=new Zc,this.ixt=this.sxt(this.k9,this.ixt,this.YNt.Yg).catch(t=>bu(t)),this.ixt}async kn(){var t,i;this.UI(),this.xq.kn(),this.Cq.zg(),this.Ac&&await this.hr(),this.Vo(),this.PL.Rq=void 0,null==(t=this.JW)||t.mn("latencyrecoveryseek",this.Rs),null==(i=this.JW)||i.zg(),await this.ENt.kn(),this.Gl.kn(),this.tO.kn(),this.sO.kn()}constructor(t,i,e,s,n){var r;super(),this.PL=void 0,this.aV=void 0,this.lq=void 0,this.Cq=void 0,this.xq=void 0,this.JW=void 0,this.pq=void 0,this.rNt=void 0,this.Lz=void 0,this.FNt=void 0,this.Ndt=void 0,this.Mz=void 0,this.Ac=void 0,this.FEt=void 0,this.BDt=void 0,this.Pz=!1,this.LNt=void 0,this.T9=new Zc,this.k9=void 0,this.ixt=void 0,this.YNt=new Zc,this.pst=!0,this.DNt=!1,this.tO=new Gh,this.sO=new Gh,this.Gl=void 0,this.ENt=void 0,this.rq=void 0,this.nq=void 0,this.UNt=Dn.pz,this.WNt=void 0,this.bd=t=>{const i=this.Fx;i.length>0&&this.ENt.jU(i.start(0)),this.So(new B(t.currentTime,this.Vx))},this.BNt=()=>{this.PL.lP!==this.pst&&(this.PL.lP?this.jP():this.QP().catch(gs))},this.YG=()=>{this.DNt=!0},this.zNt=t=>{this.rq=t.errorObject,this.nq=ar(this.rq),this.HNt(this.rq)},this.MNt=t=>{this.rq=$k(t.lt),this.nq=t.lt,this.HNt(this.rq)},this.PL=t,this.Cq=new Gt(this,this.PL),this.xq=new _s(this.Cq,!0),this.aV=i,this.Mz=e,this.lq=new fj(e.jY,e.CY.RW),this.pq=new eC(i),this.PL.Rq=this.pq,n.allowNativeFullscreen?this.ENt=new kW(this.PL):this.ENt=new wt(this.PL),this.Gl=new Tu([this.ENt.Z]),this.rNt=new vj,this.FNt=new nj(this),this.Lz=s,this.Ndt=Y({},n.retryConfiguration,{maxRetries:null!=(r=n.retryConfiguration.maxRetries)?r:3}),this.HI()}},dK=class extends cK{So(t){if(this.JNt){if(t.type===d.Zw)return void this.ZNt();if(t.type===Jr.xM||t.type===d.$w||t.type===Jr.PM)return void this.$Nt.push(t)}super.So(t)}ZNt(){this.JNt=!1,void 0!==this.tBt&&zd.Lg(this.tBt);const t=hh(this.$Nt,t=>t.type===Jr.PM);t&&super.So(t),Wt(this.$Nt)}zP(){if(RU(this.PL))return this.PL.zP()}async hr(){this.iBt=!1,this.ZNt(),await super.hr()}async kn(){h.removeEventListener("visibilitychange",this.eBt),this.ZNt(),await super.kn(),await this.PL.zg(),await this.Nq.Dq(this.sBt)}QNt(t){return zs.X_&&zs.Q_>=15&&zs.Kv?t+.25:t}constructor(t,i,e,s,n,r){super(t,i,e,s,r),this.Nq=void 0,this.sBt=void 0,this.iBt=!1,this.JNt=!1,this.$Nt=[],this.tBt=void 0,this.eBt=()=>{const t=this.oP||0===this.OP;"hidden"!==h.visibilityState||this.lP||!t||this.Aa().YL?"visible"===h.visibilityState&&this.iBt&&(this.JNt=!0,this.tBt=zd.Og(()=>{for(const t of this.$Nt)super.So(t);this.tBt=void 0,this.JNt=!1},2e3),Wr(this.QP()),this.iBt=!1):(this.jP(),this.iBt=!0)},this.Nq=n,this.sBt=t,zs.Rg&&h.addEventListener("visibilitychange",this.eBt)}};r();var lK=class{get tz(){return $.wC}async Jq(t,i){return function(t){if(!t)return!1;const i=t.toLowerCase();return Xt(i,Hi.mC)||Xt(i,Hi.wC)}(t.type)}async Zq(t){return VT(t)}};oe(new class extends lK{DC(t,i,e,s,n,r,h){const o=new qs(i),a=o.Yq(at.Mk);return new dK(a,e,n,r,o,s)}Jq(t,i){return zd.yx&&Qb?zs.w_||zs.S_||zs.D_?Promise.resolve(!1):fv(t.useManagedMediaSource)?super.Jq(t,i):Promise.resolve(!1):Promise.resolve(!1)}$q(){return!1}}),r(),r();var fK=class extends cK{zP(){if(RU(this.PL))return this.PL.zP()}async kn(){await super.kn(),await this.Nq.Dq(this.PL)}constructor(t,i,e,s,n,r){super(t,i,e,s,r),this.Nq=void 0,this.Nq=n}};zs.X_&&zs.ru&&oe(new class extends lK{get tz(){return $.xW}async Jq(t,i){var e,s;if(zs.IS_IOS_CHROME)return!1;const n=await super.Jq(t,i);var r;if(null==(r=null==(s=Af())||null==(e=s.canPlayType)?void 0:e.call(s,Hi._C))||!r||!n||!("serviceWorker"in od))return!1;try{const t=od.serviceWorker.ready;return await wf(t,1e3),!0}catch(t){return!1}}async Zq(t){return!!t.fairplay&&await super.Zq(t)}DC(t,i,e,s,n,r,h){if(t instanceof HTMLDivElement){const t=i.Pst(at.Mk);return new fK(t,e,n,r,i,s)}throw new as(me.CONFIGURATION_ERROR,"Container Div element expected.")}$q(){return!1}}),r(),r(),r(),r();var vK="theo_live_user_id",_K=class{incrementSequenceNumber(){this.AA+=1}get sequenceNumber(){return this.AA}constructor(t){this.externalId=void 0,this.id=void 0,this.userId=void 0,this.AA=void 0,this.externalId=t,this.id=un(),this.userId=gK(),this.AA=0}};function gK(){try{const t=localStorage.getItem(vK);if(t)return t;const i=un();return localStorage.setItem(vK,i),i}catch(t){return un()}}function pK(t){var i;return{hespSrc:t.hespSrc,type:"theo.live",hlsSrc:t.hlsSrc,maxMobileBitrate:t.maxMobileBitrate,targetLatency:null==(i=t.metadata.customization)?void 0:i.targetLatency,contentProtection:t.drmConfig?t.drmConfig:void 0}}function mK(t){const{integration:i,widevine:e,playready:s,fairplay:n}=t;return Y({integration:i},e&&{widevine:{licenseAcquisitionURL:e.licenseUrl}},s&&{playready:{licenseAcquisitionURL:s.licenseUrl}},n&&{fairplay:{licenseAcquisitionURL:n.licenseUrl,certificateURL:n.certificateUrl}})}function wK(t,i){return{id:t.id,name:t.name,deleted:"deleted"===t.status,targetLatency:t.source.targetLatency,maxMobileBitrate:t.source.maxMobileBitrate,endpoints:[{hespSrc:t.source.hespSrc,hlsSrc:t.source.hlsSrc,weight:1,priority:1,contentProtection:t.source.contentProtection},t.fallback&&i?{hespSrc:t.fallback.hespSrc,hlsSrc:t.fallback.hlsSrc,weight:1,priority:2,contentProtection:t.fallback.contentProtection}:void 0].filter(it)}}function yK(t){return void 0!==t.mode}r(),r(),r(),r();var In=function(t){return t.STARTING="s",t.PLAYING="p",t.SEEKING="k",t.REBUFFERING="r",t.PAUSED="a",t.ENDED="e",t.QUIT="q",t}({}),jn=function(t){return t.MANIFEST="m",t.AUDIO="a",t.VIDEO="v",t.OTHER="o",t}({});function bK(t){return 100*_.round(t/100)}function AK(t){const i=t.Gx(),e=t.Ux();for(let t=0;tt.Rt)}function TK(t){return $i(t.$I.NI,t=>t.IW)}function kK(t){return uf(t.$I.NI,t=>t.IW)}r(),r();var Pe=class t{static starting(i,e,s){return new t(In.STARTING,i,e,s)}static playing(i){return new t(In.PLAYING,i)}static seeking(i,e){return new t(In.SEEKING,i,e)}static rebuffering(i,e){return new t(In.REBUFFERING,i,e)}static paused(i){return new t(In.PAUSED,i)}static ended(i){return new t(In.ENDED,i)}static quit(i){return new t(In.QUIT,i)}get ct(){return Date.now()-this.nBt}rBt(){const t=this.oa.lX.CY.IW,i=this.oa.VP.OL,e=AK(this.oa);t>0&&void 0!==e&&void 0!==i&&(this.hBt+=1,this.oBt=this.aBt(this.oBt,e),this.uBt=this.aBt(this.uBt,1e3*this.oa.VP.Cd.targetOffset),this.cq=this.aBt(this.cq,1e3*i),this.cBt=this.aBt(this.cBt,t/1e3))}aBt(t,i){return t+(i-t)/this.hBt}DC(){const t={sta:this.Vp,ts:this.nBt,"theo-vt":this.dBt,"theo-at":this.lBt,"theo-d":this.ct,"theo-r":this._f,"theo-e":this.nq};return this.hBt>0?Y({},t,{bl:bK(this.oBt),tbl:bK(this.uBt),ltc:bK(this.cq),mtp:bK(this.cBt),"theo-w":this.hBt}):t}fBt(){return new t(this.Vp,this.oa,this._f)}constructor(t,i,e,s){var n,r,h,o;this.Vp=void 0,this.nBt=Date.now(),this.oBt=0,this.uBt=0,this.dBt=void 0,this.lBt=void 0,this.cq=0,this.cBt=0,this.hBt=0,this._f=void 0,this.nq=void 0,this.oa=void 0,this.Vp=t,this.oa=i,this.dBt=null==(r=SK(this.oa.rt))||null==(n=r.YI)?void 0:n.o,this.lBt=null==(o=SK(this.oa.ht))||null==(h=o.YI)?void 0:h.o,this._f=e,this.nq=s}},EK=class{vBt(){var t;const i=this.oa.VP.OL,e=AK(this.oa),s=this.oa.lX.CY.IW;return xK({bl:void 0!==e?bK(e):void 0,tbl:bK(1e3*this.oa.VP.Cd.targetOffset),ltc:void 0!==i?bK(1e3*i):void 0,mtp:void 0!==s?bK(s/1e3):void 0,sta:null==(t=this._Bt)?void 0:t.Vp,su:!this.DNt||void 0,"theo-sq":this.gBt.sequenceNumber})}pBt(t){var i,e;const s=function(t,i){switch(i){case jn.VIDEO:return SK(t.rt);case jn.AUDIO:return SK(t.ht)}}(this.oa,t);return xK({br:(null==s||null==(i=s.YI)?void 0:i.IW)?bK((null==s||null==(e=s.YI)?void 0:e.IW)/1e3):void 0,ot:t,tb:s?bK(kK(s).IW/1e3):void 0,lb:s?bK(TK(s).IW/1e3):void 0})}mBt(){return xK({"theo-cw":this.oa.xe.clientWidth,"theo-ch":this.oa.xe.clientHeight,"theo-m":this.oa.oP,"theo-vo":_.ceil(100*this.oa.OP)})}wBt(){var t;return xK({sf:PK(this.oa.bt),sid:this.gBt.id,st:"l",v:2,"theo-eid":null==(t=this.gBt.externalId)?void 0:t.substring(0,128),"theo-cn":this.yBt.name.substring(0,128),"theo-v":"10.3.0","theo-t":"web","theo-u":this.gBt.userId})}bBt(){const t={"CMCD-States":btoa(JSON.stringify(this.ABt))};return this.ABt=[],t}SBt(t){this._Bt&&this.ABt.push(this._Bt.DC()),this._Bt=t}async TBt(){this._Bt&&(this.ABt.push(this._Bt.DC()),this._Bt=void 0),this.ABt.push(Pe.quit(this.oa).DC());const t=Y({},this.bBt(),{"CMCD-Session":this.wBt()}),i=await this.oa.Dx.vk({Yu:this.kBt,_k:t,Yk:!0});await i.lk()}destroy(){this.EBt(),s.removeEventListener("beforeunload",this.EBt),this.oa.mn(Jr.PM,this.NL),this.oa.mn(Jr.xM,this.DL),this.oa.mn(d.jw,this.xBt),this.oa.$x.mn("latencyrecoveryseek",this.PBt),this.oa.$x.mn("golive",this.IBt),this.oa.rt.mn(N.rI,this.KW),this.oa.ht.mn(N.rI,this.KW),this.oa.rt.NI.forEach(t=>t.mn(Te.II,this.ih)),this.oa.ht.NI.forEach(t=>t.mn(Te.II,this.ih)),this.oa.pnt.removeEventListener("intenttofallback",this.CBt),this.oa.pnt.removeEventListener("distributionloadstart",this.RBt),this.oa.pnt.removeEventListener("distributionoffline",this.DBt),this.oa.lX.TY(this.NBt),zd.vm(this.BBt)}constructor(t,i,e){this.oa=void 0,this.yBt=void 0,this.kBt=void 0,this.BBt=void 0,this.gBt=void 0,this.ABt=[],this._Bt=void 0,this.DNt=!1,this.uX=!1,this.CBt=t=>{var i,e,s;this.SBt(Pe.starting(this.oa,"fallback",null!=(s=null==(i=t.reason)?void 0:i.message)?s:null==(e=this.oa.Zx())?void 0:e.message))},this.RBt=()=>{this.SBt(Pe.starting(this.oa,"loadChannel"))},this.DBt=()=>{this.SBt(Pe.ended(this.oa))},this.KW=t=>{t.Ht.wn(Te.II,this.ih)},this.ih=()=>{var t,i,e,s;const n=null==(i=SK(this.oa.rt))||null==(t=i.YI)?void 0:t.o,r=null==(s=SK(this.oa.ht))||null==(e=s.YI)?void 0:e.o;n&&r&&(this._Bt&&this._Bt.Vp===In.PLAYING&&this._Bt.dBt===n&&this._Bt.lBt===r||this.SBt(Pe.playing(this.oa)))},this.NL=()=>{this.DNt=!0,this.uX=!1,this.SBt(Pe.playing(this.oa))},this.PBt=()=>{this.DNt&&!this.uX&&(this.uX=!0,this.SBt(Pe.seeking(this.oa,"latencyRecovery")))},this.IBt=()=>{this.DNt&&!this.uX&&(this.uX=!0,this.SBt(Pe.seeking(this.oa,"goLive")))},this.DL=()=>{this.oa.xP||this.SBt(Pe.rebuffering(this.oa,"visible"===h.visibilityState?void 0:"invisible"))},this.xBt=()=>{this.SBt(Pe.paused(this.oa))},this.NBt=t=>{const i=zd.Dh(t.url),e=function(t){const{pathname:i}=t;if(Rc(i,"manifest.json"))return jn.MANIFEST;if(nl(i,"/video/"))return jn.VIDEO;if(nl(i,"/audio/"))return jn.AUDIO;return jn.OTHER}(i);if(e===jn.OTHER)return;this.gBt.incrementSequenceNumber();let s=Y({},t.headers,{"CMCD-Request":this.vBt(),"CMCD-Object":this.pBt(e),"CMCD-Status":this.mBt(),"CMCD-Session":this.wBt()});e===jn.VIDEO&&!Rc(i.pathname,".hspi")&&this._Bt&&(this.SBt(this._Bt.fBt()),s=Y({},s,this.bBt())),t.redirect(Y({},t,{headers:s}))},this.EBt=()=>{Wr(this.TBt())},this.oa=t,this.yBt=i,this.gBt=e;const n=i.endpoints[0],r=(null==n?void 0:n.hespSrc)||(null==n?void 0:n.hlsSrc)||"";this.kBt=zd.Dh("bye",r).href,s.addEventListener("beforeunload",this.EBt),this.oa.wn(Jr.PM,this.NL),this.oa.wn(Jr.xM,this.DL),this.oa.wn(d.jw,this.xBt),this.oa.$x.wn("latencyrecoveryseek",this.PBt),this.oa.$x.wn("golive",this.IBt),this.oa.lX.bY(this.NBt),this.oa.rt.wn(N.rI,this.KW),this.oa.ht.wn(N.rI,this.KW),this.oa.pnt.addEventListener("intenttofallback",this.CBt),this.oa.pnt.addEventListener("distributionloadstart",this.RBt),this.oa.pnt.addEventListener("distributionoffline",this.DBt),this._Bt=Pe.starting(this.oa,"loadchannel"),this.BBt=zd.fm(()=>{var t;null==(t=this._Bt)||t.rBt()},1e3)}};function xK(t){return w.keys(t).map(i=>function(t,i){switch(typeof i){case"boolean":return i?t:t+"=false";case"number":return t+"="+i;case"string":return t+'="'+i+'"';default:return}}(i,t[i])).filter(Boolean).sort().join(",")}function PK(t){if(t)return t.type===Hi._C||t.type===Hi.gC?"h":t.type===Hi.wC?"e":void 0}var IK=class extends as{constructor(t,i,e){super(t,"Could not load channel with id "+i+": "+e),this.channelId=void 0,this.reason=void 0,this.channelId=i,this.reason=e}},CK=class extends IK{constructor(t){super(me.THEO_LIVE_CHANNEL_NOT_FOUND,t,"The channel could not be found")}},RK=class extends IK{constructor(t){super(me.THEO_LIVE_CHANNEL_NOT_FOUND,t,"This account has been locked")}},DK=class extends IK{constructor(t){super(me.THEO_LIVE_CHANNEL_NOT_FOUND,t,"The channel got deleted")}},NK=class{Jgt(t){const i=this.MBt.get(t);if(i)return i;const e=new BK(t,this.aV,this.LBt);return this.MBt.set(t,e),e}constructor(t,i){this.aV=void 0,this.LBt=void 0,this.MBt=void 0,this.aV=t,this.LBt=i,this.MBt=new Map}},BK=class{get OBt(){return zo()-this.FBt>36e5}er(){this.UBt=!1,this.FBt=zo(),this.VBt=this.KSt(),this.VBt.catch(()=>this.UBt=!0)}async KSt(){for(const i of this.LBt.discoveryUrls){const e=await this.HBt(this.aS,i,this.WBt);if(e){if(yK(e)){const{mode:s,status:n,fallback:r,metadata:h}=e;if("locked"===s)throw new RK(this.aS);if("deleted"===n)throw new DK(this.aS);var t;return wK({id:this.aS,name:h.name,mode:s,status:n,source:pK(e),fallback:r?await this.qBt(r,i,this.WBt):void 0,insights:null==h?void 0:h.insights,enhancedLogging:null==h?void 0:h.enhancedLogging,customization:null==h?void 0:h.customization,sseEndpoint:e.sseEndpoint},null==(t=this.LBt.fallbackEnabled)||t)}return e}}throw new CK(this.aS)}async qBt(t,i,e){if("hls"===t.type)return{hlsSrc:t.src,type:"hls"};const s=await this.HBt(t.src,i,e);return s?pK(s):void 0}async HBt(t,i,e){try{const s=zd.Dh(t,i);s.searchParams.set("osName",function(){const t=zd.Zs.ap;if("ios"===t||"macos"===t)return"apple";return t}()),s.searchParams.set("deviceType",zd.Zs.cp),s.searchParams.set("sdkType","web");const n=await this.aV.vk({Yu:s.toString(),_k:e});return await n.VT()}catch(t){return}}get zBt(){return(this.UBt||this.OBt)&&this.er(),this.VBt}constructor(t,i,e){var s;this.aS=void 0,this.aV=void 0,this.LBt=void 0,this.FBt=void 0,this.VBt=void 0,this.UBt=void 0,this.WBt=void 0,this.aS=t,this.aV=i,this.LBt=e,this.WBt=new cc,this.LBt.discoveryHeader&&this.WBt.append("x-theolive-discovery",this.LBt.discoveryHeader),this.WBt.set("CMCD-Session",xK({sid:this.LBt.sessionId,st:"l",v:2,"theo-eid":null==(s=this.LBt.externalSessionId)?void 0:s.substring(0,128),"theo-v":"10.3.0","theo-t":"web","theo-u":this.LBt.userId})),this.er()}};r();var MK=class extends gp{constructor(t){super("distributionloadstart"),this.distributionId=void 0,this.distributionId=t}},LK=class extends gp{constructor(t){super("distributionoffline"),this.distributionId=void 0,this.distributionId=t}},OK=class extends gp{constructor(t){super("endpointloaded"),this.endpoint=void 0,this.endpoint=t}},FK=class extends gp{constructor(t){super("intenttofallback"),this.reason=void 0,this.reason=t}},UK=class extends gp{constructor(){super("enterbadnetworkmode")}},VK=class extends gp{constructor(){super("exitbadnetworkmode")}},HK=class extends Ne{get Ca(){return this.hu||(this.hu=function(t){return{addEventListener(i,e){t.wn(i,e)},removeEventListener(i,e){t.mn(i,e)},get badNetworkMode(){return t.GBt},set badNetworkMode(i){t.GBt=i},get authToken(){return t.XBt},set authToken(i){t.XBt=i},preloadPublications:async i=>(await t.jBt(i)).map(t=>({name:t.name}))}}(this)),this.hu}get GBt(){return this.oa.GBt}set GBt(t){this.oa.GBt=t}get XBt(){return this.oa.XBt}set XBt(t){this.oa.XBt=t}jBt(t){return this.oa.jBt(t)}constructor(t){super(),this.oa=void 0,this.hu=void 0,this.oa=t}};var WK=["https://discovery.theo.live/channels/"],qK=8e5,zK=class extends VF{QBt(){this.oa.$x.wn("latencyrecoveryseek",this.PBt),this.oa.rt.wn(N.rI,this.KW)}KBt(){this.oa.$x.mn("latencyrecoveryseek",this.PBt),this.oa.rt.mn(N.rI,this.KW)}eI(t){if(!this.fNt||this.nq||this.Wz)return super.eI(t);if(t.type===Jr.PM)return void 0!==this.YBt?(zd.Lg(this.YBt),this.YBt=void 0,this.DNt||this.So(new mo(this.Gx()))):this.So(new mo(this.Gx())),this.JBt=0,this.DNt=!0,!0;if(t.type===Jr.xM)return this.YBt||(this.YBt=zd.Og(()=>{this.So(new SP(this.Gx())),this.YBt=void 0},100)),!0;if(t.type===hc.ma){var i;this.JBt++;const e=(null==(i=this.mz)?void 0:i.src)&&KK(this.mz.src),s=this.JBt>5;return e||s?(this.dispatchErrorEvent(t.errorObject),!0):(this.ZBt.So(new FK(t.errorObject)),Wr(this.$Bt()),!0)}if(t.type===d.uo){if(this.tMt=zd.Mg(),void 0===this.iMt&&void 0!==this.oa.bt&&(this.iMt=zd.fm(()=>{var t;zd.Mg()-(null!=(t=this.tMt)?t:0)>15e3&&(this.ZBt.So(new FK(new as(me.THEO_LIVE_UNKNOWN_ERROR,"Indefinite stall detected"))),Wr(this.$Bt()))},1e3)),this.oa.bt&&(this.eMt=!1),this.eMt)return!0}else if(t.type===d.jw){if(void 0!==this.iMt&&(zd.vm(this.iMt),this.iMt=void 0),this.oa.bt&&(this.eMt=!0),!this.eMt)return!0}else t.type===d.py?this.tMt=zd.Mg():t.type===Jr.EM?this.sMt&&(!function(t,i){if(t.rt.V>0){const s=t.rt.MI(0);var e;if(s.Rt=i.enabledVideo,s.Rt)s.tC=null==(e=i.targetVideoQualities)?void 0:e.map(t=>hh(s.$I.NI,i=>i.IW===t)).filter(it)}const s=hh(t.ht.NI,t=>t.bs===i.enabledAudioLanguage);for(const i of t.ht.NI)i.Rt=i===s;for(const e of t.nt.NI){var n;const t=null!=(n=i.textTrackModes.get(e.o))?n:xh.Nh;e.Qk!==t&&(e.Qk=t)}}(this.oa,this.sMt),this.sMt=void 0):t.type===d.sy&&(this.ZBt.So(new FK(new as(me.THEO_LIVE_UNKNOWN_ERROR,"manifest not found"))),Wr(this.$Bt()));return super.eI(t)}mnt(){return this.ZBt.Ca}Yx(){return this.fNt?this.Wz:super.Yx()}Zx(){return this.fNt?this.nq:super.Zx()}get GBt(){return this.nMt}set GBt(t){this.fNt&&(t?this.rMt():this.hMt())}rMt(){if(this.nMt)return;if(this.nMt=!0,this.ZBt.So(new UK),0===this.oa.rt.V)return;const t=this.rt.MI(0),i=cf(t.$I.NI,t=>t.IW);var e;(null!=(e=i.wyt)?e:i.IW)t.tC=t.$I.NI.slice())):this.hMt()}hMt(){if(!this.nMt)return;if(this.nMt=!1,this.ZBt.So(new VK),0===this.oa.rt.V)return;const t=this.oa.rt.MI(0);var i;const e=GK(null!=(i=t.tC)?i:t.$I.NI);t.tC=e.length>0?e:GK(t.$I.NI)}get XBt(){return this.oMt}set XBt(t){this.oMt=t,this.oa.lX.TY(this.aMt),this.oMt&&this.oa.lX.bY(this.aMt)}jBt(t){return Promise.all(t.map(async t=>{const i=this.uMt.Jgt(t);return await ua(i.zBt,this.hT.Yg)}))}nu(){var t;return null!=(t=this.Ac)?t:super.nu()}async Ta(t,i){var e;this.fNt=!1;for(const s of null!=(e=null==t?void 0:t.sources)?e:[])if(xk(s)&&s.type===Hi.bC&&s.src){if(this.fNt=!0,this.Ac=t,this.mz=s,this.ZBt.So(new MK(s.src)),this.QBt(),KK(s.src)){const e=Y({},t,{sources:[Y({},s,{type:Hi.wC,useManagedMediaSource:!0})]});return void await super.Ta(e,i)}this.cMt=this.uMt.Jgt(s.src);try{const t=await this.cMt.zBt;return this.yBt=t,void(this.dMt.analyticsEnabled&&(this.lMt=new EK(this,t,this.gBt)))}catch(t){throw sa(t),this.fMt(),t}}return await super.Ta(t,i)}fP(){return this.fNt?this.eMt:super.fP()}QP(){this.d9||(this.d9=!0,this.vMt(!1)),this.eMt=!1,super.QP()}jP(){this.eMt=!0,super.jP()}async $Bt(){void 0!==this.oa.bt&&(null!=this.sMt||(this.sMt=function(t){var i,e;const s=hh(t.rt.NI,t=>t.Rt),n=null==s||null==(i=s.tC)?void 0:i.map(t=>t.IW),r=null==(e=hh(t.ht.NI,t=>t.Rt))?void 0:e.bs,h=Ba();return t.nt.NI.forEach(t=>h.set(t.o,t.Qk)),{enabledVideo:Boolean(s),targetVideoQualities:n,enabledAudioLanguage:r,textTrackModes:h}}(this.oa)));await this.oa.KP().catch(gs),this.vMt(!0)}vMt(t){if(!this.cMt)return;if(this._Mt)return;this.fMt();const i=()=>{this._Mt=void 0};this._Mt=this.gMt(this.cMt,t).then(i).catch(i)}async gMt(t,i){i&&t.er();const e=await t.zBt;this.yBt=e;const s=await this.selectEndpoint(e,this.pMt);if(this.pMt=s,s){const t=this.convertEndpointToSource(e,s);try{await this.oa.Ta(t,(new Zc).Yg)}catch(t){return this.dispatchErrorEvent(t),void this.fMt()}this.ZBt.So(new OK(s)),this.eMt||this.oa.QP()}else this.ZBt.So(new LK(e.id)),this.mMt=zd.Og(()=>this.vMt(!0),15e3)}convertEndpointToSource(t,i){var e,s;const n={sources:[this.getHespSource(t,i),this.getMillicastSource(i),this.getHlsSource(i)].filter(it),ads:this.DNt?[]:null==(e=this.Ac)?void 0:e.ads,blockContentIfAdError:null==(s=this.Ac)?void 0:s.blockContentIfAdError,streamType:"live"};if(i.adSrc||i.daiAssetKey){var r;const t=null!=(r=n.ads)?r:[],e=t.filter(t=>"theoads"===t.integration);e.length>0?e.forEach(t=>{const e=t;var s,n;e.sseEndpoint=null!=(s=i.adSrc)?s:e.sseEndpoint,e.daiAssetKey=null!=(n=i.daiAssetKey)?n:e.daiAssetKey}):t.push({integration:"theoads",sseEndpoint:i.adSrc,daiAssetKey:i.daiAssetKey}),n.ads=t}i.dvrWindow&&(n.dvr=Y({},n.dvr,{windowLength:i.dvrWindow}));const h=ra(n);return h.sources[0].bypassLicense=!0,h}getHespSource(t,i){var e,s;if(i.hespSrc)return{type:Hi.wC,src:i.hespSrc,contentProtection:i.contentProtection?mK(i.contentProtection):void 0,useManagedMediaSource:!0,latencyConfiguration:null!=(s=null==(e=this.mz)?void 0:e.latencyConfiguration)?s:XK(t.targetLatency),hesp:{maxMobileBitrate:t.maxMobileBitrate}}}getHlsSource(t){if(t.hlsSrc)return{type:Hi.gC,src:t.hlsSrc,contentProtection:t.contentProtection?mK(t.contentProtection):void 0}}getMillicastSource(t){if(t.millicastSrc)return{type:Hi.yC,src:t.millicastSrc.name,streamAccountId:t.millicastSrc.accountId,subscriberToken:t.millicastSrc.subscriberToken}}dispatchErrorEvent(t){const i=t instanceof as?t:new as(me.THEO_LIVE_UNKNOWN_ERROR,t.message,t);this.Wz=ar(i),this.nq=i,this.fMt(),this.So(new el(i))}fMt(){void 0!==this.YBt&&(zd.Lg(this.YBt),this.YBt=void 0),void 0!==this.mMt&&(zd.Lg(this.mMt),this.mMt=void 0),void 0!==this.iMt&&(zd.vm(this.iMt),this.iMt=void 0)}KP(){var t;return this.hT.Zg(),this.hT=new Zc,this.KBt(),this.fMt(),this.tMt=void 0,this.fNt=!1,this.d9=!1,this.DNt=!1,null==(t=this.lMt)||t.destroy(),this.lMt=void 0,this.Ac=void 0,this.mz=void 0,this.cMt=void 0,this.yBt=void 0,this.pMt=void 0,this.nq=void 0,this.Wz=void 0,this.JBt=0,this.wMt=[],this.eMt=!0,this.sMt=void 0,this.nMt&&this.hMt(),super.KP()}async kn(t){var i;this.hT.Zg(),this.oa.lX.TY(this.aMt),void 0!==this.YBt&&(zd.Lg(this.YBt),this.YBt=void 0),this.Vo(),this.KBt(),null==(i=this.lMt)||i.destroy(),this.oa.$x.mn("latencyrecoveryseek",this.PBt),await super.kn(t)}async selectEndpoint(t,i){let e=!1;const s=t.endpoints.slice().filter(t=>!i||!function(t,i){return t.hespSrc===i.hespSrc&&t.hlsSrc===i.hlsSrc&&t.adSrc===i.adSrc}(t,i)),n=Cc(s.map(t=>t.priority)).sort();for(const t of n){const i=s.filter(i=>i.priority===t);for(;i.length>0;){const t=QK(i),s=await jK(t,this.oa.Dx);if("online"===s)return t;"invalid-security"===s&&(e=!0),_e(i,t)}}if(i){const t=await jK(i,this.oa.Dx);if("online"===t)return i;"invalid-security"===t&&(e=!0)}if(e){const t=new as(me.MEDIA_LOAD_ERROR,"Trying to play a stream without the correct authorization.");throw this.dispatchErrorEvent(t),t}}constructor(t,i){var e;super(t,i),this.ZBt=void 0,this.gBt=void 0,this.uMt=void 0,this.dMt=void 0,this.lMt=void 0,this.Ac=void 0,this.mz=void 0,this.cMt=void 0,this.yBt=void 0,this.pMt=void 0,this.fNt=!1,this.Wz=void 0,this.nq=void 0,this.hT=new Zc,this.YBt=void 0,this.DNt=!1,this.d9=!1,this._Mt=void 0,this.mMt=void 0,this.iMt=void 0,this.tMt=void 0,this.wMt=[],this.nMt=!1,this.oMt=void 0,this.eMt=!0,this.JBt=0,this.sMt=void 0,this.KW=t=>{var i;const e=t.Ht,s=null==(i=this.yBt)?void 0:i.maxMobileBitrate;if(void 0!==s&&zd.Zs.Ks){e.$I.NI.filter(t=>t.IW>s).forEach(t=>e.$I.pS(t))}var n;e.wn(Te.II,this.ih);const r=GK(null!=(n=e.tC)?n:e.$I.NI);e.tC=r.length>0?r:GK(e.$I.NI)},this.ih=t=>{const i=t.qot;var e;(!i||(null!=(e=i.wyt)?e:i.IW)>=qK)&&this.hMt()},this.PBt=()=>{this.rMt(),this.wMt.push(zd.Mg()),this.wMt=this.wMt.filter(t=>zd.Mg()-t<=3e5),this.wMt.length>=3&&(this.wMt=[],this.ZBt.So(new FK(new as(me.THEO_LIVE_UNKNOWN_ERROR,"Unstable playback detected."))),Wr(this.$Bt()))},this.aMt=t=>{this.fNt&&this.oMt&&("manifest"!==t.type&&"segment"!==t.type||(t.headers.Authorization="Bearer "+this.oMt,t.redirect(t)))},this.ZBt=new HK(this);const s=t.Cd.theoLive;var n,r,h;this.dMt={sessionId:null!=(n=null==s?void 0:s.sessionId)?n:un(),userId:null!=(r=null==s?void 0:s.userId)?r:gK(),externalSessionId:null==s?void 0:s.externalSessionId,analyticsEnabled:!1!==(null==s?void 0:s.analyticsEnabled),fallbackEnabled:!1!==(null==s?void 0:s.fallbackEnabled),discoveryUrls:[null==s?void 0:s.discoveryUrl,...null!=(h=null==s?void 0:s.discoveryUrls)?h:[],...WK].filter(it).map(t=>t.lastIndexOf("/")===t.length-1?t:t+"/")},this.gBt=new _K(null==(e=this.dMt)?void 0:e.externalSessionId),this.uMt=new NK(t.Dx,this.dMt),this.oa.$x.wn("latencyrecoveryseek",this.PBt)}};function GK(t){return t.filter(t=>{var i;return(null!=(i=t.wyt)?i:t.IW)>=qK})}function XK(t){return void 0===t?Y({},Aj(),{forceSeekOffset:20}):{minimumOffset:t-ek,targetOffset:t,maximumOffset:t+ek,forceSeekOffset:20,minimumPlaybackRate:ik,maximumPlaybackRate:ih}}async function jK(t,i){try{const e=t.hespSrc||t.hlsSrc,s=await i.vk({Yu:e,Km:q.bk,Wk:3e3});if(s.dk>=200&&s.dk<300)return"online"}catch(t){if(t instanceof ir&&403===t.uE.dk)return"invalid-security"}return"offline"}function QK(t){const i=t.reduce((t,i)=>t+i.weight,0);if(0===i){return t[_.floor(_.random()*t.length)]}const e=_.random()*i;let s=0;for(const i of t)if(s+=i.weight,e<=s)return i;return t[t.length-1]}function KK(t){try{return Rc(zd.Dh(t).pathname,"manifest.json")}catch(t){return!1}}Ma(t=>new zK(t),da.bC),r(),r();function YK(t,i,e){const s=null==e?void 0:e.streamType;if(S(t)){if(s)return s;if(null==e?void 0:e.dvr)return"dvr";switch(hR(e)){case Hi.bC:case Hi.yC:case Hi.wC:case Hi.mC:return"live"}return}if(t===1/0){if("live"===s||"dvr"===s)return s;if(i&&i.length>0){if(i.end(i.length-1)-i.start(0)>60)return"dvr"}return"live"}return"vod"}var JK=class extends VF{Ta(t,i){if(this.Ac=t,it(null==t?void 0:t.dvr)&&t.dvr.windowLength>=60&&t.sources.length>=2){const i=hh(t.sources,t=>Ms(t)||Xo(t)),e=hh(t.sources,t=>ei(t)&&(gk(t.type)||tu(t.type)));it(i)&&it(e)&&(this.Yo=1,this.yMt=this.bMt(t,i),this.AMt=this.bMt(t,e),this.SMt=t.dvr.windowLength)}return super.Ta(t,i)}nu(){return this.Ac}async KP(){var t;null==(t=this.T9)||t.Zg(),this.T9=void 0,void 0!==this.k9&&(await this.k9.catch(gs),this.k9=void 0),this.Ac=void 0,this.Yo=0,this.yMt=void 0,this.AMt=void 0,this.SMt=void 0,await super.KP()}EP(){const t=super.EP();if(!this.oL||this.GX.xJ)return t;let i;if(0===t.length||1===this.Yo){const t=Date.now()/1e3,e=this.SMt;i=new Uo([t-e,t])}else i=Uo.jn(t).Ly(this.uAt());return i._s()}Xx(t,i){var e;if(!this.oL)return super.Xx(t,i);null==(e=this.T9)||e.Zg(),this.T9=new Zc,this.k9=Cu(this.E9(t,this.k9,this.T9.Yg),this.T9),this.k9.catch(gs)}eI(t){return this.oL?t.type===d.py?(this.So(new B(this.Gx(),this.Hx())),!0):t.type===d.Zw?(this.So(new Yr(this.Gx())),!0):super.eI(t):super.eI(t)}async E9(t,i,e){if(void 0!==i&&await i.catch(gs),fr(e),t!==1/0){let i=!1;if(2!==this.Yo&&(this.So(new ji(t)),i=!0,await this.TMt(this.AMt,e)),S(this.Nd())){i||this.So(new ji(t));do{await this.ww(d.Cw,e)}while(S(this.Nd()))}const s=new Date(1e3*t);super.Wx(s)}else 1!==this.Yo?(this.So(new ji(t)),await this.kMt(this.yMt,e)):super.Xx(t)}Gx(){var t,i;return this.oL&&this.EP().length?this.oa.bt?(null!=(i=null==(t=this.Vx)?void 0:t.getTime())?i:zo())/1e3:this.EP().end(0):super.Gx()}mP(){const t=super.mP();if(!this.oL||!this.bt||!t.length)return t;let i=Uo.jn(t);return i=i.Ly(this.uAt()),i._s()}Ux(){const t=super.Ux();if(!this.oL||!this.bt||!t.length)return t;let i=Uo.jn(t);return i=i.Ly(this.uAt()),i._s()}Hx(){const t=super.Hx();return t&&Qf(t)?t:new Date}Wx(t){return this.oL?t&&Qf(t)?this.Xx(t.getTime()/1e3):void 0:super.Wx(t)}get oL(){return 0!==this.Yo}get EMt(){var t,i;return(null!=(i=null==(t=this.Vx)?void 0:t.getTime())?i:zo())/1e3}uAt(){if(!this.oL)return 0;const t=super.Gx();return this.EMt-t}async kMt(t,i){await super.Ta(t,i),this.Yo=1,this.QP()}async TMt(t,i){await super.Ta(t,i),this.Yo=2,this.QP()}bMt(t,i){const e=i.type===Hi.yC?lR(i):dR(i);e.bypassLicense=!0;return Y({},t,{sources:[e]})}constructor(t){super(t),this.Ac=void 0,this.yMt=void 0,this.AMt=void 0,this.SMt=void 0,this.Yo=0,this.k9=void 0,this.T9=void 0}};Ma(t=>new JK(t),da.Tnt),r(),r(),r();var ZK=gd(yd());r(),r(),r();var $K=class extends Ne{get nN(){return this.xMt}er(t,i){this.vA=t,this.xMt=i,this.hu&&this.So(new Va(this.hu))}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()}get o(){return this.vA.id}get JI(){return this.yO}get IW(){return this.vA.bitrate}get wyt(){}get Rrt(){return""}get Th(){return""}get Syt(){return""}get xst(){return!0}get yyt(){}JU(){throw new m("Method not implemented.")}ZU(){throw new m("Method not implemented.")}kn(){this.Vo()}constructor(t,i){super(),this.yO=hE(),this.vA=void 0,this.xMt=void 0,this.hu=void 0,this.vA=t,this.xMt=i}},tY=class extends $K{xa(){return Lq(this)}get Olt(){return 0}get Ti(){return this.vA.width}get Mi(){return this.vA.height}get byt(){return 0}constructor(t,i){super(t,i)}};r();var iY=class extends Ne{get Rt(){return!0}set Rt(t){}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=cs(this)}SO(t){this.Rt=t}get plt(){}get Lt(){return this.I5}get o(){return this.aS||"millitrack"}get JI(){return this.yO}get Th(){return""}get bs(){return""}get Qk(){return this.Rt?"enabled":"disabled"}set Qk(t){this.SO("enabled"===t)}get YI(){}get $I(){return this._O}get tC(){return this.PMt}set tC(t){if(this.PMt=t,this.Rt){const i=1===(null==t?void 0:t.length)?t[0].nN:void 0;this.IMt(i)}this.So(new qa(this._O.NI.slice(),this)),((null==t?void 0:t.length)||this._O.V)&&this.So(new DW((null==t?void 0:t[0])||this._O.MI(0)))}get ZI(){}kn(){this.Vo();for(const t of this._O.NI)t.kn();this._O.hr()}constructor(t,i){super(),this.yO=mi(),this._O=new iE,this.PMt=void 0,this.aS=void 0,this.I5=void 0,this.hu=void 0,this.aS=t,this.I5=i}},eY=class extends iY{er(t){for(const i of t.active){const e=hh(t.layers,t=>t.encodingId===i.id),s=hh(this._O.NI,t=>t.o===i.id);s?s.er(i,e):this._O.gO(new tY(i,e))}this.So(new Xh(this))}get Km(){return at.Mk}IMt(t){var i;null==(i=this.CMt)||i.RMt(t)}kn(){this.CMt=void 0,super.kn()}constructor(t,i,e){super(t,i),this.CMt=void 0,this.CMt=e}};r();var sY=class{er(t){this.DMt=t}get IW(){var t,i,e,s,n;var r;return(null!=(n=null==(i=this.DMt)||null==(t=i.video.inbounds)?void 0:t.reduce((t,i)=>t+i.bitrateBitsPerSecond,0))?n:0)+(null!=(r=null==(s=this.DMt)||null==(e=s.audio.inbounds)?void 0:e.reduce((t,i)=>t+i.bitrateBitsPerSecond,0))?r:0)}get RW(){var t,i;return null!=(i=null==(t=this.DMt)?void 0:t.currentRoundTripTime)?i:0}DW(t){}constructor(){this.DMt=void 0}};r(),r();var nY=class extends $K{xa(){return Oq(this)}get mwt(){return this.NMt}constructor(t,i){super(t,i),this.NMt=0}},rY=class extends iY{er(t){for(const i of t.active){const e=hh(t.layers,t=>t.encodingId===i.id),s=hh(this._O.NI,t=>t.o===i.id);s?s.er(i,e):this._O.gO(new nY(i,e))}this.So(new Xh(this))}get Km(){return at.Bk}IMt(t){var i;null==(i=this.CMt)||i.BMt(t)}kn(){this.CMt=void 0,super.kn()}constructor(t,i,e){super(t,i),this.CMt=void 0,this.CMt=e}};r();var hY=class extends Oh{xa(){return function(t){return Gi(U(t),{get mid(){return t.LU.mid},get uuid(){return t.LU.uuid},get timecode(){return t.LU.timecode},get unregistered(){return t.LU.unregistered}})}(this)}constructor(t,i){super(t,t,void 0,!1),this.LU=void 0,this.LU=i}};r(),r();var oY=gd(yd()),aY=class extends Ne{get Ca(){return this.hu||(this.hu=Xk(this)),this.hu}ZL(t){return oY.Logger.diagnose(t)}wn(t,i){this.MMt.wn(t,i)}mn(t,i){this.MMt.mn(t,i)}constructor(t){super(),this.hu=void 0,this.MMt=void 0,this.MMt=t}},uY=[d.uo,d.jw,Jr.PM,d.Qw,d.Ww,d.$w,d.Zw,d.Nw,d.Kw,d.wy,d.Cw,d.Jw,d.xw,d.Ew,d.Lw,d.Bw],cY=["active","inactive","stopped","vad","layers","migrate","viewercount"],dY=1e3,lY=class extends gp{get stats(){return this.DMt}constructor(t){super("stats"),this.DMt=void 0,this.DMt=t}},fY=class extends Ne{RMt(t){var i;null==(i=this.Lf)||i.select(t).catch(this.Lmt)}BMt(t){var i;null==(i=this.Lf)||i.select(t).catch(this.Lmt)}get WP(){return!1}zP(){return this.PL.zP()}get ht(){return this.tO}get Fx(){return this.PL.Fx._s()}get Vx(){var t,i;return null!=(i=null!=(t=this.PL.Vx)?t:this.LMt)?i:new Date}set Vx(t){}get bt(){return this.Ac}get zx(){return this.PL.zx}set zx(t){this.Xx(t)}Xx(t,i){}get ct(){return this.PL.ct}get Qx(){return this.PL.Qx}get lt(){return this.nq}get Jx(){return this.rq}get $x(){}get iP(){return this.OMt}get sP(){return this.PL.sP}get rP(){var t,i;const e=this.FMt,s=null==e||null==(t=e.video.inbounds)?void 0:t[0],n=null==e||null==(i=e.audio.inbounds)?void 0:i[0];var r,h,o,a;return{aO:this.Mz.CY.IW,rO:null!=(r=null==s?void 0:s.framesDropped)?r:0,hO:0,oO:null!=(h=null==s?void 0:s.framesReceived)?h:0,uO:(null!=(o=null==s?void 0:s.totalBytesReceived)?o:0)+(null!=(a=null==n?void 0:n.totalBytesReceived)?a:0),cO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}}}get oP(){return this.PL.oP}set oP(t){this.PL.oP=t}get cP(){var t,i;return null!=(i=null==(t=this.Lf)?void 0:t.isActive())&&i}get lP(){return this.PL.lP}get vP(){return 1}set vP(t){}get pP(){return this.PL.pP._s()}get wP(){return Dn.pz}set wP(t){}get AP(){return this.PL.AP}get kP(){return this.PL.kP._s()}get xP(){return this.PL.xP}get uq(){return this.PL.uq}get nt(){return this.PL.nt}get DP(){return this.PL.DP}get rt(){return this.sO}get MP(){return this.PL.MP}get OP(){return this.PL.OP}set OP(t){this.PL.OP=t}get VP(){return this.Lz}get dq(){return this.lq}get OL(){return this.Lz.OL}be(){this.PL.be()}we(){this.PL.we()}async QP(){this.LMt=void 0,this.Un(),await this.PL.QP()}jP(){this.LMt=new Date,this.PL.jP()}async hr(){var t;this.UMt(),this.Ac=void 0,this.C6=!1,this.hT.Zg(),null==(t=this.Lf)||t.stop(),this.Lf=void 0,this.Ypt&&(await this.Ypt.catch(gs),this.Ypt=void 0),this.VMt=void 0,await this.PL.hr(),this.HMt=void 0,this.WMt=0,this.PL.Eq();for(const t of this.sO.NI)t.kn();this.tO.hr(),this.sO.hr()}async kn(){this.UMt(),this.Vo(),await this.hr(),this.tO.kn(),this.sO.kn(),this.xq.kn(),this.Cq.zg(),this.PL.mn(uY,this.Rs),this.PL.mn(hc.ma,this.Ts),this.PL.mn(d.py,this.bd),await this.Bz.Dq(this.PL)}async Ta(t,i,e){var s;fr(e),this.OEt(),this.UMt();const n=t;this.Ac=n,this.hT=new Zc,n.apiUrl&&ZK.Director.setEndpoint(n.apiUrl);const r=this.qMt(this.Mz.WY.type);this.Lf=new ZK.View(void 0,()=>ZK.Director.getSubscriber({streamName:n.src,streamAccountId:n.streamAccountId,subscriberToken:n.subscriberToken}),void 0,!0),this.zMt=Y({},n.connectOptions,{events:cY,abrConfiguration:{strategy:r,metadata:{bitrate:null==(s=this.Mz.WY.metadata)?void 0:s.bitrate}}}),this.GMt()}qMt(t){switch(t){case xa.PERFORMANCE:return"performance";case xa.BANDWIDTH:return"bandwidth";case xa.QUALITY:return"quality";default:return}}IP(t,i,e,s){return Promise.resolve()}CP(){return Promise.resolve()}Un(){if(void 0!==this.Ypt)return;const t=this.Lf;void 0!==t&&(this.Ypt=this.vE(t,this.zMt,this.hT.Yg).catch(this.Lmt))}async vE(t,i,e){fr(e);try{var s,n;await ua(t.connect(i),e),t.webRTCPeer.initStats({autoInitStats:!0,statsIntervalMs:_.min(null!=(n=null==(s=this.Ac)?void 0:s.statsIntervalMs)?n:dY,dY)})}catch(i){sa(i),function(t){return Mc(t)&&"FetchError"===t.name}(i)&&400===i.status&&(zd.um("[THEOplayer] Millicast connect error, reconnecting.",i),await ua(t.reconnect(),e)),this.Qq(new as(me.NETWORK_ERROR,i.message,i))}}async XMt(t,i){fr(i);try{this.PL.G7(),this.VMt=t,await this.PL.hr(),await this.PL.Un({Km:O.AV,rC:"",YZ:t,GT:Hi.yC,fq:[]})}finally{this.PL.X7()}}GMt(){var t;const i=this.Lf;i.on("track",t=>this.jMt(t)),i.on("broadcastEvent",t=>this.QMt(t)),i.webRTCPeer.on("stats",t=>{this.FMt=t,this.lq.er(t),this.KMt()}),(null==(t=this.zMt)?void 0:t.metadata)&&i.on("metadata",t=>this.YMt(t))}KMt(){var t,i;void 0===this.JMt&&(this.So(new lY(this.FMt)),this.JMt=zd.fm(()=>{this.So(new lY(this.FMt))},null!=(i=null==(t=this.Ac)?void 0:t.statsIntervalMs)?i:dY))}UMt(){void 0!==this.JMt&&(zd.vm(this.JMt),this.JMt=void 0)}jMt(t){const i=this.tO.V>0,e=this.sO.V>0,s=i&&!e,n=t.streams[0];if(s){const t=n.getVideoTracks().slice();for(const i of t)n.removeTrack(i)}n!==this.VMt&&this.XMt(n,this.hT.Yg).catch(this.Lmt)}QMt(t){switch(t.name){case"active":{this.So(new TG);const i=t.data,e=this.zMt;for(const t of i.tracks)if(t.media!==at.Mk||e.disableVideo||this.sO.NI.some(i=>i.o===t.trackId)){if(t.media===at.Bk&&!e.disableAudio&&!this.tO.NI.some(i=>i.o===t.trackId)){const i=this.tO.V>0?Pn.uDt:Pn.cDt;this.tO.tt(new rY(t.trackId,i,this))}}else{const i=this.sO.V>0?Ja.uDt:Ja.cDt;this.sO.tt(new eY(t.trackId,i,this))}break}case"inactive":this.So(new lh),this.sO.hr(),this.tO.hr();break;case"stopped":this.So(new lh);break;case"viewercount":default:break;case"layers":{const i=t.data;if(0===this.sO.V){const t=new eY("",Ja.cDt,this);t.er(i.medias[0]),this.sO.tt(t)}else{const t=hh(this.sO.NI,t=>t.Lt===Ja.cDt);null==t||t.er(i.medias[0])}break}}}YMt(t){let i=this.HMt;void 0===i&&(i=this.PL.sI(us.zU,void 0,void 0,void 0,void 0,nh.MILLICAST),i.Qk=xh.iC,this.HMt=i);const e=this.zx,s=_.max(0,e-10);this.WMt{this.Qq($k(t.lt))},this.bd=t=>{this.C6||(this.C6=!0,this.So(new Yr(t.currentTime))),this.So(new B(t.currentTime,this.Vx))},this.Lmt=t=>{Ce(t)||this.Qq(new as(me.MEDIA_DECODE_ERROR,t.message,t))},this.PL=this.Bz.Yq(at.Mk),this.Cq=new Gt(this,this.PL),this.xq=new _s(this.Cq,!0),this.PL.wn(uY,this.Rs),this.PL.wn(hc.ma,this.Ts),this.PL.wn(d.py,this.bd),this.xq.wn(Ii,this.Rs),this.OMt=new aY(this)}};oe(new class{get tz(){return $.yC}DC(t,i,e,s,n,r,h,o){return new fY(i,n,r)}Jq(t,i){return t.type===Hi.yC}async Zq(t){let i=await VT(t);return i&&(i=Boolean(t.widevine||t.fairplay)),i&&!1}$q(){return!1}}),r(),r(),r(),r();var vY=function(t){return t.ZMt="currentbufferingrenditionchange",t.$Mt="tLt",t.iLt="eLt",t}({});r(),r();var _Y=class{constructor(t,i){var e,s;this.JI=void 0,this.sLt=void 0,this.Km=void 0,this.nLt=void 0,this.rLt=void 0,this.hLt=void 0,this.l=void 0,this.bs=void 0,this.oLt=void 0,this.aLt=void 0,this.uLt=void 0,this.cLt=void 0,this.Rrt=void 0,this.JI=hE(),this.sLt=i,this.Km=t.Km,this.nLt=t.nLt,this.rLt=t.rLt,this.hLt=t.hLt,this.l=t.l,this.bs=t.bs,this.oLt=t.oLt,this.aLt=t.aLt,this.uLt=void 0===t.Syt,this.cLt=null!=(s=null==(e=t.cLt)?void 0:e.split(","))?s:[]}};function gY(t,i){return t.Km===i.Km&&(t.l===i.l||!(!t.nLt||!i.nLt))}function pY(t,i){return void 0!==t&&void 0!==i&&mY(t,i)}function mY(t,i){return t.sLt===i.sLt}function wY(t,i){return mY(t,i)&&t.oLt===i.oLt}function yY(t,i){for(const e of t)if(wY(e,i))return!0;return!1}var bY=class extends Ne{get ZI(){return this.dLt}get Rt(){const t=this.lLt();if(!t)return!1;for(const i of this.$I.NI)if(i.fLt===t)return!0;return!1}set Rt(t){if(t!==this.Rt)if(t){var i;let t=null==(i=this.$I.MI(0))?void 0:i.fLt;const e=this._Lt.vLt;for(const i of this.$I.NI)if(i.gLt===e){t=i.fLt;break}this.pLt(t)}else this.pLt(void 0)}get YI(){if(!this.Rt)return;const t=this._Lt.mLt;for(const i of this.$I.NI)if(yY(t,i.fLt))return i}get Ca(){return this.hu||(this.hu=cs(this)),this.hu}get o(){return this.yO.toString()}get JI(){return this.yO}get Th(){return this.bO}set Th(t){t!==this.bO&&(this.bO=t,this.So(new Xh(this)))}get bs(){return this.$b}get Qk(){return this.Rt?"enabled":"disabled"}get tC(){return this.Ict}set tC(t){let i=[];if(t){i=t.filter(t=>{const i=this.YI?cH(this.YI):void 0;return zd.Zs.Pp(i,cH(t))}).filter(i=>this.$I.pO(t)&&i.xst)}else i=this.$I.NI.filter(t=>t.xst);if(0!==i.length){if(!(t===this.Ict||this.Ict&&wc(this.Ict,i))){if(this.Ict=t?i:void 0,this._Lt.wLt(i.map(t=>t.gLt)),1===i.length){const t=i[0].gLt,e=this.Vp===at.Mk,s=this.Mz.eJ;Wr(this._Lt.yLt(t,{bLt:!0,ALt:s&&e,SLt:s&&!e}))}this.So(new qa(i,this))}}else this.So(new uH)}SO(t){this.Rt=t}TLt(t){return hh(this.$I.NI,i=>i.fLt===t)}kn(){this.Vo(),this._Lt.mn(vY.ZMt,this.kLt),this._Lt.mn(vY.$Mt,this.ELt);for(const t of this.$I.NI)t.kn();this.$I.hr()}constructor(t,i,e,s,n){var r;super(),this.Vp=void 0,this._Lt=void 0,this.Mz=void 0,this.wh=void 0,this.$I=void 0,this.bO=void 0,this.$b=void 0,this.dLt=void 0,this.Ict=void 0,this.xLt=void 0,this.PLt=void 0,this.hu=void 0,this.yO=void 0,this.ILt=void 0,this.kLt=void 0,this.ELt=void 0,this.Vp=t,this._Lt=i,this.Mz=e,this.wh=s,this.$I=n,this.Ict=void 0,this.xLt=void 0,this.ILt=()=>this.So(new Xh(this)),this.kLt=()=>{const t=this.YI;t&&this.xLt!==t&&(this.xLt=t,this.So(new DW(t)))},this.ELt=()=>{const t=this.Rt;this.PLt!==t&&(this.PLt=t,this.wh.So(new Rh(this)),this.So(new Rh(this)))},this.xLt=this.YI,this.PLt=this.Rt;const h=n.MI(0);var o,a;this.bO=null!=(o=null==h?void 0:h.fLt.l)?o:"",this.$b=null!=(a=null==h?void 0:h.fLt.bs)?a:"",this.dLt=null==h||null==(r=h.fLt)?void 0:r.cLt.map(xY).filter(it),this.yO=mi(),this._Lt.wn(vY.ZMt,this.kLt),this._Lt.wn(vY.$Mt,this.ELt);for(let t=0;t0)||i.some(i=>i.toLowerCase()===t.toLowerCase())}OLt(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s1?i-1:0),s=1;s1?i-1:0),s=1;s1?i-1:0),s=1;s1?i-1:0),s=1;s!1}},Ho="HLSPlaylistParser",Ac="Discontinuity",PY="Buffering";r();var IY=class{get IW(){return this.eut.Fet}get RW(){return this.sCt.Fet}DW(t){if("segment"!==t.Km&&"preload-hint"!==t.Km)return;const i=[new oj(this.sCt)];return"stream"!==t.fk||!function(t){return"segment"===t.Km&&"initialization-segment"!==t.zk}(t)&&"preload-hint"!==t.Km?i.push(new aj(this.eut)):i.push(new uj(this.eut,1e3)),new hj(i)}JIt(t){this.eut=new Xs(Xs.RIt,Xs.DIt,1,t)}constructor(t){this.eut=void 0,this.sCt=void 0;const i=t.IW>0?t.IW:Xs.$at,e=t.RW>0?t.RW:wi.$at;this.eut=new Xs(Xs.RIt,Xs.DIt,1,i),this.sCt=new wi(wi.RIt,wi.DIt,e)}};r();var CY=class{$Z(t,i){const e={Km:O.SV,fq:[],q4:t.map(t=>({GT:t})),t5:i};return Promise.resolve(void 0!==this.Tst.$Z([e]))}constructor(t){this.Tst=void 0,this.Tst=t}};r(),r();var RY=(t,i,e,s,n)=>t.filter(t=>!!Ct(s,t)||1.1*t.IW<=e.IW),DY=(t,i,e,s,n)=>t.filter(t=>{if(Ct(s,t))return!0;let r=1/0;for(const i of t.VLt){var h,o;r=_.min(r,null!=(o=null!=(h=i.sLt.HLt)?h:i.sLt.WLt)?o:1/0)}r===1/0&&(r=1);const a=2*e.RW+t.IW*r/e.IW;return t.IW<=i.IW||n.qLt>a}),NY=(t,i,e,s,n)=>Xn(t,(t,i)=>i.IW-t.IW),BY=(t,i,e,s,n)=>t.every(t=>t.yyt&&!S(t.yyt))?Xn(t,(t,i)=>i.yyt-t.yyt):t,MY=(t,i,e,s,n)=>0===s.length?t:Xn(t,(t,i)=>{const e=Ct(s,t)?1:0;return(Ct(s,i)?1:0)-e}),LY=(t,i,e,s,n,r)=>t.filter(t=>!t.Rrt||!i.Rrt||!(void 0!==i.Rrt.W9&&void 0!==t.Rrt.W9&&!Tr(i.Rrt.W9,t.Rrt.W9)&&!r.zLt({GT:'video/mp4; codecs="'+t.Rrt.W9+'"'}))&&!(void 0!==i.Rrt.q9&&void 0!==t.Rrt.q9&&!Tr(i.Rrt.q9,t.Rrt.q9)&&!r.GLt({GT:'audio/mp4; codecs="'+t.Rrt.q9+'"'}))),OY=(t,i,e,s,n)=>{if(!1===n.udt)return t;if(zd.Zs.dp)return t;const r=zd.Zs.lp;var h;const o=(null!=(h=null==r?void 0:r.width)?h:n.Ti)*XV;var a;const u=(null!=(a=null==r?void 0:r.height)?a:n.Mi)*XV;for(let i=0;ifunction(t,i){const e=i.udt;if(void 0===e&&!zd.Zs.Ks)return t;if(!1===e)return t;for(let e=0;et.IW)]}return h}constructor(t){this.Mz=void 0,this.ddt=void 0,this.Mz=t,this.ddt=[LY,RY,DY,NY,OY,FY,BY,MY]}};function HY(t,i){return[t,void 0!==i?t+i-1:Gl]}function WY(t){return Boolean(t.$D)}function qY(t){return Boolean(t.bct)}r(),r(),r(),r(),r();var dl=function(t){return t[t.Bk=0]="Bk",t[t.Mk=1]="Mk",t[t.HU=2]="HU",t[t.YLt=3]="YLt",t}({}),Ah=function(t){return t[t.JLt=0]="JLt",t[t.ZLt=1]="ZLt",t}({}),ao=function(t){return t[t.pz=0]="pz",t[t.$Lt=1]="$Lt",t[t.tOt=2]="tOt",t}({}),zY=function(t){return t[t.yk=0]="yk",t[t.iOt=1]="iOt",t[t.eOt=2]="eOt",t}({});function ah(t){return t?t.iAt?t.XE+"@"+t.iAt.Tn+"-"+(null!=(i=t.iAt.V)?i:""):""+t.XE:"";var i}function GY(t,i){if(i===t)return!0;if(i.XE!==t.XE)return!1;if(!t.iAt)return!0;if(i.iAt){const e=HY(t.iAt.Tn,t.iAt.V),s=HY(i.iAt.Tn,i.iAt.V);if(e[0]<=s[0])return void 0===e[1]||void 0!==s[1]&&e[1]>=s[1]}return!1}function XY(t,i){return t===i||t.XE===i.XE&&(t.iAt&&i.iAt?t.iAt.Tn===i.iAt.Tn&&t.iAt.V===i.iAt.V:t.iAt===i.iAt)}function jY(t){const i=!!t.sOt||void 0;return{o:t.o,nOt:t.nOt,uq:t.uq,rOt:t.rOt,ct:t.ct,hOt:t.hOt,sOt:i,oOt:t.aOt,uOt:t.cOt,dOt:t.dOt,lOt:t.lOt}}function QY(t,i){var e,s,n;return{q9:null!=(e=i.q9)?e:null==t?void 0:t.q9,W9:null!=(s=i.W9)?s:null==t?void 0:t.W9,fOt:null!=(n=i.fOt)?n:null==t?void 0:t.fOt}}async function KY(t,i,e,s,n){const r=i.filter(t=>nl(t,"audio")),h=i.filter(t=>nl(t,"video")),o=[],a=e.map(t=>async function(t,i,e){if(!t.Syt)return;if(!t.vOt)return;if(t.Hk!==ao.tOt)return;const s=YY(t.vOt);if(!s)return;if(s.$m===de)return{xS:s,OW:[],FW:void 0,GH:t.Syt,UW:[]};if(s.$m===zg&&t.vOt===Yg)return{xS:s,OW:[],FW:t.Syt,GH:void 0,UW:[]};{ol.cN("HLSDrmUtils","Fetching key uri "+t.Syt+".");const n=await i.vk({Yu:t.Syt,Xk:e});let r=await n.qT();return s.$m===Fg&&(r=function(t){const i=new DataView(t);return i.byteLength>=8&&i.getUint32(4)===sq?t:nq(t)}(r)),{xS:s,OW:[r],FW:void 0,GH:void 0,UW:[]}}}(t,s,n));var u;const c=function(t,i){if(0===i.length)return t;const e=t=>{const e=i.indexOf(t.xS.$m);return e>=0?e:i.length};return Xn(t,(t,i)=>e(t)-e(i))}((await Promise.all(a)).filter(it),null!=(u=null==t?void 0:t.preferredKeySystems)?u:[]);for(const i of c){const e=UG(null!=t?t:{},i.xS),s="cbcs";o.push({xS:i.xS,OW:i.OW,FW:i.FW,GH:i.GH,Vq:[{initDataTypes:[i.xS.Jm],audioCapabilities:VG(r,s,null==e?void 0:e.audioRobustness),videoCapabilities:VG(h,s,null==e?void 0:e.videoRobustness),persistentState:null==e?void 0:e.persistentState,distinctiveIdentifier:null==e?void 0:e.distinctiveIdentifier}],UW:i.UW})}return o}function YY(t){return t===Hg?ot:t===Ug?Jg:"com.apple.streamingkeydelivery"===t?$g:t===Yg?Xc:void 0}function JY(t){if("#"!==t[0])throw new m("HLSPlaylistParser - Could not extract M3U8 tag or comment: "+t);return t.split(":",1)[0]}function ZY(t){return"#"!==t[0]?t:t.split(":",1)[0]}function $Y(t){const i=t.indexOf(":");if(-1===i||t.length{const i=t.split(":");return{keysystem:i[0],label:i[1]}}))}const f=s["VIDEO-RANGE"],v=s.AUDIO,_=s.VIDEO,g=s.SUBTITLES,p=s["CLOSED-CAPTIONS"];if(void 0===o?ol.FLt(Ho,"#EXT-X-STREAM-INF tag has no valid BANDWIDTH attribute: "+t+"."):void 0!==a&&a>o&&ol.FLt(Ho,"#EXT-X-STREAM-INF tag must have BANDWIDTH attribute higher or equal to AVERAGE-BANDWIDTH attribute: "+t+"."),r||ol.cN(Ho,"#EXT-X-STREAM-INF tag should have a CODECS attribute: "+t+"."),r&&r.W9&&void 0===h&&ol.cN(Ho,"#EXT-X-STREAM-INF tag should have a valid RESOLUTION attribute if it contains video codecs: "+t+"."),void 0===d||Ct(["TYPE-0","TYPE-1","NONE"],d)||ol.FLt(Ho,"#EXT-X-STREAM-INF tag has an invalid HDCP-LEVEL attribute: "+t+"."),void 0===f||Ct(["SDR","PQ","HLG"],f)||ol.FLt(Ho,"#EXT-X-STREAM-INF tag has an invalid VIDEO-RANGE attribute: "+t+"."),void 0===o)throw new m("HLSPlaylistParser - Could not parse #EXT-X-STREAM-INF tag: "+t+".");return{gOt:l,pOt:v,wyt:a,IW:o,mOt:p,Rrt:r,Olt:c,wOt:d,RRt:h,yyt:u,yOt:g,Syt:n,bOt:_,AOt:f}}function nJ(t,i){const e=iJ(t);if(!e.URI)throw new m("HLSPlaylistParser - Could not parse #EXT-X-I-FRAME-STREAM-INF tag: "+t+".");try{return sJ(t,i,e.URI)}catch(i){throw new m("HLSPlaylistParser - Could not parse #EXT-X-I-FRAME-STREAM-INF tag: "+t+".")}}function lc(t){const i=Number(t);return S(i)?void 0:i}function rJ(t,i){const e=iJ(t);let s,n;try{s=function(t){switch(t){case"NONE":return ao.pz;case"AES-128":return ao.$Lt;case"SAMPLE-AES":return ao.tOt;case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return t}throw new m("LLHLSPlaylistParser - Could not parse M3U8 key method: "+t+".")}(e.METHOD),n=e.URI?fJ(e.URI,i):void 0}catch(i){throw new m("HLSPlaylistParser - Could not parse #EXT-X-KEY tag: "+t+".")}const r=e.KEYFORMAT,h=e.IV,o=e.KEYFORMATVERSIONS;let a,u,c,d,l;if(s!==ao.pz){if(c=r||Yg,"SAMPLE-AES-CENC"===s||"SAMPLE-AES-CTR"===s){if(YY(c)!==ot)throw new m("HLSPlaylistParser - #EXT-X-KEY tag with METHOD="+s+" is only compatible with Widevine.");a=ao.tOt}else a=s;u=n,d=h?um(h):void 0,l=o?o.split("/").map(t=>Number(t)):[1]}else a=ao.pz,(n||r||o||h)&&ol.FLt(Ho,"#EXT-X-KEY tag with METHOD=NONE must not have additional attributes: "+t+".");return{Hk:a,Syt:u,SOt:d,vOt:c,TOt:l}}function hJ(t){const i=$Y(t);if(!i)return[void 0,""];const[e,s]=i.split(",");return[lc(e),s]}function oJ(t,i){const e=t.split("@"),s=lc(e[0]),n=e.length>1?lc(e[1]):i;if(void 0===s||void 0===n)throw new m("HLSPlaylistParser - Could not parse #EXT-X-BYTERANGE tag: "+t+".");return{Tn:n,V:s}}function aJ(t){if(void 0!==t)return oJ(t,void 0)}function uJ(t,i){return oJ($Y(t),i)}function cJ(t,i){const e=iJ(t);try{const t=fJ(e.URI,i);return{XE:t,iAt:aJ(e.BYTERANGE)}}catch(i){throw new m("HLSPlaylistParser - Could not parse #EXT-X-MAP tag: "+t+".")}}function dJ(t){const i=$Y(t);if(!i)throw new m("HLSPlaylistParser - Could not parse #EXT-X-PROGRAM-DATE-TIME tag: "+t+".");const e=new Date(i.trim());if(!Qf(e))throw new m("HLSPlaylistParser - Could not parse #EXT-X-PROGRAM-DATE-TIME tag: "+t+".");return e}function lJ(t){const i=iJ(t),e=i["START-DATE"],s=i["END-DATE"],n=lc(i["PLANNED-DURATION"]);let r,h,o,a=lc(i.DURATION);void 0!==i["SCTE35-CMD"]&&(r=um(i["SCTE35-CMD"]).buffer),i["SCTE35-IN"]&&(h=um(i["SCTE35-IN"]).buffer),i["SCTE35-OUT"]&&(o=um(i["SCTE35-OUT"]).buffer);const u="YES"===i["END-ON-NEXT"],c=function(t){const i={};for(const e of w.keys(t)){const s=t[e];void 0!==s&&Xt(e,"X-")&&(i[e]=s)}return i}(i),d=i.ID,l=i.CLASS;let f,v;if(void 0===e)ol.FLt(Ho,"Could not parse #EXT-X-DATERANGE tag without START-DATE attribute: "+e+".");else if(f=new Date(e),v=void 0!==s?new Date(s):void 0,Qf(f)||ol.FLt(Ho,"Could not parse EXT-X-DATERANGE tag with invalid START-DATE attribute: "+f+"."),void 0!==a){const i=new Date(f.getTime()+1e3*a);v?v.getTime()!==i.getTime()&&(ol.FLt(Ho,"DURATION and END-DATE attributes of #EXT-X-DATERANGE tag are not aligned, updating the END-DATE: "+t+"."),v=i):v=i}else v&&(a=(f.getTime()-v.getTime())/1e3);if(u&&(i.CLASS||ol.FLt(Ho,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute without CLASS attribute: "+t+"."),i.DURATION&&ol.FLt(Ho,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute with DURATION attribute: "+t+"."),v&&ol.FLt(Ho,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute with END-DATE attribute: "+t+".")),void 0===d&&ol.FLt(Ho,"Could not parse #EXT-X-DATERANGE tag without valid ID attribute: "+t+"."),void 0===d||void 0===f)throw new m("HLSPlaylistParser - Could not parse #EXT-X-DATERANGE tag: "+t+".");return{o:d,nOt:l,uq:f,rOt:v,ct:a,hOt:n,cOt:r,lOt:h,dOt:o,sOt:u,aOt:c}}function fJ(t,i){if(void 0===t)throw new m("HLSPlaylistParser - Unable to parse URL from string: "+t+".");return zd.Pm(t,i)}function vJ(t,i){const e=iJ(t),s=lc(e.DURATION),n=fJ(e.URI,i),r=aJ(e.BYTERANGE),h="YES"===e.INDEPENDENT,o="YES"===e.GAP;if(void 0===s)throw new m("HLSPlaylistParser - Unable to parse #EXT-X-PART without valid DURATION: "+t);return{ct:s,Syt:{XE:n,iAt:r},kOt:h,EOt:o}}function _J(t){const i=iJ(t);return{xOt:"YES"===i["CAN-BLOCK-RELOAD"],POt:lc(i["CAN-SKIP-UNTIL"]),IOt:"YES"===i["CAN-SKIP-DATERANGES"],COt:lc(i["HOLD-BACK"]),ROt:lc(i["PART-HOLD-BACK"])}}function gJ(t,i){const e=iJ(t);if(void 0===e.URI)throw new m("HLSPlaylistParser - Could not parse #EXT-X-RENDITION-REPORT: "+t+".");const s=fJ(e.URI,i),n=lc(e["LAST-MSN"]),r=lc(e["LAST-PART"]);if(void 0===n)throw new m("HLSPlaylistParser - Could not parse #EXT-X-RENDITION-REPORT: "+t+".");return{Syt:s,DOt:n,NOt:r}}function pJ(t,i){var e;const s=iJ(t),n=lc(s["SKIPPED-SEGMENTS"]),r=null==(e=s["RECENTLY-REMOVED-DATERANGES"])?void 0:e.split("\t");if(void 0===n)throw new m("HLSPlaylistParser - Could not parse #EXT-X-SKIP tag without valid SKIPPED-SEGMENTS attribute: "+t+".");return{BOt:n,MOt:r,LOt:i}}function mJ(t){const i=lc(iJ(t)["PART-TARGET"]);if(void 0===i)throw new m("HLSPlaylistParser - Could not parse #EXT-X-PART-TARGET-DURATION tag: "+t+".");return i}function wJ(t){switch($Y(t)){case"VOD":return zY.iOt;case"EVENT":return zY.eOt;default:return ol.FLt(Ho,"Found #EXT-X-PLAYLIST-TYPE tag with invalid value: "+t+"."),zY.yk}}function yJ(t,i){const e=iJ(t);let s,n;try{s=function(t){if(void 0===t)throw new m("HLSPlaylistParser - Could not parse PRELOAD-HINT type: "+t+".");if("MAP"===t)return Ah.JLt;if("PART"===t)return Ah.ZLt;throw new m("HLSPlaylistParser - Could not parse PRELOAD-HINT type: "+t+".")}(e.TYPE),n=fJ(e.URI,i)}catch(i){throw new m("HLSPlaylistParser - Could not parse #EXT-X-PRELOAD-HINT tag: "+t+".")}const r=lc(e["BYTERANGE-START"]),h=lc(e["BYTERANGE-LENGTH"]);let o;return void 0===r&&void 0===h||(o={Tn:r||0,V:h}),{Km:s,Syt:{XE:n,iAt:o}}}r(),r(),r();var bJ=class t{OOt(){const t=this.FOt[this.UOt];return this.UOt+=1,t}VOt(){return this.FOt[this.UOt]}Fy(){const i=new t("");return i.UOt=0,i.FOt=this.FOt.slice(this.UOt),i}static HOt(t){if(!t)return[];return t.split(/[\r\n]+/).map(t=>t.trim()).filter(t=>t)}constructor(i){this.UOt=0,this.FOt=void 0,this.FOt=t.HOt(i)}};function AJ(t,i,e){const s=t.Syt;let n=t.ED,r=t.WOt,h=t.Tn;switch(e){case"#EXT-X-VERSION":n=function(t){const i=tJ(t);return S(i)?(ol.FLt(Ho,"Playlist version is NaN: "+t+"."),1):i}(i);break;case"#EXT-X-INDEPENDENT-SEGMENTS":r=!0;break;case"#EXT-X-START":h=function(t){const i=iJ(t),e=lc(i["TIME-OFFSET"]);if(void 0===e)throw new m("HLSPlaylistParser - #EXT-X-START is missing a TIME-OFFSET: "+t+".");return{qOt:e,zOt:"YES"===i.PRECISE}}(i);break;case"#EXT-X-DEFINE":ol.FLt(Ho,"Ignoring unsupported #EXT-X-DEFINE: "+i+".");break;default:ol.cN(Ho,"Ignoring unrecognized line or comment: "+i+".")}return{Syt:s,ED:n,WOt:r,Tn:h}}function SJ(t,i){return t.map(t=>t.Hk===ao.pz||t.SOt?t:Y({},t,{SOt:TJ(i)}))}function TJ(t){const i=new DataView(new ArrayBuffer(16)),e=new oi;return e.Ly(8),Gp(i,e,yo.fromNumber(t)),new j(i.buffer)}function kJ(t,i,e){ol.cN(Ho,"Parsing M3U8 playlist at "+t+".");const s=new bJ(e);if("#EXTM3U"!==s.OOt())throw new m("HLSPlaylistParser - Could not parse M3U8 playlist. Playlist does not start with #EXTM3U.");return function(t){return/^#EXT-X-(MEDIA|STREAM-INF|I-FRAME-STREAM-INF|SESSION-DATA|SESSION-KEY):/m.test(t)}(e)?function(t,i){let e;try{e=zd.Pm(t)}catch(i){throw ol.FLt(Ho,"The master playlist has no valid base URI: "+t+"."),new m("HLSPlaylistParser - Could not parse HLS master playlist: "+t)}let s={Syt:e,WOt:void 0,Tn:void 0,ED:void 0};const n=[],r=[],h=[],o=[];for(;;){const t=i.OOt();if(!t)break;try{const a=JY(t);switch(a){case"#EXT-X-MEDIA":{const i=eJ(t,e);n.push(i);break}case"#EXT-X-STREAM-INF":{const s=sJ(t,e,i.OOt());r.push(s);break}case"#EXT-X-I-FRAME-STREAM-INF":{const i=nJ(t,e);h.push(i);break}case"#EXT-X-SESSION-DATA":ol.FLt(Ho,"Ignoring unsupported #EXT-X-SESSION-DATA: "+t+".");break;case"#EXT-X-SESSION-KEY":{const i=rJ(t,e);o.push(i);break}default:s=AJ(s,t,a)}}catch(i){ol.FLt(Ho,"Ignoring unparsable line: "+t,i)}}let a=s.ED;var u;const c=null!=(u=s.WOt)&&u,d=s.Tn;return void 0===a&&(ol.FLt(Ho,"The playlist has no #EXT-X-VERSION, assuming version is 2."),a=2),a>=8&&(r.some(t=>void 0!==t.yyt)||h.some(t=>void 0!==t.yyt))&&(r.some(t=>void 0===t.yyt)||h.some(t=>void 0===t.yyt))&&ol.FLt(Ho,"If one master playlist variant stream has a SCORE, all variants should have it."),{Syt:e,ED:a,WOt:c,Tn:d,GOt:h,UW:o,$D:n,XOt:r}}(t,s):function(t,i,e){let s={Syt:t,WOt:void 0,Tn:void 0,ED:void 0};const n=[];let r,h,o,a,u=!1,c=!1;const d=[],l=Ba();let f,v,_,g,p,w,y,b,A,S=[],T=[],k=!1,E=!1;const x=[],P=[];let I,C,R,D,N,B=0,M=!1,L=zY.yk,O=!1,F=0;try{N=zd.Pm(t)}catch(i){throw ol.FLt(Ho,"The media playlist has no valid base URI: "+t+".",i),new m("HLSPlaylistParser - Could not parse HLS media playlist.")}const U=e.Fy();for(;void 0===C||void 0===R;){const t=U.OOt();if(!t)break;try{switch(ZY(t)){case"#EXT-X-MEDIA-SEQUENCE":C=tJ(t);break;case"#EXT-X-DISCONTINUITY-SEQUENCE":R=tJ(t)}}catch(i){ol.FLt(Ho,"Ignoring unparsable line: "+t,i)}}void 0===C&&(ol.cN(Ho,"#EXT-X-MEDIA-SEQUENCE tag is missing, assuming first segment media sequence number is 0."),C=0),void 0===R&&(ol.cN(Ho,"#EXT-X-DISCONTINUITY-SEQUENCE tag is missing, assuming first segment discontinuity sequence number is 0."),R=0);let V=C,H=R;for(;;){const t=e.OOt();if(!t)break;let i=!1;try{const e=ZY(t);switch(e){case"#EXTINF":i=!0,[f,v]=hJ(t);break;case"#EXT-X-BYTERANGE":i=!0,_=uJ(t,B),_&&(B=_.Tn+_.V);break;case"#EXT-X-DISCONTINUITY":i=!0,k=!0,H++;break;case"#EXT-X-KEY":{var W;i=!0;const e=rJ(t,N);if(e.Hk===ao.pz){l.clear(),A=void 0;break}var q;const s=null!=(q=null==(W=e.vOt)?void 0:W.toString())?q:"identity";l.set(s,e),e.Hk===ao.$Lt&&(A=e);break}case"#EXT-X-MAP":i=!0,p=cJ(t,N),w=A;break;case"#EXT-X-PROGRAM-DATE-TIME":i=!0,y=dJ(t);break;case"#EXT-X-GAP":i=!0,E=!0;break;case"#EXT-X-BITRATE":i=!0,b=tJ(t);break;case"#EXT-X-TARGETDURATION":r=tJ(t);break;case"#EXT-X-DATERANGE":{const i=lJ(t);n.push(i);break}case"#EXT-X-PART":{i=!0;const e=vJ(t,N);T.push(e);break}case"#EXT-X-PRELOAD-HINT":{const i=yJ(t,N);x.push(i);break}case"#EXT-X-SKIP":{d.length>0&&ol.FLt(Ho,"#EXT-X-SKIP must appear before any #EXTINF tags."),i=!0;const e=pJ(t,V);F=e.BOt,D=e.MOt,V+=e.BOt;break}case"#EXT-X-SERVER-CONTROL":{const i=_J(t);u=i.xOt,h=i.POt,c=i.IOt,o=i.COt,a=i.ROt;break}case"#EXT-X-RENDITION-REPORT":{const i=gJ(t,N);P.push(i);break}case"#EXT-X-PART-INF":I=mJ(t);break;case"#EXT-X-MEDIA-SEQUENCE":i&&ol.FLt(Ho,"#EXT-X-MEDIA-SEQUENCE must appear before any media segment tags.");break;case"#EXT-X-DISCONTINUITY-SEQUENCE":i&&ol.FLt(Ho,"#EXT-X-DISCONTINUITY-SEQUENCE must appear before any media segment tags.");break;case"#EXT-X-ENDLIST":M=!0;break;case"#EXT-X-PLAYLIST-TYPE":L=wJ(t);break;case"#EXT-X-I-FRAMES-ONLY":O=!0;break;default:if(Xt(e,"#"))s=AJ(s,t,e);else{g=zd.Pm(t,N);const i=p?{Syt:p,jOt:w}:void 0,e={UW:SJ(xg(l),V),LU:S,QOt:T,ct:f,gq:v,KOt:k,Syt:{iAt:_,XE:g},YOt:i,JOt:y,EOt:E,ZOt:b,LOt:V,$Ot:H};d.push(e),V++,S=[],T=[],f=void 0,v=void 0,k=!1,_=void 0,g=void 0,y=void 0,E=!1,b=void 0}}}catch(i){ol.FLt(Ho,"Ignoring unparsable line: "+t,i)}}if(T.length){const t=p?{Syt:p,jOt:A}:void 0,i={UW:SJ(xg(l),V),LU:S,QOt:T,ct:f,gq:v,KOt:k,Syt:void 0,YOt:t,JOt:y,EOt:E,ZOt:b,LOt:V,$Ot:H};d.push(i)}let z=s.ED;var G;const X=null!=(G=s.WOt)&&G,j=s.Tn;void 0===z&&(ol.FLt(Ho,"The media playlist has no #EXT-X-VERSION tag, assuming version is 2."),z=2),void 0===r&&ol.FLt(Ho,"Could not parse the HLS media playlist: no #EXT-X-TARGET-DURATION tag was found.");const Q=d.length,K=Q>0;K||ol.FLt(Ho,"The HLS media playlist contains no segments.");const Y=K&&d[Q-1].QOt.length>0;return Y&&void 0===I&&ol.FLt(Ho,"Could not parse the HLS media playlist: no #EXT-X-PART-TARGET-DURATION tag was found, but it is required when some or all segments contain parts."),Y&&void 0===a&&ol.FLt(Ho,"Could not parse the HLS media playlist: The #EXT-X-SERVER-CONTROL tag has no PART-HOLDBACK attribute, but it is required when some or all segments contain parts."),{xOt:u,POt:h,IOt:c,tFt:n,$Ot:R,iFt:M,WOt:X,COt:o,eFt:O,LOt:C,BOt:F,ROt:a,HLt:I,sFt:L,nFt:x,MOt:D,rFt:P,hFt:r,bct:d,Tn:j,Syt:N,oFt:i,ED:z}}(t,i,s)}r(),r();var EJ=class{get Syt(){return this.sLt.Syt}get Rrt(){return this.bRt}set Rrt(t){this.bRt=t?PJ(t):void 0,this.aFt=function(t,i){return!(void 0!==(null==t?void 0:t.q9)&&void 0===(null==i?void 0:i.q9)||void 0!==(null==t?void 0:t.W9)&&void 0===(null==i?void 0:i.W9))}(this.uFt,this.bRt)}get cFt(){return this.aFt}get VLt(){return this.dFt}get lFt(){return this.dFt.filter(t=>t.Km===dl.Bk)}get fFt(){return this.dFt.filter(t=>t.Km===dl.Mk)}get vFt(){return this.dFt.filter(t=>t.Km===dl.HU)}get _Ft(){return this.dFt.filter(t=>t.Km===dl.YLt)}gFt(t){for(const i of this.dFt){const e=i.sLt.gFt(t);if(void 0!==e)return e}}pFt(t){for(const i of this.dFt){const e=i.sLt.pFt(t);if(void 0!==e)return e}}mFt(t){_e(this.dFt,t)}constructor(t,i,e){var s,n,r,h;this.o=xJ++,this.sLt=void 0,this.IW=void 0,this.yyt=void 0,this.RRt=void 0,this.Olt=void 0,this.pOt=void 0,this.bOt=void 0,this.yOt=void 0,this.mOt=void 0,this.wyt=void 0,this.uFt=void 0,this.bRt=void 0,this.aFt=!1,this.dFt=[],this.sLt=i,this.IW=t.IW,this.wyt=t.wyt,this.yyt=t.yyt,this.uFt=t.Rrt?PJ(t.Rrt):void 0,this.bRt=this.uFt,this.RRt=t.RRt,this.Olt=t.Olt,this.pOt=null!=(s=t.pOt)?s:"wFt"+this.o,this.bOt=null!=(n=t.bOt)?n:"yFt"+this.o,this.yOt=null!=(r=t.yOt)?r:"bFt"+this.o,this.mOt=null!=(h=t.mOt)?h:"AFt"+this.o,this.dFt=e}},xJ=0;function PJ(t){return Y({},t,{W9:t.W9?rb(t.W9):void 0})}r(),r(),r();var IJ=class{get CO(){var t;return this.HO+(null!=(t=this.SFt)?t:0)}get TFt(){return this.kFt}get EFt(){return this.xFt}get UW(){return this.PFt.UW}IFt(t,i,e){this.HO=t,this.kFt=i,this.xFt=e}constructor(t,i,e,s,n,r){this.PFt=void 0,this.CFt=void 0,this.ct=void 0,this.Syt=void 0,this.kOt=void 0,this.EOt=void 0,this.kFt=void 0,this.xFt=void 0,this.HO=void 0,this.Get=void 0,this.SFt=void 0,this.PFt=t,this.CFt=i,this.HO=e,this.kFt=s,this.xFt=n,this.ct=r.ct,this.Syt=r.Syt,this.kOt=r.kOt,this.EOt=r.EOt}},CJ=class{get CO(){var t;return this.HO+(null!=(t=this.RFt)?t:0)}get DFt(){return this.HO}get ct(){return this.Zb}get Syt(){return this.NFt}get TFt(){return this.kFt}get EFt(){return this.xFt}get QOt(){return this.BFt}get MFt(){return this.LFt}get RO(){var t;return this.CO+(null!=(t=this.Zb)?t:this.LFt)}set SFt(t){this.RFt=t;for(const i of this.BFt)i.SFt=t}get SFt(){return this.RFt}OFt(t){return this.BFt[t]}FFt(t){for(let i=0;i=0;i--){const e=this.BFt[i];if(e.CO<=t)return e}}VFt(t){let i=this.UFt(t);for(;i&&!i.kOt&&i.CFt>0;)i=this.OFt(i.CFt-1);return i}IFt(t,i,e){const s=t.QOt.length!==this.BFt.length||e!==this.xFt;this.kFt=i,this.xFt=e,this.Zb=t.ct,null!=this.JOt||(this.JOt=t.JOt),void 0===this.NFt&&(this.NFt=t.Syt),s&&this.HFt(t.QOt)}HFt(t){this.BFt.length>t.length&&(this.BFt.length=t.length);let i=0;for(let e=0;e=0;e--){const n=s[e],r=hh(i,t=>t.o===n.o);r?n.er(r):t.XU(n)}for(const s of i){const i=s.uq;if(void 0!==i&&!t.k5(s.o)){const n=e(i),r=new DJ(s,n);OJ(t.L.NI,r),t.nV(r)}}}function LJ(t){const i=Ba(),e=[];for(const s of t)if(i.has(s.o)){const t=i.get(s.o),e=Y({},t,ES(s),{oOt:Y({},t.oOt,s.oOt)});i.set(s.o,e)}else i.set(s.o,s),e.push(s.o);return e.map(t=>i.get(t))}function OJ(t,i){const e=dr(t,t=>t.nOt===i.nOt);e&&e.sOt&&e.er({o:e.o,rOt:i.uq})}var FJ=String.fromCharCode(95),UJ=FJ+"HLS_msn",VJ=FJ+"HLS_part",HJ=FJ+"HLS_skip",WJ="HLSMediaPlaylist",qJ=class{get iFt(){if(0===this.Dbt.length)return!1;return this.Dbt[this.Dbt.length-1].EFt}get ct(){return this.Zb}get kP(){return this.H4}get sUt(){return this.nUt}get WLt(){return this.rUt}get HLt(){return this.hUt}get COt(){return this.iFt?0:this.oUt?this.oUt:this.rUt?3*this.rUt:void 0}get ROt(){var t;return null!=(t=this.aUt)?t:this.hUt?3*this.hUt:void 0}get xOt(){return this.uUt}get POt(){return this.cUt}get IOt(){return this.dUt}get sFt(){return this.lUt}get fUt(){return void 0!==this.HLt}get vUt(){if(this.iFt)return!0;const t=zd.Mg()/1e3,i=this._Ut,e=this.gUt;return void 0!==i&&t-i=i.length?-1:e}xUt(t){if(0===this.Dbt.length)return;const i=jq(zJ.Bg,this.Dbt,t);if(!(i<0)){const e=this.Dbt[i];return t===e.RO&&i+1=e.CO?e:this.xUt(t)}gFt(t){const i=this.PUt(t);if(void 0===i)return;for(let e=i.LOt-this.Dbt[0].LOt;e>=0;e--){const i=this.Dbt[e];if(void 0!==i.JOt)return new Date(i.JOt.getTime()+1e3*(t-i.CO))}}pFt(t){let i;for(const e of this.Dbt)if(GJ(e))if(void 0===i)i=e;else{if(!(e.JOt.getTime()<=t.getTime()))break;i=e}if(void 0!==i)return i.CO+(t.getTime()-i.JOt.getTime())/1e3}IUt(t){switch(t){case Ah.JLt:return this.CUt;case Ah.ZLt:return this.RUt;default:return}}IFt(t){var i;void 0===this.rUt&&(this.rUt=null!=(i=t.hFt)?i:this.DUt(t));void 0===this.oUt&&void 0!==t.COt&&(this.oUt=t.COt),void 0===this.hUt&&void 0!==t.HLt&&(this.hUt=t.HLt),void 0===this.aUt&&void 0!==t.ROt&&(this.aUt=t.ROt),this.uUt=t.xOt,this.cUt=t.POt,this.dUt=t.IOt,this.lUt=t.sFt,this.Lbt(t),this.NUt(t);const e=hh(t.nFt,t=>t.Km===Ah.JLt),s=hh(t.nFt,t=>t.Km===Ah.ZLt);this.CUt=e?{Syt:e.Syt,Km:e.Km,$Ot:t.$Ot}:void 0,this.RUt=s?{Syt:s.Syt,Km:s.Km,$Ot:t.$Ot}:void 0,this.pUt=zd.Mg()/1e3;const n=this.H4.An(this.H4.V-1);this.BUt();const r=this.H4.An(this.H4.V-1);(!this.wUt||r-n>0)&&(this.wUt=this.pUt),null!=this.UU||(this.UU=t.Tn)}BUt(){this.nUt=this.MUt(),this.H4=this.LUt(this.nUt),this.Zb=this.OUt()}MUt(){const t=this.bct;if(0===t.length)return Uo.rL();const i=t[0].CO,e=t[t.length-1].RO;return new Uo([i,e])}LUt(t){if(0===t.V||this.iFt)return t;const i=t.Tn(0),e=t.An(0)-this.ISt;return e{var i;return null!=(i=t.ct)?i:t.MFt}):1/0}DUt(t){let i;for(const e of t.bct)if(void 0!==e.ct){const t=_.max(1,_.round(e.ct));(void 0===i||i0&&this.Dbt.splice(0,i.HUt);const r=t.BOt;if(r>0){if(r>this.Dbt.length)throw new Bc("New playlist skips over missing segments.");const i=this.Dbt[r-1];if(void 0===i.ct)throw new Bc("New playlist skips over an incomplete segment.");e=i.DFt+i.ct,n=i.$Ot-t.$Ot,s=r;for(let t=0;t0&&void 0===t.YOt){t=Y({},t,{YOt:this.Dbt[this.Dbt.length-1].YOt})}const i=new CJ(e,u,h,o,t);i.SFt=this.RFt,this.Dbt.push(i)}void 0!==a&&(e+=a)}}VUt(t){if(0===this.Dbt.length)return{HUt:0,WUt:0};const i=this.Dbt[0].LOt,e=this.Dbt[this.Dbt.length-1].LOt,s=t.bct[0].LOt-t.BOt,n=t.bct[t.bct.length-1].LOt;let r=0,h=0;if(svoid 0!==t.JOt);if(void 0===e)return;const s=function(t){let i=0;for(const s of t){if(s.KOt)return;if(s.JOt)return[s,i];var e;i+=null!=(e=s.ct)?e:0}return}(i.bct);if(void 0===s)return;const[n,r]=s;if(e.$Ot!==n.$Ot)return;const h=(n.JOt.getTime()-e.JOt.getTime())/1e3;return e.DFt+h-r}(this.Dbt,t))?o:function(t,i,e){const s=t[t.length-1];var n;const r=null!=(n=s.ct)?n:_.max(e,s.MFt),h=e*(i-s.LOt-1);return s.DFt+r+h}(this.Dbt,s,this.rUt),ol.OLt(WJ,"New playlist (starting at "+s+") is entirely after previous playlist (ending at "+e+"), resetting playlist and restarting at "+h+"s"),r=this.Dbt.length,this.UUt()}else{0;const t=tt(this.Dbt,t=>t.LOt===s);0,h=this.Dbt[t].DFt,t>0&&(r=t)}}return{HUt:r,WUt:h}}NUt(t){let i=t.tFt.map(jY);if(t.IOt&&t.oFt.uD===RJ.zFt&&(i=this.yUt.concat(i)),this.yUt=LJ(i),t.MOt)for(const i of t.MOt){const t=tt(this.yUt,t=>t.o===i);t>=0&&Ra(this.yUt,t)}}qUt(t,i){if(this.RFt!==t){this.RFt=t;for(const t of this.Dbt)t.SFt=this.RFt;this.BUt()}this.TUt=i}UUt(){this.RFt=void 0,this.TUt=void 0}constructor(t,i,e){this.Syt=void 0,this.pUt=void 0,this.wUt=void 0,this.CUt=void 0,this.RUt=void 0,this.rUt=void 0,this.hUt=void 0,this.oUt=void 0,this.aUt=void 0,this.Dbt=[],this.yUt=[],this.RFt=void 0,this.uUt=!1,this.cUt=void 0,this.dUt=!1,this.lUt=zY.yk,this.H4=Uo.rL(),this.nUt=Uo.rL(),this.Zb=void 0,this.AUt=-1/0,this.UU=void 0,this.FUt=void 0,this.TUt=void 0,this.Syt=t,this.UU=i,this.FUt=e}},zJ=class t{static get Bg(){return null!=this.Rbt||(this.Rbt=new t),this.Rbt}xbt(t){return t.CO}Pbt(t){return t.RO}Ibt(t,i){return Nu(t,i)}Cbt(t,i,e){return(t-i)/(e-i)}};function GJ(t){return void 0!==t.JOt}function th(t){return void 0!==t.QOt}function XJ(t){return th(t)?t.TFt:0===t.CFt&&t.PFt.TFt}function jJ(t,i){return th(t)?th(i)?t.LOt+1===i.LOt:0===i.CFt&&jJ(t,i.PFt):t.CFt===t.PFt.QOt.length-1?jJ(t.PFt,i):!th(i)&&t.PFt===i.PFt&&t.CFt+1===i.CFt}zJ.Rbt=void 0,r(),r(),r();var QJ=class extends Qr{get name(){return"DiscontinuityMisalignmentError"}constructor(){super("Tried to wait for multiple discontinuity mappings at the same time")}};var KJ=class{zUt(t){const i=this.GUt.get(t);return void 0!==i&&YJ(i)}XUt(t){if(this.jUt()>t)return Promise.reject(new QJ);const i=[];for(const s of this.QUt){var e;if(st.iat===i)||(h.sVt.push({iat:i,nVt:e,rVt:s.eU(e.jD),hVt:n,oVt:r}),this.aVt(h,t)))}aVt(t,i){if(t.EU||!this.uVt(t))return;const e=function(t){return df(t,JJ)}(t.sVt);t.EU=e.rVt.gF(e.nVt),t.KUt.Qy(),Wt(t.sVt),_e(this.QUt,i)}uVt(t){return this.cVt.length>0&&this.cVt.every(i=>t.sVt.some(t=>t.iat===i))}YUt(t){if(this.GUt.has(t))return this.GUt.get(t);{const i={EU:void 0,KUt:new Ga,sVt:[]};return this.GUt.set(t,i),i}}dVt(t){this.cVt=t,this.GUt.forEach((t,i)=>this.aVt(t,i))}lVt(){this.eVt=-1}jUt(){return this.eVt}zg(){this.GUt.forEach(t=>t.KUt.Zg()),this.GUt.clear()}constructor(){this.cVt=[],this.GUt=re(),this.QUt=[],this.eVt=-1}};function YJ(t){return void 0!==t.EU}function JJ(t,i){return-function(t,i){if(t.oVt||i.oVt)return function(t,i){let e=t.gF(i);return t.mF()||i.mF()||(e.aF(XE())?e=e.gF(GE()):e.lF(XE()._F())&&(e=e.gO(GE()))),e}(t.nVt,i.nVt).oF(ul.SF);return t.nVt.oF(i.nVt)}(t,i)||function(t,i){return t.hVt===i.hVt?hl.rh:t.hVt?hl.Fg:hl.Ug}(t,i)||function(t,i){return t.rVt.oF(i.rVt)}(t,i)}var ZJ=class{get fVt(){return this.vVt}get _Vt(){return this.gVt}get AM(){return this.pVt}IFt(t,i){if(qY(t))if(0===this.gVt.length)this.mVt(t);else{if(!i)return void ol.FLt("HLSModel","No rendition was provided to update the playlist. Ignoring the update.");i.sLt.IFt(t)}else{if(0!==this.gVt.length)return void ol.FLt("HLSModel","Master playlist can only be applied once. Ignoring the update.");this.wVt(t)}}mVt(t){const i=this.yVt(t.Syt);i.IFt(t);const e=this.bVt(dl.Bk,i),s=this.bVt(dl.Mk,i),n=new EJ({Syt:i.Syt,IW:0,wyt:0,yyt:NaN,Rrt:void 0,RRt:void 0,Olt:0,gOt:[],wOt:void 0,AOt:void 0,pOt:void 0,bOt:void 0,yOt:void 0,mOt:void 0},i,[e,s]);this.gVt.push(n)}wVt(t){this.vVt.push(...t.UW);const i=this.AVt(t);for(const e of t.XOt){const s=i.filter(t=>tZ(t,e));this.SVt(e,s);const n=new EJ(e,this.yVt(e.Syt,t.Tn),s);this.gVt.push(n)}}yVt(t,i){let e=this.TVt.get(t);return void 0===e&&(e=new qJ(t,i,this.FUt),this.TVt.set(t,e)),e}AVt(t){const i=[];for(const e of t.$D)if(void 0===e.Syt){for(const s of t.XOt)if($J(e.Km,e.oLt,s)){const t=new _Y(e,this.yVt(s.Syt));i.push(t)}}else{const t=new _Y(e,this.yVt(e.Syt));i.push(t)}return i}bVt(t,i){return new _Y({Km:t,Syt:void 0,oLt:"",bs:void 0,_Ot:void 0,l:"",nLt:!0,rLt:!1,hLt:!1,cLt:void 0,aLt:void 0,X9:void 0},i)}SVt(t,i){const e=i.filter(t=>t.Km===dl.Bk),s=i.filter(t=>t.Km===dl.Mk),n=t.Rrt&&(t.Rrt.W9||t.Rrt.q9);if((!n||t.Rrt.W9)&&0===s.length){const e=this.bVt(dl.Mk,this.yVt(t.Syt));i.push(e)}if((!n||t.Rrt.q9)&&0===e.length){const e=this.bVt(dl.Bk,this.yVt(t.Syt));i.push(e)}t.Rrt&&t.Rrt.fOt}kVt(t){for(const i of this.gVt)for(const e of i.VLt)if(e===t)return e}EVt(t){for(const i of this.gVt)if(i===t)return i}xVt(t){for(const i of this.gVt)if(Ct(i.VLt,t))return i}zg(){Wt(this.gVt),Wt(this.vVt),this.TVt.clear(),this.pVt.zg()}constructor(t,i){this.gVt=[],this.vVt=[],this.TVt=Ba(),this.pVt=new KJ,this.FUt=void 0,this.PVt=void 0,this.PVt=t,this.FUt=i}};function $J(t,i,e){switch(t){case dl.Bk:return e.pOt===i;case dl.Mk:return e.bOt===i;case dl.HU:return e.yOt===i;case dl.YLt:return e.mOt===i}return!1}function tZ(t,i){return $J(t.Km,t.oLt,i)&&(!t.uLt||t.sLt.Syt===i.Syt)}r();var iZ=class extends gp{constructor(t){super(nZ.IVt),this.fLt=void 0,this.fLt=t}};r();var eZ=class extends gp{constructor(t){super(nZ.CVt),this.fLt=void 0,this.fLt=t}},sZ="HlsModelUpdater",nZ=function(t){return t.IVt="RVt",t.CVt="DVt",t}({}),rZ=class extends Ne{get NVt(){return this.BVt}get MVt(){return this.LVt}get Br(){return this.Pyt}get OVt(){return this.FVt}async UVt(t){const i=this.Pyt.PVt;if(!i)throw new m("HLSModelUpdater - Could not load HLS playlist: The provided source is empty.");this.So(new ke);const e=await this.VVt(i,{},2,!0,t),s=e.sLt;if(!WY(s)&&!qY(s))throw new m("HLSModelUpdater - Could not load HLS playlist: The playlist is invalid.");WY(s)||ol.cN(sZ,"Detected media playlist only HLS stream."),this.HVt(s),e.WVt&&(this.LVt=!0,await this.qVt(t)),this.BVt=!0}async zVt(t,i,e,s){const n=this.Pyt.kVt(t);if(!n)throw new m("HLSModelUpdater - Could not load HLS playlist for rendition: the rendition does not exist on the internal model.");const r={LOt:i,kUt:e,uD:uZ(n)},h=rn(_.max(1,3*t.sLt.gUt));try{await this.GVt(n,r,s,h)}catch(t){throw sa(t),this.XVt(n),t}}jVt(t,i){const e=this.Pyt.kVt(t);if(!e)throw new m("HLSModelUpdater - Could not load HLS playlist for rendition: the rendition does not exist on the internal model.");const s={LOt:void 0,kUt:void 0,uD:uZ(e)},n=rn(_.max(1,3*t.sLt.gUt));return this.GVt(e,s,i,n)}QVt(t,i){return this.KVt.has(t.JI)||this.KVt.set(t.JI,new Ga),ua(this.KVt.get(t.JI).Yy,i)}XVt(t){this.So(new eZ(t))}async GVt(t,i,e,s){const n=t.sLt.BLt(i);let r;try{r=(await this.VVt(n,i,0,this.LVt,e,s)).sLt}catch(i){throw sa(i),t.sLt.bUt=zd.Mg(),i}if(!qY(r))throw new m("HLSModelUpdater - Could not load HLS playlist for rendition: the playlist is not a media playlist.");if(this.YVt&&t!==this.YVt&&!this.YVt.sLt.vUt)try{await this.jVt(this.YVt,e)}catch(i){sa(i),this.YVt=t,this.JVt()}try{this.HVt(r,t)}catch(n){if(n instanceof Bc&&void 0!==i.uD){const n=Y({},i,{uD:void 0});return this.GVt(t,n,e,s)}throw n}this.YVt=t}async VVt(t,i,e,s,n,r){if(ol.cN(sZ,"Loading HLS playlist at "+t+"."),s){const i=await this.ZVt(t,n);if(void 0!==i)return{sLt:i,WVt:!0}}return{sLt:await this.$Vt(t,i,e,n,r),WVt:!1}}async ZVt(t,i){try{const e=await this.Sut.hTt([t]);if(fr(i),void 0!==e)return kJ(e.responseURL,{},e.data)}catch(t){sa(t)}}async $Vt(t,i,e,s,n){const r={Yu:t,fk:Bi.LT,Xk:this.sTt,Hk:Qe.GET,Km:q.bk,Yg:s,Wk:n},h=await ws(t=>this.tHt(r,t),s,e);return kJ(h.wk,i,h.lk)}async tHt(t,i){void 0===i&&(i=0);try{const i=await this.aV.vk(t);return{lk:await i.HT(),wk:i.wk}}catch(t){if(!Ce(t)){const e=Qn(t)?t.uE.dk:void 0;this.So(new tG),this.So(new _G(i,e,t.message))}throw t}}async qVt(t){fr(t);const i=[];for(const e of this.Pyt._Vt)for(const s of e.VLt)i.push(this.iHt(s,t));await Promise.all(i)}async iHt(t,i){try{const e=await this.Sut.hTt([t.sLt.Syt]);fr(i),void 0===e||t.sLt.vUt||await this.jVt(t,i)}catch(t){sa(t)}}JVt(){for(const t of this.Pyt._Vt)for(const i of t.VLt)i!==this.YVt&&void 0!==i.sLt.SFt&&(i.sLt.vUt?this.eHt(i):i.sLt.UUt())}eHt(t){if(0!==t.sLt.bct.length){if(!this.YVt)return this.YVt=t,void this.YVt.sLt.qUt(0,void 0);if(this.sHt(this.YVt),!this.sHt(t)&&void 0===t.sLt.SFt){const i=this.nHt(t,this.YVt);ol.OLt(sZ,"Assuming global timeline offset of "+i+"s for rendition "+t.sLt.Syt+"."),t.sLt.qUt(i,void 0)}}}nHt(t,i){if(hZ(t)){const e=t.sLt.bct[0],s=i.sLt.bct[0];return ol.OLt(sZ,"Synchronizing by start of VOD: "+s.CO+" vs "+e.CO),s.CO-e.DFt}const e=function(t,i){let e=t.length-1,s=i.length-1;for(;e>=0&&s>=0;){const n=t[e],r=i[s];if(n.$Ot>r.$Ot)e--;else if(n.$Otvoid 0!==t.Get&&i.zUt(t.$Ot))}(i.sLt.bct,this.Pyt.AM);if(void 0===e)return!1;if(i.sLt.SUt===e.$Ot)return!0;const s=this.Pyt.AM.$Ut(e.Get,e).rF()-e.DFt;return ol.OLt(sZ,"Synchronize by media timestamp: "+s+"s for rendition "+t.sLt.Syt+"."),i.sLt.qUt(s,e.$Ot),(void 0===this.YVt||void 0===this.YVt.sLt.SUt||this.YVt.sLt.SUtt.sLt===i);void 0!==s&&void 0!==t.W9&&(s.Rrt=QY(s.Rrt,t));const n=hh(e.lFt,t=>t.sLt===i);void 0!==n&&void 0!==t.q9&&(n.Rrt=QY(n.Rrt,t)),e.cFt||void 0===s&&void 0===n||(e.Rrt=QY(e.Rrt,t))}}hHt(t,i){for(const e of this.Pyt._Vt){const s=hh(e.fFt,t=>t.sLt===i);void 0!==s&&void 0===t.W9&&e.mFt(s);const n=hh(e.lFt,t=>t.sLt===i);void 0!==n&&void 0===t.q9&&e.mFt(n)}}zg(){this.Vo(),this.Pyt.zg(),this.KVt.forEach(t=>t.Zg()),this.KVt.clear()}constructor(t,i,e,s,n){super(),this.aV=void 0,this.Sut=void 0,this.sTt=void 0,this.Pyt=void 0,this.BVt=void 0,this.LVt=void 0,this.YVt=void 0,this.FVt=void 0,this.KVt=void 0,this.aV=t,this.Sut=i,this.sTt=e,this.BVt=!1,this.LVt=!1,this.YVt=void 0,this.FVt=void 0,this.KVt=re(),this.Pyt=new ZJ(s,n)}};function hZ(t){return t.sLt.iFt||t.sLt.sFt===zY.eOt}function oZ(t){const i=t.sLt.bct;return i[i.length-1].RO}function aZ(t){return dr(t,t=>void 0!==t.JOt)}function uZ(t){if(void 0!==t.sLt.POt&&!t.sLt.iFt&&!(void 0===t.sLt._Ut||zd.Mg()/1e3-t.sLt._Ut>=t.sLt.POt/2))return t.sLt.IOt?RJ.zFt:RJ.qFt}var cZ=class extends ms{NUt(t){if(0===t.sLt.tFt.length)return;this.oHt||(this.oHt=this.iV.sI(us.zU,void 0,void 0,void 0,void 0,nh.DATE_RANGE),this.tt(this.oHt));MJ(this.oHt,t.sLt.tFt,i=>{var e;return null!=(e=t.sLt.pFt(i))?e:NaN})}eV(t,i,e){const s=ht(t,i,e);return this.oHt===t&&(this.oHt=s),s}constructor(t,i){super(i),this.nEt=void 0,this.oHt=void 0,this.aHt=t=>{this.NUt(t.fLt)},this.nEt=t,this.nEt.wn(nZ.IVt,this.aHt)}};r();var dZ=class extends gp{constructor(){super(vY.ZMt)}};r(),r(),r();var lZ=class{get uHt(){return this.n3}get Fx(){return QU(this.Wrt.Fx,this.Wrt.W3)}get bct(){return this.Dbt}get Npt(){return this.Ipt}cHt(t){var i;return null==(i=this.dHt(t))?void 0:i.fLt}lHt(t){this.n3=t,this.fHt()}elt(t,i,e,s,n,r){this.Dbt.push({fLt:t,yut:i,vHt:Uo.nL(n,r),_Ht:Uo.nL(e,s)}),this.fHt()}dHt(t){return hh(this.Dbt,i=>i._Ht.Cr(t))}Oat(t){return hh(this.Dbt,i=>i.yut===t)}Qct(t,i){return hh(this.Dbt,e=>e.fLt===t&&jJ(e.yut,i))}F3(){const t=this.Fx;t.V>0&&(this.Ipt=t.An(t.V-1))}fHt(){const t=this.Wrt.Fx;this.Dbt=this.Dbt.filter(i=>0!==t.Mn(i._Ht).V)}constructor(t){this.Wrt=void 0,this.Dbt=void 0,this.n3=void 0,this.Ipt=void 0,this.Wrt=t,this.Dbt=[],this.n3=void 0,this.Ipt=void 0}};r();var fZ=188,vZ=function(t){return t[t.yk=0]="yk",t[t.pC=1]="pC",t[t.gHt=2]="gHt",t[t.pHt=3]="pHt",t}({});function _Z(t){return gZ(t)?1:function(t){return function(t){if(t.length<376)return-1;const i=t.length<564?2:3,e=_.min(1e3,t.length-i*fZ);for(let s=0;s<=e;s++){let e=!0;for(let n=0;n=0}(t)?2:function(t){return null!==sL(dh(t),new oi)}(t)?3:0}function gZ(t){const i=yi(t,0,_.min(t.length,16384));return Hn.RD(dh(i))}var pZ=class{get Km(){return this.Vp}get mHt(){return this.Yot}get wHt(){return this.yHt}get yCt(){return void 0!==this.bHt}get AHt(){return this.SHt}THt(){if(this.yCt)throw new m("Cannot perform new operation while BufferAppender is still busy")}kHt(t){this.eb!==t&&(this.THt(),this.eb=t,this.Yot=new lZ(t))}EHt(){return this.bHt?this.bHt.Yy:Promise.resolve()}xHt(t){const i=this.Yot.Npt;return void 0!==i&&this.PHt(t,i)}PHt(t,i){var e;const s=_.min(t,i);var n;return null!=(n=null==(e=this.Yot.Fx.MM().qM(this.wHt).iL(s))?void 0:e.Cr(i))&&n}IHt(t){return this.Yot.cHt(t)}Zg(){this.hT.Zg(),this.hT=new Zc,this.CHt=!0}J2(t){this.THt(),this.bHt=new Ga;const i=i=>{this.DHt.RHt(t),this.NHt(i)};this.Z2(t,this.hT.Yg).then(i,i)}async Z2(t,i){ol.OLt(PY,"Appending initializer",ah(t.BHt.Syt)),this.spt=t,await this.eb.J2(t,i),void 0!==this.ENt&&this.Vp===at.Mk&&gZ(t.lk.lk)&&this.ENt.ght(t.lk.lk),ol.OLt(PY,"Appended initializer",ah(t.BHt.Syt)),this.CHt=!1,this.Yot.lHt(t)}Pdt(t){this.THt(),this.bHt=new Ga;const i=i=>{this.DHt.RHt(t),this.NHt(i)};this.MHt(t,this.hT.Yg).then(i,i)}async MHt(t,i){const e=t.fLt;if(void 0===e.sLt.WLt)throw new m("HlsBufferAppender: Cannot append HLSAsset to "+this.Vp+" buffer for a HLSRendition with an undefined targetDuration.");this.CHt&&void 0!==this.spt&&await this.Z2(this.spt,i);const s=this.Yot.Fx.IM,n=this.eb.Fx;ol.OLt(PY,"Appending",ah(t.BHt.Syt)),await this.eb.Q2(t,i),void 0!==t.lk&&this.LHt(t.lk,t),ol.OLt(PY,"Appended",ah(t.BHt.Syt),s,this.Yot.Fx.IM);const r=t.CO,h=r+t.ct,o=t.BHt,a=o.CO;var u;const c=o.CO+(null!=(u=o.ct)?u:0);this.Yot.elt(e,o,r,h,a,c),this.OHt(e,o,r,h,n),t.BHt.EFt&&this.Yot.F3()}OHt(t,i,e,s,n){if(this.Km!==at.Mk)return;const r=this.eb.Fx.qM(n),h=this.Yot.Qct(t,i);if(h)if(this.FHt(h))if(0===r.V){if(void 0===this.Yot.Oat(i)){const t=this.eb.W3.Mn(new Uo([e,s]));this.yHt=this.yHt.HM(t)}}else{const t=r.Tn(0),i=new Uo([t,s]);if(this.yHt=this.yHt.qM(i),t>e){const i=this.eb.W3.Mn(new Uo([e,t]));this.yHt=this.yHt.HM(i)}}else{const t=r.V>0&&r.Tn(0)e?s:e;if(t>h){const t=this.eb.W3.Mn(new Uo([h,r.Tn(0)]));this.yHt=this.yHt.HM(t)}}}FHt(t){const i=t._Ht,e=i.Tn(0),s=i.An(i.V-1),n=i.RM(0),r=i.NM(i.V-1);return this.yHt.GM(e,s,n,r)}LHt(t,i){var e;if(!gZ(t.lk))return;const s=i.CO,n=s+i.ct,r=i.EU;if(null==(e=this.Opt)||e.elt(t.lk,s,r),void 0!==this.ENt&&this.Vp===at.Mk){const e=i.BHt.EFt;this.ENt.elt(t.lk,s,n,r,i.fLt,e)}const h=[];void 0!==this.Opt&&h.push(this.Opt),void 0!==this.ENt&&h.push(this.ENt),lP(this.eb.Fx,h)}UHt(t){this.THt(),this.bHt=new Ga;try{ol.OLt(PY,"Appending gap from "+t.VHt+" to "+t.HHt,ah(t.yut.Syt)),this.G3(t.VHt,t.HHt)}finally{this.DHt.RHt(t),this.NHt()}}G3(t,i){this.eb.G3(t,i)}constructor(t,i,e,s,n,r,h){this.eb=void 0,this.Yot=void 0,this.DHt=void 0,this.Vp=void 0,this.Opt=void 0,this.ENt=void 0,this.WHt=void 0,this.bHt=void 0,this.hT=new Zc,this.yHt=Uo.rL(),this.qHt=void 0,this.spt=void 0,this.CHt=!0,this.SHt=!1,this.NHt=t=>{this.bHt&&(t?YD(t)&&mZ(this)?this.WHt.iJ(this.eb.Fx.eL)?this.bHt.Qy():this.bHt.Ky(t):Ce(t)?this.bHt.Qy():(this.SHt=!0,this.bHt.Ky(t)):this.bHt.Qy(),this.bHt=void 0)},this.Vp=t,this.DHt=e,this.eb=i,this.Yot=s,this.WHt=n,this.Opt=r,this.ENt=h}};function mZ(t){return GT(t.Km)}r(),r();var wZ=class{async zHt(t,i,e,s){const n=await this.GHt(i,s);return await this.XHt.zHt(t,n,e)}async GHt(t,i){var e;if((null==(e=this.jHt)?void 0:e.Yu)!==t){ol.OLt("HLSDecryptor","Fetching new AES-128 decryption key from "+t+".");const e=await this.aV.vk({Yu:t,fk:Bi.NT,Hk:Qe.GET,Yg:i,Km:q.Tk,zk:he.Nk,Xk:this.sTt}),s=await e.qT(),n=new j(s);this.jHt={Yu:t,lk:n}}return this.jHt.lk}constructor(t,i,e){this.XHt=void 0,this.aV=void 0,this.sTt=void 0,this.jHt=void 0,this.XHt=t,this.aV=i,this.sTt=e,this.jHt=void 0}};r();var yZ=class{async vk(t,i,e,s,n){const r=await this.QHt(t,i,e,Bi.NT,s,n),h=await r.qT(n);return{httpStatusCode:r.dk,response:new j(h)}}async KHt(t,i,e,s,n){return(await this.QHt(t,i,e,Bi.MT,s,n)).zT(n)}async QHt(t,i,e,s,n,r){let h;t.iAt&&(h=HY(t.iAt.Tn,t.iAt.V),0===h[0]&&h[1]===Gl&&(h=void 0));const o=h?{Range:"bytes="+h[0]+"-"+h[1]}:void 0,a=new ro({Yu:t.XE,fk:s,_k:o,Xk:this.sTt,Hk:Qe.GET,Km:i,zk:e,Gk:this.qat,Kk:s===Bi.MT,jk:n,Yg:r});try{const i=await this.Sut.Aut(t.XE,h);if(fr(r),void 0!==i)return null==n||n(i.buffer.byteLength,i.buffer.byteLength),new il({vk:a,fk:a.fk,lk:i.buffer})}catch(t){sa(t)}return await ws(()=>ua(this.aV.vk(a),a.Yg),r,this.Srt)}constructor(t,i,e,s,n=2){this.aV=void 0,this.Sut=void 0,this.qat=void 0,this.sTt=void 0,this.Srt=void 0,this.aV=t,this.Sut=i,this.qat=e,this.sTt=s,this.Srt=n}};r();var bZ=class{YHt(){return this.JHt.sLt.xOt}async ZHt(t,i,e){if(!this.YHt())throw new m("Could not perform blocking playlist update.");const s=this.$Ht,n={LOt:t,kUt:i};return void 0!==s&&function(t,i,e){if(t.LOt===i.LOt){if(t.kUt===i.kUt)return!0;if(0===t.kUt&&void 0===i.kUt)return!0}if(t.LOt===i.LOt+1&&0===t.kUt&&void 0!==i.kUt){const t=e.Oat(i.LOt);if(t&&t.Syt&&i.kUt>=t.QOt.length)return!0}return!1}(s,n,this.JHt.sLt)||(await this.tWt(),this.iWt(n)),this.nEt.QVt(this.JHt,e)}eWt(t){return this.iWt(),this.nEt.QVt(this.JHt,t)}iWt(t){if(!this.sWt&&!this.nWt){const i=()=>{this.sWt=void 0};this.sWt=this.rWt(t,this.hWt.Yg).then(i,i)}}async tWt(){this.sWt&&(this.hWt.Zg(),this.hWt=new Zc,await this.sWt.catch(gs),this.sWt=void 0)}async rWt(t,i){let e=t;for(;;){if(fr(i),this.JHt.sLt.iFt&&this.JHt.sLt.vUt)return;null!=e||(e=this.oWt()),this.$Ht=e;try{if(e)await this.nEt.zVt(this.JHt,e.LOt,e.kUt,i);else{const t=zd.Mg()-this.En,e=1e3*this.JHt.sLt.gUt;t=t)return!0;if(s=t}cWt(t,i){const e=[];for(let s=0;s0)){if(s+r<=e)return ol.OLt(Gs,"Extracting the read data range for extraction of "+ah(this.NFt)),t.enqueue(n),this.pWt(),Wr(this.readAndSliceOutAssetBytes(t));{const i=e-s,h=di(n,0,i),o=di(n,i);return h.length>0&&(ol.OLt(Gs,"Extracting "+h.length+" bytes for extraction of "+ah(this.NFt)),t.enqueue(h)),ol.OLt(Gs,"Of the read "+r+" bytes, the last "+o.length+" will be stored locally for extraction of "+ah(this.NFt)),this.yWt.lWt(s+i,o),ol.OLt(Gs,"Extraction of "+ah(this.NFt)+" completed as the entire request has been fulfilled."),this.AWt(t),void(this.SWt&&(ol.OLt(Gs,"Aborting stream upstream as no more bytes are needed from "+ah(this.NFt)+"."),await this.Wd.gWt("AssetExtraction - AbortOnEnd")))}}{const i=di(n,0,h),e=di(n,h);if(ol.OLt(Gs,"Of the read "+r+" bytes, the first "+h+" will be stored locally for extraction of "+ah(this.NFt)),this.yWt.lWt(s,i),e.length>0)return ol.OLt(Gs,"Extracting "+e.length+" bytes for extraction of "+ah(this.NFt)),t.enqueue(e),this.pWt(),Wr(this.readAndSliceOutAssetBytes(t))}}}catch(i){ol.OLt(Gs,"Extraction of "+ah(this.NFt)+" completed as the entire source stream has been read."),this.AWt(t)}}AWt(t){t.close(),this.pWt(),this.TWt.Qy()}start(t){ol.OLt(Gs,"Preparing to push all collected data to controller for extraction of "+ah(this.NFt)),this.wWt(t),ol.OLt(Gs,"Collected data pushed to controller for extraction of "+ah(this.NFt));const{sAt:i}=xZ(this.NFt.iAt);this.Wd.fWt>=i?(ol.OLt(Gs,"Extraction of "+ah(this.NFt)+" completed as the entire request has been fulfilled."),this.AWt(t)):(ol.OLt(Gs,"Continuing read from original stream for extraction of "+ah(this.NFt)),Wr(this.readAndSliceOutAssetBytes(t)))}get kWt(){return this.TWt.Yy}pull(){return this.bWt.Qy(),this.bWt=new Ga,this.mWt.Yy}constructor(t,i,e,s){this.NFt=void 0,this.Wd=void 0,this.yWt=void 0,this.SWt=void 0,this.bWt=void 0,this.mWt=void 0,this.TWt=new Ga,this.NFt=t,this.Wd=i,this.yWt=e,this.SWt=s,this.bWt=new Ga,this.mWt=new Ga}},EZ=class{pO(t){if(!GY(this.NFt,t))return!1;const{eAt:i,sAt:e}=xZ(t.iAt);return this.yWt.aWt(this.EWt.fWt,i,e)}async Fgt(t,i){void 0===i&&(i=!1);const e=this.EWt,s=this.yWt;if(ol.cN(Gs,"Extracting data from "+ah(t)+" out of "+ah(this.NFt)),this.xWt&&(ol.OLt(Gs,"Awaiting previous extraction before extracting "+ah(t)+" out of "+ah(this.NFt)),await this.xWt),!this.pO(t))throw new m("The extractor does not contain the data requested");const n=new kZ(t,e,s,i);return this.xWt=n.kWt,new Kb(n)}constructor(t,i){this.NFt=void 0,this.yWt=void 0,this.EWt=void 0,this.xWt=void 0,this.NFt=i;const{eAt:e}=xZ(this.NFt.iAt);this.EWt=new TZ(t,e),this.yWt=new SZ}};function xZ(t){if(t){const i=t.Tn;return{eAt:i,sAt:void 0!==t.V?i+t.V:Gl}}return{eAt:0,sAt:Gl}}var PZ=class{async Un(){const t=await this.PWt.KHt(this.NFt,q.Sk,he.yk,void 0,this.hT.Yg);return new EZ(t,this.NFt)}pO(t){return GY(this.NFt,t)}async Fgt(t,i){void 0===i&&(i=!1);const e=await this.Ypt;return await ua(e.Fgt(t,i),this.hT.Yg)}Zg(){this.Ypt.catch(gs),this.hT.Zg()}constructor(t,i){this.NFt=void 0,this.PWt=void 0,this.hT=void 0,this.Ypt=void 0,this.NFt=t,this.PWt=i,this.hT=new Zc,this.Ypt=this.Un()}};r();var IZ=class extends gp{constructor(t){super(LZ.IWt),this.Gk=void 0,this.Gk=t}};r();var CZ=class extends gp{constructor(t,i,e,s,n,r,h){super(LZ.CWt),this.uri=void 0,this.RWt=void 0,this.Gk=void 0,this.mediaSequenceNumeber=void 0,this.mediaTrackId=void 0,this.DWt=void 0,this.httpStatusCode=void 0,this.uri=t,this.RWt=i,this.Gk=e,this.mediaSequenceNumeber=s,this.mediaTrackId=n,this.DWt=r,this.httpStatusCode=h}};function RZ(t,i,e){const s=th(e)?e:e.PFt;if(i.zUt(s.$Ot)){if(void 0!==e.Get)return i.$Ut(e.Get,e).rF();if(e!==s&&void 0!==s.Get){const t=i.$Ut(s.Get,s).rF();return e.CO+(t-s.CO)}}const n=t.sLt.Oat(s.LOt-1);if(void 0!==n&&i.zUt(n.$Ot)){if(n.QOt.length>0){const t=n.OFt(n.QOt.length-1);if(void 0!==t.Get){const s=i.$Ut(t.Get,t).rF();return e.CO+(s-t.CO)}}if(void 0!==n.Get){const t=i.$Ut(n.Get,n).rF();return e.CO+(t-n.CO)}}const r=t.sLt.Oat(s.LOt+1);if(void 0!==r&&i.zUt(r.$Ot)){if(r.QOt.length>0){const t=r.OFt(0);if(void 0!==t.Get){const s=i.$Ut(t.Get,t).rF();return e.CO+(s-t.CO)}}if(void 0!==r.Get){const t=i.$Ut(r.Get,r).rF();return e.CO+(t-r.CO)}}return e.CO}function DZ(t){return void 0!==t.Get}function NZ(t,i,e,s){for(let n=i;n=0;n--){const i=t[n];if(i.$Ot!==e)break;if(DZ(i)){if(s(i,n))break}}}r();var MZ="HlsPlaylistDownloader",LZ=function(t){return t.IWt="NWt",t.CWt="BWt",t}({}),OZ=class extends Ne{MWt(t){this.LWt.zg(),this.LWt=new bZ(this.nEt,t),this.yCt?this.OWt=t:(this.JHt=t,this.FWt=0,this.UWt=void 0,this.VWt=void 0,this.HWt=!1)}get yCt(){return void 0!==this.WWt}get qWt(){return this.HWt}EHt(){return this.WWt?this.WWt.Yy:Promise.resolve()}zWt(){return this.DHt.zWt()}Zg(){var t,i,e;this.GWt.Zg(),this.GWt=new Zc,null==(t=this.XWt)||t.Zg(),this.XWt=void 0,null==(i=this.jWt)||i.Zg(),null==(e=this.QWt)||e.Zg(),this.jWt=void 0,this.QWt=void 0,this.FWt=0,this.UWt=void 0,this.VWt=void 0,this.HWt=!1}zg(){this.LWt.zg(),this.Vo()}get fLt(){var t;return null!=(t=this.OWt)?t:this.JHt}get jCt(){if(!this.JHt.sLt.iFt||void 0===this.UWt)return!1;const t=this.JHt.sLt.Oat(this.UWt);if(!t.EFt)return!1;if(void 0!==this.VWt){if(!t.OFt(this.VWt).EFt)return!1}return!0}KWt(t){const i=this.JHt.sLt.xUt(t);if(!i)return!1;if(void 0!==this.UWt){const e=i.LOt===this.UWt;return void 0!==this.VWt?i.FFt(t)===i.OFt(this.VWt)&&e:e}return!1}YWt(t){let i;var e;if(!this.qWt&&(void 0===this.UWt||t=r&&(i=this.JWt(t))}else if(this.JHt.sLt.iFt&&void 0!==this.UWt){if(this.JHt.sLt.Oat(this.UWt).EFt&&(i=this.JWt(t),void 0!==i&&i[0].LOt===this.UWt))return}if(i){this.FWt=t;const[e,s]=i;return 0===(null==s?void 0:s.CFt)&&void 0!==e.ct?[e,void 0]:[e,s]}}JWt(t){let i,e;const s=this.JHt.sLt.bct;if(0===s.length)return;const n=this.nEt.Br.AM,r=ul.hU(t),h=function(t,i,e){const s=t.sLt.bct;if(0===s.length)return;const n=t.sLt.PUt(e.rF());if(!i.zUt(n.$Ot))return;const r=n.LOt-s[0].LOt,h=n.$Ot;let o,a,u,c=0;if(BZ(s,r,h,(t,i)=>(o=t,c=i,!0)),void 0===o&&(NZ(s,r+1,h,(t,i)=>(o=t,c=i,!0)),void 0===o))return;return i.$Ut(o.Get,o).cF(e)?(a=o,NZ(s,c+1,h,t=>i.$Ut(t.Get,t).hF(e)?(u=t,!0):(a=t,!1))):(u=o,BZ(s,c-1,h,t=>i.$Ut(t.Get,t).cF(e)?(a=t,!0):(u=t,!1))),void 0!==a&&void 0!==u?[a,u]:void 0}(this.JHt,n,r);let o;if(void 0!==h){const[t,i]=h,e=n.$Ut(t.Get,t),s=n.$Ut(i.Get,i),a=r.gF(e).rF()/s.gF(e).rF()*(i.CO-t.CO);o=t.CO+a}else o=t;const a=s[s.length-1];return a.RO<=o?(i=a,e=a.VFt(o)):s[0].CO>o?(i=s[0],e=i.OFt(0)):(i=this.JHt.sLt.xUt(o),e=null==i?void 0:i.VFt(o)),i?[i,e]:void 0}ZWt(t,i){let e,s;if(e=this.JHt.sLt.Oat(t),e&&void 0!==i){if(0===e.QOt.length)return[e,void 0];s=e.OFt(i+1)}return void 0!==e&&void 0!==s||(e=this.JHt.sLt.Oat(t+1),s=null==e?void 0:e.OFt(0)),e?[e,s]:void 0}THt(){if(this.yCt)throw new m("Cannot perform new operation while PlaylistDownloader is still busy")}$Wt(t,i){this.THt(),this.WWt=new Ga;const e=Zc.ep([i,this.GWt.Yg]);this.tqt(t,e.Yg).then(this.iqt,this.iqt)}eqt(){this.LWt.iWt()}async tqt(t,i){if(this.JHt.sLt.iFt)return;let e=this.YWt(t);for(!e&&this.LWt.YHt()&&void 0!==this.UWt&&(await this.LWt.ZHt(void 0===this.VWt?this.UWt+1:this.UWt,void 0!==this.VWt?this.VWt+1:void 0,i),e=this.YWt(t)),!e&&this.LWt.YHt()&&void 0!==this.UWt&&(await this.LWt.ZHt(this.UWt+1,0,i),e=this.YWt(t));!e;){ol.cN(MZ,"No next segment / part available, need to update playlist before continuing."),await this.LWt.eWt(i);const s=this.fLt.sLt.bct;s[0].CO>t&&(this.VWt=void 0,this.UWt=void 0,this.HWt=!1);s[s.length-1].LOt{sa(i),this.JHt.sLt.bUt=zd.Mg(),this.nEt.XVt(this.JHt);const e=Qn(i)?i.uE.dk:void 0,s=new as(me.NETWORK_ERROR,i.message,i.cause),n=new JV(t.CO,s,this.Vp,void 0,void 0,this.uqt++,e);throw this.So(n),i}).then(this.iqt,this.iqt)}async aqt(t,i,e,s){let n;if(t.YOt){var r,h;if(!e||!XY(e.BHt.Syt,null==(r=t.YOt)?void 0:r.Syt)||t.$Ot!==e.$Ot){var o;null==(o=this.XWt)||o.Zg(),this.XWt=new Ga;const i=this.cqt(t.YOt,t,s).then(()=>{this.XWt=void 0});this.XWt.$g(i)}n=null==(h=this.XWt)?void 0:h.Yy}t.EOt||i&&i.EOt?await this.dqt(t,i,n,s):await this.lqt(t,i,n,s)}async cqt(t,i,e){const s=await this.fqt(t,i,e),n=s.YOt.lk.lk.byteLength;this.DHt.vqt(s),this.So(new CZ(s.YOt.BHt.Syt,s.Km,this.Vp,i.LOt,s.fLt.JI,n,s.YOt.jut)),ol.OLt(PY,"Download initializer complete",ah(t.Syt))}async lqt(t,i,e,s){const n=await this._qt(t,i,s),r=n.yut.lk.lk.byteLength;var h;e&&await ua(e,s),this.DHt.vqt(n),this.So(new CZ(n.yut.BHt.Syt,n.Km,this.Vp,t.LOt,n.fLt.JI,r,n.yut.jut)),ol.OLt(PY,"Download complete",ah(null!=(h=null==i?void 0:i.Syt)?h:t.Syt))}async dqt(t,i,e,s){const n=this.gqt(t,i);var r;e&&await ua(e,s),this.DHt.vqt(n),ol.OLt(PY,"Download gap complete",ah(null!=(r=null==i?void 0:i.Syt)?r:t.Syt))}async _qt(t,i,e){let s;if(i){if(this.jWt)if(this.jWt.pO(i.Syt)){const t=await this.jWt.Fgt(i.Syt),n=await tA(t,e),r=new j(n);s=UZ(i,await this.zHt(r,i.UW,e),200)}else this.jWt.Zg(),this.jWt=void 0;s||(ol.OLt(PY,"Start download",ah(i.Syt)),s=await this.pqt(i,e))}else ol.OLt(PY,"Start download",ah(t.Syt)),s=await this.Uat(t,e);return this.UWt=t.LOt,this.VWt=null==i?void 0:i.CFt,this.HWt=!1,{Km:"yut",yut:s,fLt:this.JHt,$Ot:t.$Ot}}async fqt(t,i,e){let s;if(this.QWt){var n;if(this.QWt.pO(t.Syt)){const n=await ua(this.QWt.Fgt(t.Syt),e),r=await tA(n,e),h=new j(r);s=FZ(t,i,await this.zHt(h,t.jOt?[t.jOt]:[],e),200)}ol.cN(MZ,"MAP is required for segment, downloading MAP data."),null==(n=this.QWt)||n.Zg(),this.QWt=void 0}return s||(ol.OLt(PY,"Start download",ah(t.Syt)),s=await this.mqt(t,i,e)),{Km:"YOt",YOt:s,fLt:this.JHt,CO:i.CO,$Ot:i.$Ot,UW:i.UW}}gqt(t,i){const e=null!=i?i:t;return this.UWt=t.LOt,this.VWt=null==i?void 0:i.CFt,this.HWt=!0,{Km:"wqt",VHt:e.CO,HHt:e.CO+e.ct,fLt:this.JHt,yut:e,$Ot:t.$Ot}}async mqt(t,i,e){const{response:s,httpStatusCode:n}=await this.PWt.vk(t.Syt,q.Ak,he.Ek,void 0,e),r=t.jOt?[t.jOt]:[];return FZ(t,i,await this.zHt(s,r,e),n)}async Uat(t,i){if(!t.Syt)throw new m("Internal error: attempted to download an incomplete segment");let e,s;try{this.yqt(t);const n=await this.PWt.vk(t.Syt,q.Ak,he.yk,this.bqt,i);e=n.response,s=n.httpStatusCode}finally{this.Aqt()}return function(t,i,e){return{lk:{lk:i,Km:We.wZ},Km:AZ.Ak,jut:e,BHt:t,$Ot:t.$Ot}}(t,await this.zHt(e,t.UW,i),s)}async pqt(t,i){let e,s;try{this.yqt(t);const n=await this.PWt.vk(t.Syt,q.Ak,he.yk,this.bqt,i);e=n.response,s=n.httpStatusCode}finally{this.Aqt()}return UZ(t,await this.zHt(e,t.UW,i),s)}async zHt(t,i,e){const s=hh(i,t=>t.Hk===ao.$Lt);return s?s.Syt&&s.SOt?await this.Sqt.zHt(t,s.Syt,s.SOt,e):(ol.lt(MZ,"Encountered an AES-128 encrypted segment for which no initialization vector could be determined."),t):t}yqt(t){var i,e,s;this.Tqt=t,this.kqt=0,this.Eqt=zd.Mg(),this.xqt=0,this.Pqt=null!=(s=null==(e=t.Syt)||null==(i=e.iAt)?void 0:i.V)?s:0}Aqt(){this.Tqt=void 0,this.kqt=0,this.Eqt=0,this.xqt=0,this.Pqt=0}Iqt(){if(void 0!==this.Tqt)return{yut:this.Tqt,Cqt:this.xqt,Rqt:this.Pqt,Dqt:zd.Mg()-this.Eqt}}Nqt(t){return void 0!==this.Tqt&&(0!==this.kqt&&(!(this.Pqt>0&&this.xqt>=this.Pqt)&&!(t-this.kqt<500)))}constructor(t,i,e,s,n,r,h,o){super(),this.Vp=void 0,this.nEt=void 0,this.DHt=void 0,this.PWt=void 0,this.Sqt=void 0,this.JHt=void 0,this.LWt=void 0,this.OWt=void 0,this.WWt=void 0,this.Tqt=void 0,this.kqt=0,this.Eqt=0,this.xqt=0,this.Pqt=0,this.GWt=new Zc,this.XWt=void 0,this.FWt=0,this.UWt=void 0,this.VWt=void 0,this.HWt=!1,this.QWt=void 0,this.jWt=void 0,this.uqt=0,this.iqt=t=>{this.OWt&&(this.JHt=this.OWt,this.OWt=void 0,this.FWt=0,this.UWt=void 0,this.VWt=void 0,this.HWt=!1),this.WWt&&(t&&!Ce(t)?this.WWt.Ky(t):(this.uqt=0,this.WWt.Qy()),this.WWt=void 0)},this.bqt=(t,i)=>{this.xqt=t,t>0&&0===this.kqt&&(this.kqt=zd.Mg()),void 0!==i&&(this.Pqt=i),this.So(new IZ(this.Vp))},this.Vp=t,this.nEt=e,this.DHt=s,this.JHt=i,this.LWt=new bZ(e,i),this.Sqt=new wZ(h,n,o),this.PWt=new yZ(n,r,function(t){switch(t){case dl.Mk:return $a.Mk;case dl.Bk:return $a.Bk;case dl.HU:case dl.YLt:return $a.LT;default:return $a.yk}}(i.Km),o)}};function FZ(t,i,e,s){return{lk:{lk:e,Km:We.wZ},Km:AZ.JLt,jut:s,BHt:t,$Ot:i.$Ot}}function UZ(t,i,e){return{lk:{lk:i,Km:We.wZ},jut:e,Km:AZ.ZLt,BHt:t,$Ot:t.PFt.$Ot}}r();var VZ=class{get uHt(){return this.Bqt}get Mqt(){const t=[];for(const e of this.Lqt)if("yut"===e.Km){const s=e.yut.BHt,n=RZ(e.fLt,this.pVt,s);var i;t.push({yut:s,fLt:e.fLt,CO:n,RO:n+(null!=(i=s.ct)?i:0)})}else"wqt"===e.Km&&t.push({yut:e.yut,fLt:e.fLt,CO:e.VHt,RO:e.HHt});return t}get Oqt(){const t=[];return this.Fqt.forEach(i=>{for(const e of i.Uqt)"yut"===e.Km?t.push({yut:e.BHt,fLt:e.fLt,CO:e.CO,RO:e.CO+e.ct}):"wqt"===e.Km&&t.push({yut:e.yut,fLt:e.fLt,CO:e.VHt,RO:e.HHt})}),t}vqt(t){"YOt"===t.Km&&(this.Bqt=t.YOt),this.Lqt.push(t),this.Vqt&&(this.Vqt.Qy(),this.Vqt=void 0)}zWt(){return this.Lqt[0]}Hqt(t){_e(this.Lqt,t)}nqt(){return null!=this.Vqt||(this.Vqt=new Ga),this.Vqt.Yy}Wqt(t){this.qqt(t.iat).Wqt(t)}zqt(t){return this.qqt(t).zqt()}RHt(t){this.qqt(t.iat).RHt(t)}Gqt(t){var i;null==(i=this.Fqt.get(t))||i.zg()}Xqt(t){return this.qqt(t).Xqt()}qqt(t){if(this.Fqt.has(t))return this.Fqt.get(t);{const i=new HZ;return this.Fqt.set(t,i),i}}jy(){this.jqt(),this.Qqt()}jqt(){this.Bqt=void 0,Wt(this.Lqt)}Qqt(){this.Fqt.forEach(t=>t.jy())}zg(){this.Fqt.forEach(t=>t.zg()),this.Fqt.clear(),this.jy(),this.Vqt&&(this.Vqt.Zg(),this.Vqt=void 0)}constructor(t){this.Lqt=[],this.Fqt=Ba(),this.pVt=void 0,this.Vqt=void 0,this.Bqt=void 0,this.pVt=t}},HZ=class{get Uqt(){return this.Kqt}Wqt(t){this.Kqt.push(t),this.Yqt&&(this.Yqt.Qy(),this.Yqt=void 0)}zqt(){return this.Kqt[0]}RHt(t){_e(this.Kqt,t)}Xqt(){return null!=this.Yqt||(this.Yqt=new Ga),this.Yqt.Yy}jy(){Wt(this.Kqt)}zg(){this.jy(),this.Yqt&&(this.Yqt.Zg(),this.Yqt=void 0)}constructor(){this.Kqt=[],this.Yqt=void 0}};r(),r(),r();var WZ=class extends gp{constructor(t,i){super(zt.Jqt),this.fLt=void 0,this.Rrt=void 0,this.fLt=t,this.Rrt=i}};r();var qZ=class extends gp{constructor(t){super(zt.Zqt),this.fLt=void 0,this.fLt=t}};r();var zZ=class extends gp{constructor(t,i){super(zt.$qt),this.fLt=void 0,this.Olt=void 0,this.fLt=t,this.Olt=i}};r();var GZ=class extends gp{constructor(t,i){super(zt.tzt),this.fLt=void 0,this.izt=void 0,this.fLt=t,this.izt=i}};r();var XZ=class extends gp{constructor(){super(zt.ezt)}},zt=function(t){return t.Jqt="szt",t.$qt="nzt",t.tzt="rzt",t.Zqt="hzt",t.ezt="ozt",t}({}),jZ=class extends Ne{get azt(){return this.uzt}czt(t){for(const i of this.uzt)Ct(t,i)||this.DHt.Gqt(i);this.uzt=t}get yCt(){return void 0!==this.dzt}EHt(){var t,i;return null!=(i=null==(t=this.dzt)?void 0:t.Yy)?i:Promise.resolve()}THt(){if(this.yCt)throw new m("Cannot perform new operation while transmuxer is still busy")}lzt(t,i){}fzt(t){this.THt(),this.dzt=new Ga;const i=i=>{this.vzt(t,i)};this._zt(t,this.hT.Yg).then(i,i)}gzt(t){this.THt(),this.dzt=new Ga;const i=i=>{this.vzt(t,i)};this.pzt(t,this.hT.Yg).then(i,i)}mzt(t){this.THt(),this.dzt=new Ga;try{for(const i of this.azt){const e={Km:"wqt",iat:i,VHt:t.VHt,HHt:t.HHt,$Ot:t.$Ot,fLt:t.fLt,yut:t.yut};this.Wqt(e)}}finally{this.vzt(t)}}vzt(t,i){this.dzt&&(!i||Ce(i)||function(t){return t instanceof QJ}(i)?(Ce(i)||this.DHt.Hqt(t),this.dzt.Qy(),this.dzt=void 0):this.dzt.Ky(i),this.So(new XZ))}wzt(t,i){this.So(new WZ(t,i))}yzt(t,i){this.So(new zZ(t,i))}bzt(t,i,e){XJ(i)&&this.So(new GZ(t,e))}Azt(t){this.So(new qZ(t))}Wqt(t){Ct(this.uzt,t.iat)&&this.DHt.Wqt(t)}Szt(t){return this.DHt.zqt(t)}RHt(t){this.DHt.RHt(t)}Tzt(t){return this.DHt.Xqt(t)}Zg(){this.hT.Zg(),this.hT=new Zc}constructor(t,i,e){super(),this.DHt=void 0,this.pVt=void 0,this.uzt=void 0,this.dzt=void 0,this.hT=new Zc,this.DHt=t,this.pVt=i,this.uzt=e}};function QZ(t,i){return XJ(t)?0:_.min(t.CO,i)}function KZ(t,i){var e;return _.max(t.CO,i)+(null!=(e=t.ct)?e:0)}var YZ=class extends jZ{_zt(t,i){fr(i);const e={Km:"rRt",lk:t.YOt.lk,iat:this.azt[0],$Ot:t.$Ot,kzt:{Rrt:"",UW:t.UW},CO:t.CO,fLt:t.fLt,BHt:t.YOt.BHt};return this.Wqt(e),Promise.resolve()}async pzt(t,i){fr(i);const e=t.yut.BHt;let s;void 0!==e.Get?(this.pVt.zUt(t.$Ot)||await ua(this.pVt.XUt(t.$Ot),i),s=this.pVt.$Ut(e.Get,e).rF()):s=e.CO;const n=QZ(e,s),r=KZ(e,n);var h;const o={Km:"yut",lk:t.yut.lk,iat:this.azt[0],VHt:n,HHt:r,CO:s,ct:null!=(h=e.ct)?h:0,EU:0,$Ot:t.$Ot,fLt:t.fLt,BHt:t.yut.BHt};this.Wqt(o)}constructor(t,i,e){super(t,i,[e])}};function JZ(t,i){let e=Uo.rL();for(const s of t){let n=s.CO;if(s.fLt.sLt.iFt&&XJ(s.yut))n=0;else{const e=t=>s.fLt===t.fLt&&jJ(t.yut,s.yut),r=hh(t,e);if(void 0!==r)n=_.min(n,r.RO);else{const t=hh(i,e);void 0!==t&&(n=_.min(n,t._Ht.An(0)))}}e=e.HM(Uo.nL(n,s.RO))}return e}r();var ZZ=.001,$Z=class{get Ezt(){return this.xzt}get fLt(){return this.Pzt.fLt}MWt(t){this.Pzt.MWt(t)}get yCt(){return this.Pzt.yCt||this.Izt.yCt||this.xzt.some(t=>t.yCt)}Czt(t){const i=this.xzt.length>0,e=t.slice();for(let t=this.xzt.length-1;t>=0;t--){const i=this.xzt[t];if(!mZ(i))throw new m("Invalid state");const s=tt(e,t=>t.Km===i.Km);s>=0&&!i.AHt?(i.kHt(e[s]),Ra(e,s)):Ra(this.xzt,t)}for(const t of e){const i=new lZ(t);this.xzt.push(new pZ(t.Km,t,this.Rzt,i,this,this.Dzt,this.Nzt))}i&&e.length>0&&this.Rzt.jy();const s=t.map(t=>t.Km);this.Izt.czt(s)}iJ(t){var i;const e=(null==(i=this.Mz)?void 0:i.iJ(t))||!1;return e&&(this.Zg(),this.Rzt.jy()),e}Bzt(t){const i=this.xzt[0];if(void 0!==i){if(i.Km!==at.LT||i.yCt)throw new m("Invalid state");if(!i.AHt)return void i.kHt(t)}const e=new lZ(t),s=new pZ(at.LT,t,this.Rzt,e,this,void 0,void 0);this.xzt=[s]}get uHt(){const t=this.Rzt.uHt;if(t)return t;if(this.xzt.length>0){const t=this.xzt[0].mHt.uHt;if(t&&this.xzt.every(i=>i.mHt.uHt===t))return t}}Bat(){for(const t of this.xzt)t.mHt.fHt()}get Mzt(){const t=JZ(this.Rzt.Mqt.concat(this.Rzt.Oqt),hs(this.xzt,t=>t.mHt.bct)).MM();let i;if(0===this.xzt.length)i=t;else{i=Uo.hL();for(const t of this.xzt)i=i.Mn(t.mHt.Fx);for(const t of this.xzt)i=i.qM(t.wHt);i=i.HM(t)}return i.VM(ZZ)}get Lzt(){const t=JZ(this.Rzt.Oqt,hs(this.xzt,t=>t.mHt.bct)).MM();let i;if(0===this.xzt.length)i=t;else{i=Uo.hL();for(const t of this.xzt)i=i.Mn(t.mHt.Fx);i=i.HM(t)}return i}Tdt(t){const i=this.Mzt.iL(t,ZZ);return i?i.An(i.V-1):t}KWt(t){return!!this.Mzt.iL(t,ZZ)||this.Pzt.KWt(t)}Ozt(t){return this.Lzt.Cr(t,ZZ)}Fzt(t,i,e){for(const t of this.xzt){const e=t.mHt,s=e.Npt;if(void 0!==s&&i>=s&&!e.Fx.MM().Cr(s))return!0}return i-tt.Zg())}zg(){this.Zg(),this.Pzt.zg()}constructor(t,i,e,s,n,r){this.Pzt=void 0,this.Rzt=void 0,this.Izt=void 0,this.Dzt=void 0,this.Nzt=void 0,this.Mz=void 0,this.xzt=void 0,this.Pzt=t,this.Rzt=i,this.Izt=e,this.Dzt=s,this.Nzt=n,this.Mz=r,this.xzt=[]}};r();var t$=class extends gp{constructor(){super(vY.iLt)}};r();var i$=class extends gp{constructor(){super(vY.$Mt)}};r(),r();var e$="LazyMediaBuffer",s$=class extends Ne{get GT(){return this.jS}get V3(){return this.Vp}get Cd(){if(!this.Wrt)throw new as(me.MEDIA_LOAD_ERROR,"Cannot get the configuration of an uninitialized MediaBuffer.");return this.Wrt.Cd}get VY(){return this.KY}set VY(t){this.KY=t,this.Wrt&&(this.Wrt.VY=t)}get Fx(){return this.Wrt?this.Wrt.Fx:Uo.rL()}get W3(){return this.Wrt?this.Wrt.W3:this.q3.s$}get zY(){return this.ZY}set zY(t){this.ZY=t,this.Wrt&&(this.Wrt.zY=t)}G3(t,i){ol.OLt(e$,"Marking gap from "+t+" to "+i+"."),this.q3.r$(t,i),this.Wrt&&this.Wrt.G3(t,i)}X3(t,i){ol.OLt(e$,"Removing gap from "+t+" to "+i+"."),this.q3.h$(t,i),this.Wrt&&this.Wrt.X3(t,i)}Hzt(t){this.Wrt=t,this.Wrt.zY=this.ZY,this.Wrt.VY=this.KY;const i=this.q3.s$;for(let t=0;tt.Rrt&&t.Rrt.W9&&Tr(t.Rrt.W9,n));if(0===e.length)continue;if(void 0===s)return e;void 0===i&&(i=e);const r=l$(e,s);if(void 0!==r)return r}if(void 0!==i)return i}if(void 0!==s){const i=l$(t,s);if(void 0!==i)return i}return t}(t,i),r=f$(n,s),h=r.length>0?r:n;switch(e.WY.type){case xa.BANDWIDTH:{const t=e.jY,i=h.filter(i=>i.IW<=t);if(i.length>0)return uf(i,t=>t.IW)}case xa.PERFORMANCE:return $i(h,t=>t.IW);case xa.QUALITY:return uf(h,t=>t.IW)}}function l$(t,i){for(const e of i){const i=t.filter(t=>t.Rrt&&t.Rrt.q9&&Tr(t.Rrt.q9,e));if(0!==i.length)return i}}function f$(t,i){return t.filter(t=>v$(t,i))}function v$(t,i){const e=i+2e3,s=0===t.fFt.length||t.fFt.some(t=>t.sLt.bUtt.sLt.bUt"*"===i||t===i||nl(t,i+"-"),!0),_$((t,i)=>{const e=t.split("-"),s=i.split("-");let n=0,r=0;if("*"!==s[r]&&e[n]!==s[r])return!1;for(n++,r++;r{let e,s=i;for(;;){if("*"===s||t===s)return!0;if(e=s.lastIndexOf("-"),e<0)return!1;"-"===s.charAt(e-2)&&(e-=2),s=s.slice(0,e)}});function p$(t,i){const e=t&&"string"==typeof t?[t]:t;if(!e||"object"!=typeof e||!("length"in e))throw new m("Invalid "+i+" `"+e+"`, expected non-empty string");return e}function m$(t){const i=hh(t,t=>t.nLt),e=t.filter(t=>t.rLt),s=zd.Mm,n=e.map(t=>t.bs).filter(it),r=g$(n,s);return r?hh(e,t=>t.bs===r):i}function w$(t){var i;return null!=(i=m$(t))?i:t[0]}r();var y$=class extends ms{hGt(t){const i=this.iV.sI(us.HU,t.l,t.l,t.bs,t.nLt,void 0,void 0,t.cLt.map(xY).filter(it));this.oGt.set(t.JI,i),this.tt(i)}mFt(t){const i=this.oGt.get(t.JI);i&&(this.oGt.delete(t.JI),this.iV.rV(i))}JU(t){const i=this.aGt(t);i&&(Wr(this._Lt.uGt(i)),this.oGt.forEach(i=>{i!==t&&(i.Qk=xh.Nh)}))}ZU(t){const i=this.aGt(t);i&&this._Lt.cGt&&this._Lt.cGt===i&&Wr(this._Lt.uGt(void 0))}dGt(t){return this.oGt.get(t.JI)}aGt(t){const i=this._Lt.vLt;if(i)return hh(i.vFt,i=>t===this.dGt(i))}eV(t,i,e){const s=ht(t,i,e);return this.oGt.forEach((i,e)=>{i===t&&this.oGt.set(e,s)}),s}async hr(){await super.hr(),this.oGt.clear()}constructor(t,i){super(i),this._Lt=void 0,this.oGt=re(),this._Lt=t}},ka="LLHLSPlayer",b$=[Jr.TM,Jr.kM,Jr.EM,Jr.AI],A$=[d.Kw,d.xw,d.Lw,d.Bw],S$=[d.Ww,d.qw,d.Gw,d.Xw,d._y,d.iy,d.ey,d.sy,d.oy],T$=[d.Ww,d.qw,d.sy,d.oy],k$=class extends Ne{get OL(){var t;if(this.ct!==1/0)return;const i=this.Vx;if(i){return(Date.now()-i.getTime())/1e3}const e=null==(t=this._Lt)?void 0:t.lGt;return e?e-this.zx:void 0}get fGt(){const t=this.vGt;for(const i of t){if(!i.sLt.iFt)return!1;const t=hf(i.sLt.bct,-1);if(t&&t.$Ot!==this._Gt)return!1}return!0}get vLt(){var t;return null==(t=this._Lt)?void 0:t.vLt}get CLt(){var t;return null==(t=this._Lt)?void 0:t.CLt}get DLt(){var t;return null==(t=this._Lt)?void 0:t.DLt}get cGt(){var t;return null==(t=this._Lt)?void 0:t.cGt}get vGt(){return this._Lt?this._Lt.vGt:[]}get ht(){return this.tO}get Fx(){let t=this.PL.Fx;return void 0!==this._Lt&&(t=t.Ly(-this._Lt.EU).Mn(Uo.hL())),t._s()}get Vx(){if(this.vLt){const t=this.zx;return this.vLt.gFt(t)}}set Vx(t){if(!t||!this.vLt)return;const i=this.vLt.pFt(t);void 0!==i&&this.Xx(i,{iq:!1,gGt:!0})}get bt(){var t;return null==(t=this._Lt)?void 0:t.Mc}get zx(){var t;return null!=(t=this.pGt)?t:this.mGt(this._Lt)}set zx(t){this.Xx(t)}Xx(t,i){var e,s,n,r;ol.cN(ka,"Seeking to "+t+" s.");const h={iq:null!=(s=null==i?void 0:i.iq)?s:t===1/0,gGt:null==(n=null==i?void 0:i.gGt)||n,zOt:null!=(r=null==i?void 0:i.zOt)&&r};this.pGt=t,this.wGt=h,this.yGt=!0,this.$kt=!0,null==(e=this.JW)||e.KP(),this.So(new ji(t)),this.T9.Zg(),this.bGt&&(zd.Lg(this.AGt),h.gGt?this.AGt=zd.Og(()=>this.SGt(t,h),50):this.SGt(t,h))}SGt(t,i){zd.Lg(this.AGt);const e=[this.Ypt,this.TGt,this.k9].filter(it);this.T9=new Zc,this.T9.$g(this.uV.Yg),this.k9=Cu(this.E9(e,t,i,this.T9.Yg),this.T9).catch(this.kGt)}get ct(){var t,i;if(void 0===this.EGt&&this.fGt){const t=this.PL.ct;if(!S(t))return this.xGt(this._Lt,t)}return null!=(i=null==(t=this._Lt)?void 0:t.ct)?i:NaN}get Qx(){if(!this.fGt)return!1;if(this.xP&&void 0!==this._Lt&&this.bGt){const t=this.zx,i=this._Lt.PGt;return isFinite(i)&&t>=i}return this.PL.Qx||this.IGt()}get lt(){return this.nq}get Jx(){return this.rq}get $x(){}get iP(){}get sP(){return!1}get rP(){var t,i;return Y({},{rO:0,hO:0,oO:0,aO:0,uO:0,cO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.PL.hP(),{uO:null!=(i=null==(t=this._Lt)?void 0:t.uO)?i:0,aO:this.Mz.CY.IW})}get Br(){var t;return null==(t=this._Lt)?void 0:t.Br}get CGt(){var t;return null==(t=this._Lt)?void 0:t.CGt}get oP(){return this.PL.oP}set oP(t){this.PL.oP=t}get cP(){var t,i;return null==(i=null==(t=this._Lt)?void 0:t.cP)||i}get lP(){return this.PL.lP}get vP(){return this.PL.vP}set vP(t){ol.cN(ka,"Setting playback rate to "+t+"."),this.PL.vP=t}get pP(){return this.Dkt._s()}get Dkt(){let t=this.PL.pP;return void 0!==this._Lt&&(t=t.Ly(-this._Lt.EU).Mn(Uo.hL())),t}get wP(){return this.oq}set wP(t){this.oq!==t&&(this.oq=t,this.RGt())}get AP(){var t;let i=this.PL.AP;return(null==(t=this._Lt)?void 0:t.DGt)&&(i=_.max(Lr.Qn,i)),i}get sUt(){var t,i;return null!=(i=null==(t=this._Lt)?void 0:t.sUt)?i:Uo.rL()}get kP(){return this.Tkt._s()}get Tkt(){var t,i;let e=null!=(i=null==(t=this._Lt)?void 0:t.kP)?i:Uo.rL();if(0===e.V)return e;if(this.aq&&this.fGt&&this.aq.ct!==1/0&&(e=new Uo([e.Tn(0),this.xGt(this._Lt,this.aq.ct)])),this._Lt&&!this._Lt.iFt){const t=this.Dkt,i=e.An(e.V-1);if(t.V>0&&t.An(t.V-1)>i){let s=t.An(t.V-1);const n=this._Lt.sUt;n&&n.V>0&&(s=_.min(s,n.An(n.V-1))),e=e.HM(new Uo([i,s]))}}return e}get xP(){var t;return null!=(t=this.yGt)?t:this.PL.xP}get uq(){}get nt(){return this.Gl}get rt(){return this.sO}get DP(){var t,i;return this.PL.DP||(null==(i=this.vLt)||null==(t=i.RRt)?void 0:t.Mi)||0}get MP(){var t,i;return this.PL.MP||(null==(i=this.vLt)||null==(t=i.RRt)?void 0:t.Ti)||0}get OP(){return this.PL.OP}set OP(t){ol.cN(ka,"Setting volume to "+t+"."),this.PL.OP=t}get VP(){return this.Lz}get WP(){return!1}set WP(t){}get dq(){return this.lq}YP(){return!1}qP(){return this.PL.Ma}Aa(){return this.PL.Sq}sI(t){var i;const e=this.PL.Tq(t);var s;return e.EU=null!=(s=null==(i=this._Lt)?void 0:i.EU)?s:0,this.axt.tt(e),e}we(){ol.cN(ka,"Hiding the player."),this.PL.we()}jP(){var t;ol.cN(ka,"Pausing the player."),this.PL.jP(),(null==(t=this.JW)?void 0:t.oL)&&this.JW.KP()}async QP(){this.d9=!0;const t=this.PL.QP();if(this.Qx){const t=this.Tkt;t.V>0&&this.Xx(t.Tn(0),{gGt:!1})}this.bGt||await this.RGt(),this.tkt(),await t,this.tEt()}tkt(){if(this.bGt&&this.$kt){if(!this.Skt()){var t;const i=null==(t=this.vLt)?void 0:t.sLt;if(null==i?void 0:i.iFt){let t=!0,e=0;const s=i.Tn;if(!this.$kt&&s&&(t=!s.zOt,e=s.qOt,e<0)){const t=i.sUt;e+=t.An(t.V-1)}this.SGt(e,{iq:t})}else this.SGt(1/0,{iq:!0})}this.NGt()&&this.SGt(1/0,{iq:!0})}}Skt(){var t;const i=this.Tkt;if(0===i.V)return!0;const e=this.zx,s=null==(t=this._Lt)?void 0:t.BGt,n=null==s?void 0:s.zM(e);return(n&&n>0?s.An(n):e)>=i.Tn(0)}NGt(){const t=this.zx;return x$(t,this.CLt)||x$(t,this.DLt)}OEt(){this.nq=void 0,this.rq=void 0}Qq(t){this.nq||(Wr(this.hr()),this.nq=ar(t),this.rq=t,this.So(new el(t)))}be(){ol.cN(ka,"Showing the player."),this.PL.be()}JP(){throw new m("Not implemented")}ZP(){throw new m("Not implemented")}$P(){}tI(){this.bGt&&Wr(this.MGt({tI:!0}))}async Ta(t,i,e){const s={stack:[],error:void 0,hasError:!1};try{if(ol.cN(ka,"Setting the player source to "+t.src+"."),this.OEt(),this._Lt&&(await this.hr(),fr(e)),Ak(t))return;const r=Es(s,Zc.ep([e]),!1);var n;if(this.pq.BW(t.contentProtection),void 0!==this.EGt&&this.EGt.Mc===t)this._Lt=this.EGt,this._Lt.mn(S$,this.LGt),this.uV=this.OGt,this.uV.$g(r.Yg),this.OGt=new Zc,this.FGt=void 0,null==(n=this.UGt)||n.Zg(),this.UGt=void 0,this.EGt=void 0,this.VGt=!1,this.HGt!==this._Lt&&(this.HGt=void 0),this._Lt.WGt(this.PL);else void 0!==this.EGt&&(await this.CP(),await this.qGt()),this.uV=Zc.ep([r.Yg]),this._Lt=this.zGt(t,i,void 0,this.PL);this._Lt.wn(S$,this.Rs),this._Lt.wn(vY.iLt,this.GGt),this.tO.OI=this._Lt.ht,this.sO.OI=this._Lt.rt,this.XGt.OI=this._Lt.nt;const h=this._Lt.jGt;h&&(this.JW=new ZG(this,this.PL,h),this.JW.Rt=!0,this.Lz.Ea(this.JW)),AP(this.Gl),this.QGt(),this.Xkt(),this.KGt.forEach(this.Rs),this.KGt=[],this.RGt(),r.zg()}catch(t){s.error=t,s.hasError=!0}finally{Zs(s)}}async IP(t,i,e,s){fr(s),void 0!==this.EGt&&await this.CP(),fr(s),this.EGt=this.zGt(t,i,e,void 0),this.EGt.wn(S$,this.LGt)}async CP(){var t;void 0!==this.EGt&&(this.OGt.Zg(),null==(t=this.UGt)||t.Zg(),this.UGt=void 0,void 0!==this.FGt&&(await this.FGt.catch(gs),this.FGt=void 0),await this.EGt.zg(),this.OGt=new Zc,this.HGt===this.EGt&&(this.HGt=void 0),this.EGt=void 0,this.VGt=!1,this.KGt=[])}zGt(t,i,e,s){return null!=this.YGt||(this.YGt=this.JGt.jet()),new E$(this,t,i,this.aV,this.Mz,this.ZGt,this.Sut,this.$Gt,this.XHt,this.YGt,this.Ndt,e,s)}RGt(){return this.Ypt=this.tXt(this.Ypt,this.uV.Yg).catch(this.Lmt),this.Ypt}async tXt(t,i){if(t&&(await t,fr(i)),!this._Lt)return;const e=this.oq;e===Dn.HL||this.d9?(await this.iXt(i),await this.eXt(i)):e===Dn.zU&&await this.iXt(i)}async iXt(t){fr(t),void 0===this._Lt||this._Lt.DGt||(await this._Lt.iXt(t),this.Cq.zV(),this.QGt())}QGt(){var t;if(this.JW)return;const i=null==(t=this._Lt)?void 0:t.jGt;i&&(this.JW=new ZG(this,this.PL,i),this.Lz.Ea(this.JW))}get sXt(){return this.bGt}async eXt(t){fr(t),this.bGt||(this.bGt=!0,await this._Lt.MGt(this.CLt,this.DLt,this.cGt,{nXt:!0}))}rXt(){const t=this.EGt;return void 0===t?Promise.resolve():(0===t.EU&&(t.EU=this._Lt.EU+this._Lt.ct),null!=this.UGt||(this.UGt=new Ga),void 0===this.FGt&&(this.FGt=t.iXt(this.OGt.Yg),this.UGt.$g(this.FGt)),this.UGt.Yy)}hXt(){var t;return(null!=(t=this.UGt)?t:this.UGt=new Ga).Yy}mGt(t){return this.xGt(t,this.PL.zx)}xGt(t,i){let e=i;return t===this._Lt&&void 0!==this.EGt&&this.EGt.EU>0&&(e=_.min(e,this.EGt.EU)),void 0!==t&&(e=_.max(0,e-t.EU)),e}IGt(){if(void 0===this.EGt||0===this.EGt.EU)return!1;if(!this.VGt)return!1;return this.PL.zx+.25>=this.EGt.EU}get oXt(){return void 0===this._Lt?[]:void 0===this.EGt?this._Lt.aXt:this._Lt.aXt.concat(this.EGt.aXt)}uXt(){var t,i;return{Ti:this.PL.Ti,Mi:this.PL.Mi,qLt:YQ(this.PL),udt:null==(i=this.bt)||null==(t=i.abr)?void 0:t.restrictToPlayerSize}}cXt(){return new c$(this.aq)}MGt(t){void 0===t&&(t={});const i={bLt:t.bLt||!1,SLt:t.SLt||!1,ALt:t.ALt||!1,tI:t.tI||!1,nXt:t.nXt||!1},e=[this.TGt,this.k9].filter(it);return this.T9.Zg(),this.T9=new Zc,this.T9.$g(this.uV.Yg),this.dXt.Zg(),this.dXt=new Zc,this.dXt.$g(this.uV.Yg),this.TGt=Cu(this.lXt(e,i,this.dXt.Yg),this.dXt).catch(this.kGt),this.TGt}async lXt(t,i,e){var s,n,r;if(!this.bGt)return void await this._Lt.fXt(e);await Promise.all(t.map(t=>t.catch(gs))),await this.vXt(),this._Xt(),await this.gXt(e),await this.pXt(i.SLt,i.ALt),fr(e);const h=await this._Lt.mXt();fr(e);const o=await this.wXt(h,i.tI,e),a=null==(s=this.aq)?void 0:s.e4,u=null==(n=this.aq)?void 0:n.s4;if(this._Lt.yXt(void 0!==a,void 0!==u,i.bLt||o,i.SLt,i.ALt),this._Lt.bXt(i.bLt),void 0!==this.EGt&&(this.EGt.yXt(void 0!==a,void 0!==u,i.bLt||o,i.SLt,i.ALt),this.EGt.bXt(i.bLt)),this._Lt.Czt(a,u),void 0!==this.EGt){const t=await this.EGt.mXt();t&&this.aq&&this.aq.IZ(t)?(this.EGt.Czt(a,u),this.VGt=!0):(this.EGt.Czt(void 0,void 0),this.VGt=!1)}this.AXt(),fr(e);try{var c;await Promise.all([this._Lt.SXt(e),null==(c=this.EGt)?void 0:c.SXt(e)].filter(it))}catch(t){sa(t)}if(fr(e),this.V4(),this._Lt.BUt(),null==(r=this.EGt)||r.BUt(),void 0===this.pGt){if(!this.$kt){const t=this._Lt.TXt;if(t)return void this.SGt(t.YF,{iq:t.iq});if(this._Lt.EU>0)return void this.SGt(0,{iq:!1})}this.oXt.length>0&&this.kXt()}else this.SGt(this.pGt,this.wGt)}async wXt(t,i,e){if(!i&&this.aq){if(!t)return!1;if(this.aq.IZ(t))return await this.gXt(e),await this.aq.RZ(t),!1}for(const t of this._Lt.aXt)t.Ezt.forEach(t=>t.Zg());this.PL.G7();try{let i;if(this.aq&&await this.PL.hr(),t)i=await this.PL.Un(t);else{const t=void 0!==this.CLt,e=void 0!==this.DLt;i=new r$(this.PL,t,e)}this.EXt(i)}finally{this.PL.X7()}return!0}EXt(t){this.aq=t,this.V4(),this.WTt(),this.qTt()}V4(){var t,i;const e=this.aq,s=void 0!==this.EGt&&this.VGt?this.EGt:this._Lt;if(e&&void 0!==s&&(s!==this.HGt||S(e.ct))){var n;s!==this.HGt&&e.I3();const t=(null!=(n=s.xXt)?n:NaN)+s.EU;t>0&&e.F4(t),this.HGt=s}null==(t=this._Lt)||t.BUt(),null==(i=this.EGt)||i.BUt()}async pXt(t,i){if(!this.aq)return;const e=[];t&&this.aq.e4&&e.push(this.aq.e4.pS(0,1/0)),i&&this.aq.s4&&e.push(this.aq.s4.pS(0,1/0)),await Promise.all(e)}WTt(){const t=this.aq;t&&(t.s4&&(t.s4.VY=this.Mz.YY),t.e4&&(t.e4.VY=this.Mz.YY))}qTt(){const t=this.aq;t&&(t.s4&&(t.s4.zY=this.Mz.zY),t.e4&&(t.e4.zY=this.Mz.zY))}AXt(){var t,i,e,s;const n=void 0!==(null==(t=this.aq)?void 0:t.e4),r=void 0!==(null==(i=this.aq)?void 0:i.s4);null==(e=this._Lt)||e.AXt(n,r),null==(s=this.EGt)||s.AXt(n,r)}async E9(t,i,e,s){await Promise.all(t.map(t=>t.catch(gs))),fr(s),await this.vXt(),fr(s),this.pGt=void 0,this.yGt=void 0,this.$kt=!0;const n=(e.zOt?this.sUt:this.Tkt).LM(i)+this._Lt.EU,r=this.PL.ww(d.Zw,s);this.PL.Oy(n,e.iq),this.bGt&&this._Lt.aXt.length>0&&(this.Br.AM.lVt(),this.PXt(this.zx),this.kXt()),await r,this.tEt()}tEt(){const t=this.JW;if(void 0===t)return;const i=this.OL;if(this.lP||this.xP||void 0===i)return;i0&&(this.oXt.forEach(t=>t.Uzt()),await this._Nt(),this.vNt(),this.oXt.forEach(t=>t.Pzt.eqt()))}vNt(){if(this.BXt)return;const t=()=>{this.BXt=void 0};this.MXt=new Zc,this.MXt.$g(this.uV.Yg),this.BXt=Cu(this.LXt(this.MXt.Yg),this.MXt).catch(this.kGt).then(t,t)}async _Nt(){var t;null==(t=this.MXt)||t.Zg();const i=this.BXt;this.BXt=void 0,i&&await i}async LXt(t){fr(t),await this.OXt(this._Lt,t),fr(t),void 0!==this.EGt&&(await ua(this.rXt(),t),fr(t),await this.OXt(this.EGt,t))}async OXt(t,i){fr(i);const e=t.aXt;for(;;){const s={stack:[],error:void 0,hasError:!1};try{const n=[],r=_.max(0,this.PL.zx-t.EU);for(const t of e){const e=t.Pzt,s=t.Tdt(r);if(e.yCt)n.push(e.EHt());else if(t.Fzt(r,s,this.Mz.YY)||e.qWt){const r=e.fLt.sLt,h=e.YWt(s);if(void 0===h){if(r.iFt)continue;const t=r.bct;t.length&&t[0].CO>s&&(this.zx=1/0),e.rqt(),e.$Wt(s,i)}else{const[i,s]=h;e.Lat(i,s,t.uHt),t.Izt.lzt(i,s)}n.push(e.EHt())}}const h=Es(s,Zc.ep([i]),!1);if(0===n.length){e.every(t=>t.Pzt.jCt)||n.push(this.PL.ww(d.py,h.Yg));for(const t of e)void 0!==t.Pzt.zWt()&&n.push(t.Izt.ww([zt.Zqt,zt.ezt],h.Yg));if(0===n.length)break}await ua(Promise.race(n),h.Yg)}catch(t){s.error=t,s.hasError=!0}finally{Zs(s)}}}RXt(){if(this.FXt)return;const t=()=>{this.FXt=void 0};this.UXt=new Zc,this.UXt.$g(this.uV.Yg),this.FXt=Cu(this.VXt(this.UXt.Yg),this.UXt).catch(this.kGt).then(t,t)}async IXt(){var t;null==(t=this.UXt)||t.Zg();const i=this.FXt;this.FXt=void 0,i&&await i}async VXt(t){fr(t);const i=this.oXt;for(;;){const e=[];for(const t of i){const i=t.Pzt,s=t.Izt;if(s.yCt)e.push(s.EHt());else{const t=i.zWt();t?"yut"===t.Km?(s.gzt(t),e.push(s.EHt())):"YOt"===t.Km?(s.fzt(t),e.push(s.EHt())):"wqt"===t.Km&&(s.mzt(t),e.push(s.EHt())):e.push(i.sqt())}}if(0===e.length)break;await ua(Promise.race(e),t)}}DXt(){if(this.HXt)return;this.WXt=new Zc,this.WXt.$g(this.uV.Yg);const t=()=>{this.HXt=void 0};this.HXt=Cu(this.qXt(this.WXt.Yg),this.WXt).catch(this.kGt).then(t,t)}async CXt(){var t;null==(t=this.WXt)||t.Zg();const i=this.HXt;this.HXt=void 0,i&&await i}async qXt(t){fr(t);let i=await this.zXt(this._Lt,t);void 0!==this.EGt&&this.VGt&&i&&(fr(t),await ua(this.hXt(),t),fr(t),this.V4(),i=await this.zXt(this.EGt,t)),i?this.aq.F3():this.aq.I3()}async zXt(t,i){for(;;){const e=t.aXt;e.forEach(t=>t.Bat());const s=_.max(0,this.PL.zx-t.EU),n=[],r=[];for(const t of e){const i=t.Izt;for(const e of t.Ezt){const t=mZ(e)?n:r;if(e.yCt)t.push(e.EHt());else if(!e.xHt(s)){const s=i.Szt(e.Km);s?"yut"===s.Km&&s.$Ot===this._Gt?(e.Pdt(s),t.push(e.EHt())):"rRt"===s.Km&&s.$Ot===this._Gt?(e.J2(s),t.push(e.EHt())):"wqt"===s.Km&&(e.UHt(s),t.push(e.EHt())):r.push(i.Tzt(e.Km))}}}if(0===n.length){if(await this.GXt(t,e,s,i))continue}if(0===n.length&&0===r.length){return e.every(t=>t.Ezt.length>0&&t.Ezt.every(t=>t.xHt(s)))}await ua(Promise.race([...n,...r]),i)}}async GXt(t,i,e,s){const n=[],r=[];for(const t of i){const i=t.Tdt(e);for(const s of t.Ezt){if(!mZ(s))continue;const h=t.Izt.Szt(s.Km);if(void 0!==h){if(h.$Ot===this._Gt)return!1;n.push(h)}else{if(t.yCt||t.Fzt(e,i,this.Mz.YY)||!s.PHt(e,i))return!1;{const t=s.mHt.uHt;void 0!==t&&r.push(t)}}}}if(0===n.length)return!1;const h=uf(n,t=>t.$Ot).$Ot;if(n.every(t=>"rRt"===t.Km&&t.$Ot===h)){const i=$i(n,t=>t.CO).CO+t.EU,e=[...n,...r],h=await this.XXt(e);this.jXt(h)?(ol.OLt(Ac,"Seamless switch from",this.aq.Cd,"to",h),await this.aq.RZ(h),ol.OLt(Ac,"Seamless switch complete.")):await this.QXt(t,i,h,s),this._Gt=n[0].$Ot}else for(const t of i)for(const i of t.Ezt){let e=t.Izt.Szt(i.Km);for(;void 0!==e&&("rRt"!==e.Km||e.$Ot!==h);)ol.OLt(Ac,"Removing append for other discontinuity, expecting "+h,e),t.Izt.RHt(e),e=t.Izt.Szt(i.Km)}return!0}jXt(t){var i,e;switch(null!=(e=null==(i=this.bt)?void 0:i.seamlessSwitchStrategy)?e:ak.HL){case ak.WL:return!0;case ak.qL:return!1;default:return this.aq.IZ(t)}}async XXt(t){const i=t.map(t=>t.kzt.Rrt),e=i.map(t=>({GT:t})),s=[...hs(t,t=>t.kzt.UW),...this.Br.fVt],n=this.bt;let r=await KY(n.contentProtection,i,s,this.aV,n.useCredentials);return 0===r.length&&this.aq&&this.aq.Cd.fq.length>0&&(r=this.aq.Cd.fq),{Km:O.SV,q4:e,fq:r,t5:n.useManagedMediaSource}}async QXt(t,i,e,s){var n,r,h;const o=this.aq,a=o.ct,u=this.PL.Fx.V>0&&this.PL.zxt.Ezt.map(t=>t.EHt()))),t)}Xkt(){const t=this.MP,i=this.DP;this.rxt===t&&this.hxt===i||(this.rxt=t,this.hxt=i,this.So(new Vs))}async kn(){ol.cN(ka,"Unloading the player."),this.KXt(),this.OEt(),void 0!==this.EGt&&await this.CP(),await this.hr(),this.PL.Rq=void 0,this.tO.kn(),this.sO.kn(),this.Gl.kn(),this.axt.kn(),this.YXt.kn(),this.Cq.zg(),this.XHt.zg(),this.YGt&&(this.YGt.zg(),this.YGt=void 0)}async hr(){ol.cN(ka,"Resetting the player."),this._Gt=-1,this.uV.Zg(),this.T9.Zg(),this.T9=new Zc,this.T9.$g(this.uV.Yg),this.dXt.Zg(),this.dXt=new Zc,this.dXt.$g(this.uV.Yg);const t=[this.Ypt,this.k9,this.TGt].filter(it);await Promise.all(t.map(t=>t.catch(gs))),this.Ypt=void 0,this.k9=void 0,this.TGt=void 0,this._Xt(),await this.vXt(),this._Lt&&(this.tO.OI=void 0,this.sO.OI=void 0,this.XGt.OI=void 0,await this._Lt.zg(),this.HGt===this._Lt&&(this.HGt=void 0),this._Lt=void 0),this.JW=void 0,this.Lz.hr(),this.PL.Eq(),void 0!==this.EGt&&void 0!==this.aq&&void 0===this.PL.lt?await this.PL.F8():await this.qGt(),this.bGt=!1,this.pGt=void 0,this.nxt=void 0,this.rxt=0,this.hxt=0,this.yGt=void 0,this.$kt=!1,this.d9=!1,zd.Lg(this.AGt),this.JXt=!1,this.YXt.hr(),this.ZXt(),this.So(new ho(this.zx,this.AP))}async qGt(){this.aq=void 0,await this.PL.hr()}ZXt(){for(const t of this.Gl.NI)t.kn();this.XGt.hr(),this.axt.hr(),this.Gl.hr()}$Xt(){this.YXt.wn(b$,this.Rs),this.YXt.wn(Jr.PM,this.NL),this.YXt.wn(Jr.xM,this.tjt),this.YXt.wn(Jr.SM,this.ijt),this.Mz.wn("UY",this.dxt),this.Mz.wn("qY",this.lxt),this.PL.wn(A$,this.Rs),this.PL.wn(hc.ma,this.fxt),this.PL.wn(d.Ew,this.Gkt),this.PL.wn(d.Cw,this.ejt),this.PL.wn(d.Nw,this.Eh),this.PL.wn(d.jw,this.xBt),this.PL.wn(d.uo,this.sjt),this.PL.wn(d.Qw,this.njt),this.PL.wn(Jr.AI,this.qV),this.PL.wn(d.py,this.Q6),this.PL.wn(d.$w,this.Je),this.PL.wn(d.Zw,this.Mq),this.PL.wn(d.Jw,this.rjt),this.PL.wn(d.wy,this.hjt)}KXt(){this.YXt.mn(b$,this.Rs),this.YXt.mn(Jr.PM,this.NL),this.YXt.mn(Jr.xM,this.tjt),this.YXt.mn(Jr.SM,this.ijt),this.Mz.mn("UY",this.dxt),this.Mz.mn("qY",this.lxt),this.PL.mn(A$,this.Rs),this.PL.mn(hc.ma,this.fxt),this.PL.mn(d.Ew,this.Gkt),this.PL.mn(d.Cw,this.ejt),this.PL.mn(d.Nw,this.Eh),this.PL.mn(d.jw,this.xBt),this.PL.mn(d.uo,this.sjt),this.PL.mn(d.Qw,this.njt),this.PL.mn(Jr.AI,this.qV),this.PL.mn(d.py,this.Q6),this.PL.mn(d.$w,this.Je),this.PL.mn(d.Zw,this.Mq),this.PL.mn(d.Jw,this.rjt),this.PL.mn(d.wy,this.hjt)}constructor(t,i,e,s,n,r,h,o){var a;super(),this.Mz=void 0,this.Lz=void 0,this.XHt=void 0,this.JGt=void 0,this.PL=void 0,this.aV=void 0,this.lq=void 0,this.pq=void 0,this.Cq=void 0,this.YXt=void 0,this.$Gt=void 0,this.ZGt=void 0,this.Sut=void 0,this.Ndt=void 0,this.tO=void 0,this.sO=void 0,this.XGt=void 0,this.axt=void 0,this.Gl=void 0,this.bGt=void 0,this._Lt=void 0,this.EGt=void 0,this.VGt=void 0,this.HGt=void 0,this.aq=void 0,this.Ypt=void 0,this.uV=void 0,this.FGt=void 0,this.UGt=void 0,this.OGt=void 0,this.YGt=void 0,this.dXt=void 0,this.TGt=void 0,this.T9=void 0,this.k9=void 0,this._Gt=void 0,this.MXt=void 0,this.UXt=void 0,this.WXt=void 0,this.BXt=void 0,this.FXt=void 0,this.HXt=void 0,this.oq=void 0,this.nq=void 0,this.rq=void 0,this.pGt=void 0,this.wGt=void 0,this.$kt=void 0,this.d9=void 0,this.nxt=void 0,this.rxt=void 0,this.hxt=void 0,this.yGt=void 0,this.AGt=void 0,this.JXt=void 0,this.KGt=void 0,this.ojt=void 0,this.JW=void 0,this.Gkt=void 0,this.fxt=void 0,this.ejt=void 0,this.Eh=void 0,this.xBt=void 0,this.sjt=void 0,this.NL=void 0,this.njt=void 0,this.qV=void 0,this.Q6=void 0,this.Je=void 0,this.Mq=void 0,this.rjt=void 0,this.hjt=void 0,this.tjt=void 0,this.ijt=void 0,this.kGt=void 0,this.Lmt=void 0,this.LGt=void 0,this.dxt=void 0,this.lxt=void 0,this.GGt=void 0,this.Mz=e,this.Lz=s,this.XHt=n,this.JGt=r,this.axt=new bc,this.bGt=!1,this._Lt=void 0,this.EGt=void 0,this.VGt=!1,this.HGt=void 0,this.aq=void 0,this.Ypt=void 0,this.uV=new Zc,this.FGt=void 0,this.UGt=void 0,this.OGt=new Zc,this.YGt=void 0,this.dXt=new Zc,this.TGt=void 0,this.T9=new Zc,this.k9=void 0,this._Gt=-1,this.MXt=void 0,this.UXt=void 0,this.WXt=void 0,this.BXt=void 0,this.FXt=void 0,this.HXt=void 0,this.oq=Dn.pz,this.nq=void 0,this.rq=void 0,this.pGt=void 0,this.wGt=void 0,this.$kt=!1,this.d9=!1,this.nxt=void 0,this.rxt=0,this.hxt=0,this.yGt=void 0,this.AGt=0,this.JXt=!1,this.KGt=[],this.ojt=void 0,this.Gkt=t=>{this.nq=ar(t.errorObject),this.rq=t.errorObject,this.Rs(t)},this.fxt=t=>{this.Qq($k(t.lt))},this.ejt=()=>{var t;null==(t=this._Lt)||t.BUt();const i=this.ct;i!==this.nxt&&(this.nxt=i,this.So(new zr(this.nxt)))},this.Eh=()=>{this.Qx&&this.So(new ur(this.zx))},this.xBt=()=>{this.So(new Si(this.zx))},this.sjt=()=>{this.tkt(),this.So(new vt(this.zx))},this.NL=()=>{void 0!==this.ojt&&(zd.Lg(this.ojt),this.ojt=void 0),this.So(new mo(this.zx))},this.njt=()=>{this.So(new Et(this.zx))},this.qV=()=>{this.So(new Ka(this.zx,this.AP))},this.Q6=()=>{var t;const i=this.zx,e=this.Vx;null==(t=this._Lt)||t.ajt(i),this.So(new B(i,e)),!this.lP&&this.IGt()&&(this.jP(),this.Eh())},this.Je=()=>{this.So(new ji(this.zx))},this.Mq=()=>{this.So(new Yr(this.zx))},this.rjt=()=>{this.Xkt()},this.hjt=()=>{this.So(new Wi(this.zx,this.OP))},this.tjt=()=>{this.PL.xP?this.So(new SP(this.zx)):(null!=this.ojt||(this.ojt=zd.Og(()=>{this._Lt&&this.JXt&&Wr(this._Lt.ujt())},2500)),this.tkt(),this.So(new SP(this.zx)))},this.ijt=()=>{this.JXt=!0,this.So(new Is(this.zx,this.AP))},this.kGt=t=>{Ce(t)||Ei(t)||Qn(t)||(this._Xt(),Wr(this.vXt()),!function(t){return t instanceof BB}(t)?this.Qq(new as(me.MEDIA_LOAD_ERROR,t.message,t)):Wr(this.MGt({tI:!0})))},this.Lmt=t=>{if(Ce(t))return;const i=t instanceof as?t:new as(me.MEDIA_DECODE_ERROR,t.message,t);this.Qq(i)},this.LGt=t=>{this.KGt.push(t)},this.dxt=()=>{this.WTt()},this.lxt=()=>{this.qTt()},this.GGt=()=>{this.Xkt()},this.Sut=new JG(h),this.PL=t,this.aV=i,this.lq=new IY(this.Mz.CY),this.$Gt=new CY(this.PL),this.ZGt=new VY(this.Mz),this.Ndt=Y({},o.retryConfiguration,{maxRetries:null!=(a=o.retryConfiguration.maxRetries)?a:1/0}),this.tO=new Gh,this.sO=new Gh,this.XGt=new ai,this.Gl=new Tu([this.XGt,this.axt]),this.pq=new eC(this.aV),this.PL.Rq=this.pq,this.Cq=new Gt(this,this.PL),this.YXt=new _s(this.Cq,!0),this.$Xt()}},E$=class extends Ne{get vLt(){return this.cjt}get CLt(){return this.djt}get DLt(){return this.ljt}get cGt(){return this.fjt}get vGt(){return[this.djt,this.ljt].filter(it)}get ht(){return this.tO}get Br(){return this.nEt.Br}get CGt(){return this.nEt}get sUt(){const t=this.vGt;return 0===t.length?Uo.rL():t.reduce((t,i)=>t.Mn(i.sLt.sUt),Uo.hL())}get mLt(){return this.vjt}get zx(){return this.oa.mGt(this)}get BGt(){var t,i;const e=null==(t=this._jt)?void 0:t.Mzt,s=null==(i=this.gjt)?void 0:i.Mzt;return e&&s?s.Mn(e):null!=s?s:e}get kP(){return this.H4}get nt(){return this.Gl}get rt(){return this.sO}get iFt(){var t,i;return(null==(t=this.djt)?void 0:t.sLt.iFt)||(null==(i=this.ljt)?void 0:i.sLt.iFt)||!1}get xXt(){var t,i,e;return null!=(e=null==(t=this.djt)?void 0:t.sLt.ct)?e:null==(i=this.ljt)?void 0:i.sLt.ct}get pjt(){var t,i;const e=null==(t=this.djt)?void 0:t.sLt.ct,s=null==(i=this.djt)?void 0:i.sLt.ct;return void 0!==e&&void 0!==s?_.min(e,s):null!=e?e:s}get mjt(){var t;const i=null==(t=this.nEt.OVt)?void 0:t.sLt.ct;if(void 0!==i)return i;const e=this.vGt;return e.length>0&&e.every(t=>function(t){return t.sLt.bct.length>0&&!t.sLt.iFt}(t))?1/0:NaN}get ct(){var t;return null!=(t=this.xXt)?t:this.mjt}get PGt(){var t;return null!=(t=this.pjt)?t:this.mjt}get lGt(){const t=this.vGt;if(0===t.length||this.ct!==1/0)return;let i;for(const e of t){const t=e.sLt.kP;if(0===t.V)continue;const s=t.An(t.V-1)+e.sLt.ISt,n=e.sLt.mUt,r=s+(null!=n?n:0);(!i||i0&&(i=i?i.Mn(t):t,e=_.max(e,t.Tn(0)))}if(!i)return Uo.rL();if(i.V>0)return i;return Uo.sL(e)}(this.vGt);0!==e.V&&(this.H4=e,null==(t=this.Opt)||t.jU(e.Tn(0)),null==(i=this.ENt)||i.jU(e.Tn(0)))}ajt(t){const i=[];if(this.cjt)for(const e of this.aXt)for(const s of e.Ezt){const e=s.IHt(t);e&&!Ct(i,e)&&i.push(e)}wc(this.vjt,i)||(this.vjt=i,this.So(new dZ))}get jGt(){if(this.Mc.latencyConfiguration)return this.Mc.latencyConfiguration;const t=this.vGt;if(0===t.length)return;if(this.iFt)return;const i=_.max(...t.map(t=>{var i;return null!=(i=t.sLt.ISt)?i:0}));return{minimumOffset:.66*i,maximumOffset:2*i,targetOffset:1*i,forceSeekOffset:3*i,minimumPlaybackRate:ik,maximumPlaybackRate:ih}}get DGt(){return this.Mkt}get cP(){return this.ASt}set cP(t){this.ASt!==t&&(this.ASt=t,this.So(t?new TG:new lh))}get uO(){return this.Ekt}get EU(){return this.QU}set EU(t){this.QU=t;for(const i of this.bjt)i.EU=t}get bjt(){return[this.Ajt,this.Sjt,this.Aq,this.Opt,this.kq,this.ENt].filter(it)}mq(t){for(const i of t)i.src&&this.Aq.hV(i)}qlt(){const t=this.Br._Vt;if(0===t.length)return void ol.FLt(ka,"The HLSModel contains no variant streams.");var i;const e=null!=(i=hh(t,t=>0!==t.lFt.length&&0!==t.fFt.length))?i:t[0],s=t.filter(t=>t!==e);for(const t of e.lFt){const i=new iE,n=[];i.gO(new kY(e,t)),n.push(t);for(const e of s){const s=hh(e.lFt,i=>gY(i,t)&&!yY(n,i));s&&(i.gO(new kY(e,s)),n.push(s))}this.tO.tt(new AY(this,this.Mz,this.tO,i))}for(const t of e.fFt){const i=new iE,n=[];i.gO(new EY(e,t)),n.push(t);for(const e of s){const s=hh(e.fFt,i=>gY(i,t)&&!yY(n,i));s&&(i.gO(new EY(e,s)),n.push(s))}this.sO.tt(new SY(this,this.Mz,this.sO,i))}}async iXt(t){if(this.Mkt)return;if(!this.nEt.NVt){try{await this.nEt.UVt(t)}catch(t){throw sa(t),this.cP=!1,new as(me.MANIFEST_LOAD_ERROR,"The provided HLS document could not be loaded - "+t.message,t)}this.qlt()}const i=await this.Tjt();this.kjt(i),this.Ejt(i);const e=this.xjt(i.lFt),s=this.Pjt(i.fFt),n=this.Ijt(i.vFt);n||this.Cjt(i._Ft),await this.MGt(e,s,n,{nXt:!0}),this.Mkt=!0}Ejt(t){const i=this.ENt;if(!i)return;const e=function(t){const i=[];for(const e of t){const t=u$(e);void 0!==t&&i.push({Sit:t,Tit:e.bs||"",Th:e.l})}return i}(t._Ft);for(const t of e)i.$gt(t)}async Tjt(){if(this.Rjt=this.Br._Vt,!this.Rjt.length)throw new as(me.MANIFEST_LOAD_ERROR,"LLHLSPlayer - Could not select initial variant stream: the HLS stream contains no variant streams.");let t=await this.Djt(this.Rjt);if(0===t.length)throw new as(me.MANIFEST_LOAD_ERROR,"LLHLSPlayer - Could not select initial variant stream: the HLS stream contains no variant stream with a supported codec.");const i=await this.Njt(t);return i.length>0&&(t=i),ol.cN(ka,"Selecting initial active variant stream."),d$(t,this.Mc.abr,this.Mz,this.Ndt.maximumBackoff)}xjt(t){if(this.Bjt){const t=this.Mjt(this.Bjt);if(t)return t}return w$(t)}Pjt(t){if(this.Ljt){const t=this.Mjt(this.Ljt);if(t)return t}return w$(t)}Ijt(t){for(const t of this.Gl.NI)t.Qk===xh.Kn&&(this.Ojt=this.Sjt.aGt(t));if(this.Ojt){const t=this.Mjt(this.Ojt);if(t)return t}return m$(t)}Cjt(t){const i=this.ENt;if(!i)return;const e=m$(t);if(void 0!==e){const t=u$(e);i.Jgt(t).Qk=xh.Kn}}wLt(t){for(const i of t)if(!this.Fjt(i))throw new m("LLHLSPlayer - Could not set an allowed variant stream that does not exists in the internal HLS model.");this.Rjt=t}Fjt(t){const i=this.Br;return!!i&&Ct(i._Vt,t)}Mjt(t){if(t&&this.cjt)return hh(this.cjt.VLt,i=>i===t)}async Ujt(){var t;const i=null!=(t=this.Rjt)?t:this.Br._Vt;if(0===i.length&&!this.Rjt)return ol.cN(ka,"The HLS stream does not contain any variant streams, skipping ABR selection."),[];if(1===i.length&&!this.Rjt)return ol.cN(ka,"The HLS stream contains only a single variant stream, skipping ABR selection."),[];const e=await this.Djt(i);if(0===e.length)return ol.FLt(ka,"No variant streams with supported codecs available to perform ABR selection on."),[];const s=f$(e,this.Ndt.maximumBackoff);return 0===s.length?(this.Vjt||(ol.FLt(ka,"No variant streams with online renditions available to perform ABR selection on."),this.Hjt++,await this.Wjt(e)),[]):s}async qjt(){const t=await this.QLt();if(void 0===t)return;const i=!!this.cjt&&t.IWt.IW)&&(this.DDt={gLt:t,wft:zd.Mg()});const r=zd.Mg()-this.DDt.wft;var h;const o=null!=(h=null==(e=this.ljt)?void 0:e.sLt.WLt)?h:1/0;return i>=_.max(o-1,5)||r>1e3}Gjt(t){return $i(t,t=>t.IW)}async ujt(){this.DDt=void 0;let t=await this.Ujt();if(0===t.length)return;const i=await this.Njt(t);i.length>0&&(t=i);const e=this.Gjt(t);void 0!==e&&(await this.yLt(e,{bLt:!0}),this.oa.dq.JIt(e.IW))}async Wjt(t){this.Vjt=!0;let i=!1;for(const e of t)try{const t=this.ljt?hh(e.fFt,t=>gY(t,this.ljt)):void 0;if(void 0===t)continue;await this.jVt(t),t.sLt.bUt=-1/0,i=!0}catch(t){}if(i)this.Hjt=0,await this.oa.NXt();else{if(this.Hjt>=this.Ndt.maxRetries)return void this.oa.Qq(new as(me.MEDIA_LOAD_ERROR,"The provided video renditions could not be loaded."));const t=_.min(this.Ndt.minimumBackoff*2**(this.Hjt-1),this.Ndt.maximumBackoff);await Ze(t)}this.Vjt=!1,await this.qjt()}async Djt(t){let i=await lf(t,async t=>{var i,e;const s=[(null==(i=t.Rrt)?void 0:i.q9)?'audio/mp4; codecs="'+t.Rrt.q9+'"':void 0,(null==(e=t.Rrt)?void 0:e.W9)?'video/mp4; codecs="'+t.Rrt.W9+'"':void 0].filter(it);return 0===s.length||await this.$Gt.$Z(s,this.Mc.useManagedMediaSource)});return i.some(t=>{var i;return null==(i=t.Rrt)?void 0:i.W9})&&(i=i.filter(t=>!t.Rrt||t.Rrt.W9||0!==t.fFt.length)),i.some(t=>{var i;return null==(i=t.Rrt)?void 0:i.q9})&&(i=i.filter(t=>!t.Rrt||t.Rrt.q9||0!==t.lFt.length)),i}Njt(t){return this.nEt.MVt?lf(t,t=>async function(t,i){for(const e of t)if(!await i(e))return!1;return!0}([w$(t.lFt),w$(t.fFt),m$(t.vFt),m$(t._Ft)].filter(it),t=>this.Xjt(t))):Promise.resolve([])}async Xjt(t){if(0===t.sLt.bct.length)return!1;const i=t.sLt.bct[0];if(!i.Syt)return!1;const e=i.Syt,s=e.iAt?HY(e.iAt.Tn,e.iAt.V):void 0;try{return await this.Sut.sdt(e.XE,s)}catch(t){return!1}}async RLt(t){if(!this.cjt)return void(this.Bjt=t);const i=this.Mjt(t);if(t&&!i)return void ol.lt(ka,"Trying to set an invalid rendition as the active audio rendition.");if(this.djt===i)return;const e=it(i)!==it(this.djt);ol.cN(ka,"Switching audio rendition"),await this.MGt(i,this.ljt,this.fjt,{SLt:!0,bLt:e})}async NLt(t){if(!this.cjt)return void(this.Ljt=t);const i=this.Mjt(t);if(t&&!i)return void ol.lt(ka,"Trying to set an invalid rendition as the active video rendition.");if(this.ljt===i)return;const e=it(i)!==it(this.ljt);ol.cN(ka,"Switching video rendition"),await this.MGt(this.djt,i,this.fjt,{ALt:!0,bLt:e})}async uGt(t){if(!this.cjt)return void(this.Ojt=t);const i=this.Mjt(t);!t||i?(ol.cN(ka,"Switching subtitle rendition"),await this.MGt(this.djt,this.ljt,i)):ol.lt(ka,"Trying to set an invalid rendition as the active subtitle rendition.")}async jjt(t,i){if(this.Vjt)return;const e=0===this.sO.V;t.Km===dl.Mk||t.Km===dl.Bk&&e?this.Rjt&&this.Rjt.length<=1?(t.Km===dl.Mk&&this.ljt!==t?await this.MGt(this.djt,t,this.fjt):t.Km===dl.Bk&&e&&this.djt!==t&&await this.MGt(t,this.ljt,this.fjt),await this.Qjt(t,i)):await this.qjt():await this.Qjt(t,i)}async jVt(t,i){try{await this.nEt.jVt(t,i)}catch(e){throw sa(e),(Ei(e)||Qn(e))&&await this.jjt(t,i),e}}async Qjt(t,i){if(!Ct(this.Kjt,t)){this.Kjt.push(t);try{const e=t.Km===dl.HU||t.Km===dl.YLt?1/0:this.Ndt.maxRetries;await ws(()=>this.retryOfflineRenditionsCallback(t,i),i,e,this.Ndt.minimumBackoff,this.Ndt.maximumBackoff)}catch(t){this.oa.Qq(new as(me.MEDIA_LOAD_ERROR,t.message,t))}finally{_e(this.Kjt,t),t.sLt.bUt===-1/0&&await this.oa.NXt()}}}async fXt(t){var i;const e=this.djt,s=this.ljt,n=[];n.push(this.Yjt(s,t)),pY(e,s)||n.push(this.Yjt(e,t));const r=this.fjt;if(null==(i=this.Mc.hls)?void 0:i.delaySubtitlePreload)await Promise.all(n),await this.Yjt(r,t);else{const i=this.Yjt(r,t);await Promise.all([...n,i])}}async Yjt(t,i){if(t)try{await this.nEt.jVt(t,i)}catch(e){sa(e),(Ei(e)||Qn(e))&&await this.Jjt(t,i)}}async Jjt(t,i){if(this.Vjt)return;const e=0===this.sO.V;if(t.Km===dl.Mk||t.Km===dl.Bk&&e)if(this.Rjt&&this.Rjt.length<=1)await this.Qjt(t,i);else{const t=await this.Tjt();this.kjt(t);const i=this.xjt(t.lFt),e=this.Pjt(t.fFt),s=this.Ijt(t.vFt);await this.MGt(i,e,s)}else await this.Qjt(t,i)}MGt(t,i,e,s){void 0===s&&(s={});const n={bLt:s.bLt||!1,SLt:s.SLt||!1,ALt:s.ALt||!1,tI:s.tI||!1,nXt:s.nXt||!1};return n.nXt||n.tI||this.djt!==t||this.ljt!==i||this.fjt!==e?void 0===t&&void 0===i?Promise.reject(new m("Trying to buffer no media renditions.")):(this.djt=t,this.ljt=i,this.fjt=e,this.BUt(),this.So(new i$),this.oa.MGt(n)):Promise.resolve()}async yLt(t,i){if(!this.oa.sXt)return void ol.lt(ka,"The LLHLSPlayer is not loaded.");if(!t)return void ol.lt(ka,"Cannot explicitly set the active variant stream to undefined.");if(!this.Fjt(t))return void ol.lt(ka,"Trying to set an active variant stream that does not exists on the internal model.");if(t===this.cjt)return void ol.cN(ka,"Trying to set the already active variant stream, ignoring.");const e=this.djt?hh(t.lFt,t=>gY(t,this.djt)):void 0,s=this.ljt?hh(t.fFt,t=>gY(t,this.ljt)):void 0,n=this.fjt?hh(t.vFt,t=>gY(t,this.fjt)):void 0;this.kjt(t),this.DDt=void 0,await this.MGt(e,s,n,i)}kjt(t){var i;if(ol.cN(ka,"Setting active variant stream."),this.cjt===t)return;const e=(null==(i=this.cjt)?void 0:i.yOt)!==(null==t?void 0:t.yOt);if(this.cjt&&e)for(const t of this.cjt.vFt)this.Sjt.mFt(t);if(this.cjt=t,this.So(new t$),t&&e)for(const i of t.vFt)this.Sjt.hGt(i)}Zjt(){this.$jt(this.tO),this.$jt(this.sO)}$jt(t){const i=[];for(const e of t.NI){const t=[];for(const i of e.$I.NI)Ct(i.gLt.VLt,i.fLt)||t.push(i);for(const i of t)e.$I.pS(i),i.kn();0===e.$I.V&&i.push(e)}for(const e of i)t.it(e),e.kn()}async SXt(t){const i={stack:[],error:void 0,hasError:!1};try{const e=Es(i,Zc.ep([t]),!1),s=[this.ljt,pY(this.djt,this.ljt)?void 0:this.ljt,this.fjt].filter(it);await Promise.all(s.filter(t=>!t.sLt.vUt).map(t=>this.nEt.QVt(t,e.Yg)))}catch(t){i.error=t,i.hasError=!0}finally{Zs(i)}}async mXt(){var t,i,e;const s=this.djt,n=this.ljt,r=null==(t=this.cjt)?void 0:t.Rrt,h=[];if(void 0!==s){var o,a;const t=null!=(a=null==(o=s.Rrt)?void 0:o.q9)?a:null==r?void 0:r.q9;if(!t)return;{const i='audio/mp4; codecs="'+t+'"';ol.cN(ka,"Configuring MediaSource for initial audio rendition with codec: "+i+"."),h.push(i)}}if(void 0!==n){var u,c;const t=null!=(c=null==(u=n.Rrt)?void 0:u.W9)?c:null==r?void 0:r.W9;if(!t)return;{const i='video/mp4; codecs="'+t+'"';ol.cN(ka,"Configuring MediaSource for initial video rendition with codec: "+i+"."),h.push(i)}}if(0===h.length)return void ol.FLt(ka,"No codecs found on the active variant stream.");var d;const l=null!=(d=null==n||null==(i=n.sLt.bct[0])?void 0:i.UW)?d:[];var f;const v=null!=(f=null==s||null==(e=s.sLt.bct[0])?void 0:e.UW)?f:[],_=this.Mc,g=this.Br,p=await KY(_.contentProtection,h,[...g.fVt,...v,...l],this.aV,_.useCredentials);return{Km:O.SV,q4:h.map(t=>({GT:t})),fq:p,t5:_.useManagedMediaSource}}get aXt(){return[this._jt,this.gjt,this.tQt].filter(it)}yXt(t,i,e,s,n){const r=this.djt,h=this.ljt,o=t&&pY(r,h);var a,u;if(i&&h)if(this.gjt)(e||n||o&&s)&&(this.gjt.Zg(),this.gjt.Rzt.jy()),this.gjt.fLt!==h&&this.gjt.MWt(h);else{const t=o?[at.Mk,at.Bk]:[at.Mk];this.gjt=this.iQt(h,t)}else null==(a=this.gjt)||a.zg(),this.gjt=void 0;t&&r&&!o?this._jt?((e||s)&&(this._jt.Zg(),this._jt.Rzt.jy()),this._jt.fLt!==r&&this._jt.MWt(r)):this._jt=this.eQt(r):(null==(u=this._jt)||u.zg(),this._jt=void 0)}bXt(t){const i=this.fjt;if(this.tQt){this.tQt.fLt===i?t&&(this.tQt.Zg(),this.tQt.Rzt.jy()):(this.tQt.zg(),this.tQt=void 0)}if(!this.tQt&&i&&(this.tQt=this.sQt(i)),i){const t=this.Sjt.dGt(i);t.Qk=xh.Kn,this.Bzt(t)}}iQt(t,i){const e=function(t,i,e,s,n,r,h,o,a,u,c){const d=e.Br.AM,l=new VZ(d),f=new OZ(at.Mk,t,e,l,s,n,r,c),v=h._Tt(l,d,i);return new $Z(f,l,v,o,a,u)}(t,i,this.nEt,this.aV,this.Sut,this.XHt,this.YGt,this.Opt,this.ENt,this.Mz,this.Mc.useCredentials);return e.Pzt.wn(LZ.IWt,this.nQt),e.Pzt.wn(LZ.CWt,this.rQt),e.Pzt.wn(d.iy,this.Rs),e.Izt.wn(zt.Jqt,this.hQt),e.Izt.wn(zt.$qt,this.oQt),e.Izt.wn(zt.tzt,this.aQt),e.Izt.wn(zt.Zqt,this.uQt),e}eQt(t){const i=function(t,i,e,s,n,r,h,o,a){const u=i.Br.AM,c=new VZ(u),d=new OZ(at.Bk,t,i,c,e,s,n,a),l=r._Tt(c,u,[at.Bk]);return new $Z(d,c,l,h,void 0,o)}(t,this.nEt,this.aV,this.Sut,this.XHt,this.YGt,this.Opt,this.Mz,this.Mc.useCredentials);return i.Pzt.wn(LZ.CWt,this.rQt),i.Izt.wn(zt.Jqt,this.hQt),i.Izt.wn(zt.Zqt,this.uQt),i}sQt(t){return function(t,i,e,s,n,r){const h=i.Br.AM,o=new VZ(h),a=new OZ(at.LT,t,i,o,e,s,n,r),u=new YZ(o,h,at.LT);return new $Z(a,o,u)}(t,this.nEt,this.aV,this.Sut,this.XHt,this.Mc.useCredentials)}Czt(t,i){if(t?this.B4&&this.B4.$zt(t,this.QU)||(this.B4=new h$(at.Bk,t,this.QU)):this.B4=void 0,i?this.M4&&this.M4.$zt(i,this.QU)||(this.M4=new h$(at.Mk,i,this.QU)):this.M4=void 0,void 0!==this.gjt){const i=void 0!==t&&void 0===this._jt,e=[this.M4,i?this.B4:void 0].filter(it);this.gjt.Czt(e)}if(void 0!==this._jt){const t=this.B4?[this.B4]:[];this._jt.Czt(t)}}Bzt(t){t?this.cQt&&this.cQt.$zt(t)||(this.cQt=new a$(t,this.Br.AM)):this.cQt=void 0,void 0!==this.tQt&&void 0!==this.cQt&&this.tQt.Bzt(this.cQt)}WGt(t){if(this.iV===t)return;this.iV=t;for(const i of this.bjt)i.tV(t);const i=this.fjt;if(void 0!==i){const t=this.Sjt.dGt(i);this.Bzt(t)}}AXt(t,i){const e=[];t&&e.push(at.Bk),i&&e.push(at.Mk),this.Br.AM.dVt(e)}dQt(){if(void 0===this.gjt)return!1;const t=zd.Mg();if(!this.gjt.Pzt.Nqt(t))return!1;const i=this.gjt.Pzt.Iqt();if(void 0===i||void 0===i.yut.ct)return!1;const e=this.zx,s=this.oa.vP,n=this.gjt.Mzt.iL(e);if((void 0!==n?n.An(0)-e:0)>=2*i.yut.ct*s)return!1;if(i.Cqt>0&&0===i.Rqt)return i.Dqt>1e3*i.yut.ct*.8;return 8*i.Rqt/this.Mz.CY.IW>=1.8*i.yut.ct}async lQt(){var t;const i=await this.QLt();if(void 0===i)return;const e=null==(t=this.gjt)?void 0:t.Pzt.Iqt();if(void 0===e)return;const s=this.cjt;if(e.Rqt>0){if(_.max(0,e.Rqt-e.Cqt)<=e.Rqt*(i.IW/s.IW))return}const n=i.IW{this.BUt()},this.fQt=t=>{Wr(this.jjt(t.fLt,this.uV.Yg))},this.retryOfflineRenditionsCallback=async(t,i)=>{this.fjt!==t&&this.djt!==t&&this.ljt!==t||(await this.nEt.jVt(t,i),t.sLt.bUt=-1/0)},this.hQt=t=>{const i=this.cjt,e=null==i?void 0:i.cFt;if(this.nEt.rHt(t.Rrt,t.fLt.sLt),!e&&(this.nEt.hHt(t.Rrt,t.fLt.sLt),this.Zjt(),i)){const t=void 0!==this.djt&&!Ct(i.lFt,this.djt),e=void 0!==this.ljt&&!Ct(i.fFt,this.ljt);(t||e)&&this.MGt(t?void 0:this.djt,e?void 0:this.ljt,this.fjt).catch(gs)}},this.oQt=t=>{const i=this.vQt(t.fLt);void 0!==i&&(i.Olt=t.Olt)},this.aQt=t=>{const i=this.vQt(t.fLt);void 0!==i&&(i.byt=t.izt.rF())},this.vQt=t=>{for(const i of this.sO.NI){const e=i.TLt(t);if(void 0!==e)return e}},this.uQt=t=>{this.nEt.sHt(t.fLt)},this.nQt=to(t=>{t.Gk===at.Mk&&this.dQt()&&Wr(this.lQt())},200),this.rQt=t=>{var i;this.Ekt+=t.DWt;const e=this.sO.V>0?t.Gk===at.Mk:t.Gk===at.Bk;"yut"===t.RWt&&e&&Wr(this.qjt()),this.So(new bV(function(t){if(t){if(void 0!==t.iAt){var i,e;const s=t.iAt.Tn+(null!=(e=t.iAt.V)?e:0);return{Yu:t.XE,Wat:[null==(i=t.iAt)?void 0:i.Tn,s],Xk:!0}}return{Yu:t.XE.toString()||"",Xk:!0}}return{Yu:"",Xk:!0}}(t.uri),(null==(i=this.cjt)?void 0:i.IW)||0,t.mediaSequenceNumeber,t.mediaTrackId,t.Gk,t.httpStatusCode,t.DWt))},this.oa=t,this.Mc=i,this.aV=s,this.Mz=n,this.ZGt=r,this.Sut=h,this.$Gt=o,this.XHt=a,this.YGt=u,this.Ndt=c,this.wjt=d,this.iV=null!=l?l:new mX,this.uV=new Zc;const _=null!=(v=null==(f=i.latencyConfiguration)?void 0:f.targetOffset)?v:i.liveOffset;this.nEt=new rZ(this.aV,this.Sut,i.useCredentials,zd.Pm(i.src),_),this.nEt.wn(nZ.IVt,this.aHt),this.nEt.wn(nZ.CVt,this.fQt),this.nEt.wn(T$,this.Rs),this.Sjt=new y$(this,this.iV),this.Gl.qW(this.Sjt.Z),i.hlsDateRange&&(this.Ajt=new cZ(this.nEt,this.iV),this.Gl.qW(this.Ajt.Z)),e.textTracks&&(this.Aq=new eu(this.iV,this.aV),this.Gl.qW(this.Aq.Z),this.mq(e.textTracks));!Ct(i.ignoreEmbeddedTextTrackTypes,nh.CEA608)&&(this.ENt=new wt(this.iV),this.Gl.qW(this.ENt.Z));!Ct(i.ignoreEmbeddedTextTrackTypes,nh.EMSG)&&(this.Opt=new KG(this.iV),this.kq=new _P(this.iV,this.Opt.Z),this.Gl.qW(this.Opt.Z),this.Gl.qW(this.kq.Z))}};function x$(t,i){if(!i||i.sLt.iFt)return!1;const e=i.sLt.bct;return 0!==e.length&&e[0].CO>t}r();var P$=class{Jq(t,i){return!!gk(t.type)&&!t.useNativePlayback}async Zq(t){return!!t.aes128||await VT(t,!0)}};r(),r();var I$=class{async zHt(t,i,e){try{const s=await crypto.subtle.importKey("raw",i,{name:"AES-CBC"},!1,["decrypt"]),n=await crypto.subtle.decrypt({name:"AES-CBC",iv:e},s,t);return new j(n)}catch(t){throw new as(me.CONTENT_PROTECTION_INTERNAL_ERROR,"Error during AES128 decrypt.")}}zg(){}static US(){return"undefined"!=typeof crypto&&void 0!==crypto.subtle&&void 0!==crypto.subtle.decrypt}};r(),r(),r(),r();var jc=class extends gp{constructor(t,i){super(t),this.data=void 0,this.data=i}},C$=["message","messageerror","error"];r();var Fn=class extends gp{constructor(t){super(hc.ma),this.error=void 0,this.error=t}},R$=class extends Ne{get _Qt(){return this.gQt.Yg.Hg}pQt(t,i){this._Qt||(void 0!==this.mQt?this.mQt.pQt(t,i):this.wQt.push({Iy:t,yQt:i}))}bQt(){this._Qt||(this.gQt.Zg(),Wt(this.wQt),void 0!==this.mQt&&this.mQt.bQt())}constructor(t){super(),this.mQt=void 0,this.gQt=void 0,this.wQt=[],this.AQt=t=>{if(this._Qt)t.bQt();else{this.mQt=t,this.mQt.wn(C$,this.Rs);for(const i of this.wQt)t.pQt(i.Iy,i.yQt);Wt(this.wQt)}},this.SQt=t=>{if(this._Qt)return;const i=t instanceof m?t:new m("Could not create Worker.");this.So(new Fn(i)),this.bQt()},this.gQt=new Zc,t(this.gQt.Yg).then(this.AQt,this.SQt)}};r(),r();var D$=class extends Ne{pQt(t,i){i?this.mQt.postMessage(t,i):this.mQt.postMessage(t)}bQt(){this.Vo(),this.mQt.removeEventListener("message",this.TQt),this.mQt.removeEventListener("messageerror",this.kQt),this.mQt.removeEventListener("error",this.L7),this.mQt.terminate()}constructor(t,i){super(),this.mQt=void 0,this.TQt=t=>{this.So(new jc("message",t.data))},this.kQt=t=>{this.So(new jc("messageerror",t.data))},this.L7=t=>{null==t.preventDefault||t.preventDefault.call(t);const i=t.error instanceof m?t.error:new m(t.message);this.So(new Fn(i)),this.bQt()},this.mQt=new ad(t,i),this.mQt.addEventListener("message",this.TQt),this.mQt.addEventListener("messageerror",this.kQt),this.mQt.addEventListener("error",this.L7)}};r();var N$=0,B$=class extends Ne{pQt(t,i){i?this.EQt.contentWindow.postMessage({type:"message",data:t},"*",i):this.EQt.contentWindow.postMessage({type:"message",data:t},"*")}bQt(){var t;this.EQt.removeEventListener("load",this.xQt),self.removeEventListener("message",this.PQt),null==(t=this.EQt.contentWindow)||t.postMessage({type:"terminate"},"*"),Ao(this.EQt)}constructor(t,i){super(),this.aS=void 0,this.IQt=void 0,this.EQt=void 0,this.CQt=void 0,this.xQt=()=>{this.EQt.removeEventListener("load",this.xQt),this.EQt.contentWindow.postMessage({type:"initialize",id:this.aS,script:this.IQt},"*")},this.PQt=t=>{t.origin===this.CQt&&t.data.id===this.aS&&("initialized"===t.data.type||("error"===t.data.type?(this.So(new Fn(new m(t.data.data.message))),this.bQt()):this.So(new jc("message",t.data.data))))},this.aS=N$++,this.IQt=t;const e=zd.Dh("iframe.html",i);this.EQt=function(t){const i=h.createElement("iframe");return i.width="0",i.height="0",i.style.display="none",i.role="",i.src=t,h.body.appendChild(i),i}(e.href),this.CQt=e.origin,this.EQt.addEventListener("load",this.xQt),self.addEventListener("message",this.PQt)}};function M$(t,i,e){const s=zd.Pm(t,i);return new R$(t=>async function(t,i,e,s){let n;try{return n=new D$(t,e),await O$(n,s),n}catch(t){null==n||n.bQt(),sa(t)}if(L$&&Hb){let i;try{const e=await zd.Dx.vk({Yu:t,Hk:Qe.GET,fk:Bi.LT,Yg:s});i=await e.HT(s)}catch(t){sa(t)}if(i){let t;try{const r=Hb([i],{type:"application/javascript"});return t=URL.createObjectURL(r),n=new D$(t,e),await O$(n,s),n}catch(t){null==n||n.bQt(),sa(t),L$=!1}finally{t&&URL.revokeObjectURL(t)}}}try{return n=new B$(t,i),await O$(n,s),n}catch(t){throw null==n||n.bQt(),t}}(s,i,e,t))}var L$=!0;async function O$(t,i){const e=await t.ww(["message","error"],i);if("error"===e.type)throw function(t){return new as(me.CONFIGURATION_ERROR,"THEOplayer workers could not be loaded. Please check the configuration of the libraryLocation.",t)}(e.error);if(!function(t){return Gd(t)&&"10.3.0"===t.RQt}(e.data))throw new as(me.CONFIGURATION_ERROR,"THEOplayer workers could not be loaded. Please check that the worker's version matches THEOplayer's version (10.3.0).");return e}r();var F$=function(t){return t.DQt="zHt",t.NQt="gWt",t}({}),U$=function(t){return t.BQt="MQt",t.LQt="OQt",t}({}),V$=class{FQt(){const t=M$(this.UQt,this.VQt,{name:"THEOplayer decrypt worker"});return t.wn("message",this.HQt),t.wn("error",this.WQt),t}zHt(t,i,e){const s=""+ ++this.qQt,n={zQt:F$.DQt,GQt:s,XQt:t,jQt:i,QQt:e},r=new Ga;return this.KQt.set(s,r),null!=this.mQt||(this.mQt=this.FQt()),this.mQt.pQt(n),r.Yy}zg(t){void 0===t&&(t=new Qc),this.KQt.forEach(i=>i.Ky(t)),this.KQt.clear(),this.mQt&&(this.mQt.bQt(),this.mQt=void 0)}constructor(t){this.VQt=void 0,this.UQt=void 0,this.mQt=void 0,this.qQt=0,this.KQt=Ba(),this.HQt=t=>{const i=t.data,e=i.YQt,s=this.KQt.get(e);if(s)if(this.KQt.delete(e),i.JQt===U$.BQt)s.Qy(i.ZQt);else if(i.JQt===U$.LQt){const t=i.$Qt,e=i.tKt?new m(i.tKt):void 0,n=new as(me.CONTENT_PROTECTION_INTERNAL_ERROR,"Error during AES128 decrypt. (code: "+t+")",e);s.Ky(n)}},this.WQt=t=>{const i=new as(me.CONTENT_PROTECTION_INTERNAL_ERROR,t.error.message,t.error);this.zg(i)},this.VQt=t;try{this.UQt=zd.Pm("theoplayer.d.js",t)}catch(t){throw new as(me.CONFIGURATION_ERROR,"Invalid player configuration: missing libraryLocation",t)}}};function H$(t){const i=hh(t.boxes,YN);if(!i)return;const e=hh(i.boxes,JN);return e?e.handlerType:void 0}function W$(t){const i=new Iy;return i.boxes.push(...t.boxes),i}function q$(t){const i=new bl;return i.boxes.push(...t.boxes),i}r(),r(),r(),r();var z$=8;function G$(t,i){const e=function(t){const i=new ey;return i.boxes.push(...t.boxes),i}(t),s=j$(i);for(let t=0;tt instanceof Vi&&t.trackId===s);if(r>=0){const s=i.boxes[r],n=q$(i);n.boxes[r]=new mw(new j(s.getSize()-z$)),e.boxes[t]=n}}}return e}function X$(t,i){const e=function(t){const i=new fy;return i.boxes.push(...t.boxes),i}(t);for(let t=0;t0){const t=o.samples;if(!o.flags.sampleDurationPresent){o.flags.sampleDurationPresent=!0;const i=null!=s?s:n.defaultSampleDuration;for(const e of t)e.duration=i}t[0].duration+=h.toNumber(),o.samples=t}}r();var K$="Mp4Transmuxer",Y$=class extends jZ{_zt(t,i){fr(i);const e=t.fLt,s=kB(dh(t.YOt.lk.lk));if(!s)throw new m("Mp4Transmuxer - Unable to parse "+e.Km+" MP4 initializer.");this.i3=s;const n=function(t){let i,e;for(const s of t.Z)i||(i=s.N1),e||(e=s.D1);if(i||e)return{q9:i,W9:e,fOt:void 0};return}(s);n&&this.wzt(e,n);const r=function(t){for(const i of t.Z)if(void 0!==i.B1)return i.B1;return}(s);void 0!==r&&this.yzt(e,r);const h=function(t){var i;const e=My(t),s=hh(e.boxes,jN),n=s.boxes.filter(QN),r=hh(n,t=>H$(t)===Pw.AUDIO),h=hh(n,t=>H$(t)===Pw.VIDEO),o={q9:{sN:r?j$(r):void 0},W9:{sN:h?j$(h):void 0}},a=null==(i=hh(s.boxes,ZN))?void 0:i.boxes.filter($N);var u,c;const d=a?{q9:null!=(u=hh(a,t=>t.trackId===o.q9.sN))?u:void 0,W9:null!=(c=hh(a,t=>t.trackId===o.W9.sN))?c:void 0}:void 0;var l,f;if(d&&(o.q9.FB=null==(l=d.q9)?void 0:l.defaultSampleDuration,o.W9.FB=null==(f=d.W9)?void 0:f.defaultSampleDuration),!r||!h)return{q9:r?t:void 0,W9:h?t:void 0,LU:o};const v=W$(e),_=W$(e),g=e.boxes.indexOf(s);v.boxes[g]=G$(s,h),_.boxes[g]=G$(s,r);const p=v.serialize().join(),m=_.serialize().join();return{q9:p,W9:m,LU:o}}(t.YOt.lk.lk);if(this.iKt=h.LU,h.W9){const i=hh(s.Z,t=>t.sN===h.LU.W9.sN),e={Km:"rRt",lk:{Km:We.wZ,lk:h.W9},iat:at.Mk,$Ot:t.$Ot,kzt:{Rrt:'video/mp4; codecs="'+i.D1+'"',UW:t.UW},CO:t.CO,fLt:t.fLt,BHt:t.YOt.BHt};this.Wqt(e)}if(h.q9){const i=hh(s.Z,t=>t.sN===h.LU.q9.sN),e={Km:"rRt",lk:{Km:We.wZ,lk:h.q9},iat:at.Bk,$Ot:t.$Ot,kzt:{Rrt:'audio/mp4; codecs="'+i.N1+'"',UW:t.UW},CO:t.CO,fLt:t.fLt,BHt:t.YOt.BHt};this.Wqt(e)}return Promise.resolve()}async pzt(t,i){fr(i);const e=t.yut.BHt;ol.cN(K$,"Transmuxing fMP4: "+ah(e.Syt));const s=t.yut.lk,n=J$(s.lk,this.i3),r=cf(n.map(t=>t.zet),WE);if(void 0!==r&&(e.Get=r,this.Azt(t.fLt)),!this.pVt.zUt(t.$Ot)){const s=ul.hU(e.CO);if(n.length>0){const i=cf(n.map(t=>t.eKt),WE);for(const n of this.azt)this.pVt.iVt(t.$Ot,n,i,s,Z$(e),!1);this.Azt(t.fLt)}this.pVt.zUt(t.$Ot)||await ua(this.pVt.XUt(t.$Ot),i)}const h=this.pVt.ZUt(t.$Ot),o=e.Get?this.pVt.$Ut(e.Get,e).rF():e.CO,a=QZ(e,o);var u;const c={VHt:a,HHt:KZ(e,a),CO:o,ct:null!=(u=e.ct)?u:0,EU:h.rF(),$Ot:t.$Ot,fLt:t.fLt,BHt:t.yut.BHt},d=function(t,i){if(void 0===i.q9.sN)return{q9:void 0,W9:t};if(void 0===i.W9.sN)return{q9:t,W9:void 0};const e=My(t),s=W$(e),n=W$(e);for(let t=0;tt.sN===i),h=hh(n,t=>t.sN===i),o=this.sKt(d.W9,s,h,null==(l=this.iKt)?void 0:l.W9.FB,e);this.nKt=s,this.bzt(t.fLt,e,h.zet.gF(r));const a=Y({Km:"yut",lk:{Km:We.wZ,lk:o},iat:at.Mk},c);this.Wqt(a)}if(d.q9){const t=Y({Km:"yut",lk:{Km:We.wZ,lk:d.q9},iat:at.Bk},c);this.Wqt(t)}this.rKt=e,this.hKt=n}sKt(t,i,e,s,n){if(!Z$(n))return t;if(!this.rKt||!this.nKt||!this.hKt)return t;const r=this.nKt.sN,h=hh(this.hKt,t=>t.sN===r),o=this.pVt.$Ut(h.oKt,this.rKt),a=this.pVt.$Ut(e.zet,n).gF(o).eU(i.jD);if(a.cF(ul.SF))return t;if(a.hF(ul.hU(.5)))return t;const u=th(n)?n:n.PFt;return ol.OLt(K$,"Stretching first video frame of segment #"+u.LOt+" to fill gap of "+a.rF()+"s"),function(t,i,e,s){const n=My(t),r=hh(n.boxes,tB);if(r){const t=r.getSize();for(const t of r.boxes)t instanceof Kh&&Q$(t,i,e,s);const n=r.getSize();if(n!==t){const i=n-t;for(const t of r.boxes)t instanceof Kh&&nB(t,i)}}return n.serialize().join()}(t,i.jD,a,s)}constructor(...t){super(...t),this.i3=void 0,this.iKt=void 0,this.rKt=void 0,this.hKt=void 0,this.nKt=void 0}};function J$(t,i){const e=wT(Hn.PD(dh(t)),ui.NR);if(!e)throw new m("Mp4Transmuxer - Unable to parse segment or part.");return function(t,i){const e=[];for(const n of t.Z){if(!n.KB||0===n.QB.length||0===n.QB[0].iM.length)continue;const t=n.yD.sN,r=hh(i.Z,i=>i.sN===t);let h=0,o=1/0,a=0;const u=n.yD.FB||0;for(const t of n.QB)for(const i of t.iM){const t=i.eM||0,e=h+t;var s;h+=null!=(s=i.ct)?s:u;const n=h+t;ea&&(a=n)}const c=ul.yF(n.KB.KB,r.jD);e.push({sN:t,eKt:c,zet:c.gO(ul.bF(o,r.jD)),aKt:c.gO(ul.bF(h,r.jD)),oKt:c.gO(ul.bF(a,r.jD))})}return e}(e,i)}function Z$(t){return th(t)?t.KOt:0===t.CFt&&t.PFt.KOt}var $$="MpegtsTransmuxer",t0=class extends Y${_zt(t,i){return super._zt(t,i)}lzt(t,i){if(super.lzt(t,i),this.wE.uKt())return;var e;const s=null!=(e=null==i?void 0:i.Syt)?e:t.Syt;if(!s)return;/\.(ts|aac|mp3)/i.test(s.XE)&&this.wE.cKt()}dKt(t){let i;return t.fLt===this.lKt&&this.fKt.has(t.$Ot)?i=this.fKt.get(t.$Ot):(i=_Z(t.yut.lk.lk),this.lKt=t.fLt,this.fKt.set(t.$Ot,i)),i}async pzt(t,i){fr(i);const e=this.dKt(t),s=t.yut;if(e!==vZ.gHt&&e!==vZ.pHt)return super.pzt(t,i);if(s.BHt.UW.some(e0))throw new as(me.CONTENT_PROTECTION_NOT_SUPPORTED,"SAMPLE-AES encryption is not supported for MPEG-TS or Packed Audio segments");const n=this.wE.cKt();let r;e===vZ.gHt?(ol.cN($$,"Transmuxing MPEG-TS: "+ah(s.BHt.Syt)),r=await n.vKt({data:s.lk.lk,metadata:this._Kt})):(ol.cN($$,"Transmuxing raw audio: "+ah(s.BHt.Syt)),r=await n.gKt({data:s.lk.lk,metadata:this._Kt})),fr(i),this.wzt(t.fLt,{q9:r.metadata.audio_codec,W9:r.metadata.video_codec,fOt:void 0}),r.metadata.video_frame_rate&&this.yzt(t.fLt,r.metadata.video_frame_rate);const h=s0(r.metadata.first_decode_timestamp),o=s0(r.metadata.first_presentation_timestamp),a=void 0!==r.metadata.first_video_presentation_timestamp?s0(r.metadata.first_video_presentation_timestamp):void 0;if(s.BHt.Get=o,this.Azt(t.fLt),void 0!==a&&this.bzt(t.fLt,s.BHt,function(t,i){let e=t.gF(i);return e.lF(ul.SF)&&(e=e.gO(GE())),e}(a,o)),!this.pVt.zUt(t.$Ot)){const e=ul.hU(s.BHt.CO);for(const i of this.azt)this.pVt.iVt(t.$Ot,i,h,e,Z$(s.BHt),!0);this.Azt(t.fLt),this.pVt.zUt(t.$Ot)||await ua(this.pVt.XUt(t.$Ot),i)}const u=this.pVt.tVt(h,s.BHt);this._Kt=r.metadata;const c=this.pVt.$Ut(o,s.BHt).rF(),d=QZ(s.BHt,c);var l;const f={VHt:d,HHt:KZ(s.BHt,d),CO:c,ct:null!=(l=s.BHt.ct)?l:0,EU:u.rF(),$Ot:t.$Ot,fLt:t.fLt,BHt:s.BHt};if(void 0===r.data.audio_media&&void 0===r.data.video_media){for(const t of this.azt){const i=Y({Km:"yut",lk:void 0,iat:t},f);this.Wqt(i)}return}const v=[];if(void 0!==r.data.audio_media){if(r.data.audio_init&&(!this.pKt||this.mKt!==t.$Ot||!ko(this.pKt,r.data.audio_init))){const i=this.pVt.$Ut(s.BHt.Get,s.BHt).rF(),e={Km:"rRt",lk:{Km:We.wZ,lk:r.data.audio_init},iat:at.Bk,$Ot:t.$Ot,kzt:{Rrt:'audio/mp4; codecs="'+r.metadata.audio_codec+'"',UW:s.BHt.UW},CO:i,fLt:t.fLt,BHt:s.BHt};this.pKt=r.data.audio_init,this.mKt=t.$Ot,this.Wqt(e)}const i=Y({Km:"yut",lk:{Km:We.wZ,lk:r.data.audio_media},iat:at.Bk},f);this.Wqt(i)}else if(t.yut.BHt.EFt&&Ct(this.azt,at.Bk)){const t=Y({Km:"yut",lk:void 0,iat:at.Bk},f);this.Wqt(t)}if(void 0!==r.data.video_media){if(r.data.video_init&&(!this.wKt||this.yKt!==t.$Ot||!ko(this.wKt,r.data.video_init))){const i=this.pVt.$Ut(s.BHt.Get,s.BHt).rF(),e={Km:"rRt",lk:{Km:We.wZ,lk:r.data.video_init},iat:at.Mk,$Ot:t.$Ot,kzt:{Rrt:'video/mp4; codecs="'+r.metadata.video_codec+'"',UW:s.BHt.UW},CO:i,fLt:t.fLt,BHt:s.BHt};this.wKt=r.data.video_init,this.yKt=t.$Ot,this.bKt=kB(dh(r.data.video_init)),this.Wqt(e)}const i=this.bKt.Z[0],e=J$(r.data.video_media,this.bKt)[0],n=this.sKt(r.data.video_media,i,e,void 0,s.BHt);this.nKt=i;const h=Y({Km:"yut",lk:{Km:We.wZ,lk:n},iat:at.Mk},f);this.Wqt(h),v.push(e)}else if(t.yut.BHt.EFt&&Ct(this.azt,at.Mk)){const t=Y({Km:"yut",lk:void 0,iat:at.Mk},f);this.Wqt(t)}this.rKt=s.BHt,this.hKt=v}Zg(){this.pKt=void 0,this.wKt=void 0,this.mKt=-1,this.yKt=-1,super.Zg()}constructor(t,i,e,s){super(i,e,s),this.wE=void 0,this._Kt=void 0,this.pKt=void 0,this.wKt=void 0,this.bKt=void 0,this.mKt=-1,this.yKt=-1,this.lKt=void 0,this.fKt=re(),this.wE=t}},i0=class{_Tt(t,i,e){return new t0(this,t,i,e)}};function e0(t){return t.Hk===ao.tOt}function s0(t){return ul.yF(yo.fromBits(t.low,t.high),t.base)}r(),r();var n0=function(t){return t[t.MPEGTS_TO_FMP4=0]="MPEGTS_TO_FMP4",t[t.RAW_AUDIO_TO_FMP4=1]="RAW_AUDIO_TO_FMP4",t}({}),r0=()=>{const t=function(){if("undefined"==typeof WebAssembly)return!1;const t=zs.d_;if(t>0&&t<=56)return!1;try{return void 0!==new WebAssembly.Module(Cn("AGFzbQEAAAA="))}catch(t){return!1}}();return r0=()=>t,t};var h0=class{vKt(t){return this.AKt(n0.MPEGTS_TO_FMP4,t)}gKt(t){return this.AKt(n0.RAW_AUDIO_TO_FMP4,t)}FQt(){const t=M$(this.UQt,this.VQt,{name:"THEOplayer transmux worker"});return t.wn("message",this.HQt),t.wn("error",this.WQt),t}AKt(t,i){const e=++this.qQt,s={type:t,id:e,input:i},n=new Ga;return this.KQt.set(e,n),this.mQt.pQt(s),n.Yy}zg(t){void 0===t&&(t=new Qc),this.KQt.forEach(i=>i.Ky(t)),this.KQt.clear(),this.mQt.bQt()}constructor(t){this.VQt=void 0,this.UQt=void 0,this.mQt=void 0,this.qQt=0,this.KQt=re(),this.HQt=t=>{const i=t.data;if(void 0!==i.requestId){const t=this.KQt.get(i.requestId);if(!t)return;this.KQt.delete(i.requestId),i.success?t.Qy(i.output):t.Ky(new as(i.errorCode,i.error))}else i.success||this.zg(new as(i.errorCode,i.error))},this.WQt=t=>{const i=new as(me.MEDIA_DECODE_ERROR,t.error.message,t.error);this.zg(i)},this.VQt=t;const i=r0()?"THEOplayer.transmux.js":"THEOplayer.transmux.asmjs.js";try{this.UQt=zd.Pm(i,t)}catch(t){throw new as(me.CONFIGURATION_ERROR,"Invalid player configuration: missing libraryLocation",t)}this.mQt=this.FQt()}},o0=class extends i0{uKt(){return void 0!==this.mQt}cKt(){var t;return null!=(t=this.mQt)?t:this.mQt=new h0(this.SKt)}zg(){this.mQt&&(this.mQt.zg(),this.mQt=void 0)}constructor(t){super(),this.SKt=void 0,this.mQt=void 0,this.SKt=t,this.mQt=void 0}},a0=class{jet(){return new o0(this.SKt)}constructor(t){this.SKt=void 0,this.SKt=t}},u0=class extends k${zP(){return this.PL.zP()}get WP(){return this.PL.WP}set WP(t){this.PL.WP=t}async kn(){var t;await super.kn(),null==(t=this.$xt)||t.kn()}constructor(t,i,e,s,n){const r=function(t){return I$.US()?new I$:new V$(t)}(n.libraryLocation);super(t,i,e,s,r,new a0(n.libraryLocation),new rX(Wc.Bg.Bxt,Wc.Bg.Nxt,Wc.Bg.bct,Wc.Bg.Lxt),n),this.$xt=void 0,zs.X_&&(this.$xt=new qU(this))}},c0=class extends u0{async kn(){await super.kn(),await this.Nq.Dq(this.PL)}constructor(t,i,e,s,n){const r=new qs(t);super(r.Yq(at.Mk),i,e,s,n),this.Nq=void 0,this.Nq=r}},d0=class extends P${Jq(t,i){return!!fv(t.useManagedMediaSource)&&(!(!t.useManagedMediaSource&&(zs.ru||zs.Tg))&&super.Jq(t,i))}async Zq(t){return!(t.clearkey&&!t.fairplay&&zs.X_)&&super.Zq(t)}};oe(new class extends d0{DC(t,i,e,s,n,r,h){return new c0(i,e,n,r,s)}$q(){return!0}constructor(...t){super(...t),this.tz=$._C}}),ol.Rt=()=>{var t;return Boolean(null==(t=s)?void 0:t.THEOplayerDebugLogsEnabled)},r(),r(),r(),r();var l0=class{sdt(t,i){return Promise.resolve(!1)}Aut(t,i){return Promise.resolve(void 0)}hTt(t){return Promise.resolve(void 0)}jJ(t){return Promise.resolve(void 0)}},f0=class extends Ne{TKt(){var t;return null==(t=this.kKt)?void 0:t.sLt}Tn(){Wr(ws(()=>this.EKt(this.hT.Yg),this.hT.Yg))}async EKt(t){await this.nEt.UVt(t),this.xKt&&(this.PKt(this.xKt.Ti,this.xKt.Mi),this.xKt=void 0),this.i8=!0}IKt(t,i){this.i8?this.PKt(t,i):this.xKt={Ti:t,Mi:i}}PKt(t,i){const e=this.CKt(t,i),s=null==e?void 0:e.fFt[0];s!==this.kKt&&(this.RKt(),void 0!==s&&(this.kKt=s,this.DKt=new bZ(this.nEt,s),this.DKt.iWt()))}RKt(){this.kKt=void 0,this.DKt&&(this.DKt.zg(),this.DKt=void 0)}CKt(t,i){const e=hh(this.nEt.Br._Vt,e=>void 0!==e.RRt&&e.RRt.Ti===t&&e.RRt.Mi===i);return null!=e?e:this.nEt.Br._Vt[0]}kn(){this.Vo(),this.hT.Zg(),this.hT.zg(),this.RKt(),this.nEt.zg()}constructor(t,i,e){super(),this.Ac=void 0,this.nEt=void 0,this.kKt=void 0,this.DKt=void 0,this.i8=void 0,this.xKt=void 0,this.hT=new Zc,this.Ac=t,this.nEt=new rZ(e,new l0,t.useCredentials,t.src,t.liveOffset),this.nEt.wn(d.qw,this.Rs),this.i8=!1}};r();var v0=class extends je{get ht(){return this.V8.ht}get Fx(){return this.V8.Fx}get Vx(){return this.V8.Vx}set Vx(t){this.V8.Vx=t}get bt(){return this.V8.bt}get zx(){return this.V8.zx}set zx(t){this.V8.zx=t}Xx(t,i){this.zx=t}get ct(){return this.V8.ct}get Qx(){return this.V8.Qx}get Jx(){return this.V8.Jx}get $x(){return this.V8.$x}get iP(){return this.V8.iP}get lt(){return this.V8.lt}get sP(){return this.V8.sP}get rP(){return this.V8.rP}get oP(){return this.V8.oP}set oP(t){this.V8.oP=t}get cP(){return this.V8.cP}get lP(){return this.V8.lP}get vP(){return this.V8.vP}set vP(t){this.V8.vP=t}get pP(){return this.V8.pP}get wP(){return this.V8.wP}set wP(t){this.V8.wP=t}get AP(){return this.V8.AP}get kP(){return this.V8.kP}get xP(){return this.V8.xP}get uq(){return this.V8.uq}get nt(){return this.V8.nt}get DP(){return this.V8.DP}get rt(){return this.V8.rt}get MP(){return this.V8.MP}get OP(){return this.V8.OP}set OP(t){this.V8.OP=t}get VP(){return this.V8.VP}get WP(){return this.V8.WP}set WP(t){this.V8.WP=t}get dq(){return this.V8.dq}get OL(){}YP(){return this.V8.YP()}qP(){return this.V8.qP()}Aa(){return this.V8.Aa()}sI(t){return this.V8.sI(t)}zP(){return this.V8.zP()}we(){return this.V8.we()}$P(){return this.V8.$P()}tI(){return this.V8.tI()}jP(){return this.V8.jP()}QP(){return this.V8.QP()}hr(){return this.V8.hr()}Ta(t,i,e){return this.V8.Ta(t,i,e)}IP(t,i,e,s){return this.V8.IP(t,i,e,s)}CP(){return this.V8.CP()}be(){return this.V8.be()}JP(){return this.V8.JP()}ZP(){return this.V8.ZP()}kn(){this.Vo();for(const t of pC)this.V8.mn(t,this.Rs);return this.V8.kn()}constructor(t){super(),this.V8=void 0,this.V8=t;for(const t of pC)this.V8.wn(t,this.Rs)}},_0=class extends v0{async Ta(t,i,e){await super.Ta(t,i,e),t.hlsDateRange&&this.myt(t,i)}myt(t,i){this.NKt=new f0(t,i,this.BKt),this.NKt.wn(d.qw,this.handleManifestUpdate),this.NKt.Tn()}hr(){return this.oHt&&(this.nt.it(this.oHt),this.J9.it(this.oHt),this.oHt.kn(),this.oHt=void 0,this.MKt=!1),this.NKt&&(this.NKt.kn(),this.NKt=void 0),this.J9.hr(),super.hr()}kn(){return this.mn(d.Jw,this.rjt),this.NKt&&(this.NKt.kn(),this.NKt=void 0),this.J9.kn(),super.kn()}constructor(t,i,e){super(t),this.NKt=void 0,this.BKt=void 0,this.MKt=!1,this.oHt=void 0,this.J9=void 0,this.handleManifestUpdate=t=>{this.So(t);const i=this.NKt.TKt();if(i){const t=this.uq;if(t){const e=t.getTime();let s=this.oHt;s||(s=new BJ,this.oHt=s),s.er(i.tFt,t=>(t.getTime()-e)/1e3),!this.MKt&&s.L.V>0&&(this.nt.tt(s),this.J9.tt(s),this.MKt=!0)}}},this.rjt=()=>{this.NKt&&this.NKt.IKt(this.MP,this.DP)},this.BKt=i,this.J9=new gL(this),this.wn(d.Jw,this.rjt)}};!function(t){lC.iz().ez(t)}(function(t,i,e){return new _0(t,i,e)}),r(),r(),r(),r();var Us=class extends Qr{get name(){return"CastError"}constructor(t,i=""){super("An error occurred while casting."),this.errorCode=void 0,this.description=void 0,this.errorCode=t,this.description=i}};async function g0(t){w0()||await async function(t){if(null==t?void 0:t.Hg)return Promise.reject(new Qc);const{Yy:i,Qy:e,Ky:n}=function(){let t,i;return{Yy:new Promise((e,s)=>{t=e,i=s}),Qy:t,Ky:i}}(),r=s.__onGCastApiAvailable,h=()=>{s.__onGCastApiAvailable=r,n(new Qc)};return s.__onGCastApiAvailable=(i,o)=>{i?e():n(new m(o)),null==t||t.jg(h),s.__onGCastApiAvailable=r,r&&r(i,o)},null==t||t.Xg(h),i}(t),m0()||await Ze(100,t),m0()||(zd.um('Detected the Chromecast library was loaded without the CAF framework. It is strongly encouraged to load it with the CAF framework by using this URL: "//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"'),await p0())}var p0=Oc(()=>function(t){return new Promise((i,e)=>{const s=h.createElement("script");s.onload=()=>i(),s.onerror=t=>e((null==t?void 0:t.error)||t),s.type="text/javascript",s.src=t,(h.head||h.documentElement).appendChild(s)})}("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js").catch(()=>{throw new Us("API_NOT_INITIALIZED","The Chromecast library could not be loaded successfully.")}));function m0(){return Boolean("undefined"!=typeof cast&&cast.framework)}function w0(){return"undefined"!=typeof chrome&&chrome&&chrome.cast&&chrome.cast.isAvailable}function y0(t,i,e,s){if(it(i))for(const e of w.keys(i)){if("type"===e||"images"===e)continue;const s=i[e];it(s)&&(t[e]=s)}!function(t,i,e,s){if(!it(e)&&!it(null==i?void 0:i.images))return;t.images=[],e&&t.images.push(new s.Image(e));if(null==i?void 0:i.images)if(Q(i.images))t.images.push(new s.Image(i.images));else if(hi(i.images))for(const e of i.images){let i;var n,r;if(Q(e))i=new s.Image(e);else i=new s.Image(e.src),i.height=null!=(n=e.height)?n:null,i.width=null!=(r=e.width)?r:null;t.images.push(i)}}(t,i,e,s)}function b0(t,i,e){return void 0===e&&(e=chrome),function(t,i,e){switch(null==t?void 0:t.type){case"movie":{const s=new e.MovieMediaMetadata;return y0(s,t,i,e),s}case"audio":{const s=new e.MusicTrackMediaMetadata;return y0(s,t,i,e),!it(s.artist)&&it(t.artistName)&&(s.artist=t.artistName),s}case"tv-show":{const s=new e.TvShowMediaMetadata;return y0(s,t,i,e),!it(s.title)&&it(t.episodeTitle)&&(s.title=t.episodeTitle),!it(s.season)&&it(t.seasonNumber)&&(s.season=t.seasonNumber),!it(s.episode)&&it(t.episodeNumber)&&(s.episode=t.episodeNumber),s}default:{const s=new e.GenericMediaMetadata;return y0(s,t,i,e),s}}}(t,i,function(t){return{GenericMediaMetadata:t.cast.media.GenericMediaMetadata,MovieMediaMetadata:t.cast.media.MovieMediaMetadata,TvShowMediaMetadata:t.cast.media.TvShowMediaMetadata,MusicTrackMediaMetadata:t.cast.media.MusicTrackMediaMetadata,Image:t.cast.Image}}(e))}function Wn(t){switch(t){case chrome.cast.ErrorCode.CANCEL:return"CANCEL";case chrome.cast.ErrorCode.TIMEOUT:return"TIMEOUT";case chrome.cast.ErrorCode.API_NOT_INITIALIZED:return"API_NOT_INITIALIZED";case chrome.cast.ErrorCode.INVALID_PARAMETER:return"INVALID_PARAMETER";case chrome.cast.ErrorCode.EXTENSION_NOT_COMPATIBLE:return"EXTENSION_NOT_COMPATIBLE";case chrome.cast.ErrorCode.EXTENSION_MISSING:return"EXTENSION_MISSING";case chrome.cast.ErrorCode.RECEIVER_UNAVAILABLE:return"RECEIVER_UNAVAILABLE";case chrome.cast.ErrorCode.SESSION_ERROR:return"SESSION_ERROR";case chrome.cast.ErrorCode.CHANNEL_ERROR:return"CHANNEL_ERROR";case chrome.cast.ErrorCode.LOAD_MEDIA_FAILED:return"LOAD_MEDIA_FAILED";default:return"CANCEL"}}function A0(t){if(t.items&&t.items.length>0&&it(t.currentItemId)&&t.currentItemId>=0)return hh(t.items,i=>i.itemId===t.currentItemId)}r(),r(),r(),r(),r();var Ln="urn:x-cast:com.theoplayer.cast";r(),r();var S0=function(t){return t.LKt="theoplayer_receiver_info",t.OKt="theoplayer_trackpropertychange",t.FKt="theoplayer_propertychange",t}({});r();var T0=function(t){return t.SKIP_AD="SKIP_AD",t}({});r();function qn(t){h.createElement("img").src=t}r(),r(),r();var k0=new RegExp(/^(\d\d):(\d\d):(\d\d)(?:\.(\d{3}))?$/);function E0(t){if(!Q(t))return;const i=t.match(k0);return i?3600*x(i[1],10)+60*x(i[2],10)+Number(i[3])+(Number(i[4])||0)/1e3:void 0}function x0(t){if(void 0===t)return;const i=t.match(/^([1-9]?\d|100)%$/);return i?x(i[1])/100:void 0}function P0(t,i){return"vmap"===t.type||!it(t.type)&&!it(i)}function I0(t,i){return"vast"===t.type||!it(t.type)&&it(i)}r(),r(),r();var C0=class{},R0=class extends C0{get UKt(){return this.qc}VKt(){return null!=this.HKt||(this.HKt=hs(this.qc,t=>t.VKt())),this.HKt}constructor(t){super(),this.qc=void 0,this.HKt=void 0,this.qc=t.sort((t,i)=>t.zB-i.zB)}};r(),r();var D0=class extends C0{get o(){return this.WKt}get zB(){return this.qKt}get zKt(){return this.GKt}constructor(t,i){super(),this.WKt=void 0,this.qKt=void 0,this.GKt=void 0,this.WKt=t,this.qKt=i,this.GKt=!1}},N0=class extends D0{get XKt(){return this.jKt}get QKt(){return this.KKt}get YKt(){return this.JKt}get ZKt(){return this.$Kt}get lt(){return this.nq}VKt(){if(void 0===this.tYt){let t,i,e,s=[];for(const n of this.jKt)n.iYt&&(t=n.iYt),n.eYt&&(i=n.eYt),n.sYt&&(e=n.sYt),s=s.concat(n.universalAdIds);this.tYt={ZKt:this.ZKt,iYt:t,nYt:i,sYt:e,lt:this.lt,rYt:s}}return[this.tYt]}constructor(t,i,e,s,n,r,h){super(t,i),this.KKt=void 0,this.JKt=void 0,this.$Kt=void 0,this.jKt=void 0,this.nq=void 0,this.tYt=void 0,this.KKt=e,this.JKt=s,this.$Kt=n,this.jKt=r,this.nq=h}};r(),r();var B0=class{get hYt(){return this.oYt}get aYt(){return this.uYt}constructor(t,i){this.oYt=void 0,this.uYt=void 0,this.oYt=t,this.uYt=i}},M0=class{get cYt(){return this.dYt}get lYt(){return this.fYt}get vYt(){return this._Yt}get gYt(){return this.pYt}get od(){return this.mYt}set od(t){this.mYt=t}get wYt(){return this.yYt}get bYt(){return this.AYt}SYt(){this.AYt=!0}get QKt(){return this.KKt}constructor(t,i,e,s,n,r){this.dYt=void 0,this.fYt=void 0,this._Yt=void 0,this.pYt=void 0,this.AYt=void 0,this.yYt=void 0,this.mYt=void 0,this.KKt=void 0,this.dYt=t,this.fYt=i,this._Yt=e,this.pYt=s,this.AYt=!1,this.yYt=n,this.KKt=r}};r();var L0=function(t){return t.TYt="all",t.kYt="any",t.pz="none",t}({});var O0=class{get EYt(){return this.xYt}get PYt(){return this.IYt}constructor(t,i){this.xYt=void 0,this.IYt=void 0,this.xYt=t,this.IYt=i}},F0=class{get o(){return this.aS}get Ti(){return this.lA}get Mi(){return this.fA}get CYt(){return this.RYt}get DYt(){return this.NYt}get BYt(){return this.MYt}get LYt(){return this.OYt}get FYt(){return this.UYt}get VYt(){return this.HYt}get WYt(){return this.qYt}get cYt(){return this.dYt}get lYt(){return this.fYt}get vYt(){return this._Yt}get zYt(){return this.GYt}get aYt(){return this.XYt}get jYt(){return this.QYt}constructor(t,i,e,s,n,r,h,o,a,u,c,d,l,f,v,_){this.lA=void 0,this.fA=void 0,this.aS=void 0,this.RYt=void 0,this.NYt=void 0,this.MYt=void 0,this.OYt=void 0,this.UYt=void 0,this.HYt=void 0,this.qYt=void 0,this.dYt=void 0,this.fYt=void 0,this._Yt=void 0,this.GYt=void 0,this.XYt=void 0,this.QYt=void 0,this.lA=t,this.fA=i,this.aS=e,this.RYt=s,this.NYt=n,this.MYt=r,this.OYt=h,this.UYt=o,this.HYt=a,this.qYt=u,this.dYt=c,this.fYt=d,this._Yt=l,this.GYt=f,this.XYt=v,this.QYt=_}};r();var U0=class{get id(){return this.aS}get uri(){return this.NFt}constructor(t,i){this.aS=void 0,this.NFt=void 0,this.aS=t,this.NFt=i}},V0=class{get KYt(){return this.YYt}get JYt(){return this.ZYt}get $Yt(){return this.tJt}get iJt(){return this.eJt}constructor(t,i,e,s){this.YYt=void 0,this.ZYt=void 0,this.tJt=void 0,this.eJt=void 0,this.YYt=t,this.ZYt=i,this.tJt=e,this.eJt=s}},H0=class extends D0{get ZKt(){return this.$Kt}get sJt(){return this.nJt}get rJt(){return this.hJt}get XKt(){return this.jKt}get oJt(){return this.aJt}get uJt(){return this.cJt}get lt(){return this.nq}VKt(){return void 0===this.nJt?[]:(null!=this.HKt||(this.HKt=this.nJt.VKt().map(t=>this.dJt(t))),this.HKt)}dJt(t){let i,e,s;for(const t of this.XKt)t.iYt&&(i=t.iYt),t.eYt&&(e=t.eYt),t.sYt&&(s=t.sYt);const n=t.ZKt.concat(this.ZKt);let r=t.iYt;if(i&&t.iYt){const e=new V0(t.iYt.lJt.KYt,t.iYt.lJt.JYt,t.iYt.lJt.$Yt.concat(i.lJt.$Yt),t.iYt.lJt.iJt.concat(i.lJt.iJt));r=t.iYt,r.lJt=e,r.aYt=r.aYt.concat(i.aYt)}let h=t.nYt;if(e&&e.hYt){var o,a;const s=[];for(const t of e.hYt)s.concat(t.gYt.$Yt);const n=[];var u,c;for(const e of null!=(u=null==(o=t.nYt)?void 0:o.hYt)?u:[]){var d,l,f;const r=new V0(e.gYt.KYt,e.gYt.JYt,e.gYt.$Yt.concat(s),(null!=(l=null==(d=t.iYt)?void 0:d.lJt.iJt)?l:[]).concat(null!=(f=null==i?void 0:i.lJt.iJt)?f:[]));n.push(new M0(e.cYt,e.lYt,e.vYt,r,e.wYt,e.QKt))}h=new B0(n,(null!=(c=null==(a=t.nYt)?void 0:a.aYt)?c:[]).concat(e.aYt))}let v=t.sYt;if(v){var _;let i=v.EYt;var g,p;s&&s.EYt&&(i=s.EYt),v=new O0(i,(null!=(g=null==(_=t.sYt)?void 0:_.PYt)?g:[]).concat(null!=(p=null==s?void 0:s.PYt)?p:[]))}let m=t.lt;return this.lt&&(m=this.lt),{ZKt:n,iYt:r,nYt:h,sYt:v,lt:m,rYt:t.rYt}}constructor(t,i,e,s,n,r,h,o,a){super(t,i),this.$Kt=void 0,this.nJt=void 0,this.hJt=void 0,this.aJt=void 0,this.cJt=void 0,this.jKt=void 0,this.nq=void 0,this.HKt=void 0,this.$Kt=e,this.nJt=s,this.hJt=n,this.jKt=r,this.aJt=h,this.cJt=o,this.nq=a}};r();var W0=class{get o(){return this.aS}get fJt(){return this.vJt}get _Jt(){return this.gJt}get FYt(){return this.UYt}get iYt(){return this.pJt}get eYt(){return this.mJt}get sYt(){return this.wJt}get universalAdIds(){return this.yJt}constructor(t,i,e,s,n,r,h,o){this.aS=void 0,this.vJt=void 0,this.gJt=void 0,this.UYt=void 0,this.pJt=void 0,this.mJt=void 0,this.wJt=void 0,this.yJt=void 0,this.aS=t,this.vJt=i,this.gJt=e,this.UYt=s,this.pJt=n,this.mJt=r,this.wJt=h,this.yJt=o}};r();var q0=class{get ct(){return this.bJt}get AJt(){return this.SJt}get aYt(){return this.uYt}set aYt(t){this.uYt=t}set lJt(t){this.TJt=t}get lJt(){return this.TJt}get kJt(){return this.EJt}set kJt(t){this.EJt=t}get xJt(){return this.AYt}get od(){return this.mYt}set od(t){this.mYt=t}get wYt(){return this.yYt}get QKt(){return this.KKt}SYt(){this.AYt=!0}get PJt(){return this.IJt}set PJt(t){this.IJt=t}get CJt(){return this.RJt}get DJt(){return this.NJt}constructor(t,i,e,s,n,r,h,o,a){this.bJt=void 0,this.SJt=void 0,this.IJt=void 0,this.uYt=void 0,this.TJt=void 0,this.EJt=void 0,this.AYt=void 0,this.yYt=void 0,this.mYt=void 0,this.KKt=void 0,this.RJt=void 0,this.NJt=void 0,this.bJt=t,this.SJt=i,this.uYt=e,this.TJt=s,this.EJt=n,this.AYt=!1,this.yYt=r,this.KKt=h,this.RJt=o,this.NJt=a}};function Ic(t,i){return X0(t)&&t.getAttribute(i)||void 0}function z0(t,i){return G0(t,i,void 0,!1)}function G0(t,i,e,s){return i===(t.localName?t.localName:t.nodeName)&&(s&&e?e===t.namespaceURI:!e||!t.namespaceURI||e===t.namespaceURI)}function Po(t,i){const e=[];for(let s=0;s0)throw new m('Invalid document for MIME type "'+i+'"');return e}function Q0(t){return t.replace(/[<>&'"]/g,t=>{switch(t){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return""";default:return t}})}function K0(t){return"data:application/xml,"+encodeURIComponent(t)}r(),r();var gl=function(t){return t.BJt="mute",t.MJt="unmute",t.jw="pause",t.LJt="resume",t.OJt="rewind",t.FJt="skip",t.UJt="playerExpand",t.VJt="playerCollapse",t.HJt="fullscreen",t.WJt="exitFullscreen",t.qJt="expand",t.COLLAPSE="collapse",t.tTt="start",t.zJt="firstQuartile",t.GJt="thirdQuartile",t.XJt="midpoint",t.jJt="complete",t.QJt="acceptInvitationLinear",t.KJt="acceptInvitation",t.YJt="timeSpentViewing",t.JJt="otherAdInteraction",t.Qw="progress",t.ZJt="creativeView",t.$Jt="adExpand",t.tZt="adCollapse",t.iZt="minimize",t.eZt="close",t.sZt="closeLinear",t.nZt="overlayViewDuration",t.rZt="breakStart",t.hZt="breakEnd",t.ma="error",t}({});function Y0(t){switch(t){case"breakStart":case"breakEnd":case"error":return!0;default:return!1}}var J0=["mute","unmute","pause","resume","rewind","skip","closeLinear","close","playerExpand","playerCollapse","fullscreen","exitFullscreen","expand","collapse","creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","acceptInvitationLinear","acceptInvitation","timeSpentViewing","otherAdInteraction","progress"];function Z0(t){return void 0!==t&&-1!==J0.indexOf(t)}var $0=["start","firstQuartile","midpoint","thirdQuartile","complete","mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","expand","collapse","fullscreen","exitFullscreen","creativeView","acceptInvitation","adExpand","adCollapse","minimize","close","overlayViewDuration","otherAdInteraction","progress"];function t1(t){return void 0!==t&&-1!==$0.indexOf(t)}var i1=["mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","creativeView"];function e1(t){return void 0!==t&&-1!==i1.indexOf(t)}function s1(t,i){if(void 0===t||""===t||void 0===i)return;let e=t.match(/^(\d+):(\d+):(\d+)$/);return e?C(e[1]||"0")+60*C(e[2]||"0")+C(e[3]||"0"):(e=t.match(/^(100|[1-9]\d|\d)%$/),e?C(e[1]||"0")*i/100:void 0)}var n1=class{get oX(){return this.oZt}get ac(){return this.aZt}get eventURL(){return this.uZt}constructor(t,i,e){this.oZt=void 0,this.aZt=void 0,this.uZt=void 0,this.oZt=t,this.aZt=i,this.uZt=e}};r();var r1=class{get cZt(){return this.dZt}constructor(t){this.dZt=void 0,this.dZt=t}},h1=class extends r1{get KYt(){return this.YYt}get jYt(){return this.QYt}get lZt(){return this.fZt}constructor(t,i,e,s){super(t),this.fZt=void 0,this.QYt=void 0,this.YYt=void 0,this.fZt=i,this.YYt=e,this.QYt=s}},o1=class extends r1{constructor(t){super(t)}},a1=class extends r1{constructor(t){super(t)}};r();var Hr={vZt:{Jy:100,Iy:"XML parsing error."},_Zt:{Jy:303,Iy:"Empty or invalid VAST error."},gZt:{Jy:400,Iy:"General linear error"},pZt:{Jy:403,Iy:"Unsupported MIME-type or missing mediafiles error"},mZt:{Jy:500,Iy:"General nonlinear error"},BG:{Jy:900,Iy:"Network error"}},u1=class{get wZt(){return this.yZt}bZt(t){if(!this.wZt)return;const i=this.wZt.replace(/\[ERRORCODE]/,""+t.Jy);qn(i)}constructor(t){this.yZt=void 0,this.yZt=t}};r();var ys=class extends Qr{get AZt(){return this.SZt}get TZt(){var t;return null!=(t=this.kZt)?t:900}constructor(t,i,e,s){super(e||i&&c1[i]||t,s),this.SZt=void 0,this.kZt=void 0,this.G2=void 0,this.SZt=t,this.kZt=i,this.G2=e}},$c=function(t){return t.ADBLOCK="adblock",t.NETWORK="network",t.PARSING="parsing",t.PLAYBACK="playback",t.GENERAL="general",t}({}),xs=function(t){return t[t.VAST_MALFORMED_RESPONSE=100]="VAST_MALFORMED_RESPONSE",t[t.VAST_SCHEMA_VALIDATION_ERROR=101]="VAST_SCHEMA_VALIDATION_ERROR",t[t.VAST_UNSUPPORTED_VERSION=102]="VAST_UNSUPPORTED_VERSION",t[t.VAST_TRAFFICKING_ERROR=200]="VAST_TRAFFICKING_ERROR",t[t.VAST_UNEXPECTED_LINEARITY=201]="VAST_UNEXPECTED_LINEARITY",t[t.VAST_UNEXPECTED_DURATION_ERROR=202]="VAST_UNEXPECTED_DURATION_ERROR",t[t.UNEXPECTED_SIZE=203]="UNEXPECTED_SIZE",t[t.VAST_WRAPPER_ERROR=300]="VAST_WRAPPER_ERROR",t[t.VAST_LOAD_TIMEOUT=301]="VAST_LOAD_TIMEOUT",t[t.VAST_TOO_MANY_REDIRECTS=302]="VAST_TOO_MANY_REDIRECTS",t[t.VAST_NO_ADS_AFTER_WRAPPER=303]="VAST_NO_ADS_AFTER_WRAPPER",t[t.GENERAL_LINEAR_ERROR=400]="GENERAL_LINEAR_ERROR",t[t.FILE_NOT_FOUND=401]="FILE_NOT_FOUND",t[t.VAST_MEDIA_LOAD_TIMEOUT=402]="VAST_MEDIA_LOAD_TIMEOUT",t[t.VAST_LINEAR_ASSET_MISMATCH=403]="VAST_LINEAR_ASSET_MISMATCH",t[t.VAST_PROBLEM_DISPLAYING_MEDIA_FILE=405]="VAST_PROBLEM_DISPLAYING_MEDIA_FILE",t[t.MEZZANINE_FILE_REQUIRES=406]="MEZZANINE_FILE_REQUIRES",t[t.MEZZANINE_FILE_DOWNLOADED_FIRST_TIME=407]="MEZZANINE_FILE_DOWNLOADED_FIRST_TIME",t[t.AD_IN_VAST_REJECTED=408]="AD_IN_VAST_REJECTED",t[t.INTERACTIVE_CREATIVE_NOT_EXECUTED=409]="INTERACTIVE_CREATIVE_NOT_EXECUTED",t[t.VERIFICATION_CODE_NOT_EXECUTED=410]="VERIFICATION_CODE_NOT_EXECUTED",t[t.GENERAL_NON_LINEAR_ERROR=500]="GENERAL_NON_LINEAR_ERROR",t[t.NONLINEAR_DIMENSIONS_ERROR=501]="NONLINEAR_DIMENSIONS_ERROR",t[t.OVERLAY_AD_LOADING_FAILED=502]="OVERLAY_AD_LOADING_FAILED",t[t.VAST_NONLINEAR_ASSET_MISMATCH=503]="VAST_NONLINEAR_ASSET_MISMATCH",t[t.GENERAL_COMPANION_AD_ERROR=600]="GENERAL_COMPANION_AD_ERROR",t[t.INVALID_DIMENSIONS_COMPANION_AD=601]="INVALID_DIMENSIONS_COMPANION_AD",t[t.COMPANION_REQUIRED_ERROR=602]="COMPANION_REQUIRED_ERROR",t[t.COMPANION_AD_LOADING_FAILED=603]="COMPANION_AD_LOADING_FAILED",t[t.UNABLE_TO_FIND_SUPPORTED_COMPANION=604]="UNABLE_TO_FIND_SUPPORTED_COMPANION",t[t.UNKNOWN_ERROR=900]="UNKNOWN_ERROR",t[t.GENERAL_VPAID_ERROR=901]="GENERAL_VPAID_ERROR",t[t.MALFORMED_URI=1005]="MALFORMED_URI",t[t.VAST_ASSET_NOT_FOUND=1007]="VAST_ASSET_NOT_FOUND",t[t.VAST_EMPTY_RESPONSE=1009]="VAST_EMPTY_RESPONSE",t[t.UNKNOWN_AD_RESPONSE=1010]="UNKNOWN_AD_RESPONSE",t[t.UNSUPPORTED_LOCALE=1011]="UNSUPPORTED_LOCALE",t[t.INVALID_ARGUMENTS=1101]="INVALID_ARGUMENTS",t[t.INVALID_ADX_EXTENSION=1105]="INVALID_ADX_EXTENSION",t[t.AUTOPLAY_DISALLOWED=1205]="AUTOPLAY_DISALLOWED",t}({}),c1={100:"XML parsing error.",101:"VAST schema validation error.",102:"VAST version of response not supported.",200:"Trafficking error. The video player received an ad type that it was not expecting and/or cannot display.",201:"Video player expecting different linearity.",202:"Video player expecting different duration.",203:"Video player expecting different size.",300:"General wrapper error.",301:"Timeout of VAST URI provided in wrapper element, or of VAST URI provided in a subsequent wrapper element. This includes request errors such as invalid URI, unreachable or request timeout for URI, and security or other exceptions related to requesting a VAST URI.",302:"Wrapper limit reached, as defined by the video player. Too many wrapper responses have been received with no InLine response. This can be caused by a circular loop of daisy chaining (one network bouncing to another and another).",303:"No ads VAST response after one or more wrappers. This also includes the number of empty VAST responses from fallback.",400:"General linear error. The video player is unable to display the linear ad.",401:"File not found. Unable to find Linear/MediaFile from URI.",402:"Unable to download or timeout of MediaFile URI.",403:"Could not find a media file that is supported by this video player, based on the attributes of the MediaFile element.",405:"Problem displaying a media file.",406:"A mezzanine file was required, but not provided.",407:"The mezzanine file was downloaded for the first time, so the ad did not serve. This can occur when an ad insertion is missed because the creative is being transcoded. It continues to occur until the creative is available for insertion.",408:"The ad returned in the VAST response was rejected.",409:"The interactive creative defined in the InteractiveCreativeFile node was not executed.",410:"The code referenced in the Verification node was not executed.",500:"General NonLinearAds error.",501:"Unable to display non-linear ad because creative dimensions do not align with creative display area (in other words, the creative dimension was too large). This can occur if you use CSS styles to set width and height of the video ,content element. You should instead use the width and height HTML attributes.",502:"Unable to fetch NonLinearAds/NonLinear resource.",503:"Could not find NonLinearResource with supported type. This can occur when a creative size is larger than the player size.",600:"General CompanionAds error.",601:"Unable to display companion because creative dimensions do not fit within the companion display area (in other words, space was not available).",602:"Unable to display required companion.",603:"Unable to fetch CompanionAds/Companion resource.",604:"Could not find Companion resource with supported type.",900:"VAST 2 error. Even if you request VAST 3 or your DFP network default is VAST 3, this can occur if you have a VAST redirect that returns a VAST 2 response.",901:"General VPAID error",1005:"URI malformed."};function d1(t){if(!t)return!1;switch(t.toLocaleLowerCase()){case Hi._C:case Hi.gC:case Hi.vC:return!0;default:return!1}}function l1(t){const i=Af();return!!(d1(t)||t&&i&&(null==i?void 0:i.canPlayType)&&i.canPlayType(t))||(nu("Invalid or unsupported MediaFile Content delivery type, skipping mediafile"),!1)}function f1(t,i){for(const e of i){new u1(e).bZt(t)}}function nu(t){0}r(),r();var v1=class{get EZt(){return this.xZt}get PZt(){return this.IZt}constructor(t,i){this.xZt=void 0,this.IZt=void 0,this.xZt=t,this.IZt=i}},_1=class t{async CZt(i,e){if(P0(i.sources,i.timeOffset)){const s=await t.RZt(i.sources.src,e),n=s&&s.documentElement;if(!n)throw new ys($c.NETWORK,xs.VAST_SCHEMA_VALIDATION_ERROR,"Ad source is not a valid XML document.");if(z0(n,"VMAP"))return await this.DZt(n,i,e);if(z0(n,"VAST")){const t=await this.NZt(n,e,!1);if(t){const e=new m1("",!0,!0,t);return[new Lc("start",e,g1.BZt,"",[],!1,!0,i)]}return[]}throw new ys($c.GENERAL,xs.VAST_MALFORMED_RESPONSE,"Only VMAP and VAST files are allowed as ad source.")}if(I0(i.sources,i.timeOffset))return[new p1(String(i.timeOffset),i,e)];throw new ys($c.GENERAL,xs.VAST_MALFORMED_RESPONSE,"Something went wrong parsing the ad source; only VMAP and VAST files are allowed as ad source.")}async MZt(i,e,s,n){let r;void 0===n&&(n=[]);try{r=await t.RZt(i,e)}catch(t){throw f1(t instanceof ys&&t.TZt===xs.VAST_MALFORMED_RESPONSE?Hr._Zt:Hr.BG,n),t}const h=r&&r.documentElement;if(h&&z0(h,"VAST"))return await this.NZt(h,e,s,n);h&&z0(h,"VMAP")&&zd.um("Received VMAP ad when expecting VAST. Please set the type of your ad source in the configuration, or make sure to not set a timeOffset for VMAP ad sources. VMAP ads have their own offsets included.")}async LZt(t,i,e,s){var n;if(!(null==(n=t.sources)?void 0:n.src))throw new ys($c.GENERAL,xs.MALFORMED_URI,"Property src on adSource is missing.");const r=await this.MZt(t.sources.src,s,!1),h=new m1("",!0,!0,r),o=new Lc(i,h,g1.BZt,"",[],!1,!0,t);return o.OZt=e,o}static async requestSuccessOnly(t,i){let e;try{e=await i.vk(t)}catch(t){throw new ys($c.NETWORK,xs.UNKNOWN_ERROR,"Something went wrong while requesting xml from server.",t)}if(!pA(e))throw new ys($c.NETWORK,xs.UNKNOWN_ERROR,"Something went wrong while requesting xml from server.");return e}static async RZt(t,i){const e=new ro({Yu:t,fk:Bi.LT,Hk:Qe.GET}),s=await this.requestSuccessOnly(e,i);try{return function(t){return j0(t,"text/xml")}(await s.lk())}catch(t){throw new ys($c.NETWORK,xs.VAST_MALFORMED_RESPONSE,"The ad source could not be loaded.")}}async NZt(t,i,e,s){void 0===s&&(s=[]);const n=[],r=[],h=[];if(!t||!z0(t,"VAST")){if(f1(Hr._Zt,s),e)throw new ys($c.PARSING,xs.VAST_NO_ADS_AFTER_WRAPPER,"No VAST element found after wrapper.");throw new ys($c.PARSING,xs.VAST_EMPTY_RESPONSE,"The VAST element was empty.")}if(0!==Po(t,"Ad").length){for(const e of Po(t,"Ad"))try{const t=await this.FZt(e,i,s);0===t.zB?n.push(t):r.push(t)}catch(t){h.push(t)}if(0===n.length&&0===r.length&&h.length>0)throw h[0];if(1===n.length&&0===r.length)return n[0];if(0===n.length&&0!==r.length)return new R0(r);if(n.length>0||r.length>0)return new R0(r.concat(n))}if(0!==Po(t,"Error").length)for(const i of Po(t,"Error")){nu(Hr._Zt.Iy);const t=i.textContent;t&&s.push(t.trim())}if(f1(Hr._Zt,s),e)throw new ys($c.PARSING,xs.VAST_NO_ADS_AFTER_WRAPPER,"No VAST element found after wrapper.");throw new ys($c.PARSING,xs.VAST_EMPTY_RESPONSE,"The VAST element was empty.")}async DZt(t,i,e){const s=[],n=Po(t,"AdBreak");if(0===n.length)throw new ys($c.PARSING,xs.VAST_EMPTY_RESPONSE,"The VMAP element was empty.");for(const t of n)try{const n=await this.UZt(t,i,e);n&&s.push(n)}catch(t){zd.hm(t)}return s}async FZt(i,e,s){const n=Ic(i,"id")||"";let r=dt(Ic(i,"sequence"));r||(r=0);const h=Po(i,"InLine"),o=Po(i,"Wrapper");if(0!==o.length)return await this.VZt(o[0],n,r,e,s);if(0!==h.length)return t.HZt(h[0],n,r,s);throw new ys($c.PARSING,xs.VAST_SCHEMA_VALIDATION_ERROR,"An Ad tag without a Wrapper or inline element cannot be parsed")}static HZt(i,e,s,n){const r=Po(i,"Error")[0];let h;r&&r.textContent&&(h=r.textContent,n.push(h));const o=t.WZt(Po(i,"Extensions")[0]),a=Po(i,"AdSystem")[0];let u,c="";a&&(c=a.textContent||c);const d=Po(i,"AdTitle")[0];d&&(u=d.textContent||void 0);const l=[];for(const t of Po(i,"Impression"))t.textContent&&l.push(t.textContent);const f=t.qZt(Po(i,"Creatives")[0],c,o,n);return new N0(e,s,c,u,l,f,new u1(h))}async VZt(i,e,s,n,r){const h=Po(i,"Error")[0];let o="";h&&h.textContent&&(o=h.textContent,r.push(o));const a=Po(i,"AdSystem")[0];let u="";a&&(u=a.textContent||u);const c=[];for(const t of Po(i,"Impression"))t.textContent&&c.push(t.textContent);const d=Po(i,"VASTAdTagURI")[0];let l="";d&&d.textContent&&(l=d.textContent);const f=await this.MZt(l,n,!0,r),v=t.WZt(Po(i,"Extensions")[0]),_=Po(i,"Creatives")[0];let g=[];_&&(g=t.zZt(_,u,v,r));let p=gi(Ic(i,"followAdditionalWrappers"));p||(p=!0);let m=gi(Ic(i,"allowMultipleAds"));m||(m=!0);let w=gi(Ic(i,"fallbackOnNoAd"));return w||(w=!1),new H0(e,s,c,f,p,g,m,w,new u1(o))}static zZt(i,e,s,n){const r=[];for(const h of Po(i,"Creative")){let i=Ic(h,"id");i||(i="");let o=dt(Ic(h,"sequence"));o||(o=0);let a=Ic(h,"adId");a||(a="");const u=Po(h,"Linear")[0];let c;u&&(c=t.GZt(u,"wrapper",i,e,s,n));const d=Po(h,"NonLinearAds")[0];let l,f;if(d)try{f=t.XZt(d,i,e),l=f}catch(t){}const v=Po(h,"CompanionAds")[0];let _;v&&(_=t.jZt(v)),r.push(new W0(i,a,o,"",c,l,_,[]))}return r}static qZt(i,e,s,n){const r=[];for(const h of Po(i,"Creative")){let i=Ic(h,"id");i||(i="");let o=dt(Ic(h,"sequence"));o||(o=0);let a=Ic(h,"adId");a||(a="");let u=Ic(h,"apiFramework");u||(u="");const c=Po(h,"Linear")[0];let d;if(c)try{d=t.GZt(c,"inline",i,e,s,n)}catch(t){}if(0===(null==d?void 0:d.ct))throw new ys($c.PARSING,xs.VAST_UNEXPECTED_DURATION_ERROR,"The VAST response had a duration of 0 seconds, so skipping the ad(s).");const l=Po(h,"NonLinearAds")[0];let f,v;if(l)try{v=t.XZt(l,i,e),f=v}catch(t){}const _=Po(h,"CompanionAds")[0];let g;_&&(g=t.jZt(_));const p=Po(h,"UniversalAdId"),m=t.parseUniversalAdIds(p);r.push(new W0(i,a,o,u,d,f,g,m))}return r}static WZt(t){const i=[];if(!t)return i;for(const s of Po(t,"Extension")){var e;const t=null!=(e=Ic(s,"type"))?e:"",n=s.outerHTML;i.push({type:t,xml:n})}return i}static GZt(i,e,s,n,r,h){const o=Po(i,"Duration")[0];let a=0;if(o)a=E0(o.textContent)||0;else if(!o&&"inline"===e)throw new ys($c.PARSING,xs.VAST_SCHEMA_VALIDATION_ERROR,"Missing duration element in inLine linear");const u=Ic(i,"skipoffset");let c=-1;if(u){let t=E0(u);if(void 0===t&&u.indexOf("%")>-1){const i=_.abs(Number(u.replace(/(?![0-9])./g,"")))/100;S(i)||(t=a*i)}void 0!==t&&(c=t)}const d=Po(i,"MediaFiles")[0];let l=[],f=[];if(d&&(l=function(t,i){const e=[];for(const s of Po(t,"MediaFile")){const t=Ic(s,"delivery"),n=Ic(s,"type");if(!n){nu();continue}if(!i(n))continue;let r=dt(Ic(s,"width")),h=dt(Ic(s,"height"));r||(nu(),r=0),h||(nu(),h=0);const o={delivery:t,type:n,width:r,height:h,contentURL:""+s.textContent};e.push(o)}return e}(d,l1),f=function(t){const i=Po(t,"ClosedCaptionFiles");if(0===i.length)return[];const e=i[0],s=[];for(const t of Po(e,"ClosedCaptionFile")){const i=Ic(t,"type");i||nu();const e=Ic(t,"language");e||nu();const n={type:null!=i?i:"",language:null!=e?e:"",contentURL:(""+t.textContent).trim()};s.push(n)}return s}(d)),"inline"===e&&(!d||0===l.length))throw f1(Hr.pZt,h),new ys($c.PARSING,xs.VAST_LINEAR_ASSET_MISMATCH,"Missing MediaFiles in linear element");const v=Po(i,"TrackingEvents")[0];let g=[];v&&(g=t.QZt(v,Z0,"linear"));const p=Po(i,"VideoClicks")[0],m=t.KZt(p);return new q0(a,l,g,m,c,s,n,f,r)}static KZt(i){if(!i)return new V0("","",[],[]);const e=Po(i,"ClickThrough")[0];let s,n="";e&&(s=e.textContent||void 0,n=Ic(e,"id")||"");const r=t.YZt(Po(i,"ClickTracking")),h=t.YZt(Po(i,"CustomClick"));return new V0(s,n,r,h)}static YZt(t){const i=[];for(const e of t){const t=e.textContent;if(!t)continue;const s=Ic(e,"id")||"";i.push(new U0(s,t))}return i}static QZt(t,i,e){const s=[];for(const n of Po(t,"Tracking")){const r=Ic(n,"event");if(!i(r)){nu();continue}let h="";"linear"===e&&(h=Ic(t,"offset")||"0");const o=n.textContent;o&&s.push(new n1(r,h,o))}return s}static XZt(i,e,s){const n=[];for(const r of Po(i,"NonLinear")){const i=Po(r,"NonLinearClickThrough")[0];let h;i&&(h=i.textContent||void 0);const o=t.YZt(Po(r,"NonLinearClickTracking")),a=Po(r,"StaticResource")[0];let u;if(a&&a.parentNode){const t=Ic(a,"creativeType"),i=a.textContent||"",e=Po(a.parentNode,"NonLinearClickThrough")[0];let s="";e&&(s=e.textContent||""),u=new h1(i,t,s,"")}const c=t.JZt(r),d=t.parseHtmlResource(r);if(!u&&!c&&!d){nu();continue}const l=new V0(h,"",o,[]);n.push(new M0(u,c,d,l,e,s))}if(0===n.length)throw new ys($c.PARSING,xs.VAST_SCHEMA_VALIDATION_ERROR,"nonLinearAds element found with no nonLinear elements");const r=Po(i,"TrackingEvents")[0];let h=[];return r&&(h=t.QZt(r,t1,"nonlinear")),new B0(n,h)}static parseUniversalAdIds(t){const i=[];for(const r of t){var e;const t=null!=(e=Ic(r,"idRegistry"))?e:"";var s,n;const h=null!=(n=null!=(s=Ic(r,"idValue"))?s:r.textContent)?n:"";i.push(new v1(t,h))}return i}static jZt(i){let e=Ic(i,"requiredType");(function(t){switch(t){case"all":case"any":case"none":return!0;default:return!1}})(e)||(e=L0.pz);const s=[];for(const e of Po(i,"Companion")){let i=dt(Ic(e,"width")),n=dt(Ic(e,"height")),r=Ic(e,"id"),h=dt(Ic(e,"assetWidth")),o=dt(Ic(e,"assetHeight")),a=dt(Ic(e,"expandedWidth")),u=dt(Ic(e,"rxpandedHeight")),c=Ic(e,"apiFramework"),d=Ic(e,"adSlotId"),l=dt(Ic(e,"pxratio"));const f=Po(e,"AltText")[0];let v=f?f.textContent:"";i||(nu(),i=0),n||(nu(),n=0),r||(r=""),h||(h=0),o||(o=0),a||(a=0),u||(u=0),c||(c=""),d||(d=""),l||(l=1),v||(v="");const _=t.ZZt(e),g=t.JZt(e),p=t.parseHtmlResource(e),m=Po(e,"TrackingEvents")[0];let w=[];m&&(w=t.QZt(m,e1,"companion"));const y=Po(e,"CompanionClickThrough")[0];let b;y&&(b=y.textContent||void 0);const A=t.YZt(Po(e,"CompanionClickTracking"));(_||g||p)&&s.push(new F0(i,n,r,h,o,a,u,c,d,l,_,g,p,new V0(b,"",A,[]),w,v))}return new O0(e,s)}static ZZt(t){const i=Po(t,"StaticResource")[0];let e;if(i&&i.parentNode){let t=Ic(i,"creativeType");t||(t="");const s=i.textContent,n=Po(i.parentNode,"AltText")[0],r=Po(i.parentNode,"CompanionClickThrough")[0];let h,o="";n&&(o=n.textContent||""),r&&(h=r.textContent||void 0),s&&(e=new h1(s,t,h,o))}return e}static JZt(t){const i=Po(t,"IFrameResource")[0];let e;if(i){const t=i.textContent||"";e=new o1(t)}return e}static parseHtmlResource(t){const i=Po(t,"HTMLResource")[0];let e;if(i){const t=i.textContent||"";e=new a1(t)}return e}async UZt(i,e,s){const n=Ic(i,"timeOffset")||"0",r=Ic(i,"breakType")||g1.yk;let h=Ic(i,"breakId"),o=gi(Ic(i,"repeatAfter"));if(void 0===h&&(h=""),void 0===o&&(o=!1),!(void 0!==iu.$Zt(n)))throw new ys($c.PARSING,xs.VAST_SCHEMA_VALIDATION_ERROR,"Invalid TimeOffset type");const a=Po(i,"AdSource")[0],u=Po(i,"TrackingEvents")[0];let c=[];u&&(c=t.QZt(u,Y0,"vmap"));let d=Ic(a,"id");d||(d="");let l=gi(Ic(a,"allowMultipleAds"));void 0===l&&(l=!0);let f=gi(Ic(a,"followRedirects"));f||(f=!0);const v=Po(a,"AdTagURI")[0];let _="";const g=Po(a,"VASTAdData")[0];if(!v||!v.textContent){if(g){if(g.firstElementChild&&G0(g.firstElementChild,"VAST")){const t=await this.NZt(g.firstElementChild,s,!1);if(t){const i=new m1(d,l,f,t);return new Lc(n,i,r,h,c,o,!1,e)}return}throw new ys($c.PARSING,xs.VAST_SCHEMA_VALIDATION_ERROR,"vmap:VASTAdData does not have a VAST-structure as a child element")}throw new ys($c.PARSING,xs.VAST_SCHEMA_VALIDATION_ERROR,"Invalid AdTagURI source or invalid VASTAdData in Adbreak Element")}try{_=v.textContent;const t=ru(e);return t.sources.src=_,new p1(n,t,s)}catch(t){return}}},g1=function(t){return t.yk="",t.BZt="linear",t.t$t="nonlinear",t.i$t="display",t}({}),iu=class{static e$t(t){switch(t){case"linear":case"nonlinear":case"display":return!0;default:return!1}}static s$t(t){}static n$t(t){if(void 0!==t)return"start"===t?0:"end"===t?-1:void 0}static r$t(t){const i=t.split(":");let e=0;return e+=3600*Number(i[0]),e+=60*Number(i[1]),e+=Number(i[2]),e}static h$t(t){if(t<=0)return"00:00:00.000";const i=_.floor(t),e=t-i;return this.o$t(i/3600,2)+":"+this.o$t(i/60%60,2)+":"+this.o$t(i%60,2)+"."+this.o$t(1e3*e,3)}static o$t(t,i){return("00"+_.floor(t)).slice(-i)}static a$t(t,i){const e=this.$Zt(t);if(0===e)switch(t){case"start":return 0;case"end":return-1}else{if(2===e)return x0(t)*i;if(1===e)return E0(t);if(3===e)return this.n$t(t);if(4===e){const i=Number(t);if(!S(i)&&i>=-1)return i}}}static $Zt(t){return"start"===t||"end"===t?0:void 0!==E0(t.toString())?1:void 0!==x0(t.toString())?2:void 0!==this.s$t(t.toString())?3:S(Number(t))?void 0:4}},Lc=class{get u$t(){return this.c$t.integration}get d$t(){return this.l$t}get qOt(){return this.f$t}get kJt(){return this.EJt}set kJt(t){this.EJt=t}get aYt(){return this.XYt}get v$t(){return this._$t}get g$t(){return this.p$t}get irt(){return this.c$t}get m$t(){return this.OZt.dd}get W(){return!0}Un(){return Promise.resolve()}get OZt(){return this.w$t}set OZt(t){this.w$t=t}constructor(t,i,e,s,n,r,h,o){this.l$t=void 0,this.XYt=void 0,this.f$t=void 0,this.EJt=-1,this.y$t=void 0,this._$t=void 0,this.p$t=void 0,this.b$t=void 0,this.c$t=void 0,this.w$t=void 0,this.l$t=i,this.f$t=t,this.y$t=e,this._$t=s,this.p$t=r,this.XYt=n,this.b$t=h,this.c$t=o}},p1=class{get u$t(){return this.mYt.u$t}get d$t(){return this.mYt.d$t}get qOt(){return this.mYt.qOt}get kJt(){return this.mYt.kJt}set kJt(t){this.mYt.kJt=t}get aYt(){return this.mYt.aYt}get v$t(){return this.mYt.v$t}get g$t(){return this.mYt.g$t}get irt(){return this.mYt.irt}get m$t(){return this.mYt.m$t}get W(){return this.dE}Un(){var t;return null!=(t=this.A$t)?t:this.A$t=this.vE()}async vE(){const t=new _1;this.mYt=await t.LZt(this.irt,this.qOt,this.OZt,this.aV),this.dE=!0}get OZt(){return this.mYt.OZt}set OZt(t){this.mYt.OZt=t}constructor(t,i,e){this.mYt=void 0,this.A$t=void 0,this.dE=!1,this.aV=void 0,this.aV=e,this.mYt=new Lc(t,void 0,"","",[],!1,!1,i)}},m1=class{get o(){return this.aS}get oJt(){return this.S$t}get T$t(){return this.k$t}get UKt(){return this.E$t}constructor(t,i,e,s){this.aS=void 0,this.S$t=void 0,this.k$t=void 0,this.E$t=void 0,this.aS=t,this.S$t=i,this.E$t=s,this.k$t=e}};function w1(t,i){let e;if(t.vastAdsRequest&&(e=function(t){if(t.adTagUrl)return t.adTagUrl;if(t.adsResponse)return K0(t.adsResponse);return}(t.vastAdsRequest)),!e){const i=function(t){const i=t.contentUrl||t.contentId;if(!i)return;const e=t.contentType||"video/mp4",s=tu(e)||gk(e)?"streaming":"progressive",n=void 0!==t.duration?""+iu.h$t(t.duration)+"":"",r=void 0!==t.whenSkippable&&t.whenSkippable>=0?' skipoffset="'+iu.h$t(t.whenSkippable)+'"':"",h=''+Q0(i)+"",o=t.clickThroughUrl?""+Q0(t.clickThroughUrl)+"":"",a=""+n+""+h+""+o+"",u=t.title?""+Q0(t.title)+"":"";return''+u+""+a+""}(t);i&&(e=K0(i))}const s=t.customData;if(e){const n={integration:null==s?void 0:s.integration,sources:{src:e,type:"vast"},timeOffset:i};return n.integration&&"csai"!==n.integration&&"theo"!==n.integration||(n.skipOffset=t.whenSkippable),n}}var y1=function(t){return t.x$t="error",t.P$t="sourceupdate",t}({}),b1=class extends gp{constructor(t){super("error"),this.lt=void 0,this.lt=t}},A1=class extends gp{constructor(t,i){super("sourceupdate"),this.bt=void 0,this.Mc=void 0,this.bt=t,this.Mc=i}},S1=class extends Ne{get $D(){return this.I$t}C$t(t){this.R$t.C$t(t)}D$t(t){this.R$t.D$t(t)}N$t(t){this.R$t.N$t(t)}B$t(t){this.R$t.B$t(t)}M$t(t){this.I$t.addUpdateListener(t)}L$t(t){this.I$t.removeUpdateListener(t)}O$t(){const t=new Ga,i=new chrome.cast.media.GetStatusRequest;return this.I$t.getStatus(i,()=>{t.Qy({bt:this.qx(),Mc:this.nu()})},i=>t.Ky(i)),t.Yy}qx(){var t;return null==(t=this.I$t.customData)?void 0:t.currentSource}nu(){var t;let i;if(null==(t=this.gBt.F$t())?void 0:t.version){var e;i=null==(e=this.I$t.customData)?void 0:e.sourceDescription}else{var s;const t=null==(s=A0(this.I$t))?void 0:s.customData;(function(t){return Mc(t)&&t.theoplayer_version>=1&&it(t.streamStart)&&it(t.isLive)&&it(t.sourceDescription)})(t)&&(i=t.sourceDescription),i||(i=function(t){return{sources:[{src:t.contentId,type:t.contentType}],ads:T1(t)}}(this.I$t.media))}return i}jP(){const t=new chrome.cast.media.PauseRequest;this.I$t.pause(t,gs,this.U$t)}KP(){const t=new chrome.cast.media.StopRequest;this.I$t.stop(t,gs,this.U$t)}QP(){const t=new chrome.cast.media.PlayRequest;this.I$t.play(t,gs,this.U$t)}Oy(t,i){const e=new chrome.cast.media.SeekRequest;return e.currentTime=t===1/0?Number.MAX_VALUE:t,e.resumeState=i?chrome.cast.media.ResumeState.PLAYBACK_PAUSE:chrome.cast.media.ResumeState.PLAYBACK_START,new Promise((t,i)=>{this.I$t.seek(e,t,t=>{var e;i(new Us(Wn(t.code),null!=(e=t.description)?e:void 0))})})}gP(t){this.R$t.Bet(Ln,function(t){return{type:S0.FKt,properties:{playbackRate:t}}}(t)).catch(this.V$t)}H$t(t){const i=new chrome.cast.media.EditTracksInfoRequest(t);this.I$t.editTracksInfo(i,gs,this.U$t)}W$t(){return this.I$t.getEstimatedTime()}q$t(){return this.I$t.getEstimatedBreakClipTime()}z$t(){return this.I$t.getEstimatedBreakTime()}G$t(){this.R$t.Bet("urn:x-cast:com.google.cast.media",{type:T0.SKIP_AD,requestId:this.X$t++,mediaSessionId:this.I$t.mediaSessionId}).catch(this.V$t)}kn(){this.Vo()}constructor(t,i,e){super(i),this.gBt=void 0,this.R$t=void 0,this.I$t=void 0,this.X$t=0,this.V$t=t=>{this.So(new b1(t))},this.U$t=t=>{var i;const e=new Us(Wn(t.code),null!=(i=t.description)?i:void 0);this.V$t(e)},this.gBt=t,this.R$t=i,this.I$t=e}};function T1(t){return t.vmapAdsRequest&&t.vmapAdsRequest.adTagUrl?[{sources:{src:t.vmapAdsRequest.adTagUrl,type:"vmap"}}]:t.breaks&&t.breakClips?hs(t.breaks,i=>function(t,i){const e=[];if(t.isWatched)return e;for(const s of t.breakClipIds){const n=hh(i,t=>t.id===s);if(n){const i=w1(n,t.position);i&&e.push(i)}}return e}(i,t.breakClips)):[]}r();var k1=class{j$t(t,i){this.gBt.addMessageListener(t,i)}Q$t(t,i){this.gBt.removeMessageListener(t,i)}Bet(t,i){return new Promise((e,s)=>{this.gBt.sendMessage(t,i,e,t=>{var i;s(new Us(Wn(t.code),null!=(i=t.description)?i:void 0))})})}kn(){}constructor(t){this.gBt=void 0,this.gBt=t}};function E1(t){return"vmap"===t||"adrule"===t}function x1(t){if(t)return Q(t)&&""!==t?{src:Ts(t),type:void 0}:function(t){return Mc(t)&&Boolean(t.src)}(t)&&""!==t.src?{src:Ts(t.src),type:P1(t.type)}:void 0}function P1(t){if(Q(t)){const i=t.toLowerCase();switch(i){case"vast":case"vmap":case"adrule":return i;default:return void uh("The ad source type provided in the configuration could not be recognized: '"+t+"'.")}}else t||uh("For better performance it is highly recommended to add the type to the configuration of your ad sources.")}function I1(t){if(void 0!==t&&""!==t&&("string"==typeof t||"number"==typeof t)){switch(t){case"start":case"00:00:00":case"00:00:00.000":case"0%":case"0":return 0;case"end":case"100%":return-1}if("string"==typeof t){if(function(t){return k0.test(t)}(t))return iu.r$t(t);if(C1(t))return t}return Number(t)>=0?Number(t):void 0}}function C1(t){return new RegExp(/^\d{1,2}%$/).test(t)}function R1(t){const i=[],e=(t,s)=>{if(hi(s))for(let i=0,n=s.length;i{i.push(t+"="+encodeURIComponent(null!=e?e:""))})(t,String(s))};for(const i of w.keys(t))e(encodeURIComponent(i),t[i]);return i.join("&")}r(),r(),r();var D1=function(t){return t.LKt="receiver_info",t.eOt="event",t.K$t="propertychange",t.OKt="trackevent",t}({}),N1=class{Y$t(t){let i;try{i=JSON.parse(t)}catch(t){0}return i}C$t(t){this.J$t.push(t)}D$t(t){_e(this.J$t,t)}N$t(t){this.Z$t.push(t)}B$t(t){_e(this.Z$t,t)}$$t(t){this.t0t=t}Bet(t,i){return this.i0t.Bet(t,i)}kn(){this.i0t.Q$t(Ln,this.e0t),Wt(this.Z$t),Wt(this.J$t),this.t0t=void 0}constructor(t){this.i0t=void 0,this.J$t=[],this.Z$t=[],this.t0t=void 0,this.e0t=(t,i)=>{const e=this.Y$t(i);if(e)if(e.type===D1.K$t)for(const t of this.J$t)for(const i of w.keys(e.properties))t(i,e.properties[i]);else if(e.type===D1.eOt)for(const t of this.Z$t)t(e.event);else e.type===D1.OKt&&this.t0t&&e.event.trackState&&this.t0t(e.event.trackId,e.event.trackState.targetQualityIds)},this.i0t=t,this.i0t.j$t(Ln,this.e0t)}};r(),r();var B1=function(t){return t.s0t="medialoadedchange",t.wy="volumechange",t.x$t="casterror",t.n0t="playererror",t.r0t="targetqualitychanged",t.h0t="receiverinfochanged",t}({}),M1=class extends gp{constructor(){super("medialoadedchange")}},L1=class extends gp{constructor(t,i){super("volumechange"),this.OP=void 0,this.oP=void 0,this.OP=t,this.oP=i}},O1=class extends gp{constructor(t){super("casterror"),this.lt=void 0,this.lt=t}},F1=class extends gp{constructor(t){super("playererror"),this.lt=void 0,this.lt=t}},U1=class extends gp{constructor(t,i){super("targetqualitychanged"),this.sN=void 0,this.o0t=void 0,this.sN=t,this.o0t=i}},V1=class extends gp{constructor(){super("receiverinfochanged")}},H1=class extends Ne{a0t(t,i,e){this.R$t.Bet(Ln,function(t,i,e){return{type:S0.OKt,trackID:t,trackType:i,properties:{targetQuality:e}}}(t,i,e)).catch(this.V$t)}u0t(){this.i0t.j$t(Ln,this.c0t),this.R$t.Bet(Ln,{type:S0.LKt}).catch(gs)}F$t(){return this.d0t}l0t(){return this.gBt.getSessionObj()}f0t(t){!this.v0t&&t&&t.idleReason!==chrome.cast.media.IdleReason.FINISHED&&(this.v0t=new S1(this,this.R$t,t),this._0t(),this.So(new M1),this.v0t.M$t(this.g0t))}p0t(){return this.v0t}async m0t(t){const i=function(t){const i=function(t,i,e,s){const[n,r]=function(t){for(const e of t.sources)if(ei(e)){const t=e.src;if(t){var i;const s=null!=(i=e.type)?i:qu(t);if(W1(s))return[t,s]}}var e,s;return[null!=(e=aR(t))?e:"",null!=(s=hR(t))?s:""]}(t),h=new chrome.cast.media.MediaInfo(n,r);return h.metadata=b0(t.metadata,t.poster),h.streamType=s,function(t,i,e){const s=[],n=[];let r,h=0,o=0;for(const t of i){const i=x1(t.sources);if(i)if(P0(i,t.timeOffset))r=new chrome.cast.media.VastAdsRequest,r.adTagUrl=i.src;else if(I0(i,t.timeOffset)){var a;const r=null!=(a=t.timeOffset)?a:0,c=t.skipOffset;var u;const d=null!=(u=iu.a$t(r,e))?u:0,l=void 0!==c?iu.a$t(c,e):void 0,f=new chrome.cast.media.BreakClip("bc"+o++);f.vastAdsRequest=new chrome.cast.media.VastAdsRequest,f.vastAdsRequest.adTagUrl=i.src,f.whenSkippable=l,f.customData={integration:t.integration};let v=hh(n,t=>t.position===d);void 0===v&&(v=new chrome.cast.media.Break("b"+h++,[],d),n.push(v)),v.breakClipIds.push(f.id),s.push(f)}else 0;else 0}t.breakClips=s,t.breaks=n,t.vmapAdsRequest=r}(h,i,e),h}(t.w0t,t.Jc,t.ct,t.P0),e=new chrome.cast.media.LoadRequest(i);e.autoplay=!0,t.zx&&(e.currentTime=t.zx);return e.customData=t.y0t,e}(t);let e;try{e=await this.gBt.loadMedia(i)}catch(t){e=t}if(e)throw new Us(Wn(e))}uP(t){this.l0t().setReceiverMuted(t,gs,this.b0t)}UP(t){this.l0t().setReceiverVolumeLevel(t,gs,this.b0t)}A0t(){return this.l0t().receiver.friendlyName}kn(){this.Vo(),this.gBt.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.S0t),this.l0t().removeUpdateListener(this._0t),this.i0t.Q$t(Ln,this.c0t),this.R$t.kn(),this.i0t.kn()}constructor(t){super(),this.gBt=void 0,this.i0t=void 0,this.R$t=void 0,this.d0t=void 0,this.v0t=void 0,this.V$t=t=>{this.So(new O1(t))},this.T0t=(t,i)=>{"error"===t&&this.So(new F1(i))},this.k0t=(t,i)=>{this.So(new U1(t,i))},this.c0t=(t,i)=>{const e=JSON.parse(i);e.type===D1.LKt&&(this.d0t=e.info,this.So(new V1))},this._0t=()=>{const t=this.l0t(),{level:i,muted:e}=t.receiver.volume;this.So(new L1(null!=i?i:void 0,null!=e?e:void 0))},this.S0t=()=>this.f0t(this.gBt.getMediaSession()),this.g0t=t=>{var i;t||(null==(i=this.v0t)||i.L$t(this.g0t),this.v0t=void 0,this.So(new M1))},this.b0t=t=>{var i;const e=new Us(Wn(t.code),null!=(i=t.description)?i:void 0);this.V$t(e)},this.gBt=t,this.gBt.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.S0t),this.i0t=new k1(t.getSessionObj()),this.R$t=new N1(this.i0t),this.R$t.C$t(this.T0t),this.R$t.$$t(this.k0t),this.l0t().addUpdateListener(this._0t),this._0t(),this.u0t();const i=this.gBt.getMediaSession();i&&this.f0t(i)}};function W1(t){switch(t){case Hi._C:case Hi.vC:case Hi.gC:case Hi.pC:return!0}return!1}var q1=function(t){return t.E0t="statechange",t}({}),z1=class extends gp{constructor(t){super("statechange"),this.vft=void 0,this.vft=t}};r(),r(),r(),r();var G1=class extends Ne{_nt(){return this.qc}Ux(){return Uo.rL()}Gx(){return this.xz+this.x0t}nnt(){return this.Gx()}Hx(){}Nd(){return this.Zb}Kx(){return this.h5}Yx(){}fP(){return this.Cz}P0t(){}_P(){return this.Rz}gP(t){this.Rz!==t&&(this.Rz=t,this.So(new Ik(this.oa.zx,t)))}TP(){return Lr.zL}mP(){return Uo.rL()}EP(){return Uo.rL()}PP(){return!1}Mx(){return this.tO}BP(){return this.sO}RP(){return this.Gl}H$t(t){}LP(){return this.I0t}NP(){return this.C0t}QP(){this.Cz=!1}jP(){this.Cz=!0}Oy(t){this.xz=t-this.x0t}R0t(){return this.x0t}D0t(t){this.x0t=t}qnt(t){this.qc.qnt(t)}KP(){}kn(){this.Vo(),this.tO.kn(),this.sO.kn(),this.Gl.kn(),this.qc.kn()}constructor(t,i,e,s,n,r,h,o,a){super(),this.oa=void 0,this.xz=void 0,this.Zb=void 0,this.h5=void 0,this.Cz=void 0,this.Rz=void 0,this.x0t=void 0,this.I0t=void 0,this.C0t=void 0,this.tO=void 0,this.sO=void 0,this.Gl=void 0,this.qc=void 0,this.oa=t,this.x0t=0,this.tO=new Ws,this.sO=new Ws,this.Gl=new bc,this.qc=new st,this.x0t=i,this.xz=e-i,this.Zb=s,this.h5=n,this.Cz=r,this.Rz=h,this.I0t=o,this.C0t=a}};r(),r(),r(),r();var X1=function(t){return t.N0t="ccmodechangerequest",t.B0t="cctargetqualitychangerequest",t.M0t="cctrackchangerequest",t}({}),j1=class extends gp{constructor(t,i,e){super(X1.N0t),this.track=void 0,this.trackId=void 0,this.mode=void 0,this.track=t,this.trackId=i,this.mode=e}};r();var Q1=function(t){return t.LT="TEXT",t.Bk="AUDIO",t.Mk="VIDEO",t}({}),K1=function(t){return t.HU="SUBTITLES",t.WU="CAPTIONS",t.qU="DESCRIPTIONS",t.Yn="CHAPTERS",t.zU="METADATA",t}({});function Y1(t){return"AUDIO"===t.type}function J1(t){return"VIDEO"===t.type}function Z1(t){return"TEXT"===t.type}var $1=class extends Ne{get Ca(){return this.hu||(this.hu=qo(this)),this.hu}get Th(){return this.bO}set Th(t){t!==this.bO&&(this.bO=t,this.So(new Xh(this)))}get q(){return this.S5}get L(){return this.T5}get Qk(){return this.Yo}set Qk(t){const i=LS(t);this.Yo!==i&&(this.Yo=i,this.L0t!==i&&this.So(new j1(this,this.JI,i)),this.So(new Rh(this)))}get O0t(){return this.L0t}set O0t(t){const i=LS(t),e=this.Yo!==i;this.Yo=i,this.L0t=i,e&&this.So(new Rh(this))}k5(t){return hh(this.T5.NI,i=>i.o===t)}sC(t){this.Qk=t}F0t(t){}kn(){}hr(){}constructor(t){super(),this.o=void 0,this.JI=void 0,this.eC=void 0,this.Lt=void 0,this.bs=void 0,this.AP=void 0,this.Km=void 0,this.bO=void 0,this.A5=void 0,this.D5=void 0,this.T5=void 0,this.S5=void 0,this.Yo=void 0,this.L0t=void 0,this.hu=void 0;const i=t.customData;this.JI=Number(t.trackId)||0,this.o=""+(i&&i.id||this.JI),this.bO=i&&i.label||t.name||"",this.bs=i&&i.language||t.language||"",this.eC=i&&i.inBandMetadataTrackDispatchType||"",this.Lt=i&&i.kind||function(t){switch(t){case K1.HU:return us.HU;case K1.WU:return us.WU;case K1.qU:return us.qU;case K1.Yn:return us.Yn;case K1.zU:return us.zU}return}(t.subtype)||"subtitles",this.AP=dc.NONE,this.Km=i&&void 0!==i.type?function(t){return vk(t)?t:nh.DEFAULT}(i.type):nh.WEBVTT,this.A5=[],this.T5=new Sr(this.A5),this.D5=[],this.S5=new Sr(this.D5),this.Yo=LS(i&&i.mode||xh.Nh),this.L0t=this.Yo}};r(),r();var t2=class extends gp{constructor(t,i){super(X1.M0t),this.trackId=void 0,this.enabled=void 0,this.trackId=t,this.enabled=i}};r();var i2=class extends gp{constructor(t,i){super(X1.B0t),this.track=void 0,this.targetQuality=void 0,this.track=t,this.targetQuality=i}};r();var e2=function(t){return t.Bk="audio",t.Mk="video",t.LT="text",t}({}),s2=class extends Ne{get YI(){return this._lt}get tC(){return this.flt}set tC(t){this.U0t(t),this.So(new i2(this,t))}get $I(){return this._O}get Th(){return this.bO}set Th(t){t!==this.bO&&(this.bO=t,this.So(new Xh(this)))}get Rt(){return this.We}set Rt(t){this.We!==t&&(this.We=t,this.V0t!==t&&this.So(new t2(this.JI,t)),this.So(new Rh(this)))}get H0t(){return this.V0t}set H0t(t){const i=this.We!==t;this.We=t,this.V0t=t,i&&this.So(new Rh(this))}get Ca(){return this.hu||(this.hu=cs(this)),this.hu}get Qk(){return this.Rt?"enabled":"disabled"}SO(t){this.Rt=t}F0t(t){if(t.targetQualityIds){const i=[];for(const e of this._O.NI)t.targetQualityIds.indexOf(e.o)>-1&&i.push(e);const e=i.length?i:void 0;this.U0t(e)}}U0t(t){(function(t,i){return!t&&i||t&&!i||t&&i&&!wc(t,i)})(this.flt,t)&&(this.flt=t&&this._O.pO(t)?t:void 0,this.So(new qa(this.flt,this)))}unload(){for(const t of this._O.NI)t.mn("update",this.ILt);this._O.hr()}constructor(t){super(),this.o=void 0,this.JI=void 0,this.Lt=void 0,this.bs=void 0,this.V3=void 0,this.bO=void 0,this._lt=void 0,this._O=new iE,this.flt=void 0,this.We=void 0,this.V0t=void 0,this.hu=void 0,this.ILt=()=>this.So(new Xh(this));const i=t.customData;if(this.JI=Number(t.trackId)||0,this.o=""+(i&&i.id||this.JI),this.bO=i&&i.label||t.name||"",this.bs=i&&i.language||t.language||"",this.Lt=i&&i.kind||"main",this.We=i&&i.enabled,this.V0t=this.We,Y1(t)){this.V3=e2.Bk;const i=t.customData&&t.customData.qualities;if(i)for(const t of i){const i=new Vq(t.id,t.bandwidth,t.codecs,t.name,"",t.audioSamplingRate);i.wn("update",this.ILt),this._O.gO(i)}}else{this.V3=e2.Mk;const i=t.customData&&t.customData.qualities;if(i)for(const t of i){const i=new Uq(t.id,t.bandwidth,t.codecs,t.name,"",t.frameRate,t.width,t.height);i.wn("update",this.ILt),this._O.gO(i)}}}};r();var n2=function(t){return t.W0t="legacy",t.q0t="caf",t}({});r(),r(),r(),r();var r2=class{Rc(){if(this.z0t>=this.qc.length)return;const t=this.qc[this.z0t];return this.z0t+=1,t}lt(){return this.Rc()}constructor(t){this.qc=void 0,this.z0t=0,this.qc=t}};function h2(t){var i,e,s;return null!=(s=null==(e=t.d$t)||null==(i=e.UKt)?void 0:i.VKt())?s:[]}var o2=class{},a2=class{Ont(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get ads(){return t.Jc.map(t=>t.Ont())},get integration(){return t.u$t},get maxDuration(){return t.G0t},get maxRemainingDuration(){return t.X0t},get timeOffset(){return t.qOt},get customData(){return t.y0t}}}(this)}constructor(){this.hu=void 0}},u2=class{get j0t(){return this.Q0t}get t(){return this.oa}constructor(t,i){this.Q0t=void 0,this.oa=void 0,this.Q0t=t,this.oa=i}},c2=class extends a2{get OZt(){return this.w$t}get Jc(){const t=[];for(const s of this.w$t.K0t)for(const n of h2(s)){var i,e;const r=null!=(e=null==(i=n.sYt)?void 0:i.PYt)?e:[];if(n.iYt&&t.push(this.Y0t(n.iYt,r,n.rYt,s.irt)),n.nYt)for(const i of n.nYt.hYt)t.push(this.J0t(i,r,n.nYt,n.rYt,s.irt))}return t}Y0t(t,i,e,s){const n=hh(this.Z0t,i=>i.iYt===t);if(void 0!==n)return n;const r=new v2(t,i,this,this.$0t,e,s);return this.Z0t.push(r),r}J0t(t,i,e,s,n){const r=hh(this.t1t,i=>i.nYt===t);if(void 0!==r)return r;const h=new f2(t,i,e,this,this.$0t,s,n);return this.t1t.push(h),h}get u$t(){return FC.CSAI}get qOt(){const t=this.w$t.dd;return t>=0?t:this.$0t.t.Nd()}get X0t(){let t=0;for(const i of this.w$t.K0t)for(const e of h2(i))e.iYt&&!e.iYt.xJt&&(t+=e.iYt.ct);return this.$0t&&this.$0t.j0t&&(t+=this.$0t.j0t.ct-this.$0t.j0t.zx),t}get G0t(){let t=0;for(const i of this.w$t.K0t)for(const e of h2(i))e.iYt&&(t+=e.iYt.ct);return t}get y0t(){}constructor(t,i){super(),this.w$t=void 0,this.$0t=void 0,this.Z0t=[],this.t1t=[],this.w$t=t,this.$0t=i}},d2={height:0,width:0,clickThrough:"",contentHTML:"",resourceURI:"",altText:""},l2=class extends o2{get od(){return this.mYt}get irt(){return this.c$t}get rYt(){return this.yJt}i1t(){return this.e1t}s1t(){this.e1t=!0}n1t(t){return Y({},d2,{resourceURI:t.cZt||""})}r1t(t){return Y({},d2,{contentHTML:t.cZt.trim(),type:"HTMLResource"})}h1t(t){var i,e;return Y({},d2,{clickThrough:(null==(i=t.KYt)?void 0:i.trim())||"",resourceURI:(null==(e=t.cZt)?void 0:e.trim())||"",altText:t.jYt||"",type:"StaticResource"})}o1t(t,i,e){if(!t||!i)return;const s="";return""+s+""}sYt(t){return t?t.map(t=>{let i;const e={adSlotId:t.VYt||"",height:t.Mi||0,width:t.Ti||0};if(t.cYt){var s;const e=this.h1t(t.cYt),n=e.clickThrough||(null==(s=t.zYt)?void 0:s.KYt);i=Y({},e,{contentHTML:this.o1t(e.resourceURI,n,e.altText)||""})}else if(t.vYt)i=this.r1t(t.vYt);else{if(!t.lYt)return;i=this.n1t(t.lYt)}return Gi(i,e)}).filter(t=>void 0!==t):[]}a1t(){return this.u1t.QKt}constructor(t,i,e,s,n,r){super(),this.u1t=void 0,this.IYt=void 0,this.mYt=void 0,this.$0t=void 0,this.yJt=void 0,this.c$t=void 0,this.e1t=!1,this.u1t=t,this.IYt=i,this.mYt=e,this.$0t=s,this.yJt=n,this.c$t=r}},f2=class extends l2{get nYt(){return this.u1t}get eYt(){return this.c1t}xa(){const t=this.mYt,i={companions:this.sYt(this.IYt),type:"nonlinear",id:this.u1t.wYt,skipOffset:this.kJt,integration:this.c$t.integration,adSystem:this.u1t.QKt,get adBreak(){return t.Ont()},creativeId:this.u1t.wYt,universalAdIds:this.yJt.map(t=>({adIdRegistry:t.EZt,adIdValue:t.PZt}))};return this.u1t.lYt?Gi(this.n1t(this.u1t.lYt),i):this.u1t.vYt?Gi(this.r1t(this.u1t.vYt),i):this.u1t.cYt?Gi(this.h1t(this.u1t.cYt),i):i}Ont(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()}d1t(){var t,i;return null!=(i=null==(t=this.u1t.cYt)?void 0:t.cZt)?i:""}l1t(){var t,i,e;return null!=(e=null==(i=this.u1t)||null==(t=i.cYt)?void 0:t.lZt)?e:""}get kJt(){const t=this.u1t.od;return t&&t.irt&&void 0!==t.irt.skipOffset?iu.a$t(t.irt.skipOffset,this.$0t.j0t.ct):(null==(i=this.u1t.od)?void 0:i.kJt)||-1;var i}constructor(t,i,e,s,n,r,h){super(t,i,s,n,r,h),this.c1t=void 0,this.hu=void 0,this.c1t=e}},v2=class extends l2{get iYt(){return this.u1t}xa(){var t;const i=this.mYt,e=this.u1t;return{companions:this.sYt(this.IYt),duration:e.ct,id:e.wYt,mediaFiles:e.AJt,get mediaUrl(){return e.PJt},skipOffset:this.kJt,type:"linear",integration:this.c$t.integration,adSystem:e.QKt,width:void 0,height:void 0,get adBreak(){return i.Ont()},clickThrough:null==(t=e.lJt)?void 0:t.KYt,creativeId:e.wYt,universalAdIds:this.yJt.map(t=>({adIdRegistry:t.EZt,adIdValue:t.PZt})),closedCaptionFiles:e.CJt,extensions:e.DJt}}Ont(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()}d1t(){return this.u1t.AJt.length>0?this.u1t.AJt[0].contentURL:""}l1t(){return this.u1t.AJt.length>0?this.u1t.AJt[0].type:""}get kJt(){const t=this.u1t.od;return t&&t.irt&&void 0!==t.irt.skipOffset?iu.a$t(t.irt.skipOffset,this.$0t.j0t.ct):this.u1t.kJt||-1}constructor(t,i,e,s,n,r){super(t,i,e,s,n,r),this.hu=void 0}};function _2(t){return t instanceof v2}r();var we=function(t){return t.f1t="csai",t.v1t="google-ima",t.so="google-dai",t._1t="freewheel",t.g1t="mediatailor",t.Iv="chromecast",t.knt="theoads",t}({});r();var ch=class extends oU{xa(){return new g2(this.jnt.Ont())}constructor(t){super("p1t",t)}},g2=class extends aU{constructor(t){super("updatead",t)}};r();var p2=class extends oU{xa(){return new m2(this.jnt.Ont())}constructor(t){super("m1t",t)}},m2=class extends aU{constructor(t){super("adloaded",t)}},w2=class extends je{get zc(){return void 0!==this.w1t}get Lnt(){return this.u1t?[this.u1t]:[]}get Fnt(){var t;return null!=(t=this.w1t)?t:null}get Unt(){return hs(this.y1t,t=>{const i=t.Jc;if(t===this.w1t&&void 0!==this.u1t){const t=i.indexOf(this.u1t);if(t>=0)return i.slice(t+1)}return t.b1t()?[]:i})}get Vnt(){return this.y1t.filter(t=>t===this.w1t||!t.b1t())}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=iU(this)}W6(t,i,e){throw new g("Scheduling ads while casting is not supported.")}uD(){this.I$t.G$t()}znt(t){var i;null==(i=this.A1t)||i.znt(t)}Wnt(t,i){var e;null==(e=this.A1t)||e.Wnt(t,i)}S1t(t){return hh(this.y1t,i=>i.o===t)}T1t(t,i,e,s){const n=this.y1t,r=[];let h=!1;for(const n of t){let t=this.S1t(n.id);void 0===t&&(t=new y2(n),s.push(new vn(t))),!it(t.k1t)&&it(e)&&(t.k1t=this.E1t(t.x1t,e));const o=t.Jc;t.er(n,i,e,s);const a=t.Jc;for(const t of a)Ct(o,t)||(s.push(new cn(t)),h=!0);r.push(t)}this.y1t=r,h&&s.push(new vU);for(const t of n)Ct(r,t)||s.push(new nU(t))}P1t(t,i){const e=this.w1t,s=this.u1t;let n,r;if(t){var h;const{breakId:i,breakClipId:e}=t;n=i?this.S1t(i):void 0,r=e?null==(h=this.w1t)?void 0:h.I1t(e):void 0}if(this.w1t=n,this.u1t=r,n!==e&&(void 0!==e&&(e.C1t=void 0,i.push(new Za(e))),void 0!==n&&(n.C1t=this.I$t,i.push(new Ta(n)))),r!==s){const t=this.oa.Gx();void 0!==s&&i.push(new fc(s,t)),void 0!==r&&i.push(new nc(r,t))}}E1t(t,i){if(!i||!i.breaks)return;const e=hh(i.breaks,i=>i.id===t.id);return e}qnt(t){const i=[];for(const t of this.y1t){let e=t.Jc;if(t===this.w1t&&void 0!==this.u1t){const t=e.indexOf(this.u1t);t>=0&&(e=e.slice(t))}else if(t.b1t())continue;for(const t of e){const e=t.R1t();e&&i.push(e)}}for(const e of i)t.W6(e,Hu.Bnt,!1)}kn(){return this.Vo(),this.I$t.L$t(this.eh),void 0!==this.w1t&&(this.w1t.C1t=void 0,this.w1t=void 0),this.u1t=void 0,Wt(this.y1t),Promise.resolve(void 0)}Hnt(t){}constructor(t,i,e){super(),this.oa=void 0,this.I$t=void 0,this.A1t=void 0,this.y1t=[],this.w1t=void 0,this.u1t=void 0,this.hu=void 0,this.eh=t=>{var i;if(!t)return;const e=this.I$t.$D,{breakStatus:s}=e,{breakClips:n,breaks:r}=e.media,h=null==(i=A0(e))?void 0:i.media,o=[];r&&n&&this.T1t(r,n,h,o),this.P1t(s,o);for(const t of o)this.So(t)},this.oa=t,this.I$t=i,this.A1t=e,this.I$t.M$t(this.eh)}},y2=class extends a2{get x1t(){return this.D1t}get o(){return this.D1t.id}get Jc(){return this.qc}get u$t(){return we.Iv}get G0t(){let t=this.D1t.duration;return void 0===t&&this.qc.length>0&&(t=$l(this.qc,t=>t.ct),S(t)&&(t=void 0)),t}get X0t(){const t=this.G0t;if(void 0!==t&&void 0!==this.C1t){const i=this.C1t.z$t();if(void 0!==i)return _.max(0,t-i)}return t}get qOt(){return this.D1t.position}get y0t(){}b1t(){return this.D1t.isWatched}I1t(t){return hh(this.qc,i=>i.o===t)}er(t,i,e,s){const n=[];for(let r=0;rt.id===h);if(void 0===o)continue;const a=rt.id===i);if(!s){var n;const i=null==(n=this.k1t)?void 0:n.breakClipIds[e];i&&(s=hh(t.breakClips,t=>t.id===i))}return s}constructor(t){super(),this.D1t=void 0,this.k1t=void 0,this.qc=[],this.C1t=void 0,this.D1t=t}},b2=class{get M1t(){return this.L1t}get o(){return this.L1t.id}get PYt(){return[]}get ct(){var t;return null!=(t=this.L1t.duration)?t:NaN}get AJt(){const t=this.d1t();return t?[{contentURL:t,delivery:"progressive",type:this.l1t(),width:0,height:0}]:[]}get PJt(){return this.d1t()}get kJt(){const{whenSkippable:t}=this.L1t;return void 0===t?void 0:t<0?-1:t}get KYt(){return this.L1t.clickThroughUrl}get wYt(){}get rYt(){return[]}get y0t(){}a1t(){return""}l1t(){var t;return null!=(t=this.L1t.contentType)?t:""}d1t(){var t,i;return null!=(i=null!=(t=this.L1t.contentUrl)?t:this.L1t.contentId)?i:""}er(t,i){const e=this.o,s=this.ct,n=this.L1t.contentUrl;this.L1t=t;const r=this.o,h=this.ct,o=this.L1t.contentUrl;e===r&&(s===h||S(s)&&S(h))&&n===o||i.push(new ch(this)),S(s)&&!S(h)&&i.push(new p2(this))}R1t(){let t;return this.N1t&&(t=w1(this.N1t,this.od.qOt)),t||(t=w1(this.L1t,this.od.qOt)),t}Ont(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()}xa(){const t=this;return{get extensions(){return[]},get companions(){return t.PYt},get duration(){return t.ct},get id(){return t.o},get mediaFiles(){return t.AJt},get mediaUrl(){return t.PJt},get closedCaptionFiles(){return[]},get skipOffset(){return t.kJt},type:"linear",integration:we.Iv,get adSystem(){return t.a1t()},width:void 0,height:void 0,get adBreak(){return t.od.Ont()},get resourceURI(){return t.d1t()},get clickThrough(){return t.KYt},get creativeId(){return t.wYt},get customData(){return t.y0t},get isSlate(){return!1},get universalAdIds(){return t.rYt.map(t=>({adIdRegistry:t.EZt,adIdValue:t.PZt}))}}}constructor(t,i){this.L1t=void 0,this.N1t=void 0,this.od=void 0,this.hu=void 0,this.L1t=t,this.od=i}};r();var A2=class extends Ne{get O1t(){return this.F1t}set O1t(t){this.F1t!==t&&(this.F1t=t,this.Ls.href=null!=t?t:"",t?this.JU():this.ZU())}JU(){if(this.We)return;this.We=!0,this.Ls.style.display="",this.U1t||(this.wE.style.cursor="pointer");const t=this.U1t?this.Ls:this.wE;zd.Zs.Ke?(t.addEventListener("touchstart",this.V1t),t.addEventListener("touchend",this.H1t)):(t.addEventListener("mousedown",this.V1t),t.addEventListener("click",this.H1t))}ZU(){if(!this.We)return;this.We=!1,this.Ls.style.display="none",this.U1t||(this.wE.style.cursor="");const t=this.U1t?this.Ls:this.wE;zd.Zs.Ke?(t.removeEventListener("touchstart",this.V1t),t.removeEventListener("touchend",this.H1t)):(t.removeEventListener("mousedown",this.V1t),t.removeEventListener("click",this.H1t))}zg(){this.Vo(),this.ZU(),this.wE.removeChild(this.Ls)}constructor(t,i=zd.Zs.Ke){super(),this.wE=void 0,this.Ls=void 0,this.U1t=void 0,this.F1t=void 0,this.We=!1,this.V1t=t=>{t.stopPropagation(),this.So(new gp("clickstart"))},this.H1t=t=>{t.stopPropagation(),this.So(new gp("click"))},this.wE=t,this.U1t=i,this.Ls=h.createElement("a"),this.Ls.style.position="absolute",this.Ls.style.zIndex="11",this.Ls.target="Xu",this.U1t?(Nr(this.Ls,"learn more"),this.Ls.className="theoplayer-ad-overlay-component theoplayer-ad-touch-clickthrough",this.Ls.setAttribute("rel","noopener")):Go(this.Ls),this.wE.appendChild(this.Ls),this.ZU()}};r(),r();var S2=[1200,992,768,576],T2={1200:"theo-size-xl",992:"theo-size-l",768:"theo-size-m",576:"theo-size-s"},k2=class{W1t(t){const i=E2(t);i!==this.q1t&&(Pl(this.Ls,i),Il(this.Ls,this.q1t),this.q1t=i)}kn(){this.sc.mn(Qh.yn,this.bn)}constructor(t,i){this.Ls=void 0,this.sc=void 0,this.q1t=void 0,this.bn=void 0,this.Ls=t,this.sc=i,this.bn=t=>{this.W1t(t.width)},this.q1t=E2(i.Eu),Pl(this.Ls,this.q1t),i.wn(Qh.yn,this.bn)}};function E2(t){for(const i of S2)if(t>i)return T2[i];return"theo-size-xs"}var x2=class extends Ne{get xe(){return this.Ls}get Qk(){return this.Yo}get HT(){return this.ud.textContent||""}set HT(t){Nr(this.ud,t)}z1t(t){"countdown"!==this.Yo&&(this.Yo="countdown",this.G1t(),this.xe.classList.remove("theoplayer-ad-skip-button"),this.xe.classList.add("theoplayer-ad-skip-countdown")),this.HT="You can skip in "+_.round(t)+" seconds"}X1t(){"skip"!==this.Yo&&(this.Yo="skip",this.HT="Skip Ad",this.j1t(),this.xe.classList.remove("theoplayer-ad-skip-countdown"),this.xe.classList.add("theoplayer-ad-skip-button"))}j1t(){this.xe.addEventListener("mouseup",this.Q1t),this.xe.addEventListener("touchend",this.Q1t)}G1t(){this.xe.removeEventListener("mouseup",this.Q1t),this.xe.removeEventListener("touchend",this.Q1t)}kn(){this.Vo(),this.G1t(),this.tc.kn(),Ao(this.Ls),Ao(this.ud),this.K1t&&Ao(this.K1t)}constructor(t,i){super(),this.Ls=void 0,this.K1t=void 0,this.ud=void 0,this.tc=void 0,this.Yo=void 0,this.Q1t=()=>{this.So(new gp("uD"))},this.Ls=h.createElement("div"),this.xe.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.xe.style.position="absolute",this.ud=h.createElement("span"),this.xe.appendChild(this.ud),i&&(this.K1t=h.createElement("div"),this.K1t.className="theoplayer-ad-skip-poster",this.K1t.style.backgroundImage='url("'+up(i)+'")',this.xe.appendChild(this.K1t)),this.Yo="countdown",this.tc=new k2(this.xe,t)}},P2=class extends Ne{Y1t(){const t=this.I$t.$D.activeTrackIds;if(t){if(this.J1t()){const i=this.sO.NI.map(t=>t.o),e=this.tO.NI.map(t=>t.o);Ct(i.concat(e),"0")&&t.push(0)}N2(t,this.tO),N2(t,this.sO),function(t,i){const e=!1;for(const e of i.NI)e.O0t=Ct(t,e.JI)?xh.Kn:xh.Nh}(t,this.Gl)}}Z1t(){var t;const i=null==(t=this.I$t.$D.media)?void 0:t.tracks;if(!i)return;const e=i.filter(Y1),s=i.filter(J1),n=i.filter(Z1);if(this.J1t()&&0===s.length&&0!==this.LP()){const t=this.$1t();s.push(t)}if(this.J1t()&&0===e.length){const t=this.t2t();e.push(t)}R2(this.tO,e.map(t=>t.trackId)),R2(this.sO,s.map(t=>t.trackId)),R2(this.Gl,n.map(t=>t.trackId)),D2(e,this.tO),D2(s,this.sO),function(t,i){let e=!1;for(const s of t){let t=C2(i,s.trackId);t||(t=new $1(s),i.tt(t),e=!0)}}(n,this.Gl)}i2t(){this.Cz||(this.e2t=v(this.bd,250))}s2t(){p(this.e2t)}n2t(){this.s2t(),this.i2t()}r2t(){var t;const i=this.I$t.$D,e=i.media;var s;const n=null!=(s=null==e?void 0:e.duration)?s:NaN,r=(null==e?void 0:e.streamType)===chrome.cast.media.StreamType.LIVE||n<0,h=r?1/0:n;this.Zb=h,this.h2t();const o=i.getEstimatedLiveSeekableRange(),a=null==(t=i.customData)?void 0:t.buffers;if(it(o)){const{start:t,end:i,isMovingWindow:e=r,isLiveDone:s=!1}=o;this.BUt(t,i,e,s)}else if(it(a)){const[t,i]=a.seekable;this.BUt(t,i,r,!1)}else r?this.BUt(void 0,void 0,!0,!1):this.BUt(0,h,!1,!1)}o2t(){const t=this.I$t.$D,i=function(t){return void 0!==t&&t.playerState===chrome.cast.media.PlayerState.PAUSED}(t)||I2(t);this.a2t=i,this.Cz!==i&&(this.Cz=i,this.Cz?this.So(new Si(this.Gx())):this.So(new vt(this.Gx())))}hh(){const{playbackRate:t}=this.I$t.$D;this.u2t!==t&&(this.u2t=void 0,this.Rz!==t&&(this.Rz=t,this.So(new Ik(this.Gx(),t))))}c2t(){const{playerState:t}=this.I$t.$D;let i;switch(t){case chrome.cast.media.PlayerState.IDLE:i=Lr.zL;break;case chrome.cast.media.PlayerState.BUFFERING:i=Lr.Qn;break;case chrome.cast.media.PlayerState.PAUSED:case chrome.cast.media.PlayerState.PLAYING:i=Lr.XL}this.u5(i),this.d2t()}BUt(t,i,e,s){it(t)&&it(i)?this.H4=new rh(t,i,e,e&&!s):this.H4=void 0}l2t(t,i){this.C0t=null!=i?i:this.C0t,this.I0t=null!=t?t:this.I0t,this.So(new Vs)}Je(t){this.f2t!==t?(this.Pz=!0,this.So(new ji(this.Gx()))):this.f2t=void 0}Mq(){if(!this.Pz)return;this.Pz=!1;const t=this.Gx();this.So(new B(t,this.Hx())),this.So(new Yr(t))}Eh(){this.h5=!0,this.Kx()&&this.So(new ur(this.Gx()))}h2t(){const t=this.nxt,i=this.Nd();t===i||S(t)&&S(i)||(this.nxt=i,this.So(new zr(i)))}v2t(){const t=this.Gx();this.Pz||this._2t===t||(this._2t=t,this.So(new B(t,this.Hx())))}P0t(){this.Cz&&(this.Cz=!1,this.So(new vt(this.Gx())),this.u5(Lr.zL))}_nt(){return this.qc}Ux(){return this.rPt.Ly(this.x0t)}Gx(){if(this.qc.zc){const t=this.I$t.q$t();if(void 0!==t)return t}return this.nnt()}nnt(){return void 0!==this.g2t?this.x0t+this.g2t:this.h5?this.Nd():this.x0t+this.I$t.W$t()}Hx(){if(this.p2t)return new Date(this.nnt()+this.p2t)}Nd(){if(this.qc.zc){var t;const i=null==(t=this.qc.Lnt[0])?void 0:t.ct;if(void 0!==i&&!S(i))return i}return this.x0t+this.Zb}Yx(){return this.nq}Kx(){return!this.qc.zc&&this.h5}fP(){return this.Cz}_P(){return this.Rz}gP(t){this.Rz!==t&&(this.u2t=this.Rz,this.Rz=t,this.So(new Ik(this.Gx(),t)),this.I$t.gP(t))}TP(){return this.o5}mP(){return this.qc.zc?Uo.nL(0,this.Gx()):this.Ho.Ly(this.x0t)}EP(){var t,i;if(this.qc.zc)return Uo.rL();let e=null!=(i=null==(t=this.H4)?void 0:t.J3().Ly(this.x0t))?i:Uo.rL();if(e.V>0){const t=e.An(e.V-1);e=e.HM(Uo.nL(t,this.Gx()))}return e}PP(){return this.Pz}Mx(){return this.tO}BP(){return this.sO}RP(){return this.Gl}$1t(){return{customData:{activeQuality:{averageBandwidth:0,bandwidth:0,codecs:"",frameRate:0,height:this.NP(),id:"0",name:"",width:this.LP()},enabled:!0,id:"0",kind:"main",label:"",language:"",qualities:[],uid:0},language:"",name:"",trackContentId:"",trackContentType:"",trackId:0,type:Q1.Mk}}t2t(){return{customData:{activeQuality:{averageBandwidth:0,bandwidth:0,codecs:"",id:"0",name:"",audioSamplingRate:0},qualities:[],enabled:!0,id:"0",kind:"main",label:"",language:"",uid:0},language:"",name:"",trackContentId:"",trackContentType:"",trackId:0,type:Q1.Bk}}J1t(){var t,i;return!(void 0!==(null==(t=this.gBt.F$t())?void 0:t.version))||(null==(i=this.gBt.F$t())?void 0:i.sdkType)===n2.q0t}H$t(t){this.J1t()&&_e(t,0),this.I$t.H$t(t)}LP(){return this.I0t}NP(){return this.C0t}QP(){this.Cz&&(this.Cz=!1,this.a2t=!1,this.So(new vt(this.Gx()))),this.I$t.QP()}jP(){this.Cz||(this.Cz=!0,this.a2t=!0,this.So(new Si(this.Gx()))),this.I$t.jP()}Oy(t){if(this.qc.zc)return;let i=_.max(0,t-this.x0t);i=_.round(1e6*i)/1e6;const e=this.g2t;this.g2t=i,this.a2t=this.fP(),this.f2t=i,this.Pz=!0,this.So(new ji(this.Gx())),void 0===e&&(this.J1t()?this.m2t(i):this.E9(i))}E9(t){this.I$t.Oy(t,this.a2t).then(this.w2t(t)).catch(this.V$t)}w2t(t){return()=>{void 0!==this.g2t&&(this.g2t===t?this.g2t=void 0:this.E9(this.g2t))}}u5(t){this.o5!==t&&(this.o5=t,this.So(new Ka(this.Gx(),t))),void 0===this.g2t&&this.Pz&&t>=Lr.GL&&this.Mq(),this.d2t()}d2t(){if(this.Cz)return void(this.y2t=!1);const t=this.o5>=Lr.XL;this.y2t!==t&&(this.y2t=t,t?this.So(new mo(this.Gx())):this.So(new SP(this.Gx())))}b2t(){this.A2t||(this.A2t=h.createElement("div"),this.oa.xe.appendChild(this.A2t),this.A2t.className="theoplayer-ad-linear theoplayer-chromecast-ad",this.A2t.style.zIndex="10",Go(this.A2t)),this.A2t.style.display=this.qc.zc?"":"none"}S2t(){var t;const i=null==(t=this.qc.Lnt[0])?void 0:t.KYt;i&&!this.T2t?(this.T2t=new A2(this.A2t,!0),this.T2t.O1t=i,this.T2t.wn("clickstart",this.k2t)):this.T2t&&(this.T2t.O1t=i)}E2t(){var t;const i=null==(t=this.qc.Lnt[0])?void 0:t.kJt;if(void 0===i||i<0)return void(this.x2t&&(this.x2t.kn(),this.x2t=void 0));if(!this.x2t){var e;const t=null==(e=this.oa.Na)?void 0:e.gi;this.x2t=new x2(this.oa.Wu,t),this.A2t.appendChild(this.x2t.xe),this.x2t.wn("uD",this.P2t)}const s=this.I$t.q$t();void 0!==s&&(s{switch(t){case"buffered":this.rPt=new Uo(i),this.So(new Et(this.Gx()));break;case"currentProgramDateTime":this.p2t=new Date(i).getTime()-this.Gx();break;case"played":this.Ho=new Uo(i);break;case"seekable":this.r2t();break;case"videoHeight":this.l2t(void 0,i);break;case"videoWidth":this.l2t(i,void 0)}},this.u4=t=>{switch(t.type){case d.$w:this.Je(t.currentTime);break;case d.Zw:this.Mq();break;case d.Yw:this.So(new bH(t.representation,t.previousRepresentation));break;case d.ey:this.So(new KV(t.segmentStartTime,t.error,t.trackType,t.track,t.quality,t.retryCount));break;case d.Dw:this.So(new wn(t.currentTime,t.initDataType,t.initData));break;case d.Ew:this.So(new AL(new fs(me.CONTENT_PROTECTION_ERROR,t.error,void 0,t.licenseAcquisitionURL,t.status,t.statusText,t.licenseAcquisitionMessage,t.systemCode)));break;case d.xw:this.So(new nt)}},this.g0t=t=>{this.r2t(),this.o2t(),this.hh(),this.c2t(),this.v2t(),this.n2t(),this.Z1t(),this.Y1t(),this.b2t(),this.S2t(),this.E2t(),t||I2(this.I$t.$D)&&this.Eh()},this.bd=()=>{this.v2t(),this.E2t()},this.C2t=t=>{this.So(t)},this.m2t=Vl(t=>this.E9(t),50),this.V$t=t=>{this.g2t=void 0,this.So(new b1(t))},this.k2t=()=>{this.jP()},this.P2t=()=>{this.qc.uD()},this.oa=t,this.gBt=e,this.I$t=s,this.qc=new w2(t,s,i.Jc),this.x0t=n.R0t(),this.Zb=n.Nd()-this.x0t,this.Cz=n.fP(),this.Rz=n._P(),this.I0t=n.LP(),this.C0t=n.NP(),this.I$t.N$t(this.u4),this.I$t.C$t(this.I2t),this.I$t.M$t(this.g0t),this.I$t.wn(y1.x$t,this.C2t),this.I$t.O$t().then(t=>{this.So(new A1(t.bt,t.Mc))},this.V$t)}};function I2(t){return void 0!==t&&t.playerState===chrome.cast.media.PlayerState.IDLE&&t.idleReason===chrome.cast.media.IdleReason.FINISHED}function C2(t,i){for(const e of t.NI)if(e.JI===i)return e}function R2(t,i){let e=!1;for(let s=0;s0?h.start(0):0,u=null!=t?t:this.nnt();await this.m0t(e,n,o,r,a,u)}ort(){const t=new st;return this.qc.qnt(t),t.ort()}Hx(){return this.Ra.Hx()}qx(){return this.mz}get zx(){return this.Gx()}set zx(t){this.Xx(t)}Gx(){return this.Ra.Gx()}nnt(){return this.Ra.nnt()}Xx(t,i){this.O2t||(this.gBt.p0t()||this.O2t||!this.Ac?this.Ra.Oy(t):this.Un(this.Ac,t))}Nd(){return this.Ra.Nd()}Kx(){return this.Ra.Kx()}Yx(){return this.nq}Zx(){return this.rq}tP(){return this.eO}hP(){return this.oa.rP}aP(){return this.Iz}uP(t){this.Iz=t,this.So(new Wi(this.zx,this.OP)),this.gBt.uP(t)}fP(){return this.Ra.fP()}_P(){return this.Ra._P()}gP(t){this.Ra.gP(t)}mP(){return this.Ra.mP()._s()}yP(){return Dn.HL}bP(t){}TP(){return this.Ra.TP()}EP(){return this.Ra.EP()._s()}PP(){return this.Ra.PP()}nu(){return this.Ac}async Ta(t){this.Ac=t,await this.Un(t),this.M2t=void 0,this.Ra.P0t()}RP(){return this.Gl}NP(){return this.Ra.NP()}LP(){return this.Ra.LP()}BP(){return this.sO}FP(){return this.cA}UP(t){this.cA=t,this.So(new Wi(this.zx,this.OP)),this.gBt.UP(t)}get WP(){return!1}set WP(t){}zP(){}qP(){return this.ha}GP(){}QP(){this.gBt.p0t()||this.O2t||!this.Ac?this.Ra.QP():this.Un(this.Ac)}jP(){this.Ra.jP()}gr(){this.ho=!0}mr(){this.mz=void 0,this.ho=!1}be(){}we(){}async m0t(t,i,e,s,n,r){this.O2t=!0,this.F2t(),this.Ra.D0t(n);const h="live"===e||"dvr"===e,o="vod"===e,a=function(t,i,e,s){return{theoplayer_version:1,streamStart:t,isLive:i,sourceDescription:e,configuration:s}}(n,h,t,this.Cd),u={w0t:t,Jc:i,zx:r>=0&&r!==1/0&&(o||0!==r)?_.max(0,r-n):void 0,ct:s,P0:h?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED,y0t:a};try{await this.gBt.m0t(u)}catch(t){this.U2t(t)}finally{this.O2t=!1}}V2t(){this.H2t(this.tO),this.H2t(this.sO),this.W2t(this.Gl)}H2t(t){for(const i of t.NI)this.q2t(i);t.wn(N.rI,t=>{this.q2t(t.Ht),this.z2t()})}W2t(t){for(const i of t.NI)this.G2t(i);t.wn(N.rI,t=>{this.G2t(t.Ht),this.z2t()})}q2t(t){t.wn(X1.B0t,this.imt),t.wn(X1.M0t,this.X2t),t.wn(X1.M0t,this.Y1t)}G2t(t){t.wn(X1.N0t,this.j2t),t.wn(X1.N0t,this.Y1t)}Q2t(){const t=[];for(const i of this.rt.NI)i.Rt&&t.push(i.JI);for(const i of this.ht.NI)i.Rt&&t.push(i.JI);for(const i of this.nt.NI)i.Qk===xh.Kn&&t.push(i.JI);this.Ra.H$t(t)}K2t(t,i,e){this.Y2t=t,this.J2t=i,this.Z2t=e}$2t(t){var i,e;if(!t)return!1;return(null!=(e=null==(i=this.gBt.F$t())?void 0:i.version)?e:-1)>=2?t.map(t=>t.o):[t[0].o]}t3t(t){this.i3t=t}$P(){}tI(){}sI(t){throw new m("Can't add a track while casting.")}async KP(){this.Ra.KP(),this.F2t()}F2t(){this.RV=Lr.zL,this.kV=!1,this.xV=!1,this.nq=void 0,this.rq=void 0}async kn(){this.F2t(),this.Vo(),this.vft=this.e3t(),this.gBt.mn(B1.x$t,this.C2t),this.gBt.mn(B1.n0t,this.s3t),this.gBt.mn(B1.wy,this.n3t),this.gBt.mn(B1.s0t,this.r3t),this.gBt.mn(B1.r0t,this.h3t),this.gBt.kn()}e3t(){return new G1(this,this.Ra.R0t(),this.Ra.Gx(),this.Ra.Nd(),this.Ra.Kx(),this.Ra.fP(),this.Ra._P(),this.Ra.LP(),this.Ra.NP())}constructor(t,i){super(t,!0),this.ho=!1,this.i3t=gs,this.RV=Lr.zL,this.kV=!1,this.xV=!1,this.O2t=!1,this.M2t=void 0,this.gBt=void 0,this.cA=void 0,this.Iz=void 0,this.Ra=void 0,this.mz=void 0,this.Ac=void 0,this.nq=void 0,this.rq=void 0,this.tO=new Gh,this.sO=new Gh,this.Gl=new ai,this.qc=void 0,this.ha=new ks,this.eO=new VS,this.Zst=new B2,this.Y2t=void 0,this.J2t=void 0,this.Z2t=void 0,this.n3t=t=>{var i,e;(it(t.OP)&&!rs(t.OP,this.cA,1e-5)||it(t.oP)&&t.oP!==this.Iz)&&(this.cA=null!=(i=t.OP)?i:this.cA,this.Iz=null!=(e=t.oP)?e:this.Iz,this.So(new Wi(this.zx,this.cA)))},this.r3t=()=>{const t=this.gBt.p0t();this.vft=t?new P2(this,this.oa,this.gBt,t,this.Ra):this.e3t()},this.N2t=t=>{this.Ez(t.bt),this.R2t(t.Mc)},this.h3t=t=>{const i=this.D2t(t.sN);if(!i)return void 0;const e={targetQualityIds:t.o0t};i.F0t(e)},this.C2t=t=>{this.U2t(t.lt)},this.U2t=t=>{this.i3t&&this.i3t(t)},this.s3t=t=>{this.nq=t.lt,this.rq=$k(this.nq),this.So(new el(this.rq))},this.X2t=t=>{if(!t.enabled)return;const i=this.rt.NI.some(i=>i.JI===t.trackId)?this.rt:this.ht;for(const e of i.NI)e.Rt&&e.JI!==t.trackId&&(e.Rt=!1)},this.j2t=t=>{if(t.mode===xh.Kn)for(const i of this.nt.NI)i.Qk===xh.Kn&&i.JI!==t.trackId&&tP(i.Lt,t.track.Lt)&&(i.Qk=xh.Nh)},this.Y1t=Vl(()=>{this.Q2t()},50),this.z2t=()=>{const t=[];var i;const e=null!=(i=hh(this.ht.NI,t=>J2(t,this.Y2t)))?i:hh(this.ht.NI,t=>t.Rt);var s;e&&t.push(e.JI);const n=null!=(s=hh(this.nt.NI,t=>J2(t,this.J2t)))?s:hh(this.nt.NI,t=>t.Qk===xh.Kn);var r;n&&t.push(n.JI);const h=null!=(r=hh(this.rt.NI,t=>J2(t,this.Z2t)))?r:hh(this.rt.NI,t=>t.Rt);h&&t.push(h.JI),0!==t.length&&this.Ra.H$t(t)},this.imt=t=>{const i=this.$2t(t.targetQuality),e=t.track;this.gBt.a0t(e.JI,e.V3,i)},this.qV=t=>{this.So(t);const i=t.readyState;!this.kV&&this.RV===Lr.zL&&i>=Lr.Qn&&(this.kV=!0,this.So(new Tt(t.currentTime))),!this.xV&&this.RV<=Lr.Qn&&i>=Lr.GL&&(this.xV=!0,this.So(new M(t.currentTime))),this.RV<=Lr.GL&&i>=Lr.XL&&this.So(new Is(t.currentTime)),this.RV<=Lr.XL&&i===Lr.jL&&this.So(new Zi(t.currentTime)),this.RV=i},this.cA=this.oa.OP,this.Iz=this.oa.oP,this.gBt=i,this.gBt.wn(B1.x$t,this.C2t),this.gBt.wn(B1.n0t,this.s3t),this.gBt.wn(B1.wy,this.n3t),this.gBt.wn(B1.s0t,this.r3t),this.gBt.wn(B1.r0t,this.h3t),this.qc=new gU(this),this.mz=this.oa.bt,this.Ac=this.oa.nu(),this.vft=new G1(this,0,this.oa.nnt(),this.oa.Nd(),this.oa.Qx,this.oa.lP,this.oa.vP,this.oa.MP,this.oa.DP),this.V2t()}};r();var O2=class extends Oi{xa(){return new F2(this.lt)}constructor(t){super("error"),this.lt=void 0,this.lt=t}},F2=class extends gp{constructor(t){super("error"),this.error=void 0,this.error=t}};r();var U2=class extends gp{constructor(t){super("statechange"),this.state=void 0,this.state=t}};function V2(t,i){let e;return{get casting(){return t.xJ},get error(){return t.lt},get receiverName(){return t.o3t},get state(){return t.vft},start(){t.Tn()},stop(){t.KP()},join(){t.a3t()},leave(){t.u3t()},set connectionCallback(t){null==i||i.c3t(t)},get connectionCallback(){return null==i?void 0:i.d3t()},get source(){return e||t.Mc},set source(i){e=i,t.Mc=i},addEventListener(i,e){const s=vu(i,Ts);t.wn(s,e)},removeEventListener(i,e){const s=vu(i,Ts);t.mn(s,e)}}}r();var H2=class extends je{get xJ(){return this.vft===Co.CONNECTING||this.vft===Co.CONNECTED}get lt(){return this.nq}get Ca(){return this.hu||(this.hu=V2(this,this.l3t)),this.hu}get o3t(){var t;return null==(t=this.l3t.f3t())?void 0:t.A0t()}get Mc(){return this.oa?this.oa.B2t:this.M2t}set Mc(t){this.M2t=t?ra(t,this.v3t.Cd):void 0,this.oa&&(this.oa.B2t=this.M2t,this.M2t&&this.oa.Un(this.M2t))}get vft(){return this.Ra}set vft(t){let i=t;this._3t||i!==Co.CONNECTING&&i!==Co.CONNECTED||(i=Co.AVAILABLE),this.Ra!==i&&(this.Ra=i,this.So(new U2(this.vft)))}async g3t(){if(!this.p3t)throw new m("Chromecast must be initialized before starting a session");await this.p3t,this.l3t.f3t()||await this.l3t.m3t()}async Tn(){this._3t=!0;try{if(this.vft=Co.CONNECTING,await this.g3t(),await this.w3t(),this.oa){const t=this.v3t.nu(),i=this.l3t.y3t(t);this.oa.B2t=i?ra(i,this.v3t.Cd):this.M2t,this.oa.L2t()}this.vft=Co.CONNECTED,await this.v3t.KP()}catch(t){this.b3t(!1).catch(gs),this.vft=Co.AVAILABLE,Ce(t)||this.u8(t)}}async a3t(){this._3t=!0;try{if(this.vft=Co.CONNECTING,await this.g3t(),await this.w3t(),this.oa){const t=this.v3t.nu(),i=this.l3t.A3t(t);i&&(this.oa.B2t=ra(i,this.v3t.Cd))}this.vft=Co.CONNECTED,await this.v3t.KP()}catch(t){await this.b3t(!0).catch(gs),this.vft=Co.AVAILABLE,Ce(t)||this.u8(t)}}async S3t(){this.l3t.f3t()&&await this.Tn()}async w3t(){null!=this.oa||(this.oa=this.T3t()),this.nq=void 0,this.v3t.jP(),await this.LY.k3t(this.oa)}T3t(){const t=new L2(this.v3t,this.l3t.f3t());return t.t3t(this.u8),t}E3t(){this.oa&&(this.oa.kn(),this.oa=void 0)}async b3t(t){if(this._3t=!1,!this.oa)return;const i=this.oa.ro,e=this.oa.nu(),s=this.oa.nnt();try{if(i){let i;i=t?this.l3t.x3t(e):this.l3t.P3t(e),null!=i||(i=e),await this.LY.I3t(i,i===e),this.v3t.Xx(s),this.v3t.QP()}}finally{this.E3t()}}u3t(){this.xJ&&(this.l3t.C3t(!1),this.b3t(!0).catch(this.u8))}KP(){this.xJ&&(this.l3t.C3t(!0),this.b3t(!1).catch(this.u8))}kn(){this.uV.Zg(),this.l3t.mn(q1.E0t,this.R3t),this.Vo(),this.E3t()}constructor(t,i,e,s){super(),this.ZS=void 0,this.nq=void 0,this.hu=void 0,this.v3t=void 0,this.oa=void 0,this.Ra=Co.UNAVAILABLE,this.p3t=void 0,this.LY=void 0,this.l3t=void 0,this._3t=!1,this.uV=new Zc,this.D3t=()=>{this.l3t.wn(q1.E0t,this.R3t),this.vft=this.l3t.N3t()},this.R3t=t=>{const i=t.vft;this.vft=i,i!==Co.UNAVAILABLE&&i!==Co.AVAILABLE||this.b3t(!1).catch(this.u8)},this.M2t=void 0,this.u8=t=>{Ce(t)||t instanceof Us&&(this.nq=t,this.So(new O2(t).Ca))},this.LY=t,this.v3t=i,this.l3t=s,this.ZS=e.chromecast,this.p3t=Cu(this.l3t.GY(this.ZS,this.uV.Yg),this.uV),this.p3t.then(this.D3t).catch(this.u8)}};r();var W2=class extends je{get xJ(){return!1}get lt(){}get o3t(){}get Mc(){}set Mc(t){}get vft(){return Co.UNAVAILABLE}get Ca(){return this.hu||(this.hu=V2(this)),this.hu}a3t(){zd.um("Joining a Chromecast session is not possible when JoinStrategy is configured to disabled")}u3t(){zd.um("Leaving a Chromecast session is not possible when JoinStrategy is configured to disabled")}Tn(){zd.um("Starting a Chromecast session is not possible when JoinStrategy is configured to disabled")}KP(){zd.um("Stopping a Chromecast session is not possible when JoinStrategy is configured to disabled")}S3t(){return Promise.resolve()}kn(){}constructor(...t){super(...t),this.hu=void 0}};function q2(t){return{bt:t.bt,zx:t.Gx(),ct:t.Nd(),Qx:t.Qx,lt:t.Yx(),Jx:t.Zx(),oP:t.oP,lP:t.lP,vP:t.vP,AP:t.AP,xP:t.xP,DP:t.DP,MP:t.MP,OP:t.OP}}r(),r();var Jn=class extends VF{_nt(){return this.qc}Mx(){return this.tO}get $x(){return this.tP()}get iP(){return this.eP()}tP(){return this.eO}eP(){return this.iO}Aa(){return this.$L}RP(){return this.Gl}BP(){return this.sO}switchContexts(t){this.oa=t,this.tO.OI=t.ht,this.sO.OI=t.rt,this.Gl.OI=t.nt,this.$L.OI=t.Sq,this.eO.OI=t.$x,this.iO.OI=t.iP,this.qc.OI=t.Jc}B3t(t){this.oa!==t&&(this.yz(),this.switchContexts(t),this.wz())}nO(t){if(this.oa===t)return;let i;this.yz(),this.bnt&&(i=q2(this));const e=this.qx(),s=this.qP(),n=this.zP();if(this.switchContexts(t),void 0!==i){Ok(this,i,q2(this))}const r=this.qx();r!==e&&this.So(new Uk(r)),this.qP()!==s&&this.So(new Vk),this.zP()!==n&&this.So(new Hk),this.wz()}async kn(t){await super.kn(t),this.$L.kn(t),this.tO.kn(t),this.sO.kn(t),this.Gl.kn(t),this.eO.kn(),this.iO.kn(),await this.qc.kn(t)}constructor(t,i){super(t,i),this.tO=new Gh,this.sO=new Gh,this.Gl=new ai,this.$L=void 0,this.eO=new zS,this.iO=new se,this.qc=void 0,this.$L=new zk(t.Sq),this.tO.OI=t.ht,this.sO.OI=t.rt,this.Gl.OI=t.nt,this.eO.OI=t.$x,this.iO.OI=t.iP,this.qc=new gU(this),this.qc.OI=t.Jc}};r();function z2(t){const i=h.createElement("div");return Pl(i,"theo-ads-sgai-ima-container"),function(t){t.style.boxSizing="border-box",t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%"}(i),t.appendChild(i),i}function G2(t){const i=t.style;i.boxSizing="border-box",i.position="absolute",i.display="none",i.border="0 solid transparent",i.borderWidth="0px",i.width="100%",i.height="100%"}function X2(t){const i=t.style;i.display="",i.backgroundColor="",i.backgroundRepeat="",i.backgroundAttachment="",i.border="",i.borderWidth="",i.flex="",i.transform="",i.transition="",i.backgroundImage="",i.backgroundSize="",i.backgroundPosition="",i.alignItems="",i.position=""}function j2(t,i,e,s,n){const r=i/e;let h=1,o=0,a=0;if(r>=s/n){const t=s/r;o=(n-t)/2,h=t/e}else{const t=n*r;a=(s-t)/2,h=t/i}t.style.left=a/s*100+"%",t.style.top=o/n*100+"%",t.style.width=i*h/s*100+"%",t.style.height=e*h/n*100+"%"}function Q2(t){return Xt(t,"theo-ads://dai.break")}function K2(t){return t&&t.integration===FC.THEOADS}var Y2=class extends Jn{nu(){const t=super.nu();return!t&&this.M3t.xJ&&this.M3t.Mc?this.M3t.Mc:t}Ta(t,i){return this.ta.Zo(i=>(this.L3t=new Zc,this.L3t.$g(i),Cu(super.Ta(t,this.L3t.Yg),this.L3t)),i)}QP(){super.QP(),this.Cd.cast.strategy!==GS.AUTO||this.M3t.xJ||this.M3t.S3t()}k3t(t){return this.ta.Zo(i=>this.O3t(t,i))}I3t(t,i){return void 0===t&&(t=void 0),void 0===i&&(i=!1),this.ta.Zo(e=>this.F3t(t,i,e))}O3t(t,i){fr(i),this.U3t.Jc&&this.U3t.Jc.qnt(t.Jc),this.V3t(),this.H3t=hh(this.U3t.ht.NI,t=>t.Rt),this.fEt=hh(this.U3t.nt.NI,t=>"showing"===t.Qk),this.W3t=hh(this.U3t.rt.NI,t=>t.Rt),this.q3t=t,this.q3t.K2t(this.H3t,this.fEt,this.W3t),this.nO(t),this.q3t.gr()}async F3t(t,i,e){fr(e);const s=this.q3t;if(void 0!==s)try{if(t){await this.U3t.KP(),fr(e);const s=ra(t,this.U3t.Cd);var n;if(s.sources.forEach(t=>{t&&(t.bypassLicense=!0)}),i)s.ads=null==(n=s.ads)?void 0:n.filter(K2);this.L3t=new Zc,this.L3t.$g(e),await Cu(this.U3t.Ta(s,this.L3t.Yg),this.L3t)}i&&this.U3t.Jc&&s.Jc.qnt(this.U3t.Jc)}catch(t){bu(t)}finally{s.mr(),this.nO(this.U3t),this.H3t=hh(this.q3t.ht.NI,t=>t.Rt),this.fEt=hh(this.q3t.nt.NI,t=>"showing"===t.Qk),this.W3t=hh(this.q3t.rt.NI,t=>t.Rt),this.U3t.ht.wn(N.rI,this.z3t),this.U3t.nt.wn(N.rI,this.G3t),this.U3t.rt.wn(N.rI,this.X3t),this.U3t.wn(Jr.EM,this.V3t),this.q3t===s&&(this.q3t=void 0)}}KP(){var t;return this.H3t=void 0,this.fEt=void 0,this.W3t=void 0,this.V3t(),null==(t=this.L3t)||t.Zg(),this.ta.Zo(()=>super.KP())}async kn(){var t;null==(t=this.L3t)||t.Zg(),this.M3t.kn(),await this.I3t(),await this.ta.kn(),await super.kn()}constructor(t,i){super(t),this.M3t=void 0,this.U3t=void 0,this.q3t=void 0,this.ta=new Zn,this.L3t=void 0,this.H3t=void 0,this.fEt=void 0,this.W3t=void 0,this.z3t=t=>{const i=t.Ht;J2(this.H3t,i)&&(i.Rt=!0)},this.G3t=t=>{const i=t.Ht;J2(this.fEt,i)&&(i.Qk=xh.Kn)},this.X3t=t=>{const i=t.Ht;J2(this.W3t,i)&&(i.Rt=!0)},this.V3t=()=>{this.U3t.ht.mn(N.rI,this.z3t),this.U3t.nt.mn(N.rI,this.G3t),this.U3t.rt.mn(N.rI,this.X3t)},this.U3t=t,this.Cd.cast.strategy!==GS.DISABLED?this.M3t=new H2(this,t,this.Cd.cast,i):this.M3t=new W2,this.GX.BJ(this.M3t)}};function J2(t,i){return void 0!==t&&void 0!==i&&(t.bs===i.bs&&i.Th===t.Th)}r();var Z2=new class extends Ne{c3t(t){this.j3t=t}d3t(){return this.j3t}f3t(){return this.Q3t}N3t(){switch(this.K3t.getCastState()){case cast.framework.CastState.CONNECTED:return Co.CONNECTED;case cast.framework.CastState.CONNECTING:return Co.CONNECTING;case cast.framework.CastState.NOT_CONNECTED:return Co.AVAILABLE;case cast.framework.CastState.NO_DEVICES_AVAILABLE:default:return Co.UNAVAILABLE}}async GY(t,i){await g0(i),this.K3t=cast.framework.CastContext.getInstance(),this.K3t.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.MJ),this.K3t.setOptions({receiverApplicationId:t.appID,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED})}async m3t(){try{const t=await this.K3t.requestSession();if(t)throw t}catch(t){throw new Us(Wn(t))}}y3t(t){var i;return null==(i=this.j3t)?void 0:i.onStart(t)}P3t(t){var i;return null==(i=this.j3t)?void 0:i.onStop(t)}A3t(t){var i;return null==(i=this.j3t)?void 0:i.onJoin(t)}x3t(t){var i;return null==(i=this.j3t)?void 0:i.onLeave(t)}C3t(t){this.K3t.endCurrentSession(t)}constructor(...t){super(...t),this.K3t=void 0,this.Q3t=void 0,this.j3t=void 0,this.MJ=()=>{const t=this.N3t();this.Q3t=t===Co.CONNECTED?new H1(this.K3t.getCurrentSession()):void 0,this.So(new z1(t))}}},$2=new class{get Ca(){return this.hu||(this.hu=function(t){return{initialize(i){const e=t.GY(XS(i));return e.catch(gs),e},startSession(){const i=t.m3t();return i.catch(gs),i},endSession(){t.Y3t()}}}(this)),this.hu}async GY(t){this.p3t||(this.p3t=this.J3t(t)),await this.p3t}async J3t(t){await this.l3t.GY(t)}async m3t(){if(!this.p3t)throw new m("Chromecast must be initialized before starting a session");await this.p3t,this.l3t.f3t()||await this.l3t.m3t()}Z3t(){this.l3t.C3t(!1)}Y3t(){this.l3t.C3t(!0)}constructor(t){this.p3t=void 0,this.hu=void 0,this.l3t=void 0,this.l3t=t}}(Z2),t3={get chromecast(){return $2.Ca}};Ma(t=>new Y2(t,Z2),da.Ent),r(),r(),r(),r(),r(),r(),r();var i3=class{$3t(t,i,e,s){t.Gz.forEach(t=>{if(!this.t4t(t.i4t)){const n=t.e4t(i,e,s);n&&this.s4t(n)}})}t4t(t){return this.n4t.get(t)}s4t(t){this.n4t.set(t.r4t,t),this.h4t.set(t.r4t,t.o4t),this.a4t.au(t.u4t)}znt(t){this.h4t.has(t.r4t)||(this.h4t.set(t.r4t,t),this.a4t.au(t.u4t))}c4t(t){return this.h4t.forEach(t)}d4t(t){return this.n4t.forEach(t)}l4t(t){let i=!1;return this.n4t.forEach(e=>{i=e.l4t(t)||i}),i}async kn(){const t=[];this.n4t.forEach(i=>t.push(i.kn())),this.h4t.forEach(i=>t.push(i.kn())),await Promise.all(t),this.n4t.clear(),this.h4t.clear()}constructor(t){this.a4t=void 0,this.n4t=void 0,this.h4t=void 0,this.a4t=t,this.n4t=Ba(),this.h4t=Ba()}};r();var $h=class t extends Oi{xa(){return new e3(this.AZt,this.Iy,this.Jy,this.Mc)}static f4t(i){return new t($c.GENERAL,i.Iy,i.TZt)}static v4t(i,e){return new t(i.AZt,i.message,i.TZt,e)}constructor(t,i,e,s){super("_4t"),this.AZt=void 0,this.Iy=void 0,this.Jy=void 0,this.Mc=void 0,this.AZt=t,this.Iy=i,this.Jy=e,this.Mc=s}},e3=class extends gp{constructor(t,i,e,s){super("aderror"),this.problemType=void 0,this.message=void 0,this.errorCode=void 0,this.source=void 0,this.problemType=t,this.message=i,this.errorCode=e,this.source=s}},s3=class extends tl{get g4t(){return this.p4t}get zc(){let t=!1;return this.m4t(i=>{t=t||i.w4t}),t}get Lnt(){const t=[];return this.m4t(i=>{const e=i.Lnt;e.length&&t.push(...e)}),t}get Fnt(){let t=null;return this.m4t(i=>{null!=t||(t=i.Fnt)}),t}get Unt(){const t=[];return this.m4t(i=>{t.push(...i.Unt)}),t}get Vnt(){const t=[];return this.m4t(i=>{t.push(...i.Vnt)}),t}qnt(t){this.m4t(i=>{i.qnt(t)})}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=iU(this)}W6(t,i,e){try{this.y4t=e;const s=va.Bg.jz(t);if(s.i4t===we.knt)return;const n=this.p4t.t4t(s.i4t);if(!n)throw new ys($c.ADBLOCK,void 0,"Ads could not be loaded.");i!==Hu.Mnt&&this.d9||this.A4t.b4t(n),s.W6(t,i,n,this.y4t)}catch(i){0,this.So($h.v4t(i,t.sources))}}uD(){this.m4t(t=>{t.uD()})}Hnt(t){this.m4t(i=>{i.Hnt(t)})}znt(t){this.p4t.znt(t)}Wnt(t,i){return this.A4t.Wnt(t,i)}S4t(t){this.p4t.d4t(i=>{i.S4t(t)})}l4t(t){return this.p4t.l4t(t)}m4t(t){return this.p4t.c4t(t)}GP(){this.p4t.d4t(t=>t.GP())}async hr(){this.d9=!1;const t=[];this.p4t.d4t(i=>t.push(i.KP())),await Promise.all(t)}async kn(){this.Vo(),await this.p4t.kn(),this.A4t.mn(d.uo,this.hst),this.mn("_4t",this.T4t)}constructor(t){super(),this.A4t=void 0,this.p4t=void 0,this.y4t=!1,this.d9=!1,this.hu=void 0,this.T4t=t=>{if(!this.y4t)return;if(t.Jy===xs.VAST_NO_ADS_AFTER_WRAPPER||t.Jy===xs.VAST_EMPTY_RESPONSE)return;const i=new mu(Mi.ADVERTISEMENT_ERROR,t.Iy),e=new as(me.AD_BLOCKER_DETECTED,t.Iy+" Turn off your AdBlocker and try again.",i);this.A4t.Qq(e)},this.hst=()=>{this.d9=!0},this.A4t=t,this.p4t=new i3(this),this.wn("_4t",this.T4t),t.wn(d.uo,this.hst)}};r(),r(),r();var tn=class extends a2{get Jc(){return this.qc}get G0t(){return this.k4t}set G0t(t){this.k4t=t}get X0t(){return this.E4t}set X0t(t){this.E4t=t}set qOt(t){this.f$t=t}get qOt(){return this.f$t}get y0t(){return this.x4t}P4t(){this.I4t=!0}C4t(t){this.qc.push(t),this.I4t=!1}R4t(t){_e(this.qc,t)}get pP(){return this.I4t}constructor(t){super(),this.f$t=void 0,this.qc=void 0,this.k4t=void 0,this.E4t=void 0,this.x4t=void 0,this.I4t=void 0,this.f$t=t,this.qc=[],this.k4t=-1,this.E4t=-1,this.x4t=void 0,this.I4t=!1}},n3=class extends tn{get u$t(){return this.D4t}get Unt(){return this.N4t}er(t){void 0!==t.maxDuration&&(this.k4t=t.maxDuration),void 0!==t.customData&&(this.x4t=t.customData)}B4t(t){const i=this.qc.indexOf(t);return i>=0&&it.Ca)},get resourceURI(){return t.d1t()},get clickThrough(){return t.KYt},get width(){return t.Ti},get type(){return function(t){switch(t){case"linear":case"unknown":return"linear";case"nonlinear":return"nonlinear"}}(t.V4t)},get height(){return t.Mi},get id(){return t.o},get skipOffset(){return t.kJt},get integration(){return t.u$t},get creativeId(){return t.wYt},get universalAdIds(){return t.rYt},get customData(){return t.y0t},get isSlate(){return t.W4t}}}r();var h3=class{get VYt(){return this.HYt}get jYt(){return this.QYt}get G4t(){return this.X4t}get KYt(){return this.YYt}get Mi(){return this.fA}get cZt(){return this.z4t}get Ti(){return this.lA}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get adSlotId(){return t.VYt},get altText(){return t.jYt},get contentHTML(){return t.G4t},get clickThrough(){return t.KYt},get height(){return t.Mi},get resourceURI(){return t.cZt},get width(){return t.Ti}}}(this)}j4t(t){if(t.KYt&&t.cZt)return;const i=function(t){try{return j0(t,"text/html")}catch(t){return}}(t.G4t);i&&(this.YYt=o3(i,"a","href"),this.z4t=o3(i,"img","src"))}constructor(t){var i;this.hu=void 0,this.lA=void 0,this.fA=void 0,this.X4t=void 0,this.HYt=void 0,this.YYt=void 0,this.z4t=void 0,this.QYt=void 0,this.HYt=t.VYt,this.lA=t.Ti,this.fA=t.Mi,this.X4t=t.G4t,this.YYt=t.KYt,this.z4t=t.cZt,this.QYt=null!=(i=t.jYt)?i:"",this.j4t(t)}};function o3(t,i,e){const s=t.querySelector(i);return s&&s.getAttribute(e)||""}var a3=class extends gn{get u$t(){return this.D4t}get Q4t(){return this.K4t}set Q4t(t){this.K4t=t}xa(){return La(this)}er(t){t.id&&(this.aS=t.id),void 0!==t.skipOffset&&(this.EJt=t.skipOffset),void 0!==t.width&&(this.lA=t.width),void 0!==t.height&&(this.fA=t.height),void 0!==t.duration&&(this.Zb=t.duration),void 0!==t.readyState&&(this.F4t=function(t){return"ready"===t?r3.READY:r3.NONE}(t.readyState)),void 0!==t.resourceURI&&(this.z4t=t.resourceURI),void 0!==t.clickThrough&&(this.YYt=t.clickThrough),void 0!==t.companions&&(this.IYt=[...t.companions].map(u3)),void 0!==t.creativeId&&(this.yYt=t.creativeId),void 0!==t.universalAdIds&&(this.yJt=t.universalAdIds),void 0!==t.customData&&(this.x4t=t.customData)}constructor(t,i,e){super(e,function(t){return"linear"===t?Hs.BZt:"nonlinear"===t?Hs.L4t:Hs.yk}(i.type)),this.D4t=void 0,this.K4t=0,this.D4t=t,this.er(i)}};function u3(t){const i={VYt:t.adSlotId,jYt:t.altText,G4t:t.contentHTML,GT:void 0,KYt:t.clickThrough,Mi:t.height,cZt:t.resourceURI,Ti:t.width};return new h3(i)}r();var gu=class extends oU{xa(){return new c3(this.jnt.Ont(),this.Y4t)}get Y4t(){return this.J4t}constructor(t,i){super("Z4t",t),this.J4t=void 0,this.J4t=i}},c3=class extends aU{constructor(t,i){super("adskip",t),this.playedPercentage=void 0,this.playedPercentage=i}};r();var d3=class extends sU{xa(){return new l3(this.od.Ont())}constructor(t){super("$4t",t)}},l3=class extends Ke{constructor(t){super("updateadbreak",t)}};r();var f3=class extends sU{xa(){return new v3(this.od.Ont())}constructor(t){super("t5t",t)}},v3=class extends Ke{constructor(t){super("adbreakchange",t)}};r();var ie=class extends oU{xa(){return new _3(this.jnt.Ont(),this.currentTime)}constructor(t,i){super("i5t",t),this.currentTime=void 0,this.currentTime=i}},_3=class extends aU{constructor(t,i){super("adfirstquartile",t),this.currentTime=void 0,this.currentTime=i}};r();var xe=class extends oU{xa(){return new g3(this.jnt.Ont(),this.currentTime)}constructor(t,i){super("e5t",t),this.currentTime=void 0,this.currentTime=i}},g3=class extends aU{constructor(t,i){super("admidpoint",t),this.currentTime=void 0,this.currentTime=i}};r();var Qs=class extends oU{xa(){return new p3(this.jnt.Ont(),this.currentTime)}constructor(t,i){super("s5t",t),this.currentTime=void 0,this.currentTime=i}},p3=class extends aU{constructor(t,i){super("adthirdquartile",t),this.ad=void 0,this.currentTime=void 0,this.ad=t,this.currentTime=i}},m3=class{get Jc(){return this.qc}get K0t(){return this.y1t}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get integration(){return t.u$t},get ads(){return t.Jc.map(t=>t.Ont())},get adBreaks(){return t.K0t.map(t=>t.Ont())},createAd:(i,e)=>t.n5t(i,e?t.r5t(e):void 0).Ont(),updateAd(i,e){t.h5t(t.o5t(i),e)},updateAdProgress(i,e){const s=No(Number(e),0,1);t.a5t(t.o5t(i),s)},beginAd(i){t.M4t(t.o5t(i))},endAd(i){t.u5t(t.o5t(i))},skipAd(i){t.G$t(t.o5t(i))},removeAd(i){t.R4t(t.o5t(i))},createAdBreak:i=>t.c5t(i).Ont(),updateAdBreak(i,e){t.d5t(t.r5t(i),e)},removeAdBreak(i){t.l5t(t.r5t(i))},removeAllAds(){t.f5t()},error(i){t.v5t(i)},fatalError(i,e){const s=e?Number(e):void 0;t._5t(i,s)}}}(this)}get uN(){return this.f8}set uN(t){this.f8=t}get w4t(){return this.g5t.some(t=>t.V4t===Hs.BZt)}get r4t(){return this.u$t}get Lnt(){return this.g5t}get Fnt(){var t;return null!=(t=this.w1t)?t:null}get Unt(){return hs(this.y1t,t=>t.Unt)}get Vnt(){return this.y1t.filter(t=>!t.pP)}uD(){var t;if(0===this.g5t.length)return;const i=this.g5t[0];(null==(t=this.f8)?void 0:t.skipAd)?this.f8.skipAd(i.Ont()):this.G$t(i)}Hnt(t){}qnt(t){}n5t(t,i){var e;const s=null!=i?i:this.p5t({timeOffset:null!=(e=t.timeOffset)?e:0}),n=new a3(this.u$t,t,s);return s.C4t(n),this.qc.push(n),this.u4t.So(new cn(n)),n}h5t(t,i){t.er(i),this.u4t.So(new ch(t))}a5t(t,i){if(!Ct(this.g5t,t))throw new m("Cannot update ad progress on a non-started ad");const e=t.Q4t,s=_.max(e,i);t.Q4t=s;const n=this.A4t.Gx();e<.25&&s>=.25&&this.u4t.So(new ie(t,n)),e<.5&&s>=.5&&this.u4t.So(new xe(t,n)),e<.75&&s>=.75&&this.u4t.So(new Qs(t,n))}M4t(t){Ct(this.g5t,t)||(this.g5t.push(t),t.od.M4t(t),this.m5t(t.od),this.u4t.So(new nc(t,this.A4t.Gx())))}G$t(t){if(!Ct(this.g5t,t))return;const i=t.od.B4t(t);this.u4t.So(new gu(t,t.Q4t)),this.w5t(t,i)}u5t(t){if(!Ct(this.g5t,t))return;const i=t.od.B4t(t);this.u4t.So(new fc(t,this.A4t.Gx())),this.w5t(t,i)}R4t(t){if(!Ct(this.qc,t))return;const i=t.od.B4t(t);_e(this.qc,t),t.od.R4t(t),this.u4t.So(new f3(t.od)),this.w5t(t,i)}c5t(t){const i=new n3(this.u$t,t);return this.y1t.push(i),this.u4t.So(new vn(i)),i}d5t(t,i){t.er(i),this.u4t.So(new d3(t))}l5t(t){if(Ct(this.y1t,t)){for(const i of t.Jc.slice())this.R4t(i);_e(this.y1t,t),this.u4t.So(new nU(t))}}f5t(){for(const t of this.y1t.slice())this.l5t(t)}v5t(t){this.u4t.So(new $h($c.GENERAL,t.message))}_5t(t,i){const e=new as(null!=i?i:me.AD_ERROR,t.message,t);this.A4t.Qq(e)}y5t(t){return hh(this.y1t,i=>i.qOt===t)}p5t(t){var i;return null!=(i=this.y5t(t.timeOffset))?i:this.c5t(t)}w5t(t,i){_e(this.g5t,t);const e=t.od;0!==this.g5t.length||this.w1t!==e||i||(e.P4t(),this.m5t(void 0))}m5t(t){this.w1t!==t&&(void 0!==this.w1t&&this.u4t.So(new Za(this.w1t)),this.w1t=t,void 0!==t&&this.u4t.So(new Ta(t)))}o5t(t){const i=hh(this.qc,i=>i.Ont()===t);if(void 0===i)throw new m('Invalid ad for integration "'+this.u$t+'"');return i}r5t(t){const i=hh(this.y1t,i=>i.Ont()===t);if(void 0===i)throw new m('Invalid ad break for integration "'+this.u$t+'"');return i}async Ta(t,i){var e;if(fr(i),null==(e=this.f8)?void 0:e.setSource){let i=await Promise.resolve(this.f8.setSource(t));return Uu(i)&&(i=t),ra(i,this.A4t.Cd)}return t}async b5t(){var t;(null==(t=this.f8)?void 0:t.resetSource)?await Promise.resolve(this.f8.resetSource()):this.f5t()}async kn(){var t;(null==(t=this.f8)?void 0:t.destroy)&&await Promise.resolve(this.f8.destroy()).catch(gs),this.f5t(),this.m5t(void 0),this.f8=void 0,this.u4t.kn()}constructor(t,i){this.u$t=void 0,this.A4t=void 0,this.f8=void 0,this.u4t=new tl,this.qc=[],this.y1t=[],this.g5t=[],this.w1t=void 0,this.hu=void 0,this.u$t=t,this.A4t=i}};r();var w3=class{destroy(){this.removeAdListeners()}get player(){return this.oa}set player(t){this.oa&&this.removeAdListeners(),this.oa=t,this.addAdListeners()}get inAdBreak(){return this.A5t}addAdListeners(){var t,i;null==(t=this.oa.Jc)||t.wn("Ynt",this.Ed),null==(i=this.oa.Jc)||i.wn("Knt",this.Bd)}removeAdListeners(){var t,i;null==(t=this.oa.Jc)||t.mn("Ynt",this.Ed),null==(i=this.oa.Jc)||i.mn("Knt",this.Bd)}constructor(t){this.oa=void 0,this.r9=void 0,this.A5t=!1,this.Ed=t=>{1!==this.oa.vP&&(this.r9=this.oa.vP,this.oa.vP=1),this.A5t=!0},this.Bd=t=>{this.A5t=!1,void 0!==this.r9&&(this.oa.vP=this.r9,this.r9=void 0)},this.oa=t,this.addAdListeners()}},y3=class extends Jn{_nt(){return this.S5t}get T5t(){return this.k5t}GP(){this.U3t.GP(),this.S5t.GP()}QP(){void 0===this.nq?(void 0!==this.E5t&&this.x5t(this.E5t),super.QP()):this.So(new el(this.nq))}async Ta(t,i){fr(i);let e=t;if(e)for(const t of this.P5t)e=await t.Ta(e,i);if(await super.Ta(e,i),fr(i),null==e?void 0:e.ads){const t=Boolean(e.blockContentIfAdError);this.S5t.S4t(e.playAdsAfterTime);for(const i of e.ads)this.S5t.W6(i,Hu.Mnt,t)}}async KP(){this.nq=void 0,this.Wz=void 0,await this.S5t.hr(),this.I3t(),await super.KP();for(const t of this.P5t)await t.b5t()}x5t(t){this.I5t=this.oa.vP;const i=this.oa.OP,e=this.oa.oP;t.UP(i),t.uP(e),this.k5t=t,this.E5t=void 0,this.nO(t)}b4t(t){void 0===this.k5t&&(this.E5t=t)}I3t(){this.E5t=void 0,void 0!==this.k5t&&(this.U3t.vP=this.I5t,this.U3t.OP=this.OP,this.U3t.oP=this.oP,this.nO(this.U3t),this.k5t=void 0)}Yx(){var t;return null!=(t=this.Wz)?t:super.Yx()}Zx(){var t;return null!=(t=this.nq)?t:super.Zx()}Qq(t){void 0===this.Zx()&&(this.nq=t,this.Wz=ar(t),this.So(new el(t)))}eI(t){return void 0===this.k5t&&this.S5t.l4t(t)}Wnt(t,i){try{const e=new m3(t,this);e.uN=i(e.Ca),this.S5t.znt(e),this.P5t.push(e),t!==FC.UPLYNK&&(this.C5t=new w3(this))}catch(i){this.S5t.So(new $h($c.GENERAL,'Error while constructing ad integration "'+t+'": '+i+'"'))}}gP(t){var i;(null==(i=this.C5t)?void 0:i.inAdBreak)||super.gP(t)}async kn(){var t;for(const t of this.P5t)await t.kn().catch(gs);await this.S5t.kn(),this.I3t(),null==(t=this.C5t)||t.destroy(),this.C5t=void 0,await super.kn()}constructor(t,i){super(t),this.S5t=void 0,this.U3t=void 0,this.P5t=[],this.k5t=void 0,this.E5t=void 0,this.nq=void 0,this.Wz=void 0,this.C5t=void 0,this.I5t=1,this.U3t=t,this.S5t=new s3(this),this.S5t.g4t.$3t(i,t,this,t.Cd)}};Ma(t=>new y3(t,va.Bg),da.Ant),r(),r(),r();var b3=zs.ru&&zs.Q_<12,A3=class extends VF{get zx(){return this.Gx()}set zx(t){this.Xx(t)}nnt(){return this.oa.nnt()}get ct(){return this.Nd()}get $x(){return this.eO}get iP(){return this.iO}get kP(){return this.EP()}get VP(){return this.cq}get u4t(){return this.R5t}get ht(){return this.tO}get w4t(){return this.A4t.T5t===this}Ux(){return Uo.rL()._s()}Hx(){}Wx(t){}_P(){return 1}gP(t){}mP(){return new Uo([0,this.zx])._s()}PP(){return!1}RP(){return this.Gl}BP(){return this.sO}ds(){return this.qP().ds}qP(){return this.ha}Ea(){}async kn(){this.Vo(),this.tO.kn(),this.sO.kn(),this.Gl.kn(),this.R5t.kn(),this.oa.mn(d.Pw,this.Rs)}D5t(){b3&&this.N5t(),this.w4t||this.A4t.x5t(this)}I3t(){this.w4t&&(b3&&this.B5t(),zs.Tg&&this.xe.querySelectorAll("video[src]").forEach(t=>{t.src=""}),zd.Zs.Ep&&this.oa.tI(),this.A4t.I3t())}N5t(){this.M5t||(s.addEventListener("blur",this.L5t),s.addEventListener("focus",this.O5t),this.M5t=!0)}B5t(){s.removeEventListener("blur",this.L5t),s.removeEventListener("focus",this.O5t),this.M5t=!1}F5t(){requestAnimationFrame(()=>this.oa.we())}constructor(t,i){super(t,!0),this.A4t=void 0,this.M5t=void 0,this.sO=void 0,this.tO=void 0,this.Gl=void 0,this.eO=void 0,this.iO=void 0,this.R5t=void 0,this.ha=void 0,this.cq=void 0,this.L5t=void 0,this.O5t=void 0,this.A4t=i,this.M5t=!1,this.sO=new Ws,this.tO=new Ws,this.Gl=new bc,this.eO=new VS,this.iO=new Gk,this.R5t=new tl,this.ha=new ks,this.cq=new Jo,this.L5t=()=>{this.oa.be()},this.O5t=()=>{this.F5t()},this.oa.wn(d.Pw,this.Rs)}};r(),r();var S3=0,T3="theoplayer-wrapper",k3=class t{get U5t(){return this.V5t}get H5t(){return this.W5t}get q5t(){return 1===this.W5t.length&&E1(this.W5t[0].sources.type)}get z5t(){return this.G5t}X5t(t){const i=this.j5t===t.timeOffset;return!this.Q5t&&i}get K5t(){return this.Y5t}get J5t(){return C1(this.Z5t)&&!this.Q5t}get j5t(){return this.Z5t}get dd(){return this.$5t}t6t(){if(S(this.$5t)){let t=this.j5t;if(void 0===t)return void(this.$5t=0);if("string"==typeof t&&C1(t)){const i=this.oa.Nd();S(i)||i===1/0||(t=x0(t)*i)}S(t)||(this.$5t=t)}}get i6t(){return this.e6t}set i6t(t){this.e6t=t}get s6t(){return this.n6t}set s6t(t){this.n6t=t,this.r6t=!1}get h6t(){return this.o6t}a6t(t){this.o6t.push(t)}u6t(){if(!this.Q5t){let t,i,e=this.V5t===Hu.Mnt&&void 0===this.c6t&&1===this.W5t.length;const s=this.W5t[0];if(!e&&1===this.W5t.length){const t=zd.Dh(s.sources.src).searchParams.get("output");t&&t.toLowerCase().indexOf("vmap")>-1&&(e=!0,void 0!==this.c6t&&uh("Do not set a timeOffset for VMAP ad sources. VMAP ads have their own offsets included."))}if(E1(s.sources.type)||e)t=s.sources.src;else{if(S(this.oa.Nd())&&"end"===this.d6t())return;i=this.l6t()}let n=this.oa.Nd();(S(n)||n===1/0)&&(n=-3),this.Q5t={f6t:this.oa.xe.offsetWidth,v6t:this.oa.xe.offsetHeight,_6t:this.oa.xe.offsetWidth,g6t:this.oa.xe.offsetHeight,p6t:this.Yst,m6t:this.Iz,w6t:t,y6t:i,b6t:s.omidAccessModeRules,A6t:n}}return this.Q5t}l6t(){return''+this.W5t.map((t,i)=>this.S6t(t.sources,i)).join("\n")+""}S6t(t,i){const e=this.d6t(),s=t.src;return'"}d6t(){if(0===this.j5t)return"start";if(this.j5t===1/0)return"end";const t=this.j5t;if("string"==typeof t&&C1(t)){const i=x0(t)*this.oa.Nd();return iu.h$t(i)}return iu.h$t(this.j5t||0)}T6t(t){this.W5t.push(t)}k6t(t){const i=T3+"-"+this.JI+"-";for(const e of t)if(Xt(e,i)){const t=Number(e.slice(i.length));if(!S(t)&&t>=0&&tt.dd&&this.P6t.dd!==t.dd}N6t(t){if(t.length)return t.sort((t,i)=>t.dd-i.dd)[0]}B6t(){if(this.Unt.length)return this.N6t(this.M6t(this.t.Gx()))}L6t(){if(!(void 0!==this.R6t&&this.R6t>=0))return this.Unt.filter(t=>!t.i6t&&0===t.dd&&t!==this.P6t)[0]}M6t(t){if(!this.O6t&&(this.O6t=!this.Unt.some(t=>S(t.dd)),!this.O6t))return[];const i=this.Unt.filter(i=>!i.i6t&&(i.q5t||!S(i.dd)&&t<=i.dd));return void 0===this.R6t?i:i.filter(t=>t.q5t||void 0===t.j5t||t.dd>this.R6t)}constructor(t){this.I6t=void 0,this.R6t=void 0,this.O6t=!1,this.I6t=t,this.R6t=void 0}},x3=function(t){return t[t.F6t=0]="F6t",t[t.U6t=1]="U6t",t[t.V6t=2]="V6t",t}({}),P3=class{GP(){this.ko=!0,this.H6t&&this.W6t()}q6t(t,i){this.z6t(t,i);const e=hh(this.Unt,i=>i.X5t(t));if(e)e.T6t(t);else{var s;const e=new k3(t,i,this.oa,null==(s=t.replaceContent)||s);this.N4t.push(e),2===this.G6t&&this.X6t.c5t(e.dd,e,e.j5t),this.j6t(i,e)}}get C6t(){return this.Q6t}get Unt(){return this.N4t}get t(){return this.oa}get nXt(){return Boolean(this.Ypt)}get G6t(){return this.K6t}Y6t(){if(_e(this.Unt,this.P6t),this.P6t){for(const t of this.P6t.h6t)this.X6t.J6t();this.P6t=void 0}}Z6t(){for(const t of this.N4t)for(const i of t.h6t)this.X6t.$6t(i,!0);Wt(this.N4t)}async t8t(t){this.Y6t(),this.i8t=!0,this.P6t=t,this.e8t=t.dd,this.Ypt=this.s8t(t),await this.Ypt,this.Ypt=void 0}async s8t(t){await this.n8t(t);const i=t.u6t();if(!i)return this.i8t=!1,void(this.P6t=void 0);const e=this.Q6t.r8t(i);t.i6t=!0;try{await e,t.U5t===Hu.Bnt&&this.Q6t.h8t()}catch(t){0,this.P6t=void 0,await this.W6t()}}async n8t(t){if(t.oP=this.A4t.oP,!this.A4t.vO)return void(t.vO=!1);switch(await this.Zst.XK(this.A4t.oP)){case"all":case"muted":t.vO=!0;break;case"none":t.vO=!1}}o8t(){var t;return null!=(t=this.a8t.L6t())?t:this.a8t.B6t()}async W6t(){if(this.P6t&&!this.P6t.K5t)return this.Ypt;const t=this.o8t();t&&await this.t8t(t)}get P6t(){return this.u8t}set P6t(t){this.u8t=t}get i8t(){return this.c8t}set i8t(t){this.c8t=t}hr(){this.Y6t(),Wt(this.N4t),this.e8t=0,this.P6t=void 0,this.Ypt=void 0,this.i8t=!1}s6t(){this.i8t=!1,this.P6t&&(this.P6t.s6t=!0)}async j6t(t,i){t===Hu.Bnt&&this.ko&&this.a8t.D6t(i)&&!this.nXt&&"linear"!==this.Q6t.V4t&&(!this.P6t||this.P6t&&this.P6t.i6t)&&(await Promise.resolve(),await this.t8t(i))}x6t(){this.P6t&&this.P6t.x6t()}get d8t(){if(this.nXt||this.i8t)return!1;if(this.P6t&&!this.P6t.K5t)return!1;return!!this.N4t.filter(t=>this.P6t!==t).length&&Boolean(this.o8t())}async l8t(){if(!this.d8t)return void 0;const t=this.o8t();t&&await this.t8t(t)}z6t(t,i){const e=t.sources.type,s=i===Hu.Mnt&&void 0===t.timeOffset,n=E1(e)||s?1:2;n!==this.K6t&&(this.K6t=n,this.Z6t(),this.Q6t.j0t&&!this.nXt&&"linear"!==this.Q6t.V4t&&(this.Q6t.j0t.zg(),this.P6t=void 0,this.Ypt=void 0),this.e8t=0,this.H6t=!0)}S4t(t){this.a8t.S4t(t)}kn(){this.oa.mn(d.Cw,this.vX)}constructor(t,i,e,s,n){this.Q6t=void 0,this.N4t=void 0,this.H6t=void 0,this.ko=void 0,this.oa=void 0,this.A4t=void 0,this.u8t=void 0,this.e8t=void 0,this.a8t=void 0,this.Zst=void 0,this.K6t=0,this.Ypt=void 0,this.X6t=void 0,this.c8t=!1,this.vX=()=>{const t=this.N4t.filter(t=>t.J5t);for(const i of t){i.t6t();const t=i.j5t;this.X6t.f8t(t,i.dd)}this.ko&&this.d8t&&this.W6t()},this.N4t=[],this.Q6t=t,this.ko=!1,this.H6t=!1,this.oa=i,this.A4t=e,this.P6t=void 0,this.e8t=0,this.a8t=new E3(this),this.Zst=s,this.X6t=n,this.oa.wn(d.Cw,this.vX)}};r(),r();var Nc=function(t){return t.v8t="contentResumeRequested",t._8t="contentPauseRequested",t.g8t="click",t.Cw="durationChange",t.p8t="expandedChanged",t.m8t="start",t.w8t="impression",t.Yz="pause",t.y8t="resume",t.b8t="adProgress",t.A8t="adBuffering",t.S8t="firstQuartile",t.XJt="midpoint",t.T8t="thirdQuartile",t.jJt="complete",t.k8t="userClose",t.E8t="linearChanged",t.x8t="loaded",t.P8t="adCanPlay",t.I8t="adMetadata",t.C8t="adBreakReady",t.R8t="interaction",t.D8t="allAdsCompleted",t.N8t="skip",t.B8t="skippableStateChanged",t.M8t="log",t.L8t="viewableImpression",t.O8t="volumeChange",t.F8t="mute",t}({});r();var I3=function(t){return t.U8t="adError",t}({});r();var C3=function(t){return t[t.V8t=-1]="V8t",t[t.H8t=-1]="H8t",t[t.W8t=-1]="W8t",t[t.q8t=101]="q8t",t[t.z8t=102]="z8t",t[t.G8t=200]="G8t",t[t.X8t=201]="X8t",t[t.j8t=202]="j8t",t[t.Q8t=300]="Q8t",t[t.K8t=301]="K8t",t[t.Y8t=302]="Y8t",t[t.J8t=303]="J8t",t[t.Z8t=400]="Z8t",t[t.$8t=402]="$8t",t[t.t9t=403]="t9t",t[t.i9t=405]="i9t",t[t.e9t=500]="e9t",t[t.s9t=501]="s9t",t[t.n9t=-1]="n9t",t[t.r9t=503]="r9t",t[t.h9t=602]="h9t",t[t.o9t=900]="o9t",t[t.a9t=901]="a9t",t[t.u9t=1005]="u9t",t[t.c9t=1007]="c9t",t[t.d9t=1009]="d9t",t[t.l9t=1010]="l9t",t[t.f9t=1011]="f9t",t[t.v9t=1012]="v9t",t[t._9t=1013]="_9t",t[t.g9t=1020]="g9t",t[t.p9t=1021]="p9t",t[t.m9t=1101]="m9t",t[t.w9t=1204]="w9t",t[t.y9t=1205]="y9t",t[t.b9t=1300]="b9t",t[t.A9t=-1]="A9t",t[t.S9t=-1]="S9t",t[t.T9t=-1]="T9t",t[t.k9t=-1]="k9t",t}({}),R3=function(t){return t.E9t="adLoadError",t.x9t="adPlayError",t}({});function D3(t,i){if(t===Nc.b8t){const t=i;return{P9t:t.adBreakDuration,I9t:t.adPosition,zx:t.currentTime,ct:t.duration,C9t:t.totalAds}}return i}function N3(t){switch(t){case google.ima.AdError.Type.AD_LOAD:return R3.E9t;case google.ima.AdError.Type.AD_PLAY:return R3.x9t}}function B3(t){return Mc(t)&&jd(t.getVastErrorCode)}function M3(t){const i=t.getInnerError(),e=i&&B3(i)?M3(i):void 0;return{Iy:t.getMessage(),TZt:t.getErrorCode(),R9t:t.getVastErrorCode(),Km:N3(t.getType()),D9t:e}}function L3(t){if(it(t))return t}r(),r();var O3=class extends Ne{N9t(t){this.Q6t.So(t)}B9t(t){this.Q0t=t,this.Q0t.wn(I3.U8t,this.M9t),this.Q0t.wn(Nc._8t,this.L9t),this.Q0t.wn(Nc.v8t,this.O9t),this.Q0t.wn(Nc.D8t,this.F9t),this.Q0t.wn(Nc.m8t,this.U9t),this.Q0t.wn(Nc.jJt,this.V9t),this.Q0t.wn(Nc.N8t,this.H9t),this.Q0t.wn(Nc.k8t,this.W9t),this.Q0t.wn(Nc.g8t,this.q9t),this.Q0t.wn(Nc.P8t,this.z9t),this.Q0t.wn(Nc.Yz,()=>{this.Q6t.lP||(this.Q6t.G9t(!0),this.Q6t.So(new Si(this.Q6t.zx))),this.X9t(!0)}),this.Q0t.wn(Nc.y8t,()=>{this.Q6t.lP&&(this.Q6t.G9t(!1),this.Q6t.So(new vt(this.Q6t.zx)))}),this.Q0t.wn(Nc.F8t,()=>{const i=t.FP();i>=0&&this.j9t(i)}),this.Q0t.wn(Nc.O8t,()=>{const i=t.FP();i>=0&&this.j9t(i)}),this.Q0t.wn(Nc.I8t,t=>{this.K9t.Q9t(t.type)}),this.Q0t.wn(Nc.Cw,t=>{t.jnt&&this.Y9t(t.jnt.ct)}),this.Q0t.wn(Nc.M8t,async t=>{const i=t.J9t.adError,e=B3(i)?M3(i):void 0;e&&(this.Z9t(e)?await this.$9t(t):this.t7t(e)?await this.i7t(e):this.e7t(e)&&this.s7t(e))}),this.Q0t.wn(Nc.x8t,t=>{if(t.jnt&&(this.Q6t.s6t(),this.K9t.n7t(t.jnt),this.r7t=0,t.jnt.h7t)){var i;const t=this.Q6t.AP,e=Lr.zL;this.Q6t.a5(e);const s=this.Q6t.zx,n=this.Q6t.AP;n!==t&&this.N9t(new ho(s,n)),null==(i=this.Q0t)||i.UP(this.Q6t.o7t()),this.N9t(new Tt(s,e))}}),this.Q0t.wn([Nc.A8t,Nc.w8t,Nc.S8t,Nc.XJt,Nc.T8t],t=>{t.jnt&&this.K9t.a7t(t.jnt,t.type,this.Q6t.zx)}),this.Q0t.wn(Nc.S8t,this.u7t),this.Q0t.wn(Nc.b8t,this.c7t)}async switchToPlayerIfNoNextAd(){if(this.Q0t){const t=this.Q0t.d7t();t&&this.l7t(t)||(this.Q6t.d8t()?await this.Q6t.l8t():(this.Q6t.f7t(),this.oa.lP&&!this.oa.Qx&&this.oa.QP()))}else if(this.Q6t.d8t())await this.Q6t.l8t();else{const t=this.Q6t.lP;this.Q6t.f7t(),t||this.oa.QP()}}l7t(t){const i=t.v7t,e=null==i?void 0:i.C9t;return(null==i?void 0:i.I9t)!==e}vm(){this.Q6t.Dc&&(p(this.Q6t.Dc),this.Q6t.Dc=null)}e7t(t){return t.Km===R3.E9t}t7t(t){return t.Km===R3.x9t}Z9t(t){return t.TZt===C3.d9t}async i7t(t){var i;(this.s7t(t),this._7t(t))&&(this.Q6t.g7t.i8t=!1,null==(i=this.Q6t.g7t.P6t)||i.x6t(),await this.switchToPlayerIfNoNextAd())}_7t(t){var i;if(F3(t))return!0;if(this.Q6t.nrt)return!1;const e=[C3.Z8t,C3.a9t,C3.p9t,C3.y9t];return!(Ct(e,t.TZt)||Ct(e,null==(i=t.D9t)?void 0:i.TZt))}s7t(t){this.Q6t.v5t(t)}async p7t(){this.K9t.J6t(),this.Q6t.x6t(),"nonlinear"===this.Q6t.V4t&&(this.K9t.m7t(-1,!1),this.Q6t.w7t(void 0)),"nonlinear"!==this.Q6t.V4t&&"none"!==this.Q6t.V4t||this.Q6t.d8t()&&await this.Q6t.l8t(),this.Q6t.y7t(),this.Q6t.w4t?this.Q6t.I3t():this.b7t()&&this.oa.So(new ur(this.oa.Gx()))}b7t(){return this.Q6t.A7t&&!this.Q6t.S7t&&this.oa.Qx}setCountdownTimer(){this.vm(),this.Q6t.Dc=v(()=>this.X9t(),250)}async $9t(t){void 0!==t.jnt&&(this.Q6t.g7t.i8t=!1,this.Q6t.x6t(),this.Q6t.d8t()?await this.Q6t.l8t():this.Q6t.G9t(!0))}Y9t(t){this.Q6t.ct!==t&&t>=0&&(this.Q6t.F4(t),this.N9t(new zr(this.Q6t.ct)))}j9t(t){this.Q6t.o7t()!==t&&(0===t?this.Q6t.T7t(t,!0,!1):this.Q6t.T7t(t,!1,!1))}async k7t(){this.Q6t.E7t&&void 0!==this.oa.Yx()&&(this.x7t=new Zc,await Cu(this.oa.Ta(this.oa.nu(),this.x7t.Yg),this.x7t),this.P7t&&this.oa.Xx(this.P7t),this.P7t=void 0)}X9t(t){if(this.Q0t){const t=this.Q0t.I7t();t>this.Q6t.ct&&this.Y9t(_.round(t))}const i=this.Q6t.zx;(t||!this.Q6t.lP&&i!==this.Q6t.C7t)&&(this.Q6t.So(new B(i,void 0)),this.Q6t.C7t=i)}hr(){this.x7t&&(this.x7t.Zg(),this.x7t=void 0),this.R7t=!1,this.r7t=0}kn(){this.hr(),this.Vo()}constructor(t,i,e){super(),this.Q6t=void 0,this.oa=void 0,this.K9t=void 0,this.R7t=void 0,this.x7t=void 0,this.P7t=void 0,this.Q0t=void 0,this.r7t=void 0,this.u7t=void 0,this.c7t=void 0,this.M9t=void 0,this.F9t=void 0,this.U9t=void 0,this.V9t=void 0,this.H9t=void 0,this.W9t=void 0,this.q9t=void 0,this.z9t=void 0,this.L9t=void 0,this.O9t=void 0,this.Q6t=t,this.oa=i,this.K9t=e,this.R7t=!1,this.x7t=void 0,this.P7t=void 0,this.r7t=0,this.u7t=t=>{if(!t.jnt||!t.jnt.v7t)return;const i=t.jnt.v7t;this.K9t.d5t(i.qOt,i.C9t,i.G0t)},this.c7t=t=>{var i,e,s;if(this.r7t>=5)return;this.r7t++;const n=t.J9t;if(!function(t){return Mc(t)&&void 0!==t.P9t&&void 0!==t.C9t}(n))return;const r=null==(s=this.Q0t)||null==(e=s.d7t())||null==(i=e.v7t)?void 0:i.qOt;void 0!==r&&this.K9t.d5t(r,n.C9t,n.P9t)},this.M9t=async t=>{t.J9t.D7t&&await this.i7t(t.J9t.D7t)},this.F9t=async()=>{this.R7t=!0,this.Q6t.x6t(),await this.O9t()},this.U9t=t=>{if(!t.jnt)return;const i=t.jnt;this.Q6t.w7t(i),this.Q6t.be(),this.Q6t.N7t(),this.Q6t.B7t=!0,this.K9t.M7t(i);const e=i.ct;if(this.Y9t(e),i.h7t){const t=this.Q6t.zx,i=this.Q6t.AP;this.Q6t.a5(Lr.XL),this.N9t(new M(t,i)),this.N9t(new Is(t,i)),this.N9t(new Zi(t,i)),this.Q6t.lP||this.N9t(new mo(this.Q6t.zx)),this.setCountdownTimer(),this.X9t(!0)}else this.Q6t.I3t(),this.oa.be(),this.Q6t.lP||this.oa.QP()},this.V9t=t=>{var i;if(!t.jnt)return;const e=t.jnt;if(this.vm(),this.K9t.m7t(this.Q6t.ct,e.h7t),this.Q6t.AP!==Lr.zL){const t=Lr.zL;this.Q6t.a5(t);const i=this.Q6t.zx;this.N9t(new ho(i,t))}this.Y9t(NaN),this.Q6t.B7t=!1,null==(i=this.Q0t)||i.UP(this.Q6t.o7t())},this.H9t=t=>{t.jnt&&(this.V9t(t),this.K9t.H9t(t.jnt,this.Q6t.zx,this.Q6t.ct))},this.W9t=t=>{t.jnt&&(this.K9t.m7t(-1,t.jnt.h7t),this.Q6t.x6t(),!t.jnt.h7t&&this.Q6t.d8t()&&this.Q6t.l8t())},this.q9t=t=>{t.jnt&&(t.jnt.h7t?this.Q6t.jP():this.oa.jP())},this.z9t=()=>{var t;(this.Q6t.B7t=!0,this.Q6t.L7t)&&(null==(t=this.Q0t)||t.jP(),this.Q6t.L7t=!1)},this.L9t=t=>{var i;if(!t.jnt)return;this.Q6t.E7t&&(this.P7t=this.oa.Gx(),this.oa.$P(),this.oa.WP=!0),this.Q6t.O7t=!0;const e=t.jnt;this.K9t.Ed(e);const s=e.ct;this.Q6t.w7t(e),this.Y9t(s),this.Q6t.G9t(!1),this.Q6t.be(),this.Q6t.D5t(),this.Q6t.E7t||this.oa.we(),this.oa.jP(),this.Q6t.F7t(e);0===(null==(i=e.v7t)?void 0:i.qOt)||this.Q6t.So(new SP(this.Q6t.zx))},this.O9t=async t=>{const i=null==t?void 0:t.jnt;this.Q6t.O7t=!1,"linear"===this.Q6t.V4t&&this.K9t.Bd(),i&&i.ct>=0&&this.Y9t(i.ct),this.oa.Nd()===1/0&&this.Q6t.U7t(),this.Q6t.B7t=!1,this.R7t&&await this.p7t(),this.Q6t.G9t(!0);try{await this.k7t()}catch(t){return void(Ce(t)||this.So(new Fn(t)))}if(this.Q6t.I3t(),this.Q6t.we(),this.oa.Qx||this.oa.QP(),i&&this.Q6t.w7t(i),this.Q6t.A7t){if(this.Q6t.E7t){var e;const t=this.oa.zP(),i=null==(e=this.oa.bt)?void 0:e.src;t&&i&&(t.src=i)}this.Q6t.S7t=!0}this.oa.WP=!1,this.Q6t.d8t()&&await this.Q6t.l8t()}}};function F3(t){var i,e;return t.R9t===C3.J8t||(null==(i=t.D9t)?void 0:i.R9t)===C3.J8t||t.TZt===C3.d9t||(null==(e=t.D9t)?void 0:e.TZt)===C3.d9t}r(),r();var U3=class extends tn{get u$t(){return we.v1t}constructor(t,i,e){super(t),this.V7t=void 0,this.H7t=void 0,this.V7t=i,this.H7t=e}};r(),r(),r();var V3=class extends gn{set W7t(t){this.q7t=t}get W7t(){return this.q7t}get u$t(){return we.so}a1t(){var t;return null==(t=this.z7t)?void 0:t.QKt}get G7t(){var t;return null==(t=this.z7t)?void 0:t.FYt}get wYt(){var t;return null==(t=this.z7t)?void 0:t.wYt}get _N(){var t;return null==(t=this.z7t)?void 0:t._N}get gq(){var t;return null==(t=this.z7t)?void 0:t.gq}get X7t(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.X7t)?i:[]}get j7t(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.j7t)?i:[]}get Q7t(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.Q7t)?i:[]}xa(){return function(t,i){return Gi(t,{bitrate:0,contentType:void 0,mediaUrl:void 0,traffickingParameters:void 0,traffickingParametersString:void 0,universalAdIds:[],get description(){return i._N},get apiFramework(){return i.G7t},get creativeId(){return i.wYt},get title(){return i.gq},get wrapperAdIds(){return i.X7t},get wrapperAdSystems(){return i.j7t},get wrapperCreativeIds(){return i.Q7t}})}(La(this),this)}K7t(t){this.z7t=t;const i=H3(t);this.O4t(t.fJt,t.Y7t,t.J7t,t.ct,i,-1)}constructor(t,i){super(t,i),this.q7t=0,this.z7t=void 0}};function H3(t){return t.sYt.map(t=>new h3(t))}var W3=class extends gn{xa(){return function(t,i){return Gi(t,{get adSystem(){return i.a1t()},get apiFramework(){return i.G7t},get bitrate(){return i.z9},get contentType(){return i.GT},get creativeId(){return i.wYt},get description(){return i._N},get mediaUrl(){return i.PJt},get title(){return i.gq},get traffickingParameters(){return i.Z7t},get traffickingParametersString(){return i.$7t},get wrapperAdIds(){return i.X7t},get wrapperAdSystems(){return i.j7t},get wrapperCreativeIds(){return i.Q7t},get universalAdIds(){return i.rYt}})}(La(this),this)}K7t(t){this.z7t=t,this.O4t(t.fJt,t.Y7t,t.J7t,t.ct,H3(t),t.tti),this.H4t=t.h7t?Hs.BZt:Hs.L4t}get u$t(){return we.v1t}a1t(){return this.z7t?cl(this.z7t.QKt):void 0}get G7t(){return this.z7t?cl(this.z7t.FYt):void 0}get z9(){return this.z7t?this.z7t.iti:0}get GT(){return this.z7t?cl(this.z7t.GT):void 0}get wYt(){return this.z7t?cl(this.z7t.wYt):void 0}get eti(){return this.z7t?cl(this.z7t.eti):void 0}get _N(){var t;return null==(t=this.z7t)?void 0:t._N}get PJt(){var t;const i=null==(t=this.z7t)?void 0:t.PJt;return it(i)?i:this.IJt}set PJt(t){this.IJt=t}get gq(){var t;return null==(t=this.z7t)?void 0:t.gq}get Z7t(){return this.z7t?cl(this.z7t.Z7t):void 0}get $7t(){return this.z7t?cl(this.z7t.$7t):void 0}get X7t(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.X7t)?i:[]}get j7t(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.j7t)?i:[]}get Q7t(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.Q7t)?i:[]}get rYt(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.rYt.map(t=>({adIdRegistry:t.sti,adIdValue:t.nti})))?i:[]}constructor(t){super(t,Hs.yk),this.z7t=void 0,this.IJt=void 0}};function cl(t){return null===t?void 0:t}r(),r();var q3=class{get u4t(){return this.K9t.u4t}get r4t(){return this.rti}get w4t(){return this.K9t.w4t}get Fnt(){var t;return null!=(t=this.K9t.Fnt)?t:null}get Lnt(){const t=this.K9t.hti;return t?[t]:[]}get Unt(){return this.K9t.Unt}get Vnt(){return this.K9t.Vnt}qnt(t){this.K9t.qnt(t)}uD(){this.K9t.uD()}Hnt(t){this.K9t.Hnt(t)}kn(){return Promise.resolve()}constructor(t,i){this.K9t=void 0,this.rti=void 0,this.K9t=t,this.rti=i}},z3=class{get oti(){return this.ati}get u4t(){return this.R5t}get w4t(){return this.uti}get hti(){return this.u1t}get Fnt(){return this.w1t}get Unt(){return hs(this.y1t,t=>{if(t.pP)return[];const i=t.Jc;if(t===this.w1t&&void 0!==this.u1t){const t=i.indexOf(this.u1t);if(t>=0)return i.slice(t+1)}return i})}get Vnt(){return this.y1t.filter(t=>!t.pP)}constructor(t,i){this.R5t=void 0,this.y1t=void 0,this.u1t=void 0,this.w1t=void 0,this.uti=void 0,this.ati=void 0,this.R5t=t,this.y1t=[],this.uti=!1,this.ati=new q3(this,i)}};r();var G3=class extends oU{xa(){return new X3(this.jnt.Ont())}constructor(t){super("cti",t)}},X3=class extends aU{constructor(t){super("adimpression",t)}};r();var j3=class extends Oi{xa(){return new Q3(this.jnt.Ont())}constructor(t){super("dti"),this.jnt=void 0,this.jnt=t}},Q3=class extends gp{constructor(t){super("adbuffering"),this.ad=void 0,this.ad=t}};r();var K3=class extends Oi{xa(){return new Y3}constructor(){super("lti")}},Y3=class extends gp{constructor(){super("admetadata")}},J3=class t extends z3{fti(t,i){for(let e=0;ers(i.qOt,t,.01))[0]}static yti(t,i){if(i.v7t)return t.Jc[i.v7t.I9t-1]}Ed(t){if(!t.v7t)return;const i=t.v7t,e=this.wti(i.qOt);e&&(Wt(this.mti),this.vti(e,t.h7t))}Bd(){this.Fnt&&this.u4t.So(new Za(this.Fnt)),Wt(this.mti),this.J6t()}M7t(i){if(!this.w1t&&i.v7t){const t=this.wti(i.v7t.qOt);this.vti(t,i.h7t)}if(this.w1t){const e=t.yti(this.w1t,i);if(!e)return;this.h5t(this.w1t,i);const s=i.PJt;it(s)&&!it(e.PJt)&&(e.PJt=s,this.u4t.So(new ch(e))),this.gti(e),this.u4t.So(new nc(this.u1t,e.od.qOt))}else 0}m7t(t,i){if(this.gti(void 0),!i&&this.Fnt){const t=this.Fnt;this.vti(void 0,!1),this.$6t(t)}}n7t(t){const i=t.v7t;if(!i)return;const e=this.wti(i.qOt);if(!e)return;this.d5t(i.qOt,i.C9t,i.G0t);const s=this.h5t(e,t);s&&this.u4t.So(new p2(s))}d5t(t,i,e){const s=this.wti(t);if(!s)return;const n=s.Jc.length;if(i>n){const t=i-n;this.fti(t,s),s.G0t=e,this.u4t.So(new d3(s))}}H9t(i,e,s){if(!this.w1t)return;const n=t.yti(this.w1t,i);if(n){const t=e/s;this.u4t.So(new gu(n,t))}}a7t(i,e,s){if(!this.w1t)return;let n=this.u1t;if(!n){const s=t.yti(this.w1t,i);if(!s||Ct(this.pti,s))return void this.mti.push(e);n=s,this.h5t(this.w1t,i),this.gti(n)}this.Q9t(e,n,s)}Q9t(t,i,e){t===Nc.I8t?this.u4t.So(new K3):t===Nc.w8t&&i?this.u4t.So(new G3(i)):t===Nc.A8t&&i?this.u4t.So(new j3(i)):t===Nc.S8t&&i&&e?this.u4t.So(new ie(i,e)):t===Nc.XJt&&i&&e?this.u4t.So(new xe(i,e)):t===Nc.T8t&&i&&e&&this.u4t.So(new Qs(i,e))}uD(){this._ti.uD()}qnt(t){this._ti.qnt(t)}hr(){const t=Boolean(this.u1t&&this.u1t.V4t===Hs.BZt);this.gti(void 0),this.vti(void 0,t);for(const t of this.y1t)this.$6t(t);Wt(this.y1t),Wt(this.mti),Wt(this.pti)}kn(){this.hr()}Hnt(t){}constructor(t,i){super(t,we.v1t),this._ti=void 0,this.mti=void 0,this.pti=void 0,this._ti=i,this.mti=[],this.pti=[]}};function Z3(t){const i=s.google.ima.settings;t.ads&&t.ads.vpaidMode&&s.google.ima.settings.setVpaidMode(function(t){const i=s.google.ima.ImaSdkSettings.VpaidMode;switch(t){case dk.ENABLED:return i.ENABLED;case dk.INSECURE:return i.INSECURE;case dk.DISABLED:default:return i.DISABLED}}(t.ads.vpaidMode)),i.setPlayerVersion("10.3.0"),i.setPlayerType("THEOplayer"),i.setAutoPlayAdBreaks(!0),i.setDisableCustomPlaybackForIOS10Plus(!zn(t));const e=function(t){var i,e,s;const n=null==(e=t.ads)||null==(i=e.googleIma)?void 0:i.language;if(void 0!==n)return n;const r=null==(s=t.ui)?void 0:s.language;if(Q(r))return r;return}(t);e&&i.setLocale(e)}function zn(t){return zs.ru&&t.allowNativeFullscreen}r(),r();var $3=class{async r8t(t,i){this.y7t(),this.bti.GY(),this.Q0t=await this.Ati.r8t(t,this.Sti,i)}get j0t(){return this.Q0t}set j0t(t){this.Q0t=t}Tti(){var t;null==(t=this.Q0t)||t.Tn()}kti(){var t;null==(t=this.Q0t)||t.kti()}jP(){var t;null==(t=this.Q0t)||t.jP()}uD(){var t;null==(t=this.Q0t)||t.uD()}UP(t){var i;null==(i=this.Q0t)||i.UP(t)}Eti(t){var i;null==(i=this.Q0t)||i.Eti(t)}xti(){return Boolean(this.Q0t&&this.Q0t.d7t())}d7t(){var t;return null==(t=this.Q0t)?void 0:t.d7t()}I7t(){var t;return null==(t=this.Q0t)?void 0:t.I7t()}y7t(){this.Q0t&&(this.Ati.Pti(),this.Q0t.KP(),this.Q0t.zg(),this.Q0t=void 0)}kn(){this.y7t()}constructor(t,i,e){this.bti=void 0,this.Ati=void 0,this.Sti=void 0,this.Q0t=void 0,this.bti=t,this.Ati=e,this.Sti=i}},t4=class t extends A3{get o4t(){return this.X6t.oti}get Iti(){return this.X6t}get g7t(){return this.I6t}get E7t(){return zn(this.GJ)}Cti(t,i,e){i===Hu.Mnt&&void 0!==e&&(this.y4t=e),this.I6t.q6t(t,i)}static get r4t(){return we.v1t}get r4t(){return t.r4t}get Rti(){return this.GJ.ads.preload===fk.MIDROLL_AND_POSTROLL}qnt(t){const i=this.Dti();for(const e of i)P0(e.sources,e.timeOffset)||t.W6(e,Hu.Bnt,!1)}Dti(){const t=[],{Lnt:i,Unt:e}=this.o4t,s=[];for(const n of i.concat(e)){const i=n.od.H7t;if(Ct(s,i.JI))continue;const e=i.k6t(n.X7t);e>=0?t.push(...i.H5t.slice(e)):t.push(...i.H5t),s.push(i.JI)}for(const i of this.I6t.Unt)i.i6t||t.push(...i.H5t);return Cc(t)}set V4t(t){this.H4t=t}get V4t(){return this.H4t}get j0t(){return this.Nti.j0t}set j0t(t){this.Nti.j0t=t,this.Bti=!1}Gx(){const t=this.Nti.I7t();return t?S(this.ct)||t<0?0:this.ct-t:0}Xx(t,i){}Nd(){return this.Zb||NaN}F4(t){this.Zb=t}aP(){return this.oa.oP}uP(t){this.T7t(this.OP,t,!0)}fP(){return this.Cz}G9t(t){this.Cz=t}get B7t(){return this.Mti}set B7t(t){this.Mti=t}get nrt(){return this.y4t}get A7t(){return this.Lti}get L7t(){return this.Oti}set L7t(t){this.Oti=t}get S7t(){return this.Fti}set S7t(t){this.Fti=t}NP(){var t,i;return null!=(i=null==(t=this.Nti.d7t())?void 0:t.J7t)?i:0}LP(){var t,i;return null!=(i=null==(t=this.Nti.d7t())?void 0:t.Y7t)?i:0}Ox(){return[]}S4t(t){this.R6t=t,this.I6t.S4t(t)}h8t(){!this.Bti&&this.j0t&&(this.Nti.Tti(),this.Bti=!0)}w7t(t){this.V4t=t?t.h7t?"linear":"nonlinear":"none"}EP(){return Uo.rL()._s()}FP(){return this.oa.OP}UP(t){this.T7t(t,this.oP,!0)}o7t(){return this.oa.oP?0:this.oa.OP}T7t(t,i,e){const s=this.oa.OP!==t||this.oa.oP!==i;s&&(this.oa.OP=t,this.oa.oP=i),e&&this.Nti.UP(this.o7t()),s&&this.So(new Wi(this.zx,this.OP))}Kx(){return!1}Yx(){if(this.Uti&&this.y4t)return this.Uti}Zx(){if(this.Vti&&this.y4t)return this.Vti}TP(){return this.o5}a5(t){this.o5=t,this.So(new Ka(this.zx,t))}get O7t(){return this.Hti}set O7t(t){this.Hti=t}GP(){this.oa.mn(d.uo,this.Wti),this.ko||(this.ko=!0,this.I6t.GP(),this.N7t())}async QP(){if(this.qti)return;this.zti.Zg(),this.zti=new Zc;const t=this.lP;this.G9t(!1),this.So(new vt(this.zx)),this.Nti.xti()||(this.E7t||this.oa.we(),this.So(new SP(this.zx))),this.B7t||(this.L7t=!1);const i=Boolean(this.j0t);this.qti=this.I6t.W6t();try{await this.qti}finally{this.qti=void 0}try{fr(this.zti.Yg)}catch(t){return}if(this.ko||this.Wti(),!this.Uti||!this.y4t)if(this.j0t){if(t)if(i)try{fr(this.zti.Yg),this.Nti.kti(),this.So(new mo(this.zx))}catch(t){return}else this.h8t()}else this.y4t||(this.I3t(),this.A4t.QP())}jP(){this.lP||(this.G9t(!0),this.So(new Si(this.zx))),this.zti.Zg(),this.B7t?this.Nti.jP():this.L7t=!0}uD(){this.Nti.uD()}y7t(){this.j0t&&(this.Nti.y7t(),this.V4t="none",this.Bti=!1)}async KP(){var t;this.C7t=0,this.I6t.hr(),this.zti.Zg(),this.G9t(!0),this.Lti=!1,this.Fti=!1,this.B7t=!1,this.X6t.hr(),this.y7t(),this.f7t(),null==(t=this.Sti)||t.hr(),this.L7t=!1,this.Ati.zg()}be(){this.bti.be(),this.E7t&&this.oa.be()}we(){this.bti.we()}Gti(){return Boolean(this.j0t)&&Ct(this.j0t.Xti(),-1)&&!this.Lti}s6t(){this.I6t.s6t()}d8t(){return this.I6t.d8t}x6t(){this.I6t.x6t()}l8t(){return this.I6t.l8t()}l4t(t){if(this.Gti()){if(t.type===d.jw&&this.oa.Qx)return!0;if(t.type===d.Nw)return this.Lti=!0,this.Ati.Pti(),!0}return!1}async r8t(t){try{this.y7t();const i=this.jti();await this.Nti.r8t(t,i),this.Bti=!1,this.Qti(this.j0t)}catch(t){this.Kti.i7t(t)}}Qti(t){if(t.UP(this.o7t()),this.I6t.G6t===x3.U6t){const i=t.Xti();if(i.length)for(const t of i)this.X6t.c5t(t,this.I6t.P6t);else this.X6t.c5t(this.I6t.P6t.dd,this.I6t.P6t)}this.Kti.hr(),this.Kti.B9t(t)}zP(){if(this.j0t&&this.E7t&&this.Nti.xti())return this.oa.zP()}qP(){return this.E7t&&this.w4t?this.oa.Ma:super.qP()}jti(){const t=!!(this.I6t.G6t===x3.U6t)&&this.Rti;let i,e;void 0!==this.GJ.ads.googleIma.uiElements?i=this.GJ.ads.googleIma.uiElements:this.GJ.ads.showCountdown||(i=[]),void 0!==this.GJ.ads.allowedMimeTypes&&(e=this.GJ.ads.allowedMimeTypes);return{Yti:e,Jti:i,Zti:t,z9:this.GJ.ads.googleIma.bitrate,$ti:void 0,tii:this.R6t}}N7t(){if(this.j0t){const t=this.jti();this.Nti.Eti(t)}}v5t(t){F3(t)||(this.Uti=new mu(Mi.ADVERTISEMENT_ERROR,t.Iy),this.Vti=new as(me.AD_ERROR,"There was a problem playing ads.",this.Uti)),this.u4t.So($h.f4t(t))}f7t(){this.w4t&&(this.oa.be(),this.I3t(),this.we())}U7t(){var t;if(this.oa.Gx()===1/0||0===this.oa.EP().length)return;(null==(t=this.I6t.P6t)?void 0:t.z5t)&&-1!==this.eii&&(this.oa.Xx(this.oa.Gx()+this.eii),this.eii=-1)}F7t(t){var i,e;this.eii=null!=(e=null==(i=t.v7t)?void 0:i.G0t)?e:-1}I3t(){super.I3t(),this.oa.be(),this.E7t&&!this.oa.Qx&&this.oa.QP()}F5t(){this.E7t||super.F5t()}async kn(){this.Kti.mn(hc.ma,this.sii),await super.kn(),this.y7t(),this.Nti.kn(),this.Ati.mn("nii",this.rii),this.Ati.zg(),this.bti.zg(),this.I6t.kn(),this.Kti.kn()}constructor(t,i,e,s,n,r,h){super(t,i),this.ko=!1,this.Sti=void 0,this.Cz=void 0,this.o5=void 0,this.Ati=void 0,this.bti=void 0,this.Dc=void 0,this.Zb=void 0,this.Lti=void 0,this.Fti=void 0,this.y4t=!1,this.Uti=void 0,this.Vti=void 0,this.I6t=void 0,this.Kti=void 0,this.eii=-1,this.H4t="none",this.GJ=void 0,this.qti=void 0,this.Hti=!1,this.X6t=void 0,this.Bti=!1,this.zti=new Zc,this.R6t=void 0,this.Mti=!1,this.Oti=!1,this.Nti=void 0,this.rii=t=>{this.u4t.So(t)},this.sii=t=>{this.Uti=new mu(Mi.ADVERTISEMENT_ERROR,"Error while recovering from failed IMA ad.",t.error.message),this.Vti=$k(this.Uti)},this.C7t=NaN,this.Wti=()=>{this.ko||this.GP()},this.GJ=e,this.Cz=!0,this.Zb=NaN,this.o5=Lr.zL,this.Lti=!1,this.Fti=!1,this.X6t=new J3(this.u4t,this),this.Kti=new O3(this,this.oa,this.X6t),this.Kti.wn(hc.ma,this.sii),this.oa.wn(d.uo,this.Wti),this.I6t=new P3(this,this.oa,this.A4t,s,this.X6t),this.Sti=h,this.Ati=r,this.bti=n,this.Nti=new $3(n,h,r),this.we(),this.Ati.wn("nii",this.rii)}};r();var i4=class{registerWebImaAdPlayerConstructor(t){this.hii=t}createAdPlayer(t,i,e){return e4()&&this.hii?this.hii(t,i,e):void 0}constructor(){this.hii=void 0}};function e4(){if(Boolean(s.google&&s.google.ima)){return!(1===w.keys(s.google.ima).length&&Boolean(s.google.ima.dai))}return!1}i4.Bg=new i4;var s4=class{get i4t(){return t4.r4t}Qz(t){return t&&t.integration===FC.GOOGLE_IMA}e4t(t,i,e){return i4.Bg.createAdPlayer(t,i,e)}W6(t,i,e,s){e.Cti(t,i,s)}uj(t){const i=x1(t.sources);if(!i)return;const e={integration:FC.GOOGLE_IMA,sources:i,omidAccessModeRules:L3(t.omidAccessModeRules)},s=I1(t.timeOffset);return void 0!==s&&(e.timeOffset=s),e}};va.Bg.Kz(new s4),r(),r(),r(),r();var n4=class extends Oi{xa(){return new r4}constructor(){super("m1t")}},r4=class extends gp{constructor(){super("adloaded")}},fl=-1,h4=class{get K0t(){return this.y1t}get oii(){return this.aii}get Put(){return this.Xp}get uii(){return this.Z5t}get cii(){return this.dii}get dd(){if(S(this.lii)){const t=iu.a$t(this.Z5t,this.$0t.t.Nd());void 0===t||S(t)||(this.lii=t)}return this.lii}fii(){return this.Xph2(t).some(t=>t.iYt))}constructor(t,i){this.y1t=void 0,this.Z5t=void 0,this.aii=void 0,this.e1t=void 0,this.Xp=void 0,this.$0t=void 0,this.lii=void 0,this.dii=void 0,this.y1t=[],this.e1t=!1,this.Z5t=t,this.Xp=0,this.$0t=i,this.lii=NaN,this.dii=!1,this.aii=new c2(this,this.$0t)}},o4=class t extends je{get pii(){let t=0;for(const i of this.mii)i.i1t()||(t+=1);return t}wii(){this.bii.yii()}Tn(){this.No(),this.Aii.wn("Znt",this.bii.Sii)}An(){this.Ro(),this.Aii.mn("Znt",this.bii.Sii),this.C4=this.HO,this.bii.hr();for(const t of this.mii)t.s1t();Wt(this.mii)}No(){this.Tii||(this.oa.wn(d.py,this.kii),this.Tii=!0)}Ro(){this.Tii&&(this.oa.mn(d.py,this.kii),this.Tii=!1)}get Unt(){return this.mii}Eii(){return this.xii(new B(fl,void 0))}Pii(t){return this.Iii(t,0,0).length>0}Cii(t,i){let e,s=0;for(const n of this.mii){if(n.i1t())continue;const r=n.dd;r>=t&&r<=i&&r>=s&&!S(r)&&(e=n,s=e.dd)}return e}Rii(t){return this.xii(new B(t,void 0))}Dii(){if(!this.Nii&&void 0!==this.R6t){this.Nii=!this.mii.some(t=>S(t.dd));for(const t of this.mii)t.dd!==fl&&t.dd<=this.R6t&&!t.i1t()&&t.s1t()}}Bii(t){for(const i of t)i.s1t();this.k5t.Mii(t),0===this.pii&&this.Ro()}Iii(t,i,e){return this.mii.filter(s=>{if(s.i1t())return!1;const n=s.dd;return this.Lii(n,t)||this.Oii(n,t,i,e)})}Lii(t,i){switch(i){case 0:return 0===t;case fl:return t===fl;default:return!1}}Oii(t,i,e,s){if(t<0)return!1;const n=t-i;return-1!==n&&n<=e&&n>=-s}Fii(i){if(i&&i.length>0){for(const e of i){const i=t.E6t(e.qOt);let s=this.Igt(e);-1===s&&(this.Nii=void 0===this.R6t,this.mii.push(new h4(i,this.Uii)),s=this.mii.length-1);this.mii[s].vii(e)}this.No()}}static E6t(t){switch(t){case"start":case"00:00:00":case"00:00:00.000":case"0%":case"0":return"0";case"end":case"100%":return"-1";default:return t}}Igt(i){const e=t.E6t(i.qOt);return tt(this.mii,i=>e===t.E6t(i.uii))}Vii(t){_e(this.mii,t)}S4t(t){this.R6t=t,this.Nii=void 0===t}constructor(t,i,e,s){super(),this.mii=void 0,this.oa=void 0,this.Uii=void 0,this.HO=void 0,this.Aii=void 0,this.C4=void 0,this.k5t=void 0,this.bii=void 0,this.Tii=void 0,this.R6t=void 0,this.Nii=!1,this.kii=t=>Wr(this.xii(t)),this.xii=async t=>{this.Dii();const i=t.currentTime,e=t.currentTime!==fl?this.Cii(this.C4,t.currentTime):this.Iii(t.currentTime,0,0)[0];let s,n;const r=this.oa.Nd()-10;if(n=this.Pii(fl)&&_.ceil(i)===_.ceil(r)?this.Iii(fl,10,0).filter(t=>!t.cii):this.Iii(i,10,0).filter(t=>!t.cii),n.length){const t=(await Promise.all(n.map(t=>t._ii(this.Aii)))).some(t=>!0===t);t&&this.So(new n4),(!t||!this.bii.Hii||n[0].dd{t.stopPropagation(),this.tei()},this.tei=()=>{for(const t of this.Kii)for(const i of t.$Yt)qn(i.uri)},this.A2t=h.createElement("div"),this.A2t.style.display="none",this.Jii=t,this.Zii=i}};function u4(t,i){let e=i;if(!function(t){return"ui"in t}(t))return e;const s=t.ui.language;let n;if(Q(s)){const i=t.ui.languages;if(!i)return e;n=i[s]}else n=s;return n&&n[i]&&(e=n[i]),e}r(),r();var c4={[Hi.vC]:1,[Hi._C]:2,[Hi.gC]:2};function d4(t,i){const e=i?i.map(t=>t.toLowerCase()):i;return Xn(t.filter(t=>{const i=t.type.toLowerCase();return!!hi(e)&&-1!==e.indexOf(i)&&d1(i)}),(t,i)=>c4[t.type]-c4[i.type]).map(l4)}function l4(t){return ue({src:t.contentURL,type:t.type,isAdvertisement:!0})}function f4(t,i){return OV(v4(t),v4(i))}function v4(t){return{Mi:t.height,Ti:t.width}}function _4(t,i,e,s){const n=function(t,i,e,s){let n,r=1/0;const h=t.filter(t=>!d1(t.type)).filter(t=>void 0===s||-1!==s.indexOf(t.type));if(h.length){for(const t of h){const s=(_.abs(t.width/i-1)+_.abs(t.height/e-1))/2;s0&&(t.PJt=null==(h=r[0].src)?void 0:h.trim());return ra({sources:r},s)}var g4=class extends a4{get iei(){return this.eei}get zx(){return this.sei.zx}get ct(){let t=this.sei.ct;return S(t)&&this.pJt&&(t=this.pJt.ct||0),t}get Qx(){return this.sei.Qx}get oP(){return this.sei.oP}set oP(t){this.sei.oP=t,t?this.Yii(gl.BJt):this.Yii(gl.MJt)}get lP(){return this.sei.lP}get AP(){return this.sei.AP}get OP(){return this.sei.OP}set OP(t){this.sei.OP=t}get DP(){return this.sei.DP}get MP(){return this.sei.MP}get nei(){return this.rei}QP(){this.sei.lP&&(this.sei.QP(),this.So(new vt(this.zx)),this.eei&&this.Yii(gl.LJt),this.eei=!0)}jP(){this.sei.lP||(this.sei.jP(),this.So(new Si(this.zx)),this.Yii(gl.jw))}async KP(){var t;null==(t=this.hT)||t.Zg(),this.hT=void 0,this.we(),this.eei=!1,this.hei=!0,this.oei(),this.aei(),await this.uei()}cei(t){void 0===t&&(t=!0),this.eei=!1,t&&this.Yii(gl.jJt),this.we(),this.Zii()}dei(){var t;const i=null==(t=this.k5t.Na)?void 0:t.gi,e=new x2(this.sc,i);return this.Wii.appendChild(e.xe),e.wn("uD",this.lei),e}fei(){this.pJt&&this.pJt.lJt.KYt&&(this.T2t=new A2(this.Wii),this.T2t.O1t=this.pJt.lJt.KYt,this.T2t.wn("clickstart",this.vei),this.T2t.wn("click",this.tei))}_ei(t,i){for(const e of this.jii)if(e.oX===gl.Qw){const s=s1(e.ac,i);void 0!==s&&this.C4=this.pJt.kJt}xei(){this.Yii(gl.tTt),this.rei&&this.u4t.So(new nc(this.rei,this.zx))}async uei(){this.sei.mn(hc.ma,this.Aei),this.sei.mn(d.Nw,this.Sei),this.sei.mn(d.py,this.Tei),this.sei.mn(Jr.PM,this.Rs),this.sei.mn(Jr.PM,this.kei),this.sei.mn(d.Jw,this.Rs),this.sei.mn(d.py,this.wei),this.sei.mn(d.Cw,this.yei),this.sei.mn(d.wy,this.bei),this.sei.mn(Ii,this.Rs),this.rei&&(this.rei.s1t(),this.u4t.So(new fc(this.rei,this.zx))),this.Pei(),this.qii(),this.oei(),this.aei(),this.rei=void 0,this.pJt=void 0,this.pei=void 0,await this.sei.hr(),this.sei.we(),this.Wii.style.cursor="",this.Iei=0,this.C4=-1,this.Cei&&(this.Rei.uei(),this.Cei=!1)}Pei(){this.T2t&&(this.T2t.zg(),this.T2t=void 0)}aei(){this.Dei&&(Ao(this.Dei),this.Dei=void 0)}oei(){this.x2t&&(this.x2t.kn(),this.x2t=void 0)}Nei(){this.Cei=!0}Bei(){var t;this.Dei||(this.Dei=h.createElement("div"),this.Dei.className="theoplayer-ad-overlay-component theo-ad-remaining-container",this.Wii.appendChild(this.Dei));const i=null==(t=this.rei)?void 0:t.od;if(!i)return;const e=i.Jc.filter(_2);let s=u4(this.ZS,"The content will play in")+" "+_.round(i.X0t)+" "+u4(this.ZS,"seconds");if(e.length>1){const t=e.filter(t=>t.i1t()).length;s+=". "+u4(this.ZS,"Ad")+" "+(t+1)+"/"+e.length}Nr(this.Dei,s)}constructor(t,i,e,s,n,r,h){super(t,i),this.Rei=void 0,this.ZS=void 0,this.k5t=void 0,this.sc=void 0,this.sei=void 0,this.rei=void 0,this.pJt=void 0,this.pei=void 0,this.eei=void 0,this.Iei=void 0,this.C4=void 0,this.Cei=void 0,this.Dei=void 0,this.x2t=void 0,this.T2t=void 0,this.hT=void 0,this.hei=void 0,this.Sei=void 0,this.kei=void 0,this.Tei=void 0,this.Aei=void 0,this.wei=void 0,this.yei=void 0,this.bei=void 0,this.vei=void 0,this.lei=void 0,this.Rei=e,this.ZS=s,this.k5t=n,this.sc=r,this.sei=h,this.eei=!1,this.Iei=0,this.C4=-1,this.hT=new Zc,this.hei=!0,this.Sei=()=>{this.cei()},this.kei=()=>{this.hT=void 0,this.eei||(this.xei(),this.eei=!0),this.hei&&(this.hei=!1,this.k5t.wii()),this.Wii.style.display="block",this.sei.mn(Jr.PM,this.kei),this.eei=!0},this.Tei=()=>{const t=this.zx,i=this.ct,e=t/i;(0===this.Iei&&e>=.25?(this.Yii(gl.zJt),this.Iei=1):1===this.Iei&&e>=.5?(this.Yii(gl.XJt),this.Iei=2):2===this.Iei&&e>=.75&&(this.Yii(gl.GJt),this.Iei=3),this._ei(t,i),this.Bei(),this.C4=t,this.pJt)&&(-1!==this.pJt.kJt&&this.pJt.kJt{var t,i;this.hT=void 0,this.sei.mn(hc.ma,this.Aei),this.hei=!0,null==(t=this.nq)||t.bZt(Hr.gZt),this.eei=!1,this.sei.we();const e=(null==(i=this.sei.bt)?void 0:i.src)||"";this.Jii(e)},this.wei=()=>{this.Rs(new B(this.zx,void 0))},this.yei=()=>{this.Rs(new zr(this.ct))},this.bei=()=>{this.Rs(new Wi(this.zx,this.OP))},this.vei=()=>{this.k5t.jP()},this.lei=()=>{this.rei&&(this.Yii(gl.FJt),this.u4t.So(new gu(this.rei,this.zx/this.ct)),this.cei(!1))},this.Wii.className="theoplayer-ad-linear",this.Wii.style.zIndex="10",Go(this.Wii),this.sei.we(),this.Cei=!1}};r(),r();var p4=class t extends Ne{get xe(){return this.Ls}j1t(){this.xe.addEventListener("mouseup",this.Q1t),this.xe.addEventListener("touchend",this.Q1t),this.xe.addEventListener("mousedown",this.Mei)}G1t(){this.xe.removeEventListener("mouseup",this.Q1t),this.xe.removeEventListener("touchend",this.Q1t),this.xe.removeEventListener("mousedown",this.Mei)}static yr(){const t=h.createElement("div");return t.className="theoplayer-ad-nonlinear-close",t.style.position="absolute",t.style.right="0",t.style.top="0",t.style.cursor="pointer",t.style.fontSize="1.7em",t.style.lineHeight="0.75em",t}kn(){this.G1t(),Ao(this.Ls)}constructor(){super(),this.Ls=void 0,this.Q1t=t=>{this.So(new gp("uD")),this.Mei(t)},this.Mei=t=>{t.stopPropagation()},this.Ls=t.yr(),this.j1t()}},m4=class extends a4{get Lei(){return this.Oei}get Fei(){return this.yu}qii(){super.qii(),this.Wii&&no(this.Wii)}async mei(t,i,e){this.c1t&&this.uei(),this.Oei=t,this.c1t=t.eYt,0!==this.c1t.aYt.length&&this.Xii(this.c1t.aYt),this.nq=i,0!==this.c1t.hYt.length&&(this.Qii(this.c1t.hYt[0].gYt),this.Wii.addEventListener("error",this.Uei),this.Wii.addEventListener("load",this.Vei),await this.gei(),this.Hei())}G$t(){var t;if(void 0!==this.Wei)return;const i=null==(t=this.c1t)?void 0:t.hYt[0];i&&i.od&&-1!==i.od.kJt&&(this.Yii(gl.FJt),this.u4t.So(new gu(this.Oei,0)),this.qei())}xei(){void 0!==this.Oei&&this.u4t.So(new nc(this.Oei,this.k5t.zx))}KP(){this.uei(),this.Oei=void 0,this.c1t=void 0}uei(){this.zei(),void 0!==this.Oei&&(this.Oei.s1t(),this.u4t.So(new fc(this.Oei,this.k5t.zx))),this.qii(),this.Gei(),void 0!==this.Wei&&(c(this.Wei),this.Wei=void 0)}zei(){this.Wii.removeEventListener("load",this.Vei),this.Wii.removeEventListener("error",this.Uei)}async gei(){const t=h.createElement("div");t.className="theoplayer-ad-nonlinear-content",t.style.position="relative",t.style.display="inline-block";const i=this.c1t.hYt[0],e=h.createElement("a");if(i.gYt.KYt&&(e.href=i.gYt.KYt,e.target="Xu",e.setAttribute("rel","noopener")),i.lYt){const t=i.lYt,s=h.createElement("iframe");s.src=t.cZt,e.appendChild(s)}else if(i.cYt){const t=i.cYt,s=h.createElement("img");s.src=t.cZt,e.appendChild(s)}else if(i.vYt){const t=i.vYt,s=h.createElement("iframe");s.src=t.cZt,e.appendChild(s)}i.SYt(),e.addEventListener("mousedown",this.$ii),e.addEventListener("touchend",this.$ii),this.Wii.firstChild&&(no(this.Wii),this.uei()),t.appendChild(e),this.Wii.appendChild(t),this.be()}Hei(){var t;if(!this.c1t)return;const i=null==(t=this.c1t.hYt[0].od)?void 0:t.kJt;void 0!==i&&-1!==i&&(this.Wei=s.setTimeout(this.Xei,1e3*i))}Gei(){this.yu&&(this.yu.mn("uD",this.jei),this.yu.kn()),this.yu=void 0}get Qei(){return this.k5t.Kei()}constructor(t,i,e){super(t,i),this.Oei=void 0,this.c1t=void 0,this.k5t=void 0,this.yu=void 0,this.Wei=void 0,this.Vei=()=>{this.zei(),this.Yii(gl.ZJt),this.Zii()},this.Uei=t=>{var i,e;this.zei(),null==(i=this.nq)||i.bZt(Hr.mZt);const s=null==(e=this.c1t)?void 0:e.hYt[0];var n,r;const h=null!=(r=null!=(n=null==s?void 0:s.lYt)?n:null==s?void 0:s.cYt)?r:null==s?void 0:s.vYt;var o;this.Jii(null!=(o=null==h?void 0:h.cZt)?o:"")},this.qei=()=>{this.we(),no(this.Wii),this.Zii(),this.Oei=void 0,this.c1t=void 0},this.Xei=()=>{this.yu||(this.Wei=void 0,this.yu=new p4,this.Wii.children[0].appendChild(this.yu.xe),this.yu.wn("uD",this.jei))},this.jei=()=>{this.Yii(gl.FJt),this.G$t()},this.Wii.className="theoplayer-ad-nonlinear",this.Wii.style.position="absolute",this.Wii.style.width="100%",this.Wii.style.bottom="3em",this.Wii.style.zIndex="10",this.Wii.style.textAlign="center",this.k5t=e}};r();var w4=class{static async Yei(t,i,e){let s=[],n=t.shift();const r=[];for(;n;){try{const t=await(new _1).CZt(n,i);s=s.concat(t)}catch(t){0;const i=$h.v4t(t,n.sources.src);e.So(i),r.push(i.Jy)}n=t.shift()}return[s,r]}};r(),r(),r();var Kr=class extends Oi{xa(){return new y4}constructor(){super("zot")}},y4=class extends gp{constructor(){super("statechange")}};r();var Li=function(t){return t.IDLE="idle",t.LOADING="loading",t.DONE="done",t.ERROR="error",t.EVICTED="evicted",t}({});r(),r();var b4=class{get ec(){return this.nc}get V(){return this.nc.length}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}MI(t){return this.nc[t]}gO(t){this.nc.push(t),this.hu&&this.hu.push(t.Ca),this.Jei(t)}Zei(t){for(const i of t)this.gO(i)}$ei(t,i){i>=0&&i<=this.nc.length&&(this.nc.splice(i,0,t),this.hu&&this.hu.splice(i,0,t.Ca),this.Jei(t))}pO(t){return Ct(this.nc,t)}pS(t){this.tsi(this.nc.indexOf(t))}tsi(t){if(!(t>=0&&tt.Ca);return i.item=i=>{const e=0|i,s=t.MI(e);return s&&s.Ca||void 0},i}(t),e=new le(t,i);return i.addEventListener=(t,i)=>{e.wn(t,i)},i.removeEventListener=(t,i)=>{e.mn(t,i)},i}(this)}wn(t,i){this.esi.wn(t,i)}lw(t){this.esi.lw(t)}Vo(){this.esi.Vo()}So(t){this.esi.So(t)}mn(t,i){this.esi.mn(t,i)}pw(t){this.esi.pw(t)}mw(t){this.esi.mw(t)}ww(t,i){return this.esi.ww(t,i)}constructor(...t){super(...t),this.esi=new je,this.Rs=t=>{this.So(t)}}};r();var S4=class extends gp{constructor(t){super("addtask"),this.task=void 0,this.task=t}},T4=class extends Oi{xa(){return new S4(this.ssi.Ca)}constructor(t){super("nsi"),this.ssi=void 0,this.ssi=t}};r();var k4=class extends gp{constructor(t){super("removetask"),this.task=void 0,this.task=t}},E4=class extends Oi{xa(){return new k4(this.task.Ca)}constructor(t){super("rsi"),this.task=void 0,this.task=t}},x4=class extends A4{Jei(t){this.So(new T4(t))}isi(t){this.So(new E4(t))}constructor(){super()}},P4=class extends Ne{async GP(){await this.hsi(),this.$ot("initialised")}async hsi(){try{await this.osi()}catch(t){0}}async osi(){const t=await this.cTt.Sxt();for(const i of t){const t=this.usi.asi(i.id,i.sourceDescription,i.parameters,this.dsi);this.lsi(t),this.oT.gO(t),await t.fsi}}get dk(){return this.Zot}$ot(t){this.Zot=t,this.So(new Kr)}get vsi(){return this.oT}asi(t,i,e){void 0===e&&(e="persistent");const s=this.usi._si(t,i,e);return this.gsi(s,e),this.oT.gO(s),this.lsi(s),s}async gsi(t,i){try{await this.psi(t,i)}catch(t){throw m("Unable to persist task - "+t)}}async psi(t,i){await this.cTt.uTt({key:t.o,id:t.o,sourceDescription:t.Mc,parameters:t.LS},i)}lsi(t){t.wn("zot",()=>{t.dk===Li.EVICTED&&this.oT.pS(t)})}constructor(t,i,e){super(),this.Zot="uninitialised",this.oT=new x4,this.cTt=void 0,this.dsi=void 0,this.usi=void 0,this.usi=i,this.dsi=e,this.cTt=t,this.GP()}};r(),r(),r(),r();var qe=class{get eL(){return this.msi}get wsi(){return this.ysi}get bsi(){return this.Asi.eL}get Ssi(){let t=0,i=0;return this._O.forEach(e=>{t+=e.timeRanges.eL,i+=e.totalQualityDurationToCache}),0===i?0:_.min(1,t/i)}get Asi(){return this.Tsi}QO(t){return!!Gr(this._O,t._O)&&(!!Jl(this.ysi,t.ysi)&&(!!Jl(this.eL,t.eL)&&(!!Jl(this.bsi,t.bsi)&&this.Asi.KM(t.Asi))))}constructor(t,i,e){if(this.ysi=void 0,this._O=void 0,this.msi=void 0,this.Tsi=void 0,this.ysi=t,this._O=i,this.msi=e,0===this._O.size)this.Tsi=Uo.rL();else{let t=new Uo([-1/0,1/0]);this._O.forEach(i=>{t=t.Mn(i.timeRanges)}),this.Tsi=t}}};qe.QUALITY_TIME_RANGES_NULL_OBJECT=Ba(),qe.CACHE_PROGRESSION_NULL_OBJECT=new qe(0,qe.QUALITY_TIME_RANGES_NULL_OBJECT,NaN),qe.ksi=qe.CACHE_PROGRESSION_NULL_OBJECT,r(),r(),r(),r();var I4=class extends gp{constructor(){super("progress")}},C4=class extends Oi{xa(){return new I4}constructor(){super("Q4t")}};r(),r();var Ch=class extends Qr{get name(){return"Esi"}constructor(t,i){super(t,i)}};r(),r(),r();var R4=function(t){return t[t.vC=0]="vC",t[t._C=1]="_C",t}({});async function D4(t,i,e){const s=[];for(const n of t.dmt)s.push(N4(n,i,e));return{qmt:await Promise.all(s)}}async function N4(t,i,e){const s=[];for(const n of t.jlt)B4(n)||s.push(O4(n,i,e));return{Z:await Promise.all(s),Km:t.Km}}function B4(t){return t.xat.every(L4)}var M4=1;function L4(t){return t.Awt!==M4&&Boolean(t.Awt)}async function O4(t,i,e){const s=[];for(const i of t.xat)L4(i)||s.push(F4(i,e));const n=await Promise.all(s),r=t.Rrt[0],h=t.NW,o=h?function(t,i){const e=[],s=function(t){return t?nl(t,"avc")?Vy:nl(t,"hev")||nl(t,"hvc")||nl(t,"hvt")||nl(t,"lhv")||nl(t,"lhe")||nl(t,"lht")?Hy:nl(t,"mp4")?Wy:nl(t,"mpeg2")?zy:nl(t,"mpeg")?qy:Xy:Xy}(t);for(const t of i){const i=t.x8.split(":").pop(),n=t.P8;e.push({mimeType:s,uuid:i,data:n})}const n=R4.vC,r=Ng;return{type:n,schemeType:r,schemeDatas:e}}(r,h):void 0,a=LG(t,i,!0);return{$I:n,bs:t.Tit,Km:t.Km,fq:o,Wpt:a}}async function F4(t,i){const e={stack:[],error:void 0,hasError:!1};try{const r=Es(e,new Zc,!1),h=await async function(t,i,e){const s=[],n=t.mht;t.Ydt&&s.push({CO:0,ct:0,xsi:t.Ydt});const r=n.jyt();let h=r;for(;h;){if(t.qct(h)){const n=await t.Gct(h,i,e);for(let i=0;i{for(const i of t.$D){let s=e.get(t.Km);s||(s=Ba(),e.set(t.Km,s));let n=s.get(i.l);n||(n=[],s.set(i.l,n)),n.push(i)}}),e}(t);return function(t,i){const e=re();return t.forEach((t,s)=>{const n=Ba();t.forEach((t,e)=>{const r=[];for(const e of t){const t=W4(e,s,i);r.push(t)}n.set(e,r)}),e.set(s,n)}),e}(e,i)}function W4(t,i,e){const s=t.oLt,n={fLt:t,_Vt:[]};for(const t of e)$J(i,s,t)&&n._Vt.push(t);return n}async function q4(t,i){const e=await i.KSt([t],{});return kJ(e.wk,{},e.JSt)}async function z4(t,i){return WY(t)?async function(t,i){const e=H4(t.$D,t.XOt),s=await async function(t,i){const e=[],s=t.entries();for(let t=s.next();!t.done;t=s.next()){const[s,n]=t.value,r=await j4(n,s,i);e.push(r)}return e}(e,i),n=await async function(t,i){const e=[];for(const o of t){var s,n;const t=await J4(o.Syt,i);var r,h;t.IW=o.IW,t.Bp=o.Rrt?X4(o.Rrt):"",t.Mi=null!=(r=null==(s=o.RRt)?void 0:s.Mi)?r:0,t.Ti=null!=(h=null==(n=o.RRt)?void 0:n.Ti)?h:0,e.push(t)}return{Km:at.yk,Z:[{bs:PH,Km:at.yk,$I:e}]}}(t.XOt,i);return s.push(n),{ct:G4(s),Psi:[t.Syt],Amt:[{qmt:s}]}}(t,i):function(t){const i=Z4(t);return{ct:i.ct,Psi:[t.Syt],Amt:[{qmt:[{Km:at.yk,Z:[{Km:at.yk,bs:PH,$I:[{o:t.Syt,AM:i,IW:0,Bp:"",Mi:0,Km:at.yk,Ti:0}]}]}]}]}}(t)}function G4(t){let i=-1/0;for(const e of t)for(const t of e.Z)i=_.max(i,...t.$I.map(t=>t.AM.ct));return i}function X4(t){return[t.q9,t.W9,t.fOt].filter(it).join(",")}async function j4(t,i,e){const s=[],n=t.entries();for(let t=n.next();!t.done;t=n.next()){const[,i]=t.value,n=await Q4(i,e);s.push(n)}return{Km:K4(i),Z:s}}async function Q4(t,i){const e=[],s=t[0].fLt;for(const s of t){const t=await Y4(s,i);e.push(t)}return{bs:s.bs||PH,Km:K4(s.Km),$I:e}}function K4(t){switch(t){case dl.Bk:return at.Bk;case dl.Mk:return at.Mk;case dl.HU:case dl.YLt:return at.LT;default:return at.yk}}function Y4(t,i){const e=function(t){const i=t.fLt.Syt,e=t._Vt.map(t=>t.Syt);return i||(e.length?e[0]:void 0)}(t);return J4(e,i)}async function J4(t,i){let e={ct:0,bct:[]};if(t){const s=await q4(t,i);qY(s)&&(e=Z4(s))}return{o:t||"default",Isi:t,AM:e,IW:0,Bp:"",Mi:0,Km:at.yk,Ti:0}}function Z4(t){const i=[];let e,s=0;for(const n of t.bct){const t=s;!n.YOt||void 0!==e&&XY(n.YOt.Syt,e)||(i.push($4(n.YOt,t)),e=n.YOt.Syt),i.push(t5(n,t)),s+=n.ct}return{ct:s,bct:i}}function $4(t,i){return{CO:i,ct:0,xsi:i5(t.Syt)}}function t5(t,i){return{CO:i,ct:t.ct,xsi:i5(t.Syt)}}function i5(t){return{Yu:t.XE,Wat:t.iAt?[t.iAt.Tn,t.iAt.Tn+t.iAt.V]:void 0,Xk:!1}}r(),r();var e5=class{async Csi(t){if(!t.src)throw new m("Invalid typed source");const i=t.type;if(gk(i))return await this.Rsi(t);if(tu(i))return await this.Dsi(t);throw new m("Unexpected source type")}async Rsi(t){try{const i=await q4(t.src,this.YSt);return await z4(i,this.YSt)}catch(t){throw new m("Unable to fetch HLS manifest")}}async Dsi(t){try{const i=new eG({rC:zd.Dh(t.src),ISt:t.liveOffset,BSt:t.timeServer,Xk:t.useCredentials},this.Nsi,yA.Zk,this.YSt,t.dash);return await i.W,await async function(t,i,e){const s=[];for(const n of t.Amt)s.push(D4(n,i,e));const n=await Promise.all(s);return{ct:t.dyt.Qmt(),Psi:[t.ySt],Amt:n}}(i.Br.jdt,t.contentProtection,this.Jct)}catch(t){throw new m("Unable to fetch DASH manifest")}}constructor(t,i,e){this.YSt=void 0,this.Jct=void 0,this.Nsi=void 0,this.YSt=t,this.Jct=i,this.Nsi=e}};r();var s5=class{Bsi(){const t=new Ga;return this.Msi.push(t),this.Lsi(),t.Yy}async Osi(t,i){try{await t}finally{this.Fsi-=1,this.Lsi(),0===this.Msi.length&&0===this.Fsi&&i.Qy(!0)}}Lsi(){if(this.Msi.length>0&&this.FsiCt(t.references,this.dTt.o)),r=[],h=this.dTt.LS.bandwidth;for(const t of this.URt.Amt)for(const i of t.qmt)for(const t of h5(i,this.dTt.LS.preferredTrackSelection))for(const i of a5(t.$I,h))r.push(i);this.Hsi=_.ceil(r.map(t=>t.IW*function(t,i){let e=0;for(const s of t.AM.bct.map(t=>t.ct))if(e+=s,e>=i)return e;return e}(t,i)/8).reduce((t,i)=>t+i,0));const o=Ba();if(n&&0!==n.length){const t=n.reduce((t,i)=>t+i.byteSize,0);for(const t of n){const i=t.qualityId,e=new Uo(t.startsAndEnds);if(o.has(i))o.get(i).timeRanges=o.get(i).timeRanges.HM(e).VM(5e-4);else{const t=hh(r,t=>t.o===i);var a;const s=_.min(this.msi,null!=(a=null==t?void 0:t.AM.ct)?a:1/0);o.set(i,{timeRanges:e,totalQualityDurationToCache:s})}}e=new qe(t,o,this.msi)}else{for(const t of r)o.set(t.o,{timeRanges:Uo.rL(),totalQualityDurationToCache:_.min(t.AM.ct,this.msi)});e=new qe(0,o,this.msi)}this.Wsi=e}get qsi(){return this.Hsi}get Wsi(){return this.zsi}set Wsi(t){this.zsi.QO(t)||(this.zsi=t,t.QO(qe.ksi)||this.So(new C4))}async mi(t){await this.ko,await this.Gsi(this.URt,t)}async Gsi(t,i){if(!t.Psi)throw new m("Unexpected - manifest is missing locations");await this.Xsi();const e=[];for(const s of t.Amt)e.push(this.jsi(s,t.Psi[0],i));return pr(e)}async Xsi(){const t=await this.Qsi.Sxt();for(const i of t){const t=await this.Dxt.Bxt.zy(i.key);if(t)await r5(t,this.dTt.o,this.Dxt.Bxt,this.dsi);else try{await this.Dxt.Bxt.uTt(i,this.dsi)}catch(t){throw new Ch("Unable to store manifest with url: "+i.locationURL,t)}}await this.Qsi.xxt()}jsi(t,i,e){const s=[];for(const n of t.qmt){const t=h5(n,this.dTt.LS.preferredTrackSelection);for(const n of t)s.push(this.Ksi(n,i,e))}return pr(s)}async Ksi(t,i,e){const s=this.dTt.LS.bandwidth,n=a5(t.$I,s);t.Km===at.Mk&&t.Wpt&&t.Wpt.lH.widevine&&"persistent"===t.Wpt.lH.widevine.licenseType&&(await this.Ysi(t.Wpt),fr(e));const r=[];for(const t of n)r.push(this.Jsi(t,i,e));return pr(r)}async Jsi(t,i,e){fr(e);const s=t.AM.bct[0].CO+this.msi,n=[];let r=!1;for(const h of t.AM.bct){if(h.CO>=s||this.stopIfFailed(r))break;await this.Zsi(e),await this.$si.Bsi(),n.push(this.$si.Osi(this.tni(h,t,i),this.ini).catch(t=>(r=!0,Promise.reject(t))))}return pr(n)}async Zsi(t){if(null==t?void 0:t.Hg)throw await this.ini.Yy,new Qc}async eni(){return await this.ko.catch(gs),this.URt}Ysi(t){return Promise.resolve()}sni(){return zd.um("License renewal unsupported in this SDK."),Promise.resolve()}async tni(t,i,e){const s=this.Dxt.Nxt,n=Rt(t.xsi.Yu,t.xsi.Wat),r=await s.zy(n);if(r)await r5(r,this.dTt.o,s,this.dsi),this.nni(r,!1);else try{const s=await this.rni(t.xsi),{segmentMetadataEntry:n,segmentEntry:r}=this.hni(t,i,e,s);await this.Dxt.Rxt(async t=>{await t.Nxt.uTt(n,this.dsi),await t.bct.uTt(r,this.dsi)}),this.nni(n,!0)}catch(i){throw new Ch("Unable to store segment with url: "+t.xsi.Yu,i)}}async rni(t){const i=await this.$ut.Lat(t,{zat:this.DEFAULT_CACHING_SEGMENT_TIMEOUT,qk:this.DEFAULT_CACHING_SEGMENT_CONNECTION_TIMEOUT});return await this.tct(i)}async tct(t){return{buffer:await t.qT()}}hni(t,i,e,s){const n=Rt(t.xsi.Yu,t.xsi.Wat),r=t.CO,h=t.ct,o=this.oni(s);return{segmentMetadataEntry:{key:n,segmentURLsegmentByteRange:n,manifestURL:mG(e),qualityId:i.o,byteSize:o,startsAndEnds:new Uo([r,r+h]).IM,references:[this.dTt.o]},segmentEntry:{key:n,segmentURLsegmentByteRange:n,manifestURL:mG(e),data:s,references:[this.dTt.o]}}}oni(t){return t.buffer.byteLength}nni(t,i){const e=t.qualityId,s=this.zsi,n=s._O;n.get(e).timeRanges=n.get(e).timeRanges.HM(new Uo(t.startsAndEnds)).VM(5e-4),this.Wsi=new qe(i?s.wsi+t.byteSize:s.wsi,n,this.msi)}stopIfFailed(t){return!1}constructor(t,i,e,s,n,r,h,o){super(),this.DEFAULT_CACHING_SEGMENT_TIMEOUT=3e4,this.DEFAULT_CACHING_SEGMENT_CONNECTION_TIMEOUT=0,this.dTt=void 0,this.Dxt=void 0,this.dsi=void 0,this.URt=void 0,this.$si=void 0,this.ini=new Ga,this.Vsi=void 0,this.Qsi=void 0,this.YSt=void 0,this.$ut=void 0,this.Jct=void 0,this.Nsi=void 0,this.ko=void 0,this.msi=void 0,this.Hsi=void 0,this.zsi=qe.ksi,this.dTt=t,this.Dxt=i,this.YSt=e,this.Qsi=s,this.$ut=n,this.Jct=r,this.Nsi=o,this.dsi=h,this.Hsi=-1;const a=this.dTt.Mc.sources[0];this.Vsi=a,this.ko=this.GP(),this.$si=new s5(this.dTt.LS.parallelTasksThreshold)}};async function r5(t,i,e,s){Ct(t.references,i)||(t.references.push(i),await e.uTt(t,s))}function h5(t,i){switch(t.Km){case at.Bk:return o5(t.Z,i.audioTrackSelection);case at.LT:return o5(t.Z,i.textTrackSelection);default:return o5(t.Z,[])}}function o5(t,i){if(0===i.length)return t.length?[t[0]]:[];const e=[];for(const s of t)i.indexOf(s.bs)>-1&&e.push(s);return e}function a5(t,i){if(!t.length)return[];const e=[...t].sort(FV),s=e.filter(t=>t.IW<=i);return s.length>0?[s.pop()]:[e.shift()]}var u5=class{async ani(){await this.Dxt.Rxt(async t=>{await this.uni(t),await this.cni(t),await this.dni(t),await this.lni(t)})}async uni(t){const i=t.Mxt,e=this.dTt.o;await i.pS(e)}async cni(t){const i=t.Nxt,e=t.bct,s=this.dTt.Mc.sources[0];if(!ei(s))return;const n=mG(s.src),r=(await i.kxt(n,"manifestURL")).filter(t=>Ct(t.references,this.dTt.o));for(const t of r)_e(t.references,this.dTt.o),0===t.references.length?(await i.pS(t.key),await e.pS(t.key)):await i.uTt(t)}async dni(t){const i=t.Bxt,e=this.fni(),s=(await i._xt(e)).filter(t=>Ct(t.references,this.dTt.o));for(const t of s)_e(t.references,this.dTt.o),0===t.references.length?await i.pS(t.key):await i.uTt(t)}fni(){if(!this.URt)return[];const t=this.dTt.Mc.sources[0];if(!ei(t))return[];const i=mG(t.src),e=function(t){if(!t)return[];const i=[];for(const e of t.Amt)for(const t of e.qmt)for(const e of t.Z)for(const t of e.$I)t.Isi&&i.push(t.Isi);return function(t){return t.reduce((t,i)=>(t.indexOf(i)<0&&t.push(i),t),[])}(i)}(this.URt).map(t=>({src:t})).map(t=>mG(t.src));return[i,...e]}async lni(t){const i=t.Lxt,e=(await i.Sxt()).filter(t=>Ct(t.references,this.dTt.o));for(const t of e)_e(t.references,this.dTt.o),0===t.references.length?(await i.pS(t.key),this.vni(t)):await i.uTt(t)}vni(t){}constructor(t,i,e){this.dTt=void 0,this.Dxt=void 0,this.URt=void 0,this.dTt=t,this.Dxt=i,this.URt=e}},c5=new class{jet(t,i,e){return new u5(t,i,e)}};r(),r();var d5=class{get Ca(){return this.hu||(this.hu=function(t){return{renew(i){t._ni(i)}}}(this)),this.hu}_ni(t){this.gni(t)}async gni(t){try{await this.pni.sni(t)}catch(t){0,this.wE.$ot(Li.ERROR)}}constructor(t,i){this.wE=void 0,this.pni=void 0,this.hu=void 0,this.wE=t,this.pni=i}},l5=class extends je{get fsi(){return this.pni.fsi}get Ca(){return this.hu||(this.hu=function(t){let i;const e={get id(){return t.o},get status(){return t.dk},get source(){return t.Mc},get parameters(){return t.LS},get duration(){return t.ct},get cached(){return t.mni._s()},get secondsCached(){return t.wni},get percentageCached(){return t.yni},get bytes(){return t.bni},get bytesCached(){return t.Ani},get license(){return t.pQ.Ca},start(){t.Tn()},pause(){t.jP()},remove(){t.pS()},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new hN(t,["Q4t","zot"],e),e}(this)),this.hu}get o(){return this.aS}get pQ(){return this.Sni}get dk(){return this.Zot}$ot(t){this.Zot!==t&&(this.Zot=t,this.So(new Kr))}get Mc(){return this.Ac}get LS(){return this.Tni}get ct(){return this.pni.Wsi.eL}get mni(){return this.pni.Wsi.Asi}get wni(){return this.pni.Wsi.bsi}get yni(){return this.pni.Wsi.Ssi}get bni(){return this.pni.qsi}get Ani(){return this.pni.Wsi.wsi}Tn(){this.Zot===Li.EVICTED||this.Zot===Li.DONE||this.kni()}async kni(){try{this.$ot(Li.LOADING);const t=new Zc;this.Eni=t,await this.pni.mi(t.Yg),this.$ot(Li.DONE)}catch(t){Ce(t)?this.$ot(Li.IDLE):this.$ot(Li.ERROR)}finally{this.Eni.zg()}}jP(){this.Eni.Zg()}pS(){this.dk===Li.LOADING?(this.wn("zot",this.evictOnLoading),this.jP()):this.xni()}async xni(){try{const t=await this.pni.eni();await c5.jet(this,this.Dxt,t).ani(),this.pni.Wsi=qe.ksi,this.$ot(Li.EVICTED)}catch(t){0,this.$ot(Li.ERROR)}}constructor(t,i,e,s,n,r){super(),this.aS=void 0,this.Zot=void 0,this.hu=void 0,this.Ac=void 0,this.Tni=void 0,this.Dxt=void 0,this.pni=void 0,this.Eni=new Zc,this.Sni=void 0,this.evictOnLoading=()=>{this.mn("zot",this.evictOnLoading),this.xni()},this.aS=t,this.Ac=i,this.Tni=e,this.Dxt=s,this.pni=n.jet(this,this.Dxt,r),this.Sni=new d5(this,this.pni),this.Zot=1===this.pni.Wsi.Ssi?Li.DONE:Li.IDLE,this.pni.wn("Q4t",t=>{this.Rs(t),1===this.yni&&this.$ot(Li.DONE)});const h=new Date,o=this.Tni.expirationDate.getTime()-h.getTime();(function(t){return t<2147483647})(o)&&u(()=>this.xni(),o)}};var f5=class{_si(t,i,e){const s=Ve();return this.asi(s,t,i,e)}asi(t,i,e,s){return new l5(t,i,e,this.Dxt,this.Pni,s)}constructor(t,i){this.Dxt=void 0,this.Pni=void 0,this.Dxt=t,this.Pni=i}};r();function v5(t){if(!t)throw new m("Unexpected - The cache parameters are undefined");const i=function(t){if(Q(t)&&!nl(t,"%"))return x(t);return t}(t.amount);!function(t){if(function(t){return Q(t)&&nl(t,"%")}(t)){const i=C(t);if(S(i)||i<0||i>100)throw new m("The amount as percentage must be between 0 and 100 percent.")}if(!Q(t)&&S(t))throw new m("The amount must be a number or a string")}(i);const e=function(t){if(!t)return function(){const t=new Date;return t.setMinutes(t.getMinutes()+30),t}();return t}(t.expirationDate);!function(t){if(t&&!function(t){return!t||Xd(t)&&t>new Date}(t))throw new m("Invalid expiration date for the cache parameters")}(e);const s=function(t){if(void 0===t)return 1/0;return t}(t.bandwidth);!function(t){if(S(t)||t<0)throw new m("The bandwidth must be between zero and infinity.")}(s);const n=function(t){if(!t)return 5;if(S(t))throw new m("The amount must be a number");return t}(t.numberOfParallelTasks);return{amount:i,expirationDate:e,bandwidth:s,parallelTasksThreshold:n,preferredTrackSelection:{audioTrackSelection:[],textTrackSelection:[]}}}var _5=class{set Hii(t){this.Ini=t,this.Cni=0,this.Rni=0,this.Dni=void 0}get Hii(){return this.Ini}o8t(){if(!this.Ini)return;const t=this.Ini.K0t;for(;this.Cni{const t=this.o8t();t&&await this.tXt(t)},this.Sii=()=>{const t=this.Nni.shift();null==t||t.pS()},this.Mni=async(t,i)=>{let e=!1;for(;!e;)await t.ww("Q4t"),e=1===t.Wsi.Ssi;i.ct<5&&this.yii()},this.GJ=t,this.aV=i,this.hT=new Zc,this.Pni=e,this.Mz=s,this.Dxt=new kc}};r(),r();var g5={key:"",segmentURLsegmentByteRange:"",manifestURL:"",qualityId:"",byteSize:0,startsAndEnds:new Uo([0,0]).IM,references:[]},p5={key:"",segmentURLsegmentByteRange:"",manifestURL:"",data:""},m5=class t extends GV{async gdt(t,i,e,s){try{return await super.gdt(t,i,e,s)}catch(t){sa(t)}const n=await this.Lni.gdt(t,i,e,s);return await this.Oni(t,i,n),n}async Oni(i,e,s){if(void 0===this.Fni)return;const n=this.Dxt.Nxt,r=Rt(i,e),h=await n.zy(r);if(h)await r5(h,this.Fni,n,this.dsi);else try{const i={buffer:s},{segmentMetadataEntry:e,segmentEntry:n}=t.hni(r,i,this.Fni);await this.Dxt.Rxt(async t=>{await t.Nxt.uTt(e,this.dsi),await t.bct.uTt(n,this.dsi)})}catch(t){throw new Ch("Unable to store segment with url: "+i,t)}}static hni(t,i,e){return{segmentMetadataEntry:Y({},g5,{key:t,segmentURLsegmentByteRange:t,references:[e]}),segmentEntry:Y({},p5,{key:t,segmentURLsegmentByteRange:t,data:i,references:[e]})}}constructor(t,i,e,s,n){super(t),this.Lni=void 0,this.Fni=void 0,this.Dxt=void 0,this.dsi=void 0,this.Lni=new zV(i),this.Dxt=e,this.Fni=s,this.dsi=n}};var w5=class{jet(t,i,e){void 0===e&&(e="persistent");const s=t.Mc.sources[0];if(wk(s))throw new m("Caching THEOlive sources is not supported");const n=Boolean(s.useCredentials),r=new $U(this.aV,$a.yk),h=new pG(this.aV,n),o=new rX(i.Bxt,i.Nxt,i.bct,i.Lxt),a=function(t,i,e,s,n){return new m5(i,t,e,s,n)}(this.aV,o,i,t.o,e),u=new xn,c=new SG(AG(h,o),u,t);return this.Uni(t,i,c,u,r,a,e)}constructor(t,i=DU()){this.aV=void 0,this.Nsi=void 0,this.aV=t,this.Nsi=i}},Uc=class extends w5{Uni(t,i,e,s,n,r,h){return new n5(t,i,e,s,n,r,h,this.Nsi)}},y5=Uc,b5=class t extends A3{get o4t(){return this}static get r4t(){return we.f1t}get r4t(){return t.r4t}Cti(t,i,e){i===Hu.Bnt&&this.d9?Wr(this.r8t([t])):this.Vni.push(t)}Gx(){return this.Hni.iei?this.Hni.zx:this.nnt()}Xx(t,i){}Nd(){return this.Hni.ct}Kx(){return this.Hni.Qx}Yx(){}Zx(){}aP(){return this.Hni.oP}uP(t){this.oP!==t&&(this.Hni.oP=t,this.So(new Wi(this.zx,this.OP)))}fP(){return this.Hni.lP}TP(){return this.Hni.AP}EP(){return Uo.rL()._s()}NP(){return this.Hni.DP}LP(){return this.Hni.MP}FP(){return this.Hni.OP}UP(t){this.OP!==t&&(this.Hni.OP=t,this.So(new Wi(this.zx,this.OP)))}async QP(){if(this.Wni)return;this.So(new vt(this.zx)),this.qni(),this.Vni.length&&(this.Wni=this.r8t(this.Vni),await this.Wni,this.Wni=void 0),await this.zni.Rii(this.oa.Gx());const t=this.Gni;4!==t&&1!==t&&5!==t||(!this.w1t&&this.Xni.length?this.jni():this.w1t?(this.Qni=!0,this.Hni.QP()):(this.I3t(),this.oa.QP()),this.Gni=3)}jP(){3===this.Gni&&(this.Hni.jP(),this.Gni=4)}wii(){this.zni.wii()}Tn(){this.Gni=1,this.zni.Tn()}async KP(){this.zni&&(this.zni.An(),this.Kni(!1),this.Rei.KP(),this.Gni=5,this.w1t&&(this.zni.Vii(this.w1t.OZt),this.w1t=void 0)),this.d9=!1,this.Qni=!1,Wt(this.Xni),this.w4t&&(this.I3t(),this.oa.be()),Wt(this.Vni),await this.Hni.KP(),await this.sei.hr()}uD(){this.Hni.G$t(),this.Rei.G$t()}Hnt(t){this.Cd.ads.allowSkipAdBreak&&(this.Yni=!0,this.Jni=t,this.uD())}GP(){this.sei.GP(),this.qni()}l4t(t){return!(t.type!==d.Nw||!this.zni||!this.zni.Pii(-1))&&(this.zni.Eii().then(gs),!0)}be(){void 0!==this.Hni.nei&&(this.sei.be(),this.Hni.be()),void 0!==this.Rei.Lei&&this.Rei.be()}we(){this.sei.we(),this.Hni.we(),this.Rei.we()}async r8t(t){const[i,e]=await w4.Yei(t,this.aV,this.u4t);if(i.length)this.zni.Fii(i),this.u4t.So(new vU),this.w4t||this.oa.lP||await this.zni.Rii(this.oa.Gx()),0!==this.Gni&&5!==this.Gni||this.Tn();else{if(0===e.length||e.some(t=>t!==xs.VAST_EMPTY_RESPONSE&&t!==xs.VAST_NO_ADS_AFTER_WRAPPER)){const t="Ads could not be loaded.";this.u4t.So($h.v4t(new ys($c.ADBLOCK,xs.FILE_NOT_FOUND),t))}this.d9&&!this.w1t&&0===this.Xni.length&&this.Zni()}}Mii(t){for(const i of t)Ct(this.Xni,i)||this.Xni.push(i);for(const i of t)this.d9&&!this.w4t&&this.jni()}async jni(){if(2!==this.Gni&&!this.$ni){0,this.$ni=!0,this.Gni=2;const t=this.w1t;this.tri(),this.w1t?(await this.w1t.OZt._ii(this.u4t),this.iri()||(this.$ni=!1),this.u4t.So(new f3(this.eri(this.w1t))),await this.sri()):((null==t?void 0:t.OZt.gii())&&this.u4t.So(new Za(this.eri(t))),this.$ni=!1,this.Gni=1,this.Zni())}}Zni(){this.I3t(),this.oa.be(),this.oa.Qx?this.oa.So(new ur(this.oa.Gx())):this.oa.QP()}tri(){let t;if(this.w1t&&this.iri())t=this.w1t.OZt;else{if(0===this.Xni.length)return;t=this.Xni.shift()}if(!t)return;const i=t.Rc();i?this.w1t=i:(this.w1t&&(this.zni.Vii(this.w1t.OZt),this.w1t=void 0),this.w1t=void 0)}async sri(){const t=this.w1t?function(t){var i,e;const s=null==(e=t.d$t)||null==(i=e.UKt)?void 0:i.VKt();return void 0===s?void 0:new r2(s)}(this.w1t):void 0;if(t){if(!this.w1t)return;this.rri=t,this.hri(this.w1t.aYt),this.ari(gl.rZt);const i=this.rri.Rc();this.w1t.OZt.gii()&&(this.Rei.uei(),1===this.w1t.OZt.Put&&this.u4t.So(new Ta(this.eri(this.w1t)))),await this.mei(i)}else this.Gni=1,this.$ni=!1,this.w1t=void 0,this.jni()}async mei(t){if(t){var i;let s=it(t.iYt),n=it(t.nYt);var e;const r=null!=(e=null==(i=t.sYt)?void 0:i.PYt)?e:[],h=r.length>0,o=this.w1t,a=this.eri(o);if(t.iYt){if(t.iYt.od=o,void 0!==o.irt.skipOffset){const i=iu.a$t(o.irt.skipOffset,t.iYt.ct);void 0!==i&&i0?this.jni():(this.Zni(),this.w1t=o))}else null===t?await this.dri():this.Kni(!0)}dri(){const t=this.rri;return this.mei(t&&t.Rc())}Kni(t){this.ari(gl.hZt),this.lri(),this.Gni=1;const i=void 0!==this.w1t&&this.w1t.OZt.fii();if(this.$ni=!1,!i||this.Yni){if(!this.w4t)return;this.oa.be(),!this.oa.Qx&&t&&this.oa.QP(),void 0!==this.Jni&&this.oa.Xx(this.Jni),this.I3t(),this.Yni=!1,this.Jni=void 0}else t&&(this.Gni=1,this.jni())}I3t(){this.fri(),super.I3t()}fri(){if(this.oa.Qx&&(this.Gni=5),this.w1t){const t=this.w1t.OZt;t.gii()&&this.u4t.So(new Za(this.eri(this.w1t))),this.zni.Vii(t),this.w1t=void 0}}hri(t){this.vri=this.vri.concat(t)}lri(){this.vri=[]}_ri(t){this.oa.xe.appendChild(t)}ari(t){for(const i of this.vri)i.oX===t&&qn(i.eventURL)}cri(t){this.Hni.Yii(gl.ZJt);for(const i of t)qn(i)}get Fnt(){return this.w1t?this.eri(this.w1t):null}get Lnt(){return this.w1t?[this.Hni.nei,this.Rei.Lei].filter(it):[]}get Unt(){const t=this.Xni.concat(this.zni.Unt.filter(t=>!t.i1t()));return hs(t,t=>t.oii.Jc.filter(t=>!t.i1t()))}get Vnt(){return this.zni.Unt.map(t=>t.oii)}qnt(t){const i=this.Dti();for(const e of i)P0(e.sources,e.timeOffset)||t.W6(e,Hu.Bnt,!1)}Dti(){const t=[];for(const i of this.Lnt.concat(this.Unt))t.push(i.irt);const i=this.Xni.concat(this.zni.Unt.filter(t=>!t.i1t()));for(const e of i)for(const i of e.K0t)i.W||t.push(i.irt);return t.push(...this.Vni),Cc(t)}iri(){return!!this.w1t&&h2(this.w1t).some(t=>t.iYt)}eri(t){return t.OZt.oii}Kei(){return this.gri}zP(){return this.sei.zP()}Ox(){return this.sei.Ox()}S4t(t){this.zni.S4t(t)}async kn(){await super.kn(),this.oa.mn(d.uo,this.qni),this.u4t.LK(this.Hni.u4t),this.u4t.LK(this.Rei.u4t),this.u4t.LK(this.zni),this.Hni.kn(),this.Rei.kn(),await this.sei.kn()}constructor(t,i,e,s,n,r){super(t,i),this.Wni=void 0,this.Hni=void 0,this.Rei=void 0,this.zni=void 0,this.Xni=[],this.Gni=0,this.w1t=void 0,this.rri=void 0,this.vri=[],this.gri=void 0,this.$ni=!1,this.d9=!1,this.Qni=!0,this.sei=void 0,this.Yni=!1,this.Jni=void 0,this.Vni=[],this.aV=void 0,this.pri=t=>{t.type===d.uo&&this.Qni?this.Qni=!1:this.So(t)},this.qni=()=>{this.d9=!0},this.wri=async()=>(this.Gni=1,await this.Hni.uei(),this.mei(this.rri.Rc())),this.yri=async t=>{const i=new ys($c.PLAYBACK,xs.GENERAL_LINEAR_ERROR,"There was a problem playing a linear ad.");return this.u4t.So($h.v4t(i,t)),await this.Hni.uei(),this.mei(this.rri.Rc())},this.bri=()=>(this.Rei.uei(),this.mei(this.rri.Rc())),this.Ari=t=>{const i=new ys($c.PLAYBACK,xs.GENERAL_NON_LINEAR_ERROR,"There was a problem playing a non linear ad.");return this.u4t.So($h.v4t(i,t)),this.Rei.uei(),this.mei(this.rri.Rc())},this.aV=r,this.sei=e,this.Rei=new m4(this.Ari,this.bri,this),this.Hni=new g4(this.yri,this.wri,this.Rei,s,this,t.Wu,e),this._ri(this.Rei.Wii),this._ri(this.Hni.Wii);const h=new _5(s,r,Uc,n);this.zni=new o4(this.oa,this,this.u4t,h),this.Hni.lw(this.pri),this.Rei.lw(this.Rs),this.u4t.au(this.Hni.u4t),this.u4t.au(this.Rei.u4t),this.u4t.au(this.zni),this.gri=new u2(this,this.oa),this.Wu.wn(Qh.yn,this.Rs),this.oa.wn(d.uo,this.qni)}};va.Bg.Kz(new class{get i4t(){return b5.r4t}Qz(t){return t&&("string"!=typeof t.integration||t.integration===FC.DEFAULT||t.integration===FC.CSAI||t.integration===FC.THEO)}e4t(t,i,e){const s=new Dr(t.tnt,t.Ql,e);s.Est(t.xe);const n=new SC(t.xe,e,t.Dx,t.Kst,t.VP,s,t.Ql);return new b5(t,i,n,e,t.Kst,t.Dx)}W6(t,i,e,s){e.Cti(t,i,s)}uj(t){const i=x1(t.sources);if(!i)return;const e={integration:FC.CSAI,sources:i};"vast"===e.sources.type&&void 0===t.timeOffset?t.timeOffset=0:"vmap"===e.sources.type&&void 0!==t.timeOffset&&uh("Do not set timeOffset for VMAP ad sources. VMAP ads have their own offsets included.");const s=I1(t.timeOffset);void 0!==s&&(e.timeOffset=s);const n=I1(t.skipOffset);return void 0!==n&&(e.skipOffset=n),e}}),r(),r();var A5=class{GY(){var t;this.i8||(null==(t=this.bti)||t.initialize(),this.i8=!0)}get Wii(){return this.A2t}get Sri(){return this.Tri.offsetHeight}get kri(){return this.Tri.offsetWidth}get Eri(){return this.bti}xri(t){"linear"===t?this.A2t.style.marginTop="0px":"nonlinear"===t&&(this.A2t.style.marginTop="-45px")}be(){this.A2t.style.opacity="1",this.A2t.style.pointerEvents=""}we(){this.A2t.style.opacity="0",this.A2t.style.pointerEvents="none"}zg(){var t;null==(t=this.bti)||t.destroy(),this.bti=void 0}constructor(t,i){this.bti=void 0,this.A2t=void 0,this.vet=void 0,this.Tri=void 0,this.i8=!1,this.vet=t;const e=h.createElement("div");e.className="theoplayer-ima-wrapper",Go(e),e.style.zIndex="10",zs.Ks&&function(t,i){t.addEventListener(i,Dl)}(e,"mousedown"),i.appendChild(e);const s=h.createElement("div");s.className="theoplayer-ima",s.style.height="100%",this.Tri=s,e.appendChild(s),this.A2t=e,this.bti=new google.ima.AdDisplayContainer(this.Tri,this.vet)}};r(),r(),r();var S5=class{get fJt(){return this.Pri.getAdId()}get v7t(){const t=this.Pri.getAdPodInfo();if(void 0!==t)try{return{I9t:t.getAdPosition(),G0t:t.getMaxDuration(),Iri:t.getPodIndex(),qOt:t.getTimeOffset(),C9t:t.getTotalAds(),Cri:t.getIsBumper()}}catch(t){return}}get QKt(){return this.Pri.getAdSystem()}get Rri(){return this.Pri.getAdvertiserName()}get FYt(){var t;return null!=(t=this.Pri.getApiFramework())?t:void 0}get sYt(){return this.IYt.map(t=>({VYt:t.getAdSlotId(),GT:t.getContentType(),G4t:t.getContent(),Mi:t.getHeight(),Ti:t.getWidth()}))}get GT(){var t;return null!=(t=this.Pri.getContentType())?t:void 0}get wYt(){return this.Pri.getCreativeId()}get eti(){return this.Pri.getCreativeAdId()}get Dri(){return this.Pri.getDealId()}get _N(){return this.Pri.getDescription()}get ct(){return this.Pri.getDuration()}get Ti(){return this.Pri.getWidth()}get Mi(){return this.Pri.getHeight()}get PJt(){var t;return null!=(t=this.Pri.getMediaUrl())?t:void 0}get Nri(){return this.Pri.getMinSuggestedDuration()}get tti(){return this.Pri.getSkipTimeOffset()}get Bri(){return this.Pri.getSurveyUrl()}get gq(){return this.Pri.getTitle()}get Z7t(){return this.Pri.getTraffickingParameters()}get $7t(){return this.Pri.getTraffickingParametersString()}get rYt(){return this.Pri.getUniversalAdIds().map(t=>({sti:t.getAdIdRegistry(),nti:t.getAdIdValue()}))}get Jti(){return this.Pri.getUiElements()}get iti(){return this.Pri.getVastMediaBitrate()}get J7t(){return this.Pri.getVastMediaHeight()}get Y7t(){return this.Pri.getVastMediaWidth()}get X7t(){return this.Pri.getWrapperAdIds()}get j7t(){return this.Pri.getWrapperAdSystems()}get Q7t(){return this.Pri.getWrapperCreativeIds()}get h7t(){return this.Pri.isLinear()}constructor(t){this.Pri=void 0,this.IYt=void 0,this.Pri=t;const i=new google.ima.CompanionAdSelectionSettings;i.resourceType=google.ima.CompanionAdSelectionSettings.ResourceType.ALL,i.creativeType=google.ima.CompanionAdSelectionSettings.CreativeType.ALL,i.sizeCriteria=google.ima.CompanionAdSelectionSettings.SizeCriteria.IGNORE,this.IYt=t.getCompanionAds(0,0,i)}};function T5(){return[google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,google.ima.AdEvent.Type.CLICK,google.ima.AdEvent.Type.DURATION_CHANGE,google.ima.AdEvent.Type.EXPANDED_CHANGED,google.ima.AdEvent.Type.STARTED,google.ima.AdEvent.Type.IMPRESSION,google.ima.AdEvent.Type.PAUSED,google.ima.AdEvent.Type.RESUMED,google.ima.AdEvent.Type.AD_PROGRESS,google.ima.AdEvent.Type.AD_BUFFERING,google.ima.AdEvent.Type.FIRST_QUARTILE,google.ima.AdEvent.Type.MIDPOINT,google.ima.AdEvent.Type.THIRD_QUARTILE,google.ima.AdEvent.Type.COMPLETE,google.ima.AdEvent.Type.USER_CLOSE,google.ima.AdEvent.Type.LINEAR_CHANGED,google.ima.AdEvent.Type.LOADED,google.ima.AdEvent.Type.AD_CAN_PLAY,google.ima.AdEvent.Type.AD_METADATA,google.ima.AdEvent.Type.AD_BREAK_READY,google.ima.AdEvent.Type.INTERACTION,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,google.ima.AdEvent.Type.SKIPPED,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,google.ima.AdEvent.Type.LOG,google.ima.AdEvent.Type.VIEWABLE_IMPRESSION,google.ima.AdEvent.Type.VOLUME_CHANGED,google.ima.AdEvent.Type.VOLUME_MUTED]}var k5=class extends Ne{UP(t){var i;null==(i=this.Q0t)||i.setVolume(t)}FP(){return this.Q0t.getVolume()}I7t(){return this.Q0t.getRemainingTime()}zg(){Wt(this.qc),this.sc.mn(Qh.yn,this.Mri),this.Q0t.removeEventListener(google.ima.AdEvent.Type.LOADED,this.Lri),this.Q0t.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.forwardAdErrorEventListener);for(const t of T5())this.Q0t.removeEventListener(t,this.forwardAdEventListener);this.Q0t.destroy()}Tn(){this.Q0t.start()}kti(){this.Q0t.resume()}jP(){this.Q0t.pause()}uD(){this.Q0t.skip()}KP(){this.Q0t.stop()}d7t(){const t=this.Q0t.getCurrentAd();if(t)return this.Ori(t)}Xti(){return this.Q0t.getCuePoints()}Ori(t){let i=hh(this.qc,i=>i.Pri===t);return i||(i=new S5(t),this.qc.push(i)),i}Eti(t){this.Q0t.updateAdsRenderingSettings(I5(t))}constructor(t,i,e){super(),this.Q0t=void 0,this.bti=void 0,this.sc=void 0,this.qc=[],this.Lri=t=>{t.getAd().isLinear()?this.bti.xri("linear"):this.bti.xri("nonlinear")},this.Mri=()=>{this.Q0t.resize(this.bti.kri,this.bti.Sri,google.ima.ViewMode.NORMAL)},this.forwardAdEventListener=t=>{const i=t.getAd(),e=function(t){return{[google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED]:Nc.v8t,[google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED]:Nc._8t,[google.ima.AdEvent.Type.CLICK]:Nc.g8t,[google.ima.AdEvent.Type.DURATION_CHANGE]:Nc.Cw,[google.ima.AdEvent.Type.EXPANDED_CHANGED]:Nc.p8t,[google.ima.AdEvent.Type.STARTED]:Nc.m8t,[google.ima.AdEvent.Type.IMPRESSION]:Nc.w8t,[google.ima.AdEvent.Type.PAUSED]:Nc.Yz,[google.ima.AdEvent.Type.RESUMED]:Nc.y8t,[google.ima.AdEvent.Type.AD_PROGRESS]:Nc.b8t,[google.ima.AdEvent.Type.AD_BUFFERING]:Nc.A8t,[google.ima.AdEvent.Type.FIRST_QUARTILE]:Nc.S8t,[google.ima.AdEvent.Type.MIDPOINT]:Nc.XJt,[google.ima.AdEvent.Type.THIRD_QUARTILE]:Nc.T8t,[google.ima.AdEvent.Type.COMPLETE]:Nc.jJt,[google.ima.AdEvent.Type.USER_CLOSE]:Nc.k8t,[google.ima.AdEvent.Type.LINEAR_CHANGED]:Nc.E8t,[google.ima.AdEvent.Type.LOADED]:Nc.x8t,[google.ima.AdEvent.Type.AD_CAN_PLAY]:Nc.P8t,[google.ima.AdEvent.Type.AD_METADATA]:Nc.I8t,[google.ima.AdEvent.Type.AD_BREAK_READY]:Nc.C8t,[google.ima.AdEvent.Type.INTERACTION]:Nc.R8t,[google.ima.AdEvent.Type.ALL_ADS_COMPLETED]:Nc.D8t,[google.ima.AdEvent.Type.SKIPPED]:Nc.N8t,[google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED]:Nc.B8t,[google.ima.AdEvent.Type.LOG]:Nc.M8t,[google.ima.AdEvent.Type.VIEWABLE_IMPRESSION]:Nc.L8t,[google.ima.AdEvent.Type.VOLUME_CHANGED]:Nc.O8t,[google.ima.AdEvent.Type.VOLUME_MUTED]:Nc.F8t}[t]}(t.type),s={type:e,date:new Date,jnt:i?this.Ori(i):void 0,J9t:D3(e,t.getAdData())};this.So(s)},this.forwardAdErrorEventListener=t=>{this.So({date:new Date,jnt:void 0,type:I3.U8t,J9t:{D7t:M3(t.getError())}})},this.Q0t=t,this.bti=i,this.sc=e,this.sc.wn(Qh.yn,this.Mri),this.Q0t.init(this.bti.kri,this.bti.Sri,google.ima.ViewMode.NORMAL),this.Q0t.addEventListener(google.ima.AdEvent.Type.LOADED,this.Lri),this.Q0t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.forwardAdErrorEventListener);for(const t of T5())this.Q0t.addEventListener(t,this.forwardAdEventListener)}};r();var E5=class extends Oi{get Fri(){return this.Uri}get Wii(){return this.A2t}xa(){return new x5(this.Uri)}constructor(t,i){super("nii"),this.Uri=void 0,this.A2t=void 0,this.Uri=t,this.A2t=i}},x5=class extends gp{get adsManager(){return this.Uri}constructor(t){super("adsmanagerloaded"),this.Uri=void 0,this.Uri=t}},P5=class extends Ne{Pti(){var t;null==(t=this.Ati)||t.contentComplete()}async r8t(t,i,e){if(this.Vri)throw new m("Only one ImaAdsRequest can be made at a time.");if(!this.Hri.Eri)throw new m("AdDisplayContainer is not initialized.");this.Ati=new google.ima.AdsLoader(this.Hri.Eri),this.Ati.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoadedListener),this.Ati.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsManagerErrorListener),this.Vri=new Ga,this.Wri=i,this.qri=e;const s=new google.ima.AdsRequest;return t.w6t?s.adTagUrl=t.w6t:t.y6t&&(s.adsResponse=t.y6t),s.linearAdSlotWidth=t.f6t,s.linearAdSlotHeight=t.v6t,s.nonLinearAdSlotWidth=t._6t,s.nonLinearAdSlotHeight=t.g6t,s.contentDuration=t.A6t,s.setAdWillAutoPlay(t.p6t),s.setAdWillPlayMuted(t.m6t),t.b6t&&(s.omidAccessModeRules=t.b6t),this.Ati.requestAds(s),this.Vri.Yy}zg(){var t;void 0!==this.Ati&&(this.Ati.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoadedListener),this.Ati.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsManagerErrorListener),this.Ati.destroy(),this.Ati=void 0),null==(t=this.Vri)||t.Ky("AdsLoader destroyed"),this.Vri=void 0}constructor(t,i){super(),this.Ati=void 0,this.sc=void 0,this.Hri=void 0,this.Vri=void 0,this.Wri=void 0,this.qri=void 0,this.onAdsManagerLoadedListener=t=>{if(this.Wri&&this.qri&&this.Vri){var i;const e=I5(this.qri),s=this.Wri,n=t.getAdsManager({get currentTime(){return s.zx},get duration(){return s.ct}},e),r=new k5(n,this.Hri,this.sc);this.So(new E5(n,this.Hri.Wii)),null==(i=this.Vri)||i.Qy(r),this.Vri=void 0}},this.onAdsManagerErrorListener=t=>{var i;const e={Iy:t.getError().getMessage(),R9t:t.getError().getVastErrorCode(),TZt:t.getError().getErrorCode(),Km:N3(t.getError().getType()),D9t:void 0};null==(i=this.Vri)||i.Ky(e),this.Vri=void 0},this.sc=i,this.Hri=t}};function I5(t){const i=new google.ima.AdsRenderingSettings;return i.enablePreloading=t.Zti,t.Jti&&(i.uiElements=t.Jti),i.mimeTypes=t.Yti,void 0!==t.tii&&(i.playAdsAfterTime=t.tii),void 0!==t.$ti&&(i.loadVideoTimeout=t.$ti),void 0!==t.z9&&(i.bitrate=t.z9),void 0!==t.tii&&(i.playAdsAfterTime=t.tii),i.restoreCustomPlaybackStateOnAdBreakComplete=!0,i}r();var C5=class extends Ne{get zx(){return this.oa.xP?this.zri:this.oa.Gx()}get ct(){return this.oa.Nd()}get oP(){return this.oa.oP}get OP(){return this.oa.OP}hr(){this.zri=0}constructor(t){super(),this.zri=void 0,this.oa=void 0,this.oa=t,this.zri=this.oa.Gx(),this.oa.wn(d.py,()=>{this.oa.xP||(this.zri=this.oa.Gx()),this.So(new B(this.zx,void 0))})}};i4.Bg.registerWebImaAdPlayerConstructor(function(t,i,e){Z3(e);const s=zn(e)?t.zP():void 0,n=new A5(s,t.xe),r=new P5(n,t.Wu),h=new C5(t);return new t4(t,i,e,t.Jst,n,r,h)}),r(),r(),r();var R5=class extends VF{get Gri(){return this.oa===this.dnt?this.k5t:this.dnt}gr(t,i,e,s,n){(n||!s.lP||s.Qx)&&this.oa.lP&&this.oa.QP()}Xx(t,i){}Wx(t){}Xri(t,i){const e=t-this.k5t.jri;return super.Xx(e,i)}Qri(t){return super.Wx(t)}qx(){return this.dnt.bt}nu(){return this.dnt.nu()}Nd(){return this.dnt.Nd()}EP(){const t=Uo.jn(this.dnt.EP()).Ly(this.k5t.jri);if(this.Kri())return t._s();const i=Uo.jn(this.k5t.EP());let e=i;return a8(this.dnt)||(e=t.HM(i)),e=e.Mn(Uo.nL(0,this.Gx())),e._s()}Gx(){return this.Yri(super.Gx())}Yri(t){return this.k5t.Jri?this.k5t.Jri:this.oa===this.k5t?this.k5t.Zri+t:this.k5t.jri+t}Hx(){return this.$ri(super.Gx())}$ri(t){return this.k5t.thi?this.k5t.thi:this.oa===this.k5t&&this.k5t.ihi?new Date(this.k5t.ihi.getTime()+1e3*t):this.dnt.Vx}Ux(){const t=Uo.jn(this.dnt.Ux()).Ly(this.k5t.jri);if(this.Kri())return t._s();const i=Uo.jn(this.k5t.Ux());if(t.An(t.V-1){var i;t.target.removeEventListener("transitionend",this.Shi);const e=null==(i=this.yhi)?void 0:i.parentElement;void 0!==this.yhi&&e&&(e.removeChild(this.yhi),this.yhi=void 0)},this.whi=s,this.bhi=n,this.Ahi=r}},W5=class extends H5{Kri(){return!0}gr(t,i,e,s,n){super.gr(t,i,e,s,n),D5(this.oa,this.Gri),this.Gri.oP=!0,this.Thi=this.dnt.nt.NI.filter(t=>t.Qk===xh.Kn);for(const t of this.Thi)t.Qk=xh.Nh;i.style.display="block",i.style.width="45%",i.style.height="45%",i.style.top="27.5%",i.style.transform="scale("+100/45+")",i.style.transformOrigin="left center",e.style.right="0",e.style.top="27.5%",e.style.display="block",e.style.width="45%",e.style.height="45%",e.style.transformOrigin="right center",e.style.transform="scale(0)",e.getBoundingClientRect(),e.style.transition="transform 1s ease-in-out",e.style.transform="scale(1) translateX(-"+2.5/45*100+"%)",i.style.transition="transform 1s ease-in-out",i.style.transform="scale(1) translateX("+2.5/45*100+"%)"}mr(t,i,e){var s;super.mr(t,i,e),i.style.width="100%",i.style.height="100%",i.style.top="",i.style.transform="scale(0.45) translateX("+2.5/45*100+"%)",i.style.transformOrigin="left center",i.style.transition="",i.getBoundingClientRect(),i.style.transform="",i.style.transition="transform 1s ease-in-out",i.addEventListener("transitionend",this.khi),e.style.transform="scale(0)",e.addEventListener("transitionend",this.Ehi);for(const t of null!=(s=this.Thi)?s:[])t.Qk=xh.Kn;this.Thi=void 0}Yx(){return this.dnt.Yx()||this.k5t.Yx()}Zx(){return this.dnt.Zx()||this.k5t.Zx()}TP(){return _.min(this.dnt.AP,this.k5t.AP)}QP(){this.dnt.QP(),this.k5t.QP()}constructor(t,i,e,s,n){super(t,i,i,e,s,n),this.Thi=void 0,this.khi=t=>{const i=t.target;i.removeEventListener("transitionend",this.khi),i.style.transform="",i.style.transition="",i.style.transformOrigin=""},this.Ehi=t=>{const i=t.target;i.removeEventListener("transitionend",this.Ehi),i.style.display="none",i.style.width="100%",i.style.height="100%",i.style.right="",i.style.top="",i.style.transition="",i.style.transform="",i.style.transformOrigin=""}}};r();var q5=class extends H5{gr(t,i,e,s,n){super.gr(t,i,e,s,n),this.Gri.jP();const r=this.shi(i,e);r.style.display="block",r.getBoundingClientRect()}constructor(t,i,e,s,n,r){super(t,i,e,s,n,r),this.xhi=t=>{const i=t.target;i.removeEventListener("transitionend",this.xhi),i.style.transition=""}}},z5=class extends q5{Kri(){return!0}shi(t,i){return t}nhi(t,i){return i}gr(t,i,e,s,n){super.gr(t,i,e,s,n);const r=this.shi(i,e);r.style.transform="\n translate(-50%, -50%)\n scale(calc(43/60))\n translate(calc(50% + 100%/30), calc(50% + 100%/30))\n ",r.style.transition="transform 1s ease-in-out"}mr(t,i,e){super.mr(t,i,e);const s=this.shi(i,e);s.style.display="",s.style.transform="",s.addEventListener("transitionend",this.xhi)}constructor(t,i,e,s,n){super(t,i,t,e,s,n)}},G5=class extends q5{Kri(){return!1}shi(t,i){return i}nhi(t,i){return t}gr(t,i,e,s,n){super.gr(t,i,e,s,n);for(const t of[i,e])t.style.transform="\n translate(-50%, -50%)\n scale(calc(43/60))\n translate(calc(50% + 100%/30), calc(50% + 100%/30))\n ",t.style.transition="transform 1s ease-in-out"}mr(t,i,e){super.mr(t,i,e);const s=this.shi(i,e);s.style.display="none",s.style.transform="",s.style.transition="";const n=this.nhi(i,e);n.style.display="",n.getBoundingClientRect(),n.style.transform="",n.addEventListener("transitionend",this.xhi)}QP(){super.QP(),zs.X_&&(this.Gri.oP=!0,this.Gri.QP())}constructor(t,i,e,s,n){super(t,i,i,e,s,n)}};r(),r(),r();var X5=class extends VF{gr(t,i){}mr(t){}},j5=class extends X5{Xx(t,i){}},Q5=class extends X5{Xx(t,i){}gr(t,i){i.style.backgroundImage="url('"+this.whi+"')",i.style.backgroundSize="contain",i.style.backgroundPosition="center",t.style.transition="transform 1s ease-in-out",t.style.transform="\n translate(-50%, -50%)\n scale(calc(43/60))\n translate(calc(50% + 100%/30), calc(50% + 100%/30))\n "}mr(t){t.style.transform="",t.addEventListener("transitionend",this.xhi)}constructor(t,i){super(t),this.whi=void 0,this.xhi=t=>{const i=t.target;i.removeEventListener("transitionend",this.xhi),i.style.transition="transform 1s ease-in-out"},this.whi=i}};r();var vh=class extends Oi{xa(){return new K5(this.interstitial.Ont())}constructor(t){super("Phi"),this.interstitial=void 0,this.interstitial=t}},K5=class extends gp{constructor(t){super("interstitialbegin"),this.interstitial=void 0,this.interstitial=t}};function Y5(t){return{get id(){return t.o},get duration(){return t.ct},get startTime(){return t.CO},get type(){return"adbreak"},get layout(){return function(t){switch(t){case Er.SINGLE:return"single";case Er.DOUBLE:return"double";case Er.LSHAPE_CONTENT:case Er.LSHAPE_AD:return"l-shape"}}(t.Ihi)},get ads(){return t.Jc.map(t=>t.Ont())},get backdropUri(){return t.Chi},get adTagParameters(){return t.phi},set adTagParameters(i){Qd(i)?t.phi=i:zd.dm("Incorrect ad tag parameters type, expecting a Record.")}}}r(),r(),r(),r();var pl=function(t){return t.image="image",t}({}),J5=function(t){return t.png="png",t.svg="svg",t}({}),Z5=class extends V5{get Km(){return"overlay"}get KYt(){return this.Rhi}get Dhi(){return this.Nhi}er(t){var i,e;this.Nhi=null!=(i=t.imageUrl)?i:this.Nhi,this.Rhi=null!=(e=t.clickThrough)?e:this.Rhi,super.er(t)}Ont(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get type(){return"overlay"},get id(){return t.o},get duration(){return t.ct},get startTime(){return t.CO},get clickThrough(){return t.KYt},get imageUrl(){return t.Dhi},get position(){return function(t){return{get top(){return t.utt},get bottom(){return t.att},get left(){return t.ott},get right(){return t.htt}}}(t.mo)},get size(){return function(t){return{get width(){return t.Ti},get height(){return t.Mi}}}(t.Wy)},get adTagParameters(){return t.phi},set adTagParameters(i){Qd(i)?t.phi=i:zd.dm("Incorrect ad tag parameters type, expecting a Record.")}}}(this)}constructor(t){super(t),this.hu=void 0,this.Bhi=void 0,this.mo=void 0,this.Wy=void 0,this.Mhi=void 0,this.Lhi=void 0,this.cZt=void 0,this.Rhi=void 0,this.Nhi=void 0,this.Bhi=t.Km,this.mo=t.mo,this.Wy=t.Wy,this.Mhi=t.Mhi,this.Lhi=t.Lhi,this.cZt=t.cZt,this.Rhi=t.Ohi}};r();var $5=class extends V5{get Km(){return"adbreak"}get Jc(){return this.qc}er(t){var i;t.ad&&this.qc.push(t.ad),this.Chi=null!=(i=t.backdropUri)?i:this.Chi,this.Fhi=t.backdropClickThrough,this.Uhi=t.backdropImpressionUrl,super.er(t)}Ont(){var t;return null!=(t=this.hu)?t:this.hu=Y5(this)}constructor(t){super(t),this.hu=void 0,this.qc=[],this.Syt=void 0,this.Vhi=void 0,this.Ihi=void 0,this.Hhi=void 0,this.Whi=void 0,this.qhi=void 0,this.zhi=void 0,this.Chi=void 0,this.Fhi=void 0,this.Uhi=void 0,this.Syt=t.Syt,this.Vhi=t.Vhi,this.Ihi=t.Ihi||Er.SINGLE,this.Hhi=t.Hhi,this.Whi=t.Whi,this.zhi=t.Ghi,this.Chi=t.Xhi,this.qhi=t.qhi}};r(),r();var t6=class extends tn{jhi(t){this.qc.push(t)}get pP(){return this.Qhi.pP}get u$t(){return we.knt}get G0t(){var t;return null!=(t=this.Qhi.ct)?t:-1}get qOt(){return this.Qhi.CO}get y0t(){}get Khi(){return this.Qhi}constructor(t){var i;super(t.CO),this.Qhi=void 0,this.Qhi=t,this.X0t=null!=(i=this.Qhi.ct)?i:-1}};r(),r();var i6=class extends gn{xa(){return La(this)}get u$t(){return we.knt}constructor(t){super(t,function(t){return t===Er.LSHAPE_CONTENT?Hs.L4t:Hs.BZt}(t.Khi.Ihi)),t.jhi(this)}};var e6=class extends i6{constructor(t,i){super(t),this.Zb=_.min(i,this.od.G0t)}};r();var rr="ott_placement",s6=class{async Yhi(t,i,e){const s=Y({},t.phi,i),n=new xr(s);n.set("iu",t.Jhi),n.set("sz",t.Zhi),n.set("c",String(this.$hi));const r="https://securepubads.g.doubleclick.net/gampad/adx?"+n.toString();return await this.toi(r,e)}async toi(t,i){const e=new ro({Yu:t,fk:Bi.BT,Hk:Qe.GET,Yg:i});try{const t=await this.aV.vk(e);return await t.lk()}catch(t){throw new ys($c.NETWORK,xs.UNKNOWN_AD_RESPONSE,"The ad source could not be loaded.",t)}}constructor(t){this.$hi=(new Date).getTime(),this.aV=void 0,this.aV=t}},n6=function(t){return t.ioi="0",t.jw="1",t.eoi="2",t.PICTURE_IN_PICTURE="3",t.soi="4",t.noi="5",t.roi="99",t}({});function r6(t){switch(t){case Er.DOUBLE:return"3";case Er.SINGLE:return"0";case Er.LSHAPE_AD:case Er.LSHAPE_CONTENT:return"4"}}var h6=function(t){return t.AD_PAUSED="adpaused",t.AD_ERROR="aderror",t.AD_ENDED="adended",t}({}),ss=function(t){return t[t.GOOGLE=0]="GOOGLE",t[t.DEFAULT=1]="DEFAULT",t[t.COMPANION=2]="COMPANION",t[t.CSAI=3]="CSAI",t}({}),Gn=class extends Ne{get K0t(){return this.y1t}get hoi(){return this.ooi}get Fnt(){return this.w1t}get hti(){return this.u1t}aoi(){return Boolean(this.ooi)}uoi(t){}QP(){}jP(){}coi(t){}doi(t){this.loi=this.foi(t),this.voi=!t[rr]}foi(t){const i=ru(t);return t[rr]||(i[rr]=r6(Er.SINGLE)),i}_oi(t){if(!this.voi)return;const i=this.loi[rr],e=r6(t);i!==e&&(this.loi[rr]=e)}async goi(t,i,e,s){const n=await this.poi(t,i,e);return await this.k5t.IP(n,{},e),n}async moi(t,i){if(t.zhi)try{const e=Y({},this.loi,{ott_placement:n6.soi}),s=await this.woi.Yhi(t.zhi,e,i);t.er({backdropUri:null==s?void 0:s.image,backdropClickThrough:null==s?void 0:s.clickThrough,backdropImpressionUrl:null==s?void 0:s.impression})}catch(t){throw new m("Could not load the backdrop")}}yoi(t,i){let e;if(t.COi.Khi===t)}Soi(){this.k5t.wn(d.py,this.Q6),this.k5t.wn(d.Nw,this.Toi),this.k5t.wn(hc.ma,this.WQt)}koi(){this.k5t.mn(d.py,this.Q6),this.k5t.mn(d.Nw,this.Toi),this.k5t.mn(hc.ma,this.WQt)}bd(t){var i;null==(i=this.ooi)||i.dhi(this.Yri(t.currentTime))}async Eoi(t,i,e,s,n){const r={stack:[],error:void 0,hasError:!1};try{var h;null==(h=this.uV)||h.Zg();const i=Es(r,Zc.ep([e]),!1);this.uV=i;const o=i.Yg;return fr(o),await this.k5t.Eoi(t,s,n,o)}catch(t){r.error=t,r.hasError=!0}finally{Zs(r)}}U9t(t){void 0!==this.xoi?(this.ooi=this.xoi,this.xoi=void 0,this.w1t=this.y5t(this.ooi),this.u1t=new e6(this.w1t,this.k5t.Nd()),this.ooi.er({ad:this.hti}),this.R5t.So(new Ta(this.w1t)),this.R5t.So(new nc(this.u1t,t))):zd.um("Expected an ad to start.")}Bd(t){this.ooi&&(this.ooi.dhi(t),this.ooi.pP=!0,this.Aoi(this.ooi),this.ooi=void 0),this.u1t&&(this.R5t.So(new fc(this.u1t,t)),this.u1t=void 0),this.w1t?(this.R5t.So(new Za(this.w1t)),this.w1t=void 0):(zd.um("An ad break has ended without realizing we are in an ad break."),this.So(new gp("adended")))}Yri(t){var i,e;return(null!=(e=null==(i=this.ooi)?void 0:i.CO)?e:0)+t}async hr(){var t;null==(t=this.uV)||t.Zg(),this.uV=void 0,this.koi(),this.y1t=[],this.u1t=void 0,this.w1t=void 0,this.ooi=void 0,this.xoi=void 0}async kn(){await this.hr(),await this.Poi.kn()}constructor(t,i,e,s,n){super(),this.k5t=void 0,this.Poi=void 0,this.R5t=new tl,this.woi=void 0,this.y1t=[],this.w1t=void 0,this.u1t=void 0,this.ooi=void 0,this.xoi=void 0,this.loi=void 0,this.voi=!0,this.uV=void 0,this.Q6=t=>{this.bd(t)},this.Toi=t=>{this.Bd(this.Yri(this.k5t.Gx()))},this.WQt=()=>{this.So(new $h($c.GENERAL))},this.k5t=t,this.Poi=i,this.y1t=e,this.woi=s,this.Poi.Ioi(this),this.R5t=i.u4t,this.loi=this.foi(n),this.voi=!n[rr]}},o6="com.theoplayer.theoads.interstitial",a6="com.theoplayer.theoads.overlay",u6="X-ASSET-URI",c6="X-ASSET-URI-VAST",d6=class{get Coi(){return this.Roi}Doi(t){this.Noi=new EventSource(t),this.Noi.addEventListener("adbreak",this.Boi),this.Noi.addEventListener("overlay",this.Moi),this.Noi.addEventListener("streaminfo",this.Loi)}Ooi(t){if(!Ct(this.Foi,t)){this.Foi.push(t);for(const i of t.NI)this.Uoi(i);t.wn(N.rI,this.Wn),t.wn(N.oI,this.Gn)}}Voi(t){if(Ct(this.Foi,t)){_e(this.Foi,t),t.mn(N.rI,this.Wn),t.mn(N.oI,this.Gn);for(const i of t.NI)this.Hoi(i)}}Uoi(t){!this.Woi&&function(t){return t.Lt===us.zU&&t.Km===nh.DATE_RANGE}(t)&&this.qoi!==t?this.zoi(t):this.Woi&&function(t){return t.Lt===us.zU&&t.Km===nh.ID3}(t)&&this.Goi!==t&&this.Xoi(t)}Hoi(t){this.qoi===t?this.zoi(void 0):this.Goi===t&&this.Xoi(void 0)}zoi(t){const i=this.qoi;if(void 0!==i){if(i.L)for(const t of i.L.NI)this.joi(t);i.mn(Te.uI,this.Qoi),i.mn(Te.fI,this.Koi),i.mn(Te._I,this.Yoi),i.mn(Te.dI,this.Joi),i.Qk=xh.iC}if(this.qoi=t,void 0!==t){if(t.L)for(const i of t.L.NI)this.Zoi(i);t.wn(Te.uI,this.Qoi),t.wn(Te.fI,this.Koi),t.wn(Te._I,this.Yoi),t.wn(Te.dI,this.Joi),t.Qk=xh.iC}}Xoi(t){const i=this.Goi;if(void 0!==i){if(i.L)for(const t of i.L.NI)this.joi(t);i.mn(Te.uI,this.$oi),i.mn(Te._I,this.Yoi),i.mn(Te.dI,this.Joi),i.Qk=xh.iC}if(this.Goi=t,void 0!==t){if(t.L)for(const i of t.L.NI)this.tai(i);t.wn(Te.uI,this.$oi),t.wn(Te._I,this.Yoi),t.wn(Te.dI,this.Joi),t.Qk=xh.iC}}iai(t){try{var i,e;const s=JSON.parse(t.data),n=s.networkCode,r=null==(i=s.assetKeys)?void 0:i[0];this.nai.eai(n,r),null==(e=this.Noi)||e.removeEventListener("streaminfo",this.Loi)}catch(t){zd.dm("Error parsing the Server sent stream info",t)}}rai(t){const i=this.nai.Vx;if(void 0!==i)try{const n=JSON.parse(t.data);var e;const r=null!=(e=n.podDuration)?e:n.adBreakDuration;if(void 0===r)return void zd.dm("Tried to schedule an ad break without knowing the duration");const h=(Date.parse(n.startDate)-i.getTime())/1e3;if(h<=-r)return;const o=this.nai.Gx()+h,a=n.networkCode,u=n.assetKey,c=n.podId?x(n.podId):void 0,d=this.hai(Er[n.layout]),l=n.assetURIVAST,f=void 0!==u&&void 0!==a||c,v=!f&&void 0!==l;var s;let _=null!=(s=n.assetURI)?s:"";f?_="theo-ads://dai.break/?d="+r:v&&(_=l);const g=this.oai(d,_,v),p=new $5({o:n.id,CO:o,Syt:_,Vhi:g,Ihi:d,Hhi:a,Whi:u,hOt:r,ghi:c,Xhi:n.backdropURI,Ghi:l6(n.backdropURIGamProperties),Qvt:n.startPTS,qhi:n.eabnVersion});this.boi(p,void 0)}catch(t){zd.dm("Error parsing the Server sent event",t)}else zd.dm("Tried to schedule an ad break without knowing the Program Date Time of the player")}aai(t){const i=this.nai.Vx;if(void 0!==i)try{var e;const s=JSON.parse(t.data),n=s.duration;if(void 0===n)return void zd.dm("Tried to schedule an overlay without knowing the duration");const r=(Date.parse(s.startDate)-i.getTime())/1e3;if(r<=-n)return;const h=this.nai.Gx()+r,o=pl[s.type],a=new Z5({o:s.id,Km:o||pl.image,CO:h,hOt:n,mo:v6(s.position),Wy:_6(s.size),Mhi:s.opacity,Lhi:l6(s.gamProperties),cZt:null==(e=s.resourceURI)?void 0:e.map(t=>f6(t)),Ohi:s.clickThroughURI});this.boi(a,void 0)}catch(t){zd.dm(t)}else zd.dm("Tried to schedule an overlay without knowing the Program Date Time of the player")}Zoi(t){if((t.nOt===o6||t.nOt===a6)&&(t.oOt[u6]||t.oOt[c6]))switch(t.nOt){case a6:this.uai(t);break;case o6:this.cai(t)}}uai(t){try{var i;if(void 0===t.ct&&void 0===t.hOt)return;const e=atob(t.oOt["X-COM-THEOPLAYER-THEOADS-OVERLAY-PROPERTIES"]),s=JSON.parse(e),n=pl[s.type],r=this.nai.lai(t.CO),h=isFinite(t.RO)?this.nai.lai(t.RO):void 0,o=new Z5({o:t.o,Km:n||pl.image,CO:r,RO:h,ct:t.ct,hOt:t.hOt,mo:v6(s.position),Wy:_6(s.size),Mhi:s.opacity,Lhi:l6(s.gamProperties),cZt:null==(i=s.resourceURI)?void 0:i.map(t=>f6(t)),Ohi:s.clickThroughURI});this.boi(o,t)}catch(t){zd.dm(t)}}cai(t){const i=t.oOt["X-RESUME-OFFSET"];if(void 0===t.ct&&void 0===t.hOt&&void 0===i)return;const e=t.oOt[u6],s=t.oOt[c6],n=Q2(e)?function(t){const i=t.split("?")[1],e={},s=new URLSearchParams(i);return e.d=Number(s.get("d"))||void 0,e.k=s.get("k")||void 0,e.n=s.get("n")||void 0,e.p=Number(s.get("p"))||void 0,e}(e):void 0,r=null==n?void 0:n.n,h=null==n?void 0:n.k,o=this.nai.lai(t.CO),a=isFinite(t.RO)?this.nai.lai(t.RO):void 0,u=this.hai(Er[t.oOt["X-COM-THEOPLAYER-THEOADS-LAYOUT"]]),c=t.oOt["X-COM-THEOPLAYER-THEOADS-BACKDROP-GAMPROPERTIES"],d=c?JSON.parse(atob(c)):void 0,l=null==n?void 0:n.p,f=!(void 0!==r&&void 0!==h||l)&&void 0!==t.oOt[c6],v=f?s:e,_=this.oai(u,v,f),g=new $5({o:t.o,CO:o,Syt:v,Vhi:_,Ihi:u,Hhi:r,Whi:h,Xhi:t.oOt["X-COM-THEOPLAYER-THEOADS-BACKDROP"],Ghi:l6(d),RO:a,ct:t.ct,hOt:t.hOt,ghi:l,fhi:void 0!==i?Number(i):void 0});this.boi(g,t),this.fai=g}hai(t){return t===Er.LSHAPE_CONTENT?t:this.vai||t}oai(t,i,e){return t===Er.LSHAPE_CONTENT?ss.COMPANION:e?ss.CSAI:Q2(i)?ss.GOOGLE:ss.DEFAULT}tai(t){const i=t.U;if(!function(t){return"GEO"===t.id||"GEOB"===t.id}(i)||!function(t){return"Anvatos"===t.description&&"application/json"===t.mimeType}(i))return;const e=nm(new DataView(i.data),new oi),s=new xr(e),n=s.get("type");if("cue"===n){let i=Number(s.get("duration"))/1e3||void 0;const e=new xr(s.get("payload")),n=Number(e.get("dur"))||void 0,r=Number(e.get("s_bd"))||void 0;if(void 0!==n?i=n:void 0!==r&&(i=r/10),!i)return void 0;const h="theo-ads://dai.break/?d="+i,o=Number(s.get("pts"))||void 0,a=this.nai.lai(t.CO),u=this.hai(Er.SINGLE),c=new $5({o:t.o,CO:a,Syt:h,Vhi:ss.GOOGLE,Ihi:u,hOt:i,Qvt:o});this.boi(c,t)}else if("cue_end"===n){const i=this.fai;i&&i.er({ct:this.nai.lai(t.CO)-i.CO})}}_ai(t){const i=this.gai.get(t.JI);i&&this.nai.pai(i.CO)}mai(t){for(const i of this.Roi)if(t.o===i.o&&t.Km===i.Km)return!0;return!1}wai(t){const i=[];if(0===this.nai.EP().length)return zd.um("Seekable is undefined."),!1;const e=this.nai.EP().start(0);for(const s of this.yai)if(s.ahi=s||(this.Roi.push(t),i?this.gai.set(i.JI,t):this.yai.push(t),this.nai.boi(t))}bai(t){const i=this.gai.get(t.JI);if(void 0===i)return;const e=t.oOt["X-RESUME-OFFSET"],s=isFinite(t.RO)?this.nai.lai(t.RO):void 0;i.er({ct:t.ct,RO:s,fhi:void 0!==e?Number(e):void 0})}joi(t){this.Aai(t)}Aai(t){void 0!==this.gai.get(t.JI)&&this.gai.delete(t.JI)}Sai(t){t.forEach(t=>this.Aoi(t))}Aoi(t){_e(this.Roi,t)}hr(){var t,i,e,s;this.fai=void 0,this.zoi(void 0),this.Xoi(void 0);for(const t of this.Foi.slice())this.Voi(t);Wt(this.Foi),Wt(this.Roi),Wt(this.yai),this.gai.clear(),null==(t=this.Noi)||t.removeEventListener("adbreak",this.Boi),null==(i=this.Noi)||i.removeEventListener("overlay",this.Moi),null==(e=this.Noi)||e.removeEventListener("streaminfo",this.Loi),null==(s=this.Noi)||s.close(),this.Noi=void 0}kn(){this.hr()}constructor(t){this.nai=void 0,this.Woi=!1,this.vai=void 0,this.Roi=[],this.yai=[],this.gai=re(),this.fai=void 0,this.Foi=[],this.qoi=void 0,this.Goi=void 0,this.Noi=void 0,this.Wn=t=>{this.Uoi(t.Ht)},this.Gn=t=>{this.Hoi(t.Ht)},this.Qoi=t=>{this.Zoi(t.PO)},this.$oi=t=>{this.tai(t.PO)},this.Yoi=t=>{this._ai(t.PO)},this.Joi=t=>{this.joi(t.PO)},this.Koi=t=>{this.bai(t.PO)},this.Boi=t=>{this.rai(t)},this.Moi=t=>{this.aai(t)},this.Loi=t=>{this.iai(t)},this.nai=t}};function l6(t){if(!t)return;let i=t.sz.default;return zs.Ks&&t.sz.phone?i=t.sz.phone:zs.og&&t.sz.tv&&(i=t.sz.tv),{Jhi:t.iu,Zhi:i,phi:t.adTagParameters}}function f6(t){const i=J5[t.type];let e=t.default;return zs.Ks&&t.phone?e=t.phone:zs.og&&t.tv&&(e=t.tv),{Km:i,Syt:e}}function v6(t){let i,e,s,n;return t.top&&t.top>=0&&t.top<=100?i=t.top:t.bottom&&t.bottom>=0&&t.bottom<=100?e=t.bottom:i=10,t.left&&t.left>=0&&t.left<=100?s=t.left:t.right&&t.right>=0&&t.right<=100?n=t.right:s=10,{utt:i,att:e,ott:s,htt:n}}function _6(t){let i,e;return i=t.width&&t.width>=0&&t.width<=100?t.width:10,e=t.height&&t.height>=0&&t.height<=100?t.height:10,{Ti:i,Mi:e}}r();var g6=class extends Ne{get Tai(){return this.oa.Tai.map(t=>t.Ont())}get kai(){return this.oa.kai.map(t=>t.Ont())}doi(t){Qd(t)?this.oa.doi(t):zd.dm("Incorrect ad tag parameters type, expecting a Record.")}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get currentInterstitials(){return t.Tai},get scheduledInterstitials(){return t.kai},replaceAdTagParameters(i){t.doi(i)},addEventListener(i,e){t.wn(i,e)},removeEventListener(i,e){t.mn(i,e)}}}(this)}constructor(t){super(),this.oa=void 0,this.hu=void 0,this.oa=t}};r();var p6=class{Ioi(t){this.Eai=t}get u4t(){return this.R5t}get w4t(){var t;return void 0!==(null==(t=this.Eai)?void 0:t.Fnt)}get r4t(){return we.knt}get Lnt(){var t;return(null==(t=this.Eai)?void 0:t.hti)?[this.Eai.hti]:[]}get Fnt(){var t,i;return null!=(i=null==(t=this.Eai)?void 0:t.Fnt)?i:null}get Unt(){return this.Eai?hs(this.Eai.K0t,t=>{var i;const e=t.Jc;if(t===(null==(i=this.Eai)?void 0:i.Fnt)&&void 0!==this.Eai.hti){const t=e.indexOf(this.Eai.hti);if(t>=0)return e.slice(t+1)}return t.pP?[]:e}):[]}get Vnt(){return this.Eai?this.Eai.K0t.filter(t=>{var i;return t===(null==(i=this.Eai)?void 0:i.Fnt)||!t.pP}):[]}uD(){}Hnt(t){}qnt(t){}kn(){return this.Eai=void 0,Promise.resolve()}constructor(){this.R5t=new tl,this.Eai=void 0}};r();var m6=class{get Tai(){return this.xai}get phi(){return this.loi}set phi(t){this.loi=t}async Pai(t){this.Iai.style.display="";const i=h.createElement("div");i.className="theoplayer-theoads-overlay",i.style.display="",this.Cai.set(t.o,i);const e=h.createElement("a"),s=await this.Rai(t);if(s.clickThroughURI&&(this.Iai.style.zIndex="11",e.href=s.clickThroughURI,e.target="Xu",e.setAttribute("rel","noopener"),e.addEventListener("mousedown",this.$ii),e.addEventListener("touchend",this.$ii)),t.Bhi===pl.image&&(e.style.backgroundImage="url("+s.resourceURI+")",e.style.backgroundSize="contain",e.style.backgroundPosition="center",e.style.backgroundRepeat="no-repeat",s.impressionURI)){const t=h.createElement("img");t.src=s.impressionURI,t.style.display="none",e.appendChild(t)}Go(e),function(t,i){t.style.position="absolute";const e=i.mo;e.ott&&(t.style.left=e.ott+"%");e.htt&&(t.style.right=e.htt+"%");e.utt&&(t.style.top=e.utt+"%");e.att&&(t.style.bottom=e.att+"%");const s=i.Wy;s.Ti&&(t.style.width=s.Ti+"%");s.Mi&&(t.style.height=s.Mi+"%");i.Mhi&&i.Mhi>0&&i.Mhi<=100&&(t.style.opacity=""+i.Mhi/100)}(i,t),i.appendChild(e),this.Iai.appendChild(i),this.xai.push(t)}Dai(t){const i=this.Cai.get(t.o);i&&(this.Iai.contains(i)&&this.Iai.removeChild(i),this.Cai.delete(t.o),0===this.Cai.size&&(this.Iai.style.display="none"),_e(this.xai,t))}Nai(){this.Cai.forEach(t=>{this.Iai.contains(t)&&this.Iai.removeChild(t)}),this.Cai.clear(),this.xai=[]}async Rai(t){const i={resourceURI:""};let e;if(t.Lhi){const i=Y({},this.loi,t.phi);i&&!i[rr]&&(i[rr]=n6.noi),e=await this.Bai.Yhi(t.Lhi,i)}if(e)i.resourceURI=e.image,i.impressionURI=e.impression;else if(t.cZt){const e=hh(t.cZt,t=>t.Km===J5.svg);e&&(i.resourceURI=e.Syt);const s=hh(t.cZt,t=>t.Km===J5.png);s&&(i.resourceURI=s.Syt)}var s;return i.clickThroughURI=null!=(s=null==e?void 0:e.clickThrough)?s:t.KYt,t.er({imageUrl:i.resourceURI,clickThrough:i.clickThroughURI}),i}hr(){this.Nai(),this.Iai.style.display="none"}constructor(t,i,e){this.oa=void 0,this.loi=void 0,this.xai=[],this.Iai=void 0,this.Cai=Ba(),this.Bai=void 0,this.gn=void 0,this.Att=t=>{j2(this.Iai,this.oa.MP,this.oa.DP,t.width,t.height)},this.rjt=()=>{j2(this.Iai,this.oa.MP,this.oa.DP,this.gn.Eu,this.gn.Iu)},this.$ii=t=>{t.stopPropagation()},this.oa=t,this.Bai=e;const s=h.createElement("div");s.style.display="none",s.className="theoads-image-overlays-container",Go(s),i.appendChild(s),this.Iai=s,this.gn=new bD(i),this.gn._n(),this.gn.wn(Qh.yn,this.Att),this.oa.wn(d.Jw,this.rjt)}};r();var w6=class extends gp{constructor(t){super("addinterstitial"),this.interstitial=void 0,this.interstitial=t}};r();var y6=class extends Oi{xa(){return new b6(this.interstitial.Ont())}constructor(t){super("Mai"),this.interstitial=void 0,this.interstitial=t}},b6=class extends gp{constructor(t){super("interstitialend"),this.interstitial=void 0,this.interstitial=t}};r();var A6=class extends Oi{xa(){return new S6(this.interstitial.Ont(),this.Iy)}constructor(t,i){super("Lai"),this.interstitial=void 0,this.Iy=void 0,this.interstitial=t,this.Iy=i}},S6=class extends gp{constructor(t,i){super("interstitialerror"),this.interstitial=void 0,this.message=void 0,this.interstitial=t,this.message=i}};r();var T6=class extends Gn{get Vhi(){return ss.DEFAULT}Oai(){return!1}BW(t,i,e){return Promise.resolve()}async Fai(t,i,e,s){void 0===s&&(s=!1);const n=this.yoi(t,i),r=await this.poi(t,i,e);return this.Eoi(r,t,e,n,s)}async poi(t,i,e){this.xoi=t;return ra({sources:{src:t.Syt}})}Soi(){super.Soi(),this.k5t.wn(Jr.PM,this.Uai)}koi(){this.k5t.mn(Jr.PM,this.Uai),super.koi()}bd(t){if(!this.ooi)return void zd.um("Got timeupdate without a current interstitial");const i=this.Yri(t.currentTime),e=this.ooi.Q4t;this.ooi.dhi(i);const s=this.ooi.Q4t;e<.25&&s>=.25?this.R5t.So(new ie(this.u1t,i)):e<.5&&s>.5?this.R5t.So(new xe(this.u1t,i)):e<.75&&s>=.75?this.R5t.So(new Qs(this.u1t,i)):this.ooi.pP&&this.Bd(i)}Bd(t){super.Bd(t),this.d9=!1}async hr(){await super.hr(),this.d9=!1}constructor(...t){super(...t),this.d9=!1,this.Uai=t=>{!this.d9&&this.xoi&&(this.d9=!0,this.U9t(this.Yri(t.currentTime)))},this.Toi=t=>{this.Bd(this.Yri(t.currentTime))}}};r(),r(),r();var Ti=class extends gp{constructor(t,i,e){super(t,new Date),this.Vai=void 0,this.jnt=void 0,this.Vai=i,this.jnt=e}},Me=function(t){return t.LOADED="DAILoaded",t.AD_BREAK_STARTED="DAIAdBreakStarted",t.AD_BREAK_ENDED="DAIAdBreakEnded",t.AD_PERIOD_STARTED="DAIAdPeriodStarted",t.AD_PERIOD_ENDED="DAIAdPeriodEnded",t.AD_PROGRESS="DAIAdProgress",t.CUEPOINTS_CHANGED="DAICuePointsChanged",t.CLICK="DAIClick",t.ERROR="DAIError",t.STARTED="DAIStarted",t.FIRST_QUARTILE="DAIFirstQuartile",t.MIDPOINT="DAIMidpoint",t.STREAM_INITIALIZED="DAIStreamInitialized",t.THIRD_QUARTILE="DAIThirdQuartile",t.COMPLETE="DAIComplete",t}({}),k6=class extends Ti{constructor(t,i){super("DAILoaded",t,i)}},E6=class extends Ti{constructor(t,i){super("DAIAdBreakStarted",t,i)}},x6=class extends Ti{constructor(t,i){super("DAIAdBreakEnded",t,i)}},P6=class extends Ti{constructor(t,i){super("DAIAdProgress",t,i)}},I6=class extends Ti{constructor(t,i){super("DAICuePointsChanged",t,i)}},C6=class extends Ti{constructor(t,i){super("DAIClick",t,i)}},R6=class extends Ti{constructor(t,i){super("DAIError",t,i)}},D6=class extends Ti{constructor(t,i){super("DAIStarted",t,i)}},N6=class extends Ti{constructor(t,i){super("DAIFirstQuartile",t,i)}},B6=class extends Ti{constructor(t,i){super("DAIMidpoint",t,i)}},M6=class extends Ti{constructor(t,i){super("DAIStreamInitialized",t,i)}},L6=class extends Ti{constructor(t,i){super("DAIThirdQuartile",t,i)}},O6=class extends Ti{constructor(t,i){super("DAIComplete",t,i)}};var F6=class extends Ne{replaceAdTagParameters(t){return this.Hai.replaceAdTagParameters(null!=t?t:null)}Wai(t){return this.Hai.contentTimeForStreamTime(t)}qai(t){return this.Hai.streamTimeForContentTime(t)}KHt(t,i){const e=function(t){return"vod"===t.availabilityType?new s.google.ima.dai.api.VODStreamRequest(Y({},U6(t),{contentSourceId:t.contentSourceID,videoId:t.videoID})):new s.google.ima.dai.api.LiveStreamRequest(Y({},U6(t),{assetKey:t.assetKey}))}(t);t.enableNonce&&(e.enableNonce=!0),this.Hai.requestStream(e)}hr(){this.zai(!1),this.Hai.reset()}kn(){this.Vo();const t=google.ima.dai.api.StreamEvent.Type;this.Hai.removeEventListener(t.AD_BREAK_STARTED,this.Gai),this.Hai.removeEventListener(t.AD_PROGRESS,this.Xai),this.Hai.removeEventListener(t.CLICK,this.Q1t),this.Hai.removeEventListener(t.COMPLETE,this.jai),this.Hai.removeEventListener(t.CUEPOINTS_CHANGED,this.Qai),this.Hai.removeEventListener(t.ERROR,this.Ts),this.Hai.removeEventListener(t.FIRST_QUARTILE,this.Kai),this.Hai.removeEventListener(t.LOADED,this.Yai),this.Hai.removeEventListener(t.MIDPOINT,this.Jai),this.Hai.removeEventListener(t.STARTED,this.Zai),this.Hai.removeEventListener(t.STREAM_INITIALIZED,this.$ai),this.Hai.removeEventListener(t.THIRD_QUARTILE,this.tui),this.Hai.removeEventListener(t.AD_BREAK_ENDED,this.iui),this.hr(),this.eui&&Ao(this.eui)}sui(t){this.Hai.onTimedMetadata(t)}nui(t,i,e){this.Hai.processMetadata(t,i,e)}rui(t){const i=this.Hai.previousCuePointForStreamTime(t);if(i)return{RO:i.end,CO:i.start,pP:i.played}}hui(t,i){const e=this.rui(t);if(!e)return;const s=t>i&&e.RO>i,n=e.RO>t&&e.CO<=t;return e.pP||!s&&!n?void 0:e.CO}zai(t){this.T2t&&(this.T2t.style.display=t?"block":"none")}constructor(t,i,e){super(),this.Hai=void 0,this.T2t=void 0,this.eui=void 0,this.Gai=void 0,this.iui=void 0,this.Xai=void 0,this.Q1t=void 0,this.jai=void 0,this.Qai=void 0,this.Ts=void 0,this.Kai=void 0,this.Yai=void 0,this.Jai=void 0,this.Zai=void 0,this.$ai=void 0,this.tui=void 0,this.Hai=t,this.T2t=i,this.eui=e,this.Gai=t=>{this.zai(!0);const i=V6(t),e=W6(t);this.So(new E6(i,e))},this.iui=t=>{this.zai(!1);const i=V6(t),e=W6(t);this.So(new x6(i,e))},this.Xai=t=>{const i=V6(t),e=W6(t);this.So(new P6(i,e))},this.Q1t=t=>{const i=V6(t),e=W6(t);this.So(new C6(i,e))},this.jai=t=>{const i=V6(t),e=W6(t);this.So(new O6(i,e))},this.Qai=t=>{const i=V6(t),e=W6(t);this.So(new I6(i,e))},this.Ts=t=>{const i=V6(t),e=W6(t);this.So(new R6(i,e))},this.Kai=t=>{const i=V6(t),e=W6(t);this.So(new N6(i,e))},this.Yai=t=>{const i=V6(t),e=W6(t);this.So(new k6(i,e))},this.Jai=t=>{const i=V6(t),e=W6(t);this.So(new B6(i,e))},this.Zai=t=>{const i=V6(t),e=W6(t);this.So(new D6(i,e))},this.$ai=t=>{const i=V6(t),e=W6(t);this.So(new M6(i,e))},this.tui=t=>{const i=V6(t),e=W6(t);this.So(new L6(i,e))},this.T2t&&(this.T2t.style.display="none",this.Hai.setClickElement(this.T2t));const s=google.ima.dai.api.StreamEvent.Type;this.Hai.addEventListener(s.AD_BREAK_STARTED,this.Gai),this.Hai.addEventListener(s.AD_PROGRESS,this.Xai),this.Hai.addEventListener(s.CLICK,this.Q1t),this.Hai.addEventListener(s.COMPLETE,this.jai),this.Hai.addEventListener(s.CUEPOINTS_CHANGED,this.Qai),this.Hai.addEventListener(s.ERROR,this.Ts),this.Hai.addEventListener(s.FIRST_QUARTILE,this.Kai),this.Hai.addEventListener(s.LOADED,this.Yai),this.Hai.addEventListener(s.MIDPOINT,this.Jai),this.Hai.addEventListener(s.STARTED,this.Zai),this.Hai.addEventListener(s.STREAM_INITIALIZED,this.$ai),this.Hai.addEventListener(s.THIRD_QUARTILE,this.tui),this.Hai.addEventListener(s.AD_BREAK_ENDED,this.iui)}};function U6(t){const i=google.ima.dai.api.StreamRequest.StreamFormat;var e;return{apiKey:t.apiKey,authToken:t.authToken,format:"dash"===t.format?i.DASH:i.HLS,networkCode:t.networkCode,streamActivityMonitorId:t.streamActivityMonitorID,adTagParameters:t.adTagParameters,omidAccessModeRules:null!=(e=L3(t.omidAccessModeRules))?e:{}}}function V6(t){const i=t.getStreamData(),e=i.adProgressData;let s;e&&(s={P9t:e.adBreakDuration,oui:e.duration,I9t:e.adPosition,zx:e.currentTime,ct:e.duration,C9t:e.totalAds});return{aui:s,uui:(i.cuepoints||[]).map(t=>({CO:t.start,RO:t.end,pP:t.played})),cui:i.errorMessage||void 0,dui:i.manifestFormat||void 0,lui:i.streamId||void 0,fui:(i.subtitles||[]).map(t=>({_ui:t.webvtt,gui:t.ttml,bs:t.language})),Yu:i.url}}function H6(t){return{VYt:t.getAdSlotId(),G4t:t.getContent(),GT:t.getContentType(),Mi:t.getHeight(),Ti:t.getWidth()}}function W6(t){const i=t.getAd();if(!i)return;const e=i.getAdPodInfo(),s=i.getCompanionAds().map(H6);return{fJt:i.getAdId(),v7t:{I9t:e.getAdPosition(),G0t:e.getMaxDuration(),Iri:e.getPodIndex(),qOt:e.getTimeOffset(),C9t:e.getTotalAds()},QKt:i.getAdSystem(),Rri:i.getAdvertiserName(),FYt:i.getApiFramework(),sYt:s,wYt:i.getCreativeId(),eti:i.getCreativeAdId(),Dri:i.getDealId(),_N:i.getDescription(),ct:i.getDuration(),gq:i.getTitle(),pui:i.getUniversalAdIdRegistry(),mui:i.getUniversalAdIdValue(),J7t:i.getVastMediaHeight(),Y7t:i.getVastMediaWidth(),X7t:i.getWrapperAdIds(),j7t:i.getWrapperAdSystems(),Q7t:i.getWrapperCreativeIds()}}function q6(){const t=h.body.lastElementChild;if(t instanceof HTMLIFrameElement&&"Advertisement"===t.title)return t}r();var z6=class extends i6{constructor(t){super(t),this.q4t=!0,this.Zb=t.X0t}};r();var G6=class extends i6{a1t(){return this.wui.getAdSystem()}d1t(){return this.od.Khi.Syt}get o(){return this.wui.getAdId()}get ct(){return this.wui.getDuration()}get KYt(){var t,i;return null==(i=this.wui)||null==(t=i.ad)?void 0:t.clickThroughUrl}get wYt(){return this.wui.getCreativeId()}get kJt(){return this.wui.getSkipTimeOffset()}constructor(t,i){super(t),this.wui=void 0,this.wui=i}},X6="urn:google:dai:2018",j6=class extends Gn{get Vhi(){return ss.GOOGLE}Oai(){return!1}async BW(t,i,e){if(t&&i&&(t!==this.yui||i!==this.bui)){if(void 0===this.Hai){var n,r;if(void 0===(null==(r=s.google)||null==(n=r.ima)?void 0:n.dai))throw new m("IMA DAI SDK missing for THEOads");this.Hai=new google.ima.dai.api.StreamManager(this.k5t.xe.querySelector("video"),this.Aui)}return this.yui=t,this.bui=i,this.Sui=this.Tui(),this.Sui}}Tui(){const t=this.Hai;if(!t)return Promise.resolve();this.kui(t),t.reset();const i=new google.ima.dai.api.PodStreamRequest;i.networkCode=this.yui,i.customAssetKey=this.bui,i.adTagParameters=this.loi,this.Eui&&(i.streamActivityMonitorId=this.Eui),i.format="hls";const e=this.xui(t,[google.ima.dai.api.StreamEvent.Type.STREAM_INITIALIZED,google.ima.dai.api.StreamEvent.Type.ERROR]).then(i=>{if(i.type===google.ima.dai.api.StreamEvent.Type.ERROR)throw new m("DAI stream request failed");this.Pui=i.getStreamData(),this.Iui(t)});return t.requestStream(i),e}xui(t,i,e){return new Promise((s,n)=>{if(e&&e.Hg)return n(new Qc);const r=t=>{o(),s(t)},h=()=>{o(),n(new Qc)},o=()=>{for(const e of i)t.removeEventListener(e,r);e&&e.jg(h)};for(const e of i)t.addEventListener(e,r);e&&e.Xg(h)})}doi(t){void 0===t&&(t={}),super.doi(t),this.Cui(this.loi)}Cui(t){var i;void 0===t&&(t={}),null==(i=this.Hai)||i.replaceAdTagParameters(t)}async Rui(t){var i,e;return(null==(i=this.xoi)?void 0:i.ghi)&&!S(this.xoi.ghi)?this.xoi.ghi:this.Dui&&(null==(e=this.xoi)?void 0:e.Qvt)?await ws(()=>this.Nui(),t,4,500,5e3):void 0}async Nui(){const t=this.Dui+"/"+this.yui+"/"+this.bui+"/"+this.xoi.Qvt+".json",i=new ro({Yu:t,fk:Bi.BT,Hk:Qe.GET,Wk:1e3});let e;try{e=await this.k5t.Dx.vk(i)}catch(t){throw new ys($c.NETWORK,xs.UNKNOWN_AD_RESPONSE,"The ad's PodId could not be loaded.")}if(!pA(e))throw new ys($c.NETWORK,xs.UNKNOWN_ERROR,"Something went wrong while requesting JSON from server.");const s=await e.lk();if(s)return s.podid}async Fai(t,i,e,s){void 0===s&&(s=!1);const n=await this.poi(t,i,e);await this.Eoi(n,t,e,void 0,s)}async poi(t,i,e){var s;this.xoi=t;const n=t.Hhi,r=t.Whi;this._oi(t.Ihi);const h=Y({},this.loi,t.phi);this.Cui(h),await this.BW(n,r,e);const o=zd.Dh(t.Syt),a=Number(o.searchParams.get("d")),u=_.floor(1e3*_.min(a,t.ahi-i)),c=await this.Rui(e);if(!c)throw new m("Something went wrong with retrieving the PodID from the server.");(null==(s=this.Pui)?void 0:s.streamId)||await this.Sui;const d=zd.Dh("https://dai.google.com/linear/pods/v1/hls/network/"+this.yui+"/custom_asset/"+this.bui);"V2"===t.qhi?d.pathname+="/ad_break_id/"+c+".m3u8":d.pathname+="/pod/"+c+".m3u8";const l=this.Pui.streamId;d.searchParams.set("stream_id",l),d.searchParams.set("pd",String(u));return ra({sources:{src:d.toString()}})}Soi(){this.k5t.nt.NI.forEach(t=>this.Wn(new vS(t))),this.k5t.nt.wn(N.rI,this.Wn),super.Soi()}koi(){super.koi(),this.k5t.nt.mn(N.rI,this.Wn)}Bui(t){if(t.Lt===us.zU&&!(t.Km!==nh.ID3&&t.Km!==nh.EVENT_STREAM||t.Km===nh.EVENT_STREAM&&t.eC!==X6)){if(t.wn(Te.uI,this.Mui),t.wn(Te.dI,this.Joi),t.L)for(const i of t.L.NI)this.Mui(new Ml(i));t.Qk=xh.iC,this.Lui=t}}Iui(t){t&&(t.addEventListener(google.ima.dai.api.StreamEvent.Type.ERROR,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.CLICK,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.STARTED,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.MIDPOINT,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.COMPLETE,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.RESUMED,this.Oui))}kui(t){t&&(t.removeEventListener(google.ima.dai.api.StreamEvent.Type.ERROR,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.CLICK,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.STARTED,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.MIDPOINT,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.COMPLETE,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.RESUMED,this.Oui))}Ed(){this.ooi=this.xoi,this.xoi=void 0,this.w1t=this.y5t(this.ooi),this.w1t?this.R5t.So(new Ta(this.w1t)):zd.dm("Started an ad break without having a current adbreak to our knowledge")}Bd(t){super.Bd(t),this.Fui=-1,this.Uui=void 0}async hr(){var t;await super.hr(),this.kui(this.Hai),null==(t=this.Hai)||t.reset(),this.Hai=void 0,this.Pui=void 0,this.Sui=void 0,this.Eui=void 0,this.bui=void 0,this.yui=void 0,this.voi=!0,this.Fui=-1,this.Uui=void 0;const i=q6();void 0!==i&&Ao(i)}async kn(){var t;await super.kn(),null==(t=this.Lui)||t.kn()}constructor(t,i,e,s,n,r={},h,o){super(t,i,s,n,r),this.Hai=void 0,this.Pui=void 0,this.Sui=void 0,this.Lui=void 0,this.yui=void 0,this.bui=void 0,this.Eui=void 0,this.Dui=void 0,this.Aui=void 0,this.Fui=-1,this.Uui=void 0,this.Vui=void 0,this.Wn=t=>{const i=t.Ht;this.Bui(i)},this.Mui=t=>{t.PO.wn(Js.QL,this.Hui)},this.Joi=t=>{t.PO.mn(Js.QL,this.Hui)},this.Hui=t=>{var i,e;if(this.Pui)if((null==(i=this.Lui)?void 0:i.Km)===nh.ID3){const i=t.PO.U;var s;if(vP(i))if(this.Fui<=t.PO.CO&&this.Uui!==i.text)this.Fui=t.PO.CO,this.Uui=i.text,null==(s=this.Hai)||s.onTimedMetadata({TXXX:i.text})}else if((null==(e=this.Lui)?void 0:e.Km)===nh.EVENT_STREAM){var n;const i=t.PO.U;null==(n=this.Hai)||n.onTimedMetadata({[X6]:i})}},this.Oui=t=>{switch(this.w1t&&(this.w1t.X0t=this.k5t.Nd()-this.k5t.Gx()),t.type){case google.ima.dai.api.StreamEvent.Type.ERROR:this.R5t.So(new $h($c.GENERAL));break;case google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED:if(this.ooi)break;this.Ed(),this.Vui=zd.Og(this.Wui,250),this.Cui(this.loi);break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED:this.Vui&&zd.Lg(this.Vui),this.ooi||this.Ed();break;case google.ima.dai.api.StreamEvent.Type.STARTED:{var i;const e=t.getAd();this.u1t=new G6(this.w1t,e),null==(i=this.ooi)||i.er({ad:this.u1t}),this.R5t.So(new nc(this.u1t,this.Yri(this.k5t.Gx())));break}case google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE:this.R5t.So(new ie(this.u1t,this.Yri(this.k5t.Gx())));break;case google.ima.dai.api.StreamEvent.Type.MIDPOINT:this.R5t.So(new xe(this.u1t,this.Yri(this.k5t.Gx())));break;case google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE:this.R5t.So(new Qs(this.u1t,this.Yri(this.k5t.Gx())));break;case google.ima.dai.api.StreamEvent.Type.COMPLETE:this.R5t.So(new fc(this.u1t,this.Yri(this.k5t.Gx()))),this.u1t=void 0;break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED:if(!this.w1t)break;this.w1t.X0t>1.5&&this.Wui()}},this.Wui=()=>{var t;this.u1t=new z6(this.w1t),null==(t=this.ooi)||t.er({ad:this.u1t}),this.R5t.So(new nc(this.u1t,this.Yri(this.k5t.Gx())))},this.Aui=e,this.Eui=h,this.Dui=o}};r();var Q6=class extends Jn{qui(){}async Eoi(t,i,e,s){await this.oa.Ta(t,s),this.zui(this.oa,i,e)}zui(t,i,e){i&&t.Xx(i),e&&t.QP()}Gui(t){}constructor(t){super(t)}};r(),r();var yh=Promise,K6=class extends Gn{get Vhi(){return ss.COMPANION}Oai(){return!0}BW(t,i,e){return yh.resolve()}Fai(t,i,e,s){return void 0===s&&(s=!1),this.xoi=t,this.yoi(t,i),yh.resolve()}async Eoi(t,i,e,s,n){return yh.resolve()}async poi(t,i,e){this.xoi=t;return ra({sources:{src:t.Syt}})}uoi(t){this.ePt=t-this.k5t.Gx(),this.U9t(t)}bd(t){if(!this.ooi)return void zd.um("Got timeupdate without a current interstitial");const i=this.Yri(t.currentTime);this.ooi.dhi(i),this.ooi.pP&&this.Bd(i)}Yri(t){return this.ePt+t}constructor(...t){super(...t),this.ePt=0,this.Toi=t=>{this.Bd(this.Yri(t.currentTime))}}};r(),r(),r();var Y6=class extends i6{a1t(){return this.Xui.QKt}d1t(){return this.od.Khi.Syt}get o(){return this.Xui.fJt}get ct(){return this.Xui.ct}get KYt(){}get wYt(){return this.Xui.wYt}get kJt(){return this.Xui.tti}constructor(t,i){super(t),this.Xui=void 0,this.Xui=i}},J6=class extends Gn{get Vhi(){return ss.CSAI}BW(t,i,e){return yh.resolve()}QP(){this.hoi&&this.Nti.kti()}jP(){this.hoi&&this.Nti.jP()}coi(t){this.hoi&&this.Nti.UP(t)}async Fai(t,i,e,s){return void 0===s&&(s=!1),this.xoi=t,this.jui(t)}async jui(t){const i=this.u6t(this.Qui(t));if(await this.Nti.r8t(i,{Yti:void 0,Jti:void 0,Zti:!0,z9:void 0,$ti:void 0,tii:void 0}),!this.Nti.xti()){const t=this.dnt.oP?0:this.dnt.OP;this.Nti.UP(t)}}u6t(t){return{f6t:this.k5t.xe.offsetWidth,v6t:this.k5t.xe.offsetHeight,_6t:this.k5t.xe.offsetWidth,g6t:this.k5t.xe.offsetHeight,p6t:!0,m6t:this.dnt.oP,w6t:t,y6t:void 0,b6t:void 0,A6t:0}}async poi(t,i,e){this.xoi=t;return ra({ads:[{integration:"google-ima",sources:this.Qui(t)}]})}Qui(t){const i=new URL(t.Syt),e=i.searchParams;this._oi(t.Ihi);const s=Y({},this.loi,t.phi);for(const t of w.keys(s))e.set(t,s[t]);return i.toString()}Soi(){super.Soi();const t=this.Nti.j0t;null==t||t.wn(I3.U8t,this.M9t),null==t||t.wn(Nc._8t,this.Kui),null==t||t.wn(Nc.v8t,this.Yui),null==t||t.wn(Nc.D8t,this.F9t),null==t||t.wn(Nc.m8t,this.Jui),null==t||t.wn(Nc.S8t,this.Zui),null==t||t.wn(Nc.XJt,this.$ui),null==t||t.wn(Nc.T8t,this.tci),null==t||t.wn(Nc.jJt,this.ici),null==t||t.wn(Nc.y8t,this.eci),null==t||t.wn(Nc.Yz,this.sci),null==t||t.wn(Nc.b8t,this.nci)}koi(){const t=this.Nti.j0t;null==t||t.mn(I3.U8t,this.M9t),null==t||t.mn(Nc._8t,this.Kui),null==t||t.mn(Nc.v8t,this.Yui),null==t||t.mn(Nc.D8t,this.F9t),null==t||t.mn(Nc.m8t,this.Jui),null==t||t.mn(Nc.S8t,this.Zui),null==t||t.mn(Nc.XJt,this.$ui),null==t||t.mn(Nc.T8t,this.tci),null==t||t.mn(Nc.jJt,this.ici),null==t||t.mn(Nc.y8t,this.eci),null==t||t.mn(Nc.Yz,this.sci),null==t||t.mn(Nc.b8t,this.nci),super.koi()}L9t(){if(this.rci&&(this.rci.style.display="block"),!this.hoi){const t=this.dnt.oP?0:this.dnt.OP;this.Nti.UP(t)}this.hci()}async O9t(){this.w1t&&this.Bd(this.Yri(this.w1t.G0t))}aci(){var t,i;null==(t=this.ooi)||t.er({ad:this.u1t}),this.uci=this.Yri(null==(i=this.k5t)?void 0:i.Gx()),this.R5t.So(new nc(this.u1t,this.uci))}cci(){const t=this.uci+this.u1t.ct;this.R5t.So(new fc(this.u1t,t)),this.u1t=void 0}async hr(){await super.hr(),this.Nti.kn(),this.uci=0}constructor(t,i,e,s,n,r={}){super(i,e,s,n,r),this.Nti=void 0,this.rci=void 0,this.dnt=void 0,this.uci=0,this.M9t=async t=>{var i;this.R5t.So(new $h($c.GENERAL,null==(i=t.J9t.D7t)?void 0:i.Iy))},this.Kui=()=>{this.L9t()},this.Yui=()=>{this.O9t()},this.F9t=async()=>{await this.O9t()},this.Jui=t=>{const i=t.jnt;i&&this.w1t&&(this.u1t=new Y6(this.w1t,i),this.aci())},this.Zui=()=>{this.R5t.So(new ie(this.u1t,this.Yri(this.k5t.Gx())))},this.$ui=()=>{this.R5t.So(new xe(this.u1t,this.Yri(this.k5t.Gx())))},this.tci=()=>{this.R5t.So(new Qs(this.u1t,this.Yri(this.k5t.Gx())))},this.ici=()=>{this.cci()},this.eci=()=>{this.k5t.So(new vt(this.Yri(this.k5t.Gx()))),this.k5t.So(new mo(this.Yri(this.k5t.Gx())))},this.sci=()=>{this.k5t.So(new Si(this.Yri(this.k5t.Gx())))},this.nci=()=>{this.Xai()},this.hci=()=>{this.xoi?(this.ooi=this.xoi,this.xoi=void 0,this.w1t=this.y5t(this.ooi),this.R5t.So(new Ta(this.w1t))):zd.um("Started an ad break without having a current ad break to our knowledge")},this.Toi=t=>{this.Bd(this.Yri(t.currentTime))},this.dnt=t,this.rci=zn(this.k5t.Cd)?this.k5t.zP():void 0;const h=new A5(this.rci,this.k5t.xe),o=new P5(h,this.k5t.Wu),a=new C5(this.k5t);this.Nti=new $3(h,a,o)}},Z6=class extends J6{Oai(){return!1}Xai(){const t=this.Nti.I7t();if(!this.w1t||void 0===t)return;const i=this.w1t.G0t-t;this.k5t.Xx(i);const e=this.k5t.ihi?new Date(this.k5t.ihi.getTime()+1e3*i):void 0;this.k5t.So(new B(i,e))}async hr(){await super.hr(),this.k5t.mn(d.uo,this.dci)}constructor(t,i,e,s,n,r={}){super(t,i,e,s,n,r),this.dci=()=>{this.ooi||this.Nti.Tti()},this.k5t.wn(d.uo,this.dci)}};r();var $6=class extends J6{Oai(){return!0}async Eoi(t,i,e,s,n){await this.Fai(i,this.dnt.Gx(),e),this.Nti.Tti()}Xai(){const t=this.Nti.I7t();if(!this.w1t||void 0===t)return;var i;let e=null!=(i=this.lci)?i:0;e+=this.w1t.G0t-t,this.dnt.Xx(e);const s=this.fci?new Date(this.fci.getTime()+1e3*e):void 0;this.dnt.So(new B(e,s))}L9t(){super.L9t(),this.lci=this.dnt.Gx(),this.fci=this.dnt.Vx,this.dnt.jP()}async O9t(){await super.O9t(),this.dnt.QP()}Yri(t){return t}constructor(...t){super(...t),this.lci=void 0,this.fci=void 0}},t8=class extends Jn{get Tai(){var t;return[null==(t=this.Eai)?void 0:t.hoi,...this.vci.Tai].filter(it)}get kai(){return this._ci.Coi}_nt(){return this.dnt.Jc}ynt(){return this.gci.Ca}get phi(){var t,i,e;return null!=(e=null!=(i=this.loi)?i:null==(t=this.pci)?void 0:t.adTagParameters)?e:{}}jx(){return this.Ls}vnt(){return this.dnt.Kst}Yx(){var t;return null!=(t=this.Wz)?t:super.Yx()}Zx(){var t;return null!=(t=this.nq)?t:super.Zx()}GP(){this.dnt.GP()}lai(t){return t}QP(){var t;super.QP(),null==(t=this.Eai)||t.QP()}jP(){var t;super.jP(),null==(t=this.Eai)||t.jP()}UP(t){var i;super.UP(t),null==(i=this.Eai)||i.coi(t)}uP(t){var i;super.uP(t);const e=t?0:this.oa.OP;null==(i=this.Eai)||i.coi(e)}async Ta(t,i){if(await this.Xpt(),await super.Ta(t,i),void 0===t||void 0===t.ads)return;const e=hh(t.ads,K2);void 0!==e&&(this.mci(),this.wci(),this.yci(),this.pci=e,this.bci=e.backdropLShape,this.vci.phi=e.adTagParameters,this._ci.vai=function(t){switch(t){case"single":return Er.SINGLE;case"l-shape":return Er.LSHAPE_AD;case"double":return Er.DOUBLE;case"single-if-mobile":return zs.Ks?Er.SINGLE:void 0;default:return}}(this.pci.overrideLayout),this._ci.Woi=this.pci.useId3,this.dnt.wn(Jr.EM,this.Kq),this.Wu.wn(Qh.yn,this.Att),this.wn(d.Jw,this.rjt),await this.Aci(ss.DEFAULT,void 0,void 0),this.dnt.wn(Jr.PM,this.YG))}async Sci(t){this.Tci();const i=void 0===t.networkCode||void 0===t.customAssetKey?ss.DEFAULT:ss.GOOGLE;await this.Aci(i,t.networkCode,t.customAssetKey),t.sseEndpoint&&this._ci.Doi(t.sseEndpoint)}wci(){Kd(this.Ls,this.kci),Go(this.Eci),Go(this.kci),this.Eci.appendChild(this.kci),this.Ls.appendChild(this.Eci)}xci(){Kd(this.kci,this.Ls),Ll(this.kci),Ll(this.Eci),Ao(this.kci),Ao(this.Eci)}async Aci(t,i,e){var s,n,r;const h=this.t4t(),o=this.Aui;if(!h||!o)return;if(t===(null==(s=this.Eai)?void 0:s.Vhi))return;var a;const u=null!=(a=null==(n=this.Eai)?void 0:n.K0t)?a:[];switch(await(null==(r=this.Eai)?void 0:r.hr()),t){case ss.GOOGLE:var c,d,l;this.Eai=new j6(h,this.Pci,o,u,this.Bai,this.phi,null==(c=this.pci)?void 0:c.streamActivityMonitorId,null==(d=this.pci)?void 0:d.retrievePodIdURI),await(null==(l=this.Eai)?void 0:l.BW(i,e));break;case ss.COMPANION:this.Eai=new K6(this.dnt,this.Pci,u,this.Bai,this.phi);break;case ss.CSAI:if(h===this.dnt){this.Eai=new $6(this.dnt,h,this.Pci,u,this.Bai,this.phi);break}this.Eai=new Z6(this.dnt,h,this.Pci,u,this.Bai,this.phi);break;case ss.DEFAULT:default:this.Eai=new T6(h,this.Pci,u,this.Bai,this.phi)}}async eai(t,i){var e;this.Ici||void 0===t||void 0===i||(null==(e=this.Eai)?void 0:e.Vhi)!==ss.GOOGLE&&await this.Aci(ss.GOOGLE,t,i)}Qq(t){void 0===this.Zx()&&(this.nq=t,this.Wz=ar(t),this.So(new el(t)))}Tci(){this.dnt.wn(d.py,this.Cci),this.dnt.wn(d.$w,this.JG)}Rci(){this.dnt.mn(d.py,this.Cci),this.dnt.mn(d.$w,this.JG)}Dci(){var t,i;this.Pci.u4t.wn("Knt",this.Nci),null==(t=this.Eai)||t.wn(h6.AD_ENDED,this.Nci),null==(i=this.t4t())||i.wn(hc.ma,this.Bci)}Mci(){var t,i;this.Pci.u4t.mn("Knt",this.Nci),null==(t=this.Eai)||t.wn(h6.AD_ENDED,this.Nci),null==(i=this.t4t())||i.mn(hc.ma,this.Bci)}Lci(t){const i=()=>{this.Oci=void 0};this.Oci=t().then(i).catch(i)}Fci(t,i){this.gci.So(new A6(t,i).Ca),t.pP=!0,i8(t)&&this.Oci&&(this.Ici=void 0)}async Uci(){var t;null==(t=this.Eai)||t.Soi(),this.Vci()}async Hci(){var t;this.Aoi(this.Wci);const i=this.Ici;if(void 0===i)return this.I3t();var e,s;i.Ihi!==Er.LSHAPE_CONTENT&&(await(null==(e=this.t4t())?void 0:e.Ta(this.qci,(new Zc).Yg)),null==(s=this.t4t())||s.QP());null==(t=this.Eai)||t.uoi(this.Gx()),this.gci.So(new vh(i).Ca),this.Vci()}async I3t(){var t;this.zci(),null==(t=this.Eai)||t.koi(),this.Aoi(this.Wci),this.Wci=void 0}Vci(){this.zci(),this.Wci=this.Ici,this.Ici=void 0,this.Gci=void 0,this.Xci=void 0}zci(){const t=this.oa.DP,i=this.oa.MP;t===this.jci&&i===this.Qci||(this.jci=t,this.Qci=i,this.So(new Vs))}boi(t){var i;i8(t)&&(null==(i=this.Eai)||i.boi(t),this.pai(this.Gx()));t.wn("ohi",this.Kci),this.gci.So(new w6(t.Ont()))}Aoi(t){if(Ct(this._ci.Coi,t)){var i;if(this._ci.Aoi(t),i8(t))null==(i=this.Eai)||i.Aoi(t);else e8(t)&&(this.vci.Dai(t),this.Yci.delete(t.o));t.mn("ohi",this.Kci),this.gci.So(new y6(t).Ca)}}pai(t){this.Jci(t),this.Zci()}Jci(t){this.$ci(t),this.tdi(t),this.idi(t)}$ci(t){if(void 0!==this.Oci)return;let i;const e=[];for(const s of this._ci.Coi.filter(i8))s.pP?e.push(s):s!==this.Wci&&(t>=s.CO+5||this.Wci&&s.CO+5=t.CO);const r=t.ahi,h=i>=t.CO&&(void 0===r||i{Ce(t)||this.Fci(i,"Could not load the ad break: "+t.message)}))}async Fai(t,i,e){var s,n;(await this.Aci(t.Vhi,t.Hhi,t.Whi),await(null==(s=this.Eai)?void 0:s.moi(t,e).catch(()=>{this.gci.So(new A6(t,"Could not load the backdrop.").Ca)})),this.Wci&&t.Ihi!==Er.LSHAPE_CONTENT)?this.qci=await(null==(n=this.Eai)?void 0:n.goi(t,i,e)):await this.hdi(t,i,e)}async hdi(t,i,e){var s;await(null==(s=this.Eai)?void 0:s.Fai(t,i,e))}idi(t){if(void 0===this.Ici||void 0!==this.Xci||void 0!==this.Wci)return;const i=this.Ici.ahi;var e;t>=this.Ici.CO&&(void 0===i||t{this.Lci(()=>this.Uci())}))}doi(t){var i,e,s;this.loi=t,null==(e=this.Eai)||e.doi(null!=(s=null!=t?t:null==(i=this.pci)?void 0:i.adTagParameters)?s:{}),this.vci.phi=t}Zci(){const t=this.Gx(),i=[];this.Yci.forEach(e=>{t>=e.CO&&(void 0===e.ahi||t{this.vci.Dai(t),this.Yci.delete(t.o),this.Aoi(t)});for(const i of this._ci.Coi.filter(e8)){const e=i.ahi;if(void 0!==e&&t>=e||i.pP)continue;const s=i.CO,n=i.CO+i.ct;t>=s&&t<=n&&!this.Yci.has(i.o)&&this.Pai(i).catch(()=>{this.Fci(i,"Could not load the overlay."),this.Aoi(i)})}}async Pai(t){await this.vci.Pai(t),this.Yci.set(t.o,t),this.gci.So(new vh(t).Ca)}rdi(){return void 0!==this.Wci&&void 0!==this.Ici&&rs(this.Wci.ahi,this.Ici.CO,5)}async Xpt(){var t,i;this.nq=void 0,this.Wz=void 0,this.pci=void 0,this.odi=!1,this.adi=!0,this.udi=NaN,this.Qci=NaN,this.jci=NaN,this.Wci=void 0,null==(t=this.sdi)||t.Zg(),this.Gci=void 0,this.Xci=void 0,this.Ici=void 0,this.Oci=void 0,await(null==(i=this.Eai)?void 0:i.hr()),this.Eai=void 0,this._ci.hr(),this.vci.hr(),this.Yci.clear(),this.Wu.mn(Qh.yn,this.Att),this.oa.mn(d.Jw,this.rjt),this.dnt.mn(Jr.EM,this.Kq),this.dnt.mn(Jr.PM,this.YG),this.Rci(),this.Mci(),this.xci(),this.cdi&&zd.Lg(this.cdi),this.cdi=void 0}async KP(){await this.Xpt(),await super.KP()}async kn(){var t;await this.KP().catch(gs),this._ci.kn(),await(null==(t=this.Eai)?void 0:t.kn()),await super.kn()}ddi(){return void 0!==this.Wci}eI(t){if(!this.pci)return super.eI(t);switch(t.type){case d.Ww:case d.Pw:case Jr.EM:return!this.adi;case Jr.kM:return!this.adi||(this.adi=!1,!1);case d.Cw:{const t=this.Nd();return t!==this.udi&&(this.udi=t,this.So(new zr(t))),!0}case Jr.xM:var i;return void 0!==this.Wci&&(null==(i=this.Eai)?void 0:i.Vhi)===ss.CSAI;case d.Jw:return this.zci(),!0;case hc.ma:return void 0!==this.Wci}return super.eI(t)}constructor(t){var i;super(t),this.dnt=void 0,this.Eci=void 0,this.Ls=void 0,this.kci=void 0,this.Aui=void 0,this.nq=void 0,this.Wz=void 0,this.pci=void 0,this.bci=void 0,this.gci=void 0,this.Eai=void 0,this.Pci=void 0,this.loi=void 0,this.Wci=void 0,this.Ici=void 0,this.Gci=void 0,this.sdi=void 0,this.Xci=void 0,this.Oci=void 0,this.qci=void 0,this._ci=void 0,this.Bai=void 0,this.vci=void 0,this.Yci=Ba(),this.adi=!0,this.udi=NaN,this.Qci=NaN,this.jci=NaN,this.cdi=void 0,this.odi=!1,this.ldi=!0,this.YG=async()=>{this.dnt.mn(Jr.PM,this.YG),this.pci&&(this.pci.initializationDelay?this.cdi=zd.Og(async()=>{this.pci&&await this.Sci(this.pci)},1e3*this.pci.initializationDelay):await this.Sci(this.pci))},this.Kq=()=>{this.dnt.mn(Jr.EM,this.Kq),this._ci.Ooi(this.oa.nt)},this.mci=async()=>{try{await this.rnt.Fj([kR.THEOADS])}catch(t){await this.KP().catch(gs),this.Qq(bb(t,me.LICENSE_INVALID_FEATURE))}},this.Att=t=>{j2(this.Eci,this.oa.MP,this.oa.DP,t.width,t.height)},this.rjt=()=>{j2(this.Eci,this.oa.MP,this.oa.DP,this.Wu.Eu,this.Wu.Iu)},this.Cci=()=>{this.Jci(this.Gx()),this.Zci()},this.JG=()=>{this.Jci(this.Gx()),this.Zci()},this.Nci=async()=>{if(this.rdi()){if(this.Xci)return;this.Xci=this.Gci,await this.Xci,this.Lci(()=>this.Hci())}else this.Lci(()=>this.I3t())},this.Bci=t=>(this.Fci(this.Wci,"Error playing the current adbreak: "+t.error),this.Lci(()=>this.I3t())),this.Kci=t=>{this.gci.So(t.Ca)},this.dnt=new Q6(t),this.Ls=t.xe,this.Eci=function(){const t=h.createElement("div");return Pl(t,"theo-ads-sgai-container"),t}(),this.kci=function(){const t=h.createElement("div");return Pl(t,"theo-ads-sgai-content-player"),t}(),this.gci=new g6(this),this.Pci=new p6,null==(i=this.dnt.Jc)||i.znt(this.Pci),this.Bai=new s6(t.Dx),this._ci=new d6(this),this.vci=new m6(this.dnt,this.kci,this.Bai)}};function i8(t){return"adbreak"===t.Km}function e8(t){return"overlay"===t.Km}var s8=class extends t8{Nd(){var t;return null!=(t=this.Zb)?t:super.Nd()}nu(){var t;return null!=(t=this.Ac)?t:super.nu()}Gx(){return this.lai(super.Gx())}Hx(){return this.fdi?new Date(this.fdi.getTime()+rn(this.dnt.Gx())):super.Hx()}Ux(){const t=super.Ux();return Uo.jn(t).Ly(this.vdi)._s()}EP(){const t=super.EP();return Uo.jn(t).Ly(this.vdi)._s()}lai(t){return t+this.vdi}async Ta(t,i){await super.Ta(t,i),this.pci&&(this.Ac=t,this._di=new X5(this.dnt),this._di.gr(this.kci,this.Eci),this.nO(this._di))}yci(){}wci(){super.wci(),this.Aui=z2(this.Eci)}Tci(){super.Tci(),this.gdi()}Rci(){super.Rci(),this.pdi()}gdi(){this.dnt.wn(d.Cw,this.ejt),this.dnt.wn(Jr.PM,this.VV)}pdi(){this.dnt.mn(d.Cw,this.ejt),this.dnt.mn(Jr.PM,this.VV)}t4t(){return this.dnt}Xx(t,i){this.mdi=!0,super.Xx(t,i)}QP(){super.QP(),this.So(new vt(this.Gx())),this.ldi=!0,this.wdi=!1}jP(){this.wdi=!0,super.jP()}async hdi(t,i,e){var s,n;if(this.l$t=await(null==(s=this.Eai)?void 0:s.poi(t,i,e)),null==(n=this.Eai)?void 0:n.Oai())return;const r=new f5(this.Dxt,this.ydi),h=new P4(this.Dxt.Mxt,r,"temporary");this.bdi=h.asi(this.l$t,v5({amount:30,bandwidth:sc.Bg.pW()||this.Kst.jY}),"temporary"),this.Adi.Zg(),this.Adi=new Zc;this.ydi.jet(this.bdi,this.Dxt,"temporary").mi(this.Adi.Yg).catch(gs)}Sdi(t,i){switch(t){case Er.LSHAPE_CONTENT:case Er.LSHAPE_AD:return new Q5(this.dnt,i);case Er.SINGLE:default:return new j5(this.dnt)}}async Tdi(t){var i,e,s,n,r,h;null==(i=this.sdi)||i.Zg(),this.sdi=new Zc,await this.Aci(t.Vhi,t.Hhi,t.Whi),null==(e=this._di)||e.mr(this.kci),(null==(s=this.Eai)?void 0:s.Oai())||(this.odi=!0,this.vdi=this.Gx(),this.fdi=this.Hx(),this.dnt.wn(Jr.PM,this.VV)),this.gci.So(new vh(t).Ca),await(null==(n=this.Eai)?void 0:n.Eoi(this.l$t,t,this.sdi.Yg,void 0,!0)),this._di=this.Sdi(t.Ihi,null!=(h=t.Chi)?h:this.bci),this.B3t(this._di),this._di.gr(this.kci,this.Eci),null==(r=this.Eai)||r.uoi(this.Gx())}async Uci(){var t;if(void 0!==this.Ici&&void 0!==this.l$t)return this.pdi(),this.Rz=this.vP,await this.Tdi(this.Ici),this.Dci(),(null==(t=this.Eai)?void 0:t.Oai())||(this.kdi=!1),super.Uci()}async Hci(){var t;return(null==(t=this.Eai)?void 0:t.Vhi)!==ss.COMPANION&&(this.odi=!0,this.ehi=!1,this.vdi=this.Gx(),this.fdi=this.Hx(),this._ci.Voi(this.dnt.nt),this.dnt.wn(Jr.kM,this.Edi),this.dnt.wn(Jr.EM,this.Kq),this.dnt.wn(Jr.PM,this.VV)),super.Hci()}async I3t(){var t,i,e,s;if(this.Wci){var n;if(null==(t=this.bdi)||t.pS(),this.bdi=void 0,this.Mci(),(null==(i=this.Eai)?void 0:i.Oai())||(this.odi=!0,this.ehi=!1,this.vdi=this.Gx(),this.fdi=this.Hx(),this._ci.Voi(this.dnt.nt),this.dnt.wn(Jr.kM,this.Edi),this.dnt.wn(Jr.EM,this.Kq),this.dnt.wn(Jr.PM,this.VV),await this.dnt.Ta(this.Ac,(new Zc).Yg)),null==(e=this._di)||e.mr(this.kci),this._di=new X5(this.dnt),this._di.gr(this.kci,this.Eci),this.B3t(this._di),!(null==(s=this.Eai)?void 0:s.Oai()))this.vP=null!=(n=this.Rz)?n:1,this.dnt.QP();return this.kdi=!0,this.gdi(),super.I3t()}}async Xpt(){var t;this._di=void 0,this.Zb=void 0,this.vdi=0,this.l$t=void 0,this.Rz=void 0,this.fdi=void 0,this.kdi=!0,this.odi=!1,this.ldi=!0,this.wdi=!0,this.Adi.Zg(),this.Adi=new Zc,null==(t=this.bdi)||t.pS(),this.bdi=void 0,this.dnt.mn(Jr.kM,this.Edi),await super.Xpt()}ddi(){return super.ddi()||this.odi&&!this.mdi}eI(t){if(void 0!==this._di)switch(t.type){case d.uo:return!0;case d.jw:return!this.wdi||(this.wdi=!1,this.So(new Si(this.lai(t.currentTime))),!0);case Jr.PM:return!this.ldi||(this.ldi=!1,this.So(new mo(this.lai(t.currentTime))),!0);case Jr.xM:return this.odi||(this.ldi=!0,this.So(new SP(this.lai(t.currentTime)))),!0;case d.Zw:return this.ddi()||(this.mdi=!1,this.So(new Yr(this.lai(t.currentTime)))),!0;case d.$w:return this.ddi()||this.So(new ji(this.lai(t.currentTime))),!0;case d.Nw:return!this.kdi||(this.So(new ur(this.lai(t.currentTime))),!0);case d.py:return this.So(new B(this.lai(t.currentTime),t.currentProgramDateTime)),!0;case d.Qw:return this.So(new Et(this.lai(t.currentTime))),!0;case d.Kw:return this.So(new Ik(this.lai(t.currentTime),t.playbackRate)),!0;case d.wy:return this.ehi?(this.So(new Wi(this.lai(t.currentTime),t.volume)),!0):(this.ehi=!0,!0);case d.Rw:return this.So(new ho(this.lai(t.currentTime),t.readyState)),!0;case Jr.SM:return this.So(new Is(this.lai(t.currentTime),t.readyState)),!0;case Jr.TM:return this.So(new Zi(this.lai(t.currentTime),t.readyState)),!0;case Jr.kM:return this.So(new M(this.lai(t.currentTime),t.readyState)),!0;case Jr.EM:return this.So(new Tt(this.lai(t.currentTime),t.readyState)),!0;case Jr.AI:return this.So(new Ka(this.lai(t.currentTime),t.readyState)),!0;case d.Dw:return this.So(new wn(this.lai(t.currentTime),t.initDataType,t.initData)),!0}return super.eI(t)}constructor(t){super(t),this.Ac=void 0,this.Zb=void 0,this.l$t=void 0,this.Rz=void 0,this._di=void 0,this.vdi=0,this.mdi=!1,this.fdi=void 0,this.Dxt=void 0,this.ydi=void 0,this.Adi=new Zc,this.bdi=void 0,this.wdi=!0,this.kdi=!0,this.ehi=!0,this.ejt=t=>{this.Zb=t.duration},this.VV=()=>{this.dnt.mn(Jr.PM,this.VV),this.odi=!1},this.Edi=()=>{this.dnt.mn(Jr.kM,this.Edi),this.fdi&&(this.dnt.Vx=this.fdi,this.fdi=void 0),this.dnt.Gx()>0&&(this.vdi-=this.dnt.Gx())},this.Dxt=Wc.Bg,this.ydi=new Uc(zd.Dx)}};r();var n8=class extends Q6{get Zri(){return this.xdi}get ihi(){return this.Pdi}get jri(){return this.Idi}get Jri(){return this.pGt}get thi(){return this.Cdi}Eoi(t,i,e,s){return this.k5t.Eoi(t,i,e,s)}Rdi(t,i,e,s){var n,r;this.xdi=t,s?this.Ddi=0:this.Ddi+=e,this.Pdi=i,null==(r=this.Pdi)||r.setSeconds((null==(n=this.Pdi)?void 0:n.getSeconds())+this.Ddi)}rhi(){var t;if(void 0!==this.Ndi)return;this.pGt=void 0,this.Cdi=void 0;const i=this.Bdi;this.Bdi=void 0,null==(t=this.Mdi)||t.Zg(),a8(this.dnt)&&(this.Ldi=new Zc,this.Ndi=Cu(this.Odi(i,this.Ldi.Yg),this.Ldi).catch(bu))}hhi(){var t;this.pGt=this.xdi+this.oa.Gx(),this.ihi&&(this.Cdi=new Date(this.ihi.getTime()+1e3*this.oa.Gx()));const i=this.Ndi;this.Ndi=void 0,null==(t=this.Ldi)||t.Zg(),this.Mdi=new Zc,this.Bdi=Cu(this.Fdi(i,this.Mdi.Yg),this.Mdi).catch(bu)}Aa(){return this.dnt.Sq}Udi(){this.Vdi||(this.Vdi={source:this.dnt.nu(),duration:this.dnt.Nd(),currentTime:this.dnt.Gx(),preload:this.dnt.wP,autoplay:this.dnt.vO,playbackRate:this.dnt.vP})}async Hdi(t){this.dnt.wP=Dn.HL,this.dnt.vO=!1,this.k5t.oP=!0;const i=this.k5t.nu();await this.dnt.Ta(i,t),this.dnt.Xx(this.k5t.Gx()),this.dnt.wn(d.uo,this.HV),this.dnt.wn(d.jw,this.WV)}async Wdi(t){this.Vdi&&(this.dnt.wP=this.Vdi.preload,this.dnt.vO=this.Vdi.autoplay,this.dnt.vP=this.Vdi.playbackRate,await this.dnt.Ta(this.Vdi.source,t),this.Vdi=void 0)}async Odi(t,i){await(null==t?void 0:t.catch(gs)),this.Udi(),await this.dnt.KP(),await this.Hdi(i),this.B3t(this.dnt),this.dnt.QP()}async Fdi(t,i){await(null==t?void 0:t.catch(gs)),this.qdi=this.k5t.Gx(),this.Idi=this.qdi+this.Zri,await this.dnt.KP(),this.dnt.mn(d.uo,this.HV),this.dnt.mn(d.jw,this.WV),await this.Wdi(i),this.B3t(this.k5t),this.dnt.wn(Jr.EM,this.zdi),this.dnt.QP()}nu(){return this.Vdi?this.Vdi.source:super.nu()}Nd(){return this.Vdi?this.Vdi.duration:super.Nd()}Gdi(){return super.Nd()}EP(){const t=super.EP();return Uo.jn(t).Ly(this.Zri)._s()}Ux(){const t=super.Ux();return Uo.jn(t).Ly(this.Zri)._s()}KP(){return this.k5t.KP()}async Gui(t){this.k5t.Gui(t)}async hr(){var t,i;null==(t=this.Ldi)||t.Zg(),this.Ldi=void 0,this.Ndi=void 0,null==(i=this.Mdi)||i.Zg(),this.Mdi=void 0,this.Bdi=void 0,this.Vdi=void 0,this.xdi=0,this.Pdi=void 0,this.Idi=0,this.pGt=void 0,this.Cdi=void 0,this.qdi=0,this.Ddi=0,this.dnt.mn(Jr.EM,this.zdi),this.dnt.mn(d.uo,this.HV),this.dnt.mn(d.jw,this.WV),await this.k5t.KP()}async kn(){await this.hr(),await super.kn()}constructor(t,i){super(i),this.dnt=void 0,this.k5t=void 0,this.Ndi=void 0,this.Ldi=void 0,this.Mdi=void 0,this.Bdi=void 0,this.Vdi=void 0,this.xdi=0,this.Pdi=void 0,this.Idi=0,this.pGt=void 0,this.Cdi=void 0,this.qdi=0,this.Ddi=0,this.zdi=()=>{if(this.dnt.mn(Jr.EM,this.zdi),this.Pdi){const t=this.Pdi;t.setSeconds(this.Pdi.getSeconds()+this.qdi),this.dnt.Vx=t,this.Pdi=void 0}this.Idi-=this.dnt.Gx(),this.pGt=void 0,this.Cdi=void 0},this.HV=()=>{this.k5t.QP()},this.WV=()=>{this.k5t.jP()},this.dnt=t,this.k5t=i}};r();var r8=class extends VF{Ta(t,i){var e;return void 0!==hh(null!=(e=null==t?void 0:t.ads)?e:[],K2)?Promise.reject(new as(me.CONFIGURATION_ERROR,"THEOads must be enabled in the player configuration.")):super.Ta(t,i)}},h8=1/60,o8=class extends t8{Xdi(){this.dnt.ont.wn("presentationmodechange",this.jdi)}Qdi(){this.dnt.ont.mn("presentationmodechange",this.jdi)}Kdi(){if(this.Ydi&&!O5(this.Ydi)&&this.k5t&&this.Wci)return function(t){return t instanceof z5}(this.Ydi)?(this.Fci(this.Wci,"Cannot play L-shape content ad breaks in this representation"),void this.Lci(()=>this.I3t())):void this.Jdi(new M5(this.dnt,this.k5t),!1,!1)}uP(t){t||this.lP||this.GP(),super.uP(t)}get ont(){return this.dnt.ont}async Ta(t,i){await super.Ta(t,i),this.pci&&(this.Zdi=this.pci.backdropDoubleBox,this.Jdi(new B5(this.dnt,this.k5t),!1,!0))}yci(){const t=new Q6(function(t,i,e){const s=t.lastElementChild;t.insertBefore(i,s),G2(i);const n=new y3(new UF(i,e,new UR),va.Bg);return n.wP=Dn.HL,n.vO=!1,n}(this.Eci,this.$di,this.oa.Cd));this.k5t=new n8(this.dnt,t)}wci(){super.wci(),this.$di=function(){const t=h.createElement("div");return Pl(t,"theo-ads-sgai-ad-player"),t}(),this.Eci.appendChild(this.$di),this.Aui=z2(this.$di),this.tli()}tli(){Ll(this.kci),function(t){const i=t.style;i.boxSizing="border-box",i.position="relative",i.alignItems="center",i.border="0 solid transparent",i.borderWidth="0px",i.backgroundColor="transparent",i.backgroundRepeat="no-repeat",i.backgroundAttachment="scroll"}(this.Eci),G2(this.kci),G2(this.$di)}xci(){this.ili(),super.xci(),this.$di&&(Ao(this.$di),this.$di=void 0)}ili(){X2(this.Ls),X2(this.kci)}Jdi(t,i,e){var s;const n=null!=(s=this.Ydi)?s:this,r=null!=t?t:this.dnt;D5(n,r),void 0!==this.Ydi&&(this.Ydi.mr(this.Eci,this.kci,this.$di),this.Ydi.kn()),null==t||t.gr(this.Eci,this.kci,this.$di,n,i),this.Ydi=t,e?this.nO(r):this.B3t(r)}t4t(){return this.k5t}GP(){var t;super.GP(),null==(t=this.k5t)||t.GP()}Xx(t,i){this.eli=!0,super.Xx(t,i)}lai(t){var i,e;return t+(null!=(e=null==(i=this.k5t)?void 0:i.jri)?e:0)}Dci(){var t;super.Dci(),null==(t=this.k5t)||t.wn(d.py,this.sli),this.dnt.wn(d.qw,this.nli)}Mci(){var t;super.Mci(),null==(t=this.k5t)||t.mn(d.py,this.sli),this.dnt.mn(d.qw,this.nli)}rli(){this.Jci(this.Gx()),this.hli()}hli(){var t;if(this.rdi()||O5(this.Ydi)||(null==(t=this.Ydi)?void 0:t.Kri()))return;const i=_.min(this.k5t.Nd(),this.Wci.ct)-this.k5t.Gx(),e=this.oli(i);if(void 0===e)return;if(this.dnt.Gx()>e-.75)return;const s=Uo.jn(this.k5t.Ux()),n=this.k5t.EP();if(0===n.length)return;const r=_.min(n.end(n.length-1),this.Wci.ahi);s.MM().Cr(r)&&!this.dnt.xP&&(this.dnt.lP&&(this.dnt.QP(),this.dnt.oP=!0),this.dnt.Xx(e,{zOt:!0}))}oli(t){var i;const e=this.dnt.EP(),s=null==(i=this.Wci)?void 0:i.ahi;if(0===e.length||void 0===s)return;const n=e.start(0),r=e.end(e.length-1);let h=s-t;return(h=16&&zs.Q_<18&&(null==(i=this.Eai)?void 0:i.Vhi)!==ss.COMPANION&&(null==(a=this.k5t)||a.Xx(this.k5t.Gx()));this.Jdi(o,this.ldi,!1),zs.zv&&!o.Kri()&&(null==(e=this.Eai)?void 0:e.Vhi)!==ss.COMPANION&&(X2(this.kci),Go(this.kci)),this.gci.So(new vh(t).Ca),this.ali=(null==(s=this.Eai)?void 0:s.Vhi)===ss.COMPANION||(null==(n=this.Eai)?void 0:n.Vhi)===ss.CSAI,null==(r=this.Eai)||r.uoi(this.Gx())}uli(){var t;a8(this.oa)&&(null==(t=this.Eai)?void 0:t.Vhi)!==ss.COMPANION&&(this.odi=!0,this.oa.wn(Jr.PM,this.cli))}async Uci(){var t,i,e;const s=this.Ici;if(void 0!==s){if(s.Ihi===Er.LSHAPE_CONTENT&&a8(this.dnt))return this.Fci(s,"Cannot play L-shape content ad breaks in this representation."),this.I3t();var n,r,h;if(null==(t=this.k5t)?void 0:t.Zx())return this.Fci(s,"Could not load the ad break: "+(null==(r=this.k5t)||null==(n=r.Zx())?void 0:n.message)),this.dli();if(this.Rci(),this.uli(),(null==(i=this.Eai)?void 0:i.Vhi)!==ss.COMPANION)this.lli=this.dnt.Vx,null==(h=this.k5t)||h.Rdi(this.Gx(),this.lli,0,!0);return this.oa.xP&&this.So(new Yr(this.Gx())),this.zui(s),!zs.X_||this.oa.lP||(null==(e=this.Ydi)?void 0:e.Kri())||(this.dnt.oP=!0,this.dnt.QP()),this.Dci(),super.Uci()}}async Hci(){var t,i;(null==(t=this.Eai)?void 0:t.Vhi)!==ss.COMPANION&&(this.lli=this.lli?new Date(this.lli.getTime()+1e3*this.dnt.Nd()):void 0,null==(i=this.k5t)||i.Rdi(this.Gx(),this.lli,0,!0));const e=this.Ici;if(this.Wci.Ihi===e.Ihi)(function(t){return t instanceof H5})(this.Ydi)&&this.Ydi.mhi(e.Chi);else{const t=this.Sdi(e.Ihi,e);this.Jdi(t,this.ldi,!1)}return super.Hci()}async I3t(){var t;if(void 0===this.Wci)return;this.Mci(),function(t){return t instanceof M5}(this.Ydi)&&(this._ci.Voi(this.dnt.nt),this.dnt.wn(Jr.EM,this.Kq));const i=null==(t=this.Ydi)?void 0:t.Kri();if(this.Jdi(new B5(this.dnt,this.k5t),!0,!1),!i){this.eli=!1;const t=this.oli(0);t&&this.dnt.Gx(){switch(t.presentationMode){case"native-picture-in-picture":this.Kdi();break;case"fullscreen":zn(this.Cd)&&this.Kdi();break}},this.sli=t=>{this.rli()},this.nli=t=>{this.rli()},this.fli=()=>{const t=this.Wci;void 0!==t?(!t.ahi||this.Gx()>=t.ahi)&&(this.dnt.mn(d.py,this.fli),this.Lci(()=>this.I3t())):this.dnt.mn(d.py,this.fli)},this.cli=()=>{this.oa.mn(Jr.PM,this.cli),this.odi=!1,this.ldi=!1},this.Xdi()}};function a8(t){const i=t.ont.Wo()===Yu.FULLSCREEN&&zn(t.Cd);return t.Sq.YL||i}Ma(t=>t.Cd.ads.theoads?zs.w_||zs.S_||zs.D_?new s8(t):new o8(t):new r8(t),da.knt),r();va.Bg.Kz(new class{get i4t(){return we.knt}Qz(t){return K2(t)}e4t(t,i,e){}W6(t,i,e,s){}uj(t){const i={integration:FC.THEOADS,adTagParameters:Mc(t.adTagParameters)?t.adTagParameters:{},useId3:Boolean(t.useId3)};return Q(t.networkCode)&&(i.networkCode=Ts(t.networkCode)),Q(t.customAssetKey)&&(i.customAssetKey=Ts(t.customAssetKey)),Q(t.backdropDoubleBox)&&(i.backdropDoubleBox=Ts(t.backdropDoubleBox)),Q(t.backdropLShape)&&(i.backdropLShape=Ts(t.backdropLShape)),Q(t.overrideLayout)&&(i.overrideLayout=function(t){switch(t){case"single":case"l-shape":case"double":case"single-if-mobile":return t;default:return}}(t.overrideLayout)),Q(t.retrievePodIdURI)&&(i.retrievePodIdURI=Ts(t.retrievePodIdURI)),Q(t.sseEndpoint)&&(i.sseEndpoint=Ts(t.sseEndpoint)),Q(t.streamActivityMonitorId)&&(i.streamActivityMonitorId=Ts(t.streamActivityMonitorId)),lo(t.initializationDelay)&&(i.initializationDelay=bs(t.initializationDelay)),Q(t.daiAssetKey)&&(i.daiAssetKey=Ts(t.daiAssetKey)),i}}),r(),r(),r(),r(),r();var u8=class extends Ne{get Ca(){return this.hu||(this.hu=function(t){return{get casting(){return t.xJ},get state(){return t.vft},start(){t.JP()},stop(){t.ZP()},addEventListener(i,e){const s=vu(i,Ts);t.wn(s,e)},removeEventListener(i,e){const s=vu(i,Ts);t.mn(s,e)}}}(this)),this.hu}constructor(...t){super(...t),this.hu=void 0}},c8=class extends u8{get xJ(){return this.vft===Co.CONNECTED}get vft(){return this.Ra}vli(){this._li(),this.Rpt.wn(d.do,this.gli),this.Ua(Co.AVAILABLE)}_li(){this.oa&&this.oa.mn(d.yw,this.handleAirplayChangedEvent),this.mli?this.oa=this.LY:this.oa=this.wli,this.oa.wn(d.yw,this.handleAirplayChangedEvent)}get mli(){return this.LY.YP()}async yli(){if(this.oa){if(this.mli){if(!this.oa.lP){const t=Ze(800,this.bli.Yg),i=this.oa.ww(d.jw,this.bli.Yg);await Promise.race([i,t]).catch(gs)}this.oa.QP()}else{this.Ali=this.LY.zx,this.Sli=this.LY.Vx,this.wli.wn(d.py,this.handleAirplayPlayerTimeUpdate),this.Tli=this.LY.OI,this.LY.OI=this.wli,this.Tli.jP(),this.Tli.we(),this.wli.be(),this.wli.oP=this.Tli.oP,this.wli.vP=this.Tli.vP,this.wli.OP=this.Tli.OP;const t=this.wli.ww(d.Zw);this.wli.zx=this.Tli.zx,await t,this.wli.QP(),this.wli.oP=this.Tli.oP,this.wli.vP=this.Tli.vP,this.wli.OP=this.Tli.OP}this.Ua(Co.CONNECTED)}}kli(){if(this.Tli){this.wli.mn(d.py,this.handleAirplayPlayerTimeUpdate),this.Tli.oP=this.wli.oP,this.Tli.vP=this.wli.vP,this.Tli.OP=this.wli.OP;zs.X_&&!zs.ru&&this.LY.ct===1/0?this.Sli?this.Tli.Vx=this.Sli:this.Tli.zx=1/0:this.Tli.zx=this.Ali,this.Sli=void 0,this.Ali=void 0,this.Tli.be(),this.wli.we(),this.wli.lP||this.Tli.QP(),this.LY.OI=this.Tli,this.wli.hr(),this.Tli=void 0}else this.oa&&(this.oa.zx=this.oa.zx+1e-4);this.Ua(Co.AVAILABLE)}preloadPlayer(t){if(fr(t),this.oa.AP{var t;const i=null==(t=this.LY.nu())?void 0:t.sources.filter(xk);(null==i?void 0:i.some(aC))?this.Ua(Co.AVAILABLE):this.Ua(Co.UNAVAILABLE)},this.handleAirplayChangedEvent=()=>{this.oa&&this.oa.sP?this.yli():this.vft===Co.CONNECTED&&this.kli()},this.handleAirplayPlayerTimeUpdate=t=>{this.Ali=t.currentTime,this.Sli=this.LY.Vx},this.Rpt=t,this.LY=i,this.wli=e,this.wli.we(),i.lO(e),this.vli()}};r();var d8=class extends u8{get xJ(){return!1}get vft(){return Co.UNAVAILABLE}JP(){}ZP(){}};r();var l8=class extends je{tI(){this.Pli.tI()}sI(t){throw new m("Can't add a track while using AirPlay.")}get ht(){return this.Pli.ht}get Fx(){return this.Pli.Fx}get bt(){return this.mz}get zx(){return this.Pli.zx}set zx(t){this.Xx(t)}Xx(t,i){this.Pli.Xx(t,i)}get Vx(){return this.Pli.Vx}get ct(){return this.Pli.ct}get xe(){return this.Ls}get Qx(){return this.Pli.Qx}get lt(){return this.Pli.lt}get Jx(){return this.Pli.Jx}get $x(){return this.Pli.$x}get iP(){return this.Pli.iP}get sP(){return this.Pli.sP}get WP(){return this.Pli.WP}get VP(){return this.Pli.VP}get rP(){return this.Pli.rP}get oP(){return this.Pli.oP}set oP(t){this.Pli.oP=t}get cP(){return this.Pli.cP}get lP(){return this.Pli.lP}get vP(){return this.Pli.vP}set vP(t){this.Pli.vP=t}get pP(){return this.Pli.pP}get wP(){return this.Pli.wP}set wP(t){this.Pli.wP=t}get AP(){return this.Pli.AP}get kP(){return this.Pli.kP}get xP(){return this.Pli.xP}YP(){return this.Pli.YP()}JP(){this.Pli.JP()}ZP(){this.Pli.ZP()}get nt(){return this.Pli.nt}get DP(){return this.Pli.DP}get MP(){return this.Pli.MP}get rt(){return this.Pli.rt}get OP(){return this.Pli.OP}set OP(t){this.Pli.OP=t}QP(){Wr(this.Pli.QP())}jP(){this.Pli.jP()}async KP(){}nu(){return this.Ac}async Ta(t,i){let e;if(fr(i),this.Ac=t,Ns(t.sources))e=ue({src:""});else{const i=t.sources.filter(xk);for(const t of i)if(aC(t)){e=t;break}}if(!e)throw new m("Unsupported source.");await this.Pli.Ta(e,t,i),this.Ez(e)}IP(t,i,e){return Promise.resolve()}CP(){return Promise.resolve()}Ez(t){this.mz!==t&&(this.mz=t,this.So(new Uk(t)))}zP(){return this.Pli.zP()}Ox(){return[]}GP(){this.Ili.Nz()}gr(t){Lk(this,t)}mr(){}iI(t){return!1}$P(){this.Pli.$P()}async hr(){this.mz=void 0,this.Ac=void 0,await this.Pli.hr()}be(){this.Pli.be()}we(){this.Pli.we()}qP(){return this.Pli.qP()}Aa(){return this.Pli.Aa()}async kn(){this.Vo(),this.Ili.kn(),await this.Pli.kn(),this.tO.kn(),this.sO.kn(),this.Gl.kn()}constructor(t,i,e,s,n,r,h){super(),this.Ls=void 0,this.Ili=void 0,this.Pli=void 0,this.mz=void 0,this.Ac=void 0,this.tO=new Gh,this.sO=new Gh,this.Gl=new ai,this.Ls=t,this.Ili=new Dr(r,h,e,1,[at.Mk]),this.Ili.Est(t),this.Pli=new oC(t,this.Ili,i,e,s,n),this.Pli.lw(this.Rs),this.tO.OI=this.Pli.ht,this.sO.OI=this.Pli.rt,this.Gl.OI=this.Pli.nt}},f8=class extends VF{async kn(){this.Cli.kn(),await super.kn()}constructor(t){super(t),this.Cli=void 0;const i=new l8(this.Pa.xe,this.Dx,this.Cd,this.Kst,this.VP,this.tnt,this.Ql);this.Cli=new c8(this,this.Pa,i),this.GX.DJ(this.Cli),this.wn(d.Pw,()=>{this.Cli._li()})}};Ma(t=>zd.Zs.vp?new f8(t):(t.GX.DJ(new d8),t),da.Ent),r(),r();var v8="VPAID";function _8(t){return"spotx"===t.integration}va.Bg.Kz(new class t{get i4t(){return this.Rli.i4t}Qz(t){return _8(t)}e4t(i,e,s){return s.ads||(s.ads=kk({})),s.ads.vpaidMode=s.ads.vpaidMode||t.Dli(),this.Rli.e4t(i,e,s)}W6(i,e,s,n){!function(t){if(!_8(t))throw new m("Unknown ad integration: "+t.integration)}(i);const r=t.Nli(i,s.xe);this.Rli.W6(r,e,s,n)}uj(t){const i=ru(t);if(!S(i.id))return i.queryParameters||(i.queryParameters={}),i.custom&&(i.queryParameters.custom?uh('"custom" parameter is redefined in queryParameters! Please use "queryParameters.custom" only!'):(i.queryParameters.custom=i.custom,delete i.custom)),i.app&&(i.queryParameters.app?uh('"app" parameter is redefined in queryParameters! Please use "queryParameters.app" only!'):(i.queryParameters.app=i.app,delete i.app)),i.device&&(i.queryParameters.device?uh('"device" parameter is redefined in queryParameters! Please use "queryParameters.device" only!'):(i.queryParameters.device=i.device,delete i.device)),i.user&&(i.queryParameters.user?uh('"user" parameter is redefined in queryParameters! Please use "queryParameters.user" only!'):(i.queryParameters.user=i.user,delete i.user)),i.ipAddress&&(i.queryParameters.ip_addr?uh('"ipAddress" parameter is redefined in queryParameters! Please use "queryParameters.ip_addr" or "ipAddress" only!'):(i.queryParameters.ip_addr=i.ipAddress,delete i.ipAddress)),i.maximumAdDuration&&(i.queryParameters.VMaxd?uh('"maximumAdDuration" parameter is redefined in queryParameters! Please use "queryParameters.VMaxd" or "maximumAdDuration" only!'):(i.queryParameters.VMaxd=i.maximumAdDuration,delete i.maximumAdDuration)),i}static Nli(i,e){return{integration:FC.SPOTX,sources:{src:t.Bli(i,s.location.href,e.offsetWidth,e.offsetHeight,zs.Tg)}}}static Bli(i,e,s,n,r){if(i.sources)return i.sources;let h=n,o=s;r&&0===o&&(o=320,h=180);const a={custom_skin:1,player_width:o,player_height:h};i.cacheBuster&&(a.cb=_.random()),t.Mli(e)&&(a.content_page_url=e);const u=Y({},a,i.queryParameters);return u[v8]||u.VPI||(u[v8]="js"),"https://search.spotxchange.com/vast/2.0/"+i.id+"?"+t.Lli(u)}static Mli(t){return Xt(t,"http://")||Xt(t,"https://")}static Lli(t){return R1(t)}static Dli(){return zs.B_?dk.ENABLED:dk.INSECURE}constructor(){this.Rli=new s4}}),r(),r(),r(),r();var g8=_.PI/180,p8=180/_.PI,m8=class{Gy(t,i){return this.x=t,this.y=i,this}jft(t){return this.x=t.x,this.y=t.y,this}Oli(t){return this.Gy(t[0],t[1])}Fli(){const t=new Float32Array(2);return t[0]=this.x,t[1]=this.y,t}Uli(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this}constructor(t,i){this.x=void 0,this.y=void 0,this.x=t||0,this.y=i||0}},w8=class{Gy(t,i,e){return this.x=t,this.y=i,this.z=e,this}jft(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}Oli(t){return this.Gy(t[0],t[1],t[2])}Fli(){const t=new Float32Array(3);return t[0]=this.x,t[1]=this.y,t[2]=this.z,t}V(){return _.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}Vli(){const t=this.V();if(0!==t){const i=1/t;this.Hli(i)}else this.x=0,this.y=0,this.z=0;return this}Hli(t){this.x*=t,this.y*=t,this.z*=t}Wli(t){const i=this.x,e=this.y,s=this.z,n=t.x,r=t.y,h=t.z,o=t.w,a=o*i+r*s-h*e,u=o*e+h*i-n*s,c=o*s+n*e-r*i,d=-n*i-r*e-h*s;return this.x=a*o+d*-n+u*-h-c*-r,this.y=u*o+d*-r+c*-n-a*-h,this.z=c*o+d*-h+a*-r-u*-n,this}qli(t){return this.x*t.x+this.y*t.y+this.z*t.z}zli(t,i){const e=t.x,s=t.y,n=t.z,r=i.x,h=i.y,o=i.z;return this.x=s*o-n*h,this.y=n*r-e*o,this.z=e*h-s*r,this}constructor(t,i,e){this.x=void 0,this.y=void 0,this.z=void 0,this.x=t||0,this.y=i||0,this.z=e||0}},su=class{Gy(t,i,e,s){return this.x=t,this.y=i,this.z=e,this.w=s,this}jft(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}Oli(t){return this.Gy(t[0],t[1],t[2],t[3])}Fli(){const t=new Float32Array(4);return t[0]=this.x,t[1]=this.y,t[2]=this.z,t[3]=this.w,t}qli(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}zF(t){return this.Gli(this,t)}Gli(t,i){const e=t.x,s=t.y,n=t.z,r=t.w,h=i.x,o=i.y,a=i.z,u=i.w;return this.x=e*u+r*h+s*a-n*o,this.y=s*u+r*o+n*h-e*a,this.z=n*u+r*a+e*o-s*h,this.w=r*u-e*h-s*o-n*a,this}Xli(){return this.x*=-1,this.y*=-1,this.z*=-1,this.Vli(),this}jli(){const t=this.x,i=this.y,e=this.z,s=this.w,n=t*i+e*s;let r,h,o;if(n>.499)r=2*_.atan2(t,s),h=_.PI/2,o=0;else if(n<-.499)r=-2*_.atan2(t,s),h=-_.PI/2,o=0;else{const a=t*t,u=i*i,c=e*e;r=_.atan2(2*i*s-2*t*e,1-2*u-2*c),h=_.asin(2*n),o=_.atan2(2*t*s-2*i*e,1-2*a-2*c)}return new y8(r,o,h)}Vli(){let t=_.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return 0===t?(this.x=0,this.y=0,this.z=0,this.w=1):(t=1/t,this.x=this.x*t,this.y=this.y*t,this.z=this.z*t,this.w=this.w*t),this}constructor(t,i,e,s){this.x=void 0,this.y=void 0,this.z=void 0,this.w=void 0,this.x=t||0,this.y=i||0,this.z=e||0,this.w=void 0!==s?s:1}},y8=class{Gy(t,i,e){return this.Qli=t,this.Kli=i,this.Yli=e,this}jft(t){return this.Gy(t.Qli,t.Kli,t.Yli)}gO(t){return this.Qli+=t.Qli,this.Kli+=t.Kli,this.Yli+=t.Yli,this}gF(t){return this.Qli-=t.Qli,this.Kli-=t.Kli,this.Yli-=t.Yli,this}Jli(){const t=this.Qli,i=this.Yli,e=this.Kli,s=_.cos(t/2),n=_.cos(i/2),r=_.cos(e/2),h=_.sin(t/2),o=_.sin(i/2),a=_.sin(e/2),u=s*n,c=h*o;return new su(u*a+c*r,h*n*r+s*o*a,s*o*r-h*n*a,u*r-c*a)}constructor(t,i,e){this.Qli=void 0,this.Kli=void 0,this.Yli=void 0,this.Qli=t||0,this.Kli=i||0,this.Yli=e||0}};r();var b8=["Zli","zot","$li","error"];r();var A8=function(t){return t.Os="unavailable",t.tfi="available",t.Ya="presenting",t}({});r();var S8=class{JU(){this.We||(this.We=!0,this.Ls.addEventListener("mousedown",this.ifi),this.Ls.addEventListener("touchstart",this.efi),s.addEventListener("mousemove",this.cr),s.addEventListener("touchmove",this.sfi),s.addEventListener("mouseup",this.nfi),s.addEventListener("touchend",this.rfi),this.hfi(s))}ZU(){this.We&&(this.We=!1,this.Ls.removeEventListener("mousedown",this.ifi),this.Ls.removeEventListener("touchstart",this.efi),s.removeEventListener("mousemove",this.cr),s.removeEventListener("touchmove",this.sfi),s.removeEventListener("mouseup",this.nfi),s.removeEventListener("touchend",this.rfi),this.ofi(s))}hfi(t){if(function(t){try{return Boolean(t)&&t===t.top}catch(t){return!1}}(t));else if(Ul(t))try{t.parent.addEventListener("mouseup",this.nfi),this.hfi(t.parent)}catch(i){t.document.documentElement.addEventListener("mouseleave",this.afi)}}ofi(t){if(t.document.documentElement.removeEventListener("mouseleave",this.afi),Ul(t))try{t.parent.removeEventListener("mouseup",this.nfi),this.ofi(t.parent)}catch(t){}}ufi(){this.cfi=!1}dfi(){const t=this.ffi.lfi;t.yaw+=2*_.PI*this.vfi.x*.4/this.Ls.clientWidth,t.pitch+=2*_.PI*this.vfi.y*.5/this.Ls.clientHeight,t.pitch=No(t.pitch,-_.PI/2,_.PI/2),this.ffi.lfi=t}_fi(){return(h.pointerLockElement||h.mozPointerLockElement||h.webkitPointerLockElement)===this.Ls}kn(){this.ZU()}constructor(t,i){this.ffi=void 0,this.Ls=void 0,this.We=!1,this.gfi=new m8,this.pfi=new m8,this.vfi=new m8,this.cfi=!1,this.ifi=t=>{this.gfi.Gy(t.clientX,t.clientY),this.cfi=!0,t.preventDefault(),t.stopPropagation()},this.efi=t=>{t.touches&&1===t.touches.length&&(this.gfi.Gy(t.touches[0].pageX,t.touches[0].pageY),this.cfi=!0,t.preventDefault())},this.cr=t=>{if(this.cfi||this._fi()){if(this._fi()){const i=t.movementX||t.mozMovementX||0,e=t.movementY||t.mozMovementY||0;this.pfi.Gy(this.gfi.x-i,this.gfi.y-e)}else this.pfi.Gy(t.clientX,t.clientY);this.vfi.Uli(this.pfi,this.gfi),this.gfi.jft(this.pfi),this.dfi()}},this.sfi=t=>{this.cfi&&(this.pfi.Gy(t.touches[0].pageX,t.touches[0].pageY),this.vfi.Uli(this.pfi,this.gfi),this.gfi.jft(this.pfi),this.dfi())},this.nfi=()=>{this.ufi()},this.rfi=()=>{this.ufi()},this.afi=()=>{this.ufi()},this.ffi=t,this.Ls=i}};r();var T8=class extends Oi{xa(){return new k8}constructor(){super("$li")}},k8=class extends gp{constructor(){super("stereochange")}};r();var E8=class{mfi(t){t.clearColor(...this.hZ),t.clear(t.COLOR_BUFFER_BIT)}wfi(t,i){t.clearDepth(1),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),t.clear(t.DEPTH_BUFFER_BIT),this.yfi.forEach(e=>{e.wfi(t,i)})}bfi(t){this.yfi.push(t)}Afi(){this.yfi=[]}constructor(){this.hZ=[0,0,0,1],this.yfi=[]}};r(),r(),r();var x8=class{Sfi(t,i,e){const s=t.createBuffer();return null===s?(uh("Failed to create buffer."),null):(t.bindBuffer(i,s),t.bufferData(i,e,t.STATIC_DRAW),s)}constructor(t,i,e,s,n){this.Tfi=void 0,this.eb=void 0,this.kfi=void 0,this.Vp=void 0,this.Efi=void 0,this.xfi=void 0,this.uc=void 0,this.Tfi=t,this.eb=this.Sfi(t,i,e),this.kfi=s,this.Vp=n,this.Efi=!1,this.xfi=0,this.uc=0}},P8=class extends x8{JU(t){if(null===this.eb)return void uh("Attempted to enable buffer that failed to initialize.");if(null===t)return void uh("Attempted to enable attribute without location.");const i=this.Tfi;i.bindBuffer(i.ARRAY_BUFFER,this.eb),i.vertexAttribPointer(t,this.kfi,this.Vp,this.Efi,this.xfi,this.uc),i.enableVertexAttribArray(t)}ZU(t){t&&this.Tfi.disableVertexAttribArray(t)}constructor(t,i,e){super(t,t.ARRAY_BUFFER,i,e,t.FLOAT)}};var I8=class extends x8{Pfi(){const t=this.Tfi;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.eb),t.drawElements(t.TRIANGLES,this.Ifi,this.Vp,this.uc)}constructor(t,i){super(t,t.ELEMENT_ARRAY_BUFFER,i,1,t.UNSIGNED_SHORT),this.Ifi=void 0,this.Ifi=i.length}};r();var C8=function(t){return t.VertexPos="aVertexPosition",t.VertexUV="aVertexUV",t.VertexColor="aVertexColor",t}({}),Mu=function(t){return t.ProjectionMat="uProjectionMatrix",t.ModelViewMat="uModelViewMatrix",t.Texture="uTexture",t}({}),R8=function(t){return t.Normal="vNormal",t.Color="vColor",t.UV="vUV",t}({}),D8=class{Cfi(t,i,e){const s=this.Rfi(t,t.VERTEX_SHADER,i),n=this.Rfi(t,t.FRAGMENT_SHADER,e);if(null===s||null===n)return uh("Failed to create vertex or fragment shader."),null;const r=t.createProgram();return null===r?(uh("Failed to create shader program"),null):(t.attachShader(r,s),t.attachShader(r,n),t.linkProgram(r),t.getProgramParameter(r,t.LINK_STATUS)?r:(uh("Failed to initialize shader program"),null))}Rfi(t,i,e){const s=t.createShader(i);if(null===s)return uh("failed to create shader."),null;if(t.shaderSource(s,e),t.compileShader(s),!t.getShaderParameter(s,t.COMPILE_STATUS)){const i=t.getShaderInfoLog(s);return uh("Failed to compile shader with error: "+i),t.deleteShader(s),null}return s}Dfi(){return this.Nfi}Bfi(t){const i=this.Nfi;if(null===i)return uh("Attempted to retrieve attribute location when shader program was not initialized"),null;const e=this.Tfi.getAttribLocation(i,t);return-1===e?null:e}Mfi(t){const i=this.Nfi;if(null===i)return uh("Attempted to retrieve uniform location when shader program was not initialized"),null;const e=this.Tfi.getUniformLocation(i,t);return null===e&&Tv("Attempted to retrieve nonexistent uniform: "+t),e}constructor(t,i,e){this.Nfi=void 0,this.Tfi=void 0,this.Tfi=t,this.Nfi=this.Cfi(this.Tfi,i,e)}},N8=class{Lfi(){const t=this.Ofi.length,i=_.max(...this.Ffi);return i>=t?(Tv("Created geometry where largest index ("+i+") is larger than/equal to attribute array size ("+t+")"),!1):(i{e.push(t.x,t.y,t.z)}),new P8(t,new Float32Array(e),3)}(t,this.Ofi),s=function(t,i){return new I8(t,new Uint16Array(i))}(t,this.Ffi),n=function(t,i){const e=[];return i.forEach(t=>{e.push(t.x,t.y)}),new P8(t,new Float32Array(e),2)}(t,this.Ufi);return new B8(e,s,n,i)}constructor(t,i,e){this.Ofi=void 0,this.Ffi=void 0,this.Ufi=void 0,this.Ofi=t,this.Ffi=i,this.Ufi=e}},B8=class{Hfi(){this.Ofi.JU(this.Wfi),null!==this.qfi&&this.Ufi.JU(this.qfi)}zfi(){this.Ofi.ZU(this.Wfi),null!==this.qfi&&this.Ufi.ZU(this.qfi)}wfi(){this.Ffi.Pfi()}constructor(t,i,e,s){this.Ofi=void 0,this.Wfi=void 0,this.Ufi=void 0,this.qfi=void 0,this.Ffi=void 0,this.Ofi=t;const n=s.Bfi(C8.VertexPos);if(null===n)throw new m("Failed to get position attribute location.");this.Wfi=n,this.Ufi=e,this.qfi=s.Bfi(C8.VertexUV),this.Ffi=i}},M8=class extends N8{constructor(t=1,i=32,e=16,s=0,n=2*_.PI,r=0,h=_.PI){let o=0;const a=_.min(r+h,_.PI),u=[],c=[],d=[],l=[];for(let u=0;u<=e;u++){const f=[],v=u/e;let g=0;0===u&&0===r?g=.5/i:u===e&&a===_.PI&&(g=-.5/i);for(let e=0;e<=i;e++){const a=e/i,u=-t*_.cos(s+a*n)*_.sin(r+v*h),l=t*_.cos(r+v*h),p=t*_.sin(s+a*n)*_.sin(r+v*h);c.push(new w8(u,l,p)),d.push(new m8(a+g,1-v)),f.push(o++)}l.push(f)}for(let t=0;t0)&&u.push(i,n,o),(t!==e-1||a<_.PI)&&u.push(n,h,o)}super(c,u,d)}};r(),r();var L8=[0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255],O8=class{Gfi(){const t=this.Tfi;t.activeTexture(this.Xfi),t.bindTexture(t.TEXTURE_2D,this.jfi)}gr(){const t=this.Tfi;t.activeTexture(this.Xfi),t.bindTexture(t.TEXTURE_2D,this.jfi),t.uniform1i(this.Qfi,0)}Kfi(t){const i=this.Tfi;i.bindTexture(i.TEXTURE_2D,this.jfi),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0),i.texImage2D(i.TEXTURE_2D,this.u2,this.Yfi,this.Jfi,this.Zfi,t),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1)}$fi(t){const i=this.Tfi;i.bindTexture(i.TEXTURE_2D,this.jfi),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0),t.ant.OQ(i,i.TEXTURE_2D,this.u2,this.Yfi,this.Jfi,this.Zfi),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1)}constructor(t,i){if(this.Tfi=void 0,this.jfi=void 0,this.Qfi=void 0,this.u2=void 0,this.Yfi=void 0,this.Jfi=void 0,this.Zfi=void 0,this.Xfi=void 0,this.Tfi=t,this.jfi=t.createTexture(),null===this.jfi)throw new m("Failed to create texture");const e=i.Mfi(Mu.Texture);if(null===e)throw new m("Failed to get texture location.");this.Qfi=e,t.bindTexture(t.TEXTURE_2D,this.jfi),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),this.Xfi=t.TEXTURE0,this.u2=0,this.Yfi=t.RGBA,this.Jfi=t.RGBA,this.Zfi=t.UNSIGNED_BYTE,t.texImage2D(t.TEXTURE_2D,this.u2,this.Yfi,2,2,0,this.Jfi,this.Zfi,new j(L8))}},F8="\n attribute vec4 "+C8.VertexPos+";\n attribute vec2 "+C8.VertexUV+";\n\n uniform mat4 "+Mu.ModelViewMat+";\n uniform mat4 "+Mu.ProjectionMat+";\n \n varying mediump vec2 "+R8.UV+";\n \n void main() {\n gl_Position = "+Mu.ProjectionMat+" * "+Mu.ModelViewMat+" * "+C8.VertexPos+";\n "+R8.UV+" = "+C8.VertexUV+";\n }\n",U8="\n varying mediump vec2 "+R8.UV+";\n \n uniform sampler2D "+Mu.Texture+";\n\n void main() {\n gl_FragColor = texture2D("+Mu.Texture+", "+R8.UV+");\n }\n",V8=class{Dfi(){return this.Nfi}JU(){this.Tfi.useProgram(this.Nfi.Dfi()),this.jfi.gr()}tvi(t){this.jfi.Kfi(t)}ivi(t){this.jfi.$fi(t)}constructor(t){this.Tfi=void 0,this.Nfi=void 0,this.jfi=void 0,this.Tfi=t,this.Nfi=new D8(t,F8,U8),this.jfi=new O8(t,this.Nfi)}};r(),r();var H8=gd(bd()),W8=gd(Ad()),q8=(gd(Sd()),gd(Td())),z8=(gd(kd()),gd(Ed())),G8=gd(xd()),X8=gd(Pd()),j8=gd(Id()),Q8=gd(Cd()),K8=class{wfi(t,i){if(this.evi(i.nvi)){this.rvi.Hfi(),this.hvi.JU();const e=this.ovi,s=i.avi,n=(0,G8.default)(s,s,e);t.uniformMatrix4fv(this.uvi,!1,n);const r=i.cvi;t.uniformMatrix4fv(this.fvi,!1,r),this.rvi.wfi(),this.rvi.zfi()}}evi(t){return"none"===this.nvi||"right"!==t&&"left"===this.nvi||"right"===t&&"right"===this.nvi}get ovi(){const t=(0,H8.default)(),i=this.mo;return(0,Q8.default)(t,t,i.Fli()),(0,j8.default)(t,t,this.vvi.x,new Float32Array([1,0,0])),(0,j8.default)(t,t,this.vvi.y,new Float32Array([0,1,0])),(0,j8.default)(t,t,this.vvi.z,new Float32Array([0,0,1])),t}constructor(t,i,e,s){this.rvi=void 0,this.hvi=void 0,this.uvi=void 0,this.fvi=void 0,this.mo=new w8,this.vvi=new w8,this.nvi="none",this.hvi=e;const n=e.Dfi();this.rvi=i.Vfi(t,n),s&&(this.nvi=s);const r=n.Mfi(Mu.ModelViewMat);if(null===r)throw new m("Failed to get model view matrix location.");this.uvi=r;const h=n.Mfi(Mu.ProjectionMat);if(null===h)throw new m("Failed to get projection matrix location.");this.fvi=h}};r();var Y8=class{_vi(){const t=(0,H8.default)();return(0,X8.default)(t,this.gvi,this.pvi,this.mvi,this.wvi)}yvi(){this.bvi=this._vi()}get cvi(){return new Float32Array(this.bvi)}set cvi(t){this.bvi=t}Avi(){const t=(0,H8.default)(),i=(0,q8.default)((0,H8.default)(),this.Svi.Fli()),e=(0,W8.default)((0,H8.default)(),this.Tvi.Fli());return(0,G8.default)(t,i,e),(0,z8.default)(t,t),t}kvi(){this.Evi=this.Avi()}get avi(){return new Float32Array(this.Evi)}xvi(){this.kvi(),this.yvi()}hr(){this.Svi=new w8,this.vvi=new su,this.xvi()}Pvi(t){const i=this.Tvi.jli();i.gO(t),this.vvi=i.Jli()}Ivi(t){this.vvi=t.Jli()}get Cvi(){return this.gvi}set Cvi(t){this.gvi=t,this.yvi()}get Rvi(){return this.pvi}set Rvi(t){this.pvi=t,this.yvi()}get mo(){return(new w8).jft(this.Svi)}set mo(t){this.Svi=t,this.kvi()}get vvi(){return(new su).jft(this.Tvi)}set vvi(t){this.Tvi=t,this.kvi()}constructor(t){this.gvi=72*_.PI/180,this.pvi=1.77,this.mvi=.1,this.wvi=100,this.nvi="none",this.Svi=void 0,this.Tvi=void 0,this.bvi=void 0,this.Evi=void 0,this.Svi=new w8,this.Tvi=new su,this.bvi=this._vi(),this.Evi=this.Avi(),t&&(this.nvi=t)}};r();var J8=class extends Oi{xa(){return new Z8}constructor(){super("Zli")}},Z8=class extends gp{constructor(){super("directionchange")}},$8=1e-4,t9=class extends Ne{Dvi(){od.xr?(od.xr.addEventListener("devicechange",this.Nvi),this.Nvi()):this.HNt("Your browser does not support WebXR",me.VR_PLATFORM_UNSUPPORTED)}Bvi(){this.oa.Ma.wn(Bs.pa,this.bn),this.oa.wn(Qh.yn,this.bn),this.oa.wn(d.do,this.fo),this.oa.wn(d.Zw,this.ZG)}Mvi(){var t;this.Lvi||(this.Lvi=h.createElement("canvas"),this.Lvi.className="theoplayer-vr",this.Lvi.style.zIndex="2",this.Lvi.style.background="black",this.Lvi.style.display="none",this.oa.xe.appendChild(this.Lvi),Go(this.Lvi));const i=null!=(t=this.Lvi.getContext("webgl2"))?t:this.Lvi.getContext("webgl");i?(this.Tfi=i,this.Ovi=new S8(this,this.Lvi)):this.HNt("Your browser does not support WebGL",me.VR_PLATFORM_UNSUPPORTED)}async Fvi(){if(!od.xr)return this.Uvi=!1,void(this.Vvi=!1);await Promise.all([od.xr.isSessionSupported("inline").then(t=>{this.Uvi=t}).catch(t=>{this.Uvi=!1,this.HNt("exception when calling xr.isSessionSupported for inline session: "+t,me.VR_PRESENTATION_ERROR)}),od.xr.isSessionSupported("immersive-vr").then(t=>{this.Vvi=t}).catch(t=>{this.Vvi=!1,this.HNt("exception when calling xr.isSessionSupported for immersive-vr session: "+t,me.VR_PRESENTATION_ERROR)})])}Hvi(){this.Wvi&&(this.qvi(this.zvi,this.Gvi),this.Xvi())}qvi(t,i){const e=this.Tfi;if(!e||t===Zo.NONE)return;let s,n;this.jvi.Afi(),t===Zo.PM360?(s=2*_.PI,n=-_.PI/2):(s=_.PI,n=-_.PI);const r=new M8(16,60,40,0,s),h=[],o=[];for(let t=0;t{t.x*=-1});const a=new N8(r.Ofi,r.Ffi,h),u=new N8(r.Ofi,r.Ffi,o);this.Qvi=new V8(e);const c=new K8(e,a,this.Qvi,"left");c.vvi.y=n,this.jvi.bfi(c);const d=new K8(e,u,this.Qvi,"right");d.vvi.y=n,this.jvi.bfi(d)}Xvi(){this.Tfi&&(this.Lvi.style.display="block",this.Kvi(),this.oa.mn(d.uo,this.dci),this.Uvi&&(this.oa.lP?this.oa.wn(d.uo,this.dci):this.dci()))}Yvi(){this.Jvi(),this.oa.mn(d.uo,this.dci),this.Lvi&&(this.Lvi.style.display="none")}Zvi(){this.$vi(),this.t_i()}async i_i(){if(!this.e_i&&this.Uvi)try{const t=await ua(od.xr.requestSession("inline"),this.uV.Yg);let i;i=zs.Ks?zs.u_?"viewer":"local":"viewer";const e=await t.requestReferenceSpace(i);t.addEventListener("end",this.$vi),this.s_i=e,this.e_i=t,this.Ovi.JU(),this.n_i(),await t.updateRenderState({baseLayer:new XRWebGLLayer(t,this.Tfi),inlineVerticalFieldOfView:this.gvi*g8})}catch(t){this.$vi(),this.HNt(t,me.VR_PRESENTATION_ERROR)}}$vi(){this.e_i&&(this.Jvi(),this.Ovi.ZU(),this.e_i.removeEventListener("end",this.$vi),this.e_i.end().catch(gs),this.e_i=null,this.Kvi())}async r_i(){if(!this.h_i&&this.Vvi){this.Jvi();try{const t=await ua(od.xr.requestSession("immersive-vr"),this.uV.Yg),i=await t.requestReferenceSpace("local");t.addEventListener("end",this.t_i),this.o_i=i,this.h_i=t,await this.a_i(),this.n_i()}catch(t){this.t_i(),this.HNt(t,me.VR_PRESENTATION_ERROR)}}}async a_i(){const t=this.Tfi,i=this.h_i;this.Lvi&&t&&i&&!this.u_i&&(this.Lvi.addEventListener("webglcontextlost",t=>{t.preventDefault()}),this.Lvi.addEventListener("webglcontextrestored",()=>{this.qvi(this.zvi,this.Gvi)}),this.u_i=!0,await t.makeXRCompatible(),await i.updateRenderState({baseLayer:new XRWebGLLayer(i,t)}))}Kvi(){if(!this.h_i&&this.Tfi){const t=this.Tfi,i=this.Lvi.clientWidth,e=this.Lvi.clientHeight;if(0===i||0===e)return;const s=zd.Zs.fp;this.Lvi.width=i*s,this.Lvi.height=e*s,t.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight)}}n_i(){null===this.c_i&&(this.d_i(),this.l_i?this.c_i=this.l_i.requestAnimationFrame(this.f_i):this.v_i())}Jvi(){null!==this.c_i&&(this.v_i(),this.l_i&&this.l_i.cancelAnimationFrame(this.c_i),this.c_i=null)}d_i(){if(null!==this.__i)return;const t=this.oa.zP();if(void 0===t||!(t instanceof HTMLVideoElement))return void 0;if("function"!=typeof t.requestVideoFrameCallback)return;const i=()=>{this.Qvi.ivi(this.oa),this.__i=t.requestVideoFrameCallback(i)};this.g_i=t,this.__i=t.requestVideoFrameCallback(i)}v_i(){var t,i;null!==this.__i&&(null==(i=this.g_i)||null==(t=i.cancelVideoFrameCallback)||t.call(i,this.__i),this.g_i=null,this.__i=null)}p_i(){return!!this.m_i||(zs.ru?this.w_i&&this.y_i:this.w_i)}b_i(){const t=DeviceMotionEvent.requestPermission;"function"==typeof t&&t().then(t=>{this.y_i="granted"===t})}A_i(){return(!this.lP()||Boolean(this.S_i))&&this.T_i()}lP(){return this.oa.lP}T_i(){return this.oa.AP>=2}get k_i(){return this.E_i}set k_i(t){const i=this.vft;this.E_i=t,this.vft!==i&&this.So(new Kr)}get Wvi(){return this.zvi!==Zo.NONE}get zvi(){return this.x_i}set zvi(t){const i=this.vft;this.x_i=t,this.vft!==i&&this.So(new Kr)}get Vvi(){return this.P_i}set Vvi(t){const i=this.P_i;this.P_i=t,this.P_i!==i&&this.So(new Kr)}get I_i(){return this.Vvi}get l_i(){return this.h_i||this.e_i}get h_i(){return this.m_i}set h_i(t){const i=this.vft;this.m_i=t,this.vft!==i&&this.So(new Kr)}get C_i(){return this.o_i||this.s_i}get R_i(){const t=this.D_i.jli();return{yaw:t.Qli*p8,pitch:t.Kli*p8,roll:t.Yli*p8}}set R_i(t){const i=i9(t&&t.pitch||0)*g8,e=i9(t&&t.roll||0)*g8,s=i9(t&&t.yaw||0)*g8,n=new y8(s,i,e),r=this.D_i.jli(),h=this.N_i.jli();this.D_i=n.Jli(),this.N_i=n.gF(r).gO(h).Jli()}get lfi(){const t=this.N_i.jli();return{yaw:t.Qli,pitch:t.Kli,roll:t.Yli}}set lfi(t){const i=e9(t&&t.pitch||0),e=e9(t&&t.roll||0),s=e9(t&&t.yaw||0),n=new y8(s,i,e);this.N_i=n.Jli()}get vft(){return this.k_i?this.h_i?A8.Ya:A8.tfi:A8.Os}get B_i(){return null!==this.h_i}set B_i(t){const i=this.B_i;t&&this.Vvi?this.r_i():this.t_i(),this.B_i!==i&&this.So(new T8)}get M_i(){return this.w_i}set M_i(t){null===this.m_i&&(this.w_i=t,t&&zs.ru&&this.b_i())}get L_i(){return this.gvi}set L_i(t){t&&t>=0&&t<=180&&(this.gvi=t,null!==this.e_i&&this.e_i.updateRenderState({inlineVerticalFieldOfView:this.gvi*g8}))}HNt(t,i){this.So(new el(new as(i,t)))}O_i(){const t=this.oa.nu();return t&&t.vr}kn(){this.uV.Zg(),this.Zvi(),this.Vo(),this.Lvi&&(Ao(this.Lvi),this.Lvi=void 0),this.Tfi=void 0,this.Ovi&&(this.Ovi.kn(),this.Ovi=void 0),this.oa=void 0}constructor(t){super(),this.oa=void 0,this.Ca=void 0,this.uV=new Zc,this.Uvi=!1,this.P_i=!1,this.D_i=new su,this.F_i=new su,this.N_i=new su,this.gvi=74,this.w_i=!1,this.ZS=void 0,this.Gvi=Qu.NONE,this.E_i=!1,this.x_i=Zo.NONE,this.Lvi=void 0,this.Qvi=void 0,this.Tfi=void 0,this.jvi=new E8,this.Ovi=void 0,this.e_i=null,this.m_i=null,this.s_i=null,this.o_i=null,this.u_i=!1,this.c_i=null,this.g_i=null,this.__i=null,this.S_i=0,this.y_i=!1,this.Nvi=()=>{const t=this.Uvi;this.Fvi().then(()=>{this.Uvi?t||this.e_i||this.m_i||this.Hvi():this.HNt("Inline session not available. Panorama functionality will not work.",me.VR_PRESENTATION_ERROR)})},this.fo=()=>{var t;this.Yvi(),this.Zvi(),null==(t=od.xr)||t.removeEventListener("devicechange",this.Nvi);const i=this.O_i();this.ZS=i,this.k_i=it(i),this.Gvi=(null==i?void 0:i.stereoMode)||Qu.NONE,this.zvi=(null==i?void 0:i.panoramaMode)||Zo.NONE,i&&(this.Mvi(),this.Hvi(),this.Dvi())},this.dci=()=>{this.i_i()},this.t_i=()=>{this.h_i&&(this.Jvi(),this.h_i.removeEventListener("end",this.t_i),this.h_i.end().catch(gs),this.h_i=null,this.o_i=null,this.u_i=!1,this.e_i?this.n_i():this.i_i())},this.bn=()=>{this.Kvi()},this.f_i=(t,i)=>{if(!this.Tfi)return;const e=this.Tfi,s=this.l_i;if(null===this.__i&&this.A_i()&&(this.Qvi.ivi(this.oa),this.S_i>0&&(this.S_i-=1)),null===s||void 0===i)return void 0;this.c_i=s.requestAnimationFrame(this.f_i);const n=s.renderState.baseLayer,r=i.getViewerPose(this.C_i);if(void 0===n||void 0===r)return void 0;e.bindFramebuffer(e.FRAMEBUFFER,n.framebuffer);let h=new y8,o=0;for(const t of r.views){const i=new Y8(t.eye);if(i.cvi=t.projectionMatrix,this.p_i()){let e;if(zs.Ks&&zs.u_&&null===this.m_i){if(e=t.transform.inverse.orientation,0===e.x&&0===e.y&&0===e.z&&1===e.w)return}else e=t.transform.orientation;i.vvi=new su(e.x,e.y,e.z,e.w)}this.e_i&&i.Pvi(this.N_i.jli()),h=h.gO(i.vvi.jli()),o+=1;const s=n.getViewport(t);s&&e.viewport(s.x,s.y,s.width,s.height),this.jvi.wfi(e,i)}const a=new y8(h.Qli/o,h.Kli/o,h.Yli);this.D_i=a.Jli(),function(t,i){const e=t.qli(i);return 1-e*e<$8}(this.D_i,this.F_i)||(this.F_i.jft(this.D_i),this.So(new J8))},this.ZG=()=>{this.S_i=5},this.oa=t,this.Ca=function(t){let i;const e={get stereo(){return t.B_i},set stereo(i){t.B_i=i},get useDeviceMotionControls(){return t.M_i},set useDeviceMotionControls(i){t.M_i=i},get direction(){return t.R_i},set direction(i){t.R_i=i},get verticalFOV(){return t.L_i},set verticalFOV(i){t.L_i=i},get canPresentVR(){return t.I_i},get state(){return t.vft},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new hN(t,b8,e),e}(this),this.Bvi()}};function i9(t){return Kl(t+180,360)-180}function e9(t){return Kl(t+_.PI,2*_.PI)-_.PI}Na(function(t){return class extends t{xa(){return Gi(super.xa(),{vr:this.ffi.Ca})}kn(){this.ffi.kn(),super.kn()}constructor(t,i){super(t,i),this.ffi=void 0,this.ffi=new t9(this)}}},Oa.lu),r(),r();var s9=class extends je{get Ca(){return this.hu||(this.hu=function(t){let i;const e={get status(){return t.dk},get tasks(){return t.vsi},get network(){return t.lX.Ca},createTask:(i,e)=>t.U_i(i,e),addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new le(t,e),e}(this)),this.hu}get dk(){return this.V_i.dk}get vsi(){return this.V_i.vsi.Ca}get lX(){return this.ent}U_i(t,i,e){let s,n;if(void 0===e&&(e="persistent"),!t)throw new m("Unexpected - The source description is undefined");if(s=ra(t),n=v5(i),Uu(s))throw new m("Invalid source description");return this.V_i.asi(s,n).Ca}constructor(t,i){super(),this.V_i=void 0,this.ent=void 0,this.hu=void 0,this.V_i=t,this.ent=i,this.V_i.wn("zot",this.Rs)}};var n9=function(){const t=new GD(zd.Dx,!1),i=Wc.Bg,e=new y5(t),s=new f5(i,e),n=new jD(t),r=new P4(i.Mxt,s,"persistent");return new s9(r,n)}().Ca;function r9(t,i){if("function"==typeof t.getAll){return gh(void 0===i?t.getAll():t.getAll(i))}return function(t){const i=new Ga,e=[];return t.onsuccess=()=>{const s=t.result;s&&s.value?(e.push(s.value),s.continue()):i.Qy(e)},t.onerror=()=>{i.Ky(t.error)},i.Yy}(void 0===i?t.openCursor():t.openCursor(i))}function gh(t){return new Promise((i,e)=>{t.onsuccess=()=>{i(t.result)},t.onerror=()=>{e(t.error)}})}r(),r(),r(),r(),r(),r();var h9=class{Zg(){if(this.ro)try{this.Rxt.abort(),this.ro=!1}catch(t){}}constructor(t){this.Rxt=void 0,this.Yy=void 0,this.ro=void 0,this.Rxt=t,this.ro=!0,this.Yy=new Promise((t,i)=>{this.Rxt.oncomplete=()=>{this.ro=!1,t()},this.Rxt.onerror=()=>{this.ro&&(this.ro=!1,i(this.Rxt.error||new m("Transaction error")))},this.Rxt.onabort=()=>{this.ro=!1,i(new m("Transaction aborted"))}})}};async function o9(t,i,e){const s=new h9(t);try{const[t]=await Promise.all([i(e),s.Yy]);return t}catch(t){if(!s.ro)throw new Ch("IDBTransaction committed prematurely",t);throw t}finally{s.Zg()}}var a9=class{get l(){return this.wE.l}yxt(t){return Promise.resolve("persistent"===t)}uTt(t,i){if(void 0===i&&(i="persistent"),"persistent"!==i)return Promise.reject(lu(i));return gh(this.H_i(Bu.Fxt).put(t))}async bxt(t,i){if(void 0===i&&(i="persistent"),"persistent"!==i)return Promise.reject(lu(i));for(const e of t)await this.uTt(e,i)}async qy(t){return Boolean(await this.zy(t))}zy(t){return gh(this.H_i(Bu.Oxt).get(t))}Axt(t,i){return gh(this.H_i(Bu.Oxt).index(i).get(t))}async _xt(t){const i=[];for(const e of t){const t=await this.zy(e);t&&i.push(t)}return i}Sxt(){return r9(this.H_i(Bu.Oxt))}Txt(t){return r9(this.H_i(Bu.Oxt),t)}kxt(t,i){return r9(this.H_i(Bu.Oxt).index(i),t)}pS(t){return gh(this.H_i(Bu.Fxt).delete(t))}async Ext(t){for(const i of t)await this.pS(i)}xxt(){return gh(this.H_i(Bu.Fxt).clear())}H_i(t){if(!this.W_i)throw new m("Lock was released");if(!function(t,i){return t===Bu.Oxt&&i===Bu.Oxt||i===Bu.Fxt}(t,this.W_i.mode))throw new m("Incompatible transaction mode: "+this.W_i.mode+", expected "+t);return this.W_i.objectStore(this.l)}q_i(){this.wE.z_i(this),this.W_i=void 0}constructor(t,i){this.wE=void 0,this.W_i=void 0,this.wE=t,this.W_i=i}};var oh=class{yxt(t){return Promise.resolve("persistent"===t)}uTt(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?Promise.reject(lu(i)):this.Rxt(Bu.Fxt,i=>i.uTt(t))}bxt(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?Promise.reject(lu(i)):this.Rxt(Bu.Fxt,i=>i.bxt(t))}qy(t){return this.Rxt(Bu.Oxt,i=>i.qy(t))}zy(t){return this.Rxt(Bu.Oxt,i=>i.zy(t))}Axt(t,i){return this.Rxt(Bu.Oxt,e=>e.Axt(t,i))}_xt(t){return this.Rxt(Bu.Oxt,i=>i._xt(t))}Sxt(){return this.Rxt(Bu.Oxt,t=>t.Sxt())}Txt(t){return this.Rxt(Bu.Oxt,i=>i.Txt(t))}kxt(t,i){return this.Rxt(Bu.Oxt,e=>e.kxt(t,i))}pS(t){return this.Rxt(Bu.Fxt,i=>i.pS(t))}Ext(t){return this.Rxt(Bu.Fxt,i=>i.Ext(t))}xxt(){return this.Rxt(Bu.Fxt,t=>t.xxt())}gPt(t){return this.G_i(),this.nPt=new a9(this,t),this.nPt}G_i(){if(void 0!==this.nPt)throw new m("Already locked")}z_i(t){if(this.nPt!==t)throw new m("Incorrect lock");this.nPt=void 0}Zo(t){return this.ta.Zo(t)}Rxt(t,i){return this.Zo(()=>this.X_i(t,i))}async X_i(t,i){this.G_i();const e=this.j_i.transaction(this.l,t),s=this.gPt(e);try{return await o9(e,i,s)}finally{s.q_i()}}Q_i(t){this.G_i();const i=this.j_i.transaction(this.l,t);return this.gPt(i)}static K_i(t,i){let e;const s=new Promise(t=>{e=t}),n=t.reduce((t,i)=>t.then(()=>{let t;const e=new Promise(i=>{t=i});return i.Zo(()=>(t(),s)).catch(gs),e}),Promise.resolve());return e(n.then(i)),s}constructor(t,i){this.j_i=void 0,this.l=void 0,this.nPt=void 0,this.ta=new Zn,this.j_i=t,this.l=i}};r(),r(),r(),r(),r();var u9={ED:17,Y_i:async t=>{const{transaction:i,database:e}=t,s=i.objectStoreNames;if(s&&s.length)for(let t=0;tnew d9(t)}},f9="cachingTask",v9="licences",_9="manifest",g9="segment",p9="segmentMetadata";async function m9(){!function(){if("undefined"==typeof indexedDB)throw new m("Indexed database unavailable")}();const t=indexedDB.open("theoplayer-cache-database",18);return t.addEventListener("upgradeneeded",w9),await gh(t)}async function w9(t){const i=t.oldVersion<=18?t.oldVersion:-1,e=t.target,s=e.result,n=e.transaction,r=l9.jet(i),h={database:s,transaction:n};await o9(n,t=>r.J_i(t),h)}var y9=class{static get Bg(){return this.Rbt||(this.Rbt=m9()),this.Rbt}};y9.Rbt=void 0,r();var b9=class{Rxt(t){return t(this)}q_i(){this.Nxt.q_i(),this.bct.q_i(),this.Bxt.q_i(),this.Mxt.q_i(),this.Lxt.q_i()}constructor(t,i){this.Nxt=void 0,this.bct=void 0,this.Bxt=void 0,this.Mxt=void 0,this.Lxt=void 0,this.Nxt=t.Nxt.gPt(i),this.bct=t.bct.gPt(i),this.Bxt=t.Bxt.gPt(i),this.Mxt=t.Mxt.gPt(i),this.Lxt=t.Lxt.gPt(i)}};Wc.Ba(class t{static async jet(){const i=await y9.Bg;return new t(i)}Rxt(t){const i=this.allCollections;return oh.K_i(i,()=>this.X_i(i,t))}async X_i(t,i){const e=t.map(t=>t.l),s=this.j_i.transaction(e,Bu.Fxt),n=new b9(this,s);try{return await o9(s,i,n)}finally{n.q_i()}}get allCollections(){return[this.bct,this.Nxt,this.Bxt,this.Mxt,this.Lxt]}constructor(t){this.j_i=void 0,this.Nxt=void 0,this.bct=void 0,this.Bxt=void 0,this.Mxt=void 0,this.Lxt=void 0,this.j_i=t,this.Nxt=new oh(t,p9),this.bct=new oh(t,g9),this.Bxt=new oh(t,_9),this.Mxt=new oh(t,f9),this.Lxt=new oh(t,v9)}}.jet),r(),r(),r();var A9=class{egi(t){const i=this.LY.Ox(),e=t.createGain();for(const s of i){t.createMediaElementSource(s).connect(e)}return e}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}xa(){const t=this;return{createAudioSourceNode:i=>t.egi(i)}}constructor(t){this.LY=void 0,this.hu=void 0,this.LY=t}};Na(function(t){return class extends t{xa(){const t=this.sgi.Ca;return Gi(super.xa(),{get audio(){return t}})}constructor(t,i){super(t,i),this.sgi=void 0,this.sgi=new A9(this.Pa)}}},Oa.lu),r(),r();Na(function(t){return class i extends t{Ta(t){const e=i.ngi(this.Cd.analytics),s=i.ngi(t?t.analytics:void 0);e||s?this.rgi(Y({},e,s)):this.hgi&&this.hgi.disable(),super.Ta(t)}rgi(t){if(this.hgi)this.hgi.enable(),this.hgi.setOptions(t);else{const i=s.youbora;if(!i)throw new m("Youbora JavaScript library not loaded.");if(!i.adapters.TheoPlayer2)throw new m("TheoPlayer2 adapter not available on Youbora JavasScript library");const e=new i.Plugin(t);e.setAdapter(new i.adapters.TheoPlayer2(this.Ca)),this.Jc&&i.adapters.TheoPlayer2.NativeAdsAdapter&&e.setAdsAdapter(new i.adapters.TheoPlayer2.NativeAdsAdapter(this.Ca)),this.hgi=e}}static ngi(t){if(t){const i=t.filter(t=>"youbora"===t.integration);if(0===i.length)return;if(i.length>1)throw new m("Only one youbora analytics configuration expected");const e=i[0],{integration:s}=e;return dT(e,["integration"])}}kn(){this.hgi&&this.hgi.disable(),super.kn()}constructor(t,i){super(t,i),this.hgi=void 0}}},Oa.Snt),r(),r(),r();var S9=1,T9=0,k9=1e3,E9=class t extends dS{ogi(){const t=this.ct===1/0,i=t?S9:T9,e=t?-1:this.ct,s=hs(this.oa.rt.NI,this.agi);this.ugi.setPresentationInformation(new this.cgi(i,e,s))}agi(t){const i=t.$I.NI,e=[];for(let t=0;t{this.wgi(),this.ygi()},t.bgi)}QBt(){this.oa.Jc&&(this.oa.Jc.wn("Jnt",this.Agi),this.oa.Jc.wn("Znt",this.Sgi),this.oa.Jc.wn("_4t",this.Bci),this.oa.Jc.wn("Z4t",this.Tgi)),this.oa.wn(d.Nw,this.kgi),this.oa.wn(hc.ma,this.u8),this.oa.wn(d.jw,this.Egi),this.oa.wn(d.uo,this.dci),this.oa.wn(Jr.PM,this.YG),this.oa.wn(d.Jw,this.iK),this.oa.wn(d.Zw,this.ZG),this.oa.wn(Jr.xM,this.QG),this.oa.wn(d.ly,this.xgi)}KBt(){this.oa.Jc&&(this.oa.Jc.mn("Jnt",this.Agi),this.oa.Jc.mn("Znt",this.Sgi),this.oa.Jc.mn("_4t",this.Bci),this.oa.Jc.mn("Z4t",this.Tgi)),this.oa.mn(d.Nw,this.kgi),this.oa.mn(hc.ma,this.u8),this.oa.mn(d.jw,this.Egi),this.oa.mn(d.uo,this.dci),this.oa.mn(Jr.PM,this.YG),this.oa.mn(d.Jw,this.iK),this.oa.mn(d.Zw,this.ZG),this.oa.mn(Jr.xM,this.QG),this.oa.mn(d.ly,this.xgi)}kn(){p(this.Pgi),this.KBt()}constructor(t,i,e,s=MMPlayerState,n=MMAdState,r=MMPresentationInfo){super(),this.oa=void 0,this.ZS=void 0,this.ugi=void 0,this.Igi=void 0,this.Cgi=void 0,this.cgi=void 0,this.Rgi=void 0,this.fgi=void 0,this.pgi=void 0,this._gi=void 0,this.Dgi=void 0,this.Pgi=void 0,this.Agi=void 0,this.Sgi=void 0,this.Bci=void 0,this.Tgi=void 0,this.xgi=void 0,this.kgi=void 0,this.u8=void 0,this.Egi=void 0,this.dci=void 0,this.YG=void 0,this.iK=void 0,this.ZG=void 0,this.QG=void 0,this.ygi=void 0,this.wgi=void 0,this.oa=t,this.ZS=i,this.ugi=e,this.Igi=s,this.Cgi=n,this.cgi=r,this.Rgi=!0,this.fgi=!1,this.pgi=void 0,this._gi=void 0,this.Dgi=void 0,this.Agi=t=>{const i=t.jnt;i.d1t();var e;e=i.Ont().duration;const s="linear"===i.Ont().type;i.l1t(),i.a1t();s&&(this.fgi=!0),this.ggi=this.Cgi.AD_IMPRESSION,this.ggi=this.Cgi.AD_STARTED},this.Sgi=t=>{this.fgi=!1,this.ggi=this.Cgi.AD_COMPLETED},this.Bci=t=>{t.AZt===$c.ADBLOCK?this.ggi=this.Cgi.AD_BLOCKED:this.ggi=this.Cgi.AD_ERROR},this.Tgi=()=>{this.ggi=this.Cgi.AD_SKIPPED},this.xgi=t=>{var i,e,s,n;t.Gk===at.Mk&&(this.Dgi&&t.FX!==this.Dgi&&this.ugi.reportABRSwitch(this.Dgi,t.FX),this.Dgi=t.FX,this.ugi.reportChunkRequest(new MMChunkInformation(t.sN,t.FX,t.zB,t.Iut.Yu,void 0,void 0,null!=(s=null==(i=t.Iut.Wat)?void 0:i[0])?s:0,null!=(n=null==(e=t.Iut.Wat)?void 0:e[1])?n:-1)))},this.kgi=t=>{this.vgi=this.Igi.STOPPED,this.So(t)},this.u8=t=>{this.vgi=this.Igi.ERROR,this.ugi.reportError(t.error,this.dgi())},this.Egi=()=>{this.lgi?this.ggi=this.Cgi.AD_PAUSED:this.vgi=this.Igi.PAUSED},this.dci=()=>{this.lgi&&(this.ggi=this.Cgi.AD_PLAY)},this.YG=()=>{this.lgi?(this.pgi===this.Cgi.AD_PAUSED&&(this.ggi=this.Cgi.AD_RESUMED),this.ggi=this.Cgi.AD_PLAYING):(this.Rgi&&(this.Rgi=!1,this.ogi(),this.vgi=this.Igi.STARTED),this.vgi!==this.Igi.PAUSED&&this.vgi!==this.Igi.BUFFERING||(this.vgi=this.Igi.RESUMED))},this.iK=()=>{this.ugi.reportPresentationSize(this.oa.MP,this.oa.DP)},this.ZG=t=>{this.lgi||this.vgi!==this.Igi.PAUSED||this.ugi.reportPlayerSeekCompleted(t.currentTime*k9)},this.QG=()=>{this.lgi||(this.vgi=this.Igi.BUFFERING)},this.ygi=()=>{this.ugi.reportDownloadRate(_.floor(sc.Bg.pW()))},this.wgi=()=>{this.lgi||this.ugi.reportPlaybackPosition(this.dgi())},this.vgi=this.Igi.INITIALIZED,this.QBt(),this.Pgi=this.mgi()}};E9.bgi=2e3,Na(function(t){return class extends t{kn(){super.kn(),this.Ngi()}constructor(t,i){super(t,i),this.Bgi=void 0,this.Mgi=void 0,this.Lgi=()=>{this.Mgi=void 0,this.Ngi();const t=super.nu();t&&(this.Mgi=function(t,i){const e=function(t,i){if(t&&t.analytics)for(const i of t.analytics)if("smartsight"===i.integration)return i;if(i&&i.analytics)for(const t of i.analytics)if("smartsight"===t.integration)return t;return}(t,i);if(!e)return;return e}(t,this.Cd)),this.Ogi()},this.Ogi=()=>{if(!this.Bgi&&this.Mgi&&this.bt&&this.bt.src&&!this.lP){const t=MMSmartStreaming.getInstance();!function(t,i,e){t.registerMMSmartStreaming(e.playerName,e.customerID,e.subscriberID,e.domainName),t.reportComponent("THEOSDK"),t.reportPlayerInfo("THEOplayer","THEOplayer","10.3.0"),t.reportDeviceInfo(void 0,void 0,void 0,void 0,void 0,s.innerWidth,s.innerHeight),t.initializeSession("QBRModeDisabled",i,e.metaURL,e.assetID)}(t,this.bt.src,this.Mgi),this.Bgi=new E9(this,this.Mgi,t),this.Bgi.wn("ended",this.Ngi)}},this.Ngi=()=>{this.Bgi&&(this.Bgi.kn(),this.Bgi=void 0)},this.wn(d.do,this.Lgi),this.wn(d.Pw,this.Ogi),this.wn(d.uo,this.Ogi)}}},Oa.Snt),r(),r();var x9=String.fromCharCode(95);var P9=class t{get Ca(){return this.hu||(this.hu=function(t){return{get adsManager(){return t.adsManager},get ids(){return t.ids},get adContainer(){return t.adContainer},get imaSDK(){return t.imaSDK},get sendEvent(){return t.sendEvent},set sendEvent(i){t.sendEvent=i}}}(this)),this.hu}get id(){return this.aS}get adsManager(){return this.Uri}get ids(){return this.Fgi}get adContainer(){return this.A2t}get sendEvent(){return this.Ugi}set sendEvent(t){for(const t of this.Vgi)this.Uri.removeEventListener(t.type,t.listener);this.Vgi=[],this.Ugi=t,this.Hgi()}get imaSDK(){return!0}Wgi(){for(const t in google.ima.AdEvent.Type){const i=google.ima.AdEvent.Type[t];this.Uri.addEventListener(i,this.qgi),this.Vgi.push({type:i,listener:this.qgi})}}zgi(){Wt(this.Vgi);for(const t in google.ima.AdEvent.Type){const i=google.ima.AdEvent.Type[t];this.Uri.removeEventListener(i,this.qgi)}}Ggi(t){this.Zf.push({type:t.type,adVolume:this.adsManager.getVolume()})}Hgi(){null==this.Ugi||this.Ugi.call(this,this.Zf),this.Zf=[]}static Xgi(i){return t.jgi[i]||i}constructor(i,e,s,n){this.hu=void 0,this.aS=void 0,this.Uri=void 0,this.Fgi=void 0,this.A2t=void 0,this.Vgi=void 0,this.Ugi=void 0,this.Zf=void 0,this.qgi=i=>{this.Ggi({type:t.Xgi(i.type)})},this.aS=i,this.Uri=e,this.Fgi=s,this.A2t=n,this.Vgi=[],this.Zf=[]}};P9.jgi={loaded:"AdLoaded",impression:"AdImpression",start:"AdVideoStart",firstQuartile:"AdVideoFirstQuartile",midpoint:"AdVideoMidpoint",thirdQuartile:"AdVideoThirdQuartile",complete:"AdVideoComplete",pause:"AdPaused",skip:"AdSkipped",volumeChange:"AdVolumeChange"};var I9=class{Qgi(t,i){this.Kgi=h.createElement("script"),this.Kgi.id=t.id,this.Kgi.type="text/javascript",t.adContainer.appendChild(this.Kgi),this.Kgi.src="https://z.moatads.com/"+i+"/moatvideo.js#"+t.id,this.Ygi=t.id,s[this.Ygi]=t.Ca}Jgi(){this.Kgi&&Ao(this.Kgi),this.Ygi&&(s[this.Ygi]=void 0)}constructor(){this.Kgi=void 0,this.Ygi=void 0}};Na(function(t){return class i extends t{Ta(t){var e,s,n;this.Zgi(),null==(e=this.$gi)||e.removeEventListener(google.ima.AdEvent.Type.COMPLETE,this.tpi),null==(s=this.$gi)||s.removeEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.Zgi),null==(n=this.$gi)||n.removeEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.ipi),this.$gi=void 0,this.A2t=void 0,super.Ta(t);const r=t&&t.analytics;this.epi=i.spi(r);this.Jc&&this.epi&&e4()&&this.npi()}kn(){var t,i,e;this.Zgi(),null==(t=this.$gi)||t.removeEventListener(google.ima.AdEvent.Type.COMPLETE,this.tpi),null==(i=this.$gi)||i.removeEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.Zgi),null==(e=this.$gi)||e.removeEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.ipi),this.$gi=void 0,this.A2t=void 0,this.Jc&&this.Jc.mn("nii",this.rii),super.kn()}npi(){this.Jc&&this.Jc.wn("nii",this.rii)}rpi(t,i,e){const s=x9+"moatApi"+_.floor(1e8*_.random());this.hpi=new P9(s,t,i,e),this.hpi.Wgi(),this.opi.Qgi(this.hpi,this.epi.partnerCode)}static spi(t){if(t){const i=t.filter(t=>"moat"===t.integration);if(0===i.length)return;if(i.length>1)throw new m("Only one Moat analytics configuration expected");return i[0]}}constructor(t,i){super(t,i),this.opi=void 0,this.epi=void 0,this.hpi=void 0,this.$gi=void 0,this.A2t=void 0,this.ipi=()=>{this.rpi(this.$gi,{partnerCode:this.epi.partnerCode,viewMode:google.ima.ViewMode.NORMAL},this.A2t)},this.rii=t=>{this.$gi=t.Fri,this.A2t=t.Wii,this.Zgi(),this.$gi.addEventListener(google.ima.AdEvent.Type.COMPLETE,this.tpi),this.$gi.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.Zgi),this.$gi.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.ipi)},this.tpi=t=>{const i=t.getAd().getAdPodInfo();i.getAdPosition(){this.hpi&&(this.hpi.zgi(),this.hpi=void 0),this.opi.Jgi()},this.opi=new I9}}},Oa.Snt),r(),r(),r(),r();var C9="theo-dai-clickthrough",R9="urn:google:dai:2018",D9=class{get Ca(){const t=this,i=this.upi;return{contentTimeForStreamTime:i=>t.Hai?t.Hai.Wai(i):i,streamTimeForContentTime:i=>t.Hai?t.Hai.qai(i):i,replaceAdTagParameters(i){t.Hai&&t.Hai.replaceAdTagParameters(i)},get snapback(){return t.cpi},set snapback(i){t.cpi=i},get sourceTransformer(){return i.lpi},set sourceTransformer(t){i.lpi=t}}}Xx(t){this.T9.Zg(),this.T9=new Zc;Wr(Cu(this.Xri(t,this.T9.Yg),this.T9))}async Xri(t,i){if(fr(i),!this.fpi||!this.Hai)return this.oa.vpi(t);if(this.fpi.Fnt&&!this._pi)return;const e=this.oa.Gx();if(this.cpi){const s=this.Hai.hui(t,e);if(s){this.oa.vpi(s),await this.Hai.ww(Me.AD_BREAK_ENDED,i);if(this.Hai.rui(t).RO>t)return}}this.oa.vpi(t)}EP(){const t=this.fpi&&this.fpi.Fnt;if(t){const i=Uo.jn(this.oa.gpi()),e=t.qOt,s=e+t.G0t,n=new Uo([e,s]);return i.Mn(n)._s()}return this.oa.gpi()}async drt(t,i){if(!t)return this.oa.ppi(t,i);let e=t;try{this.oa.nt.wn(N.rI,this.mpi),e=await this.upi.wpi(t,i),this.fpi&&this.Hai&&(this.ypi=!0)}catch(t){if(sa(t),t.code===Mi.LICENSE_INVALID)return;const i=new as(me.SOURCE_NOT_SUPPORTED,"Something went wrong while setting up a Google DAI stream.",t);throw this.nq=ar(i),this.rq=i,this.oa.So(new el(i)),i}await this.oa.ppi(e,i)}hr(){if(this.ypi){if(this.oa.nt.mn(N.rI,this.mpi),this.Lui){this.Lui.mn(Te.uI,this.bpi);for(const t of this.Lui.L.NI)t.mn(Js.QL,this.Api);this.Lui=void 0}this.nq=void 0,this.rq=void 0,this.T9.Zg(),this.fpi&&this.fpi.hr(),this.Hai&&this.Hai.hr(),this.ypi=!1}}get lt(){return this.nq||this.oa.Spi()}get Jx(){return this.rq||this.oa.Tpi()}kn(){this.hr(),this.oa.kpi(),this.Hai&&this.Hai.kn()}constructor(t,i,e,s,n){this.oa=void 0,this.upi=void 0,this.Hai=void 0,this.fpi=void 0,this._pi=void 0,this.Lui=void 0,this.nq=void 0,this.rq=void 0,this.T9=new Zc,this.ypi=!1,this.cpi=!0,this.mpi=t=>{const i=t.Ht;i.Lt===us.zU&&(i.Km===nh.ID3||i.Km===nh.EVENT_STREAM&&i.eC===R9)&&(i.Qk=xh.iC,this.Lui=i,i.wn(Te.uI,this.bpi))},this.bpi=t=>{t.PO.wn(Js.QL,this.Api)},this.Api=t=>{var i,e;if(this.Hai)if((null==(i=this.Lui)?void 0:i.Km)===nh.ID3){const i=t.PO.U;"TXXX"===i.id&&this.Hai.sui({TXXX:i.text})}else if((null==(e=this.Lui)?void 0:e.Km)===nh.EVENT_STREAM){const i=t.PO.U;this.Hai.nui(R9,i,t.YF)}},this.oa=t,this.Hai=i,this.fpi=e,this.upi=s,this._pi=n,e&&i&&this.oa.Jc&&this.oa.Jc.znt(e.oti)}};r(),r();var N9=class extends tn{get Epi(){return this.xpi}get u$t(){return we.so}constructor(t,i,e,s=!0){super(e),this.xpi=void 0,this.xpi=s,this.k4t=t,this.E4t=i}},B9=class extends z3{Ppi(){const t=[Me.STARTED,Me.FIRST_QUARTILE,Me.MIDPOINT,Me.THIRD_QUARTILE,Me.COMPLETE];this.Hai.wn(t,this.Ipi),this.Hai.wn(Me.AD_BREAK_ENDED,this.iui),this.Hai.wn(Me.AD_PROGRESS,this.Xai),this.Hai.wn(Me.CUEPOINTS_CHANGED,this.Qai)}get w4t(){return this.uti}get u4t(){return this.R5t}Cpi(t){let i=t.v7t.qOt,e=this.w1t||this.findAdBreakWithPredicate(i,t=>!t.pP);if(!e){const s=t.v7t.G0t;i=this.oa.Gx(),e=new N9(s,s,i,!1),e.P4t(),this.y1t.push(e)}return e}Rpi(t){switch(t){case Me.STARTED:this.uti=!0;break;case Me.AD_BREAK_ENDED:this.uti=!1}}Dpi(t,i,e){if(i)switch(t){case Me.STARTED:case Me.FIRST_QUARTILE:case Me.MIDPOINT:case Me.THIRD_QUARTILE:case Me.COMPLETE:this.u4t.So(new Ta(this.w1t))}if(e)switch(t){case Me.STARTED:case Me.FIRST_QUARTILE:case Me.MIDPOINT:case Me.THIRD_QUARTILE:case Me.COMPLETE:this.u4t.So(new nc(this.u1t,this.u1t.W7t))}switch(t){case Me.COMPLETE:this.u4t.So(new fc(this.u1t,this.hti.W7t));break;case Me.AD_BREAK_ENDED:this.u4t.So(new Za(this.Fnt))}switch(t){case Me.FIRST_QUARTILE:this.u4t.So(new ie(this.u1t,this.hti.W7t));break;case Me.MIDPOINT:this.u4t.So(new xe(this.u1t,this.hti.W7t));break;case Me.THIRD_QUARTILE:this.u4t.So(new Qs(this.u1t,this.hti.W7t))}}Npi(t){const i=t.jnt,e=this.Cpi(i),s=function(t,i){if(t.Jc.length)return!1;for(let e=0;et.Epi);let i=0;return t&&(i=t.G0t),i}Lpi(t,i){let e;for(const s of this.y1t)s.qOt>=t&&s.qOt<=i&&!s.pP&&(!e||s.qOt>=e.qOt)&&(e=s);return e}uD(){}qnt(t){}hr(){this.u1t&&(this.u4t.So(new fc(this.u1t,this.u1t.W7t)),this.u1t=void 0),this.w1t&&(this.u4t.So(new Za(this.w1t)),this.w1t=void 0),this.uti=!1,Wt(this.y1t)}kn(){this.hr(),this.u4t.kn()}Hnt(t){}constructor(t,i){super(new tl,we.so),this.Hai=void 0,this.oa=void 0,this.Xai=void 0,this.Qai=void 0,this.Ipi=void 0,this.iui=void 0,this.Hai=t,this.oa=i,this.Xai=t=>{const i=this.w1t;if(!i||!this.u1t)return;const e=t.Vai.aui;this.u1t.W7t=e.zx,function(t,i){const e=i.I9t,s=i.P9t,n=i.zx,r=$l(t.Jc.slice(0,e-1),t=>{var i;return null!=(i=t.ct)?i:0});t.X0t=s-n-r}(i,e)},this.Qai=t=>{const i=t.Vai.uui;if(i)for(const t of i)if(!this.Bpi(t.CO)){const i=t.RO-t.CO,e=new N9(i,i,t.CO,!0);this.y1t.push(e)}},this.Ipi=t=>{this.Rpi(t.type),this.Npi(t)},this.iui=t=>{this.uti=!1,this.u1t=void 0;const i=this.Fnt;i&&(i.X0t=0,this.Dpi(t.type,!1,!1),this.w1t=void 0)},this.Ppi()}};function M9(t){if(t.sources)if(hi(t.sources)){for(const i of t.sources)if(pk(i))return!0}else if(Mc(t.sources))return pk(t.sources);return!1}r();var L9=class{async wpi(t,i){const e=[],s=[];for(const i of t.sources)if(pk(i)){if(!this.Hai)continue;e.push(i)}else s.push(i);if(0===e.length)return t;let n,r;for(;void 0===n&&0!==e.length;){const{Mc:h}=await _C.Bg.gz(e,t),o=h;fr(i);try{n=await this.Opi(o,i),s.push(n)}catch(t){sa(t),r=t,_e(e,o)}}if(0!==t.sources.length&&0===s.length)throw new m("Fatal: unable to play DAI streams.");return r&&uh(r.message),Y({},t,{sources:s})}async Opi(t,i){if(!this.Hai)throw new m("Could not find Google\u2019s IMA DAI HTML5 SDK, all DAI sources will be ignored.");const e=this.Hai.ww(Me.LOADED,i),s=this.Hai.ww(Me.ERROR,i),n=t.type===Hi.vC?"dash":"hls";this.Hai.KHt(Y({},t.ssai,{format:n}));const r=await Promise.race([e,s]);if(r.type===Me.LOADED){const i=t.type===Hi.vC?Hi.vC:Hi.gC;return ue(Y({},t,{src:this.lpi?await this.lpi(r.Vai.Yu||""):r.Vai.Yu,type:i}))}throw m(r.Vai.cui)}constructor(t){this.Hai=void 0,this.lpi=void 0,this.Hai=t,this.lpi=t=>t}};Na(function(t){return i=>class extends i{xa(){const t=super.xa(),i=t.ads;if(i){const t=this.Fpi.Ca;Gi(i,{get dai(){return t}})}return t}get Kl(){return this.Upi}vpi(t){super.Xx(t)}Xx(t,i){this.Fpi.Xx(t)}gpi(){return super.EP()}EP(){return this.Fpi.EP()}Ta(t){return this.Fpi.hr(),super.Ta(t)}async ppi(t,i){return super.drt(t,i)}async drt(t,i){return this.Fpi.drt(t,i)}Spi(){return super.Yx()}Tpi(){return super.Zx()}Yx(){return this.Fpi.lt}Zx(){return this.Fpi.Jx}kpi(){super.kn()}kn(){this.Fpi.kn(),this.T2t&&(Ao(this.T2t),this.T2t.removeEventListener("keydown",this.Vpi),this.T2t.removeEventListener("click",this.Vpi),this.T2t=void 0),this.Hpi&&(Ao(this.Hpi),this.Hpi=void 0)}constructor(i,e){super(i,e),this.Fpi=void 0,this.Upi=!1,this.T2t=void 0,this.Hpi=void 0,this.Vpi=t=>{13===t.which&&this.T2t.click(),this.jP()};const s=this.zP(),n=e.ads.googleIma.useAdUiElementForSsai;var r;const o=null!=(r=e.ads.googleIma.allowSeekingForGoogleDai)&&r;let a,u;try{var c;n?(this.Hpi=h.createElement("div"),Go(this.Hpi),this.Hpi.className="theo-dai-ad-ui"):(this.T2t=h.createElement("button"),this.T2t.className=C9),a=t(s,this.T2t,this.Hpi),u=new B9(a,this);const i=null!=(c=this.T2t)?c:this.Hpi;i&&this.xe.appendChild(i),this.Upi=!0}catch(t){this.T2t=void 0,this.Hpi=void 0}const d=new L9(a);this.Fpi=new D9(this,a,u,d,o),this.T2t&&(this.T2t.addEventListener("keydown",this.Vpi),this.T2t.addEventListener("click",this.Vpi))}}}(function(t,i,e){if(!(s.google&&s.google.ima&&Mc(s.google.ima.dai)))throw new m("Could not find Google\u2019s IMA DAI HTML5 SDK, all DAI sources will be ignored.");const n=q6(),r=new google.ima.dai.api.StreamManager(t,e),h=q6();return new F6(r,i,h&&h!==n?h:void 0)}),Oa.Ant),r(),r(),r();var O9=class{get Wpi(){return void 0===this.qpi?0:(performance.now()-this.qpi)/1e3}zpi(t){this.Gpi=t,this.jpi.Xpi(t),this.oa.wn(d.uo,this.dci),this.oa.wn(d.Nw,this.kgi),this.oa.wn(d.py,this.Cci),this.oa.wn(hc.ma,this.u8),this.oa.wn(Jr.xM,this.Qpi),this.oa.wn([Jr.SM,Jr.TM,Jr.PM],this.Kpi),this.oa.wn(d.Cw,this.Ypi),s.addEventListener("beforeunload",this.EBt)}Jpi(){this.oa.mn(d.uo,this.dci),this.oa.mn(d.Nw,this.kgi),this.oa.mn(d.py,this.Cci),this.oa.mn(hc.ma,this.u8),this.oa.mn(Jr.xM,this.Qpi),this.oa.mn([Jr.SM,Jr.TM,Jr.PM],this.Kpi),this.oa.mn(d.Cw,this.Ypi),s.removeEventListener("beforeunload",this.EBt),this.Zpi||(this.jpi.$pi(this.tmi),this.jpi.imi()),this.emi&&this.smi(),this.Gpi=void 0,this.nmi=!1,this.Zpi=!1,this.tmi=-1/0,Wt(this.rmi)}hmi(){this.nmi&&this.jpi.omi(),this.qpi=performance.now(),this.ami=v(this.umi,6e4)}smi(){this.jpi.cmi(this.Wpi),this.emi=!1,this.qpi=void 0,this.ami&&(p(this.ami),this.ami=void 0)}dmi(){if(S(this.oa.Nd()))return;const t=10*function(t,i){return _.floor(t/i)}(this.oa.Gx()/this.oa.Nd()*100,10);Ct(this.rmi,t)||(this.rmi.push(t),this.jpi.lmi(t))}constructor(t,i){this.oa=void 0,this.jpi=void 0,this.Gpi=void 0,this.nmi=void 0,this.Zpi=void 0,this.rmi=void 0,this.tmi=void 0,this.fmi=void 0,this.emi=void 0,this.ami=void 0,this.qpi=void 0,this.dci=void 0,this.kgi=void 0,this.Cci=void 0,this.Qpi=void 0,this.Kpi=void 0,this.u8=void 0,this.Ypi=void 0,this.EBt=void 0,this.umi=void 0,this.oa=t,this.jpi=i,this.nmi=!1,this.Zpi=!1,this.rmi=[],this.tmi=-1/0,this.emi=!1,this.dci=()=>{this.nmi||(this.jpi.vmi(),this.emi&&this.jpi.omi(),this.nmi=!0)},this.kgi=()=>{this.jpi._mi(),this.Zpi=!0},this.Cci=()=>{this.tmi{this.nmi&&(this.fmi=performance.now(),this.jpi.gmi(this.oa.Gx()))},this.Kpi=()=>{this.fmi&&(this.jpi.pmi((performance.now()-this.fmi)/1e3),this.fmi=void 0)},this.u8=()=>{this.tmi{const t=this.oa.Nd()===1/0;t&&!this.emi&&(this.emi=t,this.hmi())},this.EBt=()=>{this.jpi.$pi(this.tmi),this.jpi.mmi()},this.umi=()=>{void 0!==this.qpi&&this.jpi.wmi(this.Wpi)}}};r();var F9=class{Xpi(t){this.ymi(["setDocumentTitle",t.itemTitle]),this.ymi(["setCustomUrl","https://content.streamone.net/embed/cust=Xo9oT45EptMG/account="+t.accountID+"/item="+t.itemID]),this.ymi(["trackPageView"])}vmi(){this.bmi("item first play","viewing","1")}imi(){this.bmi("item skipped","skipped","1")}lmi(t){this.bmi("item progress","percent",""+t)}mmi(){this.bmi("item abandoned","window closed","1")}$pi(t){this.bmi("item time","watched",""+t)}_mi(){this.bmi("item finished","ended","1")}gmi(t){this.bmi("buffering started","timestamp",""+t)}pmi(t){this.bmi("buffering ended","duration",""+t)}xrt(t){this.bmi("error","message",""+t)}omi(){this.bmi("livestream first play","viewing","1")}wmi(t){this.bmi("livestream progress","duration",""+t)}cmi(t){this.bmi("livestream time","watched",""+t)}bmi(t,i,e){this.ymi(["trackEvent","Video",t,i,e])}ymi(t){const i="undefined"!=typeof _paq?_paq:void 0;i?i.push(t):console.warn("The Piwik library required for the StreamOne pre-integration was not found. Make sure it is loaded before instantiating THEOplayer.")}};r();var U9=class{get Ami(){if(!this.Smi)return;const t=this.oa.Gx()/this.Smi;return _.floor(4*t)+1}get Tmi(){return void 0!==this.Smi}zpi(){this.qc.wn("Jnt",this.Agi),this.qc.wn("Znt",this.Sgi),this.qc.wn("Z4t",this.Tgi),this.qc.wn("_4t",this.Bci),this.oa.wn(d.py,this.Cci),s.addEventListener("beforeunload",this.EBt)}Jpi(){this.qc.mn("Jnt",this.Agi),this.qc.mn("Znt",this.Sgi),this.qc.mn("Z4t",this.Tgi),this.qc.mn("_4t",this.Bci),this.oa.mn(d.py,this.Cci),Wt(this.kmi),s.removeEventListener("beforeunload",this.EBt),this.Smi=void 0}constructor(t,i,e){this.oa=void 0,this.qc=void 0,this.jpi=void 0,this.Smi=void 0,this.kmi=void 0,this.Agi=void 0,this.Sgi=void 0,this.Tgi=void 0,this.Bci=void 0,this.Cci=void 0,this.EBt=void 0,this.oa=t,this.qc=i,this.jpi=e,this.kmi=[],this.Agi=()=>{this.Smi=this.oa.Nd(),this.jpi.Emi(this.Smi)},this.Sgi=()=>{this.Smi&&(this.jpi.xmi(this.Smi),Wt(this.kmi),this.Smi=void 0)},this.Tgi=t=>{if(!this.Smi)return;const i=this.Smi-this.Smi*t.Y4t;this.jpi.Pmi(i),this.Smi=void 0},this.Bci=()=>{this.Smi=this.oa.Nd(),this.jpi.Imi()},this.Cci=()=>{const t=this.Ami;if(this.Tmi&&t&&!Ct(this.kmi,t)){switch(t){case 1:this.jpi.Cmi();break;case 2:this.jpi.Rmi();break;case 3:this.jpi.Dmi();break;case 4:this.jpi.Nmi()}this.kmi.push(t)}},this.EBt=()=>{this.jpi.Bmi()}}};r();var V9=class{Emi(t){this.jpi.bmi("ad start","duration",""+t)}xmi(t){this.jpi.bmi("ad finished","duration",""+t)}Pmi(t){this.jpi.bmi("ad skipped","remaining time",""+t)}Imi(){this.jpi.bmi("ad blocker","detected","1")}Cmi(){this.jpi.bmi("ad progress","firstQuartile","")}Rmi(){this.jpi.bmi("ad progress","secondQuartile","")}Dmi(){this.jpi.bmi("ad progress","thirdQuartile","")}Nmi(){this.jpi.bmi("ad progress","fourthQuartile","")}Bmi(){this.jpi.bmi("ad abandoned","window closed","1")}constructor(t){this.jpi=void 0,this.jpi=t}};function H9(t){return t&&"streamone"===t.integration}Na(function(t){return class extends t{kn(){this.mn(d.do,this.fo),this.Mmi&&(this.Lmi&&this.Lmi.Jpi(),this.Omi&&this.Omi.Jpi(),this.Mmi=!1),super.kn()}constructor(t,i){super(t,i),this.Lmi=void 0,this.Omi=void 0,this.Mmi=!1,this.fo=()=>{this.Mmi&&(this.Lmi.Jpi(),this.Omi&&this.Omi.Jpi());const t=this.nu();if(this.Mmi=!1,!t)return;const i=function(t){if(t.analytics)for(const i of t.analytics)if(H9(i))return i}(t);i&&(this.Mmi=!0,this.Lmi.zpi(i),this.Omi&&this.Omi.zpi())};const e=new F9;if(this.Lmi=new O9(this,e),this.Jc){const t=new V9(e);this.Omi=new U9(this,this.Jc,t)}this.wn(d.do,this.fo)}}},Oa.Snt),r(),r(),r(),r(),r(),r();var W9=class extends Da{async J2(t,i,e){const s=await q9(t);await super.J2(s,i,e),this.Fmi(s,i)}async Q2(t,i,e){const s=await q9(t);await super.Q2(s,i,e),this.Fmi(s,i)}Fmi(t,i){const e=this.Vmi.Umi;if(void 0===e)return;const s=i.u2;let n;if(this.Hmi!==s&&(this.Hmi=s,e.setLevelSwitching(s),e.setContainerFormat(2)),function(t){return _u.call(t,"Get")}(i)){const t=i.Get,r=i.Get+i.ct;n=i.EU,e.newPts(t,r,"video",s)}else 0;e.appendBuffer(t.lk,"video",s,n)}async pS(t,i,e){var s;await super.pS(t,i,e),null==(s=this.Vmi.Umi)||s.flushBuffer(t,i)}constructor(t,i){super(t),this.Vmi=void 0,this.Hmi=void 0,this.Vmi=i,this.Hmi=void 0}};async function q9(t){switch(t.Km){case We.wZ:return t;case We.MT:{const i=await tA(t.lk);return{Km:We.wZ,lk:new j(i)}}case We.yZ:throw new m("Opaque initialization segments are not supported on web.")}}var z9=class extends ja{Lrt(t){return t.V3===at.Mk?new W9(t,this.Vmi):new Da(t)}constructor(t,i){super(t),this.Vmi=void 0,this.Vmi=i,this.Brt(t)}},G9=class extends(ft(pn)){get Umi(){return this.Wmi}qmi(){this.Wmi=new LCEVCdec.LCEVCdec(this.hq,this.zmi,{})}be(){super.be(),this.Gmi()}we(){super.we(),this.zmi.style.display="none"}hr(){return this.zmi.style.display="none",void 0!==this.Wmi&&(this.Wmi.close(),this.qmi()),super.hr()}zg(){return this.Xmi=!0,void 0!==this.Wmi&&(this.Wmi.close(),this.Wmi=void 0),Ao(this.zmi),super.zg()}Qq(t){this.So(new uM(new mu(Mi.ABORTED,t)))}Gmi(){this.PL.hq.style.display="none",this.zmi.style.display="block"}cht(t){return new z9(t,this)}uht(t){return new Ia(t)}constructor(t){super(t),this.zmi=void 0,this.Wmi=void 0,this.Xmi=!1,this.jmi=t=>{this.Xmi||(t||this.Qq("LCEVC SDK failed to initialize."),this.qmi())},this.Qmi=()=>{this.Xmi||this.Qq("LCEVC SDK failed to initialize.")},this.zmi=h.createElement("canvas"),Go(this.zmi),this.zmi.style.display="none";const i=t.hq;var e;i.parentElement.insertBefore(this.zmi,null!=(e=i.nextSibling)?e:null),LCEVCdec.ready.then(this.jmi,this.Qmi)}},X9=class extends Ea{Yq(t){return t===at.Mk?(this.Kmi=new G9(super.Yq(t)),this.Kmi):super.Yq(t)}async Dq(t){if(t instanceof G9){this.Kmi=void 0;const i=t;await i.zg(),await super.Dq(i.Zrt)}else await super.Dq(t)}get Ymi(){return this.Kmi}constructor(...t){super(...t),this.Kmi=void 0}},j9=class extends vX{async kn(){for(const t of this.sO.NI)t.mn(Te.II,this.Jmi);this.rt.mn(N.rI,this.Zmi),this.rt.mn(N.oI,this.$mi),await super.kn(),await this.PL.zg(),await this.Nq.Dq(this.PL)}constructor(t,i,e,s,n,r,h){const o=new X9(n),a=new qs(o);super(t,i,e,s,a.Yq(r),h),this.Nq=void 0,this.iwi=void 0,this.Zmi=t=>{t.Ht.wn(Te.II,this.Jmi)},this.$mi=t=>{t.Ht.mn(Te.II,this.Jmi)},this.Jmi=t=>{var i;const e=null==(i=this.iwi.Ymi)?void 0:i.Umi,s=t.qot.JI;null==e||e.setCurrentLevel(s)},this.Nq=a,this.iwi=o,this.sO.wn(N.rI,this.Zmi),this.sO.wn(N.oI,this.$mi)}};oe(new class extends CU{DC(t,i,e,s,n,r,h){let o=i;return UX.US()&&(o=new UX(o)),new j9(e,s,n,r,o,at.Mk,t)}async Jq(t){if(!t.lcevc)return!1;if(!await super.Jq(t))return!1;if(void 0===s.LCEVCdec)throw new as(me.CONFIGURATION_ERROR,"LCEVC SDK is not loaded.");return!0}$q(){return!1}constructor(...t){super(...t),this.tz=$.wW}}),r();var Q9=class extends u0{async kn(){const t=this.rt;for(const i of t.NI)i.mn(Te.II,this.Jmi);t.mn(N.rI,this.Zmi),t.mn(N.oI,this.$mi),await super.kn(),await this.Nq.Dq(this.PL)}constructor(t,i,e,s,n){const r=new X9(t),h=new qs(r);super(h.Yq(at.Mk),i,e,s,n),this.Nq=void 0,this.iwi=void 0,this.Zmi=t=>{t.Ht.wn(Te.II,this.Jmi)},this.$mi=t=>{t.Ht.mn(Te.II,this.Jmi)},this.Jmi=t=>{var i;const e=null==(i=this.iwi.Ymi)?void 0:i.Umi,s=t.qot.fLt.JI;null==e||e.setCurrentLevel(s)},this.Nq=h,this.iwi=r;const o=this.rt;o.wn(N.rI,this.Zmi),o.wn(N.oI,this.$mi)}};oe(new class extends d0{DC(t,i,e,s,n,r,h){return new Q9(i,e,n,r,s)}Jq(t,i){if(!t.lcevc)return!1;if(!super.Jq(t,i))return!1;if(void 0===s.LCEVCdec)throw new as(me.CONFIGURATION_ERROR,"LCEVC SDK is not loaded.");return!0}$q(){return!1}constructor(...t){super(...t),this.tz=$.TW}}),r(),r(),r(),r();var K9=function(t){return t.ewi="hr",t.swi="nwi",t}({}),Y9="freewheel-nonlinear-ad",J9=[d.Cw,d.py,d.wy,d.jw,Jr.PM,d.uo],Z9=class t extends A3{GP(){this.Nq.Nz()}rwi(){this.hwi.wn("Ynt",this.owi),this.hwi.wn(["Jnt","Znt"],this.awi),this.hwi.wn("Knt",this.Zni)}uwi(){this.hwi.mn("Ynt",this.owi),this.hwi.mn(["Jnt","Znt"],this.awi),this.hwi.mn("Knt",this.Zni)}cwi(){this.u4t.au(this.hwi.dwi)}lwi(){this.hwi.fwi.wn(J9,this.Rs)}vwi(){this.hwi.fwi.mn(J9,this.Rs)}get o4t(){return this}static get r4t(){return we._1t}get r4t(){return t.r4t}get Fnt(){var t;return null!=(t=this.hwi.dwi.Fnt)?t:null}get Lnt(){const t=this.hwi.dwi.hti;return t?[t]:[]}qnt(t){}Gx(){return this.hwi.fwi.zx}Xx(t,i){}Nd(){return this.hwi.fwi.ct}Kx(){return this.hwi.fwi.Qx}Yx(){return this.nq}Zx(){return this.rq}NP(){return 0}LP(){return 0}FP(){return this.hwi.fwi.OP}UP(t){this.hwi.fwi.OP=t}aP(){return this.hwi.fwi.oP}uP(t){this.hwi.fwi.oP=t}TP(){return this.hwi.fwi.AP}get Unt(){return this.hwi.dwi.Unt}get Vnt(){return this.hwi.dwi.Vnt}EP(){return this.hwi.fwi.kP}fP(){return this.hwi.fwi.lP}l4t(t){if(this.w4t||this.hwi.l4t(t),this.hwi._wi){if(t.type===d.jw&&this.oa.Qx)return!0;if(t.type===d.Nw)return this.hwi.pwi.gwi(),!0}return!1}we(){this.hwi.we()}jP(){this.lP||this.hwi.fwi.jP()}async mwi(){if(!this.hwi.wwi)try{await this.hwi.r8t()}catch(t){this.ywi(t,$c.GENERAL)}}async bwi(){if(this.hwi.fwi.aoi)return this.hwi.fwi.QP(),!1;if(this.hwi.Awi)try{await this.hwi.pwi.Swi()}catch(t){this.ywi(t,$c.PLAYBACK)}return!0}get kwi(){return it(this.Yx())}ywi(t,i){t.name!==K9.ewi&&this.u4t.So(new $h(i,"Ads could not be loaded."))}async QP(){if(this.lP&&this.So(new vt(this.zx)),await this.mwi(),this.kwi)return;const t=await this.bwi();!this.kwi&&t&&this.Zni()}Cti(t,i,e){i===Hu.Mnt&&this.hwi.Cti(t)}be(){this.hwi.be()}uD(){this.hwi.fwi.uD()}Hnt(t){}zP(){return this.vet}Ox(){return this.Nq.Fz.map(t=>t.hq)}S4t(t){}async kn(){await this.KP(),this.hwi.kn(),await this.Nq.Dq(this.PL),this.uwi(),this.vwi(),this.u4t.LK(this.hwi.dwi)}async KP(){this.hwi.hr(),this.w4t&&(this.oa.be(),this.I3t(),this.we())}constructor(t,i,e,s,n){super(t,i),this.hwi=void 0,this.nq=void 0,this.rq=void 0,this.vet=void 0,this.Nq=void 0,this.PL=void 0,this.awi=t=>{const i=t.jnt,e="Jnt"===t.type;if(i.V4t===Hs.L4t){const t=this.oa.xe.classList;e?t.add(Y9):t.remove(Y9)}e?this.be():this.we()},this.owi=()=>{this.D5t(),this.oa.jP(),this.oa.we()},this.Zni=()=>{this.hwi.wwi&&(this.oa.Qx||this.oa.QP(),this.we(),this.oa.be(),this.I3t())},this.hwi=s,this.Nq=e,this.PL=n,this.vet=n.hq,this.vet.controls=!1,this.rwi(),this.cwi(),this.lwi()}};r(),r(),r();var $9=class extends tn{get Ewi(){return this.xwi}get Pwi(){return this.Jc[this.Iwi]}set Cwi(t){this.Iwi=t}get Cwi(){return this.Iwi}get V4t(){return this.H4t}get u$t(){return we._1t}constructor(t,i,e,s){super(e),this.xwi=void 0,this.Iwi=void 0,this.H4t=void 0,this.xwi=s,this.Iwi=0,this.H4t=i7(s),this.k4t=t,this.E4t=i}};r();var t7=class extends gn{get Rwi(){return this.Dwi}set Rwi(t){this.Dwi!==t&&(this.Dwi=t)}get Mi(){return this.od.Ewi.getHeight()}get Ti(){return this.od.Ewi.getWidth()}get KYt(){return this.Rwi.getEventCallbackUrls(tv.freewheel.SDK.EVENT_AD_CLICK,tv.freewheel.SDK.EVENT_TYPE_CLICK)[0]}get u$t(){return we._1t}xa(){return La(this)}constructor(t,i,e){super(t,i),this.Dwi=void 0,this.Dwi=e}};function i7(t){return t.getTimePositionClass()===tv.freewheel.SDK.TIME_POSITION_CLASS_OVERLAY?Hs.L4t:Hs.BZt}var e7=class t extends je{async Nwi(t,i){this.Bwi=t,this.Mwi=i,this.Lwi(t),await i,this.Owi()}get Fwi(){return this.Uwi}get Vwi(){return this.Hwi}get Wwi(){return this.qwi}get Fnt(){return this.w1t}get hti(){return this.u1t}get Unt(){const t=[];if(this.w1t){const i=this.w1t.Cwi;i>=0&&t.push(...this.w1t.Jc.slice(i+1))}for(const i of this.zwi)t.push(...i.Jc);return t}get Vnt(){return this.zwi}Owi(){this.Gwi()}Lwi(t){t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.Xwi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.jwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.Qwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION_END,this.Kwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD,this.Ywi)}Jwi(){this.Bwi&&(this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.Xwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.jwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.Qwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION_END,this.Kwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_AD,this.Ywi))}Gwi(){this.Uwi=this.Zwi(this.$wi),this.Hwi=this.Zwi(this.tyi).concat(this.Zwi(this.iyi)),this.qwi=this.Zwi(this.eyi),this.zwi=this.Uwi.concat(this.Hwi).concat(this.qwi)}Zwi(t){if(!this.Bwi)return[];const i=this.Bwi.getSlotsByTimePositionClass(t);return this.syi(i)}nyi(t){if(!this.w1t)return void 0;const i=t.getSlot().getAdInstances().indexOf(t);-1!==i&&(this.w1t.Cwi=i);const e=this.w1t.Pwi;return e&&(e.Rwi=t),e}ryi(t){return hh(this.zwi,i=>i.Ewi===t)}syi(i){return i.map(i=>{const e=i.getTotalDuration(),s=t.hyi(i);return new $9(e,e,s,i)})}static oyi(t,i){const e=t.getAdInstances(),s=[];for(const t of e){const e=i7(t.getSlot()),n=new t7(i,e,t),r=[];n.O4t(t.getAdId(),t.getSlot().getWidth(),t.getSlot().getHeight(),t.getDuration(),r,0),i.C4t(n),s.push(n)}return s}P2t(){const t=this.hti;t&&this.So(new gu(t,this.ayi()))}uyi(){const t=this.hti;t&&(this.So(new fc(t,t.Rwi.getPlayheadTime())),this.u1t=void 0)}cyi(t){const i=this.Fnt;i&&(i.X0t=function(t,i,e){void 0===e&&(e=0);let s=0;const n=t.Jc.length;for(let r=i;r{const e=i.slot,s=this.ryi(e);s&&(t.oyi(e,s),this.w1t=s,s.P4t(),this.dyi(s),s.V4t===Hs.BZt&&this.So(new Ta(s)))},this.jwi=()=>{const t=this.Fnt;t&&t.V4t===Hs.BZt&&(this.So(new Za(t)),this.pT.src=""),this.w1t=void 0},this.Qwi=t=>{const i=this.nyi(t.adInstance);i&&(this.So(new nc(i,i.Rwi.getPlayheadTime())),this.u1t=i),t.adInstance.getEventCallbackUrls(tv.freewheel.SDK.EVENT_AD_CLICK,tv.freewheel.SDK.EVENT_TYPE_CLICK).length>0&&(this.Ls.style.cursor="pointer",this.Ls.addEventListener("click",this.lyi))},this.Kwi=()=>{this.Ls.style.cursor="",this.Ls.removeEventListener("click",this.lyi)},this.lyi=()=>{this.hti&&this.hti.Rwi.getRendererController().processEvent({name:tv.freewheel.SDK.EVENT_AD_CLICK})},this.Ywi=t=>{switch(t.subType){case tv.freewheel.SDK.EVENT_AD_COMPLETE:this.uyi();break;case tv.freewheel.SDK.EVENT_AD_SKIPPED:this.P2t(),this.uyi()}}}};r();var s7=class t extends je{fyi(){if(this.Spt){this.Spt.setAdVolume(n7(this.oP,this.OP))}}vyi(t){this.Spt=t,this.Lwi(t)}Lwi(t){t.addEventListener(tv.freewheel.SDK.EVENT_AD,this._yi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.gyi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.pyi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_COMPLETE,this.myi),t.addEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_PAUSE_REQUEST,this.wyi),t.addEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_RESUME_REQUEST,this.yyi)}byi(){const t=this.Spt;t&&(t.removeEventListener(tv.freewheel.SDK.EVENT_AD,this._yi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.gyi),t.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.pyi),t.removeEventListener(tv.freewheel.SDK.EVENT_AD_COMPLETE,this.myi),t.removeEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_PAUSE_REQUEST,this.wyi),t.removeEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_RESUME_REQUEST,this.yyi))}QP(){this.Pyt.Fnt&&(this.Pyt.Fnt.Ewi.resume(),this.lP=!1)}jP(){this.Pyt.Fnt&&(this.Pyt.Fnt.Ewi.pause(),this.lP=!0)}get zx(){const t=this.Pyt.hti;return t&&(this.zx=t.Rwi.getPlayheadTime()),this.xz}set zx(t){this.xz=t}get ct(){return this.Zb}get aoi(){return!!this.Pyt&&void 0!==this.Pyt.Fnt}get lP(){return this.Cz}set lP(t){this.Cz=t}get OP(){return this.cA}set OP(t){this.Spt&&this.Spt.setAdVolume(t),this.cA=t}get oP(){return this.Spt&&(this.Ayi=0===this.Spt.getAdVolume()),this.Ayi}set oP(t){this.Spt&&this.Spt.setAdVolume(n7(t,this.OP)),this.Ayi=t}get kP(){return this.H4}get Qx(){return this.h5}set Qx(t){this.h5=t}get AP(){return this.o5}static Syi(t){switch(t){case"pause":return tv.freewheel.SDK.VIDEO_STATE_PAUSED;case"playing":return tv.freewheel.SDK.VIDEO_STATE_PLAYING;case"ended":return tv.freewheel.SDK.VIDEO_STATE_COMPLETED;case"stop":return tv.freewheel.SDK.VIDEO_STATE_STOPPED}}Tyi(i){const e=t.Syi(i);this.Spt&&e&&this.Spt.setVideoState(e)}uD(){const t=this.Pyt.hti;t&&t.Rwi.skip()}hr(){if(this.byi(),this.Spt){this.Tyi("stop"),this.Spt.setVideoState(tv.freewheel.SDK.VIDEO_STATE_STOPPED);const t=this.Spt.getTemporalSlots();for(const i of t)i.stop();this.Spt.dispose(),this.Spt=void 0}this.Zb=NaN,this.Qx=!1,this.o5=Lr.zL,this.zx=0,this.kyi=0,this.lP=!0,void 0!==this.Eyi&&(p(this.Eyi),this.Eyi=void 0)}kn(){this.hr(),this.Vo(),this.Pyt.mn("Ynt",this.Ed),this.sc.mn(Qh.yn,this.gyi),this.A2t.removeEventListener("click",this.xyi)}constructor(t,i,e,s){super(),this.oa=void 0,this.sc=void 0,this.Pyt=void 0,this.A2t=void 0,this.H4=void 0,this.Spt=void 0,this.Cz=void 0,this.cA=void 0,this.Zb=void 0,this.Ayi=void 0,this.h5=void 0,this.o5=void 0,this.xz=void 0,this.Eyi=void 0,this.kyi=void 0,this._yi=void 0,this.pyi=void 0,this.xyi=void 0,this.vm=void 0,this.myi=void 0,this.wyi=void 0,this.yyi=void 0,this.Ed=void 0,this.gyi=void 0,this.oa=t,this.sc=i,this.Pyt=e,this.A2t=s,this.H4=Uo.rL()._s(),this.Cz=!0,this.Zb=NaN,this.Ayi=!1,this.h5=!1,this.o5=Lr.zL,this.xz=0,this.kyi=0,this._yi=t=>{switch(t.subType){case tv.freewheel.SDK.EVENT_AD_PAUSE:(function(t){if(!t)return!0;const i=t.Rwi,e=i.getPlayheadTime(),s=i.getDuration();return e>=s||Ql(s,e)})(this.Pyt.hti)||(this.lP=!0,this.So(new Si(this.zx)));break;case tv.freewheel.SDK.EVENT_AD_RESUME:this.lP=!1,this.So(new mo(this.zx));break;case tv.freewheel.SDK.EVENT_AD_VOLUME_CHANGE:if(this.Spt){const t=this.Spt.getAdVolume();0===t?this.Ayi=!0:this.cA=t,this.So(new Wi(this.zx,this.OP))}}},this.pyi=()=>{this.Qx=!1;const t=this.lP;if(this.lP=!1,t&&(this.So(new vt(this.zx)),this.So(new mo(this.zx))),this.o5=Lr.XL,this.zx=0,!this.Pyt.hti)return;const i=this.Pyt.hti.Rwi;this.Zb=i.getDuration(),this.So(new zr(this.Zb)),this.Eyi=v(()=>{if(!this.aoi)return void this.vm();this.Pyt.cyi(this.zx);const t=i.getPlayheadTime();rs(t,this.kyi,.001)||this.So(new B(t,void 0)),this.kyi=t},250),this.Spt&&this.Spt.setAdVolume(n7(this.oP,this.OP))},this.xyi=()=>{const t=this.Pyt.hti;t&&(t.V4t===Hs.L4t?this.oa.jP():this.lP||this.jP())},this.vm=()=>{p(this.Eyi),this.Eyi=void 0},this.myi=()=>{this.vm(),this.Qx=!0},this.wyi=()=>{this.Tyi("pause")},this.yyi=()=>{this.Tyi("playing")},this.Ed=t=>{t.od.V4t===Hs.BZt&&(this.lP=!1)},this.gyi=()=>{this.Spt&&this.Spt.resize(this.sc.Eu,this.sc.Iu)},this.cA=t.OP,e.wn("Ynt",this.Ed),this.sc.wn(Qh.yn,this.gyi),this.A2t.addEventListener("click",this.xyi)}};function n7(t,i){return t?0:i}r(),r();var r7=class extends Qr{get name(){return K9.swi}constructor(){super("A FreeWheel Ad Error occurred")}};r();var h7=class extends Qr{get name(){return K9.ewi}constructor(){super("A FreeWheel Reset Error Occurred")}},o7=0;function a7(){return"cue-"+ ++o7}var u7=class{Pyi(t,i,e){t.setNetwork(i.networkId),t.setServer(i.adServerUrl);const s=this.Spt;if(s.setProfile(i.profile),i.assetId&&i.assetDuration&&s.setVideoAsset(i.assetId,i.assetDuration),i.siteSectionId&&s.setSiteSection(i.siteSectionId),s.registerVideoDisplayBase(e),i.cuePoints&&i.cuePoints.length)for(const t of i.cuePoints)s.addTemporalSlot(a7(),t.adUnit,t.timeOffset);const n=i.customData;if(Mc(n)){const t=w.keys(n);for(const i of t){const t=n[i];s.addKeyValue(i,t)}}}async Iyi(){this.Spt.submitRequest(),await this.Cyi.Yy}hr(){this.Spt.removeEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Ryi),this.Cyi.Ky(new h7)}constructor(t,i,e,s){this.Spt=void 0,this.Cyi=void 0,this.Ryi=void 0,this.Spt=i,this.Ryi=t=>{this.Spt.removeEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Ryi),t.success?this.Cyi.Qy(void 0):this.Cyi.Ky(new r7)},this.Pyi(t,e,s),i.addEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Ryi),this.Cyi=new Ga}};r(),r();var c7=class{Dyi(){this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.jwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_ERROR,this.jwi)}get Nyi(){return this.Jg.Yy}gWt(){this.Dyi(),this.Jg.Ky(new h7)}constructor(t){this.Bwi=void 0,this.Jg=void 0,this.jwi=void 0,this.i7t=void 0,this.Bwi=t,this.jwi=t=>{this.Dyi(),this.Jg.Qy(void 0)},this.i7t=t=>{this.Dyi(),this.Jg.Ky(new r7)},this.Jg=new Ga,t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.jwi),t.addEventListener(tv.freewheel.SDK.EVENT_ERROR,this.i7t)}},d7=class{lO(t){this.Bwi=t}Swi(){return this.Byi(this.Myi.Fwi)}gwi(){this.Byi(this.Myi.Wwi)}async Byi(t){if(this.Bwi)for(;t.length>0;){this.Lyi=new c7(this.Bwi);const i=this.Lyi.Nyi,e=this.Myi.Fnt;e&&e.V4t===Hs.L4t&&e.Ewi.stop();t.shift().Ewi.play();try{await i}finally{this.Lyi=void 0}}}hr(){this.Lyi&&(this.Lyi.gWt(),this.Lyi=void 0),this.tMt=0}kn(){this.oa.mn(d.py,this.Oyi)}constructor(t,i){this.oa=void 0,this.Myi=void 0,this.tMt=void 0,this.Lyi=void 0,this.Bwi=void 0,this.Oyi=void 0,this.oa=t,this.Myi=i,this.tMt=0,this.Oyi=()=>{const t=this.oa.Gx();for(const i of this.Myi.Vwi){const e=new Uo([this.tMt,t],[!0,!0]),s=i.Ewi.getTimePosition();if(e.Cr(s))switch(i.Ewi.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL:this.Byi([i]);break;case tv.freewheel.SDK.TIME_POSITION_CLASS_OVERLAY:i.Ewi.play(),i.Ewi.setVisible(!0)}}this.tMt=t},t.wn(d.py,this.Oyi)}},l7=0,f7=class t extends tl{static createUniqueDisplayBaseId(){return"theo-freewheel-"+ ++l7}get _wi(){return 0!==this.dwi.Wwi.length}get Awi(){return 0!==this.dwi.Fwi.length}async r8t(){if(!this.c$t)throw new m("Invalid state");const t=this.Fyi,i=t.newContext();i.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_VIDEO_DISPLAY_CONTROLS_WHEN_PAUSE,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL),i.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_CONTENT_VIDEO_ENABLED,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);const e=new u7(t,i,this.c$t,this.Uyi),s=this.dwi.Nwi(i,e.Iyi());this.Vyi.lO(i),this.fwi.vyi(i),this.Hyi=e;try{await s}finally{this.fwi.fyi(),this.Wyi=!0}}get fwi(){return this.K9t}get dwi(){return this.qyi}get wwi(){return this.Wyi}static zyi(t,i,e){const s=h.createElement("div");return s.id=e,s.className="theo-freewheel",i.classList.add("theo-freewheel-video"),s.appendChild(i),t.appendChild(s),s}get pwi(){return this.Vyi}l4t(t){this.fwi.Tyi(t.type)}be(){this.A2t.style.display="block",this.pT.style.display="block"}we(){this.A2t.style.display="none",this.pT.style.display="none"}Cti(t){this.c$t=t}hr(){this.Wyi=!1,this.c$t=void 0,this.dwi.hr(),this.Vyi.hr(),this.Hyi&&(this.Hyi.hr(),this.Hyi=void 0),this.fwi.hr(),this.pT.src=""}kn(){this.hr(),this.K9t.kn(),this.Vyi.kn(),this.dwi.kn(),this.A2t.remove(),Ao(this.A2t)}constructor(i,e,n){super(),this.oa=void 0,this.pT=void 0,this.Fyi=void 0,this.Uyi=void 0,this.qyi=void 0,this.A2t=void 0,this.K9t=void 0,this.Hyi=void 0,this.Vyi=void 0,this.c$t=void 0,this.Wyi=void 0,this.oa=i,this.pT=e,this.Wyi=!1,this.Uyi=t.createUniqueDisplayBaseId(),this.A2t=t.zyi(i.xe,e,this.Uyi),this.Fyi=new s.tv.freewheel.SDK.AdManager,this.qyi=new e7(this.A2t,this.pT),this.Vyi=new d7(this.oa,this.dwi),this.au(this.dwi),this.K9t=new s7(i,n,this.dwi,this.A2t)}};function v7(t){if(s.tv)switch(t){case"preroll":return tv.freewheel.SDK.ADUNIT_PREROLL;case"midroll":return tv.freewheel.SDK.ADUNIT_MIDROLL;case"postroll":return tv.freewheel.SDK.ADUNIT_POSTROLL;case"overlay":return tv.freewheel.SDK.ADUNIT_OVERLAY}}function _7(t,i,e){if(void 0!==i&&S(i)||i<0||i===1/0)return NaN;switch(t){case"preroll":return 0;case"postroll":return e}return I1(i)}va.Bg.Kz(new class{get i4t(){return we._1t}Qz(t){return t.integration===FC.FREEWHEEL}e4t(t,i,e){if(!Boolean(s.tv&&s.tv.freewheel&&s.tv.freewheel.SDK&&s.tv.freewheel.SDK.AdManager))return;const n=new Dr(t.Wu,t.Ql,e,1,[at.Mk]);n.Est(t.xe);const r=n.Yq(at.Mk),h=new f7(t,r.hq,t.Wu);return new Z9(t,i,n,h,r)}uj(t){const i=ru(t);hi(i.cuePoints)||(i.cuePoints=[]);const e=[],s=t.assetDuration||0;for(const t of i.cuePoints){const i=_7(t.adUnit,t.timeOffset,s),n=v7(t.adUnit);!S(i)&&Q(n)?(t.adUnit=n,t.timeOffset=i,e.push(t)):zd.um("Invalid adUnit/timeOffset combination. Cue was removed.")}return i.cuePoints=e,i}W6(t,i,e,s){e.Cti(t,i,s)}}),r(),r(),r(),r(),r();var g7=self.theoplayerDeviceMetadata;function za(t){return t.navigator&&t.navigator.userAgent||""}r(),r(),r(),r();var p7={"Windows 10":/(Windows 10.0|Windows NT 10.0)/i,"Windows 8.1":/(Windows 8.1|Windows NT 6.3)/i,"Windows 8":/(Windows 8|Windows NT 6.2)/i,"Windows 7":/(Windows 7|Windows NT 6.1)/i,"Windows Vista":/Windows NT 6.0/i,"Windows Server 2003":/Windows NT 5.2/i,"Windows XP":/(Windows NT 5.1|Windows XP)/i,"Windows Phone":/Windows Phone/i,Android:/Android/i,Linux:/(Linux(?!.*Ubuntu)|X11)/,Ubuntu:/Ubuntu/i,iOS:/(iPhone|iPad|iPod)/i,"Mac OS X":/Mac OS X/i,"Mac OS":/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/i,"Chrome OS":/CrOS/i};function xi(t,i){const e=p7[i];return!!e&&Boolean(za(t).match(e))}function m7(t){return xi(t,"Android")}function w7(t){return xi(t,"Windows Phone")}function y7(t){return xi(t,"iOS")&&!w7(t)}function b7(t){return xi(t,"Ubuntu")}var A7=/Windows (NT|Phone) ([0-9.]+)/i,S7=/Mac.*?(OS |OS X )(\d+(([_.])\d+)?(([_.])\d+)?)/i,T7={"Windows 10":A7,"Windows 8.1":A7,"Windows 8":A7,"Windows 7":A7,"Windows Vista":A7,"Windows Server 2003":A7,"Windows XP":A7,"Windows Phone":/Windows Phone ([0-9.]+)/i,Android:/Android (\d+(([_.])\d+)?(([_.])\d+)?)/i,Linux:void 0,Ubuntu:void 0,iOS:/(iPad|iPhone|iPod).*?(OS |os |OS_)(\d+(([_.])\d+)?(([_.])\d+)?)/i,"Mac OS X":S7,"Mac OS":S7,"Chrome OS":void 0};function k7(t,i){const e=T7[i];return e?za(t).match(e):null}function E7(t){return t.split(/[_.]/).map(t=>x(t,10))}function x7(t){if(function(t){return Boolean(za(t).match(/Windows/i))}(t)){if(function(t){return xi(t,"Windows 10")}(t))return"Windows 10";if(w7(t))return"Windows Phone";if(function(t){return xi(t,"Windows 8.1")}(t))return"Windows 8.1";if(function(t){return xi(t,"Windows 8")}(t))return"Windows 8";if(function(t){return xi(t,"Windows 7")}(t))return"Windows 7";if(function(t){return xi(t,"Windows Vista")}(t))return"Windows Vista";if(function(t){return xi(t,"Windows Server 2003")}(t))return"Windows Server 2003";if(function(t){return xi(t,"Windows XP")}(t))return"Windows XP"}else{if(m7(t))return"Android";if(y7(t))return"iOS";if(function(t){return xi(t,"Mac OS X")}(t))return"Mac OS X";if(function(t){return xi(t,"Mac OS")}(t))return"Mac OS";if(b7(t))return"Ubuntu";if(function(t){return xi(t,"Chrome OS")}(t))return"Chrome OS";if(function(t){return xi(t,"Linux")&&!b7(t)}(t))return"Linux"}}function P7(t,i){const e=function(t){const i=k7(t,"Windows 10");return i&&i.length>2?E7(i[2]):void 0}(t),s=function(t){const i=k7(t,"Mac OS X");return i&&i.length>2?E7(i[2]):void 0}(t),n=function(t){const i=k7(t,"Android");return i&&i.length>1?E7(i[1]):void 0}(t),r=function(t){const i=k7(t,"iOS");return i&&i.length>3?E7(i[3]):void 0}(t),h=function(t){const i=k7(t,"Chrome OS");return i&&i.length>0?E7(i[0]):void 0}(t);return e?e.length>i?e[i]:void 0:s?s.length>i?s[i]:void 0:n?n.length>i?n[i]:void 0:r?r.length>i?r[i]:void 0:h&&h.length>i?h[i]:void 0}function I7(t){const i=function(t){return P7(t,0)}(t),e=function(t){return P7(t,1)}(t),s=function(t){return P7(t,2)}(t);if(void 0!==i)return void 0===e?""+i:void 0===s?i+"."+e:i+"."+e+"."+s}var C7={Chrome:/Chrome/i,"Chrome Mobile":void 0,"Chrome iOS":/CriOS/i,Chromium:/Chromium/i,HeadlessChrome:/HeadlessChrome/i,Firefox:/Firefox/i,Seamonkey:/Seamonkey/i,"Firefox iOS":/FxiOS/i,Safari:/Safari/i,Edge:/Edge\/\d+/i,"Edge Chromium":/Edg\/\d+/i,IE:/Trident/i,Opera:/Opera|OPR/i,Vivaldi:/Vivaldi/i,"Android Browser":void 0};function R7(t,i){const e=C7[i];return!!e&&Boolean(za(t).match(e))}function D7(t){return Boolean(za(t).match(/Mobi/i))}function N7(t){return Boolean(t.chrome&&t.navigator&&t.navigator.vendor&&/google/i.test(t.navigator.vendor))||B7(t)}function B7(t){return R7(t,"Chrome iOS")}function M7(t){return R7(t,"Firefox")&&!O7(t)}function L7(t){return R7(t,"Firefox Mobile")&&!O7(t)&&D7(t)}function O7(t){return R7(t,"Seamonkey")}function F7(t){return R7(t,"Firefox iOS")&&!O7(t)}function U7(t){return R7(t,"Safari")&&!R7(t,"Chrome")&&!zs.Wv}function V7(t){return Boolean(Q7(t))}function H7(t){return R7(t,"Edge")}function W7(t){return R7(t,"Edge Chromium")}function q7(t){return R7(t,"IE")}function z7(t){return R7(t,"Vivaldi")}var G7=/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i,X7={Chrome:G7,"Chrome Mobile":G7,"Chrome iOS":/CriOS\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i,Chromium:G7,HeadlessChrome:G7,Firefox:/Firefox\/([0-9.]+)/i,"Firefox iOS":/FxiOS\/([0-9.]+)/i,Safari:/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/,"Safari Mobile":void 0,Edge:/Edge\/(\d+)/i,"Edge Chromium":/Edg\/(\d+)/i,"Edge Mobile":void 0,IE:/(MSIE |Trident.*?rv:)(\d+)/i,Opera:/(OPR\/(\d+\.\d+))|(Opera(?=.*Version\/((\d+)\.(\d+))))/i,"Opera Mobile":void 0,Vivaldi:/Vivaldi\/((\d+)\.(\d+)\.(\d+)(?:\.(\d+))?)/i,"Android Browser":void 0};function j7(t,i){const e=X7[i];return e?za(t).match(e):null}function Q7(t){return j7(t,"Opera")}function K7(t){const i=function(t){return j7(t,"Firefox")}(t);return i?C(i[1]):0}function Y7(t){const i=function(t){return j7(t,"Firefox iOS")}(t);return i?C(i[1].split(".")[0]):0}function J7(t){const i=function(t){return j7(t,"Safari")}(t);return i?C(i[2].split(".")[0]):0}function Z7(t){const i=function(t){return j7(t,"Edge")}(t);return i?C(i[1]):0}function $7(t){const i=function(t){return j7(t,"Edge Chromium")}(t);return i?C(i[1]):0}function ttt(t){const i=function(t){return j7(t,"IE")}(t);return i?C(i[2]):0}function itt(t){const i=function(t){return j7(t,"Vivaldi")}(t);return i?C(i[1]):0}function ett(t){if(m7(t))return N7(t)?"Chrome Mobile":M7(t)||L7(t)?"Firefox Mobile":H7(t)?"Edge Mobile":V7(t)?"Opera Mobile":"Android Browser";if(y7(t)){if(N7(t)||B7(t))return"Chrome iOS";if(M7(t)||F7(t))return"Firefox iOS";if(H7(t))return"Edge Mobile";if(U7(t)||function(t){return U7(t)&&D7(t)}(t))return"Safari Mobile";if(V7(t))return"Opera Mobile"}return function(t){return R7(t,"Chromium")}(t)?"Chromium":function(t){return R7(t,"HeadlessChrome")}(t)?"HeadlessChrome":N7(t)?"Chrome":M7(t)?"Firefox":U7(t)?"Safari":H7(t)?"Edge":W7(t)?"Edge Chromium":q7(t)?"IE":V7(t)?"Opera":z7(t)?"Vivaldi":void 0}function stt(t){return z7(t)?itt(t):B7(t)?Number(function(t){const i=X7["Chrome iOS"];return i&&i.exec(za(t))||[]}(t)[1]):N7(t)?Number(function(t){const i=X7.Chrome;return i&&i.exec(za(t))||[]}(t)[1]):M7(t)||L7(t)?K7(t):F7(t)?Y7(t):U7(t)?J7(t):H7(t)?Z7(t):W7(t)?$7(t):q7(t)?ttt(t):V7(t)?function(t){const i=Q7(t);return i&&i[0].indexOf("Opera")>-1?C(i[5]):i?C(i[2].split(".")[0]):0}(t):void 0}var ntt=function(t){return t.Gyi="pc",t.Xyi="console",t.jyi="settop",t.Qyi="mobile",t.Kyi="tablet",t.Yyi="smarttv",t.Jyi="searchbot",t}({});function rtt(t){const i=za(t);return i.match(/CrKey|Roku|AFTS|AppleTV|Nexus Player/i)?"settop":i.match(/Xbox|Playstation|Wii|Nintendo/i)?"console":/(iPad|Tablet|(Android(?!.*Mobi))|(Windows(?!.*Phone)(.*Touch))|Kindle|Playbook|Silk|(Puffin(?!.*(IP|AP|WP))))/i.test(i)?"tablet":/Mobi/.test(i)?"mobile":i.match(/GoogleTV|SmartTV|SMART-TV|Internet TV|NetCast|NETTV|boxee|Kylo|DLNADOC|hbbtv|CE-HTML/i)?"smarttv":i.match(/(nuhk|Googlebot|bingbot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/i)?"searchbot":function(t){return Boolean(ett(t))}(t)?"pc":void 0}var htt=class{aj(t){this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_ID,t.deviceID||function(){const t=Ub.zy("deviceId");if(t)return t;const i=JC();return Ub.Gy("deviceId",i),i}()),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.PLAYER,"THEOplayer"),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.PLAYER_VERSION,"10.3.0"),this.Zyi(t),this.$yi(),this.tbi(t),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.EMPCLIENT_INTEGRATION_VERSION,"3.0"),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.EMPCLIENT_INTEGRATION_BUILDDATE,"2023-04-17 12:00:00"),t.application&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.APPLICATION,t.application),t.applicationVersion&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.APPLICATION_VERSION,t.applicationVersion),t.userAccountID&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.USER_ACCOUNT_ID,t.userAccountID);const i=t.connectionType;i?this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,i):(this.ibi(),od.connection&&od.connection.addEventListener&&od.connection.addEventListener("change",this.ibi))}Zyi(t){this.ebi(t);const i=t.deviceManufacturer||g7&&g7.manufacturer;i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_MANUFACTURER,i);const e=t.deviceModel||g7&&g7.model;e&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_MODEL,e)}ebi(t){const i=t.deviceType||function(){const t=rtt(self);switch(t){case ntt.Xyi:return"game-console";case ntt.Yyi:return"tv";case ntt.jyi:return"media-streamer";default:return t}}();i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_TYPE,i)}$yi(){const t=ett(self);t&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_BROWSER,t);const i=stt(self);void 0!==i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_BROWSER_VERSION,i.toString())}tbi(t){const i=t.deviceOs||x7(self);i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_OS,i);const e=t.deviceOsVersion||I7(self);e&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_OS_VERSION,e.toString())}kn(){od.connection&&od.connection.removeEventListener&&od.connection.removeEventListener("change",this.ibi)}constructor(t,i){this.empClient=void 0,this.agama=void 0,this.ibi=void 0,this.empClient=t,this.agama=i,this.ibi=()=>{const t=zd.Rx;switch(t){case"wifi":this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,"wlan");break;case"ethernet":this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,t);break;case"cellular":const i=function(t){switch(t){case"3g":return"mobile/3G";case"4g":return"mobile/4G";default:return}}(zd.Cx);i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,i)}}}};Na(function(t){return i=>class extends i{Xx(t,i){this.sbi&&this.sbi.$G(),super.Xx(t)}kn(){this.sbi&&this.sbi.kn(),super.kn()}constructor(i,e){super(i,e),this.WG=new t,this.sbi=void 0,this.sbi=new $C(this,this.WG,e)}}}(class extends WC{GP(t){this.nbi=t,this.rbi&&(this.WG=function(t,i){const e=function(t,i){switch(i){case"info":return t.LogLevel.INFO;case"debug":return t.LogLevel.DEBUG;case"warning":return t.LogLevel.WARNING;case"error":return t.LogLevel.ERROR;default:return t.LogLevel.FATAL}}(i,t.logLevel);i.setLogLevel(e);const s=new i.EMPClient(t.config);return function(t,i){return t.setExternalConfig(i.config),t}(s,t)}(t,this.rbi),this.WG&&(this.hbi=new htt(this.WG,this.rbi),this.ko=!0))}hj(){return this.rbi||console.warn("Please load the Agama Library (empclient.min.js) in order to use the integration"),Boolean(this.rbi)}nj(){return this.ko}OX(t,i){if(this.WG&&this.rbi)switch(t){case ba.oG:this.WG.setMeasurement(this.rbi.Measurement.BUFFER_LENGTH,i);break;case ba.aG:this.WG.setMeasurement(this.rbi.Measurement.BYTES_RECEIVED,i);break;case ba.cG:this.WG.setMeasurement(this.rbi.Measurement.SEGMENT_PROFILE_BITRATE,i);break;case ba.dG:this.WG.setMeasurement(this.rbi.Measurement.VIDEO_PROFILE_BITRATE,i);break;case ba.uG:this.WG.setMeasurement(this.rbi.Measurement.SEGMENT_READ_BITRATE,i);break;case ba.eG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_1XX,i);break;case ba.sG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_2XX,i);break;case ba.nG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_3XX,i);break;case ba.rG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_4XX,i);break;case ba.hG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_5XX,i);break;case ba.fG:this.WG.setMeasurement(this.rbi.Measurement.PLAYBACK_POSITION,i);break;case ba.vG:this.WG.setMeasurement(this.rbi.Measurement.NUMBER_OF_FRAMES_DECODED,i);break;case ba.lG:this.WG.setMeasurement(this.rbi.Measurement.NUMBER_OF_FRAMES_DROPPED,i)}}mX(t,i){if(this.WG&&this.rbi)switch(t){case ct.wG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.ASSET_DURATION,i);break;case ct.mG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.MANIFEST_URI,i);break;case ct.yG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.NUMBER_OF_CONTENT_PROFILES,i);break;case ct.SG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.SERVICE_NAME,i);break;case ct.bG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.CDN,i);break;case ct.AG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.CONTENT_TITLE,i);break;case ct.TG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.CONTENT_TYPE,i);break;case ct.kG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.CONTENT_DESCRIPTION,i)}}aj(){this.hbi&&this.nbi&&this.hbi.aj(this.nbi)}rj(t,i){this.rbi&&this.WG&&(this.qX(),function(t,i,e,s){const n=ZC(t,e,s);i.abrSession(n,t.ViewState.INITIAL_BUFFERING)}(this.rbi,this.WG,t,i),this.obi=!0)}kn(){this.hbi&&this.hbi.kn(),this.abi(UC.EG),this.WG=void 0}nX(t){this.ubi(t)}oX(t,i){this.WG&&this.WG.event(t.code,i)}qX(){this.WG&&this.obi&&(this.WG.exitSession(),this.obi=!1)}abi(t){if(this.WG&&this.rbi&&(this.qX(),t===UC.EG))this.WG.shutdown(this.rbi.ShutdownType.NORMAL_SHUTDOWN)}rX(t,i,e){this.ubi(t,i,e)}ubi(t,i,e){if(this.WG&&this.rbi)switch(t){case ri.PM:this.cbi(this.rbi.ViewState.PLAYING,i,e);break;case ri.$z:this.cbi(this.rbi.ViewState.FAILED,i,e);break;case ri.tG:this.cbi(this.rbi.ViewState.INITIAL_BUFFERING,i,e);break;case ri.Yz:this.cbi(this.rbi.ViewState.PAUSED,i,e);break;case ri.Jz:this.cbi(this.rbi.ViewState.SEEK,i,e);break;case ri.Zz:this.cbi(this.rbi.ViewState.STALLED,i,e);break;case ri.iG:this.cbi(this.rbi.ViewState.NO_ACCESS,i,e)}}cbi(t,i,e){if(this.WG)if(i){const s=function(t){return t||""}(e);this.WG.viewStateExtended(t,i.code,s)}else this.WG.viewStateChanged(t)}constructor(){super(),this.rbi=void 0,this.WG=void 0,this.ko=!1,this.obi=!1,this.nbi=void 0,this.hbi=void 0,this.rbi=s.Agama}}),Oa.Snt),r(),r(),r(),r(),r();var ott=function(t){return t.PLAY_ALL="play-all",t.PLAY_NONE="play-none",t.PLAY_LAST="play-last",t}({});r();var kh=function(t){return t.VOD="vod",t.LIVE="live",t}({}),att=class{get Ca(){return this.dbi.Ca}get lt(){return this.nq}get Jx(){return this.rq}lbi(t){this.nq=ar(t),this.rq=t,this.oa.So(new el(t))}Ta(t){this.fbi.resetSource(),this.vbi.jy(),this._bi=!1,this.oa.gbi(t)}async drt(t,i){if(this.pbi.hr(),this._bi=!1,!t||!function(t){return t.sources.some(t=>t.integration===uk.UPLYNK)}(t))return await this.oa.mbi(t,i);try{this.wbi=await this.ybi.wpi(t),await this.oa.mbi(this.wbi,i)}catch(t){this.lbi(new as(me.MANIFEST_LOAD_ERROR,t.message,t))}}kn(){this.T9.Zg(),this.bbi.Zg(),this.oa.mn(d.Pw,this.Abi),this.oa.mn(d.uo,this.dci),this.oa.mn(d.py,this.Cci),this.oa.mn(d.Nw,this.kgi),this.oa.mn(Jr.kM,this.Pd);for(const t of this.fbi.K0t.ec)t.mn("Sbi",this.Tbi),t.mn("Ynt",this.hci),t.mn("Knt",this.kbi);this.fbi.K0t.mn("Xnt",this.Ebi),this.fbi.K0t.mn("Gnt",this.xbi),this.fbi.destroy(),this.T2t&&(this.T2t.zg(),this.T2t=void 0),this._bi=!1}async fetchAssetInfo(t){if(t&&t.integrationData)try{const i=await this.Pbi.KSt(t.integrationData.source.prefix,t.integrationData.source.id,this.bbi.Yg,t.integrationData.preplayResponse.sid);this.dbi.Ibi(i),this.vbi.Cbi(i,this.fbi.K0t.ec)}catch(t){0}}Rbi(t){this.fbi.Dbi(t),this.fbi.Lnt.forEach(i=>i.Nbi(t)),this.fbi.Bbi(this.oa.EP()),this.S2t()}Xx(t){if(this.fbi.Fnt)return;this.T9.Zg(),this.T9=new Zc;Wr(Cu(this.Xri(t,this.T9.Yg),this.T9))}async Xri(t,i){if(fr(i),ti.Wat.Cr(t));i?this.oa.Vbi(i.CO):this.oa.Vbi(t)}Ubi(t){const i=this.fbi.Obi(this.oa.Gx(),t).pop();i&&i.Wat.Cr(t)?this.oa.Vbi(i.RO):this.oa.Vbi(t)}async Fbi(t,i,e){for(const t of i)await this.Hbi(t,e);const s=hf(i,-1);s&&s.Wat.Cr(t)?this.oa.Gx()t.Wbi.length>0);if(t){const i=t.Wbi[0];this.T2t||(this.T2t=new A2(this.oa.xe),this.T2t.wn("clickstart",this.qbi)),this.T2t.O1t=i}else this.T2t&&(this.T2t.zg(),this.T2t=void 0)}constructor(t,i,e,s,n,r,h){this.oa=void 0,this.pbi=void 0,this.ybi=void 0,this.fbi=void 0,this.dbi=void 0,this.Pbi=void 0,this.vbi=void 0,this.wbi=void 0,this.nq=void 0,this.rq=void 0,this.T9=void 0,this.bbi=void 0,this.zbi=void 0,this._bi=void 0,this.T2t=void 0,this.Abi=void 0,this.dci=void 0,this.Cci=void 0,this.kgi=void 0,this.Pd=void 0,this.Tbi=void 0,this.hci=void 0,this.kbi=void 0,this.Ebi=void 0,this.xbi=void 0,this.qbi=void 0,this.oa=t,this.pbi=i,this.ybi=e,this.fbi=s,this.dbi=n,this.Pbi=r,this.vbi=h,this.nq=void 0,this.rq=void 0,this.T9=new Zc,this.bbi=new Zc,this.zbi=void 0,this._bi=!1,this.T2t=void 0,this.Abi=t=>{const i=t.currentSource;if(!i||!i.integrationData)return;const{preplayResponse:e,source:s}=i.integrationData;this.dbi.Gbi(e),e&&e.type===kh.VOD&&e.ads&&this.fbi.Cbi(e.ads),this.pbi.Xbi=i.integrationData,s.assetInfo&&Wr(this.fetchAssetInfo(i))},this.dci=()=>{this._bi=!0},this.Cci=()=>{this._bi&&this.Rbi(this.oa.Gx())},this.kgi=()=>{this._bi&&(this.Rbi(1/0),this._bi=!1)},this.Pd=()=>{Wr(this.pbi.Tn())},this.Tbi=t=>{this.T9.Zg(),this.T9=new Zc;Wr(Cu(this.Xri(t.od.RO,this.T9.Yg),this.T9))},this.hci=()=>{1!==this.oa.vP&&(this.zbi=this.oa.vP,this.oa.vP=1)},this.kbi=()=>{void 0!==this.zbi&&(this.oa.vP=this.zbi,this.zbi=void 0)},this.Ebi=t=>{t.od.wn("Sbi",this.Tbi),t.od.wn("Ynt",this.hci),t.od.wn("Knt",this.kbi)},this.xbi=t=>{t.od.mn("Sbi",this.Tbi),t.od.mn("Ynt",this.hci),t.od.mn("Knt",this.kbi)},this.qbi=()=>{this.oa.jP()},this.oa.wn(d.Pw,this.Abi),this.oa.wn(d.uo,this.dci),this.oa.wn(d.py,this.Cci),this.oa.wn(d.Nw,this.kgi),this.oa.wn(Jr.kM,this.Pd),this.fbi.K0t.wn("Xnt",this.Ebi),this.fbi.K0t.wn("Gnt",this.xbi)}};r(),r();var utt=Zh({breaksIndex:an,adsIndex:an,startTime:an,endTime:an}),ctt=Zh({index:an,timeOffset:an}),dtt=Zh({duration:an,apiFramework:Dh(Ye,bI),creative:Ye,mimeType:Ye,width:an,height:an,companions:_h(function(t){return new RI(t)}(()=>dtt)),extensions:Dh(Pa,_h(yI)),fw_parameters:Dh(Pa,CI(Ye)),events:CI(_h(Ye))}),ltt=Zh({type:EI(["linear","nonlinear"]),position:EI(["preroll","midroll","postroll","pause","overlay",""]),timeOffset:an,duration:an,ads:_h(dtt),events:CI(_h(Ye))}),ftt=Zh({breaks:_h(ltt),breakOffsets:Dh(Pa,_h(ctt)),placeholderOffsets:Dh(Pa,_h(utt))}),vtt=Zh({required:Dh(Pa,wI),fairplayCertificateURL:Dh(Pa,Ye),widevineLicenseURL:Dh(Pa,Ye),playreadyLicenseURL:Dh(Pa,Ye)}),_tt={type:EI(TI(kh)),playURL:Ye,prefix:Ye,sid:Ye,drm:Dh(Pa,vtt)},gtt=Zh(Y({},_tt,{type:EI([kh.VOD]),ads:ftt,interstitialURL:Dh(Ye,bI,Pa)})),ptt=Dh(gtt,Zh(Y({},_tt,{type:EI([kh.LIVE])})));r();var mtt=Ye,wtt=Zh({userId:Ye,externalId:Dh(Ye,_h(Ye))}),ytt=class{async KSt(t){try{return this.jbi(t)}catch(t){throw t}}async jbi(t){const i=await async function(t){const i=t.prefix,e=btt[t.assetType],s=function(t){if(_h(mtt).jH(t))return 1===t.length?t[0]:t.join(",")+"/multiple";if(mtt.jH(t))return t;if(wtt.jH(t)&&hi(t.externalId))return 1===t.externalId.length?"ext/"+t.userId+"/"+t.externalId[0]:"ext/"+t.userId+"/"+t.externalId.join(",")+"/multiple";if(wtt.jH(t))return"ext/"+t.userId+"/"+t.externalId;throw new g("Invalid asset id")}(t.id),n=await async function(t){if(t&&await zd.wm())return{rmt:"fps",manifest:"m3u8"};if(t&&await zd.Am())return{rmt:"wv",manifest:"mpd"};if(t&&await zd.ym())return{rmt:"pr",manifest:"mpd"};return{}}(t.contentProtected),r=function(t,i){const e=Att(t,i);return e?{"ad.cping":"1","ad.pingf":String(e)}:{}}(t.assetType,t.ping);let h={};hi(t.preplayParameters)?t.preplayParameters.forEach(t=>{h[t[0]]=t[1]}):h=t.preplayParameters;const o=i+"/preplay/"+e+s+".json";return bA(o,Y({v:"2"},h,n,r,h))}(t),e=this.aV.vk({Hk:Qe.GET,Yu:i,fk:Bi.BT}),s=await e,n=Y({},await s.lk(),{type:t.assetType===sR.ASSET?kh.VOD:kh.LIVE});return ptt.jH(n)||ptt.KH(n,"PreplayResponse"),n}constructor(t){this.aV=void 0,this.aV=t}},btt={[sR.ASSET]:"",[sR.CHANNEL]:"channel/",[sR.EVENT]:"event/"};function Att(t,i){const e=t!==sR.ASSET;return(!e&&i.adImpressions?1:0)+(!e&&i.freeWheelVideoViews?2:0)+(e&&i.linearAdData?4:0)}r(),r();var Stt=Zh({ad_id:Ye,apiFramework:Dh(bI,Ye),companions:_h(yI),creative:Ye,duration:an,mimeType:Ye,height:an,width:an,extensions:Dh(Pa,_h(yI)),fw_parameters:Dh(Pa,CI(Ye))}),Ttt=Zh({breakId:Ye,ads:_h(Stt),type:EI(["linear","nonlinear"]),position:EI(["preroll","midroll","postroll","pause","overlay",""]),timeOffset:an,duration:an,height:Dh(Pa,an),width:Dh(Pa,an),events:CI(_h(Ye))}),ktt=Zh({breaks:_h(Ttt)}),Ett=Zh({next_time:an,ads:Dh(Pa,ktt),extensions:Dh(Pa,_h(yI)),error:Dh(Pa,Ye),currentBreakEnd:Dh(Pa,an)}),xtt=function(t){return t.tTt="start",t.Jz="seek",t}({}),Ptt=class{async KSt(t,i){try{return this.jbi(t,i)}catch(t){throw t}}async jbi(t,i){const e=function(t){const i={v:"3",pt:String(t.currentTime)};(function(t){return void 0!==t.seekTime})(t)&&t.hasFreeWheelVideoViews&&(i.ft=String(t.seekTime));t.event&&(i.ev=t.event);return bA(t.zonePrefix+"/session/ping/"+t.sessionId+".json",Y({},i))}(t),s=this.aV.vk({Hk:Qe.GET,Yu:e,fk:Bi.BT,Yg:i}),n=await s,r=await n.lk();return Ett.jH(r)||Ett.KH(r,"PingResponse"),r}constructor(t){this.aV=void 0,this.aV=t}};r(),r();var Itt=class extends Oi{get uE(){return this.cE}xa(){return new Ctt(this.cE)}constructor(t){super("Qbi"),this.cE=void 0,this.cE=t}},Ctt=class extends gp{constructor(t){super("pingresponse"),this.response=void 0,this.response=t}};r();var Rtt=class extends Oi{get lt(){return this.nq}xa(){return new Dtt(this.nq)}constructor(t){super("Kbi"),this.nq=void 0,this.nq=t}},Dtt=class extends gp{constructor(t){super("pingerror"),this.error=void 0,this.error=t}},Ntt=class extends Ne{set Xbi(t){this.Ybi=t}get Jbi(){return this.Zbi}async Tn(){const t=this.Ybi;if(!t)return;0!==Att(t.source.assetType,t.source.ping)&&(this.Zbi=this.oa.EP().start(0),await this.$bi(xtt.tTt),this.oa.wn("timeupdate",this.tAi),this.oa.wn("seeking",this.iAi))}async $bi(t,i){const e=this.Ybi.preplayResponse,s={};if(S(this.Zbi))return void 0;if(it(this.eAi)&&Ql(this.eAi,this.oa.Gx()-this.Zbi))return;void 0!==i&&(s.seekTime=i),void 0!==t&&(s.event=t);let n,r=this.oa.Gx()-this.Zbi;t===xtt.tTt?r=0:t!==xtt.Jz&&this.sAi&&(r=_.min(r,this.sAi)),this.eAi=r;try{var h;const t=await this.nAi.KSt(Y({zonePrefix:e.prefix,sessionId:e.sid,currentTime:r,hasFreeWheelVideoViews:null==(h=this.Ybi)?void 0:h.source.ping.freeWheelVideoViews},s),this.hT.Yg);this.So(new Itt(t)),this.sAi=-1!==t.next_time?t.next_time:void 0,n=t.error}catch(t){Ce(t)||(n=t.message)}finally{n&&this.So(new Rtt(n))}}hr(){this.sAi=void 0,this.Ybi=void 0,this.Zbi=NaN,this.rAi=!1,this.hAi=NaN,this.eAi=void 0,this.oa.mn("seeking",this.iAi),this.oa.mn("timeupdate",this.tAi),this.oAi()}oAi(){this.hT.Zg(),this.hT=new Zc}kn(){this.hr()}constructor(t,i){super(),this.nAi=void 0,this.oa=void 0,this.Ybi=void 0,this.Zbi=void 0,this.sAi=void 0,this.rAi=void 0,this.hAi=void 0,this.hT=void 0,this.eAi=void 0,this.tAi=void 0,this.iAi=void 0,this.nAi=t,this.oa=i,this.Zbi=NaN,this.sAi=void 0,this.rAi=!1,this.hAi=NaN,this.hT=new Zc,this.eAi=void 0,this.tAi=async()=>{const t=this.oa.Gx();if(this.hAi=t,this.rAi||vc(this.sAi)||S(this.Zbi))return;this.Zbi+this.sAi<=t&&(this.rAi=!0,await this.$bi(),this.rAi=!1)},this.iAi=()=>{if(this.oa.Gx()===this.Zbi)return;this.rAi&&this.oAi(),this.hAi=this.oa.Gx();const t=this.hAi-(this.Zbi||0);S(t)?Wr(this.$bi(xtt.Jz,0)):Wr(this.$bi(xtt.Jz,t))}}};r();var Btt=class{async wpi(t){const i=[];for(const e of t.sources)if(mk(e))try{const s=Ltt({source:e,preplayResponse:await this.aAi.KSt(e)},t,this.GJ);s.src&&(s.src=bA(s.src,e.playbackUrlParameters)),i.push(s)}catch(t){0}else i.push(e);if(0!==t.sources.length&&0===i.length)throw new m("Fatal: unable to play UplynkSources.");return Y({},t,{sources:i})}constructor(t,i){this.aAi=void 0,this.GJ=void 0,this.aAi=t,this.GJ=i}};function Mtt(t){return!!t.sources&&(hi(t.sources)?t.sources.some(mk):mk(t.sources))}function Ltt(t,i,e){const s=t.preplayResponse;let n;t.source.contentProtected&&s.drm&&(n={integration:"uplynk"},s.drm.fairplayCertificateURL&&(n.fairplay={certificateURL:s.drm.fairplayCertificateURL}),s.drm.widevineLicenseURL&&(n.widevine={licenseAcquisitionURL:s.drm.widevineLicenseURL}),s.drm.playreadyLicenseURL&&(n.playready={licenseAcquisitionURL:s.drm.playreadyLicenseURL}));const r=ue({src:s.playURL,contentProtection:n,useNativePlayback:t.source.useNativePlayback,hls:t.source.hls,dash:t.source.dash,seamlessSwitchStrategy:t.source.seamlessSwitchStrategy},i,e);return r.integrationData=t,r}r(),r(),r();var Ott=class extends Oi{xa(){return new Ftt(this.od.Ca)}constructor(t,i){super("Ynt"),this.od=void 0,this.YF=void 0,this.od=t,this.YF=i}},Ftt=class extends gp{constructor(t){super("adbreakbegin"),this.adBreak=void 0,this.adBreak=t}};r();var Utt=class extends Oi{xa(){return new Vtt(this.od.Ca)}constructor(t,i){super("Knt"),this.od=void 0,this.YF=void 0,this.od=t,this.YF=i}},Vtt=class extends gp{constructor(t){super("adbreakend"),this.adBreak=void 0,this.adBreak=t}};r();var Htt=class extends Oi{xa(){return new Wtt(this.od.Ca)}constructor(t){super("Sbi"),this.od=void 0,this.od=t}},Wtt=class extends gp{constructor(t){super("adbreakskip"),this.adBreak=void 0,this.adBreak=t}};r(),r();var qtt=class extends Oi{xa(){return new ztt(this.od.Ca)}constructor(t){super("$4t"),this.od=void 0,this.od=t}},ztt=class extends gp{constructor(t){super("updateadbreak"),this.adBreak=void 0,this.adBreak=t}},Gtt=class extends je{get Ca(){return this.hu||(this.hu=function(t){let i;const e={get startTime(){return t.CO},get endTime(){return t.RO},get duration(){return t.ct},get ads(){return t.Jc.Ca},get skipOffset(){return t.kJt},set skipOffset(i){t.kJt=i},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new le(t,e),e}(this)),this.hu}get CO(){return this.HO}get RO(){return this.Zb?this.HO+this.Zb:void 0}uAi(t){this.Zb=t-this.CO;for(const i of this.Jc.ec)i.CO>t&&this.Jc.pS(i);this.So(new qtt(this))}get ct(){return this.Zb}get Wat(){const t=this.RO;return it(t)?new Uo([this.CO,t]):Uo.rL()}get Jc(){return this.qc}get cAi(){return this.dAi}get ro(){return this.ho}get kJt(){return this.emi?-1:this.EJt}set kJt(t){this.emi||(this.EJt=t)}fct(t){return t>=this.CO&&(vc(this.ct)||t<=this.CO+this.ct)}lAi(t){return-1!==this.kJt&&(!!it(this.RO)&&t-this.CO>=this.kJt)}uD(){this.qc.ec.forEach(t=>t.uD()),this.So(new Htt(this))}fAi(t){const i=it(this.RO)&&t>=this.RO,e=this.CO<=t&&!i&&!this.ro,s=this.ro&&this.RO&&t>=this.RO;e&&(this.ho=!0,this.So(new Ott(this,this.CO))),this.qc.ec.forEach(i=>i.fAi(t)),s&&(this.dAi=!0,this.ho=!1,this.So(new Utt(this,this.RO)))}constructor(t,i,e,s,n){super(),this.HO=void 0,this.Zb=void 0,this.qc=void 0,this.emi=void 0,this.hu=void 0,this.ho=void 0,this.EJt=void 0,this.dAi=void 0,this.HO=t,this.Zb=i,this.qc=e,this.emi=s,this.ho=!1,this.dAi=!1,this.EJt=n}};r(),r();var Xtt=class extends Oi{xa(){return new jtt(this.jnt.Ca)}constructor(t,i){super("Jnt"),this.jnt=void 0,this.YF=void 0,this.jnt=t,this.YF=i}},jtt=class extends gp{constructor(t){super("adbegin"),this.ad=void 0,this.ad=t}};r();var Qtt=class extends Oi{xa(){return new Ktt(this.jnt.Ca)}constructor(t,i){super("Znt"),this.jnt=void 0,this.YF=void 0,this.jnt=t,this.YF=i}},Ktt=class extends gp{constructor(t){super("adend"),this.ad=void 0,this.ad=t}};r(),r();var Ytt=class extends Oi{xa(){return new Jtt(this.jnt.Ca)}constructor(t){super("vAi"),this.jnt=void 0,this.jnt=t}},Jtt=class extends gp{constructor(t){super("removead"),this.ad=void 0,this.ad=t}},Ztt=class extends A4{Jei(t){}isi(t){this.So(new Ytt(t))}constructor(){super()}};r();var $tt=class extends Oi{xa(){return new tit(this.jnt.Ca)}constructor(t){super("i5t"),this.jnt=void 0,this.jnt=t}},tit=class extends gp{constructor(t){super("adfirstquartile"),this.ad=void 0,this.ad=t}},iit=class extends Oi{xa(){return new eit(this.jnt.Ca)}constructor(t){super("e5t"),this.jnt=void 0,this.jnt=t}},eit=class extends gp{constructor(t){super("admidpoint"),this.ad=void 0,this.ad=t}},sit=class extends Oi{xa(){return new nit(this.jnt.Ca)}constructor(t){super("s5t"),this.jnt=void 0,this.jnt=t}},nit=class extends gp{constructor(t){super("adthirdquartile"),this.ad=void 0,this.ad=t}},rit=class extends Oi{xa(){return new hit(this.jnt.Ca)}constructor(t){super("_Ai"),this.jnt=void 0,this.jnt=t}},hit=class extends gp{constructor(t){super("adcomplete"),this.ad=void 0,this.ad=t}};r();var oit=class t extends je{static gAi(i,e){return new t(i,e.duration,e.apiFramework||"",e.creative,e.mimeType,e.width,e.height,e.companions.map(e=>t.gAi(i,e)),e.extensions,e.fw_parameters,e.events,void 0)}static pAi(i,e){return new t(i,e.duration,e.apiFramework||"",e.creative,e.mimeType,e.width,e.height,e.companions.map(e=>t.pAi(i,e)),e.extensions,e.fw_parameters,void 0,e.ad_id)}get Ca(){return this.hu||(this.hu=function(t){let i;const e={get apiFramework(){return t.FYt},get companions(){return t.PYt.Ca},get creative(){return t.mAi},get duration(){return t.ct},get endTime(){return t.RO},get events(){return t.fQ},get extensions(){return t.DJt},get freeWheelParameters(){return t.wAi},get height(){return t.Mi},get mimeType(){return t.lQ},get startTime(){return t.CO},get width(){return t.Ti},addEventListener(t,e){i.wn(t,e)},removeEventListener(t,e){i.mn(t,e)}};return i=new le(t,e),e}(this)),this.hu}get CO(){return this.HO}get RO(){return this.HO+this.Zb}get ct(){return this.Zb}get FYt(){return this.UYt}get mAi(){return this.yAi}get lQ(){return this.IQ}get Ti(){return this.lA}get Mi(){return this.fA}get fQ(){return this.Zf}get PYt(){return this.IYt}get DJt(){return this.NJt}get wAi(){return this.bAi}get ro(){return this.ho}get Wbi(){var t;return null!=(t=this.Zf.clickthroughs)?t:[]}fAi(t){const i=this.CO<=t&&t=.25&&(this.AAi=!0,this.So(new $tt(this))),!this.SAi&&i>=.5&&(this.SAi=!0,this.So(new iit(this))),!this.TAi&&i>=.75&&(this.TAi=!0,this.So(new sit(this))),!this.kAi&&i>=.9999&&(this.kAi=!0,this.So(new rit(this)))}uD(){this.AAi=!0,this.SAi=!0,this.TAi=!0,this.kAi=!0}kn(){this.mn("Jnt",this.EAi),this.mn("Znt",this.xAi)}constructor(t,i,e,s,n,r,h,o,a=[],u={},c={},d){super(),this.HO=void 0,this.Zb=void 0,this.UYt=void 0,this.yAi=void 0,this.IQ=void 0,this.lA=void 0,this.fA=void 0,this.NJt=void 0,this.bAi=void 0,this.Zf=void 0,this.vJt=void 0,this.IYt=void 0,this.hu=void 0,this.ho=void 0,this.AAi=void 0,this.SAi=void 0,this.TAi=void 0,this.kAi=void 0,this.EAi=void 0,this.xAi=void 0,this.HO=t,this.Zb=i,this.UYt=e,this.yAi=s,this.IQ=n,this.lA=r,this.fA=h,this.NJt=a,this.bAi=u,this.Zf=c,this.vJt=d,this.IYt=new Ztt,this.ho=!1,this.AAi=!1,this.SAi=!1,this.TAi=!1,this.kAi=!1,this.EAi=()=>this.Nbi(this.HO),this.xAi=()=>this.Nbi(this.RO),this.IYt.Zei(o),this.wn("Jnt",this.EAi),this.wn("Znt",this.xAi)}};r(),r();var ait=class extends Oi{xa(){return new uit(this.od.Ca)}constructor(t){super("Xnt"),this.od=void 0,this.od=t}},uit=class extends gp{constructor(t){super("addadbreak"),this.adBreak=void 0,this.adBreak=t}};r();var cit=class extends Oi{xa(){return new dit(this.od.Ca)}constructor(t){super("Gnt"),this.od=void 0,this.od=t}},dit=class extends gp{constructor(t){super("removeadbreak"),this.adBreak=void 0,this.adBreak=t}},lit=class extends A4{Jei(t){this.So(new ait(t))}isi(t){this.So(new cit(t))}constructor(){super()}},fit=class{get Ca(){return this.hu||(this.hu=function(t){return{get adBreaks(){return t.K0t.Ca},get currentAdBreak(){if(t.Fnt)return t.Fnt.Ca},get currentAds(){return t.Fnt?t.Fnt.Jc.Ca:(new Ztt).Ca},skip(){t.uD()}}}(this)),this.hu}get K0t(){return this.y1t}get Fnt(){return hh(this.y1t.ec,t=>t.ro)}get Lnt(){return this.Fnt?this.Fnt.Jc.ec.filter(t=>t.ro):[]}get PAi(){if(0===this.K0t.V||0===this.oa.EP().length)return;const t=this.oa.EP().end(this.oa.EP().length-1);return hh(this.K0t.ec,i=>i.fct(t))}get Lbi(){return this.IAi}Bbi(t){if(0===t.length)return;const i=Uo.jn(t);for(const t of this.y1t.ec.slice())it(t.RO)&&i.Tn(0)>t.RO&&this.y1t.pS(t)}Cbi(t){const i=!function(t){return it(t.breakOffsets)}(t),e=i?this.pbi.Jbi:0;for(const s of t.breaks){if(0===s.ads.length)continue;let t=s.timeOffset+e;const n=new Ztt;let r=0;for(const e of s.ads){const s=i?oit.pAi(t,e):oit.gAi(t,e);n.gO(s),t+=s.ct,r+=s.ct}const h=s.timeOffset+e,o=i?void 0:s.duration,a=new Gtt(h,o,n,i,this.CAi);i&&this.RAi.push({mYt:a,wIt:h+r}),this.y1t.gO(a)}}DAi(t){const i=this.PAi;i&&i.uAi(t+this.pbi.Jbi)}Dbi(t){this.NAi=t,this.y1t.ec.forEach(i=>i.fAi(t))}uD(){const t=this.NAi,i=this.Fnt;t&&i&&i.lAi(t)&&i.uD()}skipAd(t){this.uD()}Obi(t,i){const e=[];for(const s of this.K0t.ec)!s.cAi&&s.CO>=t&&s.COi.creativeId===t.mAi)}constructor(t,i,e,s){var n;this.oa=void 0,this.pbi=void 0,this.y1t=void 0,this.CAi=void 0,this.IAi=void 0,this.hu=void 0,this.NAi=void 0,this.RAi=[],this.LAi=void 0,this.FAi=t=>(this.LAi=t,this),this.MAi=t=>{t.uE.ads&&this.Cbi(t.uE.ads),t.uE.currentBreakEnd&&this.DAi(t.uE.currentBreakEnd)},this.BAi=t=>{if(0===this.RAi.length||0===this.oa.EP().length)return;const i=this.oa.EP().end(this.oa.EP().length-1);for(const t of this.RAi.slice())it(t.mYt.ct)?_e(this.RAi,t):t.wIt{var i;const e=null==(i=this.LAi)?void 0:i.createAdBreak({timeOffset:t.od.CO,maxDuration:t.od.ct,customData:t.od});t.od.wn("Sbi",this.UAi);for(const i of t.od.Jc.ec){var s,n;const r={type:"linear",timeOffset:i.CO,duration:i.ct,creativeId:i.mAi,skipOffset:t.od.kJt,clickThrough:null==(s=i.Wbi)?void 0:s[0],customData:i};null==(n=this.LAi)||n.createAd(r,e),i.wn("Jnt",this.M7t),i.wn("Znt",this.VAi),i.wn("i5t",this.HAi),i.wn("e5t",this.WAi),i.wn("s5t",this.qAi),i.wn("_Ai",this.uyi)}},this.UAi=t=>{for(const s of t.od.Jc.ec){const t=this.OAi(s);var i,e;if(t)null==(i=this.LAi)||i.beginAd(t),null==(e=this.LAi)||e.skipAd(t)}},this.Td=t=>{for(const i of t.od.Jc.ec)i.Vo();t.od.Vo()},this.M7t=t=>{const i=this.OAi(t.jnt);var e;i&&(null==(e=this.LAi)||e.beginAd(i))},this.VAi=t=>{const i=this.OAi(t.jnt);var e;i&&(null==(e=this.LAi)||e.endAd(i))},this.HAi=t=>{const i=this.OAi(t.jnt);var e;i&&(null==(e=this.LAi)||e.updateAdProgress(i,.25))},this.WAi=t=>{const i=this.OAi(t.jnt);var e;i&&(null==(e=this.LAi)||e.updateAdProgress(i,.5))},this.qAi=t=>{const i=this.OAi(t.jnt);var e;i&&(null==(e=this.LAi)||e.updateAdProgress(i,.75))},this.uyi=t=>{const i=this.OAi(t.jnt);var e;i&&(null==(e=this.LAi)||e.updateAdProgress(i,1))},this.oa=t,this.pbi=i,this.y1t=new lit,this.y1t.wn("Xnt",this.jd),this.y1t.wn("Gnt",this.Td),this.CAi=e,this.IAi=s,t.wn("timeupdate",this.BAi),this.pbi.wn("Qbi",this.MAi),null==(n=this.oa.Jc)||n.Wnt(FC.UPLYNK,this.FAi)}};r(),r(),r();var vit=function(t){return t[t.NOT_AVAILABLE=-1]="NOT_AVAILABLE",t[t.NOT_APPLICABLE=0]="NOT_APPLICABLE",t[t.G=1]="G",t[t.PG=2]="PG",t[t.PG_13=3]="PG_13",t[t.R=4]="R",t[t.NC_17=5]="NC_17",t[t.X=6]="X",t[t.NOT_RATED=7]="NOT_RATED",t}({}),_it=function(t){return t[t.NOT_AVAILABLE=-1]="NOT_AVAILABLE",t[t.NOT_APPLICABLE=0]="NOT_APPLICABLE",t[t.TV_Y=1]="TV_Y",t[t.TV_Y7=2]="TV_Y7",t[t.TV_G=3]="TV_G",t[t.TV_PG=4]="TV_PG",t[t.TV_14=5]="TV_14",t[t.TV_MA=6]="TV_MA",t[t.NOT_RATED=7]="NOT_RATED",t}({}),git=class t{static zAi(i,e,s){const n=new Fp(i.rating_flags);return new t(e,s,i.duration,Boolean(i.audio_only),i.boundary_details,Boolean(i.error),i.tv_rating,i.max_slice,i.thumb_prefix,i.slice_dur,i.movie_rating,i.owner,i.meta,i.rates,i.thumbs,i.poster_url,i.default_poster_url,i.desc,n.Uy(1),n.Uy(2),n.Uy(4),n.Uy(8),i.external_id,Boolean(i.is_ad),i.asset)}get Ca(){return this.hu||(this.hu=function(t){return{startTime:t.CO,endTime:t.RO,duration:t.ct,audioOnly:t.GAi,boundaryDetails:t.XAi,error:t.lt,tvRating:t.jAi,maxSlice:t.QAi,thumbPrefix:t.KAi,sliceDuration:t.YAi,movieRating:t.JAi,ownerId:t.ZAi,metadata:t.LU,rates:t.$Ai,thumbnailResolutions:t.tSi,posterUrl:t.iSi,defaultPosterUrl:t.eSi,description:t._N,hasAdultLanguage:t.sSi,hasSexualSituations:t.nSi,hasViolence:t.rSi,hasDrugSituations:t.hSi,externalId:t.oSi,isAd:t.aSi,assetId:t.uSi}}(this)),this.hu}constructor(t,i,e,s,n,r,h,o,a,u,c,d,l,f,v,_,g,p,m,w,y,b,A,S,T){this.CO=void 0,this.RO=void 0,this.ct=void 0,this.GAi=void 0,this.XAi=void 0,this.lt=void 0,this.jAi=void 0,this.QAi=void 0,this.KAi=void 0,this.YAi=void 0,this.JAi=void 0,this.ZAi=void 0,this.LU=void 0,this.$Ai=void 0,this.tSi=void 0,this.iSi=void 0,this.eSi=void 0,this._N=void 0,this.sSi=void 0,this.nSi=void 0,this.rSi=void 0,this.hSi=void 0,this.oSi=void 0,this.aSi=void 0,this.uSi=void 0,this.hu=void 0,this.CO=t,this.RO=i,this.ct=e,this.GAi=s,this.XAi=n,this.lt=r,this.jAi=h,this.QAi=o,this.KAi=a,this.YAi=u,this.JAi=c,this.ZAi=d,this.LU=l,this.$Ai=f,this.tSi=v,this.iSi=_,this.eSi=g,this._N=p,this.sSi=m,this.nSi=w,this.rSi=y,this.hSi=b,this.oSi=A,this.aSi=S,this.uSi=T}};var pit=Zh({duration:an,offset:an}),mit=Zh({c3:pit}),wit=Zh({c7:pit}),yit=Zh({halftime:pit}),bit=EI(TI(_it)),Ait=EI(TI(vit)),Sit=Zh({width:Dh(Pa,an),prefix:Ye,bw:an,bh:an,height:Dh(Pa,an)}),Tit=Zh({audio_only:an,boundary_details:Dh(Pa,_h(Dh(mit,wit,yit))),error:an,tv_rating:bit,max_slice:an,thumb_prefix:Ye,slice_dur:an,movie_rating:Ait,owner:Ye,meta:yI,rates:_h(an),thumbs:_h(Sit),poster_url:Ye,duration:an,default_poster_url:Ye,desc:Ye,rating_flags:an,external_id:Ye,is_ad:an,asset:Ye}),kit=class{async KSt(t,i,e,s){const n=function(t,i,e){if(mtt.jH(i))return[Eit(t,i,e)];if(_h(mtt).jH(i))return i.map(i=>Eit(t,i,e));if(wtt.jH(i)){return(hi(i.externalId)?i.externalId:[i.externalId]).map(s=>Eit(t,"ext/"+i.userId+"/"+s,e))}throw new g("Invalid asset id")}(t,i,s),r=n.map(t=>ws(()=>this.jbi(t),e));return(await Promise.all(r)).filter(it)}async jbi(t){const i=this.aV.vk({Hk:Qe.GET,Yu:t,fk:Bi.BT}),e=await i,s=await e.lk();return Tit.jH(s)||Tit.KH(s,"AssetInfoResponse"),s}constructor(t){this.aV=void 0,this.aV=t}};function Eit(t,i,e){return e?t+"/player/assetinfo/"+i+".json?pbs="+e:t+"/player/assetinfo/"+i+".json"}r(),r();var xit=class extends Oi{xa(){return new Pit(this.pd.Ca)}constructor(t){super("cSi"),this.pd=void 0,this.pd=t}},Pit=class extends gp{constructor(t){super("removeasset"),this.asset=void 0,this.asset=t}};r();var Iit=class extends Oi{xa(){return new Cit(this.pd.Ca)}constructor(t){super("dSi"),this.pd=void 0,this.pd=t}},Cit=class extends gp{constructor(t){super("addasset"),this.asset=void 0,this.asset=t}},Rit=class extends A4{Cbi(t,i){let e,s=0;for(const n of t){e=s+n.duration;for(const t of i)s<=t.CO&&t.COthis.So(new Bit(t)))}get Ca(){return this.hu||(this.hu=this.xa()),this.hu}xa(){let t;const i=this,e={get ads(){return i.fbi.Ca},get assets(){return i.vbi.Ca},addEventListener(i,e){t.wn(i,e)},removeEventListener(i,e){t.mn(i,e)}};return t=new le(i,e),e}constructor(t,i,e){super(),this.hu=void 0,this.fbi=void 0,this.vbi=void 0,this.pbi=void 0,this.fbi=t,this.vbi=i,this.pbi=e,e.wn("Qbi",this.Rs),e.wn("Kbi",this.Rs)}},Oit=class{vSi(t,i){const e=new ytt(t.Dx),s=new Ptt(t.Dx),n=function(t){if(t.uplynk&&it(t.uplynk.defaultSkipOffset))return function(t){return lo(t)?t:-1}(t.uplynk.defaultSkipOffset);return-1}(i),r=function(t){var i,e;const s=null!=(e=null==(i=t.uplynk)?void 0:i.onSeekOverAd)?e:void 0;return function(t){if(!t)return"play-none";switch(t.toLowerCase()){case"play-all":return"play-all";case"play-none":default:return"play-none";case"play-last":return"play-last"}}(s)}(i),h=new Ntt(s,t),o=new Btt(e,i),a=new fit(t,h,n,r),u=new kit(t.Dx),c=new Rit,d=new Lit(a,c,h);return new att(t,h,o,a,d,u,c)}};Na(function(t){return class extends t{gbi(t){super.Ta(t)}mbi(t,i){return super.drt(t,i)}Vbi(t){super.Xx(t)}Yx(){var t;return null!=(t=this._Si.lt)?t:super.Yx()}Zx(){var t;return null!=(t=this._Si.Jx)?t:super.Zx()}Xx(t,i){this._Si.Xx(t)}Ta(t){this._Si.Ta(t)}drt(t,i){return this._Si.drt(t,i)}xa(){const t=this._Si.Ca;return Gi(super.xa(),{get uplynk(){return t}})}kn(){this._Si.kn(),super.kn()}constructor(t,i){super(t,i),this._Si=void 0,this._Si=(new Oit).vSi(this,i)}}},Oa.Ant),r(),r(),r(),r();var Eu=function(t){return t.CREATIVE_VIEW="creativeView",t.START="start",t.FIRST_QUARTILE="firstQuartile",t.MID_POINT="midpoint",t.THIRD_QUARTILE="thirdQuartile",t.COMPLETE="complete",t.MUTE="mute",t.UNMUTE="unmute",t.PAUSE="pause",t.REWIND="rewind",t.RESUME="resume",t.FULL_SCREEN="fullscreen",t.EXIT_FULL_SCREEN="exitFullscreen",t.EXPAND="expand",t.COLLAPSE="collapse",t.ACCEPT_INVITATION_LINEAR="acceptInvitationLinear",t.ACCEPT_INVITATION="acceptInvitation",t.CLOSE_LINEAR="closeLinear",t.CLOSE="close",t.SKIP="skip",t.SKIP_SHOWN="skipShown",t.PROGRESS="progress",t.ENGAGED_VIEW="engagedView",t.IMPRESSION="impression",t.ERROR="error",t}({});r();var Fit=class extends gn{xa(){return La(this)}get u$t(){return we.g1t}get CO(){return this.HO}get aYt(){return this.XYt}constructor(t,i,e,s){super(t,i),this.XYt=void 0,this.HO=void 0,this.XYt=s,this.HO=e}};r();var Uit=class extends tn{get JOt(){return this.gSi}get u$t(){return we.g1t}constructor(t,i,e){if(super(i),this.gSi=void 0,this.k4t=t,this.E4t=t,e){const t=new Date(e);Qf(t)&&(this.gSi=t)}}},Vit=class{HI(){this.oa.wn(Jr.PM,this.NL),this.oa.wn(d.jw,this.xBt),this.oa.wn(d.uo,this.sjt),this.oa.wn(d.$w,this.Je),this.oa.wn(d.Nw,this.Eh),this.oa.wn(d.py,this.bd),this.oa.wn(d.wy,this.n3t),this.oa.wn(oc.MODE_CHANGE,this.pSi)}UI(){this.oa.mn(Jr.PM,this.NL),this.oa.mn(d.jw,this.xBt),this.oa.mn(d.uo,this.sjt),this.oa.mn(d.$w,this.Je),this.oa.mn(d.Nw,this.Eh),this.oa.mn(d.py,this.bd),this.oa.mn(d.wy,this.n3t),this.oa.mn(oc.MODE_CHANGE,this.pSi)}get mSi(){return this.wSi}get Lnt(){const t=this.mSi;if(!t)return[];const i=[],e=this.ySi();for(const s of t.Jc)e>=s.CO&&this.tMt<=s.CO+s.ct&&i.push(s);return i}ySi(){return this.oa.Gx()-this.bSi}ASi(){if(this.SSi)return;if(this.oa.Nd()!==1/0)return void(0===this.TSi.length&&(this.SSi=this.kSi()));const t=()=>{var t;null==(t=this.ESi)||t.zg(),this.ESi=void 0,this.SSi=void 0};this.ESi=new Zc,this.SSi=this.xSi(this.ESi.Yg).catch(this.u8).then(t,t)}async PSi(){const t=_.min(1e3*2**this.ISi,3e4);try{var i;await Ze(t,null==(i=this.ESi)?void 0:i.Yg),this.ISi++}catch(t){if(Ce(t))return void(this.ISi=0)}this.ASi()}async xSi(t){for(;fr(t),!this.oa.lP;){const i=zd.Mg()-this.CSi;if(i>1e4)await this.kSi(t),this.CSi=zd.Mg(),this.ISi=0;else{const e=1e4-i;await Ze(e,t)}}}RSi(t){const i=t.JOt;if(i&&this.oa.Vx&&0===this.bSi&&!this.DSi&&0!==_.floor(this.oa.EP().start(0))){const e=(this.oa.Vx.getTime()-i.getTime())/1e3,s=this.oa.Gx()-t.qOt;this.bSi=s-e}}async kSi(t){try{const i=await this.oa.Dx.vk({Yu:this.NSi}),e=await i.VT(t);if(0===e.avails.length)return void(0!==this.TSi.length&&(this.TSi=[]));if(e.avails.length===this.TSi.length&&e.avails[0].startTimeInSeconds===this.TSi[0].qOt)return void this.RSi(this.TSi[0]);const s=[];for(const t of e.avails){const i=new Uit(t.durationInSeconds,t.startTimeInSeconds,t.availProgramDateTime);for(const e of t.ads){const t=new Fit(i,Hs.BZt,e.startTimeInSeconds,e.trackingEvents);t.O4t(e.adId,e.width,e.height,e.durationInSeconds,[],e.skipoffset),i.C4t(t)}s.push(i),this.RSi(i)}this.TSi=Xn(s,(t,i)=>t.qOt-i.qOt)}catch(t){throw sa(t),new m("Failed to poll MediaTailor tracking events")}}BSi(){var t;null==(t=this.ESi)||t.Zg(),this.ESi=void 0,this.SSi=void 0,this.CSi=-1/0}MSi(){if(0===this.TSi.length)return;const t=this.TSi[this.TSi.length-1],i=this.ySi();if(t.qOt+t.G0tthis.tMt)){var s;if(this.mSi===t)return;return this.wSi=t,void(null==(s=this.oa.Jc)||s.So(new Ta(this.wSi)))}}var n;if(this.wSi)null==(n=this.oa.Jc)||n.So(new Za(this.wSi)),this.wSi=void 0}}LSi(){const t=this.Lnt;if(0===t.length)return;let i=[];for(const e of t){const t=e.aYt.filter(t=>Ct(this.OSi,t.eventType));i=i.concat(t)}for(const t of i)this.FSi(t.startTimeInSeconds)&&(t.eventType===Eu.COMPLETE&&this.USi(Eu.ENGAGED_VIEW),this.VSi(t))}HSi(t,i){return i.aYt.filter(i=>Jh(i.eventType,t))[0]}USi(t){const i=this.Lnt;if(0===i.length)return;const e=this.HSi(t,i[0]);e&&this.VSi(e)}VSi(t){this.Dpi(t.eventType);for(const i of t.beaconUrls){const t={Hk:Qe.GET,Yu:i,XT:"",fk:Bi.BT};0,Wr(this.WSi(t))}}Dpi(t){let i;const e=this.Lnt;switch(t){case Eu.START:i=new nc(e[e.length-1],this.oa.Gx());break;case Eu.COMPLETE:i=new fc(e[0],this.oa.Gx());break;case Eu.FIRST_QUARTILE:i=new ie(e[0],this.oa.Gx());break;case Eu.MID_POINT:i=new xe(e[0],this.oa.Gx());break;case Eu.THIRD_QUARTILE:i=new Qs(e[0],this.oa.Gx())}var s;void 0!==i&&(null==(s=this.oa.Jc)||s.So(i))}async WSi(t){const i=await this.oa.Dx.vk(t);i.dk}FSi(t){const i=this.ySi();return t>=this.tMt&&t{this.ASi()},this.sjt=()=>{this.USi(Eu.RESUME)},this.xBt=()=>{this.BSi(),this.USi(Eu.PAUSE)},this.Je=()=>{this.BSi(),this.tMt=-1},this.Eh=()=>{this.BSi()},this.bd=()=>{-1===this.tMt&&(this.tMt=this.ySi()),this.MSi(),this.LSi(),this.tMt=this.ySi()},this.n3t=()=>{if(this.Ayi!==this.oa.oP){this.Ayi=this.oa.oP;const t=this.Ayi?Eu.MUTE:Eu.UNMUTE;this.USi(t)}},this.pSi=()=>{if(this.SK!==this.oa.ds()){this.SK=this.oa.ds();const t=this.SK?Eu.FULL_SCREEN:Eu.EXIT_FULL_SCREEN;this.USi(t)}},this.u8=t=>{Ce(t)||(this.USi(Eu.ERROR),Wr(this.PSi()))},this.OSi=[Eu.START,Eu.FIRST_QUARTILE,Eu.MID_POINT,Eu.THIRD_QUARTILE,Eu.COMPLETE,Eu.IMPRESSION,Eu.CREATIVE_VIEW],this.oa=t,this.NSi=i,this.DSi=e,this.HI()}};Na(function(t){return class extends t{Ta(t){return this.qSi&&(this.qSi.kn(),this.qSi=void 0,this.OEt()),super.Ta(t)}async drt(t,i){if(!t||!function(t){return t.sources.some(t=>t.integration===uk.MEDIATAILOR)}(t))return super.drt(t,i);try{const e=await this.zSi(t,i);this.GSi=new w3(this),await super.drt(e,i)}catch(t){this.Qq(new as(me.MANIFEST_LOAD_ERROR,t.message,t))}}gP(t){var i;(null==(i=this.GSi)?void 0:i.inAdBreak)||super.gP(t)}Xx(t,i){var e;(null==(e=this.qSi)?void 0:e.mSi)||super.Xx(t,i)}Yx(){var t;return null!=(t=this.nq)?t:super.Yx()}Zx(){var t;return null!=(t=this.rq)?t:super.Zx()}Qq(t){this.nq=ar(t),this.rq=t,this.So(new el(t))}OEt(){this.nq=void 0,this.rq=void 0}async zSi(t,i){const e=[];for(const s of t.sources){if(!yk(s)){e.push(s);continue}const t=s;if(!t.src){e.push(s);continue}const n=await this.XSi(t,i);fr(i);const r=Y({},t,{integration:void 0,src:n});e.push(r)}const s=ru(t);return s.sources=e,s}async XSi(t,i){const e=t.src||"",s=e.match(/.+?(?=\/v1\/)/);if(!s)throw new m("Could not find MediaTailor session initialization url");const n=s[0],r=nl(e,"?ads."),h=r?{Yu:e,fk:Bi.BT}:{Yu:e,Hk:Qe.POST,XT:JSON.stringify({adsParams:t.adsParams}),fk:Bi.BT},o=await ws(()=>this.jSi(h,i),i);let a;try{if(a=n+o.manifestUrl,!r){const t=n+o.trackingUrl,i=function(t){return!!t&&/\bmpd\b/i.test(t)}(a);this.qSi=new Vit(this,t,i)}}catch(t){throw new m("Something went wrong parsing the MediaTailor session initialization response")}return a}async jSi(t,i){try{const e=await this.Dx.vk(t);return await e.VT(i)}catch(t){throw sa(t),new m("Failed to initialize MediaTailor session manifest")}}kn(){var t;this.qSi&&(this.qSi.kn(),this.qSi=void 0),this.OEt(),null==(t=this.GSi)||t.destroy(),this.GSi=void 0,super.kn()}constructor(t,i){super(t,i),this.qSi=void 0,this.nq=void 0,this.rq=void 0,this.GSi=void 0}}},Oa.Snt),r(),r(),r(),r(),r();var pu=function(t){return t[t.QSi=0]="QSi",t[t.PM=1]="PM",t[t.Yz=2]="Yz",t[t.KSi=3]="KSi",t[t.YSi=4]="YSi",t[t.JSi=5]="JSi",t[t.ma=6]="ma",t}({});r();var Hit=class extends Ne{get YI(){}get Rt(){return this.We}set Rt(t){this.SO(t)}get Ca(){var t;return null!=(t=this.hu)?t:this.hu=cs(this)}get o(){return String(this.vu.componentTag)||"hbbtvaudiotrack"}get Lt(){return this.I5}get Th(){return this.bO}get bs(){return""}get Qk(){return this.Rt?"enabled":"disabled"}set Qk(t){this.SO("enabled"===t)}get $I(){return this._O}get tC(){}set tC(t){}get JI(){return this.yO}SO(t){this.We=t,t?this.CMt.ZSi(this.vu):this.CMt.$Si(this.vu)}constructor(t,i,e,s,n=!1){super(),this.yO=mi(),this._O=new iE,this.vu=void 0,this.bO=void 0,this.I5=void 0,this.hu=void 0,this.CMt=void 0,this.We=void 0,this.vu=t,this.bO=i,this.I5=e,this.We=n,this.CMt=s}};r(),r(),r();var Wit=function(t){return t.qm="urn:dvb:casystemid:19219",t.zm="urn:dvb:casystemid:19156",t}({}),qit=function(t){return t.qm="application/vnd.ms-playready.initiator+xml",t.zm="application/widevine+xml",t}({});function zit(t,i,e){switch(t){case"urn:dvb:casystemid:19219":return function(t){return''+(null!=t?t:"")+""}(i);case"urn:dvb:casystemid:19156":if(!e)throw new m("Content URL is needed for Widevine license request");return function(t,i){return''+Q0(null!=i?i:"")+""+Q0(null!=t?t:"")+""}(i,e);default:throw new m("DRM key system is not supported")}}var Git=class extends CL{tTi(t){this.iTi(),this.Tu=t}async eTi(t){if(!t.fq.length)return void this.iTi();if(!this.Tu)throw new m("The OIPF DRM agent has to be attached to the DOM");let i;this.sTi||(this.sTi=h.createElement("object"),this.sTi.type="application/oipfDrmAgent",this.Tu.appendChild(this.sTi),this.sTi.onDRMMessageResult=this.nTi,this.sTi.onDRMRightsError=this.rTi,this.hTi=h.createElement("object"),this.hTi.type="application/oipfCapabilities",this.Tu.appendChild(this.hTi));for(const e of t.fq){let s,n,r;if(e.xS===Jg)s=Wit.qm,n=qit.qm,r=zit(Wit.qm,e.FW);else{if(e.xS!==ot)continue;s=Wit.zm,n=qit.zm,r=zit(Wit.zm,e.FW,t.rC)}try{return await this.Bet(n,r,s),void this.So(new nt)}catch(t){i=t}}i&&this.So(new AL(i))}zg(){return this.oTi=void 0,this.Tu=void 0,super.zg()}Bet(t,i,e){var s,n;return this.oTi=new Ga,this.aTi=null==(n=this.sTi)||null==(s=n.sendDRMMessage)?void 0:s.call(n,t,i,e),this.aTi||null==this.oTi.Ky||this.oTi.Ky.call(this.oTi,new fs(me.CONTENT_PROTECTION_INTERNAL_ERROR,"No DRM message returned by OIPF DRM agent")),this.oTi.Yy}uTi(t){switch(t){case 5:return me.CONTENT_PROTECTION_NOT_SUPPORTED;case 2:case 1:case 3:case 4:case 6:return me.CONTENT_PROTECTION_INTERNAL_ERROR;default:return me.CONTENT_PROTECTION_ERROR}}cTi(t){switch(t){case 2:return"The DRM agent was unable to complete the request";case 3:return"The specified MIME type is unknown for the specified DRM system";case 4:return"User consent is needed for that action";case 5:return"The specified DRM System is unknown";case 6:return"The license message has the wrong format";default:return"Unspecified error occurred"}}dTi(t){return 0===t?me.CONTENT_PROTECTION_LICENSE_ERROR:1===t?me.CONTENT_PROTECTION_LICENSE_INVALID:me.CONTENT_PROTECTION_ERROR}lTi(t){switch(t){case 0:return"No license, consumption of the content is blocked";case 1:return"Invalid license, consumption of the content is blocked";case 2:return"Valid license, consumption of the content is unblocked";default:return"Unknown error occurred"}}iTi(){this.sTi&&(Ao(this.sTi),this.sTi=void 0),this.hTi&&(Ao(this.hTi),this.hTi=void 0)}async I8(t,i,e){}constructor(...t){super(...t),this.sTi=void 0,this.hTi=void 0,this.Tu=void 0,this.aTi=void 0,this.oTi=void 0,this.nTi=(t,i,e)=>{var s,n,r,h;if(0===e)return void(null==(h=this.oTi)||null==(r=h.Qy)||r.call(h,t));const o=this.uTi(e),a=this.cTi(e),u=new fs(o,a);null==(n=this.oTi)||null==(s=n.Ky)||s.call(n,u)},this.rTi=(t,i,e,s)=>{const n=this.dTi(t),r=this.lTi(t),h=new fs(n,r);this.So(new AL(h))}}};r();var Xit=class{get kP(){return Uo.nL(0,this.PL.ct)}get wP(){return Dn.pz}set wP(t){}get Cd(){return this.ZS}IZ(t){return!1}RZ(t){return yh.resolve(void 0)}async eTi(t){await this.DZ.eTi(this.ZS)}zg(){return yh.resolve(void 0)}constructor(t,i,e){this.ZS=void 0,this.PL=void 0,this.DZ=void 0,this.ZS=t,this.PL=i,this.DZ=e}},jit=class extends Ne{get Fx(){return Uo.rL()}get Vx(){}get uq(){}get Wu(){return this.sc}get kP(){var t,i;return null!=(i=null==(t=this.aq)?void 0:t.kP)?i:Uo.rL()}get xP(){return this.Pz}get _5(){return!1}get sP(){return!1}get ML(){return Y({},DN)}get lt(){return this.nq}get d5(){return!1}get Ma(){return this.ha}get j7(){return!0}get n5(){return!1}get WP(){return!0}set WP(t){}get Ql(){return this.Oz}get nt(){return this.Y9}get a9(){return this.kz}get Sq(){return this.ea}Y7(t){this.DZ.tTi(t),this.bet.Y7(t)}$Z(t){for(const i of t)if(i.Km===O.AV)return i}V9(t){return Promise.resolve({H9:!1})}async Un(t){if(this.aq)throw new m("Already loaded a media source");if(t.Km===O.AV)return this.aq=new Xit(t,this,this.DZ),await this.aq.eTi(t),this.aq;throw new m("Unsupported media source configuration for HbbTV")}async fTi(t){await this.vTi()}async QP(){await this.vTi()}$W(t){}async hr(){this.aq=void 0,this._Ti=void 0}async F8(){throw new g("Not supported")}async zg(){await this.hr(),this.Gl.kn(),this.Y9.kn(),this.bet.kn(),this.Aet.kn(),this.DZ.mn(Su,this.Rs),await this.DZ.zg()}be(){this.kz=!0,this.bet.be()}we(){this.kz=!1,this.bet.we()}wq(){return!1}bq(t,i,e,s,n){throw new m("Adding native sideloaded text tracks is not supported on HbbTV")}G7(){}X7(){}K7(){}hP(){return{rO:0,hO:0,oO:0}}$P(){}Tq(t){throw new m("Adding custom text tracks is not supported on HbbTV")}zP(){}sI(t,i,e,s,n,r,h,o,a){const u=new Ji(t,i,e,s,n,r,h,a,o);return this.Gl.tt(u),this.J9.tt(u),u}Eq(){for(const t of this.Gl.NI.slice())t.kn();this.Gl.hr()}rV(t){this.Gl.it(t),this.J9.it(t)}gTi(){const t=h.getElementsByTagName("object");for(let i=0;i{var t,i,e,s;(null==(t=this.mTi)?void 0:t.playState)&&((null==(i=this._Ti)?void 0:i.Yy)||2!==this.mTi.playState||this.vTi().catch(gs),3===this.mTi.playState&&(null==(s=this._Ti)||null==(e=s.Qy)||e.call(s,String(this.mTi.playState)),this._Ti=void 0))},this.DZ=new Git(this),this.DZ.wn(Su,this.Rs),this.Y9=new Tu([this.Gl]),this.J9=new gL(this),this.bet=new ma,this.Aet=new _a(this.bet.xe,this.Wu,this.nt,this.Ql,this.Ma,this.Sq),this.mTi=this.gTi(),this.vTi().catch(gs)}},Qit=class extends jit{get hq(){}get ht(){return this.tO}get rt(){return this.sO}get vP(){return this.Rz}set vP(t){this.Rz=t,this.lP||this.wTi.play(t)}get oP(){return this.wTi.muted}set oP(t){this.wTi.muted=t}get OP(){var t,i;return(null!=(i=null!=(t=this.wTi.volume)?t:null==this.wTi.getVolume?void 0:this.wTi.getVolume.call(this.wTi))?i:100)/100}set OP(t){null==this.wTi.setVolume||this.wTi.setVolume.call(this.wTi,100*t)}get zx(){return this.wTi.playPosition?this.wTi.playPosition/1e3:0}get ct(){return!this.wTi.playTime||this.wTi.playTime<0?1/0:this.wTi.playTime/1e3}get Qx(){return this.wTi.playState===pu.JSi}get Mi(){return this.wTi.offsetHeight*zd.Zs.fp}get Ti(){return this.wTi.offsetWidth*zd.Zs.fp}get lP(){return this.wTi.playState===pu.Yz}get pP(){return Uo.rL()}get AP(){return this.o5}get DP(){return 0}get MP(){return 0}Y7(t){super.Y7(t),t.appendChild(this.wTi)}async Un(t){if(t.Km===O.AV){const i=await super.Un(t);return await this.fTi(t),this.wTi.onPlayStateChange=this.yTi,i}throw new m("Unsupported media source configuration for HbbTV")}async fTi(t){this.wTi.type=qu(t.rC),this.wTi.data=t.rC,await super.fTi(t)}async QP(){await super.QP(),this.wTi.play(this.Rz),this.So(new vt(this.zx))}jP(){this.wTi.play(0),this.So(new Si(this.zx))}Oy(t,i,e){this.wTi.seek(1e3*t),this.Pz=!0,this.So(new ji(this.zx))}async hr(){void 0!==this.aq&&this.wTi.stop(),this.bTi&&(zd.vm(this.bTi),this.bTi=void 0),await super.hr(),no(this.wTi),this.wTi.data&&this.wTi.removeAttribute("data"),this.tO.hr(),this.sO.hr()}async zg(){await super.zg(),Ao(this.wTi)}be(){super.be(),this.wTi.style.display="block"}we(){super.we(),this.wTi.style.display="none"}ZSi(t){const i=this.ATi(t);if(!i)throw new m("Selected track does not exist on HbbTV");null==this.wTi.selectComponent||this.wTi.selectComponent.call(this.wTi,i)}$Si(t){const i=this.ATi(t);if(!i)throw new m("Selected track does not exist on HbbTV");null==this.wTi.unselectComponent||this.wTi.unselectComponent.call(this.wTi,i)}ATi(t){var i;const e=null!=(i=null==this.wTi.getComponents?void 0:this.wTi.getComponents.call(this.wTi,t.type))?i:this.STi();return this.TTi(e,t)}kTi(t){var i;const e=null!=(i=null==this.wTi.getCurrentActiveComponents?void 0:this.wTi.getCurrentActiveComponents.call(this.wTi,1))?i:this.STi();this.tO.hr();for(let i=0;i{}}}ETi(t,i){return void 0!==this.TTi(t,i)}TTi(t,i){for(let e=0;e{if(!this.wTi.playState)return;this.RV=this.o5,this.CTi=this.RTi,this.RTi=this.wTi.playState;const t=this.ct;switch(t!==this.DTi&&(this.So(new zr(t)),this.DTi=t),this.bTi&&this.RTi!==pu.PM&&(zd.vm(this.bTi),this.bTi=void 0),this.RTi){case pu.KSi:this.o5=Lr.zL;break;case pu.YSi:if(this.CTi===pu.KSi){var i;const t=null!=(i=null==this.wTi.getComponents?void 0:this.wTi.getComponents.call(this.wTi,1))?i:this.STi();var e;const s=null!=(e=null==this.wTi.getComponents?void 0:this.wTi.getComponents.call(this.wTi,0))?e:this.STi();if(0===t.length&&0===s.length)break;this.kTi(t),this.xTi(s)}this.o5=Lr.Qn;break;case pu.PM:this.Pz&&(this.Pz=!1,this.So(new Yr(this.zx))),this.So(new mo(this.zx)),this.o5=Lr.XL,this.bTi=zd.fm(this.NTi,250);break;case pu.ma:this.o5=Lr.zL,this.So(new uM(new mu(this.ITi(this.wTi.error))));break;case pu.JSi:this.So(new ur(this.zx));case pu.Yz:case pu.QSi:}this.o5!==this.RV&&this.So(new Ka(this.zx,this.o5))},this.NTi=()=>{this.So(new B(this.zx,void 0))}}};r();var Kit=class extends jit{get hq(){return this.pT}get ht(){return this.tO}get rt(){return this.sO}get vP(){return this.pT.playbackRate}set vP(t){this.pT.playbackRate=t}get oP(){return this.pT.muted}set oP(t){this.pT.muted=t}get OP(){return this.pT.volume}set OP(t){this.pT.volume=t}get zx(){return this.pT.currentTime}get ct(){return this.pT.duration}get Qx(){return this.pT.ended}get Mi(){return this.pT.offsetHeight*zd.Zs.fp}get Ti(){return this.pT.offsetWidth*zd.Zs.fp}get lP(){return this.pT.paused}get pP(){return Uo.jn(this.pT.played)}get AP(){return this.e9.AP}get DP(){return this.pT.videoHeight}get MP(){return this.pT.videoWidth}Y7(t){super.Y7(t),t.appendChild(this.pT)}async Un(t){if(t.Km===O.AV){const i=await super.Un(t);return await this.fTi(t),i}throw new m("Unsupported media source configuration for HbbTV")}async fTi(t){switch(t._q){case Fa.lC:case Fa.fC:this.pT.setAttribute("crossorigin",t._q);break;case Fa.Fk:default:this.pT.removeAttribute("crossorigin")}void 0!==t.wP?this.pT.preload=t.wP:this.pT.preload=Dn.PW,void 0!==t.gq?this.pT.title=t.gq:Ol(this.pT);const i=this.vP;this.pT.src=t.rC,this.vP=i,await super.fTi(t)}async QP(){await super.QP(),await this.pT.play()}jP(){this.pT.pause()}Oy(t,i,e){i&&this.pT.fastSeek&&!zd.Zs.Dp?this.pT.fastSeek(t):this.pT.currentTime=t,this.Pz=!0,this.So(new ji(this.zx))}async hr(){await super.hr(),no(this.pT),this.pT.src&&this.pT.removeAttribute("src"),this.tO.hr(),this.sO.hr()}async zg(){await super.zg(),this.p9.zg(),this.e9.zg(),this.T7(),this.Iq(),Ao(this.pT)}be(){super.be(),this.pT.style.display="block",this.pT.style.height="100%",this.pT.style.width="100%"}we(){super.we(),this.pT.style.display="none"}b7(){this.hq.addEventListener("play",this.HV),this.hq.addEventListener("pause",this.WV),this.hq.addEventListener("timeupdate",this.Nc),this.hq.addEventListener("progress",this.BTi),this.hq.addEventListener("loadstart",this.As),this.hq.addEventListener("ended",this.Ec),this.hq.addEventListener("ratechange",this.MTi),this.hq.addEventListener("volumechange",this.hjt),this.hq.addEventListener("durationchange",this.ejt),this.hq.addEventListener("loadedmetadata",this.LTi),this.hq.addEventListener("emptied",this.OTi),this.hq.addEventListener("seeked",this.FTi),this.hq.addEventListener("seeking",this.UTi),this.hq.addEventListener("error",this.VTi),Vc()&&this.hq.addEventListener("encrypted",this.U8)}T7(){this.hq.removeEventListener("play",this.HV),this.hq.removeEventListener("pause",this.WV),this.hq.removeEventListener("timeupdate",this.Nc),this.hq.removeEventListener("progress",this.BTi),this.hq.removeEventListener("loadstart",this.As),this.hq.removeEventListener("ended",this.Ec),this.hq.removeEventListener("ratechange",this.MTi),this.hq.removeEventListener("volumechange",this.hjt),this.hq.removeEventListener("durationchange",this.ejt),this.hq.removeEventListener("loadedmetadata",this.LTi),this.hq.removeEventListener("emptied",this.OTi),this.hq.removeEventListener("seeked",this.FTi),this.hq.removeEventListener("seeking",this.UTi),this.hq.removeEventListener("error",this.VTi),this.hq.removeEventListener("encrypted",this.U8)}Qq(t){this.nq=t,this.So(new uM(this.nq))}Hq(){const t=this.pT.audioTracks,i=this.pT.videoTracks;t&&(t.addEventListener("addtrack",this.HTi),t.addEventListener("removetrack",this.WTi),t.addEventListener("change",this.qTi)),i&&(i.addEventListener("addtrack",this.zTi),i.addEventListener("removetrack",this.GTi),i.addEventListener("change",this.XTi))}Iq(){const t=this.pT.audioTracks,i=this.pT.videoTracks;t&&(t.removeEventListener("addtrack",this.HTi),t.removeEventListener("removetrack",this.WTi),t.removeEventListener("change",this.qTi)),i&&(i.removeEventListener("addtrack",this.zTi),i.removeEventListener("removetrack",this.GTi),i.removeEventListener("change",this.XTi))}dh(t){for(let i=0;i{this.So(new vt(this.zx))},this.WV=()=>{this.So(new Si(this.zx))},this.Nc=()=>{const t=this.zx,i=this.xP,e=void 0!==this.jTi,s=e&&this.jTi!==t;(i||!e||s)&&(this.So(new B(t,void 0)),this.jTi=t)},this.BTi=()=>{this.So(new Et(this.zx))},this.As=()=>{this.So(new ke)},this.Ec=()=>{this.So(new ur(this.zx))},this.MTi=()=>{this.So(new Ik(this.zx,this.vP))},this.hjt=()=>{this.So(new Wi(this.zx,this.OP))},this.ejt=()=>{this.So(new zr(this.ct))},this.LTi=()=>{},this.OTi=()=>{},this.FTi=()=>{this.Pz&&(this.Pz=!1),this.So(new Yr(this.zx))},this.UTi=()=>{this.So(new ji(this.zx))},this.qV=t=>{this.RV!==t.readyState&&(this.RV=t.readyState,this.So(t))},this.VV=()=>{this.So(new mo(this.zx))},this.VTi=()=>{if(null!==this.pT.error){const i=this.pT.error;var t;this.Qq(new mu(null!=(t=i.code)?t:Mi.DECODE,i.message||"Error decoding media",void 0,i.msExtendedCode))}},this.U8=t=>{this.So(new Sp(t.initDataType,t.initData||new ArrayBuffer(0)))},this.zTi=t=>{const i=this.pT.videoTracks;if(i)for(let t=0;t{const i=[],e=this.pT.videoTracks;if(e){for(const t of this.sO.NI)dC(e,t.AO)||i.push(t);for(const t of i)this.sO.it(t)}},this.XTi=t=>{this.dh(this.sO)},this.HTi=t=>{const i=this.pT.audioTracks;if(i)for(let t=0;t{const i=[],e=this.pT.audioTracks;if(e){for(const t of this.tO.NI)dC(e,t.AO)||i.push(t);for(const t of i)this.tO.it(t)}},this.qTi=t=>{this.dh(this.tO)},this.e9=new DL(this),this.e9.wn(Jr.AI,this.qV),this.e9.H8(new Ou(this)),this.p9=new aM(this),this.p9.wn(Jr.PM,this.VV),this.b7(),this.Hq()}},Yit=[d.uo,d.jw,Jr.PM,d.$w,d.Zw,d.Nw,d.Cw,d.xw,d.Ew,d.py,d.Qw,d.Ww,d.Kw,d.wy,d.Jw,d.Lw,d.Bw],Jit=class extends Ne{get ht(){return this.PL.ht}get Fx(){return this.PL.Fx._s()}get OL(){}get Vx(){return this.PL.Vx}set Vx(t){t&&this.PL.$W(t)}get bt(){return this.Ac}get zx(){return this.PL.zx}set zx(t){this.PL.Oy(t)}get dq(){return this.lq}get ct(){return this.PL.ct}get Qx(){return this.PL.Qx}get Jx(){return this.rq}get lt(){return this.nq}get $x(){}get iP(){}get sP(){return!1}get WP(){return this.PL.WP}set WP(t){this.PL.WP=t}get VP(){return this.Lz}get rP(){return Y({},{rO:0,hO:0,oO:0,aO:0,uO:0,cO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.PL.hP())}get oP(){return this.PL.oP}set oP(t){this.PL.oP=t}get cP(){return!0}get lP(){return this.PL.lP}get vP(){return this.PL.vP}set vP(t){this.PL.vP=t}get pP(){return this.PL.pP._s()}get wP(){return this.oq}set wP(t){this.oq=t,this.aq&&(this.aq.wP=t)}get AP(){return this.PL.AP}get kP(){return this.PL.kP._s()}get xP(){return this.PL.xP}get uq(){return this.PL.uq}get nt(){return this.Gl}get DP(){return this.PL.DP}get rt(){return this.PL.rt}get MP(){return this.PL.MP}get OP(){return this.PL.OP}set OP(t){this.PL.OP=t}sI(t){return this.PL.Tq(t)}YP(){return!1}qP(){return this.PL.Ma}zP(){}we(){this.PL.we()}$P(){this.PL.$P()}jP(){this.PL.jP()}async QP(){await this.PL.QP()}tI(){throw new m("Recreate media source is not supported on HbbTV")}Xx(t,i){this.PL.Oy(t)}async Ta(t,i,e){var s;fr(e),this.Ac=t;const n={Km:O.AV,rC:t.src,GT:t.type,fq:this.vq(t),wP:this.oq,_q:t.crossOrigin,gq:null==(s=i.metadata)?void 0:s.title};this.aq=await this.PL.Un(n),i.textTracks&&this.mq(i.textTracks),AP(this.nt)}IP(t,i,e,s){return Promise.resolve()}CP(){return Promise.resolve()}be(){this.PL.be()}JP(){}ZP(){}Aa(){return this.PL.Sq}async hr(){this.Ac=void 0,this.nq=void 0,this.rq=void 0,this.aq=void 0,await this.Aq.hr(),this.PL.Eq(),await this.PL.hr()}async kn(){await this.hr(),this.xq.kn(),this.Cq.zg(),this.PL.mn(Yit,this.Rs),this.PL.mn(hc.ma,this.Oq),await this.PL.zg(),this.gn.kn(),this.Gl.kn(),await this.Aq.kn()}Qq(t,i){this.nq||(this.nq=i,this.rq=t,this.So(new el(t)))}mq(t){for(const i of t)void 0!==i.src&&this.Aq.hV(i)}vq(t){if(!t.contentProtection)return[];const i=[];return t.contentProtection.widevine&&i.push({xS:ot,FW:t.contentProtection.widevine.licenseAcquisitionURL,Vq:[]}),t.contentProtection.playready&&i.push({xS:Jg,FW:t.contentProtection.playready.licenseAcquisitionURL,Vq:[]}),this.QTi(i,t.contentProtection.preferredKeySystems)}QTi(t,i){if(void 0===i||0===i.length)return t;const e=t=>{const e=i.indexOf(t.xS.$m);return e>=0?e:i.length};return Xn(t,(t,i)=>e(t)-e(i))}constructor(t,i,e,s){super(),this.gn=void 0,this.PL=void 0,this.aq=void 0,this.Gl=void 0,this.lq=new hu,this.Lz=void 0,this.Cq=void 0,this.xq=void 0,this.Aq=void 0,this.Ac=void 0,this.nq=void 0,this.rq=void 0,this.oq=Dn.pz,this.Oq=t=>{const i=t.lt,e=i.code,s=new as(tE(e),"Something went wrong during HbbTV playback.",i),n=ar(s);this.Qq(s,n)},this.gn=new bD(t),this.gn._n(),this.PL=Sf()?new Kit(h.createElement(at.Mk),this.gn,s):new Qit(h.createElement("object"),this.gn,s),this.PL.Y7(t),this.PL.wn(Yit,this.Rs),this.PL.wn(hc.ma,this.Oq),this.Cq=new Gt(this,this.PL),this.xq=new _s(this.Cq,!0),this.xq.wn(Ii,this.Rs),this.Aq=new eu(this.PL,i),this.Gl=new Tu([this.PL.nt,this.Aq.Z]),this.Lz=e}};oe(new class{DC(t,i,e,s,n,r,h,o){return new Jit(t,e,r,h)}Jq(t,i){var e;return!(!zs.k_||t.type!==Hi.pC&&!tu(t.type)&&!gk(t.type))&&!(Sf()&&!(null==(e=t.contentProtection)?void 0:e.useOipfDrmAgent)&&(!t.contentProtection||Vc()))}async Zq(t){return!!await VT(t,!0)}$q(){return!1}constructor(){this.tz=$.mW}});export{Io as a,f as b,r as c,zs as d,it as e,hi as f,Mc as g,Q as h,Ao as i,Yd as j,El as k,Pl as l,Il as m,Rl as n,Go as o,Ol as p,Fl as q,zd as r,gs as s,to as t,Oc as u,Xn as v,No as w,hl as x,Nu as y,hh as z,_e as A,Ct as B,Wt as C,fr as D,Wr as E,uv as F,cv as G,bg as H,Y as I,nl as J,up as K,Ne as L,gp as M,d as N,me as O,L as P,SS as Q,Gi as R,Gr as S,TS as T,Th as U,bs as V,Zk as W,dc as X,VE as Y,xh as Z,us as _,tP as $,eP as aa,Lr as ba,SP as ca,Oa as da,Na as ea,zF as fa,Uo as ga,bk as ha,ho as ia,zr as ja,Yu as ka,Bk as la,Fk as ma,Bs as na,Co as oa,rR as pa,Os as qa,Qh as ra,cD as sa,pD as ta,bD as ua,AD as va,Ps as wa,TD as xa,oc as ya,PD as za,ID as Aa,DD as Ba,ke as Ca,hO as Da,oO as Ea,aO as Fa,cO as Ga,dO as Ha,lO as Ia,FO as Ja,UO as Ka,VO as La,HO as Ma,Nr as Na,LF as Oa,OF as Pa,jF as Qa,wU as Ra,yU as Sa,bU as Ta,AU as Ua,EU as Va,xU as Wa,PU as Xa,PH as Ya,IH as Za,YK as _a,we as $a,k2 as ab,t3 as bb,A8 as cb,n9 as db,C9 as eb,M9 as fb,Mtt as gb}; //# sourceMappingURL=THEOplayer.common.esm.js.map \ No newline at end of file diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.d.ts b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.d.ts index 582f54a8..54725035 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.d.ts +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.d.ts @@ -2,10 +2,10 @@ * THEOplayer * https://www.theoplayer.com * - * Version: 10.0.0 + * Version: 10.3.0 */ import { ChromelessPlayer, UIPlayerConfiguration, videojs, PresentationMode, UIRelatedContent } from './THEOplayer.common'; -export { ABRConfiguration, ABRMetadata, ABRStrategy, ABRStrategyConfiguration, ABRStrategyType, AES128KeySystemConfiguration, AccessibilityRole, Ad, AdBreak, AdBreakEvent, AdBreakInit, AdBreakInterstitial, AdBufferingEvent, AdDescription, AdEvent, AdInit, AdIntegrationKind, AdMetadataEvent, AdPreloadType, AdReadyState, AdSkipEvent, AdSource, AdSourceType, AdType, AddCachingTaskEvent, AddTrackEvent, AddViewEvent, Ads, AdsConfiguration, AdsEventMap, AdsManagerLoadedEvent, AgamaAnalyticsIntegrationID, AgamaConfiguration, AgamaLogLevelType, AgamaPlayerConfiguration, AgamaServiceName, AgamaSourceConfiguration, AgamaStreamType, AirPlay, AnalyticsDescription, AnalyticsIntegrationID, AudioQuality, AxinomDRMConfiguration, AxinomIntegrationID, AzureDRMConfiguration, AzureIntegrationID, Base64Util, BaseSource, Boundary, BoundaryC3, BoundaryC7, BoundaryHalftime, BoundaryInfo, BufferSource, BufferedSegments, Cache, CacheEventMap, CacheStatus, CacheTaskStatus, CachingTask, CachingTaskEventMap, CachingTaskLicense, CachingTaskList, CachingTaskListEventMap, CachingTaskParameters, CanPlayEvent, CanPlayThroughEvent, Canvas, Cast, CastConfiguration, CastEventMap, CastState, CastStateChangeEvent, CertificateRequest, CertificateResponse, ChannelDrmConfigResponse, Chromecast, ChromecastConfiguration, ChromecastConnectionCallback, ChromecastError, ChromecastErrorCode, ChromecastErrorEvent, ChromecastEventMap, ChromecastMetadataDescription, ChromecastMetadataImage, ChromecastMetadataType, ClearkeyDecryptionKey, ClearkeyKeySystemConfiguration, Clip, ClipEventMap, ClosedCaptionFile, ComcastDRMConfiguration, ComcastIntegrationID, CommonUtils, CompanionAd, ConaxDRMConfiguration, ConaxIntegrationID, ContentProtectionError, ContentProtectionErrorCode, ContentProtectionErrorEvent, ContentProtectionIntegration, ContentProtectionIntegrationFactory, ContentProtectionRequest, ContentProtectionRequestSubType, ContentProtectionResponse, CrossOriginSetting, CsaiAdDescription, CurrentSourceChangeEvent, CustomAdIntegrationKind, CustomTextTrackMap, CustomTextTrackOptions, CustomWebVTTTextTrack, DAIAvailabilityType, DRMConfiguration, DRMTodayDRMConfiguration, DRMTodayIntegrationID, DashPlaybackConfiguration, DateRangeCue, DeliveryType, DeviceBasedTitaniumDRMConfiguration, DimensionChangeEvent, DirectionChangeEvent, DistributionLoadStartEvent, DistributionOfflineEvent, DurationChangeEvent, EdgeStyle, EmptiedEvent, EmsgCue, EncryptedEvent, EndedEvent, Endpoint, EndpointLoadedEvent, EnterBadNetworkModeEvent, ErrorCategory, ErrorCode, ErrorEvent, Event, EventDispatcher, EventListener, EventMap, EventStreamCue, EventedList, ExitBadNetworkModeEvent, ExpressPlayDRMConfiguration, ExpressPlayIntegrationID, EzdrmDRMConfiguration, EzdrmIntegrationID, FairPlayKeySystemConfiguration, FreeWheelAdDescription, FreeWheelAdUnitType, FreeWheelCue, FullscreenOptions, Geo, GlobalCast, GlobalChromecast, GoogleDAI, GoogleDAIConfiguration, GoogleDAILiveConfiguration, GoogleDAISSAIIntegrationID, GoogleDAITypedSource, GoogleDAIVodConfiguration, GoogleImaAd, GoogleImaConfiguration, HTTPHeaders, HespApi, HespApiEventMap, HespMediaType, HespSourceConfiguration, HespTypedSource, HlsDiscontinuityAlignment, HlsPlaybackConfiguration, ID3AttachedPicture, ID3BaseFrame, ID3Comments, ID3CommercialFrame, ID3Cue, ID3Frame, ID3GenericEncapsulatedObject, ID3InvolvedPeopleList, ID3PositionSynchronisationFrame, ID3PrivateFrame, ID3SynchronizedLyricsText, ID3TermsOfUse, ID3Text, ID3UniqueFileIdentifier, ID3Unknown, ID3UnsynchronisedLyricsTextTranscription, ID3UrlLink, ID3UserDefinedText, ID3UserDefinedUrlLink, ID3Yospace, IMAAdDescription, IntentToFallbackEvent, InterceptableRequest, InterceptableResponse, Interstitial, InterstitialEvent, InterstitialType, IrdetoDRMConfiguration, IrdetoIntegrationID, JoinStrategy, KeyOSDRMConfiguration, KeyOSFairplayKeySystemConfiguration, KeyOSIntegrationID, KeyOSKeySystemConfiguration, KeySystemConfiguration, KeySystemId, Latencies, LatencyConfiguration, LatencyManager, LayoutChangeEvent, LicenseRequest, LicenseResponse, LicenseType, LinearAd, List, LoadedDataEvent, LoadedMetadataEvent, MaybeAsync, MeasurableNetworkEstimator, MediaError, MediaErrorCode, MediaFile, MediaMelonConfiguration, MediaTailorSource, MediaTrack, MediaTrackEventMap, MediaTrackList, MediaType, MetadataDescription, Metrics, Millicast, MillicastEventMap, MillicastMetadataCue, MillicastSource, MillicastStatsEvent, MoatAnalyticsIntegrationID, MoatConfiguration, MultiViewPlayer, MultiViewPlayerEventMap, MultiViewPlayerLayout, MutedAutoplayConfiguration, Network, NetworkEstimator, NetworkEstimatorController, NetworkEventMap, NetworkInterceptorController, NodeStyleVoidCallback, NonLinearAd, OverlayInterstitial, OverlayPosition, OverlaySize, PauseEvent, PiPConfiguration, PiPPosition, PlayEvent, PlayReadyKeySystemConfiguration, PlayStation5Configuration, PlayStation5PlayMode, PlayerConfiguration, PlayerEventMap, PlayerList, PlayingEvent, PreloadType, Presentation, PresentationEventMap, PresentationModeChangeEvent, ProgressEvent, Quality, QualityEvent, QualityEventMap, QualityList, RateChangeEvent, ReadyStateChangeEvent, RelatedChangeEvent, RelatedContent, RelatedContentEventMap, RelatedContentSource, RelatedHideEvent, RelatedShowEvent, RemoveCachingTaskEvent, RemoveTrackEvent, RemoveViewEvent, Representation, RepresentationChangeEvent, Request, RequestBody, RequestInit, RequestInterceptor, RequestLike, RequestMeasurer, RequestMethod, RequestSubType, RequestType, ResponseBody, ResponseInit, ResponseInterceptor, ResponseLike, ResponseType, RetryConfiguration, SSAIIntegrationId, SeamlessPeriodSwitchStrategy, SeamlessSwitchStrategy, SeekedEvent, SeekingEvent, ServerSideAdInsertionConfiguration, ServerSideAdIntegrationController, ServerSideAdIntegrationFactory, ServerSideAdIntegrationHandler, SkippedAdStrategy, SmartSightConfiguration, SmartSightIntegrationID, Source, SourceAbrConfiguration, SourceChangeEvent, SourceConfiguration, SourceDescription, SourceIntegrationId, SourceLatencyConfiguration, Sources, SpotXAdDescription, SpotxData, SpotxQueryParameter, StateChangeEvent, StereoChangeEvent, StreamOneAnalyticsIntegrationID, StreamOneConfiguration, StreamType, StringKeyOf, StylePropertyRecord, SupportedCustomTextTrackCueTypes, THEOplayerError, TTMLCue, TTMLExtent, TargetQualityChangedEvent, TextTrack, TextTrackAddCueEvent, TextTrackCue, TextTrackCueChangeEvent, TextTrackCueEnterEvent, TextTrackCueEventMap, TextTrackCueExitEvent, TextTrackCueList, TextTrackCueUpdateEvent, TextTrackDescription, TextTrackEnterCueEvent, TextTrackError, TextTrackErrorCode, TextTrackErrorEvent, TextTrackEventMap, TextTrackExitCueEvent, TextTrackReadyState, TextTrackReadyStateChangeEvent, TextTrackRemoveCueEvent, TextTrackStyle, TextTrackStyleEventMap, TextTrackType, TextTrackTypeChangeEvent, TextTrackUpdateCueEvent, TextTracksList, TheoAdDescription, TheoAds, TheoAdsEventsMap, TheoAdsLayout, TheoAdsLayoutOverride, TheoLiveApi, TheoLiveApiEventMap, TheoLiveConfiguration, TheoLivePublication, TheoLiveSource, ThumbnailResolution, TimeRanges, TimeUpdateEvent, TitaniumDRMConfiguration, TitaniumIntegrationID, TokenBasedTitaniumDRMConfiguration, Track, TrackChangeEvent, TrackEventMap, TrackList, TrackListEventMap, TrackUpdateEvent, TypedSource, UIConfiguration, UILanguage, UIRelatedContentEventMap, UniversalAdId, UpdateQualityEvent, Uplynk, UplynkAd, UplynkAdBeginEvent, UplynkAdBreak, UplynkAdBreakBeginEvent, UplynkAdBreakEndEvent, UplynkAdBreakEventMap, UplynkAdBreakList, UplynkAdBreakListEventMap, UplynkAdBreakSkipEvent, UplynkAdCompleteEvent, UplynkAdEndEvent, UplynkAdEventMap, UplynkAdFirstQuartileEvent, UplynkAdList, UplynkAdListEventMap, UplynkAdMidpointEvent, UplynkAdThirdQuartileEvent, UplynkAddAdBreakEvent, UplynkAddAssetEvent, UplynkAds, UplynkAsset, UplynkAssetEventMap, UplynkAssetId, UplynkAssetInfoResponse, UplynkAssetInfoResponseEvent, UplynkAssetList, UplynkAssetMovieRating, UplynkAssetTvRating, UplynkAssetType, UplynkConfiguration, UplynkDRMConfiguration, UplynkEventMap, UplynkExternalId, UplynkIntegrationID, UplynkPingConfiguration, UplynkPingErrorEvent, UplynkPingResponse, UplynkPingResponseEvent, UplynkPreplayBaseResponse, UplynkPreplayLiveResponse, UplynkPreplayResponse, UplynkPreplayResponseEvent, UplynkPreplayResponseType, UplynkPreplayVodResponse, UplynkRemoveAdBreakEvent, UplynkRemoveAdEvent, UplynkRemoveAssetEvent, UplynkResponseDrm, UplynkResponseLiveAd, UplynkResponseLiveAdBreak, UplynkResponseLiveAds, UplynkResponseVodAd, UplynkResponseVodAdBreak, UplynkResponseVodAdBreakOffset, UplynkResponseVodAdPlaceholder, UplynkResponseVodAds, UplynkSource, UplynkUiConfiguration, UplynkUpdateAdBreakEvent, UserActions, VPAIDMode, VR, VRConfiguration, VRDirection, VREventMap, VRPanoramaMode, VRState, VRStereoMode, VTTAlignSetting, VTTDirectionSetting, VTTLine, VTTLineAlignSetting, VTTPosition, VTTPositionAlignSetting, VTTScrollSetting, VastExtension, VendorCast, VendorCastEventMap, VerimatrixDRMConfiguration, VerimatrixIntegrationID, VideoFrameCallbackMetadata, VideoFrameRequestCallback, VideoQuality, View, ViewChangeEvent, ViewPositionChangeEvent, VimondDRMConfiguration, VimondIntegrationID, Visibility, VisibilityObserver, VisibilityObserverCallback, VoidPromiseCallback, VolumeChangeEvent, VudrmDRMConfiguration, VudrmIntegrationID, WaitUntilCallback, WaitingEvent, WebAudio, WebVTTCue, WebVTTRegion, WidevineKeySystemConfiguration, XstreamDRMConfiguration, XstreamIntegrationID, YospaceId, YouboraAnalyticsIntegrationID, YouboraOptions, cache, cast, features, players, registerContentProtectionIntegration, utils, version } from './THEOplayer.common'; +export { ABRConfiguration, ABRMetadata, ABRStrategy, ABRStrategyConfiguration, ABRStrategyType, AES128KeySystemConfiguration, AccessibilityRole, Ad, AdBreak, AdBreakEvent, AdBreakInit, AdBreakInterstitial, AdBufferingEvent, AdDescription, AdEvent, AdInit, AdIntegrationKind, AdMetadataEvent, AdPreloadType, AdReadyState, AdSkipEvent, AdSource, AdSourceType, AdType, AddCachingTaskEvent, AddTrackEvent, AddViewEvent, Ads, AdsConfiguration, AdsEventMap, AdsManagerLoadedEvent, AgamaAnalyticsIntegrationID, AgamaConfiguration, AgamaLogLevelType, AgamaPlayerConfiguration, AgamaServiceName, AgamaSourceConfiguration, AgamaStreamType, AirPlay, AnalyticsDescription, AnalyticsIntegrationID, AudioQuality, AxinomDRMConfiguration, AxinomIntegrationID, AzureDRMConfiguration, AzureIntegrationID, Base64Util, BaseSource, Boundary, BoundaryC3, BoundaryC7, BoundaryHalftime, BoundaryInfo, BufferSource, BufferedSegments, Cache, CacheEventMap, CacheStatus, CacheTaskStatus, CachingTask, CachingTaskEventMap, CachingTaskLicense, CachingTaskList, CachingTaskListEventMap, CachingTaskParameters, CanPlayEvent, CanPlayThroughEvent, Canvas, Cast, CastConfiguration, CastEventMap, CastState, CastStateChangeEvent, CertificateRequest, CertificateResponse, ChannelDrmConfigResponse, ChannelMillicastSource, Chromecast, ChromecastConfiguration, ChromecastConnectionCallback, ChromecastError, ChromecastErrorCode, ChromecastErrorEvent, ChromecastEventMap, ChromecastMetadataDescription, ChromecastMetadataImage, ChromecastMetadataType, ClearkeyDecryptionKey, ClearkeyKeySystemConfiguration, Clip, ClipEventMap, ClosedCaptionFile, ComcastDRMConfiguration, ComcastIntegrationID, CommonUtils, CompanionAd, ConaxDRMConfiguration, ConaxIntegrationID, ContentProtectionError, ContentProtectionErrorCode, ContentProtectionErrorEvent, ContentProtectionIntegration, ContentProtectionIntegrationFactory, ContentProtectionRequest, ContentProtectionRequestSubType, ContentProtectionResponse, CrossOriginSetting, CsaiAdDescription, CurrentSourceChangeEvent, CustomAdIntegrationKind, CustomTextTrackMap, CustomTextTrackOptions, CustomWebVTTTextTrack, DAIAvailabilityType, DRMConfiguration, DRMTodayDRMConfiguration, DRMTodayIntegrationID, DashPlaybackConfiguration, DateRangeCue, DeliveryType, DeviceBasedTitaniumDRMConfiguration, DimensionChangeEvent, DirectionChangeEvent, DistributionLoadStartEvent, DistributionOfflineEvent, DurationChangeEvent, EdgeStyle, EmptiedEvent, EmsgCue, EncryptedEvent, EndedEvent, Endpoint, EndpointLoadedEvent, EnterBadNetworkModeEvent, ErrorCategory, ErrorCode, ErrorEvent, Event, EventDispatcher, EventListener, EventMap, EventStreamCue, EventedList, ExitBadNetworkModeEvent, ExpressPlayDRMConfiguration, ExpressPlayIntegrationID, EzdrmDRMConfiguration, EzdrmIntegrationID, FairPlayKeySystemConfiguration, FreeWheelAdDescription, FreeWheelAdUnitType, FreeWheelCue, FullscreenOptions, Geo, GlobalCast, GlobalChromecast, GoogleDAI, GoogleDAIConfiguration, GoogleDAILiveConfiguration, GoogleDAISSAIIntegrationID, GoogleDAITypedSource, GoogleDAIVodConfiguration, GoogleImaAd, GoogleImaConfiguration, HTTPHeaders, HTTPHeadersInit, HespApi, HespApiEventMap, HespMediaType, HespSourceConfiguration, HespTypedSource, HlsDiscontinuityAlignment, HlsPlaybackConfiguration, ID3AttachedPicture, ID3BaseFrame, ID3Comments, ID3CommercialFrame, ID3Cue, ID3Frame, ID3GenericEncapsulatedObject, ID3InvolvedPeopleList, ID3PositionSynchronisationFrame, ID3PrivateFrame, ID3SynchronizedLyricsText, ID3TermsOfUse, ID3Text, ID3UniqueFileIdentifier, ID3Unknown, ID3UnsynchronisedLyricsTextTranscription, ID3UrlLink, ID3UserDefinedText, ID3UserDefinedUrlLink, ID3Yospace, IMAAdDescription, IntentToFallbackEvent, InterceptableRequest, InterceptableResponse, Interstitial, InterstitialEvent, InterstitialType, IrdetoDRMConfiguration, IrdetoIntegrationID, JoinStrategy, KeyOSDRMConfiguration, KeyOSFairplayKeySystemConfiguration, KeyOSIntegrationID, KeyOSKeySystemConfiguration, KeySystemConfiguration, KeySystemId, Latencies, LatencyConfiguration, LatencyManager, LayoutChangeEvent, LicenseRequest, LicenseResponse, LicenseType, LinearAd, List, LoadedDataEvent, LoadedMetadataEvent, ManifestErrorEvent, MaybeAsync, MeasurableNetworkEstimator, MediaError, MediaErrorCode, MediaFile, MediaMelonConfiguration, MediaTailorSource, MediaTrack, MediaTrackEventMap, MediaTrackList, MediaTrackType, MediaType, MetadataDescription, Metrics, Millicast, MillicastEventMap, MillicastMetadataCue, MillicastSource, MillicastStatsEvent, MoatAnalyticsIntegrationID, MoatConfiguration, MultiViewPlayer, MultiViewPlayerEventMap, MultiViewPlayerLayout, MutedAutoplayConfiguration, Network, NetworkEstimator, NetworkEstimatorController, NetworkEventMap, NetworkInterceptorController, NodeStyleVoidCallback, NonLinearAd, OverlayInterstitial, OverlayPosition, OverlaySize, PauseEvent, PiPConfiguration, PiPPosition, PlayEvent, PlayReadyKeySystemConfiguration, PlayStation5Configuration, PlayStation5PlayMode, PlayerConfiguration, PlayerEventMap, PlayerList, PlayingEvent, PreloadType, Presentation, PresentationEventMap, PresentationModeChangeEvent, ProgressEvent, Quality, QualityEvent, QualityEventMap, QualityList, RateChangeEvent, ReadyStateChangeEvent, RelatedChangeEvent, RelatedContent, RelatedContentEventMap, RelatedContentSource, RelatedHideEvent, RelatedShowEvent, RemoveCachingTaskEvent, RemoveTrackEvent, RemoveViewEvent, Representation, RepresentationChangeEvent, Request, RequestBody, RequestInit, RequestInterceptor, RequestLike, RequestMeasurer, RequestMethod, RequestSubType, RequestType, ResponseBody, ResponseInit, ResponseInterceptor, ResponseLike, ResponseType, RetryConfiguration, SSAIIntegrationId, SeamlessPeriodSwitchStrategy, SeamlessSwitchStrategy, SeekedEvent, SeekingEvent, SegmentErrorEvent, ServerSideAdInsertionConfiguration, ServerSideAdIntegrationController, ServerSideAdIntegrationFactory, ServerSideAdIntegrationHandler, SkippedAdStrategy, SmartSightConfiguration, SmartSightIntegrationID, Source, SourceAbrConfiguration, SourceChangeEvent, SourceConfiguration, SourceDescription, SourceIntegrationId, SourceLatencyConfiguration, Sources, SpotXAdDescription, SpotxData, SpotxQueryParameter, StateChangeEvent, StereoChangeEvent, StreamOneAnalyticsIntegrationID, StreamOneConfiguration, StreamType, StringKeyOf, StylePropertyRecord, SupportedCustomTextTrackCueTypes, THEOplayerError, TTMLCue, TTMLExtent, TargetQualityChangedEvent, TextTrack, TextTrackAddCueEvent, TextTrackCue, TextTrackCueChangeEvent, TextTrackCueEnterEvent, TextTrackCueEventMap, TextTrackCueExitEvent, TextTrackCueList, TextTrackCueUpdateEvent, TextTrackDescription, TextTrackEnterCueEvent, TextTrackError, TextTrackErrorCode, TextTrackErrorEvent, TextTrackEventMap, TextTrackExitCueEvent, TextTrackReadyState, TextTrackReadyStateChangeEvent, TextTrackRemoveCueEvent, TextTrackStyle, TextTrackStyleEventMap, TextTrackType, TextTrackTypeChangeEvent, TextTrackUpdateCueEvent, TextTracksList, TheoAdDescription, TheoAds, TheoAdsEventsMap, TheoAdsLayout, TheoAdsLayoutOverride, TheoLiveApi, TheoLiveApiEventMap, TheoLiveConfiguration, TheoLivePublication, TheoLiveSource, ThumbnailResolution, TimeRanges, TimeUpdateEvent, TitaniumDRMConfiguration, TitaniumIntegrationID, TokenBasedTitaniumDRMConfiguration, Track, TrackChangeEvent, TrackEventMap, TrackList, TrackListEventMap, TrackUpdateEvent, TypedSource, UIConfiguration, UILanguage, UIRelatedContentEventMap, UniversalAdId, UpdateQualityEvent, Uplynk, UplynkAd, UplynkAdBeginEvent, UplynkAdBreak, UplynkAdBreakBeginEvent, UplynkAdBreakEndEvent, UplynkAdBreakEventMap, UplynkAdBreakList, UplynkAdBreakListEventMap, UplynkAdBreakSkipEvent, UplynkAdCompleteEvent, UplynkAdEndEvent, UplynkAdEventMap, UplynkAdFirstQuartileEvent, UplynkAdList, UplynkAdListEventMap, UplynkAdMidpointEvent, UplynkAdThirdQuartileEvent, UplynkAddAdBreakEvent, UplynkAddAssetEvent, UplynkAds, UplynkAsset, UplynkAssetEventMap, UplynkAssetId, UplynkAssetInfoResponse, UplynkAssetInfoResponseEvent, UplynkAssetList, UplynkAssetMovieRating, UplynkAssetTvRating, UplynkAssetType, UplynkConfiguration, UplynkDRMConfiguration, UplynkEventMap, UplynkExternalId, UplynkIntegrationID, UplynkPingConfiguration, UplynkPingErrorEvent, UplynkPingResponse, UplynkPingResponseEvent, UplynkPreplayBaseResponse, UplynkPreplayLiveResponse, UplynkPreplayResponse, UplynkPreplayResponseEvent, UplynkPreplayResponseType, UplynkPreplayVodResponse, UplynkRemoveAdBreakEvent, UplynkRemoveAdEvent, UplynkRemoveAssetEvent, UplynkResponseDrm, UplynkResponseLiveAd, UplynkResponseLiveAdBreak, UplynkResponseLiveAds, UplynkResponseVodAd, UplynkResponseVodAdBreak, UplynkResponseVodAdBreakOffset, UplynkResponseVodAdPlaceholder, UplynkResponseVodAds, UplynkSource, UplynkUiConfiguration, UplynkUpdateAdBreakEvent, UserActions, VPAIDMode, VR, VRConfiguration, VRDirection, VREventMap, VRPanoramaMode, VRState, VRStereoMode, VTTAlignSetting, VTTDirectionSetting, VTTLine, VTTLineAlignSetting, VTTPosition, VTTPositionAlignSetting, VTTScrollSetting, VastExtension, VendorCast, VendorCastEventMap, VerimatrixDRMConfiguration, VerimatrixIntegrationID, VideoFrameCallbackMetadata, VideoFrameRequestCallback, VideoQuality, View, ViewChangeEvent, ViewPositionChangeEvent, VimondDRMConfiguration, VimondIntegrationID, Visibility, VisibilityObserver, VisibilityObserverCallback, VoidPromiseCallback, VolumeChangeEvent, VudrmDRMConfiguration, VudrmIntegrationID, WaitUntilCallback, WaitingEvent, WebAudio, WebVTTCue, WebVTTRegion, WidevineKeySystemConfiguration, XstreamDRMConfiguration, XstreamIntegrationID, YospaceId, YouboraAnalyticsIntegrationID, YouboraOptions, cache, cast, features, players, registerContentProtectionIntegration, utils, version } from './THEOplayer.common'; /** * The social sharing API which can supplement the UI with a social sharing panel. diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.esm.js b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.esm.js index 856dfd1f..9e141176 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.esm.js +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.esm.js @@ -34,8 +34,8 @@ THEOplayer is based on patented technology developed by THEO Technologies (https://www.theoplayer.com). - Version: 10.0.0 - Created: 2025-09-12T12:50:32.290Z + Version: 10.3.0 + Created: 2025-10-23T15:33:11.023Z */ -var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window,h=a.document,u=(a.location,a.navigator,a.setTimeout),c=a.clearTimeout,v=a.setInterval,p=a.clearInterval,m=a.Error,g=a.TypeError,k=a.SyntaxError,w=a.Object,_=a.Math,x=a.parseInt,C=a.parseFloat,S=a.isNaN,j=a.Uint8Array;a.Worker,a.WorkerGlobalScope,a.XMLHttpRequest;import{$ as T,$a as M,A,Aa as P,B as N,Ba as E,C as B,Ca as I,D as F,Da as D,E as $,Ea as R,F as U,Fa as O,G as V,Ga as L,H,Ha as q,I as z,Ia as W,J as G,Ja as X,K as J,Ka as Q,L as Y,La as K,M as Z,Ma as tt,N as it,Na as d,O as st,Oa as et,P as nt,Pa as rt,Q as ht,Qa as ot,R as at,Ra as ut,S as ct,Sa as lt,T as dt,Ta as ft,U as vt,Ua as pt,V as mt,Va as gt,W as yt,Wa as bt,X as kt,Xa as wt,Y as _t,Ya as xt,Z as Ct,Za as St,_ as jt,_a as Tt,a as Mt,aa as At,ab as Pt,b as Nt,ba as Et,bb as Bt,c as f,ca as It,cb as Ft,d as Dt,da as $t,db as Rt,e as Ut,ea as Ot,eb as Vt,f as Lt,fa as Ht,fb as qt,g as zt,ga as Wt,gb as Gt,h as Xt,ha as Jt,i as Qt,ia as Yt,j as Kt,ja as Zt,k as ti,ka as ii,l as si,la as ei,m as ni,ma as ri,n as hi,na as oi,o as ai,oa as ui,p as ci,pa as li,q as di,qa as fi,r as vi,ra as pi,s as mi,sa as gi,t as yi,ta as bi,u as ki,ua as wi,v as _i,va as xi,w as Ci,wa as Si,x as ji,xa as Ti,y as Mi,ya as Ai,z as Pi,za as Ni}from"./THEOplayer.common.esm.js";f(),f(),f(),f();var Ei=[];function Bi(t){Ei.push(t)}var Ii=[];function Fi(t){Ii.push(t)}f(),f(),f(),f();var b=void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Di=void 0!==h?h:{createElement:function(){}};function $i(t,i){return i||(i=t.slice(0)),t.raw=i,t}var Ri=1;function Ui(){return Ri++}var Oi,Vi=w.prototype.toString,Li=function(t){return zi(t)?w.keys(t):[]};function Hi(t,i){Li(t).forEach(function(s){return i(t[s],s)})}function qi(t){for(var i=arguments.length,s=new Array(i>1?i-1:0),e=1;e0)for(var s=t.attributes,e=s.length-1;e>=0;e--){var n=s[e].name,r=s[e].value;"boolean"!=typeof t[n]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+n+",")||(r=null!==r),i[n]=r}return i}function ys(t,i,s){t.setAttribute(i,s)}function bs(t,i){t.removeAttribute(i)}function ks(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var s=Di.documentElement,e=Di.body,n=s.clientLeft||e.clientLeft||0,r=b.pageXOffset||e.scrollLeft,h=i.left+r-n,o=s.clientTop||e.clientTop||0,a=b.pageYOffset||e.scrollTop,u=i.top+a-o;return{left:_.round(h),top:_.round(u)}}function ws(t,i){var s={},e=ks(t),n=t.offsetWidth,r=t.offsetHeight,h=e.top,o=e.left,a=i.pageY,u=i.pageX;return i.changedTouches&&(u=i.changedTouches[0].pageX,a=i.changedTouches[0].pageY),s.y=_.max(0,_.min(1,(h-a+r)/r)),s.x=_.max(0,_.min(1,(u-o)/n)),s}function _s(t){return zi(t)&&3===t.nodeType}function xs(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Cs(t,i){return function(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),ss(t)||_s(t)?t:"string"==typeof t&&/\S/.test(t)?Di.createTextNode(t):void 0}).filter(function(t){return t})}(i).forEach(function(i){return t.appendChild(i)}),t}function Ss(t,i){return Cs(xs(t),i)}var js,Ts=es("querySelector"),Ms=es("querySelectorAll"),As=b.navigator&&b.navigator.userAgent||"",Ps=/AppleWebKit\/([\d.]+)/i.exec(As),Ns=Ps?C(Ps.pop()):null,Es=/iPad/i.test(As),Bs=/iPhone/i.test(As)&&!Es,Is=/iPod/i.test(As),Fs=Bs||Es||Is,Ds=(js=As.match(/OS (\d+)_/i))&&js[1]?js[1]:null,$s=/Android/i.test(As),Rs=function(){var t=As.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&C(t[1]),s=t[2]&&C(t[2]);return i&&s?C(t[1]+"."+t[2]):i||null}(),Us=$s&&/webkit/i.test(As)&&Rs<2.3,Os=$s&&Rs<5&&Ns<537,Vs=/Firefox/i.test(As),Ls=/Edge/i.test(As),Hs=!Ls&&/Chrome/i.test(As),qs=function(){var t=As.match(/Chrome\/(\d+)/);return t&&t[1]?C(t[1]):null}(),zs=/MSIE\s8\.0/.test(As),Ws=function(){var t=/MSIE\s(\d+)\.\d/.exec(As),i=t&&C(t[1]);return!i&&/Trident\/7.0/i.test(As)&&/rv:11.0/.test(As)&&(i=11),i}(),Gs=/Safari/i.test(As)&&!Hs&&!$s&&!Ls,Xs=Gs||Fs,Js=is()&&("ontouchstart"in b||b.DocumentTouch&&b.document instanceof b.DocumentTouch),Qs=is()&&"backgroundSize"in b.document.createElement("video").style,Ys=w.freeze({__proto__:null,IS_IPAD:Es,IS_IPHONE:Bs,IS_IPOD:Is,IS_IOS:Fs,IOS_VERSION:Ds,IS_ANDROID:$s,ANDROID_VERSION:Rs,IS_OLD_ANDROID:Us,IS_NATIVE_ANDROID:Os,IS_FIREFOX:Vs,IS_EDGE:Ls,IS_CHROME:Hs,CHROME_VERSION:qs,IS_IE8:zs,IE_VERSION:Ws,IS_SAFARI:Gs,IS_ANY_SAFARI:Xs,TOUCH_ENABLED:Js,BACKGROUND_SIZE_SUPPORTED:Qs});function Ks(t,i){var s=us(t);0===s.handlers[i].length&&(delete s.handlers[i],t.removeEventListener?t.removeEventListener(i,s.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+i,s.dispatcher)),w.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===w.getOwnPropertyNames(s).length&&ls(t)}function Zs(t,i,s,e){s.forEach(function(s){t(i,s,e)})}function te(t){function i(){return!0}function s(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var e=t||b.event;for(var n in t={},e)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&"path"!==n&&("returnValue"===n&&e.preventDefault||(t[n]=e[n]));if(t.target||(t.target=t.srcElement||Di),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){e.preventDefault&&e.preventDefault(),t.returnValue=!1,e.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){e.stopPropagation&&e.stopPropagation(),t.cancelBubble=!0,e.cancelBubble=!0,t.isPropagationStopped=i},t.isPropagationStopped=s,t.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation(),t.isImmediatePropagationStopped=i,t.stopPropagation()},t.isImmediatePropagationStopped=s,null!==t.clientX&&void 0!==t.clientX){var r=Di.documentElement,h=Di.body;t.pageX=t.clientX+(r&&r.scrollLeft||h&&h.scrollLeft||0)-(r&&r.clientLeft||h&&h.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||h&&h.scrollTop||0)-(r&&r.clientTop||h&&h.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var ie=!1;!function(){try{var t=w.defineProperty({},"passive",{get:function(){ie=!0}});b.addEventListener("test",null,t)}catch(t){}}();var se=["touchstart","touchmove"];function ee(t,i,s){if(Array.isArray(i))return Zs(ee,t,i,s);var e=us(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=Ui()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=te(i);var n=e.handlers[i.type];if(n)for(var r=n.slice(0),h=0,o=r.length;h-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function ne(t,i,s){if(cs(t)){var e=us(t);if(e.handlers){if(Array.isArray(i))return Zs(ne,t,i,s);var n=function(i){e.handlers[i]=[],Ks(t,i)};if(i){var r=e.handlers[i];if(r)if(s){if(s.guid)for(var h=0;h0)for(var e=0,n=t.length;e0)for(var r=0,h=i.length;r0)for(var o=0,a=s.length;o=0;t--)this.m[t].dispose&&this.m[t].dispose();this.m=null,this.k=null,this.C=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),ls(this.v),this.v=null},i.player=function(){return this.t},i.options=function(t){return Xi.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=ve(this.h,t),this.h):this.h},i.el=function(){return this.v},i.createEl=function(t,i,s){return ns(t,i,s)},i.localize=function(t){var i=this.t.language&&this.t.language(),s=this.t.languages&&this.t.languages();if(!i||!s)return t;var e=s[i];if(e&&e[t])return e[t];var n=s[i.split("-")[0]];return n&&n[t]?n[t]:t},i.contentEl=function(){return this.S||this.v},i.id=function(){return this.o},i.name=function(){return this.l},i.children=function(){return this.m},i.getChildById=function(t){return this.k[t]},i.getChild=function(t){if(t)return t=fe(t),this.C[t]},i.addChild=function(i,s,e){var n,r;if(void 0===s&&(s={}),void 0===e&&(e=this.m.length),"string"==typeof i){r=fe(i),s||(s={}),!0===s&&(Xi.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),s={});var h=s.componentClass||r;s.name=r;var o=t.getComponent(h);if(!o)throw new m("Component "+h+" does not exist");if("function"!=typeof o)return null;n=new o(this.t||this,s)}else n=i;if(this.m.splice(e,0,n),"function"==typeof n.id&&(this.k[n.id()]=n),(r=r||n.name&&fe(n.name()))&&(this.C[r]=n),"function"==typeof n.el&&n.el()){var a=this.contentEl().children[e]||null;this.contentEl().insertBefore(n.el(),a)}return n},i.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.m){for(var i=!1,s=this.m.length-1;s>=0;s--)if(this.m[s]===t){i=!0,this.m.splice(s,1);break}if(i){this.k[t.id()]=null,this.C[t.name()]=null;var e=t.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},i.initChildren=function(){var i=this,s=this.h.children;if(s){var e,n=this.h,r=t.getComponent("Tech");(e=Array.isArray(s)?s:w.keys(s)).concat(w.keys(this.h).filter(function(t){return!e.some(function(i){return"string"==typeof i?t===i:t===i.name})})).map(function(t){var e,n;return"string"==typeof t?n=s[e=t]||i.h[e]||{}:(e=t.name,n=t),{name:e,opts:n}}).filter(function(i){var s=t.getComponent(i.opts.componentClass||fe(i.name));return s&&!r.isTech(s)}).forEach(function(t){var s=t.name,e=t.opts;if(void 0!==n[s]&&(e=n[s]),!1!==e){!0===e&&(e={}),e.playerOptions=i.h.playerOptions;var r=i.addChild(s,e);r&&(i[s]=r)}})}},i.buildCSSClass=function(){return""},i.on=function(t,i,s){var e=this;if("string"==typeof t||Array.isArray(t))ee(this.v,t,n(this,i));else{var r=t,h=i,o=n(this,s),a=function(){return e.off(r,h,o)};a.guid=o.guid,this.on("dispose",a);var u=function(){return e.off("dispose",a)};u.guid=o.guid,t.nodeName?(ee(r,h,o),ee(r,"dispose",u)):"function"==typeof t.on&&(r.on(h,o),r.on("dispose",u))}return this},i.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))ne(this.v,t,i);else{var e=t,r=i,h=n(this,s);this.off("dispose",h),t.nodeName?(ne(e,r,h),ne(e,"dispose",h)):(e.off(r,h),e.off("dispose",h))}return this},i.one=function(t,i,s){var e=arguments,r=this;if("string"==typeof t||Array.isArray(t))he(this.v,t,n(this,i));else{var h=t,o=i,a=n(this,s),u=function t(){r.off(h,o,t),a.apply(null,e)};u.guid=a.guid,this.on(h,o,u)}return this},i.trigger=function(t,i){return re(this.v,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.j?i?t.call(this):this.setTimeout(t,1):(this.T=this.T||[],this.T.push(t))),this},i.triggerReady=function(){this.j=!0,this.setTimeout(function(){var t=this.T;this.T=[],t&&t.length>0&&t.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},i.$=function(t,i){return Ts(t,i||this.contentEl())},i.$$=function(t,i){return Ms(t,i||this.contentEl())},i.hasClass=function(t){return ds(this.v,t)},i.addClass=function(t){return fs(this.v,t),this},i.removeClass=function(t){return vs(this.v,t),this},i.toggleClass=function(t,i){return ps(this.v,t,i),this},i.show=function(){return this.removeClass("vjs-hidden"),this},i.hide=function(){return this.addClass("vjs-hidden"),this},i.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},i.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},i.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.v,t)},i.setAttribute=function(t,i){return ys(this.v,t,i),this},i.removeAttribute=function(t){return bs(this.v,t),this},i.width=function(t,i){return this.dimension("width",t,i)},i.height=function(t,i){return this.dimension("height",t,i)},i.dimensions=function(t,i){return this.width(t,!0).height(i)},i.dimension=function(t,i,s){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.v.style[t]=i:this.v.style[t]="auto"===i?"":i+"px",s||this.trigger("resize"),this;if(!this.v)return 0;var e=this.v.style[t],n=e.indexOf("px");return x(-1!==n?e.slice(0,n):this.v["offset"+fe(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new m("currentDimension only accepts width or height value");if("function"==typeof b.getComputedStyle){var s=b.getComputedStyle(this.v);i=s.getPropertyValue(t)||s[t]}if(0===(i=C(i))){var e="offset"+fe(t);i=this.v[e]}return i},i.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},i.currentWidth=function(){return this.currentDimension("width")},i.currentHeight=function(){return this.currentDimension("height")},i.focus=function(){this.v.focus()},i.blur=function(){this.v.blur()},i.emitTapEvents=function(){var t,i=0,s=null;this.on("touchstart",function(e){1===e.touches.length&&(s={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},i=(new Date).getTime(),t=!0)}),this.on("touchmove",function(i){if(i.touches.length>1)t=!1;else if(s){var e=i.touches[0].pageX-s.pageX,n=i.touches[0].pageY-s.pageY;_.sqrt(e*e+n*n)>10&&(t=!1)}});var e=function(){t=!1};this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",function(e){(s=null,!0===t)&&((new Date).getTime()-i<200&&(e.preventDefault(),this.trigger("tap")))})},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=n(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){i(),this.clearInterval(t),t=this.setInterval(i,250)});var s=function(s){i(),this.clearInterval(t)};this.on("touchmove",i),this.on("touchend",s),this.on("touchcancel",s)}},i.setTimeout=function(t,i){t=n(this,t);var s=b.setTimeout(t,i),e=function(){this.clearTimeout(s)};return e.guid="vjs-timeout-"+s,this.on("dispose",e),s},i.clearTimeout=function(t){b.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=n(this,t);var s=b.setInterval(t,i),e=function(){this.clearInterval(s)};return e.guid="vjs-interval-"+s,this.on("dispose",e),s},i.clearInterval=function(t){b.clearInterval(t);var i=function(){};return i.guid="vjs-interval-"+t,this.off("dispose",i),t},t.registerComponent=function(i,s){if(i){if(i=fe(i),t.M||(t.M={}),"Player"===i&&t.M[i]){var e=t.M[i];if(e.players&&w.keys(e.players).length>0&&w.keys(e.players).map(function(t){return e.players[t]}).every(Boolean))throw new m("Can not register Player component after player has been created")}return t.M[i]=s,s}},t.getComponent=function(i){if(i)return i=fe(i),t.M&&t.M[i]?t.M[i]:b&&b.videojs&&b.videojs[i]?(Xi.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),b.videojs[i]):void 0},t.extend=function(i){i=i||{},Xi.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var s=i.init||i.init||this.prototype.init||this.prototype.init||function(){},e=function(){s.apply(this,arguments)};for(var n in(e.prototype=w.create(this.prototype)).constructor=e,e.extend=t.extend,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);return e},t}();pe.registerComponent("Component",pe);var me=function(){};function ge(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ye(t,i){return(ye=w.setPrototypeOf?w.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function be(t,i){t.prototype=w.create(i.prototype),t.prototype.constructor=t,ye(t,i)}function ke(t,i,s,e){return void 0===e&&(Xi.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new m("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+i+") is greater than or equal to the maximum bound ("+s+").")}(t,e,s.length-1),s[e][i]}function we(t){return void 0===t||0===t.length?{length:0,start:function(){throw new m("This TimeRanges object is empty")},end:function(){throw new m("This TimeRanges object is empty")}}:{length:t.length,start:ke.bind(null,"start",0,t),end:ke.bind(null,"end",1,t)}}function _e(t,i){return Array.isArray(t)?we(t):void 0===t||void 0===i?we():we([[t,i]])}function xe(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=_e(0,0));for(var r=0;ri&&(e=i),n+=e-s;return n/i}me.prototype.A={},me.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},ee(this,t,i),this.addEventListener=s},me.prototype.addEventListener=me.prototype.on,me.prototype.off=function(t,i){ne(this,t,i)},me.prototype.removeEventListener=me.prototype.off,me.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},he(this,t,i),this.addEventListener=s},me.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=te(t),this.A[i]&&this["on"+i]&&this["on"+i](t),re(this,t)},me.prototype.dispatchEvent=me.prototype.trigger;var Ce,Se,je,Te,Me={prefixed:!0},Ae=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Pe=Ae[0];for(Se=0;Se',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),Di.body.appendChild(e));for(var r={},h=0;h=0&&"[object Function]"===dn.call(t.callee)),s};w.keys||(Qe=w.prototype.hasOwnProperty,Ye=w.prototype.toString,Ke=fn,Ze=w.prototype.propertyIsEnumerable,tn=!Ze.call({toString:null},"toString"),sn=Ze.call(function(){},"prototype"),en=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],nn=function(t){var i=t.constructor;return i&&i.prototype===t},rn={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},hn=function(){if(void 0===s)return!1;for(var t in s)try{if(!rn["$"+t]&&Qe.call(s,t)&&null!==s[t]&&"object"==typeof s[t])try{nn(s[t])}catch(t){return!0}}catch(t){return!0}return!1}(),on=function(t){if(void 0===s||!hn)return nn(t);try{return nn(t)}catch(t){return!1}},Je=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===Ye.call(t),e=Ke(t),n=i&&"[object String]"===Ye.call(t),r=[];if(!i&&!s&&!e)throw new g("Object.keys called on a non-object");var h=sn&&s;if(n&&t.length>0&&!Qe.call(t,0))for(var o=0;o0)for(var a=0;a2?arguments[2]:{},e=kn(i);wn&&(e=xn.call(e,w.getOwnPropertySymbols(i)));for(var n=0;n1&&"boolean"!=typeof i)throw new g('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in $n))throw new k("intrinsic "+t+" does not exist!");if(void 0===$n[s]&&!i)throw new g("intrinsic "+t+" exists, but is not available. Please file an issue!");return $n[s]},Un=ln.call(Function.call,w.prototype.hasOwnProperty),On=Rn,Vn=On("%TypeError%"),Ln=On("%SyntaxError%"),Hn=Un,qn={"Property Descriptor":function(t,i){if("Object"!==t.Type(i))return!1;var s={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var e in i)if(Hn(i,e)&&!s[e])return!1;var n=Hn(i,"[[Value]]"),r=Hn(i,"[[Get]]")||Hn(i,"[[Set]]");if(n&&r)throw new Vn("Property Descriptors may not be both accessor and data descriptors");return!0}},zn=Number.isNaN||function(t){return t!=t},Wn=Number.isNaN||function(t){return t!=t},Gn=Number.isFinite||function(t){return"number"==typeof t&&!Wn(t)&&t!==1/0&&t!==-1/0},Xn=Function.prototype.toString,Jn=/^\s*class\b/,Qn=function(t){try{var i=Xn.call(t);return Jn.test(i)}catch(t){return!1}},Yn=w.prototype.toString,Kn="function"==typeof Mt&&"symbol"==typeof Mt.toStringTag,Zn=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(Kn)return function(t){try{return!Qn(t)&&(Xn.call(t),!0)}catch(t){return!1}}(t);if(Qn(t))return!1;var i=Yn.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},tr=w.prototype.toString,ir=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},sr=Zn,er=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===tr.call(t)?String:Number)===String||i===Number){var s,e,n=i===String?["toString","valueOf"]:["valueOf","toString"];for(e=0;e=0?1:-1},dr=function(t,i){var s=t%i;return _.floor(s>=0?s:s+i)},fr=Un,vr={ToPrimitive:function(t){return ir(t)?t:arguments.length>1?er(t,arguments[1]):er(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return ur(i)?0:0!==i&&cr(i)?lr(i)*_.floor(_.abs(i)):i},ToInt32:function(t){return this.ToNumber(t)|0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var i=this.ToNumber(t);if(ur(i)||0===i||!cr(i))return 0;var s=lr(i)*_.floor(_.abs(i));return dr(s,65536)},ToString:function(t){return or(t)},ToObject:function(t){return this.CheckObjectCoercible(t),rr(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new hr(i||"Cannot call method on "+t);return t},IsCallable:Zn,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:ur(t)&&ur(i)},Type:function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0},IsPropertyDescriptor:function(t){if("Object"!==this.Type(t))return!1;var i={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var s in t)if(fr(t,s)&&!i[s])return!1;var e=fr(t,"[[Value]]"),n=fr(t,"[[Get]]")||fr(t,"[[Set]]");if(e&&n)throw new hr("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(ar(this,"Property Descriptor","Desc",t),!(!fr(t,"[[Get]]")&&!fr(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(ar(this,"Property Descriptor","Desc",t),!(!fr(t,"[[Value]]")&&!fr(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(ar(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(ar(this,"Property Descriptor","Desc",t),this.IsDataDescriptor(t))return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};if(this.IsAccessorDescriptor(t))return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};throw new hr("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new hr("ToPropertyDescriptor requires an object");var i={};if(fr(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),fr(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),fr(t,"value")&&(i["[[Value]]"]=t.value),fr(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),fr(t,"get")){var s=t.get;if(void 0!==s&&!this.IsCallable(s))throw new g("getter must be a function");i["[[Get]]"]=s}if(fr(t,"set")){var e=t.set;if(void 0!==e&&!this.IsCallable(e))throw new hr("setter must be a function");i["[[Set]]"]=e}if((fr(i,"[[Get]]")||fr(i,"[[Set]]"))&&(fr(i,"[[Value]]")||fr(i,"[[Writable]]")))throw new hr("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},pr=ln.call(Function.call,String.prototype.replace),mr=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,gr=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,yr=function(){var t=vr.ToString(vr.CheckObjectCoercible(this));return pr(pr(t,mr,""),gr,"")},br=yr,kr=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:br},wr=An,_r=kr,xr=An,Cr=yr,Sr=kr,jr=function(){var t=_r();return wr(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},Tr=ln.call(Function.call,Sr());xr(Tr,{getPolyfill:Sr,implementation:Cr,shim:jr});var Mr=Tr,Ar=Zn,Pr=w.prototype.toString,Nr=w.prototype.hasOwnProperty,Er=Mr,Br=function(t,i,s){if(!Ar(i))throw new g("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===Pr.call(t)?function(t,i,s){for(var e=0,n=t.length;e0&&(d=u(function(){a=!0,l.abort("timeout");var t=new m("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)},t.timeout)),l.setRequestHeader)for(o in g)g.hasOwnProperty(o)&&l.setRequestHeader(o,g[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new m("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(l.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(l),l.send(p),l}Lr.XMLHttpRequest=Dr.XMLHttpRequest||function(){},Lr.XDomainRequest="withCredentials"in new Lr.XMLHttpRequest?Lr.XMLHttpRequest:Dr.XDomainRequest,function(t,i){for(var s=0;s0&&(b.console&&b.console.groupCollapsed&&b.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach(function(t){return Xi.error(t)}),b.console&&b.console.groupEnd&&b.console.groupEnd()),s.flush()},zr=function(t){function i(s){var e;if(void 0===s&&(s={}),!s.tech)throw new m("A tech was not provided.");var r=ve(s,{kind:Ve[s.kind]||"subtitles",language:s.language||s.srclang||""}),h=Le[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(h="hidden");var a=e=t.call(this,r)||this;if(a.H=r.tech,zs)for(var u in i.prototype)"constructor"!==u&&(a[u]=i.prototype[u]);a.L=[],a.q=[];var c=new Re(a.L),l=new Re(a.q),d=!1,f=n(a,function(){this.activeCues,d&&(this.trigger("cuechange"),d=!1)});return"disabled"!==h&&a.H.ready(function(){a.H.on("timeupdate",f)},!0),w.defineProperty(a,"default",{get:function(){return o},set:function(){}}),w.defineProperty(a,"mode",{get:function(){return h},set:function(t){var i=this;Le[t]&&("showing"===(h=t)&&this.H.ready(function(){i.H.on("timeupdate",f)},!0),this.trigger("modechange"))}}),w.defineProperty(a,"cues",{get:function(){return this.W?c:null},set:function(){}}),w.defineProperty(a,"activeCues",{get:function(){if(!this.W)return null;if(0===this.cues.length)return l;for(var t=this.H.currentTime(),i=[],s=0,e=this.cues.length;s=t||n.startTime===n.endTime&&n.startTime<=t&&n.startTime+.5>=t)&&i.push(n)}if(d=!1,i.length!==this.q.length)d=!0;else for(var r=0;r=0;r--)if(s[r].selected){Yr(s,s[r]);break}if(zs){for(var h in n=Di.createElement("custom"),Jr.prototype)"constructor"!==h&&(n[h]=Jr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,w.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t=0;r--)if(s[r].enabled){Zr(s,s[r]);break}if(zs){for(var h in n=Di.createElement("custom"),Jr.prototype)"constructor"!==h&&(n[h]=Jr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,n||ge(e)}be(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.enabled&&Zr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",function(){s.st||(s.st=!0,Zr(s,i),s.st=!1,s.trigger("change"))})},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(Jr),ih=void 0;var sh=function(t){function i(i,s){var e;return void 0===i&&(i={}),void 0===s&&(s=function(){}),i.reportTouchActivity=!1,(e=t.call(this,null,i,s)||this).et=!1,e.on("playing",function(){this.et=!0}),e.on("loadstart",function(){this.et=!1}),e.nt=i.textTracks,e.rt=i.videoTracks,e.ht=i.audioTracks,e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===i["native"+t+"Tracks"]&&(e["featuresNative"+t+"Tracks"]=!1)}),!1===i.nativeCaptions&&(e.featuresNativeTextTracks=!1),e.featuresNativeTextTracks||e.emulateTextTracks(),e.ot=new Qr,e.initTextTrackListeners(),e.initTrackListeners(),i.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.l=e.constructor.name||"Unknown Tech"),e}be(i,t);var s=i.prototype;return s.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},s.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},s.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(n(this,function(){var t=this.bufferedPercent();this.ut!==t&&this.trigger("progress"),this.ut=t,1===t&&this.stopTrackingProgress()}),500)},s.onDurationChange=function(t){this.ct=this.duration()},s.buffered=function(){return _e(0,0)},s.bufferedPercent=function(){return xe(this.buffered(),this.ct)},s.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},s.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},s.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},s.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},s.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},s.clearTracks=function(t){var i=this;(t=[].concat(t)).forEach(function(t){for(var s=i[t+"Tracks"]()||[],e=s.length;e--;){var n=s[e];"text"===t&&i.removeRemoteTextTrack(n),s.it(n)}})},s.cleanupAutoTextTracks=function(){for(var t=this.ot||[],i=t.length;i--;){var s=t[i];this.removeRemoteTextTrack(s)}},s.reset=function(){},s.error=function(t){return void 0!==t&&(this.lt=new Ne(t),this.trigger("error")),this.lt},s.played=function(){return this.et?_e(0,0):_e()},s.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.initTextTrackListeners=function(){var t=n(this,function(){this.trigger("texttrackchange")}),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",n(this,function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)})))},s.initTrackListeners=function(){var t=this;["video","audio"].forEach(function(i){var s=function(){t.trigger(i+"trackchange")},e=t[i+"Tracks"]();e.addEventListener("removetrack",s),e.addEventListener("addtrack",s),t.on("dispose",function(){e.removeEventListener("removetrack",s),e.removeEventListener("addtrack",s)})})},s.dt=function(){var t=this;if(!b.WebVTT)if(Di.body.contains(this.el())){if(!this.h["vtt.js"]&&Wi(ih)&&w.keys(ih).length>0)return void this.trigger("vttjsloaded");var i=Di.createElement("script");i.src=this.h["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",i.onload=function(){t.trigger("vttjsloaded")},i.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){i.onload=null,i.onerror=null}),b.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.dt)},s.emulateTextTracks=function(){var t=this,i=this.textTracks();if(i){var s=this.remoteTextTracks(),e=function(t){return i.tt(t.track)},n=function(t){return i.it(t.track)};s.on("addtrack",e),s.on("removetrack",n),this.dt();var r=function(){return t.trigger("texttrackchange")},h=function(){r();for(var t=0;t0||h>0?n+":":"")+(e=((n||r>=10)&&e<10?"0"+e:e)+":")+(s=s<10?"0"+s:s)}ph.prototype.St="Play",pe.registerComponent("PlayToggle",ph);var gh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"languagechange",e.updateContent),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-current-time-display",innerHTML:'Current Time 0:00'},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),s=this.localize("Current Time"),e=mh(i,this.t.duration());e!==this.Mt&&(this.Mt=e,this.S.innerHTML=''+s+" "+e)},i}(pe);pe.registerComponent("CurrentTimeDisplay",gh);var yh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"durationchange",e.updateContent),e.on(i,"timeupdate",e.updateContent),e.on(i,"loadedmetadata",e.updateContent),e.on(i,"languagechange",e.updateContent),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-duration-display",innerHTML:''+this.localize("Duration Time")+" 0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.duration();if(i&&this.ct!==i){this.ct=i;var s=this.localize("Duration Time"),e=mh(i);this.S.innerHTML=''+s+" "+e}},i}(pe);pe.registerComponent("DurationDisplay",yh);var bh=function(t){function i(){return t.apply(this,arguments)||this}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"
/
"})},i}(pe);pe.registerComponent("TimeDivider",bh);var kh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"durationchange",e.updateContent),e.on(i,"languagechange",e.updateContent),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-remaining-time-display",innerHTML:''+this.localize("Remaining Time")+" -0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){if(this.t.duration()){var i=this.localize("Remaining Time"),s=mh(this.t.remainingTime());s!==this.Mt&&(this.Mt=s,this.S.innerHTML=''+i+" -"+s)}},i}(pe);pe.registerComponent("RemainingTimeDisplay",kh);var wh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateShowing(),e.on(e.player(),"durationchange",e.updateShowing),e.on(e.player(),"languagechange",e.handleLanguagechange),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.S=ns("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.Ct=ns("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.At=Di.createTextNode(this.localize("LIVE")),this.S.appendChild(this.Ct),this.S.appendChild(this.At),i.appendChild(this.S),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.Ct.innerHTML=this.localize("Stream Type"),this.At.innerHTML=this.localize("LIVE")},i}(pe);pe.registerComponent("LiveDisplay",wh);var _h=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).bar=e.getChild(e.h.barName),e.vertical(!!e.h.vertical),e.on("mousedown",e.handleMouseDown),e.on("touchstart",e.handleMouseDown),e.on("focus",e.handleFocus),e.on("blur",e.handleBlur),e.on("click",e.handleClick),e.on(i,"controlsvisible",e.update),e.on(i,e.playerEvent,e.update),e}be(i,t);var s=i.prototype;return s.createEl=function(i,s,e){return void 0===s&&(s={}),void 0===e&&(e={}),s.className=s.className+" vjs-slider",s=qi({tabIndex:0},s),e=qi({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},e),t.prototype.createEl.call(this,i,s,e)},s.handleMouseDown=function(t){var i=this.bar.v.ownerDocument;t.preventDefault(),Di.body.focus(),Di.onselectstart=function(){return!1},this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove),this.on(i,"mouseup",this.handleMouseUp),this.on(i,"touchmove",this.handleMouseMove),this.on(i,"touchend",this.handleMouseUp),this.handleMouseMove(t)},s.handleMouseMove=function(t){},s.handleMouseUp=function(){var t=this.bar.v.ownerDocument;Di.onselectstart=function(){return!0},this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},s.update=function(){if(this.v){var t=this.getPercent(),i=this.bar;if(i){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var s=(100*t).toFixed(2)+"%";this.vertical()?i.el().style.height=s:i.el().style.width=s}}},s.calculateDistance=function(t){var i=ws(this.v,t);return this.vertical()?i.y:i.x},s.handleFocus=function(){this.on(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},s.handleBlur=function(){this.off(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},s.vertical=function(t){return void 0===t?this.Pt||!1:(this.Pt=!!t,this.Pt?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(pe);function xh(t,i){if(!t||!i)return"";if("function"==typeof b.getComputedStyle){var s=b.getComputedStyle(t);return s?s[i]:""}return t.currentStyle[i]||""}pe.registerComponent("Slider",_h);var Ch=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Nt=[],e.on(i,"progress",e.update),e.on(i,"languagechange",e.handleLanguagechange),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Et=ns("span",{innerHTML:this.localize("Loaded")}),this.Bt=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Et),this.Ct.appendChild(this.Bt),i.appendChild(this.Ct),i},s.update=function(t){var i=this.t.buffered(),s=this.t.duration(),e=this.t.bufferedEnd(),n=this.Nt,r=function(t,i){var s=t/i||0;return 100*(s>=1?1:s)+"%"};this.v.style.width=r(e,s);for(var h=0;hi.length;c--)this.v.removeChild(n[c-1]);n.length=i.length},s.handleLanguagechange=function(){this.Et.innerHTML=this.localize("Loaded")},i}(pe);pe.registerComponent("LoadProgressBar",Ch);var Sh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(ge(e),e.updateDataAttr)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&e.addClass("vjs-keep-tooltips-inside"),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"});return this.It=ns("span",{innerHTML:this.localize("Progress")}),this.Ft=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",mh(i,this.t.duration()))},s.handleLanguagechange=function(){this.It.innerHTML=this.localize("Progress")},i}(pe);pe.registerComponent("PlayProgressBar",Sh);var jh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(ge(e),e.updateDataAttr)),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar"});return this.tooltip=ns("div",{className:"vjs-time-tooltip"}),this.It=ns("span",{innerHTML:this.localize("Progress")}),this.Ft=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=mh(this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),this.t.duration());this.v.setAttribute("data-current-time",i),this.tooltip.innerHTML=i},s.handleLanguagechange=function(){this.It.innerHTML=this.localize("Progress")},i}(pe);pe.registerComponent("TooltipProgressBar",jh);var Th=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateProgress),e.on(i,"ended",e.updateProgress),i.ready(n(ge(e),e.updateProgress)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltipProgressBar=e.addChild("TooltipProgressBar")),e}be(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},s.updateProgress=function(t){if(this.updateAriaAttributes(this.v),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.v),this.tooltipProgressBar.v.style.width=this.bar.v.style.width;var i=C(xh(this.player().el(),"width")),s=C(xh(this.tooltipProgressBar.tooltip,"width")),e=this.tooltipProgressBar.el().style;e.maxWidth=_.floor(i-s/2)+"px",e.minWidth=_.ceil(s/2)+"px",e.right="-"+s/2+"px"}},s.updateAriaAttributes=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",mh(i,this.t.duration()))},s.getPercent=function(){var t=this.t.currentTime()/this.t.duration();return t>=1?1:t},s.handleMouseDown=function(i){this.t.scrubbing(!0),this.videoWasPlaying=!this.t.paused(),this.t.pause(),t.prototype.handleMouseDown.call(this,i)},s.handleMouseMove=function(t){var i=this.calculateDistance(t)*this.t.duration();i===this.t.duration()&&(i-=.1),this.t.currentTime(i)},s.handleMouseUp=function(i){t.prototype.handleMouseUp.call(this,i),this.t.scrubbing(!1),this.videoWasPlaying&&this.t.play()},s.stepForward=function(){this.t.currentTime(this.t.currentTime()+5)},s.stepBack=function(){this.t.currentTime(this.t.currentTime()-5)},i}(_h);Th.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},Th.prototype.playerEvent="timeupdate",pe.registerComponent("SeekBar",Th);var Mh=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltip=ns("div",{className:"vjs-time-tooltip"}),e.el().appendChild(e.tooltip),e.addClass("vjs-keep-tooltips-inside")),e.update(0,0),i.on("ready",function(){e.on(i.controlBar.progressControl.el(),"mousemove",function(t,i){var s=Date.now();return function(){var e=Date.now();e-s>=i&&(t.apply(void 0,arguments),s=e)}}(n(ge(e),e.handleMouseMove),25))}),e}be(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},s.handleMouseMove=function(t){var i=this.t.duration(),s=this.calculateDistance(t)*i,e=t.pageX-ks(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=mh(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Dt(i)+1,n=C(xh(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return ws(this.el().parentNode,t).x},s.Dt=function(t){if(!this.keepTooltipsInside)return t;var i=C(xh(this.player().el(),"width")),s=C(xh(this.tooltip,"width"))/2,e=t;return ti-s&&(e=_.floor(i-s)),e},i}(pe);pe.registerComponent("MouseTimeDisplay",Mh);var Ah=function(t){function i(){return t.apply(this,arguments)||this}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(pe);Ah.prototype.h={children:["seekBar"]},pe.registerComponent("ProgressControl",Ah);var Ph=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},s.handleFullscreenChange=function(t){this.t.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},s.handleClick=function(t){this.t.isFullscreen()?this.t.exitFullscreen():this.t.requestFullscreen()},i}(dh);Ph.prototype.St="Fullscreen",pe.registerComponent("FullscreenToggle",Ph);var Nh=function(t){function i(){return t.apply(this,arguments)||this}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},i}(pe);pe.registerComponent("VolumeLevel",Nh);var Eh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.updateARIAAttributes),i.ready(n(ge(e),e.updateARIAAttributes)),e}be(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},s.handleMouseMove=function(t){this.checkMuted(),this.t.volume(this.calculateDistance(t))},s.checkMuted=function(){this.t.muted()&&this.t.muted(!1)},s.getPercent=function(){return this.t.muted()?0:this.t.volume()},s.stepForward=function(){this.checkMuted(),this.t.volume(this.t.volume()+.1)},s.stepBack=function(){this.checkMuted(),this.t.volume(this.t.volume()-.1)},s.updateARIAAttributes=function(t){var i=(100*this.t.volume()).toFixed(2);this.v.setAttribute("aria-valuenow",i),this.v.setAttribute("aria-valuetext",i+"%")},i}(_h);Eh.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},Eh.prototype.playerEvent="volumechange",pe.registerComponent("VolumeBar",Eh);var Bh=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",function(){!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),e}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(pe);Bh.prototype.h={children:["volumeBar"]},pe.registerComponent("VolumeControl",Bh);var Ih=function(t){function i(){return t.apply(this,arguments)||this}be(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,function(){this.unlockShowing()}))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=ns(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.appendChild(this.S),ee(s,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),s},i}(pe);pe.registerComponent("Popup",Ih);var Fh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}be(i,t);var s=i.prototype;return s.update=function(){var t=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=t,this.addChild(t),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},s.createPopup=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},i}(nh);pe.registerComponent("PopupButton",Fh);var Dh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.update),i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",function(){this.update(),!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),e}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.muted(!this.t.muted())},s.update=function(t){var i=this.t.volume(),s=3;this.t.muted()?s=0:i<.33?s=1:i<.67&&(s=2);var e=this.t.muted()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e);for(var n=0;n<4;n++)vs(this.v,"vjs-vol-"+n);fs(this.v,"vjs-vol-"+s)},i}(dh);Dh.prototype.St="Mute",pe.registerComponent("MuteToggle",Dh);var $h=function(t){function i(i,s){var e;function n(){i.H&&!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}return void 0===s&&(s={}),void 0===s.inline&&(s.inline=!0),void 0===s.vertical&&(s.inline?s.vertical=!1:s.vertical=!0),s.volumeBar=s.volumeBar||{},s.volumeBar.vertical=!!s.vertical,(e=t.call(this,i,s)||this).on(i,"volumechange",e.volumeUpdate),e.on(i,"loadstart",e.volumeUpdate),n.call(ge(e)),e.on(i,"loadstart",n),e.on(e.volumeBar,["slideractive","focus"],function(){this.addClass("vjs-slider-active")}),e.on(e.volumeBar,["sliderinactive","blur"],function(){this.removeClass("vjs-slider-active")}),e.on(e.volumeBar,["focus"],function(){this.addClass("vjs-lock-showing")}),e.on(e.volumeBar,["blur"],function(){this.removeClass("vjs-lock-showing")}),e}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){var i="";return i=this.h.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+t.prototype.buildCSSClass.call(this)+" "+i},s.createPopup=function(){var t=new Ih(this.t,{contentElType:"div"}),i=new Eh(this.t,this.h.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},s.handleClick=function(i){Dh.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],n(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove))},i}(Fh);$h.prototype.volumeUpdate=Dh.prototype.update,$h.prototype.St="Mute",pe.registerComponent("VolumeMenuButton",$h);var Rh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).$t=-1,e.on("keydown",e.handleKeyPress),e}be(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,function(t){this.unlockShowing()}))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=ns(i,{className:"vjs-menu-content"}),this.S.setAttribute("role","menu");var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.setAttribute("role","presentation"),s.appendChild(this.S),ee(s,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),s},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},s.stepForward=function(){var t=0;void 0!==this.$t&&(t=this.$t+1),this.focus(t)},s.stepBack=function(){var t=0;void 0!==this.$t&&(t=this.$t-1),this.focus(t)},s.focus=function(t){void 0===t&&(t=0);var i=this.children().slice();i.length&&i[0].className&&/vjs-menu-title/.test(i[0].className)&&i.shift(),i.length>0&&(t<0?t=0:t>=i.length&&(t=i.length-1),this.$t=t,i[t].v.focus())},i}(pe);pe.registerComponent("Menu",Rh);var Uh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e.Rt=!0,e.v.setAttribute("aria-haspopup","true"),e.v.setAttribute("role","menuitem"),e.on("keydown",e.handleSubmenuKeyPress),e}be(i,t);var s=i.prototype;return s.update=function(){var t=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=t,this.addChild(t),this.Ut=!1,this.v.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Ot?this.hide():this.show()},s.createMenu=function(){var t=new Rh(this.t);if(this.Ot=0,this.h.title){var i=ns("li",{className:"vjs-menu-title",innerHTML:fe(this.h.title),tabIndex:-1});this.Ot+=1,t.m.unshift(i),hs(i,t.contentEl())}if(this.items=this.createItems(),this.items)for(var s=0;s=0;i--){var s=t[i];if(s.kind===this.Lt)return s}},s.getMenuCaption=function(){return this.Ht&&this.Ht.label?this.Ht.label:this.localize(fe(this.Lt))},s.createMenu=function(){return this.h.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},s.createItems=function(){var t=[];if(!this.Ht)return t;var i=this.Ht.cues;if(!i)return t;for(var s=0,e=i.length;s=0;s--)t.addChild(new Zh(this.player(),{rate:i[s]+"x"}));return t},s.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},s.handleClick=function(t){for(var i=this.player().playbackRate(),s=this.playbackRates(),e=s[0],n=0;ni){e=s[n];break}this.player().playbackRate(e)},s.playbackRates=function(){return this.h.playbackRates||this.h.playerOptions&&this.h.playerOptions.playbackRates},s.playbackRateSupported=function(){return this.player().H&&this.player().H.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},s.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},s.updateLabel=function(t){this.playbackRateSupported()&&(this.Vt.innerHTML=this.player().playbackRate()+"x")},i}(Uh);to.prototype.St="Playback Rate",pe.registerComponent("PlaybackRateMenuButton",to);var io=function(t){function i(){return t.apply(this,arguments)||this}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},i}(pe);pe.registerComponent("Spacer",io);var so=function(t){function i(){return t.apply(this,arguments)||this}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){var i=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return i.innerHTML=" ",i},i}(io);pe.registerComponent("CustomControlSpacer",so);var eo=function(t){function i(){return t.apply(this,arguments)||this}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(pe);eo.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},pe.registerComponent("ControlBar",eo);var no=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},s.content=function(){var t=this.player().error();return t?this.localize(t.message):""},i}($e);no.prototype.h=ve($e.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),pe.registerComponent("ErrorDisplay",no);var ro="vjs-text-track-settings",ho=["#000","Black"],oo=["#00F","Blue"],ao=["#0FF","Cyan"],uo=["#0F0","Green"],co=["#F0F","Magenta"],lo=["#F00","Red"],fo=["#FFF","White"],vo=["#FF0","Yellow"],po=["1","Opaque"],mo=["0.5","Semi-Transparent"],go=["0","Transparent"],yo={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ho,fo,lo,uo,oo,vo,co,ao]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[po,mo,go]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[fo,ho,lo,uo,oo,vo,co,ao]},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(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[po,mo]},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:[go,mo,po]}};function bo(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}yo.windowColor.options=yo.backgroundColor.options;var ko,wo=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).setDefaults(),e.hide(),e.updateDisplay=n(ge(e),e.updateDisplay),void 0===s.persistTextTrackSettings&&(e.h.persistTextTrackSettings=e.h.playerOptions.persistTextTrackSettings),e.on(e.$(".vjs-done-button"),"click",function(){e.saveSettings(),e.hide()}),e.on(e.$(".vjs-default-button"),"click",function(){e.setDefaults(),e.updateDisplay()}),Hi(yo,function(t){e.on(e.$(t.selector),"change",e.updateDisplay)}),e.h.persistTextTrackSettings&&e.restoreSettings(),e}be(i,t);var s=i.prototype;return s.zt=function(t){var i=this,s=yo[t],e=s.id.replace("%s",this.o);return[ns("label",{className:"vjs-label",textContent:s.label},{for:e}),ns("select",{id:e},void 0,s.options.map(function(t){return ns("option",{textContent:i.localize(t[1]),value:t[0]})}))]},s.Wt=function(){var t=ns("legend",{textContent:this.localize("Text")}),i=this.zt("color"),s=ns("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.zt("textOpacity"));return ns("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Gt=function(){var t=ns("legend",{textContent:this.localize("Background")}),i=this.zt("backgroundColor"),s=ns("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.zt("backgroundOpacity"));return ns("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Xt=function(){var t=ns("legend",{textContent:this.localize("Window")}),i=this.zt("windowColor"),s=ns("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.zt("windowOpacity"));return ns("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Jt=function(){return ns("div",{className:"vjs-tracksettings-colors"},void 0,[this.Wt(),this.Gt(),this.Xt()])},s.Qt=function(){var t=ns("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.zt("fontPercent")),i=ns("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.zt("edgeStyle")),s=ns("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.zt("fontFamily"));return ns("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},s.Yt=function(){var t=ns("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=ns("button",{className:"vjs-done-button",textContent:"Done"});return ns("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},s.createEl=function(){var t=ns("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=ns("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=ns("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=ns("div",void 0,{role:"document"},[i,s,t]);return ns("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":s.id},e)},s.getValues=function(){var t=this;return function(t,i,s){return void 0===s&&(s=0),Li(t).reduce(function(s,e){return i(s,t[e],e)},s)}(yo,function(i,s,e){var n=function(t,i){return bo(t.options[t.options.selectedIndex].value,i)}(t.$(s.selector),s.parser);return void 0!==n&&(i[e]=n),i},{})},s.setValues=function(t){var i=this;Hi(yo,function(s,e){!function(t,i,s){if(i)for(var e=0;e=0;r--){var h=n[r],o=this.h[h];void 0!==o&&(o?ys(t,h,h):bs(t,h),t[h]=o)}return t},s.Zt=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var i=!1,s=function(){i=!0};this.on("loadstart",s);var e=function(){i||this.trigger("loadstart")};return this.on("loadedmetadata",e),void this.ready(function(){this.off("loadstart",s),this.off("loadedmetadata",e),i||this.trigger("loadstart")})}var n=["loadstart"];n.push("loadedmetadata"),t.readyState>=2&&n.push("loadeddata"),t.readyState>=3&&n.push("canplay"),t.readyState>=4&&n.push("canplaythrough"),this.ready(function(){n.forEach(function(t){this.trigger(t)},this)})}},s.ai=function(){var t=this.el().textTracks;if(t){for(var i=0;i0&&(t.v.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",i))}),NaN}return this.v.duration||NaN},s.width=function(){return this.v.offsetWidth},s.height=function(){return this.v.offsetHeight},s.di=function(){var t=this;if("webkitDisplayingFullscreen"in this.v){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},s=function(){"webkitPresentationMode"in this.v&&"picture-in-picture"!==this.v.webkitPresentationMode&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",s),this.on("dispose",function(){t.off("webkitbeginfullscreen",s),t.off("webkitendfullscreen",i)})}},s.supportsFullScreen=function(){if("function"==typeof this.v.webkitEnterFullScreen){var t=b.navigator&&b.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},s.enterFullScreen=function(){var t=this.v;t.paused&&t.networkState<=t.HAVE_METADATA?(this.v.play(),this.setTimeout(function(){t.pause(),t.webkitEnterFullScreen()},0)):t.webkitEnterFullScreen()},s.exitFullScreen=function(){this.v.webkitExitFullScreen()},s.src=function(t){if(void 0===t)return this.v.src;this.setSrc(t)},s.reset=function(){i.resetMediaElement(this.v)},s.currentSrc=function(){return this.bt?this.bt.src:this.v.currentSrc},s.setControls=function(t){this.v.controls=!!t},s.addTextTrack=function(i,s,e){return this.featuresNativeTextTracks?this.v.addTextTrack(i,s,e):t.prototype.addTextTrack.call(this,i,s,e)},s.createRemoteTextTrack=function(i){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,i);var s=Di.createElement("track");return i.kind&&(s.kind=i.kind),i.label&&(s.label=i.label),(i.language||i.srclang)&&(s.srclang=i.language||i.srclang),i.default&&(s.default=i.default),i.id&&(s.id=i.id),i.src&&(s.src=i.src),s},s.addRemoteTextTrack=function(i,s){var e=t.prototype.addRemoteTextTrack.call(this,i,s);return this.featuresNativeTextTracks&&this.el().appendChild(e),e},s.removeRemoteTextTrack=function(i){if(t.prototype.removeRemoteTextTrack.call(this,i),this.featuresNativeTextTracks)for(var s=this.$$("track"),e=s.length;e--;)i!==s[e]&&i!==s[e].track||this.el().removeChild(s[e])},s.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),b.performance&&"function"==typeof b.performance.now?t.creationTime=b.performance.now():b.performance&&b.performance.timing&&"number"==typeof b.performance.timing.navigationStart&&(t.creationTime=b.Date.now()-b.performance.timing.navigationStart),t},i}(sh);is()&&(xo.TEST_VID=Di.createElement("video"),(_o=Di.createElement("track")).kind="captions",_o.srclang="en",_o.label="English",xo.TEST_VID.appendChild(_o)),xo.isSupported=function(){try{xo.TEST_VID.volume=.5}catch(t){return!1}return!(!xo.TEST_VID||!xo.TEST_VID.canPlayType)},xo.canControlVolume=function(){try{var t=xo.TEST_VID.volume;return xo.TEST_VID.volume=t/2+.1,t!==xo.TEST_VID.volume}catch(t){return!1}},xo.canControlPlaybackRate=function(){if($s&&Hs&&qs<58)return!1;try{var t=xo.TEST_VID.playbackRate;return xo.TEST_VID.playbackRate=t/2+.1,t!==xo.TEST_VID.playbackRate}catch(t){return!1}},xo.supportsNativeTextTracks=function(){return Xs},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","volumechange"],xo.prototype.featuresVolumeControl=xo.canControlVolume(),xo.prototype.featuresPlaybackRate=xo.canControlPlaybackRate(),xo.prototype.movingMediaElementInDOM=!Fs,xo.prototype.featuresFullscreenResize=!0,xo.prototype.featuresProgressEvents=!0,xo.prototype.featuresTimeupdateEvents=!0,xo.prototype.featuresNativeTextTracks=xo.supportsNativeTextTracks(),xo.prototype.featuresNativeVideoTracks=xo.supportsNativeVideoTracks(),xo.prototype.featuresNativeAudioTracks=xo.supportsNativeAudioTracks();var Co=xo.TEST_VID&&xo.TEST_VID.constructor.prototype.canPlayType,So=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,jo=/^video\/mp4/i;xo.patchCanPlayType=function(){Rs>=4&&!Vs?xo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&So.test(t)?"maybe":Co.call(this,t)}:Us&&(xo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&jo.test(t)?"maybe":Co.call(this,t)})},xo.unpatchCanPlayType=function(){var t=xo.TEST_VID.constructor.prototype.canPlayType;return xo.TEST_VID.constructor.prototype.canPlayType=Co,t},xo.patchCanPlayType(),xo.disposeMediaElement=function(t){if(t){var i=t.nodeName.toLowerCase();if("video"===i||"audio"===i){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}}},xo.resetMediaElement=function(t){if(t){for(var i=t.querySelectorAll("source"),s=i.length;s--;)t.removeChild(i[s]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(t){xo.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){xo.prototype["set"+fe(t)]=function(i){this.v[t]=i,i?this.v.setAttribute(t,t):this.v.removeAttribute(t)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(t){xo.prototype[t]=function(){return this.v[t]}}),["volume","src","poster","preload","playbackRate"].forEach(function(t){xo.prototype["set"+fe(t)]=function(i){this.v[t]=i}}),["pause","load"].forEach(function(t){xo.prototype[t]=function(){return this.v[t]()}}),sh.withSourceHandlers(xo),xo.nativeSourceHandler={},xo.nativeSourceHandler.canPlayType=function(t){try{return xo.TEST_VID.canPlayType(t)}catch(t){return""}},xo.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return xo.nativeSourceHandler.canPlayType(t.type);if(t.src){var s=function(t){if("string"==typeof t){var i=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(i)return i.pop().toLowerCase()}return""}(t.src);return xo.nativeSourceHandler.canPlayType("video/"+s)}return""},xo.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},xo.nativeSourceHandler.dispose=function(){},xo.registerSourceHandler(xo.nativeSourceHandler),pe.registerComponent("Html5",xo),sh.registerTech("Html5",xo);var To=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],Mo=function(t){function i(s,e,n){var r;if(s.id=s.id||["vjs_video",Ui()].join("_"),(e=qi(i.getTagSettings(s),e)).initChildren=!1,e.createEl=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof s.closest){var h=s.closest("[lang]");h&&(e.language=h.getAttribute("lang"))}else for(var o=s;o&&1===o.nodeType;){if(gs(o).hasOwnProperty("lang")){e.language=o.getAttribute("lang");break}o=o.parentNode}if(!(r=t.call(this,null,e,n)||this).h||!r.h.techOrder||!r.h.techOrder.length)throw new m("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(r.tag=s,r.tagAttributes=s&&gs(s),r.language(r.h.language),e.languages){var a={};w.getOwnPropertyNames(e.languages).forEach(function(t){a[t.toLowerCase()]=e.languages[t]}),r.pi=a}else r.pi=i.prototype.h.languages;r.mi={},r.gi=e.poster||"",r.yi=!!e.controls,s.controls=!1,r.bi=!1,r.v=r.createEl();var u=ve(r.h);if(e.plugins){var c=e.plugins;w.getOwnPropertyNames(c).forEach(function(t){"function"==typeof this[t]?this[t](c[t]):Xi.error("Unable to find plugin:",t)},ge(r))}r.h.playerOptions=u,r.initChildren(),r.isAudio("audio"===s.nodeName.toLowerCase()),r.controls()?r.addClass("vjs-controls-enabled"):r.addClass("vjs-controls-disabled"),r.v.setAttribute("role","region"),r.isAudio()?r.v.setAttribute("aria-label","audio player"):r.v.setAttribute("aria-label","video player"),r.isAudio()&&r.addClass("vjs-audio"),r.ki()&&r.addClass("vjs-no-flex"),Fs||r.addClass("vjs-workinghover"),i.players[r.o]=ge(r);var l="5.20.6-opentelly.14".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.wi(),r.on("fullscreenchange",r._i),r.on("stageclick",r.xi),r}be(i,t);var s=i.prototype;return s.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.Ci&&this.Ci.parentNode&&this.Ci.parentNode.removeChild(this.Ci),i.players[this.o]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.v&&this.v.player&&(this.v.player=null),this.H&&this.H.dispose(),t.prototype.dispose.call(this)},s.createEl=function(){var i,s=this.tag,e=this.Si=s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player");i=this.v=e?s.parentNode:t.prototype.createEl.call(this,"div"),s.setAttribute("tabindex","-1"),s.removeAttribute("width"),s.removeAttribute("height");var n=gs(s);if(w.getOwnPropertyNames(n).forEach(function(t){"class"===t?i.className+=" "+n[t]:i.setAttribute(t,n[t])}),s.playerId=s.id,s.id+="ji",s.className="vjs-tech",s.player=i.player=this,this.addClass("vjs-paused"),!0!==b.VIDEOJS_NO_DYNAMIC_STYLE){this.Ci=le("vjs-styles-dimensions");var r=Ts(".vjs-styles-defaults"),h=Ts("head");h.insertBefore(this.Ci,r?r.nextSibling:h.firstChild)}this.width(this.h.width),this.height(this.h.height),this.fluid(this.h.fluid),this.aspectRatio(this.h.aspectRatio);for(var o=s.getElementsByTagName("a"),a=0;a0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=e[1]/e[0];t=void 0!==this.Ti?this.Ti:void 0!==this.Mi?this.Mi/n:this.videoWidth()||300,i=void 0!==this.Mi?this.Mi:t*n,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),de(this.Ci,"\n ."+s+" {\n width: "+t+"px;\n height: "+i+"px;\n }\n\n ."+s+".vjs-fluid {\n padding-top: "+100*n+"%;\n }\n ")}else{var r="number"==typeof this.Ti?this.Ti:this.h.width,h="number"==typeof this.Mi?this.Mi:this.h.height,o=this.H&&this.H.el();o&&(r>=0&&(o.width=r),h>=0&&(o.height=h))}},s._t=function(t,i){var s=this;this.H&&this.Ei(),"Html5"!==t&&this.tag&&(sh.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Bi=t,this.j=!1;var e=qi({source:i,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Ii",videoTracks:this.rt,textTracks:this.nt,audioTracks:this.ht,autoplay:this.h.autoplay,playsinline:this.h.playsinline,preload:this.h.preload,loop:this.h.loop,muted:this.h.muted,poster:this.poster(),language:this.language(),playerElIngest:this.Si||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(e.tag=this.tag),i&&(this.Fi=i.type,i.src===this.mi.src&&this.mi.currentTime>0&&(e.startTime=this.mi.currentTime),this.mi.sources=null,this.mi.source=i,this.mi.src=i.src);var r=sh.getTech(t);r||(r=pe.getComponent(t)),this.H=new r(e),this.H.ready(n(this,this.Di),!0),Fe(this.$i||[],this.H),To.forEach(function(t){s.on(s.H,t,s["handleTech"+fe(t)+"_"])}),this.on(this.H,"loadstart",this.Ri),this.on(this.H,"waiting",this.Ui),this.on(this.H,"canplay",this.Oi),this.on(this.H,"canplaythrough",this.Vi),this.on(this.H,"playing",this.Li),this.on(this.H,"ended",this.Hi),this.on(this.H,"seeking",this.qi),this.on(this.H,"seeked",this.zi),this.on(this.H,"play",this.Wi),this.on(this.H,"firstplay",this.Gi),this.on(this.H,"pause",this.Xi),this.on(this.H,"durationchange",this.Ji),this.on(this.H,"fullscreenchange",this.Qi),this.on(this.H,"error",this.Yi),this.on(this.H,"loadedmetadata",this.Ai),this.on(this.H,"resize",this.Ai),this.on(this.H,"posterchange",this.Ki),this.on(this.H,"textdata",this.Zi),this.usingNativeControls(this.ts("controls")),this.controls()&&!this.usingNativeControls()&&this.ss(),this.H.el().parentNode===this.contentEl()||"Html5"===t&&this.tag||hs(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},s.Ei=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.$i=Ie(this.H),this.j=!1,this.H.dispose(),this.H=!1},s.tech=function(t){if(t&&t.IWillNotUseThisInPlugins)return this.H;var i="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw b.alert(i),new m(i)},s.ss=function(){this.es(),this.on(this.H,"mousedown",this.ns),this.on(this.H,"touchstart",this.rs),this.on(this.H,"touchmove",this.hs),this.on(this.H,"touchend",this.us),this.on(this.H,"tap",this.cs)},s.es=function(){this.off(this.H,"tap",this.cs),this.off(this.H,"touchstart",this.rs),this.off(this.H,"touchmove",this.hs),this.off(this.H,"touchend",this.us),this.off(this.H,"mousedown",this.ns)},s.Di=function(){if(this.triggerReady(),this.mi.volume&&this.ls("setVolume",this.mi.volume),this.Ki(),this.Ji(),(this.src()||this.currentSrc())&&this.tag&&this.h.autoplay&&this.paused()){try{delete this.tag.poster}catch(t){Xi("deleting tag.poster throws in some browsers",t)}this.play()}},s.Ri=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},s.hasStarted=function(t){return void 0!==t?(this.et!==t&&(this.et=t,t?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.et},s.Wi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},s.Ui=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return t.removeClass("vjs-waiting")})},s.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},s.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},s.Li=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},s.qi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},s.zi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},s.Gi=function(){this.h.starttime&&(Xi.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.h.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},s.Xi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},s.Hi=function(){this.addClass("vjs-ended"),this.h.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},s.Ji=function(){this.duration(this.ts("duration"))},s.ns=function(t){0===t.button&&this.controls()&&(void 0!==this.h&&void 0!==this.h.userActions&&void 0!==this.h.userActions.click&&!1===this.h.userActions.click||(void 0!==this.h&&void 0!==this.h.userActions&&"function"==typeof this.h.userActions.click?this.h.userActions.click.call(this,t):this.paused()?this.play():this.pause()))},s.cs=function(){this.userActive(!this.userActive())},s.rs=function(){this.userWasActive=this.userActive()},s.hs=function(){this.userWasActive&&this.reportUserActivity()},s.us=function(t){t.cancelable&&t.preventDefault()},s._i=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},s.xi=function(){this.reportUserActivity()},s.Qi=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},s.Yi=function(){var t=this.H.error();this.error(t)},s.Zi=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},s.getCache=function(){return this.mi},s.ls=function(t,i){if(this.H&&!this.H.j)this.H.ready(function(){this[t](i)},!0);else try{this.H&&this.H[t](i)}catch(t){throw Xi(t),t}},s.ts=function(t){if(this.H&&this.H.j)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?Xi("Video.js: "+t+" method not defined for "+this.Bi+" playback technology.",i):"TypeError"===i.name?(Xi("Video.js: "+t+" unavailable on "+this.Bi+" playback technology element.",i),this.H.j=!1):Xi(i),i}},s.play=function(){return this.src()||this.currentSrc()?this.ls("play"):this.H.one("loadstart",function(){this.play()}),this},s.pause=function(){return this.ls("pause"),this},s.paused=function(){return!1!==this.ts("paused")},s.scrubbing=function(t){return void 0!==t?(this.bi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.bi},s.currentTime=function(t){return void 0!==t?(this.ls("setCurrentTime",t),this):(this.mi.currentTime=this.ts("currentTime")||0,this.mi.currentTime)},s.duration=function(t){return void 0===t?void 0!==this.mi.duration?this.mi.duration:NaN:((t=C(t))<0&&(t=1/0),t!==this.mi.duration&&(this.mi.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},s.remainingTime=function(){return this.duration()-this.currentTime()},s.buffered=function(){var t=this.ts("buffered");return t&&t.length||(t=_e(0,0)),t},s.bufferedPercent=function(){return xe(this.buffered(),this.duration())},s.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),s=t.end(t.length-1);return s>i&&(s=i),s},s.volume=function(t){var i;return void 0!==t?(i=_.max(0,_.min(1,C(t))),this.mi.volume=i,this.ls("setVolume",i),this):(i=C(this.ts("volume")),S(i)?1:i)},s.muted=function(t){return void 0!==t?(this.ls("setMuted",t),this):this.ts("muted")||!1},s.supportsFullScreen=function(){return this.ts("supportsFullScreen")||!1},s.isFullscreen=function(t){return void 0!==t?(this.ds=!!t,this):!!this.ds},s.requestFullscreen=function(t){var i,s=Me;return this.isFullscreen(!0),s.requestFullscreen?(ee(Di,s.fullscreenchange,n(this,function t(i){this.isFullscreen(Di[s.fullscreenElement]),!1===this.isFullscreen()&&ne(Di,s.fullscreenchange,t),this.trigger("fullscreenchange")})),s.prefixed||(i=this.h.fullscreenOptions,void 0!==t&&(i=t)),this.v[s.requestFullscreen](i)):this.H.supportsFullScreen()?this.ls("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},s.exitFullscreen=function(){var t=Me;return this.isFullscreen(!1),t.requestFullscreen?Di[t.exitFullscreen]():this.H.supportsFullScreen()?this.ls("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},s.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=Di.documentElement.style.overflow,ee(Di,"keydown",n(this,this.fullWindowOnEscKey)),Di.documentElement.style.overflow="hidden",fs(Di.body,"vjs-full-window"),this.trigger("enterFullWindow")},s.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},s.exitFullWindow=function(){this.isFullWindow=!1,ne(Di,"keydown",this.fullWindowOnEscKey),Di.documentElement.style.overflow=this.docOrigOverflow,vs(Di.body,"vjs-full-window"),this.trigger("exitFullWindow")},s.canPlayType=function(t){for(var i,s=0,e=this.h.techOrder;s0&&(e=this.setTimeout(function(){this.ps||this.userActive(!1)},t))}},250)},s.playbackRate=function(t){return void 0!==t?(this.ls("setPlaybackRate",t),this):this.H&&this.H.featuresPlaybackRate?this.ts("playbackRate"):1},s.isAudio=function(t){return void 0!==t?(this.ys=!!t,this):!!this.ys},s.videoTracks=function(){return this.H?this.H.videoTracks():(this.rt=this.rt||new Kr,this.rt)},s.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new th,this.ht)},s.textTracks=function(){if(this.H)return this.H.textTracks()},s.remoteTextTracks=function(){if(this.H)return this.H.remoteTextTracks()},s.remoteTextTrackEls=function(){if(this.H)return this.H.remoteTextTrackEls()},s.addTextTrack=function(t,i,s){if(this.H)return this.H.addTextTrack(t,i,s)},s.addRemoteTextTrack=function(t,i){if(this.H)return this.H.addRemoteTextTrack(t,i)},s.removeRemoteTextTrack=function(t){var i=(void 0===t?{}:t).track,s=void 0===i?arguments[0]:i;if(this.H)return this.H.removeRemoteTextTrack(s)},s.getVideoPlaybackQuality=function(){return this.ts("getVideoPlaybackQuality")},s.videoWidth=function(){return this.H&&this.H.videoWidth&&this.H.videoWidth()||0},s.videoHeight=function(){return this.H&&this.H.videoHeight&&this.H.videoHeight()||0},s.language=function(t){return void 0===t?this.bs:(this.bs!==String(t).toLowerCase()&&(this.bs=String(t).toLowerCase(),void 0!==this.v&&this.trigger("languagechange")),this)},s.languages=function(){return ve(i.prototype.h.languages,this.pi)},s.toJSON=function(){var t=ve(this.h),i=t.tracks;t.tracks=[];for(var s=0;s0||o>0?r+":":"",n=((r||h>=10)&&Number(n)<10?"0"+n:n)+":",e=Number(e)<10?"0"+e:e,s+r+n+e}function Lo(t){return class extends t{get xs(){var t;return null!=(t=this.Cs)?t:this.Cs=Ho(this.player())}dispose(){this.Cs=void 0,super.dispose()}constructor(...t){super(...t),this.Cs=void 0}}}function Ho(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function qo(t){const i=Ho(t),s=()=>{const s=Do(t);t.toggleClass("theo-at-live",function(t,i){if(Fo(t)){const s=t.seekable;return 0===s.length||s.end(s.length-1)-i<10}return!1}(i,s)),t.toggleClass("vjs-live",Fo(i)),t.toggleClass("theo-dvr",function(t){var i;return"dvr"===Pt(t.duration,t.seekable,null==(i=t.source)?void 0:i.streamType)}(i))};t.on("emptied",s),t.on("timeupdate",s),t.on("durationchange",s)}f(),f();function zo(t,i,s){t.toggleClass("theo-ad-playing",i),t.toggleClass("theo-dai-ad-playing",i&&s)}function Wo(){this.userActive(!1)}f(),f(),f();var Go=class{constructor(t,i){this.type=void 0,this.target=void 0,this.playerEvent=void 0,this.type=t.type,this.target=i,this.playerEvent=t}},Xo=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],Jo=Io.getTech("Tech"),Qo=Io.getTech("Html5"),Yo=class extends Jo{Ss(){var t;for(const t of Xo)this.xs.addEventListener(t,this.js);this.xs.addEventListener("error",this.Ts),this.xs.addEventListener("contentprotectionerror",this.Ts),this.xs.addEventListener("sourcechange",this.Ms),this.xs.addEventListener("loadstart",this.As),null==(t=this.xs.presentation)||t.addEventListener(Ai.MODE_CHANGE,this.Ps),this.xs.textTracks.addEventListener("addtrack",this.Ns),this.xs.textTracks.addEventListener("removetrack",this.Es),this.xs.textTracks.addEventListener("change",this.Bs),this.xs.audioTracks.addEventListener("addtrack",this.Is),this.xs.audioTracks.addEventListener("removetrack",this.Fs),this.xs.audioTracks.addEventListener("change",this.Ds)}$s(){var t;for(const t of Xo)this.xs.removeEventListener(t,this.js);this.xs.removeEventListener("error",this.Ts),this.xs.removeEventListener("contentprotectionerror",this.Ts),this.xs.removeEventListener("sourcechange",this.Ms),this.xs.removeEventListener("loadstart",this.As),null==(t=this.xs.presentation)||t.removeEventListener(Ai.MODE_CHANGE,this.Ps),this.xs.textTracks.removeEventListener("addtrack",this.Ns),this.xs.textTracks.removeEventListener("removetrack",this.Es),this.xs.textTracks.removeEventListener("change",this.Bs),this.xs.audioTracks.removeEventListener("addtrack",this.Is),this.xs.audioTracks.removeEventListener("removetrack",this.Fs),this.xs.audioTracks.removeEventListener("change",this.Ds)}Rs(t){this.trigger(new Go(t,this))}createEl(){const t=this.h,i=t.player;if(!i)throw new m(this.localize('Missing required tech option "player"'));const s=i.element;return Io.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.xs}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.xs.buffered}played(){return this.xs.played}reset(){this.xs.stop()}play(){this.xs.play()}pause(){this.xs.pause()}paused(){return this.xs.paused}currentTime(){return this.xs.currentTime}setCurrentTime(t){this.xs.currentTime=t}duration(){return this.xs.duration}volume(){return this.xs.volume}setVolume(t){this.xs.volume=t}muted(){return this.xs.muted}setMuted(t){this.xs.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.xs.src)return this.xs.src;if(this.xs.source){if(!li(this.xs.source.ads))return this.xs.source.ads[0].sources;if(Gt(this.xs.source))return"This source is managed by the Uplynk integration extension.";if(qt(this.xs.source))return"This source is managed by the DAI integration extension.";if(Jt(this.xs.source))return"This source is managed by Millicast."}}}setSrc(t){return this.setSource({src:t})}setSource(t){this.lt=null,this.trigger("error")}currentSrc(){return this.xs.src}load(){this.setPreload("auto")}preload(){return this.xs.preload}setPreload(t){this.xs.preload=t}autoplay(){return this.xs.autoplay}setAutoplay(t){this.xs.autoplay=Boolean(t)}seeking(){return this.xs.seeking}seekable(){return this.xs.seekable}ended(){return this.xs.ended}playbackRate(){return this.xs.playbackRate}setPlaybackRate(t){this.xs.playbackRate=t}readyState(){return this.xs.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.xs.videoHeight}videoWidth(){return this.xs.videoWidth}supportsFullScreen(){return this.xs.presentation.supportsMode(ii.FULLSCREEN)}enterFullScreen(){this.xs.presentation.requestMode(ii.FULLSCREEN)}exitFullScreen(){this.xs.presentation.requestMode(ii.INLINE)}Us(){const t=this.xs.ads;if(t&&t.playing)return!0;const i=this.xs.vr;return!(!i||i.state===Ft.Os)}initTextTrackListeners(){return this.on("touchend",t=>{this.Us()&&(t.preventDefault=()=>{})}),super.initTextTrackListeners()}Zt(){if(!this.src())return;const t=this.readyState();if(0===t){let t=!1;const i=()=>{t=!0};this.on("loadstart",i);const s=()=>{t||this.trigger("loadstart")};return this.on("loadedmetadata",s),void this.ready(()=>{this.off("loadstart",i),this.off("loadedmetadata",s),t||this.trigger("loadstart")})}const i=["loadstart"];i.push("loadedmetadata"),t>=2&&i.push("loadeddata"),t>=3&&i.push("canplay"),t>=4&&i.push("canplaythrough"),this.ready(()=>{for(const t of i)this.trigger(t)})}dispose(){this.$s(),this.xs=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return V}constructor(t={},i){super(t,i),this.xs=void 0,this.js=t=>this.Rs(t),this.Vs=!1,this.Ms=()=>{void 0===this.xs.errorObject&&(this.Rs(new Yt(this.xs.currentTime,this.xs.readyState)),this.Rs(new I),this.Rs(new Zt(this.xs.duration)))},this.As=()=>{this.Rs(new It(this.xs.currentTime))},this.Ns=t=>{this.textTracks().tt(t.track)},this.Is=t=>{this.audioTracks().tt(t.track)},this.Es=t=>{this.textTracks().it(t.track)},this.Fs=t=>{this.audioTracks().it(t.track)},this.Bs=()=>{const t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Ds=()=>{const t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Ps=()=>{if(!this.supportsFullScreen())return;const t=this.Vs,i=this.xs.presentation.currentMode===ii.FULLSCREEN;t!==i&&(this.Vs=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ts=()=>{const t=this.xs.errorObject,i=t&&yt(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.xs=this.h.player,this.Ss();const s=!this.paused();s&&this.pause(),t.preload&&this.setPreload(t.preload),t.autoplay&&this.setAutoplay(t.autoplay),t.muted&&this.setMuted(t.muted),t.source?this.setSrc(t.source):this.Zt(),s&&this.ready(()=>this.play()),this.triggerReady()}};Yo.prototype.featuresFullscreenResize=Qo.prototype.featuresFullscreenResize,Yo.prototype.featuresPlaybackRate=Qo.prototype.featuresPlaybackRate,Yo.prototype.featuresProgressEvents=!0,Yo.prototype.featuresTimeupdateEvents=!0,Yo.prototype.featuresNativeTextTracks=!0,Io.registerTech("THEOplayer",Yo),f(),f(),f(),f();var Ko=class{constructor(t){this.Ls=void 0,this.Hs=t=>{si(this.Ls,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.qs=t=>{ni(this.Ls,"theo-mobile-button-hover")},this.zs=t=>{this.Ls.blur()},this.Ls=t,t.addEventListener("touchstart",this.Hs),t.addEventListener("touchend",this.qs),t.addEventListener("focusin",this.zs)}};f(),f(),f(),f();var Zo=Io.getComponent("Menu"),ta=class extends(Lo(Zo)){get Ws(){return this.player().el()}Gs(){si(this.Ws,"theo-menu-opened")}Xs(){ni(this.Ws,"theo-menu-opened")}constructor(t,i){super(t,i)}};f();var ia=Io.getComponent("MenuItem"),sa=class extends(Lo(ia)){get parentMenu(){return this.Js}buildCSSClass(){return"theo-menu-item vjs-menu-item"}createEl(){const t=super.createEl("li",{className:this.buildCSSClass(),tabIndex:0},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){this.Qs||(this.parentMenu.Ys(this),"tap"!==t.type&&"keydown"!==t.type||(this.Qs=!0,this.trigger("click"),this.Qs=!1))}dispose(){vi.Zs.Ks&&(this.el().removeEventListener("touchstart",this.Hs),this.el().removeEventListener("touchend",this.qs)),super.dispose()}constructor(t,i,s){super(t,z({selectable:!0},i)),this.Js=void 0,this.Qs=!1,this.Hs=t=>{si(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.qs=t=>{ni(this.el(),"theo-mobile-menu-item-hover")},this.Js=s,vi.Zs.Ks&&(this.el().addEventListener("touchstart",this.Hs),this.el().addEventListener("touchend",this.qs))}};f();var ea=Io.getComponent("ClickableComponent"),na=class extends ea{get parentMenu(){return this.Js}get te(){return this.ie}set te(t){this.ie=t,this.el().setAttribute("tabindex",this.te?"0":"-1"),this.se()}buildCSSClass(){return"theo-primary-background theo-menu-header"}createEl(){const t=super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){!this.Qs&&this.te&&(this.Js.ee(),"tap"===t.type&&(this.Qs=!0,this.trigger("click"),this.Qs=!1))}se(){this.te?this.el().setAttribute("aria-label",this.localize("Go back to the previous menu")):this.el().setAttribute("aria-label","")}constructor(t,i,s){super(t,i),this.Js=void 0,this.Qs=!1,this.ie=!1,this.Js=s,this.on(t,"languagechange",this.se)}},ra=class extends ta{get menuHeader(){return this.ne}get menuItems(){return this.children()}addMenuItem(t){t=z({playerOptions:this.h.playerOptions},t);const i=new sa(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}addSubMenuItem(t){t=z({playerOptions:this.h.playerOptions},t);const i=this.re(this.player(),t);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}removeMenuItem(t){this.removeChild(t),this.trigger("menuchange")}buildCSSClass(){return"theo-menu vjs-menu"}Gs(){super.Gs(),s.removeEventListener("resize",this.he),s.addEventListener("resize",this.he),this.show()}oe(){const t=this.ae();if(!t)return;const i=t.getClientRects();vi.Zs.Ks?this.ue(t,i):this.ce(t,i)}ae(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}ce(t,i){}ue(t,i){}Xs(){s.removeEventListener("resize",this.he),super.Xs(),this.hide(),vi.Zs.Ks&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){const t=super.createEl();t.className=this.buildCSSClass();const i=this.contentEl();si(i,"theo-menu-content");const s=new na(this.player(),this.h,this);return i.parentNode.insertBefore(s.el(),i),this.ne=s,t}Ys(t){}show(){return this.oe(),super.show()}dispose(){this.ne&&this.ne.dispose(),super.dispose()}constructor(t,i){super(t,i),this.le=void 0,this.he=()=>this.oe(),this.le=this.player().el(),this.hide(),this.on("menuchange",this.oe)}},ha=class extends ra{get de(){return this.fe}set de(t){this.fe&&this.fe.ve(this),this.fe=t,t&&t.pe(this)}me(t){this.de.ge(t,"replace")}ye(t){t.de.ge(this,"restore")}be(){ni(this.ke,"vjs-hidden"),this.ke.style.opacity="1",super.show()}we(){si(this.ke,"vjs-hidden")}Gs(){this.de&&this.de.Gs(),super.Gs()}Xs(){this.de&&this.de.Xs(),super.Xs(),si(this.ke,"vjs-hidden")}ae(){if(this.de&&this.de._e)return this.de._e.ke}ce(t,i){if(i.length>0){const t=i[0].height,s=i[0].width;this.fe.xe.style.height=t+"px",this.fe.xe.style.width=s+"px"}super.ce(t,i)}constructor(t,i){super(t,i)}};f();var oa=class{get xe(){return this.Ls}get _e(){return this.Ce}pe(t){t.we(),this.Ls.appendChild(t.ke)}ve(t){this.Ls.removeChild(t.ke)}ge(t,i){if(t==this.Ce)return;const s=this.Ce;if(this.Ce=t,this.Ce.be(),this._e.focus(),vi.Zs.Ks)s.we();else{const t="translateX(100%)",e="translateX(-100%)",n=bi("transform");s.ke.style.opacity="0",s.ke.style[n]="replace"===i?e:t,this.Ce.ke.style.opacity="1",this.Ce.ke.style[n]="",u(()=>{s.we(),s.ke.style[n]=""},300)}}Gs(){this.Se(),this.Ce.be(),this.je()}Xs(){this.Se(),this.Ce.we(),this.Te.we(),this.Ce=this.Te,this.je()}je(){fi(()=>{ni(this.Ls,"theo-no-transition"),ni(this.Ce.ke,"theo-no-transition")})}Se(){si(this.Ls,"theo-no-transition"),si(this.Ce.ke,"theo-no-transition")}constructor(t){this.Ce=void 0,this.Te=void 0,this.Ls=void 0,this.le=void 0,this.Te=this.Ce=t,this.Ls=h.createElement("div"),this.Ls.className="theo-tertiary-background theo-menu-animation-container",this.Ls.appendChild(this.Te.ke),this.le=this.Ce.player().el()}};f(),f();var aa=class extends ha{get ke(){return this.el()}get parentMenu(){return this.Me}re(t,i){const s=new ua(t,i,this);return s.subMenu.de=this.de,s}ee(){this.Ae()}Ys(t){super.Ys(t),this.Ae()}Ae(){this.parentMenu.ye(this)}buildCSSClass(){return"theo-submenu "+(this.Pe?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Pe=!0;const i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Me=void 0,this.Pe=!1,this.Me=s,this.menuHeader.te=!0}},ua=class extends sa{get subMenu(){return this.Ne}handleClick(t){this.parentMenu.me(this.subMenu)}constructor(t,i,s){super(t,z({selectable:!1},i),s),this.Ne=void 0,this.Ne=new aa(t,i,s)}},ca=class extends ha{get menuButton(){return this.Ee}createEl(){const t=Io.createEl("div",{className:this.buildCSSClass()});return this.Be=super.createEl(),this.Be.className=super.buildCSSClass(),si(this.Be,"theo-menu-content-animatable"),t.appendChild(this.Be),this.de=new oa(this),t.appendChild(this.de.xe),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}re(t,i){const s=new ua(t,i,this);return s.subMenu.de=this.de,s}ce(t,i){super.ce(t,i);const s=this.le.getClientRects(),e=s.length>0?s[0]:void 0,n=C(getComputedStyle(this.el()).fontSize);Q(this.el(),this.Ee.el(),e,n)}get ke(){return this.Be}ee(){this.Ee.closeMenu()}dispose(){this.Ie||(this.Ie=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ee=void 0,this.Ie=!1,this.Ee=s}};f();var la=class{set Fe(t){this.De.innerHTML=this.$e.localize(t),this.Re()&&this.Ue(),ci(this.$e.el())}get Fe(){return this.De.textContent||""}Re(){return!ti(this.De,"vjs-hidden")}Oe(){this.$e.off("mouseover",this.Ue),this.$e.off("mouseout",this.Ve),this.$e.off("dispose",this.Le),Qt(this.De)}constructor(t,i){this.De=void 0,this.$e=void 0,this.Ue=()=>{ni(this.De,"vjs-hidden");const t=this.$e.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=C(getComputedStyle(this.De).fontSize);Q(this.De,this.$e.el(),i,s)},this.Ve=()=>{si(this.De,"vjs-hidden")},this.Le=()=>this.Oe(),this.$e=t,ci(t.el()),di(t.el()),this.De=h.createElement("span"),this.De.innerHTML=this.$e.localize(i),this.De.className="theo-button-tooltip vjs-hidden",this.De.setAttribute("aria-hidden","true"),this.$e.el().appendChild(this.De),this.$e.on("mouseover",this.Ue),this.$e.on("mouseout",this.Ve),this.$e.on("dispose",this.Le)}},da=Io.getComponent("Button"),fa=class extends(Lo(da)){get He(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.qe}isMenuOpen(){return this.ze}openMenu(){this.We&&!this.ze&&(this.qe.Gs(),this.el().setAttribute("aria-expanded","true"),this.ze=!0,this.qe.focus())}closeMenu(){this.We&&this.ze&&(this.qe.Xs(),this.el().setAttribute("aria-expanded","false"),this.ze=!1)}set minimumMenuItems(t){this.Ge=t,this.Xe()}buildCSSClass(){return"theo-controlbar-button vjs-menu-button vjs-menu-button-popup "+super.buildCSSClass()}createEl(t,i,s){return super.createEl("button",{},{"aria-live":"off"})}handleClick(){this.ze?this.closeMenu():this.openMenu()}enable(){return this.We=!0,super.enable()}disable(){return this.closeMenu(),this.We=!1,super.disable()}se(){this.De.Fe=this.controlText()}dispose(){this.player().removeChild(this.qe),this.qe.dispose(),this.De.Oe(),this.xs.removeEventListener("seeking",this.Je),super.dispose()}constructor(t,i){super(t,i),this.qe=void 0,this.De=void 0,this.ze=!1,this.Ge=1,this.We=!0,this.Qe=t=>{const i=this.el().contains(t.target),s=this.qe.el().contains(t.target);let e=!1;var n;vi.Zs.Ks&&this.He&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.ze||(e&&t.preventDefault(),this.closeMenu())},this.Ye=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.Je=()=>{this.ze&&this.closeMenu()},this.Xe=()=>{this.qe.menuItems.length>=this.Ge?this.show():(this.closeMenu(),this.hide())},this.qe=new ca(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.qe),this.De=new la(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),vi.Zs.Ke?(this.on(h,"touchend",this.Qe),new Ko(this.el())):(this.on(h,"click",this.Qe),this.on(h,"keydown",this.Ye),Si&&this.on(h,Si.Ze,this.closeMenu)),this.xs.addEventListener("seeking",this.Je),this.on(this.qe,"menuchange",this.Xe),this.on(t,"languagechange",this.se),this.Xe()}},va=Io.getComponent("Component"),pa=class extends(Io.getComponent("ControlBar")){addMenuButton(t){t=z({playerOptions:this.h.playerOptions},t);const i=new fa(this.player(),t);return this.addChild(i),i}removeMenuButton(t){this.removeChild(t)}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-secondary-color vjs-control-bar "+super.buildCSSClass()}constructor(t,i){super(t,i),this.addChild("THEOControlBarShadow",void 0,0)}};Io.registerComponent("THEOControlBarShadow",class extends va{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}}),f(),f();var ma=Io.getComponent("VolumeBar"),ga=class extends ma{handleFocus(t){super.handleFocus(t),this.tn.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.tn.removeClass("focus-within")}constructor(t,i){super(t,i),this.tn=void 0,this.tn=i.sn}};f();var ya=Io.getComponent("VolumeControl"),ba=class extends ya{constructor(t,i){super(t,i),this.nn=void 0,this.nn=new ga(t,{sn:this}),this.addChild(this.nn)}};ba.prototype.h=z({},ya.prototype.h,{children:[]}),Io.registerComponent("VolumeControl",ba);var ka=class extends(Lo(pa)){rn(){this.hn(this.an())}un(){0===this.cn&&(this.cn=u(this.ln,100))}dn(t){"opacity"===t.propertyName&&(0!==this.cn&&(c(this.cn),this.cn=0),this.hn(!0))}fn(t){"opacity"===t.propertyName&&(this.an()||this.hn(!1))}an(){return"0"!==s.getComputedStyle(this.el()).opacity}hn(t){this.vn!==t&&(this.vn=t,t?this.pn():this.xs.textTrackStyle.marginBottom=void 0)}pn(){const t=this.el().getBoundingClientRect().height;this.xs.textTrackStyle.marginBottom!==t&&(this.xs.textTrackStyle.marginBottom=t)}dispose(){c(this.cn),this.cn=0,this.gn.mn(pi.yn,this.bn),this.gn.kn(),super.dispose()}constructor(t,i){super(t,i),this.gn=void 0,this.vn=!1,this.cn=0,this.ln=()=>{0!==this.cn&&(this.cn=0,this.hn(this.an()))},this.bn=()=>{this.vn&&this.pn()},this.on(t,"ready",this.rn),this.on(t,"pause",this.rn),this.on(t,"useractive",this.rn),this.on(t,"firstplay",this.un),this.on(t,"play",this.un),this.on(t,"userinactive",this.un),this.on("transitionstart",this.dn),this.on("transitionend",this.fn),this.gn=new wi(this.el()),this.gn.wn(pi.yn,this.bn),this.gn._n(!0)}};ka.prototype.h=z({},pa.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),Io.registerComponent("ControlBar",ka),f();var wa=class extends pa{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};wa.prototype.h=z({},pa.prototype.h,{children:[]}),Io.registerComponent("TopControlBar",wa),f();var _a=Io.getComponent("CurrentTimeDisplay"),xa=class extends(Lo(_a)){updateContent(){const t=Do(this.player()),i=this.xs,s=Ro(i),e=this.localize("Current Time"),n=Vo(_.max(0,t-s),Uo(i));n!==this.Mt&&(this.Mt=n,this.contentEl().innerHTML=''+e+" "+n)}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}};Io.registerComponent("CurrentTimeDisplay",xa),f();var Ca=Io.getComponent("DurationDisplay"),Sa=class extends(Lo(Ca)){updateContent(){const t=this.xs,i=S(t.duration)?NaN:Uo(t),s=t.clip.endTime-t.clip.startTime,e=_.min(i,s)||0;if(this.ct!==e){this.ct=e;const t=this.localize("Duration Time"),i=Vo(e);this.S.innerHTML=''+t+" "+i}}dispose(){var t;null==(t=this.xs)||t.clip.removeEventListener("change",this.xn),super.dispose()}constructor(t,i){var s;super(t,i),this.xn=()=>this.updateContent(),this.off(t,"durationchange",this.updateContent),this.on(t,"durationchange",this.updateContent),this.off(t,"timeupdate",this.updateContent),this.on(t,"timeupdate",this.updateContent),this.off(t,"emptied",this.updateContent),this.on(t,"emptied",this.updateContent),null==(s=this.xs)||s.clip.addEventListener("change",this.xn)}};Io.registerComponent("DurationDisplay",Sa),f();var ja=Io.getComponent("Button"),Ta=class extends(Lo(ja)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){const t=super.createEl("button",{},{"aria-live":"off"});return this.Cn=Io.createEl("span",{className:"theo-live-control-indicator"}),Kt(t,this.Cn),t}createControlTextEl(t){const i=super.createControlTextEl(t);return Io.removeClass(i,"vjs-control-text"),Io.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.xs;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime($o(i)),t.play()}}Sn(){Fo(this.xs)?this.show():this.hide()}constructor(t,i){super(t,i),this.controlText("Live"),this.Sn(),this.on(t,"emptied",this.Sn),this.on(t,"durationchange",this.Sn),vi.Zs.Ke&&new Ko(this.el())}};Io.registerComponent("LiveDisplay",Ta),f();var Ma=Io.getComponent("LoadingSpinner");Io.registerComponent("LoadingSpinner",class extends Ma{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){const t=super.createEl();t.className=this.buildCSSClass();const i=Io.createEl("div",{className:"theo-loading-spinner-rotator"}),s=Io.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=Io.createEl("div",{className:"theo-loading-spinner-circle-right"});return i.appendChild(s),i.appendChild(e),t.appendChild(i),t}constructor(t,i){super(t,i)}}),f();var Aa=Io.getComponent("LoadProgressBar"),Pa=class extends(Lo(Aa)){update(){const t=this.xs,i=Wt.jn(Oo(t)),s=i.Tn(0),e=Wt.jn(t.buffered).Mn(i),n=i.An(0)-s;let r=e.V&&e.An(e.V-1)||0;r=_.max(0,r-s);const o=this.el(),a=this.Pn;o.style.width=Na(r,n);for(let t=0;te.V;t--)o.removeChild(a[t-1]);a.length=e.V}constructor(t,i){super(t,i),this.Pn=[],this.on(t,"emptied",this.update)}};function Na(t,i){const s=t/i||0;return 100*(s>=1?1:s)+"%"}Io.registerComponent("LoadProgressBar",Pa),f();var Ea=Io.getComponent("MouseTimeDisplay"),Ba=class extends(Lo(Ea)){handleMouseMove(t){const i=t,s=this.xs,e=Ro(s)+this.calculateDistance(i)*Uo(s),n=i.pageX-X(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){const i=t,s=this.xs,e=Ro(s)+this.calculateDistance(i)*Uo(s),n=i.touches[0].pageX-X(this.el().parentNode).left;this.update(e,n+"px")}createEl(){const t=super.createEl();return this.Nn=Io.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){this.En=t;const s=this.Bn(t);this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(d(this.Nn,s),this.In())}In(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){const t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=C(getComputedStyle(t).fontSize);Q(this.tooltip,this.el(),s,e)}}Bn(t){const i=this.xs,s=t-$o(i);return Vo(Fo(i)?_.min(s,0):s,Uo(i))}dispose(){var t;this.xs.removeEventListener("dimensionchange",this.Fn),null==(t=this.xs.presentation)||t.removeEventListener(Ai.MODE_CHANGE,this.Fn),super.dispose()}constructor(t,i){var s;(super(t,i),this.En=NaN,this.Fn=()=>{const t=Do(this.player()),i=this.xs;let s=(t-Ro(i))/Uo(i)||0;s=Ci(s,0,1),this.update(t,100*s+"%")},this.keepTooltipsInside&&(Io.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.Nn)),this.on(t,"ready",()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)}),Dt.Ks)&&(this.on(t,"firstplay",this.Fn),this.on(t,"play",this.Fn),this.on(t,"seeking",this.Fn),this.on(t,"seeked",this.Fn),this.on(t,"timeupdate",this.Fn),this.xs.addEventListener("dimensionchange",this.Fn),null==(s=this.xs.presentation)||s.addEventListener(Ai.MODE_CHANGE,this.Fn),this.on(t,"ready",()=>{this.on(t.controlBar.progressControl,"touchstart",this.handleTouchMove),this.on(t.controlBar.progressControl,"touchmove",yi(t=>this.handleTouchMove(t),25)),this.Fn()}))}};Io.registerComponent("MouseTimeDisplay",Ba),f();var Ia=Io.getComponent("PlayProgressBar"),Fa=class extends(Lo(Ia)){updateDataAttr(){const t=Do(this.player());this.el().setAttribute("data-current-time",this.Bn(t))}Bn(t){const i=this.xs;return Vo(t-$o(i),Uo(i))}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-play-progress vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}};Io.registerComponent("PlayProgressBar",Fa),f();var Da=Io.getComponent("RemainingTimeDisplay"),$a=class extends(Lo(Da)){updateContent(){const t=this.xs,i=Uo(t);if(i){const s=Oo(t).end(0),e=this.localize("Remaining Time"),n=Vo(_.max(0,s-this.player().currentTime()),i);n!==this.Mt&&(this.Mt=n,this.contentEl().innerHTML=''+e+" -"+n)}}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}};Io.registerComponent("RemainingTimeDisplay",$a),f(),f();var Ra=class{get xs(){var t;return null!=(t=this.Cs)?t:this.Cs=Ho(this.Dn)}$n(){const t=this.Rn;if(!t)return;const i=this.xs;if(0===i.seekable.length)return;const s=t.cues.slice();this.On.Un(s);for(let t=0;t0&&t.readyState!==kt.ERROR)return t}Zn(t){const i=this.Rn;t!==i&&(i&&(this.tr(),i.removeEventListener("cuechange",this.ir)),this.Rn=t,t&&(t.addEventListener("cuechange",this.ir),this.zn()))}sr(t){this.On.er(t)}nr(){this.On.be()}rr(){this.On.we()}tr(){for(const t of this.Vn)t.Oe();this.On.hr(),this.Vn=[],this.ar=void 0}Oe(){this.Xn(),this.ur.removeEventListener("mousemove",this.cr),this.ur.removeEventListener("mouseenter",this.lr),this.ur.removeEventListener("mouseleave",this.dr),this.Zn(void 0),this.On.Oe(),this.Cs=void 0}constructor(t,i){this.Dn=void 0,this.Ln=void 0,this.On=void 0,this.ur=void 0,this.Rn=void 0,this.Vn=void 0,this.ar=void 0,this.Cs=void 0,this.qn=void 0,this.Wn=void 0,this.Gn=void 0,this.cr=void 0,this.dr=void 0,this.lr=void 0,this.zn=void 0,this.ir=void 0,this.Dn=i,this.Vn=[],this.Cs=void 0,this.qn=()=>{this.Zn(this.Jn())},this.Wn=t=>{const i=t.track;i.kind===jt.Yn&&(i.addEventListener("addcue",this.qn),i.addEventListener("removecue",this.qn),i.addEventListener("readystatechange",this.qn)),this.qn()},this.Gn=t=>{const i=t.track;i.kind===jt.Yn&&(i.removeEventListener("addcue",this.qn),i.removeEventListener("removecue",this.qn),i.removeEventListener("readystatechange",this.qn)),this.qn()},this.cr=t=>{const i=this.xs,s=function(t,i){const s=X(t),e=t.offsetWidth,n=t.offsetHeight,r=s.top,h=s.left;let o,a;!function(t){return void 0!==t.changedTouches}(i)?(a=i.pageX,o=i.pageY):(a=i.changedTouches[0].pageX,o=i.changedTouches[0].pageY);const u=Ci((r-o+n)/n,0,1),c=Ci((a-h)/e,0,1);return{x:c,y:u}}(this.Ln,t);let e=Ro(i)+s.x*Uo(i);e===i.duration&&(e-=.1),this.sr(e)},this.dr=()=>{this.On.we()},this.lr=()=>{this.On.be()},this.zn=()=>{this.Rn&&(this.tr(),this.$n(),this.ir())},this.ir=()=>{var t,i,s;const e=null==(i=this.Rn)||null==(t=i.activeCues)?void 0:t[0],n=Pi(this.Vn,t=>t.pr===e);n!==this.ar&&(null==(s=this.ar)||s.mr(),this.ar=n,null==n||n.gr())},this.ur=t,this.On=new Oa,this.Dn.contentEl().appendChild(this.On.xe),this.Ln=h.createElement("div"),si(this.Ln,"theoplayer-chapterbar"),this.ur.appendChild(this.Ln),this.ur.addEventListener("mousemove",this.cr),this.ur.addEventListener("mouseenter",this.lr),this.ur.addEventListener("mouseleave",this.dr),this.Hn()}},Ua=class{get xe(){return this.Ls}gr(){si(this.Ls,"theoplayer-chapter-indicator-active")}mr(){ni(this.Ls,"theoplayer-chapter-indicator-active")}yr(t,i){const s=t.seekable.start(0),e=t.seekable.end(t.seekable.length-1),n=e-s,r=this.pr.startTime,o=this.pr.endTime,a=o>=s&&r<=e,u=Ci(r-s,0,n),c=Ci(o-s,0,n),l=_.max(0,c-u),d=h.createElement("div");si(d,"theoplayer-chapter-indicator");const f=h.createElement("div");si(f,"theoplayer-chapter-indicator-highlight"),d.appendChild(f),i&&si(d,"theoplayer-chapter-indicator-discontinuous");const v=u/n*100,p=l/n*100;return d.style.display=a?"":"none",d.style.width=p+"%",d.style.left=v+"%",d}Oe(){Qt(this.Ls)}constructor(t,i,s){this.pr=void 0,this.Ls=void 0,this.pr=t,this.Ls=this.yr(i,s)}},Oa=class{we(){this.br--,0===this.br&&ni(this.xe,"theoplayer-chapter-hovering")}Un(t){this.kr=t||[],this.kr.length>0&&(this.xe.style.display="")}wr(t){d(this._r,t.content)}hr(){this.kr=[],d(this._r,""),this.xe.style.display="none"}be(){this.br++,this.br>0&&si(this.xe,"theoplayer-chapter-hovering")}er(t){for(const i of this.kr)if(Va(i,t)){this.wr(i);break}}Oe(){Qt(this.xe)}constructor(){this.kr=[],this.xe=void 0,this._r=void 0,this.br=0,this.xe=h.createElement("div"),si(this.xe,"theoplayer-chaptertitle"),this.xe.style.display="none",this._r=h.createElement("p"),this.xe.appendChild(this._r)}};function Va(t,i){return new Wt([t.startTime,t.endTime]).Cr(i)}var La=Io.getComponent("SeekBar"),Ha=class extends(Lo(La)){updateAriaAttributes(t){const i=Do(this.player()),s=this.xs;t.setAttribute("aria-valuenow",(100*this.Sr(i)).toFixed(2)),t.setAttribute("aria-valuetext",Vo(i-$o(s),Uo(s)))}getPercent(){return this.Sr(this.player().currentTime())}handleMouseMove(t){if(this.xs&&this.xs.ads&&this.xs.ads.playing)return;const i=this.xs;let s=Ro(i)+this.calculateDistance(t)*Uo(i);s>=i.duration&&(s=i.duration-.1),this.Ln.sr(s),this.player().currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.Ln.nr(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.Ln.rr(),super.handleMouseUp(t)}Sr(t){const i=this.xs,s=(t-Ro(i))/Uo(i);return Ci(s,0,1)}dispose(){this.Ln.Oe(),B(this.playingStates)}constructor(t,i){super(t,i),this.Ln=void 0,this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.Ln=new Ra(this.el(),t)}};Io.registerComponent("SeekBar",Ha),f();var qa=Io.getComponent("ProgressControl");vi.Zs.Ks&&Io.registerComponent("ProgressControl",class extends qa{createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(t){this.seekBar.handleMouseMove(t)}handleMouseDown(t){this.seekBar.handleMouseDown(t)}constructor(t,i){super(t,i),this.on(this,"touchmove",this.handleMouseMove),this.on("touchstart",this.handleMouseDown),this.seekBar.off(["touchmove","touchstart"])}}),f();var za=Io.getComponent("TooltipProgressBar"),Wa=class extends(Lo(za)){updateDataAttr(){const t=Do(this.player()),i=this.Bn(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}Bn(t){const i=this.xs;return Vo(t-$o(i),Uo(i))}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-tooltip-progress-bar vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}};function Ga(t){for(const i of t)if(i.enabled)return i}function Xa(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:Ja(t),description:Qa(t),hd:!!t.height&&t.height>=720}}function Ja(t){return t.height?t.height+"p":t.bandwidth?Qa(t):""}function Qa(t){return t.bandwidth?t.bandwidth>1e7?(t.bandwidth/1e6).toFixed(0)+"Mbps":t.bandwidth>1e6?(t.bandwidth/1e6).toFixed(1)+"Mbps":(t.bandwidth/1e3).toFixed(0)+"kbps":""}Io.registerComponent("TooltipProgressBar",Wa),f(),f(),f(),f(),f();var Ya=class{get jr(){return this.Tr}set jr(t){const i=this.Tr;for(let s=i.length-1;s>=0;s--){const e=i[s];N(t,e)||this.Mr(e)}for(const i of t)this.Ar(i);this.Pr.oe()}get Nr(){return this.Pr.menuItems}Er(t){const i=this.Nr;if(i)for(const s of i)if(s.Br===t)return s}Ir(t){const i=this.Pr.addMenuItem();return i.Br=t,i.on("click",()=>this.Fr(i)),i.el().setAttribute("role","menuitemradio"),i}Dr(t){t.dispose()}$r(t){return!0}Ar(t){if(this.$r(t)){N(this.Tr,t)||this.Tr.push(t);const i=this.Er(t)||this.Ir(t);return this.Rr(i),i}this.Mr(t)}Mr(t){const i=this.Er(t);i&&(this.Pr.removeMenuItem(i),this.Dr(i)),A(this.Tr,t)}Oe(){const t=[];for(const i of this.Tr)t.push(i);for(const i of t)this.Mr(i);B(t)}constructor(t){this.Pr=void 0,this.Tr=[],this.Pr=t}},Ka=class extends Ya{Ur(){return this.Or=h.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",d(this.Or,this.Vr.localize("Quality")),this.Or}Lr(){return this.Hr=h.createElement("span"),this.Hr.className="theo-settings-control-menu-quality-automatic",d(this.Hr,this.Vr.localize("Automatic")),this.Hr}qr(){return this.zr=h.createElement("span"),d(this.zr,this.Vr.localize("Automatic")),this.zr}Wr(){return this.Gr=h.createElement("span"),this.Gr.className="theo-primary-color theo-settings-control-menu-item-hd-label",d(this.Gr,this.Vr.localize("HD")),this.Gr}Xr(){const t=h.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.Hr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.zr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Gr),this.Jr.el().appendChild(this.Or),this.Jr.el().appendChild(t),this.Jr.el().setAttribute("aria-label",this.Vr.localize("Open the video quality settings menu"))}Qr(){const t=this.Yr,i=t&&ru(t.targetQuality),s=t&&t.activeQuality,e=Xa(this.Kr(i||s))||{name:this.Vr.localize("Automatic")};d(this.zr,e.name),hi(this.Hr,"vjs-hidden",Boolean(i)),hi(this.Gr,"vjs-hidden",!e.hd)}Rr(t){const i=Xa(t.Br)||{name:this.Vr.localize("Automatic")};let s=i.name;i.hd&&(s+=''+this.Vr.localize("HD")+""),i.description&&(s+=''+i.description+""),t.el().innerHTML=s,t.el().setAttribute("aria-label",this.Vr.localize("Set video quality to ")+i.name),t.Br?t.selected(t.Br===this.Zr):t.selected(!this.Zr)}Fr(t){this.Yr&&(this.Yr.targetQuality=t.Br&&t.Br.videoQualities)}Kr(t,i){const s=i||this.jr;for(const i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Oe(){this.Cs.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.th),this.Vr.off("languagechange",this.se),this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr.removeEventListener("targetqualitychanged",this.sh),this.Yr.removeEventListener("update",this.eh)),super.Oe()}constructor(t,i,s){super(t.subMenu),this.Jr=void 0,this.Cs=void 0,this.Vr=void 0,this.Yr=void 0,this.Zr=void 0,this.Or=void 0,this.Hr=void 0,this.zr=void 0,this.Gr=void 0,this.th=()=>{const t=Ga(this.Cs.videoTracks);if(t===this.Yr)return;let i=[];if(this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr.removeEventListener("targetqualitychanged",this.sh),this.Yr.removeEventListener("update",this.eh)),this.Yr=t,t){t.addEventListener("activequalitychanged",this.ih),t.addEventListener("targetqualitychanged",this.sh),t.addEventListener("update",this.eh);const s=tu(eu(t.qualities.filter(t=>t.available)));i=s.length>1?[void 0,...s]:[void 0]}this.jr=i,this.sh(),this.ih()},this.eh=t=>{const i=t.track;if(i!==this.Yr)return;const s=tu(eu(i.qualities.filter(t=>t.available))),e=i&&ru(i.targetQuality);let n;this.Zr=this.Kr(e,s),n=s.length>1?[void 0,...s]:[void 0],this.jr=n,this.Qr()},this.ih=()=>{this.Ar(void 0),this.Qr()},this.sh=()=>{const t=Ga(this.Cs.videoTracks),i=t&&ru(t.targetQuality),s=this.Kr(i),e=this.Zr;s!==e&&(this.Zr=s,s&&e||this.Ar(void 0),e&&N(this.jr,e)&&this.Ar(e),i&&this.Ar(s),this.Qr())},this.se=()=>{d(this.Pr.menuHeader.el(),this.Vr.localize("Quality")),d(this.Or,this.Vr.localize("Quality")),d(this.Hr,this.Vr.localize("Automatic")),d(this.zr,this.Vr.localize("Automatic")),d(this.Gr,this.Vr.localize("HD")),this.Jr.el().setAttribute("aria-label",this.Vr.localize("Open the video quality settings menu"));for(const t of this.Nr)this.Rr(t);this.Qr()},this.Jr=t,this.Cs=i,this.Vr=s,this.Or=this.Ur(),this.Hr=this.Lr(),this.zr=this.qr(),this.Gr=this.Wr(),this.Xr(),d(this.Pr.menuHeader.el(),this.Vr.localize("Quality")),this.jr=[void 0],this.Cs.videoTracks.addEventListener(["addtrack","removetrack","change"],this.th),this.Vr.on("languagechange",this.se),this.th()}},Za=class{get height(){return this.nh[0].height}get bandwidth(){return this.nh[0].bandwidth}get videoQualities(){return this.nh}get label(){return this.nh[0].label}add(t){this.nh.push(t)}constructor(t){this.nh=void 0,this.nh=t}};function tu(t){const i=[];for(const s of t){const t=s;let e=!1;for(const s of i)if(nu(s,t)){s.add(t),e=!0;break}e||i.push(new Za([t]))}return i}function iu(t,i){return t&&i?Mi(t,i):ji.rh}function su(t,i){return t===i?ji.rh:iu(t.height,i.height)||iu(t.width,i.width)||iu(t.bandwidth,i.bandwidth)}function eu(t){return _i(t,su).reverse()}function nu(t,i){return t.label&&i.label&&t.label===i.label||ct(Xa(t),Xa(i))}function ru(t){return Lt(t)?1===t.length?t[0]:void 0:t}function hu(t){return 1===t?"Normal":""+_.round(100*t)/100}f();var ou=class extends Ya{Ur(){return this.Or=h.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",d(this.Or,this.Vr.localize("Speed")),this.Or}Xr(){const t=h.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Jr.el().appendChild(this.Or),this.Jr.el().appendChild(t),this.Jr.el().setAttribute("aria-label",this.Vr.localize("Open the video speed settings menu")),t}Ir(t){const i=super.Ir(t);return this.Rr(i),i}Rr(t){const i=t.Br,s=this.Vr.localize(hu(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Vr.localize("Set video speed to ")+s),t.selected(t.Br===this.Cs.playbackRate)}Fr(t){this.Cs.playbackRate=t.Br}Oe(){this.Cs.removeEventListener("ratechange",this.hh),this.Vr.off("languagechange",this.se),super.Oe()}constructor(t,i,s,e){super(t.subMenu),this.Jr=void 0,this.Cs=void 0,this.Vr=void 0,this.oh=void 0,this.Or=void 0,this.ah=void 0,this.hh=()=>{this.oh&&this.Ar(this.oh);const t=this.Cs.playbackRate;this.oh=t,d(this.ah,this.Vr.localize(hu(t))),t&&this.Ar(t)},this.se=()=>{d(this.Pr.menuHeader.el(),this.Vr.localize("Speed")),d(this.Or,this.Vr.localize("Speed")),this.Jr.el().setAttribute("aria-label",this.Vr.localize("Open the video speed settings menu"));for(const t of this.Nr)this.Rr(t);this.hh()},this.Jr=t,this.Cs=i,this.Vr=s,this.Or=this.Ur(),this.ah=this.Xr(),d(this.Pr.menuHeader.el(),this.Vr.localize("Speed")),this.jr=e,this.Cs.addEventListener("ratechange",this.hh),this.Vr.on("languagechange",this.se),this.hh()}};Io.registerComponent("SettingsButton",class extends fa{createEl(){const t=super.createEl();return this.uh=Io.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),d(this.uh,this.localize("HD")),t.appendChild(this.uh),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}se(){super.se(),d(this.uh,this.localize("HD")),d(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr=void 0),this.xs.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.dh),this.fh.Oe(),this.ph.Oe(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.mh=void 0,this.fh=void 0,this.gh=void 0,this.ph=void 0,this.Yr=void 0,this.dh=()=>{const t=Ga(this.xs.videoTracks);t!==this.Yr&&(this.Yr&&this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr=t,t&&t.addEventListener("activequalitychanged",this.ih),this.ih())},this.ih=()=>{var t;const i=null==(t=this.Yr)?void 0:t.activeQuality,s=Boolean(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},si(this.menu.el(),"theo-settings-control-menu"),d(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.De.Fe=this.controlText(),this.mh=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.fh=new Ka(this.mh,this.xs,t);const n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.gh=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.ph=new ou(this.gh,this.xs,t,n),this.xs.videoTracks.addEventListener(["addtrack","removetrack","change"],this.dh),this.dh()}}),f(),f(),f();var au=class extends Ya{yh(t){const i=t.label;if(i)return i;const s=t.language;if(s){const t=St(s);if(t)return t.bh}return s||""}kh(){this.jr=this.wh}Oe(){this.wh.removeEventListener("addtrack",this._h),this.wh.removeEventListener("removetrack",this.xh),this.wh.removeEventListener("change",this.Ch),super.Oe()}constructor(t,i){super(t),this.wh=void 0,this._h=t=>{const i=t.track;this.Ar(i),i.addEventListener("update",this.Sh)},this.xh=t=>{const i=t.track;this.Mr(i),i.removeEventListener("update",this.Sh)},this.Ch=t=>this.kh(),this.Sh=()=>{for(const t of this.jr)this.Ar(t)},this.wh=i,this.wh.addEventListener("addtrack",this._h),this.wh.addEventListener("removetrack",this.xh),this.wh.addEventListener("change",this.Ch),this.kh()}},uu=class extends au{Rr(t){const i=t.Br,s=this.Vr.localize(this.yh(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Vr.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}Fr(t){const i=t.Br;for(const t of this.xs.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Oe(){this.Vr.off("languagechange",this.se),super.Oe()}constructor(t,i,s){super(t,i.audioTracks),this.xs=void 0,this.Vr=void 0,this.se=()=>{d(this.Pr.menuHeader.el(),this.Vr.localize("Language"));for(const t of this.Nr)this.Rr(t)},this.xs=i,this.Vr=s,d(this.Pr.menuHeader.el(),this.Vr.localize("Language")),this.Vr.on("languagechange",this.se)}};Io.registerComponent("audioTrackButton",class extends fa{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.jh.Oe(),super.dispose()}constructor(t,i){super(t,i),this.jh=void 0,this.minimumMenuItems=2,this.jh=new uu(this.menu,this.xs,t),this.controlText("Language"),this.De.Fe=this.controlText()}}),f(),f();var cu=class extends au{$r(t){return!!super.$r(t)&&(!t.forced&&At(t.kind))}Ir(t){const i=super.Ir(t);si(i.el(),"theo-text-track-menu-item");const s=h.createElement("span");i.Th=s;const e=h.createElement("div");e.className="theo-text-track-menu-item-toggle",i.Mh=e;const n=t=>this.Ah(t,i);i.Ph=n,e.addEventListener("click",n);const r=h.createElement("div");return r.className="theo-text-track-menu-item-toggle-slider",e.appendChild(r),i.el().appendChild(s),i.el().appendChild(e),i}Rr(t){const i=t,s=i.Br,e=this.Vr.localize(this.yh(s));d(i.Th,e),i.el().setAttribute("aria-label",this.Vr.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===Ct.Kn)}Dr(t){const i=t;i.Mh.removeEventListener("click",i.Ph),super.Dr(t)}Fr(t){const i=t.Br;for(const t of this.xs.textTracks)t!==i&&T(t.kind,i.kind)&&(t.mode=Ct.Nh);i.mode!==Ct.Kn?i.mode=Ct.Kn:i.mode=Ct.Nh}Ah(t,i){t.stopImmediatePropagation(),this.Fr(i)}Oe(){this.Vr.off("languagechange",this.se),super.Oe()}constructor(t,i,s){super(t,i.textTracks),this.xs=void 0,this.Vr=void 0,this.se=()=>{d(this.Pr.menuHeader.el(),this.Vr.localize("Subtitles"));for(const t of this.Nr)this.Rr(t)},this.xs=i,this.Vr=s,d(this.Pr.menuHeader.el(),s.localize("Subtitles")),this.Vr.on("languagechange",this.se)}};Io.registerComponent("subtitlesButton",class extends fa{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.jh.Oe(),super.dispose()}constructor(t,i){super(t,i),this.jh=void 0,this.jh=new cu(this.menu,this.xs,t),this.controlText("Subtitles"),this.De.Fe=this.controlText()}}),f();var lu=Io.getComponent("playToggle"),du=class extends(Lo(lu)){handleClick(t){this.xs.muted||this.xs.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.De.Fe=this.controlText()}handlePause(t){this.xs.ended||(super.handlePause(t),this.controlText("Play"),this.De.Fe=this.controlText())}se(){this.De.Fe=this.controlText()}dispose(){this.De.Oe(),this.xs.removeEventListener("ended",this.Eh),super.dispose()}constructor(t,i){super(t,i),this.De=void 0,this.Eh=()=>{this.controlText("Replay"),this.De.Fe=this.controlText()},this.controlText("Play"),this.De=new la(this,this.controlText()),this.xs.addEventListener("ended",this.Eh),this.on(t,"languagechange",this.se),vi.Zs.Ke&&new Ko(this.el())}};Io.registerComponent("playToggle",du),f();var fu=Io.getComponent("fullscreenToggle"),vu=class extends(Lo(fu)){handleClick(t){this.xs.prepareWithUserAction(),super.handleClick(t)}handleFullscreenChange(t){super.handleFullscreenChange(t),this.updateContent()}updateContent(){const t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.De.Fe=this.controlText()}dispose(){this.De.Oe(),super.dispose()}constructor(t,i){super(t,i),this.De=void 0,this.controlText("Fullscreen"),this.De=new la(this,this.controlText()),vi.Zs.Ke&&new Ko(this.el()),this.on(t,"languagechange",this.updateContent)}};Io.registerComponent("fullscreenToggle",vu),f();var pu=Io.getComponent("muteToggle"),mu=class extends(Lo(pu)){handleClick(t){this.xs.muted&&!this.xs.paused&&this.xs.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.se()}se(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.De.Fe=this.controlText()}dispose(){this.De.Oe(),super.dispose()}constructor(t,i){super(t,i),this.De=void 0,this.controlText("Mute"),this.De=new la(this,this.controlText()),vi.Zs.Ke&&new Ko(this.el()),this.on(t,"languagechange",this.se),U&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",()=>{this.removeClass("vjs-hidden")}))}};Io.registerComponent("muteToggle",mu),f();var gu=Io.getComponent("BigPlayButton"),yu="theo-play-svg-circle",bu='\n \n \n \n \n \n',ku=class extends(Lo(gu)){createEl(){const t=super.createEl(),i=Io.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML=bu,t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.xs.muted||this.xs.prepareWithUserAction(),super.handleClick(t),void 0!==this.xs.vr&&"unavailable"!==this.xs.vr.state&&(this.xs.vr.useDeviceMotionControls=!0)}};Io.registerComponent("BigPlayButton",ku),f();var wu=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;Io.registerComponent("MouseTimeDisplay",class extends Ba{Bh(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Ih&&(this.Ih=i,this.Fh=i.src?vi.Dh(i.src).href:void 0,this.Ih.addEventListener(["addcue","removecue"],this.$h),this.Rh())}Uh(t){t.track===this.Ih&&this.Oh()}createEl(){const t=super.createEl();return this.Vh=Io.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.Lh=Io.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){super.update(t,i),this.keepTooltipsInside&&this.Hh(t)}Hh(t){let i;if(this.Ih&&this.Ih.cues){const s=function(t,i){let s=t[0];for(const e of t)if(e.startTime<=i)s=e;else if(i>=e.endTime)return s;return s}(this.Ih.cues,t);i=s&&s.content}if(i===this.qh)return;if(this.qh=i,Io.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",Boolean(i)),!i)return void this.zh();const s=i.match(wu);if(s){let[,t,i,e,n,r]=s;t=this.Wh(t);const h={Gh:Number(i),Xh:Number(e),Ti:Number(n),Mi:Number(r)};this.Jh(t,h)}else{const t=this.Wh(i);this.Jh(t)}}Rh(){S(this.En)||this.Hh(this.En)}Wh(t){return this.Ih&&this.Fh?vi.Dh(t,this.Fh).href:t}Jh(t,i){this.Vh&&(this.Vh.src!==t?(this.Vh.onload=()=>{this.Qh(i)},this.Vh.src="",this.Vh.src=t):this.Qh(i))}Qh(t){if(!this.Lh||!this.Vh)return;const i=this.Lh.getContext("2d");i&&(null!=t||(t={Gh:0,Xh:0,Ti:this.Vh.naturalWidth,Mi:this.Vh.naturalHeight}),this.Lh.width=t.Ti,this.Lh.height=t.Mi,i.drawImage(this.Vh,t.Gh,t.Xh,t.Ti,t.Mi,0,0,t.Ti,t.Mi),this.Yh(this.Lh))}Yh(t){this.Kh||(Kt(this.tooltip,t),this.Kh=t),this.In()}zh(){this.Kh&&(this.tooltip.removeChild(this.Kh),this.Kh=void 0,this.In())}Oh(){void 0!==this.Ih&&(this.Ih.removeEventListener(["addcue","removecue"],this.$h),this.Ih=void 0),this.Fh=void 0,this.zh(),this.qh=void 0}dispose(){this.Oh(),super.dispose()}constructor(t,i){super(t,i),this.Kh=void 0,this.Ih=void 0,this.Fh=void 0,this.Zh=t=>this.Bh(t),this.io=t=>this.Uh(t),this.$h=t=>this.Rh(),this.qh=void 0,this.showThumbnails=()=>{this.Kh&&this.Kh.hidden&&(this.Kh.hidden=!1,this.In())},this.hideThumbnails=()=>{!this.Kh||this.Kh.hidden||this.player().scrubbing()||(this.Kh.hidden=!0,this.In())},this.on(this.player().textTracks(),"addtrack",this.Zh),this.on(this.player().textTracks(),"removetrack",this.io),Dt.Ks&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}}),f();var _u=Io.getComponent("VolumeLevel");Io.registerComponent("VolumeLevel",class extends _u{createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}}),f(),f();var xu=Io.getComponent("Component"),Cu=class extends xu{createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};Cu.prototype.h=z({},Cu.prototype.h,{children:[]}),Io.registerComponent("controlBarMenuContainer",Cu);var Su=Io.getComponent("Player"),ju=class extends Su{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),Qt(i),this.Si&&s&&(e?s.insertBefore(t,e):s.appendChild(t)),h.body.removeEventListener("keydown",this.handleKeyPress),h.body.removeEventListener("click",this.handleClick)}constructor(t,i,s){super(t,i,s),this.handleKeyPress=t=>{9===t.which&&this.addClass("theo-probably-keyboard-focus")},this.handleClick=t=>{0===t.x&&0===t.y||this.removeClass("theo-probably-keyboard-focus")},h.body.addEventListener("keydown",this.handleKeyPress),h.body.addEventListener("click",this.handleClick)}};ju.prototype.h=z({},Su.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),Io.registerComponent("Player",ju),f(),f();var Tu=Io.getComponent("Player"),Mu=Tu.prototype.ns;Tu.prototype.ns=function(t){if(!(this.H&&this.H.Us&&this.H.Us()))return Mu.call(this,t)};var Au=Tu.prototype.createEl;function Pu(t,i,e,n){const r=z({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},e);r.controlBar=z({progressControl:{keepTooltipsInside:!0}},r.controlBar);const h=r.techOrder||(r.techOrder=[]);-1===h.indexOf("THEOplayer")&&h.unshift("THEOplayer");(r.theoplayer||(r.theoplayer={})).player=t,e&&zt(e.language)&&(r.languages=z({},r.languages,{[xt]:e.language}),r.language=xt),i.setAttribute("data-vjs-player","");const o=i.getAttribute("style"),a=Io(t.element,r,n);return a.ready(()=>{qo(a),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===Tt.so;zo(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.uplynk){var s;const e=i=>{const s="adbreakbegin"===i.type;zo(t,s,!1)};null==(s=i.uplynk)||s.ads.adBreaks.addEventListener("addadbreak",t=>{t.adBreak.addEventListener("adbreakbegin",e),t.adBreak.addEventListener("adbreakend",e)})}i.addEventListener("sourcechange",()=>{zo(t,!1,!1)})}}(a,t),function(t){t.on("mouseleave",Wo)}(a)}),i.removeAttribute("data-vjs-player"),o?i.setAttribute("style",o):i.removeAttribute("style"),vi.Zs.Ks&&(si(i,"theo-mobile"),function(t){const i=s.outerHeight,e=s.outerWidth,n=i>e;n?(ni(t,"theo-mobile-landscape"),si(t,"theo-mobile-portrait")):(ni(t,"theo-mobile-portrait"),si(t,"theo-mobile-landscape"))}(i)),function(t){t.on("seeking",()=>{ti(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()})}(a),a}Tu.prototype.createEl=function(){const t=Au.call(this),i=Io.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t},f(),f(),f(),f();var Nu=Io.getComponent("Button");var Eu="THEOPiPCloseButton";Io.registerComponent(Eu,class extends Nu{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.no.eo()}constructor(t,i){if(super(t,i),this.no=void 0,this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.no)}(i))throw new m("Invalid Picture-in-picture options.");this.no=i.no}});var Bu=class extends Y{get ro(){return this.ho}get oo(){return this.t.ds()}ao(){this.t.wn(it.uo,this.co),this.lo||this.t.wn(it.do,this.fo),this.t.vo.on("languagechange",this.se)}po(){var t;return"theo-pip-"+(null!=(t=this.mo)?t:"bottom-right")}yo(t){const i=this.bo;i&&!this.oo&&(this.ko||this.wo(),this._o(),si(i,"theo-pip"),si(i,this.po()),this.ho=!0,this.xo=t,this.Co=!1,this.So(new Ni(ii.PICTURE_IN_PICTURE)))}jo(t){const i=this.bo;i&&(this.To(),ni(i,"theo-pip"),ni(i,this.po()),this.ho=!1,this.Co=t,this.Mo=this.xo,this.xo=!1,this.So(new Ni(ii.INLINE)))}wo(){if(!this.ko){const t=this.t.vo;t.addChild(Eu,{no:this});const i=h.createElement("div");i.className="theo-pip-overlay",this.Ao=h.createElement("div"),this.Ao.className="theo-pip-overlay-text",d(this.Ao,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.Ao),Kt(t.el(),i),this.Po=i,this.ko=!0}}No(){this.Eo&&!this.Bo&&this.t.Io&&(this.Fo=this.t.Io.Do(et,this.$o),this.Bo=!0)}Ro(){this.Fo&&this.t.Io&&(this.t.Io.Uo(this.Fo),this.Bo=!1)}_o(){const t=this.t.vo.contentEl(),i=t.getBoundingClientRect(),s=h.documentElement.clientWidth,e=h.documentElement.clientHeight;t.style.top=i.top+"px",t.style.bottom=e-i.bottom+"px",t.style.right=s-i.right+"px",t.style.left=i.left+"px",t.style.width=i.width+"px",t.style.height=i.height+"px",t.style.position="fixed"}To(){const t=this.t.vo.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}Oo(){ni(this.bo,"theo-pip"),this.ro&&this.mo&&ni(this.bo,"theo-pip-"+this.mo),this.Po&&(Qt(this.Po),this.Po=void 0)}kn(){this.Oo(),this.Ro(),this.Vo(),this.t.mn(it.uo,this.co),this.t.mn(it.do,this.fo),this.t.vo.off("languagechange",this.se),this.t=void 0}constructor(t,i,s){super(),this.Lo=void 0,this.mo=void 0,this.lo=void 0,this.t=void 0,this.bo=void 0,this.Ho=!1,this.ho=!1,this.Co=!1,this.xo=!1,this.ko=!1,this.eo=void 0,this.Bo=!1,this.Fo=void 0,this.Po=void 0,this.Ao=void 0,this.Mo=!1,this.Eo=void 0,this.co=()=>{this.Ho=!0,this.Eo&&!this.ro&&this.Fo&&this.Lo&&this.Fo.qo<=this.Lo&&this.yo(!1)},this.fo=()=>{this.lo||(this.Ho=!1,this.eo(),this.jo(!1))},this.se=()=>{if(this.Ao){const t=this.t.vo;d(this.Ao,t.localize("Video playing in Picture-in-Picture mode"))}},this.$o=t=>{!this.xo&&this.Eo&&(S(t)||(this.Lo&&t<=this.Lo||this.Mo?this.ho||this.Co||this.yo(!1):this.ho?this.jo(!1):this.Co=!1))},this.Lo=i.visibility,this.mo=i.position,this.lo=i.retainPresentationModeOnSourceChange,this.Eo=void 0!==this.Lo,this.t=t,this.bo=t.zo,this.eo=s,this.ao()}},Iu=class extends E{Wo(){const t=super.Wo();return t===ii.INLINE&&this.Go.ro?ii.PICTURE_IN_PICTURE:t}Xo(t){return t===ii.PICTURE_IN_PICTURE||super.Xo(t)}Jo(t){this.Qo=this.Yo,t===ii.FULLSCREEN||t===ii.NATIVE_PICTURE_IN_PICTURE?this.Go.Ro():this.Go.No(),super.Jo(t)}Ko(t){super.Ko(t),t===ii.PICTURE_IN_PICTURE?$(this.ta.Zo(t=>this.ia(t))):t===ii.FULLSCREEN?this.Go.jo(!1):this.Go.jo(!0)}async ia(t){F(t),await Promise.all([this.sa(),this.ea.jo()]).catch(mi),F(t),this.Go.yo(!this.na),this.So(new Ni(this.Yo)),this.na=!1,this.ra=!1}_i(){this.ra||(this.Go.ro&&this.ha.ds?this.Jo(ii.FULLSCREEN):this.Qo!==ii.PICTURE_IN_PICTURE||this.ha.ds?super._i():(this.na=!0,this.Jo(ii.PICTURE_IN_PICTURE)))}kn(){super.kn(),this.Go.kn(),this.oa.mn(it.uo,this.aa),this.oa=void 0}constructor(t,i,s,e){super(i,s),this.oa=void 0,this.Go=void 0,this.Qo=ii.INLINE,this.na=!1,this.eo=()=>{this.Yo===ii.PICTURE_IN_PICTURE&&this.Jo(ii.INLINE)},this.ua=t=>{this.ra||(this.Yo!==ii.PICTURE_IN_PICTURE||this.Go.ro?this.Yo!==ii.PICTURE_IN_PICTURE&&this.Go.ro&&(this.na=!0,this.Jo(ii.PICTURE_IN_PICTURE)):this.Jo(ii.INLINE))},this.aa=()=>{this.Wo()!==ii.PICTURE_IN_PICTURE&&this.Wo()!==ii.INLINE||this.Go.No(),this.oa.mn(it.uo,this.aa)},this.oa=t,this.Go=new Bu(t,e.pip,this.eo),this.Go.wn(Ai.MODE_CHANGE,this.ua),this.oa.wn(it.uo,this.aa)}};f();var Fu=class extends Y{get ca(){return Ti.la(this.vo.el())||this.vo.supportsFullScreen()}get ds(){return this.vo.isFullscreen()||this.da}yo(){this.vo.requestFullscreen()}jo(){this.vo.exitFullscreen(),this.fa.jo()}kn(){this.Vo(),this.vo.off("fullscreenchange",this.va),this.fa.mn(oi.pa,this.va),this.fa.mn(oi.ma,this.Rs),this.vo.isFullWindow&&this.vo.exitFullscreen()}constructor(t,i){super(),this.vo=void 0,this.fa=void 0,this.Vs=!1,this.da=!1,this.ga=!1,this.va=()=>{if(this.ga)return;const t=this.Vs,i=this.ds;t!==i&&(this.Vs=i,this.So(new xi))},this.ya=()=>{this.da=this.fa.ds,this.va()},this.ba=()=>{this.ga||(this.vo.isFullWindow&&this.vo.supportsFullScreen()||this.da&&!this.vo.supportsFullScreen())&&(this.ga=!0,this.vo.exitFullscreen(),this.vo.requestFullscreen(),this.ga=!1,this.va())},this.vo=t,this.fa=i,this.vo.on("fullscreenchange",this.va),this.fa.wn(oi.pa,this.ya),this.fa.wn(oi.ka,this.ba),this.fa.wn(oi.ma,this.Rs),this.va()}};function Du(t){return class extends t{get Io(){return this.wa}ds(){return this._a.Wo()===ii.FULLSCREEN}xa(){return function(t,i){const s=w.create(t),e=i.vo;return at(s,{get controls(){return e.controls()},set controls(t){e.controls(vt(t))},get presentation(){return i._a.Ca},get presentationMode(){return i._a.Wo()},set presentationMode(t){const s=ri(t);s&&i._a.Jo(s)},get ui(){return e},get visibility(){return i.Io.Ca}})}(this.Sa,this)}kn(){super.kn(),this._a.kn(),this.ja.kn(),this.vo.dispose(),this.wa.kn()}Ta(t){this.vo.src(""),super.Ta(t)}constructor(t,i,s){super(i,s),this.zo=void 0,this.vo=void 0,this.Sa=void 0,this.wa=void 0,this._a=void 0,this.ja=void 0,this.zo=t,this.wa=new rt(t),this.Sa=super.xa(),w.defineProperty(this.Sa,"constructor",{value:lt}),this.vo=Pu(this.Sa,this.zo,s.ui),this.ja=new Fu(this.vo,this.Ma),this._a=new Iu(this,this.ja,this.Pa.Aa(),s),this._a.wn(Ai.MODE_CHANGE,this.Rs)}}}function $u(t){return(t=t||{}).position=function(t){switch(t){case"top-left":case"top-right":case"bottom-left":case"bottom-right":return t;default:return}}(t.position),t.visibility=function(t){if(Ut(t)&&!S(t))return Ci(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=vt(t.retainPresentationModeOnSourceChange),t}f(),f();var Ru=ki(()=>{let t=Du(ut());return t=function(t){let i=t;for(const t of Ei)i=t(i);return i}(t),t});function Uu(t,i){const s=function(t){const i=ei(t);return i.ui=i.ui||{},void 0!==(null==t?void 0:t.width)&&void 0===i.ui.width&&(i.ui.width=t.width),void 0!==(null==t?void 0:t.height)&&void 0===i.ui.height&&(i.ui.height=t.height),void 0!==(null==t?void 0:t.fluid)&&void 0===i.ui.fluid&&(i.ui.fluid=t.fluid),i.pip=$u(i.pip),i}(i),e=h.createElement("div");ai(e),t.appendChild(e);const n=new(Ru())(t,e,s);n.Na=n;let r=n.Ca;return n.Ea(),n.Ba(ot),w.defineProperty(r,"constructor",{value:Uu}),r=ht(r),Ht(n),function(t){for(const i of Ii)i(t)}(n),r}f(),f(),f();var Ou="theo-cast-",Vu=Io.getComponent("Button"),Lu=class extends(Lo(Vu)){get Ia(){throw new m("Fa")}get Da(){return this.h.Da}get $a(){return this.h.$a}buildCSSClass(){return Ou+"button theo-"+this.$a+"-button theo-controlbar-button "+super.buildCSSClass()}createEl(t,i,s){const e=super.createEl(),n=h.createElement("div");n.className="theo-button-icon-blur";const r=h.createElement("div");return r.className=Ou+"svg-container",r.innerHTML=this.Da,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.Ra===ui.AVAILABLE)null==(i=this.Ia)||i.start();else if(this.Ra===ui.CONNECTED||this.Ra===ui.CONNECTING){var s;null==(s=this.Ia)||s.stop()}}Ua(t){ni(this.bo,"theo-"+this.$a+"-"+this.Ra),this.Ra=t,si(this.bo,"theo-"+this.$a+"-"+this.Ra),this.se()}se(){this.Oa(this.Ra),this.De.Fe=this.controlText()}Oa(t){t===ui.CONNECTED?this.controlText("Stop Casting"):t===ui.AVAILABLE?this.controlText("Start Casting"):t===ui.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.bo=void 0,this.Ra=void 0,this.De=void 0,this.Va=void 0,this.bo=t.el(),this.Ra=ui.UNAVAILABLE,this.controlText("Unavailable"),this.De=new la(this,this.controlText()),null==(s=this.Ia)||s.addEventListener("statechange",t=>{const i=t;this.Ua(i.state)}),vi.Zs.Ke&&(this.Va=new Ko(this.el())),this.Ua(this.Ia?this.Ia.state:ui.UNAVAILABLE),this.on(t,"languagechange",this.se)}},Hu=0;function qu(){const t='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ';return Hu++,t}Io.registerComponent("chromecastButton",class extends Lu{get Ia(){var t;return null==(t=this.xs.cast)?void 0:t.chromecast}constructor(t,i){super(t,z({},i,{$a:"chromecast",Da:qu()}))}}),f();var zu="theo-chromecast-",Wu=Io.getComponent("Component"),Gu=class t extends(Lo(Wu)){buildCSSClass(){return zu+"overlay "+super.buildCSSClass()}createEl(){const i=super.createEl();si(i,zu+"overlay");const s=Io.createEl("div",{className:zu+"status-icon",innerHTML:t.ICON_SVG}),e=Io.createEl("div",{className:zu+"status-info"});d(e,"Playing on");const n=Io.createEl("div",{className:zu+"status-title"}),r=Io.createEl("div",{className:zu+"status"});return this._r=n,r.appendChild(s),r.appendChild(e),r.appendChild(n),i.appendChild(r),i}dispose(){var t;null==(t=this.La)||t.removeEventListener("statechange",this.update),this.La=void 0,this.xs.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.La=void 0,this.update=()=>{this.La?(this._r&&d(this._r,this.La.receiverName||""),this.La.state===ui.CONNECTED?this.show():this.hide()):this.hide()},this.La=null==(s=this.xs.cast)?void 0:s.chromecast,null==(e=this.La)||e.addEventListener("statechange",this.update),this.xs.addEventListener("play",this.update),this.update()}};Gu.ICON_SVG='\n\n \n',Io.registerComponent("chromecastOverlay",Gu),f(),f();Io.registerComponent("airplayButton",class extends Lu{dispose(){var t,i;null==(t=this.xs.ads)||t.removeEventListener("adbreakbegin",this.Ha),null==(i=this.xs.ads)||i.removeEventListener("adbreakend",this.qa),this.xs.removeEventListener("currentsourcechange",this.qa),super.dispose()}get Ia(){var t;return null==(t=this.xs.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,z({},i,{$a:"airplay",Da:'\n\n \n \n'})),this.qa=()=>{this.enable()},this.Ha=()=>{this.disable()},null==(s=this.xs.ads)||s.addEventListener("adbreakbegin",this.Ha),null==(e=this.xs.ads)||e.addEventListener("adbreakend",this.qa),this.xs.addEventListener("currentsourcechange",this.qa)}}),f(),f(),f();var Xu=Io.getComponent("Button"),Ju=class extends(Lo(Xu)){buildCSSClass(){return"theo-vr-button theo-controlbar-button "+super.buildCSSClass()}handleClick(){this.xs.vr.stereo=!this.xs.vr.stereo,this.se()}Sn(){const t=this.xs.vr;t&&t.state!==Ft.Os?(this.show(),t.canPresentVR?this.enable():this.disable()):this.hide(),this.se()}se(){const t=this.xs.vr;t&&t.state!==Ft.Os&&(t.stereo?this.controlText("Stop watching in VR"):t.canPresentVR?this.controlText("Watch in VR"):this.controlText("No VR capable device found"),this.za.Fe=this.controlText())}dispose(){var t;null==(t=this.xs.vr)||t.removeEventListener(["statechange","stereochange"],this.Wa),super.dispose()}constructor(t,i){var s;super(t,i),this.za=void 0,this.Va=void 0,this.Wa=()=>this.Sn(),this.controlText("Watch in VR"),this.za=new la(this,this.controlText()),null==(s=this.xs.vr)||s.addEventListener(["statechange","stereochange"],this.Wa),this.Sn(),vi.Zs.Ke&&(this.Va=new Ko(this.el())),this.on(t,"languagechange",this.se)}};Io.registerComponent("vrButton",Ju),f();var Qu=Io.getComponent("Component"),Yu=class extends Qu{createEl(){const t=super.createEl("div",{className:this.buildCSSClass()}),i=Io.createEl("div",{className:"theo-360-fov"});return t.appendChild(i),this.Ga=i,t}buildCSSClass(){return"theo-360-compass "+super.buildCSSClass()}Sn(){this.xs.vr.state===Ft.Os?this.hide():this.show()}Xa(){const t=-this.xs.vr.direction.yaw+40;this.Ga.style[bi("transform")]="scale(0.875) rotate("+t+"deg) skew("+"-10deg)"}dispose(){this.xs.vr.removeEventListener("statechange",this.Wa),this.xs.vr.removeEventListener("directionchange",this.Ja),super.dispose()}constructor(t,i,s){super(t,i),this.xs=void 0,this.Wa=()=>this.Sn(),this.Ja=()=>this.Xa(),this.xs=s,this.xs.vr.addEventListener("statechange",this.Wa),this.xs.vr.addEventListener("directionchange",this.Ja),this.Sn(),this.Xa()}};f();var Ku=Io.getComponent("Component"),Zu=class extends Ku{Qa(){this.xs.vr.state===Ft.Ya?this.Ka():this.Za()}Ka(){if(this.tu)return;this.tu=!0;const t=this.xs.element;this.iu=t.style.zIndex||"",t.style.zIndex="2147483647",this.su=this.player().isFullscreen(),this.player().requestFullscreen()}Za(){if(!this.tu)return;this.tu=!1;this.xs.element.style.zIndex=this.iu,this.su?this.player().requestFullscreen():this.player().exitFullscreen()}dispose(){this.Za(),this.xs.vr.removeEventListener("statechange",this.eu),super.dispose()}constructor(t,i,s){super(t,i),this.xs=void 0,this.tu=!1,this.su=!1,this.iu="",this.eu=()=>this.Qa(),this.xs=s,this.xs.vr.addEventListener("statechange",this.eu),this.Qa()}};Fi(function(t){const i=t.Ca;if(!i.vr)return;const s=t.vo,e=new Yu(s,{},i);if(t.wn(it.do,()=>{var i;s.removeChild(e);const n=null==(i=t.nu())?void 0:i.vr;void 0===n||n.nativeVR||s.addChild(e)}),Dt.ru){const t=new Zu(s,{},i);s.addChild(t)}}),f(),f(),f();var tc=class extends Z{constructor(){super("relatedchange")}},ic=["relatedchange"],sc=class extends Y{get Ca(){return this.hu||(this.hu=function(t){let i;const s={get sources(){return t.ou},set sources(i){t.ou=i},addEventListener(t,s){i.wn(t,s)},removeEventListener(t,s){i.mn(t,s)}};return i=new P(ic,!0,s),i.au(t),s}(this)),this.hu}get ou(){return this.uu}set ou(t){this.uu=function(t){return t.filter(t=>t&&(Xt(t.link)||dt(t,["source"])))}(t),t.length>this.uu.length&&console.warn("One or more of the configured related content sources are invalid. Check if they have a source or a link."),this.So(new tc)}kn(){this.Vo(),this.uu=[]}constructor(...t){super(...t),this.hu=void 0,this.uu=[]}};Ot(function(t){return class extends t{xa(){const t=this.cu;return at(super.xa(),{get related(){return t.Ca}})}kn(){this.cu.kn(),super.kn()}constructor(t,i){super(t,i),this.cu=void 0,this.cu=new sc}}},$t.lu),f(),f();var ec=Io.getComponent("Button"),nc=class extends ec{buildCSSClass(){return"vjs-icon-view-grid theo-related-button "+super.buildCSSClass()}handleClick(){this.fu.du?this.fu.we():this.fu.be()}se(){this.De.Fe=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.bo=void 0,this.fu=void 0,this.De=void 0,this.bo=t.el(),this.fu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText(this.localize("Related content")),this.De=new la(this,this.controlText()),this.on(t,"languagechange",this.se)}};f(),f();var rc=Io.getComponent("Button"),hc=class extends rc{buildCSSClass(){return"theo-secondary-background theo-close-button"}handleClick(){this.vu.hide()}constructor(t,i){super(t),this.vu=void 0,this.vu=i}},oc=(()=>{const t=h.createElement("div");return t.className="theo-related-grid-tile",t.innerHTML='',t})();function ac(t,i,s){const e=oc.cloneNode(!0),n=e.querySelector(".theo-related-grid-tile-content");dt(s,["source"])?(n.style.cursor="pointer",n.addEventListener("click",()=>{t.source=s.source,i.we()})):Xt(s.link)&&n.setAttribute("href",s.link);const r=e.querySelector(".theo-related-grid-tile-image");r.style.backgroundImage='url("'+J(s.image)+'")',r.removeAttribute("id");const h=e.querySelector(".theo-related-grid-tile-title");s.title?(d(h,s.title),h.removeAttribute("id")):Qt(h);const o=e.querySelector(".theo-related-grid-tile-duration");return s.duration?(d(o,s.duration),o.removeAttribute("id")):Qt(o),e}var uc=[15,12,9,8,6,4,3,2,1];var cc=class{get pu(){return"theo-"+this.mu+"-item-grid"}gu(){this.yu.focus()}bu(t){this.ku(),function(t){if(t.length)for(const i of uc)if(t.length>=i){t.length=i;break}}(t),this.wu(t.length);for(const i of t){const t=ac(this._u.Ca,this.xu,i);this.Cu.appendChild(t)}}ku(){this.Cu.innerHTML=""}Su(){const t=h.createElement("div");t.className="theo-overlay-panel";const i=h.createElement("div");return i.className="theo-related-grid",this.ju.className="theo-related",this.yu.controlText("Close Related Content"),this.Tu.appendChild(this.ju),this.ju.appendChild(t),t.appendChild(this.yu.el()),t.appendChild(i),i}wu(t){ni(this.Cu,this.pu),this.mu=t,si(this.Cu,this.pu)}kn(){Qt(this.ju),this.Mu.kn(),this.Au.kn(),this.yu.dispose(),this._u=void 0}constructor(t,i,s,e,n){this._u=void 0,this.Pu=void 0,this.xu=void 0,this.Tu=void 0,this.mu=void 0,this.yu=void 0,this.Cu=void 0,this.ju=void 0,this.Mu=void 0,this.Au=void 0,this.Nu=void 0,this._u=t,this.Pu=i,this.xu=s,this.Tu=e,this.mu=12,this.Nu=t=>{this.Cu.style.width=t.width+"px"},this.ju=h.createElement("div"),this.yu=new hc(this.Pu,{hide:()=>{this.xu.we()}}),this.Cu=this.Su(),this.Au=new lc(n),this.Au.wn(pi.yn,this.Nu),this.Mu=new M(this.Cu,this.Au),this.wu(12)}},lc=class extends Y{get Eu(){return this.Bu||0}get Iu(){return this.Fu.Iu}kn(){this.Vo(),this.Fu.mn(pi.yn,this.Du)}constructor(t){super(),this.Fu=void 0,this.Bu=void 0,this.Du=void 0,this.Fu=t,this.Du=t=>{let i=t.width;if(9*(t.width/16)>t.height){i=16*(t.height/9)}this.Bu=i,this.So(new gi(this.Eu,t.height))},this.Fu.wn(pi.yn,this.Du)}};f();var dc=class extends Z{constructor(){super("show")}};f();var fc=class extends Z{constructor(){super("hide")}},vc="theo-related-available",pc="theo-related-showing",mc=[...ic,"show","hide"],gc=class extends Y{get Ca(){return this.hu||(this.hu=function(t){let i;const s={get sources(){return t.ou},set sources(i){t.ou=i},get showing(){return t.du},show(){t.be()},hide(){t.we()},addEventListener(t,s){i.wn(t,s)},removeEventListener(t,s){i.mn(t,s)}};return i=new P(mc,!0,s),i.au(t),s}(this)),this.hu}get ou(){return this.$u.ou}set ou(t){this.$u.ou=t}get du(){return this.Ru}be(){const t=this.Ru;this.Ru=!0,this.Uu(pc),this.Ou.gu(),this.Pu.paused()?this.Vu=!0:this.Pu.pause(),t!==this.Ru&&this.So(new dc)}we(){const t=this.Ru;this.Ru=!1,this.Lu(pc),this.Hu.focus(),this.Vu||this.Pu.play(),this.Vu=!1,t!==this.Ru&&this.So(new fc)}Uu(t){this.Pu.el().classList.add(t)}Lu(t){this.Pu.el().classList.remove(t)}kn(){this.Vo(),this.Ou.kn()}constructor(t,i,s,e){super(),this.$u=void 0,this.Hu=void 0,this.hu=void 0,this.Pu=void 0,this.Ou=void 0,this.Ru=!1,this.Vu=!1,this.qu=t=>{const i=this.ou;this.Ou.bu(i),i.length?(this.Uu(vc),this.Hu.show()):(this.Lu(vc),this.Hu.hide()),this.So(t)},this.$u=i,this.$u.wn("relatedchange",this.qu),this.Pu=s,this.Ou=new cc(t,this.Pu,this,s.contentEl(),e),this.Hu=new nc(s,this,{})}};Bi(function(t){return class extends t{xa(){const t=this.zu;return at(super.xa(),{get related(){return t.Ca}})}kn(){this.zu.kn(),super.kn()}constructor(t,i,s){super(t,i,s),this.zu=void 0,this.zu=new gc(this,this.cu,this.vo,this.Wu)}}}),f(),f(),f();var yc=Io.getComponent("Button"),bc=class extends yc{buildCSSClass(){return"vjs-icon-share theo-social-button "+super.buildCSSClass()}handleClick(){this.Gu.showing?this.Gu.hide():this.Gu.show()}se(){this.De.Fe=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.bo=void 0,this.Gu=void 0,this.De=void 0,this.bo=t.el(),this.Gu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText("Share Video"),this.De=new la(this,this.controlText()),this.on(t,"languagechange",this.se)}};function kc(t,i,s){switch(i){case"iconurl":return function(t,i){const s=h.createElement("a");var e;s.className="theo-social-iconurl",s.title=null!=(e=t.label)?e:"",s.target="Xu",s.href=i;const n=h.createElement("img");var r,o;return n.src=null!=(r=t.icon)?r:"",n.alt=null!=(o=t.label)?o:"",n.width=25,n.height=25,s.appendChild(n),s}(t,s);case"text":return function(t){const i=h.createElement("div");if(i.className="theo-social-text",t.label){const s=h.createElement("h5");s.className="theo-primary-background theo-social-label",d(s,t.label),i.appendChild(s)}const s=h.createElement("p");var e;return s.className="theo-social-content-container theo-tertiary-background",s.tabIndex=0,d(s,null!=(e=t.text)?e:""),i.appendChild(s),i}(t);case"texturl":return function(t,i){const s=h.createElement("div");if(s.className="theo-social-texturl",t.label){const i=h.createElement("h5");i.className="theo-primary-background theo-social-label",d(i,t.label),s.appendChild(i)}const e=h.createElement("div");e.className="theo-social-content-container theo-tertiary-background";const n=h.createElement("a");return n.target="Xu",n.href=i,d(n,i),e.appendChild(n),s.appendChild(e),s}(t,s)}}f();var wc="";var _c=class{get xe(){return this.ju}Ju(t){this.ku();for(const i of t)this.Qu(i)}gu(){this.yu.focus()}Qu(t){const i=function(t,i){return t.src?G(t.src,wc)?t.src.replace(wc,i):t.src:i}(t,this.xu.Yu),s=function(t){if(t)return t.icon?"iconurl":t.text?"text":"texturl"}(t),e=kc(t,s,i);e&&("iconurl"===s?this.Ku.appendChild(e):this.Zu.appendChild(e))}ku(){this.Ku.innerHTML="",this.Zu.innerHTML=""}kn(){Qt(this.ju),this.tc.kn()}constructor(t,i,s,e){this.oa=void 0,this.xu=void 0,this.Tu=void 0,this.sc=void 0,this.yu=void 0,this.Ou=void 0,this.ju=void 0,this.Ku=void 0,this.Zu=void 0,this.tc=void 0,this.oa=t,this.xu=i,this.Tu=s,this.sc=e;const n=h.createElement("div");n.className="theo-overlay-panel",this.yu=new hc(this.oa,this.xu.Ca),this.yu.controlText("Close Share"),this.Ou=h.createElement("div"),this.Ou.className="theo-social-container",this.ju=h.createElement("div"),this.ju.className="theo-social",this.Ku=h.createElement("div"),this.Ku.className="theo-social-icon-container",this.Zu=h.createElement("div"),this.Zu.className="theo-social-text-container",this.Tu.appendChild(this.ju),this.ju.appendChild(n),this.Ou.appendChild(this.Ku),this.Ou.appendChild(this.Zu),n.appendChild(this.yu.el()),n.appendChild(this.Ou),this.tc=new M(this.ju,this.sc)}},xc="theo-social-available",Cc="theo-social-showing",Sc=class{get Ca(){return this.hu}get du(){return this.Ru}get ec(){return this.nc}set ec(t){this.nc=t,this.Ou.Ju(t),t.length?(this.Uu(xc),this.Hu.show()):(this.Lu(xc),this.Hu.hide())}get Yu(){return this.rc||H()}set Yu(t){this.rc=t}be(){this.Ru=!0,this.Uu(Cc),this.Ou.gu(),this.hc.paused()?this.Vu=!0:this.hc.pause()}we(){this.Ru=!1,this.Lu(Cc),this.Hu.focus(),this.Vu||this.hc.play(),this.Vu=!1}Uu(t){this.hc.el().classList.add(t)}Lu(t){this.hc.el().classList.remove(t)}kn(){this.Hu.dispose(),this.Ou.kn()}constructor(t,i){this.Hu=void 0,this.hu=void 0,this.hc=void 0,this.Ou=void 0,this.Ru=!1,this.nc=[],this.rc=void 0,this.Vu=!1,this.hu=function(t){return{get showing(){return t.du},get items(){return t.ec},set items(i){t.ec=i},get url(){return t.Yu},set url(i){t.Yu=i},show(){t.be()},hide(){t.we()}}}(this),this.hc=t,this.Ou=new _c(this.hc,this,t.contentEl(),i),this.Hu=new bc(t,this.hu,{})}};Bi(function(t){return class extends t{xa(){const t=this.Gu;return at(super.xa(),{get social(){return t.Ca}})}constructor(t,i,s){super(t,i,s),this.Gu=void 0,this.Gu=new Sc(this.vo,this.Wu)}}}),f(),f();var jc=Io.getComponent("Component"),Tc=class extends jc{createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-upnext-container "+super.buildCSSClass()}};Tc.prototype.h=z({},Tc.prototype.h,{children:[]}),Io.registerComponent("upNextContainer",Tc),f(),f();var Mc="theo-upnext-bar-",Ac=Io.getComponent("Component"),Pc=class extends Ac{get du(){return this.Ru}set du(t){this.Ru=t,this.oc&&(this.oc.tabIndex=t?0:-1)}get ac(){return this.uc}set ac(t){this.uc=t}Ta(t){this.ku(),this.cc(t)}cc(t){if(t&&t.link&&t.image){const i=h.createElement("div");si(i,Mc+"content"),i.onclick=()=>{this.lc.next()},i.onkeypress=t=>{13===t.which&&this.lc.next()};const s=h.createElement("div");if(s.style.backgroundImage='url("'+J(t.image)+'")',si(s,Mc+"image"),i.appendChild(s),t.duration){const i=h.createElement("span");si(i,Mc+"duration"),i.innerHTML=""+t.duration,s.appendChild(i)}const e=h.createElement("div");si(e,Mc+"text");const n=h.createElement("div");if(si(n,Mc+"upnext"),d(n,this.localize("Up Next")),e.appendChild(n),t.title){const i=h.createElement("div");si(i,Mc+"title"),d(i,t.title),e.appendChild(i)}i.appendChild(e),this.oc=i,this.dc=n,this.el().appendChild(this.oc)}}ku(){this.el().innerHTML="",this.oc=void 0,this.dc=void 0}se(){this.dc&&d(this.dc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-bar "+super.buildCSSClass()}dispose(){this.tc.kn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.lc=void 0,this.tc=void 0,this.Ru=void 0,this.uc=void 0,this.oc=void 0,this.dc=void 0,this.lc=i,this.tc=new M(this.el(),e),this.Ru=!1,this.uc=10,this.on(t,"languagechange",this.se)}};f();var Nc="theo-upnext-panel-",Ec=yu,Bc=Io.getComponent("Component"),Ic=class extends Bc{get du(){return this.Ru}set du(t){this.Ru=t}get fc(){return this.vc}set fc(t){this.vc=t}get mc(){return this.gc}set mc(t){this.gc=t}Ta(t){this.ku(),this.yc(t)}yc(t){if(t&&t.link&&t.image){const i=h.createElement("div");i.className=Nc+"content";const s=h.createElement("div");s.style.backgroundImage='url("'+J(t.image)+'")',s.className=Nc+"image",i.appendChild(s);const e=h.createElement("div");e.className=Nc+"text";const n=h.createElement("div");if(n.className=Nc+"upnext",d(n,this.localize("Up Next")),e.appendChild(n),t.title){const i=h.createElement("div");i.className=Nc+"title",d(i,t.title),e.appendChild(i)}i.appendChild(e),this.bc=h.createElement("div"),this.bc.className=Nc+"autoplay",this.bc.innerHTML=bu;const r=this.bc.querySelector("svg");r.onclick=()=>{this.lc.next()},r.tabIndex=0,r.onkeypress=t=>{13===t.which&&this.lc.next()},this.kc=n,this.wc=this.bc.querySelector("."+Ec),i.appendChild(this.bc),this.el().appendChild(i)}}get _c(){return this.xc}set _c(t){this.xc=t,this.wc.style.strokeDashoffset=""+_.round(1e5*t)/1e5}ku(){this.el().innerHTML="",this.kc=void 0,this.wc=void 0}se(){this.kc&&d(this.kc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-panel "+super.buildCSSClass()}dispose(){this.tc.kn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.lc=void 0,this.tc=void 0,this.kc=void 0,this.bc=void 0,this.wc=void 0,this.xc=0,this.Ru=void 0,this.vc=void 0,this.gc=void 0,this.lc=i,this.tc=new M(this.el(),e),this.Ru=!1,this.vc=10,this.gc=!0,this.on(t,"languagechange",this.se)}},Fc="theo-upnext-panel-showing",Dc="theo-upnext-bar-showing",$c=2*_.PI*73,Rc=class t{get Ca(){return this.hu}get Cc(){return this.Sc}get jc(){return this.Tc}get Mc(){return this.Ac}set Mc(t){this.Ac=t,this.Ou.Ta(t),this.Pc.Ta(t),this.hc.off("timeupdate",this.Nc),this.hc.off("ended",this.Ec),t&&(this.hc.on("timeupdate",this.Nc),this.hc.on("ended",this.Ec))}Bc(){this.Ou.fc?this.Ic=mt(this.Ou.fc):0===this.Ou.fc?this.Ic=0:this.Ic=10,0!==this.Ic?(isFinite(this.Ic)&&(this.Fc=!0),this.Ou.du=!0,this.Uu(Fc),this.Fc&&(this.Ou._c=$c-$c/this.Ic,this.Dc=v(this.$c,1e3))):this.Rc()}Uc(){this.Ou.du=!1,this.Lu(Fc),this.Fc&&(p(this.Dc),this.Oc=1,this.Ou._c=$c)}Vc(){this.Pc.du=!0,this.Uu(Dc)}Lc(){this.Pc.du=!1,this.Lu(Dc)}Rc(){p(this.Dc),this.Mc&&(s.location.href=this.Mc.link)}Uu(t){this.hc.el().classList.add(t)}Lu(t){this.hc.el().classList.remove(t)}Hc(t,i){const s=t>=i&&!(this.qc&&this.qc.zc);this.Pc.du&&!s?this.Lc():!this.Pc.du&&s&&this.Vc()}Wc(t,i){this.Ou.du&&t{this.Oc!==this.Ic?(this.Ou._c-=$c/this.Ic,this.Oc+=1):this.Rc()},this.Ec=()=>{this.Ou.du||this.Bc()},this.Nc=()=>{const i=this.hc.currentTime(),s=this.hc.duration(),e=s?t.Gc(this.Pc.ac,s):void 0;void 0!==e&&this.Hc(i,e),this.Ou.mc&&this.Wc(i,s)},this.hu=function(t){return{get source(){return t.Mc},set source(i){t.Mc=i},get bar(){return t.Cc},get panel(){return t.jc},next(){t.Rc()}}}(this),this.Pc=new Pc(i,this.hu,{},s),this.Ou=new Ic(i,this.hu,{},s),this.Sc=function(t,i){return{get showing(){return i.du},get offset(){return i.ac},set offset(t){i.ac=t},show(){t.Vc()},hide(){t.Lc()}}}(this,this.Pc),this.Tc=function(t,i){return{get showing(){return i.du},get countdownDuration(){return i.fc},set countdownDuration(t){i.fc=t},get showUpNextPanel(){return i.mc},set showUpNextPanel(t){i.mc=t},show(){t.Bc()},hide(){t.Uc()}}}(this,this.Ou),this.hc=i,this.qc=e,i.getChild("upNextContainer").addChild(this.Pc,{}),i.getChild("upNextContainer").addChild(this.Ou,{})}};Bi(function(t){return class extends t{xa(){const t=this.Xc;return at(super.xa(),{get upnext(){return t.Ca}})}kn(){this.Xc.kn(),super.kn()}constructor(t,i,s){super(t,i,s),this.Xc=void 0,this.Xc=new Rc(this.vo,this.Wu,this.Jc)}}}),f(),f();var Uc=Io.getComponent("Component"),Oc=class extends Uc{createEl(){const t=super.createEl("ul",{className:"theo-context-menu"}),i=h.createElement("li"),s=h.createElement("a"),e=h.createElement("div");s.className="theo-context-menu-a",i.appendChild(s),e.className="theo-context-menu-logo",e.innerHTML='\n\t\n\t\t\n\t\n\t\n\t\t\n\t\n\t\n\t\t\n\t\n\n',s.appendChild(e);const n=h.createElement("div");return n.className="theo-context-version",d(n,"Powered by THEOplayer 10.0.0"),s.appendChild(n),s.href="https://www.theoplayer.com/player-referral",s.target="Xu",t.appendChild(i),t}Qc(t){const i=t;i.preventDefault(),this.show(),this.el().style.left="0",this.el().style.top="0";const s=this.player().contentEl(),e=s.getClientRects(),n=e.length>0?e[0]:void 0,r=i.clientX-s.getBoundingClientRect().left,h=C(getComputedStyle(this.el()).fontSize);K(this.el(),r,n,h);const o=i.clientY-s.getBoundingClientRect().top;tt(this.el(),o,n,h),this.Yc()}Kc(){this.hide(),this.clearTimeout(this.Zc)}Yc(){this.Zc=this.setTimeout(this.Kc,4e3)}tl(){this.clearTimeout(this.Zc)}dispose(){this.Kc(),this.off(this.player(),"contextmenu",this.Qc),this.el().removeEventListener("mousedown",Vc,!0),this.off(h,"mousedown",this.Kc),this.off("mouseout",this.Yc),this.off("mouseover",this.tl),super.dispose()}constructor(t,i){super(t,i),this.Zc=0,this.on(this.player(),"contextmenu",this.Qc),this.el().addEventListener("mousedown",Vc,!0),this.on(h,"mousedown",this.Kc),this.on("mouseout",this.Yc),this.on("mouseover",this.tl),this.Kc()}};function Vc(t){t.stopPropagation()}Fi(function(t){const i=new Oc(t.vo,{});t.vo.addChild(i),t.vo.on("dispose",()=>{t.vo.removeChild(i),i.dispose()})}),f(),f(),f(),f();var Lc={Default:"","Monospaced Serif":D.il,"Proportional Serif":D.sl,"Monospaced Sans-Serif":D.nl,"Proportional Sans-Serif":D.rl},Hc={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},qc=[50,75,100,150,200];function zc(t){return{label:t+"%",value:t}}function Wc(t){return w.keys(t).map(i=>({label:i,value:t[i]}))}qc.map(function(t){return{label:t+"%",value:t/100+"em"}});var Gc=qc.map(function(t){return{label:t+"%",value:t+"%"}}),Xc=[25,50,75,100].map(zc),Jc=[0,25,50,75,100].map(zc),Qc=Wc(Hc),Yc=Wc(Lc),Kc=Wc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Zc=100,tl="#000000",il="#FFFFFF",sl="#000000";f();var el=class extends Ya{hl(){const t=this.Vr.localize(this.ol);d(this.al.subMenu.menuHeader.el(),t),this.Or=h.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",d(this.Or,t);const i=h.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",si(this.al.el(),"theo-subtitle-options-menu-item"),this.al.el().appendChild(this.Or),this.al.el().appendChild(i),i}cl(t){const i=this.Er(t);i&&this.ll(i)}dl(){return this.jr}Fr(t){this.fl(t.Br)}ll(t){for(const t of this.Pr.menuItems)t.selected(!1);t?(t.selected(!0),this.vl(t.Br.label)):this.vl("Custom")}vl(t){this.pl=t,d(this.ml,this.Vr.localize(t)),this.al.parentMenu.oe()}Ir(t){const i=super.Ir(t);return si(i.el(),"theo-subtitle-options-menu-item"),this.Rr(i),i}Rr(t){const i=this.Vr.localize(t.Br.label);d(t.el(),i);const s=this.Vr.localize("Set "+this.ol+" to ")+i;t.el().setAttribute("aria-label",s)}Oe(){this.Vr.off("languagechange",this.se),super.Oe()}constructor(t,i,s,e){super(t.subMenu),this.al=void 0,this.Vr=void 0,this.ol=void 0,this.Or=void 0,this.ml=void 0,this.pl=void 0,this.fl=void 0,this.se=void 0,this.al=t,this.Vr=e,this.pl="",this.se=()=>{const t=this.Vr.localize(this.ol);d(this.al.subMenu.menuHeader.el(),t),d(this.Or,t),this.vl(this.pl);for(const t of this.Nr)this.Rr(t)},this.ol=i,this.fl=s.gl,this.ml=this.hl(),this.jr=s.yl,this.Vr.on("languagechange",this.se)}};f();var nl=class t{static bl(t,i,s,e){if(void 0===t&&void 0===i)return;return W(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.kl=void 0,this.wl=void 0,this._l=void 0,this.xl=void 0,this.Cl=void 0,this.Sl=void 0,this.jl=void 0,this.Tl=void 0,this.Ml=void 0,this.Al=void 0,this.Pl=void 0,this.Nl=void 0,this.El=void 0,this.Bl=void 0,this.Il=void 0,this.Fl=void 0,this.kl=i,this.Tl=t=>{this.kl.fontFamily=t.value},this.Ml=t=>{this.kl.fontSize=t.value},this.Al=i=>{this.wl=i.value,this.kl.fontColor=t.bl(this._l,this.wl,il,Zc)},this.Pl=i=>{this._l=i.value,this.kl.fontColor=t.bl(this._l,this.wl,il,Zc)},this.Nl=i=>{this.Cl=i.value,this.kl.backgroundColor=t.bl(this.Cl,this.xl,tl,Zc)},this.El=i=>{this.xl=i.value,this.kl.backgroundColor=t.bl(this.Cl,this.xl,tl,Zc)},this.Bl=i=>{this.jl=i.value,this.kl.windowColor=t.bl(this.jl,this.Sl,sl,Zc)},this.Il=i=>{this.Sl=i.value,this.kl.windowColor=t.bl(this.jl,this.Sl,sl,Zc)},this.Fl=t=>{this.kl.edgeStyle=t.value}}};f();var rl=class{Dl(t,i){const s=this.$l(t,i.dl());s&&i.cl(s)}$l(t,i){return Pi(i,i=>i.value===t)}Rl(t,i,s){let e,n;if(void 0===t)e=this.$l(void 0,i.dl()),n=this.$l(void 0,s.dl());else if(t){const r=function(t){let i=q(t);i||(i=q(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=R(O(t),1));if(!i){const s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=R(O(Hc[s]),1)}return i}(t);if(r){const t=L(r),h=100*r.Ul;e=this.$l(t,i.dl()),n=this.$l(h,s.dl())}}e&&i.cl(e),n&&s.cl(n)}constructor(t,i){this.kl=void 0,this.Ol=void 0,this.Vl=void 0,this.kl=t,this.Ol=i,this.Vl=()=>{const t=this.kl.fontFamily;this.Dl(t,this.Ol["Font family"]);const i=this.kl.fontColor;this.Rl(i,this.Ol["Font color"],this.Ol["Font opacity"]);const s=this.kl.fontSize;this.Dl(s,this.Ol["Font size"]);const e=this.kl.backgroundColor;this.Rl(e,this.Ol["Background color"],this.Ol["Background opacity"]);const n=this.kl.windowColor;this.Rl(n,this.Ol["Window color"],this.Ol["Window opacity"]);const r=this.kl.edgeStyle;this.Dl(r,this.Ol["Character edge style"])},this.kl.addEventListener("change",this.Vl),this.Vl()}};var hl=class extends Ya{Ll(){return{"Font family":{yl:ol(Yc),gl:this.Hl.Tl},"Font color":{yl:ol(Qc),gl:this.Hl.Pl},"Font opacity":{yl:ol(Xc),gl:this.Hl.Al},"Font size":{yl:ol(Gc),gl:this.Hl.Ml},"Background color":{yl:ol(Qc),gl:this.Hl.Nl},"Background opacity":{yl:ol(Jc),gl:this.Hl.El},"Window color":{yl:ol(Qc),gl:this.Hl.Bl},"Window opacity":{yl:ol(Jc),gl:this.Hl.Il},"Character edge style":{yl:ol(Kc),gl:this.Hl.Fl}}}ql(){this.Or=h.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",this.zl=h.createElement("span"),this.zl.className="theo-primary-color theo-settings-control-menu-item-value",this.Jr.el().appendChild(this.Or),this.Jr.el().appendChild(this.zl),this.se()}Ir(t){const i=this.Pr.addSubMenuItem();return i.Br=t,this.Ol[t]=new el(i,t,this.Wl[t],this.Vr),i}Rr(t){}Fr(t){}Oe(){this.Vr.off("languagechange",this.se),this.Gl.removeEventListener(["addtrack","removetrack"],this.Xl),super.Oe()}constructor(t,i,s,e){super(t.subMenu),this.Jr=void 0,this.Gl=void 0,this.Vr=void 0,this.Hl=void 0,this.Jl=void 0,this.Wl=void 0,this.Ol=void 0,this.Or=void 0,this.zl=void 0,this.Xl=void 0,this.se=void 0,this.Jr=t,this.Gl=i,this.Vr=e,this.Ol={},this.Xl=()=>{this.Gl.some(t=>At(t.kind))?this.Jr.show():this.Jr.hide()},this.se=()=>{d(this.Pr.menuHeader.el(),this.Vr.localize("Subtitle Options")),d(this.Or,this.Vr.localize("Subtitle")),d(this.zl,this.Vr.localize("Options")),this.Jr.el().setAttribute("aria-label",this.Vr.localize("Open the subtitle options menu"))},this.Hl=new nl(s),this.Wl=this.Ll(),this.jr=w.keys(this.Wl),this.ql(),this.Jl=new rl(s,this.Ol),this.Vr.on("languagechange",this.se),this.Gl.addEventListener(["addtrack","removetrack"],this.Xl),this.Xl()}};function ol(t){const i=[{label:"Default",value:void 0}];for(const s of t)"Default"!==s.label&&i.push(s);return i}Fi(function(t){const i=t.vo.controlBar.getChild("SettingsButton").menu,s=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),e=new hl(s,t.nt.Ca,t.Ql.Ca,t.vo);t.vo.on("dispose",()=>{i.removeMenuItem(s),s.dispose(),e.Oe(),i.dispose()})}),f(),f();var al=Io.getComponent("Component"),ul=class extends al{buildCSSClass(){return"theo-ad-control-panel"}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}constructor(t,i){super(t,i),t.adControlBar=this}};ul.prototype.h=z({},al.prototype.h,{children:[]}),Io.registerComponent("AdControlPanel",ul),f(),f();var cl=Io.getComponent("Component"),ll="theo-dai-countdown",dl=class extends cl{buildCSSClass(){return ll}createEl(t,i,s){const e=h.createElement("div");return e.className=ll,e}Yl(t,i){i.addEventListener("adbreakbegin",()=>this.show()),i.addEventListener("adbreakend",()=>this.hide()),t.addEventListener("timeupdate",this.se)}constructor(t,i,s){super(t,s),this.oa=void 0,this.hu=void 0,this.bo=void 0,this.se=void 0,this.oa=t,this.hu=i,this.se=()=>{const t=this.hu.ads;t.playing&&t.currentAdBreak&&t.currentAds.length&&d(this.contentEl(),function(t,i,s){const e=t.ads;let n="";const r=e.length;if(r>1){const t=e.indexOf(i)+1;n=s("Ad")+" "+t+"/"+r+". "}const h=_.ceil(t.maxRemainingDuration);return n+=s("The content will resume in {1} seconds.").replace("{1}",""+h),n}(t.currentAdBreak,t.currentAds[0],t=>this.oa.localize(t)))},this.bo=t.el(),this.Yl(i,i.ads),this.on(t,"languagechange",this.se)}};f();var fl=Io.getComponent("ClickableComponent"),vl=class extends fl{buildCSSClass(){return Vt}createEl(t,i,s){return this.h.Ca.element.querySelector("."+Vt)}emitTapEvents(){}se(){d(this.el(),this.localize("Learn more"))}constructor(t,i){super(t,i),this.bo=void 0,this.hu=void 0,d(this.el(),t.localize("Learn more")),this.hu=i.Ca,this.bo=t.el(),this.on(t,"languagechange",this.se)}};Fi(function(t){if(t.Ca.ads&&t.Kl){const i=t.vo,s=new dl(i,t.Ca);i.adControlBar.addChild(s);if(t.Ca.element.querySelector("."+Vt)){const s=new vl(i,{Ca:t.Ca});i.adControlBar.addChild(s)}}}),f(),f();var pl=Io.getComponent("Component"),ml=["addtrack","removetrack","change"],gl=class extends(Lo(pl)){createEl(){const t=super.createEl();return this.qualityLabel=Io.createEl("div",{className:"theo-quality-label-text"}),t.appendChild(this.qualityLabel),ci(this.qualityLabel),t}dispose(){this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.Zl),this.Yr=void 0),this.xs.videoTracks.removeEventListener(ml,this.dh),super.dispose()}constructor(t,i){super(t,i),this.qualityLabel=void 0,this.Yr=void 0,this.startFadeOutID=void 0,this.removeLabelClassesID=void 0,this.dh=()=>{const t=Ga(this.xs.videoTracks);t!==this.Yr&&(this.Yr&&this.Yr.removeEventListener("activequalitychanged",this.Zl),this.Yr=t,t&&t.addEventListener("activequalitychanged",this.Zl),this.Zl())},this.Zl=()=>{const t=this.Yr&&this.Yr.activeQuality;if(!this.qualityLabel||!t)return;const i=t.label?t.label:t.height?t.height+"p":void 0;i&&(d(this.qualityLabel,i),this.addClass("theo-quality-label-show"),this.hideActiveQualityLabel())},this.hideActiveQualityLabel=()=>{this.resetTimeout(),this.startFadeOutID=this.setTimeout(this.fadeoutLabel,3750),this.removeLabelClassesID=this.setTimeout(this.hideLabel,4e3)},this.resetTimeout=()=>{this.startFadeOutID&&this.clearTimeout(this.startFadeOutID),this.removeLabelClassesID&&this.clearTimeout(this.removeLabelClassesID)},this.fadeoutLabel=()=>{this.addClass("theo-quality-label-fadeout")},this.hideLabel=()=>{this.removeClass("theo-quality-label-show"),this.removeClass("theo-quality-label-fadeout")},super.addClass("theo-quality-label"),this.xs.videoTracks&&(this.xs.videoTracks.addEventListener(ml,this.dh),this.dh())}};Io.registerComponent("activeQualityLabel",gl),f(),f();var yl="theo-upcoming-ad-notification",bl=["adbreakbegin","adbreakend","adadded","adloaded","adbegin","adend"],kl=class extends(Lo(va)){createEl(){const t=Io.createEl("div",{className:yl});return this.notificationText=Io.createEl("div",{className:yl+"text"}),t.appendChild(this.notificationText),t}td(){if(!this.xs.ads)return;const t=this.xs.ads.scheduledAdBreaks;let i,s=1/0;for(let e=0;e"linear"===t.type)}sd(){if(!this.xs.ads||this.xs.ads.playing||!this.currentAdBreak||!this.currentAdBreakValid||0===this.currentAdBreak.timeOffset)return void this.ed();const t=this.xs.currentTime;if(this.currentAdBreak.timeOffset>t+10)return void this.ed();const i=_.ceil(this.currentAdBreak.timeOffset-t);i<0?this.ed():this.nd(i)}nd(t){this.rd!==t&&(d(this.notificationText,"Your video will be temporarily interrupted in 0:"+(t<10?"0"+t:t)),this.rd=t,this.show())}ed(){this.rd=NaN,this.hide()}dispose(){var t;this.xs.removeEventListener("timeupdate",this.handleTimeUpdate),null==(t=this.xs.ads)||t.removeEventListener(bl,this.handleAdEvent),this.currentAdBreak=void 0,super.dispose()}constructor(t,i){super(t,i),this.currentAdBreak=void 0,this.currentAdBreakValid=!1,this.rd=NaN,this.handleTimeUpdate=()=>{this.sd()},this.handleAdEvent=()=>{this.td(),this.sd()},this.xs.ads&&(this.hide(),this.xs.addEventListener("timeupdate",this.handleTimeUpdate),this.xs.ads.addEventListener(bl,this.handleAdEvent))}};Io.registerComponent("upcomingAdNotificationText",kl),f(),f();var wl=Io.getComponent("Component");Io.registerComponent("UplynkAdBreakBar",class extends wl{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theo-ad-remaining-container",t}get od(){return this.h.adBreakProvider()}se(t,i){if(this.od&&this.od.endTime){const s=_.max(this.od.endTime-t,0);d(i,"Content will resume in "+_.ceil(s)+"s"),this.show()}else this.hide()}constructor(t,i){super(t,i),this.ad=()=>{this.se(this.player().currentTime(),this.el())},this.on(t,"timeupdate",this.ad)}}),f();var _l=Io.getComponent("ClickableComponent");Io.registerComponent("UplynkAdSkipButton",class extends _l{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.ud=h.createElement("span"),t.appendChild(this.ud),this.se(t,this.ud),t}handleClick(){this.h.skipCallback()}se(t,i){this.ld<=_t.fd.dd?(ni(t,"theoplayer-ad-skip-countdown"),si(t,"theoplayer-ad-skip-button"),d(i,"Skip ads")):d(i,"Skip ads in "+_.ceil(this.ld)+"s")}get ld(){return this.h.adBreak.startTime+this.h.adBreak.skipOffset-this.player().currentTime()}constructor(t,i){super(t,i),this.ad=()=>{this.se(this.el(),this.ud)},this.on(t,"timeupdate",this.ad)}}),f(),f();var xl=Io.getComponent("Component"),Cl=class extends xl{buildCSSClass(){return"theo-uplynk-marker-bar"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}};Io.registerComponent("UplynkAdBreakMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-bar-adbreak"}}),f(),f();var Sl=Io.getComponent("Component"),jl=class extends Sl{get startTime(){return this.h.startTime}get endTime(){return this.h.endTime}get seekable(){return this.player().seekable()}buildCSSClass(){return"theo-uplynk-marker"}createEl(t,i,s){const e=h.createElement("div");e.className=this.buildCSSClass();const n=this.seekable.start(0),r=this.seekable.end(this.seekable.length-1),o=_.max(this.startTime-n,0),a=void 0!==this.endTime?_.max(r-this.endTime,0):0,u=r-n;return e.style.left=o/u*100+"%",e.style.right=a/u*100+"%",e}constructor(t,i){super(t,i)}};Io.registerComponent("UplynkAdBreakMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-adbreak"}}),f();Io.registerComponent("UplynkAssetMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-bar-asset"}}),f();Io.registerComponent("UplynkAssetMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-asset"}}),f();var Tl=Io.getComponent("Component");Io.registerComponent("UplynkContentNotificationBar",class extends Tl{buildCSSClass(){const t="theo-uplynk-content-notification-bar";return t+(Dt.ru||Dt.vd?" "+t+"-ios":"")}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}}),f();var Ml=Io.getComponent("Component");function Al(t,i){const s=t.uplynk;return Boolean(t&&void 0===s)||Boolean(t&&s&&void 0===s.ui)||Boolean(t&&s&&s.ui&&void 0===s.ui[i])||Boolean(t&&s&&s.ui&&!0===s.ui[i])}Io.registerComponent("UplynkContentNotification",class extends Ml{get pd(){return this.h.asset}buildCSSClass(){return"theo-uplynk-content-notification"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}wo(){const t=h.createElement("img");t.src=this.pd.posterUrl,t.className=this.buildCSSClass()+"-thumbnail",this.el().appendChild(t);const i=h.createElement("div");i.className=this.buildCSSClass()+"-description";const s=function(t){return"Next: "+t}(this.pd.description);d(i,s),this.el().appendChild(i),this.md=h.createElement("div"),this.md.className=this.buildCSSClass()+"-countdown",d(this.md,this.gd),this.el().appendChild(this.md)}get gd(){const t=_.min(10,this.yd);return"Starting in "+_.ceil(t)+" seconds"}get yd(){return _.max(0,this.pd.startTime-this.player().currentTime())}bd(){const t=this.yd;t>10||t<=0?this.hide():(d(this.md,this.gd),this.show())}constructor(t,i){super(t,i),this.md=void 0,this.wo(),this.on(t,"timeupdate",this.bd),this.hide()}}),f(),Bi(function(t){return class extends t{get kd(){return this.vo.controlBar.progressControl.seekBar}Ta(t){this.wd=!1,this.Ca.removeEventListener("timeupdate",this._d),this.vo.removeChild("UplynkAdBreakBar"),this.vo.removeChild("UplynkAdSkipButton"),this.kd.removeChild("UplynkAdBreakMarkerBar"),this.kd.removeChild("UplynkAssetMarkerBar"),this.vo.removeChild("UplynkContentNotificationBar"),super.Ta(t)}xd(){if(!function(t){return Al(t,"assetMarkers")}(this.Cd)||!this.wd)return;const t=this.Ca.uplynk.assets.map(t=>({name:"UplynkAssetMarker",startTime:t.startTime,endTime:t.endTime}));this.kd.removeChild("UplynkAssetMarkerBar"),this.kd.addChild("UplynkAssetMarkerBar",{children:t})}Sd(){if(!function(t){return Al(t,"contentNotification")}(this.Cd))return;const t=this.Ca.uplynk.assets.map(t=>({name:"UplynkContentNotification",asset:t}));this.vo.removeChild("UplynkContentNotificationBar"),this.vo.addChild("UplynkContentNotificationBar",{children:t})}kn(){this.Ca.removeEventListener("timeupdate",this._d);const t=this.Ca.uplynk;null==t||t.ads.adBreaks.removeEventListener("addadbreak",this.jd),null==t||t.ads.adBreaks.removeEventListener("removeadbreak",this.Td),null==t||t.assets.removeEventListener("addasset",this.Md),null==t||t.assets.removeEventListener("removeasset",this.Md),this.Ca.removeEventListener("loadeddata",this.Pd),super.kn()}constructor(t,i,s){super(t,i,s),this.wd=!1,this.Pd=()=>{this.wd=!0,isFinite(this.Nd())||this.Ca.addEventListener("timeupdate",this._d),this._d(),this.xd(),this.Sd()},this.jd=t=>{t.adBreak.addEventListener("adbreakbegin",this.Ed),t.adBreak.addEventListener("adbreakend",this.Bd),this._d()},this.Td=t=>{t.adBreak.removeEventListener("adbreakbegin",this.Ed),t.adBreak.removeEventListener("adbreakend",this.Bd),this._d()},this._d=()=>{if(!function(t){return Al(t,"adBreakMarkers")}(this.Cd)||!this.wd)return;const t=this.Ca.uplynk,i=null==t?void 0:t.ads.adBreaks.map(t=>({name:"UplynkAdBreakMarker",startTime:t.startTime,endTime:t.endTime}));this.kd.removeChild("UplynkAdBreakMarkerBar"),this.kd.addChild("UplynkAdBreakMarkerBar",{children:i})},this.Ed=()=>{if(function(t){return Al(t,"adNotification")}(this.Cd)){const t=this.Ca.uplynk,i=t.ads.currentAdBreak;this.vo.addChild("UplynkAdBreakBar",{adBreakProvider:this.Id}),-1!==i.skipOffset&&this.vo.addChild("UplynkAdSkipButton",{adBreak:i,skipCallback:t.ads.skip})}},this.Id=()=>this.Ca.uplynk.ads.currentAdBreak,this.Bd=()=>{this.vo.removeChild("UplynkAdBreakBar"),this.vo.removeChild("UplynkAdSkipButton")},this.Md=()=>{this.xd(),this.Sd()};const e=this.Ca.uplynk;null==e||e.ads.adBreaks.addEventListener("addadbreak",this.jd),null==e||e.ads.adBreaks.addEventListener("removeadbreak",this.Td),null==e||e.assets.addEventListener("addasset",this.Md),null==e||e.assets.addEventListener("removeasset",this.Md),this.Ca.addEventListener("loadeddata",this.Pd)}}});export{lt as ChromelessPlayer,nt as ErrorCategory,st as ErrorCode,Uu as Player,Rt as cache,Bt as cast,pt as features,bt as players,wt as registerContentProtectionIntegration,ft as utils,gt as version,Io as videojs}; +var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window,h=a.document,u=(a.location,a.navigator,a.setTimeout),c=a.clearTimeout,v=a.setInterval,p=a.clearInterval,m=a.Error,g=a.TypeError,k=a.SyntaxError,w=a.Object,_=a.Math,x=a.parseInt,C=a.parseFloat,S=a.isNaN,j=a.Uint8Array;a.Worker,a.WorkerGlobalScope,a.XMLHttpRequest;import{$ as T,$a as M,A,Aa as P,B as N,Ba as E,C as B,Ca as I,D as F,Da as D,E as $,Ea as R,F as U,Fa as O,G as V,Ga as L,H,Ha as q,I as z,Ia as W,J as G,Ja as X,K as J,Ka as Q,L as Y,La as K,M as Z,Ma as tt,N as it,Na as d,O as st,Oa as et,P as nt,Pa as rt,Q as ht,Qa as ot,R as at,Ra as ut,S as ct,Sa as lt,T as dt,Ta as ft,U as vt,Ua as pt,V as mt,Va as gt,W as yt,Wa as bt,X as kt,Xa as wt,Y as _t,Ya as xt,Z as Ct,Za as St,_ as jt,_a as Tt,a as Mt,aa as At,ab as Pt,b as Nt,ba as Et,bb as Bt,c as f,ca as It,cb as Ft,d as Dt,da as $t,db as Rt,e as Ut,ea as Ot,eb as Vt,f as Lt,fa as Ht,fb as qt,g as zt,ga as Wt,gb as Gt,h as Xt,ha as Jt,i as Qt,ia as Yt,j as Kt,ja as Zt,k as ti,ka as ii,l as si,la as ei,m as ni,ma as ri,n as hi,na as oi,o as ai,oa as ui,p as ci,pa as li,q as di,qa as fi,r as vi,ra as pi,s as mi,sa as gi,t as yi,ta as bi,u as ki,ua as wi,v as _i,va as xi,w as Ci,wa as Si,x as ji,xa as Ti,y as Mi,ya as Ai,z as Pi,za as Ni}from"./THEOplayer.common.esm.js";f(),f(),f(),f();var Ei=[];function Bi(t){Ei.push(t)}var Ii=[];function Fi(t){Ii.push(t)}f(),f(),f(),f();var b=void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Di=void 0!==h?h:{createElement:function(){}};function $i(t,i){return i||(i=t.slice(0)),t.raw=i,t}var Ri=1;function Ui(){return Ri++}var Oi,Vi=w.prototype.toString,Li=function(t){return zi(t)?w.keys(t):[]};function Hi(t,i){Li(t).forEach(function(s){return i(t[s],s)})}function qi(t){for(var i=arguments.length,s=new Array(i>1?i-1:0),e=1;e0)for(var s=t.attributes,e=s.length-1;e>=0;e--){var n=s[e].name,r=s[e].value;"boolean"!=typeof t[n]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+n+",")||(r=null!==r),i[n]=r}return i}function ys(t,i,s){t.setAttribute(i,s)}function bs(t,i){t.removeAttribute(i)}function ks(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var s=Di.documentElement,e=Di.body,n=s.clientLeft||e.clientLeft||0,r=b.pageXOffset||e.scrollLeft,h=i.left+r-n,o=s.clientTop||e.clientTop||0,a=b.pageYOffset||e.scrollTop,u=i.top+a-o;return{left:_.round(h),top:_.round(u)}}function ws(t,i){var s={},e=ks(t),n=t.offsetWidth,r=t.offsetHeight,h=e.top,o=e.left,a=i.pageY,u=i.pageX;return i.changedTouches&&(u=i.changedTouches[0].pageX,a=i.changedTouches[0].pageY),s.y=_.max(0,_.min(1,(h-a+r)/r)),s.x=_.max(0,_.min(1,(u-o)/n)),s}function _s(t){return zi(t)&&3===t.nodeType}function xs(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Cs(t,i){return function(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),ss(t)||_s(t)?t:"string"==typeof t&&/\S/.test(t)?Di.createTextNode(t):void 0}).filter(function(t){return t})}(i).forEach(function(i){return t.appendChild(i)}),t}function Ss(t,i){return Cs(xs(t),i)}var js,Ts=es("querySelector"),Ms=es("querySelectorAll"),As=b.navigator&&b.navigator.userAgent||"",Ps=/AppleWebKit\/([\d.]+)/i.exec(As),Ns=Ps?C(Ps.pop()):null,Es=/iPad/i.test(As),Bs=/iPhone/i.test(As)&&!Es,Is=/iPod/i.test(As),Fs=Bs||Es||Is,Ds=(js=As.match(/OS (\d+)_/i))&&js[1]?js[1]:null,$s=/Android/i.test(As),Rs=function(){var t=As.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&C(t[1]),s=t[2]&&C(t[2]);return i&&s?C(t[1]+"."+t[2]):i||null}(),Us=$s&&/webkit/i.test(As)&&Rs<2.3,Os=$s&&Rs<5&&Ns<537,Vs=/Firefox/i.test(As),Ls=/Edge/i.test(As),Hs=!Ls&&/Chrome/i.test(As),qs=function(){var t=As.match(/Chrome\/(\d+)/);return t&&t[1]?C(t[1]):null}(),zs=/MSIE\s8\.0/.test(As),Ws=function(){var t=/MSIE\s(\d+)\.\d/.exec(As),i=t&&C(t[1]);return!i&&/Trident\/7.0/i.test(As)&&/rv:11.0/.test(As)&&(i=11),i}(),Gs=/Safari/i.test(As)&&!Hs&&!$s&&!Ls,Xs=Gs||Fs,Js=is()&&("ontouchstart"in b||b.DocumentTouch&&b.document instanceof b.DocumentTouch),Qs=is()&&"backgroundSize"in b.document.createElement("video").style,Ys=w.freeze({__proto__:null,IS_IPAD:Es,IS_IPHONE:Bs,IS_IPOD:Is,IS_IOS:Fs,IOS_VERSION:Ds,IS_ANDROID:$s,ANDROID_VERSION:Rs,IS_OLD_ANDROID:Us,IS_NATIVE_ANDROID:Os,IS_FIREFOX:Vs,IS_EDGE:Ls,IS_CHROME:Hs,CHROME_VERSION:qs,IS_IE8:zs,IE_VERSION:Ws,IS_SAFARI:Gs,IS_ANY_SAFARI:Xs,TOUCH_ENABLED:Js,BACKGROUND_SIZE_SUPPORTED:Qs});function Ks(t,i){var s=us(t);0===s.handlers[i].length&&(delete s.handlers[i],t.removeEventListener?t.removeEventListener(i,s.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+i,s.dispatcher)),w.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===w.getOwnPropertyNames(s).length&&ls(t)}function Zs(t,i,s,e){s.forEach(function(s){t(i,s,e)})}function te(t){function i(){return!0}function s(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var e=t||b.event;for(var n in t={},e)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&"path"!==n&&("returnValue"===n&&e.preventDefault||(t[n]=e[n]));if(t.target||(t.target=t.srcElement||Di),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){e.preventDefault&&e.preventDefault(),t.returnValue=!1,e.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){e.stopPropagation&&e.stopPropagation(),t.cancelBubble=!0,e.cancelBubble=!0,t.isPropagationStopped=i},t.isPropagationStopped=s,t.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation(),t.isImmediatePropagationStopped=i,t.stopPropagation()},t.isImmediatePropagationStopped=s,null!==t.clientX&&void 0!==t.clientX){var r=Di.documentElement,h=Di.body;t.pageX=t.clientX+(r&&r.scrollLeft||h&&h.scrollLeft||0)-(r&&r.clientLeft||h&&h.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||h&&h.scrollTop||0)-(r&&r.clientTop||h&&h.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var ie=!1;!function(){try{var t=w.defineProperty({},"passive",{get:function(){ie=!0}});b.addEventListener("test",null,t)}catch(t){}}();var se=["touchstart","touchmove"];function ee(t,i,s){if(Array.isArray(i))return Zs(ee,t,i,s);var e=us(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=Ui()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=te(i);var n=e.handlers[i.type];if(n)for(var r=n.slice(0),h=0,o=r.length;h-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function ne(t,i,s){if(cs(t)){var e=us(t);if(e.handlers){if(Array.isArray(i))return Zs(ne,t,i,s);var n=function(i){e.handlers[i]=[],Ks(t,i)};if(i){var r=e.handlers[i];if(r)if(s){if(s.guid)for(var h=0;h0)for(var e=0,n=t.length;e0)for(var r=0,h=i.length;r0)for(var o=0,a=s.length;o=0;t--)this.m[t].dispose&&this.m[t].dispose();this.m=null,this.k=null,this.C=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),ls(this.v),this.v=null},i.player=function(){return this.t},i.options=function(t){return Xi.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=ve(this.h,t),this.h):this.h},i.el=function(){return this.v},i.createEl=function(t,i,s){return ns(t,i,s)},i.localize=function(t){var i=this.t.language&&this.t.language(),s=this.t.languages&&this.t.languages();if(!i||!s)return t;var e=s[i];if(e&&e[t])return e[t];var n=s[i.split("-")[0]];return n&&n[t]?n[t]:t},i.contentEl=function(){return this.S||this.v},i.id=function(){return this.o},i.name=function(){return this.l},i.children=function(){return this.m},i.getChildById=function(t){return this.k[t]},i.getChild=function(t){if(t)return t=fe(t),this.C[t]},i.addChild=function(i,s,e){var n,r;if(void 0===s&&(s={}),void 0===e&&(e=this.m.length),"string"==typeof i){r=fe(i),s||(s={}),!0===s&&(Xi.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),s={});var h=s.componentClass||r;s.name=r;var o=t.getComponent(h);if(!o)throw new m("Component "+h+" does not exist");if("function"!=typeof o)return null;n=new o(this.t||this,s)}else n=i;if(this.m.splice(e,0,n),"function"==typeof n.id&&(this.k[n.id()]=n),(r=r||n.name&&fe(n.name()))&&(this.C[r]=n),"function"==typeof n.el&&n.el()){var a=this.contentEl().children[e]||null;this.contentEl().insertBefore(n.el(),a)}return n},i.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.m){for(var i=!1,s=this.m.length-1;s>=0;s--)if(this.m[s]===t){i=!0,this.m.splice(s,1);break}if(i){this.k[t.id()]=null,this.C[t.name()]=null;var e=t.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},i.initChildren=function(){var i=this,s=this.h.children;if(s){var e,n=this.h,r=t.getComponent("Tech");(e=Array.isArray(s)?s:w.keys(s)).concat(w.keys(this.h).filter(function(t){return!e.some(function(i){return"string"==typeof i?t===i:t===i.name})})).map(function(t){var e,n;return"string"==typeof t?n=s[e=t]||i.h[e]||{}:(e=t.name,n=t),{name:e,opts:n}}).filter(function(i){var s=t.getComponent(i.opts.componentClass||fe(i.name));return s&&!r.isTech(s)}).forEach(function(t){var s=t.name,e=t.opts;if(void 0!==n[s]&&(e=n[s]),!1!==e){!0===e&&(e={}),e.playerOptions=i.h.playerOptions;var r=i.addChild(s,e);r&&(i[s]=r)}})}},i.buildCSSClass=function(){return""},i.on=function(t,i,s){var e=this;if("string"==typeof t||Array.isArray(t))ee(this.v,t,n(this,i));else{var r=t,h=i,o=n(this,s),a=function(){return e.off(r,h,o)};a.guid=o.guid,this.on("dispose",a);var u=function(){return e.off("dispose",a)};u.guid=o.guid,t.nodeName?(ee(r,h,o),ee(r,"dispose",u)):"function"==typeof t.on&&(r.on(h,o),r.on("dispose",u))}return this},i.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))ne(this.v,t,i);else{var e=t,r=i,h=n(this,s);this.off("dispose",h),t.nodeName?(ne(e,r,h),ne(e,"dispose",h)):(e.off(r,h),e.off("dispose",h))}return this},i.one=function(t,i,s){var e=arguments,r=this;if("string"==typeof t||Array.isArray(t))he(this.v,t,n(this,i));else{var h=t,o=i,a=n(this,s),u=function t(){r.off(h,o,t),a.apply(null,e)};u.guid=a.guid,this.on(h,o,u)}return this},i.trigger=function(t,i){return re(this.v,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.j?i?t.call(this):this.setTimeout(t,1):(this.T=this.T||[],this.T.push(t))),this},i.triggerReady=function(){this.j=!0,this.setTimeout(function(){var t=this.T;this.T=[],t&&t.length>0&&t.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},i.$=function(t,i){return Ts(t,i||this.contentEl())},i.$$=function(t,i){return Ms(t,i||this.contentEl())},i.hasClass=function(t){return ds(this.v,t)},i.addClass=function(t){return fs(this.v,t),this},i.removeClass=function(t){return vs(this.v,t),this},i.toggleClass=function(t,i){return ps(this.v,t,i),this},i.show=function(){return this.removeClass("vjs-hidden"),this},i.hide=function(){return this.addClass("vjs-hidden"),this},i.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},i.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},i.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.v,t)},i.setAttribute=function(t,i){return ys(this.v,t,i),this},i.removeAttribute=function(t){return bs(this.v,t),this},i.width=function(t,i){return this.dimension("width",t,i)},i.height=function(t,i){return this.dimension("height",t,i)},i.dimensions=function(t,i){return this.width(t,!0).height(i)},i.dimension=function(t,i,s){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.v.style[t]=i:this.v.style[t]="auto"===i?"":i+"px",s||this.trigger("resize"),this;if(!this.v)return 0;var e=this.v.style[t],n=e.indexOf("px");return x(-1!==n?e.slice(0,n):this.v["offset"+fe(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new m("currentDimension only accepts width or height value");if("function"==typeof b.getComputedStyle){var s=b.getComputedStyle(this.v);i=s.getPropertyValue(t)||s[t]}if(0===(i=C(i))){var e="offset"+fe(t);i=this.v[e]}return i},i.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},i.currentWidth=function(){return this.currentDimension("width")},i.currentHeight=function(){return this.currentDimension("height")},i.focus=function(){this.v.focus()},i.blur=function(){this.v.blur()},i.emitTapEvents=function(){var t,i=0,s=null;this.on("touchstart",function(e){1===e.touches.length&&(s={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},i=(new Date).getTime(),t=!0)}),this.on("touchmove",function(i){if(i.touches.length>1)t=!1;else if(s){var e=i.touches[0].pageX-s.pageX,n=i.touches[0].pageY-s.pageY;_.sqrt(e*e+n*n)>10&&(t=!1)}});var e=function(){t=!1};this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",function(e){(s=null,!0===t)&&((new Date).getTime()-i<200&&(e.preventDefault(),this.trigger("tap")))})},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=n(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){i(),this.clearInterval(t),t=this.setInterval(i,250)});var s=function(s){i(),this.clearInterval(t)};this.on("touchmove",i),this.on("touchend",s),this.on("touchcancel",s)}},i.setTimeout=function(t,i){t=n(this,t);var s=b.setTimeout(t,i),e=function(){this.clearTimeout(s)};return e.guid="vjs-timeout-"+s,this.on("dispose",e),s},i.clearTimeout=function(t){b.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=n(this,t);var s=b.setInterval(t,i),e=function(){this.clearInterval(s)};return e.guid="vjs-interval-"+s,this.on("dispose",e),s},i.clearInterval=function(t){b.clearInterval(t);var i=function(){};return i.guid="vjs-interval-"+t,this.off("dispose",i),t},t.registerComponent=function(i,s){if(i){if(i=fe(i),t.M||(t.M={}),"Player"===i&&t.M[i]){var e=t.M[i];if(e.players&&w.keys(e.players).length>0&&w.keys(e.players).map(function(t){return e.players[t]}).every(Boolean))throw new m("Can not register Player component after player has been created")}return t.M[i]=s,s}},t.getComponent=function(i){if(i)return i=fe(i),t.M&&t.M[i]?t.M[i]:b&&b.videojs&&b.videojs[i]?(Xi.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),b.videojs[i]):void 0},t.extend=function(i){i=i||{},Xi.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var s=i.init||i.init||this.prototype.init||this.prototype.init||function(){},e=function(){s.apply(this,arguments)};for(var n in(e.prototype=w.create(this.prototype)).constructor=e,e.extend=t.extend,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);return e},t}();pe.registerComponent("Component",pe);var me=function(){};function ge(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ye(t,i){return(ye=w.setPrototypeOf?w.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function be(t,i){t.prototype=w.create(i.prototype),t.prototype.constructor=t,ye(t,i)}function ke(t,i,s,e){return void 0===e&&(Xi.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new m("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+i+") is greater than or equal to the maximum bound ("+s+").")}(t,e,s.length-1),s[e][i]}function we(t){return void 0===t||0===t.length?{length:0,start:function(){throw new m("This TimeRanges object is empty")},end:function(){throw new m("This TimeRanges object is empty")}}:{length:t.length,start:ke.bind(null,"start",0,t),end:ke.bind(null,"end",1,t)}}function _e(t,i){return Array.isArray(t)?we(t):void 0===t||void 0===i?we():we([[t,i]])}function xe(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=_e(0,0));for(var r=0;ri&&(e=i),n+=e-s;return n/i}me.prototype.A={},me.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},ee(this,t,i),this.addEventListener=s},me.prototype.addEventListener=me.prototype.on,me.prototype.off=function(t,i){ne(this,t,i)},me.prototype.removeEventListener=me.prototype.off,me.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},he(this,t,i),this.addEventListener=s},me.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=te(t),this.A[i]&&this["on"+i]&&this["on"+i](t),re(this,t)},me.prototype.dispatchEvent=me.prototype.trigger;var Ce,Se,je,Te,Me={prefixed:!0},Ae=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Pe=Ae[0];for(Se=0;Se',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),Di.body.appendChild(e));for(var r={},h=0;h=0&&"[object Function]"===dn.call(t.callee)),s};w.keys||(Qe=w.prototype.hasOwnProperty,Ye=w.prototype.toString,Ke=fn,Ze=w.prototype.propertyIsEnumerable,tn=!Ze.call({toString:null},"toString"),sn=Ze.call(function(){},"prototype"),en=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],nn=function(t){var i=t.constructor;return i&&i.prototype===t},rn={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},hn=function(){if(void 0===s)return!1;for(var t in s)try{if(!rn["$"+t]&&Qe.call(s,t)&&null!==s[t]&&"object"==typeof s[t])try{nn(s[t])}catch(t){return!0}}catch(t){return!0}return!1}(),on=function(t){if(void 0===s||!hn)return nn(t);try{return nn(t)}catch(t){return!1}},Je=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===Ye.call(t),e=Ke(t),n=i&&"[object String]"===Ye.call(t),r=[];if(!i&&!s&&!e)throw new g("Object.keys called on a non-object");var h=sn&&s;if(n&&t.length>0&&!Qe.call(t,0))for(var o=0;o0)for(var a=0;a2?arguments[2]:{},e=kn(i);wn&&(e=xn.call(e,w.getOwnPropertySymbols(i)));for(var n=0;n1&&"boolean"!=typeof i)throw new g('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in $n))throw new k("intrinsic "+t+" does not exist!");if(void 0===$n[s]&&!i)throw new g("intrinsic "+t+" exists, but is not available. Please file an issue!");return $n[s]},Un=ln.call(Function.call,w.prototype.hasOwnProperty),On=Rn,Vn=On("%TypeError%"),Ln=On("%SyntaxError%"),Hn=Un,qn={"Property Descriptor":function(t,i){if("Object"!==t.Type(i))return!1;var s={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var e in i)if(Hn(i,e)&&!s[e])return!1;var n=Hn(i,"[[Value]]"),r=Hn(i,"[[Get]]")||Hn(i,"[[Set]]");if(n&&r)throw new Vn("Property Descriptors may not be both accessor and data descriptors");return!0}},zn=Number.isNaN||function(t){return t!=t},Wn=Number.isNaN||function(t){return t!=t},Gn=Number.isFinite||function(t){return"number"==typeof t&&!Wn(t)&&t!==1/0&&t!==-1/0},Xn=Function.prototype.toString,Jn=/^\s*class\b/,Qn=function(t){try{var i=Xn.call(t);return Jn.test(i)}catch(t){return!1}},Yn=w.prototype.toString,Kn="function"==typeof Mt&&"symbol"==typeof Mt.toStringTag,Zn=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(Kn)return function(t){try{return!Qn(t)&&(Xn.call(t),!0)}catch(t){return!1}}(t);if(Qn(t))return!1;var i=Yn.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},tr=w.prototype.toString,ir=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},sr=Zn,er=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===tr.call(t)?String:Number)===String||i===Number){var s,e,n=i===String?["toString","valueOf"]:["valueOf","toString"];for(e=0;e=0?1:-1},dr=function(t,i){var s=t%i;return _.floor(s>=0?s:s+i)},fr=Un,vr={ToPrimitive:function(t){return ir(t)?t:arguments.length>1?er(t,arguments[1]):er(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return ur(i)?0:0!==i&&cr(i)?lr(i)*_.floor(_.abs(i)):i},ToInt32:function(t){return this.ToNumber(t)|0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var i=this.ToNumber(t);if(ur(i)||0===i||!cr(i))return 0;var s=lr(i)*_.floor(_.abs(i));return dr(s,65536)},ToString:function(t){return or(t)},ToObject:function(t){return this.CheckObjectCoercible(t),rr(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new hr(i||"Cannot call method on "+t);return t},IsCallable:Zn,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:ur(t)&&ur(i)},Type:function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0},IsPropertyDescriptor:function(t){if("Object"!==this.Type(t))return!1;var i={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var s in t)if(fr(t,s)&&!i[s])return!1;var e=fr(t,"[[Value]]"),n=fr(t,"[[Get]]")||fr(t,"[[Set]]");if(e&&n)throw new hr("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(ar(this,"Property Descriptor","Desc",t),!(!fr(t,"[[Get]]")&&!fr(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(ar(this,"Property Descriptor","Desc",t),!(!fr(t,"[[Value]]")&&!fr(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(ar(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(ar(this,"Property Descriptor","Desc",t),this.IsDataDescriptor(t))return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};if(this.IsAccessorDescriptor(t))return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};throw new hr("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new hr("ToPropertyDescriptor requires an object");var i={};if(fr(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),fr(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),fr(t,"value")&&(i["[[Value]]"]=t.value),fr(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),fr(t,"get")){var s=t.get;if(void 0!==s&&!this.IsCallable(s))throw new g("getter must be a function");i["[[Get]]"]=s}if(fr(t,"set")){var e=t.set;if(void 0!==e&&!this.IsCallable(e))throw new hr("setter must be a function");i["[[Set]]"]=e}if((fr(i,"[[Get]]")||fr(i,"[[Set]]"))&&(fr(i,"[[Value]]")||fr(i,"[[Writable]]")))throw new hr("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},pr=ln.call(Function.call,String.prototype.replace),mr=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,gr=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,yr=function(){var t=vr.ToString(vr.CheckObjectCoercible(this));return pr(pr(t,mr,""),gr,"")},br=yr,kr=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:br},wr=An,_r=kr,xr=An,Cr=yr,Sr=kr,jr=function(){var t=_r();return wr(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},Tr=ln.call(Function.call,Sr());xr(Tr,{getPolyfill:Sr,implementation:Cr,shim:jr});var Mr=Tr,Ar=Zn,Pr=w.prototype.toString,Nr=w.prototype.hasOwnProperty,Er=Mr,Br=function(t,i,s){if(!Ar(i))throw new g("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===Pr.call(t)?function(t,i,s){for(var e=0,n=t.length;e0&&(d=u(function(){a=!0,l.abort("timeout");var t=new m("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)},t.timeout)),l.setRequestHeader)for(o in g)g.hasOwnProperty(o)&&l.setRequestHeader(o,g[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new m("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(l.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(l),l.send(p),l}Lr.XMLHttpRequest=Dr.XMLHttpRequest||function(){},Lr.XDomainRequest="withCredentials"in new Lr.XMLHttpRequest?Lr.XMLHttpRequest:Dr.XDomainRequest,function(t,i){for(var s=0;s0&&(b.console&&b.console.groupCollapsed&&b.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach(function(t){return Xi.error(t)}),b.console&&b.console.groupEnd&&b.console.groupEnd()),s.flush()},zr=function(t){function i(s){var e;if(void 0===s&&(s={}),!s.tech)throw new m("A tech was not provided.");var r=ve(s,{kind:Ve[s.kind]||"subtitles",language:s.language||s.srclang||""}),h=Le[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(h="hidden");var a=e=t.call(this,r)||this;if(a.H=r.tech,zs)for(var u in i.prototype)"constructor"!==u&&(a[u]=i.prototype[u]);a.L=[],a.q=[];var c=new Re(a.L),l=new Re(a.q),d=!1,f=n(a,function(){this.activeCues,d&&(this.trigger("cuechange"),d=!1)});return"disabled"!==h&&a.H.ready(function(){a.H.on("timeupdate",f)},!0),w.defineProperty(a,"default",{get:function(){return o},set:function(){}}),w.defineProperty(a,"mode",{get:function(){return h},set:function(t){var i=this;Le[t]&&("showing"===(h=t)&&this.H.ready(function(){i.H.on("timeupdate",f)},!0),this.trigger("modechange"))}}),w.defineProperty(a,"cues",{get:function(){return this.W?c:null},set:function(){}}),w.defineProperty(a,"activeCues",{get:function(){if(!this.W)return null;if(0===this.cues.length)return l;for(var t=this.H.currentTime(),i=[],s=0,e=this.cues.length;s=t||n.startTime===n.endTime&&n.startTime<=t&&n.startTime+.5>=t)&&i.push(n)}if(d=!1,i.length!==this.q.length)d=!0;else for(var r=0;r=0;r--)if(s[r].selected){Yr(s,s[r]);break}if(zs){for(var h in n=Di.createElement("custom"),Jr.prototype)"constructor"!==h&&(n[h]=Jr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,w.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t=0;r--)if(s[r].enabled){Zr(s,s[r]);break}if(zs){for(var h in n=Di.createElement("custom"),Jr.prototype)"constructor"!==h&&(n[h]=Jr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,n||ge(e)}be(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.enabled&&Zr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",function(){s.st||(s.st=!0,Zr(s,i),s.st=!1,s.trigger("change"))})},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(Jr),ih=void 0;var sh=function(t){function i(i,s){var e;return void 0===i&&(i={}),void 0===s&&(s=function(){}),i.reportTouchActivity=!1,(e=t.call(this,null,i,s)||this).et=!1,e.on("playing",function(){this.et=!0}),e.on("loadstart",function(){this.et=!1}),e.nt=i.textTracks,e.rt=i.videoTracks,e.ht=i.audioTracks,e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===i["native"+t+"Tracks"]&&(e["featuresNative"+t+"Tracks"]=!1)}),!1===i.nativeCaptions&&(e.featuresNativeTextTracks=!1),e.featuresNativeTextTracks||e.emulateTextTracks(),e.ot=new Qr,e.initTextTrackListeners(),e.initTrackListeners(),i.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.l=e.constructor.name||"Unknown Tech"),e}be(i,t);var s=i.prototype;return s.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},s.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},s.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(n(this,function(){var t=this.bufferedPercent();this.ut!==t&&this.trigger("progress"),this.ut=t,1===t&&this.stopTrackingProgress()}),500)},s.onDurationChange=function(t){this.ct=this.duration()},s.buffered=function(){return _e(0,0)},s.bufferedPercent=function(){return xe(this.buffered(),this.ct)},s.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},s.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},s.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},s.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},s.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},s.clearTracks=function(t){var i=this;(t=[].concat(t)).forEach(function(t){for(var s=i[t+"Tracks"]()||[],e=s.length;e--;){var n=s[e];"text"===t&&i.removeRemoteTextTrack(n),s.it(n)}})},s.cleanupAutoTextTracks=function(){for(var t=this.ot||[],i=t.length;i--;){var s=t[i];this.removeRemoteTextTrack(s)}},s.reset=function(){},s.error=function(t){return void 0!==t&&(this.lt=new Ne(t),this.trigger("error")),this.lt},s.played=function(){return this.et?_e(0,0):_e()},s.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.initTextTrackListeners=function(){var t=n(this,function(){this.trigger("texttrackchange")}),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",n(this,function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)})))},s.initTrackListeners=function(){var t=this;["video","audio"].forEach(function(i){var s=function(){t.trigger(i+"trackchange")},e=t[i+"Tracks"]();e.addEventListener("removetrack",s),e.addEventListener("addtrack",s),t.on("dispose",function(){e.removeEventListener("removetrack",s),e.removeEventListener("addtrack",s)})})},s.dt=function(){var t=this;if(!b.WebVTT)if(Di.body.contains(this.el())){if(!this.h["vtt.js"]&&Wi(ih)&&w.keys(ih).length>0)return void this.trigger("vttjsloaded");var i=Di.createElement("script");i.src=this.h["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",i.onload=function(){t.trigger("vttjsloaded")},i.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){i.onload=null,i.onerror=null}),b.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.dt)},s.emulateTextTracks=function(){var t=this,i=this.textTracks();if(i){var s=this.remoteTextTracks(),e=function(t){return i.tt(t.track)},n=function(t){return i.it(t.track)};s.on("addtrack",e),s.on("removetrack",n),this.dt();var r=function(){return t.trigger("texttrackchange")},h=function(){r();for(var t=0;t0||h>0?n+":":"")+(e=((n||r>=10)&&e<10?"0"+e:e)+":")+(s=s<10?"0"+s:s)}ph.prototype.St="Play",pe.registerComponent("PlayToggle",ph);var gh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"languagechange",e.updateContent),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-current-time-display",innerHTML:'Current Time 0:00'},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),s=this.localize("Current Time"),e=mh(i,this.t.duration());e!==this.Mt&&(this.Mt=e,this.S.innerHTML=''+s+" "+e)},i}(pe);pe.registerComponent("CurrentTimeDisplay",gh);var yh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"durationchange",e.updateContent),e.on(i,"timeupdate",e.updateContent),e.on(i,"loadedmetadata",e.updateContent),e.on(i,"languagechange",e.updateContent),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-duration-display",innerHTML:''+this.localize("Duration Time")+" 0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.duration();if(i&&this.ct!==i){this.ct=i;var s=this.localize("Duration Time"),e=mh(i);this.S.innerHTML=''+s+" "+e}},i}(pe);pe.registerComponent("DurationDisplay",yh);var bh=function(t){function i(){return t.apply(this,arguments)||this}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"
/
"})},i}(pe);pe.registerComponent("TimeDivider",bh);var kh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"durationchange",e.updateContent),e.on(i,"languagechange",e.updateContent),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-remaining-time-display",innerHTML:''+this.localize("Remaining Time")+" -0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){if(this.t.duration()){var i=this.localize("Remaining Time"),s=mh(this.t.remainingTime());s!==this.Mt&&(this.Mt=s,this.S.innerHTML=''+i+" -"+s)}},i}(pe);pe.registerComponent("RemainingTimeDisplay",kh);var wh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateShowing(),e.on(e.player(),"durationchange",e.updateShowing),e.on(e.player(),"languagechange",e.handleLanguagechange),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.S=ns("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.Ct=ns("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.At=Di.createTextNode(this.localize("LIVE")),this.S.appendChild(this.Ct),this.S.appendChild(this.At),i.appendChild(this.S),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.Ct.innerHTML=this.localize("Stream Type"),this.At.innerHTML=this.localize("LIVE")},i}(pe);pe.registerComponent("LiveDisplay",wh);var _h=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).bar=e.getChild(e.h.barName),e.vertical(!!e.h.vertical),e.on("mousedown",e.handleMouseDown),e.on("touchstart",e.handleMouseDown),e.on("focus",e.handleFocus),e.on("blur",e.handleBlur),e.on("click",e.handleClick),e.on(i,"controlsvisible",e.update),e.on(i,e.playerEvent,e.update),e}be(i,t);var s=i.prototype;return s.createEl=function(i,s,e){return void 0===s&&(s={}),void 0===e&&(e={}),s.className=s.className+" vjs-slider",s=qi({tabIndex:0},s),e=qi({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},e),t.prototype.createEl.call(this,i,s,e)},s.handleMouseDown=function(t){var i=this.bar.v.ownerDocument;t.preventDefault(),Di.body.focus(),Di.onselectstart=function(){return!1},this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove),this.on(i,"mouseup",this.handleMouseUp),this.on(i,"touchmove",this.handleMouseMove),this.on(i,"touchend",this.handleMouseUp),this.handleMouseMove(t)},s.handleMouseMove=function(t){},s.handleMouseUp=function(){var t=this.bar.v.ownerDocument;Di.onselectstart=function(){return!0},this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},s.update=function(){if(this.v){var t=this.getPercent(),i=this.bar;if(i){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var s=(100*t).toFixed(2)+"%";this.vertical()?i.el().style.height=s:i.el().style.width=s}}},s.calculateDistance=function(t){var i=ws(this.v,t);return this.vertical()?i.y:i.x},s.handleFocus=function(){this.on(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},s.handleBlur=function(){this.off(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},s.vertical=function(t){return void 0===t?this.Pt||!1:(this.Pt=!!t,this.Pt?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(pe);function xh(t,i){if(!t||!i)return"";if("function"==typeof b.getComputedStyle){var s=b.getComputedStyle(t);return s?s[i]:""}return t.currentStyle[i]||""}pe.registerComponent("Slider",_h);var Ch=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Nt=[],e.on(i,"progress",e.update),e.on(i,"languagechange",e.handleLanguagechange),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Et=ns("span",{innerHTML:this.localize("Loaded")}),this.Bt=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Et),this.Ct.appendChild(this.Bt),i.appendChild(this.Ct),i},s.update=function(t){var i=this.t.buffered(),s=this.t.duration(),e=this.t.bufferedEnd(),n=this.Nt,r=function(t,i){var s=t/i||0;return 100*(s>=1?1:s)+"%"};this.v.style.width=r(e,s);for(var h=0;hi.length;c--)this.v.removeChild(n[c-1]);n.length=i.length},s.handleLanguagechange=function(){this.Et.innerHTML=this.localize("Loaded")},i}(pe);pe.registerComponent("LoadProgressBar",Ch);var Sh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(ge(e),e.updateDataAttr)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&e.addClass("vjs-keep-tooltips-inside"),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"});return this.It=ns("span",{innerHTML:this.localize("Progress")}),this.Ft=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",mh(i,this.t.duration()))},s.handleLanguagechange=function(){this.It.innerHTML=this.localize("Progress")},i}(pe);pe.registerComponent("PlayProgressBar",Sh);var jh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(ge(e),e.updateDataAttr)),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar"});return this.tooltip=ns("div",{className:"vjs-time-tooltip"}),this.It=ns("span",{innerHTML:this.localize("Progress")}),this.Ft=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=mh(this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),this.t.duration());this.v.setAttribute("data-current-time",i),this.tooltip.innerHTML=i},s.handleLanguagechange=function(){this.It.innerHTML=this.localize("Progress")},i}(pe);pe.registerComponent("TooltipProgressBar",jh);var Th=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateProgress),e.on(i,"ended",e.updateProgress),i.ready(n(ge(e),e.updateProgress)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltipProgressBar=e.addChild("TooltipProgressBar")),e}be(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},s.updateProgress=function(t){if(this.updateAriaAttributes(this.v),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.v),this.tooltipProgressBar.v.style.width=this.bar.v.style.width;var i=C(xh(this.player().el(),"width")),s=C(xh(this.tooltipProgressBar.tooltip,"width")),e=this.tooltipProgressBar.el().style;e.maxWidth=_.floor(i-s/2)+"px",e.minWidth=_.ceil(s/2)+"px",e.right="-"+s/2+"px"}},s.updateAriaAttributes=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",mh(i,this.t.duration()))},s.getPercent=function(){var t=this.t.currentTime()/this.t.duration();return t>=1?1:t},s.handleMouseDown=function(i){this.t.scrubbing(!0),this.videoWasPlaying=!this.t.paused(),this.t.pause(),t.prototype.handleMouseDown.call(this,i)},s.handleMouseMove=function(t){var i=this.calculateDistance(t)*this.t.duration();i===this.t.duration()&&(i-=.1),this.t.currentTime(i)},s.handleMouseUp=function(i){t.prototype.handleMouseUp.call(this,i),this.t.scrubbing(!1),this.videoWasPlaying&&this.t.play()},s.stepForward=function(){this.t.currentTime(this.t.currentTime()+5)},s.stepBack=function(){this.t.currentTime(this.t.currentTime()-5)},i}(_h);Th.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},Th.prototype.playerEvent="timeupdate",pe.registerComponent("SeekBar",Th);var Mh=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltip=ns("div",{className:"vjs-time-tooltip"}),e.el().appendChild(e.tooltip),e.addClass("vjs-keep-tooltips-inside")),e.update(0,0),i.on("ready",function(){e.on(i.controlBar.progressControl.el(),"mousemove",function(t,i){var s=Date.now();return function(){var e=Date.now();e-s>=i&&(t.apply(void 0,arguments),s=e)}}(n(ge(e),e.handleMouseMove),25))}),e}be(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},s.handleMouseMove=function(t){var i=this.t.duration(),s=this.calculateDistance(t)*i,e=t.pageX-ks(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=mh(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Dt(i)+1,n=C(xh(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return ws(this.el().parentNode,t).x},s.Dt=function(t){if(!this.keepTooltipsInside)return t;var i=C(xh(this.player().el(),"width")),s=C(xh(this.tooltip,"width"))/2,e=t;return ti-s&&(e=_.floor(i-s)),e},i}(pe);pe.registerComponent("MouseTimeDisplay",Mh);var Ah=function(t){function i(){return t.apply(this,arguments)||this}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(pe);Ah.prototype.h={children:["seekBar"]},pe.registerComponent("ProgressControl",Ah);var Ph=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},s.handleFullscreenChange=function(t){this.t.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},s.handleClick=function(t){this.t.isFullscreen()?this.t.exitFullscreen():this.t.requestFullscreen()},i}(dh);Ph.prototype.St="Fullscreen",pe.registerComponent("FullscreenToggle",Ph);var Nh=function(t){function i(){return t.apply(this,arguments)||this}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},i}(pe);pe.registerComponent("VolumeLevel",Nh);var Eh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.updateARIAAttributes),i.ready(n(ge(e),e.updateARIAAttributes)),e}be(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},s.handleMouseMove=function(t){this.checkMuted(),this.t.volume(this.calculateDistance(t))},s.checkMuted=function(){this.t.muted()&&this.t.muted(!1)},s.getPercent=function(){return this.t.muted()?0:this.t.volume()},s.stepForward=function(){this.checkMuted(),this.t.volume(this.t.volume()+.1)},s.stepBack=function(){this.checkMuted(),this.t.volume(this.t.volume()-.1)},s.updateARIAAttributes=function(t){var i=(100*this.t.volume()).toFixed(2);this.v.setAttribute("aria-valuenow",i),this.v.setAttribute("aria-valuetext",i+"%")},i}(_h);Eh.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},Eh.prototype.playerEvent="volumechange",pe.registerComponent("VolumeBar",Eh);var Bh=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",function(){!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),e}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(pe);Bh.prototype.h={children:["volumeBar"]},pe.registerComponent("VolumeControl",Bh);var Ih=function(t){function i(){return t.apply(this,arguments)||this}be(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,function(){this.unlockShowing()}))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=ns(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.appendChild(this.S),ee(s,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),s},i}(pe);pe.registerComponent("Popup",Ih);var Fh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}be(i,t);var s=i.prototype;return s.update=function(){var t=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=t,this.addChild(t),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},s.createPopup=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},i}(nh);pe.registerComponent("PopupButton",Fh);var Dh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.update),i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",function(){this.update(),!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),e}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.muted(!this.t.muted())},s.update=function(t){var i=this.t.volume(),s=3;this.t.muted()?s=0:i<.33?s=1:i<.67&&(s=2);var e=this.t.muted()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e);for(var n=0;n<4;n++)vs(this.v,"vjs-vol-"+n);fs(this.v,"vjs-vol-"+s)},i}(dh);Dh.prototype.St="Mute",pe.registerComponent("MuteToggle",Dh);var $h=function(t){function i(i,s){var e;function n(){i.H&&!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}return void 0===s&&(s={}),void 0===s.inline&&(s.inline=!0),void 0===s.vertical&&(s.inline?s.vertical=!1:s.vertical=!0),s.volumeBar=s.volumeBar||{},s.volumeBar.vertical=!!s.vertical,(e=t.call(this,i,s)||this).on(i,"volumechange",e.volumeUpdate),e.on(i,"loadstart",e.volumeUpdate),n.call(ge(e)),e.on(i,"loadstart",n),e.on(e.volumeBar,["slideractive","focus"],function(){this.addClass("vjs-slider-active")}),e.on(e.volumeBar,["sliderinactive","blur"],function(){this.removeClass("vjs-slider-active")}),e.on(e.volumeBar,["focus"],function(){this.addClass("vjs-lock-showing")}),e.on(e.volumeBar,["blur"],function(){this.removeClass("vjs-lock-showing")}),e}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){var i="";return i=this.h.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+t.prototype.buildCSSClass.call(this)+" "+i},s.createPopup=function(){var t=new Ih(this.t,{contentElType:"div"}),i=new Eh(this.t,this.h.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},s.handleClick=function(i){Dh.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],n(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove))},i}(Fh);$h.prototype.volumeUpdate=Dh.prototype.update,$h.prototype.St="Mute",pe.registerComponent("VolumeMenuButton",$h);var Rh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).$t=-1,e.on("keydown",e.handleKeyPress),e}be(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,function(t){this.unlockShowing()}))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=ns(i,{className:"vjs-menu-content"}),this.S.setAttribute("role","menu");var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.setAttribute("role","presentation"),s.appendChild(this.S),ee(s,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),s},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},s.stepForward=function(){var t=0;void 0!==this.$t&&(t=this.$t+1),this.focus(t)},s.stepBack=function(){var t=0;void 0!==this.$t&&(t=this.$t-1),this.focus(t)},s.focus=function(t){void 0===t&&(t=0);var i=this.children().slice();i.length&&i[0].className&&/vjs-menu-title/.test(i[0].className)&&i.shift(),i.length>0&&(t<0?t=0:t>=i.length&&(t=i.length-1),this.$t=t,i[t].v.focus())},i}(pe);pe.registerComponent("Menu",Rh);var Uh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e.Rt=!0,e.v.setAttribute("aria-haspopup","true"),e.v.setAttribute("role","menuitem"),e.on("keydown",e.handleSubmenuKeyPress),e}be(i,t);var s=i.prototype;return s.update=function(){var t=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=t,this.addChild(t),this.Ut=!1,this.v.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Ot?this.hide():this.show()},s.createMenu=function(){var t=new Rh(this.t);if(this.Ot=0,this.h.title){var i=ns("li",{className:"vjs-menu-title",innerHTML:fe(this.h.title),tabIndex:-1});this.Ot+=1,t.m.unshift(i),hs(i,t.contentEl())}if(this.items=this.createItems(),this.items)for(var s=0;s=0;i--){var s=t[i];if(s.kind===this.Lt)return s}},s.getMenuCaption=function(){return this.Ht&&this.Ht.label?this.Ht.label:this.localize(fe(this.Lt))},s.createMenu=function(){return this.h.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},s.createItems=function(){var t=[];if(!this.Ht)return t;var i=this.Ht.cues;if(!i)return t;for(var s=0,e=i.length;s=0;s--)t.addChild(new Zh(this.player(),{rate:i[s]+"x"}));return t},s.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},s.handleClick=function(t){for(var i=this.player().playbackRate(),s=this.playbackRates(),e=s[0],n=0;ni){e=s[n];break}this.player().playbackRate(e)},s.playbackRates=function(){return this.h.playbackRates||this.h.playerOptions&&this.h.playerOptions.playbackRates},s.playbackRateSupported=function(){return this.player().H&&this.player().H.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},s.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},s.updateLabel=function(t){this.playbackRateSupported()&&(this.Vt.innerHTML=this.player().playbackRate()+"x")},i}(Uh);to.prototype.St="Playback Rate",pe.registerComponent("PlaybackRateMenuButton",to);var io=function(t){function i(){return t.apply(this,arguments)||this}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},i}(pe);pe.registerComponent("Spacer",io);var so=function(t){function i(){return t.apply(this,arguments)||this}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){var i=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return i.innerHTML=" ",i},i}(io);pe.registerComponent("CustomControlSpacer",so);var eo=function(t){function i(){return t.apply(this,arguments)||this}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(pe);eo.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},pe.registerComponent("ControlBar",eo);var no=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},s.content=function(){var t=this.player().error();return t?this.localize(t.message):""},i}($e);no.prototype.h=ve($e.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),pe.registerComponent("ErrorDisplay",no);var ro="vjs-text-track-settings",ho=["#000","Black"],oo=["#00F","Blue"],ao=["#0FF","Cyan"],uo=["#0F0","Green"],co=["#F0F","Magenta"],lo=["#F00","Red"],fo=["#FFF","White"],vo=["#FF0","Yellow"],po=["1","Opaque"],mo=["0.5","Semi-Transparent"],go=["0","Transparent"],yo={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ho,fo,lo,uo,oo,vo,co,ao]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[po,mo,go]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[fo,ho,lo,uo,oo,vo,co,ao]},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(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[po,mo]},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:[go,mo,po]}};function bo(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}yo.windowColor.options=yo.backgroundColor.options;var ko,wo=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).setDefaults(),e.hide(),e.updateDisplay=n(ge(e),e.updateDisplay),void 0===s.persistTextTrackSettings&&(e.h.persistTextTrackSettings=e.h.playerOptions.persistTextTrackSettings),e.on(e.$(".vjs-done-button"),"click",function(){e.saveSettings(),e.hide()}),e.on(e.$(".vjs-default-button"),"click",function(){e.setDefaults(),e.updateDisplay()}),Hi(yo,function(t){e.on(e.$(t.selector),"change",e.updateDisplay)}),e.h.persistTextTrackSettings&&e.restoreSettings(),e}be(i,t);var s=i.prototype;return s.zt=function(t){var i=this,s=yo[t],e=s.id.replace("%s",this.o);return[ns("label",{className:"vjs-label",textContent:s.label},{for:e}),ns("select",{id:e},void 0,s.options.map(function(t){return ns("option",{textContent:i.localize(t[1]),value:t[0]})}))]},s.Wt=function(){var t=ns("legend",{textContent:this.localize("Text")}),i=this.zt("color"),s=ns("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.zt("textOpacity"));return ns("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Gt=function(){var t=ns("legend",{textContent:this.localize("Background")}),i=this.zt("backgroundColor"),s=ns("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.zt("backgroundOpacity"));return ns("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Xt=function(){var t=ns("legend",{textContent:this.localize("Window")}),i=this.zt("windowColor"),s=ns("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.zt("windowOpacity"));return ns("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Jt=function(){return ns("div",{className:"vjs-tracksettings-colors"},void 0,[this.Wt(),this.Gt(),this.Xt()])},s.Qt=function(){var t=ns("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.zt("fontPercent")),i=ns("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.zt("edgeStyle")),s=ns("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.zt("fontFamily"));return ns("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},s.Yt=function(){var t=ns("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=ns("button",{className:"vjs-done-button",textContent:"Done"});return ns("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},s.createEl=function(){var t=ns("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=ns("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=ns("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=ns("div",void 0,{role:"document"},[i,s,t]);return ns("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":s.id},e)},s.getValues=function(){var t=this;return function(t,i,s){return void 0===s&&(s=0),Li(t).reduce(function(s,e){return i(s,t[e],e)},s)}(yo,function(i,s,e){var n=function(t,i){return bo(t.options[t.options.selectedIndex].value,i)}(t.$(s.selector),s.parser);return void 0!==n&&(i[e]=n),i},{})},s.setValues=function(t){var i=this;Hi(yo,function(s,e){!function(t,i,s){if(i)for(var e=0;e=0;r--){var h=n[r],o=this.h[h];void 0!==o&&(o?ys(t,h,h):bs(t,h),t[h]=o)}return t},s.Zt=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var i=!1,s=function(){i=!0};this.on("loadstart",s);var e=function(){i||this.trigger("loadstart")};return this.on("loadedmetadata",e),void this.ready(function(){this.off("loadstart",s),this.off("loadedmetadata",e),i||this.trigger("loadstart")})}var n=["loadstart"];n.push("loadedmetadata"),t.readyState>=2&&n.push("loadeddata"),t.readyState>=3&&n.push("canplay"),t.readyState>=4&&n.push("canplaythrough"),this.ready(function(){n.forEach(function(t){this.trigger(t)},this)})}},s.ai=function(){var t=this.el().textTracks;if(t){for(var i=0;i0&&(t.v.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",i))}),NaN}return this.v.duration||NaN},s.width=function(){return this.v.offsetWidth},s.height=function(){return this.v.offsetHeight},s.di=function(){var t=this;if("webkitDisplayingFullscreen"in this.v){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},s=function(){"webkitPresentationMode"in this.v&&"picture-in-picture"!==this.v.webkitPresentationMode&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",s),this.on("dispose",function(){t.off("webkitbeginfullscreen",s),t.off("webkitendfullscreen",i)})}},s.supportsFullScreen=function(){if("function"==typeof this.v.webkitEnterFullScreen){var t=b.navigator&&b.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},s.enterFullScreen=function(){var t=this.v;t.paused&&t.networkState<=t.HAVE_METADATA?(this.v.play(),this.setTimeout(function(){t.pause(),t.webkitEnterFullScreen()},0)):t.webkitEnterFullScreen()},s.exitFullScreen=function(){this.v.webkitExitFullScreen()},s.src=function(t){if(void 0===t)return this.v.src;this.setSrc(t)},s.reset=function(){i.resetMediaElement(this.v)},s.currentSrc=function(){return this.bt?this.bt.src:this.v.currentSrc},s.setControls=function(t){this.v.controls=!!t},s.addTextTrack=function(i,s,e){return this.featuresNativeTextTracks?this.v.addTextTrack(i,s,e):t.prototype.addTextTrack.call(this,i,s,e)},s.createRemoteTextTrack=function(i){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,i);var s=Di.createElement("track");return i.kind&&(s.kind=i.kind),i.label&&(s.label=i.label),(i.language||i.srclang)&&(s.srclang=i.language||i.srclang),i.default&&(s.default=i.default),i.id&&(s.id=i.id),i.src&&(s.src=i.src),s},s.addRemoteTextTrack=function(i,s){var e=t.prototype.addRemoteTextTrack.call(this,i,s);return this.featuresNativeTextTracks&&this.el().appendChild(e),e},s.removeRemoteTextTrack=function(i){if(t.prototype.removeRemoteTextTrack.call(this,i),this.featuresNativeTextTracks)for(var s=this.$$("track"),e=s.length;e--;)i!==s[e]&&i!==s[e].track||this.el().removeChild(s[e])},s.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),b.performance&&"function"==typeof b.performance.now?t.creationTime=b.performance.now():b.performance&&b.performance.timing&&"number"==typeof b.performance.timing.navigationStart&&(t.creationTime=b.Date.now()-b.performance.timing.navigationStart),t},i}(sh);is()&&(xo.TEST_VID=Di.createElement("video"),(_o=Di.createElement("track")).kind="captions",_o.srclang="en",_o.label="English",xo.TEST_VID.appendChild(_o)),xo.isSupported=function(){try{xo.TEST_VID.volume=.5}catch(t){return!1}return!(!xo.TEST_VID||!xo.TEST_VID.canPlayType)},xo.canControlVolume=function(){try{var t=xo.TEST_VID.volume;return xo.TEST_VID.volume=t/2+.1,t!==xo.TEST_VID.volume}catch(t){return!1}},xo.canControlPlaybackRate=function(){if($s&&Hs&&qs<58)return!1;try{var t=xo.TEST_VID.playbackRate;return xo.TEST_VID.playbackRate=t/2+.1,t!==xo.TEST_VID.playbackRate}catch(t){return!1}},xo.supportsNativeTextTracks=function(){return Xs},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","volumechange"],xo.prototype.featuresVolumeControl=xo.canControlVolume(),xo.prototype.featuresPlaybackRate=xo.canControlPlaybackRate(),xo.prototype.movingMediaElementInDOM=!Fs,xo.prototype.featuresFullscreenResize=!0,xo.prototype.featuresProgressEvents=!0,xo.prototype.featuresTimeupdateEvents=!0,xo.prototype.featuresNativeTextTracks=xo.supportsNativeTextTracks(),xo.prototype.featuresNativeVideoTracks=xo.supportsNativeVideoTracks(),xo.prototype.featuresNativeAudioTracks=xo.supportsNativeAudioTracks();var Co=xo.TEST_VID&&xo.TEST_VID.constructor.prototype.canPlayType,So=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,jo=/^video\/mp4/i;xo.patchCanPlayType=function(){Rs>=4&&!Vs?xo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&So.test(t)?"maybe":Co.call(this,t)}:Us&&(xo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&jo.test(t)?"maybe":Co.call(this,t)})},xo.unpatchCanPlayType=function(){var t=xo.TEST_VID.constructor.prototype.canPlayType;return xo.TEST_VID.constructor.prototype.canPlayType=Co,t},xo.patchCanPlayType(),xo.disposeMediaElement=function(t){if(t){var i=t.nodeName.toLowerCase();if("video"===i||"audio"===i){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}}},xo.resetMediaElement=function(t){if(t){for(var i=t.querySelectorAll("source"),s=i.length;s--;)t.removeChild(i[s]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(t){xo.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){xo.prototype["set"+fe(t)]=function(i){this.v[t]=i,i?this.v.setAttribute(t,t):this.v.removeAttribute(t)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(t){xo.prototype[t]=function(){return this.v[t]}}),["volume","src","poster","preload","playbackRate"].forEach(function(t){xo.prototype["set"+fe(t)]=function(i){this.v[t]=i}}),["pause","load"].forEach(function(t){xo.prototype[t]=function(){return this.v[t]()}}),sh.withSourceHandlers(xo),xo.nativeSourceHandler={},xo.nativeSourceHandler.canPlayType=function(t){try{return xo.TEST_VID.canPlayType(t)}catch(t){return""}},xo.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return xo.nativeSourceHandler.canPlayType(t.type);if(t.src){var s=function(t){if("string"==typeof t){var i=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(i)return i.pop().toLowerCase()}return""}(t.src);return xo.nativeSourceHandler.canPlayType("video/"+s)}return""},xo.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},xo.nativeSourceHandler.dispose=function(){},xo.registerSourceHandler(xo.nativeSourceHandler),pe.registerComponent("Html5",xo),sh.registerTech("Html5",xo);var To=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],Mo=function(t){function i(s,e,n){var r;if(s.id=s.id||["vjs_video",Ui()].join("_"),(e=qi(i.getTagSettings(s),e)).initChildren=!1,e.createEl=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof s.closest){var h=s.closest("[lang]");h&&(e.language=h.getAttribute("lang"))}else for(var o=s;o&&1===o.nodeType;){if(gs(o).hasOwnProperty("lang")){e.language=o.getAttribute("lang");break}o=o.parentNode}if(!(r=t.call(this,null,e,n)||this).h||!r.h.techOrder||!r.h.techOrder.length)throw new m("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(r.tag=s,r.tagAttributes=s&&gs(s),r.language(r.h.language),e.languages){var a={};w.getOwnPropertyNames(e.languages).forEach(function(t){a[t.toLowerCase()]=e.languages[t]}),r.pi=a}else r.pi=i.prototype.h.languages;r.mi={},r.gi=e.poster||"",r.yi=!!e.controls,s.controls=!1,r.bi=!1,r.v=r.createEl();var u=ve(r.h);if(e.plugins){var c=e.plugins;w.getOwnPropertyNames(c).forEach(function(t){"function"==typeof this[t]?this[t](c[t]):Xi.error("Unable to find plugin:",t)},ge(r))}r.h.playerOptions=u,r.initChildren(),r.isAudio("audio"===s.nodeName.toLowerCase()),r.controls()?r.addClass("vjs-controls-enabled"):r.addClass("vjs-controls-disabled"),r.v.setAttribute("role","region"),r.isAudio()?r.v.setAttribute("aria-label","audio player"):r.v.setAttribute("aria-label","video player"),r.isAudio()&&r.addClass("vjs-audio"),r.ki()&&r.addClass("vjs-no-flex"),Fs||r.addClass("vjs-workinghover"),i.players[r.o]=ge(r);var l="5.20.6-opentelly.14".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.wi(),r.on("fullscreenchange",r._i),r.on("stageclick",r.xi),r}be(i,t);var s=i.prototype;return s.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.Ci&&this.Ci.parentNode&&this.Ci.parentNode.removeChild(this.Ci),i.players[this.o]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.v&&this.v.player&&(this.v.player=null),this.H&&this.H.dispose(),t.prototype.dispose.call(this)},s.createEl=function(){var i,s=this.tag,e=this.Si=s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player");i=this.v=e?s.parentNode:t.prototype.createEl.call(this,"div"),s.setAttribute("tabindex","-1"),s.removeAttribute("width"),s.removeAttribute("height");var n=gs(s);if(w.getOwnPropertyNames(n).forEach(function(t){"class"===t?i.className+=" "+n[t]:i.setAttribute(t,n[t])}),s.playerId=s.id,s.id+="ji",s.className="vjs-tech",s.player=i.player=this,this.addClass("vjs-paused"),!0!==b.VIDEOJS_NO_DYNAMIC_STYLE){this.Ci=le("vjs-styles-dimensions");var r=Ts(".vjs-styles-defaults"),h=Ts("head");h.insertBefore(this.Ci,r?r.nextSibling:h.firstChild)}this.width(this.h.width),this.height(this.h.height),this.fluid(this.h.fluid),this.aspectRatio(this.h.aspectRatio);for(var o=s.getElementsByTagName("a"),a=0;a0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=e[1]/e[0];t=void 0!==this.Ti?this.Ti:void 0!==this.Mi?this.Mi/n:this.videoWidth()||300,i=void 0!==this.Mi?this.Mi:t*n,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),de(this.Ci,"\n ."+s+" {\n width: "+t+"px;\n height: "+i+"px;\n }\n\n ."+s+".vjs-fluid {\n padding-top: "+100*n+"%;\n }\n ")}else{var r="number"==typeof this.Ti?this.Ti:this.h.width,h="number"==typeof this.Mi?this.Mi:this.h.height,o=this.H&&this.H.el();o&&(r>=0&&(o.width=r),h>=0&&(o.height=h))}},s._t=function(t,i){var s=this;this.H&&this.Ei(),"Html5"!==t&&this.tag&&(sh.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Bi=t,this.j=!1;var e=qi({source:i,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Ii",videoTracks:this.rt,textTracks:this.nt,audioTracks:this.ht,autoplay:this.h.autoplay,playsinline:this.h.playsinline,preload:this.h.preload,loop:this.h.loop,muted:this.h.muted,poster:this.poster(),language:this.language(),playerElIngest:this.Si||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(e.tag=this.tag),i&&(this.Fi=i.type,i.src===this.mi.src&&this.mi.currentTime>0&&(e.startTime=this.mi.currentTime),this.mi.sources=null,this.mi.source=i,this.mi.src=i.src);var r=sh.getTech(t);r||(r=pe.getComponent(t)),this.H=new r(e),this.H.ready(n(this,this.Di),!0),Fe(this.$i||[],this.H),To.forEach(function(t){s.on(s.H,t,s["handleTech"+fe(t)+"_"])}),this.on(this.H,"loadstart",this.Ri),this.on(this.H,"waiting",this.Ui),this.on(this.H,"canplay",this.Oi),this.on(this.H,"canplaythrough",this.Vi),this.on(this.H,"playing",this.Li),this.on(this.H,"ended",this.Hi),this.on(this.H,"seeking",this.qi),this.on(this.H,"seeked",this.zi),this.on(this.H,"play",this.Wi),this.on(this.H,"firstplay",this.Gi),this.on(this.H,"pause",this.Xi),this.on(this.H,"durationchange",this.Ji),this.on(this.H,"fullscreenchange",this.Qi),this.on(this.H,"error",this.Yi),this.on(this.H,"loadedmetadata",this.Ai),this.on(this.H,"resize",this.Ai),this.on(this.H,"posterchange",this.Ki),this.on(this.H,"textdata",this.Zi),this.usingNativeControls(this.ts("controls")),this.controls()&&!this.usingNativeControls()&&this.ss(),this.H.el().parentNode===this.contentEl()||"Html5"===t&&this.tag||hs(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},s.Ei=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.$i=Ie(this.H),this.j=!1,this.H.dispose(),this.H=!1},s.tech=function(t){if(t&&t.IWillNotUseThisInPlugins)return this.H;var i="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw b.alert(i),new m(i)},s.ss=function(){this.es(),this.on(this.H,"mousedown",this.ns),this.on(this.H,"touchstart",this.rs),this.on(this.H,"touchmove",this.hs),this.on(this.H,"touchend",this.us),this.on(this.H,"tap",this.cs)},s.es=function(){this.off(this.H,"tap",this.cs),this.off(this.H,"touchstart",this.rs),this.off(this.H,"touchmove",this.hs),this.off(this.H,"touchend",this.us),this.off(this.H,"mousedown",this.ns)},s.Di=function(){if(this.triggerReady(),this.mi.volume&&this.ls("setVolume",this.mi.volume),this.Ki(),this.Ji(),(this.src()||this.currentSrc())&&this.tag&&this.h.autoplay&&this.paused()){try{delete this.tag.poster}catch(t){Xi("deleting tag.poster throws in some browsers",t)}this.play()}},s.Ri=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},s.hasStarted=function(t){return void 0!==t?(this.et!==t&&(this.et=t,t?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.et},s.Wi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},s.Ui=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return t.removeClass("vjs-waiting")})},s.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},s.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},s.Li=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},s.qi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},s.zi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},s.Gi=function(){this.h.starttime&&(Xi.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.h.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},s.Xi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},s.Hi=function(){this.addClass("vjs-ended"),this.h.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},s.Ji=function(){this.duration(this.ts("duration"))},s.ns=function(t){0===t.button&&this.controls()&&(void 0!==this.h&&void 0!==this.h.userActions&&void 0!==this.h.userActions.click&&!1===this.h.userActions.click||(void 0!==this.h&&void 0!==this.h.userActions&&"function"==typeof this.h.userActions.click?this.h.userActions.click.call(this,t):this.paused()?this.play():this.pause()))},s.cs=function(){this.userActive(!this.userActive())},s.rs=function(){this.userWasActive=this.userActive()},s.hs=function(){this.userWasActive&&this.reportUserActivity()},s.us=function(t){t.cancelable&&t.preventDefault()},s._i=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},s.xi=function(){this.reportUserActivity()},s.Qi=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},s.Yi=function(){var t=this.H.error();this.error(t)},s.Zi=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},s.getCache=function(){return this.mi},s.ls=function(t,i){if(this.H&&!this.H.j)this.H.ready(function(){this[t](i)},!0);else try{this.H&&this.H[t](i)}catch(t){throw Xi(t),t}},s.ts=function(t){if(this.H&&this.H.j)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?Xi("Video.js: "+t+" method not defined for "+this.Bi+" playback technology.",i):"TypeError"===i.name?(Xi("Video.js: "+t+" unavailable on "+this.Bi+" playback technology element.",i),this.H.j=!1):Xi(i),i}},s.play=function(){return this.src()||this.currentSrc()?this.ls("play"):this.H.one("loadstart",function(){this.play()}),this},s.pause=function(){return this.ls("pause"),this},s.paused=function(){return!1!==this.ts("paused")},s.scrubbing=function(t){return void 0!==t?(this.bi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.bi},s.currentTime=function(t){return void 0!==t?(this.ls("setCurrentTime",t),this):(this.mi.currentTime=this.ts("currentTime")||0,this.mi.currentTime)},s.duration=function(t){return void 0===t?void 0!==this.mi.duration?this.mi.duration:NaN:((t=C(t))<0&&(t=1/0),t!==this.mi.duration&&(this.mi.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},s.remainingTime=function(){return this.duration()-this.currentTime()},s.buffered=function(){var t=this.ts("buffered");return t&&t.length||(t=_e(0,0)),t},s.bufferedPercent=function(){return xe(this.buffered(),this.duration())},s.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),s=t.end(t.length-1);return s>i&&(s=i),s},s.volume=function(t){var i;return void 0!==t?(i=_.max(0,_.min(1,C(t))),this.mi.volume=i,this.ls("setVolume",i),this):(i=C(this.ts("volume")),S(i)?1:i)},s.muted=function(t){return void 0!==t?(this.ls("setMuted",t),this):this.ts("muted")||!1},s.supportsFullScreen=function(){return this.ts("supportsFullScreen")||!1},s.isFullscreen=function(t){return void 0!==t?(this.ds=!!t,this):!!this.ds},s.requestFullscreen=function(t){var i,s=Me;return this.isFullscreen(!0),s.requestFullscreen?(ee(Di,s.fullscreenchange,n(this,function t(i){this.isFullscreen(Di[s.fullscreenElement]),!1===this.isFullscreen()&&ne(Di,s.fullscreenchange,t),this.trigger("fullscreenchange")})),s.prefixed||(i=this.h.fullscreenOptions,void 0!==t&&(i=t)),this.v[s.requestFullscreen](i)):this.H.supportsFullScreen()?this.ls("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},s.exitFullscreen=function(){var t=Me;return this.isFullscreen(!1),t.requestFullscreen?Di[t.exitFullscreen]():this.H.supportsFullScreen()?this.ls("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},s.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=Di.documentElement.style.overflow,ee(Di,"keydown",n(this,this.fullWindowOnEscKey)),Di.documentElement.style.overflow="hidden",fs(Di.body,"vjs-full-window"),this.trigger("enterFullWindow")},s.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},s.exitFullWindow=function(){this.isFullWindow=!1,ne(Di,"keydown",this.fullWindowOnEscKey),Di.documentElement.style.overflow=this.docOrigOverflow,vs(Di.body,"vjs-full-window"),this.trigger("exitFullWindow")},s.canPlayType=function(t){for(var i,s=0,e=this.h.techOrder;s0&&(e=this.setTimeout(function(){this.ps||this.userActive(!1)},t))}},250)},s.playbackRate=function(t){return void 0!==t?(this.ls("setPlaybackRate",t),this):this.H&&this.H.featuresPlaybackRate?this.ts("playbackRate"):1},s.isAudio=function(t){return void 0!==t?(this.ys=!!t,this):!!this.ys},s.videoTracks=function(){return this.H?this.H.videoTracks():(this.rt=this.rt||new Kr,this.rt)},s.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new th,this.ht)},s.textTracks=function(){if(this.H)return this.H.textTracks()},s.remoteTextTracks=function(){if(this.H)return this.H.remoteTextTracks()},s.remoteTextTrackEls=function(){if(this.H)return this.H.remoteTextTrackEls()},s.addTextTrack=function(t,i,s){if(this.H)return this.H.addTextTrack(t,i,s)},s.addRemoteTextTrack=function(t,i){if(this.H)return this.H.addRemoteTextTrack(t,i)},s.removeRemoteTextTrack=function(t){var i=(void 0===t?{}:t).track,s=void 0===i?arguments[0]:i;if(this.H)return this.H.removeRemoteTextTrack(s)},s.getVideoPlaybackQuality=function(){return this.ts("getVideoPlaybackQuality")},s.videoWidth=function(){return this.H&&this.H.videoWidth&&this.H.videoWidth()||0},s.videoHeight=function(){return this.H&&this.H.videoHeight&&this.H.videoHeight()||0},s.language=function(t){return void 0===t?this.bs:(this.bs!==String(t).toLowerCase()&&(this.bs=String(t).toLowerCase(),void 0!==this.v&&this.trigger("languagechange")),this)},s.languages=function(){return ve(i.prototype.h.languages,this.pi)},s.toJSON=function(){var t=ve(this.h),i=t.tracks;t.tracks=[];for(var s=0;s0||o>0?r+":":"",n=((r||h>=10)&&Number(n)<10?"0"+n:n)+":",e=Number(e)<10?"0"+e:e,s+r+n+e}function Lo(t){return class extends t{get xs(){var t;return null!=(t=this.Cs)?t:this.Cs=Ho(this.player())}dispose(){this.Cs=void 0,super.dispose()}constructor(...t){super(...t),this.Cs=void 0}}}function Ho(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function qo(t){const i=Ho(t),s=()=>{const s=Do(t);t.toggleClass("theo-at-live",function(t,i){if(Fo(t)){const s=t.seekable;return 0===s.length||s.end(s.length-1)-i<10}return!1}(i,s)),t.toggleClass("vjs-live",Fo(i)),t.toggleClass("theo-dvr",function(t){return"dvr"===Tt(t.duration,t.seekable,t.source)}(i))};t.on("emptied",s),t.on("timeupdate",s),t.on("durationchange",s)}f(),f();function zo(t,i,s){t.toggleClass("theo-ad-playing",i),t.toggleClass("theo-dai-ad-playing",i&&s)}function Wo(){this.userActive(!1)}f(),f(),f();var Go=class{constructor(t,i){this.type=void 0,this.target=void 0,this.playerEvent=void 0,this.type=t.type,this.target=i,this.playerEvent=t}},Xo=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],Jo=Io.getTech("Tech"),Qo=Io.getTech("Html5"),Yo=class extends Jo{Ss(){var t;for(const t of Xo)this.xs.addEventListener(t,this.js);this.xs.addEventListener("error",this.Ts),this.xs.addEventListener("contentprotectionerror",this.Ts),this.xs.addEventListener("sourcechange",this.Ms),this.xs.addEventListener("loadstart",this.As),null==(t=this.xs.presentation)||t.addEventListener(Ai.MODE_CHANGE,this.Ps),this.xs.textTracks.addEventListener("addtrack",this.Ns),this.xs.textTracks.addEventListener("removetrack",this.Es),this.xs.textTracks.addEventListener("change",this.Bs),this.xs.audioTracks.addEventListener("addtrack",this.Is),this.xs.audioTracks.addEventListener("removetrack",this.Fs),this.xs.audioTracks.addEventListener("change",this.Ds)}$s(){var t;for(const t of Xo)this.xs.removeEventListener(t,this.js);this.xs.removeEventListener("error",this.Ts),this.xs.removeEventListener("contentprotectionerror",this.Ts),this.xs.removeEventListener("sourcechange",this.Ms),this.xs.removeEventListener("loadstart",this.As),null==(t=this.xs.presentation)||t.removeEventListener(Ai.MODE_CHANGE,this.Ps),this.xs.textTracks.removeEventListener("addtrack",this.Ns),this.xs.textTracks.removeEventListener("removetrack",this.Es),this.xs.textTracks.removeEventListener("change",this.Bs),this.xs.audioTracks.removeEventListener("addtrack",this.Is),this.xs.audioTracks.removeEventListener("removetrack",this.Fs),this.xs.audioTracks.removeEventListener("change",this.Ds)}Rs(t){this.trigger(new Go(t,this))}createEl(){const t=this.h,i=t.player;if(!i)throw new m(this.localize('Missing required tech option "player"'));const s=i.element;return Io.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.xs}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.xs.buffered}played(){return this.xs.played}reset(){this.xs.stop()}play(){this.xs.play()}pause(){this.xs.pause()}paused(){return this.xs.paused}currentTime(){return this.xs.currentTime}setCurrentTime(t){this.xs.currentTime=t}duration(){return this.xs.duration}volume(){return this.xs.volume}setVolume(t){this.xs.volume=t}muted(){return this.xs.muted}setMuted(t){this.xs.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.xs.src)return this.xs.src;if(this.xs.source){if(!li(this.xs.source.ads))return this.xs.source.ads[0].sources;if(Gt(this.xs.source))return"This source is managed by the Uplynk integration extension.";if(qt(this.xs.source))return"This source is managed by the DAI integration extension.";if(Jt(this.xs.source))return"This source is managed by Millicast."}}}setSrc(t){return this.setSource({src:t})}setSource(t){this.lt=null,this.trigger("error")}currentSrc(){return this.xs.src}load(){this.setPreload("auto")}preload(){return this.xs.preload}setPreload(t){this.xs.preload=t}autoplay(){return this.xs.autoplay}setAutoplay(t){this.xs.autoplay=Boolean(t)}seeking(){return this.xs.seeking}seekable(){return this.xs.seekable}ended(){return this.xs.ended}playbackRate(){return this.xs.playbackRate}setPlaybackRate(t){this.xs.playbackRate=t}readyState(){return this.xs.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.xs.videoHeight}videoWidth(){return this.xs.videoWidth}supportsFullScreen(){return this.xs.presentation.supportsMode(ii.FULLSCREEN)}enterFullScreen(){this.xs.presentation.requestMode(ii.FULLSCREEN)}exitFullScreen(){this.xs.presentation.requestMode(ii.INLINE)}Us(){const t=this.xs.ads;if(t&&t.playing)return!0;const i=this.xs.vr;return!(!i||i.state===Ft.Os)}initTextTrackListeners(){return this.on("touchend",t=>{this.Us()&&(t.preventDefault=()=>{})}),super.initTextTrackListeners()}Zt(){if(!this.src())return;const t=this.readyState();if(0===t){let t=!1;const i=()=>{t=!0};this.on("loadstart",i);const s=()=>{t||this.trigger("loadstart")};return this.on("loadedmetadata",s),void this.ready(()=>{this.off("loadstart",i),this.off("loadedmetadata",s),t||this.trigger("loadstart")})}const i=["loadstart"];i.push("loadedmetadata"),t>=2&&i.push("loadeddata"),t>=3&&i.push("canplay"),t>=4&&i.push("canplaythrough"),this.ready(()=>{for(const t of i)this.trigger(t)})}dispose(){this.$s(),this.xs=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return V}constructor(t={},i){super(t,i),this.xs=void 0,this.js=t=>this.Rs(t),this.Vs=!1,this.Ms=()=>{void 0===this.xs.errorObject&&(this.Rs(new Yt(this.xs.currentTime,this.xs.readyState)),this.Rs(new I),this.Rs(new Zt(this.xs.duration)))},this.As=()=>{this.Rs(new It(this.xs.currentTime))},this.Ns=t=>{this.textTracks().tt(t.track)},this.Is=t=>{this.audioTracks().tt(t.track)},this.Es=t=>{this.textTracks().it(t.track)},this.Fs=t=>{this.audioTracks().it(t.track)},this.Bs=()=>{const t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Ds=()=>{const t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Ps=()=>{if(!this.supportsFullScreen())return;const t=this.Vs,i=this.xs.presentation.currentMode===ii.FULLSCREEN;t!==i&&(this.Vs=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ts=()=>{const t=this.xs.errorObject,i=t&&yt(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.xs=this.h.player,this.Ss();const s=!this.paused();s&&this.pause(),t.preload&&this.setPreload(t.preload),t.autoplay&&this.setAutoplay(t.autoplay),t.muted&&this.setMuted(t.muted),t.source?this.setSrc(t.source):this.Zt(),s&&this.ready(()=>this.play()),this.triggerReady()}};Yo.prototype.featuresFullscreenResize=Qo.prototype.featuresFullscreenResize,Yo.prototype.featuresPlaybackRate=Qo.prototype.featuresPlaybackRate,Yo.prototype.featuresProgressEvents=!0,Yo.prototype.featuresTimeupdateEvents=!0,Yo.prototype.featuresNativeTextTracks=!0,Io.registerTech("THEOplayer",Yo),f(),f(),f(),f();var Ko=class{constructor(t){this.Ls=void 0,this.Hs=t=>{si(this.Ls,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.qs=t=>{ni(this.Ls,"theo-mobile-button-hover")},this.zs=t=>{this.Ls.blur()},this.Ls=t,t.addEventListener("touchstart",this.Hs),t.addEventListener("touchend",this.qs),t.addEventListener("focusin",this.zs)}};f(),f(),f(),f();var Zo=Io.getComponent("Menu"),ta=class extends(Lo(Zo)){get Ws(){return this.player().el()}Gs(){si(this.Ws,"theo-menu-opened")}Xs(){ni(this.Ws,"theo-menu-opened")}constructor(t,i){super(t,i)}};f();var ia=Io.getComponent("MenuItem"),sa=class extends(Lo(ia)){get parentMenu(){return this.Js}buildCSSClass(){return"theo-menu-item vjs-menu-item"}createEl(){const t=super.createEl("li",{className:this.buildCSSClass(),tabIndex:0},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){this.Qs||(this.parentMenu.Ys(this),"tap"!==t.type&&"keydown"!==t.type||(this.Qs=!0,this.trigger("click"),this.Qs=!1))}dispose(){vi.Zs.Ks&&(this.el().removeEventListener("touchstart",this.Hs),this.el().removeEventListener("touchend",this.qs)),super.dispose()}constructor(t,i,s){super(t,z({selectable:!0},i)),this.Js=void 0,this.Qs=!1,this.Hs=t=>{si(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.qs=t=>{ni(this.el(),"theo-mobile-menu-item-hover")},this.Js=s,vi.Zs.Ks&&(this.el().addEventListener("touchstart",this.Hs),this.el().addEventListener("touchend",this.qs))}};f();var ea=Io.getComponent("ClickableComponent"),na=class extends ea{get parentMenu(){return this.Js}get te(){return this.ie}set te(t){this.ie=t,this.el().setAttribute("tabindex",this.te?"0":"-1"),this.se()}buildCSSClass(){return"theo-primary-background theo-menu-header"}createEl(){const t=super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){!this.Qs&&this.te&&(this.Js.ee(),"tap"===t.type&&(this.Qs=!0,this.trigger("click"),this.Qs=!1))}se(){this.te?this.el().setAttribute("aria-label",this.localize("Go back to the previous menu")):this.el().setAttribute("aria-label","")}constructor(t,i,s){super(t,i),this.Js=void 0,this.Qs=!1,this.ie=!1,this.Js=s,this.on(t,"languagechange",this.se)}},ra=class extends ta{get menuHeader(){return this.ne}get menuItems(){return this.children()}addMenuItem(t){t=z({playerOptions:this.h.playerOptions},t);const i=new sa(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}addSubMenuItem(t){t=z({playerOptions:this.h.playerOptions},t);const i=this.re(this.player(),t);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}removeMenuItem(t){this.removeChild(t),this.trigger("menuchange")}buildCSSClass(){return"theo-menu vjs-menu"}Gs(){super.Gs(),s.removeEventListener("resize",this.he),s.addEventListener("resize",this.he),this.show()}oe(){const t=this.ae();if(!t)return;const i=t.getClientRects();vi.Zs.Ks?this.ue(t,i):this.ce(t,i)}ae(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}ce(t,i){}ue(t,i){}Xs(){s.removeEventListener("resize",this.he),super.Xs(),this.hide(),vi.Zs.Ks&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){const t=super.createEl();t.className=this.buildCSSClass();const i=this.contentEl();si(i,"theo-menu-content");const s=new na(this.player(),this.h,this);return i.parentNode.insertBefore(s.el(),i),this.ne=s,t}Ys(t){}show(){return this.oe(),super.show()}dispose(){this.ne&&this.ne.dispose(),super.dispose()}constructor(t,i){super(t,i),this.le=void 0,this.he=()=>this.oe(),this.le=this.player().el(),this.hide(),this.on("menuchange",this.oe)}},ha=class extends ra{get de(){return this.fe}set de(t){this.fe&&this.fe.ve(this),this.fe=t,t&&t.pe(this)}me(t){this.de.ge(t,"replace")}ye(t){t.de.ge(this,"restore")}be(){ni(this.ke,"vjs-hidden"),this.ke.style.opacity="1",super.show()}we(){si(this.ke,"vjs-hidden")}Gs(){this.de&&this.de.Gs(),super.Gs()}Xs(){this.de&&this.de.Xs(),super.Xs(),si(this.ke,"vjs-hidden")}ae(){if(this.de&&this.de._e)return this.de._e.ke}ce(t,i){if(i.length>0){const t=i[0].height,s=i[0].width;this.fe.xe.style.height=t+"px",this.fe.xe.style.width=s+"px"}super.ce(t,i)}constructor(t,i){super(t,i)}};f();var oa=class{get xe(){return this.Ls}get _e(){return this.Ce}pe(t){t.we(),this.Ls.appendChild(t.ke)}ve(t){this.Ls.removeChild(t.ke)}ge(t,i){if(t==this.Ce)return;const s=this.Ce;if(this.Ce=t,this.Ce.be(),this._e.focus(),vi.Zs.Ks)s.we();else{const t="translateX(100%)",e="translateX(-100%)",n=bi("transform");s.ke.style.opacity="0",s.ke.style[n]="replace"===i?e:t,this.Ce.ke.style.opacity="1",this.Ce.ke.style[n]="",u(()=>{s.we(),s.ke.style[n]=""},300)}}Gs(){this.Se(),this.Ce.be(),this.je()}Xs(){this.Se(),this.Ce.we(),this.Te.we(),this.Ce=this.Te,this.je()}je(){fi(()=>{ni(this.Ls,"theo-no-transition"),ni(this.Ce.ke,"theo-no-transition")})}Se(){si(this.Ls,"theo-no-transition"),si(this.Ce.ke,"theo-no-transition")}constructor(t){this.Ce=void 0,this.Te=void 0,this.Ls=void 0,this.le=void 0,this.Te=this.Ce=t,this.Ls=h.createElement("div"),this.Ls.className="theo-tertiary-background theo-menu-animation-container",this.Ls.appendChild(this.Te.ke),this.le=this.Ce.player().el()}};f(),f();var aa=class extends ha{get ke(){return this.el()}get parentMenu(){return this.Me}re(t,i){const s=new ua(t,i,this);return s.subMenu.de=this.de,s}ee(){this.Ae()}Ys(t){super.Ys(t),this.Ae()}Ae(){this.parentMenu.ye(this)}buildCSSClass(){return"theo-submenu "+(this.Pe?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Pe=!0;const i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Me=void 0,this.Pe=!1,this.Me=s,this.menuHeader.te=!0}},ua=class extends sa{get subMenu(){return this.Ne}handleClick(t){this.parentMenu.me(this.subMenu)}constructor(t,i,s){super(t,z({selectable:!1},i),s),this.Ne=void 0,this.Ne=new aa(t,i,s)}},ca=class extends ha{get menuButton(){return this.Ee}createEl(){const t=Io.createEl("div",{className:this.buildCSSClass()});return this.Be=super.createEl(),this.Be.className=super.buildCSSClass(),si(this.Be,"theo-menu-content-animatable"),t.appendChild(this.Be),this.de=new oa(this),t.appendChild(this.de.xe),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}re(t,i){const s=new ua(t,i,this);return s.subMenu.de=this.de,s}ce(t,i){super.ce(t,i);const s=this.le.getClientRects(),e=s.length>0?s[0]:void 0,n=C(getComputedStyle(this.el()).fontSize);Q(this.el(),this.Ee.el(),e,n)}get ke(){return this.Be}ee(){this.Ee.closeMenu()}dispose(){this.Ie||(this.Ie=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ee=void 0,this.Ie=!1,this.Ee=s}};f();var la=class{set Fe(t){this.De.innerHTML=this.$e.localize(t),this.Re()&&this.Ue(),ci(this.$e.el())}get Fe(){return this.De.textContent||""}Re(){return!ti(this.De,"vjs-hidden")}Oe(){this.$e.off("mouseover",this.Ue),this.$e.off("mouseout",this.Ve),this.$e.off("dispose",this.Le),Qt(this.De)}constructor(t,i){this.De=void 0,this.$e=void 0,this.Ue=()=>{ni(this.De,"vjs-hidden");const t=this.$e.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=C(getComputedStyle(this.De).fontSize);Q(this.De,this.$e.el(),i,s)},this.Ve=()=>{si(this.De,"vjs-hidden")},this.Le=()=>this.Oe(),this.$e=t,ci(t.el()),di(t.el()),this.De=h.createElement("span"),this.De.innerHTML=this.$e.localize(i),this.De.className="theo-button-tooltip vjs-hidden",this.De.setAttribute("aria-hidden","true"),this.$e.el().appendChild(this.De),this.$e.on("mouseover",this.Ue),this.$e.on("mouseout",this.Ve),this.$e.on("dispose",this.Le)}},da=Io.getComponent("Button"),fa=class extends(Lo(da)){get He(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.qe}isMenuOpen(){return this.ze}openMenu(){this.We&&!this.ze&&(this.qe.Gs(),this.el().setAttribute("aria-expanded","true"),this.ze=!0,this.qe.focus())}closeMenu(){this.We&&this.ze&&(this.qe.Xs(),this.el().setAttribute("aria-expanded","false"),this.ze=!1)}set minimumMenuItems(t){this.Ge=t,this.Xe()}buildCSSClass(){return"theo-controlbar-button vjs-menu-button vjs-menu-button-popup "+super.buildCSSClass()}createEl(t,i,s){return super.createEl("button",{},{"aria-live":"off"})}handleClick(){this.ze?this.closeMenu():this.openMenu()}enable(){return this.We=!0,super.enable()}disable(){return this.closeMenu(),this.We=!1,super.disable()}se(){this.De.Fe=this.controlText()}dispose(){this.player().removeChild(this.qe),this.qe.dispose(),this.De.Oe(),this.xs.removeEventListener("seeking",this.Je),super.dispose()}constructor(t,i){super(t,i),this.qe=void 0,this.De=void 0,this.ze=!1,this.Ge=1,this.We=!0,this.Qe=t=>{const i=this.el().contains(t.target),s=this.qe.el().contains(t.target);let e=!1;var n;vi.Zs.Ks&&this.He&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.ze||(e&&t.preventDefault(),this.closeMenu())},this.Ye=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.Je=()=>{this.ze&&this.closeMenu()},this.Xe=()=>{this.qe.menuItems.length>=this.Ge?this.show():(this.closeMenu(),this.hide())},this.qe=new ca(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.qe),this.De=new la(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),vi.Zs.Ke?(this.on(h,"touchend",this.Qe),new Ko(this.el())):(this.on(h,"click",this.Qe),this.on(h,"keydown",this.Ye),Si&&this.on(h,Si.Ze,this.closeMenu)),this.xs.addEventListener("seeking",this.Je),this.on(this.qe,"menuchange",this.Xe),this.on(t,"languagechange",this.se),this.Xe()}},va=Io.getComponent("Component"),pa=class extends(Io.getComponent("ControlBar")){addMenuButton(t){t=z({playerOptions:this.h.playerOptions},t);const i=new fa(this.player(),t);return this.addChild(i),i}removeMenuButton(t){this.removeChild(t)}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-secondary-color vjs-control-bar "+super.buildCSSClass()}constructor(t,i){super(t,i),this.addChild("THEOControlBarShadow",void 0,0)}};Io.registerComponent("THEOControlBarShadow",class extends va{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}}),f(),f();var ma=Io.getComponent("VolumeBar"),ga=class extends ma{handleFocus(t){super.handleFocus(t),this.tn.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.tn.removeClass("focus-within")}constructor(t,i){super(t,i),this.tn=void 0,this.tn=i.sn}};f();var ya=Io.getComponent("VolumeControl"),ba=class extends ya{constructor(t,i){super(t,i),this.nn=void 0,this.nn=new ga(t,{sn:this}),this.addChild(this.nn)}};ba.prototype.h=z({},ya.prototype.h,{children:[]}),Io.registerComponent("VolumeControl",ba);var ka=class extends(Lo(pa)){rn(){this.hn(this.an())}un(){0===this.cn&&(this.cn=u(this.ln,100))}dn(t){"opacity"===t.propertyName&&(0!==this.cn&&(c(this.cn),this.cn=0),this.hn(!0))}fn(t){"opacity"===t.propertyName&&(this.an()||this.hn(!1))}an(){return"0"!==s.getComputedStyle(this.el()).opacity}hn(t){this.vn!==t&&(this.vn=t,t?this.pn():this.xs.textTrackStyle.marginBottom=void 0)}pn(){const t=this.el().getBoundingClientRect().height;this.xs.textTrackStyle.marginBottom!==t&&(this.xs.textTrackStyle.marginBottom=t)}dispose(){c(this.cn),this.cn=0,this.gn.mn(pi.yn,this.bn),this.gn.kn(),super.dispose()}constructor(t,i){super(t,i),this.gn=void 0,this.vn=!1,this.cn=0,this.ln=()=>{0!==this.cn&&(this.cn=0,this.hn(this.an()))},this.bn=()=>{this.vn&&this.pn()},this.on(t,"ready",this.rn),this.on(t,"pause",this.rn),this.on(t,"useractive",this.rn),this.on(t,"firstplay",this.un),this.on(t,"play",this.un),this.on(t,"userinactive",this.un),this.on("transitionstart",this.dn),this.on("transitionend",this.fn),this.gn=new wi(this.el()),this.gn.wn(pi.yn,this.bn),this.gn._n(!0)}};ka.prototype.h=z({},pa.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),Io.registerComponent("ControlBar",ka),f();var wa=class extends pa{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};wa.prototype.h=z({},pa.prototype.h,{children:[]}),Io.registerComponent("TopControlBar",wa),f();var _a=Io.getComponent("CurrentTimeDisplay"),xa=class extends(Lo(_a)){updateContent(){const t=Do(this.player()),i=this.xs,s=Ro(i),e=this.localize("Current Time"),n=Vo(_.max(0,t-s),Uo(i));n!==this.Mt&&(this.Mt=n,this.contentEl().innerHTML=''+e+" "+n)}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}};Io.registerComponent("CurrentTimeDisplay",xa),f();var Ca=Io.getComponent("DurationDisplay"),Sa=class extends(Lo(Ca)){updateContent(){const t=this.xs,i=S(t.duration)?NaN:Uo(t),s=t.clip.endTime-t.clip.startTime,e=_.min(i,s)||0;if(this.ct!==e){this.ct=e;const t=this.localize("Duration Time"),i=Vo(e);this.S.innerHTML=''+t+" "+i}}dispose(){var t;null==(t=this.xs)||t.clip.removeEventListener("change",this.xn),super.dispose()}constructor(t,i){var s;super(t,i),this.xn=()=>this.updateContent(),this.off(t,"durationchange",this.updateContent),this.on(t,"durationchange",this.updateContent),this.off(t,"timeupdate",this.updateContent),this.on(t,"timeupdate",this.updateContent),this.off(t,"emptied",this.updateContent),this.on(t,"emptied",this.updateContent),null==(s=this.xs)||s.clip.addEventListener("change",this.xn)}};Io.registerComponent("DurationDisplay",Sa),f();var ja=Io.getComponent("Button"),Ta=class extends(Lo(ja)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){const t=super.createEl("button",{},{"aria-live":"off"});return this.Cn=Io.createEl("span",{className:"theo-live-control-indicator"}),Kt(t,this.Cn),t}createControlTextEl(t){const i=super.createControlTextEl(t);return Io.removeClass(i,"vjs-control-text"),Io.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.xs;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(1/0),t.play()}}Sn(){Fo(this.xs)?this.show():this.hide()}constructor(t,i){super(t,i),this.controlText("Live"),this.Sn(),this.on(t,"emptied",this.Sn),this.on(t,"durationchange",this.Sn),vi.Zs.Ke&&new Ko(this.el())}};Io.registerComponent("LiveDisplay",Ta),f();var Ma=Io.getComponent("LoadingSpinner");Io.registerComponent("LoadingSpinner",class extends Ma{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){const t=super.createEl();t.className=this.buildCSSClass();const i=Io.createEl("div",{className:"theo-loading-spinner-rotator"}),s=Io.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=Io.createEl("div",{className:"theo-loading-spinner-circle-right"});return i.appendChild(s),i.appendChild(e),t.appendChild(i),t}constructor(t,i){super(t,i)}}),f();var Aa=Io.getComponent("LoadProgressBar"),Pa=class extends(Lo(Aa)){update(){const t=this.xs,i=Wt.jn(Oo(t)),s=i.Tn(0),e=Wt.jn(t.buffered).Mn(i),n=i.An(0)-s;let r=e.V&&e.An(e.V-1)||0;r=_.max(0,r-s);const o=this.el(),a=this.Pn;o.style.width=Na(r,n);for(let t=0;te.V;t--)o.removeChild(a[t-1]);a.length=e.V}constructor(t,i){super(t,i),this.Pn=[],this.on(t,"emptied",this.update)}};function Na(t,i){const s=t/i||0;return 100*(s>=1?1:s)+"%"}Io.registerComponent("LoadProgressBar",Pa),f();var Ea=Io.getComponent("MouseTimeDisplay"),Ba=class extends(Lo(Ea)){handleMouseMove(t){const i=t,s=this.xs,e=Ro(s)+this.calculateDistance(i)*Uo(s),n=i.pageX-X(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){const i=t,s=this.xs,e=Ro(s)+this.calculateDistance(i)*Uo(s),n=i.touches[0].pageX-X(this.el().parentNode).left;this.update(e,n+"px")}createEl(){const t=super.createEl();return this.Nn=Io.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){this.En=t;const s=this.Bn(t);this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(d(this.Nn,s),this.In())}In(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){const t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=C(getComputedStyle(t).fontSize);Q(this.tooltip,this.el(),s,e)}}Bn(t){const i=this.xs,s=t-$o(i);return Vo(Fo(i)?_.min(s,0):s,Uo(i))}dispose(){var t;this.xs.removeEventListener("dimensionchange",this.Fn),null==(t=this.xs.presentation)||t.removeEventListener(Ai.MODE_CHANGE,this.Fn),super.dispose()}constructor(t,i){var s;(super(t,i),this.En=NaN,this.Fn=()=>{const t=Do(this.player()),i=this.xs;let s=(t-Ro(i))/Uo(i)||0;s=Ci(s,0,1),this.update(t,100*s+"%")},this.keepTooltipsInside&&(Io.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.Nn)),this.on(t,"ready",()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)}),Dt.Ks)&&(this.on(t,"firstplay",this.Fn),this.on(t,"play",this.Fn),this.on(t,"seeking",this.Fn),this.on(t,"seeked",this.Fn),this.on(t,"timeupdate",this.Fn),this.xs.addEventListener("dimensionchange",this.Fn),null==(s=this.xs.presentation)||s.addEventListener(Ai.MODE_CHANGE,this.Fn),this.on(t,"ready",()=>{this.on(t.controlBar.progressControl,"touchstart",this.handleTouchMove),this.on(t.controlBar.progressControl,"touchmove",yi(t=>this.handleTouchMove(t),25)),this.Fn()}))}};Io.registerComponent("MouseTimeDisplay",Ba),f();var Ia=Io.getComponent("PlayProgressBar"),Fa=class extends(Lo(Ia)){updateDataAttr(){const t=Do(this.player());this.el().setAttribute("data-current-time",this.Bn(t))}Bn(t){const i=this.xs;return Vo(t-$o(i),Uo(i))}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-play-progress vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}};Io.registerComponent("PlayProgressBar",Fa),f();var Da=Io.getComponent("RemainingTimeDisplay"),$a=class extends(Lo(Da)){updateContent(){const t=this.xs,i=Uo(t);if(i){const s=Oo(t).end(0),e=this.localize("Remaining Time"),n=Vo(_.max(0,s-this.player().currentTime()),i);n!==this.Mt&&(this.Mt=n,this.contentEl().innerHTML=''+e+" -"+n)}}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}};Io.registerComponent("RemainingTimeDisplay",$a),f(),f();var Ra=class{get xs(){var t;return null!=(t=this.Cs)?t:this.Cs=Ho(this.Dn)}$n(){const t=this.Rn;if(!t)return;const i=this.xs;if(0===i.seekable.length)return;const s=t.cues.slice();this.On.Un(s);for(let t=0;t0&&t.readyState!==kt.ERROR)return t}Zn(t){const i=this.Rn;t!==i&&(i&&(this.tr(),i.removeEventListener("cuechange",this.ir)),this.Rn=t,t&&(t.addEventListener("cuechange",this.ir),this.zn()))}sr(t){this.On.er(t)}nr(){this.On.be()}rr(){this.On.we()}tr(){for(const t of this.Vn)t.Oe();this.On.hr(),this.Vn=[],this.ar=void 0}Oe(){this.Xn(),this.ur.removeEventListener("mousemove",this.cr),this.ur.removeEventListener("mouseenter",this.lr),this.ur.removeEventListener("mouseleave",this.dr),this.Zn(void 0),this.On.Oe(),this.Cs=void 0}constructor(t,i){this.Dn=void 0,this.Ln=void 0,this.On=void 0,this.ur=void 0,this.Rn=void 0,this.Vn=void 0,this.ar=void 0,this.Cs=void 0,this.qn=void 0,this.Wn=void 0,this.Gn=void 0,this.cr=void 0,this.dr=void 0,this.lr=void 0,this.zn=void 0,this.ir=void 0,this.Dn=i,this.Vn=[],this.Cs=void 0,this.qn=()=>{this.Zn(this.Jn())},this.Wn=t=>{const i=t.track;i.kind===jt.Yn&&(i.addEventListener("addcue",this.qn),i.addEventListener("removecue",this.qn),i.addEventListener("readystatechange",this.qn)),this.qn()},this.Gn=t=>{const i=t.track;i.kind===jt.Yn&&(i.removeEventListener("addcue",this.qn),i.removeEventListener("removecue",this.qn),i.removeEventListener("readystatechange",this.qn)),this.qn()},this.cr=t=>{const i=this.xs,s=function(t,i){const s=X(t),e=t.offsetWidth,n=t.offsetHeight,r=s.top,h=s.left;let o,a;!function(t){return void 0!==t.changedTouches}(i)?(a=i.pageX,o=i.pageY):(a=i.changedTouches[0].pageX,o=i.changedTouches[0].pageY);const u=Ci((r-o+n)/n,0,1),c=Ci((a-h)/e,0,1);return{x:c,y:u}}(this.Ln,t);let e=Ro(i)+s.x*Uo(i);e===i.duration&&(e-=.1),this.sr(e)},this.dr=()=>{this.On.we()},this.lr=()=>{this.On.be()},this.zn=()=>{this.Rn&&(this.tr(),this.$n(),this.ir())},this.ir=()=>{var t,i,s;const e=null==(i=this.Rn)||null==(t=i.activeCues)?void 0:t[0],n=Pi(this.Vn,t=>t.pr===e);n!==this.ar&&(null==(s=this.ar)||s.mr(),this.ar=n,null==n||n.gr())},this.ur=t,this.On=new Oa,this.Dn.contentEl().appendChild(this.On.xe),this.Ln=h.createElement("div"),si(this.Ln,"theoplayer-chapterbar"),this.ur.appendChild(this.Ln),this.ur.addEventListener("mousemove",this.cr),this.ur.addEventListener("mouseenter",this.lr),this.ur.addEventListener("mouseleave",this.dr),this.Hn()}},Ua=class{get xe(){return this.Ls}gr(){si(this.Ls,"theoplayer-chapter-indicator-active")}mr(){ni(this.Ls,"theoplayer-chapter-indicator-active")}yr(t,i){const s=t.seekable.start(0),e=t.seekable.end(t.seekable.length-1),n=e-s,r=this.pr.startTime,o=this.pr.endTime,a=o>=s&&r<=e,u=Ci(r-s,0,n),c=Ci(o-s,0,n),l=_.max(0,c-u),d=h.createElement("div");si(d,"theoplayer-chapter-indicator");const f=h.createElement("div");si(f,"theoplayer-chapter-indicator-highlight"),d.appendChild(f),i&&si(d,"theoplayer-chapter-indicator-discontinuous");const v=u/n*100,p=l/n*100;return d.style.display=a?"":"none",d.style.width=p+"%",d.style.left=v+"%",d}Oe(){Qt(this.Ls)}constructor(t,i,s){this.pr=void 0,this.Ls=void 0,this.pr=t,this.Ls=this.yr(i,s)}},Oa=class{we(){this.br--,0===this.br&&ni(this.xe,"theoplayer-chapter-hovering")}Un(t){this.kr=t||[],this.kr.length>0&&(this.xe.style.display="")}wr(t){d(this._r,t.content)}hr(){this.kr=[],d(this._r,""),this.xe.style.display="none"}be(){this.br++,this.br>0&&si(this.xe,"theoplayer-chapter-hovering")}er(t){for(const i of this.kr)if(Va(i,t)){this.wr(i);break}}Oe(){Qt(this.xe)}constructor(){this.kr=[],this.xe=void 0,this._r=void 0,this.br=0,this.xe=h.createElement("div"),si(this.xe,"theoplayer-chaptertitle"),this.xe.style.display="none",this._r=h.createElement("p"),this.xe.appendChild(this._r)}};function Va(t,i){return new Wt([t.startTime,t.endTime]).Cr(i)}var La=Io.getComponent("SeekBar"),Ha=class extends(Lo(La)){updateAriaAttributes(t){const i=Do(this.player()),s=this.xs;t.setAttribute("aria-valuenow",(100*this.Sr(i)).toFixed(2)),t.setAttribute("aria-valuetext",Vo(i-$o(s),Uo(s)))}getPercent(){return this.Sr(this.player().currentTime())}handleMouseMove(t){if(this.xs&&this.xs.ads&&this.xs.ads.playing)return;const i=this.xs;let s=Ro(i)+this.calculateDistance(t)*Uo(i);s>=i.duration&&(s=i.duration-.1),this.Ln.sr(s),this.player().currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.Ln.nr(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.Ln.rr(),super.handleMouseUp(t)}Sr(t){const i=this.xs,s=(t-Ro(i))/Uo(i);return Ci(s,0,1)}dispose(){this.Ln.Oe(),B(this.playingStates)}constructor(t,i){super(t,i),this.Ln=void 0,this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.Ln=new Ra(this.el(),t)}};Io.registerComponent("SeekBar",Ha),f();var qa=Io.getComponent("ProgressControl");vi.Zs.Ks&&Io.registerComponent("ProgressControl",class extends qa{createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(t){this.seekBar.handleMouseMove(t)}handleMouseDown(t){this.seekBar.handleMouseDown(t)}constructor(t,i){super(t,i),this.on(this,"touchmove",this.handleMouseMove),this.on("touchstart",this.handleMouseDown),this.seekBar.off(["touchmove","touchstart"])}}),f();var za=Io.getComponent("TooltipProgressBar"),Wa=class extends(Lo(za)){updateDataAttr(){const t=Do(this.player()),i=this.Bn(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}Bn(t){const i=this.xs;return Vo(t-$o(i),Uo(i))}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-tooltip-progress-bar vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}};function Ga(t){for(const i of t)if(i.enabled)return i}function Xa(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:Ja(t),description:Qa(t),hd:!!t.height&&t.height>=720}}function Ja(t){return t.height?t.height+"p":t.bandwidth?Qa(t):""}function Qa(t){return t.bandwidth?t.bandwidth>1e7?(t.bandwidth/1e6).toFixed(0)+"Mbps":t.bandwidth>1e6?(t.bandwidth/1e6).toFixed(1)+"Mbps":(t.bandwidth/1e3).toFixed(0)+"kbps":""}Io.registerComponent("TooltipProgressBar",Wa),f(),f(),f(),f(),f();var Ya=class{get jr(){return this.Tr}set jr(t){const i=this.Tr;for(let s=i.length-1;s>=0;s--){const e=i[s];N(t,e)||this.Mr(e)}for(const i of t)this.Ar(i);this.Pr.oe()}get Nr(){return this.Pr.menuItems}Er(t){const i=this.Nr;if(i)for(const s of i)if(s.Br===t)return s}Ir(t){const i=this.Pr.addMenuItem();return i.Br=t,i.on("click",()=>this.Fr(i)),i.el().setAttribute("role","menuitemradio"),i}Dr(t){t.dispose()}$r(t){return!0}Ar(t){if(this.$r(t)){N(this.Tr,t)||this.Tr.push(t);const i=this.Er(t)||this.Ir(t);return this.Rr(i),i}this.Mr(t)}Mr(t){const i=this.Er(t);i&&(this.Pr.removeMenuItem(i),this.Dr(i)),A(this.Tr,t)}Oe(){const t=[];for(const i of this.Tr)t.push(i);for(const i of t)this.Mr(i);B(t)}constructor(t){this.Pr=void 0,this.Tr=[],this.Pr=t}},Ka=class extends Ya{Ur(){return this.Or=h.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",d(this.Or,this.Vr.localize("Quality")),this.Or}Lr(){return this.Hr=h.createElement("span"),this.Hr.className="theo-settings-control-menu-quality-automatic",d(this.Hr,this.Vr.localize("Automatic")),this.Hr}qr(){return this.zr=h.createElement("span"),d(this.zr,this.Vr.localize("Automatic")),this.zr}Wr(){return this.Gr=h.createElement("span"),this.Gr.className="theo-primary-color theo-settings-control-menu-item-hd-label",d(this.Gr,this.Vr.localize("HD")),this.Gr}Xr(){const t=h.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.Hr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.zr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Gr),this.Jr.el().appendChild(this.Or),this.Jr.el().appendChild(t),this.Jr.el().setAttribute("aria-label",this.Vr.localize("Open the video quality settings menu"))}Qr(){const t=this.Yr,i=t&&ru(t.targetQuality),s=t&&t.activeQuality,e=Xa(this.Kr(i||s))||{name:this.Vr.localize("Automatic")};d(this.zr,e.name),hi(this.Hr,"vjs-hidden",Boolean(i)),hi(this.Gr,"vjs-hidden",!e.hd)}Rr(t){const i=Xa(t.Br)||{name:this.Vr.localize("Automatic")};let s=i.name;i.hd&&(s+=''+this.Vr.localize("HD")+""),i.description&&(s+=''+i.description+""),t.el().innerHTML=s,t.el().setAttribute("aria-label",this.Vr.localize("Set video quality to ")+i.name),t.Br?t.selected(t.Br===this.Zr):t.selected(!this.Zr)}Fr(t){this.Yr&&(this.Yr.targetQuality=t.Br&&t.Br.videoQualities)}Kr(t,i){const s=i||this.jr;for(const i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Oe(){this.Cs.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.th),this.Vr.off("languagechange",this.se),this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr.removeEventListener("targetqualitychanged",this.sh),this.Yr.removeEventListener("update",this.eh)),super.Oe()}constructor(t,i,s){super(t.subMenu),this.Jr=void 0,this.Cs=void 0,this.Vr=void 0,this.Yr=void 0,this.Zr=void 0,this.Or=void 0,this.Hr=void 0,this.zr=void 0,this.Gr=void 0,this.th=()=>{const t=Ga(this.Cs.videoTracks);if(t===this.Yr)return;let i=[];if(this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr.removeEventListener("targetqualitychanged",this.sh),this.Yr.removeEventListener("update",this.eh)),this.Yr=t,t){t.addEventListener("activequalitychanged",this.ih),t.addEventListener("targetqualitychanged",this.sh),t.addEventListener("update",this.eh);const s=tu(eu(t.qualities.filter(t=>t.available)));i=s.length>1?[void 0,...s]:[void 0]}this.jr=i,this.sh(),this.ih()},this.eh=t=>{const i=t.track;if(i!==this.Yr)return;const s=tu(eu(i.qualities.filter(t=>t.available))),e=i&&ru(i.targetQuality);let n;this.Zr=this.Kr(e,s),n=s.length>1?[void 0,...s]:[void 0],this.jr=n,this.Qr()},this.ih=()=>{this.Ar(void 0),this.Qr()},this.sh=()=>{const t=Ga(this.Cs.videoTracks),i=t&&ru(t.targetQuality),s=this.Kr(i),e=this.Zr;s!==e&&(this.Zr=s,s&&e||this.Ar(void 0),e&&N(this.jr,e)&&this.Ar(e),i&&this.Ar(s),this.Qr())},this.se=()=>{d(this.Pr.menuHeader.el(),this.Vr.localize("Quality")),d(this.Or,this.Vr.localize("Quality")),d(this.Hr,this.Vr.localize("Automatic")),d(this.zr,this.Vr.localize("Automatic")),d(this.Gr,this.Vr.localize("HD")),this.Jr.el().setAttribute("aria-label",this.Vr.localize("Open the video quality settings menu"));for(const t of this.Nr)this.Rr(t);this.Qr()},this.Jr=t,this.Cs=i,this.Vr=s,this.Or=this.Ur(),this.Hr=this.Lr(),this.zr=this.qr(),this.Gr=this.Wr(),this.Xr(),d(this.Pr.menuHeader.el(),this.Vr.localize("Quality")),this.jr=[void 0],this.Cs.videoTracks.addEventListener(["addtrack","removetrack","change"],this.th),this.Vr.on("languagechange",this.se),this.th()}},Za=class{get height(){return this.nh[0].height}get bandwidth(){return this.nh[0].bandwidth}get videoQualities(){return this.nh}get label(){return this.nh[0].label}add(t){this.nh.push(t)}constructor(t){this.nh=void 0,this.nh=t}};function tu(t){const i=[];for(const s of t){const t=s;let e=!1;for(const s of i)if(nu(s,t)){s.add(t),e=!0;break}e||i.push(new Za([t]))}return i}function iu(t,i){return t&&i?Mi(t,i):ji.rh}function su(t,i){return t===i?ji.rh:iu(t.height,i.height)||iu(t.width,i.width)||iu(t.bandwidth,i.bandwidth)}function eu(t){return _i(t,su).reverse()}function nu(t,i){return t.label&&i.label&&t.label===i.label||ct(Xa(t),Xa(i))}function ru(t){return Lt(t)?1===t.length?t[0]:void 0:t}function hu(t){return 1===t?"Normal":""+_.round(100*t)/100}f();var ou=class extends Ya{Ur(){return this.Or=h.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",d(this.Or,this.Vr.localize("Speed")),this.Or}Xr(){const t=h.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Jr.el().appendChild(this.Or),this.Jr.el().appendChild(t),this.Jr.el().setAttribute("aria-label",this.Vr.localize("Open the video speed settings menu")),t}Ir(t){const i=super.Ir(t);return this.Rr(i),i}Rr(t){const i=t.Br,s=this.Vr.localize(hu(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Vr.localize("Set video speed to ")+s),t.selected(t.Br===this.Cs.playbackRate)}Fr(t){this.Cs.playbackRate=t.Br}Oe(){this.Cs.removeEventListener("ratechange",this.hh),this.Vr.off("languagechange",this.se),super.Oe()}constructor(t,i,s,e){super(t.subMenu),this.Jr=void 0,this.Cs=void 0,this.Vr=void 0,this.oh=void 0,this.Or=void 0,this.ah=void 0,this.hh=()=>{this.oh&&this.Ar(this.oh);const t=this.Cs.playbackRate;this.oh=t,d(this.ah,this.Vr.localize(hu(t))),t&&this.Ar(t)},this.se=()=>{d(this.Pr.menuHeader.el(),this.Vr.localize("Speed")),d(this.Or,this.Vr.localize("Speed")),this.Jr.el().setAttribute("aria-label",this.Vr.localize("Open the video speed settings menu"));for(const t of this.Nr)this.Rr(t);this.hh()},this.Jr=t,this.Cs=i,this.Vr=s,this.Or=this.Ur(),this.ah=this.Xr(),d(this.Pr.menuHeader.el(),this.Vr.localize("Speed")),this.jr=e,this.Cs.addEventListener("ratechange",this.hh),this.Vr.on("languagechange",this.se),this.hh()}};Io.registerComponent("SettingsButton",class extends fa{createEl(){const t=super.createEl();return this.uh=Io.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),d(this.uh,this.localize("HD")),t.appendChild(this.uh),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}se(){super.se(),d(this.uh,this.localize("HD")),d(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr=void 0),this.xs.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.dh),this.fh.Oe(),this.ph.Oe(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.mh=void 0,this.fh=void 0,this.gh=void 0,this.ph=void 0,this.Yr=void 0,this.dh=()=>{const t=Ga(this.xs.videoTracks);t!==this.Yr&&(this.Yr&&this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr=t,t&&t.addEventListener("activequalitychanged",this.ih),this.ih())},this.ih=()=>{var t;const i=null==(t=this.Yr)?void 0:t.activeQuality,s=Boolean(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},si(this.menu.el(),"theo-settings-control-menu"),d(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.De.Fe=this.controlText(),this.mh=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.fh=new Ka(this.mh,this.xs,t);const n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.gh=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.ph=new ou(this.gh,this.xs,t,n),this.xs.videoTracks.addEventListener(["addtrack","removetrack","change"],this.dh),this.dh()}}),f(),f(),f();var au=class extends Ya{yh(t){const i=t.label;if(i)return i;const s=t.language;if(s){const t=St(s);if(t)return t.bh}return s||""}kh(){this.jr=this.wh}Oe(){this.wh.removeEventListener("addtrack",this._h),this.wh.removeEventListener("removetrack",this.xh),this.wh.removeEventListener("change",this.Ch),super.Oe()}constructor(t,i){super(t),this.wh=void 0,this._h=t=>{const i=t.track;this.Ar(i),i.addEventListener("update",this.Sh)},this.xh=t=>{const i=t.track;this.Mr(i),i.removeEventListener("update",this.Sh)},this.Ch=t=>this.kh(),this.Sh=()=>{for(const t of this.jr)this.Ar(t)},this.wh=i,this.wh.addEventListener("addtrack",this._h),this.wh.addEventListener("removetrack",this.xh),this.wh.addEventListener("change",this.Ch),this.kh()}},uu=class extends au{Rr(t){const i=t.Br,s=this.Vr.localize(this.yh(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Vr.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}Fr(t){const i=t.Br;for(const t of this.xs.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Oe(){this.Vr.off("languagechange",this.se),super.Oe()}constructor(t,i,s){super(t,i.audioTracks),this.xs=void 0,this.Vr=void 0,this.se=()=>{d(this.Pr.menuHeader.el(),this.Vr.localize("Language"));for(const t of this.Nr)this.Rr(t)},this.xs=i,this.Vr=s,d(this.Pr.menuHeader.el(),this.Vr.localize("Language")),this.Vr.on("languagechange",this.se)}};Io.registerComponent("audioTrackButton",class extends fa{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.jh.Oe(),super.dispose()}constructor(t,i){super(t,i),this.jh=void 0,this.minimumMenuItems=2,this.jh=new uu(this.menu,this.xs,t),this.controlText("Language"),this.De.Fe=this.controlText()}}),f(),f();var cu=class extends au{$r(t){return!!super.$r(t)&&(!t.forced&&At(t.kind))}Ir(t){const i=super.Ir(t);si(i.el(),"theo-text-track-menu-item");const s=h.createElement("span");i.Th=s;const e=h.createElement("div");e.className="theo-text-track-menu-item-toggle",i.Mh=e;const n=t=>this.Ah(t,i);i.Ph=n,e.addEventListener("click",n);const r=h.createElement("div");return r.className="theo-text-track-menu-item-toggle-slider",e.appendChild(r),i.el().appendChild(s),i.el().appendChild(e),i}Rr(t){const i=t,s=i.Br,e=this.Vr.localize(this.yh(s));d(i.Th,e),i.el().setAttribute("aria-label",this.Vr.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===Ct.Kn)}Dr(t){const i=t;i.Mh.removeEventListener("click",i.Ph),super.Dr(t)}Fr(t){const i=t.Br;for(const t of this.xs.textTracks)t!==i&&T(t.kind,i.kind)&&(t.mode=Ct.Nh);i.mode!==Ct.Kn?i.mode=Ct.Kn:i.mode=Ct.Nh}Ah(t,i){t.stopImmediatePropagation(),this.Fr(i)}Oe(){this.Vr.off("languagechange",this.se),super.Oe()}constructor(t,i,s){super(t,i.textTracks),this.xs=void 0,this.Vr=void 0,this.se=()=>{d(this.Pr.menuHeader.el(),this.Vr.localize("Subtitles"));for(const t of this.Nr)this.Rr(t)},this.xs=i,this.Vr=s,d(this.Pr.menuHeader.el(),s.localize("Subtitles")),this.Vr.on("languagechange",this.se)}};Io.registerComponent("subtitlesButton",class extends fa{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.jh.Oe(),super.dispose()}constructor(t,i){super(t,i),this.jh=void 0,this.jh=new cu(this.menu,this.xs,t),this.controlText("Subtitles"),this.De.Fe=this.controlText()}}),f();var lu=Io.getComponent("playToggle"),du=class extends(Lo(lu)){handleClick(t){this.xs.muted||this.xs.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.De.Fe=this.controlText()}handlePause(t){this.xs.ended||(super.handlePause(t),this.controlText("Play"),this.De.Fe=this.controlText())}se(){this.De.Fe=this.controlText()}dispose(){this.De.Oe(),this.xs.removeEventListener("ended",this.Eh),super.dispose()}constructor(t,i){super(t,i),this.De=void 0,this.Eh=()=>{this.controlText("Replay"),this.De.Fe=this.controlText()},this.controlText("Play"),this.De=new la(this,this.controlText()),this.xs.addEventListener("ended",this.Eh),this.on(t,"languagechange",this.se),vi.Zs.Ke&&new Ko(this.el())}};Io.registerComponent("playToggle",du),f();var fu=Io.getComponent("fullscreenToggle"),vu=class extends(Lo(fu)){handleClick(t){this.xs.prepareWithUserAction(),super.handleClick(t)}handleFullscreenChange(t){super.handleFullscreenChange(t),this.updateContent()}updateContent(){const t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.De.Fe=this.controlText()}dispose(){this.De.Oe(),super.dispose()}constructor(t,i){super(t,i),this.De=void 0,this.controlText("Fullscreen"),this.De=new la(this,this.controlText()),vi.Zs.Ke&&new Ko(this.el()),this.on(t,"languagechange",this.updateContent)}};Io.registerComponent("fullscreenToggle",vu),f();var pu=Io.getComponent("muteToggle"),mu=class extends(Lo(pu)){handleClick(t){this.xs.muted&&!this.xs.paused&&this.xs.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.se()}se(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.De.Fe=this.controlText()}dispose(){this.De.Oe(),super.dispose()}constructor(t,i){super(t,i),this.De=void 0,this.controlText("Mute"),this.De=new la(this,this.controlText()),vi.Zs.Ke&&new Ko(this.el()),this.on(t,"languagechange",this.se),U&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",()=>{this.removeClass("vjs-hidden")}))}};Io.registerComponent("muteToggle",mu),f();var gu=Io.getComponent("BigPlayButton"),yu="theo-play-svg-circle",bu='\n \n \n \n \n \n',ku=class extends(Lo(gu)){createEl(){const t=super.createEl(),i=Io.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML=bu,t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.xs.muted||this.xs.prepareWithUserAction(),super.handleClick(t),void 0!==this.xs.vr&&"unavailable"!==this.xs.vr.state&&(this.xs.vr.useDeviceMotionControls=!0)}};Io.registerComponent("BigPlayButton",ku),f();var wu=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;Io.registerComponent("MouseTimeDisplay",class extends Ba{Bh(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Ih&&(this.Ih=i,this.Fh=i.src?vi.Dh(i.src).href:void 0,this.Ih.addEventListener(["addcue","removecue"],this.$h),this.Rh())}Uh(t){t.track===this.Ih&&this.Oh()}createEl(){const t=super.createEl();return this.Vh=Io.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.Lh=Io.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){super.update(t,i),this.keepTooltipsInside&&this.Hh(t)}Hh(t){let i;if(this.Ih&&this.Ih.cues){const s=function(t,i){let s=t[0];for(const e of t)if(e.startTime<=i)s=e;else if(i>=e.endTime)return s;return s}(this.Ih.cues,t);i=s&&s.content}if(i===this.qh)return;if(this.qh=i,Io.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",Boolean(i)),!i)return void this.zh();const s=i.match(wu);if(s){let[,t,i,e,n,r]=s;t=this.Wh(t);const h={Gh:Number(i),Xh:Number(e),Ti:Number(n),Mi:Number(r)};this.Jh(t,h)}else{const t=this.Wh(i);this.Jh(t)}}Rh(){S(this.En)||this.Hh(this.En)}Wh(t){return this.Ih&&this.Fh?vi.Dh(t,this.Fh).href:t}Jh(t,i){this.Vh&&(this.Vh.src!==t?(this.Vh.onload=()=>{this.Qh(i)},this.Vh.src="",this.Vh.src=t):this.Qh(i))}Qh(t){if(!this.Lh||!this.Vh)return;const i=this.Lh.getContext("2d");i&&(null!=t||(t={Gh:0,Xh:0,Ti:this.Vh.naturalWidth,Mi:this.Vh.naturalHeight}),this.Lh.width=t.Ti,this.Lh.height=t.Mi,i.drawImage(this.Vh,t.Gh,t.Xh,t.Ti,t.Mi,0,0,t.Ti,t.Mi),this.Yh(this.Lh))}Yh(t){this.Kh||(Kt(this.tooltip,t),this.Kh=t),this.In()}zh(){this.Kh&&(this.tooltip.removeChild(this.Kh),this.Kh=void 0,this.In())}Oh(){void 0!==this.Ih&&(this.Ih.removeEventListener(["addcue","removecue"],this.$h),this.Ih=void 0),this.Fh=void 0,this.zh(),this.qh=void 0}dispose(){this.Oh(),super.dispose()}constructor(t,i){super(t,i),this.Kh=void 0,this.Ih=void 0,this.Fh=void 0,this.Zh=t=>this.Bh(t),this.io=t=>this.Uh(t),this.$h=t=>this.Rh(),this.qh=void 0,this.showThumbnails=()=>{this.Kh&&this.Kh.hidden&&(this.Kh.hidden=!1,this.In())},this.hideThumbnails=()=>{!this.Kh||this.Kh.hidden||this.player().scrubbing()||(this.Kh.hidden=!0,this.In())},this.on(this.player().textTracks(),"addtrack",this.Zh),this.on(this.player().textTracks(),"removetrack",this.io),Dt.Ks&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}}),f();var _u=Io.getComponent("VolumeLevel");Io.registerComponent("VolumeLevel",class extends _u{createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}}),f(),f();var xu=Io.getComponent("Component"),Cu=class extends xu{createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};Cu.prototype.h=z({},Cu.prototype.h,{children:[]}),Io.registerComponent("controlBarMenuContainer",Cu);var Su=Io.getComponent("Player"),ju=class extends Su{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),Qt(i),this.Si&&s&&(e?s.insertBefore(t,e):s.appendChild(t)),h.body.removeEventListener("keydown",this.handleKeyPress),h.body.removeEventListener("click",this.handleClick)}constructor(t,i,s){super(t,i,s),this.handleKeyPress=t=>{9===t.which&&this.addClass("theo-probably-keyboard-focus")},this.handleClick=t=>{0===t.x&&0===t.y||this.removeClass("theo-probably-keyboard-focus")},h.body.addEventListener("keydown",this.handleKeyPress),h.body.addEventListener("click",this.handleClick)}};ju.prototype.h=z({},Su.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),Io.registerComponent("Player",ju),f(),f();var Tu=Io.getComponent("Player"),Mu=Tu.prototype.ns;Tu.prototype.ns=function(t){if(!(this.H&&this.H.Us&&this.H.Us()))return Mu.call(this,t)};var Au=Tu.prototype.createEl;function Pu(t,i,e,n){const r=z({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},e);r.controlBar=z({progressControl:{keepTooltipsInside:!0}},r.controlBar);const h=r.techOrder||(r.techOrder=[]);-1===h.indexOf("THEOplayer")&&h.unshift("THEOplayer");(r.theoplayer||(r.theoplayer={})).player=t,e&&zt(e.language)&&(r.languages=z({},r.languages,{[xt]:e.language}),r.language=xt),i.setAttribute("data-vjs-player","");const o=i.getAttribute("style"),a=Io(t.element,r,n);return a.ready(()=>{qo(a),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===M.so;zo(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.uplynk){var s;const e=i=>{const s="adbreakbegin"===i.type;zo(t,s,!1)};null==(s=i.uplynk)||s.ads.adBreaks.addEventListener("addadbreak",t=>{t.adBreak.addEventListener("adbreakbegin",e),t.adBreak.addEventListener("adbreakend",e)})}i.addEventListener("sourcechange",()=>{zo(t,!1,!1)})}}(a,t),function(t){t.on("mouseleave",Wo)}(a)}),i.removeAttribute("data-vjs-player"),o?i.setAttribute("style",o):i.removeAttribute("style"),vi.Zs.Ks&&(si(i,"theo-mobile"),function(t){const i=s.outerHeight,e=s.outerWidth,n=i>e;n?(ni(t,"theo-mobile-landscape"),si(t,"theo-mobile-portrait")):(ni(t,"theo-mobile-portrait"),si(t,"theo-mobile-landscape"))}(i)),function(t){t.on("seeking",()=>{ti(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()})}(a),a}Tu.prototype.createEl=function(){const t=Au.call(this),i=Io.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t},f(),f(),f(),f();var Nu=Io.getComponent("Button");var Eu="THEOPiPCloseButton";Io.registerComponent(Eu,class extends Nu{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.no.eo()}constructor(t,i){if(super(t,i),this.no=void 0,this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.no)}(i))throw new m("Invalid Picture-in-picture options.");this.no=i.no}});var Bu=class extends Y{get ro(){return this.ho}get oo(){return this.t.ds()}ao(){this.t.wn(it.uo,this.co),this.lo||this.t.wn(it.do,this.fo),this.t.vo.on("languagechange",this.se)}po(){var t;return"theo-pip-"+(null!=(t=this.mo)?t:"bottom-right")}yo(t){const i=this.bo;i&&!this.oo&&(this.ko||this.wo(),this._o(),si(i,"theo-pip"),si(i,this.po()),this.ho=!0,this.xo=t,this.Co=!1,this.So(new Ni(ii.PICTURE_IN_PICTURE)))}jo(t){const i=this.bo;i&&(this.To(),ni(i,"theo-pip"),ni(i,this.po()),this.ho=!1,this.Co=t,this.Mo=this.xo,this.xo=!1,this.So(new Ni(ii.INLINE)))}wo(){if(!this.ko){const t=this.t.vo;t.addChild(Eu,{no:this});const i=h.createElement("div");i.className="theo-pip-overlay",this.Ao=h.createElement("div"),this.Ao.className="theo-pip-overlay-text",d(this.Ao,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.Ao),Kt(t.el(),i),this.Po=i,this.ko=!0}}No(){this.Eo&&!this.Bo&&this.t.Io&&(this.Fo=this.t.Io.Do(et,this.$o),this.Bo=!0)}Ro(){this.Fo&&this.t.Io&&(this.t.Io.Uo(this.Fo),this.Bo=!1)}_o(){const t=this.t.vo.contentEl(),i=t.getBoundingClientRect(),s=h.documentElement.clientWidth,e=h.documentElement.clientHeight;t.style.top=i.top+"px",t.style.bottom=e-i.bottom+"px",t.style.right=s-i.right+"px",t.style.left=i.left+"px",t.style.width=i.width+"px",t.style.height=i.height+"px",t.style.position="fixed"}To(){const t=this.t.vo.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}Oo(){ni(this.bo,"theo-pip"),this.ro&&this.mo&&ni(this.bo,"theo-pip-"+this.mo),this.Po&&(Qt(this.Po),this.Po=void 0)}kn(){this.Oo(),this.Ro(),this.Vo(),this.t.mn(it.uo,this.co),this.t.mn(it.do,this.fo),this.t.vo.off("languagechange",this.se),this.t=void 0}constructor(t,i,s){super(),this.Lo=void 0,this.mo=void 0,this.lo=void 0,this.t=void 0,this.bo=void 0,this.Ho=!1,this.ho=!1,this.Co=!1,this.xo=!1,this.ko=!1,this.eo=void 0,this.Bo=!1,this.Fo=void 0,this.Po=void 0,this.Ao=void 0,this.Mo=!1,this.Eo=void 0,this.co=()=>{this.Ho=!0,this.Eo&&!this.ro&&this.Fo&&this.Lo&&this.Fo.qo<=this.Lo&&this.yo(!1)},this.fo=()=>{this.lo||(this.Ho=!1,this.eo(),this.jo(!1))},this.se=()=>{if(this.Ao){const t=this.t.vo;d(this.Ao,t.localize("Video playing in Picture-in-Picture mode"))}},this.$o=t=>{!this.xo&&this.Eo&&(S(t)||(this.Lo&&t<=this.Lo||this.Mo?this.ho||this.Co||this.yo(!1):this.ho?this.jo(!1):this.Co=!1))},this.Lo=i.visibility,this.mo=i.position,this.lo=i.retainPresentationModeOnSourceChange,this.Eo=void 0!==this.Lo,this.t=t,this.bo=t.zo,this.eo=s,this.ao()}},Iu=class extends E{Wo(){const t=super.Wo();return t===ii.INLINE&&this.Go.ro?ii.PICTURE_IN_PICTURE:t}Xo(t){return t===ii.PICTURE_IN_PICTURE||super.Xo(t)}Jo(t){this.Qo=this.Yo,t===ii.FULLSCREEN||t===ii.NATIVE_PICTURE_IN_PICTURE?this.Go.Ro():this.Go.No(),super.Jo(t)}Ko(t){super.Ko(t),t===ii.PICTURE_IN_PICTURE?$(this.ta.Zo(t=>this.ia(t))):t===ii.FULLSCREEN?this.Go.jo(!1):this.Go.jo(!0)}async ia(t){F(t),await Promise.all([this.sa(),this.ea.jo()]).catch(mi),F(t),this.Go.yo(!this.na),this.So(new Ni(this.Yo)),this.na=!1,this.ra=!1}_i(){this.ra||(this.Go.ro&&this.ha.ds?this.Jo(ii.FULLSCREEN):this.Qo!==ii.PICTURE_IN_PICTURE||this.ha.ds?super._i():(this.na=!0,this.Jo(ii.PICTURE_IN_PICTURE)))}kn(){super.kn(),this.Go.kn(),this.oa.mn(it.uo,this.aa),this.oa=void 0}constructor(t,i,s,e){super(i,s),this.oa=void 0,this.Go=void 0,this.Qo=ii.INLINE,this.na=!1,this.eo=()=>{this.Yo===ii.PICTURE_IN_PICTURE&&this.Jo(ii.INLINE)},this.ua=t=>{this.ra||(this.Yo!==ii.PICTURE_IN_PICTURE||this.Go.ro?this.Yo!==ii.PICTURE_IN_PICTURE&&this.Go.ro&&(this.na=!0,this.Jo(ii.PICTURE_IN_PICTURE)):this.Jo(ii.INLINE))},this.aa=()=>{this.Wo()!==ii.PICTURE_IN_PICTURE&&this.Wo()!==ii.INLINE||this.Go.No(),this.oa.mn(it.uo,this.aa)},this.oa=t,this.Go=new Bu(t,e.pip,this.eo),this.Go.wn(Ai.MODE_CHANGE,this.ua),this.oa.wn(it.uo,this.aa)}};f();var Fu=class extends Y{get ca(){return Ti.la(this.vo.el())||this.vo.supportsFullScreen()}get ds(){return this.vo.isFullscreen()||this.da}yo(){this.vo.requestFullscreen()}jo(){this.vo.exitFullscreen(),this.fa.jo()}kn(){this.Vo(),this.vo.off("fullscreenchange",this.va),this.fa.mn(oi.pa,this.va),this.fa.mn(oi.ma,this.Rs),this.vo.isFullWindow&&this.vo.exitFullscreen()}constructor(t,i){super(),this.vo=void 0,this.fa=void 0,this.Vs=!1,this.da=!1,this.ga=!1,this.va=()=>{if(this.ga)return;const t=this.Vs,i=this.ds;t!==i&&(this.Vs=i,this.So(new xi))},this.ya=()=>{this.da=this.fa.ds,this.va()},this.ba=()=>{this.ga||(this.vo.isFullWindow&&this.vo.supportsFullScreen()||this.da&&!this.vo.supportsFullScreen())&&(this.ga=!0,this.vo.exitFullscreen(),this.vo.requestFullscreen(),this.ga=!1,this.va())},this.vo=t,this.fa=i,this.vo.on("fullscreenchange",this.va),this.fa.wn(oi.pa,this.ya),this.fa.wn(oi.ka,this.ba),this.fa.wn(oi.ma,this.Rs),this.va()}};function Du(t){return class extends t{get Io(){return this.wa}ds(){return this._a.Wo()===ii.FULLSCREEN}xa(){return function(t,i){const s=w.create(t),e=i.vo;return at(s,{get controls(){return e.controls()},set controls(t){e.controls(vt(t))},get presentation(){return i._a.Ca},get presentationMode(){return i._a.Wo()},set presentationMode(t){const s=ri(t);s&&i._a.Jo(s)},get ui(){return e},get visibility(){return i.Io.Ca}})}(this.Sa,this)}kn(){super.kn(),this._a.kn(),this.ja.kn(),this.vo.dispose(),this.wa.kn()}Ta(t){this.vo.src(""),super.Ta(t)}constructor(t,i,s){super(i,s),this.zo=void 0,this.vo=void 0,this.Sa=void 0,this.wa=void 0,this._a=void 0,this.ja=void 0,this.zo=t,this.wa=new rt(t),this.Sa=super.xa(),w.defineProperty(this.Sa,"constructor",{value:lt}),this.vo=Pu(this.Sa,this.zo,s.ui),this.ja=new Fu(this.vo,this.Ma),this._a=new Iu(this,this.ja,this.Pa.Aa(),s),this._a.wn(Ai.MODE_CHANGE,this.Rs)}}}function $u(t){return(t=t||{}).position=function(t){switch(t){case"top-left":case"top-right":case"bottom-left":case"bottom-right":return t;default:return}}(t.position),t.visibility=function(t){if(Ut(t)&&!S(t))return Ci(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=vt(t.retainPresentationModeOnSourceChange),t}f(),f();var Ru=ki(()=>{let t=Du(ut());return t=function(t){let i=t;for(const t of Ei)i=t(i);return i}(t),t});function Uu(t,i){const s=function(t){const i=ei(t);return i.ui=i.ui||{},void 0!==(null==t?void 0:t.width)&&void 0===i.ui.width&&(i.ui.width=t.width),void 0!==(null==t?void 0:t.height)&&void 0===i.ui.height&&(i.ui.height=t.height),void 0!==(null==t?void 0:t.fluid)&&void 0===i.ui.fluid&&(i.ui.fluid=t.fluid),i.pip=$u(i.pip),i}(i),e=h.createElement("div");ai(e),t.appendChild(e);const n=new(Ru())(t,e,s);n.Na=n;let r=n.Ca;return n.Ea(),n.Ba(ot),w.defineProperty(r,"constructor",{value:Uu}),r=ht(r),Ht(n),function(t){for(const i of Ii)i(t)}(n),r}f(),f(),f();var Ou="theo-cast-",Vu=Io.getComponent("Button"),Lu=class extends(Lo(Vu)){get Ia(){throw new m("Fa")}get Da(){return this.h.Da}get $a(){return this.h.$a}buildCSSClass(){return Ou+"button theo-"+this.$a+"-button theo-controlbar-button "+super.buildCSSClass()}createEl(t,i,s){const e=super.createEl(),n=h.createElement("div");n.className="theo-button-icon-blur";const r=h.createElement("div");return r.className=Ou+"svg-container",r.innerHTML=this.Da,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.Ra===ui.AVAILABLE)null==(i=this.Ia)||i.start();else if(this.Ra===ui.CONNECTED||this.Ra===ui.CONNECTING){var s;null==(s=this.Ia)||s.stop()}}Ua(t){ni(this.bo,"theo-"+this.$a+"-"+this.Ra),this.Ra=t,si(this.bo,"theo-"+this.$a+"-"+this.Ra),this.se()}se(){this.Oa(this.Ra),this.De.Fe=this.controlText()}Oa(t){t===ui.CONNECTED?this.controlText("Stop Casting"):t===ui.AVAILABLE?this.controlText("Start Casting"):t===ui.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.bo=void 0,this.Ra=void 0,this.De=void 0,this.Va=void 0,this.bo=t.el(),this.Ra=ui.UNAVAILABLE,this.controlText("Unavailable"),this.De=new la(this,this.controlText()),null==(s=this.Ia)||s.addEventListener("statechange",t=>{const i=t;this.Ua(i.state)}),vi.Zs.Ke&&(this.Va=new Ko(this.el())),this.Ua(this.Ia?this.Ia.state:ui.UNAVAILABLE),this.on(t,"languagechange",this.se)}},Hu=0;function qu(){const t='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ';return Hu++,t}Io.registerComponent("chromecastButton",class extends Lu{get Ia(){var t;return null==(t=this.xs.cast)?void 0:t.chromecast}constructor(t,i){super(t,z({},i,{$a:"chromecast",Da:qu()}))}}),f();var zu="theo-chromecast-",Wu=Io.getComponent("Component"),Gu=class t extends(Lo(Wu)){buildCSSClass(){return zu+"overlay "+super.buildCSSClass()}createEl(){const i=super.createEl();si(i,zu+"overlay");const s=Io.createEl("div",{className:zu+"status-icon",innerHTML:t.ICON_SVG}),e=Io.createEl("div",{className:zu+"status-info"});d(e,"Playing on");const n=Io.createEl("div",{className:zu+"status-title"}),r=Io.createEl("div",{className:zu+"status"});return this._r=n,r.appendChild(s),r.appendChild(e),r.appendChild(n),i.appendChild(r),i}dispose(){var t;null==(t=this.La)||t.removeEventListener("statechange",this.update),this.La=void 0,this.xs.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.La=void 0,this.update=()=>{this.La?(this._r&&d(this._r,this.La.receiverName||""),this.La.state===ui.CONNECTED?this.show():this.hide()):this.hide()},this.La=null==(s=this.xs.cast)?void 0:s.chromecast,null==(e=this.La)||e.addEventListener("statechange",this.update),this.xs.addEventListener("play",this.update),this.update()}};Gu.ICON_SVG='\n\n \n',Io.registerComponent("chromecastOverlay",Gu),f(),f();Io.registerComponent("airplayButton",class extends Lu{dispose(){var t,i;null==(t=this.xs.ads)||t.removeEventListener("adbreakbegin",this.Ha),null==(i=this.xs.ads)||i.removeEventListener("adbreakend",this.qa),this.xs.removeEventListener("currentsourcechange",this.qa),super.dispose()}get Ia(){var t;return null==(t=this.xs.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,z({},i,{$a:"airplay",Da:'\n\n \n \n'})),this.qa=()=>{this.enable()},this.Ha=()=>{this.disable()},null==(s=this.xs.ads)||s.addEventListener("adbreakbegin",this.Ha),null==(e=this.xs.ads)||e.addEventListener("adbreakend",this.qa),this.xs.addEventListener("currentsourcechange",this.qa)}}),f(),f(),f();var Xu=Io.getComponent("Button"),Ju=class extends(Lo(Xu)){buildCSSClass(){return"theo-vr-button theo-controlbar-button "+super.buildCSSClass()}handleClick(){this.xs.vr.stereo=!this.xs.vr.stereo,this.se()}Sn(){const t=this.xs.vr;t&&t.state!==Ft.Os?(this.show(),t.canPresentVR?this.enable():this.disable()):this.hide(),this.se()}se(){const t=this.xs.vr;t&&t.state!==Ft.Os&&(t.stereo?this.controlText("Stop watching in VR"):t.canPresentVR?this.controlText("Watch in VR"):this.controlText("No VR capable device found"),this.za.Fe=this.controlText())}dispose(){var t;null==(t=this.xs.vr)||t.removeEventListener(["statechange","stereochange"],this.Wa),super.dispose()}constructor(t,i){var s;super(t,i),this.za=void 0,this.Va=void 0,this.Wa=()=>this.Sn(),this.controlText("Watch in VR"),this.za=new la(this,this.controlText()),null==(s=this.xs.vr)||s.addEventListener(["statechange","stereochange"],this.Wa),this.Sn(),vi.Zs.Ke&&(this.Va=new Ko(this.el())),this.on(t,"languagechange",this.se)}};Io.registerComponent("vrButton",Ju),f();var Qu=Io.getComponent("Component"),Yu=class extends Qu{createEl(){const t=super.createEl("div",{className:this.buildCSSClass()}),i=Io.createEl("div",{className:"theo-360-fov"});return t.appendChild(i),this.Ga=i,t}buildCSSClass(){return"theo-360-compass "+super.buildCSSClass()}Sn(){this.xs.vr.state===Ft.Os?this.hide():this.show()}Xa(){const t=-this.xs.vr.direction.yaw+40;this.Ga.style[bi("transform")]="scale(0.875) rotate("+t+"deg) skew("+"-10deg)"}dispose(){this.xs.vr.removeEventListener("statechange",this.Wa),this.xs.vr.removeEventListener("directionchange",this.Ja),super.dispose()}constructor(t,i,s){super(t,i),this.xs=void 0,this.Wa=()=>this.Sn(),this.Ja=()=>this.Xa(),this.xs=s,this.xs.vr.addEventListener("statechange",this.Wa),this.xs.vr.addEventListener("directionchange",this.Ja),this.Sn(),this.Xa()}};f();var Ku=Io.getComponent("Component"),Zu=class extends Ku{Qa(){this.xs.vr.state===Ft.Ya?this.Ka():this.Za()}Ka(){if(this.tu)return;this.tu=!0;const t=this.xs.element;this.iu=t.style.zIndex||"",t.style.zIndex="2147483647",this.su=this.player().isFullscreen(),this.player().requestFullscreen()}Za(){if(!this.tu)return;this.tu=!1;this.xs.element.style.zIndex=this.iu,this.su?this.player().requestFullscreen():this.player().exitFullscreen()}dispose(){this.Za(),this.xs.vr.removeEventListener("statechange",this.eu),super.dispose()}constructor(t,i,s){super(t,i),this.xs=void 0,this.tu=!1,this.su=!1,this.iu="",this.eu=()=>this.Qa(),this.xs=s,this.xs.vr.addEventListener("statechange",this.eu),this.Qa()}};Fi(function(t){const i=t.Ca;if(!i.vr)return;const s=t.vo,e=new Yu(s,{},i);if(t.wn(it.do,()=>{var i;s.removeChild(e);const n=null==(i=t.nu())?void 0:i.vr;void 0===n||n.nativeVR||s.addChild(e)}),Dt.ru){const t=new Zu(s,{},i);s.addChild(t)}}),f(),f(),f();var tc=class extends Z{constructor(){super("relatedchange")}},ic=["relatedchange"],sc=class extends Y{get Ca(){return this.hu||(this.hu=function(t){let i;const s={get sources(){return t.ou},set sources(i){t.ou=i},addEventListener(t,s){i.wn(t,s)},removeEventListener(t,s){i.mn(t,s)}};return i=new P(ic,!0,s),i.au(t),s}(this)),this.hu}get ou(){return this.uu}set ou(t){this.uu=function(t){return t.filter(t=>t&&(Xt(t.link)||dt(t,["source"])))}(t),t.length>this.uu.length&&console.warn("One or more of the configured related content sources are invalid. Check if they have a source or a link."),this.So(new tc)}kn(){this.Vo(),this.uu=[]}constructor(...t){super(...t),this.hu=void 0,this.uu=[]}};Ot(function(t){return class extends t{xa(){const t=this.cu;return at(super.xa(),{get related(){return t.Ca}})}kn(){this.cu.kn(),super.kn()}constructor(t,i){super(t,i),this.cu=void 0,this.cu=new sc}}},$t.lu),f(),f();var ec=Io.getComponent("Button"),nc=class extends ec{buildCSSClass(){return"vjs-icon-view-grid theo-related-button "+super.buildCSSClass()}handleClick(){this.fu.du?this.fu.we():this.fu.be()}se(){this.De.Fe=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.bo=void 0,this.fu=void 0,this.De=void 0,this.bo=t.el(),this.fu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText(this.localize("Related content")),this.De=new la(this,this.controlText()),this.on(t,"languagechange",this.se)}};f(),f();var rc=Io.getComponent("Button"),hc=class extends rc{buildCSSClass(){return"theo-secondary-background theo-close-button"}handleClick(){this.vu.hide()}constructor(t,i){super(t),this.vu=void 0,this.vu=i}},oc=(()=>{const t=h.createElement("div");return t.className="theo-related-grid-tile",t.innerHTML='',t})();function ac(t,i,s){const e=oc.cloneNode(!0),n=e.querySelector(".theo-related-grid-tile-content");dt(s,["source"])?(n.style.cursor="pointer",n.addEventListener("click",()=>{t.source=s.source,i.we()})):Xt(s.link)&&n.setAttribute("href",s.link);const r=e.querySelector(".theo-related-grid-tile-image");r.style.backgroundImage='url("'+J(s.image)+'")',r.removeAttribute("id");const h=e.querySelector(".theo-related-grid-tile-title");s.title?(d(h,s.title),h.removeAttribute("id")):Qt(h);const o=e.querySelector(".theo-related-grid-tile-duration");return s.duration?(d(o,s.duration),o.removeAttribute("id")):Qt(o),e}var uc=[15,12,9,8,6,4,3,2,1];var cc=class{get pu(){return"theo-"+this.mu+"-item-grid"}gu(){this.yu.focus()}bu(t){this.ku(),function(t){if(t.length)for(const i of uc)if(t.length>=i){t.length=i;break}}(t),this.wu(t.length);for(const i of t){const t=ac(this._u.Ca,this.xu,i);this.Cu.appendChild(t)}}ku(){this.Cu.innerHTML=""}Su(){const t=h.createElement("div");t.className="theo-overlay-panel";const i=h.createElement("div");return i.className="theo-related-grid",this.ju.className="theo-related",this.yu.controlText("Close Related Content"),this.Tu.appendChild(this.ju),this.ju.appendChild(t),t.appendChild(this.yu.el()),t.appendChild(i),i}wu(t){ni(this.Cu,this.pu),this.mu=t,si(this.Cu,this.pu)}kn(){Qt(this.ju),this.Mu.kn(),this.Au.kn(),this.yu.dispose(),this._u=void 0}constructor(t,i,s,e,n){this._u=void 0,this.Pu=void 0,this.xu=void 0,this.Tu=void 0,this.mu=void 0,this.yu=void 0,this.Cu=void 0,this.ju=void 0,this.Mu=void 0,this.Au=void 0,this.Nu=void 0,this._u=t,this.Pu=i,this.xu=s,this.Tu=e,this.mu=12,this.Nu=t=>{this.Cu.style.width=t.width+"px"},this.ju=h.createElement("div"),this.yu=new hc(this.Pu,{hide:()=>{this.xu.we()}}),this.Cu=this.Su(),this.Au=new lc(n),this.Au.wn(pi.yn,this.Nu),this.Mu=new Pt(this.Cu,this.Au),this.wu(12)}},lc=class extends Y{get Eu(){return this.Bu||0}get Iu(){return this.Fu.Iu}kn(){this.Vo(),this.Fu.mn(pi.yn,this.Du)}constructor(t){super(),this.Fu=void 0,this.Bu=void 0,this.Du=void 0,this.Fu=t,this.Du=t=>{let i=t.width;if(9*(t.width/16)>t.height){i=16*(t.height/9)}this.Bu=i,this.So(new gi(this.Eu,t.height))},this.Fu.wn(pi.yn,this.Du)}};f();var dc=class extends Z{constructor(){super("show")}};f();var fc=class extends Z{constructor(){super("hide")}},vc="theo-related-available",pc="theo-related-showing",mc=[...ic,"show","hide"],gc=class extends Y{get Ca(){return this.hu||(this.hu=function(t){let i;const s={get sources(){return t.ou},set sources(i){t.ou=i},get showing(){return t.du},show(){t.be()},hide(){t.we()},addEventListener(t,s){i.wn(t,s)},removeEventListener(t,s){i.mn(t,s)}};return i=new P(mc,!0,s),i.au(t),s}(this)),this.hu}get ou(){return this.$u.ou}set ou(t){this.$u.ou=t}get du(){return this.Ru}be(){const t=this.Ru;this.Ru=!0,this.Uu(pc),this.Ou.gu(),this.Pu.paused()?this.Vu=!0:this.Pu.pause(),t!==this.Ru&&this.So(new dc)}we(){const t=this.Ru;this.Ru=!1,this.Lu(pc),this.Hu.focus(),this.Vu||this.Pu.play(),this.Vu=!1,t!==this.Ru&&this.So(new fc)}Uu(t){this.Pu.el().classList.add(t)}Lu(t){this.Pu.el().classList.remove(t)}kn(){this.Vo(),this.Ou.kn()}constructor(t,i,s,e){super(),this.$u=void 0,this.Hu=void 0,this.hu=void 0,this.Pu=void 0,this.Ou=void 0,this.Ru=!1,this.Vu=!1,this.qu=t=>{const i=this.ou;this.Ou.bu(i),i.length?(this.Uu(vc),this.Hu.show()):(this.Lu(vc),this.Hu.hide()),this.So(t)},this.$u=i,this.$u.wn("relatedchange",this.qu),this.Pu=s,this.Ou=new cc(t,this.Pu,this,s.contentEl(),e),this.Hu=new nc(s,this,{})}};Bi(function(t){return class extends t{xa(){const t=this.zu;return at(super.xa(),{get related(){return t.Ca}})}kn(){this.zu.kn(),super.kn()}constructor(t,i,s){super(t,i,s),this.zu=void 0,this.zu=new gc(this,this.cu,this.vo,this.Wu)}}}),f(),f(),f();var yc=Io.getComponent("Button"),bc=class extends yc{buildCSSClass(){return"vjs-icon-share theo-social-button "+super.buildCSSClass()}handleClick(){this.Gu.showing?this.Gu.hide():this.Gu.show()}se(){this.De.Fe=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.bo=void 0,this.Gu=void 0,this.De=void 0,this.bo=t.el(),this.Gu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText("Share Video"),this.De=new la(this,this.controlText()),this.on(t,"languagechange",this.se)}};function kc(t,i,s){switch(i){case"iconurl":return function(t,i){const s=h.createElement("a");var e;s.className="theo-social-iconurl",s.title=null!=(e=t.label)?e:"",s.target="Xu",s.href=i;const n=h.createElement("img");var r,o;return n.src=null!=(r=t.icon)?r:"",n.alt=null!=(o=t.label)?o:"",n.width=25,n.height=25,s.appendChild(n),s}(t,s);case"text":return function(t){const i=h.createElement("div");if(i.className="theo-social-text",t.label){const s=h.createElement("h5");s.className="theo-primary-background theo-social-label",d(s,t.label),i.appendChild(s)}const s=h.createElement("p");var e;return s.className="theo-social-content-container theo-tertiary-background",s.tabIndex=0,d(s,null!=(e=t.text)?e:""),i.appendChild(s),i}(t);case"texturl":return function(t,i){const s=h.createElement("div");if(s.className="theo-social-texturl",t.label){const i=h.createElement("h5");i.className="theo-primary-background theo-social-label",d(i,t.label),s.appendChild(i)}const e=h.createElement("div");e.className="theo-social-content-container theo-tertiary-background";const n=h.createElement("a");return n.target="Xu",n.href=i,d(n,i),e.appendChild(n),s.appendChild(e),s}(t,s)}}f();var wc="";var _c=class{get xe(){return this.ju}Ju(t){this.ku();for(const i of t)this.Qu(i)}gu(){this.yu.focus()}Qu(t){const i=function(t,i){return t.src?G(t.src,wc)?t.src.replace(wc,i):t.src:i}(t,this.xu.Yu),s=function(t){if(t)return t.icon?"iconurl":t.text?"text":"texturl"}(t),e=kc(t,s,i);e&&("iconurl"===s?this.Ku.appendChild(e):this.Zu.appendChild(e))}ku(){this.Ku.innerHTML="",this.Zu.innerHTML=""}kn(){Qt(this.ju),this.tc.kn()}constructor(t,i,s,e){this.oa=void 0,this.xu=void 0,this.Tu=void 0,this.sc=void 0,this.yu=void 0,this.Ou=void 0,this.ju=void 0,this.Ku=void 0,this.Zu=void 0,this.tc=void 0,this.oa=t,this.xu=i,this.Tu=s,this.sc=e;const n=h.createElement("div");n.className="theo-overlay-panel",this.yu=new hc(this.oa,this.xu.Ca),this.yu.controlText("Close Share"),this.Ou=h.createElement("div"),this.Ou.className="theo-social-container",this.ju=h.createElement("div"),this.ju.className="theo-social",this.Ku=h.createElement("div"),this.Ku.className="theo-social-icon-container",this.Zu=h.createElement("div"),this.Zu.className="theo-social-text-container",this.Tu.appendChild(this.ju),this.ju.appendChild(n),this.Ou.appendChild(this.Ku),this.Ou.appendChild(this.Zu),n.appendChild(this.yu.el()),n.appendChild(this.Ou),this.tc=new Pt(this.ju,this.sc)}},xc="theo-social-available",Cc="theo-social-showing",Sc=class{get Ca(){return this.hu}get du(){return this.Ru}get ec(){return this.nc}set ec(t){this.nc=t,this.Ou.Ju(t),t.length?(this.Uu(xc),this.Hu.show()):(this.Lu(xc),this.Hu.hide())}get Yu(){return this.rc||H()}set Yu(t){this.rc=t}be(){this.Ru=!0,this.Uu(Cc),this.Ou.gu(),this.hc.paused()?this.Vu=!0:this.hc.pause()}we(){this.Ru=!1,this.Lu(Cc),this.Hu.focus(),this.Vu||this.hc.play(),this.Vu=!1}Uu(t){this.hc.el().classList.add(t)}Lu(t){this.hc.el().classList.remove(t)}kn(){this.Hu.dispose(),this.Ou.kn()}constructor(t,i){this.Hu=void 0,this.hu=void 0,this.hc=void 0,this.Ou=void 0,this.Ru=!1,this.nc=[],this.rc=void 0,this.Vu=!1,this.hu=function(t){return{get showing(){return t.du},get items(){return t.ec},set items(i){t.ec=i},get url(){return t.Yu},set url(i){t.Yu=i},show(){t.be()},hide(){t.we()}}}(this),this.hc=t,this.Ou=new _c(this.hc,this,t.contentEl(),i),this.Hu=new bc(t,this.hu,{})}};Bi(function(t){return class extends t{xa(){const t=this.Gu;return at(super.xa(),{get social(){return t.Ca}})}constructor(t,i,s){super(t,i,s),this.Gu=void 0,this.Gu=new Sc(this.vo,this.Wu)}}}),f(),f();var jc=Io.getComponent("Component"),Tc=class extends jc{createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-upnext-container "+super.buildCSSClass()}};Tc.prototype.h=z({},Tc.prototype.h,{children:[]}),Io.registerComponent("upNextContainer",Tc),f(),f();var Mc="theo-upnext-bar-",Ac=Io.getComponent("Component"),Pc=class extends Ac{get du(){return this.Ru}set du(t){this.Ru=t,this.oc&&(this.oc.tabIndex=t?0:-1)}get ac(){return this.uc}set ac(t){this.uc=t}Ta(t){this.ku(),this.cc(t)}cc(t){if(t&&t.link&&t.image){const i=h.createElement("div");si(i,Mc+"content"),i.onclick=()=>{this.lc.next()},i.onkeypress=t=>{13===t.which&&this.lc.next()};const s=h.createElement("div");if(s.style.backgroundImage='url("'+J(t.image)+'")',si(s,Mc+"image"),i.appendChild(s),t.duration){const i=h.createElement("span");si(i,Mc+"duration"),i.innerHTML=""+t.duration,s.appendChild(i)}const e=h.createElement("div");si(e,Mc+"text");const n=h.createElement("div");if(si(n,Mc+"upnext"),d(n,this.localize("Up Next")),e.appendChild(n),t.title){const i=h.createElement("div");si(i,Mc+"title"),d(i,t.title),e.appendChild(i)}i.appendChild(e),this.oc=i,this.dc=n,this.el().appendChild(this.oc)}}ku(){this.el().innerHTML="",this.oc=void 0,this.dc=void 0}se(){this.dc&&d(this.dc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-bar "+super.buildCSSClass()}dispose(){this.tc.kn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.lc=void 0,this.tc=void 0,this.Ru=void 0,this.uc=void 0,this.oc=void 0,this.dc=void 0,this.lc=i,this.tc=new Pt(this.el(),e),this.Ru=!1,this.uc=10,this.on(t,"languagechange",this.se)}};f();var Nc="theo-upnext-panel-",Ec=yu,Bc=Io.getComponent("Component"),Ic=class extends Bc{get du(){return this.Ru}set du(t){this.Ru=t}get fc(){return this.vc}set fc(t){this.vc=t}get mc(){return this.gc}set mc(t){this.gc=t}Ta(t){this.ku(),this.yc(t)}yc(t){if(t&&t.link&&t.image){const i=h.createElement("div");i.className=Nc+"content";const s=h.createElement("div");s.style.backgroundImage='url("'+J(t.image)+'")',s.className=Nc+"image",i.appendChild(s);const e=h.createElement("div");e.className=Nc+"text";const n=h.createElement("div");if(n.className=Nc+"upnext",d(n,this.localize("Up Next")),e.appendChild(n),t.title){const i=h.createElement("div");i.className=Nc+"title",d(i,t.title),e.appendChild(i)}i.appendChild(e),this.bc=h.createElement("div"),this.bc.className=Nc+"autoplay",this.bc.innerHTML=bu;const r=this.bc.querySelector("svg");r.onclick=()=>{this.lc.next()},r.tabIndex=0,r.onkeypress=t=>{13===t.which&&this.lc.next()},this.kc=n,this.wc=this.bc.querySelector("."+Ec),i.appendChild(this.bc),this.el().appendChild(i)}}get _c(){return this.xc}set _c(t){this.xc=t,this.wc.style.strokeDashoffset=""+_.round(1e5*t)/1e5}ku(){this.el().innerHTML="",this.kc=void 0,this.wc=void 0}se(){this.kc&&d(this.kc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-panel "+super.buildCSSClass()}dispose(){this.tc.kn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.lc=void 0,this.tc=void 0,this.kc=void 0,this.bc=void 0,this.wc=void 0,this.xc=0,this.Ru=void 0,this.vc=void 0,this.gc=void 0,this.lc=i,this.tc=new Pt(this.el(),e),this.Ru=!1,this.vc=10,this.gc=!0,this.on(t,"languagechange",this.se)}},Fc="theo-upnext-panel-showing",Dc="theo-upnext-bar-showing",$c=2*_.PI*73,Rc=class t{get Ca(){return this.hu}get Cc(){return this.Sc}get jc(){return this.Tc}get Mc(){return this.Ac}set Mc(t){this.Ac=t,this.Ou.Ta(t),this.Pc.Ta(t),this.hc.off("timeupdate",this.Nc),this.hc.off("ended",this.Ec),t&&(this.hc.on("timeupdate",this.Nc),this.hc.on("ended",this.Ec))}Bc(){this.Ou.fc?this.Ic=mt(this.Ou.fc):0===this.Ou.fc?this.Ic=0:this.Ic=10,0!==this.Ic?(isFinite(this.Ic)&&(this.Fc=!0),this.Ou.du=!0,this.Uu(Fc),this.Fc&&(this.Ou._c=$c-$c/this.Ic,this.Dc=v(this.$c,1e3))):this.Rc()}Uc(){this.Ou.du=!1,this.Lu(Fc),this.Fc&&(p(this.Dc),this.Oc=1,this.Ou._c=$c)}Vc(){this.Pc.du=!0,this.Uu(Dc)}Lc(){this.Pc.du=!1,this.Lu(Dc)}Rc(){p(this.Dc),this.Mc&&(s.location.href=this.Mc.link)}Uu(t){this.hc.el().classList.add(t)}Lu(t){this.hc.el().classList.remove(t)}Hc(t,i){const s=t>=i&&!(this.qc&&this.qc.zc);this.Pc.du&&!s?this.Lc():!this.Pc.du&&s&&this.Vc()}Wc(t,i){this.Ou.du&&t{this.Oc!==this.Ic?(this.Ou._c-=$c/this.Ic,this.Oc+=1):this.Rc()},this.Ec=()=>{this.Ou.du||this.Bc()},this.Nc=()=>{const i=this.hc.currentTime(),s=this.hc.duration(),e=s?t.Gc(this.Pc.ac,s):void 0;void 0!==e&&this.Hc(i,e),this.Ou.mc&&this.Wc(i,s)},this.hu=function(t){return{get source(){return t.Mc},set source(i){t.Mc=i},get bar(){return t.Cc},get panel(){return t.jc},next(){t.Rc()}}}(this),this.Pc=new Pc(i,this.hu,{},s),this.Ou=new Ic(i,this.hu,{},s),this.Sc=function(t,i){return{get showing(){return i.du},get offset(){return i.ac},set offset(t){i.ac=t},show(){t.Vc()},hide(){t.Lc()}}}(this,this.Pc),this.Tc=function(t,i){return{get showing(){return i.du},get countdownDuration(){return i.fc},set countdownDuration(t){i.fc=t},get showUpNextPanel(){return i.mc},set showUpNextPanel(t){i.mc=t},show(){t.Bc()},hide(){t.Uc()}}}(this,this.Ou),this.hc=i,this.qc=e,i.getChild("upNextContainer").addChild(this.Pc,{}),i.getChild("upNextContainer").addChild(this.Ou,{})}};Bi(function(t){return class extends t{xa(){const t=this.Xc;return at(super.xa(),{get upnext(){return t.Ca}})}kn(){this.Xc.kn(),super.kn()}constructor(t,i,s){super(t,i,s),this.Xc=void 0,this.Xc=new Rc(this.vo,this.Wu,this.Jc)}}}),f(),f();var Uc=Io.getComponent("Component"),Oc=class extends Uc{createEl(){const t=super.createEl("ul",{className:"theo-context-menu"}),i=h.createElement("li"),s=h.createElement("a"),e=h.createElement("div");s.className="theo-context-menu-a",i.appendChild(s),e.className="theo-context-menu-logo",e.innerHTML='\n\t\n\t\t\n\t\n\t\n\t\t\n\t\n\t\n\t\t\n\t\n\n',s.appendChild(e);const n=h.createElement("div");return n.className="theo-context-version",d(n,"Powered by THEOplayer 10.3.0"),s.appendChild(n),s.href="https://www.theoplayer.com/player-referral",s.target="Xu",t.appendChild(i),t}Qc(t){const i=t;i.preventDefault(),this.show(),this.el().style.left="0",this.el().style.top="0";const s=this.player().contentEl(),e=s.getClientRects(),n=e.length>0?e[0]:void 0,r=i.clientX-s.getBoundingClientRect().left,h=C(getComputedStyle(this.el()).fontSize);K(this.el(),r,n,h);const o=i.clientY-s.getBoundingClientRect().top;tt(this.el(),o,n,h),this.Yc()}Kc(){this.hide(),this.clearTimeout(this.Zc)}Yc(){this.Zc=this.setTimeout(this.Kc,4e3)}tl(){this.clearTimeout(this.Zc)}dispose(){this.Kc(),this.off(this.player(),"contextmenu",this.Qc),this.el().removeEventListener("mousedown",Vc,!0),this.off(h,"mousedown",this.Kc),this.off("mouseout",this.Yc),this.off("mouseover",this.tl),super.dispose()}constructor(t,i){super(t,i),this.Zc=0,this.on(this.player(),"contextmenu",this.Qc),this.el().addEventListener("mousedown",Vc,!0),this.on(h,"mousedown",this.Kc),this.on("mouseout",this.Yc),this.on("mouseover",this.tl),this.Kc()}};function Vc(t){t.stopPropagation()}Fi(function(t){const i=new Oc(t.vo,{});t.vo.addChild(i),t.vo.on("dispose",()=>{t.vo.removeChild(i),i.dispose()})}),f(),f(),f(),f();var Lc={Default:"","Monospaced Serif":D.il,"Proportional Serif":D.sl,"Monospaced Sans-Serif":D.nl,"Proportional Sans-Serif":D.rl},Hc={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},qc=[50,75,100,150,200];function zc(t){return{label:t+"%",value:t}}function Wc(t){return w.keys(t).map(i=>({label:i,value:t[i]}))}qc.map(function(t){return{label:t+"%",value:t/100+"em"}});var Gc=qc.map(function(t){return{label:t+"%",value:t+"%"}}),Xc=[25,50,75,100].map(zc),Jc=[0,25,50,75,100].map(zc),Qc=Wc(Hc),Yc=Wc(Lc),Kc=Wc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Zc=100,tl="#000000",il="#FFFFFF",sl="#000000";f();var el=class extends Ya{hl(){const t=this.Vr.localize(this.ol);d(this.al.subMenu.menuHeader.el(),t),this.Or=h.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",d(this.Or,t);const i=h.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",si(this.al.el(),"theo-subtitle-options-menu-item"),this.al.el().appendChild(this.Or),this.al.el().appendChild(i),i}cl(t){const i=this.Er(t);i&&this.ll(i)}dl(){return this.jr}Fr(t){this.fl(t.Br)}ll(t){for(const t of this.Pr.menuItems)t.selected(!1);t?(t.selected(!0),this.vl(t.Br.label)):this.vl("Custom")}vl(t){this.pl=t,d(this.ml,this.Vr.localize(t)),this.al.parentMenu.oe()}Ir(t){const i=super.Ir(t);return si(i.el(),"theo-subtitle-options-menu-item"),this.Rr(i),i}Rr(t){const i=this.Vr.localize(t.Br.label);d(t.el(),i);const s=this.Vr.localize("Set "+this.ol+" to ")+i;t.el().setAttribute("aria-label",s)}Oe(){this.Vr.off("languagechange",this.se),super.Oe()}constructor(t,i,s,e){super(t.subMenu),this.al=void 0,this.Vr=void 0,this.ol=void 0,this.Or=void 0,this.ml=void 0,this.pl=void 0,this.fl=void 0,this.se=void 0,this.al=t,this.Vr=e,this.pl="",this.se=()=>{const t=this.Vr.localize(this.ol);d(this.al.subMenu.menuHeader.el(),t),d(this.Or,t),this.vl(this.pl);for(const t of this.Nr)this.Rr(t)},this.ol=i,this.fl=s.gl,this.ml=this.hl(),this.jr=s.yl,this.Vr.on("languagechange",this.se)}};f();var nl=class t{static bl(t,i,s,e){if(void 0===t&&void 0===i)return;return W(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.kl=void 0,this.wl=void 0,this._l=void 0,this.xl=void 0,this.Cl=void 0,this.Sl=void 0,this.jl=void 0,this.Tl=void 0,this.Ml=void 0,this.Al=void 0,this.Pl=void 0,this.Nl=void 0,this.El=void 0,this.Bl=void 0,this.Il=void 0,this.Fl=void 0,this.kl=i,this.Tl=t=>{this.kl.fontFamily=t.value},this.Ml=t=>{this.kl.fontSize=t.value},this.Al=i=>{this.wl=i.value,this.kl.fontColor=t.bl(this._l,this.wl,il,Zc)},this.Pl=i=>{this._l=i.value,this.kl.fontColor=t.bl(this._l,this.wl,il,Zc)},this.Nl=i=>{this.Cl=i.value,this.kl.backgroundColor=t.bl(this.Cl,this.xl,tl,Zc)},this.El=i=>{this.xl=i.value,this.kl.backgroundColor=t.bl(this.Cl,this.xl,tl,Zc)},this.Bl=i=>{this.jl=i.value,this.kl.windowColor=t.bl(this.jl,this.Sl,sl,Zc)},this.Il=i=>{this.Sl=i.value,this.kl.windowColor=t.bl(this.jl,this.Sl,sl,Zc)},this.Fl=t=>{this.kl.edgeStyle=t.value}}};f();var rl=class{Dl(t,i){const s=this.$l(t,i.dl());s&&i.cl(s)}$l(t,i){return Pi(i,i=>i.value===t)}Rl(t,i,s){let e,n;if(void 0===t)e=this.$l(void 0,i.dl()),n=this.$l(void 0,s.dl());else if(t){const r=function(t){let i=q(t);i||(i=q(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=R(O(t),1));if(!i){const s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=R(O(Hc[s]),1)}return i}(t);if(r){const t=L(r),h=100*r.Ul;e=this.$l(t,i.dl()),n=this.$l(h,s.dl())}}e&&i.cl(e),n&&s.cl(n)}constructor(t,i){this.kl=void 0,this.Ol=void 0,this.Vl=void 0,this.kl=t,this.Ol=i,this.Vl=()=>{const t=this.kl.fontFamily;this.Dl(t,this.Ol["Font family"]);const i=this.kl.fontColor;this.Rl(i,this.Ol["Font color"],this.Ol["Font opacity"]);const s=this.kl.fontSize;this.Dl(s,this.Ol["Font size"]);const e=this.kl.backgroundColor;this.Rl(e,this.Ol["Background color"],this.Ol["Background opacity"]);const n=this.kl.windowColor;this.Rl(n,this.Ol["Window color"],this.Ol["Window opacity"]);const r=this.kl.edgeStyle;this.Dl(r,this.Ol["Character edge style"])},this.kl.addEventListener("change",this.Vl),this.Vl()}};var hl=class extends Ya{Ll(){return{"Font family":{yl:ol(Yc),gl:this.Hl.Tl},"Font color":{yl:ol(Qc),gl:this.Hl.Pl},"Font opacity":{yl:ol(Xc),gl:this.Hl.Al},"Font size":{yl:ol(Gc),gl:this.Hl.Ml},"Background color":{yl:ol(Qc),gl:this.Hl.Nl},"Background opacity":{yl:ol(Jc),gl:this.Hl.El},"Window color":{yl:ol(Qc),gl:this.Hl.Bl},"Window opacity":{yl:ol(Jc),gl:this.Hl.Il},"Character edge style":{yl:ol(Kc),gl:this.Hl.Fl}}}ql(){this.Or=h.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",this.zl=h.createElement("span"),this.zl.className="theo-primary-color theo-settings-control-menu-item-value",this.Jr.el().appendChild(this.Or),this.Jr.el().appendChild(this.zl),this.se()}Ir(t){const i=this.Pr.addSubMenuItem();return i.Br=t,this.Ol[t]=new el(i,t,this.Wl[t],this.Vr),i}Rr(t){}Fr(t){}Oe(){this.Vr.off("languagechange",this.se),this.Gl.removeEventListener(["addtrack","removetrack"],this.Xl),super.Oe()}constructor(t,i,s,e){super(t.subMenu),this.Jr=void 0,this.Gl=void 0,this.Vr=void 0,this.Hl=void 0,this.Jl=void 0,this.Wl=void 0,this.Ol=void 0,this.Or=void 0,this.zl=void 0,this.Xl=void 0,this.se=void 0,this.Jr=t,this.Gl=i,this.Vr=e,this.Ol={},this.Xl=()=>{this.Gl.some(t=>At(t.kind))?this.Jr.show():this.Jr.hide()},this.se=()=>{d(this.Pr.menuHeader.el(),this.Vr.localize("Subtitle Options")),d(this.Or,this.Vr.localize("Subtitle")),d(this.zl,this.Vr.localize("Options")),this.Jr.el().setAttribute("aria-label",this.Vr.localize("Open the subtitle options menu"))},this.Hl=new nl(s),this.Wl=this.Ll(),this.jr=w.keys(this.Wl),this.ql(),this.Jl=new rl(s,this.Ol),this.Vr.on("languagechange",this.se),this.Gl.addEventListener(["addtrack","removetrack"],this.Xl),this.Xl()}};function ol(t){const i=[{label:"Default",value:void 0}];for(const s of t)"Default"!==s.label&&i.push(s);return i}Fi(function(t){const i=t.vo.controlBar.getChild("SettingsButton").menu,s=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),e=new hl(s,t.nt.Ca,t.Ql.Ca,t.vo);t.vo.on("dispose",()=>{i.removeMenuItem(s),s.dispose(),e.Oe(),i.dispose()})}),f(),f();var al=Io.getComponent("Component"),ul=class extends al{buildCSSClass(){return"theo-ad-control-panel"}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}constructor(t,i){super(t,i),t.adControlBar=this}};ul.prototype.h=z({},al.prototype.h,{children:[]}),Io.registerComponent("AdControlPanel",ul),f(),f();var cl=Io.getComponent("Component"),ll="theo-dai-countdown",dl=class extends cl{buildCSSClass(){return ll}createEl(t,i,s){const e=h.createElement("div");return e.className=ll,e}Yl(t,i){i.addEventListener("adbreakbegin",()=>this.show()),i.addEventListener("adbreakend",()=>this.hide()),t.addEventListener("timeupdate",this.se)}constructor(t,i,s){super(t,s),this.oa=void 0,this.hu=void 0,this.bo=void 0,this.se=void 0,this.oa=t,this.hu=i,this.se=()=>{const t=this.hu.ads;t.playing&&t.currentAdBreak&&t.currentAds.length&&d(this.contentEl(),function(t,i,s){const e=t.ads;let n="";const r=e.length;if(r>1){const t=e.indexOf(i)+1;n=s("Ad")+" "+t+"/"+r+". "}const h=_.ceil(t.maxRemainingDuration);return n+=s("The content will resume in {1} seconds.").replace("{1}",""+h),n}(t.currentAdBreak,t.currentAds[0],t=>this.oa.localize(t)))},this.bo=t.el(),this.Yl(i,i.ads),this.on(t,"languagechange",this.se)}};f();var fl=Io.getComponent("ClickableComponent"),vl=class extends fl{buildCSSClass(){return Vt}createEl(t,i,s){return this.h.Ca.element.querySelector("."+Vt)}emitTapEvents(){}se(){d(this.el(),this.localize("Learn more"))}constructor(t,i){super(t,i),this.bo=void 0,this.hu=void 0,d(this.el(),t.localize("Learn more")),this.hu=i.Ca,this.bo=t.el(),this.on(t,"languagechange",this.se)}};Fi(function(t){if(t.Ca.ads&&t.Kl){const i=t.vo,s=new dl(i,t.Ca);i.adControlBar.addChild(s);if(t.Ca.element.querySelector("."+Vt)){const s=new vl(i,{Ca:t.Ca});i.adControlBar.addChild(s)}}}),f(),f();var pl=Io.getComponent("Component"),ml=["addtrack","removetrack","change"],gl=class extends(Lo(pl)){createEl(){const t=super.createEl();return this.qualityLabel=Io.createEl("div",{className:"theo-quality-label-text"}),t.appendChild(this.qualityLabel),ci(this.qualityLabel),t}dispose(){this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.Zl),this.Yr=void 0),this.xs.videoTracks.removeEventListener(ml,this.dh),super.dispose()}constructor(t,i){super(t,i),this.qualityLabel=void 0,this.Yr=void 0,this.startFadeOutID=void 0,this.removeLabelClassesID=void 0,this.dh=()=>{const t=Ga(this.xs.videoTracks);t!==this.Yr&&(this.Yr&&this.Yr.removeEventListener("activequalitychanged",this.Zl),this.Yr=t,t&&t.addEventListener("activequalitychanged",this.Zl),this.Zl())},this.Zl=()=>{const t=this.Yr&&this.Yr.activeQuality;if(!this.qualityLabel||!t)return;const i=t.label?t.label:t.height?t.height+"p":void 0;i&&(d(this.qualityLabel,i),this.addClass("theo-quality-label-show"),this.hideActiveQualityLabel())},this.hideActiveQualityLabel=()=>{this.resetTimeout(),this.startFadeOutID=this.setTimeout(this.fadeoutLabel,3750),this.removeLabelClassesID=this.setTimeout(this.hideLabel,4e3)},this.resetTimeout=()=>{this.startFadeOutID&&this.clearTimeout(this.startFadeOutID),this.removeLabelClassesID&&this.clearTimeout(this.removeLabelClassesID)},this.fadeoutLabel=()=>{this.addClass("theo-quality-label-fadeout")},this.hideLabel=()=>{this.removeClass("theo-quality-label-show"),this.removeClass("theo-quality-label-fadeout")},super.addClass("theo-quality-label"),this.xs.videoTracks&&(this.xs.videoTracks.addEventListener(ml,this.dh),this.dh())}};Io.registerComponent("activeQualityLabel",gl),f(),f();var yl="theo-upcoming-ad-notification",bl=["adbreakbegin","adbreakend","adadded","adloaded","adbegin","adend"],kl=class extends(Lo(va)){createEl(){const t=Io.createEl("div",{className:yl});return this.notificationText=Io.createEl("div",{className:yl+"text"}),t.appendChild(this.notificationText),t}td(){if(!this.xs.ads)return;const t=this.xs.ads.scheduledAdBreaks;let i,s=1/0;for(let e=0;e"linear"===t.type)}sd(){if(!this.xs.ads||this.xs.ads.playing||!this.currentAdBreak||!this.currentAdBreakValid||0===this.currentAdBreak.timeOffset)return void this.ed();const t=this.xs.currentTime;if(this.currentAdBreak.timeOffset>t+10)return void this.ed();const i=_.ceil(this.currentAdBreak.timeOffset-t);i<0?this.ed():this.nd(i)}nd(t){this.rd!==t&&(d(this.notificationText,"Your video will be temporarily interrupted in 0:"+(t<10?"0"+t:t)),this.rd=t,this.show())}ed(){this.rd=NaN,this.hide()}dispose(){var t;this.xs.removeEventListener("timeupdate",this.handleTimeUpdate),null==(t=this.xs.ads)||t.removeEventListener(bl,this.handleAdEvent),this.currentAdBreak=void 0,super.dispose()}constructor(t,i){super(t,i),this.currentAdBreak=void 0,this.currentAdBreakValid=!1,this.rd=NaN,this.handleTimeUpdate=()=>{this.sd()},this.handleAdEvent=()=>{this.td(),this.sd()},this.xs.ads&&(this.hide(),this.xs.addEventListener("timeupdate",this.handleTimeUpdate),this.xs.ads.addEventListener(bl,this.handleAdEvent))}};Io.registerComponent("upcomingAdNotificationText",kl),f(),f();var wl=Io.getComponent("Component");Io.registerComponent("UplynkAdBreakBar",class extends wl{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theo-ad-remaining-container",t}get od(){return this.h.adBreakProvider()}se(t,i){if(this.od&&this.od.endTime){const s=_.max(this.od.endTime-t,0);d(i,"Content will resume in "+_.ceil(s)+"s"),this.show()}else this.hide()}constructor(t,i){super(t,i),this.ad=()=>{this.se(this.player().currentTime(),this.el())},this.on(t,"timeupdate",this.ad)}}),f();var _l=Io.getComponent("ClickableComponent");Io.registerComponent("UplynkAdSkipButton",class extends _l{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.ud=h.createElement("span"),t.appendChild(this.ud),this.se(t,this.ud),t}handleClick(){this.h.skipCallback()}se(t,i){this.ld<=_t.fd.dd?(ni(t,"theoplayer-ad-skip-countdown"),si(t,"theoplayer-ad-skip-button"),d(i,"Skip ads")):d(i,"Skip ads in "+_.ceil(this.ld)+"s")}get ld(){return this.h.adBreak.startTime+this.h.adBreak.skipOffset-this.player().currentTime()}constructor(t,i){super(t,i),this.ad=()=>{this.se(this.el(),this.ud)},this.on(t,"timeupdate",this.ad)}}),f(),f();var xl=Io.getComponent("Component"),Cl=class extends xl{buildCSSClass(){return"theo-uplynk-marker-bar"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}};Io.registerComponent("UplynkAdBreakMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-bar-adbreak"}}),f(),f();var Sl=Io.getComponent("Component"),jl=class extends Sl{get startTime(){return this.h.startTime}get endTime(){return this.h.endTime}get seekable(){return this.player().seekable()}buildCSSClass(){return"theo-uplynk-marker"}createEl(t,i,s){const e=h.createElement("div");e.className=this.buildCSSClass();const n=this.seekable.start(0),r=this.seekable.end(this.seekable.length-1),o=_.max(this.startTime-n,0),a=void 0!==this.endTime?_.max(r-this.endTime,0):0,u=r-n;return e.style.left=o/u*100+"%",e.style.right=a/u*100+"%",e}constructor(t,i){super(t,i)}};Io.registerComponent("UplynkAdBreakMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-adbreak"}}),f();Io.registerComponent("UplynkAssetMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-bar-asset"}}),f();Io.registerComponent("UplynkAssetMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-asset"}}),f();var Tl=Io.getComponent("Component");Io.registerComponent("UplynkContentNotificationBar",class extends Tl{buildCSSClass(){const t="theo-uplynk-content-notification-bar";return t+(Dt.ru||Dt.vd?" "+t+"-ios":"")}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}}),f();var Ml=Io.getComponent("Component");function Al(t,i){const s=t.uplynk;return Boolean(t&&void 0===s)||Boolean(t&&s&&void 0===s.ui)||Boolean(t&&s&&s.ui&&void 0===s.ui[i])||Boolean(t&&s&&s.ui&&!0===s.ui[i])}Io.registerComponent("UplynkContentNotification",class extends Ml{get pd(){return this.h.asset}buildCSSClass(){return"theo-uplynk-content-notification"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}wo(){const t=h.createElement("img");t.src=this.pd.posterUrl,t.className=this.buildCSSClass()+"-thumbnail",this.el().appendChild(t);const i=h.createElement("div");i.className=this.buildCSSClass()+"-description";const s=function(t){return"Next: "+t}(this.pd.description);d(i,s),this.el().appendChild(i),this.md=h.createElement("div"),this.md.className=this.buildCSSClass()+"-countdown",d(this.md,this.gd),this.el().appendChild(this.md)}get gd(){const t=_.min(10,this.yd);return"Starting in "+_.ceil(t)+" seconds"}get yd(){return _.max(0,this.pd.startTime-this.player().currentTime())}bd(){const t=this.yd;t>10||t<=0?this.hide():(d(this.md,this.gd),this.show())}constructor(t,i){super(t,i),this.md=void 0,this.wo(),this.on(t,"timeupdate",this.bd),this.hide()}}),f(),Bi(function(t){return class extends t{get kd(){return this.vo.controlBar.progressControl.seekBar}Ta(t){this.wd=!1,this.Ca.removeEventListener("timeupdate",this._d),this.vo.removeChild("UplynkAdBreakBar"),this.vo.removeChild("UplynkAdSkipButton"),this.kd.removeChild("UplynkAdBreakMarkerBar"),this.kd.removeChild("UplynkAssetMarkerBar"),this.vo.removeChild("UplynkContentNotificationBar"),super.Ta(t)}xd(){if(!function(t){return Al(t,"assetMarkers")}(this.Cd)||!this.wd)return;const t=this.Ca.uplynk.assets.map(t=>({name:"UplynkAssetMarker",startTime:t.startTime,endTime:t.endTime}));this.kd.removeChild("UplynkAssetMarkerBar"),this.kd.addChild("UplynkAssetMarkerBar",{children:t})}Sd(){if(!function(t){return Al(t,"contentNotification")}(this.Cd))return;const t=this.Ca.uplynk.assets.map(t=>({name:"UplynkContentNotification",asset:t}));this.vo.removeChild("UplynkContentNotificationBar"),this.vo.addChild("UplynkContentNotificationBar",{children:t})}kn(){this.Ca.removeEventListener("timeupdate",this._d);const t=this.Ca.uplynk;null==t||t.ads.adBreaks.removeEventListener("addadbreak",this.jd),null==t||t.ads.adBreaks.removeEventListener("removeadbreak",this.Td),null==t||t.assets.removeEventListener("addasset",this.Md),null==t||t.assets.removeEventListener("removeasset",this.Md),this.Ca.removeEventListener("loadeddata",this.Pd),super.kn()}constructor(t,i,s){super(t,i,s),this.wd=!1,this.Pd=()=>{this.wd=!0,isFinite(this.Nd())||this.Ca.addEventListener("timeupdate",this._d),this._d(),this.xd(),this.Sd()},this.jd=t=>{t.adBreak.addEventListener("adbreakbegin",this.Ed),t.adBreak.addEventListener("adbreakend",this.Bd),this._d()},this.Td=t=>{t.adBreak.removeEventListener("adbreakbegin",this.Ed),t.adBreak.removeEventListener("adbreakend",this.Bd),this._d()},this._d=()=>{if(!function(t){return Al(t,"adBreakMarkers")}(this.Cd)||!this.wd)return;const t=this.Ca.uplynk,i=null==t?void 0:t.ads.adBreaks.map(t=>({name:"UplynkAdBreakMarker",startTime:t.startTime,endTime:t.endTime}));this.kd.removeChild("UplynkAdBreakMarkerBar"),this.kd.addChild("UplynkAdBreakMarkerBar",{children:i})},this.Ed=()=>{if(function(t){return Al(t,"adNotification")}(this.Cd)){const t=this.Ca.uplynk,i=t.ads.currentAdBreak;this.vo.addChild("UplynkAdBreakBar",{adBreakProvider:this.Id}),-1!==i.skipOffset&&this.vo.addChild("UplynkAdSkipButton",{adBreak:i,skipCallback:t.ads.skip})}},this.Id=()=>this.Ca.uplynk.ads.currentAdBreak,this.Bd=()=>{this.vo.removeChild("UplynkAdBreakBar"),this.vo.removeChild("UplynkAdSkipButton")},this.Md=()=>{this.xd(),this.Sd()};const e=this.Ca.uplynk;null==e||e.ads.adBreaks.addEventListener("addadbreak",this.jd),null==e||e.ads.adBreaks.addEventListener("removeadbreak",this.Td),null==e||e.assets.addEventListener("addasset",this.Md),null==e||e.assets.addEventListener("removeasset",this.Md),this.Ca.addEventListener("loadeddata",this.Pd)}}});export{lt as ChromelessPlayer,nt as ErrorCategory,st as ErrorCode,Uu as Player,Rt as cache,Bt as cast,pt as features,bt as players,wt as registerContentProtectionIntegration,ft as utils,gt as version,Io as videojs}; //# sourceMappingURL=THEOplayer.esm.js.map \ No newline at end of file diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.js b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.js index 7c300dbe..1965667b 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.js +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.js @@ -34,8 +34,8 @@ THEOplayer is based on patented technology developed by THEO Technologies (https://www.theoplayer.com). - Version: 10.0.0 - Created: 2025-09-12T12:50:32.290Z + Version: 10.3.0 + Created: 2025-10-23T15:33:11.023Z */ -!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(t):"function"==typeof define&&define.amd?define([],function(){return i(t)}):t.THEOplayer=i(t)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this,function(t){"use strict";var i,n,r,e,s,u,o,h,a,c={exports:{}},f=(c.exports,t.window),v=t.document,d=t.location,l=t.navigator,g=t.setTimeout,w=t.clearTimeout,m=t.setInterval,y=t.clearInterval,p=t.Error,_=t.TypeError,k=t.SyntaxError,b=t.Object,A=t.Math,T=t.parseInt,S=t.parseFloat,E=t.isNaN,I=t.Uint8Array,R=t.Worker,C=(t.WorkerGlobalScope,t.XMLHttpRequest),P=b.create,N=b.defineProperty,D=b.getOwnPropertyDescriptor,x=b.getOwnPropertyNames,B=b.getPrototypeOf,O=b.prototype.hasOwnProperty,M=function(t,i){return function(){return t&&(i=t(t=0)),i}},L=function(t,i){return function(){return i||t((i={exports:{}}).exports,i),i.exports}},F=function(t,i,n,r){if(i&&"object"==typeof i||"function"==typeof i)for(var e,s=x(i),u=0,o=s.length;u0;)i.shift()();n=!1}}).AQ,wt.itn=ct.M6,wt.rtn=function(t){try{var i=et(t);if(!self.dispatchEvent(i)||i.defaultPrevented)return}catch(t){}g(function(){throw new p("Unhandled promise rejection: ".concat(t))},0)})}),It=M(function(){Et()});function Rt(t,i){return(Rt=b.setPrototypeOf||function(t,i){return t.__proto__=i,t})(t,i)}var Ct=M(function(){V(),It()});function Pt(t,i){if("function"!=typeof i&&null!==i)throw new _("Super expression must either be null or a function");t.prototype=b.create(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),i&&Rt(t,i)}var Nt=M(function(){V(),It(),Ct()});function Dt(t,i){for(var n=0;nt.length)&&(i=t.length);for(var n=0,r=new Array(i);n=t.length?{done:!0}:{done:!1,value:t[s++]}}}throw new _("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Ut=M(function(){V(),It(),Lt()});function Vt(t,i,n,r,e,s,u){try{var o=t[s](u),h=o.value}catch(t){return void n(t)}o.done?i(h):ot.resolve(h).then(r,e)}function jt(t){return function(){var i=this,n=arguments;return new ot(function(r,e){var s=t.apply(i,n);function u(t){Vt(s,r,e,u,o,"next",t)}function o(t){Vt(s,r,e,u,o,"throw",t)}u(void 0)})}}var Ht,Wt=M(function(){V(),It()});function zt(t,n){var e,s,u,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},h=b.create(("function"==typeof Iterator?Iterator:b).prototype);return h.next=a(0),h.throw=a(1),h.return=a(2),"function"==typeof i&&(h[r]=function(){return this}),h;function a(i){return function(r){return function(i){if(e)throw new _("Generator is already executing.");for(;h&&(h=0,i[0]&&(o=0)),o;)try{if(e=1,s&&(u=2&i[0]?s.return:i[0]?s.throw||((u=s.return)&&u.call(s),0):s.next)&&!(u=u.call(s,i[1])).done)return u;switch(s=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,s=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(u=o.trys,(u=u.length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new _(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xt(t,i,n){if(null!=i){if("object"!=typeof i&&"function"!=typeof i)throw new _("Object expected.");var r,u;if(n){if(!s)throw new _("Symbol.asyncDispose is not defined.");r=i[s]}if(void 0===r){if(!e)throw new _("Symbol.dispose is not defined.");r=i[e],n&&(u=r)}if("function"!=typeof r)throw new _("Object not disposable.");u&&(r=function(){try{u.call(this)}catch(t){return ot.reject(t)}}),t.stack.push({value:i,dispose:r,async:n})}else n&&t.stack.push({async:!0});return i}function Gt(t){function i(i){t.error=t.hasError?new Ht(i,t.error,"An error was suppressed during disposal."):i,t.hasError=!0}var n,r=0;return function e(){for(;n=t.stack.pop();)try{if(!n.async&&1===r)return r=0,t.stack.push(n),ot.resolve().then(e);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return r|=2,ot.resolve(s).then(e,function(t){return i(t),e()})}else r|=1}catch(t){i(t)}if(1===r)return t.hasError?ot.reject(t.error):ot.resolve();if(t.hasError)throw t.error}()}var Qt=M(function(){V(),It(),Ht="function"==typeof SuppressedError?SuppressedError:function(t,i,n){var r=new p(n);return r.name="SuppressedError",r.error=t,r.suppressed=i,r}}),Yt=M(function(){V(),It(),Qt()}),$t=L(function(t,n){var e,s;V(),It(),ft(),e=t,s=function(t){var n="function"==typeof i&&"symbol"===W(r)?i:function(t){return"Symbol("+t+")"};function e(){}var s=Number.isNaN||function(t){return t!=t},u=e;function o(t){return"object"===(void 0===t?"undefined":W(t))&&null!==t||"function"==typeof t}function h(t){return t.slice()}function a(t,i,n,r,e){new I(t).set(new I(n,r,e),i)}function c(t){return!1!==function(t){return"number"==typeof t&&(!s(t)&&!(t<0))}(t)&&t!==1/0}function f(t,i,n){if("function"!=typeof t)throw new _("Argument is not a function");return Function.prototype.apply.call(t,i,n)}function v(t,i,n,r){var e=t[i];if(void 0!==e){if("function"!=typeof e)throw new _(e+" is not a method");switch(n){case 0:return function(){return l(e,t,r)};case 1:return function(i){var n=[i].concat(r);return l(e,t,n)}}}return function(){return E(void 0)}}function d(t,i,n){var r=t[i];if(void 0!==r)return f(r,t,n)}function l(t,i,n){try{return E(f(t,i,n))}catch(t){return R(t)}}function g(t){if(t=Number(t),s(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function w(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new _("size property of a queuing strategy must be a function");return function(i){return t(i)}}var m=ot,y=ot.prototype.then,k=ot.resolve.bind(m),T=ot.reject.bind(m);function S(t){return new m(t)}function E(t){return k(t)}function R(t){return T(t)}function C(t,i,n){return y.call(t,i,n)}function P(t,i,n){C(C(t,i,n),void 0,u)}function N(t,i){P(t,i)}function D(t,i){P(t,void 0,i)}function x(t,i,n){return C(t,i,n)}function B(t){C(t,void 0,u)}var O=function(){function t(){this.Rd=0,this.Dd=0,this.Ld={Od:[],Fd:void 0},this.Ud=this.Ld,this.Rd=0,this.Dd=0}return b.defineProperty(t.prototype,"length",{get:function(){return this.Dd},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var i=this.Ud,n=i;16383===i.Od.length&&(n={Od:[],Fd:void 0}),i.Od.push(t),n!==i&&(this.Ud=n,i.Fd=n),++this.Dd},t.prototype.shift=function(){var t=this.Ld,i=t,n=this.Rd,r=n+1,e=t.Od,s=e[n];return 16384===r&&(i=t.Fd,r=0),--this.Dd,this.Rd=r,t!==i&&(this.Ld=i),e[n]=void 0,s},t.prototype.forEach=function(t){for(var i=this.Rd,n=this.Ld,r=n.Od;!(i===r.length&&void 0===n.Fd||i===r.length&&(i=0,0===(r=(n=n.Fd).Od).length));)t(r[i]),++i},t.prototype.peek=function(){var t=this.Ld,i=this.Rd;return t.Od[i]},t}();function M(t,i,n){var r=null;!0===n&&(r=b.prototype);var e=b.create(r);return e.value=t,e.done=i,e}function L(t,i){t.Vd=!0,t.Hd=i,i.Wd=t,"readable"===i.Ra?j(t):"closed"===i.Ra?function(t){j(t),q(t)}(t):H(t,i.qd)}function F(t,i){return $i(t.Hd,i)}function U(t){"readable"===t.Hd.Ra?z(t,new _("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,i){H(t,i)}(t,new _("Reader was released and can no longer be used to monitor the stream's closedness")),t.Hd.Wd=void 0,t.Hd=void 0}function V(t){return new _("Cannot "+t+" a stream using a released reader")}function j(t){t.zd=S(function(i,n){t.Gd=i,t.Xd=n})}function H(t,i){j(t),z(t,i)}function z(t,i){B(t.zd),t.Xd(i),t.Gd=void 0,t.Xd=void 0}function q(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0}var X=n("[[CancelSteps]]"),G=n("[[PullSteps]]");function Q(t,i){void 0===i&&(i=!1);var n=new it(t);return n.Vd=i,n}function Y(t){return S(function(i,n){var r={Qd:i,Kd:n};t.Wd.Yd.push(r)})}function $(t,i,n){var r=t.Wd;r.Yd.shift().Qd(M(i,n,r.Vd))}function K(t){return t.Wd.Yd.length}function J(t){var i=t.Wd;return void 0!==i&&!!nt(i)}var Z,tt,it=function(){function t(t){if(!1===Qi(t))throw new _("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Yi(t))throw new _("This stream has already been locked for exclusive reading by another reader");L(this,t),this.Yd=new O}return b.defineProperty(t.prototype,"closed",{get:function(){return nt(this)?this.zd:R(et("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return nt(this)?void 0===this.Hd?R(V("cancel")):F(this,t):R(et("cancel"))},t.prototype.read=function(){return nt(this)?void 0===this.Hd?R(V("read from")):rt(this):R(et("read"))},t.prototype.releaseLock=function(){if(!nt(this))throw et("releaseLock");if(void 0!==this.Hd){if(this.Yd.length>0)throw new _("Tried to release a reader lock when that reader has pending read() calls un-settled");U(this)}},t}();function nt(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Yd")}function rt(t){var i=t.Hd;return i.Jd=!0,"closed"===i.Ra?E(M(void 0,!0,t.Vd)):"errored"===i.Ra?R(i.qd):i.Zd[G]()}function et(t){return new _("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"===W(n.asyncIterator)&&((Z={})[n.asyncIterator]=function(){return this},tt=Z,b.defineProperty(tt,n.asyncIterator,{enumerable:!1}));var st={next:function(){if(!1===ut(this))return R(ht("next"));var t=this.$d;return void 0===t.Hd?R(V("iterate")):x(rt(t),function(i){var n=i.done;return n&&U(t),M(i.value,n,!0)})},return:function(t){if(!1===ut(this))return R(ht("next"));var i=this.$d;if(void 0===i.Hd)return R(V("finish iterating"));if(i.Yd.length>0)return R(new _("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.ul){var n=F(i,t);return U(i),x(n,function(){return M(t,!0,!0)})}return U(i),E(M(t,!0,!0))}};function ut(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"$d")}function ht(t){return new _("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function at(t){var i=t.tf.shift();return t.if-=i.size,t.if<0&&(t.if=0),i.value}function ct(t,i,n){if(!c(n=Number(n)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.tf.push({value:i,size:n}),t.if+=n}function ft(t){t.tf=new O,t.if=0}void 0!==tt&&b.setPrototypeOf(st,tt),b.defineProperty(st,"next",{enumerable:!1}),b.defineProperty(st,"return",{enumerable:!1});var vt=n("[[AbortSteps]]"),dt=n("[[ErrorSteps]]"),lt=function(){function t(t,i){void 0===t&&(t={}),void 0===i&&(i={}),wt(this);var n=i.size,r=i.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var e=w(n);void 0===r&&(r=1),function(t,i,n,r){var e=b.create(Bt.prototype);function s(){return d(i,"start",[e])}var u=v(i,"write",1,[e]),o=v(i,"close",0,[]),h=v(i,"abort",1,[]);Ot(t,e,s,u,o,h,n,r)}(this,t,r=g(r),e)}return b.defineProperty(t.prototype,"locked",{get:function(){if(!1===mt(this))throw Ht("locked");return yt(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===mt(this)?R(Ht("abort")):!0===yt(this)?R(new _("Cannot abort a stream that already has a writer")):pt(this,t)},t.prototype.close=function(){return!1===mt(this)?R(Ht("close")):!0===yt(this)?R(new _("Cannot close a stream that already has a writer")):!0===Tt(this)?R(new _("Cannot close an already-closing stream")):_t(this)},t.prototype.getWriter=function(){if(!1===mt(this))throw Ht("getWriter");return gt(this)},t}();function gt(t){return new It(t)}function wt(t){t.Ra="writable",t.qd=void 0,t.ef=void 0,t.nf=void 0,t.rf=new O,t.hf=void 0,t.uf=void 0,t.cf=void 0,t.df=void 0,t.lf=!1}function mt(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"nf")}function yt(t){return void 0!==t.ef}function pt(t,i){var n=t.Ra;if("closed"===n||"errored"===n)return E(void 0);if(void 0!==t.df)return t.df.vf;var r=!1;"erroring"===n&&(r=!0,i=void 0);var e=S(function(n,e){t.df={vf:void 0,Qd:n,Kd:e,_f:i,gf:r}});return t.df.vf=e,!1===r&&bt(t,i),e}function _t(t){var i=t.Ra;if("closed"===i||"errored"===i)return R(new _("The stream (in "+i+" state) is not in the writable state and cannot be closed"));var n=S(function(i,n){var r={Qd:i,Kd:n};t.uf=r}),r=t.ef;return void 0!==r&&!0===t.lf&&"writable"===i&&Zt(r),function(t){ct(t,"close",0),Ft(t)}(t.nf),n}function kt(t,i){"writable"!==t.Ra?At(t):bt(t,i)}function bt(t,i){var n=t.nf;t.Ra="erroring",t.qd=i;var r=t.ef;void 0!==r&&Nt(r,i),!1===function(t){return void 0!==t.hf||void 0!==t.cf}(t)&&!0===n.pf&&At(t)}function At(t){t.Ra="errored",t.nf[dt]();var i=t.qd;if(t.rf.forEach(function(t){t.Kd(i)}),t.rf=new O,void 0!==t.df){var n=t.df;if(t.df=void 0,!0===n.gf)return n.Kd(i),void St(t);P(t.nf[vt](n._f),function(){n.Qd(),St(t)},function(i){n.Kd(i),St(t)})}else St(t)}function Tt(t){return void 0!==t.uf||void 0!==t.cf}function St(t){void 0!==t.uf&&(t.uf.Kd(t.qd),t.uf=void 0);var i=t.ef;void 0!==i&&Gt(i,t.qd)}function Et(t,i){var n=t.ef;void 0!==n&&i!==t.lf&&(!0===i?function(t){Yt(t)}(n):Zt(n)),t.lf=i}var It=function(){function t(t){if(!1===mt(t))throw new _("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===yt(t))throw new _("This stream has already been locked for exclusive writing by another writer");this.mf=t,t.ef=this;var i=t.Ra;if("writable"===i)!1===Tt(t)&&!0===t.lf?Yt(this):Kt(this),qt(this);else if("erroring"===i)$t(this,t.qd),qt(this);else if("closed"===i)Kt(this),function(t){qt(t),Qt(t)}(this);else{var n=t.qd;$t(this,n),Xt(this,n)}}return b.defineProperty(t.prototype,"closed",{get:function(){return!1===Rt(this)?R(Wt("closed")):this.zd},enumerable:!0,configurable:!0}),b.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Rt(this))throw Wt("desiredSize");if(void 0===this.mf)throw zt("desiredSize");return function(t){var i=t.mf,n=i.Ra;return"errored"===n||"erroring"===n?null:"closed"===n?0:Lt(i.nf)}(this)},enumerable:!0,configurable:!0}),b.defineProperty(t.prototype,"ready",{get:function(){return!1===Rt(this)?R(Wt("ready")):this.wf},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Rt(this)?R(Wt("abort")):void 0===this.mf?R(zt("abort")):function(t,i){var n=t.mf;return pt(n,i)}(this,t)},t.prototype.close=function(){if(!1===Rt(this))return R(Wt("close"));var t=this.mf;return void 0===t?R(zt("close")):!0===Tt(t)?R(new _("Cannot close an already-closing stream")):Ct(this)},t.prototype.releaseLock=function(){if(!1===Rt(this))throw Wt("releaseLock");void 0!==this.mf&&Dt(this)},t.prototype.write=function(t){return!1===Rt(this)?R(Wt("write")):void 0===this.mf?R(zt("write to")):xt(this,t)},t}();function Rt(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"mf")}function Ct(t){return _t(t.mf)}function Pt(t,i){"pending"===t.yf?Gt(t,i):function(t,i){Xt(t,i)}(t,i)}function Nt(t,i){"pending"===t.Af?Jt(t,i):function(t,i){$t(t,i)}(t,i)}function Dt(t){var i=t.mf,n=new _("Writer was released and can no longer be used to monitor the stream's closedness");Nt(t,n),Pt(t,n),i.ef=void 0,t.mf=void 0}function xt(t,i){var n=t.mf,r=n.nf,e=function(t,i){try{return t.bf(i)}catch(i){return Ut(t,i),1}}(r,i);if(n!==t.mf)return R(zt("write to"));var s=n.Ra;if("errored"===s)return R(n.qd);if(!0===Tt(n)||"closed"===s)return R(new _("The stream is closing or closed and cannot be written to"));if("erroring"===s)return R(n.qd);var u=function(t){return S(function(i,n){var r={Qd:i,Kd:n};t.rf.push(r)})}(n);return function(t,i,n){var r={chunk:i};try{ct(t,r,n)}catch(i){return void Ut(t,i)}var e=t.Sf;!1===Tt(e)&&"writable"===e.Ra&&Et(e,Vt(t)),Ft(t)}(r,i,e),u}var Bt=function(){function t(){throw new _("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Sf")}(this))throw new _("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.Sf.Ra&&jt(this,t)},t.prototype[vt]=function(t){var i=this.Tf(t);return Mt(this),i},t.prototype[dt]=function(){ft(this)},t}();function Ot(t,i,n,r,e,s,u,o){i.Sf=t,t.nf=i,i.tf=void 0,i.if=void 0,ft(i),i.pf=!1,i.bf=o,i.kf=u,i.Ef=r,i.Pf=e,i.Tf=s;var h=Vt(i);Et(t,h),P(E(n()),function(){i.pf=!0,Ft(i)},function(n){i.pf=!0,kt(t,n)})}function Mt(t){t.Ef=void 0,t.Pf=void 0,t.Tf=void 0,t.bf=void 0}function Lt(t){return t.kf-t.if}function Ft(t){var i=t.Sf;if(!1!==t.pf&&void 0===i.hf)if("erroring"!==i.Ra){if(0!==t.tf.length){var n=function(t){return t.tf.peek().value}(t);"close"===n?function(t){var i=t.Sf;(function(t){t.cf=t.uf,t.uf=void 0})(i),at(t);var n=t.Pf();Mt(t),P(n,function(){!function(t){t.cf.Qd(void 0),t.cf=void 0,"erroring"===t.Ra&&(t.qd=void 0,void 0!==t.df&&(t.df.Qd(),t.df=void 0)),t.Ra="closed";var i=t.ef;void 0!==i&&Qt(i)}(i)},function(t){!function(t,i){t.cf.Kd(i),t.cf=void 0,void 0!==t.df&&(t.df.Kd(i),t.df=void 0),kt(t,i)}(i,t)})}(t):function(t,i){var n=t.Sf;!function(t){t.hf=t.rf.shift()}(n);var r=t.Ef(i);P(r,function(){!function(t){t.hf.Qd(void 0),t.hf=void 0}(n);var i=n.Ra;if(at(t),!1===Tt(n)&&"writable"===i){var r=Vt(t);Et(n,r)}Ft(t)},function(i){"writable"===n.Ra&&Mt(t),function(t,i){t.hf.Kd(i),t.hf=void 0,kt(t,i)}(n,i)})}(t,n.chunk)}}else At(i)}function Ut(t,i){"writable"===t.Sf.Ra&&jt(t,i)}function Vt(t){return Lt(t)<=0}function jt(t,i){var n=t.Sf;Mt(t),bt(n,i)}function Ht(t){return new _("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Wt(t){return new _("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function zt(t){return new _("Cannot "+t+" a stream using a released writer")}function qt(t){t.zd=S(function(i,n){t.Gd=i,t.Xd=n,t.yf="pending"})}function Xt(t,i){qt(t),Gt(t,i)}function Gt(t,i){B(t.zd),t.Xd(i),t.Gd=void 0,t.Xd=void 0,t.yf="rejected"}function Qt(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0,t.yf="resolved"}function Yt(t){t.wf=S(function(i,n){t.xf=i,t.If=n}),t.Af="pending"}function $t(t,i){Yt(t),Jt(t,i)}function Kt(t){Yt(t),Zt(t)}function Jt(t,i){B(t.wf),t.If(i),t.xf=void 0,t.If=void 0,t.Af="rejected"}function Zt(t){t.xf(void 0),t.xf=void 0,t.If=void 0,t.Af="fulfilled"}function ti(t){if("object"!==(void 0===t?"undefined":W(t))||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var ii,ni="undefined"!=typeof DOMException?DOMException:void 0,ri=function(t){if("function"!=typeof t&&"object"!==(void 0===t?"undefined":W(t)))return!1;try{return new t,!0}catch(t){return!1}}(ni)?ni:((ii=function(t,i){this.message=t||"",this.name=i||"Error",p.captureStackTrace&&p.captureStackTrace(this,this.constructor)}).prototype=b.create(p.prototype),b.defineProperty(ii.prototype,"constructor",{value:ii,writable:!0,configurable:!0}),ii);function ei(t,i,n,r,s,u){var o=Q(t),h=gt(i);t.Jd=!0;var a=!1,c=E(void 0);return S(function(f,v){var d,l,g,w;if(void 0!==u){if(d=function(){var n=new ri("Aborted","AbortError"),e=[];!1===r&&e.push(function(){return"writable"===i.Ra?pt(i,n):E(void 0)}),!1===s&&e.push(function(){return"readable"===t.Ra?$i(t,n):E(void 0)}),k(function(){return ot.all(e.map(function(t){return t()}))},!0,n)},!0===u.aborted)return void d();u.addEventListener("abort",d)}if(p(t,o.zd,function(t){!1===r?k(function(){return pt(i,t)},!0,t):b(!0,t)}),p(i,h.zd,function(i){!1===s?k(function(){return $i(t,i)},!0,i):b(!0,i)}),l=t,g=o.zd,w=function(){!1===n?k(function(){return function(t){var i=t.mf,n=i.Ra;return!0===Tt(i)||"closed"===n?E(void 0):"errored"===n?R(i.qd):Ct(t)}(h)}):b()},"closed"===l.Ra?w():N(g,w),!0===Tt(i)||"closed"===i.Ra){var m=new _("the destination writable stream closed before all data could be piped to it");!1===s?k(function(){return $i(t,m)},!0,m):b(!0,m)}function y(){var t=c;return C(c,function(){return t!==c?y():void 0})}function p(t,i,n){"errored"===t.Ra?n(t.qd):D(i,n)}function k(t,n,r){function e(){P(t(),function(){return A(n,r)},function(t){return A(!0,t)})}!0!==a&&(a=!0,"writable"===i.Ra&&!1===Tt(i)?N(y(),e):e())}function b(t,n){!0!==a&&(a=!0,"writable"===i.Ra&&!1===Tt(i)?N(y(),function(){return A(t,n)}):A(t,n))}function A(t,i){Dt(h),U(o),void 0!==u&&u.removeEventListener("abort",d),t?v(i):f(void 0)}B(S(function(t,i){!function n(r){r?t():C(!0===a?E(!0):C(h.wf,function(){return C(rt(o),function(t){return!0===t.done||(c=C(xt(h,t.value),void 0,e),!1)})}),n,i)}(!1)}))})}var si=function(){function t(){throw new _}return b.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===ui(this))throw wi("desiredSize");return di(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===ui(this))throw wi("close");if(!1===li(this))throw new _("The stream is not in a state that permits close");ci(this)},t.prototype.enqueue=function(t){if(!1===ui(this))throw wi("enqueue");if(!1===li(this))throw new _("The stream is not in a state that permits enqueue");return fi(this,t)},t.prototype.error=function(t){if(!1===ui(this))throw wi("error");vi(this,t)},t.prototype[X]=function(t){ft(this);var i=this.Rf(t);return ai(this),i},t.prototype[G]=function(){var t=this.Cf;if(this.tf.length>0){var i=at(this);return!0===this.Df&&0===this.tf.length?(ai(this),Ki(t)):oi(this),E(M(i,!1,t.Wd.Vd))}var n=Y(t);return oi(this),n},t}();function ui(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Cf")}function oi(t){!1!==hi(t)&&(!0!==t.Bf?(t.Bf=!0,P(t.Nf(),function(){t.Bf=!1,!0===t.Mf&&(t.Mf=!1,oi(t))},function(i){vi(t,i)})):t.Mf=!0)}function hi(t){var i=t.Cf;return!1!==li(t)&&!1!==t.pf&&(!0===Yi(i)&&K(i)>0||di(t)>0)}function ai(t){t.Nf=void 0,t.Rf=void 0,t.bf=void 0}function ci(t){var i=t.Cf;t.Df=!0,0===t.tf.length&&(ai(t),Ki(i))}function fi(t,i){var n=t.Cf;if(!0===Yi(n)&&K(n)>0)$(n,i,!1);else{var r=void 0;try{r=t.bf(i)}catch(i){throw vi(t,i),i}try{ct(t,i,r)}catch(i){throw vi(t,i),i}}oi(t)}function vi(t,i){var n=t.Cf;"readable"===n.Ra&&(ft(t),ai(t),Ji(n,i))}function di(t){var i=t.Cf.Ra;return"errored"===i?null:"closed"===i?0:t.kf-t.if}function li(t){var i=t.Cf.Ra;return!1===t.Df&&"readable"===i}function gi(t,i,n,r,e,s,u){i.Cf=t,i.tf=void 0,i.if=void 0,ft(i),i.pf=!1,i.Df=!1,i.Mf=!1,i.Bf=!1,i.bf=u,i.kf=s,i.Nf=r,i.Rf=e,t.Zd=i,P(E(n()),function(){i.pf=!0,oi(i)},function(t){vi(i,t)})}function wi(t){return new _("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var mi=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&A.floor(t)===t},yi=function(){function t(){throw new _("ReadableStreamBYOBRequest cannot be used directly")}return b.defineProperty(t.prototype,"view",{get:function(){if(!1===ki(this))throw Li("view");return this.Lf},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===ki(this))throw Li("respond");if(void 0===this.Of)throw new _("This BYOB request has been invalidated");this.Lf.buffer,function(t,i){if(!1===c(i=Number(i)))throw new RangeError("bytesWritten must be a finite");Ni(t,i)}(this.Of,t)},t.prototype.respondWithNewView=function(t){if(!1===ki(this))throw Li("respond");if(void 0===this.Of)throw new _("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new _("You can only respond with array buffer views");t.buffer,function(t,i){var n=t.Ff.peek();if(n.byteOffset+n.bytesFilled!==i.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(n.byteLength!==i.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");n.buffer=i.buffer,Ni(t,i.byteLength)}(this.Of,t)},t}(),pi=function(){function t(){throw new _("ReadableByteStreamController constructor cannot be used directly")}return b.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===_i(this))throw Fi("byobRequest");if(void 0===this.Uf&&this.Ff.length>0){var t=this.Ff.peek(),i=new I(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=b.create(yi.prototype);!function(t,i,n){t.Of=i,t.Lf=n}(n,this,i),this.Uf=n}return this.Uf},enumerable:!0,configurable:!0}),b.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===_i(this))throw Fi("desiredSize");return Oi(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===_i(this))throw Fi("close");if(!0===this.Df)throw new _("The stream has already been closed; do not close it again!");var t=this.Vf.Ra;if("readable"!==t)throw new _("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var i=t.Vf;if(t.if>0)t.Df=!0;else{if(t.Ff.length>0&&t.Ff.peek().bytesFilled>0){var n=new _("Insufficient bytes to fill elements in the given buffer");throw Bi(t,n),n}xi(t),Ki(i)}}(this)},t.prototype.enqueue=function(t){if(!1===_i(this))throw Fi("enqueue");if(!0===this.Df)throw new _("stream is closed or draining");var i=this.Vf.Ra;if("readable"!==i)throw new _("The stream (in "+i+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new _("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,i){var n=t.Vf,r=i.buffer,e=i.byteOffset,s=i.byteLength,u=r;!0===J(n)?0===K(n)?Si(t,u,e,s):$(n,new I(u,e,s),!1):!0===ji(n)?(Si(t,u,e,s),Pi(t)):Si(t,u,e,s),bi(t)}(this,t)},t.prototype.error=function(t){if(!1===_i(this))throw Fi("error");Bi(this,t)},t.prototype[X]=function(t){this.Ff.length>0&&(this.Ff.peek().bytesFilled=0),ft(this);var i=this.Rf(t);return xi(this),i},t.prototype[G]=function(){var t=this.Vf;if(this.if>0){var i=this.tf.shift();this.if-=i.byteLength,Ri(this);var n=void 0;try{n=new I(i.buffer,i.byteOffset,i.byteLength)}catch(t){return R(t)}return E(M(n,!1,t.Wd.Vd))}var r=this.Hf;if(void 0!==r){var e=void 0;try{e=new ArrayBuffer(r)}catch(t){return R(t)}var s={buffer:e,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,ctor:I,readerType:"default"};this.Ff.push(s)}var u=Y(t);return bi(this),u},t}();function _i(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Vf")}function ki(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Of")}function bi(t){var i=function(t){var i=t.Vf;if("readable"!==i.Ra)return!1;if(!0===t.Df)return!1;if(!1===t.pf)return!1;if(!0===J(i)&&K(i)>0)return!0;if(!0===ji(i)&&Vi(i)>0)return!0;var n=Oi(t);return n>0}(t);!1!==i&&(!0!==t.Bf?(t.Bf=!0,P(t.Nf(),function(){t.Bf=!1,!0===t.Mf&&(t.Mf=!1,bi(t))},function(i){Bi(t,i)})):t.Mf=!0)}function Ai(t,i){var n=!1;"closed"===t.Ra&&(n=!0);var r=Ti(i);"default"===i.readerType?$(t,r,n):function(t,i,n){var r=t.Wd,e=r.Wf.shift();e.Qd(M(i,n,r.Vd))}(t,r,n)}function Ti(t){var i=t.bytesFilled,n=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,i/n)}function Si(t,i,n,r){t.tf.push({buffer:i,byteOffset:n,byteLength:r}),t.if+=r}function Ei(t,i){var n=i.elementSize,r=i.bytesFilled-i.bytesFilled%n,e=A.min(t.if,i.byteLength-i.bytesFilled),s=i.bytesFilled+e,u=s-s%n,o=e,h=!1;u>r&&(o=u-i.bytesFilled,h=!0);for(var c=t.tf;o>0;){var f=c.peek(),v=A.min(o,f.byteLength),d=i.byteOffset+i.bytesFilled;a(i.buffer,d,f.buffer,f.byteOffset,v),f.byteLength===v?c.shift():(f.byteOffset+=v,f.byteLength-=v),t.if-=v,Ii(t,v,i),o-=v}return h}function Ii(t,i,n){Ci(t),n.bytesFilled+=i}function Ri(t){0===t.if&&!0===t.Df?(xi(t),Ki(t.Vf)):bi(t)}function Ci(t){void 0!==t.Uf&&(t.Uf.Of=void 0,t.Uf.Lf=void 0,t.Uf=void 0)}function Pi(t){for(;t.Ff.length>0;){if(0===t.if)return;var i=t.Ff.peek();!0===Ei(t,i)&&(Di(t),Ai(t.Vf,i))}}function Ni(t,i){var n=t.Ff.peek();if("closed"===t.Vf.Ra){if(0!==i)throw new _("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,i){i.buffer=i.buffer;var n=t.Vf;if(!0===ji(n))for(;Vi(n)>0;)Ai(n,Di(t))}(t,n)}else!function(t,i,n){if(n.bytesFilled+i>n.byteLength)throw new RangeError("bytesWritten out of range");if(Ii(t,i,n),!(n.bytesFilled0){var e=n.byteOffset+n.bytesFilled,s=n.buffer.slice(e-r,e);Si(t,s,0,s.byteLength)}n.buffer=n.buffer,n.bytesFilled-=r,Ai(t.Vf,n),Pi(t)}}(t,i,n);bi(t)}function Di(t){var i=t.Ff.shift();return Ci(t),i}function xi(t){t.Nf=void 0,t.Rf=void 0}function Bi(t,i){var n=t.Vf;"readable"===n.Ra&&(function(t){Ci(t),t.Ff=new O}(t),ft(t),xi(t),Ji(n,i))}function Oi(t){var i=t.Vf.Ra;return"errored"===i?null:"closed"===i?0:t.kf-t.if}function Mi(t,i,n){var r=b.create(pi.prototype),e=v(i,"pull",0,[r]),s=v(i,"cancel",1,[]),u=i.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===mi(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,i,n,r,e,s,u){i.Vf=t,i.Mf=!1,i.Bf=!1,i.Uf=void 0,i.tf=i.if=void 0,ft(i),i.Df=!1,i.pf=!1,i.kf=g(s),i.Nf=r,i.Rf=e,i.Hf=u,i.Ff=new O,t.Zd=i,P(E(n()),function(){i.pf=!0,bi(i)},function(t){Bi(i,t)})}(t,r,function(){return d(i,"start",[r])},e,s,n,u)}function Li(t){return new _("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Fi(t){return new _("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Ui(t){return S(function(i,n){var r={Qd:i,Kd:n};t.Wd.Wf.push(r)})}function Vi(t){return t.Wd.Wf.length}function ji(t){var i=t.Wd;return void 0!==i&&!!Wi(i)}var Hi=function(){function t(t){if(!Qi(t))throw new _("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===_i(t.Zd))throw new _("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Yi(t))throw new _("This stream has already been locked for exclusive reading by another reader");L(this,t),this.Wf=new O}return b.defineProperty(t.prototype,"closed",{get:function(){return Wi(this)?this.zd:R(zi("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Wi(this)?void 0===this.Hd?R(V("cancel")):F(this,t):R(zi("cancel"))},t.prototype.read=function(t){return Wi(this)?void 0===this.Hd?R(V("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?R(new _("view must have non-zero byteLength")):function(t,i){var n=t.Hd;return n.Jd=!0,"errored"===n.Ra?R(n.qd):function(t,i){var n=t.Vf,r=1;i.constructor!==DataView&&(r=i.constructor.BYTES_PER_ELEMENT);var e=i.constructor,s={buffer:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength,bytesFilled:0,elementSize:r,ctor:e,readerType:"byob"};if(t.Ff.length>0)return t.Ff.push(s),Ui(n);if("closed"===n.Ra)return E(M(new e(s.buffer,s.byteOffset,0),!0,n.Wd.Vd));if(t.if>0){if(!0===Ei(t,s)){var u=Ti(s);return Ri(t),E(M(u,!1,n.Wd.Vd))}if(!0===t.Df){var o=new _("Insufficient bytes to fill elements in the given buffer");return Bi(t,o),R(o)}}t.Ff.push(s);var h=Ui(n);return bi(t),h}(n.Zd,i)}(this,t)):R(new _("view must be an array buffer view")):R(zi("read"))},t.prototype.releaseLock=function(){if(!Wi(this))throw zi("releaseLock");if(void 0!==this.Hd){if(this.Wf.length>0)throw new _("Tried to release a reader lock when that reader has pending read() calls un-settled");U(this)}},t}();function Wi(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Wf")}function zi(t){return new _("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var qi=function(){function t(t,i){void 0===t&&(t={}),void 0===i&&(i={}),Gi(this);var n=i.size,r=i.highWaterMark,e=t.type;if("bytes"===String(e)){if(void 0!==n)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===r&&(r=0),Mi(this,t,r=g(r))}else{if(void 0!==e)throw new RangeError("Invalid type is specified");var s=w(n);void 0===r&&(r=1),function(t,i,n,r){var e=b.create(si.prototype),s=v(i,"pull",0,[e]),u=v(i,"cancel",1,[]);gi(t,e,function(){return d(i,"start",[e])},s,u,n,r)}(this,t,r=g(r),s)}}return b.defineProperty(t.prototype,"locked",{get:function(){if(!1===Qi(this))throw Zi("locked");return Yi(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Qi(this)?R(Zi("cancel")):!0===Yi(this)?R(new _("Cannot cancel a stream that already has a reader")):$i(this,t)},t.prototype.getReader=function(t){var i=(void 0===t?{}:t).mode;if(!1===Qi(this))throw Zi("getReader");if(void 0===i)return Q(this,!0);if("byob"===(i=String(i)))return function(t,i){void 0===i&&(i=!1);var n=new Hi(t);return n.Vd=i,n}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,i){var n=t.writable,r=t.readable,e=void 0===i?{}:i,s=e.preventClose,u=e.preventAbort,o=e.preventCancel,h=e.signal;if(!1===Qi(this))throw Zi("pipeThrough");if(!1===mt(n))throw new _("writable argument to pipeThrough must be a WritableStream");if(!1===Qi(r))throw new _("readable argument to pipeThrough must be a ReadableStream");if(s=Boolean(s),u=Boolean(u),o=Boolean(o),void 0!==h&&!ti(h))throw new _("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Yi(this))throw new _("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===yt(n))throw new _("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return B(ei(this,n,s,u,o,h)),r},t.prototype.pipeTo=function(t,i){var n=void 0===i?{}:i,r=n.preventClose,e=n.preventAbort,s=n.preventCancel,u=n.signal;return!1===Qi(this)?R(Zi("pipeTo")):!1===mt(t)?R(new _("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(r=Boolean(r),e=Boolean(e),s=Boolean(s),void 0===u||ti(u)?!0===Yi(this)?R(new _("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===yt(t)?R(new _("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):ei(this,t,r,e,s,u):R(new _("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Qi(this))throw Zi("tee");var t=function(t){var i,n,r,e,s,u=Q(t),o=!1,a=!1,c=!1,f=S(function(t){s=t});function v(){return!0===o||(o=!0,B(x(rt(u),function(t){if(o=!1,!0===t.done)return!1===a&&ci(r.Zd),void(!1===c&&ci(e.Zd));var i=t.value,n=i,s=i;!1===a&&fi(r.Zd,n),!1===c&&fi(e.Zd,s)}))),E(void 0)}function d(){}return r=Xi(d,v,function(r){if(a=!0,i=r,!0===c){var e=h([i,n]),u=$i(t,e);s(u)}return f}),e=Xi(d,v,function(r){if(c=!0,n=r,!0===a){var e=h([i,n]),u=$i(t,e);s(u)}return f}),D(u.zd,function(t){vi(r.Zd,t),vi(e.Zd,t)}),[r,e]}(this);return h(t)},t.prototype.getIterator=function(t){var i=(void 0===t?{}:t).preventCancel,n=void 0!==i&&i;if(!1===Qi(this))throw Zi("getIterator");return function(t,i){void 0===i&&(i=!1);var n=Q(t),r=b.create(st);return r.$d=n,r.ul=Boolean(i),r}(this,n)},t}();function Xi(t,i,n,r,e){void 0===r&&(r=1),void 0===e&&(e=function(){return 1});var s=b.create(qi.prototype);return Gi(s),gi(s,b.create(si.prototype),t,i,n,r,e),s}function Gi(t){t.Ra="readable",t.Wd=void 0,t.qd=void 0,t.Jd=!1}function Qi(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Zd")}function Yi(t){return void 0!==t.Wd}function $i(t,i){return t.Jd=!0,"closed"===t.Ra?E(void 0):"errored"===t.Ra?R(t.qd):(Ki(t),x(t.Zd[X](i),e))}function Ki(t){t.Ra="closed";var i=t.Wd;void 0!==i&&(nt(i)&&(i.Yd.forEach(function(t){t.Qd(M(void 0,!0,i.Vd))}),i.Yd=new O),q(i))}function Ji(t,i){t.Ra="errored",t.qd=i;var n=t.Wd;void 0!==n&&(nt(n)?(n.Yd.forEach(function(t){t.Kd(i)}),n.Yd=new O):(n.Wf.forEach(function(t){t.Kd(i)}),n.Wf=new O),z(n,i))}function Zi(t){return new _("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"===W(n.asyncIterator)&&b.defineProperty(qi.prototype,n.asyncIterator,{value:qi.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var tn=function(){function t(t){var i=t.highWaterMark;this.highWaterMark=i}return t.prototype.size=function(t){return t.byteLength},t}(),nn=function(){function t(t){var i=t.highWaterMark;this.highWaterMark=i}return t.prototype.size=function(){return 1},t}(),rn=function(){function t(t,i,n){void 0===t&&(t={}),void 0===i&&(i={}),void 0===n&&(n={});var r=i.size,e=i.highWaterMark,s=n.size,u=n.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var o=w(r);if(void 0===e&&(e=1),e=g(e),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var h,a=w(s);void 0===u&&(u=0),u=g(u),function(t,i,n,r,e,s){function u(){return i}function o(i){return function(t,i){var n=t.qf;return!0===t.lf?x(t.zf,function(){var r=t.Gf;if("erroring"===r.Ra)throw r.qd;return vn(n,i)}):vn(n,i)}(t,i)}function h(i){return function(t,i){return sn(t,i),E(void 0)}(t,i)}function a(){return function(t){var i=t.Xf,n=t.qf,r=n.jf();return cn(n),x(r,function(){if("errored"===i.Ra)throw i.qd;var t=i.Zd;!0===li(t)&&ci(t)},function(n){throw sn(t,n),i.qd})}(t)}function c(){return function(t){return on(t,!1),t.zf}(t)}function f(i){return un(t,i),E(void 0)}t.Gf=function(t,i,n,r,e,s){void 0===e&&(e=1),void 0===s&&(s=function(){return 1});var u=b.create(lt.prototype);return wt(u),Ot(u,b.create(Bt.prototype),t,i,n,r,e,s),u}(u,o,a,h,n,r),t.Xf=Xi(u,c,f,e,s),t.lf=void 0,t.zf=void 0,t.Qf=void 0,on(t,!0),t.qf=void 0}(this,S(function(t){h=t}),e,o,u,a),function(t,i){var n=b.create(hn.prototype),r=function(t){try{return fn(n,t),E(void 0)}catch(t){return R(t)}},e=i.transform;if(void 0!==e){if("function"!=typeof e)throw new _("transform is not a method");r=function(t){return l(e,i,[t,n])}}var s=v(i,"flush",0,[n]);!function(t,i,n,r){i.Kf=t,t.qf=i,i.Yf=n,i.jf=r}(t,n,r,s)}(this,t);var c=d(t,"start",[this.qf]);h(c)}return b.defineProperty(t.prototype,"readable",{get:function(){if(!1===en(this))throw ln("readable");return this.Xf},enumerable:!0,configurable:!0}),b.defineProperty(t.prototype,"writable",{get:function(){if(!1===en(this))throw ln("writable");return this.Gf},enumerable:!0,configurable:!0}),t}();function en(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"qf")}function sn(t,i){vi(t.Xf.Zd,i),un(t,i)}function un(t,i){cn(t.qf),Ut(t.Gf.nf,i),!0===t.lf&&on(t,!1)}function on(t,i){void 0!==t.zf&&t.Qf(),t.zf=S(function(i){t.Qf=i}),t.lf=i}var hn=function(){function t(){throw new _("TransformStreamDefaultController instances cannot be created directly")}return b.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===an(this))throw dn("desiredSize");return di(this.Kf.Xf.Zd)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===an(this))throw dn("enqueue");fn(this,t)},t.prototype.error=function(t){if(!1===an(this))throw dn("error");!function(t,i){sn(t.Kf,i)}(this,t)},t.prototype.terminate=function(){if(!1===an(this))throw dn("terminate");!function(t){var i=t.Kf,n=i.Xf.Zd;!0===li(n)&&ci(n);var r=new _("TransformStream terminated");un(i,r)}(this)},t}();function an(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Kf")}function cn(t){t.Yf=void 0,t.jf=void 0}function fn(t,i){var n=t.Kf,r=n.Xf.Zd;if(!1===li(r))throw new _("Readable side is not in a state that permits enqueue");try{fi(r,i)}catch(t){throw un(n,t),n.Xf.qd}var e=function(t){return!0!==hi(t)}(r);e!==n.lf&&on(n,!0)}function vn(t,i){return x(t.Yf(i),void 0,function(i){throw sn(t.Kf,i),i})}function dn(t){return new _("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function ln(t){return new _("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=tn,t.CountQueuingStrategy=nn,t.ReadableStream=qi,t.TransformStream=rn,t.WritableStream=lt,b.defineProperty(t,"__esModule",{value:!0})},"object"===(void 0===t?"undefined":W(t))&&void 0!==n?s(t):"function"==typeof define&&define.amd?define(["exports"],s):s((e=e||self).WebStreamsPolyfill={})}),Kt=L(function(t){function i(){var t=$t();return i=function(){return t},t}V(),It(),b.defineProperty(t,"__esModule",{value:!0}),function(t,i){for(var n in i)b.defineProperty(t,n,{enumerable:!0,get:b.getOwnPropertyDescriptor(i,n).get})}(t,{get ByteLengthQueuingStrategy(){return i().ByteLengthQueuingStrategy},get CountQueuingStrategy(){return i().CountQueuingStrategy},get ReadableStream(){return i().ReadableStream},get TransformStream(){return i().TransformStream},get WritableStream(){return i().WritableStream}})});function Jt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Jt=function(){return!!t})()}var Zt=M(function(){V(),It()});function ti(t,i,n){return(ti=Jt()?Reflect.construct:function(t,i,n){var r=[null];r.push.apply(r,i);var e=new(Function.bind.apply(t,r));return n&&Rt(e,n.prototype),e}).apply(null,arguments)}var ii=M(function(){V(),It(),Zt(),Ct()});function ni(t){return(ni=b.setPrototypeOf?b.getPrototypeOf:function(t){return t.__proto__||b.getPrototypeOf(t)})(t)}var ri=M(function(){V(),It()});var ei=M(function(){V(),It()});function si(t){var i="function"==typeof Map?new Map:void 0;return si=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new _("Super expression must either be null or a function");if(void 0!==i){if(i.has(t))return i.get(t);i.set(t,n)}function n(){return ti(t,arguments,ni(this).constructor)}return n.prototype=b.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Rt(n,t)},si(t)}var ui,oi=M(function(){V(),It(),ii(),ri(),ei(),Ct()}),hi=L(function(t,r){var e,s;V(),It(),Wt(),Bt(),Nt(),H(),ft(),oi(),Ut(),Yt(),e=t,s=function(t){var r,e=b.defineProperty,s=b.defineProperties,u=b.getOwnPropertyDescriptors,o=b.getOwnPropertySymbols,h=b.prototype.hasOwnProperty,a=b.prototype.propertyIsEnumerable,c=function(t,i,n){return i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[i]=n},d=function(t,i){for(var n in i||(i={}))h.call(i,n)&&c(t,n,i[n]);if(o)for(var r,e=Ft(o(i));!(r=e()).done;)n=r.value,a.call(i,n)&&c(t,n,i[n]);return t},w=function(t,i){return s(t,u(i))},k=function(t,i){var n={};for(var r in t)h.call(t,r)&&i.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&o)for(var e,s=Ft(o(t));!(e=s()).done;)r=e.value,i.indexOf(r)<0&&a.call(t,r)&&(n[r]=t[r]);return n},S=("undefined"==typeof globalThis?"undefined":W(globalThis))<"u"?globalThis:(void 0===f?"undefined":W(f))<"u"?f:("undefined"==typeof global?"undefined":W(global))<"u"?global:("undefined"==typeof self?"undefined":W(self))<"u"?self:{};function C(t){return t&&t.__esModule&&b.prototype.hasOwnProperty.call(t,"default")?t.default:t}var P,N,D={exports:{}},x=(P||(P=1,N=D,function(t){var i,n={VERSION:"1.6.1"},r={},e=function(t,i){return function(){return i.apply(t,arguments)}},s=function(){var t,i,n=arguments,r=n[0];for(i=1;i=i.value},trace:function(){this.invoke(n.TRACE,arguments)},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},time:function(t){"string"==typeof t&&t.length>0&&this.invoke(n.TIME,[t,"start"])},timeEnd:function(t){"string"==typeof t&&t.length>0&&this.invoke(n.TIME,[t,"end"])},invoke:function(t,n){i&&this.enabledFor(t)&&i(n,s({level:t},this.context))}};var h,a=new o({filterLevel:n.OFF});(h=n).enabledFor=e(a,a.enabledFor),h.trace=e(a,a.trace),h.debug=e(a,a.debug),h.time=e(a,a.time),h.timeEnd=e(a,a.timeEnd),h.info=e(a,a.info),h.warn=e(a,a.warn),h.error=e(a,a.error),h.log=h.info,n.setHandler=function(t){i=t},n.setLevel=function(t){for(var i in a.setLevel(t),r)r.hasOwnProperty(i)&&r[i].setLevel(t)},n.getLevel=function(){return a.getLevel()},n.get=function(t){return r[t]||(r[t]=new o(s({name:t},a.context)))},n.createDefaultHandler=function(t){(t=t||{}).formatter=t.formatter||function(t,i){i.name&&t.unshift("["+i.name+"]")};var i={},r=function(t,i){Function.prototype.apply.call(t,console,i)};return("undefined"==typeof console?"undefined":W(console))>"u"?function(){}:function(e,s){e=Array.prototype.slice.call(e);var u,o=console.log;s.level===n.TIME?(u=(s.name?"["+s.name+"] ":"")+e[0],"start"===e[1]?console.time?console.time(u):i[u]=(new Date).getTime():console.timeEnd?console.timeEnd(u):r(o,[u+": "+((new Date).getTime()-i[u])+"ms"])):(s.level===n.WARN&&console.warn?o=console.warn:s.level===n.ERROR&&console.error?o=console.error:s.level===n.INFO&&console.info?o=console.info:s.level===n.DEBUG&&console.debug?o=console.debug:s.level===n.TRACE&&console.trace&&(o=console.trace),t.formatter(e,s),r(o,e))}},n.useDefaults=function(t){n.setLevel(t&&t.defaultLevel||n.DEBUG),n.setHandler(n.createDefaultHandler(t))},n.setDefaults=n.useDefaults,N.exports?N.exports=n:(n.Jf=t.Logger,n.noConflict=function(){return t.Logger=n.Jf,n},t.Logger=n)}(D.exports)),D.exports),B=C(x),O="0.6.0",M=(null==(r=null==f?void 0:f.navigator)?void 0:r.userAgent)||"No user agent available",L="",F="",U="",V="",H="",z="",q="",X=0,G=[],Q=function(t){L=""===L?t:L},Y=function(t){F=""===F?t:F},K=function(t){U=""===U?t:U},J=function(t){V=""===V?t:V},Z=function(t){H=""===H?t:H},tt=function(t){X=0===X?t:X},it=function(t){z=t},nt=function(t){q=""===q?t:q},rt=function(t){60===G.length&&G.shift(),G.push(t)},et=function(t,i){var n;void 0===t&&(t=60),void 0===i&&(i="JSON"),n=!Number.isInteger(t)||t>60||t<=0?60:t;var r={client:"@millicast/millicast-sdk",version:O,timestamp:(new Date).toISOString(),userAgent:M,clusterId:q,accountId:L,streamName:F,subscriberId:U,connection:z,stats:G.slice(-n),connectionDurationMs:(new Date).getTime()-X};return""!==H?r.feedId=H:""!==V&&(r.streamViewId=V),"CMCD"===i?function(t){function i(t,i){return{ts:A.round(i.timestamp)||"",ot:"audio"===t?"a":"v",bl:i.jitterBufferDelay||0,br:A.round(i.bitrateBitsPerSecond||0),pld:i.packetsLostDeltaPerSecond||0,j:i.jitter||0,mtp:i.packetRate||0,mid:i.mid||"",mimeType:i.mimeType||""}}return t.stats=t.stats.reduce(function(t,n){var r=0!==n.audio.inbounds.length?n.audio.inbounds.map(function(t){return i("audio",t)}):n.audio.outbounds.map(function(t){return i("audio",t)}),e=0!==n.video.inbounds.length?n.video.inbounds.map(function(t){return i("video",t)}):n.video.outbounds.map(function(t){return i("video",t)});return t.concat([].concat(r,e))},[]),t}(r):r};B.useDefaults({defaultLevel:B.TRACE});var st=["TRACE","DEBUG","INFO","WARN","ERROR"],ut=function(t,i){t.unshift("[".concat(i.name||"Global","] ").concat((new Date).toISOString()," - ").concat(i.level.name," -"))},ht=function(t,i){return i?t.value>=lt[i].value:t.value>=dt.value},at=B.createDefaultHandler({formatter:ut});B.setHandler(function(t,i){(function(t,i){t=(t=Array.prototype.slice.call(t)).map(function(t){return"object"==(void 0===t?"undefined":W(t))?JSON.stringify(t):t}),ut(t,i),0!==ft?(vt.push(t.join(" ")),vt.length>=ft&&(vt=vt.slice(-ft))):vt=[]})(t,i),ht(i.level,i.name)&&at(t,i);for(var n,r=Ft(gt);!(n=r()).done;){var e=n.value,s=e.handler,u=e.level;i.level.value>=u.value&&s(t,i)}});var ct,ft=1e4,vt=[],dt=B.OFF,lt={},gt=[],wt=w(d({},B),{enabledFor:ht,getHistory:function(){return vt},getHistoryMaxSize:function(){return ft},setHistoryMaxSize:function(t){ft=t},setLevel:function(t){for(var i in dt=t,lt)lt[i]=t},getLevel:function(){return dt},get:function(t){lt[t]||(lt[t]=dt);var i=B.get(t);return i.setLevel=function(i){lt[t]=i},i.getLevel=function(){return lt[t]},i},setHandler:function(t,i){gt.push({handler:t,level:i})},diagnose:function(t){var i;void 0===t&&(t={});var n={statsCount:60,historySize:1e3,minLogLevel:"TRACE",statsFormat:"JSON"};"number"==typeof t?(n.statsCount=t,i=n):i=d(d({},n),t);var r=i.statsCount,e=i.historySize,s=i.minLogLevel,u=i.statsFormat,o=et(r,u),h=wt.getHistory();if(!Number.isInteger(e)||e<=0)throw new p("Invalid Argument Exception : historySize must be a positive integer.");if(!st.includes(s.toUpperCase()))throw new p('Invalid Argument Exception : the minLogLevel parameter only excepts "trace", "debug", "info", "warn", and "error" as arguments.');if(st.includes(s.toUpperCase())){var a=st.slice(st.indexOf(s.toUpperCase())),c=h.filter(function(t){return a.some(function(i){return t.includes(i)})});o.history=c.slice(-e)}return o},JSON:"JSON",CMCD:"CMCD",VERSION:O}),mt={exports:{}};function yt(){if(ct)return mt.exports;ct=1;var t,i="object"==("undefined"==typeof Reflect?"undefined":W(Reflect))?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(t,i,n){return Function.prototype.apply.call(t,i,n)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:b.getOwnPropertySymbols?function(t){return b.getOwnPropertyNames(t).concat(b.getOwnPropertySymbols(t))}:function(t){return b.getOwnPropertyNames(t)};var r=Number.isNaN||function(t){return t!=t};function e(){e.init.call(this)}mt.exports=e,mt.exports.once=function(t,i){return new ot(function(n,r){function e(n){t.removeListener(i,s),r(n)}function s(){"function"==typeof t.removeListener&&t.removeListener("error",e),n([].slice.call(arguments))}l(t,i,s,{once:!0}),"error"!==i&&function(t,i,n){"function"==typeof t.on&&l(t,"error",i,n)}(t,e,{once:!0})})},e.EventEmitter=e,e.prototype.Zf=void 0,e.prototype.$f=0,e.prototype.rv=void 0;var s=10;function u(t){if("function"!=typeof t)throw new _('The "listener" argument must be of type Function. Received type '+(void 0===t?"undefined":W(t)))}function o(t){return void 0===t.rv?e.defaultMaxListeners:t.rv}function h(t,i,n,r){var e,s,h;if(u(n),void 0===(s=t.Zf)?(s=t.Zf=b.create(null),t.$f=0):(void 0!==s.newListener&&(t.emit("newListener",i,n.listener?n.listener:n),s=t.Zf),h=s[i]),void 0===h)h=s[i]=n,++t.$f;else if("function"==typeof h?h=s[i]=r?[n,h]:[h,n]:r?h.unshift(n):h.push(n),(e=o(t))>0&&h.length>e&&!h.warned){h.warned=!0;var a=new p("Possible EventEmitter memory leak detected. "+h.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=i,a.count=h.length,function(t){console&&console.warn&&console.warn(t)}(a)}return t}function a(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(t,i,n){var r={fired:!1,wrapFn:void 0,target:t,type:i,listener:n},e=a.bind(r);return e.listener=n,r.wrapFn=e,e}function f(t,i,n){var r=t.Zf;if(void 0===r)return[];var e=r[i];return void 0===e?[]:"function"==typeof e?n?[e.listener||e]:[e]:n?function(t){for(var i=new Array(t.length),n=0;n0&&(u=i[0]),j(u,p))throw u;var o=new p("Unhandled error."+(u?" ("+u.message+")":""));throw o.context=u,o}var h=s[t];if(void 0===h)return!1;if("function"==typeof h)n(h,this,i);else{var a=h.length,c=d(h,a);for(r=0;r=0;s--)if(n[s]===i||n[s].listener===i){o=n[s].listener,e=s;break}if(e<0)return this;0===e?n.shift():function(t,i){for(;i+1=0;r--)this.removeListener(t,i[r]);return this},e.prototype.listeners=function(t){return f(this,t,!0)},e.prototype.rawListeners=function(t){return f(this,t,!1)},e.listenerCount=function(t,i){return"function"==typeof t.listenerCount?t.listenerCount(i):v.call(t,i)},e.prototype.listenerCount=v,e.prototype.eventNames=function(){return this.$f>0?t(this.Zf):[]},mt.exports}var pt,_t,kt,bt,At,Tt,St,Et,It,Rt,Ct,Nt,Dt,Bt,Ot,Mt,Lt,Ut,Vt,Ht,Wt,qt,Xt,Gt=C(yt()),Qt={exports:{}},Yt=function(){if(pt)return Qt.exports;pt=1,Qt.exports=i,Qt.exports.filter=function(n,r){var e=new t;return i(n,e,r),e};var t=yt().EventEmitter;function i(t,i,n){Array.isArray(n)||(n=[n]);var r=[];return n.forEach(function(n){var e=function(){var t=[].slice.call(arguments);t.unshift(n),i.emit.apply(i,t)};r.push(e),t.on(n,e)}),function(){n.forEach(function(i,n){t.removeListener(i,r[n])})}}return Qt.exports}(),$t=C(Yt),Kt={exports:{}},Jt=(_t||(_t=1,function(t){var i,n;self,t.exports=(i={7:function(t){var i,n=function(t){if("function"!=typeof t)throw new _('The "listener" argument must be of type Function. Received type '+(void 0===t?"undefined":W(t)))},r=function(t){return void 0===t.rv?l.defaultMaxListeners:t.rv},e=function(t,i,e,s){var u,o,h,a;if(n(e),void 0===(o=t.Zf)?(o=t.Zf=b.create(null),t.$f=0):(void 0!==o.newListener&&(t.emit("newListener",i,e.listener?e.listener:e),o=t.Zf),h=o[i]),void 0===h)h=o[i]=e,++t.$f;else if("function"==typeof h?h=o[i]=s?[e,h]:[h,e]:s?h.unshift(e):h.push(e),(u=r(t))>0&&h.length>u&&!h.warned){h.warned=!0;var c=new p("Possible EventEmitter memory leak detected. "+h.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=i,c.count=h.length,a=c,console&&console.warn&&console.warn(a)}return t},s=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)},u=function(t,i,n){var r={fired:!1,wrapFn:void 0,target:t,type:i,listener:n},e=s.bind(r);return e.listener=n,r.wrapFn=e,e},o=function(t,i,n){var r=t.Zf;if(void 0===r)return[];var e=r[i];return void 0===e?[]:"function"==typeof e?n?[e.listener||e]:[e]:n?function(t){for(var i=new Array(t.length),n=0;n0&&(s=i[0]),j(s,p))throw s;var u=new p("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var o=e[t];if(void 0===o)return!1;if("function"==typeof o)v(o,this,i);else{var h=o.length,c=a(o,h);for(n=0;n=0;u--)if(r[u]===i||r[u].listener===i){o=r[u].listener,s=u;break}if(s<0)return this;0===s?r.shift():function(t,i){for(;i+1=0;r--)this.removeListener(t,i[r]);return this},l.prototype.listeners=function(t){return o(this,t,!0)},l.prototype.rawListeners=function(t){return o(this,t,!1)},l.listenerCount=function(t,i){return"function"==typeof t.listenerCount?t.listenerCount(i):h.call(t,i)},l.prototype.listenerCount=h,l.prototype.eventNames=function(){return this.$f>0?i(this.Zf):[]}},156:function(t,i,n){var r=this&&this.hv||(b.create?function(t,i,n,r){void 0===r&&(r=n);var e=b.getOwnPropertyDescriptor(i,n);e&&!("get"in e?!i.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return i[n]}}),b.defineProperty(t,r,e)}:function(t,i,n,r){void 0===r&&(r=n),t[r]=i[n]}),e=this&&this.ov||function(t,i){for(var n in t)"default"===n||b.prototype.hasOwnProperty.call(i,n)||r(i,t,n)},s=this&&this.uv||function(t){return t&&t.__esModule?t:{default:t}};b.defineProperty(i,"__esModule",{value:!0}),i.Logger=void 0;var u=n(586);b.defineProperty(i,"Logger",{enumerable:!0,get:function(){return s(u).default}}),e(n(284),i),e(n(280),i),e(n(738),i),e(n(767),i)},185:function(t,i){b.defineProperty(i,"__esModule",{value:!0}),i.calculatePacketsLostRatio=i.calculateRate=i.getMediaKind=void 0,i.getMediaKind=function(t){var i=t.kind||t.mediaType;return["audio","video"].includes(i)||"inbound-rtp"!==t.type||(i=t.id.toLocaleLowerCase().includes("video")?"video":"audio"),i},i.calculateRate=function(t,i,n,r){return n&&r?(i-r)/((t-n)/1e3):0},i.calculatePacketsLostRatio=function(t,i,n,r){var e=t-(null!=n?n:0),s=e+(i-(null!=r?r:0));return 0===s?0:e/s}},280:function(t,i){b.defineProperty(i,"__esModule",{value:!0})},284:function(t,i,n){var r,e,s,u,o,h,a,c,f,v,d,l,g,w,p,k,A=this&&this.fv||function(t,i,n,r){return new(n||(n=ot))(function(e,s){function u(t){try{h(r.next(t))}catch(t){s(t)}}function o(t){try{h(r.throw(t))}catch(t){s(t)}}function h(t){var i;t.done?e(t.value):(i=t.value,j(i,n)?i:new n(function(t){t(i)})).then(u,o)}h((r=r.apply(t,i||[])).next())})},T=this&&this.vv||function(t,i,n,r,e){if("m"===r)throw new _("Private method is not writable");if("a"===r&&!e)throw new _("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!e:!i.has(t))throw new _("Cannot write private member to an object whose class did not declare it");return"a"===r?e.call(t,n):e?e.value=n:i.set(t,n),n},S=this&&this._v||function(t,i,n,r){if("a"===n&&!r)throw new _("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!r:!i.has(t))throw new _("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:i.get(t)},E=this&&this.uv||function(t){return t&&t.__esModule?t:{default:t}};b.defineProperty(i,"__esModule",{value:!0}),i.WebRTCStats=void 0;var I=n(7),R=E(n(586)),C=n(738),P=n(185),N=function(t){function i(i){var n;return n=t.call(this)||this,r.add(n),e.set(n,void 0),s.set(n,void 0),u.set(n,void 0),o.set(n,null),h.set(n,void 0),a.set(n,null),n.start=function(){S(n,h,"f").info("WebRTC statistics collection is starting..."),T(n,a,null,"f"),T(n,o,m(S(n,c,"f"),S(n,s,"f")),"f")},n.stop=function(){S(n,o,"f")&&(y(S(n,o,"f")),T(n,o,null,"f"),S(n,h,"f").info("WebRTC statistics collection has stopped."))},c.set(n,function(){return A(n,void 0,void 0,function(){var t,i,n,s,o,c,f,v,g,m,y,_;return zt(this,function(A){switch(A.label){case 0:return A.trys.push([0,2,,3]),S(this,h,"f").trace("Requesting WebRTC statistics..."),[4,S(this,e,"f").call(this)];case 1:return t=A.sent(),i=(new Date).toISOString(),[3,3];case 2:return n=A.sent(),[2,(S(this,h,"f").error("Problem collecting the WebRTC statistics.",n),void this.emit("error","Problem collecting the WebRTC statistics - ".concat(n)))];case 3:s=Array.from(t.values()),o={timestamp:i,input:{audio:[],video:[]},output:{audio:[],video:[]}},S(this,u,"f")&&(o.rawStats=t),c=0,A.label=4;case 4:if(!(c=i.value},trace:function(){this.invoke(u.TRACE,arguments)},debug:function(){this.invoke(u.DEBUG,arguments)},info:function(){this.invoke(u.INFO,arguments)},warn:function(){this.invoke(u.WARN,arguments)},error:function(){this.invoke(u.ERROR,arguments)},time:function(t){"string"==typeof t&&t.length>0&&this.invoke(u.TIME,[t,"start"])},timeEnd:function(t){"string"==typeof t&&t.length>0&&this.invoke(u.TIME,[t,"end"])},invoke:function(t,i){s&&this.enabledFor(t)&&s(i,a({level:t},this.context))}};var v,d=new f({filterLevel:u.OFF});(v=u).enabledFor=h(d,d.enabledFor),v.trace=h(d,d.trace),v.debug=h(d,d.debug),v.time=h(d,d.time),v.timeEnd=h(d,d.timeEnd),v.info=h(d,d.info),v.warn=h(d,d.warn),v.error=h(d,d.error),v.log=v.info,u.setHandler=function(t){s=t},u.setLevel=function(t){for(var i in d.setLevel(t),o)o.hasOwnProperty(i)&&o[i].setLevel(t)},u.getLevel=function(){return d.getLevel()},u.get=function(t){return o[t]||(o[t]=new f(a({name:t},d.context)))},u.createDefaultHandler=function(t){(t=t||{}).formatter=t.formatter||function(t,i){i.name&&t.unshift("["+i.name+"]")};var i={},n=function(t,i){Function.prototype.apply.call(t,console,i)};return("undefined"==typeof console?"undefined":W(console))>"u"?function(){}:function(r,e){r=Array.prototype.slice.call(r);var s,o=console.log;e.level===u.TIME?(s=(e.name?"["+e.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(s):i[s]=(new Date).getTime():console.timeEnd?console.timeEnd(s):n(o,[s+": "+((new Date).getTime()-i[s])+"ms"])):(e.level===u.WARN&&console.warn?o=console.warn:e.level===u.ERROR&&console.error?o=console.error:e.level===u.INFO&&console.info?o=console.info:e.level===u.DEBUG&&console.debug?o=console.debug:e.level===u.TRACE&&console.trace&&(o=console.trace),t.formatter(r,e),n(o,r))}},u.useDefaults=function(t){u.setLevel(t&&t.defaultLevel||u.DEBUG),u.setHandler(u.createDefaultHandler(t))},u.setDefaults=u.useDefaults,void 0===(e="function"==typeof(r=u)?r.call(i,n,i,t):r)||(t.exports=e)}()},738:function(t,i){var n,r;b.defineProperty(i,"__esModule",{value:!0}),i.QualityLimitationReason=void 0,(r=n||(i.QualityLimitationReason=n={}))[r.none=0]="none",r[r.cpu=1]="cpu",r[r.bandwidth=2]="bandwidth",r[r.other=3]="other"},767:function(t,i){b.defineProperty(i,"__esModule",{value:!0})}},n={},function t(r){var e=n[r];if(void 0!==e)return e.exports;var s=n[r]={exports:{}};return i[r].call(s.exports,s,s.exports,t),s.exports}(156))}(Kt)),Kt.exports),Zt=wt.get("PeerConnectionStats"),ti="stats",ii=function(t){function i(i,n){var r;return void 0===n&&(n={statsIntervalMs:1e3,autoInitStats:!0}),(r=t.call(this)||this).peer=i,r.collection=null,r.initialized=!1,n.autoInitStats&&r.init(n.statsIntervalMs),r}Pt(i,t);var n=i.prototype;return n.init=function(t){var i=this;if(this.initialized)Zt.warn("PeerConnectionStats.init() has already been called. Automatic initialization occurs when the PeerConnectionStats object is constructed.");else{Zt.info("Initializing peer connection stats");var n=this.peer;try{this.collection=new Jt.WebRTCStats({getStatsInterval:t,getStats:function(){return n.getStats()},includeRawStats:!0}),this.collection.on("stats",function(t){var n=function(t){var i=t,n=(i.input,i.output,i.rawStats,k(i,["input","output","rawStats"]));return w(d({},n),{audio:{inbounds:t.input.audio.map(function(t){var i=t,n=i.packetLossRatio,r=i.packetLossDelta,e=i.bitrate,s=k(i,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:n,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)}),outbounds:t.output.audio.map(function(t){var i=t,n=i.packetLossRatio,r=i.packetLossDelta,e=i.bitrate,s=k(i,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:n,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)})},video:{inbounds:t.input.video.map(function(t){var i=t,n=i.packetLossRatio,r=i.packetLossDelta,e=i.bitrate,s=k(i,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:n,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)}),outbounds:t.output.video.map(function(t){var i=t,n=i.packetLossRatio,r=i.packetLossDelta,e=i.bitrate,s=k(i,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:n,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)})},raw:t.rawStats})}(t);rt(n),i.emit(ti,n)}),this.collection.start(),this.initialized=!0}catch(t){Zt.error(t)}}},n.parseStats=function(t){return Zt.warn("The parseStats method is deprecated and will be removed in future releases."),null},n.stop=function(){Zt.info("Stopping peer connection stats"),this.collection.stop()},i}(Gt),ni={},ri={},ei={},ui={exports:{}};function oi(){if(kt)return ui.exports;kt=1;var t=ui.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(t){return t.encoding?"rtpmap:%d %s/%s/%s":t.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(t){return null!=t.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(t){return null!=t.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(t){return"extmap:%d"+(t.direction?"/%s":"%v")+(t["encrypt-uri"]?" %s":"%v")+" %s"+(t.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(t){return null!=t.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(t){var i="candidate:%s %d %s %d %s %d typ %s";return i+=null!=t.raddr?" raddr %s rport %d":"%v%v",i+=null!=t.tcptype?" tcptype %s":"%v",null!=t.generation&&(i+=" generation %d"),i+=null!=t["network-id"]?" network-id %d":"%v",i+=null!=t["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(t){var i="ssrc:%d";return null!=t.attribute&&(i+=" %s",null!=t.value&&(i+=":%s")),i}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(t){return null!=t.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(t){return t.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(t){return"imageattr:%s %s %s"+(t.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(t){return"simulcast:%s %s"+(t.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(t){return"ts-refclk:%s"+(null!=t.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(t){var i="mediaclk:";return i+=null!=t.id?"id=%s %s":"%v%s",i+=null!=t.mediaClockValue?"=%s":"",i+=null!=t.rateNumerator?" rate=%s":"",i+=null!=t.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};return b.keys(t).forEach(function(i){t[i].forEach(function(t){t.reg||(t.reg=/(.*)/),t.format||(t.format="%s")})}),ui.exports}function hi(){return bt||(bt=1,function(t){var i=function(t){return String(Number(t))===t?Number(t):t},n=function(t,n,r){var e=t.name&&t.names;t.push&&!n[t.push]?n[t.push]=[]:e&&!n[t.name]&&(n[t.name]={});var s=t.push?{}:e?n[t.name]:n;(function(t,n,r,e){if(e&&!r)n[e]=i(t[1]);else for(var s=0;s1&&(t[r[0]]=void 0),t};t.parseParams=function(t){return t.split(/;\s?/).reduce(s,{})},t.parseFmtpConfig=t.parseParams,t.parsePayloads=function(t){return t.toString().split(" ").map(Number)},t.parseRemoteCandidates=function(t){for(var n=[],r=t.split(" ").map(i),e=0;e=e)return t;var i=r[n];switch(n+=1,t){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}})},r=function(t,i,r){var e=[t+"="+(j(i.format,Function)?i.format(i.push?r:r[i.name]):i.format)];if(i.names)for(var s=0;s0?o-4:o;for(e=0;e>16&255,a[c++]=r>>8&255,a[c++]=255&r;return 2===h&&(r=i[t.charCodeAt(e)]<<2|i[t.charCodeAt(e+1)]>>4,a[c++]=255&r),1===h&&(r=i[t.charCodeAt(e)]<<10|i[t.charCodeAt(e+1)]<<4|i[t.charCodeAt(e+2)]>>2,a[c++]=r>>8&255,a[c++]=255&r),a},tn.fromByteArray=function(i){for(var n,r=i.length,e=r%3,s=[],u=16383,h=0,a=r-e;ha?a:h+u));return 1===e?(n=i[r-1],s.push(t[n>>2]+t[n<<4&63]+"==")):2===e&&(n=(i[r-2]<<8)+i[r-1],s.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+"=")),s.join("")};for(var t=[],i=[],n=(void 0===I?"undefined":W(I))<"u"?I:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)t[e]=r[e],i[r.charCodeAt(e)]=e;function s(t){var i=t.length;if(i%4>0)throw new p("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=i),[n,n===i?0:4-n%4]}function u(i){return t[i>>18&63]+t[i>>12&63]+t[i>>6&63]+t[63&i]}function o(t,i,n){for(var r,e=[],s=i;s>1,c=-7,f=n?e-1:0,v=n?-1:1,d=t[i+f];for(f+=v,s=d&(1<<-c)-1,d>>=-c,c+=o;c>0;s=256*s+t[i+f],f+=v,c-=8);for(u=s&(1<<-c)-1,s>>=-c,c+=r;c>0;u=256*u+t[i+f],f+=v,c-=8);if(0===s)s=1-a;else{if(s===h)return u?NaN:1/0*(d?-1:1);u+=A.pow(2,r),s-=a}return(d?-1:1)*u*A.pow(2,s-r)},nn.write=function(t,i,n,r,e,s){var u,o,h,a=8*s-e-1,c=(1<>1,v=23===e?A.pow(2,-24)-A.pow(2,-77):0,d=r?0:s-1,l=r?1:-1,g=i<0||0===i&&1/i<0?1:0;for(i=A.abs(i),E(i)||i===1/0?(o=E(i)?1:0,u=c):(u=A.floor(A.log(i)/A.LN2),i*(h=A.pow(2,-u))<1&&(u--,h*=2),(i+=u+f>=1?v/h:v*A.pow(2,1-f))*h>=2&&(u++,h/=2),u+f>=c?(o=0,u=c):u+f>=1?(o=(i*h-1)*A.pow(2,e),u+=f):(o=i*A.pow(2,f-1)*A.pow(2,e),u=0));e>=8;t[n+d]=255&o,d+=l,o/=256,e-=8);for(u=u<0;t[n+d]=255&u,d+=l,u/=256,a-=8);t[n+d-l]|=128*g}),nn),s="function"==typeof i&&"function"==typeof n?n("nodejs.util.inspect.custom"):null;t.Buffer=h,t.SlowBuffer=function(t){return+t!=t&&(t=0),h.alloc(+t)},t.INSPECT_MAX_BYTES=50;var u=2147483647;function o(t){if(t>u)throw new RangeError('The value "'+t+'" is invalid for option "size"');var i=new I(t);return b.setPrototypeOf(i,h.prototype),i}function h(t,i,n){if("number"==typeof t){if("string"==typeof i)throw new _('The "string" argument must be of type string. Received type number');return f(t)}return a(t,i,n)}function a(t,n,r){if("string"==typeof t)return function(t,i){if(("string"!=typeof i||""===i)&&(i="utf8"),!h.isEncoding(i))throw new _("Unknown encoding: "+i);var n=0|g(t,i),r=o(n),e=r.write(t,i);return e!==n&&(r=r.slice(0,e)),r}(t,n);if(ArrayBuffer.isView(t))return function(t){if(et(t,I)){var i=new I(t);return d(i.buffer,i.byteOffset,i.byteLength)}return v(t)}(t);if(null==t)throw new _("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":W(t)));if(et(t,ArrayBuffer)||t&&et(t.buffer,ArrayBuffer)||("undefined"==typeof SharedArrayBuffer?"undefined":W(SharedArrayBuffer))<"u"&&(et(t,SharedArrayBuffer)||t&&et(t.buffer,SharedArrayBuffer)))return d(t,n,r);if("number"==typeof t)throw new _('The "value" argument must not be of type number. Received type number');var e=t.valueOf&&t.valueOf();if(null!=e&&e!==t)return h.from(e,n,r);var s=function(t){if(h.isBuffer(t)){var i=0|l(t.length),n=o(i);return 0===n.length||t.copy(n,0,0,i),n}return void 0!==t.length?"number"!=typeof t.length||st(t.length)?o(0):v(t):"Buffer"===t.type&&Array.isArray(t.data)?v(t.data):void 0}(t);if(s)return s;if((void 0===i?"undefined":W(i))<"u"&&null!=i.toPrimitive&&"function"==typeof t[i.toPrimitive])return h.from(t[i.toPrimitive]("string"),n,r);throw new _("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":W(t)))}function c(t){if("number"!=typeof t)throw new _('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return c(t),o(t<0?0:0|l(t))}function v(t){for(var i=t.length<0?0:0|l(t.length),n=o(i),r=0;r=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return 0|t}function g(t,i){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||et(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new _('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(void 0===t?"undefined":W(t)));var n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var e=!1;;)switch(i){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return it(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return nt(t).length;default:if(e)return r?-1:it(t).length;i=(""+i).toLowerCase(),e=!0}}function w(t,i,n){var r=!1;if((void 0===i||i<0)&&(i=0),i>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0)||(n>>>=0)<=(i>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,i,n);case"utf8":case"utf-8":return x(this,i,n);case"ascii":return O(this,i,n);case"latin1":case"binary":return M(this,i,n);case"base64":return D(this,i,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,i,n);default:if(r)throw new _("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,i,n){var r=t[i];t[i]=t[n],t[n]=r}function y(t,i,n,r,e){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),st(n=+n)&&(n=e?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(e)return-1;n=t.length-1}else if(n<0){if(!e)return-1;n=0}if("string"==typeof i&&(i=h.from(i,r)),h.isBuffer(i))return 0===i.length?-1:k(t,i,n,r,e);if("number"==typeof i)return i&=255,"function"==typeof I.prototype.indexOf?e?I.prototype.indexOf.call(t,i,n):I.prototype.lastIndexOf.call(t,i,n):k(t,[i],n,r,e);throw new _("val must be string, number or Buffer")}function k(t,i,n,r,e){var s,u=1,o=t.length,h=i.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||i.length<2)return-1;u=2,o/=2,h/=2,n/=2}function a(t,i){return 1===u?t[i]:t.readUInt16BE(i*u)}if(e){var c=-1;for(s=n;so&&(n=o-h),s=n;s>=0;s--){for(var f=!0,v=0;ve&&(r=e):r=e;var s,u=i.length;for(r>u/2&&(r=u/2),s=0;s>8,e=n%256,s.push(e),s.push(r);return s}(i,t.length-n),t,n,r)}function D(t,i,n){return 0===i&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(i,n))}function x(t,i,n){n=A.min(t.length,n);for(var r=[],e=i;e239?4:s>223?3:s>191?2:1;if(e+o<=n){var h=void 0,a=void 0,c=void 0,f=void 0;switch(o){case 1:s<128&&(u=s);break;case 2:128==(192&(h=t[e+1]))&&(f=(31&s)<<6|63&h)>127&&(u=f);break;case 3:h=t[e+1],a=t[e+2],128==(192&h)&&128==(192&a)&&(f=(15&s)<<12|(63&h)<<6|63&a)>2047&&(f<55296||f>57343)&&(u=f);break;case 4:h=t[e+1],a=t[e+2],c=t[e+3],128==(192&h)&&128==(192&a)&&128==(192&c)&&(f=(15&s)<<18|(63&h)<<12|(63&a)<<6|63&c)>65535&&f<1114112&&(u=f)}}null===u?(u=65533,o=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),e+=o}return function(t){var i=t.length;if(i<=B)return String.fromCharCode.apply(String,t);for(var n="",r=0;rr.length?(h.isBuffer(s)||(s=h.from(s)),s.copy(r,e)):I.prototype.set.call(r,s,e);else{if(!h.isBuffer(s))throw new _('"list" argument must be an Array of Buffers');s.copy(r,e)}e+=s.length}return r},h.byteLength=g,h.prototype.mv=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;in&&(i+=" ... "),""},s&&(h.prototype[s]=h.prototype.inspect),h.prototype.compare=function(t,i,n,r,e){if(et(t,I)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw new _('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(void 0===t?"undefined":W(t)));if(void 0===i&&(i=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===e&&(e=this.length),i<0||n>t.length||r<0||e>this.length)throw new RangeError("out of range index");if(r>=e&&i>=n)return 0;if(r>=e)return-1;if(i>=n)return 1;if(this===t)return 0;for(var s=(e>>>=0)-(r>>>=0),u=(n>>>=0)-(i>>>=0),o=A.min(s,u),a=this.slice(r,e),c=t.slice(i,n),f=0;f>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var e=this.length-i;if((void 0===n||n>e)&&(n=e),t.length>0&&(n<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return S(this,t,i,n);case"utf8":case"utf-8":return R(this,t,i,n);case"ascii":case"latin1":case"binary":return C(this,t,i,n);case"base64":return P(this,t,i,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,i,n);default:if(s)throw new _("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this.yv||this,0)}};var B=4096;function O(t,i,n){var r="";n=A.min(t.length,n);for(var e=i;er)&&(n=r);for(var e="",s=i;sn)throw new RangeError("Trying to access beyond buffer length")}function V(t,i,n,r,e,s){if(!h.isBuffer(t))throw new _('"buffer" argument must be a Buffer instance');if(i>e||it.length)throw new RangeError("Index out of range")}function H(t,i,n,r,e){K(i,r,e,t,n,7);var s=Number(i&BigInt(4294967295));t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s;var u=Number(i>>BigInt(32)&BigInt(4294967295));return t[n++]=u,u>>=8,t[n++]=u,u>>=8,t[n++]=u,u>>=8,t[n++]=u,n}function z(t,i,n,r,e){K(i,r,e,t,n,7);var s=Number(i&BigInt(4294967295));t[n+7]=s,s>>=8,t[n+6]=s,s>>=8,t[n+5]=s,s>>=8,t[n+4]=s;var u=Number(i>>BigInt(32)&BigInt(4294967295));return t[n+3]=u,u>>=8,t[n+2]=u,u>>=8,t[n+1]=u,u>>=8,t[n]=u,n+8}function q(t,i,n,r,e,s){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function X(t,i,n,r,s){return i=+i,n>>>=0,s||q(t,0,n,4),e.write(t,i,n,r,23,4),n+4}function G(t,i,n,r,s){return i=+i,n>>>=0,s||q(t,0,n,8),e.write(t,i,n,r,52,8),n+8}h.prototype.slice=function(t,i){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(i=void 0===i?n:~~i)<0?(i+=n)<0&&(i=0):i>n&&(i=n),i>>=0,i>>>=0,n||U(t,i,this.length);for(var r=this[t],e=1,s=0;++s>>=0,i>>>=0,n||U(t,i,this.length);for(var r=this[t+--i],e=1;i>0&&(e*=256);)r+=this[t+--i]*e;return r},h.prototype.readUint8=h.prototype.readUInt8=function(t,i){return t>>>=0,i||U(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,i){return t>>>=0,i||U(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,i){return t>>>=0,i||U(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,i){return t>>>=0,i||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,i){return t>>>=0,i||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readBigUInt64LE=ot(function(t){J(t>>>=0,"offset");var i=this[t],n=this[t+7];(void 0===i||void 0===n)&&Z(t,this.length-8);var r=i+this[++t]*A.pow(2,8)+this[++t]*A.pow(2,16)+this[++t]*A.pow(2,24),e=this[++t]+this[++t]*A.pow(2,8)+this[++t]*A.pow(2,16)+n*A.pow(2,24);return BigInt(r)+(BigInt(e)<>>=0,"offset");var i=this[t],n=this[t+7];(void 0===i||void 0===n)&&Z(t,this.length-8);var r=i*A.pow(2,24)+this[++t]*A.pow(2,16)+this[++t]*A.pow(2,8)+this[++t],e=this[++t]*A.pow(2,24)+this[++t]*A.pow(2,16)+this[++t]*A.pow(2,8)+n;return(BigInt(r)<>>=0,i>>>=0,n||U(t,i,this.length);for(var r=this[t],e=1,s=0;++s=(e*=128)&&(r-=A.pow(2,8*i)),r},h.prototype.readIntBE=function(t,i,n){t>>>=0,i>>>=0,n||U(t,i,this.length);for(var r=i,e=1,s=this[t+--r];r>0&&(e*=256);)s+=this[t+--r]*e;return s>=(e*=128)&&(s-=A.pow(2,8*i)),s},h.prototype.readInt8=function(t,i){return t>>>=0,i||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,i){t>>>=0,i||U(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt16BE=function(t,i){t>>>=0,i||U(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt32LE=function(t,i){return t>>>=0,i||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,i){return t>>>=0,i||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readBigInt64LE=ot(function(t){J(t>>>=0,"offset");var i=this[t],n=this[t+7];(void 0===i||void 0===n)&&Z(t,this.length-8);var r=this[t+4]+this[t+5]*A.pow(2,8)+this[t+6]*A.pow(2,16)+(n<<24);return(BigInt(r)<>>=0,"offset");var i=this[t],n=this[t+7];(void 0===i||void 0===n)&&Z(t,this.length-8);var r=(i<<24)+this[++t]*A.pow(2,16)+this[++t]*A.pow(2,8)+this[++t];return(BigInt(r)<>>=0,i||U(t,4,this.length),e.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,i){return t>>>=0,i||U(t,4,this.length),e.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,i){return t>>>=0,i||U(t,8,this.length),e.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,i){return t>>>=0,i||U(t,8,this.length),e.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,i,n,r){t=+t,i>>>=0,n>>>=0,r||V(this,t,i,n,A.pow(2,8*n)-1,0);var e=1,s=0;for(this[i]=255&t;++s>>=0,n>>>=0,r||V(this,t,i,n,A.pow(2,8*n)-1,0);var e=n-1,s=1;for(this[i+e]=255&t;--e>=0&&(s*=256);)this[i+e]=t/s&255;return i+n},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,1,255,0),this[i]=255&t,i+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,2,65535,0),this[i]=255&t,this[i+1]=t>>>8,i+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,2,65535,0),this[i]=t>>>8,this[i+1]=255&t,i+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,4,4294967295,0),this[i+3]=t>>>24,this[i+2]=t>>>16,this[i+1]=t>>>8,this[i]=255&t,i+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,4,4294967295,0),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=255&t,i+4},h.prototype.writeBigUInt64LE=ot(function(t,i){return void 0===i&&(i=0),H(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=ot(function(t,i){return void 0===i&&(i=0),z(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(t,i,n,r){if(t=+t,i>>>=0,!r){var e=A.pow(2,8*n-1);V(this,t,i,n,e-1,-e)}var s=0,u=1,o=0;for(this[i]=255&t;++s>>=0,!r){var e=A.pow(2,8*n-1);V(this,t,i,n,e-1,-e)}var s=n-1,u=1,o=0;for(this[i+s]=255&t;--s>=0&&(u*=256);)t<0&&0===o&&0!==this[i+s+1]&&(o=1),this[i+s]=(t/u|0)-o&255;return i+n},h.prototype.writeInt8=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,1,127,-128),t<0&&(t=255+t+1),this[i]=255&t,i+1},h.prototype.writeInt16LE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,2,32767,-32768),this[i]=255&t,this[i+1]=t>>>8,i+2},h.prototype.writeInt16BE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,2,32767,-32768),this[i]=t>>>8,this[i+1]=255&t,i+2},h.prototype.writeInt32LE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,4,2147483647,-2147483648),this[i]=255&t,this[i+1]=t>>>8,this[i+2]=t>>>16,this[i+3]=t>>>24,i+4},h.prototype.writeInt32BE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=255&t,i+4},h.prototype.writeBigInt64LE=ot(function(t,i){return void 0===i&&(i=0),H(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=ot(function(t,i){return void 0===i&&(i=0),z(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeFloatLE=function(t,i,n){return X(this,t,i,!0,n)},h.prototype.writeFloatBE=function(t,i,n){return X(this,t,i,!1,n)},h.prototype.writeDoubleLE=function(t,i,n){return G(this,t,i,!0,n)},h.prototype.writeDoubleBE=function(t,i,n){return G(this,t,i,!1,n)},h.prototype.copy=function(t,i,n,r){if(!h.isBuffer(t))throw new _("argument should be a Buffer");if(n||(n=0),!r&&0!==r&&(r=this.length),i>=t.length&&(i=t.length),i||(i=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=i;s=r+4;n-=3)i="_".concat(t.slice(n-3,n)).concat(i);return"".concat(t.slice(0,n)).concat(i)}function K(t,i,n,r,e,s){if(t>n||t= 0".concat(o," and < 2").concat(o," ** ").concat(8*(s+1)).concat(o):">= -(2".concat(o," ** ").concat(8*(s+1)-1).concat(o,") and < 2 ** ")+"".concat(8*(s+1)-1).concat(o),new Q.ERR_OUT_OF_RANGE("value",u,t)}!function(t,i,n){J(i,"offset"),(void 0===t[i]||void 0===t[i+n])&&Z(i,t.length-(n+1))}(r,e,s)}function J(t,i){if("number"!=typeof t)throw new Q.ERR_INVALID_ARG_TYPE(i,"number",t)}function Z(t,i,n){throw A.floor(t)!==t?(J(t,n),new Q.ERR_OUT_OF_RANGE("offset","an integer",t)):i<0?new Q.ERR_BUFFER_OUT_OF_BOUNDS:new Q.ERR_OUT_OF_RANGE("offset",">= 0 and <= ".concat(i),t)}Y("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Y("ERR_INVALID_ARG_TYPE",function(t,i){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(void 0===i?"undefined":W(i))},_),Y("ERR_OUT_OF_RANGE",function(t,i,n){var r='The value of "'.concat(t,'" is out of range.'),e=n;return Number.isInteger(n)&&A.abs(n)>A.pow(2,32)?e=$(String(n)):"bigint"==(void 0===n?"undefined":W(n))&&(e=String(n),(n>A.pow(BigInt(2),BigInt(32))||n<-A.pow(BigInt(2),BigInt(32)))&&(e=$(e)),e+="n"),r+=" It must be ".concat(i,". Received ").concat(e)},RangeError);var tt=/[^+/0-9A-Za-z-_]/g;function it(t,i){var n;i=i||1/0;for(var r=t.length,e=null,s=[],u=0;u55295&&n<57344){if(!e){if(n>56319){(i-=3)>-1&&s.push(239,191,189);continue}if(u+1===r){(i-=3)>-1&&s.push(239,191,189);continue}e=n;continue}if(n<56320){(i-=3)>-1&&s.push(239,191,189),e=n;continue}n=65536+(e-55296<<10|n-56320)}else e&&(i-=3)>-1&&s.push(239,191,189);if(e=null,n<128){if((i-=1)<0)break;s.push(n)}else if(n<2048){if((i-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((i-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new p("Invalid code point");if((i-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function nt(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(tt,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function rt(t,i,n,r){var e;for(e=0;e=i.length||e>=t.length);++e)i[e+n]=t[e];return e}function et(t,i){return j(t,i)||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===i.name}function st(t){return t!=t}var ut=function(){for(var t="0123456789abcdef",i=new Array(256),n=0;n<16;++n)for(var r=16*n,e=0;e<16;++e)i[r+e]=t[n]+t[e];return i}();function ot(t){return("undefined"==typeof BigInt?"undefined":W(BigInt))>"u"?ht:t}function ht(){throw new p("BigInt not supported")}}(Zi)),Zi}function en(){if(ki)return Ki.exports;ki=1;var t=65536,i=(_i||(_i=1,function(t,i){var n=rn(),r=n.Buffer;function e(t,i){for(var n in t)i[n]=t[n]}function s(t,i,n){return r(t,i,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(e(n,i),i.Buffer=s),s.prototype=b.create(r.prototype),e(r,s),s.from=function(t,i,n){if("number"==typeof t)throw new _("Argument must not be a number");return r(t,i,n)},s.alloc=function(t,i,n){if("number"!=typeof t)throw new _("Argument must be a number");var e=r(t);return void 0!==i?"string"==typeof n?e.fill(i,n):e.fill(i):e.fill(0),e},s.allocUnsafe=function(t){if("number"!=typeof t)throw new _("Argument must be a number");return r(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new _("Argument must be a number");return n.SlowBuffer(t)}}(Ji,Ji.exports)),Ji.exports).Buffer,n=S.crypto||S.msCrypto;return n&&n.getRandomValues?Ki.exports=function(r,e){if(r>4294967295)throw new RangeError("requested too many random bytes");var s=i.allocUnsafe(r);if(r>0)if(r>t)for(var u=0;u0&&(o.bandwidth.push({type:"AS",limit:u.getBitrate()}),o.bandwidth.push({type:"TIAS",limit:1e3*u.getBitrate()}));for(var h,v=Ft(this.getCandidates());!(h=v()).done;){var d=h.value;o.candidates.push({foundation:d.getFoundation(),component:d.getComponentId(),transport:d.getTransport(),priority:d.getPriority(),ip:d.getAddress(),port:d.getPort(),type:d.getType(),raddr:d.getRelAddr(),rport:d.getRelPort()})}if(this.getICE()&&(o.iceUfrag=this.getICE().getUfrag(),o.icePwd=this.getICE().getPwd()),i("audio",u.getType())||i("video",u.getType())){o.rtcpMux="rtcp-mux",o.rtcpRsize="rtcp-rsize",this.getDTLS()?(o.protocol="UDP/TLS/RTP/SAVPF",o.fingerprint={type:this.getDTLS().getHash(),hash:this.getDTLS().getFingerprint()},o.setup=a.toString(this.getDTLS().getSetup())):this.getCrypto()?(o.protocol="RTP/SAVPF",o.crypto=[{id:this.getCrypto().getTag(),suite:this.getCrypto().getSuite(),config:this.getCrypto().getKeyParams()}]):o.protocol="RTP/AVP";for(var l,g=Ft(u.getCodecs().values());!(l=g()).done;){var w=l.value;i("video",u.getType())?o.rtp.push({payload:w.getType(),codec:w.getCodec().toUpperCase(),rate:9e4}):i("opus",w.getCodec())||i("multiopus",w.getCodec())?o.rtp.push({payload:w.getType(),codec:w.getCodec(),rate:48e3,encoding:w.getChannels()}):o.rtp.push({payload:w.getType(),codec:w.getCodec(),rate:8e3});for(var m,y=Ft(w.getRTCPFeedbacks());!(m=y()).done;){var p=m.value;o.rtcpFb.push({payload:w.getType(),type:p.getId(),subtype:p.getParams().join(" ")})}w.hasRTX()&&(o.rtp.push({payload:w.getRTX(),codec:"rtx",rate:9e4}),o.fmtp.push({payload:w.getRTX(),config:"apt="+w.getType()}));var _=w.getParams();if(b.keys(_).length){var k={payload:w.getType(),config:""};for(var A in _)k.config.length&&(k.config+=";"),b.hasOwnProperty.call(_,A)?k.config+=A+"="+_[A]:k.config+=A;o.fmtp.push(k)}}for(var T,S=[],E=Ft(o.rtp);!(T=E()).done;){var I=T.value;S.push(I.payload)}o.payloads=S.join(" ");for(var R,C=Ft(u.getExtensions().entries());!(R=C()).done;){var P=R.value,N=P[0],D=P[1];o.ext.push({value:N,uri:D})}for(var x,B=Ft(u.getRIDs().values());!(x=B()).done;){var O=x.value,M={id:O.getId(),direction:f.toString(O.getDirection()),params:""};O.getFormats().length&&(M.params="pt="+O.getFormats().join(","));for(var L,F=Ft(O.getParams().entries());!(L=F()).done;){var U=L.value,V=U[0],j=U[1];M.params+=(M.params.length?";":"")+V+"="+j}o.rids.push(M)}var H=u.getSimulcast();if(H){var W=1;o.simulcast={};var z=H.getSimulcastStreams(f.SEND),q=H.getSimulcastStreams(f.RECV);if(z&&z.length){for(var X,G="",Q=Ft(z);!(X=Q()).done;){for(var Y,$="",K=Ft(X.value);!(Y=K()).done;){var J=Y.value;$+=($.length?",":"")+(J.isPaused()?"~":"")+J.getId()}G+=(G.length?";":"")+$}o.simulcast["dir"+W]="send",o.simulcast["list"+W]=G,W++}if(q&&q.length){for(var Z,tt="",it=Ft(q);!(Z=it()).done;){for(var nt,rt="",et=Ft(Z.value);!(nt=et()).done;){var st=nt.value;rt+=(rt.length?",":"")+(st.isPaused()?"~":"")+st.getId()}tt+=(tt.length?";":"")+rt}o.simulcast["dir"+W]="recv",o.simulcast["list"+W]=tt,W++}}}else if(u.hasDataChannel()){o.protocol="UDP/DTLS/SCTP",o.payloads="webrtc-datachannel";var ut=u.getDataChannel();o.sctpPort=ut.getPort(),o.maxMessageSize=ut.getMaxMessageSize()}n.media.push(o)}for(var ot,ht=Ft(this.streams.values());!(ot=ht()).done;)for(var at,ct=ot.value,ft=Ft(ct.getTracks().values());!(at=ft()).done;){var vt=at.value;for(var dt in n.media){var lt=n.media[dt];if(vt.getMediaId()){if(vt.getMediaId()==lt.mid){var gt=vt.getSourceGroups();for(var wt in gt){var mt=gt[wt];lt.ssrcGroups.push({semantics:mt.getSemantics(),ssrcs:mt.getSSRCs().join(" ")})}var yt=vt.getSSRCs();for(var pt in yt)lt.ssrcs.push({id:yt[pt],attribute:"cname",value:ct.getId()}),lt.ssrcs.push({id:yt[pt],attribute:"msid",value:ct.getId()+" "+vt.getId()});lt.msid=ct.getId()+" "+vt.getId();break}}else if(i(lt.type,vt.getMedia())){var _t=vt.getSourceGroups();for(var kt in _t){var bt=_t[kt];lt.ssrcGroups.push({semantics:bt.getSemantics(),ssrcs:bt.getSSRCs().join(" ")})}var At=vt.getSSRCs();for(var Tt in At)lt.ssrcs.push({id:At[Tt],attribute:"cname",value:ct.getId()}),lt.ssrcs.push({id:At[Tt],attribute:"msid",value:ct.getId()+" "+vt.getId()});break}}}var St={type:"BUNDLE",mids:e.join(" ")};return n.groups.push(St),t.write(n)},e.toIceFragmentString=function(){var i={version:0,media:[],candidates:[]};this.hasICE()&&this.getICE().isLite()&&(i.icelite="ice-lite"),this.getICE()&&(i.iceUfrag=this.getICE().getUfrag(),i.icePwd=this.getICE().getPwd());for(var n,r=Ft(this.getCandidates());!(n=r()).done;){var e=n.value;i.candidates.push({foundation:e.getFoundation(),component:e.getComponentId(),transport:e.getTransport(),priority:e.getPriority(),ip:e.getAddress(),port:e.getPort(),type:e.getType(),raddr:e.getRelAddr(),rport:e.getRelPort()})}return t.write(i).slice(10)},r}();return k.create=function(t){var i,r=new k;if(t.streams)for(var e,a=Ft(t.streams);!(e=a()).done;){var c=e.value;r.addStream(l.expand(c))}t.ice&&(j(t.ice,o)?r.setICE(t.ice.clone()):r.setICE(o.expand(t.ice))),t.dtls&&(j(t.dtls,s)?r.setDTLS(t.dtls):r.setDTLS(s.expand(t.dtls))),t.crypto&&(j(t.crypto,u)?r.setCrypto(t.crypto):r.setCrypto(u.expand(t.crypto)));for(var f,v=Ft(t.candidates||[]);!(f=v()).done;){var d=f.value;j(d,n)?r.addCandidate(d.clone()):r.addCandidate(n.expand(d))}for(var g,w=96,m=1,y=0,p=Ft(b.entries(t.capabilities||{}));!(g=p()).done;){var _=g.value,A=_[0],T=_[1];if(t.unified&&null!==(i=t.streams)&&void 0!==i&&i.length)for(var S,E=Ft(r.getTracksByMediaType(A));!(S=E()).done;){for(var I,R=S.value,C=h.create(R.getMediaId(),A,T),P=Ft(C.getCodecs());!(I=P()).done;){var N=I.value,D=(N[0],N[1]);D.getType()>=96&&D.setType(w++),D.getRTX()&&D.setRTX(w++)}if(T.extensions)for(var x,B=Ft(T.extensions);!(x=B()).done;){var O=x.value;15===m&&m++,C.addExtension(m++,O)}r.addMedia(C)}else{for(var M,L=h.create(t.unified?String(y++):A,A,T),F=Ft(L.getCodecs());!(M=F()).done;){var U=M.value,V=(U[0],U[1]);V.getType()>=96&&V.setType(w++),V.getRTX()&&V.setRTX(w++)}if(T.extensions)for(var H,W=Ft(T.extensions);!(H=W()).done;){var z=H.value;15===m&&m++,L.addExtension(m++,z)}r.addMedia(L)}}return r},k.expand=function(t){if("SDPInfo"===t.constructor.name)return t;for(var i,r=new k(t.version),e=Ft(t.medias||[]);!(i=e()).done;){var a=i.value,c=h.expand(a);c&&r.addMedia(c)}for(var f,v=Ft(t.streams||[]);!(f=v()).done;){var d=f.value,g=l.expand(d);g&&r.addStream(g)}for(var w,m=Ft(t.candidates||[]);!(w=m()).done;){var y=w.value,p=n.expand(y);p&&r.addCandidate(p)}return t.ice&&r.setICE(o.expand(t.ice)),t.dtls&&r.setDTLS(s.expand(t.dtls)),t.crypto&&r.setCrypto(u.expand(t.crypto)),t.extmapAllowMixedNotSupported&&(this.extmapAllowMixed=!t.extmapAllowMixedNotSupported),r},k.clone=function(t){return"SDPInfo"===t.constructor.name?t.clone():k.expand(t)},k.process=function(t){return k.parse(t)},k.parse=function(b){var A=t.parse(b),S=new k;if(S.setVersion(A.version),A.iceUfrag&&A.icePwd){var E=String(A.iceUfrag),I=String(A.icePwd),R=new o(E,I);R.setLite("ice-lite"==A.icelite),R.setEndOfCandidates("end-of-candidates"==A.endOfCandidates),S.setICE(R)}for(var C in A.media){var P=A.media[C],N=P.type,D=P.mid?P.mid.toString():C,x=new h(D,N);if(P.iceUfrag&&P.icePwd){var B=String(P.iceUfrag),O=String(P.icePwd),M=new o(B,O);M.setLite("ice-lite"==A.icelite),M.setEndOfCandidates("end-of-candidates"==P.endOfCandidates),S.setICE(M)}for(var L=0;P.candidates&&L1&&st.setChannels(Q.encoding),x.addCodec(st)}}}for(var ut,ot=Ft(X.entries());!(ut=ot()).done;){var ht=ut.value,at=x.getCodecForType(ht[0]);at&&at.setRTX(ht[1])}for(var ct=0;P.rtcpFb&&ct0?2===h.length?W(h[1])==e?this[h[0]]=h[1].call(this,c):this[h[0]]=h[1]:3===h.length?W(h[1])!==e||h[1].exec&&h[1].test?this[h[0]]=c?c.replace(h[1],h[2]):r:this[h[0]]=c?h[1].call(this,c,h[2]):r:4===h.length&&(this[h[0]]=c?h[3].call(this,c.replace(h[1],h[2])):r):this[h]=c||r;f+=2}},$=function(t,i){for(var n in i)if(W(i[n])===u&&i[n].length>0){for(var e=0;e2&&(t[a]="iPad",t[f]=m),t},this.getEngine=function(){var t={};return t[c]=r,t[d]=r,Y.call(t,y,_.engine),t},this.getOS=function(){var t={};return t[c]=r,t[d]=r,Y.call(t,y,_.os),k&&!t[c]&&p&&p.platform&&"Unknown"!=p.platform&&(t[c]=p.platform.replace(/chrome os/i,V).replace(/macos/i,H)),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return y},this.setUA=function(t){return y=(void 0===t?"undefined":W(t))===o&&t.length>500?Q(t,500):t,this},this.setUA(y),this};Z.VERSION="0.7.39",Z.BROWSER=q([c,d,h]),Z.CPU=q([l]),Z.DEVICE=q([a,v,f,g,w,y,m,p,_]),Z.ENGINE=Z.OS=q([c,d]),t.exports&&(i=t.exports=Z),i.UAParser=Z;var tt=(void 0===n?"undefined":W(n))!==s&&(n.jQuery||n.Zepto);if(tt&&!tt.ua){var it=new Z;tt.ua=it.getResult(),tt.ua.get=function(){return it.getUA()},tt.ua.set=function(t){it.setUA(t);var i=it.getResult();for(var n in i)tt.ua[n]=i[n]}}}("object"==(void 0===f?"undefined":W(f))?f:bn)}(kn,kn.exports)),kn.exports),Tn=C(An),Sn=["iOS"],En=function(t){function i(){return t.call(this,f.navigator.userAgent)||this}Pt(i,t);var n=i.prototype;return n.isChromium=function(){return this.getUA().match(/Chrome/i)},n.isChrome=function(){var t=this.getBrowser();if(!t.name)return!1;var i,n=this.getOS();return i=!new RegExp(Sn.join("|"),"i").test(n.name),t.name.match(/Chrome/i)&&i},n.isFirefox=function(){var t=this.getBrowser();return!!t.name&&t.name.match(/Firefox/i)},n.isOpera=function(){var t=this.getBrowser();return!!t.name&&t.name.match(/Opera/i)},n.isSafari=function(){var t=this.getBrowser();return!!t.name&&t.name.match(/Safari/i)},i}(Tn),In=wt.get("SdpParser"),Rn=Array.from({length:31},function(t,i){return i+35}),Cn=Array.from({length:32},function(t,i){return i+96}),Pn=Array.from({length:14},function(t,i){return i+1}),Nn=Array.from({length:240},function(t,i){return i+16}),Dn={setSimulcast:function(t,i){if(In.info("Setting simulcast. Codec: ",i),!(new En).isChromium())return In.warn("Your browser does not appear to support Simulcast. For a better experience, use a Chromium based browser."),t;if("h264"!==i&&"vp8"!==i)return In.warn("Your selected codec ".concat(i," does not appear to support Simulcast. To broadcast using simulcast, please use H.264 or VP8.")),t;if(!/m=video/.test(t))return In.warn("There is no available video for simulcast to be enabled."),t;try{for(var n=new RegExp("m=video.*?a=ssrc:(\\d*) cname:(.+?)\\r\\n","s"),r=new RegExp("m=video.*?a=ssrc:(\\d*) msid:(.+?)\\r\\n","s"),e=n.exec(t),s=e[1],u=e[2],o=r.exec(t)[2],h=[s],a=0;a<2;++a){var c=100+2*a,f=c+1;h.push(c),t+="a=ssrc-group:FID "+c+" "+f+"\r\na=ssrc:"+c+" cname:"+u+"\r\na=ssrc:"+c+" msid:"+o+"\r\na=ssrc:"+f+" cname:"+u+"\r\na=ssrc:"+f+" msid:"+o+"\r\n"}return t+="a=ssrc-group:SIM "+h.join(" ")+"\r\n",In.info("Simulcast setted"),In.debug("Simulcast SDP: ",t),t}catch(t){throw In.error("Error setting SDP for simulcast: ",t),t}},setStereo:function(t){return In.info("Replacing SDP response for support stereo"),t=t.replace(/useinbandfec=1/g,"useinbandfec=1; stereo=1"),In.info("Replaced SDP response for support stereo"),In.debug("New SDP value: ",t),t},setDTX:function(t){return In.info("Replacing SDP response for support dtx"),t=t.replace("useinbandfec=1","useinbandfec=1; usedtx=1"),In.info("Replaced SDP response for support dtx"),In.debug("New SDP value: ",t),t},setAbsoluteCaptureTime:function(t){var i="a=extmap:"+Dn.getAvailableHeaderExtensionIdRange(t)[0]+" http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time\r\n";return t=t.replace(/(m=.*\r\n(?:.*\r\n)*?)(a=extmap.*\r\n)/gm,function(t,n,r){return n+i+r}),In.info("Replaced SDP response for setting absolute capture time"),In.debug("New SDP value: ",t),t},setDependencyDescriptor:function(t){var i="a=extmap:"+Dn.getAvailableHeaderExtensionIdRange(t)[0]+" https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension\r\n";return t=t.replace(/(m=.*\r\n(?:.*\r\n)*?)(a=extmap.*\r\n)/gm,function(t,n,r){return n+i+r}),In.info("Replaced SDP response for setting depency descriptor"),In.debug("New SDP value: ",t),t},setVideoBitrate:function(t,i){if(i<1)In.info("Remove bitrate restrictions"),t=t.replace(/b=AS:.*\r\n/,"").replace(/b=TIAS:.*\r\n/,"");else{var n=_n.SDPInfo.parse(t),r=n.getMedia("video");In.info("Setting video bitrate"),r.setBitrate(i),t=n.toString()}return t},removeSdpLine:function(t,i){return In.debug("SDP before trimming: ",t),t=t.split("\n").filter(function(t){return t.trim()!==i}).join("\n"),In.debug("SDP trimmed result: ",t),t},adaptCodecName:function(t,i,n){if(!t)return t;var r=new RegExp("".concat(i),"i");return t.replace(r,n)},setMultiopus:function(t,i){if(!(new En).isFirefox()&&(!i||xn(i)))if(t.includes("multiopus/48000/6"))In.info("Multiopus already setted");else{In.info("Setting multiopus");var n=/m=audio 9 UDP\/TLS\/RTP\/SAVPF (.*)\r\n/.exec(t)[0],r=Dn.getAvailablePayloadTypeRange(t)[0],e=n.replace("\r\n"," ")+r+"\r\na=rtpmap:"+r+" multiopus/48000/6\r\na=fmtp:"+r+" channel_mapping=0,4,1,2,3,5;coupled_streams=2;minptime=10;num_streams=4;useinbandfec=1\r\n";t=t.replace(n,e),In.info("Multiopus offer created"),In.debug("SDP parsed for multioups: ",t)}return t},getAvailablePayloadTypeRange:function(t){for(var i,n=function(){var t=i.value[1].split(" ").map(function(t){return T(t)});e=e.filter(function(i){return!t.includes(i)})},r=t.matchAll(/m=(?:.*) (?:.*) UDP\/TLS\/RTP\/SAVPF (.*)\r\n/gm),e=Cn.concat(Rn),s=Ft(r);!(i=s()).done;)n();return e},getAvailableHeaderExtensionIdRange:function(t){for(var i,n=function(){var t=i.value[1].split(" ").map(function(t){return T(t)});e=e.filter(function(i){return!t.includes(i)})},r=t.matchAll(/a=extmap:(\d+)(?:.*)\r\n/gm),e=Pn.concat(Nn),s=Ft(r);!(i=s()).done;)n();return e},renegotiate:function(t,i){for(var n,r=_n.SDPInfo.parse(t),e=_n.SDPInfo.parse(i),s=Ft(r.getMedias());!(n=s()).done;){var u=n.value,o=e.getMediaById(u.getId());if(!o){(o=new _n.MediaInfo(u.getId(),u.getType())).setDirection(_n.Direction.reverse(u.getDirection()));var h=e.getMedia(u.getType());if(h){o.setCodecs(h.getCodecs());for(var a,c=Ft(h.getExtensions());!(a=c()).done;){var f=a.value,v=f[0],d=f[1];o.addExtension(v,d)}}e.addMedia(o)}}return e.toString()},updateMissingVideoExtensions:function(t,i){var n,r=_n.SDPInfo.parse(t),e=null==(n=_n.SDPInfo.parse(i).getMediasByType("video")[0])?void 0:n.getExtensions();if(e||e.length){for(var s,u=function(){var i=s.value,n=i.getExtensions();e.forEach(function(r,e){if(!n.get(e)){var s=i.getId(),u="a=extmap:"+e+" "+r+"\r\n",o=new RegExp("(a=mid:"+s+"\r\n(?:.*\r\n)*?)","g");t=t.replace(o,function(t,i,n){return i+u})}})},o=Ft(r.getMediasByType("video"));!(s=o()).done;)u();return t}},getCodecPayloadType:function(t){for(var i,n={},r=Ft(t.matchAll(/a=rtpmap:(\d+) (\w+)\/\d+/g));!(i=r()).done;){var e=i.value;n[e[1]]=e[2]}return n}},xn=function(t){return t.getAudioTracks().some(function(t){return t.getSettings().channelCount>2})},Bn={VP8:"vp8",VP9:"vp9",H264:"h264",AV1:"av1",H265:"h265"},On={OPUS:"opus",MULTIOPUS:"multiopus"},Mn=wt.get("PeerConnection"),Ln="Publisher",Fn="Viewer",Un={track:"track",connectionStateChange:"connectionStateChange"},Vn={stereo:!1,mediaStream:null,codec:"h264",simulcast:!1,scalabilityMode:null,disableAudio:!1,disableVideo:!1,setSDPToPeer:!0},jn=function(t){function i(){var i;return(i=t.call(this)||this).mode=null,i.sessionDescription=null,i.peer=null,i.peerConnectionStats=null,i.transceiverMap=new Map,i}Pt(i,t);var n=i.prototype;return n.createRTCPeer=function(){return jt(function(t,i){return zt(this,function(n){return void 0===t&&(t={autoInitStats:!0,statsIntervalMs:1e3}),void 0===i&&(i=Fn),Mn.info("Creating new RTCPeerConnection"),Mn.debug("RTC configuration provided by user: ",t),this.peer=zn(this,t),this.mode=i,t.autoInitStats&&this.initStats(t),[2]})}).apply(this,arguments)},n.getRTCPeer=function(){return Mn.info("Getting RTC Peer"),this.peer},n.closeRTCPeer=function(){return jt(function(){var t;return zt(this,function(i){return Mn.info("Closing RTCPeerConnection"),null==(t=this.peer)||t.close(),this.peer=null,this.stopStats(),this.emit(Un.connectionStateChange,"closed"),[2]})}).call(this)},n.setRTCRemoteSDP=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:Mn.info("Setting RTC Remote SDP"),i={type:"answer",sdp:t},r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.peer.setRemoteDescription(i)];case 2:return r.sent(),Mn.info("RTC Remote SDP was set successfully."),Mn.debug("RTC Remote SDP new value: ",t),[3,4];case 3:throw n=r.sent(),Mn.error("Error while setting RTC Remote SDP: ",n),n;case 4:return[2]}})}).call(this)},n.getRTCLocalSDP=function(){return jt(function(t){var i,n;return zt(this,function(r){switch(r.label){case 0:return void 0===t&&(t=Vn),Mn.info("Getting RTC Local SDP"),t=d(d({},Vn),t),Mn.debug("Options: ",t),(i=Wn(t.mediaStream))?$n(this.peer,i,t):Kn(this.peer,t),Mn.info("Creating peer offer"),[4,this.peer.createOffer()];case 1:return n=r.sent(),Mn.info("Peer offer created"),Mn.debug("Peer offer response: ",n.sdp),this.sessionDescription=n,t.disableAudio||(t.stereo&&(this.sessionDescription.sdp=Dn.setStereo(this.sessionDescription.sdp)),t.dtx&&(this.sessionDescription.sdp=Dn.setDTX(this.sessionDescription.sdp)),this.sessionDescription.sdp=Dn.setMultiopus(this.sessionDescription.sdp,i)),!t.disableVideo&&t.simulcast&&(this.sessionDescription.sdp=Dn.setSimulcast(this.sessionDescription.sdp,t.codec)),t.absCaptureTime&&(this.sessionDescription.sdp=Dn.setAbsoluteCaptureTime(this.sessionDescription.sdp)),t.dependencyDescriptor&&(this.sessionDescription.sdp=Dn.setDependencyDescriptor(this.sessionDescription.sdp)),t.setSDPToPeer?[4,this.peer.setLocalDescription(this.sessionDescription)]:[3,3];case 2:r.sent(),Mn.info("Peer local description set"),r.label=3;case 3:return[2,this.sessionDescription.sdp]}})}).apply(this,arguments)},n.addRemoteTrack=function(t,i){return jt(function(){var n;return zt(this,function(r){return n=this,[2,new ot(function(r,e){try{var s=n.peer.addTransceiver(t,{direction:"recvonly",streams:i});n.transceiverMap.set(s,r)}catch(t){e(t)}})]})}).call(this)},n.updateBandwidthRestriction=function(t,i){if(this.mode===Fn)throw Mn.error("Viewer attempting to update bitrate, this is not allowed"),new p("It is not possible for a viewer to update the bitrate.");return Mn.info("Updating bandwidth restriction, bitrate value: ",i),Mn.debug("SDP value: ",t),Dn.setVideoBitrate(t,i)},n.updateBitrate=function(t){return void 0===t&&(t=0),jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(this.mode===Fn)throw Mn.error("Viewer attempting to update bitrate, this is not allowed"),new p("It is not possible for a viewer to update the bitrate.");if(!this.peer)throw Mn.error("Cannot update bitrate. No peer found."),new p("Cannot update bitrate. No peer found.");return Mn.info("Updating bitrate to value: ",t),i=this,[4,this.peer.createOffer()];case 1:return i.sessionDescription=r.sent(),[4,this.peer.setLocalDescription(this.sessionDescription)];case 2:return r.sent(),n=this.updateBandwidthRestriction(this.peer.remoteDescription.sdp,t),[4,this.setRTCRemoteSDP(n)];case 3:return r.sent(),Mn.info("Bitrate restrictions updated: ","".concat(t>0?t:"unlimited"," kbps")),[2]}})}).call(this)},n.getRTCPeerStatus=function(){if(Mn.info("Getting RTC peer status"),!this.peer)return null;var t=Jn(this.peer);return Mn.info("RTC peer status getted, value: ",t),t},n.replaceTrack=function(t){if(this.peer){var i=this.peer.getSenders().find(function(i){return i.track.kind===t.kind});i?i.replaceTrack(t):Mn.error("There is no ".concat(t.kind," track in active broadcast."))}else Mn.error("Could not change track if there is not an active connection.")},n.getTracks=function(){var t,i;return null==(i=null==(t=this.peer)?void 0:t.getSenders())?void 0:i.map(function(t){return t.track})},n.initStats=function(t){this.peerConnectionStats?Mn.warn("PeerConnection.initStats() has already been called. Automatic initialization occurs via View.connect(), Publish.connect() or this.createRTCPeer(). See options"):this.peer?(this.peerConnectionStats=new ii(this.peer,t),$t(this.peerConnectionStats,this,[ti])):Mn.warn("Cannot init peer stats: RTCPeerConnection not initialized")},n.stopStats=function(){var t;null==(t=this.peerConnectionStats)||t.stop(),this.peerConnectionStats=null},i.getCapabilities=function(t){var i=new En,n=RTCRtpSender.getCapabilities(t);if(n){var r={},e=new RegExp("^video/(".concat(b.values(Bn).join("|"),")x?$"),"i");"audio"===t&&(e=new RegExp("^audio/(".concat(b.values(On).join("|"),")$"),"i"),i.isChrome()&&(r.multiopus={mimeType:"audio/multiopus",channels:6}));for(var s,u=Ft(n.codecs);!(s=u()).done;){var o=s.value,h=o.mimeType.match(e);if(h){var a=h[1].toLowerCase();if(r[a]=w(d({},r[a]),{mimeType:o.mimeType}),o.scalabilityModes){var c=r[a].scalabilityModes||[];c=[].concat(c,o.scalabilityModes),r[a].scalabilityModes=[].concat(new Set(c))}o.channels&&(r[a].channels=o.channels)}}n.codecs=b.keys(r).map(function(t){return d({codec:t},r[t])})}return n},i}(Gt),Hn=function(t){return(null==t?void 0:t.getAudioTracks().length)<=1&&(null==t?void 0:t.getVideoTracks().length)<=1},Wn=function(t){if(!t)return null;if(j(t,MediaStream)&&Hn(t))return t;if(!j(t,MediaStream)){Mn.info("Creating MediaStream to add received tracks.");for(var i,n=new MediaStream,r=Ft(t);!(i=r()).done;){var e=i.value;n.addTrack(e)}if(Hn(n))return n}throw Mn.error("MediaStream must have 1 audio track and 1 video track, or at least one of them."),new p("MediaStream must have 1 audio track and 1 video track, or at least one of them.")},zn=function(t,i){var n=new RTCPeerConnection(i);return Yn(t,n),n};function qn(t){return jt(function(){return zt(this,function(i){return[2,new ot(function(i){return g(i,t)})]})})()}var Xn,Gn,Qn,Yn=function(t,i){i.ontrack=function(i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:if(Mn.info("New track from peer."),Mn.debug("Track event value: ",i),!(n=t.transceiverMap.get(i.transceiver)))return[3,5];r.label=1;case 1:return i.transceiver.mid?[3,4]:[4,qn(100)];case 2:r.sent(),r.label=3;case 3:return[3,1];case 4:n(i.transceiver),t.transceiverMap.delete(i.transceiver),r.label=5;case 5:return g(function(){t.emit(Un.track,i)},0),[2]}})})()},i.connectionState?i.onconnectionstatechange=function(n){Mn.info("Peer connection state change: ",i.connectionState),t.emit(Un.connectionStateChange,i.connectionState)}:i.oniceconnectionstatechange=function(n){Mn.info("Peer ICE connection state change: ",i.iceConnectionState),t.emit(Un.connectionStateChange,i.iceConnectionState)},i.onnegotiationneeded=function(t){return jt(function(){var t,n;return zt(this,function(r){switch(r.label){case 0:return i.remoteDescription?(Mn.info("Peer onnegotiationneeded, updating local description"),[4,i.createOffer()]):[2];case 1:return t=r.sent(),Mn.info("Peer onnegotiationneeded, got local offer",t.sdp),t.sdp=Dn.updateMissingVideoExtensions(t.sdp,i.remoteDescription.sdp),[4,i.setLocalDescription(t)];case 2:return r.sent(),n=Dn.renegotiate(t.sdp,i.remoteDescription.sdp),Mn.info("Peer onnegotiationneeded, updating remote description",n),[4,i.setRemoteDescription({type:"answer",sdp:n})];case 3:return r.sent(),Mn.info("Peer onnegotiationneeded, renegotiation done"),[2]}})})()}},$n=function(t,i,n){Mn.info("Adding mediaStream tracks to RTCPeerConnection");for(var r,e=Ft(i.getTracks());!(r=e()).done;){var s=r.value,u={streams:[i]};"audio"===s.kind&&(u.direction=n.disableAudio?"inactive":"sendonly"),"video"===s.kind&&(u.direction=n.disableVideo?"inactive":"sendonly",n.scalabilityMode&&(new En).isChrome()?(Mn.debug("Video track with scalability mode: ".concat(n.scalabilityMode,".")),u.sendEncodings=[{scalabilityMode:n.scalabilityMode}]):n.scalabilityMode&&Mn.warn("SVC is only supported in Google Chrome")),t.addTransceiver(s,u),Mn.info("Track '".concat(s.label,"' added: "),"id: ".concat(s.id),"kind: ".concat(s.kind))}},Kn=function(t,i){var n=new En;if(!i.disableVideo){var r=t.addTransceiver("video",{direction:"recvonly"});n.isOpera()&&r.setCodecPreferences(RTCRtpReceiver.getCapabilities("video").codecs.filter(function(t){return"video/H264"!==t.mimeType||t.sdpFmtpLine.includes("profile-level-id=4")}))}i.disableAudio||t.addTransceiver("audio",{direction:"recvonly"});for(var e=0;e0&&-1===d.indexOf(v.codec))throw ir.error("Unsupported codec ".concat(v.codec,". Possible values are: "),d),new p("Unsupported codec ".concat(v.codec,". Possible values are: ").concat(d));if(v.codec===Bn.AV1&&(t=Dn.adaptCodecName(t,"AV1X",Bn.AV1)),g={name:this.streamName,sdp:t,codec:v.codec,sourceId:v.sourceId},v.priority){if(!(Number.isInteger(v.priority)&&v.priority>=-2147483648&&v.priority<=2147483647))throw new p("Invalid value for priority option. It should be a decimal integer between the range [-2^31, +2^31 - 1]");g.priority=v.priority}null!==v.record&&(g.record=v.record),Array.isArray(v.events)&&(g.events=v.events),_.label=1;case 1:if(_.trys.push([1,4,,5]),v.disableVideo&&v.disableAudio)throw new p("Not attempting to connect as video and audio are disabled");return[4,this.connect()];case 2:return _.sent(),ir.info("Sending publish command"),[4,this.transactionManager.cmd("publish",g)];case 3:return w=_.sent(),v.codec===Bn.AV1&&(m=null==(f=null==(c=null==(a=null==(h=RTCRtpSender.getCapabilities)?void 0:h.call(RTCRtpSender,"video"))?void 0:a.codecs)?void 0:c.find)?void 0:f.call(c,function(t){return"video/AV1X"===t.mimeType}),w.sdp=m?Dn.adaptCodecName(w.sdp,Bn.AV1,"AV1X"):w.sdp),[2,(ir.info("Command sent, publisherId: ",w.publisherId),ir.debug("Command result: ",w),this.serverId=w.publisherId,this.clusterId=w.clusterId,Y(this.streamName),K(this.serverId),Z(w.feedId),nt(this.clusterId),w.sdp)];case 4:throw y=_.sent(),ir.error("Error sending publish command, error: ",y),y;case 5:return[2]}})}).call(this)},n.cmd=function(t,i){return jt(function(){return zt(this,function(n){return[2,(ir.info("Sending cmd: ".concat(t)),this.transactionManager.cmd(t,i))]})}).call(this)},i}(Gt),or=function(t,i,n){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===b.keys(r).length&&(r={vad:t,pinnedSourceId:i,excludedSourceIds:n}),r},hr=function(t,i,n){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===b.keys(r).length&&(r={codec:null!=t?t:Bn.H264,record:i,sourceId:n}),r},ar=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).name="FetchError",r.status=n,r}return Pt(i,t),i}(si(p)),cr=wt.get("Director"),fr="WebRtc",vr="",dr="https://director.millicast.com",lr={setEndpoint:function(t){dr=t.replace(/\/$/,"")},getEndpoint:function(){return dr},setLiveDomain:function(t){vr=t.replace(/\/$/,"")},getLiveDomain:function(){return vr},getPublisher:function(t,i,n){return void 0===i&&(i=null),void 0===n&&(n=fr),jt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:r=gr(t,i,n),cr.info("Getting publisher connection path for stream name: ",r.streamName),e={streamName:r.streamName,streamType:r.streamType},s={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.token)},u="".concat(lr.getEndpoint(),"/api/director/publish"),c.label=1;case 1:return c.trys.push([1,4,,5]),[4,fetch(u,{method:"POST",headers:s,body:JSON.stringify(e)})];case 2:return[4,(o=c.sent()).json()];case 3:if("fail"===(h=c.sent()).status)throw new ar(h.data.message,o.status);return[2,(h=mr(h),cr.debug("Getting publisher response: ",h),Q(h.data.streamAccountId),h.data)];case 4:throw a=c.sent(),cr.error("Error while getting publisher connection path. ",a),a;case 5:return[2]}})})()},getSubscriber:function(t,i,n){return void 0===i&&(i=null),void 0===n&&(n=null),jt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:r=wr(t,i,n),Q(r.streamAccountId),cr.info("Getting subscriber connection data for stream name: ".concat(r.streamName," and account id: ").concat(r.streamAccountId)),e={streamAccountId:r.streamAccountId,streamName:r.streamName},s={"Content-Type":"application/json"},r.subscriberToken&&(s=w(d({},s),{Authorization:"Bearer ".concat(r.subscriberToken)})),u="".concat(lr.getEndpoint(),"/api/director/subscribe"),c.label=1;case 1:return c.trys.push([1,4,,5]),[4,fetch(u,{method:"POST",headers:s,body:JSON.stringify(e)})];case 2:return[4,(o=c.sent()).json()];case 3:if("fail"===(h=c.sent()).status)throw new ar(h.data.message,o.status);return[2,(h=mr(h),cr.debug("Getting subscriber response: ",h),r.subscriberToken&&(h.data.subscriberToken=r.subscriberToken),h.data)];case 4:throw a=c.sent(),cr.error("Error while getting subscriber connection path. ",a),a;case 5:return[2]}})})()}},gr=function(t,i,n){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===b.keys(r).length&&(r={token:t,streamName:i,streamType:n}),r},wr=function(t,i,n){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===b.keys(r).length&&(r={streamName:t,streamAccountId:i,subscriberToken:n}),r},mr=function(t){if(lr.getLiveDomain()){var i=/\/\/(.*?)\//,n=t.data.urls.map(function(t){var n=i.exec(t);return t.replace(n[1],lr.getLiveDomain())});t.data.urls=n}if(t.data.drmObject){var r=t.data.drmObject.playReadyUrl;r&&(t.data.drmObject.playReadyUrl="".concat(lr.getEndpoint()).concat(r));var e=t.data.drmObject.widevineUrl;e&&(t.data.drmObject.widevineUrl="".concat(lr.getEndpoint()).concat(e));var s=t.data.drmObject.fairPlayUrl;s&&(t.data.drmObject.fairPlayUrl="".concat(lr.getEndpoint()).concat(s));var u=t.data.drmObject.fairPlayCertUrl;u&&(t.data.drmObject.fairPlayCertUrl="".concat(lr.getEndpoint()).concat(u))}return t};function yr(t){this.message=t}yr.prototype=new p,yr.prototype.name="InvalidCharacterError";var pr=(void 0===f?"undefined":W(f))<"u"&&f.atob&&f.atob.bind(f)||function(t){var i=String(t).replace(/=+$/,"");if(i.length%4==1)throw new yr("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,e=0,s=0,u="";r=i.charAt(s++);~r&&(n=e%4?64*n+r:r,e++%4)?u+=String.fromCharCode(255&n>>(-2*e&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return u};function _r(t){this.message=t}function kr(t,i){if("string"!=typeof t)throw new _r("Invalid token specified");var n=!0===(i=i||{}).header?0:1;try{return JSON.parse(function(t){var i=t.replace(/-/g,"+").replace(/_/g,"/");switch(i.length%4){case 0:break;case 2:i+="==";break;case 3:i+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(pr(i).replace(/(.)/g,function(t,i){var n=i.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(t){return pr(i)}}(t.split(".")[n]))}catch(t){throw new _r("Invalid token specified: "+t.message)}}_r.prototype=new p,_r.prototype.name="InvalidTokenError";var br,Ar={exports:{}},Tr=(br||(br=1,function(t,i){!function(n){if(null!=i&&"number"!=typeof i.nodeType)t.exports=n();else{var r=n(),e=("undefined"==typeof self?"undefined":W(self))<"u"?self:$.global;"function"!=typeof e.btoa&&(e.btoa=r.btoa),"function"!=typeof e.atob&&(e.atob=r.atob)}}(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(t){this.message=t}return i.prototype=new p,i.prototype.name="InvalidCharacterError",{btoa:function(n){for(var r,e,s,u,o=String(n),h=0,a="";h255||e>255||s>255)throw new i("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");a+=t.charAt((u=r<<16|e<<8|s)>>18&63)+t.charAt(u>>12&63)+t.charAt(u>>6&63)+t.charAt(63&u)}switch(o.length%3){case 0:return a;case 1:return a.slice(0,-2)+"==";case 2:return a.slice(0,-1)+"="}},atob:function(n){var r=String(n).replace(/[=]+$/,"");if(r.length%4==1)throw new i("'atob' failed: The string to be decoded is not correctly encoded.");for(var e,s,u=0,o=0,h="";s=r.charAt(o++);~s&&(e=u%4?64*e+s:s,u++%4)?h+=String.fromCharCode(255&e>>(-2*u&6)):0)s=t.indexOf(s);return h}}})}(Ar,Ar.exports)),Ar.exports);function Sr(t){var i,n,r;return{lang:null!=(i=null==t?void 0:t.lang)?i:void 0,message:null==t?void 0:t.message,abortEarly:null!=(n=null==t?void 0:t.abortEarly)?n:void 0,abortPipeEarly:null!=(r=null==t?void 0:t.abortPipeEarly)?r:void 0}}function Er(t){var i,n,r,e=void 0===t?"undefined":W(t);return"string"===e?'"'.concat(t,'"'):"number"===e||"bigint"===e||"boolean"===e?"".concat(t):"object"===e||"function"===e?null!=(r=t&&(null==(n=null==(i=b.getPrototypeOf(t))?void 0:i.constructor)?void 0:n.name))?r:"null":e}function Ir(t,i,n,r,e){var s,u,o,h,a,c,f,v,d=e&&"input"in e?e.input:n.value,l=null!=(u=null!=(s=null==e?void 0:e.expected)?s:t.expects)?u:null,g=null!=(o=null==e?void 0:e.received)?o:Er(d),w={kind:t.kind,type:t.type,input:d,expected:l,received:g,message:"Invalid ".concat(i,": ").concat(l?"Expected ".concat(l," but r"):"R","eceived ").concat(g),requirement:t.requirement,path:null==e?void 0:e.path,issues:null==e?void 0:e.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},m="schema"===t.kind,y=null!=(v=null!=(f=null!=(c=null!=(a=null!=(h=null==e?void 0:e.message)?h:t.message)?a:function(t,i){var n;return null==(n=void 0)?void 0:n.get(i)}(t.reference,w.lang))?c:m?void w.lang:null)?f:r.message)?v:void w.lang;void 0!==y&&(w.message="function"==typeof y?y(w):y),m&&(n.typed=!1),n.issues?n.issues.push(w):n.issues=[w]}function Rr(t){return{version:1,vendor:"valibot",validate:function(i){return t["~run"]({value:i},Sr())}}}function Cr(t,i){return b.hasOwn(t,i)&&"__proto__"!==i&&"prototype"!==i&&"constructor"!==i}function Pr(t,i){var n,r=[].concat(new Set(t));return r.length>1?"(".concat(r.join(" ".concat(i," ")),")"):null!=(n=r[0])?n:"never"}var Nr,Dr=function(t){function i(i){var n;return(n=t.call(this,i[0].message)||this).name="ValiError",n.issues=i,n}return Pt(i,t),i}(si(p));function xr(t,i,n){return"function"==typeof t.fallback?t.fallback(i,n):t.fallback}function Br(t,i,n){return"function"==typeof t.default?t.default(i,n):t.default}function Or(t,i){return{kind:"schema",type:"array",reference:Or,expects:"Array",async:!1,item:t,message:i,get"~standard"(){return Rr(this)},"~run":function(t,i){var n,r=t.value;if(Array.isArray(r)){t.typed=!0,t.value=[];for(var e=0;e0&&(w=a.updateBandwidthRestriction(w,this.options.bandwidth)),[4,a.setRTCRemoteSDP(w)];case 8:return y.sent(),Zr.info("Broadcasting to streamName: ",this.streamName),m=this.webRTCPeer,this.webRTCPeer=a,this.setReconnect(),t.migrate&&this.webRTCPeer.on(Un.connectionStateChange,function(t){var i,n;["connected","disconnected","failed","closed"].includes(t)&&(null==(i=null==d?void 0:d.close)||i.call(d),null==(n=null==m?void 0:m.closeRTCPeer)||n.call(m),d=m=null)}),[2]}})}).call(this)},n.sendMetadata=function(t,i){var n;if(void 0===i&&(i="d40e38ea-d419-4c62-94ed-20ac37b4e4fa"),null!=(n=this.options)&&n.metadata&&this.worker)this.worker.postMessage({action:"metadata-sei-user-data-unregistered",uuid:i,payload:t});else{var r="Could not send metadata due to:";this.options?this.options.metadata?this.worker||(r+="\n- Stream not being published."):(r+="\n- Metadata option is not enabled.",this.options.codec!==Bn.H264&&(r+="\n- Incompatible codec. Only H264 available."),this.options.disableVideo&&(r+="\n- Video disabled.")):r+="\n- Stream not being published.",Zr.warn(r)}},i}(qr),ne=function(t){var i=function(t,i,n){var r=t["~run"]({value:i},Sr(n));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}(Jr=Jr||Lr({sourceId:Fr(jr()),stereo:Fr(Mr()),dtx:Fr(Mr()),absCaptureTime:Fr(Mr()),dependencyDescriptor:Fr(Mr()),mediaStream:Fr(Wr([Or(zr()),zr()])),bandwidth:Fr(Ur()),metadata:Fr(Mr()),disableVideo:Fr(Mr()),disableAudio:Fr(Mr()),codec:Fr(Vr(b.values(Bn))),simulcast:Fr(Mr()),scalabilityMode:Fr(jr()),peerConfig:Fr(Lr({autoInitStats:Fr(Mr()),statsIntervalMs:Fr(Ur())})),record:Fr(Mr()),events:Fr(Or(Vr(["active","inactive","viewercount"]))),priority:Fr(Ur())}),t),n=i.success,r=i.issues;n||Zr.warn(new Dr(r),t)};function re(t){if(!t)return new I;for(var i=t.length,n=new I(i/2),r=0;r=4&&(r=console)[e(323)].apply(r,[].concat([this[e(310)]],i))},i[pe(331)]=function(){for(var t=arguments.length,i=new Array(t),n=0;n=3&&(r=console)[e(331)].apply(r,[].concat([this[e(310)]],i))},i[pe(320)]=function(){for(var t=arguments.length,i=new Array(t),n=0;n=2&&(r=console)[e(320)].apply(r,[].concat([this[e(310)]],i))},i.error=function(){for(var t=arguments.length,i=new Array(t),n=0;n=1&&(r=console).error.apply(r,[].concat([this.tag],i))},t}();function be(t){return new ke(t)}var Ae={logLevel:3,mediaDumps:{video:{in:{durationMs:0,delimited:!0},out:{durationMs:0}},audio:{in:{durationMs:0},out:{durationMs:0}}}};function Te(){return(new Date)[pe(317)]().slice(11,-1)}function Se(){var t=["mediaBuffer","click","529321KfbOwo","endTimestampMs","28972188cmcnxe","containerFileExt","info","4ZlZeJQ","9kyfNFe","mediaType","172953TzXwsI","byteLength","1327806tybvjI","href","createObjectURL","1089qysnCz","112088WLFXHK","substring","tag","692993ZcAeLj","set","download","810qiScYX","startTimestampMs","8821555KArxhe","toISOString","application/octet-stream","logLevel","warn","revokeObjectURL","42PDuKrJ","debug","targetDurationMs"];return(Se=function(){return t})()}var Ee=function(){function t(t,i,n){var r=pe;this[r(325)]=null,this[r(315)]=-1,this.endTimestampMs=-1,this[r(301)]=t,this[r(330)]=i,this[r(324)]=n,n>0&&(this[r(325)]=new I)}return t.prototype.append=function(t,i){var n,r,e,s,u=pe;if(!this[u(325)])return!1;if(this[u(325)]=(n=this[u(325)],r=t,(s=new I((0|n[(e=pe)(303)])+(0|r.byteLength)))[e(312)](n,0),s[e(312)](r,0|n.byteLength),s),void 0!==i)if(-1===this[u(315)])this.startTimestampMs=i,this[u(328)]=i+this[u(324)];else if(i>=this[u(328)]){var o=(new Date)[u(317)]()[u(309)](0,19).replace(/:/g,"-"),h=this.mediaType+"-"+o+"."+this.containerFileExt;return function(t,i,n){void 0===n&&(n=pe(318));var r=pe,e=v.createElement("a"),s=new Blob([t],{type:n});e.href=URL[r(306)](s),e[r(313)]=i,e[r(326)](),URL[r(321)](e[r(305)])}(this[u(325)],h),this.mediaBuffer=null,!1}return!0},t}(),Ie=Ne;!function(){for(var t=Ne,i=ze();;)try{if(T(t(160))/1+-T(t(363))/2+-T(t(321))/3*(-T(t(401))/4)+T(t(229))/5+-T(t(276))/6+T(t(400))/7*(-T(t(153))/8)+-T(t(223))/9==858456)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var Re=be("[MUX]"),Ce=ye[Ie(387)];function Pe(t,i){var n=Ie,r=new I((0|t[n(413)])+(0|i[n(413)]));return r.set(t,0),r[n(251)](i,0|t[n(413)]),r}function Ne(t,i){var n=ze();return(Ne=function(t,i){return n[t-=147]})(t,i)}function De(t,i,n){return void 0===i&&(i=0),void 0===n&&(n=1/0),function(t,i,n,r){var e=Ie,s=r[e(425)]||1;i*=s,n*=s;var u,o=j(u=t,ArrayBuffer)?u:u[Ie(366)],h=(t[e(188)]||0)+t[e(413)],a=(t[e(188)]||0)+i,c=A[e(177)](0,A[e(291)](a,h)),f=A[e(291)](c+A[e(177)](n,0),h);return new r(o,c/=s,(f/=s)-c)}(t,i,n,I)}function xe(t){var i=Ie,n=Array.from(t)[i(238)](function(t){return t[i(384)](0)});return new I(n)}var Be=function(t,i,n,r,e,s,u,o,h,a,c,f,v,d,l){function g(t){var i=Ie;this[i(452)]=t,this[i(402)]=(96&this[i(452)][0])>>5,this[i(186)]=31&this[i(452)][0],this.isvcl=1==this[i(186)]||5==this[i(186)],this[i(309)]="",this.isfmb=!1}var w=g.prototype;return w[o]=function(){var t=Ie;return g[t(234)](this)+": NRI: "+this[t(209)]()},w[h]=function(){return this[Ie(402)]},w[a]=function(){return this[Ie(186)]},w[c]=function(){return this[Ie(186)]===g.IDR},w[f]=function(){return this[Ie(452)]},w[v]=function(){return this[Ie(452)].byteLength},w[d]=function(){return 4+this[Ie(327)]()},w[l]=function(){var t=Ie,i=new I(this[t(194)]());return new DataView(i[t(366)]).setUint32(0,this[t(194)]()-4),i[t(251)](this.getPayload(),4),i},g[u]=function(t){var i=Ie;return t[i(186)]in g[i(159)]?g[i(159)][t.ntype]:i(344)},xt(g,null,[{key:t,get:function(){return 1}},{key:i,get:function(){return 5}},{key:"SEI",get:function(){return 6}},{key:n,get:function(){return 7}},{key:r,get:function(){return 8}},{key:e,get:function(){return 9}},{key:s,get:function(){var t,i=Ie;return(t={})[g[i(427)]]=i(427),t[g[i(273)]]=i(273),t[g[i(324)]]=i(324),t[g.PPS]="PPS",t[g[i(449)]]="NDR",t[g.AUD]=i(272),t}}]),g}(Ie(449),Ie(427),Ie(324),Ie(379),Ie(272),Ie(159),Ie(234),Ie(365),Ie(209),Ie(234),Ie(306),Ie(203),Ie(327),Ie(194),Ie(341)),Oe=function(){function t(t){var i=Ie;this[i(316)]=t,this[i(368)]=0,this[i(157)]=8*t.byteLength}var i=t.prototype;return i[Ie(433)]=function(t){var i=Ie;this.data=t,this[i(368)]=0,this.bitLength=8*t[i(413)]},i.skipBits=function(t){var i=Ie;if(this[i(451)]>>e,u=8-e;if(u>=t)return n&&(this[r(368)]+=t),s>>u-t;n&&(this[r(368)]+=u);var o=t-u;return s<>>1:-1*(t>>>1)},i[Ie(239)]=function(){return 1===this[Ie(338)](1)},i[Ie(419)]=function(t){return void 0===t&&(t=1),this.readBits(8*t)},i[Ie(232)]=function(){return this.readBits(16)},i.readUInt=function(){return this[Ie(338)](32)},xt(t,[{key:Ie(451),get:function(){return this[Ie(157)]-this.index}}]),t}(),Me=function(t,i,n,r,e,s,u){function o(t){var i=Ie;this.remuxer=t,this[i(233)]=t.mp4track}var h=o.prototype;return h[e]=function(t){var i=Ie,n=o[i(432)](new I(t));this.track[i(237)]=n.width,this[i(233)].height=n.height,this.track[i(382)]=[new I(t)],this.track[i(210)]=i(292);for(var r=new DataView(t.buffer,t[i(188)]+1,4),e=0;e<3;++e){var s=r[i(313)](e)[i(365)](16);s[i(268)]<2&&(s="0"+s),this.track[i(210)]+=s}},h[s]=function(t){var i=Ie;this[i(233)][i(434)]=[new I(t)]},h[u]=function(t){var i=Ie;if(!t)return!1;var n=!1;switch(t[i(234)]()){case Be[i(427)]:case Be.NDR:n=!0;break;case Be[i(379)]:!this[i(233)][i(434)]&&(this[i(345)](t.getPayload()),!this[i(175)][i(296)]&&this[i(233)][i(434)]&&this.track[i(382)]&&(this.remuxer[i(296)]=!0)),n=!0;break;case Be[i(324)]:!this.track.sps&&(this[i(256)](t[i(203)]()),!this[i(175)][i(296)]&&this[i(233)].pps&&this[i(233)][i(382)]&&(this.remuxer[i(296)]=!0)),n=!0;break;case Be[i(272)]:break;case Be.SEI:n=!0}return n},o[t]=function(t,i){for(var n=Ie,r=[],e=!1,s=!1,u=!1,o=!1,h=0,a=0,c=0,f=[];h<=t.byteLength;){if(h1&&(c=a>2?4:3,f.push(h)),a=0):++a}else c=0,f.push(h++);if(f.length>1){var d=f.shift(),l=f[0]-c;if(d1&&3===p&&(a=0,p=t[h++]),0!==p?a=0:++a,m[y++]=p}r.push(m.subarray(0,y))}}}}var _=!0,k=!1;return s||e?s&&e&&(Re[n(265)](n(331)),_=!1):(Re[n(265)]("[H264Parser] No VCL NALUs found"),_=!1),e&&(u&&o?k=!0:Re.warn(n(158))),{valid:_,idr:k,nalus:r}},o[i]=function(t,i){for(var n=8,r=8,e=0;e0&&p[1]>0&&(l=p[0]/p[1])}a.readBoolean()&&a[h(155)](1),a[h(239)]()&&(a[h(155)](4),a[h(239)]()&&a[h(155)](24)),a[h(239)]()&&(a[h(334)](),a[h(334)]()),a.readBoolean()&&(a.readUInt(),a[h(187)](),a.readBoolean())}return{width:A[h(440)]((16*(r+1)-2*c-2*f)*l),height:(2-s)*(e+1)*16-(s?2:4)*(v+d)}},o[r]=function(t){var i=Ie,n=new Oe(t[i(203)]());n[i(419)](),t[i(196)]=0===n[i(179)](),t[i(309)]=n[i(179)]()},o}(Ie(267),Ie(333),Ie(432),Ie(386),Ie(256),Ie(345),Ie(378)),Le=function(){function t(t){var i=Ie;this.listener={},this[i(234)]=""|t}var i=t.prototype;return i.on=function(t,i){var n=Ie;return!this[n(270)][t]&&(this.listener[t]=[]),this[n(270)][t].push(i),!0},i.off=function(t,i){var n=Ie;if(this[n(270)][t]){var r=this[n(270)][t].indexOf(i);return r>-1&&this[n(270)][t][n(369)](r,1),!0}return!1},i[Ie(219)]=function(){this.listener={}},i[Ie(225)]=function(t,i){var n=Ie;return!!this[n(270)][t]&&(this[n(270)][t].map(function(t){t[n(200)](null,[i])}),!0)},t}(),Fe=function(){function t(i){var n,r,e=Ie;for(var s in this[e(285)]=i,this.saiIvSize={video:"cenc"===(null==(n=i.config[e(415)])?void 0:n[e(201)])?16:0,audio:"cenc"===(null==(r=i[e(154)][e(407)])?void 0:r[e(201)])?16:0},t[e(212)]={avc1:[],encv:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],Opus:[],dOps:[],enca:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],pssh:[],sinf:[],frma:[],schm:[],schi:[],tenc:[],saiz:[],saio:[],senc:[]},t[e(212)])t.types[s]=[s[e(384)](0),s[e(384)](1),s[e(384)](2),s.charCodeAt(3)];var u=new I([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 I([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]);t.HDLR_TYPES={video:u,audio:o};var h=new I([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new I([0,0,0,0,0,0,0,0]);t.STTS=t[e(377)]=t[e(213)]=a,t.STSZ=new I([0,0,0,0,0,0,0,0,0,0,0,0]),t[e(438)]=new I([0,0,0,1,0,0,0,0,0,0,0,0]),t[e(307)]=new I([0,0,0,0,0,0,0,0]),t[e(168)]=new I([0,0,0,0,0,0,0,1]);var c=new I([105,115,111,109]),f=new I([97,118,99,49]),v=new I([0,0,0,1]);t[e(183)]=t[e(347)](t[e(212)].ftyp,c,v,c,f),t[e(147)]=t[e(347)](t.types.dinf,t[e(347)](t[e(212)][e(280)],h))}var i=t.prototype;return i[Ie(190)]=function(i){var n=Ie;return t[n(347)](t[n(212)][n(190)],t[n(418)][i])},i[Ie(244)]=function(i){var n=Ie;return t[n(347)](t[n(212)][n(244)],i)},i[Ie(380)]=function(i,n){var r=Ie;return t[r(347)](t[r(212)][r(380)],new I([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24,i>>>16&255,i>>>8&255,255&i,0,0,0,0,85,196,0,0]))},i[Ie(215)]=function(i){var n=Ie;return t[n(347)](t[n(212)].mdia,this[n(380)](i[n(274)],i[n(290)]),this[n(190)](i[n(234)]),this[n(230)](i))},i[Ie(443)]=function(i){var n=Ie;return t.box(t[n(212)][n(443)],new I([0,0,0,0,i>>>24,i>>>16&255,i>>>8&255,255&i]))},i[Ie(230)]=function(i){var n=Ie;return i[n(234)]===n(407)?t[n(347)](t[n(212)][n(230)],t.box(t.types[n(255)],t.SMHD),t[n(147)],this[n(362)](i)):t[n(347)](t.types[n(230)],t[n(147)],this[n(362)](i),t[n(347)](t[n(212)].vmhd,t[n(438)]))},i[Ie(370)]=function(i,n,r){var e=Ie;return t[e(347)](t.types.moof,this[e(443)](i),this[e(293)](r,n))},i[Ie(295)]=function(i,n,r){for(var e=Ie,s=i[e(268)],u=[];s--;)u[s]=this.trak(i[s]);return t.box[e(200)](null,[t[e(212)][e(295)],this[e(240)](r,n),this[e(447)](i)][e(389)](u)[e(389)](this[e(322)](i)))},i[Ie(322)]=function(i){for(var n=Ie,r=i[n(268)],e=[];r--;)e[r]=this[n(305)](i[r]);return t[n(347)][n(200)](null,[t[n(212)][n(322)]][n(389)](e))},i[Ie(240)]=function(i,n){var r=Ie,e=new I([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24,i>>>16&255,i>>>8&255,255&i,n>>>24,n>>>16&255,n>>>8&255,255&n,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[r(347)](t.types.mvhd,e)},i[Ie(420)]=function(i){for(var n=Ie,r=i[n(428)]||[],e=new I(4+r.length),s=0;s>>8&255),u.push(255&e),u=u[s(389)](Array.prototype[s(314)][s(395)](r));for(n=0;n>>8&255),o[s(406)](255&e),o=o.concat(Array.prototype[s(314)].call(r));var h=t[s(347)](t[s(212)][s(408)],new I([1,u[3],u[4],u[5],255,224|i.sps[s(268)]].concat(u)[s(389)]([i[s(434)][s(268)]]).concat(o))),a=i[s(237)],c=i[s(374)],f=t[s(347)](t.types[s(441)],t.box(t[s(212)][s(318)],new I([97,118,99,49])),t[s(347)](t[s(212)][s(349)],new I([].concat([0,0,0,0],xe(this[s(285)][s(154)][s(415)][s(201)]),[0,1,0,0]))),t.box(t.types[s(217)],this[s(298)](s(415))));return t[s(347)](t[s(212)].encv,new I([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,a>>>8&255,255&a,c>>>8&255,255&c,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,65,86,67,32,67,111,100,105,110,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]),h,f)},i[Ie(372)]=function(t){var i=Ie,n=t[i(154)][i(413)],r=new I(26+n+3);return r[i(251)]([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5,n]),r[i(251)](t[i(154)],26),r.set([6,1,2],26+n),r},i[Ie(403)]=function(i){var n=Ie,r=i[n(354)];return t[n(347)](t[n(212)][n(403)],new I([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i[n(390)],0,16,0,0,0,0,r>>>8&255,255&r,0,0]),t[n(347)](t[n(212)][n(372)],this[n(372)](i)))},i[Ie(266)]=function(t){var i=Ie,n=t[i(354)];return new I([0,t[i(390)],1,56,0,0,n>>>8&255,255&n,0,0,0])},i[Ie(416)]=function(i){var n=Ie,r=i.audiosamplerate;return t[n(347)](t.types[n(416)],new I([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i[n(390)],0,16,0,0,0,0,r>>>8&255,255&r,0,0]),t[n(347)](t[n(212)][n(266)],this[n(266)](i)))},i[Ie(394)]=function(i){var n=Ie,r=t[n(347)](t.types[n(266)],this.dOps(i)),e=t[n(347)](t.types[n(441)],t.box(t.types.frma,new I([79,112,117,115])),t[n(347)](t.types.schm,new I([].concat([0,0,0,0],xe(this[n(285)][n(154)].audio[n(201)]),[0,1,0,0]))),t.box(t.types[n(217)],this[n(298)](n(407)))),s=i[n(354)];return t[n(347)](t[n(212)].enca,new I([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i[n(390)],0,16,0,0,0,0,s>>>8&255,255&s,0,0]),r,e)},i[Ie(165)]=function(i){var n=Ie;return i[n(234)]===n(407)?t[n(347)](t[n(212)][n(165)],t[n(168)],i[n(199)]?this[n(394)](i):this[n(416)](i)):t[n(347)](t.types[n(165)],t[n(168)],this[n(303)](i))},i[Ie(278)]=function(i){var n=Ie,r=i.id,e=i[n(290)],s=i[n(237)],u=i[n(374)],o=i[n(388)];return t[n(347)](t[n(212)].tkhd,new I([0,0,0,7,0,0,0,0,0,0,0,0,r>>>24,r>>>16&255,r>>>8&255,255&r,0,0,0,0,e>>>24,e>>>16&255,e>>>8&255,255&e,0,0,0,0,0,0,0,0,0,0,0,0,255&o,o%1*10&255,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,s>>>8&255,255&s,0,0,u>>>8&255,255&u,0,0]))},i[Ie(293)]=function(i,n){var r,e=Ie,s=i.id,u=i[e(428)][0][e(171)],o=i.samples[0][e(290)],h=i[e(428)][0].flags,a=t[e(347)](t[e(212)].tfhd,new I([0,2,0,58,s>>>24,s>>>16&255,s>>>8&255,255&s,0,0,0,1,o>>>24,s>>>16&255,o>>>8&255,255&o,u>>>24,u>>>16&255,u>>>8&255,255&u,0,h[e(264)],0,0])),c=t[e(347)](t[e(212)].tfdt,new I([0,0,0,0,n>>>24,n>>>16&255,n>>>8&255,255&n]));if(i.encrypted){var f,v;if(i[e(234)]===e(415)?(f=!0,v=this[e(350)][e(415)]+(null==(r=i.samples[0][e(191)])?void 0:r.byteLength)):(f=!1,v=this[e(350)].audio),v>0){var d=this[e(242)](v),l=this[e(340)](i[e(428)],f),g=d[e(268)]+20+l[e(268)]+a[e(268)]+c[e(268)]+8+16+8+8,w=this[e(271)](i,g);return t[e(347)](t[e(212)][e(293)],a,c,w,d,this.saio(g-l[e(268)]+w.length+8),l)}var m=this[e(340)](null,!1),y=m.length+a[e(268)]+c[e(268)]+8+16+8+8,p=this[e(271)](i,y);return t[e(347)](t.types[e(293)],a,c,p,m)}return t.box(t[e(212)].traf,a,c,this.trun(i,a[e(268)]+c.length+8+16+8+8))},i.trak=function(i){var n=Ie;return i.duration=i[n(290)]||4294967295,t.box(t[n(212)].trak,this[n(278)](i),this[n(215)](i))},i[Ie(305)]=function(i){var n=Ie,r=i.id;return t[n(347)](t.types[n(305)],new I([0,0,0,0,r>>>24,r>>>16&255,r>>>8&255,255&r,0,0,0,1,0,0,0,16,0,0,0,0,0,0,0,0]))},i.trun=function(i,n){var r=Ie,e=(i[r(428)]||[])[r(268)],s=new I(12);return n+=20,s.set([0,0,0,1,e>>>24,e>>>16&255,e>>>8&255,255&e,n>>>24,n>>>16&255,n>>>8&255,255&n],0),t[r(347)](t.types[r(271)],s)},i[Ie(224)]=function(t,i){var n,r,e,s=Ie,u=s(445),o=function(t){var i=function(t){for(var i=Ie,n="",r=0;r',s(308),"",s(398),s(353),s(216)+o+'"',">",s(412),s(249),s(391),i?""+i+s(423):"",s(351),s(269)].join("")))},i.pssh=function(i){var n=Ie;if(this[n(285)][n(383)][n(202)](n(178)))return t[n(347)](t.types[n(447)],new I([].concat([0,0,0,0,237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237,0,0,0,18,18,16],this[n(285)][n(154)][i[0][n(234)]].keyId)));if(this[n(285)][n(383)]===n(356)){var r=this[n(224)](this[n(285)][n(154)][i[0][n(234)]][n(429)],this.drm[n(371)]),e=r[n(413)];return t[n(347)](t[n(212)][n(447)],new I([].concat([0,0,0,0,154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149,e>>>24,e>>>16&255,e>>>8&255,255&e],r)))}return this.drm[n(383)]===n(323)?t[n(347)](t[n(212)][n(447)],new I([].concat([1,0,0,0,16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75,0,0,0,1],this.drm[n(154)][i[0].type].keyId,[0,0,0,0]))):this.drm[n(383)]===n(397)?null:void Re[n(189)](n(393)+this[n(285)][n(383)])},i[Ie(298)]=function(i){var n,r,e=Ie,s=this[e(285)][e(154)][i];return s[e(201)]===e(226)?(n=new I([].concat([16],s.iv)),r=25):(n=new I([]),r=0),t[e(347)](t[e(212)][e(298)],new I([].concat([1,0,0,0,0,r,1,this[e(350)][i]],s[e(429)],n)))},i[Ie(242)]=function(i){var n=Ie;return t[n(347)](t[n(212)][n(242)],new I([0,0,0,0,i,0,0,0,1]))},i[Ie(204)]=function(i){var n=Ie;return t[n(347)](t[n(212)][n(204)],new I([0,0,0,0,0,0,0,1,i>>>24,i>>>16&255,i>>>8&255,255&i]))},i[Ie(340)]=function(i,n){var r=Ie,e=null;return i&&(1!==i[r(268)]&&Re[r(189)](r(182)+i[r(268)]+" samples - expected 1"),e=i[0][r(191)]),e&&e[r(413)]?t[r(347)](t[r(212)].senc,new I([].concat([0,0,0,n?2:0,0,0,0,1],e))):t.box(t[r(212)][r(340)],new I([0,0,0,0,0,0,0,1]))},i[Ie(439)]=function(i,n,r){var e=Ie,s=this[e(295)](i,n,r),u=new I(t[e(183)].byteLength+s[e(413)]);return u[e(251)](t[e(183)]),u[e(251)](s,t[e(183)][e(413)]),u},t.box=function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r>>24,e[1]=u>>>16&255,e[2]=u>>>8&255,e[3]=255&u,e[s(251)](t,4),o=0,u=8;o0)for(var e=0;e0&&this.readyToDecode&&(this[e(207)][e(263)]+=a,this[e(428)].push({units:h,size:a,keyFrame:o.keyFrame,duration:o[e(290)],sampleAuxInfo:i,timestamp:n}))}},n[Ie(161)]=function(){var t=Ie;if(!this[t(211)]()||!this[t(428)])return null;var i,n=this.mp4track[t(428)],r=this.samples[t(342)](),e=r.units,s=(1e3*r[t(332)]|0)-this[t(222)]|0;s<5&&(s=5),s>5e3&&Re[t(381)](t(430)+(s/1e3|0)+" s"),this.dts=this[t(222)],this[t(222)]+=s,i={size:r.size,duration:s,cts:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,isNonSync:r[t(148)]?0:1,dependsOn:r[t(148)]?2:1},sampleAuxInfo:r[t(191)]};for(var u,o=0,h=Ft(e);!(u=h()).done;)o+=u.value[t(194)]();for(var a,c=0,f=new I(o),v=Ft(e);!(a=v()).done;){var d=a.value;f[t(251)](d[t(341)](),c),c+=d[t(194)]()}return n.push(i),new I(f[t(366)],0,o)},i}(Ve),We=function(t){function i(i,n){var r,e=Ie;return(r=t.call(this,e(175))||this)[e(260)]=!1,r.trackTypes=[],r[e(357)]={},r[e(274)]=1e3,r[e(163)]=0,r[e(361)]=i,r.mp4=n,r}Pt(i,t);var n=i.prototype;return n[Ie(281)]=function(t){var i=Ie;("video"===t||"both"===t)&&(this[i(357)][i(415)]=new He(this.timescale,this[i(361)]),this[i(335)][i(406)](i(415))),(t===i(407)||t===i(417))&&(this[i(357)][i(407)]=new je(this.timescale),this.trackTypes[i(406)](i(407)))},n[Ie(250)]=function(){for(var t,i=Ie,n=Ft(this[i(335)]);!(t=n()).done;){var r=t.value;this.tracks[r].resetTrack()}this[i(260)]=!1},n[Ie(262)]=function(){var t=Ie;this.tracks={},this[t(219)]()},n[Ie(246)]=function(){var t=Ie;if(this[t(260)])for(var i,n=Ft(this[t(335)]);!(i=n()).done;)for(var r=i.value,e=this[t(357)][r];;){var s=e[t(161)]();if(!s||!s.byteLength)break;var u={type:r,payload:Pe(this[t(164)][t(370)](e[t(437)]++,e[t(336)],e[t(207)]),this.mp4[t(244)](s)),dts:e[t(336)]};this[t(225)](t(366),u),e[t(246)]()}else this[t(211)]()&&(this[t(225)]("ready"),this.initSegment(),this[t(260)]=!0,this[t(246)]())},n[Ie(439)]=function(){for(var t,i=Ie,n=Ft(this[i(335)]);!(t=n()).done;){var r=t.value,e=this[i(357)][r],s={type:r,payload:this[i(164)][i(439)]([e[i(207)]],this[i(163)],this.timescale)};this[i(225)]("buffer",s)}},n.isReady=function(){for(var t,i=Ie,n=Ft(this[i(335)]);!(t=n()).done;){var r=t.value;if(!this.tracks[r][i(296)]||!this[i(357)][r][i(428)][i(268)])return!1}return!0},n[Ie(181)]=function(t){for(var i,n=Ie,r=Ft(this[n(335)]);!(i=r()).done;){var e=i.value,s=t[e];s.length>0&&this[n(357)][e][n(181)](s,"audio"===e?t.audioSampleAuxInfo:t[n(310)],t[n(332)])}this[n(246)]()},i}(Le);function ze(){var t=["stsd","isSupported","src","STSD","endMSE","abort","size","appendBufferError","addSourceBuffer","setupMSE","remuxer","addEventListener","max","com.widevine","readUEG"," - ","remux","Received ","FTYP","readyState","valid","ntype","readUInt","byteOffset","error","hdlr","sampleAuxInfo","webkitsourceopen","Checking codec","getSize","irrecoverableError","isfmb","[MSE] buffer error:","url","encrypted","apply","encryption","startsWith","getPayload","saio","open","[MSE] source buffer error","mp4track","append","getNri","codec","isReady","types","STCO","feed","mdia",'VALUE="',"schi","STSZ","offAll","jmuxer","skipEG","nextDts","1036611gAoRea","generatePlayReadyHeader","dispatch","cbcs","stsc","endOfStream","6576815frVeWy","minf","releaseBuffer","readUShort","track","type","stsz","isvcl","width","map","readBoolean","mvhd","onReady","saiz","reportDiscontinuity","mdat","bufferControllers","flush","patchSampleAuxinfo","readEG","","reset","set","onMSEClose","setUint16","idr","smhd","parseSPS","bind","message","getBits","initialized","sourceBuffer","destroy","len","isNonSync","warn","dOps","extractNALUs","length","","listener","trun","AUD","SEI","timescale","Num frames in chunk: ","7620738FWzrwf","mode","tkhd","dbgMediaDump","dref","addTrack","doAppend","options","[MSE] sourceclose","drm","mediaSource","Failure: Browser doesn't support MSE/MMS",'/mp4; codecs="',"function","duration","min","avc1.","traf","[MSE] sourceopen","moov","readyToDecode","resetTrack","tenc","onMSEOpen","MediaSource","removeSourceBuffer","h264","encv","sourceopen","trex","isKeyframe","SMHD","","stype","videoSampleAuxInfo","ended","getElementById","getUint8","slice","audioSampleAuxInfo","data","ready","frma","mseReady","string","4760043VatbTq","mvex","org.w3.clearkey","SPS","buffered","no video element were found to render, provide a valid video element","getPayloadSize",'","out",'","units","Unsupported DRM type ","enca","call","POSITIVE_INFINITY","com.apple.fps","","getVideoFrames","646233hEZDuD","4LuRDMh","nri","mp4a","ManagedMediaSource","buffer error","push","audio","avcC","onError","Buffered range ","getTrackID","","byteLength","No A/V data","video","Opus","both","HDLR_TYPES","readUByte","sdtp","STTS","hasRedundancy","","revokeObjectURL","BYTES_PER_ELEMENT","webkitsourceclose","IDR","samples","keyId","timestamp gap: ","node","readSPS","setData","pps","onBuffer","remuxController","seq","VMHD","initSegment","ceil","sinf","sourceclose","mfhd","skipLZ","http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader","Browser does not support codec","pssh","mediasource is not available to end: ","NDR","isReset","bitsAvailable","payload","DINF","keyFrame","isDependedOn","isTypeSupported","assign","waitingForIdr","8hmeyto","config","skipBits","remove","bitLength","[H264Parser] IDR without SPS/PPS, not suitable for recovery","TYPES","13659xNePtU","getFramePayload","onBufferError","mediaDuration","mp4"];return(ze=function(){return t})()}var qe=function(t){function i(i,n,r){var e,s,u=Ie;(e=t.call(this,u(366))||this)[u(234)]=n,e[u(337)]=new I;var o=null==(s=Ae.mediaDumps[n])?void 0:s[u(352)].durationMs;return o>0&&(e[u(279)]=new Ee(n,u(164),o)),e.sourceBuffer=i,e[u(385)]=r,e[u(195)]=!1,e[u(261)].addEventListener(u(189),function(t){var i=u;Re.warn(i(206),t,e.type),e[i(195)]=!0,e.dispatch("error",{type:e[i(234)],name:i(366),error:i(405)})}),e}Pt(i,t);var n=i.prototype;return n[Ie(262)]=function(){var t=Ie;this[t(337)]=null,this[t(279)]=null;try{this[t(261)]&&(this.sourceBuffer[t(170)](),this.mse[t(301)](this[t(261)]),this.sourceBuffer=null)}catch(t){}this.offAll()},n[Ie(282)]=function(){var t=Ie;if(this[t(337)][t(268)]&&this[t(261)]&&!this.sourceBuffer.updating){if(this[t(261)].buffered.length>1){for(var i=0;i=0&&(e[c][n(392)]=e[c][n(392)].concat(r))}return 1!==e[n(268)]&&Re.warn(n(275)+e[n(268)]),e},n[Ie(360)]=function(t,i){if(!t)return 0;for(var n=(t[0]<<8)+t[1],r=i+2+4,e=0,s=2;0=0&&(t[r]=e>>>8&255,t[r+1]=255&e)}return 0},n[Ie(376)]=function(){var t=Ie;if(this[t(319)]&&this[t(436)]&&this[t(436)][t(211)]()&&!this[t(245)])for(var n in this[t(245)]={},this[t(436)][t(357)]){var r=this.remuxController[t(357)][n],e=""[t(389)](n,t(288)).concat(r.mp4track[t(210)],'"');if(Re[t(381)](t(193),e),!i[t(166)](e))return Re.error(t(446)),!1;var s=this.mediaSource[t(173)](e);this[t(245)][n]=new qe(s,n,this[t(286)]),this[t(245)][n].on(t(189),this[t(162)][t(257)](this))}},n[Ie(231)]=function(){var t=Ie;for(var i in this.bufferControllers)this[t(245)][i][t(282)]()},n[Ie(435)]=function(t){var i=Ie;this[i(319)]&&this[i(245)]&&this[i(245)][t[i(234)]]&&this[i(245)][t[i(234)]].feed(t[i(452)],t[i(336)])},n.onMSEOpen=function(){var t=Ie;Re[t(381)](t(294)),this[t(286)].readyState!==t(311)&&(this[t(286)][t(290)]=Number[t(396)],this[t(319)]=!0,W(this[t(283)].onReady)===t(289)&&this[t(283)][t(241)][t(395)](null,this.isReset),URL[t(424)](this[t(198)]),this[t(376)]())},n[Ie(252)]=function(){var t=Ie;Re[t(381)](t(284)),this.mseReady=!1,this[t(169)]()},n.onBufferError=function(t){var i=Ie;Re.warn(i(197),t),this[i(195)]=!0,this.endMSE(),W(this.options[i(409)])===i(289)&&this[i(283)][i(409)][i(395)](null,t)},i.isSupported=function(t){var i=Ie;return f[i(404)]?f.ManagedMediaSource[i(150)](t):!!f[i(300)]&&f[i(300)][i(150)](t)},i}(Le);function Ge(t,i){var n=Qe();return(Ge=function(t,i){return n[t-=182]})(t,i)}function Qe(){var t=["1247170HwkwNv","bv","gitVersion","352GaBvIm","toISOString","14XlATBT","2568948xDjIMf","1027225mjPCDe","19691yiLZrh","195999uPnZlk","3038288UlnUQm","2033937CLMUfn"];return(Qe=function(){return t})()}!function(){for(var t=Ge,i=Qe();;)try{if(T(t(182))/1+T(t(192))/2*(T(t(184))/3)+-T(t(185))/4+-T(t(187))/5+T(t(193))/6+-T(t(183))/7*(T(t(190))/8)+-T(t(186))/9==553943)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var Ye=ts;function $e(){var t=["1236858jPUtaw","certificate","11225xsjioT","275391VrsSlK","5816evMpkd","CrsCCAMSEKDc0WAwLAQT1SB2ogyBJEwYv4Tx7gUijgIwggEKAoIBAQC8Xc/GTRwZDtlnBThq8","7299lkgbxa","1470Lkqtku","production","Development","charCodeAt","xUuwokpsqVIHZrJfu62ar+BF8UVUKdK5oYQoiTZd9OzK3kr29kqGGk3lSgM0/p499p/FUL8oH","baseUrl","375060LzZhzk","230861ZKueQt","12pvGCSu","https://lic.drmtoday.com","35fxICRY","pQnNI61gzHO42XZOMuxytMm0F6puNHTTqhyY3Z290YqvSDdOB+UY5QJuXJgjhvOUD9+oaLlvT","Production","development","https://lic.test.drmtoday.com","UrTEfQxfPR4dJTquE+IDLAi5yeVVxzbAgMBAAE6DGNhc3RsYWJzLmNvbUABEoADMmGXpXg/0q","from","RL9KsD0v7ysBQVdUXEbJotcFz71tI5qc3jwr6GjYIPA3VzusD17PN6AGQniMwxJV12z/EgnUo","baigovcoURAZcr1d/G0rpREjLdVLG0Gjqk63Gx688W5gh3TKemsK3R1jV0dOfj3e6uV/kTpsN","pcFB13osydpD2AaDsgWo5RWJcNf+fzCgtUQx/0Au9+xVm5LQBdv8Ja4f2oiHN3dw","V382D1oJAM0F/YgCQtNDLz7vTWJ+QskNGi5Dd2qzO4s48Cnx5BLvL4H0xCRSw2Ed6ekHSdrRU","27eI5MATX39gYtCnn7dDXVxo4/rCYK0A4VemC3HRai2X3pSGcsKY7+6we7h4IycjqtuGtYg8A","HzgsJ7Hajdsyzn0Vs3+VysAgaJAkXZ+k+N6Ka0WBiZlCtcunVJDiHQbz1sF9GvcePUUi2fM/h","Staging","staging","name"];return($e=function(){return t})()}!function(){for(var t=ts,i=$e();;)try{if(T(t(326))/1+T(t(325))/2+T(t(315))/3+T(t(327))/4*(-T(t(314))/5)+-T(t(312))/6+T(t(329))/7*(T(t(316))/8)+-T(t(318))/9*(T(t(319))/10)==181728)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var Ke=Ye(317)+Ye(306)+"wyoYOE+M/t1oIbccwlTQ7o+BpV1X6TB7fxFyx1jsBtRsBWphU65w121zqmSiwzZzJ4xsXVQCJ"+Ye(330)+"+vwmV2/NJWxKqHBKdL9JqvOnNiQUF0hDI7Wf8Wb63RYSXKE27Ky31hKgx1wuq7TTWkA+kHnJT"+Ye(334)+Ye(323)+Ye(308)+"7hyskG5ZLAyJMzTvgnV3D8/I5Y6mCFBPb/+/Ri+9bEvquPF3Ff9ip3yEHu9mcQeEYCeGe9zR/"+Ye(307)+Ye(304)+Ye(336)+Ye(305),Je=I[Ye(335)](f.atob(Ke),function(t){return t[Ye(322)](0)}),Ze=function(){function t(t){this[Ye(311)]=t}var i=t.prototype;return i.toString=function(){return this.name},i[Ye(324)]=function(){var t=Ye;switch(this[t(311)]){case"staging":return"https://lic.staging.drmtoday.com";case"development":return t(333);default:return t(328)}},i[Ye(313)]=function(){return Je},t}();function ts(t,i){var n=$e();return(ts=function(t,i){return n[t-=304]})(t,i)}Ze[Ye(309)]=new Ze(Ye(310)),Ze[Ye(331)]=new Ze(Ye(320)),Ze[Ye(321)]=new Ze(Ye(332));var is=ns;function ns(t,i){var n=rs();return(ns=function(t,i){return n[t-=252]})(t,i)}function rs(){var t=["SampleAuxInfo corrupted","error","50012RXzLep","3301necisu","[RTC-DRM]","subarray","buffer","64zGPhLV","162pDdDkb","659466dfDPqj","SampleAuxInfo corrupted (postfix not found)","data","4199670WddvRf","95WaGAXy","getUint8","137436hbCkvG","1351035XuhSnW","getUint16","byteLength","184863QcuifQ"];return(rs=function(){return t})()}!function(){for(var t=ns,i=rs();;)try{if(-T(t(253))/1*(T(t(258))/2)+T(t(259))/3+T(t(252))/4*(-T(t(263))/5)+-T(t(265))/6+-T(t(269))/7*(-T(t(257))/8)+-T(t(266))/9+T(t(262))/10==173102)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var es=be(is(254));!function(){for(var t=us,i=as();;)try{if(T(t(369))/1+T(t(374))/2+T(t(366))/3+-T(t(373))/4+-T(t(365))/5+-T(t(368))/6*(T(t(370))/7)+T(t(367))/8==110661)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var ss=[];function us(t,i){var n=as();return(us=function(t,i){return n[t-=365]})(t,i)}var os=null,hs=0;function as(){var t=["799144UpkRWz","356926NfeJZx","set","slice","237700RBIjTO","627444ELwjUL","76968OxbdcX","6xPMWky","172231EpHRtx","1480332fEizHX","push","buffer"];return(as=function(){return t})()}var cs=Is;!function(){for(var t=Is,i=ws();;)try{if(-T(t(452))/1+-T(t(412))/2+-T(t(478))/3*(T(t(441))/4)+-T(t(485))/5*(-T(t(415))/6)+-T(t(400))/7+T(t(460))/8*(-T(t(486))/9)+-T(t(437))/10*(-T(t(470))/11)==412983)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var fs=be(cs(424)),vs={licenseUrl:"",onFetch:void 0},ds={},ls=function(t,i,n){return void 0===i&&(i=0),void 0===n&&(n=1/0),function(t,i,n){var r=cs,e=I.BYTES_PER_ELEMENT;i*=e,n*=e;var s,u=j(s=t,ArrayBuffer)?s:s[cs(484)],o=t[r(483)],h=i,a=A[r(432)](0,A.min(h,o)),c=A.min(a+A[r(432)](n,0),o);return new I(u,a/=e,(c/=e)-a)}(t,i,n)},gs=function(t){for(var i,n=cs,r="",e=Ft(t);!(i=e()).done;){var s=i.value.toString(16);1==s[n(433)]&&(s="0"+s),r+=s}return r};function ws(){var t=["360308tFqTFd","usable for decryption (status: ","oct","decode","parse","license","parseFromString","message","8pQccIM","No clear key test key provided!","generateRequest","text/xml","Failed to update the session: ","output-downscaled","target","apply","bind","Failed to update the session","24280927IKsRHd","No PR challenge data!","kids","status","getElementsByTagName","rtcdrmerror","CK license request:","A128KW","3KcCnPp","createSession","License acquisition failed with error ","No media keys for media element!","stringify","byteLength","buffer","82765KyOCry","7206525fRtYVA","error","btoa","9a04f07998404286ab92e65be0885f95","set","[PR] License fetched:","getUint16","onFetch","4630892EspqDe","addEventListener","debug","has","json","Previous lic will be reused","internal-error","subarray","fromCharCode","expired","text","temporary","665922eWbQGg","then","[FPS] License fetched:","174puebov","Content-Type","update","POST","2?n-2:0),e=2;e-1){var s=r[n(458)](e,n(463))[n(474)]("Challenge")[0].childNodes[0][n(420)];if(null===s)throw new p(n(471));return _s(s)}fs[n(444)]("[PR] Challenge node not found")}catch(i){t[n(446)](new CustomEvent(n(475),{detail:{message:""+i}})),fs[n(393)](i)}return null}(t,i.message);if(null===r)return t[n(446)](new CustomEvent("rtcdrmerror",{detail:{message:n(471)}})),void fs[n(393)](n(471));ks(vs[n(445)],r[n(484)],!0)[n(413)](function(t){return t[n(440)]()})[n(413)](function(r){var e=n;fs[e(402)](e(397),r),i[e(466)][e(417)](r)[e(439)](function(i){var n=e;t[n(446)](new CustomEvent(n(475),{detail:{message:n(464)+i}})),fs[n(393)]("Failed to update the session",i)})}).catch(function(i){var r=n;t.dispatchEvent(new CustomEvent(r(475),{detail:{message:""+i}})),fs[r(393)](i)})},Ts=function(t,i){var n=cs;ks(vs.licenseUrl,i[n(459)])[n(413)](function(t){var i=n,r=t[i(410)]();return fs[i(402)](i(414),t,r),r})[n(413)](function(t){var r=n;i.target[r(417)](_s(t))})[n(439)](function(i){var r=n;t[r(446)](new CustomEvent(r(475),{detail:{message:""+i}})),fs.error(i)})},Ss=function(t,i){ds[t]=i},Es=ye.isSafari;function Is(t,i){var n=ws();return(Is=function(t,i){return n[t-=393]})(t,i)}var Rs=!Es,Cs=new Map;function Ps(t){return se(this,void 0,void 0,function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:if(i=Is,null===t.initData)throw new p(i(442));if(null===(n=t[i(466)]))throw new p(i(426));if(null===(r=n.mediaKeys))throw new p(i(481));e=gs(new I(t[i(423)])),s=e+n.id,u=null,Cs[i(403)](s)&&(null!=(u=Cs.get(s))&&u.close(),Cs.delete(s)),fs[i(402)](i(u?405:435)),o=null;try{o=r.createSession(Rs?"persistent-license":"temporary")}catch(t){fs[i(402)]("EME createSession(persistent) failed:",t)}if(!o&&Rs){Rs=!1;try{o=r[i(479)](i(411))}catch(t){fs.error("EME createSession(temporary) failed:",t)}}if(!o)return[3,7];if(o.addEventListener(i(450),function(t){var r=i;t[r(466)][r(430)][r(431)](function(t,i){var e=r;(t===e(409)||"output-restricted"===t||t===e(465)||t===e(406))&&n[e(446)](new CustomEvent(e(475),{detail:{message:"Key "+gs(new I(i))+" is not "+(e(453)+t)+")",keyId:i}}))})}),Es?o[i(401)](i(459),Ts.bind(null,n),!1):-1!==e.indexOf(i(436))?o[i(401)](i(459),bs[i(468)](null,n),!1):-1!==e[i(434)](i(395))?o.addEventListener(i(459),As[i(468)](null,n),!1):o.addEventListener(i(459),ps[i(468)](null,n),!1),!u)return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,o.load(u[i(422)])];case 2:return a.sent()?Cs[i(396)](s,o):n[i(446)](new CustomEvent(i(475),{detail:{message:i(428)}})),[3,4];case 3:return h=a.sent(),n[i(446)](new CustomEvent(i(475),{detail:{message:i(451)+h}})),[3,4];case 4:return[3,6];case 5:o[i(462)](t[i(429)],t[i(423)])[i(413)](function(){Rs&&Cs[i(396)](s,o)})[i(439)](function(t){var r=i;n.dispatchEvent(new CustomEvent(r(475),{detail:{message:r(427)+t}}))}),a.label=6;case 6:return[3,8];case 7:n[i(446)](new CustomEvent(i(475),{detail:{message:i(449)}})),a.label=8;case 8:return[2]}})})}var Ns=Zs;!function(){for(var t=Zs,i=$s();;)try{if(-T(t(462))/1*(-T(t(532))/2)+-T(t(543))/3+T(t(682))/4+-T(t(692))/5*(T(t(588))/6)+-T(t(539))/7+T(t(496))/8+-T(t(549))/9==672532)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var Ds=be(Ns(673)),xs=ye[Ns(607)],Bs=ye[Ns(540)],Os=ye[Ns(647)],Ms=ye[Ns(489)],Ls=ye[Ns(478)],Fs=ye.platform,Us=ye[Ns(620)],Vs=Ms||Ls&&Fs===Ns(578),js=1e6*(Bs?82:Os?220:120),Hs=Bs?5e3:2e3,Ws=Bs?1.5:.5;function zs(t){var i,n=Ns;return(void 0===t?"undefined":W(t))!==n(672)||null===t||j(t,Element)||j(t,Ze)?t:j(null==(i=t)?void 0:i[Ns(584)],ArrayBuffer)&&null!=i&&i.BYTES_PER_ELEMENT?t[n(550)]():Array[n(636)](t)?t.reduce(function(t,i,n){return t[n]=zs(i),t},[]):j(t,b)?b.keys(t).reduce(function(i,n){return i[n]=zs(t[n]),i},{}):t}var qs=function(t){var i=Ns;this[i(547)]="",this[i(471)]="",this.keySystem="",this[i(603)]=[],this[i(479)]=zs(t),this.jmuxer=null,this.keyFrameLogCntr=0,this[i(561)]=Date[i(658)](),this[i(585)]=0,this[i(602)]=0,this[i(490)]=-1,this[i(680)]=0,this[i(596)]=0,this[i(491)]=!0,this.keyFrameNeededPosted=!1,this[i(617)]=Hs,this[i(500)]=null,this.dbgMediaDump={video:null,audio:null}},Xs=new Map,Gs=new I([60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60]),Qs=new I([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]),Ys=new I([213,251,214,184,46,217,62,78,249,138,228,9,49,238,51,183]);function $s(){var t=["isSafari","ansform=$=>{let e=$.transformer;handleTransform(e.options.operation,e.readable,e.writable)}),onmessage=$=>{keyFra","status","DRM config:","key","Development"," will be used","Staging","const DUMMY_IDR_FRAME_SLICE_HDR0=new Uint8Array([32,0,203]),DUMMY_IDR_FRAME_SLICE_HDR1=new Uint8Array([16,0,50]);","enabled","playback at ","now",".experiment","seq","videoElement","data","btoa","PlayReady might not support '","logLevel","cbcs-1-9","encryption"," to ","offset","x-dt-custom-data","let brokenFrame=null,idrFrames=[];function initializeDummyFrames(){brokenFrame=new Uint8Array([0,0,0,1,65,154,255","object","[RTC-DRM]","not-allowed","durationMs","Default transform mode enabled, ","keySystem","timestamp","DRM config keyId must be an instance of 16-byte long Uint8Array.","lastKeyFrameTime","H264 is the only supported video codec.","2533916KeNZJm","out","Applying pre-configured certificate (","buffered","Widevine","x-dt-auth-token"," ms)","com.microsoft.playready.recommendation","error","currentTime","225RwtgWL","end","requestMediaKeySystemAccess","50705YjLCIv","onmessage","environment","wvLicenseUrl","a1d1f1"," requesting a new key frame (latency ","userId","ClearKey","createEncodedStreams","licenseUrl","PlayReady license acquisition might fail without output protection enabled (sessionId is ","feed","dbgMediaDump","jmuxer","MSE (re)init",",255]).buffer,idrFrames.push(new Uint8Array([0,0,0,1,39,100,0,13,172,87,5,6,100,0,0,0,1,40,238,60,176,0,0,0,1,37,","isChrome","config","forEach","Invalid config argument type, DRM config must be an object.","hwSecurity","audioEncrypted","setMediaKeys","fpsCertificate","Unable to create Worker!","GET","customTransform","isEdge","prevSeqNum","keyFrameNeeded","encrypted","targetLatency not set!","opus","FairPlay","7963992IJNztq","streamType","SampleAuxInfo extraction failed (video)"," seeking from ","worker","]: ","video","kind","audio","jitterBufferDelayHint","size","No target media element!","fpsCertificateUrl","wvCertificate","delimited","3000","pipeThrough","/license-server-fairplay/cert/","string",") not found in [","indexOf","warn","ignoreAudio","append","jitterBufferTarget","prLicenseUrl","sessionTypes","authToken","get","RTCRtpScriptTransform","audioElement","catch","trim","join","waitingForIdr","info","52hXHKkY","enqueue","). It has to be a string containing a JWT.","playbackRate","sai","persistent-license","Blob","2699340CvuQCI","isFirefox","transform",'rame:{type:$.type,timestamp:$.timestamp,data:$.data}}),"key"===$.type&&(keyFrameNeeded=!1),$.data=generateDummyFr',"554109usxuWq"," will not be created, use rtcDrmFeedFrame to push frames manually","bind","streams","serverCertificateUrl","includes","3473577nNrBJc","slice","URL","serverCertificate","length","Invalid authToken type (","addEventListener","', it's safer to use 'cbcs' instead.","srcObject","ClearKey is not supported by Safari.","meNeeded=$.data};","value","nextKeyFrameAllowedTime","Error recovery attempted","rtcdrmerror","184,32,0,203,255,38,29,217,24,192,161,96,0,0,12,229,174,166,6,7,20,3,84,0,247,96,193,181,229,128,0,32,32]).buffer"," bytes","both","debug","No valid DRM config found, call rtcDrmConfigure first.","dispatchEvent","certificate","mediaBufferMs","clear","merchant","src","sessionId","reportDiscontinuity","mediaBufferMs should be an integer.","Android","rtcDrmConfigure did not specify audioElement, audio will be dropped","/license-proxy-widevine/cenc/","arrayBuffer","). Edge only supports PlayReady, Widevine and ClearKey.","). Chrome only supports Widevine and ClearKey.","buffer","videoStartTimestamp",'audio/mp4; codecs="opus"',"set","175800AyhMKK","PlayReady","SampleAuxInfo extraction failed (audio)","cenc","codec","videoCapabilities",".. ","Duplicate/reordered frame, prev seq: ","bytesSinceKey","wvCertificateUrl","/license-proxy-headerauth/drmtoday/RightsManager.asmx","robustness","baseUrl","type","audioStartTimestamp","emeConfig","com.widevine.alpha","SW_SECURE_CRYPTO","fpsLicenseUrl","supportsRtpScriptTransform","Target video element (","?audioTransformFunction:videoTransformFunction});e.pipeThrough(a).pipeTo(x)}self.RTCTransformEvent&&(self.onrtctr","createObjectURL","playoutDelayHint","POSITIVE_INFINITY",'ame(keyFrameNeeded),e.enqueue($)}function handleTransform($,e,x){let a=new TransformStream({transform:"audio"===$',"track",'video/mp4; codecs="avc1.640032"',"cbcs","keyFrameRequestInterval","Frame gap: ","keyFrameNeededPosted","isWindows","HW_SECURE_ALL"," bytes, ","GOP is getting too long, requesting a new key frame","temporary","Safari does not support Opus, audio will not be rendered.","stringify","byteLength","message"," frame","H264","mediaDumps","h264","keyFrameLogCntr","requestMediaKeySystemAccess(","Safari doesn't support 'cenc'/AES-CTR, use 'cbcs' instead if possible.","isArray","Invalid DRM type (","DRM config iv must be an instance of 16-byte long Uint8Array.","keyId","pipeTo"," - ","receiver","isInteger","toString","onFetch","next"];return($s=function(){return t})()}function Ks(t){var i=Ns,n=!1;if((t[i(479)][i(502)]&&t[i(479)].video[i(667)]!==i(572)&&"HW"===t[i(479)][i(502)][i(599)]||t[i(479)][i(504)]&&t[i(479)][i(504)][i(667)]!==i(572)&&"HW"===t.config[i(504)][i(599)])&&(n=!0),t.hwSecurity=n,function(t,i){var n=Ns;void 0!==i&&(t[n(479)].mediaBufferMs=i),(void 0===t[n(479)][n(571)]||t.config[n(571)]<0)&&(t[n(479)].mediaBufferMs=100,Bs?t[n(479)][n(571)]=350:!Os&&Us&&("PlayReady"===t.config[n(601)]||t[n(482)])&&(t.config[n(571)]=1400))}(t,t[i(479)][i(571)]),void 0===t.config[i(523)]){void 0===t[i(479)][i(468)]&&(t[i(479)][i(468)]="purchase"),void 0===t[i(479)][i(575)]&&(t.config[i(575)]=i(466));var r=f[i(663)](JSON[i(626)]({userId:t[i(479)].userId,sessionId:t.config.sessionId,merchant:t[i(479)].merchant}));Ss(i(670),r)}else Ss(i(687),t[i(479)][i(523)]);for(var e=0,s=[t[i(479)][i(504)],t[i(479)][i(502)]];e=4;++t[r(633)]<(u?Number[r(612)]:5)&&(Ds.debug(Te()+" "+i[r(601)]+", "+i.data.byteLength+r(622)+(r(657)+t.config[r(661)].currentTime)),u&&1===t.keyFrameLogCntr&&function(t,i,n){void 0===i&&(i=64),void 0===n&&(n=64);for(var r=Ns,e=new I(t[r(662)]),s="",u=0,o=0;ojs&&(Ds.info(r(623)),t[r(491)]=!0),t[r(475)]&&(function(t,i){var n=Ns;0===t.videoStartTimestamp&&(t.videoStartTimestamp=i.timestamp,t[n(617)]=Hs,t[n(561)]=Date.now()+2e3);var r=null,e=!1;if(i[n(662)][n(627)]<=4)Ds[n(517)]("Discarding corrupted video frame (too small)"),e=!0;else{var s=new I(i[n(662)],0,4);0!=s[0]||0!=s[1]||0!=s[2]||1!=s[3]?(Ds.warn("Discarding corrupted video frame (no Annex B startcode)"),e=!0):!(r=function(t,i){var n=is,r=new DataView(t.data),e=t.data[n(268)]-2,s=r[n(267)](e);if(s>>4!=1)return es[n(271)]("Unsupported SampleAuxInfo version"),null;for(var o=new I(s-2),h=0,a=0;u1&&3===c&&(a=0,c=r.getUint8(u++)),0!==c?a=0:++a,o[h++]=c}var f=new DataView(o[n(256)]),v="cenc"===i?16:0,d=v+2+6*f[n(267)](v);return d+2>h?(es[n(271)](n(270)),null):{sai:o[n(255)](0,d),offset:e-s,seq:f[n(267)](d)}}return null}(i,t.config[n(502)][n(667)]))&&(Ds.warn(n(498)),e=!0)}if(r)if(i[n(601)]===n(651))t[n(490)]=r.seq;else{if(-1===t[n(490)])return 0;var u=r[n(660)]-t[n(490)];if(u<-32767&&(u+=65536),u<=0)return Ds.debug(n(595)+t.prevSeqNum+", curr: "+r.seq),0;u>1&&(e=i[n(601)]!==n(651),Ds[n(517)](n(618)+t[n(490)]+n(641)+r[n(660)]+", restart required: "+e)),t.prevSeqNum=r[n(660)]}var o=0;e&&!t[n(475)][n(530)]&&(o=-1,t[n(475)][n(576)]());var h=(i[n(678)]-t[n(585)])/9e4;return r&&t[n(475)][n(473)]({video:new I(i[n(662)],0,r.offset),videoSampleAuxInfo:r[n(536)],timestamp:h})<0&&(o=-1,Ds[n(517)](n(562)),Js(t)),o>=0&&i[n(601)]===n(651)&&(t[n(680)]=h),o}(t,i)<0?t[r(491)]=!0:function(t){var i=Ns,n=t[i(479)][i(661)];if(!(!n||n[i(685)][i(553)]<1||n.paused||n[i(691)]>>2?.875:s<=u?1:s<7*u>>>2?1.125:s<9*u>>>2?1.25:s<11*u>>>2?1.375:1.5)!==(e=n).playbackRate&&(e[h(535)]=o)),!(c>>2))if(t[i(680)]>n[i(691)]+.1){var f=1e3*(a-t.lastKeyFrameTime)|0;f>40&&f>r-100?(Ds.debug(Te()+i(499)+(n[i(691)]+i(668)+t.lastKeyFrameTime+" (")+(t[i(680)]-n[i(691)])+")"),n[i(691)]=t[i(680)]):Ds[i(567)](Te()+" too close to seek, "+f)}else!t.keyFrameNeeded&&Date[i(658)]()>t[i(561)]&&c>r+100&&c>3*r>>>1&&(Ds[i(567)](Te()+i(467)+c+i(688)),t[i(491)]=!0,t[i(617)]<16e3&&(t[i(617)]<<=1))}}(t)),n?(!t[r(491)]||!Vs)&&(i[r(662)]=function(t){return!os&&(i=us,os=new I([0,0,0,1,65,154,255,255])[i(372)],ss[i(371)](new I([0,0,0,1,39,100,0,13,172,87,5,6,100,0,0,0,1,40,238,60,176,0,0,0,1,37,184,32,0,203,255,38,29,217,24,192,161,96,0,0,12,229,174,166,6,7,20,3,84,0,247,96,193,181,229,128,0,32,32])[i(372)]),ss[i(371)](ss[0][i(376)](0)),new I(ss[1])[i(375)]([16,0,50],27)),t?os:ss[hs^=1];var i}(t[r(491)]),n[r(533)](i)):t[r(491)]!=t.keyFrameNeededPosted&&(t[r(500)]&&t.worker.postMessage(t[r(491)]),t.keyFrameNeededPosted=t[r(491)]),t.keyFrameNeeded}function iu(t,i,n){var r=Ns;if(t.dbgMediaDump.audio){var e=i[r(678)]/48;t[r(474)][r(504)][r(519)](new I(i.data),e)||(t.dbgMediaDump[r(504)]=null)}return t[r(479)].audio&&t[r(479)].audio[r(667)]!==r(572)?i[r(662)][r(627)]>0&&function(t,i){var n,r=Ns;if(!t[r(475)]||t[r(518)])return 0;0===t[r(602)]&&(t.audioStartTimestamp=i[r(678)]);var e=(i[r(678)]-t[r(602)])/48e3;if((null===(n=t[r(479)][r(504)])||void 0===n?void 0:n[r(667)])===r(616))return t.jmuxer[r(473)]({audio:new I(i[r(662)]),timestamp:e});var s=function(t){var i=is,n=new DataView(t[i(261)]),r=t.data[i(268)]-2,e=n[i(267)](r);if(e>>4!=1)return es[i(271)]("Unsupported SampleAuxInfo version"),null;for(var u=new I(e-2),o=0;s=16)break}return{sai:u,offset:r-e}}return null}(i);s?t.jmuxer[r(473)]({audio:new I(i[r(662)],0,s[r(669)]),audioSampleAuxInfo:s[r(536)],timestamp:e}):Ds[r(690)](r(590))}(t,i):n&&n[r(533)](i),!1}function nu(t){var i,n,r,e,s,u=Ns;if(!t||(void 0===t?"undefined":W(t))!==u(672))throw new _(u(481));if(!j(t.videoElement,HTMLVideoElement))throw new _("Invalid videoElement, it must be an instance of HTMLVideoElement.");if(t[u(526)]&&!j(t[u(526)],HTMLMediaElement))throw new _("Invalid audioElement, it must be an instance of HTMLMediaElement.");if(void 0!==t[u(571)]&&!Number[u(643)](t[u(571)]))throw new _("DRM config mediaBufferMs should be an integer.");for(var o=!1,h=!1,a=!1,c=[u(616),"cenc",u(572)],f=["SW","HW"],v=0,d=[t.video,t[u(504)]];v=0))return[3,9];null===(r=t[i(603)][0][i(522)])||void 0===r||r.splice(u,1),y.label=6;case 6:return y.trys.push([6,8,,9]),[4,l[i(461)](t[i(677)],t[i(603)])];case 7:return s=y.sent(),[3,9];case 8:return y.sent(),[3,9];case 9:if(!s)return o=i(634)+t[i(677)]+") failed",[2,(e[i(569)](new CustomEvent(i(563),{detail:{message:o}})),void Ds[i(690)](o))];h=null,y.label=10;case 10:return y.trys.push([10,12,,13]),[4,s.createMediaKeys()];case 11:return h=y.sent(),[3,13];case 12:return y.sent(),[3,13];case 13:return h?t.serverCertificate?(Ds[i(567)](i(684)+t[i(552)][i(627)]+" bytes)"),[4,h.setServerCertificate(t[i(552)])]):[3,15]:(a="createMediaKeys("+t.keySystem+") failed",[2,(e.dispatchEvent(new CustomEvent(i(563),{detail:{message:a}})),void Ds[i(690)](a))]);case 14:return y.sent(),[3,21];case 15:if(!t[i(547)])return[3,21];c={method:i(487)},f=t.serverCertificateUrl,y.label=16;case 16:return y.trys.push([16,20,,21]),[4,t.config[i(645)]?t[i(479)][i(645)](f,c):fetch(f,c)];case 17:return(v=y.sent()).ok?[4,v[i(581)]()]:(d="Server certificate fetch failed with error "+v[i(649)],[2,void e[i(569)](new CustomEvent(i(563),{detail:{message:d}}))]);case 18:return g=y.sent(),Ds[i(567)]("Fetched certificate from "+f+", "+g.byteLength+i(565)),[4,h.setServerCertificate(g)];case 19:return y.sent(),[3,21];case 20:return w=y.sent(),m=w.name+": "+w[i(628)],[2,(Ds[i(690)](m),void e[i(569)](new CustomEvent("rtcdrmerror",{detail:{message:m}})))];case 21:return[4,e[i(484)](h)];case 22:return y.sent(),e[i(555)](i(492),Ps),Js(t),[2]}})})}(A)),A[u(479)][u(661)][u(555)]("play",function(){var t=u;A[t(479)][t(661)][t(691)]>.5&&(A[t(561)]=Date[t(658)]())})}var ru=Ns(655)+Ns(671)+Ns(477)+Ns(564)+'),idrFrames.push(idrFrames[0].slice());let $=new Uint8Array(idrFrames[1]);$.set([16,0,50],27)}let idrPicIdToggle=0;function generateDummyFrame($){return(brokenFrame||initializeDummyFrames(),$)?brokenFrame:idrFrames[idrPicIdToggle^=1]}function audioTransformFunction($,e){postMessage({streamType:"audio",frame:{timestamp:$.timestamp,data:$.data}}),e.enqueue($)}let keyFrameNeeded=!1;function videoTransformFunction($,e){postMessage({streamType:"video",f'+Ns(542)+Ns(613)+Ns(609)+Ns(648)+Ns(559);function eu(t){var i,n=Ns;if(0===Xs[n(506)])throw new _(n(568));if(t&&t[n(661)])i=t.videoElement;else{if(1!==Xs[n(506)])throw new _("Several DRM configs detected, rtcDrmOnTrack have to be called with target DRM config.");i=Xs.keys()[n(646)]()[n(560)]}var r=Xs[n(524)](i);if(!r){var e="";throw Xs[n(480)](function(t,i){e+=i.id+", "}),e=e[n(550)](0,-2),new _(n(608)+i.id+n(515)+e+"]")}return r}function su(t,i){var n=Ns;if(t&&t.config[n(661)]){var r=t.config[n(661)];if(r.buffered[n(553)]>0){var e=r.buffered[n(693)](r.buffered[n(553)]-1)-r.currentTime;i[n(611)]=i.jitterBufferDelayHint=i[n(520)]=e}g(su,1e3,t,i)}}var uu=wt.get("View");uu.setLevel(wt.DEBUG);var ou={metadata:!1,enableDRM:!1,disableVideo:!1,disableAudio:!1,peerConfig:{autoInitStats:!0,statsIntervalMs:1e3}},hu=function(t){function i(i,n,r,e){var s;return void 0===r&&(r=null),void 0===e&&(e=!0),i&&uu.warn("The streamName property has been deprecated. In a future release, this will be removed. Please do not rely on this value. Instead, set via token generator"),(s=t.call(this,null,n,uu,e)||this).payloadTypeCodec={},s.tracksMidValues={},s.drmOptionsMap=null,s.eventQueue=[],s.isMainStreamActive=!1,r&&(s.on(Un.track,function(t){r.srcObject=t.streams[0]}),uu.warn("The mediaElement property has been deprecated. In a future release, this will be removed. Please do not rely on this value. Instead, do this in either the `track` or the `active` broadcast event.")),s}Pt(i,t);var n=i.prototype;return n.connect=function(){return jt(function(t){return zt(this,function(i){switch(i.label){case 0:return void 0===t&&(t=ou),this.options=w(d(d({},ou),t),{peerConfig:d(d({},ou.peerConfig),t.peerConfig),setSDPToPeer:!1}),this.eventQueue.length=0,[4,this.initConnection({migrate:!1})];case 1:return i.sent(),[2]}})}).apply(this,arguments)},n.select=function(){return jt(function(t){return zt(this,function(i){switch(i.label){case 0:return void 0===t&&(t={}),uu.debug("Viewer select layer values: ",t),[4,this.signaling.cmd("select",{layer:t})];case 1:return i.sent(),uu.info("Connected to streamName: ",this.streamName),[2]}})}).apply(this,arguments)},n.addRemoteTrack=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return uu.info("Viewer adding remote track",t),[4,this.webRTCPeer.addRemoteTrack(t,i)];case 1:for(n=s.sent(),r=Ft(i);!(e=r()).done;)e.value.addTrack(n.receiver.track);return[2,n]}})}).call(this)},n.project=function(t,i){return jt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:for(r=function(){var t=s.value;if(!t.trackId&&!t.media)throw uu.error("Error in projection mapping, trackId or mediaId must be set"),new p("Error in projection mapping, trackId or mediaId must be set");var i=n.webRTCPeer.getRTCPeer();if(t.mediaId&&!i.getTransceivers().find(function(i){return i.mid===t.mediaId.toString()}))throw uu.error("Error in projection mapping, ".concat(t.mediaId," mid not found in local transceivers")),new p("Error in projection mapping, ".concat(t.mediaId," mid not found in local transceivers"))},e=Ft(i);!(s=e()).done;)n=this,r();return uu.debug("Viewer project source: layer mappings: ",t,i),[4,this.signaling.cmd("project",{sourceId:t,mapping:i})];case 1:return u.sent(),uu.info("Projection done"),[2]}})}).call(this)},n.unproject=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return uu.debug("Viewer unproject mediaIds: ",t),[4,this.signaling.cmd("unproject",{mediaIds:t})];case 1:return i.sent(),uu.info("Unprojection done"),[2]}})}).call(this)},n.replaceConnection=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return uu.info("Migrating current connection"),[4,this.initConnection({migrate:!0})];case 1:return t.sent(),[2]}})}).call(this)},n.stop=function(){var i,n;t.prototype.stop.call(this),null==(i=this.drmOptionsMap)||i.clear(),this.DRMProfile=null,null==(n=this.worker)||n.terminate(),this.worker=null,this.payloadTypeCodec={},this.tracksMidValues={},this.eventQueue.length=0},n.initConnection=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a,c,f,v,l,m,y,_,k;return zt(this,function(A){switch(A.label){case 0:if(i=this,uu.debug("Viewer connect options values: ",this.options),this.stopReconnection=!1,t.abrConfiguration&&t.abrConfiguration.metadata&&(!(e=t.abrConfiguration.metadata.bitrate)||e<0))throw new p("Invalid bitrate ".concat(e," supplied for ABR. The value must be a non-negative integer value."));if(!t.migrate&&this.isActive())throw uu.warn("Viewer currently subscribed"),new p("Viewer currently subscribed");A.label=1;case 1:return A.trys.push([1,3,,4]),[4,this.tokenGenerator()];case 2:return s=A.sent(),this.options.peerConfig.iceServers=null==s?void 0:s.iceServers,this.options.peerConfig.encodedInsertableStreams=Gr&&(this.options.enableDRM||this.options.metadata),[3,4];case 3:throw u=A.sent(),uu.error("Error generating token."),j(u,ar)&&(401!==u.status&&this.autoReconnect?this.reconnect():this.stopReconnection=!0),u;case 4:if(!s)throw uu.error("Error while subscribing. Subscriber data required"),new p("Subscriber data required");return o=kr(s.jwt),this.streamName=o.millicast.streamName,h=new ur({streamName:this.streamName,url:"".concat(s.urls[0],"?token=").concat(s.jwt)}),s.subscriberToken&&(this.subscriberToken=s.subscriberToken),[4,(a=t.migrate?new jn:this.webRTCPeer).createRTCPeer(this.options.peerConfig)];case 5:return A.sent(),null==(n=this.stopReemitingWebRTCPeerInstanceEvents)||n.call(this),this.stopReemitingWebRTCPeerInstanceEvents=$t(a,this,b.values(Un).filter(function(t){return t!==Un.track})),this.options.metadata&&(this.worker||(this.worker=new Kr),this.worker.onmessage=function(t){if("metadata"===t.data.event){var n=new TextDecoder,r=t.data.metadata;if(r.mid=t.data.mid,r.track=i.tracksMidValues[t.data.mid],r.uuid){var e=r.uuid;r.uuid=e.reduce(function(t,i){return t+i.toString(16).padStart(2,"0")},""),r.uuid=r.uuid.replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}if(r.timecode&&(r.timecode=new Date(n.decode(r.timecode))),r.unregistered){var s=n.decode(r.unregistered);try{var u=JSON.parse(s);r.unregistered=u}catch(t){uu.info("The content could not be converted to JSON, returning raw bytes instead")}}i.emit("metadata",r)}}),a.on(Un.track,function(t){i.isMainStreamActive?i.onTrackEvent(t):i.eventQueue.push(t)}),h.on(sr,function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.isMainStreamActive||"active"!==t.name?[3,3]:(this.mainSourceId=t.data.sourceId,this.DRMProfile||!t.data.encryption?[3,2]:[4,this.tokenGenerator()]);case 1:(i=n.sent()).drmObject&&(this.DRMProfile=i.drmObject),n.label=2;case 2:for(this.emit(sr,t),this.isMainStreamActive=!0;this.eventQueue.length>0;)this.onTrackEvent(this.eventQueue.shift());return[2];case 3:return"inactive"===t.name&&this.isMainStreamActive&&this.mainSourceId===t.data.sourceId&&(this.isMainStreamActive=!1),this.emit(sr,t),[2]}})}).call(i)}),c=a.getRTCLocalSDP(w(d({},this.options),{stereo:!0})),f=h.connect(),[4,ot.all([c,f])];case 6:return r=A.sent(),v=r[0],l=this.signaling,this.signaling=h,m=this.signaling.subscribe(v,w(d({},this.options),{vad:this.options.multiplexedAudioTracks>0})),y=a.peer.setLocalDescription(a.sessionDescription),[4,ot.all([m,y])];case 7:return r=A.sent(),_=r[0],this.payloadTypeCodec=Dn.getCodecPayloadType(_),[4,a.setRTCRemoteSDP(_)];case 8:return A.sent(),uu.info("Connected to streamName: ",this.streamName),k=this.webRTCPeer,this.webRTCPeer=a,this.setReconnect(),t.migrate&&this.webRTCPeer.on(Un.connectionStateChange,function(t){var i,n;"connected"===t?g(function(){var t,i;null==(t=null==l?void 0:l.close)||t.call(l),null==(i=null==k?void 0:k.closeRTCPeer)||i.call(k),l=k=null,uu.info("Current connection migrated")},1e3):["disconnected","failed","closed"].includes(t)&&(null==(i=null==l?void 0:l.close)||i.call(l),null==(n=null==k?void 0:k.closeRTCPeer)||n.call(k),l=k=null)}),[2]}})}).call(this)},n.onTrackEvent=function(t){var i,n,r;if(this.tracksMidValues[null==(i=t.transceiver)?void 0:i.mid]=t.track,this.isDRMOn){var e=t.transceiver.mid,s=this.getDRMConfiguration(e);try{!function(t,i){var n,r,e=Ns,s=t[e(614)][e(503)];s===e(502)&&(t[e(642)][e(611)]=t.receiver[e(505)]=t[e(642)][e(520)]=0);var u=eu(i),o=u[e(479)][e(661)],h=u.config.audioElement;if(u.enabled){var a=""+e(xs?525:470);if(u[e(479)][e(488)])Ds[e(567)](a+e(544));else{if(Ds[e(567)](e(676)+a+e(653)),s===e(502)){var c=Ae[e(631)][e(502)].in[e(675)];c>0&&(u.dbgMediaDump[e(502)]=new Ee(e(502),e(632),c))}else if(s===e(504)){var v=Ae[e(631)][e(504)].in[e(675)];v>0&&(u[e(474)][e(504)]=new Ee(e(504),e(494),v))}if(xs){if(u[e(500)]=function(t){var i=Ns,n=f[i(551)]||f.webkitURL,r=f[i(538)],e=f.Worker;if(!(n&&r&&e&&t))return null;var s=new r([t]);return new e(n[i(610)](s))}(ru),null==u[e(500)])throw new p(e(486));u[e(500)][e(463)]=function(t){var i=e;t[i(662)][i(497)]===i(502)?tu(u,t.data.frame,null):iu(u,t.data.frame,null)},t[e(642)][e(541)]=new RTCRtpScriptTransform(u.worker,{operation:s})}else{var d=s===e(502)?tu:iu,l={drm:u,transform:function(t,i){d(u,t,i)}},g=t[e(642)][e(470)](),w=new TransformStream({transform:l[e(541)][e(545)](l)}),m=g.readable,y=g.writable;m[e(512)](w)[e(640)](y)}}if("audio"===s&&(null===(n=u.config[e(504)])||void 0===n?void 0:n.encryption)===e(572)){if(!h)return void Ds[e(517)](e(579));h[e(557)]!==t[e(546)][0]&&(h[e(557)]=t.streams[0]),u[e(479)][e(661)]&&(t[e(642)].playoutDelayHint=t.receiver.jitterBufferDelayHint=t[e(642)][e(520)]=u[e(479)][e(571)],su(u,t[e(642)]))}else s===e(502)&&(null===(r=u[e(479)][e(502)])||void 0===r?void 0:r.encryption)===e(572)&&o[e(557)]!==t[e(546)][0]&&(o.srcObject=t[e(546)][0])}else o[e(557)]!==t[e(546)][0]&&(o.srcObject=t[e(546)][0])}(t,s)}catch(t){uu.error("Failed to apply DRM on media Id:",e,"error is: ",t),this.emit("error",new p("Failed to apply DRM on media Id: "+e+" error is: "+t))}this.worker||(this.worker=new Kr),this.worker.addEventListener("message",function(t){"complete"===t.data.event&&function(t,i,n){var r=Ns,e=eu(n);t[r(601)]?tu(e,t,i):iu(e,t,i)}(t.data.frame,null,s)})}if(this.options.metadata)if(Qr)t.receiver.transform=new RTCRtpScriptTransform(this.worker,{name:"receiverTransform",payloadTypeCodec:d({},this.payloadTypeCodec),codec:this.options.metadata&&"h264",mid:null==(n=t.transceiver)?void 0:n.mid});else if(Gr){var u=t.receiver.createEncodedStreams(),o=u.readable,h=u.writable;this.worker.postMessage({action:"insertable-streams-receiver",payloadTypeCodec:d({},this.payloadTypeCodec),codec:this.options.metadata&&"h264",mid:null==(r=t.transceiver)?void 0:r.mid,readable:o,writable:h},[o,h])}this.emit(Un.track,t)},n.getDRMConfiguration=function(t){return this.drmOptionsMap?this.drmOptionsMap.get(t):null},n.onRtcDrmFetch=function(t,i){return jt(function(){return zt(this,function(n){return[2,(i.headers||(i.headers=new Headers),i.headers.get("x-dt-custom-data")&&i.headers.delete("x-dt-custom-data"),this.subscriberToken?i.headers.append("Authorization","Bearer ".concat(this.subscriberToken)):uu.warn("onRtcDrmFetch: no subscriberToken"),fetch(t,i))]})}).call(this)},n.configureDRM=function(t){var i=this;if(!t)throw new p("Required DRM options is not provided");this.drmOptionsMap||(this.drmOptionsMap=new Map);var n={merchant:"dolby",environment:Ze.Production,customTransform:this.options.metadata,videoElement:t.videoElement,audioElement:t.audioElement,video:{codec:"H264",encryption:"cbcs",keyId:re(t.videoEncryptionParams.keyId),iv:re(t.videoEncryptionParams.iv)},audio:{codec:"opus",encryption:"clear"},onFetch:this.onRtcDrmFetch.bind(this)};t.mediaBufferMs&&(n.mediaBufferMs=t.mediaBufferMs),this.DRMProfile&&(this.DRMProfile.playReadyUrl&&(n.prLicenseUrl=this.DRMProfile.playReadyUrl),this.DRMProfile.widevineUrl&&(n.wvLicenseUrl=this.DRMProfile.widevineUrl),this.DRMProfile.fairPlayUrl&&(n.fpsLicenseUrl=this.DRMProfile.fairPlayUrl),this.DRMProfile.fairPlayCertUrl&&(n.fpsCertificateUrl=this.DRMProfile.fairPlayCertUrl));try{nu(n),this.drmOptionsMap.set(t.videoMid,n),t.audioMid&&this.drmOptionsMap.set(t.audioMid,n),n.videoElement.addEventListener("rtcdrmerror",function(t){uu.error("DRM error: ",t.detail.message,"in video element:",n.videoElement.id),i.emit("error",new p(t.detail.message))})}catch(i){uu.error("Failed to configure DRM with options:",t,"error is:",i)}},n.removeDRMConfiguration=function(t){var i;null==(i=this.drmOptionsMap)||i.delete(t)},n.exchangeDRMConfiguration=function(t,i){var n=this.getDRMConfiguration(t),r=this.getDRMConfiguration(i);if(null===n)throw new p("No DRM configuration found for "+t);if(null===r)throw new p("No DRM configuration found for "+i);ee(n.video,r.video,"keyId"),ee(n.video,r.video,"iv");try{nu(n)}catch(t){uu.error("Failed to configure DRM with options:",n,"error is:",t)}try{nu(r)}catch(t){uu.error("Failed to configure DRM with options:",r,"error is:",t)}},xt(i,[{key:"isDRMOn",get:function(){return!!this.drmOptionsMap&&this.drmOptionsMap.size>0}}]),i}(qr);t.Director=lr,t.Logger=wt,t.PeerConnection=jn,t.Publish=ie,t.Signaling=ur,t.View=hu,b.defineProperty(t,i.toStringTag,{value:"Module"})},"object"==(void 0===t?"undefined":W(t))&&(void 0===r?"undefined":W(r))<"u"?s(t):"function"==typeof define&&define.amd?define(["exports"],s):s((e=("undefined"==typeof globalThis?"undefined":W(globalThis))<"u"?globalThis:e||self).millicast={})}),ai=L(function(t){function i(){var t=hi();return i=function(){return t},t}V(),It(),b.defineProperty(t,"__esModule",{value:!0}),function(t,i){for(var n in i)b.defineProperty(t,n,{enumerable:!0,get:b.getOwnPropertyDescriptor(i,n).get})}(t,{get Director(){return i().Director},get Logger(){return i().Logger},get View(){return i().View}})}),ci=L(function(t,i){V(),It(),i.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),fi=L(function(t,i){V(),It(),i.exports=function(t,i){var n=i[0],r=i[1],e=i[2],s=i[3],u=n+n,o=r+r,h=e+e,a=n*u,c=r*u,f=r*o,v=e*u,d=e*o,l=e*h,g=s*u,w=s*o,m=s*h;return t[0]=1-f-l,t[1]=c+m,t[2]=v-w,t[3]=0,t[4]=c-m,t[5]=1-a-l,t[6]=d+g,t[7]=0,t[8]=v+w,t[9]=d-g,t[10]=1-a-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),vi=L(function(t,i){V(),It(),i.exports=function(t,i,n){var r,e,s,u=n[0],o=n[1],h=n[2],a=A.sqrt(u*u+o*o+h*h);if(A.abs(a)<1e-6)return null;return u*=a=1/a,o*=a,h*=a,r=A.sin(i),e=A.cos(i),s=1-e,t[0]=u*u*s+e,t[1]=o*u*s+h*r,t[2]=h*u*s-o*r,t[3]=0,t[4]=u*o*s-h*r,t[5]=o*o*s+e,t[6]=h*o*s+u*r,t[7]=0,t[8]=u*h*s+o*r,t[9]=o*h*s-u*r,t[10]=h*h*s+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),di=L(function(t,i){V(),It(),i.exports=function(t,i){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=i[0],t[13]=i[1],t[14]=i[2],t[15]=1,t}}),li=L(function(t,i){V(),It(),i.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),gi=L(function(t,i){V(),It(),i.exports=function(t,i){var n=i[0],r=i[1],e=i[2],s=i[3],u=i[4],o=i[5],h=i[6],a=i[7],c=i[8],f=i[9],v=i[10],d=i[11],l=i[12],g=i[13],w=i[14],m=i[15],y=n*o-r*u,p=n*h-e*u,_=n*a-s*u,k=r*h-e*o,b=r*a-s*o,A=e*a-s*h,T=c*g-f*l,S=c*w-v*l,E=c*m-d*l,I=f*w-v*g,R=f*m-d*g,C=v*m-d*w,P=y*C-p*R+_*I+k*E-b*S+A*T;if(!P)return null;return P=1/P,t[0]=(o*C-h*R+a*I)*P,t[1]=(e*R-r*C-s*I)*P,t[2]=(g*A-w*b+m*k)*P,t[3]=(v*b-f*A-d*k)*P,t[4]=(h*E-u*C-a*S)*P,t[5]=(n*C-e*E+s*S)*P,t[6]=(w*_-l*A-m*p)*P,t[7]=(c*A-v*_+d*p)*P,t[8]=(u*R-o*E+a*T)*P,t[9]=(r*E-n*R-s*T)*P,t[10]=(l*b-g*_+m*y)*P,t[11]=(f*_-c*b-d*y)*P,t[12]=(o*S-u*I-h*T)*P,t[13]=(n*I-r*S+e*T)*P,t[14]=(g*p-l*k-w*y)*P,t[15]=(c*k-f*p+v*y)*P,t}}),wi=L(function(t,i){V(),It(),i.exports=function(t,i,n){var r=i[0],e=i[1],s=i[2],u=i[3],o=i[4],h=i[5],a=i[6],c=i[7],f=i[8],v=i[9],d=i[10],l=i[11],g=i[12],w=i[13],m=i[14],y=i[15],p=n[0],_=n[1],k=n[2],b=n[3];return t[0]=p*r+_*o+k*f+b*g,t[1]=p*e+_*h+k*v+b*w,t[2]=p*s+_*a+k*d+b*m,t[3]=p*u+_*c+k*l+b*y,p=n[4],_=n[5],k=n[6],b=n[7],t[4]=p*r+_*o+k*f+b*g,t[5]=p*e+_*h+k*v+b*w,t[6]=p*s+_*a+k*d+b*m,t[7]=p*u+_*c+k*l+b*y,p=n[8],_=n[9],k=n[10],b=n[11],t[8]=p*r+_*o+k*f+b*g,t[9]=p*e+_*h+k*v+b*w,t[10]=p*s+_*a+k*d+b*m,t[11]=p*u+_*c+k*l+b*y,p=n[12],_=n[13],k=n[14],b=n[15],t[12]=p*r+_*o+k*f+b*g,t[13]=p*e+_*h+k*v+b*w,t[14]=p*s+_*a+k*d+b*m,t[15]=p*u+_*c+k*l+b*y,t}}),mi=L(function(t,i){V(),It(),i.exports=function(t,i,n,r,e){var s=1/A.tan(i/2),u=1/(r-e);return t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(e+r)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*e*r*u,t[15]=0,t}}),yi=L(function(t,i){V(),It(),i.exports=function(t,i,n,r){var e,s,u,o,h,a,c,f,v,d,l,g,w,m,y,p,_,k,b,T,S,E,I,R,C=r[0],P=r[1],N=r[2],D=A.sqrt(C*C+P*P+N*N);if(A.abs(D)<1e-6)return null;C*=D=1/D,P*=D,N*=D,e=A.sin(n),s=A.cos(n),u=1-s,o=i[0],h=i[1],a=i[2],c=i[3],f=i[4],v=i[5],d=i[6],l=i[7],g=i[8],w=i[9],m=i[10],y=i[11],p=C*C*u+s,_=P*C*u+N*e,k=N*C*u-P*e,b=C*P*u-N*e,T=P*P*u+s,S=N*P*u+C*e,E=C*N*u+P*e,I=P*N*u-C*e,R=N*N*u+s,t[0]=o*p+f*_+g*k,t[1]=h*p+v*_+w*k,t[2]=a*p+d*_+m*k,t[3]=c*p+l*_+y*k,t[4]=o*b+f*T+g*S,t[5]=h*b+v*T+w*S,t[6]=a*b+d*T+m*S,t[7]=c*b+l*T+y*S,t[8]=o*E+f*I+g*R,t[9]=h*E+v*I+w*R,t[10]=a*E+d*I+m*R,t[11]=c*E+l*I+y*R,i!==t&&(t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15]);return t}}),pi=L(function(t,i){V(),It(),i.exports=function(t,i,n){var r,e,s,u,o,h,a,c,f,v,d,l,g=n[0],w=n[1],m=n[2];i===t?(t[12]=i[0]*g+i[4]*w+i[8]*m+i[12],t[13]=i[1]*g+i[5]*w+i[9]*m+i[13],t[14]=i[2]*g+i[6]*w+i[10]*m+i[14],t[15]=i[3]*g+i[7]*w+i[11]*m+i[15]):(r=i[0],e=i[1],s=i[2],u=i[3],o=i[4],h=i[5],a=i[6],c=i[7],f=i[8],v=i[9],d=i[10],l=i[11],t[0]=r,t[1]=e,t[2]=s,t[3]=u,t[4]=o,t[5]=h,t[6]=a,t[7]=c,t[8]=f,t[9]=v,t[10]=d,t[11]=l,t[12]=r*g+o*w+f*m+i[12],t[13]=e*g+h*w+v*m+i[13],t[14]=s*g+a*w+d*m+i[14],t[15]=u*g+c*w+l*m+i[15]);return t}}),_i={};!function(t,i){for(var n in i)N(t,n,{get:i[n],enumerable:!0})}(_i,{ChromelessPlayer:function(){return _O},ErrorCategory:function(){return wd},ErrorCode:function(){return gd},Player:function(){return Got},cache:function(){return r6},cast:function(){return YZ},features:function(){return AO},players:function(){return SO},registerContentProtectionIntegration:function(){return EO},utils:function(){return bO},version:function(){return TO},videojs:function(){return tut}}),c.exports=(ui=_i,F(N({},"__esModule",{value:!0}),ui)),V(),It(),V(),It(),V(),It(),V(),It(),Nt(),V(),It(),Bt(),H(),V(),It(),H(),V(),It(),Ut(),V(),It(),Bt(),H(),V(),It();var ki=function(t){return t.Sv="web",t.Tv="android",t.Ev="android-tv",t.Pv="ios",t.xv="tvos",t.Iv="chromecast",t.Rv="theoliveweb",t}({});var bi=l?l.userAgent:"",Ai=bi.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ti=bi.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Si=bi.match(/Android ([0-9\.]+)/i),Ei=bi.match(/Windows NT ([0-9\.]+)/i),Ii=bi.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Ri=bi.match(/Firefox\/([0-9\.]+)/i),Ci=bi.match(/OPR\/(\d+\.\d+)/i),Pi=bi.match(/Tizen ([0-9\.]+)/i),Ni=bi.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Di=bi.match(/HbbTV\/([0-9.]+)/i),xi=bi.match(/(AFT.*) Build/i),Bi=function(){function t(){this.Cv=Boolean("ontouchstart"in self||self.DocumentTouch&&j(v,self.DocumentTouch)||l&&l.msMaxTouchPoints),this.Bv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(bi)||/(macintosh|mac(?=_powerpc)\s)/i.test(bi),this.Mv=/Windows NT/i.test(bi),this.Ov=Ei?S(Ei[1]):0,this.Uv=/Android/i.test(bi),this.Hv=Si?S(Si[1]):0,this.qv=/windows phone (8|8\.1)/i.test(bi),this.Gv=/iPhone/i.test(bi),this.Qv=/iPad/i.test(bi),this.Yv=this.Bv&&this.Cv&&!this.Qv,this.Zv=/iPod/i.test(bi),this.r_=/Mobile Safari/i.test(bi),this.s_=/EOS\d*STB/i.test(bi),this.n_=/APP\d*STB/i.test(bi),this.$v=(this.Gv||this.Qv||this.Yv||this.Zv)&&!this.qv,this.i_=Ni?S(Ni[2]):0,this.h_=this.qv||this.$v||this.Uv||this.r_,this.a_=/CriOS/i.test(bi),this.c_=Boolean(self.chrome&&/google/i.test(l.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(l.userAgent),this.p_=Ti?T(Ti[1],10):0,this.Bg=Boolean(/CriOS/i.test(bi)),this.Dg=Boolean(self.chrome||/Chrome/i.test(bi)||this.Bg),this.f_=Ai?T(Ai[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(bi),this.b_=Pi?S(Pi[1]):0,this.l_=this.b_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.b_):void 0,this.T_=/webos|web0s/i.test(bi),this.E_=/HbbTV/i.test(bi),this.x_=!!Di&&function(t){if(!t)return!1;var i=t.split(".").map(Number);return 3===i.length&&1===i[0]&&2===i[1]}(Di[1]),this.R_=/AFT.* Build/i.test(bi),this.C_=xi?xi[1]:void 0,this.B_=/VIZIO/i.test(bi),this.M_=/Edge\/\d+/i.test(bi),this.O_=/Trident/i.test(bi),this.U_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.H_=/Vivaldi/i.test(bi),this.q_=/Firefox/i.test(bi)&&!/Seamonkey/i.test(bi),this.G_=Ri?S(Ri[1]):0,this.j_=/Safari/i.test(bi)&&!/Chrome/i.test(bi)&&!this.qv&&!this.y_,this.K_=Ii?S(Ii[2]):0,this.J_=Boolean(Ci),this.eg=Ci?S(Ci[1]):0,this.hg=/CrKey/.test(bi),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(bi),this.fg=/PlayStation 4/i.test(bi),this._g=/PlayStation 5/i.test(bi),this.pg="web"===ki.Ev,this.yg="web"===ki.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===ki.Pv,this.xg="web"===ki.xv,this.Rg="web"===ki.Iv}return xt(t,[{key:"Ke",get:function(){return this.Cv}},{key:"Dv",get:function(){return this.Bv}},{key:"Nv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Ov}},{key:"Fv",get:function(){return this.Uv}},{key:"Vv",get:function(){return this.Hv}},{key:"Wv",get:function(){return this.qv}},{key:"zv",get:function(){return this.Gv}},{key:"Xv",get:function(){return this.Qv}},{key:"Kv",get:function(){return this.Yv}},{key:"Jv",get:function(){return this.Zv}},{key:"ru",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"e_",get:function(){return this.s_||this.n_}},{key:"vd",get:function(){return this.r_}},{key:"Ks",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"d_",get:function(){var t;return null!=(t=this.l_)?t:this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){var t;return(null==(t=f.chrome)?void 0:t.webview)&&this.p_>0}},{key:"m_",get:function(){return this.p_}},{key:"w_",get:function(){return this.y_}},{key:"A_",get:function(){return this.b_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"P_",get:function(){return this.x_}},{key:"I_",get:function(){return this.R_}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.C_}},{key:"D_",get:function(){return this.B_}},{key:"N_",get:function(){return this.M_}},{key:"L_",get:function(){return this.O_}},{key:"F_",get:function(){return this.U_}},{key:"V_",get:function(){return this.H_}},{key:"W_",get:function(){return this.q_}},{key:"z_",get:function(){return this.G_}},{key:"X_",get:function(){return this.j_}},{key:"Q_",get:function(){return 0===this.K_&&Oi.ru?this.i_:this.K_}},{key:"Y_",get:function(){return this.J_}},{key:"Z_",get:function(){return this.eg}},{key:"rg",get:function(){return this.hg}},{key:"og",get:function(){return this.ag}},{key:"cg",get:function(){return!(!this.S_&&!this.w_)&&this.d_<=56}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"Pg",get:function(){return this.xg}},{key:"Ig",get:function(){return this.Rg}},{key:"Cg",get:function(){return this.Dg}},{key:"IS_IOS_CHROME",get:function(){return this.Bg}}]),t}();Bi.Ng=new Bi;var Oi=Bi.Ng;V(),It(),ft();var Mi={}.hasOwnProperty,Li={}.toString;function Fi(t){return null!=t}function Ui(t){return void 0===t}var Vi,ji=Array.isArray||function(t){return"[object Array]"===Li.call(t)};function Hi(t){return Wi(t)&&Mi.call(t,"length")&&Yi(t.length)}function Wi(t){return"object"===(void 0===t?"undefined":W(t))&&null!==t}function zi(t){return Wi(t)&&t.constructor&&t.constructor===b}function qi(t){return"string"==typeof t}function Xi(t){return"boolean"==typeof t}function Gi(t){return Fi(t)&&"function"==typeof t.then}function Qi(t){return"[object Date]"===Li.call(t)}function Yi(t){return"number"==typeof t}function $i(t){return"function"==typeof t}function Ki(t){return $i(t)||Wi(t)}function Ji(t){return Wi(t)&&!ji(t)}function Zi(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function tn(t){for(var i;Fi(i=t.firstChild);)t.removeChild(i)}function nn(t,i){for(var n;Fi(n=t.firstChild);)i.appendChild(n)}function rn(t,i){t.insertBefore(i,t.firstChild)}function en(t){return t&&t.nodeName&&t.nodeName.toLowerCase()||""}function sn(t){var i=t.className;return"string"==typeof i?i:i&&"string"==typeof i.baseVal?i.baseVal:""}function un(t,i){var n=t.className;"string"==typeof n?t.className=i:n&&"string"==typeof n.baseVal&&(n.baseVal=i)}function on(t,i){return void 0!==t.classList?t.classList.contains(i):void 0!==t.className&&-1!==(" "+sn(t)+" ").indexOf(" "+i+" ")}function hn(t,i){if(void 0!==t.classList)t.classList.add(i);else if(void 0!==t.className){var n=sn(t);-1===(" "+n+" ").indexOf(" "+i+" ")&&un(t,(n+" "+i).trim())}}function an(t,i){if(void 0!==t.classList)t.classList.remove(i);else if(void 0!==t.className){for(var n=" "+sn(t)+" ",r=" "+i+" ";-1!==n.indexOf(r);)n=n.replace(r," ");un(t,n.trim())}}function cn(t,i,n){void 0===n&&(n=!on(t,i)),n?hn(t,i):an(t,i)}function fn(t){t.stopPropagation()}function vn(t,i){Oi.w_&&Oi.A_<3?function(t,i){var n=i;switch(i){case"flex":n="-webkit-flex";break;case"inline-flex":n="-webkit-inline-flex"}t.display=n}(t,i):function(t,i){if(t.display=i,t.display!==i){var n=i;switch(i){case"flex":n="-ms-flexbox";break;case"inline-flex":n="-ms-inline-flexbox"}t.display=n}}(t,i)}function dn(t,i){var n=i.style;if(n)for(var r,e=Ft(b.keys(t));!(r=e()).done;){var s=r.value,u=t[s];void 0!==u&&(n[s]=u)}}function ln(t){var i=t.style;i.position="absolute",i.left="0",i.right="0",i.top="0",i.bottom="0",i.width="100%",i.height="100%"}function gn(t){var i=t.style;i.position="",i.left="",i.right="",i.top="",i.bottom="",i.width="",i.height=""}function wn(t){t.removeAttribute("title")}function mn(t){try{return Boolean(t)&&t.parent!==t}catch(t){return!1}}V(),It(),V(),It();var yn=function(){},pn=function(t){return t};function _n(t,i){var n=-1/0;return function(){for(var r=arguments.length,e=new Array(r),s=0;s=i&&(t.apply(this,e),n=u)}}function kn(t,i){var n=0;return function(){for(var r=arguments.length,e=new Array(r),s=0;sa&&(u=a),e>a&&(e=a),o=s,h=u;;)if(oi?1:E(t)?E(i)?0:1:-1};function Vn(t,i,n){return Pn(t,i,n)?0:Un(t,i)}var jn=function(t,i){return Nn(t,i)?0:Un(t,i)};var Hn="function"==typeof Array.prototype.find?function(t,i){return t.find(i)}:function(t,i){var n=Xn(t,i);return-1===n?void 0:t[n]},Wn=Hn,zn="function"==typeof Array.prototype.findLast?function(t,i){return t.findLast(i)}:function(t,i){var n=Gn(t,i);return-1===n?void 0:t[n]},qn=zn,Xn="function"==typeof Array.prototype.findIndex?function(t,i){return t.findIndex(i)}:function(t,i){for(var n=0;n=0;n-=1){if(i(t[n],n,t))return n}return-1},Qn="function"==typeof Array.prototype.at?function(t,i){return t.at(i)}:function(t,i){var n=t.length,r=i>=0?i:n+i;return r<0||r>=n?void 0:t[r]};function Yn(t,i){var n=t.indexOf(i);return-1!==n&&($n(t,n),!0)}function $n(t,i){0===i?t.shift():t.splice(i,1)}function Kn(t,i){for(var n=new Array(t.length),r=0,e=0;e=0;r--){var e=n.item(r);en(e)===i&&t.removeChild(e)}}(t,"source"),t.load())}function Dr(){return void 0!==v?v.createElement("video"):void 0}var xr=bn(Dr),Br=bn(function(){return"undefined"!=typeof HTMLVideoElement&&j(xr(),HTMLVideoElement)});function Or(t){var i=v.createElement(t);return Pr(i)&&i.addEventListener("contextmenu",Ur),Lr(i),i}function Mr(t){Lr(t),t.removeEventListener("contextmenu",Ur)}function Lr(t){t.removeAttribute("id"),t.removeAttribute("class"),t.removeAttribute("style"),tn(t),Nr(t),t.pause(),t.playbackRate=1,t.disableRemotePlayback=!1,t.preload="auto",t.controls=!1,t.style.display="none",Pr(t)&&(t.style.width="100%",t.style.height="100%",t.style.pointerEvents="none",t.playsInline=!0,t.setAttribute("webkit-playsinline",""))}function Fr(t,i){if(i.sp){var n=t.muted;t.muted=!0,t.muted=!1,t.muted=n}else if(t.paused){var r=t.play();Gi(r)&&Er(r),t.pause()}}function Ur(t){t.preventDefault()}V(),It(),V(),It(),V(),It(),ft();var Vr=null;try{Vr=new WebAssembly.Instance(new WebAssembly.Module(new I([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(ui){}function jr(t,i,n){this.low=0|t,this.high=0|i,this.unsigned=!!n}function Hr(t){return!0===(t&&t.np)}function Wr(t){var i=A.clz32(t&-t);return t?31-i:i}jr.prototype.np,b.defineProperty(jr.prototype,"np",{value:!0}),jr.isLong=Hr;var zr={},qr={};function Xr(t,i){var n,r,e;return i?(e=0<=(t>>>=0)&&t<256)&&(r=qr[t])?r:(n=Qr(t,0,!0),e&&(qr[t]=n),n):(e=-128<=(t|=0)&&t<128)&&(r=zr[t])?r:(n=Qr(t,t<0?-1:0,!1),e&&(zr[t]=n),n)}function Gr(t,i){if(E(t))return i?re:ne;if(i){if(t<0)return re;if(t>=Zr)return he}else{if(t<=-te)return ae;if(t+1>=te)return oe}return t<0?Gr(-t,i).neg():Qr(t%Jr|0,t/Jr|0,i)}function Qr(t,i,n){return new jr(t,i,n)}jr.fromInt=Xr,jr.fromNumber=Gr,jr.fromBits=Qr;var Yr=A.pow;function $r(t,i,n){if(0===t.length)throw p("empty string");if("number"==typeof i?(n=i,i=!1):i=!!i,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return i?re:ne;if((n=n||10)<2||360)throw p("interior hyphen");if(0===r)return $r(t.substring(1),i,n).neg();for(var e=Gr(Yr(n,8)),s=ne,u=0;u>>0:this.low},ce.toNumber=function(){return this.unsigned?(this.high>>>0)*Jr+(this.low>>>0):this.high*Jr+(this.low>>>0)},ce.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((s=o).isZero())return h+u;for(;h.length<6;)h="0"+h;u=""+h+u}},ce.getHighBits=function(){return this.high},ce.getHighBitsUnsigned=function(){return this.high>>>0},ce.getLowBits=function(){return this.low},ce.getLowBitsUnsigned=function(){return this.low>>>0},ce.getNumBitsAbs=function(){if(this.isNegative())return this.eq(ae)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,i=31;i>0&&!(t&1<>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},ce.isZero=function(){return 0===this.high&&0===this.low},ce.eqz=ce.isZero,ce.isNegative=function(){return!this.unsigned&&this.high<0},ce.isPositive=function(){return this.unsigned||this.high>=0},ce.isOdd=function(){return!(1&~this.low)},ce.isEven=function(){return!(1&this.low)},ce.equals=function(t){return Hr(t)||(t=Kr(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},ce.eq=ce.equals,ce.notEquals=function(t){return!this.eq(t)},ce.neq=ce.notEquals,ce.ne=ce.notEquals,ce.lessThan=function(t){return this.comp(t)<0},ce.lt=ce.lessThan,ce.lessThanOrEqual=function(t){return this.comp(t)<=0},ce.lte=ce.lessThanOrEqual,ce.le=ce.lessThanOrEqual,ce.greaterThan=function(t){return this.comp(t)>0},ce.gt=ce.greaterThan,ce.greaterThanOrEqual=function(t){return this.comp(t)>=0},ce.gte=ce.greaterThanOrEqual,ce.ge=ce.greaterThanOrEqual,ce.compare=function(t){if(Hr(t)||(t=Kr(t)),this.eq(t))return 0;var i=this.isNegative(),n=t.isNegative();return i&&!n?-1:!i&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},ce.comp=ce.compare,ce.negate=function(){return!this.unsigned&&this.eq(ae)?ae:this.not().add(ee)},ce.neg=ce.negate,ce.add=function(t){Hr(t)||(t=Kr(t));var i=this.high>>>16,n=65535&this.high,r=this.low>>>16,e=65535&this.low,s=t.high>>>16,u=65535&t.high,o=t.low>>>16,h=0,a=0,c=0,f=0;return c+=(f+=e+(65535&t.low))>>>16,a+=(c+=r+o)>>>16,h+=(a+=n+u)>>>16,h+=i+s,Qr((c&=65535)<<16|(f&=65535),(h&=65535)<<16|(a&=65535),this.unsigned)},ce.subtract=function(t){return Hr(t)||(t=Kr(t)),this.add(t.neg())},ce.sub=ce.subtract,ce.multiply=function(t){if(this.isZero())return this;if(Hr(t)||(t=Kr(t)),Vr)return Qr(Vr.mul(this.low,this.high,t.low,t.high),Vr.get_high(),this.unsigned);if(t.isZero())return this.unsigned?re:ne;if(this.eq(ae))return t.isOdd()?ae:ne;if(t.eq(ae))return this.isOdd()?ae:ne;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(ie)&&t.lt(ie))return Gr(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,n=65535&this.high,r=this.low>>>16,e=65535&this.low,s=t.high>>>16,u=65535&t.high,o=t.low>>>16,h=65535&t.low,a=0,c=0,f=0,v=0;return f+=(v+=e*h)>>>16,c+=(f+=r*h)>>>16,f&=65535,c+=(f+=e*o)>>>16,a+=(c+=n*h)>>>16,c&=65535,a+=(c+=r*o)>>>16,c&=65535,a+=(c+=e*u)>>>16,a+=i*h+n*o+r*u+e*s,Qr((f&=65535)<<16|(v&=65535),(a&=65535)<<16|(c&=65535),this.unsigned)},ce.mul=ce.multiply,ce.divide=function(t){if(Hr(t)||(t=Kr(t)),t.isZero())throw p("division by zero");var i,n,r;if(Vr)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?Qr((this.unsigned?Vr.div_u:Vr.div_s)(this.low,this.high,t.low,t.high),Vr.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?re:ne;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return re;if(t.gt(this.shru(1)))return se;r=re}else{if(this.eq(ae))return t.eq(ee)||t.eq(ue)?ae:t.eq(ae)?ee:(i=this.shr(1).div(t).shl(1)).eq(ne)?t.isNegative()?ee:ue:(n=this.sub(t.mul(i)),r=i.add(n.div(t)));if(t.eq(ae))return this.unsigned?re:ne;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();r=ne}for(n=this;n.gte(t);){i=A.max(1,A.floor(n.toNumber()/t.toNumber()));for(var e=A.ceil(A.log(i)/A.LN2),s=e<=48?1:Yr(2,e-48),u=Gr(i),o=u.mul(t);o.isNegative()||o.gt(n);)o=(u=Gr(i-=s,this.unsigned)).mul(t);u.isZero()&&(u=ee),r=r.add(u),n=n.sub(o)}return r},ce.div=ce.divide,ce.modulo=function(t){return Hr(t)||(t=Kr(t)),Vr?Qr((this.unsigned?Vr.rem_u:Vr.rem_s)(this.low,this.high,t.low,t.high),Vr.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},ce.mod=ce.modulo,ce.rem=ce.modulo,ce.not=function(){return Qr(~this.low,~this.high,this.unsigned)},ce.countLeadingZeros=function(){return this.high?A.clz32(this.high):A.clz32(this.low)+32},ce.clz=ce.countLeadingZeros,ce.countTrailingZeros=function(){return this.low?Wr(this.low):Wr(this.high)+32},ce.ctz=ce.countTrailingZeros,ce.and=function(t){return Hr(t)||(t=Kr(t)),Qr(this.low&t.low,this.high&t.high,this.unsigned)},ce.or=function(t){return Hr(t)||(t=Kr(t)),Qr(this.low|t.low,this.high|t.high,this.unsigned)},ce.xor=function(t){return Hr(t)||(t=Kr(t)),Qr(this.low^t.low,this.high^t.high,this.unsigned)},ce.shiftLeft=function(t){return Hr(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qr(this.low<>>32-t,this.unsigned):Qr(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):Qr(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},ce.shr=ce.shiftRight,ce.shiftRightUnsigned=function(t){return Hr(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qr(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Qr(32===t?this.high:this.high>>>t-32,0,this.unsigned)},ce.shru=ce.shiftRightUnsigned,ce.shr_u=ce.shiftRightUnsigned,ce.rotateLeft=function(t){var i;return Hr(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Qr(this.high,this.low,this.unsigned):t<32?(i=32-t,Qr(this.low<>>i,this.high<>>i,this.unsigned)):(i=32-(t-=32),Qr(this.high<>>i,this.low<>>i,this.unsigned))},ce.rotl=ce.rotateLeft,ce.rotateRight=function(t){var i;return Hr(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Qr(this.high,this.low,this.unsigned):t<32?(i=32-t,Qr(this.high<>>t,this.low<>>t,this.unsigned)):(i=32-(t-=32),Qr(this.low<>>t,this.high<>>t,this.unsigned))},ce.rotr=ce.rotateRight,ce.toSigned=function(){return this.unsigned?Qr(this.low,this.high,!1):this},ce.toUnsigned=function(){return this.unsigned?this:Qr(this.low,this.high,!0)},ce.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},ce.toBytesLE=function(){var t=this.high,i=this.low;return[255&i,i>>>8&255,i>>>16&255,i>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},ce.toBytesBE=function(){var t=this.high,i=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,i>>>24,i>>>16&255,i>>>8&255,255&i]},jr.fromBytes=function(t,i,n){return n?jr.fromBytesLE(t,i):jr.fromBytesBE(t,i)},jr.fromBytesLE=function(t,i){return new jr(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,i)},jr.fromBytesBE=function(t,i){return new jr(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],i)},"function"==typeof BigInt&&(jr.fromBigInt=function(t,i){return Qr(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),i)},jr.fromValue=function(t,i){return"bigint"===(void 0===t?"undefined":W(t))?jr.fromBigInt(t,i):Kr(t,i)},ce.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<=2*me},xt(t,[{key:"rp",get:function(){return void 0===this.hp&&(this.hp=this.op()),this.hp}},{key:"ap",get:function(){return Oi.Fv?"android":Oi.Dv?"macos":Oi.ru?"ios":Oi.Nv?"windows":"other"}},{key:"cp",get:function(){return Oi.og?"tv":Oi.Ks?"mobile":"desktop"}},{key:"dp",get:function(){return!Oi.og}},{key:"lp",get:function(){if(f.screen)return{width:f.screen.width,height:f.screen.height}}},{key:"fp",get:function(){return f.devicePixelRatio||1}},{key:"vp",get:function(){return be}},{key:"_p",get:function(){return!1}},{key:"gp",get:function(){return!0}},{key:"pp",get:function(){return!!(Oi.X_||Oi.ru||Oi.g_)||!!Oi.D_}},{key:"mp",get:function(){return Oi.D_}},{key:"wp",get:function(){return!Oi.ru}},{key:"yp",get:function(){return!0}},{key:"Ap",get:function(){return!0}},{key:"bp",get:function(){return!1}},{key:"Sp",get:function(){}},{key:"Tp",get:function(){return!0}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){return Oi.D_}},{key:"Pp",get:function(){return!1}},{key:"Rp",get:function(){return!1}},{key:"Cp",get:function(){return!1}},{key:"Dp",get:function(){return!1}}]),t}(),Te=function(t){function i(){return t.call(this)||this}return Pt(i,t),i}(Ae);V(),It(),Bt(),Nt();var Se=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.xp=function(t,i){if(t&&t.Np&&i&&i.Np){var n=Ee(t.Np,"mp4a.40.2")&&Ee(i.Np,"mp4a.40.5"),r=Ee(t.Np,"mp4a.40.5")&&Ee(i.Np,"mp4a.40.2"),e=Ee(t.Np,"mp4a.40.2")&&Ee(i.Np,"mp4a.40.34"),s=Ee(t.Np,"mp4a.40.34")&&Ee(i.Np,"mp4a.40.2"),u=Ee(t.Np,"mp4a.40.5")&&Ee(i.Np,"mp4a.40.34"),o=Ee(t.Np,"mp4a.40.34")&&Ee(i.Np,"mp4a.40.5");return!(n||r||e||s||u||o)}return!0},xt(i,[{key:"Sp",get:function(){if(Oi.Dv)return 4096}},{key:"Dp",get:function(){return!0}}]),i}(Te);function Ee(t,i){return t.indexOf(i)>-1}V(),It(),Nt();var Ie=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.Ip=function(t){return t>=2},i}(Te);V(),It(),Bt(),Nt();var Re=function(t){function i(){var i;return(i=t.call(this)||this).Bp=Oi.Q_>=11,i.sp=Oi.X_&&!(Oi.ru&&Oi.Q_<10),i}return Pt(i,t),xt(i,[{key:"Pp",get:function(){return Oi.Q_<17}},{key:"Rp",get:function(){return!0}}]),i}(Te);V(),It(),Bt(),Nt();var Ce,Pe=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),xt(i,[{key:"Tp",get:function(){return!Oi.Nv||(Oi.v_?92!==Oi.m_:Oi.d_>=100)}}]),i}(Te);V(),It(),V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt(),V(),It();var Ne=function(){var t=Dr();if(!t)return!1;var i=t.muted;return t.muted=!i,t.muted!==i}(),De=function(){if(Oi.Kv)return!1;var t=Dr();if(!t)return!1;var i=t.volume;return t.volume=i/2+.1,i!==t.volume}();var xe=function(t){function i(i){var n;return(n=t.call(this)||this).Mp=void 0,n.Mp=i,n.Bp=n.Mp.Bp,n.Ke=n.Mp.Ke,n.sp=Ne&&n.Mp.sp,n}Pt(i,t);var n=i.prototype;return n.op=function(){return this.Mp.rp},n.xp=function(t,i){return this.Mp.xp(t,i)},n.Ip=function(t){return this.Mp.Ip(t)},xt(i,[{key:"Sp",get:function(){return this.Mp.Sp}},{key:"Tp",get:function(){return this.Mp.Tp}},{key:"Pp",get:function(){return this.Mp.Pp}},{key:"Dp",get:function(){return this.Mp.Dp}}]),i}(Ae),Be=function(t){function i(i){var n;return(n=t.call(this,i)||this).Bp=!0,n.Ks=!0,n}return Pt(i,t),xt(i,[{key:"bp",get:function(){return Oi.ru}}]),i}(xe);V(),It();var Oe=function(){function t(t){this.Op=void 0,this.Op=Me(t)}var i=t.prototype;return i.Lp=function(){return new this.Op},i.Fp=function(t){return this.Op.isTypeSupported(t)},t}();function Me(t){return t&&Ki(f.ManagedMediaSource)?f.ManagedMediaSource:Ki(f.MediaSource)?f.MediaSource:void 0}var Le=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.op=function(){return Me(!0)?t.prototype.op.call(this):1},xt(i,[{key:"bp",get:function(){return!0}}]),i}(Be);V(),It(),Bt(),Nt();var Fe=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Up=void 0,i}return Pt(i,t),i.prototype.xp=function(i,n){return t.prototype.xp.call(this,i,n)},xt(i,[{key:"_p",get:function(){return Oi.A_<3}},{key:"gp",get:function(){return Oi.A_>=3}},{key:"lp",get:function(){var t=this;return f.tizen&&!this.Up&&f.tizen.systeminfo.getPropertyValue("DISPLAY",function(i){var n=i.resolutionWidth,r=i.resolutionHeight;1===n&&1===r||(t.Up={width:n,height:r})}),this.Up}},{key:"kp",get:function(){return Oi.A_<3}}]),i}(xe);V(),It(),Bt(),Nt();var Ue=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Up=void 0,i}return Pt(i,t),xt(i,[{key:"lp",get:function(){var t=this;return f.webOS&&!this.Up&&f.webOS.deviceInfo(function(i){t.Up={width:i.screenWidth,height:i.screenHeight}}),this.Up}},{key:"yp",get:function(){return!1}}]),i}(xe);V(),It(),Bt(),Nt();var Ve=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),xt(i,[{key:"bp",get:function(){return!0}},{key:"Rp",get:function(){return this.Mp.Rp}}]),i}(xe);V(),It(),Bt(),Nt();var je=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),xt(i,[{key:"Cp",get:function(){return Oi.IS_FIRETV_AFTMM}}]),i}(xe);!function(t){Ce=t}(function(){var t=function(){if(Oi.W_)return new Se;if(Oi.N_||Oi.L_)return new Ie;if(Oi.X_)return new Re;if(Oi.u_)return new Pe;return new Te}();return Oi.ru?new Le(t):Oi.I_?new je(t):Oi.Ks?new Be(t):Oi.w_?new Fe(t):Oi.S_?new Ue(t):Oi.Dv?new Ve(t):new xe(t)}()),V(),It(),Bt(),Nt(),V(),It(),Bt(),H(),ft(),V(),It();var He=!(Oi.L_&&!Oi.F_),We=self.console;function ze(t){if(Wi(t))try{return JSON.stringify(t)}catch(t){}return t}function qe(t){return t.map(ze).join(" ")}function Xe(t){var i=We&&We[t];return i?i.bind&&He?i.bind(We):function(){for(var i=arguments.length,n=new Array(i),r=0;r1?i-1:0),r=1;r1?i-1:0),r=1;ra&&(s=a),u>a&&(u=a),o=e,h=s;;)if(o=65&&t<=90}function ds(t){return vs(t)||function(t){return t>=97&&t<=122}(t)}function ls(t){return t>=48&&t<=57}function gs(t){return ls(t)||ds(t)}function ws(t){return ls(t)||t>=65&&t<=70||t>=97&&t<=102}function ms(t){return vs(t)?t+32:t}function ys(t){return ls(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function ps(t,i){return void 0===i&&(i=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(i?87:55):-1}var _s=A.min,ks=String.fromCharCode;function bs(t){for(var i=t.length,n=[],r=0;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Is=A.floor,Rs=String.fromCharCode;function Cs(t){throw new RangeError(Es[t])}function Ps(t){for(var i=[],n=0,r=t.length;n=55296&&e<=56319&&n>1,t+=Is(t/i);t>455;r+=36)t=Is(t/35);return Is(r+36*t/(t+38))},Ms=function(t){return function(t,i){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]);var e=function(t,i){for(var n=[],r=t.length;r--;)n[r]=i(t[r]);return n}((t=t.replace(Ss,".")).split("."),i).join(".");return r+e}(t,function(t){return Ts.test(t)?"xn--"+function(t){for(var i=[],n=(t=Ps(t)).length,r=128,e=0,s=72,u=0,o=t;u=r&&lIs((As-e)/g)&&Cs("overflow"),e+=(f-r)*g,r=f;for(var w=0,m=t;wAs&&Cs("overflow"),y==r){for(var p=e,_=36;;_+=36){var k=_<=s?1:_>=s+26?26:_-s;if(p65535&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r)}return bs(i)}function Fs(t){if(t>=55296&&t<=57343)throw new p("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Us(t,i){return t>>i&63|128}function Vs(t,i){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(i.push(t>>18&7|240),i.push(Us(t,12)),i.push(Us(t,6))):(Fs(t),i.push(t>>12&15|224),i.push(Us(t,6))):i.push(t>>6&31|192),i.push(63&t|128)):i.push(t)}function js(t){for(var i=[],n=0;n=Ds)throw new p("Invalid byte index");var t=255&Ns[xs];if(xs++,128==(192&t))return 63&t;throw new p("Invalid continuation byte")}function Ws(){var t,i;if(xs>Ds)throw new p("Invalid byte index");if(xs===Ds)return!1;if(t=255&Ns[xs],xs++,!(128&t))return t;if(192==(224&t)){if((i=(31&t)<<6|Hs())>=128)return i;throw new p("Invalid continuation byte")}if(224==(240&t)){if((i=(15&t)<<12|Hs()<<6|Hs())>=2048)return Fs(i),i;throw new p("Invalid continuation byte")}if(240==(248&t)&&(i=(7&t)<<18|Hs()<<12|Hs()<<6|Hs())>=65536&&i<=1114111)return i;throw new p("Invalid UTF-8 detected")}function zs(t){return[37,ps(t>>4),ps(15&t)]}function qs(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Xs(t){return qs(t)||32===t||34===t||60===t||62===t||96===t}function Gs(t){return Xs(t)||35===t||63===t||123===t||125===t}function Qs(t){return Gs(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Ys(t){return t<33||t>126||34===t||35===t||60===t||62===t}function $s(t){return Ys(t)||39===t}function Ks(t,i){if(!i(t))return[t];for(var n=js([t]),r=[],e=0;e6)throw new _;for(var h=0;s0){if(!("."===t[s]&&h<4))throw new _;s+=1}if(!is.test(t[s]))throw new _;for(;s255)throw new _}s+=1}n[r]=n[r]<<8|a,2!==(h+=1)&&4!==h||(r+=1)}if(4!==h)throw new _;break}if(":"===t[s]){if((s+=1)===i)throw new _}else if(s0;)fs(n,r,e+f-1),r-=1,f-=1}else if(8!==r)throw new _;return n}function nu(t){var i=10,n=es;return rs.test(t)?(t=t.slice(2),i=16,n=ss):t.length>=2&&"0"===t[0]&&(t=t.slice(1),i=8,n=us),""===t?0:n.test(t)?T(t,i):void 0}var ru={Vp:4},eu=/[\0\t\n\r #%/:?@\[\\\]]/,su=/[\0\t\n\r #/:?@\[\\\]]/;function uu(t,i){if("["===t[0]){if("]"!==t[t.length-1])throw new _("Invalid IPv6 address");return{Vp:2,Hp:iu(t.slice(1,-1))}}if(!i)return function(t){if(su.test(t))throw new _("Invalid code point in opaque host");var i=Js(t,qs);return""===i?ru:{Vp:3,Wp:i}}(t);var n=function(t){var i=function(t){return Ms(t.toLowerCase())}(t);return i}(tu(t));if(eu.test(n))throw new _("Invalid code point in host");var r=function(t){var i=t.split(".");if(""===i[i.length-1]&&i.pop(),!(i.length>4)){for(var n=[],r=0;r255)throw new _;if(n[n.length-1]>=A.pow(256,5-n.length))throw new _;for(var o=n.pop(),h=0;h>>=8;return i.reverse().join("")}(t.Hp);case 2:return"["+function(t){for(var i="",n=function(t){for(var i=0,n=0,r=0,e=0,s=0;s<8;s++)0===t[s]?(0===e&&(r=s),e++):(e>n&&(i=r,n=e),e=0);return e>n&&(i=r,n=e),n>1?i:null}(t),r=!1,e=0;e<8;e++){if(r){if(0===t[e])continue;r=!1}n!==e?(i+=t[e].toString(16),7!==e&&(i+=":")):(i+=0===e?"::":":",r=!0)}return i}(t.Hp)+"]";case 3:return t.Wp;case 4:return""}}var hu=/\+/g;function au(t){return 42===t||45===t||46===t||95===t||gs(t)}function cu(t){for(var i=t.split("&"),n=[],r=0;r0&&(i+="&"),i+=vu(js(Ps(r[0])))+"="+vu(js(Ps(r[1])))}return i}function vu(t){for(var i=[],n=0;n0&&"?"===t[0]&&(t=t.slice(1)),this.zp=cu(t)}var i=t.prototype;return i.append=function(t,i){t=lu(t),i=lu(i),this.zp.push([t,i]),ku(this)},i.delete=function(t){t=lu(t);for(var i=this.zp,n=0;n=2))return!1;if(!Uu(t.slice(0,2)))return!1;if(2!==i){var n=t[2];if(47!==n&&92!==n&&63!==n&&35!==n)return!1}return!0}function Fu(t){return 2===t.length&&ts.test(t[0])&&(":"===t[1]||"|"===t[1])}function Uu(t){return 2===t.length&&Fu(bs(t))}function Vu(t){return Fu(t)&&":"===t[1]}function ju(t){var i=t.Jp;0!==i.length&&("file"===t.Qp&&1===i.length&&Vu(i[0])||i.pop())}function Hu(t){return null===t.Zp||ru===t.Zp||t.$p||"file"===t.Qp}var Wu=-1,zu=/\t|\n|\r/g,qu=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Xu(t,i,n,r){void 0===n&&(n=null),void 0===r&&(r=null),n||(n=new Qu,t=t.replace(qu,""));var e=null!==r?r:0;i=i||null;for(var s=[],u=!1,o=!1,h=!1,a=Ps(t=t.replace(zu,"")),c=a.length,f=0;f<=c;){var v=f65535)throw new _("Invalid port");n.im=p===Cu[n.Qp]?null:p,s.length=0}if(null!==r)return;e=16,f-=1}break;case 13:n.Qp="file",47===v||92===v?e=14:i&&"file"===i.Qp?Wu===v?(n.Zp=i.Zp,n.Jp=i.Jp.slice(),n.Gp=i.Gp):63===v?(n.Zp=i.Zp,n.Jp=i.Jp.slice(),n.Gp="",e=19):35===v?(n.Zp=i.Zp,n.Jp=i.Jp.slice(),n.Gp=i.Gp,n.nm="",e=20):(Lu(a.slice(f))||(n.Zp=i.Zp,n.Jp=i.Jp.slice(),ju(n)),e=17,f-=1):(e=17,f-=1);break;case 14:47===v||92===v?e=15:(i&&"file"===i.Qp&&!Lu(a.slice(f))&&(Vu(i.Jp[0])?n.Jp.push(i.Jp[0]):n.Zp=i.Zp),e=17,f-=1);break;case 15:if(Wu===v||47===v||92===v||63===v||35===v)if(f-=1,null===r&&Uu(s))e=17;else if(0===s.length){if(n.Zp=ru,null!==r)return;e=16}else{var k=uu(Ls(s),Ou(n));if(0===k.Vp&&"localhost"===k.qp&&(k=ru),n.Zp=k,null!==r)return;s.length=0,e=16}else s.push(v);break;case 16:Ou(n)?(e=17,47!==v&&92!==v&&(f-=1)):null===r&&63===v?(n.Gp="",e=19):null===r&&35===v?(n.nm="",e=20):Wu!==v&&(e=17,47!==v&&(f-=1));break;case 17:if(Wu===v||47===v||Ou(n)&&92===v||null===r&&(63===v||35===v)){var b=Ls(s);if(xu(b)?(ju(n),47===v||Ou(n)&&92===v||n.Jp.push("")):!Du(b)||47===v||Ou(n)&&92===v?Du(b)||("file"===n.Qp&&0===n.Jp.length&&Uu(s)&&(ru!==n.Zp&&null!==n.Zp&&(n.Zp=ru),s[1]=58,b=Ls(s)),n.Jp.push(b)):n.Jp.push(""),s.length=0,"file"===n.Qp&&(Wu===v||63===v||35===v))for(;n.Jp.length>1&&""===n.Jp[0];)n.Jp.shift();63===v?(n.Gp="",e=19):35===v&&(n.nm="",e=20)}else s.push.apply(s,Ks(v,Gs));break;case 18:63===v?(n.Gp="",e=19):35===v?(n.nm="",e=20):Wu!==v&&(n.Jp[0]+=Ls(Ks(v,qs)));break;case 19:null===r&&35===v?(n.nm="",e=20):Wu!==v&&(n.Gp+=Ls(Ks(v,Ou(n)?$s:Ys)));break;case 20:Wu===v||0===v||(n.nm+=Ls(Ks(v,Xs)))}f++}return n}function Gu(t,i,n,r){try{Xu(t,i,n,r)}catch(t){}}var Qu=function(){this.Qp="",this.Kp="",this.Yp="",this.Zp=null,this.im=null,this.Jp=[],this.Gp=null,this.nm=null,this.$p=!1};function Yu(t){switch(t.Qp){case"blob":var i;try{i=Xu(t.Jp[0],null)}catch(t){return Ru}return Yu(i);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,i,n){return t+"://"+ou(i)+(null===n?"":":"+n)}(t.Qp,t.Zp,t.im);default:return Ru}}var $u=function(){function t(t,i){var n,r=null;if(null!=i)if(function(t){return null!=t&&t instanceof $u&&"object"==typeof t.rc}(i))r=i.rc;else try{r=Xu(String(i),null)}catch(t){throw new _("Invalid base URL: "+t.message)}try{n=Xu(String(t),r)}catch(t){throw new _("Invalid URL: "+t.message)}var e=n.Gp;this.rc=n,this.Gp=function(t){var i=new bu;return null!==t&&_u(i,t),i}(e),this.Gp.rc=this}var i=t.prototype;return i.toString=function(){return this.href},i.toJSON=function(){return this.href},function(t,i,n){i&&Ke(t.prototype,i),n&&Ke(t,n)}(t,[{key:"href",get:function(){return function(t,i){void 0===i&&(i=!1);var n=t.Qp+":";if(null!==t.Zp?(n+="//",Mu(t)&&(n+=t.Kp,""!==t.Yp&&(n+=":"+t.Yp),n+="@"),n+=ou(t.Zp),null!==t.im&&(n+=":"+t.im)):null===t.Zp&&"file"===t.Qp&&(n+="//"),t.$p)n+=t.Jp[0];else for(var r=0,e=t.Jp;r1?i-1:0),r=1;r>>=1);)r+=r;return e},Qo="function"==typeof String.prototype.padStart?function(t,i,n){return void 0===n&&(n=" "),t.padStart(i,n)}:function(t,i,n){void 0===n&&(n=" ");var r=n,e=(0|i)-t.length;return e<=0?t:(e>r.length&&(r+=Go(r,e/r.length)),r.slice(0,e)+t)},Yo=(String.prototype.padEnd,16384),$o="function"==typeof String.fromCodePoint?function(t){var i;return t.length<=Yo?(i=String).fromCodePoint.apply(i,[].concat(t)):Jo(t,String.fromCodePoint)}:function(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){var e=i.value;e>65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return Ko(n)};function Ko(t){var i;return t.length<=Yo?(i=String).fromCharCode.apply(i,[].concat(t)):Jo(t,String.fromCharCode)}function Jo(t,i){for(var n=[],r=0;r=42||Oi.W_&&Oi.z_>=38||Oi.N_||Oi.F_||Oi.Y_&&Oi.Z_>=29;function ih(t,i){return Wo(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[io({contentType:t},i?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[io({contentType:t},i?{robustness:"SW_SECURE_CRYPTO"}:{})]}}function nh(){return void 0!==l&&"function"==typeof l.requestMediaKeySystemAccess}function rh(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest}var eh=function(){function t(t){this.hw=void 0,this.ew=ro(),this.ow=void 0,this.hw=t}var i=t.prototype;return i.Am=function(){return this.Tm(Bo)},i.pm=function(){return this.Tm(Lo)},i.ym=function(){return this.Tm(xo)},i.wm=function(){return this.Tm(Oo)},i.Tm=function(t){var i=t.$m,n=this.ew.get(i);if(n)return n;var r=this.Sm(t,'video/mp4; codecs="avc1.42000a"');return this.ew.set(i,r),r},i.Sm=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,7]),[4,this.hw.nw(t.Ym,[ih(i,!0)])];case 1:return n.sent(),[2,!0];case 2:n.sent(),n.label=3;case 3:return n.trys.push([3,5,,6]),[4,this.hw.nw(t.Ym,[ih(i,!1)])];case 4:return n.sent(),[2,!0];case 5:return n.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}})}).call(this)},i._m=function(){return this.ow||(this.ow=this.aw()),this.ow},i.aw=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return"https:"===f.location.protocol?[2,!1]:th?[4,this.pm()]:[2,!1];case 1:return t.sent()?[2,!1]:[2,!0]}})}).call(this)},t}();function sh(t,i,n){if("function"==typeof n)n.call(t,i);else for(var r,e=Ft(n);!(r=e()).done;){r.value.call(t,i)}}V(),It(),V(),It(),Wt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Yt(),V(),It(),Bt(),Nt(),V(),It(),Nt(),Ut();var uh=function(){function t(t){var i=this;this.cw=no(),this.fw=void 0,this.dw=0,this._w=void 0,this.Rs=function(t){i.So(t)},this._w=null!=t?t:this}var i=t.prototype;return i.wn=function(t,i){if("function"==typeof i)if("string"==typeof t)this.uw(t,i);else for(var n,r=Ft(t);!(n=r()).done;){var e=n.value;this.uw(e,i)}},i.uw=function(t,i){var n=this.cw[t];void 0===n?this.cw[t]=i:"function"==typeof n?this.cw[t]=[n,i]:0===this.dw?n.push(i):this.cw[t]=n.concat(i)},i.lw=function(t){if("function"==typeof t){var i=this.fw;void 0===i?this.fw=t:"function"==typeof i?this.fw=[i,t]:0===this.dw?i.push(t):this.fw=i.concat(t)}},i.Vo=function(){this.cw=no(),this.fw=void 0},i.So=function(t){this.dw++;var i=this.cw[t.type],n=this.fw;void 0!==i&&sh(this._w,t,i),void 0!==n&&sh(this._w,t,n),this.dw--},i.mn=function(t,i){if("function"==typeof i)if("string"==typeof t)this.gw(t,i);else for(var n,r=Ft(t);!(n=r()).done;){var e=n.value;this.gw(e,i)}},i.gw=function(t,i){var n=this.cw[t];void 0!==n&&("function"==typeof n?n===i&&(this.cw[t]=void 0):0===this.dw?Yn(n,i):this.cw[t]=Kn(n,i))},i.pw=function(t){if("string"==typeof t)this.cw[t]=void 0;else for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;this.cw[r]=void 0}},i.mw=function(t){var i=this.fw;void 0!==i&&("function"==typeof i?i===t&&(this.fw=void 0):0===this.dw?Yn(i,t):this.fw=Kn(i,t))},i.ww=function(t,i){var n=this;return new ot(function(r,e){if(i&&i.Hg)return e(new wr);var s=function(t){o(),r(t)},u=function(){o(),e(new wr)},o=function(){n.mn(t,s),i&&i.jg(u)};n.wn(t,s),i&&i.Xg(u)})},t}(),oh=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.So=function(i){var n=this;Sr(function(){t.prototype.So.call(n,i)})},i}(uh),hh=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.lw=function(i){t.prototype.lw.call(this,i)},n.mw=function(i){t.prototype.mw.call(this,i)},i}(uh);V(),It(),Nt(),V(),It();var ah=function(t,i){void 0===i&&(i=new Date),this.type=void 0,this.date=void 0,this.type=t,this.date=i};V(),It();var ch=function(t){return t.yw="Aw",t.Sw="Tw",t.Ew="contentprotectionerror",t.Pw="contentprotectionsuccess",t.xw="currentsourcechange",t.Iw="destroy",t.Rw="durationchange",t.Cw="emptied",t.Dw="encrypted",t.Bw="ended",t.Nw="Mw",t.Lw="Ow",t.Fw="Uw",t.Vw="Hw",t.Ww="loadstart",t.qw="manifestupdate",t.zw="nosupportedrepresentationfound",t.Gw="offline",t.Xw="online",t.jw="pause",t.uo="play",t.Qw="progress",t.Kw="ratechange",t.Yw="representationchange",t.Jw="resize",t.Zw="seeked",t.$w="seeking",t.iy="segmentnotfound",t.ey="sy",t.oy="uy",t.ly="vy",t.do="sourcechange",t._y="timeupdate",t.gy="volumechange",t.py="wy",t.yy="Ay",t.LICENSE_REQUEST_GENERATED="by",t.Sy="metricschange",t}({}),fh=["cenc"],vh=["cbcs","cbcs-1-9"],dh=function(t){function i(i){var n;return(n=t.call(this,ch.yy)||this).Ty=void 0,n.Ty=i,n}return Pt(i,t),i}(ah),lh=function(t){function i(i){var n;return(n=t.call(this,ch.LICENSE_REQUEST_GENERATED)||this).Ey=void 0,n.Ey=i,n}return Pt(i,t),i}(ah),gh=function(t){function i(i,n,r,e){var s;return(s=t.call(this,"Py")||this).xy=void 0,s.Iy=void 0,s.Py=void 0,s.Ry=void 0,s.xy=i,s.Iy=n,s.Py=r,s.Ry=e,s}return Pt(i,t),i}(ah),wh=function(t){function i(){return t.call(this,"lt")||this}return Pt(i,t),i}(ah),mh=function(t){return t.Dw="Cy",t.Dy="By",t}({}),yh=function(t){function i(i,n){var r;return(r=t.call(this,"Cy")||this).Jm=void 0,r.Ey=void 0,r.Jm=i,r.Ey=n,r}return Pt(i,t),i}(ah),ph=function(t){function i(){return t.call(this,"By")||this}return Pt(i,t),i}(ah);V(),It(),Bt(),Ut(),V(),It(),Ut(),V(),It();var _h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),kh=/[\t\n\f\r ]/g;function bh(t){return 43===t?62:47===t?63:t>=48&&t<=57?t-48+52:t>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:Ah()}function Ah(){throw new p("Invalid base64 input")}function Th(t){var i=t;kh.test(i)&&(i=i.replace(kh,""));var n=i.length;n%4==0&&n>=1&&"="===i[n-1]&&(n>=2&&"="===i[n-2]?n-=2:n-=1,i=i.substr(0,n));var r=n%4;if(1===r)return Ah();for(var e,s=0===r?0:4-r,u=new I(function(t,i){return 3*(t+i)/4-i}(n,s)),o=s>0?n-4:n,h=0,a=0;h>16&255,u[a++]=e>>8&255,u[a++]=255&e;return 2===s?(e=bh(i.charCodeAt(h))<<2|bh(i.charCodeAt(h+1))>>4,u[a++]=255&e):1===s&&(e=bh(i.charCodeAt(h))<<10|bh(i.charCodeAt(h+1))<<4|bh(i.charCodeAt(h+2))>>2,u[a++]=e>>8&255,u[a++]=255&e),u}function Sh(t,i,n){return _h[t>>2]+_h[(3&t)<<4|i>>4]+_h[(15&i)<<2|n>>6]+_h[63&n]}function Eh(t,i,n){for(var r=[],e=i;e>2]+_h[(3&u)<<4]+"==")}else if(2===n){var o=t[i-2],h=t[i-1];r.push(_h[o>>2]+_h[(3&o)<<4|h>>4]+_h[(15&h)<<2]+"=")}return r.join("")}function Rh(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/[=]/g,"")}function Ch(t,i){var n=i.ac,r=t.getUint8(n>>3),e=1<<7-(7&n);return i.Ny(1),(r&e)===e?1:0}function Ph(t,i,n){for(var r=0,e=0;e>16;return n&&(i-=16,t=n),(n=t>>8)&&(i-=8,t=n),(n=t>>4)&&(i-=4,t=n),(n=t>>2)&&(i-=2,t=n),(n=t>>1)?i-2:i-t};function xh(t){if(t>=55296&&t<=57343)throw new p("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Bh(t,i){return t>>i&63|128}function Oh(t,i){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(i.push(t>>18&7|240),i.push(Bh(t,12)),i.push(Bh(t,6))):(xh(t),i.push(t>>12&15|224),i.push(Bh(t,6))):i.push(t>>6&31|192),i.push(63&t|128)):i.push(t)}function Mh(t,i){if(i.ac>=t.length)throw new p("Invalid byte index");var n=255&t[i.ac];if(i.Ny(1),128==(192&n))return 63&n;throw new p("Invalid continuation byte")}function Lh(t,i){var n=i.ac;if(n>t.length)throw new p("Invalid byte index");if(n===t.length)return!1;var r=255&t[n];if(i.Ny(1),!(128&r))return r;if(192==(224&r)){var e=(31&r)<<6|Mh(t,i);if(e>=128)return e;throw new p("Invalid continuation byte")}if(224==(240&r)){var s=(15&r)<<12|Mh(t,i)<<6|Mh(t,i);if(s>=2048)return xh(s),s;throw new p("Invalid continuation byte")}if(240==(248&r)){var u=(7&r)<<18|Mh(t,i)<<12|Mh(t,i)<<6|Mh(t,i);if(u>=65536&&u<=1114111)return u}throw new p("Invalid UTF-8 detected")}V(),It(),V(),It(),Ut();var Fh=[128,64,32,16,8,4,2,1],Uh=function(){function t(t){this.Fy=void 0,this.Fy=t}return t.prototype.Oy=function(t){return Vh(this.Fy,t)},t}();function Vh(t,i){return(t&i)===i}function jh(t,i){return Vh(t,Fh[i])}function Hh(t,i){var n=t.getUint8(i.ac);return i.Ny(1),n}function Wh(t,i,n){t.setUint8(i.ac,n),i.Ny(1)}function zh(t,i,n){var r=ka(Ta(t),i.ac,i.ac+n);return i.Ny(r.byteLength),r}function qh(t,i,n){Ta(t).set(Ta(n),i.ac),i.Ny(n.byteLength)}function Xh(t,i,n){return i.ac+n<=t.byteLength}function Gh(t,i,n,r){return void 0===r&&(r=!1),r?function(t,i,n){for(var r=0,e=1,s=0;s=55296&&e<=56319&&n>8-this.Zy;return(r<0?1:0}},b.defineProperty(t.prototype,"bitLength",{get:function(){return this.Jy.bitLength-this.Zy},enumerable:!1,configurable:!0}),b.defineProperty(t.prototype,"length",{get:function(){return this.Jy.length},enumerable:!1,configurable:!0})}();V(),It(),V(),It();A.pow(2,-52);function tc(t,i,n){return A.min(A.max(t,i),n)}function ic(t,i){return t>>8-i}function nc(t,i){return t&(1<7&&(this.tA++,this.iA=0)},t.prototype.seek=function(t,i){this.tA=t,this.iA=i},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new p("Cannot read past end of buffer.");return this.$y.get(this.tA)>>7-this.iA&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new p("Cannot read past end of buffer.");if(0===this.iA)return this.$y.get(this.tA++);var t=nc(this.$y.get(this.tA),8-this.iA),i=ic(this.$y.get(this.tA+1),this.iA);return this.tA++,t<32)throw new p("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new p("Cannot read past end of buffer.");var i=0;if(0===this.iA&&t%8==0)for(var n=t-8;n>=0;n-=8)i|=this.readByte()<=0;n--)i|=this.readBit()<32)throw new p("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new p("Cannot read past end of buffer.");var i=this.readUInt(t);return 0===(i&1<>3,this.iA=7&i},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new p("Cannot read past end of buffer.");for(var i=[],n=0;ni?1:E(t)?E(i)?0:1:-1},sc=function(){function t(){this.eA=[],this.sA=[],this.nA=0}return t.from=function(){for(var i=[],n=0;n=this.length)){var i=this.findContainingBufferIndex(t),n=t-this.sA[i];return this.eA[i][n]}},b.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.eA.length<1)return-1;if(this.eA.length>1){var i=this.join();this.clear(),this.pushRange(i)}var n=this.eA[0];return"number"==typeof t?Za(n,t):"undefined"!=typeof Buffer?Buffer.from(n.buffer,n.byteOffset,n.byteLength).indexOf(t):function(t,i){if(0===i.length)return 0;for(var n=i[0],r=i.length,e=t.length-r,s=0;s<=e&&!((s=Za(t,n,s))<0||s>e);s++){for(var u=s+1,o=s+r,h=1;u4)throw new p("Expected byteLength to be between 0 and 4 but was "+i);if(t<0||t>this.length-i)throw new p("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-i)+")");if(1===i)return this.get(t);for(var n=0,r=0;re)return new t;if(r===e)return new t;for(var s=new t,u=this.findContainingBufferIndex(r),o=this.eA[u],h=r,a=h-this.sA[u];h+o.length-a=0&&n>=0;){if(0!==r[e])break;if(0===e){if(0===n)return new t;n-=1,e=(r=this.eA[n]).length-1}else e-=1;i-=1}return this.slice(0,i+1)},t}(),uc=function(){function t(i){this.rA=i||t.BUFFER_CHUNK_SIZE,this.hA=!1,this.oA=new sc,this.$y=new I(this.rA),this.aA=0,this.uA=0,this.iA=7}return t.prototype.closeByte=function(){this.$y[this.aA++]=this.uA,this.aA>=this.rA&&this.closeBuffer(),this.uA=0,this.iA=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.aA&&(this.oA.pushRange(this.$y,0,this.aA),t&&(this.$y=new I(this.rA)),this.aA=0)},b.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.iA},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.hA)throw new p("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.hA=!0,this.oA},t.prototype.writeBit=function(t){if(this.hA)throw new p("Cannot write to a closed BitWriter.");this.uA|=t<32)throw new p("The max bitlength that can be provided is 32.");if(t>=A.pow(2,i))throw new p("Uint "+t+" cannot be represented in "+i+" bit(s).");if(this.isWritingStartBit&&i%8==0)for(var n=i-8;n>=0;n-=8)this.writeByte(t>>n&255);else for(n=i-1;n>=0;n--)this.writeBool((t&1<0)},t.prototype.writeInt=function(t,i){if(i>32)throw new p("The max bitlength that can be provided is 32.");if(A.abs(t)>=A.pow(2,i-1))throw new p("Signed integer "+t+" cannot be represented in "+i+" bit(s).");t<0?this.writeUInt(t+A.pow(2,i),i):this.writeUInt(t,i)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new p("Received a negative number.");for(var i=A.floor(A.log2(t+1))+1,n=0;n=t.LARGE_SIZE/8,e=16===this.boxType.length;i.writeUInt(r?1:n,32),i.writeString(e?"uuid":this.boxType),r&&(i.writeUInt(A.floor(n/t.LARGE_SIZE),32),i.writeUInt(n%t.LARGE_SIZE,32)),e&&i.writeString(this.boxType)},t.prototype.getSize=function(){var i=8+(this.boxType.length>4?16:0),n=this.getBoxContentSize()+i;return n>=t.LARGE_SIZE/8&&(n+=8),n},t.prototype.serialize=function(){var t=new oc;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=A.pow(2,32),t}();function ac(t,i){return j(t,fe)?64===i:t65535&&(e-=65536,i.push(e>>>10&1023|55296),e=56320|1023&e),i.push(e)}return mc(i)}(r)}(t,i,!0)}function Ic(t,i,n){return void 0===i&&(i=0),void 0===n&&(n=t.byteLength),new I(t.buffer,t.byteOffset+i,n-i)}function Rc(t,i,n){return void 0===i&&(i=0),void 0===n&&(n=t.byteLength),new DataView(t.buffer,t.byteOffset+i,n-i)}function Cc(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Pc(t){return new I(t.buffer,t.byteOffset,t.byteLength)}var Nc=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new gc(this.offset<<3)},t}();V(),It();var Dc=function(){function t(t,i){this.data=t,this.cursor=i}return t.prototype.nextUint8=function(){return pc(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getUint16(i.offset,n);return i.shift(2),r}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getInt16(i.offset,n);return i.shift(2),r}(this.data,this.cursor)},t.prototype.nextUint32=function(){return bc(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getInt32(i.offset,n);return i.shift(4),r}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,i,n){void 0===n&&(n=!1);var r=bc(t,i,n),e=bc(t,i,n),s=n?e:r,u=n?r:e;return fe.fromBits(u,s,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Ac(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return _c(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,i,n){for(var r=[],e=0;et.byteLength){var o=u;return i.seek(n),{complete:!1,neededOffset:o}}var h={type:e.type,offset:n,data:new Dc(Rc(t,n,u),new Nc(e.headerSize))};return i.seek(u),{complete:!0,box:h}}function Mc(t){return{version:t>>24,flags:new yc(16777215&t)}}function Lc(t,i){var n,r,e,s;return 1===i?(n=t.nextUint64(),r=t.nextUint64(),e=t.nextUint32(),s=t.nextUint64()):(n=t.nextUint32(),r=t.nextUint32(),e=t.nextUint32(),s=t.nextUint32()),{creation:n,modification:r,scale:e,duration:s}}function Fc(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function Uc(t){var i=t.nextUint32Array(9);return{a:vc(i[0],16),b:vc(i[1],16),u:vc(i[2],30),c:vc(i[3],16),d:vc(i[4],16),v:vc(i[5],30),x:vc(i[6],16),y:vc(i[7],16),w:vc(i[8],30)}}function Vc(t){return new lc(t.type,Ic(Pc(t.data.data),t.data.cursor.offset))}var jc=function(t){function i(i,n,r,e){void 0===r&&(r=0),void 0===e&&(e=0);var s=t.call(this,"hdlr",r,e)||this;return s.name=n,s.handlerType=i,s}return Ja(i,t),b.defineProperty(i.prototype,"handlerType",{get:function(){return this.dA},set:function(t){this.dA=t},enumerable:!1,configurable:!0}),i.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},i.prototype.getBoxContentSize=function(){var i,n;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(n=null===(i=this.name)||void 0===i?void 0:i.length)&&void 0!==n?n:0)+1},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(0,32),i.writer.writeString(this.handlerType),this.serializeReserved(i),this.name&&i.writer.writeString(this.name),i.writer.writeByte(0)},i}(dc);function Hc(t){var i=t.data,n=Mc(i.nextUint32()),r=n.version,e=n.flags;i.skip(4);var s=i.nextChars(4);i.skip(12);var u=i.nextUTF8String();return new jc(s,u,r,e.raw)}!function(t){function i(){return t.call(this,"mdir")||this}Ja(i,t),i.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(jc);V(),It(),V(),It(),V(),It();var Wc=function(){function t(t,i){void 0===i&&(i=!1),this.fixed28BitMode=i,this.tag=t}return t.prototype.encodeSize=function(t){for(var i=[];t>0;)i.length>0&&(i[i.length-1]+=128),i.push(t%128),t>>=7;if(this.fixed28BitMode)for(;i.length<4;)i.push(128);return i.reverse()},b.defineProperty(t.prototype,"tag",{get:function(){return this.lA},set:function(t){if(!ac(t,8))throw new p("Provided tag does not fit in 8 bits.");this.lA=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return this.getDescriptorSize()+1+this.encodeSize(this.getDescriptorSize()).length},t.prototype.serialize=function(t){t.writer.writeByte(this.tag);for(var i=0,n=this.encodeSize(this.getDescriptorSize());i0)throw new p("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,i),void 0!==this.explicitAuxInfoType&&(i.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),i.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),i.writer.writeByte(this.defaultSampleInfoSize),i.writer.writeUInt(this.sampleInfoSizes.length,32);for(var n=0,r=this.sampleInfoSizes;n1)throw new p("Provided balance does not fit in the allowed range [-1, 1].");if(!ac(cc(t,8),16))throw new p("Provided balance does not fit in 16 bits (fixed 8.8).");this.Ob=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(cc(this.balance,8),16),i.writer.writeUInt(0,16)}}(dc);V(),It();!function(t){function i(i){var n=t.call(this,"stss",0,0)||this;return n.entries=i,n}Ja(i,t),b.defineProperty(i.prototype,"entries",{get:function(){return this.EA},set:function(t){if(!ac(t.length,32))throw new p("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!ac(t,32)}))throw new p("Not all entries can be represented in 32 bits.");this.EA=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.entries.length,32);for(var n=0,r=this.entries;n31)throw new p("The provided compressorName should at most be 31 characters long.");this.Hb=t},enumerable:!1,configurable:!0}),b.defineProperty(i.prototype,"frameCount",{get:function(){return this.Wb},set:function(t){if(!ac(t,16))throw new p("Provided frameCount does not fit in 16 bits.");this.Wb=t},enumerable:!1,configurable:!0}),b.defineProperty(i.prototype,"depth",{get:function(){return this.qb},set:function(t){if(!ac(t,16))throw new p("Provided depth does not fit in 16 bits.");this.qb=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){var i,n,r,e,s,u;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(n=null===(i=this.clap)||void 0===i?void 0:i.getSize())&&void 0!==n?n:0)+(null!==(e=null===(r=this.pasp)||void 0===r?void 0:r.getSize())&&void 0!==e?e:0)+(null!==(u=null===(s=this.extra)||void 0===s?void 0:s.length)&&void 0!==u?u:0)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(0,16),i.writer.writeUInt(0,16),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),i.writer.writeUInt(this.width,16),i.writer.writeUInt(this.height,16),i.writer.writeUInt(cc(this.horizontalResolution,16),32),i.writer.writeUInt(cc(this.verticalResolution,16),32),i.writer.writeUInt(0,32),i.writer.writeUInt(this.frameCount,16),i.writer.writeByte(this.compressorName.length),i.writer.writeString(this.compressorName);for(var n=0;n<31-this.compressorName.length;n++)i.writer.writeByte(0);i.writer.writeUInt(this.depth,16),i.writer.writeInt(-1,16),this.clap&&i.concat(this.clap.serialize()),this.pasp&&i.concat(this.pasp.serialize()),this.extra&&fc(i.writer,this.extra)},i}(Gc);V(),It(),V(),It(),H();!function(t){function i(i){var n=t.call(this,"esds",0,0)||this;return n.esDescriptor=i,n}Ja(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(j(this.esDescriptor,I)?this.esDescriptor.length:this.esDescriptor.getSize())},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),j(this.esDescriptor,I)?i.concat(sc.from(this.esDescriptor)):this.esDescriptor.serialize(i)}}(dc);V(),It();!function(t){function i(i,n,r){var e=t.call(this,"mp4a",i,r)||this;return e.esd=n,e}Ja(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.concat(this.esd.serialize())}}(Qc);V(),It();!function(t){function i(i,n,r,e){void 0===e&&(e={});var s=t.call(this,"mp4v",i,n,e)||this;return s.esDescriptor=r,s}Ja(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor.serialize(i)}}(wv);V(),It();!function(t){function i(i,n){var r=t.call(this,"mp4s",i)||this;return r.esDescriptor=n,r}Ja(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor.serialize(i)}}(Gc);V(),It(),V(),It();!function(t){function i(i){var n=t.call(this,"avcC")||this;return n.decoderConfig=i,n}Ja(i,t),i.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},i.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(hc);V(),It();!function(){function t(t,i,n,r,e,s){void 0===s&&(s=1),this.lengthSizeMinusOne=n,this.version=s,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=i,this.spsSets=r,this.ppsSets=e}b.defineProperty(t.prototype,"version",{get:function(){return this.zb},set:function(t){if(!ac(t,8))throw new p("Provided version does not fit in 8 bits.");this.zb=t},enumerable:!1,configurable:!0}),b.defineProperty(t.prototype,"profileIndication",{get:function(){return this.Gb},set:function(t){if(!ac(t,8))throw new p("Provided profileIndication does not fit in 8 bits.");this.Gb=t},enumerable:!1,configurable:!0}),b.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.Xb},set:function(t){if(!ac(t,8))throw new p("Provided profileCompatibility does not fit in 8 bits.");this.Xb=t},enumerable:!1,configurable:!0}),b.defineProperty(t.prototype,"levelIndication",{get:function(){return this.jb},set:function(t){if(!ac(t,8))throw new p("Provided levelIndication does not fit in 8 bits.");this.jb=t},enumerable:!1,configurable:!0}),b.defineProperty(t.prototype,"spsSets",{get:function(){return this.Qb},set:function(t){if(!ac(t.length,5))throw new p("Provided number of spsSets exceeds the max (32)");this.Qb=t},enumerable:!1,configurable:!0}),b.defineProperty(t.prototype,"ppsSets",{get:function(){return this.Kb},set:function(t){if(!ac(t.length,8))throw new p("Provided number of ppsSets exceeds the max (256)");this.Kb=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce(function(t,i){return t+i.length},0)+2*this.ppsSets.length+this.ppsSets.reduce(function(t,i){return t+i.length},0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var i=0,n=this.spsSets;i0&&(null!==(e=null===(r=n.constantIv)||void 0===r?void 0:r.length)&&void 0!==e?e:0)>0)throw new p("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return o.kId=n.kId,o.isProtected=null!==(s=n.isProtected)&&void 0!==s?s:1,n.perSampleIvSize>0?o.perSampleIvSize=n.perSampleIvSize:o.constantIv=null!==(u=n.constantIv)&&void 0!==u?u:new I(0),o}return Ja(i,t),b.defineProperty(i.prototype,"isProtected",{get:function(){return this.Zb},set:function(t){if(!ac(t,8))throw new p("Provided isProtected does not fit in 1 byte.");this.Zb=t},enumerable:!1,configurable:!0}),b.defineProperty(i.prototype,"perSampleIvSize",{get:function(){return this.$b},set:function(t){if(![8,16].includes(t))throw new p("Provided perSampleIvSize does not match any allowed value [8, 16].");this.$b=t,this.tS=new I(0)},enumerable:!1,configurable:!0}),b.defineProperty(i.prototype,"kId",{get:function(){return this.iS},set:function(t){if(16!==t.length)throw new p("Provided kId length is not 16.");this.iS=t},enumerable:!1,configurable:!0}),b.defineProperty(i.prototype,"constantIv",{get:function(){return this.tS},set:function(t){if(![8,16].includes(t.length))throw new p("Provided constant IV length does not match any allowed value [8, 16].");this.tS=t,this.$b=0},enumerable:!1,configurable:!0}),i.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},i.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.serializeOwnContent(i)},i.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),fc(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),fc(t.writer,this.constantIv))},i}(dc),yv=(function(t){function i(i){return t.call(this,0,i)||this}Ja(i,t)}(mv),function(t){function i(i){var n=t.call(this,1,i)||this;return n.cryptByteBlocks=i.cryptByteBlock,n.skipByteBlocks=i.skipByteBlock,n}return Ja(i,t),b.defineProperty(i.prototype,"cryptByteBlocks",{get:function(){return this.eS},set:function(t){if(!ac(t,4))throw new p("Provided cryptByteBlocks does not fit in 4 bits.");this.eS=t},enumerable:!1,configurable:!0}),b.defineProperty(i.prototype,"skipByteBlocks",{get:function(){return this.sS},set:function(t){if(!ac(t,4))throw new p("Provided skipByteBlocks does not fit in 4 bits.");this.sS=t},enumerable:!1,configurable:!0}),i.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},i}(mv));!function(t){function i(i){var n=t.call(this)||this;return n.tencBox=new yv(i),n}Ja(i,t),i.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},i.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Af);function pv(t){return void 0!==t.iv}function _v(t){return void 0!==t.subsamples}V(),It();!function(t){function i(i){var n=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return n.samples=i,n}Ja(i,t),b.defineProperty(i.prototype,"samples",{get:function(){return this.wb},set:function(t){var i;if(!ac(t.length,32))throw new p("The number of samples provided does not fit in 32 bits.");for(var n=0,r=t;n0&&(r.cS.Gy(),r.So(new dh(r.cS))),r.uS.removeEventListener("keystatuseschange",r.wS),r.uS.removeEventListener("message",r.yS)},r.uS.addEventListener("keystatuseschange",r.wS),r.uS.addEventListener("message",r.yS),r.cS=new qa;var e=[];return r.uS.closed&&e.push(ot.resolve(r.uS.closed)),r.fS=new Xa,e.push(r.fS.Qy),r.zd=ot.race(e).then(r.bS,r.bS),r.gS(),r}Pt(i,t);var n=i.prototype;return n.Xs=function(){if(this.lS)return this.zd;var t=[];return t.push(ot.resolve(this.uS.close())),t.push(Rr(1e3)),this.fS.$g(ot.race(t).catch(Cv)),this.lS=!0,this.zd},n.vS=function(t,i,n){if(Oi.e_){var r=Ev(Ea(i));if(1===r.version)i=new Sf(r.systemId,r.data).serialize().join()}return ot.resolve(this.uS.generateRequest(t,i)).catch(Cv)},n.Un=function(t){return ot.resolve(this.uS.load(t)).catch(Cv)},n._S=function(){return ot.resolve(this.uS.remove()).catch(Cv)},n.er=function(t){return ot.resolve(this.uS.update(t)).catch(Cv)},n.gS=function(){var t=this;this.cS.Gy(),this.uS.keyStatuses.forEach(function(i,n){t.pS(n,i)}),this.So(new dh(this.cS))},n.pS=function(t,i){if("string"==typeof t){var n=t;t=i,i=n}var r=Ea(t);if(this.mS===po&&16===r.byteLength&&(Oi.v_||Oi.dg)){var e=Aa(r),s=e.getUint32(0,!0),u=e.getUint16(4,!0),o=e.getUint16(6,!0);e.setUint32(0,s,!1),e.setUint16(4,u,!1),e.setUint16(6,o,!1)}this.mS===po&&"status-pending"===i&&(i="usable"),this.cS.qy(r,i)},xt(i,[{key:"oS",get:function(){return this.zd}},{key:"aS",get:function(){return this.uS.expiration}},{key:"Ty",get:function(){return this.cS}},{key:"dS",get:function(){return this.uS.sessionId}}]),i}(uh);function Cv(t){var i;if(t.message){var n=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);n&&(i=0|T(n[1],16))}throw new $a(t.message,void 0,i,t)}var Pv=function(){function t(t,i,n){this.TS=void 0,this.kS=void 0,this.Cd=void 0,this.TS=t,this.kS=i,this.Cd=n}var i=t.prototype;return i.SS=function(t){return jt(function(){return zt(this,function(i){return[2,new Rv(this.TS.createSession(t),this.kS)]})}).call(this)},i.ES=function(t){return ot.resolve(this.TS.setServerCertificate(t))},i._n=function(t){return ot.resolve(t.setMediaKeys(this.TS))},i.PS=function(t){return ot.resolve(t.setMediaKeys(null))},i.hr=function(){return ot.resolve()},t}(),Nv=function(){function t(t,i,n){this.xS=void 0,this.mS=void 0,this.RS=void 0,this.xS=t,this.mS=i,this.RS=n}var i=t.prototype;return i.IS=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return[4,this.xS.createMediaKeys()];case 1:return t=i.sent(),[2,new Pv(t,this.mS,this.RS)]}})}).call(this)},i.CS=function(){return this.RS},xt(t,[{key:"kS",get:function(){return this.xS.keySystem}}]),t}();V(),It(),Ut(),V(),It(),Ut();var Dv="video/avc",xv="video/hevc",Bv="video/mp4",Ov="video/mpeg",Mv="video/mpeg2",Lv="video/webm",Fv="video/x-unknown",Uv="audio/mp4",Vv="audio/webm",jv="image/jpeg",Hv="application/ttml+xml",Wv="application/mp4",zv="text/vtt";function qv(t){return zo(t,"audio/")}function Xv(t){return zo(t,"video/")}function Gv(t){return Wo(t,Wv)||Wo(t,Bv)||Wo(t,Uv)}function Qv(t){return Wo(t,Lv)||Wo(t,Vv)}var Yv=function(){function t(t,i){this.Km=void 0,this.NS=void 0,this.Km=t,this.NS=i}return t.prototype.DS=function(t){for(var i,n=Ft(this.NS);!(i=n()).done;){var r=i.value,e=r[0],s=r[1];if(e.toLowerCase()===t.toLowerCase())return s}},t}();function $v(t){var i=t.trim(),n=i.indexOf(";");if(n<0)return new Yv(i,[]);for(var r=i.substr(0,n).trim(),e=i.substr(n+1).trim(),s=[],u=0,o=!1,h=0;h=1?t.msSetMediaKeys(this.zS):t.addEventListener("loadedmetadata",n),ot.resolve()},i.PS=function(t){return ot.resolve()},i.hr=function(){return ot.resolve()},t}(),cd=function(){function t(t,i){this.mS=void 0,this.YS=void 0,this.mS=t,this.YS=i}var i=t.prototype;return i.CS=function(){return this.YS},i.IS=function(){var t=new f.MSMediaKeys(this.mS);return ot.resolve(new ad(t,this.mS,this.YS))},xt(t,[{key:"kS",get:function(){return this.mS}}]),t}(),fd=function(){function t(){}return t.prototype.nw=function(t,i){try{return ot.resolve(function(t,i){if(!vd())throw new _("Unsupported key system "+t);for(var n,r=Ft(i);!(n=r()).done;){var e=n.value,s=td(dd,fh,t,e);if(s)return new cd(t,s)}throw new _("Unsupported key system configuration for "+t)}(t,i))}catch(t){return ot.reject(t)}},t.LS=function(){return vd()},t}();function vd(){return void 0!==f.MSMediaKeys&&"function"==typeof f.MSMediaKeys.isTypeSupported}function dd(t,i){return f.MSMediaKeys.isTypeSupported(t,i)}V(),It(),Ut(),V(),It(),Bt(),V(),It(),Wt(),Yt(),V(),It(),Wt(),Bt(),Nt(),Yt();var ld=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).tT=void 0,e.GS=void 0,e.$S=void 0,e.US=void 0,e.eT=void 0,e.VS=void 0,e.JS=void 0,e.iT=void 0,e.Ts=void 0,e.XS=void 0,e.jS=void 0,e.tT=i,e.GS=n,e.$S=r,e.US=new Xa,e.eT=void 0,e.VS=new qa,e.JS=void 0,e.iT=new Xa,e.Ts=function(){var t=e.JS&&e.JS.error;if(t){var i=new $a("Unknown CDM error",t.code,t.systemCode);e.eT?(e.eT.jy(i),e.eT=void 0):i.Ky===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?e.QS("output-not-allowed"):e.QS("internal-error"),e.So(new wh)}},e.XS=function(t){e.So(new gh(e,"license-request",Ra(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},e.jS=function(){e.eT&&(e.eT.Xy(void 0),e.eT=void 0),e.QS("usable")},e}Pt(i,t);var n=i.prototype;return n.vS=function(t,i,n){var r=n&&n.fairplay&&n.fairplay.ZS;if(!r)throw new _("Expected FairPlay contentId to be defined but was "+r+".");var e=function(t,i,n){var r=ya(t),e=2*r.length,s=2*i.length,u=new ArrayBuffer(4+e+4+s+4+n.byteLength),o=new DataView(u),h=new Pa;return Jh(o,h,e,!0),fa(o,h,r,!0),Jh(o,h,s,!0),fa(o,h,i,!0),Jh(o,h,n.byteLength,!0),qh(o,h,n),new I(u)}(Ea(i),r,this.$S);return this.JS=this.tT.createSession(this.GS,e),this.JS.addEventListener("webkitkeymessage",this.XS,!1),this.JS.addEventListener("webkitkeyadded",this.jS,!1),this.JS.addEventListener("webkitkeyerror",this.Ts,!1),this.QS("status-pending"),this.iT.Xy(this.JS),this.iT=new Xa,ot.resolve()},n.Un=function(t){return ot.resolve(!0)},n.er=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(0===(i=Ea(t)).byteLength)throw new _("Cannot call update with an empty response.");return this.eT=new Xa,(n=this.JS)?[3,2]:[4,this.iT.Qy];case 1:n=r.sent(),r.label=2;case 2:return n.update(i),[4,this.eT.Qy];case 3:return r.sent(),[2]}})}).call(this)},n.Xs=function(){var t,i=this.JS;return i&&(i.removeEventListener("webkitkeymessage",this.XS,!1),i.removeEventListener("webkitkeyadded",this.jS,!1),i.removeEventListener("webkitkeyerror",this.Ts,!1),i.close()),this.iT.Zg(),null==(t=this.eT)||t.Zg(),this.US.Xy(void 0),this.US.Qy},n._S=function(){return ot.resolve(void 0)},n.QS=function(t){this.VS.Gy(),this.VS.qy(za,t),this.So(new dh(this.VS))},xt(i,[{key:"dS",get:function(){return this.JS?this.JS.sessionId:""}},{key:"aS",get:function(){return NaN}},{key:"oS",get:function(){return this.US.Qy}},{key:"Ty",get:function(){return this.VS}}]),i}(uh);V(),It(),Bt(),Nt(),H(),V(),It();var gd=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.PICTURE_IN_PICTURE_ERROR=11001]="PICTURE_IN_PICTURE_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),wd=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(i){var n=A.floor(i/1e3);if(n in t)return n;throw new _("Invalid error code: "+i)}}(wd||(wd={}));var md=function(t){function i(i,n,r){var e;return(e=t.call(this,n,r)||this).code=void 0,e.code=i,e}return Pt(i,t),xt(i,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return wd.fromCode(this.code)}}]),i}(gr);function yd(t,i){return j(t,md)?t:j(t,p)?new md(i,t.message,t):new md(i,String(t))}var pd=function(){function t(t,i,n){this.tT=void 0,this.kS=void 0,this.Cd=void 0,this.GS=void 0,this.$S=void 0,this.tT=t,this.kS=i,this.Cd=n,this.$S=void 0;var r=nd(n)||"video/mp4";this.GS=Jv(r)}var i=t.prototype;return i.getInternalMediaKeys=function(){return this.tT},i.SS=function(t){return jt(function(){return zt(this,function(t){if(!this.$S)throw new md(gd.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new ld(this.tT,this.GS,this.$S)]})}).call(this)},i.ES=function(t){return this.$S=Ea(t),ot.resolve(!0)},i._n=function(t){return t.webkitSetMediaKeys(this.tT),ot.resolve()},i.PS=function(t){return t.webkitSetMediaKeys(null),ot.resolve()},i.hr=function(){return ot.resolve()},t}(),_d=function(){function t(t,i){this.mS=void 0,this.YS=void 0,this.mS=t,this.YS=i}var i=t.prototype;return i.CS=function(){return this.YS},i.IS=function(){var t=new f.WebKitMediaKeys(this.mS);return ot.resolve(new pd(t,this.mS,this.YS))},xt(t,[{key:"kS",get:function(){return this.mS}}]),t}(),kd=function(){function t(){}return t.prototype.nw=function(t,i){try{return ot.resolve(function(t,i){if(t!==Po)throw new _(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!bd())throw new _("Unsupported key system "+t);for(var n,r=Ft(i);!(n=r()).done;){var e=n.value,s=td(Ad,vh,t,e);if(s)return new _d(t,s)}throw new _("Unsupported key system configuration for "+t)}(t,i))}catch(t){return ot.reject(t)}},t.LS=function(){return bd()},t}();function bd(){return void 0!==f.WebKitMediaKeys&&"function"==typeof f.WebKitMediaKeys.isTypeSupported}function Ad(t,i){return f.WebKitMediaKeys.isTypeSupported(t,i)}V(),It(),Wt(),Ut(),Yt();var Td=function(){function t(t){this.sT=void 0,this.sT=t}return t.prototype.nw=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Ft(this.sT),s.label=1;case 1:if((r=n()).done)return[3,6];e=r.value,s.label=2;case 2:return s.trys.push([2,4,,5]),[4,e.nw(t,i)];case 3:return[2,s.sent()];case 4:return s.sent(),[3,5];case 5:return[3,1];case 6:throw new _("Unsupported key system configuration for "+t)}})}).call(this)},t}();V(),It(),Ut(),V(),It(),V(),It(),Wt(),Yt(),V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It();var Sd=function(){function t(t){var i=this;this.rT=[],this.hT=void 0,this.nT=new dr,this.uT=void 0,this.oT=function(){return 0===i.rT.length?i.uT?Ed(i.uT,i.nT.Yg).then(i.cT,i.cT):i.cT():i.rT.shift()().then(i.oT)},this.cT=function(){if(0!==i.rT.length)return i.oT();i.hT=void 0},this.uT=t}var i=t.prototype;return i.Zo=function(t,i){var n=this;return new ot(function(r){var e=dr.ep([n.nT.Yg,i]),s=function(){e.zg()};n.rT.push(function(){var i=Ed(t,e.Yg);return r(i),i.then(s,s)}),n.hT||(n.hT=n.oT())})},i.Zg=function(){return this.aT(!0)},i.kn=function(){return this.uT=void 0,this.aT(!1)},i.aT=function(t){var i=this.hT;return this.nT.Zg(),t&&(this.nT=new dr),ot.resolve(i)},t}();function Ed(t,i){return new ot(function(n){return n(t(i))})}var Id=new Sd,Rd=function(t){function i(i){var n;return(n=t.call(this)||this).mS=void 0,n.WS=void 0,n.eT=void 0,n.US=void 0,n.hA=void 0,n.wT=void 0,n.mT=void 0,n.pT=void 0,n._T=void 0,n.gT=void 0,n.mS=i,n.WS=void 0,n.eT=void 0,n.hA=!1,n.wT=void 0,n._T=void 0,n.US=new Xa,n.mT="",n.gT=new Xa,n.pT=new qa,n}Pt(i,t);var n=i.prototype;return n.dT=function(){this.eT&&(this.QS("usable"),this.eT.Xy(void 0),this.eT=void 0)},n.lT=function(t){var i=new $a("Unknown CDM error",t.errorCode,t.systemCode);this.eT?(this.eT.jy(i),this.eT=void 0):this.WS?(this.WS.jy(i),this.WS=void 0):i.Ky===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.QS("output-restricted"):1===i.Yy?this.QS("expired"):this.QS("internal-error")},n.fT=function(t){0!==t.message.byteLength?(this.WS&&(this.WS.Xy(void 0),this.WS=void 0),this.So(new gh(this,"license-request",Qa(this.mS,Ra(t.message).buffer),t.defaultURL||void 0))):this.WS&&(this.WS.jy("Empty key message"),this.WS=void 0)},n.vT=function(t){this._T||(this._T=t,this.gT.Xy(t))},n.Xs=function(){return jt(function(){return zt(this,function(t){return this.throwIfClosed(),this.eT&&(this.eT.jy(void 0),this.eT=void 0),this.hA=!0,this.US.Xy(void 0),[2]})}).call(this)},n.vS=function(t,i){return jt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return this.throwIfClosed(),this.WS=new Xa,this.wT=Ea(i),(t=this._T)?[3,2]:[4,this.gT.Qy];case 1:t=n.sent(),n.label=2;case 2:return t.webkitGenerateKeyRequest(this.mS,this.wT),[4,this.WS.Qy];case 3:return n.sent(),[2]}})}).call(this)},n.Un=function(t){return jt(function(){return zt(this,function(t){return this.throwIfClosed(),[2,!1]})}).call(this)},n._S=function(){return jt(function(){return zt(this,function(t){return this.throwIfClosed(),[2]})}).call(this)},n.er=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return i=this,this.throwIfClosed(),this.eT=new Xa,Oi.S_||Oi.w_?[2,Id.Zo(function(){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.doUpdate(t)];case 1:return i.sent(),[2]}})}).call(i)})]:[4,this.doUpdate(t)];case 1:return n.sent(),[2]}})}).call(this)},n.doUpdate=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return void 0===this.eT?[2]:(i=this._T)?[3,2]:[4,this.gT.Qy];case 1:i=n.sent(),n.label=2;case 2:return i.webkitAddKey(this.mS,Ea(t),this.wT,this.dS),[4,this.eT.Qy];case 3:return n.sent(),Oi.w_?[4,Rr(500)]:[3,5];case 4:n.sent(),n.label=5;case 5:return[2]}})}).call(this)},n.throwIfClosed=function(){if(this.hA)throw new _("Already closing or closed.")},n.QS=function(t){this.pT.Gy(),this.pT.qy(za,t),this.So(new dh(this.pT))},n.yT=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return(i=this._T)?[3,2]:[4,this.gT.Qy];case 1:i=n.sent(),n.label=2;case 2:if(!(t=i).webkitCancelKeyRequest)return[3,7];n.label=3;case 3:return n.trys.push([3,4,5,7]),t.webkitCancelKeyRequest(this.mS,this.mT),[3,7];case 4:return n.sent(),[3,7];case 5:return[4,Rr(500)];case 6:return n.sent(),[7];case 7:return[2]}})}).call(this)},xt(i,[{key:"Ty",get:function(){return this.pT}},{key:"dS",get:function(){return this.mT},set:function(t){this.mT=t}},{key:"oS",get:function(){return this.US.Qy}},{key:"aS",get:function(){return NaN}}]),i}(uh),Cd=function(){function t(t,i){var n=this;this.kS=void 0,this.Cd=void 0,this._T=void 0,this.ST=void 0,this.TT=void 0,this.jS=void 0,this.AT=void 0,this.bT=void 0,this.kS=t,this.Cd=i,this._T=void 0,this.ST=ro(),this.TT=[],this.jS=function(t){var i=n.kT(t.sessionId);i&&i.dT()},this.AT=function(t){var i=n.kT(t.sessionId);i&&i.lT(t)},this.bT=function(t){var i=n.kT(t.sessionId);i&&i.fT(t)}}var i=t.prototype;return i._n=function(t){return this._T=t,this._T.addEventListener("webkitkeyadded",this.jS),this._T.addEventListener("webkitkeyerror",this.AT),this._T.addEventListener("webkitkeymessage",this.bT),this.ST.forEach(function(i,n){return i.vT(t)}),this.TT.forEach(function(i){return i.vT(t)}),ot.resolve()},i.PS=function(t){return t.removeEventListener("webkitkeyadded",this.jS),t.removeEventListener("webkitkeyerror",this.AT),t.removeEventListener("webkitkeymessage",this.bT),this._T=void 0,ot.resolve()},i.hr=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:t=this.ST.entries(),i=t.next(),n.label=1;case 1:return i.done?[3,3]:[4,i.value[1].yT()];case 2:return n.sent(),i=t.next(),[3,1];case 3:return this.ST.clear(),[2]}})}).call(this)},i.SS=function(t,i,n){return jt(function(){var t;return zt(this,function(i){return t=new Rd(this.kS),this._T&&t.vT(this._T),this.TT.push(t),[2,t]})}).call(this)},i.ES=function(t){return ot.resolve(!1)},i.kT=function(t){if(t){var i=this.ST.get(t);return i||((i=this.TT.shift())?(i.dS=t,this.ST.set(t,i),i):void 0)}},t}(),Pd=function(){function t(t,i){this.kS=void 0,this.ET=void 0,this.kS=t,this.ET=i}var i=t.prototype;return i.IS=function(){return ot.resolve(new Cd(this.kS,this.ET))},i.CS=function(){return this.ET},t}(),Nd=function(){function t(){}return t.prototype.nw=function(t,i){try{return ot.resolve(function(t,i){if(!Nd.LS())throw new _("Unsupported key system "+t);for(var n,r=Ft(i);!(n=r()).done;){var e=n.value,s=td(Dd,fh,t,e);if(s)return new Pd(t,s)}throw new _("Unsupported key system configuration for "+t)}(t,i))}catch(t){return ot.reject(t)}},t.LS=function(){return rh()},t}();function Dd(t,i){var n=xr();return Boolean(n&&n.canPlayType&&""!==n.canPlayType(i,t))}V(),It();var xd,Bd=function(){function t(){}return t.prototype.nw=function(t,i){return t===bo||t===po?ot.resolve(void 0):ot.reject(new p("DRM configuration not supported"))},t}();function Od(){return xd||(xd=function(){var t=[];kd.LS()&&t.push(new kd);od.LS()&&t.push(new od);fd.LS()&&t.push(new fd);Nd.LS()&&t.push(new Nd);Oi.k_&&t.push(new Bd);return new Td(t)}()),xd}V(),It(),Nt(),V(),It();var Md=function(){function t(){this.PT=ro()}var i=t.prototype;return i.Gy=function(t){this.PT.delete(t)},i.xT=function(){this.PT.clear()},i.Wy=function(t){return this.PT.get(t)},i.qy=function(t,i){this.PT.set(t,i)},t}(),Ld=function(){function t(){}return t.IT=function(){return t.Ng||(t.Ng=Fd.LS()?new Fd:new Md),t.Ng},t.Gy=function(i){t.IT().Gy(i)},t.xT=function(){t.IT().xT()},t.Wy=function(i){return t.IT().Wy(i)},t.qy=function(i,n){t.IT().qy(i,n)},t}();Ld.Ng=void 0;var Fd=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.Gy=function(t){self.sessionStorage.removeItem(t)},n.xT=function(){self.sessionStorage.clear()},n.Wy=function(t){var i;return null!=(i=self.sessionStorage.getItem(t))?i:void 0},n.qy=function(t,i){self.sessionStorage.setItem(t,i)},i.LS=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},i}(Ld);V(),It(),V(),It(),Ut();var Ud=function(){var t=self.Blob;if(t)try{new t;return function(t){return function(i,n){return new t(i,n)}}(t)}catch(t){}var i=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(i)return function(t){return function(i,n){var r=new t;if(i)for(var e,s=Ft(i);!(e=s()).done;){var u=e.value;r.append(u)}return r.getBlob(n&&n.type||"")}}(i)}();function Vd(t,i,n){var r=Ud([i],{type:"application/octet-stream"}),e=URL.createObjectURL(r),s=function(t,i){var n=t,r=n.indexOf("?");if(r>=0&&(n=n.substr(0,r)),n=n.substr(n.lastIndexOf("/")+1),i){var e=n.indexOf(".");e<0&&(e=n.length),n=n.substr(0,e)+i+n.substr(e)}return n}(t,n),u=v.createElement("a");u.href=e,u.download=s,v.body.appendChild(u),u.click(),v.body.removeChild(u),URL.revokeObjectURL(e)}V(),It();var jd="default";V(),It(),Bt(),V(),It(),V(),It(),Nt(),V(),It();var Hd=function(t){return t.CT="arraybuffer",t.DT="json",t.BT="stream",t.NT="text",t}({});V(),It(),H();var Wd=function(){function t(i){var n=this;this.Wm=void 0,this.Wm={},j(i,t)?i.asList().forEach(function(t){var i=t[0],r=t[1];n.append(i,r)}):Array.isArray(i)?i.forEach(function(t){var i=t[0],r=t[1];n.append(i,r)}):i&&b.getOwnPropertyNames(i).forEach(function(t){n.append(t,i[t])})}var i=t.prototype;return i.append=function(t,i){var n=t,r=i;n=zd(n),r=qd(r);var e=n.toLowerCase();if(this.Wm.hasOwnProperty(e)){var s=this.Wm[e],u=s[1];s[1]=u?u+", "+r:r}else this.Wm[e]=[n,r]},i.delete=function(t){var i=zd(t).toLowerCase();delete this.Wm[i]},i.get=function(t){var i=zd(t).toLowerCase();return this.Wm.hasOwnProperty(i)?this.Wm[i][1]:null},i.has=function(t){var i=zd(t).toLowerCase();return this.Wm.hasOwnProperty(i)},i.set=function(t,i){var n=t,r=(n=zd(n)).toLowerCase();this.Wm[r]=[n,qd(i)]},i.forEach=function(t,i){for(var n in this.Wm)this.Wm.hasOwnProperty(n)&&t.call(i,this.Wm[n][1],n,this)},i.asList=function(){var t=[];for(var i in this.Wm)if(this.Wm.hasOwnProperty(i)){var n=this.Wm[i],r=n[0],e=n[1];t.push([r,e])}return t},i.MT=function(){var t={};return this.forEach(function(i,n){t[n]=i}),t},i.LT=function(t){var i=this;t.forEach(function(t,n){i.append(n,t)})},i.OT=function(t){var i=this;t.forEach(function(t,n){i.set(n,t)})},t}();function zd(t){var i=t;if("string"!=typeof i&&(i=String(i)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(i))throw new _("Invalid character in header field name");return i}function qd(t){var i=t;return"string"!=typeof i&&(i=String(i)),i}V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt(),H(),V(),It(),Ut();var Xd=U(Kt());V(),It(),Bt(),Nt();var Gd=function(t){function i(i){var n;return(n=t.call(this,""+i.join("\n"),i[0])||this).causes=void 0,n.causes=i,n}return Pt(i,t),xt(i,[{key:"name",get:function(){return"AggregateError"}}]),i}(gr),Qd=t,Yd=Ki(Qd.ReadableStream)&&Ki(Qd.WritableStream)&&Ki(Qd.TransformStream)&&$i(Qd.ReadableStream.prototype.pipeThrough)&&!Ce.Pp,$d=Yd?Qd.ReadableStream:Xd.ReadableStream,Kd=(Yd?Qd.WritableStream:Xd.WritableStream,Yd?Qd.TransformStream:Xd.TransformStream),Jd=(Yd&&Qd.ByteLengthQueuingStrategy?Qd.ByteLengthQueuingStrategy:Xd.ByteLengthQueuingStrategy,Yd&&Qd.CountQueuingStrategy?Qd.CountQueuingStrategy:Xd.CountQueuingStrategy);function Zd(t){return function(t){return new $d({start:function(i){for(var n,r=Ft(t);!(n=r()).done;){var e=n.value;i.enqueue(e)}i.close()}})}([t])}function tl(t){return Zd(function(t){return new I(t)}(t))}function il(t,i){return function(t,i){var n=i,r=t.getReader(),e=new Xa,s=function(){u();var t=new wr;r.cancel(t).catch(yn),e.jy(t)},u=function(){n&&(n.jg(s),n=void 0)};n&&(n.Hg?s():n.Xg(s));var o=[],h=function(t){return t.done?(u(),ot.resolve(o)):(o.push(t.value),ot.resolve(r.read()).then(h))};return ot.resolve(r.read()).then(h).then(function(t){u(),e.Xy(t)},function(t){u(),e.jy(t)}),e.Qy}(t,i).then(function(t){return Fa(t).buffer})}function nl(t,i){var n=i,r=new Kd,e=r.readable,s=r.writable,u=s.getWriter(),o=function(){n&&n.Zg()};return u.closed.then(o,o),t.then(function(t){return n=void 0,u.releaseLock(),t.pipeTo(s).catch(yn)},function(t){return n=void 0,u.releaseLock(),s.abort(t).catch(yn)}),e}function rl(t){var i=new Kd,n=i.readable,r=i.writable;return t.pipeTo(r,{preventCancel:!0}).catch(function(i){var n;n=ji(i)?i[0]===i[1]||mr(i[0])&&mr(i[1])?i[0]:new Gd(i):i,t.cancel(n).catch(yn)}),n.tee()}function el(t){return ya(new I(t))}function sl(t){return pa(t).buffer}V(),It();var ul="text/plain;charset=UTF-8",ol=function(){function t(){}var i=t.prototype;return i.FT=function(t){return this.UT(t).then(JSON.parse)},i.VT=function(t,i){switch(t){case Hd.CT:return this.HT(i);case Hd.DT:return this.FT(i);case Hd.BT:return this.WT();case Hd.NT:return this.UT(i);default:throw new _}},t}();function hl(t,i,n){if(j(t,ol))return t;if(j(t,$d))return function(t,i){return new cl({Km:0,WT:t,qT:al(i)})}(t,n);var r=al(n),e=ot.resolve(t).then(function(t){return function(t,i){if(t){if("string"==typeof t)return{Km:Hd.NT,zT:t,qT:i||ul};if(j(t,ArrayBuffer)||Ba(t))return{Km:Hd.CT,zT:ml(t),qT:i};if(zi(t)||ji(t))return{Km:Hd.DT,zT:t,qT:i};throw new _("Unsupported BodyInit type")}return{Km:Hd.NT,zT:null,qT:i}}(t,r)});return new cl({Km:1,Qy:e,GT:i})}function al(t){return(t.get("content-type")||"").toLowerCase()}var cl=function(t){function i(i){var n;return(n=t.call(this)||this).jT=!1,n.KT=void 0,n.JT=new Xa,n.JT.Qy.catch(yn),n.ek(i),n}Pt(i,t);var n=i.prototype;return n.YT=function(){return this.JT.Qy},n.UT=function(t){return this.ZT(fl,t)},n.FT=function(t){return this.ZT(dl,t)},n.HT=function(t){return this.ZT(gl,t)},n.WT=function(){return this.$T(function(t){return 0===t.Km?t.WT:nl(t.Qy.then(wl).then(tl),t.GT)}(this.KT))},n.ZT=function(t,i){if(this.jT)return ot.reject(new _("Already used"));this.jT=!0;var n=t(this.KT,i);return this.JT.$g(n.then(yn)),n},n.$T=function(t){if(this.jT)throw new _("Already used");if(t.locked)throw new _("Body stream is locked");this.jT=!0;var i=new Kd,n=ot.resolve(t.pipeTo(i.writable));return this.JT.$g(n),i.readable},n.ek=function(t){this.KT=t,1===t.Km&&t.Qy.catch(yn)},n.nk=function(){if(this.jT)throw new _("Already used");var t=function(t){if(0===t.Km){var i=t.WT.tee(),n=i[0],r=i[1];return[{Km:t.Km,WT:n,qT:t.qT},{Km:t.Km,WT:r,qT:t.qT}]}var e=t.GT.tp(),s=e[0],u=e[1];return[{Km:t.Km,Qy:t.Qy,GT:s},{Km:t.Km,Qy:t.Qy,GT:u}]}(this.KT),n=t[0],r=t[1];return this.ek(n),new i(r)},xt(i,[{key:"XT",get:function(){return this.jT}},{key:"QT",get:function(){return 0===this.KT.Km}}]),i}(ol);function fl(t,i){return 0===t.Km?il(t.WT,i).then(el):(i&&t.GT.$g(i),br(t.Qy.then(vl),t.GT))}function vl(t){switch(t.Km){case Hd.NT:return ot.resolve(t.zT||"");case Hd.CT:return ot.resolve(t.zT).then(el);case Hd.DT:return ot.resolve(t.zT).then(JSON.stringify)}}function dl(t,i){return 0===t.Km?fl(t,i).then(JSON.parse):(i&&t.GT.$g(i),br(t.Qy.then(ll),t.GT))}function ll(t){return t.Km===Hd.DT?ot.resolve(t.zT):vl(t).then(JSON.parse)}function gl(t,i){return 0===t.Km?il(t.WT,i):(i&&t.GT.$g(i),br(t.Qy.then(wl),t.GT))}function wl(t){switch(t.Km){case Hd.CT:return ot.resolve(t.zT);case Hd.NT:case Hd.DT:return vl(t).then(sl)}}function ml(t){return j(t,ArrayBuffer)?t:Ra(Ta(t)).buffer}var yl=function(t){function i(i){var n;return(n=t.call(this)||this).rk=void 0,n.rk=i,n}Pt(i,t);var n=i.prototype;return n.YT=function(){return this.rk.YT()},n.UT=function(t){return this.rk.UT(t)},n.FT=function(t){return this.rk.FT(t)},n.HT=function(t){return this.rk.HT(t)},n.WT=function(t){return this.rk.WT(t)},n.nk=function(){return this.rk.nk()},xt(i,[{key:"XT",get:function(){return this.rk.XT}},{key:"QT",get:function(){return this.rk.QT}}]),i}(ol);function pl(t){return t.hk>=200&&t.hk<=299||304===t.hk}var _l=function(t){function i(i,n){var r,e,s,u,o,h;n?(e=n.fk,s=n.dk,u=n.hk,o=n.vk,h=n._k):(e=[],s=Hd.NT,u=200,o="OK",h=!1);var a=i.lk,c=new Wd(i.fk||e),f=i.dk||s,v=i.gk||(n&&n.lk===a?n.gk:a.Yu),d=n?n.rk:null,l=hl(void 0!==i.ck?i.ck:d,i.GT||new dr,c);return(r=t.call(this,l)||this).fk=void 0,r.lk=void 0,r.gk=void 0,r.dk=void 0,r.hk=void 0,r.vk=void 0,r._k=void 0,r.fk=c,r.lk=a,r.gk=v,r.dk=f,r.hk=void 0!==i.hk?i.hk:u,r.vk=void 0!==i.vk?String(i.vk):o,r._k=i._k||h,r}Pt(i,t);var n=i.prototype;return n.ck=function(t){return this.VT(this.dk,t)},n.Ly=function(){return new i({ck:this.nk(),lk:this.lk},this)},i}(yl);V(),It();var kl=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),bl=function(t){return t.pk="",t.wk="manifest",t.yk="segment",t.Ak="preload-hint",t.bk="content-protection",t}({}),Al=function(t){return t.pk="",t.Sk="initialization-segment",t.Tk="fairplay-license",t.Ek="fairplay-certificate",t.Pk="widevine-license",t.xk="widevine-certificate",t.Ik="playready-license",t.Rk="clearkey-license",t.Ck="aes128-key",t}({}),Tl=function(t){return t.pk="",t.Dk="audio",t.Bk="video",t.NT="text",t.Nk="image",t}({}),Sl=function(t){return t.Mk="same-origin",t.Lk="no-cors",t.Ok="cors",t.Fk="navigate",t}({}),El=function(t,i){this.zT=void 0,this.fk=void 0,this.Uk=void 0,this.dk=void 0,this.Vk=void 0,this.Hk=void 0,this.Yg=void 0,this.Km=void 0,this.Wk=void 0,this.qk=void 0,this.Yu=void 0,this.zk=void 0,this.Gk=void 0,this.Xk=void 0,this.jk=void 0,this.Qk=void 0;var n,r,e,s,u,o,h,a,c,f,v,d,l,g,w,m,y,p,_=t.Yu;i?(n=i.zT,r=i.fk,e=i.Uk,s=i.dk,u=i.Vk,o=i.Hk,h=i.Yg,a=i.Km,c=i.Wk,f=i.qk,v=i.zk,d=i.Gk,l=i.Xk,g=i.jk,w=i.Qk):(n=null,r={},e="GET",s=Hd.NT,u=0,o=0,a="",c="",f="",v=!1,l=void 0,g=!1,w=void 0),this.Yu=_,this.zT=t.zT||n,this.fk=new Wd(t.fk||r),this.Uk=t.Uk||e,this.dk=t.dk||s,this.Vk=void 0!==t.Vk?Number(t.Vk)||0:u,this.Hk=void 0!==t.Hk?Number(t.Hk)||0:o,this.Yg=t.Yg||h||(new dr).Yg,this.Km=t.Km||a,this.Wk=t.Wk||c,this.qk=t.qk||f,this.zk=void 0!==t.zk?Boolean(t.zk):v,this.Gk=t.Gk||d,this.Xk=null!=(m=t.Xk)?m:l,this.jk=null!=(y=t.jk)?y:g,this.Qk=null!=(p=t.Qk)?p:w},Il=function(){function t(){}var i=t.prototype;return i.lk=function(t){var i=function(t){return new _l({ck:null,fk:{},lk:t,gk:t.Yu,dk:t.dk,hk:0,vk:ch.Gw})}(new El(t));return ot.resolve(i)},i.Kk=function(t){},i.kn=function(){},t}();var Rl=function(){function t(t,i){void 0===i&&(i=!0),this.$k=void 0,this.iE=void 0,this.$k=t,this.iE=i}var i=t.prototype;return i.lk=function(t){var i=this.Zk(t);return this.$k.lk(i)},i.Kk=function(t){return this.$k.Kk(this.tE(t))},i.Zk=function(i){var n=new El(i);if(!this.iE){var r=t.eE(n.Yu);n=new El({Yu:r},n)}return n},i.tE=function(i){var n=i.Yu;return this.iE||(n=t.eE(n)),{Yu:n,zT:i.zT}},i.kn=function(){this.$k.kn()},t.eE=function(t){return Vi.Nm&&zo(t,"http://")?t.replace(":","s:"):t},xt(t,null,[{key:"Yk",get:function(){return t.Jk||(t.Jk=new t(new Il)),t.Jk}}]),t}();function Cl(t,i){var n=Vi.Dh(t);return Pl(n,i),n.toString()}function Pl(t,i){for(var n,r=Ft(b.keys(i));!(n=r()).done;){var e=n.value;t.searchParams.set(e,i[e])}}function Nl(t,i){var n=Vi.xm(t);return i&&!qo(n,"/")&&(n+="/"),n}Rl.Jk=void 0,V(),It(),V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It(),Ut();var Dl=/cache:(.+)?(?=&|$)/;function xl(t){if(!zo(t,"http://webcache.googleusercontent.com/search?q=cache:"))return"";var i=Vi.Dh(t).search.match(Dl);return i&&i.length>1?i[1]:""}function Bl(t){return Vi.Dh(".",t)}V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt();var Ol=function(t){return t.sE="HttpOpenError",t.nE="HttpResponseError",t.rE="HttpTimeoutError",t}({}),Ml=function(t){function i(i,n,r){var e;return(e=t.call(this,n,r)||this).hE=void 0,e.hE=i,e}return Pt(i,t),xt(i,[{key:"lk",get:function(){return this.hE}}]),i}(gr),Ll=function(t){function i(i,n){return t.call(this,i,"Error while opening "+i.Yu+".",n)||this}return Pt(i,t),xt(i,[{key:"name",get:function(){return Ol.sE}}]),i}(Ml);V(),It(),Bt(),Nt();var Fl=function(t){function i(i,n,r){var e;return(e=t.call(this,i.lk,null!=r?r:function(t){return"Error while loading "+t.lk.Yu+", status code "+t.hk}(i),n)||this).aE=void 0,e.aE=i,e}return Pt(i,t),xt(i,[{key:"name",get:function(){return Ol.nE}},{key:"oE",get:function(){return this.aE}}]),i}(Ml);V(),It(),Bt(),Nt();var Ul=function(t){function i(i,n){return t.call(this,i,function(t){return"Request for "+t.Yu+" timed out after "+t.Vk+" seconds."}(i),n)||this}return Pt(i,t),xt(i,[{key:"name",get:function(){return Ol.rE}}]),i}(Ml);V(),It();var Vl=self.fetch,jl=self.Request,Hl=self.Response,Wl=self.Headers,zl=self.ReadableStream,ql=self.AbortSignal,Xl=self.AbortController,Gl=bn(function(){try{return $i(Vl)&&Ki(jl)&&Ki(Hl)&&Ki(Wl)&&"forEach"in Wl.prototype&&to()}catch(t){return!1}}),Ql=["http:","https:"];var Yl=bn(function(){try{return Gl()&&Ki(ql)&&Ki(Xl)&&"signal"in jl.prototype}catch(t){return!1}}),$l=bn(function(){try{return Gl()&&Ki(zl)&&"body"in Hl.prototype&&!Oi.e_}catch(t){return!1}});function Kl(t){return j(t,Ml)}function Jl(t){return j(t,Fl)}function Zl(t,i){var n,r=t.fk.has("content-length")?Number(t.fk.get("content-length")):void 0;return n=t.QT?function(t,i,n){return t.pipeThrough(new Kd(new tg(i,n)))}(t.WT(),i,r):function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return[4,ot.resolve()];case 1:return s.sent(),i(0,n),[4,t];case 2:return r=s.sent(),e=r.byteLength,i(e,null!=n?n:e),[2,r]}})})()}(t.HT(),i,r),new _l({ck:n,lk:t.lk},t)}V(),It(),H(),V(),It(),Wt(),Yt();var tg=function(){function t(t,i){this.cE=void 0,this.dE=void 0,this.uE=void 0,this.cE=t,this.dE=i,this.uE=0}var i=t.prototype;return i.transform=function(t,i){this.uE+=t.byteLength,this.cE(this.uE,this.dE),i.enqueue(t)},i.flush=function(t){var i;this.cE(this.uE,null!=(i=this.dE)?i:this.uE)},t}();var ig=function(){function t(t){this.oE=void 0,this.hE=void 0,this.nT=new dr,this.aE=void 0,this.fE=0,this.vE=!1,this.hE=t,this.nT.$g(t.Yg),this.oE=this.lE()}var i=t.prototype;return i.lE=function(){return jt(function(){var t,i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:t=this,(i=this.hE).Vk&&(this.fE=g(function(){t.vE=!0,t.nT.Zg()},i.Vk),this.nT.Yg.Qg(function(){w(t.fE)}));try{n=Vl(i.Yu,{method:i.Uk,headers:i.fk.MT(),body:i.zT,credentials:i.zk?"include":"same-origin",signal:eg(this.nT.Yg),mode:i.Xk,keepalive:i.Qk})}catch(t){throw new Ll(i,t)}c.label=1;case 1:return c.trys.push([1,3,,4]),[4,n];case 2:return r=c.sent(),[3,4];case 3:throw e=c.sent(),mr(s=this._E(e))&&this.nT.Zg(),s;case 4:if(u=r.url||i.Yu,o=0===r.status&&"file:"===function(t){return Vi.Dh(t).protocol}(u)?200:r.status,h=new ng(this,r,this.nT),!pl(a=new _l({ck:h,lk:i,dk:i.dk,fk:sg(r.headers),hk:o,vk:r.statusText,gk:u})))throw new Fl(a);return i.Gk&&(a=Zl(a,i.Gk)),[2,a]}})}).call(this)},i._E=function(t){return Kl(t)?t:mr(t)?this.vE?new Ul(this.hE):new wr(t.message,t):this.aE?new Fl(this.aE,t):new Ll(this.hE,t)},t}(),ng=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).pE=void 0,e.gE=void 0,e.nT=void 0,e.JT=new Xa,e.pE=i,e.gE=n,e.nT=r,e.JT.Qy.catch(yn),e}Pt(i,t);var n=i.prototype;return n.YT=function(){return this.JT.Qy},n.UT=function(t){return this.ZT(this.gE.text(),t)},n.HT=function(t){return this.ZT(this.gE.arrayBuffer(),t)},n.WT=function(){var t=this.gE.body;return t?this.$T(t):nl(this.HT().then(tl),this.nT)},n.nk=function(){var t=this.gE.clone(),n=this.nT.tp(),r=n[0],e=n[1];return this.nT=r,new i(this.pE,t,e)},n.ZT=function(t,i){var n=this;i&&this.nT.$g(i);var r=kr(ot.resolve(t),this.nT.Yg).catch(function(t){throw n.pE._E(t)});return r=br(r,this.nT),this.JT.$g(r.then(yn)),r},n.$T=function(t){var i=this;return new $d(new ug(t,function(t){return i.pE._E(t)},this.nT,this.JT),{highWaterMark:0})},xt(i,[{key:"XT",get:function(){return this.gE.bodyUsed}},{key:"QT",get:function(){return Fi(this.gE.body)}}]),i}(ol),rg="abort";function eg(t){if(Yl()){var i=new Xl;if(t.Hg)i.abort();else if(!t.Wg){var n=function(){r(),i.abort()},r=function(){i.signal.removeEventListener(rg,n),t.jg(n),t.Kg(r)};i.signal.addEventListener(rg,n),t.Xg(n),t.Qg(r)}return i.signal}}function sg(t){if(function(t){return Wi(t)&&"function"==typeof t.forEach}(t)){var i=new Wd;return t.forEach(function(t,n){Array.isArray(t)&&2===t.length?i.append(t[0],t[1]):i.append(n,t)}),i}return new Wd(t)}var ug=function(){function t(t,i,n,r){this.mE=void 0,this.wE=void 0,this.nT=void 0,this.JT=void 0,this.Wd=void 0,this.mE=t,this.wE=i,this.nT=n,this.JT=r}var i=t.prototype;return i.start=function(t){this.Wd=this.mE.getReader()},i.pull=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,kr(this.Wd.read(),this.nT.Yg)];case 1:return i=e.sent(),[3,3];case 2:return n=e.sent(),r=this.wE(n),this.JT.jy(r),this.nT.Zg(),this.Wd.cancel(r).catch(yn),t.error(r),[2];case 3:return i.done?(this.JT.Xy(),this.nT.Zg(),t.close()):t.enqueue(i.value),[2]}})}).call(this)},i.cancel=function(t){return this.nT.Zg(),this.JT.jy(t),this.Wd.cancel(t)},t}();V(),It(),Bt();var og=function(){function t(t){var i=this;this.AE=void 0,this.hE=void 0,this.nT=new dr,this.aE=void 0,this.yE=new Xa,this.DE=void 0,this.RE=!1,this.xE=function(){var t;i.bE(),null==(t=i.AE)||t.abort()},this.hE=t,this.nT.$g(t.Yg),this.AE=new C,this.lE()}var i=t.prototype;return i.lE=function(){var t=this,i=this.AE,n=this.hE;if(n.Yg.Hg)return this.bE();i.onreadystatechange=function(){return t.SE()},i.onprogress=function(i){return t.cE(i)},i.onload=function(){return t.TE()},i.onloadend=function(){return t.kE()},i.onerror=function(){return t.EE()},i.ontimeout=function(){return t.PE()},i.onabort=function(){return t.bE()},i.open(n.Uk,n.Yu,!0),i.withCredentials=Boolean(n.zk),"responseType"in i&&n.dk&&(n.dk===Hd.NT?i.responseType="text":i.responseType="arraybuffer"),n.fk.forEach(function(t,n){i.setRequestHeader(n,t)}),n.Vk&&(i.timeout=n.Vk),this.nT.Yg.Xg(this.xE);var r=n.zT;r?i.send(r):i.send()},i.SE=function(){var t=this.AE;void 0!==t&&t.readyState>=2&&!this.RE&&(this.RE=!0,this.CE())},i.CE=function(){var t,i,n=this.AE,r=function(t){var i=new Wd,n=t.replace(/\r?\n[\t ]+/g," ");return n.split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var e=n.join(":").trim();i.append(r,e)}}),i}(n.getAllResponseHeaders()||""),e=this.hE;this.DE=new Xa,this.aE=new _l({lk:e,dk:e.dk,ck:this.DE.Qy,hk:n.status,vk:n.statusText,fk:r,gk:null!=(i=n.responseURL)?i:r.get("X-Request-URL")}),null==(t=this.yE)||t.Xy(this.aE)},i.TE=function(){var t,i=this.AE;if(void 0!==i){var n=i.response;if(!Fi(n)){var r=this.hE.dk;n=r===Hd.NT?i.responseText:r===Hd.CT?new ArrayBuffer(0):{}}null==(t=this.DE)||t.Xy(n)}},i.kE=function(){this.kn()},i.cE=function(t){void 0!==this.AE&&(null==this.hE.Gk||this.hE.Gk.call(this.hE,t.loaded,t.lengthComputable?t.total:void 0))},i.EE=function(){var t=new p("Network request failed");this.aE?this.Ts(new Fl(this.aE,t)):this.Ts(new Ll(this.hE,t))},i.PE=function(){this.Ts(new Ul(this.hE))},i.bE=function(){this.Ts(new wr),this.kn()},i.Ts=function(t){var i,n;null==(i=null!=(n=this.DE)?n:this.yE)||i.jy(t)},i.kn=function(){this.AE=void 0,this.aE=void 0,this.yE=void 0,this.DE=void 0,this.nT.zg()},xt(t,[{key:"oE",get:function(){return this.yE.Qy}}]),t}();function hg(t,i,n){return new ot(function(r,e){if(n&&n.Hg)return e(new wr);var s=function(t){o(),r(t)},u=function(){o(),e(new wr)},o=function(){t.removeEventListener(i,s),n&&n.jg(u)};t.addEventListener(i,s),n&&n.Xg(u)})}V(),It();var ag=function(){function t(){}var i=t.prototype;return i.lk=function(t){return function(t){if(!Gl()||!function(t){try{return Ql.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Yu))return!1;if(!$l()&&t.Gk)return!1;if(!t.jk&&t.Uk!==kl.POST){if(Oi.S_&&Oi.d_<=68)return!1;if(Oi.w_)return!1}return!0}(t)?new ig(t).oE:new og(t).oE},i.Kk=function(t){var i=f.navigator;if(i&&i.sendBeacon)i.sendBeacon(t.Yu,Ud([t.zT],{type:t.qT}));else{var n=t.qT?{"Content-type":t.qT}:void 0;this.lk(new El({Uk:kl.POST,Yu:t.Yu,zT:t.zT,fk:n,Xk:Sl.Lk})).then(function(t){Er(t.HT())},yn)}},i.kn=function(){},t}();V(),It(),Bt(),Nt(),V(),It();var cg=function(t){return t[t.BE=1]="BE",t[t.NE=2]="NE",t[t.NT=3]="NT",t[t.LE=4]="LE",t[t.OE=9]="OE",t}({});function fg(t){return 1===t.FE}function vg(t){return 3===t.FE}V(),It(),Nt();var dg=function(t){function i(i){return t.call(this,"Invalid XML",i)||this}return Pt(i,t),i}(gr),lg=function(){function t(){}return t.prototype.UE=function(t){var i,n=new DOMParser;try{i=n.parseFromString(t,"text/xml")}catch(t){throw new dg(t)}if(!i||i.getElementsByTagName("parsererror").length>0)throw new dg;return new kg(i)},t}(),gg=function(){function t(t){this.HE=void 0,this.HE=t}var i=t.prototype;return i.GE=function(t){return this.HE.isEqualNode(t.HE)},i.XE=function(i){return new t(this.HE.cloneNode(i))},xt(t,[{key:"FE",get:function(){return cg.NE}},{key:"VE",get:function(){var t;return null!=(t=this.HE.localName)?t:Tg(this.HE.nodeName)}},{key:"l",get:function(){return this.HE.nodeName}},{key:"WE",get:function(){var t;return null!=(t=this.HE.namespaceURI)?t:void 0}},{key:"qE",get:function(){var t;return null!=(t=this.HE.prefix)?t:void 0}},{key:"zE",get:function(){return this.HE.nodeValue}}]),t}(),wg=function(){function t(t){this.KE=void 0,this.QE=void 0,this.KE=t}var i=t.prototype;return i.YE=function(t){return this.jE.filter(function(i){return bg(i)&&i.JE===t})},i.ZE=function(t,i){return this.jE.filter(function(n){return bg(n)&&n.VE===i&&n.WE===t})},i.tP=function(t){this.KE.appendChild(t.$E),this.QE&&this.QE.push(t)},i.GE=function(t){return this.KE.isEqualNode(t.$E)},xt(t,[{key:"jE",get:function(){return void 0===this.QE&&(this.QE=function(t){for(var i=[],n=0;n=0;i-=1)this.it(t[i])},n.kn=function(){this.hr(),this.Vo()},xt(i,[{key:"II",get:function(){return this.RI}},{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}},{key:"V",get:function(){return this.RI.length}}]),i}(uh);V(),It(),Ut(),V(),It(),H(),V(),It(),Ut();var Fg=b.freeze||pn;function Ug(t,i,n){b.defineProperty(t,i,{writable:!1,enumerable:!0,value:n})}function Vg(t){return Fg(t)}function jg(t,i){for(var n,r=Ft(b.getOwnPropertyNames(i));!(n=r()).done;){var e=n.value;b.defineProperty(t,e,b.getOwnPropertyDescriptor(i,e))}return t}function Hg(t){if(zi(t)){var i={};for(var n in t)Mi.call(t,n)&&(i[n]=Hg(t[n]));return i}if(ji(t)){for(var r=new Array(t.length),e=0;e0?t.YI=n:t.YI=void 0},get targetQuality(){if(t.YI)return 1===t.YI.length?t.YI[0].Ca:t.YI.map(function(t){return t.Ca})},addEventListener:function(t,n){var r=tw(t,Jg);i.wn(r,n)},removeEventListener:function(t,n){var r=tw(t,Jg);i.mn(r,n)}};return i=new oh(r),t.wn(n,function(t){return i.So(t.Ca)}),b.defineProperty(r,"constructor",{value:sw}),r}function ow(){}function hw(t){var i=nw(t);return b.defineProperty(i,"constructor",{value:ow}),i}var aw=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.tt=function(i){return t.prototype.tt.call(this,i)},n.xa=function(){return hw(this)},i}(Lg);V(),It(),V(),It();var cw=function(t){return t.Dk="audio",t.Bk="video",t.NT="text",t.Nk="image",t.pk="unknown",t}({});function fw(t){return"audio"===t||"video"===t}V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt();var vw=function(t){function i(i,n,r,e,s,u,o,h){var a;return(a=t.call(this,i,n,r)||this).url=void 0,a.status=void 0,a.statusText=void 0,a.response=void 0,a.systemCode=void 0,a.url=e,a.status=s,a.statusText=u,a.response=o,a.systemCode=h,a}return Pt(i,t),xt(i,[{key:"name",get:function(){return"ContentProtectionError"}}]),i}(md);var dw=function(t){return t[t.ABORTED=1]="ABORTED",t[t.NETWORK=2]="NETWORK",t[t.DECODE=3]="DECODE",t[t.SRC_NOT_SUPPORTED=4]="SRC_NOT_SUPPORTED",t[t.ENCRYPTED=5]="ENCRYPTED",t[t.LICENSE_INVALID=6]="LICENSE_INVALID",t[t.ADVERTISEMENT_ERROR=7]="ADVERTISEMENT_ERROR",t}({}),lw=function(t){function i(i,n,r,e){var s;return(s=t.call(this,n)||this).code=void 0,s.message=void 0,s.cause=void 0,s.systemCode=void 0,s.code=i,s.message=null!=n?n:"Unknown error",s.cause=r,s.systemCode=e,p.captureStackTrace&&p.captureStackTrace(s,s.constructor),s}return Pt(i,t),xt(i,[{key:"name",get:function(){return"MediaError"}}]),i}(lr);function gw(t){Ug(t,"MEDIA_ERR_ABORTED",1),Ug(t,"MEDIA_ERR_NETWORK",2),Ug(t,"MEDIA_ERR_DECODE",3),Ug(t,"MEDIA_ERR_SRC_NOT_SUPPORTED",4),Ug(t,"MEDIA_ERR_ENCRYPTED",5)}function ww(t){var i,n;return function(t){return t.category===wd.CONTENT_PROTECTION}(t)?new lw(5,t.message,null==(i=t.cause)?void 0:i.message,t.systemCode):new lw(mw(t.code),t.message,null==(n=t.cause)?void 0:n.message)}function mw(t){if(t===gd.MEDIA_ABORTED)return 1;if(t===gd.MANIFEST_LOAD_ERROR||t===gd.MEDIA_LOAD_ERROR||t===gd.SUBTITLE_LOAD_ERROR)return 2;if(t===gd.MEDIA_DECODE_ERROR)return 3;if(t===gd.MEDIA_NOT_SUPPORTED)return 4;var i=wd.fromCode(t);return i===wd.NETWORK?2:i===wd.SOURCE?4:i===wd.LICENSE?6:i===wd.CONTENT_PROTECTION?5:i===wd.AD?7:3}function yw(t){return new md(pw(t.code),t.message,t)}function pw(t){switch(t){case 1:return gd.MEDIA_ABORTED;case 2:return gd.NETWORK_ERROR;case 3:return gd.MEDIA_DECODE_ERROR;case 4:return gd.SOURCE_NOT_SUPPORTED;case 5:return gd.CONTENT_PROTECTION_ERROR;case 6:return gd.LICENSE_ERROR;case 7:return gd.AD_ERROR}}gw(lw),gw(lw.prototype),V(),It(),Bt(),Nt(),V(),It(),Nt();var _w=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i}(hh);V(),It(),Bt(),V(),It();var kw=function(){function t(){this.dO=[],this.hu=void 0}var i=t.prototype;return i.lO=function(t){this.dO.push(t),this.hu&&this.hu.push(t.Ca)},i._S=function(t){Yn(this.dO,t),this.hu&&Yn(this.hu,t.Ca)},i.CI=function(t){return this.dO[t]},i.fO=function(t){return ji(t)?function(t,i){for(var n,r=Ft(i);!(n=r()).done;)if(!Jn(t,n.value))return!1;return!0}(this.dO,t):Jn(this.dO,t)},i.hr=function(){tr(this.dO),this.hu&&tr(this.hu)},xt(t,[{key:"II",get:function(){return this.dO}},{key:"V",get:function(){return this.dO.length}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i=t.II.map(function(t){return t.Ca});return i.item=function(i){var n=0|i,r=t.CI(n);return r&&r.Ca||void 0},i}(this)),this.hu}}]),t}();V(),It(),Nt();var bw=function(t){function i(i){var n;return(n=t.call(this,Mg.pa)||this).Ht=void 0,n.Ht=i,n}return Pt(i,t),i.prototype.xa=function(){return new Aw(this.Ht.Ca)},i}(Cg),Aw=function(t){function i(i){var n;return(n=t.call(this,"change")||this).track=void 0,n.track=i,n}return Pt(i,t),i}(Pg);V(),It(),Nt();var Tw=function(t){function i(i){var n;return(n=t.call(this,Mg.SI)||this).Ht=void 0,n.Ht=i,n}return Pt(i,t),i.prototype.xa=function(){return new Sw(this.Ht.Ca)},i}(Cg),Sw=function(t){function i(i){var n;return(n=t.call(this,"update")||this).track=void 0,n.track=i,n}return Pt(i,t),i}(Pg);V(),It();var Ew=0;function Iw(){return Ew++}var Rw=0;var Cw=0;function Pw(){return Cw++}var Nw=0;function Dw(){return Nw++}var xw=0;var Bw=function(t){function i(i){var n;return(n=t.call(this)||this).Km=cw.Dk,n._O=void 0,n.hS=void 0,n.pO=void 0,n.gO=void 0,n.We=!1,n.dO=void 0,n.hu=void 0,n._O=i,n.gO=Iw(),n.hS=""+xw++,n.pO=i.label,n.dO=new kw,n.yO(),n}Pt(i,t);var n=i.prototype;return n.wO=function(t){this.Rt=t},n.yO=function(){this.Rt=this.vO},xt(i,[{key:"XI",get:function(){}},{key:"Rt",get:function(){return this.We},set:function(t){this.We!==t&&(this.We=t,this.vO=t,this.So(new bw(this)))}},{key:"vO",get:function(){return this._O.enabled},set:function(t){this._O.enabled=t}},{key:"Ca",get:function(){return this.hu||(this.hu=uw(this)),this.hu}},{key:"o",get:function(){return this.hS}},{key:"jI",get:function(){return this.gO}},{key:"Lt",get:function(){return this._O.kind}},{key:"Th",get:function(){return this.pO},set:function(t){t!==this.pO&&(this.pO=t,this.So(new Tw(this)))}},{key:"bs",get:function(){return this._O.language}},{key:"Xk",get:function(){return this.Rt?"enabled":"disabled"}},{key:"mO",get:function(){return this._O}},{key:"KI",get:function(){return this.dO}},{key:"YI",get:function(){},set:function(t){}}]),i}(uh);V(),It(),Bt(),Nt();var Ow=0;var Mw=function(t){function i(i){var n;return(n=t.call(this)||this).Km=cw.Bk,n._O=void 0,n.hS=void 0,n.gO=void 0,n.We=!1,n.dO=void 0,n.pO=void 0,n.hu=void 0,n._O=i,n.gO=Iw(),n.hS=""+Ow++,n.dO=new kw,n.pO=i.label,n.yO(),n}Pt(i,t);var n=i.prototype;return n.yO=function(){this.Rt=this.vO},n.wO=function(t){this.Rt=t},xt(i,[{key:"XI",get:function(){}},{key:"Rt",get:function(){return this.We},set:function(t){this.We!==t&&(this.We=t,this.vO=t,this.So(new bw(this)))}},{key:"vO",get:function(){return Boolean(this._O.selected)},set:function(t){this._O.selected=t}},{key:"Ca",get:function(){return this.hu||(this.hu=uw(this)),this.hu}},{key:"o",get:function(){return this.hS}},{key:"jI",get:function(){return this.gO}},{key:"Lt",get:function(){return"main"}},{key:"Th",get:function(){return this.pO},set:function(t){t!==this.pO&&(this.pO=t,this.So(new Tw(this)))}},{key:"bs",get:function(){return this._O.language}},{key:"Xk",get:function(){return this.Rt?"enabled":"disabled"}},{key:"mO",get:function(){return this._O}},{key:"KI",get:function(){return this.dO}},{key:"YI",get:function(){},set:function(t){}}]),i}(uh);V(),It(),Nt();var Lw=function(t){function i(i){var n;return(n=t.call(this,ch.yw)||this).KP=void 0,n.KP=i,n}return Pt(i,t),i}(ah);V(),It(),Wt(),Nt(),Ut(),Yt(),V(),It();var Fw=function(t){return t[t.NONE=0]="NONE",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED",t[t.ERROR=3]="ERROR",t}({});V(),It();var Uw=function(t){return t.DEFAULT="",t.SRT="srt",t.TTML="ttml",t.WEBVTT="webvtt",t.EMSG="emsg",t.EVENT_STREAM="eventstream",t.ID3="id3",t.CEA608="cea608",t.DATE_RANGE="daterange",t.MILLICAST="millicast",t}({});function Vw(t){switch(t){case"":case"srt":case"ttml":case"webvtt":case"emsg":case"eventstream":case"id3":case"cea608":case"daterange":case"millicast":return!0;default:return!1}}V(),It(),Ut(),V(),It();var jw=function(t){return t.AO="cue",t.bO="region",t.SO="stylesheet",t}({});V(),It(),Bt(),Nt(),V(),It();var Hw={"line-left":"start",center:"middle","line-right":"end"},Ww={start:"line-left",middle:"center",end:"line-right"};function zw(t,i){if("auto"===t)switch(i){case"start":case"left":return"line-left";case"end":case"right":return"line-right";default:return"center"}return t}function qw(t,i){if("auto"===t)switch(i){case"left":return 0;case"right":return 100;default:return 50}return function(t,i){var n="number"==typeof t?t:S(t);return E(n)?i:n}(t,50)}V(),It(),V(),It(),V(),It(),Nt();var Xw=function(t){return t.zL="yo",t.GL="jo",t.SI="er",t}({}),Gw=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).TO=void 0,r.TO=n,r}return Pt(i,t),i}(Cg),Qw=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).cue=void 0,r.cue=n,r}return Pt(i,t),i}(Pg);function Yw(t){var i,n=[Xw.zL,Xw.GL,Xw.SI],r={get kO(){return t},get track(){return t.Ht.Ca},get id(){return t.o},get uid(){return t.jI},get startTime(){return t.EO},set startTime(i){t.EO=i},get endTime(){return t.PO},set endTime(i){t.PO=i},get content(){return t.U},addEventListener:function(t,n){var r=tw(t,Jg);i.wn(r,n)},removeEventListener:function(t,n){var r=tw(t,Jg);i.mn(r,n)}};return i=new oh(r),t.wn(n,function(t){return i.So(t.Ca)}),r}function $w(){}function Kw(t){return jg(Yw(t),{get align(){return t.xO},get line(){return t.IO},get lineAlign(){return t.RO},get position(){return t.mo},get positionAlign(){return t.CO},get region(){return t.DO?t.DO.Ca:null},get size(){return t.Vy},get snapToLines(){return t.BO},get text(){return t.U},get vertical(){return t.Pt}})}V(),It(),Bt(),Nt(),V(),It(),Nt();var Jw=function(t){function i(i){return t.call(this,Xw.SI,i)||this}return Pt(i,t),i.prototype.xa=function(){return new Zw(this.TO.Ca)},i}(Gw),Zw=function(t){function i(i){return t.call(this,"update",i)||this}return Pt(i,t),i}(Qw);V(),It(),Nt();var tm=function(t){function i(i){var n;return(n=t.call(this,Mg.cI)||this).TO=void 0,n.TO=i,n}return Pt(i,t),i.prototype.xa=function(){return new im(this.TO.Ca)},i}(Cg),im=function(t){function i(i){var n;return(n=t.call(this,"updatecue")||this).cue=void 0,n.cue=i,n}return Pt(i,t),i}(Pg),nm=.02;function rm(t,i){return Pn(t.MO,i.MO,nm)&&Pn(t.LO,i.LO,nm)&&t.o===i.o}var em=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).gO=void 0,u.hS=void 0,u.MO=void 0,u.LO=void 0,u.OO=void 0,u.VO=void 0,u.hu=void 0,u.FO=void 0,u.ho=!1,u.HO=void 0,u.qO=void 0,u.jO=-1,u.gO=Dw(),u.OO=i,u.VO=n,u.MO=i,u.LO=n,u.HO=r,u.qO=Boolean(e),u.hS=null!=s?s:"",u}Pt(i,t);var n=i.prototype;return n.xa=function(){return Yw(this)},n.zO=function(t){return this===t||qg(this,t)&&rm(this,t)&&this.GO(t)},n.GO=function(t){return Wg(this.U,t.U)},n.XO=function(t,i){this.OO=t,this.VO=i,this.MO=t,this.LO=i},n.kn=function(){this.Vo()},xt(i,[{key:"EO",get:function(){return this.OO},set:function(t){var i,n;this.OO!==t&&(this.OO=t,null==(i=this.FO)||i.UO(this),this.So(new Jw(this)),null==(n=this.FO)||n.So(new tm(this)))}},{key:"PO",get:function(){return this.VO},set:function(t){var i,n;this.VO!==t&&(this.VO=t,null==(i=this.FO)||i.UO(this),this.So(new Jw(this)),null==(n=this.FO)||n.So(new tm(this)))}},{key:"o",get:function(){return this.hS}},{key:"jI",get:function(){return this.gO}},{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}},{key:"ro",get:function(){return this.ho},set:function(t){this.ho=t}},{key:"Ht",get:function(){return this.FO},set:function(t){this.FO=t}},{key:"U",get:function(){return this.HO},set:function(t){var i;this.HO!==t&&(this.HO=t,this.So(new Jw(this)),null==(i=this.FO)||i.So(new tm(this)))}},{key:"WO",get:function(){return this.qO},set:function(t){this.qO=t}}]),i}(uh);function sm(t,i){return t.U===i.U&&t.IO===i.IO&&t.RO===i.RO&&t.mo===i.mo&&t.CO===i.CO&&t.DO===i.DO&&t.BO===i.BO&&t.Vy===i.Vy&&t.xO===i.xO&&t.Pt===i.Pt}var um=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this,i,n,r,e,s)||this).IO="auto",u.RO="start",u.mo="auto",u.CO="auto",u.DO=void 0,u.BO=!0,u.Vy=100,u.xO="center",u.Pt="",u}return Pt(i,t),i.prototype.GO=function(t){return sm(this,t)},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=Kw(this)),this.hu}},{key:"Km",get:function(){return jw.AO}}]),i}(em);function om(t){var i=t.IO,n=Yi(i);return n&&!t.BO&&(i<0||i>100)?100:n?Number(i):t.BO?-1:100}function hm(t){return qw(t.mo,t.xO)}function am(t){return zw(t.CO,t.xO)}function cm(t){var i,n=am(t),r=hm(t);switch(n){case"line-left":i=100-r;break;case"line-right":i=r;break;case"center":i=r<=50?2*r:2*(100-r)}return A.min(t.Vy,i)}function fm(t){return{get id(){return t.o},get lines(){return t.QO},get regionAnchorX(){return t.KO},get regionAnchorY(){return t.YO},get scrollValue(){return t.JO},get viewportAnchorX(){return t.ZO},get viewportAnchorY(){return t.$O},get width(){return t.Ti}}}V(),It(),Bt(),V(),It();var vm=function(){function t(t,i,n,r,e,s,u,o){this.o=void 0,this.Ti=void 0,this.QO=void 0,this.KO=void 0,this.YO=void 0,this.ZO=void 0,this.$O=void 0,this.JO=void 0,this.hu=void 0,this.o=t,this.Ti=i,this.QO=n,this.KO=r,this.YO=e,this.ZO=s,this.$O=u,this.JO=o}return xt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=fm(this)),this.hu}},{key:"Km",get:function(){return jw.bO}}]),t}();V(),It(),V(),It();var dm=1e6,lm=function(){function t(){}var i=t.prototype;return i.tF=function(t){return this.iF()*t},i.eF=function(t){return this.sF(t)>0},i.nF=function(t){return this.sF(t)>=0},i.rF=function(t,i){return this.oF(t).hF(i)},i.zO=function(t){return 0===this.sF(t)},i.aF=function(t){return this.sF(t)<0},i.hF=function(t){return this.sF(t)<=0},i.uF=function(){return this.cF()?this.dF():this},i.lF=function(t){return this.lO(t.dF())},i.oF=function(t){return this.lF(t).uF()},t}();function gm(t,i){return t.fF()?i.fF()?Ln.rh:Ln.Fg:i.fF()?Ln.Ug:t.vF()?i.vF()&&t.cF()===i.cF()?Ln.rh:t.cF()?Ln.Ug:Ln.Fg:i.cF()?Ln.Fg:Ln.Ug}V(),It(),Nt(),V(),It();var wm=4294967296,mm=wm*wm,ym=mm*mm,pm=ym/2,_m=function(){function t(t,i){this.EF=void 0,this.TF=void 0,this.EF=t,this.TF=i}var i=t.prototype;return i.SF=function(){return this.TF.unsigned},i.kF=function(){return this.EF.isZero()&&this.TF.isZero()},i.cF=function(){return this.TF.isNegative()},i.PF=function(){return this.SF()?t._F(this.EF,this.TF,!1):this},i.xF=function(){return this.SF()?this:t._F(this.EF,this.TF,!0)},i.IF=function(){return this.EF},i.iF=function(){return this.cF()?-this.dF().iF():this.TF.toNumber()*mm+this.EF.toUnsigned().toNumber()},i.RF=function(){return this.EF.toInt()},i.zO=function(t){return(this.SF()===t.SF()||this.TF.getHighBits()>>>31!=1||t.TF.getHighBits()>>>31!=1)&&(this.TF.toUnsigned().eq(t.TF.toUnsigned())&&this.EF.toUnsigned().eq(t.EF.toUnsigned()))},i.sF=function(t){if(this.zO(t))return Ln.rh;var i=this.cF(),n=t.cF();if(i&&!n)return Ln.Ug;if(!i&&n)return Ln.Fg;if(!this.SF())return this.lF(t).cF()?Ln.Ug:Ln.Fg;var r=this.xF(),e=t.xF(),s=e.TF.comp(r.TF);return s>0||0===s&&e.EF.gt(r.EF)?Ln.Ug:Ln.Fg},i.aF=function(t){return this.sF(t)<0},i.hF=function(t){return this.sF(t)<=0},i.CF=function(t){return this.sF(t)>0},i.DF=function(t){return this.sF(t)>=0},i.BF=function(){return new t(this.EF.not(),this.TF.not())},i.NF=function(i){return new t(this.EF.and(i.EF),this.TF.and(i.TF))},i.MF=function(i){return new t(this.EF.or(i.EF),this.TF.or(i.TF))},i.LF=function(i){var n=127&i;return 0===n?this:n<64?t._F(this.EF.shl(n),this.TF.shl(n).or(this.EF.shru(64-n)),this.SF()):t._F(fe.ZERO,this.EF.shl(n-64),this.SF())},i.OF=function(i){var n=127&i;return 0===n?this:n<64?t._F(this.EF.shru(n).or(this.TF.shl(64-n)),this.TF.shr(n),this.SF()):t._F(this.TF.shr(n-64),this.TF.isNegative()?fe.NEG_ONE:fe.ZERO,this.SF())},i.FF=function(i){var n=127&i;return 0===n?this:n<64?t._F(this.EF.shru(n).or(this.TF.shl(64-n)),this.TF.shru(n),this.SF()):64===n?t._F(this.TF,fe.ZERO,this.SF()):t._F(this.TF.shru(n-64),fe.ZERO,this.SF())},i.lO=function(i){var n=this.TF.high>>>16,r=65535&this.TF.high,e=this.TF.low>>>16,s=65535&this.TF.low,u=this.EF.high>>>16,o=65535&this.EF.high,h=this.EF.low>>>16,a=65535&this.EF.low,c=i.TF.high>>>16,f=65535&i.TF.high,v=i.TF.low>>>16,d=65535&i.TF.low,l=i.EF.high>>>16,g=65535&i.EF.high,w=i.EF.low>>>16,m=0,y=0,p=0,_=0,k=0,b=0,A=0,T=0;A+=(T+=a+(65535&i.EF.low))>>>16,T&=65535,b+=(A+=h+w)>>>16,A&=65535,k+=(b+=o+g)>>>16,b&=65535,_+=(k+=u+l)>>>16,k&=65535,p+=(_+=s+d)>>>16,_&=65535,y+=(p+=e+v)>>>16,p&=65535,m+=(y+=r+f)>>>16,y&=65535,m+=n+c,m&=65535;var S=this.SF(),E=fe.fromBits(p<<16|_,m<<16|y,S),I=fe.fromBits(A<<16|T,k<<16|b,S);return t._F(I,E,S)},i.lF=function(t){return this.lO(t.dF())},i.dF=function(){return this.BF().lO(t.UF)},i.VF=function(i){if(this.kF()||i.kF())return this.SF()?t.mF:t.wF;if(this.cF())return i.cF()?this.dF().VF(i.dF()):this.dF().VF(i).dF();if(i.cF())return this.VF(i.dF()).dF();if(this.TF.isZero()&&0===this.EF.high&&i.TF.isZero()&&0===i.EF.high)return t.gF(this.EF.multiply(i.EF));var n=fe.fromBits(4294967295,0,!0),r=this.EF.and(n),e=this.EF.shru(32),s=this.TF.and(n),u=this.TF.shru(32),o=i.EF.and(n),h=i.EF.shru(32),a=i.TF.and(n),c=i.TF.shru(32),f=fe.UZERO,v=fe.UZERO,d=fe.UZERO,l=fe.UZERO;f=f.add(r.mul(o)),v=v.add(f.shru(32)),f=f.and(n),v=v.add(e.mul(o)),d=d.add(v.shru(32)),v=(v=v.and(n)).add(r.mul(h)),d=d.add(v.shru(32)),v=v.and(n),d=d.add(s.mul(o)),l=l.add(d.shru(32)),d=(d=d.and(n)).add(e.mul(h)),l=l.add(d.shru(32)),d=(d=d.and(n)).add(r.mul(a)),l=l.add(d.shru(32)),d=d.and(n),l=l.add(u.mul(o)).add(s.mul(h)).add(e.mul(a)).add(r.mul(c)).and(n);var g=fe.fromBits(f.getLowBitsUnsigned(),v.getLowBitsUnsigned(),!0),w=fe.fromBits(d.getLowBitsUnsigned(),l.getLowBitsUnsigned(),!0);return t._F(g,w,this.SF())},i.HF=function(i){var n,r,e=i;if(e.kF())throw new RangeError("division by zero");if(this.kF())return this.SF()?[t.mF,t.mF]:[t.wF,t.wF];if(this.SF()){if(e.SF()||(e=e.xF()),e.CF(this))return[t.mF,this];if(e.CF(this.FF(1)))return[r=t.WF,n=this.lF(e)];r=t.mF}else{if(this.zO(t.AF)){if(e.zO(t.UF)||e.zO(t.qF))return[t.AF,t.wF];if(e.zO(t.AF))return[t.UF,t.wF];var s=this.OF(1).zF(e).LF(1);return s.zO(t.wF)?r=e.cF()?t.UF:t.qF:(n=this.lF(e.VF(s)),r=s.lO(n.zF(e))),[r,n=this.lF(e.VF(r))]}if(e.zO(t.AF))return this.SF()?[t.mF,this]:[t.wF,this];var u,o;if(this.cF())return e.cF()?this.dF().HF(e.dF()):(r=(u=this.dF().HF(e))[0],n=u[1],[r.dF(),n.dF()]);if(e.cF())return r=(o=this.HF(e.dF()))[0],n=o[1],[r.dF(),n.dF()];r=t.wF}for(n=this;n.DF(e);){for(var h=A.max(1,A.floor(n.iF()/e.iF())),a=A.ceil(A.log(h)/A.LN2),c=a<=48?1:A.pow(2,a-48),f=t.pF(h),v=f.VF(e);v.cF()||v.CF(n);)h-=c,v=(f=t.pF(h,this.SF())).VF(e);f.kF()&&(f=t.UF),r=r.lO(f),n=n.lF(v)}return[r,n]},i.zF=function(t){return this.HF(t)[0]},i.GF=function(t){return this.HF(t)[1]},i.toString=function(i){var n=i||10;if(n<2||n>36)throw new RangeError("radix");if(this.kF())return"0";if(this.cF()){if(this.zO(t.AF)){var r=t.pF(n),e=this.zF(r),s=e.VF(r).lF(this);return e.toString(n)+s.RF().toString(n)}return"-"+this.dF().toString(n)}for(var u=t.pF(A.pow(n,6),this.SF()),o=this,h="";;){var a=o.zF(u),c=(o.lF(a.VF(u)).RF()>>>0).toString(n);if((o=a).kF())return c+h;for(;c.length<6;)c="0"+c;h=String(c)+h}},t._F=function(i,n,r){return r?new t(i.toUnsigned(),n.toUnsigned()):new t(i.toSigned(),n.toSigned())},t.gF=function(i){return i.unsigned?new t(i,fe.UZERO):new t(i,i.isNegative()?fe.NEG_ONE:fe.ZERO)},t.pF=function(i,n){if(E(i))return n?t.mF:t.wF;if(n){if(i<0)return t.mF;if(i>=ym)return t.yF}else{if(i<=-pm)return t.AF;if(i+1>=pm)return t.bF}return i<0?t.pF(-i,n).dF():t._F(fe.fromNumber(i%mm),fe.fromNumber(i/mm),n)},t}();_m.wF=_m.gF(fe.ZERO),_m.mF=_m.gF(fe.UZERO),_m.UF=_m.gF(fe.ONE),_m.WF=_m.gF(fe.UONE),_m.qF=_m.gF(fe.NEG_ONE),_m.bF=_m._F(fe.NEG_ONE,fe.MAX_VALUE,!1),_m.yF=_m._F(fe.MAX_UNSIGNED_VALUE,fe.MAX_UNSIGNED_VALUE,!0),_m.AF=_m._F(fe.ZERO,fe.MIN_VALUE,!1),V(),It(),Bt();var km=function(){function t(t,i){void 0===i&&(i=1),this.XF=void 0,this.qD=void 0,this.XF=t,this.qD=i}var i=t.prototype;return i.lO=function(i){return this.qD>=i.qD?new t(this.XF+i.JF(this.qD).XF,this.qD):new t(this.JF(i.qD).XF+i.XF,i.qD)},i.eF=function(t){return t.aF(this)},i.nF=function(t){return t.hF(this)},i.oF=function(i){return this.qD>=i.qD?new t(A.abs(this.XF-i.JF(this.qD).XF),this.qD):i.oF(this)},i.rF=function(t,i){return this.oF(t).hF(i)},i.sF=function(t){return function(t,i){return t.qD>=i.qD?jn(t.XF,i.JF(t.qD).XF):jn(t.JF(i.qD).XF,i.XF)}(this,t)},i.zO=function(t){return 0===this.sF(t)},i.aF=function(t){return this.sF(t)<0},i.hF=function(t){return this.sF(t)<=0},i.JF=function(i){return new t(this.XF*(i/this.qD),i)},i.lF=function(i){return this.qD>=i.qD?new t(this.XF-i.JF(this.qD).XF,this.qD):new t(this.JF(i.qD).XF-i.XF,i.qD)},i.ZF=function(i){return new t(this.XF*i,this.qD)},t.jF=function(i){return new t(A.ceil(i.XF),i.qD)},t.QF=function(i){return new t(A.floor(i.XF),i.qD)},t.KF=function(t,i){return t.nF(i)?t:i},t.YF=function(t,i){return t.hF(i)?t:i},xt(t,[{key:"vF",get:function(){return!isFinite(this.XF)}},{key:"dd",get:function(){return this.XF/this.qD}}]),t}();km.fd=new km(1/6,1),km.wF=new km(0),km.tU=new km(1/0),km.iU=1e6;var bm=function(t){function i(i,n){var r;return(r=t.call(this)||this).zE=void 0,r.qD=void 0,r.zE=i.toSigned(),r.qD=n>>>0,r}Pt(i,t);var n=i.prototype;return n.cF=function(){return this.zE.isNegative()},n.kF=function(){return 0!==this.qD&&this.zE.isZero()},n.vF=function(){return 0===this.qD&&!this.zE.isZero()},n.fF=function(){return 0===this.qD&&this.zE.isZero()},n.iF=function(){if(0===this.qD)return this.zE.isZero()?NaN:this.zE.isNegative()?-1/0:1/0;var t=this.zE.divide(this.qD),i=this.zE.subtract(t.multiply(this.qD));return t.toNumber()+i.toNumber()/this.qD},n.IF=function(){if(0===this.qD)throw new p("Failed to convert timestamp");return this.zE},n.uU=function(){return new Date(0===this.qD?NaN:this.JF(1e3).zE.toNumber())},n.cU=function(){return new km(0===this.qD?this.iF():this.zE.toNumber(),this.qD)},n.JF=function(t,n){void 0===n&&(n=Tm.dU);var r=this.qD;if(r===t)return this;if(0===r)return this;var e=On(r,t),s=function(t,i,n){var r=t.HF(i),e=r[0],s=r[1];if(s.kF())return e;if(n===Tm.dU)return s.cF()?e.lF(_m.UF):e;if(n===Tm.lU)return s.cF()?e:e.lO(_m.UF);var u=s.VF(_m.pF(2));return u.cF()?u.dF().aF(i)?e:e.lF(_m.UF):u.aF(i)?e:e.lO(_m.UF)}(_m.gF(this.zE).VF(_m.pF(t/e)),_m.pF(r/e),n);return new i(s.IF(),t)},n.sF=function(t){if(this===t)return Ln.rh;if(0===this.qD||0===t.qD)return gm(this,t);if(this.kF())return t.kF()?Ln.rh:t.cF()?Ln.Fg:Ln.Ug;if(t.kF())return this.cF()?Ln.Ug:Ln.Fg;var i=A.min(this.qD,t.qD),n=this.JF(i,Tm.fU).zE,r=t.JF(i,Tm.fU).zE;return n.compare(r)},n.dF=function(){return 0===this.qD?function(t){0;return t.fF()?t:t.cF()?bm.nU:bm.rU}(this):new i(this.zE.negate(),this.qD)},n.lO=function(t){if(0===this.qD||0===t.qD)return function(t,i){0;if(t.fF()||i.fF())return bm.sU;if(t.vF()&&i.vF())return t.cF()===i.cF()?t:bm.sU;return t.vF()?t:i}(this,t);if(this.kF())return t;if(t.kF())return this;var n=A.max(this.qD,t.qD),r=this.JF(n,Tm.fU),e=t.JF(n,Tm.fU);return new i(r.zE.add(e.zE),n)},n.VF=function(t){if(this.fF()||E(t))return i.sU;if(this.vF()||!isFinite(t)){if(this.kF()||0===t)return i.sU;var n=this.cF()?i.rU:i.nU;return t<0?n.dF():n}return this.kF()?this:new i(0===t?fe.ZERO:this.zE.multiply(t),this.qD)},n.zF=function(t){if(this.fF()||E(t))return i.sU;if(this.vF())return isFinite(t)?0===t?1/t<0?this.dF():this:t<0?this.dF():this:i.sU;if(!isFinite(t))return new i(fe.ZERO,this.qD);if(this.kF())return 0===t?i.sU:new i(fe.ZERO,this.qD);if(0===t){var n=this.cF()?i.rU:i.nU;return 1/t<0?n.dF():n}return new i(this.zE.divide(t),this.qD)},n.vU=function(){return[this.zE.low,this.zE.high,this.qD]},i.eU=function(t,n){return void 0===n&&(n=dm),i.pF(t*n,n)},i.pF=function(t,n){return E(t)?i.sU:t===1/0?i.nU:t===-1/0?i.rU:new i(fe.fromNumber(t),n)},i.gF=function(t,n){return new i(t,n)},i.hU=function(t){return i.eU(t.dd,dm)},i.oU=function(t){return new i(fe.fromNumber(t.getTime()),1e3)},i.KF=function(t,i){return t.nF(i)?t:i},i.YF=function(t,i){return t.hF(i)?t:i},i.aU=function(t,n,r){return i.KF(n,i.YF(r,t))},i}(lm);bm.wF=new bm(fe.ZERO,dm),bm.sU=new bm(fe.ZERO,0),bm.nU=new bm(fe.ONE,0),bm.rU=new bm(fe.NEG_ONE,0),V(),It(),Bt(),Nt(),ft();var Am=function(t){function i(i,n){var r;return(r=t.call(this)||this).zE=void 0,r.qD=void 0,r.zE=BigInt.asIntN(64,i),r.qD=n>>>0,r}Pt(i,t);var n=i.prototype;return n.cF=function(){return this.zE>BigInt(32)&BigInt(4294967295);return fe.fromBits(Number(t),Number(i))},n.uU=function(){return new Date(0===this.qD?NaN:Number(this.JF(1e3).zE))},n.cU=function(){return new km(0===this.qD?this.iF():Number(this.zE),this.qD)},n.JF=function(t,n){void 0===n&&(n=Tm.dU);var r=this.qD;if(r===t)return this;if(0===r)return this;var e=On(r,t),s=function(t,i,n){var r=t/i,e=t-r*i;if(e===BigInt(0))return r;if(n===Tm.dU)return er?Ln.Fg:n>>0),n)},i.hU=function(t){return i.eU(t.dd,dm)},i.oU=function(t){return i.pF(t.getTime(),1e3)},i.KF=function(t,i){return t.nF(i)?t:i},i.YF=function(t,i){return t.hF(i)?t:i},i.aU=function(t,n,r){return i.KF(n,i.YF(r,t))},xt(i,null,[{key:"wF",get:function(){return i._U||(i._U=new i(BigInt(0),dm)),i._U}},{key:"sU",get:function(){return i.gU||(i.gU=new i(BigInt(0),0)),i.gU}},{key:"nU",get:function(){return i.pU||(i.pU=new i(BigInt(1),0)),i.pU}},{key:"rU",get:function(){return i.mU||(i.mU=new i(BigInt(-1),0)),i.mU}}]),i}(lm);Am._U=void 0,Am.gU=void 0,Am.pU=void 0,Am.mU=void 0;var Tm=function(t){return t[t.dU=0]="dU",t[t.lU=1]="lU",t[t.fU=2]="fU",t}({}),Sm=function(){try{return"function"==typeof BigInt&&"bigint"===W(BigInt(0))}catch(t){return!1}}()?Am:bm;function Em(t,i){return t.sF(i)}function Im(t,i){return void 0!==t?void 0!==i?Sm.YF(t,i):t:i}V(),It();var Rm=A.pow(2,33),Cm=bn(function(){return Sm.pF(Rm,9e4)}),Pm=bn(function(){return Cm().zF(2)});V(),It();var Nm={yU:0,AU:1/0,bU:0},Dm=["WEBVTT","WEBVTT ","WEBVTT\t","WEBVTT\n"],xm=[" ","\t","\n","\f","\r"],Bm=/^\d*$/,Om=/.*[0-9]+.*/,Mm=/^[\d.-]+$/,Lm=/(^\.|\.$)/,Fm=/(\D\.|\.\D)/;function Um(t,i,n){return void 0===i&&(i=Nm),void 0===n&&(n=!0),Vm(_a(Aa(t),new Pa),i,n)}function Vm(t,i,n){void 0===i&&(i=Nm),void 0===n&&(n=!0);var r={L:[],SU:[],TU:[]},e=jm(t),s=new Pa,u=!1;if(Zm(e),Hm(e,function(t){return"\n"!==t},s),s.ac>=e.length)return r;(s.Ny(1),"\n"!==e.charAt(s.ac))?Gm(Wm(e,s,u,!0,r,i,n),r):s.Ny(1);for(Hm(e,function(t){return"\n"===t},s);s.ac=t.length?f=!0:i.Ny(1),Wo(o,"--\x3e")){if(r||1!==h&&(2!==h||v)){i.My(a);break}v=!0,a=i.ac,d=new um(0,0,"",!1,c);try{Qm(o,e.SU,d,s,u),c=""}catch(t){Vi.um(t),d=null}}else{if(""===o)break;r&&zo(o,"X-TIMESTAMP-MAP")&&(e.kU=zm(o)),r||2!==h||n||(Xo("STYLE",c.replace(/ /g,""))?(l={Km:jw.SO},c=""):Xo("REGION",c.replace(/ /g,""))&&(g=new vm("",100,3,0,100,0,100,""),c="")),c&&(c+="\n"),c+=o,a=i.ac}if(d)return d.U=c,d;if(l);else if(g)return function(t,i){for(var n,r=t.split(/\s/),e=":",s=Ft(r);!(n=s()).done;){var u=n.value;if(0!==u.length&&Wo(u,e)&&u.charAt(0)!==e&&u.charAt(u.length-1)!==e){var o=u.indexOf(e),h=u.substring(0,o),a=u.substring(o+1,u.length);switch(h.toUpperCase()){case"ID":fy(a,i);break;case"WIDTH":ly(a,i);break;case"LINES":dy(a,i);break;case"REGIONANCHOR":var c=cy(a);c&&(i.KO=c[0],i.YO=c[1]);break;case"VIEWPORTANCHOR":var f=cy(a);f&&(i.ZO=f[0],i.$O=f[1]);break;case"SCROLL":vy(a,i)}}}}(c,g),g;return null}function zm(t){var i,n=t.split("=")[1].trim().split(","),r=Xm(n[0].trim(),"MPEGTS")?n[0]:n[1],e=Xm(n[0].trim(),"LOCAL")?n[0]:n[1];return{EU:qm(Number(r.split(/:(.*)/)[1].trim())||0),bh:Sm.eU(null!=(i=Km(e.split(/:(.*)/)[1].trim(),new Pa))?i:0)}}function qm(t){return Sm.pF(t,9e4)}function Xm(t,i){return zo(t,i)}function Gm(t,i){t&&function(t){return"cue"===t.Km}(t)?i.L.push(t):t&&function(t){return"region"===t.Km}(t)?i.SU.push(t):t&&function(t){return"stylesheet"===t.Km}(t)&&i.TU.push(t)}function Qm(t,i,n,r,e){var s=new Pa;iy(t,s);var u=Ym(Km(t,s),r,e);if(iy(t,s),"--\x3e"!==t.substring(s.ac,s.ac+3))throw p("Something went wrong with parsing a WebVTT Cue");s.Ny(3),iy(t,s);var o=Ym(Km(t,s),r,e);n.XO(u,o),function(t,i,n){for(var r,e=t.split(/\s/),s=":",u=Ft(e);!(r=u()).done;){var o=r.value;if(0!==o.length&&Wo(o,s)&&o.charAt(0)!==s&&o.charAt(o.length-1)!==s){var h=o.indexOf(s),a=o.substring(0,h),c=o.substring(h+1,o.length);switch(a.toUpperCase()){case"REGION":uy(c,i,n);break;case"VERTICAL":hy(c,i);break;case"D":ay(c,i);break;case"LINE":case"L":ey(c,i);break;case"POSITION":case"T":sy(c,i);break;case"SIZE":case"S":oy(c,i);break;case"ALIGN":case"A":ry(c,i)}}}}(t.substring(s.ac,t.length),n,i)}function Ym(t,i,n){return n?t+i.yU:t}function $m(t){return/^[0-9]$/.test(t)}function Km(t,i){var n,r,e,s=Ho(t,",","."),u=!1;if(i.ac>=s.length||!$m(s.charAt(i.ac)))throw new p("Something went wrong with parsing a WebVTT Cue timestamp");var o=Hm(s,$m,i),h=T(o,10);if((o.length>2||h>59)&&(u=!0),i.ac>=s.length||":"!==s.charAt(i.ac))throw new p("Something went wrong with parsing a WebVTT Cue timestamp");i.Ny(1);var a=Hm(s,$m,i);if(2!==a.length)throw new p("Something went wrong with parsing a WebVTT Cue timestamp");var c=T(a,10);if(u||i.ac=s.length||":"!==s.charAt(i.ac))throw new p("Something went wrong with parsing a WebVTT Cue timestamp");i.Ny(1);var f=Hm(s,$m,i);if(2!==a.length)throw new p("Something went wrong with parsing a WebVTT Cue timestamp");n=h,r=c,e=T(f,10)}else n=0,r=h,e=c;if(i.ac>=s.length||"."!==s.charAt(i.ac))throw new p("Something went wrong with parsing a WebVTT Cue timestamp");i.Ny(1);var v=Hm(s,$m,i),d=T(v,10);if(c>59||e>59)throw new p("Something went wrong with parsing a WebVTT Cue timestamp");return 60*n*60+60*r+e+d/1e3}function Jm(t){return Zm(jm(t))}function Zm(t){if(t.length<6)return!1;for(var i,n=Ft(Dm);!(i=n()).done;){var r=i.value;if(zo(t,r))return!0}return!1}function ty(t){return Jn(xm,t)}function iy(t,i){for(;i.ac-1){var n=S(t.substring(0,i));if(!E(n)&&n>=0&&n<=100)return n}return null}function ry(t,i){var n=t.toLowerCase();switch(n){case"start":case"center":case"end":case"left":case"right":i.xO=n;break;case"middle":i.xO="center"}}function ey(t,i){var n,r,e=t.indexOf(",");if(e>=0?(n=t.substring(0,e),r=t.substring(e+1,t.length)):(n=t,r=""),Om.test(n)){var s,u;if(qo(n,"%")){var o=ny(n);if(null===o)return;s=o,u=!1}else{if(!Mm.test(n)||n.lastIndexOf("-")>0)return;var h=n.indexOf(".");if(h>=0&&(h!==n.lastIndexOf(".")||!Fm.test(n)||Lm.test(n)))return;if(s=S(n),E(s))return;u=!0}switch(i.IO=s,i.BO=u,r=r.toLowerCase()){case"start":case"center":case"end":i.RO=r;break;case"middle":i.RO="center"}}}function sy(t,i){var n,r,e=t.indexOf(",");e>=0?(n=t.substring(0,e),r=t.substring(e+1,t.length)):(n=t,r="");var s=ny(n);if(null!==s)switch(i.mo=s,r=r.toLowerCase()){case"line-left":case"center":case"line-right":case"auto":i.CO=r;break;case"start":i.CO="line-left";break;case"middle":i.CO="center";break;case"end":i.CO="line-right"}}function uy(t,i,n){var r=qn(n,function(i){return i.o===t});void 0!==r&&(i.DO=r)}function oy(t,i){var n=ny(t);null!==n&&(i.Vy=n)}function hy(t,i){switch(t.toLowerCase()){case"rl":case"vertical:rl":case"vertical-rl":i.Pt="rl";break;case"lr":case"vertical:lr":case"vertical-lr":i.Pt="lr";break;default:i.Pt=""}}function ay(t,i){"VERTICAL"===t.toUpperCase()?i.Pt="rl":"VERTICAL-LR"===t.toUpperCase()&&(i.Pt="lr")}function cy(t){if(t.indexOf(",")>=0){var i=ny(t.substring(0,t.indexOf(","))),n=ny(t.substring(t.indexOf(",")+1,t.length));return[Cn(i||0,0,100),Cn(n||100,0,100)]}return null}function fy(t,i){i.o=t}function vy(t,i){"up"===t.toLowerCase()&&(i.JO="up")}function dy(t,i){Bm.test(t)&&(i.QO=T(t))}function ly(t,i){var n=ny(t);null!==n&&(i.Ti=n)}V(),It(),Ut(),V(),It(),Ut(),V(),It();var gy=function(t){return t.OR="moov",t.FR="mvhd",t.UR="trak",t.HR="tkhd",t.WR="mdia",t.qR="mdhd",t.zR="hdlr",t.GR="minf",t.XR="stbl",t.jR="stsd",t.QR="stsc",t.KR="mvex",t.YR="trex",t.JR="avc1",t.ZR="avcC",t.$R="hev1",t.tC="hvc1",t.iC="hvcC",t.eC="vp09",t.sC="vpcC",t.nC="av01",t.rC="av1C",t.hC="dvcC",t.oC="dvvC",t.aC="dvwC",t.uC="dac3",t.cC="dec3",t.dC="dvav",t.lC="dva1",t.fC="dvhe",t.vC="dvh1",t._C="ac-3",t.gC="ec-3",t.pC="colr",t.mC="pasp",t.wC="mp4a",t.yC="esds",t.AC="fLaC",t.bC="dfLa",t.SC="wvtt",t.TC="vttC",t.kC="vlab",t.EC="enca",t.xC="encv",t.IC="moof",t.RC="mfhd",t.DC="traf",t.BC="tfhd",t.NC="trun",t.MC="tfdt",t.LC="senc",t.OC="mdat",t.FC="pssh",t.VC="emsg",t.HC="sidx",t.WC="styp",t.qC="ftyp",t.zC="sinf",t.GC="frma",t.XC="schi",t.jC="tenc",t}({}),wy=function(t){return t.ON_SCREEN_COLOURS="nclx",t.RESTRICTED_ICC_PROFILE="rICC",t.UNRESTRICED_ICC_PROFILE="prof",t}({}),my=function(t){return t[t.BASE_DATA_OFFSET_PRESENT=1]="BASE_DATA_OFFSET_PRESENT",t[t.SAMPLE_DESCRIPTION_INDEX_PRESENT=2]="SAMPLE_DESCRIPTION_INDEX_PRESENT",t[t.DEFAULT_SAMPLE_DURATION_PRESENT=8]="DEFAULT_SAMPLE_DURATION_PRESENT",t[t.DEFAULT_SAMPLE_SIZE_PRESENT=16]="DEFAULT_SAMPLE_SIZE_PRESENT",t[t.DEFAULT_SAMPLE_FLAGS_PRESENT=32]="DEFAULT_SAMPLE_FLAGS_PRESENT",t[t.DURATION_IS_EMPTY=65536]="DURATION_IS_EMPTY",t[t.DEFAULT_BASE_IS_MOOF=131072]="DEFAULT_BASE_IS_MOOF",t}({}),yy=function(t){return t[t.DATA_OFFSET_PRESENT=1]="DATA_OFFSET_PRESENT",t[t.FIRST_SAMPLE_FLAGS_PRESENT=4]="FIRST_SAMPLE_FLAGS_PRESENT",t[t.SAMPLE_DURATION_PRESENT=256]="SAMPLE_DURATION_PRESENT",t[t.SAMPLE_SIZE_PRESENT=512]="SAMPLE_SIZE_PRESENT",t[t.SAMPLE_FLAGS_PRESENT=1024]="SAMPLE_FLAGS_PRESENT",t[t.SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT=2048]="SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT",t}({});V(),It();var py=function(){function t(t,i){this.ck=void 0,this.KC=void 0,this.ck=t,this.KC=i}var i=t.prototype;return i.QC=function(){return Hh(this.ck,this.KC)},i.YC=function(){return Yh(this.ck,this.KC)},i.JC=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getInt16(i.ac,n);return i.Ny(2),r}(this.ck,this.KC)},i.ZC=function(){return Kh(this.ck,this.KC)},i.$C=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getInt32(i.ac,n);return i.Ny(4),r}(this.ck,this.KC)},i.tD=function(){return Zh(this.ck,this.KC)},i.iD=function(t){return zh(this.ck,this.KC,t)},i.eD=function(t){return function(t,i,n){for(var r=[],e=0;ei.byteLength){var a=h;return n.My(e),{cD:!1,pD:a}}var c={Km:u.Km,ac:e,ck:new py(ba(i,e,h),new Pa(u.mD))};return n.My(h),{cD:!0,lD:c}},t._D=function(t,i){var n=i.ac;if(!Xh(t,i,8))return{cD:!1,pD:i.ac+8};var r=Kh(t,i),e=na(t,i,4);if(1===r){if(!Xh(t,i,8)){var s=i.ac+8;return i.My(n),{cD:!1,pD:s}}r=Zh(t,i).toNumber()}if("uuid"===e){if(!Xh(t,i,16)){var u=i.ac+16;return i.My(n),{cD:!1,pD:u}}e=na(t,i,16)}return{cD:!0,gD:{Km:e,Vy:r,mD:i.ac-n}}},t.wD=function(t,i,n){var r=t.ck,e=t.KC,s=ka(Ta(r),e.ac,r.byteLength);return n&&(s=Ra(s)),e.Ny(s.byteLength),{Km:i,ck:s}},t.yD=function(i,n,r){var e=Iy(i.ZC());return{Km:n,bD:e.version,SD:e.flags,ck:t.wD(i,n,r).ck}},t}();function Ty(t,i){var n=Sy(t,i);if(!n)throw new p("Missing "+i+" atom");return n}function Sy(t,i){for(var n,r=Ft(t);!(n=r()).done;){var e=n.value;if(e.Km===i)return e.ck}}function Ey(t,i){for(var n,r=[],e=Ft(t);!(n=e()).done;){var s=n.value;s.Km===i&&r.push(s.ck)}return r}function Iy(t){return{version:t>>24,flags:new Uh(16777215&t)}}var Ry=function(){function t(){}return t.TD=function(i){for(var n,r=[],e=Ft(Ay.aD(new py(i,new Pa)));!(n=e()).done;){var s=n.value,u=t.kD(s);u&&r.push(u)}return r},t.ED=function(t){return Ay.uD(t,new Pa,!1).m.some(this.PD)},t.xD=function(i){return Ey(Ay.aD(new py(i,new Pa)),gy.FC).map(t.RD)},t.CD=function(i){return Ey(Ay.aD(i.ck),gy.FC).map(t.RD)},t.PD=function(t){return t.Km===gy.qC||t.Km===gy.WC||t.Km===gy.OR||t.Km===gy.IC||t.Km===gy.OC||t.Km===gy.HC||t.Km===gy.VC},t.kD=function(i){switch(i.Km){case gy.OR:return t.DD(i.ck);case gy.IC:return t.BD(i.ck,i.ac);case gy.OC:return t.ND(i.ck);case gy.HC:return t.MD(i.ck);case gy.VC:return t.LD(i.ck)}},t.DD=function(i){var n=Ay.aD(i),r=Ty(n,gy.FR),e=Ey(n,gy.UR),s=Sy(n,gy.KR),u=t.OD(r),o=e.map(t.FD),h=s?t.UD(s):void 0;return{Km:gy.OR,gD:u,Z:o,VD:h}},t.OD=function(t){var i=Iy(t.ZC()),n=i.version,r=i.flags,e=1===n?t.tD():t.ZC(),s=1===n?t.tD():t.ZC(),u=t.ZC(),o=1===n?t.tD():t.ZC(),h=t.ZC(),a=t.YC()>>8;t.rD(2),t.rD(8);var c=t.eD(9);t.rD(24);var f=t.ZC();return{Km:gy.FR,bD:n,SD:r,HD:e,WD:s,qD:u,ct:o,zD:h,Mx:a,GD:c,XD:f}},t.FD=function(i){var n=Ay.aD(i),r=Ty(n,gy.HR),e=Ty(n,gy.WR),s=t.jD(r),u=t.QD(e);return{Km:gy.UR,gD:s,KD:u}},t.jD=function(t){var i=Iy(t.ZC()),n=i.version,r=i.flags,e=1===n?t.tD():t.ZC(),s=1===n?t.tD():t.ZC(),u=t.ZC();t.rD(4);var o=1===n?t.tD():t.ZC();t.rD(8);var h=t.JC(),a=t.JC(),c=t.JC()/A.pow(2,8);t.rD(2);var f=t.eD(9),v=t.ZC()/A.pow(2,16),d=t.ZC()/A.pow(2,16);return{Km:gy.HR,YD:r.Oy(1),JD:r.Oy(2),ZD:r.Oy(4),HD:e,WD:s,$D:u,ct:o,tB:h,iB:a,Mx:c,GD:f,Ti:v,Mi:d}},t.QD=function(i){var n=Ay.aD(i),r=Ty(n,gy.qR),e=Ty(n,gy.zR),s=Ty(n,gy.GR),u=t.eB(r),o=t.sB(e),h=t.nB(s);return{Km:gy.WR,gD:u,rB:o,hB:h}},t.eB=function(t){var i=Iy(t.ZC()),n=i.version,r=i.flags,e=1===n?t.tD():t.ZC(),s=1===n?t.tD():t.ZC(),u=t.ZC(),o=1===n?t.tD():t.ZC();t.YC();return t.rD(2),{Km:gy.qR,bD:n,SD:r,HD:e,WD:s,qD:u,ct:o}},t.sB=function(t){var i=Iy(t.ZC()),n=i.version,r=i.flags;t.rD(4);var e=t.sD(4);t.rD(12);var s=t.nD();return{Km:gy.zR,bD:n,SD:r,oB:e,l:s}},t.nB=function(i){var n=Ty(Ay.aD(i),gy.XR),r=t.aB(n);return{Km:gy.GR,uB:r}},t.aB=function(i){var n=Ty(Ay.aD(i),gy.jR),r=t.cB(n);return{Km:gy.XR,dB:r}},t.cB=function(i){for(var n,r=Iy(i.ZC()),e=r.version,s=r.flags,u=(i.ZC(),[]),o=Ft(Ay.aD(i));!(n=o()).done;){var h=n.value,a=t.lB(h.ck,h.Km);a&&u.push(a)}return{Km:gy.jR,bD:e,SD:s,fB:u}},t.lB=function(i,n){var r=t.vB(i,n);return r||((r=t._B(i,n))||(n===gy.SC?t.gB(i):void 0))},t.vB=function(i,n){return n===gy.wC?t.pB(i):n===gy.AC||n===gy.AC.toLowerCase()||n===gy.AC.toUpperCase()?t.mB(i):n===gy.EC?t.wB(i):n===gy._C?t.yB(i):n===gy.gC?t.AB(i):void 0},t._B=function(i,n){return n===gy.JR?t.bB(i):n===gy.$R||n===gy.tC?t.SB(i,n):n===gy.eC?t.TB(i,n):n===gy.nC?t.kB(i,n):n===gy.xC?t.EB(i):n===gy.dC||n===gy.lC||n===gy.fC||n===gy.vC?t.PB(i,n):void 0},t.xB=function(t,i){return t.rD(6),{Km:i,IB:t.YC()}},t.RB=function(i,n){var r=t.xB(i,n);i.rD(8);var e=i.YC(),s=i.YC();return i.rD(2),i.rD(2),io({},r,{CB:e,DB:s,BB:i.ZC()>>>16})},t.NB=function(i,n){var r=t.xB(i,n);i.rD(2),i.rD(2),i.rD(12);var e=i.YC(),s=i.YC(),u=i.ZC(),o=i.ZC();i.rD(4);var h=i.YC();i.rD(32);var a=i.YC();return i.rD(2),io({},r,{Ti:e,Mi:s,MB:u,LB:o,OB:h,FB:a})},t.pB=function(i){var n=t.RB(i,gy.wC),r=Ty(Ay.aD(i),gy.yC);return io({},n,{UB:t.VB(r)})},t.mB=function(i){var n=t.RB(i,gy.AC),r=Ty(Ay.aD(i),gy.bC);return io({},n,{HB:t.WB(r)})},t.gB=function(i){var n=t.xB(i,gy.SC),r=Ay.aD(i),e=Ty(r,gy.TC),s=t.qB(e),u=Sy(r,gy.kC);return io({},n,{zB:s,GB:u?t.XB(u):void 0})},t.qB=function(t){return{Km:gy.TC,Cd:t.nD()}},t.XB=function(t){return{Km:gy.kC,Th:t.nD()}},t.VB=function(t){return Ay.yD(t,gy.yC,!0)},t.WB=function(t){return Ay.yD(t,gy.bC,!0)},t.bB=function(i){var n=t.NB(i,gy.JR),r=Ay.aD(i),e=Ty(r,gy.ZR),s=Sy(r,gy.mC);return io({},n,{jB:t.QB(e),KB:s?t.YB(s):void 0})},t.SB=function(i,n){var r=t.NB(i,n),e=Ty(Ay.aD(i),gy.iC);return io({},r,{JB:t.ZB(e)})},t.TB=function(i,n){var r=t.NB(i,n),e=Ty(Ay.aD(i),gy.sC);return io({},r,{$B:t.tN(e)})},t.kB=function(i,n){var r=t.NB(i,n),e=Ay.aD(i),s=Ty(e,gy.rC),u=t.iN(s),o=Sy(e,gy.pC);return io({},r,{eN:u,sN:o?t.nN(o):void 0})},t.EB=function(i){var n=i.Ly(),r=t.NB(i,gy.xC),e=Ty(Ay.aD(i),gy.zC),s=t.rN(e);return io({},r,{hN:t._B(n,s.aN.oN),uN:s})},t.PB=function(i,n){var r=t.NB(i,n),e=Ay.aD(i);return io({},r,{cN:t.dN(e)})},t.yB=function(i){var n=t.RB(i,gy._C),r=Ty(Ay.aD(i),gy.uC);return io({},n,{lN:t.fN(r)})},t.AB=function(i){var n=t.RB(i,gy.gC),r=Ty(Ay.aD(i),gy.cC);return io({},n,{vN:t._N(r)})},t.wB=function(i){var n=i.Ly(),r=t.RB(i,gy.EC),e=Ty(Ay.aD(i),gy.zC),s=t.rN(e);return io({},r,{hN:t.vB(n,s.aN.oN),uN:s})},t.rN=function(i){var n=Ay.aD(i),r=Ty(n,gy.GC),e=t.gN(r),s=Ty(n,gy.XC),u=t.pN(s);return{Km:gy.zC,aN:e,mN:u}},t.gN=function(t){var i=t.sD(4);return{Km:gy.GC,oN:i}},t.pN=function(i){var n=Ty(Ay.aD(i),gy.jC),r=t.wN(n);return{Km:gy.XC,yN:r}},t.wN=function(t){var i=Iy(Kh(t.ck,t.KC)),n=i.version,r=i.flags,e=t.QC()>0,s=t.QC(),u=t.iD(16);return{Km:gy.jC,bD:n,SD:r,AN:e,bN:s,SN:u}},t.QB=function(t){return Ay.wD(t,gy.ZR,!0)},t.ZB=function(t){return Ay.wD(t,gy.iC,!0)},t.dN=function(t){var i=Sy(t,gy.hC);if(void 0!==i)return Ay.wD(i,gy.hC,!0);var n=Sy(t,gy.oC);if(void 0!==n)return Ay.wD(n,gy.oC,!0);var r=Sy(t,gy.aC);if(void 0!==r)return Ay.wD(r,gy.aC,!0);throw p("Error parsing Dolby Vision configuration box.")},t.fN=function(t){return Ay.wD(t,gy.uC,!0)},t._N=function(t){return Ay.wD(t,gy.cC,!0)},t.tN=function(t){return Ay.wD(t,gy.sC,!0)},t.iN=function(t){return Ay.wD(t,gy.rC,!0)},t.nN=function(t){var i=t.sD(4);switch(i){case"nclx":return{TN:wy.ON_SCREEN_COLOURS,kN:t.YC(),EN:t.YC(),PN:t.YC(),xN:!!(128&t.QC())};case"rICC":return{TN:wy.RESTRICTED_ICC_PROFILE};case"prof":return{TN:wy.UNRESTRICED_ICC_PROFILE};default:throw p("Could not parse ColourInformationBox: unknown type '"+i+"'.")}},t.YB=function(t){var i=t.ZC(),n=t.ZC();return{Km:gy.mC,RN:i,CN:n}},t.UD=function(i){var n=Ey(Ay.aD(i),gy.YR).map(t.DN);return{Km:gy.KR,Z:n}},t.DN=function(t){var i=Iy(t.ZC()),n=i.version,r=i.flags,e=t.ZC(),s=t.ZC(),u=t.ZC(),o=t.ZC(),h=t.ZC();return{Km:gy.YR,bD:n,SD:r,$D:e,BN:s,NN:u,MN:o,LN:h}},t.BD=function(i,n){var r=Ay.aD(i),e=Ty(r,gy.RC),s=Ey(r,gy.DC),u=t.ON(e),o=s.map(t.FN);return{Km:gy.IC,UN:n,gD:u,Z:o}},t.ON=function(t){var i=Iy(t.ZC()),n=i.version,r=i.flags,e=t.ZC();return{Km:gy.RC,bD:n,SD:r,VN:e}},t.FN=function(i){var n=Ay.aD(i),r=Ty(n,gy.BC),e=Ey(n,gy.NC),s=Sy(n,gy.MC),u=t.HN(r),o=e.map(function(i){return t.WN(i,u)}),h=s?t.qN(s):void 0;return{Km:gy.DC,gD:u,zN:o,GN:h}},t.HN=function(t){var i=Iy(t.ZC()),n=i.version,r=i.flags,e=t.ZC(),s=r.Oy(my.BASE_DATA_OFFSET_PRESENT)?t.tD():void 0,u=r.Oy(my.SAMPLE_DESCRIPTION_INDEX_PRESENT)?t.ZC():void 0,o=r.Oy(my.DEFAULT_SAMPLE_DURATION_PRESENT)?t.ZC():void 0,h=r.Oy(my.DEFAULT_SAMPLE_SIZE_PRESENT)?t.ZC():void 0,a=r.Oy(my.DEFAULT_SAMPLE_FLAGS_PRESENT)?t.ZC():void 0;return{Km:gy.BC,bD:n,SD:r,$D:e,XN:s,jN:u,NN:o,MN:h,LN:a}},t.WN=function(i,n){for(var r=Iy(i.ZC()),e=r.version,s=r.flags,u=i.ZC(),o=s.Oy(yy.DATA_OFFSET_PRESENT)?i.$C():void 0,h=s.Oy(yy.FIRST_SAMPLE_FLAGS_PRESENT)?i.ZC():void 0,a=[],c=0;c0)for(var c=Kh(n,r),f=0;f>31&1,g=2147483647&d,w=Kh(r,e),m=Kh(r,e),y=m>>31&1,p=m>>28&7,_=268435455&m;f.push({uM:l,cM:g,ct:w,dM:y,lM:p,fM:_})}return{Km:gy.HC,bD:u,SD:o,vM:h,qD:a,_M:i,gM:n,pM:c,mM:f}},t.qN=function(t){var i,n=t.ck,r=t.KC,e=Iy(Kh(n,r)),s=e.version,u=e.flags;return i=0===s?fe.fromBits(Kh(n,r),0,!0):Zh(n,r),{Km:gy.MC,bD:s,SD:u,GN:i}},t}();function Cy(t){return t&&"$E"in t?t.$E:t}V(),It(),Bt(),Nt(),V(),It();var Py=function(t){function i(i,n,r,e,s,u,o,h){var a;return(a=t.call(this,i,n,r,e)||this).xU=void 0,a.RU=void 0,a.CU=void 0,a.BU=void 0,a.xU=s,a.RU=u,a.CU=o,a.BU=h||void 0,a}return Pt(i,t),i.prototype.GO=function(t){return!!Wg(this.PU,t.PU)&&(!!Wg(this.IU,t.IU)&&(!!Wg(this.SU,t.SU)&&(this.DU&&t.DU?!!this.DU.GE(t.DU)&&(this.U&&t.U?this.U.GE(t.U):this.U===t.U):this.DU===t.DU)))},xt(i,[{key:"PU",get:function(){return this.xU}},{key:"IU",get:function(){return this.RU}},{key:"SU",get:function(){return this.CU}},{key:"DU",get:function(){return this.BU}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return jg(Yw(t),{get extent(){return t.PU},get styles(){return t.IU},get regions(){return t.SU},get metadata(){return Cy(t.DU)},get content(){return Cy(t.U)}})}(this)),this.hu}}]),i}(em);V(),It(),Bt();var Ny=function(){function t(t,i,n){this.Lf=void 0,this.MU=void 0,this.LU=void 0,this.MU=t,this.LU=i,fg(n)?this.Lf=function(t,i,n){for(var r=0,e=["begin","end","dur"];r=t&&u<=i||s=i||st)&&r.push(n[e])}return r}(l[i],l[i+1],h);if(n.length<=0&&function(t){if(fg(t)){var i=t.VE.toUpperCase(),n=Boolean(t.sP("smpte:backgroundImage"));return"BR"===i||n}return t.FE===cg.NT}(t)){var r=t.XE(!1);a.push(new Ny(l[i],l[i+1],r))}else if(n.length>0){var e=t.XE(!1);n.forEach(function(t){return e.tP(t.NU)}),a.push(new Ny(l[i],l[i+1],e))}},u=i,o=n,h=[],a=[];if(fg(t)){var c,f;u=null!=(c=Xy(t.sP("begin"),r))?c:u,e=Xy(t.sP("dur"),0),o=null!=(f=Xy(t.sP("end"),r))?f:void 0!==e?u+e:o;for(var v=t.jE,d=0;d1||(h=h.concat(qy(v[d],u,o,r)))}for(var l=function(t,i,n){var r=[];r.push(t,i);for(var e,s=Ft(n);!(e=s()).done;){var u=e.value;r.push(u.EO,u.PO)}r.sort(Un);for(var o=r.length,h=0;hn)break;i<=u.PO&&!Jn(r,u)&&r.push(u)}}function mp(t,i){return Fn(t.jI,i.jI)}function yp(t,i,n,r){var e=function(t){switch(t){case Uw.WEBVTT:return"WebVTT";case Uw.SRT:return"SRT";case Uw.TTML:return"TTML";default:return""}}(t);return new hp(gd.SUBTITLE_PARSE_ERROR,"Could not parse the "+(e?e+" ":"")+"subtitle file.",i,n,r)}function pp(t,i){for(var n,r=[],e=Ft(t.L.II);!(n=e()).done;){var s=n.value;if(s.PO<=i)r.push(s);else if(s.EO>=i)break}for(var u,o=Ft(r);!(u=o()).done;){var h=u.value;t.WU(h)}}function _p(t,i){if(t.V>0)for(var n,r=t.Tn(0),e=A.max(0,r-10),s=Ft(i);!(n=s()).done;){n.value.qU(e)}}var kp=function(t){function i(i){var n;return(n=t.call(this)||this).JU=void 0,n.Z=new rp,n.zU=0,n.GU=function(t){var i=t.Ht;n.XU(i)},n.JU=i,n}Pt(i,t);var n=i.prototype;return n.tt=function(t){t.wn(Mg.pa,this.GU),t.bU=this.bU,this.Z.tt(t),this.XU(t)},n.it=function(t){t.mn(Mg.pa,this.GU),t.Xk=$y.Nh,this.Z.it(t)},n.jU=function(t){},n.QU=function(t){},n.XU=function(t){t.Xk!==$y.Nh?this.jU(t):this.QU(t)},n.KU=function(){for(var t,i=Ft(this.Z.II);!(t=i()).done;){var n=t.value;n.mn(Mg.pa,this.GU),n.kn()}},n.qU=function(t){if(t>0)for(var i,n=Ft(this.Z.II);!(i=n()).done;){pp(i.value,t)}},n.YU=function(t){var i=this.JU;if(t!==i){this.JU=t;for(var n,r=Ft(this.Z.II.slice());!(n=r()).done;){var e=n.value,s=this.ZU(e,i,t);e!==s&&(this.it(e),this.tt(s),e.kn())}}},n.hr=function(){return this.KU(),this.Z.hr(),ot.resolve()},n.kn=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),[4,this.hr()];case 1:return t.sent(),this.Z.kn(),[2]}})}).call(this)},xt(i,[{key:"bU",get:function(){return this.zU},set:function(t){this.zU=t;for(var i,n=Ft(this.Z.II);!(i=n()).done;){i.value.bU=t}}}]),i}(uh);function bp(t,i,n){var r=n.tI(t.Lt,t.o,t.Th,t.bs,t.$U,t.Km,t.tR,t.QI);r.iR=t.iR,r.Ax=t.Ax,r.ZI=t.ZI,r.bU=t.bU;for(var e,s=Ft(t.L.II.slice());!(e=s()).done;){var u=e.value;t.WU(u),r.tV(u)}return r.Xk=t.Xk,i.iV(t),r}V(),It(),Bt(),Nt();var Ap=function(t){function i(i){var n;return(n=t.call(this,Jy.ma)||this).errorObject=void 0,n.errorObject=i,n}return Pt(i,t),i.prototype.xa=function(){return this},xt(i,[{key:"error",get:function(){return this.errorObject.message}}]),i}(Ig),Tp=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).nV=void 0,r.rV=new dr,r.nV=n,r}Pt(i,t);var n=i.prototype;return n.eV=function(t){if(t.src){var i=t.kind||ep.OU,n=this.JU.tI(i,t.id,t.label,t.srclang,t.default);return n.iR=Nl(t.src),this.tt(n),n}},n.sV=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f,v;return zt(this,function(d){switch(d.label){case 0:t.Ax=Fw.LOADING,n=new El({Yu:t.iR,dk:Hd.NT,Uk:kl.GET,Yg:i}),d.label=1;case 1:return d.trys.push([1,4,,5]),[4,this.nV.lk(n)];case 2:return s=d.sent(),e=s.hk,[4,s.UT()];case 3:return r=d.sent(),[3,5];case 4:return pr(u=d.sent()),t.Ax=Fw.ERROR,t.So(new Ap(function(t,i){var n=i,r=0;if(Kl(t)&&t.name===Ol.sE)n=t.lk.Yu;else if(Jl(t)){var e=t.oE;if(n=e.gk,0===(r=e.hk))return new hp(gd.SUBTITLE_CORS_ERROR,"Could not load the subtitle file. Make sure the source is set correctly and that CORS support is enabled.",n,r,t)}return new hp(gd.SUBTITLE_LOAD_ERROR,"Could not load the subtitle file.",n,r,t)}(u,t.iR))),[2];case 5:try{for(o=function(t){return Jm(t)?Uw.WEBVTT:Yy(t)?Uw.TTML:Uw.SRT}(r),t.Km=o,h=[],o===Uw.WEBVTT||o===Uw.SRT?(a=Vm(r),h=a.L):o===Uw.TTML&&(h=Uy(r,t)),c=Ft(h);!(f=c()).done;)v=f.value,t.tV(v)}catch(i){return pr(i),t.Ax=Fw.ERROR,t.So(new Ap(yp(t.Km,t.iR,e,i))),[2]}return t.Ax=Fw.LOADED,[2]}})}).call(this)},n.jU=function(t){Jn(this.Z.II,t)&&t.Ax===Fw.NONE&&this.sV(t,this.rV.Yg).catch(_r)},n.Un=function(){},n.ZU=function(t,i,n){return bp(t,i,n)},n.hr=function(){var i=this;return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:for(this.rV.Zg(),this.rV=new dr,n=Ft(this.Z.II);!(r=n()).done;)e=r.value,this.JU.iV(e);return[4,t.prototype.hr.call(i)];case 1:return s.sent(),[2]}})}).call(this)},i}(kp);function Sp(t){return"TXXX"===t.id||"TXX"===t.id}V(),It(),Wt(),Nt(),Ut(),Yt(),V(),It();var Ep=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).oV=void 0,r.fV=void 0,r.pV=void 0,r.aV=void 0,r.gV=void 0,r.uV=void 0,r._V=void 0,r.oV=n,r.fV=eo(),r.pV=function(t){t.mn(Mg.AI,r.aV),t.Km?t.Km===Uw.ID3&&(t.mn(Mg.hI,r.gV),0!==t.L.V?r.dV(t):t.wn(Mg.hI,r.gV)):t.wn(Mg.AI,r.aV)},r.aV=function(t){r.pV(t.Ht)},r.gV=function(t){r.pV(t.TO.Ht)},r.uV=function(t){var i=t.Ht;if(i.Km===Uw.ID3&&r.fV.has(i.jI)){var n=r.fV.get(i.jI);r.it(n),r.JU.iV(n),i.mn(Mg.AI,r.aV),i.mn(Mg.hI,r.gV),i.mn(Mg.hI,r._V)}},r._V=function(t){Ip(t.TO)&&r.vV(t.TO)},r.hV(),r}Pt(i,t);var n=i.prototype;return n.hV=function(){this.oV.wn(Ng.eI,this.aV),this.oV.wn(Ng.nI,this.uV)},n.cV=function(){this.oV.mn(Ng.eI,this.aV),this.oV.mn(Ng.nI,this.uV)},n.dV=function(t){var i=t.L.II[0];if(Ip(i)){var n=function(t){var i=t.match(Rp);if(!i)return;return{Ht:i[1],bs:i[2]}}(i.U.description),r=n.Ht,e=n.bs;if(!this.lV(r,e)){var s=this.JU.tI(ep.OU,t.o,r,e,!1,Uw.TTML);this.tt(s),this.fV.set(t.jI,s);for(var u,o=Ft(t.L.II);!(u=o()).done;){var h=u.value;Ip(h)&&this.vV(h)}t.wn(Mg.hI,this._V)}}},n.lV=function(t,i){return this.Z.II.some(function(n){return n.Th===t&&n.bs===i})},n.vV=function(t){if(t.Ht)for(var i,n=this.fV.get(t.Ht.jI),r=Ft(Uy(t.U.text,n,{yU:0,AU:1/0,bU:t.EO}));!(i=r()).done;){var e=i.value;n.tV(e)}},n.ZU=function(t,i,n){var r=this,e=bp(t,i,n);return this.fV.forEach(function(i,n){i===t&&r.fV.set(n,e)}),e},n.hr=function(){var i=this;return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:for(n=Ft(this.oV.II);!(r=n()).done;)(e=r.value).mn(Mg.AI,this.aV),e.mn(Mg.hI,this.gV),e.mn(Mg.hI,this._V);for(s=Ft(this.Z.II);!(u=s()).done;)o=u.value,this.JU.iV(o);return this.fV.clear(),[4,t.prototype.hr.call(i)];case 1:return h.sent(),[2]}})}).call(this)},n.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.cV(),[4,t.prototype.kn.call(i)];case 1:return n.sent(),[2]}})}).call(this)},i}(kp);function Ip(t){return function(t){return Sp(t)&&Rp.test(t.description)}(t.U)}var Rp=/^Track:(.+),Lang:(.+)$/;function Cp(t,i){for(var n,r=Ft(t);!(n=r()).done;){var e=n.value;if(e.Lt===i&&e.$U)return e}}function Pp(t,i){Np(Cp(t.II,i))}function Np(t){void 0!==t&&(t.Xk=$y.Kn)}function Dp(t,i){var n=Cp(t.II,i)||function(t,i){for(var n,r=Ft(t);!(n=r()).done;){var e=n.value;if(e.Lt===i)return e}}(t.II,i);Np(n)}function xp(t){for(var i,n=Ft(sp);!(i=n()).done;){var r=i.value;r===ep.Yn?Dp(t,r):Pp(t,r)}}V(),It(),Ut(),V(),It(),Nt();var Bp=function(t){function i(){return t.call(this,ch.Jw)||this}return Pt(i,t),i}(ah);V(),It(),V(),It();var Op=function(t){return t[t.mV=0]="mV",t[t.wV=1]="wV",t}({});V(),It();var Mp=function(t){return t.wM="canplay",t.yM="canplaythrough",t.AM="loadeddata",t.bM="loadedmetadata",t.wI="readystatechange",t.SM="waiting",t.TM="playing",t}({}),Lp=["canplay","canplaythrough","loadeddata","loadedmetadata","readystatechange","waiting","playing"];V(),It(),Bt(),Nt(),V(),It(),Nt();var Fp=function(t){function i(i,n){var r;return(r=t.call(this,Mp.wI)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Pt(i,t),i}(ah);V(),It();var Up=function(t){return t[t.VL=0]="VL",t[t.Qn=1]="Qn",t[t.HL=2]="HL",t[t.WL=3]="WL",t[t.qL=4]="qL",t}({});V(),It(),Nt();var Vp=function(t){function i(i,n){var r;return void 0===n&&(n=Up.Qn),(r=t.call(this,Mp.bM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Pt(i,t),i}(ah);V(),It(),Nt();var jp=function(t){function i(i,n){var r;return void 0===n&&(n=Up.HL),(r=t.call(this,Mp.AM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Pt(i,t),i}(ah);V(),It(),Nt();var Hp=function(t){function i(i){var n;return(n=t.call(this,Mp.SM)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var Wp=function(t){function i(i,n){var r;return void 0===n&&(n=Up.WL),(r=t.call(this,Mp.wM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Pt(i,t),i}(ah);V(),It(),Nt();var zp=function(t){function i(i,n){var r;return void 0===n&&(n=Up.qL),(r=t.call(this,Mp.yM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Pt(i,t),i}(ah);V(),It(),Nt();var qp=function(t){function i(i){var n;return(n=t.call(this,Mp.TM)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah),Xp=[Mp.wI,Mp.TM,ch.uo,ch.jw],Gp=function(t){function i(i,n){var r;return void 0===n&&(n=!1),(r=t.call(this)||this).PV=void 0,r.kV=void 0,r.EV=void 0,r.NV=void 0,r.SV=void 0,r.AV=void 0,r.FV=void 0,r.LV=void 0,r.OV=void 0,r.MV=void 0,r.PV=i,r.kV=n,r.EV=Up.VL,r.NV=!0,r.SV=!1,r.AV=!1,r.FV=function(t){var i=r.PV.MP,n=r.PV.Ax;n!==r.EV&&r.So(new Fp(i,n)),n===Up.VL&&(r.SV=!1,r.AV=!1),r.yV(i,n),r.bV(i,n),r.DV(i,n),r.BV(i,n),r.TV(i,n),r.RV(i,n),r.EV=n},r.LV=function(){var t=r.PV.MP;r.RV(t,r.EV),r.TV(t,r.EV),r.NV=r.PV.hx},r.OV=function(){r.NV=r.PV.hx},r.MV=function(){r.So(new qp(r.PV.MP))},r.PV.wn(Mp.wI,r.FV),r.PV.wn(ch.uo,r.LV),r.PV.wn(ch.jw,r.OV),r.kV&&r.PV.wn(Mp.TM,r.MV),r}Pt(i,t);var n=i.prototype;return n.yV=function(t,i){!this.AV&&i>=Up.Qn&&(this.AV=!0,this.So(new Vp(t,i)))},n.bV=function(t,i){!this.SV&&i>=Up.HL&&(this.SV=!0,this.So(new jp(t,i)))},n.TV=function(t,i){this.kV||(i>=Up.WL&&this.EV=Up.WL)&&this.So(new qp(t))},n.RV=function(t,i){!this.CV(i)||this.PV.UP||this.PV.lt||this.So(new Hp(t))},n.DV=function(t,i){this.EV<=Up.HL&&i>=Up.WL&&this.So(new Wp(t,i))},n.BV=function(t,i){i===Up.qL&&this.So(new zp(t,i))},n.CV=function(t){var i=!this.PV.hx&&t<=Up.HL,n=!this.NV&&this.EV<=Up.HL;return i&&!n},n.hr=function(){this.EV=Up.VL,this.NV=!0,this.SV=!1,this.AV=!1},n.kn=function(){this.Vo(),this.kV&&this.PV.mn(Mp.TM,this.MV),this.PV.mn(ch.uo,this.LV),this.PV.mn(ch.jw,this.OV),this.PV.mn(Mp.wI,this.FV)},xt(i,[{key:"xV",get:function(){return!this.PV.hx&&this.NV}}]),i}(uh);V(),It(),Bt(),Nt();var Qp=function(t){function i(i,n){var r;return(r=t.call(this)||this).oa=void 0,r.TL=void 0,r.oa=i,r.TL=n,r.TL.wn(Xp,r.Rs),r}Pt(i,t);var n=i.prototype;return n.zg=function(){this.Vo(),this.TL.mn(Xp,this.Rs)},n.VV=function(){this.So(new Fp(this.MP,this.Ax))},xt(i,[{key:"MP",get:function(){return this.oa.MP}},{key:"UP",get:function(){return this.oa.UP}},{key:"lt",get:function(){return this.TL.lt}},{key:"hx",get:function(){return this.TL.hx}},{key:"Ax",get:function(){return this.oa.Ax}}]),i}(uh);V(),It(),V(),It();var Yp="titanium",$p="conax",Kp="ezdrm",Jp="irdeto",Zp="vudrm",t_="verimatrix",i_="keyos",n_="drmtoday",r_="expressplay",e_="azure",s_="xstream",u_="vimond",o_="axinom",h_="uplynk",a_="comcast",c_="custom";V(),It(),Wt(),Nt(),Yt(),V(),It(),Wt(),Nt(),Yt(),V(),It(),Wt(),Bt(),Yt();var f_=function(){function t(t,i,n,r,e){this.kS=void 0,this.aH=void 0,this.uH=void 0,this.XV=void 0,this.nV=void 0,this.WV=void 0,this.oH=void 0,this.kS=t,this.aH=i,this.uH=n,this.nV=r,this.oH=e,this.XV=this.cH(i)}var i=t.prototype;return i.HV=function(){return this.WV},i.qV=function(t){this.WV=t},i.jV=function(){return this.XV.licenseAcquisitionURL||this.HV()},i.KV=function(t){return ot.resolve()},i.YV=function(t,i){return ot.resolve(void 0)},i.JV=function(t,i,n,r){return jt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:if(""===(e=this.ZV(t,i,n,r)).Yu)throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");u.label=1;case 1:return u.trys.push([1,4,,6]),[4,this.SP.lk(e)];case 2:return[4,u.sent().VT(i)];case 3:return[2,u.sent()];case 4:return pr(s=u.sent()),[4,this.$V(s,e.Yu,r)];case 5:return u.sent(),[2];case 6:return[2]}})}).call(this)},i.ZV=function(t,i,n,r){var e=this.tH().MT(),s=this.zk,u={Yu:this.iH(),dk:i,fk:e,zT:t,zk:s,Uk:kl.POST,Vk:0,Yg:r,Km:bl.bk,Wk:n};return new El(u)},i.eH=function(t,i){return ot.resolve(t)},i.sH=function(t,i,n,r){return ot.resolve(t)},i.tH=function(){return new Wd(this.XV.headers||{})},i.$V=function(t,i,n){return jt(function(){return zt(this,function(i){throw new vw(gd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during license server request",t)})})()},i.iH=function(t,i){var n=i,r=this.XV.queryParameters;if(!n){var e=this.jV();if(!e)return"";n=e}if(r||t){var s=Vi.Dh(n);t&&Pl(s,t),r&&Pl(s,r),n=s.href}return n},i.nH=function(t,i){return v_(t)},i.rH=function(t){return new I(t)},i.hH=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return[4,this.nH(t,n)];case 1:return r=s.sent(),[4,this.JV(r,this.oH,i,n)];case 2:return e=s.sent(),[2,this.rH(e)]}})}).call(this)},i.kn=function(){},xt(t,[{key:"SP",get:function(){return this.nV}},{key:"zV",get:function(){return!1}},{key:"GV",get:function(){var t=this.XV.certificate;if(t)return qi(t)?Th(t):Ea(t)}},{key:"QV",get:function(){return!1}},{key:"zk",get:function(){return Boolean(this.XV.useCredentials)}}]),t}();function v_(t){return ot.resolve(Ra(t).buffer)}var d_,l_=function(t){function i(i,n,r,e){return t.call(this,Bo,i,n,r,e)||this}Pt(i,t);var n=i.prototype;return n.cH=function(t){return t.widevine||{}},n.dH=function(t,i){return jt(function(){return zt(this,function(n){return this.GV?[2,this.GV]:[2,this.lH(new I(t),i)]})}).call(this)},n.lH=function(i,n){return t.prototype.hH.call(this,i,Al.Pk,n)},i}(f_);function g_(t,i){if(null==t)return{};var n,r,e={},s=b.keys(t);for(r=0;r=0||(e[n]=t[n]);return e}function w_(t){return Fi(t.token&&t.deviceId)}function m_(t){var i,n=null==(i=t.fairplay)?void 0:i.headers;return void 0!==n&&Fi(n.PreAuthorization)}function y_(t){var i=t;return w_(i)&&""!==i.token&&""!==i.deviceId&&!m_(i)}V(),It(),V(),It(),Wt(),V(),It(),Ut(),Yt(),V(),It(),V(),It(),Ut(),V(),It(),function(t){t.mR=!1,t.wR=!1,t.yR=!1,t.AR=!1,t.LOG_ADS_DETAILS=!1,t.LOG_CHROMECAST_DETAILS=!1,t.LOG_CUSTOM_DRM=!1,t.LOG_BUFFERING_VIDEO_MAIN=!1,t.LOG_BUFFERING_VIDEO_SELECTION=!1,t.LOG_BUFFERING_AUDIO_MAIN=!1,t.LOG_BUFFERING_AUDIO_SELECTION=!1,t.bR=!1,t.SR=!1,t.LOG_LCEVC_DETAILS=!1}(d_||(d_={})),V(),It(),Bt();var p_=function(){function t(t,i,n){this.ER=void 0,this.mS=void 0,this.xR=void 0,this.ER=t,this.mS=i,this.xR=n}return t.prototype.PR=function(t){return function(t){var i=t.onCertificateRequest;if(void 0!==i&&"function"!=typeof i)throw new _("ContentProtectionIntegration.onCertificateRequest is not a function.");var n=t.onCertificateResponse;if(void 0!==n&&"function"!=typeof n)throw new _("ContentProtectionIntegration.onCertificateResponse is not a function.");var r=t.onLicenseRequest;if(void 0!==r&&"function"!=typeof r)throw new _("ContentProtectionIntegration.onLicenseRequest is not a function.");var e=t.onLicenseResponse;if(void 0!==e&&"function"!=typeof e)throw new _("ContentProtectionIntegration.onLicenseResponse is not a function.");var s=t.extractFairplayContentId;if(void 0!==s&&"function"!=typeof s)throw new _("ContentProtectionIntegration.extractFairplayContentId is not a function.");return t}(this.xR.build(t))},xt(t,[{key:"kR",get:function(){return this.ER}},{key:"kS",get:function(){return this.mS}}]),t}();V(),It();var __=function(t){return t.FAILED="FAILED",t.OVERRIDDEN="OVERRIDDEN",t.SUCCEEDED="SUCCEEDED",t}({}),k_=function(){function t(){this.RR=[]}var i=t.prototype;return i.registerContentProtectionIntegration=function(t,i,n){switch(this.IR(t,i,n)){case __.FAILED:throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The keySystem should be 'widevine', 'playready' or 'fairplay', but was "+i+".");case __.OVERRIDDEN:var r=F_(i);Vi.um("Warning: Overwriting an earlier registered integration for "+t+" and "+r+".");break;case __.SUCCEEDED:F_(i);0}},i.IR=function(t,i,n){var r=F_(i);if(!r)return __.FAILED;for(var e,s=__.SUCCEEDED,u=Ft(this.RR.slice());!(e=u()).done;){var o=e.value;o.kR===t&&o.kS===r&&(s=__.OVERRIDDEN,Yn(this.RR,o))}return this.RR.push(new p_(t,r,n)),s},i.DR=function(t,i){return void 0!==this.NR(t,i)},i.MR=function(t,i,n){var r=this.NR(t,i);if(!r)throw p("No ContentProtectionIntegrationInit was found for integration id "+t+" and key system "+i);return r.PR(n)},i.NR=function(t,i){for(var n,r=Ft(this.RR);!(n=r()).done;){var e=n.value;if(e.kR===t&&(!i||e.kS===i))return e}},t}();k_.LR=new k_;var b_={playready:"https://pr-keyos.licensekeyserver.com/core/rightsmanager.asmx",widevine:"https://wv-keyos.licensekeyserver.com/",fairplay:"https://fp-keyos.licensekeyserver.com/getkey"};function A_(t){if(!t)return!0;var i=t.licenseAcquisitionURL,n=t.certificateURL,r=t.keys,e=t.headers,s=t.useCredentials,u=t.queryParameters;return!(i||n||r||e||s||u)}function T_(t){return t&&void 0!==t.licenseAcquisitionURL}var S_=T_,E_=T_;function I_(t){if(!t)return!0;if(N_(t))return!1;var i=t.fairplay,n=t.playready,r=t.widevine,e=t.clearkey,s=t.aes128;return A_(i)&&A_(n)&&A_(r)&&void 0===e&&A_(s)}function R_(t){var i=y_(t),n=function(t){var i,n=t;return m_(n)&&""!==(null==(i=n.fairplay)?void 0:i.headers.PreAuthorization)&&!w_(n)}(t);return(!i||!n)&&(i||n)}function C_(t){return t.integration===Jp}function P_(t){var i=t;if(!i)return!1;if(I_(i))return!1;var n=i.fairplay,r=i.playready,e=i.widevine,s=i.clearkey;if(N_(t))return!0;if(n&&!function(t){var i=t;return i&&(void 0!==i.certificateURL||void 0!==i.certificate)}(n))return!1;if(r&&!S_(r))return!1;if(e&&!E_(e))return!1;if(s&&!function(t){return void 0!==t}(s))return!1;if(i.integration){if(k_.LR.DR(i.integration))return!0;switch(i.integration){case Yp:if(!function(t){var i=t,n=i.integration===Yp;return n&&(D_(t)||x_(t))}(t))return!1;break;case Zp:if(!B_(t))return!1;break;case t_:if(!function(t){var i=t;return i.integration===t_}(t))return!1;break;case Jp:if(!C_(t))return!1;break;case $p:if(!R_(t))return!1;break;case Kp:if(!function(t){var i=t;return i.integration===Kp}(t))return!1;break;case i_:if(!N_(t))return!1;break;case n_:if(!function(t){var i=t;return i.integration===n_&&(void 0!==i.token||function(t){return void 0!==t.merchant&&void 0!==t.sessionId&&void 0!==t.userId}(i))}(t))return!1;break;case r_:if(!function(t){var i=t;return i.integration===r_}(t))return!1;break;case s_:if(!O_(t))return!1;break;case u_:if(!function(t){return t.integration===u_}(t))return!1;break;case o_:if(!M_(t))return!1;break;case e_:if(!function(t){var i=t;return i.integration===e_&&void 0!==i.token}(t))return!1;break;case h_:if(!function(t){var i=t;return i.integration===h_}(t))return!1;break;case a_:if(!function(t){var i=t;return i&&Fi(i.releasePid)&&Fi(i.accountId)&&Fi(i.token)}(t))return!1;break;case c_:return!0;default:return!1}}return!0}function N_(t){return t.integration===i_}function D_(t){return void 0!==t.authToken}function x_(t){var i=t;return void 0!==i.accountName&&void 0!==i.customerName&&void 0!==i.portalId}function B_(t){var i=t;return i.integration===Zp&&void 0!==i.token}function O_(t){var i=t;return i&&i.integration===s_&&qi(i.ticketAcquisitionURL)&&qi(i.streamId)}function M_(t){var i=t;return i.integration===o_&&void 0!==i.token}function L_(t,i){var n,r,e,s=i[t],u=null!=(n=null==s?void 0:s.licenseAcquisitionURL)?n:b_[t],o=null!=(r=null==s?void 0:s.customdata)?r:i.customdata,h=o?{customData:o}:{},a=io({},null!=(e=null==s?void 0:s.headers)?e:{},h),c=null!=s?s:{};c.customdata;return io({},g_(c,["customdata"]),{licenseAcquisitionURL:u,headers:a})}function F_(t){switch(t.toLowerCase()){case"widevine":case ko:return ko;case"playready":case yo:return yo;case"fairplay":case Co:return Co}}function U_(t,i){switch(t){case vo:return function(t){for(var i,n={},r=Ft(Ry.xD(new DataView(t)));!(i=r()).done;){var e=i.value;n[e.rM]=e.aM}return n}(i);case lo:case go:return function(t){var i;return i={},i[Ro]=t,i}(i);case wo:return function(t){var i;return i={},i[Eo]=t,i}(i);default:throw new md(gd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Unsupported initDataType "+t)}}function V_(t,i){return void 0===i&&(i=!1),jt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return(n=t.widevine)?[4,Vi.Am()]:[3,2];case 1:n=u.sent(),u.label=2;case 2:return n?[2,!0]:(r=t.playready)?[4,Vi.ym()]:[3,4];case 3:r=u.sent(),u.label=4;case 4:return r?[2,!0]:(e=t.clearkey)?[4,Vi.pm()]:[3,6];case 5:e=u.sent(),u.label=6;case 6:return e?[2,!0]:(s=!i&&t.fairplay)?[4,Vi.wm()]:[3,8];case 7:s=u.sent(),u.label=8;case 8:return s?[2,!0]:[2,!1]}})})()}var j_=function(t){return t.zm="Widevine",t.fH="PlayreadyV2",t.vH="PlayreadyV3",t.qm="PlayreadyV2",t.jm="Fairplay",t}({}),H_={Widevine:{DRMProvider:"Google",DRMVersion:"1.4.8.86",DRMType:"Widevine"},PlayreadyV2:{DRMProvider:"Microsoft",DRMVersion:"2.9",DRMType:"Playready"},PlayreadyV3:{DRMProvider:"Microsoft",DRMVersion:"3",DRMType:"Playready"},Fairplay:{DRMProvider:"Apple",DRMType:"FairPlay",DRMVersion:"1.0"}};function W_(t,i){var n,r,e,s,u=H_[i],o=t.accountName;return{CustomerName:t.customerName,AccountName:o,PortalId:t.portalId,FriendlyName:t.friendlyName,DeviceInfo:{FormatVersion:"1",DeviceType:"PC",OSType:null==(n=Vi.Em)?void 0:n.Zs,OSVersion:null==(r=Vi.Em)?void 0:r.Lm,DRMProvider:u.DRMProvider,DRMVersion:u.DRMVersion,DRMType:u.DRMType,DeviceVendor:null==(e=Vi.Em)?void 0:e.Om,DeviceModel:null==(s=Vi.Em)?void 0:s.Fm}}}function z_(t,i){if(!t.accountName)throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, accountName is not set.");if(!t.customerName)throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, customerName is not set.");if(!t.portalId)throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, portalId is not set.");throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration.")}function q_(t,i,n){var r;if(D_(t))r={AuthToken:t.authToken,Payload:i};else{if(!x_(t))throw z_(t,n);r={LatensRegistration:W_(t,n),Payload:i}}return Wa(JSON.stringify(r))}function X_(t,i,n){return jt(function(){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(!(r=t.oE))throw new vw(gd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium server request",t,i);e=r,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,e.FT(n)];case 2:return s=o.sent(),u=function(t){if(t){if(t.WvProxyErr)return t.WvProxyErr.desc;if(t.DrmErr)return t.DrmErr.desc}return}(s),[3,4];case 3:return o.sent(),u="",[3,4];case 4:throw new vw(gd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium server request",t,e.lk.Yu,e.hk,e.vk,u)}})})()}V(),It(),Wt(),Yt();var G_=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,Hd.DT)||this).gH=void 0,e}Pt(i,t);var n=i.prototype;return n.$V=function(t,i,n){return X_(t,i,n)},n.KV=function(t){return this.gH?kr(this.gH.Qy,t):(this.gH=new Xa,ot.resolve())},n.nH=function(t,i){return jt(function(){var i,n;return zt(this,function(r){if(!(i=this.aH))throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium Widevine DRM configuration.");return n=Ih(t),[2,q_(i,n,j_.zm)]})}).call(this)},n.rH=function(t){if(!t.license)throw new vw(gd.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Titanium Widevine license server");return Th(t.license)},n.pH=function(t){return ot.resolve(new I(t))},n.dH=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return this.mH(),[4,this.nH(t,i)];case 1:return n=e.sent(),[4,this.JV(n,Hd.CT,Al.xk,i)];case 2:return r=e.sent(),[4,this.pH(r)];case 3:return[2,e.sent()]}})}).call(this)},n.lH=function(i,n){var r=this;return jt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,t.prototype.lH.call(r,i,n)];case 1:return e=s.sent(),this.mH(),[2,e]}})}).call(this)},n.mH=function(){this.gH||(this.gH=new Xa),this.gH.Xy()},n.kn=function(){this.gH&&this.gH.Zg(),t.prototype.kn.call(this)},i._H=function(){return Vi.Zs.yp?"required":"optional"},i}(l_);V(),It(),Wt(),Bt(),Nt(),Yt();var Q_=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,Hd.CT)||this).qV("https://widevine-proxy.drm.technology/proxy"),e}return Pt(i,t),i.prototype.nH=function(t,i){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return[4,v_(t)];case 1:if(i=s.sent(),n=this.uH,r=Ca(new I(i)),void 0===(e=this.wH))throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The Widevine vuDRM token has not been correctly configured.");return[2,JSON.stringify({token:e,drm_info:r,kid:n})]}})}).call(this)},xt(i,[{key:"wH",get:function(){if(B_(this.aH))return this.aH.token}}]),i}(l_);function Y_(t,i){var n=i||{};return t.ticket&&t.sessionId&&(n=io({},n,{SessionId:t.sessionId,Ticket:t.ticket})),io({},n,{CrmId:t.crmId,AccountId:t.accountId,ContentId:t.contentId})}V(),It(),Nt(),V(),It();var $_=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,Hd.CT)||this).qV("https://emeademo.dev.ott.irdeto.com/Widevine/getlicense"),e}return Pt(i,t),i.prototype.iH=function(i,n){var r=i;return C_(this.aH)&&(r=Y_(this.aH,r)),t.prototype.iH.call(this,r,n)},i}(l_);V(),It(),Nt(),V(),It();var K_="Conax-Custom-Data";function J_(t,i,n){var r=t&&R_(t)&&t;if(r&&!n.has(K_)){var e=y_(r)?r.token:void 0,s=y_(r)?r.deviceId:void 0,u=JSON.stringify({Version:"1.0.0",CxAuthenticationDataToken:e,CxClientInfo:{DeviceType:"Browser",DrmClientType:i+"-HTML5",DrmClientVersion:"1.0.0",CxDeviceId:s}});n.set(K_,u)}return n}var Z_=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,Hd.CT)||this).qV("https://connect.conax.com:8094/license"),e}return Pt(i,t),i.prototype.tH=function(){var i=t.prototype.tH.call(this);return J_(this.aH,"Widevine",i)},i}(l_);function tk(t){var i=va(new I(t));return Th(JSON.parse(i).license)}function ik(t){return"string"==typeof t.token?t.token:Wa(JSON.stringify({userId:t.userId,sessionId:t.sessionId,merchant:t.merchant}))}function nk(t,i,n){var r;return r=n.token?"x-dt-auth-token":"dt-custom-data",t.set(r,i),t}V(),It(),Bt(),Nt(),V(),It();var rk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,Hd.CT)||this).qV("https://lic.drmtoday.com/license-proxy-widevine/cenc/"),e}Pt(i,t);var n=i.prototype;return n.rH=function(t){return tk(t)},n.tH=function(){return nk(t.prototype.tH.call(this),this.wH,this.aH)},xt(i,[{key:"wH",get:function(){return ik(this.aH)}}]),i}(l_);V(),It(),Nt();var ek=function(t){function i(i,n,r){return t.call(this,i,n,r,Hd.CT)||this}return Pt(i,t),i.prototype.tH=function(){var i=t.prototype.tH.call(this),n=this.aH.token;return i.set("Authorization","Bearer "+n),i},i}(l_);function sk(t,i,n,r){return jt(function(){var e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:if(!O_(t))throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Xstream DRM Configuration");return(e=new Wd).append("Cache-Control","no-cache"),e.append("Content-Type","application/json"),(s=t.sessionId)&&e.append("XSSESSION",s),u=t.streamId,o=t.fairplay?"persistent"===t.fairplay.licenseType?"persistent":"non-persistent":t.widevine&&"persistent"===t.widevine.licenseType?"persistent":"non-persistent",h={drmType:i,licenseType:o,streamId:u},a={Yu:t.ticketAcquisitionURL,dk:Hd.DT,fk:e,Uk:kl.POST,zT:JSON.stringify(h),Yg:r},[4,n.lk(a)];case 1:return[4,c.sent().FT()];case 2:return[2,c.sent()]}})})()}V(),It(),Wt(),Nt(),Yt(),V(),It(),Wt(),Yt();var uk=function(t){function i(i,n,r){return t.call(this,i,n,r,Hd.DT)||this}Pt(i,t);var n=i.prototype;return n.tH=function(){var i=t.prototype.tH.call(this);return i.set("Content-Type","application/json"),i},n.nH=function(i,n){var r=this;return jt(function(){var e,s,u;return zt(this,function(o){switch(o.label){case 0:return e=Ha(i.buffer),[4,sk(this.aH,"widevine_modular",this.SP,n)];case 1:return s=o.sent(),this.qV(s.licenseServerUrl),u=da(JSON.stringify({payload:e,ticket:s.ticket})),[2,t.prototype.nH.call(r,u,n)]}})}).call(this)},n.rH=function(t){return Th(t.license)},i}(l_);V(),It(),Nt();var ok=function(t){function i(i,n,r){return t.call(this,i,n,r,Hd.CT)||this}return Pt(i,t),i.prototype.tH=function(){if(!M_(this.aH))throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");var i=t.prototype.tH.call(this);return i.set("X-AxDRM-Message",this.aH.token),i},i}(l_);function hk(t){for(var i=new I(2*t.length),n=0;n=1&&t[0].jE.length>0},n.YV=function(i){var n=this.aH.playready.customData;if(n){var r=hk(n),e=hk(''+Ih(r)+"");return ot.resolve({playready:{qS:e}})}return t.prototype.YV.call(this,i)},n.nH=function(t,i){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,v_(t)];case 1:return i=n.sent(),[2,this.bH(i)]}})}).call(this)},n.bH=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a,c,f,v,d,l,g,w,m;return zt(this,function(y){r=null,e=new DataView(t),s=aa(e,new Pa,!0);try{u=Vi.UE(s)}catch(t){return[2,r]}for(o=null==(i=u.YE("PlayReadyKeyMessage")[0])?void 0:i.YE("LicenseAcquisition")[0],a=null!=(h=null==o?void 0:o.YE("Challenge"))?h:[],this.AH(a)&&(r=ja(a[0].eP)),c=new Wd,v=null!=(f=null==o||null==(n=o.YE("HttpHeaders")[0])?void 0:n.YE("HttpHeader"))?f:[],d=Ft(v);!(l=d()).done;)g=l.value,w=g.YE("name")[0].eP,m=g.YE("value")[0].eP,c.append(w,m);return this.yH=c,[2,r]})}).call(this)},n.dH=function(t,i){return ot.resolve(t)},n.lH=function(i,n){return t.prototype.hH.call(this,i,Al.Ik,n)},i}(f_);V(),It(),Wt(),Nt(),Yt(),V(),It(),Bt();var ck=function(){function t(i){this.kH=void 0,this.zb=void 0,this.kH=i,this.zb=t.SH(i)}return t.prototype.TH=function(){var t={};if(this.zb===j_.vH){var i={LatensRegistration:W_(this.kH,j_.vH)};t["X-TITANIUM-DRM-CDATA"]=Wa(JSON.stringify(i))}return t},t.SH=function(t){return"3"===t.version?j_.vH:j_.fH},xt(t,[{key:"EH",get:function(){return this.zb}},{key:"MS",get:function(){return this.zb===j_.fH}}]),t}();var fk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).PH=void 0,e.PH=new ck(e.aH),e}Pt(i,t);var n=i.prototype;return n.YV=function(t){var i=this.aH;if(!this.aH)throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium PlayReady DRM configuration.");if(x_(i)){var n={};return n.playready={qS:vk(i,this.PH.EH)},ot.resolve(n)}return ot.reject(z_(i,j_.qm))},n.tH=function(){var i=new Wd(this.PH.TH());return i.OT(t.prototype.tH.call(this)),i},n.$V=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:if(!(r=t.oE))throw new vw(gd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium PlayReady license request",t,i);f.label=1;case 1:return f.trys.push([1,3,,4]),[4,r.HT(n)];case 2:return u=f.sent(),o=va(new I(u)),(h=Vi.UE(o))&&(a=function(t,i){return function(t,i){for(var n=t.m.slice(),r=[];n.length>0;){var e,s=n.shift();i(s)?r.push(s):(e=n).push.apply(e,[].concat(s.m))}return r}(t,function(t){return t.JE===i})}(h,"CustomData"),a.length>0&&(e=JSON.parse(a[0].eP),s=null==(c=e.DrmErr)?void 0:c.desc)),[3,4];case 3:return f.sent(),[3,4];case 4:throw new vw(gd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium PlayReady license request",t,i,r.hk,r.vk,s)}})})()},n.AH=function(t){if(1!==t.length)throw new vw(gd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"PlayReady license message incorrectly formatted, Challenge not found.");return!0},i}(ak);function vk(t,i){var n=W_(t,i),r=n.DeviceInfo.FormatVersion,e=function(t){return t.replace(/</g,"<").replace(/>/g,">")}(function(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}(""+Wa(''+n.AccountName+""+n.CustomerName+""+n.PortalId+''+n.DeviceInfo.DeviceType+""+n.DeviceInfo.OSType+""+n.DeviceInfo.OSVersion+""+n.DeviceInfo.DRMProvider+""+n.DeviceInfo.DRMVersion+""+n.DeviceInfo.DRMType+""+n.DeviceInfo.DeviceVendor+""+n.DeviceInfo.DeviceModel+"")+"")),s=ga(e,!0);return ga(''+Ih(s)+"",!0)}V(),It(),Bt(),Nt();var dk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).qV("https://playready-license.drm.technology/rightsmanager.asmx"),e}Pt(i,t);var n=i.prototype;return n.AH=function(t){if(1!==t.length)throw new vw(gd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Vudrm PlayReady license message incorrectly formatted, Challenge not found.");return!0},n.iH=function(i,n){var r=io({},i||{},{token:this.wH});return t.prototype.iH.call(this,r,n)},xt(i,[{key:"wH",get:function(){if(B_(this.aH))return this.aH.token}}]),i}(ak);V(),It(),Nt();var lk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).qV("https://emeademo.dev.ott.irdeto.com/playready/rightsmanager.asmx"),e}return Pt(i,t),i.prototype.iH=function(i,n){var r=i;return C_(this.aH)&&(r=Y_(this.aH,r)),t.prototype.iH.call(this,r,n)},i}(ak);V(),It(),Nt();var gk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).qV("https://connect.conax.com:8010/cxplayready/rightsmanager.asmx"),e}return Pt(i,t),i.prototype.tH=function(){var i=t.prototype.tH.call(this);return J_(this.aH,"PlayReady",i)},i}(ak);V(),It(),Bt(),Nt();var wk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).qV("https://lic.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx"),e}Pt(i,t);var n=i.prototype;return n.rH=function(i){var n=function(t){var i=va(new I(t));return zo(i,"=0)return ot.resolve(t.substr(i+1));var n=t.split("skd://").pop();if(n){if(/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/.test(n))return ot.resolve(n)}var r=t.split("/");return ot.resolve(r[r.length-1])},n.YV=function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return n=null!=(i=this.FH)?i:ya(new I(t)),[4,this.OH(n)];case 1:return r=s.sent(),this.MH=r,(e={}).fairplay={ZS:r},[2,e]}})}).call(this)},n.tH=function(){var i=t.prototype.tH.call(this);return i.set("Content-Type",this.LH),i},n.dH=function(t,i){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.GV?[2,this.GV]:[4,this.UH(i)];case 1:return[2,t.sent()]}})}).call(this)},n.lH=function(i,n){return t.prototype.hH.call(this,i,Al.Tk,n)},n.VH=function(t){var i=this.CH(),n=this.tH(),r={Yu:i,dk:Hd.CT,fk:n,Uk:kl.GET,zk:!1,zT:null,Vk:0,Yg:t,Km:bl.bk,Wk:Al.Ek};return new El(r)},n.UH=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=this.VH(t),[4,this.SP.lk(i)];case 1:return[4,r.sent().HT()];case 2:return n=r.sent(),[2,new I(n)]}})}).call(this)},n.rH=function(t){var i;if("string"==typeof t){var n=t.trim();""===n.substr(0,5)&&""===n.substr(-6)&&(n=n.slice(5,-6)),i=Th(n)}else i=new I(t);return i},n.iH=function(i,n){var r=t.prototype.iH.call(this,i,n);return zo(r,"skd:")&&(r=r.substr(4)),r},xt(i,[{key:"QV",get:function(){return!0}},{key:"LH",get:function(){return pk.IH}}]),i}(f_);V(),It(),Wt(),Bt(),Nt(),Yt();var kk=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,Hd.CT)||this}Pt(i,t);var n=i.prototype;return n.OH=function(i){var n=i.split("://",1);return"skd"!==n[0].slice(-3).toLowerCase()?ot.resolve(""):(n=i.split(";",2)).length>1?ot.resolve(n[1]):ot.resolve(t.prototype.OH.call(this,i))},n.nH=function(t){return jt(function(){return zt(this,function(i){return[2,t]})})()},n.rH=function(t){return new I(t)},n.iH=function(i,n){var r=i||{};return r.p1=le(),t.prototype.iH.call(this,r,n)},xt(i,[{key:"LH",get:function(){return pk.RH}}]),i}(_k);V(),It(),Bt(),Nt();var bk=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,Hd.CT)||this).qV("https://fairplay-license.drm.technology/license"),s.BH("https://fairplay-license.drm.technology/certificate"),s}Pt(i,t);var n=i.prototype;return n.NH=function(t,i){var n={token:this.wH,contentId:i,payload:Ih(t)};return JSON.stringify(n)},n.rH=function(t){return new I(t)},n.tH=function(){var i=t.prototype.tH.call(this);return i.set("x-vudrm-token",this.wH),i},xt(i,[{key:"LH",get:function(){return pk.DT}},{key:"wH",get:function(){if(!B_(this.aH))throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Token is required for FairPlay VuDrm.");return this.aH.token}}]),i}(_k);V(),It(),Nt();var Ak="Verimatrix Fairplay license response incorrectly formatted. Invalid json.",Tk="Verimatrix Fairplay license response incorrectly formatted. Ckc not found.",Sk=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,Hd.CT)||this}return Pt(i,t),i.prototype.rH=function(i){var n=function(t){var i;try{i=JSON.parse(t).ckc}catch(t){throw new vw(gd.CONTENT_PROTECTION_LICENSE_INVALID,Ak)}if(!i)throw new vw(gd.CONTENT_PROTECTION_LICENSE_ERROR,Tk);return i}(va(new DataView(i)));return t.prototype.rH.call(this,n)},i}(_k);V(),It(),Wt(),Bt(),Nt(),Yt();var Ek=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,Hd.DT)||this}Pt(i,t);var n=i.prototype;return n.nH=function(t){return jt(function(){var i,n;return zt(this,function(r){if(!(i=this.aH))throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium Fairplay DRM configuration.");return n=Ih(t),[2,q_(i,n,j_.jm)]})}).call(this)},n.rH=function(t){try{var i;if(qi(t)){var n=t.trim();i=JSON.parse(n)}else i=t;if(i.license){var r=ja(i.license);return new I(r)}throw new vw(gd.CONTENT_PROTECTION_LICENSE_ERROR,"No license received from the Titanium Fairplay license server")}catch(t){throw new vw(gd.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Titanium Fairplay license server")}},n.$V=function(t,i,n){return X_(t,i,n)},xt(i,[{key:"LH",get:function(){return pk.DT}}]),i}(_k);V(),It(),Wt(),Bt(),Nt(),Yt();var Ik=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,Hd.CT)||this).qV("https://emeademo.dev.ott.irdeto.com/streaming/getckc"),s.BH("https://emeademo.dev.ott.irdeto.com/streaming/getcertificate"),s}Pt(i,t);var n=i.prototype;return n.CH=function(){var i=t.prototype.CH.call(this);if(!i)return i;var n=Vi.Dh(i),r=this.aH;return C_(r)&&Pl(n,{accountId:r.accountId,applicationId:r.applicationId||""}),n.href},n.OH=function(i){return C_(this.aH)?ot.resolve(this.aH.contentId):t.prototype.OH.call(this,i)},n.nH=function(t){return jt(function(){return zt(this,function(i){return[2,t]})})()},n.rH=function(t){return new I(t)},n.iH=function(i,n){var r=i;return C_(this.aH)&&(r=function(t,i){return io({},Y_(t,i),{KeyId:t.keyId})}(this.aH,r)),t.prototype.iH.call(this,r,n)},xt(i,[{key:"LH",get:function(){return pk.RH}}]),i}(_k);V(),It(),Wt(),Nt(),Yt();var Rk=function(t){function i(i,n,r,e){var s;if(s=t.call(this,i,n,r,e,Hd.NT)||this,!R_(n))throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Conax configuration");return s.qV("https://connect.conax.com:8097/license"),s}Pt(i,t);var n=i.prototype;return n.tH=function(){var i=t.prototype.tH.call(this);return J_(this.aH,"FairPlay",i)},n.UH=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return i=this.CH(),n={Yu:i,dk:Hd.CT,fk:{},Uk:kl.GET,zk:!1,zT:null,Vk:0,Yg:t,Km:bl.bk,Wk:Al.Ek},[4,this.SP.lk(n)];case 1:return[4,e.sent().HT()];case 2:return r=e.sent(),[2,new I(r)]}})}).call(this)},n.nH=function(t){return jt(function(){return zt(this,function(i){return[2,t]})})()},n.OH=function(t){var i,n=t.indexOf("?");return 0===t.indexOf("skd://")?(i=n>=0?t.substring(6,n):t.substring(6),ot.resolve(function(t){return va(Th(t))}(i))):ot.resolve("unknown")},n.rH=function(t){try{var i=JSON.parse(t);return new I(ja(i.CkcMessage))}catch(t){throw new p("CFLRW-66")}},i}(_k);V(),It(),Nt();var Ck=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,Hd.NT)||this).qV(b_[Do.jm]),s}Pt(i,t);var n=i.prototype;return n.OH=function(t){return zo(t,"skd://")?ot.resolve(t.substring(6,40)):ot.reject(new vw(gd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Error while determining the KeyOS Content ID."))},n.NH=function(t,i){return"spc="+Ih(t)+"&assetId="+i},i}(_k);V(),It(),Bt(),Nt();var Pk=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,Hd.NT)||this).qV("https://lic.drmtoday.com/license-server-fairplay/"),s}Pt(i,t);var n=i.prototype;return n.NH=function(t,i){var n="spc="+encodeURIComponent(Ih(t))+"&"+encodeURI(i);return"persistent"===this.XV.licenseType?n+"&offline=true":n},n.tH=function(){return nk(t.prototype.tH.call(this),this.wH,this.aH)},xt(i,[{key:"wH",get:function(){return ik(this.aH)}}]),i}(_k);V(),It(),Wt(),Bt(),Nt(),Yt();var Nk=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,Hd.CT)||this}Pt(i,t);var n=i.prototype;return n.OH=function(t){var i=t;return zo(i,"skd:")&&(i="http:"+i.substring(4)),zo(i,"http:")||zo(i,"https:")?ot.resolve(Vi.Dh(i).hostname):ot.reject(new p("Could not parse ExpressPlay FairPlay content ID."))},n.nH=function(t){return jt(function(){return zt(this,function(i){return[2,t]})})()},n.rH=function(t){return new I(t)},xt(i,[{key:"LH",get:function(){return pk.RH}}]),i}(_k);V(),It(),Nt();var Dk=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,Hd.NT)||this}return Pt(i,t),i.prototype.tH=function(){var i=t.prototype.tH.call(this),n=this.aH.token;return i.set("Authorization","Bearer "+n),i},i}(_k);V(),It(),Wt(),Bt(),Nt(),Yt();var xk=function(t){function i(i,n,r,e){var s;if(s=t.call(this,i,n,r,e,Hd.DT)||this,!O_(n))throw new p("Invalid Xstream DRM configuration");return s}Pt(i,t);var n=i.prototype;return n.UH=function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return i=this.CH(),n=this.tH(),r={Yu:i,dk:Hd.DT,fk:n,Uk:kl.POST,Yg:t,Km:bl.bk,Wk:Al.Ek},[4,this.SP.lk(r)];case 1:return[4,s.sent().FT()];case 2:return e=s.sent(),[2,new I(Th(e.certificate))]}})}).call(this)},n.lH=function(){return jt(function(t,i,n){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return void 0===n&&(n=Hd.NT),r=Ih(t),[4,sk(this.aH,"fairplay",this.SP,i)];case 1:return e=o.sent(),s=da(JSON.stringify({spc:r,ticket:e.ticket})),u={Yu:this.jV(),dk:Hd.DT,fk:this.tH(),Uk:kl.POST,zT:s,Vk:0,Yg:i,Km:bl.bk,Wk:Al.Tk},[4,this.SP.lk(u)];case 2:return[4,o.sent().FT()];case 3:return[2,Th(o.sent().licence)]}})}).apply(this,arguments)},xt(i,[{key:"LH",get:function(){return pk.DT}}]),i}(_k);V(),It(),Nt();var Bk=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,Hd.NT)||this}Pt(i,t);var n=i.prototype;return n.NH=function(t,i){return Ih(t)},n.rH=function(i){if(0===i.length)throw new vw(gd.CONTENT_PROTECTION_LICENSE_ERROR,"Vimond license request error.");return t.prototype.rH.call(this,i)},n.tH=function(){var i=t.prototype.tH.call(this);return i.set("Content-Type","text/plain"),i},i}(_k);V(),It(),Bt(),Nt();var Ok=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,Hd.CT)||this}Pt(i,t);var n=i.prototype;return n.NH=function(t,i){return t},n.rH=function(t){return new I(t)},n.tH=function(){if(!M_(this.aH))throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");var i=t.prototype.tH.call(this);return i.set("X-AxDRM-Message",this.aH.token),i},xt(i,[{key:"LH",get:function(){return pk.DT}}]),i}(_k);V(),It(),Bt(),Nt();var Mk=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,Hd.DT)||this).WH=void 0,s}Pt(i,t);var n=i.prototype;return n.NH=function(t,i){var n={spc:Ih(t)};return JSON.stringify(n)},n.OH=function(t){var i=Vi.Dh(t);return this.WH=t,i.searchParams.has("b")?ot.resolve(i.searchParams.get("b")):ot.reject(new vw(gd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Error during license server request: Could not extract content id"))},n.iH=function(i,n){var r=this.jV();return!r&&this.WH&&(r=this.WH),r&&(r=r.replace("skd://","https://")),t.prototype.iH.call(this,i,n||r)},n.rH=function(t){try{var i;if((i=qi(t)?JSON.parse(t.trim()):t).ckc)return Th(i.ckc)}catch(t){throw new vw(gd.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Uplynk Fairplay license server")}throw new vw(gd.CONTENT_PROTECTION_LICENSE_ERROR,"No license received from the Uplynk Fairplay license server")},xt(i,[{key:"LH",get:function(){return pk.NT}}]),i}(_k);V(),It(),Wt(),Nt(),Yt(),V(),It(),Wt(),Yt(),V(),It(),Ut();var Lk=function(){function t(t,i){this.zH=void 0,this.XH=void 0,this.zH=t,this.XH=i}var i=t.prototype;return i.qH=function(t){return this.zH(t)},i.GH=function(t,i){throw new _(i+" must be "+this.XH+". (Received: "+t+")")},t}(),Fk=(new Lk(function(t){return!0},"any"),new Lk(Yi,"a number")),Uk=new Lk(qi,"a string"),Vk=new Lk(Xi,"a boolean"),jk=(new Lk(Qi,"a date"),new Lk(Ui,"undefined")),Hk=new Lk(Wi,"an object"),Wk=new Lk(function(t){return null===t},"null");new Lk(function(t){return null==t},"null or undefined");function zk(t,i){throw new _(i+" has an incorrect type")}var qk=function(){function t(t){this.Qp=void 0,this.Qp=t}var i=t.prototype;return i.qH=function(t){if(!Wi(t))return!1;for(var i,n=Ft(b.keys(this.Qp));!(i=n()).done;){var r=i.value;if(!this.Qp[r].qH(t[r]))return!1}return!0},i.GH=function(t,i){if(!Wi(t))throw new _(i+" must be an object.");for(var n,r=Ft(b.keys(this.Qp));!(n=r()).done;){var e=n.value,s=this.Qp[e];if(!s.qH(t[e]))return s.GH(t[e],i+"."+String(e))}throw new _},t}();function Xk(t){return new qk(t)}function Gk(t){return b.keys(t).map(function(i){return t[i]})}var Qk=function(){function t(t){this.jH=void 0,this.jH=t}var i=t.prototype;return i.qH=function(t){return Jn(this.jH,t)},i.GH=function(t,i){return zk(0,i)},t}();function Yk(t){return new Qk(t)}var $k=function(){function t(t){this.QH=void 0,this.QH=t}var i=t.prototype;return i.qH=function(t){return this.QH.some(function(i){return i.qH(t)})},i.GH=function(t,i){return zk(0,i)},t}();function Kk(){for(var t=arguments.length,i=new Array(t),n=0;n36e5},i.cW=function(t){this.dW=t,this.lW()},i.fW=function(){var t;return null!=this.dW||(this.dW=null!=(t=this.uW())?t:Cb),this.dW},t}();Pb.Ng=new Pb,V(),It();var Nb=function(t){return t[t.vW=0]="vW",t[t._W=1]="_W",t[t.gW=2]="gW",t[t.pW=3]="pW",t[t.mW=4]="mW",t[t.wW=5]="wW",t[t.dR=6]="dR",t[t.yW=7]="yW",t[t.AW=8]="AW",t[t._R=9]="_R",t[t.bW=10]="bW",t[t.gR=11]="gR",t[t.TW=12]="TW",t}({});V(),It(),Bt();var Db=function(){function t(){}return t.prototype.PW=function(t){},xt(t,[{key:"kW",get:function(){return 0}},{key:"EW",get:function(){return 0}}]),t}();V(),It(),Nt(),V(),It(),Nt();var xb=function(t){function i(i){var n;return(n=t.call(this,"contentProtectionsTracked")||this).xW=void 0,n.xW=i,n}return Pt(i,t),i}(ah),Bb=function(t){function i(i,n){var r;return void 0===n&&(n=new Eb),(r=t.call(this)||this).nV=void 0,r.RW=void 0,r.kH=void 0,r.nV=i,r.RW=n,r}Pt(i,t);var n=i.prototype;return n.IW=function(t){this.kH=t},n._H=function(t){var i=this.kH;if(void 0!==i)return this.RW._H(t,i)},n.MS=function(t){var i=this.kH;return void 0!==i&&this.RW.MS(t,i)},n.DW=function(t){var i={kS:t.kS,BW:t.BW||[],NW:t.NW,HH:t.HH,MW:t.MW||[]},n=this.RW.$H(i,this.kH||{},t.uH,this.nV);return i.NW&&n.qV(i.NW),new Ob(n)},n.LW=function(t){t&&(Wn(t,function(t){return void 0!==t.uH})&&this.So(new xb(t)))},i}(uh),Ob=function(){function t(t){this.OW=void 0,this.OW=t}var i=t.prototype;return i.KV=function(t){return this.OW.KV(t)},i.YV=function(t,i,n){return this.OW.YV(i,n)},i.QV=function(){return this.OW.QV||void 0!==this.OW.GV},i.dH=function(t,i){return this.OW.dH(t,i)},i.lH=function(t,i,n){return i&&this.OW.qV(i),this.OW.lH(t,n)},i.zg=function(){this.OW.kn()},t}();V(),It(),Nt(),Ut();var Mb=function(t){function i(i){var n;(n=t.call(this)||this).UW=[],n.GW=function(t){n.tt(t.Ht)},n.uV=function(t){var i=t.Ht;n.zW(i)||n.it(i)};for(var r,e=Ft(i);!(r=e()).done;){var s=r.value;n.FW(s)}return n}Pt(i,t);var n=i.prototype;return n.FW=function(t){this.UW.push(t);for(var i,n=Ft(t.II);!(i=n()).done;){var r=i.value;this.tt(r)}this.VW(t)},n.WW=function(t){Yn(this.UW,t),this.qW(t);for(var i,n=Ft(t.II);!(i=n()).done;){var r=i.value;this.zW(r)||this.it(r)}},n.zW=function(t){for(var i,n=Ft(this.UW);!(i=n()).done;){if(i.value.DI(t))return!0}return!1},n.VW=function(t){t.wn(Ng.eI,this.GW),t.wn(Ng.nI,this.uV)},n.qW=function(t){t.mn(Ng.eI,this.GW),t.mn(Ng.nI,this.uV)},n.kn=function(){for(;this.UW.length>0;)this.WW(this.UW[0]);t.prototype.kn.call(this)},n.xa=function(){return np(this)},i}(Lg);V(),It(),Bt(),V(),It();var Lb,Fb={forceSeekOffset:0,maximumOffset:0,maximumPlaybackRate:0,minimumOffset:0,minimumPlaybackRate:0,targetOffset:0},Ub=function(){function t(){this.hu=void 0,this.jW=void 0,this.We=void 0}var i=t.prototype;return i.Ea=function(t){this.jW=t,void 0!==this.We&&(this.jW.Rt=this.We)},i.hr=function(){this.jW=void 0,this.We=void 0},xt(t,[{key:"Ca",get:function(){return null!=this.hu||(this.hu=function(t){return{get enabled(){return t.Rt},set enabled(i){t.Rt=Qg(i)},get monitoringLivePlayback(){return t.XW},get currentLatency(){return t.BL},get currentConfiguration(){return function(t){if(void 0!==t)return{get minimumOffset(){return t.minimumOffset},get maximumOffset(){return t.maximumOffset},get targetOffset(){return t.targetOffset},get forceSeekOffset(){return t.forceSeekOffset},get minimumPlaybackRate(){return t.minimumPlaybackRate},get maximumPlaybackRate(){return t.maximumPlaybackRate}}}(t.Cd)}}}(this)),this.hu}},{key:"Rt",get:function(){var t,i;return null!=(i=this.We)?i:Boolean(null==(t=this.jW)?void 0:t.Rt)},set:function(t){this.We=t,this.jW&&(this.jW.Rt=t)}},{key:"XW",get:function(){var t,i;return null!=(i=null==(t=this.jW)?void 0:t.sL)&&i}},{key:"BL",get:function(){var t;return null==(t=this.jW)?void 0:t.DL}},{key:"Cd",get:function(){return this.jW?this.jW.nL:Fb}}]),t}();var Vb=Boolean(f&&f.TextTrack),jb=function(t){function i(i,n,r,e,s,u,o,h){var a;return void 0===o&&(o=new Eb),void 0===h&&(h=Od()),(a=t.call(this)||this).xq=void 0,a.TL=void 0,a.iq=void 0,a.YL=void 0,a.$L=void 0,a.Gl=void 0,a.yq=void 0,a.Ac=void 0,a.JW=void 0,a.ZW=void 0,a.tq=void 0,a.kq=void 0,a.bq=void 0,a.pq=void 0,a.nV=void 0,a.hw=void 0,a.lq=void 0,a.YW=void 0,a.oq=new Db,a.rq=new Ub,a.Dq=function(t){var i=t.lt,n=i.code,r=new md(pw(n),"Something went wrong during native playback.",i),e=new lw(n,r.message,i.message);a.qq(r,e)},a.Nc=function(){a.So(new Eg(a.MP,a.CP))},a.zq=function(){!a.kx&&Oi.ru&&Oi.X_&&a.ct===1/0&&a.OP(1/0)},a.Rq=function(t){a.hx||(a.YW=void 0),a.So(t)},a.IL=function(t){a.YW=void 0},a.Nq=function(){a.So(new Lw(a.KP))},a.Cq=function(){a.Bx>0&&a.Rx>0&&a.So(new Bp)},a.Oq=function(t){var i=a.TL.$W.audioTracks;if(i)for(var n=0;n0?t:null!=i?i:[]}function DA(t,i){if(void 0!==i)switch(t){case cw.Bk:return i.preferredVideoCodecs;case cw.Dk:return i.preferredAudioCodecs;default:return}}V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),Bt(),Nt(),V(),It();var xA=!1;function BA(t,i,n){return n?t<=i:t>1,this.EM=t,this.xM=i||function(t){for(var i=new Array(2*t),n=0,r=0;n=this.V)throw new p("The index provided ("+t+") is greater than the maximum bound ("+this.V+")")},i.DM=function(t){if(0===this.V)return 0;if(this.Cr(t))return t;if(t<=this.Tn(0))return this.Tn(0);if(t>=this.An(this.V-1))return this.An(this.V-1);for(var i=0,n=1/0,r=0;rf||(s===c&&(o=v=o||v),u===f&&(h=d=h||d),BA(c,u+i,h||v)?(u=f,h=d):(r.push(s,u),e.push(o,h),s=c,u=f,o=v,h=d))}return r.push(s,u),e.push(o,h),new t(r,e).NM()},i.NM=function(){for(var i=[],n=[],r=0;r=0},i.HM=function(t,i,n,r,e){return this.WM(t,i,n,r,e)>=0},i.qM=function(t,i,n,r,e){return this.zM(t,i,n,r,e)>=0},i.GM=function(t){if(t.V!==this.V)return!1;for(var i=0;i=0;r-=1)if(BA(this.Tn(r),n,this.PM(r)))return r;return-1},i.QM=function(t,i){void 0===i&&(i=0);for(var n=t-i,r=0;rn)return r;return-1},i.YM=function(i){return this.RM(i),new t([this.Tn(i),this.An(i)],[this.PM(i),this.IM(i)])},i.JM=function(t,i){var n=this.VM(t,i);return n<0?void 0:this.YM(n)},t.jn=function(i){for(var n=[],r=0;re.rL.forceSeekOffset)return e.So(new ah("latencyrecoveryseek")),void e.oR();var n=e.rL,r=n.minimumOffset,s=n.targetOffset,u=n.maximumOffset,o=e.TL.ux;if(!e.ML(i,r,u))if(i>u&&e.LL()){var h=e.rL.maximumPlaybackRate;xA,e.PL(h)}else if(i1&&is){xA,e.PL(1)}}},e.oa=i,e.TL=n,e.fL=r,e.wL=r.targetOffset,e.yL=r.targetOffset+(null!=(s=r.leniency)?s:0),e.vL=r.targetOffset,e.rL=e.cL(),e.oa.wn(Mp.SM,e.xL),e.oa.wn(Mp.TM,e.IL),e}Pt(i,t);var n=i.prototype;return n.hL=function(t){this.oL.push(t),this.aL()},n.uL=function(t){Yn(this.oL,t),this.aL()},n.aL=function(){this.rL=this.cL(),this.ho&&this.dL()},n.cL=function(){var t=this.lL,i=function(t,i){var n=i-t.targetOffset;return{minimumOffset:t.minimumOffset+n,targetOffset:t.targetOffset+n,maximumOffset:t.maximumOffset+n,forceSeekOffset:t.forceSeekOffset+n,minimumPlaybackRate:t.minimumPlaybackRate,maximumPlaybackRate:t.maximumPlaybackRate,leniency:t.leniency}}(this.fL,this.vL),n=[].concat([i],this.oL),r=n.reduce(function(t,i){var n;return A.max(t,null!=(n=null==i?void 0:i.minimumOffset)?n:0)},t),e=n.reduce(function(t,i){var n;return A.max(t,null!=(n=null==i?void 0:i.targetOffset)?n:0)},r+VA),s=n.reduce(function(t,i){var n;return A.max(t,null!=(n=null==i?void 0:i.maximumOffset)?n:0)},e+VA);return{minimumOffset:r,targetOffset:e,maximumOffset:s,forceSeekOffset:n.reduce(function(t,i){var n;return A.max(t,null!=(n=null==i?void 0:i.forceSeekOffset)?n:0)},s+VA),minimumPlaybackRate:n.reduce(function(t,i){var n;return A.min(t,null!=(n=i.minimumPlaybackRate)?n:FA)},FA),maximumPlaybackRate:n.reduce(function(t,i){var n;return A.max(t,null!=(n=i.maximumPlaybackRate)?n:UA)},UA)}},n._L=function(){var t,i=null==(t=OA.jn(this.oa.IP).JM(this.oa.MP))?void 0:t.An(0),n=void 0!==i?i-this.oa.MP:0;this.gL=A.min(this.gL,n),this.pL+=1},n.mL=function(){if(!(this.pL<10)){var t=.25-this.gL,i=Cn(this.vL+t,this.vL-.1,this.vL+.1);this.vL=Cn(i,this.wL,this.yL),this.gL=1/0,this.pL=0}},n.AL=function(){var t=this;this.bL(),this.fE=Vi.Og(function(){return t.dL()},500)},n.bL=function(){void 0!==this.fE&&(Vi.Lg(this.fE),this.fE=void 0)},n.Tn=function(){var t=this;this.We&&this.SL&&(this.ho||this.TL.wn(ch._y,this.dL),this.kL=Vi.fm(function(){return t._L()},1e3),this.EL=Vi.fm(function(){return t.mL()},6e4),this.AL(),this.ho=!0)},n.Xx=function(){this.ho&&(this.bL(),this.kL&&Vi.vm(this.kL),this.EL&&Vi.vm(this.EL),this.TL.mn(ch._y,this.dL),this.PL(1),this.ho=!1)},n.zg=function(){this.Xx(),this.oa.mn(Mp.SM,this.xL),this.oa.mn(Mp.TM,this.IL),this.Vo()},n.PL=function(t){this.TL.CL.RL||this.oa.ux!==t&&(this.oa.ux=t)},xt(i,[{key:"sL",get:function(){return this.We&&this.ho}},{key:"nL",get:function(){return this.rL}},{key:"Rt",get:function(){return this.We},set:function(t){this.We=t,t?this.Tn():this.Xx()}},{key:"DL",get:function(){return this.oa.BL}}]),i}(uh),HA=.66,WA=1.5,zA=3;function qA(t){if(Fi(t)){var i,n,r,e,s,u,o=Vi.Zs.mp?10:0,h=t.targetOffset;return{minimumOffset:null!=(i=t.minimumOffset)?i:h*HA,targetOffset:h,maximumOffset:null!=(n=t.maximumOffset)?n:h*WA,forceSeekOffset:A.max(null!=(r=t.forceSeekOffset)?r:h*zA,o),minimumPlaybackRate:null!=(e=t.minimumPlaybackRate)?e:FA,maximumPlaybackRate:null!=(s=t.maximumPlaybackRate)?s:UA,leniency:null!=(u=t.leniency)?u:void 0}}}var XA=function(t){return t.OL="auto",t.FL="always",t.UL="never",t.CLEAR_ONLY="clear-only",t.SAME_DRM_ONLY="same-drm-only",t}({}),GA=function(t){return t.UPLYNK="uplynk",t.MEDIATAILOR="mediatailor",t}({});function QA(t){if(!t||!qi(t))return"auto";switch(t){case"always":return"always";case"never":return"never";case"clear-only":return"clear-only";case"same-drm-only":return"same-drm-only";default:return"auto"}}V(),It(),V(),It();var YA=function(t){return t.ENABLED="enabled",t.INSECURE="insecure",t.DISABLED="disabled",t}({});V(),It();var $A=!1;V(),It();var KA=function(t){return t.NONE="none",t.MIDROLL_AND_POSTROLL="midroll-and-postroll",t}({});function JA(t){var i=null==t?void 0:t.match(/\b(?:m3u8|mpd)\b/i);if(!i)return pA.fR;switch(i[0].toLowerCase()){case"mpd":return pA.cR;case"m3u8":return pA.dR;default:return pA.fR}}function ZA(t){switch(t){case yA.aR:case yA.uR:return t;default:return yA.Lk}}function tT(t){if(!t)return!1;var i=t.toLowerCase();return zo(i,pA.cR)}function iT(t){if(!t)return!1;var i=t.toLowerCase();return zo(i,pA.dR)||zo(i,pA.lR)}function nT(t){return Wi(t)&&Wi(t.ssai)&&"google-dai"===t.ssai.integration}function rT(t){return Wi(t)&&"uplynk"===t.integration}function eT(t){return Wi(t)&&"theolive"===t.type}function sT(t){return Wi(t)&&"mediatailor"===t.integration}function uT(t){return Wi(t)&&"millicast"===t.type}function oT(t){if(qi(t))return!t;if(rT(t))return!t.id;if(nT(t)){var i=t.ssai,n="live"===i.availabilityType&&i.assetKey,r="vod"===i.availabilityType&&i.contentSourceID&&i.videoID;return Boolean(n&&r)}return uT(t)?!t.src||!t.streamAccountId:!t.src}function hT(t){return Boolean(Wi(t)&&qi(t.src))}function aT(t){return t.type===pA.vR||t.type===pA._R}function cT(t){return qi(t)||hT(t)||nT(t)||rT(t)||uT(t)}function fT(t){if(t){if(cT(t))return oT(t);for(var i,n=Ft(t);!(i=n()).done;){if(!oT(i.value))return!1}return!0}return!0}function vT(){return{crossOrigin:yA.Lk,useCredentials:!1,liveOffset:void 0,timeServer:void 0,hlsDateRange:void 0,experimentalRendering:!1,nativeUiRendering:!1,lowLatency:!1,useNativePlayback:!1,useManagedMediaSource:!1,dash:void 0,hls:void 0,abr:void 0,lcevc:void 0,ignoreEmbeddedTextTrackTypes:[],seamlessSwitchStrategy:XA.OL,latencyConfiguration:void 0}}function dT(){return io({},vT(),{src:void 0,type:pA.fR,contentProtection:void 0,ssai:void 0,integrationData:void 0,isAdvertisement:void 0})}function lT(t){var i={allowedMimeTypes:void 0,preload:"midroll-and-postroll",showCountdown:!0,vpaidMode:YA.ENABLED,googleIma:{useNativeIma:!1,useAdUiElementForSsai:!0,bitrate:-1,language:void 0,uiElements:void 0,allowSeekingForGoogleDai:!1},theoads:$A,allowSkipAdBreak:!1};return void 0===t||(void 0!==t.preload&&(i.preload=function(t){return"none"===t?KA.NONE:KA.MIDROLL_AND_POSTROLL}(t.preload)),void 0!==t.showCountdown&&(i.showCountdown=Qg(t.showCountdown)),void 0!==t.vpaidMode&&(i.vpaidMode=function(t){switch(t){case"insecure":return YA.INSECURE;case"disabled":return YA.DISABLED;default:return YA.ENABLED}}(t.vpaidMode)),ji(t.allowedMimeTypes)&&(i.allowedMimeTypes=t.allowedMimeTypes.filter(qi)),void 0!==t.googleIma&&(i.googleIma=function(t){return void 0===t?{useNativeIma:!1,useAdUiElementForSsai:!0,bitrate:-1,language:void 0,uiElements:void 0,allowSeekingForGoogleDai:!1}:{useNativeIma:Qg(t.useNativeIma),useAdUiElementForSsai:null==(i=Yg(t.useAdUiElementForSsai))||i,bitrate:null!=(n=t.bitrate)?n:-1,language:Fi(t.language)?Jg(t.language):void 0,uiElements:t.uiElements,allowSeekingForGoogleDai:Qg(t.allowSeekingForGoogleDai)};var i,n}(t.googleIma)),void 0!==t.theoads?i.theoads=Qg(t.theoads):i.theoads=$A,i.allowSkipAdBreak=Qg(t.allowSkipAdBreak)),i}function gT(t){if(!Hi(t))return[];for(var i,n=[],r=Ft(t);!(i=r()).done;){var e=i.value;Wi(e)&&n.push(e)}return n}function wT(t){return qi(t.src)||uT(t)}function mT(t){return ji(t)?t.filter(Vw):[]}V(),It(),Nt();var yT=function(t){function i(i,n){var r;return void 0===n&&(n=Up.VL),(r=t.call(this,ch.Cw)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Pt(i,t),i}(ah);V(),It(),Nt();var pT=function(t){function i(i){var n;return(n=t.call(this,ch.jw)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var _T=function(t){function i(i){var n;return(n=t.call(this,ch.uo)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var kT=function(t){function i(i){var n;return(n=t.call(this,ch.Rw)||this).duration=void 0,n.duration=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var bT=function(t){function i(i,n){var r;return(r=t.call(this,ch.Kw)||this).currentTime=void 0,r.playbackRate=void 0,r.currentTime=i,r.playbackRate=n,r}return Pt(i,t),i}(ah);V(),It(),Nt();var AT=function(t){function i(i){var n;return(n=t.call(this,ch.Bw)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var TT=function(t){function i(i){var n;return(n=t.call(this,ch.$w)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var ST=function(t){function i(i){var n;return(n=t.call(this,ch.Zw)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var ET=function(t){function i(i,n){var r;return(r=t.call(this,ch.gy)||this).currentTime=void 0,r.volume=void 0,r.currentTime=i,r.volume=n,r}return Pt(i,t),i}(ah);function IT(){return jt(function(t,i,n,r,e){var s,u,o;return zt(this,function(h){switch(h.label){case 0:void 0===n&&(n=3),void 0===r&&(r=1e3),void 0===e&&(e=1/0),s=0,h.label=1;case 1:0,h.label=2;case 2:return h.trys.push([2,4,,7]),[4,t(i)];case 3:return[2,h.sent()];case 4:return pr(u=h.sent()),sUp.VL&&p===Up.VL)&&t.So(new yT(v,p)),m&&!o?t.So(new pT(v)):!m&&o&&t.So(new _T(v)),p>=Up.Qn&&(r||a=Up.HL&&(r||a=Up.WL&&(r||a=Up.qL&&(r||a1)0;else if(0===i.length)throw p("Unknown ad integration: "+t.integration);return i[0]||null},i.zz=function(t){this.Vz.push(t)},xt(t,[{key:"Uz",get:function(){return this.Vz}}]),t}();PS.Ng=new PS,V(),It(),Nt(),V(),It(),V(),It(),Nt(),V(),It(),Bt(),Nt();var NS=function(t){return t.TM="PLAYING",t.Gz="PAUSED",t.Xz="SEEK",t.jz="STALLED",t.Qz="FAILED",t.Kz="INITIAL_BUFFERING",t.Yz="NO_ACCESS",t}({}),DS=function(t){return t.Jz="HTTP_REQUEST_STATUS_CODE_1XX",t.Zz="HTTP_REQUEST_STATUS_CODE_2XX",t.$z="HTTP_REQUEST_STATUS_CODE_3XX",t.tG="HTTP_REQUEST_STATUS_CODE_4XX",t.iG="HTTP_REQUEST_STATUS_CODE_5XX",t.eG="BUFFER_LENGTH",t.sG="BYTES_RECEIVED",t.nG="SEGMENT_READ_BITRATE",t.rG="SEGMENT_PROFILE_BITRATE",t.hG="VIDEO_PROFILE_BITRATE",t.oG="NUMBER_OF_FRAMES_DROPPED",t.aG="PLAYBACK_POSITION",t.uG="NUMBER_OF_FRAMES_DECODED",t.cG="PLAYBACK_DELTA_TO_ORIGIN",t.dG="STREAM_DELTA_TO_ORIGIN",t.lG="ORIGIN_TIMESTAMP",t}({}),xS=function(t){return t.fG="MANIFEST_URI",t.vG="ASSET_DURATION",t._G="NUMBER_OF_CONTENT_PROFILES",t.gG="CDN",t.pG="CONTENT_TITLE",t.mG="SERVICE_NAME",t.wG="CONTENT_TYPE",t.yG="CONTENT_DESCRIPTION",t}({}),BS=function(t){return t.AG="shutdown_normal_shutdown",t}({}),OS=function(t){return t.bG="session/",t.SG="content/",t.TG="internalError/",t.kG="drmError/",t.EG="caError/",t.xG="networkError/",t}({}),MS=function(){function t(t,i){this.category=void 0,this.statusCode=void 0,this.category=t,this.statusCode=i}return xt(t,[{key:"code",get:function(){return this.category+this.statusCode}}]),t}(),LS=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i}(uh);V(),It(),Nt(),V(),It(),V(),It();var FS=function(t){return t.PAUSE="IG",t.RESUME="CG",t}({}),US=function(t){function i(){return t.call(this,"DG")||this}return Pt(i,t),i}(ah),VS=function(t){function i(i,n){var r;return(r=t.call(this)||this).oa=void 0,r.OG=void 0,r.NG=void 0,r.FG=void 0,r.UG=void 0,r.oa=i,r.OG=n,r.NG=!1,r.FG=function(){r.MG(),r.NG=!1},r.UG=function(){r.NG=!0},r.OG.wn(FS.PAUSE,r.FG),r.OG.wn(FS.RESUME,r.UG),r}Pt(i,t);var n=i.prototype;return n.BG=function(){this.NG=!0},n.MG=function(){},n.kn=function(){this.NG=!1,this.OG.mn(FS.PAUSE,this.FG),this.OG.mn(FS.RESUME,this.UG)},n.VG=function(){return isFinite(this.oa.Nd())},i}(uh),jS=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).KG=!1,i.sX=!1,i.nX=!1,i.qG=function(){i.sX&&!i.nX&&i.ZG(NS.jz)},i.GG=function(){i.oa.hx||(i.sX||i.iX(new MS(OS.SG,"firstFrameDisplayed"),"now"),i.sX=!0,i.ZG(NS.TM))},i.zG=function(){i.oa.hx&&(i.sX=!0,i.ZG(NS.Gz))},i.XG=function(){i.KG&&(i.nX=!0,i.KG=!1,i.ZG(NS.Xz))},i.jG=function(){i.nX=!1,i.oa.hx&&i.ZG(NS.Gz)},i}Pt(i,t);var n=i.prototype;return n.BG=function(){t.prototype.BG.call(this),this.HG()},n.kn=function(){this.WG(),t.prototype.kn.call(this)},n.HG=function(){this.oa.wn(Mp.SM,this.qG),this.oa.wn(ch.jw,this.zG),this.oa.wn(Mp.TM,this.GG),this.oa.wn(ch.$w,this.XG),this.oa.wn(ch.Zw,this.jG)},n.WG=function(){this.oa.mn(Mp.SM,this.qG),this.oa.mn(ch.jw,this.zG),this.oa.mn(Mp.TM,this.GG),this.oa.mn(ch.$w,this.XG),this.oa.mn(ch.Zw,this.jG)},n.QG=function(){this.KG=!0},n.YG=function(){var t=this.oa.HP(),i=new MS(OS.TG,String(t.code));this.JG(NS.Qz,i,t.message)},n.ZG=function(t){this.NG&&(this.OG.$G(t),this.So(new US))},n.JG=function(t,i,n){this.OG.tX(t,i,n),this.So(new US)},n.iX=function(t,i){this.OG.eX(t,i)},i}(VS);V(),It(),Nt();var HS=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).uX=function(){i.VG()&&i.lX(xS.vG,A.round(i.oa.Nd()))},i.aX=function(t){"manifest"===t.request.type&&i.lX(xS.fG,t.url)},i.rX=function(){var t=Wn(i.oa.rt.II,function(t){return t.Rt});t&&i.lX(xS._G,t.KI.V)},i}Pt(i,t);var n=i.prototype;return n.BG=function(){t.prototype.BG.call(this),this.rX(),this.HG()},n.kn=function(){this.WG(),t.prototype.kn.call(this)},n.HG=function(){this.oa.rt.wn(Mg.pa,this.rX),this.oa.oX.hX(this.aX),this.oa.wn(ch.Rw,this.uX)},n.WG=function(){this.oa.rt.mn(Mg.pa,this.rX),this.oa.oX.cX(this.aX),this.oa.mn(ch.Rw,this.uX)},n.dX=function(t){t.serviceName&&this.lX(xS.mG,t.serviceName),t.cdn&&this.lX(xS.gG,t.cdn),t.contentTitle&&this.lX(xS.pG,t.contentTitle),t.contentType&&this.lX(xS.wG,t.contentType),t.contentDescription&&this.lX(xS.yG,t.contentDescription)},n.lX=function(t,i){this.NG&&this.OG.fX(t,i)},i}(VS);V(),It(),Nt();var WS=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).EX=ro(),i.SX=0,i.vX=0,i._X=0,i.gX=[],i.pX=function(){i.PX(),i.xX(),i.CX()},i.yX=function(t){t.qk===cw.Bk&&(i.bX(t.rO),i.IX(),i.RX(t.BX),i.mX())},i.wX=function(t){var n=t.status.toString()[0],r=i.EX.get(n)||0;i.EX.set(n,r+1),i.kX(DS.Jz,"1"),i.kX(DS.Zz,"2"),i.kX(DS.$z,"3"),i.kX(DS.tG,"4"),i.kX(DS.iG,"5")},i}Pt(i,t);var n=i.prototype;return n.BG=function(){t.prototype.BG.call(this),this.vX=this.oa.JP.iO,this._X=this.oa.JP.sO,this.HG(),this.gX.push(m(this.pX,1e3))},n.MG=function(){t.prototype.MG.call(this),this.mX()},n.kn=function(){this.mX(),this.WG(),this.gX.forEach(y),tr(this.gX),t.prototype.kn.call(this)},n.HG=function(){this.oa.oX.hX(this.wX),this.oa.wn(ch.ly,this.yX)},n.WG=function(){this.oa.oX.cX(this.wX),this.oa.mn(ch.ly,this.yX)},n.AX=function(){this.mX()},n.bX=function(t){this.SX+=t,this.TX(DS.sG,this.SX)},n.kX=function(t,i){var n=this.EX.get(i)||0;this.TX(t,n)},n.PX=function(){var t=this.oa.JP.iO-this.vX;this.TX(DS.oG,t)},n.xX=function(){var t=this.oa.JP.sO-this._X;this.TX(DS.uG,t)},n.IX=function(){var t=Pb.Ng.fW();this.TX(DS.nG,Da(t))},n.RX=function(t){this.TX(DS.rG,Da(t)),this.TX(DS.hG,Da(t))},n.mX=function(){if(this.VG()){var t=A.round(we(this.oa.LP()));this.TX(DS.aG,t)}},n.CX=function(){var t=OA.jn(this.oa.RP()),i=this.oa.LP(),n=t.JM(i),r=n?we(n.An(0)-i):0;this.TX(DS.eG,r)},n.TX=function(t,i){this.NG&&this.OG.DX(t,i)},i}(VS);V(),It(),Ut();function zS(t){return t&&t.integration===KS}function qS(t){if(!qi(t.asset))throw new _("Agama source configuration: expected 'asset' to be a string");if(!function(t){return!!qi(t)&&("live"===t||"vod"===t)}(t.streamType))throw new _("Agama source configuration: expected 'streamType' to be 'live' or 'vod'");if(void 0!==t.serviceName&&!function(t){return!!qi(t)&&("live"===t||"svod"===t||"nvod"===t||"tvod"===t||"avod"===t||"catchuptv"===t)}(t.serviceName))throw new _("Agama source configuration: expected 'serviceName' to be 'live', 'svod', 'nvod','tvod', 'avod' or 'catchuptv'");if(void 0!==t.cdn&&!qi(t.cdn))throw new _("Agama source configuration: expected 'cdn' to be a string");if(void 0!==t.contentTitle&&!qi(t.contentTitle))throw new _("Agama source configuration: expected 'contentTitle' to be a string");if(void 0!==t.contentType&&!qi(t.contentType))throw new _("Agama source configuration: expected 'contentType' to be a string");if(void 0!==t.contentDescription&&!qi(t.contentDescription))throw new _("Agama source configuration: expected 'contentDescription' to be a string");return t}function XS(t){if(!qi(t.config))throw new _("Agama player configuration: expected 'config' to be a string");if(void 0!==t.logLevel&&!function(t){return!!qi(t)&&("info"===t||"debug"===t||"warning"===t||"error"===t||"fatal"===t)}(t.logLevel))throw new _("Agama player configuration: expected 'logLevel' to be 'info', 'debug', 'warning','error' or 'fatal'");if(void 0!==t.application&&!qi(t.application))throw new _("Agama player configuration: expected 'application' to be a string");if(void 0!==t.applicationVersion&&!qi(t.applicationVersion))throw new _("Agama player configuration: expected 'applicationVersion' to be a string");if(void 0!==t.userAccountID&&!qi(t.userAccountID))throw new _("Agama player configuration: expected 'userAccountID' to be a string");if(void 0!==t.deviceID&&!qi(t.deviceID))throw new _("Agama player configuration: expected 'deviceID' to be a string");return t}function GS(){var t="00000000-0000-0000-0000-000000000000",i=f.navigator,n=f.screen,r=""+i.mimeTypes.length;r+=i.userAgent.replace(/\D+/g,""),r+=i.plugins.length,r+=n.height||"",r+=n.width||"",r+=n.pixelDepth||"";var e=function(t){var i,n=0;if(0===t.length)return"0";for(i=0;i0?oE(t[0]):void 0}function hE(t){if(t&&t.sources)return aE(t.sources)}function aE(t){return qi(t)?t:hT(t)?t.src:Hi(t)&&t.length>0?aE(t[0]):void 0}function cE(t,i,n){return rT(t)?function(t,i,n){var r=io({},vT(),{ping:{adImpressions:!1,freeWheelVideoViews:!1,linearAdData:!1},integration:GA.UPLYNK,id:"",prefix:rE,preplayParameters:{},playbackUrlParameters:{},assetType:nE.ASSET,contentProtected:!1,assetInfo:!0});r.id=function(t){if(qi(t))return t;if(Hi(t)&&qi(t[0]))return t;if(function(t){return Wi(t)&&qi(t.userId)&&(Hi(t.externalId)||qi(t.externalId))}(t))return t;return""}(t.id),t.preplayParameters&&(r.preplayParameters=t.preplayParameters);t.playbackUrlParameters&&(r.playbackUrlParameters=t.playbackUrlParameters);t.assetType&&(r.assetType=function(t){switch(t){case"channel":return nE.CHANNEL;case"event":return nE.EVENT;default:return nE.ASSET}}(t.assetType));t.contentProtected&&(r.contentProtected=Qg(t.contentProtected));t.assetInfo?r.assetInfo=Qg(t.assetInfo):r.assetInfo="asset"===r.assetType;t.prefix&&(r.prefix=Jg(t.prefix)||rE);return r.ping=function(t,i){var n=!1,r=!1,e=!1;i?(n=!!Xi(i.adImpressions)&&i.adImpressions,r=!!Xi(i.freeWheelVideoViews)&&i.freeWheelVideoViews,e=Xi(i.linearAdData)?i.linearAdData:t!==nE.ASSET):t!==nE.ASSET&&(e=!0);return{adImpressions:n,freeWheelVideoViews:r,linearAdData:e}}(r.assetType,t.ping),r=dE(r,t),r=gE(r,i,n),r=lE(r,t,n),r}(t,i,n):sT(t)?function(t,i,n){var r;return io({},fE(t,i,n),{integration:GA.MEDIATAILOR,adsParams:null!=(r=t.adsParams)?r:{}})}(t,i,n):eT(t)?function(t,i,n){return io({},fE(t,i,n),{type:"theolive"})}(t,i,n):uT(t)?function(t,i,n){return io({},fE(t,i,n),{type:pA.gR,src:t.src,streamAccountId:t.streamAccountId,subscriberToken:t.subscriberToken,connectOptions:yE(t.connectOptions),apiUrl:t.apiUrl,statsIntervalMs:vE(t.statsIntervalMs)})}(t,i,n):fE(t,i,n)}function fE(t,i,n){var r=dT(),e=i&&(i.contentProtection||i.drm);if(qi(t)){if(r.src=t,r.type=JA(t),e){var s=wS(e);r.contentProtection=TA(s)}}else if(hT(t)||nT(t)||uT(t)){r.src=t.src,r.type=t.type||JA(t.src),r.isAdvertisement=t.isAdvertisement;var u=aT(t)?t.hesp:void 0;void 0!==u&&(r.hesp=u),sT(t)&&(r.integration=t.integration);var o=wS(t.contentProtection||t.drm||e);r.contentProtection=TA(o),t.ssai&&(r.ssai=bA(t.ssai)),r=dE(r,t)}return r=lE(r=gE(r,i,n),t,n)}function vE(t){if(Yi(t)&&t>0)return t}function dE(t,i){var n,r;i.useCredentials?t.crossOrigin=yA.uR:i.crossOrigin&&(t.crossOrigin=ZA(i.crossOrigin)),qi(i.timeServer)&&(t.timeServer=i.timeServer),i.liveOffset&&(t.liveOffset=i.liveOffset),i.hlsDateRange&&(t.hlsDateRange=i.hlsDateRange),i.lowLatency&&(t.lowLatency=Qg(i.lowLatency)),i.useNativePlayback&&(t.useNativePlayback=Qg(i.useNativePlayback)),i.useManagedMediaSource&&(t.useManagedMediaSource=Qg(i.useManagedMediaSource)),i.dash&&(t.dash=SA(i.dash)),i.hls&&(t.hls=EA(i.hls)),i.lcevc&&(t.lcevc=Qg(i.lcevc)),i.ignoreEmbeddedTextTrackTypes&&(t.ignoreEmbeddedTextTrackTypes=mT(i.ignoreEmbeddedTextTrackTypes)),i.latencyConfiguration&&(t.latencyConfiguration=qA(i.latencyConfiguration)),t.seamlessSwitchStrategy=QA(null!=(r=i.seamlessSwitchStrategy)?r:null==(n=i.dash)?void 0:n.useSeamlessPeriodSwitch);var e=Yg(i.experimentalRendering);void 0!==e&&(t.experimentalRendering=e);var s=Yg(i.nativeUiRendering);return void 0!==s&&(t.nativeUiRendering=s),t}function lE(t,i,n){return t.abr=CA(qi(i)?void 0:RA(i.abr),null==n?void 0:n.abr),t}function gE(t,i,n){var r,e=i&&i.timeServer;return n&&n.liveOffset&&!Fi(t.liveOffset)&&(t.liveOffset=n.liveOffset),n&&n.hlsDateRange&&!Fi(t.hlsDateRange)&&(t.hlsDateRange=n.hlsDateRange),t.crossOrigin===yA.Lk&&(null==i||null==(r=i.vr)?void 0:r[360])&&(t.crossOrigin=yA.aR),t.useCredentials=t.crossOrigin===yA.uR,qi(e)&&!t.timeServer&&(t.timeServer=e),t}function wE(t){var i={src:""};if(t&&t.src){if(i.src=Jg(t.src),"default"in t&&(i.default=Qg(t.default)),i.kind=function(t){var i=String(t||"").toLowerCase();return up(i)?i:i?"metadata":"subtitles"}(t.kind),Vw(t.format)&&(i.format=t.format),"srclang"in t){var n=t.srclang;"string"==typeof n&&""!==n&&(i.srclang=n)}if("label"in t){var r=t.label;"string"==typeof r&&""!==r&&(i.label=r)}}return i}function mE(t,i){if(Wi(t))try{return i.Wz(t).sj(t)}catch(t){return}}function yE(t){if(null==t)return t;if(!Wi(t))throw new p("connectOptions must be an object");return t}function pE(t,i,n){if(void 0===n&&(n=PS.Ng),eE(t))return{sources:[dT()]};var r=Hg(t);if(r.sources=function(t,i,n){if(cT(t))return[cE(t,i,n)];if(Hi(t)&&cT(t[0])){for(var r,e=[],s=Ft(t);!(r=s()).done;){var u=r.value;e.push(cE(u,i,n))}return e}return[dT()]}(r.sources,r,i),"contentProtection"in r&&delete r.contentProtection,"drm"in r&&delete r.drm,"ads"in r){var e=function(t,i){if(!Hi(t))return[];for(var n,r=[],e=Ft(t);!(n=e()).done;){var s=n.value;(s=mE(s,i))&&r.push(s)}return r}(r.ads,n);0===e.length?delete r.ads:r.ads=e}var s=!fT(r.sources),u=r.ads&&r.ads.length>0;if(s&&!u?delete r.ads:u&&!s&&(r.sources=[]),"textTracks"in r){var o=function(t){if(!Hi(t))return[];for(var i,n=[],r=Ft(t);!(i=r()).done;){var e=i.value;""!==(e=wE(e)).src&&n.push(e)}return n}(r.textTracks);0===o.length?delete r.textTracks:r.textTracks=o}if("poster"in r&&(r.poster=Jg(r.poster)),"streamType"in r&&(r.streamType=function(t){switch(t){case"live":case"dvr":case"vod":return t}}(r.streamType)),"vr"in r&&(r.vr=function(t){var i=t||{};return i.stereoMode=function(t){return function(t){switch(t){case"":case"horizontal":case"vertical":return!0;default:return!1}}(t)?t:""}(i.stereoMode),{panoramaMode:iE(i.panoramaMode,Boolean(i[360])),stereoMode:i.stereoMode?tE(i.stereoMode):JS.NONE,nativeVR:Boolean(i.nativeVR)}}(r.vr)),"analytics"in r||(null==i?void 0:i.analytics)){var h=gT(r.analytics),a=i&&i.analytics||[];r.analytics=function(t,i){for(var n,r=function(){var i=n.value,r=!t.some(function(t){return t.integration===i.integration});r&&i.integration!==KS&&e.push(i)},e=Hg(t),s=Ft(i);!(n=s()).done;)r();return e}(h,a)}return"mutedAutoplay"in r&&(r.mutedAutoplay=DT(r.mutedAutoplay)),"timeServer"in r&&delete r.timeServer,"playAdsAfterTime"in r&&(r.playAdsAfterTime=$g(r.playAdsAfterTime)),r.blockContentIfAdError=function(t){return void 0!==t&&"boolean"==typeof t&&Boolean(t)}(r.blockContentIfAdError),r}V(),It(),V(),It(),V(),It();var _E=function(){function t(t){this.nj=t}return t.prototype.rj=function(t){var i,n,r,e,s,u,o,h=[];if(!t)return"";var a=t.length%4;if(a>0)for(;a++<4;)t+=this.nj.charAt(64);for(i=0;i>>16&255,r=o>>>8&255,e=255&o,h[i/4]=String.fromCharCode(n,r,e),64===u&&(h[i/4]=String.fromCharCode(n,r)),64===s&&(h[i/4]=String.fromCharCode(n));return h.join("")},t.prototype.hj=function(t,i){var n,r,e,s,u,o,h,a=[],c="";if((o=t.length%3)>0)for(;o++<3;)c+=this.nj.charAt(64),t+="\0";for(o=0;o>18&63,e=n>>12&63,s=n>>6&63,u=63&n,a[o/3]=this.nj.charAt(r)+this.nj.charAt(e)+this.nj.charAt(s)+this.nj.charAt(u);return h=(h=a.join("")).slice(0,h.length-c.length),i||(h+=c),h},t.bh=new t(function(){var t,i,n,r,e=[],s=["object","$","undefined","function","Cannot find module '","MODULE_NOT_FOUND","*","com.widevine.alpha","urn:mpeg:dash:mp4protection:2011","^","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","__proto__","@@iterator","getUTCHours","setUTCFullYear","25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?","SegmentBase","RateChangeEvent","Symbol(","Symbol.",'; codecs="'];for(t=0;t0?t[t.length-1]:this.MA.cj?this.MA.cj:void 0}},i.Cj=function(i,n){return!!t.Gj(i,n.pj)},t.Oj=function(t){var i=Number(new Date);return!!t&&i<=t},t.Gj=function(t,i){return GE(this.Xj(t),i)},t.Xj=function(t){return qi(t)?t:hT(t)&&t.src||""},t}(),jE=function(){function t(){}var i=t.prototype;return i.Nj=function(t){return 0},i.xj=function(t,i){},i.Bj=function(t,i){},t}();function HE(t){switch(t){case"invaliddomain":return gd.LICENSE_INVALID_DOMAIN;case"invalidsource":return gd.LICENSE_INVALID_SOURCE;case"expired":return gd.LICENSE_EXPIRED;case"invalidfeature":return gd.LICENSE_INVALID_FEATURE;case"error":return gd.LICENSE_ERROR}}var WE="25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?",zE=bn(function(){var t="\\.",i="(\\*|"+WE+")";return new RegExp("ip-range\\("+i+t+i+t+i+t+i+"\\)")});function qE(t,i){var n=t,r=i;if(!n)return!1;if("*"===(r=r.trim()))return!0;if(r===(n=n.replace(/\.+$/,"")))return!0;if(zo(r,"ip-range(")){var e="\\.",s=r.match(zE()),u=function(t){return"*"===t?"("+WE+")":t};if(null!==s&&5===s.length){var o=new RegExp("^"+s[1]+e+u(s[2])+e+u(s[3])+e+u(s[4])+"$");return null!==n.match(o)}}return r="."+r,-1!==n.indexOf(r,n.length-r.length)}function XE(t){return t.some(function(t){return"*"===t})}function GE(t,i){var n=Vi.Dh(t);if(!QE(n))return!0;for(var r,e=Ft(i);!(r=e()).done;){var s=r.value;if(qE(n.hostname,s))return!0;if(qE(xl(t),s))return!0}return!1}function QE(t){return-1!==OE.indexOf(t.protocol)}function YE(t){var i=Vi.Dh(t.Yu);return QE(i)&&!function(t){return qE(t.hostname,"localhost")}(i)&&!function(t){return qE(t.hostname,"theoplayer.doubleclick.net")}(i)}var $E=function(){function t(){}return t.Fj=function(t,i){return"The requested feature '"+i+"' is not available with the license for this player."},t.Dj=function(t){return"invaliddomain"===t?this.Qj:"invalidsource"===t?this.Kj:"expired"===t?this.Yj:"invalidfeature"===t?this.Jj:this.Zj},t}();$E.Zj="The license for this player is invalid.",$E.Yj="The usage license for this video player has expired.",$E.Qj="The current domain is incompatible with the license for this player.",$E.Kj="The provided video source is incompatible with the license for this player.",$E.Jj="The requested feature is not available with the license for this player.",V(),It(),Wt(),Bt(),Yt(),V(),It();var KE=function(t){return t[t.$j=1]="$j",t[t.tQ=4]="tQ",t[t.iQ=5]="iQ",t[t.eQ=9]="eQ",t}({});function JE(t){var i=[t.VN,t.sQ,t.nQ];switch(t.sQ){case 1:i.push(t.iR);break;case 4:i.push(t.MP),i.push(t.lt);break;case 5:i.push(t.lt);break;case 9:i.push(t.Km)}return i}V(),It();var ZE,tI=new Array(256);for(ZE=0;ZE<256;ZE+=1)tI[ZE]=(ZE<16?"0":"")+ZE.toString(16);function iI(){var t=le(),i=(4294967296*A.random()|0)+t&3029421624,n=(4294967296*A.random()|0)+t&3595553209,r=(4294967296*A.random()|0)+t&1130486254,e=(4294967296*A.random()|0)+t&1284287105;return tI[255&i]+tI[i>>>8&255]+tI[i>>>16&255]+tI[i>>>24&255]+"-"+tI[255&n]+tI[n>>>8&255]+"-"+tI[n>>>16&15|64]+tI[n>>>24&255]+"-"+tI[63&r|128]+tI[r>>>8&255]+"-"+tI[r>>>16&255]+tI[r>>>24&255]+tI[255&e]+tI[e>>>8&255]+tI[e>>>16&255]+tI[e>>>24&255]}function nI(t){return Na(t.replace(/-/g,""))}function rI(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=16*A.random()|0;return("x"===t?i:3&i|8).toString(16)})}function eI(){return Vi.Mg()}V(),It(),V(),It(),V(),It();var sI,uI="theoplayer-session-id";function oI(){if(!sI){var t=Ld.Wy(uI);t?sI=t:(sI=iI(),Ld.qy(uI,sI))}return sI}V(),It(),V(),It();var hI=/[^\x00-\x7E]/g;function aI(t){return"\\u"+Qo(t.charCodeAt(0).toString(16),4,"0")}var cI="https://license.theoplayer.com";function fI(t){var i=function(t){var i=[];return function(t,i,n){return JSON.stringify(t,i,n).replace(hI,aI)}(t,function(t,n){if(Wi(n)){if(-1!==i.indexOf(n))return null;i.push(n)}return n})}(function(t){return[t.rQ,t.dS,t._j,t.bD,t.hQ,t.oQ,t.aQ.map(JE)]}(t));return _E.aj.hj(i)}var vI=function(){function t(t,i,n,r,e,s){var u=this;void 0===r&&(r=_E.bh),void 0===e&&(e=0),void 0===s&&(s=1),this.zb=void 0,this.nV=void 0,this.fQ=void 0,this.pQ=void 0,this.wQ=void 0,this.TQ=void 0,this.Zf=void 0,this.cQ=void 0,this.EQ=void 0,this.SQ=void 0,this.yb=void 0,this.IQ=void 0,this.RQ=void 0,this.xQ=void 0,this.zb=t,this.nV=i,this.fQ=n,this.pQ=r,this.wQ=e,this.TQ=s,this.Zf=[],this.cQ=null,this.EQ=0,this.SQ="unknown",this.yb=0,this.RQ=function(){eI()-u.EQ>6e4&&u.AQ()},this.xQ=function(){u.AQ(!0)},f.addEventListener("beforeunload",this.xQ),this.IQ=m(this.RQ,6e4)}var i=t.prototype;return i.uQ=function(){return Boolean(this.hQ)},i.dQ=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.fQ.lQ()];case 1:return n.sent().Sj?(i={sQ:KE.$j,nQ:le(),iR:t},[4,this.iX(i)]):[2];case 2:return n.sent(),[2]}})}).call(this)},i.vQ=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.fQ.lQ()];case 1:return n.sent().Sj?(i={sQ:KE.eQ,nQ:le(),Km:t},[4,this.iX(i)]):[2];case 2:return n.sent(),[2]}})}).call(this)},i._Q=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return n={sQ:KE.tQ,nQ:le(),MP:i,lt:t},[4,this.iX(n)];case 1:return r.sent(),[2]}})}).call(this)},i.gQ=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return i={sQ:KE.iQ,nQ:le(),lt:t},[4,this.iX(i)];case 1:return n.sent(),[2]}})}).call(this)},i.iX=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.fQ.lQ()];case 1:return i=n.sent(),"a:n[_O*[C4C-N$_@_MYY $D]iOp]N$_-_]th_:c|aen?C:pH"===this.pQ.hj(i._j)&&t.sQ!==KE.iQ?[2]:(t.sQ===KE.$j?this.mQ():this.uQ()||this.mQ(),t.VN=this.yb++,this.Zf.push(t),function(t){return t===KE.$j||t===KE.iQ}(t.sQ)?[4,this.AQ()]:[3,3]);case 2:case 4:return n.sent(),[3,5];case 3:return this.Zf.length>this.wQ?[4,this.yQ()]:[3,5];case 5:return[2]}})}).call(this)},i.AQ=function(t){return void 0===t&&(t=!1),jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Zf.length>0?[4,this.yQ(t)]:[3,2];case 1:return i.sent(),[3,0];case 2:return[2]}})}).call(this)},i.bQ=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.fQ.lQ()];case 1:return i=n.sent(),[2,{rQ:le(),dS:oI(),_j:this.pQ.hj(i._j)||"dev",bD:this.zb,hQ:this.cQ,oQ:this.SQ,aQ:t}]}})}).call(this)},i.yQ=function(t){return void 0===t&&(t=!1),jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=this.Zf.splice(0,this.TQ),[4,this.bQ(i)];case 1:return n=r.sent(),t?this.Kk(n):this.kQ(n),this.EQ=eI(),[2]}})}).call(this)},i.kQ=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=fI(t),n=new El({Yu:cI,zT:i,zk:!1,dk:Hd.NT,fk:{"Content-Type":pk.IH},Vk:4e3,Uk:kl.POST}),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this.nV.lk(n)];case 2:return[4,r.sent().HT()];case 3:return r.sent(),[3,5];case 4:return r.sent(),(new Image).src="https://licensing.theoplayer.com/t?"+i,[3,5];case 5:return[2]}})}).call(this)},i.Kk=function(t){var i=fI(t);this.nV.Kk({Yu:cI,zT:i,qT:pk.IH})},i.mQ=function(){this.uQ()&&this.AQ(),this.cQ=iI(),this.yb=0},i.kn=function(){f.removeEventListener("beforeunload",this.xQ),y(this.IQ),this.AQ()},xt(t,[{key:"aQ",get:function(){return this.Zf}},{key:"hQ",get:function(){return this.cQ}}]),t}();V(),It(),Bt(),H(),V(),It(),V(),It();var dI=0;var lI=w,gI=self.requestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame,wI=self.cancelAnimationFrame||self.webkitCancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelRequestAnimationFrame;gI&&wI||(gI=function(t){var i=eI(),n=A.max(0,16-(i-dI)),r=g(function(){return t(i+n)},n);return dI=i+n,r},wI=lI),gI=gI.bind(self),wI=wI.bind(self);var mI=Oi.L_||Oi.ru&&Oi.Q_<13;function yI(t,i,n){var r=t.getImageData(i,n,1,1).data;return 0===r[0]&&0===r[1]&&0===r[2]&&0===r[3]}var pI=function(){function t(t){var i=this;this.t=void 0,this.MQ=void 0,this.hu=void 0,this.zQ=void 0,this.UQ=eo(),this.OQ=1,this.qQ=!0,this.XQ=function(){i.qQ=!0},this.GQ=function(){i.MQ=i.t.Wx(),i.UQ.forEach(function(t,n){t.HQ(),t.HQ=i.FQ(t.VQ,n)})},this.t=t,this.t.wn(ch.Lw,this.GQ),this.t.wn(ch.Zw,this.XQ),this.GQ()}var i=t.prototype;return i.CQ=function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r=Up.HL},i.LQ=function(t){var i=this.zQ;void 0===i&&(i=v.createElement("canvas"),this.zQ=i);var n=i.getContext("2d"),r=this.t,e=r.Bx,s=r.Rx,u=i.width,o=i.height;n.clearRect(0,0,i.width,i.height),u===e&&o===s||(i.width=e,i.height=s),n.drawImage(t,0,0,e,s);var h=!1;return e>0&&yI(n,e-1,0)&&(i.width=u,h=!0),s>0&&yI(n,0,s-1)&&(i.height=o,h=!0),h&&n.drawImage(t,0,0,e,s),i},i.kn=function(){this.UQ.forEach(function(t){return t.HQ()}),this.UQ.clear(),this.t.mn(ch.Lw,this.GQ),this.t.mn(ch.Zw,this.XQ),this.MQ=void 0,this.zQ=void 0},xt(t,[{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{drawImage:function(i){for(var n=arguments.length,r=new Array(n>1?n-1:0),e=1;e0){var i=t[t.length-1].contentRect;r.QQ=i.width,r.jQ=i.height,r.VQ(r.QQ,r.jQ)}},r.KQ=new f.ResizeObserver(r.YQ),r.KQ.observe(r.xe),r}return Pt(i,t),i.prototype.kn=function(){this.KQ.disconnect()},xt(i,[{key:"Iu",get:function(){return this.jQ}},{key:"Eu",get:function(){return this.QQ}}]),i}(AI);V(),It(),Bt(),Nt(),V(),It(),Ut();var SI=["Webkit","Moz","O","ms"],EI=function(){var t=!1;try{if(void 0!==f&&"function"==typeof f.addEventListener){var i=b.defineProperty({},"passive",{get:function(){t=!0}});f.addEventListener("testPassiveEventSupport",yn,i),f.removeEventListener("testPassiveEventSupport",yn,i)}}catch(t){}return t}(),II=ro();function RI(t){return II.has(t)||II.set(t,function(t){var i=(bI||(bI=f&&f.document&&f.document.createElement("span")),bI);if(!i||!i.style)return t;if(void 0!==i.style[t])return t;for(var n,r=t.charAt(0).toUpperCase()+t.slice(1),e=Ft(SI);!(n=e()).done;){var s=n.value+r;if(void 0!==i.style[s])return s}return t}(t)),II.get(t)}function CI(t){var i=t.style;i.position="absolute",i.left="0",i.right="0",i.bottom="0",i.top="0",i.overflow="scroll",i.zIndex="-1",i.visibility="hidden"}function PI(t){var i=t.style;i.position="absolute",i.left="0",i.top="0",i[RI("transition")]="0s"}var NI=function(t){function i(i,n,r){var e;(e=t.call(this,i,n)||this).iK=void 0,e.JQ=0,e.QQ=NaN,e.jQ=NaN,e.ZQ=void 0,e.sK=void 0,e.tK=void 0,e.nK=void 0,e.rK=void 0,e.hr=function(){var t=1e5;e.sK.style.width=t+"px",e.sK.style.height=t+"px",e.ZQ.scrollLeft=t,e.ZQ.scrollTop=t,e.tK.scrollLeft=t,e.tK.scrollTop=t,0===e.tK.scrollTop&&gI(e.hr)},e.hK=function(){var t=e.Eu,i=e.Iu;e.VQ(t,i),e.QQ=t,e.jQ=i,e.hr(),e.JQ=0},e.$Q=function(){if(!e.JQ){var t=e.Eu,i=e.Iu;t===e.QQ&&i===e.jQ||(e.JQ=gI(e.hK))}},e.eK=function(){e.rK||(e.rK=g(e.oK,66))},e.oK=function(){e.rK=void 0,e.aK()},e.aK=function(){e.$Q()};var s=function(t,i){return f.getComputedStyle(t,void 0).getPropertyValue(i)||t.style[i]}(i,"position");r||"static"!==s||(i.style.position="relative");var u=v.createElement("div");return e.iK=u,e.ZQ=v.createElement("div"),e.sK=v.createElement("div"),e.tK=v.createElement("div"),e.nK=v.createElement("div"),CI(e.ZQ),CI(e.tK),PI(e.sK),function(t){PI(t),t.style.width="200%",t.style.height="200%"}(e.nK),u.appendChild(e.ZQ),u.appendChild(e.tK),e.ZQ.appendChild(e.sK),e.tK.appendChild(e.nK),i.appendChild(u),e.ZQ.addEventListener("scroll",e.$Q),e.tK.addEventListener("scroll",e.$Q),f&&f.addEventListener("resize",e.eK),e.$Q(),e}return Pt(i,t),i.prototype.kn=function(){wI(this.JQ),this.JQ=0,this.ZQ.removeEventListener("scroll",this.$Q),this.tK.removeEventListener("scroll",this.$Q),Zi(this.iK),f&&f.removeEventListener("resize",this.eK)},xt(i,[{key:"Iu",get:function(){return this.xe.getBoundingClientRect().height||this.jQ||0}},{key:"Eu",get:function(){return this.xe.getBoundingClientRect().width||this.QQ||0}}]),i}(AI),DI=function(t){function i(i){var n;return(n=t.call(this)||this).xe=void 0,n.KQ=void 0,n.YQ=function(t,i){n.So(new kI(t,i))},n.xe=i,n}Pt(i,t);var n=i.prototype;return n._n=function(t){this.KQ||("function"==typeof f.ResizeObserver?this.KQ=new TI(this.xe,this.YQ):this.KQ=new NI(this.xe,this.YQ,t))},n.kn=function(){this.Vo(),this.KQ&&(this.KQ.kn(),this.KQ=void 0)},xt(i,[{key:"Iu",get:function(){return this.KQ?this.KQ.Iu:0}},{key:"Eu",get:function(){return this.KQ?this.KQ.Eu:0}}]),i}(uh);V(),It(),Bt(),Nt(),Ut(),V(),It(),Nt();var xI=function(t){function i(){return t.call(this,oS.pa)||this}return Pt(i,t),i}(ah);V(),It(),Ut();var BI=function(){if(v)for(var t,i=Ft([["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]]);!(t=i()).done;){var n=t.value;if(n[1]in v)return{uK:n[0],sa:n[1],cK:n[2],dK:n[3],Ze:n[4],lK:n[5]}}}();V(),It(),Nt();var OI=function(t){function i(){return t.call(this,oS.ka)||this}return Pt(i,t),i}(ah),MI=function(t){function i(n){var r;return(r=t.call(this)||this).xe=void 0,r.ca=void 0,r.ds=!1,r.fK=function(){return r._K()},r.vK=function(){return r.gK()},r.xe=n,r.ca=i.la(n),v.addEventListener(BI.Ze,r.fK),r._K(),r}Pt(i,t);var n=i.prototype;return n.yo=function(){var t=this.xe[BI.uK]();t&&t.then?t.then(this.fK,this.vK):(v.removeEventListener(BI.lK,this.vK),v.addEventListener(BI.lK,this.vK))},n.jo=function(){var t=v[BI.sa]();t&&t.then?t.then(this.fK,this.vK):(v.removeEventListener(BI.lK,this.vK),v.addEventListener(BI.lK,this.vK))},n._K=function(){var t=this.ds,i=this.xe===v[BI.cK];this.ds=i,t!==i&&this.So(new xI)},n.gK=function(){this.So(new hS)},n.kn=function(){this.Vo(),v.removeEventListener(BI.Ze,this.fK),v.removeEventListener(BI.lK,this.vK)},i.la=function(t){return Boolean(BI&&v[BI.dK]&&BI.uK in t)},i}(uh),LI=function(t){function i(n){var r;return(r=t.call(this)||this).xe=void 0,r.ca=void 0,r.ds=!1,r.fK=function(){return r._K()},r.xe=n,r.ca=i.la(n),r.xe.addEventListener("webkitbeginfullscreen",r.fK),r.xe.addEventListener("webkitendfullscreen",r.fK),r.xe.addEventListener("webkitpresentationmodechanged",r.fK),r._K(),r}Pt(i,t);var n=i.prototype;return n.yo=function(){var t=this;this.xe.webkitSupportsPresentationMode&&this.xe.webkitSupportsPresentationMode("fullscreen")?Oi.ru?requestAnimationFrame(function(){return t.xe.webkitSetPresentationMode("fullscreen")}):this.xe.webkitSetPresentationMode("fullscreen"):this.xe.webkitEnterFullscreen()},n.jo=function(){this.xe.webkitSupportsPresentationMode&&this.xe.webkitSupportsPresentationMode("inline")?this.xe.webkitSetPresentationMode("inline"):this.xe.webkitExitFullscreen()},n._K=function(){var t,i=this.ds;t=this.xe.webkitPresentationMode?"fullscreen"===this.xe.webkitPresentationMode:Boolean(this.xe.webkitDisplayingFullscreen),this.ds=t,i!==t&&this.So(new xI)},n.kn=function(){this.Vo(),this.xe.removeEventListener("webkitbeginfullscreen",this.fK),this.xe.removeEventListener("webkitendfullscreen",this.fK),this.xe.removeEventListener("webkitpresentationmodechanged",this.fK)},i.la=function(t){return Oi.ru&&("webkitEnterFullscreen"in t||"webkitSupportsPresentationMode"in t)},i}(uh),FI=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).wK=[],i.pK=void 0,i.mK=!1,i._K=function(){var t=i.mK,n=i.SK();t!==n&&(i.mK=n,i.So(new xI))},i}Pt(i,t);var n=i.prototype;return n.yo=function(){this.pK?this.pK.yo():this.So(new hS)},n.jo=function(){for(var t,i=Ft(this.wK);!(t=i()).done;){var n=t.value;n.ds&&n.jo()}},n.yK=function(t){this.pK=t},n.AK=function(t){this.wK.push(t),t.wn(oS.pa,this._K),t.wn(oS.ma,this.Rs),this._K()},n.bK=function(t){Yn(this.wK,t),t.mn(oS.pa,this._K),t.mn(oS.ma,this.Rs)},n.SK=function(){for(var t,i=Ft(this.wK);!(t=i()).done;){if(t.value.ds)return!0}return!1},n.hr=function(){this.pK=void 0,this.mK=!1;for(var t,i=Ft(this.wK.slice());!(t=i()).done;){var n=t.value;this.bK(n),n.kn()}this._K()},n.kn=function(){this.Vo(),this.hr()},xt(i,[{key:"ca",get:function(){return!!this.pK&&this.pK.ca}},{key:"ds",get:function(){return this.mK}}]),i}(uh),UI=function(t){function i(i,n){var r;return(r=t.call(this)||this).t=void 0,r.TK=void 0,r.kK=void 0,r.ga=!1,r.xK=function(){return r.er()},r._K=function(t){r.ga||r.So(t)},r.t=i,r.TK=n,r.kK=new aS,r.EK(),r.t.wn(ch.Nw,r.xK),r.er(),r}Pt(i,t);var n=i.prototype;return n.yo=function(){this.TK&&this.kK.yo()},n.jo=function(){this.kK.jo()},n.EK=function(){this.kK.wn([oS.pa,oS.ka],this._K),this.kK.wn(oS.ma,this.Rs)},n.PK=function(){this.kK.mn([oS.pa,oS.ka],this._K),this.kK.mn(oS.ma,this.Rs)},n.er=function(){var t=this.kK,i=this.t.Hx();if(t!==i){this.ga=!0;var n=this.ds,r=this.ca;n&&this.jo(),this.PK(),this.kK=i,this.EK(),n&&!this.ds&&this.ca?this.yo():this.jo(),this.ga=!1,r!==this.ca&&this.So(new OI),n!==this.ds&&this.So(new xI)}},n.kn=function(){this.Vo(),this.PK(),this.t.mn(ch.Nw,this.xK)},xt(i,[{key:"ca",get:function(){return!!this.TK&&this.kK.ca}},{key:"ds",get:function(){return this.kK.ds}}]),i}(uh);V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It(),Nt(),V(),It();var VI=function(t){return t.MODE_CHANGE="presentationmodechange",t.ERROR="error",t}({}),jI=function(t){function i(i){var n;return(n=t.call(this,VI.MODE_CHANGE)||this).presentationMode=void 0,n.presentationMode=i,n}return Pt(i,t),i}(ah);V(),It(),V(),It(),Nt(),Ut();var HI=function(t){function i(i,n,r){var e;return void 0===n&&(n=!1),(e=t.call(this,r)||this).RK=[],e.Zf=void 0,e.IK=void 0,e.DK=function(t){Sr(function(){e.Rs(t)})},e.Zf=i,e.IK=n?e.DK:e.Rs,e}Pt(i,t);var n=i.prototype;return n.au=function(t){for(var i,n=Ft(this.Zf);!(i=n()).done;){var r=i.value;t.wn(r,this.IK)}this.RK.push(t)},n.CK=function(t){for(var i,n=Ft(this.Zf);!(i=n()).done;){var r=i.value;t.mn(r,this.IK)}this.RK.push(t)},n.kn=function(){this.Vo();for(var t,i=Ft(this.RK);!(t=i()).done;){var n=t.value;this.CK(n)}tr(this.RK)},i}(uh),WI=function(t){function i(i,n){var r;return void 0===n&&(n=!1),(r=t.call(this,i)||this).RK=[],r.BK=void 0,r.DK=function(t){Sr(function(){r.Rs(t)})},r.BK=n?r.DK:r.Rs,r}Pt(i,t);var n=i.prototype;return n.au=function(t){t.lw(this.BK),this.RK.push(t)},n.CK=function(t){t.mw(this.BK),Yn(this.RK,t)},n.kn=function(){this.Vo();for(var t,i=Ft(this.RK);!(t=i()).done;){t.value.mw(this.BK)}tr(this.RK)},i}(hh);V(),It(),Bt(),Nt();var zI=function(t){function i(i){var n;return(n=t.call(this,VI.ERROR)||this).errorObject=void 0,n.errorObject=i,n}return Pt(i,t),i.prototype.xa=function(){return this},xt(i,[{key:"error",get:function(){return this.errorObject.message}}]),i}(Ig);V(),It(),Nt();var qI=function(t){function i(i,n,r){return t.call(this,i,n,r)||this}return Pt(i,t),i}(md),XI=function(t){function i(i,n){var r;return(r=t.call(this)||this).Yo=PT.INLINE,r.ra=!1,r.ha=void 0,r.ea=void 0,r.ta=new Sd,r.hu=void 0,r._K=function(){r._i()},r.gK=function(){r.ra||(r.So(new Ib(new md(gd.FULLSCREEN_ERROR,"Failed to enter fullscreen."))),r._i())},r.UK=function(){r.ra||(r.Yo!==PT.NATIVE_PICTURE_IN_PICTURE||r.ea.XL?r.Yo!==PT.NATIVE_PICTURE_IN_PICTURE&&r.ea.XL&&r.Jo(PT.NATIVE_PICTURE_IN_PICTURE):r.Jo(PT.INLINE))},r.VK=function(){r.ra||(r.So(new zI(new qI(gd.PICTURE_IN_PICTURE_ERROR,"Unexpected native picture-in-picture error."))),r.UK())},r.ha=i,r.ea=n,r.ha.wn(oS.pa,r._K),r.ha.wn(oS.ma,r.gK),r.ea.wn(jT.zL,r.UK),r.ea.wn(jT.GL,r.UK),r.ea.wn(jT.ma,r.VK),r}Pt(i,t);var n=i.prototype;return n.xa=function(){return function(t){var i,n={get currentMode(){return t.Wo()},requestMode:function(i){var n=LT(i);n&&t.Jo(n)},supportsMode:function(i){var n=LT(i);return!!n&&t.Xo(n)},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return(i=new WI(n,!0)).au(t),n}(this)},n.Jo=function(t){this.Yo!==t&&(this.Yo=t,this.ra=!0,this.Ko(t))},n.Wo=function(){return this.Yo},n.Xo=function(t){switch(t){case PT.NATIVE_PICTURE_IN_PICTURE:return this.ea.jL;case PT.FULLSCREEN:return this.ha.ca;case PT.INLINE:return!0}return!1},n.Ko=function(t){var i=this;switch(this.ta.Zg(),t){case PT.FULLSCREEN:Er(this.ta.Zo(function(t){return i.NK(t)}));break;case PT.NATIVE_PICTURE_IN_PICTURE:Er(this.ta.Zo(function(t){return i.MK(t)}));break;case PT.INLINE:Er(this.ta.Zo(function(t){return i.LK(t)}))}},n.NK=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return yr(t),[4,this.ea.jo().catch(yn)];case 1:n.sent(),yr(t),n.label=2;case 2:return n.trys.push([2,4,5,6]),[4,this.FK()];case 3:return n.sent(),this.So(new jI(this.Yo)),[3,6];case 4:throw n.sent(),i=new qI(gd.FULLSCREEN_ERROR,"Failed to enter fullscreen."),this.So(new zI(i)),yr(t),this.Jo(PT.INLINE),i;case 5:return this.ra=!1,[7];case 6:return[2]}})}).call(this)},n.MK=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return yr(t),[4,this.sa().catch(yn)];case 1:n.sent(),yr(t),n.label=2;case 2:return n.trys.push([2,4,5,6]),[4,this.ea.yo()];case 3:return n.sent(),this.So(new jI(this.Yo)),[3,6];case 4:throw n.sent(),i=new qI(gd.PICTURE_IN_PICTURE_ERROR,"Failed to enter native picture-in-picture."),this.So(new zI(i)),yr(t),this.Jo(PT.INLINE),i;case 5:return this.ra=!1,[7];case 6:return[2]}})}).call(this)},n.LK=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return yr(t),[4,this.sa().catch(yn)];case 1:return i.sent(),yr(t),[4,this.ea.jo().catch(yn)];case 2:return i.sent(),this.So(new jI(this.Yo)),this.ra=!1,[2]}})}).call(this)},n.FK=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.ha.ds?[2]:(t=this.ha.ww([oS.pa,oS.ma]),this.ha.yo(),[4,t]);case 1:if(i.sent(),!this.ha.ds)throw new p("Failed to enter fullscreen.");return[2]}})}).call(this)},n.sa=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.ha.ds?(t=this.ha.ww([oS.pa,oS.ma]),this.ha.jo(),[4,t]):[2];case 1:if(i.sent(),this.ha.ds)throw new p("Failed to exit fullscreen.");return[2]}})}).call(this)},n._i=function(){this.ra||(this.Yo!==PT.FULLSCREEN||this.ha.ds?this.Yo!==PT.FULLSCREEN&&this.ha.ds&&this.Jo(PT.FULLSCREEN):this.Jo(PT.INLINE))},n.kn=function(){this.ha.mn(oS.pa,this._K),this.ha.mn(oS.ma,this.gK),this.ea.mn(jT.zL,this.UK),this.ea.mn(jT.GL,this.UK),this.ea.mn(jT.ma,this.VK),this.Vo()},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}}]),i}(hh);V(),It(),Wt(),Yt();var GI=function(){function t(t){this.Iz=void 0,this.WK=void 0,this.Iz=t,this.WK=new Sd}var i=t.prototype;return i.HK=function(t){var i=this;return this.WK.Zo(function(){return i.qK(t)})},i.qx=function(){this.Iz.xz()},i.qK=function(i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return n=this.Iz.Gq(cw.Bk),r=n.$W,[4,t.zK(r,i)];case 1:return e=s.sent(),[4,this.Iz.Pq(n)];case 2:return s.sent(),[2,e]}})}).call(this)},i.kn=function(){this.WK.kn()},t.zK=function(i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return Oi.S_||Oi.w_?[2,"all"]:(i.src||(i.src="data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),[4,t.GK()]);case 1:return e.sent(),(r=!n)?[4,t.XK(i,!1)]:[3,3];case 2:r=e.sent(),e.label=3;case 3:return r?[2,"all"]:[4,t.XK(i,!0)];case 4:return e.sent()?[2,"muted"]:[2,"none"]}})})()},t.XK=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:t.muted=i,n=t.play(),e.label=1;case 1:return e.trys.push([1,3,4,5]),Gi(n)?(r=Rr(250),[4,ot.race([n,r])]):[2,!Oi.Ks];case 2:return e.sent(),[2,!0];case 3:return e.sent(),[2,!1];case 4:return t.pause(),t.muted=!0,[7];case 5:return[2]}})})()},t.GK=function(){return new ot(function(t){if("function"==typeof MessageChannel){var i=new MessageChannel;i.port1.onmessage=function(){return t()},i.port2.postMessage("")}else g(t,0)})},t}(),QI=GI;function YI(t){QI=t}function $I(t){var i;return{get url(){return t.Yu},get method(){return t.Uk},get headers(){return i||(i=t.fk.MT()),i},get body(){return t.zT},get useCredentials(){return t.zk},get type(){return t.Km},get subType(){return t.Wk},get mediaType(){return t.qk},get responseType(){return t.dk}}}function KI(t){switch(t.toLowerCase()){case"arraybuffer":return Hd.CT;case"json":return Hd.DT;case"stream":return Hd.BT;default:return Hd.NT}}function JI(t){switch(t.toUpperCase()){case"POST":return kl.POST;case"PUT":return kl.PUT;case"DELETE":return kl.DELETE;case"HEAD":return kl.HEAD;case"OPTIONS":return kl.OPTIONS;default:return kl.GET}}function ZI(t){switch(t.toLowerCase()){case"manifest":return bl.wk;case"segment":return bl.yk;case"preload-hint":return bl.Ak;case"content-protection":return bl.bk;default:return bl.pk}}function tR(t){switch(t.toLowerCase()){case"initialization-segment":return Al.Sk;case"fairplay-license":return Al.Tk;case"fairplay-certificate":return Al.Ek;case"widevine-license":return Al.Pk;case"widevine-certificate":return Al.xk;case"playready-license":return Al.Ik;case"clearkey-license":return Al.Rk;case"aes128-key":return Al.Ck;default:return Al.pk}}function iR(t){switch(t.toLowerCase()){case"audio":return Tl.Dk;case"video":return Tl.Bk;case"text":return Tl.NT;case"image":return Tl.Nk;default:return Tl.pk}}V(),It(),Wt(),Nt(),H(),Ut(),Yt(),V(),It(),Bt(),Nt(),V(),It(),V(),It(),Wt(),Bt(),Yt();var nR=function(){function t(t,i){this.uY=void 0,this.hY=void 0,this.QK=void 0,this.eY=void 0,this.hu=void 0,this.JK=void 0,this.aE=void 0,this.tY=void 0,this.uY=t,this.hY=i,this.QK=new Xa,this.eY=[],this.hu=void 0,this.JK=!1,this.aE=void 0,this.tY=0}var i=t.prototype;return i.cD=function(){this.JK=!0,this.QK.Xy(null)},i.iY=function(){this.QK.jy(new Gd(this.eY))},i.sY=function(t){if(!this.ZK)throw new _("Cannot respond more than once");if(!Wi(t))throw new _("Expected valid response");this.aE=this.nY(t),this.cD()},i.rY=function(){try{var t=this.hY(this.Ca);t?this.oY(t):this.$K||this.YK||this.cD()}catch(t){this.eY.push(t),this.iY()}},i.oY=function(t){if(this.YK)throw new p("Request has been redirected or a response already exists");if(Gi(t))this.aY(t);else{if("function"!=typeof t)throw new _("Expected promise or function");var i=new Xa;try{var n=t(function(t){t?i.jy(t):i.Xy(void 0)});Gi(n)&&i.$g(n)}catch(t){i.jy(t)}this.aY(i.Qy)}},i.aY=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.tY++,[4,t];case 1:return n.sent(),this.tY--,this.$K||this.YK||(this.eY.length?this.iY():this.cD()),[3,3];case 2:return i=n.sent(),this.tY--,this.eY.push(i),this.$K||this.YK||this.iY(),[3,3];case 3:return[2]}})}).call(this)},xt(t,[{key:"jK",get:function(){return this.QK.Qy}},{key:"Ca",get:function(){return this.hu||(this.hu=this.KK()),this.hu}},{key:"YK",get:function(){return this.JK}},{key:"ZK",get:function(){return!this.JK}},{key:"$K",get:function(){return this.tY>0}},{key:"oE",get:function(){return this.aE}}]),t}(),rR=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).cY=void 0,e.cY=r,e.rY(),e}Pt(i,t);var n=i.prototype;return n.KK=function(){return function(t){var i,n=$I(t.lk);return{get closed(){return!t.ZK},get request(){return n},get url(){return t.Yu},get status(){return t.hk},get statusText(){return t.vk},get headers(){return i||(i=t.fk.MT()),i},get body(){return t.zT},respondWith:function(i){return t.sY(i)},waitUntil:function(i){return t.oY(i)}}}(this)},n.nY=function(t){return i.dY(t,this.uY,this.cY)},i.dY=function(t,i,n){var r=void 0===t.body?n:t.body;return new _l({ck:r,lk:i.lk,dk:i.lk.dk,fk:t.headers,hk:t.status,vk:t.statusText,gk:t.url,_k:!0},i)},xt(i,[{key:"zT",get:function(){return this.cY}},{key:"fk",get:function(){return this.uY.fk}},{key:"lk",get:function(){return this.uY.lk}},{key:"oE",get:function(){return this.aE}},{key:"hk",get:function(){return this.uY.hk}},{key:"vk",get:function(){return this.uY.vk}},{key:"Yu",get:function(){return this.uY.gk}}]),i}(nR);V(),It(),Bt(),Nt();var eR=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).vY=void 0,e.lY=void 0,e.lY=r,e.rY(),e}Pt(i,t);var n=i.prototype;return n.KK=function(){return function(t){var i;return{get url(){return t.Yu},get method(){return t.Uk},get headers(){return i||(i=t.fk.MT()),i},get body(){return t.zT},get closed(){return!t.ZK},get useCredentials(){return t.zk},get type(){return t.Km},get subType(){return t.Wk},get mediaType(){return t.qk},get responseType(){return t.dk},redirect:function(i){return t._Y(i)},respondWith:function(i){return t.sY(i)},waitUntil:function(i){return t.oY(i)}}}(this)},n.nY=function(t){var i=this.uY.zT,n=new _l({ck:i,fk:{},lk:this.uY,gk:this.uY.Yu,dk:this.uY.dk,hk:200,vk:"OK"});return rR.dY(t,n,i)},n._Y=function(t){if(!this.ZK)throw new _("Cannot redirect, already redirected or has a response");var i;i=qi(t)?{url:t}:t,this.vY=function(t,i){return new El({Yu:void 0===t.url?i.Yu:t.url,Uk:void 0!==t.method?JI(t.method):void 0,fk:t.headers,zT:t.body,zk:t.useCredentials,Km:void 0!==t.type?ZI(t.type):void 0,Wk:void 0!==t.subType?tR(t.subType):void 0,qk:void 0!==t.mediaType?iR(t.mediaType):void 0,dk:void 0!==t.responseType?KI(t.responseType):void 0},i)}(i,this.uY),this.cD()},xt(i,[{key:"zT",get:function(){return this.uY.zT}},{key:"ZK",get:function(){return this.lY&&!this.JK}},{key:"fk",get:function(){return this.uY.fk}},{key:"Uk",get:function(){return this.uY.Uk}},{key:"fY",get:function(){return this.vY}},{key:"oE",get:function(){return this.aE}},{key:"dk",get:function(){return this.uY.dk}},{key:"Vk",get:function(){return this.uY.Vk}},{key:"Hk",get:function(){return this.uY.Hk}},{key:"Yg",get:function(){return this.uY.Yg}},{key:"Km",get:function(){return this.uY.Km}},{key:"Wk",get:function(){return this.uY.Wk}},{key:"qk",get:function(){return this.uY.qk}},{key:"Yu",get:function(){return this.uY.Yu}},{key:"zk",get:function(){return this.uY.zk}},{key:"jk",get:function(){return this.uY.jk}},{key:"Gk",get:function(){return this.uY.Gk}},{key:"Xk",get:function(){return this.uY.Xk}},{key:"Qk",get:function(){return this.uY.Qk}}]),i}(nR);var sR=function(t){function i(i,n){var r;void 0===n&&(n=!0);var e=new uR(i);return(r=t.call(this,e,n)||this).pY=void 0,r.pY=e,r}Pt(i,t);var n=i.prototype;return n.gY=function(t){this.pY.gY(t)},n.mY=function(t){this.pY.mY(t)},n.wY=function(t){this.pY.wY(t)},n.hX=function(t){this.pY.hX(t)},n.cX=function(t){this.pY.cX(t)},i}(Rl),uR=function(){function t(t){this.$k=void 0,this.SY=[],this.TY=[],this.$k=t}var i=t.prototype;return i.lk=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,5]),[4,this.yY(t,t.Yg)];case 1:return i=r.sent(),[3,5];case 2:return j(n=r.sent(),Ml)?[4,this.AY(n,t.Yg)]:[3,4];case 3:return[2,r.sent()];case 4:throw n;case 5:return[4,this.bY(i,t.Yg)];case 6:if(pl(i=r.sent()))return[2,i];throw new Fl(i)}})}).call(this)},i.Kk=function(t){return this.$k.Kk(t)},i.yY=function(t,i){return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:yr(i),n=t,e=Ft(this.SY.slice()),h.label=1;case 1:if((s=e()).done)return[3,7];if(u=s.value,yr(i),(o=new eR(n,u,!r)).YK)return[3,5];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,o.jK];case 3:return h.sent(),[3,5];case 4:return h.sent(),[3,6];case 5:o.fY&&!r?n=o.fY:o.oE&&!r&&(r=o.oE),h.label=6;case 6:return[3,1];case 7:return r?[2,r]:[2,this.$k.lk(n)]}})}).call(this)},i.AY=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return j(t,Fl)?n=t.oE:(r=t.lk,n=new _l({ck:null,lk:r,dk:r.dk,hk:0,vk:""})),[4,this.bY(n,i)];case 1:if((e=s.sent())===n)throw t;if(pl(e))return[2,e];throw new Fl(e)}})}).call(this)},i.bY=function(t,i){return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:n=t,r=Ft(this.TY.slice()),h.label=1;case 1:return(e=r()).done?[3,8]:(s=e.value,yr(i),[4,ot.resolve(n.Ly().ck(i))]);case 2:if(u=h.sent(),(o=new rR(n,s,u)).YK)return[3,6];h.label=3;case 3:return h.trys.push([3,5,,6]),[4,o.jK];case 4:return h.sent(),[3,6];case 5:return h.sent(),[3,7];case 6:n=o.oE||n,h.label=7;case 7:return[3,1];case 8:return[2,n]}})}).call(this)},i.gY=function(t){this.SY.unshift(t)},i.mY=function(t){this.SY.push(t)},i.wY=function(t){Yn(this.SY,t)},i.hX=function(t){this.TY.unshift(t)},i.cX=function(t){Yn(this.TY,t)},i.kn=function(){this.$k.kn(),tr(this.SY),tr(this.TY)},t}();V(),It(),Bt(),Nt();var oR=function(){function t(t){this.nV=void 0,this.hu=void 0,this.nV=t}var i=t.prototype;return i.gY=function(t){this.nV.gY(t)},i.wY=function(t){this.nV.wY(t)},i.hX=function(t){this.nV.hX(t)},i.cX=function(t){this.nV.cX(t)},xt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{addRequestInterceptor:function(i){t.gY(i)},removeRequestInterceptor:function(i){t.wY(i)},addResponseInterceptor:function(i){t.hX(i)},removeResponseInterceptor:function(i){t.cX(i)}}}(this)),this.hu}}]),t}(),hR=function(t){function i(i,n,r){var e;return(e=t.call(this,n)||this).CY=void 0,e.nV=void 0,e.Rz=void 0,e.hu=void 0,e.DY=void 0,e.BY=void 0,e.CY=i,e.nV=n,e.Rz=r,e.DY=function(t){e.So(t)},e.BY=function(t){e.So(t)},e.CY.wn(ch.Xw,e.DY),e.CY.wn(ch.Gw,e.BY),e}Pt(i,t);var n=i.prototype;return n.EY=function(t){this.Rz.EY(t)},n.gY=function(t){this.nV.gY(t)},n.wY=function(t){this.nV.wY(t)},n.hX=function(t){this.nV.hX(t)},n.cX=function(t){this.nV.cX(t)},n.kn=function(){this.Vo(),this.CY.mn(ch.Xw,this.DY),this.CY.mn(ch.Gw,this.BY)},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{get online(){return t.sx},get estimator(){return function(t){return{get bandwidth(){return t.kW},get roundTripTime(){return t.EW}}}(t.kY)},setEstimator:function(i){t.EY(function(t){if(!t)return;return{get kW(){return Kg(t.bandwidth)},get EW(){return Kg(t.roundTripTime)},PW:function(i){return function(t){if(!t)return;return{PY:function(i){t.markRequestStart(i)},xY:function(i){t.markResponseStart(i)},IY:function(i,n){t.markResponseData(i,n)},RY:function(i){t.markResponseEnd(i)}}}(t.createMeasurer($I(i)))}}}(i))},addRequestInterceptor:function(i){t.gY(i)},removeRequestInterceptor:function(i){t.wY(i)},addResponseInterceptor:function(i){t.hX(i)},removeResponseInterceptor:function(i){t.cX(i)},addEventListener:function(i,n){t.wn(i,n)},removeEventListener:function(i,n){t.mn(i,n)}}}(this)),this.hu}},{key:"sx",get:function(){return this.CY.sx}},{key:"kY",get:function(){return this.Rz.kY}}]),i}(uh);V(),It(),Bt(),Nt(),V(),It(),V(),It();var aR=function(t){return t.PERFORMANCE="performance",t.QUALITY="quality",t.BANDWIDTH="bandwidth",t}({});V(),It(),H();function cR(t,i,n,r,e,s){var u=[],o=t-A.max(s,1),h=t+e;if(i&&n){var a=Cn(n,1,5),c=i-a;o=A.min(o,c);var f=i+n+a;h=A.max(h,f)}return 0!==o&&r.qM(0,o)&&u.push([0,o]),r.qM(h,1/0)&&u.push([h,1/0]),u}function fR(t){return j(t,p)&&"QuotaExceededError"===t.name}V(),It();var vR={type:aR.BANDWIDTH};function dR(t){var i=Hg(vR);return qi(t)?i.type=lR(t):Wi(t)&&function(t){switch(t){case aR.PERFORMANCE:case aR.QUALITY:case aR.BANDWIDTH:return!0;default:return!1}}(t.type)&&(i.type=lR(t.type)),Wi(t)&&Wi(t.metadata)&&(i.metadata=function(t){var i={},n=$g(t.bitrate);return E(n)||(i.bitrate=n),i}(t.metadata)),i}function lR(t){switch(t){case"bandwidth":return aR.BANDWIDTH;case"performance":return aR.PERFORMANCE;case"quality":return aR.QUALITY}}V(),It(),Nt();var gR=function(t){function i(i){var n;return(n=t.call(this,"NY")||this).MY=void 0,n.MY=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var wR=function(t){function i(i){var n;return(n=t.call(this,"LY")||this).OY=void 0,n.OY=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var mR=function(t){function i(i){var n;return(n=t.call(this,"FY")||this).UY=void 0,n.UY=i,n}return Pt(i,t),i}(ah),yR=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).hu=function(t){return{get strategy(){return function(t){return{metadata:t.metadata,type:t.type}}(t.OY)},set strategy(i){t.OY=dR(i)},get targetBuffer(){return t.MY},set targetBuffer(i){var n=$g(i);E(n)||(t.MY=n)},get bufferLookbackWindow(){return t.UY},set bufferLookbackWindow(i){var n=$g(i);E(n)||(t.UY=n<=0?30:n)},get maxBufferLength(){return t.QY},get clearBufferWhenSettingTargetQuality(){return t.JY},set clearBufferWhenSettingTargetQuality(i){t.JY=Qg(i)}}}(i),i.qY=vR,i.zY=20,i.jY=30,i.XY=1/0,i.ZY=!1,i.KY=void 0,i.HY=void 0,i}Pt(i,t);var n=i.prototype;return n.VY=function(t){this.HY=t},n.EY=function(t){this.KY=t},n.YY=function(t){var i=A.min(t,.8*this.XY);if(i=A.max(10,i),this.XY===i)return!1;var n=this.GY;this.XY=i;var r=this.GY;return r!==n&&this.So(new gR(r)),!0},xt(i,[{key:"WY",get:function(){switch(this.qY.type){case aR.PERFORMANCE:return 0;case aR.QUALITY:return 1/0;case aR.BANDWIDTH:return this.qY.metadata&&void 0!==this.qY.metadata.bitrate?this.qY.metadata.bitrate:Pb.Ng.fW();default:return Pb.Ng.fW()}}},{key:"Ca",get:function(){return this.hu}},{key:"OY",get:function(){return this.qY},set:function(t){this.qY=t,this.So(new wR(t))}},{key:"MY",get:function(){return this.zY},set:function(t){this.zY=t,this.So(new gR(t))}},{key:"GY",get:function(){return A.min(this.zY,this.XY)}},{key:"UY",get:function(){return this.jY},set:function(t){this.jY=t,this.So(new mR(t))}},{key:"QY",get:function(){return this.XY}},{key:"kY",get:function(){var t;return null!=(t=this.KY)?t:this.HY.hq}},{key:"JY",get:function(){return this.ZY},set:function(t){this.ZY=t}}]),i}(uh);V(),It(),Bt(),Nt(),V(),It(),Nt();var pR=function(t){function i(){return t.call(this,"mI")||this}return Pt(i,t),i.prototype.xa=function(){return new _R},i}(Ig),_R=function(t){function i(){return t.call(this,"change")||this}return Pt(i,t),i}(ah);V(),It(),V(),It(),Nt(),Ut();var kR=function(t){function i(i,n,r){var e;(e=t.call(this,r)||this).$Y=void 0,e.Zf=void 0,e.tJ=function(t){Rg(t)&&Sr(function(){e.So(t.Ca)})},e.$Y=i,e.Zf=n;for(var s,u=Ft(e.Zf);!(s=u()).done;){var o=s.value;e.$Y.wn(o,e.tJ)}return e}return Pt(i,t),i.prototype.kn=function(){this.Vo();for(var t,i=Ft(this.Zf);!(t=i()).done;){var n=t.value;this.$Y.mn(n,this.tJ)}},i}(uh),bR=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).$Y=void 0,r.tJ=function(t){Rg(t)&&Sr(function(){r.So(t.Ca)})},r.$Y=i,r.$Y.lw(r.tJ),r}return Pt(i,t),i.prototype.kn=function(){this.Vo(),this.$Y.mw(this.tJ)},i}(hh);var AR=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).OO=0,i.VO=1/0,i.hu=void 0,i}Pt(i,t);var n=i.prototype;return n.hr=function(){0===this.OO&&this.VO===1/0||(this.OO=0,this.VO=1/0,this.So(new pR))},n.iJ=function(){return new OA([this.EO,this.PO],[!0,!0])},xt(i,[{key:"EO",get:function(){return this.OO},set:function(t){if(this.PO<=t)throw new p("Start time of a clip should be smaller than the end time.");this.OO!==t&&(this.OO=t,this.So(new pR))}},{key:"PO",get:function(){return this.VO},set:function(t){if(t<=this.EO)throw new p("End time of a clip should be larger than the start time.");this.VO!==t&&(this.VO=t,this.So(new pR))}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get startTime(){return t.EO},set startTime(i){t.EO=i},get endTime(){return t.PO},set endTime(i){t.PO=i},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new bR(t,n),n}(this)),this.hu}}]),i}(hh);V(),It(),Wt(),Bt(),Nt(),Yt();var TR=function(t){function i(n,r){var e;return(e=t.call(this,n)||this).eJ=void 0,e.nJ=!1,e.lJ=void 0,e.fJ=!1,e.oJ=function(){e.hJ(),e.sJ()},e.Nc=function(){e.aJ(),e.sJ(),e.dJ&&e.MP>=e.eJ.PO-i.vJ&&!e.UP&&(e.lJ=gI(e.Nc))},e.uJ=function(){e.fJ=!0},e.cJ=function(){e.fJ&&(e.fJ=!1,e.sJ())},e.eJ=r,e.eJ.wn("mI",e.oJ),e.PP.wn(ch._y,e.Nc),e}Pt(i,t);var n=i.prototype;return n.OP=function(i,n){var r=this.eJ.iJ().DM(i);t.prototype.OP.call(this,r,n),this.sJ()},n.VP=function(){return t.prototype.VP.call(this)||this.nJ},n.Tx=function(){return OA.jn(t.prototype.Tx.call(this)).Mn(this.eJ.iJ())._s()},n.Gx=function(){this.VP()?this.OP(this.rJ.start(0)):this.hJ(),t.prototype.Gx.call(this),this.sJ()},n.Ta=function(i,n){var r=this;return jt(function(){return zt(this,function(e){switch(e.label){case 0:return yr(n),this.nJ=!1,this.eJ.hr(),[4,t.prototype.Ta.call(r,i,n)];case 1:return e.sent(),[2]}})}).call(this)},n.kn=function(){return this.eJ.mn("mI",this.oJ),this.PP.mn(ch._y,this.Nc),this.aJ(),t.prototype.kn.call(this)},n.$x=function(i){switch(i.type){case ch.$w:return this.So(i),this.uJ(),!0;case ch.Zw:case ch.Cw:return this.So(i),this.cJ(),!0;case ch.Bw:if(this.dJ)return!0}return t.prototype.$x.call(this,i)},n.aJ=function(){this.lJ&&(wI(this.lJ),this.lJ=void 0)},n.sJ=function(){var t=this.MP,n=this.dJ&&t>=this.eJ.PO-i.fd;this.nJ&&!n?(this.nJ=!1,this.hx&&this.Gx()):this.nJ||!n||this.kx||this.fJ||(this.nJ=!0,this.So(new AT(t)),this.zx())},n.hJ=function(){if(this.ct!==1/0){var t=this.rJ,n=OA.jn(t).DM(this.MP);Pn(this.MP,n,i.fd)||this.OP(n)}},xt(i,[{key:"rJ",get:function(){return this.Tx().length?this.Tx():this.eJ.iJ()._s()}},{key:"dJ",get:function(){return this.eJ.PO=t},i.WJ=function(){var t=nA.Wy(MR);if(t)return DR.NJ(t)},i.XJ=function(t,i){this.fQ.HJ(t),this.jJ(i)},i.jJ=function(t){throw Ye(t.message),this.QJ.gQ(t.message),t},t}();V(),It(),Wt(),Bt(),Yt();var FR=function(){function t(){this.KJ=void 0,this.YJ=new Xa}var i=t.prototype;return i.HJ=function(t){this.KJ=t,this.YJ.Xy()},i.lQ=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.KJ?[2,ot.resolve(this.KJ)]:[4,this.YJ.Qy];case 1:return t.sent(),[2,this.KJ]}})}).call(this)},xt(t,[{key:"JJ",get:function(){return this.KJ}}]),t}();V(),It(),Bt(),Nt(),V(),It(),Nt();var UR=function(t){function i(){return t.call(this,"mI")||this}return Pt(i,t),i.prototype.xa=function(){return new VR},i}(Ig),VR=function(t){function i(){return t.call(this,"change")||this}return Pt(i,t),i}(ah);function jR(t){var i,n={get fontFamily(){return t.ZJ},set fontFamily(i){t.ZJ=i},get fontColor(){return t.$J},set fontColor(i){t.$J=i},get fontSize(){return t.tZ},set fontSize(i){t.tZ=i},get backgroundColor(){return t.iZ},set backgroundColor(i){t.iZ=i},get windowColor(){return t.eZ},set windowColor(i){t.eZ=i},get edgeStyle(){return t.sZ},set edgeStyle(i){t.sZ=i},get marginTop(){return t.nZ},set marginTop(i){t.nZ=i},get marginBottom(){return t.rZ},set marginBottom(i){t.rZ=i},get marginLeft(){return t.hZ},set marginLeft(i){t.hZ=i},get marginRight(){return t.oZ},set marginRight(i){t.oZ=i},addEventListener:function(t,n){var r=tw(t,Jg);i.wn(r,n)},removeEventListener:function(t,n){var r=tw(t,Jg);i.mn(r,n)}};return i=new oh(n),t.wn(["mI"],function(t){return i.So(t.Ca)}),n}V(),It();var HR={ZJ:void 0,$J:void 0,tZ:void 0,iZ:void 0,eZ:void 0,sZ:void 0,nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0},WR="THEOplayer.textTrackStyle.",zR=function(t){function i(){var n;return(n=t.call(this)||this).uZ=void 0,n.hu=void 0,n.uZ=i.dZ(),n}return Pt(i,t),i.prototype.er=function(t){this.uZ=io({},this.uZ,t),i.cZ(this.uZ),this.So(new UR)},i.dZ=function(){var t=io({},HR);return t.ZJ=nA.Wy(WR+"fontFamily")||t.ZJ,t.$J=nA.Wy(WR+"fontColor")||t.$J,t.tZ=nA.Wy(WR+"fontSize")||t.tZ,t.iZ=nA.Wy(WR+"backgroundColor")||t.iZ,t.eZ=nA.Wy(WR+"windowColor")||t.eZ,t.sZ=nA.Wy(WR+"edgeStyle")||t.sZ,t},i.cZ=function(t){nA.qy(WR+"fontFamily",t.ZJ||""),nA.qy(WR+"fontColor",t.$J||""),nA.qy(WR+"fontSize",t.tZ||""),nA.qy(WR+"backgroundColor",t.iZ||""),nA.qy(WR+"windowColor",t.eZ||""),nA.qy(WR+"edgeStyle",t.sZ||"")},xt(i,[{key:"aZ",get:function(){return this.uZ}},{key:"ZJ",get:function(){return this.uZ.ZJ},set:function(t){this.er({ZJ:t})}},{key:"$J",get:function(){return this.uZ.$J},set:function(t){this.er({$J:t})}},{key:"tZ",get:function(){return this.uZ.tZ},set:function(t){this.er({tZ:t})}},{key:"iZ",get:function(){return this.uZ.iZ},set:function(t){this.er({iZ:t})}},{key:"eZ",get:function(){return this.uZ.eZ},set:function(t){this.er({eZ:t})}},{key:"sZ",get:function(){return this.uZ.sZ},set:function(t){this.er({sZ:t})}},{key:"nZ",get:function(){return this.uZ.nZ},set:function(t){this.er({nZ:t})}},{key:"rZ",get:function(){return this.uZ.rZ},set:function(t){this.er({rZ:t})}},{key:"oZ",get:function(){return this.uZ.oZ},set:function(t){this.er({oZ:t})}},{key:"hZ",get:function(){return this.uZ.hZ},set:function(t){this.er({hZ:t})}},{key:"Ca",get:function(){return this.hu||(this.hu=jR(this)),this.hu}}]),i}(uh);function qR(t,i){var n,r;t.style.marginLeft=(null!=(n=i.hZ)?n:0)+"px",t.style.marginRight=(null!=(r=i.oZ)?r:0)+"px",t.style.width="calc(100% - "+t.style.marginLeft+" - "+t.style.marginRight+")"}V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It(),Bt(),Nt(),V(),It(),Wt(),Bt(),Nt(),H(),Ut(),Yt(),V(),It();var XR=[ch.uo,ch.jw,Mp.TM,ch._y,ch.Qw,ch.Ww,ch.$w,ch.Zw,ch.Bw,ch.Kw,ch.gy,ch.Rw,Mp.wI,ch.Jw,Jy.ma,mh.Dw,mh.Dy,ch.Pw,ch.Ew,ch.py,ch.yy,ch.LICENSE_REQUEST_GENERATED,ch.Fw,ch.Vw,ch.Lw,ch.Nw],GR={RL:!1};function QR(t){return void 0!==t.Rx}function YR(t){return t.Cd.Km===Op.wV}V(),It();var $R=function(t){return t.lZ="fZ",t}({}),KR=["fZ"],JR=function(t){return t[t.vZ=0]="vZ",t[t.BT=1]="BT",t[t._Z=2]="_Z",t}({});V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It(),Wt(),Bt(),Nt(),H(),Ut(),Yt();var ZR=["loadstart","encrypted","waitingforkey","webkitneedkey","msneedkey"],tC=function(t){return t.gZ="pZ",t.mZ="wZ",t.yZ="AZ",t}({}),iC=function(t){function i(i,n,r,e,s){var u;(u=t.call(this)||this).YS=void 0,u.TL=void 0,u._T=void 0,u.MZ=!1,u.LZ=new Xa,u.kZ=!1,u.ta=new Sd,u.PZ=void 0,u.hw=void 0,u.VJ=void 0,u.TS=void 0,u.RZ=function(){u.kZ=!0},u.CZ=function(){u.NZ(!0)},u.YS=i,u.TL=n,u._T=n.$W,u.PZ=r,u.hw=e,u.VJ=s,u._T.addEventListener("loadedmetadata",u.RZ);for(var o,h=Ft(ZR);!(o=h()).done;){var a=o.value;u._T.addEventListener(a,u.CZ)}return u}Pt(i,t);var n=i.prototype;return n.bZ=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,this.hw.nw(t.Ym,i)];case 1:return[4,r.sent().IS()];case 2:return n=r.sent(),[4,this.SZ(n)];case 3:return r.sent(),[2,n]}})}).call(this)},n.TZ=function(t){var i=this,n=this.TS;return n?0!==t.aq.length&&t.aq.some(function(t){return t.kS.Ym===n.kS}):0!==this.YS.aq.length?t.aq.some(function(t){return i.YS.aq.some(function(i){return t.kS===i.kS})}):0===t.aq.length||!this.kZ},n.EZ=function(t){return this.PZ.EZ(t),this.YS=t,ot.resolve()},n.xZ=function(t){this.PZ.xZ(t)},n.IZ=function(){if(!Oi.vg)return"";var t=this.VJ.ps5;return"; pass_through="+t.passThrough+'; playmode="'+t.playMode+'";'},n.zg=function(){return jt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:for(this.Vo(),this._T.removeEventListener("loadedmetadata",this.RZ),t=Ft(ZR);!(i=t()).done;)n=i.value,this._T.removeEventListener(n,this.CZ);return[4,this.ta.kn()];case 1:return r.sent(),this.DZ(),[4,this.PZ.hr()];case 2:return r.sent(),[4,this.BZ(void 0)];case 3:return r.sent(),[2]}})}).call(this)},n.NZ=function(t){t!==this.MZ&&(this.MZ=t,t?this.LZ.Xy(void 0):this.LZ=new Xa)},n.SZ=function(t){var i=this;return this.ta.Zo(function(){return i.BZ(t)})},n.BZ=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:if(t&&!this._T.src&&!this._T.srcObject)throw new vw(gd.CONTENT_PROTECTION_ERROR,"Attempted to attach MediaKeys to a sourceless MediaElement");if(!t&&(this._T.src||this._T.srcObject))throw new vw(gd.CONTENT_PROTECTION_ERROR,"Attempted to remove MediaKeys from a non-empty MediaElement");return!t||this.MZ?[3,2]:[4,this.LZ.Qy];case 1:n.sent(),n.label=2;case 2:return(i=this.TS)?[4,i.PS(this._T)]:[3,4];case 3:n.sent(),this.TS=void 0,n.label=4;case 4:return t?[4,t._n(this._T)]:[3,6];case 5:n.sent(),this.TS=t,n.label=6;case 6:return[2]}})}).call(this)},n.Ta=function(t,i){var n=this;return this.ta.Zo(function(){return n.OZ(t,i)})},n.OZ=function(t,i){this.NZ(!1);var n=this.TL.ux;if(qi(t)&&i){var r=this.FZ(t,i);this._T.appendChild(r)}else if(qi(t))this._T.src=t;else if(function(t){if(void 0!==f.ManagedMediaSource&&j(t,f.ManagedMediaSource))return!0;if("undefined"!=typeof MediaSource&&j(t,MediaSource))return!0;return!1}(t))if(function(t){return"srcObject"in t&&Oi.ru&&Oi.Q_>=17}(this._T))try{this._T.srcObject=t}catch(i){this._T.src=URL.createObjectURL(t)}else this._T.src=URL.createObjectURL(t);else nC(t)&&(this._T.srcObject=t);this.TL.ux=n},n.FZ=function(t,i){var n=v.createElement("source");return n.src=t,n.type=i+this.IZ(),n},n.UZ=function(t){var i=this;return this.ta.Zo(function(){return i.VZ(t)})},n.VZ=function(t){this.OZ(t),this._T.load()},n.DZ=function(){this.NZ(!1),Nr(this._T)},n.HZ=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.TS?[4,this.TS.hr()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})}).call(this)},xt(i,[{key:"Cd",get:function(){return this.YS}},{key:"$W",get:function(){return this._T}}]),i}(uh);function nC(t){return!("undefined"==typeof MediaStream||!j(t,MediaStream))}var rC=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.VY=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:switch((t=this.Cd).cq){case yA.aR:case yA.uR:this._T.setAttribute("crossorigin",t.cq);break;case yA.Lk:default:this._T.removeAttribute("crossorigin")}return void 0!==t.mx?this._T.preload=t.mx:this._T.preload=eS.TW,void 0!==t.dq?this._T.title=t.dq:wn(this._T),t.GZ?[4,this.UZ(t.GZ)]:[3,2];case 1:return i.sent(),[3,6];case 2:return Oi.vg?[4,this.Ta(t.iR,t.qT)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,this.Ta(t.iR)];case 5:i.sent(),i.label=6;case 6:return this.PZ.Un(this,t),[2]}})}).call(this)},n.TZ=function(t){return!1},n.EZ=function(t){return ot.resolve(void 0)},n.XZ=function(t){return!1},n.jZ=function(){return!nC(this.YS.GZ)},n.zg=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return wn(this._T),[4,t.prototype.zg.call(i)];case 1:return n.sent(),[2]}})}).call(this)},i.QZ=function(t,i){return!!i.canPlayType&&Boolean(i.canPlayType(t.qT))},xt(i,[{key:"IP",get:function(){return OA.jn(this._T.buffered)}},{key:"ct",get:function(){return this._T.duration}},{key:"WZ",get:function(){var t=this.ct;if(!isFinite(t))return!1;var i=this.IP;return 0!==i.V&&t-i.An(i.V-1)0||this._T.videoHeight>0))return this.IP}}]),i}(iC);V(),It(),Nt();var eC=function(t){function i(i){var n;return(n=t.call(this,ch.Qw)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var sC=function(t){function i(){return t.call(this,ch.Ww)||this}return Pt(i,t),i}(ah);V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Bt(),Nt();var uC=function(t){return t.KZ="YZ",t}({}),oC=function(t){function i(i){var n;return(n=t.call(this,"YZ")||this).JZ=void 0,n.JZ=i,n}return Pt(i,t),i}(ah),hC=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).$Z=OA.iL(),i}Pt(i,t);var n=i.prototype;return n.t$=function(t,i){var n=new OA([t,i]);this.$Z=this.$Z.OM(n),this.So(new oC(n))},n.i$=function(t,i){this.$Z=this.$Z.UM(new OA([t,i]))},n.hr=function(){this.$Z=OA.iL()},n.kn=function(){this.Vo()},xt(i,[{key:"ZZ",get:function(){return this.$Z}}]),i}(uh);function aC(t,i){return void 0===i&&(i=new Jd({highWaterMark:1/0})),new $d(new cC(t,i),{highWaterMark:0})}V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It();var cC=function(){function t(t,i){var n=this,r=i.size,e=void 0===r?function(){return 1}:r,s=i.highWaterMark,u=void 0===s?1:s;this.Wd=void 0,this.u$=void 0,this.h$=void 0,this.tf=[],this.if=0,this.YJ=void 0,this.r$=!1,this.o$=void 0,this.a$=function(t){return t.done?(n.n$(),void n.YJ.close()):(n.tf.push(t.value),n.if+=n.u$(t.value),n.r$&&n.n$(),n.e$()?n.Wd.read().then(n.a$):void 0)},this.EE=function(t){n.n$(),n.YJ.error(t)},this.Wd=t.getReader(),this.u$=e,this.h$=u}var i=t.prototype;return i.start=function(t){this.YJ=t,this.e$()&&this.s$()},i.pull=function(){this.tf.length>0?this.n$():this.r$=!0,this.e$()&&this.s$()},i.cancel=function(t){return tr(this.tf),this.if=0,this.r$=!1,this.Wd.cancel(t)},i.n$=function(){if(0!==this.tf.length){var t=this.tf;this.tf=[],this.if=0,this.r$=!1,this.YJ.enqueue(t)}},i.e$=function(){return!!this.r$||this.h$-this.if>0},i.s$=function(){var t=this;if(!this.o$){var i=this.Wd.read().then(this.a$).catch(this.EE);this.o$=i;var n=function(){t.o$===i&&(t.o$=void 0)};i.then(n,n)}},t}();V(),It(),V(),It(),Bt(),Nt(),H(),Ut(),V(),It(),Ut(),V(),It();var fC=function(){function t(){this.d$=[],this.Vy=0}var i=t.prototype;return i.c$=function(t){this.d$.push(t),this.Vy+=t.byteLength},i.l$=function(t){if(this.Vy<=t)return this.f$();for(var i=this.d$,n=0,r=0;r0&&nthis.tf.Vy)return;switch(this.Ra){case 0:this.E$(t);break;case 1:this.P$(t);break;case 2:this.x$(t)}}},i.I$=function(){this.Ra=0,this.k$=8},i.E$=function(t){var i=Aa(this.tf.v$(this.k$)),n=new Pa,r=Ay._D(i,n);if(!r.cD)return this.k$=r.pD,void(t&&this.k$>this.tf.Vy&&this.R$(this.tf.Vy));var e=r.gD.Km,s=r.gD.Vy;0===s&&(s=1/0),this.w$(e,s),this.C$(e)?this.D$(s):this.R$(s)},i.D$=function(t){this.Ra=1,this.k$=t},i.P$=function(t){var i=Aa(this.tf.p$(this.k$)),n=new Pa,r=Ay.dD(i,n,!t);if(!r.cD)throw new by(n.ac);this.y$(),this.B$(r.lD),this.I$()},i.R$=function(t){this.Ra=2,this.k$=0,this.N$=t},i.x$=function(t){var i=this.tf._$(this.N$);this.N$-=i.Vy;for(var n,r=Ft(i.d$);!(n=r()).done;){var e=n.value;this.M$(e)}(0===this.N$||t&&this.N$===1/0)&&(this.y$(),this.I$())},t}();function dC(t){return j(t,Xf)}function lC(t){return j(t,zf)}function gC(t){return j(t,jf)||j(t,Hf)}function wC(t){return j(t,vf)}function mC(t){return j(t,jc)}function yC(t){return j(t,Bf)}function pC(t){return j(t,Df)}function _C(t){return j(t,sv)}function kC(t){return j(t,rv)}function bC(t){return j(t,Jf)}function AC(t){return j(t,iv)}function TC(t,i){var n=Wn(t.boxes,bC);if(n&&n.flags.baseDataOffsetPresent)n.baseDataOffset=n.baseDataOffset.add(i);else for(var r,e=Ft(t.boxes);!(r=e()).done;){var s=r.value;j(s,iv)&&s.flags.dataOffsetPresent&&(s.dataOffset=s.dataOffset+i)}}V(),It(),H(),Ut();var SC=function(t){function i(i){var n;return(n=t.call(this)||this).YJ=void 0,n.Q$=void 0,n.H$=void 0,n.q$=eo(),n.Q$=i,n}Pt(i,t);var n=i.prototype;return n.start=function(t){this.YJ=t},n.transform=function(t){this.A$(t)},n.flush=function(){this.S$()},n.C$=function(t){return t===gy.OR||t===gy.IC||t===gy.HC},n.B$=function(t){var i=this.L$(t);this.YJ.enqueue(i)},n.M$=function(t){this.YJ.enqueue(t)},n.L$=function(t){var i=Ta(t.ck.ck);switch(t.Km){case"moov":return this.O$(i);case"sidx":return this.F$(i);case"moof":return this.U$(i)}return i},n.W$=function(t){var i=this.q$.get(t);if(void 0===i)throw new p("Expected to have found a media header timescale for track ID "+t+".");return i},n.O$=function(t){for(var i=Av(t),n=0;n>2,h=!!(2&u),a=Gh(t,i,3),c=Kh(t,i),f=Kh(t,i);if(i.ac=n)){var r=t.Wy(i.byte);return i.byte+=1,r}}function MC(t,i){return function(t,i,n){for(var r=0,e=n;e>0;)e-=1,r=256*r+OC(t,i);return r}(t,i,2)}V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),Bt(),Ut();var LC=function(){function t(){this.H0=0,this.V0=[],this.DU={}}var i=t.prototype;return i.U0=function(t){this.V0=this.V0.concat(t.V0),this.H0+=t.V},i.W0=function(t,i,n){var r=this.H0,e=n-i;e>0&&(this.V0.push({q0:i,z0:n,G0:e,X0:r,j0:t}),this.H0+=e)},i.Wy=function(t){for(var i,n=Ft(this.V0);!(i=n()).done;){var r=i.value;if(r.X0<=t&&t=this.H0))if(this.H0=t,0!==t)for(var r=i.length-1;r>=0;r-=1){var e=i[r];if(n<=e.G0)return e.z0-=n,e.G0-=n,void(i.length!==r+1&&(i.length=r+1));n-=e.G0}else i.length=0}},{key:"ck",get:function(){for(var t,i=new Array(this.H0),n=0,r=Ft(this.V0);!(t=r()).done;)for(var e=t.value,s=e.z0,u=e.q0;u0;)e-=1,r=2*r+UC(t,i);return r}function jC(t,i){for(var n=0;0===UC(t,i)&&n<32;)n+=1;return VC(t,i,n)+A.pow(2,n)-1}function HC(t,i){var n=jC(t,i);return 1&n?A.floor((n+1)/2):-A.floor(n/2)}function WC(t,i){var n,r=[],e={byte:1};do{r.push(qC(t,i,e)),n=i.Wy(e.byte)}while(void 0!==n&&128!==n);return r}function zC(t,i){var n,r=0;do{r+=n=OC(t,i)}while(255===n);return r}function qC(t,i,n){var r=zC(i,n),e=zC(i,n),s=n.byte,u=s+e;return n.byte=u,{Y0:t,J0:r,Z0:e,$0:s,t1:u,i1:i}}var XC=function(t){return t[t.e1=1]="e1",t[t.s1=2]="s1",t[t.n1=3]="n1",t[t.h1=4]="h1",t[t.o1=5]="o1",t[t.a1=6]="a1",t[t.u1=7]="u1",t[t.c1=8]="c1",t[t.d1=9]="d1",t}({}),GC=[void 0,[1,1],[12,11],[10,11],[16,11],[40,33],[24,11],[20,11],[32,11],[80,33],[18,11],[15,11],[64,33],[160,99],[4,3],[3,2],[2,1]];function QC(t,i,n){for(var r=8,e=8,s=0;s=2&&t.push(i),e=0)}this._1=i-t.length},i.m1=function(t){for(var i,n=t,r=Ft(this.v1);!(i=r()).done;){if(!(i.value<=n))return n;n+=1}return n},i.Wy=function(t){if(!(t>this.g1.V))return t>this._1&&this.l1(),this.g1.Wy(this.m1(t))},t}();function $C(t){var i,n,r,e,s,u,o=new YC(t),h=0,a=0,c=0,f=0,v=o.Wy(1),d={bit:32};if(jC(o,d),100===v||110===v||122===v||144===v){var l=jC(o,d);if(3===l&&(i=UC(o,d)),jC(o,d),jC(o,d),UC(o,d),1===UC(o,d))for(var g=0;g<(3!==l?8:12);g+=1){1===UC(o,d)&&QC(o,d,g<6?16:64)}}var w=jC(o,d),m=jC(o,d);if(0===m)jC(o,d);else if(1===m){UC(o,d),HC(o,d),HC(o,d);for(var y=jC(o,d),p=0;p>3),C);n.Ny(8*C),I.push({P1:C,I1:P})}b.push({R1:T,C1:S,D1:E,B1:I})}return{D0:r,N1:e,M1:s,L1:u,O1:h,F1:c,U1:f,V1:v,H1:o,W1:d,q1:l,z1:g,G1:w,X1:y,j1:p,Q1:m,L0:_,K1:k,Y1:b}}(Aa(t.JB.ck),new Pa);i=function(t,i){var n=t.toString()+".";switch(i.N1){case 0:break;case 1:n+="A";break;case 2:n+="B";break;case 3:n+="C";break;default:return}switch(n+=i.L1.toString()+".",n+=function(t){var i=t;return i=i>>>1&1431655765|(1431655765&i)<<1,i=i>>>2&858993459|(858993459&i)<<2,i=i>>>4&252645135|(252645135&i)<<4,i=i>>>8&16711935|(16711935&i)<<8,i=i>>>16|i<<16,i}(i.H1).toString(16)+".",i.M1){case 0:n+="L";break;case 1:n+="H";break;default:return}n+=i.F1.toString();for(var r=i.O1.reduce(function(t,i){return 0===t?i:i+1},0),e=0;e0?t.An(t.V-1):0,this.I3.D3()},i.A3=function(){this.R3=void 0},xt(t,[{key:"IP",get:function(){if(this.I3.Ax===EP._3)return OA.iL();var t=OA.jn(this.U2.buffered).Mn(OA.eL()),i=this.R3;return void 0!==i&&t.V>0&&t.An(t.V-1)===i&&(t=t.OM(OA.$M(i))),t}}]),t}();function lP(t,i,n,r,e,s,u){var o=new dP(e,t),h=new fP(o,t,e,n,s);return new gP(t,i,n,r,o,h,u)}var gP=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this)||this).d3=void 0,h.YS=void 0,h.N3=void 0,h.TL=void 0,h.GS=void 0,h.L3=void 0,h.e3=void 0,h.O3=void 0,h.H3=ro(),h.d3=i,h.YS=r,h.GS=r.qT,h.N3=e,h.TL=n,h.e3=s,h.O3=u,h.L3=o,h.O3.wn($R.lZ,h.Rs),h}Pt(i,t);var n=i.prototype;return n.WZ=function(){return this.e3.WZ()},n.C3=function(){this.e3.C3()},n.A3=function(){this.e3.A3(),this.O3.A3()},n.F3=function(t,i){this.L3.t$(t,i)},n.U3=function(t,i){this.L3.i$(t,i)},n.V3=function(){return this.O3.l3()},n.H2=function(t,i,n){return this.O3.H2(t,i,n)},n.z2=function(t,i,n){return this.O3.z2(t,n)},n.r3=function(t,i){return Oi.w_&&Oi.A_<3?this.O3.r3(t,1/0):this.O3.r3(t,i)},n._S=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return this.U3(t,i),r=this.IP,[4,this.O3.u3(t,i,n)];case 1:return s.sent(),e=0!==r.V&&0===this.IP.V,(Oi.rg||Oi.S_)&&e&&this.TL.My(this.TL.MP),[2]}})}).call(this)},n.TZ=function(t){var i=t.qT;if(this.GS===i)return!0;var n=this.H3.get(i);if(void 0!==n)return n;var r=this.W3(t);return this.H3.set(i,r),r},n.W3=function(t){var i=this.d3.m3(t.qT);if(void 0===i)return!1;var n=$v(this.GS),r=$v(i),e=nP(n),s=nP(r);if(this.O3.f3()){if(!function(t,i){return cr(t,i,sP)}(e,s))return!1;if(Oi.og&&!function(t,i){return cr(t,i,eP)}(e,s))return!1}else{if(n.Km!==r.Km)return!1;if(!rP(e,s))return!1}return!0},n.EZ=function(t){return jt(function(){var i;return zt(this,function(n){return i=t.qT,this.GS!==i&&(this.H3.clear(),this.O3.EZ(t),this.GS=i),this.YS=t,this.d3.q3(),[2]})}).call(this)},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:this.H3.clear(),this.Vo(),this.L3.kn(),t.label=1;case 1:return t.trys.push([1,3,,4]),this.O3.mn($R.lZ,this.Rs),[4,this.O3.zg()];case 2:return t.sent(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}})}).call(this)},xt(i,[{key:"IP",get:function(){return this.e3.IP}},{key:"Cd",get:function(){return this.YS}},{key:"qT",get:function(){return this.GS}},{key:"B3",get:function(){return this.N3}},{key:"M3",get:function(){return this.L3.ZZ}},{key:"MY",get:function(){return this.O3.MY},set:function(t){this.O3.MY=t}},{key:"UY",get:function(){return this.O3.UY},set:function(t){this.O3.UY=t}},{key:"ga",get:function(){return this.O3.ga}}]),i}(uh);V(),It();var wP=function(){function t(t,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=!1),this.Tn=void 0,this.An=void 0,this.G3=void 0,this.X3=void 0,this.j3=void 0,this.Tn=t,this.An=i,this.G3=n,this.X3=r,this.j3=Vi.Mg()}return t.prototype.z3=function(){var t=this.Tn,i=this.An;if(this.G3||this.X3){var n=.001*(Vi.Mg()-this.j3);this.G3&&(t+=n),this.X3&&(i+=n)}return OA.tL(t,i)},t}();function mP(t){var i=[];if(t.Q3&&i.push(t.Q3.IP),t.K3&&i.push(t.K3.IP),0===i.length)return OA.iL();for(var n,r=0,e=Ft(i);!(n=e()).done;){var s=n.value;s.V>0&&(r=A.max(r,s.An(s.V-1)))}for(var u,o=t.WZ,h=new OA([0,r],[!0,o]),a=Ft(i);!(u=a()).done;){var c=u.value;o&&c.V>0&&(c=c.OM(new OA([c.An(c.V-1),r],[!0,!0]))),h=h.Mn(c)}return h}function yP(t,i,n){var r,e=t.IP,s=e.VM(i);if(s>=0){if(!(s+1=0))return ot.resolve();r=e.Tn(s)}return t._S(r,1/0,n)}function pP(t,i,n){if(!t.Cr(i)){var r=t.VM(i,n);if(r>=0){var e=t.Tn(r);if(i0&&r>i+e.T4){var u,o,h=e.ZZ.CM().UM(s),a=h.QM(n);if(-1!==a){var c=h.Tn(a);if(c-n<1||e.w4()){var f=h.An(a);0,u=f}}if(!u)(u=null==(o=e.E4)?void 0:o.determineStallJumpTarget())&&u!==n||(u=n+.01*e.S4,s.Cr(u)||(u=e.A4(n,s)));0,e.b4=u,e.S4++,e.T4=A.min(2*e.T4,1e4),e.a4(u)}},this.i4.wn(Mp.wI,this.e4),this.TL.wn(ch.Qw,this.e4),this.TL.wn(kP,this.s4),this.E4=r,this.T4=Vi._P?2e3:1e3}var i=t.prototype;return i.Y3=function(t){this.J3.push(t),t.wn(uC.KZ,this.Z3)},i.kn=function(){var t=this;this.t4(),this.i4.mn(Mp.wI,this.e4),this.TL.mn(ch.Qw,this.e4),this.TL.mn(kP,this.s4),this.J3.forEach(function(i){return i.mn(uC.KZ,t.Z3)}),this.n4(),this.r4=!0},i.XZ=function(t){if(this.TL.UP)return!1;if(0!==this.h4)return!1;var i=this.e3.IP,n=i.VM(t);if(n>=0&&t+_P=0?n+1:i.KM(t);if(r<0||r>=i.V)return!1;var e=i.Tn(r);return!(OA.tL(t,e).UM(this.ZZ).ZM>1)&&(0!==t||this.TL.kx?Vi.fP?(this.o4(t,e,250),!0):!(A.abs(e-t)<=.001)&&(this.a4(e),!0):(this.o4(t,e,2e3),!0))},i.o4=function(t,i,n){var r=this;this.n4(),this.u4=t,this.TL.wn(ch.$w,this.c4),this.h4=Vi.Og(function(){r.u4===r.TL.MP&&r.a4(i),r.n4()},n)},i.n4=function(){0!==this.h4&&(this.TL.mn(ch.$w,this.c4),Vi.Lg(this.h4),this.h4=0)},i.a4=function(t){this.TL.My(t,!1,!0)},i.d4=function(){0!==this.l4&&(Vi.Lg(this.l4),this.l4=0),this.TL.mn(ch._y,this.ad)},i.f4=function(){this.r4||0===this.v4&&(this.d4(),this.v4=Vi.fm(this._4,250))},i.t4=function(){0!==this.v4&&(Vi.vm(this.v4),this.v4=0),this.d4(),this.TL.kx||(this.g4=0)},i.m4=function(){return!this.TL.hx&&(!this.TL.kx||this.w4())&&0!==this.TL.ux&&!this.TL.UP&&!this.TL.lt&&(this.y4()||this.i4.Ax>=Up.WL)},i.w4=function(){return!1},i.y4=function(){var t=this.TL.MP,i=this.e3.IP,n=i.VM(t);return-1!==n&&i.An(n)>t+_P},i.A4=function(t,i){var n=i.VM(t);return n>-1?i.An(n):t},xt(t,[{key:"ZZ",get:function(){return this.J3.reduce(function(t,i){return t.OM(i.ZZ)},OA.iL())}}]),t}(),AP=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.w4=function(){if(!Oi.S_||!this.TL.kx)return!1;var t=this.TL.MP,i=this.e3.IP,n=this.ZZ.CM().UM(i),r=n.QM(t);return-1!==r&&n.Tn(r)-t<=3e3},i}(bP),TP=Oi.N_||Oi.L_,SP=Oi.W_||Oi.X_||Oi.ru,EP=function(t){return t._3="closed",t.sE="open",t.Bw="ended",t}({}),IP=function(t){function i(i,n,r,e,s,u,o,h){var a;return void 0===u&&(u=new Oe(i.X4)),(a=t.call(this,i,n,e,s,h)||this).G4=void 0,a.P4=void 0,a.U4=void 0,a.x4=void 0,a.V4=void 0,a.N4=new wP(0,1/0),a.iq=void 0,a.I4=void 0,a.R4=void 0,a.F4=void 0,a.H4=!1,a.q4=function(){a.So(new ah(tC.mZ))},a.j4=function(){a.So(new ah(tC.yZ))},a.bd=function(){a.W4()},a.P3=function(){a.TL.P3()},a.G4=u,a.iq=a.G4.Lp(),a.iq.addEventListener("sourceclose",a.q4),a.iq.addEventListener("sourceopen",a.j4),a.TL.wn([ch._y,ch.$w,ch.Fw],a.bd),a.F4=new AP(a,r,a.TL,o),a}Pt(i,t);var n=i.prototype;return n.C4=function(t){if(t<0)throw new p("Invalid duration");this.D4()?this.B4(t):this.I4=t},n.B4=function(t){var i=t===1/0;if(i&&this.iq.setLiveSeekableRange){var n=A.pow(2,39);this.iq.setLiveSeekableRange(0,n)}E(t)?(this.iq.duration=In,this.R4=NaN):(this.iq.duration=i?SP?1/0:In:t,this.R4=void 0),this.I4=void 0},n.M4=function(t,i,n,r){this.N4=new wP(t,i,Boolean(n),Boolean(r))},n.VY=function(){return jt(function(){var t,i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:return t=this.YS,i=Wn(t.L4,function(t){return qv(t.qT)}),n=Wn(t.L4,function(t){return Xv(t.qT)}),this._T.disableRemotePlayback=!0,[4,this.O4()];case 1:return c.sent(),r=this.IZ(),i&&(e=new hC,this.F4.Y3(e),u=null!=(s=this.m3(i.qT))?s:i.qT,this.U4=this.iq.addSourceBuffer(""+u+r),this.P4=lP(this,this.TL,i,cw.Dk,this.U4,u,e),this.P4.wn($R.lZ,this.P3)),n&&(o=new hC,this.F4.Y3(o),a=null!=(h=this.m3(n.qT))?h:n.qT,this.V4=this.iq.addSourceBuffer(""+a+r),this.x4=lP(this,this.TL,n,cw.Bk,this.V4,a,o),this.x4.wn($R.lZ,this.P3)),this.PZ.Un(this,t),[2]}})}).call(this)},n.O4=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.UZ.call(i,this.iq)];case 1:return n.sent(),"open"===this.Ax?[3,3]:[4,hg(this.iq,"sourceopen")];case 2:n.sent(),n.label=3;case 3:return[2]}})}).call(this)},n.D4=function(){if("open"!==this.Ax)return!1;var t=this.P4&&this.P4.ga,i=this.x4&&this.x4.ga;return!(t||i)},n.C3=function(){this.H4=!0,this.P4&&this.P4.C3(),this.x4&&this.x4.C3(),this.H4=!1,this.W4()},n.A3=function(){this.P4&&this.P4.A3(),this.x4&&this.x4.A3()},n.TZ=function(i){var n=Wn(i.L4,function(t){return qv(t.qT)}),r=Wn(i.L4,function(t){return Xv(t.qT)});if(this.P4){if(!n)return!1;if(!this.P4.TZ(n))return!1}else if(n)return!1;if(this.x4){if(!r)return!1;if(!this.x4.TZ(r))return!1}else if(r)return!1;return!!t.prototype.TZ.call(this,i)},n.EZ=function(i){var n=this;return jt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:return r=Wn(i.L4,function(t){return qv(t.qT)}),e=Wn(i.L4,function(t){return Xv(t.qT)}),s=[],this.P4&&s.push(this.P4.EZ(r)),this.x4&&s.push(this.x4.EZ(e)),[4,ot.all(s)];case 1:return u.sent(),[4,t.prototype.EZ.call(n,i)];case 2:return u.sent(),[2]}})}).call(this)},n.xZ=function(i){t.prototype.xZ.call(this,i)},n.zg=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.iq.removeEventListener("sourceclose",this.q4),Oi.S_?[4,this.HZ()]:[3,2];case 1:n.sent(),n.label=2;case 2:return this.P4?[4,this.P4.zg()]:[3,4];case 3:if(n.sent(),this.P4=void 0,rh()&&(Oi.S_||Oi.w_))try{this.iq.removeSourceBuffer(this.U4)}catch(t){}this.U4=void 0,n.label=4;case 4:return this.x4?[4,this.x4.zg()]:[3,6];case 5:if(n.sent(),this.x4=void 0,rh()&&(Oi.S_||Oi.w_))try{this.iq.removeSourceBuffer(this.V4)}catch(t){}this.V4=void 0,n.label=6;case 6:return this._T.src&&URL.revokeObjectURL(this._T.src),this._T.disableRemotePlayback=!1,this.TL.mn([ch._y,ch.$w,ch.Fw],this.bd),this.F4.kn(),Oi.w_?[4,this.HZ()]:[3,8];case 7:n.sent(),n.label=8;case 8:return[4,t.prototype.zg.call(i)];case 9:return n.sent(),[2]}})}).call(this)},n.q3=function(){var t=this,i=this.YS,n=i.L4.map(function(i){return qv(i.qT)&&t.P4?t.P4.Cd:Xv(i.qT)&&t.x4?t.x4.Cd:i});this.YS=io({},i,{L4:n})},n.D3=function(){this.H4||this.W4()},n.W4=function(){this.z4&&this.D4()&&(this.iq.endOfStream(),this.I4=void 0,this.R4=void 0,this.So(new ah(tC.gZ)),this.TL.P3())},n.S3=function(){this.D4()&&(this.WZ?this.W4():void 0!==this.I4&&this.B4(this.I4))},n.XZ=function(t){return this.F4.XZ(t)},n.jZ=function(){return!0},n.m3=function(t){return RP(this.G4,t)},i.QZ=function(t){var i=Me(t.X4);if(void 0===i)return!1;if("function"!=typeof i.isTypeSupported)return!1;for(var n,r=new Oe(t.X4),e=Ft(t.L4);!(n=e()).done;){if(void 0===RP(r,n.value.qT))return!1}return!0},xt(i,[{key:"Q3",get:function(){return this.P4}},{key:"K3",get:function(){return this.x4}},{key:"ct",get:function(){if(void 0!==this.I4)return this.I4;if(void 0!==this.R4)return this.R4;var t=this.iq.duration;return t===In?1/0:t}},{key:"IP",get:function(){return TP?mP(this):function(t,i){var n=i;return n.V>0&&t.WZ&&(n=n.OM(OA.$M(n.An(n.V-1)))),n}(this,OA.jn(this._T.buffered))}},{key:"qZ",get:function(){var t;return null==(t=this.P4)?void 0:t.IP}},{key:"zZ",get:function(){var t;return null==(t=this.x4)?void 0:t.IP}},{key:"Sx",get:function(){return this.N4.z3().Mn(new OA([0,this.ct],[!0,!0]))}},{key:"WZ",get:function(){return(!this.P4||this.P4.WZ())&&(!this.x4||this.x4.WZ())}},{key:"Ax",get:function(){return this.iq.readyState}},{key:"z4",get:function(){if(!this.WZ)return!1;var t=this.IP;return 0!==t.V&&t.Tn(t.V-1)<=this.TL.MP}}]),i}(iC);function RP(t,i){var n=$v(i),r=nP(n),e="audio/mp4"===n.Km,s=e&&1===r.length&&"mp4a.40.34"===r[0];if(t.Fp(i)&&(!s||!Oi.X_))return i;if(s)for(var u,o=Ft(['audio/mp4; codecs="mp3"',"audio/mpeg"]);!(u=o()).done;){var h=u.value;if(t.Fp(h))return h}if(e&&1===r.length&&"flac"===r[0].toLowerCase())for(var a,c=Ft(["flac","fLaC","FLAC"]);!(a=c()).done;){var f='audio/mp4; codecs="'+a.value+'"';if(t.Fp(i))return f}}V(),It(),Bt(),Nt(),V(),It(),Nt();var CP=function(t){function i(i){var n;return(n=t.call(this,ch.Fw)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah),PP=[ch.gy,ch.Kw,ch.$w,ch.Fw,ch.uo,ch.jw],NP=function(t){function i(i,n,r,e,s,u,o,h,a,c,f){var v;return(v=t.call(this)||this).bz=void 0,v.WA=void 0,v.Z4=void 0,v.kz=void 0,v.Sz=void 0,v.Tz=void 0,v.Ez=void 0,v.ib=void 0,v.t5=void 0,v.K4=void 0,v.J4=void 0,v.bz=i,v.WA=n,v.Z4=r,v.kz=e,v.Sz=s,v.Tz=u,v.Ez=o,v.ib=h,v.t5=a,v.K4=c,v.J4=f,v}Pt(i,t);var n=i.prototype;return n.My=function(t,i,n){this.bz!==t&&(this.bz=t,this.K4=i,n&&!this.Sz?(this.J4=!0,this.So(new CP(this.MP))):(this.J4=!1,this.Sz=!0,this.So(new TT(this.MP))))},n.zx=function(){this.kz||(this.kz=!0,this.So(new pT(this.MP)))},n.Gx=function(){this.kz&&(this.kz=!1,this.So(new _T(this.MP)))},n.zg=function(){this.Vo()},xt(i,[{key:"MP",get:function(){return this.bz}},{key:"Q4",get:function(){return this.K4}},{key:"Y4",get:function(){return this.J4}},{key:"ct",get:function(){return this.WA}},{key:"UP",get:function(){return this.Z4}},{key:"hx",get:function(){return this.kz}},{key:"Ax",get:function(){return this.t5}},{key:"kx",get:function(){return this.Sz}},{key:"$P",get:function(){return this.Tz},set:function(t){this.$P!==t&&(this.Tz=t,this.So(new ET(this.MP,this.Mx)))}},{key:"ux",get:function(){return this.Ez},set:function(t){this.ux!==t&&(this.Ez=t,this.So(new bT(this.MP,this.ux)))}},{key:"Mx",get:function(){return this.ib},set:function(t){this.Mx!==t&&(this.ib=t,this.So(new ET(this.MP,this.Mx)))}}]),i}(uh);function DP(t){return new NP(t.MP,t.ct,t.UP,t.hx,t.kx,t.$P,t.ux,t.Mx,t.Ax,!1,t.Y4)}function xP(t,i){i.ct===t.ct||E(i.ct)&&E(t.ct)||t.So(new kT(t.ct)),t.$P=i.$P,t.Mx=i.Mx,t.ux=i.ux,i.hx?t.zx():t.Gx().catch(yn),i.MP!==t.MP||i.Ax>Up.VL&&t.Ax===Up.VL?t.My(i.MP,i.Q4,i.Y4):!i.kx&&t.kx?t.So(new TT(t.MP)):i.kx&&!t.kx&&t.Ax>=Up.HL&&t.So(new ST(t.MP)),!i.UP&&t.UP&&t.So(new AT(t.MP))}V(),It(),Nt(),Ut(),V(),It(),Bt(),Nt();var BP=function(t){function i(i){var n;return(n=t.call(this)||this).TL=void 0,n.EV=Up.VL,n.s5=function(){n.e5()},n.TL=i,n}Pt(i,t);var n=i.prototype;return n.i5=function(t){this.EV!==t&&(this.EV=t,this.So(new Fp(this.TL.MP,t)))},n.e5=function(){this.i5(this.bx())},n.hr=function(){this.i5(Up.VL)},n.zg=function(){this.Vo()},xt(i,[{key:"Ax",get:function(){return this.bx()}}]),i}(uh);V(),It(),Nt(),Ut();var OP=["emptied","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","timeupdate","progress","seeking","seeked"],MP=function(t){function i(i){var n;n=t.call(this,i)||this;for(var r,e=Ft(OP);!(r=e()).done;){var s=r.value;n.TL.$W.addEventListener(s,n.s5)}return n}Pt(i,t);var n=i.prototype;return n.bx=function(){var t=this.TL.$W.readyState;return t>Up.HL&&this.TL.n5?Up.HL:(this.TL.$W.seeking&&t>Up.Qn&&(t=Up.Qn),t)},n.zg=function(){for(var i,n=Ft(OP);!(i=n()).done;){var r=i.value;this.TL.$W.removeEventListener(r,this.s5)}t.prototype.zg.call(this)},i}(BP);V(),It();var LP=me,FP=function(t){function i(i){var n;(n=t.call(this,i)||this).TL.wn([ch.$w,ch.Fw],n.s5);for(var r,e=Ft(OP);!(r=e()).done;){var s=r.value;n.TL.$W.addEventListener(s,n.s5)}return n}Pt(i,t);var n=i.prototype;return n.bx=function(){if(this.TL.$W.readyState===Up.VL)return Up.VL;var t=this.r5(),i=t?t.An-t.Tn:0;if(!t)return Up.Qn;var n=this.TL.ux;return this.h5()||i>=3*n?Up.qL:i>=3?Up.WL:Up.HL},n.r5=function(){var t=this.TL.MP,i=this.TL.IP.LM(.04),n=i.VM(t);if(!(n<0))return{Tn:t,An:i.An(n)}},n.h5=function(){if(this.TL.UP)return!0;var t=this.TL.ct,i=this.r5();return!!i&&t-i.An<=LP},n.zg=function(){this.TL.mn([ch.$w,ch.Fw],this.s5);for(var i,n=Ft(OP);!(i=n()).done;){var r=i.value;this.TL.$W.removeEventListener(r,this.s5)}t.prototype.zg.call(this)},i}(BP);V(),It(),Nt(),V(),It(),Nt();var UP=[Mp.wI,ch.uo,ch.jw,ch.$w,ch.Zw,ch.Fw,ch.Vw,ch.Bw,Jy.ma],VP=function(t){function i(i){var n;return(n=t.call(this)||this).PV=void 0,n.c5=!1,n.xK=function(){n.er()},n.PV=i,n.PV.wn(UP,n.xK),n}Pt(i,t);var n=i.prototype;return n.o5=function(){return(!this.PV.Y4||!this.PV.a5)&&this.PV.Axi}function zP(t,i){return function(t,i){return Vn(t.EO,i.EO,nm)}(t,i)||function(t,i){return Vn(t.PO,i.PO,nm)}(t,i)}function qP(t,i){return function(t,i){return Vn(t.MO,i.MO,nm)}(t,i)||function(t,i){return Vn(t.LO,i.LO,nm)}(t,i)}function XP(t,i,n){var r=function(t,i,n,r,e,s,u){void 0===e&&(e=!1),void 0===s&&(s=0),void 0===u&&(u=t.length);for(var o=s,h=u-1;o<=h;){var a=o+(h-o>>1),c=r(n(t[a]),i);if(c<0)o=a+1;else if(c>0)h=a-1;else{if(!(e&&a>s&&0===r(n(t[a-1]),i)))return a;h=a-1}}return~o}(t,i,pn,n,!0);if(r<0)return r;for(;r=0?r:-(r+1)}function QP(t){var i=t.Ht;if(!i)return-1;if(j(t,em))return i.l5(t);var n=i.L;if(!n)return-1;var r=XP(n.II,t,zP);return r>=0?r:-1}function YP(t,i){var n=function(t,i,n){for(var r=t.length,e=i.length,s=0,u=0,o=[],h=[];s=0;n-=1){var r=i[n];if(t.zO(r))return!0}return!1},i.Wy=function(t){return this._5[t]},xt(t,[{key:"II",get:function(){return this._5}},{key:"V",get:function(){return this._5.length}},{key:"Ca",get:function(){if(this.hu){var t=this._5;this.hu.length=t.length;for(var i=0;i=0)){t.Ht=this;var n=-(i+1);this.x5.splice(n,0,t);var r=GP(this.L.II,t,zP);this.I5(t,r),this.So(new iN(t))}}},n.I5=function(t,i){this._5.splice(i,0,t),this.R5(i),t.jO=i,i=0&&$n(n,r);var e=XP(this.x5,t,qP);e>=0&&$n(this.x5,e),t.Ht=void 0,this.C5(t,i),this.So(new rN(t))}}},n.C5=function(t,i){$n(this._5,i),this.R5(i),t.jO=-1,this.E5>i&&--this.E5},n.UO=function(t){if(t&&t.Ht===this){var i=this.l5(t);if(!(i<0)){this.C5(t,i);var n=GP(this.L.II,t,zP);this.I5(t,n);var r=Xn(this.k5,function(i){return i===t});if(r>=0){$n(this.k5,r);var e=GP(this.k5,t,zP);this.k5.splice(e,0,t)}}}},n.D5=function(t,i){var n=this.k5,r=this._5,e=this.E5,s=!1,u=1/0;i&&(e=0);for(var o=n.length-1;o>=0;o--){var h=n[o];WP(h,t)?h.PO=this.B5)&&this.N5(),t.jO},n.N5=function(){for(var t=this._5,i=this.B5;it.EO)t.PO=r.EO;else{var e=XP(i,t,zP);if(!(e>=0)){var s=-(e+1),u=s-1;if(u>=0)i[u].EO=0&&t[e].EO===r;e--)t[e].PO=n}function SN(t){return Yw(t)}V(),It(),H(),Ut(),V(),It(),Bt(),Nt(),V(),It(),V(),It();var EN=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).H5=void 0,r.H5=n,r}Pt(i,t);var n=i.prototype;return n.xa=function(){return SN(this)},n.GO=function(t){return bN(this,t)},xt(i,[{key:"U",get:function(){return this.H5}},{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}}]),i}(lN);function IN(t){switch(t){case 0:case 1:case 2:case 3:return!0}return!1}function RN(t){switch(t){case 0:return ea;case 1:return ha;case 2:return aa;case 3:return ma}}function CN(t,i){var n=i.ac,r=t.byteLength,e=Ta(t);return i.Ny(r-n),Ia(e,n,r).buffer}function PN(t,i){return{id:t||"",data:j(i,ArrayBuffer)?i:void 0}}function NN(t,i,n){var r=Hh(t,i);if(IN(r)){var e=RN(r);return{id:n,language:na(t,i,3),description:e(t,i),text:e(t,i)}}}function DN(t,i,n){var r=Hh(t,i);if(IN(r)){var e=RN(r);return{id:n,mimeType:ea(t,i),fileName:e(t,i),description:e(t,i),data:CN(t,i)}}}function xN(t,i,n){var r=Hh(t,i);if(IN(r)){for(var e=RN(r),s=[];i.act.byteLength)break;c.push({text:f,timestamp:Kh(t,i)})}return{id:n,language:s,format:u,contentType:o,description:h,entries:c}}}function ON(t,i,n){return{id:n,ownerIdentifier:ea(t,i),identifier:CN(t,i)}}function MN(t,i,n){var r=Hh(t,i);if(IN(r)){var e=RN(r);return{id:n,language:na(t,i,3),description:e(t,i),text:e(t,i)}}}function LN(t,i,n){var r=Hh(t,i);if(IN(r))return{id:n,text:RN(r)(t,i)}}function FN(t,i,n){return{id:n,url:ea(t,i)}}function UN(t,i,n){var r=Hh(t,i);if(IN(r)){var e=RN(r);return{id:n,description:e(t,i),text:e(t,i)}}}function VN(t,i,n){var r=Hh(t,i);if(IN(r))return{id:n,description:RN(r)(t,i),url:ea(t,i)}}function jN(t,i,n){switch(n){case"COM":return NN(t,i,n);case"GEO":return DN(t,i,n);case"IPL":return xN(t,i,n);case"PIC":return function(t,i,n){var r=Hh(t,i);if(IN(r)){var e,s,u=RN(r),o=na(t,i,3),h=Hh(t,i),a=u(t,i);return"--\x3e"===o?(e=o,s=ea(t,i)):(e="image/"+o.toLowerCase(),s=CN(t,i)),{id:n,mimeType:e,pictureType:h,description:a,data:s}}}(t,i,n);case"SLT":return BN(t,i,n);case"TXX":return UN(t,i,n);case"UFI":return ON(t,i,n);case"ULT":return MN(t,i,n);case"WXX":return VN(t,i,n);default:if("T"===n.charAt(0))return LN(t,i,n);if("W"===n.charAt(0))return FN(t,i,n)}}function HN(t,i,n){switch(n){case"APIC":return function(t,i,n){var r=Hh(t,i);if(IN(r)){var e=RN(r),s=ea(t,i);return{id:n,mimeType:s,pictureType:Hh(t,i),description:e(t,i),data:"--\x3e"===s?ea(t,i):CN(t,i)}}}(t,i,n);case"COMM":return NN(t,i,n);case"COMR":return function(t,i,n){var r=Hh(t,i);if(IN(r)){var e,s,u=RN(r),o=ea(t,i),h=na(t,i,8),a=ea(t,i),c=Hh(t,i),f=u(t,i),v=u(t,i);return i.act.byteLength))return{o:na(t,i,3),Vy:Gh(t,i,3)}}(t,i);case 3:return function(t,i){if(!(i.ac+10>t.byteLength)){var n=na(t,i,4),r=Kh(t,i);Hh(t,i);var e=Hh(t,i);return{o:n,Vy:r,SD:{X5:jh(e,0),K5:jh(e,1),groupingIdentity:jh(e,2)}}}}(t,i);case 4:return function(t,i){if(!(i.ac+10>t.byteLength)){var n=na(t,i,4),r=WN(t,i);Hh(t,i);var e=Hh(t,i);return{o:n,Vy:r,SD:{groupingIdentity:jh(e,1),X5:jh(e,4),K5:jh(e,5),W5:jh(e,6),Y5:jh(e,7)}}}}(t,i)}}function QN(t){for(var i=Ta(t),n=new I(i.byteLength),r=0,e=0;e=t||(this.a6=t,pp(this,t))},n.t6=function(){var t=this.Xk;this.n6||t!==$y.Kn?this.e6=t:this.e6=$y.JI},n.u6=function(){var t=this.Xk,i=this.e6;t!==i&&(this.n6||t!==$y.Kn||i!==$y.JI)&&("metadata"===this.Lt&&i===$y.Nh?this.Xk=t:this.h6&&i===$y.Nh&&t===$y.Kn?this.e6=t:this.Xk=i)},n.e5=function(t){this.t5!==t&&(this.t5=t,this.So(new KP(this,t)))},n.i6=function(t){var i=A.max(this.t5,this.s6,t);this.e5(i)},n.c6=function(t){var i=iD(t);if(i)return i;if(Hi(i=this.d6(t)))for(var n,r=Ft(i);!(n=r()).done;){n.value.Ht=this}else i.Ht=this;return i},n.d6=function(t){var i=this.l6(t);return t.THEOplayerTextTrackCue=i,i},n.l6=function(t){return t.endTime0){for(var i,n=Ft(t.L.II);!(i=n()).done;){var r=i.value;this.D6.push(r)}this.B6()}},i.P6=function(t){if(t.mn(Mg.hI,this.I6),t.mn(Mg.aI,this.R6),t.mn(Mg.cI,this.C6),t.L.V>0){for(var i,n=Ft(t.L.II);!(i=n()).done;){var r=i.value;Yn(this.m6,r),Yn(this.D6,r)}this.B6()}},i.N6=function(){this.oa.kx||this.oa.hx?this.w6():this.B6()},i.B6=function(){this.b6&&0!==this.A6.length&&(this.T6-this.oa.MP>.25*this.oa.ux||this.y6||(this.y6=this.L6.M6(this.O6)))},i.w6=function(){this.y6&&(this.L6.F6(this.y6),this.y6=0)},i.U6=function(t){var i;if(0!==this.T6){var n,r=null!=(n=null==(i=t.Ht)?void 0:i.bU)?n:0,e=t.EO+r,s=t.PO+r,u=this.oa.MP,o=e<=u&&ui&&n-i<.1&&(e=!1),this.S6=!1;for(var s,u=[],o=1/0,h=Ft(t);!(s=h()).done;){var a=s.value,c=n-a.bU,f=a.D5(c,e)+a.bU;f=0;p--)Jn(u,g[p])&&$n(g,p);var _=[];if(!e)for(var k=g.length-1;k>=0;k--){var b=g[k],T=b.Ht.bU;b.EO+T>i&&b.PO+T<=n&&(_.push(b),$n(g,k))}for(var S,E=Ft(this.D6);!(S=E()).done;){var I=S.value;I.EO!==I.PO&&Yn(_,I)}tr(this.D6);for(var R,C=[],P=[],N=Ft(_);!(R=N()).done;){var D=R.value;D.ro||C.push(new uN(D,D.EO)),C.push(new hN(D,A.max(D.EO,D.PO))),D.ro=!1}for(var x,B=Ft(g);!(x=B()).done;){var O=x.value;O.ro&&(C.push(new hN(O,A.max(O.EO,O.PO))),O.ro=!1)}for(var M,L=Ft(u);!(M=L()).done;){var F=M.value;F.ro||(C.push(new uN(F,F.EO)),F.ro=!0)}C.sort(nD);for(var U,V=Ft(C);!(U=V()).done;){var j=U.value,H=j.TO;H.So(j);var W=H.Ht;W&&(j.type===Xw.zL?W.So(new cN(H)):W.So(new vN(H)),Jn(P,W)||P.push(W))}P.sort(mp);for(var z,q=Ft(P);!(z=q()).done;){var X=z.value;X.So(new gN(X))}this.En=n,this.m6=u,this.T6=o}},i.kn=function(){this.hr(),this.oa.mn(ch._y,this.H6),this.oa.mn(ch.uo,this.W6),this.oa.mn(Mp.TM,this.H6),this.oa.mn(ch.jw,this.H6),this.oa.mn(ch.$w,this.q6),this.oa.mn(ch.Zw,this.H6)},t}();V(),It();var eD=function(){function t(){}var i=t.prototype;return i.M6=function(t){return gI(t)},i.F6=function(t){wI(t)},t}(),sD=new eD,uD=function(t){function i(i,n){return void 0===n&&(n=sD),t.call(this,i,n)||this}return Pt(i,t),i}(rD);V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt(),Nt();var oD=function(t){function i(i,n,r){return t.call(this,i,1/0,n,!1,r)||this}return Pt(i,t),i.prototype.GO=function(t){return bN(this,t)},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=SN(this)),this.hu}}]),i}(em);V(),It(),Nt(),V(),It(),Nt();var hD=function(t){function i(i,n,r){return void 0===r&&(r=Uw.DEFAULT),t.call(this,ep.VU,"",n||"","",!1,r,!1,i)||this}return Pt(i,t),i}(sN),aD=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).Km=Uw.ID3,r}Pt(i,t);var n=i.prototype;return n.tV=function(i){AN(i,this._5),t.prototype.tV.call(this,i)},n.xa=function(){return tp(this)},i}(hD),cD=function(t){function i(i){var n;return(n=t.call(this,i.inBandMetadataTrackDispatchType,i.label)||this)._O=void 0,n.a6=0,n.o6=function(){n.Xk!==$y.Nh&&(n.v6(),n.i6(Fw.LOADED))},n._O=i,n._O.addEventListener("cuechange",n.o6),n.Xk=n.e6,Sr(function(){n.o6()}),n}Pt(i,t);var n=i.prototype;return n.T5=function(i){t.prototype.T5.call(this,i),this.e6=this.Xk},n.tV=function(i){t.prototype.tV.call(this,i),i.M5.track!==this._O&&this._O.addCue(i.M5)},n.WU=function(i){t.prototype.WU.call(this,i),i.M5.track===this._O&&this._O.removeCue(i.M5)},n.qU=function(t){this.a6>=t||(this.a6=t,pp(this,t))},n.i6=function(t){this.Ax=A.max(this.Ax,t)},n.v6=function(){var t=this._O.cues;if(t){for(var i=t.length,n=[],r=[],e=0;e=this.a6){var o,h=null!=(o=null==u?void 0:u.THEOplayerTextTrackCue)?o:new fD(u);n.push(h)}else r.push(u)}Tn(n,zP);for(var a,c=YP(this.L.II.slice(),n),f=Ft(r);!(a=f()).done;){var v=a.value;this._O.removeCue(v)}for(var d,l=Ft(c.v5);!(d=l()).done;){var g=d.value;g.kn(),this.WU(g)}for(var w,m=Ft(c.f5);!(w=m()).done;){var y=w.value;this.tV(y)}}},n.kn=function(){this._O.removeEventListener("cuechange",this.o6),t.prototype.kn.call(this)},xt(i,[{key:"o",get:function(){return this._O.id||""}},{key:"ZI",get:function(){return this._O.inBandMetadataTrackDispatchType||""}},{key:"bs",get:function(){return this._O.language||""}},{key:"e6",get:function(){return Ky(this._O.mode)},set:function(t){this._O.mode=t}},{key:"mO",get:function(){return this._O}}]),i}(aD),fD=function(t){function i(i){var n,r=i.startTime,e=ZN(i.value);return(n=t.call(this,r,e,i.id)||this).M5=void 0,n.M5=i,n.M5.THEOplayerTextTrackCue=n,n}return Pt(i,t),i.prototype.kn=function(){t.prototype.kn.call(this),this.M5.THEOplayerTextTrackCue=void 0},i}(oD);V(),It(),Wt(),Bt(),Nt(),H(),ft(),Ut(),Yt(),V(),It(),Qt(),V(),It();var vD=[ch.Pw,ch.Ew,ch.py,ch.yy,ch.LICENSE_REQUEST_GENERATED];V(),It(),Bt(),Nt();var dD=function(t){function i(i){var n;return(n=t.call(this,ch.Ew)||this).errorObject=void 0,n.errorObject=i,n}return Pt(i,t),xt(i,[{key:"error",get:function(){return this.errorObject.message}},{key:"licenseAcquisitionURL",get:function(){return this.errorObject.url}},{key:"status",get:function(){return this.errorObject.status}},{key:"statusText",get:function(){return this.errorObject.statusText}},{key:"licenseAcquisitionMessage",get:function(){return this.errorObject.response}},{key:"systemCode",get:function(){return this.errorObject.systemCode}}]),i}(ah);V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Nt(),H(),Yt(),V(),It(),Nt();var lD=function(t){function i(i){var n;return(n=t.call(this,ch.Pw)||this).z6=void 0,n.z6=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var gD=function(t){function i(i){var n;return(n=t.call(this,"wy")||this).z6=void 0,n.z6=i,n}return Pt(i,t),i}(ah),wD=new Sd,mD=function(t){function i(i){var n;return(n=t.call(this,"Xs")||this).session=void 0,n.session=i,n}return Pt(i,t),i}(ah),yD=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).J6=void 0,e.K6=void 0,e.Y6=void 0,e.j6=void 0,e.s8=void 0,e.nT=void 0,e.Z6=void 0,e.X6=void 0,e.yS=void 0,e.i8=void 0,e.e8=void 0,e.J6=i,e.K6=n,e.Y6=r,e.j6=!1,e.s8=!1,e.nT=new dr,e.X6=!1,e.yS=function(t){if(!e.nT.Yg.Hg)switch(t.Iy){case"license-request":case"license-renewal":e.eH(t.Py,t.Ry).catch(function(t){return e.Ts(t)});break;default:e.Ts(new vw(gd.CONTENT_PROTECTION_NOT_SUPPORTED,"Unsupported CDM message type: "+t.Iy))}},e.i8=function(t){e.J6.Ty.zy(function(t,i){switch(t){case"usable":Vi.Og(function(){e.s8=!0,e.So(new lD(i))},100);break;case"expired":case"status-pending":default:break;case"output-restricted":case"internal-error":e.So(new gD(i))}}),e.X6=!0,e.So(t)},e.e8=function(t){e.Ts(new vw(gd.CONTENT_PROTECTION_INTERNAL_ERROR,"Unknown CDM error"))},i.wn("Py",e.yS),i.wn(ch.yy,e.i8),i.wn("lt",e.e8),i.oS.then(function(){return e.t8()},function(t){return e.Ts(t)}),e}Pt(i,t);var n=i.prototype;return n.vS=function(){var t=this;return this.j6=!0,wD.Zo(function(i){return t.Q6(i)},this.nT.Yg)},n.Q6=function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,5]),yr(t),[4,this.K6.KV(t)];case 1:return s.sent(),[4,this.K6.YV(this.Y6.Jm,this.Y6.Ey,t)];case 2:return i=s.sent(),[4,this.J6.vS(this.Y6.Jm,this.Y6.Ey,i)];case 3:return s.sent(),[3,5];case 4:throw pr(n=s.sent()),r=j(n,$a)?n.Yy:void 0,e=new vw(gd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error while performing the CDM request",n,void 0,void 0,void 0,void 0,r),this.Ts(e),e;case 5:return[2]}})}).call(this)},n.eH=function(t,i){return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return h.trys.push([0,5,,6]),function(t){return Oa(t,Ga())}(t)?[4,this.K6.dH(new I(t),this.nT.Yg)]:[3,2];case 1:return n=h.sent(),[3,4];case 2:return[4,this.K6.lH(new I(t),i,this.nT.Yg)];case 3:n=h.sent(),h.label=4;case 4:return[3,6];case 5:if(mr(r=h.sent()))return[2];throw r;case 6:if(this.nT.Yg.Hg)return[2];e=this.Z6,s=new Xa,this.Z6=s,h.label=7;case 7:return h.trys.push([7,10,11,14]),[4,this.J6.er(n)];case 8:return h.sent(),[4,Rr(100)];case 9:return h.sent(),[3,14];case 10:throw u=h.sent(),o=j(u,$a)?u.Yy:void 0,new vw(gd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error while applying license response",u,void 0,void 0,void 0,void 0,o);case 11:return void 0===e?[3,13]:[4,e.Qy];case 12:h.sent(),h.label=13;case 13:return s.Xy(),this.Z6===s&&(this.Z6=void 0),[7];case 14:return[2]}})}).call(this)},n.Ts=function(t){var i=j(t,vw)?t:new vw(gd.CONTENT_PROTECTION_ERROR,t.message,t);this.So(new dD(i)),this.Xs()},n.t8=function(){this.J6.mn("Py",this.yS),this.J6.mn(ch.yy,this.i8),this.J6.mn("lt",this.e8),this.s8=!1,this.X6=!1,this.nT.Zg(),this.So(new mD(this))},n.Xs=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:this.Vo(),i.label=1;case 1:return void 0===(t=this.Z6)?[3,3]:[4,t.Qy];case 2:i.sent(),i.label=3;case 3:if(this.Z6!==t)return[3,1];i.label=4;case 4:return this.t8(),[4,this.J6.Xs().catch(yn)];case 5:return i.sent(),[2]}})}).call(this)},xt(i,[{key:"G6",get:function(){return this.X6}}]),i}(uh),pD=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).mS=void 0,e.TS=void 0,e.h8=void 0,e.r8=[],e.a8=void 0,e.d8=[],e.g8=void 0,e.l8=function(t){if(t.type===ch.yy)return null!=e.g8||(e.g8=new qa),t.Ty.zy(function(t,i){e.g8.qy(i,t)}),void(e.n8&&e.So(new dh(e.g8)));e.Rs(t)},e.f8=function(t){t.session.mn(vD,e.Rs),t.session.mn("Xs",e.f8),Yn(e.r8,t.session),e.g8=void 0},e.mS=i,e.TS=n,e.h8=r,e}Pt(i,t);var n=i.prototype;return n.QV=function(){return this.h8.QV()},n.o8=function(t){return this.a8||(this.a8=this.u8(t)),this.a8},n.u8=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return yr(t),[4,this.h8.dH(new I(Ga()),t)];case 1:if(i=n.sent(),yr(t),!this.TS)throw new p("Invalid MediaKeys when setting ServerCertificate");return[4,this.TS.ES(i.buffer)];case 2:return n.sent(),[2]}})}).call(this)},n.c8=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(!this.TS)throw new p("Invalid MediaKeys when creating KeySession");r.label=1;case 1:return r.trys.push([1,,3,4]),this.d8.push(t),[4,this.TS.SS("temporary")];case 2:return i=r.sent(),n=new yD(i,this.h8,t),this.r8.push(n),n.wn(vD,this.l8),n.wn("Xs",this.f8),[2,n];case 3:return Yn(this.d8,t),[7];case 4:return[2]}})}).call(this)},n.v8=function(t){if(t._8)return!1;for(var i,n=Ft(this.r8);!(i=n()).done;){if(_D(i.value.Y6,t))return!0}for(var r,e=Ft(this.d8);!(r=e()).done;){if(_D(r.value,t))return!0}return!1},n.kn=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.TS=void 0,this.Vo(),t=this.r8.slice(),tr(this.r8),[4,ot.all(t.map(function(t){return t.Xs()}))];case 1:return i.sent(),this.g8=void 0,this.h8.zg(),[2]}})}).call(this)},xt(i,[{key:"kS",get:function(){return this.mS}},{key:"n8",get:function(){return this.r8.every(function(t){return t.G6})}}]),i}(uh);function _D(t,i){if(t._8)return!1;if(t.Jm!==i.Jm)return!1;if(Oa(t.Ey,i.Ey))return!0;if("sinf"===t.Jm&&"sinf"===i.Jm){var n=kD(t),r=kD(t);if(n&&r)return Oa(n,r)}return!1}function kD(t){try{var i=ma(Aa(new I(t.Ey)),new Pa),n=JSON.parse(i).sinf[0],r=new I(ja(n)),e=new py(Aa(r),new Pa);return Ry.rN(e).mN.yN.SN}catch(t){return}}var bD=function(t){function i(i){var n;return(n=t.call(this)||this).TL=void 0,n.nT=new dr,n.ta=new Sd,n.YS=void 0,n.h8=void 0,n.iq=void 0,n.mS=void 0,n.D8=function(t){n.b8(t.Jm,t.Ey,n.nT.Yg).catch(function(t){return n.Ts(t)})},n.TL=i,n.TL.wn(mh.Dw,n.D8),n}Pt(i,t);var n=i.prototype;return n.Un=function(t,i){this.iq=t,this.EZ(i)},n.EZ=function(t){this.YS=t,this.m8(this.nT.Yg).catch(_r)},n.xZ=function(t){this.w8(t,this.nT.Yg).catch(_r)},n.w8=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:if(r=function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:if(r=h.value,void 0===(null==(s=Wn(t,function(t){return t.y8===r.kS.$m}))?void 0:s.A8))return[2,"continue"];if(null==(e=r.BW)?void 0:e.some(function(t){return Oa(s.A8,t)}))return[3,4];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,n.b8(r.kS.Jm,s.A8,i)];case 2:return u.sent(),[2,{v:void 0}];case 3:return pr(u.sent()),[3,4];case 4:return[2]}})},yr(i),!(null==(e=this.YS)?void 0:e.aq))return[2];o=Ft(null!=(u=null==(s=this.YS)?void 0:s.aq)?u:[]),c.label=1;case 1:return(h=o()).done?[3,4]:(n=this,[5,qt(r())]);case 2:if("object"===W(a=c.sent()))return[2,a.v];c.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},n.m8=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return Vi.Zs.gp?[4,this.S8(t)]:[3,2];case 1:if(i.sent())return[2];i.label=2;case 2:return this.YS&&this.YS.T8?[4,this.k8(t)]:[3,4];case 3:return[2,i.sent()];case 4:return[2]}})}).call(this)},n.S8=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:if(!(null==(i=this.YS)?void 0:i.aq))return[2,!1];r=!1,s=Ft(null!=(e=null==(n=this.YS)?void 0:n.aq)?e:[]),l.label=1;case 1:if((u=s()).done)return[3,14];if(!(o=u.value).MW||0===o.MW.length)return[3,6];l.label=2;case 2:return l.trys.push([2,4,,5]),h={kids:o.MW.map(function(t){return t.id})},a=pa(JSON.stringify(h)).buffer,[4,this.b8(wo,a,t)];case 3:return l.sent(),r=!0,[3,5];case 4:return pr(l.sent()),[3,5];case 5:if(r)return[2,!0];l.label=6;case 6:f=Ft(null!=(c=o.BW)?c:[]),l.label=7;case 7:if((v=f()).done)return[3,12];d=v.value,l.label=8;case 8:return l.trys.push([8,10,,11]),[4,this.b8(o.kS.Jm,d,t)];case 9:return l.sent(),r=!0,[3,11];case 10:return pr(l.sent()),[3,11];case 11:return[3,7];case 12:if(r)return[2,!0];l.label=13;case 13:return[3,1];case 14:return[2,!1]}})}).call(this)},n.E8=function(t){return t===vo||t===go||t===lo||t===wo},n.b8=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f,v,d,l;return zt(this,function(g){switch(g.label){case 0:if(yr(n),!i.byteLength)return[2];if(!this.YS||!this.YS.aq.length)throw new vw(gd.CONTENT_PROTECTION_CONFIGURATION_MISSING,"Missing configuration for encrypted content");if(!this.E8(t))return[2];r=U_(t,i),e=this.YS.aq,u=[],o=Ft(e),g.label=1;case 1:if((h=o()).done)return[3,11];if(a=h.value,yr(n),!(c=r[a.kS.Zm])||a.kS.Jm!==t)return a.kS.Km===Do.Xm&&u.push(!1),[3,10];g.label=2;case 2:return g.trys.push([2,9,,10]),[4,this.P8(a,n)];case 3:return(f=g.sent()).QV()?[4,f.o8()]:[3,5];case 4:g.sent(),g.label=5;case 5:return v=this.TL.KP,d={Jm:a.kS.Jm,Ey:c,_8:v},u.push(!0),this.x8(f,d)?[4,f.c8(d)]:[3,8];case 6:return[4,g.sent().vS()];case 7:g.sent(),this.So(new lh(c)),g.label=8;case 8:return[2];case 9:return pr(l=g.sent()),s=l,[3,10];case 10:return[3,1];case 11:return 0===u.length||u.some(pn)?[4,Vi._m()]:[2];case 12:throw g.sent()?new vw(gd.CONTENT_PROTECTION_NOT_SUPPORTED,"Encrypted content over an insecure connection is not supported",s):new vw(gd.CONTENT_PROTECTION_NOT_SUPPORTED,"Cannot create content decryption session",s)}})}).call(this)},n.k8=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(!(n=null==(i=this.YS)?void 0:i.aq))return[2];r=Ft(n),o.label=1;case 1:if((e=r()).done)return[3,8];s=e.value,yr(t),o.label=2;case 2:return o.trys.push([2,6,,7]),[4,this.P8(s,t)];case 3:return(u=o.sent()).QV()?[4,u.o8()]:[3,5];case 4:o.sent(),o.label=5;case 5:return[2];case 6:return pr(o.sent()),[3,7];case 7:return[3,1];case 8:return[2]}})}).call(this)},n.x8=function(t,i){return Vi.Zs._p||this.TL.CL.RL||!t.v8(i)},n.P8=function(t,i){var n=this;return this.ta.Zo(function(i){return n.I8(t,i)},i)},n.I8=function(t,i){return jt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(yr(i),!this.YS||!this.h8||!this.iq)throw new p("Not initialized");if(this.mS){if(this.mS.kS!==t.kS)throw new p("Internal key system error");return[2,this.mS]}return n=this.h8,r=io({},t,{Mq:t.Mq.map(function(i){var r;return io({},i,{persistentState:null!=(r=i.persistentState)?r:n._H(t.kS),MS:i.MS||n.MS(t.kS)})})}),[4,this.iq.bZ(r.kS,r.Mq)];case 1:return e=o.sent(),s=n.DW(r),(u=new pD(r.kS,e,s)).wn(vD,this.Rs),this.mS=u,[2,u]}})}).call(this)},n.Ts=function(t){if(!mr(t)){var i=j(t,vw)?t:new vw(gd.CONTENT_PROTECTION_ERROR,t.message,t);this.So(new dD(i))}},n.hr=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.iq=void 0,this.YS=void 0,this.nT.Zg(),this.nT=new dr,[4,this.C8()];case 1:return t.sent(),[2]}})}).call(this)},n.C8=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return[4,this.ta.Zg()];case 1:return i.sent(),(t=this.mS)?(t.mn(ch.py,this.Rs),this.mS=void 0,[4,t.kn()]):[3,3];case 2:i.sent(),i.label=3;case 3:return[2]}})}).call(this)},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),this.TL.mn(mh.Dw,this.D8),[4,this.hr()];case 1:return t.sent(),[4,this.ta.kn()];case 2:return t.sent(),[2]}})}).call(this)},xt(i,[{key:"p8",get:function(){var t;return null==(t=this.mS)?void 0:t.kS}},{key:"Eq",get:function(){return this.h8},set:function(t){this.h8=t}}]),i}(uh);V(),It(),Nt();var AD=function(t){function i(i){var n;return(n=t.call(this,ch.Vw)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Bt(),Nt();var TD=function(t){function i(i){var n;return(n=t.call(this)||this).M8=void 0,n.B8=void 0,n.M8=i,n}Pt(i,t);var n=i.prototype;return n.e5=function(){var t;null==(t=this.B8)||t.e5()},n.hr=function(){var t;null==(t=this.B8)||t.hr()},n.zg=function(){this.Vo(),void 0!==this.B8&&(this.B8.zg(),this.B8=void 0)},n.N8=function(t){if(this.B8!==t){var i=this.Ax;void 0!==this.B8&&this.B8.zg(),this.B8=t,void 0!==t&&(t.wn(Mp.wI,this.Rs),t.e5());var n=this.Ax;i!==n&&this.So(new Fp(this.M8.MP,n))}},xt(i,[{key:"Ax",get:function(){return void 0!==this.B8?this.B8.Ax:Up.VL}}]),i}(uh);V(),It(),Bt(),Nt();var SD=function(t){function i(i,n,r){return t.call(this,i,n,"",r,void 0,Uw.WEBVTT)||this}Pt(i,t);var n=i.prototype;return n.L8=function(t,i,n){var r=new um(t,i,n,!1);return this.tV(r),r},n.O8=function(t){this.WU(t)},xt(i,[{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=ED(this)}}]),i}(sN);function ED(t){return jg(tp(t),{get type(){return t.Km},addCue:function(i,n,r){return t.L8(i,n,r).Ca},removeCue:function(i){t.O8(i.kO)}})}V(),It(),Bt(),Nt(),Ut();var ID=function(t){function i(i,n,r){var e,s;return(e=t.call(this,i,n,r)||this).uE=!1,e.F8=[],e.U8=function(){var t;null==(t=e.Z5)||t.removeEventListener("load",e.U8),e.uE=!0;for(var i,n=Ft(e.F8);!(i=n()).done;){var r=i.value;e.tV(r)}tr(e.F8)},null==(s=e.Z5)||s.addEventListener("load",e.U8),e.Km=Uw.WEBVTT,e}Pt(i,t);var n=i.prototype;return n.L8=function(t,i,n){var r=this.d6(new f.VTTCue(t,i,n));return this.uE?this.tV(r):this.F8.push(r),r},n.O8=function(t){Yn(this.F8,t),this.WU(t)},n.kn=function(){var i;t.prototype.kn.call(this),null==(i=this.Z5)||i.removeEventListener("load",this.U8),tr(this.F8)},xt(i,[{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=ED(this)}}]),i}(tD);function RD(t,i){return void 0!==t.Q3===i.L4.some(function(t){return qv(t.qT)})&&void 0!==t.K3===i.L4.some(function(t){return Xv(t.qT)})}V(),It(),Wt(),Yt();var CD=Oi.N_||Oi.L_,PD=Oi.Cg,ND=Oi.X_,DD=Oi.X_&&Oi.ru,xD=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this)._T=void 0,u.sc=void 0,u.VJ=void 0,u.JW=void 0,u.yz=!0,u.iq=void 0,u.X7=new Sd,u.W8=void 0,u.Q8=void 0,u.d7=void 0,u.PZ=void 0,u.ha=new aS,u.ea=new fS,u.Gl=void 0,u.Dz=void 0,u.O7=[],u.L7=void 0,u.B7=void 0,u.N7=void 0,u.q8=void 0,u.b7=0,u.A7=NaN,u.H8=void 0,u.D7=!1,u.i9=void 0,u.G7=0,u.Sz=!1,u.J4=!1,u.M9=Up.VL,u.K8=0,u.w7=ot.resolve(),u.m7=new dr,u._7=[],u.Ho=OA.iL(),u.J8=void 0,u.t7=1,u.s7=!1,u.e7=1,u.G8=!1,u.e9=!1,u.s9=!1,u.T7=!1,u.hw=void 0,u.X8=!1,u.j8=!1,u.V8=!1,u.C9=!1,u.r9=0,u.E4=void 0,u.n7=!1,u.F7=function(t){var i=t.track,n=u.q7(i);if(!OD(u.L7,i)){if(Oi.X_){if(i.kind===ep.VU)return void u.H7(i);if(i.kind===ep.FU&&""===i.label&&""===i.language&&!MD(i))return void u.W7(i,n)}u.L7.tt(new tD(i.id,i,n))}},u.U7=function(t){var i=OD(u.L7,t.track);i&&u.L7.it(i)},u.V7=function(){for(var t=0;t=Up.WL)&&void 0!==u.iq&&YR(u.iq)){var t=u.iq,i=t.Q3,n=t.K3;if(i&&n){var r=u.MP,e=i.IP,s=n.IP;if(e.Cr(r)&&s.Cr(r))e.FM(s).qM(r-5,r)&&(u.V8?u.J7():u.Z7())}}},u.u9=function(){u.So(new _T(u.MP))},u.c9=function(){u.p7(new wr),u.So(new pT(u.MP))},u.a9=function(){u.l7(),u.So(new qp(u.MP))},u._9=function(){u.Z8()},u.p9=function(){u.So(new kT(u.ct))},u.l9=function(){u.So(new eC(u.MP))},u.f9=function(){u.So(new sC)},u.A9=function(){u.Sz||u.J4||u.D7?u.D7=!1:u.So(new ST(u.MP))},u.b9=function(){u.I7(u.MP),u.D7=!1},u.d9=function(){var t=u.MP,i=u.kx,n=u.Q8.Ax0&&u.Rx>0&&u.So(new Bp)},u.S9=function(t){u.So(new yh(t.initDataType,t.initData||new ArrayBuffer(0)))},u.T9=function(){u.So(new ph)},u.P9=function(t){var i=t.initData,n=i?Ra(i).buffer:new ArrayBuffer(0);u.So(new yh(vo,n))},u.k9=function(t){if(t.initData){var i=function(t){try{var i=Aa(t),n=new Pa;return da(la(zh(i,n,Kh(i,n,!0)),!0))}catch(t){return}}(t.initData);if(!i)return;u.So(new yh(go,i))}else u.So(new yh(go,new ArrayBuffer(0)))},u.E9=function(t){var i=t.initData,n=i?Ra(i).buffer:new ArrayBuffer(0);u.So(new yh(vo,n))},u.a7=function(){u.l7()},u.u7=function(t){u.p7(t)},u.F9=function(t){u.So(t),t.type===ch.Ew&&u.qq(ww(t.errorObject))},u._T=i,u.hw=n,u.sc=r,u.Dz=e,u.VJ=s,u.Q8=new TD(u),u.Q8.wn(Mp.wI,u.O9),u.Q8.N8(new MP(u)),u.d7=new jP(u),u.d7.wn(Mp.TM,u.a9),u.PZ=new bD(u),u.PZ.wn(vD,u.F9),u.Gl=new rp,u.L7=new rp,u.B7=new Mb([u.Gl,u.L7]),u.N7=new uD(u),u.n9(),u.Lq(),u}Pt(i,t);var n=i.prototype;return n.z8=function(){return void 0!==this.q8&&this.ct===this.q8},n.Z8=function(){var t=this.ux;this.t7!==t&&(this.t7=t,this.So(new bT(this.MP,t)))},n.Y8=function(){var t=this.Mx,i=this.$P;this.e7===t&&this.s7===i||(this.e7=t,this.s7=i,this.So(new ET(this.MP,this.Mx)))},n.ZP=function(){return RR(this._T)},n.Gx=function(){this.n7||(this.n7=!0);var t=this.r7();return this.h7(),t},n.h7=function(){this.X8?this.j8&&(this.j8=!1,this.So(new _T(this.MP))):this.o7()},n.o7=function(){if(this.W8)this.W8.Gx();else{Oi.X_&&!Oi.ru&&this._T.preload===eS.lz&&(this._T.preload=eS.VU);var t=this.ux,i=this._T.play();t!==this.$W.playbackRate&&(this.ux=t),this.G8=!1,Gi(i)?i.then(this.a7,this.u7):this.d7.u5()&&this.l7()}},n.zx=function(){this.X8?this.j8||(this.j8=!0,this.So(new pT(this.MP))):this.f7()},n.f7=function(){this.W8?this.W8.zx():(this._T.pause(),this.d7.er()),this.v7(new wr)},n.r7=function(){var t=new Xa;return this._7.push(t),t.Qy},n.g7=function(){for(var t,i=Ft(this._7);!(t=i()).done;){t.value.Xy(void 0)}tr(this._7)},n.v7=function(t){for(var i,n=Ft(this._7);!(i=n()).done;){i.value.jy(t)}tr(this._7)},n.l7=function(){this.X8||this.W8||this.g7()},n.p7=function(t){this.X8||this.W8||this.v7(t)},n.My=function(t,i,n){void 0===i&&(i=!1),void 0===n&&(n=!1),this.W8?this.W8.My(t,i,n):(this.m7.Zg(),this.m7=new dr,this.w7=br(this.y7(t,i,n,this.w7,this.m7.Yg),this.m7).catch(yn))},n.KW=function(t){var i=this.nq;if(i&&!E(i.getTime())){var n=(t.getTime()-i.getTime())/1e3;this.My(n)}},n.y7=function(t,i,n,r,e){return jt(function(){var s,u,o,h,a,c,f,v,d,l,g,w,m,y,p,_,k;return zt(this,function(b){switch(b.label){case 0:return b.trys.push([0,24,,25]),this.q8=t,this.A7=t,this.b7=Vi.Mg(),n&&!this.Sz?this.J4=!0:(this.Sz=!0,this.J4=!1),this.G8&&!this.z8()&&(this.G8=!1),this.J4?(this.So(new CP(this.MP)),(Oi.w_||Oi.S_)&&(t+=.05)):this.So(new TT(t)),[4,r.catch(yn)];case 1:return b.sent(),yr(e),this.iq&&!this.iq.jZ()?(this.S7(),[2]):(this.T7&&this.k7(),this.Q8.Ax!==Up.VL?[3,3]:[4,this.Q8.ww(Mp.wI,e)]);case 2:b.sent(),b.label=3;case 3:if(0!==this._T.seekable.length&&(!DD||this.n7))return[3,9];s={stack:[],error:void 0,hasError:!1},b.label=4;case 4:return b.trys.push([4,6,7,8]),u=Xt(s,dr.ep([e]),!1),[4,ot.race([hg(this._T,"timeupdate",u.Yg),Rr(100,u.Yg)])];case 5:return b.sent(),yr(e),[3,8];case 6:return o=b.sent(),s.error=o,s.hasError=!0,[3,8];case 7:return Gt(s),[7];case 8:return[3,3];case 9:h=pP(this.IP,t,.05),a=this.Sx,c=!0,f=!1,b.label=10;case 10:0,v={stack:[],error:void 0,hasError:!1},b.label=11;case 11:return b.trys.push([11,20,21,22]),(a=this.Sx).V>0&&!a.Cr(h)&&(h=a.DM(h),c=!0),!i||!Vi.Zs.Dp&&this._T.fastSeek||(l=this.IP).Cr(h)||(g=pP(l,h,1))!==h&&(h=g,c=!0),ND&&void 0!==(w=this.E7())&&h>w&&(h=w,c=!0),f?[3,14]:void 0!==(m=this.P7())&&h>m?(f=!0,[4,this.x7(m,!1,e)]):[3,14];case 12:return b.sent(),[4,hg(this._T,"seeked",e)];case 13:b.sent(),yr(e),c=!0,b.label=14;case 14:return c?(c=!1,[4,this.x7(h,i,e)]):[3,18];case 15:b.sent(),yr(e),y=this.MP,a=this.Sx,h=a.DM(h),p=1,b.label=16;case 16:return A.abs(h-y)>=me?(a=this.Sx,h=function(t,i,n){void 0===n&&(n=0);if(!i.V)return 0;var r=i.DM(t),e=BD*n;r===i.Tn(0)?r+=e:r===i.An(i.V-1)&&(r-=e);return r}(h,a,p),[4,this.x7(h,i,e)]):[3,18];case 17:return b.sent(),yr(e),y=this.MP,p++,[3,16];case 18:return this._T.seeking||this.Q8.Ax0}V(),It(),Bt(),Nt();var LD={ZJ:void 0,$J:void 0,tZ:void 0,iZ:void 0,eZ:void 0,sZ:void 0,nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0},FD=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).hu=void 0,i}return Pt(i,t),xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=jR(this)),this.hu}},{key:"ZJ",get:function(){}},{key:"$J",get:function(){}},{key:"tZ",get:function(){}},{key:"iZ",get:function(){}},{key:"eZ",get:function(){}},{key:"sZ",get:function(){}},{key:"U9",get:function(){}},{key:"nZ",get:function(){}},{key:"rZ",get:function(){}},{key:"hZ",get:function(){}},{key:"oZ",get:function(){}}]),i}(uh),UD=function(t){function i(i,n,r,e){return t.call(this,i,n,r,new FD,e)||this}return Pt(i,t),i.prototype.Wx=function(){},xt(i,[{key:"Rx",get:function(){return 0}},{key:"Bx",get:function(){return 0}}]),i}(xD);V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Bt();var VD=function(){function t(t){void 0===t&&(t=5),this.V9=void 0;var i=f.document.createElement("div");i.className="theoplayer-texttracks",i.style.position="absolute",i.style.display="none",i.style.overflow="hidden",i.style.pointerEvents="none",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.width="100%",i.style.height="100%",i.style.lineHeight="1.3em",i.style.zIndex=""+t,this.V9=i,this.be()}var i=t.prototype;return i.we=function(){this.V9.style.display="none"},i.be=function(){this.V9.style.display="block"},i.B9=function(t){t.appendChild(this.V9)},i.kn=function(){Zi(this.V9)},xt(t,[{key:"xe",get:function(){return this.V9}}]),t}();function jD(t,i){return io({},i,Xg(function(t){return{ZJ:t.ZJ,$J:t.$J,tZ:t.tZ,iZ:t.iZ,eZ:t.eZ,sZ:t.sZ,nZ:t.nZ,rZ:t.rZ,hZ:t.hZ,oZ:t.oZ}}(t)))}function HD(t){return t.tZ&&qo(t.tZ,"%")?Number(t.tZ.replace("%",""))/100:t.tZ&&qo(t.tZ,"em")?Number(t.tZ.replace("em","")):1}V(),It(),Bt(),H(),Ut(),V(),It(),Nt(),Ut(),V(),It(),Bt(),Ut(),V(),It(),V(),It(),Bt();var WD=function(){function t(t,i,n,r){this.W9=void 0,this.z9=void 0,this.Ti=void 0,this.Mi=void 0,this.W9=t,this.z9=i,this.Ti=n,this.Mi=r}var i=t.prototype;return i.G9=function(t){return this.W9t.W9&&this.z9t.z9},i.fO=function(t){return this.W9<=t.W9&&t.H9<=this.H9&&this.z9<=t.z9&&t.q9<=this.q9},i.Ly=function(){return new t(this.W9,this.z9,this.Ti,this.Mi)},i.X9=function(i){return new t(this.W9+i,this.z9+i,A.max(0,this.Ti-2*i),A.max(0,this.Mi-2*i))},i.j9=function(i){var n=A.min(this.W9,i.W9),r=A.max(this.H9,i.H9),e=A.min(this.z9,i.z9);return new t(n,e,r-n,A.max(this.q9,i.q9)-e)},xt(t,[{key:"H9",get:function(){return this.W9+this.Ti},set:function(t){this.W9=t-this.Ti}},{key:"q9",get:function(){return this.z9+this.Mi},set:function(t){this.z9=t-this.Mi}}]),t}(),zD=function(){function t(t,i,n,r,e){var s=this;this.ctt=eo(),this.Ett=!0,this.Z9=void 0,this.itt=io({},LD),this.xtt=[],this.FO=void 0,this._T=void 0,this.sc=void 0,this.htt=void 0,this.dtt=function(t){return s.tV(t.TO)},this.ltt=function(t){return s.WU(t.TO)},this.ftt=function(){return s.Stt()},this.ptt=function(t){return s.Att(t.TO)},this.mtt=function(t){return s.btt(t.TO)},this.wtt=function(t){return s.Ptt(t.TO)},this.stt=function(t){return s.oe(t.width,t.height)},this.FO=t,this.htt=this.Z9=e,this._T=this.Btt(n),this.sc=r,i.appendChild(this._T)}var i=t.prototype;return i.Q9=function(t){var i=this.K9(t);if(!i)return!1;for(var n,r=Ft(i);!(n=r()).done;){Zi(n.value)}return this.Y9(t),!0},i.VY=function(){var t=this;this.ett(),this.FO.L.II.forEach(function(i){return t.tV(i)}),this.Wu.wn(_I.yn,this.stt),this.oe(this.Wu.Eu,this.Wu.Iu)},i.ntt=function(t){this.itt=t,this.Z9=jD(this.itt,this.htt),this.Z9.ZJ&&(this.$W.style.fontFamily=this.Z9.ZJ),this.oe(this.Wu.Eu,this.Wu.Iu),this.ott(!0)},i.att=function(){return this.Z9},i.utt=function(t){return this.ctt.has(t.jI)},i.ett=function(){this.FO.wn(Mg.hI,this.dtt),this.FO.wn(Mg.aI,this.ltt),this.FO.wn(Mg.pa,this.ftt)},i._tt=function(){this.FO.mn(Mg.hI,this.dtt),this.FO.mn(Mg.aI,this.ltt),this.FO.mn(Mg.pa,this.ftt)},i.gtt=function(t){t.wn(Xw.zL,this.ptt),t.wn(Xw.GL,this.mtt),t.wn(Xw.SI,this.wtt)},i.ytt=function(t){t.mn(Xw.zL,this.ptt),t.mn(Xw.GL,this.mtt),t.mn(Xw.SI,this.wtt)},i.tV=function(t){this.gtt(t),t.ro&&this.Att(t)},i.WU=function(t){this.ytt(t),this.btt(t)},i.Stt=function(){this.FO.Xk===$y.Kn?this.Ttt():this.ktt()},i.Ttt=function(){if(this.Ett){this.Ett=!1;var t=this.Wu.Eu,i=this.Wu.Iu;this.oe(t,i),this.ott(!1)}},i.ktt=function(){this.Ett||(this.Ett=!0,this.ott(!0))},i.Att=function(t){this.Ett||t.ro&&!this.utt(t)&&this.ott(!1)},i.btt=function(t){this.utt(t)&&this.ott(!0)},i.Ptt=function(t){(t.ro||this.utt(t))&&this.ott(!0)},i.ott=function(t){var i=this.xtt,n=this.Ett?[]:this.FO.q.II.slice();this.Itt(n,i,t),this.xtt=n},i.K9=function(t){return this.ctt.get(t.jI)},i.Rtt=function(t,i){this.ctt.set(t.jI,i)},i.Y9=function(t){this.ctt.delete(t.jI)},i.Ctt=function(t){var i=[],n=this.Z9;if(void 0!==n.nZ){var r=t.Ly();r.Mi=n.nZ,i.push(r)}if(void 0!==n.rZ){var e=t.Ly();e.Mi=n.rZ,e.q9=t.q9,i.push(e)}return i},i.Dtt=function(){return this.xtt.slice()},i.kn=function(){var t=this;Zi(this.$W),this.ctt.clear(),this._tt(),this.FO.L.II.forEach(function(i){return t.ytt(i)}),this.Wu.mn(_I.yn,this.stt)},xt(t,[{key:"Ht",get:function(){return this.FO}},{key:"$W",get:function(){return this._T}},{key:"Wu",get:function(){return this.sc}},{key:"J9",get:function(){return this.Z9}},{key:"ttt",get:function(){return this.itt}}]),t}();function qD(t,i,n,r,e){var s=t.Ly(),u=s,o=1,h=!1,a=S(getComputedStyle(i).lineHeight)/4;if(!E(a)&&a>0){for(var c=0;cf&&(u=t.Ly(),o=f),t=s.Ly()}r.fO(t)||(u=s.Ly())}i.style.left=(u.W9-r.W9)/r.Ti*100+"%",i.style.top=(u.z9-r.z9)/r.Mi*100+"%"}function XD(t,i){return i.some(function(i){return t.G9(i)})}function GD(t){return new WD(t.left,t.top,t.width,t.height)}var QD=function(t){return t[t.POS_X=0]="POS_X",t[t.NEG_X=1]="NEG_X",t[t.POS_Y=2]="POS_Y",t[t.NEG_Y=3]="NEG_Y",t}({});function YD(t,i,n){switch(i){case 0:t.W9+=n;break;case 1:t.W9-=n;break;case 2:t.z9+=n;break;case 3:t.z9-=n}}function $D(t,i,n,r){switch(n){case 0:return t.H9>i.H9+r;case 1:return t.W9i.q9+r;case 3:return t.z90?t.jE[0]:null;return i&&vg(i)?"data:image/png;base64,"+i.ck:""}(i),e.id=t.id,e.style.height="100%",e.style.maxWidth="100%",function(t,i){var n=t.style;vn(n,"flex"),n.flexDirection=n.webkitFlexDirection="column";var r=i.sP("smpte:backgroundImageVertical"),e="center";if(r)switch(r.toLowerCase()){case"left":e="flex-start";break;case"center":e="center";break;case"right":e="flex-end";break;case"inherit":e="inherit"}n.justifyContent=n.webkitJustifyContent=e;var s=i.sP("smpte:backgroundImageHorizontal"),u="center";if(s)switch(s.toLowerCase()){case"left":u="flex-start";break;case"center":u="center";break;case"right":u="flex-end";break;case"inherit":u="inherit"}n.alignItems=n.webkitAlignItems=u}(t,n),t.appendChild(e)}function _x(t,i,n,r,e,s){if(n)for(var u,o=Ft(n.split(" "));!(u=o()).done;){var h=u.value;if(r[h])for(var a,c=Ft(b.keys(r[h]));!(a=c()).done;){var f=a.value;"style"===f.toLowerCase()?_x(t,i,r[h][f],r,e,s):kx(t,i,f,r[h][f],e,s)}}}function kx(t,i,n,r,e,s){var u=t.style;switch(n){case"backgroundColor":u.backgroundColor=r;break;case"color":u.color=r;break;case"direction":u.direction=r;break;case"display":"none"===r&&(u.display="none");break;case"fontFamily":var o;u.fontFamily=null!=(o=cx.get(r))?o:r;break;case"fontSize":var h=r;if(qo(h,"px")){var a=Number(h.slice(0,-2));h=a*s/16+"em"}else qo(h,"c")&&(h=h.replace("c","em"));u.fontSize=h,u.lineHeight&&"inherit"!==u.lineHeight||(u.lineHeight=fx);break;case"fontStyle":u.fontStyle=r;break;case"fontWeight":u.fontWeight=r;break;case"lineHeight":var c=r;if(qo(c,"px")){var f=Number(c.slice(0,-2));c=f*s+"px"}u.lineHeight=c;break;case"opacity":u.opacity=r;break;case"overflow":u.overflow=r;break;case"padding":u.padding=r;break;case"textAlign":u.textAlign=r;break;case"textDecoration":switch(r){case"lineThrough":u.textDecoration="line-through";break;case"underline":case"overline":u.textDecoration=r;break;case"noUnderline":case"noLineThrough":case"noOverline":u.textDecoration="none"}break;case"unicodeBidi":switch(r){case"bidiOverride":u.unicodeBidi="bidi-override";break;case"normal":case"embed":case"isolate":u.unicodeBidi=r}break;case"visibility":u.visibility=r;break;case"zIndex":u.zIndex=r;break;case"displayAlign":var v;switch(r.toLowerCase()){case"before":v="flex-start";break;case"center":v="center";break;case"after":v="flex-end";break;case"justify":v="space-between";break;default:return}u.justifyContent=u.webkitJustifyContent=v;break;case"extent":var d,l,g=bx(i.toLowerCase())?e:t,w=r.split(" ",2);2===w.length?(d=w[0],l=w[1]):d=l="100%",g&&(g.style.height=l,g.style.width=d);break;case"origin":var m=bx(i.toLowerCase())?e:t,y=r.split(" ",2),p=y[0],_=y[1];m&&(p||_)&&(p&&(m.style.left=p),_&&(m.style.top=_));break;case"showBackground":case"textOutline":break;case"wrapOption":switch(r){case"wrap":u.whiteSpace="normal";break;case"noWrap":u.whiteSpace="nowrap"}break;case"writingMode":var k,b,A,T;switch(r){case"lrtb":case"lr":k="horizontal-tb";break;case"rltb":k="horizontal-tb",b="rtl",T="bidi-override";break;case"tbrl":case"tb":k="vertical-rl",A="upright";break;case"tblr":k="vertical-lr",A="upright";break;case"rl":k="horizontal-tb",b="rtl";break;default:return}u.writingMode=k,u.setProperty("-webkit-writing-mode",k),b&&(u.direction=b),A&&(u.textOrientation=A,u.setProperty("-webkit-text-orientation",A)),T&&(u.unicodeBidi=T);break;case"linePadding":if(qo(r,"c")){var S=r.replace("c","em");u.paddingLeft=u.paddingRight=S}break;case"multiRowAlign":"auto"===r.toLowerCase()?u.textAlign="":u.textAlign=r}}function bx(t){return"div"===t||"p"===t||"span"===t}function Ax(t){var i=t.style;vn(i,"flex"),i.flexDirection=i.webkitFlexDirection="column",i.top="auto",i.left="5%",i.width="90%",i.height="100%",i.maxHeight="100%",i.maxWidth="100%",i.overflow="visible",i.position="absolute",i.fontFamily=hx,i.color=rx.WHITE,i.background=rx.TRANSPARENT,i.textShadow=ex("uniform"),i.textAlign="start",i.writingMode="horizontal-tb",i.setProperty("-webkit-writing-mode","horizontal-tb"),i.padding="0",i.margin="0",i.fontSize="inherit",i.lineHeight="inherit"}function Tx(t){var i=t.style;i.fontFamily="inherit",i.color="inherit",i.fontSize="inherit",i.lineHeight="inherit",i.textShadow="inherit"}function Sx(t){var i=GD(t.getBoundingClientRect());if("visible"===getComputedStyle(t).overflow&&t.scrollHeight>t.clientHeight)for(var n=t.children,r=0;r":return i.Ny(1),o;case"EOF":return o;default:r=s,n="StartTag"}break;case"StartTag":switch(s){case"\t":case"\f":case" ":n="StartTagAnnotation";break;case"\n":u=s,n="StartTagAnnotation";break;case".":n="StartTagClass";break;case">":return i.Ny(1),{Km:"starttag",JE:r,Utt:[]};case"EOF":return{Km:"starttag",JE:r,Utt:[]};default:r+=s}break;case"StartTagClass":switch(s){case"\t":case"\f":case" ":e.push(u),u="",n="StartTagAnnotation";break;case"\n":e.push(u),u=s,n="StartTagAnnotation";break;case".":e.push(u),u="";break;case">":return i.Ny(1),e.push(u),{Km:"starttag",JE:r,Utt:e};case"EOF":return e.push(u),{Km:"starttag",JE:r,Utt:e};default:u+=s}break;case"StartTagAnnotation":switch(s){case"&":n="CharRefInAnnotation";break;case">":i.Ny(1);var a=u.trim();return{Km:"starttag",JE:r,Utt:e,Vtt:a=a.replace(/\s/," ")};default:u+=s}break;case"CharRefInAnnotation":for(var c="",f=i.ac;">"===t.charAt(f);f++)c+=t.charAt(f);u+=c||"&",n="StartTagAnnotation";break;case"EndTag":switch(s){case">":return i.Ny(1),{Km:"endtag",JE:r};case"EOF":return{Km:"endtag",JE:r};default:r+=s}break;case"TimestampTag":switch(s){case">":return i.Ny(1),{Km:"timestamp",Htt:r};case"EOF":return{Km:"timestamp",Htt:r};default:r+=s}}i.Ny(1)}return o}V(),It(),Nt(),Ut(),V(),It();var Rx=function(t){return t.Wtt="string",t.qtt="starttag",t.ztt="endtag",t.Gtt="timestamp",t}({});function Cx(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var n=v.documentElement,r=v.body,e=n.clientLeft||r.clientLeft||0,s=f.pageXOffset||r.scrollLeft,u=i.left+s-e,o=n.clientTop||r.clientTop||0,h=f.pageYOffset||r.scrollTop,a=i.top+h-o;return{left:A.round(u),top:A.round(a)}}function Px(t,i,n,r){if(void 0===r&&(r=0),t&&i){t.style.left="0px";var e=t.getClientRects(),s=i.getClientRects();if(0!==e.length&&0!==s.length){var u=e[0],o=s[0],h=u.width/2+u.left;Nx(t,o.width/2+o.left-h,n,r)}}}function Nx(t,i,n,r){void 0===r&&(r=0),Dx(t,i,"left","right",n,r)}function Dx(t,i,n,r,e,s){void 0===s&&(s=0);var u=t.getClientRects();if(e&&u.length>0){var o=u[0];i=Cn(i,e[n]+s-o[n],e[r]-s-o[r])}t.style[n]=i+"px"}function xx(t,i){void 0===t.textContent?t.innerText=i:t.textContent=i}V(),It();var Bx={$J:rx.WHITE,ZJ:"sans-serif",tZ:"100%",iZ:"rgba(0,0,0,0.8)",eZ:rx.TRANSPARENT,sZ:"none",nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0},Ox="theoplayer-webvtt-region-",Mx="theoplayer-webvtt-styling-",Lx="theoplayer-webvtt-default-style",Fx=5.23,Ux=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,Bx)||this).jtt=ro(),s.Xtt=qx(3),function(t){var i,n=function(t){var i=null==t.getRootNode?void 0:t.getRootNode.call(t);if(i&&i.host)return i}(t),r=null!=(i=null!=n?n:t.ownerDocument)?i:v;if(r.getElementById(Lx))return;for(var e,s=[],u=Ft(Qx);!(e=u()).done;){var o=e.value,h=o[0],a=o[1];s.push("."+Mx+h+" { color: "+a+" !important; }"),s.push("."+Mx+"bg"+Yx+h+" { background-color: "+a+" !important; }"),s.push("video::cue(."+h+") { color: "+a+"; }"),s.push("video::cue(.bg"+Yx+h+") { background-color: "+a+"; }")}var c=v.createElement("style");c.id=Lx,c.innerHTML=s.join("\n"),n?n.appendChild(c):r.body.appendChild(c)}(n),s}Pt(i,t);var n=i.prototype;return n.Btt=function(t){var i=v.createElement("div");i.className="theoplayer-webvtt-texttrack-"+t,ln(i),i.style.overflow="hidden",i.style.pointerEvents="none";var n=this.J9.ZJ;return n&&(i.style.fontFamily=n),i.style.whiteSpace="pre-line",i},n.VY=function(){this.$W.appendChild(this.Xtt),t.prototype.VY.call(this)},n.oe=function(t,i){var n=this,r=A.min(t/100,i/100),e=HD(this.J9);this.jtt.forEach(function(t){var i=t.DO,s=t.Qtt;n.Ktt(s,r,e,i)}),this.Ktt(this.Xtt,r,e)},n.ntt=function(i){qR(this.$W,i),t.prototype.ntt.call(this,i)},n.Itt=function(t,i,n){for(var r,e,s=this,u=this.$W,o=this.Wu.Iu/100,h=[],a=Ft(t);!(e=a()).done;){var c=e.value;void 0!==c.DO&&(Jn(h,c.DO)||h.push(c.DO))}this.jtt.forEach(function(t,i){var r=t.DO,e=t.Qtt;!n&&Jn(h,r)||(Zi(e),s.jtt.delete(i))});for(var f,v=Ft(i);!(f=v()).done;){var d=f.value;!n&&d.ro||this.Q9(d)}var l=[],g=GD(this.Xtt.getBoundingClientRect());(r=l).push.apply(r,[].concat(this.Ctt(g)));for(var w,m=Ft(h);!(w=m()).done;){var y=w.value,p=void 0;this.jtt.has(y.o)?p=this.jtt.get(y.o).Qtt:(p=Xx(y,o),u.appendChild(p),this.jtt.set(y.o,{DO:y,Qtt:p})),l.push(GD(p.getBoundingClientRect()))}t.sort($x);for(var _,k=Ft(t);!(_=k()).done;){var b=_.value,A=this.Ott(b,l,g);void 0!==A&&l.push(A.X9(.1))}},n.Ott=function(t,i,n){var r,e;t.DO?(e=this.jtt.get(t.DO.o).Qtt,"up"===t.DO.JO&&e.children.length>=1&&(e.style.transitionProperty="top",e.style.transitionDuration="0.433s")):e=this.Xtt;var s=null==(r=this.K9(t))?void 0:r[0];if(s||(s=this.Ytt(t),this.Rtt(t,[s])),e.appendChild(s),t.DO||(Vx(s,t),t.BO?function(t,i,n,r){var e=Gx(t),s=e?n.Mi:n.Ti,u=S(getComputedStyle(i).lineHeight);if(0===u||E(u))return;var o=GD(i.getBoundingClientRect()),h=A.round(om(t));"rl"===t.Pt&&(h=-(h+1));var a=u*h;"rl"===t.Pt&&(a=a-o.Ti+u);h<0&&(a+=s,u=-u);e?o.z9+=a:o.W9+=a;var c=o.Ly(),f=!1;for(;!n.fO(o)||XD(o,r);)if(e)if(u<0&&o.z90&&o.q9>n.q9){if(o.z9=c.z9,f)break;u=-u,f=!0}else o.z9+=u;else if(u<0&&o.W90&&o.H9>n.H9){if(o.W9=c.W9,f)break;u=-u,f=!0}else o.W9+=u;e?i.style.top=(o.z9-n.z9)/n.Mi*100+"%":i.style.left=(o.W9-n.W9)/n.Ti*100+"%"}(t,s,n,i):function(t,i,n,r){var e,s=GD(i.getBoundingClientRect());if(0===s.Ti||0===s.Mi)return;Gx(t)?"center"===t.RO?s.z9-=s.Mi/2:"end"===t.RO&&(s.z9-=s.Mi):"center"===t.RO?s.W9-=s.Ti/2:"end"===t.RO&&(s.W9-=s.Ti);e=""===t.Pt?[QD.POS_Y,QD.NEG_Y,QD.POS_X,QD.NEG_X]:"lr"===t.Pt?[QD.POS_X,QD.NEG_X,QD.POS_Y,QD.NEG_Y]:[QD.NEG_X,QD.POS_X,QD.POS_Y,QD.NEG_Y];qD(s,i,e,n,r)}(t,s,n,i)),!t.DO)return GD(s.getBoundingClientRect())},n.Ytt=function(t){for(var i=new Pa,n=t.U,r=this.Jtt(t),e={Ztt:void 0,xe:r},s=e,u="",o="",h=[e],a=[],c=[];i.ac0?c[c.length-1]:"")):"rt"===A&&"ruby"===b?(h.pop(),h.pop(),s=h[h.length-1]):"lang"===b&&(a.pop(),u=a.length>0?a[a.length-1]:"")}else if(f.Km===Rx.Gtt){var T=f.Htt,S=new Pa;try{Km(T,S)}catch(t){Ye("ERROR collecting timestamp",t)}}}return r},n.$tt=function(t,i){var n=this.J9,r=this.ttt;n.iZ&&(t.style.background=n.iZ);var e=r.$J||i||n.$J;e&&(t.style.color=e)},n.Ktt=function(t,i,n,r){if(r){var e=Hx(r,i);t.style.height=e*n+"px",t.style.left=Wx(r)+"%",t.style.top=zx(r,i)+"px"}t.style.fontSize=Fx*i*n+"px"},n.Jtt=function(t){var i=v.createElement("div");i.style.position="absolute",i.style.margin="0",i.style.padding="0",i.style.unicodeBidi="plaintext",i.style.wordWrap="break-word",i.style.overflowWrap="break-word",i.style.width="auto",i.style.textAlign=t.xO,function(t,i){"rl"===i.Pt?t.style.writingMode="vertical-rl":"lr"===i.Pt?t.style.writingMode="vertical-lr":t.style.writingMode="horizontal-tb"}(i,t),function(t,i){var n=cm(i);Gx(i)?(t.style.width=n+"%",t.style.height="auto"):(t.style.height=n+"%",t.style.width="auto")}(i,t),Vx(i,t);var n=this.J9.eZ;n&&(i.style.background=n);var r=this.J9.$J;return r&&(i.style.color=r),i.style.textShadow=ex(this.J9.sZ),i},i}(zD);function Vx(t,i){var n,r,e=am(i),s=hm(i),u=cm(i);if(Gx(i)){switch(e){case"line-left":n=s;break;case"center":n=s-u/2;break;case"line-right":n=s-u}r=i.BO?0:om(i)}else{switch(e){case"line-left":r=s;break;case"center":r=s-u/2;break;case"line-right":r=s-u}n=i.BO?0:om(i)}t.style.left=n+"%",t.style.top=r+"%"}function jx(t,i){for(var n,r=Ft(i);!(n=r()).done;){var e=n.value;if(e.Ztt){for(var s,u=Ft(e.Ztt.Utt);!(s=u()).done;){var o=s.value;hn(t,Mx+o)}"v"===e.Ztt.JE.toLowerCase()&&e.Ztt.Vtt&&hn(t,"theoplayer-webvtt-voice-"+e.Ztt.Vtt)}}}function Hx(t,i){return t.QO*(Fx*i)*1.14}function Wx(t){return t.ZO-t.KO*t.Ti/100}function zx(t,i){var n=t.$O,r=t.YO*Hx(t,i)/100;return A.max(0,n-r)}function qx(t){var i=v.createElement("div");return i.className=Ox+"default",ln(i),i.style.wordWrap="break-word",i.style.writingMode="horizontal-tb",i.style.pointerEvents="none",i.style.width="auto",i.style.height="auto",i.style.maxHeight="100%",i.style.minHeight="0px",i.style.padding="0",i.style.boxSizing="border-box",i.style.fontSize=Fx*t+"px",i.style.lineHeight="1.14em",i}function Xx(t,i){var n=qx(i);n.className=Ox+t.o;var r=t.Ti,e=Hx(t,i);return n.style.width=r+"%",n.style.height=e+"px",n.style.left=Wx(t)+"%",n.style.right="",n.style.top=zx(t,i)+"px",n.style.bottom="",n.style.boxSizing="border-box",n}function Gx(t){return""===t.Pt}var Qx=[["white","#fff"],["lime","#0f0"],["cyan","#0ff"],["red","#f00"],["yellow","#ff0"],["magenta","#f0f"],["blue","#00f"],["black","#000"]],Yx=String.fromCharCode(95);function $x(t,i){var n=om(t),r=om(i),e=Kx(n,t.BO),s=Kx(r,i.BO);return e&&s?n-r||zP(i,t)||i.jI-t.jI:zP(t,i)||t.jI-i.jI}function Kx(t,i){return i?t<0?t>-8:t>8:t>50}V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt(),V(),It();var Jx=function(t){return t.FONT_REGULAR="regular",t.FONT_UNDERLINE="underline",t.FONT_ITALICS="italics",t.FONT_UNDERLINE_ITALICS="underline-italics",t}({}),Zx={$J:rx.WHITE,ZJ:JD.nl,tZ:"100%",iZ:rx.BLACK,eZ:"transparent",sZ:"none",tit:"regular",nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0},tB=[{iit:rx.WHITE,tit:"regular",eit:0},{iit:rx.WHITE,tit:"underline",eit:0},{iit:rx.GREEN,tit:"regular",eit:0},{iit:rx.GREEN,tit:"underline",eit:0},{iit:rx.BLUE,tit:"regular",eit:0},{iit:rx.BLUE,tit:"underline",eit:0},{iit:rx.CYAN,tit:"regular",eit:0},{iit:rx.CYAN,tit:"underline",eit:0},{iit:rx.RED,tit:"regular",eit:0},{iit:rx.RED,tit:"underline",eit:0},{iit:rx.YELLOW,tit:"regular",eit:0},{iit:rx.YELLOW,tit:"underline",eit:0},{iit:rx.MAGENTA,tit:"regular",eit:0},{iit:rx.MAGENTA,tit:"underline",eit:0},{iit:rx.WHITE,tit:"italics",eit:0},{iit:rx.WHITE,tit:"underline-italics",eit:0},{iit:rx.WHITE,tit:"regular",eit:0},{iit:rx.WHITE,tit:"underline",eit:0},{iit:rx.WHITE,tit:"regular",eit:4},{iit:rx.WHITE,tit:"underline",eit:4},{iit:rx.WHITE,tit:"regular",eit:8},{iit:rx.WHITE,tit:"underline",eit:8},{iit:rx.WHITE,tit:"regular",eit:12},{iit:rx.WHITE,tit:"underline",eit:12},{iit:rx.WHITE,tit:"regular",eit:16},{iit:rx.WHITE,tit:"underline",eit:16},{iit:rx.WHITE,tit:"regular",eit:20},{iit:rx.WHITE,tit:"underline",eit:20},{iit:rx.WHITE,tit:"regular",eit:24},{iit:rx.WHITE,tit:"underline",eit:24},{iit:rx.WHITE,tit:"regular",eit:28},{iit:rx.WHITE,tit:"underline",eit:28}],iB=[11,-1,1,2,3,4,12,13,14,15,5,6,7,8,9,10];function nB(t,i){return Em(t.sit,i.sit)||Fn(t.VN,i.VN)}V(),It(),Ut();var rB=32,eB=/CC([1-4])=(.*)/;function sB(t){if(!t)return[];var i=[],n=t.trim().split(";");if(n.every(function(t){return t.match(eB)}))for(var r,e=Ft(n);!(r=e()).done;){var s=r.value.match(eB),u=s[1],o=s[2];i.push({nit:Number(u),rit:o})}else for(var h=0;h=0;n-=1){var r=i[n];r.Ht===t&&(r.kn(),$n(i,n))}},i.qit=function(i){ap(i.Lt)&&t.Fit(i)&&(i.Ax===Fw.ERROR?this.Wit(i):this.Hit(i))},i.hr=function(){for(var t,i=Ft(this.Oit);!(t=i()).done;){var n=t.value;n.Ht.mn(Mg.wI,this.Git),n.Ht.mn(Mg.AI,this.Git),n.kn()}tr(this.Oit)},i.kn=function(){this.hr();for(var t,i=Ft(this.Oit);!(t=i()).done;){t.value.kn()}this.Gl.mn(Ng.eI,this.Xit),this.Gl.mn(Ng.nI,this.jit),this.Gl.mn(Mg.pa,this.Git),this.zit.mn(oS.pa,this.Qit),this.ea.mn([jT.zL,jT.GL],this.Qit),this.Dz.mn("mI",this.Kit)},t.Fit=function(t){switch(t.Km){case Uw.TTML:case Uw.SRT:case Uw.WEBVTT:case Uw.CEA608:return!0}return!1},xt(t,[{key:"n6",get:function(){return this.zit.ds||this.ea.XL}}]),t}();V(),It(),Wt(),Bt(),Nt(),Yt();var cB=function(t){function i(i){var n;return(n=t.call(this)||this).Yit=void 0,n.Jit=!1,n.Zit=function(){n.Jit=!0,n.So(new HT)},n.$it=function(){n.Jit=!1,n.So(new WT)},n.Yit=i,n.Yit.addEventListener("enterpictureinpicture",n.Zit),n.Yit.addEventListener("leavepictureinpicture",n.$it),n}Pt(i,t);var n=i.prototype;return n.yo=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.jL?this.XL?[3,3]:(t=this.ww([jT.zL,jT.ma]),[4,this.Yit.requestPictureInPicture()]):[3,4];case 1:return i.sent(),[4,t];case 2:i.sent(),this.Jit||this.So(new cS),i.label=3;case 3:return[3,5];case 4:this.So(new cS),i.label=5;case 5:return[2]}})}).call(this)},n.jo=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.jL?this.Jit?(t=this.ww([jT.GL,jT.ma]),[4,this.Yit.ownerDocument.exitPictureInPicture()]):[3,3]:[3,4];case 1:return i.sent(),[4,t];case 2:i.sent(),this.Jit&&this.So(new cS),i.label=3;case 3:return[3,5];case 4:this.So(new cS),i.label=5;case 5:return[2]}})}).call(this)},n.kn=function(){this.Vo(),this.Yit.removeEventListener("enterpictureinpicture",this.Zit),this.Yit.removeEventListener("leavepictureinpicture",this.$it)},xt(i,[{key:"jL",get:function(){var t;return null!=(t=this.Yit.ownerDocument.pictureInPictureEnabled)&&t}},{key:"XL",get:function(){return this.Jit}}]),i}(uh);function fB(t){var i=new FI,n=function(t){var i=[];return MI.la(t)&&i.push(new MI(t)),LI.la(t)&&i.push(new LI(t)),i}(t);if(n.length>0){for(var r,e=Ft(n);!(r=e()).done;){var s=r.value;i.AK(s)}i.yK(n[0])}return i}var vB=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this,i,n,r,e,s)||this).eet=void 0,u.net=void 0,u.tet=void 0,u.iet=void 0,u.tet=fB(i),u.iet=new cB(i),u.eet=new VD,u.net=new aB(u.eet.xe,u.Wu,u.nt,u.Ql,u.Ma,u.mq),u}Pt(i,t);var n=i.prototype;return n.Wx=function(){return this._T},n.zg=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.iet.kn(),this.tet.kn(),this.eet.kn(),this.net.kn(),[4,t.prototype.zg.call(i)];case 1:return n.sent(),[2]}})}).call(this)},n.we=function(){t.prototype.we.call(this),this.eet.we()},n.be=function(){t.prototype.be.call(this),this.eet.be()},n.B9=function(i){t.prototype.B9.call(this,i),this.eet.B9(i)},xt(i,[{key:"$W",get:function(){return this._T}},{key:"Rx",get:function(){return this._T.videoHeight}},{key:"Bx",get:function(){return this._T.videoWidth}},{key:"Ma",get:function(){return this.tet}},{key:"mq",get:function(){return this.iet}}]),i}(xD);V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It();V(),It(),Wt(),Yt(),V(),It();var dB=!1,lB=function(t){return t.ret="HELLO",t.het="HI_THERE",t.oet="INITIALIZE",t.aet="APPEND_INIT",t.uet="APPEND_DATA",t.cet="ACK",t.det="REMOVE",t.let="DESTROY_SESSION",t}({}),gB=function(){function t(){this.im=void 0,this.mT=void 0,this.ta=new Sd}var i=t.prototype;return i.fet=function(t){var i=this;return this.ta.Zo(function(t){return jt(function(){var i,n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return yr(t),i=new MessageChannel,n=i.port1,r=i.port2,l.serviceWorker.controller?[3,2]:[4,hg(l.serviceWorker,"install",t)];case 1:h.sent(),h.label=2;case 2:return"activated"===l.serviceWorker.controller.state?[3,4]:[4,hg(l.serviceWorker.controller,"activate",t)];case 3:h.sent(),h.label=4;case 4:e={kind:"HELLO",port:r},l.serviceWorker.controller.postMessage(e,[r]),n.start(),this.im=n,h.label=5;case 5:return h.trys.push([5,7,,8]),[4,hg(n,"message",t)];case 6:if(s=h.sent(),"HI_THERE"!==(u=s.data).kind)throw new p("Could not set up message channel");return this.mT=u.sessionId,[3,8];case 7:throw mr(o=h.sent())&&this.vet(),o;case 8:return[2]}})}).call(i)},t)},i._et=function(t,i){var n=this;return this.im,this.ta.Zo(function(){return jt(function(){return zt(this,function(n){switch(n.label){case 0:if(!this.im)throw new p("MessageSession not set up yet or already closed.");return i||(i=[]),this.im.postMessage(t,i),[4,hg(this.im,"message")];case 1:return[2,n.sent().data]}})}).call(n)})},i.pet=function(){var t=this;return this.ta.Zo(function(){return t.vet()})},i.vet=function(){if(l.serviceWorker.controller&&"activated"===l.serviceWorker.controller.state&&this.im){var t={kind:"DESTROY_SESSION"};dB,this.im.postMessage(t),this.im.close(),this.im=void 0}},t}();V(),It(),Bt();var wB=function(){function t(){this.wet=1/0}var i=t.prototype;return i.yet=function(t,i){var n=t-i;this.wet=n>this.met?this.wet:n},i.Aet=function(t){this.wet=t},xt(t,[{key:"met",get:function(){return this.wet}}]),t}();V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It();var mB=function(t){return t.Dk="audio",t.Bk="video",t.VU="metadata",t}({}),yB=function(t){function i(i,n){var r;return(r=t.call(this)||this).SQ=void 0,r.Iet=void 0,r.bet=void 0,r.Tet=void 0,r.ta=void 0,r.Eet=void 0,r.ket=void 0,r.SQ=i,r.Iet=n,r.bet=void 0,r.Tet=void 0,r.ta=new Sd,r.Eet=!1,r.ket=!1,r}Pt(i,t);var n=i.prototype;return n.F3=function(t,i){},n.U3=function(t,i){},n.WZ=function(){return this.ket},n.V3=function(){return jt(function(){return zt(this,function(t){return[2]})})()},n.r3=function(t,i){return jt(function(){return zt(this,function(t){return[2]})})()},n.H2=function(t,i,n){return jt(function(){var r,e,s;return zt(this,function(u){if(r=this,t.Km!==JR.vZ)throw new p("Streaming or opaque segments are not supported yet.");return e=t.ck,s=function(){return jt(function(){var t,n,r;return zt(this,function(s){switch(s.label){case 0:return t=e.buffer,n={kind:lB.uet,mediaType:pB(this.SQ),segment:e,startPts:i.xet,totalDuration:i.ct},[4,this.Iet._et(n,[t])];case 1:return s.sent(),void 0===this.bet&&(r=i.xet+i.bU,this.bet=r,this.Tet=r),this.Tet=this.Tet+i.ct,this.So(new ah($R.lZ)),[2]}})}).call(r)},[2,this.ta.Zo(function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:yr(t),i.label=1;case 1:return i.trys.push([1,,3,4]),this.Eet=!0,[4,s()];case 2:return i.sent(),[3,4];case 3:return this.Eet=!1,[7];case 4:return[2]}})}).call(r)},n)]})}).call(this)},n.z2=function(t,i,n){return jt(function(){var i,r,e;return zt(this,function(s){if(i=this,t.Km!==JR.vZ)throw new p("Streaming or opaque initialization segments are not supported yet.");return r=t.ck,e=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t={kind:lB.aet,mediaType:pB(this.SQ),segment:r},[4,this.Iet._et(t,[])];case 1:return i.sent(),[2]}})}).call(i)},[2,this.ta.Zo(function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:yr(t),i.label=1;case 1:return i.trys.push([1,,3,4]),this.Eet=!0,[4,e()];case 2:return i.sent(),[3,4];case 3:return this.Eet=!1,[7];case 4:return[2]}})}).call(i)},n)]})}).call(this)},n.C3=function(){this.ket=!0},n.A3=function(){this.ket=!1},n._S=function(t,i,n){return jt(function(){var t,r;return zt(this,function(e){return t=this,r=function(){return jt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return t={kind:lB.det,mediaType:pB(this.SQ),endTime:i},[4,this.Iet._et(t)];case 1:return n.sent(),this.bet=void 0,this.Tet=void 0,this.So(new ah($R.lZ)),[2]}})}).call(t)},[2,this.ta.Zo(function(i){return jt(function(){return zt(this,function(t){switch(t.label){case 0:yr(i),t.label=1;case 1:return t.trys.push([1,,3,4]),this.Eet=!0,[4,r()];case 2:return t.sent(),[3,4];case 3:return this.Eet=!1,[7];case 4:return[2]}})}).call(t)},n)]})}).call(this)},n.TZ=function(t){return this.SQ===t.qT},n.EZ=function(t){return this.SQ=t.qT,ot.resolve()},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),[4,this.ta.kn()];case 1:return t.sent(),[2]}})}).call(this)},xt(i,[{key:"IP",get:function(){return void 0===this.bet||void 0===this.Tet?OA.iL():new OA([this.bet,this.Tet])}},{key:"Cd",get:function(){return{qT:this.SQ}}},{key:"B3",get:function(){return qv(this.SQ)?cw.Dk:Xv(this.SQ)?cw.Bk:cw.pk}},{key:"oQ",get:function(){return this.SQ}},{key:"M3",get:function(){return OA.iL()}},{key:"MY",get:function(){return 30},set:function(t){}},{key:"UY",get:function(){return 30},set:function(t){}},{key:"ga",get:function(){return this.Eet}},{key:"Pet",get:function(){return this.bet}},{key:"PO",get:function(){return this.Tet}}]),i}(uh);function pB(t){return t.match(/video/)?mB.Bk:mB.Dk}var _B=function(){function t(t,i,n,r){this.YS=void 0,this.hw=void 0,this._T=void 0,this.P4=void 0,this.x4=void 0,this.TS=void 0,this.YS=t,this.x4=Wn(i,function(t){return Boolean(t.oQ.match(/video/))}),this.P4=Wn(i,function(t){return Boolean(t.oQ.match(/audio/))}),this.hw=n,this._T=r,this.Cet()}var i=t.prototype;return i.Cet=function(){},i.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,ot.all([this.P4,this.x4].filter(Fi).map(function(t){return t.zg()}))];case 1:return t.sent(),[2]}})}).call(this)},i.C4=function(t){},i.M4=function(t,i,n,r){},i.C3=function(){var t,i;null==(t=this.P4)||t.C3(),null==(i=this.x4)||i.C3()},i.A3=function(){var t,i;null==(t=this.P4)||t.A3(),null==(i=this.x4)||i.A3()},i.TZ=function(t){return!!RD(this,t)},i.EZ=function(t){return this.YS=t,ot.resolve()},i.xZ=function(t){},i.bZ=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,this.hw.nw(t.Ym,i)];case 1:return[4,r.sent().IS()];case 2:return n=r.sent(),[4,this.SZ(n)];case 3:return r.sent(),[2,n]}})}).call(this)},i.SZ=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:if(t&&!this._T.src)throw new vw(gd.CONTENT_PROTECTION_ERROR,"Attempted to attach MediaKeys to a sourceless MediaElement");if(!t&&this._T.src)throw new vw(gd.CONTENT_PROTECTION_ERROR,"Attempted to remove MediaKeys from a non-empty MediaElement");return(i=this.TS)?[4,i.PS(this._T)]:[3,2];case 1:n.sent(),this.TS=void 0,n.label=2;case 2:return t?[4,t._n(this._T)]:[3,4];case 3:n.sent(),this.TS=t,n.label=4;case 4:return[2]}})}).call(this)},t.Ret=function(i,n,r,e){for(var s=[],u=0;u0){var n,r,e=(t=i[0]).width,s=this.Yit.videoWidth/this.Yit.videoHeight,u=t.height;e/u>s?(n=u*s,r=u):(r=e/s,n=e),this.Yit.style.width=n+"px",this.Yit.style.height=r+"px",this.Yit.style.marginLeft=(e-n)/2+"px",this.Yit.style.marginTop=(u-r)/2+"px",this.Yit.style.backgroundColor="black"}},n.sst=function(){this.Yit.style.width="100%",this.Yit.style.height="100%",this.Yit.style.marginLeft="",this.Yit.style.marginTop="",this.Yit.style.backgroundColor=""},n.gq=function(t,i,n,r,e){},n.tI=function(t,i,n,r,e,s,u,o,h){var a=new sN(t,i,n,r,e,s,u,h,o);return this.Gl.tt(a),this.N7.tt(a),a},n.wq=function(t){throw p("Not supported.")},n.QZ=function(t){},n.ZP=function(){return RR(this.Yit)},n.be=function(){this.Yit.style.display="block",this.eet.be()},n.we=function(){this.Yit.style.display="none",this.eet.we()},n.x9=function(){},n.Un=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(t.Km===Op.mV)throw new p("Not yet implemented");return[4,this.Iet.fet()];case 1:return r.sent(),i=Wn(t.aq,function(t){return t.kS.Km===Do.jm}),n={kind:lB.oet,mediaBufferConfigs:t.L4.map(function(t){return t.qT}),fairPlaySdkUri:null==i?void 0:i.HH},[4,this.Iet._et(n)];case 2:return r.sent(),this.iq=_B.Ret(t,this.Iet,this.hw,this.Yit),this.PZ.Un(this.iq,t),this.Yit.setAttribute("x-webkit-airplay","deny"),this.Yit.setAttribute("x-webkit-wirelessvideoplaybackdisabled",""),this.Yit.disableRemotePlayback=!0,this.Yit.preload="none",this.Yit.src="https://theo.proxy/"+this.Iet.mT+"/master.m3u8",[2,this.iq]}})}).call(this)},n.I9=function(){},n.iV=function(t){this.Gl.it(t),this.N7.it(t)},n.Aq=function(){for(var t,i=Ft(this.Gl.II.slice());!(t=i()).done;){t.value.kn()}this.Gl.hr()},n.KW=function(t){},n.vq=function(){return!1},n.B9=function(t){t.appendChild(this.Yit),this.eet.B9(t)},n.Wx=function(){return this.Yit},n.Yx=function(){},xt(i,[{key:"$W",get:function(){return this.Yit}},{key:"n5",get:function(){return!1}},{key:"MP",get:function(){return this.Yit.currentTime+this.jet.met}},{key:"hx",get:function(){return this.Yit.paused}},{key:"Mx",get:function(){return this.Yit.volume},set:function(t){this.Yit.volume=t}},{key:"ux",get:function(){return this.Yit.playbackRate},set:function(t){this.Yit.playbackRate=t}},{key:"Qet",get:function(){return this.Yit.defaultPlaybackRate}},{key:"IP",get:function(){var t,i;return null!=(i=null==(t=this.iq)?void 0:t.IP)?i:OA.iL()}},{key:"Ket",get:function(){return OA.jn(this.Yit.buffered)}},{key:"_x",get:function(){var t=this.Yet;return this.Ho.OM(t.Ny(this.jet.met))}},{key:"Yet",get:function(){return OA.jn(this.Yit.played)}},{key:"kx",get:function(){return this.Sz}},{key:"Y4",get:function(){return!1}},{key:"a5",get:function(){return!1}},{key:"ct",get:function(){return this.Yit.duration}},{key:"$P",get:function(){return this.Yit.muted},set:function(t){this.Yit.muted=t}},{key:"Pit",get:function(){return this.Yit.style}},{key:"CL",get:function(){return io({},GR,{RL:!0})}},{key:"Ax",get:function(){return this.Q8.Ax}},{key:"Rx",get:function(){return this.Yit.videoHeight}},{key:"Bx",get:function(){return this.Yit.videoWidth}},{key:"UP",get:function(){return this.Yit.ended}},{key:"Mi",get:function(){return this.Yit.offsetHeight*Vi.Zs.fp}},{key:"Ti",get:function(){return this.Yit.offsetWidth*Vi.Zs.fp}},{key:"KP",get:function(){return!1}},{key:"R9",get:function(){return this.C9}},{key:"CP",get:function(){}},{key:"Wu",get:function(){return this.nst}},{key:"lt",get:function(){}},{key:"Ma",get:function(){return this.tet}},{key:"mq",get:function(){return this.ea}},{key:"Sx",get:function(){return this.iq?this.iq.Sx:OA.iL()}},{key:"nq",get:function(){}},{key:"nt",get:function(){return this.Gl}},{key:"Ql",get:function(){return this.Dz}},{key:"Vx",get:function(){return!1},set:function(t){}},{key:"i7",get:function(){return"block"===this.Yit.style.display}},{key:"Eq",get:function(){return this.PZ.Eq},set:function(t){this.PZ.Eq=t}},{key:"N9",get:function(){},set:function(t){}},{key:"p8",get:function(){}}]),i}(uh),bB=[cw.Dk,cw.Bk],AB=function(){function t(t,i,n,r,e,s){void 0===r&&(r=2),void 0===e&&(e=bB),void 0===s&&(s=Od()),this.fst=void 0,this.rst=void 0,this.hw=void 0,this.hst=void 0,this.sc=void 0,this.Dz=void 0,this.VJ=void 0,this.ast=void 0,this.fst=r,this.rst=[].concat(e),this.hw=s,this.sc=t,this.Dz=i,this.VJ=n,this.hst=ro(),this.lst()}var i=t.prototype;return i.ust=function(t){for(var i,n=Ft(this.Bz);!(i=n()).done;){i.value.B9(t)}},i.Gq=function(t){var i=this.hst.get(t);if(i){var n=Wn(i,function(t){return t.cst});return n?(n.cst=!1,n.ost):void 0}},i.dst=function(t){if(!this.ast){var i,n=null==(i=this.hst.get(cw.Bk))?void 0:i[0].ost.$W;if(!n)throw new p("Error creating iOS Safari MediaController");this.ast=new kB(n,this.hw,this.sc,this.Dz),n.parentElement&&this.ast.B9(n.parentElement)}return this.ast},i.Pq=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return i=t.$W,n=i.tagName.toLowerCase(),[4,t.hr()];case 1:return e.sent(),Lr(i),(r=Wn(this.hst.get(n)||[],function(i){return t===i.ost}))&&(r.cst=!0),[2]}})}).call(this)},i.xz=function(){for(var t,i=Ft(this.Bz);!(t=i()).done;){t.value.D9()}},i.kn=function(){for(var t,i=Ft(this.Bz);!(t=i()).done;){var n=t.value,r=n.$W;n.zg(),Mr(r),Zi(r)}this.hst.clear(),this.ast=void 0},i.lst=function(){for(var t,i=Ft(this.rst);!(t=i()).done;){var n=t.value,r=[];this.hst.set(n,r);for(var e=0;e0)for(;n1||t<=0)throw new RangeError("The step must be a number greater than 0 and smaller than or equal to 1");var n;return n="function"==typeof f.IntersectionObserver?new CB(this.bo,t,this.Rst(i)):new NB(this.bo,t,this.Rst(i)),this.Cst.push(n),n},i.Uo=function(t){t.Xx(),Yn(this.Cst,t)},i.Ist=function(t){for(var i,n=Ft(this.Cst);!(i=n()).done;){var r=i.value;if(r.Ca===t)return r}},i.kn=function(){for(var t,i=Ft(this.Cst);!(t=i()).done;){t.value.Xx()}tr(this.Cst)},xt(t,[{key:"Est",get:function(){return this.Pst}},{key:"Lo",get:function(){return this.xst},set:function(t){if(E(t)||t<0||t>1)throw new RangeError("The threshold must be a value between 0 and 1");this.xst=t}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{get ratio(){return t.Est},get visible(){return t.Est>t.Lo},get visibleThreshold(){return t.Lo},set visibleThreshold(i){i=$g(i),t.Lo=i},addObserver:function(i,n){return i=$g(i),t.Do(i,n).Ca},removeObserver:function(i){var n=t.Ist(i);n&&t.Uo(n)}}}(this)),this.hu}}]),t}();V(),It(),Nt();var xB=function(t){function i(){return t.call(this,ch.Iw)||this}return Pt(i,t),i}(ah),BB=function(t){function i(i,n,r,e){var s;(s=t.call(this)||this).Qst=void 0,s.Cd=void 0,s.Pa=void 0,s.jst=void 0,s.SP=void 0,s.eJ=void 0,s.gJ=void 0,s.Gst=void 0,s.zst=void 0,s.Rz=void 0,s.Cz=void 0,s.Wst=void 0,s.qJ=void 0,s.Ost=void 0,s.Xst=void 0,s.Dz=void 0,s.Bst=!1,s.ko=!1,s.gO=void 0,s.gz=void 0,s.Kst=!1,s.Iz=void 0,s.Mst=void 0,s.Ust=void 0,s.Lst=void 0,s.Jc=void 0,s.Io=void 0,s.Fst=void 0,s.Na=void 0,s.qst=function(t){if(!s.Kst){s.Kst=!0;var i=s.Qst,n=ww(t);s.Pa.BI=new gS(s.xe,n,t),Er(i.kn())}},s.Yst=function(t){t.type!==ch.Xw&&t.type!==ch.Gw&&s.So(t)};var u=$g(n.uid);E(u)?s.gO=Rw++:s.gO=u,s.Cd=n;var o=Vi.SP,h=new FR;s.jst=new vI("10.0.0",o,h),s.Rz=new yR,s.Cz=new Ub;var a=new SB(o,s.Rz);s.SP=new sR(a,n.allowMixedContent),s.qJ=null!=r?r:new VE(n.isEmbeddable,"10.0.0",BE()),s.Wst=new LR(o,s.qJ,s.jst,h,n,BE()),s.Wst.FJ().catch(s.qst),s.Ost=new DI(i),s.Ost.wn(_I.yn,s.Rs),s.Dz=new zR;var c=new(null!=e?e:AB)(s.Ost,s.Dz,n);c.ust(i),s.eJ=new AR,s.gJ=new SR;var f=new lS(i,n,s.SP,s.Rz,s.Cz,c,s.Dz);s.Rz.VY(f);var v=f;return v=new TR(v,s.Vst),v=new ER(v,s._J),s.Qst=v,s.Pa=new KT(s.Qst),s.Pa.lw(s.Yst),s.Fst=new IR(s.Pa),s.Ust=new hR(s.Pa,s.SP,s.Rz),s.Gst=new pI(s),s.Xst=new UI(s.Pa,n.allowNativeFullscreen),s.zst=new XI(s.Xst,s.Pa.Aa()),s.Ost._n(),s.Io=new DB(i),s.Iz=new AB(s.Ost,s.Dz,n,1,[cw.Bk]),s.Mst=new QI(s.Iz),s.Lst=new NR,s}Pt(i,t);var n=i.prototype;return n.RP=function(){return this.Pa.IP},n.LP=function(){return this.Pa.MP},n.OP=function(t,i){this.Pa.OP(t,i)},n.Hst=function(){return this.LP()},n.Nd=function(){return this.Pa.ct},n.HP=function(){return this.Pa.lt},n.qP=function(){return this.Pa.WP},n.ix=function(t){this.Pa.$P=t,t||this.hx||this.qx()},n.lx=function(){return this.Pa.ux},n.vx=function(t){this.Pa.ux=t},n.gx=function(){return this.Pa._x},n.Tx=function(){return this.Pa.Sx},n.Ox=function(t){this.Pa.Mx=t},n.Ea=function(){MT(this,RS,this)},n.Gx=function(){this.Pa.Gx()},n.zx=function(){this.Pa.zx()},n.nu=function(){return this.gz},n.Ta=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.gz=t,t?(this.Wst.xj(t).catch(this.qst),n=function(t){t.sources;var i=t.sources.filter(function(t){return Ui(t.integration)});return t.sources=i,t}(t),[4,this.Pa.Ta(n,i)]):[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})}).call(this)},n.Px=function(t,i,n){return this.Pa.Px(t,i,n)},n.xx=function(){return this.Pa.xx()},n.qx=function(){if(!this.ko){this.Pa.qx(),this.Mst.qx();for(var t=this.xe.getElementsByTagName("video"),i=0;i0]}})}).call(this)},n.Drt=function(i,n,r){return t.prototype.H2.call(this,i,n,r)},n.Brt=function(i,n,r){return t.prototype._S.call(this,i,n,r)},xt(i,[{key:"ost",get:function(){return this.TL},set:function(t){this.TL=t}}]),i}(FO),VO=function(t){function i(i){var n;return(n=t.call(this,i)||this).TL=void 0,n.grt(i),n}return Pt(i,t),i.prototype.mrt=function(t){var i=new UO(t);return i.ost=this.TL,i},xt(i,[{key:"ost",get:function(){return this.TL},set:function(t){this.TL=t,this.P4&&(this.P4.ost=t),this.x4&&(this.x4.ost=t)}}]),i}(MO);V(),It(),Bt(),Nt();var jO=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),xt(i,[{key:"mx",get:function(){return this.iq.mx},set:function(t){this.iq.mx=t}}]),i}(OO);function HO(t){var i=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.Wx=function(){return this.TL.Wx()},xt(i,[{key:"$W",get:function(){return this.TL.$W}},{key:"Bx",get:function(){return this.TL.Bx}},{key:"Rx",get:function(){return this.TL.Rx}}]),i}(t);return i}V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt(),V(),It(),Wt(),Bt(),Nt(),Yt();var WO=function(t){function i(i){var n;return(n=t.call(this)||this).TL=void 0,n.iq=void 0,n.Vrt=new aA,n.jrt=function(t){return n.Zx(t)},n.TL=i,n.Vrt.BI=i.nt,n.TL.wn(XR,n.jrt),n}Pt(i,t);var n=i.prototype;return n.RP=function(){return this.TL.IP},n.DP=function(){return this.TL.CP},n.LP=function(){return this.TL.MP},n.Nd=function(){return this.TL.ct},n.Mrt=function(){return this.TL.nq},n.Lrt=function(){return this.TL.UP},n.Hx=function(){return this.TL.Ma},n.Aa=function(){return this.TL.mq},n.Ort=function(){return this.TL.hx},n.gx=function(){return this.TL._x},n.bx=function(){return this.TL.Ax},n.Tx=function(){return this.TL.Sx},n.Ex=function(){return this.TL.kx},n.Frt=function(){return this.TL.Y4},n.Urt=function(){return this.TL.a5},n.Ix=function(){return this.Vrt},n.att=function(){return this.TL.Ql},n.Hrt=function(){return this.TL.Eq},n.Wrt=function(t){this.TL.Eq=t},n.qrt=function(t){this.TL.N9=t},n.zrt=function(){return this.TL.p8},n.ZP=function(){return this.TL.ZP()},n.Gx=function(){return this.TL.Gx()},n.zx=function(){this.TL.zx()},n.My=function(t,i,n){this.TL.My(t,i,n)},n.KW=function(t){this.TL.KW(t)},n.be=function(){this.TL.be()},n.we=function(){this.TL.we()},n.tI=function(t,i,n,r,e,s,u,o){return this.TL.tI(t,i,n,r,e,s,u,o)},n.wq=function(t){return this.TL.wq(t)},n.vq=function(){return this.TL.vq()},n.gq=function(t,i,n,r,e){return this.TL.gq(t,i,n,r,e)},n.iV=function(t){this.TL.iV(t)},n.Aq=function(){this.TL.Aq()},n.QZ=function(t){return this.TL.QZ(t)},n.Un=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return[4,this.TL.Un(t)];case 1:return i=r.sent(),n=t.Km===Op.mV?this.Grt(i):this.Xrt(i),this.iq=n,[2,n]}})}).call(this)},n.hr=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.iq?[4,this.iq.zg()]:[3,2];case 1:t.sent(),this.iq=void 0,t.label=2;case 2:return[4,this.TL.hr()];case 3:return t.sent(),[2]}})}).call(this)},n.C8=function(){return this.TL.C8()},n.x9=function(){this.TL.x9()},n.I9=function(){this.TL.I9()},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),this.TL.mn(XR,this.jrt),this.Vrt.BI=void 0,this.Vrt.kn(),this.iq?[4,this.iq.zg()]:[3,2];case 1:t.sent(),this.iq=void 0,t.label=2;case 2:return[2]}})}).call(this)},n.D9=function(){this.TL.D9()},n.Qrt=function(t){this.TL.mn(XR,this.jrt),this.TL=t,this.Vrt.BI=t.nt,this.TL.wn(XR,this.jrt)},n.Zx=function(t){this.So(t)},xt(i,[{key:"Nrt",get:function(){return this.TL}},{key:"IP",get:function(){return this.RP()}},{key:"CP",get:function(){return this.DP()}},{key:"MP",get:function(){return this.LP()}},{key:"Wu",get:function(){return this.TL.Wu}},{key:"ct",get:function(){return this.Nd()}},{key:"nq",get:function(){return this.Mrt()}},{key:"UP",get:function(){return this.Lrt()}},{key:"lt",get:function(){return this.TL.lt}},{key:"Mi",get:function(){return this.TL.Mi}},{key:"Ti",get:function(){return this.TL.Ti}},{key:"Ma",get:function(){return this.Hx()}},{key:"mq",get:function(){return this.Aa()}},{key:"$P",get:function(){return this.TL.$P},set:function(t){this.TL.$P=t}},{key:"hx",get:function(){return this.Ort()}},{key:"ux",get:function(){return this.TL.ux},set:function(t){this.TL.ux=t}},{key:"_x",get:function(){return this.gx()}},{key:"Ax",get:function(){return this.bx()}},{key:"Sx",get:function(){return this.Tx()}},{key:"kx",get:function(){return this.Ex()}},{key:"Y4",get:function(){return this.Frt()}},{key:"a5",get:function(){return this.Urt()}},{key:"nt",get:function(){return this.Ix()}},{key:"Ql",get:function(){return this.att()}},{key:"i7",get:function(){return this.TL.i7}},{key:"Mx",get:function(){return this.TL.Mx},set:function(t){this.TL.Mx=t}},{key:"R9",get:function(){return this.TL.R9}},{key:"KP",get:function(){return this.TL.KP}},{key:"CL",get:function(){return this.TL.CL}},{key:"Eq",get:function(){return this.Hrt()},set:function(t){this.Wrt(t)}},{key:"N9",get:function(){return this.TL.N9},set:function(t){this.qrt(t)}},{key:"p8",get:function(){return this.zrt()}}]),i}(uh),zO=function(t){function i(i){return t.call(this,i)||this}Pt(i,t);var n=i.prototype;return n.B9=function(t){this.TL.B9(t)},n.Yx=function(){this.TL.Yx()},xt(i,[{key:"Nrt",get:function(){return this.TL}},{key:"$W",get:function(){return this.TL.$W}},{key:"n5",get:function(){return this.TL.n5}},{key:"Vx",get:function(){return this.TL.Vx},set:function(t){this.TL.Vx=t}}]),i}(WO),qO=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.Xrt=function(t){var i=new VO(t);return i.ost=this,i},n.Grt=function(t){return new jO(t)},i}(zO),XO=function(t){function i(i){return t.call(this,i)||this}return Pt(i,t),i}(BO(qO)),GO=function(t){function i(i){return t.call(this,i)||this}return Pt(i,t),i}(HO(qO)),QO=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.Gq=function(i){return i===cw.Bk?new GO(t.prototype.Gq.call(this,i)):i===cw.Dk?new XO(t.prototype.Gq.call(this,i)):void 0},n.Pq=function(i){var n=this;return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return[4,(r=i).zg()];case 1:return e.sent(),[4,t.prototype.Pq.call(n,r.Nrt)];case 2:return e.sent(),[2]}})})()},i}(xO);V(),It();var YO=function(){function t(t){var i=this;this.oa=void 0,this.Yrt=function(t){t.persisted&&i.Krt()},this.oa=t,f.addEventListener("pageshow",this.Yrt)}var i=t.prototype;return i.Krt=function(){this.oa.Jx()},i.kn=function(){f.removeEventListener("pageshow",this.Yrt)},t}();V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It(),V(),It();var $O=function(){function t(t){this.tht=void 0,this.tht=t}var i=t.prototype;return i.Jrt=function(t,i,n){return ot.resolve()},i.Zrt=function(t,i,n,r){var e=[];if(r){var s={yU:i.EO,AU:i.PO,bU:n.$rt.bU};r.Km===Uw.TTML?e=Fy(t,r,s,n.oQ):r.Km===Uw.WEBVTT&&(e=Um(t,s,this.tht).L)}return e},i.hr=function(){},t}();V(),It(),Ut(),V(),It(),Ut(),V(),It();var KO,JO=function(t){return t.TC="vttc",t.iht="vsid",t.eht="iden",t.sht="ctim",t.nht="sttg",t.rht="payl",t.hht="vtte",t.oht="vtta",t}({}),ZO=function(){function t(){}return t.aht=function(i){return Boolean(t.uht[i])},t.TD=function(i){for(var n,r=[],e=Ft(Ay.aD(new py(i,new Pa)));!(n=e()).done;){var s=n.value;t.aht(s.Km)&&r.push(t.uht[s.Km](s.ck))}return r},t.cht=function(i){var n=Ay.aD(i),r=Sy(n,JO.iht),e=Sy(n,JO.eht),s=Sy(n,JO.sht),u=Sy(n,JO.nht),o=Sy(n,JO.rht);return{Km:JO.TC,dht:r?t.fht(r):void 0,vht:e?t._ht(e):void 0,ght:s?t.pht(s):void 0,mht:u?t.wht(u):void 0,yht:o?t.Aht(o):void 0}},t.fht=function(t){return{Km:JO.iht,bht:t.$C()}},t._ht=function(t){return{Km:JO.eht,vht:t.nD()}},t.pht=function(t){return{Km:JO.sht,Sht:t.nD()}},t.wht=function(t){return{Km:JO.nht,Tht:t.nD()}},t.Aht=function(t){return{Km:JO.rht,kht:t.nD()}},t.Eht=function(t){return{Km:JO.hht}},t.Pht=function(t){return{Km:JO.oht,xht:t.nD()}},t}();ZO.uht=((KO={})[JO.TC]=ZO.cht,KO[JO.hht]=ZO.Eht,KO[JO.oht]=ZO.Pht,KO);var tM=function(){function t(){this.Rht=NaN}var i=t.prototype;return i.Jrt=function(t,i,n){var r=new DataView(t.Iht),e=Ry.TD(r),s=Wn(e,function(t){return t.Km===gy.OR});return s&&(this.Rht=s.Z[0].KD.gD.qD),ot.resolve()},i.Zrt=function(t,i,n){if(E(this.Rht))return[];var r=Aa(t),e=Ry.TD(r),s=ky(e,gy.IC),u=ky(e,gy.OC);if(!s||0===s.Z.length||!u)return[];var o=function(t,i,n){for(var r,e=t.Z[0],s=e.GN?e.GN.GN.toNumber()/n:i.EO,u=[],o=Ft(e.zN);!(r=o()).done;){var h,a=r.value;(h=u).push.apply(h,[].concat(a.JN))}return{Cht:s,JN:u}}(s,i,this.Rht),h=n.$rt.bU;return function(t,i,n,r){for(var e=ZO.TD(Aa(i.ck)),s=t.JN,u=t.Cht+r,o=[],h=0,a=0;a=this.Lat},t}(),lM=function(){function t(t,i){this.Hat=void 0,this.Fat=void 0,this.Xat=void 0,this.Hat=i,i&&fw(t)?t===cw.Bk?(this.Xat=5e3,this.Fat=new dM(.05,1,0)):(this.Xat=0,this.Fat=new dM(.005,.1,0)):(this.Xat=16e3,this.Fat=new dM)}return t.prototype.Uat=function(t){var i=t.Vat,n=this.Hat?t.Wat-t.qat:t.Wat-t.zat,r=t.Gat;!r&&i=this.Rz.GY}},{key:"Hut",get:function(){var t,i=this.Fut.QW;if(i&&i.V>0)t=i.An(0);else{t=this.M8.MP;var n=this.Fut.ZZ,r=n.VM(t);r>=0&&(t=n.An(r))}var e=this.Fut.Sx.Tn(0);if(e>t){if(this.Fut.Tn<=t&&this.Fut.An>=t&&e>t+LM)throw new oM(t,e);t=e}return t=this.Fut.qut.DM(t)}}]),t}();V(),It(),Bt(),Ut();var UM=function(){function t(){this.Wm=void 0,this.Gut=void 0,this.Wm=ro(),this.Gut=OA.iL()}var i=t.prototype;return i.Xut=function(t){return this.Wm.get(t.o)},i.jut=function(){var t=this.Gut;return this.Wm.forEach(function(i){t=t.OM(i)}),t},i.Qut=function(t){if(this.Gut.Cr(t))return!0;var i=!1;return this.Wm.forEach(function(n){i=i||n.Cr(t)}),i},i.Kut=function(t,i){var n=this.Wm.get(i.o);return!!n&&n.Cr(t)},i.HM=function(t,i){if(this.Gut.HM(t,i))return!0;var n=!1;return this.Wm.forEach(function(r){n=n||r.HM(t,i)}),n},i.Yut=function(t,i){var n=this.Wm.get(i),r=n?n.OM(t):t;this.Wm.set(i,r),this.Gut=this.Gut.OM(t)},i.Jut=function(t){var i=this;this.Wm.forEach(function(n,r){i.Wm.set(r,n.OM(t))}),this.Gut=this.Gut.OM(t)},i.Zut=function(t){var i=this;this.Wm.forEach(function(n,r){i.Wm.set(r,n.Mn(t))}),this.Gut=this.Gut.Mn(t)},i.hr=function(){var t=this;this.Wm.forEach(function(i,n){t.Wm.set(n,OA.iL())}),this.Gut=OA.iL()},xt(t,[{key:"zut",get:function(){if(0===this.Wm.size)return this.Gut;var t=OA.tL(0,1/0);return t=t.Mn(this.Gut),this.Wm.forEach(function(i){t=t.Mn(i)}),t}}]),t}(),VM=function(){function t(t){this.Ht=void 0,this.tct=void 0,this.$Z=void 0,this.ect=[],this.Ht=t,this.tct=new UM,this.$Z=new UM}var i=t.prototype;return i.ict=function(t){for(var i,n=Ft(this.ect);!(i=n()).done;){var r=i.value;if(r.sat>t)break;if(r.nat>t)return r}},i.sct=function(t){for(var i,n=Ft(this.ect);!(i=n()).done;){var r=i.value;if(r.nct>t)break;if(r.rct>=t)return r}},i.hct=function(t,i){for(var n,r=[],e=Ft(this.ect);!(n=e()).done;){var s=n.value;if(s.sat>t)break;s.nat>=i&&r.push(s)}return r},i.eat=function(){return this.ect},i.aat=function(t){var i=OA.tL(t.nct,t.rct),n=i.BM();this.tct.Zut(n),this.tct.Yut(i,t.oat),this.act(n);var r=Xn(this.ect,function(i){return t.sat<=i.sat});r<0?this.ect.push(t):this.ect[r].nat<=t.nat?this.ect.splice(r,1,t):this.ect.splice(r,0,t)},i.t$=function(t,i){this.$Z.Yut(t,i)},i.uct=function(t){this.$Z.Jut(t)},i.Zut=function(t){this.tct.Zut(t),this.$Z.Zut(t);var i=this.tct.jut();this.act(i)},i.act=function(t){this.ect=this.ect.filter(function(i){return t.qM(i.nct,i.rct)}).map(function(i){return i.cct&&!t.HM(i.nct,i.rct)?function(t,i){return{oat:t.oat,sat:t.sat,nat:t.nat,nct:t.nct,rct:t.rct,cct:i}}(i,!1):i})},i.hr=function(){this.tct.hr(),this.$Z.hr(),this.ect=[]},i.kn=function(){this.hr()},xt(t,[{key:"$ut",get:function(){return this.tct}},{key:"ZZ",get:function(){return this.$Z}}]),t}();V(),It(),V(),It(),Wt(),Bt(),Ut(),Yt();var jM=function(){function t(t,i,n){this.fat=void 0,this.Dot=void 0,this.jp=void 0,this.dct=void 0,this.fat=t,this.Dot=i,this.jp=n}var i=t.prototype;return i.lct=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:return yr(n),e=this.Dot.sct(t),r=e&&Pn(e.rct,t,1e-5)?e.nat:t,s=this.fct(r),u=function(t){return HM.bind(void 0,t)}(r),[4,this.jp.vct(u,s,i,n)];case 1:o=f.sent(),yr(n),f.label=2;case 2:return o&&this._ct(o.$at)?(h=qM(o.$at),a=o.kot,[4,this.jp.vct(h,[a],i,n)]):[3,4];case 3:return o=f.sent(),yr(n),[3,2];case 4:return o?this.gct(o.$at)?(c=this.pct(o.$at),t=c.An?[4,this.findFirstNonAppendedSegmentAfterSegment(o,i,n)]:[3,8];case 7:return[2,f.sent()];case 8:if(o.kot.mct(o.$at))return[2,void 0];throw new p("Fatal buffering error")}})}).call(this)},i.findFirstNonAppendedSegmentAfterSegment=function(t,i,n){return jt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:r=t,u.label=1;case 1:return e=qM(r.$at),s=t.kot,[4,this.jp.vct(e,[s],i,n)];case 2:r=u.sent(),yr(n),u.label=3;case 3:if(r&&this.gct(r.$at))return[3,1];u.label=4;case 4:return r?[2,r]:[2,void 0]}})}).call(this)},i.findFirstNonAppendedSegmentBeforeSegment=function(t,i,n,r){return jt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:e=t,h.label=1;case 1:return s=function(t){return WM.bind(void 0,t)}(e.$at),u=t.kot,[4,this.jp.vct(s,[u],i,n)];case 2:e=h.sent(),yr(n),h.label=3;case 3:if(e&&this.gct(e.$at))return[3,1];h.label=4;case 4:if(!e)throw o=t.kot.wct.Tn,new oM(o,r.Tn,t.kot);return[2,e]}})}).call(this)},i.yct=function(t){return this.Dot.$ut.Qut(t)},i.Act=function(t){return this.Dot.hct(t.EO,t.PO)},i.gct=function(t){var i=this.Act(t);return i.length>0&&function(t,i){return function(t){for(var i,n=OA.iL(),r=Ft(t);!(i=r()).done;){var e=i.value;n=n.OM(OA.tL(e.sat,e.nat))}return n}(t).HM(i.EO,i.PO)}(i,t)&&i.every(XM)},i._ct=function(t){return this.Dot.ZZ.HM(t.EO,t.PO)},i.pct=function(t){var i=this.Act(t);return{Tn:i[0].nct,An:i[i.length-1].rct}},i.fct=function(t){var i=this.bct(t);if(0===i.length){var n=this.dct?this.dct:this.Dot.Ht.rat;return[n[n.length-1]]}var r=i.filter(function(t){var i;return(null==(i=t.kot)?void 0:i.cst)&&!t.Sct});return r.length>0?r:[i[i.length-1]]},i.bct=function(t){var i=this;return(this.dct?this.dct:this.Dot.Ht.rat).filter(function(n){return!i.Dot.ZZ.Kut(t,n)})},xt(t,[{key:"Bot",get:function(){return this.dct},set:function(t){this.dct=t}},{key:"Lot",get:function(){return this.Dot.Ht.Lot}}]),t}();function HM(t,i,n,r){return jt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:return e=i.$rt,(s=e.Tct(t))?i.kct(s)?[4,i.Pct(s,n,r)]:[3,2]:[2,void 0];case 1:return[2,u.sent().Ect(t)];case 2:return[2,s]}})})()}function WM(t,i,n,r){return jt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return AM(t)?0===t.hut?[2,void 0]:(e=i.$rt.xct(t))?[4,i.Pct(e,n,r)]:[2,void 0]:[3,2];case 1:return[2,s.sent().Ict(t.hut-1)];case 2:return[2,i.$rt.Rct(t)];case 3:return[2]}})})()}function zM(t,i,n,r){return jt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:return AM(t)?(e=i.$rt.xct(t))?[4,i.Pct(e,n,r)]:[2,void 0]:[3,2];case 1:return s=u.sent(),t.hut+1===s.V?[2,void 0]:[2,s.Ict(t.hut+1)];case 2:return[2,i.$rt.Cct(t)];case 3:return[2]}})})()}function qM(t){return zM.bind(void 0,t)}function XM(t){return t.cct}V(),It(),Wt(),Yt();var GM=function(){function t(t,i,n,r){this.Lct=void 0,this.Fut=void 0,this.Rz=void 0,this.Bct=void 0,this.Oct=void 0,this.Lct=t,this.Fut=i,this.Rz=n,this.Bct=r,this.Oct=!1}var i=t.prototype;return i.vct=function(t,i,n,r){return jt(function(){var e,s,u;return zt(this,function(o){switch(o.label){case 0:return yr(r),(e=this.Dct(i,n))?[4,t(e,this.Bct,r)]:[2,void 0];case 1:return(s=o.sent())?(u=e.Nct(s),[2,{kot:e,$at:s,Yu:u}]):[2,void 0]}})}).call(this)},i.Dct=function(t,i){if(0!==t.length){var n=this.Lct.Mct(t,this.Oct?i:void 0,this.Fut,this.Rz.WY);return this.Oct||(this.Oct=!0),n}},t}();V(),It(),Wt(),Ut(),Yt();var QM=function(){function t(t,i,n,r){this.Lct=void 0,this.Fut=void 0,this.eut=void 0,this.Bct=void 0,this.Lct=t,this.Fut=i,this.eut=n,this.Bct=r}return t.prototype.vct=function(t,i,n,r){return jt(function(){var e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:if(yr(r),!(e=this.Lct.Fct(i,n,this.Fut)).length)return[2,void 0];u=Ft(e),v.label=1;case 1:if((o=u()).done)return[3,8];h=o.value,v.label=2;case 2:return v.trys.push([2,6,,7]),yr(r),[4,t(h,this.Bct,r)];case 3:return(a=v.sent())?(c=h.Nct(a),[4,this.eut.Uct(c.Yu,c.Sat)]):[3,5];case 4:if(v.sent())return[2,{$at:a,kot:h,Yu:c}];v.label=5;case 5:return[3,7];case 6:return pr(f=v.sent()),s=f,[3,7];case 7:return[3,1];case 8:if(s)throw s;return[2,void 0]}})}).call(this)},t}();function YM(t){return void 0!==t.ux}function $M(t,i){var n=t.Ti&&i.Ti,r=t.Mi&&i.Mi;return n||r?n&&r?t.Ti*t.Mi-i.Ti*i.Mi:n?t.Ti-i.Ti:r?t.Mi-i.Mi:(t.Ti||1)*(t.Mi||1)-(i.Ti||1)*(i.Mi||1):0}function KM(t,i){return $M(t,i)||function(t,i){return t.kW-i.kW}(t,i)}V(),It(),ft(),Ut(),V(),It();var JM=function(){function t(t,i,n,r,e,s){this.Wct=void 0,this.jct=void 0,this.Rm=void 0,this.Xct=void 0,this.Vct=void 0,this.Qct=void 0,this.jct=t,this.Wct=i,this.Rm=n,this.Xct=r,this.Vct=e,this.Qct=s}var i=t.prototype;return i.Mct=function(i,n,r,e){var s=t.sortByQuality(i);if(void 0!==this.Vct&&void 0===n&&i.length>1){var u=t.Hct(s,this.Vct);u&&(s=u)}var o=this.Fct(s,n,r,e);return o.length?o[o.length-1]:s[0]},i.Fct=function(i,n,r,e){for(var s,u,o=t.sortByQuality(i),h={Oat:void 0===e||this.Wct.Nat?this.Wct.Oat:e,ux:YM(r)&&r.ux?r.ux:1,qct:r.Ti,zct:r.Mi,Gct:null==(s=this.Xct)?void 0:s.restrictToPlayerSize},a=o,c=Ft(this.jct);!(u=c()).done;){a=(0,u.value)(a,n,h,this.Rm,this.Qct)}return a},t.Kct=function(i){return t.sortByQuality(i)[0]},t.Yct=function(i,n){var r;return n?t.Kct(null!=(r=t.Hct(i,n))?r:i):t.Kct(i)},t.Hct=function(t,i){for(var n,r=function(){var i=n.value,r=t.filter(function(t){return hP(t.Np,i)});if(r.length>0)return{v:r}},e=Ft(i);!(n=e()).done;){var s=r();if("object"===W(s))return s.v}},t.sortByQuality=function(t){var i=[].concat(t);return i.sort(KM),i},t}();V(),It();var ZM=function(t,i,n,r,e){return t.filter(function(t){return e.TZ(t)&&r.xp(i,t)})};V(),It();var tL=function(t,i,n,r){return void 0===i&&r.Cp?[t[t.length-1]]:t.filter(function(t){return function(t,i,n){var r=n.Oat;if(r<=0)return!1;return.8*r>t.kW*n.ux}(t,0,n)})};V(),It();var iL=function(t,i,n,r,e){var s=n.Gct;if(void 0===s&&!r.Ks)return t;if(!1===s)return t;if(t.length>0&&t[0].Km!==cw.Bk)return t;for(var u=t.length-1;u>=0;u--){var o=t[u];if(o.Mi===n.zct&&o.Ti===n.qct)return t.slice(0,u+1);if(o.Mi=0;a--){var c=t[a];if(c.Mi<=h&&c.Ti<=o)return t.slice(0,a+1)}return[]},hL=function(){function t(){}return t.Ret=function(t,i,n,r,e,s,u,o,h,a){var c=function(t,i){return new rL([new sL(i),new eL(t)])}(s,u),f=new JM([ZM],e,Vi.Zs,o,h,a),v=new QM(f,i,u,c),d=new JM([tL,ZM,iL,oL],e,Vi.Zs,o,h,a),l=new GM(d,i,r,c),g=new nL([v,l]);return new jM(t,n,g)},t}();V(),It(),Wt(),Bt(),Nt(),H(),Ut(),Yt(),V(),It(),Nt();var aL=function(t){function i(i,n,r,e,s,u){var o;return void 0===u&&(u=0),(o=t.call(this,ch.iy)||this).segmentStartTime=void 0,o.error=void 0,o.trackType=void 0,o.track=void 0,o.quality=void 0,o.retryCount=void 0,o.segmentStartTime=i,o.error=n,o.trackType=r,o.track=e,o.quality=s,o.retryCount=u,o}return Pt(i,t),i}(ah);V(),It(),Nt();var cL=function(t){function i(i,n){var r;return(r=t.call(this,ch.Sw)||this).track=void 0,r.segments=void 0,r.track=i,r.segments=n,r}return Pt(i,t),i}(ah),fL=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).tdt=void 0,r.tdt=i,r}return Pt(i,t),i}(gr),vL=[ch.oy,ch.ly],dL=function(t){function i(i,n,r,e,s,u,o,h,a){var c;return(c=t.call(this)||this).fat=void 0,c.Dot=void 0,c.rdt=void 0,c.sdt=void 0,c.Ndt=void 0,c.Adt=void 0,c.Qct=void 0,c._dt=void 0,c.lq=void 0,c.idt=void 0,c.Y2=void 0,c.edt=void 0,c.Sdt=void 0,c.ldt=void 0,c.fdt=void 0,c.gdt=void 0,c.fat=i,c.Dot=n,c.rdt=r,c.sdt=e,c.Ndt=s,c.Adt=u,c.Qct=o,c._dt=h,c.lq=a,c.idt=void 0,c.Y2=void 0,c.edt=void 0,c.Sdt=void 0,c.ldt=0,c.fdt=0,c.gdt=OA.iL(),c.Ndt.wn(vL,c.Rs),c}Pt(i,t);var n=i.prototype;return n.ndt=function(t){return!this.Y2||!t||!Oa(this.Y2.Iht,t.Iht)},n.vat=function(t){if(!this.idt)return!1;var i=this.idt.$at,n=OA.tL(i.EO,i.PO),r=this.rdt.Uut,e=r.VM(t);return e<0?n.Cr(t,LM):n.qM(t,r.An(e),!0,!0,LM)},n.uat=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a,c,f,v,d,l,g;return zt(this,function(w){switch(w.label){case 0:i=this.Dot.Ht.rat,w.label=1;case 1:0,n=void 0,w.label=2;case 2:return w.trys.push([2,12,16,17]),yr(t),this._at(),this.gat()?[3,18]:(n=this.hdt(),[4,this.vct(n,t)]);case 3:return void 0===(e=w.sent())?[3,18]:(this.idt=e,function(t){var i=t.kot,n=i.$rt,r=AM(t.$at)?n.xct(t.$at):t.$at;return n.Udt(r,i.Idt.xdt())}(this.idt)?[3,5]:[4,this.odt(this.idt,t)]);case 4:return w.sent(),[3,1];case 5:return!this.edt||rP(this.edt.kot.frt,this.idt.kot.frt)?[3,7]:[4,this.Qct.EZ(this.idt.kot)];case 6:w.sent(),w.label=7;case 7:return!this.idt.kot.xW||this.Rot&&(null==(r=this.edt)?void 0:r.kot)===this.idt.kot||null==(s=this.lq)||s.LW(this.idt.kot.xW),[4,this.adt(n,this.idt.$at,t)];case 8:return w.sent(),u=this,[4,this.udt(this.idt.kot,t)];case 9:return u.Y2=w.sent(),[4,this.tut(this.idt,t)];case 10:return o=w.sent(),h=this.rdt.IP,a=this.edt,c=this,[4,this.cdt(o,t)];case 11:return c.edt=w.sent(),f=this.rdt.IP,this.ddt(a,this.idt,h,f,n),i.forEach(function(t){return t.Sct=!1}),this.ldt=0,this.fdt=0,[3,17];case 12:return j(v=w.sent(),oM)?(this.F3(v.Tn,v.An,v.kot),[3,1]):[3,13];case 13:if(!j(v,fL))return[3,15];if(d=500,i.every(function(t){return t.Sct})){if(2===this.ldt){if(l=this.rdt.IP,this.vdt(this.idt),this.ddt(this.edt,this.idt,l,l,n),i.forEach(function(t){return t.Sct=!1}),this.fdt+=1,this.ldt=0,this.fdt===this._dt.maxRetries)throw new md(gd.MEDIA_LOAD_ERROR,"The segments could not be loaded.",v);return[3,1]}this.ldt++,g=this._dt.minimumBackoff*A.pow(2,this.ldt-1),d=A.min(g,this._dt.maximumBackoff)}return[4,Rr(d,t)];case 14:return w.sent(),[3,1];case 15:throw this.gdt=OA.iL(),v;case 16:return this.idt=void 0,[7];case 17:return[3,1];case 18:return[2]}})}).call(this)},n.ddt=function(t,i,n,r,e){var s=r.UM(n),u=i.kot,o=u.pdt(i.$at),h=u.mct(i.$at),a=i.$at.EO,c=i.$at.PO;o&&(a=A.min(a,A.max(0,u.wct.Tn-.05))),h&&(c=A.max(c,u.wct.An));var f=OA.tL(a,c).UM(r);if(0!==s.V){if(o||this.gdt.V>0){var v=f.Mn(OA.tL(a,s.Tn(0)));this.wdt(v)}var d=s.BM().Mn(OA.tL(s.Tn(0),s.An(s.V-1)));if(this.wdt(d),h){var l=f.Mn(OA.tL(s.An(s.V-1),c));this.wdt(l)}if(this.gdt.V>0){var g=this.gdt.UM(s);this.wdt(g),this.gdt=OA.iL()}var w,m=u.$rt,y=AM(i.$at)?void 0:m.Rct(i.$at),p=null!=(w=null==t?void 0:t.$at)?w:this.ydt(y)?y:void 0;if(p){var _=this.Dot.hct(p.EO,p.PO);if(_.length>0){var k=OA.tL(_[_.length-1].rct,s.Tn(0));this.wdt(k)}}var b=AM(i.$at)?void 0:m.Cct(i.$at);if(b&&this.ydt(b)){var T=this.Dot.hct(b.EO,b.PO);if(T.length>0){var S=OA.tL(s.An(s.V-1),T[0].nct);this.wdt(S)}}}else this.mdt(n,f,a,e)},n.mdt=function(t,i,n,r){var e=i;0===this.gdt.V&&(this.gdt=OA.tL(t.An(t.V-1),n)),0===e.V&&void 0!==r&&(e=OA.$M(r)),this.gdt=this.gdt.OM(e),this.Dot.uct(this.gdt)},n.ydt=function(t){return!!t&&this.Dot.hct(t.EO,t.PO).length>0},n.wdt=function(t){for(var i=t.UM(this.rdt.IP),n=0;n0)){var t,i=this.rdt.Uut.OM(null!=(t=this.rdt.ZZ.CM().JM(this.rdt.Hut))?t:OA.iL());this.Dot.Zut(i),this.Sdt&&!this.Tdt(this.Sdt)&&(this.Sdt=void 0),this.So(new cL(this.Dot.Ht.Lot,this.Dot.eat()))}},n.gat=function(){return this.edt&&this.edt.kot.mct(this.edt.$at)?(this.Adt.C3(),!0):(this.Sdt&&this.Sdt.kot.mct(this.Sdt.$at)&&this.Tdt(this.Sdt)&&this.Adt.C3(),!!this.rdt.Vut)},n.Tdt=function(t){return this.Dot.$ut.HM(t.kdt,t.Edt)},n.Pdt=function(t,i,n){(!this.Sdt||this.Sdt.$at.PO=2?(t.kot.Sct=!0,this.Mdt(r,n),[2,this.bdt(rM.Hht,"Could not fetch the segment.")]):[4,Rr(A.min(this._dt.minimumBackoff*A.pow(2,n),this._dt.maximumBackoff),i)]:[3,6];case 5:return e.sent(),[3,7];case 6:throw new md(gd.MEDIA_LOAD_ERROR,r.message,r);case 7:return n++,[3,1];case 8:return[2]}})}).call(this)},n.adt=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:for(r=this.Dot.hct(i.EO,i.PO),e=this.rdt.Uut.JM(t),s=OA.iL(),u=Ft(r);!(o=u()).done;)h=o.value,yr(n),a=h.nct,c=h.rct,(f=e&&e.qM(a,c)?A.max(a,e.An(0)):a)<(v=c)&&(s=s.OM(OA.tL(f,v)));d=0,l.label=1;case 1:return d0?n.qualities[0]:void 0,n}return Pt(i,t),i}(ah);V(),It(),Nt();var _L=function(t){function i(i){var n;return(n=t.call(this,Mg.QUALITY_UNAVAILABLE)||this).quality=void 0,n.quality=i,n}return Pt(i,t),i.prototype.xa=function(){return new kL(this.quality.Ca)},i}(Cg),kL=function(t){function i(i){var n;return(n=t.call(this,"qualityunavailable")||this).quality=void 0,n.quality=i,n}return Pt(i,t),i}(Pg);V(),It(),Nt();var bL=function(t){function i(){return t.call(this,Mg.NO_QUALITY)||this}return Pt(i,t),i}(ah);function AL(t){return{kW:t.kW,Np:t.frt,Mi:TL(t)?t.Mi:0,Km:TL(t)?cw.Bk:cw.Dk,Ti:TL(t)?t.Ti:0}}function TL(t){var i=t;return void 0!==i.Mi&&void 0!==i.Ti}V(),It();var SL=0,EL=function(t){function i(i,n,r){var e;return void 0===r&&(r="alternative"),(e=t.call(this)||this).Kdt=void 0,e.Kot=void 0,e.We=!1,e.hu=void 0,e.Zdt=void 0,e.hS="",e.gO=void 0,e.b5=void 0,e.pO=void 0,e.qA=void 0,e.clt=!1,e.dO=new kw,e.elt=[],e.jdt=void 0,e.$dt=void 0,e.rlt=void 0,e.zdt=function(){return e.So(new Tw(e))},e.nlt=[],e.Kot=i,e.hS=String(SL++),e.gO=Iw(),e.b5=r,e.qA=i.rit,e.pO=i.Th,e.rlt=i.Km,e.elt=i.rat.slice(),e.qdt(n),e}Pt(i,t);var n=i.prototype;return n.qdt=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;r.wn("update",this.zdt),this.dO.lO(r)}},n.Gdt=function(t){if(this.dO.fO(t)){t.QU();var i=this.Xdt();if(this.jdt&&Jn(this.jdt,t)){var n=this.jdt.filter(function(t){return t.cst});0===n.length&&i.length>0?this.YI=i:this.YI=n}else this.YI=i;this.So(new _L(t))}},n.Qdt=function(t){if(this.dO.fO(t)){var i=this.Xdt();t.jU(),this.jdt&&!function(t,i){return Zn(t,i,function(t,i){return t===i})}(this.jdt,i)||(this.YI=this.Xdt())}},n.Xdt=function(){return this.dO.II.filter(function(t){return t.cst})},n.Ydt=function(t){this.Kdt=t.kot,this.So(t)},n.tlt=function(t){if(t&&0!==t.length){for(var i,n=[],r=Ft(this.rat);!(i=r()).done;)for(var e,s=i.value,u=Ft(t);!(e=u()).done;){var o=e.value;o===s.kot&&o.cst&&n.push(s)}return n}},n.slt=function(t){var i;this.nlt.push(t),(i=this.elt).push.apply(i,[].concat(t.rat));var n=t.rat.map(function(t){return t.kot});this.qdt(n)},n.wO=function(t){this.We=t,this.Zdt&&(t?this.Zdt.jU(this):this.Zdt.QU(this))},n.ult=function(t){this.We=t,this.clt!==t&&(this.clt=t,this.So(new bw(this)))},n.kn=function(){for(var t,i=Ft(this.dO.II);!(t=i()).done;){t.value.mn("update",this.zdt)}this.dO.hr()},xt(i,[{key:"QI",get:function(){return this.Kot.Wdt.map(IL).filter(Fi)}},{key:"XI",get:function(){return this.Kdt}},{key:"Nut",get:function(){return this.Kot}},{key:"Rt",get:function(){return this.We},set:function(t){this.wO(t)}},{key:"Ca",get:function(){return this.hu||(this.hu=uw(this)),this.hu}},{key:"Jdt",get:function(){return this.Zdt},set:function(t){this.Zdt=t}},{key:"o",get:function(){return this.hS}},{key:"jI",get:function(){return this.gO}},{key:"Lt",get:function(){return this.b5}},{key:"bs",get:function(){return this.qA}},{key:"Th",get:function(){return this.pO},set:function(t){t!==this.pO&&(this.pO=t,this.So(new Tw(this)))}},{key:"Xk",get:function(){return this.Rt?"enabled":"disabled"}},{key:"YI",get:function(){return this.jdt},set:function(t){var i;if(t){var n=this.XI?AL(this.XI):void 0;i=t.filter(function(t){return t.cst&&Vi.Zs.xp(n,AL(t))})}else i=this.Xdt();0!==i.length?(this.jdt=t&&this.dO.fO(t)?t:void 0,this.$dt=this.tlt(this.jdt),this.So(new yL(t,this))):this.So(new bL)}},{key:"ilt",get:function(){return this.$dt}},{key:"KI",get:function(){return this.dO}},{key:"rat",get:function(){return this.elt}},{key:"Lot",get:function(){return this.rlt}},{key:"hlt",get:function(){return this.nlt}},{key:"olt",get:function(){return this.rat.every(function(t){return t.olt})}}]),i}(uh);function IL(t){if("urn:mpeg:dash:role:2011"===t.y8)return RL(t);if("urn:tva:metadata:cs:AudioPurposeCS:2007"===t.y8){if("1"===t.zE)return rw.HI;if("2"===t.zE)return rw.qI}}function RL(t){if(void 0!==(null==t?void 0:t.zE))switch(t.zE){case"caption":return rw.VI;case"sign":return rw.WI;case"description":return rw.HI;case"enhanced-audio-intelligibility":return rw.qI;default:return}}var CL=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,u)||this).Ez=1,o.flt=void 0,o.llt=eo(),o.wlt=eo(),o.dlt=void 0,o._lt=void 0,o.Rlt=eo(),o.nV=void 0,o.eut=void 0,o.M8=void 0,o.Rz=void 0,o.Slt=void 0,o.Tlt=function(t){0},o.M8=i,o.nV=n,o.Rz=r,o.Slt=e,o.eut=s,o}Pt(i,t);var n=i.prototype;return n.C3=function(){},n.Wut=function(){return this.Uut.Cr(this.An)},n.Odt=function(t,i,n,r){return jt(function(){var e,s,u,o,h,a,c,f,v,d,l;return zt(this,function(g){switch(g.label){case 0:return t.Km!==JR.vZ?[3,1]:(s=t.ck.Iht,[3,3]);case 1:return[4,t.ck.HT(r)];case 2:s=g.sent(),g.label=3;case 3:for(e=s,u=this.findTrackForRepresentation(n),o=this.llt.get(u.jI),h=i.EO,a=i.PO,c=new OA([h,a]),o||(o=OA.iL(),this.llt.set(u.jI,OA.iL()),this.wlt.set(u.jI,OA.iL())),this.Irt(r),f=this.Zrt(new I(e),i,n,u),v=Ft(f);!(d=v()).done;)l=d.value,u.tV(l);return this.llt.set(u.jI,o.OM(c)),[2,{kdt:h,Edt:a}]}})}).call(this)},n.Irt=function(t){for(var i,n=Ft(cR(this.M8.MP,void 0,void 0,this.IP,this.Rz.GY,this.Rz.UY));!(i=n()).done;){var r=i.value,e=r[0],s=r[1];Er(this.Ldt(e,s,t))}},n.Jrt=function(t,i,n){return this.Slt.Jrt(t,i,n)},n.Zrt=function(t,i,n,r){return this.Slt.Zrt(t,i,n,r)},n.Ldt=function(t,i,n){for(var r,e=t,s=i,u=new OA([t,i]),o=Ft(this.Z.II);!(r=o()).done;){for(var h,a=r.value,c=[],f=Ft(a.L.II);!(h=f()).done;){var v=h.value;v.EO>=e&&v.PO<=s?c.push(v):u=u.UM(new OA([v.EO,v.PO]))}for(var d,l=Ft(c);!(d=l()).done;){var g=d.value;a.WU(g)}var w=this.llt.get(a.jI);w&&this.llt.set(a.jI,w.UM(u))}return ot.resolve()},n.t$=function(t,i){},n.i$=function(t,i){},n.YY=function(){return!1},n.jU=function(t){if(t&&this.dlt!==t){this.dlt=t;for(var i,n=Ft(this.Z.II);!(i=n()).done;){var r=i.value;r!==t&&(r.Xk=$y.Nh)}if(this.Slt.hr(),this.flt&&(this.flt.kn(),this.flt=void 0),this.dlt){var e=this.ylt(this.dlt);this.flt=new gL(this,this.M8,this.M8,this.nV,this.Rz,!1,this.eut,void 0,void 0,new mL,CT,void 0).Hdt(this.dlt,e),this.flt.wn(Jy.ma,this.Tlt),this.flt.Tn(rM.Nht)}}},n.QU=function(t){this.dlt===t&&(t&&this.dlt===t&&(this.dlt=void 0),this.flt&&(this.flt.kn(),this.flt=void 0))},n.Un=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.hr()];case 1:return i.sent(),this._lt=t,this.klt(t),[2]}})}).call(this)},n.Elt=function(t){var i=function(t){var i=t.rat&&t.rat.length>0&&t.rat[0],n=i&&cp(i.frt),r=cp(t.frt),e=t.oQ===Hv;return n||r||e?Uw.TTML:t.oQ===zv||lp(t.oQ,t.frt)?Uw.WEBVTT:Uw.DEFAULT}(t);if(!i)throw new p("Unknown TextTrack type for Representation");var n=t.Plt.concat(t.Wdt);return this.xlt(function(t){return Jn(t.filter(function(t){return"urn:mpeg:dash:role:2011"===t.y8}).map(function(t){return t.zE}).filter(Fi),"caption")?ep.FU:ep.OU}(n),t.Th,t.rit,!1,i,t,function(t){return t.filter(function(t){return"urn:mpeg:dash:role:2011"===t.y8}).some(function(t){return function(t){return"forced-subtitle"===t||"forced_subtitle"===t}(t.zE)})}(t.Plt),t.Wdt.map(RL).filter(Fi))},n.klt=function(t){for(var i,n=Ft(t.Ilt);!(i=n()).done;){var r=i.value,e=this.Elt(r);this.Rlt.set(e.jI,r),e.Ax=Fw.LOADED,this.tt(e)}},n.it=function(i){this.Rlt.delete(i.jI),t.prototype.it.call(this,i)},n.xlt=function(t,i,n,r,e,s,u,o){var h,a,c,f=Wn(s.rat,function(t){return""!==t.o}),v=null!=(c=null!=(a=null==f?void 0:f.o)?a:null==(h=s.o)?void 0:h.toString())?c:"";return this.JU.tI(t,v,i,n,r,e,u,o)},n.ZU=function(t,i,n){var r=bp(t,i,n),e=this.Rlt.get(t.jI);void 0!==e&&(this.Rlt.set(r.jI,e),this.Rlt.delete(t.jI));var s=this.llt.get(t.jI);void 0!==s&&(this.llt.set(r.jI,s),this.llt.delete(t.jI));var u=this.wlt.get(t.jI);return void 0!==u&&(this.wlt.set(r.jI,u),this.wlt.delete(t.jI)),r},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return n.sent(),this.flt?[4,this.flt.hr(rM.eot)]:[3,3];case 2:n.sent(),this.flt.mn(Jy.ma,this.Tlt),this.flt=void 0,n.label=3;case 3:return this._lt=void 0,this.llt.clear(),this.wlt.clear(),[2]}})}).call(this)},n.findTrackForRepresentation=function(t){for(var n,r=Ft(this.Z.II);!(n=r()).done;){var e=n.value,s=this.ylt(e);if(s&&i.Clt(s)===t)return e}},n.ylt=function(t){return this.Rlt.get(t.jI)},n.glt=function(){if(this.dlt){var t=this.ylt(this.dlt);if(t)return i.Clt(t)}},n.kn=function(){for(var i,n=Ft(this.Z.II);!(i=n()).done;){var r=i.value;this.JU.iV(r)}return t.prototype.kn.call(this)},i.Clt=function(t){return t.rat&&t.rat.length>0?t.rat[0]:void 0},xt(i,[{key:"Rt",get:function(){for(var t,i=Ft(this.Z.II);!(t=i()).done;){if(t.value.Xk!==$y.Nh)return!0}return!1}},{key:"QW",get:function(){var t=this.M8.MP;return this.Uut.JM(t,.01)}},{key:"qut",get:function(){return OA.eL()}},{key:"IP",get:function(){var t;return null!=(t=this.dlt&&this.llt.get(this.dlt.jI))?t:OA.iL()}},{key:"ZZ",get:function(){return this.flt?this.flt.Cot.ZZ.zut:OA.iL()}},{key:"Uut",get:function(){return eM(this.IP,this.ZZ).LM(2*this.vlt)}},{key:"Tn",get:function(){return this._lt?this._lt.wct.Tn:NaN}},{key:"An",get:function(){return this._lt?this._lt.wct.An:NaN}},{key:"UP",get:function(){var t=this.An;return!!t&&this.M8.MP>=t}},{key:"vlt",get:function(){var t,i,n=this.glt();return n?1/(null!=(i=this.dlt&&(null==n||null==(t=n.plt)?void 0:t.iF()))?i:25):.04}},{key:"Mi",get:function(){return 0}},{key:"B3",get:function(){return cw.NT}},{key:"ux",get:function(){return this.Ez},set:function(t){this.Ez=t}},{key:"_x",get:function(){var t;return null!=(t=this.dlt&&this.wlt.get(this.dlt.jI))?t:OA.iL()}},{key:"Sx",get:function(){if(!this.dlt)return OA.$M(0);var t=this.ylt(this.dlt),i=null==t?void 0:t.Alt,n=null==t?void 0:t.blt;if(void 0===n||void 0===i)return OA.$M(0);var r=A.max(i,this.M8.MP);return new OA([n,r]).CM()}},{key:"Ti",get:function(){return 0}}]),i}(kp),PL=function(){function t(t,i,n,r,e,s){this.Nlt=[],this.Gl=new Mb([]),this.JU=void 0,this.tht=void 0,this.M8=void 0,this.nV=void 0,this.Rz=void 0,this.eut=void 0,this.M8=t,this.nV=i,this.Rz=n,this.eut=r,this.JU=e,this.tht=s}var i=t.prototype;return i.sV=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return t.Km!==cw.NT?[2]:(i=function(t,i,n){return cp(i)||t===Hv||t===zv?new $O(n):lp(t,i)?new tM:void 0}(t.oQ,t.frt,this.tht),i?(n=this.Dlt(i),this.Blt(n),[4,n.Un(t)]):[3,2]);case 1:return r.sent(),[2,n];case 2:return[2]}})}).call(this)},i.Dlt=function(t){return new CL(this.M8,this.nV,this.Rz,t,this.eut,this.JU)},i.Blt=function(t){this.Nlt.push(t),this.Gl.FW(t.Z)},i.hr=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:t=Ft(this.Nlt.slice()),n.label=1;case 1:return(i=t()).done?[3,4]:[4,i.value.hr()];case 2:n.sent(),n.label=3;case 3:return[3,1];case 4:return tr(this.Nlt),this.Gl.hr(),[2]}})}).call(this)},i.kn=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:t=Ft(this.Nlt),n.label=1;case 1:return(i=t()).done?[3,4]:[4,i.value.kn()];case 2:n.sent(),n.label=3;case 3:return[3,1];case 4:return tr(this.Nlt),this.Gl.kn(),[2]}})}).call(this)},xt(t,[{key:"nt",get:function(){return this.Gl}}]),t}();V(),It(),Nt();var NL=function(t){function i(i){var n;return(n=t.call(this,ch.zw)||this).error=void 0,n.error=i,n}return Pt(i,t),i}(ah);V(),It();var DL=function(t){return t.mV="static",t.wV="dynamic",t}({});V(),It(),Nt(),V(),It();var xL=function(t){return t.Mlt="Llt",t}({}),BL=function(t){function i(){return t.call(this,xL.Mlt)||this}return Pt(i,t),i}(ah);V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Nt();var OL=function(t){function i(i,n){var r;return(r=t.call(this,ch.Yw)||this).representation=void 0,r.previousRepresentation=void 0,r.representation=i,r.previousRepresentation=n,r}return Pt(i,t),i}(ah);V(),It(),Nt(),Ut(),V(),It(),Ut(),V(),It();var ML=function(t){return t[t.Olt=0]="Olt",t[t.Flt=1]="Flt",t[t.Ult=2]="Ult",t[t.Vlt=3]="Vlt",t[t.Hlt=4]="Hlt",t[t.Wlt=5]="Wlt",t}({}),LL=function(t){return t[t.qlt=0]="qlt",t[t.zlt=1]="zlt",t[t.Glt=2]="Glt",t[t.Xlt=3]="Xlt",t}({});function FL(t,i,n){return n===ML.Olt?n:i!==LL.qlt&&i!==LL.zlt||n!==ML.Flt&&n!==ML.Ult?t?i===LL.Glt?ML.Hlt:i===LL.Xlt?ML.Vlt:ML.Olt:ML.Wlt:ML.Ult}function UL(t,i,n,r){var e={byte:n},s=ML.Flt,u=[],o=31&OC(i,e,r);e.byte+=1;for(var h=0;h0;)e-=1,r+=VL(t,i);return r}(i,n,4);if("GA94"!==u)return}if(3===OC(i,n,r)){47===s&&(n.byte+=1);var o=t;return o.$lt=n.byte,o}}}}function HL(t){return 4===t.J0}function WL(t){for(var i,n=[],r=Ft(t.filter(HL).map(jL).filter(Fi));!(i=r()).done;){var e,s=i.value;(e=n).push.apply(e,[].concat(UL(s.Y0,s.i1,s.$lt,s.t1)))}return n}V(),It(),Ut();var zL="und";function qL(t){if(t!==zL)for(var i,n=t.toLowerCase(),r=Ft(XL);!(i=r()).done;){var e=i.value;if(e[1]===n||e[2]===n||e["2T"]===n||e["2B"]===n||e[3]===n)return e}}var XL=[{l:"Abkhaz",bh:"\u0410\u04a7\u0441\u0443\u0430",1:"ab",2:"abk","2T":"abk","2B":"abk",3:"abk"},{l:"Afar",bh:"Afaraf",1:"aa",2:"aar","2T":"aar","2B":"aar",3:"aar"},{l:"Afrikaans",bh:"Afrikaans",1:"af",2:"afr","2T":"afr","2B":"afr",3:"afr"},{l:"Akan",bh:"Akan",1:"ak",2:"aka","2T":"aka","2B":"aka",3:"aka"},{l:"Albanian",bh:"Shqip",1:"sq",2:"sqi","2T":"sqi","2B":"alb",3:"sqi"},{l:"Amharic",bh:"\u12a0\u121b\u122d\u129b",1:"am",2:"amh","2T":"amh","2B":"amh",3:"amh"},{l:"Arabic",bh:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",1:"ar",2:"ara","2T":"ara","2B":"ara",3:"ara"},{l:"Aragonese",bh:"Aragon\xe9s",1:"an",2:"arg","2T":"arg","2B":"arg",3:"arg"},{l:"Armenian",bh:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",1:"hy",2:"hye","2T":"hye","2B":"arm",3:"hye"},{l:"Assamese",bh:"\u0985\u09b8\u09ae\u09c0\u09af\u09bc\u09be",1:"as",2:"asm","2T":"asm","2B":"asm",3:"asm"},{l:"Avaric",bh:"\u0410\u0432\u0430\u0440",1:"av",2:"ava","2T":"ava","2B":"ava",3:"ava"},{l:"Avestan",bh:"avesta",1:"ae",2:"ave","2T":"ave","2B":"ave",3:"ave"},{l:"Aymara",bh:"Aymar",1:"ay",2:"aym","2T":"aym","2B":"aym",3:"aym"},{l:"Azerbaijani",bh:"Az\u0259rbaycanca",1:"az",2:"aze","2T":"aze","2B":"aze",3:"aze"},{l:"Bambara",bh:"Bamanankan",1:"bm",2:"bam","2T":"bam","2B":"bam",3:"bam"},{l:"Bashkir",bh:"\u0411\u0430\u0448\u04a1\u043e\u0440\u0442\u0441\u0430",1:"ba",2:"bak","2T":"bak","2B":"bak",3:"bak"},{l:"Basque",bh:"Euskara",1:"eu",2:"eus","2T":"eus","2B":"baq",3:"eus"},{l:"Belarusian",bh:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",1:"be",2:"bel","2T":"bel","2B":"bel",3:"bel"},{l:"Bengali",bh:"\u09ac\u09be\u0982\u09b2\u09be",1:"bn",2:"ben","2T":"ben","2B":"ben",3:"ben"},{l:"Bihari",bh:"\u092d\u094b\u091c\u092a\u0941\u0930\u0940",1:"bh",2:"bih","2T":"bih","2B":"bih",3:"bih"},{l:"Bislama",bh:"Bislama",1:"bi",2:"bis","2T":"bis","2B":"bis",3:"bis"},{l:"Bosnian",bh:"Bosanski",1:"bs",2:"bos","2T":"bos","2B":"bos",3:"bos"},{l:"Breton",bh:"Brezhoneg",1:"br",2:"bre","2T":"bre","2B":"bre",3:"bre"},{l:"Bulgarian",bh:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",1:"bg",2:"bul","2T":"bul","2B":"bul",3:"bul"},{l:"Burmese",bh:"\u1019\u103c\u1014\u103a\u1019\u102c\u1018\u102c\u101e\u102c",1:"my",2:"mya","2T":"mya","2B":"bur",3:"mya"},{l:"Catalan",bh:"Catal\xe0",1:"ca",2:"cat","2T":"cat","2B":"cat",3:"cat"},{l:"Chamorro",bh:"Chamoru",1:"ch",2:"cha","2T":"cha","2B":"cha",3:"cha"},{l:"Chechen",bh:"\u041d\u043e\u0445\u0447\u0438\u0439\u043d",1:"ce",2:"che","2T":"che","2B":"che",3:"che"},{l:"Chichewa",bh:"Chichewa",1:"ny",2:"nya","2T":"nya","2B":"nya",3:"nya"},{l:"Chinese",bh:"\u4e2d\u6587",1:"zh",2:"zho","2T":"zho","2B":"chi",3:"zho"},{l:"Chuvash",bh:"\u0427\u04d1\u0432\u0430\u0448\u043b\u0430",1:"cv",2:"chv","2T":"chv","2B":"chv",3:"chv"},{l:"Cornish",bh:"Kernewek",1:"kw",2:"cor","2T":"cor","2B":"cor",3:"cor"},{l:"Corsican",bh:"Corsu",1:"co",2:"cos","2T":"cos","2B":"cos",3:"cos"},{l:"Cree",bh:"\u14c0\u1426\u1403\u152d\u140d\u140f\u1423",1:"cr",2:"cre","2T":"cre","2B":"cre",3:"cre"},{l:"Croatian",bh:"Hrvatski",1:"hr",2:"hrv","2T":"hrv","2B":"hrv",3:"hrv"},{l:"Czech",bh:"\u010ce\u0161tina",1:"cs",2:"ces","2T":"ces","2B":"cze",3:"ces"},{l:"Danish",bh:"Dansk",1:"da",2:"dan","2T":"dan","2B":"dan",3:"dan"},{l:"Divehi",bh:"Divehi",1:"dv",2:"div","2T":"div","2B":"div",3:"div"},{l:"Dutch",bh:"Nederlands",1:"nl",2:"nld","2T":"nld","2B":"dut",3:"nld"},{l:"Dzongkha",bh:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41",1:"dz",2:"dzo","2T":"dzo","2B":"dzo",3:"dzo"},{l:"English",bh:"English",1:"en",2:"eng","2T":"eng","2B":"eng",3:"eng"},{l:"Esperanto",bh:"Esperanto",1:"eo",2:"epo","2T":"epo","2B":"epo",3:"epo"},{l:"Estonian",bh:"Eesti",1:"et",2:"est","2T":"est","2B":"est",3:"est"},{l:"Ewe",bh:"E\u028begbe",1:"ee",2:"ewe","2T":"ewe","2B":"ewe",3:"ewe"},{l:"Faroese",bh:"F\xf8royskt",1:"fo",2:"fao","2T":"fao","2B":"fao",3:"fao"},{l:"Fijian",bh:"Na Vosa Vaka-Viti",1:"fj",2:"fij","2T":"fij","2B":"fij",3:"fij"},{l:"Finnish",bh:"Suomi",1:"fi",2:"fin","2T":"fin","2B":"fin",3:"fin"},{l:"French",bh:"Fran\xe7ais",1:"fr",2:"fra","2T":"fra","2B":"fre",3:"fra"},{l:"Fula",bh:"Fulfulde",1:"ff",2:"ful","2T":"ful","2B":"ful",3:"ful"},{l:"Galician",bh:"Galego",1:"gl",2:"glg","2T":"glg","2B":"glg",3:"glg"},{l:"Georgian",bh:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",1:"ka",2:"kat","2T":"kat","2B":"geo",3:"kat"},{l:"German",bh:"Deutsch",1:"de",2:"deu","2T":"deu","2B":"ger",3:"deu"},{l:"Greek",bh:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",1:"el",2:"ell","2T":"ell","2B":"gre",3:"ell"},{l:"Guaran\xed",bh:"Ava\xf1e'\u1ebd",1:"gn",2:"grn","2T":"grn","2B":"grn",3:"grn"},{l:"Gujarati",bh:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",1:"gu",2:"guj","2T":"guj","2B":"guj",3:"guj"},{l:"Haitian",bh:"Krey\xf2l Ayisyen",1:"ht",2:"hat","2T":"hat","2B":"hat",3:"hat"},{l:"Hausa",bh:"\u0647\u064e\u0648\u064f\u0633\u064e",1:"ha",2:"hau","2T":"hau","2B":"hau",3:"hau"},{l:"Hebrew",bh:"\u05e2\u05d1\u05e8\u05d9\u05ea",1:"he",2:"heb","2T":"heb","2B":"heb",3:"heb"},{l:"Herero",bh:"Otjiherero",1:"hz",2:"her","2T":"her","2B":"her",3:"her"},{l:"Hindi",bh:"\u0939\u093f\u0928\u094d\u0926\u0940",1:"hi",2:"hin","2T":"hin","2B":"hin",3:"hin"},{l:"Hiri Motu",bh:"Hiri Motu",1:"ho",2:"hmo","2T":"hmo","2B":"hmo",3:"hmo"},{l:"Hungarian",bh:"Magyar",1:"hu",2:"hun","2T":"hun","2B":"hun",3:"hun"},{l:"Interlingua",bh:"Interlingua",1:"ia",2:"ina","2T":"ina","2B":"ina",3:"ina"},{l:"Indonesian",bh:"Bahasa Indonesia",1:"id",2:"ind","2T":"ind","2B":"ind",3:"ind"},{l:"Interlingue",bh:"Interlingue",1:"ie",2:"ile","2T":"ile","2B":"ile",3:"ile"},{l:"Irish",bh:"Gaeilge",1:"ga",2:"gle","2T":"gle","2B":"gle",3:"gle"},{l:"Igbo",bh:"Igbo",1:"ig",2:"ibo","2T":"ibo","2B":"ibo",3:"ibo"},{l:"Inupiaq",bh:"I\xf1upiak",1:"ik",2:"ipk","2T":"ipk","2B":"ipk",3:"ipk"},{l:"Ido",bh:"Ido",1:"io",2:"ido","2T":"ido","2B":"ido",3:"ido"},{l:"Icelandic",bh:"\xcdslenska",1:"is",2:"isl","2T":"isl","2B":"ice",3:"isl"},{l:"Italian",bh:"Italiano",1:"it",2:"ita","2T":"ita","2B":"ita",3:"ita"},{l:"Inuktitut",bh:"\u1403\u14c4\u1483\u144e\u1450\u1466",1:"iu",2:"iku","2T":"iku","2B":"iku",3:"iku"},{l:"Japanese",bh:"\u65e5\u672c\u8a9e",1:"ja",2:"jpn","2T":"jpn","2B":"jpn",3:"jpn"},{l:"Javanese",bh:"Basa Jawa",1:"jv",2:"jav","2T":"jav","2B":"jav",3:"jav"},{l:"Kalaallisut",bh:"Kalaallisut",1:"kl",2:"kal","2T":"kal","2B":"kal",3:"kal"},{l:"Kannada",bh:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",1:"kn",2:"kan","2T":"kan","2B":"kan",3:"kan"},{l:"Kanuri",bh:"Kanuri",1:"kr",2:"kau","2T":"kau","2B":"kau",3:"kau"},{l:"Kashmiri",bh:"\u0643\u0634\u0645\u064a\u0631\u064a",1:"ks",2:"kas","2T":"kas","2B":"kas",3:"kas"},{l:"Kazakh",bh:"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",1:"kk",2:"kaz","2T":"kaz","2B":"kaz",3:"kaz"},{l:"Khmer",bh:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",1:"km",2:"khm","2T":"khm","2B":"khm",3:"khm"},{l:"Kikuyu",bh:"G\u0129k\u0169y\u0169",1:"ki",2:"kik","2T":"kik","2B":"kik",3:"kik"},{l:"Kinyarwanda",bh:"Kinyarwanda",1:"rw",2:"kin","2T":"kin","2B":"kin",3:"kin"},{l:"Kyrgyz",bh:"\u041a\u044b\u0440\u0433\u044b\u0437\u0447\u0430",1:"ky",2:"kir","2T":"kir","2B":"kir",3:"kir"},{l:"Komi",bh:"\u041a\u043e\u043c\u0438",1:"kv",2:"kom","2T":"kom","2B":"kom",3:"kom"},{l:"Kongo",bh:"Kongo",1:"kg",2:"kon","2T":"kon","2B":"kon",3:"kon"},{l:"Korean",bh:"\ud55c\uad6d\uc5b4",1:"ko",2:"kor","2T":"kor","2B":"kor",3:"kor"},{l:"Kurdish",bh:"Kurd\xee",1:"ku",2:"kur","2T":"kur","2B":"kur",3:"kur"},{l:"Kwanyama",bh:"Kuanyama",1:"kj",2:"kua","2T":"kua","2B":"kua",3:"kua"},{l:"Latin",bh:"Latina",1:"la",2:"lat","2T":"lat","2B":"lat",3:"lat"},{l:"Luxembourgish",bh:"L\xebtzebuergesch",1:"lb",2:"ltz","2T":"ltz","2B":"ltz",3:"ltz"},{l:"Ganda",bh:"Luganda",1:"lg",2:"lug","2T":"lug","2B":"lug",3:"lug"},{l:"Limburgish",bh:"Limburgs",1:"li",2:"lim","2T":"lim","2B":"lim",3:"lim"},{l:"Lingala",bh:"Ling\xe1la",1:"ln",2:"lin","2T":"lin","2B":"lin",3:"lin"},{l:"Lao",bh:"\u0e9e\u0eb2\u0eaa\u0eb2\u0ea5\u0eb2\u0ea7",1:"lo",2:"lao","2T":"lao","2B":"lao",3:"lao"},{l:"Lithuanian",bh:"Lietuvi\u0173",1:"lt",2:"lit","2T":"lit","2B":"lit",3:"lit"},{l:"Luba-Katanga",bh:"Tshiluba",1:"lu",2:"lub","2T":"lub","2B":"lub",3:"lub"},{l:"Latvian",bh:"Latvie\u0161u",1:"lv",2:"lav","2T":"lav","2B":"lav",3:"lav"},{l:"Manx",bh:"Gaelg",1:"gv",2:"glv","2T":"glv","2B":"glv",3:"glv"},{l:"Macedonian",bh:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438",1:"mk",2:"mkd","2T":"mkd","2B":"mac",3:"mkd"},{l:"Malagasy",bh:"Malagasy",1:"mg",2:"mlg","2T":"mlg","2B":"mlg",3:"mlg"},{l:"Malay",bh:"Bahasa Melayu",1:"ms",2:"msa","2T":"msa","2B":"may",3:"msa"},{l:"Malayalam",bh:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",1:"ml",2:"mal","2T":"mal","2B":"mal",3:"mal"},{l:"Maltese",bh:"Malti",1:"mt",2:"mlt","2T":"mlt","2B":"mlt",3:"mlt"},{l:"M\u0101ori",bh:"M\u0101ori",1:"mi",2:"mri","2T":"mri","2B":"mao",3:"mri"},{l:"Marathi",bh:"\u092e\u0930\u093e\u0920\u0940",1:"mr",2:"mar","2T":"mar","2B":"mar",3:"mar"},{l:"Marshallese",bh:"Kajin M\u0327aje\u013c",1:"mh",2:"mah","2T":"mah","2B":"mah",3:"mah"},{l:"Mongolian",bh:"\u041c\u043e\u043d\u0433\u043e\u043b",1:"mn",2:"mon","2T":"mon","2B":"mon",3:"mon"},{l:"Nauru",bh:"Dorerin Naoero",1:"na",2:"nau","2T":"nau","2B":"nau",3:"nau"},{l:"Navajo",bh:"Din\xe9 Bizaad",1:"nv",2:"nav","2T":"nav","2B":"nav",3:"nav"},{l:"Northern Ndebele",bh:"isiNdebele",1:"nd",2:"nde","2T":"nde","2B":"nde",3:"nde"},{l:"Nepali",bh:"\u0928\u0947\u092a\u093e\u0932\u0940",1:"ne",2:"nep","2T":"nep","2B":"nep",3:"nep"},{l:"Ndonga",bh:"Owambo",1:"ng",2:"ndo","2T":"ndo","2B":"ndo",3:"ndo"},{l:"Norwegian Bokm\xe5l",bh:"Norsk (Bokm\xe5l)",1:"nb",2:"nob","2T":"nob","2B":"nob",3:"nob"},{l:"Norwegian Nynorsk",bh:"Norsk (Nynorsk)",1:"nn",2:"nno","2T":"nno","2B":"nno",3:"nno"},{l:"Norwegian",bh:"Norsk",1:"no",2:"nor","2T":"nor","2B":"nor",3:"nor"},{l:"Nuosu",bh:"\ua188\ua320\ua4bf Nuosuhxop",1:"ii",2:"iii","2T":"iii","2B":"iii",3:"iii"},{l:"Southern Ndebele",bh:"isiNdebele",1:"nr",2:"nbl","2T":"nbl","2B":"nbl",3:"nbl"},{l:"Occitan",bh:"Occitan",1:"oc",2:"oci","2T":"oci","2B":"oci",3:"oci"},{l:"Ojibwe",bh:"\u140a\u14c2\u1511\u14c8\u142f\u14a7\u140e\u14d0",1:"oj",2:"oji","2T":"oji","2B":"oji",3:"oji"},{l:"Old Church Slavonic",bh:"\u0421\u043b\u043e\u0432\u0463\u0301\u043d\u044c\u0441\u043a\u044a",1:"cu",2:"chu","2T":"chu","2B":"chu",3:"chu"},{l:"Oromo",bh:"Afaan Oromoo",1:"om",2:"orm","2T":"orm","2B":"orm",3:"orm"},{l:"Oriya",bh:"\u0b13\u0b21\u0b3f\u0b3c\u0b06",1:"or",2:"ori","2T":"ori","2B":"ori",3:"ori"},{l:"Ossetian",bh:"\u0418\u0440\u043e\u043d \xe6\u0432\u0437\u0430\u0433",1:"os",2:"oss","2T":"oss","2B":"oss",3:"oss"},{l:"Panjabi",bh:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",1:"pa",2:"pan","2T":"pan","2B":"pan",3:"pan"},{l:"P\u0101li",bh:"\u092a\u093e\u0934\u093f",1:"pi",2:"pli","2T":"pli","2B":"pli",3:"pli"},{l:"Persian",bh:"\u0641\u0627\u0631\u0633\u06cc",1:"fa",2:"fas","2T":"fas","2B":"per",3:"fas"},{l:"Polish",bh:"Polski",1:"pl",2:"pol","2T":"pol","2B":"pol",3:"pol"},{l:"Pashto",bh:"\u067e\u069a\u062a\u0648",1:"ps",2:"pus","2T":"pus","2B":"pus",3:"pus"},{l:"Portuguese",bh:"Portugu\xeas",1:"pt",2:"por","2T":"por","2B":"por",3:"por"},{l:"Quechua",bh:"Runa Simi",1:"qu",2:"que","2T":"que","2B":"que",3:"que"},{l:"Romansh",bh:"Rumantsch",1:"rm",2:"roh","2T":"roh","2B":"roh",3:"roh"},{l:"Kirundi",bh:"Kirundi",1:"rn",2:"run","2T":"run","2B":"run",3:"run"},{l:"Romanian",bh:"Rom\xe2n\u0103",1:"ro",2:"ron","2T":"ron","2B":"rum",3:"ron"},{l:"Russian",bh:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",1:"ru",2:"rus","2T":"rus","2B":"rus",3:"rus"},{l:"Sanskrit",bh:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d",1:"sa",2:"san","2T":"san","2B":"san",3:"san"},{l:"Sardinian",bh:"Sardu",1:"sc",2:"srd","2T":"srd","2B":"srd",3:"srd"},{l:"Sindhi",bh:"\u0633\u0646\u068c\u064a\u200e",1:"sd",2:"snd","2T":"snd","2B":"snd",3:"snd"},{l:"Northern Sami",bh:"S\xe1megiella",1:"se",2:"sme","2T":"sme","2B":"sme",3:"sme"},{l:"Samoan",bh:"Gagana S\u0101moa",1:"sm",2:"smo","2T":"smo","2B":"smo",3:"smo"},{l:"Sango",bh:"S\xe4ng\xf6",1:"sg",2:"sag","2T":"sag","2B":"sag",3:"sag"},{l:"Serbian",bh:"\u0421\u0440\u043f\u0441\u043a\u0438",1:"sr",2:"srp","2T":"srp","2B":"srp",3:"srp"},{l:"Gaelic",bh:"G\xe0idhlig",1:"gd",2:"gla","2T":"gla","2B":"gla",3:"gla"},{l:"Shona",bh:"ChiShona",1:"sn",2:"sna","2T":"sna","2B":"sna",3:"sna"},{l:"Sinhala",bh:"\u0dc3\u0dd2\u0d82\u0dc4\u0dbd",1:"si",2:"sin","2T":"sin","2B":"sin",3:"sin"},{l:"Slovak",bh:"Sloven\u010dina",1:"sk",2:"slk","2T":"slk","2B":"slo",3:"slk"},{l:"Slovene",bh:"Sloven\u0161\u010dina",1:"sl",2:"slv","2T":"slv","2B":"slv",3:"slv"},{l:"Somali",bh:"Soomaaliga",1:"so",2:"som","2T":"som","2B":"som",3:"som"},{l:"Southern Sotho",bh:"Sesotho",1:"st",2:"sot","2T":"sot","2B":"sot",3:"sot"},{l:"Spanish",bh:"Espa\xf1ol",1:"es",2:"spa","2T":"spa","2B":"spa",3:"spa"},{l:"Sundanese",bh:"Basa Sunda",1:"su",2:"sun","2T":"sun","2B":"sun",3:"sun"},{l:"Swahili",bh:"Kiswahili",1:"sw",2:"swa","2T":"swa","2B":"swa",3:"swa"},{l:"Swati",bh:"SiSwati",1:"ss",2:"ssw","2T":"ssw","2B":"ssw",3:"ssw"},{l:"Swedish",bh:"Svenska",1:"sv",2:"swe","2T":"swe","2B":"swe",3:"swe"},{l:"Tamil",bh:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",1:"ta",2:"tam","2T":"tam","2B":"tam",3:"tam"},{l:"Telugu",bh:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",1:"te",2:"tel","2T":"tel","2B":"tel",3:"tel"},{l:"Tajik",bh:"\u0422\u043e\u04b7\u0438\u043a\u04e3",1:"tg",2:"tgk","2T":"tgk","2B":"tgk",3:"tgk"},{l:"Thai",bh:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",1:"th",2:"tha","2T":"tha","2B":"tha",3:"tha"},{l:"Tigrinya",bh:"\u1275\u130d\u122d\u129b",1:"ti",2:"tir","2T":"tir","2B":"tir",3:"tir"},{l:"Tibetan Standard",bh:"\u0f56\u0f7c\u0f51\u0f0b\u0f61\u0f72\u0f42",1:"bo",2:"bod","2T":"bod","2B":"tib",3:"bod"},{l:"Turkmen",bh:"T\xfcrkmen\xe7e",1:"tk",2:"tuk","2T":"tuk","2B":"tuk",3:"tuk"},{l:"Tagalog",bh:"Tagalog",1:"tl",2:"tgl","2T":"tgl","2B":"tgl",3:"tgl"},{l:"Tswana",bh:"Setswana",1:"tn",2:"tsn","2T":"tsn","2B":"tsn",3:"tsn"},{l:"Tonga",bh:"faka Tonga",1:"to",2:"ton","2T":"ton","2B":"ton",3:"ton"},{l:"Turkish",bh:"T\xfcrk\xe7e",1:"tr",2:"tur","2T":"tur","2B":"tur",3:"tur"},{l:"Tsonga",bh:"Xitsonga",1:"ts",2:"tso","2T":"tso","2B":"tso",3:"tso"},{l:"Tatar",bh:"\u0422\u0430\u0442\u0430\u0440\u0447\u0430",1:"tt",2:"tat","2T":"tat","2B":"tat",3:"tat"},{l:"Twi",bh:"Twi",1:"tw",2:"twi","2T":"twi","2B":"twi",3:"twi"},{l:"Tahitian",bh:"Reo M\u0101\u2019ohi",1:"ty",2:"tah","2T":"tah","2B":"tah",3:"tah"},{l:"Uyghur",bh:"\u0626\u06c7\u064a\u063a\u06c7\u0631\u0686\u0647",1:"ug",2:"uig","2T":"uig","2B":"uig",3:"uig"},{l:"Ukrainian",bh:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",1:"uk",2:"ukr","2T":"ukr","2B":"ukr",3:"ukr"},{l:"Urdu",bh:"\u0627\u0631\u062f\u0648",1:"ur",2:"urd","2T":"urd","2B":"urd",3:"urd"},{l:"Uzbek",bh:"O\u2018zbek",1:"uz",2:"uzb","2T":"uzb","2B":"uzb",3:"uzb"},{l:"Venda",bh:"Tshiven\u1e13a",1:"ve",2:"ven","2T":"ven","2B":"ven",3:"ven"},{l:"Vietnamese",bh:"Ti\u1ebfng Vi\u1ec7t",1:"vi",2:"vie","2T":"vie","2B":"vie",3:"vie"},{l:"Volap\xfck",bh:"Volap\xfck",1:"vo",2:"vol","2T":"vol","2B":"vol",3:"vol"},{l:"Walloon",bh:"Walon",1:"wa",2:"wln","2T":"wln","2B":"wln",3:"wln"},{l:"Welsh",bh:"Cymraeg",1:"cy",2:"cym","2T":"cym","2B":"wel",3:"cym"},{l:"Wolof",bh:"Wolof",1:"wo",2:"wol","2T":"wol","2B":"wol",3:"wol"},{l:"Western Frisian",bh:"Frysk",1:"fy",2:"fry","2T":"fry","2B":"fry",3:"fry"},{l:"Xhosa",bh:"isiXhosa",1:"xh",2:"xho","2T":"xho","2B":"xho",3:"xho"},{l:"Yiddish",bh:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",1:"yi",2:"yid","2T":"yid","2B":"yid",3:"yid"},{l:"Yoruba",bh:"Yor\xf9b\xe1",1:"yo",2:"yor","2T":"yor","2B":"yor",3:"yor"},{l:"Zhuang",bh:"Cuengh",1:"za",2:"zha","2T":"zha","2B":"zha",3:"zha"},{l:"Zulu",bh:"isiZulu",1:"zu",2:"zul","2T":"zul","2B":"zul",3:"zul"}];V(),It(),Ut();function GL(t){var i,n=null!=(i=function(t){var i=t.O0,n=new LC;return n.W0(i,0,i.byteLength),$C(n).w1}(t))?i:24;return t.tft/n}function QL(t){return t.Km===gy.IC}function YL(t,i,n,r,e){for(var s,u=function(t,i,n,r){var e=n.tft,s=fe.fromNumber(t.ZN||0),u=r.lO(Sm.gF(s,e));return{ift:r.iF(),eft:r,sft:u,nft:r}}(t,0,n,r),o=Sm.pF(t.ct||0,n.tft),h=t.SD||0,a=!(65536&h)&&1!==(h>>24&3),c=Aa(e),f=new Pa;f.ac=n)){var r=nr(t,function(t,i){return new eF(t.map(function(t){return t?t.xft():null}),i).wft()});if(0!==r.length)return new nF(i,n,r)}},t}(),oF="black",hF="white";V(),It(),V(),It();var aF=[[42,225],[92,233],[94,237],[95,243],[96,250],[123,231],[124,247],[125,209],[126,241],[127,9608],[128,174],[129,176],[130,189],[131,191],[132,8482],[133,162],[134,163],[135,9834],[136,224],[137,32],[138,232],[139,226],[140,234],[141,238],[142,244],[143,251],[144,193],[145,201],[146,211],[147,218],[148,220],[149,252],[150,8216],[151,161],[152,42],[153,8217],[154,9473],[155,169],[156,8480],[157,8226],[158,8220],[159,8221],[160,192],[161,194],[162,199],[163,200],[164,202],[165,203],[166,235],[167,206],[168,207],[169,239],[170,212],[171,217],[172,249],[173,219],[174,171],[175,187],[176,195],[177,227],[178,205],[179,204],[180,236],[181,210],[182,242],[183,213],[184,245],[185,123],[186,125],[187,92],[188,94],[189,95],[190,124],[191,8764],[192,196],[193,228],[194,214],[195,246],[196,223],[197,165],[198,164],[199,9475],[200,197],[201,229],[202,216],[203,248],[204,9487],[205,9491],[206,9495],[207,9499]].reduce(function(t,i){return t[i[0]]=i[1],t},{}),cF=function(){function t(){this.Rft=[],this.Bft=0,this.Lft=void 0;for(var t=0;trB&&(this.Bft=31)},i.Nft=function(t){var i=this.Bft+t;this.Dft(i)},i.Mft=function(){this.Nft(-1),this.Rft[this.Bft]=null},i.vft=function(t){t>=144&&this.Mft();var i=function(t){return aF[t]?String.fromCharCode(aF[t]):String.fromCharCode(t)}(t);this.addParsedChar(i)},i.addParsedChar=function(t){this.Bft>=rB||(32===Number(t)?(this.Rft[this.Bft]=this.Lft?"
":"",this.Lft=!this.Lft):this.Rft[this.Bft]=t,this.Nft(1))},i.Oft=function(t){for(var i=t;i=i)return null;var r=(new rF).pft(this.qft.slice(1));return 0===r.length?null:{TO:new nF(t,i,r),WT:n,zft:this.Hft<<1|this.Wft+1}},i.hr=function(){this.Gft(),this.Xft=1},i.jft=function(){return this.Xft},i.Qft=function(t){this.Xft=t},i.Dft=function(t){this.qft[this.Xft].Dft(t)},i.Nft=function(t){this.qft[this.Xft].Nft(t)},i.Kft=function(){return this.Yft},i.Jft=function(t){this.Yft=t},i.vft=function(t,i){if(!(i<32||i>127)){var n="";switch(t){case 0:n=void 0!==lF[i]?lF[i]:String.fromCharCode(i);break;case 1:n=gF[i];break;case 2:this.Zft(),n=wF[i];break;case 3:this.Zft(),n=mF[i]}n&&this.qft[this.Xft].addParsedChar(n)}},i.Zft=function(){this.qft[this.Xft].Mft()},i.$ft=function(t,i,n){if(t>=i)for(var r=n-1;r>=0;r--)this.qft[t+r]=this.qft[i+r];else for(var e=0;e0?this.Yft:0,this.Gft()},i.evt=function(t){this.svt=t},i.nvt=function(t){this.rvt=t},i.ovt=function(t){this.avt=t},i.uvt=function(t){this.cvt=t},t}(),vF=15,dF=function(t){return t[t.dvt=0]="dvt",t[t.lvt=1]="lvt",t[t.fvt=2]="fvt",t[t.vvt=3]="vvt",t}({}),lF={39:"\u2019",42:"\xe1",92:"\xe9",94:"\xed",95:"\xf3",96:"\xfa",123:"\xe7",124:"\xf7",125:"\xd1",126:"\xf1",127:"\u2588"},gF={48:"\xae",49:"\xb0",50:"\xbd",51:"\xbf",52:"\u2122",53:"\xa2",54:"\xa3",55:"\u266a",56:"\xe0",57:"\u2800",58:"\xe8",59:"\xe2",60:"\xea",61:"\xee",62:"\xf4",63:"\xfb"},wF={32:"\xc1",33:"\xc9",34:"\xd3",35:"\xda",36:"\xdc",37:"\xfc",38:"\u2018",39:"\xa1",40:"*",41:"'",42:"\u2500",43:"\xa9",44:"\u2120",45:"\xb7",46:"\u201c",47:"\u201d",48:"\xc0",49:"\xc2",50:"\xc7",51:"\xc8",52:"\xca",53:"\xcb",54:"\xeb",55:"\xce",56:"\xcf",57:"\xef",58:"\xd4",59:"\xd9",60:"\xf9",61:"\xdb",62:"\xab",63:"\xbb"},mF={32:"\xc3",33:"\xe3",34:"\xcd",35:"\xcc",36:"\xec",37:"\xd2",38:"\xf2",39:"\xd5",40:"\xf5",41:"{",42:"}",43:"\\",44:"^",45:"_",46:"|",47:"~",48:"\xc4",49:"\xe4",50:"\xd6",51:"\xf6",52:"\xdf",53:"\xa5",54:"\xa4",55:"\u2502",56:"\xc5",57:"\xe5",58:"\xd8",59:"\xf8",60:"\u250c",61:"\u2510",62:"\u2514",63:"\u2518"},yF=function(){function t(t,i){this.Vp=void 0,this.Avt=void 0,this.mvt=void 0,this.yvt=void 0,this.pvt=void 0,this.gvt=void 0,this.wvt=void 0,this._vt=void 0,this.Vp=0,this.Avt=new fF(t,i),this.mvt=new fF(t,i),this.yvt=new fF(t,i),this.pvt=this.mvt,this.gvt=0,this.wvt=void 0,this._vt=!1}var i=t.prototype;return i.hr=function(){this._vt=!0,this.gvt=0,this.Vp=0,this.pvt=this.mvt,this.wvt=void 0,this.mvt.hr(),this.yvt.hr(),this.Avt.hr()},i.bvt=function(t,i){return[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&t)<<1|i>>5&1]},i.Svt=function(t,i){var n=this.bvt(t,i),r=(30&i)>>1,e=hF,s=!1;r<7?e=kF[r]:7===r&&(s=!0);var u=!(1&~i);if(4!==this.Vp){var o=this.pvt;if(3===this.Vp&&n!==o.jft()){var h=1+o.jft()-o.Kft(),a=1+n-o.Kft();o.$ft(a,h,o.Kft()),o.tvt(0,a-1),o.tvt(n+1,vF-n)}o.Qft(n);var c=iB[t<<1&14|i>>5&1]-1;if(!(c<0)){var f=function(t,i){var n=i>95?i-96:i-64;return{iit:tB[n].iit,tit:tB[n].tit,eit:tB[n].eit,vit:t}}(c,i);o.Dft(f.eit),this.pvt.evt(u),this.pvt.nvt(s),this.pvt.ovt(e),this.pvt.uvt(oF)}}},i.Tvt=function(t,i){this.pvt.evt(!1),this.pvt.nvt(!1),this.pvt.ovt(hF);var n=this.kvt(t,dF.dvt," ".charCodeAt(0)),r=hF,e=!1,s=!(1&~i);return"white_italics"===(r=kF[(14&i)>>1])&&(r="white",e=!0),this.pvt.evt(s),this.pvt.nvt(e),this.pvt.ovt(r),n},i.kvt=function(t,i,n){if(this.pvt.vft(i,n),2===this.Vp||3===this.Vp){var r=this.Evt(this.pvt,this.gvt,t);return this.gvt=t,r}return null},i.Evt=function(t,i,n){return this._vt?null:2===this.Vp||3===this.Vp?t.Vft(n,n+10):t.Vft(i,n)},i.Pvt=function(t,i){var n=oF;7&t||(n=_F[(14&i)>>1]),this.pvt.uvt(n)},i.xvt=function(t){var i=pF,n=t.Ivt,r=t.Rvt,e=null;switch(n){case i.RCL:this.Cvt();break;case i.BS:this.Dvt();break;case i.AOD:case i.AON:case i.DER:break;case i.RU2:e=this.Bvt(2,r);break;case i.RU3:e=this.Bvt(3,r);break;case i.RU4:e=this.Bvt(4,r);break;case i.FON:e=this.Nvt(r);break;case i.RDC:this.Mvt(r);break;case i.TR:this.Lvt();break;case i.RTD:this.Ovt();break;case i.EDM:e=this.Fvt(r);break;case i.CR:e=this.Uvt(r);break;case i.ENM:this.Vvt();break;case i.EOC:e=this.Hvt(r)}return e},i.Uvt=function(t){var i=this.pvt;if(3!==this.Vp)return null;var n=this.Evt(i,this.gvt,t),r=i.jft()-i.Kft()+1;return i.$ft(r-1,r,i.Kft()),i.tvt(0,r-1),i.tvt(i.jft(),vF-i.jft()),this.gvt=t,n},i.Bvt=function(t,i){this.pvt=this.mvt;var n=this.pvt,r=null;return 3!==this.Vp&&4!==this.Vp&&(r=this.Evt(n,this.gvt,i),this.mvt.ivt(),this.yvt.ivt(),this._vt=!1,n.Qft(vF)),this.Vp=3,n.Jft(t),r},i.Nvt=function(t){return this.kvt(t,dF.dvt," ".charCodeAt(0))},i.Fvt=function(t){var i=this.mvt,n=null;return 4!==this.Vp&&(n=this.Evt(i,this.gvt,t)),i.Gft(),this._vt=!1,n},i.Mvt=function(t){this.Vp=2,this.pvt=this.mvt,this.pvt.Jft(0),this.gvt=t},i.Vvt=function(){this.yvt.Gft()},i.Hvt=function(t){var i=null;4!==this.Vp&&(i=this.Evt(this.mvt,this.gvt,t));var n=this.yvt;return this.yvt=this.mvt,this.mvt=n,this.Cvt(),this.gvt=t,i},i.Cvt=function(){this.Vp=1,this.pvt=this.yvt,this.pvt.Jft(0)},i.Dvt=function(){this.pvt.Zft()},i.Lvt=function(){this.Avt.hr(),this._vt=!1,this.Ovt()},i.Ovt=function(){this.pvt=this.Avt,this.Vp=4},i.Wvt=function(t,i,n){return this.pvt.vft(dF.dvt,i),this.kvt(t,dF.dvt,n)},i.qvt=function(t,i,n){var r=1&i?dF.vvt:dF.fvt;return this.kvt(t,r,n)},i.zvt=function(t){var i=t.Gvt,n=t.Ivt,r=t.Rvt;if(this.wvt===(i<<8|n))return this.wvt=void 0,null;if(this.wvt=i<<8|n,this.Xvt(i,n))this.Svt(i,n);else{if(this.jvt(i,n))return this.Tvt(r,n);if(this.Qvt(i,n))this.Pvt(i,n);else{if(this.Kvt(i,n))return this.kvt(r,dF.lvt,n);if(this.Yvt(i,n))return this.qvt(r,i,n);if(this.Jvt(i,n))return this.xvt(t);this.isTabOffset(i)&&this.pvt.Nft(n-32)}}return null},i.isTabOffset=function(t){return 23===t||31===t},i.Jvt=function(t,i){return 20==(246&t)&&32==(240&i)},i.Xvt=function(t,i){return 16==(240&t)&&64==(192&i)},i.jvt=function(t,i){return 17==(247&t)&&32==(240&i)},i.Qvt=function(t,i){return 16==(247&t)&&32==(240&i)||23==(247&t)&&45==(255&i)},i.Kvt=function(t,i){return 17==(247&t)&&48==(240&i)},i.Yvt=function(t,i){return 18==(246&t)&&32==(224&i)},t.Zvt=function(t){return 16==(112&t)},t}(),pF={RCL:32,BS:33,AOD:34,AON:35,DER:36,RU2:37,RU3:38,RU4:39,FON:40,RDC:41,TR:42,RTD:43,EDM:44,CR:45,ENM:46,EOC:47},_F=["black","green","blue","cyan","red","yellow","magenta","black"],kF=["white","green","blue","cyan","red","yellow","magenta","white_italics"];V(),It(),Ut(),Yt(),V(),It(),V(),It();var bF=function(){function t(t,i,n,r,e){this.$vt=void 0,this.svt=void 0,this.rvt=void 0,this.cvt=void 0,this.avt=void 0,this.$vt=t,this.svt=i,this.rvt=n,this.cvt=r,this.avt=e}var i=t.prototype;return i.xft=function(){return this.$vt},i.t_t=function(){return this.svt},i.i_t=function(){return this.rvt},i.e_t=function(){return this.cvt},i.s_t=function(){return this.avt},t}(),AF=function(){function t(t){this.C_t=void 0,this.yz=void 0,this.a_t=void 0,this.h_t=void 0,this.r_t=void 0,this.o_t=void 0,this.u_t=void 0,this.c_t=void 0,this.I_t=void 0,this.l_t=void 0,this.OO=void 0,this.Xft=void 0,this.g_t=void 0,this.rvt=void 0,this.svt=void 0,this.avt=void 0,this.cvt=void 0,this.C_t=t,this.yz=!1,this.a_t=!1,this.h_t=0,this.r_t=0,this.o_t=0,this.u_t=0,this.c_t=0,this.I_t=2,this.l_t=[],this.OO=0,this.Xft=0,this.g_t=0,this.rvt=!1,this.svt=!1,this.avt=hF,this.cvt=oF,this.d_t()}var i=t.prototype;return i.n_t=function(t,i,n,r,e,s,u){this.yz=t,this.r_t=i,this.h_t=n,this.o_t=r,this.a_t=e,this.u_t=s,this.c_t=u},i.d_t=function(){this.l_t=[];for(var t=0;t=0,i=this.g_t=0;return t&&i},i.Re=function(){return this.yz},i.m_t=function(t){for(var i=0,n=t;n=this.u_t)return this.m_t(1),void(this.g_t=0);this.Xft++,this.g_t=0},i.y_t=function(){this.l_t[this.Xft]=this.f_t(),this.g_t=0},i.Vft=function(t,i){if(this.OO>=t)return null;var n=uF.Pft(this.l_t,this.OO,t);return n?(this.A_t(t),{TO:n,WT:"svc"+i,zft:i}):null},i.b_t=function(t,i){this.Xft=t,this.g_t=i},i.S_t=function(t){this.cvt=t},i.T_t=function(t){this.avt=t},i.k_t=function(t){this.svt=t},i.E_t=function(t){this.rvt=t},i.P_t=function(){this.Xft=0,this.g_t=0,this.svt=!1,this.rvt=!1,this.avt=hF,this.cvt=oF},i.x_t=function(t){this.I_t=t},i.R_t=function(){this.yz=!0},i.we=function(){this.yz=!1},i.Mh=function(){this.yz=!this.yz},i.A_t=function(t){this.OO=t},t}(),TF=42,SF=15,EF=function(){function t(t){this.q_t=void 0,this.$_t=void 0,this.W_t=void 0,this.q_t=t,this.$_t=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0],this.W_t=void 0}var i=t.prototype;return i.D_t=function(t){var i=t.B_t(),n=i.zE,r=i.Rvt;n===NF&&(n=n<<16|t.B_t().zE);return n>=0&&n<=31?this.N_t(n,r):n>=128&&n<=159?this.M_t(t,n,r):(n>=4096&&n<=4127?this.L_t(t,255&n):n>=4224&&n<=4255?this.O_t(t,255&n):n>=32&&n<=127?this.F_t(n):n>=160&&n<=255?this.U_t(n):n>=4128&&n<=4223?this.V_t(255&n):n>=4256&&n<=4351&&this.H_t(255&n),null)},i.F_t=function(t){this.W_t&&(127!==t?this.W_t.v_t(String.fromCharCode(t)):this.W_t.v_t("\u266a"))},i.U_t=function(t){this.W_t&&this.W_t.v_t(String.fromCharCode(t))},i.V_t=function(t){if(this.W_t)if(void 0!==DF[t]){var i=DF[t];this.W_t.v_t(i)}else this.W_t.v_t("_")},i.H_t=function(t){this.W_t&&(160===t?this.W_t.v_t("[CC]"):this.W_t.v_t("_"))},i.N_t=function(t,i){if(!this.W_t)return null;var n=this.W_t,r=null;switch(t){case IF:n.p_t();break;case CF:n.Re()&&(r=n.Vft(i,this.q_t)),n.w_t();break;case PF:n.Re()&&(r=n.Vft(i,this.q_t)),n.y_t();break;case RF:n.Re()&&(r=n.Vft(i,this.q_t)),n.d_t(),n.b_t(0,0)}return r},i.M_t=function(t,i,n){if(i>=128&&i<=135){var r=7&i;this.z_t(r)}else{if(136===i){var e=t.B_t().zE;return this.G_t(e,n)}if(137===i){var s=t.B_t().zE;this.X_t(s,n)}else{if(138===i){var u=t.B_t().zE;return this.j_t(u,n)}if(139===i){var o=t.B_t().zE;return this.Q_t(o,n)}if(140===i){var h=t.B_t().zE;return this.K_t(h,n)}if(143===i)return this.hr(n);if(144===i)this.Y_t(t);else if(145===i)this.J_t(t);else if(146===i)this.b_t(t);else if(151===i)this.Z_t(t);else if(i>=152&&i<=159){var a=(15&i)-8;this.n_t(t,a,n)}}}return null},i.L_t=function(t,i){i>=8&&i<=15?t.rD(1):i>=16&&i<=23?t.rD(2):i>=24&&i<=31&&t.rD(3)},i.O_t=function(t,i){i>=128&&i<=135?t.rD(4):i>=136&&i<=143&&t.rD(5)},i.z_t=function(t){this.$_t[t]&&(this.W_t=this.$_t[t])},i.tgt=function(t){var i;return zt(this,function(n){switch(n.label){case 0:i=0,n.label=1;case 1:return i<8?!(1&~t)&&this.$_t[i]?[4,i]:[3,3]:[3,5];case 2:n.sent(),n.label=3;case 3:t>>=1,n.label=4;case 4:return i++,[3,1];case 5:return[2]}})},i.G_t=function(t,i){for(var n,r=null,e=Ft(this.tgt(t));!(n=e()).done;){var s=n.value,u=this.$_t[s];u.Re()&&(r=u.Vft(i,this.q_t)),u.d_t()}return r},i.X_t=function(t,i){for(var n,r=Ft(this.tgt(t));!(n=r()).done;){var e=n.value,s=this.$_t[e];s.Re()||s.A_t(i),s.R_t()}},i.j_t=function(t,i){for(var n,r=null,e=Ft(this.tgt(t));!(n=e()).done;){var s=n.value,u=this.$_t[s];u.Re()&&(r=u.Vft(i,this.q_t)),u.we()}return r},i.Q_t=function(t,i){for(var n,r=null,e=Ft(this.tgt(t));!(n=e()).done;){var s=n.value,u=this.$_t[s];u.Re()?r=u.Vft(i,this.q_t):u.A_t(i),u.Mh()}return r},i.K_t=function(t,i){for(var n,r=null,e=Ft(this.tgt(t));!(n=e()).done;){var s=n.value,u=this.$_t[s];u.Re()&&(r=u.Vft(i,this.q_t)),this.$_t[s]=void 0}return r},i.hr=function(t){var i=this.K_t(255,t);return this.Gy(),i},i.Gy=function(){this.W_t=void 0,this.$_t=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0]},i.Y_t=function(t){t.rD(1);var i=t.B_t().zE;if(this.W_t){var n=(128&i)>0,r=(64&i)>0;this.W_t.E_t(n),this.W_t.k_t(r)}},i.J_t=function(t){var i=t.B_t().zE,n=t.B_t().zE;if(t.rD(1),this.W_t){var r=3&i,e=(12&i)>>2,s=(48&i)>>4,u=3&n,o=(12&n)>>2,h=(48&n)>>4,a=this.igt(s,e,r),c=this.igt(h,o,u);this.W_t.T_t(a),this.W_t.S_t(c)}},i.b_t=function(t){var i=t.B_t().zE,n=t.B_t().zE;if(this.W_t){var r=15&i,e=63&n;this.W_t.b_t(r,e)}},i.Z_t=function(t){t.rD(1),t.rD(1);var i=t.B_t().zE;if(t.rD(1),this.W_t){var n=3&i;this.W_t.x_t(n)}},i.n_t=function(t,i,n){var r=void 0!==this.$_t[i];if(!r){var e=new AF(i);e.A_t(n),this.$_t[i]=e}var s=t.B_t().zE,u=t.B_t().zE,o=t.B_t().zE,h=t.B_t().zE,a=t.B_t().zE,c=t.B_t().zE,f=(32&s)>0,v=127&u,d=(128&u)>0,l=o,g=1+(15&h),w=(240&h)>>4,m=1+(63&a);r&&0===(7&c)||this.$_t[i].P_t(),this.$_t[i].n_t(f,v,l,w,d,g,m),this.W_t=this.$_t[i]},i.igt=function(t,i,n){var r={0:0,1:0,2:1,3:1};return xF[r[t]<<2|r[i]<<1|r[n]]},t}(),IF=8,RF=12,CF=13,PF=14,NF=16,DF={32:" ",33:"\xa0",37:"\u2026",42:"\u0160",44:"\u0152",48:"\u2588",49:"\u2018",50:"\u2019",51:"\u201c",52:"\u201d",53:"\u2022",57:"\u2122",58:"\u0161",60:"\u0153",61:"\u2120",63:"\u0178",118:"\u215b",119:"\u215c",120:"\u215d",121:"\u215e",122:"\u2502",123:"\u2510",124:"\u2514",125:"\u2500",126:"\u2518",127:"\u250c"},xF=["black","blue","green","cyan","red","magenta","yellow","white"];V(),It();var BF=function(){function t(){this.rgt=void 0,this.ngt=void 0,this.sgt=void 0,this.rgt=[],this.ngt=null,this.sgt=0}var i=t.prototype;return i.egt=function(t){if(t.Km===LL.Xlt){var i=63&t.zE;return this.sgt=2*i-1,void(this.ngt=[])}if(this.ngt&&(this.sgt>0&&(this.ngt.push(t),this.sgt--),0===this.sgt)){var n=new OF(this.ngt);this.rgt.push(n),this.ngt=null,this.sgt=0}},i.hgt=function(){return this.rgt},i.ogt=function(){this.rgt=[]},i.Gy=function(){this.rgt=[],this.ngt=[],this.sgt=0},t}(),OF=function(){function t(t){this.ugt=void 0,this.cgt=void 0,this.ugt=0,this.cgt=t}var i=t.prototype;return i.agt=function(){return this.ugtthis.cgt.length)throw new md(gd.SUBTITLE_PARSE_ERROR,"Buffer read out of bounds / invalid CEA-708 Data.");this.ugt+=t},t}(),MF=function(){function t(){this.fgt=void 0,this.vgt=void 0,this._gt=void 0,this.lgt=void 0,this.wgt=void 0,this.pgt=void 0,this.mgt=void 0,this.ggt=void 0,this.bgt=!1,this.fgt=[],this.vgt=[],this._gt=new BF,this.lgt=0,this.wgt=so({CC1:new yF(0,0),CC2:new yF(0,1),CC3:new yF(1,0),CC4:new yF(1,1)}),this.pgt=0,this.mgt=0,this.ggt=eo(),this.hr()}var i=t.prototype;return i.Gy=function(){this.lgt=0,this.fgt=[],this.vgt=[],this._gt.Gy(),this.hr(),this.ggt.forEach(function(t){t.Gy()})},i.hr=function(){this.pgt=0,this.mgt=0,this.wgt.forEach(function(t){t.hr()})},i.ygt=function(t,i){if(t.Klt){var n=t.Jlt,r=t.Zlt,e=t.Km;e===LL.qlt||e===LL.zlt?this.fgt.push({Rvt:i,Km:e,Gvt:n,Ivt:r,Agt:this.fgt.length}):this.bgt&&(this.vgt.push({Rvt:i,Km:e,zE:n,Agt:this.vgt.length}),this.vgt.push({Rvt:i,Km:LL.Glt,zE:r,Agt:this.vgt.length}))}},i.rj=function(){var t=[];this.fgt.sort(function(t,i){return t.Rvt-i.Rvt||t.Agt-i.Agt}),this.vgt.sort(function(t,i){return t.Rvt-i.Rvt||t.Agt-i.Agt});for(var i,n=Ft(this.fgt);!(i=n()).done;){var r=i.value,e=this.Sgt(r);e&&t.push(e)}for(var s,u=Ft(this.vgt);!(s=u()).done;){var o=s.value;this._gt.egt(o)}for(var h,a=Ft(this._gt.hgt());!(h=a()).done;){var c,f=h.value,v=this.Tgt(f);(c=t).push.apply(c,[].concat(v))}return this._gt.ogt(),this.fgt=[],this.vgt=[],t},i.Sgt=function(t){var i=t.Km;if(yF.Zvt(t.Gvt)){var n=t.Gvt>>3&1;0===i?this.pgt=n:this.mgt=n}var r="CC"+(i<<1|(i?this.mgt:this.pgt)+1),e=this.wgt.get(r);return 255===t.Gvt&&255===t.Ivt||!t.Gvt&&!t.Ivt||!this.kgt(t.Gvt)||!this.kgt(t.Ivt)?(++this.lgt>=45&&this.hr(),null):(this.lgt=0,t.Gvt&=127,t.Ivt&=127,t.Gvt||t.Ivt?yF.Zvt(t.Gvt)?e.zvt(t):e.Wvt(t.Rvt,t.Gvt,t.Ivt):null)},i.Tgt=function(t){var i=[];try{for(;t.agt();){var n=t.B_t().zE,r=(224&n)>>5,e=31&n;if(7===r&&0!==e)r=63&t.B_t().zE;if(0!==r){if(!this.ggt.has(r)){var s=new EF(r);this.ggt.set(r,s)}for(var u=this.ggt.get(r),o=t.dgt();t.dgt()-o>=1;return 1===i},t}();V(),It(),Nt();var LF=function(t){function i(i,n){var r;return(r=t.call(this,"Egt")||this).zft=void 0,r.TO=void 0,r.zft=i,r.TO=n,r}return Pt(i,t),i}(ah),FF=Sm.eU(.1),UF=function(t){function i(){var i;return(i=t.call(this)||this).xgt=void 0,i.xgt=new MF,i}Pt(i,t);var n=i.prototype;return n.Pgt=function(t,i){this.xgt.ygt(t,i)},n.rj=function(){for(var t,i=Ft(this.xgt.rj());!(t=i()).done;){var n=t.value;this.So(new LF(n.zft,n.TO))}},n.hr=function(){this.xgt.Gy()},n.kn=function(){this.Vo(),this.xgt.Gy()},i}(uh),VF=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Dgt=[],i}Pt(i,t);var n=i.prototype;return n.Igt=function(t,i,n,r){var e=this.Rgt(t,r);this.Cgt(e,i,n),this.rj()},n.Rgt=function(t,i){var n,r=t.slice().sort(nB),e=this.Dgt;if(0===e.length)return r;if(0===r.length)return e;var s=e[0].sit,u=e[e.length-1].sit,o=r[0].sit,h=e[0].kot===r[0].kot;if(u.lF(o).uF().aF(Sm.eU(2.5*i))&&h)n=e.concat(r).sort(nB);else if(o.nF(s)){for(var a=0;au.EO?e.PO=u.EO:e.EO>u.EO&&u.PO>e.EO?u.PO=e.EO:e.EO===u.EO&&(e.PO=u.PO)}n.jgt(r,e)},n.Ngt=eo(),n.qgt=new VF,n.qgt.wn("Egt",n.Xgt),n}Pt(i,t);var n=i.prototype;return n.Bgt=function(t){return this.Ngt.get(t)},n.Mgt=function(t){var i=this.Ngt.get(t.nit);return i||(i=this.Lgt(t),this.Ngt.set(t.nit,i)),i},n.Lgt=function(t){var i=[rw.VI],n=qL(t.rit),r=n?n.l:"";t.Ogt&&(r="easy "+r,i.push(rw.zI));var e=t.Th||r||"CC"+t.nit,s=this.Fgt(e,t.rit,i);return this.tt(s),s},n.Jrt=function(t){var i=Ry.TD(Aa(t));this.Ugt=function(t){for(var i,n=Ft(t.Z);!(i=n()).done;){var r=i.value,e=$L(r),s=r.KD.hB.uB.dB.fB,u=Wn(s,function(t){return t.Km===gy.JR});if(!u){var o=s.filter(function(t){return t.Km===gy.xC}),h=Wn(o,function(t){var i;return(null==(i=t.hN)?void 0:i.Km)===gy.JR});h&&(u=h.hN)}if(u){var a=BC(Aa(u.jB.ck),new Pa),c=u.KB;return io({},e,{$D:r.gD.$D,jB:Ca(u.jB.ck),Ti:u.Ti,Mi:u.Mi,CN:c&&c.CN,RN:c&&c.RN,t2:a.B0,Vgt:a.N0,i2:a.M0,O0:a.O0[0],F0:a.F0[0]})}}}(Wn(i,KL))},n.Odt=function(t,i,n,r,e,s){var u;if(this.Ugt&&(E(this.Hgt)||!Pn(this.Hgt,i,1e-5))){E(this.Wgt)||Pn(this.Wgt,i,.1)||this.qgt.hr();for(var o,h,a=function(t,i,n,r,e){for(var s,u=[],o=i.filter(QL),h=r(n),a=Ft(o);!(s=a()).done;){var c=s.value,f=Wn(c.Z,function(t){return t.gD.$D===n.$D});if(f)for(var v,d,l=f.gD.NN||0,g=f.gD.MN||0,w=f.GN?f.GN.GN:fe.ZERO,m=c.UN+(null!=(v=f.gD.XN)?v:fe.ZERO).toNumber(),y=Ft(f.zN);!(d=y()).done;)for(var p,_=d.value,k=m+(_.UN||0),b=Ft(_.JN);!(p=b()).done;){var A=p.value,T=A.Vy||g,S=new LC;S.W0(t,k,k+T);var E=Sm.gF(w,n.tft);S.DU=e(A,c,n,E,Ia(t,k,k+T)),u.push(S),k+=T,w=w.add(A.ct||l||h)}}return u}(t,Ry.TD(Aa(t)),this.Ugt,GL,YL),c=null!=(o=null==(u=ur(a,function(t){return t.DU.ct}))?void 0:u.DU.ct)?o:0,f=function(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){var e,s=i.value;s.DU.uft&&(e=n).push.apply(e,[].concat(s.DU.uft)),delete s.DU.uft}for(var u=0;u0}(o,i)||0!==w.length){var p=Ra(t),_=Wn(s,function(t){return t.Km===gy.KR}),k=_?Ay.vD(_.ck,gy.YR):void 0,b=k?function(t){var i=t.ck.Ly();return i.rD(4),i.rD(4),i.ZC()}(k):1,A=Wn(f,function(t){return t.Km===gy.QR});A&&function(t,i,n){var r=eU(Aa(t),i),e=Ay.fD(r,new Pa),s=e.ck;s.rD(4);for(var u=s.ZC(),o=0;o=0;S--){var E=w[S];p=rU(p,E.Zgt,v,T,E.$gt,n)}return{tpt:p,ipt:{ept:w.length,BN:b}}}}}}}}}}function nU(t,i,n){var r=Va(t,n,i.ck.ck.byteOffset+i.ck.ck.byteLength);return sU(eU(Aa(r),i),n.byteLength),r}function rU(t,i,n,r,e,s){var u=function(t,i,n){0;var r=t.ck.ck,e=cU(),s=new I(r.byteLength+e.byteLength),u=Aa(s);s.set(Ta(r),0),sU(u,e.byteLength),ua(u,new Pa(dU),i),s.set(e,r.byteLength),ua(u,new Pa(r.byteLength+fU),t.Km),n&&qh(u,new Pa(r.byteLength+vU),n);return s}(i,e,s),o=Va(t,u,i.ck.ck.byteOffset),h=Aa(o);!function(t,i){var n=Ay.fD(t,new Pa),r=Ay.yD(n.ck,gy.jR,!1),e=Aa(r.ck),s=e.getUint32(0);e.setUint32(0,s+i)}(eU(h,n),1);for(var a,c=Ft(r);!(a=c()).done;){sU(eU(h,a.value),u.byteLength)}return o}function eU(t,i){var n=i.ck.ck.byteOffset;return ba(t,n,n+i.ck.ck.byteLength)}function sU(t,i){var n=new Pa,r=Kh(t,n);if(0===r);else if(1===r){n.Ny(4);var e=Zh(t,n.Ly());ta(t,n,e.add(i))}else n.My(0),Jh(t,n,r+i)}V(),It(),Nt(),Ut();var uU=function(t){function i(i){var n;return(n=t.call(this)||this).npt=void 0,n.YJ=void 0,n.rpt=[],n.npt=i,n}Pt(i,t);var n=i.prototype;return n.start=function(t){this.YJ=t},n.transform=function(t){this.A$(t),this.spt()},n.flush=function(){this.S$(),this.spt()},n.C$=function(t){return t===gy.IC},n.B$=function(t){var i=Ra(Ta(t.ck.ck)),n=Ay.fD(Aa(i),new Pa);i=oU(i,n,this.npt),this.rpt.push(i)},n.M$=function(t){this.rpt.push(t)},n.spt=function(){for(var t,i=Ft(function(t){if(t.length<2)return t;for(var i=[],n=t[0],r=n.buffer,e=n.byteOffset,s=n.byteLength,u=1;u=0;s--){var u=e[s];u.Km===gy.DC&&(r=hU(r,u,i,n))}return r}function hU(t,i,n,r){var e=eU(Aa(t),i),s=Ay.fD(e,new Pa),u=Ay.aD(s.ck),o=Wn(u,function(t){return t.Km===gy.BC});if(!o)return t;var h=o.ck,a=h.KC.Ly(),c=h.ZC(),f=Iy(c).flags;h.rD(4),f.Oy(my.BASE_DATA_OFFSET_PRESENT)&&h.rD(8);var v=h.KC.Ly();if(f.Oy(my.SAMPLE_DESCRIPTION_INDEX_PRESENT)){var d=Kh(h.ck,v);return Jh(h.ck,h.KC,d+r.ept),t}Jh(h.ck,a,c|my.SAMPLE_DESCRIPTION_INDEX_PRESENT);var l=new I(4);Aa(l).setUint32(0,r.BN+r.ept);for(var g,w=h.ck.byteOffset+v.ac,m=Ft(u.filter(function(t){return t.Km===gy.NC}));!(g=m()).done;){aU(g.value,l.byteLength)}for(var y=0,p=[o,i,n];y0?i.An(i.V-1):0;var n=t.An(0);isFinite(n)&&this.dpt=0;s--){var u=e[s];u.Km===gy.IC&&(n=oU(n,u,i))}return n}(h,this.Apt)),u={Km:JR.vZ,ck:h}),a={xet:i.EO,ct:i.ct,bU:r,i2:null==(s=n.kot)?void 0:s.jI},c=this.Trt.IP,[4,this.bpt()];case 1:return d.sent(),[4,this.Trt.H2(u,a,e)];case 2:return d.sent(),f=this.Trt.IP,v=this.Trt.M3,[2,wU(c,f,v,i)]}})}).call(this)},n.Jrt=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:return yr(n),this.ypt&&this.ypt.Jrt(new I(t.Iht)),s=new I(t.Iht),this.Spt(i)&&(u=this.fpt.Tpt,o=[],u&&(o=nr(u.kpt,function(t){return t.BW}),h=u.Ept.uH?nI(u.Ept.uH):void 0),(a=iU(s,o,h))?(this.Apt=a.ipt,s=a.tpt):this.Apt=void 0),(null==(r=this.Trt)?void 0:r.Cd)&&this.Trt.Cd.qT!==i.qT?(c={qT:i.qT},this.Trt.TZ(c)?[4,this.Trt.EZ(c)]:[3,2]):[3,2];case 1:v.sent(),yr(n),v.label=2;case 2:return f={Km:JR.vZ,ck:s},[4,this.bpt()];case 3:return v.sent(),[4,this.Trt.z2(f,{i2:null==(e=i.kot)?void 0:e.jI},n)];case 4:return v.sent(),[2]}})}).call(this)},n.Ldt=function(t,i,n){return this.Trt._S(t,i,n)},n.t$=function(t,i){this.Trt.F3(t,i)},n.i$=function(t,i){this.Trt.U3(t,i)},n.cpt=function(){return this.Trt?this.Trt.IP:OA.iL()},n.upt=function(){return this.Trt?this.Trt.M3:OA.iL()},n.Ppt=function(){return this.Trt?this.Trt._S(0,1/0):ot.resolve()},n.xpt=function(){return this.Trt&&(this.Trt.mn($R.lZ,this.Rs),this.Trt=void 0),ot.resolve()},n.Ipt=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return n=JM.Yct(null!=(i=t.ilt)?i:t.rat,this.Vct),r=n.oQ,this.Trt||(this.Trt=this.fpt.Rpt(r),this.Trt.wn($R.lZ,this.Rs),this.Qct=new wL(this.Trt)),[4,this.bpt()];case 1:return e.sent(),[2]}})}).call(this)},n.Un=function(t,i){var n=dr.ep([i]);this.rV.Zg(),this.rV=n;var r=this.Cpt(t,this.Dpt,n.Yg);return this.Dpt=r,r},n.Bpt=function(t){if(!Jn(this.Npt,Uw.CEA608)){var i=t.Nut.Wdt;if(function(t){return t.some(function(t){return t.y8===YF||t.y8===$F})}(i)){this.ypt=new zF(this.JU);for(var n,r=function(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){var e=i.value;if(e.y8===YF)for(var s,u=Ft(sB(e.zE));!(s=u()).done;){var o=s.value;n.push(o)}else if(e.y8===$F)for(var h,a=Ft(GF(e.zE));!(h=a()).done;){var c=h.value;if(c.nit<=4){var f=QF[c.nit];n.push(io({},c,{nit:f}))}}}return n}(i),e=Ft(r);!(n=e()).done;){var s=n.value;this.ypt.Mgt(s)}this.opt.FW(this.ypt.Z)}}},n.Cpt=function(t,i,n){return jt(function(){return zt(this,function(r){switch(r.label){case 0:return yr(n),i?[4,i.catch(yn)]:[3,2];case 1:r.sent(),r.label=2;case 2:return this.dlt===t&&this.Mpt?[2]:[4,this.Lpt()];case 3:return r.sent(),yr(n),[4,this.Ppt()];case 4:return r.sent(),yr(n),t?[4,this.sV(t)]:[3,6];case 5:r.sent(),r.label=6;case 6:return[2]}})}).call(this)},n.Lpt=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=this.dlt,this.dlt=void 0,this.Mpt=!1,this.dpt=void 0,t&&(t.mn(Mg.EI,this.Opt),t.ult(!1),t.mn(Mg.NO_QUALITY,this.Rs)),this.Fpt&&(this.Fpt.kn(),this.Fpt=void 0),this.flt?[4,this.flt.kn()]:[3,2];case 1:i.sent(),this.flt=void 0,i.label=2;case 2:return this.ypt?(this.opt.WW(this.ypt.Z),[4,this.ypt.kn()]):[3,4];case 3:i.sent(),i.label=4;case 4:return[2]}})}).call(this)},n.sV=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.dlt=t,this.Bpt(t),t.wn(Mg.EI,this.Opt),t.wn(Mg.NO_QUALITY,this.Rs),[4,this.Ipt(t)];case 1:return i.sent(),this.flt=this.Upt(t),this.flt.wn(lU,this.Rs),this.flt.wn("Eot",this.gpt),this.flt.Bot=t.ilt,this.Fpt=new tU(this.TL,this.flt),this.Fpt.wn(Mg.TI,this.Ydt),t.ult(!0),this.Mpt=!0,[2]}})}).call(this)},n.Upt=function(t){return new gL(this,this.TL,this.TL,this.nV,this.Rz,this.Vdt,this.eut,this.Xct,this.Vct,this.Qct,this._dt,this.lq).Ret(t)},n.hr=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.rV.Zg(),this.Dpt?[4,this.Dpt.catch(yn)]:[3,2];case 1:i.sent(),this.Dpt=void 0,i.label=2;case 2:return[4,this.Lpt()];case 3:return i.sent(),t?[3,5]:[4,this.Ppt()];case 4:i.sent(),i.label=5;case 5:return[4,this.xpt()];case 6:return i.sent(),[2]}})}).call(this)},n.Vpt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.Lpt()];case 1:return t.sent(),[2]}})}).call(this)},n.Qdt=function(t){var i;null==(i=this.hpt)||i.Qdt(t)},n.Gdt=function(t,i){return jt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,this.Jot()];case 1:if(o.sent(),null==(n=this.hpt)||n.Gdt(i),!((e=null==(r=this.flt)?void 0:r.Cot.$ut.Xut(t))&&e.V>0))return[3,5];s=0,o.label=2;case 2:return s=t.Nut.wct.An?A.max(i,this.An):i;return e=A.max(r,e),OA.tL(r,e).CM()}},{key:"QW",get:function(){return this.Uut.JM(this.MP)}},{key:"qut",get:function(){return this.fpt.qut}},{key:"MP",get:function(){return this.TL.MP}},{key:"Tn",get:function(){return this.dlt?this.dlt.Nut.wct.Tn:NaN}},{key:"An",get:function(){var t=this.vpt(),i=this.dpt;return void 0===t?NaN:void 0!==i?i:t}},{key:"Mi",get:function(){return this.fpt.Mi}},{key:"Ti",get:function(){return this.fpt.Ti}},{key:"_pt",get:function(){return this.dpt}}]),i}(uh);function wU(t,i,n,r){var e,s,u=i.UM(t.CM());return 0===(u=u.UM(n.UM(i))).V?s=e=r.PO:(e=u.Tn(0),s=u.An(0)),{kdt:e,Edt:s}}var mU=0;var yU=function(t){function i(i,n,r,e,s,u,o,h,a,c,f,v,d,l){var g,w,m;return(g=t.call(this)||this).gO=void 0,g.YL=new aw,g.$L=new aw,g.Gl=void 0,g.JU=void 0,g.Qpt=void 0,g.nV=void 0,g.Rz=void 0,g.eut=void 0,g.TL=void 0,g.jpt=void 0,g.lmt=[],g.cmt=new dr,g.hmt=!0,g.Nlt=[],g.imt=void 0,g.lq=void 0,g.Dpt=void 0,g._dt=void 0,g.Npt=void 0,g.d3=void 0,g.Vdt=void 0,g.ju=void 0,g.wpt=void 0,g.Ypt=void 0,g.$pt=_n(function(){g.So(new eC(g.MP))},350),g.vmt=function(t){var i=t.Emt.hpt;if(i)for(var n,r=Ft(g.lmt);!(n=r()).done;){var e,s=n.value;s.hpt&&s.hpt!==i&&s.Km===(null==(e=i.Jdt)?void 0:e.Km)&&(s.mn("fmt",g.vmt),s.hpt.Rt=!1,s.wn("fmt",g.vmt))}g.Rs(t)},g.mmt=function(t){mr(t)||g.So(new Ib(yd(t,gd.MEDIA_LOAD_ERROR)))},g.omt=function(t){var i=t.z6;i&&g.wmt(i).catch(g.mmt)},g.Pmt=function(t){g.ymt(t).catch(g.mmt)},g.umt=function(t){for(var i,n=Ft(g.Nlt);!(i=n()).done;){var r=function(){var i=s.value,n=i.xW;if(void 0===n||0===n.length)return"continue";var r=t.Ey;n.filter(function(t){return t.A8&&Ma(new I(r),new I(t.A8))}).forEach(function(t){i.xmt(t)})},e=i.value.hpt;if(void 0!==e)for(var s,u=Ft(e.rat);!(s=u()).done;)r()}},g.amt=function(t){var i=t.z6;if(i)for(var n,r=Ft(g.pmt);!(n=r()).done;)for(var e,s=n.value,u=Ft(s.Nut.rat);!(e=u()).done;){var o=e.value,h=(o.xW||[]).some(function(t){return t.uH&&Ma(Ea(i),nI(t.uH))});o.olt&&h&&(o.olt=!1,o.kot&&s.Qdt(o.kot))}},g.nV=r,g.Rz=e,g.eut=s,g.TL=i,g.gO=Iw(),g.lmt=[],g.jpt=o,g.imt=h,g.lq=l,g.JU=c,g.Qpt=new PL(i,r,e,s,c,null==(m=null==u||null==(w=u.dash)?void 0:w.segmentRelativeVttTiming)||m),g.Gl=new Mb([g.Qpt.nt]),g._dt=v,g.Npt=d,g.jpt.wn(uM.bot,g.Rs),g.ju=a,g.d3=n,g.Vdt=u.lowLatency,g.wpt=f,g.Ypt=u.abr,g.TL.wn(ch.py,g.omt),g.TL.wn(ch.Pw,g.amt),g.TL.wn(ch.LICENSE_REQUEST_GENERATED,g.umt),g}Pt(i,t);var n=i.prototype;return n.VY=function(t,i){return this.zpt(t,i)},n.zpt=function(t,i){return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:for(n=Ft(t);!(r=n()).done;)e=r.value,this.Gpt(e);return[4,this.Un(i)];case 1:h.sent(),s=Ft(this.jpt.Xpt),h.label=2;case 2:return(u=s()).done?[3,6]:(o=u.value).Km!==cw.NT?[3,5]:o.rat&&0!==o.rat.length?[3,3]:(this.So(new NL("No supported representation found in the AdaptationSet with mimetype : "+o.Km)),[3,5]);case 3:return[4,this.Qpt.sV(o)];case 4:h.sent(),h.label=5;case 5:return[3,2];case 6:return[2]}})}).call(this)},n.Kpt=function(t){return new gU(t,this,this.TL,this.nV,this.Rz,this.eut,this.JU,this.wpt,this.Ypt,this._dt,this.Npt,this.Vdt,this.lq)},n.zot=function(){return this.Nlt.some(function(t){return t.zot()})},n.Wut=function(){return 0!==this.Nlt.length&&this.Nlt.every(function(t){return t.Wut()})},n.gpt=function(){this.Jpt()&&this.So(new BL)},n.Rpt=function(t){if(qv(t)){if(this.d3.Q3)return this.d3.Q3}else if(Xv(t)&&this.d3.K3)return this.d3.K3;throw new p("Cannot allocate source buffer for mime type "+t)},n.Zpt=function(t){t.wn([Jy.ma,ch.Yw,ch.iy,ch.oy,ch.ly,ch.Sw],this.Rs),t.wn($R.lZ,this.$pt),t.wn("qpt",this.Rs)},n.tmt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,ot.all(this.Nlt.map(function(i){return i.kn(t)}))];case 1:return i.sent(),tr(this.Nlt),[2]}})}).call(this)},n.Jpt=function(){if(this.zot())return!1;if(!this.Wut())return!1;var t=this.IP;if(0===t.V)return!1;var i=this.MP;if(this.emt)return t.Tn(t.V-1)<=i;var n=t.Mn(this.qut);if(0===n.V)return!0;var r=n.Tn(n.V-1),e=n.An(n.V-1)+.1;return r<=i&&i<=e},n.Jot=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.hmt?[2]:(this.hmt=!0,[4,ot.all(this.Nlt.map(function(i){return i.Jot(t)}))]);case 1:return i.sent(),[2]}})}).call(this)},n.$ot=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.hmt?(this.hmt=!1,[4,ot.all(this.Nlt.map(function(i){return i.$ot(t)}))]):[2];case 1:return i.sent(),[2]}})}).call(this)},n.kn=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.TL.mn(ch.py,this.omt),this.TL.mn(ch.Pw,this.amt),this.TL.mn(ch.LICENSE_REQUEST_GENERATED,this.umt),this.Vo(),this.jpt.mn(uM.bot,this.Rs),this.cmt.Zg(),this.Dpt?[4,this.Dpt.catch(yn)]:[3,2];case 1:i.sent(),this.Dpt=void 0,i.label=2;case 2:return[4,this.tmt(t)];case 3:return i.sent(),[4,this.Qpt.kn()];case 4:return i.sent(),this.YL.kn(),this.$L.kn(),this.Gl.kn(),this.dmt(),[2]}})}).call(this)},n.Gpt=function(t){this.lmt.push(t),t.wn("fmt",this.vmt);for(var i,n=t.Km===cw.Dk?this.YL:this.$L,r=Ft(t.Z);!(i=r()).done;){var e=i.value;n.tt(e)}},n._mt=function(t){for(var i,n=t.Km===cw.Dk?this.YL:this.$L,r=Ft(t.Z);!(i=r()).done;){var e=i.value;n.it(e),e.kn()}t.kn(),Yn(this.lmt,t)},n.dmt=function(){for(var t=this.lmt.length-1;t>=0;t--)this._mt(this.lmt[t])},n.Un=function(t,i){return this.cmt.Zg(),this.cmt=dr.ep([i]),this.Dpt=br(this.lE(t,this.Dpt,this.cmt.Yg),this.cmt).catch(this.mmt),this.Dpt},n.lE=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:return i?[4,i.catch(yn)]:[3,2];case 1:l.sent(),l.label=2;case 2:yr(n),r=[],e=this.Nlt.slice(),s=t.slice(),tr(this.Nlt),u=Ft(e),l.label=3;case 3:return(o=u()).done?[3,7]:(h=o.value,(a=h.hpt)&&Jn(s,a)?(this.Nlt.push(h),r.push(h.Un(a,n)),Yn(s,a),[3,6]):[3,4]);case 4:return this.Gl.WW(h.nt),[4,h.kn()];case 5:l.sent(),yr(n),l.label=6;case 6:return[3,3];case 7:for(c=Ft(s);!(f=c()).done;)v=f.value,d=this.Kpt(v.Lot),this.Gl.FW(d.nt),this.Nlt.push(d),this.Zpt(d),r.push(d.Un(v,n));return[4,ot.all(r)];case 8:return l.sent(),[2]}})}).call(this)},n.EZ=function(t,i,n){return jt(function(){return zt(this,function(r){switch(r.label){case 0:return this.d3===n?[3,2]:(this.d3=n,[4,this.tmt(!1)]);case 1:r.sent(),r.label=2;case 2:return[4,this.Un(t)];case 3:return r.sent(),this.imt=i,[2]}})}).call(this)},n.wmt=function(t){return jt(function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:i=Ft(this.Nlt),a.label=1;case 1:if((n=i()).done)return[3,6];if(r=n.value,void 0===(e=r.hpt))return[3,5];s=Ft(e.Nut.rat),a.label=2;case 2:return(u=s()).done?[3,5]:(o=u.value,h=o.xW||[],!h.some(function(i){return i.uH&&Ma(Ea(t),nI(i.uH))})||o.olt?[3,4]:(o.olt=!0,[4,r.Gdt(o,o.kot)]));case 3:a.sent(),this.So(new dD(new vw(gd.CONTENT_PROTECTION_OUTPUT_RESTRICTED,"Content unavailable due to DRM restrictions"))),a.label=4;case 4:return[3,2];case 5:return[3,1];case 6:return[2]}})}).call(this)},n.ymt=function(t){return jt(function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:i=Ft(this.Nlt),a.label=1;case 1:if((n=i()).done)return[3,6];if(e=function(){var i,n,e,u;return zt(this,function(o){switch(o.label){case 0:return i=h.value,n=i.xW,e=i.kot,void 0===n||0===n.length||void 0===e?[2,"continue"]:n.some(function(t){return Jn(i.Amt,t)})?(u=r.bmt(n,t.Ty),e.cst===u?[3,3]:u?(s.Qdt(e),[3,3]):[3,1]):[2,"continue"];case 1:return[4,s.Gdt(i,e)];case 2:o.sent(),o.label=3;case 3:return[2]}})},s=n.value,void 0===(u=s.hpt))return[3,5];o=Ft(u.rat),a.label=2;case 2:return(h=o()).done?[3,5]:(r=this,[5,qt(e())]);case 3:a.sent(),a.label=4;case 4:return[3,2];case 5:return[3,1];case 6:return[2]}})}).call(this)},n.bmt=function(t,i){var n=!1,r=t.reduce(function(t,i){return!i.uH||Jn(t,i.uH)?t:[].concat(t,[i.uH])},[]);return 0===r.length||(i.zy(function(e,s){"usable"===e&&((t.some(function(t){return t.uH&&Ma(Ea(s),nI(t.uH))})||La(s,za)&&1===r.length&&1===i.Vy)&&(n=!0))}),n)},n.iat=function(t){var i=function(){var i=r.value,n=Wn(t.Nlt,function(t){return t.B3===i.B3});void 0!==n&&i.iat(n)};if(void 0!==t){var n=t.jpt;if(this.jpt.Smt===n||this.jpt.Tmt===n)for(var r,e=Ft(this.Nlt);!(r=e()).done;)i()}},xt(i,[{key:"jI",get:function(){return this.gO}},{key:"ct",get:function(){return this.TL.ct}},{key:"Rt",get:function(){return this.Nlt.some(function(t){return t.Rt})}},{key:"ht",get:function(){return this.YL}},{key:"IP",get:function(){if(0===this.Nlt.length)return OA.iL();for(var t,i=this.Nlt.map(function(t){return t.IP}),n=OA.tL(0,1/0),r=Ft(i);!(t=r()).done;){var e=t.value;n=n.Mn(e)}if(0===n.V)return n;if(this.Wut()){var s=n.Mn(this.qut);if(0===s.V)return n;for(var u,o=s.An(s.V-1),h=0,a=Ft(this.Nlt);!(u=a()).done;){var c=u.value;h=A.max(h,c._pt)}o<=h&&(n=n.OM(new OA([o,h],[!0,!0])))}return n}},{key:"p8",get:function(){return this.TL.p8}},{key:"MP",get:function(){return this.TL.MP}},{key:"Tpt",get:function(){return this.imt}},{key:"An",get:function(){if(this.emt){var t=this.ct;if(!E(t)&&t!==In)return t}if(!this.Nlt.length)return NaN;for(var i,n=0,r=Ft(this.Nlt);!(i=r()).done;){var e=i.value;n=A.max(n,e.An)}return n}},{key:"emt",get:function(){var t=this.jpt.Idt;if(t.Km===DL.wV)return!1;var i=t.smt;return 0!==i.length&&this.jpt===i[i.length-1]}},{key:"Sx",get:function(){if(!this.Nlt.length)return OA.iL();for(var t,i=OA.eL(),n=Ft(this.Nlt);!(t=n()).done;){var r=t.value;i=i.Mn(r.Sx)}if(i.V>0&&this.emt&&isFinite(this.ct)){var e=this.ct,s=i.An(i.V-1);e>s&&(i=i.OM(OA.tL(s,e).CM()))}return i}},{key:"Mc",get:function(){return this.jpt}},{key:"nt",get:function(){return this.Gl}},{key:"rt",get:function(){return this.$L}},{key:"Ti",get:function(){return this.ju.Ti}},{key:"Mi",get:function(){return this.ju.Mi}},{key:"QW",get:function(){var t=this.MP,i=this.IP,n=i.VM(t);if(-1!==n)return{Tn:i.Tn(n),An:i.An(n)}}},{key:"qut",get:function(){var t=this.jpt.Tn,i=this.emt?1/0:this.jpt.An;return OA.tL(t,i)}},{key:"nmt",get:function(){return this.hmt}},{key:"gmt",get:function(){return this.lmt.map(function(t){return t.hpt}).filter(Fi)}},{key:"pmt",get:function(){return this.Nlt.map(function(t){return t.hpt}).filter(Fi)}},{key:"kmt",get:function(){return this.lmt}}]),i}(uh);V(),It(),Wt(),Bt(),Yt(),V(),It(),Ut(),V(),It(),Bt();var pU=/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d*\.?\d*)S)?)?$/,_U=function(){function t(t){this.Imt=void 0,this.Imt=t}var i=t.prototype;return i.Rmt=function(){return this.Imt},i.Cmt=function(){return 1e3*this.Imt},t.TD=function(i){var n=i.match(pU);if(!n)throw new p("The given value could not be parsed as a valid DateTimeInterval");return new t(31536e3*(Number(n[1])||0)+2592e3*(Number(n[2])||0)+86400*(Number(n[3])||0)+3600*(Number(n[4])||0)+60*(Number(n[5])||0)+(Number(n[6])||0))},xt(t,[{key:"ift",get:function(){return Sm.eU(this.Imt,1e3)}}]),t}();V(),It();var kU=function(t){return t.Dmt="progressive",t.Bmt="interlaced",t.pk="unknown",t}({});V(),It();var bU=function(){function t(t,i){this.Nmt=void 0,this.Mmt=void 0,this.Nmt=t,this.Mmt=i}return t.prototype.iF=function(){return this.Nmt/this.Mmt},t}();V(),It();var AU=1886614376;function TU(t){var i=nI(mo),n=t.byteLength,r=12+i.length+4+n,e=new I(r),s=Aa(e),u=new Pa;return Jh(s,u,r),Jh(s,u,AU),Jh(s,u,0),qh(s,u,i),Jh(s,u,n),qh(s,u,new I(t)),e}var SU=/^(?:true|false)$/i,EU=/^(-?)(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:Z|([+-])(\d{2}):(\d{2}))?$/;function IU(t){if(void 0!==t)return _U.TD(t)}function RU(t){if(void 0!==t){var i=t.match(EU);if(!i)throw new p("The given value could not be parsed as a valid Date");var n=i[1],r=i[2],e=i[3],s=i[4],u=i[5],o=i[6],h=i[7],a=i[8],c=i[9],f=i[10],v=i[11],d=("-"===n?-1:1)*Number(r),l=Number(e)-1,g=Number(s),w=Number(u),m=Number(o),y=Number(h),_=Number("0."+(a||"")),k=A.round(1e3*_);if(c)m-=("-"===c?-1:1)*(60*Number(f)+Number(v));var b=new Date(Date.UTC(d,l,g,w,m,y,k));if(E(b.getTime()))throw new p("The given value could not be parsed as a valid Date");return b}}function CU(t){if(t){var i=/(\d+)-(\d+)/.exec(t);if(i)return[NU(i[1]),NU(i[2])]}}function PU(t){if(void 0!==t){if(!E(Number(t)))try{return fe.fromString(t,!0)}catch(t){}throw new p("The given value could not be parsed as a valid unsigned long")}}function NU(t){if(void 0!==t){var i=Number(t);if(!E(i))return i;throw new p("The given value could not be parsed as a valid Number")}}function DU(t){if(void 0!==t){var i=t.split("/"),n=Number(i[0]),r=Number(i[1]||1);if(!E(n)&&!E(r))return new bU(n,r);throw new p("The given value could not be parsed as a valid frame rate")}}function xU(t){if(void 0!==t){if(SU.test(t))return"true"===t.toLowerCase();if(!E(T(t)))return Boolean(T(t));throw new p("The given value could not be parsed as a valid Boolean.")}}function BU(t){return{Yu:t.eP,Lmt:xU(t.sP("availabilityTimeComplete")),Omt:NU(t.sP("availabilityTimeOffset"))}}function OU(t){return t.map(BU)}function MU(t){var i,n=XU(t),r=function(t,i,n,r){var e=t.nP(n,i);return void 0===e&&(e=t.sP(r+":"+i)),e}(t,"default_KID","urn:mpeg:cenc:2013","cenc"),e=xy(t,"pssh","urn:mpeg:cenc:2013","cenc")[0];if(void 0!==e&&(i=ja(e.eP)),!i){var s=xy(t,"pro","urn:microsoft:playready","mspr")[0];void 0!==s&&(i=function(t){var i=ja(t.eP);return TU(i)}(s))}return{uH:r,A8:i,y8:n.y8,zE:n.zE}}function LU(t){return{Fmt:t.sP("sourceURL"),Sat:CU(t.sP("range"))}}function FU(t,i){var n=t.sP("d"),r=t.sP("t"),e=NU(t.sP("r"));i.push({ct:n,EO:r,Umt:e})}function UU(t){return{aut:t.sP("index"),Vmt:CU(t.sP("indexRange")),KD:t.sP("media"),Hmt:CU(t.sP("mediaRange"))}}function VU(t){var i=HU(t),n=function(t){var i=t.map(UU);return i.length>0?i:void 0}(t.YE("SegmentURL"));return io({},i,{Wmt:n,qmt:t.sP("xlink:href"),zmt:t.sP("xlink:actuate")})}function jU(t){var i=xU(t.sP("availabilityTimeComplete")),n=NU(t.sP("availabilityTimeOffset")),r=CU(t.sP("indexRange")),e=xU(t.sP("indexRangeExact")),s=t.YE("Initialization");if(s.length>1)throw new p("The provided MPEG-DASH document's "+t.JE+" element can not have more than one Initialization element.");var u=1===s.length?LU(s[0]):void 0,o=PU(t.sP("presentationTimeOffset")),h=t.YE("RepresentationIndex");if(h.length>1)throw new p("The provided MPEG-DASH document's "+t.JE+" element can not have more than one RepresentationIndex element.");return{Lmt:i,Omt:n,Vmt:r,Gmt:e,Xmt:u,jmt:o,Qmt:1===h.length?LU(h[0]):void 0,Kmt:IU(t.sP("timeShiftBufferDepth")),qD:NU(t.sP("timescale"))}}function HU(t){var i=jU(t),n=t.YE("BitstreamSwitching"),r=n.length>0?LU(n[0]):void 0,e=NU(t.sP("duration")),s=t.YE("SegmentTimeline");if(s.length>1)throw new p("The provided MPEG-DASH document's "+t.JE+" element can not have more than one SegmentTimeline element.");var u=1===s.length?function(t){for(var i,n=[],r=Ft(t.YE("S"));!(i=r()).done;)FU(i.value,n);return n}(s[0]):void 0;return io({},i,{Ymt:r,ct:e,$rt:u,Jmt:NU(t.sP("startNumber")),Zmt:NU(t.sP("endNumber"))})}function WU(t){return{$mt:function(t){if(t){var i=t.split(/\s/);return i.length>1?(i.length=2,i.map(NU)):1===i.length?i.map(NU)[0]:void 0}}(t.sP("audioSamplingRate")),frt:t.sP("codecs"),twt:xU(t.sP("codingDependency")),xW:function(t){if(0!==t.length)return t.map(MU)}(t.YE("ContentProtection")),iwt:function(t){return t.map(GU)}(t.YE("EssentialProperty")),ewt:function(t){return t.map(QU)}(t.YE("SupplementalProperty")),plt:DU(t.sP("frameRate")),Mi:NU(t.sP("height")),swt:NU(t.sP("maxPlayoutRate")),nwt:NU(t.sP("maximumSAPPeriod")),oQ:t.sP("mimeType"),rwt:t.sP("profiles"),hwt:t.sP("sar"),owt:function(t){switch(t){case kU.Dmt:case kU.Bmt:case kU.pk:return t;default:return}}(t.sP("scanType")),awt:t.sP("segmentProfiles"),uwt:NU(t.sP("startWithSAP")),Ti:NU(t.sP("width"))}}function zU(t){var i=OU(t.YE("BaseURL")),n=t.YE("SegmentBase");if(n.length>1)throw new p("The provided MPEG-DASH document's "+t.VE+" element can not have more than one SegmentBase element.");var r=1===n.length?jU(n[0]):void 0,e=function(t){var i=t.map(VU);return i.length>0?i:void 0}(t.YE("SegmentList")),s=t.YE("SegmentTemplate");if(s.length>1)throw new p("The provided MPEG-DASH document's "+t.VE+" element can not have more than one SegmentTemplate element.");var u=1===s.length?function(t){return io({},HU(t),{cwt:t.sP("bitstreamSwitching"),dwt:t.sP("index"),lwt:t.sP("initialization"),fwt:t.sP("media")})}(s[0]):void 0;return{vwt:i,_wt:r,gwt:e,pwt:u}}function qU(t){var i=WU(t),n=zU(t),r=NU(t.sP("bandwidth")),e=t.sP("dependencyId"),s=t.sP("id"),u=t.sP("mediaStreamStructureId"),o=NU(t.sP("qualityRanking"));if(t.YE("SegmentBase").length>1)throw new p("The provided MPEG-DASH document's Representation element can not have more than one SegmentBase element.");return io({},i,n,{kW:r,mwt:e,o:s,wwt:u,ywt:o})}function XU(t){return{y8:t.sP("schemeIdUri"),zE:t.sP("value")}}function GU(t){return XU(t)}function QU(t){return XU(t)}function YU(t){return XU(t)}function $U(t){return XU(t)}function KU(t){var i,n=WU(t),r=zU(t),e=function(t){return t.map($U)}(t.YE("Accessibility")),s=xU(t.sP("bitstreamSwitching")),u=t.sP("contentType"),o=NU(t.sP("group")),h=NU(t.sP("id")),a=(null==(i=t.YE("Label")[0])?void 0:i.eP)||"",c=t.sP("lang"),f=NU(t.sP("maxBandwidth")),v=DU(t.sP("maxFrameRate")),d=NU(t.sP("maxHeight")),l=NU(t.sP("maxWidth")),g=NU(t.sP("minBandwidth")),w=DU(t.sP("minFrameRate")),m=NU(t.sP("minHeight")),y=NU(t.sP("minWidth")),_=t.sP("par"),k=function(t){return t.map(qU)}(t.YE("Representation"));if(0===k.length)throw new p("The provided MPEG-DASH document has an AdaptationSet with no valid Representation's");var b,A=function(t){return t.map(YU)}(t.YE("Role")),T=xU(t.sP("segmentAlignment"))||!1,S=NU(t.sP("selectionPriority")),E=S||1,I=xU(t.sP("subsegmentAlignment"))||!1;try{b=NU(t.sP("subsegmentStartsWithSAP"))}catch(t){}return io({},n,r,{Wdt:e,Ymt:s,qT:u,Jdt:o,o:h,Th:a,bs:c,Awt:f,bwt:v,Swt:d,Twt:l,kwt:g,Ewt:w,Pwt:m,xwt:y,Iwt:_,rat:k,Plt:A,Rwt:T,Kq:E,Cwt:I,Dwt:b,Bwt:t.sP("xlink:actuate")||"onRequest",Nwt:t.sP("xlink:href")})}function JU(t){var i=PU(t.sP("presentationTime"))||fe.ZERO,n=PU(t.sP("duration")),r=NU(t.sP("id")),e=function(t){for(var i=t.iP,n={},r=0;r1)throw new p("The provided MPEG-DASH document's Period element can not have more than one AssetIdentifier element.");var r=1===n.length?function(t){return XU(t)}(n[0]):void 0,e=function(t){return t.map(KU)}(t.YE("AdaptationSet")),s=xU(t.sP("bitstreamSwitching")),u=IU(t.sP("duration")),o=function(t){return t.map(ZU)}(t.YE("EventStream")),h=t.sP("id"),a=IU(t.sP("start")),c=(t.YE("Subset"),t.sP("xlink:href"));return io({},i,{Ilt:e,Mwt:r,Ymt:s,ct:u,Lwt:o,o:h,Tn:a,Bwt:t.sP("xlink:actuate"),Nwt:c})}function iV(t){var i=t.sP("schemeIdUri");if(i)return{y8:i,zE:t.sP("value")}}function nV(t,i){var n=RU(t.sP("availabilityEndTime")),r=RU(t.sP("availabilityStartTime")),e=OU(t.YE("BaseURL")),s=t.sP("id"),u=function(t){return t.map(function(t){return""+t.eP})}(t.YE("Location")),o=IU(t.sP("maxSegmentDuration")),h=IU(t.sP("maxSubsegmentDuration")),a=IU(t.sP("mediaPresentationDuration")),c=(t.YE("Metrics"),IU(t.sP("minBufferTime")));if(!c)throw new p("The provided MPEG-DASH document's MPD element does not have the required 'minimumBufferTime' attribute.");var f=IU(t.sP("minimumUpdatePeriod")),v=function(t){return t.map(function(t){return tV(t)})}(t.YE("Period"));if(!v.length)throw new p("The provided MPEG-DASH document's MPD element does not have the required 'Period' element.");var d=t.sP("profiles");if(!d)throw new p("The provided MPEG-DASH document's MPD element does not have the required 'profiles' attribute.");var l=RU(t.sP("publishTime")),g=IU(t.sP("suggestedPresentationDelay")),w=IU(t.sP("timeShiftBufferDepth")),m=function(t){switch(t){case DL.mV:case DL.wV:return t;default:return}}(t.sP("type")),y=function(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){var e=iV(i.value);e&&n.push(e)}return n}(t.YE("UTCTiming")),_=function(t){if(0===t.length)return;var i=t[0],n=i.YE("Latency");if(0===n.length)return;var r=function(t){var i=t[0],n=NU(i.sP("target"));if(void 0===n)return;var r=NU(i.sP("min")),e=NU(i.sP("max"));return{Owt:n,YF:r,KF:e}}(n);if(void 0===r)return;var e=function(t){if(0===t.length)return;var i=t[0],n=NU(i.sP("max")),r=NU(i.sP("min"));return{YF:r,KF:n}}(i.YE("PlaybackRate"));return{Fwt:r,ux:e}}(t.YE("ServiceDescription"));return{Uwt:n,Vwt:r,vwt:e,o:s,Hwt:u,Wwt:i,qwt:o,zwt:h,Gwt:a,Xwt:c,Qwt:f,smt:v,rwt:d,Kwt:l,Ywt:g,Kmt:w,Km:m,Jwt:y,Zwt:_}}var rV=function(){function t(){}return t.prototype.$wt=function(t,i){return function(t,i){if(!t)throw new p("The provided MPEG-DASH document does not contain a valid MPD root element.");return nV(t,i)}(Vi.UE(t).uP,i)},t}();function eV(t){return{get bandwidth(){return t.kW},get codecs(){return t.frt},get id(){return t.o},get uid(){return t.jI},get name(){return t.Th},get averageBandwidth(){return t.tyt},get label(){return t.Th},set label(i){t.Th=Jg(i)},get available(){return t.cst},get score(){return t.iyt},addEventListener:function(i,n){t.wn(i,n)},removeEventListener:function(i,n){t.mn(i,n)}}}function sV(t){return jg(eV(t),{get height(){return t.Mi},get width(){return t.Ti},get frameRate(){return t.plt},get firstFrame(){return t.eyt}})}function uV(t){return jg(eV(t),{get audioSamplingRate(){return t.$mt}})}V(),It(),Bt(),V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt(),V(),It(),V(),It(),Nt();var oV=function(t){function i(i){var n;return(n=t.call(this,"update")||this).quality=void 0,n.quality=i,n}return Pt(i,t),i}(ah),hV=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).o=void 0,u.kW=void 0,u.frt=void 0,u.nyt=void 0,u.jI=void 0,u.pO=void 0,u.syt=void 0,u.o=i,u.kW=n,u.frt=r,u.nyt=s,u.jI=Pw(),u.pO=e||"",u.syt=!0,u}Pt(i,t);var n=i.prototype;return n.QU=function(){this.syt=!1,this.So(new oV(this.Ca))},n.jU=function(){this.syt=!0,this.So(new oV(this.Ca))},xt(i,[{key:"Th",get:function(){return this.pO},set:function(t){this.pO!==t&&(this.pO=t,this.So(new oV(this.Ca)))}},{key:"tyt",get:function(){}},{key:"cst",get:function(){return this.syt}},{key:"iyt",get:function(){}}]),i}(uh),aV=function(t){function i(i,n,r,e,s,u,o,h,a){var c;return void 0===a&&(a=0),(c=t.call(this,i,n,r,e,s)||this).plt=void 0,c.Ti=void 0,c.Mi=void 0,c.eyt=void 0,c.hu=void 0,c.plt=u,c.Ti=o,c.Mi=h,c.eyt=a,c.hu=void 0,c}return Pt(i,t),xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=sV(this)),this.hu}}]),i}(hV),cV=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,r,e,s)||this).$mt=void 0,o.hu=void 0,o.$mt=u,o.hu=void 0,o}return Pt(i,t),xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=uV(this)),this.hu}}]),i}(hV);V(),It(),V(),It(),Bt(),Nt();var fV=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).ayt=function(t){i.So(t)},i}return Pt(i,t),xt(i,[{key:"ryt",get:function(){var t=this.hyt();return null==t?void 0:t.Tn}},{key:"oyt",get:function(){var t=this.hyt();return null==t?void 0:t.An}}]),i}(uh),vV=function(t){function i(i,n){var r;if((r=t.call(this)||this).Kot=void 0,r.hu=void 0,r.uyt=void 0,r.vyt=void 0,r.lyt=void 0,r.gyt=!1,r.pyt=!1,r.dyt=[],r.Kot=i,r.uyt=n,r.uyt.wn(uM.yot,r.ayt),r.Km===cw.Bk){var e,s,u=null!=(s=null==(e=r.plt)?void 0:e.iF())?s:NaN;r.vyt=new aV(r.o,r.kW,r.Np,"","",u,r.Ti,r.Mi)}else r.Km===cw.Dk?r.vyt=new cV(r.o,r.kW,r.Np,"","",r.$mt):r.vyt=void 0;return r}Pt(i,t);var n=i.prototype;return n.Nct=function(t){var i=AM(t)?this.uyt.myt(t):this.uyt.Nct(t);return{Yu:i.Yu,Sat:i.Sat,zk:this.Idt.zk}},n.wyt=function(){return this.uyt.wyt()},n.hyt=function(){return this.uyt.hyt()},n.yyt=function(){return this.uyt.yyt()},n.kct=function(t){return this.uyt.kct(t)},n.Pct=function(t,i,n){return this.uyt.Pct(t,this.Idt.zk,i,n)},n.pdt=function(t){return AM(t)?this.$rt.Ayt(t,this.uyt):this.$rt.pdt(t)},n.mct=function(t){return AM(t)?this.$rt.byt(t,this.uyt):this.$rt.mct(t)},n.xmt=function(t){Jn(this.dyt,t)||this.dyt.push(t)},n.kn=function(){this.uyt.mn(uM.yot,this.ayt),this.dyt=[]},xt(i,[{key:"Nut",get:function(){return this.Kot}},{key:"$mt",get:function(){var t;return null!=(t=this.uyt.ck.$mt)?t:this.Nut.$mt}},{key:"kW",get:function(){return this.uyt.ck.kW||0}},{key:"frt",get:function(){var t=this.uyt.ck;return t.frt?[t.frt]:this.Nut.frt}},{key:"cyt",get:function(){var t=this.uyt.ck;return t.frt?[t.frt]:[]}},{key:"Np",get:function(){return this.uyt.ck.frt||this.Nut.Np}},{key:"twt",get:function(){return this.uyt.ck.twt||this.Nut.twt}},{key:"xW",get:function(){return this.uyt.ck.xW||this.Nut.xW}},{key:"Amt",get:function(){return this.dyt}},{key:"qT",get:function(){return this.oQ+'; codecs="'+this.Np+'"'}},{key:"iwt",get:function(){var t=this.uyt.ck;return t.iwt.length?t.iwt:this.Nut.iwt}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{get id(){return t.o},get type(){return t.Km},get bandwidth(){return t.kW},get width(){return t.Ti},get height(){return t.Mi},get frameRate(){var i,n;return null!=(n=null==(i=t.plt)?void 0:i.iF())?n:NaN},get audioSamplingRate(){return t.$mt}}}(this))}},{key:"plt",get:function(){var t;return null!=(t=this.uyt.ck.plt)?t:this.Nut.plt}},{key:"Mi",get:function(){return this.uyt.ck.Mi||this.Nut.Mi}},{key:"o",get:function(){return this.uyt.ck.o||""}},{key:"Bdt",get:function(){return this.lyt},set:function(t){this.lyt=t}},{key:"Ddt",get:function(){var t=this.uyt.fyt();if(t)return{Yu:t.Yu,Sat:t.Sat,zk:this.Idt.zk}}},{key:"swt",get:function(){return this.uyt.ck.swt||this.Nut.swt||1}},{key:"nwt",get:function(){return this.uyt.ck.nwt||this.Nut.nwt}},{key:"Idt",get:function(){return this.wct.Idt}},{key:"oQ",get:function(){return this.uyt.ck.oQ||this.Nut.oQ}},{key:"wct",get:function(){return this.Nut.wct}},{key:"rwt",get:function(){return this.uyt.ck.rwt||this.Nut.rwt}},{key:"kot",get:function(){return this.vyt}},{key:"hwt",get:function(){return this.uyt.ck.hwt||this.Nut.hwt}},{key:"owt",get:function(){return this.uyt.ck.owt||this.Nut.owt}},{key:"_yt",get:function(){return this.uyt._yt}},{key:"awt",get:function(){return this.uyt.ck.awt||this.Nut.awt}},{key:"$rt",get:function(){return this.uyt.$rt}},{key:"uwt",get:function(){return this.uyt.ck.uwt||this.Nut.uwt}},{key:"Km",get:function(){var t=this.oQ.split("/")[0];return"application"===t||"text"===t||lp(this.oQ,this.frt)?cw.NT:"video"===t?cw.Bk:"audio"===t?cw.Dk:"image"===t?cw.Nk:cw.pk}},{key:"Ti",get:function(){return this.uyt.ck.Ti||this.Nut.Ti}},{key:"Sct",get:function(){return this.gyt},set:function(t){this.gyt=t}},{key:"olt",get:function(){return this.pyt},set:function(t){this.pyt=t}}]),i}(fV),dV=function(t){function i(i,n){var r;return(r=t.call(this)||this).uyt=void 0,r.jpt=void 0,r.elt=[],r.jpt=i,r.uyt=n,r.uyt.wn(uM.yot,r.ayt),r}Pt(i,t);var n=i.prototype;return n.er=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return n=this,0!==this.elt.length?[3,2]:(r=this.uyt.rat.map(function(r){return n.Tyt(r,t,i)}),e=this,[4,ot.all(r)]);case 1:e.elt=s.sent().filter(Fi),s.label=2;case 2:return this.kyt(),[2]}})}).call(this)},n.Tyt=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return r=new vV(this,t),[4,i(r)];case 1:return e=s.sent(),yr(n),e?[2,r]:[2,void 0]}})}).call(this)},n.kyt=function(){if(!this.elt.length)throw new p("Detected an AdaptationSet without any supported Representations.")},n.hyt=function(){return this.uyt.hyt()},n.yyt=function(){return this.uyt.yyt()},n.kn=function(){this.uyt.mn(uM.yot,this.ayt);for(var t,i=Ft(this.elt);!(t=i()).done;){t.value.kn()}tr(this.elt)},xt(i,[{key:"Wdt",get:function(){return this.uyt.ck.Wdt}},{key:"$mt",get:function(){var t;return null!=(t=this.uyt.ck.$mt)?t:-1}},{key:"frt",get:function(){if(this.uyt.ck.frt)return[this.uyt.ck.frt];for(var t,i=[],n=Ft(this.rat);!(t=n()).done;){var r=t.value;r.cyt.length&&-1===i.indexOf(r.Np)&&i.push(r.Np)}return i}},{key:"Np",get:function(){return this.frt.join()}},{key:"twt",get:function(){return this.uyt.ck.twt}},{key:"xW",get:function(){return this.uyt.ck.xW}},{key:"qT",get:function(){return this.oQ+'; codecs="'+this.Np+'"'}},{key:"iwt",get:function(){return this.uyt.iwt}},{key:"ewt",get:function(){return this.uyt.ewt}},{key:"plt",get:function(){return this.uyt.ck.plt}},{key:"Jdt",get:function(){return this.uyt.ck.Jdt}},{key:"Mi",get:function(){return this.uyt.ck.Mi||0}},{key:"o",get:function(){return this.uyt.ck.o}},{key:"Th",get:function(){return this.uyt.ck.Th||""}},{key:"swt",get:function(){return this.uyt.ck.swt}},{key:"nwt",get:function(){return this.uyt.ck.nwt}},{key:"Idt",get:function(){return this.wct.Idt}},{key:"oQ",get:function(){return this.uyt.ck.oQ||this.elt[0].oQ}},{key:"wct",get:function(){return this.jpt}},{key:"rwt",get:function(){return this.uyt.ck.rwt}},{key:"rat",get:function(){return this.elt}},{key:"Plt",get:function(){return this.uyt.ck.Plt||[]}},{key:"hwt",get:function(){return this.uyt.ck.hwt}},{key:"owt",get:function(){return this.uyt.ck.owt}},{key:"awt",get:function(){return this.uyt.ck.awt}},{key:"Kq",get:function(){return this.uyt.ck.Kq}},{key:"uwt",get:function(){return this.uyt.ck.uwt}},{key:"Km",get:function(){var t=(this.uyt.ck.qT||this.oQ).split("/")[0];return"application"===t||"text"===t||"subtitle"===t||lp(this.oQ,this.frt)?cw.NT:"video"===t?cw.Bk:"audio"===t?cw.Dk:"image"===t?cw.Nk:cw.pk}},{key:"Ti",get:function(){return this.uyt.ck.Ti||0}},{key:"rit",get:function(){return this.uyt.ck.bs||""}},{key:"blt",get:function(){return this.ryt}},{key:"Alt",get:function(){var t=this.blt,i=this.oyt;if(void 0!==t&&void 0!==i){var n=A.min(i,this.Idt.Syt);return A.max(t,n)}}}]),i}(fV);function lV(t,i){for(var n,r=[],e=Ft(i);!(n=e()).done;)for(var s,u=n.value,o=Ft(t);!(s=o()).done;){var h=s.value;r.push(Vi.Dh(h,u))}return r}V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt(),Nt(),Ut(),V(),It(),Ut(),V(),It(),Bt(),Nt(),H(),V(),It(),Bt(),Nt(),H(),V(),It(),Nt(),V(),It(),Bt();var gV=function(){function t(t,i){this.jpt=void 0,this.zyt=void 0,this.HA=void 0,this.Wyt=void 0,this.Yyt=void 0,this.jpt=t,this.zyt=i,this.HA=i.qD,this.Wyt=i.Omt,this.Yyt=i.jmt}var i=t.prototype;return i.Eyt=function(t){var i=t-this.jpt.Tn;if(!(i<0||i>=this.jpt.ct)){var n=this.Pyt();return void 0!==n&&Pn(n,i,1e-5)?this.xyt():this.Iyt(i)}},i.Tct=function(t){var i=t-this.jpt.Tn;if(!(i<0))return this.Ryt(A.min(i,this.jpt.ct))},i.xyt=function(){return this.Cyt(0)},i.Dyt=function(){var t=this.jpt.ct;if(isFinite(t))return this.Ryt(t)},i.wyt=function(t){if(this.jpt.Myt.Km===DL.wV){if(this.Byt){var i=this.xyt(),n=this.Lyt();if(void 0===i||void 0===n)return;return{Oyt:t,Fyt:i,Uyt:n}}var r=this.Vyt(t);if(!r)return;return{Oyt:t,Fyt:this.Hyt(t),Uyt:r}}var e=this.xyt();if(e)return{Oyt:t,Fyt:e,Uyt:this.Dyt()}},i.yyt=function(t,i){if(i){var n=this.Rdt(i.Fyt),r=this.Cct(i.Uyt);if(r){var e=this.Cdt(r);(!n||e.getTime()i.getTime();)n=this.Rct(n);if(n){var r=this.Rdt(n);if(r&&r.getTime()<=i.getTime()){var e=this.Rct(n);for(e&&this.Udt(e,i)&&(n=e);n;){if(this.Cdt(n).getTime()>i.getTime())return;if(this.Udt(n,i))break;n=this.Cct(n)}if(!n)return}return n}},i.Udt=function(t,i){if(this.Byt)return!0;if(this.Cdt(t).getTime()>i.getTime())return!1;var n=this.Rdt(t);return!(n&&i.getTime()>=n.getTime())},i.Gyt=function(t,i){if(this.Byt)return!0;if(this.Xyt(t).getTime()>i.getTime())return!1;var n=this.Rdt(t);return!(n&&i.getTime()>=n.getTime())},i.jyt=function(t,i,n){var r=pe(i,this.HA)+this.jpt.Tn;return{aut:t,Qyt:i,EO:r,ct:n,PO:r+n}},i.Xyt=function(t){return this.jpt.Myt.Km===DL.wV?new Date(this.jpt.Myt.Vwt.getTime()+1e3*(t.EO+t.ct)):this.jpt.Myt.Vwt},i.Cdt=function(t){var i=this.Xyt(t);return this.jpt.Myt.Km===DL.wV?new Date(i.getTime()-1e3*this.Wyt):i},i.Rdt=function(t){var i=1/0;if(this.jpt.Myt.Km===DL.wV){var n=this.zyt.Kmt;n&&(i=this.Xyt(t).getTime()+1e3*t.ct+n.Cmt())}var r=this.jpt.Myt.Uwt;return r&&(i=A.min(i,r.getTime())),i===1/0?void 0:new Date(i)},i.Kyt=function(t,i){return t.aut+i},i.kct=function(t){return!1},i.Pct=function(t,i,n,r,e){var s=this.Jyt(t);if(!s)return ot.reject(new p("Invalid segment"));var u=this.Zyt(s.aut,i);return u?ot.resolve(u):kr(this.$yt(s.aut,i,n,r),e)},i.Zyt=function(t,i){},i.$yt=function(t,i,n,r){return ot.reject(new p("Not supported"))},i.Rct=function(t){var i=this.Jyt(t);if(i)return this.Cyt(i.aut-1)},i.Cct=function(t){var i=this.Jyt(t);if(i)return this.Cyt(i.aut+1)},i.Jyt=function(t){var i=this.Cyt(t.aut);if(i&&i.EO===t.EO)return i;var n=this.Eyt(t.EO);return n&&n.EO===t.EO?n:void 0},i.tAt=function(t,i){var n=this.xct(t);if(n&&this.kct(n.aut)){var r=this.Zyt(n.aut,i);if(r)return r.tAt(t)}},i.xct=function(t){return this.Cyt(t.iAt)},i.pdt=function(t){var i=this.Jyt(t);return!!i&&0===i.aut},i.Ayt=function(t,i){var n=this.tAt(t,i);return!!n&&0===n.hut},i.mct=function(t){var i=this.Jyt(t);if(!i)return!1;var n=this.Dyt();return!!n&&i.aut===n.aut},i.byt=function(t,i){var n=this.tAt(t,i);if(!n)return!1;var r=this.Dyt();if(!r||n.iAt!==r.aut)return!1;var e=this.Zyt(n.iAt,i);return n.hut+1===e.V},i.zg=function(){},xt(t,[{key:"Byt",get:function(){return this.jpt.Myt.Nyt&&void 0!==this.Lyt()}},{key:"bU",get:function(){return this.jpt.Tn-pe(this.Yyt,this.HA)}},{key:"jmt",get:function(){return pe(this.Yyt,this.HA)}}]),t}(),wV=function(t){function i(i,n){var r;(r=t.call(this,n,i)||this).nAt=void 0,r.eAt=void 0;var e=i.oAt,s=i.ct;if(void 0===e||void 0===s)throw new p("MultipleSegmentBase does not have a segment duration specified.");return r.eAt=e,r.nAt=s,r}Pt(i,t);var n=i.prototype;return n.Cyt=function(t){if(!(t<0)){var i=this.eAt.multiply(t),n=pe(i,this.HA),r=this.jpt.ct;if(!(n>=r)){var e=this.sAt();if(void 0!==e){if(t>e)return;if(t===e&&isFinite(r))return this.jyt(t,i,r-n)}return isFinite(r)&&n+this.nAt>r?this.jyt(t,i,r-n):this.jyt(t,i,this.nAt)}}},n.Pyt=function(){return 0},n.Iyt=function(t){var i=A.floor(t/this.nAt),n=this.sAt();return void 0!==n&&i>=n?this.Cyt(n):this.Cyt(i)},n.Ryt=function(t){if(t>=this.jpt.ct){var i=A.ceil(this.jpt.ct/this.nAt)-1,n=this.sAt();return void 0!==n&&i>=n?this.Cyt(n):this.Cyt(i)}return this.Iyt(t)},n.sAt=function(){var t,i=this.zyt.Zmt;if(void 0!==i)return i-(null!=(t=this.zyt.Jmt)?t:1);var n=this.zyt.rAt;return void 0!==n&&n>0?n-1:void 0},n.Lyt=function(){if(isFinite(this.jpt.ct))return this.Dyt()},n.hAt=function(t,i){return this.eAt.multiply(t.aut+(i-1))},n.er=function(){},i}(gV);function mV(t,i,n){var r=i.length;if(0===r)return-1;for(var e=0,s=r-1,u=t.aAt(i[e]),o=t.uAt(i[s]);e<=s&&t.cAt(u,n)<=0&&t.cAt(n,o)<0;){var h=e+A.floor(t.dAt(n,u,o)*(s-e)),a=i[h],c=t.aAt(a),f=h+10)return pe(this.fAt[0].EO,this.HA)},n.Iyt=function(t){if(this._At&&pe(this._At.EO,this.HA)<=t){var i=pe(this._At.EO,this.HA),n=pe(this._At.ct,this.HA),r=A.floor((t-i)/n);return this.vAt(r)}if(this.fAt.length>0&&Pn(t,pe(this.fAt[0].EO,this.HA),1e-5))return this.fAt[0].$at;var e=yV(this.fAt,fe.fromNumber(t*this.HA));return e<0?void 0:this.fAt[e].$at},n.Ryt=function(t){if(!this._At&&this.fAt.length>0){var i=this.fAt[this.fAt.length-1];if(function(t,i,n){return Vn(t,i,n)>=0}(t,pe(i.PO,this.HA),1e-5))return i.$at}var n=this.Pyt();return n&&t=s)){var u=this.fAt.length+t,o=A.min(pe(n,this.HA),e+s);return this.jyt(u,r,o)}}},n.gAt=function(t){return t.Qyt.add(this.Yyt)},n.er=function(){var t=this.zyt.ck.$rt;if(!t)throw new p("MultipleSegmentBaseTO does not have a SegmentTimeline specified.");this.pAt(t)},n.pAt=function(t){var i=this.Yyt;this.mAt(t,i);var n=this.wAt(t);this.yAt(t,i,n.AAt,n.iAt)},n.mAt=function(t,i){var n=this.fAt;if(0===t.length)tr(n);else{for(var r=t[0],e=0,s=pe(r.EO?fe.fromString(r.EO,!1).subtract(i):fe.ZERO,this.HA);e0&&n.splice(0,e)}},n.wAt=function(t){for(var i=this.fAt,n=this.Hgt,r=0,e=0;r=i.length)break;if(i[u].EO.greaterThanOrEqual(n))break;if(i[e].$at.aut===e)e=u+1;else for(;e<=u;)i[e].$at.aut=e,e++;0,r++}return{AAt:r,iAt:e}},n.yAt=function(t,i,n,r){for(var e,s=this.fAt,u=n,o=r;u0){var v=s[o-1];v.PO.greaterThan(f)&&(v.ct=f.subtract(v.EO),v.PO=v.EO.add(v.ct))}}else f=o>0?s[o-1].PO:fe.ZERO;if(c<0){if(u+1===t.length){e={EO:f,ct:a};break}for(var d=fe.fromString(t[u+1].EO,!1).subtract(i);f.lessThan(d);){var l=f.add(a);this.bAt(s,o,f,a,l),f=l,o++}}else for(var g=o+c;o<=g;){var w=f.add(a);this.bAt(s,o,f,a,w),f=w,o++}u++}o0&&(this.Hgt=s[s.length-1].EO),this._At=e},n.bAt=function(t,i,n,r,e){if(i=0&&t0){var n=this.DAt[0];if(i<=pe(n.EO,this.qD))return this.BAt(n)}var r=yV(this.DAt,fe.fromNumber(i*this.qD));if(!(r<0))return this.BAt(this.DAt[r])},n.Ect=function(t){var i=this.NAt(t),n=Qn(this.DAt,-1);return void 0!==n&&i>=pe(n.PO,this.qD)?this.BAt(n):this.CAt(t)},n.BAt=function(t){var i=pe(t.EO,this.qD)-this.jmt,n=i+this.MAt,r=pe(t.ct,this.qD);return{iAt:this.iAt,hut:t.aut,EO:n,Qyt:fe.fromNumber(i*this.qD),ct:r,PO:n+r,LAt:[t.OAt,t.FAt]}},n.NAt=function(t){return t-this.MAt+this.jmt},xt(i,[{key:"V",get:function(){return this.DAt.length}}]),i}(RV);V(),It(),Ut(),V(),It(),V(),It(),Ut();var PV=function(){function t(t){this.ck=void 0,this.KC=void 0,this.ck=t,this.KC=new Pa}var i=t.prototype;return i.agt=function(){return this.KC.ac7)throw new RangeError("Invalid EBML ID size");for(var i=0,n=0;n=1,"Incorrect log2 value"),zh(this.ck,this.KC,i)},t.qAt=function(t){if(8===t.length&&224&t[1])throw new _("EBML variable sized integer is too large");for(var i=0,n=0;n8)throw new RangeError("EMBL integer field size is too large");if(8===t&&224&this.GAt.getUint8(0))throw new RangeError("EMBL integer field value is too large");for(var i=0,n=0;n0?lV(t.vwt.map(function(t){return t.Yu}),i):i.slice(),this.zyt&&(t.pwt?this.zyt.er(t.pwt):t.gwt?this.zyt.er(t.gwt[0]):t._wt&&this.zyt.er(t._wt))},n.hyt=function(){var t;return null==(t=this.ubt)?void 0:t.cbt},n.yyt=function(){var t;return null==(t=this.ubt)?void 0:t.dbt},n.lbt=function(t){var i=this.fbt,n=this.wct.ct,r=this.ubt,e=this.vbt(t);r&&Pn(n,i,1e-5)&&JV(r,e)||(this.fbt=n,this.ubt=e,this.So(new GV))},n.zg=function(){this.Vo(),this.zyt&&(this.zyt.zg(),this.zyt=void 0)},xt(i,[{key:"ck",get:function(){return this.Wp}},{key:"vwt",get:function(){return this.rbt}}]),i}(uh);function YV(t){for(var i,n,r=Ft(t);!(n=r()).done;){var e=n.value.hyt();if(e){i=e.Tn;break}}if(void 0!==i){for(var s,u=t.length-1;u>=0;u--){var o=t[u].hyt();if(o){s=o.An;break}}if(void 0!==s)return{Tn:i,An:s}}}function $V(t){if(0!==t.length){for(var i,n=0,r=1/0,e=Ft(t);!(i=e()).done;){var s=i.value.hyt();if(!s)return;if((n=A.max(n,s.Tn))>=(r=A.min(r,s.An)))return}return{Tn:n,An:r}}}function KV(t){for(var i,n,r=Ft(t);!(n=r()).done;){var e=n.value.yyt();e&&(!i||e.getTime()0?this.frt[0]:""}},{key:"Km",get:function(){return this._bt[0].Km}},{key:"o",get:function(){return this.hS}},{key:"Idt",get:function(){return this.jpt.Idt}},{key:"oQ",get:function(){return this._bt[0].oQ}},{key:"wct",get:function(){return this.jpt}},{key:"rat",get:function(){return nr(this.Ilt,function(t){return t.rat})}}]),i}(fV);V(),It(),Nt();var tj=function(t){function i(){return t.call(this,uM.bot)||this}return Pt(i,t),i}(ah);function ij(t){for(var i,n=function(){var t=i.value,n=void 0,e=t.Jdt;void 0===e||(n=Wn(r,function(t){return t.o===e})),n||(n={o:e,Ilt:[]},r.push(n)),n.Ilt.push(t)},r=[],e=Ft(t);!(i=e()).done;)n();return r}V(),It(),Ut();var nj=function(t){function i(i,n){var r;return(r=t.call(this)||this).uyt=void 0,r._bt=[],r.gbt=[],r.mbt=void 0,r.pbt=!1,r.mbt=i,r.uyt=n,r.uyt.wn(uM.yot,r.ayt),r}Pt(i,t);var n=i.prototype;return n.bbt=function(t,i){if(0!==this.gbt.length){for(var n,r=t,e=Ft(this.gbt);!(n=e()).done;){var s=n.value;if(fw(s.Km)){var u=s.oyt;if(void 0===u)return;r=i(r,u)}}return r}},n.Tbt=function(){this.pbt||(this.pbt=!0,this.So(new tj),this.kn())},n.er=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return 0!==this._bt.length?[3,2]:[4,this.kbt(this.uyt.Ilt,t,i)];case 1:return n.sent(),this.Ebt(this._bt),yr(i),[3,4];case 2:return[4,this.Pbt(t,i)];case 3:n.sent(),n.label=4;case 4:return[2]}})}).call(this)},n.kbt=function(t,i,n){return jt(function(){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:r=Ft(t),o.label=1;case 1:if((e=r()).done)return[3,6];s=e.value,u=new dV(this,s),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,u.er(i,n)];case 3:return o.sent(),this._bt.push(u),[3,5];case 4:return pr(o.sent()),[3,5];case 5:return[3,1];case 6:return[2]}})}).call(this)},n.Ebt=function(t){for(var i,n=Ft(ij(t));!(i=n()).done;){var r=i.value,e=new ZV(this,r.o,r.Ilt);this.gbt.push(e)}},n.Pbt=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:n=Ft(this._bt),e.label=1;case 1:return(r=n()).done?[3,4]:[4,r.value.er(t,i)];case 2:e.sent(),e.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},n.hyt=function(){return this.uyt.hyt()},n.yyt=function(){return this.uyt.yyt()},n.kn=function(){this.Vo(),this.uyt.mn(uM.yot,this.ayt);for(var t,i=Ft(this.gbt);!(t=i()).done;){t.value.kn()}for(var n,r=Ft(this._bt);!(n=r()).done;){n.value.kn()}tr(this._bt),tr(this.gbt)},xt(i,[{key:"Ilt",get:function(){return this._bt}},{key:"Xpt",get:function(){return this.gbt}},{key:"Mwt",get:function(){return this.uyt.ck.Mwt}},{key:"ct",get:function(){return this.uyt.ct}},{key:"An",get:function(){return this.Tn+this.ct}},{key:"Lwt",get:function(){return this.uyt.ck.Lwt||[]}},{key:"o",get:function(){return this.uyt.o}},{key:"Sot",get:function(){return this.pbt}},{key:"Idt",get:function(){return this.mbt}},{key:"Tmt",get:function(){return this.mbt.wbt(this)}},{key:"wct",get:function(){return this}},{key:"Smt",get:function(){return this.mbt.ybt(this)}},{key:"Abt",get:function(){return this.bbt(1/0,A.min)}},{key:"Sbt",get:function(){return this.bbt(0,A.max)}},{key:"Tn",get:function(){return this.uyt.Tn}},{key:"zk",get:function(){return this.Idt.zk}}]),i}(fV);V(),It(),Nt();var rj=function(t){function i(){return t.call(this,ch.qw)||this}return Pt(i,t),i}(ah);V(),It(),Nt(),V(),It();var ej=function(t){return t.xbt="Ibt",t}({}),sj=function(t){function i(){return t.call(this,ej.xbt)||this}return Pt(i,t),i}(ah);V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt(),Nt();var uj=function(t){function i(i,n){var r;return(r=t.call(this,i,n,n.vwt)||this).Kot=void 0,r.Rbt=void 0,r.Kot=n,r.obt(!0),r}Pt(i,t);var n=i.prototype;return n.kct=function(t){var i=this.oQ;return!(!Gv(i)&&!Qv(i))&&this.$rt.kct(t.aut)},n.Pct=function(t,i,n,r){return this.$rt.Pct(t,this,i,n,r)},n.fyt=function(){return this._yt.fyt(this)},n.Nct=function(t){return this._yt.Nct(t,this)},n.myt=function(t){return this._yt.myt(t,this)},n.wyt=function(){return this.Rbt},n.vbt=function(t){var i=this.$rt,n=i.wyt(t),r=n&&function(t,i){var n,r=t.Fyt,e=t.Uyt,s=t.Oyt,u=r.EO,o=i.Xyt(e);if(o.getTime()<=s.getTime())n=e.PO;else{var h=(o.getTime()-s.getTime())/1e3,a=A.max(e.ct-h,0);n=e.EO+a}return{Tn:u,An:n}}(n,i),e=this.$rt.yyt(t,n);return this.Rbt=n,{Oyt:t,cbt:r,dbt:e}},n.er=function(t){this.abt(t,this.Kot.vwt)},xt(i,[{key:"Nut",get:function(){return this.Kot}},{key:"wct",get:function(){return this.Kot.wct}},{key:"Myt",get:function(){return this.Kot.Myt}},{key:"oQ",get:function(){return this.Wp.oQ||this.Kot.oQ}},{key:"_yt",get:function(){return this.hbt()}},{key:"$rt",get:function(){return this._yt.$rt}}]),i}(QV),oj=function(t){function i(i,n){var r;return(r=t.call(this,i,n,n.vwt)||this).jpt=void 0,r.elt=void 0,r.jpt=n,r.obt(!1),r.elt=i.rat.map(function(t){return new uj(t,r)}),r}Pt(i,t);var n=i.prototype;return n.er=function(t){this.abt(t,this.jpt.vwt);var i=t.rat||[];if(this.elt.length!==i.length)throw new p("Expected "+this.elt.length+' representations in adaptation set "'+t.o+'", found '+i.length);for(var n=0;n0?lV(t.vwt.map(function(t){return t.Yu}),u):u,this.Hbt=t.Hwt&&t.Hwt.length>0?lV(t.Hwt,this.rbt):[];var o=this.Hbt.map(function(t){return t.href}),h=i.href;Jn(o,h)||(this.Hbt.push(i),o.push(h));var a=this.Xbt.href;Jn(o,a)||(this.Hbt.push(this.Xbt),o.push(a)),this.Vbt=null==(e=t.Gwt)?void 0:e.Rmt(),t.Zwt&&(this.Bbt=new aj(t.Zwt));var c=t.Km===DL.wV,f=function(t,i,n){for(var r=[],e=0;e0&&t[e-1].ct){u=r[e-1]+t[e-1].ct.Rmt()}else{if(0!==e||i)break;u=0}r.push(u)}for(var o=[],h=0;h0){var a=r.length-1,c=t[a],f=r[a],v=1/0;i||(v=c.ct?c.ct.Rmt():n-f),o.push({ck:c,Tn:f,ct:v})}return o}(t.smt,c,this.Vbt);this.jbt(f,s,c),this.lbt(n)},n.jbt=function(t,i,n){var r=this.Wbt;if(0!==t.length){for(var e=t[0].ck.o,s=0;s0&&t.length>0){var h,a,c=null!=(h=vj(r[0].ck))?h:Sm.wF,f=null!=(a=vj(t[0].ck))?a:Sm.wF;if(f.eF(c)){var v=f.lF(c);void 0!==this.Vbt&&(this.Vbt+=v.iF());for(var d=0;d0)return this.Wbt[i-1]},n.wbt=function(t){var i=this.Wbt.indexOf(t);if(i>=0&&i+1t)return r}}},{key:"rwt",get:function(){return this.uyt&&this.uyt.ck.rwt}},{key:"Kwt",get:function(){return this.uyt&&this.uyt.Kwt}},{key:"Abt",get:function(){for(var t=this.Wbt.length-1;t>=0;t-=1){var i=this.Wbt[t].Abt;if(i)return i}}},{key:"Syt",get:function(){var t=this.Abt;if(void 0!==t){var i=t-this.aSt;return A.max(i,this.hSt)}}},{key:"hSt",get:function(){for(var t,i=Ft(this.Wbt);!(t=i()).done;){var n=t.value.ryt;if(void 0!==n)return n}}},{key:"zk",get:function(){return Boolean(this.uSt.zk)}},{key:"aSt",get:function(){var t,i;if(this.uSt.cSt&&this.Km===DL.wV)return this.uSt.cSt;var n=null==(i=this.uyt)||null==(t=i.ck.Ywt)?void 0:t.Rmt();return void 0!==n?n:this.Km===DL.wV?1.5*this.Xwt.Rmt():0}},{key:"Kmt",get:function(){return this.uyt&&this.uyt.Kmt}},{key:"Km",get:function(){return this.uyt?this.uyt.Km:void 0}},{key:"Zwt",get:function(){var t;return null==(t=this.uyt)?void 0:t.Zwt}}]),i}(uh),Tj=function(){function t(t,i,n,r,e){this.mbt=void 0,this.mbt=new Aj(t,i,n,r,e)}return xt(t,[{key:"Idt",get:function(){return this.mbt}}]),t}(),Sj=1e3,Ej=A.pow(2,31)-1,Ij=function(){function t(t,i,n,r,e){var s=this;this.CSt=void 0,this.uyt=void 0,this.wSt=void 0,this.gSt=void 0,this.kSt=void 0,this.pSt=new dr,this.mSt=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),i=this.uyt.Idt.xdt(),[4,this.ISt(this.uyt.Idt.Hwt,t)];case 1:return n=e.sent(),[4,this.uyt.Idt.er(n,i,t)];case 2:return e.sent(),[3,4];case 3:throw Kl(r=e.sent())&&this.uyt.Idt.nSt(!1),r;case 4:return[2]}})}).call(s)},this.CSt=r,this.uyt=new Tj(t,i,n,this.pSt.Yg,e)}var i=t.prototype;return i.lE=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:this.uyt.Idt.So(new sC),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.mSt(t)];case 2:return n.sent(),this.uyt.Idt.nSt(!0),[3,4];case 3:throw pr(i=n.sent()),this.gSt=void 0,this.uyt.Idt.nSt(!1),new p("The provided MPEG-DASH document could not be loaded - "+i.message);case 4:return this.wSt=this.ySt(this.pSt.Yg),[2]}})}).call(this)},i.ySt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:i.trys.push([0,4,,5]),i.label=1;case 1:return this.uyt.Idt.Km!==DL.wV?[3,3]:[4,kr(this.ASt,t)];case 2:return i.sent(),[3,1];case 3:return[3,5];case 4:return i.sent(),[3,5];case 5:return[2]}})}).call(this)},i.SSt=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return yr(t),(i=this.TSt())>0?[4,Rr(A.min(i,Ej),t)]:[3,2];case 1:r.sent(),r.label=2;case 2:return r.trys.push([2,4,5,6]),[4,this.mSt(t)];case 3:return r.sent(),this.uyt.Idt.nSt(!0),[3,6];case 4:throw n=r.sent(),new p("The provided MPEG-DASH manifest could not be loaded - "+n.message);case 5:return this.kSt=void 0,[7];case 6:return[2]}})}).call(this)},i.TSt=function(){var t=this.uyt.Idt.xdt().getTime()-this.uyt.Idt.qbt.getTime();return this.uyt.Idt.Qwt-t},i.ESt=function(t){var i=this.uyt.Idt.yyt();if(i){var n=i.getTime()-t.getTime();if(n>0)return n}this.uyt.Idt.lbt(t);var r=this.uyt.Idt.yyt();return r?r.getTime()-t.getTime():NaN},i.bSt=function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:i={stack:[],error:void 0,hasError:!1},s.label=1;case 1:return s.trys.push([1,3,4,5]),null!=this.kSt||(this.kSt=this.SSt(t)),n=Xt(i,dr.ep([t]),!1),r=[this.kSt,this.PSt(n.Yg)].filter(Fi),[4,ot.race(r).catch(_r)];case 2:return s.sent(),[3,5];case 3:return e=s.sent(),i.error=e,i.hasError=!0,[3,5];case 4:return Gt(i),[7];case 5:return[2]}})}).call(this)},i.PSt=function(t){var i=this.uyt.Idt.xdt(),n=this.ESt(i);if(!E(n)&&!this.Br.Idt.Nyt)return this.xSt(n,t)},i.xSt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,Rr(t,i)];case 1:return r.sent(),n=this.uyt.Idt.xdt(),this.uyt.Idt.lbt(n),[2]}})}).call(this)},i.ISt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,this.CSt.RSt(t,{},i)];case 1:return n=r.sent(),[2,(new rV).$wt(n.DSt,n.gk)]}})}).call(this)},i.kn=function(){return this.pSt.Zg(),this.wSt=void 0,this.gSt=void 0,this.kSt=void 0,this.uyt.Idt.kn(),ot.resolve()},xt(t,[{key:"Br",get:function(){return this.uyt}},{key:"W",get:function(){return this.gSt||(this.gSt=this.lE(this.pSt.Yg),Er(this.gSt)),this.gSt}},{key:"ASt",get:function(){return this.uyt.Idt.tSt&&this.uyt.Idt.Km===DL.wV?this.bSt(this.pSt.Yg):this.W}}]),t}();V(),It(),Bt(),Nt(),Ut(),V(),It(),Nt();var Rj=function(t){function i(i,n){var r;return(r=t.call(this,"fmt")||this).Emt=void 0,r.hpt=void 0,r.Emt=i,r.hpt=n,r}return Pt(i,t),i}(ah),Cj=function(t){function i(i,n){var r;(r=t.call(this)||this).dlt=void 0,r.RI=void 0,r.Vp=void 0,r.Vp=i,r.RI=n;for(var e,s=Ft(r.RI);!(e=s()).done;){e.value.Jdt=r}return r}Pt(i,t);var n=i.prototype;return n.jU=function(t){t&&this.dlt!==t&&this.BSt(t)},n.QU=function(t){this.dlt===t&&this.BSt(void 0)},n.BSt=function(t){this.dlt=t,this.So(new Rj(this,this.dlt))},n.kn=function(){this.Vo();for(var t,i=Ft(this.RI);!(t=i()).done;){t.value.Jdt=void 0}tr(this.RI)},xt(i,[{key:"hpt",get:function(){return this.dlt}},{key:"Km",get:function(){return this.Vp}},{key:"Z",get:function(){return this.RI.slice()}}]),i}(uh);V(),It(),V(),It(),V(),It(),Nt();var Pj=function(t){function i(i,n,r){var e;return(e=t.call(this,ch.Dw)||this).currentTime=void 0,e.initDataType=void 0,e.initData=void 0,e.currentTime=i,e.initDataType=n,e.initData=r,e}return Pt(i,t),i}(ah);function Nj(t,i,n,r,e){for(var s,u=[],o=[],h=Ft(i);!(s=h()).done;){var a=s.value;a.Km===cw.Dk?u=u.concat(a.Z):a.Km===cw.Bk&&(o=o.concat(a.Z))}return[Dj(t,u,n,r,null==e?void 0:e.preferredAudioCodecs),xj(t,o,n,r,null==e?void 0:e.preferredVideoCodecs)].filter(Fi)}function Dj(t,i,n,r,e){var s=Wn(r||[],function(t){return t.Lot===cw.Dk&&t.Rt}),u=[Oj(s,n,t),Mj(s),Lj(s),Fj(s,e),Uj(),function(t){var i=t.filter(function(t){return"main"===t.Lt});return i.length>0?i:t}];return Bj(i,u)}function xj(t,i,n,r,e){var s=Wn(r||[],function(t){return t.Lot===cw.Bk&&t.Rt}),u=[Oj(s,n,t),Fj(s,e),Uj(),function(t){var i=t.filter(function(t){return"main"===t.Lt});return i.length>0?i:t}];return Bj(i,u)}function Bj(t,i){if(0!==t.length){for(var n,r=t,e=Ft(i);!(n=e()).done;){var s=n.value;if(1===r.length)return r[0];r=s(r)}return r[0]}}function Oj(t,i,n){return function(r){var e=t?t.Nut.o:void 0;if(!Fi(e))return r;var s=null==i?void 0:i.Mwt,u=n.Mwt,o=s&&u&&s.zE===u.zE,h=Wn(r,function(t){return t.Nut.o===e});return o&&h?[h]:r}}function Mj(t){return function(i){var n=t?t.bs:"",r=i.some(function(t){return""!==t.bs})?i.filter(function(t){return""!==t.bs}):i;if(""===n)return r;var e=r.filter(function(t){return t.bs===n});return e.length>0?e:r}}function Lj(t){return function(i){var n=t?t.Lt:"";if(""===n)return i;var r=i.filter(function(t){return t.Lt===n});return r.length>0?r:i}}function Fj(t,i){return function(t){if(i&&i.length>0)for(var n,r=function(){var i=n.value,r=t.filter(function(t){return t.KI.II.some(function(t){return hP(t.frt,i)})});if(r.length>0)return{v:r}},e=Ft(i);!(n=e()).done;){var s=r();if("object"===W(s))return s.v}return t}}function Uj(){return function(t){for(var i,n=[],r=-1/0,e=Ft(t);!(i=e()).done;){var s=i.value,u=s.Nut.Kq;u>r?(r=u,n=[s]):u===r&&n.push(s)}return n}}V(),It(),ft(),Ut(),V(),It();var Vj=function(t){return t.NSt="api",t.MSt="start",t}({});V(),It(),Wt(),Ut(),Yt();var jj={maxRetries:3,minimumBackoff:1e3,maximumBackoff:1/0},Hj=function(){function t(t,i,n){void 0===n&&(n=jj),this.nV=void 0,this.FSt=void 0,this._dt=void 0,this.nV=t,this.FSt=i,this._dt=n}var i=t.prototype;return i.LSt=function(t,i,n){var r=this,e=this._dt.maxRetries===1/0?jj:this._dt;return IT(function(){return r.OSt(t,i,n)},n,e.maxRetries,e.minimumBackoff,e.maximumBackoff)},i.OSt=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:e=Ft(t),c.label=1;case 1:if((s=e()).done)return[3,7];u=s.value,c.label=2;case 2:return c.trys.push([2,5,,6]),o=new El({Yu:u,dk:Hd.NT,fk:i,zk:this.FSt,Uk:kl.GET,Km:bl.wk,Wk:Al.pk,Yg:n,Vk:15e3,Hk:5e3}),[4,this.nV.lk(o)];case 3:return[4,(h=c.sent()).UT(n)];case 4:return[2,{DSt:c.sent(),USt:u,gk:h.gk}];case 5:return a=c.sent(),r=a,[3,6];case 6:return[3,1];case 7:throw r}})}).call(this)},t}();function Wj(t){return Nl(t)}function zj(t,i){var n=Nl(t);return i?""+n+i:""+n}V(),It(),Wt(),Ut(),Yt(),V(),It();var qj=function(){function t(t){this.VSt=void 0,this.VSt=t}return t.prototype.RSt=function(t,i,n){return jt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:e=Ft(this.VSt),h.label=1;case 1:if((s=e()).done)return[3,6];u=s.value,h.label=2;case 2:return h.trys.push([2,4,,5]),[4,u.RSt(t,i,n)];case 3:return[2,h.sent()];case 4:return pr(o=h.sent()),r=o,[3,5];case 5:return[3,1];case 6:throw r}})}).call(this)},t}(),Xj=function(){function t(t){this.eut=void 0,this.eut=t}return t.prototype.RSt=function(t,i,n){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.eut.HSt(t)];case 1:if(i=n.sent())return[2,{DSt:i.data,USt:i.locationURL,gk:i.responseURL}];throw new p("Manifest fetch from cache unsuccesful")}})}).call(this)},t}(),Gj=function(){function t(t){this.WSt=void 0,this.WSt=t}return t.prototype.RSt=function(t,i,n){return jt(function(){return zt(this,function(r){switch(r.label){case 0:return[4,this.WSt.LSt(t,i,n)];case 1:return[2,r.sent()]}})}).call(this)},t}();function Qj(t,i){return new qj([new Xj(i),new Gj(t)])}var Yj=function(){function t(t,i,n){this.CSt=void 0,this.GSt=void 0,this.XSt=void 0,this.CSt=t,this.GSt=i,this.XSt=n}var i=t.prototype;return i.RSt=function(t,i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return[4,this.CSt.RSt(t,i,n)];case 1:return r=e.sent(),[4,this.qSt(r)];case 2:return e.sent(),[2,r]}})}).call(this)},i.qSt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.GSt.zSt({key:Wj(t.USt),locationURL:Nl(t.USt),responseURL:Nl(t.gk),data:t.DSt,references:[this.XSt.o]})];case 1:return i.sent(),[2]}})}).call(this)},t}();V(),It(),Nt();var $j=function(t){function i(){return t.call(this,ch.Xw)||this}return Pt(i,t),i}(ah);V(),It(),Nt();var Kj=function(t){function i(){return t.call(this,ch.Gw)||this}return Pt(i,t),i}(ah);V(),It(),Wt(),Nt(),Ut(),Yt(),V(),It(),Nt(),Ut();var Jj=function(t){function i(i){return t.call(this,i)||this}Pt(i,t);var n=i.prototype;return n.jSt=function(t){return t.Ax=Fw.LOADED,this.tt(t),t},n.QSt=function(t){for(var i,n=Ft(this.Z.II);!(i=n()).done;){var r=i.value;if(r.ZI===t)return r}},i}(kp);function Zj(t,i){return""===i?t:t+" "+i}V(),It(),V(),It(),Bt(),Nt(),V(),It();var tH=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this,i,n,r,!1,null==s?void 0:s.toString())||this).iP=void 0,u.KSt=void 0,u.iP=e,u.KSt=s,u}return Pt(i,t),i.prototype.GO=function(t){return this.U===t.U},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return jg(Yw(t),{get attributes(){return t.iP},get eventID(){var i;return""+(null!=(i=t.KSt)?i:"")}})}(this)),this.hu}}]),i}(em),iH=function(t){function i(i){var n;return(n=t.call(this,i)||this).Cbt=void 0,n.ZSt=function(){var t,i,r=null!=(i=null==(t=n.Cbt.hyt())?void 0:t.Tn)?i:0;if(r>0)for(var e,s=Ft(n.Z.II);!(e=s()).done;){pp(e.value,r)}for(var u,o=Ft(n.Cbt.smt);!(u=o()).done;){var h=u.value;if(h.An>r)for(var a,c=Ft(h.Lwt);!(a=c()).done;){var f=a.value;n.JSt(f,h,r)}}},n}Pt(i,t);var n=i.prototype;return n.YSt=function(t){var i=this.JU.tI(ep.VU,"","","",void 0,Uw.EVENT_STREAM);return i.ZI=t,this.jSt(i),i},n.JSt=function(t,i,n){var r,e,s,u=t.y8,o=null!=(r=t.zE)?r:"",h=null!=(e=t.qD)?e:1,a=null!=(s=t.jmt)?s:fe.ZERO,c=Zj(u,o),f=this.QSt(c);f||(f=this.YSt(c));for(var v,d=Ft(t.aQ);!(v=d()).done;){var l=v.value;if(!nH(l,f)){var g=rH(l,h,a,i);g.PO>n&&f.tV(g)}}},n.Un=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.hr()];case 1:return i.sent(),this.Cbt=t,this.Cbt.wn(ch.qw,this.ZSt),this.ZSt(),[2]}})}).call(this)},n.hr=function(){var i=this;return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:for(this.Cbt&&(this.Cbt.mn(ch.qw,this.ZSt),this.Cbt=void 0),n=Ft(this.Z.II);!(r=n()).done;)e=r.value,this.JU.iV(e);return[4,t.prototype.hr.call(i)];case 1:return s.sent(),[2]}})}).call(this)},n.ZU=function(t,i,n){return bp(t,i,n)},i}(Jj);function nH(t,i){var n=t.o;if(void 0!==n&&Wn(i.L.II,function(i){return i.KSt===n&&i.U===t.ck}))return!0;return!1}function rH(t,i,n,r){var e=t.o,s=t.tM.toSigned().subtract(n),u=t.ct,o=t.ck,h=t.iP,a=s.toNumber()/i+r.Tn,c=u?u.toNumber()/i:void 0,f=void 0!==c?a+c:r.Sbt;return new tH(a,f,o,h,e)}function eH(t,i,n,r,e){var s=[],u=Wn(n,function(t){return t.y8===fo});if(void 0!==u){var o=u.zE?function(t){var i=t.split(":",1)[0];switch(i){case"cbcs":case"cenc":return i;default:return}}(u.zE.toLowerCase()):"cenc";if(void 0!==o){for(var h,a=Ft(n);!(h=a()).done;){var c=h.value;if(c.y8!==fo)for(var f,v=Ft(jo(c.y8));!(f=v()).done;){var d,l,g=f.value,w=e&&c.A8?[c.A8]:[],m=null!=(l=null==(d=t.clearkey)?void 0:d.keys)?l:[];s.push({kS:g,BW:w,NW:void 0,HH:void 0,MW:m})}}if(s.length)return{aH:t,Ept:{$St:o,uH:u.uH},kpt:s,tTt:i===cw.Dk?r.slice():[],iTt:i===cw.Bk?r.slice():[],T8:!1}}}}function sH(t,i){if(!t)return i;if(!i)return t;var n,r=[],e=ro();return uH(r,e,t.kpt),uH(r,e,i.kpt),{aH:t.aH,Ept:{$St:t.Ept.$St,uH:null!=(n=t.Ept.uH)?n:i.Ept.uH},kpt:r,tTt:oH(t.tTt,i.tTt,Jn),iTt:oH(t.iTt,i.iTt,Jn),T8:t.T8||i.T8||!1}}function uH(t,i,n){for(var r,e=Ft(n);!(r=e()).done;){var s=r.value,u=s.kS.$m,o=void 0;i.has(u)?(o=i.get(u)).BW=oH(o.BW,s.BW,hH):(o=io({},s),t.push(o),i.set(u,o))}}function oH(t,i,n){for(var r,e=t.slice(),s=Ft(i);!(r=s()).done;){var u=r.value;n(e,u)||e.push(u)}return e}function hH(t,i){for(var n,r=Ft(t);!(n=r()).done;){if(Oa(n.value,i))return!0}return!1}function aH(t,i,n){var r,e=t.xW;if(e){for(var s,u=t.oQ,o=[],h=Ft(t.frt);!(s=h()).done;){var a=s.value;o.push(u+'; codecs="'+a+'"')}r=eH(i||{},t.Km,e,o,n)}for(var c,f=Ft(t.rat);!(c=f()).done;){r=sH(r,cH(c.value,i,n))}return r}function cH(t,i,n){return eH(i||{},t.Km,t.xW||[],[t.qT],n)}function fH(t){return t?t.kpt.map(function(i){var n=vH(t.aH,i.kS),r=t.Ept.$St;return{kS:i.kS,BW:i.BW,HH:i.HH,Mq:[{initDataTypes:[i.kS.Jm],audioCapabilities:dH(t.tTt,r,null==n?void 0:n.audioRobustness),videoCapabilities:dH(t.iTt,r,null==n?void 0:n.videoRobustness),persistentState:null==n?void 0:n.persistentState,distinctiveIdentifier:null==n?void 0:n.distinctiveIdentifier}],MW:i.MW}}):[]}function vH(t,i){switch(i.Km){case Do.zm:return t.widevine;case Do.qm:return t.playready;case Do.jm:return t.fairplay;case Do.Gm:case Do.Xm:return t.clearkey}}function dH(t,i,n){if(0!==t.length)return t.map(function(t){return{contentType:t,encryptionScheme:i,robustness:n}})}function lH(t,i){var n=function(t){var n=i.indexOf(t.kS.$m);return n>=0?n:i.length};return An(t,function(t,i){return n(t)-n(i)})}V(),It(),Ut(),V(),It(),Wt(),Nt(),Ut(),Yt();var gH=function(t){function i(i){var n;(n=t.call(this,i)||this).elt=[],n.hTt=void 0,n.Cbt=void 0,n.er=function(){for(var t,i=[],r=Ft(n.Cbt.smt);!(t=r()).done;)for(var e,s=Ft(t.value.Ilt);!(e=s()).done;){var u=e.value;if(u.Km===cw.Nk&&u.rat.length>0){var o=u.rat[0];i.push(o),n.aTt(o)||n.YSt(o),-1===n.elt.indexOf(o)&&(n.elt.push(o),o.wn(uM.yot,n.hTt)),n.cTt(o)}}n.eTt(i)},n.cTt=function(t){var i=n.uTt(t);i&&t&&i.Xk!==$y.Nh&&(n.oTt(),function(t,i){var n=t.$rt,r=t.wyt();if(!r)return;var e=r.Fyt,s=r.Uyt,u=t.Ti,o=t.Mi,h=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;if(Xo(r.y8,mH)||Xo(r.y8,yH)){var e=r.zE.match(wH);if(e){var s=e[1],u=e[2];return[Number(s),Number(u)]}}}return[1,1]}(t.iwt),a=h[0],c=h[1],f=e;for(;f&&f.aut<=s.aut;){for(var v,d=t._yt.ct||f.ct,l=Ft(pH(i,f,t.Nct(f).Yu,u,o,a,c,d));!(v=l()).done;){var g=v.value;i.tV(g)}f=n.Cct(f)}}(t,i))};var r=n;return n.hTt=function(){r.cTt(this)},n}Pt(i,t);var n=i.prototype;return n.YSt=function(t){var i=this.JU.tI(ep.VU,t.o,"thumbnails","",!1,Uw.DEFAULT);return i.Xk=$y.Kn,this.jSt(i),i},n.Un=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.hr()];case 1:return i.sent(),this.Cbt=t,this.Cbt.wn(ch.qw,this.er),this.er(),[2]}})}).call(this)},n.eTt=function(t){this.sTt(t),this.nTt()},n.nTt=function(){for(var t,i=[],n=Ft(this.Z.II);!(t=n()).done;){var r=t.value;this.rTt(r)||i.push(r)}for(var e,s=Ft(i);!(e=s()).done;){var u=e.value;this.it(u)}},n.sTt=function(t){for(var i,n=[],r=Ft(this.elt);!(i=r()).done;){var e=i.value;-1===t.indexOf(e)&&n.push(e)}for(var s,u=Ft(n);!(s=u()).done;){var o=s.value;Yn(this.elt,o)}},n.hr=function(){var i=this;return jt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:for(this.Cbt&&(this.Cbt.mn(ch.qw,this.er),this.Cbt=void 0),n=Ft(this.elt);!(r=n()).done;)r.value.mn(uM.yot,this.hTt);for(this.elt.length=0,e=Ft(this.Z.II);!(s=e()).done;)u=s.value,this.JU.iV(u);return[4,t.prototype.hr.call(i)];case 1:return o.sent(),[2]}})}).call(this)},n.ZU=function(t,i,n){return bp(t,i,n)},n.kn=function(){return this.hTt=void 0,t.prototype.kn.call(this)},n.oTt=function(){var t,i,n=null!=(i=null==(t=this.Cbt.hyt())?void 0:t.Tn)?i:0;if(n>0)for(var r,e=Ft(this.Z.II);!(r=e()).done;){pp(r.value,n)}},n.aTt=function(t){return this.Z.II.some(function(i){return i.o===t.o})},n.uTt=function(t){return Wn(this.Z.II,function(i){return i.o===t.o})},n.rTt=function(t){return this.elt.some(function(i){return t.o===i.o})},i}(Jj),wH=/^(\d+)x(\d+)$/,mH="http://dashif.org/guidelines/thumbnail_tile",yH="http://dashif.org/thumbnail_tile";function pH(t,i,n,r,e,s,u,o){var h=[],a=i.EO,c=s*u,f=r/s,v=e/u,d=A.round(f),l=A.round(v),g=o/c;if(1===c){var w=a+g;return _H(t,a,w,n)?h:[new em(a,w,n,!1)]}for(var m=0;m=i.PO)return h}return h}function _H(t,i,n,r){return t.L.II.some(function(t){return t.EO===i&&t.PO===n&&t.U===r})}V(),It(),Wt(),Nt(),Yt(),V(),It(),Wt(),Nt(),Ut(),Yt(),V(),It(),Bt(),Nt(),V(),It();var kH=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,u,!1)||this).dTt=void 0,o.lTt=void 0,o.vTt=void 0,o.dTt=r,o.lTt=e,o.vTt=s,o}return Pt(i,t),i.prototype.GO=function(t){return Ma(this.U,t.U)},xt(i,[{key:"$N",get:function(){return this.dTt}},{key:"zE",get:function(){return this.lTt}},{key:"fTt",get:function(){return this.vTt}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return jg(Yw(t),{get schemeIDURI(){return t.$N},get value(){return t.zE},get emsgID(){return t.fTt}})}(this)),this.hu}}]),i}(em),bH=function(t){function i(i){return t.call(this,i)||this}Pt(i,t);var n=i.prototype;return n.Odt=function(t,n,r){var e=Ry.TD(Aa(t));if(e){var s=function(t,i){for(var n,r=[],e=Ft(t);!(n=e()).done;){var s=n.value;_y(s,i)&&r.push(s)}return r}(e,gy.VC);if(s.length){var u=i._Tt(e,n,r);this.gTt(s,u,r)}}},n.gTt=function(t,i,n){for(var r,e=Ft(t);!(r=e()).done;){var s=r.value,u=void 0,o=(u=1===s.bD?s.tM.toNumber()/s.qD+n:i+s.sM/s.qD)+s.iM/s.qD;"https://aomedia.org/emsg/ID3"===s.$N||"https://developer.apple.com/streaming/emsg-id3"===s.$N?this.pTt(s,u):this.mTt(s,u,o)}},n.mTt=function(t,i,n){var r=Zj(t.$N,t.zE),e=this.QSt(r);e||(e=this.wTt(r),this.jSt(e)),e.tV(new kH(i,n,t.$N,t.zE,t.o,t.eM))},n.pTt=function(t,i){var n=YN(Aa(t.eM));if(n){var r=Zj(t.$N,t.zE),e=this.QSt(r);e||(e=this.yTt(r),this.jSt(e));for(var s,u=Ft(n.J5);!(s=u()).done;){var o=s.value,h=new oD(i,o);AN(h,e.L.II),e.tV(h)}}},n.wTt=function(t){var i=this.JU.tI(ep.VU,"","","",void 0,Uw.EMSG);return i.ZI=t,i.Xk=$y.JI,i},n.yTt=function(t){var i=this.JU.tI(ep.VU,"","","",void 0,Uw.ID3);return i.ZI=t,i.Xk=$y.JI,i},n.ZU=function(t,i,n){return bp(t,i,n)},n.hr=function(){var i=this;return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:for(n=Ft(this.Z.II);!(r=n()).done;)e=r.value,this.JU.iV(e);return[4,t.prototype.hr.call(i)];case 1:return s.sent(),[2]}})}).call(this)},i._Tt=function(t,i,n){var r=ky(t,gy.HC);return r?pe(r._M,r.qD)+n:i},i}(Jj),AH=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Cbt=void 0,i.ZSt=function(){var t,n,r=null!=(n=null==(t=i.Cbt.hyt())?void 0:t.Tn)?n:0;i.qU(r)},i}Pt(i,t);var n=i.prototype;return n.Un=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.hr()];case 1:return i.sent(),this.Cbt=t,this.Cbt.wn(ch.qw,this.ZSt),this.ZSt(),[2]}})}).call(this)},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.Cbt&&(this.Cbt.mn(ch.qw,this.ZSt),this.Cbt=void 0),[4,t.prototype.hr.call(i)];case 1:return n.sent(),[2]}})}).call(this)},i}(bH);V(),It(),V(),It(),Wt(),Yt();var TH=function(){function t(t){this.eut=void 0,this.ATt=!1,this.eut=t}var i=t.prototype;return i.Uct=function(t,i){return this.ATt?this.eut.Uct(t,i):ot.resolve(!1)},i.iut=function(t,i){return this.ATt?this.eut.iut(t,i):ot.resolve(void 0)},i.HSt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.eut.HSt(t)];case 1:return i=n.sent(),this.ATt=void 0!==i,[2,i]}})}).call(this)},i.WJ=function(t){return this.eut.WJ(t)},t}();V(),It(),Nt();var SH=function(t){function i(i,n,r){return t.call(this,i,n,r)||this}Pt(i,t);var n=i.prototype;return n.NL=function(){var t;return null!=(t=this.DL)?t:0},n.oR=function(){this.oa.MP=1/0},n.ML=function(t,i,n){return!1},n.LL=function(){return!0},i}(jA),EH=[ch.Qw,ch.Yw,ch.iy,ch.zw,ch.oy],IH=[ch.Kw,ch.gy,ch.Lw,ch.Nw],RH=function(t){function i(i,n,r,e,s,u,o){var h,a;return(h=t.call(this)||this).nV=void 0,h.Rz=void 0,h._dt=void 0,h.eut=void 0,h.TL=void 0,h.kq=void 0,h.bq=void 0,h.qTt=void 0,h.ekt=void 0,h.n7=!1,h.LEt=NaN,h.JW=void 0,h.ZW=void 0,h.X8=!1,h.skt=void 0,h.q8=void 0,h.UEt=!1,h.OEt=0,h.FEt=0,h._kt=!1,h.rV=new dr,h.WTt=new Xa,h.NEt=void 0,h.DEt=!1,h.uyt=void 0,h.Fkt=void 0,h.sSt=!0,h.ckt=!0,h.oEt=void 0,h.Ho=OA.iL(),h.tq=eS.lz,h.xEt=void 0,h.NV=!0,h.Ac=void 0,h.mEt=void 0,h.Ypt=void 0,h.Npt=[],h.Sz=!1,h.rq=void 0,h.OTt=new dr,h.HTt=ot.resolve(),h.m7=new dr,h.w7=ot.resolve(),h.Bkt=!1,h.uEt=!1,h.FTt=new dr,h.UTt=ot.resolve(),h.YTt=void 0,h.jkt=void 0,h.YL=void 0,h.$L=void 0,h.Gl=void 0,h.$kt=void 0,h.Ykt=void 0,h.wpt=void 0,h.SEt=void 0,h.TEt=void 0,h.pq=void 0,h.VEt=void 0,h.okt=0,h.akt=0,h.ukt=0,h.oq=new Db,h.Zkt=void 0,h.xTt={iO:0,eO:0,sO:0},h.iq=void 0,h.DTt=void 0,h.lq=void 0,h.jW=void 0,h.Pkt=function(t){var i,n,r,e;"fmt"===(null==t?void 0:t.type)&&(e=t.hpt),e&&(null==(i=e.Jdt)?void 0:i.Km)===cw.Dk&&(null==(r=h.bt)||null==(n=r.dash)?void 0:n.forceRecreateMediaSourceOnAudioSwitch)?h.LTt(!0):h.LTt()},h.Pmt=function(t){var i;null==(i=h.qTt)||i.Pmt(t)},h.umt=function(t){var i;null==(i=h.qTt)||i.umt(t)},h.Nc=function(){h.So(new Eg(h.MP,h.CP))},h.D8=function(t){h.So(new Pj(h.MP,t.Jm,t.Ey))},h.bkt=function(t){h.okt+=t.rO,h.So(t)},h.Skt=function(t){var i=t.segments.filter(function(t){return t.cct});t.track===cw.Dk?h.akt=i.length:t.track===cw.Bk&&(h.ukt=i.length)},h.p9=function(){var t=h.ct;E(t)||t===h.LEt||(h.LEt=t,h.So(new kT(h.LEt)))},h.WEt=function(){h.MTt(),h.hEt()},h.HEt=function(t){h.uEt||!h.UP||h.kx||(h.uEt=!0,h.So(null!=t?t:new AT(h.MP)))},h.AEt=function(t){h.Rs(t),h._kt||(h._kt=!0,h.kq.VV())},h.yEt=function(){h.uyt.Idt.mn(ch.Ww,h.yEt),h.So(new sC)},h.kkt=function(t){var i;if(t.errorObject.code===gd.CONTENT_PROTECTION_OUTPUT_RESTRICTED&&(null==(i=h.qTt)?void 0:i.pmt.every(function(t){return!t.olt})))return;h.qq(t.errorObject),h.So(t)},h.Tkt=function(t){h.qq(t.errorObject)},h.mmt=function(t){mr(t)||h.qq(new md(gd.MEDIA_DECODE_ERROR,t.message,t))},h.MTt=function(){if(!h.hx)if(h.nkt())if(h.hkt()){var t=h.uyt.Idt.rSt;h.My(t,!0)}else;else{var i=h.uyt.Idt.rSt;h.My(i,!0)}},h.dEt=function(t){h.UEt=h.kx,h.So(t)},h.vEt=function(t){var i=h.UEt,n=h.kx;h.UEt=n,i&&!n&&h.So(t),h.HEt()},h.Ekt=function(){var t=h.Bx,i=h.Rx;h.OEt===t&&h.FEt===i||(h.OEt=t,h.FEt=i,h.So(new Bp))},h.tEt=function(t){var i=t.Ht;i.Xk===$y.Kn?(h.Gkt(i),h.jkt=i):i===h.jkt&&i.Xk===$y.Nh&&(h.jkt=void 0,h.Qkt())},h.cEt=function(){h.X8||h.oEt&&(h.oEt.Xy(),h.oEt=void 0)},h.nEt=function(t){h.X8||h.oEt&&(h.oEt.jy(t),h.oEt=void 0)},h.bEt=function(){h.kEt().catch(h.mmt)},h.EEt=function(){h.PEt().catch(h.mmt),h.bq.mn(Mp.SM,h.EEt)},h.GEt=function(t){h.qq(yw(t.lt))},h.qEt=function(){h.STt()},h.zEt=function(){h.TTt()},h.XEt=function(t){h.ETt(t.xW)},h.nV=i,h.eut=new TH(s),h.TL=u,h.DTt=o,h.Rz=r,h.Rz.wn("NY",h.qEt),h.Rz.wn("FY",h.zEt),h.rq=e,h._dt=io({},n.retryConfiguration,{maxRetries:null!=(a=n.retryConfiguration.maxRetries)?a:1/0}),h.YL=new hA,h.$L=new hA,h.lq=new Bb(i),h.lq.wn("contentProtectionsTracked",h.XEt),h.TL.wn(ch.Rw,h.p9),h.TL.wn(mh.Dw,h.D8),h.TL.wn(ch.Bw,h.HEt),h.TL.wn(ch.$w,h.dEt),h.TL.wn(ch.Zw,h.vEt),h.TL.wn(ch.Jw,h.Ekt),h.TL.wn(ch._y,h.Nc),h.TL.wn([ch.uo,ch.jw],h.WEt),h.TL.wn(IH,h.Rs),h.TL.wn(Jy.ma,h.GEt),h.TL.Eq=h.lq,h.TL.N9=h,h.TL.wn([ch.Pw,ch.Ew],h.Rs),h.TL.wn(ch.yy,h.Pmt),h.TL.wn(ch.LICENSE_REQUEST_GENERATED,h.umt),h.kq=new Qp(h,h.TL),h.bq=new Gp(h.kq,!0),h.bq.wn(Mp.SM,h.MTt),h.bq.wn(Lp,h.Rs),h.$kt=new aA,h.$kt.wn(Mg.pa,h.tEt),h.Ykt=new aA,h.SEt=new iH(h.TL),h.TEt=new gH(h.TL),h.pq=new Tp(h.TL,h.nV),h.VEt=new rp,h.Gl=new Mb([h.$kt,h.SEt.Z,h.TEt.Z,h.pq.Z,h.VEt]),h}Pt(i,t);var n=i.prototype;return n.bTt=function(t){return!!this.iq&&this.iq.TZ(t)},n.Lp=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return i=this,[4,this.TL.Un(t)];case 1:return i.iq=n.sent(),this.STt(),this.TTt(),this.iq.C4(this.ct),[2]}})}).call(this)},n.kTt=function(t){return this.iq.EZ(t)},n.ETt=function(t){return this.iq.xZ(t)},n.PTt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.xTt=this.ITt,this.iq?[4,this.TL.hr()]:[3,2];case 1:t.sent(),this.iq=void 0,t.label=2;case 2:return[2]}})}).call(this)},n.C3=function(){this.iq.C3()},n.A3=function(){var t=this.ct;this.iq.ct=e||Pn(r,e,.001)},n.hkt=function(){var t;if(!this.uyt)return!1;if(this.uyt.Idt.Km!==DL.wV)return!1;var i=null==(t=this.qTt)?void 0:t.Mc;if(i&&i.Sot)return!0;for(var n,r=[],e=Ft(this.uyt.Idt.smt);!(n=e()).done;){var s=n.value,u=s.ryt,o=s.Sbt;void 0!==u&&void 0!==o&&r.push(u,o)}var h=new OA(r).LM();return function(t,i,n){if(!i.V||!n.V)return OA.iL();var r=i.Tn(0),e=i.An(i.V-1),s=t.Mn(n).BM().Mn(t).OM(i);return OA.tL(s.Tn(0),s.An(s.V-1)).FM(s).XM(function(t,i){return tme})}(this.ikt,this.rkt,h).V>0},n.fkt=function(t){this.Ho=this.Ho.OM(t)},n.Akt=function(t){t.wn(EH,this.Rs),t.wn(ch.ly,this.bkt),t.wn(ch.Sw,this.Skt),t.wn(Jy.ma,this.Tkt),t.wn(ch.Ew,this.kkt),t.wn(ch.Yw,this.Ekt),t.wn("fmt",this.Pkt),t.wn("qpt",this.Pkt)},n.xkt=function(t){t.mn(EH,this.Rs),t.mn(ch.ly,this.bkt),t.mn(ch.Sw,this.Skt),t.mn(Jy.ma,this.Tkt),t.mn(ch.Ew,this.kkt),t.mn(ch.Yw,this.Ekt),t.mn("fmt",this.Pkt),t.mn("qpt",this.Pkt)},n.Ikt=function(t){t.wn(ch.Qw,this.Rs)},n.Rkt=function(t){t.mn(ch.Qw,this.Rs)},n.ykt=function(){if(this.qTt){var t=Wn(this.qTt.gmt,function(t){return t.Lot===cw.Bk});if(t)return t.XI}},n.gkt=function(t){var i,n=null==(i=this.uyt)?void 0:i.Idt;if(!n)return OA.iL();var r=n.hSt,e=t?n.Abt:n.Syt;if(void 0===r||void 0===e)return OA.iL();if(!t){var s=this.lkt;s.V>0&&s.An(s.V-1)>e&&(e=A.min(s.An(s.V-1),n.Abt))}var u=this.ct;return isFinite(u)&&u>e&&(e=u),OA.tL(r,e).CM()},n.Un=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:yr(i),e=this.uyt.Idt;try{n=e.oSt,r=e.rSt}catch(t){throw new p("Something went wrong determining the start of the provided MPEG-DASH stream")}if(!n)throw new p("Something went wrong determining the initial Period of the provided MPEG-DASH stream");if(void 0===r)throw new p("Something went wrong determining the start time of the provided MPEG-DASH stream");return t.textTracks&&this.Ckt(t.textTracks),this.k7(),s=this.klt(n),u=Nj(n,s,void 0,void 0,this.Ypt),o=this.zTt(n,u,n,u,!0),u.forEach(function(t){return t.Rt=!0}),h=this.GTt(u,o),[4,this.Lp(h)];case 1:return c.sent(),this.YTt=h,yr(i),[4,this.NTt(n,s,u,o)];case 2:return a=c.sent(),yr(i),this.Dkt(a),this.R7(),yr(i),[4,a.$ot()];case 3:return c.sent(),yr(i),!this.Bkt&&r>0&&this.My(r,!0,Vj.MSt),this.Sz||(this.QTt(),this.Nkt()),[2]}})}).call(this)},n.QTt=function(){this.OTt.Zg(),this.OTt=new dr,this.HTt=br(this.Mkt(this.HTt,this.UTt,this.OTt.Yg),this.OTt).catch(this.mmt)},n.Lkt=function(){this.OTt.Zg()},n.Mkt=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return[4,ot.all([t,i])];case 1:s.sent(),yr(n),s.label=2;case 2:return(e=null==(r=this.qTt)?void 0:r.Mc)?[4,this.Okt(e,n)]:[3,4];case 3:return s.sent()?[3,2]:[3,4];case 4:return[2]}})}).call(this)},n.Okt=function(t,i){return jt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:yr(i),r=this.qTt,u.label=1;case 1:if(this.uyt.Idt.Km!==DL.wV||void 0!==(null==(n=this.wbt(t))?void 0:n.ryt))return[3,7];u.label=2;case 2:return u.trys.push([2,4,,5]),[4,kr(this.Fkt.ASt,i)];case 3:return u.sent(),[3,5];case 4:if(pr(e=u.sent()),this.Ukt())return[2,!0];throw e;case 5:return[4,this.Vkt()];case 6:return u.sent(),[3,1];case 7:return yr(i),[4,this.Vkt()];case 8:u.sent(),yr(i),u.label=9;case 9:return r.Jpt()?[3,12]:[4,r.ww(xL.Mlt,i)];case 10:return u.sent(),[4,this.Vkt()];case 11:return u.sent(),[3,9];case 12:return yr(i),[4,this.Vkt()];case 13:return u.sent(),yr(i),(s=this.wbt(t))?this.Hkt(s)?[4,this.Wkt(s,i)]:[3,15]:(this.C3(),[2,!1]);case 14:return u.sent(),[3,17];case 15:return[4,this.qkt(s,i)];case 16:u.sent(),u.label=17;case 17:return[2,!0]}})}).call(this)},n.Ukt=function(){var t=this.QW;return Fi(t)&&t.An>this.MP},n.Hkt=function(t){var i,n,r,e,s,u=null!=(s=null==(i=this.Ac)?void 0:i.seamlessSwitchStrategy)?s:XA.OL;if(u===XA.FL)return!0;if(u===XA.UL)return!1;var o=this.qTt,h=null==o?void 0:o.Mc,a=null==o?void 0:o.gmt,c=Nj(t,this.klt(t),h,a,this.Ypt),f=this.zTt(t,c,h,a,!1);if(u===XA.CLEAR_ONLY&&((null==(n=this.qTt)?void 0:n.Tpt)||f)||u===XA.SAME_DRM_ONLY&&!((null==(r=this.qTt)?void 0:r.Tpt)&&f||!(null==(e=this.qTt)?void 0:e.Tpt)&&!f))return!1;var v=this.GTt(c,f);return this.bTt(v)},n.zkt=function(){return!0},n.Gkt=function(t){for(var i,n=Ft(this.Xkt());!(i=n()).done;){var r=i.value;r!==t&&(r.Xk=$y.Nh)}},n.KTt=function(){if(void 0!==this.jkt){if(this.jkt.tR){var t=Wn(this.ht.II,function(t){return t.Rt});void 0!==t&&this.jkt.bs===t.bs||(this.jkt.Xk=$y.Nh)}}else this.Qkt()},n.Qkt=function(){if(!this.Xkt().length){var t=Wn(this.ht.II,function(t){return t.Rt});if(void 0!==t)for(var i,n=Ft(this.nt.II.filter(function(t){return t.tR}));!(i=n()).done;){var r=i.value;if(r.bs===t.bs)return r.Xk=$y.Kn,void(this.jkt=r)}}},n.Xkt=function(){return this.nt.II.filter(function(t){return t.Xk===$y.Kn&&(t.Lt===ep.FU||t.Lt===ep.OU)})},n.Kkt=function(t){if(t&&this.jkt){var i=function(t,i){if(""!==t.bs)return i.filter(function(i){return i.bs===t.bs})[0]}(this.jkt,t.nt.II);i&&(i.Xk=$y.Kn)}},n.Wkt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:e=this.qTt,s=this.ekt,u=this.YTt,l.label=1;case 1:return l.trys.push([1,16,,22]),yr(i),o=e.Mc,h=e.gmt,a=this.klt(t),NH(e.kmt,a),c=Nj(t,a,o,h,this.Ypt),f=this.zTt(t,c,o,h,!1),c.forEach(function(t){return t.Rt=!0}),v=this.GTt(c,f),[4,e.Jot()];case 2:return l.sent(),this.A3(),yr(i),s&&s.Mc===t?this.bTt(v)?[4,this.kTt(v)]:[3,4]:[3,5];case 3:l.sent(),l.label=4;case 4:return this.YTt=v,[3,11];case 5:return s?[4,s.kn(!0)]:[3,7];case 6:l.sent(),l.label=7;case 7:return this.bTt(v)?[4,this.kTt(v)]:[3,9];case 8:l.sent(),l.label=9;case 9:return this.YTt=v,[4,this.NTt(t,a,c,f)];case 10:s=l.sent(),this.ekt=s,this.Ikt(s),this.Ykt.BI=s.nt,s.iat(e),l.label=11;case 11:return[4,s.$ot()];case 12:l.sent(),yr(i),l.label=13;case 13:return this.ZTt900))return[3,5];this.Zkt=n,this.JTt(),r=A.max(this.ZTt,t.Tn),e.label=2;case 2:return e.trys.push([2,,4,5]),[4,this.$Tt(r,!1,!0,i)];case 3:return e.sent(),[3,5];case 4:return this.tkt(),[7];case 5:return[2]}})}).call(this)},n.qkt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:return yr(i),[4,this.qTt.Jot()];case 1:return l.sent(),this.A3(),[4,this.RTt(t.Tn)];case 2:l.sent(),yr(i),this.C3(),l.label=3;case 3:return!this.TL.UP&&this.ZTt0&&a.push(i.iEt(cw.Dk,r)),e.length>0&&a.push(i.iEt(cw.Bk,e)),a},n.GTt=function(t,i){var n,r,e,s,u,o,h,a,c,f=this,v=t.map(function(t){var i;return JM.Yct(null!=(i=t.ilt)?i:t.rat,DA(t.Lot,f.Ypt))}).map(function(t){return{qT:t.qT}}),d=null==(r=this.Ac)||null==(n=r.dash)?void 0:n.desiredTimescale,l=(null==(e=this.Ac)?void 0:e.seamlessSwitchStrategy)!==XA.UL&&(null==(s=this.Ac)?void 0:s.seamlessSwitchStrategy)!==XA.CLEAR_ONLY&&(null==(u=this.Ac)?void 0:u.seamlessSwitchStrategy)!==XA.SAME_DRM_ONLY&&(null!=(c=null==(h=this.Ac)||null==(o=h.dash)?void 0:o.needsTimescaleShifting)?c:Vi.Zs.kp),g=null==(a=this.Ac)?void 0:a.useManagedMediaSource;return{Km:Op.wV,L4:v,aq:fH(i),T8:null==i?void 0:i.T8,kp:l,x3:d,X4:g}},n.zTt=function(t,n,r,e,s){var u,o,h,a=this.Ac.contentProtection,c=i.eEt(n,a);if(void 0!==c)return c;var f=null!=(h=null==(u=this.Ac)?void 0:u.seamlessSwitchStrategy)?h:XA.OL;if(f!==XA.UL&&f!==XA.CLEAR_ONLY&&f!==XA.SAME_DRM_ONLY){var v=null==(o=this.qTt)?void 0:o.Tpt;if(!s&&void 0!==v){var d=!v.T8;if(f===XA.OL&&d&&!this.zkt())return;return v}var l=!s&&f===XA.OL;if(void 0!==(c=this.sEt(t,a,r,e,l)))return c.T8=!0,c}},n.sEt=function(t,n,r,e,s){for(var u=t,o=!1;;)if(void 0!==(u=o?this.ybt(u):this.wbt(u))){var h=Nj(u,this.klt(u),r,e,this.Ypt),a=i.eEt(h,n);if(s){var c=this.GTt(h,a);if(!this.bTt(c))return}if(void 0!==a)return a}else{if(o)return;o=!0,u=t}},n.Ckt=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;r.src&&this.pq.eV(r)}xp(this.pq.Z)},n.zx=function(){var t,i=this.hx;this.ckt=!0,i||(this.X8||(this.nEt(new wr),this.rEt()),(null==(t=this.jW)?void 0:t.sL)&&this.jW.Xx(),this.hEt())},n.Gx=function(){this.oEt||(this.oEt=new Xa),this.aEt();var t=this.oEt.Qy;return Er(t),t},n.aEt=function(){if(this.ckt=!1,this.n7=!0,this.uEt=!1,this.vkt(),this.UP){var t=this.rkt;t.V>0&&this.My(t.Tn(0))}this.X8||this.h7().then(this.cEt,this.nEt),this.MTt(),this.hEt()},n.h7=function(){return this.TL.Gx()},n.rEt=function(){this.TL.zx()},n.k7=function(){this.X8||(this.ckt=this.hx,this.X8=!0,this.rEt())},n.R7=function(){this.X8&&(this.X8=!1,this.ckt||this.h7().then(this.cEt,this.nEt),this.MTt(),this.hEt())},n.hEt=function(){var t=this.NV,i=this.hx;t!==i&&(this.NV=i,i?this.So(new pT(this.MP)):this.So(new _T(this.MP)))},n.My=function(t,i,n){return void 0===i&&(i=!1),void 0===n&&(n=Vj.NSt),this.Bkt=!0,this.OTt.Zg(),this.m7.Zg(),this.Sz=!0,this.q8=t,this.uEt=this.uEt&&this.z8(),this.fkt(this.lkt),this.dEt(new TT(this.MP)),this.m7=new dr,this.w7=br(this.y7(t,this.HTt,this.w7,this.UTt,this.m7.Yg,i,n),this.m7).catch(this.mmt),this.w7},n.lEt=function(){this.m7.Zg()},n.y7=function(){return jt(function(t,i,n,r,e,s,u,o){var h,a,c,f,v,d,l,g,w,m,y,p,_,k,b,A,T,S;return zt(this,function(E){switch(E.label){case 0:void 0===s&&(s=!1),void 0===u&&(u=Vj.NSt),void 0===o&&(o=!1),null==(h=this.jW)||h.Xx(),E.label=1;case 1:return E.trys.push([1,30,,31]),[4,ot.all([i,n,r])];case 2:return E.sent(),yr(e),[4,kr(this.WTt.Qy,e)];case 3:return E.sent(),f=this.rkt.DM(t),this.q8=f,v=o||(null==(c=this.Ac)||null==(a=c.dash)?void 0:a.forceHardSwitchWhenSeekingBackwards)&&f<=this.MP,d=this.fEt(f),l=this.qTt,v||!l||!l.Sx.Cr(f)&&u!==Vj.MSt&&l.Mc!==d?[3,8]:!(g=this.ekt)||g.nmt?[3,7]:[4,g.Jot()];case 4:return E.sent(),this.A3(),w=this.GTt(l.pmt,l.Tpt),this.bTt(w)?[4,this.kTt(w)]:[3,6];case 5:E.sent(),E.label=6;case 6:this.YTt=w,E.label=7;case 7:return[3,27];case 8:return d?(m=this.ekt,this.k7(),l?[4,l.Jot()]:[3,10]):[3,27];case 9:E.sent(),E.label=10;case 10:return!m||m.Mc!==d||v?[3,13]:(y=this.GTt(m.pmt,m.Tpt),this.A3(),this.bTt(y)?[4,this.kTt(y)]:[3,12]);case 11:E.sent(),E.label=12;case 12:return this.YTt=y,[3,25];case 13:return m?[4,m.kn(!0)]:[3,15];case 14:E.sent(),E.label=15;case 15:return p=this.klt(d),l&&NH(l.kmt,p),_=null==l?void 0:l.Mc,k=null==l?void 0:l.gmt,b=Nj(d,p,_,k,this.Ypt),A=this.zTt(d,b,_,k,!1),b.forEach(function(t){return t.Rt=!0}),T=this.GTt(b,A),!this.Hkt(d)||v?[3,18]:(this.A3(),this.bTt(T)?[4,this.kTt(T)]:[3,17]);case 16:E.sent(),E.label=17;case 17:return[3,23];case 18:return A=this.zTt(d,b,_,k,!0),T=this.GTt(b,A),l?(this.$kt.mn(Mg.pa,this.tEt),[4,l.kn()]):[3,20];case 19:E.sent(),this.$kt.wn(Mg.pa,this.tEt),this.qTt=void 0,E.label=20;case 20:return[4,this.PTt()];case 21:return E.sent(),[4,this.Lp(T)];case 22:E.sent(),E.label=23;case 23:return this.YTt=T,[4,this.NTt(d,p,b,A)];case 24:m=E.sent(),this.ekt=m,this.Ykt.BI=m.nt,this.Ikt(m),m.iat(this.qTt),E.label=25;case 25:return[4,m.$ot(rM.Lht)];case 26:return E.sent(),this.Dkt(m),[3,27];case 27:return Er(S=this.$Tt(f,s,!1,e)),this.q8=void 0,[4,this.qTt.$ot(rM.Lht)];case 28:return E.sent(),yr(e),this.QTt(),[4,S];case 29:return E.sent(),yr(e),this.R7(),this.Sz=!1,this.vEt(new ST(this.MP)),this.Nkt(),[3,31];case 30:return mr(E.sent())?[2]:[3,31];case 31:return[2]}})}).apply(this,arguments)},n.Nkt=function(){if(!this.hx&&!this.kx&&void 0!==this.BL){var t,i,n=this.MP;if(this.MP+this.BL-this.Fx.Cd.maximumOffset0&&(c=a.DM(t),s!==c&&(a.Cr(s)&&this.uyt.Idt.Km===DL.wV||(s=c,e=!0))),e)e=!1,null==o||o.Zg(),(o=new dr).$g(r),Er(u=br(this._Et(s,i,n,o.Yg),o));else if(!this.mkt&&!this.Y4)return[3,7];return f=Xt(h,dr.ep([r]),!1),[4,ot.race([u,this.ww([ch.iy,ch.Rw],f.Yg),this.uyt.Idt.ww(uM.yot,f.Yg)])];case 3:return d.sent(),[3,6];case 4:return v=d.sent(),h.error=v,h.hasError=!0,[3,6];case 5:return Gt(h),[7];case 6:return[3,1];case 7:return[2]}})}).call(this)},n._Et=function(t,i,n,r){return jt(function(){return zt(this,function(e){switch(e.label){case 0:this.TL.My(t,i,n),e.label=1;case 1:return this.mkt||this.Y4?[4,this.TL.ww([ch.Zw,ch.Vw],r)]:[3,3];case 2:return e.sent(),[3,1];case 3:return[2]}})}).call(this)},n.JTt=function(){void 0===this.skt&&(this.skt=this.ZTt,this.TL.mn(ch.$w,this.dEt),this.TL.mn(ch.Zw,this.vEt))},n.tkt=function(){if(void 0!==this.skt){var t=this.ZTt;this.skt=void 0,this.TL.wn(ch.$w,this.dEt),this.TL.wn(ch.Zw,this.vEt),this.ZTt!==t&&this.Nc()}},n.gEt=function(t){this.Ho=this.Ho.OM(t)},n.fEt=function(t){var i=this.uyt.Idt,n=i.smt.filter(function(t){return t.ct>=.2});if(0!==n.length){var r=n[0];if(t<=r.Tn)return r;for(var e,s=Ft(n);!(e=s()).done;){var u=e.value;if(u.An>t)return u}return i.Km!==DL.wV?n[n.length-1]:void 0}},n.ybt=function(t){for(var i=t.Smt;i&&i.ct<.2;)i=i.Smt;return i},n.wbt=function(t){for(var i=t.Tmt;i&&i.ct<.2;)i=i.Tmt;return i},n.Ta=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:r={stack:[],error:void 0,hasError:!1},f.label=1;case 1:return f.trys.push([1,8,9,10]),this.lq.IW(t.contentProtection),this.pEt(),!this.Ac||oT(this.Ac)?[3,3]:[4,this.hr()];case 2:f.sent(),f.label=3;case 3:return!t||oT(t)?[2]:(s=Xt(r,dr.ep([n]),!1),this.rV=dr.ep([s.Yg]),this.Ac=t,this.mEt=i,this.Ypt=t.abr,this.Npt=t.ignoreEmbeddedTextTrackTypes,u=new Hj(this.nV,Boolean(this.Ac.useCredentials),this._dt),o=Qj(u,this.eut),this.nSt(!0),this.Fkt=new Ij({iR:Vi.Dh(this.Ac.src),cSt:null!=(h=null==(e=this.Ac.latencyConfiguration)?void 0:e.targetOffset)?h:this.Ac.liveOffset,_St:this.Ac.timeServer,zk:this.Ac.useCredentials},this.wEt(this.Ypt),this.nV,o,this.Ac.dash),this.uyt=this.Fkt.Br,this.uyt.Idt.wn(ch.Ww,this.yEt),this.uyt.Idt.wn(ch.qw,this.AEt),this.uyt.Idt.wn(ej.xbt,this.bEt),this.uyt.Idt.wn(uM.yot,this.MTt),[4,this.SEt.Un(this.uyt.Idt)]);case 4:return f.sent(),[4,this.TEt.Un(this.uyt.Idt)];case 5:return f.sent(),Jn(this.Npt,Uw.EMSG)?[3,7]:(this.wpt=new AH(this.TL),this.Gl.FW(this.wpt.Z),[4,this.wpt.Un(this.uyt.Idt)]);case 6:f.sent(),f.label=7;case 7:return t.latencyConfiguration&&(a=t.latencyConfiguration,this.jW=new SH(this,this.TL,a),this.jW.Rt=!0,this.rq.Ea(this.jW)),this.vkt(),s.zg(),[3,10];case 8:return c=f.sent(),r.error=c,r.hasError=!0,[3,10];case 9:return Gt(r),[7];case 10:return[2]}})}).call(this)},n.Px=function(t,i,n,r){return ot.resolve()},n.xx=function(){return ot.resolve()},n.kEt=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=this.uyt.Idt.sx,this.nSt(t),t?(this.Pkt(),this.bq.mn(Mp.SM,this.EEt),[2]):this.Ukt()?(this.bq.wn(Mp.SM,this.EEt),[2]):[4,this.PEt()];case 1:return i.sent(),[2]}})}).call(this)},n.PEt=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return[4,ot.all([null==(t=this.qTt)?void 0:t.Jot(rM.Jht),null==(i=this.ekt)?void 0:i.Jot(rM.Jht)].filter(Fi))];case 1:throw n.sent(),this.Lkt(),this.lEt(),this.FTt.Zg(),new p("The provided MPEG-DASH manifest could not be loaded")}})}).call(this)},n.nSt=function(t){this.sSt!==t&&(this.sSt=t,this.So(t?new $j:new Kj))},n.vkt=function(){this.uyt&&(this.xEt=this.IEt(this.xEt,this.rV.Yg).catch(this.mmt))},n.IEt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return t?[4,t]:[3,2];case 1:r.sent(),yr(i),r.label=2;case 2:return r.trys.push([2,7,,8]),this.mx===eS.OL||this.n7?[4,this.REt(i)]:[3,4];case 3:return r.sent(),[3,6];case 4:return this.mx!==eS.VU?[3,6]:[4,this.CEt(i)];case 5:return r.sent(),[3,6];case 6:return[3,8];case 7:throw pr(n=r.sent()),this.qq(new md(gd.MANIFEST_LOAD_ERROR,n.message,n)),n;case 8:return[2]}})}).call(this)},n.REt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.CEt(t)];case 1:n.sent(),this.DEt||(this.DEt=!0,this.WTt.$g(this.Un(this.mEt,t))),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,this.WTt.Qy];case 3:return n.sent(),[3,5];case 4:return pr(i=n.sent()),this.qq(new md(gd.MEDIA_DECODE_ERROR,i.message,i)),[3,5];case 5:return[2]}})}).call(this)},n.CEt=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,kr(this.Fkt.W,t)];case 1:return o.sent(),i=this.uyt.Idt,void 0===this.jW&&i.Km===DL.wV&&(n=i.Zwt,r=(null==n?void 0:n.Mbt)?(null==n?void 0:n.Mbt)/1e3:i.aSt,e=(null==n?void 0:n.Dbt)?(null==n?void 0:n.Dbt)/1e3:.5*r,s=(null==n?void 0:n.Nbt)?(null==n?void 0:n.Nbt)/1e3:1.5*r,u={minimumOffset:e,maximumOffset:s,targetOffset:r,forceSeekOffset:2.5*r,minimumPlaybackRate:FA,maximumPlaybackRate:UA},this.jW=new SH(this,this.TL,u),this.rq.Ea(this.jW)),[2]}})}).call(this)},n.Dkt=function(t){var n=this.qTt;t!==n&&(this.qTt&&this.xkt(this.qTt),this.ekt&&this.Rkt(this.ekt),n&&this.fkt(this.lkt),this.qTt=t,this.ekt=n,this.Akt(this.qTt),this.ekt&&this.Ikt(this.ekt),this.YL.BI=t.ht,this.$L.BI=t.rt,this.Kkt(t),this.$kt.mn(Mg.pa,this.tEt),i.BEt(this.$kt),this.$kt.wn(Mg.pa,this.tEt),this.$kt.BI=t.nt,this.Ykt.BI=void 0,this.Qkt())},n.be=function(){this.TL.be()},n.we=function(){this.TL.we()},n.qq=function(t){this.JW||(Er(this.hr()),this.JW=ww(t),this.ZW=t,this.So(new Ib(t)))},n.pEt=function(){this.JW=void 0,this.ZW=void 0},n.STt=function(){var t=this.iq;t&&(t.K3&&(t.K3.MY=this.Rz.GY),t.Q3&&(t.Q3.MY=this.Rz.GY))},n.TTt=function(){var t=this.iq;t&&(t.K3&&(t.K3.UY=this.Rz.UY),t.Q3&&(t.Q3.UY=this.Rz.UY))},n.determineStallJumpTarget=function(){if(this.qTt)return this.qTt.Jpt()&&this.MP>this.qTt.An-_P&&!this.qTt.emt?this.qTt.An:void 0},n.hr=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:if(this.NEt)return[2,this.NEt];t.label=1;case 1:return t.trys.push([1,,3,4]),this.NEt=this.MEt(),[4,this.NEt];case 2:return t.sent(),[3,4];case 3:return this.NEt=void 0,[7];case 4:return[2]}})}).call(this)},n.MEt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.ux=1,this.rV.Zg(),this.lEt(),this.Lkt(),this.FTt.Zg(),this.WTt.Zg(),this.Bkt=!1,this.zx(),this.n7=!1,this.uEt=!1,this.YL.BI=void 0,this.$L.BI=void 0,this.$kt.BI=void 0,this.Ykt.BI=void 0,this.xEt?[4,this.xEt.catch(yn)]:[3,2];case 1:t.sent(),this.xEt=void 0,t.label=2;case 2:return[4,ot.all([this.HTt,this.w7,this.UTt,this.WTt.Qy.catch(yn)])];case 3:return t.sent(),this.qTt?[4,this.qTt.kn(!0)]:[3,5];case 4:t.sent(),this.qTt=void 0,t.label=5;case 5:return this.ekt?(this.Rkt(this.ekt),[4,this.ekt.kn(!0)]):[3,7];case 6:t.sent(),this.ekt=void 0,t.label=7;case 7:return[4,this.PTt()];case 8:return t.sent(),this.YTt=void 0,this.jkt=void 0,this.bq.mn(Mp.SM,this.EEt),this.bq.hr(),[4,this.SEt.hr()];case 9:return t.sent(),[4,this.TEt.hr()];case 10:return t.sent(),void 0===this.wpt?[3,12]:(this.Gl.WW(this.wpt.Z),[4,this.wpt.kn()]);case 11:t.sent(),this.wpt=void 0,t.label=12;case 12:return this.uyt?(this.uyt.Idt.mn(ch.Ww,this.yEt),this.uyt.Idt.mn(ch.qw,this.AEt),this.uyt.Idt.mn(ej.xbt,this.bEt),[4,this.Fkt.kn()]):[3,14];case 13:t.sent(),this.uyt=void 0,t.label=14;case 14:return this._kt=!1,this.LEt=NaN,this.OEt=0,this.FEt=0,this.skt=void 0,this.X8=!1,this.Ho=OA.iL(),this.NV=!0,this.q8=void 0,this.UEt=!1,this.Sz=!1,this.DEt=!1,this.WTt=new Xa,this.okt=0,this.akt=0,this.ukt=0,this.Ac=void 0,this.mEt=void 0,this.Npt=[],this.Zkt=void 0,this.rq.hr(),this.jW=void 0,this.xTt={iO:0,eO:0,sO:0},[4,this.pq.hr()];case 15:return t.sent(),this.TL.Aq(),this.VEt.hr(),[2]}})}).call(this)},n.kn=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),this.pEt(),[4,this.hr()];case 1:return t.sent(),this.Vo(),this.YL.kn(),this.$L.kn(),this.$kt.kn(),this.Ykt.kn(),this.Gl.kn(),this.bq.kn(),this.kq.zg(),[4,this.SEt.kn()];case 2:return t.sent(),[4,this.TEt.kn()];case 3:return t.sent(),this.VEt.kn(),this.TL.mn(ch.Rw,this.p9),this.TL.mn(mh.Dw,this.D8),this.TL.mn(ch.Bw,this.HEt),this.TL.mn(ch.$w,this.dEt),this.TL.mn(ch.Zw,this.vEt),this.TL.mn(ch.Jw,this.Ekt),this.TL.mn(ch._y,this.Nc),this.TL.mn([ch.uo,ch.jw],this.WEt),this.TL.mn(IH,this.Rs),[4,this.pq.kn()];case 4:return t.sent(),this.Gl.kn(),this.Rz.mn("NY",this.qEt),this.Rz.mn("FY",this.zEt),this.TL.mn(Jy.ma,this.GEt),this.TL.mn([ch.Pw,ch.Ew],this.Rs),this.TL.mn(ch.yy,this.Pmt),this.TL.mn(ch.LICENSE_REQUEST_GENERATED,this.umt),this.TL.Eq=void 0,this.lq.mn("contentProtectionsTracked",this.XEt),this.TL.N9=void 0,[2]}})}).call(this)},n.Hx=function(){return this.TL.Ma},n.Aa=function(){return this.TL.mq},n.jx=function(){return!1},n.Qx=function(){},n.Kx=function(){},n.Yx=function(){},n.Jx=function(){this.LTt(!0)},n.tI=function(t){var i=this.TL.wq(t);return this.VEt.tt(i),i},i.iEt=function(t,i){for(var n,r=[],e=[],s=!i.some(function(t){return t.Plt.some(function(t){return"main"===t.zE})}),u=Ft(i);!(n=u()).done;){var o=n.value;if(-1===r.indexOf(o)){var h=CH(o.Wdt.concat(o.Plt),s);s=!1;for(var a,c=o.rat.map(function(t){return t.kot}),f=new EL(o,c,h),v=Ft(PH(o,i));!(a=v()).done;){var d=a.value;f.slt(d),r.push(d)}e.push(f)}}return new Cj(t,e)},i.eEt=function(t,i){if(t.length){for(var n,r,e=Ft(t);!(r=e()).done;){var s=r.value,u=0===s.hlt.length;n=sH(n,aH(s.Nut,i,u))}return(null==i?void 0:i.preferredKeySystems)&&n&&(n.kpt=lH(n.kpt,i.preferredKeySystems)),n}},i.BEt=function(t){for(var i,n=Ft(t.II);!(i=n()).done;){i.value.Xk=$y.Nh}},xt(i,[{key:"ht",get:function(){return this.YL}},{key:"QW",get:function(){var t=this.ZTt,i=this.ikt,n=i.VM(t);if(-1!==n)return{Tn:i.Tn(n),An:i.An(n)}}},{key:"ikt",get:function(){var t,i,n,r,e=null!=(n=null==(t=this.qTt)?void 0:t.IP)?n:OA.iL(),s=null!=(r=null==(i=this.ekt)?void 0:i.IP)?r:OA.iL();return e.OM(s)}},{key:"IP",get:function(){return this.ikt._s()}},{key:"CP",get:function(){var t,i=null==(t=this.uyt)?void 0:t.Idt,n=null==i?void 0:i.Vwt;if(i&&n){var r=n.getTime(),e=1e3*this.MP;return new Date(e+r)}},set:function(t){var i,n=null==(i=this.uyt)?void 0:i.Idt,r=null==n?void 0:n.Vwt;if(t&&n&&r){var e=r.getTime()/1e3,s=t.getTime()/1e3;this.My(s-e)}}},{key:"bt",get:function(){return this.Ac}},{key:"ZTt",get:function(){return void 0!==this.q8?this.q8:void 0!==this.skt?this.skt:this.TL.MP}},{key:"MP",get:function(){return this.ZTt},set:function(t){this.OP(t)}},{key:"ct",get:function(){var t=NaN;return this.qTt&&this.qTt.emt?t=this.qTt.An:this.uyt&&void 0!==this.uyt.Idt.Km&&(t=this.uyt.Idt.Gwt?this.uyt.Idt.Gwt.Rmt():1/0),t}},{key:"An",get:function(){return this.ct}},{key:"UP",get:function(){return this.kx?this.z8():!(!this.qTt||!this.qTt.emt)&&this.TL.UP}},{key:"lt",get:function(){return this.JW}},{key:"WP",get:function(){return this.ZW}},{key:"zP",get:function(){}},{key:"jP",get:function(){}},{key:"JP",get:function(){return io({},this.ITt,{nO:Pb.Ng.fW(),rO:this.okt,hO:{amountOfBufferedAudioSegments:this.akt,amountOfBufferedVideoSegments:this.ukt}})}},{key:"ITt",get:function(){return function(t,i){return{iO:t.iO+i.iO,eO:t.eO+i.eO,sO:t.sO+i.sO}}(this.xTt,this.TL.ZP())}},{key:"$P",get:function(){return this.TL.$P},set:function(t){this.TL.$P=t}},{key:"hx",get:function(){return this.X8?this.ckt:this.qTt&&this.qTt.emt?this.dkt:this.ckt}},{key:"ux",get:function(){return this.TL.ux},set:function(t){this.TL.ux=t}},{key:"_x",get:function(){var t=this.Ho;return this.qTt&&(t=t.OM(this.lkt)),t.LM(.1)._s()}},{key:"lkt",get:function(){return this.TL._x}},{key:"mx",get:function(){return this.tq},set:function(t){this.tq=t,this.vkt()}},{key:"Ax",get:function(){var t=this.TL.Ax;return this._kt&&(t=A.max(Up.Qn,t)),t}},{key:"rkt",get:function(){return this.gkt(!1)}},{key:"pkt",get:function(){return this.gkt(!0)}},{key:"Sx",get:function(){return this.rkt._s()}},{key:"kx",get:function(){return this.Sz||this.mkt}},{key:"mkt",get:function(){return this.TL.kx}},{key:"Y4",get:function(){return this.TL.Y4}},{key:"nq",get:function(){}},{key:"wkt",get:function(){var t,i;return null!=(i=null==(t=this.uyt)?void 0:t.Idt.Km)?i:DL.mV}},{key:"nt",get:function(){return this.Gl}},{key:"rt",get:function(){return this.$L}},{key:"Rx",get:function(){var t;return QR(this.TL)&&(this.TL.Rx||(null==(t=this.ykt())?void 0:t.Mi))||0}},{key:"Bx",get:function(){var t;return QR(this.TL)&&(this.TL.Bx||(null==(t=this.ykt())?void 0:t.Ti))||0}},{key:"Mx",get:function(){return this.TL.Mx},set:function(t){this.TL.Mx=Cn(t,0,1)}},{key:"Fx",get:function(){return this.rq}},{key:"Vx",get:function(){return!1},set:function(t){}},{key:"hq",get:function(){return this.oq}},{key:"dkt",get:function(){return this.TL.hx}},{key:"sx",get:function(){return this.sSt}},{key:"KP",get:function(){return!1}},{key:"BL",get:function(){var t,i=null==(t=this.uyt)?void 0:t.Idt;if(i&&i.Km===DL.wV&&i.Vwt)return i.xdt().getTime()/1e3-i.Vwt.getTime()/1e3-this.MP}}]),i}(uh);function CH(t,i){var n=t.filter(function(t){return"urn:mpeg:dash:role:2011"===t.y8}).map(function(t){return t.zE}).filter(Fi);return i||Jn(n,"main")?Jn(n,"caption")?"captions":Jn(n,"subtitle")?"subtitles":Jn(n,"dub")?"translation":"main":Jn(n,"sign")?"sign":Jn(n,"description")?"descriptions":Jn(n,"commentary")?"commentary":"alternative"}function PH(t,i){for(var n,r,e,s=function(){var t=e.value,n=Number(t),r=Wn(i,function(t){return t.o===n});r&&h.push(r)},u=Wn([].concat(t.iwt,t.ewt),function(t){return"urn:mpeg:dash:adaptation-set-switching:2016"===t.y8}),o=null!=(r=null==u||null==(n=u.zE)?void 0:n.split(","))?r:[],h=[],a=Ft(o);!(e=a()).done;)s();return h}function NH(t,i){for(var n,r=function(){var t=function(){var t=s.value,i=t.YI;if(!i)return"continue";var n=t.rat.map(function(t){return t.o}),r=Wn(o,function(t){var i=t.rat.map(function(t){return t.o});return ir(n,i)});if(!r)return"continue";var e=i.map(function(t){return t.o});r.YI=r.KI.II.filter(function(t){return Jn(e,t.o)})},r=n.value,e=Wn(i,function(t){return t.Km===r.Km});if(!e)return"continue";for(var s,u=r.Z,o=e.Z,h=Ft(u);!(s=h()).done;)t()},e=Ft(t);!(n=e()).done;)r()}V(),It(),Wt(),Yt();var DH=function(){function t(t,i,n,r){this.QEt=void 0,this.KEt=void 0,this.YEt=void 0,this.JEt=void 0,this.QEt=t,this.KEt=i,this.YEt=n,this.JEt=r}var i=t.prototype;return i.HSt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.QEt.jEt(t.map(Wj))];case 1:return[2,i.sent().shift()]}})}).call(this)},i.Uct=function(t,i){var n=zj(t,i);return this.KEt.Hy(n)},i.iut=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return r=zj(t,i),[4,this.YEt.Wy(r)];case 1:return[2,null==(n=e.sent())?void 0:n.data]}})}).call(this)},i.WJ=function(t){return this.JEt.Wy(t)},t}();V(),It(),Bt(),V(),It(),V(),It();var xH=function(){function t(){}var i=t.prototype;return i.ZEt=function(t){return ot.resolve(!1)},i.zSt=function(t){return ot.reject(BH)},i.$Et=function(t){return ot.reject(BH)},i.Hy=function(t){return ot.resolve(!1)},i.Wy=function(t){return ot.resolve(void 0)},i.tPt=function(t,i){return ot.resolve(void 0)},i.jEt=function(t){return ot.resolve([])},i.iPt=function(){return ot.resolve([])},i.ePt=function(t){return ot.resolve([])},i.sPt=function(t,i){return ot.resolve([])},i._S=function(t){return ot.reject(BH)},i.nPt=function(t){return ot.reject(BH)},i.rPt=function(){return ot.reject(BH)},t}(),BH="Storage disabled",OH=function(){function t(){this.dPt=void 0,this.ect=void 0,this.lPt=void 0,this.fPt=void 0,this.vPt=void 0,this.dPt=new xH,this.ect=new xH,this.lPt=new xH,this.fPt=new xH,this.vPt=new xH}return t.prototype.uPt=function(t){return ot.reject(MH)},t.Ret=function(){return ot.resolve(new t)},t}(),MH="Storage disabled";V(),It(),Wt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Bt(),Yt();var LH=function(){function t(t){var i=this;this.Jg=new Xa,this.oPt=void 0,this.Jg.$g(t),this.Jg.Qy.then(function(t){i.oPt=t})}var i=t.prototype;return i.ZEt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.oPt)?[3,2]:[4,this.hPt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.ZEt(t)]}})}).call(this)},i.zSt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return(n=this.oPt)?[3,2]:[4,this.hPt];case 1:n=r.sent(),r.label=2;case 2:return[2,n.zSt(t,i)]}})}).call(this)},i.$Et=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return(n=this.oPt)?[3,2]:[4,this.hPt];case 1:n=r.sent(),r.label=2;case 2:return[2,n.$Et(t,i)]}})}).call(this)},i.Hy=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.oPt)?[3,2]:[4,this.hPt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.Hy(t)]}})}).call(this)},i.Wy=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.oPt)?[3,2]:[4,this.hPt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.Wy(t)]}})}).call(this)},i.tPt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return(n=this.oPt)?[3,2]:[4,this.hPt];case 1:n=r.sent(),r.label=2;case 2:return[2,n.tPt(t,i)]}})}).call(this)},i.jEt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.oPt)?[3,2]:[4,this.hPt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.jEt(t)]}})}).call(this)},i.iPt=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(t=this.oPt)?[3,2]:[4,this.hPt];case 1:t=i.sent(),i.label=2;case 2:return[2,t.iPt()]}})}).call(this)},i.ePt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.oPt)?[3,2]:[4,this.hPt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.ePt(t)]}})}).call(this)},i.sPt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return(n=this.oPt)?[3,2]:[4,this.hPt];case 1:n=r.sent(),r.label=2;case 2:return[2,n.sPt(t,i)]}})}).call(this)},i._S=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.oPt)?[3,2]:[4,this.hPt];case 1:i=n.sent(),n.label=2;case 2:return[2,i._S(t)]}})}).call(this)},i.nPt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.oPt)?[3,2]:[4,this.hPt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.nPt(t)]}})}).call(this)},i.rPt=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(t=this.oPt)?[3,2]:[4,this.hPt];case 1:t=i.sent(),i.label=2;case 2:return[2,t.rPt()]}})}).call(this)},xt(t,[{key:"hPt",get:function(){return this.Jg.Qy}}]),t}(),FH=function(){function t(t){var i=this;this.Jg=new Xa,this.cPt=void 0,this.ect=void 0,this.dPt=void 0,this.lPt=void 0,this.fPt=void 0,this.vPt=void 0,this.Jg.$g(t);var n=this.Jg.Qy;n.then(function(t){i.cPt=t}),this.ect=new LH(n.then(function(t){return t.ect})),this.dPt=new LH(n.then(function(t){return t.dPt})),this.lPt=new LH(n.then(function(t){return t.lPt})),this.fPt=new LH(n.then(function(t){return t.fPt})),this.vPt=new LH(n.then(function(t){return t.vPt}))}return t.prototype.uPt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.cPt)?[3,2]:[4,this.aPt];case 1:i=n.sent(),n.label=2;case 2:return[4,i.uPt(t)];case 3:return[2,n.sent()]}})}).call(this)},xt(t,[{key:"aPt",get:function(){return this.Jg.Qy}}]),t}();function UH(t){return new p("This storage cannot handle persistency type "+t)}V(),It(),V(),It(),Ut(),V(),It();var VH=function(t){return t._Pt="readonly",t.gPt="readwrite",t}({}),jH=function(){function t(){this.EA=[]}var i=t.prototype;return i.ZEt=function(t){return ot.resolve("temporary"===t)},i.zSt=function(t,i){return void 0===i&&(i="temporary"),"temporary"!==i?ot.reject(UH(i)):(this.pPt(t.key),this.EA.push(t),ot.resolve())},i.$Et=function(t,i){if(void 0===i&&(i="temporary"),"temporary"!==i)return ot.reject(UH(i));for(var n,r=Ft(t);!(n=r()).done;){var e=n.value;this.pPt(e.key)}for(var s,u=Ft(t);!(s=u()).done;){var o=s.value;this.EA.push(o)}return ot.resolve()},i.Hy=function(t){return ot.resolve(Boolean(this.mPt(t)))},i.Wy=function(t){return ot.resolve(this.mPt(t))},i.tPt=function(t,i){return ot.resolve(this.wPt(t,i))},i.jEt=function(t){var i=this,n=t?t.map(function(t){return i.mPt(t)}):this.EA;return ot.resolve(n.filter(Fi))},i.iPt=function(){return ot.resolve([].concat(this.EA))},i.ePt=function(t){return this.sPt(t,"key")},i.sPt=function(t,i){var n=this.EA.filter(function(n){return n[i]===t});return ot.resolve(n)},i._S=function(t){return this.pPt(t),ot.resolve()},i.nPt=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;this.pPt(r)}return ot.resolve()},i.rPt=function(){return tr(this.EA),ot.resolve()},i.mPt=function(t){return this.wPt(t,"key")},i.wPt=function(t,i){for(var n,r=Ft(this.EA);!(n=r()).done;){var e=n.value;if(e[i]===t)return e}},i.pPt=function(t){var i=this.mPt(t);i&&Yn(this.EA,i)},t}(),HH=function(){function t(){this.dPt=void 0,this.ect=void 0,this.lPt=void 0,this.fPt=void 0,this.vPt=void 0,this.dPt=new jH,this.ect=new jH,this.lPt=new jH,this.fPt=new jH,this.vPt=new jH}return t.prototype.uPt=function(t){return t(this)},t.Ret=function(){return ot.resolve(new t)},t}();V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Ut(),Yt();var WH=function(){function t(t){this.yPt=void 0,this.yPt=t}var i=t.prototype;return i.ZEt=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=Ft(this.yPt),r.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value.ZEt(t)];case 2:if(r.sent())return[2,!0];r.label=3;case 3:return[3,1];case 4:return[2,!1]}})}).call(this)},i.zSt=function(t,i){return void 0===i&&(i="persistent"),jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Ft(this.yPt),s.label=1;case 1:return(r=n()).done?[3,4]:[4,(e=r.value).ZEt(i)];case 2:if(s.sent())return[2,e.zSt(t)];s.label=3;case 3:return[3,1];case 4:throw UH(i)}})}).call(this)},i.$Et=function(t,i){return void 0===i&&(i="persistent"),jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Ft(this.yPt),s.label=1;case 1:return(r=n()).done?[3,4]:[4,(e=r.value).ZEt(i)];case 2:if(s.sent())return[2,e.$Et(t)];s.label=3;case 3:return[3,1];case 4:throw UH(i)}})}).call(this)},i.Hy=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=Ft(this.yPt),r.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value.Hy(t)];case 2:if(r.sent())return[2,!0];r.label=3;case 3:return[3,1];case 4:return[2,!1]}})}).call(this)},i.Wy=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:i=Ft(this.yPt),e.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value.Wy(t)];case 2:if(r=e.sent())return[2,r];e.label=3;case 3:return[3,1];case 4:return[2,void 0]}})}).call(this)},i.tPt=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Ft(this.yPt),s.label=1;case 1:return(r=n()).done?[3,4]:[4,r.value.tPt(t,i)];case 2:if(e=s.sent())return[2,e];s.label=3;case 3:return[3,1];case 4:return[2,void 0]}})}).call(this)},i.jEt=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:i=[],n=Ft(this.yPt),f.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,o=(u=(s=i).push).apply,h=[s],c=(a=[]).concat,[4,e.jEt(t)]);case 2:o.apply(u,h.concat([c.apply(a,[f.sent()])])),f.label=3;case 3:return[3,1];case 4:return[2,i]}})}).call(this)},i.iPt=function(){return jt(function(){var t,i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:t=[],i=Ft(this.yPt),c.label=1;case 1:return(n=i()).done?[3,4]:(r=n.value,u=(s=(e=t).push).apply,o=[e],a=(h=[]).concat,[4,r.iPt()]);case 2:u.apply(s,o.concat([a.apply(h,[c.sent()])])),c.label=3;case 3:return[3,1];case 4:return[2,t]}})}).call(this)},i.ePt=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:i=[],n=Ft(this.yPt),f.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,o=(u=(s=i).push).apply,h=[s],c=(a=[]).concat,[4,e.ePt(t)]);case 2:o.apply(u,h.concat([c.apply(a,[f.sent()])])),f.label=3;case 3:return[3,1];case 4:return[2,i]}})}).call(this)},i.sPt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:n=[],r=Ft(this.yPt),v.label=1;case 1:return(e=r()).done?[3,4]:(s=e.value,h=(o=(u=n).push).apply,a=[u],f=(c=[]).concat,[4,s.sPt(t,i)]);case 2:h.apply(o,a.concat([f.apply(c,[v.sent()])])),v.label=3;case 3:return[3,1];case 4:return[2,n]}})}).call(this)},i._S=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=Ft(this.yPt),r.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value._S(t)];case 2:r.sent(),r.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},i.nPt=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=Ft(this.yPt),r.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value.nPt(t)];case 2:r.sent(),r.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},i.rPt=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:t=Ft(this.yPt),n.label=1;case 1:return(i=t()).done?[3,4]:[4,i.value.rPt()];case 2:n.sent(),n.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},t}();function zH(t){return function(){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,ot.all(t.map(function(t){return t()}))];case 1:return i=n.sent(),[2,qH.Ret(i)]}})})()}}var qH=function(){function t(t){this.EPt=void 0,this.APt=void 0,this.bPt=void 0,this.SPt=void 0,this.TPt=void 0,this.kPt=void 0,this.EPt=t,this.APt=new WH(t.map(function(t){return t.fPt})),this.bPt=new WH(t.map(function(t){return t.vPt})),this.SPt=new WH(t.map(function(t){return t.lPt})),this.TPt=new WH(t.map(function(t){return t.dPt})),this.kPt=new WH(t.map(function(t){return t.ect}))}return t.prototype.uPt=function(i){var n=this;if(0===this.EPt.length)return i(this);var r=[],e=0,s=function(u){return r.push(u),++e0)return A.max(0,t.Tn(0)-300)}return 0},n.y7=function(i,n,r,e,s,u,o,h){return void 0===u&&(u=!1),void 0===o&&(o=Vj.NSt),void 0===h&&(h=!1),h||(h=this.ct===1/0&&Oi.w_&&Oi.A_<3&&i<=this.MP),t.prototype.y7.call(this,i,n,r,e,s,u,o,h)},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return n.sent(),this.NPt=void 0,this.TL.DPt=0,[2]}})}).call(this)},n.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.TL.zg()];case 2:return n.sent(),[4,this.xq.Pq(this.TL)];case 3:return n.sent(),[2]}})}).call(this)},i.LS=function(t){var i;return(!t||"google-dai"!==(null==t||null==(i=t.ssai)?void 0:i.integration))&&(Oi.w_&&Oi.A_<4)},i}(QH);V(),It(),Wt(),Nt(),Yt(),V(),It(),Wt(),Nt(),H(),Yt(),V(),It(),Bt(),Nt(),V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It(),Bt(),Nt();var oW=function(t){function i(i){return t.call(this,i)||this}return Pt(i,t),xt(i,[{key:"Nrt",get:function(){return this.TL}},{key:"Rx",get:function(){return this.TL.Rx}},{key:"Bx",get:function(){return this.TL.Bx}}]),i}(WO);V(),It(),Wt(),Nt(),Yt(),V(),It(),Wt(),Nt(),Yt(),V(),It(),Wt(),Nt(),Ut(),Yt();var hW=function(t){function i(i){var n;return(n=t.call(this,i)||this).b3=void 0,n.LPt=void 0,n.jY=0,n.OPt=OA.iL(),n.YS=void 0,n.FPt=OA.iL(),n.WPt=[],n.ZPt=!1,n.zY=0,n.YS=i.Cd,n}Pt(i,t);var n=i.prototype;return n.brt=function(){return this.LPt?this.jY:t.prototype.brt.call(this)},n.Srt=function(i){this.LPt?this.jY=i:t.prototype.Srt.call(this,i)},n.RP=function(){return this.LPt?this.OPt:t.prototype.RP.call(this)},n.CS=function(){return this.LPt?this.YS:t.prototype.CS.call(this)},n.krt=function(){return this.LPt?this.FPt:t.prototype.krt.call(this)},n.Ert=function(){return this.LPt?this.zY:t.prototype.Ert.call(this)},n.Prt=function(i){this.LPt?this.zY=i:t.prototype.Prt.call(this,i)},n.H2=function(t,i,n){var r=this;return this.W2(function(n){return r.UPt(t,i,n)},n)},n.UPt=function(i,n,r){return t.prototype.H2.call(this,i,n,r)},n.V3=function(){var t=this;return this.W2(function(){return t.VPt()})},n.VPt=function(){return t.prototype.V3.call(this)},n.z2=function(t,i,n){var r=this;return this.W2(function(n){return r.HPt(t,i,n)},n)},n.HPt=function(i,n,r){return t.prototype.z2.call(this,i,n,r)},n.F3=function(t,i){this.LPt?(this.FPt=this.FPt.OM(new OA([t,i])),this.WPt.push({Km:"Yut",EO:t,PO:i})):this.qPt(t,i)},n.qPt=function(i,n){t.prototype.F3.call(this,i,n)},n.r3=function(t,i){var n=this;return this.W2(function(){return n.zPt(t,i)})},n.zPt=function(i,n){return t.prototype.r3.call(this,i,n)},n.U3=function(t,i){this.LPt?(this.FPt=this.FPt.UM(new OA([t,i])),this.WPt.push({Km:"_S",EO:t,PO:i})):this.GPt(t,i)},n.GPt=function(i,n){t.prototype.U3.call(this,i,n)},n._S=function(t,i,n){var r=this;return this.W2(function(n){return r.XPt(t,i,n)},n)},n.XPt=function(i,n,r){return t.prototype._S.call(this,i,n,r)},n.EZ=function(t){var i=this;return this.W2(function(){return i.jPt(t)})},n.jPt=function(i){return t.prototype.EZ.call(this,i)},n.W2=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:this.v3(),n.label=1;case 1:return this.LPt?[4,kr(this.LPt.Qy,i)]:[3,3];case 2:return n.sent(),this.v3(),[3,1];case 3:yr(i),n.label=4;case 4:return n.trys.push([4,,6,7]),this.b3=t(i),[4,this.b3];case 5:return n.sent(),[3,7];case 6:return this.b3=void 0,[7];case 7:return[2]}})}).call(this)},n.v3=function(){if(this.b3)throw new p("Internal error")},n.QPt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:if(this.LPt)throw new _("Already locked");return this.LPt=new Xa,this.KPt(),this.b3?[4,this.b3.catch(yn)]:[3,2];case 1:t.sent(),this.KPt(),t.label=2;case 2:return[2]}})}).call(this)},n.YPt=function(){var t=this.LPt;void 0!==t&&(t.Xy(),this.LPt=void 0,this.JPt())},n.KPt=function(){this.YS=t.prototype.CS.call(this),this.jY=t.prototype.brt.call(this),this.zY=t.prototype.Ert.call(this),this.OPt=t.prototype.RP.call(this),this.FPt=t.prototype.krt.call(this),this.ZPt=!1},n.JPt=function(){this.v3(),t.prototype.Srt.call(this,this.jY),t.prototype.Prt.call(this,this.zY);var i=this.WPt.slice();tr(this.WPt);for(var n,r=Ft(i);!(n=r()).done;){var e=n.value;"Yut"===e.Km?this.qPt(e.EO,e.PO):this.GPt(e.EO,e.PO)}this.OPt.GM(t.prototype.RP.call(this))||this.So(new ah($R.lZ))},n.zg=function(){var i;null==(i=this.LPt)||i.Zg(),this.LPt=void 0,t.prototype.zg.call(this)},i}(FO),aW=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).pE=void 0,r.$Pt=void 0,r.pE=i,r}Pt(i,t);var n=i.prototype;return n.RP=function(){var i,n;return t.prototype.RP.call(this).OM(null!=(n=null==(i=this.$Pt)?void 0:i.IP)?n:OA.iL())},n.krt=function(){var i,n;return t.prototype.krt.call(this).OM(null!=(n=null==(i=this.$Pt)?void 0:i.M3)?n:OA.iL())},n.Srt=function(i){t.prototype.Srt.call(this,i),this.$Pt&&(this.$Pt.UY=i)},n.Prt=function(i){t.prototype.Prt.call(this,i),this.$Pt&&(this.$Pt.MY=i)},n.qPt=function(i,n){t.prototype.qPt.call(this,i,n),this.$Pt&&this.$Pt.F3(i,n)},n.GPt=function(i,n){t.prototype.GPt.call(this,i,n),this.$Pt&&this.$Pt.U3(i,n)},n.XPt=function(i,n,r){var e=this;return jt(function(){var s;return zt(this,function(u){switch(u.label){case 0:return yr(r),(s=[]).push(t.prototype.XPt.call(e,i,n,r)),this.$Pt&&s.push(this.$Pt._S(i,n,r)),[4,ot.all(s)];case 1:return u.sent(),[2]}})}).call(this)},n.TZ=function(i){return!!t.prototype.TZ.call(this,i)||this.pE.txt(i)},n.jPt=function(i){return t.prototype.TZ.call(this,i)?t.prototype.jPt.call(this,i):this.pE.ixt(i)},n.sxt=function(t){var i,n;null==(i=this.$Pt)||i.mn(KR,this.xrt),this.$Pt=t,null==(n=this.$Pt)||n.wn(KR,this.xrt)},i}(hW),cW=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).pE=void 0,r.nxt=void 0,r.WA=NaN,r.cxt=!1,r.dxt=!1,r.lxt=void 0,r.grt(n),r.pE=i,r}Pt(i,t);var n=i.prototype;return n.TZ=function(i){return!!RD(this,i)&&(!!t.prototype.TZ.call(this,i)||(!(!this.nxt||!this.nxt.TZ(i))||this.pE.rxt(i)))},n.EZ=function(i){var n=this;return jt(function(){return zt(this,function(r){switch(r.label){case 0:return t.prototype.TZ.call(n,i)?[4,t.prototype.EZ.call(n,i)]:[3,2];case 1:case 3:case 6:return[2,r.sent()];case 2:return this.nxt&&this.nxt.TZ(i)?(this.hxt(),[4,this.EZ(i)]):[3,4];case 4:return[4,this.pE.oxt(i)];case 5:return r.sent(),[4,this.EZ(i)];case 7:return[2]}})}).call(this)},n.txt=function(t){return this.TZ(this.axt(t))},n.ixt=function(t){return this.EZ(this.axt(t))},n.axt=function(t){var i=this.Cd,n=i.L4.map(function(i){return qv(t.qT)&&qv(i.qT)||Xv(t.qT)&&Xv(i.qT)?t:i});return io({},i,{L4:n})},n.M4=function(i,n,r,e){t.prototype.M4.call(this,i,n,r,e),this.nxt&&this.nxt.M4(i,n,r,e)},n.uxt=function(){return!this.cxt&&this.dxt},n.Nd=function(){return void 0!==this.lxt?this.lxt:this.uxt()?this.WA:t.prototype.Nd.call(this)},n.C4=function(i){this.WA=i,this.lxt=void 0,this.uxt()||t.prototype.C4.call(this,i)},n._rt=function(){return!this.uxt()&&t.prototype._rt.call(this)},n.C3=function(){this.lxt=A.max(fW(this.iq.Q3),fW(this.iq.K3)),this.uxt()||t.prototype.C3.call(this)},n.A3=function(){this.lxt=void 0,this.uxt()||t.prototype.A3.call(this)},n.mrt=function(t){return new aW(this,t)},n.fxt=function(){this.cxt=!this.cxt},n.hxt=function(){var t=this.iq,i=this.nxt;i&&(this.cxt=!this.cxt,this.grt(i),this.vxt(t),this.uxt()&&this._xt())},n.vxt=function(t){var i,n;this.nxt=t,null==(i=this.P4)||i.sxt(null==t?void 0:t.Q3),null==(n=this.x4)||n.sxt(null==t?void 0:t.K3)},n.gxt=function(t){var i=this.iq,n=this.nxt;if(n){var r=this.cxt,e=r?i:n,s=(r?n:i).IP.JM(t);if(s){var u=sM(e.IP,this.krt()).JM(s.An(0),me);if(u&&!(s.An(0)+me>=u.An(0)))return A.max(s.An(0),u.Tn(0))}}},n.pxt=function(t,i){var n=this;if(this.dxt)return ot.resolve();var r=this.cxt?this.nxt:this.iq;return r?(this.dxt=!0,this.mxt(function(i){if(yr(i),n.dxt)return function(t,i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return yr(n),r=[],t.Q3&&r.push(yP(t.Q3,i,n)),t.K3&&r.push(yP(t.K3,i,n)),[4,ot.all(r)];case 1:return e.sent(),t.C3(),[2]}})})()}(r,t,i)},i)):ot.resolve()},n._xt=function(){if(this.dxt){var t=this.cxt?this.nxt:this.iq;if(t){var i;0,this.dxt=!1;var n=null!=(i=this.lxt)?i:this.WA;t.ct0?i.An(i.V-1):0}function vW(t){return t.Cd.Km===Op.wV}V(),It();var dW=function(t){function i(i,n,r){var e;return(e=t.call(this,i)||this).Axt=void 0,e.Gl=void 0,e.JU=void 0,e.bxt=!1,e.q8=void 0,e.A7=NaN,e.Ho=OA.iL(),e.kz=!0,e.Bxt=!1,e.yz=!0,e.Ext=void 0,e.xxt=void 0,e.Txt=void 0,e.Sxt=new dr,e.m7=new dr,e.Axt=n,e.Ext=i,e.TL.be(),e.Axt.we(),e.JU=new tW(e,r),e.Gl=new Mb([e.JU.nt,t.prototype.Ix.call($H(e))]),e}Pt(i,t);var n=i.prototype;return n.RP=function(){return t.prototype.RP.call(this).OM(this.Axt.IP)},n.Nd=function(){if(!this.bxt){var i=this.iq;if(i&&vW(i))return i.ct}return t.prototype.Nd.call(this)},n.Lrt=function(){return!!t.prototype.Lrt.call(this)&&!(!this.bxt&&!this.WZ())},n.Ort=function(){return!!t.prototype.Ort.call(this)&&!(!this.bxt&&t.prototype.Lrt.call(this)&&!this.WZ())},n.WZ=function(){var t=this.iq;return!(!t||!vW(t))&&t.WZ},n.gx=function(){return this.Ho.OM(this.TL._x)},n.Tx=function(){return t.prototype.Tx.call(this).OM(this.Axt.Sx)},n.bx=function(){return t.prototype.bx.call(this)},n.Mrt=function(){var i;return null!=(i=t.prototype.Mrt.call(this))?i:this.Axt.nq},n.Gx=function(){return this.kz=!1,t.prototype.Gx.call(this)},n.zx=function(){this.kz=!0,t.prototype.zx.call(this)},n.x9=function(){this.bxt=!0,t.prototype.x9.call(this),this.Axt.x9()},n.I9=function(){this.bxt=!1,t.prototype.I9.call(this),this.Axt.x9()},n.LP=function(){var i;return null!=(i=this.q8)?i:t.prototype.LP.call(this)},n.Ex=function(){return void 0!==this.q8||t.prototype.Ex.call(this)},n.My=function(t,i,n){void 0===i&&(i=!1),void 0===n&&(n=!1),this.Sxt.Zg(),this.m7.Zg(),this.m7=new dr,this.Txt=br(this.y7(t,i,n,this.Txt,this.m7.Yg),this.m7).catch(yn)},n.y7=function(i,n,r,e,s){var u=this;return jt(function(){return zt(this,function(o){switch(o.label){case 0:return this.q8=i,this.A7=i,this.So(new TT(i)),e?[4,e.catch(yn)]:[3,2];case 1:o.sent(),o.label=2;case 2:return yr(s),this.iq&&vW(this.iq)&&this.iq._xt(),this.q8=void 0,t.prototype.My.call(u,i,n,r),this.Axt.My(i,n,r),this.kxt(),[2]}})}).call(this)},n.KW=function(t){var i=this.nq;if(i&&!E(i.getTime())){var n=(t.getTime()-i.getTime())/1e3;this.My(n)}},n.D9=function(){t.prototype.D9.call(this),this.Axt.D9()},n.we=function(){this.yz&&(this.yz=!1,this.Ext.we())},n.be=function(){this.yz||(this.yz=!0,this.Ext.be())},n.Pxt=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.q8=void 0,this.A7=NaN,this.Ho=OA.iL(),null==(t=this.xxt)||t.Zg(),this.Sxt.Zg(),this.m7.Zg(),this.Txt?[4,this.Txt.catch(yn)]:[3,2];case 1:i.sent(),this.Txt=void 0,i.label=2;case 2:return[2]}})}).call(this)},n.Wrt=function(i){t.prototype.Wrt.call(this,i),this.Axt.Eq=i},n.qrt=function(i){t.prototype.qrt.call(this,i),this.Axt.N9=i},n.Ix=function(){return this.Gl},n.tI=function(t,i,n,r,e,s,u,o){return this.JU.tI(t,i,n,r,e,s,u,o)},n.wq=function(t){return this.JU.wq(t)},n.gq=function(t,i,n,r,e){throw new p("Not implemented yet")},n.vq=function(){return!1},n.iV=function(t){this.JU.iV(t)},n.Aq=function(){this.JU.hr(),t.prototype.Aq.call(this)},n.Un=function(i){var n=this;return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Un.call(n,i)];case 1:return vW(r=e.sent())&&this.kxt(),[2,r]}})}).call(this)},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.Pxt()];case 1:return n.sent(),[4,t.prototype.hr.call(i)];case 2:return n.sent(),[4,this.Axt.hr()];case 3:return n.sent(),[2]}})}).call(this)},n.C8=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.Pxt()];case 1:return n.sent(),[4,t.prototype.C8.call(i)];case 2:return n.sent(),[4,this.Axt.C8()];case 3:return n.sent(),[2]}})}).call(this)},n.zg=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.Pxt()];case 1:return n.sent(),this.JU.kn(),this.Gl.kn(),[4,t.prototype.zg.call(i)];case 2:return n.sent(),[2]}})}).call(this)},n.Xrt=function(t){return new cW(this,t)},n.Grt=function(t){return new jO(t)},n.kxt=function(){this.Sxt.Zg(),this.Sxt=new dr,this.Txt=br(this.Ixt(this.Txt,this.Sxt.Yg),this.Sxt).catch(yn)},n.Ixt=function(t,i){return jt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return t?[4,t.catch(yn)]:[3,2];case 1:u.sent(),u.label=2;case 2:if(!this.iq||!vW(this.iq))return[2];u.label=3;case 3:0,yr(i),this.Rxt()&&this.fxt(),n=void 0,this.iq._xt(),yr(i),u.label=4;case 4:0,r={stack:[],error:void 0,hasError:!1},u.label=5;case 5:return u.trys.push([5,9,10,11]),yr(i),this.Rxt()?[3,12]:void 0===(n=this.iq.gxt(this.LP()))?[3,7]:(this.Cxt(),[4,this.iq.pxt(n,i)]);case 6:return u.sent(),yr(i),this.Axt.My(n),[3,12];case 7:return e=Xt(r,dr.ep([i]),!1),[4,ot.race([this.ww(ch._y,e.Yg),this.Dxt(e.Yg)])];case 8:return u.sent(),[3,11];case 9:return s=u.sent(),r.error=s,r.hasError=!0,[3,11];case 10:return Gt(r),[7];case 11:return[3,4];case 12:yr(i),u.label=13;case 13:return this.Rxt()?[3,15]:[4,this.TL.ww([ch._y,ch.Bw,Mp.wI],i)];case 14:return u.sent(),[3,13];case 15:return[3,3];case 16:return[2]}})}).call(this)},n.Rxt=function(){var t=this.iq;if(void 0===t||!vW(t))return!1;var i=this.LP(),n=this.TL.IP;return!(!this.TL.UP&&n.Cr(i))&&!!sM(this.Axt.IP,t.krt()).qM(i,i+me)},n.fxt=function(){if(!this.Bxt){0,this.Bxt=!0,this.Ho=this.gx();var t=DP(this),i=this.Ex(),n=this.bx(),r=this.TL,e=this.Axt,s=this.iq;s._xt(),s.fxt(),xP(e,t),this.Qrt(e),this.Axt=r,r.zx(),r.$P=!0,this.Bxt=!1;var u=this.Ex();i!==u&&(u?this.So(new TT(this.MP)):this.So(new ST(this.MP)));var o=this.bx();n!==o&&this.So(new Fp(this.MP,o)),u||this.Cxt()}},n.Cxt=function(){var t=this.TL,i=this.Ext;if(i!==t){0;var n=this.Bx,r=this.Rx;this.Ext=t,this.yz&&(i.we(),t.be());var e=this.Bx,s=this.Rx;e>0&&s>0&&(n!==e||r!==s)&&this.So(new Bp)}},n.rxt=function(t){return void 0!==this.Axt.QZ([t])},n.oxt=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return this.Cxt(),i=this.iq,[4,(n=this.Axt).hr()];case 1:return e.sent(),[4,n.Un(t)];case 2:return r=e.sent(),i.wxt(r),[2]}})}).call(this)},n.Dxt=function(t){return this.xxt=new Xa,kr(this.xxt.Qy,t)},n.P3=function(){var t;null==(t=this.xxt)||t.Xy()},n.Zx=function(i){i.type===ch.$w&&this.A7===i.currentTime||(i.type===ch.Zw&&(this.A7=NaN,this.Cxt()),i.type!==Mp.wI&&i.type!==ch.jw&&i.type!==ch.Bw||this.Bxt||!this.Rxt()?(i.type!==ch.Bw||this.UP)&&t.prototype.Zx.call(this,i):this.kxt())},xt(i,[{key:"yxt",get:function(){return this.Axt}},{key:"Rx",get:function(){return this.Ext.Rx}},{key:"Bx",get:function(){return this.Ext.Bx}}]),i}(oW),lW=function(t){function i(i,n){var r;return(r=t.call(this,i,n,new eD)||this).eet=void 0,r.net=void 0,r.KL=void 0,r.KL=new zT(i.mq),r.eet=new VD,r.eet.B9(i.$W.parentElement),r.net=new aB(r.eet.xe,r.Wu,r.nt,r.Ql,r.Ma,r.mq),r}Pt(i,t);var n=i.prototype;return n.we=function(){t.prototype.we.call(this),this.eet.we()},n.be=function(){t.prototype.be.call(this),this.eet.be()},n.B9=function(t){this.TL.B9(t),this.Axt.B9(t)},n.Yx=function(){this.TL.Yx(),this.Axt.Yx()},n.Wx=function(){return this.TL.Wx()},n.Aa=function(){return this.KL},n.Qrt=function(i){var n=this.Hx(),r=this.Wx();t.prototype.Qrt.call(this,i),this.KL.BI=i.mq,this.Hx()!==n&&this.So(new UT),this.Wx()!==r&&this.So(new VT)},n.zg=function(){return this.KL.kn(),this.net.kn(),this.eet.kn(),t.prototype.zg.call(this)},xt(i,[{key:"Nrt",get:function(){return this.TL}},{key:"yxt",get:function(){return this.Axt}},{key:"$W",get:function(){return this.TL.$W}},{key:"n5",get:function(){return this.TL.n5}},{key:"Vx",get:function(){return this.TL.Vx},set:function(t){this.TL.Vx=t}}]),i}(dW),gW=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.Gq=function(i){if(i===cw.Bk){var n=t.prototype.Gq.call(this,i),r=t.prototype.Gq.call(this,i);return new lW(n,r)}return t.prototype.Gq.call(this,i)},n.Pq=function(i){var n=this,r=function(){return t.prototype.Pq};return jt(function(){return zt(this,function(t){switch(t.label){case 0:return j(i,lW)?[4,i.zg()]:[3,4];case 1:return t.sent(),[4,r().call(n,i.Nrt)];case 2:return t.sent(),[4,r().call(n,i.yxt)];case 3:return t.sent(),[3,6];case 4:return[4,r().call(n,i)];case 5:t.sent(),t.label=6;case 6:return[2]}})})()},i}(xO),wW=function(t){function i(i,n,r,e,s,u,o){var h,a=new QO(new gW(s)),c=a.Gq(u);return(h=t.call(this,i,n,r,e,c,o)||this).xq=void 0,h.xq=a,h}return Pt(i,t),i.prototype.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.xq.Pq(this.TL)];case 2:return n.sent(),[2]}})}).call(this)},i.LS=function(t){var i;return!Oi.Ks&&!Oi.og&&!(t&&"google-dai"===(null==(i=t.ssai)?void 0:i.integration))},i}(QH);V(),It(),Wt(),Nt(),Yt(),V(),It(),Wt(),Nt(),Yt(),V(),It(),Wt(),Nt(),Yt();var mW=function(t){function i(i){var n;return(n=t.call(this,i)||this).Nxt=!1,n.OPt=OA.iL(),n.YS=void 0,n.WA=0,n.Mxt=!1,n.ket=!1,n.ZPt=void 0,n.N4=OA.iL(),n.Lxt=void 0,n.grt(i),n.YS=i.Cd,n}Pt(i,t);var n=i.prototype;return n.mrt=function(t){return new hW(t)},n.CS=function(){return this.Nxt?this.YS:t.prototype.CS.call(this)},n.RP=function(){return this.Nxt?this.OPt:t.prototype.RP.call(this)},n.Nd=function(){return this.Nxt?this.WA:t.prototype.Nd.call(this)},n.C4=function(i){this.Nxt?(this.WA=i,this.Mxt=!0):t.prototype.C4.call(this,i)},n.Tx=function(){return this.Nxt?this.Lxt?this.Lxt.z3():this.N4:t.prototype.Tx.call(this)},n.M4=function(i,n,r,e){this.Nxt?this.Lxt=new wP(i,n,r,e):t.prototype.M4.call(this,i,n,r,e)},n._rt=function(){return this.Nxt?this.ket&&!1!==this.ZPt:t.prototype._rt.call(this)},n.C3=function(){this.Nxt?this.ZPt=!0:t.prototype.C3.call(this)},n.A3=function(){this.Nxt?this.ZPt=!1:t.prototype.A3.call(this)},n.TZ=function(i){return!this.Nxt&&t.prototype.TZ.call(this,i)},n.EZ=function(i){return this.Nxt?ot.reject(new _("Not supported")):t.prototype.EZ.call(this,i)},n.QPt=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:if(this.Nxt)throw new _("Already locked");return this.Nxt=!0,this.KPt(),t=[],this.P4&&t.push(this.P4.QPt()),this.x4&&t.push(this.x4.QPt()),[4,ot.all(t)];case 1:return i.sent(),[2]}})}).call(this)},n.YPt=function(){this.Nxt=!1,this.P4&&this.P4.YPt(),this.x4&&this.x4.YPt(),this.JPt()},n.KPt=function(){this.YS=t.prototype.CS.call(this),this.OPt=t.prototype.RP.call(this),this.WA=t.prototype.Nd.call(this),this.N4=t.prototype.Tx.call(this),this.Mxt=!1,this.ZPt=void 0,this.Lxt=void 0},n.JPt=function(){if(this.Mxt&&(t.prototype.C4.call(this,this.WA),this.Mxt=!1),void 0!==this.Lxt){var i=this.Lxt;t.prototype.M4.call(this,i.Tn,i.An,i.G3,i.X3),this.Lxt=void 0}void 0!==this.ZPt&&(this.ZPt?t.prototype.C3.call(this):t.prototype.A3.call(this),this.ZPt=void 0)},i}(MO),yW=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Fxt=!1,i.Vxt=!1,i.Gxt=void 0,i.zxt=void 0,i.qxt=new dr,i}Pt(i,t);var n=i.prototype;return n.Gx=function(){return void 0!==this.iq&&vW(this.iq)&&this.UP&&this.My(0),t.prototype.Gx.call(this)},n.My=function(i,n,r){void 0!==this.iq&&vW(this.iq)&&this.UP&&i0){i=a.tracks[0],n=a;break}}if(Fi(i))break}return(qi(null==n?void 0:n.initPattern)||qi(null==i?void 0:i.initPattern))&&!qi(null==i?void 0:i.initializationPattern)&&!qi(null==n?void 0:n.initializationPattern)}(e=r)&&(e=function(t){return io({},t,{availabilityDuration:{value:t.dvrDuration?t.dvrDuration.duration/t.dvrDuration.timescale:0},manifestVersion:"1.0.0",presentations:t.presentations.map(SW),contentBaseUrl:t.contentBaseUrl||"./"})}(e)),[2,e]}})}).call(this)},t}();V(),It(),Bt(),Nt();var HW=function(t){function i(i){var n;return(n=t.call(this)||this).hu=void 0,n.Kxt=void 0,n.Kxt=i,n}Pt(i,t);var n=i.prototype;return n.oR=function(){return this.Kxt.oR()},n.wn=function(t,i){this.Kxt.wn(t,i)},n.mn=function(t,i){this.Kxt.mn(t,i)},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=fA(this)),this.hu}},{key:"eR",get:function(){return this.Kxt.eR}},{key:"sR",get:function(){return this.Kxt.sR}},{key:"nR",get:function(){return this.Kxt.nR}},{key:"rR",get:function(){return this.Kxt.rR}},{key:"hR",get:function(){return this.Kxt.hR}}]),i}(uh);V(),It(),Bt(),Ut(),V(),It(),Bt(),V(),It(),Bt();var WW=function(){function t(t){this.Yxt=void 0,this.Zxt=0,this.Jxt=0,this.Yxt=A.exp(A.log(.5)/t)}var i=t.prototype;return i.Pat=function(t,i){var n=A.pow(this.Yxt,t),r=i*(1-n)+n*this.Zxt;E(r)||(this.Zxt=r,this.Jxt+=t)},i.EZ=function(t){var i=A.exp(A.log(.5)/t);if(i!==this.Yxt)if(0!==this.Jxt){var n=this.yet,r=1-A.pow(i,this.Jxt);this.Zxt=n*r,this.Yxt=i}else this.Yxt=i},xt(t,[{key:"yet",get:function(){var t=1-A.pow(this.Yxt,this.Jxt);return this.Zxt/t}}]),t}(),zW=function(){function t(i,n,r,e){void 0===i&&(i=t.cIt),void 0===n&&(n=t.dIt),void 0===r&&(r=t.Mat),void 0===e&&(e=!1),this.$xt=void 0,this.tIt=void 0,this.rIt=0,this.hIt=[],this.sIt=void 0,this.nIt=6e4,this.oIt=10,this.aIt=void 0,this.uIt=void 0,this.iIt=void 0,this.eIt=void 0,this.aIt=i,this.uIt=n,this.iIt=r,this.eIt=e,this.$xt=new WW(i),this.tIt=new WW(n)}var i=t.prototype;return i.Pat=function(t){var i=Vi.Mg(),n=t;this.eIt&&void 0!==this.sIt&&i-this.sIt>=this.nIt&&this.hr(),this.rIt+=1,this.$xt.Pat(1,n),this.tIt.Pat(1,n),this.hIt.push(n),this.hIt.length>this.oIt&&this.hIt.shift(),this.sIt=i},i.Nat=function(){return void 0!==this.sIt&&Vi.Mg()-this.sIt<=this.nIt},i.hr=function(){this.$xt=new WW(this.aIt),this.tIt=new WW(this.uIt),this.rIt=0,this.hIt=[],this.sIt=void 0},xt(t,[{key:"yet",get:function(){return this.Nat()?A.max(this.$xt.yet,this.tIt.yet):this.iIt}}]),t}();zW.cIt=2,zW.dIt=5,zW.Mat=.1,V(),It(),Ut();var qW=function(){function t(t){this.lIt=void 0,this.lIt=t}var i=t.prototype;return i.PY=function(t){for(var i,n=Ft(this.lIt);!(i=n()).done;){i.value.PY(t)}},i.xY=function(t){for(var i,n=Ft(this.lIt);!(i=n()).done;){i.value.xY(t)}},i.IY=function(t,i){for(var n,r=Ft(this.lIt);!(n=r()).done;){n.value.IY(t,i)}},i.RY=function(t){for(var i,n=Ft(this.lIt);!(i=n()).done;){i.value.RY(t)}},t}();V(),It();var XW=function(){function t(t){this.vIt=void 0,this.fIt=0,this.vIt=t}var i=t.prototype;return i.PY=function(t){this.fIt=t},i.xY=function(t){this.vIt.Pat(t-this.fIt)},i.IY=function(t){},i.RY=function(t){},t}();V(),It();var GW=function(){function t(t){this.Fat=void 0,this._It=0,this.Fat=t}var i=t.prototype;return i.xY=function(t){this._It=t},i.IY=function(t,i){this.Fat.Pat(t-this._It,i.byteLength),this._It=t},i.RY=function(t){},i.PY=function(t){},t}();V(),It(),Nt();var QW=function(){function t(t,i){void 0===i&&(i=0),this.Fat=void 0,this.wIt=void 0,this.pIt=new YW,this.En=0,this.gIt=0,this.Fat=t,this.wIt=i}var i=t.prototype;return i.PY=function(t){},i.IY=function(t,i){var n=i.byteLength,r=this.gIt;this.gIt=n;var e=t-this.En;this.En=t,this.pIt.A$(i);var s=!this.pIt.mIt(),u=n>=this.wIt;r!==Vi.Zs.Sp&&s&&u&&this.Fat.Pat(e,n)},i.xY=function(t){this.En=t},i.RY=function(t){},t}(),YW=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).AIt=void 0,i.yIt=!1,i}Pt(i,t);var n=i.prototype;return n.mIt=function(){return this.yIt},n.A$=function(i){this.yIt=!1,t.prototype.A$.call(this,i)},n.w$=function(i,n){this.AIt&&this.AIt!==gy.OC||(this.yIt=!0),t.prototype.w$.call(this,i,n),this.AIt=i},n.C$=function(t){return!1},n.B$=function(t){},n.M$=function(t){},i}(vC);V(),It(),Nt();var $W=function(t){return t.bIt="sample",t}({}),KW=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).SIt=0,i}return Pt(i,t),i.prototype.cW=function(){if(this.Nat()){var t=Vi.Mg();t-this.SIt>1e3&&(this.SIt=t,Pb.Ng.cW(this.yet))}},i}(uh);V(),It(),Bt(),Nt();var JW=function(t){function i(i){var n;return(n=t.call(this)||this).TIt=void 0,n.wb=[],n.Zxt=void 0,n.EIt=0,n.TIt=i,n.Zxt=i,n}Pt(i,t);var n=i.prototype;return n.Nat=function(){return this.wb.length>=3},n.Pat=function(t,i){if(0!==t){var n={kW:8*i/t,kIt:i};if(this.wb.push(n),this.EIt+=n.kIt,this.wb.length>30){var r=this.wb.shift();this.EIt-=r.kIt}for(var e=this.wb.slice().sort(function(t,i){return t.kW-i.kW}),s=0,u=0;u=.5)break}this.cW(),this.So(new ah($W.bIt))}},xt(i,[{key:"yet",get:function(){return this.Nat()?this.Zxt:this.TIt}}]),i}(KW);V(),It(),Bt(),Nt();var ZW=function(t){function i(n,r,e,s){var u;return void 0===n&&(n=i.cIt),void 0===r&&(r=i.dIt),void 0===e&&(e=i.IIt),void 0===s&&(s=i.Mat),(u=t.call(this)||this).$xt=void 0,u.tIt=void 0,u.PIt=0,u.iIt=void 0,u.xIt=void 0,u.xIt=e,u.$xt=new WW(n),u.tIt=new WW(r),u.iIt=s,u}Pt(i,t);var n=i.prototype;return n.Pat=function(t,i){var n=8*i/t;this.$xt.Pat(t,n),this.tIt.Pat(t,n),this.PIt+=i,this.cW(),this.So(new ah($W.bIt))},n.Nat=function(){return this.PIt>=this.xIt},xt(i,[{key:"yet",get:function(){return this.Nat()?A.min(this.$xt.yet,this.tIt.yet):this.iIt}}]),i}(KW);ZW.IIt=128e3,ZW.Mat=Cb,ZW.cIt=.5,ZW.dIt=5;var tz=function(){function t(t,i){var n=this;this.Fat=void 0,this.BIt=[],this.LIt=void 0,this.MIt=void 0,this.CIt=function(){for(var t,i=Ft(n.BIt);!(t=i()).done;){(0,t.value)()}},this.MIt=t>0?t:ZW.Mat,this.LIt=new zW(zW.cIt,zW.dIt,i>0?i:zW.Mat),this.RIt(this.MIt)}var i=t.prototype;return i.RIt=function(t){var i;null==(i=this.Fat)||i.mn($W.bIt,this.CIt),this.Fat=new JW(t),this.Fat.wn($W.bIt,this.CIt)},i.DIt=function(t){this.BIt.push(t)},i.NIt=function(t){Yn(this.BIt,t)},i.PW=function(t){if("segment"===t.Km&&"video"===t.qk){var i=[new XW(this.LIt)];return this.Fat&&("stream"===t.dk&&"initialization-segment"!==t.Wk?i.push(new QW(this.Fat,1e3)):i.push(new GW(this.Fat))),new qW(i)}},xt(t,[{key:"kW",get:function(){var t,i;return null!=(i=null==(t=this.Fat)?void 0:t.yet)?i:this.MIt}},{key:"EW",get:function(){return this.LIt.yet}}]),t}();V(),It(),Bt();var iz=function(){function t(){this.FIt=void 0,this.VIt=void 0,this.zIt=void 0,this.WIt=void 0}var i=t.prototype;return i.OIt=function(t,i){var n=i-t;(!this.FIt||n=.4?[4,this.hRt(n)]:[3,5];case 5:return[2]}})}).call(this)},n.z2=function(t,i){return jt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(this.$It)throw new p("Concurrent appends are not supported.");o.label=1;case 1:o.trys.push([1,,8,9]),n={stack:[],error:void 0,hasError:!1},o.label=2;case 2:return o.trys.push([2,5,6,7]),r=Xt(n,dr.ep([i,this.T3.Yg]),!1),e=r.Yg,this.tRt=new Xa,[4,this.hRt(e)];case 3:return o.sent(),[4,this.Trt.z2(t,{},e)];case 4:return o.sent(),this.Trt.B3===cw.Bk&&this.rRt.Jrt(t.ck),[3,7];case 5:return s=o.sent(),n.error=s,n.hasError=!0,[3,7];case 6:return Gt(n),[7];case 7:return[3,9];case 8:return u=this.tRt,this.tRt=void 0,null==u||u.Xy(),[7];case 9:return[2]}})}).call(this)},n._S=function(t,i,n){return jt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(this.$It)throw new p("Concurrent appends are not supported.");h.label=1;case 1:h.trys.push([1,,8,9]),r={stack:[],error:void 0,hasError:!1},h.label=2;case 2:return h.trys.push([2,5,6,7]),e=Xt(r,dr.ep([n,this.T3.Yg]),!1),s=e.Yg,this.tRt=new Xa,[4,this.hRt(s)];case 3:return h.sent(),[4,this.Trt._S(t,i,s)];case 4:return h.sent(),this.ZIt.KIt(OA.tL(t,i)),[3,7];case 5:return u=h.sent(),r.error=u,r.hasError=!0,[3,7];case 6:return Gt(r),[7];case 7:return[3,9];case 8:return o=this.tRt,this.tRt=void 0,null==o||o.Xy(),[7];case 9:return[2]}})}).call(this)},n.AQ=function(t){return jt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:if(this.$It)throw new p("Concurrent appends are not supported.");u.label=1;case 1:u.trys.push([1,,7,8]),i={stack:[],error:void 0,hasError:!1},u.label=2;case 2:return u.trys.push([2,4,5,6]),n=Xt(i,dr.ep([t,this.T3.Yg]),!1),r=n.Yg,this.tRt=new Xa,[4,this.hRt(r)];case 3:return u.sent(),[3,6];case 4:return e=u.sent(),i.error=e,i.hasError=!0,[3,6];case 5:return Gt(i),[7];case 6:return[3,8];case 7:return s=this.tRt,this.tRt=void 0,null==s||s.Xy(),[7];case 8:return[2]}})}).call(this)},n.hRt=function(t){return jt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:i=Ft(this.JIt),u.label=1;case 1:return(n=i()).done?[3,4]:(r=n.value,e=r[0],s=r[1],[4,this.Trt.H2(e,s,t)]);case 2:u.sent(),u.label=3;case 3:return[3,1];case 4:return tr(this.JIt),[2]}})}).call(this)},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:this.T3.zg(),t.label=1;case 1:return this.$It?[4,this.iRt]:[3,3];case 2:return t.sent(),[3,1];case 3:return[2]}})}).call(this)},xt(i,[{key:"IP",get:function(){for(var t,i=OA.iL(),n=Ft(this.JIt);!(t=n()).done;){var r=t.value[1],e=r.xet+r.bU,s=e+r.ct;i=i.OM(OA.tL(e,s))}return this.Trt.IP.OM(i)}},{key:"$It",get:function(){return void 0!==this.tRt}},{key:"iRt",get:function(){return this.tRt?this.tRt.Qy:ot.resolve()}}]),i}(uh);V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It(),Wt(),Yt();var vz=function(){function t(t){this.aRt=0,this.uRt=void 0,this.uRt=t}var i=t.prototype;return i.oRt=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:if(this.aRt>=this.uRt.maxRetries)throw t;return[4,Rr(this.cRt(this.aRt++),i)];case 1:return n.sent(),[2]}})}).call(this)},i.cRt=function(t){var i=0;return 0!==t&&(i+=A.min(this.uRt.maximumBackoff,this.uRt.minimumBackoff*A.pow(2,t-1))),i},t}();V(),It(),Nt(),V(),It(),Nt();var dz=function(t){return t.dRt="emsgdata",t}({}),lz=function(t){function i(i,n){var r;return(r=t.call(this,"emsgdata")||this).value=void 0,r.data=void 0,r.value=i,r.data=n,r}return Pt(i,t),i}(ah);V(),It();var gz=function(){function t(){this.YJ=void 0}var i=t.prototype;return i.start=function(t){this.YJ=t},i.lRt=function(t){this.YJ.enqueue(t)},t}();V(),It(),V(),It();var wz=function(t){return t.fRt="initdata",t.MANIFEST_UPDATE="manifestupdate",t.vRt="timestamps:v1",t}({});function mz(t){if("urn:theo:hesp:2020"===t.$N){var i=t.zE;if(i===wz.fRt)return function(t){if(t&&Wi(t)){var i=t;if(Yi(i.index)&&Yi(i.offset)&&!(i.index<0&&i.offset<0))return{Km:"initdata",index:i.index,offset:i.offset}}}(JSON.parse(ma(Aa(t.eM),new Pa)));if(i===wz.MANIFEST_UPDATE)return function(t){if(t&&Wi(t)){var i=t;if(!Fi(i.url)||qi(i.url))return{Km:"manifestupdate",url:i.url}}}(JSON.parse(ma(Aa(t.eM),new Pa)));if(i===wz.vRt){var n,r=Aa(t.eM),e=new Pa,s=Zh(r,e).toNumber()/t.qD,u=Zh(r,e).toNumber()/1e3,o=Kh(r,e)/1e3;return e.ac+8<=r.byteLength&&(n={hours:Kh(r,e),minutes:Qh(r,e),seconds:Qh(r,e),frames:Yh(r,e)}),{Km:wz.vRt,_Rt:s,gRt:u,pRt:o,mRt:n}}}}var yz=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).wRt=new uh,i}Pt(i,t);var n=i.prototype;return n.transform=function(t){if(t.Km===gy.VC)try{var i=mz(Ry.LD(t.ck));i&&this.wRt.So(new lz(i.Km,i))}catch(t){false}this.lRt(t)},n.zg=function(){this.wRt.Vo()},i}(gz);V(),It(),Nt();var pz=function(){function t(){this.yRt=void 0}var i=t.prototype;return i.start=function(t){this.yRt=new _z(t)},i.transform=function(t){this.yRt.A$(t)},i.flush=function(){this.yRt.S$()},t}(),_z=function(t){function i(i){var n;return(n=t.call(this)||this).YJ=void 0,n.YJ=i,n}Pt(i,t);var n=i.prototype;return n.C$=function(t){return!0},n.B$=function(t){this.YJ.enqueue(t)},n.M$=function(t){},i}(vC);V(),It(),Wt(),Nt(),Yt(),V(),It();var kz=fe.fromNumber(In);var bz=function(t){function i(i,n){var r;return(r=t.call(this)||this).nV=void 0,r.ARt=void 0,r.nV=i,r.ARt=n,r}return Pt(i,t),i.prototype.lk=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:0,n.label=1;case 1:return n.trys.push([1,3,,5]),[4,this.nV.lk(t)];case 2:return[2,n.sent()];case 3:if(mr(i=n.sent()))throw i;return[4,this.ARt.oRt(i,t.Yg)];case 4:return n.sent(),[3,5];case 5:return[3,0];case 6:return[2]}})}).call(this)},i}(uh);function Az(t,i,n,r,e,s,u,o){var h=new Wd;return e&&h.OT(function(t,i){return void 0===i&&(i=kz),new Wd({Range:"bytes="+t.toString()+"-"+i.toString()})}(e.start,e.end)),{Yu:t,fk:h,zk:!1,Yg:o,Km:bl.yk,Wk:n,qk:r,Vk:s,Hk:u,dk:i,jk:i===Hd.BT}}V(),It(),Nt(),V(),It();var Tz=function(t){return t[t.INITIALIZER=0]="INITIALIZER",t[t.FRAMES=1]="FRAMES",t}({}),Sz=function(t){function i(i,n){var r;return(r=t.call(this)||this).SQ=void 0,r.Tat=void 0,r.HA=void 0,r.bRt=[],r.SQ=i,r.Tat=r.SQ.match(/video/)?mB.Bk:mB.Dk,r.HA=n,r}Pt(i,t);var n=i.prototype;return n.transform=function(t){this.bRt.push(t),t.Km===gy.OC&&this.SRt(this.bRt.splice(0),Tz.FRAMES)},n.SRt=function(t,i){var n={qD:this.HA,oQ:this.SQ},r=Fa(t.map(function(t){return Ta(t.ck.ck)})),e=Wn(t,Ez),s=Ry.TD(e.ck.ck)[0],u={qk:this.Tat,Ey:n,$at:r,Km:i,ct:this.Nd(s)/this.HA,Rvt:pe(this.TRt(s),this.HA)};this.lRt(u)},n.Nd=function(t){var i,n=t.Z[0];if(!n||0===n.zN.length)return 0;var r=null!=(i=n.gD.NN)?i:0;return Mn(n.zN[0].JN,function(t){var i;return null!=(i=t.ct)?i:r})},n.TRt=function(t){var i,n;return null!=(n=null==(i=t.Z[0].GN)?void 0:i.GN)?n:fe.UZERO},i}(gz);function Ez(t){return t.Km===gy.IC}V(),It();var Iz=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).kRt=void 0,e.ORt=void 0,e.nV=void 0,e.ARt=void 0,e.Tat=void 0,e.WRt=void 0,e.xRt="now",e.IRt=void 0,e.RRt=void 0,e.HA=void 0,e.LRt=new dr,e.tRt=void 0,e.kRt=i,e.ARt=new vz(r),e.WRt=new yz,e.WRt.wRt.wn(dz.dRt,e.Rs),e.nV=n,e.Tat=function(t){switch(t){case mB.Dk:return Tl.Dk;case mB.Bk:return Tl.Bk;default:return Tl.pk}}(i.Km),e.ORt=new bz(e.nV,e.ARt),e}Pt(i,t);var n=i.prototype;return n.Cct=function(t){return t+1},n.My=function(t){this.xRt=t,this.IRt=void 0,this.RRt=void 0},n.CRt=function(){return void 0!==this.IRt},n.DRt=function(){return jt(function(){var t,i,n,r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:if(this.$It)throw new p("Concurrent downloads are not supported.");l.label=1;case 1:return l.trys.push([1,,4,5]),this.tRt=new Xa,"now"===this.xRt?t=Vi.xm(this.kRt.BRt("now"),this.kRt.NRt):(i=this.xRt,n=0===i?1:this.kRt.MRt(i),t=Vi.xm(this.kRt.BRt(n),this.kRt.NRt)),r=Az(t,Hd.CT,Al.Sk,this.Tat,void 0,3e3,1e3,this.LRt.Yg),[4,this.ORt.lk(r)];case 2:return[4,l.sent().HT(this.LRt.Yg)];case 3:return e=l.sent(),s=new I(e),u=function(t){var i=Ay.aD(new py(Aa(t),new Pa)),n=Wn(i,function(t){return t.Km===gy.WC||t.Km===gy.IC});if(void 0===n)return{FRt:t,KD:void 0};var r=ka(t,0,n.ac),e=ka(t,n.ac);return{FRt:r,KD:0===e.byteLength?void 0:e}}(s),o=u.FRt,h=u.KD,a=Ry.TD(Aa(s)),this.HA=function(t){var i=Wn(t,function(t){return t.Km===gy.OR});return i.Z[0].KD.gD.qD}(a),c=function(t){var i=t.filter(function(t){return t.Km===gy.VC}),n=i.map(function(t){return mz(t)}),r=Wn(n,function(t){return(null==t?void 0:t.Km)===wz.fRt});if(!r)throw new p("No init data in init response");return r}(a),this.IRt=c.index,this.RRt=c.offset,h&&(v=Ry.TD(Aa(s)),f=function(t,i,n){var r,e,s,u=Wn(t,function(t){return t.Km===gy.IC}),o=pe(null!=(e=null==(r=u.Z[0].GN)?void 0:r.GN)?e:fe.UZERO,n),h=u.Z[0],a=null!=(s=h.gD.NN)?s:0,c=h.zN[0],f=Mn(c.JN,function(t){var i;return null!=(i=t.ct)?i:a})/n;return{xet:o,ct:f,bU:i}}(v,-this.kot.eRt,this.HA)),[2,{initialization:o,data:h,metadata:f}];case 4:return d=this.tRt,this.tRt=void 0,null==d||d.Xy(),[7];case 5:return[2]}})}).call(this)},n.URt=function(){if(this.$It)throw new p("Concurrent downloads are not supported.");this.tRt=new Xa;var t=void 0!==this.RRt?fe.fromNumber(this.RRt):void 0;return nl(this.VRt(this.IRt,t,this.LRt.Yg)).pipeThrough(new Kd(new Sz(this.kot.oQ,this.HA))).pipeThrough(new Kd(new Rz(this.LRt.Yg)))},n.VRt=function(t,i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return r=this.HRt(t,i,n),[4,this.ORt.lk(r)];case 1:return[2,e.sent().WT().pipeThrough(new Kd(new pz)).pipeThrough(new Kd(this.WRt))]}})}).call(this)},n.HRt=function(t,i,n){var r=this.kRt.qRt(t),e=void 0!==i?{start:i,end:void 0}:void 0;return Az(Vi.xm(r,this.kRt.NRt),Hd.BT,Al.pk,this.Tat,e,25e3,1e3,n)},n.sRt=function(){this.IRt=void 0,this.RRt=void 0},n.nRt=function(){void 0!==this.IRt&&(this.IRt=this.Cct(this.IRt)),this.RRt=void 0;var t=this.tRt;this.tRt=void 0,null==t||t.Xy()},n.cancelDownload=function(){var t;this.LRt.Zg(),this.LRt=new dr,this.tRt=null!=(t=this.tRt)?t:new Xa,this.sRt();var i=this.tRt;this.tRt=void 0,null==i||i.Xy()},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),this.WRt.zg(),this.LRt.Zg(),[4,this.iRt];case 1:return t.sent(),this.IRt=void 0,this.RRt=void 0,[2]}})}).call(this)},xt(i,[{key:"kot",get:function(){return this.kRt}},{key:"ERt",get:function(){return!1}},{key:"PRt",get:function(){return this.xRt}},{key:"$It",get:function(){return void 0!==this.tRt}},{key:"iRt",get:function(){return this.tRt?this.tRt.Qy:ot.resolve()}}]),i}(uh);var Rz=function(){function t(t){var i=this;this.YJ=void 0,this.Jg=void 0,this.zRt=function(){i.YJ.error(new wr)},this.Jg=t}var i=t.prototype;return i.start=function(t){this.YJ=t,this.Jg.Xg(this.zRt)},i.flush=function(){this.Jg.jg(this.zRt)},t}();function Cz(t){var i;return t.value/(null!=(i=t.scale)?i:1)}V(),It(),Bt(),Ut(),V(),It(),Bt(),Ut(),V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt(),Nt(),V(),It();var Pz="{initId}",Nz=/{initId(?::0(?:\d+)d)?}/,Dz=/{segmentId(?::0(?:\d+)d)?}/,xz=function(){function t(t,i,n){var r,e,s,u;this.FO=void 0,this.rCt=void 0,this.hS=void 0,this.dW=void 0,this.GRt=void 0,this.YRt=void 0,this.ZRt=void 0,this.tCt=void 0,this.eCt=void 0,this.pO=void 0,this.sCt=void 0,this.nAt=void 0,this.jRt=void 0,this.KRt=void 0,this.fAt=[],this.FO=t,this.rCt=n,this.hS=t.id,this.dW=t.bandwidth,this.GRt=t.averageBandwidth,this.YRt=null!=(r=t.baseUrl)?r:"",this.ZRt=null!=(e=t.codecs)?e:i.codecs,this.tCt=null!=(s=t.continuationPattern)?s:i.continuationPattern,this.eCt=null!=(u=t.initializationPattern)?u:i.initializationPattern,this.pO=t.label,this.sCt=t.mediaTimeOffset?Cz(t.mediaTimeOffset):0,this.nAt=t.segmentDuration?Cz(t.segmentDuration):0,this.er(t)}return t.prototype.er=function(t){this.jRt=t.activeSegment,this.KRt=t.activeSequenceNumber,this.fAt=t.segments},xt(t,[{key:"o",get:function(){return this.hS}},{key:"kW",get:function(){return this.dW}},{key:"tyt",get:function(){return this.GRt}},{key:"ect",get:function(){return this.fAt}},{key:"XRt",get:function(){return this.jRt}},{key:"QRt",get:function(){return this.KRt}},{key:"NRt",get:function(){return Vi.xm(this.YRt,this.JRt.NRt)}},{key:"frt",get:function(){return this.ZRt}},{key:"Th",get:function(){return this.pO}},{key:"$Rt",get:function(){return this.tCt}},{key:"iCt",get:function(){return this.eCt}},{key:"eRt",get:function(){return this.sCt}},{key:"nCt",get:function(){return this.nAt}}]),t}(),Bz=function(t){function i(i,n,r){var e,s,u,o,h;return(e=t.call(this,i,n,r)||this).oCt=void 0,e.aCt=void 0,e.kA=void 0,e.oCt=null!=(s=i.channels)?s:1,e.aCt=null!=(o=null!=(u=i.frameRate)?u:n.frameRate)?o:1024,e.kA=null!=(h=i.sampleRate)?h:n.sampleRate,e}return Pt(i,t),xt(i,[{key:"Km",get:function(){return mB.Dk}},{key:"JRt",get:function(){return this.rCt}},{key:"hCt",get:function(){return this.oCt}},{key:"plt",get:function(){return this.aCt}},{key:"BB",get:function(){return this.kA}},{key:"oQ",get:function(){return'audio/mp4; codecs="'+this.frt+'"'}}]),i}(xz),Oz=function(t){function i(i,n,r){var e,s;return(e=t.call(this,i,n,r)||this).Up=void 0,e.aCt=void 0,e.Up=i.resolution,e.aCt=Cz(null!=(s=i.frameRate)?s:n.frameRate),e}return Pt(i,t),xt(i,[{key:"Km",get:function(){return mB.Bk}},{key:"JRt",get:function(){return this.rCt}},{key:"uCt",get:function(){return this.Up}},{key:"plt",get:function(){return this.aCt}},{key:"oQ",get:function(){return'video/mp4; codecs="'+this.frt+'"'}}]),i}(xz);function Mz(t,i){var n=String(i);if(t===Pz||"now"===i)return n;var r=T(t.substring(9,t.lastIndexOf("d")));return Qo(n,r,"0")}function Lz(t,i){var n=String(i);if(t===Pz)return n;var r=T(t.substring(12,t.lastIndexOf("d")));return Qo(n,r,"0")}var Fz=function(){function t(t,i,n){var r;this.rCt=void 0,this.RI=void 0,this.cCt=void 0,this.hS=void 0,this.lCt=void 0,this.YRt=void 0,this.pO=void 0,this.sCt=void 0,this.vCt=void 0,this.rCt=t,this.RI=n,this.cCt=i,this.hS=t.id,this.lCt=t.alignId,this.YRt=null!=(r=t.baseUrl)?r:"",this.pO=t.label,this.sCt=t.mediaTimeOffset?Cz(t.mediaTimeOffset):0,this.vCt=t.protection,this.er(t)}return t.prototype.er=function(t){for(var i,n=function(){var n=i.value,r=Wn(t.tracks,function(t){return n.o===t.id});r&&n.er(r)},r=Ft(this.RI);!(i=r()).done;)n()},xt(t,[{key:"zst",get:function(){return this.cCt}},{key:"o",get:function(){return this.hS}},{key:"dCt",get:function(){return this.lCt}},{key:"NRt",get:function(){return Vi.xm(this.YRt,this.zst.NRt)}},{key:"Th",get:function(){return this.pO}},{key:"eRt",get:function(){return this.sCt}},{key:"fCt",get:function(){return this.vCt}}]),t}(),Uz=function(t){function i(i,n){var r,e=[];(r=t.call(this,i,n,e)||this).qA=void 0,r.oCt=void 0,r.SQ=void 0;for(var s,u=Ft(i.tracks);!(s=u()).done;){var o=s.value;e.push(new Bz(o,i,r))}return r}return Pt(i,t),i.prototype.er=function(i){var n,r;t.prototype.er.call(this,i),this.qA=i.language,this.oCt=null!=(n=i.channels)?n:1,this.SQ=null!=(r=i.mimeType)?r:"audio/mp4"},xt(i,[{key:"JRt",get:function(){return this.rCt}},{key:"Z",get:function(){return this.RI}},{key:"bs",get:function(){return this.qA}},{key:"hCt",get:function(){return this.oCt}}]),i}(Fz),Vz=function(t){function i(i,n){var r,e=[];(r=t.call(this,i,n,e)||this).SQ=void 0;for(var s,u=Ft(i.tracks);!(s=u()).done;){var o=s.value;e.push(new Oz(o,i,r))}return r}return Pt(i,t),i.prototype.er=function(i){var n;t.prototype.er.call(this,i),this.SQ=null!=(n=i.mimeType)?n:"video/mp4"},xt(i,[{key:"JRt",get:function(){return this.rCt}},{key:"Z",get:function(){return this.RI}},{key:"_Ct",get:function(){return this.rCt.captions}}]),i}(Fz),jz=function(){function t(t,i){var n,r,e;this.ACt=[],this.SCt=[],this.pCt=void 0,this.hS=void 0,this.YRt=void 0,this.wCt=void 0,this.bz=void 0,this.Zf=void 0,this.pCt=t,this.hS=i.id,this.YRt=null!=(n=i.baseUrl)?n:"";for(var s,u=Ft(null!=(r=i.audio)?r:[]);!(s=u()).done;){var o=s.value;this.ACt.push(new Uz(o,this))}for(var h,a=Ft(null!=(e=i.video)?e:[]);!(h=a()).done;){var c=h.value;this.SCt.push(new Vz(c,this))}this.er(i)}return t.prototype.er=function(t){var i;this.wCt=t.timeBounds,this.Zf=null!=(i=t.events)?i:[],this.bz=t.currentTime?Cz(t.currentTime):void 0},xt(t,[{key:"o",get:function(){return this.hS}},{key:"NRt",get:function(){return Vi.xm(this.YRt,this.pCt.gCt)}},{key:"mCt",get:function(){return this.wCt}},{key:"MP",get:function(){return this.bz}},{key:"aQ",get:function(){return this.Zf}},{key:"yCt",get:function(){return this.ACt}},{key:"bCt",get:function(){return this.SCt}}]),t}(),Hz=function(){function t(t,i){this.OCt=void 0,this.pCt=void 0,this.kCt=void 0,this.PCt=void 0,this.ICt=void 0,this.CCt=void 0,this.BCt=[],this.vA=void 0,this.MCt=void 0,this.LCt=void 0,this.UCt=void 0,this.OCt=t,this.pCt=i,this.er(i)}return t.prototype.er=function(t){var i,n,r=function(){var t=e.value,n=Wn(i.BCt,function(i){return i.o===t.id});n?n.er(t):i.BCt.push(new jz(i,t))};this.kCt=Cz(t.availabilityDuration),this.PCt=t.creationDate,this.ICt=t.fallbackPollRate,this.CCt=t.manifestVersion,this.vA=t.streamType,this.MCt=t.activePresentation,this.LCt=t.contentBaseUrl,this.UCt=null==(n=t.timeSource)?void 0:n.url,this.pCt=t;for(var e,s=Ft(t.presentations);!(e=s()).done;)i=this,r();this.BCt=this.BCt.filter(function(i){return t.presentations.some(function(t){return t.id===i.o})})},xt(t,[{key:"hR",get:function(){return this.pCt}},{key:"TCt",get:function(){return this.kCt}},{key:"ECt",get:function(){return this.PCt}},{key:"xCt",get:function(){return this.ICt}},{key:"RCt",get:function(){return this.CCt}},{key:"DCt",get:function(){return this.BCt}},{key:"b0",get:function(){return this.vA}},{key:"NCt",get:function(){return this.MCt}},{key:"gCt",get:function(){var t;return Vi.xm(null!=(t=this.LCt)?t:"",this.OCt)}},{key:"FCt",get:function(){return this.UCt}}]),t}();V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt(),Nt();var Wz=0,zz=function(t){function i(i){var n;return(n=t.call(this)||this).VCt=void 0,n.gO=Wz++,n.VCt=i,n}Pt(i,t);var n=i.prototype;return n.MRt=function(t){var i=(t-this.VCt.JRt.zst.MP)*this.framesPerSecond();return A.round(this.VCt.QRt+i)},n.HCt=function(t){return t+1},n.BRt=function(t){for(var i,n,r=this.VCt.iCt;n=null==(i=r.match(Nz))?void 0:i.pop();)r=r.split(n).join(Mz(n,t));return r+("now"===t?"?uuid="+rI():"")},n.qRt=function(t){for(var i,n,r=this.VCt.$Rt;n=null==(i=r.match(Dz))?void 0:i.pop();)r=r.split(n).join(Lz(n,t));return r},n.QU=function(){},n.jU=function(){},xt(i,[{key:"cst",get:function(){return!0}},{key:"tyt",get:function(){return this.VCt.tyt}},{key:"kW",get:function(){return this.VCt.kW}},{key:"frt",get:function(){return this.VCt.frt}},{key:"o",get:function(){return this.VCt.o}},{key:"Th",get:function(){var t;return null!=(t=this.VCt.Th)?t:""}},{key:"jI",get:function(){return this.gO}},{key:"nyt",get:function(){return this.VCt.NRt}},{key:"iyt",get:function(){}},{key:"oQ",get:function(){return this.VCt.oQ}},{key:"eRt",get:function(){return this.VCt.eRt}},{key:"NRt",get:function(){return this.VCt.NRt}},{key:"Km",get:function(){return this.VCt.Km}}]),i}(uh),qz=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).FO=void 0,r.hu=void 0,r.FO=n,r}return Pt(i,t),i.prototype.framesPerSecond=function(){return this.VCt.BB/this.VCt.plt},xt(i,[{key:"WCt",get:function(){return this.VCt}},{key:"$mt",get:function(){return this.VCt.BB}},{key:"Ht",get:function(){return this.FO}},{key:"Ca",get:function(){return this.hu||(this.hu=uV(this)),this.hu}}]),i}(zz),Xz=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).FO=void 0,r.hu=void 0,r.FO=n,r}return Pt(i,t),i.prototype.framesPerSecond=function(){return this.VCt.plt},xt(i,[{key:"WCt",get:function(){return this.VCt}},{key:"eyt",get:function(){return 0}},{key:"plt",get:function(){return this.VCt.plt}},{key:"Mi",get:function(){return this.VCt.uCt.height}},{key:"Ti",get:function(){return this.VCt.uCt.width}},{key:"uCt",get:function(){return this.VCt.uCt}},{key:"Ht",get:function(){return this.FO}},{key:"Ca",get:function(){return this.hu||(this.hu=sV(this)),this.hu}}]),i}(zz);V(),It();var Gz=function(t){return t.qCt="alternative",t.zCt="main",t.GCt="commentary",t.XCt="",t.UU="descriptions",t.jCt="main-desc",t.QCt="translation",t}({}),Qz=function(t){return t.qCt="alternative",t.zCt="main",t.GCt="commentary",t.XCt="",t.FU="captions",t.WI="sign",t.OU="subtitles",t}({}),Yz=0,$z=function(t){function i(i,n,r){var e;(e=t.call(this)||this).rCt=void 0,e.ZCt=void 0,e.dO=new kw,e.$Ct=void 0,e.gO=Yz++,e.We=!1,e.dct=void 0,e.hu=void 0,e.rCt=n,e.ZCt=r,e.$Ct=new Cj(i,[]);for(var s,u=Ft(n.Z);!(s=u()).done;){var o=s.value;e.dO.lO(e.createQuality(o))}return e}Pt(i,t);var n=i.prototype;return n.wO=function(t){this.Rt=t},n.tDt=function(t){for(var i,n=Ft(this.dO.II);!(i=n()).done;){var r=i.value;r===t&&this.So(new KF(r))}},xt(i,[{key:"XI",get:function(){return this.KCt()}},{key:"Rt",get:function(){return this.We},set:function(t){this.Rt!==t&&(this.We=t,t&&this.YCt(),this.ZCt.JCt(),this.So(new bw(this)))}},{key:"Ca",get:function(){return this.hu||(this.hu=uw(this)),this.hu}},{key:"Jdt",get:function(){return this.$Ct}},{key:"o",get:function(){return this.rCt.o}},{key:"jI",get:function(){return this.gO}},{key:"Th",get:function(){var t;return null!=(t=this.rCt.Th)?t:""}},{key:"Xk",get:function(){return this.Rt?"enabled":"disabled"},set:function(t){"enabled"===t?this.Rt=!0:"disabled"===t&&(this.Rt=!1)}},{key:"KI",get:function(){return this.dO}},{key:"YI",get:function(){return this.dct},set:function(t){this.dct=t,this.ZCt.JCt(),this.So(new yL(t,this))}}]),i}(uh),Kz=function(t){function i(i,n){return t.call(this,cw.Dk,i,n)||this}Pt(i,t);var n=i.prototype;return n.YCt=function(){this.ZCt.iDt(this)},n.KCt=function(){var t=this.ZCt.eDt;return(null==t?void 0:t.Ht)===this?t:void 0},n.createQuality=function(t){return new qz(t,this)},xt(i,[{key:"Km",get:function(){return mB.Dk}},{key:"Lt",get:function(){return Gz.zCt}},{key:"bs",get:function(){return this.rCt.bs}},{key:"JRt",get:function(){return this.rCt}}]),i}($z),Jz=function(t){function i(i,n){return t.call(this,cw.Bk,i,n)||this}Pt(i,t);var n=i.prototype;return n.YCt=function(){this.ZCt.sDt(this)},n.KCt=function(){var t=this.ZCt.nDt;return(null==t?void 0:t.Ht)===this?t:void 0},n.createQuality=function(t){return new Xz(t,this)},xt(i,[{key:"Km",get:function(){return mB.Bk}},{key:"Lt",get:function(){return Qz.zCt}},{key:"bs",get:function(){return""}},{key:"JRt",get:function(){return this.rCt}},{key:"_Ct",get:function(){return this.rCt._Ct}}]),i}($z);function Zz(t,i,n,r){if(t){var e=function(t,i,n){for(var r,e=[],s=Ft(i);!(r=s()).done;){var u,o,h=r.value,a=null!=(u=h.mimeType)?u:"audio/mp4",c=null!=(o=h.codecs)?o:h.tracks.map(function(t){return t.codecs})[0];e.push(a+'; codecs="'+c+'"')}return tq(t,i,e,[],n)}(t,i?[i]:[],!r),s=function(t,i,n){for(var r,e=[],s=Ft(i);!(r=s()).done;){var u,o,h=r.value,a=null!=(u=h.mimeType)?u:"video/mp4",c=null!=(o=h.codecs)?o:h.tracks.map(function(t){return t.codecs})[0];e.push(a+'; codecs="'+c+'"')}return tq(t,i,[],e,n)}(t,n?[n]:[],!r),u=sH(e,s);return t.preferredKeySystems&&(null==u?void 0:u.kpt)&&(u.kpt=lH(u.kpt,t.preferredKeySystems)),u}}function tq(t,i,n,r,e){var s=i.map(function(t){return t.protection}).filter(Fi);if(s.length){var u=s[0].type,o=nr(s,function(t){return t.systems}),h=nr(o,function(t){return function(t,i){void 0===i&&(i=!0);for(var n,r=[],e=Ft(i?function(t){return Vo.filter(function(i){return i.Zm===t.toLowerCase()})}(t.schemeId):function(t){return Uo.filter(function(i){return i.Zm===t.toLowerCase()})}(t.schemeId));!(n=e()).done;){var s=n.value;r.push({HH:iq(t)?t.uri:void 0,kS:s,NW:void 0,BW:t.pssh?[Th(t.pssh).buffer]:[],MW:[]})}return r}(t,e)});return{aH:t,Ept:{$St:u},kpt:h,tTt:n,iTt:r}}}function iq(t){return t.schemeId===co.jm&&void 0!==t.keyFormat&&void 0!==t.keyFormatVersions}V(),It(),Ut(),V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It();var nq;function rq(t){var i=t.MP,n=t.IP.JM(i);return n?n.An(0)-i:0}nq="Android"===Vi.Cm.Dm?200:300;var eq=Vi.Zs.bp?1:.5,sq=function(){function t(t,i,n,r,e,s){var u=this;this.TL=void 0,this.jW=void 0,this.vDt=void 0,this.IDt=void 0,this.oDt=void 0,this.wDt=void 0,this.uDt=void 0,this.Ra=void 0,this._Dt=void 0,this.rDt=void 0,this.lDt=void 0,this.SDt=void 0,this.TDt=void 0,this.dDt=void 0,this.cDt=void 0,this.aDt=void 0,this.TL=t,this.jW=i,this.vDt=n,this.IDt=r,this.oDt=e,this.wDt=s,this.Ra=0,this._Dt=ot.resolve(),this.SDt=[],this.TDt=void 0,this.dDt=function(){var t,i;if(!u.IDt.kx){var n=null==(t=u.vDt.eDt)?void 0:t.Ht,r=null==(i=u.vDt.nDt)?void 0:i.Ht,e=rr(u.mDt(n,r),function(t){return t.yDt});e&&(Er(u.ADt(e,!0)),u.TL.CL.RL&&u.IDt.oR())}},this.cDt=function(){u.uDt.wn(Mp.SM,u.dDt),u.uDt.mn(Mp.TM,u.cDt)},this.aDt=function(){if(u.SDt.unshift(u.oDt.kW),u.SDt=u.SDt.slice(0,3),u.lDt){var t=u.lDt.bDt.yDt;u.oDt.kWh){s={bDt:c,ift:Vi.Mg()};break}}if(this.lDt&&oq(this.lDt.bDt,null==s?void 0:s.bDt)){var f=Vi.Mg()-this.lDt.ift,v=this.lDt.bDt.yDt,d=this.SDt.length>=3&&this.SDt.every(function(t){return t>v});if(f>1e3&&d){if(this.TL.CL.RL||Vi.Zs.pp){var l=2*this.oDt.EW;if(!(rq(this.TL)>l))return}else{var g=A.max(2*this.oDt.EW+eq,this.jW.nL.minimumOffset);if(!(rq(this.TL)>g))return void(this.TDt&&this.TDt.minimumOffset===g||(this.uL(),this.TDt={minimumOffset:g},this.jW.hL(this.TDt)))}return this.lDt.bDt}}else this.lDt=s},i.ADt=function(t,i){return void 0===i&&(i=!1),jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return this.lDt=void 0,this.uL(),(n=this.fDt).kDt===t.kDt&&n.EDt===t.EDt?[2]:(r=t.kDt,e=t.EDt,n.EDt&&e&&n.EDt.kW>e.kW&&i&&(this.oDt.RIt(t.yDt),this.SDt=[]),[4,this.vDt.PDt(e,r)]);case 1:return s.sent(),[2]}})}).call(this)},i.uL=function(){this.TDt&&(this.jW.uL(this.TDt),this.TDt=void 0)},i.mDt=function(t,i){var n,r=[],e=[];t&&(r=(null==(n=t.YI)?void 0:n.length)?t.YI:t.KI.II);if(i){var s,u=(null==(s=i.YI)?void 0:s.length)?i.YI:i.KI.II,o=u.slice().sort(function(t,i){return t.kW-i.kW}),h=this.xDt(o);0===h.length&&u.length>0&&h.push(rr(u,function(t){return t.kW})),e=h}for(var a,c=[],f=r.length>0?r:[void 0],v=e.length>0?e:[void 0],d=Ft(f);!(a=d()).done;)for(var l,g=a.value,w=Ft(v);!(l=w()).done;){var m=l.value;c.push(uq(g,m))}return function(t){return t.sort(function(t,i){return i.yDt-t.yDt})}(c)},i.xDt=function(t){var i=this,n=Wn(t,function(t){return t.Mi>=i.TL.Mi&&t.Ti>=i.TL.Ti});return n?t.filter(function(t){return t.Mi<=n.Mi&&t.Ti<=n.Ti}):t.slice()},i.zg=function(){this.lDt=void 0,this.uDt.hr(),this.uL()},xt(t,[{key:"fDt",get:function(){return uq(this.vDt.eDt,this.vDt.nDt)}}]),t}();function uq(t,i){var n,r;return{kDt:t,EDt:i,yDt:1.3*((null!=(n=null==t?void 0:t.kW)?n:0)+(null!=(r=null==i?void 0:i.kW)?r:0))}}function oq(t,i){var n,r,e,s;return void 0===t||void 0===i?t===i:(null==(n=t.kDt)?void 0:n.o)===(null==(r=i.kDt)?void 0:r.o)&&(null==(e=t.EDt)?void 0:e.o)===(null==(s=i.EDt)?void 0:s.o)&&t.yDt===i.yDt}V(),It(),Wt(),Bt(),Yt();var hq=function(){function t(t,i,n){this.RDt=void 0,this.nT=new dr,this.RDt=t,this.Ixt(i,n,this.nT.Yg).catch(yn)}var i=t.prototype;return i.Ixt=function(t,i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return n.Hg?[3,6]:[4,Rr(6e5,n)];case 1:e.sent(),e.label=2;case 2:return e.trys.push([2,4,,5]),r=this,[4,aq(t,i,n)];case 3:return r.RDt=e.sent(),[3,5];case 4:return pr(e.sent()),[3,5];case 5:return[3,0];case 6:return[2]}})}).call(this)},i.zg=function(){this.nT.Zg()},t.create=function(i,n,r){return jt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,aq(i,n,r)];case 1:return[2,new t(e.sent(),i,n)]}})})()},xt(t,[{key:"Oyt",get:function(){return(this.RDt.serverTimeMs+(Vi.Mg()-this.RDt.localTimeMs))/1e3}},{key:"CDt",get:function(){return(this.RDt.localTimeMs-this.RDt.serverTimeMs)/1e3}}]),t}();function aq(t,i,n){return jt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return[4,cq(t,i,n)];case 1:return r=h.sent(),e=r[0],s=r[1],u=r[2],s>20?[4,cq(t,i,n)]:[3,3];case 2:o=h.sent(),e=o[0],s=o[1],u=o[2],h.label=3;case 3:return[2,{localTimeMs:e,serverTimeMs:u-s/2}]}})})()}function cq(t,i,n){return jt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return r=Vi.Mg(),[4,i.lk({Uk:kl.GET,Yu:t,Yg:n})];case 1:return e=h.sent(),s=Vi.Mg()-r,[4,e.UT(n)];case 2:return u=h.sent(),o=1e3*Number(u),[2,[r,s,o]]}})})()}var fq=function(t){function i(){return t.call(this,"seek")||this}return Pt(i,t),i}(ah),vq=function(t){return t.Xz="seek",t}({}),dq=[ch.uo,Mp.wI,ch._y],lq=function(t){function i(i,n,r,e,s,u,o,h,a,c,f){var v;return(v=t.call(this)||this).Ac=void 0,v.nV=void 0,v.HDt=void 0,v.TL=void 0,v.UDt=void 0,v._dt=void 0,v.hBt=void 0,v.jDt=!1,v.lBt=!1,v.Rz=void 0,v.YL=new aw,v.$L=new aw,v.fBt=void 0,v.NDt=void 0,v.MDt=void 0,v.pCt=void 0,v.ODt=new Xa,v.WDt=void 0,v.GDt=void 0,v.zDt=void 0,v.jW=void 0,v.iq=void 0,v.Dpt=void 0,v.FDt=new Xa,v.rV=new dr,v.eBt=void 0,v.iBt=new dr,v.w7=void 0,v.m7=new dr,v.ZDt=void 0,v.DDt=void 0,v.uBt=void 0,v.$Dt=void 0,v.BDt=void 0,v.aBt=void 0,v.cBt=void 0,v.IL=function(){v.lBt=!0},v.updateActiveQualities=function(){var t,i,n=v.TL.MP,r=null==(t=v.DDt)?void 0:t.YIt(n),e=null==(i=v.BDt)?void 0:i.YIt(n);if(v.NDt!==r&&(v.NDt=r,r))for(var s,u=Ft(v.YL.II);!(s=u()).done;){s.value.tDt(r)}if(v.MDt!==e&&(v.MDt=e,e))for(var o,h=Ft(v.$L.II);!(o=h()).done;){o.value.tDt(e)}},v.oBt=function(t,i){var n=i.data;if(n.Km===wz.vRt){var r,e=n.gRt,s=n.pRt,u=n._Rt,o=n.mRt;if(v.WDt){var h=v.WDt.Oyt,a=v.TL.MP;if(v.lBt&&0!==a){var c={theolive:h-e+u-a,engine:s,distribution:A.max(h-(e+s),0),player:A.min(u-a,v.jW.nL.forceSeekOffset)};t===cw.Dk?(v.GDt=c,v.UDt.qIt(v.WDt.CDt+e,u)):(v.zDt=c,v.UDt.HIt(v.WDt.CDt+e,u))}}if(o)null!=v.fBt||(v.fBt=v.TL.tI(ep.VU,"timecode","timecode",void 0,!1,Uw.DEFAULT,!1,void 0)),v.fBt.tV(new em(u,u,o,!1,void 0)),pp(v.fBt,null!=(r=v.TL.IP.Tn(0))?r:-1)}v.So(i)},v.e8=function(t){mr(t)||(v.Xx(),v.So(new Ib(new md(gd.MEDIA_LOAD_ERROR,t.message))))},v.Ac=i,v.HDt=n,v.TL=r,v.nV=s,v.UDt=u,v.Rz=new sq(r,o,v,a,e,f),v._dt=h,v.hBt=c,v.jW=o,v.TL.wn(Mp.TM,v.IL),v.TL.wn(dq,v.updateActiveQualities),v}Pt(i,t);var n=i.prototype;return n.VDt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.DDt?[4,this.DDt._S(0,1/0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.BDt?[4,this.BDt._S(0,1/0)]:[3,4];case 3:t.sent(),t.label=4;case 4:return[2]}})}).call(this)},n.Un=function(){if(!this.Ac.src)throw new md(gd.SOURCE_INVALID,"No src property found in given source.");this.Dpt||(this.Dpt=this.lE(this.rV.Yg).catch(this.e8))},n.lE=function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return this.So(new sC),i=this.Ac.src,[4,this.HDt.Qxt(i,t)];case 1:return n=s.sent(),this.pCt=new Hz(i,n),this.pCt.FCt?(r=this,[4,hq.create(this.pCt.FCt,this.nV,t)]):[3,3];case 2:r.WDt=s.sent(),s.label=3;case 3:return this.qDt(),e=Qn(this.pCt.DCt,-1),this.createTracksForPresentation(e),this.ODt.Xy(),this.JCt(),[2]}})}).call(this)},n.iDt=function(t){for(var i,n=Ft(this.YL.II);!(i=n()).done;){var r=i.value;r.wO(r===t)}},n.sDt=function(t){for(var i,n=Ft(this.$L.II);!(i=n()).done;){var r=i.value;r.wO(r===t)}},n.JCt=function(){var t=Wn(this.YL.II,function(t){return t.Rt}),i=Wn(this.$L.II,function(t){return t.Rt}),n=this.Rz.pDt(t,i);Er(this.PDt(n.EDt,n.kDt))},n.qDt=function(){var t=this;if(this.pCt&&"live"===this.pCt.b0&&this.WDt){var i=this.pCt.DCt.filter(function(i){return i.o===t.pCt.NCt})[0].MP,n=this.WDt.CDt+new Date(this.pCt.ECt).getTime()/1e3;this.UDt.UIt(n,i)}},n.createTracksForPresentation=function(t){for(var i,n,r,e,s,u=Ft(null!=(r=t.yCt)?r:[]);!(e=u()).done;){var o=e.value;this.YL.tt(new Kz(o,this))}for(var h,a=Ft(null!=(s=t.bCt)?s:[]);!(h=a()).done;){var c=h.value;this.$L.tt(new Jz(c,this))}null==(i=this.YL.CI(0))||i.wO(!0),null==(n=this.$L.CI(0))||n.wO(!0)},n.Tn=function(){this.jDt=!0,this.QDt()},n.Xx=function(){var t;this.jDt=!1,this.KDt().catch(this.e8),"live"===(null==(t=this.hR)?void 0:t.b0)&&(this.YDt(),this.JDt())},n.YDt=function(){this.ZDt&&this.ZDt.cancelDownload()},n.JDt=function(){this.$Dt&&this.$Dt.cancelDownload()},n.oR=function(t){var i=this;this.m7.Zg(),this.m7=new dr,this.w7=Ar(function(n){return i.tBt(t,i.w7,n)},this.m7).catch(this.e8)},n.tBt=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return i?[4,i]:[3,2];case 1:s.sent(),s.label=2;case 2:return[4,kr(this.W,n)];case 3:if(s.sent(),"live"!==this.pCt.b0)throw new p("The current video source does not support Live playback.");return yr(n),[4,this.KDt()];case 4:if(s.sent(),yr(n),!this.ZDt||!this.ZDt.CRt()&&this.ZDt.PRt===(null!=t?t:"now"))return[3,10];if(this.YDt(),!this.DDt)return[3,9];s.label=5;case 5:return this.DDt.$It?[4,kr(this.DDt.iRt,n)]:[3,7];case 6:return s.sent(),[3,5];case 7:return[4,this.DDt._S(0,1/0)];case 8:s.sent(),s.label=9;case 9:null==(r=this.ZDt)||r.My(null!=t?t:"now"),s.label=10;case 10:if(!this.$Dt||!this.$Dt.CRt()&&this.$Dt.PRt===(null!=t?t:"now"))return[3,16];if(this.JDt(),!this.BDt)return[3,15];s.label=11;case 11:return this.BDt.$It?[4,kr(this.BDt.iRt,n)]:[3,13];case 12:return s.sent(),[3,11];case 13:return[4,this.BDt._S(0,1/0)];case 14:s.sent(),s.label=15;case 15:null==(e=this.$Dt)||e.My(null!=t?t:"now"),s.label=16;case 16:return this.So(new fq),yr(n),this.w7=void 0,this.QDt(),[2]}})}).call(this)},n.My=function(t){var i=this;this.m7.Zg(),this.m7=new dr,this.w7=Ar(function(n){return i.y7(t,i.w7,n)},this.m7).catch(this.e8)},n.y7=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return i?[4,i]:[3,2];case 1:s.sent(),s.label=2;case 2:return[4,kr(this.W,n)];case 3:return s.sent(),yr(n),[4,this.KDt()];case 4:return s.sent(),yr(n),this.ZDt&&(this.ZDt.CRt()||this.ZDt.PRt!==t)&&this.YDt(),this.$Dt&&(this.$Dt.CRt()||this.$Dt.PRt!==t)&&this.JDt(),this.So(new fq),yr(n),null==(r=this.ZDt)||r.My(t),null==(e=this.$Dt)||e.My(t),this.w7=void 0,this.QDt(),[2]}})}).call(this)},n.PDt=function(t,i){var n,r,e=this;return(null==(n=this.ZDt)?void 0:n.kot)===i&&(null==(r=this.$Dt)?void 0:r.kot)===t?ot.resolve():(this.iBt.Zg(),this.iBt=new dr,this.eBt=Ar(function(n){return e.sBt(t,i,e.eBt,n)},this.iBt).catch(this.e8),this.eBt)},n.sBt=function(t,i,n,r){return jt(function(){var e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:return n?[4,n]:[3,2];case 1:a.sent(),a.label=2;case 2:return[4,kr(this.ODt.Qy,r)];case 3:return a.sent(),yr(r),[4,this.KDt()];case 4:return a.sent(),yr(r),[4,this.nBt(t,i)];case 5:return a.sent(),[4,this.rBt(t,i)];case 6:for(a.sent(),yr(r),u=Ft(null!=(s=null==t||null==(e=t.Ht)?void 0:e._Ct)?s:[]);!(o=u()).done;)h=o.value,this.hBt.Mgt({nit:h.channel,rit:h.language,Th:h.label});return this.eBt=void 0,this.QDt(),[2]}})}).call(this)},n.nBt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f,v,d,l,g,w,m,y,p,_;return zt(this,function(k){switch(k.label){case 0:return n=this,u=null!=(s=this.XDt)?s:"now",(null==(r=this.ZDt)?void 0:r.kot)===i?[3,5]:(h=this.ZDt&&!this.ZDt.CRt(),a=null==(o=this.ZDt)?void 0:o.PRt,this.ZDt?[4,this.ZDt.zg()]:[3,2]);case 1:k.sent(),this.ZDt=void 0,k.label=2;case 2:return this.DDt?[4,this.DDt.iRt]:[3,4];case 3:k.sent(),k.label=4;case 4:i&&(v=null!=(f=null==(c=this.DDt)?void 0:c.IP)?f:OA.iL(),d=h?a:v.An(v.V-1),this.ZDt=new Iz(i,this.nV,this._dt),this.ZDt.wn(dz.dRt,function(t){return n.oBt(cw.Dk,t)}),this.ZDt.My(null!=d?d:u)),k.label=5;case 5:return(null==(e=this.$Dt)?void 0:e.kot)===t?[3,10]:(g=this.$Dt&&!this.$Dt.CRt(),w=null==(l=this.$Dt)?void 0:l.PRt,this.$Dt?[4,this.$Dt.zg()]:[3,7]);case 6:k.sent(),this.$Dt=void 0,k.label=7;case 7:return this.BDt?[4,this.BDt.iRt]:[3,9];case 8:k.sent(),k.label=9;case 9:t&&(p=null!=(y=null==(m=this.BDt)?void 0:m.IP)?y:OA.iL(),_=g?w:p.An(p.V-1),this.$Dt=new Iz(t,this.nV,this._dt),this.$Dt.wn(dz.dRt,function(t){return n.oBt(cw.Bk,t)}),this.$Dt.My(null!=_?_:u)),k.label=10;case 10:return[2]}})}).call(this)},n.rBt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:if(n=function(t,i,n,r,e){var s=Zz(t,null==i?void 0:i.Ht.JRt.JRt,null==n?void 0:n.Ht.JRt.JRt,r),u=fH(s),o=[];i&&o.push({qT:i.oQ});n&&o.push({qT:n.oQ});return{Km:Op.wV,L4:o,aq:u,X4:e&&!r}}(this.Ac.contentProtection,i,t,this.TL.CL.RL,this.Ac.useManagedMediaSource),!this.iq||!this.iq.TZ(n))return[3,12];if(s=!(null==(r=this.ZDt)?void 0:r.CRt()),!this.DDt||!s)return[3,5];c.label=1;case 1:return this.DDt.$It?[4,this.DDt.iRt]:[3,3];case 2:return c.sent(),[3,1];case 3:return[4,this.DDt.AQ()];case 4:c.sent(),c.label=5;case 5:if(u=!(null==(e=this.$Dt)?void 0:e.CRt()),!this.BDt||!u)return[3,10];c.label=6;case 6:return(null==(o=this.BDt)?void 0:o.$It)?[4,this.BDt.iRt]:[3,8];case 7:return c.sent(),[3,6];case 8:return[4,null==(h=this.BDt)?void 0:h.AQ()];case 9:c.sent(),c.label=10;case 10:return[4,this.iq.EZ(n)];case 11:return c.sent(),[3,21];case 12:return this.YDt(),this.JDt(),this.DDt?[4,this.DDt.zg()]:[3,14];case 13:c.sent(),this.DDt=void 0,c.label=14;case 14:return this.BDt?[4,this.BDt.zg()]:[3,16];case 15:c.sent(),this.BDt=void 0,c.label=16;case 16:this.TL.x9(),c.label=17;case 17:return c.trys.push([17,,20,21]),[4,this.TL.hr()];case 18:return c.sent(),a=this,[4,this.TL.Un(n)];case 19:return a.iq=c.sent(),this.FDt.Xy(),this.iq.Q3&&this.ZDt&&(this.iq.Q3.wn($R.lZ,this.Rs),this.DDt=new fz(this.iq.Q3,this.TL,i,this.hBt)),this.iq.K3&&this.$Dt&&(this.iq.K3.wn($R.lZ,this.Rs),this.BDt=new fz(this.iq.K3,this.TL,t,this.hBt)),"live"===this.pCt.b0&&this.iq.C4(1/0),[3,21];case 20:return this.TL.I9(),[7];case 21:return[2]}})}).call(this)},n.QDt=function(){!this.jDt||this.w7||this.eBt||this.aBt||this.uBt||(this.Rz.Tn(),this.cBt=new dr,this.$Dt&&this.BDt&&(this.aBt=this.dBt(this.$Dt,this.BDt,this.cBt.Yg).catch(this.e8)),this.ZDt&&this.DDt&&(this.uBt=this.dBt(this.ZDt,this.DDt,this.cBt.Yg).catch(this.e8)))},n.KDt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Rz.Xx(),this.cBt&&(this.cBt.Zg(),this.cBt=void 0),this.aBt?[4,this.aBt]:[3,2];case 1:t.sent(),this.aBt=void 0,t.label=2;case 2:return this.uBt?[4,this.uBt]:[3,4];case 3:t.sent(),this.uBt=void 0,t.label=4;case 4:return[2]}})}).call(this)},n.dBt=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:return[4,this.W];case 1:l.sent(),l.label=2;case 2:return t.$It?[4,kr(t.iRt,n)]:[3,4];case 3:return l.sent(),[3,2];case 4:return i.$It?[4,kr(i.iRt,n)]:[3,6];case 5:return l.sent(),[3,4];case 6:return t.CRt()?[3,13]:(r=Vi.Mg()/1e3,e="now"===t.PRt,[4,t.DRt()]);case 7:return s=l.sent(),u=s.initialization,o=s.data,h=s.metadata,a={Km:JR.vZ,ck:u},c=o?{Km:JR.vZ,ck:o}:void 0,f=i.IP,!Vi.Zs.wp&&!this.TL.CL.RL&&h&&f.An(f.V-1)>h.xet?[4,i._S(h.xet,1/0)]:[3,9];case 8:l.sent(),l.label=9;case 9:return[4,i.z2(a)];case 10:return l.sent(),c?[4,i.H2(c,h,t.kot)]:[3,12];case 11:l.sent(),l.label=12;case 12:v=i.IP.UM(f),e&&v.V>0&&this.UDt.OIt(r,v.An(v.V-1)),l.label=13;case 13:return t.ERt?[3,15]:(yr(n),d=t.URt(),[4,kr(i.appendStream(d,t),n)]);case 14:return l.sent(),[3,13];case 15:return[2]}})}).call(this)},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.rV.Zg(),this.Dpt?[4,this.Dpt.catch(yn)]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.w7?(this.m7.Zg(),this.YDt(),this.JDt(),[4,this.w7.catch(yn)]):[3,4];case 3:t.sent(),t.label=4;case 4:return this.eBt?(this.iBt.Zg(),this.YDt(),this.JDt(),[4,this.eBt.catch(yn)]):[3,6];case 5:t.sent(),t.label=6;case 6:return[4,this.KDt()];case 7:return t.sent(),this.ZDt?[4,this.ZDt.zg()]:[3,9];case 8:t.sent(),t.label=9;case 9:return this.$Dt?[4,this.$Dt.zg()]:[3,11];case 10:t.sent(),t.label=11;case 11:return this.ZDt=void 0,this.$Dt=void 0,this.FDt.Zg(),this.ODt.Zg(),this.iq?[4,this.TL.hr()]:[3,13];case 12:t.sent(),this.iq=void 0,t.label=13;case 13:return this.DDt=void 0,this.BDt=void 0,this.TL.mn(Mp.TM,this.IL),this.TL.mn(dq,this.updateActiveQualities),this.YL.hr(),this.NDt=void 0,this.$L.hr(),this.MDt=void 0,this.pCt=void 0,this.WDt&&(this.WDt.zg(),this.WDt=void 0),this.jDt=!1,[2]}})}).call(this)},xt(i,[{key:"hR",get:function(){return this.pCt}},{key:"IP",get:function(){return this.DDt&&this.BDt?this.DDt.IP.Mn(this.BDt.IP):this.DDt?this.DDt.IP:this.BDt?this.BDt.IP:OA.iL()}},{key:"eDt",get:function(){return this.NDt}},{key:"nDt",get:function(){return this.MDt}},{key:"ht",get:function(){return this.YL}},{key:"rt",get:function(){return this.$L}},{key:"LDt",get:function(){return this.ODt.Qy}},{key:"W",get:function(){return this.FDt.Qy}},{key:"Sx",get:function(){return this.pCt?function(t,i,n){var r,e=null==(r=t.DCt[0])?void 0:r.MP,s=t.TCt;if(void 0===e||void 0===s)return n>0&&nn+2){var r=t-i;if(r<=this.lastAmountToSeekForward&&!this.oa.kx)return this.oa.MP+=r,this.lastAmountToSeekForward=0,!0;this.lastAmountToSeekForward=r}else this.lastAmountToSeekForward=0;return!1},n.cL=function(){return hz(t.prototype.cL.call(this))},n.LL=function(){return!Vi.Zs.pp},i}(jA),wq=[ch.Jw,ch.Qw,ch._y,ch.Bw,ch.Kw,ch.gy,ch.Rw,ch.Lw,ch.Nw,ch.Pw,ch.Ew],mq=function(t){function i(i,n,r,e,s){var u,o;return(u=t.call(this)||this).TL=void 0,u.nV=void 0,u.oq=void 0,u.kq=void 0,u.bq=void 0,u.jW=void 0,u.lq=void 0,u.UDt=void 0,u.Cz=void 0,u.mBt=void 0,u._dt=void 0,u.Rz=void 0,u.Ac=void 0,u.vDt=void 0,u.Sz=!1,u.gBt=void 0,u.m7=new dr,u.w7=void 0,u.NEt=void 0,u.RBt=new dr,u.$et=!0,u.lBt=!1,u.YL=new hA,u.$L=new hA,u.Gl=void 0,u.hBt=void 0,u.ZW=void 0,u.JW=void 0,u.wBt=eS.lz,u.bBt=void 0,u.bd=function(){var t=u.IP;t.length>0&&u.hBt.qU(t.start(0))},u.vBt=function(){u.TL.hx!==u.$et&&(u.TL.hx?u.zx():u.Gx().catch(yn))},u.GG=function(){u.lBt=!0},u.TBt=function(t){u.ZW=t.errorObject,u.JW=ww(u.ZW),u.ABt(u.ZW)},u._Bt=function(t){u.ZW=yw(t.lt),u.JW=t.lt,u.ABt(u.ZW)},u.TL=i,u.kq=new Qp(u,u.TL),u.bq=new Gp(u.kq,!0),u.nV=n,u.Rz=r,u.oq=new tz(r.WY,r.kY.EW),u.lq=new Bb(n),u.TL.Eq=u.lq,s.allowNativeFullscreen?u.hBt=new WF(u.TL):u.hBt=new zF(u.TL),u.Gl=new Mb([u.hBt.Z]),u.UDt=new iz,u.mBt=new HW(u),u.Cz=e,u._dt=io({},s.retryConfiguration,{maxRetries:null!=(o=s.retryConfiguration.maxRetries)?o:3}),u.OI(),u}Pt(i,t);var n=i.prototype;return n.OI=function(){this.TL.wn(wq,this.Rs),this.TL.wn(Mp.TM,this.GG),this.TL.wn([ch.uo,ch.jw],this.vBt),this.TL.wn(Jy.ma,this._Bt),this.TL.wn(ch._y,this.bd),this.bq.wn(Lp,this.Rs)},n.MI=function(){this.TL.mn(wq,this.Rs),this.TL.mn(Mp.TM,this.GG),this.TL.mn([ch.uo,ch.jw],this.vBt),this.TL.mn(Jy.ma,this._Bt),this.TL.mn(ch._y,this.bd),this.bq.mn(Lp,this.Rs)},n.jx=function(){return!1},n.Hx=function(){return this.TL.Ma},n.Aa=function(){return this.TL.mq},n.tI=function(t){return this.TL.wq(t)},n.we=function(){this.TL.we()},n.be=function(){return this.TL.be()},n.Yx=function(){},n.Jx=function(){},n.Qx=function(){},n.Kx=function(){},n.OP=function(t,i){var n=this;this.m7.Zg(),this.m7=new dr,this.w7=Ar(function(i){return n.y7(t,i,n.w7)},this.m7)},n.pBt=function(){var t=this.hR;if(t){for(var i,n=new Date(t.creationDate).getTime(),r=NaN,e=Ft(t.presentations);!(i=e()).done;){var s=i.value;s.currentTime&&(r=s.currentTime.value/(s.currentTime.scale||1)*1e3)}if(!E(r))return new Date(n-r)}},n.yBt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.wBt!==eS.lz&&this.vDt?(this.vDt.Un(),this.wBt!==eS.OL&&this.wBt!==eS.TW?[3,2]:[4,this.vDt.LDt]):[2];case 1:t.sent(),"vod"===this.vDt.hR.b0&&this.vDt.Tn(),t.label=2;case 2:return[2]}})}).call(this)},n.Ta=function(t,i,n){return jt(function(){var i,r;return zt(this,function(e){switch(e.label){case 0:return yr(n),[4,this.hr()];case 1:return e.sent(),yr(n),aT(t)?(i=t,this.Ac=i,r=new jW(this.nV),this.bBt=this.SBt(t),this.jW=new gq(this,this.TL,this.bBt),this.jW.Rt=!0,this.jW.wn("latencyrecoveryseek",this.Rs),this.Fx.Ea(this.jW),this.vDt=new lq(i,r,this.TL,this.oq,this.nV,this.UDt,this.jW,this._dt,this,this.hBt,this.Rz),this.vDt.wn(ch.Ww,this.Rs),this.vDt.wn(Jy.ma,this.TBt),this.YL.BI=this.vDt.ht,this.$L.BI=this.vDt.rt,this.lq.IW(t.contentProtection),Er(this.yBt()),[2]):(this.ZW=new md(gd.SOURCE_INVALID,"HESP source incorrectly configured"),this.JW=ww(this.ZW),this.ABt(this.ZW),[2,ot.resolve()])}})}).call(this)},n.Px=function(t,i,n,r){return ot.resolve()},n.xx=function(){return ot.resolve()},n.SBt=function(t){return t.latencyConfiguration?t.latencyConfiguration:az()},n.Gx=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return this.vDt?(this.$et=!1,this.vDt.Un(),[4,this.vDt.W]):[2];case 1:return n.sent(),this.So(new _T(this.MP)),i=this.vDt.ww(vq.Xz),this.oR(),[4,i];case 2:return n.sent(),this.vDt.Tn(),[4,this.TL.Gx()];case 3:return n.sent(),null==(t=this.jW)||t.Tn(),[2]}})}).call(this)},n.zx=function(){var t;this.vDt&&(this.$et=!0,this.So(new pT(this.MP)),this.vDt.Xx(),null==(t=this.jW)||t.Xx(),this.TL.zx())},n.oR=function(){var t=this;if(this.NEt)throw new p("Cannot seek while resetting");this.m7.Zg(),this.m7=new dr,this.w7=Ar(function(i){return t.tBt(t.w7,i)},this.m7)},n.y7=function(t,i,n){return jt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:if(this.NEt)throw new p("Cannot seek while resetting");return r=t,this.kBt(r),this.Sx.length>0&&(r=OA.jn(this.Sx).DM(r),this.kBt(r)),this.vDt?n?[4,n.catch(yn)]:[3,2]:[2];case 1:u.sent(),yr(i),u.label=2;case 2:return u.trys.push([2,4,,5]),e=this.TL.ww(ch.Zw,i),this.TL.My(r),this.vDt.My(r),[4,e];case 3:return u.sent(),[3,5];case 4:throw pr(s=u.sent()),this.vDt.Xx(),this.EBt(),s;case 5:return this.PBt(),[2]}})}).call(this)},n.tBt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:return this.So(new ah("golive")),n=this.XDt,this.kBt(n),this.vDt?t?[4,t.catch(yn)]:[3,2]:[2];case 1:c.sent(),yr(i),c.label=2;case 2:return c.trys.push([2,11,,13]),r=this.jW.nL.targetOffset,[4,this.vDt.LDt];case 3:c.sent(),n&&r>=1?(this.jW.LL()||(s=A.min(1,.5*r),r-=s),e=n-r):e=this.XDt?this.XDt-.2:void 0,this.vDt.oR(e),c.label=4;case 4:return this.ikt.V>0?[4,this.vDt.ww($R.lZ,i)]:[3,6];case 5:return c.sent(),[3,4];case 6:u=this.ikt,c.label=7;case 7:return 0!==this.ikt.UM(u).V?[3,9]:[4,this.vDt.ww($R.lZ,i)];case 8:return c.sent(),[3,7];case 9:return e=this.ikt.Tn(this.ikt.V-1),e=this.xBt(e),this.kBt(e),o=this.TL.ww(ch.Zw,i),this.TL.My(e,!0),[4,o];case 10:return c.sent(),[3,13];case 11:if(mr(h=c.sent()))throw null==(a=this.jW)||a.Tn(),h;return this.vDt.Xx(),[4,this.vDt.VDt()];case 12:throw c.sent(),this.EBt(),h;case 13:return this.PBt(),[2]}})}).call(this)},n.kBt=function(t){this.Sz=!0,this.gBt=t,this.So(new TT(this.MP))},n.PBt=function(){this.Sz&&(this.gBt=void 0,this.Sz=!1,this.So(new ST(this.MP)))},n.EBt=function(){this.gBt=void 0,this.Sz=!1},n.xBt=function(t){return t},n.IBt=function(){var t;null==(t=this.vDt)||t.Xx()},n.ABt=function(t){this.So(new Ib(t)),this.IBt()},n.MEt=function(t,i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return yr(n),null==(r=this.jW)||r.Xx(),t?[4,t.catch(yn)]:[3,2];case 1:e.sent(),e.label=2;case 2:return i?[4,i.catch(yn)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[4,this.hBt.hr()];case 5:return e.sent(),this.vDt?[4,this.vDt.zg()]:[3,7];case 6:e.sent(),this.vDt=void 0,e.label=7;case 7:return yr(n),[4,this.TL.hr()];case 8:return e.sent(),yr(n),this.TL.Aq(),this.$L.hr(),this.YL.hr(),this.EBt(),this.bq.hr(),this.UDt.hr(),this.ZW=void 0,this.JW=void 0,this.$et=!0,this.lBt=!1,this.Ac=void 0,this.NEt=void 0,this.bBt=void 0,[2]}})}).call(this)},n.hr=function(){return this.m7.Zg(),this.m7=new dr,this.RBt.Zg(),this.RBt=new dr,this.NEt=this.MEt(this.w7,this.NEt,this.RBt.Yg).catch(function(t){return _r(t)}),this.NEt},n.kn=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return this.MI(),this.bq.kn(),this.kq.zg(),this.Ac?[4,this.hr()]:[3,2];case 1:n.sent(),n.label=2;case 2:return this.Vo(),this.TL.Eq=void 0,null==(t=this.jW)||t.mn("latencyrecoveryseek",this.Rs),null==(i=this.jW)||i.zg(),[4,this.hBt.kn()];case 3:return n.sent(),this.Gl.kn(),this.YL.kn(),this.$L.kn(),[2]}})}).call(this)},xt(i,[{key:"ht",get:function(){return this.YL}},{key:"rt",get:function(){return this.$L}},{key:"hR",get:function(){var t,i;return null==(i=this.vDt)||null==(t=i.hR)?void 0:t.hR}},{key:"Mx",get:function(){return this.TL.Mx},set:function(t){this.TL.Mx=t}},{key:"Vx",get:function(){return!1},set:function(t){}},{key:"hq",get:function(){return this.oq}},{key:"$P",get:function(){return this.TL.$P},set:function(t){this.TL.$P=t}},{key:"MP",get:function(){var t;return null!=(t=this.gBt)?t:this.TL.MP},set:function(t){this.OP(t)}},{key:"CP",get:function(){var t=this.pBt();if(t)return new Date(t.getTime()+1e3*this.MP)},set:function(t){var i=this.pBt();t&&i&&(this.MP=i.getTime()-t.getTime())}},{key:"bt",get:function(){return this.Ac}},{key:"ux",get:function(){return this.TL.ux},set:function(t){this.TL.ux=t}},{key:"ct",get:function(){var t=this.TL.ct;return t===In?1/0:t}},{key:"UP",get:function(){return!1}},{key:"WP",get:function(){return this.ZW}},{key:"lt",get:function(){return this.JW}},{key:"zP",get:function(){return this.mBt}},{key:"jP",get:function(){}},{key:"KP",get:function(){return!1}},{key:"JP",get:function(){return io({},{iO:0,eO:0,sO:0,nO:0,rO:0,hO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.TL.ZP())}},{key:"sx",get:function(){return!0}},{key:"kx",get:function(){return this.Sz}},{key:"nq",get:function(){}},{key:"nt",get:function(){return this.Gl}},{key:"Rx",get:function(){return this.TL.Rx}},{key:"Bx",get:function(){return this.TL.Bx}},{key:"IP",get:function(){return this.ikt._s()}},{key:"ikt",get:function(){return this.vDt?this.vDt.IP:OA.iL()}},{key:"_x",get:function(){return this.TL._x._s()}},{key:"Sx",get:function(){var t,i;return null!=(i=null==(t=this.vDt)?void 0:t.Sx._s())?i:OA.iL()._s()}},{key:"hx",get:function(){return this.$et}},{key:"rR",get:function(){return!0}},{key:"Fx",get:function(){return this.Cz}},{key:"XDt",get:function(){var t;return null==(t=this.vDt)?void 0:t.XDt}},{key:"BL",get:function(){if(!this.hx&&this.lBt){var t=this.MP,i=this.UDt.XIt(t);if(void 0!==i){var n=this.ikt,r=0;if(n.V>0){var e=n.An(n.V-1);r=A.max(e-t,0)}return A.max(i,r)}}}},{key:"eR",get:function(){var t;return null==(t=this.vDt)?void 0:t.eR}},{key:"sR",get:function(){var t;return null==(t=this.vDt)?void 0:t.sR}},{key:"nR",get:function(){var t;return null==(t=this.vDt)?void 0:t.nR}},{key:"Ax",get:function(){return this.TL.Ax}},{key:"mx",get:function(){return this.wBt},set:function(t){this.wBt=t,this.yBt()}}]),i}(uh),yq=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,r,e,u)||this).xq=void 0,o.OBt=void 0,o.MBt=!1,o.CBt=!1,o.BBt=[],o.NBt=void 0,o.LBt=function(){var i=o.$P||0===o.Mx;"hidden"!==v.visibilityState||o.hx||!i||o.Aa().XL?"visible"===v.visibilityState&&o.MBt&&(o.CBt=!0,o.NBt=Vi.Og(function(){for(var i,n=Ft(o.BBt);!(i=n()).done;){var r=i.value;t.prototype.So.call($H(o),r)}o.NBt=void 0,o.CBt=!1},2e3),Er(o.Gx()),o.MBt=!1):(o.zx(),o.MBt=!0)},o.xq=s,o.OBt=i,Oi.Cg&&v.addEventListener("visibilitychange",o.LBt),o}Pt(i,t);var n=i.prototype;return n.So=function(i){if(this.CBt){if(i.type===ch.Zw)return void this.DBt();if(i.type===Mp.SM||i.type===ch.$w||i.type===Mp.TM)return void this.BBt.push(i)}t.prototype.So.call(this,i)},n.DBt=function(){this.CBt=!1,void 0!==this.NBt&&Vi.Lg(this.NBt);var i=Wn(this.BBt,function(t){return t.type===Mp.TM});i&&t.prototype.So.call(this,i),tr(this.BBt)},n.Wx=function(){if(PO(this.TL))return this.TL.Wx()},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.MBt=!1,this.DBt(),[4,t.prototype.hr.call(i)];case 1:return n.sent(),[2]}})}).call(this)},n.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return v.removeEventListener("visibilitychange",this.LBt),this.DBt(),[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.TL.zg()];case 2:return n.sent(),[4,this.xq.Pq(this.OBt)];case 3:return n.sent(),[2]}})}).call(this)},n.xBt=function(t){return Oi.X_&&Oi.Q_>=15&&Oi.Kv?t+.25:t},i}(mq);V(),It(),Wt(),Bt(),Yt();var pq=function(){function t(){}var i=t.prototype;return i.Xq=function(t,i){return jt(function(){return zt(this,function(i){return[2,_q(t.type)]})})()},i.jq=function(t){return jt(function(){return zt(this,function(i){return[2,V_(t)]})})()},xt(t,[{key:"Kq",get:function(){return Nb._R}}]),t}();function _q(t){if(!t)return!1;var i=t.toLowerCase();return zo(i,pA.vR)||zo(i,pA._R)}var kq=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.PR=function(t,i,n,r,e,s,u){var o=new QO(i),h=o.Gq(cw.Bk);return new yq(h,n,e,s,o,r)},n.Xq=function(i,n){return Vi.dP&&Yd?Oi.w_||Oi.S_||Oi.D_?ot.resolve(!1):Me(i.useManagedMediaSource)?t.prototype.Xq.call(this,i,n):ot.resolve(!1):ot.resolve(!1)},n.Qq=function(){return!1},i}(pq);iS(new kq),V(),It(),Wt(),Bt(),Nt(),H(),Yt(),V(),It(),Wt(),Nt(),Yt();var bq=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,r,e,u)||this).xq=void 0,o.xq=s,o}Pt(i,t);var n=i.prototype;return n.Wx=function(){if(PO(this.TL))return this.TL.Wx()},n.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.xq.Pq(this.TL)];case 2:return n.sent(),[2]}})}).call(this)},i}(mq),Aq=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.Xq=function(i,n){var r=this;return jt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return Oi.IS_IOS_CHROME?[2,!1]:[4,t.prototype.Xq.call(r,i,n)];case 1:if(u=h.sent(),!(null!=(o=null==(s=xr())||null==(e=s.canPlayType)?void 0:e.call(s,pA.dR))?o:"")||!u||!("serviceWorker"in l))return[2,!1];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,Cr(l.serviceWorker.ready,1e3)];case 3:return h.sent(),[2,!0];case 4:return h.sent(),[2,!1];case 5:return[2]}})})()},n.jq=function(i){var n=this;return jt(function(){return zt(this,function(r){switch(r.label){case 0:return i.fairplay?[4,t.prototype.jq.call(n,i)]:[2,!1];case 1:return[2,r.sent()]}})})()},n.PR=function(t,i,n,r,e,s,u){if(j(t,HTMLDivElement)){var o=i.dst(cw.Bk);return new bq(o,n,e,s,i,r)}throw new md(gd.CONFIGURATION_ERROR,"Container Div element expected.")},n.Qq=function(){return!1},xt(i,[{key:"Kq",get:function(){return Nb.bW}}]),i}(pq);Oi.X_&&Oi.ru&&iS(new Aq),V(),It(),V(),It(),V(),It(),Wt(),Bt(),Nt(),H(),ft(),Ut(),Yt(),V(),It(),Bt();var Tq="theo_live_user_id",Sq=function(){function t(t){this.externalId=void 0,this.id=void 0,this.userId=void 0,this.yb=void 0,this.externalId=t,this.id=rI(),this.userId=Eq(),this.yb=0}return t.prototype.incrementSequenceNumber=function(){this.yb+=1},xt(t,[{key:"sequenceNumber",get:function(){return this.yb}}]),t}();function Eq(){try{var t=localStorage.getItem(Tq);if(t)return t;var i=rI();return localStorage.setItem(Tq,i),i}catch(t){return rI()}}function Iq(t){var i;return{hespSrc:t.hespSrc,type:"theo.live",hlsSrc:t.hlsSrc,maxMobileBitrate:t.maxMobileBitrate,targetLatency:null==(i=t.metadata.customization)?void 0:i.targetLatency,contentProtection:t.drmConfig?t.drmConfig:void 0}}function Rq(t){var i=t.integration,n=t.widevine,r=t.playready,e=t.fairplay;return io({integration:i},n&&{widevine:{licenseAcquisitionURL:n.licenseUrl}},r&&{playready:{licenseAcquisitionURL:r.licenseUrl}},e&&{fairplay:{licenseAcquisitionURL:e.licenseUrl,certificateURL:e.certificateUrl}})}function Cq(t,i){return{id:t.id,name:t.name,deleted:"deleted"===t.status,targetLatency:t.source.targetLatency,maxMobileBitrate:t.source.maxMobileBitrate,endpoints:[{hespSrc:t.source.hespSrc,hlsSrc:t.source.hlsSrc,weight:1,priority:1,contentProtection:t.source.contentProtection},t.fallback&&i?{hespSrc:t.fallback.hespSrc,hlsSrc:t.fallback.hlsSrc,weight:1,priority:2,contentProtection:t.fallback.contentProtection}:void 0].filter(Fi)}}V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),V(),It(),Wt(),ft(),Yt(),V(),It();var Pq=function(t){return t.STARTING="s",t.PLAYING="p",t.SEEKING="k",t.REBUFFERING="r",t.PAUSED="a",t.ENDED="e",t.QUIT="q",t}({}),Nq=function(t){return t.MANIFEST="m",t.AUDIO="a",t.VIDEO="v",t.OTHER="o",t}({});function Dq(t){return 100*A.round(t/100)}function xq(t){for(var i=t.LP(),n=t.RP(),r=0;r0&&void 0!==n&&void 0!==i&&(this.VBt+=1,this.HBt=this.WBt(this.HBt,n),this.qBt=this.WBt(this.qBt,1e3*this.oa.Fx.Cd.targetOffset),this.rq=this.WBt(this.rq,1e3*i),this.zBt=this.WBt(this.zBt,t/1e3))},i.WBt=function(t,i){return t+(i-t)/this.VBt},i.PR=function(){var t={sta:this.Vp,ts:this.FBt,"theo-vt":this.GBt,"theo-at":this.XBt,"theo-d":this.ct,"theo-r":this._f,"theo-e":this.JW};return this.VBt>0?io({},t,{bl:Dq(this.HBt),tbl:Dq(this.qBt),ltc:Dq(this.rq),mtp:Dq(this.zBt),"theo-w":this.VBt}):t},i.jBt=function(){return new t(this.Vp,this.oa,this._f)},t.starting=function(i,n,r){return new t(Pq.STARTING,i,n,r)},t.playing=function(i){return new t(Pq.PLAYING,i)},t.seeking=function(i,n){return new t(Pq.SEEKING,i,n)},t.rebuffering=function(i,n){return new t(Pq.REBUFFERING,i,n)},t.paused=function(i){return new t(Pq.PAUSED,i)},t.ended=function(i){return new t(Pq.ENDED,i)},t.quit=function(i){return new t(Pq.QUIT,i)},xt(t,[{key:"ct",get:function(){return Date.now()-this.FBt}}]),t}(),Fq=function(){function t(t,i,n){var r=this;this.oa=void 0,this.tNt=void 0,this.rNt=void 0,this.vNt=void 0,this.YBt=void 0,this.eNt=[],this.KBt=void 0,this.lBt=!1,this.nX=!1,this.cNt=function(t){var i,n,e;r.sNt(Lq.starting(r.oa,"fallback",null!=(e=null==(i=t.reason)?void 0:i.message)?e:null==(n=r.oa.qP())?void 0:n.message))},this.dNt=function(){r.sNt(Lq.starting(r.oa,"loadChannel"))},this.lNt=function(){r.sNt(Lq.ended(r.oa))},this.GW=function(t){t.Ht.wn(Mg.TI,r.ih)},this.ih=function(){var t,i,n,e,s=null==(i=Bq(r.oa.rt))||null==(t=i.XI)?void 0:t.o,u=null==(e=Bq(r.oa.ht))||null==(n=e.XI)?void 0:n.o;s&&u&&(r.KBt&&r.KBt.Vp===Pq.PLAYING&&r.KBt.GBt===s&&r.KBt.XBt===u||r.sNt(Lq.playing(r.oa)))},this.IL=function(){r.lBt=!0,r.nX=!1,r.sNt(Lq.playing(r.oa))},this.aNt=function(){r.lBt&&!r.nX&&(r.nX=!0,r.sNt(Lq.seeking(r.oa,"latencyRecovery")))},this.uNt=function(){r.lBt&&!r.nX&&(r.nX=!0,r.sNt(Lq.seeking(r.oa,"goLive")))},this.xL=function(){r.oa.kx||r.sNt(Lq.rebuffering(r.oa,"visible"===v.visibilityState?void 0:"invisible"))},this.oNt=function(){r.sNt(Lq.paused(r.oa))},this.fNt=function(t){var i=Vi.Dh(t.url),n=function(t){var i=t.pathname;if(qo(i,"manifest.json"))return Nq.MANIFEST;if(Wo(i,"/video/"))return Nq.VIDEO;if(Wo(i,"/audio/"))return Nq.AUDIO;return Nq.OTHER}(i);if(n!==Nq.OTHER){r.YBt.incrementSequenceNumber();var e=io({},t.headers,{"CMCD-Request":r.QBt(),"CMCD-Object":r.JBt(n),"CMCD-Status":r.ZBt(),"CMCD-Session":r.$Bt()});n===Nq.VIDEO&&!qo(i.pathname,".hspi")&&r.KBt&&(r.sNt(r.KBt.jBt()),e=io({},e,r.iNt())),t.redirect(io({},t,{headers:e}))}},this.hNt=function(){Er(r.nNt())},this.oa=t,this.tNt=i,this.YBt=n;var e=i.endpoints[0],s=(null==e?void 0:e.hespSrc)||(null==e?void 0:e.hlsSrc)||"";this.rNt=Vi.Dh("bye",s).href,f.addEventListener("beforeunload",this.hNt),this.oa.wn(Mp.TM,this.IL),this.oa.wn(Mp.SM,this.xL),this.oa.wn(ch.jw,this.oNt),this.oa.zP.wn("latencyrecoveryseek",this.aNt),this.oa.zP.wn("golive",this.uNt),this.oa.oX.gY(this.fNt),this.oa.rt.wn(Ng.eI,this.GW),this.oa.ht.wn(Ng.eI,this.GW),this.oa.tnt.addEventListener("intenttofallback",this.cNt),this.oa.tnt.addEventListener("distributionloadstart",this.dNt),this.oa.tnt.addEventListener("distributionoffline",this.lNt),this.KBt=Lq.starting(this.oa,"loadchannel"),this.vNt=Vi.fm(function(){var t;null==(t=r.KBt)||t.UBt()},1e3)}var i=t.prototype;return i.QBt=function(){var t,i=this.oa.Fx.BL,n=xq(this.oa),r=this.oa.oX.kY.kW;return Uq({bl:void 0!==n?Dq(n):void 0,tbl:Dq(1e3*this.oa.Fx.Cd.targetOffset),ltc:void 0!==i?Dq(1e3*i):void 0,mtp:void 0!==r?Dq(r/1e3):void 0,sta:null==(t=this.KBt)?void 0:t.Vp,su:!this.lBt||void 0,"theo-sq":this.YBt.sequenceNumber})},i.JBt=function(t){var i,n,r=function(t,i){switch(i){case Nq.VIDEO:return Bq(t.rt);case Nq.AUDIO:return Bq(t.ht)}}(this.oa,t);return Uq({br:(null==r||null==(i=r.XI)?void 0:i.kW)?Dq((null==r||null==(n=r.XI)?void 0:n.kW)/1e3):void 0,ot:t,tb:r?Dq(Mq(r).kW/1e3):void 0,lb:r?Dq(Oq(r).kW/1e3):void 0})},i.ZBt=function(){return Uq({"theo-cw":this.oa.xe.clientWidth,"theo-ch":this.oa.xe.clientHeight,"theo-m":this.oa.$P,"theo-vo":A.ceil(100*this.oa.Mx)})},i.$Bt=function(){var t;return Uq({sf:Vq(this.oa.bt),sid:this.YBt.id,st:"l",v:2,"theo-eid":null==(t=this.YBt.externalId)?void 0:t.substring(0,128),"theo-cn":this.tNt.name.substring(0,128),"theo-v":"10.0.0","theo-t":"web","theo-u":this.YBt.userId})},i.iNt=function(){var t={"CMCD-States":btoa(JSON.stringify(this.eNt))};return this.eNt=[],t},i.sNt=function(t){this.KBt&&this.eNt.push(this.KBt.PR()),this.KBt=t},i.nNt=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.KBt&&(this.eNt.push(this.KBt.PR()),this.KBt=void 0),this.eNt.push(Lq.quit(this.oa).PR()),t=io({},this.iNt(),{"CMCD-Session":this.$Bt()}),[4,this.oa.SP.lk({Yu:this.rNt,fk:t,Qk:!0})];case 1:return[4,i.sent().ck()];case 2:return i.sent(),[2]}})}).call(this)},i.destroy=function(){var t=this;this.hNt(),f.removeEventListener("beforeunload",this.hNt),this.oa.mn(Mp.TM,this.IL),this.oa.mn(Mp.SM,this.xL),this.oa.mn(ch.jw,this.oNt),this.oa.zP.mn("latencyrecoveryseek",this.aNt),this.oa.zP.mn("golive",this.uNt),this.oa.rt.mn(Ng.eI,this.GW),this.oa.ht.mn(Ng.eI,this.GW),this.oa.rt.II.forEach(function(i){return i.mn(Mg.TI,t.ih)}),this.oa.ht.II.forEach(function(i){return i.mn(Mg.TI,t.ih)}),this.oa.tnt.removeEventListener("intenttofallback",this.cNt),this.oa.tnt.removeEventListener("distributionloadstart",this.dNt),this.oa.tnt.removeEventListener("distributionoffline",this.lNt),this.oa.oX.wY(this.fNt),Vi.vm(this.vNt)},t}();function Uq(t){return b.keys(t).map(function(i){return function(t,i){switch(void 0===i?"undefined":W(i)){case"boolean":return i?t:t+"=false";case"number":return t+"="+i;case"string":return t+'="'+i+'"';default:return}}(i,t[i])}).filter(Boolean).sort().join(",")}function Vq(t){if(t)return t.type===pA.dR||t.type===pA.lR?"h":t.type===pA._R?"e":void 0}var jq=function(t){function i(i,n,r){var e;return(e=t.call(this,i,"Could not load channel with id "+n+": "+r)||this).channelId=void 0,e.reason=void 0,e.channelId=n,e.reason=r,e}return Pt(i,t),i}(md),Hq=function(t){function i(i){return t.call(this,gd.THEO_LIVE_CHANNEL_NOT_FOUND,i,"The channel could not be found")||this}return Pt(i,t),i}(jq),Wq=function(t){function i(i){return t.call(this,gd.THEO_LIVE_CHANNEL_NOT_FOUND,i,"This account has been locked")||this}return Pt(i,t),i}(jq),zq=function(t){function i(i){return t.call(this,gd.THEO_LIVE_CHANNEL_NOT_FOUND,i,"The channel got deleted")||this}return Pt(i,t),i}(jq),qq=function(){function t(t,i){this.nV=void 0,this.gNt=void 0,this._Nt=void 0,this.nV=t,this.gNt=i,this._Nt=new Map}return t.prototype.Bgt=function(t){var i=this._Nt.get(t);if(i)return i;var n=new Xq(t,this.nV,this.gNt);return this._Nt.set(t,n),n},t}(),Xq=function(){function t(t,i,n){var r;this.hS=void 0,this.nV=void 0,this.gNt=void 0,this.mNt=void 0,this.yNt=void 0,this.wNt=void 0,this.bNt=void 0,this.hS=t,this.nV=i,this.gNt=n,this.bNt=new Wd,this.gNt.discoveryHeader&&this.bNt.append("x-theolive-discovery",this.gNt.discoveryHeader),this.bNt.set("CMCD-Session",Uq({sid:this.gNt.sessionId,st:"l",v:2,"theo-eid":null==(r=this.gNt.externalSessionId)?void 0:r.substring(0,128),"theo-v":"10.0.0","theo-t":"web","theo-u":this.gNt.userId})),this.er()}var i=t.prototype;return i.er=function(){var t=this;this.wNt=!1,this.mNt=le(),this.yNt=this.RSt(),this.yNt.catch(function(){return t.wNt=!0})},i.RSt=function(){return jt(function(){var t,i,n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:t=Ft(this.gNt.discoveryUrls),f.label=1;case 1:return(i=t()).done?[3,8]:(n=i.value,[4,this.ANt(this.hS,n,this.bNt)]);case 2:if(!(r=f.sent()))return[3,7];if(!function(t){return void 0!==t.mode}(r))return[3,6];if(e=r.mode,s=r.status,u=r.fallback,o=r.metadata,"locked"===e)throw new Wq(this.hS);if("deleted"===s)throw new zq(this.hS);return a={id:this.hS,name:o.name,mode:e,status:s,source:Iq(r)},u?[4,this.SNt(u,n,this.bNt)]:[3,4];case 3:return c=f.sent(),[3,5];case 4:c=void 0,f.label=5;case 5:return[2,Cq.apply(void 0,[(a.fallback=c,a.insights=null==o?void 0:o.insights,a.enhancedLogging=null==o?void 0:o.enhancedLogging,a.customization=null==o?void 0:o.customization,a.sseEndpoint=r.sseEndpoint,a),null==(h=this.gNt.fallbackEnabled)||h])];case 6:return[2,r];case 7:return[3,1];case 8:throw new Hq(this.hS)}})}).call(this)},i.SNt=function(t,i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return"theo.live"!==t.type?[2,{hespSrc:t.src,type:t.type}]:[4,this.ANt(t.src,i,n)];case 1:return(r=e.sent())?[2,Iq(r)]:[2,void 0]}})}).call(this)},i.ANt=function(t,i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),(r=Vi.Dh(t,i)).searchParams.set("osName",function(){var t=Vi.Zs.ap;if("ios"===t||"macos"===t)return"apple";return t}()),r.searchParams.set("deviceType",Vi.Zs.cp),r.searchParams.set("sdkType","web"),[4,this.nV.lk({Yu:r.toString(),fk:n})];case 1:return[4,e.sent().FT()];case 2:return[2,e.sent()];case 3:return e.sent(),[2,void 0];case 4:return[2]}})}).call(this)},xt(t,[{key:"pNt",get:function(){return le()-this.mNt>36e5}},{key:"TNt",get:function(){return(this.wNt||this.pNt)&&this.er(),this.yNt}}]),t}();V(),It(),Wt(),Bt(),Nt(),Yt();var Gq=function(t){function i(i){var n;return(n=t.call(this,"distributionloadstart")||this).distributionId=void 0,n.distributionId=i,n}return Pt(i,t),i}(ah),Qq=function(t){function i(i){var n;return(n=t.call(this,"distributionoffline")||this).distributionId=void 0,n.distributionId=i,n}return Pt(i,t),i}(ah),Yq=function(t){function i(i){var n;return(n=t.call(this,"endpointloaded")||this).endpoint=void 0,n.endpoint=i,n}return Pt(i,t),i}(ah),$q=function(t){function i(i){var n;return(n=t.call(this,"intenttofallback")||this).reason=void 0,n.reason=i,n}return Pt(i,t),i}(ah),Kq=function(t){function i(){return t.call(this,"enterbadnetworkmode")||this}return Pt(i,t),i}(ah),Jq=function(t){function i(){return t.call(this,"exitbadnetworkmode")||this}return Pt(i,t),i}(ah),Zq=function(t){function i(i){var n;return(n=t.call(this)||this).oa=void 0,n.hu=void 0,n.oa=i,n}return Pt(i,t),i.prototype.PNt=function(t){return this.oa.PNt(t)},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{addEventListener:function(i,n){t.wn(i,n)},removeEventListener:function(i,n){t.mn(i,n)},get badNetworkMode(){return t.kNt},set badNetworkMode(i){t.kNt=i},get authToken(){return t.ENt},set authToken(i){t.ENt=i},preloadPublications:function(i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.PNt(i)];case 1:return[2,n.sent().map(function(t){return{name:t.name}})]}})})()}}}(this)),this.hu}},{key:"kNt",get:function(){return this.oa.kNt},set:function(t){this.oa.kNt=t}},{key:"ENt",get:function(){return this.oa.ENt},set:function(t){this.oa.ENt=t}}]),i}(uh);var tX=["https://discovery.theo.live/channels/"],iX=8e5,nX=function(t){function i(i,n){var r,e;(r=t.call(this,i,n)||this).DNt=void 0,r.YBt=void 0,r.qNt=void 0,r.GNt=void 0,r.XNt=void 0,r.Ac=void 0,r.fz=void 0,r.zNt=void 0,r.tNt=void 0,r.JNt=void 0,r.jDt=!1,r.Lz=void 0,r.JW=void 0,r.nT=new dr,r.RNt=void 0,r.lBt=!1,r.n7=!1,r.KNt=void 0,r.ZNt=void 0,r.MNt=void 0,r.NNt=void 0,r.$Nt=[],r.FNt=!1,r.HNt=void 0,r.LNt=!0,r.CNt=0,r.ONt=void 0,r.GW=function(t){var i,n,e=t.Ht,s=null==(i=r.tNt)?void 0:i.maxMobileBitrate;void 0!==s&&Vi.Zs.Ks&&e.KI.II.filter(function(t){return t.kW>s}).forEach(function(t){return e.KI._S(t)});e.wn(Mg.TI,r.ih);var u=rX(null!=(n=e.YI)?n:e.KI.II);e.YI=u.length>0?u:rX(e.KI.II)},r.ih=function(t){var i,n=t.kot;(!n||(null!=(i=n.tyt)?i:n.kW)>=iX)&&r.VNt()},r.aNt=function(){r.UNt(),r.$Nt.push(Vi.Mg()),r.$Nt=r.$Nt.filter(function(t){return Vi.Mg()-t<=3e5}),r.$Nt.length>=3&&(r.$Nt=[],r.DNt.So(new $q(new md(gd.THEO_LIVE_UNKNOWN_ERROR,"Unstable playback detected."))),Er(r.BNt()))},r.WNt=function(t){r.jDt&&r.HNt&&("manifest"!==t.type&&"segment"!==t.type||(t.headers.Authorization="Bearer "+r.HNt,t.redirect(t)))},r.DNt=new Zq(r);var s,u,o,h=i.Cd.theoLive;return r.GNt={sessionId:null!=(s=null==h?void 0:h.sessionId)?s:rI(),userId:null!=(u=null==h?void 0:h.userId)?u:Eq(),externalSessionId:null==h?void 0:h.externalSessionId,analyticsEnabled:!1!==(null==h?void 0:h.analyticsEnabled),fallbackEnabled:!1!==(null==h?void 0:h.fallbackEnabled),discoveryUrls:[].concat([null==h?void 0:h.discoveryUrl],null!=(o=null==h?void 0:h.discoveryUrls)?o:[],tX).filter(Fi).map(function(t){return t.lastIndexOf("/")===t.length-1?t:t+"/"})},r.YBt=new Sq(null==(e=r.GNt)?void 0:e.externalSessionId),r.qNt=new qq(i.SP,r.GNt),r.oa.zP.wn("latencyrecoveryseek",r.aNt),r}Pt(i,t);var n=i.prototype;return n.xNt=function(){this.oa.zP.wn("latencyrecoveryseek",this.aNt),this.oa.rt.wn(Ng.eI,this.GW)},n.INt=function(){this.oa.zP.mn("latencyrecoveryseek",this.aNt),this.oa.rt.mn(Ng.eI,this.GW)},n.$x=function(i){var n=this;if(!this.jDt||this.JW||this.Lz)return t.prototype.$x.call(this,i);if(i.type===Mp.TM)return void 0!==this.RNt?(Vi.Lg(this.RNt),this.RNt=void 0,this.lBt||this.So(new qp(this.LP()))):this.So(new qp(this.LP())),this.CNt=0,this.lBt=!0,!0;if(i.type===Mp.SM)return this.RNt||(this.RNt=Vi.Og(function(){n.So(new Hp(n.LP())),n.RNt=void 0},100)),!0;if(i.type===Jy.ma){var r;this.CNt++;var e=(null==(r=this.fz)?void 0:r.src)&&uX(this.fz.src),s=this.CNt>5;return e||s?(this.dispatchErrorEvent(i.errorObject),!0):(this.DNt.So(new $q(i.errorObject)),Er(this.BNt()),!0)}if(i.type===ch.uo){if(this.NNt=Vi.Mg(),void 0===this.MNt&&(this.MNt=Vi.fm(function(){var t;Vi.Mg()-(null!=(t=n.NNt)?t:0)>15e3&&(n.DNt.So(new $q(new md(gd.THEO_LIVE_UNKNOWN_ERROR,"Indefinite stall detected"))),Er(n.BNt()))},1e3)),this.oa.bt&&(this.LNt=!1),this.LNt)return!0}else if(i.type===ch.jw){if(void 0!==this.MNt&&(Vi.vm(this.MNt),this.MNt=void 0),this.oa.bt&&(this.LNt=!0),!this.LNt)return!0}else i.type===ch._y?this.NNt=Vi.Mg():i.type===Mp.bM?this.ONt&&(!function(t,i){var n=Wn(t.rt.II,function(t){return t.o===i.enabledVideoTrackId}),r=Wn(t.rt.II,function(t){return t.Rt});if(n){var e;r&&r.o===n.o||(n.Rt=!0),n.YI=null==(e=i.targetVideoQualities)?void 0:e.map(function(t){return Wn(n.KI.II,function(i){return i.o===t})}).filter(Fi)}else r&&(r.Rt=!1);var s=Wn(t.ht.II,function(t){return t.o===i.enabledAudioTrackId}),u=Wn(t.ht.II,function(t){return t.Rt});s?u&&u.o===s.o||(s.Rt=!0):u&&(u.Rt=!1);for(var o,h=Ft(t.nt.II);!(o=h()).done;){var a,c=o.value,f=null!=(a=i.textTrackModes.get(c.o))?a:$y.Nh;c.Xk!==f&&(c.Xk=f)}}(this.oa,this.ONt),this.ONt=void 0):i.type===ch.ey&&(this.DNt.So(new $q(new md(gd.THEO_LIVE_UNKNOWN_ERROR,"manifest not found"))),Er(this.BNt()));return t.prototype.$x.call(this,i)},n.int=function(){return this.DNt.Ca},n.HP=function(){return this.jDt?this.Lz:t.prototype.HP.call(this)},n.qP=function(){return this.jDt?this.JW:t.prototype.qP.call(this)},n.UNt=function(){if(!this.FNt&&(this.FNt=!0,this.DNt.So(new Kq),0!==this.oa.rt.V)){var t,i=this.rt.CI(0),n=sr(i.KI.II,function(t){return t.kW});(null!=(t=n.tyt)?t:n.kW)0?n:rX(i.KI.II)}},n.PNt=function(t){var i=this;return ot.all(t.map(function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,kr(this.qNt.Bgt(t).TNt,this.nT.Yg)];case 1:return[2,i.sent()]}})}).call(i)}))},n.nu=function(){var i;return null!=(i=this.Ac)?i:t.prototype.nu.call(this)},n.Ta=function(i,n){var r=this,e=function(){return t.prototype.Ta};return jt(function(){var t,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:this.jDt=!1,s=Ft(null!=(t=null==i?void 0:i.sources)?t:[]),f.label=1;case 1:return(u=s()).done?[3,8]:wT(o=u.value)&&o.type===pA.pR&&o.src?(this.jDt=!0,this.Ac=i,this.fz=o,this.DNt.So(new Gq(o.src)),this.xNt(),uX(o.src)?(h=io({},i,{sources:[io({},o,{type:pA._R,useManagedMediaSource:!0})]}),[4,e().call(r,h,n)]):[3,3]):[3,7];case 2:return f.sent(),[2];case 3:this.zNt=this.qNt.Bgt(o.src),f.label=4;case 4:return f.trys.push([4,6,,7]),[4,this.zNt.TNt];case 5:return a=f.sent(),this.tNt=a,this.GNt.analyticsEnabled&&(this.XNt=new Fq(this,a,this.YBt)),[2];case 6:throw pr(c=f.sent()),this.jNt(),c;case 7:return[3,1];case 8:return[4,e().call(r,i,n)];case 9:return[2,f.sent()]}})}).call(this)},n.ox=function(){return this.jDt?this.LNt:t.prototype.ox.call(this)},n.Gx=function(){this.n7||(this.n7=!0,this.QNt(!1)),this.LNt=!1,t.prototype.Gx.call(this)},n.zx=function(){this.LNt=!0,t.prototype.zx.call(this)},n.BNt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return null!=this.ONt||(this.ONt=function(t){var i,n,r=Wn(t.rt.II,function(t){return t.Rt}),e=null==r?void 0:r.o,s=null==r||null==(i=r.YI)?void 0:i.map(function(t){return t.o}),u=null==(n=Wn(t.ht.II,function(t){return t.Rt}))?void 0:n.o,o=ro();return t.nt.II.forEach(function(t){return o.set(t.o,t.Xk)}),{enabledVideoTrackId:e,targetVideoQualities:s,enabledAudioTrackId:u,textTrackModes:o}}(this.oa)),[4,this.oa.Xx().catch(yn)];case 1:return t.sent(),this.QNt(!0),[2]}})}).call(this)},n.QNt=function(t){var i=this;if(this.zNt&&!this.KNt){this.jNt();var n=function(){i.KNt=void 0};this.KNt=this.YNt(this.zNt,t).then(n).catch(n)}},n.YNt=function(t,i){return jt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return n=this,i&&t.er(),[4,t.TNt];case 1:return r=o.sent(),this.tNt=r,[4,this.selectEndpoint(r,this.JNt)];case 2:if(e=o.sent(),this.JNt=e,!e)return[3,7];s=this.convertEndpointToSource(r,e),o.label=3;case 3:return o.trys.push([3,5,,6]),[4,this.oa.Ta(s,(new dr).Yg)];case 4:return o.sent(),[3,6];case 5:return u=o.sent(),this.dispatchErrorEvent(u),this.jNt(),[2];case 6:return this.DNt.So(new Yq(e)),this.LNt||this.oa.Gx(),[3,8];case 7:this.DNt.So(new Qq(r.id)),this.ZNt=Vi.Og(function(){return n.QNt(!0)},15e3),o.label=8;case 8:return[2]}})}).call(this)},n.convertEndpointToSource=function(t,i){var n,r,e={sources:[this.getHespSource(t,i),this.getHlsSource(i)].filter(Fi),ads:this.lBt?[]:null==(n=this.Ac)?void 0:n.ads,blockContentIfAdError:null==(r=this.Ac)?void 0:r.blockContentIfAdError,streamType:"live"};if(i.adSrc||i.daiAssetKey){var s,u=null!=(s=e.ads)?s:[],o=u.filter(function(t){return"theoads"===t.integration});o.length>0?o.forEach(function(t){var n,r,e=t;e.sseEndpoint=null!=(n=i.adSrc)?n:e.sseEndpoint,e.daiAssetKey=null!=(r=i.daiAssetKey)?r:e.daiAssetKey}):u.push({integration:"theoads",sseEndpoint:i.adSrc,daiAssetKey:i.daiAssetKey}),e.ads=u}var h=pE(e);return h.sources[0].bypassLicense=!0,h},n.getHespSource=function(t,i){var n,r;if(i.hespSrc)return{type:"application/vnd.theo.hesp+json",src:i.hespSrc,contentProtection:i.contentProtection?Rq(i.contentProtection):void 0,useManagedMediaSource:!0,latencyConfiguration:null!=(r=null==(n=this.fz)?void 0:n.latencyConfiguration)?r:eX(t.targetLatency),hesp:{maxMobileBitrate:t.maxMobileBitrate}}},n.getHlsSource=function(t){if(t.hlsSrc)return{type:"application/x-mpegurl",src:t.hlsSrc,contentProtection:t.contentProtection?Rq(t.contentProtection):void 0}},n.dispatchErrorEvent=function(t){var i=j(t,md)?t:new md(gd.THEO_LIVE_UNKNOWN_ERROR,t.message,t);this.Lz=ww(i),this.JW=i,this.jNt(),this.So(new Ib(i))},n.jNt=function(){void 0!==this.RNt&&(Vi.Lg(this.RNt),this.RNt=void 0),void 0!==this.ZNt&&(Vi.Lg(this.ZNt),this.ZNt=void 0),void 0!==this.MNt&&(Vi.vm(this.MNt),this.MNt=void 0)},n.Xx=function(){var i;return this.nT.Zg(),this.nT=new dr,this.INt(),this.jNt(),this.NNt=void 0,this.jDt=!1,this.n7=!1,this.lBt=!1,null==(i=this.XNt)||i.destroy(),this.XNt=void 0,this.Ac=void 0,this.fz=void 0,this.zNt=void 0,this.tNt=void 0,this.JNt=void 0,this.JW=void 0,this.Lz=void 0,this.CNt=0,this.$Nt=[],this.LNt=!0,this.ONt=void 0,this.FNt&&this.VNt(),t.prototype.Xx.call(this)},n.kn=function(i){var n=this;return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return this.nT.Zg(),this.oa.oX.wY(this.WNt),void 0!==this.RNt&&(Vi.Lg(this.RNt),this.RNt=void 0),this.Vo(),this.INt(),null==(r=this.XNt)||r.destroy(),this.oa.zP.mn("latencyrecoveryseek",this.aNt),[4,t.prototype.kn.call(n,i)];case 1:return e.sent(),[2]}})}).call(this)},n.selectEndpoint=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f,v;return zt(this,function(d){switch(d.label){case 0:r=function(){var t,i,r,u;return zt(this,function(o){switch(o.label){case 0:t=a.value,i=s.filter(function(i){return i.priority===t}),o.label=1;case 1:return i.length>0?(r=function(t){var i=t.reduce(function(t,i){return t+i.weight},0);if(0===i){return t[A.floor(A.random()*t.length)]}for(var n,r=A.random()*i,e=0,s=Ft(t);!(n=s()).done;){var u=n.value;if(r<=(e+=u.weight))return u}return t[t.length-1]}(i),[4,sX(r,n.oa.SP)]):[3,3];case 2:return"online"===(u=o.sent())?[2,{v:r}]:("invalid-security"===u&&(e=!0),Yn(i,r),[3,1]);case 3:return[2]}})},e=!1,Yn(s=t.endpoints.slice(),i),u=or(s.map(function(t){return t.priority})),o=u.sort(),h=Ft(o),d.label=1;case 1:return(a=h()).done?[3,4]:(n=this,[5,qt(r())]);case 2:if("object"===W(c=d.sent()))return[2,c.v];d.label=3;case 3:return[3,1];case 4:return i?[4,sX(i,this.oa.SP)]:[3,6];case 5:if("online"===(f=d.sent()))return[2,i];"invalid-security"===f&&(e=!0),d.label=6;case 6:if(e)throw v=new md(gd.MEDIA_LOAD_ERROR,"Trying to play a token protected stream without the correct token configured."),this.dispatchErrorEvent(v),v;return[2,void 0]}})}).call(this)},xt(i,[{key:"kNt",get:function(){return this.FNt},set:function(t){this.jDt&&(t?this.UNt():this.VNt())}},{key:"ENt",get:function(){return this.HNt},set:function(t){this.HNt=t,this.oa.oX.wY(this.WNt),this.HNt&&this.oa.oX.gY(this.WNt)}}]),i}(Gb);function rX(t){return t.filter(function(t){var i;return(null!=(i=t.tyt)?i:t.kW)>=iX})}function eX(t){return void 0===t?io({},az(),{forceSeekOffset:20}):{minimumOffset:t-VA,targetOffset:t,maximumOffset:t+VA,forceSeekOffset:20,minimumPlaybackRate:FA,maximumPlaybackRate:UA}}function sX(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n=t.hespSrc||t.hlsSrc,[4,i.lk({Yu:n,Km:bl.wk,Vk:3e3})];case 1:return(r=s.sent()).hk>=200&&r.hk<300?[2,"online"]:[3,3];case 2:return j(e=s.sent(),Fl)&&403===e.oE.hk?[2,"invalid-security"]:[3,3];case 3:return[2,"offline"]}})})()}function uX(t){try{return qo(Vi.Dh(t).pathname,"manifest.json")}catch(t){return!1}}Zb(function(t){return new nX(t)},Kb.pR),V(),It(),V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Bt(),Nt(),Ut(),Yt();var oX=U(ai());V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt();var hX=function(t){function i(i,n){var r;return(r=t.call(this)||this).gO=Pw(),r.ob=void 0,r.tMt=void 0,r.hu=void 0,r.ob=i,r.tMt=n,r}Pt(i,t);var n=i.prototype;return n.er=function(t,i){this.ob=t,this.tMt=i,this.hu&&this.So(new oV(this.hu))},n.jU=function(){throw new p("Method not implemented.")},n.QU=function(){throw new p("Method not implemented.")},n.kn=function(){this.Vo()},xt(i,[{key:"tB",get:function(){return this.tMt}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()}},{key:"o",get:function(){return this.ob.id}},{key:"jI",get:function(){return this.gO}},{key:"kW",get:function(){return this.ob.bitrate}},{key:"tyt",get:function(){}},{key:"frt",get:function(){return""}},{key:"Th",get:function(){return""}},{key:"nyt",get:function(){return""}},{key:"cst",get:function(){return!0}},{key:"iyt",get:function(){}}]),i}(uh),aX=function(t){function i(i,n){return t.call(this,i,n)||this}return Pt(i,t),i.prototype.xa=function(){return sV(this)},xt(i,[{key:"plt",get:function(){return 0}},{key:"Ti",get:function(){return this.ob.width}},{key:"Mi",get:function(){return this.ob.height}},{key:"eyt",get:function(){return 0}}]),i}(hX);V(),It(),Bt(),Nt(),Ut();var cX=function(t){function i(i,n){var r;return(r=t.call(this)||this).gO=Iw(),r.dO=new kw,r.iMt=void 0,r.hS=void 0,r.b5=void 0,r.hu=void 0,r.hS=i,r.b5=n,r}Pt(i,t);var n=i.prototype;return n.wO=function(t){this.Rt=t},n.kn=function(){this.Vo();for(var t,i=Ft(this.dO.II);!(t=i()).done;){t.value.kn()}this.dO.hr()},xt(i,[{key:"Rt",get:function(){return!0},set:function(t){}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=uw(this)}},{key:"Jdt",get:function(){}},{key:"Lt",get:function(){return this.b5}},{key:"o",get:function(){return this.hS||"millitrack"}},{key:"jI",get:function(){return this.gO}},{key:"Th",get:function(){return""}},{key:"bs",get:function(){return""}},{key:"Xk",get:function(){return this.Rt?"enabled":"disabled"},set:function(t){this.wO("enabled"===t)}},{key:"XI",get:function(){}},{key:"KI",get:function(){return this.dO}},{key:"YI",get:function(){return this.iMt},set:function(t){if(this.iMt=t,this.Rt){var i=1===(null==t?void 0:t.length)?t[0].tB:void 0;this.eMt(i)}this.So(new yL(this.dO.II.slice(),this)),((null==t?void 0:t.length)||this.dO.V)&&this.So(new KF((null==t?void 0:t[0])||this.dO.CI(0)))}},{key:"QI",get:function(){}}]),i}(uh),fX=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).sMt=void 0,e.sMt=r,e}Pt(i,t);var n=i.prototype;return n.er=function(t){for(var i,n,r=function(){var r=n.value,e=Wn(t.layers,function(t){return t.encodingId===r.id}),s=Wn(i.dO.II,function(t){return t.o===r.id});s?s.er(r,e):i.dO.lO(new aX(r,e))},e=Ft(t.active);!(n=e()).done;)i=this,r();this.So(new Tw(this))},n.eMt=function(t){var i;null==(i=this.sMt)||i.nMt(t)},n.kn=function(){this.sMt=void 0,t.prototype.kn.call(this)},xt(i,[{key:"Km",get:function(){return cw.Bk}}]),i}(cX);V(),It(),Bt();var vX=function(){function t(){this.rMt=void 0}var i=t.prototype;return i.er=function(t){this.rMt=t},i.PW=function(t){},xt(t,[{key:"kW",get:function(){var t,i,n,r,e,s;return(null!=(e=null==(i=this.rMt)||null==(t=i.video.inbounds)?void 0:t.reduce(function(t,i){return t+i.bitrateBitsPerSecond},0))?e:0)+(null!=(s=null==(r=this.rMt)||null==(n=r.audio.inbounds)?void 0:n.reduce(function(t,i){return t+i.bitrateBitsPerSecond},0))?s:0)}},{key:"EW",get:function(){var t,i;return null!=(i=null==(t=this.rMt)?void 0:t.currentRoundTripTime)?i:0}}]),t}();V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt(),Nt();var dX=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).hMt=0,r}return Pt(i,t),i.prototype.xa=function(){return uV(this)},xt(i,[{key:"$mt",get:function(){return this.hMt}}]),i}(hX),lX=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).sMt=void 0,e.sMt=r,e}Pt(i,t);var n=i.prototype;return n.er=function(t){for(var i,n,r=function(){var r=n.value,e=Wn(t.layers,function(t){return t.encodingId===r.id}),s=Wn(i.dO.II,function(t){return t.o===r.id});s?s.er(r,e):i.dO.lO(new dX(r,e))},e=Ft(t.active);!(n=e()).done;)i=this,r();this.So(new Tw(this))},n.eMt=function(t){var i;null==(i=this.sMt)||i.oMt(t)},n.kn=function(){this.sMt=void 0,t.prototype.kn.call(this)},xt(i,[{key:"Km",get:function(){return cw.Dk}}]),i}(cX);V(),It(),Nt();var gX=function(t){function i(i,n){var r;return(r=t.call(this,i,i,void 0,!1)||this).DU=void 0,r.DU=n,r}return Pt(i,t),i.prototype.xa=function(){return function(t){return jg(Yw(t),{get mid(){return t.DU.mid},get uuid(){return t.DU.uuid},get timecode(){return t.DU.timecode},get unregistered(){return t.DU.unregistered}})}(this)},i}(em);V(),It(),V(),It(),Bt(),Nt();var wX=U(ai()),mX=function(t){function i(i){var n;return(n=t.call(this)||this).hu=void 0,n.aMt=void 0,n.aMt=i,n}Pt(i,t);var n=i.prototype;return n.QL=function(t){return wX.Logger.diagnose(t)},n.wn=function(t,i){this.aMt.wn(t,i)},n.mn=function(t,i){this.aMt.mn(t,i)},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=XT(this)),this.hu}}]),i}(uh),yX=[ch.uo,ch.jw,Mp.TM,ch._y,ch.Qw,ch.Ww,ch.$w,ch.Zw,ch.Bw,ch.Kw,ch.gy,ch.Rw,ch.Jw,ch.Pw,ch.Ew,ch.Lw,ch.Nw],pX=["active","inactive","stopped","vad","layers","migrate","viewercount"],_X=1e3,kX=function(t){function i(i){var n;return(n=t.call(this,"stats")||this).rMt=void 0,n.rMt=i,n}return Pt(i,t),xt(i,[{key:"stats",get:function(){return this.rMt}}]),i}(ah),bX=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).Iz=void 0,e.Rz=void 0,e.Cz=void 0,e.TL=void 0,e.Lf=void 0,e.gMt=void 0,e.Ac=void 0,e.nT=void 0,e.Dpt=void 0,e.lMt=void 0,e.$L=void 0,e.YL=void 0,e.fMt=void 0,e.JW=void 0,e.ZW=void 0,e.cMt=void 0,e.vMt=void 0,e.oq=void 0,e.kq=void 0,e.bq=void 0,e.uMt=void 0,e.SMt=void 0,e.Ts=void 0,e.mmt=void 0,e.Iz=i,e.Rz=n,e.Cz=r,e.nT=new dr,e.Dpt=void 0,e.lMt=void 0,e.$L=new aw,e.YL=new aw,e.vMt=0,e.oq=new vX,e.Ts=function(t){e.qq(yw(t.lt))},e.mmt=function(t){mr(t)||e.qq(new md(gd.MEDIA_DECODE_ERROR,t.message,t))},e.TL=e.Iz.Gq(cw.Bk),e.kq=new Qp(e,e.TL),e.bq=new Gp(e.kq,!0),e.TL.wn(yX,e.Rs),e.TL.wn(Jy.ma,e.Ts),e.bq.wn(Lp,e.Rs),e.uMt=new mX(e),e}Pt(i,t);var n=i.prototype;return n.nMt=function(t){var i;null==(i=this.Lf)||i.select(t).catch(this.mmt)},n.oMt=function(t){var i;null==(i=this.Lf)||i.select(t).catch(this.mmt)},n.Wx=function(){return this.TL.Wx()},n.OP=function(t,i){},n.be=function(){this.TL.be()},n.we=function(){this.TL.we()},n.Gx=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Un(),[4,this.TL.Gx()];case 1:return t.sent(),[2]}})}).call(this)},n.zx=function(){this.TL.zx()},n.hr=function(){return jt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:return this.dMt(),this.Ac=void 0,this.nT.Zg(),null==(t=this.Lf)||t.stop(),this.Lf=void 0,this.Dpt?[4,this.Dpt.catch(yn)]:[3,2];case 1:r.sent(),this.Dpt=void 0,r.label=2;case 2:return this.lMt=void 0,[4,this.TL.hr()];case 3:for(r.sent(),this.fMt=void 0,this.vMt=0,this.TL.Aq(),i=Ft(this.$L.II);!(n=i()).done;)n.value.kn();return this.YL.hr(),this.$L.hr(),[2]}})}).call(this)},n.kn=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.dMt(),this.Vo(),[4,this.hr()];case 1:return t.sent(),this.YL.kn(),this.$L.kn(),this.bq.kn(),this.kq.zg(),this.TL.mn(yX,this.Rs),this.TL.mn(Jy.ma,this.Ts),[4,this.Iz.Pq(this.TL)];case 2:return t.sent(),[2]}})}).call(this)},n.Ta=function(t,i,n){return jt(function(){var i,r,e,s;return zt(this,function(u){return yr(n),this.pEt(),this.dMt(),r=t,this.Ac=r,this.nT=new dr,r.apiUrl&&oX.Director.setEndpoint(r.apiUrl),e=function(){return oX.Director.getSubscriber({streamName:r.src,streamAccountId:r.streamAccountId,subscriberToken:r.subscriberToken})},s=this._Mt(this.Rz.OY.type),this.Lf=new oX.View(void 0,e,void 0,!0),this.gMt=io({},r.connectOptions,{events:pX,abrConfiguration:{strategy:s,metadata:{bitrate:null==(i=this.Rz.OY.metadata)?void 0:i.bitrate}}}),this.pMt(),[2]})}).call(this)},n._Mt=function(t){switch(t){case aR.PERFORMANCE:return"performance";case aR.BANDWIDTH:return"bandwidth";case aR.QUALITY:return"quality";default:return}},n.Px=function(t,i,n,r){return ot.resolve()},n.xx=function(){return ot.resolve()},n.Un=function(){if(void 0===this.Dpt){var t=this.Lf;void 0!==t&&(this.Dpt=this.lE(t,this.gMt,this.nT.Yg).catch(this.mmt))}},n.lE=function(t,i,n){return jt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:yr(n),u.label=1;case 1:return u.trys.push([1,3,,6]),[4,kr(t.connect(i),n)];case 2:return u.sent(),t.webRTCPeer.initStats({autoInitStats:!0,statsIntervalMs:A.min(null!=(e=null==(r=this.Ac)?void 0:r.statsIntervalMs)?e:_X,_X)}),[3,6];case 3:return pr(s=u.sent()),function(t){return Wi(t)&&"FetchError"===t.name}(s)&&400===s.status?(Vi.um("[THEOplayer] Millicast connect error, reconnecting.",s),[4,kr(t.reconnect(),n)]):[3,5];case 4:u.sent(),u.label=5;case 5:return this.qq(new md(gd.NETWORK_ERROR,s.message,s)),[3,6];case 6:return[2]}})}).call(this)},n.mMt=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:yr(i),n.label=1;case 1:return n.trys.push([1,,4,5]),this.TL.x9(),this.lMt=t,[4,this.TL.hr()];case 2:return n.sent(),[4,this.TL.Un({Km:Op.mV,iR:"",GZ:t,qT:pA.gR,aq:[]})];case 3:return n.sent(),[3,5];case 4:return this.TL.I9(),[7];case 5:return[2]}})}).call(this)},n.pMt=function(){var t,i=this,n=this.Lf;n.on("track",function(t){return i.wMt(t)}),n.on("broadcastEvent",function(t){return i.yMt(t)}),n.webRTCPeer.on("stats",function(t){i.cMt=t,i.oq.er(t),i.AMt()}),(null==(t=this.gMt)?void 0:t.metadata)&&n.on("metadata",function(t){return i.bMt(t)})},n.AMt=function(){var t,i,n=this;void 0===this.SMt&&(this.So(new kX(this.cMt)),this.SMt=Vi.fm(function(){n.So(new kX(n.cMt))},null!=(i=null==(t=this.Ac)?void 0:t.statsIntervalMs)?i:_X))},n.dMt=function(){void 0!==this.SMt&&(Vi.vm(this.SMt),this.SMt=void 0)},n.wMt=function(t){var i=this.YL.V>0,n=this.$L.V>0,r=i&&!n,e=t.streams[0];if(r)for(var s,u=Ft(e.getVideoTracks().slice());!(s=u()).done;){var o=s.value;e.removeTrack(o)}e!==this.lMt&&this.mMt(e,this.nT.Yg).catch(this.mmt)},n.yMt=function(t){switch(t.name){case"active":var i,n=function(){var t=r.value;if(t.media!==cw.Bk||s.disableVideo||i.$L.II.some(function(i){return i.o===t.trackId})){if(t.media===cw.Dk&&!s.disableAudio&&!i.YL.II.some(function(i){return i.o===t.trackId})){var n=i.YL.V>0?Gz.qCt:Gz.zCt;i.YL.tt(new lX(t.trackId,n,i))}}else{var e=i.$L.V>0?Qz.qCt:Qz.zCt;i.$L.tt(new fX(t.trackId,e,i))}};this.So(new $j);for(var r,e=t.data,s=this.gMt,u=Ft(e.tracks);!(r=u()).done;)i=this,n();break;case"inactive":this.So(new Kj),this.$L.hr(),this.YL.hr();break;case"stopped":this.So(new Kj);break;case"viewercount":default:break;case"layers":var o=t.data;if(0===this.$L.V){var h=new fX("",Qz.zCt,this);h.er(o.medias[0]),this.$L.tt(h)}else{var a=Wn(this.$L.II,function(t){return t.Lt===Qz.zCt});null==a||a.er(o.medias[0])}}},n.bMt=function(t){var i=this.fMt;void 0===i&&((i=this.TL.tI(ep.VU,void 0,void 0,void 0,void 0,Uw.MILLICAST)).Xk=$y.JI,this.fMt=i);var n=this.MP,r=A.max(0,n-10);this.vMt0)||i.some(function(i){return i.toLowerCase()===t.toLowerCase()})},i.uLt=function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r1?i-1:0),r=1;r1?i-1:0),r=1;r1?i-1:0),r=1;r1?i-1:0),r=1;r0?t.kW:ZW.Mat,n=t.EW>0?t.EW:zW.Mat;this.Fat=new ZW(ZW.cIt,ZW.dIt,1,i),this.LIt=new zW(zW.cIt,zW.dIt,n)}var i=t.prototype;return i.PW=function(t){if("segment"===t.Km||"preload-hint"===t.Km){var i=[new XW(this.LIt)];return"stream"!==t.dk||!function(t){return"segment"===t.Km&&"initialization-segment"!==t.Wk}(t)&&"preload-hint"!==t.Km?i.push(new GW(this.Fat)):i.push(new QW(this.Fat,1e3)),new qW(i)}},i.RIt=function(t){this.Fat=new ZW(ZW.cIt,ZW.dIt,1,t)},xt(t,[{key:"kW",get:function(){return this.Fat.yet}},{key:"EW",get:function(){return this.LIt.yet}}]),t}();V(),It();var zX=function(){function t(t){this.ost=void 0,this.ost=t}return t.prototype.QZ=function(t,i){var n={Km:Op.wV,aq:[],L4:t.map(function(t){return{qT:t}}),X4:i};return ot.resolve(void 0!==this.ost.QZ([n]))},t}();V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It(),Ut();var qX=function(t,i,n,r,e){return t.filter(function(t){return!!Jn(r,t)||1.1*t.kW<=n.kW})},XX=function(t,i,n,r,e){return t.filter(function(t){if(Jn(r,t))return!0;for(var s,u=1/0,o=Ft(t.lLt);!(s=o()).done;){var h,a,c=s.value;u=A.min(u,null!=(a=null!=(h=c.IMt.fLt)?h:c.IMt.vLt)?a:1/0)}u===1/0&&(u=1);var f=2*n.EW+t.kW*u/n.kW;return t.kW<=i.kW||e._Lt>f})},GX=function(t,i,n,r,e){return An(t,function(t,i){return i.kW-t.kW})},QX=function(t,i,n,r,e){return t.every(function(t){return t.iyt&&!E(t.iyt)})?An(t,function(t,i){return i.iyt-t.iyt}):t},YX=function(t,i,n,r,e){return 0===r.length?t:An(t,function(t,i){var n=Jn(r,t)?1:0;return(Jn(r,i)?1:0)-n})},$X=function(t,i,n,r,e,s){return t.filter(function(t){return!t.frt||!i.frt||!(void 0!==i.frt.bCt&&void 0!==t.frt.bCt&&!hP(i.frt.bCt,t.frt.bCt)&&!s.gLt({qT:'video/mp4; codecs="'+t.frt.bCt+'"'}))&&!(void 0!==i.frt.yCt&&void 0!==t.frt.yCt&&!hP(i.frt.yCt,t.frt.yCt)&&!s.pLt({qT:'audio/mp4; codecs="'+t.frt.yCt+'"'}))})},KX=function(t,i,n,r,e){if(!1===e.Gct)return t;if(Vi.Zs.dp)return t;for(var s,u,o=Vi.Zs.lp,h=(null!=(s=null==o?void 0:o.width)?s:e.Ti)*uL,a=(null!=(u=null==o?void 0:o.height)?u:e.Mi)*uL,c=0;c=r[1]}return!1}function cG(t,i){return t===i||t.zE===i.zE&&(t.LAt&&i.LAt?t.LAt.Tn===i.LAt.Tn&&t.LAt.V===i.LAt.V:t.LAt===i.LAt)}function fG(t){var i=!!t.ILt||void 0;return{o:t.o,RLt:t.RLt,nq:t.nq,CLt:t.CLt,ct:t.ct,DLt:t.DLt,ILt:i,BLt:t.NLt,MLt:t.LLt,OLt:t.OLt,FLt:t.FLt}}function vG(t,i){var n,r,e;return{yCt:null!=(n=i.yCt)?n:null==t?void 0:t.yCt,bCt:null!=(r=i.bCt)?r:null==t?void 0:t.bCt,ULt:null!=(e=i.ULt)?e:null==t?void 0:t.ULt}}function dG(t,i,n,r,e){return jt(function(){var s,u,o,h,a,c,f,v,d,l,g,w;return zt(this,function(m){switch(m.label){case 0:return s=i.filter(function(t){return Wo(t,"audio")}),u=i.filter(function(t){return Wo(t,"video")}),o=[],h=n.map(function(t){return function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return t.nyt&&t.VLt?t.Uk!==uG.ELt?[2]:(r=lG(t.VLt))?r.$m!==Co?[3,1]:[2,{kS:r,BW:[],NW:void 0,HH:t.nyt,MW:[]}]:[2]:[2];case 1:return r.$m!==To||t.VLt!==No?[3,2]:[2,{kS:r,BW:[],NW:t.nyt,HH:void 0,MW:[]}];case 2:return UX.hB("HLSDrmUtils","Fetching key uri "+t.nyt+"."),[4,i.lk({Yu:t.nyt,zk:n})];case 3:return[4,s.sent().HT()];case 4:return e=s.sent(),r.$m===yo&&(e=function(t){var i=new DataView(t);return i.byteLength>=8&&i.getUint32(4)===AU?t:TU(t)}(e)),[2,{kS:r,BW:[e],NW:void 0,HH:void 0,MW:[]}];case 5:return[2]}})})()}(t,r,e)}),[4,ot.all(h)];case 1:for(a=m.sent().filter(Fi),f=function(t,i){if(0===i.length)return t;var n=function(t){var n=i.indexOf(t.kS.$m);return n>=0?n:i.length};return An(t,function(t,i){return n(t)-n(i)})}(a,null!=(c=null==t?void 0:t.preferredKeySystems)?c:[]),v=Ft(f);!(d=v()).done;)l=d.value,g=vH(null!=t?t:{},l.kS),w="cbcs",o.push({kS:l.kS,BW:l.BW,NW:l.NW,HH:l.HH,Mq:[{initDataTypes:[l.kS.Jm],audioCapabilities:dH(s,w,null==g?void 0:g.audioRobustness),videoCapabilities:dH(u,w,null==g?void 0:g.videoRobustness),persistentState:null==g?void 0:g.persistentState,distinctiveIdentifier:null==g?void 0:g.distinctiveIdentifier}],MW:l.MW});return[2,o]}})})()}function lG(t){return t===ko?Bo:t===po?xo:"com.apple.streamingkeydelivery"===t?Mo:t===No?Lo:void 0}function gG(t){if("#"!==t[0])throw new p("HLSPlaylistParser - Could not extract M3U8 tag or comment: "+t);return t.split(":",1)[0]}function wG(t){return"#"!==t[0]?t:t.split(":",1)[0]}function mG(t){var i=t.indexOf(":");if(-1===i||t.lengtho&&UX.cLt(VX,"#EXT-X-STREAM-INF tag must have BANDWIDTH attribute higher or equal to AVERAGE-BANDWIDTH attribute: "+t+"."),e||UX.hB(VX,"#EXT-X-STREAM-INF tag should have a CODECS attribute: "+t+"."),e&&e.bCt&&void 0===s&&UX.hB(VX,"#EXT-X-STREAM-INF tag should have a valid RESOLUTION attribute if it contains video codecs: "+t+"."),void 0===f||Jn(["TYPE-0","TYPE-1","NONE"],f)||UX.cLt(VX,"#EXT-X-STREAM-INF tag has an invalid HDCP-LEVEL attribute: "+t+"."),void 0===g||Jn(["SDR","PQ","HLG"],g)||UX.cLt(VX,"#EXT-X-STREAM-INF tag has an invalid VIDEO-RANGE attribute: "+t+"."),void 0===o)throw new p("HLSPlaylistParser - Could not parse #EXT-X-STREAM-INF tag: "+t+".");return{WLt:v,qLt:w,tyt:h,kW:o,zLt:_,frt:e,plt:c,GLt:f,uCt:s,iyt:a,XLt:y,nyt:r,jLt:m,QLt:g}}function bG(t,i){var n=pG(t);if(!n.URI)throw new p("HLSPlaylistParser - Could not parse #EXT-X-I-FRAME-STREAM-INF tag: "+t+".");try{return kG(t,i,n.URI)}catch(i){throw new p("HLSPlaylistParser - Could not parse #EXT-X-I-FRAME-STREAM-INF tag: "+t+".")}}function AG(t){var i=Number(t);return E(i)?void 0:i}function TG(t,i){var n,r,e=pG(t);try{n=function(t){switch(t){case"NONE":return uG.lz;case"AES-128":return uG.kLt;case"SAMPLE-AES":return uG.ELt;case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return t}throw new p("LLHLSPlaylistParser - Could not parse M3U8 key method: "+t+".")}(e.METHOD),r=e.URI?DG(e.URI,i):void 0}catch(i){throw new p("HLSPlaylistParser - Could not parse #EXT-X-KEY tag: "+t+".")}var s,u,o,h,a,c=e.KEYFORMAT,f=e.IV,v=e.KEYFORMATVERSIONS;if(n!==uG.lz){if(o=c||No,"SAMPLE-AES-CENC"===n||"SAMPLE-AES-CTR"===n){if(lG(o)!==Bo)throw new p("HLSPlaylistParser - #EXT-X-KEY tag with METHOD="+n+" is only compatible with Widevine.");s=uG.ELt}else s=n;u=r,h=f?Na(f):void 0,a=v?v.split("/").map(function(t){return Number(t)}):[1]}else s=uG.lz,(r||c||v||f)&&UX.cLt(VX,"#EXT-X-KEY tag with METHOD=NONE must not have additional attributes: "+t+".");return{Uk:s,nyt:u,KLt:h,VLt:o,YLt:a}}function SG(t){var i=mG(t);if(!i)return[void 0,""];var n=i.split(","),r=n[0],e=n[1];return[AG(r),e]}function EG(t,i){var n=t.split("@"),r=AG(n[0]),e=n.length>1?AG(n[1]):i;if(void 0===r||void 0===e)throw new p("HLSPlaylistParser - Could not parse #EXT-X-BYTERANGE tag: "+t+".");return{Tn:e,V:r}}function IG(t){if(void 0!==t)return EG(t,void 0)}function RG(t,i){return EG(mG(t),i)}function CG(t,i){var n=pG(t);try{return{zE:DG(n.URI,i),LAt:IG(n.BYTERANGE)}}catch(i){throw new p("HLSPlaylistParser - Could not parse #EXT-X-MAP tag: "+t+".")}}function PG(t){var i=mG(t);if(!i)throw new p("HLSPlaylistParser - Could not parse #EXT-X-PROGRAM-DATE-TIME tag: "+t+".");var n=new Date(i.trim());if(!de(n))throw new p("HLSPlaylistParser - Could not parse #EXT-X-PROGRAM-DATE-TIME tag: "+t+".");return n}function NG(t){var i,n,r,e=pG(t),s=e["START-DATE"],u=e["END-DATE"],o=AG(e["PLANNED-DURATION"]),h=AG(e.DURATION);void 0!==e["SCTE35-CMD"]&&(i=Na(e["SCTE35-CMD"]).buffer),e["SCTE35-IN"]&&(n=Na(e["SCTE35-IN"]).buffer),e["SCTE35-OUT"]&&(r=Na(e["SCTE35-OUT"]).buffer);var a,c,f="YES"===e["END-ON-NEXT"],v=function(t){for(var i,n={},r=Ft(b.keys(t));!(i=r()).done;){var e=i.value,s=t[e];void 0!==s&&zo(e,"X-")&&(n[e]=s)}return n}(e),d=e.ID,l=e.CLASS;if(void 0===s)UX.cLt(VX,"Could not parse #EXT-X-DATERANGE tag without START-DATE attribute: "+s+".");else if(a=new Date(s),c=void 0!==u?new Date(u):void 0,de(a)||UX.cLt(VX,"Could not parse EXT-X-DATERANGE tag with invalid START-DATE attribute: "+a+"."),void 0!==h){var g=new Date(a.getTime()+1e3*h);c?c.getTime()!==g.getTime()&&(UX.cLt(VX,"DURATION and END-DATE attributes of #EXT-X-DATERANGE tag are not aligned, updating the END-DATE: "+t+"."),c=g):c=g}else c&&(h=(a.getTime()-c.getTime())/1e3);if(f&&(e.CLASS||UX.cLt(VX,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute without CLASS attribute: "+t+"."),e.DURATION&&UX.cLt(VX,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute with DURATION attribute: "+t+"."),c&&UX.cLt(VX,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute with END-DATE attribute: "+t+".")),void 0===d&&UX.cLt(VX,"Could not parse #EXT-X-DATERANGE tag without valid ID attribute: "+t+"."),void 0===d||void 0===a)throw new p("HLSPlaylistParser - Could not parse #EXT-X-DATERANGE tag: "+t+".");return{o:d,RLt:l,nq:a,CLt:c,ct:h,DLt:o,LLt:i,FLt:n,OLt:r,ILt:f,NLt:v}}function DG(t,i){if(void 0===t)throw new p("HLSPlaylistParser - Unable to parse URL from string: "+t+".");return Vi.xm(t,i)}function xG(t,i){var n=pG(t),r=AG(n.DURATION),e=DG(n.URI,i),s=IG(n.BYTERANGE),u="YES"===n.INDEPENDENT,o="YES"===n.GAP;if(void 0===r)throw new p("HLSPlaylistParser - Unable to parse #EXT-X-PART without valid DURATION: "+t);return{ct:r,nyt:{zE:e,LAt:s},JLt:u,ZLt:o}}function BG(t){var i=pG(t);return{$Lt:"YES"===i["CAN-BLOCK-RELOAD"],tOt:AG(i["CAN-SKIP-UNTIL"]),iOt:"YES"===i["CAN-SKIP-DATERANGES"],eOt:AG(i["HOLD-BACK"]),sOt:AG(i["PART-HOLD-BACK"])}}function OG(t,i){var n=pG(t);if(void 0===n.URI)throw new p("HLSPlaylistParser - Could not parse #EXT-X-RENDITION-REPORT: "+t+".");var r=DG(n.URI,i),e=AG(n["LAST-MSN"]),s=AG(n["LAST-PART"]);if(void 0===e)throw new p("HLSPlaylistParser - Could not parse #EXT-X-RENDITION-REPORT: "+t+".");return{nyt:r,nOt:e,rOt:s}}function MG(t,i){var n,r=pG(t),e=AG(r["SKIPPED-SEGMENTS"]),s=null==(n=r["RECENTLY-REMOVED-DATERANGES"])?void 0:n.split("\t");if(void 0===e)throw new p("HLSPlaylistParser - Could not parse #EXT-X-SKIP tag without valid SKIPPED-SEGMENTS attribute: "+t+".");return{hOt:e,oOt:s,aOt:i}}function LG(t){var i=AG(pG(t)["PART-TARGET"]);if(void 0===i)throw new p("HLSPlaylistParser - Could not parse #EXT-X-PART-TARGET-DURATION tag: "+t+".");return i}function FG(t){switch(mG(t)){case"VOD":return oG.PLt;case"EVENT":return oG.xLt;default:return UX.cLt(VX,"Found #EXT-X-PLAYLIST-TYPE tag with invalid value: "+t+"."),oG.pk}}function UG(t,i){var n,r,e=pG(t);try{n=function(t){if(void 0===t)throw new p("HLSPlaylistParser - Could not parse PRELOAD-HINT type: "+t+".");if("MAP"===t)return sG.SLt;if("PART"===t)return sG.TLt;throw new p("HLSPlaylistParser - Could not parse PRELOAD-HINT type: "+t+".")}(e.TYPE),r=DG(e.URI,i)}catch(i){throw new p("HLSPlaylistParser - Could not parse #EXT-X-PRELOAD-HINT tag: "+t+".")}var s,u=AG(e["BYTERANGE-START"]),o=AG(e["BYTERANGE-LENGTH"]);return void 0===u&&void 0===o||(s={Tn:u||0,V:o}),{Km:n,nyt:{zE:r,LAt:s}}}V(),It(),Ut(),V(),It(),Wt(),Ut(),Yt(),V(),It();var VG=function(){function t(i){this.dOt=0,this.cOt=void 0,this.cOt=t.fOt(i)}var i=t.prototype;return i.uOt=function(){var t=this.cOt[this.dOt];return this.dOt+=1,t},i.lOt=function(){return this.cOt[this.dOt]},i.Ly=function(){var i=new t("");return i.dOt=0,i.cOt=this.cOt.slice(this.dOt),i},t.fOt=function(t){return t?t.split(/[\r\n]+/).map(function(t){return t.trim()}).filter(function(t){return t}):[]},t}();function jG(t,i,n){var r=t.nyt,e=t.bD,s=t.vOt,u=t.Tn;switch(n){case"#EXT-X-VERSION":e=function(t){var i=yG(t);return E(i)?(UX.cLt(VX,"Playlist version is NaN: "+t+"."),1):i}(i);break;case"#EXT-X-INDEPENDENT-SEGMENTS":s=!0;break;case"#EXT-X-START":u=function(t){var i=pG(t),n=AG(i["TIME-OFFSET"]);if(void 0===n)throw new p("HLSPlaylistParser - #EXT-X-START is missing a TIME-OFFSET: "+t+".");return{_Ot:n,gOt:"YES"===i.PRECISE}}(i);break;case"#EXT-X-DEFINE":UX.cLt(VX,"Ignoring unsupported #EXT-X-DEFINE: "+i+".");break;default:UX.hB(VX,"Ignoring unrecognized line or comment: "+i+".")}return{nyt:r,bD:e,vOt:s,Tn:u}}function HG(t,i){return t.map(function(t){return t.Uk===uG.lz||t.KLt?t:io({},t,{KLt:WG(i)})})}function WG(t){var i=new DataView(new ArrayBuffer(16)),n=new Pa;return n.Ny(8),ta(i,n,fe.fromNumber(t)),new I(i.buffer)}function zG(t,i,n){UX.hB(VX,"Parsing M3U8 playlist at "+t+".");var r=new VG(n);if("#EXTM3U"!==r.uOt())throw new p("HLSPlaylistParser - Could not parse M3U8 playlist. Playlist does not start with #EXTM3U.");return function(t){return/^#EXT-X-(MEDIA|STREAM-INF|I-FRAME-STREAM-INF|SESSION-DATA|SESSION-KEY):/m.test(t)}(n)?function(t,i){var n;try{n=Vi.xm(t)}catch(i){throw UX.cLt(VX,"The master playlist has no valid base URI: "+t+"."),new p("HLSPlaylistParser - Could not parse HLS master playlist: "+t)}for(var r={nyt:n,vOt:void 0,Tn:void 0,bD:void 0},e=[],s=[],u=[],o=[];;){var h=i.uOt();if(!h)break;try{var a=gG(h);switch(a){case"#EXT-X-MEDIA":var c=_G(h,n);e.push(c);break;case"#EXT-X-STREAM-INF":var f=kG(h,n,i.uOt());s.push(f);break;case"#EXT-X-I-FRAME-STREAM-INF":var v=bG(h,n);u.push(v);break;case"#EXT-X-SESSION-DATA":UX.cLt(VX,"Ignoring unsupported #EXT-X-SESSION-DATA: "+h+".");break;case"#EXT-X-SESSION-KEY":var d=TG(h,n);o.push(d);break;default:r=jG(r,h,a)}}catch(t){UX.cLt(VX,"Ignoring unparsable line: "+h,t)}}var l,g=r.bD,w=null!=(l=r.vOt)&&l,m=r.Tn;return void 0===g&&(UX.cLt(VX,"The playlist has no #EXT-X-VERSION, assuming version is 2."),g=2),g>=8&&(s.some(function(t){return void 0!==t.iyt})||u.some(function(t){return void 0!==t.iyt}))&&(s.some(function(t){return void 0===t.iyt})||u.some(function(t){return void 0===t.iyt}))&&UX.cLt(VX,"If one master playlist variant stream has a SCORE, all variants should have it."),{nyt:n,bD:g,vOt:w,Tn:m,pOt:u,MW:o,KD:e,mOt:s}}(t,r):function(t,i,n){var r,e,s,u,o,h,a,c,f,v,d,l,g,w,m,y,_,k,b={nyt:t,vOt:void 0,Tn:void 0,bD:void 0},A=[],T=!1,S=!1,E=[],I=ro(),R=[],C=[],P=!1,N=!1,D=[],x=[],B=0,O=!1,M=oG.pk,L=!1,F=0;try{k=Vi.xm(t)}catch(i){throw UX.cLt(VX,"The media playlist has no valid base URI: "+t+".",i),new p("HLSPlaylistParser - Could not parse HLS media playlist.")}for(var U=n.Ly();void 0===m||void 0===y;){var V=U.uOt();if(!V)break;try{switch(wG(V)){case"#EXT-X-MEDIA-SEQUENCE":m=yG(V);break;case"#EXT-X-DISCONTINUITY-SEQUENCE":y=yG(V)}}catch(t){UX.cLt(VX,"Ignoring unparsable line: "+V,t)}}void 0===m&&(UX.hB(VX,"#EXT-X-MEDIA-SEQUENCE tag is missing, assuming first segment media sequence number is 0."),m=0),void 0===y&&(UX.hB(VX,"#EXT-X-DISCONTINUITY-SEQUENCE tag is missing, assuming first segment discontinuity sequence number is 0."),y=0);for(var j=m,H=y;;){var W=n.uOt();if(!W)break;var z=!1;try{var q=wG(W);switch(q){case"#EXTINF":var X;z=!0,o=(X=SG(W))[0],h=X[1];break;case"#EXT-X-BYTERANGE":z=!0,(a=RG(W,B))&&(B=a.Tn+a.V);break;case"#EXT-X-DISCONTINUITY":z=!0,P=!0,H++;break;case"#EXT-X-KEY":var G;z=!0;var Q,Y=TG(W,k);if(Y.Uk===uG.lz){I.clear(),g=void 0;break}var $=null!=(Q=null==(G=Y.VLt)?void 0:G.toString())?Q:"identity";I.set($,Y),Y.Uk===uG.kLt&&(g=Y);break;case"#EXT-X-MAP":z=!0,f=CG(W,k),v=g;break;case"#EXT-X-PROGRAM-DATE-TIME":z=!0,d=PG(W);break;case"#EXT-X-GAP":z=!0,N=!0;break;case"#EXT-X-BITRATE":z=!0,l=yG(W);break;case"#EXT-X-TARGETDURATION":r=yG(W);break;case"#EXT-X-DATERANGE":var K=NG(W);A.push(K);break;case"#EXT-X-PART":z=!0;var J=xG(W,k);C.push(J);break;case"#EXT-X-PRELOAD-HINT":var Z=UG(W,k);D.push(Z);break;case"#EXT-X-SKIP":E.length>0&&UX.cLt(VX,"#EXT-X-SKIP must appear before any #EXTINF tags."),z=!0;var tt=MG(W,j);F=tt.hOt,_=tt.oOt,j+=tt.hOt;break;case"#EXT-X-SERVER-CONTROL":var it=BG(W);T=it.$Lt,e=it.tOt,S=it.iOt,s=it.eOt,u=it.sOt;break;case"#EXT-X-RENDITION-REPORT":var nt=OG(W,k);x.push(nt);break;case"#EXT-X-PART-INF":w=LG(W);break;case"#EXT-X-MEDIA-SEQUENCE":z&&UX.cLt(VX,"#EXT-X-MEDIA-SEQUENCE must appear before any media segment tags.");break;case"#EXT-X-DISCONTINUITY-SEQUENCE":z&&UX.cLt(VX,"#EXT-X-DISCONTINUITY-SEQUENCE must appear before any media segment tags.");break;case"#EXT-X-ENDLIST":O=!0;break;case"#EXT-X-PLAYLIST-TYPE":M=FG(W);break;case"#EXT-X-I-FRAMES-ONLY":L=!0;break;default:if(zo(q,"#"))b=jG(b,W,q);else{c=Vi.xm(W,k);var rt=f?{nyt:f,wOt:v}:void 0,et={MW:HG(uo(I),j),DU:R,yOt:C,ct:o,dq:h,AOt:P,nyt:{LAt:a,zE:c},bOt:rt,SOt:d,ZLt:N,TOt:l,aOt:j,kOt:H};E.push(et),j++,R=[],C=[],o=void 0,h=void 0,P=!1,a=void 0,c=void 0,d=void 0,N=!1,l=void 0}}}catch(t){UX.cLt(VX,"Ignoring unparsable line: "+W,t)}}if(C.length){var st=f?{nyt:f,wOt:g}:void 0,ut={MW:HG(uo(I),j),DU:R,yOt:C,ct:o,dq:h,AOt:P,nyt:void 0,bOt:st,SOt:d,ZLt:N,TOt:l,aOt:j,kOt:H};E.push(ut)}var ot,ht=b.bD,at=null!=(ot=b.vOt)&&ot,ct=b.Tn;void 0===ht&&(UX.cLt(VX,"The media playlist has no #EXT-X-VERSION tag, assuming version is 2."),ht=2),void 0===r&&UX.cLt(VX,"Could not parse the HLS media playlist: no #EXT-X-TARGET-DURATION tag was found.");var ft=E.length,vt=ft>0;vt||UX.cLt(VX,"The HLS media playlist contains no segments.");var dt=vt&&E[ft-1].yOt.length>0;return dt&&void 0===w&&UX.cLt(VX,"Could not parse the HLS media playlist: no #EXT-X-PART-TARGET-DURATION tag was found, but it is required when some or all segments contain parts."),dt&&void 0===u&&UX.cLt(VX,"Could not parse the HLS media playlist: The #EXT-X-SERVER-CONTROL tag has no PART-HOLDBACK attribute, but it is required when some or all segments contain parts."),{$Lt:T,tOt:e,iOt:S,EOt:A,kOt:y,POt:O,vOt:at,eOt:s,xOt:L,aOt:m,hOt:F,sOt:u,fLt:w,IOt:M,ROt:D,oOt:_,COt:x,DOt:r,ect:E,Tn:ct,nyt:k,BOt:i,bD:ht}}(t,i,r)}V(),It(),Bt(),Ut(),V(),It(),Bt(),Ut();var qG=function(){function t(t,i,n){var r,e,s,u;this.o=XG++,this.IMt=void 0,this.kW=void 0,this.iyt=void 0,this.uCt=void 0,this.plt=void 0,this.qLt=void 0,this.jLt=void 0,this.XLt=void 0,this.zLt=void 0,this.tyt=void 0,this.MOt=void 0,this.ZRt=void 0,this.NOt=!1,this.OOt=[],this.IMt=i,this.kW=t.kW,this.tyt=t.tyt,this.iyt=t.iyt,this.MOt=t.frt?GG(t.frt):void 0,this.ZRt=this.MOt,this.uCt=t.uCt,this.plt=t.plt,this.qLt=null!=(r=t.qLt)?r:"GOt"+this.o,this.jLt=null!=(e=t.jLt)?e:"XOt"+this.o,this.XLt=null!=(s=t.XLt)?s:"jOt"+this.o,this.zLt=null!=(u=t.zLt)?u:"QOt"+this.o,this.OOt=n}var i=t.prototype;return i.WOt=function(t){for(var i,n=Ft(this.OOt);!(i=n()).done;){var r=i.value.IMt.WOt(t);if(void 0!==r)return r}},i.qOt=function(t){for(var i,n=Ft(this.OOt);!(i=n()).done;){var r=i.value.IMt.qOt(t);if(void 0!==r)return r}},i.zOt=function(t){Yn(this.OOt,t)},xt(t,[{key:"nyt",get:function(){return this.IMt.nyt}},{key:"frt",get:function(){return this.ZRt},set:function(t){this.ZRt=t?GG(t):void 0,this.NOt=function(t,i){return!(void 0!==(null==t?void 0:t.yCt)&&void 0===(null==i?void 0:i.yCt)||void 0!==(null==t?void 0:t.bCt)&&void 0===(null==i?void 0:i.bCt))}(this.MOt,this.ZRt)}},{key:"LOt",get:function(){return this.NOt}},{key:"lLt",get:function(){return this.OOt}},{key:"FOt",get:function(){return this.OOt.filter(function(t){return t.Km===eG.Dk})}},{key:"UOt",get:function(){return this.OOt.filter(function(t){return t.Km===eG.Bk})}},{key:"VOt",get:function(){return this.OOt.filter(function(t){return t.Km===eG.OU})}},{key:"HOt",get:function(){return this.OOt.filter(function(t){return t.Km===eG.bLt})}}]),t}(),XG=0;function GG(t){return io({},t,{bCt:t.bCt?Zv(t.bCt):void 0})}V(),It(),Bt(),Ut(),V(),It(),Bt(),Ut(),V(),It(),Bt();var QG=function(){function t(t,i,n,r,e,s){this.tFt=void 0,this.eFt=void 0,this.ct=void 0,this.nyt=void 0,this.JLt=void 0,this.ZLt=void 0,this.JOt=void 0,this.$Ot=void 0,this.OO=void 0,this.xet=void 0,this.KOt=void 0,this.tFt=t,this.eFt=i,this.OO=n,this.JOt=r,this.$Ot=e,this.ct=s.ct,this.nyt=s.nyt,this.JLt=s.JLt,this.ZLt=s.ZLt}return t.prototype.iFt=function(t,i,n){this.OO=t,this.JOt=i,this.$Ot=n},xt(t,[{key:"EO",get:function(){var t;return this.OO+(null!=(t=this.KOt)?t:0)}},{key:"YOt",get:function(){return this.JOt}},{key:"ZOt",get:function(){return this.$Ot}},{key:"MW",get:function(){return this.tFt.MW}}]),t}(),YG=function(){function t(t,i,n,r,e){this.WA=void 0,this.SOt=void 0,this.rFt=void 0,this.bOt=void 0,this.ZLt=void 0,this.JOt=void 0,this.$Ot=void 0,this.aOt=void 0,this.AOt=void 0,this.kOt=void 0,this.MW=void 0,this.OO=void 0,this.xet=void 0,this.hFt=[],this.aFt=0,this.sFt=void 0,this.OO=t,this.bOt=e.bOt,this.JOt=n,this.$Ot=r,this.WA=e.ct,this.SOt=e.SOt,this.rFt=e.nyt,this.ZLt=e.ZLt,this.aOt=e.aOt,this.AOt=e.AOt,this.kOt=i,this.MW=e.MW,this.fFt(e.yOt)}var i=t.prototype;return i.uFt=function(t){return this.hFt[t]},i.cFt=function(t){for(var i=0;i=0;i--){var n=this.hFt[i];if(n.EO<=t)return n}},i.lFt=function(t){for(var i=this.dFt(t);i&&!i.JLt&&i.eFt>0;)i=this.uFt(i.eFt-1);return i},i.iFt=function(t,i,n){var r=t.yOt.length!==this.hFt.length||n!==this.$Ot;this.JOt=i,this.$Ot=n,this.WA=t.ct,null!=this.SOt||(this.SOt=t.SOt),void 0===this.rFt&&(this.rFt=t.nyt),r&&this.fFt(t.yOt)},i.fFt=function(t){this.hFt.length>t.length&&(this.hFt.length=t.length);for(var i=0,n=0;n=0;s--)r(s);for(var u,o=Ft(i);!(u=o()).done;){var h=u.value,a=h.nq;if(void 0!==a&&!t.m5(h.o)){var c=n(a),f=new JG(h,c);rQ(t.L.II,f),t.tV(f)}}}function nQ(t){for(var i,n=ro(),r=[],e=Ft(t);!(i=e()).done;){var s=i.value;if(n.has(s.o)){var u=n.get(s.o),o=io({},u,Xg(s),{BLt:io({},u.BLt,s.BLt)});n.set(s.o,o)}else n.set(s.o,s),r.push(s.o)}return r.map(function(t){return n.get(t)})}function rQ(t,i){var n=qn(t,function(t){return t.RLt===i.RLt});n&&n.ILt&&n.er({o:n.o,CLt:i.nq})}var eQ=String.fromCharCode(95),sQ=eQ+"HLS_msn",uQ=eQ+"HLS_part",oQ=eQ+"HLS_skip",hQ="HLSMediaPlaylist",aQ=function(){function t(t,i,n){this.nyt=void 0,this.qFt=void 0,this.GFt=void 0,this.eUt=void 0,this.sUt=void 0,this.CFt=void 0,this.DFt=void 0,this.BFt=void 0,this.NFt=void 0,this.fAt=[],this.XFt=[],this.sFt=void 0,this.MFt=!1,this.LFt=void 0,this.OFt=!1,this.FFt=oG.pk,this.N4=OA.iL(),this.RFt=OA.iL(),this.WA=void 0,this.QFt=-1/0,this.MU=void 0,this.cUt=void 0,this.YFt=void 0,this.nyt=t,this.MU=i,this.cUt=n}var i=t.prototype;return i.hLt=function(t){if(!t)return this.nyt;var i=Vi.Dh(this.nyt);return void 0!==t.aOt&&i.searchParams.append(sQ,String(t.aOt)),void 0!==t.JFt&&i.searchParams.append(uQ,String(t.JFt)),void 0!==t.rD&&i.searchParams.append(oQ,t.rD),i.href},i.mat=function(t){var i=this.ZFt(t);return i<0?void 0:this.fAt[i]},i.ZFt=function(t){var i=this.fAt;if(0===i.length)return-1;var n=t-i[0].aOt;return n<0||n>=i.length?-1:n},i.$Ft=function(t){if(0!==this.fAt.length){var i=mV(cQ.Ng,this.fAt,t);if(!(i<0)){var n=this.fAt[i];return t===n.PO&&i+1=n.EO?n:this.$Ft(t)}},i.WOt=function(t){var i=this.tUt(t);if(void 0!==i)for(var n=i.aOt-this.fAt[0].aOt;n>=0;n--){var r=this.fAt[n];if(void 0!==r.SOt)return new Date(r.SOt.getTime()+1e3*(t-r.EO))}},i.qOt=function(t){for(var i,n,r=Ft(this.fAt);!(n=r()).done;){var e=n.value;if(fQ(e))if(void 0===i)i=e;else{if(!(e.SOt.getTime()<=t.getTime()))break;i=e}}if(void 0!==i)return i.EO+(t.getTime()-i.SOt.getTime())/1e3},i.iUt=function(t){switch(t){case sG.SLt:return this.eUt;case sG.TLt:return this.sUt;default:return}},i.iFt=function(t){var i;void 0===this.CFt&&(this.CFt=null!=(i=t.DOt)?i:this.nUt(t));void 0===this.BFt&&void 0!==t.eOt&&(this.BFt=t.eOt),void 0===this.DFt&&void 0!==t.fLt&&(this.DFt=t.fLt),void 0===this.NFt&&void 0!==t.sOt&&(this.NFt=t.sOt),this.MFt=t.$Lt,this.LFt=t.tOt,this.OFt=t.iOt,this.FFt=t.IOt,this.pAt(t),this.rUt(t);var n=Wn(t.ROt,function(t){return t.Km===sG.SLt}),r=Wn(t.ROt,function(t){return t.Km===sG.TLt});this.eUt=n?{nyt:n.nyt,Km:n.Km,kOt:t.kOt}:void 0,this.sUt=r?{nyt:r.nyt,Km:r.Km,kOt:t.kOt}:void 0,this.qFt=Vi.Mg()/1e3;var e=this.N4.An(this.N4.V-1);this.hUt();var s=this.N4.An(this.N4.V-1);(!this.GFt||s-e>0)&&(this.GFt=this.qFt),null!=this.MU||(this.MU=t.Tn)},i.hUt=function(){this.RFt=this.oUt(),this.N4=this.aUt(this.RFt),this.WA=this.uUt()},i.oUt=function(){var t=this.ect;if(0===t.length)return OA.iL();var i=t[0].EO,n=t[t.length-1].PO;return new OA([i,n])},i.aUt=function(t){if(0===t.V||this.POt)return t;var i=t.Tn(0),n=t.An(0)-this.cSt;return n0&&this.fAt.splice(0,i.fUt);var s=t.hOt;if(s>0){if(s>this.fAt.length)throw new KG("New playlist skips over missing segments.");var u=this.fAt[s-1];if(void 0===u.ct)throw new KG("New playlist skips over an incomplete segment.");n=u.nFt+u.ct,e=u.kOt-t.kOt,r=s;for(var o=0;o0&&void 0===g.bOt)g=io({},g,{bOt:this.fAt[this.fAt.length-1].bOt});var w=new YG(n,d,c,f,g);w.KOt=this.sFt,this.fAt.push(w)}void 0!==v&&(n+=v)}}},i.lUt=function(t){if(0===this.fAt.length)return{fUt:0,vUt:0};var i=this.fAt[0].aOt,n=this.fAt[this.fAt.length-1].aOt,r=t.ect[0].aOt-t.hOt,e=t.ect[t.ect.length-1].aOt,s=0,u=0;if(r0&&(s=c)}}return{fUt:s,vUt:u}},i.rUt=function(t){var i=t.EOt.map(fG);if(t.iOt&&t.BOt.rD===$G.gFt&&(i=this.XFt.concat(i)),this.XFt=nQ(i),t.oOt)for(var n,r,e=function(){var t=r.value,i=Xn(n.XFt,function(i){return i.o===t});i>=0&&$n(n.XFt,i)},s=Ft(t.oOt);!(r=s()).done;)n=this,e()},i._Ut=function(t,i){if(this.sFt!==t){this.sFt=t;for(var n,r=Ft(this.fAt);!(n=r()).done;){n.value.KOt=this.sFt}this.hUt()}this.YFt=i},i.dUt=function(){this.sFt=void 0,this.YFt=void 0},xt(t,[{key:"POt",get:function(){return 0!==this.fAt.length&&this.fAt[this.fAt.length-1].ZOt}},{key:"ct",get:function(){return this.WA}},{key:"Sx",get:function(){return this.N4}},{key:"IFt",get:function(){return this.RFt}},{key:"vLt",get:function(){return this.CFt}},{key:"fLt",get:function(){return this.DFt}},{key:"eOt",get:function(){return this.POt?0:this.BFt?this.BFt:this.CFt?3*this.CFt:void 0}},{key:"sOt",get:function(){var t;return null!=(t=this.NFt)?t:this.DFt?3*this.DFt:void 0}},{key:"$Lt",get:function(){return this.MFt}},{key:"tOt",get:function(){return this.LFt}},{key:"iOt",get:function(){return this.OFt}},{key:"IOt",get:function(){return this.FFt}},{key:"UFt",get:function(){return void 0!==this.fLt}},{key:"VFt",get:function(){if(this.POt)return!0;var t=Vi.Mg()/1e3,i=this.HFt,n=this.WFt;return void 0!==i&&t-it)return ot.reject(new gQ);for(var i,n=[],r=Ft(this.yUt);!(i=r()).done;){var e,s=i.value;if(s0&&this.LUt.every(function(i){return t.IUt.some(function(t){return t.Lot===i})})},i.bUt=function(t){if(this.pUt.has(t))return this.pUt.get(t);var i={bU:void 0,AUt:new Xa,IUt:[]};return this.pUt.set(t,i),i},i.OUt=function(t){var i=this;this.LUt=t,this.pUt.forEach(function(t,n){return i.NUt(t,n)})},i.FUt=function(){this.xUt=-1},i.wUt=function(){return this.xUt},i.zg=function(){this.pUt.forEach(function(t){return t.AUt.Zg()}),this.pUt.clear()},t}();function mQ(t){return void 0!==t.bU}function yQ(t,i){return-function(t,i){if(t.BUt||i.BUt)return function(t,i){var n=t.lF(i);return t.vF()||i.vF()||(n.nF(Pm())?n=n.lF(Cm()):n.aF(Pm().dF())&&(n=n.lO(Cm()))),n}(t.RUt,i.RUt).sF(Sm.wF);return t.RUt.sF(i.RUt)}(t,i)||function(t,i){return t.DUt===i.DUt?Ln.rh:t.DUt?Ln.Fg:Ln.Ug}(t,i)||function(t,i){return t.CUt.sF(i.CUt)}(t,i)}var pQ=function(){function t(t,i){this.WUt=[],this.VUt=[],this.YUt=ro(),this.qUt=new wQ,this.cUt=void 0,this.tVt=void 0,this.tVt=t,this.cUt=i}var i=t.prototype;return i.iFt=function(t,i){if(rG(t))if(0===this.WUt.length)this.zUt(t);else{if(!i)return void UX.cLt("HLSModel","No rendition was provided to update the playlist. Ignoring the update.");i.IMt.iFt(t)}else{if(0!==this.WUt.length)return void UX.cLt("HLSModel","Master playlist can only be applied once. Ignoring the update.");this.GUt(t)}},i.zUt=function(t){var i=this.XUt(t.nyt);i.iFt(t);var n=this.jUt(eG.Dk,i),r=this.jUt(eG.Bk,i),e=new qG({nyt:i.nyt,kW:0,tyt:0,iyt:NaN,frt:void 0,uCt:void 0,plt:0,WLt:[],GLt:void 0,QLt:void 0,qLt:void 0,jLt:void 0,XLt:void 0,zLt:void 0},i,[n,r]);this.WUt.push(e)},i.GUt=function(t){var i,n,r=function(){var n=e.value,r=s.filter(function(t){return function(t,i){return _Q(t.Km,t.BMt,i)&&(!t.MMt||t.IMt.nyt===i.nyt)}(t,n)});i.KUt(n,r);var u=new qG(n,i.XUt(n.nyt,t.Tn),r);i.WUt.push(u)};(n=this.VUt).push.apply(n,[].concat(t.MW));for(var e,s=this.QUt(t),u=Ft(t.mOt);!(e=u()).done;)i=this,r()},i.XUt=function(t,i){var n=this.YUt.get(t);return void 0===n&&(n=new aQ(t,i,this.cUt),this.YUt.set(t,n)),n},i.QUt=function(t){for(var i,n=[],r=Ft(t.KD);!(i=r()).done;){var e=i.value;if(void 0===e.nyt)for(var s,u=Ft(t.mOt);!(s=u()).done;){var o=s.value;if(_Q(e.Km,e.BMt,o)){var h=new SX(e,this.XUt(o.nyt));n.push(h)}}else{var a=new SX(e,this.XUt(e.nyt));n.push(a)}}return n},i.jUt=function(t,i){return new SX({Km:t,nyt:void 0,BMt:"",bs:void 0,HLt:void 0,l:"",RMt:!0,CMt:!1,DMt:!1,LMt:void 0,NMt:void 0,hCt:void 0},i)},i.KUt=function(t,i){var n=i.filter(function(t){return t.Km===eG.Dk}),r=i.filter(function(t){return t.Km===eG.Bk}),e=t.frt&&(t.frt.bCt||t.frt.yCt);if((!e||t.frt.bCt)&&0===r.length){var s=this.jUt(eG.Bk,this.XUt(t.nyt));i.push(s)}if((!e||t.frt.yCt)&&0===n.length){var u=this.jUt(eG.Dk,this.XUt(t.nyt));i.push(u)}t.frt&&t.frt.ULt},i.JUt=function(t){for(var i,n=Ft(this.WUt);!(i=n()).done;)for(var r,e=Ft(i.value.lLt);!(r=e()).done;){var s=r.value;if(s===t)return s}},i.ZUt=function(t){for(var i,n=Ft(this.WUt);!(i=n()).done;){var r=i.value;if(r===t)return r}},i.$Ut=function(t){for(var i,n=Ft(this.WUt);!(i=n()).done;){var r=i.value;if(Jn(r.lLt,t))return r}},i.zg=function(){tr(this.WUt),tr(this.VUt),this.YUt.clear(),this.qUt.zg()},xt(t,[{key:"UUt",get:function(){return this.VUt}},{key:"HUt",get:function(){return this.WUt}},{key:"mM",get:function(){return this.qUt}}]),t}();function _Q(t,i,n){switch(t){case eG.Dk:return n.qLt===i;case eG.Bk:return n.jLt===i;case eG.OU:return n.XLt===i;case eG.bLt:return n.zLt===i}return!1}V(),It(),Nt();var kQ=function(t){function i(i){var n;return(n=t.call(this,SQ.iVt)||this).UMt=void 0,n.UMt=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var bQ=function(t){function i(i){var n;return(n=t.call(this,SQ.eVt)||this).UMt=void 0,n.UMt=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var AQ=function(t){function i(){return t.call(this,ch.ey)||this}return Pt(i,t),i}(ah),TQ="HlsModelUpdater",SQ=function(t){return t.iVt="sVt",t.eVt="nVt",t}({}),EQ=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).nV=void 0,u.eut=void 0,u.FSt=void 0,u.uyt=void 0,u.hVt=void 0,u.aVt=void 0,u.bVt=void 0,u.cVt=void 0,u.AVt=void 0,u.nV=i,u.eut=n,u.FSt=r,u.hVt=!1,u.aVt=!1,u.bVt=void 0,u.cVt=void 0,u.AVt=eo(),u.uyt=new pQ(e,s),u}Pt(i,t);var n=i.prototype;return n.dVt=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:if(!(i=this.uyt.tVt))throw new p("HLSModelUpdater - Could not load HLS playlist: The provided source is empty.");return this.So(new sC),[4,this.lVt(i,{},2,!0,t)];case 1:if(n=e.sent(),!nG(r=n.IMt)&&!rG(r))throw new p("HLSModelUpdater - Could not load HLS playlist: The playlist is invalid.");return nG(r)||UX.hB(TQ,"Detected media playlist only HLS stream."),this.fVt(r),n.vVt?(this.aVt=!0,[4,this._Vt(t)]):[3,3];case 2:e.sent(),e.label=3;case 3:return this.hVt=!0,[2]}})}).call(this)},n.gVt=function(t,i,n,r){return jt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(!(e=this.uyt.JUt(t)))throw new p("HLSModelUpdater - Could not load HLS playlist for rendition: the rendition does not exist on the internal model.");s={aOt:i,JFt:n,rD:PQ(e)},u=we(A.max(1,3*t.IMt.WFt)),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,this.pVt(e,s,r,u)];case 2:return h.sent(),[3,4];case 3:throw pr(o=h.sent()),this.mVt(e),o;case 4:return[2]}})}).call(this)},n.wVt=function(t,i){var n=this.uyt.JUt(t);if(!n)throw new p("HLSModelUpdater - Could not load HLS playlist for rendition: the rendition does not exist on the internal model.");var r={aOt:void 0,JFt:void 0,rD:PQ(n)},e=we(A.max(1,3*t.IMt.WFt));return this.pVt(n,r,i,e)},n.yVt=function(t,i){return this.AVt.has(t.jI)||this.AVt.set(t.jI,new Xa),kr(this.AVt.get(t.jI).Qy,i)},n.mVt=function(t){this.So(new bQ(t))},n.pVt=function(t,i,n,r){return jt(function(){var e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:e=t.IMt.hLt(i),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.lVt(e,i,0,this.aVt,n,r)];case 2:return u=a.sent(),s=u.IMt,[3,4];case 3:throw pr(o=a.sent()),t.IMt.jFt=Vi.Mg(),o;case 4:if(!rG(s))throw new p("HLSModelUpdater - Could not load HLS playlist for rendition: the playlist is not a media playlist.");if(!this.bVt||t===this.bVt||this.bVt.IMt.VFt)return[3,8];a.label=5;case 5:return a.trys.push([5,7,,8]),[4,this.wVt(this.bVt,n)];case 6:return a.sent(),[3,8];case 7:return pr(a.sent()),this.bVt=t,this.SVt(),[3,8];case 8:try{this.fVt(s,t)}catch(e){if(j(e,KG)&&void 0!==i.rD)return h=io({},i,{rD:void 0}),[2,this.pVt(t,h,n,r)];throw e}return this.bVt=t,[2]}})}).call(this)},n.lVt=function(t,i,n,r,e,s){return jt(function(){var u;return zt(this,function(o){switch(o.label){case 0:return UX.hB(TQ,"Loading HLS playlist at "+t+"."),r?[4,this.TVt(t,e)]:[3,2];case 1:if(void 0!==(u=o.sent()))return[2,{IMt:u,vVt:!0}];o.label=2;case 2:return[4,this.kVt(t,i,n,e,s)];case 3:return[2,{IMt:o.sent(),vVt:!1}]}})}).call(this)},n.TVt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.eut.HSt([t])];case 1:return n=r.sent(),yr(i),void 0!==n?[2,zG(n.responseURL,{},n.data)]:[3,3];case 2:return pr(r.sent()),[3,3];case 3:return[2]}})}).call(this)},n.kVt=function(t,i,n,r,e){return jt(function(){var s,u,o;return zt(this,function(h){switch(h.label){case 0:return s=this,u={Yu:t,dk:Hd.NT,zk:this.FSt,Uk:kl.GET,Km:bl.wk,Yg:r,Vk:e},[4,IT(function(){return s.EVt(u)},r,n)];case 1:return[2,zG((o=h.sent()).gk,i,o.ck)]}})}).call(this)},n.EVt=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.nV.lk(t)];case 1:return[4,(i=r.sent()).UT()];case 2:return[2,{ck:r.sent(),gk:i.gk}];case 3:throw mr(n=r.sent())||this.So(new AQ),n;case 4:return[2]}})}).call(this)},n._Vt=function(t){return jt(function(){var i,n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:for(yr(t),i=[],n=Ft(this.uyt.HUt);!(r=n()).done;)for(e=r.value,s=Ft(e.lLt);!(u=s()).done;)o=u.value,i.push(this.PVt(o,t));return[4,ot.all(i)];case 1:return h.sent(),[2]}})}).call(this)},n.PVt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,4,,5]),[4,this.eut.HSt([t.IMt.nyt])];case 1:return n=r.sent(),yr(i),void 0===n||t.IMt.VFt?[3,3]:[4,this.wVt(t,i)];case 2:r.sent(),r.label=3;case 3:return[3,5];case 4:return pr(r.sent()),[3,5];case 5:return[2]}})}).call(this)},n.SVt=function(){for(var t,i=Ft(this.uyt.HUt);!(t=i()).done;)for(var n,r=Ft(t.value.lLt);!(n=r()).done;){var e=n.value;e!==this.bVt&&(void 0!==e.IMt.KOt&&(e.IMt.VFt?this.xVt(e):e.IMt.dUt()))}},n.xVt=function(t){if(0!==t.IMt.ect.length){if(!this.bVt)return this.bVt=t,void this.bVt.IMt._Ut(0,void 0);if(this.IVt(this.bVt),!this.IVt(t)&&void 0===t.IMt.KOt){var i=this.RVt(t,this.bVt);UX.uLt(TQ,"Assuming global timeline offset of "+i+"s for rendition "+t.IMt.nyt+"."),t.IMt._Ut(i,void 0)}}},n.RVt=function(t,i){if(IQ(t)){var n=t.IMt.ect[0],r=i.IMt.ect[0];return UX.uLt(TQ,"Synchronizing by start of VOD: "+r.EO+" vs "+n.EO),r.EO-n.nFt}var e=function(t,i){var n=t.length-1,r=i.length-1;for(;n>=0&&r>=0;){var e=t[n],s=i[r];if(e.kOt>s.kOt)n--;else if(e.kOt=t.IMt.tOt/2))return t.IMt.iOt?$G.gFt:$G._Ft}var NQ=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).Fkt=void 0,r.BVt=void 0,r.NVt=function(t){r.rUt(t.UMt)},r.Fkt=i,r.Fkt.wn(SQ.iVt,r.NVt),r}Pt(i,t);var n=i.prototype;return n.rUt=function(t){if(0!==t.IMt.EOt.length){this.BVt||(this.BVt=this.JU.tI(ep.VU,void 0,void 0,void 0,void 0,Uw.DATE_RANGE),this.tt(this.BVt));iQ(this.BVt,t.IMt.EOt,function(i){var n;return null!=(n=t.IMt.qOt(i))?n:NaN})}},n.ZU=function(t,i,n){var r=bp(t,i,n);return this.BVt===t&&(this.BVt=r),r},i}(kp);V(),It(),Nt();var DQ=function(t){function i(){return t.call(this,TX.TMt)||this}return Pt(i,t),i}(ah);V(),It(),Bt(),Ut(),V(),It(),Wt(),Bt(),Yt(),V(),It(),Bt();var xQ=function(){function t(t){this.Trt=void 0,this.fAt=void 0,this.Y2=void 0,this.dpt=void 0,this.Trt=t,this.fAt=[],this.Y2=void 0,this.dpt=void 0}var i=t.prototype;return i.LVt=function(t){var i;return null==(i=this.OVt(t))?void 0:i.UMt},i.FVt=function(t){this.Y2=t,this.UVt()},i.Odt=function(t,i,n,r,e,s){this.fAt.push({UMt:t,$at:i,VVt:OA.tL(e,s),HVt:OA.tL(n,r)}),this.UVt()},i.OVt=function(t){return Wn(this.fAt,function(i){return i.HVt.Cr(t)})},i.mat=function(t){return Wn(this.fAt,function(i){return i.$at===t})},i.Rct=function(t,i){return Wn(this.fAt,function(n){return n.UMt===t&&lQ(n.$at,i)})},i.C3=function(){var t=this.IP;t.V>0&&(this.dpt=t.An(t.V-1))},i.UVt=function(){var t=this.Trt.IP;this.fAt=this.fAt.filter(function(i){return 0!==t.Mn(i.HVt).V})},xt(t,[{key:"MVt",get:function(){return this.Y2}},{key:"IP",get:function(){return eM(this.Trt.IP,this.Trt.M3)}},{key:"ect",get:function(){return this.fAt}},{key:"_pt",get:function(){return this.dpt}}]),t}();V(),It();var BQ=188,OQ=function(t){return t[t.pk=0]="pk",t[t.fR=1]="fR",t[t.WVt=2]="WVt",t[t.qVt=3]="qVt",t}({});function MQ(t){return LQ(t)?1:function(t){return function(t){if(t.length<376)return-1;for(var i=t.length<564?2:3,n=A.min(1e3,t.length-i*BQ),r=0;r<=n;r++){for(var e=!0,s=0;s=0}(t)?2:function(t){return null!==XN(Aa(t),new Pa)}(t)?3:0}function LQ(t){var i=ka(t,0,A.min(t.length,16384));return Ry.ED(Aa(i))}var FQ=function(){function t(t,i,n,r,e,s,u){var o=this;this.$y=void 0,this.Dot=void 0,this.nHt=void 0,this.Vp=void 0,this.wpt=void 0,this.hBt=void 0,this.vHt=void 0,this.jVt=void 0,this.nT=new dr,this.XVt=OA.iL(),this._Ht=void 0,this.Ugt=void 0,this.eHt=!0,this.KVt=!1,this.rHt=function(t){o.jVt&&(t?fR(t)&&UQ(o)?o.vHt.YY(o.$y.IP.ZM)?o.jVt.Xy():o.jVt.jy(t):mr(t)?o.jVt.Xy():(o.KVt=!0,o.jVt.jy(t)):o.jVt.Xy(),o.jVt=void 0)},this.Vp=t,this.nHt=n,this.$y=i,this.Dot=r,this.vHt=e,this.wpt=s,this.hBt=u}var i=t.prototype;return i.YVt=function(){if(this.$It)throw new p("Cannot perform new operation while BufferAppender is still busy")},i.JVt=function(t){this.$y!==t&&(this.YVt(),this.$y=t,this.Dot=new xQ(t))},i.ZVt=function(){return this.jVt?this.jVt.Qy:ot.resolve()},i.$Vt=function(t){var i=this.Dot._pt;return void 0!==i&&this.tHt(t,i)},i.tHt=function(t,i){var n,r,e=A.min(t,i);return null!=(r=null==(n=this.Dot.IP.CM().UM(this.GVt).JM(e))?void 0:n.Cr(i))&&r},i.iHt=function(t){return this.Dot.LVt(t)},i.Zg=function(){this.nT.Zg(),this.nT=new dr,this.eHt=!0},i.z2=function(t){var i=this;this.YVt(),this.jVt=new Xa;var n=function(n){i.nHt.sHt(t),i.rHt(n)};this.G2(t,this.nT.Yg).then(n,n)},i.G2=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return UX.uLt(HX,"Appending initializer",hG(t.hHt.nyt)),this.Ugt=t,[4,this.$y.z2(t,i)];case 1:return n.sent(),void 0!==this.hBt&&this.Vp===cw.Bk&&LQ(t.ck.ck)&&this.hBt.Jrt(t.ck.ck),UX.uLt(HX,"Appended initializer",hG(t.hHt.nyt)),this.eHt=!1,this.Dot.FVt(t),[2]}})}).call(this)},i.cdt=function(t){var i=this;this.YVt(),this.jVt=new Xa;var n=function(n){i.nHt.sHt(t),i.rHt(n)};this.oHt(t,this.nT.Yg).then(n,n)},i.oHt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:if(void 0===(n=t.UMt).IMt.vLt)throw new p("HlsBufferAppender: Cannot append HLSAsset to "+this.Vp+" buffer for a HLSRendition with an undefined targetDuration.");return this.eHt&&void 0!==this.Ugt?[4,this.G2(this.Ugt,i)]:[3,2];case 1:f.sent(),f.label=2;case 2:return r=this.Dot.IP.kM,e=this.$y.IP,UX.uLt(HX,"Appending",hG(t.hHt.nyt)),[4,this.$y.H2(t,i)];case 3:return f.sent(),void 0!==t.ck&&this.aHt(t.ck,t),UX.uLt(HX,"Appended",hG(t.hHt.nyt),r,this.Dot.IP.kM),s=t.EO,u=s+t.ct,o=t.hHt,h=o.EO,c=o.EO+(null!=(a=o.ct)?a:0),this.Dot.Odt(n,o,s,u,h,c),this.uHt(n,o,s,u,e),t.hHt.ZOt&&this.Dot.C3(),[2]}})}).call(this)},i.uHt=function(t,i,n,r,e){if(this.Km===cw.Bk){var s=this.$y.IP.UM(e),u=this.Dot.Rct(t,i);if(u)if(this.cHt(u))if(0===s.V){if(void 0===this.Dot.mat(i)){var o=this.$y.M3.Mn(new OA([n,r]));this.XVt=this.XVt.OM(o)}}else{var h=s.Tn(0),a=new OA([h,r]);if(this.XVt=this.XVt.UM(a),h>n){var c=this.$y.M3.Mn(new OA([n,h]));this.XVt=this.XVt.OM(c)}}else{var f=s.V>0&&s.Tn(0)n?g:n;if(l>w){var m=this.$y.M3.Mn(new OA([w,s.Tn(0)]));this.XVt=this.XVt.OM(m)}}}},i.cHt=function(t){var i=t.HVt,n=i.Tn(0),r=i.An(i.V-1),e=i.PM(0),s=i.IM(i.V-1);return this.XVt.HM(n,r,e,s)},i.aHt=function(t,i){var n;if(LQ(t.ck)){var r=i.EO,e=r+i.ct,s=i.bU;if(null==(n=this.wpt)||n.Odt(t.ck,r,s),void 0!==this.hBt&&this.Vp===cw.Bk){var u=i.hHt.ZOt;this.hBt.Odt(t.ck,r,e,s,i.UMt,u)}var o=[];void 0!==this.wpt&&o.push(this.wpt),void 0!==this.hBt&&o.push(this.hBt),_p(this.$y.IP,o)}},i.dHt=function(t){this.YVt(),this.jVt=new Xa;try{UX.uLt(HX,"Appending gap from "+t.lHt+" to "+t.fHt,hG(t.$at.nyt)),this.F3(t.lHt,t.fHt)}finally{this.nHt.sHt(t),this.rHt()}},i.F3=function(t,i){this.$y.F3(t,i)},xt(t,[{key:"Km",get:function(){return this.Vp}},{key:"zVt",get:function(){return this.Dot}},{key:"GVt",get:function(){return this.XVt}},{key:"$It",get:function(){return void 0!==this.jVt}},{key:"QVt",get:function(){return this.KVt}}]),t}();function UQ(t){return fw(t.Km)}V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It(),Wt(),Yt();var VQ=function(){function t(t,i,n){this.mHt=void 0,this.nV=void 0,this.FSt=void 0,this.wHt=void 0,this.mHt=t,this.nV=i,this.FSt=n,this.wHt=void 0}var i=t.prototype;return i.gHt=function(t,i,n,r){return jt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,this.pHt(i,r)];case 1:return e=s.sent(),[4,this.mHt.gHt(t,e,n)];case 2:return[2,s.sent()]}})}).call(this)},i.pHt=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return(null==(n=this.wHt)?void 0:n.Yu)===t?[3,3]:(UX.uLt("HLSDecryptor","Fetching new AES-128 decryption key from "+t+"."),[4,this.nV.lk({Yu:t,dk:Hd.CT,Uk:kl.GET,Yg:i,Km:bl.bk,Wk:Al.Ck,zk:this.FSt})]);case 1:return[4,s.sent().HT()];case 2:r=s.sent(),e=new I(r),this.wHt={Yu:t,ck:e},s.label=3;case 3:return[2,this.wHt.ck]}})}).call(this)},t}();V(),It(),Wt(),Yt();var jQ=function(){function t(t,i,n,r,e){void 0===e&&(e=2),this.nV=void 0,this.eut=void 0,this.Tat=void 0,this.FSt=void 0,this.rrt=void 0,this.nV=t,this.eut=i,this.Tat=n,this.FSt=r,this.rrt=e}var i=t.prototype;return i.lk=function(t,i,n,r,e){return jt(function(){var s,u;return zt(this,function(o){switch(o.label){case 0:return[4,this.yHt(t,i,n,Hd.CT,r,e)];case 1:return[4,(s=o.sent()).HT(e)];case 2:return u=o.sent(),[2,{httpStatusCode:s.hk,response:new I(u)}]}})}).call(this)},i.AHt=function(t,i,n,r,e){return jt(function(){return zt(this,function(s){switch(s.label){case 0:return[4,this.yHt(t,i,n,Hd.BT,r,e)];case 1:return[2,s.sent().WT(e)]}})}).call(this)},i.yHt=function(t,i,n,r,e,s){return jt(function(){var u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:u=this,t.LAt&&0===(o=iG(t.LAt.Tn,t.LAt.V))[0]&&o[1]===In&&(o=void 0),h=o?{Range:"bytes="+o[0]+"-"+o[1]}:void 0,a=new El({Yu:t.zE,dk:r,fk:h,zk:this.FSt,Uk:kl.GET,Km:i,Wk:n,qk:this.Tat,jk:r===Hd.BT,Gk:e,Yg:s}),f.label=1;case 1:return f.trys.push([1,3,,4]),[4,this.eut.iut(t.zE,o)];case 2:return c=f.sent(),yr(s),void 0!==c?(null==e||e(c.buffer.byteLength,c.buffer.byteLength),[2,new _l({lk:a,dk:a.dk,ck:c.buffer})]):[3,4];case 3:return pr(f.sent()),[3,4];case 4:return[4,IT(function(){return kr(u.nV.lk(a),a.Yg)},s,this.rrt)];case 5:return[2,f.sent()]}})}).call(this)},t}();V(),It(),Wt(),Yt();var HQ=function(){function t(t,i){this.Fkt=void 0,this.SHt=void 0,this.IHt=void 0,this.DHt=new dr,this.En=-1/0,this.kHt=void 0,this.RHt=!1,this.Fkt=t,this.SHt=i,this.PHt()}var i=t.prototype;return i.bHt=function(){return this.SHt.IMt.$Lt},i.THt=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:if(!this.bHt())throw new p("Could not perform blocking playlist update.");return r=this.kHt,e={aOt:t,JFt:i},void 0!==r&&function(t,i,n){if(t.aOt===i.aOt){if(t.JFt===i.JFt)return!0;if(0===t.JFt&&void 0===i.JFt)return!0}if(t.aOt===i.aOt+1&&0===t.JFt&&void 0!==i.JFt){var r=n.mat(i.aOt);if(r&&r.nyt&&i.JFt>=r.yOt.length)return!0}return!1}(r,e,this.SHt.IMt)?[3,2]:[4,this.EHt()];case 1:s.sent(),this.PHt(e),s.label=2;case 2:return[2,this.Fkt.yVt(this.SHt,n)]}})}).call(this)},i.xHt=function(t){return this.PHt(),this.Fkt.yVt(this.SHt,t)},i.PHt=function(t){var i=this;if(!this.IHt&&!this.RHt){var n=function(){i.IHt=void 0};this.IHt=this.CHt(t,this.DHt.Yg).then(n,n)}},i.EHt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.IHt?(this.DHt.Zg(),this.DHt=new dr,[4,this.IHt.catch(yn)]):[3,2];case 1:t.sent(),this.IHt=void 0,t.label=2;case 2:return[2]}})}).call(this)},i.CHt=function(t,i){return jt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:n=t,u.label=1;case 1:if(yr(i),this.SHt.IMt.POt&&this.SHt.IMt.VFt)return[2];null!=n||(n=this.BHt()),this.kHt=n,u.label=2;case 2:return u.trys.push([2,9,,10]),n?[4,this.Fkt.gVt(this.SHt,n.aOt,n.JFt,i)]:[3,4];case 3:return u.sent(),[3,8];case 4:return r=Vi.Mg()-this.En,e=1e3*this.SHt.IMt.WFt,r=t)return!0;if(e=t},i.LHt=function(t,i){for(var n=[],r=0;r0?(a=Ia(s,0,h),c=Ia(s,h),UX.uLt(zQ,"Of the read "+u+" bytes, the first "+h+" will be stored locally for extraction of "+hG(this.rFt)),this.XHt.FHt(e,a),c.length>0?(UX.uLt(zQ,"Extracting "+c.length+" bytes for extraction of "+hG(this.rFt)),t.enqueue(c),this.qHt(),[2,Er(this.readAndSliceOutAssetBytes(t))]):[3,9]):[3,5];case 5:return e+u<=r?(UX.uLt(zQ,"Extracting the read data range for extraction of "+hG(this.rFt)),t.enqueue(s),this.qHt(),[2,Er(this.readAndSliceOutAssetBytes(t))]):[3,6];case 6:return v=Ia(s,0,f=r-e),d=Ia(s,f),v.length>0&&(UX.uLt(zQ,"Extracting "+v.length+" bytes for extraction of "+hG(this.rFt)),t.enqueue(v)),UX.uLt(zQ,"Of the read "+u+" bytes, the last "+d.length+" will be stored locally for extraction of "+hG(this.rFt)),this.XHt.FHt(e+f,d),UX.uLt(zQ,"Extraction of "+hG(this.rFt)+" completed as the entire request has been fulfilled."),this.QHt(t),this.KHt?(UX.uLt(zQ,"Aborting stream upstream as no more bytes are needed from "+hG(this.rFt)+"."),[4,this.Wd.WHt("AssetExtraction - AbortOnEnd")]):[3,8];case 7:l.sent(),l.label=8;case 8:return[2];case 9:return[3,3];case 10:return[3,12];case 11:return l.sent(),UX.uLt(zQ,"Extraction of "+hG(this.rFt)+" completed as the entire source stream has been read."),this.QHt(t),[3,12];case 12:return[2]}})}).call(this)},i.QHt=function(t){t.close(),this.qHt(),this.YHt.Xy()},i.start=function(t){UX.uLt(zQ,"Preparing to push all collected data to controller for extraction of "+hG(this.rFt)),this.GHt(t),UX.uLt(zQ,"Collected data pushed to controller for extraction of "+hG(this.rFt));var i=YQ(this.rFt.LAt).FAt;this.Wd.UHt>=i?(UX.uLt(zQ,"Extraction of "+hG(this.rFt)+" completed as the entire request has been fulfilled."),this.QHt(t)):(UX.uLt(zQ,"Continuing read from original stream for extraction of "+hG(this.rFt)),Er(this.readAndSliceOutAssetBytes(t)))},i.pull=function(){return this.jHt.Xy(),this.jHt=new Xa,this.zHt.Qy},xt(t,[{key:"JHt",get:function(){return this.YHt.Qy}}]),t}(),QQ=function(){function t(t,i){this.rFt=void 0,this.XHt=void 0,this.ZHt=void 0,this.$Ht=void 0,this.rFt=i;var n=YQ(this.rFt.LAt).OAt;this.ZHt=new XQ(t,n),this.XHt=new qQ}var i=t.prototype;return i.fO=function(t){if(!aG(this.rFt,t))return!1;var i=YQ(t.LAt),n=i.OAt,r=i.FAt;return this.XHt.NHt(this.ZHt.UHt,n,r)},i.ygt=function(t,i){return void 0===i&&(i=!1),jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return n=this.ZHt,r=this.XHt,UX.hB(zQ,"Extracting data from "+hG(t)+" out of "+hG(this.rFt)),this.$Ht?(UX.uLt(zQ,"Awaiting previous extraction before extracting "+hG(t)+" out of "+hG(this.rFt)),[4,this.$Ht]):[3,2];case 1:s.sent(),s.label=2;case 2:if(!this.fO(t))throw new p("The extractor does not contain the data requested");return e=new GQ(t,n,r,i),this.$Ht=e.JHt,[2,new $d(e)]}})}).call(this)},t}();function YQ(t){if(t){var i=t.Tn;return{OAt:i,FAt:void 0!==t.V?i+t.V:In}}return{OAt:0,FAt:In}}var $Q=function(){function t(t,i){this.rFt=void 0,this.tWt=void 0,this.nT=void 0,this.Dpt=void 0,this.rFt=t,this.tWt=i,this.nT=new dr,this.Dpt=this.Un()}var i=t.prototype;return i.Un=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return[4,this.tWt.AHt(this.rFt,bl.Ak,Al.pk,void 0,this.nT.Yg)];case 1:return t=i.sent(),[2,new QQ(t,this.rFt)]}})}).call(this)},i.fO=function(t){return aG(this.rFt,t)},i.ygt=function(t,i){return void 0===i&&(i=!1),jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.Dpt];case 1:return[4,kr(n.sent().ygt(t,i),this.nT.Yg)];case 2:return[2,n.sent()]}})}).call(this)},i.Zg=function(){this.Dpt.catch(yn),this.nT.Zg()},t}();V(),It(),Nt();var KQ=function(t){function i(i){var n;return(n=t.call(this,eY.iWt)||this).qk=void 0,n.qk=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var JQ=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,eY.eWt)||this).uri=void 0,h.sWt=void 0,h.qk=void 0,h.mediaSequenceNumeber=void 0,h.mediaTrackId=void 0,h.nWt=void 0,h.httpStatusCode=void 0,h.uri=i,h.sWt=n,h.qk=r,h.mediaSequenceNumeber=e,h.mediaTrackId=s,h.nWt=u,h.httpStatusCode=o,h}return Pt(i,t),i}(ah);function ZQ(t,i,n){var r=vQ(n)?n:n.tFt;if(i.gUt(r.kOt)){if(void 0!==n.xet)return i.kUt(n.xet,n).iF();if(n!==r&&void 0!==r.xet){var e=i.kUt(r.xet,r).iF();return n.EO+(e-r.EO)}}var s=t.IMt.mat(r.aOt-1);if(void 0!==s&&i.gUt(s.kOt)){if(s.yOt.length>0){var u=s.uFt(s.yOt.length-1);if(void 0!==u.xet){var o=i.kUt(u.xet,u).iF();return n.EO+(o-u.EO)}}if(void 0!==s.xet){var h=i.kUt(s.xet,s).iF();return n.EO+(h-s.EO)}}var a=t.IMt.mat(r.aOt+1);if(void 0!==a&&i.gUt(a.kOt)){if(a.yOt.length>0){var c=a.uFt(0);if(void 0!==c.xet){var f=i.kUt(c.xet,c).iF();return n.EO+(f-c.EO)}}if(void 0!==a.xet){var v=i.kUt(a.xet,a).iF();return n.EO+(v-a.EO)}}return n.EO}function tY(t){return void 0!==t.xet}function iY(t,i,n,r){for(var e=i;e=0;e--){var s=t[e];if(s.kOt!==n)break;if(tY(s))if(r(s,e))break}}V(),It();var rY="HlsPlaylistDownloader",eY=function(t){return t.iWt="rWt",t.eWt="hWt",t}({}),sY=function(t){function i(i,n,r,e,s,u,o,h){var a;return(a=t.call(this)||this).Vp=void 0,a.Fkt=void 0,a.nHt=void 0,a.tWt=void 0,a.QWt=void 0,a.SHt=void 0,a.aWt=void 0,a.uWt=void 0,a.vWt=void 0,a.KWt=void 0,a.YWt=0,a.JWt=0,a.ZWt=0,a.$Wt=0,a.pWt=new dr,a.mWt=void 0,a.cWt=0,a.dWt=void 0,a.lWt=void 0,a.fWt=!1,a.yWt=void 0,a.wWt=void 0,a.PWt=function(t){a.uWt&&(a.SHt=a.uWt,a.uWt=void 0,a.cWt=0,a.dWt=void 0,a.lWt=void 0,a.fWt=!1),a.vWt&&(t&&!mr(t)?a.vWt.jy(t):a.vWt.Xy(),a.vWt=void 0)},a.XWt=function(t,i){a.ZWt=t,t>0&&0===a.YWt&&(a.YWt=Vi.Mg()),void 0!==i&&(a.$Wt=i),a.So(new KQ(a.Vp))},a.Vp=i,a.Fkt=r,a.nHt=e,a.SHt=n,a.aWt=new HQ(r,n),a.QWt=new VQ(o,s,h),a.tWt=new jQ(s,u,function(t){switch(t){case eG.Bk:return Tl.Bk;case eG.Dk:return Tl.Dk;case eG.OU:case eG.bLt:return Tl.NT;default:return Tl.pk}}(n.Km),h),a}Pt(i,t);var n=i.prototype;return n.oWt=function(t){this.aWt.zg(),this.aWt=new HQ(this.Fkt,t),this.$It?this.uWt=t:(this.SHt=t,this.cWt=0,this.dWt=void 0,this.lWt=void 0,this.fWt=!1)},n.ZVt=function(){return this.vWt?this.vWt.Qy:ot.resolve()},n.gWt=function(){return this.nHt.gWt()},n.Zg=function(){var t,i,n;this.pWt.Zg(),this.pWt=new dr,null==(t=this.mWt)||t.Zg(),this.mWt=void 0,null==(i=this.wWt)||i.Zg(),null==(n=this.yWt)||n.Zg(),this.wWt=void 0,this.yWt=void 0,this.cWt=0,this.dWt=void 0,this.lWt=void 0,this.fWt=!1},n.zg=function(){this.aWt.zg()},n.AWt=function(t){var i=this.SHt.IMt.$Ft(t);if(!i)return!1;if(void 0!==this.dWt){var n=i.aOt===this.dWt;return void 0!==this.lWt?i.cFt(t)===i.uFt(this.lWt)&&n:n}return!1},n.bWt=function(t){var i,n;if(!this._Wt&&(void 0===this.dWt||t=u&&(i=this.SWt(t))}else if(this.SHt.IMt.POt&&void 0!==this.dWt){if(this.SHt.IMt.mat(this.dWt).ZOt&&void 0!==(i=this.SWt(t))&&i[0].aOt===this.dWt)return}if(i){this.cWt=t;var o=i[0],h=i[1];return 0===(null==h?void 0:h.eFt)&&void 0!==o.ct?[o,void 0]:[o,h]}},n.SWt=function(t){var i,n,r=this.SHt.IMt.ect;if(0!==r.length){var e,s=this.Fkt.Br.mM,u=Sm.eU(t),o=function(t,i,n){var r=t.IMt.ect;if(0!==r.length){var e=t.IMt.tUt(n.iF());if(i.gUt(e.kOt)){var s,u,o,h=e.aOt-r[0].aOt,a=e.kOt,c=0;if(!(nY(r,h,a,function(t,i){return s=t,c=i,!0}),void 0===s&&(iY(r,h+1,a,function(t,i){return s=t,c=i,!0}),void 0===s)||(i.kUt(s.xet,s).hF(n)?(u=s,iY(r,c+1,a,function(t){return i.kUt(t.xet,t).eF(n)?(o=t,!0):(u=t,!1)})):(o=s,nY(r,c-1,a,function(t){return i.kUt(t.xet,t).hF(n)?(u=t,!0):(o=t,!1)})),void 0===u||void 0===o)))return[u,o]}}}(this.SHt,s,u);if(void 0!==o){var h=o[0],a=o[1],c=s.kUt(h.xet,h),f=s.kUt(a.xet,a),v=u.lF(c).iF()/f.lF(c).iF()*(a.EO-h.EO);e=h.EO+v}else e=t;var d=r[r.length-1];return d.PO<=e?(i=d,n=d.lFt(e)):n=r[0].EO>e?(i=r[0]).uFt(0):null==(i=this.SHt.IMt.$Ft(e))?void 0:i.lFt(e),i?[i,n]:void 0}},n.TWt=function(t,i){var n,r;if((n=this.SHt.IMt.mat(t))&&void 0!==i){if(0===n.yOt.length)return[n,void 0];r=n.uFt(i+1)}return void 0!==n&&void 0!==r||(r=null==(n=this.SHt.IMt.mat(t+1))?void 0:n.uFt(0)),n?[n,r]:void 0},n.YVt=function(){if(this.$It)throw new p("Cannot perform new operation while PlaylistDownloader is still busy")},n.kWt=function(t){this.YVt(),this.vWt=new Xa,this.EWt(t,this.pWt.Yg).then(this.PWt,this.PWt)},n.xWt=function(){this.aWt.PHt()},n.EWt=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return this.SHt.IMt.POt?[2]:(n=this.bWt(t))||!this.aWt.bHt()||void 0===this.dWt?[3,2]:[4,this.aWt.THt(void 0===this.lWt?this.dWt+1:this.dWt,void 0!==this.lWt?this.lWt+1:void 0,i)];case 1:e.sent(),n=this.bWt(t),e.label=2;case 2:return n||!this.aWt.bHt()||void 0===this.dWt?[3,4]:[4,this.aWt.THt(this.dWt+1,0,i)];case 3:e.sent(),n=this.bWt(t),e.label=4;case 4:return n?[3,6]:(UX.hB(rY,"No next segment / part available, need to update playlist before continuing."),[4,this.aWt.xHt(i)]);case 5:return e.sent(),r=this.UMt.IMt.ect,r[0].EO>t&&(this.lWt=void 0,this.dWt=void 0,this.fWt=!1),r[r.length-1].aOt0&&this.ZWt>=this.$Wt)&&!(t-this.YWt<500)))},xt(i,[{key:"$It",get:function(){return void 0!==this.vWt}},{key:"_Wt",get:function(){return this.fWt}},{key:"UMt",get:function(){var t;return null!=(t=this.uWt)?t:this.SHt}},{key:"ERt",get:function(){if(!this.SHt.IMt.POt||void 0===this.dWt)return!1;var t=this.SHt.IMt.mat(this.dWt);if(!t.ZOt)return!1;if(void 0!==this.lWt&&!t.uFt(this.lWt).ZOt)return!1;return!0}}]),i}(uh);function uY(t,i,n,r){return{ck:{ck:n,Km:JR.vZ},Km:WQ.SLt,Iut:r,hHt:t,kOt:i.kOt}}function oY(t,i,n){return{ck:{ck:i,Km:JR.vZ},Km:WQ.yk,Iut:n,hHt:t,kOt:t.kOt}}function hY(t,i,n){return{ck:{ck:i,Km:JR.vZ},Iut:n,Km:WQ.TLt,hHt:t,kOt:t.tFt.kOt}}V(),It(),Bt(),Ut();var aY=function(){function t(t){this.oqt=[],this.uqt=ro(),this.qUt=void 0,this.dqt=void 0,this.rqt=void 0,this.qUt=t}var i=t.prototype;return i.UWt=function(t){"bOt"===t.Km&&(this.rqt=t.bOt),this.oqt.push(t),this.dqt&&(this.dqt.Xy(),this.dqt=void 0)},i.gWt=function(){return this.oqt[0]},i.lqt=function(t){Yn(this.oqt,t)},i.RWt=function(){return null!=this.dqt||(this.dqt=new Xa),this.dqt.Qy},i.fqt=function(t){this.vqt(t.Lot).fqt(t)},i._qt=function(t){return this.vqt(t)._qt()},i.sHt=function(t){this.vqt(t.Lot).sHt(t)},i.gqt=function(t){var i;null==(i=this.uqt.get(t))||i.zg()},i.pqt=function(t){return this.vqt(t).pqt()},i.vqt=function(t){if(this.uqt.has(t))return this.uqt.get(t);var i=new cY;return this.uqt.set(t,i),i},i.Gy=function(){this.mqt(),this.wqt()},i.mqt=function(){this.rqt=void 0,tr(this.oqt)},i.wqt=function(){this.uqt.forEach(function(t){return t.Gy()})},i.zg=function(){this.uqt.forEach(function(t){return t.zg()}),this.uqt.clear(),this.Gy(),this.dqt&&(this.dqt.Zg(),this.dqt=void 0)},xt(t,[{key:"MVt",get:function(){return this.rqt}},{key:"hqt",get:function(){for(var t,i=[],n=Ft(this.oqt);!(t=n()).done;){var r=t.value;if("$at"===r.Km){var e,s=r.$at.hHt,u=ZQ(r.UMt,this.qUt,s);i.push({$at:s,UMt:r.UMt,EO:u,PO:u+(null!=(e=s.ct)?e:0)})}else"zWt"===r.Km&&i.push({$at:r.$at,UMt:r.UMt,EO:r.lHt,PO:r.fHt})}return i}},{key:"aqt",get:function(){var t=[];return this.uqt.forEach(function(i){for(var n,r=Ft(i.cqt);!(n=r()).done;){var e=n.value;"$at"===e.Km?t.push({$at:e.hHt,UMt:e.UMt,EO:e.EO,PO:e.EO+e.ct}):"zWt"===e.Km&&t.push({$at:e.$at,UMt:e.UMt,EO:e.lHt,PO:e.fHt})}}),t}}]),t}(),cY=function(){function t(){this.yqt=[],this.Aqt=void 0}var i=t.prototype;return i.fqt=function(t){this.yqt.push(t),this.Aqt&&(this.Aqt.Xy(),this.Aqt=void 0)},i._qt=function(){return this.yqt[0]},i.sHt=function(t){Yn(this.yqt,t)},i.pqt=function(){return null!=this.Aqt||(this.Aqt=new Xa),this.Aqt.Qy},i.Gy=function(){tr(this.yqt)},i.zg=function(){this.Gy(),this.Aqt&&(this.Aqt.Zg(),this.Aqt=void 0)},xt(t,[{key:"cqt",get:function(){return this.yqt}}]),t}();V(),It(),Wt(),Nt(),Yt(),V(),It(),Bt(),Nt(),Ut(),V(),It(),Nt();var fY=function(t){function i(i,n){var r;return(r=t.call(this,wY.bqt)||this).UMt=void 0,r.frt=void 0,r.UMt=i,r.frt=n,r}return Pt(i,t),i}(ah);V(),It(),Nt();var vY=function(t){function i(i){var n;return(n=t.call(this,wY.Sqt)||this).UMt=void 0,n.UMt=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var dY=function(t){function i(i,n){var r;return(r=t.call(this,wY.Tqt)||this).UMt=void 0,r.plt=void 0,r.UMt=i,r.plt=n,r}return Pt(i,t),i}(ah);V(),It(),Nt();var lY=function(t){function i(i,n){var r;return(r=t.call(this,wY.kqt)||this).UMt=void 0,r.Eqt=void 0,r.UMt=i,r.Eqt=n,r}return Pt(i,t),i}(ah);V(),It(),Nt();var gY=function(t){function i(){return t.call(this,wY.Pqt)||this}return Pt(i,t),i}(ah),wY=function(t){return t.bqt="xqt",t.Tqt="Iqt",t.kqt="Rqt",t.Sqt="Cqt",t.Pqt="Dqt",t}({}),mY=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).nHt=void 0,e.qUt=void 0,e.Nqt=void 0,e.Lqt=void 0,e.nT=new dr,e.nHt=i,e.qUt=n,e.Nqt=r,e}Pt(i,t);var n=i.prototype;return n.Mqt=function(t){for(var i,n=Ft(this.Nqt);!(i=n()).done;){var r=i.value;Jn(t,r)||this.nHt.gqt(r)}this.Nqt=t},n.ZVt=function(){var t,i;return null!=(i=null==(t=this.Lqt)?void 0:t.Qy)?i:ot.resolve()},n.YVt=function(){if(this.$It)throw new p("Cannot perform new operation while transmuxer is still busy")},n.Oqt=function(t,i){},n.Fqt=function(t){var i=this;this.YVt(),this.Lqt=new Xa;var n=function(n){i.Uqt(t,n)};this.Vqt(t,this.nT.Yg).then(n,n)},n.Hqt=function(t){var i=this;this.YVt(),this.Lqt=new Xa;var n=function(n){i.Uqt(t,n)};this.Wqt(t,this.nT.Yg).then(n,n)},n.qqt=function(t){this.YVt(),this.Lqt=new Xa;try{for(var i,n=Ft(this.Bqt);!(i=n()).done;){var r={Km:"zWt",Lot:i.value,lHt:t.lHt,fHt:t.fHt,kOt:t.kOt,UMt:t.UMt,$at:t.$at};this.fqt(r)}}finally{this.Uqt(t)}},n.Uqt=function(t,i){this.Lqt&&(!i||mr(i)||function(t){return j(t,gQ)}(i)?(mr(i)||this.nHt.lqt(t),this.Lqt.Xy(),this.Lqt=void 0):this.Lqt.jy(i),this.So(new gY))},n.zqt=function(t,i){this.So(new fY(t,i))},n.Gqt=function(t,i){this.So(new dY(t,i))},n.Xqt=function(t,i,n){dQ(i)&&this.So(new lY(t,n))},n.jqt=function(t){this.So(new vY(t))},n.fqt=function(t){Jn(this.Nqt,t.Lot)&&this.nHt.fqt(t)},n.Qqt=function(t){return this.nHt._qt(t)},n.sHt=function(t){this.nHt.sHt(t)},n.Kqt=function(t){return this.nHt.pqt(t)},n.Zg=function(){this.nT.Zg(),this.nT=new dr},xt(i,[{key:"Bqt",get:function(){return this.Nqt}},{key:"$It",get:function(){return void 0!==this.Lqt}}]),i}(uh);function yY(t,i){return dQ(t)?0:A.min(t.EO,i)}function pY(t,i){var n;return A.max(t.EO,i)+(null!=(n=t.ct)?n:0)}var _Y=function(t){function i(i,n,r){return t.call(this,i,n,[r])||this}Pt(i,t);var n=i.prototype;return n.Vqt=function(t,i){yr(i);var n={Km:"FRt",ck:t.bOt.ck,Lot:this.Bqt[0],kOt:t.kOt,Yqt:{frt:"",MW:t.MW},EO:t.EO,UMt:t.UMt,hHt:t.bOt.hHt};return this.fqt(n),ot.resolve()},n.Wqt=function(t,i){return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return yr(i),void 0===(n=t.$at.hHt).xet?[3,3]:this.qUt.gUt(t.kOt)?[3,2]:[4,kr(this.qUt.mUt(t.kOt),i)];case 1:h.sent(),h.label=2;case 2:return r=this.qUt.kUt(n.xet,n).iF(),[3,4];case 3:r=n.EO,h.label=4;case 4:return e=yY(n,r),s=pY(n,e),o={Km:"$at",ck:t.$at.ck,Lot:this.Bqt[0],lHt:e,fHt:s,EO:r,ct:null!=(u=n.ct)?u:0,bU:0,kOt:t.kOt,UMt:t.UMt,hHt:t.$at.hHt},this.fqt(o),[2]}})}).call(this)},i}(mY);function kY(t,i){for(var n,r=function(){var r=n.value,s=r.EO;if(r.UMt.IMt.POt&&dQ(r.$at))s=0;else{var u=function(t){return r.UMt===t.UMt&&lQ(t.$at,r.$at)},o=Wn(t,u);if(void 0!==o)s=A.min(s,o.PO);else{var h=Wn(i,u);void 0!==h&&(s=A.min(s,h.HVt.An(0)))}}e=e.OM(OA.tL(s,r.PO))},e=OA.iL(),s=Ft(t);!(n=s()).done;)r();return e}V(),It(),Ut();var bY=.001,AY=function(){function t(t,i,n,r,e,s){this.$qt=void 0,this.ezt=void 0,this.tzt=void 0,this.szt=void 0,this.nzt=void 0,this.Rz=void 0,this.Zqt=void 0,this.$qt=t,this.ezt=i,this.tzt=n,this.szt=r,this.nzt=e,this.Rz=s,this.Zqt=[]}var i=t.prototype;return i.oWt=function(t){this.$qt.oWt(t)},i.izt=function(t){for(var i,n=function(t){var n=i.Zqt[t];if(!UQ(n))throw new p("Invalid state");var r=Xn(e,function(t){return t.Km===n.Km});r>=0&&!n.QVt?(n.JVt(e[r]),$n(e,r)):$n(i.Zqt,t)},r=this.Zqt.length>0,e=t.slice(),s=this.Zqt.length-1;s>=0;s--)i=this,n(s);for(var u,o=Ft(e);!(u=o()).done;){var h=u.value,a=new xQ(h);this.Zqt.push(new FQ(h.Km,h,this.ezt,a,this,this.szt,this.nzt))}r&&e.length>0&&this.ezt.Gy();var c=t.map(function(t){return t.Km});this.tzt.Mqt(c)},i.YY=function(t){var i,n=(null==(i=this.Rz)?void 0:i.YY(t))||!1;return n&&(this.Zg(),this.ezt.Gy()),n},i.rzt=function(t){var i=this.Zqt[0];if(void 0!==i){if(i.Km!==cw.NT||i.$It)throw new p("Invalid state");if(!i.QVt)return void i.JVt(t)}var n=new xQ(t),r=new FQ(cw.NT,t,this.ezt,n,this,void 0,void 0);this.Zqt=[r]},i._at=function(){for(var t,i=Ft(this.Zqt);!(t=i()).done;){t.value.zVt.UVt()}},i.hdt=function(t){var i=this.hzt.JM(t,bY);return i?i.An(i.V-1):t},i.AWt=function(t){return!!this.hzt.JM(t,bY)||this.$qt.AWt(t)},i.azt=function(t){return this.ozt.Cr(t,bY)},i.uzt=function(t,i,n){for(var r,e=Ft(this.Zqt);!(r=e()).done;){var s=r.value.zVt,u=s._pt;if(void 0!==u&&i>=u&&!s.IP.CM().Cr(u))return!0}return i-t0){var i=this.Zqt[0].zVt.MVt;if(i&&this.Zqt.every(function(t){return t.zVt.MVt===i}))return i}}},{key:"hzt",get:function(){var t,i=kY(this.ezt.hqt.concat(this.ezt.aqt),nr(this.Zqt,function(t){return t.zVt.ect})).CM();if(0===this.Zqt.length)t=i;else{t=OA.eL();for(var n,r=Ft(this.Zqt);!(n=r()).done;){var e=n.value;t=t.Mn(e.zVt.IP)}for(var s,u=Ft(this.Zqt);!(s=u()).done;){var o=s.value;t=t.UM(o.GVt)}t=t.OM(i)}return t.LM(bY)}},{key:"ozt",get:function(){var t,i=kY(this.ezt.aqt,nr(this.Zqt,function(t){return t.zVt.ect})).CM();if(0===this.Zqt.length)t=i;else{t=OA.eL();for(var n,r=Ft(this.Zqt);!(n=r()).done;){var e=n.value;t=t.Mn(e.zVt.IP)}t=t.OM(i)}return t}}]),t}();V(),It(),Nt();var TY=function(t){function i(){return t.call(this,TX.PMt)||this}return Pt(i,t),i}(ah);V(),It(),Nt();var SY=function(t){function i(){return t.call(this,TX.kMt)||this}return Pt(i,t),i}(ah);V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Bt(),Nt(),Yt();var EY="LazyMediaBuffer",IY=function(t){function i(i,n){var r;return(r=t.call(this)||this).Vp=void 0,r._zt=void 0,r.GS=void 0,r.Trt=void 0,r.fzt=void 0,r.zY=void 0,r.jY=void 0,r.L3=void 0,r.Vp=i,r._zt=n,r.GS=void 0,r.Trt=void 0,r.fzt=new Xa,r.zY=20,r.jY=30,r.L3=new hC,r}Pt(i,t);var n=i.prototype;return n.F3=function(t,i){UX.uLt(EY,"Marking gap from "+t+" to "+i+"."),this.L3.t$(t,i),this.Trt&&this.Trt.F3(t,i)},n.U3=function(t,i){UX.uLt(EY,"Removing gap from "+t+" to "+i+"."),this.L3.i$(t,i),this.Trt&&this.Trt.U3(t,i)},n.lzt=function(t){this.Trt=t,this.Trt.UY=this.jY,this.Trt.MY=this.zY;for(var i=this.L3.ZZ,n=0;n0?s:e;switch(n.OY.type){case aR.BANDWIDTH:var o=n.WY,h=u.filter(function(t){return t.kW<=o});if(h.length>0)return er(h,function(t){return t.kW});case aR.PERFORMANCE:return rr(u,function(t){return t.kW});case aR.QUALITY:return er(u,function(t){return t.kW})}}function MY(t,i){for(var n,r=function(){var i=n.value,r=t.filter(function(t){return t.frt&&t.frt.yCt&&hP(t.frt.yCt,i)});return 0===r.length?"continue":{v:r}},e=Ft(i);!(n=e()).done;){var s=r();if("object"===W(s))return s.v}}function LY(t,i){return t.filter(function(t){return FY(t,i)})}function FY(t,i){var n=i+2e3,r=0===t.UOt.length||t.UOt.some(function(t){return t.IMt.jFt0&&this.OP(i.Tn(0),{Wzt:!1}),this.jzt?[3,2]:[4,this.sGt()];case 1:n.sent(),n.label=2;case 2:return this.MTt(),[4,t];case 3:return n.sent(),this.Nkt(),[2]}})}).call(this)},n.MTt=function(){if(!this.nkt()){var t,i=null==(t=this.VMt)?void 0:t.IMt;if(null==i?void 0:i.POt){var n=!0,r=0,e=i.Tn;if(!this.Bkt&&e&&(n=!e.gOt,(r=e._Ot)<0)){var s=i.IFt;r+=s.An(s.V-1)}this.Kzt(r,{Hzt:n})}else this.Kzt(1/0,{Hzt:!0})}this.rGt()&&this.Kzt(1/0,{Hzt:!0})},n.nkt=function(){var t,i=this.rkt;if(0===i.V)return!0;var n=this.MP,r=null==(t=this.HMt)?void 0:t.hGt,e=null==r?void 0:r.VM(n);return(e&&e>0?r.An(e):n)>=i.Tn(0)},n.rGt=function(){var t=this.MP;return KY(t,this.eLt)||KY(t,this.nLt)},n.pEt=function(){this.JW=void 0,this.ZW=void 0},n.qq=function(t){this.JW||(Er(this.hr()),this.JW=ww(t),this.ZW=t,this.So(new Ib(t)))},n.be=function(){UX.hB(qY,"Showing the player."),this.TL.be()},n.Qx=function(){throw new p("Not implemented")},n.Kx=function(){throw new p("Not implemented")},n.Yx=function(){},n.Jx=function(){this.jzt&&Er(this.oGt({Jx:!0}))},n.Ta=function(t,i,n){return jt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:r={stack:[],error:void 0,hasError:!1},h.label=1;case 1:return h.trys.push([1,9,10,11]),UX.hB(qY,"Setting the player source to "+t.src+"."),this.pEt(),this.HMt?[4,this.hr()]:[3,3];case 2:h.sent(),yr(n),h.label=3;case 3:return oT(t)?[2]:(e=Xt(r,dr.ep([n]),!1),this.lq.IW(t.contentProtection),void 0===this.Zzt||this.Zzt.Mc!==t?[3,4]:(this.HMt=this.Zzt,this.HMt.mn(QY,this.aGt),this.rV=this.uGt,this.rV.$g(e.Yg),this.uGt=new dr,this.cGt=void 0,null==(s=this.dGt)||s.Zg(),this.dGt=void 0,this.Zzt=void 0,this.lGt=!1,this.fGt!==this.HMt&&(this.fGt=void 0),this.HMt.vGt(this.TL),[3,8]));case 4:return void 0===this.Zzt?[3,7]:[4,this.xx()];case 5:return h.sent(),[4,this._Gt()];case 6:h.sent(),h.label=7;case 7:this.rV=dr.ep([e.Yg]),this.HMt=this.gGt(t,i,void 0,this.TL),h.label=8;case 8:return this.HMt.wn(QY,this.Rs),this.HMt.wn(TX.PMt,this.pGt),this.YL.BI=this.HMt.ht,this.$L.BI=this.HMt.rt,this.mGt.BI=this.HMt.nt,(u=this.HMt.wGt)&&(this.jW=new SH(this,this.TL,u),this.jW.Rt=!0,this.Cz.Ea(this.jW)),xp(this.Gl),this.yGt(),this.Ekt(),this.AGt.forEach(this.Rs),this.AGt=[],this.sGt(),e.zg(),[3,11];case 9:return o=h.sent(),r.error=o,r.hasError=!0,[3,11];case 10:return Gt(r),[7];case 11:return[2]}})}).call(this)},n.Px=function(t,i,n,r){return jt(function(){return zt(this,function(e){switch(e.label){case 0:return yr(r),void 0===this.Zzt?[3,2]:[4,this.xx()];case 1:e.sent(),e.label=2;case 2:return yr(r),this.Zzt=this.gGt(t,i,n,void 0),this.Zzt.wn(QY,this.aGt),[2]}})}).call(this)},n.xx=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return void 0===this.Zzt?[2]:(this.uGt.Zg(),null==(t=this.dGt)||t.Zg(),this.dGt=void 0,void 0===this.cGt?[3,2]:[4,this.cGt.catch(yn)]);case 1:i.sent(),this.cGt=void 0,i.label=2;case 2:return[4,this.Zzt.zg()];case 3:return i.sent(),this.uGt=new dr,this.fGt===this.Zzt&&(this.fGt=void 0),this.Zzt=void 0,this.lGt=!1,this.AGt=[],[2]}})}).call(this)},n.gGt=function(t,i,n,r){return null!=this.bGt||(this.bGt=this.SGt.Ret()),new $Y(this,t,i,this.nV,this.Rz,this.TGt,this.eut,this.kGt,this.mHt,this.bGt,this._dt,n,r)},n.sGt=function(){return this.Dpt=this.EGt(this.Dpt,this.rV.Yg).catch(this.mmt),this.Dpt},n.EGt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return t?[4,t]:[3,2];case 1:r.sent(),yr(i),r.label=2;case 2:return this.HMt?(n=this.tq)===eS.OL||this.n7?[4,this.PGt(i)]:[3,5]:[2];case 3:return r.sent(),[4,this.xGt(i)];case 4:return r.sent(),[3,7];case 5:return n!==eS.VU?[3,7]:[4,this.PGt(i)];case 6:r.sent(),r.label=7;case 7:return[2]}})}).call(this)},n.PGt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return yr(t),void 0===this.HMt||this.HMt.nGt?[2]:[4,this.HMt.PGt(t)];case 1:return i.sent(),this.kq.VV(),this.yGt(),[2]}})}).call(this)},n.yGt=function(){var t;if(!this.jW){var i=null==(t=this.HMt)?void 0:t.wGt;i&&(this.jW=new SH(this,this.TL,i),this.Cz.Ea(this.jW))}},n.xGt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return yr(t),this.jzt?[2]:(this.jzt=!0,[4,this.HMt.oGt(this.eLt,this.nLt,this.Mzt,{RGt:!0})]);case 1:return i.sent(),[2]}})}).call(this)},n.CGt=function(){var t=this.Zzt;return void 0===t?ot.resolve():(0===t.bU&&(t.bU=this.HMt.bU+this.HMt.ct),null!=this.dGt||(this.dGt=new Xa),void 0===this.cGt&&(this.cGt=t.PGt(this.uGt.Yg),this.dGt.$g(this.cGt)),this.dGt.Qy)},n.DGt=function(){var t;return(null!=(t=this.dGt)?t:this.dGt=new Xa).Qy},n.zzt=function(t){return this.$zt(t,this.TL.MP)},n.$zt=function(t,i){var n=i;return t===this.HMt&&void 0!==this.Zzt&&this.Zzt.bU>0&&(n=A.min(n,this.Zzt.bU)),void 0!==t&&(n=A.max(0,n-t.bU)),n},n.iGt=function(){return void 0!==this.Zzt&&0!==this.Zzt.bU&&(!!this.lGt&&this.TL.MP+.25>=this.Zzt.bU)},n.MGt=function(){var t,i;return{Ti:this.TL.Ti,Mi:this.TL.Mi,_Lt:rq(this.TL),Gct:null==(i=this.bt)||null==(t=i.abr)?void 0:t.restrictToPlayerSize}},n.LGt=function(){return new BY(this.iq)},n.oGt=function(t){void 0===t&&(t={});var i={jMt:t.jMt||!1,KMt:t.KMt||!1,QMt:t.QMt||!1,Jx:t.Jx||!1,RGt:t.RGt||!1},n=[this.Yzt,this.w7].filter(Fi);return this.m7.Zg(),this.m7=new dr,this.m7.$g(this.rV.Yg),this.OGt.Zg(),this.OGt=new dr,this.OGt.$g(this.rV.Yg),this.Yzt=br(this.FGt(n,i,this.OGt.Yg),this.OGt).catch(this.Jzt),this.Yzt},n.FGt=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f,v;return zt(this,function(d){switch(d.label){case 0:return this.jzt?[3,2]:[4,this.HMt.UGt(n)];case 1:return d.sent(),[2];case 2:return[4,ot.all(t.map(function(t){return t.catch(yn)}))];case 3:return d.sent(),this.VGt(),[4,this.HGt(n)];case 4:return d.sent(),[4,this.WGt()];case 5:return d.sent(),[4,this.qGt(i.KMt,i.QMt)];case 6:return d.sent(),yr(n),[4,this.HMt.zGt()];case 7:return u=d.sent(),yr(n),[4,this.GGt(u,i.Jx,n)];case 8:return o=d.sent(),h=null==(r=this.iq)?void 0:r.Q3,a=null==(e=this.iq)?void 0:e.K3,this.HMt.XGt(void 0!==h,void 0!==a,i.jMt||o,i.KMt,i.QMt),this.HMt.jGt(i.jMt),void 0!==this.Zzt&&(this.Zzt.XGt(void 0!==h,void 0!==a,i.jMt||o,i.KMt,i.QMt),this.Zzt.jGt(i.jMt)),this.HMt.izt(h,a),void 0===this.Zzt?[3,10]:[4,this.Zzt.zGt()];case 9:(c=d.sent())&&this.iq&&this.iq.TZ(c)?(this.Zzt.izt(h,a),this.lGt=!0):(this.Zzt.izt(void 0,void 0),this.lGt=!1),d.label=10;case 10:this.QGt(),yr(n),d.label=11;case 11:return d.trys.push([11,13,,14]),[4,ot.all([this.HMt.KGt(n),null==(f=this.Zzt)?void 0:f.KGt(n)].filter(Fi))];case 12:return d.sent(),[3,14];case 13:return pr(d.sent()),[3,14];case 14:if(yr(n),this.B4(),this.HMt.hUt(),null==(s=this.Zzt)||s.hUt(),void 0!==this.qzt)return this.Kzt(this.qzt,this.Gzt),[2];if(!this.Bkt){if(v=this.HMt.YGt)return this.Kzt(v.XF,{Hzt:v.Hzt}),[2];if(this.HMt.bU>0)return this.Kzt(0,{Hzt:!1}),[2]}return this.BGt.length>0&&this.JGt(),[2]}})}).call(this)},n.GGt=function(t,i,n){return jt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return i||!this.iq?[3,3]:t?this.iq.TZ(t)?[4,this.HGt(n)]:[3,3]:[2,!1];case 1:return h.sent(),[4,this.iq.EZ(t)];case 2:return h.sent(),[2,!1];case 3:for(r=Ft(this.HMt.NGt);!(e=r()).done;)e.value.Jqt.forEach(function(t){return t.Zg()});this.TL.x9(),h.label=4;case 4:return h.trys.push([4,,10,11]),this.iq?[4,this.TL.hr()]:[3,6];case 5:h.sent(),h.label=6;case 6:return t?[4,this.TL.Un(t)]:[3,8];case 7:return s=h.sent(),[3,9];case 8:u=void 0!==this.eLt,o=void 0!==this.nLt,s=new CY(this.TL,u,o),h.label=9;case 9:return this.ZGt(s),[3,11];case 10:return this.TL.I9(),[7];case 11:return[2,!0]}})}).call(this)},n.ZGt=function(t){this.iq=t,this.B4(),this.STt(),this.TTt()},n.B4=function(){var t,i,n=this.iq,r=void 0!==this.Zzt&&this.lGt?this.Zzt:this.HMt;if(n&&void 0!==r&&(r!==this.fGt||E(n.ct))){var e;r!==this.fGt&&n.A3();var s=(null!=(e=r.$Gt)?e:NaN)+r.bU;s>0&&n.C4(s),this.fGt=r}null==(t=this.HMt)||t.hUt(),null==(i=this.Zzt)||i.hUt()},n.qGt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.iq?(n=[],t&&this.iq.Q3&&n.push(this.iq.Q3._S(0,1/0)),i&&this.iq.K3&&n.push(this.iq.K3._S(0,1/0)),[4,ot.all(n)]):[2];case 1:return r.sent(),[2]}})}).call(this)},n.STt=function(){var t=this.iq;t&&(t.K3&&(t.K3.MY=this.Rz.GY),t.Q3&&(t.Q3.MY=this.Rz.GY))},n.TTt=function(){var t=this.iq;t&&(t.K3&&(t.K3.UY=this.Rz.UY),t.Q3&&(t.Q3.UY=this.Rz.UY))},n.QGt=function(){var t,i,n,r,e=void 0!==(null==(t=this.iq)?void 0:t.Q3),s=void 0!==(null==(i=this.iq)?void 0:i.K3);null==(n=this.HMt)||n.QGt(e,s),null==(r=this.Zzt)||r.QGt(e,s)},n.y7=function(t,i,n,r){return jt(function(){var e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,ot.all(t.map(function(t){return t.catch(yn)}))];case 1:return o.sent(),yr(r),[4,this.WGt()];case 2:return o.sent(),yr(r),this.qzt=void 0,this.Xzt=void 0,this.Bkt=!0,e=n.gOt?this.IFt:this.rkt,s=e.DM(i+this.HMt.bU),u=this.TL.ww(ch.Zw,r),this.TL.My(s,n.Hzt),this.jzt&&this.HMt.NGt.length>0&&(this.Br.mM.FUt(),this.tXt(this.MP),this.JGt()),[4,u];case 3:return o.sent(),this.Nkt(),[2]}})}).call(this)},n.Nkt=function(){var t=this.jW;if(void 0!==t){var i=this.BL;if(!this.hx&&!this.kx&&void 0!==i)i0?(this.BGt.forEach(function(t){return t.czt()}),[4,this.KDt()]):[3,2];case 1:t.sent(),this.QDt(),this.BGt.forEach(function(t){return t.$qt.xWt()}),t.label=2;case 2:return[2]}})}).call(this)},n.QDt=function(){var t=this;if(!this.hXt){var i=function(){t.hXt=void 0};this.oXt=new dr,this.oXt.$g(this.rV.Yg),this.hXt=br(this.aXt(this.oXt.Yg),this.oXt).catch(this.Jzt).then(i,i)}},n.KDt=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return null==(t=this.oXt)||t.Zg(),i=this.hXt,this.hXt=void 0,i?[4,i]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(this)},n.aXt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return yr(t),[4,this.uXt(this.HMt,t)];case 1:return i.sent(),yr(t),void 0===this.Zzt?[3,4]:[4,kr(this.CGt(),t)];case 2:return i.sent(),yr(t),[4,this.uXt(this.Zzt,t)];case 3:i.sent(),i.label=4;case 4:return[2]}})}).call(this)},n.uXt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f,v,d,l,g,w,m,y,p,_;return zt(this,function(k){switch(k.label){case 0:yr(i),n=t.NGt,k.label=1;case 1:0,r={stack:[],error:void 0,hasError:!1},k.label=2;case 2:for(k.trys.push([2,4,5,6]),e=[],s=A.max(0,this.TL.MP-t.bU),u=Ft(n);!(o=u()).done;)if(h=o.value,a=h.$qt,c=h.hdt(s),a.$It)e.push(a.ZVt());else if(h.uzt(s,c,this.Rz.GY)||a._Wt){if(f=a.UMt.IMt,void 0===(v=a.bWt(c))){if(f.POt)continue;(d=f.ect).length&&d[0].EO>c&&(this.MP=1/0),a.CWt(),a.kWt(c)}else l=v[0],g=v[1],a.pat(l,g,h.MVt),h.tzt.Oqt(l,g);e.push(a.ZVt())}if(w=Xt(r,dr.ep([i]),!1),0===e.length){for(n.every(function(t){return t.$qt.ERt})||e.push(this.TL.ww(ch._y,w.Yg)),m=Ft(n);!(y=m()).done;)void 0!==(p=y.value).$qt.gWt()&&e.push(p.tzt.ww([wY.Sqt,wY.Pqt],w.Yg));if(0===e.length)return[3,7]}return[4,kr(ot.race(e),w.Yg)];case 3:return k.sent(),[3,6];case 4:return _=k.sent(),r.error=_,r.hasError=!0,[3,6];case 5:return Gt(r),[7];case 6:return[3,1];case 7:return[2]}})}).call(this)},n.sXt=function(){var t=this;if(!this.cXt){var i=function(){t.cXt=void 0};this.dXt=new dr,this.dXt.$g(this.rV.Yg),this.cXt=br(this.lXt(this.dXt.Yg),this.dXt).catch(this.Jzt).then(i,i)}},n.iXt=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return null==(t=this.dXt)||t.Zg(),i=this.cXt,this.cXt=void 0,i?[4,i]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(this)},n.lXt=function(t){return jt(function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:yr(t),i=this.BGt,a.label=1;case 1:for(n=[],r=Ft(i);!(e=r()).done;)s=e.value,u=s.$qt,(o=s.tzt).$It?n.push(o.ZVt()):(h=u.gWt())?"$at"===h.Km?(o.Hqt(h),n.push(o.ZVt())):"bOt"===h.Km?(o.Fqt(h),n.push(o.ZVt())):"zWt"===h.Km&&(o.qqt(h),n.push(o.ZVt())):n.push(u.IWt());return 0!==n.length?[3,2]:[3,5];case 2:return[4,kr(ot.race(n),t)];case 3:a.sent(),a.label=4;case 4:return[3,1];case 5:return[2]}})}).call(this)},n.nXt=function(){var t=this;if(!this.fXt){this.vXt=new dr,this.vXt.$g(this.rV.Yg);var i=function(){t.fXt=void 0};this.fXt=br(this._Xt(this.vXt.Yg),this.vXt).catch(this.Jzt).then(i,i)}},n.eXt=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return null==(t=this.vXt)||t.Zg(),i=this.fXt,this.fXt=void 0,i?[4,i]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(this)},n._Xt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return yr(t),[4,this.gXt(this.HMt,t)];case 1:return i=n.sent(),void 0!==this.Zzt&&this.lGt&&i?(yr(t),[4,kr(this.DGt(),t)]):[3,4];case 2:return n.sent(),yr(t),this.B4(),[4,this.gXt(this.Zzt,t)];case 3:i=n.sent(),n.label=4;case 4:return i?this.iq.C3():this.iq.A3(),[2]}})}).call(this)},n.gXt=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:r=function(){var r,e,s,u,o,h,a,c,f,v,d,l,g;return zt(this,function(w){switch(w.label){case 0:for((r=t.NGt).forEach(function(t){return t._at()}),e=A.max(0,n.TL.MP-t.bU),s=[],u=[],o=Ft(r);!(h=o()).done;)for(a=h.value,c=a.tzt,f=Ft(a.Jqt);!(v=f()).done;)d=v.value,l=UQ(d)?s:u,d.$It?l.push(d.ZVt()):d.$Vt(e)||((g=c.Qqt(d.Km))?"$at"===g.Km&&g.kOt===n.Vzt?(d.cdt(g),l.push(d.ZVt())):"FRt"===g.Km&&g.kOt===n.Vzt?(d.z2(g),l.push(d.ZVt())):"zWt"===g.Km&&(d.dHt(g),l.push(d.ZVt())):u.push(c.Kqt(d.Km)));return 0!==s.length?[3,2]:[4,n.pXt(t,r,e,i)];case 1:if(w.sent())return[2,"continue"];w.label=2;case 2:return 0===s.length&&0===u.length?[2,{v:r.every(function(t){return t.Jqt.length>0&&t.Jqt.every(function(t){return t.$Vt(e)})})}]:[4,kr(ot.race([].concat(s,u)),i)];case 3:return w.sent(),[2]}})},s.label=1;case 1:return n=this,[5,qt(r())];case 2:return"object"===W(e=s.sent())?[2,e.v]:[3,1];case 3:return[2]}})}).call(this)},n.pXt=function(t,i,n,r){return jt(function(){var e,s,u,o,h,a,c,f,v,d,l,g,w,m,y,p,_,k,b,A,T,S;return zt(this,function(E){switch(E.label){case 0:for(e=[],s=[],u=Ft(i);!(o=u()).done;)for(h=o.value,a=h.hdt(n),c=Ft(h.Jqt);!(f=c()).done;)if(UQ(v=f.value))if(void 0!==(d=h.tzt.Qqt(v.Km))){if(d.kOt===this.Vzt)return[2,!1];e.push(d)}else{if(h.$It||h.uzt(n,a,this.Rz.GY)||!v.tHt(n,a))return[2,!1];void 0!==(l=v.zVt.MVt)&&s.push(l)}return 0===e.length?[2,!1]:(g=er(e,function(t){return t.kOt}).kOt,e.every(function(t){return"FRt"===t.Km&&t.kOt===g})?(w=rr(e,function(t){return t.EO}).EO+t.bU,m=[].concat(e,s),[4,this.mXt(m)]):[3,6]);case 1:return y=E.sent(),this.wXt(y)?(UX.uLt(jX,"Seamless switch from",this.iq.Cd,"to",y),[4,this.iq.EZ(y)]):[3,3];case 2:return E.sent(),UX.uLt(jX,"Seamless switch complete."),[3,5];case 3:return[4,this.yXt(t,w,y,r)];case 4:E.sent(),E.label=5;case 5:return this.Vzt=e[0].kOt,[3,7];case 6:for(p=Ft(i);!(_=p()).done;)for(k=_.value,b=Ft(k.Jqt);!(A=b()).done;)for(T=A.value,S=k.tzt.Qqt(T.Km);void 0!==S&&("FRt"!==S.Km||S.kOt!==g);)UX.uLt(jX,"Removing append for other discontinuity, expecting "+g,S),k.tzt.sHt(S),S=k.tzt.Qqt(T.Km);E.label=7;case 7:return[2,!0]}})}).call(this)},n.wXt=function(t){var i,n;switch(null!=(n=null==(i=this.bt)?void 0:i.seamlessSwitchStrategy)?n:XA.OL){case XA.FL:return!0;case XA.UL:return!1;default:return this.iq.TZ(t)}},n.mXt=function(t){return jt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return i=t.map(function(t){return t.Yqt.frt}),n=i.map(function(t){return{qT:t}}),r=[].concat(nr(t,function(t){return t.Yqt.MW}),this.Br.UUt),[4,dG((e=this.bt).contentProtection,i,r,this.nV,e.useCredentials)];case 1:return 0===(s=u.sent()).length&&this.iq&&this.iq.Cd.aq.length>0&&(s=this.iq.Cd.aq),[2,{Km:Op.wV,L4:n,aq:s,X4:e.useManagedMediaSource}]}})}).call(this)},n.yXt=function(t,i,n,r){return jt(function(){var e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:if(o=this.iq,h=o.ct,!(a=this.TL.IP.V>0&&this.TL.MP=i}return this.TL.UP||this.iGt()}},{key:"lt",get:function(){return this.JW}},{key:"WP",get:function(){return this.ZW}},{key:"zP",get:function(){}},{key:"jP",get:function(){}},{key:"KP",get:function(){return!1}},{key:"JP",get:function(){var t,i;return io({},{iO:0,eO:0,sO:0,nO:0,rO:0,hO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.TL.ZP(),{rO:null!=(i=null==(t=this.HMt)?void 0:t.rO)?i:0,nO:this.Rz.kY.kW})}},{key:"Br",get:function(){var t;return null==(t=this.HMt)?void 0:t.Br}},{key:"eGt",get:function(){var t;return null==(t=this.HMt)?void 0:t.eGt}},{key:"$P",get:function(){return this.TL.$P},set:function(t){this.TL.$P=t}},{key:"sx",get:function(){var t,i;return null==(i=null==(t=this.HMt)?void 0:t.sx)||i}},{key:"hx",get:function(){return this.TL.hx}},{key:"ux",get:function(){return this.TL.ux},set:function(t){UX.hB(qY,"Setting playback rate to "+t+"."),this.TL.ux=t}},{key:"_x",get:function(){return this.lkt._s()}},{key:"lkt",get:function(){var t=this.TL._x;return void 0!==this.HMt&&(t=t.Ny(-this.HMt.bU).Mn(OA.eL())),t}},{key:"mx",get:function(){return this.tq},set:function(t){this.tq!==t&&(this.tq=t,this.sGt())}},{key:"Ax",get:function(){var t,i=this.TL.Ax;return(null==(t=this.HMt)?void 0:t.nGt)&&(i=A.max(Up.Qn,i)),i}},{key:"IFt",get:function(){var t,i;return null!=(i=null==(t=this.HMt)?void 0:t.IFt)?i:OA.iL()}},{key:"Sx",get:function(){return this.rkt._s()}},{key:"rkt",get:function(){var t,i,n=null!=(i=null==(t=this.HMt)?void 0:t.Sx)?i:OA.iL();if(0===n.V)return n;if(this.iq&&this.Fzt&&this.iq.ct!==1/0&&(n=new OA([n.Tn(0),this.$zt(this.HMt,this.iq.ct)])),this.HMt&&!this.HMt.POt){var r=this.lkt,e=n.An(n.V-1);if(r.V>0&&r.An(r.V-1)>e){var s=r.An(r.V-1),u=this.HMt.IFt;u&&u.V>0&&(s=A.min(s,u.An(u.V-1))),n=n.OM(new OA([e,s]))}}return n}},{key:"kx",get:function(){var t;return null!=(t=this.Xzt)?t:this.TL.kx}},{key:"nq",get:function(){}},{key:"nt",get:function(){return this.Gl}},{key:"rt",get:function(){return this.$L}},{key:"Rx",get:function(){var t,i;return this.TL.Rx||(null==(i=this.VMt)||null==(t=i.uCt)?void 0:t.Mi)||0}},{key:"Bx",get:function(){var t,i;return this.TL.Bx||(null==(i=this.VMt)||null==(t=i.uCt)?void 0:t.Ti)||0}},{key:"Mx",get:function(){return this.TL.Mx},set:function(t){UX.hB(qY,"Setting volume to "+t+"."),this.TL.Mx=t}},{key:"Fx",get:function(){return this.Cz}},{key:"Vx",get:function(){return!1},set:function(t){}},{key:"hq",get:function(){return this.oq}},{key:"IGt",get:function(){return this.jzt}},{key:"BGt",get:function(){return void 0===this.HMt?[]:void 0===this.Zzt?this.HMt.NGt:this.HMt.NGt.concat(this.Zzt.NGt)}}]),i}(uh),$Y=function(t){function i(i,n,r,e,s,u,o,h,a,c,f,v,d){var l,g,w,m;l=t.call(this)||this,(g=l).oa=void 0,g.Mc=void 0,g.nV=void 0,g.TGt=void 0,g.Rz=void 0,g.eut=void 0,g.kGt=void 0,g.mHt=void 0,g.bGt=void 0,g._dt=void 0,g.GXt=void 0,g.JU=void 0,g.YL=new aw,g.$L=new aw,g.Gl=new Mb([]),g.KXt=void 0,g.pq=void 0,g.wpt=void 0,g.yq=void 0,g.hBt=void 0,g.Fkt=void 0,g.QXt=void 0,g.rV=void 0,g.hjt=void 0,g.ajt=void 0,g.ujt=void 0,g.sjt=void 0,g.Ajt=[],g.LXt=void 0,g.OXt=void 0,g.FXt=void 0,g.UXt=void 0,g.P4=void 0,g.x4=void 0,g.Ljt=void 0,g.HXt=void 0,g.WXt=void 0,g.Ejt=void 0,g.sSt=!0,g.fjt=0,g.ljt=!1,g.N4=OA.iL(),g._kt=!1,g.okt=0,g.lDt=void 0,g.VXt=[],g.zU=0,g.NVt=function(){g.hUt()},g.Ujt=function(t){Er(g.wjt(t.UMt,g.rV.Yg))},g.retryOfflineRenditionsCallback=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return g.UXt!==t&&g.OXt!==t&&g.FXt!==t?[2]:[4,g.Fkt.wVt(t,i)];case 1:return n.sent(),t.IMt.jFt=-1/0,[2]}})})()},g.Djt=function(t){var i=g.LXt,n=null==i?void 0:i.LOt;if(g.Fkt.CVt(t.frt,t.UMt.IMt),!n&&(g.Fkt.DVt(t.frt,t.UMt.IMt),g.Tjt(),i)){var r=void 0!==g.OXt&&!Jn(i.FOt,g.OXt),e=void 0!==g.FXt&&!Jn(i.UOt,g.FXt);(r||e)&&g.oGt(r?void 0:g.OXt,e?void 0:g.FXt,g.UXt).catch(yn)}},g.Bjt=function(t){var i=g.Vjt(t.UMt);void 0!==i&&(i.plt=t.plt)},g.Njt=function(t){var i=g.Vjt(t.UMt);void 0!==i&&(i.eyt=t.Eqt.iF())},g.Vjt=function(t){for(var i,n=Ft(g.$L.II);!(i=n()).done;){var r=i.value.YMt(t);if(void 0!==r)return r}},g.Mjt=function(t){g.Fkt.IVt(t.UMt)},g.Rjt=_n(function(t){t.qk===cw.Bk&&g.Ojt()&&Er(g.Fjt())},200),g.Cjt=function(t){var i;g.okt+=t.nWt;var n=g.$L.V>0?t.qk===cw.Bk:t.qk===cw.Dk;"$at"===t.sWt&&n&&Er(g._jt()),g.So(new BM(function(t){if(t){if(void 0!==t.LAt){var i,n,r=t.LAt.Tn+(null!=(n=t.LAt.V)?n:0);return{Yu:t.zE,Sat:[null==(i=t.LAt)?void 0:i.Tn,r],zk:!0}}return{Yu:t.zE.toString()||"",zk:!0}}return{Yu:"",zk:!0}}(t.uri),(null==(i=g.LXt)?void 0:i.kW)||0,t.mediaSequenceNumeber,t.mediaTrackId,t.qk,t.httpStatusCode,t.nWt))},g.oa=i,g.Mc=n,g.nV=e,g.Rz=s,g.TGt=u,g.eut=o,g.kGt=h,g.mHt=a,g.bGt=c,g._dt=f,g.GXt=v,g.JU=null!=d?d:new ZH,g.rV=new dr;var y=null!=(m=null==(w=n.latencyConfiguration)?void 0:w.targetOffset)?m:n.liveOffset;return g.Fkt=new EQ(g.nV,g.eut,n.useCredentials,Vi.xm(n.src),y),g.Fkt.wn(SQ.iVt,g.NVt),g.Fkt.wn(SQ.eVt,g.Ujt),g.Fkt.wn([ch.Ww,ch.qw,ch.ey],g.Rs),g.KXt=new zY(g,g.JU),g.Gl.FW(g.KXt.Z),n.hlsDateRange&&(g.QXt=new NQ(g.Fkt,g.JU),g.Gl.FW(g.QXt.Z)),r.textTracks&&(g.pq=new Tp(g.JU,g.nV),g.Gl.FW(g.pq.Z),g.fq(r.textTracks)),!Jn(n.ignoreEmbeddedTextTrackTypes,Uw.CEA608)&&(g.hBt=new zF(g.JU),g.Gl.FW(g.hBt.Z)),!Jn(n.ignoreEmbeddedTextTrackTypes,Uw.EMSG)&&(g.wpt=new bH(g.JU),g.yq=new Ep(g.JU,g.wpt.Z),g.Gl.FW(g.wpt.Z),g.Gl.FW(g.yq.Z)),l}Pt(i,t);var n=i.prototype;return n.hUt=function(){var t,i,n=function(t){if(0===t.length)return OA.iL();for(var i,n=OA.eL(),r=0,e=Ft(t);!(i=e()).done;){var s=i.value.IMt.Sx;s.V>0&&(n=n.Mn(s),r=A.max(r,s.Tn(0)))}if(n.V>0)return n;return OA.$M(r)}(this.Uzt);0!==n.V&&(this.N4=n,null==(t=this.wpt)||t.qU(n.Tn(0)),null==(i=this.hBt)||i.qU(n.Tn(0)))},n.NXt=function(t){var i=[];if(this.LXt)for(var n,r=Ft(this.NGt);!(n=r()).done;)for(var e,s=Ft(n.value.Jqt);!(e=s()).done;){var u=e.value.iHt(t);u&&!Jn(i,u)&&i.push(u)}ir(this.VXt,i)||(this.VXt=i,this.So(new DQ))},n.fq=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;r.src&&this.pq.eV(r)}},n.klt=function(){var t,i,n=function(){var i=u.value,n=new kw,r=[];n.lO(new OX(o,i)),r.push(i);for(var e,s=Ft(h);!(e=s()).done;){var a=e.value,c=Wn(a.FOt,function(t){return EX(t,i)&&!PX(r,t)});c&&(n.lO(new OX(a,c)),r.push(c))}t.YL.tt(new DX(t,t.Rz,t.YL,n))},r=function(){var t=c.value,n=new kw,r=[];n.lO(new MX(o,t)),r.push(t);for(var e,s=Ft(h);!(e=s()).done;){var u=e.value,a=Wn(u.UOt,function(i){return EX(i,t)&&!PX(r,i)});a&&(n.lO(new MX(u,a)),r.push(a))}i.$L.tt(new xX(i,i.Rz,i.$L,n))},e=this.Br.HUt;if(0!==e.length){for(var s,u,o=null!=(s=Wn(e,function(t){return 0!==t.FOt.length&&0!==t.UOt.length}))?s:e[0],h=e.filter(function(t){return t!==o}),a=Ft(o.FOt);!(u=a()).done;)t=this,n();for(var c,f=Ft(o.UOt);!(c=f()).done;)i=this,r()}else UX.cLt(qY,"The HLSModel contains no variant streams.")},n.PGt=function(t){return jt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:if(this._kt)return[2];if(this.Fkt.rVt)return[3,5];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.Fkt.dVt(t)];case 2:return u.sent(),[3,4];case 3:throw pr(i=u.sent()),this.sx=!1,new md(gd.MANIFEST_LOAD_ERROR,"The provided HLS document could not be loaded - "+i.message,i);case 4:this.klt(),u.label=5;case 5:return[4,this.YXt()];case 6:return n=u.sent(),this.JXt(n),this.ZXt(n),r=this.$Xt(n.FOt),e=this.tjt(n.UOt),(s=this.ijt(n.VOt))||this.ejt(n.HOt),[4,this.oGt(r,e,s,{RGt:!0})];case 7:return u.sent(),this._kt=!0,[2]}})}).call(this)},n.ZXt=function(t){var i=this.hBt;if(i)for(var n,r=function(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){var e=i.value,s=xY(e);void 0!==s&&n.push({nit:s,rit:e.bs||"",Th:e.l})}return n}(t.HOt),e=Ft(r);!(n=e()).done;){var s=n.value;i.Mgt(s)}},n.YXt=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:if(this.sjt=this.Br.HUt,!this.sjt.length)throw new md(gd.MANIFEST_LOAD_ERROR,"LLHLSPlayer - Could not select initial variant stream: the HLS stream contains no variant streams.");return[4,this.njt(this.sjt)];case 1:if(0===(t=n.sent()).length)throw new md(gd.MANIFEST_LOAD_ERROR,"LLHLSPlayer - Could not select initial variant stream: the HLS stream contains no variant stream with a supported codec.");return[4,this.rjt(t)];case 2:return(i=n.sent()).length>0&&(t=i),UX.hB(qY,"Selecting initial active variant stream."),[2,OY(t,this.Mc.abr,this.Rz,this._dt.maximumBackoff)]}})}).call(this)},n.$Xt=function(t){if(this.hjt){var i=this.ojt(this.hjt);if(i)return i}return WY(t)},n.tjt=function(t){if(this.ajt){var i=this.ojt(this.ajt);if(i)return i}return WY(t)},n.ijt=function(t){for(var i,n=Ft(this.Gl.II);!(i=n()).done;){var r=i.value;r.Xk===$y.Kn&&(this.ujt=this.KXt.Bzt(r))}if(this.ujt){var e=this.ojt(this.ujt);if(e)return e}return HY(t)},n.ejt=function(t){var i=this.hBt;if(i){var n=HY(t);if(void 0!==n){var r=xY(n);i.Bgt(r).Xk=$y.Kn}}},n.GMt=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;if(!this.cjt(r))throw new p("LLHLSPlayer - Could not set an allowed variant stream that does not exists in the internal HLS model.")}this.sjt=t},n.cjt=function(t){var i=this.Br;return!!i&&Jn(i.HUt,t)},n.ojt=function(t){if(t&&this.LXt)return Wn(this.LXt.lLt,function(i){return i===t})},n.djt=function(){return jt(function(){var t,i,n,r;return zt(this,function(e){switch(e.label){case 0:return 0!==(i=null!=(t=this.sjt)?t:this.Br.HUt).length||this.sjt?1!==i.length||this.sjt?[4,this.njt(i)]:(UX.hB(qY,"The HLS stream contains only a single variant stream, skipping ABR selection."),[2,[]]):(UX.hB(qY,"The HLS stream does not contain any variant streams, skipping ABR selection."),[2,[]]);case 1:return 0===(n=e.sent()).length?(UX.cLt(qY,"No variant streams with supported codecs available to perform ABR selection on."),[2,[]]):0!==(r=LY(n,this._dt.maximumBackoff)).length?[3,3]:this.ljt?[2,[]]:(UX.cLt(qY,"No variant streams with online renditions available to perform ABR selection on."),this.fjt++,[4,this.vjt(n)]);case 2:return e.sent(),[2,[]];case 3:return[2,r]}})}).call(this)},n._jt=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return[4,this.yLt()];case 1:return void 0===(t=n.sent())?[2]:(i=!!this.LXt&&t.kWt.kW)&&(this.lDt={WMt:t,ift:Vi.Mg()});var s,u=Vi.Mg()-this.lDt.ift,o=null!=(s=null==(n=this.FXt)?void 0:n.IMt.vLt)?s:1/0;return i>=A.max(o-1,5)||u>1e3},n.pjt=function(t){return rr(t,function(t){return t.kW})},n.MXt=function(){return jt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:return this.lDt=void 0,[4,this.djt()];case 1:return 0===(t=r.sent()).length?[2]:[4,this.rjt(t)];case 2:return(i=r.sent()).length>0&&(t=i),void 0===(n=this.pjt(t))?[3,4]:[4,this.XMt(n,{jMt:!0})];case 3:r.sent(),this.oa.hq.RIt(n.kW),r.label=4;case 4:return[2]}})}).call(this)},n.vjt=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:i=this,this.ljt=!0,n=!1,r=Ft(t),o.label=1;case 1:if((e=r()).done)return[3,6];s=e.value,o.label=2;case 2:return o.trys.push([2,4,,5]),void 0===(u=this.FXt?Wn(s.UOt,function(t){return EX(t,i.FXt)}):void 0)?[3,5]:[4,this.wVt(u)];case 3:return o.sent(),u.IMt.jFt=-1/0,n=!0,[3,5];case 4:return o.sent(),[3,5];case 5:return[3,1];case 6:return n?(this.fjt=0,[4,this.oa.rXt()]):[3,8];case 7:return o.sent(),[3,10];case 8:return this.fjt>=this._dt.maxRetries?(this.oa.qq(new md(gd.MEDIA_LOAD_ERROR,"The provided video renditions could not be loaded.")),[2]):[4,Rr(A.min(this._dt.minimumBackoff*A.pow(2,this.fjt-1),this._dt.maximumBackoff))];case 9:o.sent(),o.label=10;case 10:return this.ljt=!1,[4,this._jt()];case 11:return o.sent(),[2]}})}).call(this)},n.njt=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=this,[4,hr(t,function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return 0===(r=[(null==(i=t.frt)?void 0:i.yCt)?'audio/mp4; codecs="'+t.frt.yCt+'"':void 0,(null==(n=t.frt)?void 0:n.bCt)?'video/mp4; codecs="'+t.frt.bCt+'"':void 0].filter(Fi)).length?[2,!0]:[4,this.kGt.QZ(r,this.Mc.useManagedMediaSource)];case 1:return[2,e.sent()]}})}).call(i)})];case 1:return(n=r.sent()).some(function(t){var i;return null==(i=t.frt)?void 0:i.bCt})&&(n=n.filter(function(t){return!t.frt||t.frt.bCt||0!==t.UOt.length})),n.some(function(t){var i;return null==(i=t.frt)?void 0:i.yCt})&&(n=n.filter(function(t){return!t.frt||t.frt.yCt||0!==t.FOt.length})),[2,n]}})}).call(this)},n.rjt=function(t){var i=this;return this.Fkt.oVt?hr(t,function(t){return function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Ft(t),s.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,[4,i(e)]);case 2:if(!s.sent())return[2,!1];s.label=3;case 3:return[3,1];case 4:return[2,!0]}})})()}([WY(t.FOt),WY(t.UOt),HY(t.VOt),HY(t.HOt)].filter(Fi),function(t){return i.mjt(t)})}):ot.resolve([])},n.mjt=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:if(0===t.IMt.ect.length)return[2,!1];if(!(i=t.IMt.ect[0]).nyt)return[2,!1];n=i.nyt,r=n.LAt?iG(n.LAt.Tn,n.LAt.V):void 0,e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.eut.Uct(n.zE,r)];case 2:return[2,e.sent()];case 3:return e.sent(),[2,!1];case 4:return[2]}})}).call(this)},n.sLt=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return this.LXt?(i=this.ojt(t),t&&!i?(UX.lt(qY,"Trying to set an invalid rendition as the active audio rendition."),[2]):this.OXt===i?[2]:(n=Fi(i)!==Fi(this.OXt),UX.hB(qY,"Switching audio rendition"),[4,this.oGt(i,this.FXt,this.UXt,{KMt:!0,jMt:n})])):(this.hjt=t,[2]);case 1:return r.sent(),[2]}})}).call(this)},n.rLt=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return this.LXt?(i=this.ojt(t),t&&!i?(UX.lt(qY,"Trying to set an invalid rendition as the active video rendition."),[2]):this.FXt===i?[2]:(n=Fi(i)!==Fi(this.FXt),UX.hB(qY,"Switching video rendition"),[4,this.oGt(this.OXt,i,this.UXt,{QMt:!0,jMt:n})])):(this.ajt=t,[2]);case 1:return r.sent(),[2]}})}).call(this)},n.Nzt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.LXt?(i=this.ojt(t),t&&!i?(UX.lt(qY,"Trying to set an invalid rendition as the active subtitle rendition."),[2]):(UX.hB(qY,"Switching subtitle rendition"),[4,this.oGt(this.OXt,this.FXt,i)])):(this.ujt=t,[2]);case 1:return n.sent(),[2]}})}).call(this)},n.wjt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.ljt?[2]:(n=0===this.$L.V,t.Km===eG.Bk||t.Km===eG.Dk&&n?[3,2]:[4,this.yjt(t,i)]);case 1:return r.sent(),[3,10];case 2:return this.sjt&&this.sjt.length<=1?t.Km!==eG.Bk||this.FXt===t?[3,4]:[4,this.oGt(this.OXt,t,this.UXt)]:[3,8];case 3:return r.sent(),[3,6];case 4:return t.Km===eG.Dk&&n&&this.OXt!==t?[4,this.oGt(t,this.FXt,this.UXt)]:[3,6];case 5:r.sent(),r.label=6;case 6:return[4,this.yjt(t,i)];case 7:return r.sent(),[3,10];case 8:return[4,this._jt()];case 9:r.sent(),r.label=10;case 10:return[2]}})}).call(this)},n.wVt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,5]),[4,this.Fkt.wVt(t,i)];case 1:return r.sent(),[3,5];case 2:return pr(n=r.sent()),Kl(n)||Jl(n)?[4,this.wjt(t,i)]:[3,4];case 3:r.sent(),r.label=4;case 4:throw n;case 5:return[2]}})}).call(this)},n.yjt=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:if(n=this,Jn(this.Ajt,t))return[2];this.Ajt.push(t),s.label=1;case 1:return s.trys.push([1,3,4,7]),r=t.Km===eG.OU||t.Km===eG.bLt?1/0:this._dt.maxRetries,[4,IT(function(){return n.retryOfflineRenditionsCallback(t,i)},i,r,this._dt.minimumBackoff,this._dt.maximumBackoff)];case 2:return s.sent(),[3,7];case 3:return e=s.sent(),this.oa.qq(new md(gd.MEDIA_LOAD_ERROR,e.message,e)),[3,7];case 4:return Yn(this.Ajt,t),t.IMt.jFt!==-1/0?[3,6]:[4,this.oa.rXt()];case 5:s.sent(),s.label=6;case 6:return[7];case 7:return[2]}})}).call(this)},n.UGt=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return n=this.OXt,r=this.FXt,(e=[]).push(this.bjt(r,t)),IX(n,r)||e.push(this.bjt(n,t)),s=this.UXt,(null==(i=this.Mc.hls)?void 0:i.delaySubtitlePreload)?[4,ot.all(e)]:[3,3];case 1:return o.sent(),[4,this.bjt(s,t)];case 2:return o.sent(),[3,5];case 3:return u=this.bjt(s,t),[4,ot.all([].concat(e,[u]))];case 4:o.sent(),o.label=5;case 5:return[2]}})}).call(this)},n.bjt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:if(!t)return[2];r.label=1;case 1:return r.trys.push([1,3,,6]),[4,this.Fkt.wVt(t,i)];case 2:return r.sent(),[3,6];case 3:return pr(n=r.sent()),Kl(n)||Jl(n)?[4,this.Sjt(t,i)]:[3,5];case 4:r.sent(),r.label=5;case 5:return[3,6];case 6:return[2]}})}).call(this)},n.Sjt=function(t,i){return jt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return this.ljt?[2]:(n=0===this.$L.V,t.Km===eG.Bk||t.Km===eG.Dk&&n?[3,2]:[4,this.yjt(t,i)]);case 1:return o.sent(),[3,7];case 2:return this.sjt&&this.sjt.length<=1?[4,this.yjt(t,i)]:[3,4];case 3:return o.sent(),[3,7];case 4:return[4,this.YXt()];case 5:return r=o.sent(),this.JXt(r),e=this.$Xt(r.FOt),s=this.tjt(r.UOt),u=this.ijt(r.VOt),[4,this.oGt(e,s,u)];case 6:o.sent(),o.label=7;case 7:return[2]}})}).call(this)},n.oGt=function(t,i,n,r){void 0===r&&(r={});var e={jMt:r.jMt||!1,KMt:r.KMt||!1,QMt:r.QMt||!1,Jx:r.Jx||!1,RGt:r.RGt||!1};return e.RGt||e.Jx||this.OXt!==t||this.FXt!==i||this.UXt!==n?void 0===t&&void 0===i?ot.reject(new p("Trying to buffer no media renditions.")):(this.OXt=t,this.FXt=i,this.UXt=n,this.hUt(),this.So(new SY),this.oa.oGt(e)):ot.resolve()},n.XMt=function(t,i){return jt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return n=this,this.oa.IGt?t?this.cjt(t)?t===this.LXt?(UX.hB(qY,"Trying to set the already active variant stream, ignoring."),[2]):(r=this.OXt?Wn(t.FOt,function(t){return EX(t,n.OXt)}):void 0,e=this.FXt?Wn(t.UOt,function(t){return EX(t,n.FXt)}):void 0,s=this.UXt?Wn(t.VOt,function(t){return EX(t,n.UXt)}):void 0,this.JXt(t),this.lDt=void 0,[4,this.oGt(r,e,s,i)]):(UX.lt(qY,"Trying to set an active variant stream that does not exists on the internal model."),[2]):(UX.lt(qY,"Cannot explicitly set the active variant stream to undefined."),[2]):(UX.lt(qY,"The LLHLSPlayer is not loaded."),[2]);case 1:return u.sent(),[2]}})}).call(this)},n.JXt=function(t){var i;if(UX.hB(qY,"Setting active variant stream."),this.LXt!==t){var n=(null==(i=this.LXt)?void 0:i.XLt)!==(null==t?void 0:t.XLt);if(this.LXt&&n)for(var r,e=Ft(this.LXt.VOt);!(r=e()).done;){var s=r.value;this.KXt.zOt(s)}if(this.LXt=t,this.So(new TY),t&&n)for(var u,o=Ft(t.VOt);!(u=o()).done;){var h=u.value;this.KXt.Czt(h)}}},n.Tjt=function(){this.kjt(this.YL),this.kjt(this.$L)},n.kjt=function(t){for(var i,n=[],r=Ft(t.II);!(i=r()).done;){for(var e,s=i.value,u=[],o=Ft(s.KI.II);!(e=o()).done;){var h=e.value;Jn(h.WMt.lLt,h.UMt)||u.push(h)}for(var a,c=Ft(u);!(a=c()).done;){var f=a.value;s.KI._S(f),f.kn()}0===s.KI.V&&n.push(s)}for(var v,d=Ft(n);!(v=d()).done;){var l=v.value;t.it(l),l.kn()}},n.KGt=function(t){return jt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:i=this,n={stack:[],error:void 0,hasError:!1},u.label=1;case 1:return u.trys.push([1,3,4,5]),r=Xt(n,dr.ep([t]),!1),e=[this.FXt,IX(this.OXt,this.FXt)?void 0:this.FXt,this.UXt].filter(Fi),[4,ot.all(e.filter(function(t){return!t.IMt.VFt}).map(function(t){return i.Fkt.yVt(t,r.Yg)}))];case 2:return u.sent(),[3,5];case 3:return s=u.sent(),n.error=s,n.hasError=!0,[3,5];case 4:return Gt(n),[7];case 5:return[2]}})}).call(this)},n.zGt=function(){return jt(function(){var t,i,n,r,e,s,u,o,h,a,c,f,v,d,l,g,w,m,y,p,_,k;return zt(this,function(b){switch(b.label){case 0:if(r=this.OXt,e=this.FXt,s=null==(t=this.LXt)?void 0:t.frt,u=[],void 0!==r){if(!(a=null!=(h=null==(o=r.frt)?void 0:o.yCt)?h:null==s?void 0:s.yCt))return[2,void 0];c='audio/mp4; codecs="'+a+'"',UX.hB(qY,"Configuring MediaSource for initial audio rendition with codec: "+c+"."),u.push(c)}if(void 0!==e){if(!(d=null!=(v=null==(f=e.frt)?void 0:f.bCt)?v:null==s?void 0:s.bCt))return[2,void 0];l='video/mp4; codecs="'+d+'"',UX.hB(qY,"Configuring MediaSource for initial video rendition with codec: "+l+"."),u.push(l)}return 0===u.length?(UX.cLt(qY,"No codecs found on the active variant stream."),[2,void 0]):(w=null!=(g=null==e||null==(i=e.IMt.ect[0])?void 0:i.MW)?g:[],y=null!=(m=null==r||null==(n=r.IMt.ect[0])?void 0:n.MW)?m:[],p=this.Mc,_=this.Br,[4,dG(p.contentProtection,u,[].concat(_.UUt,y,w),this.nV,p.useCredentials)]);case 1:return k=b.sent(),[2,{Km:Op.wV,L4:u.map(function(t){return{qT:t}}),aq:k,X4:p.useManagedMediaSource}]}})}).call(this)},n.XGt=function(t,i,n,r,e){var s,u,o=this.OXt,h=this.FXt,a=t&&IX(o,h);if(i&&h)if(this.WXt)(n||e||a&&r)&&(this.WXt.Zg(),this.WXt.ezt.Gy()),this.WXt.UMt!==h&&this.WXt.oWt(h);else{var c=a?[cw.Bk,cw.Dk]:[cw.Bk];this.WXt=this.Pjt(h,c)}else null==(s=this.WXt)||s.zg(),this.WXt=void 0;t&&o&&!a?this.HXt?((n||r)&&(this.HXt.Zg(),this.HXt.ezt.Gy()),this.HXt.UMt!==o&&this.HXt.oWt(o)):this.HXt=this.xjt(o):(null==(u=this.HXt)||u.zg(),this.HXt=void 0)},n.jGt=function(t){var i=this.UXt;this.Ejt&&(this.Ejt.UMt===i?t&&(this.Ejt.Zg(),this.Ejt.ezt.Gy()):(this.Ejt.zg(),this.Ejt=void 0));if(!this.Ejt&&i&&(this.Ejt=this.Ijt(i)),i){var n=this.KXt.Lzt(i);n.Xk=$y.Kn,this.rzt(n)}},n.Pjt=function(t,i){var n=function(t,i,n,r,e,s,u,o,h,a,c){var f=n.Br.mM,v=new aY(f),d=new sY(cw.Bk,t,n,v,r,e,s,c),l=u.YSt(v,f,i);return new AY(d,v,l,o,h,a)}(t,i,this.Fkt,this.nV,this.eut,this.mHt,this.bGt,this.wpt,this.hBt,this.Rz,this.Mc.useCredentials);return n.$qt.wn(eY.iWt,this.Rjt),n.$qt.wn(eY.eWt,this.Cjt),n.tzt.wn(wY.bqt,this.Djt),n.tzt.wn(wY.Tqt,this.Bjt),n.tzt.wn(wY.kqt,this.Njt),n.tzt.wn(wY.Sqt,this.Mjt),n},n.xjt=function(t){var i=function(t,i,n,r,e,s,u,o,h){var a=i.Br.mM,c=new aY(a),f=new sY(cw.Dk,t,i,c,n,r,e,h),v=s.YSt(c,a,[cw.Dk]);return new AY(f,c,v,u,void 0,o)}(t,this.Fkt,this.nV,this.eut,this.mHt,this.bGt,this.wpt,this.Rz,this.Mc.useCredentials);return i.$qt.wn(eY.eWt,this.Cjt),i.tzt.wn(wY.bqt,this.Djt),i.tzt.wn(wY.Sqt,this.Mjt),i},n.Ijt=function(t){return function(t,i,n,r,e,s){var u=i.Br.mM,o=new aY(u),h=new sY(cw.NT,t,i,o,n,r,e,s),a=new _Y(o,u,cw.NT);return new AY(h,o,a)}(t,this.Fkt,this.nV,this.eut,this.mHt,this.Mc.useCredentials)},n.izt=function(t,i){if(t?this.P4&&this.P4.Tzt(t,this.zU)||(this.P4=new PY(cw.Dk,t,this.zU)):this.P4=void 0,i?this.x4&&this.x4.Tzt(i,this.zU)||(this.x4=new PY(cw.Bk,i,this.zU)):this.x4=void 0,void 0!==this.WXt){var n=void 0!==t&&void 0===this.HXt,r=[this.x4,n?this.P4:void 0].filter(Fi);this.WXt.izt(r)}if(void 0!==this.HXt){var e=this.P4?[this.P4]:[];this.HXt.izt(e)}},n.rzt=function(t){t?this.Ljt&&this.Ljt.Tzt(t)||(this.Ljt=new DY(t,this.Br.mM)):this.Ljt=void 0,void 0!==this.Ejt&&void 0!==this.Ljt&&this.Ejt.rzt(this.Ljt)},n.vGt=function(t){if(this.JU!==t){this.JU=t;for(var i,n=Ft(this.jXt);!(i=n()).done;){i.value.YU(t)}var r=this.UXt;if(void 0!==r){var e=this.KXt.Lzt(r);this.rzt(e)}}},n.QGt=function(t,i){var n=[];t&&n.push(cw.Dk),i&&n.push(cw.Bk),this.Br.mM.OUt(n)},n.Ojt=function(){if(void 0===this.WXt)return!1;var t=Vi.Mg();if(!this.WXt.$qt.nqt(t))return!1;var i=this.WXt.$qt.tqt();if(void 0===i||void 0===i.$at.ct)return!1;var n=this.MP,r=this.oa.ux,e=this.WXt.hzt.JM(n);return!((void 0!==e?e.An(0)-n:0)>=2*i.$at.ct*r)&&(i.iqt>0&&0===i.eqt?i.sqt>1e3*i.$at.ct*.8:8*i.eqt/this.Rz.kY.kW>=1.8*i.$at.ct)},n.Fjt=function(){return jt(function(){var t,i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,this.yLt()];case 1:return void 0===(i=o.sent())||void 0===(n=null==(t=this.WXt)?void 0:t.$qt.tqt())?[2]:(r=this.LXt,n.eqt>0&&(e=A.max(0,n.eqt-n.iqt),s=n.eqt*(i.kW/r.kW),e<=s)?[2]:(u=i.kW0&&n.every(function(t){return function(t){return t.IMt.ect.length>0&&!t.IMt.POt}(t)})?1/0:NaN}},{key:"ct",get:function(){var t;return null!=(t=this.$Gt)?t:this.zXt}},{key:"tGt",get:function(){var t;return null!=(t=this.qXt)?t:this.zXt}},{key:"Ozt",get:function(){var t=this.Uzt;if(0!==t.length&&this.ct===1/0){for(var i,n,r=Ft(t);!(n=r()).done;){var e=n.value,s=e.IMt.Sx;if(0!==s.V){var u=s.An(s.V-1)+e.IMt.cSt,o=e.IMt.zFt,h=u+(null!=o?o:0);(!i||it}V(),It(),Wt(),Yt();var JY=function(){function t(){}var i=t.prototype;return i.Xq=function(t,i){return!!iT(t.type)&&!t.useNativePlayback},i.jq=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return t.aes128?[2,!0]:[4,V_(t,!0)];case 1:return[2,i.sent()]}})})()},t}();V(),It(),V(),It(),Wt(),Yt();var ZY=function(){function t(){}var i=t.prototype;return i.gHt=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,crypto.subtle.importKey("raw",i,{name:"AES-CBC"},!1,["decrypt"])];case 1:return r=s.sent(),[4,crypto.subtle.decrypt({name:"AES-CBC",iv:n},r,t)];case 2:return e=s.sent(),[2,new I(e)];case 3:throw s.sent(),new md(gd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error during AES128 decrypt.");case 4:return[2]}})})()},i.zg=function(){},t.LS=function(){return"undefined"!=typeof crypto&&void 0!==crypto.subtle&&void 0!==crypto.subtle.decrypt},t}();V(),It(),V(),It(),Wt(),Yt(),V(),It(),Bt(),Nt(),H(),Ut(),V(),It(),Nt();var t$=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).data=void 0,r.data=n,r}return Pt(i,t),i}(ah),i$=["message","messageerror","error"];V(),It(),Nt();var n$=function(t){function i(i){var n;return(n=t.call(this,Jy.ma)||this).error=void 0,n.error=i,n}return Pt(i,t),i}(ah),r$=function(t){function i(i){var n;return(n=t.call(this)||this).zjt=void 0,n.Wjt=void 0,n.Gjt=[],n.Qjt=function(t){if(n.Hjt)t.jjt();else{n.zjt=t,n.zjt.wn(i$,n.Rs);for(var i,r=Ft(n.Gjt);!(i=r()).done;){var e=i.value;t.qjt(e.Py,e.Xjt)}tr(n.Gjt)}},n.Kjt=function(t){if(!n.Hjt){var i=j(t,p)?t:new p("Could not create Worker.");n.So(new n$(i)),n.jjt()}},n.Wjt=new dr,i(n.Wjt.Yg).then(n.Qjt,n.Kjt),n}Pt(i,t);var n=i.prototype;return n.qjt=function(t,i){this.Hjt||(void 0!==this.zjt?this.zjt.qjt(t,i):this.Gjt.push({Py:t,Xjt:i}))},n.jjt=function(){this.Hjt||(this.Wjt.Zg(),tr(this.Gjt),void 0!==this.zjt&&this.zjt.jjt())},xt(i,[{key:"Hjt",get:function(){return this.Wjt.Yg.Hg}}]),i}(uh);V(),It(),V(),It(),Nt(),H();var e$=function(t){function i(i,n){var r;return(r=t.call(this)||this).zjt=void 0,r.Yjt=function(t){r.So(new t$("message",t.data))},r.Jjt=function(t){r.So(new t$("messageerror",t.data))},r.w9=function(t){null==t.preventDefault||t.preventDefault.call(t);var i=j(t.error,p)?t.error:new p(t.message);r.So(new n$(i)),r.jjt()},r.zjt=new R(i,n),r.zjt.addEventListener("message",r.Yjt),r.zjt.addEventListener("messageerror",r.Jjt),r.zjt.addEventListener("error",r.w9),r}Pt(i,t);var n=i.prototype;return n.qjt=function(t,i){i?this.zjt.postMessage(t,i):this.zjt.postMessage(t)},n.jjt=function(){this.Vo(),this.zjt.removeEventListener("message",this.Yjt),this.zjt.removeEventListener("messageerror",this.Jjt),this.zjt.removeEventListener("error",this.w9),this.zjt.terminate()},i}(uh);V(),It(),Nt();var s$=0,u$=function(t){function i(i,n){var r;(r=t.call(this)||this).hS=void 0,r.iQt=void 0,r.Zjt=void 0,r.eQt=void 0,r.$jt=function(){r.Zjt.removeEventListener("load",r.$jt),r.Zjt.contentWindow.postMessage({type:"initialize",id:r.hS,script:r.iQt},"*")},r.tQt=function(t){t.origin===r.eQt&&t.data.id===r.hS&&("initialized"===t.data.type||("error"===t.data.type?(r.So(new n$(new p(t.data.data.message))),r.jjt()):r.So(new t$("message",t.data.data))))},r.hS=s$++,r.iQt=i;var e=Vi.Dh("iframe.html",n);return r.Zjt=function(t){var i=v.createElement("iframe");return i.width="0",i.height="0",i.style.display="none",i.role="",i.src=t,v.body.appendChild(i),i}(e.href),r.eQt=e.origin,r.Zjt.addEventListener("load",r.$jt),self.addEventListener("message",r.tQt),r}Pt(i,t);var n=i.prototype;return n.qjt=function(t,i){i?this.Zjt.contentWindow.postMessage({type:"message",data:t},"*",i):this.Zjt.contentWindow.postMessage({type:"message",data:t},"*")},n.jjt=function(){var t;this.Zjt.removeEventListener("load",this.$jt),self.removeEventListener("message",this.tQt),null==(t=this.Zjt.contentWindow)||t.postMessage({type:"terminate"},"*"),Zi(this.Zjt)},i}(uh);function o$(t,i,n){var r=Vi.xm(t,i);return new r$(function(t){return function(t,i,n,r){return jt(function(){var e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,a$(e=new e$(t,n),r)];case 1:return f.sent(),[2,e];case 2:return s=f.sent(),null==e||e.jjt(),pr(s),[3,3];case 3:if(!h$||!Ud)return[3,13];f.label=4;case 4:return f.trys.push([4,7,,8]),[4,Vi.SP.lk({Yu:t,Uk:kl.GET,dk:Hd.NT,Yg:r})];case 5:return[4,f.sent().UT(r)];case 6:return u=f.sent(),[3,8];case 7:return pr(f.sent()),[3,8];case 8:if(!u)return[3,13];f.label=9;case 9:return f.trys.push([9,11,12,13]),h=Ud([u],{type:"application/javascript"}),o=URL.createObjectURL(h),[4,a$(e=new e$(o,n),r)];case 10:return f.sent(),[2,e];case 11:return a=f.sent(),null==e||e.jjt(),pr(a),h$=!1,[3,13];case 12:return o&&URL.revokeObjectURL(o),[7];case 13:return f.trys.push([13,15,,16]),[4,a$(e=new u$(t,i),r)];case 14:return f.sent(),[2,e];case 15:throw c=f.sent(),null==e||e.jjt(),c;case 16:return[2]}})})()}(r,i,n,t)})}var h$=!0;function a$(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,t.ww(["message","error"],i)];case 1:if("error"===(n=r.sent()).type)throw function(t){return new md(gd.CONFIGURATION_ERROR,"THEOplayer workers could not be loaded. Please check the configuration of the libraryLocation.",t)}(n.error);if(!function(t){return zi(t)&&"10.0.0"===t.sQt}(n.data))throw new md(gd.CONFIGURATION_ERROR,"THEOplayer workers could not be loaded. Please check that the worker's version matches THEOplayer's version (10.0.0).");return[2,n]}})})()}V(),It();var c$=function(t){return t.nQt="gHt",t.rQt="WHt",t}({}),f$=function(t){return t.hQt="oQt",t.aQt="uQt",t}({}),v$=function(){function t(t){var i=this;this.lQt=void 0,this.dQt=void 0,this.zjt=void 0,this._Qt=0,this.AQt=ro(),this.fQt=function(t){var n=t.data,r=n.bQt,e=i.AQt.get(r);if(e)if(i.AQt.delete(r),n.SQt===f$.hQt)e.Xy(n.TQt);else if(n.SQt===f$.aQt){var s=n.kQt,u=n.EQt?new p(n.EQt):void 0,o=new md(gd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error during AES128 decrypt. (code: "+s+")",u);e.jy(o)}},this.vQt=function(t){var n=new md(gd.CONTENT_PROTECTION_INTERNAL_ERROR,t.error.message,t.error);i.zg(n)},this.lQt=t;try{this.dQt=Vi.xm("theoplayer.d.js",t)}catch(t){throw new md(gd.CONFIGURATION_ERROR,"Invalid player configuration: missing libraryLocation",t)}}var i=t.prototype;return i.cQt=function(){var t=o$(this.dQt,this.lQt,{name:"THEOplayer decrypt worker"});return t.wn("message",this.fQt),t.wn("error",this.vQt),t},i.gHt=function(t,i,n){var r=""+ ++this._Qt,e={gQt:c$.nQt,pQt:r,mQt:t,wQt:i,yQt:n},s=new Xa;return this.AQt.set(r,s),null!=this.zjt||(this.zjt=this.cQt()),this.zjt.qjt(e),s.Qy},i.zg=function(t){void 0===t&&(t=new wr),this.AQt.forEach(function(i){return i.jy(t)}),this.AQt.clear(),this.zjt&&(this.zjt.jjt(),this.zjt=void 0)},t}();function d$(t){var i=Wn(t.boxes,wC);if(i){var n=Wn(i.boxes,mC);if(n)return n.handlerType}}function l$(t){var i,n=new kv;return(i=n.boxes).push.apply(i,[].concat(t.boxes)),n}function g$(t){var i,n=new Bf;return(i=n.boxes).push.apply(i,[].concat(t.boxes)),n}V(),It(),Nt(),V(),It(),Wt(),Nt(),Ut(),Yt(),V(),It(),Wt(),Nt(),Ut(),Yt(),V(),It(),H();var w$=8;function m$(t,i){for(var n=function(t){var i,n=new Xf;return(i=n.boxes).push.apply(i,[].concat(t.boxes)),n}(t),r=p$(i),e=0;e=0){var h=u.boxes[o],a=g$(u);a.boxes[o]=new uf(new I(h.getSize()-w$)),n.boxes[e]=a}}}return n}function y$(t,i){for(var n=function(t){var i,n=new sv;return(i=n.boxes).push.apply(i,[].concat(t.boxes)),n}(t),r=0;r0){var f=c.samples;if(!c.flags.sampleDurationPresent){c.flags.sampleDurationPresent=!0;for(var v,d=null!=r?r:s.defaultSampleDuration,l=Ft(f);!(v=l()).done;){v.value.duration=d}}f[0].duration+=o.toNumber(),c.samples=f}}}V(),It(),H(),Ut();var k$="Mp4Transmuxer",b$=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).j2=void 0,i.PQt=void 0,i.CQt=void 0,i.DQt=void 0,i.RQt=void 0,i}Pt(i,t);var n=i.prototype;return n.Vqt=function(t,i){yr(i);var n=t.UMt,r=KC(Aa(t.bOt.ck.ck));if(!r)throw new p("Mp4Transmuxer - Unable to parse "+n.Km+" MP4 initializer.");this.j2=r;var e=function(t){for(var i,n,r,e=Ft(t.Z);!(r=e()).done;){var s=r.value;i||(i=s.T1),n||(n=s.S1)}if(i||n)return{yCt:i,bCt:n,ULt:void 0};return}(r);e&&this.zqt(n,e);var s=function(t){for(var i,n=Ft(t.Z);!(i=n()).done;){var r=i.value;if(void 0!==r.E1)return r.E1}return}(r);void 0!==s&&this.Gqt(n,s);var u=function(t){var i,n,r,e,s,u=Iv(t),o=Wn(u.boxes,dC),h=o.boxes.filter(lC),a=Wn(h,function(t){return d$(t)===wf.AUDIO}),c=Wn(h,function(t){return d$(t)===wf.VIDEO}),f={yCt:{$D:a?p$(a):void 0},bCt:{$D:c?p$(c):void 0}},v=null==(i=Wn(o.boxes,yC))?void 0:i.boxes.filter(pC),d=v?{yCt:null!=(n=Wn(v,function(t){return t.trackId===f.yCt.$D}))?n:void 0,bCt:null!=(r=Wn(v,function(t){return t.trackId===f.bCt.$D}))?r:void 0}:void 0;if(d&&(f.yCt.NN=null==(e=d.yCt)?void 0:e.defaultSampleDuration,f.bCt.NN=null==(s=d.bCt)?void 0:s.defaultSampleDuration),!a||!c)return{yCt:a?t:void 0,bCt:c?t:void 0,DU:f};var l=l$(u),g=l$(u),w=u.boxes.indexOf(o);l.boxes[w]=m$(o,c),g.boxes[w]=m$(o,a);var m=l.serialize().join(),y=g.serialize().join();return{yCt:m,bCt:y,DU:f}}(t.bOt.ck.ck);if(this.PQt=u.DU,u.bCt){var o=Wn(r.Z,function(t){return t.$D===u.DU.bCt.$D}),h={Km:"FRt",ck:{Km:JR.vZ,ck:u.bCt},Lot:cw.Bk,kOt:t.kOt,Yqt:{frt:'video/mp4; codecs="'+o.S1+'"',MW:t.MW},EO:t.EO,UMt:t.UMt,hHt:t.bOt.hHt};this.fqt(h)}if(u.yCt){var a=Wn(r.Z,function(t){return t.$D===u.DU.yCt.$D}),c={Km:"FRt",ck:{Km:JR.vZ,ck:u.yCt},Lot:cw.Dk,kOt:t.kOt,Yqt:{frt:'audio/mp4; codecs="'+a.T1+'"',MW:t.MW},EO:t.EO,UMt:t.UMt,hHt:t.bOt.hHt};this.fqt(c)}return ot.resolve()},n.Wqt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f,v,d,l,g,w,m,y,p,_,k,b,A,T;return zt(this,function(S){switch(S.label){case 0:if(yr(i),n=t.$at.hHt,UX.hB(k$,"Transmuxing fMP4: "+hG(n.nyt)),r=t.$at.ck,e=A$(r.ck,this.j2),void 0!==(s=sr(e.map(function(t){return t.Pet}),Em))&&(n.xet=s,this.jqt(t.UMt)),this.qUt.gUt(t.kOt))return[3,2];if(u=Sm.eU(n.EO),e.length>0){for(o=sr(e.map(function(t){return t.xQt}),Em),h=Ft(this.Bqt);!(a=h()).done;)c=a.value,this.qUt.PUt(t.kOt,c,o,u,T$(n),!1);this.jqt(t.UMt)}return this.qUt.gUt(t.kOt)?[3,2]:[4,kr(this.qUt.mUt(t.kOt),i)];case 1:S.sent(),S.label=2;case 2:return f=this.qUt.TUt(t.kOt),v=n.xet?this.qUt.kUt(n.xet,n).iF():n.EO,d=yY(n,v),l=pY(n,d),w={lHt:d,fHt:l,EO:v,ct:null!=(g=n.ct)?g:0,bU:f.iF(),kOt:t.kOt,UMt:t.UMt,hHt:t.$at.hHt},m=function(t,i){if(void 0===i.yCt.$D)return{yCt:void 0,bCt:t};if(void 0===i.bCt.$D)return{yCt:t,bCt:void 0};for(var n=Iv(t),r=l$(n),e=l$(n),s=0;sa&&(a=y)}var p=Sm.gF(t.GN.GN,u.qD);e.push({$D:s,xQt:p,Pet:p.lO(Sm.pF(h,u.qD)),NQt:p.lO(Sm.pF(o,u.qD)),BQt:p.lO(Sm.pF(a,u.qD))})},e=[],s=Ft(t.Z);!(n=s()).done;)r();return e}(n,i)}function T$(t){return vQ(t)?t.AOt:0===t.eFt&&t.tFt.AOt}var S$="MpegtsTransmuxer",E$=function(t){function i(i,n,r,e){var s;return(s=t.call(this,n,r,e)||this).pE=void 0,s.HQt=void 0,s.qQt=void 0,s.GQt=void 0,s.jQt=void 0,s.zQt=-1,s.XQt=-1,s.FQt=void 0,s.UQt=eo(),s.pE=i,s}Pt(i,t);var n=i.prototype;return n.Vqt=function(i,n){return t.prototype.Vqt.call(this,i,n)},n.Oqt=function(i,n){if(t.prototype.Oqt.call(this,i,n),!this.pE.MQt()){var r,e=null!=(r=null==n?void 0:n.nyt)?r:i.nyt;if(e)/\.(ts|aac|mp3)/i.test(e.zE)&&this.pE.LQt()}},n.OQt=function(t){var i;return t.UMt===this.FQt&&this.UQt.has(t.kOt)?i=this.UQt.get(t.kOt):(i=MQ(t.$at.ck.ck),this.FQt=t.UMt,this.UQt.set(t.kOt,i)),i},n.Wqt=function(i,n){var r=this;return jt(function(){var e,s,u,o,h,a,c,f,v,d,l,g,w,m,y,p,_,k,b,A,T,S,E,I,R,C,P,N,D,x,B,O,M;return zt(this,function(L){switch(L.label){case 0:if(yr(n),e=this.OQt(i),s=i.$at,e!==OQ.WVt&&e!==OQ.qVt)return[2,t.prototype.Wqt.call(r,i,n)];if(s.hHt.MW.some(R$))throw new md(gd.CONTENT_PROTECTION_NOT_SUPPORTED,"SAMPLE-AES encryption is not supported for MPEG-TS or Packed Audio segments");return u=this.pE.LQt(),e!==OQ.WVt?[3,2]:(UX.hB(S$,"Transmuxing MPEG-TS: "+hG(s.hHt.nyt)),[4,u.VQt({data:s.ck.ck,metadata:this.HQt})]);case 1:return o=L.sent(),[3,4];case 2:return UX.hB(S$,"Transmuxing raw audio: "+hG(s.hHt.nyt)),[4,u.WQt({data:s.ck.ck,metadata:this.HQt})];case 3:o=L.sent(),L.label=4;case 4:if(yr(n),this.zqt(i.UMt,{yCt:o.metadata.audio_codec,bCt:o.metadata.video_codec,ULt:void 0}),o.metadata.video_frame_rate&&this.Gqt(i.UMt,o.metadata.video_frame_rate),h=C$(o.metadata.first_decode_timestamp),a=C$(o.metadata.first_presentation_timestamp),c=void 0!==o.metadata.first_video_presentation_timestamp?C$(o.metadata.first_video_presentation_timestamp):void 0,s.hHt.xet=a,this.jqt(i.UMt),void 0!==c&&this.Xqt(i.UMt,s.hHt,function(t,i){var n=t.lF(i);return n.aF(Sm.wF)&&(n=n.lO(Cm())),n}(c,a)),this.qUt.gUt(i.kOt))return[3,6];for(f=Sm.eU(s.hHt.EO),v=Ft(this.Bqt);!(d=v()).done;)l=d.value,this.qUt.PUt(i.kOt,l,h,f,T$(s.hHt),!0);return this.jqt(i.UMt),this.qUt.gUt(i.kOt)?[3,6]:[4,kr(this.qUt.mUt(i.kOt),n)];case 5:L.sent(),L.label=6;case 6:if(g=this.qUt.EUt(h,s.hHt),this.HQt=o.metadata,w=this.qUt.kUt(a,s.hHt).iF(),m=yY(s.hHt,w),y=pY(s.hHt,m),_={lHt:m,fHt:y,EO:w,ct:null!=(p=s.hHt.ct)?p:0,bU:g.iF(),kOt:i.kOt,UMt:i.UMt,hHt:s.hHt},void 0===o.data.audio_media&&void 0===o.data.video_media){for(k=Ft(this.Bqt);!(b=k()).done;)A=b.value,T=io({Km:"$at",ck:void 0,Lot:A},_),this.fqt(T);return[2]}return S=[],void 0!==o.data.audio_media?(!o.data.audio_init||this.qQt&&this.zQt===i.kOt&&Ma(this.qQt,o.data.audio_init)||(E=this.qUt.kUt(s.hHt.xet,s.hHt).iF(),I={Km:"FRt",ck:{Km:JR.vZ,ck:o.data.audio_init},Lot:cw.Dk,kOt:i.kOt,Yqt:{frt:'audio/mp4; codecs="'+o.metadata.audio_codec+'"',MW:s.hHt.MW},EO:E,UMt:i.UMt,hHt:s.hHt},this.qQt=o.data.audio_init,this.zQt=i.kOt,this.fqt(I)),R=io({Km:"$at",ck:{Km:JR.vZ,ck:o.data.audio_media},Lot:cw.Dk},_),this.fqt(R)):i.$at.hHt.ZOt&&Jn(this.Bqt,cw.Dk)&&(C=io({Km:"$at",ck:void 0,Lot:cw.Dk},_),this.fqt(C)),void 0!==o.data.video_media?(!o.data.video_init||this.GQt&&this.XQt===i.kOt&&Ma(this.GQt,o.data.video_init)||(P=this.qUt.kUt(s.hHt.xet,s.hHt).iF(),N={Km:"FRt",ck:{Km:JR.vZ,ck:o.data.video_init},Lot:cw.Bk,kOt:i.kOt,Yqt:{frt:'video/mp4; codecs="'+o.metadata.video_codec+'"',MW:s.hHt.MW},EO:P,UMt:i.UMt,hHt:s.hHt},this.GQt=o.data.video_init,this.XQt=i.kOt,this.jQt=KC(Aa(o.data.video_init)),this.fqt(N)),D=this.jQt.Z[0],x=A$(o.data.video_media,this.jQt)[0],B=this.IQt(o.data.video_media,D,x,void 0,s.hHt),this.RQt=D,O=io({Km:"$at",ck:{Km:JR.vZ,ck:B},Lot:cw.Bk},_),this.fqt(O),S.push(x)):i.$at.hHt.ZOt&&Jn(this.Bqt,cw.Bk)&&(M=io({Km:"$at",ck:void 0,Lot:cw.Bk},_),this.fqt(M)),this.CQt=s.hHt,this.DQt=S,[2]}})}).call(this)},n.Zg=function(){this.qQt=void 0,this.GQt=void 0,this.zQt=-1,this.XQt=-1,t.prototype.Zg.call(this)},i}(b$),I$=function(){function t(){}return t.prototype.YSt=function(t,i,n){return new E$(this,t,i,n)},t}();function R$(t){return t.Uk===uG.ELt}function C$(t){return Sm.gF(fe.fromBits(t.low,t.high),t.base)}V(),It(),V(),It();var P$=function(t){return t[t.MPEGTS_TO_FMP4=0]="MPEGTS_TO_FMP4",t[t.RAW_AUDIO_TO_FMP4=1]="RAW_AUDIO_TO_FMP4",t}({}),N$=function(){var t=function(){if("undefined"==typeof WebAssembly)return!1;var t=Oi.d_;if(t>0&&t<=56)return!1;try{return void 0!==new WebAssembly.Module(Th("AGFzbQEAAAA="))}catch(t){return!1}}();return N$=function(){return t},t};var D$=function(){function t(t){var i=this;this.lQt=void 0,this.dQt=void 0,this.zjt=void 0,this._Qt=0,this.AQt=eo(),this.fQt=function(t){var n=t.data;if(void 0!==n.requestId){var r=i.AQt.get(n.requestId);if(!r)return;i.AQt.delete(n.requestId),n.success?r.Xy(n.output):r.jy(new md(n.errorCode,n.error))}else n.success||i.zg(new md(n.errorCode,n.error))},this.vQt=function(t){var n=new md(gd.MEDIA_DECODE_ERROR,t.error.message,t.error);i.zg(n)},this.lQt=t;var n=N$()?"THEOplayer.transmux.js":"THEOplayer.transmux.asmjs.js";try{this.dQt=Vi.xm(n,t)}catch(t){throw new md(gd.CONFIGURATION_ERROR,"Invalid player configuration: missing libraryLocation",t)}this.zjt=this.cQt()}var i=t.prototype;return i.VQt=function(t){return this.QQt(P$.MPEGTS_TO_FMP4,t)},i.WQt=function(t){return this.QQt(P$.RAW_AUDIO_TO_FMP4,t)},i.cQt=function(){var t=o$(this.dQt,this.lQt,{name:"THEOplayer transmux worker"});return t.wn("message",this.fQt),t.wn("error",this.vQt),t},i.QQt=function(t,i){var n=++this._Qt,r={type:t,id:n,input:i},e=new Xa;return this.AQt.set(n,e),this.zjt.qjt(r),e.Qy},i.zg=function(t){void 0===t&&(t=new wr),this.AQt.forEach(function(i){return i.jy(t)}),this.AQt.clear(),this.zjt.jjt()},t}(),x$=function(t){function i(i){var n;return(n=t.call(this)||this).KQt=void 0,n.zjt=void 0,n.KQt=i,n.zjt=void 0,n}Pt(i,t);var n=i.prototype;return n.MQt=function(){return void 0!==this.zjt},n.LQt=function(){var t;return null!=(t=this.zjt)?t:this.zjt=new D$(this.KQt)},n.zg=function(){this.zjt&&(this.zjt.zg(),this.zjt=void 0)},i}(I$),B$=function(){function t(t){this.KQt=void 0,this.KQt=t}return t.prototype.Ret=function(){return new x$(this.KQt)},t}(),O$=function(t){function i(i,n,r,e,s){var u,o=function(t){return ZY.LS()?new ZY:new v$(t)}(s.libraryLocation),h=new B$(s.libraryLocation),a=new DH(GH.Ng.lPt,GH.Ng.dPt,GH.Ng.ect,GH.Ng.vPt);return(u=t.call(this,i,n,r,e,o,h,a,s)||this).CPt=void 0,Oi.X_&&(u.CPt=new YO(u)),u}Pt(i,t);var n=i.prototype;return n.Wx=function(){return this.TL.Wx()},n.kn=function(){var i=this;return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return r.sent(),null==(n=this.CPt)||n.kn(),[2]}})}).call(this)},xt(i,[{key:"Vx",get:function(){return this.TL.Vx},set:function(t){this.TL.Vx=t}}]),i}(YY),M$=function(t){function i(i,n,r,e,s){var u,o=new QO(i),h=o.Gq(cw.Bk);return(u=t.call(this,h,n,r,e,s)||this).xq=void 0,u.xq=o,u}return Pt(i,t),i.prototype.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.xq.Pq(this.TL)];case 2:return n.sent(),[2]}})}).call(this)},i}(O$),L$=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.Xq=function(i,n){return!!Me(i.useManagedMediaSource)&&(!(!i.useManagedMediaSource&&(Oi.ru||Oi.Tg))&&t.prototype.Xq.call(this,i,n))},n.jq=function(i){var n=this;return jt(function(){return zt(this,function(r){return i.clearkey&&!i.fairplay&&Oi.X_?[2,!1]:[2,t.prototype.jq.call(n,i)]})})()},i}(JY),F$=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Kq=Nb.dR,i}Pt(i,t);var n=i.prototype;return n.PR=function(t,i,n,r,e,s,u){return new M$(i,n,e,s,r)},n.Qq=function(){return!0},i}(L$);iS(new F$),UX.Rt=function(){var t;return Boolean(null==(t=f)?void 0:t.THEOplayerDebugLogsEnabled)},V(),It(),V(),It(),Wt(),Nt(),Yt(),V(),It(),Wt(),Nt(),Yt(),V(),It();var U$=function(){function t(){}var i=t.prototype;return i.Uct=function(t,i){return ot.resolve(!1)},i.iut=function(t,i){return ot.resolve(void 0)},i.HSt=function(t){return ot.resolve(void 0)},i.WJ=function(t){return ot.resolve(void 0)},t}(),V$=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).Ac=void 0,e.Fkt=void 0,e.JQt=void 0,e.nKt=void 0,e.j6=void 0,e.$Qt=void 0,e.nT=new dr,e.Ac=i,e.Fkt=new EQ(r,new U$,i.useCredentials,i.src,i.liveOffset),e.Fkt.wn(ch.qw,e.Rs),e.j6=!1,e}Pt(i,t);var n=i.prototype;return n.YQt=function(){var t;return null==(t=this.JQt)?void 0:t.IMt},n.Tn=function(){var t=this;Er(IT(function(){return t.ZQt(t.nT.Yg)},this.nT.Yg))},n.ZQt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.Fkt.dVt(t)];case 1:return i.sent(),this.$Qt&&(this.tKt(this.$Qt.Ti,this.$Qt.Mi),this.$Qt=void 0),this.j6=!0,[2]}})}).call(this)},n.iKt=function(t,i){this.j6?this.tKt(t,i):this.$Qt={Ti:t,Mi:i}},n.tKt=function(t,i){var n=this.eKt(t,i),r=null==n?void 0:n.UOt[0];r!==this.JQt&&(this.sKt(),void 0!==r&&(this.JQt=r,this.nKt=new HQ(this.Fkt,r),this.nKt.PHt()))},n.sKt=function(){this.JQt=void 0,this.nKt&&(this.nKt.zg(),this.nKt=void 0)},n.eKt=function(t,i){var n=Wn(this.Fkt.Br.HUt,function(n){return void 0!==n.uCt&&n.uCt.Ti===t&&n.uCt.Mi===i});return null!=n?n:this.Fkt.Br.HUt[0]},n.kn=function(){this.Vo(),this.nT.Zg(),this.nT.zg(),this.sKt(),this.Fkt.zg()},i}(uh);V(),It(),Bt(),Nt(),Ut();var j$=function(t){function i(i){var n;(n=t.call(this)||this).B8=void 0,n.B8=i;for(var r,e=Ft(sS);!(r=e()).done;){var s=r.value;n.B8.wn(s,n.Rs)}return n}Pt(i,t);var n=i.prototype;return n.OP=function(t,i){this.MP=t},n.jx=function(){return this.B8.jx()},n.Hx=function(){return this.B8.Hx()},n.Aa=function(){return this.B8.Aa()},n.tI=function(t){return this.B8.tI(t)},n.Wx=function(){return this.B8.Wx()},n.we=function(){return this.B8.we()},n.Yx=function(){return this.B8.Yx()},n.Jx=function(){return this.B8.Jx()},n.zx=function(){return this.B8.zx()},n.Gx=function(){return this.B8.Gx()},n.hr=function(){return this.B8.hr()},n.Ta=function(t,i,n){return this.B8.Ta(t,i,n)},n.Px=function(t,i,n,r){return this.B8.Px(t,i,n,r)},n.xx=function(){return this.B8.xx()},n.be=function(){return this.B8.be()},n.Qx=function(){return this.B8.Qx()},n.Kx=function(){return this.B8.Kx()},n.kn=function(){this.Vo();for(var t,i=Ft(sS);!(t=i()).done;){var n=t.value;this.B8.mn(n,this.Rs)}return this.B8.kn()},xt(i,[{key:"ht",get:function(){return this.B8.ht}},{key:"IP",get:function(){return this.B8.IP}},{key:"CP",get:function(){return this.B8.CP},set:function(t){this.B8.CP=t}},{key:"bt",get:function(){return this.B8.bt}},{key:"MP",get:function(){return this.B8.MP},set:function(t){this.B8.MP=t}},{key:"ct",get:function(){return this.B8.ct}},{key:"UP",get:function(){return this.B8.UP}},{key:"WP",get:function(){return this.B8.WP}},{key:"zP",get:function(){return this.B8.zP}},{key:"jP",get:function(){return this.B8.jP}},{key:"lt",get:function(){return this.B8.lt}},{key:"KP",get:function(){return this.B8.KP}},{key:"JP",get:function(){return this.B8.JP}},{key:"$P",get:function(){return this.B8.$P},set:function(t){this.B8.$P=t}},{key:"sx",get:function(){return this.B8.sx}},{key:"hx",get:function(){return this.B8.hx}},{key:"ux",get:function(){return this.B8.ux},set:function(t){this.B8.ux=t}},{key:"_x",get:function(){return this.B8._x}},{key:"mx",get:function(){return this.B8.mx},set:function(t){this.B8.mx=t}},{key:"Ax",get:function(){return this.B8.Ax}},{key:"Sx",get:function(){return this.B8.Sx}},{key:"kx",get:function(){return this.B8.kx}},{key:"nq",get:function(){return this.B8.nq}},{key:"nt",get:function(){return this.B8.nt}},{key:"Rx",get:function(){return this.B8.Rx}},{key:"rt",get:function(){return this.B8.rt}},{key:"Bx",get:function(){return this.B8.Bx}},{key:"Mx",get:function(){return this.B8.Mx},set:function(t){this.B8.Mx=t}},{key:"Fx",get:function(){return this.B8.Fx}},{key:"Vx",get:function(){return this.B8.Vx},set:function(t){this.B8.Vx=t}},{key:"hq",get:function(){return this.B8.hq}},{key:"BL",get:function(){}}]),i}(hh),H$=function(t){function i(i,n,r){var e;return(e=t.call(this,i)||this).rKt=void 0,e.hKt=void 0,e.oKt=!1,e.BVt=void 0,e.N7=void 0,e.handleManifestUpdate=function(t){e.So(t);var i=e.rKt.YQt();if(i){var n=e.nq;if(n){var r=n.getTime(),s=e.BVt;s||(s=new tQ,e.BVt=s),s.er(i.EOt,function(t){return(t.getTime()-r)/1e3}),!e.oKt&&s.L.V>0&&(e.nt.tt(s),e.N7.tt(s),e.oKt=!0)}}},e.CXt=function(){e.rKt&&e.rKt.iKt(e.Bx,e.Rx)},e.hKt=n,e.N7=new uD(e),e.wn(ch.Jw,e.CXt),e}Pt(i,t);var n=i.prototype;return n.Ta=function(i,n,r){var e=this;return jt(function(){return zt(this,function(s){switch(s.label){case 0:return[4,t.prototype.Ta.call(e,i,n,r)];case 1:return s.sent(),i.hlsDateRange&&this.$wt(i,n),[2]}})}).call(this)},n.$wt=function(t,i){this.rKt=new V$(t,i,this.hKt),this.rKt.wn(ch.qw,this.handleManifestUpdate),this.rKt.Tn()},n.hr=function(){return this.BVt&&(this.nt.it(this.BVt),this.N7.it(this.BVt),this.BVt.kn(),this.BVt=void 0,this.oKt=!1),this.rKt&&(this.rKt.kn(),this.rKt=void 0),this.N7.hr(),t.prototype.hr.call(this)},n.kn=function(){return this.mn(ch.Jw,this.CXt),this.rKt&&(this.rKt.kn(),this.rKt=void 0),this.N7.kn(),t.prototype.kn.call(this)},i}(j$);!function(t){JT.Yq().Jq(t)}(function(t,i,n){return new H$(t,i,n)}),V(),It(),V(),It(),V(),It(),Wt(),Nt(),Yt(),V(),It(),Wt(),Yt(),V(),It(),Bt(),Nt();var W$=function(t){function i(i,n){var r;return void 0===n&&(n=""),(r=t.call(this,"An error occurred while casting.")||this).errorCode=void 0,r.description=void 0,r.errorCode=i,r.description=n,r}return Pt(i,t),xt(i,[{key:"name",get:function(){return"CastError"}}]),i}(gr);function z$(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return Q$()?[3,2]:[4,q$(t)];case 1:i.sent(),i.label=2;case 2:return G$()?[3,4]:[4,Rr(100,t)];case 3:i.sent(),i.label=4;case 4:return G$()?[3,6]:(Vi.um('Detected the Chromecast library was loaded without the CAF framework. It is strongly encouraged to load it with the CAF framework by using this URL: "//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"'),[4,X$()]);case 5:i.sent(),i.label=6;case 6:return[2]}})})()}function q$(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){return(null==t?void 0:t.Hg)?[2,ot.reject(new wr)]:(i=function(){var t,i;return{Qy:new ot(function(n,r){t=n,i=r}),Xy:t,jy:i}}(),n=i.Qy,r=i.Xy,e=i.jy,s=f.__onGCastApiAvailable,u=function(){f.__onGCastApiAvailable=s,e(new wr)},f.__onGCastApiAvailable=function(i,n){i?r():e(new p(n)),null==t||t.jg(u),f.__onGCastApiAvailable=s,s&&s(i,n)},null==t||t.Xg(u),[2,n])})})()}var X$=bn(function(){return function(t){return new ot(function(i,n){var r=v.createElement("script");r.onload=function(){return i()},r.onerror=function(t){return n((null==t?void 0:t.error)||t)},r.type="text/javascript",r.src=t,(v.head||v.documentElement).appendChild(r)})}("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js").catch(function(){throw new W$("API_NOT_INITIALIZED","The Chromecast library could not be loaded successfully.")})});function G$(){return Boolean("undefined"!=typeof cast&&cast.framework)}function Q$(){return"undefined"!=typeof chrome&&chrome&&chrome.cast&&chrome.cast.isAvailable}function Y$(t,i,n,r){if(Fi(i))for(var e,s=Ft(b.keys(i));!(e=s()).done;){var u=e.value;if("type"!==u&&"images"!==u){var o=i[u];Fi(o)&&(t[u]=o)}}!function(t,i,n,r){if(!Fi(n)&&!Fi(null==i?void 0:i.images))return;t.images=[],n&&t.images.push(new r.Image(n));if(null==i?void 0:i.images)if(qi(i.images))t.images.push(new r.Image(i.images));else if(ji(i.images))for(var e,s=Ft(i.images);!(e=s()).done;){var u,o,h=e.value,a=void 0;if(qi(h))a=new r.Image(h);else(a=new r.Image(h.src)).height=null!=(u=h.height)?u:null,a.width=null!=(o=h.width)?o:null;t.images.push(a)}}(t,i,n,r)}function $$(t,i,n){return void 0===n&&(n=chrome),function(t,i,n){switch(null==t?void 0:t.type){case"movie":var r=new n.MovieMediaMetadata;return Y$(r,t,i,n),r;case"audio":var e=new n.MusicTrackMediaMetadata;return Y$(e,t,i,n),!Fi(e.artist)&&Fi(t.artistName)&&(e.artist=t.artistName),e;case"tv-show":var s=new n.TvShowMediaMetadata;return Y$(s,t,i,n),!Fi(s.title)&&Fi(t.episodeTitle)&&(s.title=t.episodeTitle),!Fi(s.season)&&Fi(t.seasonNumber)&&(s.season=t.seasonNumber),!Fi(s.episode)&&Fi(t.episodeNumber)&&(s.episode=t.episodeNumber),s;default:var u=new n.GenericMediaMetadata;return Y$(u,t,i,n),u}}(t,i,function(t){return{GenericMediaMetadata:t.cast.media.GenericMediaMetadata,MovieMediaMetadata:t.cast.media.MovieMediaMetadata,TvShowMediaMetadata:t.cast.media.TvShowMediaMetadata,MusicTrackMediaMetadata:t.cast.media.MusicTrackMediaMetadata,Image:t.cast.Image}}(n))}function K$(t){switch(t){case chrome.cast.ErrorCode.CANCEL:return"CANCEL";case chrome.cast.ErrorCode.TIMEOUT:return"TIMEOUT";case chrome.cast.ErrorCode.API_NOT_INITIALIZED:return"API_NOT_INITIALIZED";case chrome.cast.ErrorCode.INVALID_PARAMETER:return"INVALID_PARAMETER";case chrome.cast.ErrorCode.EXTENSION_NOT_COMPATIBLE:return"EXTENSION_NOT_COMPATIBLE";case chrome.cast.ErrorCode.EXTENSION_MISSING:return"EXTENSION_MISSING";case chrome.cast.ErrorCode.RECEIVER_UNAVAILABLE:return"RECEIVER_UNAVAILABLE";case chrome.cast.ErrorCode.SESSION_ERROR:return"SESSION_ERROR";case chrome.cast.ErrorCode.CHANNEL_ERROR:return"CHANNEL_ERROR";case chrome.cast.ErrorCode.LOAD_MEDIA_FAILED:return"LOAD_MEDIA_FAILED";default:return"CANCEL"}}function J$(t){if(t.items&&t.items.length>0&&Fi(t.currentItemId)&&t.currentItemId>=0)return Wn(t.items,function(i){return i.itemId===t.currentItemId})}V(),It(),Wt(),Nt(),Ut(),Yt(),V(),It(),Bt(),Nt(),V(),It(),V(),It(),Ut(),V(),It();var Z$="urn:x-cast:com.theoplayer.cast";V(),It(),V(),It();var tK=function(t){return t.aKt="theoplayer_receiver_info",t.uKt="theoplayer_trackpropertychange",t.cKt="theoplayer_propertychange",t}({});V(),It();var iK=function(t){return t.SKIP_AD="SKIP_AD",t}({});V(),It();function nK(t){v.createElement("img").src=t}V(),It(),Ut(),V(),It(),Wt(),Bt(),Yt(),V(),It();var rK=new RegExp(/^(\d\d):(\d\d):(\d\d)(?:\.(\d{3}))?$/);function eK(t){if(qi(t)){var i=t.match(rK);if(i)return 3600*T(i[1],10)+60*T(i[2],10)+Number(i[3])+(Number(i[4])||0)/1e3}}function sK(t){if(void 0!==t){var i=t.match(/^([1-9]?\d|100)%$/);if(i)return T(i[1])/100}}function uK(t,i){return"vmap"===t.type||!Fi(t.type)&&!Fi(i)}function oK(t,i){return"vast"===t.type||!Fi(t.type)&&Fi(i)}V(),It(),Wt(),H(),Ut(),Yt(),V(),It(),Bt(),Nt(),V(),It();var hK=function(){},aK=function(t){function i(i){var n;return(n=t.call(this)||this).qc=void 0,n.fKt=void 0,n.qc=i.sort(function(t,i){return t.VN-i.VN}),n}return Pt(i,t),i.prototype.lKt=function(){return null!=this.fKt||(this.fKt=nr(this.qc,function(t){return t.lKt()})),this.fKt},xt(i,[{key:"dKt",get:function(){return this.qc}}]),i}(hK);V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt(),Nt();var cK=function(t){function i(i,n){var r;return(r=t.call(this)||this).vKt=void 0,r._Kt=void 0,r.pKt=void 0,r.vKt=i,r._Kt=n,r.pKt=!1,r}return Pt(i,t),xt(i,[{key:"o",get:function(){return this.vKt}},{key:"VN",get:function(){return this._Kt}},{key:"gKt",get:function(){return this.pKt}}]),i}(hK),fK=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,i,n)||this).AKt=void 0,h.SKt=void 0,h.kKt=void 0,h.wKt=void 0,h.JW=void 0,h.EKt=void 0,h.AKt=r,h.SKt=e,h.kKt=s,h.wKt=u,h.JW=o,h}return Pt(i,t),i.prototype.lKt=function(){if(void 0===this.EKt){for(var t,i,n,r,e=[],s=Ft(this.wKt);!(r=s()).done;){var u=r.value;u.PKt&&(t=u.PKt),u.xKt&&(i=u.xKt),u.IKt&&(n=u.IKt),e=e.concat(u.universalAdIds)}this.EKt={TKt:this.TKt,PKt:t,RKt:i,IKt:n,lt:this.lt,CKt:e}}return[this.EKt]},xt(i,[{key:"mKt",get:function(){return this.wKt}},{key:"yKt",get:function(){return this.AKt}},{key:"bKt",get:function(){return this.SKt}},{key:"TKt",get:function(){return this.kKt}},{key:"lt",get:function(){return this.JW}}]),i}(cK);V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt();var vK=function(){function t(t,i){this.BKt=void 0,this.MKt=void 0,this.BKt=t,this.MKt=i}return xt(t,[{key:"DKt",get:function(){return this.BKt}},{key:"NKt",get:function(){return this.MKt}}]),t}(),dK=function(){function t(t,i,n,r,e,s){this.OKt=void 0,this.UKt=void 0,this.HKt=void 0,this.qKt=void 0,this.QKt=void 0,this.XKt=void 0,this.zKt=void 0,this.AKt=void 0,this.OKt=t,this.UKt=i,this.HKt=n,this.qKt=r,this.QKt=!1,this.XKt=e,this.AKt=s}return t.prototype.KKt=function(){this.QKt=!0},xt(t,[{key:"LKt",get:function(){return this.OKt}},{key:"FKt",get:function(){return this.UKt}},{key:"VKt",get:function(){return this.HKt}},{key:"WKt",get:function(){return this.qKt}},{key:"od",get:function(){return this.zKt},set:function(t){this.zKt=t}},{key:"GKt",get:function(){return this.XKt}},{key:"jKt",get:function(){return this.QKt}},{key:"yKt",get:function(){return this.AKt}}]),t}();V(),It(),Bt();var lK=function(t){return t.YKt="all",t.JKt="any",t.lz="none",t}({});var gK=function(){function t(t,i){this.$Kt=void 0,this.iYt=void 0,this.$Kt=t,this.iYt=i}return xt(t,[{key:"ZKt",get:function(){return this.$Kt}},{key:"tYt",get:function(){return this.iYt}}]),t}(),wK=function(){function t(t,i,n,r,e,s,u,o,h,a,c,f,v,d,l,g){this.sb=void 0,this.hb=void 0,this.hS=void 0,this.sYt=void 0,this.rYt=void 0,this.oYt=void 0,this.uYt=void 0,this.dYt=void 0,this.fYt=void 0,this._Yt=void 0,this.OKt=void 0,this.UKt=void 0,this.HKt=void 0,this.pYt=void 0,this.mYt=void 0,this.yYt=void 0,this.sb=t,this.hb=i,this.hS=n,this.sYt=r,this.rYt=e,this.oYt=s,this.uYt=u,this.dYt=o,this.fYt=h,this._Yt=a,this.OKt=c,this.UKt=f,this.HKt=v,this.pYt=d,this.mYt=l,this.yYt=g}return xt(t,[{key:"o",get:function(){return this.hS}},{key:"Ti",get:function(){return this.sb}},{key:"Mi",get:function(){return this.hb}},{key:"eYt",get:function(){return this.sYt}},{key:"nYt",get:function(){return this.rYt}},{key:"hYt",get:function(){return this.oYt}},{key:"aYt",get:function(){return this.uYt}},{key:"cYt",get:function(){return this.dYt}},{key:"lYt",get:function(){return this.fYt}},{key:"vYt",get:function(){return this._Yt}},{key:"LKt",get:function(){return this.OKt}},{key:"FKt",get:function(){return this.UKt}},{key:"VKt",get:function(){return this.HKt}},{key:"gYt",get:function(){return this.pYt}},{key:"NKt",get:function(){return this.mYt}},{key:"wYt",get:function(){return this.yYt}}]),t}();V(),It(),Bt();var mK=function(){function t(t,i){this.hS=void 0,this.rFt=void 0,this.hS=t,this.rFt=i}return xt(t,[{key:"id",get:function(){return this.hS}},{key:"uri",get:function(){return this.rFt}}]),t}(),yK=function(){function t(t,i,n,r){this.bYt=void 0,this.TYt=void 0,this.EYt=void 0,this.xYt=void 0,this.bYt=t,this.TYt=i,this.EYt=n,this.xYt=r}return xt(t,[{key:"AYt",get:function(){return this.bYt}},{key:"SYt",get:function(){return this.TYt}},{key:"kYt",get:function(){return this.EYt}},{key:"PYt",get:function(){return this.xYt}}]),t}(),pK=function(t){function i(i,n,r,e,s,u,o,h,a){var c;return(c=t.call(this,i,n)||this).kKt=void 0,c.RYt=void 0,c.DYt=void 0,c.NYt=void 0,c.LYt=void 0,c.wKt=void 0,c.JW=void 0,c.fKt=void 0,c.kKt=r,c.RYt=e,c.DYt=s,c.wKt=u,c.NYt=o,c.LYt=h,c.JW=a,c}Pt(i,t);var n=i.prototype;return n.lKt=function(){var t=this;return void 0===this.RYt?[]:(null!=this.fKt||(this.fKt=this.RYt.lKt().map(function(i){return t.OYt(i)})),this.fKt)},n.OYt=function(t){for(var i,n,r,e,s=Ft(this.mKt);!(e=s()).done;){var u=e.value;u.PKt&&(i=u.PKt),u.xKt&&(n=u.xKt),u.IKt&&(r=u.IKt)}var o=t.TKt.concat(this.TKt),h=t.PKt;if(i&&t.PKt){var a=new yK(t.PKt.FYt.AYt,t.PKt.FYt.SYt,t.PKt.FYt.kYt.concat(i.FYt.kYt),t.PKt.FYt.PYt.concat(i.FYt.PYt));(h=t.PKt).FYt=a,h.NKt=h.NKt.concat(i.NKt)}var c=t.RKt;if(n&&n.DKt){for(var f,v,d,l=[],g=Ft(n.DKt);!(d=g()).done;){var w=d.value;l.concat(w.WKt.kYt)}for(var m,y,p,_=[],k=Ft(null!=(m=null==(f=t.RKt)?void 0:f.DKt)?m:[]);!(y=k()).done;){var b,A,T,S=y.value,E=new yK(S.WKt.AYt,S.WKt.SYt,S.WKt.kYt.concat(l),(null!=(A=null==(b=t.PKt)?void 0:b.FYt.PYt)?A:[]).concat(null!=(T=null==i?void 0:i.FYt.PYt)?T:[]));_.push(new dK(S.LKt,S.FKt,S.VKt,E,S.GKt,S.yKt))}c=new vK(_,(null!=(p=null==(v=t.RKt)?void 0:v.NKt)?p:[]).concat(n.NKt))}var I=t.IKt;if(I){var R,C,P,N=I.ZKt;r&&r.ZKt&&(N=r.ZKt),I=new gK(N,(null!=(C=null==(R=t.IKt)?void 0:R.tYt)?C:[]).concat(null!=(P=null==r?void 0:r.tYt)?P:[]))}var D=t.lt;return this.lt&&(D=this.lt),{TKt:o,PKt:h,RKt:c,IKt:I,lt:D,CKt:t.CKt}},xt(i,[{key:"TKt",get:function(){return this.kKt}},{key:"IYt",get:function(){return this.RYt}},{key:"CYt",get:function(){return this.DYt}},{key:"mKt",get:function(){return this.wKt}},{key:"BYt",get:function(){return this.NYt}},{key:"MYt",get:function(){return this.LYt}},{key:"lt",get:function(){return this.JW}}]),i}(cK);V(),It(),Bt();var _K=function(){function t(t,i,n,r,e,s,u,o){this.hS=void 0,this.VYt=void 0,this.WYt=void 0,this.dYt=void 0,this.qYt=void 0,this.zYt=void 0,this.GYt=void 0,this.XYt=void 0,this.hS=t,this.VYt=i,this.WYt=n,this.dYt=r,this.qYt=e,this.zYt=s,this.GYt=u,this.XYt=o}return xt(t,[{key:"o",get:function(){return this.hS}},{key:"UYt",get:function(){return this.VYt}},{key:"HYt",get:function(){return this.WYt}},{key:"cYt",get:function(){return this.dYt}},{key:"PKt",get:function(){return this.qYt}},{key:"xKt",get:function(){return this.zYt}},{key:"IKt",get:function(){return this.GYt}},{key:"universalAdIds",get:function(){return this.XYt}}]),t}();V(),It(),Bt();var kK=function(){function t(t,i,n,r,e,s,u,o,h){this.jYt=void 0,this.KYt=void 0,this.iJt=void 0,this.MKt=void 0,this.YYt=void 0,this.ZYt=void 0,this.QKt=void 0,this.XKt=void 0,this.zKt=void 0,this.AKt=void 0,this.sJt=void 0,this.rJt=void 0,this.jYt=t,this.KYt=i,this.MKt=n,this.YYt=r,this.ZYt=e,this.QKt=!1,this.XKt=s,this.AKt=u,this.sJt=o,this.rJt=h}return t.prototype.KKt=function(){this.QKt=!0},xt(t,[{key:"ct",get:function(){return this.jYt}},{key:"QYt",get:function(){return this.KYt}},{key:"NKt",get:function(){return this.MKt},set:function(t){this.MKt=t}},{key:"FYt",get:function(){return this.YYt},set:function(t){this.YYt=t}},{key:"JYt",get:function(){return this.ZYt},set:function(t){this.ZYt=t}},{key:"$Yt",get:function(){return this.QKt}},{key:"od",get:function(){return this.zKt},set:function(t){this.zKt=t}},{key:"GKt",get:function(){return this.XKt}},{key:"yKt",get:function(){return this.AKt}},{key:"tJt",get:function(){return this.iJt},set:function(t){this.iJt=t}},{key:"eJt",get:function(){return this.sJt}},{key:"nJt",get:function(){return this.rJt}}]),t}();function bK(t,i){return EK(t)&&t.getAttribute(i)||void 0}function AK(t,i){return TK(t,i,void 0,!1)}function TK(t,i,n,r){return i===(t.localName?t.localName:t.nodeName)&&(r&&n?n===t.namespaceURI:!n||!t.namespaceURI||n===t.namespaceURI)}function SK(t,i){for(var n=[],r=0;r0)throw new p('Invalid document for MIME type "'+i+'"');return n}function RK(t){return IK(t,"text/xml")}function CK(t){return t.replace(/[<>&'"]/g,function(t){switch(t){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return""";default:return t}})}function PK(t){return"data:application/xml,"+encodeURIComponent(t)}V(),It(),V(),It(),Bt();var NK=function(t){return t.hJt="mute",t.oJt="unmute",t.jw="pause",t.aJt="resume",t.uJt="rewind",t.cJt="skip",t.dJt="playerExpand",t.lJt="playerCollapse",t.fJt="fullscreen",t.vJt="exitFullscreen",t._Jt="expand",t.COLLAPSE="collapse",t.MSt="start",t.gJt="firstQuartile",t.pJt="thirdQuartile",t.mJt="midpoint",t.wJt="complete",t.yJt="acceptInvitationLinear",t.AJt="acceptInvitation",t.bJt="timeSpentViewing",t.SJt="otherAdInteraction",t.Qw="progress",t.TJt="creativeView",t.kJt="adExpand",t.EJt="adCollapse",t.PJt="minimize",t.xJt="close",t.IJt="closeLinear",t.RJt="overlayViewDuration",t.CJt="breakStart",t.DJt="breakEnd",t.ma="error",t}({});function DK(t){switch(t){case"breakStart":case"breakEnd":case"error":return!0;default:return!1}}var xK=["mute","unmute","pause","resume","rewind","skip","closeLinear","close","playerExpand","playerCollapse","fullscreen","exitFullscreen","expand","collapse","creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","acceptInvitationLinear","acceptInvitation","timeSpentViewing","otherAdInteraction","progress"];function BK(t){return void 0!==t&&-1!==xK.indexOf(t)}var OK=["start","firstQuartile","midpoint","thirdQuartile","complete","mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","expand","collapse","fullscreen","exitFullscreen","creativeView","acceptInvitation","adExpand","adCollapse","minimize","close","overlayViewDuration","otherAdInteraction","progress"];function MK(t){return void 0!==t&&-1!==OK.indexOf(t)}var LK=["mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","creativeView"];function FK(t){return void 0!==t&&-1!==LK.indexOf(t)}function UK(t,i){if(void 0!==t&&""!==t&&void 0!==i){var n=t.match(/^(\d+):(\d+):(\d+)$/);return n?S(n[1]||"0")+60*S(n[2]||"0")+S(n[3]||"0"):(n=t.match(/^(100|[1-9]\d|\d)%$/))?S(n[1]||"0")*i/100:void 0}}var VK=function(){function t(t,i,n){this.BJt=void 0,this.NJt=void 0,this.MJt=void 0,this.BJt=t,this.NJt=i,this.MJt=n}return xt(t,[{key:"eX",get:function(){return this.BJt}},{key:"ac",get:function(){return this.NJt}},{key:"eventURL",get:function(){return this.MJt}}]),t}();V(),It(),Bt(),Nt();var jK=function(){function t(t){this.OJt=void 0,this.OJt=t}return xt(t,[{key:"LJt",get:function(){return this.OJt}}]),t}(),HK=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i)||this).UJt=void 0,s.yYt=void 0,s.bYt=void 0,s.UJt=n,s.bYt=r,s.yYt=e,s}return Pt(i,t),xt(i,[{key:"AYt",get:function(){return this.bYt}},{key:"wYt",get:function(){return this.yYt}},{key:"FJt",get:function(){return this.UJt}}]),i}(jK),WK=function(t){function i(i){return t.call(this,i)||this}return Pt(i,t),i}(jK),zK=function(t){function i(i){return t.call(this,i)||this}return Pt(i,t),i}(jK);V(),It(),Bt();var qK={VJt:{Ky:100,Py:"XML parsing error."},HJt:{Ky:303,Py:"Empty or invalid VAST error."},WJt:{Ky:400,Py:"General linear error"},qJt:{Ky:403,Py:"Unsupported MIME-type or missing mediafiles error"},zJt:{Ky:500,Py:"General nonlinear error"},xG:{Ky:900,Py:"Network error"}},XK=function(){function t(t){this.XJt=void 0,this.XJt=t}return t.prototype.jJt=function(t){if(this.GJt){var i=this.GJt.replace(/\[ERRORCODE]/,""+t.Ky);nK(i)}},xt(t,[{key:"GJt",get:function(){return this.XJt}}]),t}();V(),It(),Bt(),Nt();var GK=function(t){function i(i,n,r,e){var s;return(s=t.call(this,r||n&&$K[n]||i,e)||this).KJt=void 0,s.JJt=void 0,s.O2=void 0,s.KJt=i,s.JJt=n,s.O2=r,s}return Pt(i,t),xt(i,[{key:"QJt",get:function(){return this.KJt}},{key:"YJt",get:function(){var t;return null!=(t=this.JJt)?t:900}}]),i}(gr),QK=function(t){return t.ADBLOCK="adblock",t.NETWORK="network",t.PARSING="parsing",t.PLAYBACK="playback",t.GENERAL="general",t}({}),YK=function(t){return t[t.VAST_MALFORMED_RESPONSE=100]="VAST_MALFORMED_RESPONSE",t[t.VAST_SCHEMA_VALIDATION_ERROR=101]="VAST_SCHEMA_VALIDATION_ERROR",t[t.VAST_UNSUPPORTED_VERSION=102]="VAST_UNSUPPORTED_VERSION",t[t.VAST_TRAFFICKING_ERROR=200]="VAST_TRAFFICKING_ERROR",t[t.VAST_UNEXPECTED_LINEARITY=201]="VAST_UNEXPECTED_LINEARITY",t[t.VAST_UNEXPECTED_DURATION_ERROR=202]="VAST_UNEXPECTED_DURATION_ERROR",t[t.UNEXPECTED_SIZE=203]="UNEXPECTED_SIZE",t[t.VAST_WRAPPER_ERROR=300]="VAST_WRAPPER_ERROR",t[t.VAST_LOAD_TIMEOUT=301]="VAST_LOAD_TIMEOUT",t[t.VAST_TOO_MANY_REDIRECTS=302]="VAST_TOO_MANY_REDIRECTS",t[t.VAST_NO_ADS_AFTER_WRAPPER=303]="VAST_NO_ADS_AFTER_WRAPPER",t[t.GENERAL_LINEAR_ERROR=400]="GENERAL_LINEAR_ERROR",t[t.FILE_NOT_FOUND=401]="FILE_NOT_FOUND",t[t.VAST_MEDIA_LOAD_TIMEOUT=402]="VAST_MEDIA_LOAD_TIMEOUT",t[t.VAST_LINEAR_ASSET_MISMATCH=403]="VAST_LINEAR_ASSET_MISMATCH",t[t.VAST_PROBLEM_DISPLAYING_MEDIA_FILE=405]="VAST_PROBLEM_DISPLAYING_MEDIA_FILE",t[t.MEZZANINE_FILE_REQUIRES=406]="MEZZANINE_FILE_REQUIRES",t[t.MEZZANINE_FILE_DOWNLOADED_FIRST_TIME=407]="MEZZANINE_FILE_DOWNLOADED_FIRST_TIME",t[t.AD_IN_VAST_REJECTED=408]="AD_IN_VAST_REJECTED",t[t.INTERACTIVE_CREATIVE_NOT_EXECUTED=409]="INTERACTIVE_CREATIVE_NOT_EXECUTED",t[t.VERIFICATION_CODE_NOT_EXECUTED=410]="VERIFICATION_CODE_NOT_EXECUTED",t[t.GENERAL_NON_LINEAR_ERROR=500]="GENERAL_NON_LINEAR_ERROR",t[t.NONLINEAR_DIMENSIONS_ERROR=501]="NONLINEAR_DIMENSIONS_ERROR",t[t.OVERLAY_AD_LOADING_FAILED=502]="OVERLAY_AD_LOADING_FAILED",t[t.VAST_NONLINEAR_ASSET_MISMATCH=503]="VAST_NONLINEAR_ASSET_MISMATCH",t[t.GENERAL_COMPANION_AD_ERROR=600]="GENERAL_COMPANION_AD_ERROR",t[t.INVALID_DIMENSIONS_COMPANION_AD=601]="INVALID_DIMENSIONS_COMPANION_AD",t[t.COMPANION_REQUIRED_ERROR=602]="COMPANION_REQUIRED_ERROR",t[t.COMPANION_AD_LOADING_FAILED=603]="COMPANION_AD_LOADING_FAILED",t[t.UNABLE_TO_FIND_SUPPORTED_COMPANION=604]="UNABLE_TO_FIND_SUPPORTED_COMPANION",t[t.UNKNOWN_ERROR=900]="UNKNOWN_ERROR",t[t.GENERAL_VPAID_ERROR=901]="GENERAL_VPAID_ERROR",t[t.MALFORMED_URI=1005]="MALFORMED_URI",t[t.VAST_ASSET_NOT_FOUND=1007]="VAST_ASSET_NOT_FOUND",t[t.VAST_EMPTY_RESPONSE=1009]="VAST_EMPTY_RESPONSE",t[t.UNKNOWN_AD_RESPONSE=1010]="UNKNOWN_AD_RESPONSE",t[t.UNSUPPORTED_LOCALE=1011]="UNSUPPORTED_LOCALE",t[t.INVALID_ARGUMENTS=1101]="INVALID_ARGUMENTS",t[t.INVALID_ADX_EXTENSION=1105]="INVALID_ADX_EXTENSION",t[t.AUTOPLAY_DISALLOWED=1205]="AUTOPLAY_DISALLOWED",t}({}),$K={100:"XML parsing error.",101:"VAST schema validation error.",102:"VAST version of response not supported.",200:"Trafficking error. The video player received an ad type that it was not expecting and/or cannot display.",201:"Video player expecting different linearity.",202:"Video player expecting different duration.",203:"Video player expecting different size.",300:"General wrapper error.",301:"Timeout of VAST URI provided in wrapper element, or of VAST URI provided in a subsequent wrapper element. This includes request errors such as invalid URI, unreachable or request timeout for URI, and security or other exceptions related to requesting a VAST URI.",302:"Wrapper limit reached, as defined by the video player. Too many wrapper responses have been received with no InLine response. This can be caused by a circular loop of daisy chaining (one network bouncing to another and another).",303:"No ads VAST response after one or more wrappers. This also includes the number of empty VAST responses from fallback.",400:"General linear error. The video player is unable to display the linear ad.",401:"File not found. Unable to find Linear/MediaFile from URI.",402:"Unable to download or timeout of MediaFile URI.",403:"Could not find a media file that is supported by this video player, based on the attributes of the MediaFile element.",405:"Problem displaying a media file.",406:"A mezzanine file was required, but not provided.",407:"The mezzanine file was downloaded for the first time, so the ad did not serve. This can occur when an ad insertion is missed because the creative is being transcoded. It continues to occur until the creative is available for insertion.",408:"The ad returned in the VAST response was rejected.",409:"The interactive creative defined in the InteractiveCreativeFile node was not executed.",410:"The code referenced in the Verification node was not executed.",500:"General NonLinearAds error.",501:"Unable to display non-linear ad because creative dimensions do not align with creative display area (in other words, the creative dimension was too large). This can occur if you use CSS styles to set width and height of the video ,content element. You should instead use the width and height HTML attributes.",502:"Unable to fetch NonLinearAds/NonLinear resource.",503:"Could not find NonLinearResource with supported type. This can occur when a creative size is larger than the player size.",600:"General CompanionAds error.",601:"Unable to display companion because creative dimensions do not fit within the companion display area (in other words, space was not available).",602:"Unable to display required companion.",603:"Unable to fetch CompanionAds/Companion resource.",604:"Could not find Companion resource with supported type.",900:"VAST 2 error. Even if you request VAST 3 or your DFP network default is VAST 3, this can occur if you have a VAST redirect that returns a VAST 2 response.",901:"General VPAID error",1005:"URI malformed."};function KK(t){if(!t)return!1;switch(t.toLocaleLowerCase()){case pA.dR:case pA.lR:case pA.cR:return!0;default:return!1}}function JK(t){var i=xr();return!!(KK(t)||t&&i&&(null==i?void 0:i.canPlayType)&&i.canPlayType(t))||(tJ("Invalid or unsupported MediaFile Content delivery type, skipping mediafile"),!1)}function ZK(t,i){for(var n,r=Ft(i);!(n=r()).done;){var e=n.value;new XK(e).jJt(t)}}function tJ(t){0}V(),It(),Ut(),V(),It(),Bt();var iJ=function(){function t(t,i){this.$Jt=void 0,this.iZt=void 0,this.$Jt=t,this.iZt=i}return xt(t,[{key:"ZJt",get:function(){return this.$Jt}},{key:"tZt",get:function(){return this.iZt}}]),t}(),nJ=function(){function t(){}var i=t.prototype;return i.eZt=function(i,n){return jt(function(){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return uK(i.sources,i.timeOffset)?[4,t.sZt(i.sources.src,n)]:[3,7];case 1:if(r=o.sent(),!(e=r&&r.documentElement))throw new GK(QK.NETWORK,YK.VAST_SCHEMA_VALIDATION_ERROR,"Ad source is not a valid XML document.");return AK(e,"VMAP")?[4,this.nZt(e,i,n)]:[3,3];case 2:return[2,o.sent()];case 3:return AK(e,"VAST")?[4,this.rZt(e,n,!1)]:[3,5];case 4:return(s=o.sent())?(u=new oJ("",!0,!0,s),[2,[new sJ("start",u,rJ.hZt,"",[],!1,!0,i)]]):[2,[]];case 5:throw new GK(QK.GENERAL,YK.VAST_MALFORMED_RESPONSE,"Only VMAP and VAST files are allowed as ad source.");case 6:return[3,8];case 7:if(oK(i.sources,i.timeOffset))return[2,[new uJ(String(i.timeOffset),i,n)]];throw new GK(QK.GENERAL,YK.VAST_MALFORMED_RESPONSE,"Something went wrong parsing the ad source; only VMAP and VAST files are allowed as ad source.");case 8:return[2]}})}).call(this)},i.oZt=function(){return jt(function(i,n,r,e){var s,u,o;return zt(this,function(h){switch(h.label){case 0:void 0===e&&(e=[]),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,t.sZt(i,n)];case 2:return s=h.sent(),[3,4];case 3:throw u=h.sent(),ZK(j(u,GK)&&u.YJt===YK.VAST_MALFORMED_RESPONSE?qK.HJt:qK.xG,e),u;case 4:return(o=s&&s.documentElement)&&AK(o,"VAST")?[4,this.rZt(o,n,r,e)]:[3,6];case 5:return[2,h.sent()];case 6:o&&AK(o,"VMAP")&&Qe("Received VMAP ad when expecting VAST. Please set the type of your ad source in the configuration, or make sure to not set a timeOffset for VMAP ad sources. VMAP ads have their own offsets included."),h.label=7;case 7:return[2,void 0]}})}).apply(this,arguments)},i.aZt=function(t,i,n,r){return jt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(!(null==(e=t.sources)?void 0:e.src))throw new GK(QK.GENERAL,YK.MALFORMED_URI,"Property src on adSource is missing.");return[4,this.oZt(t.sources.src,r,!1)];case 1:return s=h.sent(),u=new oJ("",!0,!0,s),(o=new sJ(i,u,rJ.hZt,"",[],!1,!0,t)).uZt=n,[2,o]}})}).call(this)},i.rZt=function(){return jt(function(t,i,n,r){var e,s,u,o,h,a,c,f,v,d,l,g;return zt(this,function(w){switch(w.label){case 0:if(void 0===r&&(r=[]),e=[],s=[],u=[],!t||!AK(t,"VAST")){if(ZK(qK.HJt,r),n)throw new GK(QK.PARSING,YK.VAST_NO_ADS_AFTER_WRAPPER,"No VAST element found after wrapper.");throw new GK(QK.PARSING,YK.VAST_EMPTY_RESPONSE,"The VAST element was empty.")}if(0===SK(t,"Ad").length)return[3,7];o=Ft(SK(t,"Ad")),w.label=1;case 1:if((h=o()).done)return[3,6];a=h.value,w.label=2;case 2:return w.trys.push([2,4,,5]),[4,this.cZt(a,i,r)];case 3:return 0===(c=w.sent()).VN?e.push(c):s.push(c),[3,5];case 4:return f=w.sent(),u.push(f),[3,5];case 5:return[3,1];case 6:if(0===e.length&&0===s.length&&u.length>0)throw u[0];if(1===e.length&&0===s.length)return[2,e[0]];if(0===e.length&&0!==s.length)return[2,new aK(s)];if(e.length>0||s.length>0)return[2,new aK(s.concat(e))];w.label=7;case 7:if(0!==SK(t,"Error").length)for(v=Ft(SK(t,"Error"));!(d=v()).done;)l=d.value,tJ(qK.HJt.Py),(g=l.textContent)&&r.push(g.trim());if(ZK(qK.HJt,r),n)throw new GK(QK.PARSING,YK.VAST_NO_ADS_AFTER_WRAPPER,"No VAST element found after wrapper.");throw new GK(QK.PARSING,YK.VAST_EMPTY_RESPONSE,"The VAST element was empty.")}})}).apply(this,arguments)},i.nZt=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:if(r=[],0===(e=SK(t,"AdBreak")).length)throw new GK(QK.PARSING,YK.VAST_EMPTY_RESPONSE,"The VMAP element was empty.");s=Ft(e),c.label=1;case 1:if((u=s()).done)return[3,6];o=u.value,c.label=2;case 2:return c.trys.push([2,4,,5]),[4,this.dZt(o,i,n)];case 3:return(h=c.sent())&&r.push(h),[3,5];case 4:return a=c.sent(),Vi.hm(a),[3,5];case 5:return[3,1];case 6:return[2,r]}})}).call(this)},i.cZt=function(i,n,r){return jt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return e=bK(i,"id")||"",(s=NU(bK(i,"sequence")))||(s=0),u=SK(i,"InLine"),0===(o=SK(i,"Wrapper")).length?[3,2]:[4,this.lZt(o[0],e,s,n,r)];case 1:return[2,h.sent()];case 2:if(0!==u.length)return[2,t.fZt(u[0],e,s,r)];h.label=3;case 3:throw new GK(QK.PARSING,YK.VAST_SCHEMA_VALIDATION_ERROR,"An Ad tag without a Wrapper or inline element cannot be parsed")}})}).call(this)},i.lZt=function(i,n,r,e,s){return jt(function(){var u,o,h,a,c,f,v,d,l,g,w,m,y,p,_,k,b;return zt(this,function(A){switch(A.label){case 0:for(u=SK(i,"Error")[0],o="",u&&u.textContent&&(o=u.textContent,s.push(o)),h=SK(i,"AdSystem")[0],a="",h&&(a=h.textContent||a),c=[],f=Ft(SK(i,"Impression"));!(v=f()).done;)(d=v.value).textContent&&c.push(d.textContent);return l=SK(i,"VASTAdTagURI")[0],g="",l&&l.textContent&&(g=l.textContent),[4,this.oZt(g,e,!0,s)];case 1:return w=A.sent(),m=t.vZt(SK(i,"Extensions")[0]),y=SK(i,"Creatives")[0],p=[],y&&(p=t.gZt(y,a,m,s)),(_=xU(bK(i,"followAdditionalWrappers")))||(_=!0),(k=xU(bK(i,"allowMultipleAds")))||(k=!0),(b=xU(bK(i,"fallbackOnNoAd")))||(b=!1),[2,new pK(n,r,c,w,_,p,k,b,new XK(o))]}})}).call(this)},i.dZt=function(i,n,r){return jt(function(){var e,s,u,o,h,a,c,f,v,d,l,g,w,m,y,p,_;return zt(this,function(k){switch(k.label){case 0:if(e=bK(i,"timeOffset")||"0",s=bK(i,"breakType")||rJ.pk,u=bK(i,"breakId"),o=xU(bK(i,"repeatAfter")),h=void 0!==eJ.kZt(e),void 0===u&&(u=""),void 0===o&&(o=!1),!h)throw new GK(QK.PARSING,YK.VAST_SCHEMA_VALIDATION_ERROR,"Invalid TimeOffset type");if(a=SK(i,"AdSource")[0],c=SK(i,"TrackingEvents")[0],f=[],c&&(f=t.yZt(c,DK,"vmap")),(v=bK(a,"id"))||(v=""),void 0===(d=xU(bK(a,"allowMultipleAds")))&&(d=!0),(l=xU(bK(a,"followRedirects")))||(l=!0),g=SK(a,"AdTagURI")[0],w="",m=SK(a,"VASTAdData")[0],!g||!g.textContent)return[3,1];try{return w=g.textContent,(y=Hg(n)).sources.src=w,[2,new uJ(e,y,r)]}catch(t){return[2,void 0]}return[3,6];case 1:return m?m.firstElementChild&&TK(m.firstElementChild,"VAST")?[4,this.rZt(m.firstElementChild,r,!1)]:[3,3]:[3,5];case 2:return(p=k.sent())?(_=new oJ(v,d,l,p),[2,new sJ(e,_,s,u,f,o,!1,n)]):[2,void 0];case 3:throw new GK(QK.PARSING,YK.VAST_SCHEMA_VALIDATION_ERROR,"vmap:VASTAdData does not have a VAST-structure as a child element");case 4:return[3,6];case 5:throw new GK(QK.PARSING,YK.VAST_SCHEMA_VALIDATION_ERROR,"Invalid AdTagURI source or invalid VASTAdData in Adbreak Element");case 6:return[2]}})}).call(this)},t.requestSuccessOnly=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,i.lk(t)];case 1:return n=e.sent(),[3,3];case 2:throw r=e.sent(),new GK(QK.NETWORK,YK.UNKNOWN_ERROR,"Something went wrong while requesting xml from server.",r);case 3:if(!pl(n))throw new GK(QK.NETWORK,YK.UNKNOWN_ERROR,"Something went wrong while requesting xml from server.");return[2,n]}})})()},t.sZt=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return n=new El({Yu:t,dk:Hd.NT,Uk:kl.GET}),[4,this.requestSuccessOnly(n,i)];case 1:r=e.sent(),e.label=2;case 2:return e.trys.push([2,4,,5]),[4,r.ck()];case 3:return[2,RK.apply(void 0,[e.sent()])];case 4:throw e.sent(),new GK(QK.NETWORK,YK.VAST_MALFORMED_RESPONSE,"The ad source could not be loaded.");case 5:return[2]}})}).call(this)},t.fZt=function(i,n,r,e){var s,u=SK(i,"Error")[0];u&&u.textContent&&(s=u.textContent,e.push(s));var o,h=t.vZt(SK(i,"Extensions")[0]),a=SK(i,"AdSystem")[0],c="";a&&(c=a.textContent||c);var f=SK(i,"AdTitle")[0];f&&(o=f.textContent||void 0);for(var v,d=[],l=Ft(SK(i,"Impression"));!(v=l()).done;){var g=v.value;g.textContent&&d.push(g.textContent)}var w=t._Zt(SK(i,"Creatives")[0],c,h,e);return new fK(n,r,c,o,d,w,new XK(s))},t.gZt=function(i,n,r,e){for(var s,u=[],o=Ft(SK(i,"Creative"));!(s=o()).done;){var h=s.value,a=bK(h,"id");a||(a="");var c=NU(bK(h,"sequence"));c||(c=0);var f=bK(h,"adId");f||(f="");var v=SK(h,"Linear")[0],d=void 0;v&&(d=t.pZt(v,"wrapper",a,n,r,e));var l=SK(h,"NonLinearAds")[0],g=void 0;if(l)try{g=t.mZt(l,a,n)}catch(t){}var w=SK(h,"CompanionAds")[0],m=void 0;w&&(m=t.wZt(w)),u.push(new _K(a,f,c,"",d,g,m,[]))}return u},t._Zt=function(i,n,r,e){for(var s,u=[],o=Ft(SK(i,"Creative"));!(s=o()).done;){var h=s.value,a=bK(h,"id");a||(a="");var c=NU(bK(h,"sequence"));c||(c=0);var f=bK(h,"adId");f||(f="");var v=bK(h,"apiFramework");v||(v="");var d=SK(h,"Linear")[0],l=void 0;if(d)try{l=t.pZt(d,"inline",a,n,r,e)}catch(t){}if(0===(null==l?void 0:l.ct))throw new GK(QK.PARSING,YK.VAST_UNEXPECTED_DURATION_ERROR,"The VAST response had a duration of 0 seconds, so skipping the ad(s).");var g=SK(h,"NonLinearAds")[0],w=void 0;if(g)try{w=t.mZt(g,a,n)}catch(t){}var m=SK(h,"CompanionAds")[0],y=void 0;m&&(y=t.wZt(m));var p=SK(h,"UniversalAdId"),_=t.parseUniversalAdIds(p);u.push(new _K(a,f,c,v,l,w,y,_))}return u},t.vZt=function(t){var i=[];if(!t)return i;for(var n,r=Ft(SK(t,"Extension"));!(n=r()).done;){var e,s=n.value,u=null!=(e=bK(s,"type"))?e:"",o=s.outerHTML;i.push({type:u,xml:o})}return i},t.pZt=function(i,n,r,e,s,u){var o=SK(i,"Duration")[0],h=0;if(o)h=eK(o.textContent)||0;else if(!o&&"inline"===n)throw new GK(QK.PARSING,YK.VAST_SCHEMA_VALIDATION_ERROR,"Missing duration element in inLine linear");var a=bK(i,"skipoffset"),c=-1;if(a){var f=eK(a);if(void 0===f&&a.indexOf("%")>-1){var v=A.abs(Number(a.replace(/(?![0-9])./g,"")))/100;E(v)||(f=h*v)}void 0!==f&&(c=f)}var d=SK(i,"MediaFiles")[0],l=[],g=[];if(d&&(l=function(t,i){for(var n,r=[],e=Ft(SK(t,"MediaFile"));!(n=e()).done;){var s=n.value,u=bK(s,"delivery"),o=bK(s,"type");if(o){if(i(o)){var h=NU(bK(s,"width")),a=NU(bK(s,"height"));h||(tJ(),h=0),a||(tJ(),a=0);var c={delivery:u,type:o,width:h,height:a,contentURL:""+s.textContent};r.push(c)}}else tJ()}return r}(d,JK),g=function(t){var i=SK(t,"ClosedCaptionFiles");if(0===i.length)return[];for(var n,r=[],e=Ft(SK(i[0],"ClosedCaptionFile"));!(n=e()).done;){var s=n.value,u=bK(s,"type");u||tJ();var o=bK(s,"language");o||tJ();var h={type:null!=u?u:"",language:null!=o?o:"",contentURL:(""+s.textContent).trim()};r.push(h)}return r}(d)),"inline"===n&&(!d||0===l.length))throw ZK(qK.qJt,u),new GK(QK.PARSING,YK.VAST_LINEAR_ASSET_MISMATCH,"Missing MediaFiles in linear element");var w=SK(i,"TrackingEvents")[0],m=[];w&&(m=t.yZt(w,BK,"linear"));var y=SK(i,"VideoClicks")[0],p=t.AZt(y);return new kK(h,l,m,p,c,r,e,g,s)},t.AZt=function(i){if(!i)return new yK("","",[],[]);var n,r=SK(i,"ClickThrough")[0],e="";r&&(n=r.textContent||void 0,e=bK(r,"id")||"");var s=t.bZt(SK(i,"ClickTracking")),u=t.bZt(SK(i,"CustomClick"));return new yK(n,e,s,u)},t.bZt=function(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){var e=i.value,s=e.textContent;if(s){var u=bK(e,"id")||"";n.push(new mK(u,s))}}return n},t.yZt=function(t,i,n){for(var r,e=[],s=Ft(SK(t,"Tracking"));!(r=s()).done;){var u=r.value,o=bK(u,"event");if(i(o)){var h="";"linear"===n&&(h=bK(t,"offset")||"0");var a=u.textContent;a&&e.push(new VK(o,h,a))}else tJ()}return e},t.mZt=function(i,n,r){for(var e,s=[],u=Ft(SK(i,"NonLinear"));!(e=u()).done;){var o=e.value,h=SK(o,"NonLinearClickThrough")[0],a=void 0;h&&(a=h.textContent||void 0);var c=t.bZt(SK(o,"NonLinearClickTracking")),f=SK(o,"StaticResource")[0],v=void 0;if(f&&f.parentNode){var d=bK(f,"creativeType"),l=f.textContent||"",g=SK(f.parentNode,"NonLinearClickThrough")[0],w="";g&&(w=g.textContent||""),v=new HK(l,d,w,"")}var m=t.SZt(o),y=t.parseHtmlResource(o);if(v||m||y){var p=new yK(a,"",c,[]);s.push(new dK(v,m,y,p,n,r))}else tJ()}if(0===s.length)throw new GK(QK.PARSING,YK.VAST_SCHEMA_VALIDATION_ERROR,"nonLinearAds element found with no nonLinear elements");var _=SK(i,"TrackingEvents")[0],k=[];return _&&(k=t.yZt(_,MK,"nonlinear")),new vK(s,k)},t.parseUniversalAdIds=function(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){var e,s,u,o=i.value,h=null!=(e=bK(o,"idRegistry"))?e:"",a=null!=(u=null!=(s=bK(o,"idValue"))?s:o.textContent)?u:"";n.push(new iJ(h,a))}return n},t.wZt=function(i){var n=bK(i,"requiredType");(function(t){switch(t){case"all":case"any":case"none":return!0;default:return!1}})(n)||(n=lK.lz);for(var r,e=[],s=Ft(SK(i,"Companion"));!(r=s()).done;){var u=r.value,o=NU(bK(u,"width")),h=NU(bK(u,"height")),a=bK(u,"id"),c=NU(bK(u,"assetWidth")),f=NU(bK(u,"assetHeight")),v=NU(bK(u,"expandedWidth")),d=NU(bK(u,"rxpandedHeight")),l=bK(u,"apiFramework"),g=bK(u,"adSlotId"),w=NU(bK(u,"pxratio")),m=SK(u,"AltText")[0],y=m?m.textContent:"";o||(tJ(),o=0),h||(tJ(),h=0),a||(a=""),c||(c=0),f||(f=0),v||(v=0),d||(d=0),l||(l=""),g||(g=""),w||(w=1),y||(y="");var p=t.TZt(u),_=t.SZt(u),k=t.parseHtmlResource(u),b=SK(u,"TrackingEvents")[0],A=[];b&&(A=t.yZt(b,FK,"companion"));var T=SK(u,"CompanionClickThrough")[0],S=void 0;T&&(S=T.textContent||void 0);var E=t.bZt(SK(u,"CompanionClickTracking"));(p||_||k)&&e.push(new wK(o,h,a,c,f,v,d,l,g,w,p,_,k,new yK(S,"",E,[]),A,y))}return new gK(n,e)},t.TZt=function(t){var i,n=SK(t,"StaticResource")[0];if(n&&n.parentNode){var r=bK(n,"creativeType");r||(r="");var e,s=n.textContent,u=SK(n.parentNode,"AltText")[0],o=SK(n.parentNode,"CompanionClickThrough")[0],h="";u&&(h=u.textContent||""),o&&(e=o.textContent||void 0),s&&(i=new HK(s,r,e,h))}return i},t.SZt=function(t){var i,n=SK(t,"IFrameResource")[0];if(n){var r=n.textContent||"";i=new WK(r)}return i},t.parseHtmlResource=function(t){var i,n=SK(t,"HTMLResource")[0];if(n){var r=n.textContent||"";i=new zK(r)}return i},t}(),rJ=function(t){return t.pk="",t.hZt="linear",t.EZt="nonlinear",t.PZt="display",t}({}),eJ=function(){function t(){}return t.xZt=function(t){switch(t){case"linear":case"nonlinear":case"display":return!0;default:return!1}},t.IZt=function(t){},t.RZt=function(t){if(void 0!==t)return"start"===t?0:"end"===t?-1:void 0},t.CZt=function(t){var i=t.split(":"),n=0;return n+=3600*Number(i[0]),n+=60*Number(i[1]),n+=Number(i[2])},t.DZt=function(t){if(t<=0)return"00:00:00.000";var i=A.floor(t),n=t-i;return this.BZt(i/3600,2)+":"+this.BZt(i/60%60,2)+":"+this.BZt(i%60,2)+"."+this.BZt(1e3*n,3)},t.BZt=function(t,i){return("00"+A.floor(t)).slice(-i)},t.NZt=function(t,i){var n=this.kZt(t);if(0===n)switch(t){case"start":return 0;case"end":return-1}else{if(2===n)return sK(t)*i;if(1===n)return eK(t);if(3===n)return this.RZt(t);if(4===n){var r=Number(t);if(!E(r)&&r>=-1)return r}}},t.kZt=function(t){return"start"===t||"end"===t?0:void 0!==eK(t.toString())?1:void 0!==sK(t.toString())?2:void 0!==this.IZt(t.toString())?3:E(Number(t))?void 0:4},t}(),sJ=function(){function t(t,i,n,r,e,s,u,o){this.FZt=void 0,this.mYt=void 0,this.UZt=void 0,this.ZYt=-1,this.XZt=void 0,this.HZt=void 0,this.qZt=void 0,this.jZt=void 0,this.LZt=void 0,this.GZt=void 0,this.FZt=i,this.UZt=t,this.XZt=n,this.HZt=r,this.qZt=s,this.mYt=e,this.jZt=u,this.LZt=o}return t.prototype.Un=function(){return ot.resolve()},xt(t,[{key:"MZt",get:function(){return this.LZt.integration}},{key:"OZt",get:function(){return this.FZt}},{key:"_Ot",get:function(){return this.UZt}},{key:"JYt",get:function(){return this.ZYt},set:function(t){this.ZYt=t}},{key:"NKt",get:function(){return this.mYt}},{key:"VZt",get:function(){return this.HZt}},{key:"WZt",get:function(){return this.qZt}},{key:"Ont",get:function(){return this.LZt}},{key:"zZt",get:function(){return this.uZt.dd}},{key:"W",get:function(){return!0}},{key:"uZt",get:function(){return this.GZt},set:function(t){this.GZt=t}}]),t}(),uJ=function(){function t(t,i,n){this.zKt=void 0,this.QZt=void 0,this.uE=!1,this.nV=void 0,this.nV=n,this.zKt=new sJ(t,void 0,"","",[],!1,!1,i)}var i=t.prototype;return i.Un=function(){var t;return null!=(t=this.QZt)?t:this.QZt=this.lE()},i.lE=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return t=new nJ,i=this,[4,t.aZt(this.Ont,this._Ot,this.uZt,this.nV)];case 1:return i.zKt=n.sent(),this.uE=!0,[2]}})}).call(this)},xt(t,[{key:"MZt",get:function(){return this.zKt.MZt}},{key:"OZt",get:function(){return this.zKt.OZt}},{key:"_Ot",get:function(){return this.zKt._Ot}},{key:"JYt",get:function(){return this.zKt.JYt},set:function(t){this.zKt.JYt=t}},{key:"NKt",get:function(){return this.zKt.NKt}},{key:"VZt",get:function(){return this.zKt.VZt}},{key:"WZt",get:function(){return this.zKt.WZt}},{key:"Ont",get:function(){return this.zKt.Ont}},{key:"zZt",get:function(){return this.zKt.zZt}},{key:"W",get:function(){return this.uE}},{key:"uZt",get:function(){return this.zKt.uZt},set:function(t){this.zKt.uZt=t}}]),t}(),oJ=function(){function t(t,i,n,r){this.hS=void 0,this.KZt=void 0,this.JZt=void 0,this.ZZt=void 0,this.hS=t,this.KZt=i,this.ZZt=r,this.JZt=n}return xt(t,[{key:"o",get:function(){return this.hS}},{key:"BYt",get:function(){return this.KZt}},{key:"YZt",get:function(){return this.JZt}},{key:"dKt",get:function(){return this.ZZt}}]),t}();function hJ(t,i){var n;if(t.vastAdsRequest&&(n=function(t){if(t.adTagUrl)return t.adTagUrl;if(t.adsResponse)return PK(t.adsResponse);return}(t.vastAdsRequest)),!n){var r=function(t){var i=t.contentUrl||t.contentId;if(!i)return;var n=t.contentType||"video/mp4",r=tT(n)||iT(n)?"streaming":"progressive",e=void 0!==t.duration?""+eJ.DZt(t.duration)+"":"",s=void 0!==t.whenSkippable&&t.whenSkippable>=0?' skipoffset="'+eJ.DZt(t.whenSkippable)+'"':"",u=''+CK(i)+"",o=t.clickThroughUrl?""+CK(t.clickThroughUrl)+"":"",h=""+e+""+u+""+o+"",a=t.title?""+CK(t.title)+"":"";return''+a+""+h+""}(t);r&&(n=PK(r))}var e=t.customData;if(n){var s={integration:null==e?void 0:e.integration,sources:{src:n,type:"vast"},timeOffset:i};return s.integration&&"csai"!==s.integration&&"theo"!==s.integration||(s.skipOffset=t.whenSkippable),s}}var aJ=function(t){return t.$Zt="error",t.t$t="sourceupdate",t}({}),cJ=function(t){function i(i){var n;return(n=t.call(this,"error")||this).lt=void 0,n.lt=i,n}return Pt(i,t),i}(ah),fJ=function(t){function i(i,n){var r;return(r=t.call(this,"sourceupdate")||this).bt=void 0,r.Mc=void 0,r.bt=i,r.Mc=n,r}return Pt(i,t),i}(ah),vJ=function(t){function i(i,n,r){var e;return(e=t.call(this,n)||this).YBt=void 0,e.s$t=void 0,e.i$t=void 0,e.m$t=0,e.l$t=function(t){e.So(new cJ(t))},e.d$t=function(t){var i,n=new W$(K$(t.code),null!=(i=t.description)?i:void 0);e.l$t(n)},e.YBt=i,e.s$t=n,e.i$t=r,e}Pt(i,t);var n=i.prototype;return n.e$t=function(t){this.s$t.e$t(t)},n.n$t=function(t){this.s$t.n$t(t)},n.r$t=function(t){this.s$t.r$t(t)},n.h$t=function(t){this.s$t.h$t(t)},n.o$t=function(t){this.i$t.addUpdateListener(t)},n.a$t=function(t){this.i$t.removeUpdateListener(t)},n.u$t=function(){var t=this,i=new Xa,n=new chrome.cast.media.GetStatusRequest;return this.i$t.getStatus(n,function(){i.Xy({bt:t.NP(),Mc:t.nu()})},function(t){return i.jy(t)}),i.Qy},n.NP=function(){var t;return null==(t=this.i$t.customData)?void 0:t.currentSource},n.nu=function(){var t,i;if(null==(t=this.YBt.c$t())?void 0:t.version){var n;i=null==(n=this.i$t.customData)?void 0:n.sourceDescription}else{var r,e=null==(r=J$(this.i$t))?void 0:r.customData;(function(t){return Wi(t)&&t.theoplayer_version>=1&&Fi(t.streamStart)&&Fi(t.isLive)&&Fi(t.sourceDescription)})(e)&&(i=e.sourceDescription),i||(i=function(t){return{sources:[{src:t.contentId,type:t.contentType}],ads:dJ(t)}}(this.i$t.media))}return i},n.zx=function(){var t=new chrome.cast.media.PauseRequest;this.i$t.pause(t,yn,this.d$t)},n.Xx=function(){var t=new chrome.cast.media.StopRequest;this.i$t.stop(t,yn,this.d$t)},n.Gx=function(){var t=new chrome.cast.media.PlayRequest;this.i$t.play(t,yn,this.d$t)},n.My=function(t,i){var n=this,r=new chrome.cast.media.SeekRequest;return r.currentTime=t,r.resumeState=i?chrome.cast.media.ResumeState.PLAYBACK_PAUSE:chrome.cast.media.ResumeState.PLAYBACK_START,new ot(function(t,i){n.i$t.seek(r,t,function(t){var n;i(new W$(K$(t.code),null!=(n=t.description)?n:void 0))})})},n.vx=function(t){this.s$t._et(Z$,function(t){return{type:tK.cKt,properties:{playbackRate:t}}}(t)).catch(this.l$t)},n.f$t=function(t){var i=new chrome.cast.media.EditTracksInfoRequest(t);this.i$t.editTracksInfo(i,yn,this.d$t)},n.v$t=function(){return this.i$t.getEstimatedTime()},n._$t=function(){return this.i$t.getEstimatedBreakClipTime()},n.g$t=function(){return this.i$t.getEstimatedBreakTime()},n.p$t=function(){this.s$t._et("urn:x-cast:com.google.cast.media",{type:iK.SKIP_AD,requestId:this.m$t++,mediaSessionId:this.i$t.mediaSessionId}).catch(this.l$t)},n.kn=function(){this.Vo()},xt(i,[{key:"KD",get:function(){return this.i$t}}]),i}(uh);function dJ(t){return t.vmapAdsRequest&&t.vmapAdsRequest.adTagUrl?[{sources:{src:t.vmapAdsRequest.adTagUrl,type:"vmap"}}]:t.breaks&&t.breakClips?nr(t.breaks,function(i){return function(t,i){var n=function(){var n=e.value,s=Wn(i,function(t){return t.id===n});if(s){var u=hJ(s,t.position);u&&r.push(u)}},r=[];if(t.isWatched)return r;for(var e,s=Ft(t.breakClipIds);!(e=s()).done;)n();return r}(i,t.breakClips)}):[]}V(),It();var lJ=function(){function t(t){this.YBt=void 0,this.YBt=t}var i=t.prototype;return i.w$t=function(t,i){this.YBt.addMessageListener(t,i)},i.y$t=function(t,i){this.YBt.removeMessageListener(t,i)},i._et=function(t,i){var n=this;return new ot(function(r,e){n.YBt.sendMessage(t,i,r,function(t){var i;e(new W$(K$(t.code),null!=(i=t.description)?i:void 0))})})},i.kn=function(){},t}();function gJ(t){return"vmap"===t||"adrule"===t}function wJ(t){if(t)return qi(t)&&""!==t?{src:Jg(t),type:void 0}:function(t){return Wi(t)&&Boolean(t.src)}(t)&&""!==t.src?{src:Jg(t.src),type:mJ(t.type)}:void 0}function mJ(t){if(qi(t)){var i=t.toLowerCase();switch(i){case"vast":case"vmap":case"adrule":return i;default:return void Qe("The ad source type provided in the configuration could not be recognized: '"+t+"'.")}}else t||Qe("For better performance it is highly recommended to add the type to the configuration of your ad sources.")}function yJ(t){if(void 0!==t&&""!==t&&("string"==typeof t||"number"==typeof t)){switch(t){case"start":case"00:00:00":case"00:00:00.000":case"0%":case"0":return 0;case"end":case"100%":return-1}if("string"==typeof t){if(function(t){return rK.test(t)}(t))return eJ.CZt(t);if(pJ(t))return t}return Number(t)>=0?Number(t):void 0}}function pJ(t){return new RegExp(/^\d{1,2}%$/).test(t)}function _J(t){for(var i,n=[],r=function(t,i){if(ji(i))for(var e=0,s=i.length;e-1&&n.push(e)}var s=n.length?n:void 0;this.d0t(s)}},n.d0t=function(t){(function(t,i){return!t&&i||t&&!i||t&&i&&!ir(t,i)})(this.jdt,t)&&(this.jdt=t&&this.dO.fO(t)?t:void 0,this.So(new yL(this.jdt,this)))},n.unload=function(){for(var t,i=Ft(this.dO.II);!(t=i()).done;){t.value.mn("update",this.iLt)}this.dO.hr()},xt(i,[{key:"XI",get:function(){return this.Kdt}},{key:"YI",get:function(){return this.jdt},set:function(t){this.d0t(t),this.So(new qJ(this,t))}},{key:"KI",get:function(){return this.dO}},{key:"Th",get:function(){return this.pO},set:function(t){t!==this.pO&&(this.pO=t,this.So(new Tw(this)))}},{key:"Rt",get:function(){return this.We},set:function(t){this.We!==t&&(this.We=t,this.l0t!==t&&this.So(new zJ(this.jI,t)),this.So(new bw(this)))}},{key:"f0t",get:function(){return this.l0t},set:function(t){var i=this.We!==t;this.We=t,this.l0t=t,i&&this.So(new bw(this))}},{key:"Ca",get:function(){return this.hu||(this.hu=uw(this)),this.hu}},{key:"Xk",get:function(){return this.Rt?"enabled":"disabled"}}]),i}(uh);V(),It();var QJ=function(t){return t.v0t="legacy",t._0t="caf",t}({});V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt(),Nt(),H(),Ut(),V(),It(),V(),It();var YJ=function(){function t(t){this.qc=void 0,this.g0t=0,this.qc=t}var i=t.prototype;return i.Rc=function(){if(!(this.g0t>=this.qc.length)){var t=this.qc[this.g0t];return this.g0t+=1,t}},i.lt=function(){return this.Rc()},t}();function $J(t){var i,n,r;return null!=(r=null==(n=t.OZt)||null==(i=n.dKt)?void 0:i.lKt())?r:[]}var KJ=function(){},JJ=function(){function t(){this.hu=void 0}return t.prototype.wnt=function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get ads(){return t.Jc.map(function(t){return t.wnt()})},get integration(){return t.MZt},get maxDuration(){return t.p0t},get maxRemainingDuration(){return t.m0t},get timeOffset(){return t._Ot},get customData(){return t.X$t}}}(this)},t}(),ZJ=function(){function t(t,i){this.y0t=void 0,this.oa=void 0,this.y0t=t,this.oa=i}return xt(t,[{key:"w0t",get:function(){return this.y0t}},{key:"t",get:function(){return this.oa}}]),t}(),tZ=function(t){function i(i,n){var r;return(r=t.call(this)||this).GZt=void 0,r.k0t=void 0,r.T0t=[],r.E0t=[],r.GZt=i,r.k0t=n,r}Pt(i,t);var n=i.prototype;return n.b0t=function(t,i,n,r){var e=Wn(this.T0t,function(i){return i.PKt===t});if(void 0!==e)return e;var s=new eZ(t,i,this,this.k0t,n,r);return this.T0t.push(s),s},n.S0t=function(t,i,n,r,e){var s=Wn(this.E0t,function(i){return i.RKt===t});if(void 0!==s)return s;var u=new rZ(t,i,n,this,this.k0t,r,e);return this.E0t.push(u),u},xt(i,[{key:"uZt",get:function(){return this.GZt}},{key:"Jc",get:function(){for(var t,i=[],n=Ft(this.GZt.A0t);!(t=n()).done;)for(var r,e=t.value,s=Ft($J(e));!(r=s()).done;){var u,o,h=r.value,a=null!=(o=null==(u=h.IKt)?void 0:u.tYt)?o:[];if(h.PKt&&i.push(this.b0t(h.PKt,a,h.CKt,e.Ont)),h.RKt)for(var c,f=Ft(h.RKt.DKt);!(c=f()).done;){var v=c.value;i.push(this.S0t(v,a,h.RKt,h.CKt,e.Ont))}}return i}},{key:"MZt",get:function(){return CS.CSAI}},{key:"_Ot",get:function(){var t=this.GZt.dd;return t>=0?t:this.k0t.t.Nd()}},{key:"m0t",get:function(){for(var t,i=0,n=Ft(this.GZt.A0t);!(t=n()).done;)for(var r,e=Ft($J(t.value));!(r=e()).done;){var s=r.value;s.PKt&&!s.PKt.$Yt&&(i+=s.PKt.ct)}return this.k0t&&this.k0t.w0t&&(i+=this.k0t.w0t.ct-this.k0t.w0t.MP),i}},{key:"p0t",get:function(){for(var t,i=0,n=Ft(this.GZt.A0t);!(t=n()).done;)for(var r,e=Ft($J(t.value));!(r=e()).done;){var s=r.value;s.PKt&&(i+=s.PKt.ct)}return i}},{key:"X$t",get:function(){}}]),i}(JJ),iZ={height:0,width:0,clickThrough:"",contentHTML:"",resourceURI:"",altText:""},nZ=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this)||this).M0t=void 0,o.iYt=void 0,o.zKt=void 0,o.k0t=void 0,o.XYt=void 0,o.LZt=void 0,o.x0t=!1,o.M0t=i,o.iYt=n,o.zKt=r,o.k0t=e,o.XYt=s,o.LZt=u,o}Pt(i,t);var n=i.prototype;return n.P0t=function(){return this.x0t},n.I0t=function(){this.x0t=!0},n.R0t=function(t){return io({},iZ,{resourceURI:t.LJt||""})},n.C0t=function(t){return io({},iZ,{contentHTML:t.LJt.trim(),type:"HTMLResource"})},n.D0t=function(t){var i,n;return io({},iZ,{clickThrough:(null==(i=t.AYt)?void 0:i.trim())||"",resourceURI:(null==(n=t.LJt)?void 0:n.trim())||"",altText:t.wYt||"",type:"StaticResource"})},n.B0t=function(t,i,n){if(t&&i){var r="";return""+r+""}},n.IKt=function(t){var i=this;return t?t.map(function(t){var n,r={adSlotId:t.lYt||"",height:t.Mi||0,width:t.Ti||0};if(t.LKt){var e,s=i.D0t(t.LKt),u=s.clickThrough||(null==(e=t.gYt)?void 0:e.AYt);n=io({},s,{contentHTML:i.B0t(s.resourceURI,u,s.altText)||""})}else if(t.VKt)n=i.C0t(t.VKt);else{if(!t.FKt)return;n=i.R0t(t.FKt)}return jg(n,r)}).filter(function(t){return void 0!==t}):[]},n.N0t=function(){return this.M0t.yKt},xt(i,[{key:"od",get:function(){return this.zKt}},{key:"Ont",get:function(){return this.LZt}},{key:"CKt",get:function(){return this.XYt}}]),i}(KJ),rZ=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,i,n,e,s,u,o)||this).L0t=void 0,h.hu=void 0,h.L0t=r,h}Pt(i,t);var n=i.prototype;return n.xa=function(){var t=this.zKt,i={companions:this.IKt(this.iYt),type:"nonlinear",id:this.M0t.GKt,skipOffset:this.JYt,integration:this.LZt.integration,adSystem:this.M0t.yKt,get adBreak(){return t.wnt()},creativeId:this.M0t.GKt,universalAdIds:this.XYt.map(function(t){return{adIdRegistry:t.ZJt,adIdValue:t.tZt}})};return this.M0t.FKt?jg(this.R0t(this.M0t.FKt),i):this.M0t.VKt?jg(this.C0t(this.M0t.VKt),i):this.M0t.LKt?jg(this.D0t(this.M0t.LKt),i):i},n.wnt=function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()},n.O0t=function(){var t,i;return null!=(i=null==(t=this.M0t.LKt)?void 0:t.LJt)?i:""},n.F0t=function(){var t,i,n;return null!=(n=null==(i=this.M0t)||null==(t=i.LKt)?void 0:t.FJt)?n:""},xt(i,[{key:"RKt",get:function(){return this.M0t}},{key:"xKt",get:function(){return this.L0t}},{key:"JYt",get:function(){var t,i=this.M0t.od;return i&&i.Ont&&void 0!==i.Ont.skipOffset?eJ.NZt(i.Ont.skipOffset,this.k0t.w0t.ct):(null==(t=this.M0t.od)?void 0:t.JYt)||-1}}]),i}(nZ),eZ=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,r,e,s,u)||this).hu=void 0,o}Pt(i,t);var n=i.prototype;return n.xa=function(){var t,i=this.zKt,n=this.M0t;return{companions:this.IKt(this.iYt),duration:n.ct,id:n.GKt,mediaFiles:n.QYt,get mediaUrl(){return n.tJt},skipOffset:this.JYt,type:"linear",integration:this.LZt.integration,adSystem:n.yKt,width:void 0,height:void 0,get adBreak(){return i.wnt()},clickThrough:null==(t=n.FYt)?void 0:t.AYt,creativeId:n.GKt,universalAdIds:this.XYt.map(function(t){return{adIdRegistry:t.ZJt,adIdValue:t.tZt}}),closedCaptionFiles:n.eJt,extensions:n.nJt}},n.wnt=function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()},n.O0t=function(){return this.M0t.QYt.length>0?this.M0t.QYt[0].contentURL:""},n.F0t=function(){return this.M0t.QYt.length>0?this.M0t.QYt[0].type:""},xt(i,[{key:"PKt",get:function(){return this.M0t}},{key:"JYt",get:function(){var t=this.M0t.od;return t&&t.Ont&&void 0!==t.Ont.skipOffset?eJ.NZt(t.Ont.skipOffset,this.k0t.w0t.ct):this.M0t.JYt||-1}}]),i}(nZ);function sZ(t){return j(t,eZ)}V(),It();var uZ=function(t){return t.U0t="csai",t.V0t="google-ima",t.so="google-dai",t.H0t="freewheel",t.W0t="mediatailor",t.Iv="chromecast",t.ont="theoads",t}({});V(),It(),Nt();var oZ=function(t){function i(i){return t.call(this,"q0t",i)||this}return Pt(i,t),i.prototype.xa=function(){return new hZ(this.Int.wnt())},i}(iO),hZ=function(t){function i(i){return t.call(this,"updatead",i)||this}return Pt(i,t),i}(nO);V(),It(),Nt();var aZ=function(t){function i(i){return t.call(this,"z0t",i)||this}return Pt(i,t),i.prototype.xa=function(){return new cZ(this.Int.wnt())},i}(iO),cZ=function(t){function i(i){return t.call(this,"adloaded",i)||this}return Pt(i,t),i}(nO),fZ=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).oa=void 0,e.i$t=void 0,e.Q0t=void 0,e.X0t=[],e.G0t=void 0,e.M0t=void 0,e.hu=void 0,e.eh=function(t){var i;if(t){var n=e.i$t.KD,r=n.breakStatus,s=n.media,u=s.breakClips,o=s.breaks,h=null==(i=J$(n))?void 0:i.media,a=[];o&&u&&e.Y0t(o,u,h,a),e.t1t(r,a);for(var c,f=Ft(a);!(c=f()).done;){var v=c.value;e.So(v)}}},e.oa=i,e.i$t=n,e.Q0t=r,e.i$t.o$t(e.eh),e}Pt(i,t);var n=i.prototype;return n.M6=function(t,i,n){throw new _("Scheduling ads while casting is not supported.")},n.rD=function(){this.i$t.p$t()},n.Ent=function(t){var i;null==(i=this.Q0t)||i.Ent(t)},n.Tnt=function(t,i){var n;null==(n=this.Q0t)||n.Tnt(t,i)},n.K0t=function(t){return Wn(this.X0t,function(i){return i.o===t})},n.Y0t=function(t,i,n,r){for(var e,s=this.X0t,u=[],o=!1,h=Ft(t);!(e=h()).done;){var a=e.value,c=this.K0t(a.id);void 0===c&&(c=new vZ(a),r.push(new ZB(c))),!Fi(c.J0t)&&Fi(n)&&(c.J0t=this.Z0t(c.$0t,n));var f=c.Jc;c.er(a,i,n,r);for(var v,d=Ft(c.Jc);!(v=d()).done;){var l=v.value;Jn(f,l)||(r.push(new rO(l)),o=!0)}u.push(c)}this.X0t=u,o&&r.push(new dO);for(var g,w=Ft(s);!(g=w()).done;){var m=g.value;Jn(u,m)||r.push(new KB(m))}},n.t1t=function(t,i){var n,r,e=this.G0t,s=this.M0t;if(t){var u,o=t.breakId,h=t.breakClipId;n=o?this.K0t(o):void 0,r=h?null==(u=this.G0t)?void 0:u.i1t(h):void 0}if(this.G0t=n,this.M0t=r,n!==e&&(void 0!==e&&(e.e1t=void 0,i.push(new sO(e))),void 0!==n&&(n.e1t=this.i$t,i.push(new oO(n)))),r!==s){var a=this.oa.LP();void 0!==s&&i.push(new fO(s,a)),void 0!==r&&i.push(new aO(r,a))}},n.Z0t=function(t,i){if(i&&i.breaks){var n=Wn(i.breaks,function(i){return i.id===t.id});return n}},n.knt=function(t){for(var i,n=[],r=Ft(this.X0t);!(i=r()).done;){var e=i.value,s=e.Jc;if(e===this.G0t&&void 0!==this.M0t){var u=s.indexOf(this.M0t);u>=0&&(s=s.slice(u))}else if(e.j0t())continue;for(var o,h=Ft(s);!(o=h()).done;){var a=o.value.s1t();a&&n.push(a)}}for(var c,f=Ft(n);!(c=f()).done;){var v=c.value;t.M6(v,XB.gnt,!1)}},n.kn=function(){return this.Vo(),this.i$t.a$t(this.eh),void 0!==this.G0t&&(this.G0t.e1t=void 0,this.G0t=void 0),this.M0t=void 0,tr(this.X0t),ot.resolve(void 0)},n.Snt=function(t){},xt(i,[{key:"zc",get:function(){return void 0!==this.G0t}},{key:"mnt",get:function(){return this.M0t?[this.M0t]:[]}},{key:"ynt",get:function(){var t;return null!=(t=this.G0t)?t:null}},{key:"Ant",get:function(){var t=this;return nr(this.X0t,function(i){var n=i.Jc;if(i===t.G0t&&void 0!==t.M0t){var r=n.indexOf(t.M0t);if(r>=0)return n.slice(r+1)}return i.j0t()?[]:n})}},{key:"bnt",get:function(){var t=this;return this.X0t.filter(function(i){return i===t.G0t||!i.j0t()})}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=GB(this)}}]),i}(hh),vZ=function(t){function i(i){var n;return(n=t.call(this)||this).n1t=void 0,n.J0t=void 0,n.qc=[],n.e1t=void 0,n.n1t=i,n}Pt(i,t);var n=i.prototype;return n.j0t=function(){return this.n1t.isWatched},n.i1t=function(t){return Wn(this.qc,function(i){return i.o===t})},n.er=function(t,i,n,r){for(var e,s=function(s){var o=t.breakClipIds[s],h=Wn(i,function(t){return t.id===o});if(void 0===h)return"continue";var a=s0&&(t=Mn(this.qc,function(t){return t.ct}),E(t)&&(t=void 0)),t}},{key:"m0t",get:function(){var t=this.p0t;if(void 0!==t&&void 0!==this.e1t){var i=this.e1t.g$t();if(void 0!==i)return A.max(0,t-i)}return t}},{key:"_Ot",get:function(){return this.n1t.position}},{key:"X$t",get:function(){}}]),i}(JJ),dZ=function(){function t(t,i){this.a1t=void 0,this.r1t=void 0,this.od=void 0,this.hu=void 0,this.a1t=t,this.od=i}var i=t.prototype;return i.N0t=function(){return""},i.F0t=function(){var t;return null!=(t=this.a1t.contentType)?t:""},i.O0t=function(){var t,i;return null!=(i=null!=(t=this.a1t.contentUrl)?t:this.a1t.contentId)?i:""},i.er=function(t,i){var n=this.o,r=this.ct,e=this.a1t.contentUrl;this.a1t=t;var s=this.o,u=this.ct,o=this.a1t.contentUrl;n===s&&(r===u||E(r)&&E(u))&&e===o||i.push(new oZ(this)),E(r)&&!E(u)&&i.push(new aZ(this))},i.s1t=function(){var t;return this.r1t&&(t=hJ(this.r1t,this.od._Ot)),t||(t=hJ(this.a1t,this.od._Ot)),t},i.wnt=function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()},i.xa=function(){var t=this;return{get extensions(){return[]},get companions(){return t.tYt},get duration(){return t.ct},get id(){return t.o},get mediaFiles(){return t.QYt},get mediaUrl(){return t.tJt},get closedCaptionFiles(){return[]},get skipOffset(){return t.JYt},type:"linear",integration:uZ.Iv,get adSystem(){return t.N0t()},width:void 0,height:void 0,get adBreak(){return t.od.wnt()},get resourceURI(){return t.O0t()},get clickThrough(){return t.AYt},get creativeId(){return t.GKt},get customData(){return t.X$t},get isSlate(){return!1},get universalAdIds(){return t.CKt.map(function(t){return{adIdRegistry:t.ZJt,adIdValue:t.tZt}})}}},xt(t,[{key:"o1t",get:function(){return this.a1t}},{key:"o",get:function(){return this.a1t.id}},{key:"tYt",get:function(){return[]}},{key:"ct",get:function(){var t;return null!=(t=this.a1t.duration)?t:NaN}},{key:"QYt",get:function(){var t=this.O0t();return t?[{contentURL:t,delivery:"progressive",type:this.F0t(),width:0,height:0}]:[]}},{key:"tJt",get:function(){return this.O0t()}},{key:"JYt",get:function(){var t=this.a1t.whenSkippable;return void 0===t?void 0:t<0?-1:t}},{key:"AYt",get:function(){return this.a1t.clickThroughUrl}},{key:"GKt",get:function(){}},{key:"CKt",get:function(){return[]}},{key:"X$t",get:function(){}}]),t}();V(),It(),Bt(),Nt();var lZ=function(t){function i(i,n){var r;return void 0===n&&(n=Vi.Zs.Ke),(r=t.call(this)||this).pE=void 0,r.Ls=void 0,r.d1t=void 0,r.c1t=void 0,r.We=!1,r.l1t=function(t){t.stopPropagation(),r.So(new ah("clickstart"))},r.f1t=function(t){t.stopPropagation(),r.So(new ah("click"))},r.pE=i,r.d1t=n,r.Ls=v.createElement("a"),r.Ls.style.position="absolute",r.Ls.style.zIndex="11",r.Ls.target="Xu",r.d1t?(xx(r.Ls,"learn more"),r.Ls.className="theoplayer-ad-overlay-component theoplayer-ad-touch-clickthrough",r.Ls.setAttribute("rel","noopener")):ln(r.Ls),r.pE.appendChild(r.Ls),r.QU(),r}Pt(i,t);var n=i.prototype;return n.jU=function(){if(!this.We){this.We=!0,this.Ls.style.display="",this.d1t||(this.pE.style.cursor="pointer");var t=this.d1t?this.Ls:this.pE;Vi.Zs.Ke?(t.addEventListener("touchstart",this.l1t),t.addEventListener("touchend",this.f1t)):(t.addEventListener("mousedown",this.l1t),t.addEventListener("click",this.f1t))}},n.QU=function(){if(this.We){this.We=!1,this.Ls.style.display="none",this.d1t||(this.pE.style.cursor="");var t=this.d1t?this.Ls:this.pE;Vi.Zs.Ke?(t.removeEventListener("touchstart",this.l1t),t.removeEventListener("touchend",this.f1t)):(t.removeEventListener("mousedown",this.l1t),t.removeEventListener("click",this.f1t))}},n.zg=function(){this.Vo(),this.QU(),this.pE.removeChild(this.Ls)},xt(i,[{key:"u1t",get:function(){return this.c1t},set:function(t){this.c1t!==t&&(this.c1t=t,this.Ls.href=null!=t?t:"",t?this.jU():this.QU())}}]),i}(uh);V(),It(),Bt(),Nt(),V(),It(),Ut();var gZ=[1200,992,768,576],wZ={1200:"theo-size-xl",992:"theo-size-l",768:"theo-size-m",576:"theo-size-s"},mZ=function(){function t(t,i){var n=this;this.Ls=void 0,this.sc=void 0,this._1t=void 0,this.bn=void 0,this.Ls=t,this.sc=i,this.bn=function(t){n.v1t(t.width)},this._1t=yZ(i.Eu),hn(this.Ls,this._1t),i.wn(_I.yn,this.bn)}var i=t.prototype;return i.v1t=function(t){var i=yZ(t);i!==this._1t&&(hn(this.Ls,i),an(this.Ls,this._1t),this._1t=i)},i.kn=function(){this.sc.mn(_I.yn,this.bn)},t}();function yZ(t){for(var i,n=Ft(gZ);!(i=n()).done;){var r=i.value;if(t>r)return wZ[r]}return"theo-size-xs"}var pZ=function(t){function i(i,n){var r;return(r=t.call(this)||this).Ls=void 0,r.A1t=void 0,r.ud=void 0,r.tc=void 0,r.Yo=void 0,r.y1t=function(){r.So(new ah("rD"))},r.Ls=v.createElement("div"),r.xe.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",r.xe.style.position="absolute",r.ud=v.createElement("span"),r.xe.appendChild(r.ud),n&&(r.A1t=v.createElement("div"),r.A1t.className="theoplayer-ad-skip-poster",r.A1t.style.backgroundImage='url("'+Zo(n)+'")',r.xe.appendChild(r.A1t)),r.Yo="countdown",r.tc=new mZ(r.xe,i),r}Pt(i,t);var n=i.prototype;return n.g1t=function(t){"countdown"!==this.Yo&&(this.Yo="countdown",this.p1t(),this.xe.classList.remove("theoplayer-ad-skip-button"),this.xe.classList.add("theoplayer-ad-skip-countdown")),this.UT="You can skip in "+A.round(t)+" seconds"},n.m1t=function(){"skip"!==this.Yo&&(this.Yo="skip",this.UT="Skip Ad",this.w1t(),this.xe.classList.remove("theoplayer-ad-skip-countdown"),this.xe.classList.add("theoplayer-ad-skip-button"))},n.w1t=function(){this.xe.addEventListener("mouseup",this.y1t),this.xe.addEventListener("touchend",this.y1t)},n.p1t=function(){this.xe.removeEventListener("mouseup",this.y1t),this.xe.removeEventListener("touchend",this.y1t)},n.kn=function(){this.Vo(),this.p1t(),this.tc.kn(),Zi(this.Ls),Zi(this.ud),this.A1t&&Zi(this.A1t)},xt(i,[{key:"xe",get:function(){return this.Ls}},{key:"Xk",get:function(){return this.Yo}},{key:"UT",get:function(){return this.ud.textContent||""},set:function(t){xx(this.ud,t)}}]),i}(uh),_Z=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).oa=void 0,u.YBt=void 0,u.i$t=void 0,u.OPt=OA.iL(),u.q1t=void 0,u.WA=void 0,u.Z4=!1,u.JW=void 0,u.kz=void 0,u.Ez=void 0,u.M1t=void 0,u.t5=Up.VL,u.X1t=!1,u.Ho=OA.iL(),u.N4=void 0,u.Sz=!1,u.$$t=void 0,u.i0t=void 0,u.e0t=void 0,u.YL=new aw,u.$L=new aw,u.Gl=new rp,u.qc=void 0,u.Q1t=void 0,u.Y1t=void 0,u.$1t=void 0,u.LEt=NaN,u.W1t=void 0,u.N1t=!1,u.H1t=NaN,u.U1t=void 0,u.x1t=0,u.i2t=function(t,i){switch(t){case"buffered":u.OPt=new OA(i),u.So(new eC(u.LP()));break;case"currentProgramDateTime":u.q1t=new Date(i).getTime()-u.LP();break;case"played":u.Ho=new OA(i);break;case"seekable":u.C1t();break;case"videoHeight":u.F1t(void 0,i);break;case"videoWidth":u.F1t(i,void 0)}},u.e4=function(t){switch(t.type){case ch.$w:u.Je(t.currentTime);break;case ch.Zw:u.Rq();break;case ch.Yw:u.So(new OL(t.representation,t.previousRepresentation));break;case ch.iy:u.So(new aL(t.segmentStartTime,t.error,t.trackType,t.track,t.quality,t.retryCount));break;case ch.Dw:u.So(new Pj(t.currentTime,t.initDataType,t.initData));break;case ch.Ew:u.So(new dD(new vw(gd.CONTENT_PROTECTION_ERROR,t.error,void 0,t.licenseAcquisitionURL,t.status,t.statusText,t.licenseAcquisitionMessage,t.systemCode)));break;case ch.Pw:u.So(new lD)}},u.W$t=function(t){u.C1t(),u.B1t(),u.hh(),u.L1t(),u.V1t(),u.R1t(),u.T1t(),u.b1t(),u.j1t(),u.K1t(),u.Z1t(),t||kZ(u.i$t.KD)&&u.Eh()},u.bd=function(){u.V1t(),u.Z1t()},u.e2t=function(t){u.So(t)},u.z1t=kn(function(t){return u.y7(t)},50),u.l$t=function(t){u.W1t=void 0,u.So(new cJ(t))},u.J1t=function(){u.zx()},u.t2t=function(){u.qc.rD()},u.oa=i,u.YBt=r,u.i$t=e,u.qc=new fZ(i,e,n.Jc),u.$$t=s.s0t(),u.WA=s.Nd()-u.$$t,u.kz=s.ox(),u.Ez=s.lx(),u.i0t=s.Nx(),u.e0t=s.Cx(),u.i$t.r$t(u.e4),u.i$t.e$t(u.i2t),u.i$t.o$t(u.W$t),u.i$t.wn(aJ.$Zt,u.e2t),u.i$t.u$t().then(function(t){u.So(new fJ(t.bt,t.Mc))},u.l$t),u}Pt(i,t);var n=i.prototype;return n.b1t=function(){var t=this.i$t.KD.activeTrackIds;if(t){if(this.S1t()){var i=this.$L.II.map(function(t){return t.o}),n=this.YL.II.map(function(t){return t.o});Jn(i.concat(n),"0")&&t.push(0)}SZ(t,this.YL),SZ(t,this.$L),function(t,i){for(var n,r=!1,e=Ft(i.II);!(n=e()).done;){var s=n.value;s.u0t=Jn(t,s.jI)?$y.Kn:$y.Nh}}(t,this.Gl)}},n.T1t=function(){var t,i=null==(t=this.i$t.KD.media)?void 0:t.tracks;if(i){var n=i.filter(VJ),r=i.filter(jJ),e=i.filter(HJ);if(this.S1t()&&0===r.length&&0!==this.Nx()){var s=this.k1t();r.push(s)}if(this.S1t()&&0===n.length){var u=this.E1t();n.push(u)}AZ(this.YL,n.map(function(t){return t.trackId})),AZ(this.$L,r.map(function(t){return t.trackId})),AZ(this.Gl,e.map(function(t){return t.trackId})),TZ(n,this.YL),TZ(r,this.$L),function(t,i){for(var n,r=!1,e=Ft(t);!(n=e()).done;){var s=n.value,u=bZ(i,s.trackId);u||(u=new WJ(s),i.tt(u),r=!0)}}(e,this.Gl)}},n.P1t=function(){this.kz||(this.x1t=m(this.bd,250))},n.I1t=function(){y(this.x1t)},n.R1t=function(){this.I1t(),this.P1t()},n.C1t=function(){var t,i,n=this.i$t.KD,r=n.media,e=null!=(i=null==r?void 0:r.duration)?i:NaN,s=(null==r?void 0:r.streamType)===chrome.cast.media.StreamType.LIVE||e<0,u=s?1/0:e;this.WA=u,this.D1t();var o=n.getEstimatedLiveSeekableRange(),h=null==(t=n.customData)?void 0:t.buffers;if(Fi(o)){var a=o.start,c=o.end,f=o.isMovingWindow,v=void 0===f?s:f,d=o.isLiveDone,l=void 0!==d&&d;this.hUt(a,c,v,l)}else if(Fi(h)){var g=h.seekable,w=g[0],m=g[1];this.hUt(w,m,s,!1)}else s?this.hUt(void 0,void 0,!0,!1):this.hUt(0,u,!1,!1)},n.B1t=function(){var t=this.i$t.KD,i=function(t){return void 0!==t&&t.playerState===chrome.cast.media.PlayerState.PAUSED}(t)||kZ(t);this.N1t=i,this.kz!==i&&(this.kz=i,this.kz?this.So(new pT(this.LP())):this.So(new _T(this.LP())))},n.hh=function(){var t=this.i$t.KD.playbackRate;this.M1t!==t&&(this.M1t=void 0,this.Ez!==t&&(this.Ez=t,this.So(new bT(this.LP(),t))))},n.L1t=function(){var t;switch(this.i$t.KD.playerState){case chrome.cast.media.PlayerState.IDLE:t=Up.VL;break;case chrome.cast.media.PlayerState.BUFFERING:t=Up.Qn;break;case chrome.cast.media.PlayerState.PAUSED:case chrome.cast.media.PlayerState.PLAYING:t=Up.WL}this.e5(t),this.O1t()},n.hUt=function(t,i,n,r){Fi(t)&&Fi(i)?this.N4=new wP(t,i,n,n&&!r):this.N4=void 0},n.F1t=function(t,i){this.e0t=null!=i?i:this.e0t,this.i0t=null!=t?t:this.i0t,this.So(new Bp)},n.Je=function(t){this.U1t!==t?(this.Sz=!0,this.So(new TT(this.LP()))):this.U1t=void 0},n.Rq=function(){if(this.Sz){this.Sz=!1;var t=this.LP();this.So(new Eg(t,this.DP())),this.So(new ST(t))}},n.Eh=function(){this.Z4=!0,this.VP()&&this.So(new AT(this.LP()))},n.D1t=function(){var t=this.LEt,i=this.Nd();t===i||E(t)&&E(i)||(this.LEt=i,this.So(new kT(i)))},n.V1t=function(){var t=this.LP();this.Sz||this.H1t===t||(this.H1t=t,this.So(new Eg(t,this.DP())))},n.t0t=function(){this.kz&&(this.kz=!1,this.So(new _T(this.LP())),this.e5(Up.VL))},n.Zst=function(){return this.qc},n.RP=function(){return this.OPt.Ny(this.$$t)},n.LP=function(){if(this.qc.zc){var t=this.i$t._$t();if(void 0!==t)return t}return this.Hst()},n.Hst=function(){return void 0!==this.W1t?this.$$t+this.W1t:this.Z4?this.Nd():this.$$t+this.i$t.v$t()},n.DP=function(){if(this.q1t)return new Date(this.Hst()+this.q1t)},n.Nd=function(){if(this.qc.zc){var t,i=null==(t=this.qc.mnt[0])?void 0:t.ct;if(void 0!==i&&!E(i))return i}return this.$$t+this.WA},n.HP=function(){return this.JW},n.VP=function(){return!this.qc.zc&&this.Z4},n.ox=function(){return this.kz},n.lx=function(){return this.Ez},n.vx=function(t){this.Ez!==t&&(this.M1t=this.Ez,this.Ez=t,this.So(new bT(this.LP(),t)),this.i$t.vx(t))},n.bx=function(){return this.t5},n.gx=function(){return this.qc.zc?OA.tL(0,this.LP()):this.Ho.Ny(this.$$t)},n.Tx=function(){var t,i;if(this.qc.zc)return OA.iL();var n=null!=(i=null==(t=this.N4)?void 0:t.z3().Ny(this.$$t))?i:OA.iL();if(n.V>0){var r=n.An(n.V-1);n=n.OM(OA.tL(r,this.LP()))}return n},n.Ex=function(){return this.Sz},n.EP=function(){return this.YL},n.Dx=function(){return this.$L},n.Ix=function(){return this.Gl},n.k1t=function(){return{customData:{activeQuality:{averageBandwidth:0,bandwidth:0,codecs:"",frameRate:0,height:this.Cx(),id:"0",name:"",width:this.Nx()},enabled:!0,id:"0",kind:"main",label:"",language:"",qualities:[],uid:0},language:"",name:"",trackContentId:"",trackContentType:"",trackId:0,type:FJ.Bk}},n.E1t=function(){return{customData:{activeQuality:{averageBandwidth:0,bandwidth:0,codecs:"",id:"0",name:"",audioSamplingRate:0},qualities:[],enabled:!0,id:"0",kind:"main",label:"",language:"",uid:0},language:"",name:"",trackContentId:"",trackContentType:"",trackId:0,type:FJ.Dk}},n.S1t=function(){var t,i;return!(void 0!==(null==(t=this.YBt.c$t())?void 0:t.version))||(null==(i=this.YBt.c$t())?void 0:i.sdkType)===QJ._0t},n.f$t=function(t){this.S1t()&&Yn(t,0),this.i$t.f$t(t)},n.Nx=function(){return this.i0t},n.Cx=function(){return this.e0t},n.Gx=function(){this.kz&&(this.kz=!1,this.N1t=!1,this.So(new _T(this.LP()))),this.i$t.Gx()},n.zx=function(){this.kz||(this.kz=!0,this.N1t=!0,this.So(new pT(this.LP()))),this.i$t.zx()},n.My=function(t){if(!this.qc.zc){var i=A.max(0,t-this.$$t);i=A.round(1e6*i)/1e6;var n=this.W1t;this.W1t=i,this.N1t=this.ox(),this.U1t=i,this.Sz=!0,this.So(new TT(this.LP())),void 0===n&&(this.S1t()?this.z1t(i):this.y7(i))}},n.y7=function(t){this.i$t.My(t,this.N1t).then(this.G1t(t)).catch(this.l$t)},n.G1t=function(t){var i=this;return function(){void 0!==i.W1t&&(i.W1t===t?i.W1t=void 0:i.y7(i.W1t))}},n.e5=function(t){this.t5!==t&&(this.t5=t,this.So(new Fp(this.LP(),t))),void 0===this.W1t&&this.Sz&&t>=Up.HL&&this.Rq(),this.O1t()},n.O1t=function(){if(this.kz)this.X1t=!1;else{var t=this.t5>=Up.WL;this.X1t!==t&&(this.X1t=t,t?this.So(new qp(this.LP())):this.So(new Hp(this.LP())))}},n.j1t=function(){this.Q1t||(this.Q1t=v.createElement("div"),this.oa.xe.appendChild(this.Q1t),this.Q1t.className="theoplayer-ad-linear theoplayer-chromecast-ad",this.Q1t.style.zIndex="10",ln(this.Q1t)),this.Q1t.style.display=this.qc.zc?"":"none"},n.K1t=function(){var t,i=null==(t=this.qc.mnt[0])?void 0:t.AYt;i&&!this.Y1t?(this.Y1t=new lZ(this.Q1t,!0),this.Y1t.u1t=i,this.Y1t.wn("clickstart",this.J1t)):this.Y1t&&(this.Y1t.u1t=i)},n.Z1t=function(){var t,i=null==(t=this.qc.mnt[0])?void 0:t.JYt;if(void 0===i||i<0)this.$1t&&(this.$1t.kn(),this.$1t=void 0);else{if(!this.$1t){var n,r=null==(n=this.oa.Na)?void 0:n.gi;this.$1t=new pZ(this.oa.Wu,r),this.Q1t.appendChild(this.$1t.xe),this.$1t.wn("rD",this.t2t)}var e=this.i$t._$t();void 0!==e&&(e0&&i.end(i.length-1)-i.start(0)>60?"dvr":"live":"vod"}var RZ=[ch.Bw,ch.Rw,ch.Kw,ch.Jw,ch.jw,ch.uo,ch.Qw,ch._y,ch.$w,ch.Zw,Mp.SM,Mp.TM,ch.Yw,ch.iy,ch.Dw,ch.Ew,ch.Pw],CZ=function(t){function i(i,n){var r;return(r=t.call(this,i,!0)||this).ho=!1,r.P2t=yn,r.EV=Up.VL,r.AV=!1,r.SV=!1,r.u2t=!1,r.o2t=void 0,r.YBt=void 0,r.ib=void 0,r.Tz=void 0,r.Ra=void 0,r.fz=void 0,r.Ac=void 0,r.JW=void 0,r.ZW=void 0,r.YL=new hA,r.$L=new hA,r.Gl=new aA,r.qc=void 0,r.ha=new aS,r.ZL=new cA,r.Mst=new EZ,r.b2t=void 0,r.S2t=void 0,r.T2t=void 0,r.R2t=function(t){var i,n;(Fi(t.Mx)&&!Pn(t.Mx,r.ib,1e-5)||Fi(t.$P)&&t.$P!==r.Tz)&&(r.ib=null!=(i=t.Mx)?i:r.ib,r.Tz=null!=(n=t.$P)?n:r.Tz,r.So(new ET(r.MP,r.ib)))},r.C2t=function(){var t=r.YBt.q$t();r.Ylt=t?new _Z(r,r.oa,r.YBt,t,r.Ra):r.x2t()},r.r2t=function(t){r.Az(t.bt),r.s2t(t.Mc)},r.D2t=function(t){var i=r.n2t(t.$D);if(i){var n={targetQualityIds:t.B$t};i.c0t(n)}},r.e2t=function(t){r.d2t(t.lt)},r.d2t=function(t){r.P2t&&r.P2t(t)},r.I2t=function(t){r.JW=t.lt,r.ZW=yw(r.JW),r.So(new Ib(r.ZW))},r.m2t=function(t){if(t.enabled)for(var i,n=Ft((r.rt.II.some(function(i){return i.jI===t.trackId})?r.rt:r.ht).II);!(i=n()).done;){var e=i.value;e.Rt&&e.jI!==t.trackId&&(e.Rt=!1)}},r.w2t=function(t){if(t.mode===$y.Kn)for(var i,n=Ft(r.nt.II);!(i=n()).done;){var e=i.value;e.Xk===$y.Kn&&e.jI!==t.trackId&&op(e.Lt,t.track.Lt)&&(e.Xk=$y.Nh)}},r.b1t=kn(function(){r.y2t()},50),r.g2t=function(){var t,i,n=[],e=null!=(t=Wn(r.ht.II,function(t){return qZ(t,r.b2t)}))?t:Wn(r.ht.II,function(t){return t.Rt});e&&n.push(e.jI);var s,u=null!=(i=Wn(r.nt.II,function(t){return qZ(t,r.S2t)}))?i:Wn(r.nt.II,function(t){return t.Xk===$y.Kn});u&&n.push(u.jI);var o=null!=(s=Wn(r.rt.II,function(t){return qZ(t,r.T2t)}))?s:Wn(r.rt.II,function(t){return t.Rt});o&&n.push(o.jI),0!==n.length&&r.Ra.f$t(n)},r.Opt=function(t){var i=r.k2t(t.targetQuality),n=t.track;r.YBt.N$t(n.jI,n.B3,i)},r.FV=function(t){r.So(t);var i=t.readyState;!r.AV&&r.EV===Up.VL&&i>=Up.Qn&&(r.AV=!0,r.So(new Vp(t.currentTime))),!r.SV&&r.EV<=Up.Qn&&i>=Up.HL&&(r.SV=!0,r.So(new jp(t.currentTime))),r.EV<=Up.HL&&i>=Up.WL&&r.So(new Wp(t.currentTime)),r.EV<=Up.WL&&i===Up.qL&&r.So(new zp(t.currentTime)),r.EV=i},r.ib=r.oa.Mx,r.Tz=r.oa.$P,r.YBt=n,r.YBt.wn(AJ.$Zt,r.e2t),r.YBt.wn(AJ.R$t,r.I2t),r.YBt.wn(AJ.gy,r.R2t),r.YBt.wn(AJ.I$t,r.C2t),r.YBt.wn(AJ.C$t,r.D2t),r.qc=new gO(r),r.fz=r.oa.bt,r.Ac=r.oa.nu(),r.Ylt=new OJ(r,0,r.oa.Hst(),r.oa.Nd(),r.oa.UP,r.oa.hx,r.oa.ux,r.oa.Bx,r.oa.Rx),r.l2t(),r}Pt(i,t);var n=i.prototype;return n.Az=function(t){t&&(Wg(this.fz&&Gg(this.fz),t&&Gg(t))||(this.fz=t,this.So(new FT(t))))},n.s2t=function(t){if(t){var i=pE(t,this.oa.Cd);Wg(this.Ac&&Gg(this.Ac),i&&Gg(i))||(this.Ra.n0t(0),this.Ac=i,this.So(new VB(i)),this.Ra.t0t())}},n.n2t=function(t){for(var i,n=Ft(this.rt.II);!(i=n()).done;){var r=i.value;if(r.jI===t)return r}for(var e,s=Ft(this.ht.II);!(e=s()).done;){var u=e.value;if(u.jI===t)return u}},n.Zst=function(){return this.qc},n.$st=function(){return this.Mst},n.EP=function(){return this.YL},n.RP=function(){return this.Ra.RP()._s()},n.Un=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return t?[4,this.z$t(t,null!=(n=t.ads)?n:[],t.streamType,NaN,0,null!=i?i:0)]:[2];case 1:return r.sent(),[2]}})}).call(this)},n.a2t=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:return(n=null!=(i=this.o2t)?i:this.Ac)?(e=this.o2t?null!=(r=this.o2t.ads)?r:[]:this.Wnt(),s=this.oa.Nd(),u=this.oa.Tx(),o=IZ(s,u,n.streamType),h=u.length>0?u.start(0):0,a=null!=t?t:this.Hst(),[4,this.z$t(n,e,o,s,h,a)]):[2];case 1:return c.sent(),[2]}})}).call(this)},n.Wnt=function(){var t=new mO;return this.qc.knt(t),t.Wnt()},n.DP=function(){return this.Ra.DP()},n.NP=function(){return this.fz},n.LP=function(){return this.Ra.LP()},n.Hst=function(){return this.Ra.Hst()},n.OP=function(t,i){this.u2t||(this.YBt.q$t()||this.u2t||!this.Ac?this.Ra.My(t):this.Un(this.Ac,t))},n.Nd=function(){return this.Ra.Nd()},n.VP=function(){return this.Ra.VP()},n.HP=function(){return this.JW},n.qP=function(){return this.ZW},n.GP=function(){return this.ZL},n.ZP=function(){return this.oa.JP},n.tx=function(){return this.Tz},n.ix=function(t){this.Tz=t,this.So(new ET(this.MP,this.Mx)),this.YBt.ix(t)},n.ox=function(){return this.Ra.ox()},n.lx=function(){return this.Ra.lx()},n.vx=function(t){this.Ra.vx(t)},n.gx=function(){return this.Ra.gx()._s()},n.wx=function(){return eS.OL},n.yx=function(t){},n.bx=function(){return this.Ra.bx()},n.Tx=function(){return this.Ra.Tx()._s()},n.Ex=function(){return this.Ra.Ex()},n.nu=function(){return this.Ac},n.Ta=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Ac=t,[4,this.Un(t)];case 1:return i.sent(),this.o2t=void 0,this.Ra.t0t(),[2]}})}).call(this)},n.Ix=function(){return this.Gl},n.Cx=function(){return this.Ra.Cx()},n.Nx=function(){return this.Ra.Nx()},n.Dx=function(){return this.$L},n.Lx=function(){return this.ib},n.Ox=function(t){this.ib=t,this.So(new ET(this.MP,this.Mx)),this.YBt.Ox(t)},n.Wx=function(){},n.Hx=function(){return this.ha},n.qx=function(){},n.Gx=function(){this.YBt.q$t()||this.u2t||!this.Ac?this.Ra.Gx():this.Un(this.Ac)},n.zx=function(){this.Ra.zx()},n.gr=function(){this.ho=!0},n.mr=function(){this.fz=void 0,this.ho=!1},n.be=function(){},n.we=function(){},n.z$t=function(t,i,n,r,e,s){return jt(function(){var u,o,h,a;return zt(this,function(c){switch(c.label){case 0:this.u2t=!0,this.c2t(),this.Ra.n0t(e),o=function(t,i,n,r){return{theoplayer_version:1,streamStart:t,isLive:i,sourceDescription:n,configuration:r}}(e,u="live"===n||"dvr"===n,t,this.Cd),h={G$t:t,Jc:i,MP:A.max(0,s-e),ct:r,b0:u?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED,X$t:o},c.label=1;case 1:return c.trys.push([1,3,4,5]),[4,this.YBt.z$t(h)];case 2:return c.sent(),[3,5];case 3:return a=c.sent(),this.d2t(a),[3,5];case 4:return this.u2t=!1,[7];case 5:return[2]}})}).call(this)},n.l2t=function(){this.f2t(this.YL),this.f2t(this.$L),this.v2t(this.Gl)},n.f2t=function(t){for(var i,n=this,r=Ft(t.II);!(i=r()).done;){var e=i.value;this._2t(e)}t.wn(Ng.eI,function(t){n._2t(t.Ht),n.g2t()})},n.v2t=function(t){for(var i,n=this,r=Ft(t.II);!(i=r()).done;){var e=i.value;this.p2t(e)}t.wn(Ng.eI,function(t){n.p2t(t.Ht),n.g2t()})},n._2t=function(t){t.wn(MJ.h0t,this.Opt),t.wn(MJ.o0t,this.m2t),t.wn(MJ.o0t,this.b1t)},n.p2t=function(t){t.wn(MJ.r0t,this.w2t),t.wn(MJ.r0t,this.b1t)},n.y2t=function(){for(var t,i=[],n=Ft(this.rt.II);!(t=n()).done;){var r=t.value;r.Rt&&i.push(r.jI)}for(var e,s=Ft(this.ht.II);!(e=s()).done;){var u=e.value;u.Rt&&i.push(u.jI)}for(var o,h=Ft(this.nt.II);!(o=h()).done;){var a=o.value;a.Xk===$y.Kn&&i.push(a.jI)}this.Ra.f$t(i)},n.A2t=function(t,i,n){this.b2t=t,this.S2t=i,this.T2t=n},n.k2t=function(t){var i,n;return!!t&&((null!=(n=null==(i=this.YBt.c$t())?void 0:i.version)?n:-1)>=2?t.map(function(t){return t.o}):[t[0].o])},n.E2t=function(t){this.P2t=t},n.Yx=function(){},n.Jx=function(){},n.tI=function(t){throw new p("Can't add a track while casting.")},n.Xx=function(){return jt(function(){return zt(this,function(t){return this.Ra.Xx(),this.c2t(),[2]})}).call(this)},n.c2t=function(){this.EV=Up.VL,this.AV=!1,this.SV=!1,this.JW=void 0,this.ZW=void 0},n.kn=function(){return jt(function(){return zt(this,function(t){return this.c2t(),this.Vo(),this.Ylt=this.x2t(),this.YBt.mn(AJ.$Zt,this.e2t),this.YBt.mn(AJ.R$t,this.I2t),this.YBt.mn(AJ.gy,this.R2t),this.YBt.mn(AJ.I$t,this.C2t),this.YBt.mn(AJ.C$t,this.D2t),this.YBt.kn(),[2]})}).call(this)},n.x2t=function(){return new OJ(this,this.Ra.s0t(),this.Ra.LP(),this.Ra.Nd(),this.Ra.VP(),this.Ra.ox(),this.Ra.lx(),this.Ra.Nx(),this.Ra.Cx())},xt(i,[{key:"Ylt",get:function(){return this.Ra},set:function(t){var i=this.Ra;i&&(i.mn(aJ.$Zt,this.e2t),i.mn(aJ.t$t,this.r2t),i.mn(RZ,this.Rs),i.mn(Mp.wI,this.FV),t.n0t(i.s0t()),i.knt(t.Zst())),this.Ra=t,this.YL.BI=t.EP(),this.$L.BI=t.Dx(),this.Gl.BI=t.Ix(),this.qc.BI=t.Zst(),i&&i.kn(),t.wn(aJ.$Zt,this.e2t),t.wn(aJ.t$t,this.r2t),t.wn(RZ,this.Rs),t.wn(Mp.wI,this.FV)}},{key:"ro",get:function(){return this.ho}},{key:"Jc",get:function(){return this.Zst()}},{key:"h2t",get:function(){return this.o2t||this.Ac},set:function(t){this.o2t=t}},{key:"MP",get:function(){return this.LP()},set:function(t){this.OP(t)}},{key:"Vx",get:function(){return!1},set:function(t){}}]),i}(Gb);V(),It(),Nt();var PZ=function(t){function i(i){var n;return(n=t.call(this,"error")||this).lt=void 0,n.lt=i,n}return Pt(i,t),i.prototype.xa=function(){return new NZ(this.lt)},i}(Ig),NZ=function(t){function i(i){var n;return(n=t.call(this,"error")||this).error=void 0,n.error=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var DZ=function(t){function i(i){var n;return(n=t.call(this,"statechange")||this).state=void 0,n.state=i,n}return Pt(i,t),i}(ah);function xZ(t,i){var n;return{get casting(){return t.bJ},get error(){return t.lt},get receiverName(){return t.B2t},get state(){return t.Ylt},start:function(){t.Tn()},stop:function(){t.Xx()},join:function(){t.N2t()},leave:function(){t.M2t()},set connectionCallback(t){null==i||i.L2t(t)},get connectionCallback(){return null==i?void 0:i.O2t()},get source(){return n||t.Mc},set source(i){n=i,t.Mc=i},addEventListener:function(i,n){var r=tw(i,Jg);t.wn(r,n)},removeEventListener:function(i,n){var r=tw(i,Jg);t.mn(r,n)}}}V(),It();var BZ=function(t){function i(i,n,r,e){var s;return(s=t.call(this)||this).YS=void 0,s.JW=void 0,s.hu=void 0,s.V2t=void 0,s.oa=void 0,s.Ra=YS.UNAVAILABLE,s.q2t=void 0,s.CY=void 0,s.F2t=void 0,s.H2t=!1,s.rV=new dr,s.n3t=function(){s.F2t.wn(DJ.Z$t,s.s3t),s.Ylt=s.F2t.r3t()},s.s3t=function(t){var i=t.Ylt;s.Ylt=i,i!==YS.UNAVAILABLE&&i!==YS.AVAILABLE||s.j2t(!1).catch(s.e8)},s.o2t=void 0,s.e8=function(t){mr(t)||j(t,W$)&&(s.JW=t,s.So(new PZ(t).Ca))},s.CY=i,s.V2t=n,s.F2t=e,s.YS=r.chromecast,s.q2t=br(s.F2t.VY(s.YS,s.rV.Yg),s.rV),s.q2t.then(s.n3t).catch(s.e8),s}Pt(i,t);var n=i.prototype;return n.W2t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:if(!this.q2t)throw new p("Chromecast must be initialized before starting a session");return[4,this.q2t];case 1:return t.sent(),this.F2t.U2t()?[3,3]:[4,this.F2t.z2t()];case 2:t.sent(),t.label=3;case 3:return[2]}})}).call(this)},n.Tn=function(){return jt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:this.H2t=!0,r.label=1;case 1:return r.trys.push([1,5,,6]),this.Ylt=YS.CONNECTING,[4,this.W2t()];case 2:return r.sent(),[4,this.G2t()];case 3:return r.sent(),this.oa&&(t=this.V2t.nu(),i=this.F2t.X2t(t),this.oa.h2t=i?pE(i,this.V2t.Cd):this.o2t,this.oa.a2t()),this.Ylt=YS.CONNECTED,[4,this.V2t.Xx()];case 4:return r.sent(),[3,6];case 5:return n=r.sent(),this.j2t(!1).catch(yn),this.Ylt=YS.AVAILABLE,mr(n)||this.e8(n),[3,6];case 6:return[2]}})}).call(this)},n.N2t=function(){return jt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:this.H2t=!0,r.label=1;case 1:return r.trys.push([1,5,,7]),this.Ylt=YS.CONNECTING,[4,this.W2t()];case 2:return r.sent(),[4,this.G2t()];case 3:return r.sent(),this.oa&&(t=this.V2t.nu(),(i=this.F2t.Q2t(t))&&(this.oa.h2t=pE(i,this.V2t.Cd))),this.Ylt=YS.CONNECTED,[4,this.V2t.Xx()];case 4:return r.sent(),[3,7];case 5:return n=r.sent(),[4,this.j2t(!0).catch(yn)];case 6:return r.sent(),this.Ylt=YS.AVAILABLE,mr(n)||this.e8(n),[3,7];case 7:return[2]}})}).call(this)},n.K2t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.F2t.U2t()?[4,this.Tn()]:[2];case 1:return t.sent(),[2]}})}).call(this)},n.G2t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return null!=this.oa||(this.oa=this.Y2t()),this.JW=void 0,this.V2t.zx(),[4,this.CY.J2t(this.oa)];case 1:return t.sent(),[2]}})}).call(this)},n.Y2t=function(){var t=new CZ(this.V2t,this.F2t.U2t());return t.E2t(this.e8),t},n.Z2t=function(){this.oa&&(this.oa.kn(),this.oa=void 0)},n.j2t=function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:if(this.H2t=!1,!this.oa)return[2];i=this.oa.ro,n=this.oa.nu(),r=this.oa.Hst(),s.label=1;case 1:return s.trys.push([1,,4,5]),i?(null!=(e=t?this.F2t.$2t(n):this.F2t.t3t(n))||(e=n),[4,this.CY.i3t(e,e===n)]):[3,3];case 2:s.sent(),this.V2t.OP(r),this.V2t.Gx(),s.label=3;case 3:return[3,5];case 4:return this.Z2t(),[7];case 5:return[2]}})}).call(this)},n.M2t=function(){this.bJ&&(this.F2t.e3t(!1),this.j2t(!0).catch(this.e8))},n.Xx=function(){this.bJ&&(this.F2t.e3t(!0),this.j2t(!1).catch(this.e8))},n.kn=function(){this.rV.Zg(),this.F2t.mn(DJ.Z$t,this.s3t),this.Vo(),this.Z2t()},xt(i,[{key:"bJ",get:function(){return this.Ylt===YS.CONNECTING||this.Ylt===YS.CONNECTED}},{key:"lt",get:function(){return this.JW}},{key:"Ca",get:function(){return this.hu||(this.hu=xZ(this,this.F2t)),this.hu}},{key:"B2t",get:function(){var t;return null==(t=this.F2t.U2t())?void 0:t.Q$t()}},{key:"Mc",get:function(){return this.oa?this.oa.h2t:this.o2t},set:function(t){this.o2t=t?pE(t,this.V2t.Cd):void 0,this.oa&&(this.oa.h2t=this.o2t,this.o2t&&this.oa.Un(this.o2t))}},{key:"Ylt",get:function(){return this.Ra},set:function(t){var i=t;this.H2t||i!==YS.CONNECTING&&i!==YS.CONNECTED||(i=YS.AVAILABLE),this.Ra!==i&&(this.Ra=i,this.So(new DZ(this.Ylt)))}}]),i}(hh);V(),It(),Bt(),Nt();var OZ=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).hu=void 0,i}Pt(i,t);var n=i.prototype;return n.N2t=function(){Vi.um("Joining a Chromecast session is not possible when JoinStrategy is configured to disabled")},n.M2t=function(){Vi.um("Leaving a Chromecast session is not possible when JoinStrategy is configured to disabled")},n.Tn=function(){Vi.um("Starting a Chromecast session is not possible when JoinStrategy is configured to disabled")},n.Xx=function(){Vi.um("Stopping a Chromecast session is not possible when JoinStrategy is configured to disabled")},n.K2t=function(){return ot.resolve()},n.kn=function(){},xt(i,[{key:"bJ",get:function(){return!1}},{key:"lt",get:function(){}},{key:"B2t",get:function(){}},{key:"Mc",get:function(){},set:function(t){}},{key:"Ylt",get:function(){return YS.UNAVAILABLE}},{key:"Ca",get:function(){return this.hu||(this.hu=xZ(this)),this.hu}}]),i}(hh);function MZ(t){return{bt:t.bt,MP:t.LP(),ct:t.Nd(),UP:t.UP,lt:t.HP(),WP:t.qP(),$P:t.$P,hx:t.hx,ux:t.ux,Ax:t.Ax,kx:t.kx,Rx:t.Rx,Bx:t.Bx,Mx:t.Mx}}V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It();var LZ=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).YL=new hA,r.$L=new hA,r.Gl=new aA,r.KL=void 0,r.ZL=new lA,r.JL=new YT,r.qc=void 0,r.KL=new zT(i.mq),r.YL.BI=i.ht,r.$L.BI=i.rt,r.Gl.BI=i.nt,r.ZL.BI=i.zP,r.JL.BI=i.jP,r.qc=new gO(r),r.qc.BI=i.Jc,r}Pt(i,t);var n=i.prototype;return n.Zst=function(){return this.qc},n.EP=function(){return this.YL},n.GP=function(){return this.ZL},n.QP=function(){return this.JL},n.Aa=function(){return this.KL},n.Ix=function(){return this.Gl},n.Dx=function(){return this.$L},n.switchContexts=function(t){this.oa=t,this.YL.BI=t.ht,this.$L.BI=t.rt,this.Gl.BI=t.nt,this.KL.BI=t.mq,this.ZL.BI=t.zP,this.JL.BI=t.jP,this.qc.BI=t.Jc},n.h3t=function(t){this.oa!==t&&(this._z(),this.switchContexts(t),this.vz())},n.tO=function(t){if(this.oa!==t){var i;this._z(),this.nnt&&(i=MZ(this));var n=this.NP(),r=this.Hx(),e=this.Wx();if(this.switchContexts(t),void 0!==i)MT(this,i,MZ(this));var s=this.NP();s!==n&&this.So(new FT(s)),this.Hx()!==r&&this.So(new UT),this.Wx()!==e&&this.So(new VT),this.vz()}},n.kn=function(i){var n=this;return jt(function(){return zt(this,function(r){switch(r.label){case 0:return[4,t.prototype.kn.call(n,i)];case 1:return r.sent(),this.KL.kn(i),this.YL.kn(i),this.$L.kn(i),this.Gl.kn(i),this.ZL.kn(),this.JL.kn(),[4,this.qc.kn(i)];case 2:return r.sent(),[2]}})}).call(this)},xt(i,[{key:"zP",get:function(){return this.GP()}},{key:"jP",get:function(){return this.QP()}}]),i}(Gb);V(),It();function FZ(t){var i=v.createElement("div");return hn(i,"theo-ads-sgai-ima-container"),function(t){t.style.boxSizing="border-box",t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%"}(i),t.appendChild(i),i}function UZ(t){var i=t.style;i.boxSizing="border-box",i.position="absolute",i.display="none",i.border="0 solid transparent",i.borderWidth="0px",i.width="100%",i.height="100%"}function VZ(t){var i=t.style;i.display="",i.backgroundColor="",i.backgroundRepeat="",i.backgroundAttachment="",i.border="",i.borderWidth="",i.flex="",i.transform="",i.transition="",i.backgroundImage="",i.backgroundSize="",i.backgroundPosition="",i.alignItems="",i.position=""}function jZ(t,i,n,r,e){var s=i/n,u=1,o=0,h=0;if(s>=r/e){var a=r/s;o=(e-a)/2,u=a/n}else{var c=e*s;h=(r-c)/2,u=c/i}t.style.left=h/r*100+"%",t.style.top=o/e*100+"%",t.style.width=i*u/r*100+"%",t.style.height=n*u/e*100+"%"}function HZ(t){return zo(t,"theo-ads://dai.break")}function WZ(t){return t&&t.integration===CS.THEOADS}var zZ=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).o3t=void 0,r.d3t=void 0,r._3t=void 0,r.ta=new Sd,r.a3t=void 0,r.f3t=void 0,r.jkt=void 0,r.v3t=void 0,r.g3t=function(t){var i=t.Ht;qZ(r.f3t,i)&&(i.Rt=!0)},r.p3t=function(t){var i=t.Ht;qZ(r.jkt,i)&&(i.Xk=$y.Kn)},r.m3t=function(t){var i=t.Ht;qZ(r.v3t,i)&&(i.Rt=!0)},r.l3t=function(){r.d3t.ht.mn(Ng.eI,r.g3t),r.d3t.nt.mn(Ng.eI,r.p3t),r.d3t.rt.mn(Ng.eI,r.m3t)},r.d3t=i,r.Cd.cast.strategy!==wA.DISABLED?r.o3t=new BZ(r,i,r.Cd.cast,n):r.o3t=new OZ,r.VX.IJ(r.o3t),r}Pt(i,t);var n=i.prototype;return n.nu=function(){var i=t.prototype.nu.call(this);return!i&&this.o3t.bJ&&this.o3t.Mc?this.o3t.Mc:i},n.Ta=function(i,n){var r=this;return this.ta.Zo(function(n){return r.a3t=new dr,r.a3t.$g(n),br(t.prototype.Ta.call(r,i,r.a3t.Yg),r.a3t)},n)},n.Gx=function(){t.prototype.Gx.call(this),this.Cd.cast.strategy!==wA.AUTO||this.o3t.bJ||this.o3t.K2t()},n.J2t=function(t){var i=this;return this.ta.Zo(function(n){return i.u3t(t,n)})},n.i3t=function(t,i){var n=this;return void 0===t&&(t=void 0),void 0===i&&(i=!1),this.ta.Zo(function(r){return n.c3t(t,i,r)})},n.u3t=function(t,i){yr(i),this.d3t.Jc&&this.d3t.Jc.knt(t.Jc),this.l3t(),this.f3t=Wn(this.d3t.ht.II,function(t){return t.Rt}),this.jkt=Wn(this.d3t.nt.II,function(t){return"showing"===t.Xk}),this.v3t=Wn(this.d3t.rt.II,function(t){return t.Rt}),this._3t=t,this._3t.A2t(this.f3t,this.jkt,this.v3t),this.tO(t),this._3t.gr()},n.c3t=function(t,i,n){return jt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:if(yr(n),void 0===(r=this._3t))return[2];u.label=1;case 1:return u.trys.push([1,5,6,7]),t?[4,this.d3t.Xx()]:[3,4];case 2:return u.sent(),yr(n),e=pE(t,this.d3t.Cd),i&&(e.ads=null==(s=e.ads)?void 0:s.filter(WZ)),this.a3t=new dr,this.a3t.$g(n),[4,br(this.d3t.Ta(e,this.a3t.Yg),this.a3t)];case 3:u.sent(),u.label=4;case 4:return i&&this.d3t.Jc&&r.Jc.knt(this.d3t.Jc),[3,7];case 5:return _r(u.sent()),[3,7];case 6:return r.mr(),this.tO(this.d3t),this.f3t=Wn(this._3t.ht.II,function(t){return t.Rt}),this.jkt=Wn(this._3t.nt.II,function(t){return"showing"===t.Xk}),this.v3t=Wn(this._3t.rt.II,function(t){return t.Rt}),this.d3t.ht.wn(Ng.eI,this.g3t),this.d3t.nt.wn(Ng.eI,this.p3t),this.d3t.rt.wn(Ng.eI,this.m3t),this.d3t.wn(Mp.bM,this.l3t),this._3t===r&&(this._3t=void 0),[7];case 7:return[2]}})}).call(this)},n.Xx=function(){var i,n=this;return this.f3t=void 0,this.jkt=void 0,this.v3t=void 0,this.l3t(),null==(i=this.a3t)||i.Zg(),this.ta.Zo(function(){return t.prototype.Xx.call(n)})},n.kn=function(){var i=this;return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return null==(n=this.a3t)||n.Zg(),this.o3t.kn(),[4,this.i3t()];case 1:return r.sent(),[4,this.ta.kn()];case 2:return r.sent(),[4,t.prototype.kn.call(i)];case 3:return r.sent(),[2]}})}).call(this)},i}(LZ);function qZ(t,i){return void 0!==t&&void 0!==i&&(t.bs===i.bs&&i.Th===t.Th)}V(),It(),Wt(),Bt(),Yt();var XZ=function(){function t(t){this.q2t=void 0,this.hu=void 0,this.F2t=void 0,this.F2t=t}var i=t.prototype;return i.VY=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.q2t||(this.q2t=this.S3t(t)),[4,this.q2t];case 1:return i.sent(),[2]}})}).call(this)},i.S3t=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.F2t.VY(t)];case 1:return i.sent(),[2]}})}).call(this)},i.z2t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:if(!this.q2t)throw new p("Chromecast must be initialized before starting a session");return[4,this.q2t];case 1:return t.sent(),this.F2t.U2t()?[3,3]:[4,this.F2t.z2t()];case 2:t.sent(),t.label=3;case 3:return[2]}})}).call(this)},i.T3t=function(){this.F2t.e3t(!1)},i.b3t=function(){this.F2t.e3t(!0)},xt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{initialize:function(i){var n=t.VY(mA(i));return n.catch(yn),n},startSession:function(){var i=t.z2t();return i.catch(yn),i},endSession:function(){t.b3t()}}}(this)),this.hu}}]),t}();var GZ=new BJ,QZ=new XZ(GZ),YZ={get chromecast(){return QZ.Ca}};Zb(function(t){return new zZ(t,GZ)},Kb.ant),V(),It(),V(),It(),V(),It(),V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It(),Wt(),Yt();var $Z=function(){function t(t){this.N3t=void 0,this.R3t=void 0,this.D3t=void 0,this.N3t=t,this.R3t=ro(),this.D3t=ro()}var i=t.prototype;return i.k3t=function(t,i,n,r){var e=this;t.Uz.forEach(function(t){if(!e.E3t(t.P3t)){var s=t.x3t(i,n,r);s&&e.I3t(s)}})},i.E3t=function(t){return this.R3t.get(t)},i.I3t=function(t){this.R3t.set(t.C3t,t),this.D3t.set(t.C3t,t.B3t),this.N3t.au(t.M3t)},i.Ent=function(t){this.D3t.has(t.C3t)||(this.D3t.set(t.C3t,t),this.N3t.au(t.M3t))},i.L3t=function(t){return this.D3t.forEach(t)},i.O3t=function(t){return this.R3t.forEach(t)},i.F3t=function(t){var i=!1;return this.R3t.forEach(function(n){i=n.F3t(t)||i}),i},i.kn=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=[],this.R3t.forEach(function(i){return t.push(i.kn())}),this.D3t.forEach(function(i){return t.push(i.kn())}),[4,ot.all(t)];case 1:return i.sent(),this.R3t.clear(),this.D3t.clear(),[2]}})}).call(this)},t}();V(),It(),Nt();var KZ=function(t){function i(i,n,r,e){var s;return(s=t.call(this,"H3t")||this).QJt=void 0,s.Py=void 0,s.Ky=void 0,s.Mc=void 0,s.QJt=i,s.Py=n,s.Ky=r,s.Mc=e,s}return Pt(i,t),i.prototype.xa=function(){return new JZ(this.QJt,this.Py,this.Ky,this.Mc)},i.U3t=function(t){return new i(QK.GENERAL,t.Py,t.YJt)},i.V3t=function(t,n){return new i(t.QJt,t.message,t.YJt,n)},i}(Ig),JZ=function(t){function i(i,n,r,e){var s;return(s=t.call(this,"aderror")||this).problemType=void 0,s.message=void 0,s.errorCode=void 0,s.source=void 0,s.problemType=i,s.message=n,s.errorCode=r,s.source=e,s}return Pt(i,t),i}(ah),ZZ=function(t){function i(i){var n;return(n=t.call(this)||this).Q3t=void 0,n.q3t=void 0,n.X3t=!1,n.n7=!1,n.hu=void 0,n.Y3t=function(t){if(n.X3t&&t.Ky!==YK.VAST_NO_ADS_AFTER_WRAPPER&&t.Ky!==YK.VAST_EMPTY_RESPONSE){var i=new lw(dw.ADVERTISEMENT_ERROR,t.Py),r=new md(gd.AD_BLOCKER_DETECTED,t.Py+" Turn off your AdBlocker and try again.",i);n.Q3t.qq(r)}},n.Wet=function(){n.n7=!0},n.Q3t=i,n.q3t=new $Z(n),n.wn("H3t",n.Y3t),i.wn(ch.uo,n.Wet),n}Pt(i,t);var n=i.prototype;return n.knt=function(t){this.z3t(function(i){i.knt(t)})},n.M6=function(t,i,n){try{this.X3t=n;var r=PS.Ng.Wz(t);if(r.P3t===uZ.ont)return;var e=this.q3t.E3t(r.P3t);if(!e)throw new GK(QK.ADBLOCK,void 0,"Ads could not be loaded.");i!==XB.pnt&&this.n7||this.Q3t.j3t(e),r.M6(t,i,e,this.X3t)}catch(i){0,this.So(KZ.V3t(i,t.sources))}},n.rD=function(){this.z3t(function(t){t.rD()})},n.Snt=function(t){this.z3t(function(i){i.Snt(t)})},n.Ent=function(t){this.q3t.Ent(t)},n.Tnt=function(t,i){return this.Q3t.Tnt(t,i)},n.K3t=function(t){this.q3t.O3t(function(i){i.K3t(t)})},n.F3t=function(t){return this.q3t.F3t(t)},n.z3t=function(t){return this.q3t.L3t(t)},n.qx=function(){this.q3t.O3t(function(t){return t.qx()})},n.hr=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.n7=!1,t=[],this.q3t.O3t(function(i){return t.push(i.Xx())}),[4,ot.all(t)];case 1:return i.sent(),[2]}})}).call(this)},n.kn=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),[4,this.q3t.kn()];case 1:return t.sent(),this.Q3t.mn(ch.uo,this.Wet),this.mn("H3t",this.Y3t),[2]}})}).call(this)},xt(i,[{key:"W3t",get:function(){return this.q3t}},{key:"zc",get:function(){var t=!1;return this.z3t(function(i){t=t||i.G3t}),t}},{key:"mnt",get:function(){var t=[];return this.z3t(function(i){var n,r=i.mnt;r.length&&(n=t).push.apply(n,[].concat(r))}),t}},{key:"ynt",get:function(){var t=null;return this.z3t(function(i){null!=t||(t=i.ynt)}),t}},{key:"Ant",get:function(){var t=[];return this.z3t(function(i){var n;(n=t).push.apply(n,[].concat(i.Ant))}),t}},{key:"bnt",get:function(){var t=[];return this.z3t(function(i){var n;(n=t).push.apply(n,[].concat(i.bnt))}),t}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=GB(this)}}]),i}(WI);V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt();var t0=function(t){function i(i){var n;return(n=t.call(this)||this).UZt=void 0,n.qc=void 0,n.J3t=void 0,n.Z3t=void 0,n.$3t=void 0,n.i4t=void 0,n.UZt=i,n.qc=[],n.J3t=-1,n.Z3t=-1,n.$3t=void 0,n.i4t=!1,n}Pt(i,t);var n=i.prototype;return n.t4t=function(){this.i4t=!0},n.e4t=function(t){this.qc.push(t),this.i4t=!1},n.s4t=function(t){Yn(this.qc,t)},xt(i,[{key:"Jc",get:function(){return this.qc}},{key:"p0t",get:function(){return this.J3t},set:function(t){this.J3t=t}},{key:"m0t",get:function(){return this.Z3t},set:function(t){this.Z3t=t}},{key:"_Ot",get:function(){return this.UZt},set:function(t){this.UZt=t}},{key:"X$t",get:function(){return this.$3t}},{key:"_x",get:function(){return this.i4t}}]),i}(JJ),i0=function(t){function i(i,n){var r;return(r=t.call(this,n.timeOffset)||this).n4t=void 0,r.r4t=[],r.n4t=i,r.er(n),r}Pt(i,t);var n=i.prototype;return n.er=function(t){void 0!==t.maxDuration&&(this.J3t=t.maxDuration),void 0!==t.customData&&(this.$3t=t.customData)},n.h4t=function(t){var i=this.qc.indexOf(t);return i>=0&&i=.25&&this.M3t.So(new w0(t,e)),n<.5&&r>=.5&&this.M3t.So(new y0(t,e)),n<.75&&r>=.75&&this.M3t.So(new _0(t,e))},i.o4t=function(t){Jn(this.W4t,t)||(this.W4t.push(t),t.od.o4t(t),this.z4t(t.od),this.M3t.So(new aO(t,this.Q3t.LP())))},i.p$t=function(t){if(Jn(this.W4t,t)){var i=t.od.h4t(t);this.M3t.So(new c0(t,t.y4t)),this.G4t(t,i)}},i.M4t=function(t){if(Jn(this.W4t,t)){var i=t.od.h4t(t);this.M3t.So(new fO(t,this.Q3t.LP())),this.G4t(t,i)}},i.s4t=function(t){if(Jn(this.qc,t)){var i=t.od.h4t(t);Yn(this.qc,t),t.od.s4t(t),this.M3t.So(new l0(t.od)),this.G4t(t,i)}},i.L4t=function(t){var i=new i0(this.MZt,t);return this.X0t.push(i),this.M3t.So(new ZB(i)),i},i.O4t=function(t,i){t.er(i),this.M3t.So(new v0(t))},i.F4t=function(t){if(Jn(this.X0t,t)){for(var i,n=Ft(t.Jc.slice());!(i=n()).done;){var r=i.value;this.s4t(r)}Yn(this.X0t,t),this.M3t.So(new KB(t))}},i.U4t=function(){for(var t,i=Ft(this.X0t.slice());!(t=i()).done;){var n=t.value;this.F4t(n)}},i.V4t=function(t){this.M3t.So(new KZ(QK.GENERAL,t.message))},i.H4t=function(t,i){var n=new md(null!=i?i:gd.AD_ERROR,t.message,t);this.Q3t.qq(n)},i.X4t=function(t){return Wn(this.X0t,function(i){return i._Ot===t})},i.q4t=function(t){var i;return null!=(i=this.X4t(t.timeOffset))?i:this.L4t(t)},i.G4t=function(t,i){Yn(this.W4t,t);var n=t.od;0!==this.W4t.length||this.G0t!==n||i||(n.t4t(),this.z4t(void 0))},i.z4t=function(t){this.G0t!==t&&(void 0!==this.G0t&&this.M3t.So(new sO(this.G0t)),this.G0t=t,void 0!==t&&this.M3t.So(new oO(t)))},i.B4t=function(t){var i=Wn(this.qc,function(i){return i.wnt()===t});if(void 0===i)throw new p('Invalid ad for integration "'+this.MZt+'"');return i},i.C4t=function(t){var i=Wn(this.X0t,function(i){return i.wnt()===t});if(void 0===i)throw new p('Invalid ad break for integration "'+this.MZt+'"');return i},i.Ta=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return yr(i),(null==(n=this.h8)?void 0:n.setSource)?[4,ot.resolve(this.h8.setSource(t))]:[3,2];case 1:return eE(r=e.sent())&&(r=t),[2,pE(r,this.Q3t.Cd)];case 2:return[2,t];case 3:return[2]}})}).call(this)},i.j4t=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(null==(t=this.h8)?void 0:t.resetSource)?[4,ot.resolve(this.h8.resetSource())]:[3,2];case 1:return i.sent(),[3,3];case 2:this.U4t(),i.label=3;case 3:return[2]}})}).call(this)},i.kn=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(null==(t=this.h8)?void 0:t.destroy)?[4,ot.resolve(this.h8.destroy()).catch(yn)]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.U4t(),this.z4t(void 0),this.h8=void 0,this.M3t.kn(),[2]}})}).call(this)},xt(t,[{key:"Jc",get:function(){return this.qc}},{key:"A0t",get:function(){return this.X0t}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get integration(){return t.MZt},get ads(){return t.Jc.map(function(t){return t.wnt()})},get adBreaks(){return t.A0t.map(function(t){return t.wnt()})},createAd:function(i,n){return t.R4t(i,n?t.C4t(n):void 0).wnt()},updateAd:function(i,n){t.D4t(t.B4t(i),n)},updateAdProgress:function(i,n){var r=Cn(Number(n),0,1);t.N4t(t.B4t(i),r)},beginAd:function(i){t.o4t(t.B4t(i))},endAd:function(i){t.M4t(t.B4t(i))},skipAd:function(i){t.p$t(t.B4t(i))},removeAd:function(i){t.s4t(t.B4t(i))},createAdBreak:function(i){return t.L4t(i).wnt()},updateAdBreak:function(i,n){t.O4t(t.C4t(i),n)},removeAdBreak:function(i){t.F4t(t.C4t(i))},removeAllAds:function(){t.U4t()},error:function(i){t.V4t(i)},fatalError:function(i,n){var r=n?Number(n):void 0;t.H4t(i,r)}}}(this)}},{key:"rB",get:function(){return this.h8},set:function(t){this.h8=t}},{key:"G3t",get:function(){return this.W4t.some(function(t){return t.l4t===n0.hZt})}},{key:"C3t",get:function(){return this.MZt}},{key:"mnt",get:function(){return this.W4t}},{key:"ynt",get:function(){var t;return null!=(t=this.G0t)?t:null}},{key:"Ant",get:function(){return nr(this.X0t,function(t){return t.Ant})}},{key:"bnt",get:function(){return this.X0t.filter(function(t){return!t._x})}}]),t}();V(),It(),Bt();var A0=function(){function t(t){var i=this;this.oa=void 0,this.J8=void 0,this.Q4t=!1,this.Ed=function(t){1!==i.oa.ux&&(i.J8=i.oa.ux,i.oa.ux=1),i.Q4t=!0},this.Bd=function(t){i.Q4t=!1,void 0!==i.J8&&(i.oa.ux=i.J8,i.J8=void 0)},this.oa=t,this.addAdListeners()}var i=t.prototype;return i.destroy=function(){this.removeAdListeners()},i.addAdListeners=function(){var t,i;null==(t=this.oa.Jc)||t.wn("Dnt",this.Ed),null==(i=this.oa.Jc)||i.wn("Cnt",this.Bd)},i.removeAdListeners=function(){var t,i;null==(t=this.oa.Jc)||t.mn("Dnt",this.Ed),null==(i=this.oa.Jc)||i.mn("Cnt",this.Bd)},xt(t,[{key:"player",get:function(){return this.oa},set:function(t){this.oa&&this.removeAdListeners(),this.oa=t,this.addAdListeners()}},{key:"inAdBreak",get:function(){return this.Q4t}}]),t}(),T0=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).K4t=void 0,r.d3t=void 0,r.t5t=[],r.J4t=void 0,r.Z4t=void 0,r.JW=void 0,r.Lz=void 0,r.e5t=void 0,r.i5t=1,r.d3t=i,r.K4t=new ZZ(r),r.K4t.W3t.k3t(n,i,r,i.Cd),r}Pt(i,t);var n=i.prototype;return n.Zst=function(){return this.K4t},n.qx=function(){this.d3t.qx(),this.K4t.qx()},n.Gx=function(){void 0===this.JW?(void 0!==this.Z4t&&this.$4t(this.Z4t),t.prototype.Gx.call(this)):this.So(new Ib(this.JW))},n.Ta=function(i,n){var r=this;return jt(function(){var e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:if(yr(n),!(e=i))return[3,4];s=Ft(this.t5t),f.label=1;case 1:return(u=s()).done?[3,4]:[4,u.value.Ta(e,n)];case 2:e=f.sent(),f.label=3;case 3:return[3,1];case 4:return[4,t.prototype.Ta.call(r,e,n)];case 5:if(f.sent(),yr(n),null==e?void 0:e.ads)for(o=Boolean(e.blockContentIfAdError),this.K4t.K3t(e.playAdsAfterTime),h=Ft(e.ads);!(a=h()).done;)c=a.value,this.K4t.M6(c,XB.pnt,o);return[2]}})}).call(this)},n.Xx=function(){var i=this;return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return this.JW=void 0,this.Lz=void 0,[4,this.K4t.hr()];case 1:return e.sent(),this.i3t(),[4,t.prototype.Xx.call(i)];case 2:e.sent(),n=Ft(this.t5t),e.label=3;case 3:return(r=n()).done?[3,6]:[4,r.value.j4t()];case 4:e.sent(),e.label=5;case 5:return[3,3];case 6:return[2]}})}).call(this)},n.$4t=function(t){this.i5t=this.oa.ux;var i=this.oa.Mx,n=this.oa.$P;t.Ox(i),t.ix(n),this.J4t=t,this.Z4t=void 0,this.tO(t)},n.j3t=function(t){void 0===this.J4t&&(this.Z4t=t)},n.i3t=function(){this.Z4t=void 0,void 0!==this.J4t&&(this.d3t.ux=this.i5t,this.d3t.Mx=this.Mx,this.d3t.$P=this.$P,this.tO(this.d3t),this.J4t=void 0)},n.HP=function(){var i;return null!=(i=this.Lz)?i:t.prototype.HP.call(this)},n.qP=function(){var i;return null!=(i=this.JW)?i:t.prototype.qP.call(this)},n.qq=function(t){void 0===this.qP()&&(this.JW=t,this.Lz=ww(t),this.So(new Ib(t)))},n.$x=function(t){return void 0===this.J4t&&this.K4t.F3t(t)},n.Tnt=function(t,i){try{var n=new b0(t,this);n.rB=i(n.Ca),this.K4t.Ent(n),this.t5t.push(n),t!==CS.UPLYNK&&(this.e5t=new A0(this))}catch(i){this.K4t.So(new KZ(QK.GENERAL,'Error while constructing ad integration "'+t+'": '+i+'"'))}},n.vx=function(i){var n;(null==(n=this.e5t)?void 0:n.inAdBreak)||t.prototype.vx.call(this,i)},n.kn=function(){var i=this;return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:r=Ft(this.t5t),s.label=1;case 1:return(e=r()).done?[3,4]:[4,e.value.kn().catch(yn)];case 2:s.sent(),s.label=3;case 3:return[3,1];case 4:return[4,this.K4t.kn()];case 5:return s.sent(),this.i3t(),null==(n=this.e5t)||n.destroy(),this.e5t=void 0,[4,t.prototype.kn.call(i)];case 6:return s.sent(),[2]}})}).call(this)},xt(i,[{key:"Y4t",get:function(){return this.J4t}}]),i}(LZ);Zb(function(t){return new T0(t,PS.Ng)},Kb.rnt),V(),It(),Bt(),V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Nt(),Yt();var S0=Oi.ru&&Oi.Q_<12,E0=function(t){function i(i,n){var r;return(r=t.call(this,i,!0)||this).Q3t=void 0,r.o5t=void 0,r.$L=void 0,r.YL=void 0,r.Gl=void 0,r.ZL=void 0,r.JL=void 0,r.s5t=void 0,r.ha=void 0,r.rq=void 0,r.a5t=void 0,r.u5t=void 0,r.Q3t=n,r.o5t=!1,r.$L=new aw,r.YL=new aw,r.Gl=new rp,r.ZL=new cA,r.JL=new qT,r.s5t=new WI,r.ha=new aS,r.rq=new Ub,r.a5t=function(){r.oa.be()},r.u5t=function(){r.c5t()},r.oa.wn(ch.xw,r.Rs),r}Pt(i,t);var n=i.prototype;return n.Hst=function(){return this.oa.Hst()},n.RP=function(){return OA.iL()._s()},n.DP=function(){},n.BP=function(t){},n.lx=function(){return 1},n.vx=function(t){},n.gx=function(){return new OA([0,this.MP])._s()},n.Ex=function(){return!1},n.Ix=function(){return this.Gl},n.Dx=function(){return this.$L},n.ds=function(){return this.Hx().ds},n.Hx=function(){return this.ha},n.Ea=function(){},n.kn=function(){return jt(function(){return zt(this,function(t){return this.Vo(),this.YL.kn(),this.$L.kn(),this.Gl.kn(),this.s5t.kn(),this.oa.mn(ch.xw,this.Rs),[2]})}).call(this)},n.n5t=function(){S0&&this.r5t(),this.G3t||this.Q3t.$4t(this)},n.i3t=function(){this.G3t&&(S0&&this.h5t(),Oi.Tg&&this.xe.querySelectorAll("video[src]").forEach(function(t){t.src=""}),Vi.Zs.Ep&&this.oa.Jx(),this.Q3t.i3t())},n.r5t=function(){this.o5t||(f.addEventListener("blur",this.a5t),f.addEventListener("focus",this.u5t),this.o5t=!0)},n.h5t=function(){f.removeEventListener("blur",this.a5t),f.removeEventListener("focus",this.u5t),this.o5t=!1},n.c5t=function(){var t=this;requestAnimationFrame(function(){return t.oa.we()})},xt(i,[{key:"MP",get:function(){return this.LP()},set:function(t){this.OP(t)}},{key:"ct",get:function(){return this.Nd()}},{key:"zP",get:function(){return this.ZL}},{key:"jP",get:function(){return this.JL}},{key:"Sx",get:function(){return this.Tx()}},{key:"Fx",get:function(){return this.rq}},{key:"M3t",get:function(){return this.s5t}},{key:"ht",get:function(){return this.YL}},{key:"G3t",get:function(){return this.Q3t.Y4t===this}}]),i}(Gb);V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It(),Bt(),Ut();var I0=0,R0="theoplayer-wrapper",C0=function(){function t(i,n,r,e){this.l5t=void 0,this.oa=void 0,this.p5t=void 0,this.T5t=void 0,this.y5t=void 0,this.k5t=void 0,this.x5t=void 0,this.R5t=void 0,this.C5t=void 0,this.b5t=void 0,this.B5t=void 0,this.Bst=void 0,this.Tz=void 0,this.v5t=void 0,this.L5t=void 0,this.jI=void 0,this.l5t=n,this.oa=r,this.p5t=e,this.k5t=NaN,this.x5t=!1,this.R5t=!1,this.b5t=!1,this.B5t=[],this.Bst=!1,this.Tz=!1,this.v5t=[],this.jI=++I0,this.L5t=i.timeOffset,this.T5t=t.Z5t(this.L5t),this.E5t(),this.v5t.push(i)}var i=t.prototype;return i.m5t=function(t){var i=this.w5t===t.timeOffset;return!this.y5t&&i},i.E5t=function(){if(E(this.k5t)){var t=this.w5t;if(void 0===t)return void(this.k5t=0);if("string"==typeof t&&pJ(t)){var i=this.oa.Nd();E(i)||i===1/0||(t=sK(t)*i)}E(t)||(this.k5t=t)}},i.N5t=function(t){this.B5t.push(t)},i.M5t=function(){if(!this.y5t){var t,i,n=this.l5t===XB.pnt&&void 0===this.L5t&&1===this.v5t.length,r=this.v5t[0];if(!n&&1===this.v5t.length){var e=Vi.Dh(r.sources.src).searchParams.get("output");e&&e.toLowerCase().indexOf("vmap")>-1&&(n=!0,void 0!==this.L5t&&Qe("Do not set a timeOffset for VMAP ad sources. VMAP ads have their own offsets included."))}if(gJ(r.sources.type)||n)t=r.sources.src;else{if(E(this.oa.Nd())&&"end"===this.O5t())return;i=this.F5t()}var s=this.oa.Nd();(E(s)||s===1/0)&&(s=-3),this.y5t={U5t:this.oa.xe.offsetWidth,V5t:this.oa.xe.offsetHeight,H5t:this.oa.xe.offsetWidth,W5t:this.oa.xe.offsetHeight,q5t:this.Bst,z5t:this.Tz,G5t:t,X5t:i,j5t:r.omidAccessModeRules,Q5t:s}}return this.y5t},i.F5t=function(){var t=this;return''+this.v5t.map(function(i,n){return t.K5t(i.sources,n)}).join("\n")+""},i.K5t=function(t,i){var n=this.O5t(),r=t.src;return'"},i.O5t=function(){if(0===this.w5t)return"start";if(this.w5t===1/0)return"end";var t=this.w5t;if("string"==typeof t&&pJ(t)){var i=sK(t)*this.oa.Nd();return eJ.DZt(i)}return eJ.DZt(this.w5t||0)},i.Y5t=function(t){this.v5t.push(t)},i.J5t=function(t){for(var i,n=R0+"-"+this.jI+"-",r=Ft(t);!(i=r()).done;){var e=i.value;if(zo(e,n)){var s=Number(e.slice(n.length));if(!E(s)&&s>=0&&st.dd&&this.t6t.dd!==t.dd},i.r6t=function(t){if(t.length)return t.sort(function(t,i){return t.dd-i.dd})[0]},i.h6t=function(){if(this.Ant.length)return this.r6t(this.o6t(this.t.LP()))},i.a6t=function(){var t=this;if(!(void 0!==this.s6t&&this.s6t>=0))return this.Ant.filter(function(i){return!i.P5t&&0===i.dd&&i!==t.t6t})[0]},i.o6t=function(t){var i=this;if(!this.u6t&&(this.u6t=!this.Ant.some(function(t){return E(t.dd)}),!this.u6t))return[];var n=this.Ant.filter(function(i){return!i.P5t&&(i._5t||!E(i.dd)&&t<=i.dd)});return void 0===this.s6t?n:n.filter(function(t){return t._5t||void 0===t.w5t||t.dd>i.s6t})},xt(t,[{key:"t6t",get:function(){return this.i6t.t6t}},{key:"e6t",get:function(){return this.i6t.e6t}},{key:"Ant",get:function(){return this.i6t.Ant}},{key:"t",get:function(){return this.i6t.t}}]),t}(),N0=function(t){return t[t.c6t=0]="c6t",t[t.d6t=1]="d6t",t[t.l6t=2]="l6t",t}({}),D0=function(){function t(t,i,n,r,e){var s=this;this.y6t=void 0,this.r4t=void 0,this.f6t=void 0,this.ko=void 0,this.oa=void 0,this.Q3t=void 0,this.M6t=void 0,this.x6t=void 0,this.N6t=void 0,this.Mst=void 0,this.A6t=0,this.Dpt=void 0,this.m6t=void 0,this.L6t=!1,this.uX=function(){for(var t,i=Ft(s.r4t.filter(function(t){return t.S5t}));!(t=i()).done;){var n=t.value;n.E5t();var r=n.w5t;s.m6t.U6t(r,n.dd)}s.ko&&s.O6t&&s.v6t()},this.r4t=[],this.y6t=t,this.ko=!1,this.f6t=!1,this.oa=i,this.Q3t=n,this.t6t=void 0,this.x6t=0,this.N6t=new P0(this),this.Mst=r,this.m6t=e,this.oa.wn(ch.Rw,this.uX)}var i=t.prototype;return i.qx=function(){this.ko=!0,this.f6t&&this.v6t()},i._6t=function(t,i){this.g6t(t,i);var n=Wn(this.Ant,function(i){return i.m5t(t)});if(n)n.Y5t(t);else{var r,e=new C0(t,i,this.oa,null==(r=t.replaceContent)||r);this.r4t.push(e),2===this.p6t&&this.m6t.L4t(e.dd,e,e.w5t),this.w6t(i,e)}},i.b6t=function(){if(Yn(this.Ant,this.t6t),this.t6t){for(var t,i=Ft(this.t6t.D5t);!(t=i()).done;){t.value;this.m6t.S6t()}this.t6t=void 0}},i.T6t=function(){for(var t,i=Ft(this.r4t);!(t=i()).done;)for(var n,r=Ft(t.value.D5t);!(n=r()).done;){var e=n.value;this.m6t.k6t(e,!0)}tr(this.r4t)},i.E6t=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.b6t(),this.P6t=!0,this.t6t=t,this.x6t=t.dd,this.Dpt=this.I6t(t),[4,this.Dpt];case 1:return i.sent(),this.Dpt=void 0,[2]}})}).call(this)},i.I6t=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return[4,this.R6t(t)];case 1:if(r.sent(),!(i=t.M5t()))return this.P6t=!1,this.t6t=void 0,[2];n=this.y6t.C6t(i),t.P5t=!0,r.label=2;case 2:return r.trys.push([2,4,,6]),[4,n];case 3:return r.sent(),t.d5t===XB.gnt&&this.y6t.D6t(),[3,6];case 4:return r.sent(),this.t6t=void 0,[4,this.v6t()];case 5:return r.sent(),[3,6];case 6:return[2]}})}).call(this)},i.R6t=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return t.$P=this.Q3t.$P,this.Q3t.cO?[4,this.Mst.HK(this.Q3t.$P)]:(t.cO=!1,[2]);case 1:switch(i.sent()){case"all":case"muted":t.cO=!0;break;case"none":t.cO=!1}return[2]}})}).call(this)},i.B6t=function(){var t;return null!=(t=this.N6t.a6t())?t:this.N6t.h6t()},i.v6t=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.t6t&&!this.t6t.A5t?[2,this.Dpt]:(t=this.B6t())?[4,this.E6t(t)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})}).call(this)},i.hr=function(){this.b6t(),tr(this.r4t),this.x6t=0,this.t6t=void 0,this.Dpt=void 0,this.P6t=!1},i.I5t=function(){this.P6t=!1,this.t6t&&(this.t6t.I5t=!0)},i.w6t=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return t===XB.gnt&&this.ko&&this.N6t.n6t(i)?this.RGt||"linear"===this.y6t.l4t||!(!this.t6t||this.t6t&&this.t6t.P5t)?[3,3]:[4,ot.resolve()]:[3,3];case 1:return n.sent(),[4,this.E6t(i)];case 2:n.sent(),n.label=3;case 3:return[2]}})}).call(this)},i.$5t=function(){this.t6t&&this.t6t.$5t()},i.F6t=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.O6t?(t=this.B6t())?[4,this.E6t(t)]:[3,2]:[2];case 1:i.sent(),i.label=2;case 2:return[2]}})}).call(this)},i.g6t=function(t,i){var n=t.sources.type,r=i===XB.pnt&&void 0===t.timeOffset,e=gJ(n)||r?1:2;e!==this.A6t&&(this.A6t=e,this.T6t(),this.y6t.w0t&&!this.RGt&&"linear"!==this.y6t.l4t&&(this.y6t.w0t.zg(),this.t6t=void 0,this.Dpt=void 0),this.x6t=0,this.f6t=!0)},i.K3t=function(t){this.N6t.K3t(t)},i.kn=function(){this.oa.mn(ch.Rw,this.uX)},xt(t,[{key:"e6t",get:function(){return this.y6t}},{key:"Ant",get:function(){return this.r4t}},{key:"t",get:function(){return this.oa}},{key:"RGt",get:function(){return Boolean(this.Dpt)}},{key:"p6t",get:function(){return this.A6t}},{key:"t6t",get:function(){return this.M6t},set:function(t){this.M6t=t}},{key:"P6t",get:function(){return this.L6t},set:function(t){this.L6t=t}},{key:"O6t",get:function(){var t=this;return!this.RGt&&!this.P6t&&(!(this.t6t&&!this.t6t.A5t)&&(!!this.r4t.filter(function(i){return t.t6t!==i}).length&&Boolean(this.B6t())))}}]),t}();V(),It(),Wt(),Nt(),Yt(),V(),It();var x0=function(t){return t.V6t="contentResumeRequested",t.H6t="contentPauseRequested",t.W6t="click",t.Rw="durationChange",t.q6t="expandedChanged",t.z6t="start",t.G6t="impression",t.Gz="pause",t.X6t="resume",t.j6t="adProgress",t.Q6t="adBuffering",t.K6t="firstQuartile",t.mJt="midpoint",t.Y6t="thirdQuartile",t.wJt="complete",t.J6t="userClose",t.Z6t="linearChanged",t.$6t="loaded",t.t8t="adCanPlay",t.i8t="adMetadata",t.e8t="adBreakReady",t.s8t="interaction",t.n8t="allAdsCompleted",t.r8t="skip",t.h8t="skippableStateChanged",t.o8t="log",t.a8t="viewableImpression",t.u8t="volumeChange",t.c8t="mute",t}({});V(),It();var B0=function(t){return t.d8t="adError",t}({});V(),It();var O0=function(t){return t[t.l8t=-1]="l8t",t[t.f8t=-1]="f8t",t[t.v8t=-1]="v8t",t[t._8t=101]="_8t",t[t.g8t=102]="g8t",t[t.p8t=200]="p8t",t[t.m8t=201]="m8t",t[t.w8t=202]="w8t",t[t.y8t=300]="y8t",t[t.A8t=301]="A8t",t[t.b8t=302]="b8t",t[t.S8t=303]="S8t",t[t.T8t=400]="T8t",t[t.k8t=402]="k8t",t[t.E8t=403]="E8t",t[t.P8t=405]="P8t",t[t.x8t=500]="x8t",t[t.I8t=501]="I8t",t[t.R8t=-1]="R8t",t[t.C8t=503]="C8t",t[t.D8t=602]="D8t",t[t.B8t=900]="B8t",t[t.N8t=901]="N8t",t[t.M8t=1005]="M8t",t[t.L8t=1007]="L8t",t[t.O8t=1009]="O8t",t[t.F8t=1010]="F8t",t[t.U8t=1011]="U8t",t[t.V8t=1012]="V8t",t[t.H8t=1013]="H8t",t[t.W8t=1020]="W8t",t[t.q8t=1021]="q8t",t[t.z8t=1101]="z8t",t[t.G8t=1204]="G8t",t[t.X8t=1205]="X8t",t[t.j8t=1300]="j8t",t[t.Q8t=-1]="Q8t",t[t.K8t=-1]="K8t",t[t.Y8t=-1]="Y8t",t[t.J8t=-1]="J8t",t}({}),M0=function(t){return t.Z8t="adLoadError",t.$8t="adPlayError",t}({});function L0(t,i){if(t===x0.j6t){var n=i;return{t7t:n.adBreakDuration,i7t:n.adPosition,MP:n.currentTime,ct:n.duration,e7t:n.totalAds}}return i}function F0(t){switch(t){case google.ima.AdError.Type.AD_LOAD:return M0.Z8t;case google.ima.AdError.Type.AD_PLAY:return M0.$8t}}function U0(t){return Wi(t)&&$i(t.getVastErrorCode)}function V0(t){var i=t.getInnerError(),n=i&&U0(i)?V0(i):void 0;return{Py:t.getMessage(),YJt:t.getErrorCode(),s7t:t.getVastErrorCode(),Km:F0(t.getType()),n7t:n}}function j0(t){if(Fi(t))return t}V(),It(),V(),It();var H0=function(t){function i(i,n,r){var e,s;return e=t.call(this)||this,(s=e).y6t=void 0,s.oa=void 0,s.A7t=void 0,s.s9t=void 0,s.$7t=void 0,s.t9t=void 0,s.y0t=void 0,s.C7t=void 0,s.M7t=void 0,s.L7t=void 0,s.o7t=void 0,s.c7t=void 0,s.d7t=void 0,s.l7t=void 0,s.f7t=void 0,s.v7t=void 0,s._7t=void 0,s.g7t=void 0,s.a7t=void 0,s.u7t=void 0,s.y6t=i,s.oa=n,s.A7t=r,s.s9t=!1,s.$7t=void 0,s.t9t=void 0,s.C7t=0,s.M7t=function(t){if(t.Int&&t.Int.V7t){var i=t.Int.V7t;s.A7t.O4t(i._Ot,i.e7t,i.p0t)}},s.L7t=function(t){var i,n,r;if(!(s.C7t>=5)){s.C7t++;var e=t.S7t;if(function(t){return Wi(t)&&void 0!==t.t7t&&void 0!==t.e7t}(e)){var u=null==(r=s.y0t)||null==(n=r.O7t())||null==(i=n.V7t)?void 0:i._Ot;void 0!==u&&s.A7t.O4t(u,e.e7t,e.t7t)}}},s.o7t=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return t.S7t.n9t?[4,s.P7t(t.S7t.n9t)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})()},s.c7t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return s.s9t=!0,s.y6t.$5t(),[4,s.u7t()];case 1:return t.sent(),[2]}})})()},s.d7t=function(t){if(t.Int){0;var i=t.Int;s.y6t.G7t(i),s.y6t.be(),s.y6t.r9t(),s.y6t.h9t=!0,s.A7t.o9t(i);var n=i.ct;if(s.b7t(n),i.D7t){var r=s.y6t.MP,e=s.y6t.Ax;s.y6t.i5(Up.WL),s.r7t(new jp(r,e)),s.r7t(new Wp(r,e)),s.r7t(new zp(r,e)),s.y6t.hx||s.r7t(new qp(s.y6t.MP)),s.setCountdownTimer(),s.m7t(!0)}else s.y6t.i3t(),s.oa.be(),s.y6t.hx||s.oa.Gx()}},s.l7t=function(t){var i;if(t.Int){0;var n=t.Int;if(s.vm(),s.A7t.z7t(s.y6t.ct,n.D7t),s.y6t.Ax!==Up.VL){var r=Up.VL;s.y6t.i5(r);var e=s.y6t.MP;s.r7t(new yT(e,r))}s.b7t(NaN),s.y6t.h9t=!1,null==(i=s.y0t)||i.Ox(s.y6t.B7t())}},s.f7t=function(t){t.Int&&(s.l7t(t),s.A7t.f7t(t.Int,s.y6t.MP,s.y6t.ct))},s.v7t=function(t){t.Int&&(s.A7t.z7t(-1,t.Int.D7t),s.y6t.$5t(),!t.Int.D7t&&s.y6t.O6t()&&s.y6t.F6t())},s._7t=function(t){t.Int&&(t.Int.D7t?s.y6t.zx():s.oa.zx())},s.g7t=function(){var t;(s.y6t.h9t=!0,s.y6t.a9t)&&(null==(t=s.y0t)||t.zx(),s.y6t.a9t=!1)},s.a7t=function(t){var i;if(t.Int){0,s.y6t.Z7t&&(s.t9t=s.oa.LP(),s.oa.Yx(),s.oa.Vx=!0),s.y6t.u9t=!0;var n=t.Int;s.A7t.Ed(n);var r=n.ct;s.y6t.G7t(n),s.b7t(r),s.y6t.p7t(!1),s.y6t.be(),s.y6t.n5t(),s.y6t.Z7t||s.oa.we(),s.oa.zx(),s.y6t.c9t(n),0===(null==(i=n.V7t)?void 0:i._Ot)||s.y6t.So(new Hp(s.y6t.MP))}},s.u7t=function(t){return jt(function(){var i,n,r,e,u;return zt(this,function(o){switch(o.label){case 0:return i=null==t?void 0:t.Int,s.y6t.u9t=!1,"linear"===s.y6t.l4t&&s.A7t.Bd(),i&&i.ct>=0&&s.b7t(i.ct),s.oa.Nd()===1/0&&s.y6t.d9t(),s.y6t.h9t=!1,s.s9t?[4,s.q7t()]:[3,2];case 1:o.sent(),o.label=2;case 2:s.y6t.p7t(!0),o.label=3;case 3:return o.trys.push([3,5,,6]),[4,s.J7t()];case 4:return o.sent(),[3,6];case 5:return mr(n=o.sent())||s.So(new n$(n)),[2];case 6:return s.y6t.i3t(),s.y6t.we(),s.oa.UP||s.oa.Gx(),i&&s.y6t.G7t(i),s.y6t.Q7t&&(s.y6t.Z7t&&(e=s.oa.Wx(),u=null==(r=s.oa.bt)?void 0:r.src,e&&u&&(e.src=u)),s.y6t.K7t=!0),s.oa.Vx=!1,s.y6t.O6t()?[4,s.y6t.F6t()]:[3,8];case 7:o.sent(),o.label=8;case 8:return[2]}})})()},e}Pt(i,t);var n=i.prototype;return n.r7t=function(t){this.y6t.So(t)},n.h7t=function(t){var i=this;this.y0t=t,this.y0t.wn(B0.d8t,this.o7t),this.y0t.wn(x0.H6t,this.a7t),this.y0t.wn(x0.V6t,this.u7t),this.y0t.wn(x0.n8t,this.c7t),this.y0t.wn(x0.z6t,this.d7t),this.y0t.wn(x0.wJt,this.l7t),this.y0t.wn(x0.r8t,this.f7t),this.y0t.wn(x0.J6t,this.v7t),this.y0t.wn(x0.W6t,this._7t),this.y0t.wn(x0.t8t,this.g7t),this.y0t.wn(x0.Gz,function(){i.y6t.hx||(i.y6t.p7t(!0),i.y6t.So(new pT(i.y6t.MP))),i.m7t(!0)}),this.y0t.wn(x0.X6t,function(){i.y6t.hx&&(i.y6t.p7t(!1),i.y6t.So(new _T(i.y6t.MP)))}),this.y0t.wn(x0.c8t,function(){var n=t.Lx();n>=0&&i.w7t(n)}),this.y0t.wn(x0.u8t,function(){var n=t.Lx();n>=0&&i.w7t(n)}),this.y0t.wn(x0.i8t,function(t){i.A7t.y7t(t.type)}),this.y0t.wn(x0.Rw,function(t){t.Int&&i.b7t(t.Int.ct)}),this.y0t.wn(x0.o8t,function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=t.S7t.adError,(n=U0(i)?V0(i):void 0)?this.T7t(n)?[4,this.k7t(t)]:[3,2]:[2];case 1:return r.sent(),[3,5];case 2:return this.E7t(n)?[4,this.P7t(n)]:[3,4];case 3:return r.sent(),[3,5];case 4:this.x7t(n)&&this.I7t(n),r.label=5;case 5:return[2]}})}).call(i)}),this.y0t.wn(x0.$6t,function(t){if(t.Int&&(i.y6t.I5t(),i.A7t.R7t(t.Int),i.C7t=0,t.Int.D7t)){var n,r=i.y6t.Ax,e=Up.VL;i.y6t.i5(e);var s=i.y6t.MP,u=i.y6t.Ax;u!==r&&i.r7t(new yT(s,u)),null==(n=i.y0t)||n.Ox(i.y6t.B7t()),i.r7t(new Vp(s,e))}}),this.y0t.wn([x0.Q6t,x0.G6t,x0.K6t,x0.mJt,x0.Y6t],function(t){t.Int&&i.A7t.N7t(t.Int,t.type,i.y6t.MP)}),this.y0t.wn(x0.K6t,this.M7t),this.y0t.wn(x0.j6t,this.L7t)},n.switchToPlayerIfNoNextAd=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return this.y0t?(t=this.y0t.O7t())&&this.F7t(t)?[3,3]:this.y6t.O6t()?[4,this.y6t.F6t()]:[3,2]:[3,4];case 1:return n.sent(),[3,3];case 2:this.y6t.U7t(),this.oa.hx&&!this.oa.UP&&this.oa.Gx(),n.label=3;case 3:return[3,7];case 4:return this.y6t.O6t()?[4,this.y6t.F6t()]:[3,6];case 5:return n.sent(),[3,7];case 6:i=this.y6t.hx,this.y6t.U7t(),i||this.oa.Gx(),n.label=7;case 7:return[2]}})}).call(this)},n.F7t=function(t){var i=t.V7t,n=null==i?void 0:i.e7t;return(null==i?void 0:i.i7t)!==n},n.vm=function(){this.y6t.Dc&&(y(this.y6t.Dc),this.y6t.Dc=null)},n.x7t=function(t){return t.Km===M0.Z8t},n.E7t=function(t){return t.Km===M0.$8t},n.T7t=function(t){return t.YJt===O0.O8t},n.P7t=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.I7t(t),this.H7t(t)?(this.y6t.W7t.P6t=!1,null==(i=this.y6t.W7t.t6t)||i.$5t(),[4,this.switchToPlayerIfNoNextAd()]):[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(this)},n.H7t=function(t){var i;if(W0(t))return!0;if(this.y6t.Unt)return!1;var n=[O0.T8t,O0.N8t,O0.q8t,O0.X8t];return!(Jn(n,t.YJt)||Jn(n,null==(i=t.n7t)?void 0:i.YJt))},n.I7t=function(t){this.y6t.V4t(t)},n.q7t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.A7t.S6t(),this.y6t.$5t(),"nonlinear"===this.y6t.l4t&&(this.A7t.z7t(-1,!1),this.y6t.G7t(void 0)),"nonlinear"!==this.y6t.l4t&&"none"!==this.y6t.l4t?[3,2]:this.y6t.O6t()?[4,this.y6t.F6t()]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.y6t.X7t(),this.y6t.G3t?this.y6t.i3t():this.j7t()&&this.oa.So(new AT(this.oa.LP())),[2]}})}).call(this)},n.j7t=function(){return this.y6t.Q7t&&!this.y6t.K7t&&this.oa.UP},n.setCountdownTimer=function(){var t=this;this.vm(),this.y6t.Dc=m(function(){return t.m7t()},250)},n.k7t=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return void 0===t.Int?[2]:(this.y6t.W7t.P6t=!1,this.y6t.$5t(),this.y6t.O6t()?[4,this.y6t.F6t()]:[3,2]);case 1:return i.sent(),[3,3];case 2:this.y6t.p7t(!0),i.label=3;case 3:return[2]}})}).call(this)},n.b7t=function(t){this.y6t.ct!==t&&t>=0&&(this.y6t.C4(t),this.r7t(new kT(this.y6t.ct)))},n.w7t=function(t){this.y6t.B7t()!==t&&(0===t?this.y6t.Y7t(t,!0,!1):this.y6t.Y7t(t,!1,!1))},n.J7t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.y6t.Z7t&&void 0!==this.oa.HP()?(this.$7t=new dr,[4,br(this.oa.Ta(this.oa.nu(),this.$7t.Yg),this.$7t)]):[3,2];case 1:t.sent(),this.t9t&&this.oa.OP(this.t9t),this.t9t=void 0,t.label=2;case 2:return[2]}})}).call(this)},n.m7t=function(t){if(this.y0t){var i=this.y0t.i9t();i>this.y6t.ct&&this.b7t(A.round(i))}var n=this.y6t.MP;(t||!this.y6t.hx&&n!==this.y6t.e9t)&&(this.y6t.So(new Eg(n,void 0)),this.y6t.e9t=n)},n.hr=function(){this.$7t&&(this.$7t.Zg(),this.$7t=void 0),this.s9t=!1,this.C7t=0},n.kn=function(){this.hr(),this.Vo()},i}(uh);function W0(t){var i,n;return t.s7t===O0.S8t||(null==(i=t.n7t)?void 0:i.s7t)===O0.S8t||t.YJt===O0.O8t||(null==(n=t.n7t)?void 0:n.YJt)===O0.O8t}V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt(),Nt();var z0=function(t){function i(i,n,r){var e;return(e=t.call(this,i)||this).l9t=void 0,e.f9t=void 0,e.l9t=n,e.f9t=r,e}return Pt(i,t),xt(i,[{key:"MZt",get:function(){return uZ.V0t}}]),i}(t0);V(),It(),Bt(),Nt(),V(),It(),V(),It(),Bt(),Nt();var q0=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this)._9t=0,r.g9t=void 0,r}Pt(i,t);var n=i.prototype;return n.N0t=function(){var t;return null==(t=this.g9t)?void 0:t.yKt},n.xa=function(){return function(t,i){return jg(t,{bitrate:0,contentType:void 0,mediaUrl:void 0,traffickingParameters:void 0,traffickingParametersString:void 0,universalAdIds:[],get description(){return i.dB},get apiFramework(){return i.p9t},get creativeId(){return i.GKt},get title(){return i.dq},get wrapperAdIds(){return i.m9t},get wrapperAdSystems(){return i.w9t},get wrapperCreativeIds(){return i.y9t}})}(s0(this),this)},n.A9t=function(t){this.g9t=t;var i=X0(t);this.u4t(t.UYt,t.b9t,t.S9t,t.ct,i,-1)},xt(i,[{key:"v9t",get:function(){return this._9t},set:function(t){this._9t=t}},{key:"MZt",get:function(){return uZ.so}},{key:"p9t",get:function(){var t;return null==(t=this.g9t)?void 0:t.cYt}},{key:"GKt",get:function(){var t;return null==(t=this.g9t)?void 0:t.GKt}},{key:"dB",get:function(){var t;return null==(t=this.g9t)?void 0:t.dB}},{key:"dq",get:function(){var t;return null==(t=this.g9t)?void 0:t.dq}},{key:"m9t",get:function(){var t,i;return null!=(i=null==(t=this.g9t)?void 0:t.m9t)?i:[]}},{key:"w9t",get:function(){var t,i;return null!=(i=null==(t=this.g9t)?void 0:t.w9t)?i:[]}},{key:"y9t",get:function(){var t,i;return null!=(i=null==(t=this.g9t)?void 0:t.y9t)?i:[]}}]),i}(e0);function X0(t){return t.IKt.map(function(t){return new u0(t)})}var G0=function(t){function i(i){var n;return(n=t.call(this,i,n0.pk)||this).g9t=void 0,n.iJt=void 0,n}Pt(i,t);var n=i.prototype;return n.xa=function(){return function(t,i){return jg(t,{get adSystem(){return i.N0t()},get apiFramework(){return i.p9t},get bitrate(){return i.T9t},get contentType(){return i.qT},get creativeId(){return i.GKt},get description(){return i.dB},get mediaUrl(){return i.tJt},get title(){return i.dq},get traffickingParameters(){return i.k9t},get traffickingParametersString(){return i.E9t},get wrapperAdIds(){return i.m9t},get wrapperAdSystems(){return i.w9t},get wrapperCreativeIds(){return i.y9t},get universalAdIds(){return i.CKt}})}(s0(this),this)},n.A9t=function(t){this.g9t=t,this.u4t(t.UYt,t.b9t,t.S9t,t.ct,X0(t),t.P9t),this.f4t=t.D7t?n0.hZt:n0.a4t},n.N0t=function(){return this.g9t?Q0(this.g9t.yKt):void 0},xt(i,[{key:"MZt",get:function(){return uZ.V0t}},{key:"p9t",get:function(){return this.g9t?Q0(this.g9t.cYt):void 0}},{key:"T9t",get:function(){return this.g9t?this.g9t.x9t:0}},{key:"qT",get:function(){return this.g9t?Q0(this.g9t.qT):void 0}},{key:"GKt",get:function(){return this.g9t?Q0(this.g9t.GKt):void 0}},{key:"I9t",get:function(){return this.g9t?Q0(this.g9t.I9t):void 0}},{key:"dB",get:function(){var t;return null==(t=this.g9t)?void 0:t.dB}},{key:"tJt",get:function(){var t,i=null==(t=this.g9t)?void 0:t.tJt;return Fi(i)?i:this.iJt},set:function(t){this.iJt=t}},{key:"dq",get:function(){var t;return null==(t=this.g9t)?void 0:t.dq}},{key:"k9t",get:function(){return this.g9t?Q0(this.g9t.k9t):void 0}},{key:"E9t",get:function(){return this.g9t?Q0(this.g9t.E9t):void 0}},{key:"m9t",get:function(){var t,i;return null!=(i=null==(t=this.g9t)?void 0:t.m9t)?i:[]}},{key:"w9t",get:function(){var t,i;return null!=(i=null==(t=this.g9t)?void 0:t.w9t)?i:[]}},{key:"y9t",get:function(){var t,i;return null!=(i=null==(t=this.g9t)?void 0:t.y9t)?i:[]}},{key:"CKt",get:function(){var t,i;return null!=(i=null==(t=this.g9t)?void 0:t.CKt.map(function(t){return{adIdRegistry:t.R9t,adIdValue:t.C9t}}))?i:[]}}]),i}(e0);function Q0(t){return null===t?void 0:t}V(),It(),Bt(),V(),It(),Bt();var Y0=function(){function t(t,i){this.A7t=void 0,this.D9t=void 0,this.A7t=t,this.D9t=i}var i=t.prototype;return i.knt=function(t){this.A7t.knt(t)},i.rD=function(){this.A7t.rD()},i.Snt=function(t){this.A7t.Snt(t)},i.kn=function(){return ot.resolve()},xt(t,[{key:"M3t",get:function(){return this.A7t.M3t}},{key:"C3t",get:function(){return this.D9t}},{key:"G3t",get:function(){return this.A7t.G3t}},{key:"ynt",get:function(){var t;return null!=(t=this.A7t.ynt)?t:null}},{key:"mnt",get:function(){var t=this.A7t.B9t;return t?[t]:[]}},{key:"Ant",get:function(){return this.A7t.Ant}},{key:"bnt",get:function(){return this.A7t.bnt}}]),t}(),$0=function(){function t(t,i){this.s5t=void 0,this.X0t=void 0,this.M0t=void 0,this.G0t=void 0,this.L9t=void 0,this.M9t=void 0,this.s5t=t,this.X0t=[],this.L9t=!1,this.M9t=new Y0(this,i)}return xt(t,[{key:"N9t",get:function(){return this.M9t}},{key:"M3t",get:function(){return this.s5t}},{key:"G3t",get:function(){return this.L9t}},{key:"B9t",get:function(){return this.M0t}},{key:"ynt",get:function(){return this.G0t}},{key:"Ant",get:function(){var t=this;return nr(this.X0t,function(i){if(i._x)return[];var n=i.Jc;if(i===t.G0t&&void 0!==t.M0t){var r=n.indexOf(t.M0t);if(r>=0)return n.slice(r+1)}return n})}},{key:"bnt",get:function(){return this.X0t.filter(function(t){return!t._x})}}]),t}();V(),It(),Nt();var K0=function(t){function i(i){return t.call(this,"O9t",i)||this}return Pt(i,t),i.prototype.xa=function(){return new J0(this.Int.wnt())},i}(iO),J0=function(t){function i(i){return t.call(this,"adimpression",i)||this}return Pt(i,t),i}(nO);V(),It(),Nt();var Z0=function(t){function i(i){var n;return(n=t.call(this,"F9t")||this).Int=void 0,n.Int=i,n}return Pt(i,t),i.prototype.xa=function(){return new t1(this.Int.wnt())},i}(Ig),t1=function(t){function i(i){var n;return(n=t.call(this,"adbuffering")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var i1=function(t){function i(){return t.call(this,"U9t")||this}return Pt(i,t),i.prototype.xa=function(){return new n1},i}(Ig),n1=function(t){function i(){return t.call(this,"admetadata")||this}return Pt(i,t),i}(ah),r1=function(t){function i(i,n){var r;return(r=t.call(this,i,uZ.V0t)||this).W9t=void 0,r.G9t=void 0,r.z9t=void 0,r.W9t=n,r.G9t=[],r.z9t=[],r}Pt(i,t);var n=i.prototype;return n.V9t=function(t,i){for(var n=0;ne){var s=i-e;this.V9t(s,r),r.p0t=n,this.M3t.So(new v0(r))}}},n.f7t=function(t,n,r){if(this.G0t){var e=i.j9t(this.G0t,t);if(e){var s=n/r;this.M3t.So(new c0(e,s))}}},n.N7t=function(t,n,r){if(this.G0t){var e=this.M0t;if(!e){var s=i.j9t(this.G0t,t);if(!s||Jn(this.z9t,s))return void this.G9t.push(n);e=s,this.D4t(this.G0t,t),this.q9t(e)}this.y7t(n,e,r)}},n.y7t=function(t,i,n){t===x0.i8t?this.M3t.So(new i1):t===x0.G6t&&i?this.M3t.So(new K0(i)):t===x0.Q6t&&i?this.M3t.So(new Z0(i)):t===x0.K6t&&i&&n?this.M3t.So(new w0(i,n)):t===x0.mJt&&i&&n?this.M3t.So(new y0(i,n)):t===x0.Y6t&&i&&n&&this.M3t.So(new _0(i,n))},n.rD=function(){this.W9t.rD()},n.knt=function(t){this.W9t.knt(t)},n.hr=function(){var t=Boolean(this.M0t&&this.M0t.l4t===n0.hZt);this.q9t(void 0),this.H9t(void 0,t);for(var i,n=Ft(this.X0t);!(i=n()).done;){var r=i.value;this.k6t(r)}tr(this.X0t),tr(this.G9t),tr(this.z9t)},n.kn=function(){this.hr()},n.Snt=function(t){},i.j9t=function(t,i){if(i.V7t)return t.Jc[i.V7t.i7t-1]},xt(i,[{key:"G3t",get:function(){return this.W9t.G3t}}]),i}($0);function e1(t){var i=f.google.ima.settings;t.ads&&t.ads.vpaidMode&&f.google.ima.settings.setVpaidMode(function(t){var i=f.google.ima.ImaSdkSettings.VpaidMode;switch(t){case YA.ENABLED:return i.ENABLED;case YA.INSECURE:return i.INSECURE;case YA.DISABLED:default:return i.DISABLED}}(t.ads.vpaidMode)),i.setPlayerVersion("10.0.0"),i.setPlayerType("THEOplayer"),i.setAutoPlayAdBreaks(!0),i.setDisableCustomPlaybackForIOS10Plus(!s1(t));var n=function(t){var i,n,r,e=null==(n=t.ads)||null==(i=n.googleIma)?void 0:i.language;if(void 0!==e)return e;var s=null==(r=t.ui)?void 0:r.language;if(qi(s))return s;return}(t);n&&i.setLocale(n)}function s1(t){return Oi.ru&&t.allowNativeFullscreen}V(),It();var u1=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,i,n)||this).ko=!1,h.fti=void 0,h.kz=void 0,h.t5=void 0,h.y0t=void 0,h.lti=void 0,h.vti=void 0,h.Dc=void 0,h.WA=void 0,h.tti=void 0,h.eti=void 0,h.X3t=!1,h.sti=void 0,h.nti=void 0,h.i6t=void 0,h.wti=void 0,h.Eti=-1,h.f4t="none",h.VJ=void 0,h.oti=void 0,h.rti=!1,h.m6t=void 0,h.Z9t=!1,h.ati=new dr,h.s6t=void 0,h.$9t=!1,h.iti=!1,h.Iti=function(t){h.M3t.So(t)},h.Pti=function(t){h.sti=new lw(dw.ADVERTISEMENT_ERROR,"Error while recovering from failed IMA ad.",t.error.message),h.nti=yw(h.sti)},h.e9t=NaN,h.hti=function(){h.ko||h.qx()},h.VJ=r,h.kz=!0,h.WA=NaN,h.t5=Up.VL,h.tti=!1,h.eti=!1,h.m6t=new r1(h.M3t,h),h.wti=new H0(h,h.oa,h.m6t),h.wti.wn(Jy.ma,h.Pti),h.oa.wn(ch.uo,h.hti),h.i6t=new D0(h,h.oa,h.Q3t,e,h.m6t),h.fti=o,h.lti=u,h.vti=s,h.we(),h.lti.wn("xti",h.Iti),h}Pt(i,t);var n=i.prototype;return n.K9t=function(t,i,n){i===XB.pnt&&void 0!==n&&(this.X3t=n),this.i6t._6t(t,i)},n.knt=function(t){for(var i,n=Ft(this.J9t());!(i=n()).done;){var r=i.value;uK(r.sources,r.timeOffset)||t.M6(r,XB.gnt,!1)}},n.J9t=function(){for(var t,i=[],n=this.B3t,r=n.mnt,e=n.Ant,s=[],u=Ft(r.concat(e));!(t=u()).done;){var o=t.value,h=o.od.f9t;if(!Jn(s,h.jI)){var a,c,f=h.J5t(o.m9t);if(f>=0)(a=i).push.apply(a,[].concat(h.f5t.slice(f)));else(c=i).push.apply(c,[].concat(h.f5t));s.push(h.jI)}}for(var v,d=Ft(this.i6t.Ant);!(v=d()).done;){var l,g=v.value;if(!g.P5t)(l=i).push.apply(l,[].concat(g.f5t))}return or(i)},n.LP=function(){if(!this.w0t)return 0;var t=this.w0t.i9t();return E(this.ct)||t<0?0:this.ct-t},n.OP=function(t,i){},n.Nd=function(){return this.WA||NaN},n.C4=function(t){this.WA=t},n.tx=function(){return this.oa.$P},n.ix=function(t){this.Y7t(this.Mx,t,!0)},n.ox=function(){return this.kz},n.p7t=function(t){this.kz=t},n.Cx=function(){var t,i,n;return null!=(n=null==(i=this.w0t)||null==(t=i.O7t())?void 0:t.S9t)?n:0},n.Nx=function(){var t,i,n;return null!=(n=null==(i=this.w0t)||null==(t=i.O7t())?void 0:t.b9t)?n:0},n.xP=function(){return[]},n.K3t=function(t){this.s6t=t,this.i6t.K3t(t)},n.D6t=function(){!this.Z9t&&this.w0t&&(this.w0t.Tn(),this.Z9t=!0)},n.G7t=function(t){this.l4t=t?t.D7t?"linear":"nonlinear":"none"},n.Tx=function(){return OA.iL()._s()},n.Lx=function(){return this.oa.Mx},n.Ox=function(t){this.Y7t(t,this.$P,!0)},n.B7t=function(){return this.oa.$P?0:this.oa.Mx},n.Y7t=function(t,i,n){var r=this.oa.Mx!==t||this.oa.$P!==i;r&&(this.oa.Mx=t,this.oa.$P=i),this.w0t&&n&&this.w0t.Ox(this.B7t()),r&&this.So(new ET(this.MP,this.Mx))},n.VP=function(){return!1},n.HP=function(){if(this.sti&&this.X3t)return this.sti},n.qP=function(){if(this.nti&&this.X3t)return this.nti},n.bx=function(){return this.t5},n.i5=function(t){this.t5=t,this.So(new Fp(this.MP,t))},n.qx=function(){this.oa.mn(ch.uo,this.hti),this.ko||(this.ko=!0,this.i6t.qx(),this.r9t())},n.Gx=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:if(this.oti)return[2];this.ati.Zg(),this.ati=new dr,t=this.hx,this.p7t(!1),this.So(new _T(this.MP)),this.uti()||(this.Z7t||this.oa.we(),this.So(new Hp(this.MP))),this.h9t||(this.a9t=!1),i=Boolean(this.w0t),this.oti=this.i6t.v6t(),n.label=1;case 1:return n.trys.push([1,,3,4]),[4,this.oti];case 2:return n.sent(),[3,4];case 3:return this.oti=void 0,[7];case 4:try{yr(this.ati.Yg)}catch(t){return[2]}if(this.ko||this.hti(),this.sti&&this.X3t)return[2];if(this.w0t){if(t)if(i)try{yr(this.ati.Yg),this.w0t.cti(),this.So(new qp(this.MP))}catch(t){return[2]}else this.D6t()}else this.X3t||(this.i3t(),this.Q3t.Gx());return[2]}})}).call(this)},n.zx=function(){var t;this.hx||(this.p7t(!0),this.So(new pT(this.MP))),this.ati.Zg(),this.h9t?null==(t=this.w0t)||t.zx():this.a9t=!0},n.rD=function(){var t;null==(t=this.w0t)||t.rD()},n.X7t=function(){this.w0t&&(this.lti.dti(),this.w0t.Xx(),this.w0t.zg(),this.w0t=void 0,this.l4t="none",this.Z9t=!1)},n.Xx=function(){return jt(function(){var t;return zt(this,function(i){return this.e9t=0,this.i6t.hr(),this.ati.Zg(),this.p7t(!0),this.tti=!1,this.eti=!1,this.h9t=!1,this.m6t.hr(),this.X7t(),this.U7t(),null==(t=this.fti)||t.hr(),this.a9t=!1,this.lti.zg(),[2]})}).call(this)},n.be=function(){this.vti.be(),this.Z7t&&this.oa.be()},n.we=function(){this.vti.we()},n._ti=function(){return Boolean(this.w0t)&&Jn(this.w0t.gti(),-1)&&!this.tti},n.I5t=function(){this.i6t.I5t()},n.O6t=function(){return this.i6t.O6t},n.$5t=function(){this.i6t.$5t()},n.F6t=function(){return this.i6t.F6t()},n.F3t=function(t){if(this._ti()){if(t.type===ch.jw&&this.oa.UP)return!0;if(t.type===ch.Bw)return this.tti=!0,this.lti.dti(),!0}return!1},n.uti=function(){return Boolean(this.w0t&&this.w0t.O7t())},n.C6t=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),this.X7t(),i=this.pti(),this.vti.VY(),n=this,[4,this.lti.C6t(t,this.fti,i)];case 1:return n.w0t=e.sent(),this.mti(this.w0t),[3,3];case 2:return r=e.sent(),this.wti.P7t(r),[3,3];case 3:return[2]}})}).call(this)},n.mti=function(t){if(t.Ox(this.B7t()),this.i6t.p6t===N0.d6t){var i=t.gti();if(i.length)for(var n,r=Ft(i);!(n=r()).done;){var e=n.value;this.m6t.L4t(e,this.i6t.t6t)}else this.m6t.L4t(this.i6t.t6t.dd,this.i6t.t6t)}this.wti.hr(),this.wti.h7t(t)},n.Wx=function(){if(this.y0t&&this.Z7t&&this.uti())return this.oa.Wx()},n.Hx=function(){return this.Z7t&&this.G3t?this.oa.Ma:t.prototype.Hx.call(this)},n.pti=function(){var t,i,n=!!(this.i6t.p6t===N0.d6t)&&this.Y9t;return void 0!==this.VJ.ads.googleIma.uiElements?t=this.VJ.ads.googleIma.uiElements:this.VJ.ads.showCountdown||(t=[]),void 0!==this.VJ.ads.allowedMimeTypes&&(i=this.VJ.ads.allowedMimeTypes),{yti:i,Ati:t,bti:n,T9t:this.VJ.ads.googleIma.bitrate,Sti:void 0,Tti:this.s6t}},n.r9t=function(){if(this.y0t){var t=this.pti();this.y0t.kti(t)}},n.V4t=function(t){W0(t)||(this.sti=new lw(dw.ADVERTISEMENT_ERROR,t.Py),this.nti=new md(gd.AD_ERROR,"There was a problem playing ads.",this.sti)),this.M3t.So(KZ.U3t(t))},n.U7t=function(){this.G3t&&(this.oa.be(),this.i3t(),this.we())},n.d9t=function(){var t;this.oa.LP()!==1/0&&0!==this.oa.Tx().length&&((null==(t=this.i6t.t6t)?void 0:t.g5t)&&-1!==this.Eti&&(this.oa.OP(this.oa.LP()+this.Eti),this.Eti=-1))},n.c9t=function(t){var i,n;this.Eti=null!=(n=null==(i=t.V7t)?void 0:i.p0t)?n:-1},n.i3t=function(){t.prototype.i3t.call(this),this.oa.be(),this.Z7t&&!this.oa.UP&&this.oa.Gx()},n.c5t=function(){this.Z7t||t.prototype.c5t.call(this)},n.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.wti.mn(Jy.ma,this.Pti),[4,t.prototype.kn.call(i)];case 1:return n.sent(),this.X7t(),this.lti.mn("xti",this.Iti),this.lti.zg(),this.vti.zg(),this.i6t.kn(),this.wti.kn(),[2]}})}).call(this)},xt(i,[{key:"B3t",get:function(){return this.m6t.N9t}},{key:"Q9t",get:function(){return this.m6t}},{key:"W7t",get:function(){return this.i6t}},{key:"Z7t",get:function(){return s1(this.VJ)}},{key:"C3t",get:function(){return i.C3t}},{key:"Y9t",get:function(){return this.VJ.ads.preload===KA.MIDROLL_AND_POSTROLL}},{key:"l4t",get:function(){return this.f4t},set:function(t){this.f4t=t}},{key:"w0t",get:function(){return this.y0t},set:function(t){this.y0t=t,this.Z9t=!1}},{key:"h9t",get:function(){return this.$9t},set:function(t){this.$9t=t}},{key:"Unt",get:function(){return this.X3t}},{key:"Q7t",get:function(){return this.tti}},{key:"a9t",get:function(){return this.iti},set:function(t){this.iti=t}},{key:"K7t",get:function(){return this.eti},set:function(t){this.eti=t}},{key:"u9t",get:function(){return this.rti},set:function(t){this.rti=t}}],[{key:"C3t",get:function(){return uZ.V0t}}]),i}(E0);V(),It();var o1=function(){function t(){this.Rti=void 0}var i=t.prototype;return i.registerWebImaAdPlayerConstructor=function(t){this.Rti=t},i.createAdPlayer=function(t,i,n){return h1()&&this.Rti?this.Rti(t,i,n):void 0},t}();function h1(){return!!Boolean(f.google&&f.google.ima)&&!(1===b.keys(f.google.ima).length&&Boolean(f.google.ima.dai))}o1.Ng=new o1;var a1=function(){function t(){}var i=t.prototype;return i.qz=function(t){return t&&t.integration===CS.GOOGLE_IMA},i.x3t=function(t,i,n){return o1.Ng.createAdPlayer(t,i,n)},i.M6=function(t,i,n,r){n.K9t(t,i,r)},i.sj=function(t){var i=wJ(t.sources);if(i){var n={integration:CS.GOOGLE_IMA,sources:i,omidAccessModeRules:j0(t.omidAccessModeRules)},r=yJ(t.timeOffset);return void 0!==r&&(n.timeOffset=r),n}},xt(t,[{key:"P3t",get:function(){return u1.C3t}}]),t}();PS.Ng.zz(new a1),V(),It(),Bt(),V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Nt();var c1=function(t){function i(){return t.call(this,"z0t")||this}return Pt(i,t),i.prototype.xa=function(){return new f1},i}(Ig),f1=function(t){function i(){return t.call(this,"adloaded")||this}return Pt(i,t),i}(ah),v1=-1,d1=function(){function t(t,i){this.X0t=void 0,this.T5t=void 0,this.Dti=void 0,this.x0t=void 0,this.Xp=void 0,this.k0t=void 0,this.Lti=void 0,this.Mti=void 0,this.X0t=[],this.x0t=!1,this.T5t=t,this.Xp=0,this.k0t=i,this.Lti=NaN,this.Mti=!1,this.Dti=new tZ(this,this.k0t)}var i=t.prototype;return i.Oti=function(){return this.Xp0},n.tii=function(t,i){for(var n,r,e=0,s=Ft(this.Wti);!(r=s()).done;){var u=r.value;if(!u.P0t()){var o=u.dd;o>=t&&o<=i&&o>=e&&!E(o)&&(e=(n=u).dd)}}return n},n.eii=function(t){return this.Jti(new Eg(t,void 0))},n.sii=function(){if(!this.nii&&void 0!==this.s6t){this.nii=!this.Wti.some(function(t){return E(t.dd)});for(var t,i=Ft(this.Wti);!(t=i()).done;){var n=t.value;n.dd!==v1&&n.dd<=this.s6t&&!n.P0t()&&n.I0t()}}},n.rii=function(t){for(var i,n=Ft(t);!(i=n()).done;){i.value.I0t()}this.J4t.hii(t),0===this.Hti&&this.Ro()},n.$ti=function(t,i,n){var r=this;return this.Wti.filter(function(e){if(e.P0t())return!1;var s=e.dd;return r.oii(s,t)||r.aii(s,t,i,n)})},n.oii=function(t,i){switch(i){case 0:return 0===t;case v1:return t===v1;default:return!1}},n.aii=function(t,i,n,r){if(t<0)return!1;var e=t-i;return-1!==e&&e<=n&&e>=-r},n.uii=function(t){if(t&&t.length>0){for(var n,r=Ft(t);!(n=r()).done;){var e=n.value,s=i.Z5t(e._Ot),u=this.dgt(e);-1===u&&(this.nii=void 0===this.s6t,this.Wti.push(new d1(s,this.cii)),u=this.Wti.length-1),this.Wti[u].Fti(e)}this.No()}},n.dgt=function(t){var n=i.Z5t(t._Ot);return Xn(this.Wti,function(t){return n===i.Z5t(t.Bti)})},n.dii=function(t){Yn(this.Wti,t)},n.K3t=function(t){this.s6t=t,this.nii=void 0===t},i.Z5t=function(t){switch(t){case"start":case"00:00:00":case"00:00:00.000":case"0%":case"0":return"0";case"end":case"100%":return"-1";default:return t}},xt(i,[{key:"Hti",get:function(){for(var t,i=0,n=Ft(this.Wti);!(t=n()).done;){t.value.P0t()||(i+=1)}return i}},{key:"Ant",get:function(){return this.Wti}}]),i}(hh);V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Bt(),Nt(),Ut();var g1,w1=function(t){function i(i,n){var r;return(r=t.call(this)||this).Q1t=void 0,r.yii=[],r.mii=[],r.JW=void 0,r.bii=void 0,r.Sii=void 0,r.s5t=new hh,r.Tii=function(t){t.stopPropagation(),r.kii()},r.kii=function(){for(var t,i=Ft(r.yii);!(t=i()).done;)for(var n,e=Ft(t.value.kYt);!(n=e()).done;){var s=n.value;nK(s.uri)}},r.Q1t=v.createElement("div"),r.Q1t.style.display="none",r.bii=i,r.Sii=n,r}Pt(i,t);var n=i.prototype;return n.vii=function(){this._ii(),this.gii(),this.JW=void 0},n.pii=function(t){this.mii=this.mii.concat(t)},n.wii=function(t){this.yii=this.yii.concat(t)},n.gii=function(){this.mii=[]},n._ii=function(){this.yii=[]},n.Aii=function(t){for(var i,n=Ft(this.mii);!(i=n()).done;){var r=i.value;r.eX===t&&nK(r.eventURL)}},n.be=function(){this.fii.style.display=""},n.we=function(){this.fii.style.display="none"},n.kn=function(){this.Vo(),this.s5t.Vo(),Zi(this.Q1t)},xt(i,[{key:"fii",get:function(){return this.Q1t}},{key:"M3t",get:function(){return this.s5t}}]),i}(hh);function m1(t,i){var n=i;if(!function(t){return"ui"in t}(t))return n;var r,e=t.ui.language;if(qi(e)){var s=t.ui.languages;if(!s)return n;r=s[e]}else r=e;return r&&r[i]&&(n=r[i]),n}V(),It(),V(),It(),Ut();var y1=((g1={})[pA.cR]=1,g1[pA.dR]=2,g1[pA.lR]=2,g1);function p1(t,i){var n=i?i.map(function(t){return t.toLowerCase()}):i;return An(t.filter(function(t){var i=t.type.toLowerCase();return!!ji(n)&&-1!==n.indexOf(i)&&KK(i)}),function(t,i){return y1[t.type]-y1[i.type]}).map(_1)}function _1(t){return AA({src:t.contentURL,type:t.type,isAdvertisement:!0})}function k1(t,i){return $M(b1(t),b1(i))}function b1(t){return{Mi:t.height,Ti:t.width}}function A1(t,i,n,r){var e,s=function(t,i,n,r){var e,s=1/0,u=t.filter(function(t){return!KK(t.type)}).filter(function(t){return void 0===r||-1!==r.indexOf(t.type)});if(u.length){for(var o,h=Ft(u);!(o=h()).done;){var a=o.value,c=(A.abs(a.width/i-1)+A.abs(a.height/n-1))/2;c0&&(t.tJt=null==(e=u[0].src)?void 0:e.trim());return pE({sources:u},r)}var T1=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,i,n)||this).eei=void 0,h.YS=void 0,h.J4t=void 0,h.sc=void 0,h.xii=void 0,h.Rii=void 0,h.qYt=void 0,h.Wii=void 0,h.Pii=void 0,h.tei=void 0,h.b4=void 0,h.iei=void 0,h.sei=void 0,h.$1t=void 0,h.Y1t=void 0,h.nT=void 0,h.Cii=void 0,h.Qii=void 0,h.Yii=void 0,h.Kii=void 0,h.jii=void 0,h.zii=void 0,h.Gii=void 0,h.Xii=void 0,h.Uii=void 0,h.Oii=void 0,h.eei=r,h.YS=e,h.J4t=s,h.sc=u,h.xii=o,h.Pii=!1,h.tei=0,h.b4=-1,h.nT=new dr,h.Cii=!0,h.Qii=function(){h.Mii()},h.Yii=function(){h.nT=void 0,h.Pii||(h.Zii(),h.Pii=!0),h.Cii&&(h.Cii=!1,h.J4t.qti()),h.fii.style.display="block",h.xii.mn(Mp.TM,h.Yii),h.Pii=!0},h.Kii=function(){var t=h.MP,i=h.ct,n=t/i;(0===h.tei&&n>=.25?(h.Aii(NK.gJt),h.tei=1):1===h.tei&&n>=.5?(h.Aii(NK.mJt),h.tei=2):2===h.tei&&n>=.75&&(h.Aii(NK.pJt),h.tei=3),h.Vii(t,i),h.rei(),h.b4=t,h.qYt)&&(-1!==h.qYt.JYt&&h.qYt.JYt1){var e=n.filter(function(t){return t.P0t()}).length;r+=". "+m1(this.YS,"Ad")+" "+(e+1)+"/"+n.length}xx(this.sei,r)}},xt(i,[{key:"Eii",get:function(){return this.Pii}},{key:"MP",get:function(){return this.xii.MP}},{key:"ct",get:function(){var t=this.xii.ct;return E(t)&&this.qYt&&(t=this.qYt.ct||0),t}},{key:"UP",get:function(){return this.xii.UP}},{key:"$P",get:function(){return this.xii.$P},set:function(t){this.xii.$P=t,t?this.Aii(NK.hJt):this.Aii(NK.oJt)}},{key:"hx",get:function(){return this.xii.hx}},{key:"Ax",get:function(){return this.xii.Ax}},{key:"Mx",get:function(){return this.xii.Mx},set:function(t){this.xii.Mx=t}},{key:"Rx",get:function(){return this.xii.Rx}},{key:"Bx",get:function(){return this.xii.Bx}},{key:"Iii",get:function(){return this.Rii}},{key:"Jii",get:function(){return this.qYt&&-1!==this.qYt.JYt&&this.xii.MP>=this.qYt.JYt}}]),i}(w1);V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It(),Bt(),Nt();var S1=function(t){function i(){var n;return(n=t.call(this)||this).Ls=void 0,n.y1t=function(t){n.So(new ah("rD")),n.hei(t)},n.hei=function(t){t.stopPropagation()},n.Ls=i.yr(),n.w1t(),n}Pt(i,t);var n=i.prototype;return n.w1t=function(){this.xe.addEventListener("mouseup",this.y1t),this.xe.addEventListener("touchend",this.y1t),this.xe.addEventListener("mousedown",this.hei)},n.p1t=function(){this.xe.removeEventListener("mouseup",this.y1t),this.xe.removeEventListener("touchend",this.y1t),this.xe.removeEventListener("mousedown",this.hei)},n.kn=function(){this.p1t(),Zi(this.Ls)},i.yr=function(){var t=v.createElement("div");return t.className="theoplayer-ad-nonlinear-close",t.style.position="absolute",t.style.right="0",t.style.top="0",t.style.cursor="pointer",t.style.fontSize="1.7em",t.style.lineHeight="0.75em",t},xt(i,[{key:"xe",get:function(){return this.Ls}}]),i}(uh),E1=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).aei=void 0,e.L0t=void 0,e.J4t=void 0,e.yu=void 0,e.fei=void 0,e.dei=function(){e._ei(),e.Aii(NK.TJt),e.Sii()},e.cei=function(t){var i,n;e._ei(),null==(i=e.JW)||i.jJt(qK.zJt);var r,s,u,o=null==(n=e.L0t)?void 0:n.DKt[0],h=null!=(s=null!=(r=null==o?void 0:o.FKt)?r:null==o?void 0:o.LKt)?s:null==o?void 0:o.VKt;e.bii(null!=(u=null==h?void 0:h.LJt)?u:"")},e.vei=function(){e.we(),tn(e.fii),e.Sii(),e.aei=void 0,e.L0t=void 0},e.pei=function(){e.yu||(e.fei=void 0,e.yu=new S1,e.fii.children[0].appendChild(e.yu.xe),e.yu.wn("rD",e.mei))},e.mei=function(){e.Aii(NK.cJt),e.p$t()},e.fii.className="theoplayer-ad-nonlinear",e.fii.style.position="absolute",e.fii.style.width="100%",e.fii.style.bottom="3em",e.fii.style.zIndex="10",e.fii.style.textAlign="center",e.J4t=r,e}Pt(i,t);var n=i.prototype;return n.vii=function(){t.prototype.vii.call(this),this.fii&&tn(this.fii)},n.qii=function(t,i,n){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.L0t&&this.Nii(),this.aei=t,this.L0t=t.xKt,0!==this.L0t.NKt.length&&this.pii(this.L0t.NKt),this.JW=i,0===this.L0t.DKt.length?[3,2]:(this.wii(this.L0t.DKt[0].WKt),this.fii.addEventListener("error",this.cei),this.fii.addEventListener("load",this.dei),[4,this.Hii()]);case 1:n.sent(),this.lei(),n.label=2;case 2:return[2]}})}).call(this)},n.p$t=function(){var t;if(void 0===this.fei){var i=null==(t=this.L0t)?void 0:t.DKt[0];i&&i.od&&-1!==i.od.JYt&&(this.Aii(NK.cJt),this.M3t.So(new c0(this.aei,0)),this.vei())}},n.Zii=function(){void 0!==this.aei&&this.M3t.So(new aO(this.aei,this.J4t.MP))},n.Xx=function(){this.Nii(),this.aei=void 0,this.L0t=void 0},n.Nii=function(){this._ei(),void 0!==this.aei&&(this.aei.I0t(),this.M3t.So(new fO(this.aei,this.J4t.MP))),this.vii(),this.gei(),void 0!==this.fei&&(w(this.fei),this.fei=void 0)},n._ei=function(){this.fii.removeEventListener("load",this.dei),this.fii.removeEventListener("error",this.cei)},n.Hii=function(){return jt(function(){var t,i,n,r,e,s,u,o,h;return zt(this,function(a){return(t=v.createElement("div")).className="theoplayer-ad-nonlinear-content",t.style.position="relative",t.style.display="inline-block",i=this.L0t.DKt[0],n=v.createElement("a"),i.WKt.AYt&&(n.href=i.WKt.AYt,n.target="Xu",n.setAttribute("rel","noopener")),i.FKt?(r=i.FKt,(e=v.createElement("iframe")).src=r.LJt,n.appendChild(e)):i.LKt?(s=i.LKt,(u=v.createElement("img")).src=s.LJt,n.appendChild(u)):i.VKt&&(o=i.VKt,(h=v.createElement("iframe")).src=o.LJt,n.appendChild(h)),i.KKt(),n.addEventListener("mousedown",this.Tii),n.addEventListener("touchend",this.Tii),this.fii.firstChild&&(tn(this.fii),this.Nii()),t.appendChild(n),this.fii.appendChild(t),this.be(),[2]})}).call(this)},n.lei=function(){var t;if(this.L0t){var i=null==(t=this.L0t.DKt[0].od)?void 0:t.JYt;void 0!==i&&-1!==i&&(this.fei=f.setTimeout(this.pei,1e3*i))}},n.gei=function(){this.yu&&(this.yu.mn("rD",this.mei),this.yu.kn()),this.yu=void 0},xt(i,[{key:"oei",get:function(){return this.aei}},{key:"uei",get:function(){return this.yu}},{key:"wei",get:function(){return this.J4t.yei()}}]),i}(w1);V(),It(),Wt(),Yt();var I1=function(){function t(){}return t.Aei=function(t,i,n){return jt(function(){var r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:r=[],e=t.shift(),s=[],a.label=1;case 1:if(!e)return[3,6];a.label=2;case 2:return a.trys.push([2,4,,5]),[4,(new nJ).eZt(e,i)];case 3:return u=a.sent(),r=r.concat(u),[3,5];case 4:return o=a.sent(),h=KZ.V3t(o,e.sources.src),n.So(h),s.push(h.Ky),[3,5];case 5:return e=t.shift(),[3,1];case 6:return[2,[r,s]]}})})()},t}();V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Nt();var R1=function(t){function i(){return t.call(this,"Eot")||this}return Pt(i,t),i.prototype.xa=function(){return new C1},i}(Ig),C1=function(t){function i(){return t.call(this,"statechange")||this}return Pt(i,t),i}(ah);V(),It();var P1=function(t){return t.IDLE="idle",t.LOADING="loading",t.DONE="done",t.ERROR="error",t.EVICTED="evicted",t}({});V(),It(),Nt(),V(),It(),Bt(),Nt(),Ut();var N1=function(){function t(){this.nc=[],this.hu=void 0}var i=t.prototype;return i.CI=function(t){return this.nc[t]},i.lO=function(t){this.nc.push(t),this.hu&&this.hu.push(t.Ca),this.bei(t)},i.Sei=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;this.lO(r)}},i.Tei=function(t,i){i>=0&&i<=this.nc.length&&(this.nc.splice(i,0,t),this.hu&&this.hu.splice(i,0,t.Ca),this.bei(t))},i.fO=function(t){return Jn(this.nc,t)},i._S=function(t){this.kei(this.nc.indexOf(t))},i.kei=function(t){if(t>=0&&t0&&this.asi=i)return r;return r}(t,s)/8}).reduce(function(t,i){return t+i},0)),E=ro(),h&&0!==h.length){for(R=function(){var t=N.value,i=t.qualityId,n=new OA(t.startsAndEnds);if(E.has(i))E.get(i).timeRanges=E.get(i).timeRanges.OM(n).LM(5e-4);else{var r,e=Wn(a,function(t){return t.o===i}),s=A.min(I.Wei,null!=(r=null==e?void 0:e.mM.ct)?r:1/0);E.set(i,{timeRanges:n,totalQualityDurationToCache:s})}},C=h.reduce(function(t,i){return t+i.byteSize},0),P=Ft(h);!(N=P()).done;)I=this,R();u=new U1(C,E,this.Wei)}else{for(D=Ft(a);!(x=D()).done;)B=x.value,E.set(B.o,{timeRanges:OA.iL(),totalQualityDurationToCache:A.min(B.mM.ct,this.Wei)});u=new U1(0,E,this.Wei)}return this.fsi=u,[2]}})}).call(this)},n.mi=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.ko];case 1:return i.sent(),[4,this.gsi(this.pCt,t)];case 2:return i.sent(),[2]}})}).call(this)},n.gsi=function(t,i){return jt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:if(!t.Zei)throw new p("Unexpected - manifest is missing locations");return[4,this.psi()];case 1:for(u.sent(),n=[],r=Ft(t.smt);!(e=r()).done;)s=e.value,n.push(this.msi(s,t.Zei[0],i));return[2,Ir(n)]}})}).call(this)},n.psi=function(){return jt(function(){var t,i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return[4,this.wsi.iPt()];case 1:t=u.sent(),i=Ft(t),u.label=2;case 2:return(n=i()).done?[3,9]:(r=n.value,[4,this.cPt.lPt.Wy(r.key)]);case 3:return(e=u.sent())?[4,b2(e,this.XSt.o,this.cPt.lPt,this.Mei)]:[3,5];case 4:return u.sent(),[3,8];case 5:return u.trys.push([5,7,,8]),[4,this.cPt.lPt.zSt(r,this.Mei)];case 6:return u.sent(),[3,8];case 7:throw s=u.sent(),new H1("Unable to store manifest with url: "+r.locationURL,s);case 8:return[3,2];case 9:return[4,this.wsi.rPt()];case 10:return u.sent(),[2]}})}).call(this)},n.msi=function(t,i,n){for(var r,e=[],s=Ft(t.kmt);!(r=s()).done;)for(var u,o=Ft(A2(r.value,this.XSt.NS.preferredTrackSelection));!(u=o()).done;){var h=u.value;e.push(this.ysi(h,i,n))}return Ir(e)},n.ysi=function(t,i,n){return jt(function(){var r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:return r=this.XSt.NS.bandwidth,e=S2(t.KI,r),t.Km===cw.Bk&&t.Tpt&&t.Tpt.aH.widevine&&"persistent"===t.Tpt.aH.widevine.licenseType?[4,this.Asi(t.Tpt)]:[3,2];case 1:a.sent(),yr(n),a.label=2;case 2:for(s=[],u=Ft(e);!(o=u()).done;)h=o.value,s.push(this.bsi(h,i,n));return[2,Ir(s)]}})}).call(this)},n.bsi=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:yr(n),r=t.mM.ect[0].EO,e=r+this.Wei,s=[],u=!1,o=Ft(t.mM.ect),c.label=1;case 1:return(h=o()).done||((a=h.value).EO>=e||this.stopIfFailed(u))?[3,5]:[4,this.Ssi(n)];case 2:return c.sent(),[4,this.Tsi.nsi()];case 3:c.sent(),s.push(this.Tsi.osi(this.ksi(a,t,i),this.Esi).catch(function(t){return u=!0,ot.reject(t)})),c.label=4;case 4:return[3,1];case 5:return[2,Ir(s)]}})}).call(this)},n.Ssi=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return(null==t?void 0:t.Hg)?[4,this.Esi.Qy]:[3,2];case 1:throw i.sent(),new wr;case 2:return[2]}})}).call(this)},n.Psi=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.ko.catch(yn)];case 1:return t.sent(),[2,this.pCt]}})}).call(this)},n.Asi=function(t){return ot.resolve()},n.xsi=function(){return Vi.um("License renewal unsupported in this SDK."),ot.resolve()},n.ksi=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:return r=this,e=this.cPt.dPt,s=zj(t.Jei.Yu,t.Jei.Sat),[4,e.Wy(s)];case 1:return(u=v.sent())?[4,b2(u,this.XSt.o,e,this.Mei)]:[3,3];case 2:return v.sent(),this.Isi(u,!1),[3,7];case 3:return v.trys.push([3,6,,7]),[4,this.Rsi(t.Jei)];case 4:return o=v.sent(),h=this.Csi(t,i,n,o),a=h.segmentMetadataEntry,c=h.segmentEntry,[4,this.cPt.uPt(function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.dPt.zSt(a,this.Mei)];case 1:return i.sent(),[4,t.ect.zSt(c,this.Mei)];case 2:return i.sent(),[2]}})}).call(r)})];case 5:return v.sent(),this.Isi(a,!0),[3,7];case 6:throw f=v.sent(),new H1("Unable to store segment with url: "+t.Jei.Yu,f);case 7:return[2]}})}).call(this)},n.Rsi=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.Mut.pat(t,{Eat:this.DEFAULT_CACHING_SEGMENT_TIMEOUT,Hk:this.DEFAULT_CACHING_SEGMENT_CONNECTION_TIMEOUT})];case 1:return i=n.sent(),[4,this.Lut(i)];case 2:return[2,n.sent()]}})}).call(this)},n.Lut=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.HT()];case 1:return[2,{buffer:i.sent()}]}})})()},n.Csi=function(t,i,n,r){var e=zj(t.Jei.Yu,t.Jei.Sat),s=t.EO,u=t.ct,o=this.Dsi(r);return{segmentMetadataEntry:{key:e,segmentURLsegmentByteRange:e,manifestURL:Wj(n),qualityId:i.o,byteSize:o,startsAndEnds:new OA([s,s+u]).kM,references:[this.XSt.o]},segmentEntry:{key:e,segmentURLsegmentByteRange:e,manifestURL:Wj(n),data:r,references:[this.XSt.o]}}},n.Dsi=function(t){return t.buffer.byteLength},n.Isi=function(t,i){var n=t.qualityId,r=this._si,e=r.dO;e.get(n).timeRanges=e.get(n).timeRanges.OM(new OA(t.startsAndEnds)).LM(5e-4),this.fsi=new U1(i?r.qei+t.byteSize:r.qei,e,this.Wei)},n.stopIfFailed=function(t){return!1},xt(i,[{key:"Oei",get:function(){return this.qx()}},{key:"vsi",get:function(){return this.lsi}},{key:"fsi",get:function(){return this._si},set:function(t){this._si.zO(t)||(this._si=t,t.zO(U1.Kei)||this.So(new j1))}}]),i}(uh);function b2(t,i,n,r){return jt(function(){return zt(this,function(e){switch(e.label){case 0:return Jn(t.references,i)?[3,2]:(t.references.push(i),[4,n.zSt(t,r)]);case 1:e.sent(),e.label=2;case 2:return[2]}})})()}function A2(t,i){switch(t.Km){case cw.Dk:return T2(t.Z,i.audioTrackSelection);case cw.NT:return T2(t.Z,i.textTrackSelection);default:return T2(t.Z,[])}}function T2(t,i){if(0===i.length)return t.length?[t[0]]:[];for(var n,r=[],e=Ft(t);!(n=e()).done;){var s=n.value;i.indexOf(s.bs)>-1&&r.push(s)}return r}function S2(t,i){if(!t.length)return[];var n=[].concat(t).sort(KM),r=n.filter(function(t){return t.kW<=i});return r.length>0?[r.pop()]:[n.shift()]}var E2=function(){function t(t,i,n){this.XSt=void 0,this.cPt=void 0,this.pCt=void 0,this.XSt=t,this.cPt=i,this.pCt=n}var i=t.prototype;return i.Bsi=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=this,[4,this.cPt.uPt(function(i){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.Nsi(i)];case 1:return t.sent(),[4,this.Msi(i)];case 2:return t.sent(),[4,this.Lsi(i)];case 3:return t.sent(),[4,this.Osi(i)];case 4:return t.sent(),[2]}})}).call(t)})];case 1:return i.sent(),[2]}})}).call(this)},i.Nsi=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=t.fPt,n=this.XSt.o,[4,i._S(n)];case 1:return r.sent(),[2]}})}).call(this)},i.Msi=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:return i=this,n=t.dPt,r=t.ect,hT(e=this.XSt.Mc.sources[0])?(s=Wj(e.src),[4,n.sPt(s,"manifestURL")]):[2];case 1:u=c.sent().filter(function(t){return Jn(t.references,i.XSt.o)}),o=Ft(u),c.label=2;case 2:return(h=o()).done?[3,8]:(Yn((a=h.value).references,this.XSt.o),0!==a.references.length?[3,5]:[4,n._S(a.key)]);case 3:return c.sent(),[4,r._S(a.key)];case 4:return c.sent(),[3,7];case 5:return[4,n.zSt(a)];case 6:c.sent(),c.label=7;case 7:return[3,2];case 8:return[2]}})}).call(this)},i.Lsi=function(t){return jt(function(){var i,n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return i=this,n=t.lPt,r=this.Fsi(),[4,n.jEt(r)];case 1:e=h.sent().filter(function(t){return Jn(t.references,i.XSt.o)}),s=Ft(e),h.label=2;case 2:return(u=s()).done?[3,7]:(Yn((o=u.value).references,this.XSt.o),0!==o.references.length?[3,4]:[4,n._S(o.key)]);case 3:return h.sent(),[3,6];case 4:return[4,n.zSt(o)];case 5:h.sent(),h.label=6;case 6:return[3,2];case 7:return[2]}})}).call(this)},i.Fsi=function(){if(!this.pCt)return[];var t=this.XSt.Mc.sources[0];if(!hT(t))return[];var i=Wj(t.src),n=function(t){if(!t)return[];for(var i,n=[],r=Ft(t.smt);!(i=r()).done;)for(var e,s=Ft(i.value.kmt);!(e=s()).done;)for(var u,o=Ft(e.value.Z);!(u=o()).done;)for(var h,a=Ft(u.value.KI);!(h=a()).done;){var c=h.value;c.$ei&&n.push(c.$ei)}return function(t){return t.reduce(function(t,i){return t.indexOf(i)<0&&t.push(i),t},[])}(n)}(this.pCt).map(function(t){return{src:t}}).map(function(t){return Wj(t.src)});return[].concat([i],n)},i.Osi=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return i=this,[4,(n=t.vPt).iPt()];case 1:r=o.sent().filter(function(t){return Jn(t.references,i.XSt.o)}),e=Ft(r),o.label=2;case 2:return(s=e()).done?[3,7]:(Yn((u=s.value).references,this.XSt.o),0!==u.references.length?[3,4]:[4,n._S(u.key)]);case 3:return o.sent(),this.Usi(u),[3,6];case 4:return[4,n.zSt(u)];case 5:o.sent(),o.label=6;case 6:return[3,2];case 7:return[2]}})}).call(this)},i.Usi=function(t){},t}(),I2=function(){function t(){}return t.prototype.Ret=function(t,i,n){return new E2(t,i,n)},t}(),R2=new I2;V(),It(),Wt(),Bt(),Yt(),V(),It();var C2=function(){function t(t,i){this.pE=void 0,this.Wsi=void 0,this.hu=void 0,this.pE=t,this.Wsi=i}var i=t.prototype;return i.Vsi=function(t){this.Hsi(t)},i.Hsi=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.Wsi.xsi(t)];case 1:return i.sent(),[3,3];case 2:return i.sent(),this.pE.Mot(P1.ERROR),[3,3];case 3:return[2]}})}).call(this)},xt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{renew:function(i){t.Vsi(i)}}}(this)),this.hu}}]),t}(),P2=function(t){function i(i,n,r,e,s,u){var o;(o=t.call(this)||this).hS=void 0,o.Not=void 0,o.hu=void 0,o.Ac=void 0,o.Ksi=void 0,o.cPt=void 0,o.Wsi=void 0,o.Jsi=new dr,o.Qsi=void 0,o.evictOnLoading=function(){o.mn("Eot",o.evictOnLoading),o.Zsi()},o.hS=i,o.Ac=n,o.Ksi=r,o.cPt=e,o.Wsi=s.Ret(o,o.cPt,u),o.Qsi=new C2(o,o.Wsi),o.Not=1===o.Wsi.fsi.jei?P1.DONE:P1.IDLE,o.Wsi.wn("y4t",function(t){o.Rs(t),1===o.Gsi&&o.Mot(P1.DONE)});var h=new Date,a=o.Ksi.expirationDate.getTime()-h.getTime();return function(t){return t<2147483647}(a)&&g(function(){return o.Zsi()},a),o}Pt(i,t);var n=i.prototype;return n.Mot=function(t){this.Not!==t&&(this.Not=t,this.So(new R1))},n.Tn=function(){this.Not===P1.EVICTED||this.Not===P1.DONE||this.Ysi()},n.Ysi=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,3,4]),this.Mot(P1.LOADING),t=new dr,this.Jsi=t,[4,this.Wsi.mi(t.Yg)];case 1:return i.sent(),this.Mot(P1.DONE),[3,4];case 2:return mr(i.sent())?this.Mot(P1.IDLE):this.Mot(P1.ERROR),[3,4];case 3:return this.Jsi.zg(),[7];case 4:return[2]}})}).call(this)},n.zx=function(){this.Jsi.Zg()},n._S=function(){this.hk===P1.LOADING?(this.wn("Eot",this.evictOnLoading),this.zx()):this.Zsi()},n.Zsi=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.Wsi.Psi()];case 1:return t=i.sent(),[4,R2.Ret(this,this.cPt,t).Bsi()];case 2:return i.sent(),this.Wsi.fsi=U1.Kei,this.Mot(P1.EVICTED),[3,4];case 3:return i.sent(),this.Mot(P1.ERROR),[3,4];case 4:return[2]}})}).call(this)},xt(i,[{key:"Oei",get:function(){return this.Wsi.Oei}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get id(){return t.o},get status(){return t.hk},get source(){return t.Mc},get parameters(){return t.NS},get duration(){return t.ct},get cached(){return t.qsi._s()},get secondsCached(){return t.zsi},get percentageCached(){return t.Gsi},get bytes(){return t.Xsi},get bytesCached(){return t.jsi},get license(){return t.lQ.Ca},start:function(){t.Tn()},pause:function(){t.zx()},remove:function(){t._S()},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new kR(t,["y4t","Eot"],n),n}(this)),this.hu}},{key:"o",get:function(){return this.hS}},{key:"lQ",get:function(){return this.Qsi}},{key:"hk",get:function(){return this.Not}},{key:"Mc",get:function(){return this.Ac}},{key:"NS",get:function(){return this.Ksi}},{key:"ct",get:function(){return this.Wsi.fsi.ZM}},{key:"qsi",get:function(){return this.Wsi.fsi.Xei}},{key:"zsi",get:function(){return this.Wsi.fsi.Gei}},{key:"Gsi",get:function(){return this.Wsi.fsi.jei}},{key:"Xsi",get:function(){return this.Wsi.vsi}},{key:"jsi",get:function(){return this.Wsi.fsi.qei}}]),i}(hh);var N2=function(){function t(t,i){this.cPt=void 0,this.$si=void 0,this.cPt=t,this.$si=i}var i=t.prototype;return i.Uei=function(t,i,n){var r=iI();return this.Bei(r,t,i,n)},i.Bei=function(t,i,n,r){return new P2(t,i,n,this.cPt,this.$si,r)},t}();V(),It();function D2(t){if(!t)throw new p("Unexpected - The cache parameters are undefined");var i=function(t){if(qi(t)&&!Wo(t,"%"))return T(t);return t}(t.amount);!function(t){if(function(t){return qi(t)&&Wo(t,"%")}(t)){var i=S(t);if(E(i)||i<0||i>100)throw new p("The amount as percentage must be between 0 and 100 percent.")}if(!qi(t)&&E(t))throw new p("The amount must be a number or a string")}(i);var n=function(t){if(!t)return function(){var t=new Date;return t.setMinutes(t.getMinutes()+30),t}();return t}(t.expirationDate);!function(t){if(t&&!function(t){return!t||Qi(t)&&t>new Date}(t))throw new p("Invalid expiration date for the cache parameters")}(n);var r=function(t){if(void 0===t)return 1/0;return t}(t.bandwidth);!function(t){if(E(t)||t<0)throw new p("The bandwidth must be between zero and infinity.")}(r);var e=function(t){if(!t)return 5;if(E(t))throw new p("The amount must be a number");return t}(t.numberOfParallelTasks);return{amount:i,expirationDate:n,bandwidth:r,parallelTasksThreshold:e,preferredTrackSelection:{audioTrackSelection:[],textTrackSelection:[]}}}var x2=function(){function t(t,i,n,r){var e=this;this.cPt=void 0,this.Wsi=void 0,this.tni=void 0,this.VJ=void 0,this.nni=[],this.ini=0,this.eni=0,this.sni=void 0,this.nT=void 0,this.nV=void 0,this.$si=void 0,this.Rz=void 0,this.zti=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(t=this.B6t())?[4,this.EGt(t)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})}).call(e)},this.jti=function(){var t=e.nni.shift();null==t||t._S()},this.hni=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:n=!1,r.label=1;case 1:return n?[3,3]:[4,t.ww("y4t")];case 2:return r.sent(),n=1===t.fsi.jei,[3,1];case 3:return i.ct<5&&this.zti(),[2]}})}).call(e)},this.VJ=t,this.nV=i,this.nT=new dr,this.$si=n,this.Rz=r,this.cPt=new HH}var i=t.prototype;return i.B6t=function(){if(this.tni)for(var t=this.tni.A0t;this.ini0,o=this.G0t,h=this.Pni(o),t.PKt?(t.PKt.od=o,void 0!==o.Ont.skipOffset&&void 0!==(a=eJ.NZt(o.Ont.skipOffset,t.PKt.ct))&&a0?this.mni():(this.Sni(),this.G0t=o)),[3,10];case 7:return null!==t?[3,9]:[4,this.Bni()];case 8:return w.sent(),[3,10];case 9:this.yni(!0),w.label=10;case 10:return[2]}})}).call(this)},n.Bni=function(){var t=this.Ini;return this.qii(t&&t.Rc())},n.yni=function(t){this.Cni(NK.DJt),this.Nni(),this.gni=1;var i=void 0!==this.G0t&&this.G0t.uZt.Oti();if(this.Tni=!1,!i||this.Ani){if(!this.G3t)return;this.oa.be(),!this.oa.UP&&t&&this.oa.Gx(),void 0!==this.bni&&this.oa.OP(this.bni),this.i3t(),this.Ani=!1,this.bni=void 0}else t&&(this.gni=1,this.mni())},n.i3t=function(){this.Mni(),t.prototype.i3t.call(this)},n.Mni=function(){if(this.oa.UP&&(this.gni=5),this.G0t){var t=this.G0t.uZt;t.Vti()&&this.M3t.So(new sO(this.Pni(this.G0t))),this._ni.dii(t),this.G0t=void 0}},n.Rni=function(t){this.Lni=this.Lni.concat(t)},n.Nni=function(){this.Lni=[]},n.Oni=function(t){this.oa.xe.appendChild(t)},n.Cni=function(t){for(var i,n=Ft(this.Lni);!(i=n()).done;){var r=i.value;r.eX===t&&nK(r.eventURL)}},n.Dni=function(t){this.lni.Aii(NK.TJt);for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;nK(r)}},n.knt=function(t){for(var i,n=Ft(this.J9t());!(i=n()).done;){var r=i.value;uK(r.sources,r.timeOffset)||t.M6(r,XB.gnt,!1)}},n.J9t=function(){for(var t,i,n=[],r=Ft(this.mnt.concat(this.Ant));!(i=r()).done;){var e=i.value;n.push(e.Ont)}for(var s,u=Ft(this.pni.concat(this._ni.Ant.filter(function(t){return!t.P0t()})));!(s=u()).done;)for(var o,h=Ft(s.value.A0t);!(o=h()).done;){var a=o.value;a.W||n.push(a.Ont)}return(t=n).push.apply(t,[].concat(this.dni)),or(n)},n.Eni=function(){return!!this.G0t&&$J(this.G0t).some(function(t){return t.PKt})},n.Pni=function(t){return t.uZt.Cti},n.yei=function(){return this.Fni},n.Wx=function(){return this.xii.Wx()},n.xP=function(){return this.xii.xP()},n.K3t=function(t){this._ni.K3t(t)},n.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),this.oa.mn(ch.uo,this.vni),this.M3t.CK(this.lni.M3t),this.M3t.CK(this.eei.M3t),this.M3t.CK(this._ni),this.lni.kn(),this.eei.kn(),[4,this.xii.kn()];case 2:return n.sent(),[2]}})}).call(this)},xt(i,[{key:"B3t",get:function(){return this}},{key:"C3t",get:function(){return i.C3t}},{key:"ynt",get:function(){return this.G0t?this.Pni(this.G0t):null}},{key:"mnt",get:function(){return this.G0t?[this.lni.Iii,this.eei.oei].filter(Fi):[]}},{key:"Ant",get:function(){var t=this.pni.concat(this._ni.Ant.filter(function(t){return!t.P0t()}));return nr(t,function(t){return t.Cti.Jc.filter(function(t){return!t.P0t()})})}},{key:"bnt",get:function(){return this._ni.Ant.map(function(t){return t.Cti})}}],[{key:"C3t",get:function(){return uZ.U0t}}]),i}(E0),j2=function(){function t(){}var i=t.prototype;return i.qz=function(t){return t&&("string"!=typeof t.integration||t.integration===CS.DEFAULT||t.integration===CS.CSAI||t.integration===CS.THEO)},i.x3t=function(t,i,n){var r=new AB(t.Ost,t.Ql,n);r.ust(t.xe);var e=new lS(t.xe,n,t.SP,t.Dst,t.Fx,r,t.Ql);return new V2(t,i,e,n,t.Dst,t.SP)},i.M6=function(t,i,n,r){n.K9t(t,i,r)},i.sj=function(t){var i=wJ(t.sources);if(i){var n={integration:CS.CSAI,sources:i};"vast"===n.sources.type&&void 0===t.timeOffset?t.timeOffset=0:"vmap"===n.sources.type&&void 0!==t.timeOffset&&Qe("Do not set timeOffset for VMAP ad sources. VMAP ads have their own offsets included.");var r=yJ(t.timeOffset);void 0!==r&&(n.timeOffset=r);var e=yJ(t.skipOffset);return void 0!==e&&(n.skipOffset=e),n}},xt(t,[{key:"P3t",get:function(){return V2.C3t}}]),t}();PS.Ng.zz(new j2),V(),It(),V(),It(),Bt();var H2=function(){function t(t,i){this.vti=void 0,this.Q1t=void 0,this.Yit=void 0,this.Gni=void 0,this.j6=!1,this.Yit=t;var n=v.createElement("div");n.className="theoplayer-ima-wrapper",ln(n),n.style.zIndex="10",Oi.Ks&&function(t,i){t.addEventListener(i,fn)}(n,"mousedown"),i.appendChild(n);var r=v.createElement("div");r.className="theoplayer-ima",r.style.height="100%",this.Gni=r,n.appendChild(r),this.Q1t=n,this.vti=new google.ima.AdDisplayContainer(this.Gni,this.Yit)}var i=t.prototype;return i.VY=function(){var t;this.j6||(null==(t=this.vti)||t.initialize(),this.j6=!0)},i.Qni=function(t){"linear"===t?this.Q1t.style.marginTop="0px":"nonlinear"===t&&(this.Q1t.style.marginTop="-45px")},i.be=function(){this.Q1t.style.opacity="1",this.Q1t.style.pointerEvents=""},i.we=function(){this.Q1t.style.opacity="0",this.Q1t.style.pointerEvents="none"},i.zg=function(){var t;null==(t=this.vti)||t.destroy(),this.vti=void 0},xt(t,[{key:"fii",get:function(){return this.Q1t}},{key:"zni",get:function(){return this.Gni.offsetHeight}},{key:"Xni",get:function(){return this.Gni.offsetWidth}},{key:"jni",get:function(){return this.vti}}]),t}();V(),It(),Wt(),Nt(),Yt(),V(),It(),Nt(),Ut(),V(),It(),Bt();var W2=function(){function t(t){this.Kni=void 0,this.iYt=void 0,this.Kni=t;var i=new google.ima.CompanionAdSelectionSettings;i.resourceType=google.ima.CompanionAdSelectionSettings.ResourceType.ALL,i.creativeType=google.ima.CompanionAdSelectionSettings.CreativeType.ALL,i.sizeCriteria=google.ima.CompanionAdSelectionSettings.SizeCriteria.IGNORE,this.iYt=t.getCompanionAds(0,0,i)}return xt(t,[{key:"UYt",get:function(){return this.Kni.getAdId()}},{key:"V7t",get:function(){var t=this.Kni.getAdPodInfo();if(void 0!==t)try{return{i7t:t.getAdPosition(),p0t:t.getMaxDuration(),Yni:t.getPodIndex(),_Ot:t.getTimeOffset(),e7t:t.getTotalAds(),Jni:t.getIsBumper()}}catch(t){return}}},{key:"yKt",get:function(){return this.Kni.getAdSystem()}},{key:"Zni",get:function(){return this.Kni.getAdvertiserName()}},{key:"cYt",get:function(){var t;return null!=(t=this.Kni.getApiFramework())?t:void 0}},{key:"IKt",get:function(){return this.iYt.map(function(t){return{lYt:t.getAdSlotId(),qT:t.getContentType(),p4t:t.getContent(),Mi:t.getHeight(),Ti:t.getWidth()}})}},{key:"qT",get:function(){var t;return null!=(t=this.Kni.getContentType())?t:void 0}},{key:"GKt",get:function(){return this.Kni.getCreativeId()}},{key:"I9t",get:function(){return this.Kni.getCreativeAdId()}},{key:"$ni",get:function(){return this.Kni.getDealId()}},{key:"dB",get:function(){return this.Kni.getDescription()}},{key:"ct",get:function(){return this.Kni.getDuration()}},{key:"Ti",get:function(){return this.Kni.getWidth()}},{key:"Mi",get:function(){return this.Kni.getHeight()}},{key:"tJt",get:function(){var t;return null!=(t=this.Kni.getMediaUrl())?t:void 0}},{key:"tri",get:function(){return this.Kni.getMinSuggestedDuration()}},{key:"P9t",get:function(){return this.Kni.getSkipTimeOffset()}},{key:"iri",get:function(){return this.Kni.getSurveyUrl()}},{key:"dq",get:function(){return this.Kni.getTitle()}},{key:"k9t",get:function(){return this.Kni.getTraffickingParameters()}},{key:"E9t",get:function(){return this.Kni.getTraffickingParametersString()}},{key:"CKt",get:function(){return this.Kni.getUniversalAdIds().map(function(t){return{R9t:t.getAdIdRegistry(),C9t:t.getAdIdValue()}})}},{key:"Ati",get:function(){return this.Kni.getUiElements()}},{key:"x9t",get:function(){return this.Kni.getVastMediaBitrate()}},{key:"S9t",get:function(){return this.Kni.getVastMediaHeight()}},{key:"b9t",get:function(){return this.Kni.getVastMediaWidth()}},{key:"m9t",get:function(){return this.Kni.getWrapperAdIds()}},{key:"w9t",get:function(){return this.Kni.getWrapperAdSystems()}},{key:"y9t",get:function(){return this.Kni.getWrapperCreativeIds()}},{key:"D7t",get:function(){return this.Kni.isLinear()}}]),t}();function z2(){return[google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,google.ima.AdEvent.Type.CLICK,google.ima.AdEvent.Type.DURATION_CHANGE,google.ima.AdEvent.Type.EXPANDED_CHANGED,google.ima.AdEvent.Type.STARTED,google.ima.AdEvent.Type.IMPRESSION,google.ima.AdEvent.Type.PAUSED,google.ima.AdEvent.Type.RESUMED,google.ima.AdEvent.Type.AD_PROGRESS,google.ima.AdEvent.Type.AD_BUFFERING,google.ima.AdEvent.Type.FIRST_QUARTILE,google.ima.AdEvent.Type.MIDPOINT,google.ima.AdEvent.Type.THIRD_QUARTILE,google.ima.AdEvent.Type.COMPLETE,google.ima.AdEvent.Type.USER_CLOSE,google.ima.AdEvent.Type.LINEAR_CHANGED,google.ima.AdEvent.Type.LOADED,google.ima.AdEvent.Type.AD_CAN_PLAY,google.ima.AdEvent.Type.AD_METADATA,google.ima.AdEvent.Type.AD_BREAK_READY,google.ima.AdEvent.Type.INTERACTION,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,google.ima.AdEvent.Type.SKIPPED,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,google.ima.AdEvent.Type.LOG,google.ima.AdEvent.Type.VIEWABLE_IMPRESSION,google.ima.AdEvent.Type.VOLUME_CHANGED,google.ima.AdEvent.Type.VOLUME_MUTED]}var q2=function(t){function i(i,n,r){var e;(e=t.call(this)||this).y0t=void 0,e.vti=void 0,e.sc=void 0,e.qc=[],e.sri=function(t){t.getAd().isLinear()?e.vti.Qni("linear"):e.vti.Qni("nonlinear")},e.eri=function(){e.y0t.resize(e.vti.Xni,e.vti.zni,google.ima.ViewMode.NORMAL)},e.forwardAdEventListener=function(t){var i=t.getAd(),n=function(t){var i;return((i={})[google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED]=x0.V6t,i[google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED]=x0.H6t,i[google.ima.AdEvent.Type.CLICK]=x0.W6t,i[google.ima.AdEvent.Type.DURATION_CHANGE]=x0.Rw,i[google.ima.AdEvent.Type.EXPANDED_CHANGED]=x0.q6t,i[google.ima.AdEvent.Type.STARTED]=x0.z6t,i[google.ima.AdEvent.Type.IMPRESSION]=x0.G6t,i[google.ima.AdEvent.Type.PAUSED]=x0.Gz,i[google.ima.AdEvent.Type.RESUMED]=x0.X6t,i[google.ima.AdEvent.Type.AD_PROGRESS]=x0.j6t,i[google.ima.AdEvent.Type.AD_BUFFERING]=x0.Q6t,i[google.ima.AdEvent.Type.FIRST_QUARTILE]=x0.K6t,i[google.ima.AdEvent.Type.MIDPOINT]=x0.mJt,i[google.ima.AdEvent.Type.THIRD_QUARTILE]=x0.Y6t,i[google.ima.AdEvent.Type.COMPLETE]=x0.wJt,i[google.ima.AdEvent.Type.USER_CLOSE]=x0.J6t,i[google.ima.AdEvent.Type.LINEAR_CHANGED]=x0.Z6t,i[google.ima.AdEvent.Type.LOADED]=x0.$6t,i[google.ima.AdEvent.Type.AD_CAN_PLAY]=x0.t8t,i[google.ima.AdEvent.Type.AD_METADATA]=x0.i8t,i[google.ima.AdEvent.Type.AD_BREAK_READY]=x0.e8t,i[google.ima.AdEvent.Type.INTERACTION]=x0.s8t,i[google.ima.AdEvent.Type.ALL_ADS_COMPLETED]=x0.n8t,i[google.ima.AdEvent.Type.SKIPPED]=x0.r8t,i[google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED]=x0.h8t,i[google.ima.AdEvent.Type.LOG]=x0.o8t,i[google.ima.AdEvent.Type.VIEWABLE_IMPRESSION]=x0.a8t,i[google.ima.AdEvent.Type.VOLUME_CHANGED]=x0.u8t,i[google.ima.AdEvent.Type.VOLUME_MUTED]=x0.c8t,i)[t]}(t.type),r={type:n,date:new Date,Int:i?e.rri(i):void 0,S7t:L0(n,t.getAdData())};e.So(r)},e.forwardAdErrorEventListener=function(t){e.So({date:new Date,Int:void 0,type:B0.d8t,S7t:{n9t:V0(t.getError())}})},e.y0t=i,e.vti=n,e.sc=r,e.sc.wn(_I.yn,e.eri),e.y0t.init(e.vti.Xni,e.vti.zni,google.ima.ViewMode.NORMAL),e.y0t.addEventListener(google.ima.AdEvent.Type.LOADED,e.sri),e.y0t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,e.forwardAdErrorEventListener);for(var s,u=Ft(z2());!(s=u()).done;){var o=s.value;e.y0t.addEventListener(o,e.forwardAdEventListener)}return e}Pt(i,t);var n=i.prototype;return n.Ox=function(t){var i;null==(i=this.y0t)||i.setVolume(t)},n.Lx=function(){return this.y0t.getVolume()},n.i9t=function(){return this.y0t.getRemainingTime()},n.zg=function(){tr(this.qc),this.sc.mn(_I.yn,this.eri),this.y0t.removeEventListener(google.ima.AdEvent.Type.LOADED,this.sri),this.y0t.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.forwardAdErrorEventListener);for(var t,i=Ft(z2());!(t=i()).done;){var n=t.value;this.y0t.removeEventListener(n,this.forwardAdEventListener)}this.y0t.destroy()},n.Tn=function(){this.y0t.start()},n.cti=function(){this.y0t.resume()},n.zx=function(){this.y0t.pause()},n.rD=function(){this.y0t.skip()},n.Xx=function(){this.y0t.stop()},n.O7t=function(){var t=this.y0t.getCurrentAd();if(t)return this.rri(t)},n.gti=function(){return this.y0t.getCuePoints()},n.rri=function(t){var i=Wn(this.qc,function(i){return i.Kni===t});return i||(i=new W2(t),this.qc.push(i)),i},n.kti=function(t){this.y0t.updateAdsRenderingSettings(Y2(t))},i}(uh);V(),It(),Bt(),Nt();var X2=function(t){function i(i,n){var r;return(r=t.call(this,"xti")||this).ari=void 0,r.Q1t=void 0,r.ari=i,r.Q1t=n,r}return Pt(i,t),i.prototype.xa=function(){return new G2(this.ari)},xt(i,[{key:"hri",get:function(){return this.ari}},{key:"fii",get:function(){return this.Q1t}}]),i}(Ig),G2=function(t){function i(i){var n;return(n=t.call(this,"adsmanagerloaded")||this).ari=void 0,n.ari=i,n}return Pt(i,t),xt(i,[{key:"adsManager",get:function(){return this.ari}}]),i}(ah),Q2=function(t){function i(i,n){var r;return(r=t.call(this)||this).lti=void 0,r.sc=void 0,r.dri=void 0,r.cri=void 0,r.lri=void 0,r.fri=void 0,r.onAdsManagerLoadedListener=function(t){if(r.lri&&r.fri&&r.cri){var i,n=Y2(r.fri),e=r.lri,s=t.getAdsManager({get currentTime(){return e.MP},get duration(){return e.ct}},n),u=new q2(s,r.dri,r.sc);r.So(new X2(s,r.dri.fii)),null==(i=r.cri)||i.Xy(u),r.cri=void 0}},r.onAdsManagerErrorListener=function(t){var i,n={Py:t.getError().getMessage(),s7t:t.getError().getVastErrorCode(),YJt:t.getError().getErrorCode(),Km:F0(t.getError().getType()),n7t:void 0};null==(i=r.cri)||i.jy(n),r.cri=void 0},r.sc=n,r.dri=i,r}Pt(i,t);var n=i.prototype;return n.dti=function(){var t;null==(t=this.lti)||t.contentComplete()},n.C6t=function(t,i,n){return jt(function(){var r;return zt(this,function(e){if(this.cri)throw new p("Only one ImaAdsRequest can be made at a time.");if(!this.dri.jni)throw new p("AdDisplayContainer is not initialized.");return this.lti=new google.ima.AdsLoader(this.dri.jni),this.lti.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoadedListener),this.lti.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsManagerErrorListener),this.cri=new Xa,this.lri=i,this.fri=n,r=new google.ima.AdsRequest,t.G5t?r.adTagUrl=t.G5t:t.X5t&&(r.adsResponse=t.X5t),r.linearAdSlotWidth=t.U5t,r.linearAdSlotHeight=t.V5t,r.nonLinearAdSlotWidth=t.H5t,r.nonLinearAdSlotHeight=t.W5t,r.contentDuration=t.Q5t,r.setAdWillAutoPlay(t.q5t),r.setAdWillPlayMuted(t.z5t),t.j5t&&(r.omidAccessModeRules=t.j5t),this.lti.requestAds(r),[2,this.cri.Qy]})}).call(this)},n.zg=function(){var t;void 0!==this.lti&&(this.lti.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoadedListener),this.lti.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsManagerErrorListener),this.lti.destroy(),this.lti=void 0),null==(t=this.cri)||t.jy("AdsLoader destroyed"),this.cri=void 0},i}(uh);function Y2(t){var i=new google.ima.AdsRenderingSettings;return i.enablePreloading=t.bti,t.Ati&&(i.uiElements=t.Ati),i.mimeTypes=t.yti,void 0!==t.Tti&&(i.playAdsAfterTime=t.Tti),void 0!==t.Sti&&(i.loadVideoTimeout=t.Sti),void 0!==t.T9t&&(i.bitrate=t.T9t),void 0!==t.Tti&&(i.playAdsAfterTime=t.Tti),i.restoreCustomPlaybackStateOnAdBreakComplete=!0,i}V(),It(),Bt(),Nt();var $2=function(t){function i(i){var n;return(n=t.call(this)||this).vri=void 0,n.oa=void 0,n.oa=i,n.vri=n.oa.LP(),n.oa.wn(ch._y,function(){n.oa.kx||(n.vri=n.oa.LP()),n.So(new Eg(n.MP,void 0))}),n}return Pt(i,t),i.prototype.hr=function(){this.vri=0},xt(i,[{key:"MP",get:function(){return this.oa.kx?this.vri:this.oa.LP()}},{key:"ct",get:function(){return this.oa.Nd()}},{key:"$P",get:function(){return this.oa.$P}},{key:"Mx",get:function(){return this.oa.Mx}}]),i}(uh);o1.Ng.registerWebImaAdPlayerConstructor(function(t,i,n){e1(n);var r=s1(n)?t.Wx():void 0,e=new H2(r,t.xe),s=new Q2(e,t.Wu),u=new $2(t);return new u1(t,i,n,t.Nst,e,s,u)}),V(),It(),V(),It(),Wt(),Bt(),Nt(),H(),Yt(),V(),It(),Wt(),Bt(),Nt(),Yt();var K2=function(t){function i(i,n,r){var e;return(e=t.call(this,r)||this).Qst=void 0,e.J4t=void 0,e.Pri=!0,e.Qst=i,e.J4t=n,e}Pt(i,t);var n=i.prototype;return n.gr=function(t,i,n,r,e){(e||!r.hx||r.UP)&&this.oa.hx&&this.oa.Gx()},n.OP=function(t,i){},n.BP=function(t){},n.gri=function(i,n){var r=i-this.J4t.pri;return t.prototype.OP.call(this,r,n)},n.wri=function(i){return t.prototype.BP.call(this,i)},n.NP=function(){return this.Qst.bt},n.nu=function(){return this.Qst.nu()},n.Nd=function(){return this.Qst.Nd()},n.Tx=function(){var t=OA.jn(this.Qst.Tx()).Ny(this.J4t.pri);if(this.yri())return t._s();var i=OA.jn(this.J4t.Tx()),n=i;return M4(this.Qst)||(n=t.OM(i)),(n=n.Mn(OA.tL(0,this.LP())))._s()},n.LP=function(){return this.Ari(t.prototype.LP.call(this))},n.Ari=function(t){return this.J4t.bri?this.J4t.bri:this.oa===this.J4t?this.J4t.Sri+t:this.J4t.pri+t},n.DP=function(){return this.Tri(t.prototype.LP.call(this))},n.Tri=function(t){return this.J4t.kri?this.J4t.kri:this.oa===this.J4t&&this.J4t.Eri?new Date(this.J4t.Eri.getTime()+1e3*t):this.Qst.CP},n.RP=function(){var t=OA.jn(this.Qst.RP()).Ny(this.J4t.pri);if(this.yri())return t._s();var i=OA.jn(this.J4t.RP());return t.An(t.V-1)=r||(this.ioi.push(t),i?this.Foi.set(i.jI,t):this.Woi.push(t),this.Poi.qhi(t))},i.qoi=function(t){var i=this.Foi.get(t.jI);if(void 0!==i){var n=t.BLt["X-RESUME-OFFSET"],r=isFinite(t.PO)?this.Poi.Noi(t.PO):void 0;i.er({ct:t.ct,PO:r,Ori:void 0!==n?Number(n):void 0})}},i.poi=function(t){this.zoi(t)},i.zoi=function(t){void 0!==this.Foi.get(t.jI)&&this.Foi.delete(t.jI)},i.Goi=function(t){var i=this;t.forEach(function(t){return i.zhi(t)})},i.zhi=function(t){Yn(this.ioi,t)},i.hr=function(){var t,i,n,r;this.Moi=void 0,this.voi(void 0),this.goi(void 0);for(var e,s=Ft(this.aoi.slice());!(e=s()).done;){var u=e.value;this.coi(u)}tr(this.aoi),tr(this.ioi),tr(this.Woi),this.Foi.clear(),null==(t=this.soi)||t.removeEventListener("adbreak",this.noi),null==(i=this.soi)||i.removeEventListener("overlay",this.roi),null==(n=this.soi)||n.removeEventListener("streaminfo",this.hoi),null==(r=this.soi)||r.close(),this.soi=void 0},i.kn=function(){this.hr()},xt(t,[{key:"toi",get:function(){return this.ioi}}]),t}();function F3(t){if(t){var i=t.sz.default;return Oi.Ks&&t.sz.phone?i=t.sz.phone:Oi.og&&t.sz.tv&&(i=t.sz.tv),{Ahi:t.iu,bhi:i}}}function U3(t){var i=_3[t.type],n=t.default;return Oi.Ks&&t.phone?n=t.phone:Oi.og&&t.tv&&(n=t.tv),{Km:i,nyt:n}}function V3(t){var i,n,r,e;return t.top&&t.top>=0&&t.top<=100?i=t.top:t.bottom&&t.bottom>=0&&t.bottom<=100?n=t.bottom:i=10,t.left&&t.left>=0&&t.left<=100?r=t.left:t.right&&t.right>=0&&t.right<=100?e=t.right:r=10,{z9:i,q9:n,W9:r,H9:e}}function j3(t){return{Ti:t.width&&t.width>=0&&t.width<=100?t.width:10,Mi:t.height&&t.height>=0&&t.height<=100?t.height:10}}V(),It(),Bt(),Nt();var H3=function(t){function i(i){var n;return(n=t.call(this)||this).oa=void 0,n.hu=void 0,n.oa=i,n}return Pt(i,t),i.prototype.Mhi=function(t){Ji(t)?this.oa.Mhi(t):Vi.dm("Incorrect ad tag parameters type, expecting a Record.")},xt(i,[{key:"Xoi",get:function(){return this.oa.Xoi.map(function(t){return t.wnt()})}},{key:"joi",get:function(){return this.oa.joi.map(function(t){return t.wnt()})}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get currentInterstitials(){return t.Xoi},get scheduledInterstitials(){return t.joi},replaceAdTagParameters:function(i){t.Mhi(i)},addEventListener:function(i,n){t.wn(i,n)},removeEventListener:function(i,n){t.mn(i,n)}}}(this)}}]),i}(uh);V(),It(),Bt();var W3=function(){function t(){this.s5t=new WI,this.Qoi=void 0}var i=t.prototype;return i.$hi=function(t){this.Qoi=t},i.rD=function(){},i.Snt=function(t){},i.knt=function(t){},i.kn=function(){return this.Qoi=void 0,ot.resolve()},xt(t,[{key:"M3t",get:function(){return this.s5t}},{key:"G3t",get:function(){var t;return void 0!==(null==(t=this.Qoi)?void 0:t.ynt)}},{key:"C3t",get:function(){return uZ.ont}},{key:"mnt",get:function(){var t;return(null==(t=this.Qoi)?void 0:t.B9t)?[this.Qoi.B9t]:[]}},{key:"ynt",get:function(){var t,i;return null!=(i=null==(t=this.Qoi)?void 0:t.ynt)?i:null}},{key:"Ant",get:function(){var t=this;return this.Qoi?nr(this.Qoi.A0t,function(i){var n,r=i.Jc;if(i===(null==(n=t.Qoi)?void 0:n.ynt)&&void 0!==t.Qoi.B9t){var e=r.indexOf(t.Qoi.B9t);if(e>=0)return r.slice(e+1)}return i._x?[]:r}):[]}},{key:"bnt",get:function(){var t=this;return this.Qoi?this.Qoi.A0t.filter(function(i){var n;return i===(null==(n=t.Qoi)?void 0:n.ynt)||!i._x}):[]}}]),t}();V(),It(),Wt(),Bt(),Yt();var z3=function(){function t(t,i,n){var r=this;this.oa=void 0,this.Lhi=void 0,this.Koi=[],this.Joi=void 0,this.Zoi=ro(),this.eai=void 0,this.gn=void 0,this.stt=function(t){jZ(r.Joi,r.oa.Bx,r.oa.Rx,t.width,t.height)},this.CXt=function(){jZ(r.Joi,r.oa.Bx,r.oa.Rx,r.gn.Eu,r.gn.Iu)},this.Tii=function(t){t.stopPropagation()},this.oa=t,this.eai=n;var e=v.createElement("div");e.style.display="none",e.className="theoads-image-overlays-container",ln(e),i.appendChild(e),this.Joi=e,this.gn=new DI(i),this.gn._n(),this.gn.wn(_I.yn,this.stt),this.oa.wn(ch.Jw,this.CXt)}var i=t.prototype;return i.Yoi=function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return this.Koi.push(t),this.Joi.style.display="",(i=v.createElement("div")).className="theoplayer-theoads-overlay",i.style.display="",this.Zoi.set(t.o,i),n=v.createElement("a"),[4,this.$oi(t)];case 1:return(r=s.sent()).clickThroughURI&&(this.Joi.style.zIndex="11",n.href=r.clickThroughURI,n.target="Xu",n.setAttribute("rel","noopener"),n.addEventListener("mousedown",this.Tii),n.addEventListener("touchend",this.Tii)),t.shi===p3.image&&(n.style.backgroundImage="url("+r.resourceURI+")",n.style.backgroundSize="contain",n.style.backgroundPosition="center",n.style.backgroundRepeat="no-repeat",r.impressionURI&&((e=v.createElement("img")).src=r.impressionURI,e.style.display="none",n.appendChild(e))),ln(n),function(t,i){t.style.position="absolute";var n=i.mo;n.W9&&(t.style.left=n.W9+"%");n.H9&&(t.style.right=n.H9+"%");n.z9&&(t.style.top=n.z9+"%");n.q9&&(t.style.bottom=n.q9+"%");var r=i.Vy;r.Ti&&(t.style.width=r.Ti+"%");r.Mi&&(t.style.height=r.Mi+"%");i.nhi&&i.nhi>0&&i.nhi<=100&&(t.style.opacity=""+i.nhi/100)}(i,t),i.appendChild(n),this.Joi.appendChild(i),[2]}})}).call(this)},i.tai=function(t){var i=this.Zoi.get(t.o);i&&(this.Joi.contains(i)&&this.Joi.removeChild(i),this.Zoi.delete(t.o),0===this.Zoi.size&&(this.Joi.style.display="none"),Yn(this.Koi,t))},i.iai=function(){var t=this;this.Zoi.forEach(function(i){t.Joi.contains(i)&&t.Joi.removeChild(i)}),this.Zoi.clear(),this.Koi=[]},i.$oi=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return i={resourceURI:""},t.rhi?((r=io({},this.Lhi,t.Hri))&&!r[E3]&&(r[E3]=R3.xhi),[4,this.eai.yhi(t.rhi,r)]):[3,2];case 1:n=o.sent(),o.label=2;case 2:return n?(i.resourceURI=n.image,i.impressionURI=n.impression):t.LJt&&((e=Wn(t.LJt,function(t){return t.Km===_3.svg}))&&(i.resourceURI=e.nyt),(s=Wn(t.LJt,function(t){return t.Km===_3.png}))&&(i.resourceURI=s.nyt)),i.clickThroughURI=null!=(u=null==n?void 0:n.clickThrough)?u:t.AYt,t.er({imageUrl:i.resourceURI,clickThrough:i.clickThroughURI}),[2,i]}})}).call(this)},i.hr=function(){this.iai(),this.Joi.style.display="none"},xt(t,[{key:"Xoi",get:function(){return this.Koi}},{key:"Hri",get:function(){return this.Lhi},set:function(t){this.Lhi=t}}]),t}();V(),It(),Nt();var q3=function(t){function i(i){var n;return(n=t.call(this,"addinterstitial")||this).interstitial=void 0,n.interstitial=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var X3=function(t){function i(i){var n;return(n=t.call(this,"nai")||this).interstitial=void 0,n.interstitial=i,n}return Pt(i,t),i.prototype.xa=function(){return new G3(this.interstitial.wnt())},i}(Ig),G3=function(t){function i(i){var n;return(n=t.call(this,"interstitialend")||this).interstitial=void 0,n.interstitial=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var Q3=function(t){function i(i,n){var r;return(r=t.call(this,"rai")||this).interstitial=void 0,r.Py=void 0,r.interstitial=i,r.Py=n,r}return Pt(i,t),i.prototype.xa=function(){return new Y3(this.interstitial.wnt(),this.Py)},i}(Ig),Y3=function(t){function i(i,n){var r;return(r=t.call(this,"interstitialerror")||this).interstitial=void 0,r.message=void 0,r.interstitial=i,r.message=n,r}return Pt(i,t),i}(ah);V(),It(),Wt(),Bt(),Nt(),Yt();var $3=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).n7=!1,i.aai=function(t){!i.n7&&i.Jhi&&(i.n7=!0,i.d7t(i.Ari(t.currentTime)))},i.Qhi=function(t){i.Bd(i.Ari(t.currentTime))},i}Pt(i,t);var n=i.prototype;return n.IW=function(t,i,n){return ot.resolve()},n.hai=function(t,i,n,r){void 0===r&&(r=!1),this.Jhi=t;var e=this.Whi(t,i),s={sources:{src:t.nyt}};return this.Yhi(s,n,e,r)},n.oai=function(t,i,n){return jt(function(){return zt(this,function(i){return this.Jhi=t,[2,t.nyt]})}).call(this)},n.Ghi=function(){t.prototype.Ghi.call(this),this.J4t.wn(Mp.TM,this.aai)},n.Khi=function(){this.J4t.mn(Mp.TM,this.aai),t.prototype.Khi.call(this)},n.bd=function(t){if(this.Chi){var i=this.Ari(t.currentTime),n=this.Chi.y4t;this.Chi.Mri(i);var r=this.Chi.y4t;n<.25&&r>=.25?this.s5t.So(new w0(this.M0t,i)):n<.5&&r>.5?this.s5t.So(new y0(this.M0t,i)):n<.75&&r>=.75?this.s5t.So(new _0(this.M0t,i)):this.Chi._x&&this.Bd(i)}else Vi.um("Got timeupdate without a current interstitial")},n.Bd=function(i){t.prototype.Bd.call(this,i),this.n7=!1},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return n.sent(),this.n7=!1,[2]}})}).call(this)},xt(i,[{key:"uhi",get:function(){return N3.DEFAULT}}]),i}(D3);V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Nt(),H(),V(),It(),Nt();var K3=function(t){function i(i,n,r){var e;return(e=t.call(this,i,new Date)||this).uai=void 0,e.Int=void 0,e.uai=n,e.Int=r,e}return Pt(i,t),i}(ah),J3=function(t){return t.LOADED="DAILoaded",t.AD_BREAK_STARTED="DAIAdBreakStarted",t.AD_BREAK_ENDED="DAIAdBreakEnded",t.AD_PERIOD_STARTED="DAIAdPeriodStarted",t.AD_PERIOD_ENDED="DAIAdPeriodEnded",t.AD_PROGRESS="DAIAdProgress",t.CUEPOINTS_CHANGED="DAICuePointsChanged",t.CLICK="DAIClick",t.ERROR="DAIError",t.STARTED="DAIStarted",t.FIRST_QUARTILE="DAIFirstQuartile",t.MIDPOINT="DAIMidpoint",t.STREAM_INITIALIZED="DAIStreamInitialized",t.THIRD_QUARTILE="DAIThirdQuartile",t.COMPLETE="DAIComplete",t}({}),Z3=function(t){function i(i,n){return t.call(this,"DAILoaded",i,n)||this}return Pt(i,t),i}(K3),t4=function(t){function i(i,n){return t.call(this,"DAIAdBreakStarted",i,n)||this}return Pt(i,t),i}(K3),i4=function(t){function i(i,n){return t.call(this,"DAIAdBreakEnded",i,n)||this}return Pt(i,t),i}(K3),n4=function(t){function i(i,n){return t.call(this,"DAIAdProgress",i,n)||this}return Pt(i,t),i}(K3),r4=function(t){function i(i,n){return t.call(this,"DAICuePointsChanged",i,n)||this}return Pt(i,t),i}(K3),e4=function(t){function i(i,n){return t.call(this,"DAIClick",i,n)||this}return Pt(i,t),i}(K3),s4=function(t){function i(i,n){return t.call(this,"DAIError",i,n)||this}return Pt(i,t),i}(K3),u4=function(t){function i(i,n){return t.call(this,"DAIStarted",i,n)||this}return Pt(i,t),i}(K3),o4=function(t){function i(i,n){return t.call(this,"DAIFirstQuartile",i,n)||this}return Pt(i,t),i}(K3),h4=function(t){function i(i,n){return t.call(this,"DAIMidpoint",i,n)||this}return Pt(i,t),i}(K3),a4=function(t){function i(i,n){return t.call(this,"DAIStreamInitialized",i,n)||this}return Pt(i,t),i}(K3),c4=function(t){function i(i,n){return t.call(this,"DAIThirdQuartile",i,n)||this}return Pt(i,t),i}(K3),f4=function(t){function i(i,n){return t.call(this,"DAIComplete",i,n)||this}return Pt(i,t),i}(K3);var v4=function(t){function i(i,n,r){var e;(e=t.call(this)||this).cai=void 0,e.Y1t=void 0,e.Eai=void 0,e._ai=void 0,e.kai=void 0,e.gai=void 0,e.y1t=void 0,e.pai=void 0,e.mai=void 0,e.Ts=void 0,e.wai=void 0,e.yai=void 0,e.Aai=void 0,e.bai=void 0,e.Sai=void 0,e.Tai=void 0,e.cai=i,e.Y1t=n,e.Eai=r,e._ai=function(t){e.vai(!0);var i=l4(t),n=w4(t);e.So(new t4(i,n))},e.kai=function(t){e.vai(!1);var i=l4(t),n=w4(t);e.So(new i4(i,n))},e.gai=function(t){var i=l4(t),n=w4(t);e.So(new n4(i,n))},e.y1t=function(t){var i=l4(t),n=w4(t);e.So(new e4(i,n))},e.pai=function(t){var i=l4(t),n=w4(t);e.So(new f4(i,n))},e.mai=function(t){var i=l4(t),n=w4(t);e.So(new r4(i,n))},e.Ts=function(t){var i=l4(t),n=w4(t);e.So(new s4(i,n))},e.wai=function(t){var i=l4(t),n=w4(t);e.So(new o4(i,n))},e.yai=function(t){var i=l4(t),n=w4(t);e.So(new Z3(i,n))},e.Aai=function(t){var i=l4(t),n=w4(t);e.So(new h4(i,n))},e.bai=function(t){var i=l4(t),n=w4(t);e.So(new u4(i,n))},e.Sai=function(t){var i=l4(t),n=w4(t);e.So(new a4(i,n))},e.Tai=function(t){var i=l4(t),n=w4(t);e.So(new c4(i,n))},e.Y1t&&(e.Y1t.style.display="none",e.cai.setClickElement(e.Y1t));var s=google.ima.dai.api.StreamEvent.Type;return e.cai.addEventListener(s.AD_BREAK_STARTED,e._ai),e.cai.addEventListener(s.AD_PROGRESS,e.gai),e.cai.addEventListener(s.CLICK,e.y1t),e.cai.addEventListener(s.COMPLETE,e.pai),e.cai.addEventListener(s.CUEPOINTS_CHANGED,e.mai),e.cai.addEventListener(s.ERROR,e.Ts),e.cai.addEventListener(s.FIRST_QUARTILE,e.wai),e.cai.addEventListener(s.LOADED,e.yai),e.cai.addEventListener(s.MIDPOINT,e.Aai),e.cai.addEventListener(s.STARTED,e.bai),e.cai.addEventListener(s.STREAM_INITIALIZED,e.Sai),e.cai.addEventListener(s.THIRD_QUARTILE,e.Tai),e.cai.addEventListener(s.AD_BREAK_ENDED,e.kai),e}Pt(i,t);var n=i.prototype;return n.replaceAdTagParameters=function(t){return this.cai.replaceAdTagParameters(null!=t?t:null)},n.lai=function(t){return this.cai.contentTimeForStreamTime(t)},n.fai=function(t){return this.cai.streamTimeForContentTime(t)},n.AHt=function(t,i){var n=function(t){return"vod"===t.availabilityType?new f.google.ima.dai.api.VODStreamRequest(io({},d4(t),{contentSourceId:t.contentSourceID,videoId:t.videoID})):new f.google.ima.dai.api.LiveStreamRequest(io({},d4(t),{assetKey:t.assetKey}))}(t);t.enableNonce&&(n.enableNonce=!0),this.cai.requestStream(n)},n.hr=function(){this.vai(!1),this.cai.reset()},n.kn=function(){this.Vo();var t=google.ima.dai.api.StreamEvent.Type;this.cai.removeEventListener(t.AD_BREAK_STARTED,this._ai),this.cai.removeEventListener(t.AD_PROGRESS,this.gai),this.cai.removeEventListener(t.CLICK,this.y1t),this.cai.removeEventListener(t.COMPLETE,this.pai),this.cai.removeEventListener(t.CUEPOINTS_CHANGED,this.mai),this.cai.removeEventListener(t.ERROR,this.Ts),this.cai.removeEventListener(t.FIRST_QUARTILE,this.wai),this.cai.removeEventListener(t.LOADED,this.yai),this.cai.removeEventListener(t.MIDPOINT,this.Aai),this.cai.removeEventListener(t.STARTED,this.bai),this.cai.removeEventListener(t.STREAM_INITIALIZED,this.Sai),this.cai.removeEventListener(t.THIRD_QUARTILE,this.Tai),this.cai.removeEventListener(t.AD_BREAK_ENDED,this.kai),this.hr(),this.Eai&&Zi(this.Eai)},n.Pai=function(t){this.cai.onTimedMetadata(t)},n.xai=function(t,i,n){this.cai.processMetadata(t,i,n)},n.Iai=function(t){var i=this.cai.previousCuePointForStreamTime(t);if(i)return{PO:i.end,EO:i.start,_x:i.played}},n.Rai=function(t,i){var n=this.Iai(t);if(n){var r=t>i&&n.PO>i,e=n.PO>t&&n.EO<=t;return n._x||!r&&!e?void 0:n.EO}},n.vai=function(t){this.Y1t&&(this.Y1t.style.display=t?"block":"none")},i}(uh);function d4(t){var i,n=google.ima.dai.api.StreamRequest.StreamFormat;return{apiKey:t.apiKey,authToken:t.authToken,format:"dash"===t.format?n.DASH:n.HLS,networkCode:t.networkCode,streamActivityMonitorId:t.streamActivityMonitorID,adTagParameters:t.adTagParameters,omidAccessModeRules:null!=(i=j0(t.omidAccessModeRules))?i:{}}}function l4(t){var i,n=t.getStreamData(),r=n.adProgressData;return r&&(i={t7t:r.adBreakDuration,Cai:r.duration,i7t:r.adPosition,MP:r.currentTime,ct:r.duration,e7t:r.totalAds}),{Dai:i,Bai:(n.cuepoints||[]).map(function(t){return{EO:t.start,PO:t.end,_x:t.played}}),Nai:n.errorMessage||void 0,Mai:n.manifestFormat||void 0,Lai:n.streamId||void 0,Oai:(n.subtitles||[]).map(function(t){return{Fai:t.webvtt,Uai:t.ttml,bs:t.language}}),Yu:n.url}}function g4(t){return{lYt:t.getAdSlotId(),p4t:t.getContent(),qT:t.getContentType(),Mi:t.getHeight(),Ti:t.getWidth()}}function w4(t){var i=t.getAd();if(i){var n=i.getAdPodInfo(),r=i.getCompanionAds().map(g4);return{UYt:i.getAdId(),V7t:{i7t:n.getAdPosition(),p0t:n.getMaxDuration(),Yni:n.getPodIndex(),_Ot:n.getTimeOffset(),e7t:n.getTotalAds()},yKt:i.getAdSystem(),Zni:i.getAdvertiserName(),cYt:i.getApiFramework(),IKt:r,GKt:i.getCreativeId(),I9t:i.getCreativeAdId(),$ni:i.getDealId(),dB:i.getDescription(),ct:i.getDuration(),dq:i.getTitle(),Vai:i.getUniversalAdIdRegistry(),Hai:i.getUniversalAdIdValue(),S9t:i.getVastMediaHeight(),b9t:i.getVastMediaWidth(),m9t:i.getWrapperAdIds(),w9t:i.getWrapperAdSystems(),y9t:i.getWrapperCreativeIds()}}}function m4(){var t=v.body.lastElementChild;if(j(t,HTMLIFrameElement)&&"Advertisement"===t.title)return t}V(),It(),Bt(),Nt();var y4=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).Wai=void 0,r.Wai=n,r}Pt(i,t);var n=i.prototype;return n.N0t=function(){return this.Wai.getAdSystem()},n.O0t=function(){return this.od.whi.nyt},xt(i,[{key:"o",get:function(){return this.Wai.getAdId()}},{key:"ct",get:function(){return this.Wai.getDuration()}},{key:"AYt",get:function(){var t,i;return null==(i=this.Wai)||null==(t=i.ad)?void 0:t.clickThroughUrl}},{key:"GKt",get:function(){return this.Wai.getCreativeId()}},{key:"JYt",get:function(){return this.Wai.getSkipTimeOffset()}}]),i}(T3);V(),It(),Nt();var p4=function(t){function i(i){var n;return(n=t.call(this,i)||this)._4t=!0,n.WA=i.m0t,n}return Pt(i,t),i}(T3),_4="urn:google:dai:2018",k4=function(t){function i(i,n,r,e,s,u,o,h){var a;return void 0===u&&(u={}),(a=t.call(this,i,n,e,s,u)||this).cai=void 0,a.zai=void 0,a.qai=void 0,a.Gai=void 0,a.Jai=void 0,a.aui=void 0,a.jai=void 0,a.Qai=void 0,a.$ai=void 0,a.nui=void 0,a.Kai=void 0,a.cui=-1,a.dui=void 0,a.lui=void 0,a.Wn=function(t){var i=t.Ht;a.Xai(i)},a.oui=function(t){t.TO.wn(Xw.zL,a.fui)},a.Aoi=function(t){t.TO.mn(Xw.zL,a.fui)},a.fui=function(t){var i,n;if(a.zai)if((null==(i=a.aui)?void 0:i.Km)===Uw.ID3){var r,e=t.TO.U;if(Sp(e))if(a.cui<=t.TO.EO&&a.dui!==e.text)a.cui=t.TO.EO,a.dui=e.text,null==(r=a.cai)||r.processMetadata("ID3",e.text,t.TO.EO)}else if((null==(n=a.aui)?void 0:n.Km)===Uw.EVENT_STREAM){var s,u=t.TO.U;null==(s=a.cai)||s.processMetadata(_4,u,t.TO.EO)}},a.uui=function(t){switch(a.G0t&&(a.G0t.m0t=a.J4t.Nd()-a.J4t.LP()),t.type){case google.ima.dai.api.StreamEvent.Type.ERROR:a.s5t.So(new KZ(QK.GENERAL));break;case google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED:if(a.Chi)break;if(a.Chi=a.Jhi,a.Jhi=void 0,a.G0t=a.X4t(a.Chi),!a.G0t){Vi.dm("Started an ad break without having a current adbreak to our knowledge");break}a.s5t.So(new oO(a.G0t)),a.lui=Vi.Og(a.vui,250),a.eui(a.Lhi);break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED:Vi.Lg(a.lui);break;case google.ima.dai.api.StreamEvent.Type.STARTED:var i,n=t.getAd();a.M0t=new y4(a.G0t,n),null==(i=a.Chi)||i.er({ad:a.M0t}),a.s5t.So(new aO(a.M0t,a.Ari(a.J4t.LP())));break;case google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE:a.s5t.So(new w0(a.M0t,a.Ari(a.J4t.LP())));break;case google.ima.dai.api.StreamEvent.Type.MIDPOINT:a.s5t.So(new y0(a.M0t,a.Ari(a.J4t.LP())));break;case google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE:a.s5t.So(new _0(a.M0t,a.Ari(a.J4t.LP())));break;case google.ima.dai.api.StreamEvent.Type.COMPLETE:a.s5t.So(new fO(a.M0t,a.Ari(a.J4t.LP()))),a.M0t=void 0;break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED:if(!a.G0t)break;a.G0t.m0t>1&&a.vui()}},a.vui=function(){var t;a.M0t=new p4(a.G0t),null==(t=a.Chi)||t.er({ad:a.M0t}),a.s5t.So(new aO(a.M0t,a.Ari(a.J4t.LP())))},a.Kai=r,a.$ai=o,a.nui=h,a}Pt(i,t);var n=i.prototype;return n.Bhi=function(t){if(t){var i=this.cai;this.cai=this.qai,this.qai=i;var n=this.zai;this.zai=this.Gai,this.Gai=n}for(var r,e=Ft(this.J4t.nt.II);!(r=e()).done;){var s=r.value;this.Xai(s)}},n.IW=function(t,i,n){return jt(function(){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(!t||!i||t===this.jai&&i===this.Qai)return[2];if(void 0===this.cai){if(void 0===(null==(e=f.google)||null==(r=e.ima)?void 0:r.dai))throw new p("IMA DAI SDK missing for THEOads");this.cai=new google.ima.dai.api.StreamManager(this.J4t.xe.querySelector("video"),this.Kai)}return this.jai=t,this.Qai=i,s=this.Yai(!1),u=this.Yai(!0),this.Jai=kr(ot.all([s,u]),n),[4,this.Jai];case 1:return o.sent(),[2]}})}).call(this)},n.Yai=function(t){var i=this,n=this.cai;if(t&&(n=this.qai),!n)return ot.resolve();this.Zai(n),n.reset();var r=new google.ima.dai.api.PodStreamRequest;r.networkCode=this.jai,r.customAssetKey=this.Qai,r.adTagParameters=this.Lhi,this.$ai&&(r.streamActivityMonitorId=this.$ai),r.format="hls";var e=this.tui(n,[google.ima.dai.api.StreamEvent.Type.STREAM_INITIALIZED,google.ima.dai.api.StreamEvent.Type.ERROR]).then(function(r){if(r.type===google.ima.dai.api.StreamEvent.Type.ERROR)throw new p("DAI stream request failed");t?i.Gai=r.getStreamData():i.zai=r.getStreamData(),i.iui(n)});return n.requestStream(r),e},n.tui=function(t,i,n){return new ot(function(r,e){if(n&&n.Hg)return e(new wr);for(var s,u=function(t){h(),r(t)},o=function(){h(),e(new wr)},h=function(){for(var r,e=Ft(i);!(r=e()).done;){var s=r.value;t.removeEventListener(s,u)}n&&n.jg(o)},a=Ft(i);!(s=a()).done;){var c=s.value;t.addEventListener(c,u)}n&&n.Xg(o)})},n.Mhi=function(i){void 0===i&&(i={}),t.prototype.Mhi.call(this,i),this.eui(this.Lhi)},n.eui=function(t){var i,n;void 0===t&&(t={}),null==(i=this.cai)||i.replaceAdTagParameters(t),null==(n=this.qai)||n.replaceAdTagParameters(t)},n.sui=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return i=this,(null==(n=this.Jhi)?void 0:n.Vri)&&!E(this.Jhi.Vri)?[2,this.Jhi.Vri]:this.nui&&(null==(r=this.Jhi)?void 0:r.Rvt)?[4,IT(function(){return i.rui()},t,4,500,5e3)]:[2,void 0];case 1:return[2,e.sent()]}})}).call(this)},n.rui=function(){return jt(function(){var t,i,n,r;return zt(this,function(e){switch(e.label){case 0:t=this.nui+"/"+this.jai+"/"+this.Qai+"/"+this.Jhi.Rvt+".json",i=new El({Yu:t,dk:Hd.DT,Uk:kl.GET,Vk:1e3}),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.J4t.SP.lk(i)];case 2:return n=e.sent(),[3,4];case 3:throw e.sent(),new GK(QK.NETWORK,YK.UNKNOWN_AD_RESPONSE,"The ad's PodId could not be loaded.");case 4:if(!pl(n))throw new GK(QK.NETWORK,YK.UNKNOWN_ERROR,"Something went wrong while requesting JSON from server.");return[4,n.ck()];case 5:return(r=e.sent())?[2,r.podid]:[2,void 0]}})}).call(this)},n.hai=function(t,i,n,r){return void 0===r&&(r=!1),jt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:return[4,this.oai(t,i,n)];case 1:return e=u.sent(),s={sources:{src:e}},[4,this.Yhi(s,n,void 0,r)];case 2:return u.sent(),[2]}})}).call(this)},n.oai=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:return this.Jhi=t,e=t.dhi,s=t.lhi,this.Uhi(t.Zri),u=io({},this.Lhi,t.Hri),this.eui(u),[4,this.IW(e,s,n)];case 1:return l.sent(),o=Vi.Dh(t.nyt),h=Number(o.searchParams.get("d")),a=A.floor(1e3*A.min(h,t.Bri-i)),[4,this.sui(n)];case 2:if(!(c=l.sent()))throw new p("Something went wrong with retrieving the PodID from the server.");return(null==(r=this.zai)?void 0:r.streamId)?[3,4]:[4,this.Jai];case 3:l.sent(),l.label=4;case 4:return f=Vi.Dh("https://dai.google.com/linear/pods/v1/hls/network/"+this.jai+"/custom_asset/"+this.Qai),"V2"===t.fhi?f.pathname+="/ad_break_id/"+c+".m3u8":f.pathname+="/pod/"+c+".m3u8",v=this.zai.streamId,this.Chi?void 0===(d=this.J4t.hui())||void 0!==this.qai?[3,6]:(this.qai=new google.ima.dai.api.StreamManager(d.xe.querySelector("video"),this.Kai),[4,kr(this.Yai(!0),n)]):[3,7];case 5:l.sent(),l.label=6;case 6:this.Gai&&(v=this.Gai.streamId),l.label=7;case 7:return f.searchParams.set("stream_id",v),f.searchParams.set("pd",String(a)),[2,f.toString()]}})}).call(this)},n.Ghi=function(){this.J4t.nt.wn(Ng.eI,this.Wn),t.prototype.Ghi.call(this)},n.Khi=function(){t.prototype.Khi.call(this),this.J4t.nt.mn(Ng.eI,this.Wn)},n.Xai=function(t){if(t.Lt===ep.VU&&!(t.Km!==Uw.ID3&&t.Km!==Uw.EVENT_STREAM||t.Km===Uw.EVENT_STREAM&&t.ZI!==_4)){if(t.wn(Mg.hI,this.oui),t.wn(Mg.aI,this.Aoi),t.L)for(var i,n=Ft(t.L.II);!(i=n()).done;){var r=i.value;this.oui(new iN(r))}t.Xk=$y.JI,this.aui=t}},n.iui=function(t){t&&(t.addEventListener(google.ima.dai.api.StreamEvent.Type.ERROR,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.CLICK,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.STARTED,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.MIDPOINT,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.COMPLETE,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,this.uui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.RESUMED,this.uui))},n.Zai=function(t){t&&(t.removeEventListener(google.ima.dai.api.StreamEvent.Type.ERROR,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.CLICK,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.STARTED,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.MIDPOINT,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.COMPLETE,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,this.uui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.RESUMED,this.uui))},n.Bd=function(i){t.prototype.Bd.call(this,i),this.cui=-1,this.dui=void 0},n.hr=function(){var i=this;return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return s.sent(),this.Zai(this.cai),this.Zai(this.qai),null==(n=this.cai)||n.reset(),this.cai=void 0,null==(r=this.qai)||r.reset(),this.qai=void 0,this.zai=void 0,this.Gai=void 0,this.Jai=void 0,this.$ai=void 0,this.Qai=void 0,this.jai=void 0,this.Fhi=!0,this.cui=-1,this.dui=void 0,void 0!==(e=m4())&&Zi(e),[2]}})}).call(this)},n.kn=function(){var i=this;return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return r.sent(),null==(n=this.aui)||n.kn(),[2]}})}).call(this)},xt(i,[{key:"uhi",get:function(){return N3.GOOGLE}}]),i}(D3);V(),It(),Wt(),Nt(),Yt();var b4=function(t){function i(i){return t.call(this,i)||this}Pt(i,t);var n=i.prototype;return n.hui=function(){},n.Yhi=function(t,i,n,r){return jt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,this.oa.Ta(t,r)];case 1:return e.sent(),this._ui(this.oa,i,n),[2]}})}).call(this)},n._ui=function(t,i,n){Oi.ru&&Oi.X_&&(t.Gx(),t.zx()),i&&t.OP(i),n&&t.Gx()},n.gui=function(t){},i}(LZ);V(),It(),Wt(),Bt(),Nt(),Yt(),Et();var A4=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).NPt=0,i.Qhi=function(t){i.Bd(i.Ari(t.currentTime))},i}Pt(i,t);var n=i.prototype;return n.IW=function(t,i,n){return ot.resolve()},n.hai=function(t,i,n,r){return void 0===r&&(r=!1),this.Jhi=t,this.Whi(t,i),ot.resolve()},n.Yhi=function(t,i,n,r){return jt(function(){return zt(this,function(t){return[2,ot.resolve()]})})()},n.oai=function(t,i,n){return jt(function(){return zt(this,function(i){return this.Jhi=t,[2,t.nyt]})}).call(this)},n.Nhi=function(t){this.NPt=t-this.J4t.LP(),this.d7t(t)},n.bd=function(t){if(this.Chi){var i=this.Ari(t.currentTime);this.Chi.Mri(i),this.Chi._x&&this.Bd(i)}else Vi.um("Got timeupdate without a current interstitial")},n.Ari=function(t){return this.NPt+t},xt(i,[{key:"uhi",get:function(){return N3.COMPANION}}]),i}(D3);V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),Et(),V(),It(),Bt(),Nt();var T4=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).pui=void 0,r.pui=n,r}Pt(i,t);var n=i.prototype;return n.N0t=function(){return this.pui.N0t()},n.O0t=function(){return this.od.whi.nyt},xt(i,[{key:"o",get:function(){return this.pui.o}},{key:"ct",get:function(){return this.pui.ct}},{key:"AYt",get:function(){return this.pui.AYt}},{key:"GKt",get:function(){return this.pui.GKt}},{key:"JYt",get:function(){return this.pui.JYt}}]),i}(T3),S4=function(t){function i(i,n,r,e,s){var u;return void 0===s&&(s={}),(u=t.call(this,i,n,r,e,s)||this).Eui=0,u.Qhi=function(t){u.Bd(u.Ari(t.currentTime))},u.wui=function(){u.Jhi?(u.Chi=u.Jhi,u.Jhi=void 0,u.G0t=u.X4t(u.Chi),u.s5t.So(new oO(u.G0t))):Vi.um("Started an ad break without having a current adbreak to our knowledge")},u.yui=function(t){var i,n,r=t.Int;u.M0t=new T4(u.G0t,r),null==(i=u.Chi)||i.er({ad:u.M0t}),u.Eui=u.Ari(null==(n=u.J4t)?void 0:n.LP()),u.s5t.So(new aO(u.M0t,u.Eui))},u.Aui=function(){u.s5t.So(new w0(u.M0t,u.Ari(u.J4t.LP())))},u.bui=function(){u.s5t.So(new y0(u.M0t,u.Ari(u.J4t.LP())))},u.Sui=function(){u.s5t.So(new _0(u.M0t,u.Ari(u.J4t.LP())))},u.Tui=function(){var t=u.Eui+u.M0t.ct;u.s5t.So(new fO(u.M0t,t)),u.M0t=void 0},u.kui=function(){u.Bd(u.Ari(u.G0t.p0t))},u}Pt(i,t);var n=i.prototype;return n.IW=function(t,i,n){return ot.resolve()},n.hai=function(t,i,n,r){return void 0===r&&(r=!1),this.Jhi=t,this.Yhi({ads:[{integration:"google-ima",sources:this.mui(t)}]},n,void 0,r)},n.oai=function(t,i,n){return jt(function(){return zt(this,function(i){return this.Jhi=t,[2,this.mui(t)]})}).call(this)},n.mui=function(t){var i=new URL(t.nyt),n=i.searchParams;this.Uhi(t.Zri);for(var r,e=io({},this.Lhi,t.Hri),s=Ft(b.keys(e));!(r=s()).done;){var u=r.value;n.set(u,e[u])}return i.toString()},n.Ghi=function(){var i,n,r,e,s,u,o;t.prototype.Ghi.call(this),null==(i=this.J4t.Jc)||i.wn("Dnt",this.wui),null==(n=this.J4t.Jc)||n.wn("Bnt",this.yui),null==(r=this.J4t.Jc)||r.wn("P4t",this.Aui),null==(e=this.J4t.Jc)||e.wn("x4t",this.bui),null==(s=this.J4t.Jc)||s.wn("I4t",this.Sui),null==(u=this.J4t.Jc)||u.wn("Nnt",this.Tui),null==(o=this.J4t.Jc)||o.wn("Cnt",this.kui)},n.Khi=function(){var i,n,r,e,s,u,o;null==(i=this.J4t.Jc)||i.mn("Dnt",this.wui),null==(n=this.J4t.Jc)||n.mn("Bnt",this.yui),null==(r=this.J4t.Jc)||r.mn("P4t",this.Aui),null==(e=this.J4t.Jc)||e.mn("x4t",this.bui),null==(s=this.J4t.Jc)||s.mn("I4t",this.Sui),null==(u=this.J4t.Jc)||u.mn("Nnt",this.Tui),null==(o=this.J4t.Jc)||o.mn("Cnt",this.kui),t.prototype.Khi.call(this)},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return n.sent(),this.Eui=0,[2]}})}).call(this)},xt(i,[{key:"uhi",get:function(){return N3.CSAI}}]),i}(D3),E4=function(t){function i(i){var n,r,e;return n=t.call(this,i)||this,(r=n).Qst=void 0,r.Uui=void 0,r.Ls=void 0,r.Fui=void 0,r.Kai=void 0,r.JW=void 0,r.Lz=void 0,r.Rui=void 0,r.Nui=void 0,r.Iui=void 0,r.Qoi=void 0,r.Hui=void 0,r.Lhi=void 0,r.eci=void 0,r.Wui=void 0,r.sci=void 0,r.gci=void 0,r.nci=void 0,r.Yui=void 0,r.xui=void 0,r.eai=void 0,r.Pui=void 0,r.uci=ro(),r.yci=!0,r.Aci=NaN,r.hci=NaN,r.rci=NaN,r.bci=void 0,r.wci=!1,r.Sci=!0,r.GG=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return r.Qst.mn(Mp.TM,r.GG),r.Rui?r.Rui.initializationDelay?(r.bci=Vi.Og(function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return r.Rui?[4,r.Lui(r.Rui)]:[2];case 1:return t.sent(),[2]}})})()},1e3*r.Rui.initializationDelay),[3,3]):[3,1]:[2];case 1:return[4,r.Lui(r.Rui)];case 2:t.sent(),t.label=3;case 3:return[2]}})})()},r.Pd=function(){r.Qst.mn(Mp.AM,r.Pd),r.xui.ooi(r.oa.nt)},r.Cui=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),[4,r.Wst.Bj([IE.THEOADS])];case 1:return i.sent(),[3,4];case 2:return t=i.sent(),[4,r.Xx().catch(yn)];case 3:return i.sent(),r.qq(yd(t,gd.LICENSE_INVALID_FEATURE)),[3,4];case 4:return[2]}})})()},r.stt=function(t){jZ(r.Uui,r.oa.Bx,r.oa.Rx,t.width,t.height)},r.CXt=function(){jZ(r.Uui,r.oa.Bx,r.oa.Rx,r.Wu.Eu,r.Wu.Iu)},r.qui=function(){r.cci(r.LP()),r.dci()},r.XG=function(){r.cci(r.LP()),r.dci()},r.Xui=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return r.mci()?r.nci?[2]:(r.nci=r.sci,[4,r.nci]):[3,2];case 1:return t.sent(),r.Kui(function(){return r.tci()}),[3,3];case 2:r.Kui(function(){return r.i3t()}),t.label=3;case 3:return[2]}})})()},r.jui=function(t){return r.Jui(r.eci,"Error playing the current adbreak: "+t.error),r.Kui(function(){return r.i3t()})},r.aci=function(t){r.Iui.So(t.Ca)},r.Qst=new b4(i),r.Ls=i.xe,r.Uui=function(){var t=v.createElement("div");return hn(t,"theo-ads-sgai-container"),t}(),r.Fui=function(){var t=v.createElement("div");return hn(t,"theo-ads-sgai-content-player"),t}(),r.Iui=new H3(r),r.Hui=new W3,null==(e=r.Qst.Jc)||e.Ent(r.Hui),r.eai=new I3(i.SP),r.xui=new L3(r),r.Pui=new z3(r.Qst,r.Fui,r.eai),n}Pt(i,t);var n=i.prototype;return n.Zst=function(){return this.Qst.Jc},n.snt=function(){return this.Iui.Ca},n.FP=function(){return this.Ls},n.Jst=function(){return this.Qst.Dst},n.HP=function(){var i;return null!=(i=this.Lz)?i:t.prototype.HP.call(this)},n.qP=function(){var i;return null!=(i=this.JW)?i:t.prototype.qP.call(this)},n.qx=function(){this.Qst.qx()},n.Noi=function(t){return t},n.Ta=function(i,n){var r=this;return jt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,this.xpt()];case 1:return s.sent(),[4,t.prototype.Ta.call(r,i,n)];case 2:return s.sent(),void 0===i||void 0===i.ads?[2]:void 0===(e=Wn(i.ads,WZ))?[2]:(this.Cui(),this.Dui(),this.Bui(),this.Rui=e,this.Nui=e.backdropLShape,this.Pui.Hri=e.adTagParameters,this.xui.Loi=function(t){switch(t){case"single":return u3.SINGLE;case"l-shape":return u3.LSHAPE_AD;case"double":return u3.DOUBLE;case"single-if-mobile":return Oi.Ks?u3.SINGLE:void 0;default:return}}(this.Rui.overrideLayout),this.xui.loi=this.Rui.useId3,this.Qst.wn(Mp.AM,this.Pd),this.Wu.wn(_I.yn,this.stt),this.wn(ch.Jw,this.CXt),[4,this.Mui(N3.DEFAULT,void 0,void 0)]);case 3:return s.sent(),this.Qst.wn(Mp.TM,this.GG),[2]}})}).call(this)},n.Lui=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.Oui(),i=void 0===t.networkCode||void 0===t.customAssetKey?N3.DEFAULT:N3.GOOGLE,[4,this.Mui(i,t.networkCode,t.customAssetKey)];case 1:return n.sent(),t.sseEndpoint&&this.xui.eoi(t.sseEndpoint),[2]}})}).call(this)},n.Dui=function(){nn(this.Ls,this.Fui),ln(this.Uui),ln(this.Fui),this.Uui.appendChild(this.Fui),this.Ls.appendChild(this.Uui)},n.Vui=function(){nn(this.Fui,this.Ls),gn(this.Fui),gn(this.Uui),Zi(this.Fui),Zi(this.Uui)},n.Mui=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f,v;return zt(this,function(d){switch(d.label){case 0:return u=this.E3t(),o=this.Kai,u&&o?t===(null==(r=this.Qoi)?void 0:r.uhi)?[2]:(a=null!=(h=null==(e=this.Qoi)?void 0:e.A0t)?h:[],[4,null==(s=this.Qoi)?void 0:s.hr()]):[2];case 1:switch(d.sent(),t){case N3.GOOGLE:return[3,2];case N3.COMPANION:return[3,4];case N3.CSAI:return[3,5];case N3.DEFAULT:return[3,6]}return[3,6];case 2:return this.Qoi=new k4(u,this.Hui,o,a,this.eai,this.Hri,null==(c=this.Rui)?void 0:c.streamActivityMonitorId,null==(f=this.Rui)?void 0:f.retrievePodIdURI),[4,null==(v=this.Qoi)?void 0:v.IW(i,n)];case 3:return d.sent(),[3,7];case 4:return this.Qoi=new A4(this.Qst,this.Hui,a,this.eai),[3,7];case 5:return this.Qoi=new S4(u,this.Hui,a,this.eai,this.Hri),[3,7];case 6:this.Qoi=new $3(u,this.Hui,a,this.eai),d.label=7;case 7:return[2]}})}).call(this)},n.Eoi=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.Wui||void 0===t||void 0===i?[2]:(null==(n=this.Qoi)?void 0:n.uhi)===N3.GOOGLE?[3,2]:[4,this.Mui(N3.GOOGLE,t,i)];case 1:r.sent(),r.label=2;case 2:return[2]}})}).call(this)},n.qq=function(t){void 0===this.qP()&&(this.JW=t,this.Lz=ww(t),this.So(new Ib(t)))},n.Oui=function(){this.Qst.wn(ch._y,this.qui),this.Qst.wn(ch.$w,this.XG)},n.zui=function(){this.Qst.mn(ch._y,this.qui),this.Qst.mn(ch.$w,this.XG)},n.Gui=function(){var t,i;this.Hui.M3t.wn("Cnt",this.Xui),null==(t=this.Qoi)||t.wn(P3.AD_ENDED,this.Xui),null==(i=this.E3t())||i.wn(Jy.ma,this.jui)},n.Qui=function(){var t,i;this.Hui.M3t.mn("Cnt",this.Xui),null==(t=this.Qoi)||t.wn(P3.AD_ENDED,this.Xui),null==(i=this.E3t())||i.mn(Jy.ma,this.jui)},n.Kui=function(t){var i=this,n=function(){i.Yui=void 0};this.Yui=t().then(n).catch(n)},n.Jui=function(t,i){this.Iui.So(new Q3(t,i).Ca),t._x=!0,this.Yui&&(this.Wui=void 0)},n.Zui=function(){return jt(function(){var t;return zt(this,function(i){return null==(t=this.Qoi)||t.Ghi(),this.$ui(),[2]})}).call(this)},n.tci=function(){return jt(function(){return zt(this,function(t){return this.$ui(),[2]})}).call(this)},n.i3t=function(){return jt(function(){var t;return zt(this,function(i){return this.ici(),null==(t=this.Qoi)||t.Khi(),this.zhi(this.eci),this.eci=void 0,[2]})}).call(this)},n.$ui=function(){this.ici(),this.eci=this.Wui,this.Wui=void 0,this.sci=void 0,this.nci=void 0},n.ici=function(){var t=this.oa.Rx,i=this.oa.Bx;t===this.rci&&i===this.hci||(this.rci=t,this.hci=i,this.So(new Bp))},n.qhi=function(t){var i;I4(t)&&(null==(i=this.Qoi)||i.qhi(t),this.Uoi(this.LP()));t.wn("Dri",this.aci),this.Iui.So(new q3(t.wnt()))},n.zhi=function(t){if(Jn(this.xui.toi,t)){var i;if(this.xui.zhi(t),I4(t))null==(i=this.Qoi)||i.zhi(t);else R4(t)&&(this.Pui.tai(t),this.uci.delete(t.o));t.mn("Dri",this.aci),this.Iui.So(new X3(t).Ca)}},n.Uoi=function(t){this.cci(t),this.dci()},n.cci=function(t){this.lci(t),this.fci(t),this.vci(t)},n.lci=function(t){if(void 0===this.Yui){for(var i,n,r=[],e=Ft(this.xui.toi.filter(I4));!(n=e()).done;){var s=n.value;s._x?r.push(s):s!==this.eci&&(t>=s.EO+5||this.eci&&s.EO+5=t.EO);var e=t.Bri,s=i>=t.EO&&(void 0===e||i=this.Wui.EO&&(void 0===r||t=e)return"continue";var u=i.EO,o=i.EO+i.ct;r>=u&&r<=o&&!t.uci.has(i.o)&&(t.Pui.Yoi(i).catch(function(){n.Iui.So(new Q3(i,"Could not load the overlay.").Ca)}),t.Iui.So(new w3(i).Ca),t.uci.set(i.o,i))},n=this,r=this.LP(),e=[];this.uci.forEach(function(t){r>=t.EO&&(void 0===t.Bri||r0&&(n.kci-=n.Qst.LP())},n.cPt=GH.Ng,n.Dci=new F2(Vi.SP),n}Pt(i,t);var n=i.prototype;return n.Nd=function(){var i;return null!=(i=this.WA)?i:t.prototype.Nd.call(this)},n.nu=function(){var i;return null!=(i=this.Ac)?i:t.prototype.nu.call(this)},n.LP=function(){return this.Noi(t.prototype.LP.call(this))},n.DP=function(){return this.Tci?new Date(this.Tci.getTime()+we(this.Qst.LP())):t.prototype.DP.call(this)},n.RP=function(){var i=t.prototype.RP.call(this);return OA.jn(i).Ny(this.kci)._s()},n.Tx=function(){var i=t.prototype.Tx.call(this);return OA.jn(i).Ny(this.kci)._s()},n.Noi=function(t){return t+this.kci},n.Ta=function(i,n){var r=this;return jt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Ta.call(r,i,n)];case 1:return e.sent(),this.Rui?(this.Ac=i,this.Eci=new d3(this.Qst),this.Eci.gr(this.Fui,this.Uui),this.tO(this.Eci),[2]):[2]}})}).call(this)},n.Bui=function(){},n.Dui=function(){t.prototype.Dui.call(this),this.Kai=FZ(this.Uui)},n.Oui=function(){t.prototype.Oui.call(this),this.Pci()},n.zui=function(){t.prototype.zui.call(this),this.xci()},n.Pci=function(){this.Qst.wn(ch.Rw,this.xXt),this.Qst.wn(Mp.TM,this.MV)},n.xci=function(){this.Qst.mn(ch.Rw,this.xXt),this.Qst.mn(Mp.TM,this.MV)},n.E3t=function(){return this.Qst},n.OP=function(i,n){this.Ici=!0,t.prototype.OP.call(this,i,n)},n.Gx=function(){t.prototype.Gx.call(this),this.So(new _T(this.LP())),this.Sci=!0,this.Rci=!1},n.zx=function(){this.Rci=!0,t.prototype.zx.call(this)},n.hai=function(t,i,n){return jt(function(){var r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:return r=this,[4,this.Mui(t.uhi,t.dhi,t.lhi)];case 1:return a.sent(),u=this,[4,null==(e=this.Qoi)?void 0:e.oai(t,i,n)];case 2:return u.Cci=a.sent(),[4,null==(s=this.Qoi)?void 0:s.Vhi(t,n).catch(function(){r.Iui.So(new Q3(t,"Could not load the backdrop.").Ca)})];case 3:return a.sent(),t.uhi===N3.COMPANION?[2]:(o=new N2(this.cPt,this.Dci),h=new F1(this.cPt.fPt,o,"temporary"),this.Bci=h.Bei(pE(pE({sources:{src:this.Cci}})),D2({amount:30,bandwidth:Pb.Ng.fW()||this.Dst.WY}),"temporary"),this.Nci.Zg(),this.Nci=new dr,this.Dci.Ret(this.Bci,this.cPt,"temporary").mi(this.Nci.Yg).catch(yn),[2])}})}).call(this)},n.Mci=function(t,i){switch(t){case u3.LSHAPE_CONTENT:case u3.LSHAPE_AD:return new g3(this.Qst,i);case u3.SINGLE:default:return new l3(this.Qst)}},n.Lci=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return null==(i=this.gci)||i.Zg(),this.gci=new dr,[4,this.Mui(t.uhi,t.dhi,t.lhi)];case 1:return o.sent(),null==(n=this.Eci)||n.mr(this.Fui),(null==(r=this.Qoi)?void 0:r.uhi)!==N3.COMPANION&&(this.wci=!0,this.kci=this.LP(),this.Tci=this.DP(),this.Qst.wn(Mp.TM,this.MV)),this.Iui.So(new w3(t).Ca),[4,null==(e=this.Qoi)?void 0:e.Yhi({sources:{src:this.Cci}},this.gci.Yg,void 0,!0)];case 2:return o.sent(),this.Eci=this.Mci(t.Zri,null!=(u=t.$ri)?u:this.Nui),this.h3t(this.Eci),this.Eci.gr(this.Fui,this.Uui),null==(s=this.Qoi)||s.Nhi(this.LP()),[2]}})}).call(this)},n.Zui=function(){var i=this;return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return void 0===this.Wui||void 0===this.Cci?[2]:(this.xci(),this.Ez=this.ux,[4,this.Lci(this.Wui)]);case 1:return r.sent(),this.Gui(),(null==(n=this.Qoi)?void 0:n.uhi)!==N3.COMPANION&&(this.Oci=!1),[2,t.prototype.Zui.call(i)]}})}).call(this)},n.tci=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.zhi(this.eci),void 0===this.Wui?[2,this.i3t()]:[4,this.Lci(this.Wui)];case 1:return n.sent(),[2,t.prototype.tci.call(i)]}})}).call(this)},n.i3t=function(){var i=this;return jt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return this.eci?(null==(n=this.Bci)||n._S(),this.Bci=void 0,this.Qui(),(null==(r=this.Qoi)?void 0:r.uhi)===N3.COMPANION?[3,2]:(this.wci=!0,this.Pri=!1,this.kci=this.LP(),this.Tci=this.DP(),this.xui.coi(this.Qst.nt),this.Qst.wn(Mp.AM,this.Fci),this.Qst.wn(Mp.AM,this.Pd),this.Qst.wn(Mp.TM,this.MV),[4,this.Qst.Ta(this.Ac,(new dr).Yg)])):[2];case 1:o.sent(),o.label=2;case 2:return null==(e=this.Eci)||e.mr(this.Fui),this.Eci=new d3(this.Qst),this.Eci.gr(this.Fui,this.Uui),this.h3t(this.Eci),(null==(s=this.Qoi)?void 0:s.uhi)!==N3.COMPANION&&(this.ux=null!=(u=this.Ez)?u:1,this.Qst.Gx()),this.Oci=!0,this.Pci(),[2,t.prototype.i3t.call(i)]}})}).call(this)},n.xpt=function(){var i=this;return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.Eci=void 0,this.WA=void 0,this.kci=0,this.Cci=void 0,this.Ez=void 0,this.Tci=void 0,this.Oci=!0,this.wci=!1,this.Sci=!0,this.Rci=!0,this.Nci.Zg(),this.Nci=new dr,null==(n=this.Bci)||n._S(),this.Bci=void 0,this.Qst.mn(Mp.AM,this.Fci),[4,t.prototype.xpt.call(i)];case 1:return r.sent(),[2]}})}).call(this)},n.$x=function(i){if(void 0!==this.Eci)switch(i.type){case ch.uo:return!0;case ch.jw:return!this.Rci||(this.Rci=!1,this.So(new pT(this.Noi(i.currentTime))),!0);case Mp.TM:return!this.Sci||(this.Sci=!1,this.So(new qp(this.Noi(i.currentTime))),!0);case Mp.SM:return this.wci||(this.Sci=!0,this.So(new Hp(this.Noi(i.currentTime)))),!0;case ch.Zw:return this.wci&&!this.Ici||(this.Ici=!1,this.So(new ST(this.Noi(i.currentTime)))),!0;case ch.$w:return this.wci&&!this.Ici||this.So(new TT(this.Noi(i.currentTime))),!0;case ch.Bw:return!this.Oci||(this.So(new AT(this.Noi(i.currentTime))),!0);case ch._y:return this.So(new Eg(this.Noi(i.currentTime),i.currentProgramDateTime)),!0;case ch.Qw:return this.So(new eC(this.Noi(i.currentTime))),!0;case ch.Kw:return this.So(new bT(this.Noi(i.currentTime),i.playbackRate)),!0;case ch.gy:return this.Pri?(this.So(new ET(this.Noi(i.currentTime),i.volume)),!0):(this.Pri=!0,!0);case ch.Cw:return this.So(new yT(this.Noi(i.currentTime),i.readyState)),!0;case Mp.wM:return this.So(new Wp(this.Noi(i.currentTime),i.readyState)),!0;case Mp.yM:return this.So(new zp(this.Noi(i.currentTime),i.readyState)),!0;case Mp.AM:return this.So(new jp(this.Noi(i.currentTime),i.readyState)),!0;case Mp.bM:return this.So(new Vp(this.Noi(i.currentTime),i.readyState)),!0;case Mp.wI:return this.So(new Fp(this.Noi(i.currentTime),i.readyState)),!0;case ch.Dw:return this.So(new Pj(this.Noi(i.currentTime),i.initDataType,i.initData)),!0}return t.prototype.$x.call(this,i)},i}(E4);V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It(),Wt(),Nt(),Yt();var P4=function(t){function i(i,n){var r,e=function(){var t=v.createElement("div");return hn(t,"theo-ads-sgai-ad-player-one"),t}(),s=N4(i,e,n);return e.style.display="block",(r=t.call(this,s)||this).Vci=void 0,r.Hci=void 0,r.Uci=void 0,r.Vci=i,r.Hci=s,r}Pt(i,t);var n=i.prototype;return n.hui=function(){if(void 0===this.Uci){var t=function(){var t=v.createElement("div");return hn(t,"theo-ads-sgai-ad-player-two"),t}();this.Uci=N4(this.Vci,t,this.oa.Cd)}return this.oa===this.Hci?this.Uci:this.Hci},n.Yhi=function(t,i,n,r){return jt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,(e=this.oa.nu()?this.hui():this.oa).Ta(t,r)];case 1:return s.sent(),this._ui(e,i,n),[2]}})}).call(this)},n.gui=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return t?[4,this.hui().Xx()]:[3,2];case 1:return i.sent(),[3,4];case 2:return[4,this.oa.Xx()];case 3:i.sent(),i.label=4;case 4:return[2]}})}).call(this)},n.Wci=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return J2(this.oa,this.hui()),this.h3t(this.hui()),this.oa.xe.style.display="",this.hui().xe.style.display="none",[4,this.hui().Xx()];case 1:return t.sent(),[2]}})}).call(this)},n.hr=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.oa.Xx()];case 1:return t.sent(),[4,this.hui().Xx()];case 2:return t.sent(),[2]}})}).call(this)},i}(b4);function N4(t,i,n){var r=t.children[t.children.length-1];t.insertBefore(i,r),UZ(i);var e=new T0(new BB(i,n,new jE),PS.Ng);return e.mx=eS.OL,e.cO=!1,e}var D4=function(t){function i(i,n,r){var e,s=new P4(n,r);return(e=t.call(this,s)||this).Qst=void 0,e.J4t=void 0,e.Kci=void 0,e.Zci=void 0,e.Jci=void 0,e.Yci=void 0,e.edi=void 0,e.qci=0,e.zci=void 0,e.Gci=0,e.qzt=void 0,e.Xci=void 0,e.rdi=0,e.Qci=0,e.hdi=function(){if(e.Qst.mn(Mp.bM,e.hdi),e.zci){var t=e.zci;t.setSeconds(e.zci.getSeconds()+e.rdi),e.Qst.CP=t,e.zci=void 0}e.Gci-=e.Qst.LP(),e.qzt=void 0,e.Xci=void 0},e.LV=function(){e.J4t.Gx()},e.OV=function(){e.J4t.zx()},e.Qst=i,e.J4t=s,e}Pt(i,t);var n=i.prototype;return n.hui=function(){return this.J4t.hui()},n.Yhi=function(t,i,n,r){return this.J4t.Yhi(t,i,n,r)},n.jci=function(t,i,n,r){var e,s;this.qci=t,r?this.Qci=0:this.Qci+=n,this.zci=i,null==(s=this.zci)||s.setSeconds((null==(e=this.zci)?void 0:e.getSeconds())+this.Qci)},n.Rri=function(){var t;if(void 0===this.Kci){this.qzt=void 0,this.Xci=void 0;var i=this.Yci;this.Yci=void 0,null==(t=this.Jci)||t.Zg(),M4(this.Qst)&&(this.Zci=new dr,this.Kci=br(this.$ci(i,this.Zci.Yg),this.Zci).catch(_r))}},n.Cri=function(){var t;this.qzt=this.qci+this.oa.LP(),this.Eri&&(this.Xci=new Date(this.Eri.getTime()+1e3*this.oa.LP()));var i=this.Kci;this.Kci=void 0,null==(t=this.Zci)||t.Zg(),this.Jci=new dr,this.Yci=br(this.tdi(i,this.Jci.Yg),this.Jci).catch(_r)},n.Aa=function(){return this.Qst.mq},n.idi=function(){this.edi||(this.edi={source:this.Qst.nu(),duration:this.Qst.Nd(),currentTime:this.Qst.LP(),preload:this.Qst.mx,autoplay:this.Qst.cO,playbackRate:this.Qst.ux})},n.sdi=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.Qst.mx=eS.OL,this.Qst.cO=!1,this.J4t.$P=!0,i=this.J4t.nu(),[4,this.Qst.Ta(i,t)];case 1:return n.sent(),this.Qst.OP(this.J4t.LP()),this.Qst.wn(ch.uo,this.LV),this.Qst.wn(ch.jw,this.OV),[2]}})}).call(this)},n.ndi=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.edi?(this.Qst.mx=this.edi.preload,this.Qst.cO=this.edi.autoplay,this.Qst.ux=this.edi.playbackRate,[4,this.Qst.Ta(this.edi.source,t)]):[2];case 1:return i.sent(),this.edi=void 0,[2]}})}).call(this)},n.$ci=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,null==t?void 0:t.catch(yn)];case 1:return n.sent(),this.idi(),[4,this.Qst.Xx()];case 2:return n.sent(),[4,this.sdi(i)];case 3:return n.sent(),this.h3t(this.Qst),this.Qst.Gx(),[2]}})}).call(this)},n.tdi=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,null==t?void 0:t.catch(yn)];case 1:return n.sent(),this.rdi=this.J4t.LP(),this.Gci=this.rdi+this.Sri,[4,this.Qst.Xx()];case 2:return n.sent(),this.Qst.mn(ch.uo,this.LV),this.Qst.mn(ch.jw,this.OV),[4,this.ndi(i)];case 3:return n.sent(),this.h3t(this.J4t),this.Qst.wn(Mp.bM,this.hdi),this.Qst.Gx(),[2]}})}).call(this)},n.nu=function(){return this.edi?this.edi.source:t.prototype.nu.call(this)},n.Nd=function(){return this.edi?this.edi.duration:t.prototype.Nd.call(this)},n.odi=function(){return t.prototype.Nd.call(this)},n.Tx=function(){var i=t.prototype.Tx.call(this);return OA.jn(i).Ny(this.Sri)._s()},n.RP=function(){var i=t.prototype.RP.call(this);return OA.jn(i).Ny(this.Sri)._s()},n.Xx=function(){return this.J4t.Xx()},n.Wci=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.J4t.Wci()];case 1:return t.sent(),this.h3t(this.J4t),[2]}})}).call(this)},n.gui=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.J4t.gui(t)];case 1:return i.sent(),[2]}})}).call(this)},n.hr=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return null==(t=this.Zci)||t.Zg(),this.Zci=void 0,this.Kci=void 0,null==(i=this.Jci)||i.Zg(),this.Jci=void 0,this.Yci=void 0,this.edi=void 0,this.qci=0,this.zci=void 0,this.Gci=0,this.qzt=void 0,this.Xci=void 0,this.rdi=0,this.Qci=0,this.Qst.mn(Mp.bM,this.hdi),this.Qst.mn(ch.uo,this.LV),this.Qst.mn(ch.jw,this.OV),[4,this.J4t.hr()];case 1:return n.sent(),[2]}})}).call(this)},n.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.hr()];case 1:return n.sent(),[4,t.prototype.kn.call(i)];case 2:return n.sent(),[2]}})}).call(this)},xt(i,[{key:"Sri",get:function(){return this.qci}},{key:"Eri",get:function(){return this.zci}},{key:"pri",get:function(){return this.Gci}},{key:"bri",get:function(){return this.qzt}},{key:"kri",get:function(){return this.Xci}}]),i}(b4);V(),It(),Nt();var x4=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.Ta=function(i,n){var r;return void 0!==Wn(null!=(r=null==i?void 0:i.ads)?r:[],WZ)?ot.reject(new md(gd.CONFIGURATION_ERROR,"THEOads must be enabled in the player configuration.")):t.prototype.Ta.call(this,i,n)},i}(Gb),B4=1/60,O4=function(t){function i(i){var n;return(n=t.call(this,i)||this).Vci=void 0,n.J4t=void 0,n.ldi=void 0,n.vdi=void 0,n.Sdi=!0,n.pdi=!0,n.Pdi=void 0,n.udi=function(t){switch(t.presentationMode){case"native-picture-in-picture":n.ddi();break;case"fullscreen":s1(n.Cd)&&n.ddi()}},n.mdi=function(t){n.ydi()},n.wdi=function(t){n.ydi()},n.xdi=function(){var t=n.eci;void 0!==t?(!t.Bri||n.LP()>=t.Bri)&&(n.Qst.mn(ch._y,n.xdi),n.Kui(function(){return n.i3t()})):n.Qst.mn(ch._y,n.xdi)},n.kdi=function(){n.oa.mn(Mp.TM,n.kdi),n.wci=!1,n.Sci=!1},n.adi(),n}Pt(i,t);var n=i.prototype;return n.adi=function(){this.Qst.zst.wn("presentationmodechange",this.udi)},n.cdi=function(){this.Qst.zst.mn("presentationmodechange",this.udi)},n.ddi=function(){var t=this;if(this.ldi&&!r3(this.ldi)&&this.J4t&&this.eci)return function(t){return j(t,f3)}(this.ldi)?(this.Jui(this.eci,"Cannot play L-shape content ad breaks in this representation"),void this.Kui(function(){return t.i3t()})):void this.fdi(new i3(this.Qst,this.J4t),!1,!1)},n.ix=function(i){i||this.hx||this.qx(),t.prototype.ix.call(this,i)},n.Ta=function(i,n){var r=this;return jt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Ta.call(r,i,n)];case 1:return e.sent(),this.Rui?(this.vdi=this.Rui.backdropDoubleBox,this.fdi(new t3(this.Qst,this.J4t),!1,!0),[2]):[2]}})}).call(this)},n.Bui=function(){this.J4t=new D4(this.Qst,this.Vci,this.oa.Cd)},n.Dui=function(){t.prototype.Dui.call(this),this.Vci=function(){var t=v.createElement("div");return hn(t,"theo-ads-sgai-ad-player"),t}(),this.Uui.appendChild(this.Vci),this.Kai=FZ(this.Vci),this._di()},n._di=function(){gn(this.Fui),function(t){var i=t.style;i.boxSizing="border-box",i.position="relative",i.alignItems="center",i.border="0 solid transparent",i.borderWidth="0px",i.backgroundColor="transparent",i.backgroundRepeat="no-repeat",i.backgroundAttachment="scroll"}(this.Uui),UZ(this.Fui),UZ(this.Vci)},n.Vui=function(){this.gdi(),t.prototype.Vui.call(this),this.Vci&&(Zi(this.Vci),this.Vci=void 0)},n.gdi=function(){VZ(this.Ls),VZ(this.Fui)},n.fdi=function(t,i,n){var r,e=null!=(r=this.ldi)?r:this,s=null!=t?t:this.Qst;J2(e,s),void 0!==this.ldi&&(this.ldi.mr(this.Uui,this.Fui,this.Vci),this.ldi.kn()),null==t||t.gr(this.Uui,this.Fui,this.Vci,e,i),this.ldi=t,n?this.tO(s):this.h3t(s)},n.E3t=function(){return this.J4t},n.qx=function(){var i;t.prototype.qx.call(this),null==(i=this.J4t)||i.qx()},n.OP=function(i,n){this.pdi=!0,t.prototype.OP.call(this,i,n)},n.Noi=function(t){var i,n;return t+(null!=(n=null==(i=this.J4t)?void 0:i.pri)?n:0)},n.Gui=function(){var i;t.prototype.Gui.call(this),null==(i=this.J4t)||i.wn(ch._y,this.mdi),this.Qst.wn(ch.qw,this.wdi)},n.Qui=function(){var i;t.prototype.Qui.call(this),null==(i=this.J4t)||i.mn(ch._y,this.mdi),this.Qst.mn(ch.qw,this.wdi)},n.ydi=function(){this.cci(this.LP()),this.Adi()},n.Adi=function(){var t;if(!(this.mci()||r3(this.ldi)||(null==(t=this.ldi)?void 0:t.yri()))){var i=A.min(this.J4t.Nd(),this.eci.ct)-this.J4t.LP(),n=this.bdi(i);if(void 0!==n&&!(this.Qst.LP()>n-.75)){var r=OA.jn(this.J4t.RP()),e=this.J4t.Tx();if(0!==e.length){var s=A.min(e.end(e.length-1),this.eci.Bri);r.CM().Cr(s)&&!this.Qst.kx&&(this.Qst.hx&&(this.Qst.Gx(),this.Qst.$P=!0),this.Qst.OP(n,{gOt:!0}))}}}},n.bdi=function(t){var i,n=this.Qst.Tx(),r=null==(i=this.eci)?void 0:i.Bri;if(0!==n.length&&void 0!==r){var e=n.start(0),s=n.end(n.length-1),u=r-t;if((u=16&&Oi.Q_<18&&(null==(i=this.Qoi)?void 0:i.uhi)!==N3.COMPANION&&(null==(s=this.J4t)||s.OP(this.J4t.LP()));this.fdi(o,this.Sci,!1),Oi.zv&&!o.yri()&&(null==(n=this.Qoi)?void 0:n.uhi)!==N3.COMPANION&&(VZ(this.Fui),ln(this.Fui)),this.Iui.So(new w3(t).Ca),this.Sdi=(null==(r=this.Qoi)?void 0:r.uhi)===N3.COMPANION,null==(e=this.Qoi)||e.Nhi(this.LP())},n.pci=function(i,n){var r=!1;if(this.mci()){var e,s;if(!(null==(e=this.Qoi)?void 0:e.Dhi()))return!1;var u=null==(s=this.J4t)?void 0:s.RP();if(u&&u.length>0){var o=u.end(u.length-1);o-=this.J4t.Sri,r=A.min(this.J4t.Nd(),this.eci.ct)-5.499)t=2*A.atan2(r,u),i=A.PI/2,n=0;else if(o<-.499)t=-2*A.atan2(r,u),i=-A.PI/2,n=0;else{var h=r*r,a=e*e,c=s*s;t=A.atan2(2*e*u-2*r*s,1-2*a-2*c),i=A.asin(2*o),n=A.atan2(2*r*u-2*e*s,1-2*h-2*c)}return new K4(t,n,i)},i.tli=function(){var t=A.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return 0===t?(this.x=0,this.y=0,this.z=0,this.w=1):(t=1/t,this.x=this.x*t,this.y=this.y*t,this.z=this.z*t,this.w=this.w*t),this},t}(),K4=function(){function t(t,i,n){this.ali=void 0,this.uli=void 0,this.cli=void 0,this.ali=t||0,this.uli=i||0,this.cli=n||0}var i=t.prototype;return i.qy=function(t,i,n){return this.ali=t,this.uli=i,this.cli=n,this},i.Ift=function(t){return this.qy(t.ali,t.uli,t.cli)},i.lO=function(t){return this.ali+=t.ali,this.uli+=t.uli,this.cli+=t.cli,this},i.lF=function(t){return this.ali-=t.ali,this.uli-=t.uli,this.cli-=t.cli,this},i.dli=function(){var t=this.ali,i=this.cli,n=this.uli,r=A.cos(t/2),e=A.cos(i/2),s=A.cos(n/2),u=A.sin(t/2),o=A.sin(i/2),h=A.sin(n/2),a=r*e,c=u*o;return new $4(a*h+c*s,u*e*s+r*o*h,r*o*s-u*e*h,a*s-c*h)},t}();V(),It();var J4=["lli","Eot","fli","error"];V(),It();var Z4=function(t){return t.Os="unavailable",t.vli="available",t.Ya="presenting",t}({});V(),It();var t5=function(){function t(t,i){var n=this;this.xli=void 0,this.Ls=void 0,this.We=!1,this.Cli=new Q4,this.Dli=new Q4,this.Ili=new Q4,this.kli=!1,this._li=function(t){n.Cli.qy(t.clientX,t.clientY),n.kli=!0,t.preventDefault(),t.stopPropagation()},this.gli=function(t){t.touches&&1===t.touches.length&&(n.Cli.qy(t.touches[0].pageX,t.touches[0].pageY),n.kli=!0,t.preventDefault())},this.cr=function(t){if(n.kli||n.Rli()){if(n.Rli()){var i=t.movementX||t.mozMovementX||0,r=t.movementY||t.mozMovementY||0;n.Dli.qy(n.Cli.x-i,n.Cli.y-r)}else n.Dli.qy(t.clientX,t.clientY);n.Ili.$di(n.Dli,n.Cli),n.Cli.Ift(n.Dli),n.Eli()}},this.mli=function(t){n.kli&&(n.Dli.qy(t.touches[0].pageX,t.touches[0].pageY),n.Ili.$di(n.Dli,n.Cli),n.Cli.Ift(n.Dli),n.Eli())},this.wli=function(){n.Tli()},this.yli=function(){n.Tli()},this.Sli=function(){n.Tli()},this.xli=t,this.Ls=i}var i=t.prototype;return i.jU=function(){this.We||(this.We=!0,this.Ls.addEventListener("mousedown",this._li),this.Ls.addEventListener("touchstart",this.gli),f.addEventListener("mousemove",this.cr),f.addEventListener("touchmove",this.mli),f.addEventListener("mouseup",this.wli),f.addEventListener("touchend",this.yli),this.Ali(f))},i.QU=function(){this.We&&(this.We=!1,this.Ls.removeEventListener("mousedown",this._li),this.Ls.removeEventListener("touchstart",this.gli),f.removeEventListener("mousemove",this.cr),f.removeEventListener("touchmove",this.mli),f.removeEventListener("mouseup",this.wli),f.removeEventListener("touchend",this.yli),this.bli(f))},i.Ali=function(t){if(function(t){try{return Boolean(t)&&t===t.top}catch(t){return!1}}(t));else if(mn(t))try{t.parent.addEventListener("mouseup",this.wli),this.Ali(t.parent)}catch(i){t.document.documentElement.addEventListener("mouseleave",this.Sli)}},i.bli=function(t){if(t.document.documentElement.removeEventListener("mouseleave",this.Sli),mn(t))try{t.parent.removeEventListener("mouseup",this.wli),this.bli(t.parent)}catch(t){}},i.Tli=function(){this.kli=!1},i.Eli=function(){var t=this.xli.Pli;t.yaw+=2*A.PI*this.Ili.x*.4/this.Ls.clientWidth,t.pitch+=2*A.PI*this.Ili.y*.5/this.Ls.clientHeight,t.pitch=Cn(t.pitch,-A.PI/2,A.PI/2),this.xli.Pli=t},i.Rli=function(){return(v.pointerLockElement||v.mozPointerLockElement||v.webkitPointerLockElement)===this.Ls},i.kn=function(){this.QU()},t}();V(),It(),Nt();var i5=function(t){function i(){return t.call(this,"fli")||this}return Pt(i,t),i.prototype.xa=function(){return new n5},i}(Ig),n5=function(t){function i(){return t.call(this,"stereochange")||this}return Pt(i,t),i}(ah);V(),It();var r5=function(){function t(){this.iZ=[0,0,0,1],this.Mli=[]}var i=t.prototype;return i.Bli=function(t){var i;(i=t).clearColor.apply(i,[].concat(this.iZ)),t.clear(t.COLOR_BUFFER_BIT)},i.Nli=function(t,i){t.clearDepth(1),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),t.clear(t.DEPTH_BUFFER_BIT),this.Mli.forEach(function(n){n.Nli(t,i)})},i.Lli=function(t){this.Mli.push(t)},i.Oli=function(){this.Mli=[]},t}();V(),It(),Nt(),V(),It(),V(),It(),Nt();var e5=function(){function t(t,i,n,r,e){this.Uli=void 0,this.$y=void 0,this.Vli=void 0,this.Vp=void 0,this.Hli=void 0,this.Wli=void 0,this.uc=void 0,this.Uli=t,this.$y=this.Fli(t,i,n),this.Vli=r,this.Vp=e,this.Hli=!1,this.Wli=0,this.uc=0}return t.prototype.Fli=function(t,i,n){var r=t.createBuffer();return null===r?(Qe("Failed to create buffer."),null):(t.bindBuffer(i,r),t.bufferData(i,n,t.STATIC_DRAW),r)},t}(),s5=function(t){function i(i,n,r){return t.call(this,i,i.ARRAY_BUFFER,n,r,i.FLOAT)||this}Pt(i,t);var n=i.prototype;return n.jU=function(t){if(null!==this.$y)if(null!==t){var i=this.Uli;i.bindBuffer(i.ARRAY_BUFFER,this.$y),i.vertexAttribPointer(t,this.Vli,this.Vp,this.Hli,this.Wli,this.uc),i.enableVertexAttribArray(t)}else Qe("Attempted to enable attribute without location.");else Qe("Attempted to enable buffer that failed to initialize.")},n.QU=function(t){t&&this.Uli.disableVertexAttribArray(t)},i}(e5);var u5=function(t){function i(i,n){var r;return(r=t.call(this,i,i.ELEMENT_ARRAY_BUFFER,n,1,i.UNSIGNED_SHORT)||this).zli=void 0,r.zli=n.length,r}return Pt(i,t),i.prototype.qli=function(){var t=this.Uli;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.$y),t.drawElements(t.TRIANGLES,this.zli,this.Vp,this.uc)},i}(e5);V(),It();var o5=function(t){return t.VertexPos="aVertexPosition",t.VertexUV="aVertexUV",t.VertexColor="aVertexColor",t}({}),h5=function(t){return t.ProjectionMat="uProjectionMatrix",t.ModelViewMat="uModelViewMatrix",t.Texture="uTexture",t}({}),a5=function(t){return t.Normal="vNormal",t.Color="vColor",t.UV="vUV",t}({}),c5=function(){function t(t,i,n){this.Qli=void 0,this.Uli=void 0,this.Uli=t,this.Qli=this.Gli(this.Uli,i,n)}var i=t.prototype;return i.Gli=function(t,i,n){var r=this.Xli(t,t.VERTEX_SHADER,i),e=this.Xli(t,t.FRAGMENT_SHADER,n);if(null===r||null===e)return Qe("Failed to create vertex or fragment shader."),null;var s=t.createProgram();return null===s?(Qe("Failed to create shader program"),null):(t.attachShader(s,r),t.attachShader(s,e),t.linkProgram(s),t.getProgramParameter(s,t.LINK_STATUS)?s:(Qe("Failed to initialize shader program"),null))},i.Xli=function(t,i,n){var r=t.createShader(i);if(null===r)return Qe("failed to create shader."),null;if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS)){var e=t.getShaderInfoLog(r);return Qe("Failed to compile shader with error: "+e),t.deleteShader(r),null}return r},i.jli=function(){return this.Qli},i.Kli=function(t){var i=this.Qli;if(null===i)return Qe("Attempted to retrieve attribute location when shader program was not initialized"),null;var n=this.Uli.getAttribLocation(i,t);return-1===n?null:n},i.Yli=function(t){var i=this.Qli;if(null===i)return Qe("Attempted to retrieve uniform location when shader program was not initialized"),null;var n=this.Uli.getUniformLocation(i,t);return null===n&&Ye("Attempted to retrieve nonexistent uniform: "+t),n},t}(),f5=function(){function t(t,i,n){this.Zli=void 0,this.$li=void 0,this.tfi=void 0,this.Zli=t,this.$li=i,this.tfi=n}var i=t.prototype;return i.Jli=function(){var t,i=this.Zli.length,n=(t=A).max.apply(t,[].concat(this.$li));return n>=i?(Ye("Created geometry where largest index ("+n+") is larger than/equal to attribute array size ("+i+")"),!1):(n0)&&c.push(E,I,C),(T!==r-1||a0&&(n.Uvi-=1)),null!==e&&void 0!==i){n.Evi=e.requestAnimationFrame(n.Ivi);var s=e.renderState.baseLayer,u=i.getViewerPose(n.Xvi);if(void 0!==s&&void 0!==u){r.bindFramebuffer(r.FRAMEBUFFER,s.framebuffer);for(var o,h=new K4,a=0,c=Ft(u.views);!(o=c()).done;){var f=o.value,v=new R5(f.eye);if(v.Tfi=f.projectionMatrix,n.Bvi()){var d=void 0;if(Oi.Ks&&Oi.u_&&null===n.Nvi){if(0===(d=f.transform.inverse.orientation).x&&0===d.y&&0===d.z&&1===d.w)return}else d=f.transform.orientation;v.Efi=new $4(d.x,d.y,d.z,d.w)}n.mvi&&v.Vfi(n.Kvi.oli()),h=h.lO(v.Efi.oli()),a+=1;var l=s.getViewport(f);l&&r.viewport(l.x,l.y,l.width,l.height),n.hvi.Nli(r,v)}var g=new K4(h.ali/a,h.uli/a,h.cli);n.Qvi=g.dli(),function(t,i){var n=t.sli(i);return 1-n*n=2},n.ABt=function(t,i){this.So(new Ib(new md(i,t)))},n.$vi=function(){var t=this.oa.nu();return t&&t.vr},n.kn=function(){this.rV.Zg(),this.vvi(),this.Vo(),this.Qfi&&(Zi(this.Qfi),this.Qfi=void 0),this.Uli=void 0,this.Kfi&&(this.Kfi.kn(),this.Kfi=void 0),this.oa=void 0},xt(i,[{key:"Hvi",get:function(){return this.Wvi},set:function(t){var i=this.Ylt;this.Wvi=t,this.Ylt!==i&&this.So(new R1)}},{key:"tvi",get:function(){return this.evi!==ZS.NONE}},{key:"evi",get:function(){return this.qvi},set:function(t){var i=this.Ylt;this.qvi=t,this.Ylt!==i&&this.So(new R1)}},{key:"Zfi",get:function(){return this.zvi},set:function(t){var i=this.zvi;this.zvi=t,this.zvi!==i&&this.So(new R1)}},{key:"Gvi",get:function(){return this.Zfi}},{key:"xvi",get:function(){return this.bvi||this.mvi}},{key:"bvi",get:function(){return this.Nvi},set:function(t){var i=this.Ylt;this.Nvi=t,this.Ylt!==i&&this.So(new R1)}},{key:"Xvi",get:function(){return this.Svi||this.wvi}},{key:"jvi",get:function(){var t=this.Qvi.oli();return{yaw:t.ali*G4,pitch:t.uli*G4,roll:t.cli*G4}},set:function(t){var i=x5(t&&t.pitch||0)*X4,n=x5(t&&t.roll||0)*X4,r=x5(t&&t.yaw||0)*X4,e=new K4(r,i,n),s=this.Qvi.oli(),u=this.Kvi.oli();this.Qvi=e.dli(),this.Kvi=e.lF(s).lO(u).dli()}},{key:"Pli",get:function(){var t=this.Kvi.oli();return{yaw:t.ali,pitch:t.uli,roll:t.cli}},set:function(t){var i=B5(t&&t.pitch||0),n=B5(t&&t.roll||0),r=B5(t&&t.yaw||0),e=new K4(r,i,n);this.Kvi=e.dli()}},{key:"Ylt",get:function(){return this.Hvi?this.bvi?Z4.Ya:Z4.vli:Z4.Os}},{key:"Yvi",get:function(){return null!==this.bvi},set:function(t){var i=this.Yvi;t&&this.Zfi?this.Avi():this.gvi(),this.Yvi!==i&&this.So(new i5)}},{key:"Jvi",get:function(){return this.Mvi},set:function(t){null===this.Nvi&&(this.Mvi=t,t&&Oi.ru&&this.Ovi())}},{key:"Zvi",get:function(){return this.xfi},set:function(t){t&&t>=0&&t<=180&&(this.xfi=t,null!==this.mvi&&this.mvi.updateRenderState({inlineVerticalFieldOfView:this.xfi*X4}))}}]),i}(uh);function x5(t){return Dn(t+180,360)-180}function B5(t){return Dn(t+A.PI,2*A.PI)-A.PI}function O5(t,i){return"function"==typeof t.getAll?M5(void 0===i?t.getAll():t.getAll(i)):function(t){var i=new Xa,n=[];return t.onsuccess=function(){var r=t.result;r&&r.value?(n.push(r.value),r.continue()):i.Xy(n),ht()},t.onerror=function(){i.jy(t.error),ht()},i.Qy}(void 0===i?t.openCursor():t.openCursor(i))}function M5(t){return new ot(function(i,n){t.onsuccess=function(){i(t.result),ht()},t.onerror=function(){n(t.error),ht()}})}$b(function(t){return function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).xli=void 0,r.xli=new D5(r),r}Pt(i,t);var n=i.prototype;return n.xa=function(){return jg(t.prototype.xa.call(this),{vr:this.xli.Ca})},n.kn=function(){this.xli.kn(),t.prototype.kn.call(this)},i}(t)},Qb.lu),V(),It(),V(),It(),V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Yt(),V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It(),Wt(),Yt(),Et();var L5=function(){function t(t){var i=this;this.uPt=void 0,this.Qy=void 0,this.ro=void 0,this.uPt=t,this.ro=!0,this.Qy=new ot(function(t,n){i.uPt.oncomplete=function(){i.ro=!1,t(),ht()},i.uPt.onerror=function(){i.ro&&(i.ro=!1,n(i.uPt.error||new p("Transaction error")),ht())},i.uPt.onabort=function(){i.ro=!1,n(new p("Transaction aborted")),ht()}})}return t.prototype.Zg=function(){if(this.ro)try{this.uPt.abort(),this.ro=!1}catch(t){}},t}();function F5(t,i,n){return jt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:r=new L5(t),u.label=1;case 1:return u.trys.push([1,3,4,5]),[4,ot.all([i(n),r.Qy])];case 2:return e=u.sent(),[2,e[0]];case 3:if(s=u.sent(),!r.ro)throw new H1("IDBTransaction committed prematurely",s);throw s;case 4:return r.Zg(),[7];case 5:return[2]}})})()}var U5=function(){function t(t,i){this.pE=void 0,this.n_i=void 0,this.pE=t,this.n_i=i}var i=t.prototype;return i.ZEt=function(t){return ot.resolve("persistent"===t)},i.zSt=function(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?ot.reject(UH(i)):M5(this.s_i(VH.gPt).put(t))},i.$Et=function(t,i){return void 0===i&&(i="persistent"),jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:if("persistent"!==i)return[2,ot.reject(UH(i))];n=Ft(t),s.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,[4,this.zSt(e,i)]);case 2:s.sent(),s.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},i.Hy=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.Wy(t)];case 1:return[2,Boolean.apply(void 0,[i.sent()])]}})}).call(this)},i.Wy=function(t){return M5(this.s_i(VH._Pt).get(t))},i.tPt=function(t,i){return M5(this.s_i(VH._Pt).index(i).get(t))},i.jEt=function(t){return jt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:i=[],n=Ft(t),u.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,[4,this.Wy(e)]);case 2:(s=u.sent())&&i.push(s),u.label=3;case 3:return[3,1];case 4:return[2,i]}})}).call(this)},i.iPt=function(){return O5(this.s_i(VH._Pt))},i.ePt=function(t){return O5(this.s_i(VH._Pt),t)},i.sPt=function(t,i){return O5(this.s_i(VH._Pt).index(i),t)},i._S=function(t){return M5(this.s_i(VH.gPt).delete(t))},i.nPt=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:i=Ft(t),e.label=1;case 1:return(n=i()).done?[3,4]:(r=n.value,[4,this._S(r)]);case 2:e.sent(),e.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},i.rPt=function(){return M5(this.s_i(VH.gPt).clear())},i.s_i=function(t){if(!this.n_i)throw new p("Lock was released");if(!function(t,i){return t===VH._Pt&&i===VH._Pt||i===VH.gPt}(t,this.n_i.mode))throw new p("Incompatible transaction mode: "+this.n_i.mode+", expected "+t);return this.n_i.objectStore(this.l)},i.r_i=function(){this.pE.h_i(this),this.n_i=void 0},xt(t,[{key:"l",get:function(){return this.pE.l}}]),t}();var V5=function(){function t(t,i){this.u_i=void 0,this.l=void 0,this.LPt=void 0,this.ta=new Sd,this.u_i=t,this.l=i}var i=t.prototype;return i.ZEt=function(t){return ot.resolve("persistent"===t)},i.zSt=function(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?ot.reject(UH(i)):this.uPt(VH.gPt,function(i){return i.zSt(t)})},i.$Et=function(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?ot.reject(UH(i)):this.uPt(VH.gPt,function(i){return i.$Et(t)})},i.Hy=function(t){return this.uPt(VH._Pt,function(i){return i.Hy(t)})},i.Wy=function(t){return this.uPt(VH._Pt,function(i){return i.Wy(t)})},i.tPt=function(t,i){return this.uPt(VH._Pt,function(n){return n.tPt(t,i)})},i.jEt=function(t){return this.uPt(VH._Pt,function(i){return i.jEt(t)})},i.iPt=function(){return this.uPt(VH._Pt,function(t){return t.iPt()})},i.ePt=function(t){return this.uPt(VH._Pt,function(i){return i.ePt(t)})},i.sPt=function(t,i){return this.uPt(VH._Pt,function(n){return n.sPt(t,i)})},i._S=function(t){return this.uPt(VH.gPt,function(i){return i._S(t)})},i.nPt=function(t){return this.uPt(VH.gPt,function(i){return i.nPt(t)})},i.rPt=function(){return this.uPt(VH.gPt,function(t){return t.rPt()})},i.QPt=function(t){return this.o_i(),this.LPt=new U5(this,t),this.LPt},i.o_i=function(){if(void 0!==this.LPt)throw new p("Already locked")},i.h_i=function(t){if(this.LPt!==t)throw new p("Incorrect lock");this.LPt=void 0},i.Zo=function(t){return this.ta.Zo(t)},i.uPt=function(t,i){var n=this;return this.Zo(function(){return n.a_i(t,i)})},i.a_i=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:this.o_i(),n=this.u_i.transaction(this.l,t),r=this.QPt(n),e.label=1;case 1:return e.trys.push([1,,3,4]),[4,F5(n,i,r)];case 2:return[2,e.sent()];case 3:return r.r_i(),[7];case 4:return[2]}})}).call(this)},i.c_i=function(t){this.o_i();var i=this.u_i.transaction(this.l,t);return this.QPt(i)},t.d_i=function(t,i){var n,r=new ot(function(t){n=t}),e=t.reduce(function(t,i){return t.then(function(){var t,n=new ot(function(i){t=i});return i.Zo(function(){return t(),r}).catch(yn),n})},ot.resolve());return n(e.then(i)),r},t}();V(),It(),Bt(),V(),It(),Wt(),Yt(),V(),It(),V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Wt(),Yt();var j5={bD:17,l_i:function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){if(i=t.transaction,n=t.database,(r=i.objectStoreNames)&&r.length)for(e=0;e1)throw new p("Only one youbora analytics configuration expected");var n=i[0];n.integration;return g_(n,["integration"])}},i}(t)},Qb.hnt),V(),It(),V(),It(),Nt(),Ut(),V(),It(),Bt(),Nt();var s6=1,u6=0,o6=1e3,h6=function(t){function i(i,n,r,e,s,u){var o;return void 0===e&&(e=MMPlayerState),void 0===s&&(s=MMAdState),void 0===u&&(u=MMPresentationInfo),(o=t.call(this)||this).oa=void 0,o.YS=void 0,o.k_i=void 0,o.q_i=void 0,o.z_i=void 0,o.E_i=void 0,o.G_i=void 0,o.I_i=void 0,o.B_i=void 0,o.C_i=void 0,o.X_i=void 0,o.W_i=void 0,o.yui=void 0,o.Tui=void 0,o.jui=void 0,o.F_i=void 0,o.H_i=void 0,o.U_i=void 0,o.e8=void 0,o.V_i=void 0,o.uvi=void 0,o.GG=void 0,o.YQ=void 0,o.jG=void 0,o.qG=void 0,o.L_i=void 0,o.M_i=void 0,o.oa=i,o.YS=n,o.k_i=r,o.q_i=e,o.z_i=s,o.E_i=u,o.G_i=!0,o.I_i=!1,o.B_i=void 0,o.C_i=void 0,o.X_i=void 0,o.yui=function(t){var i,n=t.Int,r=(n.O0t(),i=n.wnt().duration,"linear"===n.wnt().type);n.F0t(),n.N0t();r&&(o.I_i=!0),o.D_i=o.z_i.AD_IMPRESSION,o.D_i=o.z_i.AD_STARTED},o.Tui=function(t){o.I_i=!1,o.D_i=o.z_i.AD_COMPLETED},o.jui=function(t){t.QJt===QK.ADBLOCK?o.D_i=o.z_i.AD_BLOCKED:o.D_i=o.z_i.AD_ERROR},o.F_i=function(){o.D_i=o.z_i.AD_SKIPPED},o.H_i=function(t){var i,n,r,e;t.qk===cw.Bk&&(o.X_i&&t.BX!==o.X_i&&o.k_i.reportABRSwitch(o.X_i,t.BX),o.X_i=t.BX,o.k_i.reportChunkRequest(new MMChunkInformation(t.$D,t.BX,t.VN,t.uut.Yu,void 0,void 0,null!=(r=null==(i=t.uut.Sat)?void 0:i[0])?r:0,null!=(e=null==(n=t.uut.Sat)?void 0:n[1])?e:-1)))},o.U_i=function(t){o.R_i=o.q_i.STOPPED,o.So(t)},o.e8=function(t){o.R_i=o.q_i.ERROR,o.k_i.reportError(t.error,o.P_i())},o.V_i=function(){o.x_i?o.D_i=o.z_i.AD_PAUSED:o.R_i=o.q_i.PAUSED},o.uvi=function(){o.x_i&&(o.D_i=o.z_i.AD_PLAY)},o.GG=function(){o.x_i?(o.B_i===o.z_i.AD_PAUSED&&(o.D_i=o.z_i.AD_RESUMED),o.D_i=o.z_i.AD_PLAYING):(o.G_i&&(o.G_i=!1,o.S_i(),o.R_i=o.q_i.STARTED),o.R_i!==o.q_i.PAUSED&&o.R_i!==o.q_i.BUFFERING||(o.R_i=o.q_i.RESUMED))},o.YQ=function(){o.k_i.reportPresentationSize(o.oa.Bx,o.oa.Rx)},o.jG=function(t){o.x_i||o.R_i!==o.q_i.PAUSED||o.k_i.reportPlayerSeekCompleted(t.currentTime*o6)},o.qG=function(){o.x_i||(o.R_i=o.q_i.BUFFERING)},o.L_i=function(){o.k_i.reportDownloadRate(A.floor(Pb.Ng.fW()))},o.M_i=function(){o.x_i||o.k_i.reportPlaybackPosition(o.P_i())},o.R_i=o.q_i.INITIALIZED,o.xNt(),o.W_i=o.N_i(),o}Pt(i,t);var n=i.prototype;return n.S_i=function(){var t=this.ct===1/0,i=t?s6:u6,n=t?-1:this.ct,r=nr(this.oa.rt.II,this.T_i);this.k_i.setPresentationInformation(new this.E_i(i,n,r))},n.T_i=function(t){for(var i=t.KI.II,n=[],r=0;r1)throw new p("Only one Moat analytics configuration expected");return i[0]}},i}(t)},Qb.hnt),V(),It(),V(),It(),V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It(),Wt(),Bt(),Ut(),Yt();var v6="theo-dai-clickthrough",d6="urn:google:dai:2018",l6=function(){function t(t,i,n,r,e){var s=this;this.oa=void 0,this.bgi=void 0,this.cai=void 0,this.kgi=void 0,this.Pgi=void 0,this.aui=void 0,this.JW=void 0,this.ZW=void 0,this.m7=new dr,this.Dgi=!1,this.Sgi=!0,this.Rgi=function(t){var i=t.Ht;i.Lt===ep.VU&&(i.Km===Uw.ID3||i.Km===Uw.EVENT_STREAM&&i.ZI===d6)&&(i.Xk=$y.JI,s.aui=i,i.wn(Mg.hI,s.Bgi))},this.Bgi=function(t){t.TO.wn(Xw.zL,s.Ngi)},this.Ngi=function(t){var i,n;if(s.cai)if((null==(i=s.aui)?void 0:i.Km)===Uw.ID3){var r=t.TO.U;"TXXX"===r.id&&s.cai.Pai({TXXX:r.text})}else if((null==(n=s.aui)?void 0:n.Km)===Uw.EVENT_STREAM){var e=t.TO.U;s.cai.xai(d6,e,t.XF)}},this.oa=t,this.cai=i,this.kgi=n,this.bgi=r,this.Pgi=e,n&&i&&this.oa.Jc&&this.oa.Jc.Ent(n.N9t)}var i=t.prototype;return i.OP=function(t){this.m7.Zg(),this.m7=new dr,Er(br(this.gri(t,this.m7.Yg),this.m7))},i.gri=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return yr(i),this.kgi&&this.cai?this.kgi.ynt&&!this.Pgi?[2]:(n=this.oa.LP(),this.Sgi&&(r=this.cai.Rai(t,n))?(this.oa.Egi(r),[4,this.cai.ww(J3.AD_BREAK_ENDED,i)]):[3,2]):[2,this.oa.Egi(t)];case 1:if(e.sent(),this.cai.Iai(t).PO>t)return[2];e.label=2;case 2:return this.oa.Egi(t),[2]}})}).call(this)},i.Tx=function(){var t=this.kgi&&this.kgi.ynt;if(t){var i=OA.jn(this.oa.xgi()),n=t._Ot,r=n+t.p0t,e=new OA([n,r]);return i.Mn(e)._s()}return this.oa.xgi()},i.Xnt=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:if(!t)return[2,this.oa.Igi(t,i)];n=t,s.label=1;case 1:return s.trys.push([1,3,,4]),this.oa.nt.wn(Ng.eI,this.Rgi),[4,this.bgi.Cgi(t,i)];case 2:return n=s.sent(),this.kgi&&this.cai&&(this.Dgi=!0),[3,4];case 3:if(pr(r=s.sent()),r.code===dw.LICENSE_INVALID)return[2];throw e=new md(gd.SOURCE_NOT_SUPPORTED,"Something went wrong while setting up a Google DAI stream.",r),this.JW=ww(e),this.ZW=e,this.oa.So(new Ib(e)),e;case 4:return[4,this.oa.Igi(n,i)];case 5:return s.sent(),[2]}})}).call(this)},i.hr=function(){if(this.Dgi){if(this.oa.nt.mn(Ng.eI,this.Rgi),this.aui){this.aui.mn(Mg.hI,this.Bgi);for(var t,i=Ft(this.aui.L.II);!(t=i()).done;){t.value.mn(Xw.zL,this.Ngi)}this.aui=void 0}this.JW=void 0,this.ZW=void 0,this.m7.Zg(),this.kgi&&this.kgi.hr(),this.cai&&this.cai.hr(),this.Dgi=!1}},i.kn=function(){this.hr(),this.oa.Ogi(),this.cai&&this.cai.kn()},xt(t,[{key:"Ca",get:function(){var t=this,i=this.bgi;return{contentTimeForStreamTime:function(i){return t.cai?t.cai.lai(i):i},streamTimeForContentTime:function(i){return t.cai?t.cai.fai(i):i},replaceAdTagParameters:function(i){t.cai&&t.cai.replaceAdTagParameters(i)},get snapback(){return t.Sgi},set snapback(i){t.Sgi=i},get sourceTransformer(){return i.Tgi},set sourceTransformer(t){i.Tgi=t}}}},{key:"lt",get:function(){return this.JW||this.oa.Mgi()}},{key:"WP",get:function(){return this.ZW||this.oa.Lgi()}}]),t}();V(),It(),Bt(),Nt(),Ut(),V(),It(),Bt(),Nt();var g6=function(t){function i(i,n,r,e){var s;return void 0===e&&(e=!0),(s=t.call(this,r)||this).Ugi=void 0,s.Ugi=e,s.J3t=i,s.Z3t=n,s}return Pt(i,t),xt(i,[{key:"Fgi",get:function(){return this.Ugi}},{key:"MZt",get:function(){return uZ.so}}]),i}(t0),w6=function(t){function i(i,n){var r;return(r=t.call(this,new WI,uZ.so)||this).cai=void 0,r.oa=void 0,r.gai=void 0,r.mai=void 0,r.Hgi=void 0,r.kai=void 0,r.cai=i,r.oa=n,r.gai=function(t){var i=r.G0t;if(i&&r.M0t){var n=t.uai.Dai;r.M0t.v9t=n.MP,function(t,i){var n=i.i7t,r=i.t7t,e=i.MP,s=Mn(t.Jc.slice(0,n-1),function(t){var i;return null!=(i=t.ct)?i:0});t.m0t=r-e-s}(i,n)}},r.mai=function(t){var i=t.uai.Bai;if(i)for(var n,e=Ft(i);!(n=e()).done;){var s=n.value;if(!r.Xgi(s.EO)){var u=s.PO-s.EO,o=new g6(u,u,s.EO,!0);r.X0t.push(o)}}},r.Hgi=function(t){r.qgi(t.type),r.Ggi(t)},r.kai=function(t){r.L9t=!1,r.M0t=void 0;var i=r.ynt;i&&(i.m0t=0,r.zgi(t.type,!1,!1),r.G0t=void 0)},r.Vgi(),r}Pt(i,t);var n=i.prototype;return n.Vgi=function(){var t=[J3.STARTED,J3.FIRST_QUARTILE,J3.MIDPOINT,J3.THIRD_QUARTILE,J3.COMPLETE];this.cai.wn(t,this.Hgi),this.cai.wn(J3.AD_BREAK_ENDED,this.kai),this.cai.wn(J3.AD_PROGRESS,this.gai),this.cai.wn(J3.CUEPOINTS_CHANGED,this.mai)},n.Wgi=function(t){var i=t.V7t._Ot,n=this.G0t||this.findAdBreakWithPredicate(i,function(t){return!t._x});if(!n){var r=t.V7t.p0t;i=this.oa.LP(),(n=new g6(r,r,i,!1)).t4t(),this.X0t.push(n)}return n},n.qgi=function(t){switch(t){case J3.STARTED:this.L9t=!0;break;case J3.AD_BREAK_ENDED:this.L9t=!1}},n.zgi=function(t,i,n){if(i)switch(t){case J3.STARTED:case J3.FIRST_QUARTILE:case J3.MIDPOINT:case J3.THIRD_QUARTILE:case J3.COMPLETE:this.M3t.So(new oO(this.G0t))}if(n)switch(t){case J3.STARTED:case J3.FIRST_QUARTILE:case J3.MIDPOINT:case J3.THIRD_QUARTILE:case J3.COMPLETE:this.M3t.So(new aO(this.M0t,this.M0t.v9t))}switch(t){case J3.COMPLETE:this.M3t.So(new fO(this.M0t,this.B9t.v9t));break;case J3.AD_BREAK_ENDED:this.M3t.So(new sO(this.ynt))}switch(t){case J3.FIRST_QUARTILE:this.M3t.So(new w0(this.M0t,this.B9t.v9t));break;case J3.MIDPOINT:this.M3t.So(new y0(this.M0t,this.B9t.v9t));break;case J3.THIRD_QUARTILE:this.M3t.So(new _0(this.M0t,this.B9t.v9t))}},n.Ggi=function(t){var i=t.Int,n=this.Wgi(i),r=function(t,i){if(t.Jc.length)return!1;for(var n=0;n=t&&s._Ot<=i&&!s._x&&(!n||s._Ot>=n._Ot)&&(n=s)}return n},n.rD=function(){},n.knt=function(t){},n.hr=function(){this.M0t&&(this.M3t.So(new fO(this.M0t,this.M0t.v9t)),this.M0t=void 0),this.G0t&&(this.M3t.So(new sO(this.G0t)),this.G0t=void 0),this.L9t=!1,tr(this.X0t)},n.kn=function(){this.hr(),this.M3t.kn()},n.Snt=function(t){},xt(i,[{key:"G3t",get:function(){return this.L9t}},{key:"M3t",get:function(){return this.s5t}},{key:"jgi",get:function(){var t=this.findAdBreakWithPredicate(0,function(t){return t.Fgi}),i=0;return t&&(i=t.p0t),i}}]),i}($0);V(),It(),Wt(),Ut(),Yt();var m6=function(){function t(t){this.cai=void 0,this.Tgi=void 0,this.cai=t,this.Tgi=function(t){return t}}var i=t.prototype;return i.Cgi=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:for(n=[],r=[],e=Ft(t.sources);!(s=e()).done;)if(nT(u=s.value)){if(!this.cai)continue;n.push(u)}else r.push(u);if(0===n.length)return[2,t];v.label=1;case 1:return void 0!==o||0===n.length?[3,7]:[4,nS.Ng.cz(n,t)];case 2:a=v.sent().Mc,c=a,yr(i),v.label=3;case 3:return v.trys.push([3,5,,6]),[4,this.Kgi(c,i)];case 4:return o=v.sent(),r.push(o),[3,6];case 5:return pr(f=v.sent()),h=f,Yn(n,c),[3,6];case 6:return[3,1];case 7:if(0!==t.sources.length&&0===r.length)throw new p("Fatal: unable to play DAI streams.");return h&&Qe(h.message),[2,io({},t,{sources:r})]}})}).call(this)},i.Kgi=function(t,i){return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(!this.cai)throw new p("Could not find Google\u2019s IMA DAI HTML5 SDK, all DAI sources will be ignored.");return n=this.cai.ww(J3.LOADED,i),r=this.cai.ww(J3.ERROR,i),e=t.type===pA.cR?"dash":"hls",this.cai.AHt(io({},t.ssai,{format:e})),[4,ot.race([n,r])];case 1:return(s=h.sent()).type!==J3.LOADED?[3,5]:(u=t.type===pA.cR?pA.cR:pA.lR,this.Tgi?[4,this.Tgi(s.uai.Yu||"")]:[3,3]);case 2:return o=h.sent(),[3,4];case 3:o=s.uai.Yu,h.label=4;case 4:return[2,AA(io({},t,{src:o,type:u}))];case 5:throw p(s.uai.Nai);case 6:return[2]}})}).call(this)},t}();$b(function(t){return function(i){return function(i){function n(n,r){var e;(e=i.call(this,n,r)||this).Ygi=void 0,e.Jgi=!1,e.Y1t=void 0,e.$gi=void 0,e.Zgi=function(t){13===t.which&&e.Y1t.click(),e.zx()};var s,u,o,h=e.Wx(),a=r.ads.googleIma.useAdUiElementForSsai,c=null!=(s=r.ads.googleIma.allowSeekingForGoogleDai)&&s;try{var f;a?(e.$gi=v.createElement("div"),ln(e.$gi),e.$gi.className="theo-dai-ad-ui"):(e.Y1t=v.createElement("button"),e.Y1t.className=v6),u=t(h,e.Y1t,e.$gi),o=new w6(u,e);var d=null!=(f=e.Y1t)?f:e.$gi;d&&e.xe.appendChild(d),e.Jgi=!0}catch(t){e.Y1t=void 0,e.$gi=void 0}var l=new m6(u);return e.Ygi=new l6(e,u,o,l,c),e.Y1t&&(e.Y1t.addEventListener("keydown",e.Zgi),e.Y1t.addEventListener("click",e.Zgi)),e}Pt(n,i);var r=n.prototype;return r.xa=function(){var t=i.prototype.xa.call(this),n=t.ads;if(n){var r=this.Ygi.Ca;jg(n,{get dai(){return r}})}return t},r.Egi=function(t){i.prototype.OP.call(this,t)},r.OP=function(t,i){this.Ygi.OP(t)},r.xgi=function(){return i.prototype.Tx.call(this)},r.Tx=function(){return this.Ygi.Tx()},r.Ta=function(t){return this.Ygi.hr(),i.prototype.Ta.call(this,t)},r.Igi=function(t,n){var r=this;return jt(function(){return zt(this,function(e){return[2,i.prototype.Xnt.call(r,t,n)]})})()},r.Xnt=function(t,i){return jt(function(){return zt(this,function(n){return[2,this.Ygi.Xnt(t,i)]})}).call(this)},r.Mgi=function(){return i.prototype.HP.call(this)},r.Lgi=function(){return i.prototype.qP.call(this)},r.HP=function(){return this.Ygi.lt},r.qP=function(){return this.Ygi.WP},r.Ogi=function(){i.prototype.kn.call(this)},r.kn=function(){this.Ygi.kn(),this.Y1t&&(Zi(this.Y1t),this.Y1t.removeEventListener("keydown",this.Zgi),this.Y1t.removeEventListener("click",this.Zgi),this.Y1t=void 0),this.$gi&&(Zi(this.$gi),this.$gi=void 0)},xt(n,[{key:"Kl",get:function(){return this.Jgi}}]),n}(i)}}(function(t,i,n){if(!(f.google&&f.google.ima&&Wi(f.google.ima.dai)))throw new p("Could not find Google\u2019s IMA DAI HTML5 SDK, all DAI sources will be ignored.");var r=m4(),e=new google.ima.dai.api.StreamManager(t,n),s=m4();return new v4(e,i,s&&s!==r?s:void 0)}),Qb.rnt),V(),It(),V(),It(),Nt(),Ut(),V(),It(),Bt();var y6=function(){function t(t,i){var n=this;this.oa=void 0,this.rpi=void 0,this.spi=void 0,this.mpi=void 0,this.lpi=void 0,this.wpi=void 0,this.vpi=void 0,this.Ppi=void 0,this.gpi=void 0,this.bpi=void 0,this.ipi=void 0,this.uvi=void 0,this.U_i=void 0,this.qui=void 0,this.hpi=void 0,this.opi=void 0,this.e8=void 0,this.upi=void 0,this.hNt=void 0,this.Spi=void 0,this.oa=t,this.rpi=i,this.mpi=!1,this.lpi=!1,this.wpi=[],this.vpi=-1/0,this.gpi=!1,this.uvi=function(){n.mpi||(n.rpi.xpi(),n.gpi&&n.rpi.Api(),n.mpi=!0)},this.U_i=function(){n.rpi.Ipi(),n.lpi=!0},this.qui=function(){n.vpi0&&(e.Ls.style.cursor="pointer",e.Ls.addEventListener("click",e.Ewi))},e.awi=function(){e.Ls.style.cursor="",e.Ls.removeEventListener("click",e.Ewi)},e.Ewi=function(){e.B9t&&e.B9t.qmi.getRendererController().processEvent({name:tv.freewheel.SDK.EVENT_AD_CLICK})},e.uwi=function(t){switch(t.subType){case tv.freewheel.SDK.EVENT_AD_COMPLETE:e.bwi();break;case tv.freewheel.SDK.EVENT_AD_SKIPPED:e.t2t(),e.bwi()}},e}Pt(i,t);var n=i.prototype;return n.Gmi=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.Xmi=t,this.jmi=i,this.Qmi(t),[4,i];case 1:return n.sent(),this.Kmi(),[2]}})}).call(this)},n.Kmi=function(){this.nwi()},n.Qmi=function(t){t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.rwi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.hwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.owi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION_END,this.awi),t.addEventListener(tv.freewheel.SDK.EVENT_AD,this.uwi)},n.cwi=function(){this.Xmi&&(this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.rwi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.hwi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.owi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION_END,this.awi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_AD,this.uwi))},n.nwi=function(){this.Jmi=this.dwi(this.lwi),this.$mi=this.dwi(this.fwi).concat(this.dwi(this.vwi)),this.ewi=this.dwi(this._wi),this.swi=this.Jmi.concat(this.$mi).concat(this.ewi)},n.dwi=function(t){if(!this.Xmi)return[];var i=this.Xmi.getSlotsByTimePositionClass(t);return this.gwi(i)},n.pwi=function(t){if(this.G0t){var i=t.getSlot().getAdInstances().indexOf(t);-1!==i&&(this.G0t.Wmi=i);var n=this.G0t.Vmi;return n&&(n.qmi=t),n}},n.mwi=function(t){return Wn(this.swi,function(i){return i.Fmi===t})},n.gwi=function(t){return t.map(function(t){var n=t.getTotalDuration(),r=i.wwi(t);return new M6(n,n,r,t)})},n.t2t=function(){var t=this.B9t;t&&this.So(new c0(t,this.Awi()))},n.bwi=function(){var t=this.B9t;t&&(this.So(new fO(t,t.qmi.getPlayheadTime())),this.M0t=void 0)},n.Swi=function(t){var i=this.ynt;i&&(i.m0t=function(t,i,n){void 0===n&&(n=0);for(var r=0,e=t.Jc.length,s=i;s=0)(i=t).push.apply(i,[].concat(this.G0t.Jc.slice(n+1)))}for(var r,e=Ft(this.swi);!(r=e()).done;){var s,u=r.value;(s=t).push.apply(s,[].concat(u.Jc))}return t}},{key:"bnt",get:function(){return this.swi}}]),i}(hh);V(),It(),Bt(),Nt(),Ut();var V6=function(t){function i(i,n,r,e){var s;return(s=t.call(this)||this).oa=void 0,s.sc=void 0,s.uyt=void 0,s.Q1t=void 0,s.N4=void 0,s.npt=void 0,s.kz=void 0,s.ib=void 0,s.WA=void 0,s.Lwi=void 0,s.Z4=void 0,s.t5=void 0,s.bz=void 0,s.Vwi=void 0,s.Uwi=void 0,s.Iwi=void 0,s.Cwi=void 0,s.Hwi=void 0,s.vm=void 0,s.Dwi=void 0,s.Bwi=void 0,s.Nwi=void 0,s.Ed=void 0,s.Rwi=void 0,s.oa=i,s.sc=n,s.uyt=r,s.Q1t=e,s.N4=OA.iL()._s(),s.kz=!0,s.WA=NaN,s.Lwi=!1,s.Z4=!1,s.t5=Up.VL,s.bz=0,s.Uwi=0,s.Iwi=function(t){switch(t.subType){case tv.freewheel.SDK.EVENT_AD_PAUSE:(function(t){if(!t)return!0;var i=t.qmi,n=i.getPlayheadTime(),r=i.getDuration();return n>=r||Nn(r,n)})(s.uyt.B9t)||(s.hx=!0,s.So(new pT(s.MP)));break;case tv.freewheel.SDK.EVENT_AD_RESUME:s.hx=!1,s.So(new qp(s.MP));break;case tv.freewheel.SDK.EVENT_AD_VOLUME_CHANGE:if(s.npt){var i=s.npt.getAdVolume();0===i?s.Lwi=!0:s.ib=i,s.So(new ET(s.MP,s.Mx))}}},s.Cwi=function(){s.UP=!1;var t=s.hx;if(s.hx=!1,t&&(s.So(new _T(s.MP)),s.So(new qp(s.MP))),s.t5=Up.WL,s.MP=0,s.uyt.B9t){var i=s.uyt.B9t.qmi;s.WA=i.getDuration(),s.So(new kT(s.WA)),s.Vwi=m(function(){if(s.Dhi){s.uyt.Swi(s.MP);var t=i.getPlayheadTime();Pn(t,s.Uwi,.001)||s.So(new Eg(t,void 0)),s.Uwi=t}else s.vm()},250),s.npt&&s.npt.setAdVolume(j6(s.$P,s.Mx))}},s.Hwi=function(){var t=s.uyt.B9t;t&&(t.l4t===n0.a4t?s.oa.zx():s.hx||s.zx())},s.vm=function(){y(s.Vwi),s.Vwi=void 0},s.Dwi=function(){s.vm(),s.UP=!0},s.Bwi=function(){s.Fwi("pause")},s.Nwi=function(){s.Fwi("playing")},s.Ed=function(t){t.od.l4t===n0.hZt&&(s.hx=!1)},s.Rwi=function(){s.npt&&s.npt.resize(s.sc.Eu,s.sc.Iu)},s.ib=i.Mx,r.wn("Dnt",s.Ed),s.sc.wn(_I.yn,s.Rwi),s.Q1t.addEventListener("click",s.Hwi),s}Pt(i,t);var n=i.prototype;return n.Pwi=function(){this.npt&&this.npt.setAdVolume(j6(this.$P,this.Mx))},n.xwi=function(t){this.npt=t,this.Qmi(t)},n.Qmi=function(t){t.addEventListener(tv.freewheel.SDK.EVENT_AD,this.Iwi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.Rwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.Cwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_COMPLETE,this.Dwi),t.addEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_PAUSE_REQUEST,this.Bwi),t.addEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_RESUME_REQUEST,this.Nwi)},n.Mwi=function(){var t=this.npt;t&&(t.removeEventListener(tv.freewheel.SDK.EVENT_AD,this.Iwi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.Rwi),t.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.Cwi),t.removeEventListener(tv.freewheel.SDK.EVENT_AD_COMPLETE,this.Dwi),t.removeEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_PAUSE_REQUEST,this.Bwi),t.removeEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_RESUME_REQUEST,this.Nwi))},n.Gx=function(){this.uyt.ynt&&(this.uyt.ynt.Fmi.resume(),this.hx=!1)},n.zx=function(){this.uyt.ynt&&(this.uyt.ynt.Fmi.pause(),this.hx=!0)},n.Fwi=function(t){var n=i.Owi(t);this.npt&&n&&this.npt.setVideoState(n)},n.rD=function(){var t=this.uyt.B9t;t&&t.qmi.skip()},n.hr=function(){if(this.Mwi(),this.npt){this.Fwi("stop"),this.npt.setVideoState(tv.freewheel.SDK.VIDEO_STATE_STOPPED);for(var t,i=Ft(this.npt.getTemporalSlots());!(t=i()).done;){t.value.stop()}this.npt.dispose(),this.npt=void 0}this.WA=NaN,this.UP=!1,this.t5=Up.VL,this.MP=0,this.Uwi=0,this.hx=!0,void 0!==this.Vwi&&(y(this.Vwi),this.Vwi=void 0)},n.kn=function(){this.hr(),this.Vo(),this.uyt.mn("Dnt",this.Ed),this.sc.mn(_I.yn,this.Rwi),this.Q1t.removeEventListener("click",this.Hwi)},i.Owi=function(t){switch(t){case"pause":return tv.freewheel.SDK.VIDEO_STATE_PAUSED;case"playing":return tv.freewheel.SDK.VIDEO_STATE_PLAYING;case"ended":return tv.freewheel.SDK.VIDEO_STATE_COMPLETED;case"stop":return tv.freewheel.SDK.VIDEO_STATE_STOPPED}},xt(i,[{key:"MP",get:function(){var t=this.uyt.B9t;return t&&(this.MP=t.qmi.getPlayheadTime()),this.bz},set:function(t){this.bz=t}},{key:"ct",get:function(){return this.WA}},{key:"Dhi",get:function(){return!!this.uyt&&void 0!==this.uyt.ynt}},{key:"hx",get:function(){return this.kz},set:function(t){this.kz=t}},{key:"Mx",get:function(){return this.ib},set:function(t){this.npt&&this.npt.setAdVolume(t),this.ib=t}},{key:"$P",get:function(){return this.npt&&(this.Lwi=0===this.npt.getAdVolume()),this.Lwi},set:function(t){this.npt&&this.npt.setAdVolume(j6(t,this.Mx)),this.Lwi=t}},{key:"Sx",get:function(){return this.N4}},{key:"UP",get:function(){return this.Z4},set:function(t){this.Z4=t}},{key:"Ax",get:function(){return this.t5}}]),i}(hh);function j6(t,i){return t?0:i}V(),It(),Wt(),Ut(),Yt(),V(),It(),Bt(),Nt();var H6=function(t){function i(){return t.call(this,"A FreeWheel Ad Error occurred")||this}return Pt(i,t),xt(i,[{key:"name",get:function(){return D6.gmi}}]),i}(gr);V(),It(),Bt(),Nt();var W6=function(t){function i(){return t.call(this,"A FreeWheel Reset Error Occurred")||this}return Pt(i,t),xt(i,[{key:"name",get:function(){return D6._mi}}]),i}(gr),z6=0;function q6(){return"cue-"+ ++z6}var X6=function(){function t(t,i,n,r){var e=this;this.npt=void 0,this.zwi=void 0,this.Gwi=void 0,this.npt=i,this.Gwi=function(t){e.npt.removeEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,e.Gwi),t.success?e.zwi.Xy(void 0):e.zwi.jy(new H6)},this.Wwi(t,n,r),i.addEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Gwi),this.zwi=new Xa}var i=t.prototype;return i.Wwi=function(t,i,n){t.setNetwork(i.networkId),t.setServer(i.adServerUrl);var r=this.npt;if(r.setProfile(i.profile),i.assetId&&i.assetDuration&&r.setVideoAsset(i.assetId,i.assetDuration),i.siteSectionId&&r.setSiteSection(i.siteSectionId),r.registerVideoDisplayBase(n),i.cuePoints&&i.cuePoints.length)for(var e,s=Ft(i.cuePoints);!(e=s()).done;){var u=e.value;r.addTemporalSlot(q6(),u.adUnit,u.timeOffset)}var o=i.customData;if(Wi(o))for(var h,a=Ft(b.keys(o));!(h=a()).done;){var c=h.value,f=o[c];r.addKeyValue(c,f)}},i.qwi=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.npt.submitRequest(),[4,this.zwi.Qy];case 1:return t.sent(),[2]}})}).call(this)},i.hr=function(){this.npt.removeEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Gwi),this.zwi.jy(new W6)},t}();V(),It(),Wt(),Ut(),Yt(),V(),It(),Bt();var G6=function(){function t(t){var i=this;this.Xmi=void 0,this.Jg=void 0,this.hwi=void 0,this.P7t=void 0,this.Xmi=t,this.hwi=function(t){i.Xwi(),i.Jg.Xy(void 0)},this.P7t=function(t){i.Xwi(),i.Jg.jy(new H6)},this.Jg=new Xa,t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.hwi),t.addEventListener(tv.freewheel.SDK.EVENT_ERROR,this.P7t)}var i=t.prototype;return i.Xwi=function(){this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.hwi),this.Xmi.removeEventListener(tv.freewheel.SDK.EVENT_ERROR,this.hwi)},i.WHt=function(){this.Xwi(),this.Jg.jy(new W6)},xt(t,[{key:"jwi",get:function(){return this.Jg.Qy}}]),t}(),Q6=function(){function t(t,i){var n=this;this.oa=void 0,this.Kwi=void 0,this.NNt=void 0,this.Ywi=void 0,this.Xmi=void 0,this.Jwi=void 0,this.oa=t,this.Kwi=i,this.NNt=0,this.Jwi=function(){for(var t,i=n.oa.LP(),r=Ft(n.Kwi.Zmi);!(t=r()).done;){var e=t.value,s=new OA([n.NNt,i],[!0,!0]),u=e.Fmi.getTimePosition();if(s.Cr(u))switch(e.Fmi.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL:n.Qwi([e]);break;case tv.freewheel.SDK.TIME_POSITION_CLASS_OVERLAY:e.Fmi.play(),e.Fmi.setVisible(!0)}}n.NNt=i},t.wn(ch._y,this.Jwi)}var i=t.prototype;return i.aO=function(t){this.Xmi=t},i.Lmi=function(){return this.Qwi(this.Kwi.Ymi)},i.Imi=function(){this.Qwi(this.Kwi.iwi)},i.Qwi=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(!this.Xmi)return[2];r.label=1;case 1:if(!(t.length>0))return[3,6];this.Ywi=new G6(this.Xmi),i=this.Ywi.jwi,(n=this.Kwi.ynt)&&n.l4t===n0.a4t&&n.Fmi.stop(),t.shift().Fmi.play(),r.label=2;case 2:return r.trys.push([2,,4,5]),[4,i];case 3:return r.sent(),[3,5];case 4:return this.Ywi=void 0,[7];case 5:return[3,1];case 6:return[2]}})}).call(this)},i.hr=function(){this.Ywi&&(this.Ywi.WHt(),this.Ywi=void 0),this.NNt=0},i.kn=function(){this.oa.mn(ch._y,this.Jwi)},t}(),Y6=0,$6=function(t){function i(n,r,e){var s;return(s=t.call(this)||this).oa=void 0,s._T=void 0,s.Zwi=void 0,s.$wi=void 0,s.syi=void 0,s.Q1t=void 0,s.A7t=void 0,s.iyi=void 0,s.tyi=void 0,s.LZt=void 0,s.eyi=void 0,s.oa=n,s._T=r,s.eyi=!1,s.$wi=i.createUniqueDisplayBaseId(),s.Q1t=i.nyi(n.xe,r,s.$wi),s.Zwi=new f.tv.freewheel.SDK.AdManager,s.syi=new U6(s.Q1t,s._T),s.tyi=new Q6(s.oa,s.Tmi),s.au(s.Tmi),s.A7t=new V6(n,e,s.Tmi,s.Q1t),s}Pt(i,t);var n=i.prototype;return n.C6t=function(){return jt(function(){var t,i,n,r;return zt(this,function(e){switch(e.label){case 0:if(!this.LZt)throw new p("Invalid state");t=this.Zwi,(i=t.newContext()).setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_VIDEO_DISPLAY_CONTROLS_WHEN_PAUSE,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL),i.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_CONTENT_VIDEO_ENABLED,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL),n=new X6(t,i,this.LZt,this.$wi),r=this.Tmi.Gmi(i,n.qwi()),this.tyi.aO(i),this.Emi.xwi(i),this.iyi=n,e.label=1;case 1:return e.trys.push([1,,3,4]),[4,r];case 2:return e.sent(),[3,4];case 3:return this.Emi.Pwi(),this.eyi=!0,[7];case 4:return[2]}})}).call(this)},n.F3t=function(t){this.Emi.Fwi(t.type)},n.be=function(){this.Q1t.style.display="block",this._T.style.display="block"},n.we=function(){this.Q1t.style.display="none",this._T.style.display="none"},n.K9t=function(t){this.LZt=t},n.hr=function(){this.eyi=!1,this.LZt=void 0,this.Tmi.hr(),this.tyi.hr(),this.iyi&&(this.iyi.hr(),this.iyi=void 0),this.Emi.hr(),this._T.src=""},n.kn=function(){this.hr(),this.A7t.kn(),this.tyi.kn(),this.Tmi.kn(),this.Q1t.remove(),Zi(this.Q1t)},i.createUniqueDisplayBaseId=function(){return"theo-freewheel-"+ ++Y6},i.nyi=function(t,i,n){var r=v.createElement("div");return r.id=n,r.className="theo-freewheel",i.classList.add("theo-freewheel-video"),r.appendChild(i),t.appendChild(r),r},xt(i,[{key:"xmi",get:function(){return 0!==this.Tmi.iwi.length}},{key:"Mmi",get:function(){return 0!==this.Tmi.Ymi.length}},{key:"Emi",get:function(){return this.A7t}},{key:"Tmi",get:function(){return this.syi}},{key:"Dmi",get:function(){return this.eyi}},{key:"Rmi",get:function(){return this.tyi}}]),i}(WI);function K6(t){if(f.tv)switch(t){case"preroll":return tv.freewheel.SDK.ADUNIT_PREROLL;case"midroll":return tv.freewheel.SDK.ADUNIT_MIDROLL;case"postroll":return tv.freewheel.SDK.ADUNIT_POSTROLL;case"overlay":return tv.freewheel.SDK.ADUNIT_OVERLAY}}function J6(t,i,n){if(void 0!==i&&E(i)||i<0||i===1/0)return NaN;switch(t){case"preroll":return 0;case"postroll":return n}return yJ(i)}var Z6=function(){function t(){}var i=t.prototype;return i.qz=function(t){return t.integration===CS.FREEWHEEL},i.x3t=function(t,i,n){if(Boolean(f.tv&&f.tv.freewheel&&f.tv.freewheel.SDK&&f.tv.freewheel.SDK.AdManager)){var r=new AB(t.Wu,t.Ql,n,1,[cw.Bk]);r.ust(t.xe);var e=r.Gq(cw.Bk),s=new $6(t,e.$W,t.Wu);return new O6(t,i,r,s,e)}},i.sj=function(t){var i=Hg(t);ji(i.cuePoints)||(i.cuePoints=[]);for(var n,r=[],e=t.assetDuration||0,s=Ft(i.cuePoints);!(n=s()).done;){var u=n.value,o=J6(u.adUnit,u.timeOffset,e),h=K6(u.adUnit);!E(o)&&qi(h)?(u.adUnit=h,u.timeOffset=o,r.push(u)):Vi.um("Invalid adUnit/timeOffset combination. Cue was removed.")}return i.cuePoints=r,i},i.M6=function(t,i,n,r){n.K9t(t,i,r)},xt(t,[{key:"P3t",get:function(){return uZ.H0t}}]),t}();PS.Ng.zz(new Z6),V(),It(),V(),It(),V(),It(),Nt(),V(),It(),V(),It();var t8,i8=self.theoplayerDeviceMetadata;function n8(t){return t.navigator&&t.navigator.userAgent||""}V(),It(),V(),It(),V(),It(),V(),It();var r8=((t8={})["Windows 10"]=/(Windows 10.0|Windows NT 10.0)/i,t8["Windows 8.1"]=/(Windows 8.1|Windows NT 6.3)/i,t8["Windows 8"]=/(Windows 8|Windows NT 6.2)/i,t8["Windows 7"]=/(Windows 7|Windows NT 6.1)/i,t8["Windows Vista"]=/Windows NT 6.0/i,t8["Windows Server 2003"]=/Windows NT 5.2/i,t8["Windows XP"]=/(Windows NT 5.1|Windows XP)/i,t8["Windows Phone"]=/Windows Phone/i,t8.Android=/Android/i,t8.Linux=/(Linux(?!.*Ubuntu)|X11)/,t8.Ubuntu=/Ubuntu/i,t8.iOS=/(iPhone|iPad|iPod)/i,t8["Mac OS X"]=/Mac OS X/i,t8["Mac OS"]=/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/i,t8["Chrome OS"]=/CrOS/i,t8);function e8(t,i){var n=r8[i];return!!n&&Boolean(n8(t).match(n))}function s8(t){return e8(t,"Android")}function u8(t){return e8(t,"Windows Phone")}function o8(t){return e8(t,"iOS")&&!u8(t)}function h8(t){return e8(t,"Ubuntu")}var a8,c8,f8=/Windows (NT|Phone) ([0-9.]+)/i,v8=/Mac.*?(OS |OS X )(\d+(([_.])\d+)?(([_.])\d+)?)/i,d8=((a8={})["Windows 10"]=f8,a8["Windows 8.1"]=f8,a8["Windows 8"]=f8,a8["Windows 7"]=f8,a8["Windows Vista"]=f8,a8["Windows Server 2003"]=f8,a8["Windows XP"]=f8,a8["Windows Phone"]=/Windows Phone ([0-9.]+)/i,a8.Android=/Android (\d+(([_.])\d+)?(([_.])\d+)?)/i,a8.Linux=void 0,a8.Ubuntu=void 0,a8.iOS=/(iPad|iPhone|iPod).*?(OS |os |OS_)(\d+(([_.])\d+)?(([_.])\d+)?)/i,a8["Mac OS X"]=v8,a8["Mac OS"]=v8,a8["Chrome OS"]=void 0,a8);function l8(t,i){var n=d8[i];return n?n8(t).match(n):null}function g8(t){return t.split(/[_.]/).map(function(t){return T(t,10)})}function w8(t){if(function(t){return Boolean(n8(t).match(/Windows/i))}(t)){if(function(t){return e8(t,"Windows 10")}(t))return"Windows 10";if(u8(t))return"Windows Phone";if(function(t){return e8(t,"Windows 8.1")}(t))return"Windows 8.1";if(function(t){return e8(t,"Windows 8")}(t))return"Windows 8";if(function(t){return e8(t,"Windows 7")}(t))return"Windows 7";if(function(t){return e8(t,"Windows Vista")}(t))return"Windows Vista";if(function(t){return e8(t,"Windows Server 2003")}(t))return"Windows Server 2003";if(function(t){return e8(t,"Windows XP")}(t))return"Windows XP"}else{if(s8(t))return"Android";if(o8(t))return"iOS";if(function(t){return e8(t,"Mac OS X")}(t))return"Mac OS X";if(function(t){return e8(t,"Mac OS")}(t))return"Mac OS";if(h8(t))return"Ubuntu";if(function(t){return e8(t,"Chrome OS")}(t))return"Chrome OS";if(function(t){return e8(t,"Linux")&&!h8(t)}(t))return"Linux"}}function m8(t,i){var n=function(t){var i=l8(t,"Windows 10");return i&&i.length>2?g8(i[2]):void 0}(t),r=function(t){var i=l8(t,"Mac OS X");return i&&i.length>2?g8(i[2]):void 0}(t),e=function(t){var i=l8(t,"Android");return i&&i.length>1?g8(i[1]):void 0}(t),s=function(t){var i=l8(t,"iOS");return i&&i.length>3?g8(i[3]):void 0}(t),u=function(t){var i=l8(t,"Chrome OS");return i&&i.length>0?g8(i[0]):void 0}(t);return n?n.length>i?n[i]:void 0:r?r.length>i?r[i]:void 0:e?e.length>i?e[i]:void 0:s?s.length>i?s[i]:void 0:u&&u.length>i?u[i]:void 0}function y8(t){var i=function(t){return m8(t,0)}(t),n=function(t){return m8(t,1)}(t),r=function(t){return m8(t,2)}(t);if(void 0!==i)return void 0===n?""+i:void 0===r?i+"."+n:i+"."+n+"."+r}var p8=((c8={}).Chrome=/Chrome/i,c8["Chrome Mobile"]=void 0,c8["Chrome iOS"]=/CriOS/i,c8.Chromium=/Chromium/i,c8.HeadlessChrome=/HeadlessChrome/i,c8.Firefox=/Firefox/i,c8.Seamonkey=/Seamonkey/i,c8["Firefox iOS"]=/FxiOS/i,c8.Safari=/Safari/i,c8.Edge=/Edge\/\d+/i,c8["Edge Chromium"]=/Edg\/\d+/i,c8.IE=/Trident/i,c8.Opera=/Opera|OPR/i,c8.Vivaldi=/Vivaldi/i,c8["Android Browser"]=void 0,c8);function _8(t,i){var n=p8[i];return!!n&&Boolean(n8(t).match(n))}function k8(t){return Boolean(n8(t).match(/Mobi/i))}function b8(t){return Boolean(t.chrome&&t.navigator&&t.navigator.vendor&&/google/i.test(t.navigator.vendor))||A8(t)}function A8(t){return _8(t,"Chrome iOS")}function T8(t){return _8(t,"Firefox")&&!E8(t)}function S8(t){return _8(t,"Firefox Mobile")&&!E8(t)&&k8(t)}function E8(t){return _8(t,"Seamonkey")}function I8(t){return _8(t,"Firefox iOS")&&!E8(t)}function R8(t){return _8(t,"Safari")&&!_8(t,"Chrome")&&!Oi.Wv}function C8(t){return Boolean(F8(t))}function P8(t){return _8(t,"Edge")}function N8(t){return _8(t,"Edge Chromium")}function D8(t){return _8(t,"IE")}function x8(t){return _8(t,"Vivaldi")}var B8,O8=/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i,M8=((B8={}).Chrome=O8,B8["Chrome Mobile"]=O8,B8["Chrome iOS"]=/CriOS\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i,B8.Chromium=O8,B8.HeadlessChrome=O8,B8.Firefox=/Firefox\/([0-9.]+)/i,B8["Firefox iOS"]=/FxiOS\/([0-9.]+)/i,B8.Safari=/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/,B8["Safari Mobile"]=void 0,B8.Edge=/Edge\/(\d+)/i,B8["Edge Chromium"]=/Edg\/(\d+)/i,B8["Edge Mobile"]=void 0,B8.IE=/(MSIE |Trident.*?rv:)(\d+)/i,B8.Opera=/(OPR\/(\d+\.\d+))|(Opera(?=.*Version\/((\d+)\.(\d+))))/i,B8["Opera Mobile"]=void 0,B8.Vivaldi=/Vivaldi\/((\d+)\.(\d+)\.(\d+)(?:\.(\d+))?)/i,B8["Android Browser"]=void 0,B8);function L8(t,i){var n=M8[i];return n?n8(t).match(n):null}function F8(t){return L8(t,"Opera")}function U8(t){var i=function(t){return L8(t,"Firefox")}(t);return i?S(i[1]):0}function V8(t){var i=function(t){return L8(t,"Firefox iOS")}(t);return i?S(i[1].split(".")[0]):0}function j8(t){var i=function(t){return L8(t,"Safari")}(t);return i?S(i[2].split(".")[0]):0}function H8(t){var i=function(t){return L8(t,"Edge")}(t);return i?S(i[1]):0}function W8(t){var i=function(t){return L8(t,"Edge Chromium")}(t);return i?S(i[1]):0}function z8(t){var i=function(t){return L8(t,"IE")}(t);return i?S(i[2]):0}function q8(t){var i=function(t){return L8(t,"Vivaldi")}(t);return i?S(i[1]):0}function X8(t){if(s8(t))return b8(t)?"Chrome Mobile":T8(t)||S8(t)?"Firefox Mobile":P8(t)?"Edge Mobile":C8(t)?"Opera Mobile":"Android Browser";if(o8(t)){if(b8(t)||A8(t))return"Chrome iOS";if(T8(t)||I8(t))return"Firefox iOS";if(P8(t))return"Edge Mobile";if(R8(t)||function(t){return R8(t)&&k8(t)}(t))return"Safari Mobile";if(C8(t))return"Opera Mobile"}return function(t){return _8(t,"Chromium")}(t)?"Chromium":function(t){return _8(t,"HeadlessChrome")}(t)?"HeadlessChrome":b8(t)?"Chrome":T8(t)?"Firefox":R8(t)?"Safari":P8(t)?"Edge":N8(t)?"Edge Chromium":D8(t)?"IE":C8(t)?"Opera":x8(t)?"Vivaldi":void 0}function G8(t){return x8(t)?q8(t):A8(t)?Number(function(t){var i=M8["Chrome iOS"];return i&&i.exec(n8(t))||[]}(t)[1]):b8(t)?Number(function(t){var i=M8.Chrome;return i&&i.exec(n8(t))||[]}(t)[1]):T8(t)||S8(t)?U8(t):I8(t)?V8(t):R8(t)?j8(t):P8(t)?H8(t):N8(t)?W8(t):D8(t)?z8(t):C8(t)?function(t){var i=F8(t);return i&&i[0].indexOf("Opera")>-1?S(i[5]):i?S(i[2].split(".")[0]):0}(t):void 0}var Q8=function(t){return t.ryi="pc",t.hyi="console",t.oyi="settop",t.ayi="mobile",t.uyi="tablet",t.cyi="smarttv",t.dyi="searchbot",t}({});function Y8(t){var i=n8(t);return i.match(/CrKey|Roku|AFTS|AppleTV|Nexus Player/i)?"settop":i.match(/Xbox|Playstation|Wii|Nintendo/i)?"console":/(iPad|Tablet|(Android(?!.*Mobi))|(Windows(?!.*Phone)(.*Touch))|Kindle|Playbook|Silk|(Puffin(?!.*(IP|AP|WP))))/i.test(i)?"tablet":/Mobi/.test(i)?"mobile":i.match(/GoogleTV|SmartTV|SMART-TV|Internet TV|NetCast|NETTV|boxee|Kylo|DLNADOC|hbbtv|CE-HTML/i)?"smarttv":i.match(/(nuhk|Googlebot|bingbot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/i)?"searchbot":function(t){return Boolean(X8(t))}(t)?"pc":void 0}var $8=function(){function t(t,i){var n=this;this.empClient=void 0,this.agama=void 0,this._yi=void 0,this.empClient=t,this.agama=i,this._yi=function(){var t=Vi.bP;switch(t){case"wifi":n.empClient.setDeviceMetadata(n.agama.DeviceMetadata.DATA_CONNECTION_TYPE,"wlan");break;case"ethernet":n.empClient.setDeviceMetadata(n.agama.DeviceMetadata.DATA_CONNECTION_TYPE,t);break;case"cellular":var i=function(t){switch(t){case"3g":return"mobile/3G";case"4g":return"mobile/4G";default:return}}(Vi.AP);i&&n.empClient.setDeviceMetadata(n.agama.DeviceMetadata.DATA_CONNECTION_TYPE,i)}}}var i=t.prototype;return i.ej=function(t){this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_ID,t.deviceID||function(){var t=Ld.Wy("deviceId");if(t)return t;var i=GS();return Ld.qy("deviceId",i),i}()),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.PLAYER,"THEOplayer"),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.PLAYER_VERSION,"10.0.0"),this.lyi(t),this.fyi(),this.vyi(t),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.EMPCLIENT_INTEGRATION_VERSION,"3.0"),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.EMPCLIENT_INTEGRATION_BUILDDATE,"2023-04-17 12:00:00"),t.application&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.APPLICATION,t.application),t.applicationVersion&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.APPLICATION_VERSION,t.applicationVersion),t.userAccountID&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.USER_ACCOUNT_ID,t.userAccountID);var i=t.connectionType;i?this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,i):(this._yi(),l.connection&&l.connection.addEventListener&&l.connection.addEventListener("change",this._yi))},i.lyi=function(t){this.gyi(t);var i=t.deviceManufacturer||i8&&i8.manufacturer;i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_MANUFACTURER,i);var n=t.deviceModel||i8&&i8.model;n&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_MODEL,n)},i.gyi=function(t){var i=t.deviceType||function(){var t=Y8(self);switch(t){case Q8.hyi:return"game-console";case Q8.cyi:return"tv";case Q8.oyi:return"media-streamer";default:return t}}();i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_TYPE,i)},i.fyi=function(){var t=X8(self);t&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_BROWSER,t);var i=G8(self);void 0!==i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_BROWSER_VERSION,i.toString())},i.vyi=function(t){var i=t.deviceOs||w8(self);i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_OS,i);var n=t.deviceOsVersion||y8(self);n&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_OS_VERSION,n.toString())},i.kn=function(){l.connection&&l.connection.removeEventListener&&l.connection.removeEventListener("change",this._yi)},t}();var K8=function(t){function i(){var i;return(i=t.call(this)||this).wyi=void 0,i.OG=void 0,i.ko=!1,i.Ayi=!1,i.myi=void 0,i.yyi=void 0,i.wyi=f.Agama,i}Pt(i,t);var n=i.prototype;return n.qx=function(t){this.myi=t,this.wyi&&(this.OG=function(t,i){var n=function(t,i){switch(i){case"info":return t.LogLevel.INFO;case"debug":return t.LogLevel.DEBUG;case"warning":return t.LogLevel.WARNING;case"error":return t.LogLevel.ERROR;default:return t.LogLevel.FATAL}}(i,t.logLevel);i.setLogLevel(n);var r=new i.EMPClient(t.config);return function(t,i){return t.setExternalConfig(i.config),t}(r,t)}(t,this.wyi),this.OG&&(this.yyi=new $8(this.OG,this.wyi),this.ko=!0))},n.ij=function(){return this.wyi||console.warn("Please load the Agama Library (empclient.min.js) in order to use the integration"),Boolean(this.wyi)},n.$X=function(){return this.ko},n.DX=function(t,i){if(this.OG&&this.wyi)switch(t){case DS.eG:this.OG.setMeasurement(this.wyi.Measurement.BUFFER_LENGTH,i);break;case DS.sG:this.OG.setMeasurement(this.wyi.Measurement.BYTES_RECEIVED,i);break;case DS.rG:this.OG.setMeasurement(this.wyi.Measurement.SEGMENT_PROFILE_BITRATE,i);break;case DS.hG:this.OG.setMeasurement(this.wyi.Measurement.VIDEO_PROFILE_BITRATE,i);break;case DS.nG:this.OG.setMeasurement(this.wyi.Measurement.SEGMENT_READ_BITRATE,i);break;case DS.Jz:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_1XX,i);break;case DS.Zz:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_2XX,i);break;case DS.$z:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_3XX,i);break;case DS.tG:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_4XX,i);break;case DS.iG:this.OG.setMeasurement(this.wyi.Measurement.HTTP_REQUEST_STATUS_CODE_5XX,i);break;case DS.aG:this.OG.setMeasurement(this.wyi.Measurement.PLAYBACK_POSITION,i);break;case DS.uG:this.OG.setMeasurement(this.wyi.Measurement.NUMBER_OF_FRAMES_DECODED,i);break;case DS.oG:this.OG.setMeasurement(this.wyi.Measurement.NUMBER_OF_FRAMES_DROPPED,i)}},n.fX=function(t,i){if(this.OG&&this.wyi)switch(t){case xS.vG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.ASSET_DURATION,i);break;case xS.fG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.MANIFEST_URI,i);break;case xS._G:this.OG.setSessionMetadata(this.wyi.SessionMetadata.NUMBER_OF_CONTENT_PROFILES,i);break;case xS.mG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.SERVICE_NAME,i);break;case xS.gG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.CDN,i);break;case xS.pG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.CONTENT_TITLE,i);break;case xS.wG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.CONTENT_TYPE,i);break;case xS.yG:this.OG.setSessionMetadata(this.wyi.SessionMetadata.CONTENT_DESCRIPTION,i)}},n.ej=function(){this.yyi&&this.myi&&this.yyi.ej(this.myi)},n.tj=function(t,i){this.wyi&&this.OG&&(this.FX(),function(t,i,n,r){var e=QS(t,n,r);i.abrSession(e,t.ViewState.INITIAL_BUFFERING)}(this.wyi,this.OG,t,i),this.Ayi=!0)},n.kn=function(){this.yyi&&this.yyi.kn(),this.byi(BS.AG),this.OG=void 0},n.$G=function(t){this.Syi(t)},n.eX=function(t,i){this.OG&&this.OG.event(t.code,i)},n.FX=function(){this.OG&&this.Ayi&&(this.OG.exitSession(),this.Ayi=!1)},n.byi=function(t){if(this.OG&&this.wyi&&(this.FX(),t===BS.AG))this.OG.shutdown(this.wyi.ShutdownType.NORMAL_SHUTDOWN)},n.tX=function(t,i,n){this.Syi(t,i,n)},n.Syi=function(t,i,n){if(this.OG&&this.wyi)switch(t){case NS.TM:this.Tyi(this.wyi.ViewState.PLAYING,i,n);break;case NS.Qz:this.Tyi(this.wyi.ViewState.FAILED,i,n);break;case NS.Kz:this.Tyi(this.wyi.ViewState.INITIAL_BUFFERING,i,n);break;case NS.Gz:this.Tyi(this.wyi.ViewState.PAUSED,i,n);break;case NS.Xz:this.Tyi(this.wyi.ViewState.SEEK,i,n);break;case NS.jz:this.Tyi(this.wyi.ViewState.STALLED,i,n);break;case NS.Yz:this.Tyi(this.wyi.ViewState.NO_ACCESS,i,n)}},n.Tyi=function(t,i,n){if(this.OG)if(i){var r=function(t){return t||""}(n);this.OG.viewStateExtended(t,i.code,r)}else this.OG.viewStateChanged(t)},i}(LS);$b(function(t){return function(i){return function(i){function n(n,r){var e;return(e=i.call(this,n,r)||this).OG=new t,e.pyi=void 0,e.pyi=new $S(e,e.OG,r),e}Pt(n,i);var r=n.prototype;return r.OP=function(t,n){this.pyi&&this.pyi.QG(),i.prototype.OP.call(this,t)},r.kn=function(){this.pyi&&this.pyi.kn(),i.prototype.kn.call(this)},n}(i)}}(K8),Qb.hnt),V(),It(),V(),It(),Nt(),V(),It(),V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It();var J8=function(t){return t.PLAY_ALL="play-all",t.PLAY_NONE="play-none",t.PLAY_LAST="play-last",t}({});V(),It();var Z8=function(t){return t.VOD="vod",t.LIVE="live",t}({}),t7=function(){function t(t,i,n,r,e,s,u){var o=this;this.oa=void 0,this.Cyi=void 0,this.Nyi=void 0,this.Pyi=void 0,this.kyi=void 0,this.Hyi=void 0,this.xyi=void 0,this.Byi=void 0,this.JW=void 0,this.ZW=void 0,this.m7=void 0,this.Myi=void 0,this.sAi=void 0,this.Iyi=void 0,this.Y1t=void 0,this.Lyi=void 0,this.uvi=void 0,this.qui=void 0,this.U_i=void 0,this.Pd=void 0,this.Fyi=void 0,this.wui=void 0,this.kui=void 0,this.Uyi=void 0,this.Vyi=void 0,this.eAi=void 0,this.oa=t,this.Cyi=i,this.Nyi=n,this.Pyi=r,this.kyi=e,this.Hyi=s,this.xyi=u,this.JW=void 0,this.ZW=void 0,this.m7=new dr,this.Myi=new dr,this.sAi=void 0,this.Iyi=!1,this.Y1t=void 0,this.Lyi=function(t){var i=t.currentSource;if(i&&i.integrationData){var n=i.integrationData,r=n.preplayResponse,e=n.source;o.kyi.nAi(r),r&&r.type===Z8.VOD&&r.ads&&o.Pyi.qyi(r.ads),o.Cyi.rAi=i.integrationData,e.assetInfo&&Er(o.fetchAssetInfo(i))}},this.uvi=function(){o.Iyi=!0},this.qui=function(){o.Iyi&&o.zyi(o.oa.LP())},this.U_i=function(){o.Iyi&&(o.zyi(1/0),o.Iyi=!1)},this.Pd=function(){Er(o.Cyi.Tn())},this.Fyi=function(t){o.m7.Zg(),o.m7=new dr,Er(br(o.gri(t.od.PO,o.m7.Yg),o.m7))},this.wui=function(){1!==o.oa.ux&&(o.sAi=o.oa.ux,o.oa.ux=1)},this.kui=function(){void 0!==o.sAi&&(o.oa.ux=o.sAi,o.sAi=void 0)},this.Uyi=function(t){t.od.wn("Oyi",o.Fyi),t.od.wn("Dnt",o.wui),t.od.wn("Cnt",o.kui)},this.Vyi=function(t){t.od.mn("Oyi",o.Fyi),t.od.mn("Dnt",o.wui),t.od.mn("Cnt",o.kui)},this.eAi=function(){o.oa.zx()},this.oa.wn(ch.xw,this.Lyi),this.oa.wn(ch.uo,this.uvi),this.oa.wn(ch._y,this.qui),this.oa.wn(ch.Bw,this.U_i),this.oa.wn(Mp.AM,this.Pd),this.Pyi.A0t.wn("xnt",this.Uyi),this.Pyi.A0t.wn("Pnt",this.Vyi)}var i=t.prototype;return i.Eyi=function(t){this.JW=ww(t),this.ZW=t,this.oa.So(new Ib(t))},i.Ta=function(t){this.Pyi.resetSource(),this.xyi.Gy(),this.Iyi=!1,this.oa.Ryi(t)},i.Xnt=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return this.Cyi.hr(),this.Iyi=!1,t&&function(t){return t.sources.some(function(t){return t.integration===GA.UPLYNK})}(t)?[3,2]:[4,this.oa.Dyi(t,i)];case 1:return[2,e.sent()];case 2:return e.trys.push([2,5,,6]),n=this,[4,this.Nyi.Cgi(t)];case 3:return n.Byi=e.sent(),[4,this.oa.Dyi(this.Byi,i)];case 4:return e.sent(),[3,6];case 5:return r=e.sent(),this.Eyi(new md(gd.MANIFEST_LOAD_ERROR,r.message,r)),[3,6];case 6:return[2]}})}).call(this)},i.kn=function(){this.m7.Zg(),this.Myi.Zg(),this.oa.mn(ch.xw,this.Lyi),this.oa.mn(ch.uo,this.uvi),this.oa.mn(ch._y,this.qui),this.oa.mn(ch.Bw,this.U_i),this.oa.mn(Mp.AM,this.Pd);for(var t,i=Ft(this.Pyi.A0t.ec);!(t=i()).done;){var n=t.value;n.mn("Oyi",this.Fyi),n.mn("Dnt",this.wui),n.mn("Cnt",this.kui)}this.Pyi.A0t.mn("xnt",this.Uyi),this.Pyi.A0t.mn("Pnt",this.Vyi),this.Pyi.destroy(),this.Y1t&&(this.Y1t.zg(),this.Y1t=void 0),this.Iyi=!1},i.fetchAssetInfo=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:if(!t||!t.integrationData)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.Hyi.RSt(t.integrationData.source.prefix,t.integrationData.source.id,this.Myi.Yg,t.integrationData.preplayResponse.sid)];case 2:return i=n.sent(),this.kyi.Wyi(i),this.xyi.qyi(i,this.Pyi.A0t.ec),[3,4];case 3:return n.sent(),[3,4];case 4:return[2]}})}).call(this)},i.zyi=function(t){this.Pyi.Gyi(t),this.Pyi.mnt.forEach(function(i){return i.Xyi(t)}),this.Pyi.jyi(this.oa.Tx()),this.K1t()},i.OP=function(t){this.Pyi.ynt||(this.m7.Zg(),this.m7=new dr,Er(br(this.gri(t,this.m7.Yg),this.m7)))},i.gri=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:if(yr(i),t0});if(t){var i=t.iAi[0];this.Y1t||(this.Y1t=new lZ(this.oa.xe),this.Y1t.wn("clickstart",this.eAi)),this.Y1t.u1t=i}else this.Y1t&&(this.Y1t.zg(),this.Y1t=void 0)},xt(t,[{key:"Ca",get:function(){return this.kyi.Ca}},{key:"lt",get:function(){return this.JW}},{key:"WP",get:function(){return this.ZW}}]),t}();V(),It(),Wt(),Yt(),V(),It();var i7=Xk({breaksIndex:Fk,adsIndex:Fk,startTime:Fk,endTime:Fk}),n7=Xk({index:Fk,timeOffset:Fk}),r7=Xk({duration:Fk,apiFramework:Kk(Uk,Wk),creative:Uk,mimeType:Uk,width:Fk,height:Fk,companions:Zk(function(t){return new nb(t)}(function(){return r7})),extensions:Kk(jk,Zk(Hk)),fw_parameters:Kk(jk,ib(Uk)),events:ib(Zk(Uk))}),e7=Xk({type:Yk(["linear","nonlinear"]),position:Yk(["preroll","midroll","postroll","pause","overlay",""]),timeOffset:Fk,duration:Fk,ads:Zk(r7),events:ib(Zk(Uk))}),s7=Xk({breaks:Zk(e7),breakOffsets:Kk(jk,Zk(n7)),placeholderOffsets:Kk(jk,Zk(i7))}),u7=Xk({required:Kk(jk,Vk),fairplayCertificateURL:Kk(jk,Uk),widevineLicenseURL:Kk(jk,Uk),playreadyLicenseURL:Kk(jk,Uk)}),o7={type:Yk(Gk(Z8)),playURL:Uk,prefix:Uk,sid:Uk,drm:Kk(jk,u7)},h7=Xk(io({},o7,{type:Yk([Z8.VOD]),ads:s7,interstitialURL:Kk(Uk,Wk,jk)})),a7=Kk(h7,Xk(io({},o7,{type:Yk([Z8.LIVE])})));V(),It();var c7,f7=Uk,v7=Xk({userId:Uk,externalId:Kk(Uk,Zk(Uk))}),d7=function(){function t(t){this.nV=void 0,this.nV=t}var i=t.prototype;return i.RSt=function(t){return jt(function(){return zt(this,function(i){try{return[2,this.hAi(t)]}catch(t){throw t}return[2]})}).call(this)},i.hAi=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return[4,g7(t)];case 1:return i=e.sent(),[4,this.nV.lk({Uk:kl.GET,Yu:i,dk:Hd.DT})];case 2:return[4,e.sent().ck()];case 3:return n=e.sent(),r=io({},n,{type:t.assetType===nE.ASSET?Z8.VOD:Z8.LIVE}),a7.qH(r)||a7.GH(r,"PreplayResponse"),[2,r]}})}).call(this)},t}(),l7=((c7={})[nE.ASSET]="",c7[nE.CHANNEL]="channel/",c7[nE.EVENT]="event/",c7);function g7(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return i=t.prefix,n=l7[t.assetType],r=function(t){if(Zk(f7).qH(t))return 1===t.length?t[0]:t.join(",")+"/multiple";if(f7.qH(t))return t;if(v7.qH(t)&&ji(t.externalId))return 1===t.externalId.length?"ext/"+t.userId+"/"+t.externalId[0]:"ext/"+t.userId+"/"+t.externalId.join(",")+"/multiple";if(v7.qH(t))return"ext/"+t.userId+"/"+t.externalId;throw new _("Invalid asset id")}(t.id),[4,w7(t.contentProtected)];case 1:return e=o.sent(),s=function(t,i){var n=m7(t,i);return n?{"ad.cping":"1","ad.pingf":String(n)}:{}}(t.assetType,t.ping),u={},ji(t.preplayParameters)?t.preplayParameters.forEach(function(t){u[t[0]]=t[1]}):u=t.preplayParameters,[2,Cl(i+"/preplay/"+n+r+".json",io({v:"2"},u,e,s,u))]}})})()}function w7(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return(i=t)?[4,Vi.wm()]:[3,2];case 1:i=e.sent(),e.label=2;case 2:return i?[2,{rmt:"fps",manifest:"m3u8"}]:[3,3];case 3:return(n=t)?[4,Vi.Am()]:[3,5];case 4:n=e.sent(),e.label=5;case 5:return n?[2,{rmt:"wv",manifest:"mpd"}]:[3,6];case 6:return(r=t)?[4,Vi.ym()]:[3,8];case 7:r=e.sent(),e.label=8;case 8:if(r)return[2,{rmt:"pr",manifest:"mpd"}];e.label=9;case 9:return[2,{}]}})})()}function m7(t,i){var n=t!==nE.ASSET;return(!n&&i.adImpressions?1:0)+(!n&&i.freeWheelVideoViews?2:0)+(n&&i.linearAdData?4:0)}V(),It(),Wt(),Yt(),V(),It();var y7=Xk({ad_id:Uk,apiFramework:Kk(Wk,Uk),companions:Zk(Hk),creative:Uk,duration:Fk,mimeType:Uk,height:Fk,width:Fk,extensions:Kk(jk,Zk(Hk)),fw_parameters:Kk(jk,ib(Uk))}),p7=Xk({breakId:Uk,ads:Zk(y7),type:Yk(["linear","nonlinear"]),position:Yk(["preroll","midroll","postroll","pause","overlay",""]),timeOffset:Fk,duration:Fk,height:Kk(jk,Fk),width:Kk(jk,Fk),events:ib(Zk(Uk))}),_7=Xk({breaks:Zk(p7)}),k7=Xk({next_time:Fk,ads:Kk(jk,_7),extensions:Kk(jk,Zk(Hk)),error:Kk(jk,Uk),currentBreakEnd:Kk(jk,Fk)}),b7=function(t){return t.MSt="start",t.Xz="seek",t}({}),A7=function(){function t(t){this.nV=void 0,this.nV=t}var i=t.prototype;return i.RSt=function(t,i){return jt(function(){return zt(this,function(n){try{return[2,this.hAi(t,i)]}catch(t){throw t}return[2]})}).call(this)},i.hAi=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return n=function(t){var i={v:"3",pt:String(t.currentTime)};(function(t){return void 0!==t.seekTime})(t)&&t.hasFreeWheelVideoViews&&(i.ft=String(t.seekTime));t.event&&(i.ev=t.event);return Cl(t.zonePrefix+"/session/ping/"+t.sessionId+".json",io({},i))}(t),[4,this.nV.lk({Uk:kl.GET,Yu:n,dk:Hd.DT,Yg:i})];case 1:return[4,e.sent().ck()];case 2:return r=e.sent(),k7.qH(r)||k7.GH(r,"PingResponse"),[2,r]}})}).call(this)},t}();V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It(),Bt(),Nt();var T7=function(t){function i(i){var n;return(n=t.call(this,"oAi")||this).aE=void 0,n.aE=i,n}return Pt(i,t),i.prototype.xa=function(){return new S7(this.aE)},xt(i,[{key:"oE",get:function(){return this.aE}}]),i}(Ig),S7=function(t){function i(i){var n;return(n=t.call(this,"pingresponse")||this).response=void 0,n.response=i,n}return Pt(i,t),i}(ah);V(),It(),Bt(),Nt();var E7=function(t){function i(i){var n;return(n=t.call(this,"aAi")||this).JW=void 0,n.JW=i,n}return Pt(i,t),i.prototype.xa=function(){return new I7(this.JW)},xt(i,[{key:"lt",get:function(){return this.JW}}]),i}(Ig),I7=function(t){function i(i){var n;return(n=t.call(this,"pingerror")||this).error=void 0,n.error=i,n}return Pt(i,t),i}(ah),R7=function(t){function i(i,n){var r,e;return r=t.call(this)||this,(e=r).pAi=void 0,e.oa=void 0,e.uAi=void 0,e.dAi=void 0,e.gAi=void 0,e.mAi=void 0,e.wAi=void 0,e.nT=void 0,e._Ai=void 0,e.fAi=void 0,e.vAi=void 0,e.pAi=i,e.oa=n,e.dAi=NaN,e.gAi=void 0,e.mAi=!1,e.wAi=NaN,e.nT=new dr,e._Ai=void 0,e.fAi=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=e.oa.LP(),e.wAi=t,e.mAi||Ui(e.gAi)||E(e.dAi)?[2]:e.dAi+e.gAi<=t?(e.mAi=!0,[4,e.lAi()]):[3,2];case 1:i.sent(),e.mAi=!1,i.label=2;case 2:return[2]}})})()},e.vAi=function(){if(e.oa.LP()!==e.dAi){e.mAi&&e.yAi(),e.wAi=e.oa.LP();var t=e.wAi-(e.dAi||0);E(t)?Er(e.lAi(b7.Xz,0)):Er(e.lAi(b7.Xz,t))}},r}Pt(i,t);var n=i.prototype;return n.Tn=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return(t=this.uAi)?(i=m7(t.source.assetType,t.source.ping),0!==i?(this.dAi=this.oa.Tx().start(0),[4,this.lAi(b7.MSt)]):[2]):[2];case 1:return n.sent(),this.oa.wn("timeupdate",this.fAi),this.oa.wn("seeking",this.vAi),[2]}})}).call(this)},n.lAi=function(t,i){return jt(function(){var n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:if(n=this.uAi.preplayResponse,r={},E(this.dAi))return[2];if(Fi(this._Ai)&&Nn(this._Ai,this.oa.LP()-this.dAi))return[2];void 0!==i&&(r.seekTime=i),void 0!==t&&(r.event=t),e=this.oa.LP()-this.dAi,t===b7.MSt?e=0:t!==b7.Xz&&this.gAi&&(e=A.min(e,this.gAi)),this._Ai=e,a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,this.pAi.RSt(io({zonePrefix:n.prefix,sessionId:n.sid,currentTime:e,hasFreeWheelVideoViews:null==(u=this.uAi)?void 0:u.source.ping.freeWheelVideoViews},r),this.nT.Yg)];case 2:return o=a.sent(),this.So(new T7(o)),this.gAi=-1!==o.next_time?o.next_time:void 0,s=o.error,[3,5];case 3:return mr(h=a.sent())||(s=h.message),[3,5];case 4:return s&&this.So(new E7(s)),[7];case 5:return[2]}})}).call(this)},n.hr=function(){this.gAi=void 0,this.uAi=void 0,this.dAi=NaN,this.mAi=!1,this.wAi=NaN,this._Ai=void 0,this.oa.mn("seeking",this.vAi),this.oa.mn("timeupdate",this.fAi),this.yAi()},n.yAi=function(){this.nT.Zg(),this.nT=new dr},n.kn=function(){this.hr()},xt(i,[{key:"rAi",set:function(t){this.uAi=t}},{key:"cAi",get:function(){return this.dAi}}]),i}(uh);V(),It(),Wt(),Ut(),Yt();var C7=function(){function t(t,i){this.AAi=void 0,this.VJ=void 0,this.AAi=t,this.VJ=i}return t.prototype.Cgi=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:i=[],n=Ft(t.sources),o.label=1;case 1:return(r=n()).done?[3,6]:rT(e=r.value)?[3,2]:(i.push(e),[3,5]);case 2:return o.trys.push([2,4,,5]),[4,this.AAi.RSt(e)];case 3:return s=o.sent(),u=function(t,i,n){var r,e=t.preplayResponse;t.source.contentProtected&&e.drm&&(r={integration:"uplynk"},e.drm.fairplayCertificateURL&&(r.fairplay={certificateURL:e.drm.fairplayCertificateURL}),e.drm.widevineLicenseURL&&(r.widevine={licenseAcquisitionURL:e.drm.widevineLicenseURL}),e.drm.playreadyLicenseURL&&(r.playready={licenseAcquisitionURL:e.drm.playreadyLicenseURL}));var s=AA({src:e.playURL,contentProtection:r,useNativePlayback:t.source.useNativePlayback,hls:t.source.hls,dash:t.source.dash,seamlessSwitchStrategy:t.source.seamlessSwitchStrategy},i,n);return s.integrationData=t,s}({source:e,preplayResponse:s},t,this.VJ),u.src&&(u.src=Cl(u.src,e.playbackUrlParameters)),i.push(u),[3,5];case 4:return o.sent(),[3,5];case 5:return[3,1];case 6:if(0!==t.sources.length&&0===i.length)throw new p("Fatal: unable to play UplynkSources.");return[2,io({},t,{sources:i})]}})}).call(this)},t}();V(),It(),Bt(),Ut(),V(),It(),Bt(),Nt(),Ut(),V(),It(),Nt();var P7=function(t){function i(i,n){var r;return(r=t.call(this,"Dnt")||this).od=void 0,r.XF=void 0,r.od=i,r.XF=n,r}return Pt(i,t),i.prototype.xa=function(){return new N7(this.od.Ca)},i}(Ig),N7=function(t){function i(i){var n;return(n=t.call(this,"adbreakbegin")||this).adBreak=void 0,n.adBreak=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var D7=function(t){function i(i,n){var r;return(r=t.call(this,"Cnt")||this).od=void 0,r.XF=void 0,r.od=i,r.XF=n,r}return Pt(i,t),i.prototype.xa=function(){return new x7(this.od.Ca)},i}(Ig),x7=function(t){function i(i){var n;return(n=t.call(this,"adbreakend")||this).adBreak=void 0,n.adBreak=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var B7=function(t){function i(i){var n;return(n=t.call(this,"Oyi")||this).od=void 0,n.od=i,n}return Pt(i,t),i.prototype.xa=function(){return new O7(this.od.Ca)},i}(Ig),O7=function(t){function i(i){var n;return(n=t.call(this,"adbreakskip")||this).adBreak=void 0,n.adBreak=i,n}return Pt(i,t),i}(ah);V(),It(),V(),It(),Nt();var M7=function(t){function i(i){var n;return(n=t.call(this,"k4t")||this).od=void 0,n.od=i,n}return Pt(i,t),i.prototype.xa=function(){return new L7(this.od.Ca)},i}(Ig),L7=function(t){function i(i){var n;return(n=t.call(this,"updateadbreak")||this).adBreak=void 0,n.adBreak=i,n}return Pt(i,t),i}(ah),F7=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).OO=void 0,u.WA=void 0,u.qc=void 0,u.gpi=void 0,u.hu=void 0,u.ho=void 0,u.ZYt=void 0,u.TAi=void 0,u.OO=i,u.WA=n,u.qc=r,u.gpi=e,u.ho=!1,u.TAi=!1,u.ZYt=s,u}Pt(i,t);var n=i.prototype;return n.bAi=function(t){this.WA=t-this.EO;for(var i,n=Ft(this.Jc.ec);!(i=n()).done;){var r=i.value;r.EO>t&&this.Jc._S(r)}this.So(new M7(this))},n.Qut=function(t){return t>=this.EO&&(Ui(this.ct)||t<=this.EO+this.ct)},n.kAi=function(t){return-1!==this.JYt&&(!!Fi(this.PO)&&t-this.EO>=this.JYt)},n.rD=function(){this.qc.ec.forEach(function(t){return t.rD()}),this.So(new B7(this))},n.EAi=function(t){var i=Fi(this.PO)&&t>=this.PO,n=this.EO<=t&&!i&&!this.ro,r=this.ro&&this.PO&&t>=this.PO;n&&(this.ho=!0,this.So(new P7(this,this.EO))),this.qc.ec.forEach(function(i){return i.EAi(t)}),r&&(this.TAi=!0,this.ho=!1,this.So(new D7(this,this.PO)))},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get startTime(){return t.EO},get endTime(){return t.PO},get duration(){return t.ct},get ads(){return t.Jc.Ca},get skipOffset(){return t.JYt},set skipOffset(i){t.JYt=i},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new bR(t,n),n}(this)),this.hu}},{key:"EO",get:function(){return this.OO}},{key:"PO",get:function(){return this.WA?this.OO+this.WA:void 0}},{key:"ct",get:function(){return this.WA}},{key:"Sat",get:function(){var t=this.PO;return Fi(t)?new OA([this.EO,t]):OA.iL()}},{key:"Jc",get:function(){return this.qc}},{key:"SAi",get:function(){return this.TAi}},{key:"ro",get:function(){return this.ho}},{key:"JYt",get:function(){return this.gpi?-1:this.ZYt},set:function(t){this.gpi||(this.ZYt=t)}}]),i}(hh);V(),It(),Bt(),Nt(),V(),It(),Nt();var U7=function(t){function i(i,n){var r;return(r=t.call(this,"Bnt")||this).Int=void 0,r.XF=void 0,r.Int=i,r.XF=n,r}return Pt(i,t),i.prototype.xa=function(){return new V7(this.Int.Ca)},i}(Ig),V7=function(t){function i(i){var n;return(n=t.call(this,"adbegin")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var j7=function(t){function i(i,n){var r;return(r=t.call(this,"Nnt")||this).Int=void 0,r.XF=void 0,r.Int=i,r.XF=n,r}return Pt(i,t),i.prototype.xa=function(){return new H7(this.Int.Ca)},i}(Ig),H7=function(t){function i(i){var n;return(n=t.call(this,"adend")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah);V(),It(),Nt(),V(),It(),Nt();var W7=function(t){function i(i){var n;return(n=t.call(this,"PAi")||this).Int=void 0,n.Int=i,n}return Pt(i,t),i.prototype.xa=function(){return new z7(this.Int.Ca)},i}(Ig),z7=function(t){function i(i){var n;return(n=t.call(this,"removead")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah),q7=function(t){function i(){return t.call(this)||this}Pt(i,t);var n=i.prototype;return n.bei=function(t){},n.Eei=function(t){this.So(new W7(t))},i}(D1);V(),It(),Nt();var X7=function(t){function i(i){var n;return(n=t.call(this,"P4t")||this).Int=void 0,n.Int=i,n}return Pt(i,t),i.prototype.xa=function(){return new G7(this.Int.Ca)},i}(Ig),G7=function(t){function i(i){var n;return(n=t.call(this,"adfirstquartile")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah),Q7=function(t){function i(i){var n;return(n=t.call(this,"x4t")||this).Int=void 0,n.Int=i,n}return Pt(i,t),i.prototype.xa=function(){return new Y7(this.Int.Ca)},i}(Ig),Y7=function(t){function i(i){var n;return(n=t.call(this,"admidpoint")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah),$7=function(t){function i(i){var n;return(n=t.call(this,"I4t")||this).Int=void 0,n.Int=i,n}return Pt(i,t),i.prototype.xa=function(){return new K7(this.Int.Ca)},i}(Ig),K7=function(t){function i(i){var n;return(n=t.call(this,"adthirdquartile")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah),J7=function(t){function i(i){var n;return(n=t.call(this,"xAi")||this).Int=void 0,n.Int=i,n}return Pt(i,t),i.prototype.xa=function(){return new Z7(this.Int.Ca)},i}(Ig),Z7=function(t){function i(i){var n;return(n=t.call(this,"adcomplete")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah);V(),It();var t9=function(t){function i(i,n,r,e,s,u,o,h,a,c,f,v){var d;return void 0===a&&(a=[]),void 0===c&&(c={}),void 0===f&&(f={}),(d=t.call(this)||this).OO=void 0,d.WA=void 0,d.dYt=void 0,d.BAi=void 0,d.SQ=void 0,d.sb=void 0,d.hb=void 0,d.rJt=void 0,d.NAi=void 0,d.Zf=void 0,d.VYt=void 0,d.iYt=void 0,d.hu=void 0,d.ho=void 0,d.MAi=void 0,d.LAi=void 0,d.OAi=void 0,d.FAi=void 0,d.UAi=void 0,d.VAi=void 0,d.OO=i,d.WA=n,d.dYt=r,d.BAi=e,d.SQ=s,d.sb=u,d.hb=o,d.rJt=a,d.NAi=c,d.Zf=f,d.VYt=v,d.iYt=new q7,d.ho=!1,d.MAi=!1,d.LAi=!1,d.OAi=!1,d.FAi=!1,d.UAi=function(){return d.Xyi(d.OO)},d.VAi=function(){return d.Xyi(d.PO)},d.iYt.Sei(h),d.wn("Bnt",d.UAi),d.wn("Nnt",d.VAi),d}Pt(i,t);var n=i.prototype;return n.EAi=function(t){var i=this.EO<=t&&t=.25&&(this.MAi=!0,this.So(new X7(this))),!this.LAi&&i>=.5&&(this.LAi=!0,this.So(new Q7(this))),!this.OAi&&i>=.75&&(this.OAi=!0,this.So(new $7(this))),!this.FAi&&i>=.9999&&(this.FAi=!0,this.So(new J7(this)))},n.rD=function(){this.MAi=!0,this.LAi=!0,this.OAi=!0,this.FAi=!0},n.kn=function(){this.mn("Bnt",this.UAi),this.mn("Nnt",this.VAi)},i.IAi=function(t,n){return new i(t,n.duration,n.apiFramework||"",n.creative,n.mimeType,n.width,n.height,n.companions.map(function(n){return i.IAi(t,n)}),n.extensions,n.fw_parameters,n.events,void 0)},i.RAi=function(t,n){return new i(t,n.duration,n.apiFramework||"",n.creative,n.mimeType,n.width,n.height,n.companions.map(function(n){return i.RAi(t,n)}),n.extensions,n.fw_parameters,void 0,n.ad_id)},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get apiFramework(){return t.cYt},get companions(){return t.tYt.Ca},get creative(){return t.CAi},get duration(){return t.ct},get endTime(){return t.PO},get events(){return t.aQ},get extensions(){return t.nJt},get freeWheelParameters(){return t.DAi},get height(){return t.Mi},get mimeType(){return t.oQ},get startTime(){return t.EO},get width(){return t.Ti},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new bR(t,n),n}(this)),this.hu}},{key:"EO",get:function(){return this.OO}},{key:"PO",get:function(){return this.OO+this.WA}},{key:"ct",get:function(){return this.WA}},{key:"cYt",get:function(){return this.dYt}},{key:"CAi",get:function(){return this.BAi}},{key:"oQ",get:function(){return this.SQ}},{key:"Ti",get:function(){return this.sb}},{key:"Mi",get:function(){return this.hb}},{key:"aQ",get:function(){return this.Zf}},{key:"tYt",get:function(){return this.iYt}},{key:"nJt",get:function(){return this.rJt}},{key:"DAi",get:function(){return this.NAi}},{key:"ro",get:function(){return this.ho}},{key:"iAi",get:function(){var t;return null!=(t=this.Zf.clickthroughs)?t:[]}}]),i}(hh);V(),It(),Nt(),V(),It(),Nt();var i9=function(t){function i(i){var n;return(n=t.call(this,"xnt")||this).od=void 0,n.od=i,n}return Pt(i,t),i.prototype.xa=function(){return new n9(this.od.Ca)},i}(Ig),n9=function(t){function i(i){var n;return(n=t.call(this,"addadbreak")||this).adBreak=void 0,n.adBreak=i,n}return Pt(i,t),i}(ah);V(),It(),Nt();var r9=function(t){function i(i){var n;return(n=t.call(this,"Pnt")||this).od=void 0,n.od=i,n}return Pt(i,t),i.prototype.xa=function(){return new e9(this.od.Ca)},i}(Ig),e9=function(t){function i(i){var n;return(n=t.call(this,"removeadbreak")||this).adBreak=void 0,n.adBreak=i,n}return Pt(i,t),i}(ah),s9=function(t){function i(){return t.call(this)||this}Pt(i,t);var n=i.prototype;return n.bei=function(t){this.So(new i9(t))},n.Eei=function(t){this.So(new r9(t))},i}(D1),u9=function(){function t(t,i,n,r){var e,s=this;this.oa=void 0,this.Cyi=void 0,this.X0t=void 0,this.qAi=void 0,this.WAi=void 0,this.hu=void 0,this.XAi=void 0,this.zAi=[],this.KAi=void 0,this.JAi=function(t){return s.KAi=t,s},this.QAi=function(t){t.oE.ads&&s.qyi(t.oE.ads),t.oE.currentBreakEnd&&s.GAi(t.oE.currentBreakEnd)},this.jAi=function(t){if(0!==s.zAi.length&&0!==s.oa.Tx().length)for(var i,n=s.oa.Tx().end(s.oa.Tx().length-1),r=Ft(s.zAi.slice());!(i=r()).done;){var e=i.value;Fi(e.zKt.ct)?Yn(s.zAi,e):e.Zxte.PO&&this.X0t._S(e)}},i.qyi=function(t){for(var i,n=!function(t){return Fi(t.breakOffsets)}(t),r=n?this.Cyi.cAi:0,e=Ft(t.breaks);!(i=e()).done;){var s=i.value;if(0!==s.ads.length){for(var u,o=s.timeOffset+r,h=new q7,a=0,c=Ft(s.ads);!(u=c()).done;){var f=u.value,v=n?t9.RAi(o,f):t9.IAi(o,f);h.lO(v),o+=v.ct,a+=v.ct}var d=s.timeOffset+r,l=n?void 0:s.duration,g=new F7(d,l,h,n,this.qAi);n&&this.zAi.push({zKt:g,Zxt:d+a}),this.X0t.lO(g)}}},i.GAi=function(t){var i=this.HAi;i&&i.bAi(t+this.Cyi.cAi)},i.Gyi=function(t){this.XAi=t,this.X0t.ec.forEach(function(i){return i.EAi(t)})},i.rD=function(){var t=this.XAi,i=this.ynt;t&&i&&i.kAi(t)&&i.rD()},i.skipAd=function(t){this.rD()},i.Yyi=function(t,i){for(var n,r=[],e=Ft(this.A0t.ec);!(n=e()).done;){var s=n.value;!s.SAi&&s.EO>=t&&s.EO1e4?[4,this.Fbi(t)]:[3,2];case 1:return n.sent(),this.qbi=Vi.Mg(),this.Wbi=0,[3,4];case 2:return[4,Rr(1e4-i,t)];case 3:n.sent(),n.label=4;case 4:return[3,0];case 5:return[2]}})}).call(this)},i.zbi=function(t){var i=t.SOt;if(i&&this.oa.CP&&0===this.Nbi&&!this.Gbi&&0!==A.floor(this.oa.Tx().start(0))){var n=(this.oa.CP.getTime()-i.getTime())/1e3,r=this.oa.LP()-t._Ot;this.Nbi=r-n}},i.Fbi=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:return f.trys.push([0,3,,4]),[4,this.oa.SP.lk({Yu:this.Xbi})];case 1:return[4,f.sent().FT(t)];case 2:if(0===(i=f.sent()).avails.length)return 0!==this.Obi.length&&(this.Obi=[]),[2];if(i.avails.length===this.Obi.length&&i.avails[0].startTimeInSeconds===this.Obi[0]._Ot)return this.zbi(this.Obi[0]),[2];for(n=[],r=Ft(i.avails);!(e=r()).done;){for(s=e.value,u=new x9(s.durationInSeconds,s.startTimeInSeconds,s.availProgramDateTime),o=Ft(s.ads);!(h=o()).done;)a=h.value,(c=new D9(u,n0.hZt,a.startTimeInSeconds,a.trackingEvents)).u4t(a.adId,a.width,a.height,a.durationInSeconds,[],a.skipoffset),u.e4t(c);n.push(u),this.zbi(u)}return this.Obi=An(n,function(t,i){return t._Ot-i._Ot}),[3,4];case 3:throw pr(f.sent()),new p("Failed to poll MediaTailor tracking events");case 4:return[2]}})}).call(this)},i.jbi=function(){var t;null==(t=this.Ubi)||t.Zg(),this.Ubi=void 0,this.Lbi=void 0,this.qbi=-1/0},i.Qbi=function(){if(0!==this.Obi.length){var t=this.Obi[this.Obi.length-1],i=this.Bbi();if(t._Ot+t.p0tthis.NNt)){var o;if(this.Cbi===s)return;return this.Dbi=s,void(null==(o=this.oa.Jc)||o.So(new oO(this.Dbi)))}}var h;if(this.Dbi)null==(h=this.oa.Jc)||h.So(new sO(this.Dbi)),this.Dbi=void 0}}},i.Kbi=function(){var t=this,i=this.mnt;if(0!==i.length){for(var n,r=[],e=Ft(i);!(n=e()).done;){var s=n.value.NKt.filter(function(i){return Jn(t.Ybi,i.eventType)});r=r.concat(s)}for(var u,o=Ft(r);!(u=o()).done;){var h=u.value;this.Jbi(h.startTimeInSeconds)&&(h.eventType===N9.COMPLETE&&this.Zbi(N9.ENGAGED_VIEW),this.$bi(h))}}},i.tSi=function(t,i){return i.NKt.filter(function(i){return Xo(i.eventType,t)})[0]},i.Zbi=function(t){var i=this.mnt;if(0!==i.length){var n=this.tSi(t,i[0]);n&&this.$bi(n)}},i.$bi=function(t){this.zgi(t.eventType);for(var i,n=Ft(t.beaconUrls);!(i=n()).done;){var r=i.value,e={Uk:kl.GET,Yu:r,zT:"",dk:Hd.DT};0,Er(this.iSi(e))}},i.zgi=function(t){var i,n,r=this.mnt;switch(t){case N9.START:i=new aO(r[r.length-1],this.oa.LP());break;case N9.COMPLETE:i=new fO(r[0],this.oa.LP());break;case N9.FIRST_QUARTILE:i=new w0(r[0],this.oa.LP());break;case N9.MID_POINT:i=new y0(r[0],this.oa.LP());break;case N9.THIRD_QUARTILE:i=new _0(r[0],this.oa.LP())}void 0!==i&&(null==(n=this.oa.Jc)||n.So(i))},i.iSi=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.oa.SP.lk(t)];case 1:return i.sent().hk,[2]}})}).call(this)},i.Jbi=function(t){var i=this.Bbi();return t>=this.NNt&&t=s.EO&&this.NNt<=s.EO+s.ct&&n.push(s)}return n}}]),t}();$b(function(t){return function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).eSi=void 0,r.JW=void 0,r.ZW=void 0,r.nSi=void 0,r}Pt(i,t);var n=i.prototype;return n.Ta=function(i){return this.eSi&&(this.eSi.kn(),this.eSi=void 0,this.pEt()),t.prototype.Ta.call(this,i)},n.Xnt=function(i,n){var r=this,e=function(){return t.prototype.Xnt};return jt(function(){var t,s;return zt(this,function(u){switch(u.label){case 0:if(!i||!function(t){return t.sources.some(function(t){return t.integration===GA.MEDIATAILOR})}(i))return[2,e().call(r,i,n)];u.label=1;case 1:return u.trys.push([1,4,,5]),[4,this.sSi(i,n)];case 2:return t=u.sent(),this.nSi=new A0(this),[4,e().call(r,t,n)];case 3:return u.sent(),[3,5];case 4:return s=u.sent(),this.qq(new md(gd.MANIFEST_LOAD_ERROR,s.message,s)),[3,5];case 5:return[2]}})}).call(this)},n.vx=function(i){var n;(null==(n=this.nSi)?void 0:n.inAdBreak)||t.prototype.vx.call(this,i)},n.OP=function(i,n){var r;(null==(r=this.eSi)?void 0:r.Cbi)||t.prototype.OP.call(this,i,n)},n.HP=function(){var i;return null!=(i=this.JW)?i:t.prototype.HP.call(this)},n.qP=function(){var i;return null!=(i=this.ZW)?i:t.prototype.qP.call(this)},n.qq=function(t){this.JW=ww(t),this.ZW=t,this.So(new Ib(t))},n.pEt=function(){this.JW=void 0,this.ZW=void 0},n.sSi=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:n=[],r=Ft(t.sources),c.label=1;case 1:return(e=r()).done?[3,4]:sT(s=e.value)&&(u=s).src?[4,this.rSi(u,i)]:(n.push(s),[3,3]);case 2:o=c.sent(),yr(i),h=io({},u,{integration:void 0,src:o}),n.push(h),c.label=3;case 3:return[3,1];case 4:return(a=Hg(t)).sources=n,[2,a]}})}).call(this)},n.rSi=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:if(n=this,r=t.src||"",!(e=r.match(/.+?(?=\/v1\/)/)))throw new p("Could not find MediaTailor session initialization url");return s=e[0],u=Wo(r,"?ads."),o=u?{Yu:r,dk:Hd.DT}:{Yu:r,Uk:kl.POST,zT:JSON.stringify({adsParams:t.adsParams}),dk:Hd.DT},[4,IT(function(){return n.hSi(o,i)},i)];case 1:h=v.sent();try{a=s+h.manifestUrl,u||(c=s+h.trackingUrl,f=function(t){return!!t&&/\bmpd\b/i.test(t)}(a),this.eSi=new B9(this,c,f))}catch(t){throw new p("Something went wrong parsing the MediaTailor session initialization response")}return[2,a]}})}).call(this)},n.hSi=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,this.SP.lk(t)];case 1:return[4,n.sent().FT(i)];case 2:return[2,n.sent()];case 3:throw pr(n.sent()),new p("Failed to initialize MediaTailor session manifest");case 4:return[2]}})}).call(this)},n.kn=function(){var i;this.eSi&&(this.eSi.kn(),this.eSi=void 0),this.pEt(),null==(i=this.nSi)||i.destroy(),this.nSi=void 0,t.prototype.kn.call(this)},i}(t)},Qb.hnt),V(),It(),V(),It(),Wt(),Yt(),V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Nt(),Yt(),V(),It();var O9=function(t){return t[t.oSi=0]="oSi",t[t.TM=1]="TM",t[t.Gz=2]="Gz",t[t.aSi=3]="aSi",t[t.uSi=4]="uSi",t[t.cSi=5]="cSi",t[t.ma=6]="ma",t}({});V(),It(),Bt(),Nt();var M9=function(t){function i(i,n,r,e,s){var u;return void 0===s&&(s=!1),(u=t.call(this)||this).gO=Iw(),u.dO=new kw,u.vu=void 0,u.pO=void 0,u.b5=void 0,u.hu=void 0,u.sMt=void 0,u.We=void 0,u.vu=i,u.pO=n,u.b5=r,u.We=s,u.sMt=e,u}return Pt(i,t),i.prototype.wO=function(t){this.We=t,t?this.sMt.dSi(this.vu):this.sMt.lSi(this.vu)},xt(i,[{key:"XI",get:function(){}},{key:"Rt",get:function(){return this.We},set:function(t){this.wO(t)}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=uw(this)}},{key:"o",get:function(){return String(this.vu.componentTag)||"hbbtvaudiotrack"}},{key:"Lt",get:function(){return this.b5}},{key:"Th",get:function(){return this.pO}},{key:"bs",get:function(){return""}},{key:"Xk",get:function(){return this.Rt?"enabled":"disabled"},set:function(t){this.wO("enabled"===t)}},{key:"KI",get:function(){return this.dO}},{key:"YI",get:function(){},set:function(t){}},{key:"jI",get:function(){return this.gO}}]),i}(uh);V(),It(),Wt(),Bt(),Nt(),Ut(),Yt(),V(),It(),Wt(),Nt(),Ut(),Yt(),V(),It();var L9=function(t){return t.qm="urn:dvb:casystemid:19219",t.zm="urn:dvb:casystemid:19156",t}({}),F9=function(t){return t.qm="application/vnd.ms-playready.initiator+xml",t.zm="application/widevine+xml",t}({});function U9(t,i,n){switch(t){case"urn:dvb:casystemid:19219":return function(t){return''+(null!=t?t:"")+""}(i);case"urn:dvb:casystemid:19156":if(!n)throw new p("Content URL is needed for Widevine license request");return function(t,i){return''+CK(null!=i?i:"")+""+CK(null!=t?t:"")+""}(i,n);default:throw new p("DRM key system is not supported")}}var V9=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).gSi=void 0,i.wSi=void 0,i.Tu=void 0,i.ASi=void 0,i.ySi=void 0,i.pSi=function(t,n,r){var e,s;if(0!==r){var u=i.bSi(r),o=i.SSi(r),h=new vw(u,o);null==(s=i.ySi)||null==(e=s.jy)||e.call(s,h)}else{var a,c;null==(c=i.ySi)||null==(a=c.Xy)||a.call(c,t)}},i.mSi=function(t,n,r,e){var s=i.TSi(t),u=i.kSi(t),o=new vw(s,u);i.So(new dD(o))},i}Pt(i,t);var n=i.prototype;return n.fSi=function(t){this.vSi(),this.Tu=t},n._Si=function(t){return jt(function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:if(!t.aq.length)return this.vSi(),[2];if(!this.Tu)throw new p("The OIPF DRM agent has to be attached to the DOM");this.gSi||(this.gSi=v.createElement("object"),this.gSi.type="application/oipfDrmAgent",this.Tu.appendChild(this.gSi),this.gSi.onDRMMessageResult=this.pSi,this.gSi.onDRMRightsError=this.mSi,this.wSi=v.createElement("object"),this.wSi.type="application/oipfCapabilities",this.Tu.appendChild(this.wSi)),n=Ft(t.aq),a.label=1;case 1:if((r=n()).done)return[3,6];if(e=r.value,s=void 0,u=void 0,o=void 0,e.kS===xo)s=L9.qm,u=F9.qm,o=U9(L9.qm,e.NW);else{if(e.kS!==Bo)return[3,5];s=L9.zm,u=F9.zm,o=U9(L9.zm,e.NW,t.iR)}a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this._et(u,o,s)];case 3:return a.sent(),this.So(new lD),[2];case 4:return h=a.sent(),i=h,[3,5];case 5:return[3,1];case 6:return i&&this.So(new dD(i)),[2]}})}).call(this)},n.zg=function(){return this.ySi=void 0,this.Tu=void 0,t.prototype.zg.call(this)},n._et=function(t,i,n){var r,e;return this.ySi=new Xa,this.ASi=null==(e=this.gSi)||null==(r=e.sendDRMMessage)?void 0:r.call(e,t,i,n),this.ASi||null==this.ySi.jy||this.ySi.jy.call(this.ySi,new vw(gd.CONTENT_PROTECTION_INTERNAL_ERROR,"No DRM message returned by OIPF DRM agent")),this.ySi.Qy},n.bSi=function(t){switch(t){case 5:return gd.CONTENT_PROTECTION_NOT_SUPPORTED;case 2:case 1:case 3:case 4:case 6:return gd.CONTENT_PROTECTION_INTERNAL_ERROR;default:return gd.CONTENT_PROTECTION_ERROR}},n.SSi=function(t){switch(t){case 2:return"The DRM agent was unable to complete the request";case 3:return"The specified MIME type is unknown for the specified DRM system";case 4:return"User consent is needed for that action";case 5:return"The specified DRM System is unknown";case 6:return"The license message has the wrong format";default:return"Unspecified error occurred"}},n.TSi=function(t){return 0===t?gd.CONTENT_PROTECTION_LICENSE_ERROR:1===t?gd.CONTENT_PROTECTION_LICENSE_INVALID:gd.CONTENT_PROTECTION_ERROR},n.kSi=function(t){switch(t){case 0:return"No license, consumption of the content is blocked";case 1:return"Invalid license, consumption of the content is blocked";case 2:return"Valid license, consumption of the content is unblocked";default:return"Unknown error occurred"}},n.vSi=function(){this.gSi&&(Zi(this.gSi),this.gSi=void 0),this.wSi&&(Zi(this.wSi),this.wSi=void 0)},n.b8=function(t,i,n){return jt(function(){return zt(this,function(t){return[2]})})()},i}(bD);V(),It(),Wt(),Bt(),Yt(),V(),It();var j9=ot,H9=function(){function t(t,i,n){this.YS=void 0,this.TL=void 0,this.PZ=void 0,this.YS=t,this.TL=i,this.PZ=n}var i=t.prototype;return i.TZ=function(t){return!1},i.EZ=function(t){return j9.resolve(void 0)},i._Si=function(t){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.PZ._Si(this.YS)];case 1:return t.sent(),[2]}})}).call(this)},i.zg=function(){return j9.resolve(void 0)},xt(t,[{key:"Sx",get:function(){return OA.tL(0,this.TL.ct)}},{key:"mx",get:function(){return eS.lz},set:function(t){}},{key:"Cd",get:function(){return this.YS}}]),t}(),W9=function(t){function i(i,n){var r;return(r=t.call(this)||this).sc=void 0,r.Dz=void 0,r.PZ=void 0,r.ha=void 0,r.ea=void 0,r.CSi=void 0,r.Gl=void 0,r.B7=void 0,r.N7=void 0,r.eet=void 0,r.net=void 0,r.iq=void 0,r.Sz=void 0,r.JW=void 0,r.EV=void 0,r.yz=void 0,r.xSi=void 0,r.RSi=void 0,r.sc=i,r.Dz=n,r.ha=new aS,r.ea=new fS,r.Gl=new rp,r.iq=void 0,r.Sz=!1,r.JW=void 0,r.EV=Up.VL,r.yz=!0,r.xSi=void 0,r.RSi=function(){var t,i,n,e;(null==(t=r.CSi)?void 0:t.playState)&&((null==(i=r.xSi)?void 0:i.Qy)||2!==r.CSi.playState||r.PSi().catch(yn),3===r.CSi.playState&&(null==(e=r.xSi)||null==(n=e.Xy)||n.call(e,String(r.CSi.playState)),r.xSi=void 0))},r.PZ=new V9(r),r.PZ.wn(vD,r.Rs),r.B7=new Mb([r.Gl]),r.N7=new uD(r),r.eet=new VD,r.net=new aB(r.eet.xe,r.Wu,r.nt,r.Ql,r.Ma,r.mq),r.CSi=r.ISi(),r.PSi().catch(yn),r}Pt(i,t);var n=i.prototype;return n.B9=function(t){this.PZ.fSi(t),this.eet.B9(t)},n.QZ=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;if(r.Km===Op.mV)return r}},n.Un=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:if(this.iq)throw new p("Already loaded a media source");return t.Km!==Op.mV?[3,2]:(this.iq=new H9(t,this,this.PZ),[4,this.iq._Si(t)]);case 1:return i.sent(),[2,this.iq];case 2:throw new p("Unsupported media source configuration for HbbTV");case 3:return[2]}})}).call(this)},n.ESi=function(t){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.PSi()];case 1:return t.sent(),[2]}})}).call(this)},n.Gx=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.PSi()];case 1:return t.sent(),[2]}})}).call(this)},n.KW=function(t){},n.hr=function(){return jt(function(){return zt(this,function(t){return this.iq=void 0,this.xSi=void 0,[2]})}).call(this)},n.C8=function(){return jt(function(){return zt(this,function(t){throw new _("Not supported")})})()},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.hr()];case 1:return t.sent(),this.Gl.kn(),this.B7.kn(),this.eet.kn(),this.net.kn(),this.PZ.mn(vD,this.Rs),[4,this.PZ.zg()];case 2:return t.sent(),[2]}})}).call(this)},n.be=function(){this.yz=!0,this.eet.be()},n.we=function(){this.yz=!1,this.eet.we()},n.vq=function(){return!1},n.gq=function(t,i,n,r,e){throw new p("Adding native sideloaded text tracks is not supported on HbbTV")},n.x9=function(){},n.I9=function(){},n.D9=function(){},n.ZP=function(){return{iO:0,eO:0,sO:0}},n.Yx=function(){},n.wq=function(t){throw new p("Adding custom text tracks is not supported on HbbTV")},n.Wx=function(){},n.tI=function(t,i,n,r,e,s,u,o,h){var a=new sN(t,i,n,r,e,s,u,h,o);return this.Gl.tt(a),this.N7.tt(a),a},n.Aq=function(){for(var t,i=Ft(this.Gl.II.slice());!(t=i()).done;){t.value.kn()}this.Gl.hr()},n.iV=function(t){this.Gl.it(t),this.N7.it(t)},n.ISi=function(){for(var t=v.getElementsByTagName("object"),i=0;i=0?n:i.length};return An(t,function(t,i){return n(t)-n(i)})},xt(i,[{key:"ht",get:function(){return this.TL.ht}},{key:"IP",get:function(){return this.TL.IP._s()}},{key:"BL",get:function(){}},{key:"CP",get:function(){return this.TL.CP},set:function(t){t&&this.TL.KW(t)}},{key:"bt",get:function(){return this.Ac}},{key:"MP",get:function(){return this.TL.MP},set:function(t){this.TL.My(t)}},{key:"hq",get:function(){return this.oq}},{key:"ct",get:function(){return this.TL.ct}},{key:"UP",get:function(){return this.TL.UP}},{key:"WP",get:function(){return this.ZW}},{key:"lt",get:function(){return this.JW}},{key:"zP",get:function(){}},{key:"jP",get:function(){}},{key:"KP",get:function(){return!1}},{key:"Vx",get:function(){return this.TL.Vx},set:function(t){this.TL.Vx=t}},{key:"Fx",get:function(){return this.Cz}},{key:"JP",get:function(){return io({},{iO:0,eO:0,sO:0,nO:0,rO:0,hO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.TL.ZP())}},{key:"$P",get:function(){return this.TL.$P},set:function(t){this.TL.$P=t}},{key:"sx",get:function(){return!0}},{key:"hx",get:function(){return this.TL.hx}},{key:"ux",get:function(){return this.TL.ux},set:function(t){this.TL.ux=t}},{key:"_x",get:function(){return this.TL._x._s()}},{key:"mx",get:function(){return this.tq},set:function(t){this.tq=t,this.iq&&(this.iq.mx=t)}},{key:"Ax",get:function(){return this.TL.Ax}},{key:"Sx",get:function(){return this.TL.Sx._s()}},{key:"kx",get:function(){return this.TL.kx}},{key:"nq",get:function(){return this.TL.nq}},{key:"nt",get:function(){return this.Gl}},{key:"Rx",get:function(){return this.TL.Rx}},{key:"rt",get:function(){return this.TL.rt}},{key:"Bx",get:function(){return this.TL.Bx}},{key:"Mx",get:function(){return this.TL.Mx},set:function(t){this.TL.Mx=t}}]),i}(uh),Q9=function(){function t(){this.Kq=Nb.vW}var i=t.prototype;return i.PR=function(t,i,n,r,e,s,u,o){return new G9(t,n,s,u)},i.Xq=function(t,i){var n;return!(!Oi.k_||t.type!==pA.fR&&!tT(t.type)&&!iT(t.type))&&!(Br()&&!(null==(n=t.contentProtection)?void 0:n.useOipfDrmAgent)&&(!t.contentProtection||nh()))},i.jq=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,V_(t,!0)];case 1:return i.sent()?[2,!0]:[2,!1]}})})()},i.Qq=function(){return!1},t}();iS(new Q9),V(),It(),V(),It(),V(),It(),Ut();var Y9=[];function $9(t){Y9.push(t)}var K9=[];function J9(t){K9.push(t)}V(),It(),Bt(),Nt(),V(),It(),V(),It(),V(),It();var Z9=void 0!==f?f:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ttt=void 0!==v?v:{createElement:function(){}};function itt(t,i){return i||(i=t.slice(0)),t.raw=i,t}var ntt=1;function rtt(){return ntt++}var ett,stt=b.prototype.toString,utt=function(t){return att(t)?b.keys(t):[]};function ott(t,i){utt(t).forEach(function(n){return i(t[n],n)})}function htt(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r0)for(var n=t.attributes,r=n.length-1;r>=0;r--){var e=n[r].name,s=n[r].value;"boolean"!=typeof t[e]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+e+",")||(s=null!==s),i[e]=s}return i}function Mtt(t,i,n){t.setAttribute(i,n)}function Ltt(t,i){t.removeAttribute(i)}function Ftt(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var n=ttt.documentElement,r=ttt.body,e=n.clientLeft||r.clientLeft||0,s=Z9.pageXOffset||r.scrollLeft,u=i.left+s-e,o=n.clientTop||r.clientTop||0,h=Z9.pageYOffset||r.scrollTop,a=i.top+h-o;return{left:A.round(u),top:A.round(a)}}function Utt(t,i){var n={},r=Ftt(t),e=t.offsetWidth,s=t.offsetHeight,u=r.top,o=r.left,h=i.pageY,a=i.pageX;return i.changedTouches&&(a=i.changedTouches[0].pageX,h=i.changedTouches[0].pageY),n.y=A.max(0,A.min(1,(u-h+s)/s)),n.x=A.max(0,A.min(1,(a-o)/e)),n}function Vtt(t){return att(t)&&3===t.nodeType}function jtt(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Htt(t,i){return function(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),_tt(t)||Vtt(t)?t:"string"==typeof t&&/\S/.test(t)?ttt.createTextNode(t):void 0}).filter(function(t){return t})}(i).forEach(function(i){return t.appendChild(i)}),t}function Wtt(t,i){return Htt(jtt(t),i)}var ztt=ktt("querySelector"),qtt=ktt("querySelectorAll"),Xtt=Z9.navigator&&Z9.navigator.userAgent||"",Gtt=/AppleWebKit\/([\d.]+)/i.exec(Xtt),Qtt=Gtt?S(Gtt.pop()):null,Ytt=/iPad/i.test(Xtt),$tt=/iPhone/i.test(Xtt)&&!Ytt,Ktt=/iPod/i.test(Xtt),Jtt=$tt||Ytt||Ktt,Ztt=function(){var t=Xtt.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),tit=/Android/i.test(Xtt),iit=function(){var t=Xtt.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&S(t[1]),n=t[2]&&S(t[2]);return i&&n?S(t[1]+"."+t[2]):i||null}(),nit=tit&&/webkit/i.test(Xtt)&&iit<2.3,rit=tit&&iit<5&&Qtt<537,eit=/Firefox/i.test(Xtt),sit=/Edge/i.test(Xtt),uit=!sit&&/Chrome/i.test(Xtt),oit=function(){var t=Xtt.match(/Chrome\/(\d+)/);return t&&t[1]?S(t[1]):null}(),hit=/MSIE\s8\.0/.test(Xtt),ait=function(){var t=/MSIE\s(\d+)\.\d/.exec(Xtt),i=t&&S(t[1]);return!i&&/Trident\/7.0/i.test(Xtt)&&/rv:11.0/.test(Xtt)&&(i=11),i}(),cit=/Safari/i.test(Xtt)&&!uit&&!tit&&!sit,fit=cit||Jtt,vit=ptt()&&("ontouchstart"in Z9||Z9.DocumentTouch&&Z9.document instanceof Z9.DocumentTouch),dit=ptt()&&"backgroundSize"in Z9.document.createElement("video").style,lit=b.freeze({__proto__:null,IS_IPAD:Ytt,IS_IPHONE:$tt,IS_IPOD:Ktt,IS_IOS:Jtt,IOS_VERSION:Ztt,IS_ANDROID:tit,ANDROID_VERSION:iit,IS_OLD_ANDROID:nit,IS_NATIVE_ANDROID:rit,IS_FIREFOX:eit,IS_EDGE:sit,IS_CHROME:uit,CHROME_VERSION:oit,IS_IE8:hit,IE_VERSION:ait,IS_SAFARI:cit,IS_ANY_SAFARI:fit,TOUCH_ENABLED:vit,BACKGROUND_SIZE_SUPPORTED:dit});function git(t,i){var n=Itt(t);0===n.handlers[i].length&&(delete n.handlers[i],t.removeEventListener?t.removeEventListener(i,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+i,n.dispatcher)),b.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===b.getOwnPropertyNames(n).length&&Ctt(t)}function wit(t,i,n,r){n.forEach(function(n){t(i,n,r)})}function mit(t){function i(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var r=t||Z9.event;for(var e in t={},r)"layerX"!==e&&"layerY"!==e&&"keyLocation"!==e&&"webkitMovementX"!==e&&"webkitMovementY"!==e&&"path"!==e&&("returnValue"===e&&r.preventDefault||(t[e]=r[e]));if(t.target||(t.target=t.srcElement||ttt),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=i},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=i,t.stopPropagation()},t.isImmediatePropagationStopped=n,null!==t.clientX&&void 0!==t.clientX){var s=ttt.documentElement,u=ttt.body;t.pageX=t.clientX+(s&&s.scrollLeft||u&&u.scrollLeft||0)-(s&&s.clientLeft||u&&u.clientLeft||0),t.pageY=t.clientY+(s&&s.scrollTop||u&&u.scrollTop||0)-(s&&s.clientTop||u&&u.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var yit=!1;!function(){try{var t=b.defineProperty({},"passive",{get:function(){yit=!0}});Z9.addEventListener("test",null,t)}catch(t){}}();var pit=["touchstart","touchmove"];function _it(t,i,n){if(Array.isArray(i))return wit(_it,t,i,n);var r=Itt(t);if(r.handlers||(r.handlers={}),r.handlers[i]||(r.handlers[i]=[]),n.guid||(n.guid=rtt()),r.handlers[i].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(i,n){if(!r.disabled){i=mit(i);var e=r.handlers[i.type];if(e)for(var s=e.slice(0),u=0,o=s.length;u-1&&(e={passive:!0}),t.addEventListener(i,r.dispatcher,e)}else t.attachEvent&&t.attachEvent("on"+i,r.dispatcher)}function kit(t,i,n){if(Rtt(t)){var r=Itt(t);if(r.handlers){if(Array.isArray(i))return wit(kit,t,i,n);var e=function(i){r.handlers[i]=[],git(t,i)};if(i){var s=r.handlers[i];if(s)if(n){if(n.guid)for(var u=0;u0)for(var r=0,e=t.length;r0)for(var s=0,u=i.length;s0)for(var o=0,h=n.length;o=0;t--)this.m[t].dispose&&this.m[t].dispose();this.m=null,this.k=null,this.C=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),Ctt(this.v),this.v=null},i.player=function(){return this.t},i.options=function(t){return vtt.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=Dit(this.h,t),this.h):this.h},i.el=function(){return this.v},i.createEl=function(t,i,n){return btt(t,i,n)},i.localize=function(t){var i=this.t.language&&this.t.language(),n=this.t.languages&&this.t.languages();if(!i||!n)return t;var r=n[i];if(r&&r[t])return r[t];var e=n[i.split("-")[0]];return e&&e[t]?e[t]:t},i.contentEl=function(){return this.S||this.v},i.id=function(){return this.o},i.name=function(){return this.l},i.children=function(){return this.m},i.getChildById=function(t){return this.k[t]},i.getChild=function(t){if(t)return t=Nit(t),this.C[t]},i.addChild=function(i,n,r){var e,s;if(void 0===n&&(n={}),void 0===r&&(r=this.m.length),"string"==typeof i){s=Nit(i),n||(n={}),!0===n&&(vtt.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),n={});var u=n.componentClass||s;n.name=s;var o=t.getComponent(u);if(!o)throw new p("Component "+u+" does not exist");if("function"!=typeof o)return null;e=new o(this.t||this,n)}else e=i;if(this.m.splice(r,0,e),"function"==typeof e.id&&(this.k[e.id()]=e),(s=s||e.name&&Nit(e.name()))&&(this.C[s]=e),"function"==typeof e.el&&e.el()){var h=this.contentEl().children[r]||null;this.contentEl().insertBefore(e.el(),h)}return e},i.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.m){for(var i=!1,n=this.m.length-1;n>=0;n--)if(this.m[n]===t){i=!0,this.m.splice(n,1);break}if(i){this.k[t.id()]=null,this.C[t.name()]=null;var r=t.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},i.initChildren=function(){var i=this,n=this.h.children;if(n){var r,e=this.h,s=t.getComponent("Tech");(r=Array.isArray(n)?n:b.keys(n)).concat(b.keys(this.h).filter(function(t){return!r.some(function(i){return"string"==typeof i?t===i:t===i.name})})).map(function(t){var r,e;return"string"==typeof t?e=n[r=t]||i.h[r]||{}:(r=t.name,e=t),{name:r,opts:e}}).filter(function(i){var n=t.getComponent(i.opts.componentClass||Nit(i.name));return n&&!s.isTech(n)}).forEach(function(t){var n=t.name,r=t.opts;if(void 0!==e[n]&&(r=e[n]),!1!==r){!0===r&&(r={}),r.playerOptions=i.h.playerOptions;var s=i.addChild(n,r);s&&(i[n]=s)}})}},i.buildCSSClass=function(){return""},i.on=function(t,i,n){var r=this;if("string"==typeof t||Array.isArray(t))_it(this.v,t,Pit(this,i));else{var e=t,s=i,u=Pit(this,n),o=function(){return r.off(e,s,u)};o.guid=u.guid,this.on("dispose",o);var h=function(){return r.off("dispose",o)};h.guid=u.guid,t.nodeName?(_it(e,s,u),_it(e,"dispose",h)):"function"==typeof t.on&&(e.on(s,u),e.on("dispose",h))}return this},i.off=function(t,i,n){if(!t||"string"==typeof t||Array.isArray(t))kit(this.v,t,i);else{var r=t,e=i,s=Pit(this,n);this.off("dispose",s),t.nodeName?(kit(r,e,s),kit(r,"dispose",s)):(r.off(e,s),r.off("dispose",s))}return this},i.one=function(t,i,n){var r=arguments,e=this;if("string"==typeof t||Array.isArray(t))Ait(this.v,t,Pit(this,i));else{var s=t,u=i,o=Pit(this,n),h=function t(){e.off(s,u,t),o.apply(null,r)};h.guid=o.guid,this.on(s,u,h)}return this},i.trigger=function(t,i){return bit(this.v,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.j?i?t.call(this):this.setTimeout(t,1):(this.T=this.T||[],this.T.push(t))),this},i.triggerReady=function(){this.j=!0,this.setTimeout(function(){var t=this.T;this.T=[],t&&t.length>0&&t.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},i.$=function(t,i){return ztt(t,i||this.contentEl())},i.$$=function(t,i){return qtt(t,i||this.contentEl())},i.hasClass=function(t){return Ptt(this.v,t)},i.addClass=function(t){return Ntt(this.v,t),this},i.removeClass=function(t){return Dtt(this.v,t),this},i.toggleClass=function(t,i){return xtt(this.v,t,i),this},i.show=function(){return this.removeClass("vjs-hidden"),this},i.hide=function(){return this.addClass("vjs-hidden"),this},i.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},i.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},i.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.v,t)},i.setAttribute=function(t,i){return Mtt(this.v,t,i),this},i.removeAttribute=function(t){return Ltt(this.v,t),this},i.width=function(t,i){return this.dimension("width",t,i)},i.height=function(t,i){return this.dimension("height",t,i)},i.dimensions=function(t,i){return this.width(t,!0).height(i)},i.dimension=function(t,i,n){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.v.style[t]=i:this.v.style[t]="auto"===i?"":i+"px",n||this.trigger("resize"),this;if(!this.v)return 0;var r=this.v.style[t],e=r.indexOf("px");return T(-1!==e?r.slice(0,e):this.v["offset"+Nit(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new p("currentDimension only accepts width or height value");if("function"==typeof Z9.getComputedStyle){var n=Z9.getComputedStyle(this.v);i=n.getPropertyValue(t)||n[t]}if(0===(i=S(i))){var r="offset"+Nit(t);i=this.v[r]}return i},i.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},i.currentWidth=function(){return this.currentDimension("width")},i.currentHeight=function(){return this.currentDimension("height")},i.focus=function(){this.v.focus()},i.blur=function(){this.v.blur()},i.emitTapEvents=function(){var t,i=0,n=null;this.on("touchstart",function(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},i=(new Date).getTime(),t=!0)}),this.on("touchmove",function(i){if(i.touches.length>1)t=!1;else if(n){var r=i.touches[0].pageX-n.pageX,e=i.touches[0].pageY-n.pageY;A.sqrt(r*r+e*e)>10&&(t=!1)}});var r=function(){t=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",function(r){(n=null,!0===t)&&((new Date).getTime()-i<200&&(r.preventDefault(),this.trigger("tap")))})},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=Pit(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){i(),this.clearInterval(t),t=this.setInterval(i,250)});var n=function(n){i(),this.clearInterval(t)};this.on("touchmove",i),this.on("touchend",n),this.on("touchcancel",n)}},i.setTimeout=function(t,i){t=Pit(this,t);var n=Z9.setTimeout(t,i),r=function(){this.clearTimeout(n)};return r.guid="vjs-timeout-"+n,this.on("dispose",r),n},i.clearTimeout=function(t){Z9.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=Pit(this,t);var n=Z9.setInterval(t,i),r=function(){this.clearInterval(n)};return r.guid="vjs-interval-"+n,this.on("dispose",r),n},i.clearInterval=function(t){Z9.clearInterval(t);var i=function(){};return i.guid="vjs-interval-"+t,this.off("dispose",i),t},t.registerComponent=function(i,n){if(i){if(i=Nit(i),t.M||(t.M={}),"Player"===i&&t.M[i]){var r=t.M[i];if(r.players&&b.keys(r.players).length>0&&b.keys(r.players).map(function(t){return r.players[t]}).every(Boolean))throw new p("Can not register Player component after player has been created")}return t.M[i]=n,n}},t.getComponent=function(i){if(i)return i=Nit(i),t.M&&t.M[i]?t.M[i]:Z9&&Z9.videojs&&Z9.videojs[i]?(vtt.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),Z9.videojs[i]):void 0},t.extend=function(i){i=i||{},vtt.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var n=i.init||i.init||this.prototype.init||this.prototype.init||function(){},r=function(){n.apply(this,arguments)};for(var e in(r.prototype=b.create(this.prototype)).constructor=r,r.extend=t.extend,i)i.hasOwnProperty(e)&&(r.prototype[e]=i[e]);return r},t}();xit.registerComponent("Component",xit);var Bit=function(){};function Oit(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Mit(t,i){return(Mit=b.setPrototypeOf?b.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function Lit(t,i){t.prototype=b.create(i.prototype),t.prototype.constructor=t,Mit(t,i)}function Fit(t,i,n,r){return void 0===r&&(vtt.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),r=0),function(t,i,n){if(i<0||i>n)throw new p("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+i+") is greater than or equal to the maximum bound ("+n+").")}(t,r,n.length-1),n[r][i]}function Uit(t){return void 0===t||0===t.length?{length:0,start:function(){throw new p("This TimeRanges object is empty")},end:function(){throw new p("This TimeRanges object is empty")}}:{length:t.length,start:Fit.bind(null,"start",0,t),end:Fit.bind(null,"end",1,t)}}function Vit(t,i){return Array.isArray(t)?Uit(t):void 0===t||void 0===i?Uit():Uit([[t,i]])}function jit(t,i){var n,r,e=0;if(!i)return 0;t&&t.length||(t=Vit(0,0));for(var s=0;si&&(r=i),e+=r-n;return e/i}Bit.prototype.A={},Bit.prototype.on=function(t,i){var n=this.addEventListener;this.addEventListener=function(){},_it(this,t,i),this.addEventListener=n},Bit.prototype.addEventListener=Bit.prototype.on,Bit.prototype.off=function(t,i){kit(this,t,i)},Bit.prototype.removeEventListener=Bit.prototype.off,Bit.prototype.one=function(t,i){var n=this.addEventListener;this.addEventListener=function(){},Ait(this,t,i),this.addEventListener=n},Bit.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=mit(t),this.A[i]&&this["on"+i]&&this["on"+i](t),bit(this,t)},Bit.prototype.dispatchEvent=Bit.prototype.trigger;var Hit,Wit,zit,qit,Xit={prefixed:!0},Git=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Qit=Git[0];for(Wit=0;Wit',n=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),ttt.body.appendChild(r));for(var s={},u=0;u=0&&"[object Function]"===Cnt.call(t.callee)),n};b.keys||(lnt=b.prototype.hasOwnProperty,gnt=b.prototype.toString,wnt=Pnt,mnt=b.prototype.propertyIsEnumerable,ynt=!mnt.call({toString:null},"toString"),pnt=mnt.call(function(){},"prototype"),_nt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],knt=function(t){var i=t.constructor;return i&&i.prototype===t},bnt={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Ant=function(){if(void 0===f)return!1;for(var t in f)try{if(!bnt["$"+t]&&lnt.call(f,t)&&null!==f[t]&&"object"==typeof f[t])try{knt(f[t])}catch(t){return!0}}catch(t){return!0}return!1}(),Tnt=function(t){if(void 0===f||!Ant)return knt(t);try{return knt(t)}catch(t){return!1}},dnt=function(t){var i=null!==t&&"object"==typeof t,n="[object Function]"===gnt.call(t),r=wnt(t),e=i&&"[object String]"===gnt.call(t),s=[];if(!i&&!n&&!r)throw new _("Object.keys called on a non-object");var u=pnt&&n;if(e&&t.length>0&&!lnt.call(t,0))for(var o=0;o0)for(var h=0;h2?arguments[2]:{},r=Lnt(i);Fnt&&(r=Vnt.call(r,b.getOwnPropertySymbols(i)));for(var e=0;e1&&"boolean"!=typeof i)throw new _('"allowMissing" argument must be a boolean');var n="$ "+t;if(!(n in trt))throw new k("intrinsic "+t+" does not exist!");if(void 0===trt[n]&&!i)throw new _("intrinsic "+t+" exists, but is not available. Please file an issue!");return trt[n]},nrt=Rnt.call(Function.call,b.prototype.hasOwnProperty),rrt=irt,ert=rrt("%TypeError%"),srt=rrt("%SyntaxError%"),urt=nrt,ort={"Property Descriptor":function(t,i){if("Object"!==t.Type(i))return!1;var n={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in i)if(urt(i,r)&&!n[r])return!1;var e=urt(i,"[[Value]]"),s=urt(i,"[[Get]]")||urt(i,"[[Set]]");if(e&&s)throw new ert("Property Descriptors may not be both accessor and data descriptors");return!0}},hrt=Number.isNaN||function(t){return t!=t},art=Number.isNaN||function(t){return t!=t},crt=Number.isFinite||function(t){return"number"==typeof t&&!art(t)&&t!==1/0&&t!==-1/0},frt=Function.prototype.toString,vrt=/^\s*class\b/,drt=function(t){try{var i=frt.call(t);return vrt.test(i)}catch(t){return!1}},lrt=b.prototype.toString,grt="function"==typeof i&&"symbol"==typeof i.toStringTag,wrt=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(grt)return function(t){try{return!drt(t)&&(frt.call(t),!0)}catch(t){return!1}}(t);if(drt(t))return!1;var i=lrt.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},mrt=b.prototype.toString,yrt=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},prt=wrt,_rt=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===mrt.call(t)?String:Number)===String||i===Number){var n,r,e=i===String?["toString","valueOf"]:["valueOf","toString"];for(r=0;r=0?1:-1},Crt=function(t,i){var n=t%i;return A.floor(n>=0?n:n+i)},Prt=function(t){return yrt(t)?t:arguments.length>1?_rt(t,arguments[1]):_rt(t)},Nrt=nrt,Drt={ToPrimitive:Prt,ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return Ert(i)?0:0!==i&&Irt(i)?Rrt(i)*A.floor(A.abs(i)):i},ToInt32:function(t){return this.ToNumber(t)|0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var i=this.ToNumber(t);if(Ert(i)||0===i||!Irt(i))return 0;var n=Rrt(i)*A.floor(A.abs(i));return Crt(n,65536)},ToString:function(t){return Trt(t)},ToObject:function(t){return this.CheckObjectCoercible(t),brt(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new Art(i||"Cannot call method on "+t);return t},IsCallable:wrt,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:Ert(t)&&Ert(i)},Type:function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0},IsPropertyDescriptor:function(t){if("Object"!==this.Type(t))return!1;var i={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in t)if(Nrt(t,n)&&!i[n])return!1;var r=Nrt(t,"[[Value]]"),e=Nrt(t,"[[Get]]")||Nrt(t,"[[Set]]");if(r&&e)throw new Art("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(Srt(this,"Property Descriptor","Desc",t),!(!Nrt(t,"[[Get]]")&&!Nrt(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(Srt(this,"Property Descriptor","Desc",t),!(!Nrt(t,"[[Value]]")&&!Nrt(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(Srt(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(Srt(this,"Property Descriptor","Desc",t),this.IsDataDescriptor(t))return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};if(this.IsAccessorDescriptor(t))return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};throw new Art("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new Art("ToPropertyDescriptor requires an object");var i={};if(Nrt(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),Nrt(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),Nrt(t,"value")&&(i["[[Value]]"]=t.value),Nrt(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),Nrt(t,"get")){var n=t.get;if(void 0!==n&&!this.IsCallable(n))throw new _("getter must be a function");i["[[Get]]"]=n}if(Nrt(t,"set")){var r=t.set;if(void 0!==r&&!this.IsCallable(r))throw new Art("setter must be a function");i["[[Set]]"]=r}if((Nrt(i,"[[Get]]")||Nrt(i,"[[Set]]"))&&(Nrt(i,"[[Value]]")||Nrt(i,"[[Writable]]")))throw new Art("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},xrt=Rnt.call(Function.call,String.prototype.replace),Brt=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Ort=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,Mrt=function(){var t=Drt.ToString(Drt.CheckObjectCoercible(this));return xrt(xrt(t,Brt,""),Ort,"")},Lrt=Mrt,Frt=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:Lrt},Urt=Xnt,Vrt=Frt,jrt=Xnt,Hrt=Mrt,Wrt=Frt,zrt=function(){var t=Vrt();return Urt(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},qrt=Rnt.call(Function.call,Wrt());jrt(qrt,{getPolyfill:Wrt,implementation:Hrt,shim:zrt});var Xrt=qrt,Grt=wrt,Qrt=b.prototype.toString,Yrt=b.prototype.hasOwnProperty,$rt=function(t,i,n){if(!Grt(i))throw new _("iterator must be a function");var r;arguments.length>=3&&(r=n),"[object Array]"===Qrt.call(t)?function(t,i,n){for(var r=0,e=t.length;r0&&(c=g(function(){h=!0,a.abort("timeout");var t=new p("XMLHttpRequest timeout");t.code="ETIMEDOUT",s(t)},t.timeout)),a.setRequestHeader)for(o in l)l.hasOwnProperty(o)&&a.setRequestHeader(o,l[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new p("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(a.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(a),a.send(d),a}oet.XMLHttpRequest=iet.XMLHttpRequest||function(){},oet.XDomainRequest="withCredentials"in new oet.XMLHttpRequest?oet.XMLHttpRequest:iet.XDomainRequest,function(t,i){for(var n=0;n0&&(Z9.console&&Z9.console.groupCollapsed&&Z9.console.groupCollapsed("Text Track parsing errors for "+i.src),r.forEach(function(t){return vtt.error(t)}),Z9.console&&Z9.console.groupEnd&&Z9.console.groupEnd()),n.flush()},cet=function(t){function i(n){var r;if(void 0===n&&(n={}),!n.tech)throw new p("A tech was not provided.");var e=Dit(n,{kind:snt[n.kind]||"subtitles",language:n.language||n.srclang||""}),s=unt[e.mode]||"disabled",u=e.default;"metadata"!==e.kind&&"chapters"!==e.kind||(s="hidden");var o=r=t.call(this,e)||this;if(o.H=e.tech,hit)for(var h in i.prototype)"constructor"!==h&&(o[h]=i.prototype[h]);o.L=[],o.q=[];var a=new nnt(o.L),c=new nnt(o.q),f=!1,v=Pit(o,function(){this.activeCues,f&&(this.trigger("cuechange"),f=!1)});return"disabled"!==s&&o.H.ready(function(){o.H.on("timeupdate",v)},!0),b.defineProperty(o,"default",{get:function(){return u},set:function(){}}),b.defineProperty(o,"mode",{get:function(){return s},set:function(t){var i=this;unt[t]&&("showing"===(s=t)&&this.H.ready(function(){i.H.on("timeupdate",v)},!0),this.trigger("modechange"))}}),b.defineProperty(o,"cues",{get:function(){return this.W?a:null},set:function(){}}),b.defineProperty(o,"activeCues",{get:function(){if(!this.W)return null;if(0===this.cues.length)return c;for(var t=this.H.currentTime(),i=[],n=0,r=this.cues.length;n=t||e.startTime===e.endTime&&e.startTime<=t&&e.startTime+.5>=t)&&i.push(e)}if(f=!1,i.length!==this.q.length)f=!0;else for(var s=0;s=0;s--)if(n[s].selected){met(n,n[s]);break}if(hit){for(var u in e=ttt.createElement("custom"),get.prototype)"constructor"!==u&&(e[u]=get.prototype[u]);for(var o in i.prototype)"constructor"!==o&&(e[o]=i.prototype[o])}return(e=r=t.call(this,n,e)||this).st=!1,b.defineProperty(e,"selectedIndex",{get:function(){for(var t=0;t=0;s--)if(n[s].enabled){pet(n,n[s]);break}if(hit){for(var u in e=ttt.createElement("custom"),get.prototype)"constructor"!==u&&(e[u]=get.prototype[u]);for(var o in i.prototype)"constructor"!==o&&(e[o]=i.prototype[o])}return(e=r=t.call(this,n,e)||this).st=!1,e||Oit(r)}Lit(i,t);var n=i.prototype;return n.tt=function(i){var n=this;i.enabled&&pet(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",function(){n.st||(n.st=!0,pet(n,i),n.st=!1,n.trigger("change"))})},n.addTrack=function(t){this.tt(t)},n.removeTrack=function(i){t.prototype.it.call(this,i)},i}(get),ket=void 0;var bet=function(t){function i(i,n){var r;return void 0===i&&(i={}),void 0===n&&(n=function(){}),i.reportTouchActivity=!1,(r=t.call(this,null,i,n)||this).et=!1,r.on("playing",function(){this.et=!0}),r.on("loadstart",function(){this.et=!1}),r.nt=i.textTracks,r.rt=i.videoTracks,r.ht=i.audioTracks,r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===i["native"+t+"Tracks"]&&(r["featuresNative"+t+"Tracks"]=!1)}),!1===i.nativeCaptions&&(r.featuresNativeTextTracks=!1),r.featuresNativeTextTracks||r.emulateTextTracks(),r.ot=new wet,r.initTextTrackListeners(),r.initTrackListeners(),i.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.l=r.constructor.name||"Unknown Tech"),r}Lit(i,t);var n=i.prototype;return 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(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Pit(this,function(){var t=this.bufferedPercent();this.ut!==t&&this.trigger("progress"),this.ut=t,1===t&&this.stopTrackingProgress()}),500)},n.onDurationChange=function(t){this.ct=this.duration()},n.buffered=function(){return Vit(0,0)},n.bufferedPercent=function(){return jit(this.buffered(),this.ct)},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(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},n.clearTracks=function(t){var i=this;(t=[].concat(t)).forEach(function(t){for(var n=i[t+"Tracks"]()||[],r=n.length;r--;){var e=n[r];"text"===t&&i.removeRemoteTextTrack(e),n.it(e)}})},n.cleanupAutoTextTracks=function(){for(var t=this.ot||[],i=t.length;i--;){var n=t[i];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.error=function(t){return void 0!==t&&(this.lt=new Yit(t),this.trigger("error")),this.lt},n.played=function(){return this.et?Vit(0,0):Vit()},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTextTrackListeners=function(){var t=Pit(this,function(){this.trigger("texttrackchange")}),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",Pit(this,function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)})))},n.initTrackListeners=function(){var t=this;["video","audio"].forEach(function(i){var n=function(){t.trigger(i+"trackchange")},r=t[i+"Tracks"]();r.addEventListener("removetrack",n),r.addEventListener("addtrack",n),t.on("dispose",function(){r.removeEventListener("removetrack",n),r.removeEventListener("addtrack",n)})})},n.dt=function(){var t=this;if(!Z9.WebVTT)if(ttt.body.contains(this.el())){if(!this.h["vtt.js"]&&ctt(ket)&&b.keys(ket).length>0)return void this.trigger("vttjsloaded");var i=ttt.createElement("script");i.src=this.h["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",i.onload=function(){t.trigger("vttjsloaded")},i.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){i.onload=null,i.onerror=null}),Z9.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.dt)},n.emulateTextTracks=function(){var t=this,i=this.textTracks();if(i){var n=this.remoteTextTracks(),r=function(t){return i.tt(t.track)},e=function(t){return i.it(t.track)};n.on("addtrack",r),n.on("removetrack",e),this.dt();var s=function(){return t.trigger("texttrackchange")},u=function(){s();for(var t=0;t0||u>0?e+":":"")+(r=((e||s>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)}Met.prototype.St="Play",xit.registerComponent("PlayToggle",Met);var Fet=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"timeupdate",r.updateContent),r.on(i,"languagechange",r.updateContent),r}Lit(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.S=btt("div",{className:"vjs-current-time-display",innerHTML:'Current Time 0:00'},{"aria-live":"off"}),i.appendChild(this.S),i},n.updateContent=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),n=this.localize("Current Time"),r=Let(i,this.t.duration());r!==this.Mt&&(this.Mt=r,this.S.innerHTML=''+n+" "+r)},i}(xit);xit.registerComponent("CurrentTimeDisplay",Fet);var Uet=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"durationchange",r.updateContent),r.on(i,"timeupdate",r.updateContent),r.on(i,"loadedmetadata",r.updateContent),r.on(i,"languagechange",r.updateContent),r}Lit(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.S=btt("div",{className:"vjs-duration-display",innerHTML:''+this.localize("Duration Time")+" 0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},n.updateContent=function(t){var i=this.t.duration();if(i&&this.ct!==i){this.ct=i;var n=this.localize("Duration Time"),r=Let(i);this.S.innerHTML=''+n+" "+r}},i}(xit);xit.registerComponent("DurationDisplay",Uet);var Vet=function(t){function i(){return t.apply(this,arguments)||this}return Lit(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"
/
"})},i}(xit);xit.registerComponent("TimeDivider",Vet);var jet=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"timeupdate",r.updateContent),r.on(i,"durationchange",r.updateContent),r.on(i,"languagechange",r.updateContent),r}Lit(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.S=btt("div",{className:"vjs-remaining-time-display",innerHTML:''+this.localize("Remaining Time")+" -0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},n.updateContent=function(t){if(this.t.duration()){var i=this.localize("Remaining Time"),n=Let(this.t.remainingTime());n!==this.Mt&&(this.Mt=n,this.S.innerHTML=''+i+" -"+n)}},i}(xit);xit.registerComponent("RemainingTimeDisplay",jet);var Het=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).updateShowing(),r.on(r.player(),"durationchange",r.updateShowing),r.on(r.player(),"languagechange",r.handleLanguagechange),r}Lit(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.S=btt("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.Ct=btt("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.At=ttt.createTextNode(this.localize("LIVE")),this.S.appendChild(this.Ct),this.S.appendChild(this.At),i.appendChild(this.S),i},n.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},n.handleLanguagechange=function(){this.Ct.innerHTML=this.localize("Stream Type"),this.At.innerHTML=this.localize("LIVE")},i}(xit);xit.registerComponent("LiveDisplay",Het);var Wet=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).bar=r.getChild(r.h.barName),r.vertical(!!r.h.vertical),r.on("mousedown",r.handleMouseDown),r.on("touchstart",r.handleMouseDown),r.on("focus",r.handleFocus),r.on("blur",r.handleBlur),r.on("click",r.handleClick),r.on(i,"controlsvisible",r.update),r.on(i,r.playerEvent,r.update),r}Lit(i,t);var n=i.prototype;return n.createEl=function(i,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),n.className=n.className+" vjs-slider",n=htt({tabIndex:0},n),r=htt({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),t.prototype.createEl.call(this,i,n,r)},n.handleMouseDown=function(t){var i=this.bar.v.ownerDocument;t.preventDefault(),ttt.body.focus(),ttt.onselectstart=function(){return!1},this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove),this.on(i,"mouseup",this.handleMouseUp),this.on(i,"touchmove",this.handleMouseMove),this.on(i,"touchend",this.handleMouseUp),this.handleMouseMove(t)},n.handleMouseMove=function(t){},n.handleMouseUp=function(){var t=this.bar.v.ownerDocument;ttt.onselectstart=function(){return!0},this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},n.update=function(){if(this.v){var t=this.getPercent(),i=this.bar;if(i){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var n=(100*t).toFixed(2)+"%";this.vertical()?i.el().style.height=n:i.el().style.width=n}}},n.calculateDistance=function(t){var i=Utt(this.v,t);return this.vertical()?i.y:i.x},n.handleFocus=function(){this.on(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},n.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},n.handleBlur=function(){this.off(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},n.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},n.vertical=function(t){return void 0===t?this.Pt||!1:(this.Pt=!!t,this.Pt?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(xit);function zet(t,i){if(!t||!i)return"";if("function"==typeof Z9.getComputedStyle){var n=Z9.getComputedStyle(t);return n?n[i]:""}return t.currentStyle[i]||""}xit.registerComponent("Slider",Wet);var qet=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).Nt=[],r.on(i,"progress",r.update),r.on(i,"languagechange",r.handleLanguagechange),r}Lit(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Et=btt("span",{innerHTML:this.localize("Loaded")}),this.Bt=ttt.createTextNode(": 0%"),this.Ct=btt("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Et),this.Ct.appendChild(this.Bt),i.appendChild(this.Ct),i},n.update=function(t){var i=this.t.buffered(),n=this.t.duration(),r=this.t.bufferedEnd(),e=this.Nt,s=function(t,i){var n=t/i||0;return 100*(n>=1?1:n)+"%"};this.v.style.width=s(r,n);for(var u=0;ui.length;c--)this.v.removeChild(e[c-1]);e.length=i.length},n.handleLanguagechange=function(){this.Et.innerHTML=this.localize("Loaded")},i}(xit);xit.registerComponent("LoadProgressBar",qet);var Xet=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).updateDataAttr(),r.on(i,"timeupdate",r.updateDataAttr),r.on(i,"languagechange",r.handleLanguagechange),i.ready(Pit(Oit(r),r.updateDataAttr)),n.playerOptions&&n.playerOptions.controlBar&&n.playerOptions.controlBar.progressControl&&n.playerOptions.controlBar.progressControl.keepTooltipsInside&&(r.keepTooltipsInside=n.playerOptions.controlBar.progressControl.keepTooltipsInside),r.keepTooltipsInside&&r.addClass("vjs-keep-tooltips-inside"),r}Lit(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"});return this.It=btt("span",{innerHTML:this.localize("Progress")}),this.Ft=ttt.createTextNode(": 0%"),this.Ct=btt("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.Ct),i},n.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",Let(i,this.t.duration()))},n.handleLanguagechange=function(){this.It.innerHTML=this.localize("Progress")},i}(xit);xit.registerComponent("PlayProgressBar",Xet);var Get=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).updateDataAttr(),r.on(i,"timeupdate",r.updateDataAttr),r.on(i,"languagechange",r.handleLanguagechange),i.ready(Pit(Oit(r),r.updateDataAttr)),r}Lit(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar"});return this.tooltip=btt("div",{className:"vjs-time-tooltip"}),this.It=btt("span",{innerHTML:this.localize("Progress")}),this.Ft=ttt.createTextNode(": 0%"),this.Ct=btt("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.Ct),i},n.updateDataAttr=function(t){var i=Let(this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),this.t.duration());this.v.setAttribute("data-current-time",i),this.tooltip.innerHTML=i},n.handleLanguagechange=function(){this.It.innerHTML=this.localize("Progress")},i}(xit);xit.registerComponent("TooltipProgressBar",Get);var Qet=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"timeupdate",r.updateProgress),r.on(i,"ended",r.updateProgress),i.ready(Pit(Oit(r),r.updateProgress)),n.playerOptions&&n.playerOptions.controlBar&&n.playerOptions.controlBar.progressControl&&n.playerOptions.controlBar.progressControl.keepTooltipsInside&&(r.keepTooltipsInside=n.playerOptions.controlBar.progressControl.keepTooltipsInside),r.keepTooltipsInside&&(r.tooltipProgressBar=r.addChild("TooltipProgressBar")),r}Lit(i,t);var n=i.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},n.updateProgress=function(t){if(this.updateAriaAttributes(this.v),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.v),this.tooltipProgressBar.v.style.width=this.bar.v.style.width;var i=S(zet(this.player().el(),"width")),n=S(zet(this.tooltipProgressBar.tooltip,"width")),r=this.tooltipProgressBar.el().style;r.maxWidth=A.floor(i-n/2)+"px",r.minWidth=A.ceil(n/2)+"px",r.right="-"+n/2+"px"}},n.updateAriaAttributes=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",Let(i,this.t.duration()))},n.getPercent=function(){var t=this.t.currentTime()/this.t.duration();return t>=1?1:t},n.handleMouseDown=function(i){this.t.scrubbing(!0),this.videoWasPlaying=!this.t.paused(),this.t.pause(),t.prototype.handleMouseDown.call(this,i)},n.handleMouseMove=function(t){var i=this.calculateDistance(t)*this.t.duration();i===this.t.duration()&&(i-=.1),this.t.currentTime(i)},n.handleMouseUp=function(i){t.prototype.handleMouseUp.call(this,i),this.t.scrubbing(!1),this.videoWasPlaying&&this.t.play()},n.stepForward=function(){this.t.currentTime(this.t.currentTime()+5)},n.stepBack=function(){this.t.currentTime(this.t.currentTime()-5)},i}(Wet);Qet.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},Qet.prototype.playerEvent="timeupdate",xit.registerComponent("SeekBar",Qet);var Yet=function(t){function i(i,n){var r;return r=t.call(this,i,n)||this,n.playerOptions&&n.playerOptions.controlBar&&n.playerOptions.controlBar.progressControl&&n.playerOptions.controlBar.progressControl.keepTooltipsInside&&(r.keepTooltipsInside=n.playerOptions.controlBar.progressControl.keepTooltipsInside),r.keepTooltipsInside&&(r.tooltip=btt("div",{className:"vjs-time-tooltip"}),r.el().appendChild(r.tooltip),r.addClass("vjs-keep-tooltips-inside")),r.update(0,0),i.on("ready",function(){r.on(i.controlBar.progressControl.el(),"mousemove",function(t,i){var n=Date.now();return function(){var r=Date.now();r-n>=i&&(t.apply(void 0,arguments),n=r)}}(Pit(Oit(r),r.handleMouseMove),25))}),r}Lit(i,t);var n=i.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.handleMouseMove=function(t){var i=this.t.duration(),n=this.calculateDistance(t)*i,r=t.pageX-Ftt(this.el().parentNode).left;this.update(n,r)},n.update=function(t,i){var n=Let(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",n),this.keepTooltipsInside){var r=i-this.Dt(i)+1,e=S(zet(this.tooltip,"width"))/2;this.tooltip.innerHTML=n,this.tooltip.style.right="-"+(e-r)+"px"}},n.calculateDistance=function(t){return Utt(this.el().parentNode,t).x},n.Dt=function(t){if(!this.keepTooltipsInside)return t;var i=S(zet(this.player().el(),"width")),n=S(zet(this.tooltip,"width"))/2,r=t;return ti-n&&(r=A.floor(i-n)),r},i}(xit);xit.registerComponent("MouseTimeDisplay",Yet);var $et=function(t){function i(){return t.apply(this,arguments)||this}return Lit(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(xit);$et.prototype.h={children:["seekBar"]},xit.registerComponent("ProgressControl",$et);var Ket=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"fullscreenchange",r.handleFullscreenChange),r}Lit(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(t){this.t.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(t){this.t.isFullscreen()?this.t.exitFullscreen():this.t.requestFullscreen()},i}(xet);Ket.prototype.St="Fullscreen",xit.registerComponent("FullscreenToggle",Ket);var Jet=function(t){function i(){return t.apply(this,arguments)||this}return Lit(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},i}(xit);xit.registerComponent("VolumeLevel",Jet);var Zet=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"volumechange",r.updateARIAAttributes),i.ready(Pit(Oit(r),r.updateARIAAttributes)),r}Lit(i,t);var n=i.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},n.handleMouseMove=function(t){this.checkMuted(),this.t.volume(this.calculateDistance(t))},n.checkMuted=function(){this.t.muted()&&this.t.muted(!1)},n.getPercent=function(){return this.t.muted()?0:this.t.volume()},n.stepForward=function(){this.checkMuted(),this.t.volume(this.t.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.t.volume(this.t.volume()-.1)},n.updateARIAAttributes=function(t){var i=(100*this.t.volume()).toFixed(2);this.v.setAttribute("aria-valuenow",i),this.v.setAttribute("aria-valuetext",i+"%")},i}(Wet);Zet.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},Zet.prototype.playerEvent="volumechange",xit.registerComponent("VolumeBar",Zet);var tst=function(t){function i(i,n){var r;return r=t.call(this,i,n)||this,i.H&&!1===i.H.featuresVolumeControl&&r.addClass("vjs-hidden"),r.on(i,"loadstart",function(){!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),r}return Lit(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(xit);tst.prototype.h={children:["volumeBar"]},xit.registerComponent("VolumeControl",tst);var ist=function(t){function i(){return t.apply(this,arguments)||this}Lit(i,t);var n=i.prototype;return n.addItem=function(t){this.addChild(t),t.on("click",Pit(this,function(){this.unlockShowing()}))},n.createEl=function(){var i=this.h.contentElType||"ul";this.S=btt(i,{className:"vjs-menu-content"});var n=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return n.appendChild(this.S),_it(n,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),n},i}(xit);xit.registerComponent("Popup",ist);var nst=function(t){function i(i,n){var r;return void 0===n&&(n={}),(r=t.call(this,i,n)||this).update(),r}Lit(i,t);var n=i.prototype;return n.update=function(){var t=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=t,this.addChild(t),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},n.createPopup=function(){},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},n.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},i}(Tet);xit.registerComponent("PopupButton",nst);var rst=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"volumechange",r.update),i.H&&!1===i.H.featuresVolumeControl&&r.addClass("vjs-hidden"),r.on(i,"loadstart",function(){this.update(),!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),r}Lit(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(t){this.t.muted(!this.t.muted())},n.update=function(t){var i=this.t.volume(),n=3;this.t.muted()?n=0:i<.33?n=1:i<.67&&(n=2);var r=this.t.muted()?"Unmute":"Mute";this.controlText()!==r&&this.controlText(r);for(var e=0;e<4;e++)Dtt(this.v,"vjs-vol-"+e);Ntt(this.v,"vjs-vol-"+n)},i}(xet);rst.prototype.St="Mute",xit.registerComponent("MuteToggle",rst);var est=function(t){function i(i,n){var r;function e(){i.H&&!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}return void 0===n&&(n={}),void 0===n.inline&&(n.inline=!0),void 0===n.vertical&&(n.inline?n.vertical=!1:n.vertical=!0),n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=!!n.vertical,(r=t.call(this,i,n)||this).on(i,"volumechange",r.volumeUpdate),r.on(i,"loadstart",r.volumeUpdate),e.call(Oit(r)),r.on(i,"loadstart",e),r.on(r.volumeBar,["slideractive","focus"],function(){this.addClass("vjs-slider-active")}),r.on(r.volumeBar,["sliderinactive","blur"],function(){this.removeClass("vjs-slider-active")}),r.on(r.volumeBar,["focus"],function(){this.addClass("vjs-lock-showing")}),r.on(r.volumeBar,["blur"],function(){this.removeClass("vjs-lock-showing")}),r}Lit(i,t);var n=i.prototype;return n.buildCSSClass=function(){var i="";return i=this.h.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+t.prototype.buildCSSClass.call(this)+" "+i},n.createPopup=function(){var t=new ist(this.t,{contentElType:"div"}),i=new Zet(this.t,this.h.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},n.handleClick=function(i){rst.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},n.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],Pit(this,this.handleMouseDown))},n.handleMouseDown=function(t){this.on(["mousemove","touchmove"],Pit(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},n.handleMouseUp=function(t){this.off(["mousemove","touchmove"],Pit(this.volumeBar,this.volumeBar.handleMouseMove))},i}(nst);est.prototype.volumeUpdate=rst.prototype.update,est.prototype.St="Mute",xit.registerComponent("VolumeMenuButton",est);var sst=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).$t=-1,r.on("keydown",r.handleKeyPress),r}Lit(i,t);var n=i.prototype;return n.addItem=function(t){this.addChild(t),t.on("click",Pit(this,function(t){this.unlockShowing()}))},n.createEl=function(){var i=this.h.contentElType||"ul";this.S=btt(i,{className:"vjs-menu-content"}),this.S.setAttribute("role","menu");var n=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return n.setAttribute("role","presentation"),n.appendChild(this.S),_it(n,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),n},n.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},n.stepForward=function(){var t=0;void 0!==this.$t&&(t=this.$t+1),this.focus(t)},n.stepBack=function(){var t=0;void 0!==this.$t&&(t=this.$t-1),this.focus(t)},n.focus=function(t){void 0===t&&(t=0);var i=this.children().slice();i.length&&i[0].className&&/vjs-menu-title/.test(i[0].className)&&i.shift(),i.length>0&&(t<0?t=0:t>=i.length&&(t=i.length-1),this.$t=t,i[t].v.focus())},i}(xit);xit.registerComponent("Menu",sst);var ust=function(t){function i(i,n){var r;return void 0===n&&(n={}),(r=t.call(this,i,n)||this).update(),r.Rt=!0,r.v.setAttribute("aria-haspopup","true"),r.v.setAttribute("role","menuitem"),r.on("keydown",r.handleSubmenuKeyPress),r}Lit(i,t);var n=i.prototype;return n.update=function(){var t=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=t,this.addChild(t),this.Ut=!1,this.v.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Ot?this.hide():this.show()},n.createMenu=function(){var t=new sst(this.t);if(this.Ot=0,this.h.title){var i=btt("li",{className:"vjs-menu-title",innerHTML:Nit(this.h.title),tabIndex:-1});this.Ot+=1,t.m.unshift(i),Ttt(i,t.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n=0;i--){var n=t[i];if(n.kind===this.Lt)return n}},n.getMenuCaption=function(){return this.Ht&&this.Ht.label?this.Ht.label:this.localize(Nit(this.Lt))},n.createMenu=function(){return this.h.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},n.createItems=function(){var t=[];if(!this.Ht)return t;var i=this.Ht.cues;if(!i)return t;for(var n=0,r=i.length;n=0;n--)t.addChild(new _st(this.player(),{rate:i[n]+"x"}));return t},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(t){for(var i=this.player().playbackRate(),n=this.playbackRates(),r=n[0],e=0;ei){r=n[e];break}this.player().playbackRate(r)},n.playbackRates=function(){return this.h.playbackRates||this.h.playerOptions&&this.h.playerOptions.playbackRates},n.playbackRateSupported=function(){return this.player().H&&this.player().H.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(t){this.playbackRateSupported()&&(this.Vt.innerHTML=this.player().playbackRate()+"x")},i}(ust);kst.prototype.St="Playback Rate",xit.registerComponent("PlaybackRateMenuButton",kst);var bst=function(t){function i(){return t.apply(this,arguments)||this}Lit(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},i}(xit);xit.registerComponent("Spacer",bst);var Ast=function(t){function i(){return t.apply(this,arguments)||this}Lit(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){var i=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return i.innerHTML=" ",i},i}(bst);xit.registerComponent("CustomControlSpacer",Ast);var Tst=function(t){function i(){return t.apply(this,arguments)||this}return Lit(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(xit);Tst.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},xit.registerComponent("ControlBar",Tst);var Sst=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"error",r.open),r}Lit(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},n.content=function(){var t=this.player().error();return t?this.localize(t.message):""},i}(int);Sst.prototype.h=Dit(int.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),xit.registerComponent("ErrorDisplay",Sst);var Est="vjs-text-track-settings",Ist=["#000","Black"],Rst=["#00F","Blue"],Cst=["#0FF","Cyan"],Pst=["#0F0","Green"],Nst=["#F0F","Magenta"],Dst=["#F00","Red"],xst=["#FFF","White"],Bst=["#FF0","Yellow"],Ost=["1","Opaque"],Mst=["0.5","Semi-Transparent"],Lst=["0","Transparent"],Fst={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Ist,xst,Dst,Pst,Rst,Bst,Nst,Cst]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Ost,Mst,Lst]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[xst,Ist,Dst,Pst,Rst,Bst,Nst,Cst]},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(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Ost,Mst]},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:[Lst,Mst,Ost]}};function Ust(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}Fst.windowColor.options=Fst.backgroundColor.options;var Vst,jst=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).setDefaults(),r.hide(),r.updateDisplay=Pit(Oit(r),r.updateDisplay),void 0===n.persistTextTrackSettings&&(r.h.persistTextTrackSettings=r.h.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",function(){r.saveSettings(),r.hide()}),r.on(r.$(".vjs-default-button"),"click",function(){r.setDefaults(),r.updateDisplay()}),ott(Fst,function(t){r.on(r.$(t.selector),"change",r.updateDisplay)}),r.h.persistTextTrackSettings&&r.restoreSettings(),r}Lit(i,t);var n=i.prototype;return n.zt=function(t){var i=this,n=Fst[t],r=n.id.replace("%s",this.o);return[btt("label",{className:"vjs-label",textContent:n.label},{for:r}),btt("select",{id:r},void 0,n.options.map(function(t){return btt("option",{textContent:i.localize(t[1]),value:t[0]})}))]},n.Wt=function(){var t=btt("legend",{textContent:this.localize("Text")}),i=this.zt("color"),n=btt("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.zt("textOpacity"));return btt("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,n))},n.Gt=function(){var t=btt("legend",{textContent:this.localize("Background")}),i=this.zt("backgroundColor"),n=btt("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.zt("backgroundOpacity"));return btt("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,n))},n.Xt=function(){var t=btt("legend",{textContent:this.localize("Window")}),i=this.zt("windowColor"),n=btt("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.zt("windowOpacity"));return btt("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,n))},n.Jt=function(){return btt("div",{className:"vjs-tracksettings-colors"},void 0,[this.Wt(),this.Gt(),this.Xt()])},n.Qt=function(){var t=btt("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.zt("fontPercent")),i=btt("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.zt("edgeStyle")),n=btt("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.zt("fontFamily"));return btt("div",{className:"vjs-tracksettings-font"},void 0,[t,i,n])},n.Yt=function(){var t=btt("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=btt("button",{className:"vjs-done-button",textContent:"Done"});return btt("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},n.createEl=function(){var t=btt("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=btt("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),n=btt("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),r=btt("div",void 0,{role:"document"},[i,n,t]);return btt("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":n.id},r)},n.getValues=function(){var t=this;return function(t,i,n){return void 0===n&&(n=0),utt(t).reduce(function(n,r){return i(n,t[r],r)},n)}(Fst,function(i,n,r){var e=function(t,i){return Ust(t.options[t.options.selectedIndex].value,i)}(t.$(n.selector),n.parser);return void 0!==e&&(i[r]=e),i},{})},n.setValues=function(t){var i=this;ott(Fst,function(n,r){!function(t,i,n){if(i)for(var r=0;r=0;s--){var u=e[s],o=this.h[u];void 0!==o&&(o?Mtt(t,u,u):Ltt(t,u),t[u]=o)}return t},n.Zt=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var i=!1,n=function(){i=!0};this.on("loadstart",n);var r=function(){i||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready(function(){this.off("loadstart",n),this.off("loadedmetadata",r),i||this.trigger("loadstart")})}var e=["loadstart"];e.push("loadedmetadata"),t.readyState>=2&&e.push("loadeddata"),t.readyState>=3&&e.push("canplay"),t.readyState>=4&&e.push("canplaythrough"),this.ready(function(){e.forEach(function(t){this.trigger(t)},this)})}},n.ai=function(){var t=this.el().textTracks;if(t){for(var i=0;i0&&(t.v.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",i))}),NaN}return this.v.duration||NaN},n.width=function(){return this.v.offsetWidth},n.height=function(){return this.v.offsetHeight},n.di=function(){var t=this;if("webkitDisplayingFullscreen"in this.v){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.v&&"picture-in-picture"!==this.v.webkitPresentationMode&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",function(){t.off("webkitbeginfullscreen",n),t.off("webkitendfullscreen",i)})}},n.supportsFullScreen=function(){if("function"==typeof this.v.webkitEnterFullScreen){var t=Z9.navigator&&Z9.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},n.enterFullScreen=function(){var t=this.v;t.paused&&t.networkState<=t.HAVE_METADATA?(this.v.play(),this.setTimeout(function(){t.pause(),t.webkitEnterFullScreen()},0)):t.webkitEnterFullScreen()},n.exitFullScreen=function(){this.v.webkitExitFullScreen()},n.src=function(t){if(void 0===t)return this.v.src;this.setSrc(t)},n.reset=function(){i.resetMediaElement(this.v)},n.currentSrc=function(){return this.bt?this.bt.src:this.v.currentSrc},n.setControls=function(t){this.v.controls=!!t},n.addTextTrack=function(i,n,r){return this.featuresNativeTextTracks?this.v.addTextTrack(i,n,r):t.prototype.addTextTrack.call(this,i,n,r)},n.createRemoteTextTrack=function(i){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,i);var n=ttt.createElement("track");return i.kind&&(n.kind=i.kind),i.label&&(n.label=i.label),(i.language||i.srclang)&&(n.srclang=i.language||i.srclang),i.default&&(n.default=i.default),i.id&&(n.id=i.id),i.src&&(n.src=i.src),n},n.addRemoteTextTrack=function(i,n){var r=t.prototype.addRemoteTextTrack.call(this,i,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},n.removeRemoteTextTrack=function(i){if(t.prototype.removeRemoteTextTrack.call(this,i),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)i!==n[r]&&i!==n[r].track||this.el().removeChild(n[r])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),Z9.performance&&"function"==typeof Z9.performance.now?t.creationTime=Z9.performance.now():Z9.performance&&Z9.performance.timing&&"number"==typeof Z9.performance.timing.navigationStart&&(t.creationTime=Z9.Date.now()-Z9.performance.timing.navigationStart),t},i}(bet);ptt()&&(Wst.TEST_VID=ttt.createElement("video"),(Hst=ttt.createElement("track")).kind="captions",Hst.srclang="en",Hst.label="English",Wst.TEST_VID.appendChild(Hst)),Wst.isSupported=function(){try{Wst.TEST_VID.volume=.5}catch(t){return!1}return!(!Wst.TEST_VID||!Wst.TEST_VID.canPlayType)},Wst.canControlVolume=function(){try{var t=Wst.TEST_VID.volume;return Wst.TEST_VID.volume=t/2+.1,t!==Wst.TEST_VID.volume}catch(t){return!1}},Wst.canControlPlaybackRate=function(){if(tit&&uit&&oit<58)return!1;try{var t=Wst.TEST_VID.playbackRate;return Wst.TEST_VID.playbackRate=t/2+.1,t!==Wst.TEST_VID.playbackRate}catch(t){return!1}},Wst.supportsNativeTextTracks=function(){return fit},Wst.supportsNativeVideoTracks=function(){return!(!Wst.TEST_VID||!Wst.TEST_VID.videoTracks)},Wst.supportsNativeAudioTracks=function(){return!(!Wst.TEST_VID||!Wst.TEST_VID.audioTracks)},Wst.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],Wst.prototype.featuresVolumeControl=Wst.canControlVolume(),Wst.prototype.featuresPlaybackRate=Wst.canControlPlaybackRate(),Wst.prototype.movingMediaElementInDOM=!Jtt,Wst.prototype.featuresFullscreenResize=!0,Wst.prototype.featuresProgressEvents=!0,Wst.prototype.featuresTimeupdateEvents=!0,Wst.prototype.featuresNativeTextTracks=Wst.supportsNativeTextTracks(),Wst.prototype.featuresNativeVideoTracks=Wst.supportsNativeVideoTracks(),Wst.prototype.featuresNativeAudioTracks=Wst.supportsNativeAudioTracks();var zst=Wst.TEST_VID&&Wst.TEST_VID.constructor.prototype.canPlayType,qst=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,Xst=/^video\/mp4/i;Wst.patchCanPlayType=function(){iit>=4&&!eit?Wst.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&qst.test(t)?"maybe":zst.call(this,t)}:nit&&(Wst.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Xst.test(t)?"maybe":zst.call(this,t)})},Wst.unpatchCanPlayType=function(){var t=Wst.TEST_VID.constructor.prototype.canPlayType;return Wst.TEST_VID.constructor.prototype.canPlayType=zst,t},Wst.patchCanPlayType(),Wst.disposeMediaElement=function(t){if(t){var i=t.nodeName.toLowerCase();if("video"===i||"audio"===i){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}}},Wst.resetMediaElement=function(t){if(t){for(var i=t.querySelectorAll("source"),n=i.length;n--;)t.removeChild(i[n]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(t){Wst.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){Wst.prototype["set"+Nit(t)]=function(i){this.v[t]=i,i?this.v.setAttribute(t,t):this.v.removeAttribute(t)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(t){Wst.prototype[t]=function(){return this.v[t]}}),["volume","src","poster","preload","playbackRate"].forEach(function(t){Wst.prototype["set"+Nit(t)]=function(i){this.v[t]=i}}),["pause","load"].forEach(function(t){Wst.prototype[t]=function(){return this.v[t]()}}),bet.withSourceHandlers(Wst),Wst.nativeSourceHandler={},Wst.nativeSourceHandler.canPlayType=function(t){try{return Wst.TEST_VID.canPlayType(t)}catch(t){return""}},Wst.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return Wst.nativeSourceHandler.canPlayType(t.type);if(t.src){var n=function(t){if("string"==typeof t){var i=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(i)return i.pop().toLowerCase()}return""}(t.src);return Wst.nativeSourceHandler.canPlayType("video/"+n)}return""},Wst.nativeSourceHandler.handleSource=function(t,i,n){i.setSrc(t.src)},Wst.nativeSourceHandler.dispose=function(){},Wst.registerSourceHandler(Wst.nativeSourceHandler),xit.registerComponent("Html5",Wst),bet.registerTech("Html5",Wst);var Gst=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],Qst=function(t){function i(n,r,e){var s;if(n.id=n.id||["vjs_video",rtt()].join("_"),(r=htt(i.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var u=n.closest("[lang]");u&&(r.language=u.getAttribute("lang"))}else for(var o=n;o&&1===o.nodeType;){if(Ott(o).hasOwnProperty("lang")){r.language=o.getAttribute("lang");break}o=o.parentNode}if(!(s=t.call(this,null,r,e)||this).h||!s.h.techOrder||!s.h.techOrder.length)throw new p("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=n,s.tagAttributes=n&&Ott(n),s.language(s.h.language),r.languages){var h={};b.getOwnPropertyNames(r.languages).forEach(function(t){h[t.toLowerCase()]=r.languages[t]}),s.pi=h}else s.pi=i.prototype.h.languages;s.mi={},s.gi=r.poster||"",s.yi=!!r.controls,n.controls=!1,s.bi=!1,s.v=s.createEl();var a=Dit(s.h);if(r.plugins){var c=r.plugins;b.getOwnPropertyNames(c).forEach(function(t){"function"==typeof this[t]?this[t](c[t]):vtt.error("Unable to find plugin:",t)},Oit(s))}s.h.playerOptions=a,s.initChildren(),s.isAudio("audio"===n.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.v.setAttribute("role","region"),s.isAudio()?s.v.setAttribute("aria-label","audio player"):s.v.setAttribute("aria-label","video player"),s.isAudio()&&s.addClass("vjs-audio"),s.ki()&&s.addClass("vjs-no-flex"),Jtt||s.addClass("vjs-workinghover"),i.players[s.o]=Oit(s);var f="5.20.6-opentelly.14".split(".")[0];return s.addClass("vjs-v"+f),s.userActive(!0),s.reportUserActivity(),s.wi(),s.on("fullscreenchange",s._i),s.on("stageclick",s.xi),s}Lit(i,t);var n=i.prototype;return n.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.Ci&&this.Ci.parentNode&&this.Ci.parentNode.removeChild(this.Ci),i.players[this.o]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.v&&this.v.player&&(this.v.player=null),this.H&&this.H.dispose(),t.prototype.dispose.call(this)},n.createEl=function(){var i,n=this.tag,r=this.Si=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player");i=this.v=r?n.parentNode:t.prototype.createEl.call(this,"div"),n.setAttribute("tabindex","-1"),n.removeAttribute("width"),n.removeAttribute("height");var e=Ott(n);if(b.getOwnPropertyNames(e).forEach(function(t){"class"===t?i.className+=" "+e[t]:i.setAttribute(t,e[t])}),n.playerId=n.id,n.id+="ji",n.className="vjs-tech",n.player=i.player=this,this.addClass("vjs-paused"),!0!==Z9.VIDEOJS_NO_DYNAMIC_STYLE){this.Ci=Rit("vjs-styles-dimensions");var s=ztt(".vjs-styles-defaults"),u=ztt("head");u.insertBefore(this.Ci,s?s.nextSibling:u.firstChild)}this.width(this.h.width),this.height(this.h.height),this.fluid(this.h.fluid),this.aspectRatio(this.h.aspectRatio);for(var o=n.getElementsByTagName("a"),h=0;h0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),e=r[1]/r[0];t=void 0!==this.Ti?this.Ti:void 0!==this.Mi?this.Mi/e:this.videoWidth()||300,i=void 0!==this.Mi?this.Mi:t*e,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Cit(this.Ci,"\n ."+n+" {\n width: "+t+"px;\n height: "+i+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*e+"%;\n }\n ")}else{var s="number"==typeof this.Ti?this.Ti:this.h.width,u="number"==typeof this.Mi?this.Mi:this.h.height,o=this.H&&this.H.el();o&&(s>=0&&(o.width=s),u>=0&&(o.height=u))}},n._t=function(t,i){var n=this;this.H&&this.Ei(),"Html5"!==t&&this.tag&&(bet.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Bi=t,this.j=!1;var r=htt({source:i,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Ii",videoTracks:this.rt,textTracks:this.nt,audioTracks:this.ht,autoplay:this.h.autoplay,playsinline:this.h.playsinline,preload:this.h.preload,loop:this.h.loop,muted:this.h.muted,poster:this.poster(),language:this.language(),playerElIngest:this.Si||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(r.tag=this.tag),i&&(this.Fi=i.type,i.src===this.mi.src&&this.mi.currentTime>0&&(r.startTime=this.mi.currentTime),this.mi.sources=null,this.mi.source=i,this.mi.src=i.src);var e=bet.getTech(t);e||(e=xit.getComponent(t)),this.H=new e(r),this.H.ready(Pit(this,this.Di),!0),Zit(this.$i||[],this.H),Gst.forEach(function(t){n.on(n.H,t,n["handleTech"+Nit(t)+"_"])}),this.on(this.H,"loadstart",this.Ri),this.on(this.H,"waiting",this.Ui),this.on(this.H,"canplay",this.Oi),this.on(this.H,"canplaythrough",this.Vi),this.on(this.H,"playing",this.Li),this.on(this.H,"ended",this.Hi),this.on(this.H,"seeking",this.qi),this.on(this.H,"seeked",this.zi),this.on(this.H,"play",this.Wi),this.on(this.H,"firstplay",this.Gi),this.on(this.H,"pause",this.Xi),this.on(this.H,"durationchange",this.Ji),this.on(this.H,"fullscreenchange",this.Qi),this.on(this.H,"error",this.Yi),this.on(this.H,"loadedmetadata",this.Ai),this.on(this.H,"resize",this.Ai),this.on(this.H,"posterchange",this.Ki),this.on(this.H,"textdata",this.Zi),this.usingNativeControls(this.ts("controls")),this.controls()&&!this.usingNativeControls()&&this.ss(),this.H.el().parentNode===this.contentEl()||"Html5"===t&&this.tag||Ttt(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},n.Ei=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.$i=Jit(this.H),this.j=!1,this.H.dispose(),this.H=!1},n.tech=function(t){if(t&&t.IWillNotUseThisInPlugins)return this.H;var i="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw Z9.alert(i),new p(i)},n.ss=function(){this.es(),this.on(this.H,"mousedown",this.ns),this.on(this.H,"touchstart",this.rs),this.on(this.H,"touchmove",this.hs),this.on(this.H,"touchend",this.us),this.on(this.H,"tap",this.cs)},n.es=function(){this.off(this.H,"tap",this.cs),this.off(this.H,"touchstart",this.rs),this.off(this.H,"touchmove",this.hs),this.off(this.H,"touchend",this.us),this.off(this.H,"mousedown",this.ns)},n.Di=function(){if(this.triggerReady(),this.mi.volume&&this.ls("setVolume",this.mi.volume),this.Ki(),this.Ji(),(this.src()||this.currentSrc())&&this.tag&&this.h.autoplay&&this.paused()){try{delete this.tag.poster}catch(t){vtt("deleting tag.poster throws in some browsers",t)}this.play()}},n.Ri=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},n.hasStarted=function(t){return void 0!==t?(this.et!==t&&(this.et=t,t?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.et},n.Wi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.Ui=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return t.removeClass("vjs-waiting")})},n.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.Li=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.qi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.zi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},n.Gi=function(){this.h.starttime&&(vtt.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.h.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},n.Xi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.Hi=function(){this.addClass("vjs-ended"),this.h.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},n.Ji=function(){this.duration(this.ts("duration"))},n.ns=function(t){0===t.button&&this.controls()&&(void 0!==this.h&&void 0!==this.h.userActions&&void 0!==this.h.userActions.click&&!1===this.h.userActions.click||(void 0!==this.h&&void 0!==this.h.userActions&&"function"==typeof this.h.userActions.click?this.h.userActions.click.call(this,t):this.paused()?this.play():this.pause()))},n.cs=function(){this.userActive(!this.userActive())},n.rs=function(){this.userWasActive=this.userActive()},n.hs=function(){this.userWasActive&&this.reportUserActivity()},n.us=function(t){t.cancelable&&t.preventDefault()},n._i=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.xi=function(){this.reportUserActivity()},n.Qi=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},n.Yi=function(){var t=this.H.error();this.error(t)},n.Zi=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},n.getCache=function(){return this.mi},n.ls=function(t,i){if(this.H&&!this.H.j)this.H.ready(function(){this[t](i)},!0);else try{this.H&&this.H[t](i)}catch(t){throw vtt(t),t}},n.ts=function(t){if(this.H&&this.H.j)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?vtt("Video.js: "+t+" method not defined for "+this.Bi+" playback technology.",i):"TypeError"===i.name?(vtt("Video.js: "+t+" unavailable on "+this.Bi+" playback technology element.",i),this.H.j=!1):vtt(i),i}},n.play=function(){return this.src()||this.currentSrc()?this.ls("play"):this.H.one("loadstart",function(){this.play()}),this},n.pause=function(){return this.ls("pause"),this},n.paused=function(){return!1!==this.ts("paused")},n.scrubbing=function(t){return void 0!==t?(this.bi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.bi},n.currentTime=function(t){return void 0!==t?(this.ls("setCurrentTime",t),this):(this.mi.currentTime=this.ts("currentTime")||0,this.mi.currentTime)},n.duration=function(t){return void 0===t?void 0!==this.mi.duration?this.mi.duration:NaN:((t=S(t))<0&&(t=1/0),t!==this.mi.duration&&(this.mi.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},n.remainingTime=function(){return this.duration()-this.currentTime()},n.buffered=function(){var t=this.ts("buffered");return t&&t.length||(t=Vit(0,0)),t},n.bufferedPercent=function(){return jit(this.buffered(),this.duration())},n.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),n=t.end(t.length-1);return n>i&&(n=i),n},n.volume=function(t){var i;return void 0!==t?(i=A.max(0,A.min(1,S(t))),this.mi.volume=i,this.ls("setVolume",i),this):(i=S(this.ts("volume")),E(i)?1:i)},n.muted=function(t){return void 0!==t?(this.ls("setMuted",t),this):this.ts("muted")||!1},n.supportsFullScreen=function(){return this.ts("supportsFullScreen")||!1},n.isFullscreen=function(t){return void 0!==t?(this.ds=!!t,this):!!this.ds},n.requestFullscreen=function(t){var i,n=Xit;return this.isFullscreen(!0),n.requestFullscreen?(_it(ttt,n.fullscreenchange,Pit(this,function t(i){this.isFullscreen(ttt[n.fullscreenElement]),!1===this.isFullscreen()&&kit(ttt,n.fullscreenchange,t),this.trigger("fullscreenchange")})),n.prefixed||(i=this.h.fullscreenOptions,void 0!==t&&(i=t)),this.v[n.requestFullscreen](i)):this.H.supportsFullScreen()?this.ls("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},n.exitFullscreen=function(){var t=Xit;return this.isFullscreen(!1),t.requestFullscreen?ttt[t.exitFullscreen]():this.H.supportsFullScreen()?this.ls("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},n.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=ttt.documentElement.style.overflow,_it(ttt,"keydown",Pit(this,this.fullWindowOnEscKey)),ttt.documentElement.style.overflow="hidden",Ntt(ttt.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},n.exitFullWindow=function(){this.isFullWindow=!1,kit(ttt,"keydown",this.fullWindowOnEscKey),ttt.documentElement.style.overflow=this.docOrigOverflow,Dtt(ttt.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.canPlayType=function(t){for(var i,n=0,r=this.h.techOrder;n0&&(r=this.setTimeout(function(){this.ps||this.userActive(!1)},t))}},250)},n.playbackRate=function(t){return void 0!==t?(this.ls("setPlaybackRate",t),this):this.H&&this.H.featuresPlaybackRate?this.ts("playbackRate"):1},n.isAudio=function(t){return void 0!==t?(this.ys=!!t,this):!!this.ys},n.videoTracks=function(){return this.H?this.H.videoTracks():(this.rt=this.rt||new yet,this.rt)},n.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new _et,this.ht)},n.textTracks=function(){if(this.H)return this.H.textTracks()},n.remoteTextTracks=function(){if(this.H)return this.H.remoteTextTracks()},n.remoteTextTrackEls=function(){if(this.H)return this.H.remoteTextTrackEls()},n.addTextTrack=function(t,i,n){if(this.H)return this.H.addTextTrack(t,i,n)},n.addRemoteTextTrack=function(t,i){if(this.H)return this.H.addRemoteTextTrack(t,i)},n.removeRemoteTextTrack=function(t){var i=(void 0===t?{}:t).track,n=void 0===i?arguments[0]:i;if(this.H)return this.H.removeRemoteTextTrack(n)},n.getVideoPlaybackQuality=function(){return this.ts("getVideoPlaybackQuality")},n.videoWidth=function(){return this.H&&this.H.videoWidth&&this.H.videoWidth()||0},n.videoHeight=function(){return this.H&&this.H.videoHeight&&this.H.videoHeight()||0},n.language=function(t){return void 0===t?this.bs:(this.bs!==String(t).toLowerCase()&&(this.bs=String(t).toLowerCase(),void 0!==this.v&&this.trigger("languagechange")),this)},n.languages=function(){return Dit(i.prototype.h.languages,this.pi)},n.toJSON=function(){var t=Dit(this.h),i=t.tracks;t.tracks=[];for(var n=0;n0||o>0?s+":":"")+(e=((s||u>=10)&&Number(e)<10?"0"+e:e)+":")+(r=Number(r)<10?"0"+r:r)}function hut(t){return function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Cs=void 0,i}return Pt(i,t),i.prototype.dispose=function(){this.Cs=void 0,t.prototype.dispose.call(this)},xt(i,[{key:"xs",get:function(){var t;return null!=(t=this.Cs)?t:this.Cs=aut(this.player())}}]),i}(t)}function aut(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function cut(t){var i=aut(t),n=function(){var n=nut(t);t.toggleClass("theo-at-live",function(t,i){if(iut(t)){var n=t.seekable;return 0===n.length||n.end(n.length-1)-i<10}return!1}(i,n)),t.toggleClass("vjs-live",iut(i)),t.toggleClass("theo-dvr",function(t){var i;return"dvr"===IZ(t.duration,t.seekable,null==(i=t.source)?void 0:i.streamType)}(i))};t.on("emptied",n),t.on("timeupdate",n),t.on("durationchange",n)}V(),It(),Bt(),Nt(),V(),It();function fut(t,i,n){t.toggleClass("theo-ad-playing",i),t.toggleClass("theo-dai-ad-playing",i&&n)}function vut(){this.userActive(!1)}V(),It(),V(),It(),Bt(),Nt(),Ut(),V(),It();var dut=function(t,i){this.type=void 0,this.target=void 0,this.playerEvent=void 0,this.type=t.type,this.target=i,this.playerEvent=t},lut=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],gut=tut.getTech("Tech"),wut=tut.getTech("Html5"),mut=function(t){function i(i,n){var r;void 0===i&&(i={}),(r=t.call(this,i,n)||this).xs=void 0,r.js=function(t){return r.Rs(t)},r.Vs=!1,r.Ms=function(){void 0===r.xs.errorObject&&(r.Rs(new yT(r.xs.currentTime,r.xs.readyState)),r.Rs(new sC),r.Rs(new kT(r.xs.duration)))},r.As=function(){r.Rs(new Hp(r.xs.currentTime))},r.Ns=function(t){r.textTracks().tt(t.track)},r.Is=function(t){r.audioTracks().tt(t.track)},r.Es=function(t){r.textTracks().it(t.track)},r.Fs=function(t){r.audioTracks().it(t.track)},r.Bs=function(){var t=r.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},r.Ds=function(){var t=r.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},r.Ps=function(){if(r.supportsFullScreen()){var t=r.Vs,i=r.xs.presentation.currentMode===PT.FULLSCREEN;t!==i&&(r.Vs=i,r.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))}},r.Ts=function(){var t=r.xs.errorObject,i=t&&mw(t.code)||-1,n=t&&t.message||"An unknown error occurred.";r.error({code:i,message:r.localize(n)})},r.xs=r.h.player,r.Ss();var e=!r.paused();return e&&r.pause(),i.preload&&r.setPreload(i.preload),i.autoplay&&r.setAutoplay(i.autoplay),i.muted&&r.setMuted(i.muted),i.source?r.setSrc(i.source):r.Zt(),e&&r.ready(function(){return r.play()}),r.triggerReady(),r}Pt(i,t);var n=i.prototype;return n.Ss=function(){for(var t,i,n=Ft(lut);!(i=n()).done;){var r=i.value;this.xs.addEventListener(r,this.js)}this.xs.addEventListener("error",this.Ts),this.xs.addEventListener("contentprotectionerror",this.Ts),this.xs.addEventListener("sourcechange",this.Ms),this.xs.addEventListener("loadstart",this.As),null==(t=this.xs.presentation)||t.addEventListener(VI.MODE_CHANGE,this.Ps),this.xs.textTracks.addEventListener("addtrack",this.Ns),this.xs.textTracks.addEventListener("removetrack",this.Es),this.xs.textTracks.addEventListener("change",this.Bs),this.xs.audioTracks.addEventListener("addtrack",this.Is),this.xs.audioTracks.addEventListener("removetrack",this.Fs),this.xs.audioTracks.addEventListener("change",this.Ds)},n.$s=function(){for(var t,i,n=Ft(lut);!(i=n()).done;){var r=i.value;this.xs.removeEventListener(r,this.js)}this.xs.removeEventListener("error",this.Ts),this.xs.removeEventListener("contentprotectionerror",this.Ts),this.xs.removeEventListener("sourcechange",this.Ms),this.xs.removeEventListener("loadstart",this.As),null==(t=this.xs.presentation)||t.removeEventListener(VI.MODE_CHANGE,this.Ps),this.xs.textTracks.removeEventListener("addtrack",this.Ns),this.xs.textTracks.removeEventListener("removetrack",this.Es),this.xs.textTracks.removeEventListener("change",this.Bs),this.xs.audioTracks.removeEventListener("addtrack",this.Is),this.xs.audioTracks.removeEventListener("removetrack",this.Fs),this.xs.audioTracks.removeEventListener("change",this.Ds)},n.Rs=function(t){this.trigger(new dut(t,this))},n.createEl=function(){var t=this.h,i=t.player;if(!i)throw new p(this.localize('Missing required tech option "player"'));var n=i.element;return tut.setAttributes(n,{id:t.techId}),n},n.theoplayer=function(){return this.xs},n.addTextTrack=function(i,n,r){return t.prototype.addTextTrack.call(this,i,n,r)},n.buffered=function(){return this.xs.buffered},n.played=function(){return this.xs.played},n.reset=function(){this.xs.stop()},n.play=function(){this.xs.play()},n.pause=function(){this.xs.pause()},n.paused=function(){return this.xs.paused},n.currentTime=function(){return this.xs.currentTime},n.setCurrentTime=function(t){this.xs.currentTime=t},n.duration=function(){return this.xs.duration},n.volume=function(){return this.xs.volume},n.setVolume=function(t){this.xs.volume=t},n.muted=function(){return this.xs.muted},n.setMuted=function(t){this.xs.muted=t},n.src=function(t){if(void 0!==t)this.setSrc(t);else{if(this.xs.src)return this.xs.src;if(this.xs.source){if(!sE(this.xs.source.ads))return this.xs.source.ads[0].sources;if(function(t){return!!t.sources&&(ji(t.sources)?t.sources.some(rT):rT(t.sources))}(this.xs.source))return"This source is managed by the Uplynk integration extension.";if(function(t){if(t.sources)if(ji(t.sources)){for(var i,n=Ft(t.sources);!(i=n()).done;)if(nT(i.value))return!0}else if(Wi(t.sources))return nT(t.sources);return!1}(this.xs.source))return"This source is managed by the DAI integration extension.";if(function(t){if(t.sources)if(ji(t.sources)){for(var i,n=Ft(t.sources);!(i=n()).done;)if(uT(i.value))return!0}else if(Wi(t.sources))return uT(t.sources);return!1}(this.xs.source))return"This source is managed by Millicast."}}},n.setSrc=function(t){return this.setSource({src:t})},n.setSource=function(t){this.lt=null,this.trigger("error")},n.currentSrc=function(){return this.xs.src},n.load=function(){this.setPreload("auto")},n.preload=function(){return this.xs.preload},n.setPreload=function(t){this.xs.preload=t},n.autoplay=function(){return this.xs.autoplay},n.setAutoplay=function(t){this.xs.autoplay=Boolean(t)},n.seeking=function(){return this.xs.seeking},n.seekable=function(){return this.xs.seekable},n.ended=function(){return this.xs.ended},n.playbackRate=function(){return this.xs.playbackRate},n.setPlaybackRate=function(t){this.xs.playbackRate=t},n.readyState=function(){return this.xs.readyState},n.networkState=function(){return 0},n.controls=function(){return!1},n.videoHeight=function(){return this.xs.videoHeight},n.videoWidth=function(){return this.xs.videoWidth},n.supportsFullScreen=function(){return this.xs.presentation.supportsMode(PT.FULLSCREEN)},n.enterFullScreen=function(){this.xs.presentation.requestMode(PT.FULLSCREEN)},n.exitFullScreen=function(){this.xs.presentation.requestMode(PT.INLINE)},n.Us=function(){var t=this.xs.ads;if(t&&t.playing)return!0;var i=this.xs.vr;return!(!i||i.state===Z4.Os)},n.initTextTrackListeners=function(){var i=this;return this.on("touchend",function(t){i.Us()&&(t.preventDefault=function(){})}),t.prototype.initTextTrackListeners.call(this)},n.Zt=function(){var t=this;if(this.src()){var i=this.readyState();if(0===i){var n=!1,r=function(){n=!0};this.on("loadstart",r);var e=function(){n||t.trigger("loadstart")};return this.on("loadedmetadata",e),void this.ready(function(){t.off("loadstart",r),t.off("loadedmetadata",e),n||t.trigger("loadstart")})}var s=["loadstart"];s.push("loadedmetadata"),i>=2&&s.push("loadeddata"),i>=3&&s.push("canplay"),i>=4&&s.push("canplaythrough"),this.ready(function(){for(var i,n=Ft(s);!(i=n()).done;){var r=i.value;t.trigger(r)}})}},n.dispose=function(){this.$s(),this.xs=null,t.prototype.dispose.call(this)},i.isSupported=function(){return!0},i.canPlayType=function(){return"maybe"},i.canPlaySource=function(t){return"maybe"},xt(i,[{key:"featuresVolumeControl",get:function(){return De}}]),i}(gut);mut.prototype.featuresFullscreenResize=wut.prototype.featuresFullscreenResize,mut.prototype.featuresPlaybackRate=wut.prototype.featuresPlaybackRate,mut.prototype.featuresProgressEvents=!0,mut.prototype.featuresTimeupdateEvents=!0,mut.prototype.featuresNativeTextTracks=!0,tut.registerTech("THEOplayer",mut),V(),It(),V(),It(),Nt(),V(),It(),Bt(),Nt(),V(),It();var yut=function(t){var i=this;this.Ls=void 0,this.Hs=function(t){hn(i.Ls,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.qs=function(t){an(i.Ls,"theo-mobile-button-hover")},this.zs=function(t){i.Ls.blur()},this.Ls=t,t.addEventListener("touchstart",this.Hs),t.addEventListener("touchend",this.qs),t.addEventListener("focusin",this.zs)};V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt();var put=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.Gs=function(){hn(this.Ws,"theo-menu-opened")},n.Xs=function(){an(this.Ws,"theo-menu-opened")},xt(i,[{key:"Ws",get:function(){return this.player().el()}}]),i}(hut(tut.getComponent("Menu")));V(),It(),Bt(),Nt();var _ut=function(t){function i(i,n,r){var e;return(e=t.call(this,i,io({selectable:!0},n))||this).Js=void 0,e.Qs=!1,e.Hs=function(t){hn(e.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},e.qs=function(t){an(e.el(),"theo-mobile-menu-item-hover")},e.Js=r,Vi.Zs.Ks&&(e.el().addEventListener("touchstart",e.Hs),e.el().addEventListener("touchend",e.qs)),e}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-menu-item vjs-menu-item"},n.createEl=function(){var i=t.prototype.createEl.call(this,"li",{className:this.buildCSSClass(),tabIndex:0},{"aria-live":"off","aria-label":""});return i.innerHTML="",i},n.handleClick=function(t){this.Qs||(this.parentMenu.Ys(this),"tap"!==t.type&&"keydown"!==t.type||(this.Qs=!0,this.trigger("click"),this.Qs=!1))},n.dispose=function(){Vi.Zs.Ks&&(this.el().removeEventListener("touchstart",this.Hs),this.el().removeEventListener("touchend",this.qs)),t.prototype.dispose.call(this)},xt(i,[{key:"parentMenu",get:function(){return this.Js}}]),i}(hut(tut.getComponent("MenuItem")));V(),It(),Bt(),Nt();var kut=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).Js=void 0,e.Qs=!1,e.ie=!1,e.Js=r,e.on(i,"languagechange",e.se),e}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-primary-background theo-menu-header"},n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-live":"off","aria-label":""});return i.innerHTML="",i},n.handleClick=function(t){!this.Qs&&this.te&&(this.Js.ee(),"tap"===t.type&&(this.Qs=!0,this.trigger("click"),this.Qs=!1))},n.se=function(){this.te?this.el().setAttribute("aria-label",this.localize("Go back to the previous menu")):this.el().setAttribute("aria-label","")},xt(i,[{key:"parentMenu",get:function(){return this.Js}},{key:"te",get:function(){return this.ie},set:function(t){this.ie=t,this.el().setAttribute("tabindex",this.te?"0":"-1"),this.se()}}]),i}(tut.getComponent("ClickableComponent")),but=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).le=void 0,r.he=function(){return r.oe()},r.le=r.player().el(),r.hide(),r.on("menuchange",r.oe),r}Pt(i,t);var n=i.prototype;return n.addMenuItem=function(t){t=io({playerOptions:this.h.playerOptions},t);var i=new _ut(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i},n.addSubMenuItem=function(t){t=io({playerOptions:this.h.playerOptions},t);var i=this.re(this.player(),t);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i},n.removeMenuItem=function(t){this.removeChild(t),this.trigger("menuchange")},n.buildCSSClass=function(){return"theo-menu vjs-menu"},n.Gs=function(){t.prototype.Gs.call(this),f.removeEventListener("resize",this.he),f.addEventListener("resize",this.he),this.show()},n.oe=function(){var t=this.ae();if(t){var i=t.getClientRects();Vi.Zs.Ks?this.ue(t,i):this.ce(t,i)}},n.ae=function(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0},n.ce=function(t,i){},n.ue=function(t,i){},n.Xs=function(){f.removeEventListener("resize",this.he),t.prototype.Xs.call(this),this.hide(),Vi.Zs.Ks&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))},n.createEl=function(){var i=t.prototype.createEl.call(this);i.className=this.buildCSSClass();var n=this.contentEl();hn(n,"theo-menu-content");var r=new kut(this.player(),this.h,this);return n.parentNode.insertBefore(r.el(),n),this.ne=r,i},n.Ys=function(t){},n.show=function(){return this.oe(),t.prototype.show.call(this)},n.dispose=function(){this.ne&&this.ne.dispose(),t.prototype.dispose.call(this)},xt(i,[{key:"menuHeader",get:function(){return this.ne}},{key:"menuItems",get:function(){return this.children()}}]),i}(put),Aut=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.me=function(t){this.de.ge(t,"replace")},n.ye=function(t){t.de.ge(this,"restore")},n.be=function(){an(this.ke,"vjs-hidden"),this.ke.style.opacity="1",t.prototype.show.call(this)},n.we=function(){hn(this.ke,"vjs-hidden")},n.Gs=function(){this.de&&this.de.Gs(),t.prototype.Gs.call(this)},n.Xs=function(){this.de&&this.de.Xs(),t.prototype.Xs.call(this),hn(this.ke,"vjs-hidden")},n.ae=function(){if(this.de&&this.de._e)return this.de._e.ke},n.ce=function(i,n){if(n.length>0){var r=n[0].height,e=n[0].width;this.fe.xe.style.height=r+"px",this.fe.xe.style.width=e+"px"}t.prototype.ce.call(this,i,n)},xt(i,[{key:"de",get:function(){return this.fe},set:function(t){this.fe&&this.fe.ve(this),this.fe=t,t&&t.pe(this)}}]),i}(but);V(),It(),Bt();var Tut=function(){function t(t){this.Ce=void 0,this.Te=void 0,this.Ls=void 0,this.le=void 0,this.Te=this.Ce=t,this.Ls=v.createElement("div"),this.Ls.className="theo-tertiary-background theo-menu-animation-container",this.Ls.appendChild(this.Te.ke),this.le=this.Ce.player().el()}var i=t.prototype;return i.pe=function(t){t.we(),this.Ls.appendChild(t.ke)},i.ve=function(t){this.Ls.removeChild(t.ke)},i.ge=function(t,i){if(t!=this.Ce){var n=this.Ce;if(this.Ce=t,this.Ce.be(),this._e.focus(),Vi.Zs.Ks)n.we();else{var r=RI("transform");n.ke.style.opacity="0",n.ke.style[r]="replace"===i?"translateX(-100%)":"translateX(100%)",this.Ce.ke.style.opacity="1",this.Ce.ke.style[r]="",g(function(){n.we(),n.ke.style[r]=""},300)}}},i.Gs=function(){this.Se(),this.Ce.be(),this.je()},i.Xs=function(){this.Se(),this.Ce.we(),this.Te.we(),this.Ce=this.Te,this.je()},i.je=function(){var t=this;gI(function(){an(t.Ls,"theo-no-transition"),an(t.Ce.ke,"theo-no-transition")})},i.Se=function(){hn(this.Ls,"theo-no-transition"),hn(this.Ce.ke,"theo-no-transition")},xt(t,[{key:"xe",get:function(){return this.Ls}},{key:"_e",get:function(){return this.Ce}}]),t}();V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt();var Sut=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).Me=void 0,e.Pe=!1,e.Me=r,e.menuHeader.te=!0,e}Pt(i,t);var n=i.prototype;return n.re=function(t,i){var n=new Eut(t,i,this);return n.subMenu.de=this.de,n},n.ee=function(){this.Ae()},n.Ys=function(i){t.prototype.Ys.call(this,i),this.Ae()},n.Ae=function(){this.parentMenu.ye(this)},n.buildCSSClass=function(){return"theo-submenu "+(this.Pe?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+t.prototype.buildCSSClass.call(this)},n.addSubMenuItem=function(i){this.Pe=!0;var n=t.prototype.addSubMenuItem.call(this,i);return this.removeClass("theo-leaf-submenu"),n},xt(i,[{key:"ke",get:function(){return this.el()}},{key:"parentMenu",get:function(){return this.Me}}]),i}(Aut),Eut=function(t){function i(i,n,r){var e;return(e=t.call(this,i,io({selectable:!1},n),r)||this).Ne=void 0,e.Ne=new Sut(i,n,r),e}return Pt(i,t),i.prototype.handleClick=function(t){this.parentMenu.me(this.subMenu)},xt(i,[{key:"subMenu",get:function(){return this.Ne}}]),i}(_ut),Iut=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).Ee=void 0,e.Ie=!1,e.Ee=r,e}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=tut.createEl("div",{className:this.buildCSSClass()});return this.Be=t.prototype.createEl.call(this),this.Be.className=t.prototype.buildCSSClass.call(this),hn(this.Be,"theo-menu-content-animatable"),i.appendChild(this.Be),this.de=new Tut(this),i.appendChild(this.de.xe),i},n.buildCSSClass=function(){return"theo-menu-animatable "+t.prototype.buildCSSClass.call(this)},n.re=function(t,i){var n=new Eut(t,i,this);return n.subMenu.de=this.de,n},n.ce=function(i,n){t.prototype.ce.call(this,i,n);var r=this.le.getClientRects(),e=r.length>0?r[0]:void 0,s=S(getComputedStyle(this.el()).fontSize);Px(this.el(),this.Ee.el(),e,s)},n.ee=function(){this.Ee.closeMenu()},n.dispose=function(){this.Ie||(this.Ie=!0,t.prototype.dispose.call(this))},xt(i,[{key:"menuButton",get:function(){return this.Ee}},{key:"ke",get:function(){return this.Be}}]),i}(Aut);V(),It(),Bt();var Rut=function(){function t(t,i){var n=this;this.De=void 0,this.$e=void 0,this.Ue=function(){an(n.De,"vjs-hidden");var t=n.$e.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,r=S(getComputedStyle(n.De).fontSize);Px(n.De,n.$e.el(),i,r)},this.Ve=function(){hn(n.De,"vjs-hidden")},this.Le=function(){return n.Oe()},this.$e=t,wn(t.el()),function(t){t.addEventListener("mouseover",function(t){wn(t.target)})}(t.el()),this.De=v.createElement("span"),this.De.innerHTML=this.$e.localize(i),this.De.className="theo-button-tooltip vjs-hidden",this.De.setAttribute("aria-hidden","true"),this.$e.el().appendChild(this.De),this.$e.on("mouseover",this.Ue),this.$e.on("mouseout",this.Ve),this.$e.on("dispose",this.Le)}var i=t.prototype;return i.Re=function(){return!on(this.De,"vjs-hidden")},i.Oe=function(){this.$e.off("mouseover",this.Ue),this.$e.off("mouseout",this.Ve),this.$e.off("dispose",this.Le),Zi(this.De)},xt(t,[{key:"Fe",get:function(){return this.De.textContent||""},set:function(t){this.De.innerHTML=this.$e.localize(t),this.Re()&&this.Ue(),wn(this.$e.el())}}]),t}(),Cut=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).qe=void 0,r.De=void 0,r.ze=!1,r.Ge=1,r.We=!0,r.Qe=function(t){var i,n=r.el().contains(t.target),e=r.qe.el().contains(t.target),s=!1;Vi.Zs.Ks&&r.He&&(s=(null==(i=r.el().parentElement)?void 0:i.querySelector(".theo-mobile-menu-background"))===t.target);n||e||!r.ze||(s&&t.preventDefault(),r.closeMenu())},r.Ye=function(t){27===t.which&&(r.closeMenu(),r.focus())},r.Je=function(){r.ze&&r.closeMenu()},r.Xe=function(){r.qe.menuItems.length>=r.Ge?r.show():(r.closeMenu(),r.hide())},r.qe=new Iut(i,n,r),r.player().getChild("controlBarMenuContainer").addChild(r.qe),r.De=new Rut(r,r.controlText()),r.el().setAttribute("aria-haspopup","true"),Vi.Zs.Ke?(r.on(v,"touchend",r.Qe),new yut(r.el())):(r.on(v,"click",r.Qe),r.on(v,"keydown",r.Ye),BI&&r.on(v,BI.Ze,r.closeMenu)),r.xs.addEventListener("seeking",r.Je),r.on(r.qe,"menuchange",r.Xe),r.on(i,"languagechange",r.se),r.Xe(),r}Pt(i,t);var n=i.prototype;return n.isMenuOpen=function(){return this.ze},n.openMenu=function(){this.We&&!this.ze&&(this.qe.Gs(),this.el().setAttribute("aria-expanded","true"),this.ze=!0,this.qe.focus())},n.closeMenu=function(){this.We&&this.ze&&(this.qe.Xs(),this.el().setAttribute("aria-expanded","false"),this.ze=!1)},n.buildCSSClass=function(){return"theo-controlbar-button vjs-menu-button vjs-menu-button-popup "+t.prototype.buildCSSClass.call(this)},n.createEl=function(i,n,r){return t.prototype.createEl.call(this,"button",{},{"aria-live":"off"})},n.handleClick=function(){this.ze?this.closeMenu():this.openMenu()},n.enable=function(){return this.We=!0,t.prototype.enable.call(this)},n.disable=function(){return this.closeMenu(),this.We=!1,t.prototype.disable.call(this)},n.se=function(){this.De.Fe=this.controlText()},n.dispose=function(){this.player().removeChild(this.qe),this.qe.dispose(),this.De.Oe(),this.xs.removeEventListener("seeking",this.Je),t.prototype.dispose.call(this)},xt(i,[{key:"He",get:function(){var t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}},{key:"menu",get:function(){return this.qe}},{key:"minimumMenuItems",set:function(t){this.Ge=t,this.Xe()}}]),i}(hut(tut.getComponent("Button"))),Put=tut.getComponent("Component"),Nut=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).addChild("THEOControlBarShadow",void 0,0),r}Pt(i,t);var n=i.prototype;return n.addMenuButton=function(t){t=io({playerOptions:this.h.playerOptions},t);var i=new Cut(this.player(),t);return this.addChild(i),i},n.removeMenuButton=function(t){this.removeChild(t)},n.createEl=function(){var i=t.prototype.createEl.call(this);return i.className=this.buildCSSClass(),i},n.buildCSSClass=function(){return"theo-secondary-color vjs-control-bar "+t.prototype.buildCSSClass.call(this)},i}(tut.getComponent("ControlBar")),Dut=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},n.buildCSSClass=function(){return"theo-tertiary-color theo-control-bar-shadow"},i}(Put);tut.registerComponent("THEOControlBarShadow",Dut),V(),It(),Nt(),V(),It(),Nt();var xut=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).tn=void 0,r.tn=n.sn,r}Pt(i,t);var n=i.prototype;return n.handleFocus=function(i){t.prototype.handleFocus.call(this,i),this.tn.addClass("focus-within")},n.handleBlur=function(i){t.prototype.handleBlur.call(this,i),this.tn.removeClass("focus-within")},i}(tut.getComponent("VolumeBar"));V(),It(),Nt();var But=tut.getComponent("VolumeControl"),Out=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).nn=void 0,r.nn=new xut(i,{sn:r}),r.addChild(r.nn),r}return Pt(i,t),i}(But);Out.prototype.h=io({},But.prototype.h,{children:[]}),tut.registerComponent("VolumeControl",Out);var Mut=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).gn=void 0,r.vn=!1,r.cn=0,r.ln=function(){0!==r.cn&&(r.cn=0,r.hn(r.an()))},r.bn=function(){r.vn&&r.pn()},r.on(i,"ready",r.rn),r.on(i,"pause",r.rn),r.on(i,"useractive",r.rn),r.on(i,"firstplay",r.un),r.on(i,"play",r.un),r.on(i,"userinactive",r.un),r.on("transitionstart",r.dn),r.on("transitionend",r.fn),r.gn=new DI(r.el()),r.gn.wn(_I.yn,r.bn),r.gn._n(!0),r}Pt(i,t);var n=i.prototype;return n.rn=function(){this.hn(this.an())},n.un=function(){0===this.cn&&(this.cn=g(this.ln,100))},n.dn=function(t){"opacity"===t.propertyName&&(0!==this.cn&&(w(this.cn),this.cn=0),this.hn(!0))},n.fn=function(t){"opacity"===t.propertyName&&(this.an()||this.hn(!1))},n.an=function(){return"0"!==f.getComputedStyle(this.el()).opacity},n.hn=function(t){this.vn!==t&&(this.vn=t,t?this.pn():this.xs.textTrackStyle.marginBottom=void 0)},n.pn=function(){var t=this.el().getBoundingClientRect().height;this.xs.textTrackStyle.marginBottom!==t&&(this.xs.textTrackStyle.marginBottom=t)},n.dispose=function(){w(this.cn),this.cn=0,this.gn.mn(_I.yn,this.bn),this.gn.kn(),t.prototype.dispose.call(this)},i}(hut(Nut));Mut.prototype.h=io({},Nut.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),tut.registerComponent("ControlBar",Mut),V(),It(),Nt();var Lut=function(t){function i(i,n){var r;return r=t.call(this,i,n)||this,i.topControlBar=r,r}return Pt(i,t),i.prototype.buildCSSClass=function(){return"theo-top-controlbar "+t.prototype.buildCSSClass.call(this)},i}(Nut);Lut.prototype.h=io({},Nut.prototype.h,{children:[]}),tut.registerComponent("TopControlBar",Lut),V(),It(),Nt();var Fut=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"timeupdate",r.updateContent),r.on(i,"emptied",r.updateContent),r}return Pt(i,t),i.prototype.updateContent=function(){var t=nut(this.player()),i=this.xs,n=eut(i),r=this.localize("Current Time"),e=out(A.max(0,t-n),sut(i));e!==this.Mt&&(this.Mt=e,this.contentEl().innerHTML=''+r+" "+e)},i}(hut(tut.getComponent("CurrentTimeDisplay")));tut.registerComponent("CurrentTimeDisplay",Fut),V(),It(),Nt();var Uut=function(t){function i(i,n){var r,e;return(r=t.call(this,i,n)||this).xn=function(){return r.updateContent()},r.off(i,"durationchange",r.updateContent),r.on(i,"durationchange",r.updateContent),r.off(i,"timeupdate",r.updateContent),r.on(i,"timeupdate",r.updateContent),r.off(i,"emptied",r.updateContent),r.on(i,"emptied",r.updateContent),null==(e=r.xs)||e.clip.addEventListener("change",r.xn),r}Pt(i,t);var n=i.prototype;return n.updateContent=function(){var t=this.xs,i=E(t.duration)?NaN:sut(t),n=t.clip.endTime-t.clip.startTime,r=A.min(i,n)||0;if(this.ct!==r){this.ct=r;var e=this.localize("Duration Time"),s=out(r);this.S.innerHTML=''+e+" "+s}},n.dispose=function(){var i;null==(i=this.xs)||i.clip.removeEventListener("change",this.xn),t.prototype.dispose.call(this)},i}(hut(tut.getComponent("DurationDisplay")));tut.registerComponent("DurationDisplay",Uut),V(),It(),Nt();var Vut=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).controlText("Live"),r.Sn(),r.on(i,"emptied",r.Sn),r.on(i,"durationchange",r.Sn),Vi.Zs.Ke&&new yut(r.el()),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-live-control "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){var i=t.prototype.createEl.call(this,"button",{},{"aria-live":"off"});return this.Cn=tut.createEl("span",{className:"theo-live-control-indicator"}),rn(i,this.Cn),i},n.createControlTextEl=function(i){var n=t.prototype.createControlTextEl.call(this,i);return tut.removeClass(n,"vjs-control-text"),tut.addClass(n,"theo-live-control-text"),n},n.handleClick=function(){var t,i=this.xs;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{var n=this.player();n.currentTime(rut(i)),n.play()}},n.Sn=function(){iut(this.xs)?this.show():this.hide()},i}(hut(tut.getComponent("Button")));tut.registerComponent("LiveDisplay",Vut),V(),It(),Nt();var jut=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-secondary-color vjs-loading-spinner "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){var i=t.prototype.createEl.call(this);i.className=this.buildCSSClass();var n=tut.createEl("div",{className:"theo-loading-spinner-rotator"}),r=tut.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=tut.createEl("div",{className:"theo-loading-spinner-circle-right"});return n.appendChild(r),n.appendChild(e),i.appendChild(n),i},i}(tut.getComponent("LoadingSpinner"));tut.registerComponent("LoadingSpinner",jut),V(),It(),Nt();var Hut=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).Pn=[],r.on(i,"emptied",r.update),r}return Pt(i,t),i.prototype.update=function(){var t=this.xs,i=OA.jn(uut(t)),n=i.Tn(0),r=OA.jn(t.buffered).Mn(i),e=i.An(0)-n,s=r.V&&r.An(r.V-1)||0;s=A.max(0,s-n);var u=this.el(),o=this.Pn;u.style.width=Wut(s,e);for(var h=0;hr.V;d--)u.removeChild(o[d-1]);o.length=r.V},i}(hut(tut.getComponent("LoadProgressBar")));function Wut(t,i){var n=t/i||0;return 100*(n>=1?1:n)+"%"}tut.registerComponent("LoadProgressBar",Hut),V(),It(),Nt();var zut=function(t){function i(i,n){var r,e;((r=t.call(this,i,n)||this).En=NaN,r.Fn=function(){var t=nut(r.player()),i=r.xs,n=(t-eut(i))/sut(i)||0;n=Cn(n,0,1),r.update(t,100*n+"%")},r.keepTooltipsInside&&(tut.addClass(r.tooltip,"theo-secondary-color"),r.tooltip.appendChild(r.Nn)),r.on(i,"ready",function(){r.on(i.controlBar.progressControl,"mouseenter",r.handleMouseMove)}),Oi.Ks)&&(r.on(i,"firstplay",r.Fn),r.on(i,"play",r.Fn),r.on(i,"seeking",r.Fn),r.on(i,"seeked",r.Fn),r.on(i,"timeupdate",r.Fn),r.xs.addEventListener("dimensionchange",r.Fn),null==(e=r.xs.presentation)||e.addEventListener(VI.MODE_CHANGE,r.Fn),r.on(i,"ready",function(){r.on(i.controlBar.progressControl,"touchstart",r.handleTouchMove),r.on(i.controlBar.progressControl,"touchmove",_n(function(t){return r.handleTouchMove(t)},25)),r.Fn()}));return r}Pt(i,t);var n=i.prototype;return n.handleMouseMove=function(t){var i=t,n=this.xs,r=eut(n)+this.calculateDistance(i)*sut(n),e=i.pageX-Cx(this.el().parentNode).left;this.update(r,e+"px")},n.handleTouchMove=function(t){var i=t,n=this.xs,r=eut(n)+this.calculateDistance(i)*sut(n),e=i.touches[0].pageX-Cx(this.el().parentNode).left;this.update(r,e+"px")},n.createEl=function(){var i=t.prototype.createEl.call(this);return this.Nn=tut.createEl("span",{className:"theo-time-tooltip-text"}),i},n.update=function(t,i){this.En=t;var n=this.Bn(t);this.el().style.left=i,this.el().setAttribute("data-current-time",n),this.keepTooltipsInside&&(xx(this.Nn,n),this.In())},n.In=function(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){var t=this.player().contentEl(),i=t.getClientRects(),n=i.length>0?i[0]:void 0,r=S(getComputedStyle(t).fontSize);Px(this.tooltip,this.el(),n,r)}},n.Bn=function(t){var i=this.xs,n=t-rut(i);return out(iut(i)?A.min(n,0):n,sut(i))},n.dispose=function(){var i;this.xs.removeEventListener("dimensionchange",this.Fn),null==(i=this.xs.presentation)||i.removeEventListener(VI.MODE_CHANGE,this.Fn),t.prototype.dispose.call(this)},i}(hut(tut.getComponent("MouseTimeDisplay")));tut.registerComponent("MouseTimeDisplay",zut),V(),It(),Nt();var qut=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.updateDataAttr=function(){var t=nut(this.player());this.el().setAttribute("data-current-time",this.Bn(t))},n.Bn=function(t){var i=this.xs;return out(t-rut(i),sut(i))},n.createEl=function(){var i=t.prototype.createEl.call(this);return i.className=this.buildCSSClass(),i},n.buildCSSClass=function(){return"theo-primary-color vjs-play-progress vjs-slider-bar "+t.prototype.buildCSSClass.call(this)},i}(hut(tut.getComponent("PlayProgressBar")));tut.registerComponent("PlayProgressBar",qut),V(),It(),Nt();var Xut=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"timeupdate",r.updateContent),r.on(i,"emptied",r.updateContent),r}return Pt(i,t),i.prototype.updateContent=function(){var t=this.xs,i=sut(t);if(i){var n=uut(t).end(0),r=this.localize("Remaining Time"),e=out(A.max(0,n-this.player().currentTime()),i);e!==this.Mt&&(this.Mt=e,this.contentEl().innerHTML=''+r+" -"+e)}},i}(hut(tut.getComponent("RemainingTimeDisplay")));tut.registerComponent("RemainingTimeDisplay",Xut),V(),It(),Nt(),V(),It(),Bt(),Ut();var Gut=function(){function t(t,i){var n=this;this.Dn=void 0,this.Ln=void 0,this.On=void 0,this.ur=void 0,this.Rn=void 0,this.Vn=void 0,this.ar=void 0,this.Cs=void 0,this.qn=void 0,this.Wn=void 0,this.Gn=void 0,this.cr=void 0,this.dr=void 0,this.lr=void 0,this.zn=void 0,this.ir=void 0,this.Dn=i,this.Vn=[],this.Cs=void 0,this.qn=function(){n.Zn(n.Jn())},this.Wn=function(t){var i=t.track;i.kind===ep.Yn&&(i.addEventListener("addcue",n.qn),i.addEventListener("removecue",n.qn),i.addEventListener("readystatechange",n.qn)),n.qn()},this.Gn=function(t){var i=t.track;i.kind===ep.Yn&&(i.removeEventListener("addcue",n.qn),i.removeEventListener("removecue",n.qn),i.removeEventListener("readystatechange",n.qn)),n.qn()},this.cr=function(t){var i=n.xs,r=function(t,i){var n,r,e=Cx(t),s=t.offsetWidth,u=t.offsetHeight,o=e.top,h=e.left;!function(t){return void 0!==t.changedTouches}(i)?(r=i.pageX,n=i.pageY):(r=i.changedTouches[0].pageX,n=i.changedTouches[0].pageY);var a=Cn((o-n+u)/u,0,1),c=Cn((r-h)/s,0,1);return{x:c,y:a}}(n.Ln,t),e=eut(i)+r.x*sut(i);e===i.duration&&(e-=.1),n.sr(e)},this.dr=function(){n.On.we()},this.lr=function(){n.On.be()},this.zn=function(){n.Rn&&(n.tr(),n.$n(),n.ir())},this.ir=function(){var t,i,r,e=null==(i=n.Rn)||null==(t=i.activeCues)?void 0:t[0],s=Wn(n.Vn,function(t){return t.pr===e});s!==n.ar&&(null==(r=n.ar)||r.mr(),n.ar=s,null==s||s.gr())},this.ur=t,this.On=new Yut,this.Dn.contentEl().appendChild(this.On.xe),this.Ln=v.createElement("div"),hn(this.Ln,"theoplayer-chapterbar"),this.ur.appendChild(this.Ln),this.ur.addEventListener("mousemove",this.cr),this.ur.addEventListener("mouseenter",this.lr),this.ur.addEventListener("mouseleave",this.dr),this.Hn()}var i=t.prototype;return i.$n=function(){var t=this.Rn;if(t){var i=this.xs;if(0!==i.seekable.length){var n=t.cues.slice();this.On.Un(n);for(var r=0;r0&&n.readyState!==Fw.ERROR)return n}},i.Zn=function(t){var i=this.Rn;t!==i&&(i&&(this.tr(),i.removeEventListener("cuechange",this.ir)),this.Rn=t,t&&(t.addEventListener("cuechange",this.ir),this.zn()))},i.sr=function(t){this.On.er(t)},i.nr=function(){this.On.be()},i.rr=function(){this.On.we()},i.tr=function(){for(var t,i=Ft(this.Vn);!(t=i()).done;){t.value.Oe()}this.On.hr(),this.Vn=[],this.ar=void 0},i.Oe=function(){this.Xn(),this.ur.removeEventListener("mousemove",this.cr),this.ur.removeEventListener("mouseenter",this.lr),this.ur.removeEventListener("mouseleave",this.dr),this.Zn(void 0),this.On.Oe(),this.Cs=void 0},xt(t,[{key:"xs",get:function(){var t;return null!=(t=this.Cs)?t:this.Cs=aut(this.Dn)}}]),t}(),Qut=function(){function t(t,i,n){this.pr=void 0,this.Ls=void 0,this.pr=t,this.Ls=this.yr(i,n)}var i=t.prototype;return i.gr=function(){hn(this.Ls,"theoplayer-chapter-indicator-active")},i.mr=function(){an(this.Ls,"theoplayer-chapter-indicator-active")},i.yr=function(t,i){var n=t.seekable.start(0),r=t.seekable.end(t.seekable.length-1),e=r-n,s=this.pr.startTime,u=this.pr.endTime,o=u>=n&&s<=r,h=Cn(s-n,0,e),a=Cn(u-n,0,e),c=A.max(0,a-h),f=v.createElement("div");hn(f,"theoplayer-chapter-indicator");var d=v.createElement("div");hn(d,"theoplayer-chapter-indicator-highlight"),f.appendChild(d),i&&hn(f,"theoplayer-chapter-indicator-discontinuous");var l=h/e*100,g=c/e*100;return f.style.display=o?"":"none",f.style.width=g+"%",f.style.left=l+"%",f},i.Oe=function(){Zi(this.Ls)},xt(t,[{key:"xe",get:function(){return this.Ls}}]),t}(),Yut=function(){function t(){this.kr=[],this.xe=void 0,this._r=void 0,this.br=0,this.xe=v.createElement("div"),hn(this.xe,"theoplayer-chaptertitle"),this.xe.style.display="none",this._r=v.createElement("p"),this.xe.appendChild(this._r)}var i=t.prototype;return i.we=function(){this.br--,0===this.br&&an(this.xe,"theoplayer-chapter-hovering")},i.Un=function(t){this.kr=t||[],this.kr.length>0&&(this.xe.style.display="")},i.wr=function(t){xx(this._r,t.content)},i.hr=function(){this.kr=[],xx(this._r,""),this.xe.style.display="none"},i.be=function(){this.br++,this.br>0&&hn(this.xe,"theoplayer-chapter-hovering")},i.er=function(t){for(var i,n=Ft(this.kr);!(i=n()).done;){var r=i.value;if($ut(r,t)){this.wr(r);break}}},i.Oe=function(){Zi(this.xe)},t}();function $ut(t,i){return new OA([t.startTime,t.endTime]).Cr(i)}var Kut=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).Ln=void 0,r.playingStates=[],r.on(i,"emptied",r.update),r.on(i,"seeking",r.update),r.Ln=new Gut(r.el(),i),r}Pt(i,t);var n=i.prototype;return n.updateAriaAttributes=function(t){var i=nut(this.player()),n=this.xs;t.setAttribute("aria-valuenow",(100*this.Sr(i)).toFixed(2)),t.setAttribute("aria-valuetext",out(i-rut(n),sut(n)))},n.getPercent=function(){return this.Sr(this.player().currentTime())},n.handleMouseMove=function(t){if(!(this.xs&&this.xs.ads&&this.xs.ads.playing)){var i=this.xs,n=eut(i)+this.calculateDistance(t)*sut(i);n>=i.duration&&(n=i.duration-.1),this.Ln.sr(n),this.player().currentTime(n)}},n.handleMouseDown=function(i){this.playingStates.push(!this.player().paused()),this.Ln.nr(),t.prototype.handleMouseDown.call(this,i)},n.handleMouseUp=function(i){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.Ln.rr(),t.prototype.handleMouseUp.call(this,i)},n.Sr=function(t){var i=this.xs;return Cn((t-eut(i))/sut(i),0,1)},n.dispose=function(){this.Ln.Oe(),tr(this.playingStates)},i}(hut(tut.getComponent("SeekBar")));tut.registerComponent("SeekBar",Kut),V(),It(),Nt();var Jut=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(r,"touchmove",r.handleMouseMove),r.on("touchstart",r.handleMouseDown),r.seekBar.off(["touchmove","touchstart"]),r}Pt(i,t);var n=i.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(t){this.seekBar.handleMouseMove(t)},n.handleMouseDown=function(t){this.seekBar.handleMouseDown(t)},i}(tut.getComponent("ProgressControl"));Vi.Zs.Ks&&tut.registerComponent("ProgressControl",Jut),V(),It(),Nt();var Zut=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.updateDataAttr=function(){var t=nut(this.player()),i=this.Bn(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i},n.Bn=function(t){var i=this.xs;return out(t-rut(i),sut(i))},n.createEl=function(){var i=t.prototype.createEl.call(this);return i.className=this.buildCSSClass(),i},n.buildCSSClass=function(){return"theo-primary-color vjs-tooltip-progress-bar vjs-slider-bar "+t.prototype.buildCSSClass.call(this)},i}(hut(tut.getComponent("TooltipProgressBar")));function tot(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;if(r.enabled)return r}}function iot(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:not(t),description:rot(t),hd:!!t.height&&t.height>=720}}function not(t){return t.height?t.height+"p":t.bandwidth?rot(t):""}function rot(t){return t.bandwidth?t.bandwidth>1e7?(t.bandwidth/1e6).toFixed(0)+"Mbps":t.bandwidth>1e6?(t.bandwidth/1e6).toFixed(1)+"Mbps":(t.bandwidth/1e3).toFixed(0)+"kbps":""}tut.registerComponent("TooltipProgressBar",Zut),V(),It(),Nt(),V(),It(),Bt(),Nt(),Ut(),V(),It(),Ut(),V(),It(),V(),It(),Bt(),Ut();var eot=function(){function t(t){this.Pr=void 0,this.Tr=[],this.Pr=t}var i=t.prototype;return i.Er=function(t){var i=this.Nr;if(i)for(var n,r=Ft(i);!(n=r()).done;){var e=n.value;if(e.Br===t)return e}},i.Ir=function(t){var i=this,n=this.Pr.addMenuItem();return n.Br=t,n.on("click",function(){return i.Fr(n)}),n.el().setAttribute("role","menuitemradio"),n},i.Dr=function(t){t.dispose()},i.$r=function(t){return!0},i.Ar=function(t){if(this.$r(t)){Jn(this.Tr,t)||this.Tr.push(t);var i=this.Er(t)||this.Ir(t);return this.Rr(i),i}this.Mr(t)},i.Mr=function(t){var i=this.Er(t);i&&(this.Pr.removeMenuItem(i),this.Dr(i)),Yn(this.Tr,t)},i.Oe=function(){for(var t,i=[],n=Ft(this.Tr);!(t=n()).done;){var r=t.value;i.push(r)}for(var e,s=Ft(i);!(e=s()).done;){var u=e.value;this.Mr(u)}tr(i)},xt(t,[{key:"jr",get:function(){return this.Tr},set:function(t){for(var i=this.Tr,n=i.length-1;n>=0;n--){var r=i[n];Jn(t,r)||this.Mr(r)}for(var e,s=Ft(t);!(e=s()).done;){var u=e.value;this.Ar(u)}this.Pr.oe()}},{key:"Nr",get:function(){return this.Pr.menuItems}}]),t}(),sot=function(t){function i(i,n,r){var e;return(e=t.call(this,i.subMenu)||this).Jr=void 0,e.Cs=void 0,e.Vr=void 0,e.Yr=void 0,e.Zr=void 0,e.Or=void 0,e.Hr=void 0,e.zr=void 0,e.Gr=void 0,e.th=function(){var t=tot(e.Cs.videoTracks);if(t!==e.Yr){var i=[];if(e.Yr&&(e.Yr.removeEventListener("activequalitychanged",e.ih),e.Yr.removeEventListener("targetqualitychanged",e.sh),e.Yr.removeEventListener("update",e.eh)),e.Yr=t,t){t.addEventListener("activequalitychanged",e.ih),t.addEventListener("targetqualitychanged",e.sh),t.addEventListener("update",e.eh);var n=oot(cot(t.qualities.filter(function(t){return t.available})));i=n.length>1?[].concat([void 0],n):[void 0]}e.jr=i,e.sh(),e.ih()}},e.eh=function(t){var i=t.track;if(i===e.Yr){var n,r=oot(cot(i.qualities.filter(function(t){return t.available}))),s=i&&vot(i.targetQuality);e.Zr=e.Kr(s,r),n=r.length>1?[].concat([void 0],r):[void 0],e.jr=n,e.Qr()}},e.ih=function(){e.Ar(void 0),e.Qr()},e.sh=function(){var t=tot(e.Cs.videoTracks),i=t&&vot(t.targetQuality),n=e.Kr(i),r=e.Zr;n!==r&&(e.Zr=n,n&&r||e.Ar(void 0),r&&Jn(e.jr,r)&&e.Ar(r),i&&e.Ar(n),e.Qr())},e.se=function(){xx(e.Pr.menuHeader.el(),e.Vr.localize("Quality")),xx(e.Or,e.Vr.localize("Quality")),xx(e.Hr,e.Vr.localize("Automatic")),xx(e.zr,e.Vr.localize("Automatic")),xx(e.Gr,e.Vr.localize("HD")),e.Jr.el().setAttribute("aria-label",e.Vr.localize("Open the video quality settings menu"));for(var t,i=Ft(e.Nr);!(t=i()).done;){var n=t.value;e.Rr(n)}e.Qr()},e.Jr=i,e.Cs=n,e.Vr=r,e.Or=e.Ur(),e.Hr=e.Lr(),e.zr=e.qr(),e.Gr=e.Wr(),e.Xr(),xx(e.Pr.menuHeader.el(),e.Vr.localize("Quality")),e.jr=[void 0],e.Cs.videoTracks.addEventListener(["addtrack","removetrack","change"],e.th),e.Vr.on("languagechange",e.se),e.th(),e}Pt(i,t);var n=i.prototype;return n.Ur=function(){return this.Or=v.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",xx(this.Or,this.Vr.localize("Quality")),this.Or},n.Lr=function(){return this.Hr=v.createElement("span"),this.Hr.className="theo-settings-control-menu-quality-automatic",xx(this.Hr,this.Vr.localize("Automatic")),this.Hr},n.qr=function(){return this.zr=v.createElement("span"),xx(this.zr,this.Vr.localize("Automatic")),this.zr},n.Wr=function(){return this.Gr=v.createElement("span"),this.Gr.className="theo-primary-color theo-settings-control-menu-item-hd-label",xx(this.Gr,this.Vr.localize("HD")),this.Gr},n.Xr=function(){var t=v.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.Hr),t.appendChild(v.createTextNode(" ")),t.appendChild(this.zr),t.appendChild(v.createTextNode(" ")),t.appendChild(this.Gr),this.Jr.el().appendChild(this.Or),this.Jr.el().appendChild(t),this.Jr.el().setAttribute("aria-label",this.Vr.localize("Open the video quality settings menu"))},n.Qr=function(){var t=this.Yr,i=t&&vot(t.targetQuality),n=t&&t.activeQuality,r=iot(this.Kr(i||n))||{name:this.Vr.localize("Automatic")};xx(this.zr,r.name),cn(this.Hr,"vjs-hidden",Boolean(i)),cn(this.Gr,"vjs-hidden",!r.hd)},n.Rr=function(t){var i=iot(t.Br)||{name:this.Vr.localize("Automatic")},n=i.name;i.hd&&(n+=''+this.Vr.localize("HD")+""),i.description&&(n+=''+i.description+""),t.el().innerHTML=n,t.el().setAttribute("aria-label",this.Vr.localize("Set video quality to ")+i.name),t.Br?t.selected(t.Br===this.Zr):t.selected(!this.Zr)},n.Fr=function(t){this.Yr&&(this.Yr.targetQuality=t.Br&&t.Br.videoQualities)},n.Kr=function(t,i){for(var n,r=Ft(i||this.jr);!(n=r()).done;){var e=n.value;if(t&&e&&-1!==e.videoQualities.indexOf(t))return e}},n.Oe=function(){this.Cs.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.th),this.Vr.off("languagechange",this.se),this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr.removeEventListener("targetqualitychanged",this.sh),this.Yr.removeEventListener("update",this.eh)),t.prototype.Oe.call(this)},i}(eot),uot=function(){function t(t){this.nh=void 0,this.nh=t}return t.prototype.add=function(t){this.nh.push(t)},xt(t,[{key:"height",get:function(){return this.nh[0].height}},{key:"bandwidth",get:function(){return this.nh[0].bandwidth}},{key:"videoQualities",get:function(){return this.nh}},{key:"label",get:function(){return this.nh[0].label}}]),t}();function oot(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){for(var e,s=i.value,u=!1,o=Ft(n);!(e=o()).done;){var h=e.value;if(fot(h,s)){h.add(s),u=!0;break}}u||n.push(new uot([s]))}return n}function hot(t,i){return t&&i?Un(t,i):Ln.rh}function aot(t,i){return t===i?Ln.rh:hot(t.height,i.height)||hot(t.width,i.width)||hot(t.bandwidth,i.bandwidth)}function cot(t){return An(t,aot).reverse()}function fot(t,i){return t.label&&i.label&&t.label===i.label||Wg(iot(t),iot(i))}function vot(t){return ji(t)?1===t.length?t[0]:void 0:t}function dot(t){return 1===t?"Normal":""+A.round(100*t)/100}V(),It(),Nt(),Ut();var lot=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i.subMenu)||this).Jr=void 0,s.Cs=void 0,s.Vr=void 0,s.oh=void 0,s.Or=void 0,s.ah=void 0,s.hh=function(){s.oh&&s.Ar(s.oh);var t=s.Cs.playbackRate;s.oh=t,xx(s.ah,s.Vr.localize(dot(t))),t&&s.Ar(t)},s.se=function(){xx(s.Pr.menuHeader.el(),s.Vr.localize("Speed")),xx(s.Or,s.Vr.localize("Speed")),s.Jr.el().setAttribute("aria-label",s.Vr.localize("Open the video speed settings menu"));for(var t,i=Ft(s.Nr);!(t=i()).done;){var n=t.value;s.Rr(n)}s.hh()},s.Jr=i,s.Cs=n,s.Vr=r,s.Or=s.Ur(),s.ah=s.Xr(),xx(s.Pr.menuHeader.el(),s.Vr.localize("Speed")),s.jr=e,s.Cs.addEventListener("ratechange",s.hh),s.Vr.on("languagechange",s.se),s.hh(),s}Pt(i,t);var n=i.prototype;return n.Ur=function(){return this.Or=v.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",xx(this.Or,this.Vr.localize("Speed")),this.Or},n.Xr=function(){var t=v.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Jr.el().appendChild(this.Or),this.Jr.el().appendChild(t),this.Jr.el().setAttribute("aria-label",this.Vr.localize("Open the video speed settings menu")),t},n.Ir=function(i){var n=t.prototype.Ir.call(this,i);return this.Rr(n),n},n.Rr=function(t){var i=t.Br,n=this.Vr.localize(dot(i));xx(t.el(),n),t.el().setAttribute("aria-label",this.Vr.localize("Set video speed to ")+n),t.selected(t.Br===this.Cs.playbackRate)},n.Fr=function(t){this.Cs.playbackRate=t.Br},n.Oe=function(){this.Cs.removeEventListener("ratechange",this.hh),this.Vr.off("languagechange",this.se),t.prototype.Oe.call(this)},i}(eot),got=function(t){function i(i,n){var r,e,s;(r=t.call(this,i,n)||this).mh=void 0,r.fh=void 0,r.gh=void 0,r.ph=void 0,r.Yr=void 0,r.dh=function(){var t=tot(r.xs.videoTracks);t!==r.Yr&&(r.Yr&&r.Yr.removeEventListener("activequalitychanged",r.ih),r.Yr=t,t&&t.addEventListener("activequalitychanged",r.ih),r.ih())},r.ih=function(){var t,i=null==(t=r.Yr)?void 0:t.activeQuality,n=Boolean(i&&i.height>=720);r.player().toggleClass("theo-hd",n)},hn(r.menu.el(),"theo-settings-control-menu"),xx(r.menu.menuHeader.el(),i.localize("Settings")),r.controlText("Settings"),r.De.Fe=r.controlText(),r.mh=r.menu.addSubMenuItem({name:"QualityMenuItem"}),r.fh=new sot(r.mh,r.xs,i);var u=null!=(s=null==n||null==(e=n.playerOptions)?void 0:e.playbackRates)?s:[];return r.gh=r.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),r.ph=new lot(r.gh,r.xs,i,u),r.xs.videoTracks.addEventListener(["addtrack","removetrack","change"],r.dh),r.dh(),r}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this);return this.uh=tut.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),xx(this.uh,this.localize("HD")),i.appendChild(this.uh),i},n.buildCSSClass=function(){return"vjs-icon-cog theo-settings-control-button "+t.prototype.buildCSSClass.call(this)},n.se=function(){t.prototype.se.call(this),xx(this.uh,this.localize("HD")),xx(this.menu.menuHeader.el(),this.localize("Settings"))},n.dispose=function(){this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr=void 0),this.xs.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.dh),this.fh.Oe(),this.ph.Oe(),t.prototype.dispose.call(this)},i}(Cut);tut.registerComponent("SettingsButton",got),V(),It(),Nt(),V(),It(),Nt(),Ut(),V(),It(),Nt(),Ut();var wot=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).wh=void 0,r._h=function(t){var i=t.track;r.Ar(i),i.addEventListener("update",r.Sh)},r.xh=function(t){var i=t.track;r.Mr(i),i.removeEventListener("update",r.Sh)},r.Ch=function(t){return r.kh()},r.Sh=function(){for(var t,i=Ft(r.jr);!(t=i()).done;){var n=t.value;r.Ar(n)}},r.wh=n,r.wh.addEventListener("addtrack",r._h),r.wh.addEventListener("removetrack",r.xh),r.wh.addEventListener("change",r.Ch),r.kh(),r}Pt(i,t);var n=i.prototype;return n.yh=function(t){var i=t.label;if(i)return i;var n=t.language;if(n){var r=qL(n);if(r)return r.bh}return n||""},n.kh=function(){this.jr=this.wh},n.Oe=function(){this.wh.removeEventListener("addtrack",this._h),this.wh.removeEventListener("removetrack",this.xh),this.wh.removeEventListener("change",this.Ch),t.prototype.Oe.call(this)},i}(eot),mot=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n.audioTracks)||this).xs=void 0,e.Vr=void 0,e.se=function(){xx(e.Pr.menuHeader.el(),e.Vr.localize("Language"));for(var t,i=Ft(e.Nr);!(t=i()).done;){var n=t.value;e.Rr(n)}},e.xs=n,e.Vr=r,xx(e.Pr.menuHeader.el(),e.Vr.localize("Language")),e.Vr.on("languagechange",e.se),e}Pt(i,t);var n=i.prototype;return n.Rr=function(t){var i=t.Br,n=this.Vr.localize(this.yh(i));xx(t.el(),n),t.el().setAttribute("aria-label",this.Vr.localize("Set the audio language to")+" "+n),t.selected(i.enabled)},n.Fr=function(t){for(var i,n=t.Br,r=Ft(this.xs.audioTracks);!(i=r()).done;){var e=i.value;e!==n&&(e.enabled=!1)}n.enabled=!0},n.Oe=function(){this.Vr.off("languagechange",this.se),t.prototype.Oe.call(this)},i}(wot),yot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).jh=void 0,r.minimumMenuItems=2,r.jh=new mot(r.menu,r.xs,i),r.controlText("Language"),r.De.Fe=r.controlText(),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-icon-audio theo-audio-track-control-button "+t.prototype.buildCSSClass.call(this)},n.dispose=function(){this.jh.Oe(),t.prototype.dispose.call(this)},i}(Cut);tut.registerComponent("audioTrackButton",yot),V(),It(),Nt(),V(),It(),Nt(),Ut();var pot=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n.textTracks)||this).xs=void 0,e.Vr=void 0,e.se=function(){xx(e.Pr.menuHeader.el(),e.Vr.localize("Subtitles"));for(var t,i=Ft(e.Nr);!(t=i()).done;){var n=t.value;e.Rr(n)}},e.xs=n,e.Vr=r,xx(e.Pr.menuHeader.el(),r.localize("Subtitles")),e.Vr.on("languagechange",e.se),e}Pt(i,t);var n=i.prototype;return n.$r=function(i){return!!t.prototype.$r.call(this,i)&&(!i.forced&&ap(i.kind))},n.Ir=function(i){var n=this,r=t.prototype.Ir.call(this,i);hn(r.el(),"theo-text-track-menu-item");var e=v.createElement("span");r.Th=e;var s=v.createElement("div");s.className="theo-text-track-menu-item-toggle",r.Mh=s;var u=function(t){return n.Ah(t,r)};r.Ph=u,s.addEventListener("click",u);var o=v.createElement("div");return o.className="theo-text-track-menu-item-toggle-slider",s.appendChild(o),r.el().appendChild(e),r.el().appendChild(s),r},n.Rr=function(t){var i=t,n=i.Br,r=this.Vr.localize(this.yh(n));xx(i.Th,r),i.el().setAttribute("aria-label",this.Vr.localize("Set the subtitle language to")+" "+r),i.el().setAttribute("role","menuitemcheckbox"),i.selected(n.mode===$y.Kn)},n.Dr=function(i){var n=i;n.Mh.removeEventListener("click",n.Ph),t.prototype.Dr.call(this,i)},n.Fr=function(t){for(var i,n=t.Br,r=Ft(this.xs.textTracks);!(i=r()).done;){var e=i.value;e!==n&&op(e.kind,n.kind)&&(e.mode=$y.Nh)}n.mode!==$y.Kn?n.mode=$y.Kn:n.mode=$y.Nh},n.Ah=function(t,i){t.stopImmediatePropagation(),this.Fr(i)},n.Oe=function(){this.Vr.off("languagechange",this.se),t.prototype.Oe.call(this)},i}(wot),_ot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).jh=void 0,r.jh=new pot(r.menu,r.xs,i),r.controlText("Subtitles"),r.De.Fe=r.controlText(),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-icon-subtitles theo-text-track-control-button "+t.prototype.buildCSSClass.call(this)},n.dispose=function(){this.jh.Oe(),t.prototype.dispose.call(this)},i}(Cut);tut.registerComponent("subtitlesButton",_ot),V(),It(),Nt();var kot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).De=void 0,r.Eh=function(){r.controlText("Replay"),r.De.Fe=r.controlText()},r.controlText("Play"),r.De=new Rut(r,r.controlText()),r.xs.addEventListener("ended",r.Eh),r.on(i,"languagechange",r.se),Vi.Zs.Ke&&new yut(r.el()),r}Pt(i,t);var n=i.prototype;return n.handleClick=function(i){this.xs.muted||this.xs.prepareWithUserAction(),t.prototype.handleClick.call(this,i)},n.handlePlay=function(i){t.prototype.handlePlay.call(this,i),this.controlText("Pause"),this.De.Fe=this.controlText()},n.handlePause=function(i){this.xs.ended||(t.prototype.handlePause.call(this,i),this.controlText("Play"),this.De.Fe=this.controlText())},n.se=function(){this.De.Fe=this.controlText()},n.dispose=function(){this.De.Oe(),this.xs.removeEventListener("ended",this.Eh),t.prototype.dispose.call(this)},i}(hut(tut.getComponent("playToggle")));tut.registerComponent("playToggle",kot),V(),It(),Nt();var bot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).De=void 0,r.controlText("Fullscreen"),r.De=new Rut(r,r.controlText()),Vi.Zs.Ke&&new yut(r.el()),r.on(i,"languagechange",r.updateContent),r}Pt(i,t);var n=i.prototype;return n.handleClick=function(i){this.xs.prepareWithUserAction(),t.prototype.handleClick.call(this,i)},n.handleFullscreenChange=function(i){t.prototype.handleFullscreenChange.call(this,i),this.updateContent()},n.updateContent=function(){var t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.De.Fe=this.controlText()},n.dispose=function(){this.De.Oe(),t.prototype.dispose.call(this)},i}(hut(tut.getComponent("fullscreenToggle")));tut.registerComponent("fullscreenToggle",bot),V(),It(),Nt();var Aot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).De=void 0,r.controlText("Mute"),r.De=new Rut(r,r.controlText()),Vi.Zs.Ke&&new yut(r.el()),r.on(i,"languagechange",r.se),Ne&&(r.removeClass("vjs-hidden"),r.on(i,"loadstart",function(){r.removeClass("vjs-hidden")})),r}Pt(i,t);var n=i.prototype;return n.handleClick=function(i){this.xs.muted&&!this.xs.paused&&this.xs.prepareWithUserAction(),t.prototype.handleClick.call(this,i)},n.update=function(i){t.prototype.update.call(this,i),this.se()},n.se=function(){var t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.De.Fe=this.controlText()},n.dispose=function(){this.De.Oe(),t.prototype.dispose.call(this)},i}(hut(tut.getComponent("muteToggle")));tut.registerComponent("muteToggle",Aot),V(),It(),Nt();var Tot=tut.getComponent("BigPlayButton"),Sot="theo-play-svg-circle",Eot='\n \n \n \n \n \n',Iot=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this),n=tut.createEl("div",{className:"theo-big-play-button-svg-container"});return n.innerHTML=Eot,i.appendChild(n),i},n.buildCSSClass=function(){return"theo-primary-color "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(i){this.xs.muted||this.xs.prepareWithUserAction(),t.prototype.handleClick.call(this,i),void 0!==this.xs.vr&&"unavailable"!==this.xs.vr.state&&(this.xs.vr.useDeviceMotionControls=!0)},i}(hut(Tot));tut.registerComponent("BigPlayButton",Iot),V(),It(),Nt(),Ut();var Rot=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;var Cot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).Kh=void 0,r.Ih=void 0,r.Fh=void 0,r.Zh=function(t){return r.Bh(t)},r.io=function(t){return r.Uh(t)},r.$h=function(t){return r.Rh()},r.qh=void 0,r.showThumbnails=function(){r.Kh&&r.Kh.hidden&&(r.Kh.hidden=!1,r.In())},r.hideThumbnails=function(){!r.Kh||r.Kh.hidden||r.player().scrubbing()||(r.Kh.hidden=!0,r.In())},r.on(r.player().textTracks(),"addtrack",r.Zh),r.on(r.player().textTracks(),"removetrack",r.io),Oi.Ks&&(r.on(i,"seeking",r.showThumbnails),r.on(i,"seeked",r.hideThumbnails)),r}Pt(i,t);var n=i.prototype;return n.Bh=function(t){var i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Ih&&(this.Ih=i,this.Fh=i.src?Vi.Dh(i.src).href:void 0,this.Ih.addEventListener(["addcue","removecue"],this.$h),this.Rh())},n.Uh=function(t){t.track===this.Ih&&this.Oh()},n.createEl=function(){var i=t.prototype.createEl.call(this);return this.Vh=tut.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.Lh=tut.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),i},n.update=function(i,n){t.prototype.update.call(this,i,n),this.keepTooltipsInside&&this.Hh(i)},n.Hh=function(t){var i;if(this.Ih&&this.Ih.cues){var n=function(t,i){for(var n,r=t[0],e=Ft(t);!(n=e()).done;){var s=n.value;if(s.startTime<=i)r=s;else if(i>=s.endTime)return r}return r}(this.Ih.cues,t);i=n&&n.content}if(i!==this.qh)if(this.qh=i,tut.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",Boolean(i)),i){var r=i.match(Rot);if(r){var e=r[1],s=r[2],u=r[3],o=r[4],h=r[5];e=this.Wh(e);var a={Gh:Number(s),Xh:Number(u),Ti:Number(o),Mi:Number(h)};this.Jh(e,a)}else{var c=this.Wh(i);this.Jh(c)}}else this.zh()},n.Rh=function(){E(this.En)||this.Hh(this.En)},n.Wh=function(t){return this.Ih&&this.Fh?Vi.Dh(t,this.Fh).href:t},n.Jh=function(t,i){var n=this;this.Vh&&(this.Vh.src!==t?(this.Vh.onload=function(){n.Qh(i)},this.Vh.src="",this.Vh.src=t):this.Qh(i))},n.Qh=function(t){if(this.Lh&&this.Vh){var i=this.Lh.getContext("2d");i&&(null!=t||(t={Gh:0,Xh:0,Ti:this.Vh.naturalWidth,Mi:this.Vh.naturalHeight}),this.Lh.width=t.Ti,this.Lh.height=t.Mi,i.drawImage(this.Vh,t.Gh,t.Xh,t.Ti,t.Mi,0,0,t.Ti,t.Mi),this.Yh(this.Lh))}},n.Yh=function(t){this.Kh||(rn(this.tooltip,t),this.Kh=t),this.In()},n.zh=function(){this.Kh&&(this.tooltip.removeChild(this.Kh),this.Kh=void 0,this.In())},n.Oh=function(){void 0!==this.Ih&&(this.Ih.removeEventListener(["addcue","removecue"],this.$h),this.Ih=void 0),this.Fh=void 0,this.zh(),this.qh=void 0},n.dispose=function(){this.Oh(),t.prototype.dispose.call(this)},i}(zut);tut.registerComponent("MouseTimeDisplay",Cot),V(),It(),Nt();var Pot=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this);return i.className=this.buildCSSClass(),i},n.buildCSSClass=function(){return"theo-primary-color vjs-volume-level "+t.prototype.buildCSSClass.call(this)},i}(tut.getComponent("VolumeLevel"));tut.registerComponent("VolumeLevel",Pot),V(),It(),Nt(),V(),It(),Nt();var Not=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this);return i.className=this.buildCSSClass(),i},n.buildCSSClass=function(){return"theo-menu-container "+t.prototype.buildCSSClass.call(this)},i}(tut.getComponent("Component"));Not.prototype.h=io({},Not.prototype.h,{children:[]}),tut.registerComponent("controlBarMenuContainer",Not);var Dot=tut.getComponent("Player"),xot=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).handleKeyPress=function(t){9===t.which&&e.addClass("theo-probably-keyboard-focus")},e.handleClick=function(t){0===t.x&&0===t.y||e.removeClass("theo-probably-keyboard-focus")},v.body.addEventListener("keydown",e.handleKeyPress),v.body.addEventListener("click",e.handleClick),e}return Pt(i,t),i.prototype.dispose=function(){var i=this.el(),n=this.contentEl(),r=i.parentNode,e=i.nextSibling;t.prototype.dispose.call(this),Zi(n),this.Si&&r&&(e?r.insertBefore(i,e):r.appendChild(i)),v.body.removeEventListener("keydown",this.handleKeyPress),v.body.removeEventListener("click",this.handleClick)},i}(Dot);xot.prototype.h=io({},Dot.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),tut.registerComponent("Player",xot),V(),It(),V(),It();var Bot=tut.getComponent("Player"),Oot=Bot.prototype.ns;Bot.prototype.ns=function(t){if(!(this.H&&this.H.Us&&this.H.Us()))return Oot.call(this,t)};var Mot=Bot.prototype.createEl;function Lot(t,i,n,r){var e=io({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},n);e.controlBar=io({progressControl:{keepTooltipsInside:!0}},e.controlBar);var s,u=e.techOrder||(e.techOrder=[]);(-1===u.indexOf("THEOplayer")&&u.unshift("THEOplayer"),(e.theoplayer||(e.theoplayer={})).player=t,n&&Wi(n.language))&&(e.languages=io({},e.languages,((s={})[zL]=n.language,s)),e.language=zL);i.setAttribute("data-vjs-player","");var o=i.getAttribute("style"),h=tut(t.element,e,r);return h.ready(function(){cut(h),function(t,i){if(i){if(i.ads){var n=function(i){var n="adbreakbegin"===i.type,r=i.adBreak.integration===uZ.so;fut(t,n,r)};i.ads.addEventListener("adbreakbegin",n),i.ads.addEventListener("adbreakend",n)}if(i.uplynk){var r,e=function(i){var n="adbreakbegin"===i.type;fut(t,n,!1)};null==(r=i.uplynk)||r.ads.adBreaks.addEventListener("addadbreak",function(t){t.adBreak.addEventListener("adbreakbegin",e),t.adBreak.addEventListener("adbreakend",e)})}i.addEventListener("sourcechange",function(){fut(t,!1,!1)})}}(h,t),function(t){t.on("mouseleave",vut)}(h)}),i.removeAttribute("data-vjs-player"),o?i.setAttribute("style",o):i.removeAttribute("style"),Vi.Zs.Ks&&(hn(i,"theo-mobile"),function(t){var i=f.outerHeight,n=f.outerWidth,r=i>n;r?(an(t,"theo-mobile-landscape"),hn(t,"theo-mobile-portrait")):(an(t,"theo-mobile-portrait"),hn(t,"theo-mobile-landscape"))}(i)),function(t){t.on("seeking",function(){on(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()})}(h),h}Bot.prototype.createEl=function(){var t=Mot.call(this),i=tut.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t},V(),It(),V(),It(),Wt(),Nt(),Yt(),V(),It(),Bt(),Nt(),V(),It(),Nt();var Fot=tut.getComponent("Button");var Uot="THEOPiPCloseButton",Vot=function(t){function i(i,n){var r;if((r=t.call(this,i,n)||this).no=void 0,r.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.no)}(n))throw new p("Invalid Picture-in-picture options.");return r.no=n.no,r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-close-button theo-pip-close"},n.handleClick=function(){this.no.eo()},i}(Fot);tut.registerComponent(Uot,Vot);var jot=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).Lo=void 0,e.mo=void 0,e.lo=void 0,e.t=void 0,e.bo=void 0,e.Ho=!1,e.ho=!1,e.Co=!1,e.xo=!1,e.ko=!1,e.eo=void 0,e.Bo=!1,e.Fo=void 0,e.Po=void 0,e.Ao=void 0,e.Mo=!1,e.Eo=void 0,e.co=function(){e.Ho=!0,e.Eo&&!e.ro&&e.Fo&&e.Lo&&e.Fo.qo<=e.Lo&&e.yo(!1)},e.fo=function(){e.lo||(e.Ho=!1,e.eo(),e.jo(!1))},e.se=function(){if(e.Ao){var t=e.t.vo;xx(e.Ao,t.localize("Video playing in Picture-in-Picture mode"))}},e.$o=function(t){!e.xo&&e.Eo&&(E(t)||(e.Lo&&t<=e.Lo||e.Mo?e.ho||e.Co||e.yo(!1):e.ho?e.jo(!1):e.Co=!1))},e.Lo=n.visibility,e.mo=n.position,e.lo=n.retainPresentationModeOnSourceChange,e.Eo=void 0!==e.Lo,e.t=i,e.bo=i.zo,e.eo=r,e.ao(),e}Pt(i,t);var n=i.prototype;return n.ao=function(){this.t.wn(ch.uo,this.co),this.lo||this.t.wn(ch.do,this.fo),this.t.vo.on("languagechange",this.se)},n.po=function(){var t;return"theo-pip-"+(null!=(t=this.mo)?t:"bottom-right")},n.yo=function(t){var i=this.bo;i&&!this.oo&&(this.ko||this.wo(),this._o(),hn(i,"theo-pip"),hn(i,this.po()),this.ho=!0,this.xo=t,this.Co=!1,this.So(new jI(PT.PICTURE_IN_PICTURE)))},n.jo=function(t){var i=this.bo;i&&(this.To(),an(i,"theo-pip"),an(i,this.po()),this.ho=!1,this.Co=t,this.Mo=this.xo,this.xo=!1,this.So(new jI(PT.INLINE)))},n.wo=function(){if(!this.ko){var t=this.t.vo;t.addChild(Uot,{no:this});var i=v.createElement("div");i.className="theo-pip-overlay",this.Ao=v.createElement("div"),this.Ao.className="theo-pip-overlay-text",xx(this.Ao,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.Ao),rn(t.el(),i),this.Po=i,this.ko=!0}},n.No=function(){this.Eo&&!this.Bo&&this.t.Io&&(this.Fo=this.t.Io.Do(.1,this.$o),this.Bo=!0)},n.Ro=function(){this.Fo&&this.t.Io&&(this.t.Io.Uo(this.Fo),this.Bo=!1)},n._o=function(){var t=this.t.vo.contentEl(),i=t.getBoundingClientRect(),n=v.documentElement.clientWidth,r=v.documentElement.clientHeight;t.style.top=i.top+"px",t.style.bottom=r-i.bottom+"px",t.style.right=n-i.right+"px",t.style.left=i.left+"px",t.style.width=i.width+"px",t.style.height=i.height+"px",t.style.position="fixed"},n.To=function(){var t=this.t.vo.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""},n.Oo=function(){an(this.bo,"theo-pip"),this.ro&&this.mo&&an(this.bo,"theo-pip-"+this.mo),this.Po&&(Zi(this.Po),this.Po=void 0)},n.kn=function(){this.Oo(),this.Ro(),this.Vo(),this.t.mn(ch.uo,this.co),this.t.mn(ch.do,this.fo),this.t.vo.off("languagechange",this.se),this.t=void 0},xt(i,[{key:"ro",get:function(){return this.ho}},{key:"oo",get:function(){return this.t.ds()}}]),i}(uh),Hot=function(t){function i(i,n,r,e){var s;return(s=t.call(this,n,r)||this).oa=void 0,s.Go=void 0,s.Qo=PT.INLINE,s.na=!1,s.eo=function(){s.Yo===PT.PICTURE_IN_PICTURE&&s.Jo(PT.INLINE)},s.ua=function(t){s.ra||(s.Yo!==PT.PICTURE_IN_PICTURE||s.Go.ro?s.Yo!==PT.PICTURE_IN_PICTURE&&s.Go.ro&&(s.na=!0,s.Jo(PT.PICTURE_IN_PICTURE)):s.Jo(PT.INLINE))},s.aa=function(){s.Wo()!==PT.PICTURE_IN_PICTURE&&s.Wo()!==PT.INLINE||s.Go.No(),s.oa.mn(ch.uo,s.aa)},s.oa=i,s.Go=new jot(i,e.pip,s.eo),s.Go.wn(VI.MODE_CHANGE,s.ua),s.oa.wn(ch.uo,s.aa),s}Pt(i,t);var n=i.prototype;return n.Wo=function(){var i=t.prototype.Wo.call(this);return i===PT.INLINE&&this.Go.ro?PT.PICTURE_IN_PICTURE:i},n.Xo=function(i){return i===PT.PICTURE_IN_PICTURE||t.prototype.Xo.call(this,i)},n.Jo=function(i){this.Qo=this.Yo,i===PT.FULLSCREEN||i===PT.NATIVE_PICTURE_IN_PICTURE?this.Go.Ro():this.Go.No(),t.prototype.Jo.call(this,i)},n.Ko=function(i){var n=this;t.prototype.Ko.call(this,i),i===PT.PICTURE_IN_PICTURE?Er(this.ta.Zo(function(t){return n.ia(t)})):i===PT.FULLSCREEN?this.Go.jo(!1):this.Go.jo(!0)},n.ia=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return yr(t),[4,ot.all([this.sa(),this.ea.jo()]).catch(yn)];case 1:return i.sent(),yr(t),this.Go.yo(!this.na),this.So(new jI(this.Yo)),this.na=!1,this.ra=!1,[2]}})}).call(this)},n._i=function(){this.ra||(this.Go.ro&&this.ha.ds?this.Jo(PT.FULLSCREEN):this.Qo!==PT.PICTURE_IN_PICTURE||this.ha.ds?t.prototype._i.call(this):(this.na=!0,this.Jo(PT.PICTURE_IN_PICTURE)))},n.kn=function(){t.prototype.kn.call(this),this.Go.kn(),this.oa.mn(ch.uo,this.aa),this.oa=void 0},i}(XI);V(),It(),Bt(),Nt();var Wot=function(t){function i(i,n){var r;return(r=t.call(this)||this).vo=void 0,r.fa=void 0,r.Vs=!1,r.da=!1,r.ga=!1,r.va=function(){if(!r.ga){var t=r.Vs,i=r.ds;t!==i&&(r.Vs=i,r.So(new xI))}},r.ya=function(){r.da=r.fa.ds,r.va()},r.ba=function(){r.ga||(r.vo.isFullWindow&&r.vo.supportsFullScreen()||r.da&&!r.vo.supportsFullScreen())&&(r.ga=!0,r.vo.exitFullscreen(),r.vo.requestFullscreen(),r.ga=!1,r.va())},r.vo=i,r.fa=n,r.vo.on("fullscreenchange",r.va),r.fa.wn(oS.pa,r.ya),r.fa.wn(oS.ka,r.ba),r.fa.wn(oS.ma,r.Rs),r.va(),r}Pt(i,t);var n=i.prototype;return n.yo=function(){this.vo.requestFullscreen()},n.jo=function(){this.vo.exitFullscreen(),this.fa.jo()},n.kn=function(){this.Vo(),this.vo.off("fullscreenchange",this.va),this.fa.mn(oS.pa,this.va),this.fa.mn(oS.ma,this.Rs),this.vo.isFullWindow&&this.vo.exitFullscreen()},xt(i,[{key:"ca",get:function(){return MI.la(this.vo.el())||this.vo.supportsFullScreen()}},{key:"ds",get:function(){return this.vo.isFullscreen()||this.da}}]),i}(uh);function zot(t){return function(t){function i(i,n,r){var e;return(e=t.call(this,n,r)||this).zo=void 0,e.vo=void 0,e.Sa=void 0,e.wa=void 0,e._a=void 0,e.ja=void 0,e.zo=i,e.wa=new DB(i),e.Sa=t.prototype.xa.call($H(e)),b.defineProperty(e.Sa,"constructor",{value:_O}),e.vo=Lot(e.Sa,e.zo,r.ui),e.ja=new Wot(e.vo,e.Ma),e._a=new Hot(e,e.ja,e.Pa.Aa(),r),e._a.wn(VI.MODE_CHANGE,e.Rs),e}Pt(i,t);var n=i.prototype;return n.ds=function(){return this._a.Wo()===PT.FULLSCREEN},n.xa=function(){return function(t,i){var n=b.create(t),r=i.vo;return jg(n,{get controls(){return r.controls()},set controls(t){r.controls(Qg(t))},get presentation(){return i._a.Ca},get presentationMode(){return i._a.Wo()},set presentationMode(t){var n=LT(t);n&&i._a.Jo(n)},get ui(){return r},get visibility(){return i.Io.Ca}})}(this.Sa,this)},n.kn=function(){t.prototype.kn.call(this),this._a.kn(),this.ja.kn(),this.vo.dispose(),this.wa.kn()},n.Ta=function(i){this.vo.src(""),t.prototype.Ta.call(this,i)},xt(i,[{key:"Io",get:function(){return this.wa}}]),i}(t)}function qot(t){return(t=t||{}).position=function(t){switch(t){case"top-left":case"top-right":case"bottom-left":case"bottom-right":return t;default:return}}(t.position),t.visibility=function(t){if(Fi(t)&&!E(t))return Cn(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=Qg(t.retainPresentationModeOnSourceChange),t}V(),It(),V(),It();var Xot=bn(function(){var t=zot(pO());return t=function(t){for(var i,n=t,r=Ft(Y9);!(i=r()).done;)n=(0,i.value)(n);return n}(t)});function Got(t,i){var n=function(t){var i=xT(t);return i.ui=i.ui||{},void 0!==(null==t?void 0:t.width)&&void 0===i.ui.width&&(i.ui.width=t.width),void 0!==(null==t?void 0:t.height)&&void 0===i.ui.height&&(i.ui.height=t.height),void 0!==(null==t?void 0:t.fluid)&&void 0===i.ui.fluid&&(i.ui.fluid=t.fluid),i.pip=qot(i.pip),i}(i),r=v.createElement("div");ln(r),t.appendChild(r);var e=new(Xot())(t,r,n);e.Na=e;var s=e.Ca;return e.Ea(),e.Ba(FB),b.defineProperty(s,"constructor",{value:Got}),s=Vg(s),iA(e),function(t){for(var i,n=Ft(K9);!(i=n()).done;)(0,i.value)(t)}(e),s}V(),It(),V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt();var Qot="theo-cast-",Yot=function(t){function i(i,n){var r,e;return(r=t.call(this,i,n)||this).bo=void 0,r.Ra=void 0,r.De=void 0,r.Va=void 0,r.bo=i.el(),r.Ra=YS.UNAVAILABLE,r.controlText("Unavailable"),r.De=new Rut(r,r.controlText()),null==(e=r.Ia)||e.addEventListener("statechange",function(t){var i=t;r.Ua(i.state)}),Vi.Zs.Ke&&(r.Va=new yut(r.el())),r.Ua(r.Ia?r.Ia.state:YS.UNAVAILABLE),r.on(i,"languagechange",r.se),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return Qot+"button theo-"+this.$a+"-button theo-controlbar-button "+t.prototype.buildCSSClass.call(this)},n.createEl=function(i,n,r){var e=t.prototype.createEl.call(this),s=v.createElement("div");s.className="theo-button-icon-blur";var u=v.createElement("div");return u.className=Qot+"svg-container",u.innerHTML=this.Da,e.appendChild(s),e.appendChild(u),e},n.handleClick=function(i){var n;if(t.prototype.handleClick.call(this,i),this.Ra===YS.AVAILABLE)null==(n=this.Ia)||n.start();else if(this.Ra===YS.CONNECTED||this.Ra===YS.CONNECTING){var r;null==(r=this.Ia)||r.stop()}},n.Ua=function(t){an(this.bo,"theo-"+this.$a+"-"+this.Ra),this.Ra=t,hn(this.bo,"theo-"+this.$a+"-"+this.Ra),this.se()},n.se=function(){this.Oa(this.Ra),this.De.Fe=this.controlText()},n.Oa=function(t){t===YS.CONNECTED?this.controlText("Stop Casting"):t===YS.AVAILABLE?this.controlText("Start Casting"):t===YS.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")},xt(i,[{key:"Ia",get:function(){throw new p("Fa")}},{key:"Da",get:function(){return this.h.Da}},{key:"$a",get:function(){return this.h.$a}}]),i}(hut(tut.getComponent("Button"))),$ot=0;function Kot(){var t='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ';return $ot++,t}var Jot=function(t){function i(i,n){return t.call(this,i,io({},n,{$a:"chromecast",Da:Kot()}))||this}return Pt(i,t),xt(i,[{key:"Ia",get:function(){var t;return null==(t=this.xs.cast)?void 0:t.chromecast}}]),i}(Yot);tut.registerComponent("chromecastButton",Jot),V(),It(),Nt();var Zot="theo-chromecast-",tht=function(t){function i(i,n){var r,e,s;return(r=t.call(this,i,n)||this).La=void 0,r.update=function(){r.La?(r._r&&xx(r._r,r.La.receiverName||""),r.La.state===YS.CONNECTED?r.show():r.hide()):r.hide()},r.La=null==(e=r.xs.cast)?void 0:e.chromecast,null==(s=r.La)||s.addEventListener("statechange",r.update),r.xs.addEventListener("play",r.update),r.update(),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return Zot+"overlay "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){var n=t.prototype.createEl.call(this);hn(n,Zot+"overlay");var r=tut.createEl("div",{className:Zot+"status-icon",innerHTML:i.ICON_SVG}),e=tut.createEl("div",{className:Zot+"status-info"});xx(e,"Playing on");var s=tut.createEl("div",{className:Zot+"status-title"}),u=tut.createEl("div",{className:Zot+"status"});return this._r=s,u.appendChild(r),u.appendChild(e),u.appendChild(s),n.appendChild(u),n},n.dispose=function(){var i;null==(i=this.La)||i.removeEventListener("statechange",this.update),this.La=void 0,this.xs.removeEventListener("play",this.update),t.prototype.dispose.call(this)},i}(hut(tut.getComponent("Component")));tht.ICON_SVG='\n\n \n',tut.registerComponent("chromecastOverlay",tht),V(),It(),V(),It(),Bt(),Nt();var iht=function(t){function i(i,n){var r,e,s;return(r=t.call(this,i,io({},n,{$a:"airplay",Da:'\n\n \n \n'}))||this).qa=function(){r.enable()},r.Ha=function(){r.disable()},null==(e=r.xs.ads)||e.addEventListener("adbreakbegin",r.Ha),null==(s=r.xs.ads)||s.addEventListener("adbreakend",r.qa),r.xs.addEventListener("currentsourcechange",r.qa),r}return Pt(i,t),i.prototype.dispose=function(){var i,n;null==(i=this.xs.ads)||i.removeEventListener("adbreakbegin",this.Ha),null==(n=this.xs.ads)||n.removeEventListener("adbreakend",this.qa),this.xs.removeEventListener("currentsourcechange",this.qa),t.prototype.dispose.call(this)},xt(i,[{key:"Ia",get:function(){var t;return null==(t=this.xs.cast)?void 0:t.airplay}}]),i}(Yot);tut.registerComponent("airplayButton",iht),V(),It(),V(),It(),V(),It(),Nt();var nht=function(t){function i(i,n){var r,e;return(r=t.call(this,i,n)||this).za=void 0,r.Va=void 0,r.Wa=function(){return r.Sn()},r.controlText("Watch in VR"),r.za=new Rut(r,r.controlText()),null==(e=r.xs.vr)||e.addEventListener(["statechange","stereochange"],r.Wa),r.Sn(),Vi.Zs.Ke&&(r.Va=new yut(r.el())),r.on(i,"languagechange",r.se),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-vr-button theo-controlbar-button "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(){this.xs.vr.stereo=!this.xs.vr.stereo,this.se()},n.Sn=function(){var t=this.xs.vr;t&&t.state!==Z4.Os?(this.show(),t.canPresentVR?this.enable():this.disable()):this.hide(),this.se()},n.se=function(){var t=this.xs.vr;t&&t.state!==Z4.Os&&(t.stereo?this.controlText("Stop watching in VR"):t.canPresentVR?this.controlText("Watch in VR"):this.controlText("No VR capable device found"),this.za.Fe=this.controlText())},n.dispose=function(){var i;null==(i=this.xs.vr)||i.removeEventListener(["statechange","stereochange"],this.Wa),t.prototype.dispose.call(this)},i}(hut(tut.getComponent("Button")));tut.registerComponent("vrButton",nht),V(),It(),Nt();var rht=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).xs=void 0,e.Wa=function(){return e.Sn()},e.Ja=function(){return e.Xa()},e.xs=r,e.xs.vr.addEventListener("statechange",e.Wa),e.xs.vr.addEventListener("directionchange",e.Ja),e.Sn(),e.Xa(),e}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()}),n=tut.createEl("div",{className:"theo-360-fov"});return i.appendChild(n),this.Ga=n,i},n.buildCSSClass=function(){return"theo-360-compass "+t.prototype.buildCSSClass.call(this)},n.Sn=function(){this.xs.vr.state===Z4.Os?this.hide():this.show()},n.Xa=function(){var t=-this.xs.vr.direction.yaw+40;this.Ga.style[RI("transform")]="scale(0.875) rotate("+t+"deg) skew("+"-10deg)"},n.dispose=function(){this.xs.vr.removeEventListener("statechange",this.Wa),this.xs.vr.removeEventListener("directionchange",this.Ja),t.prototype.dispose.call(this)},i}(tut.getComponent("Component"));V(),It(),Nt();var eht=A.pow(2,31)-1,sht=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).xs=void 0,e.tu=!1,e.su=!1,e.iu="",e.eu=function(){return e.Qa()},e.xs=r,e.xs.vr.addEventListener("statechange",e.eu),e.Qa(),e}Pt(i,t);var n=i.prototype;return n.Qa=function(){this.xs.vr.state===Z4.Ya?this.Ka():this.Za()},n.Ka=function(){if(!this.tu){this.tu=!0;var t=this.xs.element;this.iu=t.style.zIndex||"",t.style.zIndex=""+eht,this.su=this.player().isFullscreen(),this.player().requestFullscreen()}},n.Za=function(){this.tu&&(this.tu=!1,this.xs.element.style.zIndex=this.iu,this.su?this.player().requestFullscreen():this.player().exitFullscreen())},n.dispose=function(){this.Za(),this.xs.vr.removeEventListener("statechange",this.eu),t.prototype.dispose.call(this)},i}(tut.getComponent("Component"));J9(function(t){var i=t.Ca;if(i.vr){var n=t.vo,r=new rht(n,{},i);if(t.wn(ch.do,function(){var i;n.removeChild(r);var e=null==(i=t.nu())?void 0:i.vr;void 0===e||e.nativeVR||n.addChild(r)}),Oi.ru){var e=new sht(n,{},i);n.addChild(e)}}}),V(),It(),V(),It(),Bt(),Nt(),V(),It(),Nt();var uht=function(t){function i(){return t.call(this,"relatedchange")||this}return Pt(i,t),i}(ah),oht=["relatedchange"],hht=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).hu=void 0,i.uu=[],i}return Pt(i,t),i.prototype.kn=function(){this.Vo(),this.uu=[]},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get sources(){return t.ou},set sources(i){t.ou=i},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new HI(oht,!0,n),i.au(t),n}(this)),this.hu}},{key:"ou",get:function(){return this.uu},set:function(t){this.uu=function(t){return t.filter(function(t){return t&&(qi(t.link)||zg(t,["source"]))})}(t),t.length>this.uu.length&&console.warn("One or more of the configured related content sources are invalid. Check if they have a source or a link."),this.So(new uht)}}]),i}(uh);$b(function(t){return function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).cu=void 0,r.cu=new hht,r}Pt(i,t);var n=i.prototype;return n.xa=function(){var i=this.cu;return jg(t.prototype.xa.call(this),{get related(){return i.Ca}})},n.kn=function(){this.cu.kn(),t.prototype.kn.call(this)},i}(t)},Qb.lu),V(),It(),Bt(),Nt(),V(),It(),Nt();var aht=function(t){function i(i,n,r){var e;return(e=t.call(this,i,r)||this).bo=void 0,e.fu=void 0,e.De=void 0,e.bo=i.el(),e.fu=n,e.player().topControlBar.addChild(e),e.hide(),e.controlText(e.localize("Related content")),e.De=new Rut(e,e.controlText()),e.on(i,"languagechange",e.se),e}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-icon-view-grid theo-related-button "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(){this.fu.du?this.fu.we():this.fu.be()},n.se=function(){this.De.Fe=this.controlText()},n.dispose=function(){this.player().topControlBar.removeChild(this),t.prototype.dispose.call(this)},i}(tut.getComponent("Button"));V(),It(),Bt(),Nt(),Ut(),V(),It(),Nt();var cht=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).vu=void 0,r.vu=n,r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-secondary-background theo-close-button"},n.handleClick=function(){this.vu.hide()},i}(tut.getComponent("Button")),fht=function(){var t=v.createElement("div");return t.className="theo-related-grid-tile",t.innerHTML='',t}();function vht(t,i,n){var r=fht.cloneNode(!0),e=r.querySelector(".theo-related-grid-tile-content");zg(n,["source"])?(e.style.cursor="pointer",e.addEventListener("click",function(){t.source=n.source,i.we()})):qi(n.link)&&e.setAttribute("href",n.link);var s=r.querySelector(".theo-related-grid-tile-image");s.style.backgroundImage='url("'+Zo(n.image)+'")',s.removeAttribute("id");var u=r.querySelector(".theo-related-grid-tile-title");n.title?(xx(u,n.title),u.removeAttribute("id")):Zi(u);var o=r.querySelector(".theo-related-grid-tile-duration");return n.duration?(xx(o,n.duration),o.removeAttribute("id")):Zi(o),r}var dht=[15,12,9,8,6,4,3,2,1];var lht=function(){function t(t,i,n,r,e){var s=this;this._u=void 0,this.Pu=void 0,this.xu=void 0,this.Tu=void 0,this.mu=void 0,this.yu=void 0,this.Cu=void 0,this.ju=void 0,this.Mu=void 0,this.Au=void 0,this.Nu=void 0,this._u=t,this.Pu=i,this.xu=n,this.Tu=r,this.mu=12,this.Nu=function(t){s.Cu.style.width=t.width+"px"},this.ju=v.createElement("div"),this.yu=new cht(this.Pu,{hide:function(){s.xu.we()}}),this.Cu=this.Su(),this.Au=new ght(e),this.Au.wn(_I.yn,this.Nu),this.Mu=new mZ(this.Cu,this.Au),this.wu(12)}var i=t.prototype;return i.gu=function(){this.yu.focus()},i.bu=function(t){this.ku(),function(t){if(t.length)for(var i,n=Ft(dht);!(i=n()).done;){var r=i.value;if(t.length>=r){t.length=r;break}}}(t),this.wu(t.length);for(var i,n=Ft(t);!(i=n()).done;){var r=i.value,e=vht(this._u.Ca,this.xu,r);this.Cu.appendChild(e)}},i.ku=function(){this.Cu.innerHTML=""},i.Su=function(){var t=v.createElement("div");t.className="theo-overlay-panel";var i=v.createElement("div");return i.className="theo-related-grid",this.ju.className="theo-related",this.yu.controlText("Close Related Content"),this.Tu.appendChild(this.ju),this.ju.appendChild(t),t.appendChild(this.yu.el()),t.appendChild(i),i},i.wu=function(t){an(this.Cu,this.pu),this.mu=t,hn(this.Cu,this.pu)},i.kn=function(){Zi(this.ju),this.Mu.kn(),this.Au.kn(),this.yu.dispose(),this._u=void 0},xt(t,[{key:"pu",get:function(){return"theo-"+this.mu+"-item-grid"}}]),t}(),ght=function(t){function i(i){var n;return(n=t.call(this)||this).Fu=void 0,n.Bu=void 0,n.Du=void 0,n.Fu=i,n.Du=function(t){var i=t.width;9*(t.width/16)>t.height&&(i=16*(t.height/9));n.Bu=i,n.So(new kI(n.Eu,t.height))},n.Fu.wn(_I.yn,n.Du),n}return Pt(i,t),i.prototype.kn=function(){this.Vo(),this.Fu.mn(_I.yn,this.Du)},xt(i,[{key:"Eu",get:function(){return this.Bu||0}},{key:"Iu",get:function(){return this.Fu.Iu}}]),i}(uh);V(),It(),Nt();var wht=function(t){function i(){return t.call(this,"show")||this}return Pt(i,t),i}(ah);V(),It(),Nt();var mht=function(t){function i(){return t.call(this,"hide")||this}return Pt(i,t),i}(ah),yht="theo-related-available",pht="theo-related-showing",_ht=[].concat(oht,["show","hide"]),kht=function(t){function i(i,n,r,e){var s;return(s=t.call(this)||this).$u=void 0,s.Hu=void 0,s.hu=void 0,s.Pu=void 0,s.Ou=void 0,s.Ru=!1,s.Vu=!1,s.qu=function(t){var i=s.ou;s.Ou.bu(i),i.length?(s.Uu(yht),s.Hu.show()):(s.Lu(yht),s.Hu.hide()),s.So(t)},s.$u=n,s.$u.wn("relatedchange",s.qu),s.Pu=r,s.Ou=new lht(i,s.Pu,s,r.contentEl(),e),s.Hu=new aht(r,s,{}),s}Pt(i,t);var n=i.prototype;return n.be=function(){var t=this.Ru;this.Ru=!0,this.Uu(pht),this.Ou.gu(),this.Pu.paused()?this.Vu=!0:this.Pu.pause(),t!==this.Ru&&this.So(new wht)},n.we=function(){var t=this.Ru;this.Ru=!1,this.Lu(pht),this.Hu.focus(),this.Vu||this.Pu.play(),this.Vu=!1,t!==this.Ru&&this.So(new mht)},n.Uu=function(t){this.Pu.el().classList.add(t)},n.Lu=function(t){this.Pu.el().classList.remove(t)},n.kn=function(){this.Vo(),this.Ou.kn()},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get sources(){return t.ou},set sources(i){t.ou=i},get showing(){return t.du},show:function(){t.be()},hide:function(){t.we()},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new HI(_ht,!0,n),i.au(t),n}(this)),this.hu}},{key:"ou",get:function(){return this.$u.ou},set:function(t){this.$u.ou=t}},{key:"du",get:function(){return this.Ru}}]),i}(uh);$9(function(t){return function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).zu=void 0,e.zu=new kht(e,e.cu,e.vo,e.Wu),e}Pt(i,t);var n=i.prototype;return n.xa=function(){var i=this.zu;return jg(t.prototype.xa.call(this),{get related(){return i.Ca}})},n.kn=function(){this.zu.kn(),t.prototype.kn.call(this)},i}(t)}),V(),It(),V(),It(),Bt(),Nt(),V(),It(),Nt();var bht=function(t){function i(i,n,r){var e;return(e=t.call(this,i,r)||this).bo=void 0,e.Gu=void 0,e.De=void 0,e.bo=i.el(),e.Gu=n,e.player().topControlBar.addChild(e),e.hide(),e.controlText("Share Video"),e.De=new Rut(e,e.controlText()),e.on(i,"languagechange",e.se),e}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-icon-share theo-social-button "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(){this.Gu.showing?this.Gu.hide():this.Gu.show()},n.se=function(){this.De.Fe=this.controlText()},n.dispose=function(){this.player().topControlBar.removeChild(this),t.prototype.dispose.call(this)},i}(tut.getComponent("Button"));function Aht(t,i,n){switch(i){case"iconurl":return function(t,i){var n,r=v.createElement("a");r.className="theo-social-iconurl",r.title=null!=(n=t.label)?n:"",r.target="Xu",r.href=i;var e,s,u=v.createElement("img");return u.src=null!=(e=t.icon)?e:"",u.alt=null!=(s=t.label)?s:"",u.width=25,u.height=25,r.appendChild(u),r}(t,n);case"text":return function(t){var i=v.createElement("div");if(i.className="theo-social-text",t.label){var n=v.createElement("h5");n.className="theo-primary-background theo-social-label",xx(n,t.label),i.appendChild(n)}var r,e=v.createElement("p");return e.className="theo-social-content-container theo-tertiary-background",e.tabIndex=0,xx(e,null!=(r=t.text)?r:""),i.appendChild(e),i}(t);case"texturl":return function(t,i){var n=v.createElement("div");if(n.className="theo-social-texturl",t.label){var r=v.createElement("h5");r.className="theo-primary-background theo-social-label",xx(r,t.label),n.appendChild(r)}var e=v.createElement("div");e.className="theo-social-content-container theo-tertiary-background";var s=v.createElement("a");return s.target="Xu",s.href=i,xx(s,i),e.appendChild(s),n.appendChild(e),n}(t,n)}}V(),It(),Bt(),Ut();var Tht="";var Sht=function(){function t(t,i,n,r){this.oa=void 0,this.xu=void 0,this.Tu=void 0,this.sc=void 0,this.yu=void 0,this.Ou=void 0,this.ju=void 0,this.Ku=void 0,this.Zu=void 0,this.tc=void 0,this.oa=t,this.xu=i,this.Tu=n,this.sc=r;var e=v.createElement("div");e.className="theo-overlay-panel",this.yu=new cht(this.oa,this.xu.Ca),this.yu.controlText("Close Share"),this.Ou=v.createElement("div"),this.Ou.className="theo-social-container",this.ju=v.createElement("div"),this.ju.className="theo-social",this.Ku=v.createElement("div"),this.Ku.className="theo-social-icon-container",this.Zu=v.createElement("div"),this.Zu.className="theo-social-text-container",this.Tu.appendChild(this.ju),this.ju.appendChild(e),this.Ou.appendChild(this.Ku),this.Ou.appendChild(this.Zu),e.appendChild(this.yu.el()),e.appendChild(this.Ou),this.tc=new mZ(this.ju,this.sc)}var i=t.prototype;return i.Ju=function(t){this.ku();for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;this.Qu(r)}},i.gu=function(){this.yu.focus()},i.Qu=function(t){var i=function(t,i){return t.src?Wo(t.src,Tht)?t.src.replace(Tht,i):t.src:i}(t,this.xu.Yu),n=function(t){if(t)return t.icon?"iconurl":t.text?"text":"texturl"}(t),r=Aht(t,n,i);r&&("iconurl"===n?this.Ku.appendChild(r):this.Zu.appendChild(r))},i.ku=function(){this.Ku.innerHTML="",this.Zu.innerHTML=""},i.kn=function(){Zi(this.ju),this.tc.kn()},xt(t,[{key:"xe",get:function(){return this.ju}}]),t}(),Eht="theo-social-available",Iht="theo-social-showing",Rht=function(){function t(t,i){this.Hu=void 0,this.hu=void 0,this.hc=void 0,this.Ou=void 0,this.Ru=!1,this.nc=[],this.rc=void 0,this.Vu=!1,this.hu=function(t){return{get showing(){return t.du},get items(){return t.ec},set items(i){t.ec=i},get url(){return t.Yu},set url(i){t.Yu=i},show:function(){t.be()},hide:function(){t.we()}}}(this),this.hc=t,this.Ou=new Sht(this.hc,this,t.contentEl(),i),this.Hu=new bht(t,this.hu,{})}var i=t.prototype;return i.be=function(){this.Ru=!0,this.Uu(Iht),this.Ou.gu(),this.hc.paused()?this.Vu=!0:this.hc.pause()},i.we=function(){this.Ru=!1,this.Lu(Iht),this.Hu.focus(),this.Vu||this.hc.play(),this.Vu=!1},i.Uu=function(t){this.hc.el().classList.add(t)},i.Lu=function(t){this.hc.el().classList.remove(t)},i.kn=function(){this.Hu.dispose(),this.Ou.kn()},xt(t,[{key:"Ca",get:function(){return this.hu}},{key:"du",get:function(){return this.Ru}},{key:"ec",get:function(){return this.nc},set:function(t){this.nc=t,this.Ou.Ju(t),t.length?(this.Uu(Eht),this.Hu.show()):(this.Lu(Eht),this.Hu.hide())}},{key:"Yu",get:function(){return this.rc||function(){for(var t=f,i=t.location.href;t!==f.top;){t=t.parent;try{i=t.location.href}catch(t){}}return i}()},set:function(t){this.rc=t}}]),t}();$9(function(t){return function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).Gu=void 0,e.Gu=new Rht(e.vo,e.Wu),e}return Pt(i,t),i.prototype.xa=function(){var i=this.Gu;return jg(t.prototype.xa.call(this),{get social(){return i.Ca}})},i}(t)}),V(),It(),V(),It(),Nt();var Cht=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this);return i.className=this.buildCSSClass(),i},n.buildCSSClass=function(){return"theo-upnext-container "+t.prototype.buildCSSClass.call(this)},i}(tut.getComponent("Component"));Cht.prototype.h=io({},Cht.prototype.h,{children:[]}),tut.registerComponent("upNextContainer",Cht),V(),It(),Bt(),Nt(),V(),It(),Bt(),Nt();var Pht="theo-upnext-bar-",Nht=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,r)||this).lc=void 0,s.tc=void 0,s.Ru=void 0,s.uc=void 0,s.oc=void 0,s.dc=void 0,s.lc=n,s.tc=new mZ(s.el(),e),s.Ru=!1,s.uc=10,s.on(i,"languagechange",s.se),s}Pt(i,t);var n=i.prototype;return n.Ta=function(t){this.ku(),this.cc(t)},n.cc=function(t){var i=this;if(t&&t.link&&t.image){var n=v.createElement("div");hn(n,Pht+"content"),n.onclick=function(){i.lc.next()},n.onkeypress=function(t){13===t.which&&i.lc.next()};var r=v.createElement("div");if(r.style.backgroundImage='url("'+Zo(t.image)+'")',hn(r,Pht+"image"),n.appendChild(r),t.duration){var e=v.createElement("span");hn(e,Pht+"duration"),e.innerHTML=""+t.duration,r.appendChild(e)}var s=v.createElement("div");hn(s,Pht+"text");var u=v.createElement("div");if(hn(u,Pht+"upnext"),xx(u,this.localize("Up Next")),s.appendChild(u),t.title){var o=v.createElement("div");hn(o,Pht+"title"),xx(o,t.title),s.appendChild(o)}n.appendChild(s),this.oc=n,this.dc=u,this.el().appendChild(this.oc)}},n.ku=function(){this.el().innerHTML="",this.oc=void 0,this.dc=void 0},n.se=function(){this.dc&&xx(this.dc,this.localize("Up Next"))},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},n.buildCSSClass=function(){return"theo-upnext-bar "+t.prototype.buildCSSClass.call(this)},n.dispose=function(){this.tc.kn(),t.prototype.dispose.call(this)},xt(i,[{key:"du",get:function(){return this.Ru},set:function(t){this.Ru=t,this.oc&&(this.oc.tabIndex=t?0:-1)}},{key:"ac",get:function(){return this.uc},set:function(t){this.uc=t}}]),i}(tut.getComponent("Component"));V(),It(),Bt(),Nt();var Dht="theo-upnext-panel-",xht=Sot,Bht=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,r)||this).lc=void 0,s.tc=void 0,s.kc=void 0,s.bc=void 0,s.wc=void 0,s.xc=0,s.Ru=void 0,s.vc=void 0,s.gc=void 0,s.lc=n,s.tc=new mZ(s.el(),e),s.Ru=!1,s.vc=10,s.gc=!0,s.on(i,"languagechange",s.se),s}Pt(i,t);var n=i.prototype;return n.Ta=function(t){this.ku(),this.yc(t)},n.yc=function(t){var i=this;if(t&&t.link&&t.image){var n=v.createElement("div");n.className=Dht+"content";var r=v.createElement("div");r.style.backgroundImage='url("'+Zo(t.image)+'")',r.className=Dht+"image",n.appendChild(r);var e=v.createElement("div");e.className=Dht+"text";var s=v.createElement("div");if(s.className=Dht+"upnext",xx(s,this.localize("Up Next")),e.appendChild(s),t.title){var u=v.createElement("div");u.className=Dht+"title",xx(u,t.title),e.appendChild(u)}n.appendChild(e),this.bc=v.createElement("div"),this.bc.className=Dht+"autoplay",this.bc.innerHTML=Eot;var o=this.bc.querySelector("svg");o.onclick=function(){i.lc.next()},o.tabIndex=0,o.onkeypress=function(t){13===t.which&&i.lc.next()},this.kc=s,this.wc=this.bc.querySelector("."+xht),n.appendChild(this.bc),this.el().appendChild(n)}},n.ku=function(){this.el().innerHTML="",this.kc=void 0,this.wc=void 0},n.se=function(){this.kc&&xx(this.kc,this.localize("Up Next"))},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},n.buildCSSClass=function(){return"theo-upnext-panel "+t.prototype.buildCSSClass.call(this)},n.dispose=function(){this.tc.kn(),t.prototype.dispose.call(this)},xt(i,[{key:"du",get:function(){return this.Ru},set:function(t){this.Ru=t}},{key:"fc",get:function(){return this.vc},set:function(t){this.vc=t}},{key:"mc",get:function(){return this.gc},set:function(t){this.gc=t}},{key:"_c",get:function(){return this.xc},set:function(t){this.xc=t,this.wc.style.strokeDashoffset=""+A.round(1e5*t)/1e5}}]),i}(tut.getComponent("Component")),Oht="theo-upnext-panel-showing",Mht="theo-upnext-bar-showing",Lht=2*A.PI*73,Fht=function(){function t(i,n,r){var e=this;this.Pc=void 0,this.Ou=void 0,this.hu=void 0,this.Sc=void 0,this.Tc=void 0,this.hc=void 0,this.Ac=void 0,this.Ic=10,this.Oc=1,this.Dc=void 0,this.Fc=!0,this.qc=void 0,this.$c=function(){e.Oc!==e.Ic?(e.Ou._c-=Lht/e.Ic,e.Oc+=1):e.Rc()},this.Ec=function(){e.Ou.du||e.Bc()},this.Nc=function(){var i=e.hc.currentTime(),n=e.hc.duration(),r=n?t.Gc(e.Pc.ac,n):void 0;void 0!==r&&e.Hc(i,r),e.Ou.mc&&e.Wc(i,n)},this.hu=function(t){return{get source(){return t.Mc},set source(i){t.Mc=i},get bar(){return t.Cc},get panel(){return t.jc},next:function(){t.Rc()}}}(this),this.Pc=new Nht(i,this.hu,{},n),this.Ou=new Bht(i,this.hu,{},n),this.Sc=function(t,i){return{get showing(){return i.du},get offset(){return i.ac},set offset(t){i.ac=t},show:function(){t.Vc()},hide:function(){t.Lc()}}}(this,this.Pc),this.Tc=function(t,i){return{get showing(){return i.du},get countdownDuration(){return i.fc},set countdownDuration(t){i.fc=t},get showUpNextPanel(){return i.mc},set showUpNextPanel(t){i.mc=t},show:function(){t.Bc()},hide:function(){t.Uc()}}}(this,this.Ou),this.hc=i,this.qc=r,i.getChild("upNextContainer").addChild(this.Pc,{}),i.getChild("upNextContainer").addChild(this.Ou,{})}var i=t.prototype;return i.Bc=function(){this.Ou.fc?this.Ic=$g(this.Ou.fc):0===this.Ou.fc?this.Ic=0:this.Ic=10,0!==this.Ic?(isFinite(this.Ic)&&(this.Fc=!0),this.Ou.du=!0,this.Uu(Oht),this.Fc&&(this.Ou._c=Lht-Lht/this.Ic,this.Dc=m(this.$c,1e3))):this.Rc()},i.Uc=function(){this.Ou.du=!1,this.Lu(Oht),this.Fc&&(y(this.Dc),this.Oc=1,this.Ou._c=Lht)},i.Vc=function(){this.Pc.du=!0,this.Uu(Mht)},i.Lc=function(){this.Pc.du=!1,this.Lu(Mht)},i.Rc=function(){y(this.Dc),this.Mc&&(f.location.href=this.Mc.link)},i.Uu=function(t){this.hc.el().classList.add(t)},i.Lu=function(t){this.hc.el().classList.remove(t)},i.Hc=function(t,i){var n=t>=i&&!(this.qc&&this.qc.zc);this.Pc.du&&!n?this.Lc():!this.Pc.du&&n&&this.Vc()},i.Wc=function(t,i){this.Ou.du&&t\n\t\n\t\t\n\t\n\t\n\t\t\n\t\n\t\n\t\t\n\t\n\n',r.appendChild(e);var s=v.createElement("div");return s.className="theo-context-version",xx(s,"Powered by THEOplayer 10.0.0"),r.appendChild(s),r.href="https://www.theoplayer.com/player-referral",r.target="Xu",i.appendChild(n),i},n.Qc=function(t){var i=t;i.preventDefault(),this.show(),this.el().style.left="0",this.el().style.top="0";var n=this.player().contentEl(),r=n.getClientRects(),e=r.length>0?r[0]:void 0,s=i.clientX-n.getBoundingClientRect().left,u=S(getComputedStyle(this.el()).fontSize);Nx(this.el(),s,e,u);var o=i.clientY-n.getBoundingClientRect().top;!function(t,i,n,r){void 0===r&&(r=0),Dx(t,i,"top","bottom",n,r)}(this.el(),o,e,u),this.Yc()},n.Kc=function(){this.hide(),this.clearTimeout(this.Zc)},n.Yc=function(){this.Zc=this.setTimeout(this.Kc,4e3)},n.tl=function(){this.clearTimeout(this.Zc)},n.dispose=function(){this.Kc(),this.off(this.player(),"contextmenu",this.Qc),this.el().removeEventListener("mousedown",Vht,!0),this.off(v,"mousedown",this.Kc),this.off("mouseout",this.Yc),this.off("mouseover",this.tl),t.prototype.dispose.call(this)},i}(tut.getComponent("Component"));function Vht(t){t.stopPropagation()}J9(function(t){var i=new Uht(t.vo,{});t.vo.addChild(i),t.vo.on("dispose",function(){t.vo.removeChild(i),i.dispose()})}),V(),It(),V(),It(),V(),It(),Nt(),Ut(),V(),It();var jht={Default:"","Monospaced Serif":JD.il,"Proportional Serif":JD.sl,"Monospaced Sans-Serif":JD.nl,"Proportional Sans-Serif":JD.rl},Hht={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},Wht=[50,75,100,150,200];function zht(t){return{label:t+"%",value:t}}function qht(t){return b.keys(t).map(function(i){return{label:i,value:t[i]}})}Wht.map(function(t){return{label:t+"%",value:t/100+"em"}});var Xht=Wht.map(function(t){return{label:t+"%",value:t+"%"}}),Ght=[25,50,75,100].map(zht),Qht=[0,25,50,75,100].map(zht),Yht=qht(Hht),$ht=qht(jht),Kht=qht({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Jht=100,Zht="#000000",tat="#FFFFFF",iat="#000000";V(),It(),Nt(),Ut();var nat=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i.subMenu)||this).al=void 0,s.Vr=void 0,s.ol=void 0,s.Or=void 0,s.ml=void 0,s.pl=void 0,s.fl=void 0,s.se=void 0,s.al=i,s.Vr=e,s.pl="",s.se=function(){var t=s.Vr.localize(s.ol);xx(s.al.subMenu.menuHeader.el(),t),xx(s.Or,t),s.vl(s.pl);for(var i,n=Ft(s.Nr);!(i=n()).done;){var r=i.value;s.Rr(r)}},s.ol=n,s.fl=r.gl,s.ml=s.hl(),s.jr=r.yl,s.Vr.on("languagechange",s.se),s}Pt(i,t);var n=i.prototype;return n.hl=function(){var t=this.Vr.localize(this.ol);xx(this.al.subMenu.menuHeader.el(),t),this.Or=v.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",xx(this.Or,t);var i=v.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",hn(this.al.el(),"theo-subtitle-options-menu-item"),this.al.el().appendChild(this.Or),this.al.el().appendChild(i),i},n.cl=function(t){var i=this.Er(t);i&&this.ll(i)},n.dl=function(){return this.jr},n.Fr=function(t){this.fl(t.Br)},n.ll=function(t){for(var i,n=Ft(this.Pr.menuItems);!(i=n()).done;){i.value.selected(!1)}t?(t.selected(!0),this.vl(t.Br.label)):this.vl("Custom")},n.vl=function(t){this.pl=t,xx(this.ml,this.Vr.localize(t)),this.al.parentMenu.oe()},n.Ir=function(i){var n=t.prototype.Ir.call(this,i);return hn(n.el(),"theo-subtitle-options-menu-item"),this.Rr(n),n},n.Rr=function(t){var i=this.Vr.localize(t.Br.label);xx(t.el(),i);var n=this.Vr.localize("Set "+this.ol+" to ")+i;t.el().setAttribute("aria-label",n)},n.Oe=function(){this.Vr.off("languagechange",this.se),t.prototype.Oe.call(this)},i}(eot);V(),It();var rat=function(){function t(i){var n=this;this.kl=void 0,this.wl=void 0,this._l=void 0,this.xl=void 0,this.Cl=void 0,this.Sl=void 0,this.jl=void 0,this.Tl=void 0,this.Ml=void 0,this.Al=void 0,this.Pl=void 0,this.Nl=void 0,this.El=void 0,this.Bl=void 0,this.Il=void 0,this.Fl=void 0,this.kl=i,this.Tl=function(t){n.kl.fontFamily=t.value},this.Ml=function(t){n.kl.fontSize=t.value},this.Al=function(i){n.wl=i.value,n.kl.fontColor=t.bl(n._l,n.wl,tat,Jht)},this.Pl=function(i){n._l=i.value,n.kl.fontColor=t.bl(n._l,n.wl,tat,Jht)},this.Nl=function(i){n.Cl=i.value,n.kl.backgroundColor=t.bl(n.Cl,n.xl,Zht,Jht)},this.El=function(i){n.xl=i.value,n.kl.backgroundColor=t.bl(n.Cl,n.xl,Zht,Jht)},this.Bl=function(i){n.jl=i.value,n.kl.windowColor=t.bl(n.jl,n.Sl,iat,Jht)},this.Il=function(i){n.Sl=i.value,n.kl.windowColor=t.bl(n.jl,n.Sl,iat,Jht)},this.Fl=function(t){n.kl.edgeStyle=t.value}}return t.bl=function(t,i,n,r){if(void 0!==t||void 0!==i)return function(t,i){return function(t){return t?"rgba("+t.Ntt+", "+t.Mtt+", "+t.Ltt+", "+t.Ul+")":void 0}(ZD(tx(t),i/100))}(void 0===t?n:t,void 0===i?r:i)},t}();V(),It();var eat=function(){function t(t,i){var n=this;this.kl=void 0,this.Ol=void 0,this.Vl=void 0,this.kl=t,this.Ol=i,this.Vl=function(){var t=n.kl.fontFamily;n.Dl(t,n.Ol["Font family"]);var i=n.kl.fontColor;n.Rl(i,n.Ol["Font color"],n.Ol["Font opacity"]);var r=n.kl.fontSize;n.Dl(r,n.Ol["Font size"]);var e=n.kl.backgroundColor;n.Rl(e,n.Ol["Background color"],n.Ol["Background opacity"]);var s=n.kl.windowColor;n.Rl(s,n.Ol["Window color"],n.Ol["Window opacity"]);var u=n.kl.edgeStyle;n.Dl(u,n.Ol["Character edge style"])},this.kl.addEventListener("change",this.Vl),this.Vl()}var i=t.prototype;return i.Dl=function(t,i){var n=this.$l(t,i.dl());n&&i.cl(n)},i.$l=function(t,i){return Wn(i,function(i){return i.value===t})},i.Rl=function(t,i,n){var r,e;if(void 0===t)r=this.$l(void 0,i.dl()),e=this.$l(void 0,n.dl());else if(t){var s=function(t){var i=nx(t);i||(i=nx(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=ZD(tx(t),1));if(!i){var n=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=ZD(tx(Hht[n]),1)}return i}(t);if(s){var u=function(t){return"#"+ix(t.Ntt)+ix(t.Mtt)+ix(t.Ltt)}(s),o=100*s.Ul;r=this.$l(u,i.dl()),e=this.$l(o,n.dl())}}r&&i.cl(r),e&&n.cl(e)},t}();var sat=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i.subMenu)||this).Jr=void 0,s.Gl=void 0,s.Vr=void 0,s.Hl=void 0,s.Jl=void 0,s.Wl=void 0,s.Ol=void 0,s.Or=void 0,s.zl=void 0,s.Xl=void 0,s.se=void 0,s.Jr=i,s.Gl=n,s.Vr=e,s.Ol={},s.Xl=function(){s.Gl.some(function(t){return ap(t.kind)})?s.Jr.show():s.Jr.hide()},s.se=function(){xx(s.Pr.menuHeader.el(),s.Vr.localize("Subtitle Options")),xx(s.Or,s.Vr.localize("Subtitle")),xx(s.zl,s.Vr.localize("Options")),s.Jr.el().setAttribute("aria-label",s.Vr.localize("Open the subtitle options menu"))},s.Hl=new rat(r),s.Wl=s.Ll(),s.jr=b.keys(s.Wl),s.ql(),s.Jl=new eat(r,s.Ol),s.Vr.on("languagechange",s.se),s.Gl.addEventListener(["addtrack","removetrack"],s.Xl),s.Xl(),s}Pt(i,t);var n=i.prototype;return n.Ll=function(){return{"Font family":{yl:uat($ht),gl:this.Hl.Tl},"Font color":{yl:uat(Yht),gl:this.Hl.Pl},"Font opacity":{yl:uat(Ght),gl:this.Hl.Al},"Font size":{yl:uat(Xht),gl:this.Hl.Ml},"Background color":{yl:uat(Yht),gl:this.Hl.Nl},"Background opacity":{yl:uat(Qht),gl:this.Hl.El},"Window color":{yl:uat(Yht),gl:this.Hl.Bl},"Window opacity":{yl:uat(Qht),gl:this.Hl.Il},"Character edge style":{yl:uat(Kht),gl:this.Hl.Fl}}},n.ql=function(){this.Or=v.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",this.zl=v.createElement("span"),this.zl.className="theo-primary-color theo-settings-control-menu-item-value",this.Jr.el().appendChild(this.Or),this.Jr.el().appendChild(this.zl),this.se()},n.Ir=function(t){var i=this.Pr.addSubMenuItem();return i.Br=t,this.Ol[t]=new nat(i,t,this.Wl[t],this.Vr),i},n.Rr=function(t){},n.Fr=function(t){},n.Oe=function(){this.Vr.off("languagechange",this.se),this.Gl.removeEventListener(["addtrack","removetrack"],this.Xl),t.prototype.Oe.call(this)},i}(eot);function uat(t){for(var i,n=[{label:"Default",value:void 0}],r=Ft(t);!(i=r()).done;){var e=i.value;"Default"!==e.label&&n.push(e)}return n}J9(function(t){var i=t.vo.controlBar.getChild("SettingsButton").menu,n=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),r=new sat(n,t.nt.Ca,t.Ql.Ca,t.vo);t.vo.on("dispose",function(){i.removeMenuItem(n),n.dispose(),r.Oe(),i.dispose()})}),V(),It(),V(),It(),Nt();var oat=tut.getComponent("Component"),hat=function(t){function i(i,n){var r;return r=t.call(this,i,n)||this,i.adControlBar=r,r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-ad-control-panel"},n.createEl=function(){var i=t.prototype.createEl.call(this);return i.className=this.buildCSSClass(),i},i}(oat);hat.prototype.h=io({},oat.prototype.h,{children:[]}),tut.registerComponent("AdControlPanel",hat),V(),It(),V(),It(),Nt();var aat=tut.getComponent("Component"),cat="theo-dai-countdown",fat=function(t){function i(i,n,r){var e;return(e=t.call(this,i,r)||this).oa=void 0,e.hu=void 0,e.bo=void 0,e.se=void 0,e.oa=i,e.hu=n,e.se=function(){var t=e.hu.ads;t.playing&&t.currentAdBreak&&t.currentAds.length&&xx(e.contentEl(),function(t,i,n){var r=t.ads,e="",s=r.length;if(s>1){var u=r.indexOf(i)+1;e=n("Ad")+" "+u+"/"+s+". "}var o=A.ceil(t.maxRemainingDuration);return e+=n("The content will resume in {1} seconds.").replace("{1}",""+o),e}(t.currentAdBreak,t.currentAds[0],function(t){return e.oa.localize(t)}))},e.bo=i.el(),e.Yl(n,n.ads),e.on(i,"languagechange",e.se),e}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return cat},n.createEl=function(t,i,n){var r=v.createElement("div");return r.className=cat,r},n.Yl=function(t,i){var n=this;i.addEventListener("adbreakbegin",function(){return n.show()}),i.addEventListener("adbreakend",function(){return n.hide()}),t.addEventListener("timeupdate",this.se)},i}(aat);V(),It(),Nt();var vat=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).bo=void 0,r.hu=void 0,xx(r.el(),i.localize("Learn more")),r.hu=n.Ca,r.bo=i.el(),r.on(i,"languagechange",r.se),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return v6},n.createEl=function(t,i,n){return this.h.Ca.element.querySelector("."+v6)},n.emitTapEvents=function(){},n.se=function(){xx(this.el(),this.localize("Learn more"))},i}(tut.getComponent("ClickableComponent"));function dat(t,i){return!i||"object"!==W(i)&&"function"!=typeof i?$H(t):i}J9(function(t){if(t.Ca.ads&&t.Kl){var i=t.vo,n=new fat(i,t.Ca);if(i.adControlBar.addChild(n),t.Ca.element.querySelector("."+v6)){var r=new vat(i,{Ca:t.Ca});i.adControlBar.addChild(r)}}}),V(),It(),V(),It(),Nt(),V(),It(),ft();var lat=tut.getComponent("Component"),gat=["addtrack","removetrack","change"],wat=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).qualityLabel=void 0,r.Yr=void 0,r.startFadeOutID=void 0,r.removeLabelClassesID=void 0,r.dh=function(){var t=tot(r.xs.videoTracks);t!==r.Yr&&(r.Yr&&r.Yr.removeEventListener("activequalitychanged",r.Zl),r.Yr=t,t&&t.addEventListener("activequalitychanged",r.Zl),r.Zl())},r.Zl=function(){var t=r.Yr&&r.Yr.activeQuality;if(r.qualityLabel&&t){var i=t.label?t.label:t.height?t.height+"p":void 0;i&&(xx(r.qualityLabel,i),r.addClass("theo-quality-label-show"),r.hideActiveQualityLabel())}},r.hideActiveQualityLabel=function(){r.resetTimeout(),r.startFadeOutID=r.setTimeout(r.fadeoutLabel,3750),r.removeLabelClassesID=r.setTimeout(r.hideLabel,4e3)},r.resetTimeout=function(){r.startFadeOutID&&r.clearTimeout(r.startFadeOutID),r.removeLabelClassesID&&r.clearTimeout(r.removeLabelClassesID)},r.fadeoutLabel=function(){r.addClass("theo-quality-label-fadeout")},r.hideLabel=function(){r.removeClass("theo-quality-label-show"),r.removeClass("theo-quality-label-fadeout")},t.prototype.addClass.call($H(r),"theo-quality-label"),r.xs.videoTracks?(r.xs.videoTracks.addEventListener(gat,r.dh),r.dh(),r):dat(r)}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this);return this.qualityLabel=tut.createEl("div",{className:"theo-quality-label-text"}),i.appendChild(this.qualityLabel),wn(this.qualityLabel),i},n.dispose=function(){this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.Zl),this.Yr=void 0),this.xs.videoTracks.removeEventListener(gat,this.dh),t.prototype.dispose.call(this)},i}(hut(lat));tut.registerComponent("activeQualityLabel",wat),V(),It(),V(),It(),Nt();var mat="theo-upcoming-ad-notification",yat=["adbreakbegin","adbreakend","adadded","adloaded","adbegin","adend"],pat=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).currentAdBreak=void 0,r.currentAdBreakValid=!1,r.rd=NaN,r.handleTimeUpdate=function(){r.sd()},r.handleAdEvent=function(){r.td(),r.sd()},r.xs.ads?(r.hide(),r.xs.addEventListener("timeupdate",r.handleTimeUpdate),r.xs.ads.addEventListener(yat,r.handleAdEvent),r):dat(r)}Pt(i,t);var n=i.prototype;return n.createEl=function(){var t=tut.createEl("div",{className:mat});return this.notificationText=tut.createEl("div",{className:mat+"text"}),t.appendChild(this.notificationText),t},n.td=function(){if(this.xs.ads){for(var t,i=this.xs.ads.scheduledAdBreaks,n=1/0,r=0;rt+10)this.ed();else{var i=A.ceil(this.currentAdBreak.timeOffset-t);i<0?this.ed():this.nd(i)}}else this.ed()},n.nd=function(t){this.rd!==t&&(xx(this.notificationText,"Your video will be temporarily interrupted in 0:"+(t<10?"0"+t:t)),this.rd=t,this.show())},n.ed=function(){this.rd=NaN,this.hide()},n.dispose=function(){var i;this.xs.removeEventListener("timeupdate",this.handleTimeUpdate),null==(i=this.xs.ads)||i.removeEventListener(yat,this.handleAdEvent),this.currentAdBreak=void 0,t.prototype.dispose.call(this)},i}(hut(Put));tut.registerComponent("upcomingAdNotificationText",pat),V(),It(),V(),It(),Bt(),Nt();var _at=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).ad=function(){r.se(r.player().currentTime(),r.el())},r.on(i,"timeupdate",r.ad),r}Pt(i,t);var n=i.prototype;return n.createEl=function(){var t=v.createElement("div");return t.className="theoplayer-ad-overlay-component theo-ad-remaining-container",t},n.se=function(t,i){if(this.od&&this.od.endTime){var n=A.max(this.od.endTime-t,0);xx(i,"Content will resume in "+A.ceil(n)+"s"),this.show()}else this.hide()},xt(i,[{key:"od",get:function(){return this.h.adBreakProvider()}}]),i}(tut.getComponent("Component"));tut.registerComponent("UplynkAdBreakBar",_at),V(),It(),Bt(),Nt();var kat=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).ad=function(){r.se(r.el(),r.ud)},r.on(i,"timeupdate",r.ad),r}Pt(i,t);var n=i.prototype;return n.createEl=function(){var t=v.createElement("div");return t.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.ud=v.createElement("span"),t.appendChild(this.ud),this.se(t,this.ud),t},n.handleClick=function(){this.h.skipCallback()},n.se=function(t,i){this.ld<=km.fd.dd?(an(t,"theoplayer-ad-skip-countdown"),hn(t,"theoplayer-ad-skip-button"),xx(i,"Skip ads")):xx(i,"Skip ads in "+A.ceil(this.ld)+"s")},xt(i,[{key:"ld",get:function(){return this.h.adBreak.startTime+this.h.adBreak.skipOffset-this.player().currentTime()}}]),i}(tut.getComponent("ClickableComponent"));tut.registerComponent("UplynkAdSkipButton",kat),V(),It(),Nt(),V(),It(),Nt();var bat=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-uplynk-marker-bar"},n.createEl=function(t,i,n){var r=v.createElement("div");return r.className=this.buildCSSClass(),r},i}(tut.getComponent("Component")),Aat=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" theo-uplynk-marker-bar-adbreak"},i}(bat);tut.registerComponent("UplynkAdBreakMarkerBar",Aat),V(),It(),Nt(),V(),It(),Bt(),Nt();var Tat=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-uplynk-marker"},n.createEl=function(t,i,n){var r=v.createElement("div");r.className=this.buildCSSClass();var e=this.seekable.start(0),s=this.seekable.end(this.seekable.length-1),u=A.max(this.startTime-e,0),o=void 0!==this.endTime?A.max(s-this.endTime,0):0,h=s-e;return r.style.left=u/h*100+"%",r.style.right=o/h*100+"%",r},xt(i,[{key:"startTime",get:function(){return this.h.startTime}},{key:"endTime",get:function(){return this.h.endTime}},{key:"seekable",get:function(){return this.player().seekable()}}]),i}(tut.getComponent("Component")),Sat=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" theo-uplynk-marker-adbreak"},i}(Tat);tut.registerComponent("UplynkAdBreakMarker",Sat),V(),It(),Nt();var Eat=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" theo-uplynk-marker-bar-asset"},i}(bat);tut.registerComponent("UplynkAssetMarkerBar",Eat),V(),It(),Nt();var Iat=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" theo-uplynk-marker-asset"},i}(Tat);tut.registerComponent("UplynkAssetMarker",Iat),V(),It(),Nt();var Rat=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){var t="theo-uplynk-content-notification-bar";return t+(Oi.ru||Oi.vd?" "+t+"-ios":"")},n.createEl=function(t,i,n){var r=v.createElement("div");return r.className=this.buildCSSClass(),r},i}(tut.getComponent("Component"));tut.registerComponent("UplynkContentNotificationBar",Rat),V(),It(),Bt(),Nt();var Cat=tut.getComponent("Component"),Pat=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).md=void 0,r.wo(),r.on(i,"timeupdate",r.bd),r.hide(),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-uplynk-content-notification"},n.createEl=function(t,i,n){var r=v.createElement("div");return r.className=this.buildCSSClass(),r},n.wo=function(){var t=v.createElement("img");t.src=this.pd.posterUrl,t.className=this.buildCSSClass()+"-thumbnail",this.el().appendChild(t);var i=v.createElement("div");i.className=this.buildCSSClass()+"-description";var n=function(t){return"Next: "+t}(this.pd.description);xx(i,n),this.el().appendChild(i),this.md=v.createElement("div"),this.md.className=this.buildCSSClass()+"-countdown",xx(this.md,this.gd),this.el().appendChild(this.md)},n.bd=function(){var t=this.yd;t>10||t<=0?this.hide():(xx(this.md,this.gd),this.show())},xt(i,[{key:"pd",get:function(){return this.h.asset}},{key:"gd",get:function(){var t=A.min(10,this.yd);return"Starting in "+A.ceil(t)+" seconds"}},{key:"yd",get:function(){return A.max(0,this.pd.startTime-this.player().currentTime())}}]),i}(Cat);function Nat(t,i){var n=t.uplynk;return Boolean(t&&void 0===n)||Boolean(t&&n&&void 0===n.ui)||Boolean(t&&n&&n.ui&&void 0===n.ui[i])||Boolean(t&&n&&n.ui&&!0===n.ui[i])}return tut.registerComponent("UplynkContentNotification",Pat),V(),It(),Bt(),Nt(),$9(function(t){return function(t){function i(i,n,r){var e;(e=t.call(this,i,n,r)||this).wd=!1,e.Pd=function(){e.wd=!0,isFinite(e.Nd())||e.Ca.addEventListener("timeupdate",e._d),e._d(),e.xd(),e.Sd()},e.jd=function(t){t.adBreak.addEventListener("adbreakbegin",e.Ed),t.adBreak.addEventListener("adbreakend",e.Bd),e._d()},e.Td=function(t){t.adBreak.removeEventListener("adbreakbegin",e.Ed),t.adBreak.removeEventListener("adbreakend",e.Bd),e._d()},e._d=function(){if(function(t){return Nat(t,"adBreakMarkers")}(e.Cd)&&e.wd){var t=e.Ca.uplynk,i=null==t?void 0:t.ads.adBreaks.map(function(t){return{name:"UplynkAdBreakMarker",startTime:t.startTime,endTime:t.endTime}});e.kd.removeChild("UplynkAdBreakMarkerBar"),e.kd.addChild("UplynkAdBreakMarkerBar",{children:i})}},e.Ed=function(){if(function(t){return Nat(t,"adNotification")}(e.Cd)){var t=e.Ca.uplynk,i=t.ads.currentAdBreak;e.vo.addChild("UplynkAdBreakBar",{adBreakProvider:e.Id}),-1!==i.skipOffset&&e.vo.addChild("UplynkAdSkipButton",{adBreak:i,skipCallback:t.ads.skip})}},e.Id=function(){return e.Ca.uplynk.ads.currentAdBreak},e.Bd=function(){e.vo.removeChild("UplynkAdBreakBar"),e.vo.removeChild("UplynkAdSkipButton")},e.Md=function(){e.xd(),e.Sd()};var s=e.Ca.uplynk;return null==s||s.ads.adBreaks.addEventListener("addadbreak",e.jd),null==s||s.ads.adBreaks.addEventListener("removeadbreak",e.Td),null==s||s.assets.addEventListener("addasset",e.Md),null==s||s.assets.addEventListener("removeasset",e.Md),e.Ca.addEventListener("loadeddata",e.Pd),e}Pt(i,t);var n=i.prototype;return n.Ta=function(i){this.wd=!1,this.Ca.removeEventListener("timeupdate",this._d),this.vo.removeChild("UplynkAdBreakBar"),this.vo.removeChild("UplynkAdSkipButton"),this.kd.removeChild("UplynkAdBreakMarkerBar"),this.kd.removeChild("UplynkAssetMarkerBar"),this.vo.removeChild("UplynkContentNotificationBar"),t.prototype.Ta.call(this,i)},n.xd=function(){if(function(t){return Nat(t,"assetMarkers")}(this.Cd)&&this.wd){var t=this.Ca.uplynk.assets.map(function(t){return{name:"UplynkAssetMarker",startTime:t.startTime,endTime:t.endTime}});this.kd.removeChild("UplynkAssetMarkerBar"),this.kd.addChild("UplynkAssetMarkerBar",{children:t})}},n.Sd=function(){if(function(t){return Nat(t,"contentNotification")}(this.Cd)){var t=this.Ca.uplynk.assets.map(function(t){return{name:"UplynkContentNotification",asset:t}});this.vo.removeChild("UplynkContentNotificationBar"),this.vo.addChild("UplynkContentNotificationBar",{children:t})}},n.kn=function(){this.Ca.removeEventListener("timeupdate",this._d);var i=this.Ca.uplynk;null==i||i.ads.adBreaks.removeEventListener("addadbreak",this.jd),null==i||i.ads.adBreaks.removeEventListener("removeadbreak",this.Td),null==i||i.assets.removeEventListener("addasset",this.Md),null==i||i.assets.removeEventListener("removeasset",this.Md),this.Ca.removeEventListener("loadeddata",this.Pd),t.prototype.kn.call(this)},xt(i,[{key:"kd",get:function(){return this.vo.controlBar.progressControl.seekBar}}]),i}(t)}),c.exports}); +!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(t):"function"==typeof define&&define.amd?define([],function(){return i(t)}):t.THEOplayer=i(t)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this,function(t){"use strict";var i,n,r,e,s,u,o,h,a,c={exports:{}},f=(c.exports,t.window),v=t.document,d=t.location,l=t.navigator,g=t.setTimeout,w=t.clearTimeout,m=t.setInterval,p=t.clearInterval,y=t.Error,_=t.TypeError,k=t.SyntaxError,b=t.Object,A=t.Math,T=t.parseInt,S=t.parseFloat,E=t.isNaN,I=t.Uint8Array,R=t.Worker,C=(t.WorkerGlobalScope,t.XMLHttpRequest),P=b.create,D=b.defineProperty,N=b.getOwnPropertyDescriptor,x=b.getOwnPropertyNames,B=b.getPrototypeOf,O=b.prototype.hasOwnProperty,M=function(t,i){return function(){return t&&(i=t(t=0)),i}},L=function(t,i){return function(){return i||t((i={exports:{}}).exports,i),i.exports}},F=function(t,i,n,r){if(i&&"object"==typeof i||"function"==typeof i)for(var e,s=x(i),u=0,o=s.length;u0;)i.shift()();n=!1}}).EQ,wt.nki=ct.W6,wt.rki=function(t){try{var i=et(t);if(!self.dispatchEvent(i)||i.defaultPrevented)return}catch(t){}g(function(){throw new y("Unhandled promise rejection: ".concat(t))},0)})}),It=M(function(){Et()});function Rt(t,i){return(Rt=b.setPrototypeOf||function(t,i){return t.__proto__=i,t})(t,i)}var Ct=M(function(){V(),It()});function Pt(t,i){if("function"!=typeof i&&null!==i)throw new _("Super expression must either be null or a function");t.prototype=b.create(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),i&&Rt(t,i)}var Dt=M(function(){V(),It(),Ct()});function Nt(t,i){for(var n=0;nt.length)&&(i=t.length);for(var n=0,r=new Array(i);n=t.length?{done:!0}:{done:!1,value:t[s++]}}}throw new _("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Ut=M(function(){V(),It(),Lt()});function Vt(t,i,n,r,e,s,u){try{var o=t[s](u),h=o.value}catch(t){return void n(t)}o.done?i(h):ot.resolve(h).then(r,e)}function jt(t){return function(){var i=this,n=arguments;return new ot(function(r,e){var s=t.apply(i,n);function u(t){Vt(s,r,e,u,o,"next",t)}function o(t){Vt(s,r,e,u,o,"throw",t)}u(void 0)})}}var Ht,Wt=M(function(){V(),It()});function zt(t,n){var e,s,u,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},h=b.create(("function"==typeof Iterator?Iterator:b).prototype);return h.next=a(0),h.throw=a(1),h.return=a(2),"function"==typeof i&&(h[r]=function(){return this}),h;function a(i){return function(r){return function(i){if(e)throw new _("Generator is already executing.");for(;h&&(h=0,i[0]&&(o=0)),o;)try{if(e=1,s&&(u=2&i[0]?s.return:i[0]?s.throw||((u=s.return)&&u.call(s),0):s.next)&&!(u=u.call(s,i[1])).done)return u;switch(s=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,s=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(u=o.trys,(u=u.length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new _(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xt(t,i,n){if(null!=i){if("object"!=typeof i&&"function"!=typeof i)throw new _("Object expected.");var r,u;if(n){if(!s)throw new _("Symbol.asyncDispose is not defined.");r=i[s]}if(void 0===r){if(!e)throw new _("Symbol.dispose is not defined.");r=i[e],n&&(u=r)}if("function"!=typeof r)throw new _("Object not disposable.");u&&(r=function(){try{u.call(this)}catch(t){return ot.reject(t)}}),t.stack.push({value:i,dispose:r,async:n})}else n&&t.stack.push({async:!0});return i}function Gt(t){function i(i){t.error=t.hasError?new Ht(i,t.error,"An error was suppressed during disposal."):i,t.hasError=!0}var n,r=0;return function e(){for(;n=t.stack.pop();)try{if(!n.async&&1===r)return r=0,t.stack.push(n),ot.resolve().then(e);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return r|=2,ot.resolve(s).then(e,function(t){return i(t),e()})}else r|=1}catch(t){i(t)}if(1===r)return t.hasError?ot.reject(t.error):ot.resolve();if(t.hasError)throw t.error}()}var Qt=M(function(){V(),It(),Ht="function"==typeof SuppressedError?SuppressedError:function(t,i,n){var r=new y(n);return r.name="SuppressedError",r.error=t,r.suppressed=i,r}}),Yt=M(function(){V(),It(),Qt()}),$t=L(function(t,n){var e,s;V(),It(),ft(),e=t,s=function(t){var n="function"==typeof i&&"symbol"===W(r)?i:function(t){return"Symbol("+t+")"};function e(){}var s=Number.isNaN||function(t){return t!=t},u=e;function o(t){return"object"===(void 0===t?"undefined":W(t))&&null!==t||"function"==typeof t}function h(t){return t.slice()}function a(t,i,n,r,e){new I(t).set(new I(n,r,e),i)}function c(t){return!1!==function(t){return"number"==typeof t&&(!s(t)&&!(t<0))}(t)&&t!==1/0}function f(t,i,n){if("function"!=typeof t)throw new _("Argument is not a function");return Function.prototype.apply.call(t,i,n)}function v(t,i,n,r){var e=t[i];if(void 0!==e){if("function"!=typeof e)throw new _(e+" is not a method");switch(n){case 0:return function(){return l(e,t,r)};case 1:return function(i){var n=[i].concat(r);return l(e,t,n)}}}return function(){return E(void 0)}}function d(t,i,n){var r=t[i];if(void 0!==r)return f(r,t,n)}function l(t,i,n){try{return E(f(t,i,n))}catch(t){return R(t)}}function g(t){if(t=Number(t),s(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function w(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new _("size property of a queuing strategy must be a function");return function(i){return t(i)}}var m=ot,p=ot.prototype.then,k=ot.resolve.bind(m),T=ot.reject.bind(m);function S(t){return new m(t)}function E(t){return k(t)}function R(t){return T(t)}function C(t,i,n){return p.call(t,i,n)}function P(t,i,n){C(C(t,i,n),void 0,u)}function D(t,i){P(t,i)}function N(t,i){P(t,void 0,i)}function x(t,i,n){return C(t,i,n)}function B(t){C(t,void 0,u)}var O=function(){function t(){this.Rd=0,this.Dd=0,this.Ld={Od:[],Fd:void 0},this.Ud=this.Ld,this.Rd=0,this.Dd=0}return b.defineProperty(t.prototype,"length",{get:function(){return this.Dd},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var i=this.Ud,n=i;16383===i.Od.length&&(n={Od:[],Fd:void 0}),i.Od.push(t),n!==i&&(this.Ud=n,i.Fd=n),++this.Dd},t.prototype.shift=function(){var t=this.Ld,i=t,n=this.Rd,r=n+1,e=t.Od,s=e[n];return 16384===r&&(i=t.Fd,r=0),--this.Dd,this.Rd=r,t!==i&&(this.Ld=i),e[n]=void 0,s},t.prototype.forEach=function(t){for(var i=this.Rd,n=this.Ld,r=n.Od;!(i===r.length&&void 0===n.Fd||i===r.length&&(i=0,0===(r=(n=n.Fd).Od).length));)t(r[i]),++i},t.prototype.peek=function(){var t=this.Ld,i=this.Rd;return t.Od[i]},t}();function M(t,i,n){var r=null;!0===n&&(r=b.prototype);var e=b.create(r);return e.value=t,e.done=i,e}function L(t,i){t.Vd=!0,t.Hd=i,i.Wd=t,"readable"===i.Ra?j(t):"closed"===i.Ra?function(t){j(t),q(t)}(t):H(t,i.qd)}function F(t,i){return $i(t.Hd,i)}function U(t){"readable"===t.Hd.Ra?z(t,new _("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,i){H(t,i)}(t,new _("Reader was released and can no longer be used to monitor the stream's closedness")),t.Hd.Wd=void 0,t.Hd=void 0}function V(t){return new _("Cannot "+t+" a stream using a released reader")}function j(t){t.zd=S(function(i,n){t.Gd=i,t.Xd=n})}function H(t,i){j(t),z(t,i)}function z(t,i){B(t.zd),t.Xd(i),t.Gd=void 0,t.Xd=void 0}function q(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0}var X=n("[[CancelSteps]]"),G=n("[[PullSteps]]");function Q(t,i){void 0===i&&(i=!1);var n=new it(t);return n.Vd=i,n}function Y(t){return S(function(i,n){var r={Qd:i,Kd:n};t.Wd.Yd.push(r)})}function $(t,i,n){var r=t.Wd;r.Yd.shift().Qd(M(i,n,r.Vd))}function K(t){return t.Wd.Yd.length}function J(t){var i=t.Wd;return void 0!==i&&!!nt(i)}var Z,tt,it=function(){function t(t){if(!1===Qi(t))throw new _("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Yi(t))throw new _("This stream has already been locked for exclusive reading by another reader");L(this,t),this.Yd=new O}return b.defineProperty(t.prototype,"closed",{get:function(){return nt(this)?this.zd:R(et("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return nt(this)?void 0===this.Hd?R(V("cancel")):F(this,t):R(et("cancel"))},t.prototype.read=function(){return nt(this)?void 0===this.Hd?R(V("read from")):rt(this):R(et("read"))},t.prototype.releaseLock=function(){if(!nt(this))throw et("releaseLock");if(void 0!==this.Hd){if(this.Yd.length>0)throw new _("Tried to release a reader lock when that reader has pending read() calls un-settled");U(this)}},t}();function nt(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Yd")}function rt(t){var i=t.Hd;return i.Jd=!0,"closed"===i.Ra?E(M(void 0,!0,t.Vd)):"errored"===i.Ra?R(i.qd):i.Zd[G]()}function et(t){return new _("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"===W(n.asyncIterator)&&((Z={})[n.asyncIterator]=function(){return this},tt=Z,b.defineProperty(tt,n.asyncIterator,{enumerable:!1}));var st={next:function(){if(!1===ut(this))return R(ht("next"));var t=this.$d;return void 0===t.Hd?R(V("iterate")):x(rt(t),function(i){var n=i.done;return n&&U(t),M(i.value,n,!0)})},return:function(t){if(!1===ut(this))return R(ht("next"));var i=this.$d;if(void 0===i.Hd)return R(V("finish iterating"));if(i.Yd.length>0)return R(new _("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.ul){var n=F(i,t);return U(i),x(n,function(){return M(t,!0,!0)})}return U(i),E(M(t,!0,!0))}};function ut(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"$d")}function ht(t){return new _("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function at(t){var i=t.tf.shift();return t.if-=i.size,t.if<0&&(t.if=0),i.value}function ct(t,i,n){if(!c(n=Number(n)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.tf.push({value:i,size:n}),t.if+=n}function ft(t){t.tf=new O,t.if=0}void 0!==tt&&b.setPrototypeOf(st,tt),b.defineProperty(st,"next",{enumerable:!1}),b.defineProperty(st,"return",{enumerable:!1});var vt=n("[[AbortSteps]]"),dt=n("[[ErrorSteps]]"),lt=function(){function t(t,i){void 0===t&&(t={}),void 0===i&&(i={}),wt(this);var n=i.size,r=i.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var e=w(n);void 0===r&&(r=1),function(t,i,n,r){var e=b.create(Bt.prototype);function s(){return d(i,"start",[e])}var u=v(i,"write",1,[e]),o=v(i,"close",0,[]),h=v(i,"abort",1,[]);Ot(t,e,s,u,o,h,n,r)}(this,t,r=g(r),e)}return b.defineProperty(t.prototype,"locked",{get:function(){if(!1===mt(this))throw Ht("locked");return pt(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===mt(this)?R(Ht("abort")):!0===pt(this)?R(new _("Cannot abort a stream that already has a writer")):yt(this,t)},t.prototype.close=function(){return!1===mt(this)?R(Ht("close")):!0===pt(this)?R(new _("Cannot close a stream that already has a writer")):!0===Tt(this)?R(new _("Cannot close an already-closing stream")):_t(this)},t.prototype.getWriter=function(){if(!1===mt(this))throw Ht("getWriter");return gt(this)},t}();function gt(t){return new It(t)}function wt(t){t.Ra="writable",t.qd=void 0,t.ef=void 0,t.nf=void 0,t.rf=new O,t.hf=void 0,t.uf=void 0,t.cf=void 0,t.df=void 0,t.lf=!1}function mt(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"nf")}function pt(t){return void 0!==t.ef}function yt(t,i){var n=t.Ra;if("closed"===n||"errored"===n)return E(void 0);if(void 0!==t.df)return t.df.vf;var r=!1;"erroring"===n&&(r=!0,i=void 0);var e=S(function(n,e){t.df={vf:void 0,Qd:n,Kd:e,_f:i,gf:r}});return t.df.vf=e,!1===r&&bt(t,i),e}function _t(t){var i=t.Ra;if("closed"===i||"errored"===i)return R(new _("The stream (in "+i+" state) is not in the writable state and cannot be closed"));var n=S(function(i,n){var r={Qd:i,Kd:n};t.uf=r}),r=t.ef;return void 0!==r&&!0===t.lf&&"writable"===i&&Zt(r),function(t){ct(t,"close",0),Ft(t)}(t.nf),n}function kt(t,i){"writable"!==t.Ra?At(t):bt(t,i)}function bt(t,i){var n=t.nf;t.Ra="erroring",t.qd=i;var r=t.ef;void 0!==r&&Dt(r,i),!1===function(t){return void 0!==t.hf||void 0!==t.cf}(t)&&!0===n.pf&&At(t)}function At(t){t.Ra="errored",t.nf[dt]();var i=t.qd;if(t.rf.forEach(function(t){t.Kd(i)}),t.rf=new O,void 0!==t.df){var n=t.df;if(t.df=void 0,!0===n.gf)return n.Kd(i),void St(t);P(t.nf[vt](n._f),function(){n.Qd(),St(t)},function(i){n.Kd(i),St(t)})}else St(t)}function Tt(t){return void 0!==t.uf||void 0!==t.cf}function St(t){void 0!==t.uf&&(t.uf.Kd(t.qd),t.uf=void 0);var i=t.ef;void 0!==i&&Gt(i,t.qd)}function Et(t,i){var n=t.ef;void 0!==n&&i!==t.lf&&(!0===i?function(t){Yt(t)}(n):Zt(n)),t.lf=i}var It=function(){function t(t){if(!1===mt(t))throw new _("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===pt(t))throw new _("This stream has already been locked for exclusive writing by another writer");this.mf=t,t.ef=this;var i=t.Ra;if("writable"===i)!1===Tt(t)&&!0===t.lf?Yt(this):Kt(this),qt(this);else if("erroring"===i)$t(this,t.qd),qt(this);else if("closed"===i)Kt(this),function(t){qt(t),Qt(t)}(this);else{var n=t.qd;$t(this,n),Xt(this,n)}}return b.defineProperty(t.prototype,"closed",{get:function(){return!1===Rt(this)?R(Wt("closed")):this.zd},enumerable:!0,configurable:!0}),b.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Rt(this))throw Wt("desiredSize");if(void 0===this.mf)throw zt("desiredSize");return function(t){var i=t.mf,n=i.Ra;return"errored"===n||"erroring"===n?null:"closed"===n?0:Lt(i.nf)}(this)},enumerable:!0,configurable:!0}),b.defineProperty(t.prototype,"ready",{get:function(){return!1===Rt(this)?R(Wt("ready")):this.wf},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Rt(this)?R(Wt("abort")):void 0===this.mf?R(zt("abort")):function(t,i){var n=t.mf;return yt(n,i)}(this,t)},t.prototype.close=function(){if(!1===Rt(this))return R(Wt("close"));var t=this.mf;return void 0===t?R(zt("close")):!0===Tt(t)?R(new _("Cannot close an already-closing stream")):Ct(this)},t.prototype.releaseLock=function(){if(!1===Rt(this))throw Wt("releaseLock");void 0!==this.mf&&Nt(this)},t.prototype.write=function(t){return!1===Rt(this)?R(Wt("write")):void 0===this.mf?R(zt("write to")):xt(this,t)},t}();function Rt(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"mf")}function Ct(t){return _t(t.mf)}function Pt(t,i){"pending"===t.yf?Gt(t,i):function(t,i){Xt(t,i)}(t,i)}function Dt(t,i){"pending"===t.bf?Jt(t,i):function(t,i){$t(t,i)}(t,i)}function Nt(t){var i=t.mf,n=new _("Writer was released and can no longer be used to monitor the stream's closedness");Dt(t,n),Pt(t,n),i.ef=void 0,t.mf=void 0}function xt(t,i){var n=t.mf,r=n.nf,e=function(t,i){try{return t.Af(i)}catch(i){return Ut(t,i),1}}(r,i);if(n!==t.mf)return R(zt("write to"));var s=n.Ra;if("errored"===s)return R(n.qd);if(!0===Tt(n)||"closed"===s)return R(new _("The stream is closing or closed and cannot be written to"));if("erroring"===s)return R(n.qd);var u=function(t){return S(function(i,n){var r={Qd:i,Kd:n};t.rf.push(r)})}(n);return function(t,i,n){var r={chunk:i};try{ct(t,r,n)}catch(i){return void Ut(t,i)}var e=t.Sf;!1===Tt(e)&&"writable"===e.Ra&&Et(e,Vt(t)),Ft(t)}(r,i,e),u}var Bt=function(){function t(){throw new _("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Sf")}(this))throw new _("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.Sf.Ra&&jt(this,t)},t.prototype[vt]=function(t){var i=this.Tf(t);return Mt(this),i},t.prototype[dt]=function(){ft(this)},t}();function Ot(t,i,n,r,e,s,u,o){i.Sf=t,t.nf=i,i.tf=void 0,i.if=void 0,ft(i),i.pf=!1,i.Af=o,i.kf=u,i.Ef=r,i.xf=e,i.Tf=s;var h=Vt(i);Et(t,h),P(E(n()),function(){i.pf=!0,Ft(i)},function(n){i.pf=!0,kt(t,n)})}function Mt(t){t.Ef=void 0,t.xf=void 0,t.Tf=void 0,t.Af=void 0}function Lt(t){return t.kf-t.if}function Ft(t){var i=t.Sf;if(!1!==t.pf&&void 0===i.hf)if("erroring"!==i.Ra){if(0!==t.tf.length){var n=function(t){return t.tf.peek().value}(t);"close"===n?function(t){var i=t.Sf;(function(t){t.cf=t.uf,t.uf=void 0})(i),at(t);var n=t.xf();Mt(t),P(n,function(){!function(t){t.cf.Qd(void 0),t.cf=void 0,"erroring"===t.Ra&&(t.qd=void 0,void 0!==t.df&&(t.df.Qd(),t.df=void 0)),t.Ra="closed";var i=t.ef;void 0!==i&&Qt(i)}(i)},function(t){!function(t,i){t.cf.Kd(i),t.cf=void 0,void 0!==t.df&&(t.df.Kd(i),t.df=void 0),kt(t,i)}(i,t)})}(t):function(t,i){var n=t.Sf;!function(t){t.hf=t.rf.shift()}(n);var r=t.Ef(i);P(r,function(){!function(t){t.hf.Qd(void 0),t.hf=void 0}(n);var i=n.Ra;if(at(t),!1===Tt(n)&&"writable"===i){var r=Vt(t);Et(n,r)}Ft(t)},function(i){"writable"===n.Ra&&Mt(t),function(t,i){t.hf.Kd(i),t.hf=void 0,kt(t,i)}(n,i)})}(t,n.chunk)}}else At(i)}function Ut(t,i){"writable"===t.Sf.Ra&&jt(t,i)}function Vt(t){return Lt(t)<=0}function jt(t,i){var n=t.Sf;Mt(t),bt(n,i)}function Ht(t){return new _("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Wt(t){return new _("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function zt(t){return new _("Cannot "+t+" a stream using a released writer")}function qt(t){t.zd=S(function(i,n){t.Gd=i,t.Xd=n,t.yf="pending"})}function Xt(t,i){qt(t),Gt(t,i)}function Gt(t,i){B(t.zd),t.Xd(i),t.Gd=void 0,t.Xd=void 0,t.yf="rejected"}function Qt(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0,t.yf="resolved"}function Yt(t){t.wf=S(function(i,n){t.Pf=i,t.If=n}),t.bf="pending"}function $t(t,i){Yt(t),Jt(t,i)}function Kt(t){Yt(t),Zt(t)}function Jt(t,i){B(t.wf),t.If(i),t.Pf=void 0,t.If=void 0,t.bf="rejected"}function Zt(t){t.Pf(void 0),t.Pf=void 0,t.If=void 0,t.bf="fulfilled"}function ti(t){if("object"!==(void 0===t?"undefined":W(t))||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var ii,ni="undefined"!=typeof DOMException?DOMException:void 0,ri=function(t){if("function"!=typeof t&&"object"!==(void 0===t?"undefined":W(t)))return!1;try{return new t,!0}catch(t){return!1}}(ni)?ni:((ii=function(t,i){this.message=t||"",this.name=i||"Error",y.captureStackTrace&&y.captureStackTrace(this,this.constructor)}).prototype=b.create(y.prototype),b.defineProperty(ii.prototype,"constructor",{value:ii,writable:!0,configurable:!0}),ii);function ei(t,i,n,r,s,u){var o=Q(t),h=gt(i);t.Jd=!0;var a=!1,c=E(void 0);return S(function(f,v){var d,l,g,w;if(void 0!==u){if(d=function(){var n=new ri("Aborted","AbortError"),e=[];!1===r&&e.push(function(){return"writable"===i.Ra?yt(i,n):E(void 0)}),!1===s&&e.push(function(){return"readable"===t.Ra?$i(t,n):E(void 0)}),k(function(){return ot.all(e.map(function(t){return t()}))},!0,n)},!0===u.aborted)return void d();u.addEventListener("abort",d)}if(y(t,o.zd,function(t){!1===r?k(function(){return yt(i,t)},!0,t):b(!0,t)}),y(i,h.zd,function(i){!1===s?k(function(){return $i(t,i)},!0,i):b(!0,i)}),l=t,g=o.zd,w=function(){!1===n?k(function(){return function(t){var i=t.mf,n=i.Ra;return!0===Tt(i)||"closed"===n?E(void 0):"errored"===n?R(i.qd):Ct(t)}(h)}):b()},"closed"===l.Ra?w():D(g,w),!0===Tt(i)||"closed"===i.Ra){var m=new _("the destination writable stream closed before all data could be piped to it");!1===s?k(function(){return $i(t,m)},!0,m):b(!0,m)}function p(){var t=c;return C(c,function(){return t!==c?p():void 0})}function y(t,i,n){"errored"===t.Ra?n(t.qd):N(i,n)}function k(t,n,r){function e(){P(t(),function(){return A(n,r)},function(t){return A(!0,t)})}!0!==a&&(a=!0,"writable"===i.Ra&&!1===Tt(i)?D(p(),e):e())}function b(t,n){!0!==a&&(a=!0,"writable"===i.Ra&&!1===Tt(i)?D(p(),function(){return A(t,n)}):A(t,n))}function A(t,i){Nt(h),U(o),void 0!==u&&u.removeEventListener("abort",d),t?v(i):f(void 0)}B(S(function(t,i){!function n(r){r?t():C(!0===a?E(!0):C(h.wf,function(){return C(rt(o),function(t){return!0===t.done||(c=C(xt(h,t.value),void 0,e),!1)})}),n,i)}(!1)}))})}var si=function(){function t(){throw new _}return b.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===ui(this))throw wi("desiredSize");return di(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===ui(this))throw wi("close");if(!1===li(this))throw new _("The stream is not in a state that permits close");ci(this)},t.prototype.enqueue=function(t){if(!1===ui(this))throw wi("enqueue");if(!1===li(this))throw new _("The stream is not in a state that permits enqueue");return fi(this,t)},t.prototype.error=function(t){if(!1===ui(this))throw wi("error");vi(this,t)},t.prototype[X]=function(t){ft(this);var i=this.Cf(t);return ai(this),i},t.prototype[G]=function(){var t=this.Rf;if(this.tf.length>0){var i=at(this);return!0===this.Df&&0===this.tf.length?(ai(this),Ki(t)):oi(this),E(M(i,!1,t.Wd.Vd))}var n=Y(t);return oi(this),n},t}();function ui(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Rf")}function oi(t){!1!==hi(t)&&(!0!==t.Nf?(t.Nf=!0,P(t.Bf(),function(){t.Nf=!1,!0===t.Mf&&(t.Mf=!1,oi(t))},function(i){vi(t,i)})):t.Mf=!0)}function hi(t){var i=t.Rf;return!1!==li(t)&&!1!==t.pf&&(!0===Yi(i)&&K(i)>0||di(t)>0)}function ai(t){t.Bf=void 0,t.Cf=void 0,t.Af=void 0}function ci(t){var i=t.Rf;t.Df=!0,0===t.tf.length&&(ai(t),Ki(i))}function fi(t,i){var n=t.Rf;if(!0===Yi(n)&&K(n)>0)$(n,i,!1);else{var r=void 0;try{r=t.Af(i)}catch(i){throw vi(t,i),i}try{ct(t,i,r)}catch(i){throw vi(t,i),i}}oi(t)}function vi(t,i){var n=t.Rf;"readable"===n.Ra&&(ft(t),ai(t),Ji(n,i))}function di(t){var i=t.Rf.Ra;return"errored"===i?null:"closed"===i?0:t.kf-t.if}function li(t){var i=t.Rf.Ra;return!1===t.Df&&"readable"===i}function gi(t,i,n,r,e,s,u){i.Rf=t,i.tf=void 0,i.if=void 0,ft(i),i.pf=!1,i.Df=!1,i.Mf=!1,i.Nf=!1,i.Af=u,i.kf=s,i.Bf=r,i.Cf=e,t.Zd=i,P(E(n()),function(){i.pf=!0,oi(i)},function(t){vi(i,t)})}function wi(t){return new _("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var mi=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&A.floor(t)===t},pi=function(){function t(){throw new _("ReadableStreamBYOBRequest cannot be used directly")}return b.defineProperty(t.prototype,"view",{get:function(){if(!1===ki(this))throw Li("view");return this.Lf},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===ki(this))throw Li("respond");if(void 0===this.Of)throw new _("This BYOB request has been invalidated");this.Lf.buffer,function(t,i){if(!1===c(i=Number(i)))throw new RangeError("bytesWritten must be a finite");Di(t,i)}(this.Of,t)},t.prototype.respondWithNewView=function(t){if(!1===ki(this))throw Li("respond");if(void 0===this.Of)throw new _("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new _("You can only respond with array buffer views");t.buffer,function(t,i){var n=t.Ff.peek();if(n.byteOffset+n.bytesFilled!==i.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(n.byteLength!==i.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");n.buffer=i.buffer,Di(t,i.byteLength)}(this.Of,t)},t}(),yi=function(){function t(){throw new _("ReadableByteStreamController constructor cannot be used directly")}return b.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===_i(this))throw Fi("byobRequest");if(void 0===this.Uf&&this.Ff.length>0){var t=this.Ff.peek(),i=new I(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=b.create(pi.prototype);!function(t,i,n){t.Of=i,t.Lf=n}(n,this,i),this.Uf=n}return this.Uf},enumerable:!0,configurable:!0}),b.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===_i(this))throw Fi("desiredSize");return Oi(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===_i(this))throw Fi("close");if(!0===this.Df)throw new _("The stream has already been closed; do not close it again!");var t=this.Vf.Ra;if("readable"!==t)throw new _("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var i=t.Vf;if(t.if>0)t.Df=!0;else{if(t.Ff.length>0&&t.Ff.peek().bytesFilled>0){var n=new _("Insufficient bytes to fill elements in the given buffer");throw Bi(t,n),n}xi(t),Ki(i)}}(this)},t.prototype.enqueue=function(t){if(!1===_i(this))throw Fi("enqueue");if(!0===this.Df)throw new _("stream is closed or draining");var i=this.Vf.Ra;if("readable"!==i)throw new _("The stream (in "+i+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new _("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,i){var n=t.Vf,r=i.buffer,e=i.byteOffset,s=i.byteLength,u=r;!0===J(n)?0===K(n)?Si(t,u,e,s):$(n,new I(u,e,s),!1):!0===ji(n)?(Si(t,u,e,s),Pi(t)):Si(t,u,e,s),bi(t)}(this,t)},t.prototype.error=function(t){if(!1===_i(this))throw Fi("error");Bi(this,t)},t.prototype[X]=function(t){this.Ff.length>0&&(this.Ff.peek().bytesFilled=0),ft(this);var i=this.Cf(t);return xi(this),i},t.prototype[G]=function(){var t=this.Vf;if(this.if>0){var i=this.tf.shift();this.if-=i.byteLength,Ri(this);var n=void 0;try{n=new I(i.buffer,i.byteOffset,i.byteLength)}catch(t){return R(t)}return E(M(n,!1,t.Wd.Vd))}var r=this.Hf;if(void 0!==r){var e=void 0;try{e=new ArrayBuffer(r)}catch(t){return R(t)}var s={buffer:e,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,ctor:I,readerType:"default"};this.Ff.push(s)}var u=Y(t);return bi(this),u},t}();function _i(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Vf")}function ki(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Of")}function bi(t){var i=function(t){var i=t.Vf;if("readable"!==i.Ra)return!1;if(!0===t.Df)return!1;if(!1===t.pf)return!1;if(!0===J(i)&&K(i)>0)return!0;if(!0===ji(i)&&Vi(i)>0)return!0;var n=Oi(t);return n>0}(t);!1!==i&&(!0!==t.Nf?(t.Nf=!0,P(t.Bf(),function(){t.Nf=!1,!0===t.Mf&&(t.Mf=!1,bi(t))},function(i){Bi(t,i)})):t.Mf=!0)}function Ai(t,i){var n=!1;"closed"===t.Ra&&(n=!0);var r=Ti(i);"default"===i.readerType?$(t,r,n):function(t,i,n){var r=t.Wd,e=r.Wf.shift();e.Qd(M(i,n,r.Vd))}(t,r,n)}function Ti(t){var i=t.bytesFilled,n=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,i/n)}function Si(t,i,n,r){t.tf.push({buffer:i,byteOffset:n,byteLength:r}),t.if+=r}function Ei(t,i){var n=i.elementSize,r=i.bytesFilled-i.bytesFilled%n,e=A.min(t.if,i.byteLength-i.bytesFilled),s=i.bytesFilled+e,u=s-s%n,o=e,h=!1;u>r&&(o=u-i.bytesFilled,h=!0);for(var c=t.tf;o>0;){var f=c.peek(),v=A.min(o,f.byteLength),d=i.byteOffset+i.bytesFilled;a(i.buffer,d,f.buffer,f.byteOffset,v),f.byteLength===v?c.shift():(f.byteOffset+=v,f.byteLength-=v),t.if-=v,Ii(t,v,i),o-=v}return h}function Ii(t,i,n){Ci(t),n.bytesFilled+=i}function Ri(t){0===t.if&&!0===t.Df?(xi(t),Ki(t.Vf)):bi(t)}function Ci(t){void 0!==t.Uf&&(t.Uf.Of=void 0,t.Uf.Lf=void 0,t.Uf=void 0)}function Pi(t){for(;t.Ff.length>0;){if(0===t.if)return;var i=t.Ff.peek();!0===Ei(t,i)&&(Ni(t),Ai(t.Vf,i))}}function Di(t,i){var n=t.Ff.peek();if("closed"===t.Vf.Ra){if(0!==i)throw new _("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,i){i.buffer=i.buffer;var n=t.Vf;if(!0===ji(n))for(;Vi(n)>0;)Ai(n,Ni(t))}(t,n)}else!function(t,i,n){if(n.bytesFilled+i>n.byteLength)throw new RangeError("bytesWritten out of range");if(Ii(t,i,n),!(n.bytesFilled0){var e=n.byteOffset+n.bytesFilled,s=n.buffer.slice(e-r,e);Si(t,s,0,s.byteLength)}n.buffer=n.buffer,n.bytesFilled-=r,Ai(t.Vf,n),Pi(t)}}(t,i,n);bi(t)}function Ni(t){var i=t.Ff.shift();return Ci(t),i}function xi(t){t.Bf=void 0,t.Cf=void 0}function Bi(t,i){var n=t.Vf;"readable"===n.Ra&&(function(t){Ci(t),t.Ff=new O}(t),ft(t),xi(t),Ji(n,i))}function Oi(t){var i=t.Vf.Ra;return"errored"===i?null:"closed"===i?0:t.kf-t.if}function Mi(t,i,n){var r=b.create(yi.prototype),e=v(i,"pull",0,[r]),s=v(i,"cancel",1,[]),u=i.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===mi(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,i,n,r,e,s,u){i.Vf=t,i.Mf=!1,i.Nf=!1,i.Uf=void 0,i.tf=i.if=void 0,ft(i),i.Df=!1,i.pf=!1,i.kf=g(s),i.Bf=r,i.Cf=e,i.Hf=u,i.Ff=new O,t.Zd=i,P(E(n()),function(){i.pf=!0,bi(i)},function(t){Bi(i,t)})}(t,r,function(){return d(i,"start",[r])},e,s,n,u)}function Li(t){return new _("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Fi(t){return new _("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Ui(t){return S(function(i,n){var r={Qd:i,Kd:n};t.Wd.Wf.push(r)})}function Vi(t){return t.Wd.Wf.length}function ji(t){var i=t.Wd;return void 0!==i&&!!Wi(i)}var Hi=function(){function t(t){if(!Qi(t))throw new _("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===_i(t.Zd))throw new _("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Yi(t))throw new _("This stream has already been locked for exclusive reading by another reader");L(this,t),this.Wf=new O}return b.defineProperty(t.prototype,"closed",{get:function(){return Wi(this)?this.zd:R(zi("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Wi(this)?void 0===this.Hd?R(V("cancel")):F(this,t):R(zi("cancel"))},t.prototype.read=function(t){return Wi(this)?void 0===this.Hd?R(V("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?R(new _("view must have non-zero byteLength")):function(t,i){var n=t.Hd;return n.Jd=!0,"errored"===n.Ra?R(n.qd):function(t,i){var n=t.Vf,r=1;i.constructor!==DataView&&(r=i.constructor.BYTES_PER_ELEMENT);var e=i.constructor,s={buffer:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength,bytesFilled:0,elementSize:r,ctor:e,readerType:"byob"};if(t.Ff.length>0)return t.Ff.push(s),Ui(n);if("closed"===n.Ra)return E(M(new e(s.buffer,s.byteOffset,0),!0,n.Wd.Vd));if(t.if>0){if(!0===Ei(t,s)){var u=Ti(s);return Ri(t),E(M(u,!1,n.Wd.Vd))}if(!0===t.Df){var o=new _("Insufficient bytes to fill elements in the given buffer");return Bi(t,o),R(o)}}t.Ff.push(s);var h=Ui(n);return bi(t),h}(n.Zd,i)}(this,t)):R(new _("view must be an array buffer view")):R(zi("read"))},t.prototype.releaseLock=function(){if(!Wi(this))throw zi("releaseLock");if(void 0!==this.Hd){if(this.Wf.length>0)throw new _("Tried to release a reader lock when that reader has pending read() calls un-settled");U(this)}},t}();function Wi(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Wf")}function zi(t){return new _("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var qi=function(){function t(t,i){void 0===t&&(t={}),void 0===i&&(i={}),Gi(this);var n=i.size,r=i.highWaterMark,e=t.type;if("bytes"===String(e)){if(void 0!==n)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===r&&(r=0),Mi(this,t,r=g(r))}else{if(void 0!==e)throw new RangeError("Invalid type is specified");var s=w(n);void 0===r&&(r=1),function(t,i,n,r){var e=b.create(si.prototype),s=v(i,"pull",0,[e]),u=v(i,"cancel",1,[]);gi(t,e,function(){return d(i,"start",[e])},s,u,n,r)}(this,t,r=g(r),s)}}return b.defineProperty(t.prototype,"locked",{get:function(){if(!1===Qi(this))throw Zi("locked");return Yi(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Qi(this)?R(Zi("cancel")):!0===Yi(this)?R(new _("Cannot cancel a stream that already has a reader")):$i(this,t)},t.prototype.getReader=function(t){var i=(void 0===t?{}:t).mode;if(!1===Qi(this))throw Zi("getReader");if(void 0===i)return Q(this,!0);if("byob"===(i=String(i)))return function(t,i){void 0===i&&(i=!1);var n=new Hi(t);return n.Vd=i,n}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,i){var n=t.writable,r=t.readable,e=void 0===i?{}:i,s=e.preventClose,u=e.preventAbort,o=e.preventCancel,h=e.signal;if(!1===Qi(this))throw Zi("pipeThrough");if(!1===mt(n))throw new _("writable argument to pipeThrough must be a WritableStream");if(!1===Qi(r))throw new _("readable argument to pipeThrough must be a ReadableStream");if(s=Boolean(s),u=Boolean(u),o=Boolean(o),void 0!==h&&!ti(h))throw new _("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Yi(this))throw new _("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===pt(n))throw new _("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return B(ei(this,n,s,u,o,h)),r},t.prototype.pipeTo=function(t,i){var n=void 0===i?{}:i,r=n.preventClose,e=n.preventAbort,s=n.preventCancel,u=n.signal;return!1===Qi(this)?R(Zi("pipeTo")):!1===mt(t)?R(new _("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(r=Boolean(r),e=Boolean(e),s=Boolean(s),void 0===u||ti(u)?!0===Yi(this)?R(new _("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===pt(t)?R(new _("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):ei(this,t,r,e,s,u):R(new _("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Qi(this))throw Zi("tee");var t=function(t){var i,n,r,e,s,u=Q(t),o=!1,a=!1,c=!1,f=S(function(t){s=t});function v(){return!0===o||(o=!0,B(x(rt(u),function(t){if(o=!1,!0===t.done)return!1===a&&ci(r.Zd),void(!1===c&&ci(e.Zd));var i=t.value,n=i,s=i;!1===a&&fi(r.Zd,n),!1===c&&fi(e.Zd,s)}))),E(void 0)}function d(){}return r=Xi(d,v,function(r){if(a=!0,i=r,!0===c){var e=h([i,n]),u=$i(t,e);s(u)}return f}),e=Xi(d,v,function(r){if(c=!0,n=r,!0===a){var e=h([i,n]),u=$i(t,e);s(u)}return f}),N(u.zd,function(t){vi(r.Zd,t),vi(e.Zd,t)}),[r,e]}(this);return h(t)},t.prototype.getIterator=function(t){var i=(void 0===t?{}:t).preventCancel,n=void 0!==i&&i;if(!1===Qi(this))throw Zi("getIterator");return function(t,i){void 0===i&&(i=!1);var n=Q(t),r=b.create(st);return r.$d=n,r.ul=Boolean(i),r}(this,n)},t}();function Xi(t,i,n,r,e){void 0===r&&(r=1),void 0===e&&(e=function(){return 1});var s=b.create(qi.prototype);return Gi(s),gi(s,b.create(si.prototype),t,i,n,r,e),s}function Gi(t){t.Ra="readable",t.Wd=void 0,t.qd=void 0,t.Jd=!1}function Qi(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Zd")}function Yi(t){return void 0!==t.Wd}function $i(t,i){return t.Jd=!0,"closed"===t.Ra?E(void 0):"errored"===t.Ra?R(t.qd):(Ki(t),x(t.Zd[X](i),e))}function Ki(t){t.Ra="closed";var i=t.Wd;void 0!==i&&(nt(i)&&(i.Yd.forEach(function(t){t.Qd(M(void 0,!0,i.Vd))}),i.Yd=new O),q(i))}function Ji(t,i){t.Ra="errored",t.qd=i;var n=t.Wd;void 0!==n&&(nt(n)?(n.Yd.forEach(function(t){t.Kd(i)}),n.Yd=new O):(n.Wf.forEach(function(t){t.Kd(i)}),n.Wf=new O),z(n,i))}function Zi(t){return new _("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"===W(n.asyncIterator)&&b.defineProperty(qi.prototype,n.asyncIterator,{value:qi.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var tn=function(){function t(t){var i=t.highWaterMark;this.highWaterMark=i}return t.prototype.size=function(t){return t.byteLength},t}(),nn=function(){function t(t){var i=t.highWaterMark;this.highWaterMark=i}return t.prototype.size=function(){return 1},t}(),rn=function(){function t(t,i,n){void 0===t&&(t={}),void 0===i&&(i={}),void 0===n&&(n={});var r=i.size,e=i.highWaterMark,s=n.size,u=n.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var o=w(r);if(void 0===e&&(e=1),e=g(e),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var h,a=w(s);void 0===u&&(u=0),u=g(u),function(t,i,n,r,e,s){function u(){return i}function o(i){return function(t,i){var n=t.qf;return!0===t.lf?x(t.zf,function(){var r=t.Gf;if("erroring"===r.Ra)throw r.qd;return vn(n,i)}):vn(n,i)}(t,i)}function h(i){return function(t,i){return sn(t,i),E(void 0)}(t,i)}function a(){return function(t){var i=t.Xf,n=t.qf,r=n.jf();return cn(n),x(r,function(){if("errored"===i.Ra)throw i.qd;var t=i.Zd;!0===li(t)&&ci(t)},function(n){throw sn(t,n),i.qd})}(t)}function c(){return function(t){return on(t,!1),t.zf}(t)}function f(i){return un(t,i),E(void 0)}t.Gf=function(t,i,n,r,e,s){void 0===e&&(e=1),void 0===s&&(s=function(){return 1});var u=b.create(lt.prototype);return wt(u),Ot(u,b.create(Bt.prototype),t,i,n,r,e,s),u}(u,o,a,h,n,r),t.Xf=Xi(u,c,f,e,s),t.lf=void 0,t.zf=void 0,t.Qf=void 0,on(t,!0),t.qf=void 0}(this,S(function(t){h=t}),e,o,u,a),function(t,i){var n=b.create(hn.prototype),r=function(t){try{return fn(n,t),E(void 0)}catch(t){return R(t)}},e=i.transform;if(void 0!==e){if("function"!=typeof e)throw new _("transform is not a method");r=function(t){return l(e,i,[t,n])}}var s=v(i,"flush",0,[n]);!function(t,i,n,r){i.Kf=t,t.qf=i,i.Yf=n,i.jf=r}(t,n,r,s)}(this,t);var c=d(t,"start",[this.qf]);h(c)}return b.defineProperty(t.prototype,"readable",{get:function(){if(!1===en(this))throw ln("readable");return this.Xf},enumerable:!0,configurable:!0}),b.defineProperty(t.prototype,"writable",{get:function(){if(!1===en(this))throw ln("writable");return this.Gf},enumerable:!0,configurable:!0}),t}();function en(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"qf")}function sn(t,i){vi(t.Xf.Zd,i),un(t,i)}function un(t,i){cn(t.qf),Ut(t.Gf.nf,i),!0===t.lf&&on(t,!1)}function on(t,i){void 0!==t.zf&&t.Qf(),t.zf=S(function(i){t.Qf=i}),t.lf=i}var hn=function(){function t(){throw new _("TransformStreamDefaultController instances cannot be created directly")}return b.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===an(this))throw dn("desiredSize");return di(this.Kf.Xf.Zd)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===an(this))throw dn("enqueue");fn(this,t)},t.prototype.error=function(t){if(!1===an(this))throw dn("error");!function(t,i){sn(t.Kf,i)}(this,t)},t.prototype.terminate=function(){if(!1===an(this))throw dn("terminate");!function(t){var i=t.Kf,n=i.Xf.Zd;!0===li(n)&&ci(n);var r=new _("TransformStream terminated");un(i,r)}(this)},t}();function an(t){return!!o(t)&&!!b.prototype.hasOwnProperty.call(t,"Kf")}function cn(t){t.Yf=void 0,t.jf=void 0}function fn(t,i){var n=t.Kf,r=n.Xf.Zd;if(!1===li(r))throw new _("Readable side is not in a state that permits enqueue");try{fi(r,i)}catch(t){throw un(n,t),n.Xf.qd}var e=function(t){return!0!==hi(t)}(r);e!==n.lf&&on(n,!0)}function vn(t,i){return x(t.Yf(i),void 0,function(i){throw sn(t.Kf,i),i})}function dn(t){return new _("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function ln(t){return new _("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=tn,t.CountQueuingStrategy=nn,t.ReadableStream=qi,t.TransformStream=rn,t.WritableStream=lt,b.defineProperty(t,"__esModule",{value:!0})},"object"===(void 0===t?"undefined":W(t))&&void 0!==n?s(t):"function"==typeof define&&define.amd?define(["exports"],s):s((e=e||self).WebStreamsPolyfill={})}),Kt=L(function(t){function i(){var t=$t();return i=function(){return t},t}V(),It(),b.defineProperty(t,"__esModule",{value:!0}),function(t,i){for(var n in i)b.defineProperty(t,n,{enumerable:!0,get:b.getOwnPropertyDescriptor(i,n).get})}(t,{get ByteLengthQueuingStrategy(){return i().ByteLengthQueuingStrategy},get CountQueuingStrategy(){return i().CountQueuingStrategy},get ReadableStream(){return i().ReadableStream},get TransformStream(){return i().TransformStream},get WritableStream(){return i().WritableStream}})});function Jt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Jt=function(){return!!t})()}var Zt=M(function(){V(),It()});function ti(t,i,n){return(ti=Jt()?Reflect.construct:function(t,i,n){var r=[null];r.push.apply(r,i);var e=new(Function.bind.apply(t,r));return n&&Rt(e,n.prototype),e}).apply(null,arguments)}var ii=M(function(){V(),It(),Zt(),Ct()});function ni(t){return(ni=b.setPrototypeOf?b.getPrototypeOf:function(t){return t.__proto__||b.getPrototypeOf(t)})(t)}var ri=M(function(){V(),It()});var ei=M(function(){V(),It()});function si(t){var i="function"==typeof Map?new Map:void 0;return si=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new _("Super expression must either be null or a function");if(void 0!==i){if(i.has(t))return i.get(t);i.set(t,n)}function n(){return ti(t,arguments,ni(this).constructor)}return n.prototype=b.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Rt(n,t)},si(t)}var ui,oi=M(function(){V(),It(),ii(),ri(),ei(),Ct()}),hi=L(function(t,r){var e,s;V(),It(),Wt(),Bt(),Dt(),H(),ft(),oi(),Ut(),Yt(),e=t,s=function(t){var r,e=b.defineProperty,s=b.defineProperties,u=b.getOwnPropertyDescriptors,o=b.getOwnPropertySymbols,h=b.prototype.hasOwnProperty,a=b.prototype.propertyIsEnumerable,c=function(t,i,n){return i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[i]=n},d=function(t,i){for(var n in i||(i={}))h.call(i,n)&&c(t,n,i[n]);if(o)for(var r,e=Ft(o(i));!(r=e()).done;)n=r.value,a.call(i,n)&&c(t,n,i[n]);return t},w=function(t,i){return s(t,u(i))},k=function(t,i){var n={};for(var r in t)h.call(t,r)&&i.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&o)for(var e,s=Ft(o(t));!(e=s()).done;)r=e.value,i.indexOf(r)<0&&a.call(t,r)&&(n[r]=t[r]);return n},S=("undefined"==typeof globalThis?"undefined":W(globalThis))<"u"?globalThis:(void 0===f?"undefined":W(f))<"u"?f:("undefined"==typeof global?"undefined":W(global))<"u"?global:("undefined"==typeof self?"undefined":W(self))<"u"?self:{};function C(t){return t&&t.__esModule&&b.prototype.hasOwnProperty.call(t,"default")?t.default:t}var P,D,N={exports:{}},x=(P||(P=1,D=N,function(t){var i,n={VERSION:"1.6.1"},r={},e=function(t,i){return function(){return i.apply(t,arguments)}},s=function(){var t,i,n=arguments,r=n[0];for(i=1;i=i.value},trace:function(){this.invoke(n.TRACE,arguments)},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},time:function(t){"string"==typeof t&&t.length>0&&this.invoke(n.TIME,[t,"start"])},timeEnd:function(t){"string"==typeof t&&t.length>0&&this.invoke(n.TIME,[t,"end"])},invoke:function(t,n){i&&this.enabledFor(t)&&i(n,s({level:t},this.context))}};var h,a=new o({filterLevel:n.OFF});(h=n).enabledFor=e(a,a.enabledFor),h.trace=e(a,a.trace),h.debug=e(a,a.debug),h.time=e(a,a.time),h.timeEnd=e(a,a.timeEnd),h.info=e(a,a.info),h.warn=e(a,a.warn),h.error=e(a,a.error),h.log=h.info,n.setHandler=function(t){i=t},n.setLevel=function(t){for(var i in a.setLevel(t),r)r.hasOwnProperty(i)&&r[i].setLevel(t)},n.getLevel=function(){return a.getLevel()},n.get=function(t){return r[t]||(r[t]=new o(s({name:t},a.context)))},n.createDefaultHandler=function(t){(t=t||{}).formatter=t.formatter||function(t,i){i.name&&t.unshift("["+i.name+"]")};var i={},r=function(t,i){Function.prototype.apply.call(t,console,i)};return("undefined"==typeof console?"undefined":W(console))>"u"?function(){}:function(e,s){e=Array.prototype.slice.call(e);var u,o=console.log;s.level===n.TIME?(u=(s.name?"["+s.name+"] ":"")+e[0],"start"===e[1]?console.time?console.time(u):i[u]=(new Date).getTime():console.timeEnd?console.timeEnd(u):r(o,[u+": "+((new Date).getTime()-i[u])+"ms"])):(s.level===n.WARN&&console.warn?o=console.warn:s.level===n.ERROR&&console.error?o=console.error:s.level===n.INFO&&console.info?o=console.info:s.level===n.DEBUG&&console.debug?o=console.debug:s.level===n.TRACE&&console.trace&&(o=console.trace),t.formatter(e,s),r(o,e))}},n.useDefaults=function(t){n.setLevel(t&&t.defaultLevel||n.DEBUG),n.setHandler(n.createDefaultHandler(t))},n.setDefaults=n.useDefaults,D.exports?D.exports=n:(n.Jf=t.Logger,n.noConflict=function(){return t.Logger=n.Jf,n},t.Logger=n)}(N.exports)),N.exports),B=C(x),O="0.6.0",M=(null==(r=null==f?void 0:f.navigator)?void 0:r.userAgent)||"No user agent available",L="",F="",U="",V="",H="",z="",q="",X=0,G=[],Q=function(t){L=""===L?t:L},Y=function(t){F=""===F?t:F},K=function(t){U=""===U?t:U},J=function(t){V=""===V?t:V},Z=function(t){H=""===H?t:H},tt=function(t){X=0===X?t:X},it=function(t){z=t},nt=function(t){q=""===q?t:q},rt=function(t){60===G.length&&G.shift(),G.push(t)},et=function(t,i){var n;void 0===t&&(t=60),void 0===i&&(i="JSON"),n=!Number.isInteger(t)||t>60||t<=0?60:t;var r={client:"@millicast/millicast-sdk",version:O,timestamp:(new Date).toISOString(),userAgent:M,clusterId:q,accountId:L,streamName:F,subscriberId:U,connection:z,stats:G.slice(-n),connectionDurationMs:(new Date).getTime()-X};return""!==H?r.feedId=H:""!==V&&(r.streamViewId=V),"CMCD"===i?function(t){function i(t,i){return{ts:A.round(i.timestamp)||"",ot:"audio"===t?"a":"v",bl:i.jitterBufferDelay||0,br:A.round(i.bitrateBitsPerSecond||0),pld:i.packetsLostDeltaPerSecond||0,j:i.jitter||0,mtp:i.packetRate||0,mid:i.mid||"",mimeType:i.mimeType||""}}return t.stats=t.stats.reduce(function(t,n){var r=0!==n.audio.inbounds.length?n.audio.inbounds.map(function(t){return i("audio",t)}):n.audio.outbounds.map(function(t){return i("audio",t)}),e=0!==n.video.inbounds.length?n.video.inbounds.map(function(t){return i("video",t)}):n.video.outbounds.map(function(t){return i("video",t)});return t.concat([].concat(r,e))},[]),t}(r):r};B.useDefaults({defaultLevel:B.TRACE});var st=["TRACE","DEBUG","INFO","WARN","ERROR"],ut=function(t,i){t.unshift("[".concat(i.name||"Global","] ").concat((new Date).toISOString()," - ").concat(i.level.name," -"))},ht=function(t,i){return i?t.value>=lt[i].value:t.value>=dt.value},at=B.createDefaultHandler({formatter:ut});B.setHandler(function(t,i){(function(t,i){t=(t=Array.prototype.slice.call(t)).map(function(t){return"object"==(void 0===t?"undefined":W(t))?JSON.stringify(t):t}),ut(t,i),0!==ft?(vt.push(t.join(" ")),vt.length>=ft&&(vt=vt.slice(-ft))):vt=[]})(t,i),ht(i.level,i.name)&&at(t,i);for(var n,r=Ft(gt);!(n=r()).done;){var e=n.value,s=e.handler,u=e.level;i.level.value>=u.value&&s(t,i)}});var ct,ft=1e4,vt=[],dt=B.OFF,lt={},gt=[],wt=w(d({},B),{enabledFor:ht,getHistory:function(){return vt},getHistoryMaxSize:function(){return ft},setHistoryMaxSize:function(t){ft=t},setLevel:function(t){for(var i in dt=t,lt)lt[i]=t},getLevel:function(){return dt},get:function(t){lt[t]||(lt[t]=dt);var i=B.get(t);return i.setLevel=function(i){lt[t]=i},i.getLevel=function(){return lt[t]},i},setHandler:function(t,i){gt.push({handler:t,level:i})},diagnose:function(t){var i;void 0===t&&(t={});var n={statsCount:60,historySize:1e3,minLogLevel:"TRACE",statsFormat:"JSON"};"number"==typeof t?(n.statsCount=t,i=n):i=d(d({},n),t);var r=i.statsCount,e=i.historySize,s=i.minLogLevel,u=i.statsFormat,o=et(r,u),h=wt.getHistory();if(!Number.isInteger(e)||e<=0)throw new y("Invalid Argument Exception : historySize must be a positive integer.");if(!st.includes(s.toUpperCase()))throw new y('Invalid Argument Exception : the minLogLevel parameter only excepts "trace", "debug", "info", "warn", and "error" as arguments.');if(st.includes(s.toUpperCase())){var a=st.slice(st.indexOf(s.toUpperCase())),c=h.filter(function(t){return a.some(function(i){return t.includes(i)})});o.history=c.slice(-e)}return o},JSON:"JSON",CMCD:"CMCD",VERSION:O}),mt={exports:{}};function pt(){if(ct)return mt.exports;ct=1;var t,i="object"==("undefined"==typeof Reflect?"undefined":W(Reflect))?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(t,i,n){return Function.prototype.apply.call(t,i,n)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:b.getOwnPropertySymbols?function(t){return b.getOwnPropertyNames(t).concat(b.getOwnPropertySymbols(t))}:function(t){return b.getOwnPropertyNames(t)};var r=Number.isNaN||function(t){return t!=t};function e(){e.init.call(this)}mt.exports=e,mt.exports.once=function(t,i){return new ot(function(n,r){function e(n){t.removeListener(i,s),r(n)}function s(){"function"==typeof t.removeListener&&t.removeListener("error",e),n([].slice.call(arguments))}l(t,i,s,{once:!0}),"error"!==i&&function(t,i,n){"function"==typeof t.on&&l(t,"error",i,n)}(t,e,{once:!0})})},e.EventEmitter=e,e.prototype.Zf=void 0,e.prototype.$f=0,e.prototype.rv=void 0;var s=10;function u(t){if("function"!=typeof t)throw new _('The "listener" argument must be of type Function. Received type '+(void 0===t?"undefined":W(t)))}function o(t){return void 0===t.rv?e.defaultMaxListeners:t.rv}function h(t,i,n,r){var e,s,h;if(u(n),void 0===(s=t.Zf)?(s=t.Zf=b.create(null),t.$f=0):(void 0!==s.newListener&&(t.emit("newListener",i,n.listener?n.listener:n),s=t.Zf),h=s[i]),void 0===h)h=s[i]=n,++t.$f;else if("function"==typeof h?h=s[i]=r?[n,h]:[h,n]:r?h.unshift(n):h.push(n),(e=o(t))>0&&h.length>e&&!h.warned){h.warned=!0;var a=new y("Possible EventEmitter memory leak detected. "+h.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=i,a.count=h.length,function(t){console&&console.warn&&console.warn(t)}(a)}return t}function a(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(t,i,n){var r={fired:!1,wrapFn:void 0,target:t,type:i,listener:n},e=a.bind(r);return e.listener=n,r.wrapFn=e,e}function f(t,i,n){var r=t.Zf;if(void 0===r)return[];var e=r[i];return void 0===e?[]:"function"==typeof e?n?[e.listener||e]:[e]:n?function(t){for(var i=new Array(t.length),n=0;n0&&(u=i[0]),j(u,y))throw u;var o=new y("Unhandled error."+(u?" ("+u.message+")":""));throw o.context=u,o}var h=s[t];if(void 0===h)return!1;if("function"==typeof h)n(h,this,i);else{var a=h.length,c=d(h,a);for(r=0;r=0;s--)if(n[s]===i||n[s].listener===i){o=n[s].listener,e=s;break}if(e<0)return this;0===e?n.shift():function(t,i){for(;i+1=0;r--)this.removeListener(t,i[r]);return this},e.prototype.listeners=function(t){return f(this,t,!0)},e.prototype.rawListeners=function(t){return f(this,t,!1)},e.listenerCount=function(t,i){return"function"==typeof t.listenerCount?t.listenerCount(i):v.call(t,i)},e.prototype.listenerCount=v,e.prototype.eventNames=function(){return this.$f>0?t(this.Zf):[]},mt.exports}var yt,_t,kt,bt,At,Tt,St,Et,It,Rt,Ct,Dt,Nt,Bt,Ot,Mt,Lt,Ut,Vt,Ht,Wt,qt,Xt,Gt=C(pt()),Qt={exports:{}},Yt=function(){if(yt)return Qt.exports;yt=1,Qt.exports=i,Qt.exports.filter=function(n,r){var e=new t;return i(n,e,r),e};var t=pt().EventEmitter;function i(t,i,n){Array.isArray(n)||(n=[n]);var r=[];return n.forEach(function(n){var e=function(){var t=[].slice.call(arguments);t.unshift(n),i.emit.apply(i,t)};r.push(e),t.on(n,e)}),function(){n.forEach(function(i,n){t.removeListener(i,r[n])})}}return Qt.exports}(),$t=C(Yt),Kt={exports:{}},Jt=(_t||(_t=1,function(t){var i,n;self,t.exports=(i={7:function(t){var i,n=function(t){if("function"!=typeof t)throw new _('The "listener" argument must be of type Function. Received type '+(void 0===t?"undefined":W(t)))},r=function(t){return void 0===t.rv?l.defaultMaxListeners:t.rv},e=function(t,i,e,s){var u,o,h,a;if(n(e),void 0===(o=t.Zf)?(o=t.Zf=b.create(null),t.$f=0):(void 0!==o.newListener&&(t.emit("newListener",i,e.listener?e.listener:e),o=t.Zf),h=o[i]),void 0===h)h=o[i]=e,++t.$f;else if("function"==typeof h?h=o[i]=s?[e,h]:[h,e]:s?h.unshift(e):h.push(e),(u=r(t))>0&&h.length>u&&!h.warned){h.warned=!0;var c=new y("Possible EventEmitter memory leak detected. "+h.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=i,c.count=h.length,a=c,console&&console.warn&&console.warn(a)}return t},s=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)},u=function(t,i,n){var r={fired:!1,wrapFn:void 0,target:t,type:i,listener:n},e=s.bind(r);return e.listener=n,r.wrapFn=e,e},o=function(t,i,n){var r=t.Zf;if(void 0===r)return[];var e=r[i];return void 0===e?[]:"function"==typeof e?n?[e.listener||e]:[e]:n?function(t){for(var i=new Array(t.length),n=0;n0&&(s=i[0]),j(s,y))throw s;var u=new y("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var o=e[t];if(void 0===o)return!1;if("function"==typeof o)v(o,this,i);else{var h=o.length,c=a(o,h);for(n=0;n=0;u--)if(r[u]===i||r[u].listener===i){o=r[u].listener,s=u;break}if(s<0)return this;0===s?r.shift():function(t,i){for(;i+1=0;r--)this.removeListener(t,i[r]);return this},l.prototype.listeners=function(t){return o(this,t,!0)},l.prototype.rawListeners=function(t){return o(this,t,!1)},l.listenerCount=function(t,i){return"function"==typeof t.listenerCount?t.listenerCount(i):h.call(t,i)},l.prototype.listenerCount=h,l.prototype.eventNames=function(){return this.$f>0?i(this.Zf):[]}},156:function(t,i,n){var r=this&&this.hv||(b.create?function(t,i,n,r){void 0===r&&(r=n);var e=b.getOwnPropertyDescriptor(i,n);e&&!("get"in e?!i.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return i[n]}}),b.defineProperty(t,r,e)}:function(t,i,n,r){void 0===r&&(r=n),t[r]=i[n]}),e=this&&this.ov||function(t,i){for(var n in t)"default"===n||b.prototype.hasOwnProperty.call(i,n)||r(i,t,n)},s=this&&this.uv||function(t){return t&&t.__esModule?t:{default:t}};b.defineProperty(i,"__esModule",{value:!0}),i.Logger=void 0;var u=n(586);b.defineProperty(i,"Logger",{enumerable:!0,get:function(){return s(u).default}}),e(n(284),i),e(n(280),i),e(n(738),i),e(n(767),i)},185:function(t,i){b.defineProperty(i,"__esModule",{value:!0}),i.calculatePacketsLostRatio=i.calculateRate=i.getMediaKind=void 0,i.getMediaKind=function(t){var i=t.kind||t.mediaType;return["audio","video"].includes(i)||"inbound-rtp"!==t.type||(i=t.id.toLocaleLowerCase().includes("video")?"video":"audio"),i},i.calculateRate=function(t,i,n,r){return n&&r?(i-r)/((t-n)/1e3):0},i.calculatePacketsLostRatio=function(t,i,n,r){var e=t-(null!=n?n:0),s=e+(i-(null!=r?r:0));return 0===s?0:e/s}},280:function(t,i){b.defineProperty(i,"__esModule",{value:!0})},284:function(t,i,n){var r,e,s,u,o,h,a,c,f,v,d,l,g,w,y,k,A=this&&this.fv||function(t,i,n,r){return new(n||(n=ot))(function(e,s){function u(t){try{h(r.next(t))}catch(t){s(t)}}function o(t){try{h(r.throw(t))}catch(t){s(t)}}function h(t){var i;t.done?e(t.value):(i=t.value,j(i,n)?i:new n(function(t){t(i)})).then(u,o)}h((r=r.apply(t,i||[])).next())})},T=this&&this.vv||function(t,i,n,r,e){if("m"===r)throw new _("Private method is not writable");if("a"===r&&!e)throw new _("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!e:!i.has(t))throw new _("Cannot write private member to an object whose class did not declare it");return"a"===r?e.call(t,n):e?e.value=n:i.set(t,n),n},S=this&&this._v||function(t,i,n,r){if("a"===n&&!r)throw new _("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!r:!i.has(t))throw new _("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:i.get(t)},E=this&&this.uv||function(t){return t&&t.__esModule?t:{default:t}};b.defineProperty(i,"__esModule",{value:!0}),i.WebRTCStats=void 0;var I=n(7),R=E(n(586)),C=n(738),P=n(185),D=function(t){function i(i){var n;return n=t.call(this)||this,r.add(n),e.set(n,void 0),s.set(n,void 0),u.set(n,void 0),o.set(n,null),h.set(n,void 0),a.set(n,null),n.start=function(){S(n,h,"f").info("WebRTC statistics collection is starting..."),T(n,a,null,"f"),T(n,o,m(S(n,c,"f"),S(n,s,"f")),"f")},n.stop=function(){S(n,o,"f")&&(p(S(n,o,"f")),T(n,o,null,"f"),S(n,h,"f").info("WebRTC statistics collection has stopped."))},c.set(n,function(){return A(n,void 0,void 0,function(){var t,i,n,s,o,c,f,v,g,m,p,_;return zt(this,function(A){switch(A.label){case 0:return A.trys.push([0,2,,3]),S(this,h,"f").trace("Requesting WebRTC statistics..."),[4,S(this,e,"f").call(this)];case 1:return t=A.sent(),i=(new Date).toISOString(),[3,3];case 2:return n=A.sent(),[2,(S(this,h,"f").error("Problem collecting the WebRTC statistics.",n),void this.emit("error","Problem collecting the WebRTC statistics - ".concat(n)))];case 3:s=Array.from(t.values()),o={timestamp:i,input:{audio:[],video:[]},output:{audio:[],video:[]}},S(this,u,"f")&&(o.rawStats=t),c=0,A.label=4;case 4:if(!(c=i.value},trace:function(){this.invoke(u.TRACE,arguments)},debug:function(){this.invoke(u.DEBUG,arguments)},info:function(){this.invoke(u.INFO,arguments)},warn:function(){this.invoke(u.WARN,arguments)},error:function(){this.invoke(u.ERROR,arguments)},time:function(t){"string"==typeof t&&t.length>0&&this.invoke(u.TIME,[t,"start"])},timeEnd:function(t){"string"==typeof t&&t.length>0&&this.invoke(u.TIME,[t,"end"])},invoke:function(t,i){s&&this.enabledFor(t)&&s(i,a({level:t},this.context))}};var v,d=new f({filterLevel:u.OFF});(v=u).enabledFor=h(d,d.enabledFor),v.trace=h(d,d.trace),v.debug=h(d,d.debug),v.time=h(d,d.time),v.timeEnd=h(d,d.timeEnd),v.info=h(d,d.info),v.warn=h(d,d.warn),v.error=h(d,d.error),v.log=v.info,u.setHandler=function(t){s=t},u.setLevel=function(t){for(var i in d.setLevel(t),o)o.hasOwnProperty(i)&&o[i].setLevel(t)},u.getLevel=function(){return d.getLevel()},u.get=function(t){return o[t]||(o[t]=new f(a({name:t},d.context)))},u.createDefaultHandler=function(t){(t=t||{}).formatter=t.formatter||function(t,i){i.name&&t.unshift("["+i.name+"]")};var i={},n=function(t,i){Function.prototype.apply.call(t,console,i)};return("undefined"==typeof console?"undefined":W(console))>"u"?function(){}:function(r,e){r=Array.prototype.slice.call(r);var s,o=console.log;e.level===u.TIME?(s=(e.name?"["+e.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(s):i[s]=(new Date).getTime():console.timeEnd?console.timeEnd(s):n(o,[s+": "+((new Date).getTime()-i[s])+"ms"])):(e.level===u.WARN&&console.warn?o=console.warn:e.level===u.ERROR&&console.error?o=console.error:e.level===u.INFO&&console.info?o=console.info:e.level===u.DEBUG&&console.debug?o=console.debug:e.level===u.TRACE&&console.trace&&(o=console.trace),t.formatter(r,e),n(o,r))}},u.useDefaults=function(t){u.setLevel(t&&t.defaultLevel||u.DEBUG),u.setHandler(u.createDefaultHandler(t))},u.setDefaults=u.useDefaults,void 0===(e="function"==typeof(r=u)?r.call(i,n,i,t):r)||(t.exports=e)}()},738:function(t,i){var n,r;b.defineProperty(i,"__esModule",{value:!0}),i.QualityLimitationReason=void 0,(r=n||(i.QualityLimitationReason=n={}))[r.none=0]="none",r[r.cpu=1]="cpu",r[r.bandwidth=2]="bandwidth",r[r.other=3]="other"},767:function(t,i){b.defineProperty(i,"__esModule",{value:!0})}},n={},function t(r){var e=n[r];if(void 0!==e)return e.exports;var s=n[r]={exports:{}};return i[r].call(s.exports,s,s.exports,t),s.exports}(156))}(Kt)),Kt.exports),Zt=wt.get("PeerConnectionStats"),ti="stats",ii=function(t){function i(i,n){var r;return void 0===n&&(n={statsIntervalMs:1e3,autoInitStats:!0}),(r=t.call(this)||this).peer=i,r.collection=null,r.initialized=!1,n.autoInitStats&&r.init(n.statsIntervalMs),r}Pt(i,t);var n=i.prototype;return n.init=function(t){var i=this;if(this.initialized)Zt.warn("PeerConnectionStats.init() has already been called. Automatic initialization occurs when the PeerConnectionStats object is constructed.");else{Zt.info("Initializing peer connection stats");var n=this.peer;try{this.collection=new Jt.WebRTCStats({getStatsInterval:t,getStats:function(){return n.getStats()},includeRawStats:!0}),this.collection.on("stats",function(t){var n=function(t){var i=t,n=(i.input,i.output,i.rawStats,k(i,["input","output","rawStats"]));return w(d({},n),{audio:{inbounds:t.input.audio.map(function(t){var i=t,n=i.packetLossRatio,r=i.packetLossDelta,e=i.bitrate,s=k(i,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:n,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)}),outbounds:t.output.audio.map(function(t){var i=t,n=i.packetLossRatio,r=i.packetLossDelta,e=i.bitrate,s=k(i,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:n,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)})},video:{inbounds:t.input.video.map(function(t){var i=t,n=i.packetLossRatio,r=i.packetLossDelta,e=i.bitrate,s=k(i,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:n,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)}),outbounds:t.output.video.map(function(t){var i=t,n=i.packetLossRatio,r=i.packetLossDelta,e=i.bitrate,s=k(i,["packetLossRatio","packetLossDelta","bitrate"]);return d({packetsLostRatioPerSecond:n,packetsLostDeltaPerSecond:r,bitrateBitsPerSecond:8*e,bitrate:e},s)})},raw:t.rawStats})}(t);rt(n),i.emit(ti,n)}),this.collection.start(),this.initialized=!0}catch(t){Zt.error(t)}}},n.parseStats=function(t){return Zt.warn("The parseStats method is deprecated and will be removed in future releases."),null},n.stop=function(){Zt.info("Stopping peer connection stats"),this.collection.stop()},i}(Gt),ni={},ri={},ei={},ui={exports:{}};function oi(){if(kt)return ui.exports;kt=1;var t=ui.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(t){return t.encoding?"rtpmap:%d %s/%s/%s":t.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(t){return null!=t.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(t){return null!=t.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(t){return"extmap:%d"+(t.direction?"/%s":"%v")+(t["encrypt-uri"]?" %s":"%v")+" %s"+(t.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(t){return null!=t.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(t){var i="candidate:%s %d %s %d %s %d typ %s";return i+=null!=t.raddr?" raddr %s rport %d":"%v%v",i+=null!=t.tcptype?" tcptype %s":"%v",null!=t.generation&&(i+=" generation %d"),i+=null!=t["network-id"]?" network-id %d":"%v",i+=null!=t["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(t){var i="ssrc:%d";return null!=t.attribute&&(i+=" %s",null!=t.value&&(i+=":%s")),i}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(t){return null!=t.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(t){return t.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(t){return"imageattr:%s %s %s"+(t.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(t){return"simulcast:%s %s"+(t.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(t){return"ts-refclk:%s"+(null!=t.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(t){var i="mediaclk:";return i+=null!=t.id?"id=%s %s":"%v%s",i+=null!=t.mediaClockValue?"=%s":"",i+=null!=t.rateNumerator?" rate=%s":"",i+=null!=t.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};return b.keys(t).forEach(function(i){t[i].forEach(function(t){t.reg||(t.reg=/(.*)/),t.format||(t.format="%s")})}),ui.exports}function hi(){return bt||(bt=1,function(t){var i=function(t){return String(Number(t))===t?Number(t):t},n=function(t,n,r){var e=t.name&&t.names;t.push&&!n[t.push]?n[t.push]=[]:e&&!n[t.name]&&(n[t.name]={});var s=t.push?{}:e?n[t.name]:n;(function(t,n,r,e){if(e&&!r)n[e]=i(t[1]);else for(var s=0;s1&&(t[r[0]]=void 0),t};t.parseParams=function(t){return t.split(/;\s?/).reduce(s,{})},t.parseFmtpConfig=t.parseParams,t.parsePayloads=function(t){return t.toString().split(" ").map(Number)},t.parseRemoteCandidates=function(t){for(var n=[],r=t.split(" ").map(i),e=0;e=e)return t;var i=r[n];switch(n+=1,t){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}})},r=function(t,i,r){var e=[t+"="+(j(i.format,Function)?i.format(i.push?r:r[i.name]):i.format)];if(i.names)for(var s=0;s0?o-4:o;for(e=0;e>16&255,a[c++]=r>>8&255,a[c++]=255&r;return 2===h&&(r=i[t.charCodeAt(e)]<<2|i[t.charCodeAt(e+1)]>>4,a[c++]=255&r),1===h&&(r=i[t.charCodeAt(e)]<<10|i[t.charCodeAt(e+1)]<<4|i[t.charCodeAt(e+2)]>>2,a[c++]=r>>8&255,a[c++]=255&r),a},tn.fromByteArray=function(i){for(var n,r=i.length,e=r%3,s=[],u=16383,h=0,a=r-e;ha?a:h+u));return 1===e?(n=i[r-1],s.push(t[n>>2]+t[n<<4&63]+"==")):2===e&&(n=(i[r-2]<<8)+i[r-1],s.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+"=")),s.join("")};for(var t=[],i=[],n=(void 0===I?"undefined":W(I))<"u"?I:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)t[e]=r[e],i[r.charCodeAt(e)]=e;function s(t){var i=t.length;if(i%4>0)throw new y("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=i),[n,n===i?0:4-n%4]}function u(i){return t[i>>18&63]+t[i>>12&63]+t[i>>6&63]+t[63&i]}function o(t,i,n){for(var r,e=[],s=i;s>1,c=-7,f=n?e-1:0,v=n?-1:1,d=t[i+f];for(f+=v,s=d&(1<<-c)-1,d>>=-c,c+=o;c>0;s=256*s+t[i+f],f+=v,c-=8);for(u=s&(1<<-c)-1,s>>=-c,c+=r;c>0;u=256*u+t[i+f],f+=v,c-=8);if(0===s)s=1-a;else{if(s===h)return u?NaN:1/0*(d?-1:1);u+=A.pow(2,r),s-=a}return(d?-1:1)*u*A.pow(2,s-r)},nn.write=function(t,i,n,r,e,s){var u,o,h,a=8*s-e-1,c=(1<>1,v=23===e?A.pow(2,-24)-A.pow(2,-77):0,d=r?0:s-1,l=r?1:-1,g=i<0||0===i&&1/i<0?1:0;for(i=A.abs(i),E(i)||i===1/0?(o=E(i)?1:0,u=c):(u=A.floor(A.log(i)/A.LN2),i*(h=A.pow(2,-u))<1&&(u--,h*=2),(i+=u+f>=1?v/h:v*A.pow(2,1-f))*h>=2&&(u++,h/=2),u+f>=c?(o=0,u=c):u+f>=1?(o=(i*h-1)*A.pow(2,e),u+=f):(o=i*A.pow(2,f-1)*A.pow(2,e),u=0));e>=8;t[n+d]=255&o,d+=l,o/=256,e-=8);for(u=u<0;t[n+d]=255&u,d+=l,u/=256,a-=8);t[n+d-l]|=128*g}),nn),s="function"==typeof i&&"function"==typeof n?n("nodejs.util.inspect.custom"):null;t.Buffer=h,t.SlowBuffer=function(t){return+t!=t&&(t=0),h.alloc(+t)},t.INSPECT_MAX_BYTES=50;var u=2147483647;function o(t){if(t>u)throw new RangeError('The value "'+t+'" is invalid for option "size"');var i=new I(t);return b.setPrototypeOf(i,h.prototype),i}function h(t,i,n){if("number"==typeof t){if("string"==typeof i)throw new _('The "string" argument must be of type string. Received type number');return f(t)}return a(t,i,n)}function a(t,n,r){if("string"==typeof t)return function(t,i){if(("string"!=typeof i||""===i)&&(i="utf8"),!h.isEncoding(i))throw new _("Unknown encoding: "+i);var n=0|g(t,i),r=o(n),e=r.write(t,i);return e!==n&&(r=r.slice(0,e)),r}(t,n);if(ArrayBuffer.isView(t))return function(t){if(et(t,I)){var i=new I(t);return d(i.buffer,i.byteOffset,i.byteLength)}return v(t)}(t);if(null==t)throw new _("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":W(t)));if(et(t,ArrayBuffer)||t&&et(t.buffer,ArrayBuffer)||("undefined"==typeof SharedArrayBuffer?"undefined":W(SharedArrayBuffer))<"u"&&(et(t,SharedArrayBuffer)||t&&et(t.buffer,SharedArrayBuffer)))return d(t,n,r);if("number"==typeof t)throw new _('The "value" argument must not be of type number. Received type number');var e=t.valueOf&&t.valueOf();if(null!=e&&e!==t)return h.from(e,n,r);var s=function(t){if(h.isBuffer(t)){var i=0|l(t.length),n=o(i);return 0===n.length||t.copy(n,0,0,i),n}return void 0!==t.length?"number"!=typeof t.length||st(t.length)?o(0):v(t):"Buffer"===t.type&&Array.isArray(t.data)?v(t.data):void 0}(t);if(s)return s;if((void 0===i?"undefined":W(i))<"u"&&null!=i.toPrimitive&&"function"==typeof t[i.toPrimitive])return h.from(t[i.toPrimitive]("string"),n,r);throw new _("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":W(t)))}function c(t){if("number"!=typeof t)throw new _('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return c(t),o(t<0?0:0|l(t))}function v(t){for(var i=t.length<0?0:0|l(t.length),n=o(i),r=0;r=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return 0|t}function g(t,i){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||et(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new _('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(void 0===t?"undefined":W(t)));var n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var e=!1;;)switch(i){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return it(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return nt(t).length;default:if(e)return r?-1:it(t).length;i=(""+i).toLowerCase(),e=!0}}function w(t,i,n){var r=!1;if((void 0===i||i<0)&&(i=0),i>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0)||(n>>>=0)<=(i>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,i,n);case"utf8":case"utf-8":return x(this,i,n);case"ascii":return O(this,i,n);case"latin1":case"binary":return M(this,i,n);case"base64":return N(this,i,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,i,n);default:if(r)throw new _("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,i,n){var r=t[i];t[i]=t[n],t[n]=r}function p(t,i,n,r,e){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),st(n=+n)&&(n=e?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(e)return-1;n=t.length-1}else if(n<0){if(!e)return-1;n=0}if("string"==typeof i&&(i=h.from(i,r)),h.isBuffer(i))return 0===i.length?-1:k(t,i,n,r,e);if("number"==typeof i)return i&=255,"function"==typeof I.prototype.indexOf?e?I.prototype.indexOf.call(t,i,n):I.prototype.lastIndexOf.call(t,i,n):k(t,[i],n,r,e);throw new _("val must be string, number or Buffer")}function k(t,i,n,r,e){var s,u=1,o=t.length,h=i.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||i.length<2)return-1;u=2,o/=2,h/=2,n/=2}function a(t,i){return 1===u?t[i]:t.readUInt16BE(i*u)}if(e){var c=-1;for(s=n;so&&(n=o-h),s=n;s>=0;s--){for(var f=!0,v=0;ve&&(r=e):r=e;var s,u=i.length;for(r>u/2&&(r=u/2),s=0;s>8,e=n%256,s.push(e),s.push(r);return s}(i,t.length-n),t,n,r)}function N(t,i,n){return 0===i&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(i,n))}function x(t,i,n){n=A.min(t.length,n);for(var r=[],e=i;e239?4:s>223?3:s>191?2:1;if(e+o<=n){var h=void 0,a=void 0,c=void 0,f=void 0;switch(o){case 1:s<128&&(u=s);break;case 2:128==(192&(h=t[e+1]))&&(f=(31&s)<<6|63&h)>127&&(u=f);break;case 3:h=t[e+1],a=t[e+2],128==(192&h)&&128==(192&a)&&(f=(15&s)<<12|(63&h)<<6|63&a)>2047&&(f<55296||f>57343)&&(u=f);break;case 4:h=t[e+1],a=t[e+2],c=t[e+3],128==(192&h)&&128==(192&a)&&128==(192&c)&&(f=(15&s)<<18|(63&h)<<12|(63&a)<<6|63&c)>65535&&f<1114112&&(u=f)}}null===u?(u=65533,o=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),e+=o}return function(t){var i=t.length;if(i<=B)return String.fromCharCode.apply(String,t);for(var n="",r=0;rr.length?(h.isBuffer(s)||(s=h.from(s)),s.copy(r,e)):I.prototype.set.call(r,s,e);else{if(!h.isBuffer(s))throw new _('"list" argument must be an Array of Buffers');s.copy(r,e)}e+=s.length}return r},h.byteLength=g,h.prototype.mv=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;in&&(i+=" ... "),""},s&&(h.prototype[s]=h.prototype.inspect),h.prototype.compare=function(t,i,n,r,e){if(et(t,I)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw new _('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(void 0===t?"undefined":W(t)));if(void 0===i&&(i=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===e&&(e=this.length),i<0||n>t.length||r<0||e>this.length)throw new RangeError("out of range index");if(r>=e&&i>=n)return 0;if(r>=e)return-1;if(i>=n)return 1;if(this===t)return 0;for(var s=(e>>>=0)-(r>>>=0),u=(n>>>=0)-(i>>>=0),o=A.min(s,u),a=this.slice(r,e),c=t.slice(i,n),f=0;f>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var e=this.length-i;if((void 0===n||n>e)&&(n=e),t.length>0&&(n<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return S(this,t,i,n);case"utf8":case"utf-8":return R(this,t,i,n);case"ascii":case"latin1":case"binary":return C(this,t,i,n);case"base64":return P(this,t,i,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,i,n);default:if(s)throw new _("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this.yv||this,0)}};var B=4096;function O(t,i,n){var r="";n=A.min(t.length,n);for(var e=i;er)&&(n=r);for(var e="",s=i;sn)throw new RangeError("Trying to access beyond buffer length")}function V(t,i,n,r,e,s){if(!h.isBuffer(t))throw new _('"buffer" argument must be a Buffer instance');if(i>e||it.length)throw new RangeError("Index out of range")}function H(t,i,n,r,e){K(i,r,e,t,n,7);var s=Number(i&BigInt(4294967295));t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s;var u=Number(i>>BigInt(32)&BigInt(4294967295));return t[n++]=u,u>>=8,t[n++]=u,u>>=8,t[n++]=u,u>>=8,t[n++]=u,n}function z(t,i,n,r,e){K(i,r,e,t,n,7);var s=Number(i&BigInt(4294967295));t[n+7]=s,s>>=8,t[n+6]=s,s>>=8,t[n+5]=s,s>>=8,t[n+4]=s;var u=Number(i>>BigInt(32)&BigInt(4294967295));return t[n+3]=u,u>>=8,t[n+2]=u,u>>=8,t[n+1]=u,u>>=8,t[n]=u,n+8}function q(t,i,n,r,e,s){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function X(t,i,n,r,s){return i=+i,n>>>=0,s||q(t,0,n,4),e.write(t,i,n,r,23,4),n+4}function G(t,i,n,r,s){return i=+i,n>>>=0,s||q(t,0,n,8),e.write(t,i,n,r,52,8),n+8}h.prototype.slice=function(t,i){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(i=void 0===i?n:~~i)<0?(i+=n)<0&&(i=0):i>n&&(i=n),i>>=0,i>>>=0,n||U(t,i,this.length);for(var r=this[t],e=1,s=0;++s>>=0,i>>>=0,n||U(t,i,this.length);for(var r=this[t+--i],e=1;i>0&&(e*=256);)r+=this[t+--i]*e;return r},h.prototype.readUint8=h.prototype.readUInt8=function(t,i){return t>>>=0,i||U(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,i){return t>>>=0,i||U(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,i){return t>>>=0,i||U(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,i){return t>>>=0,i||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,i){return t>>>=0,i||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readBigUInt64LE=ot(function(t){J(t>>>=0,"offset");var i=this[t],n=this[t+7];(void 0===i||void 0===n)&&Z(t,this.length-8);var r=i+this[++t]*A.pow(2,8)+this[++t]*A.pow(2,16)+this[++t]*A.pow(2,24),e=this[++t]+this[++t]*A.pow(2,8)+this[++t]*A.pow(2,16)+n*A.pow(2,24);return BigInt(r)+(BigInt(e)<>>=0,"offset");var i=this[t],n=this[t+7];(void 0===i||void 0===n)&&Z(t,this.length-8);var r=i*A.pow(2,24)+this[++t]*A.pow(2,16)+this[++t]*A.pow(2,8)+this[++t],e=this[++t]*A.pow(2,24)+this[++t]*A.pow(2,16)+this[++t]*A.pow(2,8)+n;return(BigInt(r)<>>=0,i>>>=0,n||U(t,i,this.length);for(var r=this[t],e=1,s=0;++s=(e*=128)&&(r-=A.pow(2,8*i)),r},h.prototype.readIntBE=function(t,i,n){t>>>=0,i>>>=0,n||U(t,i,this.length);for(var r=i,e=1,s=this[t+--r];r>0&&(e*=256);)s+=this[t+--r]*e;return s>=(e*=128)&&(s-=A.pow(2,8*i)),s},h.prototype.readInt8=function(t,i){return t>>>=0,i||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,i){t>>>=0,i||U(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt16BE=function(t,i){t>>>=0,i||U(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt32LE=function(t,i){return t>>>=0,i||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,i){return t>>>=0,i||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readBigInt64LE=ot(function(t){J(t>>>=0,"offset");var i=this[t],n=this[t+7];(void 0===i||void 0===n)&&Z(t,this.length-8);var r=this[t+4]+this[t+5]*A.pow(2,8)+this[t+6]*A.pow(2,16)+(n<<24);return(BigInt(r)<>>=0,"offset");var i=this[t],n=this[t+7];(void 0===i||void 0===n)&&Z(t,this.length-8);var r=(i<<24)+this[++t]*A.pow(2,16)+this[++t]*A.pow(2,8)+this[++t];return(BigInt(r)<>>=0,i||U(t,4,this.length),e.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,i){return t>>>=0,i||U(t,4,this.length),e.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,i){return t>>>=0,i||U(t,8,this.length),e.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,i){return t>>>=0,i||U(t,8,this.length),e.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,i,n,r){t=+t,i>>>=0,n>>>=0,r||V(this,t,i,n,A.pow(2,8*n)-1,0);var e=1,s=0;for(this[i]=255&t;++s>>=0,n>>>=0,r||V(this,t,i,n,A.pow(2,8*n)-1,0);var e=n-1,s=1;for(this[i+e]=255&t;--e>=0&&(s*=256);)this[i+e]=t/s&255;return i+n},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,1,255,0),this[i]=255&t,i+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,2,65535,0),this[i]=255&t,this[i+1]=t>>>8,i+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,2,65535,0),this[i]=t>>>8,this[i+1]=255&t,i+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,4,4294967295,0),this[i+3]=t>>>24,this[i+2]=t>>>16,this[i+1]=t>>>8,this[i]=255&t,i+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,4,4294967295,0),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=255&t,i+4},h.prototype.writeBigUInt64LE=ot(function(t,i){return void 0===i&&(i=0),H(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=ot(function(t,i){return void 0===i&&(i=0),z(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(t,i,n,r){if(t=+t,i>>>=0,!r){var e=A.pow(2,8*n-1);V(this,t,i,n,e-1,-e)}var s=0,u=1,o=0;for(this[i]=255&t;++s>>=0,!r){var e=A.pow(2,8*n-1);V(this,t,i,n,e-1,-e)}var s=n-1,u=1,o=0;for(this[i+s]=255&t;--s>=0&&(u*=256);)t<0&&0===o&&0!==this[i+s+1]&&(o=1),this[i+s]=(t/u|0)-o&255;return i+n},h.prototype.writeInt8=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,1,127,-128),t<0&&(t=255+t+1),this[i]=255&t,i+1},h.prototype.writeInt16LE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,2,32767,-32768),this[i]=255&t,this[i+1]=t>>>8,i+2},h.prototype.writeInt16BE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,2,32767,-32768),this[i]=t>>>8,this[i+1]=255&t,i+2},h.prototype.writeInt32LE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,4,2147483647,-2147483648),this[i]=255&t,this[i+1]=t>>>8,this[i+2]=t>>>16,this[i+3]=t>>>24,i+4},h.prototype.writeInt32BE=function(t,i,n){return t=+t,i>>>=0,n||V(this,t,i,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=255&t,i+4},h.prototype.writeBigInt64LE=ot(function(t,i){return void 0===i&&(i=0),H(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=ot(function(t,i){return void 0===i&&(i=0),z(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeFloatLE=function(t,i,n){return X(this,t,i,!0,n)},h.prototype.writeFloatBE=function(t,i,n){return X(this,t,i,!1,n)},h.prototype.writeDoubleLE=function(t,i,n){return G(this,t,i,!0,n)},h.prototype.writeDoubleBE=function(t,i,n){return G(this,t,i,!1,n)},h.prototype.copy=function(t,i,n,r){if(!h.isBuffer(t))throw new _("argument should be a Buffer");if(n||(n=0),!r&&0!==r&&(r=this.length),i>=t.length&&(i=t.length),i||(i=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=i;s=r+4;n-=3)i="_".concat(t.slice(n-3,n)).concat(i);return"".concat(t.slice(0,n)).concat(i)}function K(t,i,n,r,e,s){if(t>n||t= 0".concat(o," and < 2").concat(o," ** ").concat(8*(s+1)).concat(o):">= -(2".concat(o," ** ").concat(8*(s+1)-1).concat(o,") and < 2 ** ")+"".concat(8*(s+1)-1).concat(o),new Q.ERR_OUT_OF_RANGE("value",u,t)}!function(t,i,n){J(i,"offset"),(void 0===t[i]||void 0===t[i+n])&&Z(i,t.length-(n+1))}(r,e,s)}function J(t,i){if("number"!=typeof t)throw new Q.ERR_INVALID_ARG_TYPE(i,"number",t)}function Z(t,i,n){throw A.floor(t)!==t?(J(t,n),new Q.ERR_OUT_OF_RANGE("offset","an integer",t)):i<0?new Q.ERR_BUFFER_OUT_OF_BOUNDS:new Q.ERR_OUT_OF_RANGE("offset",">= 0 and <= ".concat(i),t)}Y("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Y("ERR_INVALID_ARG_TYPE",function(t,i){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(void 0===i?"undefined":W(i))},_),Y("ERR_OUT_OF_RANGE",function(t,i,n){var r='The value of "'.concat(t,'" is out of range.'),e=n;return Number.isInteger(n)&&A.abs(n)>A.pow(2,32)?e=$(String(n)):"bigint"==(void 0===n?"undefined":W(n))&&(e=String(n),(n>A.pow(BigInt(2),BigInt(32))||n<-A.pow(BigInt(2),BigInt(32)))&&(e=$(e)),e+="n"),r+=" It must be ".concat(i,". Received ").concat(e)},RangeError);var tt=/[^+/0-9A-Za-z-_]/g;function it(t,i){var n;i=i||1/0;for(var r=t.length,e=null,s=[],u=0;u55295&&n<57344){if(!e){if(n>56319){(i-=3)>-1&&s.push(239,191,189);continue}if(u+1===r){(i-=3)>-1&&s.push(239,191,189);continue}e=n;continue}if(n<56320){(i-=3)>-1&&s.push(239,191,189),e=n;continue}n=65536+(e-55296<<10|n-56320)}else e&&(i-=3)>-1&&s.push(239,191,189);if(e=null,n<128){if((i-=1)<0)break;s.push(n)}else if(n<2048){if((i-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((i-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new y("Invalid code point");if((i-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function nt(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(tt,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function rt(t,i,n,r){var e;for(e=0;e=i.length||e>=t.length);++e)i[e+n]=t[e];return e}function et(t,i){return j(t,i)||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===i.name}function st(t){return t!=t}var ut=function(){for(var t="0123456789abcdef",i=new Array(256),n=0;n<16;++n)for(var r=16*n,e=0;e<16;++e)i[r+e]=t[n]+t[e];return i}();function ot(t){return("undefined"==typeof BigInt?"undefined":W(BigInt))>"u"?ht:t}function ht(){throw new y("BigInt not supported")}}(Zi)),Zi}function en(){if(ki)return Ki.exports;ki=1;var t=65536,i=(_i||(_i=1,function(t,i){var n=rn(),r=n.Buffer;function e(t,i){for(var n in t)i[n]=t[n]}function s(t,i,n){return r(t,i,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(e(n,i),i.Buffer=s),s.prototype=b.create(r.prototype),e(r,s),s.from=function(t,i,n){if("number"==typeof t)throw new _("Argument must not be a number");return r(t,i,n)},s.alloc=function(t,i,n){if("number"!=typeof t)throw new _("Argument must be a number");var e=r(t);return void 0!==i?"string"==typeof n?e.fill(i,n):e.fill(i):e.fill(0),e},s.allocUnsafe=function(t){if("number"!=typeof t)throw new _("Argument must be a number");return r(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new _("Argument must be a number");return n.SlowBuffer(t)}}(Ji,Ji.exports)),Ji.exports).Buffer,n=S.crypto||S.msCrypto;return n&&n.getRandomValues?Ki.exports=function(r,e){if(r>4294967295)throw new RangeError("requested too many random bytes");var s=i.allocUnsafe(r);if(r>0)if(r>t)for(var u=0;u0&&(o.bandwidth.push({type:"AS",limit:u.getBitrate()}),o.bandwidth.push({type:"TIAS",limit:1e3*u.getBitrate()}));for(var h,v=Ft(this.getCandidates());!(h=v()).done;){var d=h.value;o.candidates.push({foundation:d.getFoundation(),component:d.getComponentId(),transport:d.getTransport(),priority:d.getPriority(),ip:d.getAddress(),port:d.getPort(),type:d.getType(),raddr:d.getRelAddr(),rport:d.getRelPort()})}if(this.getICE()&&(o.iceUfrag=this.getICE().getUfrag(),o.icePwd=this.getICE().getPwd()),i("audio",u.getType())||i("video",u.getType())){o.rtcpMux="rtcp-mux",o.rtcpRsize="rtcp-rsize",this.getDTLS()?(o.protocol="UDP/TLS/RTP/SAVPF",o.fingerprint={type:this.getDTLS().getHash(),hash:this.getDTLS().getFingerprint()},o.setup=a.toString(this.getDTLS().getSetup())):this.getCrypto()?(o.protocol="RTP/SAVPF",o.crypto=[{id:this.getCrypto().getTag(),suite:this.getCrypto().getSuite(),config:this.getCrypto().getKeyParams()}]):o.protocol="RTP/AVP";for(var l,g=Ft(u.getCodecs().values());!(l=g()).done;){var w=l.value;i("video",u.getType())?o.rtp.push({payload:w.getType(),codec:w.getCodec().toUpperCase(),rate:9e4}):i("opus",w.getCodec())||i("multiopus",w.getCodec())?o.rtp.push({payload:w.getType(),codec:w.getCodec(),rate:48e3,encoding:w.getChannels()}):o.rtp.push({payload:w.getType(),codec:w.getCodec(),rate:8e3});for(var m,p=Ft(w.getRTCPFeedbacks());!(m=p()).done;){var y=m.value;o.rtcpFb.push({payload:w.getType(),type:y.getId(),subtype:y.getParams().join(" ")})}w.hasRTX()&&(o.rtp.push({payload:w.getRTX(),codec:"rtx",rate:9e4}),o.fmtp.push({payload:w.getRTX(),config:"apt="+w.getType()}));var _=w.getParams();if(b.keys(_).length){var k={payload:w.getType(),config:""};for(var A in _)k.config.length&&(k.config+=";"),b.hasOwnProperty.call(_,A)?k.config+=A+"="+_[A]:k.config+=A;o.fmtp.push(k)}}for(var T,S=[],E=Ft(o.rtp);!(T=E()).done;){var I=T.value;S.push(I.payload)}o.payloads=S.join(" ");for(var R,C=Ft(u.getExtensions().entries());!(R=C()).done;){var P=R.value,D=P[0],N=P[1];o.ext.push({value:D,uri:N})}for(var x,B=Ft(u.getRIDs().values());!(x=B()).done;){var O=x.value,M={id:O.getId(),direction:f.toString(O.getDirection()),params:""};O.getFormats().length&&(M.params="pt="+O.getFormats().join(","));for(var L,F=Ft(O.getParams().entries());!(L=F()).done;){var U=L.value,V=U[0],j=U[1];M.params+=(M.params.length?";":"")+V+"="+j}o.rids.push(M)}var H=u.getSimulcast();if(H){var W=1;o.simulcast={};var z=H.getSimulcastStreams(f.SEND),q=H.getSimulcastStreams(f.RECV);if(z&&z.length){for(var X,G="",Q=Ft(z);!(X=Q()).done;){for(var Y,$="",K=Ft(X.value);!(Y=K()).done;){var J=Y.value;$+=($.length?",":"")+(J.isPaused()?"~":"")+J.getId()}G+=(G.length?";":"")+$}o.simulcast["dir"+W]="send",o.simulcast["list"+W]=G,W++}if(q&&q.length){for(var Z,tt="",it=Ft(q);!(Z=it()).done;){for(var nt,rt="",et=Ft(Z.value);!(nt=et()).done;){var st=nt.value;rt+=(rt.length?",":"")+(st.isPaused()?"~":"")+st.getId()}tt+=(tt.length?";":"")+rt}o.simulcast["dir"+W]="recv",o.simulcast["list"+W]=tt,W++}}}else if(u.hasDataChannel()){o.protocol="UDP/DTLS/SCTP",o.payloads="webrtc-datachannel";var ut=u.getDataChannel();o.sctpPort=ut.getPort(),o.maxMessageSize=ut.getMaxMessageSize()}n.media.push(o)}for(var ot,ht=Ft(this.streams.values());!(ot=ht()).done;)for(var at,ct=ot.value,ft=Ft(ct.getTracks().values());!(at=ft()).done;){var vt=at.value;for(var dt in n.media){var lt=n.media[dt];if(vt.getMediaId()){if(vt.getMediaId()==lt.mid){var gt=vt.getSourceGroups();for(var wt in gt){var mt=gt[wt];lt.ssrcGroups.push({semantics:mt.getSemantics(),ssrcs:mt.getSSRCs().join(" ")})}var pt=vt.getSSRCs();for(var yt in pt)lt.ssrcs.push({id:pt[yt],attribute:"cname",value:ct.getId()}),lt.ssrcs.push({id:pt[yt],attribute:"msid",value:ct.getId()+" "+vt.getId()});lt.msid=ct.getId()+" "+vt.getId();break}}else if(i(lt.type,vt.getMedia())){var _t=vt.getSourceGroups();for(var kt in _t){var bt=_t[kt];lt.ssrcGroups.push({semantics:bt.getSemantics(),ssrcs:bt.getSSRCs().join(" ")})}var At=vt.getSSRCs();for(var Tt in At)lt.ssrcs.push({id:At[Tt],attribute:"cname",value:ct.getId()}),lt.ssrcs.push({id:At[Tt],attribute:"msid",value:ct.getId()+" "+vt.getId()});break}}}var St={type:"BUNDLE",mids:e.join(" ")};return n.groups.push(St),t.write(n)},e.toIceFragmentString=function(){var i={version:0,media:[],candidates:[]};this.hasICE()&&this.getICE().isLite()&&(i.icelite="ice-lite"),this.getICE()&&(i.iceUfrag=this.getICE().getUfrag(),i.icePwd=this.getICE().getPwd());for(var n,r=Ft(this.getCandidates());!(n=r()).done;){var e=n.value;i.candidates.push({foundation:e.getFoundation(),component:e.getComponentId(),transport:e.getTransport(),priority:e.getPriority(),ip:e.getAddress(),port:e.getPort(),type:e.getType(),raddr:e.getRelAddr(),rport:e.getRelPort()})}return t.write(i).slice(10)},r}();return k.create=function(t){var i,r=new k;if(t.streams)for(var e,a=Ft(t.streams);!(e=a()).done;){var c=e.value;r.addStream(l.expand(c))}t.ice&&(j(t.ice,o)?r.setICE(t.ice.clone()):r.setICE(o.expand(t.ice))),t.dtls&&(j(t.dtls,s)?r.setDTLS(t.dtls):r.setDTLS(s.expand(t.dtls))),t.crypto&&(j(t.crypto,u)?r.setCrypto(t.crypto):r.setCrypto(u.expand(t.crypto)));for(var f,v=Ft(t.candidates||[]);!(f=v()).done;){var d=f.value;j(d,n)?r.addCandidate(d.clone()):r.addCandidate(n.expand(d))}for(var g,w=96,m=1,p=0,y=Ft(b.entries(t.capabilities||{}));!(g=y()).done;){var _=g.value,A=_[0],T=_[1];if(t.unified&&null!==(i=t.streams)&&void 0!==i&&i.length)for(var S,E=Ft(r.getTracksByMediaType(A));!(S=E()).done;){for(var I,R=S.value,C=h.create(R.getMediaId(),A,T),P=Ft(C.getCodecs());!(I=P()).done;){var D=I.value,N=(D[0],D[1]);N.getType()>=96&&N.setType(w++),N.getRTX()&&N.setRTX(w++)}if(T.extensions)for(var x,B=Ft(T.extensions);!(x=B()).done;){var O=x.value;15===m&&m++,C.addExtension(m++,O)}r.addMedia(C)}else{for(var M,L=h.create(t.unified?String(p++):A,A,T),F=Ft(L.getCodecs());!(M=F()).done;){var U=M.value,V=(U[0],U[1]);V.getType()>=96&&V.setType(w++),V.getRTX()&&V.setRTX(w++)}if(T.extensions)for(var H,W=Ft(T.extensions);!(H=W()).done;){var z=H.value;15===m&&m++,L.addExtension(m++,z)}r.addMedia(L)}}return r},k.expand=function(t){if("SDPInfo"===t.constructor.name)return t;for(var i,r=new k(t.version),e=Ft(t.medias||[]);!(i=e()).done;){var a=i.value,c=h.expand(a);c&&r.addMedia(c)}for(var f,v=Ft(t.streams||[]);!(f=v()).done;){var d=f.value,g=l.expand(d);g&&r.addStream(g)}for(var w,m=Ft(t.candidates||[]);!(w=m()).done;){var p=w.value,y=n.expand(p);y&&r.addCandidate(y)}return t.ice&&r.setICE(o.expand(t.ice)),t.dtls&&r.setDTLS(s.expand(t.dtls)),t.crypto&&r.setCrypto(u.expand(t.crypto)),t.extmapAllowMixedNotSupported&&(this.extmapAllowMixed=!t.extmapAllowMixedNotSupported),r},k.clone=function(t){return"SDPInfo"===t.constructor.name?t.clone():k.expand(t)},k.process=function(t){return k.parse(t)},k.parse=function(b){var A=t.parse(b),S=new k;if(S.setVersion(A.version),A.iceUfrag&&A.icePwd){var E=String(A.iceUfrag),I=String(A.icePwd),R=new o(E,I);R.setLite("ice-lite"==A.icelite),R.setEndOfCandidates("end-of-candidates"==A.endOfCandidates),S.setICE(R)}for(var C in A.media){var P=A.media[C],D=P.type,N=P.mid?P.mid.toString():C,x=new h(N,D);if(P.iceUfrag&&P.icePwd){var B=String(P.iceUfrag),O=String(P.icePwd),M=new o(B,O);M.setLite("ice-lite"==A.icelite),M.setEndOfCandidates("end-of-candidates"==P.endOfCandidates),S.setICE(M)}for(var L=0;P.candidates&&L1&&st.setChannels(Q.encoding),x.addCodec(st)}}}for(var ut,ot=Ft(X.entries());!(ut=ot()).done;){var ht=ut.value,at=x.getCodecForType(ht[0]);at&&at.setRTX(ht[1])}for(var ct=0;P.rtcpFb&&ct0?2===h.length?W(h[1])==e?this[h[0]]=h[1].call(this,c):this[h[0]]=h[1]:3===h.length?W(h[1])!==e||h[1].exec&&h[1].test?this[h[0]]=c?c.replace(h[1],h[2]):r:this[h[0]]=c?h[1].call(this,c,h[2]):r:4===h.length&&(this[h[0]]=c?h[3].call(this,c.replace(h[1],h[2])):r):this[h]=c||r;f+=2}},$=function(t,i){for(var n in i)if(W(i[n])===u&&i[n].length>0){for(var e=0;e2&&(t[a]="iPad",t[f]=m),t},this.getEngine=function(){var t={};return t[c]=r,t[d]=r,Y.call(t,p,_.engine),t},this.getOS=function(){var t={};return t[c]=r,t[d]=r,Y.call(t,p,_.os),k&&!t[c]&&y&&y.platform&&"Unknown"!=y.platform&&(t[c]=y.platform.replace(/chrome os/i,V).replace(/macos/i,H)),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return p},this.setUA=function(t){return p=(void 0===t?"undefined":W(t))===o&&t.length>500?Q(t,500):t,this},this.setUA(p),this};Z.VERSION="0.7.39",Z.BROWSER=q([c,d,h]),Z.CPU=q([l]),Z.DEVICE=q([a,v,f,g,w,p,m,y,_]),Z.ENGINE=Z.OS=q([c,d]),t.exports&&(i=t.exports=Z),i.UAParser=Z;var tt=(void 0===n?"undefined":W(n))!==s&&(n.jQuery||n.Zepto);if(tt&&!tt.ua){var it=new Z;tt.ua=it.getResult(),tt.ua.get=function(){return it.getUA()},tt.ua.set=function(t){it.setUA(t);var i=it.getResult();for(var n in i)tt.ua[n]=i[n]}}}("object"==(void 0===f?"undefined":W(f))?f:bn)}(kn,kn.exports)),kn.exports),Tn=C(An),Sn=["iOS"],En=function(t){function i(){return t.call(this,f.navigator.userAgent)||this}Pt(i,t);var n=i.prototype;return n.isChromium=function(){return this.getUA().match(/Chrome/i)},n.isChrome=function(){var t=this.getBrowser();if(!t.name)return!1;var i,n=this.getOS();return i=!new RegExp(Sn.join("|"),"i").test(n.name),t.name.match(/Chrome/i)&&i},n.isFirefox=function(){var t=this.getBrowser();return!!t.name&&t.name.match(/Firefox/i)},n.isOpera=function(){var t=this.getBrowser();return!!t.name&&t.name.match(/Opera/i)},n.isSafari=function(){var t=this.getBrowser();return!!t.name&&t.name.match(/Safari/i)},i}(Tn),In=wt.get("SdpParser"),Rn=Array.from({length:31},function(t,i){return i+35}),Cn=Array.from({length:32},function(t,i){return i+96}),Pn=Array.from({length:14},function(t,i){return i+1}),Dn=Array.from({length:240},function(t,i){return i+16}),Nn={setSimulcast:function(t,i){if(In.info("Setting simulcast. Codec: ",i),!(new En).isChromium())return In.warn("Your browser does not appear to support Simulcast. For a better experience, use a Chromium based browser."),t;if("h264"!==i&&"vp8"!==i)return In.warn("Your selected codec ".concat(i," does not appear to support Simulcast. To broadcast using simulcast, please use H.264 or VP8.")),t;if(!/m=video/.test(t))return In.warn("There is no available video for simulcast to be enabled."),t;try{for(var n=new RegExp("m=video.*?a=ssrc:(\\d*) cname:(.+?)\\r\\n","s"),r=new RegExp("m=video.*?a=ssrc:(\\d*) msid:(.+?)\\r\\n","s"),e=n.exec(t),s=e[1],u=e[2],o=r.exec(t)[2],h=[s],a=0;a<2;++a){var c=100+2*a,f=c+1;h.push(c),t+="a=ssrc-group:FID "+c+" "+f+"\r\na=ssrc:"+c+" cname:"+u+"\r\na=ssrc:"+c+" msid:"+o+"\r\na=ssrc:"+f+" cname:"+u+"\r\na=ssrc:"+f+" msid:"+o+"\r\n"}return t+="a=ssrc-group:SIM "+h.join(" ")+"\r\n",In.info("Simulcast setted"),In.debug("Simulcast SDP: ",t),t}catch(t){throw In.error("Error setting SDP for simulcast: ",t),t}},setStereo:function(t){return In.info("Replacing SDP response for support stereo"),t=t.replace(/useinbandfec=1/g,"useinbandfec=1; stereo=1"),In.info("Replaced SDP response for support stereo"),In.debug("New SDP value: ",t),t},setDTX:function(t){return In.info("Replacing SDP response for support dtx"),t=t.replace("useinbandfec=1","useinbandfec=1; usedtx=1"),In.info("Replaced SDP response for support dtx"),In.debug("New SDP value: ",t),t},setAbsoluteCaptureTime:function(t){var i="a=extmap:"+Nn.getAvailableHeaderExtensionIdRange(t)[0]+" http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time\r\n";return t=t.replace(/(m=.*\r\n(?:.*\r\n)*?)(a=extmap.*\r\n)/gm,function(t,n,r){return n+i+r}),In.info("Replaced SDP response for setting absolute capture time"),In.debug("New SDP value: ",t),t},setDependencyDescriptor:function(t){var i="a=extmap:"+Nn.getAvailableHeaderExtensionIdRange(t)[0]+" https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension\r\n";return t=t.replace(/(m=.*\r\n(?:.*\r\n)*?)(a=extmap.*\r\n)/gm,function(t,n,r){return n+i+r}),In.info("Replaced SDP response for setting depency descriptor"),In.debug("New SDP value: ",t),t},setVideoBitrate:function(t,i){if(i<1)In.info("Remove bitrate restrictions"),t=t.replace(/b=AS:.*\r\n/,"").replace(/b=TIAS:.*\r\n/,"");else{var n=_n.SDPInfo.parse(t),r=n.getMedia("video");In.info("Setting video bitrate"),r.setBitrate(i),t=n.toString()}return t},removeSdpLine:function(t,i){return In.debug("SDP before trimming: ",t),t=t.split("\n").filter(function(t){return t.trim()!==i}).join("\n"),In.debug("SDP trimmed result: ",t),t},adaptCodecName:function(t,i,n){if(!t)return t;var r=new RegExp("".concat(i),"i");return t.replace(r,n)},setMultiopus:function(t,i){if(!(new En).isFirefox()&&(!i||xn(i)))if(t.includes("multiopus/48000/6"))In.info("Multiopus already setted");else{In.info("Setting multiopus");var n=/m=audio 9 UDP\/TLS\/RTP\/SAVPF (.*)\r\n/.exec(t)[0],r=Nn.getAvailablePayloadTypeRange(t)[0],e=n.replace("\r\n"," ")+r+"\r\na=rtpmap:"+r+" multiopus/48000/6\r\na=fmtp:"+r+" channel_mapping=0,4,1,2,3,5;coupled_streams=2;minptime=10;num_streams=4;useinbandfec=1\r\n";t=t.replace(n,e),In.info("Multiopus offer created"),In.debug("SDP parsed for multioups: ",t)}return t},getAvailablePayloadTypeRange:function(t){for(var i,n=function(){var t=i.value[1].split(" ").map(function(t){return T(t)});e=e.filter(function(i){return!t.includes(i)})},r=t.matchAll(/m=(?:.*) (?:.*) UDP\/TLS\/RTP\/SAVPF (.*)\r\n/gm),e=Cn.concat(Rn),s=Ft(r);!(i=s()).done;)n();return e},getAvailableHeaderExtensionIdRange:function(t){for(var i,n=function(){var t=i.value[1].split(" ").map(function(t){return T(t)});e=e.filter(function(i){return!t.includes(i)})},r=t.matchAll(/a=extmap:(\d+)(?:.*)\r\n/gm),e=Pn.concat(Dn),s=Ft(r);!(i=s()).done;)n();return e},renegotiate:function(t,i){for(var n,r=_n.SDPInfo.parse(t),e=_n.SDPInfo.parse(i),s=Ft(r.getMedias());!(n=s()).done;){var u=n.value,o=e.getMediaById(u.getId());if(!o){(o=new _n.MediaInfo(u.getId(),u.getType())).setDirection(_n.Direction.reverse(u.getDirection()));var h=e.getMedia(u.getType());if(h){o.setCodecs(h.getCodecs());for(var a,c=Ft(h.getExtensions());!(a=c()).done;){var f=a.value,v=f[0],d=f[1];o.addExtension(v,d)}}e.addMedia(o)}}return e.toString()},updateMissingVideoExtensions:function(t,i){var n,r=_n.SDPInfo.parse(t),e=null==(n=_n.SDPInfo.parse(i).getMediasByType("video")[0])?void 0:n.getExtensions();if(e||e.length){for(var s,u=function(){var i=s.value,n=i.getExtensions();e.forEach(function(r,e){if(!n.get(e)){var s=i.getId(),u="a=extmap:"+e+" "+r+"\r\n",o=new RegExp("(a=mid:"+s+"\r\n(?:.*\r\n)*?)","g");t=t.replace(o,function(t,i,n){return i+u})}})},o=Ft(r.getMediasByType("video"));!(s=o()).done;)u();return t}},getCodecPayloadType:function(t){for(var i,n={},r=Ft(t.matchAll(/a=rtpmap:(\d+) (\w+)\/\d+/g));!(i=r()).done;){var e=i.value;n[e[1]]=e[2]}return n}},xn=function(t){return t.getAudioTracks().some(function(t){return t.getSettings().channelCount>2})},Bn={VP8:"vp8",VP9:"vp9",H264:"h264",AV1:"av1",H265:"h265"},On={OPUS:"opus",MULTIOPUS:"multiopus"},Mn=wt.get("PeerConnection"),Ln="Publisher",Fn="Viewer",Un={track:"track",connectionStateChange:"connectionStateChange"},Vn={stereo:!1,mediaStream:null,codec:"h264",simulcast:!1,scalabilityMode:null,disableAudio:!1,disableVideo:!1,setSDPToPeer:!0},jn=function(t){function i(){var i;return(i=t.call(this)||this).mode=null,i.sessionDescription=null,i.peer=null,i.peerConnectionStats=null,i.transceiverMap=new Map,i}Pt(i,t);var n=i.prototype;return n.createRTCPeer=function(){return jt(function(t,i){return zt(this,function(n){return void 0===t&&(t={autoInitStats:!0,statsIntervalMs:1e3}),void 0===i&&(i=Fn),Mn.info("Creating new RTCPeerConnection"),Mn.debug("RTC configuration provided by user: ",t),this.peer=zn(this,t),this.mode=i,t.autoInitStats&&this.initStats(t),[2]})}).apply(this,arguments)},n.getRTCPeer=function(){return Mn.info("Getting RTC Peer"),this.peer},n.closeRTCPeer=function(){return jt(function(){var t;return zt(this,function(i){return Mn.info("Closing RTCPeerConnection"),null==(t=this.peer)||t.close(),this.peer=null,this.stopStats(),this.emit(Un.connectionStateChange,"closed"),[2]})}).call(this)},n.setRTCRemoteSDP=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:Mn.info("Setting RTC Remote SDP"),i={type:"answer",sdp:t},r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.peer.setRemoteDescription(i)];case 2:return r.sent(),Mn.info("RTC Remote SDP was set successfully."),Mn.debug("RTC Remote SDP new value: ",t),[3,4];case 3:throw n=r.sent(),Mn.error("Error while setting RTC Remote SDP: ",n),n;case 4:return[2]}})}).call(this)},n.getRTCLocalSDP=function(){return jt(function(t){var i,n;return zt(this,function(r){switch(r.label){case 0:return void 0===t&&(t=Vn),Mn.info("Getting RTC Local SDP"),t=d(d({},Vn),t),Mn.debug("Options: ",t),(i=Wn(t.mediaStream))?$n(this.peer,i,t):Kn(this.peer,t),Mn.info("Creating peer offer"),[4,this.peer.createOffer()];case 1:return n=r.sent(),Mn.info("Peer offer created"),Mn.debug("Peer offer response: ",n.sdp),this.sessionDescription=n,t.disableAudio||(t.stereo&&(this.sessionDescription.sdp=Nn.setStereo(this.sessionDescription.sdp)),t.dtx&&(this.sessionDescription.sdp=Nn.setDTX(this.sessionDescription.sdp)),this.sessionDescription.sdp=Nn.setMultiopus(this.sessionDescription.sdp,i)),!t.disableVideo&&t.simulcast&&(this.sessionDescription.sdp=Nn.setSimulcast(this.sessionDescription.sdp,t.codec)),t.absCaptureTime&&(this.sessionDescription.sdp=Nn.setAbsoluteCaptureTime(this.sessionDescription.sdp)),t.dependencyDescriptor&&(this.sessionDescription.sdp=Nn.setDependencyDescriptor(this.sessionDescription.sdp)),t.setSDPToPeer?[4,this.peer.setLocalDescription(this.sessionDescription)]:[3,3];case 2:r.sent(),Mn.info("Peer local description set"),r.label=3;case 3:return[2,this.sessionDescription.sdp]}})}).apply(this,arguments)},n.addRemoteTrack=function(t,i){return jt(function(){var n;return zt(this,function(r){return n=this,[2,new ot(function(r,e){try{var s=n.peer.addTransceiver(t,{direction:"recvonly",streams:i});n.transceiverMap.set(s,r)}catch(t){e(t)}})]})}).call(this)},n.updateBandwidthRestriction=function(t,i){if(this.mode===Fn)throw Mn.error("Viewer attempting to update bitrate, this is not allowed"),new y("It is not possible for a viewer to update the bitrate.");return Mn.info("Updating bandwidth restriction, bitrate value: ",i),Mn.debug("SDP value: ",t),Nn.setVideoBitrate(t,i)},n.updateBitrate=function(t){return void 0===t&&(t=0),jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(this.mode===Fn)throw Mn.error("Viewer attempting to update bitrate, this is not allowed"),new y("It is not possible for a viewer to update the bitrate.");if(!this.peer)throw Mn.error("Cannot update bitrate. No peer found."),new y("Cannot update bitrate. No peer found.");return Mn.info("Updating bitrate to value: ",t),i=this,[4,this.peer.createOffer()];case 1:return i.sessionDescription=r.sent(),[4,this.peer.setLocalDescription(this.sessionDescription)];case 2:return r.sent(),n=this.updateBandwidthRestriction(this.peer.remoteDescription.sdp,t),[4,this.setRTCRemoteSDP(n)];case 3:return r.sent(),Mn.info("Bitrate restrictions updated: ","".concat(t>0?t:"unlimited"," kbps")),[2]}})}).call(this)},n.getRTCPeerStatus=function(){if(Mn.info("Getting RTC peer status"),!this.peer)return null;var t=Jn(this.peer);return Mn.info("RTC peer status getted, value: ",t),t},n.replaceTrack=function(t){if(this.peer){var i=this.peer.getSenders().find(function(i){return i.track.kind===t.kind});i?i.replaceTrack(t):Mn.error("There is no ".concat(t.kind," track in active broadcast."))}else Mn.error("Could not change track if there is not an active connection.")},n.getTracks=function(){var t,i;return null==(i=null==(t=this.peer)?void 0:t.getSenders())?void 0:i.map(function(t){return t.track})},n.initStats=function(t){this.peerConnectionStats?Mn.warn("PeerConnection.initStats() has already been called. Automatic initialization occurs via View.connect(), Publish.connect() or this.createRTCPeer(). See options"):this.peer?(this.peerConnectionStats=new ii(this.peer,t),$t(this.peerConnectionStats,this,[ti])):Mn.warn("Cannot init peer stats: RTCPeerConnection not initialized")},n.stopStats=function(){var t;null==(t=this.peerConnectionStats)||t.stop(),this.peerConnectionStats=null},i.getCapabilities=function(t){var i=new En,n=RTCRtpSender.getCapabilities(t);if(n){var r={},e=new RegExp("^video/(".concat(b.values(Bn).join("|"),")x?$"),"i");"audio"===t&&(e=new RegExp("^audio/(".concat(b.values(On).join("|"),")$"),"i"),i.isChrome()&&(r.multiopus={mimeType:"audio/multiopus",channels:6}));for(var s,u=Ft(n.codecs);!(s=u()).done;){var o=s.value,h=o.mimeType.match(e);if(h){var a=h[1].toLowerCase();if(r[a]=w(d({},r[a]),{mimeType:o.mimeType}),o.scalabilityModes){var c=r[a].scalabilityModes||[];c=[].concat(c,o.scalabilityModes),r[a].scalabilityModes=[].concat(new Set(c))}o.channels&&(r[a].channels=o.channels)}}n.codecs=b.keys(r).map(function(t){return d({codec:t},r[t])})}return n},i}(Gt),Hn=function(t){return(null==t?void 0:t.getAudioTracks().length)<=1&&(null==t?void 0:t.getVideoTracks().length)<=1},Wn=function(t){if(!t)return null;if(j(t,MediaStream)&&Hn(t))return t;if(!j(t,MediaStream)){Mn.info("Creating MediaStream to add received tracks.");for(var i,n=new MediaStream,r=Ft(t);!(i=r()).done;){var e=i.value;n.addTrack(e)}if(Hn(n))return n}throw Mn.error("MediaStream must have 1 audio track and 1 video track, or at least one of them."),new y("MediaStream must have 1 audio track and 1 video track, or at least one of them.")},zn=function(t,i){var n=new RTCPeerConnection(i);return Yn(t,n),n};function qn(t){return jt(function(){return zt(this,function(i){return[2,new ot(function(i){return g(i,t)})]})})()}var Xn,Gn,Qn,Yn=function(t,i){i.ontrack=function(i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:if(Mn.info("New track from peer."),Mn.debug("Track event value: ",i),!(n=t.transceiverMap.get(i.transceiver)))return[3,5];r.label=1;case 1:return i.transceiver.mid?[3,4]:[4,qn(100)];case 2:r.sent(),r.label=3;case 3:return[3,1];case 4:n(i.transceiver),t.transceiverMap.delete(i.transceiver),r.label=5;case 5:return g(function(){t.emit(Un.track,i)},0),[2]}})})()},i.connectionState?i.onconnectionstatechange=function(n){Mn.info("Peer connection state change: ",i.connectionState),t.emit(Un.connectionStateChange,i.connectionState)}:i.oniceconnectionstatechange=function(n){Mn.info("Peer ICE connection state change: ",i.iceConnectionState),t.emit(Un.connectionStateChange,i.iceConnectionState)},i.onnegotiationneeded=function(t){return jt(function(){var t,n;return zt(this,function(r){switch(r.label){case 0:return i.remoteDescription?(Mn.info("Peer onnegotiationneeded, updating local description"),[4,i.createOffer()]):[2];case 1:return t=r.sent(),Mn.info("Peer onnegotiationneeded, got local offer",t.sdp),t.sdp=Nn.updateMissingVideoExtensions(t.sdp,i.remoteDescription.sdp),[4,i.setLocalDescription(t)];case 2:return r.sent(),n=Nn.renegotiate(t.sdp,i.remoteDescription.sdp),Mn.info("Peer onnegotiationneeded, updating remote description",n),[4,i.setRemoteDescription({type:"answer",sdp:n})];case 3:return r.sent(),Mn.info("Peer onnegotiationneeded, renegotiation done"),[2]}})})()}},$n=function(t,i,n){Mn.info("Adding mediaStream tracks to RTCPeerConnection");for(var r,e=Ft(i.getTracks());!(r=e()).done;){var s=r.value,u={streams:[i]};"audio"===s.kind&&(u.direction=n.disableAudio?"inactive":"sendonly"),"video"===s.kind&&(u.direction=n.disableVideo?"inactive":"sendonly",n.scalabilityMode&&(new En).isChrome()?(Mn.debug("Video track with scalability mode: ".concat(n.scalabilityMode,".")),u.sendEncodings=[{scalabilityMode:n.scalabilityMode}]):n.scalabilityMode&&Mn.warn("SVC is only supported in Google Chrome")),t.addTransceiver(s,u),Mn.info("Track '".concat(s.label,"' added: "),"id: ".concat(s.id),"kind: ".concat(s.kind))}},Kn=function(t,i){var n=new En;if(!i.disableVideo){var r=t.addTransceiver("video",{direction:"recvonly"});n.isOpera()&&r.setCodecPreferences(RTCRtpReceiver.getCapabilities("video").codecs.filter(function(t){return"video/H264"!==t.mimeType||t.sdpFmtpLine.includes("profile-level-id=4")}))}i.disableAudio||t.addTransceiver("audio",{direction:"recvonly"});for(var e=0;e0&&-1===d.indexOf(v.codec))throw ir.error("Unsupported codec ".concat(v.codec,". Possible values are: "),d),new y("Unsupported codec ".concat(v.codec,". Possible values are: ").concat(d));if(v.codec===Bn.AV1&&(t=Nn.adaptCodecName(t,"AV1X",Bn.AV1)),g={name:this.streamName,sdp:t,codec:v.codec,sourceId:v.sourceId},v.priority){if(!(Number.isInteger(v.priority)&&v.priority>=-2147483648&&v.priority<=2147483647))throw new y("Invalid value for priority option. It should be a decimal integer between the range [-2^31, +2^31 - 1]");g.priority=v.priority}null!==v.record&&(g.record=v.record),Array.isArray(v.events)&&(g.events=v.events),_.label=1;case 1:if(_.trys.push([1,4,,5]),v.disableVideo&&v.disableAudio)throw new y("Not attempting to connect as video and audio are disabled");return[4,this.connect()];case 2:return _.sent(),ir.info("Sending publish command"),[4,this.transactionManager.cmd("publish",g)];case 3:return w=_.sent(),v.codec===Bn.AV1&&(m=null==(f=null==(c=null==(a=null==(h=RTCRtpSender.getCapabilities)?void 0:h.call(RTCRtpSender,"video"))?void 0:a.codecs)?void 0:c.find)?void 0:f.call(c,function(t){return"video/AV1X"===t.mimeType}),w.sdp=m?Nn.adaptCodecName(w.sdp,Bn.AV1,"AV1X"):w.sdp),[2,(ir.info("Command sent, publisherId: ",w.publisherId),ir.debug("Command result: ",w),this.serverId=w.publisherId,this.clusterId=w.clusterId,Y(this.streamName),K(this.serverId),Z(w.feedId),nt(this.clusterId),w.sdp)];case 4:throw p=_.sent(),ir.error("Error sending publish command, error: ",p),p;case 5:return[2]}})}).call(this)},n.cmd=function(t,i){return jt(function(){return zt(this,function(n){return[2,(ir.info("Sending cmd: ".concat(t)),this.transactionManager.cmd(t,i))]})}).call(this)},i}(Gt),or=function(t,i,n){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===b.keys(r).length&&(r={vad:t,pinnedSourceId:i,excludedSourceIds:n}),r},hr=function(t,i,n){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===b.keys(r).length&&(r={codec:null!=t?t:Bn.H264,record:i,sourceId:n}),r},ar=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).name="FetchError",r.status=n,r}return Pt(i,t),i}(si(y)),cr=wt.get("Director"),fr="WebRtc",vr="",dr="https://director.millicast.com",lr={setEndpoint:function(t){dr=t.replace(/\/$/,"")},getEndpoint:function(){return dr},setLiveDomain:function(t){vr=t.replace(/\/$/,"")},getLiveDomain:function(){return vr},getPublisher:function(t,i,n){return void 0===i&&(i=null),void 0===n&&(n=fr),jt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:r=gr(t,i,n),cr.info("Getting publisher connection path for stream name: ",r.streamName),e={streamName:r.streamName,streamType:r.streamType},s={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.token)},u="".concat(lr.getEndpoint(),"/api/director/publish"),c.label=1;case 1:return c.trys.push([1,4,,5]),[4,fetch(u,{method:"POST",headers:s,body:JSON.stringify(e)})];case 2:return[4,(o=c.sent()).json()];case 3:if("fail"===(h=c.sent()).status)throw new ar(h.data.message,o.status);return[2,(h=mr(h),cr.debug("Getting publisher response: ",h),Q(h.data.streamAccountId),h.data)];case 4:throw a=c.sent(),cr.error("Error while getting publisher connection path. ",a),a;case 5:return[2]}})})()},getSubscriber:function(t,i,n){return void 0===i&&(i=null),void 0===n&&(n=null),jt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:r=wr(t,i,n),Q(r.streamAccountId),cr.info("Getting subscriber connection data for stream name: ".concat(r.streamName," and account id: ").concat(r.streamAccountId)),e={streamAccountId:r.streamAccountId,streamName:r.streamName},s={"Content-Type":"application/json"},r.subscriberToken&&(s=w(d({},s),{Authorization:"Bearer ".concat(r.subscriberToken)})),u="".concat(lr.getEndpoint(),"/api/director/subscribe"),c.label=1;case 1:return c.trys.push([1,4,,5]),[4,fetch(u,{method:"POST",headers:s,body:JSON.stringify(e)})];case 2:return[4,(o=c.sent()).json()];case 3:if("fail"===(h=c.sent()).status)throw new ar(h.data.message,o.status);return[2,(h=mr(h),cr.debug("Getting subscriber response: ",h),r.subscriberToken&&(h.data.subscriberToken=r.subscriberToken),h.data)];case 4:throw a=c.sent(),cr.error("Error while getting subscriber connection path. ",a),a;case 5:return[2]}})})()}},gr=function(t,i,n){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===b.keys(r).length&&(r={token:t,streamName:i,streamType:n}),r},wr=function(t,i,n){var r="object"==(void 0===t?"undefined":W(t))?t:{};return 0===b.keys(r).length&&(r={streamName:t,streamAccountId:i,subscriberToken:n}),r},mr=function(t){if(lr.getLiveDomain()){var i=/\/\/(.*?)\//,n=t.data.urls.map(function(t){var n=i.exec(t);return t.replace(n[1],lr.getLiveDomain())});t.data.urls=n}if(t.data.drmObject){var r=t.data.drmObject.playReadyUrl;r&&(t.data.drmObject.playReadyUrl="".concat(lr.getEndpoint()).concat(r));var e=t.data.drmObject.widevineUrl;e&&(t.data.drmObject.widevineUrl="".concat(lr.getEndpoint()).concat(e));var s=t.data.drmObject.fairPlayUrl;s&&(t.data.drmObject.fairPlayUrl="".concat(lr.getEndpoint()).concat(s));var u=t.data.drmObject.fairPlayCertUrl;u&&(t.data.drmObject.fairPlayCertUrl="".concat(lr.getEndpoint()).concat(u))}return t};function pr(t){this.message=t}pr.prototype=new y,pr.prototype.name="InvalidCharacterError";var yr=(void 0===f?"undefined":W(f))<"u"&&f.atob&&f.atob.bind(f)||function(t){var i=String(t).replace(/=+$/,"");if(i.length%4==1)throw new pr("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,e=0,s=0,u="";r=i.charAt(s++);~r&&(n=e%4?64*n+r:r,e++%4)?u+=String.fromCharCode(255&n>>(-2*e&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return u};function _r(t){this.message=t}function kr(t,i){if("string"!=typeof t)throw new _r("Invalid token specified");var n=!0===(i=i||{}).header?0:1;try{return JSON.parse(function(t){var i=t.replace(/-/g,"+").replace(/_/g,"/");switch(i.length%4){case 0:break;case 2:i+="==";break;case 3:i+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(yr(i).replace(/(.)/g,function(t,i){var n=i.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(t){return yr(i)}}(t.split(".")[n]))}catch(t){throw new _r("Invalid token specified: "+t.message)}}_r.prototype=new y,_r.prototype.name="InvalidTokenError";var br,Ar={exports:{}},Tr=(br||(br=1,function(t,i){!function(n){if(null!=i&&"number"!=typeof i.nodeType)t.exports=n();else{var r=n(),e=("undefined"==typeof self?"undefined":W(self))<"u"?self:$.global;"function"!=typeof e.btoa&&(e.btoa=r.btoa),"function"!=typeof e.atob&&(e.atob=r.atob)}}(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(t){this.message=t}return i.prototype=new y,i.prototype.name="InvalidCharacterError",{btoa:function(n){for(var r,e,s,u,o=String(n),h=0,a="";h255||e>255||s>255)throw new i("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");a+=t.charAt((u=r<<16|e<<8|s)>>18&63)+t.charAt(u>>12&63)+t.charAt(u>>6&63)+t.charAt(63&u)}switch(o.length%3){case 0:return a;case 1:return a.slice(0,-2)+"==";case 2:return a.slice(0,-1)+"="}},atob:function(n){var r=String(n).replace(/[=]+$/,"");if(r.length%4==1)throw new i("'atob' failed: The string to be decoded is not correctly encoded.");for(var e,s,u=0,o=0,h="";s=r.charAt(o++);~s&&(e=u%4?64*e+s:s,u++%4)?h+=String.fromCharCode(255&e>>(-2*u&6)):0)s=t.indexOf(s);return h}}})}(Ar,Ar.exports)),Ar.exports);function Sr(t){var i,n,r;return{lang:null!=(i=null==t?void 0:t.lang)?i:void 0,message:null==t?void 0:t.message,abortEarly:null!=(n=null==t?void 0:t.abortEarly)?n:void 0,abortPipeEarly:null!=(r=null==t?void 0:t.abortPipeEarly)?r:void 0}}function Er(t){var i,n,r,e=void 0===t?"undefined":W(t);return"string"===e?'"'.concat(t,'"'):"number"===e||"bigint"===e||"boolean"===e?"".concat(t):"object"===e||"function"===e?null!=(r=t&&(null==(n=null==(i=b.getPrototypeOf(t))?void 0:i.constructor)?void 0:n.name))?r:"null":e}function Ir(t,i,n,r,e){var s,u,o,h,a,c,f,v,d=e&&"input"in e?e.input:n.value,l=null!=(u=null!=(s=null==e?void 0:e.expected)?s:t.expects)?u:null,g=null!=(o=null==e?void 0:e.received)?o:Er(d),w={kind:t.kind,type:t.type,input:d,expected:l,received:g,message:"Invalid ".concat(i,": ").concat(l?"Expected ".concat(l," but r"):"R","eceived ").concat(g),requirement:t.requirement,path:null==e?void 0:e.path,issues:null==e?void 0:e.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},m="schema"===t.kind,p=null!=(v=null!=(f=null!=(c=null!=(a=null!=(h=null==e?void 0:e.message)?h:t.message)?a:function(t,i){var n;return null==(n=void 0)?void 0:n.get(i)}(t.reference,w.lang))?c:m?void w.lang:null)?f:r.message)?v:void w.lang;void 0!==p&&(w.message="function"==typeof p?p(w):p),m&&(n.typed=!1),n.issues?n.issues.push(w):n.issues=[w]}function Rr(t){return{version:1,vendor:"valibot",validate:function(i){return t["~run"]({value:i},Sr())}}}function Cr(t,i){return b.hasOwn(t,i)&&"__proto__"!==i&&"prototype"!==i&&"constructor"!==i}function Pr(t,i){var n,r=[].concat(new Set(t));return r.length>1?"(".concat(r.join(" ".concat(i," ")),")"):null!=(n=r[0])?n:"never"}var Dr,Nr=function(t){function i(i){var n;return(n=t.call(this,i[0].message)||this).name="ValiError",n.issues=i,n}return Pt(i,t),i}(si(y));function xr(t,i,n){return"function"==typeof t.fallback?t.fallback(i,n):t.fallback}function Br(t,i,n){return"function"==typeof t.default?t.default(i,n):t.default}function Or(t,i){return{kind:"schema",type:"array",reference:Or,expects:"Array",async:!1,item:t,message:i,get"~standard"(){return Rr(this)},"~run":function(t,i){var n,r=t.value;if(Array.isArray(r)){t.typed=!0,t.value=[];for(var e=0;e0&&(w=a.updateBandwidthRestriction(w,this.options.bandwidth)),[4,a.setRTCRemoteSDP(w)];case 8:return p.sent(),Zr.info("Broadcasting to streamName: ",this.streamName),m=this.webRTCPeer,this.webRTCPeer=a,this.setReconnect(),t.migrate&&this.webRTCPeer.on(Un.connectionStateChange,function(t){var i,n;["connected","disconnected","failed","closed"].includes(t)&&(null==(i=null==d?void 0:d.close)||i.call(d),null==(n=null==m?void 0:m.closeRTCPeer)||n.call(m),d=m=null)}),[2]}})}).call(this)},n.sendMetadata=function(t,i){var n;if(void 0===i&&(i="d40e38ea-d419-4c62-94ed-20ac37b4e4fa"),null!=(n=this.options)&&n.metadata&&this.worker)this.worker.postMessage({action:"metadata-sei-user-data-unregistered",uuid:i,payload:t});else{var r="Could not send metadata due to:";this.options?this.options.metadata?this.worker||(r+="\n- Stream not being published."):(r+="\n- Metadata option is not enabled.",this.options.codec!==Bn.H264&&(r+="\n- Incompatible codec. Only H264 available."),this.options.disableVideo&&(r+="\n- Video disabled.")):r+="\n- Stream not being published.",Zr.warn(r)}},i}(qr),ne=function(t){var i=function(t,i,n){var r=t["~run"]({value:i},Sr(n));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}(Jr=Jr||Lr({sourceId:Fr(jr()),stereo:Fr(Mr()),dtx:Fr(Mr()),absCaptureTime:Fr(Mr()),dependencyDescriptor:Fr(Mr()),mediaStream:Fr(Wr([Or(zr()),zr()])),bandwidth:Fr(Ur()),metadata:Fr(Mr()),disableVideo:Fr(Mr()),disableAudio:Fr(Mr()),codec:Fr(Vr(b.values(Bn))),simulcast:Fr(Mr()),scalabilityMode:Fr(jr()),peerConfig:Fr(Lr({autoInitStats:Fr(Mr()),statsIntervalMs:Fr(Ur())})),record:Fr(Mr()),events:Fr(Or(Vr(["active","inactive","viewercount"]))),priority:Fr(Ur())}),t),n=i.success,r=i.issues;n||Zr.warn(new Nr(r),t)};function re(t){if(!t)return new I;for(var i=t.length,n=new I(i/2),r=0;r=4&&(r=console)[e(323)].apply(r,[].concat([this[e(310)]],i))},i[ye(331)]=function(){for(var t=arguments.length,i=new Array(t),n=0;n=3&&(r=console)[e(331)].apply(r,[].concat([this[e(310)]],i))},i[ye(320)]=function(){for(var t=arguments.length,i=new Array(t),n=0;n=2&&(r=console)[e(320)].apply(r,[].concat([this[e(310)]],i))},i.error=function(){for(var t=arguments.length,i=new Array(t),n=0;n=1&&(r=console).error.apply(r,[].concat([this.tag],i))},t}();function be(t){return new ke(t)}var Ae={logLevel:3,mediaDumps:{video:{in:{durationMs:0,delimited:!0},out:{durationMs:0}},audio:{in:{durationMs:0},out:{durationMs:0}}}};function Te(){return(new Date)[ye(317)]().slice(11,-1)}function Se(){var t=["mediaBuffer","click","529321KfbOwo","endTimestampMs","28972188cmcnxe","containerFileExt","info","4ZlZeJQ","9kyfNFe","mediaType","172953TzXwsI","byteLength","1327806tybvjI","href","createObjectURL","1089qysnCz","112088WLFXHK","substring","tag","692993ZcAeLj","set","download","810qiScYX","startTimestampMs","8821555KArxhe","toISOString","application/octet-stream","logLevel","warn","revokeObjectURL","42PDuKrJ","debug","targetDurationMs"];return(Se=function(){return t})()}var Ee=function(){function t(t,i,n){var r=ye;this[r(325)]=null,this[r(315)]=-1,this.endTimestampMs=-1,this[r(301)]=t,this[r(330)]=i,this[r(324)]=n,n>0&&(this[r(325)]=new I)}return t.prototype.append=function(t,i){var n,r,e,s,u=ye;if(!this[u(325)])return!1;if(this[u(325)]=(n=this[u(325)],r=t,(s=new I((0|n[(e=ye)(303)])+(0|r.byteLength)))[e(312)](n,0),s[e(312)](r,0|n.byteLength),s),void 0!==i)if(-1===this[u(315)])this.startTimestampMs=i,this[u(328)]=i+this[u(324)];else if(i>=this[u(328)]){var o=(new Date)[u(317)]()[u(309)](0,19).replace(/:/g,"-"),h=this.mediaType+"-"+o+"."+this.containerFileExt;return function(t,i,n){void 0===n&&(n=ye(318));var r=ye,e=v.createElement("a"),s=new Blob([t],{type:n});e.href=URL[r(306)](s),e[r(313)]=i,e[r(326)](),URL[r(321)](e[r(305)])}(this[u(325)],h),this.mediaBuffer=null,!1}return!0},t}(),Ie=De;!function(){for(var t=De,i=ze();;)try{if(T(t(160))/1+-T(t(363))/2+-T(t(321))/3*(-T(t(401))/4)+T(t(229))/5+-T(t(276))/6+T(t(400))/7*(-T(t(153))/8)+-T(t(223))/9==858456)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var Re=be("[MUX]"),Ce=pe[Ie(387)];function Pe(t,i){var n=Ie,r=new I((0|t[n(413)])+(0|i[n(413)]));return r.set(t,0),r[n(251)](i,0|t[n(413)]),r}function De(t,i){var n=ze();return(De=function(t,i){return n[t-=147]})(t,i)}function Ne(t,i,n){return void 0===i&&(i=0),void 0===n&&(n=1/0),function(t,i,n,r){var e=Ie,s=r[e(425)]||1;i*=s,n*=s;var u,o=j(u=t,ArrayBuffer)?u:u[Ie(366)],h=(t[e(188)]||0)+t[e(413)],a=(t[e(188)]||0)+i,c=A[e(177)](0,A[e(291)](a,h)),f=A[e(291)](c+A[e(177)](n,0),h);return new r(o,c/=s,(f/=s)-c)}(t,i,n,I)}function xe(t){var i=Ie,n=Array.from(t)[i(238)](function(t){return t[i(384)](0)});return new I(n)}var Be=function(t,i,n,r,e,s,u,o,h,a,c,f,v,d,l){function g(t){var i=Ie;this[i(452)]=t,this[i(402)]=(96&this[i(452)][0])>>5,this[i(186)]=31&this[i(452)][0],this.isvcl=1==this[i(186)]||5==this[i(186)],this[i(309)]="",this.isfmb=!1}var w=g.prototype;return w[o]=function(){var t=Ie;return g[t(234)](this)+": NRI: "+this[t(209)]()},w[h]=function(){return this[Ie(402)]},w[a]=function(){return this[Ie(186)]},w[c]=function(){return this[Ie(186)]===g.IDR},w[f]=function(){return this[Ie(452)]},w[v]=function(){return this[Ie(452)].byteLength},w[d]=function(){return 4+this[Ie(327)]()},w[l]=function(){var t=Ie,i=new I(this[t(194)]());return new DataView(i[t(366)]).setUint32(0,this[t(194)]()-4),i[t(251)](this.getPayload(),4),i},g[u]=function(t){var i=Ie;return t[i(186)]in g[i(159)]?g[i(159)][t.ntype]:i(344)},xt(g,null,[{key:t,get:function(){return 1}},{key:i,get:function(){return 5}},{key:"SEI",get:function(){return 6}},{key:n,get:function(){return 7}},{key:r,get:function(){return 8}},{key:e,get:function(){return 9}},{key:s,get:function(){var t,i=Ie;return(t={})[g[i(427)]]=i(427),t[g[i(273)]]=i(273),t[g[i(324)]]=i(324),t[g.PPS]="PPS",t[g[i(449)]]="NDR",t[g.AUD]=i(272),t}}]),g}(Ie(449),Ie(427),Ie(324),Ie(379),Ie(272),Ie(159),Ie(234),Ie(365),Ie(209),Ie(234),Ie(306),Ie(203),Ie(327),Ie(194),Ie(341)),Oe=function(){function t(t){var i=Ie;this[i(316)]=t,this[i(368)]=0,this[i(157)]=8*t.byteLength}var i=t.prototype;return i[Ie(433)]=function(t){var i=Ie;this.data=t,this[i(368)]=0,this.bitLength=8*t[i(413)]},i.skipBits=function(t){var i=Ie;if(this[i(451)]>>e,u=8-e;if(u>=t)return n&&(this[r(368)]+=t),s>>u-t;n&&(this[r(368)]+=u);var o=t-u;return s<>>1:-1*(t>>>1)},i[Ie(239)]=function(){return 1===this[Ie(338)](1)},i[Ie(419)]=function(t){return void 0===t&&(t=1),this.readBits(8*t)},i[Ie(232)]=function(){return this.readBits(16)},i.readUInt=function(){return this[Ie(338)](32)},xt(t,[{key:Ie(451),get:function(){return this[Ie(157)]-this.index}}]),t}(),Me=function(t,i,n,r,e,s,u){function o(t){var i=Ie;this.remuxer=t,this[i(233)]=t.mp4track}var h=o.prototype;return h[e]=function(t){var i=Ie,n=o[i(432)](new I(t));this.track[i(237)]=n.width,this[i(233)].height=n.height,this.track[i(382)]=[new I(t)],this.track[i(210)]=i(292);for(var r=new DataView(t.buffer,t[i(188)]+1,4),e=0;e<3;++e){var s=r[i(313)](e)[i(365)](16);s[i(268)]<2&&(s="0"+s),this.track[i(210)]+=s}},h[s]=function(t){var i=Ie;this[i(233)][i(434)]=[new I(t)]},h[u]=function(t){var i=Ie;if(!t)return!1;var n=!1;switch(t[i(234)]()){case Be[i(427)]:case Be.NDR:n=!0;break;case Be[i(379)]:!this[i(233)][i(434)]&&(this[i(345)](t.getPayload()),!this[i(175)][i(296)]&&this[i(233)][i(434)]&&this.track[i(382)]&&(this.remuxer[i(296)]=!0)),n=!0;break;case Be[i(324)]:!this.track.sps&&(this[i(256)](t[i(203)]()),!this[i(175)][i(296)]&&this[i(233)].pps&&this[i(233)][i(382)]&&(this.remuxer[i(296)]=!0)),n=!0;break;case Be[i(272)]:break;case Be.SEI:n=!0}return n},o[t]=function(t,i){for(var n=Ie,r=[],e=!1,s=!1,u=!1,o=!1,h=0,a=0,c=0,f=[];h<=t.byteLength;){if(h1&&(c=a>2?4:3,f.push(h)),a=0):++a}else c=0,f.push(h++);if(f.length>1){var d=f.shift(),l=f[0]-c;if(d1&&3===y&&(a=0,y=t[h++]),0!==y?a=0:++a,m[p++]=y}r.push(m.subarray(0,p))}}}}var _=!0,k=!1;return s||e?s&&e&&(Re[n(265)](n(331)),_=!1):(Re[n(265)]("[H264Parser] No VCL NALUs found"),_=!1),e&&(u&&o?k=!0:Re.warn(n(158))),{valid:_,idr:k,nalus:r}},o[i]=function(t,i){for(var n=8,r=8,e=0;e0&&y[1]>0&&(l=y[0]/y[1])}a.readBoolean()&&a[h(155)](1),a[h(239)]()&&(a[h(155)](4),a[h(239)]()&&a[h(155)](24)),a[h(239)]()&&(a[h(334)](),a[h(334)]()),a.readBoolean()&&(a.readUInt(),a[h(187)](),a.readBoolean())}return{width:A[h(440)]((16*(r+1)-2*c-2*f)*l),height:(2-s)*(e+1)*16-(s?2:4)*(v+d)}},o[r]=function(t){var i=Ie,n=new Oe(t[i(203)]());n[i(419)](),t[i(196)]=0===n[i(179)](),t[i(309)]=n[i(179)]()},o}(Ie(267),Ie(333),Ie(432),Ie(386),Ie(256),Ie(345),Ie(378)),Le=function(){function t(t){var i=Ie;this.listener={},this[i(234)]=""|t}var i=t.prototype;return i.on=function(t,i){var n=Ie;return!this[n(270)][t]&&(this.listener[t]=[]),this[n(270)][t].push(i),!0},i.off=function(t,i){var n=Ie;if(this[n(270)][t]){var r=this[n(270)][t].indexOf(i);return r>-1&&this[n(270)][t][n(369)](r,1),!0}return!1},i[Ie(219)]=function(){this.listener={}},i[Ie(225)]=function(t,i){var n=Ie;return!!this[n(270)][t]&&(this[n(270)][t].map(function(t){t[n(200)](null,[i])}),!0)},t}(),Fe=function(){function t(i){var n,r,e=Ie;for(var s in this[e(285)]=i,this.saiIvSize={video:"cenc"===(null==(n=i.config[e(415)])?void 0:n[e(201)])?16:0,audio:"cenc"===(null==(r=i[e(154)][e(407)])?void 0:r[e(201)])?16:0},t[e(212)]={avc1:[],encv:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],Opus:[],dOps:[],enca:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],pssh:[],sinf:[],frma:[],schm:[],schi:[],tenc:[],saiz:[],saio:[],senc:[]},t[e(212)])t.types[s]=[s[e(384)](0),s[e(384)](1),s[e(384)](2),s.charCodeAt(3)];var u=new I([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 I([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]);t.HDLR_TYPES={video:u,audio:o};var h=new I([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new I([0,0,0,0,0,0,0,0]);t.STTS=t[e(377)]=t[e(213)]=a,t.STSZ=new I([0,0,0,0,0,0,0,0,0,0,0,0]),t[e(438)]=new I([0,0,0,1,0,0,0,0,0,0,0,0]),t[e(307)]=new I([0,0,0,0,0,0,0,0]),t[e(168)]=new I([0,0,0,0,0,0,0,1]);var c=new I([105,115,111,109]),f=new I([97,118,99,49]),v=new I([0,0,0,1]);t[e(183)]=t[e(347)](t[e(212)].ftyp,c,v,c,f),t[e(147)]=t[e(347)](t.types.dinf,t[e(347)](t[e(212)][e(280)],h))}var i=t.prototype;return i[Ie(190)]=function(i){var n=Ie;return t[n(347)](t[n(212)][n(190)],t[n(418)][i])},i[Ie(244)]=function(i){var n=Ie;return t[n(347)](t[n(212)][n(244)],i)},i[Ie(380)]=function(i,n){var r=Ie;return t[r(347)](t[r(212)][r(380)],new I([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24,i>>>16&255,i>>>8&255,255&i,0,0,0,0,85,196,0,0]))},i[Ie(215)]=function(i){var n=Ie;return t[n(347)](t[n(212)].mdia,this[n(380)](i[n(274)],i[n(290)]),this[n(190)](i[n(234)]),this[n(230)](i))},i[Ie(443)]=function(i){var n=Ie;return t.box(t[n(212)][n(443)],new I([0,0,0,0,i>>>24,i>>>16&255,i>>>8&255,255&i]))},i[Ie(230)]=function(i){var n=Ie;return i[n(234)]===n(407)?t[n(347)](t[n(212)][n(230)],t.box(t.types[n(255)],t.SMHD),t[n(147)],this[n(362)](i)):t[n(347)](t.types[n(230)],t[n(147)],this[n(362)](i),t[n(347)](t[n(212)].vmhd,t[n(438)]))},i[Ie(370)]=function(i,n,r){var e=Ie;return t[e(347)](t.types.moof,this[e(443)](i),this[e(293)](r,n))},i[Ie(295)]=function(i,n,r){for(var e=Ie,s=i[e(268)],u=[];s--;)u[s]=this.trak(i[s]);return t.box[e(200)](null,[t[e(212)][e(295)],this[e(240)](r,n),this[e(447)](i)][e(389)](u)[e(389)](this[e(322)](i)))},i[Ie(322)]=function(i){for(var n=Ie,r=i[n(268)],e=[];r--;)e[r]=this[n(305)](i[r]);return t[n(347)][n(200)](null,[t[n(212)][n(322)]][n(389)](e))},i[Ie(240)]=function(i,n){var r=Ie,e=new I([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24,i>>>16&255,i>>>8&255,255&i,n>>>24,n>>>16&255,n>>>8&255,255&n,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[r(347)](t.types.mvhd,e)},i[Ie(420)]=function(i){for(var n=Ie,r=i[n(428)]||[],e=new I(4+r.length),s=0;s>>8&255),u.push(255&e),u=u[s(389)](Array.prototype[s(314)][s(395)](r));for(n=0;n>>8&255),o[s(406)](255&e),o=o.concat(Array.prototype[s(314)].call(r));var h=t[s(347)](t[s(212)][s(408)],new I([1,u[3],u[4],u[5],255,224|i.sps[s(268)]].concat(u)[s(389)]([i[s(434)][s(268)]]).concat(o))),a=i[s(237)],c=i[s(374)],f=t[s(347)](t.types[s(441)],t.box(t[s(212)][s(318)],new I([97,118,99,49])),t[s(347)](t[s(212)][s(349)],new I([].concat([0,0,0,0],xe(this[s(285)][s(154)][s(415)][s(201)]),[0,1,0,0]))),t.box(t.types[s(217)],this[s(298)](s(415))));return t[s(347)](t[s(212)].encv,new I([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,a>>>8&255,255&a,c>>>8&255,255&c,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,65,86,67,32,67,111,100,105,110,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]),h,f)},i[Ie(372)]=function(t){var i=Ie,n=t[i(154)][i(413)],r=new I(26+n+3);return r[i(251)]([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5,n]),r[i(251)](t[i(154)],26),r.set([6,1,2],26+n),r},i[Ie(403)]=function(i){var n=Ie,r=i[n(354)];return t[n(347)](t[n(212)][n(403)],new I([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i[n(390)],0,16,0,0,0,0,r>>>8&255,255&r,0,0]),t[n(347)](t[n(212)][n(372)],this[n(372)](i)))},i[Ie(266)]=function(t){var i=Ie,n=t[i(354)];return new I([0,t[i(390)],1,56,0,0,n>>>8&255,255&n,0,0,0])},i[Ie(416)]=function(i){var n=Ie,r=i.audiosamplerate;return t[n(347)](t.types[n(416)],new I([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i[n(390)],0,16,0,0,0,0,r>>>8&255,255&r,0,0]),t[n(347)](t[n(212)][n(266)],this[n(266)](i)))},i[Ie(394)]=function(i){var n=Ie,r=t[n(347)](t.types[n(266)],this.dOps(i)),e=t[n(347)](t.types[n(441)],t.box(t.types.frma,new I([79,112,117,115])),t[n(347)](t.types.schm,new I([].concat([0,0,0,0],xe(this[n(285)][n(154)].audio[n(201)]),[0,1,0,0]))),t.box(t.types[n(217)],this[n(298)](n(407)))),s=i[n(354)];return t[n(347)](t[n(212)].enca,new I([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i[n(390)],0,16,0,0,0,0,s>>>8&255,255&s,0,0]),r,e)},i[Ie(165)]=function(i){var n=Ie;return i[n(234)]===n(407)?t[n(347)](t[n(212)][n(165)],t[n(168)],i[n(199)]?this[n(394)](i):this[n(416)](i)):t[n(347)](t.types[n(165)],t[n(168)],this[n(303)](i))},i[Ie(278)]=function(i){var n=Ie,r=i.id,e=i[n(290)],s=i[n(237)],u=i[n(374)],o=i[n(388)];return t[n(347)](t[n(212)].tkhd,new I([0,0,0,7,0,0,0,0,0,0,0,0,r>>>24,r>>>16&255,r>>>8&255,255&r,0,0,0,0,e>>>24,e>>>16&255,e>>>8&255,255&e,0,0,0,0,0,0,0,0,0,0,0,0,255&o,o%1*10&255,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,s>>>8&255,255&s,0,0,u>>>8&255,255&u,0,0]))},i[Ie(293)]=function(i,n){var r,e=Ie,s=i.id,u=i[e(428)][0][e(171)],o=i.samples[0][e(290)],h=i[e(428)][0].flags,a=t[e(347)](t[e(212)].tfhd,new I([0,2,0,58,s>>>24,s>>>16&255,s>>>8&255,255&s,0,0,0,1,o>>>24,s>>>16&255,o>>>8&255,255&o,u>>>24,u>>>16&255,u>>>8&255,255&u,0,h[e(264)],0,0])),c=t[e(347)](t[e(212)].tfdt,new I([0,0,0,0,n>>>24,n>>>16&255,n>>>8&255,255&n]));if(i.encrypted){var f,v;if(i[e(234)]===e(415)?(f=!0,v=this[e(350)][e(415)]+(null==(r=i.samples[0][e(191)])?void 0:r.byteLength)):(f=!1,v=this[e(350)].audio),v>0){var d=this[e(242)](v),l=this[e(340)](i[e(428)],f),g=d[e(268)]+20+l[e(268)]+a[e(268)]+c[e(268)]+8+16+8+8,w=this[e(271)](i,g);return t[e(347)](t[e(212)][e(293)],a,c,w,d,this.saio(g-l[e(268)]+w.length+8),l)}var m=this[e(340)](null,!1),p=m.length+a[e(268)]+c[e(268)]+8+16+8+8,y=this[e(271)](i,p);return t[e(347)](t.types[e(293)],a,c,y,m)}return t.box(t[e(212)].traf,a,c,this.trun(i,a[e(268)]+c.length+8+16+8+8))},i.trak=function(i){var n=Ie;return i.duration=i[n(290)]||4294967295,t.box(t[n(212)].trak,this[n(278)](i),this[n(215)](i))},i[Ie(305)]=function(i){var n=Ie,r=i.id;return t[n(347)](t.types[n(305)],new I([0,0,0,0,r>>>24,r>>>16&255,r>>>8&255,255&r,0,0,0,1,0,0,0,16,0,0,0,0,0,0,0,0]))},i.trun=function(i,n){var r=Ie,e=(i[r(428)]||[])[r(268)],s=new I(12);return n+=20,s.set([0,0,0,1,e>>>24,e>>>16&255,e>>>8&255,255&e,n>>>24,n>>>16&255,n>>>8&255,255&n],0),t[r(347)](t.types[r(271)],s)},i[Ie(224)]=function(t,i){var n,r,e,s=Ie,u=s(445),o=function(t){var i=function(t){for(var i=Ie,n="",r=0;r',s(308),"",s(398),s(353),s(216)+o+'"',">",s(412),s(249),s(391),i?""+i+s(423):"",s(351),s(269)].join("")))},i.pssh=function(i){var n=Ie;if(this[n(285)][n(383)][n(202)](n(178)))return t[n(347)](t.types[n(447)],new I([].concat([0,0,0,0,237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237,0,0,0,18,18,16],this[n(285)][n(154)][i[0][n(234)]].keyId)));if(this[n(285)][n(383)]===n(356)){var r=this[n(224)](this[n(285)][n(154)][i[0][n(234)]][n(429)],this.drm[n(371)]),e=r[n(413)];return t[n(347)](t[n(212)][n(447)],new I([].concat([0,0,0,0,154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149,e>>>24,e>>>16&255,e>>>8&255,255&e],r)))}return this.drm[n(383)]===n(323)?t[n(347)](t[n(212)][n(447)],new I([].concat([1,0,0,0,16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75,0,0,0,1],this.drm[n(154)][i[0].type].keyId,[0,0,0,0]))):this.drm[n(383)]===n(397)?null:void Re[n(189)](n(393)+this[n(285)][n(383)])},i[Ie(298)]=function(i){var n,r,e=Ie,s=this[e(285)][e(154)][i];return s[e(201)]===e(226)?(n=new I([].concat([16],s.iv)),r=25):(n=new I([]),r=0),t[e(347)](t[e(212)][e(298)],new I([].concat([1,0,0,0,0,r,1,this[e(350)][i]],s[e(429)],n)))},i[Ie(242)]=function(i){var n=Ie;return t[n(347)](t[n(212)][n(242)],new I([0,0,0,0,i,0,0,0,1]))},i[Ie(204)]=function(i){var n=Ie;return t[n(347)](t[n(212)][n(204)],new I([0,0,0,0,0,0,0,1,i>>>24,i>>>16&255,i>>>8&255,255&i]))},i[Ie(340)]=function(i,n){var r=Ie,e=null;return i&&(1!==i[r(268)]&&Re[r(189)](r(182)+i[r(268)]+" samples - expected 1"),e=i[0][r(191)]),e&&e[r(413)]?t[r(347)](t[r(212)].senc,new I([].concat([0,0,0,n?2:0,0,0,0,1],e))):t.box(t[r(212)][r(340)],new I([0,0,0,0,0,0,0,1]))},i[Ie(439)]=function(i,n,r){var e=Ie,s=this[e(295)](i,n,r),u=new I(t[e(183)].byteLength+s[e(413)]);return u[e(251)](t[e(183)]),u[e(251)](s,t[e(183)][e(413)]),u},t.box=function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r>>24,e[1]=u>>>16&255,e[2]=u>>>8&255,e[3]=255&u,e[s(251)](t,4),o=0,u=8;o0)for(var e=0;e0&&this.readyToDecode&&(this[e(207)][e(263)]+=a,this[e(428)].push({units:h,size:a,keyFrame:o.keyFrame,duration:o[e(290)],sampleAuxInfo:i,timestamp:n}))}},n[Ie(161)]=function(){var t=Ie;if(!this[t(211)]()||!this[t(428)])return null;var i,n=this.mp4track[t(428)],r=this.samples[t(342)](),e=r.units,s=(1e3*r[t(332)]|0)-this[t(222)]|0;s<5&&(s=5),s>5e3&&Re[t(381)](t(430)+(s/1e3|0)+" s"),this.dts=this[t(222)],this[t(222)]+=s,i={size:r.size,duration:s,cts:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,isNonSync:r[t(148)]?0:1,dependsOn:r[t(148)]?2:1},sampleAuxInfo:r[t(191)]};for(var u,o=0,h=Ft(e);!(u=h()).done;)o+=u.value[t(194)]();for(var a,c=0,f=new I(o),v=Ft(e);!(a=v()).done;){var d=a.value;f[t(251)](d[t(341)](),c),c+=d[t(194)]()}return n.push(i),new I(f[t(366)],0,o)},i}(Ve),We=function(t){function i(i,n){var r,e=Ie;return(r=t.call(this,e(175))||this)[e(260)]=!1,r.trackTypes=[],r[e(357)]={},r[e(274)]=1e3,r[e(163)]=0,r[e(361)]=i,r.mp4=n,r}Pt(i,t);var n=i.prototype;return n[Ie(281)]=function(t){var i=Ie;("video"===t||"both"===t)&&(this[i(357)][i(415)]=new He(this.timescale,this[i(361)]),this[i(335)][i(406)](i(415))),(t===i(407)||t===i(417))&&(this[i(357)][i(407)]=new je(this.timescale),this.trackTypes[i(406)](i(407)))},n[Ie(250)]=function(){for(var t,i=Ie,n=Ft(this[i(335)]);!(t=n()).done;){var r=t.value;this.tracks[r].resetTrack()}this[i(260)]=!1},n[Ie(262)]=function(){var t=Ie;this.tracks={},this[t(219)]()},n[Ie(246)]=function(){var t=Ie;if(this[t(260)])for(var i,n=Ft(this[t(335)]);!(i=n()).done;)for(var r=i.value,e=this[t(357)][r];;){var s=e[t(161)]();if(!s||!s.byteLength)break;var u={type:r,payload:Pe(this[t(164)][t(370)](e[t(437)]++,e[t(336)],e[t(207)]),this.mp4[t(244)](s)),dts:e[t(336)]};this[t(225)](t(366),u),e[t(246)]()}else this[t(211)]()&&(this[t(225)]("ready"),this.initSegment(),this[t(260)]=!0,this[t(246)]())},n[Ie(439)]=function(){for(var t,i=Ie,n=Ft(this[i(335)]);!(t=n()).done;){var r=t.value,e=this[i(357)][r],s={type:r,payload:this[i(164)][i(439)]([e[i(207)]],this[i(163)],this.timescale)};this[i(225)]("buffer",s)}},n.isReady=function(){for(var t,i=Ie,n=Ft(this[i(335)]);!(t=n()).done;){var r=t.value;if(!this.tracks[r][i(296)]||!this[i(357)][r][i(428)][i(268)])return!1}return!0},n[Ie(181)]=function(t){for(var i,n=Ie,r=Ft(this[n(335)]);!(i=r()).done;){var e=i.value,s=t[e];s.length>0&&this[n(357)][e][n(181)](s,"audio"===e?t.audioSampleAuxInfo:t[n(310)],t[n(332)])}this[n(246)]()},i}(Le);function ze(){var t=["stsd","isSupported","src","STSD","endMSE","abort","size","appendBufferError","addSourceBuffer","setupMSE","remuxer","addEventListener","max","com.widevine","readUEG"," - ","remux","Received ","FTYP","readyState","valid","ntype","readUInt","byteOffset","error","hdlr","sampleAuxInfo","webkitsourceopen","Checking codec","getSize","irrecoverableError","isfmb","[MSE] buffer error:","url","encrypted","apply","encryption","startsWith","getPayload","saio","open","[MSE] source buffer error","mp4track","append","getNri","codec","isReady","types","STCO","feed","mdia",'VALUE="',"schi","STSZ","offAll","jmuxer","skipEG","nextDts","1036611gAoRea","generatePlayReadyHeader","dispatch","cbcs","stsc","endOfStream","6576815frVeWy","minf","releaseBuffer","readUShort","track","type","stsz","isvcl","width","map","readBoolean","mvhd","onReady","saiz","reportDiscontinuity","mdat","bufferControllers","flush","patchSampleAuxinfo","readEG","","reset","set","onMSEClose","setUint16","idr","smhd","parseSPS","bind","message","getBits","initialized","sourceBuffer","destroy","len","isNonSync","warn","dOps","extractNALUs","length","","listener","trun","AUD","SEI","timescale","Num frames in chunk: ","7620738FWzrwf","mode","tkhd","dbgMediaDump","dref","addTrack","doAppend","options","[MSE] sourceclose","drm","mediaSource","Failure: Browser doesn't support MSE/MMS",'/mp4; codecs="',"function","duration","min","avc1.","traf","[MSE] sourceopen","moov","readyToDecode","resetTrack","tenc","onMSEOpen","MediaSource","removeSourceBuffer","h264","encv","sourceopen","trex","isKeyframe","SMHD","","stype","videoSampleAuxInfo","ended","getElementById","getUint8","slice","audioSampleAuxInfo","data","ready","frma","mseReady","string","4760043VatbTq","mvex","org.w3.clearkey","SPS","buffered","no video element were found to render, provide a valid video element","getPayloadSize",'","out",'","units","Unsupported DRM type ","enca","call","POSITIVE_INFINITY","com.apple.fps","","getVideoFrames","646233hEZDuD","4LuRDMh","nri","mp4a","ManagedMediaSource","buffer error","push","audio","avcC","onError","Buffered range ","getTrackID","","byteLength","No A/V data","video","Opus","both","HDLR_TYPES","readUByte","sdtp","STTS","hasRedundancy","","revokeObjectURL","BYTES_PER_ELEMENT","webkitsourceclose","IDR","samples","keyId","timestamp gap: ","node","readSPS","setData","pps","onBuffer","remuxController","seq","VMHD","initSegment","ceil","sinf","sourceclose","mfhd","skipLZ","http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader","Browser does not support codec","pssh","mediasource is not available to end: ","NDR","isReset","bitsAvailable","payload","DINF","keyFrame","isDependedOn","isTypeSupported","assign","waitingForIdr","8hmeyto","config","skipBits","remove","bitLength","[H264Parser] IDR without SPS/PPS, not suitable for recovery","TYPES","13659xNePtU","getFramePayload","onBufferError","mediaDuration","mp4"];return(ze=function(){return t})()}var qe=function(t){function i(i,n,r){var e,s,u=Ie;(e=t.call(this,u(366))||this)[u(234)]=n,e[u(337)]=new I;var o=null==(s=Ae.mediaDumps[n])?void 0:s[u(352)].durationMs;return o>0&&(e[u(279)]=new Ee(n,u(164),o)),e.sourceBuffer=i,e[u(385)]=r,e[u(195)]=!1,e[u(261)].addEventListener(u(189),function(t){var i=u;Re.warn(i(206),t,e.type),e[i(195)]=!0,e.dispatch("error",{type:e[i(234)],name:i(366),error:i(405)})}),e}Pt(i,t);var n=i.prototype;return n[Ie(262)]=function(){var t=Ie;this[t(337)]=null,this[t(279)]=null;try{this[t(261)]&&(this.sourceBuffer[t(170)](),this.mse[t(301)](this[t(261)]),this.sourceBuffer=null)}catch(t){}this.offAll()},n[Ie(282)]=function(){var t=Ie;if(this[t(337)][t(268)]&&this[t(261)]&&!this.sourceBuffer.updating){if(this[t(261)].buffered.length>1){for(var i=0;i=0&&(e[c][n(392)]=e[c][n(392)].concat(r))}return 1!==e[n(268)]&&Re.warn(n(275)+e[n(268)]),e},n[Ie(360)]=function(t,i){if(!t)return 0;for(var n=(t[0]<<8)+t[1],r=i+2+4,e=0,s=2;0=0&&(t[r]=e>>>8&255,t[r+1]=255&e)}return 0},n[Ie(376)]=function(){var t=Ie;if(this[t(319)]&&this[t(436)]&&this[t(436)][t(211)]()&&!this[t(245)])for(var n in this[t(245)]={},this[t(436)][t(357)]){var r=this.remuxController[t(357)][n],e=""[t(389)](n,t(288)).concat(r.mp4track[t(210)],'"');if(Re[t(381)](t(193),e),!i[t(166)](e))return Re.error(t(446)),!1;var s=this.mediaSource[t(173)](e);this[t(245)][n]=new qe(s,n,this[t(286)]),this[t(245)][n].on(t(189),this[t(162)][t(257)](this))}},n[Ie(231)]=function(){var t=Ie;for(var i in this.bufferControllers)this[t(245)][i][t(282)]()},n[Ie(435)]=function(t){var i=Ie;this[i(319)]&&this[i(245)]&&this[i(245)][t[i(234)]]&&this[i(245)][t[i(234)]].feed(t[i(452)],t[i(336)])},n.onMSEOpen=function(){var t=Ie;Re[t(381)](t(294)),this[t(286)].readyState!==t(311)&&(this[t(286)][t(290)]=Number[t(396)],this[t(319)]=!0,W(this[t(283)].onReady)===t(289)&&this[t(283)][t(241)][t(395)](null,this.isReset),URL[t(424)](this[t(198)]),this[t(376)]())},n[Ie(252)]=function(){var t=Ie;Re[t(381)](t(284)),this.mseReady=!1,this[t(169)]()},n.onBufferError=function(t){var i=Ie;Re.warn(i(197),t),this[i(195)]=!0,this.endMSE(),W(this.options[i(409)])===i(289)&&this[i(283)][i(409)][i(395)](null,t)},i.isSupported=function(t){var i=Ie;return f[i(404)]?f.ManagedMediaSource[i(150)](t):!!f[i(300)]&&f[i(300)][i(150)](t)},i}(Le);function Ge(t,i){var n=Qe();return(Ge=function(t,i){return n[t-=182]})(t,i)}function Qe(){var t=["1247170HwkwNv","Av","gitVersion","352GaBvIm","toISOString","14XlATBT","2568948xDjIMf","1027225mjPCDe","19691yiLZrh","195999uPnZlk","3038288UlnUQm","2033937CLMUfn"];return(Qe=function(){return t})()}!function(){for(var t=Ge,i=Qe();;)try{if(T(t(182))/1+T(t(192))/2*(T(t(184))/3)+-T(t(185))/4+-T(t(187))/5+T(t(193))/6+-T(t(183))/7*(T(t(190))/8)+-T(t(186))/9==553943)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var Ye=ts;function $e(){var t=["1236858jPUtaw","certificate","11225xsjioT","275391VrsSlK","5816evMpkd","CrsCCAMSEKDc0WAwLAQT1SB2ogyBJEwYv4Tx7gUijgIwggEKAoIBAQC8Xc/GTRwZDtlnBThq8","7299lkgbxa","1470Lkqtku","production","Development","charCodeAt","xUuwokpsqVIHZrJfu62ar+BF8UVUKdK5oYQoiTZd9OzK3kr29kqGGk3lSgM0/p499p/FUL8oH","baseUrl","375060LzZhzk","230861ZKueQt","12pvGCSu","https://lic.drmtoday.com","35fxICRY","pQnNI61gzHO42XZOMuxytMm0F6puNHTTqhyY3Z290YqvSDdOB+UY5QJuXJgjhvOUD9+oaLlvT","Production","development","https://lic.test.drmtoday.com","UrTEfQxfPR4dJTquE+IDLAi5yeVVxzbAgMBAAE6DGNhc3RsYWJzLmNvbUABEoADMmGXpXg/0q","from","RL9KsD0v7ysBQVdUXEbJotcFz71tI5qc3jwr6GjYIPA3VzusD17PN6AGQniMwxJV12z/EgnUo","baigovcoURAZcr1d/G0rpREjLdVLG0Gjqk63Gx688W5gh3TKemsK3R1jV0dOfj3e6uV/kTpsN","pcFB13osydpD2AaDsgWo5RWJcNf+fzCgtUQx/0Au9+xVm5LQBdv8Ja4f2oiHN3dw","V382D1oJAM0F/YgCQtNDLz7vTWJ+QskNGi5Dd2qzO4s48Cnx5BLvL4H0xCRSw2Ed6ekHSdrRU","27eI5MATX39gYtCnn7dDXVxo4/rCYK0A4VemC3HRai2X3pSGcsKY7+6we7h4IycjqtuGtYg8A","HzgsJ7Hajdsyzn0Vs3+VysAgaJAkXZ+k+N6Ka0WBiZlCtcunVJDiHQbz1sF9GvcePUUi2fM/h","Staging","staging","name"];return($e=function(){return t})()}!function(){for(var t=ts,i=$e();;)try{if(T(t(326))/1+T(t(325))/2+T(t(315))/3+T(t(327))/4*(-T(t(314))/5)+-T(t(312))/6+T(t(329))/7*(T(t(316))/8)+-T(t(318))/9*(T(t(319))/10)==181728)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var Ke=Ye(317)+Ye(306)+"wyoYOE+M/t1oIbccwlTQ7o+BpV1X6TB7fxFyx1jsBtRsBWphU65w121zqmSiwzZzJ4xsXVQCJ"+Ye(330)+"+vwmV2/NJWxKqHBKdL9JqvOnNiQUF0hDI7Wf8Wb63RYSXKE27Ky31hKgx1wuq7TTWkA+kHnJT"+Ye(334)+Ye(323)+Ye(308)+"7hyskG5ZLAyJMzTvgnV3D8/I5Y6mCFBPb/+/Ri+9bEvquPF3Ff9ip3yEHu9mcQeEYCeGe9zR/"+Ye(307)+Ye(304)+Ye(336)+Ye(305),Je=I[Ye(335)](f.atob(Ke),function(t){return t[Ye(322)](0)}),Ze=function(){function t(t){this[Ye(311)]=t}var i=t.prototype;return i.toString=function(){return this.name},i[Ye(324)]=function(){var t=Ye;switch(this[t(311)]){case"staging":return"https://lic.staging.drmtoday.com";case"development":return t(333);default:return t(328)}},i[Ye(313)]=function(){return Je},t}();function ts(t,i){var n=$e();return(ts=function(t,i){return n[t-=304]})(t,i)}Ze[Ye(309)]=new Ze(Ye(310)),Ze[Ye(331)]=new Ze(Ye(320)),Ze[Ye(321)]=new Ze(Ye(332));var is=ns;function ns(t,i){var n=rs();return(ns=function(t,i){return n[t-=252]})(t,i)}function rs(){var t=["SampleAuxInfo corrupted","error","50012RXzLep","3301necisu","[RTC-DRM]","subarray","buffer","64zGPhLV","162pDdDkb","659466dfDPqj","SampleAuxInfo corrupted (postfix not found)","data","4199670WddvRf","95WaGAXy","getUint8","137436hbCkvG","1351035XuhSnW","getUint16","byteLength","184863QcuifQ"];return(rs=function(){return t})()}!function(){for(var t=ns,i=rs();;)try{if(-T(t(253))/1*(T(t(258))/2)+T(t(259))/3+T(t(252))/4*(-T(t(263))/5)+-T(t(265))/6+-T(t(269))/7*(-T(t(257))/8)+-T(t(266))/9+T(t(262))/10==173102)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var es=be(is(254));!function(){for(var t=us,i=as();;)try{if(T(t(369))/1+T(t(374))/2+T(t(366))/3+-T(t(373))/4+-T(t(365))/5+-T(t(368))/6*(T(t(370))/7)+T(t(367))/8==110661)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var ss=[];function us(t,i){var n=as();return(us=function(t,i){return n[t-=365]})(t,i)}var os=null,hs=0;function as(){var t=["799144UpkRWz","356926NfeJZx","set","slice","237700RBIjTO","627444ELwjUL","76968OxbdcX","6xPMWky","172231EpHRtx","1480332fEizHX","push","buffer"];return(as=function(){return t})()}var cs=Is;!function(){for(var t=Is,i=ws();;)try{if(-T(t(452))/1+-T(t(412))/2+-T(t(478))/3*(T(t(441))/4)+-T(t(485))/5*(-T(t(415))/6)+-T(t(400))/7+T(t(460))/8*(-T(t(486))/9)+-T(t(437))/10*(-T(t(470))/11)==412983)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var fs=be(cs(424)),vs={licenseUrl:"",onFetch:void 0},ds={},ls=function(t,i,n){return void 0===i&&(i=0),void 0===n&&(n=1/0),function(t,i,n){var r=cs,e=I.BYTES_PER_ELEMENT;i*=e,n*=e;var s,u=j(s=t,ArrayBuffer)?s:s[cs(484)],o=t[r(483)],h=i,a=A[r(432)](0,A.min(h,o)),c=A.min(a+A[r(432)](n,0),o);return new I(u,a/=e,(c/=e)-a)}(t,i,n)},gs=function(t){for(var i,n=cs,r="",e=Ft(t);!(i=e()).done;){var s=i.value.toString(16);1==s[n(433)]&&(s="0"+s),r+=s}return r};function ws(){var t=["360308tFqTFd","usable for decryption (status: ","oct","decode","parse","license","parseFromString","message","8pQccIM","No clear key test key provided!","generateRequest","text/xml","Failed to update the session: ","output-downscaled","target","apply","bind","Failed to update the session","24280927IKsRHd","No PR challenge data!","kids","status","getElementsByTagName","rtcdrmerror","CK license request:","A128KW","3KcCnPp","createSession","License acquisition failed with error ","No media keys for media element!","stringify","byteLength","buffer","82765KyOCry","7206525fRtYVA","error","btoa","9a04f07998404286ab92e65be0885f95","set","[PR] License fetched:","getUint16","onFetch","4630892EspqDe","addEventListener","debug","has","json","Previous lic will be reused","internal-error","subarray","fromCharCode","expired","text","temporary","665922eWbQGg","then","[FPS] License fetched:","174puebov","Content-Type","update","POST","2?n-2:0),e=2;e-1){var s=r[n(458)](e,n(463))[n(474)]("Challenge")[0].childNodes[0][n(420)];if(null===s)throw new y(n(471));return _s(s)}fs[n(444)]("[PR] Challenge node not found")}catch(i){t[n(446)](new CustomEvent(n(475),{detail:{message:""+i}})),fs[n(393)](i)}return null}(t,i.message);if(null===r)return t[n(446)](new CustomEvent("rtcdrmerror",{detail:{message:n(471)}})),void fs[n(393)](n(471));ks(vs[n(445)],r[n(484)],!0)[n(413)](function(t){return t[n(440)]()})[n(413)](function(r){var e=n;fs[e(402)](e(397),r),i[e(466)][e(417)](r)[e(439)](function(i){var n=e;t[n(446)](new CustomEvent(n(475),{detail:{message:n(464)+i}})),fs[n(393)]("Failed to update the session",i)})}).catch(function(i){var r=n;t.dispatchEvent(new CustomEvent(r(475),{detail:{message:""+i}})),fs[r(393)](i)})},Ts=function(t,i){var n=cs;ks(vs.licenseUrl,i[n(459)])[n(413)](function(t){var i=n,r=t[i(410)]();return fs[i(402)](i(414),t,r),r})[n(413)](function(t){var r=n;i.target[r(417)](_s(t))})[n(439)](function(i){var r=n;t[r(446)](new CustomEvent(r(475),{detail:{message:""+i}})),fs.error(i)})},Ss=function(t,i){ds[t]=i},Es=pe.isSafari;function Is(t,i){var n=ws();return(Is=function(t,i){return n[t-=393]})(t,i)}var Rs=!Es,Cs=new Map;function Ps(t){return se(this,void 0,void 0,function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:if(i=Is,null===t.initData)throw new y(i(442));if(null===(n=t[i(466)]))throw new y(i(426));if(null===(r=n.mediaKeys))throw new y(i(481));e=gs(new I(t[i(423)])),s=e+n.id,u=null,Cs[i(403)](s)&&(null!=(u=Cs.get(s))&&u.close(),Cs.delete(s)),fs[i(402)](i(u?405:435)),o=null;try{o=r.createSession(Rs?"persistent-license":"temporary")}catch(t){fs[i(402)]("EME createSession(persistent) failed:",t)}if(!o&&Rs){Rs=!1;try{o=r[i(479)](i(411))}catch(t){fs.error("EME createSession(temporary) failed:",t)}}if(!o)return[3,7];if(o.addEventListener(i(450),function(t){var r=i;t[r(466)][r(430)][r(431)](function(t,i){var e=r;(t===e(409)||"output-restricted"===t||t===e(465)||t===e(406))&&n[e(446)](new CustomEvent(e(475),{detail:{message:"Key "+gs(new I(i))+" is not "+(e(453)+t)+")",keyId:i}}))})}),Es?o[i(401)](i(459),Ts.bind(null,n),!1):-1!==e.indexOf(i(436))?o[i(401)](i(459),bs[i(468)](null,n),!1):-1!==e[i(434)](i(395))?o.addEventListener(i(459),As[i(468)](null,n),!1):o.addEventListener(i(459),ys[i(468)](null,n),!1),!u)return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,o.load(u[i(422)])];case 2:return a.sent()?Cs[i(396)](s,o):n[i(446)](new CustomEvent(i(475),{detail:{message:i(428)}})),[3,4];case 3:return h=a.sent(),n[i(446)](new CustomEvent(i(475),{detail:{message:i(451)+h}})),[3,4];case 4:return[3,6];case 5:o[i(462)](t[i(429)],t[i(423)])[i(413)](function(){Rs&&Cs[i(396)](s,o)})[i(439)](function(t){var r=i;n.dispatchEvent(new CustomEvent(r(475),{detail:{message:r(427)+t}}))}),a.label=6;case 6:return[3,8];case 7:n[i(446)](new CustomEvent(i(475),{detail:{message:i(449)}})),a.label=8;case 8:return[2]}})})}var Ds=Zs;!function(){for(var t=Zs,i=$s();;)try{if(-T(t(462))/1*(-T(t(532))/2)+-T(t(543))/3+T(t(682))/4+-T(t(692))/5*(T(t(588))/6)+-T(t(539))/7+T(t(496))/8+-T(t(549))/9==672532)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var Ns=be(Ds(673)),xs=pe[Ds(607)],Bs=pe[Ds(540)],Os=pe[Ds(647)],Ms=pe[Ds(489)],Ls=pe[Ds(478)],Fs=pe.platform,Us=pe[Ds(620)],Vs=Ms||Ls&&Fs===Ds(578),js=1e6*(Bs?82:Os?220:120),Hs=Bs?5e3:2e3,Ws=Bs?1.5:.5;function zs(t){var i,n=Ds;return(void 0===t?"undefined":W(t))!==n(672)||null===t||j(t,Element)||j(t,Ze)?t:j(null==(i=t)?void 0:i[Ds(584)],ArrayBuffer)&&null!=i&&i.BYTES_PER_ELEMENT?t[n(550)]():Array[n(636)](t)?t.reduce(function(t,i,n){return t[n]=zs(i),t},[]):j(t,b)?b.keys(t).reduce(function(i,n){return i[n]=zs(t[n]),i},{}):t}var qs=function(t){var i=Ds;this[i(547)]="",this[i(471)]="",this.keySystem="",this[i(603)]=[],this[i(479)]=zs(t),this.jmuxer=null,this.keyFrameLogCntr=0,this[i(561)]=Date[i(658)](),this[i(585)]=0,this[i(602)]=0,this[i(490)]=-1,this[i(680)]=0,this[i(596)]=0,this[i(491)]=!0,this.keyFrameNeededPosted=!1,this[i(617)]=Hs,this[i(500)]=null,this.dbgMediaDump={video:null,audio:null}},Xs=new Map,Gs=new I([60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60]),Qs=new I([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]),Ys=new I([213,251,214,184,46,217,62,78,249,138,228,9,49,238,51,183]);function $s(){var t=["isSafari","ansform=$=>{let e=$.transformer;handleTransform(e.options.operation,e.readable,e.writable)}),onmessage=$=>{keyFra","status","DRM config:","key","Development"," will be used","Staging","const DUMMY_IDR_FRAME_SLICE_HDR0=new Uint8Array([32,0,203]),DUMMY_IDR_FRAME_SLICE_HDR1=new Uint8Array([16,0,50]);","enabled","playback at ","now",".experiment","seq","videoElement","data","btoa","PlayReady might not support '","logLevel","cbcs-1-9","encryption"," to ","offset","x-dt-custom-data","let brokenFrame=null,idrFrames=[];function initializeDummyFrames(){brokenFrame=new Uint8Array([0,0,0,1,65,154,255","object","[RTC-DRM]","not-allowed","durationMs","Default transform mode enabled, ","keySystem","timestamp","DRM config keyId must be an instance of 16-byte long Uint8Array.","lastKeyFrameTime","H264 is the only supported video codec.","2533916KeNZJm","out","Applying pre-configured certificate (","buffered","Widevine","x-dt-auth-token"," ms)","com.microsoft.playready.recommendation","error","currentTime","225RwtgWL","end","requestMediaKeySystemAccess","50705YjLCIv","onmessage","environment","wvLicenseUrl","a1d1f1"," requesting a new key frame (latency ","userId","ClearKey","createEncodedStreams","licenseUrl","PlayReady license acquisition might fail without output protection enabled (sessionId is ","feed","dbgMediaDump","jmuxer","MSE (re)init",",255]).buffer,idrFrames.push(new Uint8Array([0,0,0,1,39,100,0,13,172,87,5,6,100,0,0,0,1,40,238,60,176,0,0,0,1,37,","isChrome","config","forEach","Invalid config argument type, DRM config must be an object.","hwSecurity","audioEncrypted","setMediaKeys","fpsCertificate","Unable to create Worker!","GET","customTransform","isEdge","prevSeqNum","keyFrameNeeded","encrypted","targetLatency not set!","opus","FairPlay","7963992IJNztq","streamType","SampleAuxInfo extraction failed (video)"," seeking from ","worker","]: ","video","kind","audio","jitterBufferDelayHint","size","No target media element!","fpsCertificateUrl","wvCertificate","delimited","3000","pipeThrough","/license-server-fairplay/cert/","string",") not found in [","indexOf","warn","ignoreAudio","append","jitterBufferTarget","prLicenseUrl","sessionTypes","authToken","get","RTCRtpScriptTransform","audioElement","catch","trim","join","waitingForIdr","info","52hXHKkY","enqueue","). It has to be a string containing a JWT.","playbackRate","sai","persistent-license","Blob","2699340CvuQCI","isFirefox","transform",'rame:{type:$.type,timestamp:$.timestamp,data:$.data}}),"key"===$.type&&(keyFrameNeeded=!1),$.data=generateDummyFr',"554109usxuWq"," will not be created, use rtcDrmFeedFrame to push frames manually","bind","streams","serverCertificateUrl","includes","3473577nNrBJc","slice","URL","serverCertificate","length","Invalid authToken type (","addEventListener","', it's safer to use 'cbcs' instead.","srcObject","ClearKey is not supported by Safari.","meNeeded=$.data};","value","nextKeyFrameAllowedTime","Error recovery attempted","rtcdrmerror","184,32,0,203,255,38,29,217,24,192,161,96,0,0,12,229,174,166,6,7,20,3,84,0,247,96,193,181,229,128,0,32,32]).buffer"," bytes","both","debug","No valid DRM config found, call rtcDrmConfigure first.","dispatchEvent","certificate","mediaBufferMs","clear","merchant","src","sessionId","reportDiscontinuity","mediaBufferMs should be an integer.","Android","rtcDrmConfigure did not specify audioElement, audio will be dropped","/license-proxy-widevine/cenc/","arrayBuffer","). Edge only supports PlayReady, Widevine and ClearKey.","). Chrome only supports Widevine and ClearKey.","buffer","videoStartTimestamp",'audio/mp4; codecs="opus"',"set","175800AyhMKK","PlayReady","SampleAuxInfo extraction failed (audio)","cenc","codec","videoCapabilities",".. ","Duplicate/reordered frame, prev seq: ","bytesSinceKey","wvCertificateUrl","/license-proxy-headerauth/drmtoday/RightsManager.asmx","robustness","baseUrl","type","audioStartTimestamp","emeConfig","com.widevine.alpha","SW_SECURE_CRYPTO","fpsLicenseUrl","supportsRtpScriptTransform","Target video element (","?audioTransformFunction:videoTransformFunction});e.pipeThrough(a).pipeTo(x)}self.RTCTransformEvent&&(self.onrtctr","createObjectURL","playoutDelayHint","POSITIVE_INFINITY",'ame(keyFrameNeeded),e.enqueue($)}function handleTransform($,e,x){let a=new TransformStream({transform:"audio"===$',"track",'video/mp4; codecs="avc1.640032"',"cbcs","keyFrameRequestInterval","Frame gap: ","keyFrameNeededPosted","isWindows","HW_SECURE_ALL"," bytes, ","GOP is getting too long, requesting a new key frame","temporary","Safari does not support Opus, audio will not be rendered.","stringify","byteLength","message"," frame","H264","mediaDumps","h264","keyFrameLogCntr","requestMediaKeySystemAccess(","Safari doesn't support 'cenc'/AES-CTR, use 'cbcs' instead if possible.","isArray","Invalid DRM type (","DRM config iv must be an instance of 16-byte long Uint8Array.","keyId","pipeTo"," - ","receiver","isInteger","toString","onFetch","next"];return($s=function(){return t})()}function Ks(t){var i=Ds,n=!1;if((t[i(479)][i(502)]&&t[i(479)].video[i(667)]!==i(572)&&"HW"===t[i(479)][i(502)][i(599)]||t[i(479)][i(504)]&&t[i(479)][i(504)][i(667)]!==i(572)&&"HW"===t.config[i(504)][i(599)])&&(n=!0),t.hwSecurity=n,function(t,i){var n=Ds;void 0!==i&&(t[n(479)].mediaBufferMs=i),(void 0===t[n(479)][n(571)]||t.config[n(571)]<0)&&(t[n(479)].mediaBufferMs=100,Bs?t[n(479)][n(571)]=350:!Os&&Us&&("PlayReady"===t.config[n(601)]||t[n(482)])&&(t.config[n(571)]=1400))}(t,t[i(479)][i(571)]),void 0===t.config[i(523)]){void 0===t[i(479)][i(468)]&&(t[i(479)][i(468)]="purchase"),void 0===t[i(479)][i(575)]&&(t.config[i(575)]=i(466));var r=f[i(663)](JSON[i(626)]({userId:t[i(479)].userId,sessionId:t.config.sessionId,merchant:t[i(479)].merchant}));Ss(i(670),r)}else Ss(i(687),t[i(479)][i(523)]);for(var e=0,s=[t[i(479)][i(504)],t[i(479)][i(502)]];e=4;++t[r(633)]<(u?Number[r(612)]:5)&&(Ns.debug(Te()+" "+i[r(601)]+", "+i.data.byteLength+r(622)+(r(657)+t.config[r(661)].currentTime)),u&&1===t.keyFrameLogCntr&&function(t,i,n){void 0===i&&(i=64),void 0===n&&(n=64);for(var r=Ds,e=new I(t[r(662)]),s="",u=0,o=0;ojs&&(Ns.info(r(623)),t[r(491)]=!0),t[r(475)]&&(function(t,i){var n=Ds;0===t.videoStartTimestamp&&(t.videoStartTimestamp=i.timestamp,t[n(617)]=Hs,t[n(561)]=Date.now()+2e3);var r=null,e=!1;if(i[n(662)][n(627)]<=4)Ns[n(517)]("Discarding corrupted video frame (too small)"),e=!0;else{var s=new I(i[n(662)],0,4);0!=s[0]||0!=s[1]||0!=s[2]||1!=s[3]?(Ns.warn("Discarding corrupted video frame (no Annex B startcode)"),e=!0):!(r=function(t,i){var n=is,r=new DataView(t.data),e=t.data[n(268)]-2,s=r[n(267)](e);if(s>>4!=1)return es[n(271)]("Unsupported SampleAuxInfo version"),null;for(var o=new I(s-2),h=0,a=0;u1&&3===c&&(a=0,c=r.getUint8(u++)),0!==c?a=0:++a,o[h++]=c}var f=new DataView(o[n(256)]),v="cenc"===i?16:0,d=v+2+6*f[n(267)](v);return d+2>h?(es[n(271)](n(270)),null):{sai:o[n(255)](0,d),offset:e-s,seq:f[n(267)](d)}}return null}(i,t.config[n(502)][n(667)]))&&(Ns.warn(n(498)),e=!0)}if(r)if(i[n(601)]===n(651))t[n(490)]=r.seq;else{if(-1===t[n(490)])return 0;var u=r[n(660)]-t[n(490)];if(u<-32767&&(u+=65536),u<=0)return Ns.debug(n(595)+t.prevSeqNum+", curr: "+r.seq),0;u>1&&(e=i[n(601)]!==n(651),Ns[n(517)](n(618)+t[n(490)]+n(641)+r[n(660)]+", restart required: "+e)),t.prevSeqNum=r[n(660)]}var o=0;e&&!t[n(475)][n(530)]&&(o=-1,t[n(475)][n(576)]());var h=(i[n(678)]-t[n(585)])/9e4;return r&&t[n(475)][n(473)]({video:new I(i[n(662)],0,r.offset),videoSampleAuxInfo:r[n(536)],timestamp:h})<0&&(o=-1,Ns[n(517)](n(562)),Js(t)),o>=0&&i[n(601)]===n(651)&&(t[n(680)]=h),o}(t,i)<0?t[r(491)]=!0:function(t){var i=Ds,n=t[i(479)][i(661)];if(!(!n||n[i(685)][i(553)]<1||n.paused||n[i(691)]>>2?.875:s<=u?1:s<7*u>>>2?1.125:s<9*u>>>2?1.25:s<11*u>>>2?1.375:1.5)!==(e=n).playbackRate&&(e[h(535)]=o)),!(c>>2))if(t[i(680)]>n[i(691)]+.1){var f=1e3*(a-t.lastKeyFrameTime)|0;f>40&&f>r-100?(Ns.debug(Te()+i(499)+(n[i(691)]+i(668)+t.lastKeyFrameTime+" (")+(t[i(680)]-n[i(691)])+")"),n[i(691)]=t[i(680)]):Ns[i(567)](Te()+" too close to seek, "+f)}else!t.keyFrameNeeded&&Date[i(658)]()>t[i(561)]&&c>r+100&&c>3*r>>>1&&(Ns[i(567)](Te()+i(467)+c+i(688)),t[i(491)]=!0,t[i(617)]<16e3&&(t[i(617)]<<=1))}}(t)),n?(!t[r(491)]||!Vs)&&(i[r(662)]=function(t){return!os&&(i=us,os=new I([0,0,0,1,65,154,255,255])[i(372)],ss[i(371)](new I([0,0,0,1,39,100,0,13,172,87,5,6,100,0,0,0,1,40,238,60,176,0,0,0,1,37,184,32,0,203,255,38,29,217,24,192,161,96,0,0,12,229,174,166,6,7,20,3,84,0,247,96,193,181,229,128,0,32,32])[i(372)]),ss[i(371)](ss[0][i(376)](0)),new I(ss[1])[i(375)]([16,0,50],27)),t?os:ss[hs^=1];var i}(t[r(491)]),n[r(533)](i)):t[r(491)]!=t.keyFrameNeededPosted&&(t[r(500)]&&t.worker.postMessage(t[r(491)]),t.keyFrameNeededPosted=t[r(491)]),t.keyFrameNeeded}function iu(t,i,n){var r=Ds;if(t.dbgMediaDump.audio){var e=i[r(678)]/48;t[r(474)][r(504)][r(519)](new I(i.data),e)||(t.dbgMediaDump[r(504)]=null)}return t[r(479)].audio&&t[r(479)].audio[r(667)]!==r(572)?i[r(662)][r(627)]>0&&function(t,i){var n,r=Ds;if(!t[r(475)]||t[r(518)])return 0;0===t[r(602)]&&(t.audioStartTimestamp=i[r(678)]);var e=(i[r(678)]-t[r(602)])/48e3;if((null===(n=t[r(479)][r(504)])||void 0===n?void 0:n[r(667)])===r(616))return t.jmuxer[r(473)]({audio:new I(i[r(662)]),timestamp:e});var s=function(t){var i=is,n=new DataView(t[i(261)]),r=t.data[i(268)]-2,e=n[i(267)](r);if(e>>4!=1)return es[i(271)]("Unsupported SampleAuxInfo version"),null;for(var u=new I(e-2),o=0;s=16)break}return{sai:u,offset:r-e}}return null}(i);s?t.jmuxer[r(473)]({audio:new I(i[r(662)],0,s[r(669)]),audioSampleAuxInfo:s[r(536)],timestamp:e}):Ns[r(690)](r(590))}(t,i):n&&n[r(533)](i),!1}function nu(t){var i,n,r,e,s,u=Ds;if(!t||(void 0===t?"undefined":W(t))!==u(672))throw new _(u(481));if(!j(t.videoElement,HTMLVideoElement))throw new _("Invalid videoElement, it must be an instance of HTMLVideoElement.");if(t[u(526)]&&!j(t[u(526)],HTMLMediaElement))throw new _("Invalid audioElement, it must be an instance of HTMLMediaElement.");if(void 0!==t[u(571)]&&!Number[u(643)](t[u(571)]))throw new _("DRM config mediaBufferMs should be an integer.");for(var o=!1,h=!1,a=!1,c=[u(616),"cenc",u(572)],f=["SW","HW"],v=0,d=[t.video,t[u(504)]];v=0))return[3,9];null===(r=t[i(603)][0][i(522)])||void 0===r||r.splice(u,1),p.label=6;case 6:return p.trys.push([6,8,,9]),[4,l[i(461)](t[i(677)],t[i(603)])];case 7:return s=p.sent(),[3,9];case 8:return p.sent(),[3,9];case 9:if(!s)return o=i(634)+t[i(677)]+") failed",[2,(e[i(569)](new CustomEvent(i(563),{detail:{message:o}})),void Ns[i(690)](o))];h=null,p.label=10;case 10:return p.trys.push([10,12,,13]),[4,s.createMediaKeys()];case 11:return h=p.sent(),[3,13];case 12:return p.sent(),[3,13];case 13:return h?t.serverCertificate?(Ns[i(567)](i(684)+t[i(552)][i(627)]+" bytes)"),[4,h.setServerCertificate(t[i(552)])]):[3,15]:(a="createMediaKeys("+t.keySystem+") failed",[2,(e.dispatchEvent(new CustomEvent(i(563),{detail:{message:a}})),void Ns[i(690)](a))]);case 14:return p.sent(),[3,21];case 15:if(!t[i(547)])return[3,21];c={method:i(487)},f=t.serverCertificateUrl,p.label=16;case 16:return p.trys.push([16,20,,21]),[4,t.config[i(645)]?t[i(479)][i(645)](f,c):fetch(f,c)];case 17:return(v=p.sent()).ok?[4,v[i(581)]()]:(d="Server certificate fetch failed with error "+v[i(649)],[2,void e[i(569)](new CustomEvent(i(563),{detail:{message:d}}))]);case 18:return g=p.sent(),Ns[i(567)]("Fetched certificate from "+f+", "+g.byteLength+i(565)),[4,h.setServerCertificate(g)];case 19:return p.sent(),[3,21];case 20:return w=p.sent(),m=w.name+": "+w[i(628)],[2,(Ns[i(690)](m),void e[i(569)](new CustomEvent("rtcdrmerror",{detail:{message:m}})))];case 21:return[4,e[i(484)](h)];case 22:return p.sent(),e[i(555)](i(492),Ps),Js(t),[2]}})})}(A)),A[u(479)][u(661)][u(555)]("play",function(){var t=u;A[t(479)][t(661)][t(691)]>.5&&(A[t(561)]=Date[t(658)]())})}var ru=Ds(655)+Ds(671)+Ds(477)+Ds(564)+'),idrFrames.push(idrFrames[0].slice());let $=new Uint8Array(idrFrames[1]);$.set([16,0,50],27)}let idrPicIdToggle=0;function generateDummyFrame($){return(brokenFrame||initializeDummyFrames(),$)?brokenFrame:idrFrames[idrPicIdToggle^=1]}function audioTransformFunction($,e){postMessage({streamType:"audio",frame:{timestamp:$.timestamp,data:$.data}}),e.enqueue($)}let keyFrameNeeded=!1;function videoTransformFunction($,e){postMessage({streamType:"video",f'+Ds(542)+Ds(613)+Ds(609)+Ds(648)+Ds(559);function eu(t){var i,n=Ds;if(0===Xs[n(506)])throw new _(n(568));if(t&&t[n(661)])i=t.videoElement;else{if(1!==Xs[n(506)])throw new _("Several DRM configs detected, rtcDrmOnTrack have to be called with target DRM config.");i=Xs.keys()[n(646)]()[n(560)]}var r=Xs[n(524)](i);if(!r){var e="";throw Xs[n(480)](function(t,i){e+=i.id+", "}),e=e[n(550)](0,-2),new _(n(608)+i.id+n(515)+e+"]")}return r}function su(t,i){var n=Ds;if(t&&t.config[n(661)]){var r=t.config[n(661)];if(r.buffered[n(553)]>0){var e=r.buffered[n(693)](r.buffered[n(553)]-1)-r.currentTime;i[n(611)]=i.jitterBufferDelayHint=i[n(520)]=e}g(su,1e3,t,i)}}var uu=wt.get("View");uu.setLevel(wt.DEBUG);var ou={metadata:!1,enableDRM:!1,disableVideo:!1,disableAudio:!1,peerConfig:{autoInitStats:!0,statsIntervalMs:1e3}},hu=function(t){function i(i,n,r,e){var s;return void 0===r&&(r=null),void 0===e&&(e=!0),i&&uu.warn("The streamName property has been deprecated. In a future release, this will be removed. Please do not rely on this value. Instead, set via token generator"),(s=t.call(this,null,n,uu,e)||this).payloadTypeCodec={},s.tracksMidValues={},s.drmOptionsMap=null,s.eventQueue=[],s.isMainStreamActive=!1,r&&(s.on(Un.track,function(t){r.srcObject=t.streams[0]}),uu.warn("The mediaElement property has been deprecated. In a future release, this will be removed. Please do not rely on this value. Instead, do this in either the `track` or the `active` broadcast event.")),s}Pt(i,t);var n=i.prototype;return n.connect=function(){return jt(function(t){return zt(this,function(i){switch(i.label){case 0:return void 0===t&&(t=ou),this.options=w(d(d({},ou),t),{peerConfig:d(d({},ou.peerConfig),t.peerConfig),setSDPToPeer:!1}),this.eventQueue.length=0,[4,this.initConnection({migrate:!1})];case 1:return i.sent(),[2]}})}).apply(this,arguments)},n.select=function(){return jt(function(t){return zt(this,function(i){switch(i.label){case 0:return void 0===t&&(t={}),uu.debug("Viewer select layer values: ",t),[4,this.signaling.cmd("select",{layer:t})];case 1:return i.sent(),uu.info("Connected to streamName: ",this.streamName),[2]}})}).apply(this,arguments)},n.addRemoteTrack=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return uu.info("Viewer adding remote track",t),[4,this.webRTCPeer.addRemoteTrack(t,i)];case 1:for(n=s.sent(),r=Ft(i);!(e=r()).done;)e.value.addTrack(n.receiver.track);return[2,n]}})}).call(this)},n.project=function(t,i){return jt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:for(r=function(){var t=s.value;if(!t.trackId&&!t.media)throw uu.error("Error in projection mapping, trackId or mediaId must be set"),new y("Error in projection mapping, trackId or mediaId must be set");var i=n.webRTCPeer.getRTCPeer();if(t.mediaId&&!i.getTransceivers().find(function(i){return i.mid===t.mediaId.toString()}))throw uu.error("Error in projection mapping, ".concat(t.mediaId," mid not found in local transceivers")),new y("Error in projection mapping, ".concat(t.mediaId," mid not found in local transceivers"))},e=Ft(i);!(s=e()).done;)n=this,r();return uu.debug("Viewer project source: layer mappings: ",t,i),[4,this.signaling.cmd("project",{sourceId:t,mapping:i})];case 1:return u.sent(),uu.info("Projection done"),[2]}})}).call(this)},n.unproject=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return uu.debug("Viewer unproject mediaIds: ",t),[4,this.signaling.cmd("unproject",{mediaIds:t})];case 1:return i.sent(),uu.info("Unprojection done"),[2]}})}).call(this)},n.replaceConnection=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return uu.info("Migrating current connection"),[4,this.initConnection({migrate:!0})];case 1:return t.sent(),[2]}})}).call(this)},n.stop=function(){var i,n;t.prototype.stop.call(this),null==(i=this.drmOptionsMap)||i.clear(),this.DRMProfile=null,null==(n=this.worker)||n.terminate(),this.worker=null,this.payloadTypeCodec={},this.tracksMidValues={},this.eventQueue.length=0},n.initConnection=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a,c,f,v,l,m,p,_,k;return zt(this,function(A){switch(A.label){case 0:if(i=this,uu.debug("Viewer connect options values: ",this.options),this.stopReconnection=!1,t.abrConfiguration&&t.abrConfiguration.metadata&&(!(e=t.abrConfiguration.metadata.bitrate)||e<0))throw new y("Invalid bitrate ".concat(e," supplied for ABR. The value must be a non-negative integer value."));if(!t.migrate&&this.isActive())throw uu.warn("Viewer currently subscribed"),new y("Viewer currently subscribed");A.label=1;case 1:return A.trys.push([1,3,,4]),[4,this.tokenGenerator()];case 2:return s=A.sent(),this.options.peerConfig.iceServers=null==s?void 0:s.iceServers,this.options.peerConfig.encodedInsertableStreams=Gr&&(this.options.enableDRM||this.options.metadata),[3,4];case 3:throw u=A.sent(),uu.error("Error generating token."),j(u,ar)&&(401!==u.status&&this.autoReconnect?this.reconnect():this.stopReconnection=!0),u;case 4:if(!s)throw uu.error("Error while subscribing. Subscriber data required"),new y("Subscriber data required");return o=kr(s.jwt),this.streamName=o.millicast.streamName,h=new ur({streamName:this.streamName,url:"".concat(s.urls[0],"?token=").concat(s.jwt)}),s.subscriberToken&&(this.subscriberToken=s.subscriberToken),[4,(a=t.migrate?new jn:this.webRTCPeer).createRTCPeer(this.options.peerConfig)];case 5:return A.sent(),null==(n=this.stopReemitingWebRTCPeerInstanceEvents)||n.call(this),this.stopReemitingWebRTCPeerInstanceEvents=$t(a,this,b.values(Un).filter(function(t){return t!==Un.track})),this.options.metadata&&(this.worker||(this.worker=new Kr),this.worker.onmessage=function(t){if("metadata"===t.data.event){var n=new TextDecoder,r=t.data.metadata;if(r.mid=t.data.mid,r.track=i.tracksMidValues[t.data.mid],r.uuid){var e=r.uuid;r.uuid=e.reduce(function(t,i){return t+i.toString(16).padStart(2,"0")},""),r.uuid=r.uuid.replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}if(r.timecode&&(r.timecode=new Date(n.decode(r.timecode))),r.unregistered){var s=n.decode(r.unregistered);try{var u=JSON.parse(s);r.unregistered=u}catch(t){uu.info("The content could not be converted to JSON, returning raw bytes instead")}}i.emit("metadata",r)}}),a.on(Un.track,function(t){i.isMainStreamActive?i.onTrackEvent(t):i.eventQueue.push(t)}),h.on(sr,function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.isMainStreamActive||"active"!==t.name?[3,3]:(this.mainSourceId=t.data.sourceId,this.DRMProfile||!t.data.encryption?[3,2]:[4,this.tokenGenerator()]);case 1:(i=n.sent()).drmObject&&(this.DRMProfile=i.drmObject),n.label=2;case 2:for(this.emit(sr,t),this.isMainStreamActive=!0;this.eventQueue.length>0;)this.onTrackEvent(this.eventQueue.shift());return[2];case 3:return"inactive"===t.name&&this.isMainStreamActive&&this.mainSourceId===t.data.sourceId&&(this.isMainStreamActive=!1),this.emit(sr,t),[2]}})}).call(i)}),c=a.getRTCLocalSDP(w(d({},this.options),{stereo:!0})),f=h.connect(),[4,ot.all([c,f])];case 6:return r=A.sent(),v=r[0],l=this.signaling,this.signaling=h,m=this.signaling.subscribe(v,w(d({},this.options),{vad:this.options.multiplexedAudioTracks>0})),p=a.peer.setLocalDescription(a.sessionDescription),[4,ot.all([m,p])];case 7:return r=A.sent(),_=r[0],this.payloadTypeCodec=Nn.getCodecPayloadType(_),[4,a.setRTCRemoteSDP(_)];case 8:return A.sent(),uu.info("Connected to streamName: ",this.streamName),k=this.webRTCPeer,this.webRTCPeer=a,this.setReconnect(),t.migrate&&this.webRTCPeer.on(Un.connectionStateChange,function(t){var i,n;"connected"===t?g(function(){var t,i;null==(t=null==l?void 0:l.close)||t.call(l),null==(i=null==k?void 0:k.closeRTCPeer)||i.call(k),l=k=null,uu.info("Current connection migrated")},1e3):["disconnected","failed","closed"].includes(t)&&(null==(i=null==l?void 0:l.close)||i.call(l),null==(n=null==k?void 0:k.closeRTCPeer)||n.call(k),l=k=null)}),[2]}})}).call(this)},n.onTrackEvent=function(t){var i,n,r;if(this.tracksMidValues[null==(i=t.transceiver)?void 0:i.mid]=t.track,this.isDRMOn){var e=t.transceiver.mid,s=this.getDRMConfiguration(e);try{!function(t,i){var n,r,e=Ds,s=t[e(614)][e(503)];s===e(502)&&(t[e(642)][e(611)]=t.receiver[e(505)]=t[e(642)][e(520)]=0);var u=eu(i),o=u[e(479)][e(661)],h=u.config.audioElement;if(u.enabled){var a=""+e(xs?525:470);if(u[e(479)][e(488)])Ns[e(567)](a+e(544));else{if(Ns[e(567)](e(676)+a+e(653)),s===e(502)){var c=Ae[e(631)][e(502)].in[e(675)];c>0&&(u.dbgMediaDump[e(502)]=new Ee(e(502),e(632),c))}else if(s===e(504)){var v=Ae[e(631)][e(504)].in[e(675)];v>0&&(u[e(474)][e(504)]=new Ee(e(504),e(494),v))}if(xs){if(u[e(500)]=function(t){var i=Ds,n=f[i(551)]||f.webkitURL,r=f[i(538)],e=f.Worker;if(!(n&&r&&e&&t))return null;var s=new r([t]);return new e(n[i(610)](s))}(ru),null==u[e(500)])throw new y(e(486));u[e(500)][e(463)]=function(t){var i=e;t[i(662)][i(497)]===i(502)?tu(u,t.data.frame,null):iu(u,t.data.frame,null)},t[e(642)][e(541)]=new RTCRtpScriptTransform(u.worker,{operation:s})}else{var d=s===e(502)?tu:iu,l={drm:u,transform:function(t,i){d(u,t,i)}},g=t[e(642)][e(470)](),w=new TransformStream({transform:l[e(541)][e(545)](l)}),m=g.readable,p=g.writable;m[e(512)](w)[e(640)](p)}}if("audio"===s&&(null===(n=u.config[e(504)])||void 0===n?void 0:n.encryption)===e(572)){if(!h)return void Ns[e(517)](e(579));h[e(557)]!==t[e(546)][0]&&(h[e(557)]=t.streams[0]),u[e(479)][e(661)]&&(t[e(642)].playoutDelayHint=t.receiver.jitterBufferDelayHint=t[e(642)][e(520)]=u[e(479)][e(571)],su(u,t[e(642)]))}else s===e(502)&&(null===(r=u[e(479)][e(502)])||void 0===r?void 0:r.encryption)===e(572)&&o[e(557)]!==t[e(546)][0]&&(o.srcObject=t[e(546)][0])}else o[e(557)]!==t[e(546)][0]&&(o.srcObject=t[e(546)][0])}(t,s)}catch(t){uu.error("Failed to apply DRM on media Id:",e,"error is: ",t),this.emit("error",new y("Failed to apply DRM on media Id: "+e+" error is: "+t))}this.worker||(this.worker=new Kr),this.worker.addEventListener("message",function(t){"complete"===t.data.event&&function(t,i,n){var r=Ds,e=eu(n);t[r(601)]?tu(e,t,i):iu(e,t,i)}(t.data.frame,null,s)})}if(this.options.metadata)if(Qr)t.receiver.transform=new RTCRtpScriptTransform(this.worker,{name:"receiverTransform",payloadTypeCodec:d({},this.payloadTypeCodec),codec:this.options.metadata&&"h264",mid:null==(n=t.transceiver)?void 0:n.mid});else if(Gr){var u=t.receiver.createEncodedStreams(),o=u.readable,h=u.writable;this.worker.postMessage({action:"insertable-streams-receiver",payloadTypeCodec:d({},this.payloadTypeCodec),codec:this.options.metadata&&"h264",mid:null==(r=t.transceiver)?void 0:r.mid,readable:o,writable:h},[o,h])}this.emit(Un.track,t)},n.getDRMConfiguration=function(t){return this.drmOptionsMap?this.drmOptionsMap.get(t):null},n.onRtcDrmFetch=function(t,i){return jt(function(){return zt(this,function(n){return[2,(i.headers||(i.headers=new Headers),i.headers.get("x-dt-custom-data")&&i.headers.delete("x-dt-custom-data"),this.subscriberToken?i.headers.append("Authorization","Bearer ".concat(this.subscriberToken)):uu.warn("onRtcDrmFetch: no subscriberToken"),fetch(t,i))]})}).call(this)},n.configureDRM=function(t){var i=this;if(!t)throw new y("Required DRM options is not provided");this.drmOptionsMap||(this.drmOptionsMap=new Map);var n={merchant:"dolby",environment:Ze.Production,customTransform:this.options.metadata,videoElement:t.videoElement,audioElement:t.audioElement,video:{codec:"H264",encryption:"cbcs",keyId:re(t.videoEncryptionParams.keyId),iv:re(t.videoEncryptionParams.iv)},audio:{codec:"opus",encryption:"clear"},onFetch:this.onRtcDrmFetch.bind(this)};t.mediaBufferMs&&(n.mediaBufferMs=t.mediaBufferMs),this.DRMProfile&&(this.DRMProfile.playReadyUrl&&(n.prLicenseUrl=this.DRMProfile.playReadyUrl),this.DRMProfile.widevineUrl&&(n.wvLicenseUrl=this.DRMProfile.widevineUrl),this.DRMProfile.fairPlayUrl&&(n.fpsLicenseUrl=this.DRMProfile.fairPlayUrl),this.DRMProfile.fairPlayCertUrl&&(n.fpsCertificateUrl=this.DRMProfile.fairPlayCertUrl));try{nu(n),this.drmOptionsMap.set(t.videoMid,n),t.audioMid&&this.drmOptionsMap.set(t.audioMid,n),n.videoElement.addEventListener("rtcdrmerror",function(t){uu.error("DRM error: ",t.detail.message,"in video element:",n.videoElement.id),i.emit("error",new y(t.detail.message))})}catch(i){uu.error("Failed to configure DRM with options:",t,"error is:",i)}},n.removeDRMConfiguration=function(t){var i;null==(i=this.drmOptionsMap)||i.delete(t)},n.exchangeDRMConfiguration=function(t,i){var n=this.getDRMConfiguration(t),r=this.getDRMConfiguration(i);if(null===n)throw new y("No DRM configuration found for "+t);if(null===r)throw new y("No DRM configuration found for "+i);ee(n.video,r.video,"keyId"),ee(n.video,r.video,"iv");try{nu(n)}catch(t){uu.error("Failed to configure DRM with options:",n,"error is:",t)}try{nu(r)}catch(t){uu.error("Failed to configure DRM with options:",r,"error is:",t)}},xt(i,[{key:"isDRMOn",get:function(){return!!this.drmOptionsMap&&this.drmOptionsMap.size>0}}]),i}(qr);t.Director=lr,t.Logger=wt,t.PeerConnection=jn,t.Publish=ie,t.Signaling=ur,t.View=hu,b.defineProperty(t,i.toStringTag,{value:"Module"})},"object"==(void 0===t?"undefined":W(t))&&(void 0===r?"undefined":W(r))<"u"?s(t):"function"==typeof define&&define.amd?define(["exports"],s):s((e=("undefined"==typeof globalThis?"undefined":W(globalThis))<"u"?globalThis:e||self).millicast={})}),ai=L(function(t){function i(){var t=hi();return i=function(){return t},t}V(),It(),b.defineProperty(t,"__esModule",{value:!0}),function(t,i){for(var n in i)b.defineProperty(t,n,{enumerable:!0,get:b.getOwnPropertyDescriptor(i,n).get})}(t,{get Director(){return i().Director},get Logger(){return i().Logger},get View(){return i().View}})}),ci=L(function(t,i){V(),It(),i.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),fi=L(function(t,i){V(),It(),i.exports=function(t,i){var n=i[0],r=i[1],e=i[2],s=i[3],u=n+n,o=r+r,h=e+e,a=n*u,c=r*u,f=r*o,v=e*u,d=e*o,l=e*h,g=s*u,w=s*o,m=s*h;return t[0]=1-f-l,t[1]=c+m,t[2]=v-w,t[3]=0,t[4]=c-m,t[5]=1-a-l,t[6]=d+g,t[7]=0,t[8]=v+w,t[9]=d-g,t[10]=1-a-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),vi=L(function(t,i){V(),It(),i.exports=function(t,i,n){var r,e,s,u=n[0],o=n[1],h=n[2],a=A.sqrt(u*u+o*o+h*h);if(A.abs(a)<1e-6)return null;return u*=a=1/a,o*=a,h*=a,r=A.sin(i),e=A.cos(i),s=1-e,t[0]=u*u*s+e,t[1]=o*u*s+h*r,t[2]=h*u*s-o*r,t[3]=0,t[4]=u*o*s-h*r,t[5]=o*o*s+e,t[6]=h*o*s+u*r,t[7]=0,t[8]=u*h*s+o*r,t[9]=o*h*s-u*r,t[10]=h*h*s+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),di=L(function(t,i){V(),It(),i.exports=function(t,i){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=i[0],t[13]=i[1],t[14]=i[2],t[15]=1,t}}),li=L(function(t,i){V(),It(),i.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}),gi=L(function(t,i){V(),It(),i.exports=function(t,i){var n=i[0],r=i[1],e=i[2],s=i[3],u=i[4],o=i[5],h=i[6],a=i[7],c=i[8],f=i[9],v=i[10],d=i[11],l=i[12],g=i[13],w=i[14],m=i[15],p=n*o-r*u,y=n*h-e*u,_=n*a-s*u,k=r*h-e*o,b=r*a-s*o,A=e*a-s*h,T=c*g-f*l,S=c*w-v*l,E=c*m-d*l,I=f*w-v*g,R=f*m-d*g,C=v*m-d*w,P=p*C-y*R+_*I+k*E-b*S+A*T;if(!P)return null;return P=1/P,t[0]=(o*C-h*R+a*I)*P,t[1]=(e*R-r*C-s*I)*P,t[2]=(g*A-w*b+m*k)*P,t[3]=(v*b-f*A-d*k)*P,t[4]=(h*E-u*C-a*S)*P,t[5]=(n*C-e*E+s*S)*P,t[6]=(w*_-l*A-m*y)*P,t[7]=(c*A-v*_+d*y)*P,t[8]=(u*R-o*E+a*T)*P,t[9]=(r*E-n*R-s*T)*P,t[10]=(l*b-g*_+m*p)*P,t[11]=(f*_-c*b-d*p)*P,t[12]=(o*S-u*I-h*T)*P,t[13]=(n*I-r*S+e*T)*P,t[14]=(g*y-l*k-w*p)*P,t[15]=(c*k-f*y+v*p)*P,t}}),wi=L(function(t,i){V(),It(),i.exports=function(t,i,n){var r=i[0],e=i[1],s=i[2],u=i[3],o=i[4],h=i[5],a=i[6],c=i[7],f=i[8],v=i[9],d=i[10],l=i[11],g=i[12],w=i[13],m=i[14],p=i[15],y=n[0],_=n[1],k=n[2],b=n[3];return t[0]=y*r+_*o+k*f+b*g,t[1]=y*e+_*h+k*v+b*w,t[2]=y*s+_*a+k*d+b*m,t[3]=y*u+_*c+k*l+b*p,y=n[4],_=n[5],k=n[6],b=n[7],t[4]=y*r+_*o+k*f+b*g,t[5]=y*e+_*h+k*v+b*w,t[6]=y*s+_*a+k*d+b*m,t[7]=y*u+_*c+k*l+b*p,y=n[8],_=n[9],k=n[10],b=n[11],t[8]=y*r+_*o+k*f+b*g,t[9]=y*e+_*h+k*v+b*w,t[10]=y*s+_*a+k*d+b*m,t[11]=y*u+_*c+k*l+b*p,y=n[12],_=n[13],k=n[14],b=n[15],t[12]=y*r+_*o+k*f+b*g,t[13]=y*e+_*h+k*v+b*w,t[14]=y*s+_*a+k*d+b*m,t[15]=y*u+_*c+k*l+b*p,t}}),mi=L(function(t,i){V(),It(),i.exports=function(t,i,n,r,e){var s=1/A.tan(i/2),u=1/(r-e);return t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(e+r)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*e*r*u,t[15]=0,t}}),pi=L(function(t,i){V(),It(),i.exports=function(t,i,n,r){var e,s,u,o,h,a,c,f,v,d,l,g,w,m,p,y,_,k,b,T,S,E,I,R,C=r[0],P=r[1],D=r[2],N=A.sqrt(C*C+P*P+D*D);if(A.abs(N)<1e-6)return null;C*=N=1/N,P*=N,D*=N,e=A.sin(n),s=A.cos(n),u=1-s,o=i[0],h=i[1],a=i[2],c=i[3],f=i[4],v=i[5],d=i[6],l=i[7],g=i[8],w=i[9],m=i[10],p=i[11],y=C*C*u+s,_=P*C*u+D*e,k=D*C*u-P*e,b=C*P*u-D*e,T=P*P*u+s,S=D*P*u+C*e,E=C*D*u+P*e,I=P*D*u-C*e,R=D*D*u+s,t[0]=o*y+f*_+g*k,t[1]=h*y+v*_+w*k,t[2]=a*y+d*_+m*k,t[3]=c*y+l*_+p*k,t[4]=o*b+f*T+g*S,t[5]=h*b+v*T+w*S,t[6]=a*b+d*T+m*S,t[7]=c*b+l*T+p*S,t[8]=o*E+f*I+g*R,t[9]=h*E+v*I+w*R,t[10]=a*E+d*I+m*R,t[11]=c*E+l*I+p*R,i!==t&&(t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15]);return t}}),yi=L(function(t,i){V(),It(),i.exports=function(t,i,n){var r,e,s,u,o,h,a,c,f,v,d,l,g=n[0],w=n[1],m=n[2];i===t?(t[12]=i[0]*g+i[4]*w+i[8]*m+i[12],t[13]=i[1]*g+i[5]*w+i[9]*m+i[13],t[14]=i[2]*g+i[6]*w+i[10]*m+i[14],t[15]=i[3]*g+i[7]*w+i[11]*m+i[15]):(r=i[0],e=i[1],s=i[2],u=i[3],o=i[4],h=i[5],a=i[6],c=i[7],f=i[8],v=i[9],d=i[10],l=i[11],t[0]=r,t[1]=e,t[2]=s,t[3]=u,t[4]=o,t[5]=h,t[6]=a,t[7]=c,t[8]=f,t[9]=v,t[10]=d,t[11]=l,t[12]=r*g+o*w+f*m+i[12],t[13]=e*g+h*w+v*m+i[13],t[14]=s*g+a*w+d*m+i[14],t[15]=u*g+c*w+l*m+i[15]);return t}}),_i={};!function(t,i){for(var n in i)D(t,n,{get:i[n],enumerable:!0})}(_i,{ChromelessPlayer:function(){return EO},ErrorCategory:function(){return yd},ErrorCode:function(){return pd},Player:function(){return Wht},cache:function(){return Z6},cast:function(){return z0},features:function(){return CO},players:function(){return DO},registerContentProtectionIntegration:function(){return NO},utils:function(){return RO},version:function(){return PO},videojs:function(){return $ut}}),c.exports=(ui=_i,F(D({},"__esModule",{value:!0}),ui)),V(),It(),V(),It(),V(),It(),V(),It(),Dt(),V(),It(),Bt(),H(),V(),It(),H(),V(),It(),Ut(),V(),It(),Bt(),H(),V(),It();var ki=function(t){return t.Sv="web",t.Tv="android",t.Ev="android-tv",t.xv="ios",t.Pv="tvos",t.Iv="chromecast",t.Cv="theoliveweb",t}({});var bi=l?l.userAgent:"",Ai=bi.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ti=bi.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Si=bi.match(/Android ([0-9\.]+)/i),Ei=bi.match(/Windows NT ([0-9\.]+)/i),Ii=bi.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Ri=bi.match(/Firefox\/([0-9\.]+)/i),Ci=bi.match(/OPR\/(\d+\.\d+)/i),Pi=bi.match(/Tizen ([0-9\.]+)/i),Di=bi.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Ni=bi.match(/HbbTV\/([0-9.]+)/i),xi=bi.match(/(AFT.*) Build/i),Bi=function(){function t(){this.Rv=Boolean("ontouchstart"in self||self.DocumentTouch&&j(v,self.DocumentTouch)||l&&l.msMaxTouchPoints),this.Nv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(bi)||/(macintosh|mac(?=_powerpc)\s)/i.test(bi),this.Mv=/Windows NT/i.test(bi),this.Ov=Ei?S(Ei[1]):0,this.Uv=/Android/i.test(bi),this.Hv=Si?S(Si[1]):0,this.qv=/windows phone (8|8\.1)/i.test(bi),this.Gv=/iPhone/i.test(bi),this.Qv=/iPad/i.test(bi),this.Yv=this.Nv&&this.Rv&&!this.Qv,this.Zv=/iPod/i.test(bi),this.r_=/Mobile Safari/i.test(bi),this.s_=/EOS\d*STB/i.test(bi),this.n_=/APP\d*STB/i.test(bi),this.$v=(this.Gv||this.Qv||this.Yv||this.Zv)&&!this.qv,this.i_=Di?S(Di[2]):0,this.h_=this.qv||this.$v||this.Uv||this.r_,this.a_=/CriOS/i.test(bi),this.c_=Boolean(self.chrome&&/google/i.test(l.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(l.userAgent),this.p_=Ti?T(Ti[1],10):0,this.Ng=Boolean(/CriOS/i.test(bi)),this.Dg=Boolean(self.chrome||/Chrome/i.test(bi)||this.Ng),this.f_=Ai?T(Ai[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(bi),this.A_=Pi?S(Pi[1]):0,this.l_=this.A_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.A_):void 0,this.T_=/webos|web0s/i.test(bi),this.E_=/HbbTV/i.test(bi),this.P_=!!Ni&&function(t){if(!t)return!1;var i=t.split(".").map(Number);return 3===i.length&&1===i[0]&&2===i[1]}(Ni[1]),this.C_=/AFT.* Build/i.test(bi),this.R_=xi?xi[1]:void 0,this.N_=/VIZIO/i.test(bi),this.M_=/Edge\/\d+/i.test(bi),this.O_=/Trident/i.test(bi),this.U_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.H_=/Vivaldi/i.test(bi),this.q_=/Firefox/i.test(bi)&&!/Seamonkey/i.test(bi),this.G_=Ri?S(Ri[1]):0,this.j_=/Safari/i.test(bi)&&!/Chrome/i.test(bi)&&!this.qv&&!this.y_,this.K_=Ii?S(Ii[2]):0,this.J_=Boolean(Ci),this.eg=Ci?S(Ci[1]):0,this.hg=/CrKey/.test(bi),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(bi),this.fg=/PlayStation 4/i.test(bi),this._g=/PlayStation 5/i.test(bi),this.pg="web"===ki.Ev,this.yg="web"===ki.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===ki.xv,this.Pg="web"===ki.Pv,this.Cg="web"===ki.Iv}return xt(t,[{key:"Ke",get:function(){return this.Rv}},{key:"Dv",get:function(){return this.Nv}},{key:"Bv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Ov}},{key:"Fv",get:function(){return this.Uv}},{key:"Vv",get:function(){return this.Hv}},{key:"Wv",get:function(){return this.qv}},{key:"zv",get:function(){return this.Gv}},{key:"Xv",get:function(){return this.Qv}},{key:"Kv",get:function(){return this.Yv}},{key:"Jv",get:function(){return this.Zv}},{key:"ru",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"e_",get:function(){return this.s_||this.n_}},{key:"vd",get:function(){return this.r_}},{key:"Ks",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"d_",get:function(){var t;return null!=(t=this.l_)?t:this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){var t;return(null==(t=f.chrome)?void 0:t.webview)&&this.p_>0}},{key:"m_",get:function(){return this.p_}},{key:"w_",get:function(){return this.y_}},{key:"b_",get:function(){return this.A_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"x_",get:function(){return this.P_}},{key:"I_",get:function(){return this.C_}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.R_}},{key:"D_",get:function(){return this.N_}},{key:"B_",get:function(){return this.M_}},{key:"L_",get:function(){return this.O_}},{key:"F_",get:function(){return this.U_}},{key:"V_",get:function(){return this.H_}},{key:"W_",get:function(){return this.q_}},{key:"z_",get:function(){return this.G_}},{key:"X_",get:function(){return this.j_}},{key:"Q_",get:function(){return 0===this.K_&&Oi.ru?this.i_:this.K_}},{key:"Y_",get:function(){return this.J_}},{key:"Z_",get:function(){return this.eg}},{key:"rg",get:function(){return this.hg}},{key:"og",get:function(){return this.ag}},{key:"cg",get:function(){return!(!this.S_&&!this.w_)&&this.d_<=56}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"xg",get:function(){return this.Pg}},{key:"Ig",get:function(){return this.Cg}},{key:"Rg",get:function(){return this.Dg}},{key:"IS_IOS_CHROME",get:function(){return this.Ng}}]),t}();Bi.Bg=new Bi;var Oi=Bi.Bg;V(),It(),ft();var Mi={}.hasOwnProperty,Li={}.toString;function Fi(t){return null!=t}function Ui(t){return void 0===t}var Vi,ji=Array.isArray||function(t){return"[object Array]"===Li.call(t)};function Hi(t){return Wi(t)&&Mi.call(t,"length")&&Yi(t.length)}function Wi(t){return"object"===(void 0===t?"undefined":W(t))&&null!==t}function zi(t){return Wi(t)&&t.constructor&&t.constructor===b}function qi(t){return"string"==typeof t}function Xi(t){return"boolean"==typeof t}function Gi(t){return Fi(t)&&"function"==typeof t.then}function Qi(t){return"[object Date]"===Li.call(t)}function Yi(t){return"number"==typeof t}function $i(t){return"function"==typeof t}function Ki(t){return $i(t)||Wi(t)}function Ji(t){return Wi(t)&&!ji(t)}function Zi(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function tn(t){for(var i;Fi(i=t.firstChild);)t.removeChild(i)}function nn(t,i){for(var n;Fi(n=t.firstChild);)i.appendChild(n)}function rn(t,i){t.insertBefore(i,t.firstChild)}function en(t){return t&&t.nodeName&&t.nodeName.toLowerCase()||""}function sn(t){var i=t.className;return"string"==typeof i?i:i&&"string"==typeof i.baseVal?i.baseVal:""}function un(t,i){var n=t.className;"string"==typeof n?t.className=i:n&&"string"==typeof n.baseVal&&(n.baseVal=i)}function on(t,i){return void 0!==t.classList?t.classList.contains(i):void 0!==t.className&&-1!==(" "+sn(t)+" ").indexOf(" "+i+" ")}function hn(t,i){if(void 0!==t.classList)t.classList.add(i);else if(void 0!==t.className){var n=sn(t);-1===(" "+n+" ").indexOf(" "+i+" ")&&un(t,(n+" "+i).trim())}}function an(t,i){if(void 0!==t.classList)t.classList.remove(i);else if(void 0!==t.className){for(var n=" "+sn(t)+" ",r=" "+i+" ";-1!==n.indexOf(r);)n=n.replace(r," ");un(t,n.trim())}}function cn(t,i,n){void 0===n&&(n=!on(t,i)),n?hn(t,i):an(t,i)}function fn(t){t.stopPropagation()}function vn(t,i){Oi.w_&&Oi.b_<3?function(t,i){var n=i;switch(i){case"flex":n="-webkit-flex";break;case"inline-flex":n="-webkit-inline-flex"}t.display=n}(t,i):function(t,i){if(t.display=i,t.display!==i){var n=i;switch(i){case"flex":n="-ms-flexbox";break;case"inline-flex":n="-ms-inline-flexbox"}t.display=n}}(t,i)}function dn(t,i){var n=i.style;if(n)for(var r,e=Ft(b.keys(t));!(r=e()).done;){var s=r.value,u=t[s];void 0!==u&&(n[s]=u)}}function ln(t){var i=t.style;i.position="absolute",i.left="0",i.right="0",i.top="0",i.bottom="0",i.width="100%",i.height="100%"}function gn(t){var i=t.style;i.position="",i.left="",i.right="",i.top="",i.bottom="",i.width="",i.height=""}function wn(t){t.removeAttribute("title")}function mn(t){try{return Boolean(t)&&t.parent!==t}catch(t){return!1}}V(),It(),V(),It();var pn=function(){},yn=function(t){return t};function _n(t,i){var n=-1/0;return function(){for(var r=arguments.length,e=new Array(r),s=0;s=i&&(t.apply(this,e),n=u)}}function kn(t,i){var n=0;return function(){for(var r=arguments.length,e=new Array(r),s=0;sa&&(u=a),e>a&&(e=a),o=s,h=u;;)if(oi?1:E(t)?E(i)?0:1:-1};function Vn(t,i,n){return Pn(t,i,n)?0:Un(t,i)}var jn=function(t,i){return Dn(t,i)?0:Un(t,i)};var Hn="function"==typeof Array.prototype.find?function(t,i){return t.find(i)}:function(t,i){var n=Xn(t,i);return-1===n?void 0:t[n]},Wn=Hn,zn="function"==typeof Array.prototype.findLast?function(t,i){return t.findLast(i)}:function(t,i){var n=Gn(t,i);return-1===n?void 0:t[n]},qn=zn,Xn="function"==typeof Array.prototype.findIndex?function(t,i){return t.findIndex(i)}:function(t,i){for(var n=0;n=0;n-=1){if(i(t[n],n,t))return n}return-1},Qn="function"==typeof Array.prototype.at?function(t,i){return t.at(i)}:function(t,i){var n=t.length,r=i>=0?i:n+i;return r<0||r>=n?void 0:t[r]};function Yn(t,i){var n=t.indexOf(i);return-1!==n&&($n(t,n),!0)}function $n(t,i){0===i?t.shift():t.splice(i,1)}function Kn(t,i){for(var n=new Array(t.length),r=0,e=0;e=0;r--){var e=n.item(r);en(e)===i&&t.removeChild(e)}}(t,"source"),t.load())}function Nr(){return void 0!==v?v.createElement("video"):void 0}var xr=bn(Nr),Br=bn(function(){return"undefined"!=typeof HTMLVideoElement&&j(xr(),HTMLVideoElement)});function Or(t){var i=v.createElement(t);return Pr(i)&&i.addEventListener("contextmenu",Ur),Lr(i),i}function Mr(t){Lr(t),t.removeEventListener("contextmenu",Ur)}function Lr(t){t.removeAttribute("id"),t.removeAttribute("class"),t.removeAttribute("style"),tn(t),Dr(t),t.pause(),t.playbackRate=1,t.disableRemotePlayback=!1,t.preload="auto",t.controls=!1,t.style.display="none",Pr(t)&&(t.style.width="100%",t.style.height="100%",t.style.pointerEvents="none",t.playsInline=!0,t.setAttribute("webkit-playsinline",""))}function Fr(t,i){if(i.sp){var n=t.muted;t.muted=!0,t.muted=!1,t.muted=n}else if(t.paused){var r=t.play();Gi(r)&&Er(r),t.pause()}}function Ur(t){t.preventDefault()}V(),It(),V(),It(),V(),It(),ft();var Vr=null;try{Vr=new WebAssembly.Instance(new WebAssembly.Module(new I([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(ui){}function jr(t,i,n){this.low=0|t,this.high=0|i,this.unsigned=!!n}function Hr(t){return!0===(t&&t.np)}function Wr(t){var i=A.clz32(t&-t);return t?31-i:i}jr.prototype.np,b.defineProperty(jr.prototype,"np",{value:!0}),jr.isLong=Hr;var zr={},qr={};function Xr(t,i){var n,r,e;return i?(e=0<=(t>>>=0)&&t<256)&&(r=qr[t])?r:(n=Qr(t,0,!0),e&&(qr[t]=n),n):(e=-128<=(t|=0)&&t<128)&&(r=zr[t])?r:(n=Qr(t,t<0?-1:0,!1),e&&(zr[t]=n),n)}function Gr(t,i){if(E(t))return i?re:ne;if(i){if(t<0)return re;if(t>=Zr)return he}else{if(t<=-te)return ae;if(t+1>=te)return oe}return t<0?Gr(-t,i).neg():Qr(t%Jr|0,t/Jr|0,i)}function Qr(t,i,n){return new jr(t,i,n)}jr.fromInt=Xr,jr.fromNumber=Gr,jr.fromBits=Qr;var Yr=A.pow;function $r(t,i,n){if(0===t.length)throw y("empty string");if("number"==typeof i?(n=i,i=!1):i=!!i,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return i?re:ne;if((n=n||10)<2||360)throw y("interior hyphen");if(0===r)return $r(t.substring(1),i,n).neg();for(var e=Gr(Yr(n,8)),s=ne,u=0;u>>0:this.low},ce.toNumber=function(){return this.unsigned?(this.high>>>0)*Jr+(this.low>>>0):this.high*Jr+(this.low>>>0)},ce.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((s=o).isZero())return h+u;for(;h.length<6;)h="0"+h;u=""+h+u}},ce.getHighBits=function(){return this.high},ce.getHighBitsUnsigned=function(){return this.high>>>0},ce.getLowBits=function(){return this.low},ce.getLowBitsUnsigned=function(){return this.low>>>0},ce.getNumBitsAbs=function(){if(this.isNegative())return this.eq(ae)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,i=31;i>0&&!(t&1<>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},ce.isZero=function(){return 0===this.high&&0===this.low},ce.eqz=ce.isZero,ce.isNegative=function(){return!this.unsigned&&this.high<0},ce.isPositive=function(){return this.unsigned||this.high>=0},ce.isOdd=function(){return!(1&~this.low)},ce.isEven=function(){return!(1&this.low)},ce.equals=function(t){return Hr(t)||(t=Kr(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},ce.eq=ce.equals,ce.notEquals=function(t){return!this.eq(t)},ce.neq=ce.notEquals,ce.ne=ce.notEquals,ce.lessThan=function(t){return this.comp(t)<0},ce.lt=ce.lessThan,ce.lessThanOrEqual=function(t){return this.comp(t)<=0},ce.lte=ce.lessThanOrEqual,ce.le=ce.lessThanOrEqual,ce.greaterThan=function(t){return this.comp(t)>0},ce.gt=ce.greaterThan,ce.greaterThanOrEqual=function(t){return this.comp(t)>=0},ce.gte=ce.greaterThanOrEqual,ce.ge=ce.greaterThanOrEqual,ce.compare=function(t){if(Hr(t)||(t=Kr(t)),this.eq(t))return 0;var i=this.isNegative(),n=t.isNegative();return i&&!n?-1:!i&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},ce.comp=ce.compare,ce.negate=function(){return!this.unsigned&&this.eq(ae)?ae:this.not().add(ee)},ce.neg=ce.negate,ce.add=function(t){Hr(t)||(t=Kr(t));var i=this.high>>>16,n=65535&this.high,r=this.low>>>16,e=65535&this.low,s=t.high>>>16,u=65535&t.high,o=t.low>>>16,h=0,a=0,c=0,f=0;return c+=(f+=e+(65535&t.low))>>>16,a+=(c+=r+o)>>>16,h+=(a+=n+u)>>>16,h+=i+s,Qr((c&=65535)<<16|(f&=65535),(h&=65535)<<16|(a&=65535),this.unsigned)},ce.subtract=function(t){return Hr(t)||(t=Kr(t)),this.add(t.neg())},ce.sub=ce.subtract,ce.multiply=function(t){if(this.isZero())return this;if(Hr(t)||(t=Kr(t)),Vr)return Qr(Vr.mul(this.low,this.high,t.low,t.high),Vr.get_high(),this.unsigned);if(t.isZero())return this.unsigned?re:ne;if(this.eq(ae))return t.isOdd()?ae:ne;if(t.eq(ae))return this.isOdd()?ae:ne;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(ie)&&t.lt(ie))return Gr(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,n=65535&this.high,r=this.low>>>16,e=65535&this.low,s=t.high>>>16,u=65535&t.high,o=t.low>>>16,h=65535&t.low,a=0,c=0,f=0,v=0;return f+=(v+=e*h)>>>16,c+=(f+=r*h)>>>16,f&=65535,c+=(f+=e*o)>>>16,a+=(c+=n*h)>>>16,c&=65535,a+=(c+=r*o)>>>16,c&=65535,a+=(c+=e*u)>>>16,a+=i*h+n*o+r*u+e*s,Qr((f&=65535)<<16|(v&=65535),(a&=65535)<<16|(c&=65535),this.unsigned)},ce.mul=ce.multiply,ce.divide=function(t){if(Hr(t)||(t=Kr(t)),t.isZero())throw y("division by zero");var i,n,r;if(Vr)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?Qr((this.unsigned?Vr.div_u:Vr.div_s)(this.low,this.high,t.low,t.high),Vr.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?re:ne;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return re;if(t.gt(this.shru(1)))return se;r=re}else{if(this.eq(ae))return t.eq(ee)||t.eq(ue)?ae:t.eq(ae)?ee:(i=this.shr(1).div(t).shl(1)).eq(ne)?t.isNegative()?ee:ue:(n=this.sub(t.mul(i)),r=i.add(n.div(t)));if(t.eq(ae))return this.unsigned?re:ne;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();r=ne}for(n=this;n.gte(t);){i=A.max(1,A.floor(n.toNumber()/t.toNumber()));for(var e=A.ceil(A.log(i)/A.LN2),s=e<=48?1:Yr(2,e-48),u=Gr(i),o=u.mul(t);o.isNegative()||o.gt(n);)o=(u=Gr(i-=s,this.unsigned)).mul(t);u.isZero()&&(u=ee),r=r.add(u),n=n.sub(o)}return r},ce.div=ce.divide,ce.modulo=function(t){return Hr(t)||(t=Kr(t)),Vr?Qr((this.unsigned?Vr.rem_u:Vr.rem_s)(this.low,this.high,t.low,t.high),Vr.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},ce.mod=ce.modulo,ce.rem=ce.modulo,ce.not=function(){return Qr(~this.low,~this.high,this.unsigned)},ce.countLeadingZeros=function(){return this.high?A.clz32(this.high):A.clz32(this.low)+32},ce.clz=ce.countLeadingZeros,ce.countTrailingZeros=function(){return this.low?Wr(this.low):Wr(this.high)+32},ce.ctz=ce.countTrailingZeros,ce.and=function(t){return Hr(t)||(t=Kr(t)),Qr(this.low&t.low,this.high&t.high,this.unsigned)},ce.or=function(t){return Hr(t)||(t=Kr(t)),Qr(this.low|t.low,this.high|t.high,this.unsigned)},ce.xor=function(t){return Hr(t)||(t=Kr(t)),Qr(this.low^t.low,this.high^t.high,this.unsigned)},ce.shiftLeft=function(t){return Hr(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qr(this.low<>>32-t,this.unsigned):Qr(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):Qr(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},ce.shr=ce.shiftRight,ce.shiftRightUnsigned=function(t){return Hr(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qr(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Qr(32===t?this.high:this.high>>>t-32,0,this.unsigned)},ce.shru=ce.shiftRightUnsigned,ce.shr_u=ce.shiftRightUnsigned,ce.rotateLeft=function(t){var i;return Hr(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Qr(this.high,this.low,this.unsigned):t<32?(i=32-t,Qr(this.low<>>i,this.high<>>i,this.unsigned)):(i=32-(t-=32),Qr(this.high<>>i,this.low<>>i,this.unsigned))},ce.rotl=ce.rotateLeft,ce.rotateRight=function(t){var i;return Hr(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Qr(this.high,this.low,this.unsigned):t<32?(i=32-t,Qr(this.high<>>t,this.low<>>t,this.unsigned)):(i=32-(t-=32),Qr(this.low<>>t,this.high<>>t,this.unsigned))},ce.rotr=ce.rotateRight,ce.toSigned=function(){return this.unsigned?Qr(this.low,this.high,!1):this},ce.toUnsigned=function(){return this.unsigned?this:Qr(this.low,this.high,!0)},ce.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},ce.toBytesLE=function(){var t=this.high,i=this.low;return[255&i,i>>>8&255,i>>>16&255,i>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},ce.toBytesBE=function(){var t=this.high,i=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,i>>>24,i>>>16&255,i>>>8&255,255&i]},jr.fromBytes=function(t,i,n){return n?jr.fromBytesLE(t,i):jr.fromBytesBE(t,i)},jr.fromBytesLE=function(t,i){return new jr(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,i)},jr.fromBytesBE=function(t,i){return new jr(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],i)},"function"==typeof BigInt&&(jr.fromBigInt=function(t,i){return Qr(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),i)},jr.fromValue=function(t,i){return"bigint"===(void 0===t?"undefined":W(t))?jr.fromBigInt(t,i):Kr(t,i)},ce.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<=2*me},xt(t,[{key:"rp",get:function(){return void 0===this.hp&&(this.hp=this.op()),this.hp}},{key:"ap",get:function(){return Oi.Fv?"android":Oi.Dv?"macos":Oi.ru?"ios":Oi.Bv?"windows":"other"}},{key:"cp",get:function(){return Oi.og?"tv":Oi.Ks?"mobile":"desktop"}},{key:"dp",get:function(){return!Oi.og}},{key:"lp",get:function(){if(f.screen)return{width:f.screen.width*this.fp,height:f.screen.height*this.fp}}},{key:"fp",get:function(){return f.devicePixelRatio||1}},{key:"vp",get:function(){return be}},{key:"_p",get:function(){return!1}},{key:"gp",get:function(){return!0}},{key:"pp",get:function(){return!!(Oi.X_||Oi.ru||Oi.g_)||!!Oi.D_}},{key:"mp",get:function(){return Oi.D_}},{key:"wp",get:function(){return!Oi.ru}},{key:"yp",get:function(){return!0}},{key:"bp",get:function(){return!0}},{key:"Ap",get:function(){return!1}},{key:"Sp",get:function(){}},{key:"Tp",get:function(){return!0}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){return Oi.D_}},{key:"xp",get:function(){return!1}},{key:"Cp",get:function(){return!1}},{key:"Rp",get:function(){return!1}},{key:"Dp",get:function(){return!0}}]),t}(),Te=function(t){function i(){return t.call(this)||this}return Pt(i,t),i}(Ae);V(),It(),Bt(),Dt();var Se=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.Pp=function(t,i){if(t&&t.Bp&&i&&i.Bp){var n=Ee(t.Bp,"mp4a.40.2")&&Ee(i.Bp,"mp4a.40.5"),r=Ee(t.Bp,"mp4a.40.5")&&Ee(i.Bp,"mp4a.40.2"),e=Ee(t.Bp,"mp4a.40.2")&&Ee(i.Bp,"mp4a.40.34"),s=Ee(t.Bp,"mp4a.40.34")&&Ee(i.Bp,"mp4a.40.2"),u=Ee(t.Bp,"mp4a.40.5")&&Ee(i.Bp,"mp4a.40.34"),o=Ee(t.Bp,"mp4a.40.34")&&Ee(i.Bp,"mp4a.40.5");return!(n||r||e||s||u||o)}return!0},xt(i,[{key:"Sp",get:function(){if(Oi.Dv)return 4096}}]),i}(Te);function Ee(t,i){return t.indexOf(i)>-1}V(),It(),Dt();var Ie=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.Ip=function(t){return t>=2},i}(Te);V(),It(),Bt(),Dt();var Re=function(t){function i(){var i;return(i=t.call(this)||this).Np=Oi.Q_>=11,i.sp=Oi.X_&&!(Oi.ru&&Oi.Q_<10),i}return Pt(i,t),xt(i,[{key:"xp",get:function(){return Oi.Q_<17}},{key:"Cp",get:function(){return!0}}]),i}(Te);V(),It(),Bt(),Dt();var Ce,Pe=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),xt(i,[{key:"Tp",get:function(){return!(Oi.d_>=133)}}]),i}(Te);V(),It(),V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt(),V(),It();var De=function(){var t=Nr();if(!t)return!1;var i=t.muted;return t.muted=!i,t.muted!==i}(),Ne=function(){if(Oi.Kv)return!1;var t=Nr();if(!t)return!1;var i=t.volume;return t.volume=i/2+.1,i!==t.volume}();var xe=function(t){function i(i){var n;return(n=t.call(this)||this).Mp=void 0,n.Mp=i,n.Np=n.Mp.Np,n.Ke=n.Mp.Ke,n.sp=De&&n.Mp.sp,n}Pt(i,t);var n=i.prototype;return n.op=function(){return this.Mp.rp},n.Pp=function(t,i){return this.Mp.Pp(t,i)},n.Ip=function(t){return this.Mp.Ip(t)},xt(i,[{key:"Sp",get:function(){return this.Mp.Sp}},{key:"Tp",get:function(){return this.Mp.Tp}},{key:"xp",get:function(){return this.Mp.xp}}]),i}(Ae),Be=function(t){function i(i){var n;return(n=t.call(this,i)||this).Np=!0,n.Ks=!0,n}return Pt(i,t),xt(i,[{key:"Ap",get:function(){return Oi.ru}}]),i}(xe);V(),It();var Oe=function(){function t(t){this.Op=void 0,this.Op=Me(t)}var i=t.prototype;return i.Lp=function(){return new this.Op},i.Fp=function(t){return this.Op.isTypeSupported(t)},t}();function Me(t){return t&&Ki(f.ManagedMediaSource)?f.ManagedMediaSource:Ki(f.MediaSource)?f.MediaSource:void 0}var Le=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.op=function(){return Me(!0)?t.prototype.op.call(this):1},xt(i,[{key:"Ap",get:function(){return!0}}]),i}(Be);V(),It(),Bt(),Dt();var Fe=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Up=void 0,i}return Pt(i,t),i.prototype.Pp=function(i,n){return t.prototype.Pp.call(this,i,n)},xt(i,[{key:"_p",get:function(){return Oi.b_<3}},{key:"gp",get:function(){return Oi.b_>=3}},{key:"lp",get:function(){var t=this;return f.tizen&&!this.Up&&f.tizen.systeminfo.getPropertyValue("DISPLAY",function(i){var n=i.resolutionWidth,r=i.resolutionHeight;1===n&&1===r||(t.Up={width:n,height:r})}),this.Up}},{key:"kp",get:function(){return Oi.b_<3}}]),i}(xe);V(),It(),Bt(),Dt();var Ue=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Up=void 0,i}return Pt(i,t),xt(i,[{key:"lp",get:function(){var t=this;return f.webOS&&!this.Up&&f.webOS.deviceInfo(function(i){t.Up={width:i.screenWidth,height:i.screenHeight}}),this.Up}},{key:"yp",get:function(){return!1}}]),i}(xe);V(),It(),Bt(),Dt();var Ve=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),xt(i,[{key:"Ap",get:function(){return!0}},{key:"Cp",get:function(){return this.Mp.Cp}}]),i}(xe);V(),It(),Bt(),Dt();var je=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),xt(i,[{key:"Rp",get:function(){return Oi.IS_FIRETV_AFTMM}}]),i}(xe);!function(t){Ce=t}(function(){var t=function(){if(Oi.W_)return new Se;if(Oi.B_||Oi.L_)return new Ie;if(Oi.X_)return new Re;if(Oi.Rg)return new Pe;return new Te}();return Oi.ru?new Le(t):Oi.I_?new je(t):Oi.Ks?new Be(t):Oi.w_?new Fe(t):Oi.S_?new Ue(t):Oi.Dv?new Ve(t):new xe(t)}()),V(),It(),Bt(),Dt(),V(),It(),Bt(),H(),ft(),V(),It();var He=!(Oi.L_&&!Oi.F_),We=self.console;function ze(t){if(Wi(t))try{return JSON.stringify(t)}catch(t){}return t}function qe(t){return t.map(ze).join(" ")}function Xe(t){var i=We&&We[t];return i?i.bind&&He?i.bind(We):function(){for(var i=arguments.length,n=new Array(i),r=0;r1?i-1:0),r=1;r1?i-1:0),r=1;ra&&(s=a),u>a&&(u=a),o=e,h=s;;)if(o=65&&t<=90}function ds(t){return vs(t)||function(t){return t>=97&&t<=122}(t)}function ls(t){return t>=48&&t<=57}function gs(t){return ls(t)||ds(t)}function ws(t){return ls(t)||t>=65&&t<=70||t>=97&&t<=102}function ms(t){return vs(t)?t+32:t}function ps(t){return ls(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function ys(t,i){return void 0===i&&(i=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(i?87:55):-1}var _s=A.min,ks=String.fromCharCode;function bs(t){for(var i=t.length,n=[],r=0;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Is=A.floor,Rs=String.fromCharCode;function Cs(t){throw new RangeError(Es[t])}function Ps(t){for(var i=[],n=0,r=t.length;n=55296&&e<=56319&&n>1,t+=Is(t/i);t>455;r+=36)t=Is(t/35);return Is(r+36*t/(t+38))},Ms=function(t){return function(t,i){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]);var e=function(t,i){for(var n=[],r=t.length;r--;)n[r]=i(t[r]);return n}((t=t.replace(Ss,".")).split("."),i).join(".");return r+e}(t,function(t){return Ts.test(t)?"xn--"+function(t){for(var i=[],n=(t=Ps(t)).length,r=128,e=0,s=72,u=0,o=t;u=r&&lIs((As-e)/g)&&Cs("overflow"),e+=(f-r)*g,r=f;for(var w=0,m=t;wAs&&Cs("overflow"),p==r){for(var y=e,_=36;;_+=36){var k=_<=s?1:_>=s+26?26:_-s;if(y65535&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r)}return bs(i)}function Fs(t){if(t>=55296&&t<=57343)throw new y("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Us(t,i){return t>>i&63|128}function Vs(t,i){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(i.push(t>>18&7|240),i.push(Us(t,12)),i.push(Us(t,6))):(Fs(t),i.push(t>>12&15|224),i.push(Us(t,6))):i.push(t>>6&31|192),i.push(63&t|128)):i.push(t)}function js(t){for(var i=[],n=0;n=Ns)throw new y("Invalid byte index");var t=255&Ds[xs];if(xs++,128==(192&t))return 63&t;throw new y("Invalid continuation byte")}function Ws(){var t,i;if(xs>Ns)throw new y("Invalid byte index");if(xs===Ns)return!1;if(t=255&Ds[xs],xs++,!(128&t))return t;if(192==(224&t)){if((i=(31&t)<<6|Hs())>=128)return i;throw new y("Invalid continuation byte")}if(224==(240&t)){if((i=(15&t)<<12|Hs()<<6|Hs())>=2048)return Fs(i),i;throw new y("Invalid continuation byte")}if(240==(248&t)&&(i=(7&t)<<18|Hs()<<12|Hs()<<6|Hs())>=65536&&i<=1114111)return i;throw new y("Invalid UTF-8 detected")}function zs(t){return[37,ys(t>>4),ys(15&t)]}function qs(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Xs(t){return qs(t)||32===t||34===t||60===t||62===t||96===t}function Gs(t){return Xs(t)||35===t||63===t||123===t||125===t}function Qs(t){return Gs(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Ys(t){return t<33||t>126||34===t||35===t||60===t||62===t}function $s(t){return Ys(t)||39===t}function Ks(t,i){if(!i(t))return[t];for(var n=js([t]),r=[],e=0;e6)throw new _;for(var h=0;s0){if(!("."===t[s]&&h<4))throw new _;s+=1}if(!is.test(t[s]))throw new _;for(;s255)throw new _}s+=1}n[r]=n[r]<<8|a,2!==(h+=1)&&4!==h||(r+=1)}if(4!==h)throw new _;break}if(":"===t[s]){if((s+=1)===i)throw new _}else if(s0;)fs(n,r,e+f-1),r-=1,f-=1}else if(8!==r)throw new _;return n}function nu(t){var i=10,n=es;return rs.test(t)?(t=t.slice(2),i=16,n=ss):t.length>=2&&"0"===t[0]&&(t=t.slice(1),i=8,n=us),""===t?0:n.test(t)?T(t,i):void 0}var ru={Vp:4},eu=/[\0\t\n\r #%/:?@\[\\\]]/,su=/[\0\t\n\r #/:?@\[\\\]]/;function uu(t,i){if("["===t[0]){if("]"!==t[t.length-1])throw new _("Invalid IPv6 address");return{Vp:2,Hp:iu(t.slice(1,-1))}}if(!i)return function(t){if(su.test(t))throw new _("Invalid code point in opaque host");var i=Js(t,qs);return""===i?ru:{Vp:3,Wp:i}}(t);var n=function(t){var i=function(t){return Ms(t.toLowerCase())}(t);return i}(tu(t));if(eu.test(n))throw new _("Invalid code point in host");var r=function(t){var i=t.split(".");if(""===i[i.length-1]&&i.pop(),!(i.length>4)){for(var n=[],r=0;r255)throw new _;if(n[n.length-1]>=A.pow(256,5-n.length))throw new _;for(var o=n.pop(),h=0;h>>=8;return i.reverse().join("")}(t.Hp);case 2:return"["+function(t){for(var i="",n=function(t){for(var i=0,n=0,r=0,e=0,s=0;s<8;s++)0===t[s]?(0===e&&(r=s),e++):(e>n&&(i=r,n=e),e=0);return e>n&&(i=r,n=e),n>1?i:null}(t),r=!1,e=0;e<8;e++){if(r){if(0===t[e])continue;r=!1}n!==e?(i+=t[e].toString(16),7!==e&&(i+=":")):(i+=0===e?"::":":",r=!0)}return i}(t.Hp)+"]";case 3:return t.Wp;case 4:return""}}var hu=/\+/g;function au(t){return 42===t||45===t||46===t||95===t||gs(t)}function cu(t){for(var i=t.split("&"),n=[],r=0;r0&&(i+="&"),i+=vu(js(Ps(r[0])))+"="+vu(js(Ps(r[1])))}return i}function vu(t){for(var i=[],n=0;n0&&"?"===t[0]&&(t=t.slice(1)),this.zp=cu(t)}var i=t.prototype;return i.append=function(t,i){t=lu(t),i=lu(i),this.zp.push([t,i]),ku(this)},i.delete=function(t){t=lu(t);for(var i=this.zp,n=0;n=2))return!1;if(!Uu(t.slice(0,2)))return!1;if(2!==i){var n=t[2];if(47!==n&&92!==n&&63!==n&&35!==n)return!1}return!0}function Fu(t){return 2===t.length&&ts.test(t[0])&&(":"===t[1]||"|"===t[1])}function Uu(t){return 2===t.length&&Fu(bs(t))}function Vu(t){return Fu(t)&&":"===t[1]}function ju(t){var i=t.Jp;0!==i.length&&("file"===t.Qp&&1===i.length&&Vu(i[0])||i.pop())}function Hu(t){return null===t.Zp||ru===t.Zp||t.$p||"file"===t.Qp}var Wu=-1,zu=/\t|\n|\r/g,qu=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Xu(t,i,n,r){void 0===n&&(n=null),void 0===r&&(r=null),n||(n=new Qu,t=t.replace(qu,""));var e=null!==r?r:0;i=i||null;for(var s=[],u=!1,o=!1,h=!1,a=Ps(t=t.replace(zu,"")),c=a.length,f=0;f<=c;){var v=f65535)throw new _("Invalid port");n.im=y===Cu[n.Qp]?null:y,s.length=0}if(null!==r)return;e=16,f-=1}break;case 13:n.Qp="file",47===v||92===v?e=14:i&&"file"===i.Qp?Wu===v?(n.Zp=i.Zp,n.Jp=i.Jp.slice(),n.Gp=i.Gp):63===v?(n.Zp=i.Zp,n.Jp=i.Jp.slice(),n.Gp="",e=19):35===v?(n.Zp=i.Zp,n.Jp=i.Jp.slice(),n.Gp=i.Gp,n.nm="",e=20):(Lu(a.slice(f))||(n.Zp=i.Zp,n.Jp=i.Jp.slice(),ju(n)),e=17,f-=1):(e=17,f-=1);break;case 14:47===v||92===v?e=15:(i&&"file"===i.Qp&&!Lu(a.slice(f))&&(Vu(i.Jp[0])?n.Jp.push(i.Jp[0]):n.Zp=i.Zp),e=17,f-=1);break;case 15:if(Wu===v||47===v||92===v||63===v||35===v)if(f-=1,null===r&&Uu(s))e=17;else if(0===s.length){if(n.Zp=ru,null!==r)return;e=16}else{var k=uu(Ls(s),Ou(n));if(0===k.Vp&&"localhost"===k.qp&&(k=ru),n.Zp=k,null!==r)return;s.length=0,e=16}else s.push(v);break;case 16:Ou(n)?(e=17,47!==v&&92!==v&&(f-=1)):null===r&&63===v?(n.Gp="",e=19):null===r&&35===v?(n.nm="",e=20):Wu!==v&&(e=17,47!==v&&(f-=1));break;case 17:if(Wu===v||47===v||Ou(n)&&92===v||null===r&&(63===v||35===v)){var b=Ls(s);if(xu(b)?(ju(n),47===v||Ou(n)&&92===v||n.Jp.push("")):!Nu(b)||47===v||Ou(n)&&92===v?Nu(b)||("file"===n.Qp&&0===n.Jp.length&&Uu(s)&&(ru!==n.Zp&&null!==n.Zp&&(n.Zp=ru),s[1]=58,b=Ls(s)),n.Jp.push(b)):n.Jp.push(""),s.length=0,"file"===n.Qp&&(Wu===v||63===v||35===v))for(;n.Jp.length>1&&""===n.Jp[0];)n.Jp.shift();63===v?(n.Gp="",e=19):35===v&&(n.nm="",e=20)}else s.push.apply(s,Ks(v,Gs));break;case 18:63===v?(n.Gp="",e=19):35===v?(n.nm="",e=20):Wu!==v&&(n.Jp[0]+=Ls(Ks(v,qs)));break;case 19:null===r&&35===v?(n.nm="",e=20):Wu!==v&&(n.Gp+=Ls(Ks(v,Ou(n)?$s:Ys)));break;case 20:Wu===v||0===v||(n.nm+=Ls(Ks(v,Xs)))}f++}return n}function Gu(t,i,n,r){try{Xu(t,i,n,r)}catch(t){}}var Qu=function(){this.Qp="",this.Kp="",this.Yp="",this.Zp=null,this.im=null,this.Jp=[],this.Gp=null,this.nm=null,this.$p=!1};function Yu(t){switch(t.Qp){case"blob":var i;try{i=Xu(t.Jp[0],null)}catch(t){return Ru}return Yu(i);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,i,n){return t+"://"+ou(i)+(null===n?"":":"+n)}(t.Qp,t.Zp,t.im);default:return Ru}}var $u=function(){function t(t,i){var n,r=null;if(null!=i)if(function(t){return null!=t&&t instanceof $u&&"object"==typeof t.rc}(i))r=i.rc;else try{r=Xu(String(i),null)}catch(t){throw new _("Invalid base URL: "+t.message)}try{n=Xu(String(t),r)}catch(t){throw new _("Invalid URL: "+t.message)}var e=n.Gp;this.rc=n,this.Gp=function(t){var i=new bu;return null!==t&&_u(i,t),i}(e),this.Gp.rc=this}var i=t.prototype;return i.toString=function(){return this.href},i.toJSON=function(){return this.href},function(t,i,n){i&&Ke(t.prototype,i),n&&Ke(t,n)}(t,[{key:"href",get:function(){return function(t,i){void 0===i&&(i=!1);var n=t.Qp+":";if(null!==t.Zp?(n+="//",Mu(t)&&(n+=t.Kp,""!==t.Yp&&(n+=":"+t.Yp),n+="@"),n+=ou(t.Zp),null!==t.im&&(n+=":"+t.im)):null===t.Zp&&"file"===t.Qp&&(n+="//"),t.$p)n+=t.Jp[0];else for(var r=0,e=t.Jp;r1?i-1:0),r=1;r>>=1);)r+=r;return e},Qo="function"==typeof String.prototype.padStart?function(t,i,n){return void 0===n&&(n=" "),t.padStart(i,n)}:function(t,i,n){void 0===n&&(n=" ");var r=n,e=(0|i)-t.length;return e<=0?t:(e>r.length&&(r+=Go(r,e/r.length)),r.slice(0,e)+t)},Yo=(String.prototype.padEnd,16384),$o="function"==typeof String.fromCodePoint?function(t){var i;return t.length<=Yo?(i=String).fromCodePoint.apply(i,[].concat(t)):Jo(t,String.fromCodePoint)}:function(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){var e=i.value;e>65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return Ko(n)};function Ko(t){var i;return t.length<=Yo?(i=String).fromCharCode.apply(i,[].concat(t)):Jo(t,String.fromCharCode)}function Jo(t,i){for(var n=[],r=0;r=42||Oi.W_&&Oi.z_>=38||Oi.B_||Oi.F_||Oi.Y_&&Oi.Z_>=29;function ih(t,i){return Wo(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[io({contentType:t},i?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[io({contentType:t},i?{robustness:"SW_SECURE_CRYPTO"}:{})]}}function nh(){return void 0!==l&&"function"==typeof l.requestMediaKeySystemAccess}function rh(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest}var eh=function(){function t(t){this.hw=void 0,this.ew=ro(),this.ow=void 0,this.hw=t}var i=t.prototype;return i.Am=function(){return this.Tm(Bo)},i.pm=function(){return this.Tm(Lo)},i.ym=function(){return this.Tm(xo)},i.wm=function(){return this.Tm(Oo)},i.Tm=function(t){var i=t.$m,n=this.ew.get(i);if(n)return n;var r=this.Sm(t,'video/mp4; codecs="avc1.42000a"');return this.ew.set(i,r),r},i.Sm=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,7]),[4,this.hw.nw(t.Ym,[ih(i,!0)])];case 1:return n.sent(),[2,!0];case 2:n.sent(),n.label=3;case 3:return n.trys.push([3,5,,6]),[4,this.hw.nw(t.Ym,[ih(i,!1)])];case 4:return n.sent(),[2,!0];case 5:return n.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}})}).call(this)},i._m=function(){return this.ow||(this.ow=this.aw()),this.ow},i.aw=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return"https:"===f.location.protocol?[2,!1]:th?[4,this.pm()]:[2,!1];case 1:return t.sent()?[2,!1]:[2,!0]}})}).call(this)},t}();function sh(t,i,n){if("function"==typeof n)n.call(t,i);else for(var r,e=Ft(n);!(r=e()).done;){r.value.call(t,i)}}V(),It(),V(),It(),Wt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Yt(),V(),It(),Bt(),Dt(),V(),It(),Dt(),Ut();var uh=function(){function t(t){var i=this;this.cw=no(),this.fw=void 0,this.dw=0,this._w=void 0,this.Rs=function(t){i.So(t)},this._w=null!=t?t:this}var i=t.prototype;return i.wn=function(t,i){if("function"==typeof i)if("string"==typeof t)this.uw(t,i);else for(var n,r=Ft(t);!(n=r()).done;){var e=n.value;this.uw(e,i)}},i.uw=function(t,i){var n=this.cw[t];void 0===n?this.cw[t]=i:"function"==typeof n?this.cw[t]=[n,i]:0===this.dw?n.push(i):this.cw[t]=n.concat(i)},i.lw=function(t){if("function"==typeof t){var i=this.fw;void 0===i?this.fw=t:"function"==typeof i?this.fw=[i,t]:0===this.dw?i.push(t):this.fw=i.concat(t)}},i.Vo=function(){this.cw=no(),this.fw=void 0},i.So=function(t){this.dw++;var i=this.cw[t.type],n=this.fw;void 0!==i&&sh(this._w,t,i),void 0!==n&&sh(this._w,t,n),this.dw--},i.mn=function(t,i){if("function"==typeof i)if("string"==typeof t)this.gw(t,i);else for(var n,r=Ft(t);!(n=r()).done;){var e=n.value;this.gw(e,i)}},i.gw=function(t,i){var n=this.cw[t];void 0!==n&&("function"==typeof n?n===i&&(this.cw[t]=void 0):0===this.dw?Yn(n,i):this.cw[t]=Kn(n,i))},i.pw=function(t){if("string"==typeof t)this.cw[t]=void 0;else for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;this.cw[r]=void 0}},i.mw=function(t){var i=this.fw;void 0!==i&&("function"==typeof i?i===t&&(this.fw=void 0):0===this.dw?Yn(i,t):this.fw=Kn(i,t))},i.ww=function(t,i){var n=this;return new ot(function(r,e){if(i&&i.Hg)return e(new wr);var s=function(t){o(),r(t)},u=function(){o(),e(new wr)},o=function(){n.mn(t,s),i&&i.jg(u)};n.wn(t,s),i&&i.Xg(u)})},t}(),oh=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.So=function(i){var n=this;Sr(function(){t.prototype.So.call(n,i)})},i}(uh),hh=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.lw=function(i){t.prototype.lw.call(this,i)},n.mw=function(i){t.prototype.mw.call(this,i)},i}(uh);V(),It(),Dt(),V(),It();var ah=function(t,i){void 0===i&&(i=new Date),this.type=void 0,this.date=void 0,this.type=t,this.date=i};V(),It();var ch=function(t){return t.yw="Aw",t.Sw="Tw",t.Ew="contentprotectionerror",t.xw="contentprotectionsuccess",t.Pw="currentsourcechange",t.Iw="destroy",t.Cw="durationchange",t.Rw="emptied",t.Dw="encrypted",t.Nw="ended",t.Bw="Mw",t.Lw="Ow",t.Fw="Uw",t.Vw="Hw",t.Ww="loadstart",t.qw="manifestupdate",t.zw="nosupportedrepresentationfound",t.Gw="offline",t.Xw="online",t.jw="pause",t.uo="play",t.Qw="progress",t.Kw="ratechange",t.Yw="representationchange",t.Jw="resize",t.Zw="seeked",t.$w="seeking",t.iy="segmenterror",t.ey="segmentnotfound",t.sy="manifesterror",t.oy="uy",t.ly="vy",t._y="gy",t.do="sourcechange",t.py="timeupdate",t.wy="volumechange",t.yy="by",t.Ay="Sy",t.LICENSE_REQUEST_GENERATED="Ty",t.Ey="metricschange",t}({}),fh=["cenc"],vh=["cbcs","cbcs-1-9"],dh=function(t){function i(i){var n;return(n=t.call(this,ch.Ay)||this).xy=void 0,n.xy=i,n}return Pt(i,t),i}(ah),lh=function(t){function i(i){var n;return(n=t.call(this,ch.LICENSE_REQUEST_GENERATED)||this).Py=void 0,n.Py=i,n}return Pt(i,t),i}(ah),gh=function(t){function i(i,n,r,e){var s;return(s=t.call(this,"Iy")||this).Cy=void 0,s.Ry=void 0,s.Iy=void 0,s.Dy=void 0,s.Cy=i,s.Ry=n,s.Iy=r,s.Dy=e,s}return Pt(i,t),i}(ah),wh=function(t){function i(){return t.call(this,"lt")||this}return Pt(i,t),i}(ah),mh=function(t){return t.Dw="Ny",t.By="My",t}({}),ph=function(t){function i(i,n){var r;return(r=t.call(this,"Ny")||this).Jm=void 0,r.Py=void 0,r.Jm=i,r.Py=n,r}return Pt(i,t),i}(ah),yh=function(t){function i(){return t.call(this,"My")||this}return Pt(i,t),i}(ah);V(),It(),Bt(),Ut(),V(),It(),Ut(),V(),It();var _h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),kh=/[\t\n\f\r ]/g;function bh(t){return 43===t?62:47===t?63:t>=48&&t<=57?t-48+52:t>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:Ah()}function Ah(){throw new y("Invalid base64 input")}function Th(t){var i=t;kh.test(i)&&(i=i.replace(kh,""));var n=i.length;n%4==0&&n>=1&&"="===i[n-1]&&(n>=2&&"="===i[n-2]?n-=2:n-=1,i=i.substr(0,n));var r=n%4;if(1===r)return Ah();for(var e,s=0===r?0:4-r,u=new I(function(t,i){return 3*(t+i)/4-i}(n,s)),o=s>0?n-4:n,h=0,a=0;h>16&255,u[a++]=e>>8&255,u[a++]=255&e;return 2===s?(e=bh(i.charCodeAt(h))<<2|bh(i.charCodeAt(h+1))>>4,u[a++]=255&e):1===s&&(e=bh(i.charCodeAt(h))<<10|bh(i.charCodeAt(h+1))<<4|bh(i.charCodeAt(h+2))>>2,u[a++]=e>>8&255,u[a++]=255&e),u}function Sh(t,i,n){return _h[t>>2]+_h[(3&t)<<4|i>>4]+_h[(15&i)<<2|n>>6]+_h[63&n]}function Eh(t,i,n){for(var r=[],e=i;e>2]+_h[(3&u)<<4]+"==")}else if(2===n){var o=t[i-2],h=t[i-1];r.push(_h[o>>2]+_h[(3&o)<<4|h>>4]+_h[(15&h)<<2]+"=")}return r.join("")}function Rh(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/[=]/g,"")}function Ch(t,i){var n=i.ac,r=t.getUint8(n>>3),e=1<<7-(7&n);return i.Ly(1),(r&e)===e?1:0}function Ph(t,i,n){for(var r=0,e=0;e>16;return n&&(i-=16,t=n),(n=t>>8)&&(i-=8,t=n),(n=t>>4)&&(i-=4,t=n),(n=t>>2)&&(i-=2,t=n),(n=t>>1)?i-2:i-t};function xh(t){if(t>=55296&&t<=57343)throw new y("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Bh(t,i){return t>>i&63|128}function Oh(t,i){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(i.push(t>>18&7|240),i.push(Bh(t,12)),i.push(Bh(t,6))):(xh(t),i.push(t>>12&15|224),i.push(Bh(t,6))):i.push(t>>6&31|192),i.push(63&t|128)):i.push(t)}function Mh(t,i){if(i.ac>=t.length)throw new y("Invalid byte index");var n=255&t[i.ac];if(i.Ly(1),128==(192&n))return 63&n;throw new y("Invalid continuation byte")}function Lh(t,i){var n=i.ac;if(n>t.length)throw new y("Invalid byte index");if(n===t.length)return!1;var r=255&t[n];if(i.Ly(1),!(128&r))return r;if(192==(224&r)){var e=(31&r)<<6|Mh(t,i);if(e>=128)return e;throw new y("Invalid continuation byte")}if(224==(240&r)){var s=(15&r)<<12|Mh(t,i)<<6|Mh(t,i);if(s>=2048)return xh(s),s;throw new y("Invalid continuation byte")}if(240==(248&r)){var u=(7&r)<<18|Mh(t,i)<<12|Mh(t,i)<<6|Mh(t,i);if(u>=65536&&u<=1114111)return u}throw new y("Invalid UTF-8 detected")}V(),It(),V(),It(),Ut();var Fh=[128,64,32,16,8,4,2,1],Uh=function(){function t(t){this.Vy=void 0,this.Vy=t}return t.prototype.Uy=function(t){return Vh(this.Vy,t)},t}();function Vh(t,i){return(t&i)===i}function jh(t,i){return Vh(t,Fh[i])}function Hh(t,i){var n=t.getUint8(i.ac);return i.Ly(1),n}function Wh(t,i,n){t.setUint8(i.ac,n),i.Ly(1)}function zh(t,i,n){var r=ka(Ta(t),i.ac,i.ac+n);return i.Ly(r.byteLength),r}function qh(t,i,n){Ta(t).set(Ta(n),i.ac),i.Ly(n.byteLength)}function Xh(t,i,n){return i.ac+n<=t.byteLength}function Gh(t,i,n,r){return void 0===r&&(r=!1),r?function(t,i,n){for(var r=0,e=1,s=0;s=55296&&e<=56319&&n>8-this.ib;return(r<0?1:0}},b.defineProperty(t.prototype,"bitLength",{get:function(){return this.$y.bitLength-this.ib},enumerable:!1,configurable:!0}),b.defineProperty(t.prototype,"length",{get:function(){return this.$y.length},enumerable:!1,configurable:!0}),t}();V(),It(),V(),It();A.pow(2,-52);function nc(t,i,n){return A.min(A.max(t,i),n)}function rc(t){if(t<=0)return 0;for(var i=0;t>>i>0;)i++;return i>0&&t===1<>8-i}function sc(t,i){return t&(1<7&&(this.sb++,this.hb=0)},t.prototype.seek=function(t,i){this.sb=t,this.hb=i},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new y("Cannot read past end of buffer.");return this.eb.get(this.sb)>>7-this.hb&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new y("Cannot read past end of buffer.");if(0===this.hb)return this.eb.get(this.sb++);var t=sc(this.eb.get(this.sb),8-this.hb),i=ec(this.eb.get(this.sb+1),this.hb);return this.sb++,t<32)throw new y("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new y("Cannot read past end of buffer.");var i=0;if(0===this.hb&&t%8==0)for(var n=t-8;n>=0;n-=8)i|=this.readByte()<=0;n--)i|=this.readBit()<32)throw new y("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new y("Cannot read past end of buffer.");var i=this.readUInt(t);return 0===(i&1<>3,this.hb=7&i},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new y("Cannot read past end of buffer.");for(var i=[],n=0;ni?1:E(t)?E(i)?0:1:-1},hc=function(){function t(){this.ob=[],this.ub=[],this.fb=0}return t.from=function(){for(var i=[],n=0;n=this.length)){var i=this.findContainingBufferIndex(t),n=t-this.ub[i];return this.ob[i][n]}},b.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.ob.length<1)return-1;if(this.ob.length>1){var i=this.join();this.clear(),this.pushRange(i)}var n=this.ob[0];return"number"==typeof t?tc(n,t):"undefined"!=typeof Buffer?Buffer.from(n.buffer,n.byteOffset,n.byteLength).indexOf(t):function(t,i){if(0===i.length)return 0;for(var n=i[0],r=i.length,e=t.length-r,s=0;s<=e&&!((s=tc(t,n,s))<0||s>e);s++){for(var u=s+1,o=s+r,h=1;u4)throw new y("Expected byteLength to be between 0 and 4 but was "+i);if(t<0||t>this.length-i)throw new y("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-i)+")");if(1===i)return this.get(t);for(var n=0,r=0;re)return new t;if(r===e)return new t;for(var s=new t,u=this.findContainingBufferIndex(r),o=this.ob[u],h=r,a=h-this.ub[u];h+o.length-a=0&&n>=0;){if(0!==r[e])break;if(0===e){if(0===n)return new t;n-=1,e=(r=this.ob[n]).length-1}else e-=1;i-=1}return this.slice(0,i+1)},t}(),ac=function(){function t(i){this._b=i||t.BUFFER_CHUNK_SIZE,this.gb=!1,this.pb=new hc,this.eb=new I(this._b),this.mb=0,this.wb=0,this.hb=7}return t.prototype.closeByte=function(){this.eb[this.mb++]=this.wb,this.mb>=this._b&&this.closeBuffer(),this.wb=0,this.hb=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.mb&&(this.pb.pushRange(this.eb,0,this.mb),t&&(this.eb=new I(this._b)),this.mb=0)},b.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.hb},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.gb)throw new y("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.gb=!0,this.pb},t.prototype.writeBit=function(t){if(this.gb)throw new y("Cannot write to a closed BitWriter.");this.wb|=t<32)throw new y("The max bitlength that can be provided is 32.");if(t>=A.pow(2,i))throw new y("Uint "+t+" cannot be represented in "+i+" bit(s).");if(this.isWritingStartBit&&i%8==0)for(var n=i-8;n>=0;n-=8)this.writeByte(t>>n&255);else for(n=i-1;n>=0;n--)this.writeBool((t&1<0)},t.prototype.writeInt=function(t,i){if(i>32)throw new y("The max bitlength that can be provided is 32.");if(A.abs(t)>=A.pow(2,i-1))throw new y("Signed integer "+t+" cannot be represented in "+i+" bit(s).");t<0?this.writeUInt(t+A.pow(2,i),i):this.writeUInt(t,i)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new y("Received a negative number.");for(var i=A.floor(A.log2(t+1))+1,n=0;n=t.LARGE_SIZE/8,e=16===this.boxType.length;i.writeUInt(r?1:n,32),i.writeString(e?"uuid":this.boxType),r&&(i.writeUInt(A.floor(n/t.LARGE_SIZE),32),i.writeUInt(n%t.LARGE_SIZE,32)),e&&i.writeString(this.boxType)},t.prototype.getSize=function(){var i=8+(this.boxType.length>4?16:0),n=this.getBoxContentSize()+i;return n>=t.LARGE_SIZE/8&&(n+=8),n},t.prototype.serialize=function(){var t=new cc;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=A.pow(2,32),t}();function vc(t,i){return j(t,fe)?64===i:t65535&&(e-=65536,i.push(e>>>10&1023|55296),e=56320|1023&e),i.push(e)}return _c(i)}(r)}(t,i,!0)}function Pc(t,i,n){return void 0===i&&(i=0),void 0===n&&(n=t.byteLength),new I(t.buffer,t.byteOffset+i,n-i)}function Dc(t,i,n){return void 0===i&&(i=0),void 0===n&&(n=t.byteLength),new DataView(t.buffer,t.byteOffset+i,n-i)}function Nc(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function xc(t){return new I(t.buffer,t.byteOffset,t.byteLength)}var Bc=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new pc(this.offset<<3)},t}();V(),It();var Oc=function(){function t(t,i){this.data=t,this.cursor=i}return t.prototype.nextUint8=function(){return bc(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getUint16(i.offset,n);return i.shift(2),r}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getInt16(i.offset,n);return i.shift(2),r}(this.data,this.cursor)},t.prototype.nextUint32=function(){return Sc(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getInt32(i.offset,n);return i.shift(4),r}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,i,n){void 0===n&&(n=!1);var r=Sc(t,i,n),e=Sc(t,i,n),s=n?e:r,u=n?r:e;return fe.fromBits(u,s,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Ec(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Ac(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,i,n){for(var r=[],e=0;et.byteLength){var o=u;return i.seek(n),{complete:!1,neededOffset:o}}var h={type:e.type,offset:n,data:new Oc(Dc(t,n,u),new Bc(e.headerSize))};return i.seek(u),{complete:!0,box:h}}function Uc(t){return{version:t>>24,flags:new kc(16777215&t)}}function Vc(t,i){var n,r,e,s;return 1===i?(n=t.nextUint64(),r=t.nextUint64(),e=t.nextUint32(),s=t.nextUint64()):(n=t.nextUint32(),r=t.nextUint32(),e=t.nextUint32(),s=t.nextUint32()),{creation:n,modification:r,scale:e,duration:s}}function jc(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function Hc(t){var i=t.nextUint32Array(9);return{a:gc(i[0],16),b:gc(i[1],16),u:gc(i[2],30),c:gc(i[3],16),d:gc(i[4],16),v:gc(i[5],30),x:gc(i[6],16),y:gc(i[7],16),w:gc(i[8],30)}}function Wc(t){return new mc(t.type,Pc(xc(t.data.data),t.data.cursor.offset))}var zc=function(t){function i(i,n,r,e){void 0===r&&(r=0),void 0===e&&(e=0);var s=t.call(this,"hdlr",r,e)||this;return s.name=n,s.handlerType=i,s}return Ja(i,t),b.defineProperty(i.prototype,"handlerType",{get:function(){return this.bb},set:function(t){this.bb=t},enumerable:!1,configurable:!0}),i.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},i.prototype.getBoxContentSize=function(){var i,n;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(n=null===(i=this.name)||void 0===i?void 0:i.length)&&void 0!==n?n:0)+1},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(0,32),i.writer.writeString(this.handlerType),this.serializeReserved(i),this.name&&i.writer.writeString(this.name),i.writer.writeByte(0)},i}(wc);function qc(t){var i=t.data,n=Uc(i.nextUint32()),r=n.version,e=n.flags;i.skip(4);var s=i.nextChars(4);i.skip(12);var u=i.nextUTF8String();return new zc(s,u,r,e.raw)}!function(t){function i(){return t.call(this,"mdir")||this}Ja(i,t),i.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(zc);V(),It(),V(),It(),V(),It();var Xc=function(){function t(t,i){void 0===i&&(i=!1),this.fixed28BitMode=i,this.tag=t}return t.prototype.encodeSize=function(t){for(var i=[];t>0;)i.length>0&&(i[i.length-1]+=128),i.push(t%128),t>>=7;if(this.fixed28BitMode)for(;i.length<4;)i.push(128);return i.reverse()},b.defineProperty(t.prototype,"tag",{get:function(){return this.Ab},set:function(t){if(!vc(t,8))throw new y("Provided tag does not fit in 8 bits.");this.Ab=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return this.getDescriptorSize()+1+this.encodeSize(this.getDescriptorSize()).length},t.prototype.serialize=function(t){t.writer.writeByte(this.tag);for(var i=0,n=this.encodeSize(this.getDescriptorSize());i0)throw new y("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,i),void 0!==this.explicitAuxInfoType&&(i.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),i.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),i.writer.writeByte(this.defaultSampleInfoSize),i.writer.writeUInt(this.sampleInfoSizes.length,32);for(var n=0,r=this.sampleInfoSizes;n1)throw new y("Provided balance does not fit in the allowed range [-1, 1].");if(!vc(dc(t,8),16))throw new y("Provided balance does not fit in 16 bits (fixed 8.8).");this.UA=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(dc(this.balance,8),16),i.writer.writeUInt(0,16)}}(wc);V(),It();!function(t){function i(i){var n=t.call(this,"stss",0,0)||this;return n.entries=i,n}Ja(i,t),b.defineProperty(i.prototype,"entries",{get:function(){return this.Lb},set:function(t){if(!vc(t.length,32))throw new y("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!vc(t,32)}))throw new y("Not all entries can be represented in 32 bits.");this.Lb=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.entries.length,32);for(var n=0,r=this.entries;n31)throw new y("The provided compressorName should at most be 31 characters long.");this.qA=t},enumerable:!1,configurable:!0}),b.defineProperty(i.prototype,"frameCount",{get:function(){return this.zA},set:function(t){if(!vc(t,16))throw new y("Provided frameCount does not fit in 16 bits.");this.zA=t},enumerable:!1,configurable:!0}),b.defineProperty(i.prototype,"depth",{get:function(){return this.GA},set:function(t){if(!vc(t,16))throw new y("Provided depth does not fit in 16 bits.");this.GA=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){var i,n,r,e,s,u;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(n=null===(i=this.clap)||void 0===i?void 0:i.getSize())&&void 0!==n?n:0)+(null!==(e=null===(r=this.pasp)||void 0===r?void 0:r.getSize())&&void 0!==e?e:0)+(null!==(u=null===(s=this.extra)||void 0===s?void 0:s.length)&&void 0!==u?u:0)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(0,16),i.writer.writeUInt(0,16),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),i.writer.writeUInt(this.width,16),i.writer.writeUInt(this.height,16),i.writer.writeUInt(dc(this.horizontalResolution,16),32),i.writer.writeUInt(dc(this.verticalResolution,16),32),i.writer.writeUInt(0,32),i.writer.writeUInt(this.frameCount,16),i.writer.writeByte(this.compressorName.length),i.writer.writeString(this.compressorName);for(var n=0;n<31-this.compressorName.length;n++)i.writer.writeByte(0);i.writer.writeUInt(this.depth,16),i.writer.writeInt(-1,16),this.clap&&i.concat(this.clap.serialize()),this.pasp&&i.concat(this.pasp.serialize()),this.extra&&lc(i.writer,this.extra)},i}($c);V(),It(),V(),It(),H();!function(t){function i(i){var n=t.call(this,"esds",0,0)||this;return n.esDescriptor=i,n}Ja(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(j(this.esDescriptor,I)?this.esDescriptor.length:this.esDescriptor.getSize())},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),j(this.esDescriptor,I)?i.concat(hc.from(this.esDescriptor)):this.esDescriptor.serialize(i)}}(wc);V(),It();!function(t){function i(i,n,r){var e=t.call(this,"mp4a",i,r)||this;return e.esd=n,e}Ja(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.concat(this.esd.serialize())}}(Kc);V(),It();!function(t){function i(i,n,r,e){void 0===e&&(e={});var s=t.call(this,"mp4v",i,n,e)||this;return s.esDescriptor=r,s}Ja(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor.serialize(i)}}(yv);V(),It();!function(t){function i(i,n){var r=t.call(this,"mp4s",i)||this;return r.esDescriptor=n,r}Ja(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor.serialize(i)}}($c);V(),It(),V(),It();!function(t){function i(i){var n=t.call(this,"avcC")||this;return n.decoderConfig=i,n}Ja(i,t),i.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},i.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(fc);V(),It();!function(){function t(t,i,n,r,e,s){void 0===s&&(s=1),this.lengthSizeMinusOne=n,this.version=s,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=i,this.spsSets=r,this.ppsSets=e}b.defineProperty(t.prototype,"version",{get:function(){return this.XA},set:function(t){if(!vc(t,8))throw new y("Provided version does not fit in 8 bits.");this.XA=t},enumerable:!1,configurable:!0}),b.defineProperty(t.prototype,"profileIndication",{get:function(){return this.jA},set:function(t){if(!vc(t,8))throw new y("Provided profileIndication does not fit in 8 bits.");this.jA=t},enumerable:!1,configurable:!0}),b.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.QA},set:function(t){if(!vc(t,8))throw new y("Provided profileCompatibility does not fit in 8 bits.");this.QA=t},enumerable:!1,configurable:!0}),b.defineProperty(t.prototype,"levelIndication",{get:function(){return this.KA},set:function(t){if(!vc(t,8))throw new y("Provided levelIndication does not fit in 8 bits.");this.KA=t},enumerable:!1,configurable:!0}),b.defineProperty(t.prototype,"spsSets",{get:function(){return this.YA},set:function(t){if(!vc(t.length,5))throw new y("Provided number of spsSets exceeds the max (32)");this.YA=t},enumerable:!1,configurable:!0}),b.defineProperty(t.prototype,"ppsSets",{get:function(){return this.JA},set:function(t){if(!vc(t.length,8))throw new y("Provided number of ppsSets exceeds the max (256)");this.JA=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce(function(t,i){return t+i.length},0)+2*this.ppsSets.length+this.ppsSets.reduce(function(t,i){return t+i.length},0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var i=0,n=this.spsSets;i0&&(null!==(e=null===(r=n.constantIv)||void 0===r?void 0:r.length)&&void 0!==e?e:0)>0)throw new y("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return o.kId=n.kId,o.isProtected=null!==(s=n.isProtected)&&void 0!==s?s:1,n.perSampleIvSize>0?o.perSampleIvSize=n.perSampleIvSize:o.constantIv=null!==(u=n.constantIv)&&void 0!==u?u:new I(0),o}return Ja(i,t),b.defineProperty(i.prototype,"isProtected",{get:function(){return this.tS},set:function(t){if(!vc(t,8))throw new y("Provided isProtected does not fit in 1 byte.");this.tS=t},enumerable:!1,configurable:!0}),b.defineProperty(i.prototype,"perSampleIvSize",{get:function(){return this.iS},set:function(t){if(![8,16].includes(t))throw new y("Provided perSampleIvSize does not match any allowed value [8, 16].");this.iS=t,this.eS=new I(0)},enumerable:!1,configurable:!0}),b.defineProperty(i.prototype,"kId",{get:function(){return this.sS},set:function(t){if(16!==t.length)throw new y("Provided kId length is not 16.");this.sS=t},enumerable:!1,configurable:!0}),b.defineProperty(i.prototype,"constantIv",{get:function(){return this.eS},set:function(t){if(![8,16].includes(t.length))throw new y("Provided constant IV length does not match any allowed value [8, 16].");this.eS=t,this.iS=0},enumerable:!1,configurable:!0}),i.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},i.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.serializeOwnContent(i)},i.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),lc(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),lc(t.writer,this.constantIv))},i}(wc),kv=(function(t){function i(i){return t.call(this,0,i)||this}Ja(i,t)}(_v),function(t){function i(i){var n=t.call(this,1,i)||this;return n.cryptByteBlocks=i.cryptByteBlock,n.skipByteBlocks=i.skipByteBlock,n}return Ja(i,t),b.defineProperty(i.prototype,"cryptByteBlocks",{get:function(){return this.nS},set:function(t){if(!vc(t,4))throw new y("Provided cryptByteBlocks does not fit in 4 bits.");this.nS=t},enumerable:!1,configurable:!0}),b.defineProperty(i.prototype,"skipByteBlocks",{get:function(){return this.rS},set:function(t){if(!vc(t,4))throw new y("Provided skipByteBlocks does not fit in 4 bits.");this.rS=t},enumerable:!1,configurable:!0}),i.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},i}(_v));!function(t){function i(i){var n=t.call(this)||this;return n.tencBox=new kv(i),n}Ja(i,t),i.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},i.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Ef);function bv(t){return void 0!==t.iv}function Av(t){return void 0!==t.subsamples}V(),It();!function(t){function i(i){var n=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return n.samples=i,n}Ja(i,t),b.defineProperty(i.prototype,"samples",{get:function(){return this.bA},set:function(t){var i;if(!vc(t.length,32))throw new y("The number of samples provided does not fit in 32 bits.");for(var n=0,r=t;n0&&(r.lS.jy(),r.So(new dh(r.lS))),r.dS.removeEventListener("keystatuseschange",r.bS),r.dS.removeEventListener("message",r.SS)},r.dS.addEventListener("keystatuseschange",r.bS),r.dS.addEventListener("message",r.SS),r.lS=new qa;var e=[];return r.dS.closed&&e.push(ot.resolve(r.dS.closed)),r._S=new Xa,e.push(r._S.Yy),r.zd=ot.race(e).then(r.TS,r.TS),r.mS(),r}Pt(i,t);var n=i.prototype;return n.Xs=function(){if(this.vS)return this.zd;var t=[];return t.push(ot.resolve(this.dS.close())),t.push(Rr(1e3)),this._S.$g(ot.race(t).catch(Nv)),this.vS=!0,this.zd},n.gS=function(t,i,n){if(Oi.e_){var r=Cv(Ea(i));if(1===r.version)i=new Rf(r.systemId,r.data).serialize().join()}return ot.resolve(this.dS.generateRequest(t,i)).catch(Nv)},n.Un=function(t){return ot.resolve(this.dS.load(t)).catch(Nv)},n.pS=function(){return ot.resolve(this.dS.remove()).catch(Nv)},n.er=function(t){return ot.resolve(this.dS.update(t)).catch(Nv)},n.mS=function(){var t=this;this.lS.jy(),this.dS.keyStatuses.forEach(function(i,n){t.wS(n,i)}),this.So(new dh(this.lS))},n.wS=function(t,i){if("string"==typeof t){var n=t;t=i,i=n}var r=Ea(t);if(this.yS===yo&&16===r.byteLength&&(Oi.v_||Oi.dg)){var e=Aa(r),s=e.getUint32(0,!0),u=e.getUint16(4,!0),o=e.getUint16(6,!0);e.setUint32(0,s,!1),e.setUint16(4,u,!1),e.setUint16(6,o,!1)}this.yS===yo&&"status-pending"===i&&(i="usable"),this.lS.Gy(r,i)},xt(i,[{key:"uS",get:function(){return this.zd}},{key:"cS",get:function(){return this.dS.expiration}},{key:"xy",get:function(){return this.lS}},{key:"fS",get:function(){return this.dS.sessionId}}]),i}(uh);function Nv(t){var i;if(t.message){var n=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);n&&(i=0|T(n[1],16))}throw new $a(t.message,void 0,i,t)}var xv=function(){function t(t,i,n){this.ES=void 0,this.xS=void 0,this.Cd=void 0,this.ES=t,this.xS=i,this.Cd=n}var i=t.prototype;return i.kS=function(t){return jt(function(){return zt(this,function(i){return[2,new Dv(this.ES.createSession(t),this.xS)]})}).call(this)},i.PS=function(t){return ot.resolve(this.ES.setServerCertificate(t))},i._n=function(t){return ot.resolve(t.setMediaKeys(this.ES))},i.IS=function(t){return ot.resolve(t.setMediaKeys(null))},i.hr=function(){return ot.resolve()},t}(),Bv=function(){function t(t,i,n){this.CS=void 0,this.yS=void 0,this.DS=void 0,this.CS=t,this.yS=i,this.DS=n}var i=t.prototype;return i.RS=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return[4,this.CS.createMediaKeys()];case 1:return t=i.sent(),[2,new xv(t,this.yS,this.DS)]}})}).call(this)},i.NS=function(){return this.DS},xt(t,[{key:"xS",get:function(){return this.CS.keySystem}}]),t}();V(),It(),Ut(),V(),It(),Ut();var Ov="video/avc",Mv="video/hevc",Lv="video/mp4",Fv="video/mpeg",Uv="video/mpeg2",Vv="video/webm",jv="video/x-unknown",Hv="audio/mp4",Wv="audio/webm",zv="image/jpeg",qv="application/ttml+xml",Xv="application/mp4",Gv="text/vtt";function Qv(t){return zo(t,"audio/")}function Yv(t){return zo(t,"video/")}function $v(t){return Wo(t,Xv)||Wo(t,Lv)||Wo(t,Hv)}function Kv(t){return Wo(t,Vv)||Wo(t,Wv)}var Jv=function(){function t(t,i){this.Km=void 0,this.LS=void 0,this.Km=t,this.LS=i}return t.prototype.MS=function(t){for(var i,n=Ft(this.LS);!(i=n()).done;){var r=i.value,e=r[0],s=r[1];if(e.toLowerCase()===t.toLowerCase())return s}},t}();function Zv(t){var i=t.trim(),n=i.indexOf(";");if(n<0)return new Jv(i,[]);for(var r=i.substr(0,n).trim(),e=i.substr(n+1).trim(),s=[],u=0,o=!1,h=0;h=1?t.msSetMediaKeys(this.XS):t.addEventListener("loadedmetadata",n),ot.resolve()},i.IS=function(t){return ot.resolve()},i.hr=function(){return ot.resolve()},t}(),dd=function(){function t(t,i){this.yS=void 0,this.ZS=void 0,this.yS=t,this.ZS=i}var i=t.prototype;return i.NS=function(){return this.ZS},i.RS=function(){var t=new f.MSMediaKeys(this.yS);return ot.resolve(new vd(t,this.yS,this.ZS))},xt(t,[{key:"xS",get:function(){return this.yS}}]),t}(),ld=function(){function t(){}return t.prototype.nw=function(t,i){try{return ot.resolve(function(t,i){if(!gd())throw new _("Unsupported key system "+t);for(var n,r=Ft(i);!(n=r()).done;){var e=n.value,s=rd(wd,fh,t,e);if(s)return new dd(t,s)}throw new _("Unsupported key system configuration for "+t)}(t,i))}catch(t){return ot.reject(t)}},t.US=function(){return gd()},t}();function gd(){return void 0!==f.MSMediaKeys&&"function"==typeof f.MSMediaKeys.isTypeSupported}function wd(t,i){return f.MSMediaKeys.isTypeSupported(t,i)}V(),It(),Ut(),V(),It(),Bt(),V(),It(),Wt(),Yt(),V(),It(),Wt(),Bt(),Dt(),Yt();var md=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).eT=void 0,e.jS=void 0,e.iT=void 0,e.HS=void 0,e.nT=void 0,e.WS=void 0,e.$S=void 0,e.sT=void 0,e.Ts=void 0,e.QS=void 0,e.KS=void 0,e.eT=i,e.jS=n,e.iT=r,e.HS=new Xa,e.nT=void 0,e.WS=new qa,e.$S=void 0,e.sT=new Xa,e.Ts=function(){var t=e.$S&&e.$S.error;if(t){var i=new $a("Unknown CDM error",t.code,t.systemCode);e.nT?(e.nT.Ky(i),e.nT=void 0):i.Jy===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?e.YS("output-not-allowed"):e.YS("internal-error"),e.So(new wh)}},e.QS=function(t){e.So(new gh(e,"license-request",Ra(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},e.KS=function(){e.nT&&(e.nT.Qy(void 0),e.nT=void 0),e.YS("usable")},e}Pt(i,t);var n=i.prototype;return n.gS=function(t,i,n){var r=n&&n.fairplay&&n.fairplay.tT;if(!r)throw new _("Expected FairPlay contentId to be defined but was "+r+".");var e=function(t,i,n){var r=pa(t),e=2*r.length,s=2*i.length,u=new ArrayBuffer(4+e+4+s+4+n.byteLength),o=new DataView(u),h=new Pa;return Jh(o,h,e,!0),fa(o,h,r,!0),Jh(o,h,s,!0),fa(o,h,i,!0),Jh(o,h,n.byteLength,!0),qh(o,h,n),new I(u)}(Ea(i),r,this.iT);return this.$S=this.eT.createSession(this.jS,e),this.$S.addEventListener("webkitkeymessage",this.QS,!1),this.$S.addEventListener("webkitkeyadded",this.KS,!1),this.$S.addEventListener("webkitkeyerror",this.Ts,!1),this.YS("status-pending"),this.sT.Qy(this.$S),this.sT=new Xa,ot.resolve()},n.Un=function(t){return ot.resolve(!0)},n.er=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(0===(i=Ea(t)).byteLength)throw new _("Cannot call update with an empty response.");return this.nT=new Xa,(n=this.$S)?[3,2]:[4,this.sT.Yy];case 1:n=r.sent(),r.label=2;case 2:return n.update(i),[4,this.nT.Yy];case 3:return r.sent(),[2]}})}).call(this)},n.Xs=function(){var t,i=this.$S;return i&&(i.removeEventListener("webkitkeymessage",this.QS,!1),i.removeEventListener("webkitkeyadded",this.KS,!1),i.removeEventListener("webkitkeyerror",this.Ts,!1),i.close()),this.sT.Zg(),null==(t=this.nT)||t.Zg(),this.HS.Qy(void 0),this.HS.Yy},n.pS=function(){return ot.resolve(void 0)},n.YS=function(t){this.WS.jy(),this.WS.Gy(za,t),this.So(new dh(this.WS))},xt(i,[{key:"fS",get:function(){return this.$S?this.$S.sessionId:""}},{key:"cS",get:function(){return NaN}},{key:"uS",get:function(){return this.HS.Yy}},{key:"xy",get:function(){return this.WS}}]),i}(uh);V(),It(),Bt(),Dt(),H(),V(),It();var pd=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.PICTURE_IN_PICTURE_ERROR=11001]="PICTURE_IN_PICTURE_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),yd=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(i){var n=A.floor(i/1e3);if(n in t)return n;throw new _("Invalid error code: "+i)}}(yd||(yd={}));var _d=function(t){function i(i,n,r){var e;return(e=t.call(this,n,r)||this).code=void 0,e.code=i,e}return Pt(i,t),xt(i,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return yd.fromCode(this.code)}}]),i}(gr);function kd(t,i){return j(t,_d)?t:j(t,y)?new _d(i,t.message,t):new _d(i,String(t))}var bd=function(){function t(t,i,n){this.eT=void 0,this.xS=void 0,this.Cd=void 0,this.jS=void 0,this.iT=void 0,this.eT=t,this.xS=i,this.Cd=n,this.iT=void 0;var r=sd(n)||"video/mp4";this.jS=id(r)}var i=t.prototype;return i.getInternalMediaKeys=function(){return this.eT},i.kS=function(t){return jt(function(){return zt(this,function(t){if(!this.iT)throw new _d(pd.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new md(this.eT,this.jS,this.iT)]})}).call(this)},i.PS=function(t){return this.iT=Ea(t),ot.resolve(!0)},i._n=function(t){return t.webkitSetMediaKeys(this.eT),ot.resolve()},i.IS=function(t){return t.webkitSetMediaKeys(null),ot.resolve()},i.hr=function(){return ot.resolve()},t}(),Ad=function(){function t(t,i){this.yS=void 0,this.ZS=void 0,this.yS=t,this.ZS=i}var i=t.prototype;return i.NS=function(){return this.ZS},i.RS=function(){var t=new f.WebKitMediaKeys(this.yS);return ot.resolve(new bd(t,this.yS,this.ZS))},xt(t,[{key:"xS",get:function(){return this.yS}}]),t}(),Td=function(){function t(){}return t.prototype.nw=function(t,i){try{return ot.resolve(function(t,i){if(t!==Po)throw new _(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!Sd())throw new _("Unsupported key system "+t);for(var n,r=Ft(i);!(n=r()).done;){var e=n.value,s=rd(Ed,vh,t,e);if(s)return new Ad(t,s)}throw new _("Unsupported key system configuration for "+t)}(t,i))}catch(t){return ot.reject(t)}},t.US=function(){return Sd()},t}();function Sd(){return void 0!==f.WebKitMediaKeys&&"function"==typeof f.WebKitMediaKeys.isTypeSupported}function Ed(t,i){return f.WebKitMediaKeys.isTypeSupported(t,i)}V(),It(),Wt(),Ut(),Yt();var Id=function(){function t(t){this.rT=void 0,this.rT=t}return t.prototype.nw=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Ft(this.rT),s.label=1;case 1:if((r=n()).done)return[3,6];e=r.value,s.label=2;case 2:return s.trys.push([2,4,,5]),[4,e.nw(t,i)];case 3:return[2,s.sent()];case 4:return s.sent(),[3,5];case 5:return[3,1];case 6:throw new _("Unsupported key system configuration for "+t)}})}).call(this)},t}();V(),It(),Ut(),V(),It(),V(),It(),Wt(),Yt(),V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It();var Rd=function(){function t(t){var i=this;this.oT=[],this.aT=void 0,this.hT=new dr,this.dT=void 0,this.uT=function(){return 0===i.oT.length?i.dT?Cd(i.dT,i.hT.Yg).then(i.lT,i.lT):i.lT():i.oT.shift()().then(i.uT)},this.lT=function(){if(0!==i.oT.length)return i.uT();i.aT=void 0},this.dT=t}var i=t.prototype;return i.Zo=function(t,i){var n=this;return new ot(function(r){var e=dr.ep([n.hT.Yg,i]),s=function(){e.zg()};n.oT.push(function(){var i=Cd(t,e.Yg);return r(i),i.then(s,s)}),n.aT||(n.aT=n.uT())})},i.Zg=function(){return this.cT(!0)},i.kn=function(){return this.dT=void 0,this.cT(!1)},i.cT=function(t){var i=this.aT;return this.hT.Zg(),t&&(this.hT=new dr),ot.resolve(i)},t}();function Cd(t,i){return new ot(function(n){return n(t(i))})}var Pd=new Rd,Dd=function(t){function i(i){var n;return(n=t.call(this)||this).yS=void 0,n.zS=void 0,n.nT=void 0,n.HS=void 0,n.gb=void 0,n.bT=void 0,n.yT=void 0,n.wT=void 0,n.pT=void 0,n.mT=void 0,n.yS=i,n.zS=void 0,n.nT=void 0,n.gb=!1,n.bT=void 0,n.pT=void 0,n.HS=new Xa,n.yT="",n.mT=new Xa,n.wT=new qa,n}Pt(i,t);var n=i.prototype;return n.fT=function(){this.nT&&(this.YS("usable"),this.nT.Qy(void 0),this.nT=void 0)},n.vT=function(t){var i=new $a("Unknown CDM error",t.errorCode,t.systemCode);this.nT?(this.nT.Ky(i),this.nT=void 0):this.zS?(this.zS.Ky(i),this.zS=void 0):i.Jy===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.YS("output-restricted"):1===i.Zy?this.YS("expired"):this.YS("internal-error")},n._T=function(t){0!==t.message.byteLength?(this.zS&&(this.zS.Qy(void 0),this.zS=void 0),this.So(new gh(this,"license-request",Qa(this.yS,Ra(t.message).buffer),t.defaultURL||void 0))):this.zS&&(this.zS.Ky("Empty key message"),this.zS=void 0)},n.gT=function(t){this.pT||(this.pT=t,this.mT.Qy(t))},n.Xs=function(){return jt(function(){return zt(this,function(t){return this.throwIfClosed(),this.nT&&(this.nT.Ky(void 0),this.nT=void 0),this.gb=!0,this.HS.Qy(void 0),[2]})}).call(this)},n.gS=function(t,i){return jt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return this.throwIfClosed(),this.zS=new Xa,this.bT=Ea(i),(t=this.pT)?[3,2]:[4,this.mT.Yy];case 1:t=n.sent(),n.label=2;case 2:return t.webkitGenerateKeyRequest(this.yS,this.bT),[4,this.zS.Yy];case 3:return n.sent(),[2]}})}).call(this)},n.Un=function(t){return jt(function(){return zt(this,function(t){return this.throwIfClosed(),[2,!1]})}).call(this)},n.pS=function(){return jt(function(){return zt(this,function(t){return this.throwIfClosed(),[2]})}).call(this)},n.er=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return i=this,this.throwIfClosed(),this.nT=new Xa,Oi.S_||Oi.w_?[2,Pd.Zo(function(){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.doUpdate(t)];case 1:return i.sent(),[2]}})}).call(i)})]:[4,this.doUpdate(t)];case 1:return n.sent(),[2]}})}).call(this)},n.doUpdate=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return void 0===this.nT?[2]:(i=this.pT)?[3,2]:[4,this.mT.Yy];case 1:i=n.sent(),n.label=2;case 2:return i.webkitAddKey(this.yS,Ea(t),this.bT,this.fS),[4,this.nT.Yy];case 3:return n.sent(),Oi.w_?[4,Rr(500)]:[3,5];case 4:n.sent(),n.label=5;case 5:return[2]}})}).call(this)},n.throwIfClosed=function(){if(this.gb)throw new _("Already closing or closed.")},n.YS=function(t){this.wT.jy(),this.wT.Gy(za,t),this.So(new dh(this.wT))},n.AT=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return(i=this.pT)?[3,2]:[4,this.mT.Yy];case 1:i=n.sent(),n.label=2;case 2:if(!(t=i).webkitCancelKeyRequest)return[3,7];n.label=3;case 3:return n.trys.push([3,4,5,7]),t.webkitCancelKeyRequest(this.yS,this.yT),[3,7];case 4:return n.sent(),[3,7];case 5:return[4,Rr(500)];case 6:return n.sent(),[7];case 7:return[2]}})}).call(this)},xt(i,[{key:"xy",get:function(){return this.wT}},{key:"fS",get:function(){return this.yT},set:function(t){this.yT=t}},{key:"uS",get:function(){return this.HS.Yy}},{key:"cS",get:function(){return NaN}}]),i}(uh),Nd=function(){function t(t,i){var n=this;this.xS=void 0,this.Cd=void 0,this.pT=void 0,this.kT=void 0,this.ET=void 0,this.KS=void 0,this.ST=void 0,this.TT=void 0,this.xS=t,this.Cd=i,this.pT=void 0,this.kT=ro(),this.ET=[],this.KS=function(t){var i=n.xT(t.sessionId);i&&i.fT()},this.ST=function(t){var i=n.xT(t.sessionId);i&&i.vT(t)},this.TT=function(t){var i=n.xT(t.sessionId);i&&i._T(t)}}var i=t.prototype;return i._n=function(t){return this.pT=t,this.pT.addEventListener("webkitkeyadded",this.KS),this.pT.addEventListener("webkitkeyerror",this.ST),this.pT.addEventListener("webkitkeymessage",this.TT),this.kT.forEach(function(i,n){return i.gT(t)}),this.ET.forEach(function(i){return i.gT(t)}),ot.resolve()},i.IS=function(t){return t.removeEventListener("webkitkeyadded",this.KS),t.removeEventListener("webkitkeyerror",this.ST),t.removeEventListener("webkitkeymessage",this.TT),this.pT=void 0,ot.resolve()},i.hr=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:t=this.kT.entries(),i=t.next(),n.label=1;case 1:return i.done?[3,3]:[4,i.value[1].AT()];case 2:return n.sent(),i=t.next(),[3,1];case 3:return this.kT.clear(),[2]}})}).call(this)},i.kS=function(t,i,n){return jt(function(){var t;return zt(this,function(i){return t=new Dd(this.xS),this.pT&&t.gT(this.pT),this.ET.push(t),[2,t]})}).call(this)},i.PS=function(t){return ot.resolve(!1)},i.xT=function(t){if(t){var i=this.kT.get(t);return i||((i=this.ET.shift())?(i.fS=t,this.kT.set(t,i),i):void 0)}},t}(),xd=function(){function t(t,i){this.xS=void 0,this.PT=void 0,this.xS=t,this.PT=i}var i=t.prototype;return i.RS=function(){return ot.resolve(new Nd(this.xS,this.PT))},i.NS=function(){return this.PT},t}(),Bd=function(){function t(){}return t.prototype.nw=function(t,i){try{return ot.resolve(function(t,i){if(!Bd.US())throw new _("Unsupported key system "+t);for(var n,r=Ft(i);!(n=r()).done;){var e=n.value,s=rd(Od,fh,t,e);if(s)return new xd(t,s)}throw new _("Unsupported key system configuration for "+t)}(t,i))}catch(t){return ot.reject(t)}},t.US=function(){return rh()},t}();function Od(t,i){var n=xr();return Boolean(n&&n.canPlayType&&""!==n.canPlayType(i,t))}V(),It();var Md,Ld=function(){function t(){}return t.prototype.nw=function(t,i){return t===bo||t===yo?ot.resolve(void 0):ot.reject(new y("DRM configuration not supported"))},t}();function Fd(){return Md||(Md=function(){var t=[];Td.US()&&t.push(new Td);cd.US()&&t.push(new cd);ld.US()&&t.push(new ld);Bd.US()&&t.push(new Bd);Oi.k_&&t.push(new Ld);return new Id(t)}()),Md}V(),It(),Dt(),V(),It();var Ud=function(){function t(){this.IT=ro()}var i=t.prototype;return i.jy=function(t){this.IT.delete(t)},i.CT=function(){this.IT.clear()},i.zy=function(t){return this.IT.get(t)},i.Gy=function(t,i){this.IT.set(t,i)},t}(),Vd=function(){function t(){}return t.DT=function(){return t.Bg||(t.Bg=jd.US()?new jd:new Ud),t.Bg},t.jy=function(i){t.DT().jy(i)},t.CT=function(){t.DT().CT()},t.zy=function(i){return t.DT().zy(i)},t.Gy=function(i,n){t.DT().Gy(i,n)},t}();Vd.Bg=void 0;var jd=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.jy=function(t){self.sessionStorage.removeItem(t)},n.CT=function(){self.sessionStorage.clear()},n.zy=function(t){var i;return null!=(i=self.sessionStorage.getItem(t))?i:void 0},n.Gy=function(t,i){self.sessionStorage.setItem(t,i)},i.US=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},i}(Vd);V(),It(),V(),It(),Ut();var Hd=function(){var t=self.Blob;if(t)try{new t;return function(t){return function(i,n){return new t(i,n)}}(t)}catch(t){}var i=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(i)return function(t){return function(i,n){var r=new t;if(i)for(var e,s=Ft(i);!(e=s()).done;){var u=e.value;r.append(u)}return r.getBlob(n&&n.type||"")}}(i)}();function Wd(t,i,n){var r=Hd([i],{type:"application/octet-stream"}),e=URL.createObjectURL(r),s=function(t,i){var n=t,r=n.indexOf("?");if(r>=0&&(n=n.substr(0,r)),n=n.substr(n.lastIndexOf("/")+1),i){var e=n.indexOf(".");e<0&&(e=n.length),n=n.substr(0,e)+i+n.substr(e)}return n}(t,n),u=v.createElement("a");u.href=e,u.download=s,v.body.appendChild(u),u.click(),v.body.removeChild(u),URL.revokeObjectURL(e)}V(),It();var zd="default";V(),It(),Bt(),V(),It(),V(),It(),Dt(),V(),It();var qd=function(t){return t.NT="arraybuffer",t.BT="json",t.MT="stream",t.LT="text",t}({});V(),It(),H(),Ut();var Xd=function(){function t(i){var n=this;if(this.Wm=void 0,this.Wm={},i)if(j(i,t))i.asList().forEach(function(t){var i=t[0],r=t[1];n.append(i,r)});else if(function(t){return Wi(t)&&"function"==typeof t.forEach}(i))i.forEach(function(t,i){Array.isArray(t)&&2===t.length?n.append(t[0],t[1]):n.append(i,t)});else if(function(t){return void 0!==r&&Wi(t)&&r in t}(i))for(var e,s=Ft(i);!(e=s()).done;){var u=e.value,o=u[0],h=u[1];this.append(o,h)}else b.getOwnPropertyNames(i).forEach(function(t){n.append(t,i[t])});else;}var i=t.prototype;return i.append=function(t,i){var n=t,r=i;n=Gd(n),r=Qd(r);var e=n.toLowerCase();if(this.Wm.hasOwnProperty(e)){var s=this.Wm[e],u=s[1];s[1]=u?u+", "+r:r}else this.Wm[e]=[n,r]},i.delete=function(t){var i=Gd(t).toLowerCase();delete this.Wm[i]},i.get=function(t){var i=Gd(t).toLowerCase();return this.Wm.hasOwnProperty(i)?this.Wm[i][1]:null},i.has=function(t){var i=Gd(t).toLowerCase();return this.Wm.hasOwnProperty(i)},i.set=function(t,i){var n=t,r=(n=Gd(n)).toLowerCase();this.Wm[r]=[n,Qd(i)]},i.forEach=function(t,i){for(var n in this.Wm)this.Wm.hasOwnProperty(n)&&t.call(i,this.Wm[n][1],n,this)},i.asList=function(){var t=[];for(var i in this.Wm)if(this.Wm.hasOwnProperty(i)){var n=this.Wm[i],r=n[0],e=n[1];t.push([r,e])}return t},i.OT=function(){var t={};return this.forEach(function(i,n){t[n]=i}),t},i.FT=function(t){var i=this;t.forEach(function(t,n){i.append(n,t)})},i.UT=function(t){var i=this;t.forEach(function(t,n){i.set(n,t)})},t}();function Gd(t){var i=t;if("string"!=typeof i&&(i=String(i)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(i))throw new _("Invalid character in header field name");return i}function Qd(t){var i=t;return"string"!=typeof i&&(i=String(i)),i}V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt(),H(),V(),It(),Ut();var Yd=U(Kt());V(),It(),Bt(),Dt();var $d=function(t){function i(i){var n;return(n=t.call(this,""+i.join("\n"),i[0])||this).causes=void 0,n.causes=i,n}return Pt(i,t),xt(i,[{key:"name",get:function(){return"AggregateError"}}]),i}(gr),Kd=t,Jd=Ki(Kd.ReadableStream)&&Ki(Kd.WritableStream)&&Ki(Kd.TransformStream)&&$i(Kd.ReadableStream.prototype.pipeThrough)&&!Ce.xp,Zd=Jd?Kd.ReadableStream:Yd.ReadableStream,tl=(Jd?Kd.WritableStream:Yd.WritableStream,Jd?Kd.TransformStream:Yd.TransformStream),il=(Jd&&Kd.ByteLengthQueuingStrategy?Kd.ByteLengthQueuingStrategy:Yd.ByteLengthQueuingStrategy,Jd&&Kd.CountQueuingStrategy?Kd.CountQueuingStrategy:Yd.CountQueuingStrategy);function nl(t){return function(t){return new Zd({start:function(i){for(var n,r=Ft(t);!(n=r()).done;){var e=n.value;i.enqueue(e)}i.close()}})}([t])}function rl(t){return nl(function(t){return new I(t)}(t))}function el(t,i){return function(t,i){var n=i,r=t.getReader(),e=new Xa,s=function(){u();var t=new wr;r.cancel(t).catch(pn),e.Ky(t)},u=function(){n&&(n.jg(s),n=void 0)};n&&(n.Hg?s():n.Xg(s));var o=[],h=function(t){return t.done?(u(),ot.resolve(o)):(o.push(t.value),ot.resolve(r.read()).then(h))};return ot.resolve(r.read()).then(h).then(function(t){u(),e.Qy(t)},function(t){u(),e.Ky(t)}),e.Yy}(t,i).then(function(t){return Fa(t).buffer})}function sl(t,i){var n=i,r=new tl,e=r.readable,s=r.writable,u=s.getWriter(),o=function(){n&&n.Zg()};return u.closed.then(o,o),t.then(function(t){return n=void 0,u.releaseLock(),t.pipeTo(s).catch(pn)},function(t){return n=void 0,u.releaseLock(),s.abort(t).catch(pn)}),e}function ul(t){var i=new tl,n=i.readable,r=i.writable;return t.pipeTo(r,{preventCancel:!0}).catch(function(i){var n;n=ji(i)?i[0]===i[1]||mr(i[0])&&mr(i[1])?i[0]:new $d(i):i,t.cancel(n).catch(pn)}),n.tee()}function ol(t){return pa(new I(t))}function hl(t){return ya(t).buffer}V(),It();var al="text/plain;charset=UTF-8",cl=function(){function t(){}var i=t.prototype;return i.VT=function(t){return this.HT(t).then(JSON.parse)},i.WT=function(t,i){switch(t){case qd.NT:return this.qT(i);case qd.BT:return this.VT(i);case qd.MT:return this.zT();case qd.LT:return this.HT(i);default:throw new _}},t}();function fl(t,i,n){if(j(t,cl))return t;if(j(t,Zd))return function(t,i){return new dl({Km:0,zT:t,GT:vl(i)})}(t,n);var r=vl(n),e=ot.resolve(t).then(function(t){return function(t,i){if(t){if("string"==typeof t)return{Km:qd.LT,XT:t,GT:i||al};if(j(t,ArrayBuffer)||Ba(t))return{Km:qd.NT,XT:_l(t),GT:i};if(zi(t)||ji(t))return{Km:qd.BT,XT:t,GT:i};throw new _("Unsupported BodyInit type")}return{Km:qd.LT,XT:null,GT:i}}(t,r)});return new dl({Km:1,Yy:e,jT:i})}function vl(t){return(t.get("content-type")||"").toLowerCase()}var dl=function(t){function i(i){var n;return(n=t.call(this)||this).KT=!1,n.JT=void 0,n.$T=new Xa,n.$T.Yy.catch(pn),n.rk(i),n}Pt(i,t);var n=i.prototype;return n.ZT=function(){return this.$T.Yy},n.HT=function(t){return this.ek(ll,t)},n.VT=function(t){return this.ek(wl,t)},n.qT=function(t){return this.ek(pl,t)},n.zT=function(){return this.nk(function(t){return 0===t.Km?t.zT:sl(t.Yy.then(yl).then(rl),t.jT)}(this.JT))},n.ek=function(t,i){if(this.KT)return ot.reject(new _("Already used"));this.KT=!0;var n=t(this.JT,i);return this.$T.$g(n.then(pn)),n},n.nk=function(t){if(this.KT)throw new _("Already used");if(t.locked)throw new _("Body stream is locked");this.KT=!0;var i=new tl,n=ot.resolve(t.pipeTo(i.writable));return this.$T.$g(n),i.readable},n.rk=function(t){this.JT=t,1===t.Km&&t.Yy.catch(pn)},n.hk=function(){if(this.KT)throw new _("Already used");var t=function(t){if(0===t.Km){var i=t.zT.tee(),n=i[0],r=i[1];return[{Km:t.Km,zT:n,GT:t.GT},{Km:t.Km,zT:r,GT:t.GT}]}var e=t.jT.tp(),s=e[0],u=e[1];return[{Km:t.Km,Yy:t.Yy,jT:s},{Km:t.Km,Yy:t.Yy,jT:u}]}(this.JT),n=t[0],r=t[1];return this.rk(n),new i(r)},xt(i,[{key:"QT",get:function(){return this.KT}},{key:"YT",get:function(){return 0===this.JT.Km}}]),i}(cl);function ll(t,i){return 0===t.Km?el(t.zT,i).then(ol):(i&&t.jT.$g(i),br(t.Yy.then(gl),t.jT))}function gl(t){switch(t.Km){case qd.LT:return ot.resolve(t.XT||"");case qd.NT:return ot.resolve(t.XT).then(ol);case qd.BT:return ot.resolve(t.XT).then(JSON.stringify)}}function wl(t,i){return 0===t.Km?ll(t,i).then(JSON.parse):(i&&t.jT.$g(i),br(t.Yy.then(ml),t.jT))}function ml(t){return t.Km===qd.BT?ot.resolve(t.XT):gl(t).then(JSON.parse)}function pl(t,i){return 0===t.Km?el(t.zT,i):(i&&t.jT.$g(i),br(t.Yy.then(yl),t.jT))}function yl(t){switch(t.Km){case qd.NT:return ot.resolve(t.XT);case qd.LT:case qd.BT:return gl(t).then(hl)}}function _l(t){return j(t,ArrayBuffer)?t:Ra(Ta(t)).buffer}var kl=function(t){function i(i){var n;return(n=t.call(this)||this).ck=void 0,n.ck=i,n}Pt(i,t);var n=i.prototype;return n.ZT=function(){return this.ck.ZT()},n.HT=function(t){return this.ck.HT(t)},n.VT=function(t){return this.ck.VT(t)},n.qT=function(t){return this.ck.qT(t)},n.zT=function(t){return this.ck.zT(t)},n.hk=function(){return this.ck.hk()},xt(i,[{key:"QT",get:function(){return this.ck.QT}},{key:"YT",get:function(){return this.ck.YT}}]),i}(cl);function bl(t){return t.dk>=200&&t.dk<=299||304===t.dk}var Al=function(t){function i(i,n){var r,e,s,u,o,h;n?(e=n._k,s=n.fk,u=n.dk,o=n.gk,h=n.pk):(e=[],s=qd.LT,u=200,o="OK",h=!1);var a=i.vk,c=new Xd(i._k||e),f=i.fk||s,v=i.wk||(n&&n.vk===a?n.wk:a.Yu),d=n?n.ck:null,l=fl(void 0!==i.lk?i.lk:d,i.jT||new dr,c);return(r=t.call(this,l)||this)._k=void 0,r.vk=void 0,r.wk=void 0,r.fk=void 0,r.dk=void 0,r.gk=void 0,r.pk=void 0,r._k=c,r.vk=a,r.wk=v,r.fk=f,r.dk=void 0!==i.dk?i.dk:u,r.gk=void 0!==i.gk?String(i.gk):o,r.pk=i.pk||h,r}Pt(i,t);var n=i.prototype;return n.lk=function(t){return this.WT(this.fk,t)},n.Fy=function(){return new i({lk:this.hk(),vk:this.vk},this)},i}(kl);V(),It();var Tl=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),Sl=function(t){return t.yk="",t.bk="manifest",t.Ak="segment",t.Sk="preload-hint",t.Tk="content-protection",t}({}),El=function(t){return t.yk="",t.Ek="initialization-segment",t.xk="fairplay-license",t.Pk="fairplay-certificate",t.Ik="widevine-license",t.Ck="widevine-certificate",t.Rk="playready-license",t.Dk="clearkey-license",t.Nk="aes128-key",t}({}),Il=function(t){return t.yk="",t.Bk="audio",t.Mk="video",t.LT="text",t.Lk="image",t}({}),Rl=function(t){return t.Ok="same-origin",t.Fk="no-cors",t.Uk="cors",t.Vk="navigate",t}({}),Cl=function(t,i){this.XT=void 0,this._k=void 0,this.Hk=void 0,this.fk=void 0,this.Wk=void 0,this.qk=void 0,this.Yg=void 0,this.Km=void 0,this.zk=void 0,this.Gk=void 0,this.Yu=void 0,this.Xk=void 0,this.jk=void 0,this.Qk=void 0,this.Kk=void 0,this.Yk=void 0;var n,r,e,s,u,o,h,a,c,f,v,d,l,g,w,m,p,y,_=t.Yu;i?(n=i.XT,r=i._k,e=i.Hk,s=i.fk,u=i.Wk,o=i.qk,h=i.Yg,a=i.Km,c=i.zk,f=i.Gk,v=i.Xk,d=i.jk,l=i.Qk,g=i.Kk,w=i.Yk):(n=null,r={},e="GET",s=qd.LT,u=0,o=0,a="",c="",f="",v=!1,l=void 0,g=!1,w=void 0),this.Yu=_,this.XT=t.XT||n,this._k=new Xd(t._k||r),this.Hk=t.Hk||e,this.fk=t.fk||s,this.Wk=void 0!==t.Wk?Number(t.Wk)||0:u,this.qk=void 0!==t.qk?Number(t.qk)||0:o,this.Yg=t.Yg||h||(new dr).Yg,this.Km=t.Km||a,this.zk=t.zk||c,this.Gk=t.Gk||f,this.Xk=void 0!==t.Xk?Boolean(t.Xk):v,this.jk=t.jk||d,this.Qk=null!=(m=t.Qk)?m:l,this.Kk=null!=(p=t.Kk)?p:g,this.Yk=null!=(y=t.Yk)?y:w},Pl=function(){function t(){}var i=t.prototype;return i.vk=function(t){var i=function(t){return new Al({lk:null,_k:{},vk:t,wk:t.Yu,fk:t.fk,dk:0,gk:ch.Gw})}(new Cl(t));return ot.resolve(i)},i.Jk=function(t){},i.kn=function(){},t}();var Dl=function(){function t(t,i){void 0===i&&(i=!0),this.iE=void 0,this.sE=void 0,this.iE=t,this.sE=i}var i=t.prototype;return i.vk=function(t){var i=this.tE(t);return this.iE.vk(i)},i.Jk=function(t){return this.iE.Jk(this.eE(t))},i.tE=function(i){var n=new Cl(i);if(!this.sE){var r=t.nE(n.Yu);n=new Cl({Yu:r},n)}return n},i.eE=function(i){var n=i.Yu;return this.sE||(n=t.nE(n)),{Yu:n,XT:i.XT}},i.kn=function(){this.iE.kn()},t.nE=function(t){return Vi.Bm&&zo(t,"http://")?t.replace(":","s:"):t},xt(t,null,[{key:"Zk",get:function(){return t.$k||(t.$k=new t(new Pl)),t.$k}}]),t}();function Nl(t,i){var n=Vi.Dh(t);return xl(n,i),n.toString()}function xl(t,i){for(var n,r=Ft(b.keys(i));!(n=r()).done;){var e=n.value;t.searchParams.set(e,i[e])}}function Bl(t,i){var n=Vi.Pm(t);return i&&!qo(n,"/")&&(n+="/"),n}Dl.$k=void 0,V(),It(),V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It(),Ut();var Ol=/cache:(.+)?(?=&|$)/;function Ml(t){if(!zo(t,"http://webcache.googleusercontent.com/search?q=cache:"))return"";var i=Vi.Dh(t).search.match(Ol);return i&&i.length>1?i[1]:""}function Ll(t){return Vi.Dh(".",t)}V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt();var Fl=function(t){return t.rE="HttpOpenError",t.hE="HttpResponseError",t.oE="HttpTimeoutError",t}({}),Ul=function(t){function i(i,n,r){var e;return(e=t.call(this,n,r)||this).aE=void 0,e.aE=i,e}return Pt(i,t),xt(i,[{key:"vk",get:function(){return this.aE}}]),i}(gr),Vl=function(t){function i(i,n){return t.call(this,i,"Error while opening "+i.Yu+".",n)||this}return Pt(i,t),xt(i,[{key:"name",get:function(){return Fl.rE}}]),i}(Ul);V(),It(),Bt(),Dt();var jl=function(t){function i(i,n,r){var e;return(e=t.call(this,i.vk,null!=r?r:function(t){return"Error while loading "+t.vk.Yu+", status code "+t.dk}(i),n)||this).cE=void 0,e.cE=i,e}return Pt(i,t),xt(i,[{key:"name",get:function(){return Fl.hE}},{key:"uE",get:function(){return this.cE}}]),i}(Ul);V(),It(),Bt(),Dt();var Hl=function(t){function i(i,n){return t.call(this,i,function(t){return"Request for "+t.Yu+" timed out after "+t.Wk+" seconds."}(i),n)||this}return Pt(i,t),xt(i,[{key:"name",get:function(){return Fl.oE}}]),i}(Ul);V(),It();var Wl=self.fetch,zl=self.Request,ql=self.Response,Xl=self.Headers,Gl=self.ReadableStream,Ql=self.AbortSignal,Yl=self.AbortController,$l=bn(function(){try{return $i(Wl)&&Ki(zl)&&Ki(ql)&&Ki(Xl)&&"forEach"in Xl.prototype&&to()}catch(t){return!1}}),Kl=["http:","https:"];var Jl=bn(function(){try{return $l()&&Ki(Ql)&&Ki(Yl)&&"signal"in zl.prototype}catch(t){return!1}}),Zl=bn(function(){try{return $l()&&Ki(Gl)&&"body"in ql.prototype&&!Oi.e_}catch(t){return!1}});function tg(t){return j(t,Ul)}function ig(t){return j(t,jl)}function ng(t,i){var n,r=t._k.has("content-length")?Number(t._k.get("content-length")):void 0;return n=t.YT?function(t,i,n){return t.pipeThrough(new tl(new rg(i,n)))}(t.zT(),i,r):function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return[4,ot.resolve()];case 1:return s.sent(),i(0,n),[4,t];case 2:return r=s.sent(),e=r.byteLength,i(e,null!=n?n:e),[2,r]}})})()}(t.qT(),i,r),new Al({lk:n,vk:t.vk},t)}V(),It(),H(),V(),It(),Wt(),Yt();var rg=function(){function t(t,i){this.lE=void 0,this.fE=void 0,this.dE=void 0,this.lE=t,this.fE=i,this.dE=0}var i=t.prototype;return i.transform=function(t,i){this.dE+=t.byteLength,this.lE(this.dE,this.fE),i.enqueue(t)},i.flush=function(t){var i;this.lE(this.dE,null!=(i=this.fE)?i:this.dE)},t}();var eg=function(){function t(t){this.uE=void 0,this.aE=void 0,this.hT=new dr,this.cE=void 0,this._E=0,this.gE=!1,this.aE=t,this.hT.$g(t.Yg),this.uE=this.vE()}var i=t.prototype;return i.vE=function(){return jt(function(){var t,i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:t=this,(i=this.aE).Wk&&(this._E=g(function(){t.gE=!0,t.hT.Zg()},i.Wk),this.hT.Yg.Qg(function(){w(t._E)}));try{n=Wl(i.Yu,{method:i.Hk,headers:i._k.OT(),body:i.XT,credentials:i.Xk?"include":"same-origin",signal:og(this.hT.Yg),mode:i.Qk,keepalive:i.Yk})}catch(t){throw new Vl(i,t)}c.label=1;case 1:return c.trys.push([1,3,,4]),[4,n];case 2:return r=c.sent(),[3,4];case 3:throw e=c.sent(),mr(s=this.pE(e))&&this.hT.Zg(),s;case 4:if(u=r.url||i.Yu,o=0===r.status&&"file:"===function(t){return Vi.Dh(t).protocol}(u)?200:r.status,h=new sg(this,r,this.hT),!bl(a=new Al({lk:h,vk:i,fk:i.fk,_k:new Xd(r.headers),dk:o,gk:r.statusText,wk:u})))throw new jl(a);return i.jk&&(a=ng(a,i.jk)),[2,a]}})}).call(this)},i.pE=function(t){return tg(t)?t:mr(t)?this.gE?new Hl(this.aE):new wr(t.message,t):this.cE?new jl(this.cE,t):new Vl(this.aE,t)},t}(),sg=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).wE=void 0,e.mE=void 0,e.hT=void 0,e.$T=new Xa,e.wE=i,e.mE=n,e.hT=r,e.$T.Yy.catch(pn),e}Pt(i,t);var n=i.prototype;return n.ZT=function(){return this.$T.Yy},n.HT=function(t){return this.ek(this.mE.text(),t)},n.qT=function(t){return this.ek(this.mE.arrayBuffer(),t)},n.zT=function(){var t=this.mE.body;return t?this.nk(t):sl(this.qT().then(rl),this.hT)},n.hk=function(){var t=this.mE.clone(),n=this.hT.tp(),r=n[0],e=n[1];return this.hT=r,new i(this.wE,t,e)},n.ek=function(t,i){var n=this;i&&this.hT.$g(i);var r=kr(ot.resolve(t),this.hT.Yg).catch(function(t){throw n.wE.pE(t)});return r=br(r,this.hT),this.$T.$g(r.then(pn)),r},n.nk=function(t){var i=this;return new Zd(new hg(t,function(t){return i.wE.pE(t)},this.hT,this.$T),{highWaterMark:0})},xt(i,[{key:"QT",get:function(){return this.mE.bodyUsed}},{key:"YT",get:function(){return Fi(this.mE.body)}}]),i}(cl),ug="abort";function og(t){if(Jl()){var i=new Yl;if(t.Hg)i.abort();else if(!t.Wg){var n=function(){r(),i.abort()},r=function(){i.signal.removeEventListener(ug,n),t.jg(n),t.Kg(r)};i.signal.addEventListener(ug,n),t.Xg(n),t.Qg(r)}return i.signal}}var hg=function(){function t(t,i,n,r){this.yE=void 0,this.bE=void 0,this.hT=void 0,this.$T=void 0,this.Wd=void 0,this.yE=t,this.bE=i,this.hT=n,this.$T=r}var i=t.prototype;return i.start=function(t){this.Wd=this.yE.getReader()},i.pull=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,kr(this.Wd.read(),this.hT.Yg)];case 1:return i=e.sent(),[3,3];case 2:return n=e.sent(),r=this.bE(n),this.$T.Ky(r),this.hT.Zg(),this.Wd.cancel(r).catch(pn),t.error(r),[2];case 3:return i.done?(this.$T.Qy(),this.hT.Zg(),t.close()):t.enqueue(i.value),[2]}})}).call(this)},i.cancel=function(t){return this.hT.Zg(),this.$T.Ky(t),this.Wd.cancel(t)},t}();V(),It(),Bt();var ag=function(){function t(t){var i=this;this.SE=void 0,this.aE=void 0,this.hT=new dr,this.cE=void 0,this.AE=new Xa,this.BE=void 0,this.DE=!1,this.RE=function(){var t;i.TE(),null==(t=i.SE)||t.abort()},this.aE=t,this.hT.$g(t.Yg),this.SE=new C,this.vE()}var i=t.prototype;return i.vE=function(){var t=this,i=this.SE,n=this.aE;if(n.Yg.Hg)return this.TE();i.onreadystatechange=function(){return t.kE()},i.onprogress=function(i){return t.lE(i)},i.onload=function(){return t.EE()},i.onloadend=function(){return t.xE()},i.onerror=function(){return t.PE()},i.ontimeout=function(){return t.CE()},i.onabort=function(){return t.TE()},i.open(n.Hk,n.Yu,!0),i.withCredentials=Boolean(n.Xk),"responseType"in i&&n.fk&&(n.fk===qd.LT?i.responseType="text":i.responseType="arraybuffer"),n._k.forEach(function(t,n){i.setRequestHeader(n,t)}),n.Wk&&(i.timeout=n.Wk),this.hT.Yg.Xg(this.RE);var r=n.XT;r?i.send(r):i.send()},i.kE=function(){var t=this.SE;void 0!==t&&t.readyState>=2&&!this.DE&&(this.DE=!0,this.NE())},i.NE=function(){var t,i,n=this.SE,r=function(t){var i=new Xd,n=t.replace(/\r?\n[\t ]+/g," ");return n.split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var e=n.join(":").trim();i.append(r,e)}}),i}(n.getAllResponseHeaders()||""),e=this.aE;this.BE=new Xa,this.cE=new Al({vk:e,fk:e.fk,lk:this.BE.Yy,dk:n.status,gk:n.statusText,_k:r,wk:null!=(i=n.responseURL)?i:r.get("X-Request-URL")}),null==(t=this.AE)||t.Qy(this.cE)},i.EE=function(){var t,i=this.SE;if(void 0!==i){var n=i.response;if(!Fi(n)){var r=this.aE.fk;n=r===qd.LT?i.responseText:r===qd.NT?new ArrayBuffer(0):{}}null==(t=this.BE)||t.Qy(n)}},i.xE=function(){this.kn()},i.lE=function(t){void 0!==this.SE&&(null==this.aE.jk||this.aE.jk.call(this.aE,t.loaded,t.lengthComputable?t.total:void 0))},i.PE=function(){var t=new y("Network request failed");this.cE?this.Ts(new jl(this.cE,t)):this.Ts(new Vl(this.aE,t))},i.CE=function(){this.Ts(new Hl(this.aE))},i.TE=function(){this.Ts(new wr),this.kn()},i.Ts=function(t){var i,n;null==(i=null!=(n=this.BE)?n:this.AE)||i.Ky(t)},i.kn=function(){this.SE=void 0,this.cE=void 0,this.AE=void 0,this.BE=void 0,this.hT.zg()},xt(t,[{key:"uE",get:function(){return this.AE.Yy}}]),t}();function cg(t,i,n){return new ot(function(r,e){if(n&&n.Hg)return e(new wr);var s=function(t){o(),r(t)},u=function(){o(),e(new wr)},o=function(){t.removeEventListener(i,s),n&&n.jg(u)};t.addEventListener(i,s),n&&n.Xg(u)})}V(),It();var fg=function(){function t(){}var i=t.prototype;return i.vk=function(t){return function(t){if(!$l()||!function(t){try{return Kl.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Yu))return!1;if(!Zl()&&t.jk)return!1;if(!t.Kk&&t.Hk!==Tl.POST){if(Oi.S_&&Oi.d_<=68)return!1;if(Oi.w_)return!1}return!0}(t)?new eg(t).uE:new ag(t).uE},i.Jk=function(t){var i=f.navigator;if(i&&i.sendBeacon)i.sendBeacon(t.Yu,Hd([t.XT],{type:t.GT}));else{var n=t.GT?{"Content-type":t.GT}:void 0;this.vk(new Cl({Hk:Tl.POST,Yu:t.Yu,XT:t.XT,_k:n,Qk:Rl.Fk})).then(function(t){Er(t.qT())},pn)}},i.kn=function(){},t}();V(),It(),Bt(),Dt(),V(),It();var vg=function(t){return t[t.LE=1]="LE",t[t.OE=2]="OE",t[t.LT=3]="LT",t[t.FE=4]="FE",t[t.UE=9]="UE",t}({});function dg(t){return 1===t.VE}function lg(t){return 3===t.VE}V(),It(),Dt();var gg=function(t){function i(i){return t.call(this,"Invalid XML",i)||this}return Pt(i,t),i}(gr),wg=function(){function t(){}return t.prototype.HE=function(t){var i,n=new DOMParser;try{i=n.parseFromString(t,"text/xml")}catch(t){throw new gg(t)}if(!i||i.getElementsByTagName("parsererror").length>0)throw new gg;return new Ag(i)},t}(),mg=function(){function t(t){this.qE=void 0,this.qE=t}var i=t.prototype;return i.jE=function(t){return this.qE.isEqualNode(t.qE)},i.QE=function(i){return new t(this.qE.cloneNode(i))},xt(t,[{key:"VE",get:function(){return vg.OE}},{key:"WE",get:function(){var t;return null!=(t=this.qE.localName)?t:Eg(this.qE.nodeName)}},{key:"l",get:function(){return this.qE.nodeName}},{key:"zE",get:function(){var t;return null!=(t=this.qE.namespaceURI)?t:void 0}},{key:"GE",get:function(){var t;return null!=(t=this.qE.prefix)?t:void 0}},{key:"XE",get:function(){return this.qE.nodeValue}}]),t}(),pg=function(){function t(t){this.JE=void 0,this.YE=void 0,this.JE=t}var i=t.prototype;return i.ZE=function(t){return this.KE.filter(function(i){return Tg(i)&&i.$E===t})},i.tx=function(t,i){return this.KE.filter(function(n){return Tg(n)&&n.WE===i&&n.zE===t})},i.sx=function(t){this.JE.appendChild(t.ix),this.YE&&this.YE.push(t)},i.jE=function(t){return this.JE.isEqualNode(t.ix)},xt(t,[{key:"KE",get:function(){return void 0===this.YE&&(this.YE=function(t){for(var i=[],n=0;n=0;i-=1)this.it(t[i])},n.kn=function(){this.hr(),this.Vo()},xt(i,[{key:"NI",get:function(){return this.BI}},{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}},{key:"V",get:function(){return this.BI.length}}]),i}(uh);V(),It(),Ut(),V(),It(),H(),V(),It(),Ut();var Vg=b.freeze||yn;function jg(t,i,n){b.defineProperty(t,i,{writable:!1,enumerable:!0,value:n})}function Hg(t){return Vg(t)}function Wg(t,i){for(var n,r=Ft(b.getOwnPropertyNames(i));!(n=r()).done;){var e=n.value;b.defineProperty(t,e,b.getOwnPropertyDescriptor(i,e))}return t}function zg(t){if(zi(t)){var i={};for(var n in t)Mi.call(t,n)&&(i[n]=zg(t[n]));return i}if(ji(t)){for(var r=new Array(t.length),e=0;e0?t.tC=n:t.tC=void 0},get targetQuality(){if(t.tC)return 1===t.tC.length?t.tC[0].Ca:t.tC.map(function(t){return t.Ca})},addEventListener:function(t,n){var r=nw(t,tw);i.wn(r,n)},removeEventListener:function(t,n){var r=nw(t,tw);i.mn(r,n)}};return i=new oh(r),t.wn(n,function(t){return i.So(t.Ca)}),b.defineProperty(r,"constructor",{value:ow}),r}function aw(){}function cw(t){var i=ew(t);return b.defineProperty(i,"constructor",{value:aw}),i}var fw=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.tt=function(i){return t.prototype.tt.call(this,i)},n.xa=function(){return cw(this)},i}(Ug);V(),It(),V(),It();var vw=function(t){return t.Bk="audio",t.Mk="video",t.LT="text",t.Lk="image",t.yk="unknown",t}({});function dw(t){return"audio"===t||"video"===t}V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt();var lw=function(t){function i(i,n,r,e,s,u,o,h){var a;return(a=t.call(this,i,n,r)||this).url=void 0,a.status=void 0,a.statusText=void 0,a.response=void 0,a.systemCode=void 0,a.url=e,a.status=s,a.statusText=u,a.response=o,a.systemCode=h,a}return Pt(i,t),xt(i,[{key:"name",get:function(){return"ContentProtectionError"}}]),i}(_d);var gw=function(t){return t[t.ABORTED=1]="ABORTED",t[t.NETWORK=2]="NETWORK",t[t.DECODE=3]="DECODE",t[t.SRC_NOT_SUPPORTED=4]="SRC_NOT_SUPPORTED",t[t.ENCRYPTED=5]="ENCRYPTED",t[t.LICENSE_INVALID=6]="LICENSE_INVALID",t[t.ADVERTISEMENT_ERROR=7]="ADVERTISEMENT_ERROR",t}({}),ww=function(t){function i(i,n,r,e){var s;return(s=t.call(this,n)||this).code=void 0,s.message=void 0,s.cause=void 0,s.systemCode=void 0,s.code=i,s.message=null!=n?n:"Unknown error",s.cause=r,s.systemCode=e,y.captureStackTrace&&y.captureStackTrace(s,s.constructor),s}return Pt(i,t),xt(i,[{key:"name",get:function(){return"MediaError"}}]),i}(lr);function mw(t){jg(t,"MEDIA_ERR_ABORTED",1),jg(t,"MEDIA_ERR_NETWORK",2),jg(t,"MEDIA_ERR_DECODE",3),jg(t,"MEDIA_ERR_SRC_NOT_SUPPORTED",4),jg(t,"MEDIA_ERR_ENCRYPTED",5)}function pw(t){var i,n;return function(t){return t.category===yd.CONTENT_PROTECTION}(t)?new ww(5,t.message,null==(i=t.cause)?void 0:i.message,t.systemCode):new ww(yw(t.code),t.message,null==(n=t.cause)?void 0:n.message)}function yw(t){if(t===pd.MEDIA_ABORTED)return 1;if(t===pd.MANIFEST_LOAD_ERROR||t===pd.MEDIA_LOAD_ERROR||t===pd.SUBTITLE_LOAD_ERROR)return 2;if(t===pd.MEDIA_DECODE_ERROR)return 3;if(t===pd.MEDIA_NOT_SUPPORTED)return 4;var i=yd.fromCode(t);return i===yd.NETWORK?2:i===yd.SOURCE?4:i===yd.LICENSE?6:i===yd.CONTENT_PROTECTION?5:i===yd.AD?7:3}function _w(t){return new _d(kw(t.code),t.message,t)}function kw(t){switch(t){case 1:return pd.MEDIA_ABORTED;case 2:return pd.NETWORK_ERROR;case 3:return pd.MEDIA_DECODE_ERROR;case 4:return pd.SOURCE_NOT_SUPPORTED;case 5:return pd.CONTENT_PROTECTION_ERROR;case 6:return pd.LICENSE_ERROR;case 7:return pd.AD_ERROR}}mw(ww),mw(ww.prototype),V(),It(),Bt(),Dt(),V(),It(),Dt();var bw=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i}(hh);V(),It(),Bt(),V(),It();var Aw=function(){function t(){this._O=[],this.hu=void 0}var i=t.prototype;return i.gO=function(t){this._O.push(t),this.hu&&this.hu.push(t.Ca)},i.pS=function(t){Yn(this._O,t),this.hu&&Yn(this.hu,t.Ca)},i.MI=function(t){return this._O[t]},i.pO=function(t){return ji(t)?function(t,i){for(var n,r=Ft(i);!(n=r()).done;)if(!Jn(t,n.value))return!1;return!0}(this._O,t):Jn(this._O,t)},i.hr=function(){tr(this._O),this.hu&&tr(this.hu)},xt(t,[{key:"NI",get:function(){return this._O}},{key:"V",get:function(){return this._O.length}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i=t.NI.map(function(t){return t.Ca});return i.item=function(i){var n=0|i,r=t.MI(n);return r&&r.Ca||void 0},i}(this)),this.hu}}]),t}();V(),It(),Dt();var Tw=function(t){function i(i){var n;return(n=t.call(this,Fg.pa)||this).Ht=void 0,n.Ht=i,n}return Pt(i,t),i.prototype.xa=function(){return new Sw(this.Ht.Ca)},i}(Dg),Sw=function(t){function i(i){var n;return(n=t.call(this,"change")||this).track=void 0,n.track=i,n}return Pt(i,t),i}(Ng);V(),It(),Dt();var Ew=function(t){function i(i){var n;return(n=t.call(this,Fg.xI)||this).Ht=void 0,n.Ht=i,n}return Pt(i,t),i.prototype.xa=function(){return new Iw(this.Ht.Ca)},i}(Dg),Iw=function(t){function i(i){var n;return(n=t.call(this,"update")||this).track=void 0,n.track=i,n}return Pt(i,t),i}(Ng);V(),It();var Rw=0;function Cw(){return Rw++}var Pw=0;var Dw=0;function Nw(){return Dw++}var xw=0;function Bw(){return xw++}var Ow=0;var Mw=function(t){function i(i){var n;return(n=t.call(this)||this).Km=vw.Bk,n.wO=void 0,n.aS=void 0,n.bO=void 0,n.yO=void 0,n.We=!1,n._O=void 0,n.hu=void 0,n.wO=i,n.yO=Cw(),n.aS=""+Ow++,n.bO=i.label,n._O=new Aw,n.TO(),n}Pt(i,t);var n=i.prototype;return n.SO=function(t){this.Rt=t},n.TO=function(){this.Rt=this.mO},xt(i,[{key:"YI",get:function(){}},{key:"Rt",get:function(){return this.We},set:function(t){this.We!==t&&(this.We=t,this.mO=t,this.So(new Tw(this)))}},{key:"mO",get:function(){return this.wO.enabled},set:function(t){this.wO.enabled=t}},{key:"Ca",get:function(){return this.hu||(this.hu=hw(this)),this.hu}},{key:"o",get:function(){return this.aS}},{key:"JI",get:function(){return this.yO}},{key:"Lt",get:function(){return this.wO.kind}},{key:"Th",get:function(){return this.bO},set:function(t){t!==this.bO&&(this.bO=t,this.So(new Ew(this)))}},{key:"bs",get:function(){return this.wO.language}},{key:"Qk",get:function(){return this.Rt?"enabled":"disabled"}},{key:"AO",get:function(){return this.wO}},{key:"$I",get:function(){return this._O}},{key:"tC",get:function(){},set:function(t){}}]),i}(uh);V(),It(),Bt(),Dt();var Lw=0;var Fw=function(t){function i(i){var n;return(n=t.call(this)||this).Km=vw.Mk,n.wO=void 0,n.aS=void 0,n.yO=void 0,n.We=!1,n._O=void 0,n.bO=void 0,n.hu=void 0,n.wO=i,n.yO=Cw(),n.aS=""+Lw++,n._O=new Aw,n.bO=i.label,n.TO(),n}Pt(i,t);var n=i.prototype;return n.TO=function(){this.Rt=this.mO},n.SO=function(t){this.Rt=t},xt(i,[{key:"YI",get:function(){}},{key:"Rt",get:function(){return this.We},set:function(t){this.We!==t&&(this.We=t,this.mO=t,this.So(new Tw(this)))}},{key:"mO",get:function(){return Boolean(this.wO.selected)},set:function(t){this.wO.selected=t}},{key:"Ca",get:function(){return this.hu||(this.hu=hw(this)),this.hu}},{key:"o",get:function(){return this.aS}},{key:"JI",get:function(){return this.yO}},{key:"Lt",get:function(){return"main"}},{key:"Th",get:function(){return this.bO},set:function(t){t!==this.bO&&(this.bO=t,this.So(new Ew(this)))}},{key:"bs",get:function(){return this.wO.language}},{key:"Qk",get:function(){return this.Rt?"enabled":"disabled"}},{key:"AO",get:function(){return this.wO}},{key:"$I",get:function(){return this._O}},{key:"tC",get:function(){},set:function(t){}}]),i}(uh);V(),It(),Dt();var Uw=function(t){function i(i){var n;return(n=t.call(this,ch.yw)||this).sP=void 0,n.sP=i,n}return Pt(i,t),i}(ah);V(),It(),Wt(),Dt(),Ut(),Yt(),V(),It();var Vw=function(t){return t[t.NONE=0]="NONE",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED",t[t.ERROR=3]="ERROR",t}({});V(),It();var jw=function(t){return t.DEFAULT="",t.SRT="srt",t.TTML="ttml",t.WEBVTT="webvtt",t.EMSG="emsg",t.EVENT_STREAM="eventstream",t.ID3="id3",t.CEA608="cea608",t.DATE_RANGE="daterange",t.MILLICAST="millicast",t}({});function Hw(t){switch(t){case"":case"srt":case"ttml":case"webvtt":case"emsg":case"eventstream":case"id3":case"cea608":case"daterange":case"millicast":return!0;default:return!1}}V(),It(),Ut(),V(),It();var Ww=function(t){return t.kO="cue",t.EO="region",t.xO="stylesheet",t}({});V(),It(),Bt(),Dt(),V(),It();var zw={"line-left":"start",center:"middle","line-right":"end"},qw={start:"line-left",middle:"center",end:"line-right"};function Xw(t,i){if("auto"===t)switch(i){case"start":case"left":return"line-left";case"end":case"right":return"line-right";default:return"center"}return t}function Gw(t,i){if("auto"===t)switch(i){case"left":return 0;case"right":return 100;default:return 50}return function(t,i){var n="number"==typeof t?t:S(t);return E(n)?i:n}(t,50)}V(),It(),V(),It(),V(),It(),Dt();var Qw=function(t){return t.QL="yo",t.KL="jo",t.xI="er",t}({}),Yw=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).PO=void 0,r.PO=n,r}return Pt(i,t),i}(Dg),$w=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).cue=void 0,r.cue=n,r}return Pt(i,t),i}(Ng);function Kw(t){var i,n=[Qw.QL,Qw.KL,Qw.xI],r={get IO(){return t},get track(){return t.Ht.Ca},get id(){return t.o},get uid(){return t.JI},get startTime(){return t.CO},set startTime(i){t.CO=i},get endTime(){return t.RO},set endTime(i){t.RO=i},get content(){return t.U},addEventListener:function(t,n){var r=nw(t,tw);i.wn(r,n)},removeEventListener:function(t,n){var r=nw(t,tw);i.mn(r,n)}};return i=new oh(r),t.wn(n,function(t){return i.So(t.Ca)}),r}function Jw(){}function Zw(t){return Wg(Kw(t),{get align(){return t.DO},get line(){return t.BO},get lineAlign(){return t.MO},get position(){return t.mo},get positionAlign(){return t.LO},get region(){return t.OO?t.OO.Ca:null},get size(){return t.Wy},get snapToLines(){return t.FO},get text(){return t.U},get vertical(){return t.Pt}})}V(),It(),Bt(),Dt(),V(),It(),Dt();var tm=function(t){function i(i){return t.call(this,Qw.xI,i)||this}return Pt(i,t),i.prototype.xa=function(){return new im(this.PO.Ca)},i}(Yw),im=function(t){function i(i){return t.call(this,"update",i)||this}return Pt(i,t),i}($w);V(),It(),Dt();var nm=function(t){function i(i){var n;return(n=t.call(this,Fg.fI)||this).PO=void 0,n.PO=i,n}return Pt(i,t),i.prototype.xa=function(){return new rm(this.PO.Ca)},i}(Dg),rm=function(t){function i(i){var n;return(n=t.call(this,"updatecue")||this).cue=void 0,n.cue=i,n}return Pt(i,t),i}(Ng),em=.02;function sm(t,i){return Pn(t.UO,i.UO,em)&&Pn(t.VO,i.VO,em)&&t.o===i.o}var um=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).yO=void 0,u.aS=void 0,u.UO=void 0,u.VO=void 0,u.HO=void 0,u.zO=void 0,u.hu=void 0,u.WO=void 0,u.ho=!1,u.GO=void 0,u.jO=void 0,u.JO=-1,u.yO=Bw(),u.HO=i,u.zO=n,u.UO=i,u.VO=n,u.GO=r,u.jO=Boolean(e),u.aS=null!=s?s:"",u}Pt(i,t);var n=i.prototype;return n.xa=function(){return Kw(this)},n.QO=function(t){return this===t||Gg(this,t)&&sm(this,t)&&this.KO(t)},n.KO=function(t){return qg(this.U,t.U)},n.YO=function(t,i){this.HO=t,this.zO=i,this.UO=t,this.VO=i},n.kn=function(){this.Vo()},xt(i,[{key:"CO",get:function(){return this.HO},set:function(t){var i,n;this.HO!==t&&(this.HO=t,null==(i=this.WO)||i.qO(this),this.So(new tm(this)),null==(n=this.WO)||n.So(new nm(this)))}},{key:"RO",get:function(){return this.zO},set:function(t){var i,n;this.zO!==t&&(this.zO=t,null==(i=this.WO)||i.qO(this),this.So(new tm(this)),null==(n=this.WO)||n.So(new nm(this)))}},{key:"o",get:function(){return this.aS}},{key:"JI",get:function(){return this.yO}},{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}},{key:"ro",get:function(){return this.ho},set:function(t){this.ho=t}},{key:"Ht",get:function(){return this.WO},set:function(t){this.WO=t}},{key:"U",get:function(){return this.GO},set:function(t){var i;this.GO!==t&&(this.GO=t,this.So(new tm(this)),null==(i=this.WO)||i.So(new nm(this)))}},{key:"XO",get:function(){return this.jO},set:function(t){this.jO=t}}]),i}(uh);function om(t,i){return t.U===i.U&&t.BO===i.BO&&t.MO===i.MO&&t.mo===i.mo&&t.LO===i.LO&&t.OO===i.OO&&t.FO===i.FO&&t.Wy===i.Wy&&t.DO===i.DO&&t.Pt===i.Pt}var hm=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this,i,n,r,e,s)||this).BO="auto",u.MO="start",u.mo="auto",u.LO="auto",u.OO=void 0,u.FO=!0,u.Wy=100,u.DO="center",u.Pt="",u}return Pt(i,t),i.prototype.KO=function(t){return om(this,t)},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=Zw(this)),this.hu}},{key:"Km",get:function(){return Ww.kO}}]),i}(um);function am(t){var i=t.BO,n=Yi(i);return n&&!t.FO&&(i<0||i>100)?100:n?Number(i):t.FO?-1:100}function cm(t){return Gw(t.mo,t.DO)}function fm(t){return Xw(t.LO,t.DO)}function vm(t){var i,n=fm(t),r=cm(t);switch(n){case"line-left":i=100-r;break;case"line-right":i=r;break;case"center":i=r<=50?2*r:2*(100-r)}return A.min(t.Wy,i)}function dm(t){return{get id(){return t.o},get lines(){return t.ZO},get regionAnchorX(){return t.$O},get regionAnchorY(){return t.tF},get scrollValue(){return t.iF},get viewportAnchorX(){return t.eF},get viewportAnchorY(){return t.sF},get width(){return t.Ti}}}V(),It(),Bt(),V(),It();var lm=function(){function t(t,i,n,r,e,s,u,o){this.o=void 0,this.Ti=void 0,this.ZO=void 0,this.$O=void 0,this.tF=void 0,this.eF=void 0,this.sF=void 0,this.iF=void 0,this.hu=void 0,this.o=t,this.Ti=i,this.ZO=n,this.$O=r,this.tF=e,this.eF=s,this.sF=u,this.iF=o}return xt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=dm(this)),this.hu}},{key:"Km",get:function(){return Ww.EO}}]),t}();V(),It(),V(),It();var gm=1e6,wm=function(){function t(){}var i=t.prototype;return i.nF=function(t){return this.rF()*t},i.hF=function(t){return this.oF(t)>0},i.aF=function(t){return this.oF(t)>=0},i.uF=function(t,i){return this.dF(t).cF(i)},i.QO=function(t){return 0===this.oF(t)},i.lF=function(t){return this.oF(t)<0},i.cF=function(t){return this.oF(t)<=0},i.fF=function(){return this.vF()?this._F():this},i.gF=function(t){return this.gO(t._F())},i.dF=function(t){return this.gF(t).fF()},t}();function mm(t,i){return t.pF()?i.pF()?Ln.rh:Ln.Fg:i.pF()?Ln.Ug:t.mF()?i.mF()&&t.vF()===i.vF()?Ln.rh:t.vF()?Ln.Ug:Ln.Fg:i.vF()?Ln.Fg:Ln.Ug}V(),It(),Dt(),V(),It();var pm=4294967296,ym=pm*pm,_m=ym*ym,km=_m/2,bm=function(){function t(t,i){this.CF=void 0,this.PF=void 0,this.CF=t,this.PF=i}var i=t.prototype;return i.xF=function(){return this.PF.unsigned},i.IF=function(){return this.CF.isZero()&&this.PF.isZero()},i.vF=function(){return this.PF.isNegative()},i.RF=function(){return this.xF()?t.wF(this.CF,this.PF,!1):this},i.DF=function(){return this.xF()?this:t.wF(this.CF,this.PF,!0)},i.NF=function(){return this.CF},i.rF=function(){return this.vF()?-this._F().rF():this.PF.toNumber()*ym+this.CF.toUnsigned().toNumber()},i.BF=function(){return this.CF.toInt()},i.QO=function(t){return(this.xF()===t.xF()||this.PF.getHighBits()>>>31!=1||t.PF.getHighBits()>>>31!=1)&&(this.PF.toUnsigned().eq(t.PF.toUnsigned())&&this.CF.toUnsigned().eq(t.CF.toUnsigned()))},i.oF=function(t){if(this.QO(t))return Ln.rh;var i=this.vF(),n=t.vF();if(i&&!n)return Ln.Ug;if(!i&&n)return Ln.Fg;if(!this.xF())return this.gF(t).vF()?Ln.Ug:Ln.Fg;var r=this.DF(),e=t.DF(),s=e.PF.comp(r.PF);return s>0||0===s&&e.CF.gt(r.CF)?Ln.Ug:Ln.Fg},i.lF=function(t){return this.oF(t)<0},i.cF=function(t){return this.oF(t)<=0},i.MF=function(t){return this.oF(t)>0},i.LF=function(t){return this.oF(t)>=0},i.OF=function(){return new t(this.CF.not(),this.PF.not())},i.FF=function(i){return new t(this.CF.and(i.CF),this.PF.and(i.PF))},i.UF=function(i){return new t(this.CF.or(i.CF),this.PF.or(i.PF))},i.VF=function(i){var n=127&i;return 0===n?this:n<64?t.wF(this.CF.shl(n),this.PF.shl(n).or(this.CF.shru(64-n)),this.xF()):t.wF(fe.ZERO,this.CF.shl(n-64),this.xF())},i.HF=function(i){var n=127&i;return 0===n?this:n<64?t.wF(this.CF.shru(n).or(this.PF.shl(64-n)),this.PF.shr(n),this.xF()):t.wF(this.PF.shr(n-64),this.PF.isNegative()?fe.NEG_ONE:fe.ZERO,this.xF())},i.WF=function(i){var n=127&i;return 0===n?this:n<64?t.wF(this.CF.shru(n).or(this.PF.shl(64-n)),this.PF.shru(n),this.xF()):64===n?t.wF(this.PF,fe.ZERO,this.xF()):t.wF(this.PF.shru(n-64),fe.ZERO,this.xF())},i.gO=function(i){var n=this.PF.high>>>16,r=65535&this.PF.high,e=this.PF.low>>>16,s=65535&this.PF.low,u=this.CF.high>>>16,o=65535&this.CF.high,h=this.CF.low>>>16,a=65535&this.CF.low,c=i.PF.high>>>16,f=65535&i.PF.high,v=i.PF.low>>>16,d=65535&i.PF.low,l=i.CF.high>>>16,g=65535&i.CF.high,w=i.CF.low>>>16,m=0,p=0,y=0,_=0,k=0,b=0,A=0,T=0;A+=(T+=a+(65535&i.CF.low))>>>16,T&=65535,b+=(A+=h+w)>>>16,A&=65535,k+=(b+=o+g)>>>16,b&=65535,_+=(k+=u+l)>>>16,k&=65535,y+=(_+=s+d)>>>16,_&=65535,p+=(y+=e+v)>>>16,y&=65535,m+=(p+=r+f)>>>16,p&=65535,m+=n+c,m&=65535;var S=this.xF(),E=fe.fromBits(y<<16|_,m<<16|p,S),I=fe.fromBits(A<<16|T,k<<16|b,S);return t.wF(I,E,S)},i.gF=function(t){return this.gO(t._F())},i._F=function(){return this.OF().gO(t.qF)},i.zF=function(i){if(this.IF()||i.IF())return this.xF()?t.AF:t.SF;if(this.vF())return i.vF()?this._F().zF(i._F()):this._F().zF(i)._F();if(i.vF())return this.zF(i._F())._F();if(this.PF.isZero()&&0===this.CF.high&&i.PF.isZero()&&0===i.CF.high)return t.yF(this.CF.multiply(i.CF));var n=fe.fromBits(4294967295,0,!0),r=this.CF.and(n),e=this.CF.shru(32),s=this.PF.and(n),u=this.PF.shru(32),o=i.CF.and(n),h=i.CF.shru(32),a=i.PF.and(n),c=i.PF.shru(32),f=fe.UZERO,v=fe.UZERO,d=fe.UZERO,l=fe.UZERO;f=f.add(r.mul(o)),v=v.add(f.shru(32)),f=f.and(n),v=v.add(e.mul(o)),d=d.add(v.shru(32)),v=(v=v.and(n)).add(r.mul(h)),d=d.add(v.shru(32)),v=v.and(n),d=d.add(s.mul(o)),l=l.add(d.shru(32)),d=(d=d.and(n)).add(e.mul(h)),l=l.add(d.shru(32)),d=(d=d.and(n)).add(r.mul(a)),l=l.add(d.shru(32)),d=d.and(n),l=l.add(u.mul(o)).add(s.mul(h)).add(e.mul(a)).add(r.mul(c)).and(n);var g=fe.fromBits(f.getLowBitsUnsigned(),v.getLowBitsUnsigned(),!0),w=fe.fromBits(d.getLowBitsUnsigned(),l.getLowBitsUnsigned(),!0);return t.wF(g,w,this.xF())},i.GF=function(i){var n,r,e=i;if(e.IF())throw new RangeError("division by zero");if(this.IF())return this.xF()?[t.AF,t.AF]:[t.SF,t.SF];if(this.xF()){if(e.xF()||(e=e.DF()),e.MF(this))return[t.AF,this];if(e.MF(this.WF(1)))return[r=t.XF,n=this.gF(e)];r=t.AF}else{if(this.QO(t.kF)){if(e.QO(t.qF)||e.QO(t.jF))return[t.kF,t.SF];if(e.QO(t.kF))return[t.qF,t.SF];var s=this.HF(1).QF(e).VF(1);return s.QO(t.SF)?r=e.vF()?t.qF:t.jF:(n=this.gF(e.zF(s)),r=s.gO(n.QF(e))),[r,n=this.gF(e.zF(r))]}if(e.QO(t.kF))return this.xF()?[t.AF,this]:[t.SF,this];var u,o;if(this.vF())return e.vF()?this._F().GF(e._F()):(r=(u=this._F().GF(e))[0],n=u[1],[r._F(),n._F()]);if(e.vF())return r=(o=this.GF(e._F()))[0],n=o[1],[r._F(),n._F()];r=t.SF}for(n=this;n.LF(e);){for(var h=A.max(1,A.floor(n.rF()/e.rF())),a=A.ceil(A.log(h)/A.LN2),c=a<=48?1:A.pow(2,a-48),f=t.bF(h),v=f.zF(e);v.vF()||v.MF(n);)h-=c,v=(f=t.bF(h,this.xF())).zF(e);f.IF()&&(f=t.qF),r=r.gO(f),n=n.gF(v)}return[r,n]},i.QF=function(t){return this.GF(t)[0]},i.KF=function(t){return this.GF(t)[1]},i.toString=function(i){var n=i||10;if(n<2||n>36)throw new RangeError("radix");if(this.IF())return"0";if(this.vF()){if(this.QO(t.kF)){var r=t.bF(n),e=this.QF(r),s=e.zF(r).gF(this);return e.toString(n)+s.BF().toString(n)}return"-"+this._F().toString(n)}for(var u=t.bF(A.pow(n,6),this.xF()),o=this,h="";;){var a=o.QF(u),c=(o.gF(a.zF(u)).BF()>>>0).toString(n);if((o=a).IF())return c+h;for(;c.length<6;)c="0"+c;h=String(c)+h}},t.wF=function(i,n,r){return r?new t(i.toUnsigned(),n.toUnsigned()):new t(i.toSigned(),n.toSigned())},t.yF=function(i){return i.unsigned?new t(i,fe.UZERO):new t(i,i.isNegative()?fe.NEG_ONE:fe.ZERO)},t.bF=function(i,n){if(E(i))return n?t.AF:t.SF;if(n){if(i<0)return t.AF;if(i>=_m)return t.TF}else{if(i<=-km)return t.kF;if(i+1>=km)return t.EF}return i<0?t.bF(-i,n)._F():t.wF(fe.fromNumber(i%ym),fe.fromNumber(i/ym),n)},t}();bm.SF=bm.yF(fe.ZERO),bm.AF=bm.yF(fe.UZERO),bm.qF=bm.yF(fe.ONE),bm.XF=bm.yF(fe.UONE),bm.jF=bm.yF(fe.NEG_ONE),bm.EF=bm.wF(fe.NEG_ONE,fe.MAX_VALUE,!1),bm.TF=bm.wF(fe.MAX_UNSIGNED_VALUE,fe.MAX_UNSIGNED_VALUE,!0),bm.kF=bm.wF(fe.ZERO,fe.MIN_VALUE,!1),V(),It(),Bt();var Am=function(){function t(t,i){void 0===i&&(i=1),this.YF=void 0,this.jD=void 0,this.YF=t,this.jD=i}var i=t.prototype;return i.gO=function(i){return this.jD>=i.jD?new t(this.YF+i.eU(this.jD).YF,this.jD):new t(this.eU(i.jD).YF+i.YF,i.jD)},i.hF=function(t){return t.lF(this)},i.aF=function(t){return t.cF(this)},i.dF=function(i){return this.jD>=i.jD?new t(A.abs(this.YF-i.eU(this.jD).YF),this.jD):i.dF(this)},i.uF=function(t,i){return this.dF(t).cF(i)},i.oF=function(t){return function(t,i){return t.jD>=i.jD?jn(t.YF,i.eU(t.jD).YF):jn(t.eU(i.jD).YF,i.YF)}(this,t)},i.QO=function(t){return 0===this.oF(t)},i.lF=function(t){return this.oF(t)<0},i.cF=function(t){return this.oF(t)<=0},i.eU=function(i){return new t(this.YF*(i/this.jD),i)},i.gF=function(i){return this.jD>=i.jD?new t(this.YF-i.eU(this.jD).YF,this.jD):new t(this.eU(i.jD).YF-i.YF,i.jD)},i.sU=function(i){return new t(this.YF*i,this.jD)},t.JF=function(i){return new t(A.ceil(i.YF),i.jD)},t.ZF=function(i){return new t(A.floor(i.YF),i.jD)},t.tU=function(t,i){return t.aF(i)?t:i},t.iU=function(t,i){return t.cF(i)?t:i},xt(t,[{key:"mF",get:function(){return!isFinite(this.YF)}},{key:"dd",get:function(){return this.YF/this.jD}}]),t}();Am.fd=new Am(1/6,1),Am.SF=new Am(0),Am.nU=new Am(1/0),Am.rU=1e6;var Tm=function(t){function i(i,n){var r;return(r=t.call(this)||this).XE=void 0,r.jD=void 0,r.XE=i.toSigned(),r.jD=n>>>0,r}Pt(i,t);var n=i.prototype;return n.vF=function(){return this.XE.isNegative()},n.IF=function(){return 0!==this.jD&&this.XE.isZero()},n.mF=function(){return 0===this.jD&&!this.XE.isZero()},n.pF=function(){return 0===this.jD&&this.XE.isZero()},n.rF=function(){if(0===this.jD)return this.XE.isZero()?NaN:this.XE.isNegative()?-1/0:1/0;var t=this.XE.divide(this.jD),i=this.XE.subtract(t.multiply(this.jD));return t.toNumber()+i.toNumber()/this.jD},n.NF=function(){if(0===this.jD)throw new y("Failed to convert timestamp");return this.XE},n.fU=function(){return new Date(0===this.jD?NaN:this.eU(1e3).XE.toNumber())},n.vU=function(){return new Am(0===this.jD?this.rF():this.XE.toNumber(),this.jD)},n.eU=function(t,n){void 0===n&&(n=Em._U);var r=this.jD;if(r===t)return this;if(0===r)return this;var e=On(r,t),s=function(t,i,n){var r=t.GF(i),e=r[0],s=r[1];if(s.IF())return e;if(n===Em._U)return s.vF()?e.gF(bm.qF):e;if(n===Em.gU)return s.vF()?e:e.gO(bm.qF);var u=s.zF(bm.bF(2));return u.vF()?u._F().lF(i)?e:e.gF(bm.qF):u.lF(i)?e:e.gO(bm.qF)}(bm.yF(this.XE).zF(bm.bF(t/e)),bm.bF(r/e),n);return new i(s.NF(),t)},n.oF=function(t){if(this===t)return Ln.rh;if(0===this.jD||0===t.jD)return mm(this,t);if(this.IF())return t.IF()?Ln.rh:t.vF()?Ln.Fg:Ln.Ug;if(t.IF())return this.vF()?Ln.Ug:Ln.Fg;var i=A.min(this.jD,t.jD),n=this.eU(i,Em.pU).XE,r=t.eU(i,Em.pU).XE;return n.compare(r)},n._F=function(){return 0===this.jD?function(t){0;return t.pF()?t:t.vF()?Tm.aU:Tm.uU}(this):new i(this.XE.negate(),this.jD)},n.gO=function(t){if(0===this.jD||0===t.jD)return function(t,i){0;if(t.pF()||i.pF())return Tm.oU;if(t.mF()&&i.mF())return t.vF()===i.vF()?t:Tm.oU;return t.mF()?t:i}(this,t);if(this.IF())return t;if(t.IF())return this;var n=A.max(this.jD,t.jD),r=this.eU(n,Em.pU),e=t.eU(n,Em.pU);return new i(r.XE.add(e.XE),n)},n.zF=function(t){if(this.pF()||E(t))return i.oU;if(this.mF()||!isFinite(t)){if(this.IF()||0===t)return i.oU;var n=this.vF()?i.uU:i.aU;return t<0?n._F():n}return this.IF()?this:new i(0===t?fe.ZERO:this.XE.multiply(t),this.jD)},n.QF=function(t){if(this.pF()||E(t))return i.oU;if(this.mF())return isFinite(t)?0===t?1/t<0?this._F():this:t<0?this._F():this:i.oU;if(!isFinite(t))return new i(fe.ZERO,this.jD);if(this.IF())return 0===t?i.oU:new i(fe.ZERO,this.jD);if(0===t){var n=this.vF()?i.uU:i.aU;return 1/t<0?n._F():n}return new i(this.XE.divide(t),this.jD)},n.mU=function(){return[this.XE.low,this.XE.high,this.jD]},i.hU=function(t,n){return void 0===n&&(n=gm),i.bF(t*n,n)},i.bF=function(t,n){return E(t)?i.oU:t===1/0?i.aU:t===-1/0?i.uU:new i(fe.fromNumber(t),n)},i.yF=function(t,n){return new i(t,n)},i.cU=function(t){return i.hU(t.dd,gm)},i.dU=function(t){return new i(fe.fromNumber(t.getTime()),1e3)},i.tU=function(t,i){return t.aF(i)?t:i},i.iU=function(t,i){return t.cF(i)?t:i},i.lU=function(t,n,r){return i.tU(n,i.iU(r,t))},i}(wm);Tm.SF=new Tm(fe.ZERO,gm),Tm.oU=new Tm(fe.ZERO,0),Tm.aU=new Tm(fe.ONE,0),Tm.uU=new Tm(fe.NEG_ONE,0),V(),It(),Bt(),Dt(),ft();var Sm=function(t){function i(i,n){var r;return(r=t.call(this)||this).XE=void 0,r.jD=void 0,r.XE=BigInt.asIntN(64,i),r.jD=n>>>0,r}Pt(i,t);var n=i.prototype;return n.vF=function(){return this.XE>BigInt(32)&BigInt(4294967295);return fe.fromBits(Number(t),Number(i))},n.fU=function(){return new Date(0===this.jD?NaN:Number(this.eU(1e3).XE))},n.vU=function(){return new Am(0===this.jD?this.rF():Number(this.XE),this.jD)},n.eU=function(t,n){void 0===n&&(n=Em._U);var r=this.jD;if(r===t)return this;if(0===r)return this;var e=On(r,t),s=function(t,i,n){var r=t/i,e=t-r*i;if(e===BigInt(0))return r;if(n===Em._U)return er?Ln.Fg:n>>0),n)},i.cU=function(t){return i.hU(t.dd,gm)},i.dU=function(t){return i.bF(t.getTime(),1e3)},i.tU=function(t,i){return t.aF(i)?t:i},i.iU=function(t,i){return t.cF(i)?t:i},i.lU=function(t,n,r){return i.tU(n,i.iU(r,t))},xt(i,null,[{key:"SF",get:function(){return i.wU||(i.wU=new i(BigInt(0),gm)),i.wU}},{key:"oU",get:function(){return i.yU||(i.yU=new i(BigInt(0),0)),i.yU}},{key:"aU",get:function(){return i.bU||(i.bU=new i(BigInt(1),0)),i.bU}},{key:"uU",get:function(){return i.AU||(i.AU=new i(BigInt(-1),0)),i.AU}}]),i}(wm);Sm.wU=void 0,Sm.yU=void 0,Sm.bU=void 0,Sm.AU=void 0;var Em=function(t){return t[t._U=0]="_U",t[t.gU=1]="gU",t[t.pU=2]="pU",t}({}),Im=function(){try{return"function"==typeof BigInt&&"bigint"===W(BigInt(0))}catch(t){return!1}}()?Sm:Tm;function Rm(t,i){return t.oF(i)}function Cm(t,i){return void 0!==t?void 0!==i?Im.iU(t,i):t:i}V(),It();var Pm=A.pow(2,33),Dm=bn(function(){return Im.bF(Pm,9e4)}),Nm=bn(function(){return Dm().QF(2)});V(),It();var xm={TU:0,kU:1/0,EU:0},Bm=["WEBVTT","WEBVTT ","WEBVTT\t","WEBVTT\n"],Om=[" ","\t","\n","\f","\r"],Mm=/^\d*$/,Lm=/.*[0-9]+.*/,Fm=/^[\d.-]+$/,Um=/(^\.|\.$)/,Vm=/(\D\.|\.\D)/;function jm(t,i,n){return void 0===i&&(i=xm),void 0===n&&(n=!0),Hm(_a(Aa(t),new Pa),i,n)}function Hm(t,i,n){void 0===i&&(i=xm),void 0===n&&(n=!0);var r={L:[],xU:[],PU:[]},e=Wm(t),s=new Pa,u=!1;if(ip(e),zm(e,function(t){return"\n"!==t},s),s.ac>=e.length)return r;(s.Ly(1),"\n"!==e.charAt(s.ac))?Ym(qm(e,s,u,!0,r,i,n),r):s.Ly(1);for(zm(e,function(t){return"\n"===t},s);s.ac=t.length?f=!0:i.Ly(1),Wo(o,"--\x3e")){if(r||1!==h&&(2!==h||v)){i.Oy(a);break}v=!0,a=i.ac,d=new hm(0,0,"",!1,c);try{$m(o,e.xU,d,s,u),c=""}catch(t){Vi.um(t),d=null}}else{if(""===o)break;r&&zo(o,"X-TIMESTAMP-MAP")&&(e.IU=Xm(o)),r||2!==h||n||(Xo("STYLE",c.replace(/ /g,""))?(l={Km:Ww.xO},c=""):Xo("REGION",c.replace(/ /g,""))&&(g=new lm("",100,3,0,100,0,100,""),c="")),c&&(c+="\n"),c+=o,a=i.ac}if(d)return d.U=c,d;if(l);else if(g)return function(t,i){for(var n,r=t.split(/\s/),e=":",s=Ft(r);!(n=s()).done;){var u=n.value;if(0!==u.length&&Wo(u,e)&&u.charAt(0)!==e&&u.charAt(u.length-1)!==e){var o=u.indexOf(e),h=u.substring(0,o),a=u.substring(o+1,u.length);switch(h.toUpperCase()){case"ID":dp(a,i);break;case"WIDTH":wp(a,i);break;case"LINES":gp(a,i);break;case"REGIONANCHOR":var c=vp(a);c&&(i.$O=c[0],i.tF=c[1]);break;case"VIEWPORTANCHOR":var f=vp(a);f&&(i.eF=f[0],i.sF=f[1]);break;case"SCROLL":lp(a,i)}}}}(c,g),g;return null}function Xm(t){var i,n=t.split("=")[1].trim().split(","),r=Qm(n[0].trim(),"MPEGTS")?n[0]:n[1],e=Qm(n[0].trim(),"LOCAL")?n[0]:n[1];return{CU:Gm(Number(r.split(/:(.*)/)[1].trim())||0),bh:Im.hU(null!=(i=Zm(e.split(/:(.*)/)[1].trim(),new Pa))?i:0)}}function Gm(t){return Im.bF(t,9e4)}function Qm(t,i){return zo(t,i)}function Ym(t,i){t&&function(t){return"cue"===t.Km}(t)?i.L.push(t):t&&function(t){return"region"===t.Km}(t)?i.xU.push(t):t&&function(t){return"stylesheet"===t.Km}(t)&&i.PU.push(t)}function $m(t,i,n,r,e){var s=new Pa;rp(t,s);var u=Km(Zm(t,s),r,e);if(rp(t,s),"--\x3e"!==t.substring(s.ac,s.ac+3))throw y("Something went wrong with parsing a WebVTT Cue");s.Ly(3),rp(t,s);var o=Km(Zm(t,s),r,e);n.YO(u,o),function(t,i,n){for(var r,e=t.split(/\s/),s=":",u=Ft(e);!(r=u()).done;){var o=r.value;if(0!==o.length&&Wo(o,s)&&o.charAt(0)!==s&&o.charAt(o.length-1)!==s){var h=o.indexOf(s),a=o.substring(0,h),c=o.substring(h+1,o.length);switch(a.toUpperCase()){case"REGION":hp(c,i,n);break;case"VERTICAL":cp(c,i);break;case"D":fp(c,i);break;case"LINE":case"L":up(c,i);break;case"POSITION":case"T":op(c,i);break;case"SIZE":case"S":ap(c,i);break;case"ALIGN":case"A":sp(c,i)}}}}(t.substring(s.ac,t.length),n,i)}function Km(t,i,n){return n?t+i.TU:t}function Jm(t){return/^[0-9]$/.test(t)}function Zm(t,i){var n,r,e,s=Ho(t,",","."),u=!1;if(i.ac>=s.length||!Jm(s.charAt(i.ac)))throw new y("Something went wrong with parsing a WebVTT Cue timestamp");var o=zm(s,Jm,i),h=T(o,10);if((o.length>2||h>59)&&(u=!0),i.ac>=s.length||":"!==s.charAt(i.ac))throw new y("Something went wrong with parsing a WebVTT Cue timestamp");i.Ly(1);var a=zm(s,Jm,i);if(2!==a.length)throw new y("Something went wrong with parsing a WebVTT Cue timestamp");var c=T(a,10);if(u||i.ac=s.length||":"!==s.charAt(i.ac))throw new y("Something went wrong with parsing a WebVTT Cue timestamp");i.Ly(1);var f=zm(s,Jm,i);if(2!==a.length)throw new y("Something went wrong with parsing a WebVTT Cue timestamp");n=h,r=c,e=T(f,10)}else n=0,r=h,e=c;if(i.ac>=s.length||"."!==s.charAt(i.ac))throw new y("Something went wrong with parsing a WebVTT Cue timestamp");i.Ly(1);var v=zm(s,Jm,i),d=T(v,10);if(c>59||e>59)throw new y("Something went wrong with parsing a WebVTT Cue timestamp");return 60*n*60+60*r+e+d/1e3}function tp(t){return ip(Wm(t))}function ip(t){if(t.length<6)return!1;for(var i,n=Ft(Bm);!(i=n()).done;){var r=i.value;if(zo(t,r))return!0}return!1}function np(t){return Jn(Om,t)}function rp(t,i){for(;i.ac-1){var n=S(t.substring(0,i));if(!E(n)&&n>=0&&n<=100)return n}return null}function sp(t,i){var n=t.toLowerCase();switch(n){case"start":case"center":case"end":case"left":case"right":i.DO=n;break;case"middle":i.DO="center"}}function up(t,i){var n,r,e=t.indexOf(",");if(e>=0?(n=t.substring(0,e),r=t.substring(e+1,t.length)):(n=t,r=""),Lm.test(n)){var s,u;if(qo(n,"%")){var o=ep(n);if(null===o)return;s=o,u=!1}else{if(!Fm.test(n)||n.lastIndexOf("-")>0)return;var h=n.indexOf(".");if(h>=0&&(h!==n.lastIndexOf(".")||!Vm.test(n)||Um.test(n)))return;if(s=S(n),E(s))return;u=!0}switch(i.BO=s,i.FO=u,r=r.toLowerCase()){case"start":case"center":case"end":i.MO=r;break;case"middle":i.MO="center"}}}function op(t,i){var n,r,e=t.indexOf(",");e>=0?(n=t.substring(0,e),r=t.substring(e+1,t.length)):(n=t,r="");var s=ep(n);if(null!==s)switch(i.mo=s,r=r.toLowerCase()){case"line-left":case"center":case"line-right":case"auto":i.LO=r;break;case"start":i.LO="line-left";break;case"middle":i.LO="center";break;case"end":i.LO="line-right"}}function hp(t,i,n){var r=qn(n,function(i){return i.o===t});void 0!==r&&(i.OO=r)}function ap(t,i){var n=ep(t);null!==n&&(i.Wy=n)}function cp(t,i){switch(t.toLowerCase()){case"rl":case"vertical:rl":case"vertical-rl":i.Pt="rl";break;case"lr":case"vertical:lr":case"vertical-lr":i.Pt="lr";break;default:i.Pt=""}}function fp(t,i){"VERTICAL"===t.toUpperCase()?i.Pt="rl":"VERTICAL-LR"===t.toUpperCase()&&(i.Pt="lr")}function vp(t){if(t.indexOf(",")>=0){var i=ep(t.substring(0,t.indexOf(","))),n=ep(t.substring(t.indexOf(",")+1,t.length));return[Cn(i||0,0,100),Cn(n||100,0,100)]}return null}function dp(t,i){i.o=t}function lp(t,i){"up"===t.toLowerCase()&&(i.iF="up")}function gp(t,i){Mm.test(t)&&(i.ZO=T(t))}function wp(t,i){var n=ep(t);null!==n&&(i.Ti=n)}V(),It(),Ut(),V(),It(),Ut(),V(),It();var mp=function(t){return t.HC="moov",t.WC="mvhd",t.qC="trak",t.zC="tkhd",t.GC="mdia",t.XC="mdhd",t.jC="hdlr",t.QC="minf",t.KC="stbl",t.YC="stsd",t.JC="stsc",t.ZC="mvex",t.$C="trex",t.tR="avc1",t.iR="avcC",t.eR="hev1",t.sR="hvc1",t.nR="hvcC",t.rR="vp09",t.hR="vpcC",t.oR="av01",t.aR="av1C",t.uR="dvcC",t.cR="dvvC",t.dR="dvwC",t.lR="dac3",t.fR="dec3",t.vR="dvav",t._R="dva1",t.gR="dvhe",t.pR="dvh1",t.mR="ac-3",t.wR="ec-3",t.yR="colr",t.bR="pasp",t.AR="mp4a",t.SR="esds",t.kR="fLaC",t.ER="dfLa",t.xR="wvtt",t.PR="vttC",t.IR="vlab",t.RR="enca",t.DR="encv",t.NR="moof",t.MR="mfhd",t.LR="traf",t.OR="tfhd",t.FR="trun",t.UR="tfdt",t.HR="senc",t.WR="mdat",t.qR="pssh",t.zR="emsg",t.GR="sidx",t.XR="styp",t.jR="ftyp",t.QR="sinf",t.KR="frma",t.YR="schi",t.JR="tenc",t}({}),pp=function(t){return t.ON_SCREEN_COLOURS="nclx",t.RESTRICTED_ICC_PROFILE="rICC",t.UNRESTRICED_ICC_PROFILE="prof",t}({}),yp=function(t){return t[t.BASE_DATA_OFFSET_PRESENT=1]="BASE_DATA_OFFSET_PRESENT",t[t.SAMPLE_DESCRIPTION_INDEX_PRESENT=2]="SAMPLE_DESCRIPTION_INDEX_PRESENT",t[t.DEFAULT_SAMPLE_DURATION_PRESENT=8]="DEFAULT_SAMPLE_DURATION_PRESENT",t[t.DEFAULT_SAMPLE_SIZE_PRESENT=16]="DEFAULT_SAMPLE_SIZE_PRESENT",t[t.DEFAULT_SAMPLE_FLAGS_PRESENT=32]="DEFAULT_SAMPLE_FLAGS_PRESENT",t[t.DURATION_IS_EMPTY=65536]="DURATION_IS_EMPTY",t[t.DEFAULT_BASE_IS_MOOF=131072]="DEFAULT_BASE_IS_MOOF",t}({}),_p=function(t){return t[t.DATA_OFFSET_PRESENT=1]="DATA_OFFSET_PRESENT",t[t.FIRST_SAMPLE_FLAGS_PRESENT=4]="FIRST_SAMPLE_FLAGS_PRESENT",t[t.SAMPLE_DURATION_PRESENT=256]="SAMPLE_DURATION_PRESENT",t[t.SAMPLE_SIZE_PRESENT=512]="SAMPLE_SIZE_PRESENT",t[t.SAMPLE_FLAGS_PRESENT=1024]="SAMPLE_FLAGS_PRESENT",t[t.SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT=2048]="SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT",t}({});V(),It();var kp=function(){function t(t,i){this.lk=void 0,this.$R=void 0,this.lk=t,this.$R=i}var i=t.prototype;return i.ZR=function(){return Hh(this.lk,this.$R)},i.tD=function(){return Yh(this.lk,this.$R)},i.iD=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getInt16(i.ac,n);return i.Ly(2),r}(this.lk,this.$R)},i.eD=function(){return Kh(this.lk,this.$R)},i.sD=function(){return function(t,i,n){void 0===n&&(n=!1);var r=t.getInt32(i.ac,n);return i.Ly(4),r}(this.lk,this.$R)},i.nD=function(){return Zh(this.lk,this.$R)},i.rD=function(t){return zh(this.lk,this.$R,t)},i.hD=function(t){return function(t,i,n){for(var r=[],e=0;ei.byteLength){var a=h;return n.Oy(e),{vD:!1,bD:a}}var c={Km:u.Km,ac:e,lk:new kp(ba(i,e,h),new Pa(u.SD))};return n.Oy(h),{vD:!0,gD:c}},t.wD=function(t,i){var n=i.ac;if(!Xh(t,i,8))return{vD:!1,bD:i.ac+8};var r=Kh(t,i),e=na(t,i,4);if(1===r){if(!Xh(t,i,8)){var s=i.ac+8;return i.Oy(n),{vD:!1,bD:s}}r=Zh(t,i).toNumber()}if("uuid"===e){if(!Xh(t,i,16)){var u=i.ac+16;return i.Oy(n),{vD:!1,bD:u}}e=na(t,i,16)}return{vD:!0,yD:{Km:e,Wy:r,SD:i.ac-n}}},t.TD=function(t,i,n){var r=t.lk,e=t.$R,s=ka(Ta(r),e.ac,r.byteLength);return n&&(s=Ra(s)),e.Ly(s.byteLength),{Km:i,lk:s}},t.kD=function(i,n,r){var e=Cp(i.eD());return{Km:n,ED:e.version,xD:e.flags,lk:t.TD(i,n,r).lk}},t}();function Ep(t,i){var n=Ip(t,i);if(!n)throw new y("Missing "+i+" atom");return n}function Ip(t,i){for(var n,r=Ft(t);!(n=r()).done;){var e=n.value;if(e.Km===i)return e.lk}}function Rp(t,i){for(var n,r=[],e=Ft(t);!(n=e()).done;){var s=n.value;s.Km===i&&r.push(s.lk)}return r}function Cp(t){return{version:t>>24,flags:new Uh(16777215&t)}}var Pp=function(){function t(){}return t.PD=function(i){for(var n,r=[],e=Ft(Sp.lD(new kp(i,new Pa)));!(n=e()).done;){var s=n.value,u=t.CD(s);u&&r.push(u)}return r},t.RD=function(t){return Sp.fD(t,new Pa,!1).m.some(this.DD)},t.ND=function(i){return Rp(Sp.lD(new kp(i,new Pa)),mp.qR).map(t.BD)},t.MD=function(i){return Rp(Sp.lD(i.lk),mp.qR).map(t.BD)},t.DD=function(t){return t.Km===mp.jR||t.Km===mp.XR||t.Km===mp.HC||t.Km===mp.NR||t.Km===mp.WR||t.Km===mp.GR||t.Km===mp.zR},t.CD=function(i){switch(i.Km){case mp.HC:return t.LD(i.lk);case mp.NR:return t.OD(i.lk,i.ac);case mp.WR:return t.FD(i.lk);case mp.GR:return t.UD(i.lk);case mp.zR:return t.VD(i.lk)}},t.LD=function(i){var n=Sp.lD(i),r=Ep(n,mp.WC),e=Rp(n,mp.qC),s=Ip(n,mp.ZC),u=t.HD(r),o=e.map(t.WD),h=s?t.qD(s):void 0;return{Km:mp.HC,yD:u,Z:o,zD:h}},t.HD=function(t){var i=Cp(t.eD()),n=i.version,r=i.flags,e=1===n?t.nD():t.eD(),s=1===n?t.nD():t.eD(),u=t.eD(),o=1===n?t.nD():t.eD(),h=t.eD(),a=t.tD()>>8;t.uD(2),t.uD(8);var c=t.hD(9);t.uD(24);var f=t.eD();return{Km:mp.WC,ED:n,xD:r,GD:e,XD:s,jD:u,ct:o,QD:h,OP:a,KD:c,YD:f}},t.WD=function(i){var n=Sp.lD(i),r=Ep(n,mp.zC),e=Ep(n,mp.GC),s=t.JD(r),u=t.ZD(e);return{Km:mp.qC,yD:s,$D:u}},t.JD=function(t){var i=Cp(t.eD()),n=i.version,r=i.flags,e=1===n?t.nD():t.eD(),s=1===n?t.nD():t.eD(),u=t.eD();t.uD(4);var o=1===n?t.nD():t.eD();t.uD(8);var h=t.iD(),a=t.iD(),c=t.iD()/A.pow(2,8);t.uD(2);var f=t.hD(9),v=t.eD()/A.pow(2,16),d=t.eD()/A.pow(2,16);return{Km:mp.zC,tN:r.Uy(1),iN:r.Uy(2),eN:r.Uy(4),GD:e,XD:s,sN:u,ct:o,nN:h,rN:a,OP:c,KD:f,Ti:v,Mi:d}},t.ZD=function(i){var n=Sp.lD(i),r=Ep(n,mp.XC),e=Ep(n,mp.jC),s=Ep(n,mp.QC),u=t.hN(r),o=t.oN(e),h=t.aN(s);return{Km:mp.GC,yD:u,uN:o,cN:h}},t.hN=function(t){var i=Cp(t.eD()),n=i.version,r=i.flags,e=1===n?t.nD():t.eD(),s=1===n?t.nD():t.eD(),u=t.eD(),o=1===n?t.nD():t.eD();t.tD();return t.uD(2),{Km:mp.XC,ED:n,xD:r,GD:e,XD:s,jD:u,ct:o}},t.oN=function(t){var i=Cp(t.eD()),n=i.version,r=i.flags;t.uD(4);var e=t.oD(4);t.uD(12);var s=t.aD();return{Km:mp.jC,ED:n,xD:r,dN:e,l:s}},t.aN=function(i){var n=Ep(Sp.lD(i),mp.KC),r=t.lN(n);return{Km:mp.QC,fN:r}},t.lN=function(i){var n=Ep(Sp.lD(i),mp.YC),r=t.vN(n);return{Km:mp.KC,_N:r}},t.vN=function(i){for(var n,r=Cp(i.eD()),e=r.version,s=r.flags,u=(i.eD(),[]),o=Ft(Sp.lD(i));!(n=o()).done;){var h=n.value,a=t.gN(h.lk,h.Km);a&&u.push(a)}return{Km:mp.YC,ED:e,xD:s,pN:u}},t.gN=function(i,n){var r=t.mN(i,n);return r||((r=t.wN(i,n))||(n===mp.xR?t.yN(i):void 0))},t.mN=function(i,n){return n===mp.AR?t.bN(i):n===mp.kR||n===mp.kR.toLowerCase()||n===mp.kR.toUpperCase()?t.AN(i):n===mp.RR?t.SN(i):n===mp.mR?t.TN(i):n===mp.wR?t.kN(i):void 0},t.wN=function(i,n){return n===mp.tR?t.EN(i):n===mp.eR||n===mp.sR?t.xN(i,n):n===mp.rR?t.PN(i,n):n===mp.oR?t.CN(i,n):n===mp.DR?t.RN(i):n===mp.vR||n===mp._R||n===mp.gR||n===mp.pR?t.DN(i,n):void 0},t.NN=function(t,i){return t.uD(6),{Km:i,BN:t.tD()}},t.MN=function(i,n){var r=t.NN(i,n);i.uD(8);var e=i.tD(),s=i.tD();return i.uD(2),i.uD(2),io({},r,{LN:e,ON:s,FN:i.eD()>>>16})},t.UN=function(i,n){var r=t.NN(i,n);i.uD(2),i.uD(2),i.uD(12);var e=i.tD(),s=i.tD(),u=i.eD(),o=i.eD();i.uD(4);var h=i.tD();i.uD(32);var a=i.tD();return i.uD(2),io({},r,{Ti:e,Mi:s,VN:u,HN:o,WN:h,qN:a})},t.bN=function(i){var n=t.MN(i,mp.AR),r=Ep(Sp.lD(i),mp.SR);return io({},n,{zN:t.GN(r)})},t.AN=function(i){var n=t.MN(i,mp.kR),r=Ep(Sp.lD(i),mp.ER);return io({},n,{XN:t.jN(r)})},t.yN=function(i){var n=t.NN(i,mp.xR),r=Sp.lD(i),e=Ep(r,mp.PR),s=t.QN(e),u=Ip(r,mp.IR);return io({},n,{KN:s,YN:u?t.JN(u):void 0})},t.QN=function(t){return{Km:mp.PR,Cd:t.aD()}},t.JN=function(t){return{Km:mp.IR,Th:t.aD()}},t.GN=function(t){return Sp.kD(t,mp.SR,!0)},t.jN=function(t){return Sp.kD(t,mp.ER,!0)},t.EN=function(i){var n=t.UN(i,mp.tR),r=Sp.lD(i),e=Ep(r,mp.iR),s=Ip(r,mp.bR);return io({},n,{ZN:t.$N(e),tB:s?t.iB(s):void 0})},t.xN=function(i,n){var r=t.UN(i,n),e=Ep(Sp.lD(i),mp.nR);return io({},r,{eB:t.sB(e)})},t.PN=function(i,n){var r=t.UN(i,n),e=Ep(Sp.lD(i),mp.hR);return io({},r,{nB:t.rB(e)})},t.CN=function(i,n){var r=t.UN(i,n),e=Sp.lD(i),s=Ep(e,mp.aR),u=t.hB(s),o=Ip(e,mp.yR);return io({},r,{oB:u,aB:o?t.uB(o):void 0})},t.RN=function(i){var n=i.Fy(),r=t.UN(i,mp.DR),e=Ep(Sp.lD(i),mp.QR),s=t.cB(e);return io({},r,{dB:t.wN(n,s.fB.lB),vB:s})},t.DN=function(i,n){var r=t.UN(i,n),e=Sp.lD(i);return io({},r,{_B:t.gB(e)})},t.TN=function(i){var n=t.MN(i,mp.mR),r=Ep(Sp.lD(i),mp.lR);return io({},n,{pB:t.mB(r)})},t.kN=function(i){var n=t.MN(i,mp.wR),r=Ep(Sp.lD(i),mp.fR);return io({},n,{wB:t.yB(r)})},t.SN=function(i){var n=i.Fy(),r=t.MN(i,mp.RR),e=Ep(Sp.lD(i),mp.QR),s=t.cB(e);return io({},r,{dB:t.mN(n,s.fB.lB),vB:s})},t.cB=function(i){var n=Sp.lD(i),r=Ep(n,mp.KR),e=t.bB(r),s=Ep(n,mp.YR),u=t.AB(s);return{Km:mp.QR,fB:e,SB:u}},t.bB=function(t){var i=t.oD(4);return{Km:mp.KR,lB:i}},t.AB=function(i){var n=Ep(Sp.lD(i),mp.JR),r=t.TB(n);return{Km:mp.YR,kB:r}},t.TB=function(t){var i=Cp(Kh(t.lk,t.$R)),n=i.version,r=i.flags,e=t.ZR()>0,s=t.ZR(),u=t.rD(16);return{Km:mp.JR,ED:n,xD:r,EB:e,xB:s,PB:u}},t.$N=function(t){return Sp.TD(t,mp.iR,!0)},t.sB=function(t){return Sp.TD(t,mp.nR,!0)},t.gB=function(t){var i=Ip(t,mp.uR);if(void 0!==i)return Sp.TD(i,mp.uR,!0);var n=Ip(t,mp.cR);if(void 0!==n)return Sp.TD(n,mp.cR,!0);var r=Ip(t,mp.dR);if(void 0!==r)return Sp.TD(r,mp.dR,!0);throw y("Error parsing Dolby Vision configuration box.")},t.mB=function(t){return Sp.TD(t,mp.lR,!0)},t.yB=function(t){return Sp.TD(t,mp.fR,!0)},t.rB=function(t){return Sp.TD(t,mp.hR,!0)},t.hB=function(t){return Sp.TD(t,mp.aR,!0)},t.uB=function(t){var i=t.oD(4);switch(i){case"nclx":return{IB:pp.ON_SCREEN_COLOURS,CB:t.tD(),RB:t.tD(),DB:t.tD(),NB:!!(128&t.ZR())};case"rICC":return{IB:pp.RESTRICTED_ICC_PROFILE};case"prof":return{IB:pp.UNRESTRICED_ICC_PROFILE};default:throw y("Could not parse ColourInformationBox: unknown type '"+i+"'.")}},t.iB=function(t){var i=t.eD(),n=t.eD();return{Km:mp.bR,BB:i,MB:n}},t.qD=function(i){var n=Rp(Sp.lD(i),mp.$C).map(t.LB);return{Km:mp.ZC,Z:n}},t.LB=function(t){var i=Cp(t.eD()),n=i.version,r=i.flags,e=t.eD(),s=t.eD(),u=t.eD(),o=t.eD(),h=t.eD();return{Km:mp.$C,ED:n,xD:r,sN:e,OB:s,FB:u,UB:o,VB:h}},t.OD=function(i,n){var r=Sp.lD(i),e=Ep(r,mp.MR),s=Rp(r,mp.LR),u=t.HB(e),o=s.map(t.WB);return{Km:mp.NR,qB:n,yD:u,Z:o}},t.HB=function(t){var i=Cp(t.eD()),n=i.version,r=i.flags,e=t.eD();return{Km:mp.MR,ED:n,xD:r,zB:e}},t.WB=function(i){var n=Sp.lD(i),r=Ep(n,mp.OR),e=Rp(n,mp.FR),s=Ip(n,mp.UR),u=t.GB(r),o=e.map(function(i){return t.XB(i,u)}),h=s?t.jB(s):void 0;return{Km:mp.LR,yD:u,QB:o,KB:h}},t.GB=function(t){var i=Cp(t.eD()),n=i.version,r=i.flags,e=t.eD(),s=r.Uy(yp.BASE_DATA_OFFSET_PRESENT)?t.nD():void 0,u=r.Uy(yp.SAMPLE_DESCRIPTION_INDEX_PRESENT)?t.eD():void 0,o=r.Uy(yp.DEFAULT_SAMPLE_DURATION_PRESENT)?t.eD():void 0,h=r.Uy(yp.DEFAULT_SAMPLE_SIZE_PRESENT)?t.eD():void 0,a=r.Uy(yp.DEFAULT_SAMPLE_FLAGS_PRESENT)?t.eD():void 0;return{Km:mp.OR,ED:n,xD:r,sN:e,YB:s,JB:u,FB:o,UB:h,VB:a}},t.XB=function(i,n){for(var r=Cp(i.eD()),e=r.version,s=r.flags,u=i.eD(),o=s.Uy(_p.DATA_OFFSET_PRESENT)?i.sD():void 0,h=s.Uy(_p.FIRST_SAMPLE_FLAGS_PRESENT)?i.eD():void 0,a=[],c=0;c0)for(var c=Kh(n,r),f=0;f>31&1,g=2147483647&d,w=Kh(r,e),m=Kh(r,e),p=m>>31&1,y=m>>28&7,_=268435455&m;f.push({fM:l,vM:g,ct:w,_M:p,gM:y,pM:_})}return{Km:mp.GR,ED:u,xD:o,mM:h,jD:a,wM:i,yM:n,bM:c,AM:f}},t.jB=function(t){var i,n=t.lk,r=t.$R,e=Cp(Kh(n,r)),s=e.version,u=e.flags;return i=0===s?fe.fromBits(Kh(n,r),0,!0):Zh(n,r),{Km:mp.UR,ED:s,xD:u,KB:i}},t}();function Dp(t){return t&&"ix"in t?t.ix:t}V(),It(),Bt(),Dt(),V(),It();var Np=function(t){function i(i,n,r,e,s,u,o,h){var a;return(a=t.call(this,i,n,r,e)||this).DU=void 0,a.BU=void 0,a.MU=void 0,a.OU=void 0,a.DU=s,a.BU=u,a.MU=o,a.OU=h||void 0,a}return Pt(i,t),i.prototype.KO=function(t){return!!qg(this.RU,t.RU)&&(!!qg(this.NU,t.NU)&&(!!qg(this.xU,t.xU)&&(this.LU&&t.LU?!!this.LU.jE(t.LU)&&(this.U&&t.U?this.U.jE(t.U):this.U===t.U):this.LU===t.LU)))},xt(i,[{key:"RU",get:function(){return this.DU}},{key:"NU",get:function(){return this.BU}},{key:"xU",get:function(){return this.MU}},{key:"LU",get:function(){return this.OU}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return Wg(Kw(t),{get extent(){return t.RU},get styles(){return t.NU},get regions(){return t.xU},get metadata(){return Dp(t.LU)},get content(){return Dp(t.U)}})}(this)),this.hu}}]),i}(um);V(),It(),Bt();var xp=function(){function t(t,i,n){this.Lf=void 0,this.UU=void 0,this.VU=void 0,this.UU=t,this.VU=i,dg(n)?this.Lf=function(t,i,n){for(var r=0,e=["begin","end","dur"];r=t&&u<=i||s=i||st)&&r.push(n[e])}return r}(l[i],l[i+1],h);if(n.length<=0&&function(t){if(dg(t)){var i=t.WE.toUpperCase(),n=Boolean(t.ox("smpte:backgroundImage"));return"BR"===i||n}return t.VE===vg.LT}(t)){var r=t.QE(!1);a.push(new xp(l[i],l[i+1],r))}else if(n.length>0){var e=t.QE(!1);n.forEach(function(t){return e.sx(t.FU)}),a.push(new xp(l[i],l[i+1],e))}},u=i,o=n,h=[],a=[];if(dg(t)){var c,f;u=null!=(c=Qp(t.ox("begin"),r))?c:u,e=Qp(t.ox("dur"),0),o=null!=(f=Qp(t.ox("end"),r))?f:void 0!==e?u+e:o;for(var v=t.KE,d=0;d1||(h=h.concat(Gp(v[d],u,o,r)))}for(var l=function(t,i,n){var r=[];r.push(t,i);for(var e,s=Ft(n);!(e=s()).done;){var u=e.value;r.push(u.CO,u.RO)}r.sort(Un);for(var o=r.length,h=0;hn)break;i<=u.RO&&!Jn(r,u)&&r.push(u)}}function yy(t,i){return Fn(t.JI,i.JI)}function _y(t,i,n,r){var e=function(t){switch(t){case jw.WEBVTT:return"WebVTT";case jw.SRT:return"SRT";case jw.TTML:return"TTML";default:return""}}(t);return new cy(pd.SUBTITLE_PARSE_ERROR,"Could not parse the "+(e?e+" ":"")+"subtitle file.",i,n,r)}function ky(t,i){for(var n,r=[],e=Ft(t.L.NI);!(n=e()).done;){var s=n.value;if(s.RO<=i)r.push(s);else if(s.CO>=i)break}for(var u,o=Ft(r);!(u=o()).done;){var h=u.value;t.XU(h)}}function by(t,i){if(t.V>0)for(var n,r=t.Tn(0),e=A.max(0,r-10),s=Ft(i);!(n=s()).done;){n.value.jU(e)}}var Ay=function(t){function i(i){var n;return(n=t.call(this)||this).iV=void 0,n.Z=new sy,n.QU=0,n.KU=function(t){var i=t.Ht;n.YU(i)},n.iV=i,n}Pt(i,t);var n=i.prototype;return n.tt=function(t){t.wn(Fg.pa,this.KU),t.EU=this.EU,this.Z.tt(t),this.YU(t)},n.it=function(t){t.mn(Fg.pa,this.KU),t.Qk=Jp.Nh,this.Z.it(t)},n.JU=function(t){},n.ZU=function(t){},n.YU=function(t){t.Qk!==Jp.Nh?this.JU(t):this.ZU(t)},n.$U=function(){for(var t,i=Ft(this.Z.NI);!(t=i()).done;){var n=t.value;n.mn(Fg.pa,this.KU),n.kn()}},n.jU=function(t){if(t>0)for(var i,n=Ft(this.Z.NI);!(i=n()).done;){ky(i.value,t)}},n.tV=function(t){var i=this.iV;if(t!==i){this.iV=t;for(var n,r=Ft(this.Z.NI.slice());!(n=r()).done;){var e=n.value,s=this.eV(e,i,t);e!==s&&(this.it(e),this.tt(s),e.kn())}}},n.hr=function(){return this.$U(),this.Z.hr(),ot.resolve()},n.kn=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),[4,this.hr()];case 1:return t.sent(),this.Z.kn(),[2]}})}).call(this)},xt(i,[{key:"EU",get:function(){return this.QU},set:function(t){this.QU=t;for(var i,n=Ft(this.Z.NI);!(i=n()).done;){i.value.EU=t}}}]),i}(uh);function Ty(t,i,n){var r=n.sI(t.Lt,t.o,t.Th,t.bs,t.sV,t.Km,t.nC,t.ZI);r.rC=t.rC,r.AP=t.AP,r.eC=t.eC,r.EU=t.EU;for(var e,s=Ft(t.L.NI.slice());!(e=s()).done;){var u=e.value;t.XU(u),r.nV(u)}return r.Qk=t.Qk,i.rV(t),r}V(),It(),Bt(),Dt();var Sy=function(t){function i(i){var n;return(n=t.call(this,ty.ma)||this).errorObject=void 0,n.errorObject=i,n}return Pt(i,t),i.prototype.xa=function(){return this},xt(i,[{key:"error",get:function(){return this.errorObject.message}}]),i}(Cg),Ey=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).aV=void 0,r.uV=new dr,r.aV=n,r}Pt(i,t);var n=i.prototype;return n.hV=function(t){if(t.src){var i=t.kind||uy.HU,n=this.iV.sI(i,t.id,t.label,t.srclang,t.default);return n.rC=Bl(t.src),this.tt(n),n}},n.oV=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f,v;return zt(this,function(d){switch(d.label){case 0:t.AP=Vw.LOADING,n=new Cl({Yu:t.rC,fk:qd.LT,Hk:Tl.GET,Yg:i}),d.label=1;case 1:return d.trys.push([1,4,,5]),[4,this.aV.vk(n)];case 2:return s=d.sent(),e=s.dk,[4,s.HT()];case 3:return r=d.sent(),[3,5];case 4:return yr(u=d.sent()),t.AP=Vw.ERROR,t.So(new Sy(function(t,i){var n=i,r=0;if(tg(t)&&t.name===Fl.rE)n=t.vk.Yu;else if(ig(t)){var e=t.uE;if(n=e.wk,0===(r=e.dk))return new cy(pd.SUBTITLE_CORS_ERROR,"Could not load the subtitle file. Make sure the source is set correctly and that CORS support is enabled.",n,r,t)}return new cy(pd.SUBTITLE_LOAD_ERROR,"Could not load the subtitle file.",n,r,t)}(u,t.rC))),[2];case 5:try{for(o=function(t){return tp(t)?jw.WEBVTT:Kp(t)?jw.TTML:jw.SRT}(r),t.Km=o,h=[],o===jw.WEBVTT||o===jw.SRT?(a=Hm(r),h=a.L):o===jw.TTML&&(h=jp(r,t)),c=Ft(h);!(f=c()).done;)v=f.value,t.nV(v)}catch(i){return yr(i),t.AP=Vw.ERROR,t.So(new Sy(_y(t.Km,t.rC,e,i))),[2]}return t.AP=Vw.LOADED,[2]}})}).call(this)},n.JU=function(t){Jn(this.Z.NI,t)&&t.AP===Vw.NONE&&this.oV(t,this.uV.Yg).catch(_r)},n.Un=function(){},n.eV=function(t,i,n){return Ty(t,i,n)},n.hr=function(){var i=this;return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:for(this.uV.Zg(),this.uV=new dr,n=Ft(this.Z.NI);!(r=n()).done;)e=r.value,this.iV.rV(e);return[4,t.prototype.hr.call(i)];case 1:return s.sent(),[2]}})}).call(this)},i}(Ay);function Iy(t){return"TXXX"===t.id||"TXX"===t.id}V(),It(),Wt(),Dt(),Ut(),Yt(),V(),It();var Ry=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).dV=void 0,r.pV=void 0,r.bV=void 0,r.lV=void 0,r.yV=void 0,r.fV=void 0,r.wV=void 0,r.dV=n,r.pV=eo(),r.bV=function(t){t.mn(Fg.kI,r.lV),t.Km?t.Km===jw.ID3&&(t.mn(Fg.uI,r.yV),0!==t.L.V?r._V(t):t.wn(Fg.uI,r.yV)):t.wn(Fg.kI,r.lV)},r.lV=function(t){r.bV(t.Ht)},r.yV=function(t){r.bV(t.PO.Ht)},r.fV=function(t){var i=t.Ht;if(i.Km===jw.ID3&&r.pV.has(i.JI)){var n=r.pV.get(i.JI);r.it(n),r.iV.rV(n),i.mn(Fg.kI,r.lV),i.mn(Fg.uI,r.yV),i.mn(Fg.uI,r.wV)}},r.wV=function(t){Cy(t.PO)&&r.mV(t.PO)},r.cV(),r}Pt(i,t);var n=i.prototype;return n.cV=function(){this.dV.wn(xg.rI,this.lV),this.dV.wn(xg.oI,this.fV)},n.vV=function(){this.dV.mn(xg.rI,this.lV),this.dV.mn(xg.oI,this.fV)},n._V=function(t){var i=t.L.NI[0];if(Cy(i)){var n=function(t){var i=t.match(Py);if(!i)return;return{Ht:i[1],bs:i[2]}}(i.U.description),r=n.Ht,e=n.bs;if(!this.gV(r,e)){var s=this.iV.sI(uy.HU,t.o,r,e,!1,jw.TTML);this.tt(s),this.pV.set(t.JI,s);for(var u,o=Ft(t.L.NI);!(u=o()).done;){var h=u.value;Cy(h)&&this.mV(h)}t.wn(Fg.uI,this.wV)}}},n.gV=function(t,i){return this.Z.NI.some(function(n){return n.Th===t&&n.bs===i})},n.mV=function(t){if(t.Ht)for(var i,n=this.pV.get(t.Ht.JI),r=Ft(jp(t.U.text,n,{TU:0,kU:1/0,EU:t.CO}));!(i=r()).done;){var e=i.value;n.nV(e)}},n.eV=function(t,i,n){var r=this,e=Ty(t,i,n);return this.pV.forEach(function(i,n){i===t&&r.pV.set(n,e)}),e},n.hr=function(){var i=this;return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:for(n=Ft(this.dV.NI);!(r=n()).done;)(e=r.value).mn(Fg.kI,this.lV),e.mn(Fg.uI,this.yV),e.mn(Fg.uI,this.wV);for(s=Ft(this.Z.NI);!(u=s()).done;)o=u.value,this.iV.rV(o);return this.pV.clear(),[4,t.prototype.hr.call(i)];case 1:return h.sent(),[2]}})}).call(this)},n.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.vV(),[4,t.prototype.kn.call(i)];case 1:return n.sent(),[2]}})}).call(this)},i}(Ay);function Cy(t){return function(t){return Iy(t)&&Py.test(t.description)}(t.U)}var Py=/^Track:(.+),Lang:(.+)$/;function Dy(t,i){for(var n,r=Ft(t);!(n=r()).done;){var e=n.value;if(e.Lt===i&&e.sV)return e}}function Ny(t,i){xy(Dy(t.NI,i))}function xy(t){void 0!==t&&(t.Qk=Jp.Kn)}function By(t,i){var n=Dy(t.NI,i)||function(t,i){for(var n,r=Ft(t);!(n=r()).done;){var e=n.value;if(e.Lt===i)return e}}(t.NI,i);xy(n)}function Oy(t){for(var i,n=Ft(oy);!(i=n()).done;){var r=i.value;r===uy.Yn?By(t,r):Ny(t,r)}}V(),It(),Ut(),V(),It(),Dt();var My=function(t){function i(){return t.call(this,ch.Jw)||this}return Pt(i,t),i}(ah);V(),It(),V(),It();var Ly=function(t){return t[t.AV=0]="AV",t[t.SV=1]="SV",t}({});V(),It();var Fy=function(t){return t.SM="canplay",t.TM="canplaythrough",t.kM="loadeddata",t.EM="loadedmetadata",t.AI="readystatechange",t.xM="waiting",t.PM="playing",t}({}),Uy=["canplay","canplaythrough","loadeddata","loadedmetadata","readystatechange","waiting","playing"];V(),It(),Bt(),Dt(),V(),It(),Dt();var Vy=function(t){function i(i,n){var r;return(r=t.call(this,Fy.AI)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Pt(i,t),i}(ah);V(),It();var jy=function(t){return t[t.zL=0]="zL",t[t.Qn=1]="Qn",t[t.GL=2]="GL",t[t.XL=3]="XL",t[t.jL=4]="jL",t}({});V(),It(),Dt();var Hy=function(t){function i(i,n){var r;return void 0===n&&(n=jy.Qn),(r=t.call(this,Fy.EM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Pt(i,t),i}(ah);V(),It(),Dt();var Wy=function(t){function i(i,n){var r;return void 0===n&&(n=jy.GL),(r=t.call(this,Fy.kM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Pt(i,t),i}(ah);V(),It(),Dt();var zy=function(t){function i(i){var n;return(n=t.call(this,Fy.xM)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var qy=function(t){function i(i,n){var r;return void 0===n&&(n=jy.XL),(r=t.call(this,Fy.SM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Pt(i,t),i}(ah);V(),It(),Dt();var Xy=function(t){function i(i,n){var r;return void 0===n&&(n=jy.jL),(r=t.call(this,Fy.TM)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Pt(i,t),i}(ah);V(),It(),Dt();var Gy=function(t){function i(i){var n;return(n=t.call(this,Fy.PM)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah),Qy=[Fy.AI,Fy.PM,ch.uo,ch.jw],Yy=function(t){function i(i,n){var r;return void 0===n&&(n=!1),(r=t.call(this)||this).DV=void 0,r.CV=void 0,r.RV=void 0,r.FV=void 0,r.xV=void 0,r.kV=void 0,r.qV=void 0,r.HV=void 0,r.WV=void 0,r.VV=void 0,r.DV=i,r.CV=n,r.RV=jy.zL,r.FV=!0,r.xV=!1,r.kV=!1,r.qV=function(t){var i=r.DV.zx,n=r.DV.AP;n!==r.RV&&r.So(new Vy(i,n)),n===jy.zL&&(r.xV=!1,r.kV=!1),r.TV(i,n),r.EV(i,n),r.LV(i,n),r.OV(i,n),r.PV(i,n),r.BV(i,n),r.RV=n},r.HV=function(){var t=r.DV.zx;r.BV(t,r.RV),r.PV(t,r.RV),r.FV=r.DV.lP},r.WV=function(){r.FV=r.DV.lP},r.VV=function(){r.So(new Gy(r.DV.zx))},r.DV.wn(Fy.AI,r.qV),r.DV.wn(ch.uo,r.HV),r.DV.wn(ch.jw,r.WV),r.CV&&r.DV.wn(Fy.PM,r.VV),r}Pt(i,t);var n=i.prototype;return n.TV=function(t,i){!this.kV&&i>=jy.Qn&&(this.kV=!0,this.So(new Hy(t,i)))},n.EV=function(t,i){!this.xV&&i>=jy.GL&&(this.xV=!0,this.So(new Wy(t,i)))},n.PV=function(t,i){this.CV||(i>=jy.XL&&this.RV=jy.XL)&&this.So(new Gy(t))},n.BV=function(t,i){!this.MV(i)||this.DV.Qx||this.DV.lt||this.So(new zy(t))},n.LV=function(t,i){this.RV<=jy.GL&&i>=jy.XL&&this.So(new qy(t,i))},n.OV=function(t,i){i===jy.jL&&this.So(new Xy(t,i))},n.MV=function(t){var i=!this.DV.lP&&t<=jy.GL,n=!this.FV&&this.RV<=jy.GL;return i&&!n},n.hr=function(){this.RV=jy.zL,this.FV=!0,this.xV=!1,this.kV=!1},n.kn=function(){this.Vo(),this.CV&&this.DV.mn(Fy.PM,this.VV),this.DV.mn(ch.uo,this.HV),this.DV.mn(ch.jw,this.WV),this.DV.mn(Fy.AI,this.qV)},xt(i,[{key:"NV",get:function(){return!this.DV.lP&&this.FV}}]),i}(uh);V(),It(),Bt(),Dt();var $y=function(t){function i(i,n){var r;return(r=t.call(this)||this).oa=void 0,r.PL=void 0,r.oa=i,r.PL=n,r.PL.wn(Qy,r.Rs),r}Pt(i,t);var n=i.prototype;return n.zg=function(){this.Vo(),this.PL.mn(Qy,this.Rs)},n.zV=function(){this.So(new Vy(this.zx,this.AP))},xt(i,[{key:"zx",get:function(){return this.oa.zx}},{key:"Qx",get:function(){return this.oa.Qx}},{key:"lt",get:function(){return this.PL.lt}},{key:"lP",get:function(){return this.PL.lP}},{key:"AP",get:function(){return this.oa.AP}}]),i}(uh);V(),It(),V(),It();var Ky="titanium",Jy="conax",Zy="ezdrm",t_="irdeto",i_="vudrm",n_="verimatrix",r_="keyos",e_="drmtoday",s_="expressplay",u_="azure",o_="xstream",h_="vimond",a_="axinom",c_="uplynk",f_="comcast",v_="custom";V(),It(),Wt(),Dt(),Yt(),V(),It(),Wt(),Dt(),Yt(),V(),It(),Wt(),Bt(),Yt();var d_=function(){function t(t,i,n,r,e){this.xS=void 0,this.lH=void 0,this.fH=void 0,this.YV=void 0,this.aV=void 0,this.XV=void 0,this.dH=void 0,this.xS=t,this.lH=i,this.fH=n,this.aV=r,this.dH=e,this.YV=this.vH(i)}var i=t.prototype;return i.GV=function(){return this.XV},i.jV=function(t){this.XV=t},i.JV=function(){return this.YV.licenseAcquisitionURL||this.GV()},i.$V=function(t){return ot.resolve()},i.tH=function(t,i){return ot.resolve(void 0)},i.iH=function(t,i,n,r){return jt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:if(""===(e=this.eH(t,i,n,r)).Yu)throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");u.label=1;case 1:return u.trys.push([1,4,,6]),[4,this.Dx.vk(e)];case 2:return[4,u.sent().WT(i)];case 3:return[2,u.sent()];case 4:return yr(s=u.sent()),[4,this.sH(s,e.Yu,r)];case 5:return u.sent(),[2];case 6:return[2]}})}).call(this)},i.eH=function(t,i,n,r){var e=this.nH().OT(),s=this.Xk,u={Yu:this.rH(),fk:i,_k:e,XT:t,Xk:s,Hk:Tl.POST,Wk:0,Yg:r,Km:Sl.Tk,zk:n};return new Cl(u)},i.hH=function(t,i){return ot.resolve(t)},i.oH=function(t,i,n,r){return ot.resolve(t)},i.nH=function(){return new Xd(this.YV.headers||{})},i.sH=function(t,i,n){return jt(function(){return zt(this,function(i){throw new lw(pd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during license server request",t)})})()},i.rH=function(t,i){var n=i,r=this.YV.queryParameters;if(!n){var e=this.JV();if(!e)return"";n=e}if(r||t){var s=Vi.Dh(n);t&&xl(s,t),r&&xl(s,r),n=s.href}return n},i.aH=function(t,i){return l_(t)},i.uH=function(t){return new I(t)},i.cH=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return[4,this.aH(t,n)];case 1:return r=s.sent(),[4,this.iH(r,this.dH,i,n)];case 2:return e=s.sent(),[2,this.uH(e)]}})}).call(this)},i.kn=function(){},xt(t,[{key:"Dx",get:function(){return this.aV}},{key:"QV",get:function(){return!1}},{key:"KV",get:function(){var t=this.YV.certificate;if(t)return qi(t)?Th(t):Ea(t)}},{key:"ZV",get:function(){return!1}},{key:"Xk",get:function(){return Boolean(this.YV.useCredentials)}}]),t}();function l_(t){return ot.resolve(Ra(t).buffer)}var g_,w_=function(t){function i(i,n,r,e){return t.call(this,Bo,i,n,r,e)||this}Pt(i,t);var n=i.prototype;return n.vH=function(t){return t.widevine||{}},n._H=function(t,i){return jt(function(){return zt(this,function(n){return this.KV?[2,this.KV]:[2,this.gH(new I(t),i)]})}).call(this)},n.gH=function(i,n){return t.prototype.cH.call(this,i,El.Ik,n)},i}(d_);function m_(t,i){if(null==t)return{};var n,r,e={},s=b.keys(t);for(r=0;r=0||(e[n]=t[n]);return e}function p_(t){return Fi(t.token&&t.deviceId)}function y_(t){var i,n=null==(i=t.fairplay)?void 0:i.headers;return void 0!==n&&Fi(n.PreAuthorization)}function __(t){var i=t;return p_(i)&&""!==i.token&&""!==i.deviceId&&!y_(i)}V(),It(),V(),It(),Wt(),V(),It(),Ut(),Yt(),V(),It(),V(),It(),Ut(),V(),It(),function(t){t.AC=!1,t.SC=!1,t.TC=!1,t.kC=!1,t.LOG_ADS_DETAILS=!1,t.LOG_CHROMECAST_DETAILS=!1,t.LOG_CUSTOM_DRM=!1,t.LOG_BUFFERING_VIDEO_MAIN=!1,t.LOG_BUFFERING_VIDEO_SELECTION=!1,t.LOG_BUFFERING_AUDIO_MAIN=!1,t.LOG_BUFFERING_AUDIO_SELECTION=!1,t.EC=!1,t.xC=!1,t.LOG_LCEVC_DETAILS=!1}(g_||(g_={})),V(),It(),Bt();var k_=function(){function t(t,i,n){this.RC=void 0,this.yS=void 0,this.NC=void 0,this.RC=t,this.yS=i,this.NC=n}return t.prototype.DC=function(t){return function(t){var i=t.onCertificateRequest;if(void 0!==i&&"function"!=typeof i)throw new _("ContentProtectionIntegration.onCertificateRequest is not a function.");var n=t.onCertificateResponse;if(void 0!==n&&"function"!=typeof n)throw new _("ContentProtectionIntegration.onCertificateResponse is not a function.");var r=t.onLicenseRequest;if(void 0!==r&&"function"!=typeof r)throw new _("ContentProtectionIntegration.onLicenseRequest is not a function.");var e=t.onLicenseResponse;if(void 0!==e&&"function"!=typeof e)throw new _("ContentProtectionIntegration.onLicenseResponse is not a function.");var s=t.extractFairplayContentId;if(void 0!==s&&"function"!=typeof s)throw new _("ContentProtectionIntegration.extractFairplayContentId is not a function.");return t}(this.NC.build(t))},xt(t,[{key:"IC",get:function(){return this.RC}},{key:"xS",get:function(){return this.yS}}]),t}();V(),It();var b_=function(t){return t.FAILED="FAILED",t.OVERRIDDEN="OVERRIDDEN",t.SUCCEEDED="SUCCEEDED",t}({}),A_=function(){function t(){this.MC=[]}var i=t.prototype;return i.registerContentProtectionIntegration=function(t,i,n){switch(this.BC(t,i,n)){case b_.FAILED:throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The keySystem should be 'widevine', 'playready' or 'fairplay', but was "+i+".");case b_.OVERRIDDEN:var r=V_(i);Vi.um("Warning: Overwriting an earlier registered integration for "+t+" and "+r+".");break;case b_.SUCCEEDED:V_(i);0}},i.BC=function(t,i,n){var r=V_(i);if(!r)return b_.FAILED;for(var e,s=b_.SUCCEEDED,u=Ft(this.MC.slice());!(e=u()).done;){var o=e.value;o.IC===t&&o.xS===r&&(s=b_.OVERRIDDEN,Yn(this.MC,o))}return this.MC.push(new k_(t,r,n)),s},i.LC=function(t,i){return void 0!==this.OC(t,i)},i.FC=function(t,i,n){var r=this.OC(t,i);if(!r)throw y("No ContentProtectionIntegrationInit was found for integration id "+t+" and key system "+i);return r.DC(n)},i.OC=function(t,i){for(var n,r=Ft(this.MC);!(n=r()).done;){var e=n.value;if(e.IC===t&&(!i||e.xS===i))return e}},t}();A_.VC=new A_;var T_={playready:"https://pr-keyos.licensekeyserver.com/core/rightsmanager.asmx",widevine:"https://wv-keyos.licensekeyserver.com/",fairplay:"https://fp-keyos.licensekeyserver.com/getkey"};function S_(t){if(!t)return!0;var i=t.licenseAcquisitionURL,n=t.certificateURL,r=t.keys,e=t.headers,s=t.useCredentials,u=t.queryParameters;return!(i||n||r||e||s||u)}function E_(t){return t&&void 0!==t.licenseAcquisitionURL}var I_=E_,R_=E_;function C_(t){if(!t)return!0;if(x_(t))return!1;var i=t.fairplay,n=t.playready,r=t.widevine,e=t.clearkey,s=t.aes128;return S_(i)&&S_(n)&&S_(r)&&void 0===e&&S_(s)}function P_(t){var i=__(t),n=function(t){var i,n=t;return y_(n)&&""!==(null==(i=n.fairplay)?void 0:i.headers.PreAuthorization)&&!p_(n)}(t);return(!i||!n)&&(i||n)}function D_(t){return t.integration===t_}function N_(t){var i=t;if(!i)return!1;if(C_(i))return!1;var n=i.fairplay,r=i.playready,e=i.widevine,s=i.clearkey;if(x_(t))return!0;if(n&&!function(t){var i=t;return i&&(void 0!==i.certificateURL||void 0!==i.certificate)}(n))return!1;if(r&&!I_(r))return!1;if(e&&!R_(e))return!1;if(s&&!function(t){return void 0!==t}(s))return!1;if(i.integration){if(A_.VC.LC(i.integration))return!0;switch(i.integration){case Ky:if(!function(t){var i=t,n=i.integration===Ky;return n&&(B_(t)||O_(t))}(t))return!1;break;case i_:if(!M_(t))return!1;break;case n_:if(!function(t){var i=t;return i.integration===n_}(t))return!1;break;case t_:if(!D_(t))return!1;break;case Jy:if(!P_(t))return!1;break;case Zy:if(!function(t){var i=t;return i.integration===Zy}(t))return!1;break;case r_:if(!x_(t))return!1;break;case e_:if(!function(t){var i=t;return i.integration===e_&&(void 0!==i.token||function(t){return void 0!==t.merchant&&void 0!==t.sessionId&&void 0!==t.userId}(i))}(t))return!1;break;case s_:if(!function(t){var i=t;return i.integration===s_}(t))return!1;break;case o_:if(!L_(t))return!1;break;case h_:if(!function(t){return t.integration===h_}(t))return!1;break;case a_:if(!F_(t))return!1;break;case u_:if(!function(t){var i=t;return i.integration===u_&&void 0!==i.token}(t))return!1;break;case c_:if(!function(t){var i=t;return i.integration===c_}(t))return!1;break;case f_:if(!function(t){var i=t;return i&&Fi(i.releasePid)&&Fi(i.accountId)&&Fi(i.token)}(t))return!1;break;case v_:return!0;default:return!1}}return!0}function x_(t){return t.integration===r_}function B_(t){return void 0!==t.authToken}function O_(t){var i=t;return void 0!==i.accountName&&void 0!==i.customerName&&void 0!==i.portalId}function M_(t){var i=t;return i.integration===i_&&void 0!==i.token}function L_(t){var i=t;return i&&i.integration===o_&&qi(i.ticketAcquisitionURL)&&qi(i.streamId)}function F_(t){var i=t;return i.integration===a_&&void 0!==i.token}function U_(t,i){var n,r,e,s=i[t],u=null!=(n=null==s?void 0:s.licenseAcquisitionURL)?n:T_[t],o=null!=(r=null==s?void 0:s.customdata)?r:i.customdata,h=o?{customData:o}:{},a=io({},null!=(e=null==s?void 0:s.headers)?e:{},h),c=null!=s?s:{};c.customdata;return io({},m_(c,["customdata"]),{licenseAcquisitionURL:u,headers:a})}function V_(t){switch(t.toLowerCase()){case"widevine":case ko:return ko;case"playready":case po:return po;case"fairplay":case Co:return Co}}function j_(t,i){switch(t){case vo:return function(t){for(var i,n={},r=Ft(Pp.ND(new DataView(t)));!(i=r()).done;){var e=i.value;n[e.uM]=e.lM}return n}(i);case lo:case go:return function(t){var i;return i={},i[Ro]=t,i}(i);case wo:return function(t){var i;return i={},i[Eo]=t,i}(i);default:throw new _d(pd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Unsupported initDataType "+t)}}function H_(t,i){return void 0===i&&(i=!1),jt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return(n=t.widevine)?[4,Vi.Am()]:[3,2];case 1:n=u.sent(),u.label=2;case 2:return n?[2,!0]:(r=t.playready)?[4,Vi.ym()]:[3,4];case 3:r=u.sent(),u.label=4;case 4:return r?[2,!0]:(e=t.clearkey)?[4,Vi.pm()]:[3,6];case 5:e=u.sent(),u.label=6;case 6:return e?[2,!0]:(s=!i&&t.fairplay)?[4,Vi.wm()]:[3,8];case 7:s=u.sent(),u.label=8;case 8:return s?[2,!0]:[2,!1]}})})()}var W_=function(t){return t.zm="Widevine",t.pH="PlayreadyV2",t.mH="PlayreadyV3",t.qm="PlayreadyV2",t.jm="Fairplay",t}({}),z_={Widevine:{DRMProvider:"Google",DRMVersion:"1.4.8.86",DRMType:"Widevine"},PlayreadyV2:{DRMProvider:"Microsoft",DRMVersion:"2.9",DRMType:"Playready"},PlayreadyV3:{DRMProvider:"Microsoft",DRMVersion:"3",DRMType:"Playready"},Fairplay:{DRMProvider:"Apple",DRMType:"FairPlay",DRMVersion:"1.0"}};function q_(t,i){var n,r,e,s,u=z_[i],o=t.accountName;return{CustomerName:t.customerName,AccountName:o,PortalId:t.portalId,FriendlyName:t.friendlyName,DeviceInfo:{FormatVersion:"1",DeviceType:"PC",OSType:null==(n=Vi.Em)?void 0:n.Zs,OSVersion:null==(r=Vi.Em)?void 0:r.Lm,DRMProvider:u.DRMProvider,DRMVersion:u.DRMVersion,DRMType:u.DRMType,DeviceVendor:null==(e=Vi.Em)?void 0:e.Om,DeviceModel:null==(s=Vi.Em)?void 0:s.Fm}}}function X_(t,i){if(!t.accountName)throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, accountName is not set.");if(!t.customerName)throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, customerName is not set.");if(!t.portalId)throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, portalId is not set.");throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration.")}function G_(t,i,n){var r;if(B_(t))r={AuthToken:t.authToken,Payload:i};else{if(!O_(t))throw X_(t,n);r={LatensRegistration:q_(t,n),Payload:i}}return Wa(JSON.stringify(r))}function Q_(t,i,n){return jt(function(){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(!(r=t.uE))throw new lw(pd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium server request",t,i);e=r,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,e.VT(n)];case 2:return s=o.sent(),u=function(t){if(t){if(t.WvProxyErr)return t.WvProxyErr.desc;if(t.DrmErr)return t.DrmErr.desc}return}(s),[3,4];case 3:return o.sent(),u="",[3,4];case 4:throw new lw(pd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium server request",t,e.vk.Yu,e.dk,e.gk,u)}})})()}V(),It(),Wt(),Yt();var Y_=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,qd.BT)||this).yH=void 0,e}Pt(i,t);var n=i.prototype;return n.sH=function(t,i,n){return Q_(t,i,n)},n.$V=function(t){return this.yH?kr(this.yH.Yy,t):(this.yH=new Xa,ot.resolve())},n.aH=function(t,i){return jt(function(){var i,n;return zt(this,function(r){if(!(i=this.lH))throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium Widevine DRM configuration.");return n=Ih(t),[2,G_(i,n,W_.zm)]})}).call(this)},n.uH=function(t){if(!t.license)throw new lw(pd.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Titanium Widevine license server");return Th(t.license)},n.bH=function(t){return ot.resolve(new I(t))},n._H=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return this.AH(),[4,this.aH(t,i)];case 1:return n=e.sent(),[4,this.iH(n,qd.NT,El.Ck,i)];case 2:return r=e.sent(),[4,this.bH(r)];case 3:return[2,e.sent()]}})}).call(this)},n.gH=function(i,n){var r=this;return jt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,t.prototype.gH.call(r,i,n)];case 1:return e=s.sent(),this.AH(),[2,e]}})}).call(this)},n.AH=function(){this.yH||(this.yH=new Xa),this.yH.Qy()},n.kn=function(){this.yH&&this.yH.Zg(),t.prototype.kn.call(this)},i.wH=function(){return Vi.Zs.yp?"required":"optional"},i}(w_);V(),It(),Wt(),Bt(),Dt(),Yt();var $_=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,qd.NT)||this).jV("https://widevine-proxy.drm.technology/proxy"),e}return Pt(i,t),i.prototype.aH=function(t,i){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return[4,l_(t)];case 1:if(i=s.sent(),n=this.fH,r=Ca(new I(i)),void 0===(e=this.SH))throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The Widevine vuDRM token has not been correctly configured.");return[2,JSON.stringify({token:e,drm_info:r,kid:n})]}})}).call(this)},xt(i,[{key:"SH",get:function(){if(M_(this.lH))return this.lH.token}}]),i}(w_);function K_(t,i){var n=i||{};return t.ticket&&t.sessionId&&(n=io({},n,{SessionId:t.sessionId,Ticket:t.ticket})),io({},n,{CrmId:t.crmId,AccountId:t.accountId,ContentId:t.contentId})}V(),It(),Dt(),V(),It();var J_=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,qd.NT)||this).jV("https://emeademo.dev.ott.irdeto.com/Widevine/getlicense"),e}return Pt(i,t),i.prototype.rH=function(i,n){var r=i;return D_(this.lH)&&(r=K_(this.lH,r)),t.prototype.rH.call(this,r,n)},i}(w_);V(),It(),Dt(),V(),It();var Z_="Conax-Custom-Data";function tk(t,i,n){var r=t&&P_(t)&&t;if(r&&!n.has(Z_)){var e=__(r)?r.token:void 0,s=__(r)?r.deviceId:void 0,u=JSON.stringify({Version:"1.0.0",CxAuthenticationDataToken:e,CxClientInfo:{DeviceType:"Browser",DrmClientType:i+"-HTML5",DrmClientVersion:"1.0.0",CxDeviceId:s}});n.set(Z_,u)}return n}var ik=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,qd.NT)||this).jV("https://connect.conax.com:8094/license"),e}return Pt(i,t),i.prototype.nH=function(){var i=t.prototype.nH.call(this);return tk(this.lH,"Widevine",i)},i}(w_);function nk(t){var i=va(new I(t));return Th(JSON.parse(i).license)}function rk(t){return"string"==typeof t.token?t.token:Wa(JSON.stringify({userId:t.userId,sessionId:t.sessionId,merchant:t.merchant}))}function ek(t,i,n){var r;return r=n.token?"x-dt-auth-token":"dt-custom-data",t.set(r,i),t}V(),It(),Bt(),Dt(),V(),It();var sk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r,qd.NT)||this).jV("https://lic.drmtoday.com/license-proxy-widevine/cenc/"),e}Pt(i,t);var n=i.prototype;return n.uH=function(t){return nk(t)},n.nH=function(){return ek(t.prototype.nH.call(this),this.SH,this.lH)},xt(i,[{key:"SH",get:function(){return rk(this.lH)}}]),i}(w_);V(),It(),Dt();var uk=function(t){function i(i,n,r){return t.call(this,i,n,r,qd.NT)||this}return Pt(i,t),i.prototype.nH=function(){var i=t.prototype.nH.call(this),n=this.lH.token;return i.set("Authorization","Bearer "+n),i},i}(w_);function ok(t,i,n,r){return jt(function(){var e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:if(!L_(t))throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Xstream DRM Configuration");return(e=new Xd).append("Cache-Control","no-cache"),e.append("Content-Type","application/json"),(s=t.sessionId)&&e.append("XSSESSION",s),u=t.streamId,o=t.fairplay?"persistent"===t.fairplay.licenseType?"persistent":"non-persistent":t.widevine&&"persistent"===t.widevine.licenseType?"persistent":"non-persistent",h={drmType:i,licenseType:o,streamId:u},a={Yu:t.ticketAcquisitionURL,fk:qd.BT,_k:e,Hk:Tl.POST,XT:JSON.stringify(h),Yg:r},[4,n.vk(a)];case 1:return[4,c.sent().VT()];case 2:return[2,c.sent()]}})})()}V(),It(),Wt(),Dt(),Yt(),V(),It(),Wt(),Yt();var hk=function(t){function i(i,n,r){return t.call(this,i,n,r,qd.BT)||this}Pt(i,t);var n=i.prototype;return n.nH=function(){var i=t.prototype.nH.call(this);return i.set("Content-Type","application/json"),i},n.aH=function(i,n){var r=this;return jt(function(){var e,s,u;return zt(this,function(o){switch(o.label){case 0:return e=Ha(i.buffer),[4,ok(this.lH,"widevine_modular",this.Dx,n)];case 1:return s=o.sent(),this.jV(s.licenseServerUrl),u=da(JSON.stringify({payload:e,ticket:s.ticket})),[2,t.prototype.aH.call(r,u,n)]}})}).call(this)},n.uH=function(t){return Th(t.license)},i}(w_);V(),It(),Dt();var ak=function(t){function i(i,n,r){return t.call(this,i,n,r,qd.NT)||this}return Pt(i,t),i.prototype.nH=function(){if(!F_(this.lH))throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");var i=t.prototype.nH.call(this);return i.set("X-AxDRM-Message",this.lH.token),i},i}(w_);function ck(t){for(var i=new I(2*t.length),n=0;n=1&&t[0].KE.length>0},n.tH=function(i){var n=this.lH.playready.customData;if(n){var r=ck(n),e=ck(''+Ih(r)+"");return ot.resolve({playready:{GS:e}})}return t.prototype.tH.call(this,i)},n.aH=function(t,i){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,l_(t)];case 1:return i=n.sent(),[2,this.EH(i)]}})}).call(this)},n.EH=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a,c,f,v,d,l,g,w,m;return zt(this,function(p){r=null,e=new DataView(t),s=aa(e,new Pa,!0);try{u=Vi.HE(s)}catch(t){return[2,r]}for(o=null==(i=u.ZE("PlayReadyKeyMessage")[0])?void 0:i.ZE("LicenseAcquisition")[0],a=null!=(h=null==o?void 0:o.ZE("Challenge"))?h:[],this.kH(a)&&(r=ja(a[0].hx)),c=new Xd,v=null!=(f=null==o||null==(n=o.ZE("HttpHeaders")[0])?void 0:n.ZE("HttpHeader"))?f:[],d=Ft(v);!(l=d()).done;)g=l.value,w=g.ZE("name")[0].hx,m=g.ZE("value")[0].hx,c.append(w,m);return this.TH=c,[2,r]})}).call(this)},n._H=function(t,i){return ot.resolve(t)},n.gH=function(i,n){return t.prototype.cH.call(this,i,El.Rk,n)},i}(d_);V(),It(),Wt(),Dt(),Yt(),V(),It(),Bt();var vk=function(){function t(i){this.IH=void 0,this.XA=void 0,this.IH=i,this.XA=t.xH(i)}return t.prototype.PH=function(){var t={};if(this.XA===W_.mH){var i={LatensRegistration:q_(this.IH,W_.mH)};t["X-TITANIUM-DRM-CDATA"]=Wa(JSON.stringify(i))}return t},t.xH=function(t){return"3"===t.version?W_.mH:W_.pH},xt(t,[{key:"CH",get:function(){return this.XA}},{key:"FS",get:function(){return this.XA===W_.pH}}]),t}();var dk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).RH=void 0,e.RH=new vk(e.lH),e}Pt(i,t);var n=i.prototype;return n.tH=function(t){var i=this.lH;if(!this.lH)throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium PlayReady DRM configuration.");if(O_(i)){var n={};return n.playready={GS:lk(i,this.RH.CH)},ot.resolve(n)}return ot.reject(X_(i,W_.qm))},n.nH=function(){var i=new Xd(this.RH.PH());return i.UT(t.prototype.nH.call(this)),i},n.sH=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:if(!(r=t.uE))throw new lw(pd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium PlayReady license request",t,i);f.label=1;case 1:return f.trys.push([1,3,,4]),[4,r.qT(n)];case 2:return u=f.sent(),o=va(new I(u)),(h=Vi.HE(o))&&(a=function(t,i){return function(t,i){for(var n=t.m.slice(),r=[];n.length>0;){var e,s=n.shift();i(s)?r.push(s):(e=n).push.apply(e,[].concat(s.m))}return r}(t,function(t){return t.$E===i})}(h,"CustomData"),a.length>0&&(e=JSON.parse(a[0].hx),s=null==(c=e.DrmErr)?void 0:c.desc)),[3,4];case 3:return f.sent(),[3,4];case 4:throw new lw(pd.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium PlayReady license request",t,i,r.dk,r.gk,s)}})})()},n.kH=function(t){if(1!==t.length)throw new lw(pd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"PlayReady license message incorrectly formatted, Challenge not found.");return!0},i}(fk);function lk(t,i){var n=q_(t,i),r=n.DeviceInfo.FormatVersion,e=function(t){return t.replace(/</g,"<").replace(/>/g,">")}(function(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}(""+Wa(''+n.AccountName+""+n.CustomerName+""+n.PortalId+''+n.DeviceInfo.DeviceType+""+n.DeviceInfo.OSType+""+n.DeviceInfo.OSVersion+""+n.DeviceInfo.DRMProvider+""+n.DeviceInfo.DRMVersion+""+n.DeviceInfo.DRMType+""+n.DeviceInfo.DeviceVendor+""+n.DeviceInfo.DeviceModel+"")+"")),s=ga(e,!0);return ga(''+Ih(s)+"",!0)}V(),It(),Bt(),Dt();var gk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).jV("https://playready-license.drm.technology/rightsmanager.asmx"),e}Pt(i,t);var n=i.prototype;return n.kH=function(t){if(1!==t.length)throw new lw(pd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Vudrm PlayReady license message incorrectly formatted, Challenge not found.");return!0},n.rH=function(i,n){var r=io({},i||{},{token:this.SH});return t.prototype.rH.call(this,r,n)},xt(i,[{key:"SH",get:function(){if(M_(this.lH))return this.lH.token}}]),i}(fk);V(),It(),Dt();var wk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).jV("https://emeademo.dev.ott.irdeto.com/playready/rightsmanager.asmx"),e}return Pt(i,t),i.prototype.rH=function(i,n){var r=i;return D_(this.lH)&&(r=K_(this.lH,r)),t.prototype.rH.call(this,r,n)},i}(fk);V(),It(),Dt();var mk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).jV("https://connect.conax.com:8010/cxplayready/rightsmanager.asmx"),e}return Pt(i,t),i.prototype.nH=function(){var i=t.prototype.nH.call(this);return tk(this.lH,"PlayReady",i)},i}(fk);V(),It(),Bt(),Dt();var pk=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).jV("https://lic.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx"),e}Pt(i,t);var n=i.prototype;return n.uH=function(i){var n=function(t){var i=va(new I(t));return zo(i,"=0)return ot.resolve(t.substr(i+1));var n=t.split("skd://").pop();if(n){if(/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/.test(n))return ot.resolve(n)}var r=t.split("/");return ot.resolve(r[r.length-1])},n.tH=function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return n=null!=(i=this.WH)?i:pa(new I(t)),[4,this.HH(n)];case 1:return r=s.sent(),this.UH=r,(e={}).fairplay={tT:r},[2,e]}})}).call(this)},n.nH=function(){var i=t.prototype.nH.call(this);return i.set("Content-Type",this.VH),i},n._H=function(t,i){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.KV?[2,this.KV]:[4,this.qH(i)];case 1:return[2,t.sent()]}})}).call(this)},n.gH=function(i,n){return t.prototype.cH.call(this,i,El.xk,n)},n.zH=function(t){var i=this.MH(),n=this.nH(),r={Yu:i,fk:qd.NT,_k:n,Hk:Tl.GET,Xk:!1,XT:null,Wk:0,Yg:t,Km:Sl.Tk,zk:El.Pk};return new Cl(r)},n.qH=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=this.zH(t),[4,this.Dx.vk(i)];case 1:return[4,r.sent().qT()];case 2:return n=r.sent(),[2,new I(n)]}})}).call(this)},n.uH=function(t){var i;if("string"==typeof t){var n=t.trim();""===n.substr(0,5)&&""===n.substr(-6)&&(n=n.slice(5,-6)),i=Th(n)}else i=new I(t);return i},n.rH=function(i,n){var r=t.prototype.rH.call(this,i,n);return zo(r,"skd:")&&(r=r.substr(4)),r},xt(i,[{key:"ZV",get:function(){return!0}},{key:"VH",get:function(){return kk.NH}}]),i}(d_);V(),It(),Wt(),Bt(),Dt(),Yt();var Ak=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,qd.NT)||this}Pt(i,t);var n=i.prototype;return n.HH=function(i){var n=i.split("://",1);return"skd"!==n[0].slice(-3).toLowerCase()?ot.resolve(""):(n=i.split(";",2)).length>1?ot.resolve(n[1]):ot.resolve(t.prototype.HH.call(this,i))},n.aH=function(t){return jt(function(){return zt(this,function(i){return[2,t]})})()},n.uH=function(t){return new I(t)},n.rH=function(i,n){var r=i||{};return r.p1=le(),t.prototype.rH.call(this,r,n)},xt(i,[{key:"VH",get:function(){return kk.BH}}]),i}(bk);V(),It(),Bt(),Dt();var Tk=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,qd.NT)||this).jV("https://fairplay-license.drm.technology/license"),s.OH("https://fairplay-license.drm.technology/certificate"),s}Pt(i,t);var n=i.prototype;return n.FH=function(t,i){var n={token:this.SH,contentId:i,payload:Ih(t)};return JSON.stringify(n)},n.uH=function(t){return new I(t)},n.nH=function(){var i=t.prototype.nH.call(this);return i.set("x-vudrm-token",this.SH),i},xt(i,[{key:"VH",get:function(){return kk.BT}},{key:"SH",get:function(){if(!M_(this.lH))throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Token is required for FairPlay VuDrm.");return this.lH.token}}]),i}(bk);V(),It(),Dt();var Sk="Verimatrix Fairplay license response incorrectly formatted. Invalid json.",Ek="Verimatrix Fairplay license response incorrectly formatted. Ckc not found.",Ik=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,qd.NT)||this}return Pt(i,t),i.prototype.uH=function(i){var n=function(t){var i;try{i=JSON.parse(t).ckc}catch(t){throw new lw(pd.CONTENT_PROTECTION_LICENSE_INVALID,Sk)}if(!i)throw new lw(pd.CONTENT_PROTECTION_LICENSE_ERROR,Ek);return i}(va(new DataView(i)));return t.prototype.uH.call(this,n)},i}(bk);V(),It(),Wt(),Bt(),Dt(),Yt();var Rk=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,qd.BT)||this}Pt(i,t);var n=i.prototype;return n.aH=function(t){return jt(function(){var i,n;return zt(this,function(r){if(!(i=this.lH))throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium Fairplay DRM configuration.");return n=Ih(t),[2,G_(i,n,W_.jm)]})}).call(this)},n.uH=function(t){try{var i;if(qi(t)){var n=t.trim();i=JSON.parse(n)}else i=t;if(i.license){var r=ja(i.license);return new I(r)}throw new lw(pd.CONTENT_PROTECTION_LICENSE_ERROR,"No license received from the Titanium Fairplay license server")}catch(t){throw new lw(pd.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Titanium Fairplay license server")}},n.sH=function(t,i,n){return Q_(t,i,n)},xt(i,[{key:"VH",get:function(){return kk.BT}}]),i}(bk);V(),It(),Wt(),Bt(),Dt(),Yt();var Ck=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,qd.NT)||this).jV("https://emeademo.dev.ott.irdeto.com/streaming/getckc"),s.OH("https://emeademo.dev.ott.irdeto.com/streaming/getcertificate"),s}Pt(i,t);var n=i.prototype;return n.MH=function(){var i=t.prototype.MH.call(this);if(!i)return i;var n=Vi.Dh(i),r=this.lH;return D_(r)&&xl(n,{accountId:r.accountId,applicationId:r.applicationId||""}),n.href},n.HH=function(i){return D_(this.lH)?ot.resolve(this.lH.contentId):t.prototype.HH.call(this,i)},n.aH=function(t){return jt(function(){return zt(this,function(i){return[2,t]})})()},n.uH=function(t){return new I(t)},n.rH=function(i,n){var r=i;return D_(this.lH)&&(r=function(t,i){return io({},K_(t,i),{KeyId:t.keyId})}(this.lH,r)),t.prototype.rH.call(this,r,n)},xt(i,[{key:"VH",get:function(){return kk.BH}}]),i}(bk);V(),It(),Wt(),Dt(),Yt();var Pk=function(t){function i(i,n,r,e){var s;if(s=t.call(this,i,n,r,e,qd.LT)||this,!P_(n))throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Conax configuration");return s.jV("https://connect.conax.com:8097/license"),s}Pt(i,t);var n=i.prototype;return n.nH=function(){var i=t.prototype.nH.call(this);return tk(this.lH,"FairPlay",i)},n.qH=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return i=this.MH(),n={Yu:i,fk:qd.NT,_k:{},Hk:Tl.GET,Xk:!1,XT:null,Wk:0,Yg:t,Km:Sl.Tk,zk:El.Pk},[4,this.Dx.vk(n)];case 1:return[4,e.sent().qT()];case 2:return r=e.sent(),[2,new I(r)]}})}).call(this)},n.aH=function(t){return jt(function(){return zt(this,function(i){return[2,t]})})()},n.HH=function(t){var i,n=t.indexOf("?");return 0===t.indexOf("skd://")?(i=n>=0?t.substring(6,n):t.substring(6),ot.resolve(function(t){return va(Th(t))}(i))):ot.resolve("unknown")},n.uH=function(t){try{var i=JSON.parse(t);return new I(ja(i.CkcMessage))}catch(t){throw new y("CFLRW-66")}},i}(bk);V(),It(),Dt();var Dk=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,qd.LT)||this).jV(T_[No.jm]),s}Pt(i,t);var n=i.prototype;return n.HH=function(t){return zo(t,"skd://")?ot.resolve(t.substring(6,40)):ot.reject(new lw(pd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Error while determining the KeyOS Content ID."))},n.FH=function(t,i){return"spc="+Ih(t)+"&assetId="+i},i}(bk);V(),It(),Bt(),Dt();var Nk=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,qd.LT)||this).jV("https://lic.drmtoday.com/license-server-fairplay/"),s}Pt(i,t);var n=i.prototype;return n.FH=function(t,i){var n="spc="+encodeURIComponent(Ih(t))+"&"+encodeURI(i);return"persistent"===this.YV.licenseType?n+"&offline=true":n},n.nH=function(){return ek(t.prototype.nH.call(this),this.SH,this.lH)},xt(i,[{key:"SH",get:function(){return rk(this.lH)}}]),i}(bk);V(),It(),Wt(),Bt(),Dt(),Yt();var xk=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,qd.NT)||this}Pt(i,t);var n=i.prototype;return n.HH=function(t){var i=t;return zo(i,"skd:")&&(i="http:"+i.substring(4)),zo(i,"http:")||zo(i,"https:")?ot.resolve(Vi.Dh(i).hostname):ot.reject(new y("Could not parse ExpressPlay FairPlay content ID."))},n.aH=function(t){return jt(function(){return zt(this,function(i){return[2,t]})})()},n.uH=function(t){return new I(t)},xt(i,[{key:"VH",get:function(){return kk.BH}}]),i}(bk);V(),It(),Dt();var Bk=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,qd.LT)||this}return Pt(i,t),i.prototype.nH=function(){var i=t.prototype.nH.call(this),n=this.lH.token;return i.set("Authorization","Bearer "+n),i},i}(bk);V(),It(),Wt(),Bt(),Dt(),Yt();var Ok=function(t){function i(i,n,r,e){var s;if(s=t.call(this,i,n,r,e,qd.BT)||this,!L_(n))throw new y("Invalid Xstream DRM configuration");return s}Pt(i,t);var n=i.prototype;return n.qH=function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return i=this.MH(),n=this.nH(),r={Yu:i,fk:qd.BT,_k:n,Hk:Tl.POST,Yg:t,Km:Sl.Tk,zk:El.Pk},[4,this.Dx.vk(r)];case 1:return[4,s.sent().VT()];case 2:return e=s.sent(),[2,new I(Th(e.certificate))]}})}).call(this)},n.gH=function(){return jt(function(t,i,n){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return void 0===n&&(n=qd.LT),r=Ih(t),[4,ok(this.lH,"fairplay",this.Dx,i)];case 1:return e=o.sent(),s=da(JSON.stringify({spc:r,ticket:e.ticket})),u={Yu:this.JV(),fk:qd.BT,_k:this.nH(),Hk:Tl.POST,XT:s,Wk:0,Yg:i,Km:Sl.Tk,zk:El.xk},[4,this.Dx.vk(u)];case 2:return[4,o.sent().VT()];case 3:return[2,Th(o.sent().licence)]}})}).apply(this,arguments)},xt(i,[{key:"VH",get:function(){return kk.BT}}]),i}(bk);V(),It(),Dt();var Mk=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,qd.LT)||this}Pt(i,t);var n=i.prototype;return n.FH=function(t,i){return Ih(t)},n.uH=function(i){if(0===i.length)throw new lw(pd.CONTENT_PROTECTION_LICENSE_ERROR,"Vimond license request error.");return t.prototype.uH.call(this,i)},n.nH=function(){var i=t.prototype.nH.call(this);return i.set("Content-Type","text/plain"),i},i}(bk);V(),It(),Bt(),Dt();var Lk=function(t){function i(i,n,r,e){return t.call(this,i,n,r,e,qd.NT)||this}Pt(i,t);var n=i.prototype;return n.FH=function(t,i){return t},n.uH=function(t){return new I(t)},n.nH=function(){if(!F_(this.lH))throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");var i=t.prototype.nH.call(this);return i.set("X-AxDRM-Message",this.lH.token),i},xt(i,[{key:"VH",get:function(){return kk.BT}}]),i}(bk);V(),It(),Bt(),Dt();var Fk=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,qd.BT)||this).XH=void 0,s}Pt(i,t);var n=i.prototype;return n.FH=function(t,i){var n={spc:Ih(t)};return JSON.stringify(n)},n.HH=function(t){var i=Vi.Dh(t);return this.XH=t,i.searchParams.has("b")?ot.resolve(i.searchParams.get("b")):ot.reject(new lw(pd.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Error during license server request: Could not extract content id"))},n.rH=function(i,n){var r=this.JV();return!r&&this.XH&&(r=this.XH),r&&(r=r.replace("skd://","https://")),t.prototype.rH.call(this,i,n||r)},n.uH=function(t){try{var i;if((i=qi(t)?JSON.parse(t.trim()):t).ckc)return Th(i.ckc)}catch(t){throw new lw(pd.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Uplynk Fairplay license server")}throw new lw(pd.CONTENT_PROTECTION_LICENSE_ERROR,"No license received from the Uplynk Fairplay license server")},xt(i,[{key:"VH",get:function(){return kk.LT}}]),i}(bk);V(),It(),Wt(),Dt(),Yt(),V(),It(),Wt(),Yt(),V(),It(),Ut();var Uk=function(){function t(t,i){this.QH=void 0,this.YH=void 0,this.QH=t,this.YH=i}var i=t.prototype;return i.jH=function(t){return this.QH(t)},i.KH=function(t,i){throw new _(i+" must be "+this.YH+". (Received: "+t+")")},t}(),Vk=(new Uk(function(t){return!0},"any"),new Uk(Yi,"a number")),jk=new Uk(qi,"a string"),Hk=new Uk(Xi,"a boolean"),Wk=(new Uk(Qi,"a date"),new Uk(Ui,"undefined")),zk=new Uk(Wi,"an object"),qk=new Uk(function(t){return null===t},"null");new Uk(function(t){return null==t},"null or undefined");function Xk(t,i){throw new _(i+" has an incorrect type")}var Gk=function(){function t(t){this.Qp=void 0,this.Qp=t}var i=t.prototype;return i.jH=function(t){if(!Wi(t))return!1;for(var i,n=Ft(b.keys(this.Qp));!(i=n()).done;){var r=i.value;if(!this.Qp[r].jH(t[r]))return!1}return!0},i.KH=function(t,i){if(!Wi(t))throw new _(i+" must be an object.");for(var n,r=Ft(b.keys(this.Qp));!(n=r()).done;){var e=n.value,s=this.Qp[e];if(!s.jH(t[e]))return s.KH(t[e],i+"."+String(e))}throw new _},t}();function Qk(t){return new Gk(t)}function Yk(t){return b.keys(t).map(function(i){return t[i]})}var $k=function(){function t(t){this.JH=void 0,this.JH=t}var i=t.prototype;return i.jH=function(t){return Jn(this.JH,t)},i.KH=function(t,i){return Xk(0,i)},t}();function Kk(t){return new $k(t)}var Jk=function(){function t(t){this.ZH=void 0,this.ZH=t}var i=t.prototype;return i.jH=function(t){return this.ZH.some(function(i){return i.jH(t)})},i.KH=function(t,i){return Xk(0,i)},t}();function Zk(){for(var t=arguments.length,i=new Array(t),n=0;n36e5},i.vW=function(t){this._W=t,this.gW()},i.pW=function(){var t;return null!=this._W||(this._W=null!=(t=this.fW())?t:Db),this._W},t}();Nb.Bg=new Nb,V(),It();var xb=function(t){return t[t.mW=0]="mW",t[t.wW=1]="wW",t[t.yW=2]="yW",t[t.bW=3]="bW",t[t.AW=4]="AW",t[t.TW=5]="TW",t[t._C=6]="_C",t[t.kW=7]="kW",t[t.EW=8]="EW",t[t.wC=9]="wC",t[t.xW=10]="xW",t[t.yC=11]="yC",t[t.PW=12]="PW",t}({});V(),It(),Bt();var Bb=function(){function t(){}return t.prototype.DW=function(t){},xt(t,[{key:"IW",get:function(){return 0}},{key:"RW",get:function(){return 0}}]),t}();V(),It(),Dt(),V(),It(),Dt();var Ob=function(t){function i(i){var n;return(n=t.call(this,"contentProtectionsTracked")||this).NW=void 0,n.NW=i,n}return Pt(i,t),i}(ah),Mb=function(t){function i(i,n){var r;return void 0===n&&(n=new Rb),(r=t.call(this)||this).aV=void 0,r.MW=void 0,r.IH=void 0,r.aV=i,r.MW=n,r}Pt(i,t);var n=i.prototype;return n.BW=function(t){this.IH=t},n.wH=function(t){var i=this.IH;if(void 0!==i)return this.MW.wH(t,i)},n.FS=function(t){var i=this.IH;return void 0!==i&&this.MW.FS(t,i)},n.LW=function(t){var i={xS:t.xS,OW:t.OW||[],FW:t.FW,GH:t.GH,UW:t.UW||[]},n=this.MW.sW(i,this.IH||{},t.fH,this.aV);return i.FW&&n.jV(i.FW),new Lb(n)},n.VW=function(t){t&&(Wn(t,function(t){return void 0!==t.fH})&&this.So(new Ob(t)))},i}(uh),Lb=function(){function t(t){this.WW=void 0,this.WW=t}var i=t.prototype;return i.$V=function(t){return this.WW.$V(t)},i.tH=function(t,i,n){return this.WW.tH(i,n)},i.ZV=function(){return this.WW.ZV||void 0!==this.WW.KV},i._H=function(t,i){return this.WW._H(t,i)},i.gH=function(t,i,n){return i&&this.WW.jV(i),this.WW.gH(t,n)},i.zg=function(){this.WW.kn()},t}();V(),It(),Dt(),Ut();var Fb=function(t){function i(i){var n;(n=t.call(this)||this).zW=[],n.KW=function(t){n.tt(t.Ht)},n.fV=function(t){var i=t.Ht;n.QW(i)||n.it(i)};for(var r,e=Ft(i);!(r=e()).done;){var s=r.value;n.qW(s)}return n}Pt(i,t);var n=i.prototype;return n.qW=function(t){this.zW.push(t);for(var i,n=Ft(t.NI);!(i=n()).done;){var r=i.value;this.tt(r)}this.GW(t)},n.XW=function(t){Yn(this.zW,t),this.jW(t);for(var i,n=Ft(t.NI);!(i=n()).done;){var r=i.value;this.QW(r)||this.it(r)}},n.QW=function(t){for(var i,n=Ft(this.zW);!(i=n()).done;){if(i.value.LI(t))return!0}return!1},n.GW=function(t){t.wn(xg.rI,this.KW),t.wn(xg.oI,this.fV)},n.jW=function(t){t.mn(xg.rI,this.KW),t.mn(xg.oI,this.fV)},n.kn=function(){for(;this.zW.length>0;)this.XW(this.zW[0]);t.prototype.kn.call(this)},n.xa=function(){return ey(this)},i}(Ug);V(),It(),Bt(),V(),It();var Ub,Vb={forceSeekOffset:0,maximumOffset:0,maximumPlaybackRate:0,minimumOffset:0,minimumPlaybackRate:0,targetOffset:0},jb=function(){function t(){this.hu=void 0,this.JW=void 0,this.We=void 0}var i=t.prototype;return i.Ea=function(t){this.JW=t,void 0!==this.We&&(this.JW.Rt=this.We)},i.hr=function(){this.JW=void 0,this.We=void 0},xt(t,[{key:"Ca",get:function(){return null!=this.hu||(this.hu=function(t){return{get enabled(){return t.Rt},set enabled(i){t.Rt=$g(i)},get monitoringLivePlayback(){return t.YW},get currentLatency(){return t.OL},get currentConfiguration(){return function(t){if(void 0!==t)return{get minimumOffset(){return t.minimumOffset},get maximumOffset(){return t.maximumOffset},get targetOffset(){return t.targetOffset},get forceSeekOffset(){return t.forceSeekOffset},get minimumPlaybackRate(){return t.minimumPlaybackRate},get maximumPlaybackRate(){return t.maximumPlaybackRate}}}(t.Cd)}}}(this)),this.hu}},{key:"Rt",get:function(){var t,i;return null!=(i=this.We)?i:Boolean(null==(t=this.JW)?void 0:t.Rt)},set:function(t){this.We=t,this.JW&&(this.JW.Rt=t)}},{key:"YW",get:function(){var t,i;return null!=(i=null==(t=this.JW)?void 0:t.oL)&&i}},{key:"OL",get:function(){var t;return null==(t=this.JW)?void 0:t.LL}},{key:"Cd",get:function(){return this.JW?this.JW.aL:Vb}}]),t}();var Hb=Boolean(f&&f.TextTrack),Wb=function(t){function i(i,n,r,e,s,u,o,h){var a;return void 0===o&&(o=new Rb),void 0===h&&(h=Fd()),(a=t.call(this)||this).Nq=void 0,a.PL=void 0,a.aq=void 0,a.tO=void 0,a.sO=void 0,a.Gl=void 0,a.kq=void 0,a.Ac=void 0,a.nq=void 0,a.rq=void 0,a.oq=void 0,a.Cq=void 0,a.xq=void 0,a.Aq=void 0,a.aV=void 0,a.hw=void 0,a.pq=void 0,a.tq=void 0,a.lq=new Bb,a.cq=new jb,a.Oq=function(t){var i=t.lt,n=i.code,r=new _d(kw(n),"Something went wrong during native playback.",i),e=new ww(n,r.message,i.message);a.Qq(r,e)},a.Nc=function(){a.So(new Rg(a.zx,a.Vx))},a.Kq=function(){Oi.X_&&a.ct===1/0&&a.Xx(1/0)},a.Mq=function(t){a.lP||(a.tq=void 0),a.So(t)},a.NL=function(t){a.tq=void 0},a.Uq=function(){a.So(new Uw(a.sP))},a.Lq=function(){a.MP>0&&a.DP>0&&a.So(new My)},a.Wq=function(t){var i=a.PL.hq.audioTracks;if(i)for(var n=0;n0?t:null!=i?i:[]}function BA(t,i){if(void 0!==i)switch(t){case vw.Mk:return i.preferredVideoCodecs;case vw.Bk:return i.preferredAudioCodecs;default:return}}V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),Bt(),Dt(),V(),It();var OA=!1;function MA(t,i,n){return n?t<=i:t>1,this.CM=t,this.DM=i||function(t){for(var i=new Array(2*t),n=0,r=0;n=this.V)throw new y("The index provided ("+t+") is greater than the maximum bound ("+this.V+")")},i.LM=function(t){if(0===this.V)return 0;if(this.Cr(t))return t;if(t<=this.Tn(0))return this.Tn(0);if(t>=this.An(this.V-1))return this.An(this.V-1);for(var i=0,n=1/0,r=0;rf||(s===c&&(o=v=o||v),u===f&&(h=d=h||d),MA(c,u+i,h||v)?(u=f,h=d):(r.push(s,u),e.push(o,h),s=c,u=f,o=v,h=d))}return r.push(s,u),e.push(o,h),new t(r,e).FM()},i.FM=function(){for(var i=[],n=[],r=0;r=0},i.GM=function(t,i,n,r,e){return this.XM(t,i,n,r,e)>=0},i.jM=function(t,i,n,r,e){return this.QM(t,i,n,r,e)>=0},i.KM=function(t){if(t.V!==this.V)return!1;for(var i=0;i=0;r-=1)if(MA(this.Tn(r),n,this.RM(r)))return r;return-1},i.ZM=function(t,i){void 0===i&&(i=0);for(var n=t-i,r=0;rn)return r;return-1},i.tL=function(i){return this.BM(i),new t([this.Tn(i),this.An(i)],[this.RM(i),this.NM(i)])},i.iL=function(t,i){var n=this.zM(t,i);return n<0?void 0:this.tL(n)},t.jn=function(i){for(var n=[],r=0;re.uL.forceSeekOffset)return e.So(new ah("latencyrecoveryseek")),void e.dC();var n=e.uL,r=n.minimumOffset,s=n.targetOffset,u=n.maximumOffset,o=e.PL.vP;if(!e.UL(i,r,u))if(i>u&&e.VL()){var h=e.uL.maximumPlaybackRate;OA,e.RL(h)}else if(i1&&is){OA,e.RL(1)}}},e.oa=i,e.PL=n,e.pL=r,e.SL=r.targetOffset,e.TL=r.targetOffset+(null!=(s=r.leniency)?s:0),e.mL=r.targetOffset,e.uL=e.vL(),e.oa.wn(Fy.xM,e.DL),e.oa.wn(Fy.PM,e.NL),e}Pt(i,t);var n=i.prototype;return n.cL=function(t){this.dL.push(t),this.lL()},n.fL=function(t){Yn(this.dL,t),this.lL()},n.lL=function(){this.uL=this.vL(),this.ho&&this._L()},n.vL=function(){var t=this.gL,i=function(t,i){var n=i-t.targetOffset;return{minimumOffset:t.minimumOffset+n,targetOffset:t.targetOffset+n,maximumOffset:t.maximumOffset+n,forceSeekOffset:t.forceSeekOffset+n,minimumPlaybackRate:t.minimumPlaybackRate,maximumPlaybackRate:t.maximumPlaybackRate,leniency:t.leniency}}(this.pL,this.mL),n=[].concat([i],this.dL),r=n.reduce(function(t,i){var n;return A.max(t,null!=(n=null==i?void 0:i.minimumOffset)?n:0)},t),e=n.reduce(function(t,i){var n;return A.max(t,null!=(n=null==i?void 0:i.targetOffset)?n:0)},r+HA),s=n.reduce(function(t,i){var n;return A.max(t,null!=(n=null==i?void 0:i.maximumOffset)?n:0)},e+HA);return{minimumOffset:r,targetOffset:e,maximumOffset:s,forceSeekOffset:n.reduce(function(t,i){var n;return A.max(t,null!=(n=null==i?void 0:i.forceSeekOffset)?n:0)},s+HA),minimumPlaybackRate:n.reduce(function(t,i){var n;return A.min(t,null!=(n=i.minimumPlaybackRate)?n:VA)},VA),maximumPlaybackRate:n.reduce(function(t,i){var n;return A.max(t,null!=(n=i.maximumPlaybackRate)?n:jA)},jA)}},n.wL=function(){var t,i=null==(t=LA.jn(this.oa.Fx).iL(this.oa.zx))?void 0:t.An(0),n=void 0!==i?i-this.oa.zx:0;this.yL=A.min(this.yL,n),this.bL+=1},n.AL=function(){if(!(this.bL<10)){var t=.25-this.yL,i=Cn(this.mL+t,this.mL-.1,this.mL+.1);this.mL=Cn(i,this.SL,this.TL),this.yL=1/0,this.bL=0}},n.kL=function(){var t=this;this.EL(),this._E=Vi.Og(function(){return t._L()},500)},n.EL=function(){void 0!==this._E&&(Vi.Lg(this._E),this._E=void 0)},n.Tn=function(){var t=this;this.We&&this.xL&&(this.ho||this.PL.wn(ch.py,this._L),this.IL=Vi.fm(function(){return t.wL()},1e3),this.CL=Vi.fm(function(){return t.AL()},6e4),this.kL(),this.ho=!0)},n.KP=function(){this.ho&&(this.EL(),this.IL&&Vi.vm(this.IL),this.CL&&Vi.vm(this.CL),this.PL.mn(ch.py,this._L),this.RL(1),this.ho=!1)},n.zg=function(){this.KP(),this.oa.mn(Fy.xM,this.DL),this.oa.mn(Fy.PM,this.NL),this.Vo()},n.RL=function(t){this.PL.ML.BL||this.oa.vP!==t&&(this.oa.vP=t)},xt(i,[{key:"oL",get:function(){return this.We&&this.ho}},{key:"aL",get:function(){return this.uL}},{key:"Rt",get:function(){return this.We},set:function(t){this.We=t,t?this.Tn():this.KP()}},{key:"LL",get:function(){return this.oa.OL}}]),i}(uh),zA=.66,qA=1.5,XA=3;function GA(t){if(Fi(t)){var i,n,r,e,s,u,o=Vi.Zs.mp?10:0,h=t.targetOffset;return{minimumOffset:null!=(i=t.minimumOffset)?i:h*zA,targetOffset:h,maximumOffset:null!=(n=t.maximumOffset)?n:h*qA,forceSeekOffset:A.max(null!=(r=t.forceSeekOffset)?r:h*XA,o),minimumPlaybackRate:null!=(e=t.minimumPlaybackRate)?e:VA,maximumPlaybackRate:null!=(s=t.maximumPlaybackRate)?s:jA,leniency:null!=(u=t.leniency)?u:void 0}}}var QA=function(t){return t.HL="auto",t.WL="always",t.qL="never",t.CLEAR_ONLY="clear-only",t.SAME_DRM_ONLY="same-drm-only",t}({}),YA=function(t){return t.UPLYNK="uplynk",t.MEDIATAILOR="mediatailor",t}({});function $A(t){if(!t||!qi(t))return"auto";switch(t){case"always":return"always";case"never":return"never";case"clear-only":return"clear-only";case"same-drm-only":return"same-drm-only";default:return"auto"}}V(),It(),V(),It();var KA=function(t){return t.ENABLED="enabled",t.INSECURE="insecure",t.DISABLED="disabled",t}({});V(),It();var JA=!1;V(),It();var ZA=function(t){return t.NONE="none",t.MIDROLL_AND_POSTROLL="midroll-and-postroll",t}({});function tT(t){var i=null==t?void 0:t.match(/\b(?:m3u8|mpd)\b/i);if(!i)return kA.pC;switch(i[0].toLowerCase()){case"mpd":return kA.vC;case"m3u8":return kA._C;default:return kA.pC}}function iT(t){switch(t){case _A.lC:case _A.fC:return t;default:return _A.Fk}}function nT(t){if(!t)return!1;var i=t.toLowerCase();return zo(i,kA.vC)}function rT(t){if(!t)return!1;var i=t.toLowerCase();return zo(i,kA._C)||zo(i,kA.gC)}function eT(t){return Wi(t)&&Wi(t.ssai)&&"google-dai"===t.ssai.integration}function sT(t){return Wi(t)&&"uplynk"===t.integration}function uT(t){return Wi(t)&&"theolive"===t.type}function oT(t){return Wi(t)&&"mediatailor"===t.integration}function hT(t){return Wi(t)&&"millicast"===t.type}function aT(t){if(qi(t))return!t;if(sT(t))return!t.id;if(eT(t)){var i=t.ssai,n="live"===i.availabilityType&&i.assetKey,r="vod"===i.availabilityType&&i.contentSourceID&&i.videoID;return Boolean(n&&r)}return hT(t)?!t.src||!t.streamAccountId:!t.src}function cT(t){return Boolean(Wi(t)&&qi(t.src))}function fT(t){return t.type===kA.mC||t.type===kA.wC}function vT(t){return qi(t)||cT(t)||eT(t)||sT(t)||hT(t)}function dT(t){if(t){if(vT(t))return aT(t);for(var i,n=Ft(t);!(i=n()).done;){if(!aT(i.value))return!1}return!0}return!0}function lT(){return{crossOrigin:_A.Fk,useCredentials:!1,liveOffset:void 0,timeServer:void 0,hlsDateRange:void 0,experimentalRendering:!1,nativeUiRendering:!1,lowLatency:!1,useNativePlayback:!1,useManagedMediaSource:!1,dash:void 0,hls:void 0,abr:void 0,lcevc:void 0,ignoreEmbeddedTextTrackTypes:[],seamlessSwitchStrategy:QA.HL,latencyConfiguration:void 0}}function gT(){return io({},lT(),{src:void 0,type:kA.pC,contentProtection:void 0,ssai:void 0,integrationData:void 0,isAdvertisement:void 0})}function wT(t){var i={allowedMimeTypes:void 0,preload:"midroll-and-postroll",showCountdown:!0,vpaidMode:KA.ENABLED,googleIma:{useNativeIma:!1,useAdUiElementForSsai:!0,bitrate:-1,language:void 0,uiElements:void 0,allowSeekingForGoogleDai:!1},theoads:JA,allowSkipAdBreak:!1};return void 0===t||(void 0!==t.preload&&(i.preload=function(t){return"none"===t?ZA.NONE:ZA.MIDROLL_AND_POSTROLL}(t.preload)),void 0!==t.showCountdown&&(i.showCountdown=$g(t.showCountdown)),void 0!==t.vpaidMode&&(i.vpaidMode=function(t){switch(t){case"insecure":return KA.INSECURE;case"disabled":return KA.DISABLED;default:return KA.ENABLED}}(t.vpaidMode)),ji(t.allowedMimeTypes)&&(i.allowedMimeTypes=t.allowedMimeTypes.filter(qi)),void 0!==t.googleIma&&(i.googleIma=function(t){return void 0===t?{useNativeIma:!1,useAdUiElementForSsai:!0,bitrate:-1,language:void 0,uiElements:void 0,allowSeekingForGoogleDai:!1}:{useNativeIma:$g(t.useNativeIma),useAdUiElementForSsai:null==(i=Kg(t.useAdUiElementForSsai))||i,bitrate:null!=(n=t.bitrate)?n:-1,language:Fi(t.language)?tw(t.language):void 0,uiElements:t.uiElements,allowSeekingForGoogleDai:$g(t.allowSeekingForGoogleDai)};var i,n}(t.googleIma)),void 0!==t.theoads?i.theoads=$g(t.theoads):i.theoads=JA,i.allowSkipAdBreak=$g(t.allowSkipAdBreak)),i}function mT(t){if(!Hi(t))return[];for(var i,n=[],r=Ft(t);!(i=r()).done;){var e=i.value;Wi(e)&&n.push(e)}return n}function pT(t){return qi(t.src)||hT(t)}function yT(t){return ji(t)?t.filter(Hw):[]}V(),It(),Dt();var _T=function(t){function i(i,n){var r;return void 0===n&&(n=jy.zL),(r=t.call(this,ch.Rw)||this).currentTime=void 0,r.readyState=void 0,r.currentTime=i,r.readyState=n,r}return Pt(i,t),i}(ah);V(),It(),Dt();var kT=function(t){function i(i){var n;return(n=t.call(this,ch.jw)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var bT=function(t){function i(i){var n;return(n=t.call(this,ch.uo)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var AT=function(t){function i(i){var n;return(n=t.call(this,ch.Cw)||this).duration=void 0,n.duration=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var TT=function(t){function i(i,n){var r;return(r=t.call(this,ch.Kw)||this).currentTime=void 0,r.playbackRate=void 0,r.currentTime=i,r.playbackRate=n,r}return Pt(i,t),i}(ah);V(),It(),Dt();var ST=function(t){function i(i){var n;return(n=t.call(this,ch.Nw)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var ET=function(t){function i(i){var n;return(n=t.call(this,ch.$w)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var IT=function(t){function i(i){var n;return(n=t.call(this,ch.Zw)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var RT=function(t){function i(i,n){var r;return(r=t.call(this,ch.wy)||this).currentTime=void 0,r.volume=void 0,r.currentTime=i,r.volume=n,r}return Pt(i,t),i}(ah);function CT(){return jt(function(t,i,n,r,e){var s,u,o;return zt(this,function(h){switch(h.label){case 0:void 0===n&&(n=3),void 0===r&&(r=1e3),void 0===e&&(e=1/0),s=0,h.label=1;case 1:0,h.label=2;case 2:return h.trys.push([2,4,,7]),[4,t(s,i)];case 3:return[2,h.sent()];case 4:return yr(u=h.sent()),sjy.zL&&y===jy.zL)&&t.So(new _T(v,y)),m&&!o?t.So(new kT(v)):!m&&o&&t.So(new bT(v)),y>=jy.Qn&&(r||a=jy.GL&&(r||a=jy.XL&&(r||a=jy.jL&&(r||a1)0;else if(0===i.length)throw y("Unknown ad integration: "+t.integration);return i[0]||null},i.Kz=function(t){this.Xz.push(t)},xt(t,[{key:"Gz",get:function(){return this.Xz}}]),t}();NS.Bg=new NS,V(),It(),Dt(),V(),It(),V(),It(),Dt(),V(),It(),Bt(),Dt();var xS=function(t){return t.PM="PLAYING",t.Yz="PAUSED",t.Jz="SEEK",t.Zz="STALLED",t.$z="FAILED",t.tG="INITIAL_BUFFERING",t.iG="NO_ACCESS",t}({}),BS=function(t){return t.eG="HTTP_REQUEST_STATUS_CODE_1XX",t.sG="HTTP_REQUEST_STATUS_CODE_2XX",t.nG="HTTP_REQUEST_STATUS_CODE_3XX",t.rG="HTTP_REQUEST_STATUS_CODE_4XX",t.hG="HTTP_REQUEST_STATUS_CODE_5XX",t.oG="BUFFER_LENGTH",t.aG="BYTES_RECEIVED",t.uG="SEGMENT_READ_BITRATE",t.cG="SEGMENT_PROFILE_BITRATE",t.dG="VIDEO_PROFILE_BITRATE",t.lG="NUMBER_OF_FRAMES_DROPPED",t.fG="PLAYBACK_POSITION",t.vG="NUMBER_OF_FRAMES_DECODED",t._G="PLAYBACK_DELTA_TO_ORIGIN",t.gG="STREAM_DELTA_TO_ORIGIN",t.pG="ORIGIN_TIMESTAMP",t}({}),OS=function(t){return t.mG="MANIFEST_URI",t.wG="ASSET_DURATION",t.yG="NUMBER_OF_CONTENT_PROFILES",t.bG="CDN",t.AG="CONTENT_TITLE",t.SG="SERVICE_NAME",t.TG="CONTENT_TYPE",t.kG="CONTENT_DESCRIPTION",t}({}),MS=function(t){return t.EG="shutdown_normal_shutdown",t}({}),LS=function(t){return t.xG="session/",t.IG="content/",t.CG="internalError/",t.DG="drmError/",t.NG="caError/",t.BG="networkError/",t}({}),FS=function(){function t(t,i){this.category=void 0,this.statusCode=void 0,this.category=t,this.statusCode=i}return xt(t,[{key:"code",get:function(){return this.category+this.statusCode}}]),t}(),US=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i}(uh);V(),It(),Dt(),V(),It(),V(),It();var VS=function(t){return t.PAUSE="MG",t.RESUME="OG",t}({}),jS=function(t){function i(){return t.call(this,"FG")||this}return Pt(i,t),i}(ah),HS=function(t){function i(i,n){var r;return(r=t.call(this)||this).oa=void 0,r.WG=void 0,r.VG=void 0,r.qG=void 0,r.zG=void 0,r.oa=i,r.WG=n,r.VG=!1,r.qG=function(){r.HG(),r.VG=!1},r.zG=function(){r.VG=!0},r.WG.wn(VS.PAUSE,r.qG),r.WG.wn(VS.RESUME,r.zG),r}Pt(i,t);var n=i.prototype;return n.UG=function(){this.VG=!0},n.HG=function(){},n.kn=function(){this.VG=!1,this.WG.mn(VS.PAUSE,this.qG),this.WG.mn(VS.RESUME,this.zG)},n.GG=function(){return isFinite(this.oa.Nd())},i}(uh),WS=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).tX=!1,i.aX=!1,i.uX=!1,i.QG=function(){i.aX&&!i.uX&&i.sX(xS.Zz)},i.YG=function(){i.oa.lP||(i.aX||i.hX(new FS(LS.IG,"firstFrameDisplayed"),"now"),i.aX=!0,i.sX(xS.PM))},i.KG=function(){i.oa.lP&&(i.aX=!0,i.sX(xS.Yz))},i.JG=function(){i.tX&&(i.uX=!0,i.tX=!1,i.sX(xS.Jz))},i.ZG=function(){i.uX=!1,i.oa.lP&&i.sX(xS.Yz)},i}Pt(i,t);var n=i.prototype;return n.UG=function(){t.prototype.UG.call(this),this.XG()},n.kn=function(){this.jG(),t.prototype.kn.call(this)},n.XG=function(){this.oa.wn(Fy.xM,this.QG),this.oa.wn(ch.jw,this.KG),this.oa.wn(Fy.PM,this.YG),this.oa.wn(ch.$w,this.JG),this.oa.wn(ch.Zw,this.ZG)},n.jG=function(){this.oa.mn(Fy.xM,this.QG),this.oa.mn(ch.jw,this.KG),this.oa.mn(Fy.PM,this.YG),this.oa.mn(ch.$w,this.JG),this.oa.mn(ch.Zw,this.ZG)},n.$G=function(){this.tX=!0},n.iX=function(){var t=this.oa.Yx(),i=new FS(LS.CG,String(t.code));this.eX(xS.$z,i,t.message)},n.sX=function(t){this.VG&&(this.WG.nX(t),this.So(new jS))},n.eX=function(t,i,n){this.WG.rX(t,i,n),this.So(new jS)},n.hX=function(t,i){this.WG.oX(t,i)},i}(HS);V(),It(),Dt();var zS=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).vX=function(){i.GG()&&i.pX(OS.wG,A.round(i.oa.Nd()))},i.fX=function(t){"manifest"===t.request.type&&i.pX(OS.mG,t.url)},i.cX=function(){var t=Wn(i.oa.rt.NI,function(t){return t.Rt});t&&i.pX(OS.yG,t.$I.V)},i}Pt(i,t);var n=i.prototype;return n.UG=function(){t.prototype.UG.call(this),this.cX(),this.XG()},n.kn=function(){this.jG(),t.prototype.kn.call(this)},n.XG=function(){this.oa.rt.wn(Fg.pa,this.cX),this.oa.lX.dX(this.fX),this.oa.wn(ch.Cw,this.vX)},n.jG=function(){this.oa.rt.mn(Fg.pa,this.cX),this.oa.lX._X(this.fX),this.oa.mn(ch.Cw,this.vX)},n.gX=function(t){t.serviceName&&this.pX(OS.SG,t.serviceName),t.cdn&&this.pX(OS.bG,t.cdn),t.contentTitle&&this.pX(OS.AG,t.contentTitle),t.contentType&&this.pX(OS.TG,t.contentType),t.contentDescription&&this.pX(OS.kG,t.contentDescription)},n.pX=function(t,i){this.VG&&this.WG.mX(t,i)},i}(HS);V(),It(),Dt();var qS=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).RX=ro(),i.PX=0,i.wX=0,i.yX=0,i.bX=[],i.AX=function(){i.DX(),i.NX(),i.LX()},i.kX=function(t){t.Gk===vw.Mk&&(i.xX(t.uO),i.BX(),i.MX(t.FX),i.SX())},i.TX=function(t){var n=t.status.toString()[0],r=i.RX.get(n)||0;i.RX.set(n,r+1),i.CX(BS.eG,"1"),i.CX(BS.sG,"2"),i.CX(BS.nG,"3"),i.CX(BS.rG,"4"),i.CX(BS.hG,"5")},i}Pt(i,t);var n=i.prototype;return n.UG=function(){t.prototype.UG.call(this),this.wX=this.oa.rP.rO,this.yX=this.oa.rP.oO,this.XG(),this.bX.push(m(this.AX,1e3))},n.HG=function(){t.prototype.HG.call(this),this.SX()},n.kn=function(){this.SX(),this.jG(),this.bX.forEach(p),tr(this.bX),t.prototype.kn.call(this)},n.XG=function(){this.oa.lX.dX(this.TX),this.oa.wn(ch._y,this.kX)},n.jG=function(){this.oa.lX._X(this.TX),this.oa.mn(ch._y,this.kX)},n.EX=function(){this.SX()},n.xX=function(t){this.PX+=t,this.IX(BS.aG,this.PX)},n.CX=function(t,i){var n=this.RX.get(i)||0;this.IX(t,n)},n.DX=function(){var t=this.oa.rP.rO-this.wX;this.IX(BS.lG,t)},n.NX=function(){var t=this.oa.rP.oO-this.yX;this.IX(BS.vG,t)},n.BX=function(){var t=Nb.Bg.pW();this.IX(BS.uG,Na(t))},n.MX=function(t){this.IX(BS.cG,Na(t)),this.IX(BS.dG,Na(t))},n.SX=function(){if(this.GG()){var t=A.round(we(this.oa.Gx()));this.IX(BS.fG,t)}},n.LX=function(){var t=LA.jn(this.oa.Ux()),i=this.oa.Gx(),n=t.iL(i),r=n?we(n.An(0)-i):0;this.IX(BS.oG,r)},n.IX=function(t,i){this.VG&&this.WG.OX(t,i)},i}(HS);V(),It(),Ut();function XS(t){return t&&t.integration===ZS}function GS(t){if(!qi(t.asset))throw new _("Agama source configuration: expected 'asset' to be a string");if(!function(t){return!!qi(t)&&("live"===t||"vod"===t)}(t.streamType))throw new _("Agama source configuration: expected 'streamType' to be 'live' or 'vod'");if(void 0!==t.serviceName&&!function(t){return!!qi(t)&&("live"===t||"svod"===t||"nvod"===t||"tvod"===t||"avod"===t||"catchuptv"===t)}(t.serviceName))throw new _("Agama source configuration: expected 'serviceName' to be 'live', 'svod', 'nvod','tvod', 'avod' or 'catchuptv'");if(void 0!==t.cdn&&!qi(t.cdn))throw new _("Agama source configuration: expected 'cdn' to be a string");if(void 0!==t.contentTitle&&!qi(t.contentTitle))throw new _("Agama source configuration: expected 'contentTitle' to be a string");if(void 0!==t.contentType&&!qi(t.contentType))throw new _("Agama source configuration: expected 'contentType' to be a string");if(void 0!==t.contentDescription&&!qi(t.contentDescription))throw new _("Agama source configuration: expected 'contentDescription' to be a string");return t}function QS(t){if(!qi(t.config))throw new _("Agama player configuration: expected 'config' to be a string");if(void 0!==t.logLevel&&!function(t){return!!qi(t)&&("info"===t||"debug"===t||"warning"===t||"error"===t||"fatal"===t)}(t.logLevel))throw new _("Agama player configuration: expected 'logLevel' to be 'info', 'debug', 'warning','error' or 'fatal'");if(void 0!==t.application&&!qi(t.application))throw new _("Agama player configuration: expected 'application' to be a string");if(void 0!==t.applicationVersion&&!qi(t.applicationVersion))throw new _("Agama player configuration: expected 'applicationVersion' to be a string");if(void 0!==t.userAccountID&&!qi(t.userAccountID))throw new _("Agama player configuration: expected 'userAccountID' to be a string");if(void 0!==t.deviceID&&!qi(t.deviceID))throw new _("Agama player configuration: expected 'deviceID' to be a string");return t}function YS(){var t="00000000-0000-0000-0000-000000000000",i=f.navigator,n=f.screen,r=""+i.mimeTypes.length;r+=i.userAgent.replace(/\D+/g,""),r+=i.plugins.length,r+=n.height||"",r+=n.width||"",r+=n.pixelDepth||"";var e=function(t){var i,n=0;if(0===t.length)return"0";for(i=0;i0?aE(t[0]):void 0}function cE(t){if(t&&t.sources)return fE(t.sources)}function fE(t){return qi(t)?t:cT(t)?t.src:Hi(t)&&t.length>0?fE(t[0]):void 0}function vE(t,i,n){return sT(t)?function(t,i,n){var r=io({},lT(),{ping:{adImpressions:!1,freeWheelVideoViews:!1,linearAdData:!1},integration:YA.UPLYNK,id:"",prefix:sE,preplayParameters:{},playbackUrlParameters:{},assetType:eE.ASSET,contentProtected:!1,assetInfo:!0});r.id=function(t){if(qi(t))return t;if(Hi(t)&&qi(t[0]))return t;if(function(t){return Wi(t)&&qi(t.userId)&&(Hi(t.externalId)||qi(t.externalId))}(t))return t;return""}(t.id),t.preplayParameters&&(r.preplayParameters=t.preplayParameters);t.playbackUrlParameters&&(r.playbackUrlParameters=t.playbackUrlParameters);t.assetType&&(r.assetType=function(t){switch(t){case"channel":return eE.CHANNEL;case"event":return eE.EVENT;default:return eE.ASSET}}(t.assetType));t.contentProtected&&(r.contentProtected=$g(t.contentProtected));t.assetInfo?r.assetInfo=$g(t.assetInfo):r.assetInfo="asset"===r.assetType;t.prefix&&(r.prefix=tw(t.prefix)||sE);return r.ping=function(t,i){var n=!1,r=!1,e=!1;i?(n=!!Xi(i.adImpressions)&&i.adImpressions,r=!!Xi(i.freeWheelVideoViews)&&i.freeWheelVideoViews,e=Xi(i.linearAdData)?i.linearAdData:t!==eE.ASSET):t!==eE.ASSET&&(e=!0);return{adImpressions:n,freeWheelVideoViews:r,linearAdData:e}}(r.assetType,t.ping),r=wE(r,t),r=pE(r,i,n),r=mE(r,t,n),r}(t,i,n):oT(t)?function(t,i,n){var r;return io({},dE(t,i,n),{integration:YA.MEDIATAILOR,adsParams:null!=(r=t.adsParams)?r:{}})}(t,i,n):uT(t)?function(t,i,n){return io({},dE(t,i,n),{type:"theolive"})}(t,i,n):hT(t)?lE(t,i,n):dE(t,i,n)}function dE(t,i,n){var r=gT(),e=i&&(i.contentProtection||i.drm);if(qi(t)){if(r.src=t,r.type=tT(t),e){var s=pS(e);r.contentProtection=EA(s)}}else if(cT(t)||eT(t)||hT(t)){r.src=t.src,r.type=t.type||tT(t.src),r.isAdvertisement=t.isAdvertisement;var u=fT(t)?t.hesp:void 0;void 0!==u&&(r.hesp=u),oT(t)&&(r.integration=t.integration);var o=pS(t.contentProtection||t.drm||e);r.contentProtection=EA(o),t.ssai&&(r.ssai=TA(t.ssai)),r=wE(r,t)}return r=mE(r=pE(r,i,n),t,n)}function lE(t,i,n){return io({},dE(t,i,n),{type:kA.yC,src:t.src,streamAccountId:t.streamAccountId,subscriberToken:t.subscriberToken,connectOptions:kE(t.connectOptions),apiUrl:t.apiUrl,statsIntervalMs:gE(t.statsIntervalMs)})}function gE(t){if(Yi(t)&&t>0)return t}function wE(t,i){var n,r;i.useCredentials?t.crossOrigin=_A.fC:i.crossOrigin&&(t.crossOrigin=iT(i.crossOrigin)),qi(i.timeServer)&&(t.timeServer=i.timeServer),i.liveOffset&&(t.liveOffset=i.liveOffset),i.hlsDateRange&&(t.hlsDateRange=i.hlsDateRange),i.lowLatency&&(t.lowLatency=$g(i.lowLatency)),i.useNativePlayback&&(t.useNativePlayback=$g(i.useNativePlayback)),i.useManagedMediaSource&&(t.useManagedMediaSource=$g(i.useManagedMediaSource)),i.dash&&(t.dash=IA(i.dash)),i.hls&&(t.hls=RA(i.hls)),i.lcevc&&(t.lcevc=$g(i.lcevc)),i.ignoreEmbeddedTextTrackTypes&&(t.ignoreEmbeddedTextTrackTypes=yT(i.ignoreEmbeddedTextTrackTypes)),i.latencyConfiguration&&(t.latencyConfiguration=GA(i.latencyConfiguration)),t.seamlessSwitchStrategy=$A(null!=(r=i.seamlessSwitchStrategy)?r:null==(n=i.dash)?void 0:n.useSeamlessPeriodSwitch);var e=Kg(i.experimentalRendering);void 0!==e&&(t.experimentalRendering=e);var s=Kg(i.nativeUiRendering);return void 0!==s&&(t.nativeUiRendering=s),t}function mE(t,i,n){return t.abr=DA(qi(i)?void 0:PA(i.abr),null==n?void 0:n.abr),t}function pE(t,i,n){var r,e=i&&i.timeServer;return n&&n.liveOffset&&!Fi(t.liveOffset)&&(t.liveOffset=n.liveOffset),n&&n.hlsDateRange&&!Fi(t.hlsDateRange)&&(t.hlsDateRange=n.hlsDateRange),t.crossOrigin===_A.Fk&&(null==i||null==(r=i.vr)?void 0:r[360])&&(t.crossOrigin=_A.lC),t.useCredentials=t.crossOrigin===_A.fC,qi(e)&&!t.timeServer&&(t.timeServer=e),t}function yE(t){var i={src:""};if(t&&t.src){if(i.src=tw(t.src),"default"in t&&(i.default=$g(t.default)),i.kind=function(t){var i=String(t||"").toLowerCase();return hy(i)?i:i?"metadata":"subtitles"}(t.kind),Hw(t.format)&&(i.format=t.format),"srclang"in t){var n=t.srclang;"string"==typeof n&&""!==n&&(i.srclang=n)}if("label"in t){var r=t.label;"string"==typeof r&&""!==r&&(i.label=r)}}return i}function _E(t,i){if(Wi(t))try{return i.jz(t).uj(t)}catch(t){return}}function kE(t){if(null==t)return t;if(!Wi(t))throw new y("connectOptions must be an object");return t}function bE(t,i,n){if(void 0===n&&(n=NS.Bg),uE(t))return{sources:[gT()]};var r=zg(t);if(r.sources=function(t,i,n){if(vT(t))return[vE(t,i,n)];if(Hi(t)&&vT(t[0])){for(var r,e=[],s=Ft(t);!(r=s()).done;){var u=r.value;e.push(vE(u,i,n))}return e}return[gT()]}(r.sources,r,i),"contentProtection"in r&&delete r.contentProtection,"drm"in r&&delete r.drm,"ads"in r){var e=function(t,i){if(!Hi(t))return[];for(var n,r=[],e=Ft(t);!(n=e()).done;){var s=n.value;(s=_E(s,i))&&r.push(s)}return r}(r.ads,n);0===e.length?delete r.ads:r.ads=e}var s=!dT(r.sources),u=r.ads&&r.ads.length>0;if(s&&!u?delete r.ads:u&&!s&&(r.sources=[]),"textTracks"in r){var o=function(t){if(!Hi(t))return[];for(var i,n=[],r=Ft(t);!(i=r()).done;){var e=i.value;""!==(e=yE(e)).src&&n.push(e)}return n}(r.textTracks);0===o.length?delete r.textTracks:r.textTracks=o}if("poster"in r&&(r.poster=tw(r.poster)),"streamType"in r&&(r.streamType=function(t){switch(t){case"live":case"dvr":case"vod":return t}}(r.streamType)),"vr"in r&&(r.vr=function(t){var i=t||{};return i.stereoMode=function(t){return function(t){switch(t){case"":case"horizontal":case"vertical":return!0;default:return!1}}(t)?t:""}(i.stereoMode),{panoramaMode:rE(i.panoramaMode,Boolean(i[360])),stereoMode:i.stereoMode?nE(i.stereoMode):tE.NONE,nativeVR:Boolean(i.nativeVR)}}(r.vr)),"analytics"in r||(null==i?void 0:i.analytics)){var h=mT(r.analytics),a=i&&i.analytics||[];r.analytics=function(t,i){for(var n,r=function(){var i=n.value,r=!t.some(function(t){return t.integration===i.integration});r&&i.integration!==ZS&&e.push(i)},e=zg(t),s=Ft(i);!(n=s()).done;)r();return e}(h,a)}return"mutedAutoplay"in r&&(r.mutedAutoplay=BT(r.mutedAutoplay)),"timeServer"in r&&delete r.timeServer,"playAdsAfterTime"in r&&(r.playAdsAfterTime=Jg(r.playAdsAfterTime)),r.blockContentIfAdError=function(t){return void 0!==t&&"boolean"==typeof t&&Boolean(t)}(r.blockContentIfAdError),r}V(),It(),V(),It(),V(),It();var AE=function(){function t(t){this.cj=t}return t.prototype.dj=function(t){var i,n,r,e,s,u,o,h=[];if(!t)return"";var a=t.length%4;if(a>0)for(;a++<4;)t+=this.cj.charAt(64);for(i=0;i>>16&255,r=o>>>8&255,e=255&o,h[i/4]=String.fromCharCode(n,r,e),64===u&&(h[i/4]=String.fromCharCode(n,r)),64===s&&(h[i/4]=String.fromCharCode(n));return h.join("")},t.prototype.lj=function(t,i){var n,r,e,s,u,o,h,a=[],c="";if((o=t.length%3)>0)for(;o++<3;)c+=this.cj.charAt(64),t+="\0";for(o=0;o>18&63,e=n>>12&63,s=n>>6&63,u=63&n,a[o/3]=this.cj.charAt(r)+this.cj.charAt(e)+this.cj.charAt(s)+this.cj.charAt(u);return h=(h=a.join("")).slice(0,h.length-c.length),i||(h+=c),h},t.bh=new t(function(){var t,i,n,r,e=[],s=["object","$","undefined","function","Cannot find module '","MODULE_NOT_FOUND","*","com.widevine.alpha","urn:mpeg:dash:mp4protection:2011","^","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","__proto__","@@iterator","getUTCHours","setUTCFullYear","25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?","SegmentBase","RateChangeEvent","Symbol(","Symbol.",'; codecs="'];for(t=0;t0?t[t.length-1]:this.Gb.gj?this.Gb.gj:void 0}},i.Lj=function(i,n){return!!t.Yj(i,n.Aj)},t.Wj=function(t){var i=Number(new Date);return!!t&&i<=t},t.Yj=function(t,i){return $E(this.Jj(t),i)},t.Jj=function(t){return qi(t)?t:cT(t)&&t.src||""},t}(),zE=function(){function t(){}var i=t.prototype;return i.Uj=function(t){return 0},i.Nj=function(t,i){},i.Fj=function(t,i){},t}();function qE(t){switch(t){case"invaliddomain":return pd.LICENSE_INVALID_DOMAIN;case"invalidsource":return pd.LICENSE_INVALID_SOURCE;case"expired":return pd.LICENSE_EXPIRED;case"invalidfeature":return pd.LICENSE_INVALID_FEATURE;case"error":return pd.LICENSE_ERROR}}var XE="25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?",GE=bn(function(){var t="\\.",i="(\\*|"+XE+")";return new RegExp("ip-range\\("+i+t+i+t+i+t+i+"\\)")});function QE(t,i){var n=t,r=i;if(!n)return!1;if("*"===(r=r.trim()))return!0;if(r===(n=n.replace(/\.+$/,"")))return!0;if(zo(r,"ip-range(")){var e="\\.",s=r.match(GE()),u=function(t){return"*"===t?"("+XE+")":t};if(null!==s&&5===s.length){var o=new RegExp("^"+s[1]+e+u(s[2])+e+u(s[3])+e+u(s[4])+"$");return null!==n.match(o)}}return r="."+r,-1!==n.indexOf(r,n.length-r.length)}function YE(t){return t.some(function(t){return"*"===t})}function $E(t,i){var n=Vi.Dh(t);if(!KE(n))return!0;for(var r,e=Ft(i);!(r=e()).done;){var s=r.value;if(QE(n.hostname,s))return!0;if(QE(Ml(t),s))return!0}return!1}function KE(t){return-1!==FE.indexOf(t.protocol)}function JE(t){var i=Vi.Dh(t.Yu);return KE(i)&&!function(t){return QE(t.hostname,"localhost")}(i)&&!function(t){return QE(t.hostname,"theoplayer.doubleclick.net")}(i)}var ZE=function(){function t(){}return t.qj=function(t,i){return"The requested feature '"+i+"' is not available with the license for this player."},t.Oj=function(t){return"invaliddomain"===t?this.$j:"invalidsource"===t?this.tQ:"expired"===t?this.iQ:"invalidfeature"===t?this.eQ:this.sQ},t}();ZE.sQ="The license for this player is invalid.",ZE.iQ="The usage license for this video player has expired.",ZE.$j="The current domain is incompatible with the license for this player.",ZE.tQ="The provided video source is incompatible with the license for this player.",ZE.eQ="The requested feature is not available with the license for this player.",V(),It(),Wt(),Bt(),Yt(),V(),It();var tI=function(t){return t[t.nQ=1]="nQ",t[t.rQ=4]="rQ",t[t.hQ=5]="hQ",t[t.oQ=9]="oQ",t}({});function iI(t){var i=[t.zB,t.aQ,t.uQ];switch(t.aQ){case 1:i.push(t.rC);break;case 4:i.push(t.zx),i.push(t.lt);break;case 5:i.push(t.lt);break;case 9:i.push(t.Km)}return i}V(),It();var nI,rI=new Array(256);for(nI=0;nI<256;nI+=1)rI[nI]=(nI<16?"0":"")+nI.toString(16);function eI(){var t=le(),i=(4294967296*A.random()|0)+t&3029421624,n=(4294967296*A.random()|0)+t&3595553209,r=(4294967296*A.random()|0)+t&1130486254,e=(4294967296*A.random()|0)+t&1284287105;return rI[255&i]+rI[i>>>8&255]+rI[i>>>16&255]+rI[i>>>24&255]+"-"+rI[255&n]+rI[n>>>8&255]+"-"+rI[n>>>16&15|64]+rI[n>>>24&255]+"-"+rI[63&r|128]+rI[r>>>8&255]+"-"+rI[r>>>16&255]+rI[r>>>24&255]+rI[255&e]+rI[e>>>8&255]+rI[e>>>16&255]+rI[e>>>24&255]}function sI(t){return Da(t.replace(/-/g,""))}function uI(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=16*A.random()|0;return("x"===t?i:3&i|8).toString(16)})}function oI(){return Vi.Mg()}V(),It(),V(),It(),V(),It();var hI,aI="theoplayer-session-id";function cI(){if(!hI){var t=Vd.zy(aI);t?hI=t:(hI=eI(),Vd.Gy(aI,hI))}return hI}V(),It(),V(),It();var fI=/[^\x00-\x7E]/g;function vI(t){return"\\u"+Qo(t.charCodeAt(0).toString(16),4,"0")}var dI="https://license.theoplayer.com";function lI(t){var i=function(t){var i=[];return function(t,i,n){return JSON.stringify(t,i,n).replace(fI,vI)}(t,function(t,n){if(Wi(n)){if(-1!==i.indexOf(n))return null;i.push(n)}return n})}(function(t){return[t.cQ,t.fS,t.yj,t.ED,t.dQ,t.lQ,t.fQ.map(iI)]}(t));return AE.vj.lj(i)}var gI=function(){function t(t,i,n,r,e,s){var u=this;void 0===r&&(r=AE.bh),void 0===e&&(e=0),void 0===s&&(s=1),this.XA=void 0,this.aV=void 0,this.mQ=void 0,this.AQ=void 0,this.TQ=void 0,this.CQ=void 0,this.Zf=void 0,this._Q=void 0,this.DQ=void 0,this.IQ=void 0,this.AA=void 0,this.BQ=void 0,this.MQ=void 0,this.NQ=void 0,this.XA=t,this.aV=i,this.mQ=n,this.AQ=r,this.TQ=e,this.CQ=s,this.Zf=[],this._Q=null,this.DQ=0,this.IQ="unknown",this.AA=0,this.MQ=function(){oI()-u.DQ>6e4&&u.EQ()},this.NQ=function(){u.EQ(!0)},f.addEventListener("beforeunload",this.NQ),this.BQ=m(this.MQ,6e4)}var i=t.prototype;return i.vQ=function(){return Boolean(this.dQ)},i.gQ=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.mQ.pQ()];case 1:return n.sent().Ij?(i={aQ:tI.nQ,uQ:le(),rC:t},[4,this.hX(i)]):[2];case 2:return n.sent(),[2]}})}).call(this)},i.wQ=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.mQ.pQ()];case 1:return n.sent().Ij?(i={aQ:tI.oQ,uQ:le(),Km:t},[4,this.hX(i)]):[2];case 2:return n.sent(),[2]}})}).call(this)},i.yQ=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return n={aQ:tI.rQ,uQ:le(),zx:i,lt:t},[4,this.hX(n)];case 1:return r.sent(),[2]}})}).call(this)},i.bQ=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return i={aQ:tI.hQ,uQ:le(),lt:t},[4,this.hX(i)];case 1:return n.sent(),[2]}})}).call(this)},i.hX=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.mQ.pQ()];case 1:return i=n.sent(),"a:n[_O*[C4C-N$_@_MYY $D]iOp]N$_-_]th_:c|aen?C:pH"===this.AQ.lj(i.yj)&&t.aQ!==tI.hQ?[2]:(t.aQ===tI.nQ?this.SQ():this.vQ()||this.SQ(),t.zB=this.AA++,this.Zf.push(t),function(t){return t===tI.nQ||t===tI.hQ}(t.aQ)?[4,this.EQ()]:[3,3]);case 2:case 4:return n.sent(),[3,5];case 3:return this.Zf.length>this.TQ?[4,this.kQ()]:[3,5];case 5:return[2]}})}).call(this)},i.EQ=function(t){return void 0===t&&(t=!1),jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Zf.length>0?[4,this.kQ(t)]:[3,2];case 1:return i.sent(),[3,0];case 2:return[2]}})}).call(this)},i.xQ=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.mQ.pQ()];case 1:return i=n.sent(),[2,{cQ:le(),fS:cI(),yj:this.AQ.lj(i.yj)||"dev",ED:this.XA,dQ:this._Q,lQ:this.IQ,fQ:t}]}})}).call(this)},i.kQ=function(t){return void 0===t&&(t=!1),jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=this.Zf.splice(0,this.CQ),[4,this.xQ(i)];case 1:return n=r.sent(),t?this.Jk(n):this.RQ(n),this.DQ=oI(),[2]}})}).call(this)},i.RQ=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=lI(t),n=new Cl({Yu:dI,XT:i,Xk:!1,fk:qd.LT,_k:{"Content-Type":kk.NH},Wk:4e3,Hk:Tl.POST}),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this.aV.vk(n)];case 2:return[4,r.sent().qT()];case 3:return r.sent(),[3,5];case 4:return r.sent(),(new Image).src="https://licensing.theoplayer.com/t?"+i,[3,5];case 5:return[2]}})}).call(this)},i.Jk=function(t){var i=lI(t);this.aV.Jk({Yu:dI,XT:i,GT:kk.NH})},i.SQ=function(){this.vQ()&&this.EQ(),this._Q=eI(),this.AA=0},i.kn=function(){f.removeEventListener("beforeunload",this.NQ),p(this.BQ),this.EQ()},xt(t,[{key:"fQ",get:function(){return this.Zf}},{key:"dQ",get:function(){return this._Q}}]),t}();V(),It(),Bt(),H(),V(),It(),V(),It();var wI=0;var mI=w,pI=self.requestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame,yI=self.cancelAnimationFrame||self.webkitCancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelRequestAnimationFrame;pI&&yI||(pI=function(t){var i=oI(),n=A.max(0,16-(i-wI)),r=g(function(){return t(i+n)},n);return wI=i+n,r},yI=mI),pI=pI.bind(self),yI=yI.bind(self);var _I=Oi.L_||Oi.ru&&Oi.Q_<13;function kI(t,i,n){var r=t.getImageData(i,n,1,1).data;return 0===r[0]&&0===r[1]&&0===r[2]&&0===r[3]}var bI=function(){function t(t){var i=this;this.t=void 0,this.VQ=void 0,this.hu=void 0,this.KQ=void 0,this.zQ=eo(),this.WQ=1,this.QQ=!0,this.JQ=function(){i.QQ=!0},this.YQ=function(){i.VQ=i.t.zP(),i.zQ.forEach(function(t,n){t.XQ(),t.XQ=i.qQ(t.GQ,n)})},this.t=t,this.t.wn(ch.Lw,this.YQ),this.t.wn(ch.Zw,this.JQ),this.YQ()}var i=t.prototype;return i.LQ=function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r=jy.GL},i.HQ=function(t){var i=this.KQ;void 0===i&&(i=v.createElement("canvas"),this.KQ=i);var n=i.getContext("2d"),r=this.t,e=r.MP,s=r.DP,u=i.width,o=i.height;n.clearRect(0,0,i.width,i.height),u===e&&o===s||(i.width=e,i.height=s),n.drawImage(t,0,0,e,s);var h=!1;return e>0&&kI(n,e-1,0)&&(i.width=u,h=!0),s>0&&kI(n,0,s-1)&&(i.height=o,h=!0),h&&n.drawImage(t,0,0,e,s),i},i.kn=function(){this.zQ.forEach(function(t){return t.XQ()}),this.zQ.clear(),this.t.mn(ch.Lw,this.YQ),this.t.mn(ch.Zw,this.JQ),this.VQ=void 0,this.KQ=void 0},xt(t,[{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{drawImage:function(i){for(var n=arguments.length,r=new Array(n>1?n-1:0),e=1;e0){var i=t[t.length-1].contentRect;r.$Q=i.width,r.ZQ=i.height,r.GQ(r.$Q,r.ZQ)}},r.tK=new f.ResizeObserver(r.iK),r.tK.observe(r.xe),r}return Pt(i,t),i.prototype.kn=function(){this.tK.disconnect()},xt(i,[{key:"Iu",get:function(){return this.ZQ}},{key:"Eu",get:function(){return this.$Q}}]),i}(EI);V(),It(),Bt(),Dt(),V(),It(),Ut();var RI=["Webkit","Moz","O","ms"],CI=function(){var t=!1;try{if(void 0!==f&&"function"==typeof f.addEventListener){var i=b.defineProperty({},"passive",{get:function(){t=!0}});f.addEventListener("testPassiveEventSupport",pn,i),f.removeEventListener("testPassiveEventSupport",pn,i)}}catch(t){}return t}(),PI=ro();function DI(t){return PI.has(t)||PI.set(t,function(t){var i=(SI||(SI=f&&f.document&&f.document.createElement("span")),SI);if(!i||!i.style)return t;if(void 0!==i.style[t])return t;for(var n,r=t.charAt(0).toUpperCase()+t.slice(1),e=Ft(RI);!(n=e()).done;){var s=n.value+r;if(void 0!==i.style[s])return s}return t}(t)),PI.get(t)}function NI(t){var i=t.style;i.position="absolute",i.left="0",i.right="0",i.bottom="0",i.top="0",i.overflow="scroll",i.zIndex="-1",i.visibility="hidden"}function xI(t){var i=t.style;i.position="absolute",i.left="0",i.top="0",i[DI("transition")]="0s"}var BI=function(t){function i(i,n,r){var e;(e=t.call(this,i,n)||this).hK=void 0,e.eK=0,e.$Q=NaN,e.ZQ=NaN,e.sK=void 0,e.aK=void 0,e.rK=void 0,e.uK=void 0,e.cK=void 0,e.hr=function(){var t=1e5;e.aK.style.width=t+"px",e.aK.style.height=t+"px",e.sK.scrollLeft=t,e.sK.scrollTop=t,e.rK.scrollLeft=t,e.rK.scrollTop=t,0===e.rK.scrollTop&&pI(e.hr)},e.dK=function(){var t=e.Eu,i=e.Iu;e.GQ(t,i),e.$Q=t,e.ZQ=i,e.hr(),e.eK=0},e.nK=function(){if(!e.eK){var t=e.Eu,i=e.Iu;t===e.$Q&&i===e.ZQ||(e.eK=pI(e.dK))}},e.oK=function(){e.cK||(e.cK=g(e.lK,66))},e.lK=function(){e.cK=void 0,e.fK()},e.fK=function(){e.nK()};var s=function(t,i){return f.getComputedStyle(t,void 0).getPropertyValue(i)||t.style[i]}(i,"position");r||"static"!==s||(i.style.position="relative");var u=v.createElement("div");return e.hK=u,e.sK=v.createElement("div"),e.aK=v.createElement("div"),e.rK=v.createElement("div"),e.uK=v.createElement("div"),NI(e.sK),NI(e.rK),xI(e.aK),function(t){xI(t),t.style.width="200%",t.style.height="200%"}(e.uK),u.appendChild(e.sK),u.appendChild(e.rK),e.sK.appendChild(e.aK),e.rK.appendChild(e.uK),i.appendChild(u),e.sK.addEventListener("scroll",e.nK),e.rK.addEventListener("scroll",e.nK),f&&f.addEventListener("resize",e.oK),e.nK(),e}return Pt(i,t),i.prototype.kn=function(){yI(this.eK),this.eK=0,this.sK.removeEventListener("scroll",this.nK),this.rK.removeEventListener("scroll",this.nK),Zi(this.hK),f&&f.removeEventListener("resize",this.oK)},xt(i,[{key:"Iu",get:function(){return this.xe.getBoundingClientRect().height||this.ZQ||0}},{key:"Eu",get:function(){return this.xe.getBoundingClientRect().width||this.$Q||0}}]),i}(EI),OI=function(t){function i(i){var n;return(n=t.call(this)||this).xe=void 0,n.tK=void 0,n.iK=function(t,i){n.So(new TI(t,i))},n.xe=i,n}Pt(i,t);var n=i.prototype;return n._n=function(t){this.tK||("function"==typeof f.ResizeObserver?this.tK=new II(this.xe,this.iK):this.tK=new BI(this.xe,this.iK,t))},n.kn=function(){this.Vo(),this.tK&&(this.tK.kn(),this.tK=void 0)},xt(i,[{key:"Iu",get:function(){return this.tK?this.tK.Iu:0}},{key:"Eu",get:function(){return this.tK?this.tK.Eu:0}}]),i}(uh);V(),It(),Bt(),Dt(),Ut(),V(),It(),Dt();var MI=function(t){function i(){return t.call(this,aS.pa)||this}return Pt(i,t),i}(ah);V(),It(),Ut();var LI=function(){if(v)for(var t,i=Ft([["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]]);!(t=i()).done;){var n=t.value;if(n[1]in v)return{vK:n[0],sa:n[1],_K:n[2],gK:n[3],Ze:n[4],pK:n[5]}}}();V(),It(),Dt();var FI=function(t){function i(){return t.call(this,aS.ka)||this}return Pt(i,t),i}(ah),UI=function(t){function i(n){var r;return(r=t.call(this)||this).xe=void 0,r.ca=void 0,r.ds=!1,r.mK=function(){return r.yK()},r.wK=function(){return r.bK()},r.xe=n,r.ca=i.la(n),v.addEventListener(LI.Ze,r.mK),r.yK(),r}Pt(i,t);var n=i.prototype;return n.yo=function(){var t=this.xe[LI.vK]();t&&t.then?t.then(this.mK,this.wK):(v.removeEventListener(LI.pK,this.wK),v.addEventListener(LI.pK,this.wK))},n.jo=function(){var t=v[LI.sa]();t&&t.then?t.then(this.mK,this.wK):(v.removeEventListener(LI.pK,this.wK),v.addEventListener(LI.pK,this.wK))},n.yK=function(){var t=this.ds,i=this.xe===v[LI._K];this.ds=i,t!==i&&this.So(new MI)},n.bK=function(){this.So(new cS)},n.kn=function(){this.Vo(),v.removeEventListener(LI.Ze,this.mK),v.removeEventListener(LI.pK,this.wK)},i.la=function(t){return Boolean(LI&&v[LI.gK]&&LI.vK in t)},i}(uh),VI=function(t){function i(n){var r;return(r=t.call(this)||this).xe=void 0,r.ca=void 0,r.ds=!1,r.mK=function(){return r.yK()},r.xe=n,r.ca=i.la(n),r.xe.addEventListener("webkitbeginfullscreen",r.mK),r.xe.addEventListener("webkitendfullscreen",r.mK),r.xe.addEventListener("webkitpresentationmodechanged",r.mK),r.yK(),r}Pt(i,t);var n=i.prototype;return n.yo=function(){var t=this;this.xe.webkitSupportsPresentationMode&&this.xe.webkitSupportsPresentationMode("fullscreen")?Oi.ru?requestAnimationFrame(function(){return t.xe.webkitSetPresentationMode("fullscreen")}):this.xe.webkitSetPresentationMode("fullscreen"):this.xe.webkitEnterFullscreen()},n.jo=function(){this.xe.webkitSupportsPresentationMode&&this.xe.webkitSupportsPresentationMode("inline")?this.xe.webkitSetPresentationMode("inline"):this.xe.webkitExitFullscreen()},n.yK=function(){var t,i=this.ds;t=this.xe.webkitPresentationMode?"fullscreen"===this.xe.webkitPresentationMode:Boolean(this.xe.webkitDisplayingFullscreen),this.ds=t,i!==t&&this.So(new MI)},n.kn=function(){this.Vo(),this.xe.removeEventListener("webkitbeginfullscreen",this.mK),this.xe.removeEventListener("webkitendfullscreen",this.mK),this.xe.removeEventListener("webkitpresentationmodechanged",this.mK)},i.la=function(t){return Oi.ru&&("webkitEnterFullscreen"in t||"webkitSupportsPresentationMode"in t)},i}(uh),jI=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).TK=[],i.AK=void 0,i.SK=!1,i.yK=function(){var t=i.SK,n=i.PK();t!==n&&(i.SK=n,i.So(new MI))},i}Pt(i,t);var n=i.prototype;return n.yo=function(){this.AK?this.AK.yo():this.So(new cS)},n.jo=function(){for(var t,i=Ft(this.TK);!(t=i()).done;){var n=t.value;n.ds&&n.jo()}},n.kK=function(t){this.AK=t},n.EK=function(t){this.TK.push(t),t.wn(aS.pa,this.yK),t.wn(aS.ma,this.Rs),this.yK()},n.xK=function(t){Yn(this.TK,t),t.mn(aS.pa,this.yK),t.mn(aS.ma,this.Rs)},n.PK=function(){for(var t,i=Ft(this.TK);!(t=i()).done;){if(t.value.ds)return!0}return!1},n.hr=function(){this.AK=void 0,this.SK=!1;for(var t,i=Ft(this.TK.slice());!(t=i()).done;){var n=t.value;this.xK(n),n.kn()}this.yK()},n.kn=function(){this.Vo(),this.hr()},xt(i,[{key:"ca",get:function(){return!!this.AK&&this.AK.ca}},{key:"ds",get:function(){return this.SK}}]),i}(uh),HI=function(t){function i(i,n){var r;return(r=t.call(this)||this).t=void 0,r.IK=void 0,r.CK=void 0,r.ga=!1,r.NK=function(){return r.er()},r.yK=function(t){r.ga||r.So(t)},r.t=i,r.IK=n,r.CK=new fS,r.RK(),r.t.wn(ch.Bw,r.NK),r.er(),r}Pt(i,t);var n=i.prototype;return n.yo=function(){this.IK&&this.CK.yo()},n.jo=function(){this.CK.jo()},n.RK=function(){this.CK.wn([aS.pa,aS.ka],this.yK),this.CK.wn(aS.ma,this.Rs)},n.DK=function(){this.CK.mn([aS.pa,aS.ka],this.yK),this.CK.mn(aS.ma,this.Rs)},n.er=function(){var t=this.CK,i=this.t.qP();if(t!==i){this.ga=!0;var n=this.ds,r=this.ca;n&&this.jo(),this.DK(),this.CK=i,this.RK(),n&&!this.ds&&this.ca?this.yo():this.jo(),this.ga=!1,r!==this.ca&&this.So(new FI),n!==this.ds&&this.So(new MI)}},n.kn=function(){this.Vo(),this.DK(),this.t.mn(ch.Bw,this.NK)},xt(i,[{key:"ca",get:function(){return!!this.IK&&this.CK.ca}},{key:"ds",get:function(){return this.CK.ds}}]),i}(uh);V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It(),Dt(),V(),It();var WI=function(t){return t.MODE_CHANGE="presentationmodechange",t.ERROR="error",t}({}),zI=function(t){function i(i){var n;return(n=t.call(this,WI.MODE_CHANGE)||this).presentationMode=void 0,n.presentationMode=i,n}return Pt(i,t),i}(ah);V(),It(),V(),It(),Dt(),Ut();var qI=function(t){function i(i,n,r){var e;return void 0===n&&(n=!1),(e=t.call(this,r)||this).MK=[],e.Zf=void 0,e.BK=void 0,e.FK=function(t){Sr(function(){e.Rs(t)})},e.Zf=i,e.BK=n?e.FK:e.Rs,e}Pt(i,t);var n=i.prototype;return n.au=function(t){for(var i,n=Ft(this.Zf);!(i=n()).done;){var r=i.value;t.wn(r,this.BK)}this.MK.push(t)},n.LK=function(t){for(var i,n=Ft(this.Zf);!(i=n()).done;){var r=i.value;t.mn(r,this.BK)}this.MK.push(t)},n.kn=function(){this.Vo();for(var t,i=Ft(this.MK);!(t=i()).done;){var n=t.value;this.LK(n)}tr(this.MK)},i}(uh),XI=function(t){function i(i,n){var r;return void 0===n&&(n=!1),(r=t.call(this,i)||this).MK=[],r.UK=void 0,r.FK=function(t){Sr(function(){r.Rs(t)})},r.UK=n?r.FK:r.Rs,r}Pt(i,t);var n=i.prototype;return n.au=function(t){t.lw(this.UK),this.MK.push(t)},n.LK=function(t){t.mw(this.UK),Yn(this.MK,t)},n.kn=function(){this.Vo();for(var t,i=Ft(this.MK);!(t=i()).done;){t.value.mw(this.UK)}tr(this.MK)},i}(hh);V(),It(),Bt(),Dt();var GI=function(t){function i(i){var n;return(n=t.call(this,WI.ERROR)||this).errorObject=void 0,n.errorObject=i,n}return Pt(i,t),i.prototype.xa=function(){return this},xt(i,[{key:"error",get:function(){return this.errorObject.message}}]),i}(Cg);V(),It(),Dt();var QI=function(t){function i(i,n,r){return t.call(this,i,n,r)||this}return Pt(i,t),i}(_d),YI=function(t){function i(i,n){var r;return(r=t.call(this)||this).Yo=NT.INLINE,r.ra=!1,r.ha=void 0,r.ea=void 0,r.ta=new Rd,r.hu=void 0,r.yK=function(){r._i()},r.bK=function(){r.ra||(r.So(new Cb(new _d(pd.FULLSCREEN_ERROR,"Failed to enter fullscreen."))),r._i())},r.zK=function(){r.ra||(r.Yo!==NT.NATIVE_PICTURE_IN_PICTURE||r.ea.YL?r.Yo!==NT.NATIVE_PICTURE_IN_PICTURE&&r.ea.YL&&r.Jo(NT.NATIVE_PICTURE_IN_PICTURE):r.Jo(NT.INLINE))},r.GK=function(){r.ra||(r.So(new GI(new QI(pd.PICTURE_IN_PICTURE_ERROR,"Unexpected native picture-in-picture error."))),r.zK())},r.ha=i,r.ea=n,r.ha.wn(aS.pa,r.yK),r.ha.wn(aS.ma,r.bK),r.ea.wn(WT.QL,r.zK),r.ea.wn(WT.KL,r.zK),r.ea.wn(WT.ma,r.GK),r}Pt(i,t);var n=i.prototype;return n.xa=function(){return function(t){var i,n={get currentMode(){return t.Wo()},requestMode:function(i){var n=UT(i);n&&t.Jo(n)},supportsMode:function(i){var n=UT(i);return!!n&&t.Xo(n)},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return(i=new XI(n,!0)).au(t),n}(this)},n.Jo=function(t){this.Yo!==t&&(this.Yo=t,this.ra=!0,this.Ko(t))},n.Wo=function(){return this.Yo},n.Xo=function(t){switch(t){case NT.NATIVE_PICTURE_IN_PICTURE:return this.ea.JL;case NT.FULLSCREEN:return this.ha.ca;case NT.INLINE:return!0}return!1},n.Ko=function(t){var i=this;switch(this.ta.Zg(),t){case NT.FULLSCREEN:Er(this.ta.Zo(function(t){return i.VK(t)}));break;case NT.NATIVE_PICTURE_IN_PICTURE:Er(this.ta.Zo(function(t){return i.HK(t)}));break;case NT.INLINE:Er(this.ta.Zo(function(t){return i.WK(t)}))}},n.VK=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return pr(t),[4,this.ea.jo().catch(pn)];case 1:n.sent(),pr(t),n.label=2;case 2:return n.trys.push([2,4,5,6]),[4,this.qK()];case 3:return n.sent(),this.So(new zI(this.Yo)),[3,6];case 4:throw n.sent(),i=new QI(pd.FULLSCREEN_ERROR,"Failed to enter fullscreen."),this.So(new GI(i)),pr(t),this.Jo(NT.INLINE),i;case 5:return this.ra=!1,[7];case 6:return[2]}})}).call(this)},n.HK=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return pr(t),[4,this.sa().catch(pn)];case 1:n.sent(),pr(t),n.label=2;case 2:return n.trys.push([2,4,5,6]),[4,this.ea.yo()];case 3:return n.sent(),this.So(new zI(this.Yo)),[3,6];case 4:throw n.sent(),i=new QI(pd.PICTURE_IN_PICTURE_ERROR,"Failed to enter native picture-in-picture."),this.So(new GI(i)),pr(t),this.Jo(NT.INLINE),i;case 5:return this.ra=!1,[7];case 6:return[2]}})}).call(this)},n.WK=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return pr(t),[4,this.sa().catch(pn)];case 1:return i.sent(),pr(t),[4,this.ea.jo().catch(pn)];case 2:return i.sent(),this.So(new zI(this.Yo)),this.ra=!1,[2]}})}).call(this)},n.qK=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.ha.ds?[2]:(t=this.ha.ww([aS.pa,aS.ma]),this.ha.yo(),[4,t]);case 1:if(i.sent(),!this.ha.ds)throw new y("Failed to enter fullscreen.");return[2]}})}).call(this)},n.sa=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.ha.ds?(t=this.ha.ww([aS.pa,aS.ma]),this.ha.jo(),[4,t]):[2];case 1:if(i.sent(),this.ha.ds)throw new y("Failed to exit fullscreen.");return[2]}})}).call(this)},n._i=function(){this.ra||(this.Yo!==NT.FULLSCREEN||this.ha.ds?this.Yo!==NT.FULLSCREEN&&this.ha.ds&&this.Jo(NT.FULLSCREEN):this.Jo(NT.INLINE))},n.kn=function(){this.ha.mn(aS.pa,this.yK),this.ha.mn(aS.ma,this.bK),this.ea.mn(WT.QL,this.zK),this.ea.mn(WT.KL,this.zK),this.ea.mn(WT.ma,this.GK),this.Vo()},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}}]),i}(hh);V(),It(),Wt(),Yt();var $I=function(){function t(t){this.Bz=void 0,this.jK=void 0,this.Bz=t,this.jK=new Rd}var i=t.prototype;return i.XK=function(t){var i=this;return this.jK.Zo(function(){return i.QK(t)})},i.GP=function(){this.Bz.Nz()},i.QK=function(i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return n=this.Bz.Yq(vw.Mk),r=n.hq,[4,t.KK(r,i)];case 1:return e=s.sent(),[4,this.Bz.Dq(n)];case 2:return s.sent(),[2,e]}})}).call(this)},i.kn=function(){this.jK.kn()},t.KK=function(i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return Oi.S_||Oi.w_?[2,"all"]:(i.src||(i.src="data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),[4,t.YK()]);case 1:return e.sent(),(r=!n)?[4,t.JK(i,!1)]:[3,3];case 2:r=e.sent(),e.label=3;case 3:return r?[2,"all"]:[4,t.JK(i,!0)];case 4:return e.sent()?[2,"muted"]:[2,"none"]}})})()},t.JK=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:t.muted=i,n=t.play(),e.label=1;case 1:return e.trys.push([1,3,4,5]),Gi(n)?(r=Rr(250),[4,ot.race([n,r])]):[2,!Oi.Ks];case 2:return e.sent(),[2,!0];case 3:return e.sent(),[2,!1];case 4:return t.pause(),t.muted=!0,[7];case 5:return[2]}})})()},t.YK=function(){return new ot(function(t){if("function"==typeof MessageChannel){var i=new MessageChannel;i.port1.onmessage=function(){return t()},i.port2.postMessage("")}else g(t,0)})},t}(),KI=$I;function JI(t){KI=t}function ZI(t){var i;return{get url(){return t.Yu},get method(){return t.Hk},get headers(){return i||(i=t._k.OT()),i},get body(){return t.XT},get useCredentials(){return t.Xk},get type(){return t.Km},get subType(){return t.zk},get mediaType(){return t.Gk},get responseType(){return t.fk}}}function tR(t){switch(t.toLowerCase()){case"arraybuffer":return qd.NT;case"json":return qd.BT;case"stream":return qd.MT;default:return qd.LT}}function iR(t){switch(t.toUpperCase()){case"POST":return Tl.POST;case"PUT":return Tl.PUT;case"DELETE":return Tl.DELETE;case"HEAD":return Tl.HEAD;case"OPTIONS":return Tl.OPTIONS;default:return Tl.GET}}function nR(t){switch(t.toLowerCase()){case"manifest":return Sl.bk;case"segment":return Sl.Ak;case"preload-hint":return Sl.Sk;case"content-protection":return Sl.Tk;default:return Sl.yk}}function rR(t){switch(t.toLowerCase()){case"initialization-segment":return El.Ek;case"fairplay-license":return El.xk;case"fairplay-certificate":return El.Pk;case"widevine-license":return El.Ik;case"widevine-certificate":return El.Ck;case"playready-license":return El.Rk;case"clearkey-license":return El.Dk;case"aes128-key":return El.Nk;default:return El.yk}}function eR(t){switch(t.toLowerCase()){case"audio":return Il.Bk;case"video":return Il.Mk;case"text":return Il.LT;case"image":return Il.Lk;default:return Il.yk}}V(),It(),Wt(),Dt(),H(),Ut(),Yt(),V(),It(),Bt(),Dt(),V(),It(),V(),It(),Wt(),Bt(),Yt();var sR=function(){function t(t,i){this.vY=void 0,this.dY=void 0,this.$K=void 0,this.oY=void 0,this.hu=void 0,this.eY=void 0,this.cE=void 0,this.rY=void 0,this.vY=t,this.dY=i,this.$K=new Xa,this.oY=[],this.hu=void 0,this.eY=!1,this.cE=void 0,this.rY=0}var i=t.prototype;return i.vD=function(){this.eY=!0,this.$K.Qy(null)},i.hY=function(){this.$K.Ky(new $d(this.oY))},i.aY=function(t){if(!this.sY)throw new _("Cannot respond more than once");if(!Wi(t))throw new _("Expected valid response");this.cE=this.uY(t),this.vD()},i.cY=function(){try{var t=this.dY(this.Ca);t?this.lY(t):this.nY||this.iY||this.vD()}catch(t){this.oY.push(t),this.hY()}},i.lY=function(t){if(this.iY)throw new y("Request has been redirected or a response already exists");if(Gi(t))this.fY(t);else{if("function"!=typeof t)throw new _("Expected promise or function");var i=new Xa;try{var n=t(function(t){t?i.Ky(t):i.Qy(void 0)});Gi(n)&&i.$g(n)}catch(t){i.Ky(t)}this.fY(i.Yy)}},i.fY=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.rY++,[4,t];case 1:return n.sent(),this.rY--,this.nY||this.iY||(this.oY.length?this.hY():this.vD()),[3,3];case 2:return i=n.sent(),this.rY--,this.oY.push(i),this.nY||this.iY||this.hY(),[3,3];case 3:return[2]}})}).call(this)},xt(t,[{key:"ZK",get:function(){return this.$K.Yy}},{key:"Ca",get:function(){return this.hu||(this.hu=this.tY()),this.hu}},{key:"iY",get:function(){return this.eY}},{key:"sY",get:function(){return!this.eY}},{key:"nY",get:function(){return this.rY>0}},{key:"uE",get:function(){return this.cE}}]),t}(),uR=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this)._Y=void 0,e._Y=r,e.cY(),e}Pt(i,t);var n=i.prototype;return n.tY=function(){return function(t){var i,n=ZI(t.vk);return{get closed(){return!t.sY},get request(){return n},get url(){return t.Yu},get status(){return t.dk},get statusText(){return t.gk},get headers(){return i||(i=t._k.OT()),i},get body(){return t.XT},respondWith:function(i){return t.aY(i)},waitUntil:function(i){return t.lY(i)}}}(this)},n.uY=function(t){return i.gY(t,this.vY,this._Y)},i.gY=function(t,i,n){var r=void 0===t.body?n:t.body;return new Al({lk:r,vk:i.vk,fk:i.vk.fk,_k:t.headers,dk:t.status,gk:t.statusText,wk:t.url,pk:!0},i)},xt(i,[{key:"XT",get:function(){return this._Y}},{key:"_k",get:function(){return this.vY._k}},{key:"vk",get:function(){return this.vY.vk}},{key:"uE",get:function(){return this.cE}},{key:"dk",get:function(){return this.vY.dk}},{key:"gk",get:function(){return this.vY.gk}},{key:"Yu",get:function(){return this.vY.wk}}]),i}(sR);V(),It(),Bt(),Dt();var oR=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).wY=void 0,e.pY=void 0,e.pY=r,e.cY(),e}Pt(i,t);var n=i.prototype;return n.tY=function(){return function(t){var i;return{get url(){return t.Yu},get method(){return t.Hk},get headers(){return i||(i=t._k.OT()),i},get body(){return t.XT},get closed(){return!t.sY},get useCredentials(){return t.Xk},get type(){return t.Km},get subType(){return t.zk},get mediaType(){return t.Gk},get responseType(){return t.fk},redirect:function(i){return t.yY(i)},respondWith:function(i){return t.aY(i)},waitUntil:function(i){return t.lY(i)}}}(this)},n.uY=function(t){var i=this.vY.XT,n=new Al({lk:i,_k:{},vk:this.vY,wk:this.vY.Yu,fk:this.vY.fk,dk:200,gk:"OK"});return uR.gY(t,n,i)},n.yY=function(t){if(!this.sY)throw new _("Cannot redirect, already redirected or has a response");var i;i=qi(t)?{url:t}:t,this.wY=function(t,i){return new Cl({Yu:void 0===t.url?i.Yu:t.url,Hk:void 0!==t.method?iR(t.method):void 0,_k:t.headers,XT:t.body,Xk:t.useCredentials,Km:void 0!==t.type?nR(t.type):void 0,zk:void 0!==t.subType?rR(t.subType):void 0,Gk:void 0!==t.mediaType?eR(t.mediaType):void 0,fk:void 0!==t.responseType?tR(t.responseType):void 0},i)}(i,this.vY),this.vD()},xt(i,[{key:"XT",get:function(){return this.vY.XT}},{key:"sY",get:function(){return this.pY&&!this.eY}},{key:"_k",get:function(){return this.vY._k}},{key:"Hk",get:function(){return this.vY.Hk}},{key:"mY",get:function(){return this.wY}},{key:"uE",get:function(){return this.cE}},{key:"fk",get:function(){return this.vY.fk}},{key:"Wk",get:function(){return this.vY.Wk}},{key:"qk",get:function(){return this.vY.qk}},{key:"Yg",get:function(){return this.vY.Yg}},{key:"Km",get:function(){return this.vY.Km}},{key:"zk",get:function(){return this.vY.zk}},{key:"Gk",get:function(){return this.vY.Gk}},{key:"Yu",get:function(){return this.vY.Yu}},{key:"Xk",get:function(){return this.vY.Xk}},{key:"Kk",get:function(){return this.vY.Kk}},{key:"jk",get:function(){return this.vY.jk}},{key:"Qk",get:function(){return this.vY.Qk}},{key:"Yk",get:function(){return this.vY.Yk}}]),i}(sR);var hR=function(t){function i(i,n){var r;void 0===n&&(n=!0);var e=new aR(i);return(r=t.call(this,e,n)||this).AY=void 0,r.AY=e,r}Pt(i,t);var n=i.prototype;return n.bY=function(t){this.AY.bY(t)},n.SY=function(t){this.AY.SY(t)},n.TY=function(t){this.AY.TY(t)},n.dX=function(t){this.AY.dX(t)},n._X=function(t){this.AY._X(t)},i}(Dl),aR=function(){function t(t){this.iE=void 0,this.PY=[],this.IY=[],this.iE=t}var i=t.prototype;return i.vk=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,5]),[4,this.kY(t,t.Yg)];case 1:return i=r.sent(),[3,5];case 2:return j(n=r.sent(),Ul)?[4,this.EY(n,t.Yg)]:[3,4];case 3:return[2,r.sent()];case 4:throw n;case 5:return[4,this.xY(i,t.Yg)];case 6:if(bl(i=r.sent()))return[2,i];throw new jl(i)}})}).call(this)},i.Jk=function(t){return this.iE.Jk(t)},i.kY=function(t,i){return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:pr(i),n=t,e=Ft(this.PY.slice()),h.label=1;case 1:if((s=e()).done)return[3,7];if(u=s.value,pr(i),(o=new oR(n,u,!r)).iY)return[3,5];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,o.ZK];case 3:return h.sent(),[3,5];case 4:return h.sent(),[3,6];case 5:o.mY&&!r?n=o.mY:o.uE&&!r&&(r=o.uE),h.label=6;case 6:return[3,1];case 7:return r?[2,r]:[2,this.iE.vk(n)]}})}).call(this)},i.EY=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return j(t,jl)?n=t.uE:(r=t.vk,n=new Al({lk:null,vk:r,fk:r.fk,dk:0,gk:""})),[4,this.xY(n,i)];case 1:if((e=s.sent())===n)throw t;if(bl(e))return[2,e];throw new jl(e)}})}).call(this)},i.xY=function(t,i){return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:n=t,r=Ft(this.IY.slice()),h.label=1;case 1:return(e=r()).done?[3,8]:(s=e.value,pr(i),[4,ot.resolve(n.Fy().lk(i))]);case 2:if(u=h.sent(),(o=new uR(n,s,u)).iY)return[3,6];h.label=3;case 3:return h.trys.push([3,5,,6]),[4,o.ZK];case 4:return h.sent(),[3,6];case 5:return h.sent(),[3,7];case 6:n=o.uE||n,h.label=7;case 7:return[3,1];case 8:return[2,n]}})}).call(this)},i.bY=function(t){this.PY.unshift(t)},i.SY=function(t){this.PY.push(t)},i.TY=function(t){Yn(this.PY,t)},i.dX=function(t){this.IY.unshift(t)},i._X=function(t){Yn(this.IY,t)},i.kn=function(){this.iE.kn(),tr(this.PY),tr(this.IY)},t}();V(),It(),Bt(),Dt();var cR=function(){function t(t){this.aV=void 0,this.hu=void 0,this.aV=t}var i=t.prototype;return i.bY=function(t){this.aV.bY(t)},i.TY=function(t){this.aV.TY(t)},i.dX=function(t){this.aV.dX(t)},i._X=function(t){this.aV._X(t)},xt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{addRequestInterceptor:function(i){t.bY(i)},removeRequestInterceptor:function(i){t.TY(i)},addResponseInterceptor:function(i){t.dX(i)},removeResponseInterceptor:function(i){t._X(i)}}}(this)),this.hu}}]),t}(),fR=function(t){function i(i,n,r){var e;return(e=t.call(this,n)||this).LY=void 0,e.aV=void 0,e.Mz=void 0,e.hu=void 0,e.OY=void 0,e.FY=void 0,e.LY=i,e.aV=n,e.Mz=r,e.OY=function(t){e.So(t)},e.FY=function(t){e.So(t)},e.LY.wn(ch.Xw,e.OY),e.LY.wn(ch.Gw,e.FY),e}Pt(i,t);var n=i.prototype;return n.RY=function(t){this.Mz.RY(t)},n.bY=function(t){this.aV.bY(t)},n.TY=function(t){this.aV.TY(t)},n.dX=function(t){this.aV.dX(t)},n._X=function(t){this.aV._X(t)},n.kn=function(){this.Vo(),this.LY.mn(ch.Xw,this.OY),this.LY.mn(ch.Gw,this.FY)},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{get online(){return t.cP},get estimator(){return function(t){return{get bandwidth(){return t.IW},get roundTripTime(){return t.RW}}}(t.CY)},setEstimator:function(i){t.RY(function(t){if(!t)return;return{get IW(){return Zg(t.bandwidth)},get RW(){return Zg(t.roundTripTime)},DW:function(i){return function(t){if(!t)return;return{DY:function(i){t.markRequestStart(i)},NY:function(i){t.markResponseStart(i)},BY:function(i,n){t.markResponseData(i,n)},MY:function(i){t.markResponseEnd(i)}}}(t.createMeasurer(ZI(i)))}}}(i))},addRequestInterceptor:function(i){t.bY(i)},removeRequestInterceptor:function(i){t.TY(i)},addResponseInterceptor:function(i){t.dX(i)},removeResponseInterceptor:function(i){t._X(i)},addEventListener:function(i,n){t.wn(i,n)},removeEventListener:function(i,n){t.mn(i,n)}}}(this)),this.hu}},{key:"cP",get:function(){return this.LY.cP}},{key:"CY",get:function(){return this.Mz.CY}}]),i}(uh);V(),It(),Bt(),Dt(),V(),It(),V(),It();var vR=function(t){return t.PERFORMANCE="performance",t.QUALITY="quality",t.BANDWIDTH="bandwidth",t}({});V(),It(),H();function dR(t,i,n,r,e,s){var u=[],o=t-A.max(s,1),h=t+e;if(i&&n){var a=Cn(n,1,5),c=i-a;o=A.min(o,c);var f=i+n+a;h=A.max(h,f)}return 0!==o&&r.jM(0,o)&&u.push([0,o]),r.jM(h,1/0)&&u.push([h,1/0]),u}function lR(t){return j(t,y)&&"QuotaExceededError"===t.name}V(),It();var gR={type:vR.BANDWIDTH};function wR(t){var i=zg(gR);return qi(t)?i.type=mR(t):Wi(t)&&function(t){switch(t){case vR.PERFORMANCE:case vR.QUALITY:case vR.BANDWIDTH:return!0;default:return!1}}(t.type)&&(i.type=mR(t.type)),Wi(t)&&Wi(t.metadata)&&(i.metadata=function(t){var i={},n=Jg(t.bitrate);return E(n)||(i.bitrate=n),i}(t.metadata)),i}function mR(t){switch(t){case"bandwidth":return vR.BANDWIDTH;case"performance":return vR.PERFORMANCE;case"quality":return vR.QUALITY}}V(),It(),Dt();var pR=function(t){function i(i){var n;return(n=t.call(this,"UY")||this).VY=void 0,n.VY=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var yR=function(t){function i(i){var n;return(n=t.call(this,"HY")||this).WY=void 0,n.WY=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var _R=function(t){function i(i){var n;return(n=t.call(this,"qY")||this).zY=void 0,n.zY=i,n}return Pt(i,t),i}(ah),kR=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).hu=function(t){return{get strategy(){return function(t){return{metadata:t.metadata,type:t.type}}(t.WY)},set strategy(i){t.WY=wR(i)},get targetBuffer(){return t.VY},set targetBuffer(i){var n=Jg(i);E(n)||(t.VY=n)},get bufferLookbackWindow(){return t.zY},set bufferLookbackWindow(i){var n=Jg(i);E(n)||(t.zY=n<=0?30:n)},get maxBufferLength(){return t.$Y},get clearBufferWhenSettingTargetQuality(){return t.eJ},set clearBufferWhenSettingTargetQuality(i){t.eJ=$g(i)}}}(i),i.QY=gR,i.KY=20,i.ZY=30,i.JY=1/0,i.sJ=!1,i.tJ=void 0,i.XY=void 0,i}Pt(i,t);var n=i.prototype;return n.GY=function(t){this.XY=t},n.RY=function(t){this.tJ=t},n.iJ=function(t){var i=A.min(t,.8*this.JY);if(i=A.max(10,i),this.JY===i)return!1;var n=this.YY;this.JY=i;var r=this.YY;return r!==n&&this.So(new pR(r)),!0},xt(i,[{key:"jY",get:function(){switch(this.QY.type){case vR.PERFORMANCE:return 0;case vR.QUALITY:return 1/0;case vR.BANDWIDTH:return this.QY.metadata&&void 0!==this.QY.metadata.bitrate?this.QY.metadata.bitrate:Nb.Bg.pW();default:return Nb.Bg.pW()}}},{key:"Ca",get:function(){return this.hu}},{key:"WY",get:function(){return this.QY},set:function(t){this.QY=t,this.So(new yR(t))}},{key:"VY",get:function(){return this.KY},set:function(t){this.KY=t,this.So(new pR(t))}},{key:"YY",get:function(){return A.min(this.KY,this.JY)}},{key:"zY",get:function(){return this.ZY},set:function(t){this.ZY=t,this.So(new _R(t))}},{key:"$Y",get:function(){return this.JY}},{key:"CY",get:function(){var t;return null!=(t=this.tJ)?t:this.XY.dq}},{key:"eJ",get:function(){return this.sJ},set:function(t){this.sJ=t}}]),i}(uh);V(),It(),Bt(),Dt(),V(),It(),Dt();var bR=function(t){function i(){return t.call(this,"bI")||this}return Pt(i,t),i.prototype.xa=function(){return new AR},i}(Cg),AR=function(t){function i(){return t.call(this,"change")||this}return Pt(i,t),i}(ah);V(),It(),V(),It(),Dt(),Ut();var TR=function(t){function i(i,n,r){var e;(e=t.call(this,r)||this).nJ=void 0,e.Zf=void 0,e.rJ=function(t){Pg(t)&&Sr(function(){e.So(t.Ca)})},e.nJ=i,e.Zf=n;for(var s,u=Ft(e.Zf);!(s=u()).done;){var o=s.value;e.nJ.wn(o,e.rJ)}return e}return Pt(i,t),i.prototype.kn=function(){this.Vo();for(var t,i=Ft(this.Zf);!(t=i()).done;){var n=t.value;this.nJ.mn(n,this.rJ)}},i}(uh),SR=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).nJ=void 0,r.rJ=function(t){Pg(t)&&Sr(function(){r.So(t.Ca)})},r.nJ=i,r.nJ.lw(r.rJ),r}return Pt(i,t),i.prototype.kn=function(){this.Vo(),this.nJ.mw(this.rJ)},i}(hh);var ER=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).HO=0,i.zO=1/0,i.hu=void 0,i}Pt(i,t);var n=i.prototype;return n.hr=function(){0===this.HO&&this.zO===1/0||(this.HO=0,this.zO=1/0,this.So(new bR))},n.hJ=function(){return new LA([this.CO,this.RO],[!0,!0])},xt(i,[{key:"CO",get:function(){return this.HO},set:function(t){if(this.RO<=t)throw new y("Start time of a clip should be smaller than the end time.");this.HO!==t&&(this.HO=t,this.So(new bR))}},{key:"RO",get:function(){return this.zO},set:function(t){if(t<=this.CO)throw new y("End time of a clip should be larger than the start time.");this.zO!==t&&(this.zO=t,this.So(new bR))}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get startTime(){return t.CO},set startTime(i){t.CO=i},get endTime(){return t.RO},set endTime(i){t.RO=i},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new SR(t,n),n}(this)),this.hu}}]),i}(hh);V(),It(),Wt(),Bt(),Dt(),Yt();var IR=function(t){function i(n,r){var e;return(e=t.call(this,n)||this).oJ=void 0,e.uJ=!1,e.pJ=void 0,e.mJ=!1,e.lJ=function(){e.dJ(),e.aJ()},e.Nc=function(){e.fJ(),e.aJ(),e.gJ&&e.zx>=e.oJ.RO-i.wJ&&!e.Qx&&(e.pJ=pI(e.Nc))},e.vJ=function(){e.mJ=!0},e._J=function(){e.mJ&&(e.mJ=!1,e.aJ())},e.oJ=r,e.oJ.wn("bI",e.lJ),e.Lx.wn(ch.py,e.Nc),e}Pt(i,t);var n=i.prototype;return n.Xx=function(i,n){var r=this.oJ.hJ().LM(i);t.prototype.Xx.call(this,r,n),this.aJ()},n.Kx=function(){return t.prototype.Kx.call(this)||this.uJ},n.EP=function(){return LA.jn(t.prototype.EP.call(this)).Mn(this.oJ.hJ())._s()},n.QP=function(){this.Kx()?this.Xx(this.cJ.start(0)):this.dJ(),t.prototype.QP.call(this),this.aJ()},n.Ta=function(i,n){var r=this;return jt(function(){return zt(this,function(e){switch(e.label){case 0:return pr(n),this.uJ=!1,this.oJ.hr(),[4,t.prototype.Ta.call(r,i,n)];case 1:return e.sent(),[2]}})}).call(this)},n.kn=function(){return this.oJ.mn("bI",this.lJ),this.Lx.mn(ch.py,this.Nc),this.fJ(),t.prototype.kn.call(this)},n.eI=function(i){switch(i.type){case ch.$w:return this.So(i),this.vJ(),!0;case ch.Zw:case ch.Rw:return this.So(i),this._J(),!0;case ch.Nw:if(this.gJ)return!0}return t.prototype.eI.call(this,i)},n.fJ=function(){this.pJ&&(yI(this.pJ),this.pJ=void 0)},n.aJ=function(){var t=this.zx,n=this.gJ&&t>=this.oJ.RO-i.fd;this.uJ&&!n?(this.uJ=!1,this.lP&&this.QP()):this.uJ||!n||this.xP||this.mJ||(this.uJ=!0,this.So(new ST(t)),this.jP())},n.dJ=function(){if(this.ct!==1/0){var t=this.cJ,n=LA.jn(t).LM(this.zx);Pn(this.zx,n,i.fd)||this.Xx(n)}},xt(i,[{key:"cJ",get:function(){return this.EP().length?this.EP():this.oJ.hJ()._s()}},{key:"gJ",get:function(){return this.oJ.RO=t},i.jJ=function(){var t=eA.zy(UR);if(t)return OR.UJ(t)},i.JJ=function(t,i){this.mQ.XJ(t),this.ZJ(i)},i.ZJ=function(t){throw Ye(t.message),this.$J.bQ(t.message),t},t}();V(),It(),Wt(),Bt(),Yt();var jR=function(){function t(){this.tZ=void 0,this.iZ=new Xa}var i=t.prototype;return i.XJ=function(t){this.tZ=t,this.iZ.Qy()},i.pQ=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.tZ?[2,ot.resolve(this.tZ)]:[4,this.iZ.Yy];case 1:return t.sent(),[2,this.tZ]}})}).call(this)},xt(t,[{key:"eZ",get:function(){return this.tZ}}]),t}();V(),It(),Bt(),Dt(),V(),It(),Dt();var HR=function(t){function i(){return t.call(this,"bI")||this}return Pt(i,t),i.prototype.xa=function(){return new WR},i}(Cg),WR=function(t){function i(){return t.call(this,"change")||this}return Pt(i,t),i}(ah);function zR(t){var i,n={get fontFamily(){return t.sZ},set fontFamily(i){t.sZ=i},get fontColor(){return t.nZ},set fontColor(i){t.nZ=i},get fontSize(){return t.rZ},set fontSize(i){t.rZ=i},get backgroundColor(){return t.hZ},set backgroundColor(i){t.hZ=i},get windowColor(){return t.oZ},set windowColor(i){t.oZ=i},get edgeStyle(){return t.aZ},set edgeStyle(i){t.aZ=i},get marginTop(){return t.uZ},set marginTop(i){t.uZ=i},get marginBottom(){return t.cZ},set marginBottom(i){t.cZ=i},get marginLeft(){return t.dZ},set marginLeft(i){t.dZ=i},get marginRight(){return t.lZ},set marginRight(i){t.lZ=i},addEventListener:function(t,n){var r=nw(t,tw);i.wn(r,n)},removeEventListener:function(t,n){var r=nw(t,tw);i.mn(r,n)}};return i=new oh(n),t.wn(["bI"],function(t){return i.So(t.Ca)}),n}V(),It();var qR={sZ:void 0,nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0,aZ:void 0,uZ:void 0,cZ:void 0,dZ:void 0,lZ:void 0},XR="THEOplayer.textTrackStyle.",GR=function(t){function i(){var n;return(n=t.call(this)||this).vZ=void 0,n.hu=void 0,n.vZ=i.gZ(),n}Pt(i,t);var n=i.prototype;return n.hr=function(){this.er(qR)},n.er=function(t){this.vZ=io({},this.vZ,t),i._Z(this.vZ),this.So(new HR)},i.gZ=function(){var t=io({},qR);return t.sZ=eA.zy(XR+"fontFamily")||t.sZ,t.nZ=eA.zy(XR+"fontColor")||t.nZ,t.rZ=eA.zy(XR+"fontSize")||t.rZ,t.hZ=eA.zy(XR+"backgroundColor")||t.hZ,t.oZ=eA.zy(XR+"windowColor")||t.oZ,t.aZ=eA.zy(XR+"edgeStyle")||t.aZ,t},i._Z=function(t){eA.Gy(XR+"fontFamily",t.sZ||""),eA.Gy(XR+"fontColor",t.nZ||""),eA.Gy(XR+"fontSize",t.rZ||""),eA.Gy(XR+"backgroundColor",t.hZ||""),eA.Gy(XR+"windowColor",t.oZ||""),eA.Gy(XR+"edgeStyle",t.aZ||"")},xt(i,[{key:"fZ",get:function(){return this.vZ}},{key:"sZ",get:function(){return this.vZ.sZ},set:function(t){this.er({sZ:t})}},{key:"nZ",get:function(){return this.vZ.nZ},set:function(t){this.er({nZ:t})}},{key:"rZ",get:function(){return this.vZ.rZ},set:function(t){this.er({rZ:t})}},{key:"hZ",get:function(){return this.vZ.hZ},set:function(t){this.er({hZ:t})}},{key:"oZ",get:function(){return this.vZ.oZ},set:function(t){this.er({oZ:t})}},{key:"aZ",get:function(){return this.vZ.aZ},set:function(t){this.er({aZ:t})}},{key:"uZ",get:function(){return this.vZ.uZ},set:function(t){this.er({uZ:t})}},{key:"cZ",get:function(){return this.vZ.cZ},set:function(t){this.er({cZ:t})}},{key:"lZ",get:function(){return this.vZ.lZ},set:function(t){this.er({lZ:t})}},{key:"dZ",get:function(){return this.vZ.dZ},set:function(t){this.er({dZ:t})}},{key:"Ca",get:function(){return this.hu||(this.hu=zR(this)),this.hu}}]),i}(uh);function QR(t,i){var n,r;t.style.marginLeft=(null!=(n=i.dZ)?n:0)+"px",t.style.marginRight=(null!=(r=i.lZ)?r:0)+"px",t.style.width="calc(100% - "+t.style.marginLeft+" - "+t.style.marginRight+")"}function YR(t){return(null==t?void 0:t.Cd.Km)===Ly.SV}V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It(),Bt(),Dt(),V(),It(),Wt(),Bt(),Dt(),H(),Ut(),Yt(),V(),It(),V(),It();var $R=[ch.uo,ch.jw,Fy.PM,ch.py,ch.Qw,ch.Ww,ch.$w,ch.Zw,ch.Nw,ch.Kw,ch.wy,ch.Cw,Fy.AI,ch.Jw,ty.ma,mh.Dw,mh.By,ch.xw,ch.Ew,ch.yy,ch.Ay,ch.LICENSE_REQUEST_GENERATED,ch.Fw,ch.Vw,ch.Lw,ch.Bw],KR={BL:!1};function JR(t){return void 0!==t.DP}function ZR(t){return t.Cd.Km===Ly.SV}V(),It();var tC=function(t){return t.pZ="mZ",t}({}),iC=["mZ"],nC=function(t){return t[t.wZ=0]="wZ",t[t.MT=1]="MT",t[t.yZ=2]="yZ",t}({});V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It(),Wt(),Bt(),Dt(),H(),Ut(),Yt();var rC=["loadstart","encrypted","waitingforkey","webkitneedkey","msneedkey"],eC=function(t){return t.bZ="AZ",t.SZ="TZ",t.kZ="EZ",t}({}),sC=function(t){function i(i,n,r,e,s){var u;(u=t.call(this)||this).ZS=void 0,u.PL=void 0,u.pT=void 0,u.VZ=!1,u.HZ=new Xa,u.CZ=!1,u.ta=new Rd,u.DZ=void 0,u.hw=void 0,u.GJ=void 0,u.ES=void 0,u.MZ=function(){u.CZ=!0},u.LZ=function(){u.UZ(!0)},u.ZS=i,u.PL=n,u.pT=n.hq,u.DZ=r,u.hw=e,u.GJ=s,u.pT.addEventListener("loadedmetadata",u.MZ);for(var o,h=Ft(rC);!(o=h()).done;){var a=o.value;u.pT.addEventListener(a,u.LZ)}return u}Pt(i,t);var n=i.prototype;return n.xZ=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,this.hw.nw(t.Ym,i)];case 1:return[4,r.sent().RS()];case 2:return n=r.sent(),[4,this.PZ(n)];case 3:return r.sent(),[2,n]}})}).call(this)},n.IZ=function(t){var i=this,n=this.ES;return n?0!==t.fq.length&&t.fq.some(function(t){return t.xS.Ym===n.xS}):0!==this.ZS.fq.length?t.fq.some(function(t){return i.ZS.fq.some(function(i){return t.xS===i.xS})}):0===t.fq.length||!this.CZ},n.RZ=function(t){return this.DZ.RZ(t),this.ZS=t,ot.resolve()},n.NZ=function(t){this.DZ.NZ(t)},n.BZ=function(){if(!Oi.vg)return"";var t=this.GJ.ps5;return"; pass_through="+t.passThrough+'; playmode="'+t.playMode+'";'},n.zg=function(){return jt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:for(this.Vo(),this.pT.removeEventListener("loadedmetadata",this.MZ),t=Ft(rC);!(i=t()).done;)n=i.value,this.pT.removeEventListener(n,this.LZ);return[4,this.ta.kn()];case 1:return r.sent(),this.OZ(),[4,this.DZ.hr()];case 2:return r.sent(),[4,this.FZ(void 0)];case 3:return r.sent(),[2]}})}).call(this)},n.UZ=function(t){t!==this.VZ&&(this.VZ=t,t?this.HZ.Qy(void 0):this.HZ=new Xa)},n.PZ=function(t){var i=this;return this.ta.Zo(function(){return i.FZ(t)})},n.FZ=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:if(t&&!this.pT.src&&!this.pT.srcObject)throw new lw(pd.CONTENT_PROTECTION_ERROR,"Attempted to attach MediaKeys to a sourceless MediaElement");if(!t&&(this.pT.src||this.pT.srcObject))throw new lw(pd.CONTENT_PROTECTION_ERROR,"Attempted to remove MediaKeys from a non-empty MediaElement");return!t||this.VZ?[3,2]:[4,this.HZ.Yy];case 1:n.sent(),n.label=2;case 2:return(i=this.ES)?[4,i.IS(this.pT)]:[3,4];case 3:n.sent(),this.ES=void 0,n.label=4;case 4:return t?[4,t._n(this.pT)]:[3,6];case 5:n.sent(),this.ES=t,n.label=6;case 6:return[2]}})}).call(this)},n.Ta=function(t,i){var n=this;return this.ta.Zo(function(){return n.WZ(t,i)})},n.WZ=function(t,i){this.UZ(!1);var n=this.PL.vP;if(qi(t)&&i){var r=this.qZ(t,i);this.pT.appendChild(r)}else if(qi(t))this.pT.src=t;else if(function(t){if(void 0!==f.ManagedMediaSource&&j(t,f.ManagedMediaSource))return!0;if("undefined"!=typeof MediaSource&&j(t,MediaSource))return!0;return!1}(t))if(function(t){return"srcObject"in t&&Oi.ru&&Oi.Q_>=17}(this.pT))try{this.pT.srcObject=t}catch(i){this.pT.src=URL.createObjectURL(t)}else this.pT.src=URL.createObjectURL(t);else uC(t)&&(this.pT.srcObject=t);this.PL.vP=n},n.qZ=function(t,i){var n=v.createElement("source");return n.src=t,n.type=i+this.BZ(),n},n.zZ=function(t){var i=this;return this.ta.Zo(function(){return i.GZ(t)})},n.GZ=function(t){this.WZ(t),this.pT.load()},n.OZ=function(){this.UZ(!1),Dr(this.pT)},n.XZ=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.ES?[4,this.ES.hr()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})}).call(this)},xt(i,[{key:"Cd",get:function(){return this.ZS}},{key:"hq",get:function(){return this.pT}}]),i}(uh);function uC(t){return!("undefined"==typeof MediaStream||!j(t,MediaStream))}var oC=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.GY=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:switch((t=this.Cd)._q){case _A.lC:case _A.fC:this.pT.setAttribute("crossorigin",t._q);break;case _A.Fk:default:this.pT.removeAttribute("crossorigin")}return void 0!==t.wP?this.pT.preload=t.wP:this.pT.preload=uS.PW,void 0!==t.gq?this.pT.title=t.gq:wn(this.pT),t.YZ?[4,this.zZ(t.YZ)]:[3,2];case 1:return i.sent(),[3,6];case 2:return Oi.vg?[4,this.Ta(t.rC,t.GT)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,this.Ta(t.rC)];case 5:i.sent(),i.label=6;case 6:return this.DZ.Un(this,t),[2]}})}).call(this)},n.IZ=function(t){return!1},n.RZ=function(t){return ot.resolve(void 0)},n.JZ=function(t){return!1},n.ZZ=function(){return!uC(this.ZS.YZ)},n.zg=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return wn(this.pT),[4,t.prototype.zg.call(i)];case 1:return n.sent(),[2]}})}).call(this)},i.$Z=function(t,i){return!!i.canPlayType&&Boolean(i.canPlayType(t.GT))},xt(i,[{key:"Fx",get:function(){return LA.jn(this.pT.buffered)}},{key:"ct",get:function(){return this.pT.duration}},{key:"jZ",get:function(){var t=this.ct;if(!isFinite(t))return!1;var i=this.Fx;return 0!==i.V&&t-i.An(i.V-1)0||this.pT.videoHeight>0))return this.Fx}}]),i}(sC);V(),It(),Dt();var hC=function(t){function i(i){var n;return(n=t.call(this,ch.Qw)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var aC=function(t){function i(){return t.call(this,ch.Ww)||this}return Pt(i,t),i}(ah);V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Bt(),Dt();var cC=function(t){return t.t$="i$",t}({}),fC=function(t){function i(i){var n;return(n=t.call(this,"i$")||this).e$=void 0,n.e$=i,n}return Pt(i,t),i}(ah),vC=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).n$=LA.rL(),i}Pt(i,t);var n=i.prototype;return n.r$=function(t,i){if(!Pn(t,i,1e-5)){var n=new LA([t,i]);this.n$=this.n$.HM(n),this.So(new fC(n))}},n.h$=function(t,i){this.n$=this.n$.qM(new LA([t,i]))},n.hr=function(){this.n$=LA.rL()},n.kn=function(){this.Vo()},xt(i,[{key:"s$",get:function(){return this.n$}}]),i}(uh);function dC(t,i){return void 0===i&&(i=new il({highWaterMark:1/0})),new Zd(new lC(t,i),{highWaterMark:0})}V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It();var lC=function(){function t(t,i){var n=this,r=i.size,e=void 0===r?function(){return 1}:r,s=i.highWaterMark,u=void 0===s?1:s;this.Wd=void 0,this.v$=void 0,this.d$=void 0,this.tf=[],this.if=0,this.iZ=void 0,this.c$=!1,this.l$=void 0,this.f$=function(t){return t.done?(n.u$(),void n.iZ.close()):(n.tf.push(t.value),n.if+=n.v$(t.value),n.c$&&n.u$(),n.o$()?n.Wd.read().then(n.f$):void 0)},this.PE=function(t){n.u$(),n.iZ.error(t)},this.Wd=t.getReader(),this.v$=e,this.d$=u}var i=t.prototype;return i.start=function(t){this.iZ=t,this.o$()&&this.a$()},i.pull=function(){this.tf.length>0?this.u$():this.c$=!0,this.o$()&&this.a$()},i.cancel=function(t){return tr(this.tf),this.if=0,this.c$=!1,this.Wd.cancel(t)},i.u$=function(){if(0!==this.tf.length){var t=this.tf;this.tf=[],this.if=0,this.c$=!1,this.iZ.enqueue(t)}},i.o$=function(){return!!this.c$||this.d$-this.if>0},i.a$=function(){var t=this;if(!this.l$){var i=this.Wd.read().then(this.f$).catch(this.PE);this.l$=i;var n=function(){t.l$===i&&(t.l$=void 0)};i.then(n,n)}},t}();V(),It(),V(),It(),Bt(),Dt(),H(),Ut(),V(),It(),Ut(),V(),It();var gC=function(){function t(){this.g$=[],this.Wy=0}var i=t.prototype;return i._$=function(t){this.g$.push(t),this.Wy+=t.byteLength},i.p$=function(t){if(this.Wy<=t)return this.m$();for(var i=this.g$,n=0,r=0;r0&&nthis.tf.Wy)return;switch(this.Ra){case 0:this.R$(t);break;case 1:this.D$(t);break;case 2:this.N$(t)}}},i.B$=function(){this.Ra=0,this.C$=8},i.R$=function(t){var i=Aa(this.tf.w$(this.C$)),n=new Pa,r=Sp.wD(i,n);if(!r.vD)return this.C$=r.bD,void(t&&this.C$>this.tf.Wy&&this.M$(this.tf.Wy));var e=r.yD.Km,s=r.yD.Wy;0===s&&(s=1/0),this.T$(e,s),this.L$(e)?this.O$(s):this.M$(s)},i.O$=function(t){this.Ra=1,this.C$=t},i.D$=function(t){var i=Aa(this.tf.A$(this.C$)),n=new Pa,r=Sp._D(i,n,!t);if(!r.vD)throw new Tp(n.ac);this.k$(),this.F$(r.gD),this.B$()},i.M$=function(t){this.Ra=2,this.C$=0,this.U$=t},i.N$=function(t){var i=this.tf.y$(this.U$);this.U$-=i.Wy;for(var n,r=Ft(i.g$);!(n=r()).done;){var e=n.value;this.V$(e)}(0===this.U$||t&&this.U$===1/0)&&(this.k$(),this.B$())},t}();function mC(t){return j(t,Yf)}function pC(t){return j(t,Gf)}function yC(t){return j(t,zf)||j(t,qf)}function _C(t){return j(t,gf)}function kC(t){return j(t,zc)}function bC(t){return j(t,Lf)}function AC(t){return j(t,Of)}function TC(t){return j(t,hv)}function SC(t){return j(t,uv)}function EC(t){return j(t,nv)}function IC(t){return j(t,ev)}function RC(t,i){var n=Wn(t.boxes,EC);if(n&&n.flags.baseDataOffsetPresent)n.baseDataOffset=n.baseDataOffset.add(i);else for(var r,e=Ft(t.boxes);!(r=e()).done;){var s=r.value;j(s,ev)&&s.flags.dataOffsetPresent&&(s.dataOffset=s.dataOffset+i)}}V(),It(),H(),Ut();var CC=function(t){function i(i){var n;return(n=t.call(this)||this).iZ=void 0,n.t0=void 0,n.X$=void 0,n.Q$=eo(),n.t0=i,n}Pt(i,t);var n=i.prototype;return n.start=function(t){this.iZ=t},n.transform=function(t){this.E$(t)},n.flush=function(){this.P$()},n.L$=function(t){return t===mp.HC||t===mp.NR||t===mp.GR},n.F$=function(t){var i=this.H$(t);this.iZ.enqueue(i)},n.V$=function(t){this.iZ.enqueue(t)},n.H$=function(t){var i=Ta(t.lk.lk);switch(t.Km){case"moov":return this.W$(i);case"sidx":return this.q$(i);case"moof":return this.z$(i)}return i},n.j$=function(t){var i=this.Q$.get(t);if(void 0===i)throw new y("Expected to have found a media header timescale for track ID "+t+".");return i},n.W$=function(t){for(var i=Ev(t),n=0;n>2,h=!!(2&u),a=Gh(t,i,3),c=Kh(t,i),f=Kh(t,i);if(i.ac=n)){var r=t.zy(i.byte);return i.byte+=1,r}}function VC(t,i){return function(t,i,n){for(var r=0,e=n;e>0;)e-=1,r=256*r+UC(t,i);return r}(t,i,2)}V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),V(),It(),Bt(),Ut();var jC=function(){function t(){this.j0=0,this.X0=[],this.LU={}}var i=t.prototype;return i.G0=function(t){this.X0=this.X0.concat(t.X0),this.j0+=t.V},i.Q0=function(t,i,n){var r=this.j0,e=n-i;e>0&&(this.X0.push({K0:i,Y0:n,J0:e,Z0:r,$0:t}),this.j0+=e)},i.zy=function(t){for(var i,n=Ft(this.X0);!(i=n()).done;){var r=i.value;if(r.Z0<=t&&t=this.j0))if(this.j0=t,0!==t)for(var r=i.length-1;r>=0;r-=1){var e=i[r];if(n<=e.J0)return e.Y0-=n,e.J0-=n,void(i.length!==r+1&&(i.length=r+1));n-=e.J0}else i.length=0}},{key:"lk",get:function(){for(var t,i=new Array(this.j0),n=0,r=Ft(this.X0);!(t=r()).done;)for(var e=t.value,s=e.Y0,u=e.K0;u0;)e-=1,r=2*r+WC(t,i);return r}function qC(t,i){for(var n=0;0===WC(t,i)&&n<32;)n+=1;return zC(t,i,n)+A.pow(2,n)-1}function XC(t,i){var n=qC(t,i);return 1&n?A.floor((n+1)/2):-A.floor(n/2)}function GC(t,i){var n,r=[],e={byte:1};do{r.push(YC(t,i,e)),n=i.zy(e.byte)}while(void 0!==n&&128!==n);return r}function QC(t,i){var n,r=0;do{r+=n=UC(t,i)}while(255===n);return r}function YC(t,i,n){var r=QC(i,n),e=QC(i,n),s=n.byte,u=s+e;return n.byte=u,{e1:t,s1:r,n1:e,h1:s,o1:u,a1:i}}var $C=function(t){return t[t.u1=1]="u1",t[t.c1=2]="c1",t[t.d1=3]="d1",t[t.v1=4]="v1",t[t._1=5]="_1",t[t.g1=6]="g1",t[t.m1=7]="m1",t[t.w1=8]="w1",t[t.b1=9]="b1",t}({}),KC=[void 0,[1,1],[12,11],[10,11],[16,11],[40,33],[24,11],[20,11],[32,11],[80,33],[18,11],[15,11],[64,33],[160,99],[4,3],[3,2],[2,1]];function JC(t,i,n){for(var r=8,e=8,s=0;s=2&&t.push(i),e=0)}this.T1=i-t.length},i.P1=function(t){for(var i,n=t,r=Ft(this.S1);!(i=r()).done;){if(!(i.value<=n))return n;n+=1}return n},i.zy=function(t){if(!(t>this.E1.V))return t>this.T1&&this.A1(),this.E1.zy(this.P1(t))},t}();function tP(t){var i,n,r,e,s,u,o=new ZC(t),h=0,a=0,c=0,f=0,v=o.zy(1),d={bit:32};if(qC(o,d),100===v||110===v||122===v||144===v){var l=qC(o,d);if(3===l&&(i=WC(o,d)),qC(o,d),qC(o,d),WC(o,d),1===WC(o,d))for(var g=0;g<(3!==l?8:12);g+=1){1===WC(o,d)&&JC(o,d,g<6?16:64)}}var w=qC(o,d),m=qC(o,d);if(0===m)qC(o,d);else if(1===m){WC(o,d),XC(o,d),XC(o,d);for(var p=qC(o,d),y=0;y>3),C);n.Ly(8*C),I.push({M1:C,L1:P})}b.push({O1:T,F1:S,U1:E,V1:I})}return{F0:r,H1:e,W1:s,q1:u,z1:h,G1:c,X1:f,j1:v,Q1:o,K1:d,Y1:l,J1:g,Z1:w,t2:p,i2:y,e2:m,W0:_,s2:k,n2:b}}(Aa(t.eB.lk),new Pa);i=function(t,i){var n=t.toString()+".";switch(i.H1){case 0:break;case 1:n+="A";break;case 2:n+="B";break;case 3:n+="C";break;default:return}switch(n+=i.q1.toString()+".",n+=function(t){var i=t;return i=i>>>1&1431655765|(1431655765&i)<<1,i=i>>>2&858993459|(858993459&i)<<2,i=i>>>4&252645135|(252645135&i)<<4,i=i>>>8&16711935|(16711935&i)<<8,i=i>>>16|i<<16,i}(i.Q1).toString(16)+".",i.W1){case 0:n+="L";break;case 1:n+="H";break;default:return}n+=i.G1.toString();for(var r=i.z1.reduce(function(t,i){return 0===t?i:i+1},0),e=0;e0?t.An(t.V-1):0,this.L3.U3()},i.I3=function(){this.O3=void 0},xt(t,[{key:"Fx",get:function(){if(this.L3.AP===PP.S3)return LA.rL();var t=LA.jn(this.j2.buffered).Mn(LA.hL()),i=this.O3;return void 0!==i&&t.V>0&&t.An(t.V-1)===i&&(t=t.HM(LA.sL(i))),t}}]),t}();function pP(t,i,n,r,e,s,u){var o=new mP(e,t),h=new gP(o,t,e,n,s);return new yP(t,i,n,r,o,h,u)}var yP=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this)||this).w3=void 0,h.ZS=void 0,h.H3=void 0,h.PL=void 0,h.jS=void 0,h.q3=void 0,h.u3=void 0,h.z3=void 0,h.Q3=ro(),h.w3=i,h.ZS=r,h.jS=r.GT,h.H3=e,h.PL=n,h.u3=s,h.z3=u,h.q3=o,h.z3.wn(tC.pZ,h.Rs),h}Pt(i,t);var n=i.prototype;return n.jZ=function(){return this.u3.jZ()},n.F3=function(){this.u3.F3()},n.I3=function(){this.u3.I3(),this.z3.I3()},n.G3=function(t,i){this.q3.r$(t,i)},n.X3=function(t,i){this.q3.h$(t,i)},n.j3=function(){return this.z3.y3()},n.Q2=function(t,i,n){return this.z3.Q2(t,i,n)},n.J2=function(t,i,n){return this.z3.J2(t,n)},n.f3=function(t,i){return Oi.w_&&Oi.b_<3?this.z3.f3(t,1/0):this.z3.f3(t,i)},n.pS=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return this.X3(t,i),r=this.Fx,[4,this.z3.m3(t,i,n)];case 1:return s.sent(),e=0!==r.V&&0===this.Fx.V,(Oi.rg||Oi.S_)&&e&&this.PL.Oy(this.PL.zx),[2]}})}).call(this)},n.IZ=function(t){var i=t.GT;if(this.jS===i)return!0;var n=this.Q3.get(i);if(void 0!==n)return n;var r=this.K3(t);return this.Q3.set(i,r),r},n.K3=function(t){var i=this.w3.E3(t.GT);if(void 0===i)return!1;var n=Zv(this.jS),r=Zv(i),e=uP(n),s=uP(r);if(this.z3.b3()){if(!function(t,i){return cr(t,i,aP)}(e,s))return!1;if(Oi.og&&!function(t,i){return cr(t,i,hP)}(e,s))return!1}else{if(n.Km!==r.Km)return!1;if(!oP(e,s))return!1}return!0},n.RZ=function(t){return jt(function(){var i;return zt(this,function(n){return i=t.GT,this.jS!==i&&(this.Q3.clear(),this.z3.RZ(t),this.jS=i),this.ZS=t,this.w3.Y3(),[2]})}).call(this)},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:this.Q3.clear(),this.Vo(),this.q3.kn(),t.label=1;case 1:return t.trys.push([1,3,,4]),this.z3.mn(tC.pZ,this.Rs),[4,this.z3.zg()];case 2:return t.sent(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}})}).call(this)},xt(i,[{key:"Fx",get:function(){return this.u3.Fx}},{key:"Cd",get:function(){return this.ZS}},{key:"GT",get:function(){return this.jS}},{key:"V3",get:function(){return this.H3}},{key:"W3",get:function(){return this.q3.s$}},{key:"VY",get:function(){return this.z3.VY},set:function(t){this.z3.VY=t}},{key:"zY",get:function(){return this.z3.zY},set:function(t){this.z3.zY=t}},{key:"ga",get:function(){return this.z3.ga}}]),i}(uh);V(),It();var _P=function(){function t(t,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=!1),this.Tn=void 0,this.An=void 0,this.Z3=void 0,this.t4=void 0,this.i4=void 0,this.Tn=t,this.An=i,this.Z3=n,this.t4=r,this.i4=Vi.Mg()}return t.prototype.J3=function(){var t=this.Tn,i=this.An;if(this.Z3||this.t4){var n=.001*(Vi.Mg()-this.i4);this.Z3&&(t+=n),this.t4&&(i+=n)}return LA.nL(t,i)},t}();function kP(t){var i=[];if(t.e4&&i.push(t.e4.Fx),t.s4&&i.push(t.s4.Fx),0===i.length)return LA.rL();for(var n,r=0,e=Ft(i);!(n=e()).done;){var s=n.value;s.V>0&&(r=A.max(r,s.An(s.V-1)))}for(var u,o=t.jZ,h=new LA([0,r],[!0,o]),a=Ft(i);!(u=a()).done;){var c=u.value;o&&c.V>0&&(c=c.HM(new LA([c.An(c.V-1),r],[!0,!0]))),h=h.Mn(c)}return h}function bP(t,i,n){var r,e=t.Fx,s=e.zM(i);if(s>=0){if(!(s+1=0))return ot.resolve();r=e.Tn(s)}return t.pS(r,1/0,n)}function AP(t,i,n){if(!t.Cr(i)){var r=t.zM(i,n);if(r>=0){var e=t.Tn(r);if(i0&&r>i+e.D4){var u,o,h=e.s$.MM().qM(s),a=h.ZM(n);if(-1!==a){var c=h.Tn(a);if(c-n<1||e.x4()){var f=h.An(a);0,u=f}}if(!u)(u=null==(o=e.N4)?void 0:o.determineStallJumpTarget())&&u!==n||(u=n+.01*e.R4,s.Cr(u)||(u=e.I4(n,s)));0,e.C4=u,e.R4++,e.D4=A.min(2*e.D4,1e4),e._4(u)}},this.a4.wn(Fy.AI,this.u4),this.PL.wn(ch.Qw,this.u4),this.PL.wn(SP,this.c4),this.N4=r,this.D4=Vi.Tx?5e3:1e3}var i=t.prototype;return i.n4=function(t){this.r4.push(t),t.wn(cC.t$,this.h4)},i.kn=function(){var t=this;this.o4(),this.a4.mn(Fy.AI,this.u4),this.PL.mn(ch.Qw,this.u4),this.PL.mn(SP,this.c4),this.r4.forEach(function(i){return i.mn(cC.t$,t.h4)}),this.d4(),this.l4=!0},i.JZ=function(t){if(this.PL.Qx)return!1;if(0!==this.f4)return!1;var i=this.u3.Fx,n=i.zM(t);if(n>=0&&t+TP=0?n+1:i.$M(t);if(r<0||r>=i.V)return!1;var e=i.Tn(r);return!(LA.nL(t,e).qM(this.s$).eL>1)&&(0!==t||this.PL.xP?Vi.Ax?(this.v4(t,e,250),!0):!(A.abs(e-t)<=.001)&&(this._4(e),!0):(this.v4(t,e,2e3),!0))},i.v4=function(t,i,n){var r=this;this.d4(),this.g4=t,this.PL.wn(ch.$w,this.m4),this.f4=Vi.Og(function(){r.g4===r.PL.zx&&r._4(i),r.d4()},n)},i.d4=function(){0!==this.f4&&(this.PL.mn(ch.$w,this.m4),Vi.Lg(this.f4),this.f4=0)},i._4=function(t){this.PL.Oy(t,!1,!0)},i.w4=function(){0!==this.y4&&(Vi.Lg(this.y4),this.y4=0),this.PL.mn(ch.py,this.ad)},i.b4=function(){this.l4||0===this.A4&&(this.w4(),this.A4=Vi.fm(this.S4,250))},i.o4=function(){0!==this.A4&&(Vi.vm(this.A4),this.A4=0),this.w4(),this.PL.xP||(this.T4=0)},i.E4=function(){return!this.PL.lP&&(!this.PL.xP||this.x4())&&0!==this.PL.vP&&!this.PL.Qx&&!this.PL.lt&&(this.P4()||this.a4.AP>=jy.XL)},i.x4=function(){return!1},i.P4=function(){var t=this.PL.zx,i=this.u3.Fx,n=i.zM(t);return-1!==n&&i.An(n)>t+TP},i.I4=function(t,i){var n=i.zM(t);return n>-1?i.An(n):t},xt(t,[{key:"s$",get:function(){return this.r4.reduce(function(t,i){return t.HM(i.s$)},LA.rL())}}]),t}(),IP=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.x4=function(){if(!Oi.S_||!this.PL.xP)return!1;var t=this.PL.zx,i=this.u3.Fx,n=this.s$.MM().qM(i),r=n.ZM(t);return-1!==r&&n.Tn(r)-t<=3e3},i}(EP),RP=Oi.B_||Oi.L_,CP=Oi.W_||Oi.X_||Oi.ru,PP=function(t){return t.S3="closed",t.rE="open",t.Nw="ended",t}({}),DP=function(t){function i(i,n,r,e,s,u,o,h){var a;return void 0===u&&(u=new Oe(i.t5)),(a=t.call(this,i,n,e,s,h)||this).Z4=void 0,a.B4=void 0,a.X4=void 0,a.M4=void 0,a.j4=void 0,a.H4=new _P(0,1/0),a.aq=void 0,a.L4=void 0,a.O4=void 0,a.G4=void 0,a.Q4=!1,a.Y4=function(){a.So(new ah(eC.SZ))},a.i5=function(){a.So(new ah(eC.kZ))},a.bd=function(){a.K4()},a.B3=function(){a.PL.B3()},a.Z4=u,a.aq=a.Z4.Lp(),a.aq.addEventListener("sourceclose",a.Y4),a.aq.addEventListener("sourceopen",a.i5),a.PL.wn([ch.py,ch.$w,ch.Fw],a.bd),a.G4=new IP(a,r,a.PL,o),a}Pt(i,t);var n=i.prototype;return n.F4=function(t){if(t<0)throw new y("Invalid duration");this.U4()?this.V4(t):this.L4=t},n.V4=function(t){var i=t===1/0;if(i&&this.aq.setLiveSeekableRange){var n=A.pow(2,39);this.aq.setLiveSeekableRange(0,n)}E(t)?(this.aq.duration=In,this.O4=NaN):(this.aq.duration=i?CP?1/0:In:t,this.O4=void 0),this.L4=void 0},n.W4=function(t,i,n,r){this.H4=new _P(t,i,Boolean(n),Boolean(r))},n.GY=function(){return jt(function(){var t,i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:return t=this.ZS,i=Wn(t.q4,function(t){return Qv(t.GT)}),n=Wn(t.q4,function(t){return Yv(t.GT)}),this.pT.disableRemotePlayback=!0,[4,this.z4()];case 1:return c.sent(),r=this.BZ(),i&&(e=new vC,this.G4.n4(e),u=null!=(s=this.E3(i.GT))?s:i.GT,this.X4=this.aq.addSourceBuffer(""+u+r),this.B4=pP(this,this.PL,i,vw.Bk,this.X4,u,e),this.B4.wn(tC.pZ,this.B3)),n&&(o=new vC,this.G4.n4(o),a=null!=(h=this.E3(n.GT))?h:n.GT,this.j4=this.aq.addSourceBuffer(""+a+r),this.M4=pP(this,this.PL,n,vw.Mk,this.j4,a,o),this.M4.wn(tC.pZ,this.B3)),this.DZ.Un(this,t),[2]}})}).call(this)},n.z4=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.zZ.call(i,this.aq)];case 1:return n.sent(),"open"===this.AP?[3,3]:[4,cg(this.aq,"sourceopen")];case 2:n.sent(),n.label=3;case 3:return[2]}})}).call(this)},n.U4=function(){if("open"!==this.AP)return!1;var t=this.B4&&this.B4.ga,i=this.M4&&this.M4.ga;return!(t||i)},n.F3=function(){this.Q4=!0,this.B4&&this.B4.F3(),this.M4&&this.M4.F3(),this.Q4=!1,this.K4()},n.I3=function(){this.B4&&this.B4.I3(),this.M4&&this.M4.I3()},n.IZ=function(i){var n=Wn(i.q4,function(t){return Qv(t.GT)}),r=Wn(i.q4,function(t){return Yv(t.GT)});if(this.B4){if(!n)return!1;if(!this.B4.IZ(n))return!1}else if(n)return!1;if(this.M4){if(!r)return!1;if(!this.M4.IZ(r))return!1}else if(r)return!1;return!!t.prototype.IZ.call(this,i)},n.RZ=function(i){var n=this;return jt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:return r=Wn(i.q4,function(t){return Qv(t.GT)}),e=Wn(i.q4,function(t){return Yv(t.GT)}),s=[],this.B4&&s.push(this.B4.RZ(r)),this.M4&&s.push(this.M4.RZ(e)),[4,ot.all(s)];case 1:return u.sent(),[4,t.prototype.RZ.call(n,i)];case 2:return u.sent(),[2]}})}).call(this)},n.NZ=function(i){t.prototype.NZ.call(this,i)},n.zg=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.aq.removeEventListener("sourceclose",this.Y4),Oi.S_?[4,this.XZ()]:[3,2];case 1:n.sent(),n.label=2;case 2:return this.B4?[4,this.B4.zg()]:[3,4];case 3:if(n.sent(),this.B4=void 0,rh()&&(Oi.S_||Oi.w_))try{this.aq.removeSourceBuffer(this.X4)}catch(t){}this.X4=void 0,n.label=4;case 4:return this.M4?[4,this.M4.zg()]:[3,6];case 5:if(n.sent(),this.M4=void 0,rh()&&(Oi.S_||Oi.w_))try{this.aq.removeSourceBuffer(this.j4)}catch(t){}this.j4=void 0,n.label=6;case 6:return this.pT.src&&URL.revokeObjectURL(this.pT.src),this.pT.disableRemotePlayback=!1,this.PL.mn([ch.py,ch.$w,ch.Fw],this.bd),this.G4.kn(),Oi.w_?[4,this.XZ()]:[3,8];case 7:n.sent(),n.label=8;case 8:return[4,t.prototype.zg.call(i)];case 9:return n.sent(),[2]}})}).call(this)},n.Y3=function(){var t=this,i=this.ZS,n=i.q4.map(function(i){return Qv(i.GT)&&t.B4?t.B4.Cd:Yv(i.GT)&&t.M4?t.M4.Cd:i});this.ZS=io({},i,{q4:n})},n.U3=function(){this.Q4||this.K4()},n.K4=function(){this.J4&&this.U4()&&(this.aq.endOfStream(),this.L4=void 0,this.O4=void 0,this.So(new ah(eC.bZ)),this.PL.B3())},n.R3=function(){this.U4()&&(this.jZ?this.K4():void 0!==this.L4&&this.V4(this.L4))},n.JZ=function(t){return this.G4.JZ(t)},n.ZZ=function(){return!0},n.E3=function(t){return NP(this.Z4,t)},i.$Z=function(t){var i=Me(t.t5);if(void 0===i)return!1;if("function"!=typeof i.isTypeSupported)return!1;for(var n,r=new Oe(t.t5),e=Ft(t.q4);!(n=e()).done;){if(void 0===NP(r,n.value.GT))return!1}return!0},xt(i,[{key:"e4",get:function(){return this.B4}},{key:"s4",get:function(){return this.M4}},{key:"ct",get:function(){if(void 0!==this.L4)return this.L4;if(void 0!==this.O4)return this.O4;var t=this.aq.duration;return t===In?1/0:t}},{key:"Fx",get:function(){return RP?kP(this):function(t,i){var n=i;return n.V>0&&t.jZ&&(n=n.HM(LA.sL(n.An(n.V-1)))),n}(this,LA.jn(this.pT.buffered))}},{key:"QZ",get:function(){var t;return null==(t=this.B4)?void 0:t.Fx}},{key:"KZ",get:function(){var t;return null==(t=this.M4)?void 0:t.Fx}},{key:"kP",get:function(){return this.H4.J3().Mn(new LA([0,this.ct],[!0,!0]))}},{key:"jZ",get:function(){return(!this.B4||this.B4.jZ())&&(!this.M4||this.M4.jZ())}},{key:"AP",get:function(){return this.aq.readyState}},{key:"J4",get:function(){if(!this.jZ)return!1;var t=this.Fx;return 0!==t.V&&t.Tn(t.V-1)<=this.PL.zx}}]),i}(sC);function NP(t,i){var n=Zv(i),r=uP(n),e="audio/mp4"===n.Km,s=e&&1===r.length&&"mp4a.40.34"===r[0];if(t.Fp(i)&&(!s||!Oi.X_))return i;if(s)for(var u,o=Ft(['audio/mp4; codecs="mp3"',"audio/mpeg"]);!(u=o()).done;){var h=u.value;if(t.Fp(h))return h}if(e&&1===r.length&&"flac"===r[0].toLowerCase())for(var a,c=Ft(["flac","fLaC","FLAC"]);!(a=c()).done;){var f='audio/mp4; codecs="'+a.value+'"';if(t.Fp(i))return f}}V(),It(),Bt(),Dt(),V(),It(),Dt();var xP=function(t){function i(i){var n;return(n=t.call(this,ch.Fw)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah),BP=[ch.wy,ch.Kw,ch.$w,ch.Fw,ch.uo,ch.jw],OP=function(t){function i(i,n,r,e,s,u,o,h,a,c,f){var v;return(v=t.call(this)||this).xz=void 0,v.Zb=void 0,v.h5=void 0,v.Cz=void 0,v.Pz=void 0,v.Iz=void 0,v.Rz=void 0,v.cA=void 0,v.o5=void 0,v.s5=void 0,v.r5=void 0,v.xz=i,v.Zb=n,v.h5=r,v.Cz=e,v.Pz=s,v.Iz=u,v.Rz=o,v.cA=h,v.o5=a,v.s5=c,v.r5=f,v}Pt(i,t);var n=i.prototype;return n.Oy=function(t,i,n){this.xz!==t&&(this.xz=t,this.s5=i,n&&!this.Pz?(this.r5=!0,this.So(new xP(this.zx))):(this.r5=!1,this.Pz=!0,this.So(new ET(this.zx))))},n.jP=function(){this.Cz||(this.Cz=!0,this.So(new kT(this.zx)))},n.QP=function(){this.Cz&&(this.Cz=!1,this.So(new bT(this.zx)))},n.zg=function(){this.Vo()},xt(i,[{key:"zx",get:function(){return this.xz}},{key:"e5",get:function(){return this.s5}},{key:"n5",get:function(){return this.r5}},{key:"ct",get:function(){return this.Zb}},{key:"Qx",get:function(){return this.h5}},{key:"lP",get:function(){return this.Cz}},{key:"AP",get:function(){return this.o5}},{key:"xP",get:function(){return this.Pz}},{key:"oP",get:function(){return this.Iz},set:function(t){this.oP!==t&&(this.Iz=t,this.So(new RT(this.zx,this.OP)))}},{key:"vP",get:function(){return this.Rz},set:function(t){this.vP!==t&&(this.Rz=t,this.So(new TT(this.zx,this.vP)))}},{key:"OP",get:function(){return this.cA},set:function(t){this.OP!==t&&(this.cA=t,this.So(new RT(this.zx,this.OP)))}}]),i}(uh);function MP(t){return new OP(t.zx,t.ct,t.Qx,t.lP,t.xP,t.oP,t.vP,t.OP,t.AP,!1,t.n5)}function LP(t,i){i.ct===t.ct||E(i.ct)&&E(t.ct)||t.So(new AT(t.ct)),t.oP=i.oP,t.OP=i.OP,t.vP=i.vP,i.lP?t.jP():t.QP().catch(pn),i.zx!==t.zx||i.AP>jy.zL&&t.AP===jy.zL?t.Oy(i.zx,i.e5,i.n5):!i.xP&&t.xP?t.So(new ET(t.zx)):i.xP&&!t.xP&&t.AP>=jy.GL&&t.So(new IT(t.zx)),!i.Qx&&t.Qx&&t.So(new ST(t.zx))}V(),It(),Dt(),Ut(),V(),It(),Bt(),Dt();var FP=function(t){function i(i){var n;return(n=t.call(this)||this).PL=void 0,n.RV=jy.zL,n.c5=function(){n.u5()},n.PL=i,n}Pt(i,t);var n=i.prototype;return n.a5=function(t){this.RV!==t&&(this.RV=t,this.So(new Vy(this.PL.zx,t)))},n.u5=function(){this.a5(this.TP())},n.hr=function(){this.a5(jy.zL)},n.zg=function(){this.Vo()},xt(i,[{key:"AP",get:function(){return this.TP()}}]),i}(uh);V(),It(),Dt(),Ut();var UP=["emptied","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","timeupdate","progress","seeking","seeked"],VP=function(t){function i(i){var n;n=t.call(this,i)||this;for(var r,e=Ft(UP);!(r=e()).done;){var s=r.value;n.PL.hq.addEventListener(s,n.c5)}return n}Pt(i,t);var n=i.prototype;return n.TP=function(){var t=this.PL.hq.readyState;return t>jy.GL&&this.PL.d5?jy.GL:(this.PL.hq.seeking&&t>jy.Qn&&(t=jy.Qn),t)},n.zg=function(){for(var i,n=Ft(UP);!(i=n()).done;){var r=i.value;this.PL.hq.removeEventListener(r,this.c5)}t.prototype.zg.call(this)},i}(FP);V(),It();var jP=me,HP=function(t){function i(i){var n;(n=t.call(this,i)||this).PL.wn([ch.$w,ch.Fw],n.c5);for(var r,e=Ft(UP);!(r=e()).done;){var s=r.value;n.PL.hq.addEventListener(s,n.c5)}return n}Pt(i,t);var n=i.prototype;return n.TP=function(){if(this.PL.hq.readyState===jy.zL)return jy.zL;var t=this.l5(),i=t?t.An-t.Tn:0;if(!t)return jy.Qn;var n=this.PL.vP;return this.f5()||i>=3*n?jy.jL:i>=3?jy.XL:jy.GL},n.l5=function(){var t=this.PL.zx,i=this.PL.Fx.VM(.04),n=i.zM(t);if(!(n<0))return{Tn:t,An:i.An(n)}},n.f5=function(){if(this.PL.Qx)return!0;var t=this.PL.ct,i=this.l5();return!!i&&t-i.An<=jP},n.zg=function(){this.PL.mn([ch.$w,ch.Fw],this.c5);for(var i,n=Ft(UP);!(i=n()).done;){var r=i.value;this.PL.hq.removeEventListener(r,this.c5)}t.prototype.zg.call(this)},i}(FP);V(),It(),Dt(),V(),It(),Dt();var WP=[Fy.AI,ch.uo,ch.jw,ch.$w,ch.Zw,ch.Fw,ch.Vw,ch.Nw,ty.ma],zP=function(t){function i(i){var n;return(n=t.call(this)||this).DV=void 0,n.p5=!1,n.NK=function(){n.er()},n.DV=i,n.DV.wn(WP,n.NK),n}Pt(i,t);var n=i.prototype;return n.v5=function(){return(!this.DV.n5||!this.DV._5)&&this.DV.APi}function QP(t,i){return function(t,i){return Vn(t.CO,i.CO,em)}(t,i)||function(t,i){return Vn(t.RO,i.RO,em)}(t,i)}function YP(t,i){return function(t,i){return Vn(t.UO,i.UO,em)}(t,i)||function(t,i){return Vn(t.VO,i.VO,em)}(t,i)}function $P(t,i,n){var r=function(t,i,n,r,e,s,u){void 0===e&&(e=!1),void 0===s&&(s=0),void 0===u&&(u=t.length);for(var o=s,h=u-1;o<=h;){var a=o+(h-o>>1),c=r(n(t[a]),i);if(c<0)o=a+1;else if(c>0)h=a-1;else{if(!(e&&a>s&&0===r(n(t[a-1]),i)))return a;h=a-1}}return~o}(t,i,yn,n,!0);if(r<0)return r;for(;r=0?r:-(r+1)}function JP(t){var i=t.Ht;if(!i)return-1;if(j(t,um))return i.w5(t);var n=i.L;if(!n)return-1;var r=$P(n.NI,t,QP);return r>=0?r:-1}function ZP(t,i){var n=function(t,i,n){for(var r=t.length,e=i.length,s=0,u=0,o=[],h=[];s=0;n-=1){var r=i[n];if(t.QO(r))return!0}return!1},i.zy=function(t){return this.A5[t]},xt(t,[{key:"NI",get:function(){return this.A5}},{key:"V",get:function(){return this.A5.length}},{key:"Ca",get:function(){if(this.hu){var t=this.A5;this.hu.length=t.length;for(var i=0;i=0)){t.Ht=this;var n=-(i+1);this.M5.splice(n,0,t);var r=KP(this.L.NI,t,QP);this.L5(t,r),this.So(new sD(t))}}},n.L5=function(t,i){this.A5.splice(i,0,t),this.O5(i),t.JO=i,i=0&&$n(n,r);var e=$P(this.M5,t,YP);e>=0&&$n(this.M5,e),t.Ht=void 0,this.F5(t,i),this.So(new oD(t))}}},n.F5=function(t,i){$n(this.A5,i),this.O5(i),t.JO=-1,this.N5>i&&--this.N5},n.qO=function(t){if(t&&t.Ht===this){var i=this.w5(t);if(!(i<0)){this.F5(t,i);var n=KP(this.L.NI,t,QP);this.L5(t,n);var r=Xn(this.D5,function(i){return i===t});if(r>=0){$n(this.D5,r);var e=KP(this.D5,t,QP);this.D5.splice(e,0,t)}}}},n.U5=function(t,i){var n=this.D5,r=this.A5,e=this.N5,s=!1,u=1/0;i&&(e=0);for(var o=n.length-1;o>=0;o--){var h=n[o];GP(h,t)?h.RO=this.V5)&&this.H5(),t.JO},n.H5=function(){for(var t=this.A5,i=this.V5;it.CO)t.RO=r.CO;else{var e=$P(i,t,QP);if(!(e>=0)){var s=-(e+1),u=s-1;if(u>=0)i[u].CO=0&&t[e].CO===r;e--)t[e].RO=n}function CD(t){return Kw(t)}V(),It(),H(),Ut(),V(),It(),Bt(),Dt(),V(),It(),V(),It();var PD=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).Q5=void 0,r.Q5=n,r}Pt(i,t);var n=i.prototype;return n.xa=function(){return CD(this)},n.KO=function(t){return ED(this,t)},xt(i,[{key:"U",get:function(){return this.Q5}},{key:"Ca",get:function(){return this.hu||(this.hu=this.xa()),this.hu}}]),i}(pD);function DD(t){switch(t){case 0:case 1:case 2:case 3:return!0}return!1}function ND(t){switch(t){case 0:return ea;case 1:return ha;case 2:return aa;case 3:return ma}}function xD(t,i){var n=i.ac,r=t.byteLength,e=Ta(t);return i.Ly(r-n),Ia(e,n,r).buffer}function BD(t,i){return{id:t||"",data:j(i,ArrayBuffer)?i:void 0}}function OD(t,i,n){var r=Hh(t,i);if(DD(r)){var e=ND(r);return{id:n,language:na(t,i,3),description:e(t,i),text:e(t,i)}}}function MD(t,i,n){var r=Hh(t,i);if(DD(r)){var e=ND(r);return{id:n,mimeType:ea(t,i),fileName:e(t,i),description:e(t,i),data:xD(t,i)}}}function LD(t,i,n){var r=Hh(t,i);if(DD(r)){for(var e=ND(r),s=[];i.act.byteLength)break;c.push({text:f,timestamp:Kh(t,i)})}return{id:n,language:s,format:u,contentType:o,description:h,entries:c}}}function UD(t,i,n){return{id:n,ownerIdentifier:ea(t,i),identifier:xD(t,i)}}function VD(t,i,n){var r=Hh(t,i);if(DD(r)){var e=ND(r);return{id:n,language:na(t,i,3),description:e(t,i),text:e(t,i)}}}function jD(t,i,n){var r=Hh(t,i);if(DD(r))return{id:n,text:ND(r)(t,i)}}function HD(t,i,n){return{id:n,url:ea(t,i)}}function WD(t,i,n){var r=Hh(t,i);if(DD(r)){var e=ND(r);return{id:n,description:e(t,i),text:e(t,i)}}}function zD(t,i,n){var r=Hh(t,i);if(DD(r))return{id:n,description:ND(r)(t,i),url:ea(t,i)}}function qD(t,i,n){switch(n){case"COM":return OD(t,i,n);case"GEO":return MD(t,i,n);case"IPL":return LD(t,i,n);case"PIC":return function(t,i,n){var r=Hh(t,i);if(DD(r)){var e,s,u=ND(r),o=na(t,i,3),h=Hh(t,i),a=u(t,i);return"--\x3e"===o?(e=o,s=ea(t,i)):(e="image/"+o.toLowerCase(),s=xD(t,i)),{id:n,mimeType:e,pictureType:h,description:a,data:s}}}(t,i,n);case"SLT":return FD(t,i,n);case"TXX":return WD(t,i,n);case"UFI":return UD(t,i,n);case"ULT":return VD(t,i,n);case"WXX":return zD(t,i,n);default:if("T"===n.charAt(0))return jD(t,i,n);if("W"===n.charAt(0))return HD(t,i,n)}}function XD(t,i,n){switch(n){case"APIC":return function(t,i,n){var r=Hh(t,i);if(DD(r)){var e=ND(r),s=ea(t,i);return{id:n,mimeType:s,pictureType:Hh(t,i),description:e(t,i),data:"--\x3e"===s?ea(t,i):xD(t,i)}}}(t,i,n);case"COMM":return OD(t,i,n);case"COMR":return function(t,i,n){var r=Hh(t,i);if(DD(r)){var e,s,u=ND(r),o=ea(t,i),h=na(t,i,8),a=ea(t,i),c=Hh(t,i),f=u(t,i),v=u(t,i);return i.act.byteLength))return{o:na(t,i,3),Wy:Gh(t,i,3)}}(t,i);case 3:return function(t,i){if(!(i.ac+10>t.byteLength)){var n=na(t,i,4),r=Kh(t,i);Hh(t,i);var e=Hh(t,i);return{o:n,Wy:r,xD:{t6:jh(e,0),s6:jh(e,1),groupingIdentity:jh(e,2)}}}}(t,i);case 4:return function(t,i){if(!(i.ac+10>t.byteLength)){var n=na(t,i,4),r=GD(t,i);Hh(t,i);var e=Hh(t,i);return{o:n,Wy:r,xD:{groupingIdentity:jh(e,1),t6:jh(e,4),s6:jh(e,5),K5:jh(e,6),n6:jh(e,7)}}}}(t,i)}}function JD(t){for(var i=Ta(t),n=new I(i.byteLength),r=0,e=0;e=t||(this._6=t,ky(this,t))},n.o6=function(){var t=this.Qk;this.d6||t!==Jp.Kn?this.u6=t:this.u6=Jp.iC},n.g6=function(){var t=this.Qk,i=this.u6;t!==i&&(this.d6||t!==Jp.Kn||i!==Jp.iC)&&("metadata"===this.Lt&&i===Jp.Nh?this.Qk=t:this.f6&&i===Jp.Nh&&t===Jp.Kn?this.u6=t:this.Qk=i)},n.u5=function(t){this.o5!==t&&(this.o5=t,this.So(new iD(this,t)))},n.a6=function(t){var i=A.max(this.o5,this.c6,t);this.u5(i)},n.p6=function(t){var i=sN(t);if(i)return i;if(Hi(i=this.m6(t)))for(var n,r=Ft(i);!(n=r()).done;){n.value.Ht=this}else i.Ht=this;return i},n.m6=function(t){var i=this.w6(t);return t.THEOplayerTextTrackCue=i,i},n.w6=function(t){return t.endTime0){for(var i,n=Ft(t.L.NI);!(i=n()).done;){var r=i.value;this.U6.push(r)}this.V6()}},i.B6=function(t){if(t.mn(Fg.uI,this.L6),t.mn(Fg.dI,this.O6),t.mn(Fg.fI,this.F6),t.L.V>0){for(var i,n=Ft(t.L.NI);!(i=n()).done;){var r=i.value;Yn(this.k6,r),Yn(this.U6,r)}this.V6()}},i.H6=function(){this.oa.xP||this.oa.lP?this.E6():this.V6()},i.V6=function(){this.I6&&0!==this.P6.length&&(this.R6-this.oa.zx>.25*this.oa.vP||this.x6||(this.x6=this.q6.W6(this.z6)))},i.E6=function(){this.x6&&(this.q6.G6(this.x6),this.x6=0)},i.X6=function(t){var i;if(0!==this.R6){var n,r=null!=(n=null==(i=t.Ht)?void 0:i.EU)?n:0,e=t.CO+r,s=t.RO+r,u=this.oa.zx,o=e<=u&&ui&&n-i<.1&&(e=!1),this.C6=!1;for(var s,u=[],o=1/0,h=Ft(t);!(s=h()).done;){var a=s.value,c=n-a.EU,f=a.U5(c,e)+a.EU;f=0;y--)Jn(u,g[y])&&$n(g,y);var _=[];if(!e)for(var k=g.length-1;k>=0;k--){var b=g[k],T=b.Ht.EU;b.CO+T>i&&b.RO+T<=n&&(_.push(b),$n(g,k))}for(var S,E=Ft(this.U6);!(S=E()).done;){var I=S.value;I.CO!==I.RO&&Yn(_,I)}tr(this.U6);for(var R,C=[],P=[],D=Ft(_);!(R=D()).done;){var N=R.value;N.ro||C.push(new cD(N,N.CO)),C.push(new vD(N,A.max(N.CO,N.RO))),N.ro=!1}for(var x,B=Ft(g);!(x=B()).done;){var O=x.value;O.ro&&(C.push(new vD(O,A.max(O.CO,O.RO))),O.ro=!1)}for(var M,L=Ft(u);!(M=L()).done;){var F=M.value;F.ro||(C.push(new cD(F,F.CO)),F.ro=!0)}C.sort(uN);for(var U,V=Ft(C);!(U=V()).done;){var j=U.value,H=j.PO;H.So(j);var W=H.Ht;W&&(j.type===Qw.QL?W.So(new lD(H)):W.So(new wD(H)),Jn(P,W)||P.push(W))}P.sort(yy);for(var z,q=Ft(P);!(z=q()).done;){var X=z.value;X.So(new yD(X))}this.En=n,this.k6=u,this.R6=o}},i.kn=function(){this.hr(),this.oa.mn(ch.py,this.Q6),this.oa.mn(ch.uo,this.K6),this.oa.mn(Fy.PM,this.Q6),this.oa.mn(ch.jw,this.Q6),this.oa.mn(ch.$w,this.Y6),this.oa.mn(ch.Zw,this.Q6)},t}();V(),It();var hN=function(){function t(){}var i=t.prototype;return i.W6=function(t){return pI(t)},i.G6=function(t){yI(t)},t}(),aN=new hN,cN=function(t){function i(i,n){return void 0===n&&(n=aN),t.call(this,i,n)||this}return Pt(i,t),i}(oN);V(),It(),Bt(),Dt(),Ut(),V(),It(),Bt(),Dt();var fN=function(t){function i(i,n,r){return t.call(this,i,1/0,n,!1,r)||this}return Pt(i,t),i.prototype.KO=function(t){return ED(this,t)},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=CD(this)),this.hu}}]),i}(um);V(),It(),Dt(),V(),It(),Dt();var vN=function(t){function i(i,n,r){return void 0===r&&(r=jw.DEFAULT),t.call(this,uy.zU,"",n||"","",!1,r,!1,i)||this}return Pt(i,t),i}(aD),dN=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).Km=jw.ID3,r}Pt(i,t);var n=i.prototype;return n.nV=function(i){ID(i,this.A5),t.prototype.nV.call(this,i)},n.xa=function(){return ny(this)},i}(vN),lN=function(t){function i(i){var n;return(n=t.call(this,i.inBandMetadataTrackDispatchType,i.label)||this).wO=void 0,n._6=0,n.v6=function(){n.Qk!==Jp.Nh&&(n.b6(),n.a6(Vw.LOADED))},n.wO=i,n.wO.addEventListener("cuechange",n.v6),n.Qk=n.u6,Sr(function(){n.v6()}),n}Pt(i,t);var n=i.prototype;return n.R5=function(i){t.prototype.R5.call(this,i),this.u6=this.Qk},n.nV=function(i){t.prototype.nV.call(this,i),i.W5.track!==this.wO&&this.wO.addCue(i.W5)},n.XU=function(i){t.prototype.XU.call(this,i),i.W5.track===this.wO&&this.wO.removeCue(i.W5)},n.jU=function(t){this._6>=t||(this._6=t,ky(this,t))},n.a6=function(t){this.AP=A.max(this.AP,t)},n.b6=function(){var t=this.wO.cues;if(t){for(var i=t.length,n=[],r=[],e=0;e=this._6){var o,h=null!=(o=null==u?void 0:u.THEOplayerTextTrackCue)?o:new gN(u);n.push(h)}else r.push(u)}Tn(n,QP);for(var a,c=ZP(this.L.NI.slice(),n),f=Ft(r);!(a=f()).done;){var v=a.value;this.wO.removeCue(v)}for(var d,l=Ft(c.b5);!(d=l()).done;){var g=d.value;g.kn(),this.XU(g)}for(var w,m=Ft(c.y5);!(w=m()).done;){var p=w.value;this.nV(p)}}},n.kn=function(){this.wO.removeEventListener("cuechange",this.v6),t.prototype.kn.call(this)},xt(i,[{key:"o",get:function(){return this.wO.id||""}},{key:"eC",get:function(){return this.wO.inBandMetadataTrackDispatchType||""}},{key:"bs",get:function(){return this.wO.language||""}},{key:"u6",get:function(){return Zp(this.wO.mode)},set:function(t){this.wO.mode=t}},{key:"AO",get:function(){return this.wO}}]),i}(dN),gN=function(t){function i(i){var n,r=i.startTime,e=rN(i.value);return(n=t.call(this,r,e,i.id)||this).W5=void 0,n.W5=i,n.W5.THEOplayerTextTrackCue=n,n}return Pt(i,t),i.prototype.kn=function(){t.prototype.kn.call(this),this.W5.THEOplayerTextTrackCue=void 0},i}(fN);V(),It(),Wt(),Bt(),Dt(),H(),ft(),Ut(),Yt(),V(),It(),Qt(),V(),It();var wN=[ch.xw,ch.Ew,ch.yy,ch.Ay,ch.LICENSE_REQUEST_GENERATED];V(),It(),Bt(),Dt();var mN=function(t){function i(i){var n;return(n=t.call(this,ch.Ew)||this).errorObject=void 0,n.errorObject=i,n}return Pt(i,t),xt(i,[{key:"error",get:function(){return this.errorObject.message}},{key:"licenseAcquisitionURL",get:function(){return this.errorObject.url}},{key:"status",get:function(){return this.errorObject.status}},{key:"statusText",get:function(){return this.errorObject.statusText}},{key:"licenseAcquisitionMessage",get:function(){return this.errorObject.response}},{key:"systemCode",get:function(){return this.errorObject.systemCode}}]),i}(ah);V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Dt(),H(),Yt(),V(),It(),Dt();var pN=function(t){function i(i){var n;return(n=t.call(this,ch.xw)||this).J6=void 0,n.J6=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var yN=function(t){function i(i){var n;return(n=t.call(this,"by")||this).J6=void 0,n.J6=i,n}return Pt(i,t),i}(ah),_N=new Rd,kN=function(t){function i(i){var n;return(n=t.call(this,"Xs")||this).session=void 0,n.session=i,n}return Pt(i,t),i}(ah),bN=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).r8=void 0,e.s8=void 0,e.n8=void 0,e.i8=void 0,e.c8=void 0,e.hT=void 0,e.h8=void 0,e.t8=void 0,e.SS=void 0,e.a8=void 0,e.u8=void 0,e.r8=i,e.s8=n,e.n8=r,e.i8=!1,e.c8=!1,e.hT=new dr,e.t8=!1,e.SS=function(t){if(!e.hT.Yg.Hg)switch(t.Ry){case"license-request":case"license-renewal":e.hH(t.Iy,t.Dy).catch(function(t){return e.Ts(t)});break;default:e.Ts(new lw(pd.CONTENT_PROTECTION_NOT_SUPPORTED,"Unsupported CDM message type: "+t.Ry))}},e.a8=function(t){e.r8.xy.Xy(function(t,i){switch(t){case"usable":Vi.Og(function(){e.c8=!0,e.So(new pN(i))},100);break;case"expired":case"status-pending":default:break;case"output-restricted":case"internal-error":e.So(new yN(i))}}),e.t8=!0,e.So(t)},e.u8=function(t){e.Ts(new lw(pd.CONTENT_PROTECTION_INTERNAL_ERROR,"Unknown CDM error"))},i.wn("Iy",e.SS),i.wn(ch.Ay,e.a8),i.wn("lt",e.u8),i.uS.then(function(){return e.o8()},function(t){return e.Ts(t)}),e}Pt(i,t);var n=i.prototype;return n.gS=function(){var t=this;return this.i8=!0,_N.Zo(function(i){return t.e8(i)},this.hT.Yg)},n.e8=function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,5]),pr(t),[4,this.s8.$V(t)];case 1:return s.sent(),[4,this.s8.tH(this.n8.Jm,this.n8.Py,t)];case 2:return i=s.sent(),[4,this.r8.gS(this.n8.Jm,this.n8.Py,i)];case 3:return s.sent(),[3,5];case 4:throw yr(n=s.sent()),r=j(n,$a)?n.Zy:void 0,e=new lw(pd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error while performing the CDM request",n,void 0,void 0,void 0,void 0,r),this.Ts(e),e;case 5:return[2]}})}).call(this)},n.hH=function(t,i){return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return h.trys.push([0,5,,6]),function(t){return Oa(t,Ga())}(t)?[4,this.s8._H(new I(t),this.hT.Yg)]:[3,2];case 1:return n=h.sent(),[3,4];case 2:return[4,this.s8.gH(new I(t),i,this.hT.Yg)];case 3:n=h.sent(),h.label=4;case 4:return[3,6];case 5:if(mr(r=h.sent()))return[2];throw r;case 6:if(this.hT.Yg.Hg)return[2];e=this.h8,s=new Xa,this.h8=s,h.label=7;case 7:return h.trys.push([7,10,11,14]),[4,this.r8.er(n)];case 8:return h.sent(),[4,Rr(100)];case 9:return h.sent(),[3,14];case 10:throw u=h.sent(),o=j(u,$a)?u.Zy:void 0,new lw(pd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error while applying license response",u,void 0,void 0,void 0,void 0,o);case 11:return void 0===e?[3,13]:[4,e.Yy];case 12:h.sent(),h.label=13;case 13:return s.Qy(),this.h8===s&&(this.h8=void 0),[7];case 14:return[2]}})}).call(this)},n.Ts=function(t){var i=j(t,lw)?t:new lw(pd.CONTENT_PROTECTION_ERROR,t.message,t);this.So(new mN(i)),this.Xs()},n.o8=function(){this.r8.mn("Iy",this.SS),this.r8.mn(ch.Ay,this.a8),this.r8.mn("lt",this.u8),this.c8=!1,this.t8=!1,this.hT.Zg(),this.So(new kN(this))},n.Xs=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:this.Vo(),i.label=1;case 1:return void 0===(t=this.h8)?[3,3]:[4,t.Yy];case 2:i.sent(),i.label=3;case 3:if(this.h8!==t)return[3,1];i.label=4;case 4:return this.o8(),[4,this.r8.Xs().catch(pn)];case 5:return i.sent(),[2]}})}).call(this)},xt(i,[{key:"Z6",get:function(){return this.t8}}]),i}(uh),AN=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).yS=void 0,e.ES=void 0,e.f8=void 0,e.l8=[],e._8=void 0,e.m8=[],e.S8=void 0,e.w8=function(t){if(t.type===ch.Ay)return null!=e.S8||(e.S8=new qa),t.xy.Xy(function(t,i){e.S8.Gy(i,t)}),void(e.d8&&e.So(new dh(e.S8)));e.Rs(t)},e.y8=function(t){t.session.mn(wN,e.Rs),t.session.mn("Xs",e.y8),Yn(e.l8,t.session),e.S8=void 0},e.yS=i,e.ES=n,e.f8=r,e}Pt(i,t);var n=i.prototype;return n.ZV=function(){return this.f8.ZV()},n.v8=function(t){return this._8||(this._8=this.g8(t)),this._8},n.g8=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return pr(t),[4,this.f8._H(new I(Ga()),t)];case 1:if(i=n.sent(),pr(t),!this.ES)throw new y("Invalid MediaKeys when setting ServerCertificate");return[4,this.ES.PS(i.buffer)];case 2:return n.sent(),[2]}})}).call(this)},n.p8=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(!this.ES)throw new y("Invalid MediaKeys when creating KeySession");r.label=1;case 1:return r.trys.push([1,,3,4]),this.m8.push(t),[4,this.ES.kS("temporary")];case 2:return i=r.sent(),n=new bN(i,this.f8,t),this.l8.push(n),n.wn(wN,this.w8),n.wn("Xs",this.y8),[2,n];case 3:return Yn(this.m8,t),[7];case 4:return[2]}})}).call(this)},n.b8=function(t){if(t.A8)return!1;for(var i,n=Ft(this.l8);!(i=n()).done;){if(TN(i.value.n8,t))return!0}for(var r,e=Ft(this.m8);!(r=e()).done;){if(TN(r.value,t))return!0}return!1},n.kn=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.ES=void 0,this.Vo(),t=this.l8.slice(),tr(this.l8),[4,ot.all(t.map(function(t){return t.Xs()}))];case 1:return i.sent(),this.S8=void 0,this.f8.zg(),[2]}})}).call(this)},xt(i,[{key:"xS",get:function(){return this.yS}},{key:"d8",get:function(){return this.l8.every(function(t){return t.Z6})}}]),i}(uh);function TN(t,i){if(t.A8)return!1;if(t.Jm!==i.Jm)return!1;if(Oa(t.Py,i.Py))return!0;if("sinf"===t.Jm&&"sinf"===i.Jm){var n=SN(t),r=SN(t);if(n&&r)return Ma(n,r)}return!1}function SN(t){try{var i=ma(Aa(new I(t.Py)),new Pa),n=JSON.parse(i).sinf[0],r=new I(ja(n)),e=new kp(Aa(r),new Pa);return Pp.cB(e).SB.kB.PB}catch(t){return}}var EN=function(t){function i(i){var n;return(n=t.call(this)||this).PL=void 0,n.hT=new dr,n.ta=new Rd,n.ZS=void 0,n.f8=void 0,n.aq=void 0,n.yS=void 0,n.U8=function(t){n.I8(t.Jm,t.Py,n.hT.Yg).catch(function(t){return n.Ts(t)})},n.PL=i,n.PL.wn(mh.Dw,n.U8),n}Pt(i,t);var n=i.prototype;return n.Un=function(t,i){this.aq=t,this.RZ(i)},n.RZ=function(t){this.ZS=t,this.k8(this.hT.Yg).catch(_r)},n.NZ=function(t){this.E8(t,this.hT.Yg).catch(_r)},n.E8=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:if(r=function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:if(r=h.value,void 0===(null==(s=Wn(t,function(t){return t.x8===r.xS.$m}))?void 0:s.P8))return[2,"continue"];if(null==(e=r.OW)?void 0:e.some(function(t){return Oa(s.P8,t)}))return[3,4];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,n.I8(r.xS.Jm,s.P8,i)];case 2:return u.sent(),[2,{v:void 0}];case 3:return yr(u.sent()),[3,4];case 4:return[2]}})},pr(i),!(null==(e=this.ZS)?void 0:e.fq))return[2];o=Ft(null!=(u=null==(s=this.ZS)?void 0:s.fq)?u:[]),c.label=1;case 1:return(h=o()).done?[3,4]:(n=this,[5,qt(r())]);case 2:if("object"===W(a=c.sent()))return[2,a.v];c.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},n.k8=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return Vi.Zs.gp?[4,this.C8(t)]:[3,2];case 1:if(i.sent())return[2];i.label=2;case 2:return this.ZS&&this.ZS.D8?[4,this.N8(t)]:[3,4];case 3:return[2,i.sent()];case 4:return[2]}})}).call(this)},n.C8=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:if(!(null==(i=this.ZS)?void 0:i.fq))return[2,!1];r=!1,s=Ft(null!=(e=null==(n=this.ZS)?void 0:n.fq)?e:[]),l.label=1;case 1:if((u=s()).done)return[3,14];if(!(o=u.value).UW||0===o.UW.length)return[3,6];l.label=2;case 2:return l.trys.push([2,4,,5]),h={kids:o.UW.map(function(t){return t.id})},a=ya(JSON.stringify(h)).buffer,[4,this.I8(wo,a,t)];case 3:return l.sent(),r=!0,[3,5];case 4:return yr(l.sent()),[3,5];case 5:if(r)return[2,!0];l.label=6;case 6:f=Ft(null!=(c=o.OW)?c:[]),l.label=7;case 7:if((v=f()).done)return[3,12];d=v.value,l.label=8;case 8:return l.trys.push([8,10,,11]),[4,this.I8(o.xS.Jm,d,t)];case 9:return l.sent(),r=!0,[3,11];case 10:return yr(l.sent()),[3,11];case 11:return[3,7];case 12:if(r)return[2,!0];l.label=13;case 13:return[3,1];case 14:return[2,!1]}})}).call(this)},n.B8=function(t){return t===vo||t===go||t===lo||t===wo},n.I8=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f,v,d,l;return zt(this,function(g){switch(g.label){case 0:if(pr(n),!i.byteLength)return[2];if(!this.ZS||!this.ZS.fq.length)throw new lw(pd.CONTENT_PROTECTION_CONFIGURATION_MISSING,"Missing configuration for encrypted content");if(!this.B8(t))return[2];r=j_(t,i),e=this.ZS.fq,u=[],o=Ft(e),g.label=1;case 1:if((h=o()).done)return[3,11];if(a=h.value,pr(n),!(c=r[a.xS.Zm])||a.xS.Jm!==t)return a.xS.Km===No.Xm&&u.push(!1),[3,10];g.label=2;case 2:return g.trys.push([2,9,,10]),[4,this.M8(a,n)];case 3:return(f=g.sent()).ZV()?[4,f.v8()]:[3,5];case 4:g.sent(),g.label=5;case 5:return v=this.PL.sP,d={Jm:a.xS.Jm,Py:c,A8:v},u.push(!0),this.L8(f,d)?[4,f.p8(d)]:[3,8];case 6:return[4,g.sent().gS()];case 7:g.sent(),this.So(new lh(c)),g.label=8;case 8:return[2];case 9:return yr(l=g.sent()),s=l,[3,10];case 10:return[3,1];case 11:return 0===u.length||u.some(yn)?[4,Vi._m()]:[2];case 12:throw g.sent()?new lw(pd.CONTENT_PROTECTION_NOT_SUPPORTED,"Encrypted content over an insecure connection is not supported",s):new lw(pd.CONTENT_PROTECTION_NOT_SUPPORTED,"Cannot create content decryption session",s)}})}).call(this)},n.N8=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(!(n=null==(i=this.ZS)?void 0:i.fq))return[2];r=Ft(n),o.label=1;case 1:if((e=r()).done)return[3,8];s=e.value,pr(t),o.label=2;case 2:return o.trys.push([2,6,,7]),[4,this.M8(s,t)];case 3:return(u=o.sent()).ZV()?[4,u.v8()]:[3,5];case 4:o.sent(),o.label=5;case 5:return[2];case 6:return yr(o.sent()),[3,7];case 7:return[3,1];case 8:return[2]}})}).call(this)},n.L8=function(t,i){return Vi.Zs._p||this.PL.ML.BL||!t.b8(i)},n.M8=function(t,i){var n=this;return this.ta.Zo(function(i){return n.O8(t,i)},i)},n.O8=function(t,i){return jt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(pr(i),!this.ZS||!this.f8||!this.aq)throw new y("Not initialized");if(this.yS){if(this.yS.xS!==t.xS)throw new y("Internal key system error");return[2,this.yS]}return n=this.f8,r=io({},t,{Vq:t.Vq.map(function(i){var r;return io({},i,{persistentState:null!=(r=i.persistentState)?r:n.wH(t.xS),FS:i.FS||n.FS(t.xS)})})}),[4,this.aq.xZ(r.xS,r.Vq)];case 1:return e=o.sent(),s=n.LW(r),(u=new AN(r.xS,e,s)).wn(wN,this.Rs),this.yS=u,[2,u]}})}).call(this)},n.Ts=function(t){if(!mr(t)){var i=j(t,lw)?t:new lw(pd.CONTENT_PROTECTION_ERROR,t.message,t);this.So(new mN(i))}},n.hr=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.aq=void 0,this.ZS=void 0,this.hT.Zg(),this.hT=new dr,[4,this.F8()];case 1:return t.sent(),[2]}})}).call(this)},n.F8=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return[4,this.ta.Zg()];case 1:return i.sent(),(t=this.yS)?(t.mn(ch.yy,this.Rs),this.yS=void 0,[4,t.kn()]):[3,3];case 2:i.sent(),i.label=3;case 3:return[2]}})}).call(this)},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),this.PL.mn(mh.Dw,this.U8),[4,this.hr()];case 1:return t.sent(),[4,this.ta.kn()];case 2:return t.sent(),[2]}})}).call(this)},xt(i,[{key:"T8",get:function(){var t;return null==(t=this.yS)?void 0:t.xS}},{key:"Rq",get:function(){return this.f8},set:function(t){this.f8=t}}]),i}(uh);V(),It(),Dt();var IN=function(t){function i(i){var n;return(n=t.call(this,ch.Vw)||this).currentTime=void 0,n.currentTime=i,n}return Pt(i,t),i}(ah);V(),It(),Bt(),Dt();var RN=function(t){function i(i){var n;return(n=t.call(this)||this).W8=void 0,n.V8=void 0,n.W8=i,n}Pt(i,t);var n=i.prototype;return n.u5=function(){var t;null==(t=this.V8)||t.u5()},n.hr=function(){var t;null==(t=this.V8)||t.hr()},n.zg=function(){this.Vo(),void 0!==this.V8&&(this.V8.zg(),this.V8=void 0)},n.H8=function(t){if(this.V8!==t){var i=this.AP;void 0!==this.V8&&this.V8.zg(),this.V8=t,void 0!==t&&(t.wn(Fy.AI,this.Rs),t.u5());var n=this.AP;i!==n&&this.So(new Vy(this.W8.zx,n))}},xt(i,[{key:"AP",get:function(){return void 0!==this.V8?this.V8.AP:jy.zL}}]),i}(uh);V(),It(),Bt(),Dt();var CN=function(t){function i(i,n,r){return t.call(this,i,n,"",r,void 0,jw.WEBVTT)||this}Pt(i,t);var n=i.prototype;return n.q8=function(t,i,n){var r=new hm(t,i,n,!1);return this.nV(r),r},n.z8=function(t){this.XU(t)},xt(i,[{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=PN(this)}}]),i}(aD);function PN(t){return Wg(ny(t),{get type(){return t.Km},addCue:function(i,n,r){return t.q8(i,n,r).Ca},removeCue:function(i){t.z8(i.IO)}})}V(),It(),Bt(),Dt(),Ut();var DN=function(t){function i(i,n,r){var e,s;return(e=t.call(this,i,n,r)||this).dE=!1,e.G8=[],e.X8=function(){var t;null==(t=e.h6)||t.removeEventListener("load",e.X8),e.dE=!0;for(var i,n=Ft(e.G8);!(i=n()).done;){var r=i.value;e.nV(r)}tr(e.G8)},null==(s=e.h6)||s.addEventListener("load",e.X8),e.Km=jw.WEBVTT,e}Pt(i,t);var n=i.prototype;return n.q8=function(t,i,n){var r=this.m6(new f.VTTCue(t,i,n));return this.dE?this.nV(r):this.G8.push(r),r},n.z8=function(t){Yn(this.G8,t),this.XU(t)},n.kn=function(){var i;t.prototype.kn.call(this),null==(i=this.h6)||i.removeEventListener("load",this.X8),tr(this.G8)},xt(i,[{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=PN(this)}}]),i}(eN);function NN(t,i){return void 0!==t.e4===i.q4.some(function(t){return Qv(t.GT)})&&void 0!==t.s4===i.q4.some(function(t){return Yv(t.GT)})}function xN(t,i){return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(e=t.W9,s=t.q9,"function"!=typeof(null==(r=l)||null==(n=r.mediaCapabilities)?void 0:n.decodingInfo))return[3,4];u={type:"media-source",video:e&&{contentType:e.GT,width:e.Ti,height:e.Mi,bitrate:e.z9,framerate:e.G9},audio:s&&{contentType:s.GT,channels:s.X9,bitrate:s.z9,samplerate:s.j9}},h.label=1;case 1:return h.trys.push([1,3,,4]),[4,l.mediaCapabilities.decodingInfo(u)];case 2:return[2,{H9:(o=h.sent()).supported,Q9:o.smooth,K9:o.powerEfficient}];case 3:return h.sent(),[3,4];case 4:return[2,{H9:(!s||i.isTypeSupported(s.GT))&&(!e||i.isTypeSupported(e.GT)),Q9:void 0,K9:void 0}]}})})()}V(),It(),Wt(),Yt(),V(),It(),Wt(),Yt();var BN=.05,ON=Oi.B_||Oi.L_,MN=Oi.Rg,LN=Oi.X_,FN=Oi.X_&&Oi.ru,UN=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).pT=void 0,u.sc=void 0,u.GJ=void 0,u.nq=void 0,u.kz=!0,u.aq=void 0,u.d7=new Rd,u.K8=void 0,u.e9=void 0,u.p9=void 0,u.DZ=void 0,u.ha=new fS,u.ea=new dS,u.Gl=void 0,u.Oz=void 0,u.i7=[],u.t7=void 0,u.Y9=void 0,u.J9=void 0,u.Y8=void 0,u.P9=0,u.x9=NaN,u.Q8=void 0,u.U9=!1,u.D9=void 0,u.u7=0,u.Pz=!1,u.r5=!1,u.Z7=jy.zL,u.s9=0,u.k9=ot.resolve(),u.T9=new dr,u.b9=[],u.Ho=LA.rL(),u.r9=void 0,u.o9=1,u.c9=!1,u.u9=1,u.Z8=!1,u.w7=!1,u.y7=!1,u.C9=!1,u.hw=void 0,u.t9=!1,u.i9=!1,u.j8=!1,u.Q7=!1,u.A7=0,u.N4=void 0,u.d9=!1,u.e7=function(t){var i=t.track,n=u.o7(i);if(!jN(u.t7,i)){if(Oi.X_){if(i.kind===uy.zU)return void u.r7(i);if(i.kind===uy.WU&&""===i.label&&""===i.language&&!HN(i))return void u.h7(i,n)}u.t7.tt(new eN(i.id,i,n))}},u.s7=function(t){var i=jN(u.t7,t.track);i&&u.t7.it(i)},u.n7=function(){for(var t=0;t=jy.XL)&&void 0!==u.aq&&ZR(u.aq)){var t=u.aq,i=t.e4,n=t.s4;if(i&&n){var r=u.zx,e=i.Fx,s=n.Fx;if(e.Cr(r)&&s.Cr(r))e.WM(s).jM(r-5,r)&&(u.j8?u.g7():u.p7())}}},u.E7=function(){u.So(new bT(u.zx))},u.x7=function(){u.S9(new wr),u.So(new kT(u.zx))},u.k7=function(){u.m9(),u.So(new Gy(u.zx))},u.D7=function(){u.h9()},u.B7=function(){u.So(new AT(u.ct))},u.I7=function(){u.So(new hC(u.zx))},u.C7=function(){u.So(new aC)},u.F7=function(){u.Pz||u.r5||u.U9?u.U9=!1:u.So(new IT(u.zx))},u.U7=function(){u.L9(u.zx),u.U9=!1},u.P7=function(){var t=u.zx,i=u.xP,n=u.e9.AP0&&u.DP>0&&u.So(new My)},u.V7=function(t){u.So(new ph(t.initDataType,t.initData||new ArrayBuffer(0)))},u.H7=function(){u.So(new yh)},u.z7=function(t){var i=t.initData,n=i?Ra(i).buffer:new ArrayBuffer(0);u.So(new ph(vo,n))},u.W7=function(t){var i=t.initData;if(i){var n=function(t){try{var i=Aa(t),n=new Pa;return da(la(zh(i,n,Kh(i,n,!0)),!0))}catch(t){return}}(i);if(!n)return;u.So(new ph(go,n.buffer))}else u.So(new ph(go,new ArrayBuffer(0)))},u.q7=function(t){var i=t.initData,n=i?Ra(i).buffer:new ArrayBuffer(0);u.So(new ph(vo,n))},u._9=function(){u.m9()},u.g9=function(t){u.S9(t)},u.ett=function(t){u.So(t),t.type===ch.Ew&&u.Qq(pw(t.errorObject))},u.pT=i,u.hw=n,u.sc=r,u.Oz=e,u.GJ=s,u.e9=new RN(u),u.e9.wn(Fy.AI,u.itt),u.e9.H8(new VP(u)),u.p9=new qP(u),u.p9.wn(Fy.PM,u.k7),u.DZ=new EN(u),u.DZ.wn(wN,u.ett),u.Gl=new sy,u.t7=new sy,u.Y9=new Fb([u.Gl,u.t7]),u.J9=new cN(u),u.b7(),u.Hq(),u}Pt(i,t);var n=i.prototype;return n.J8=function(){return void 0!==this.Y8&&this.ct===this.Y8},n.h9=function(){var t=this.vP;this.o9!==t&&(this.o9=t,this.So(new TT(this.zx,t)))},n.n9=function(){var t=this.OP,i=this.oP;this.u9===t&&this.c9===i||(this.u9=t,this.c9=i,this.So(new RT(this.zx,this.OP)))},n.hP=function(){return DR(this.pT)},n.QP=function(){this.d9||(this.d9=!0);var t=this.l9();return this.f9(),t},n.f9=function(){this.t9?this.i9&&(this.i9=!1,this.So(new bT(this.zx))):this.v9()},n.v9=function(){if(this.K8)this.K8.QP();else{Oi.X_&&!Oi.ru&&this.pT.preload===uS.pz&&(this.pT.preload=uS.zU);var t=this.vP,i=this.pT.play();t!==this.hq.playbackRate&&(this.vP=t),this.Z8=!1,Gi(i)?i.then(this._9,this.g9):this.p9.g5()&&this.m9()}},n.jP=function(){this.t9?this.i9||(this.i9=!0,this.So(new kT(this.zx))):this.w9()},n.w9=function(){this.K8?this.K8.jP():(this.pT.pause(),this.p9.er()),this.y9(new wr)},n.l9=function(){var t=new Xa;return this.b9.push(t),t.Yy},n.A9=function(){for(var t,i=Ft(this.b9);!(t=i()).done;){t.value.Qy(void 0)}tr(this.b9)},n.y9=function(t){for(var i,n=Ft(this.b9);!(i=n()).done;){i.value.Ky(t)}tr(this.b9)},n.m9=function(){this.t9||this.K8||this.A9()},n.S9=function(t){this.t9||this.K8||this.y9(t)},n.Oy=function(t,i,n){void 0===i&&(i=!1),void 0===n&&(n=!1),this.K8?this.K8.Oy(t,i,n):(this.T9.Zg(),this.T9=new dr,this.k9=br(this.E9(t,i,n,this.k9,this.T9.Yg),this.T9).catch(pn))},n.$W=function(t){var i=this.uq;if(i&&!E(i.getTime())){var n=(t.getTime()-i.getTime())/1e3;this.Oy(n)}},n.E9=function(t,i,n,r,e){return jt(function(){var s,u,o,h,a,c,f,v,d,l,g,w,m,p,y,_,k,b;return zt(this,function(T){switch(T.label){case 0:return T.trys.push([0,24,,25]),this.Y8=t,this.x9=t,this.P9=Vi.Mg(),n&&!this.Pz?this.r5=!0:(this.Pz=!0,this.r5=!1),this.Z8&&!this.J8()&&(this.Z8=!1),this.r5?(this.So(new xP(this.zx)),(Oi.w_||Oi.S_)&&(t+=BN)):this.So(new ET(t)),[4,r.catch(pn)];case 1:return T.sent(),pr(e),this.aq&&!this.aq.ZZ()?(this.I9(),[2]):(this.C9&&this.R9(),this.e9.AP!==jy.zL?[3,3]:[4,this.e9.ww(Fy.AI,e)]);case 2:T.sent(),T.label=3;case 3:if(!(0===this.pT.seekable.length||Oi.X_&&this.pT.seekable.end(0)===1/0||FN&&!this.d9))return[3,9];s={stack:[],error:void 0,hasError:!1},T.label=4;case 4:return T.trys.push([4,6,7,8]),void 0!==this.D9&&0===this.pT.seekable.length?(this.I9(),[2]):(u=Xt(s,dr.ep([e]),!1),[4,ot.race([cg(this.pT,"timeupdate",u.Yg),Rr(100,u.Yg)])]);case 5:return T.sent(),pr(e),[3,8];case 6:return o=T.sent(),s.error=o,s.hasError=!0,[3,8];case 7:return Gt(s),[7];case 8:return[3,3];case 9:h=AP(this.Fx,t,BN),a=this.kP,c=!0,f=!1,T.label=10;case 10:0,v={stack:[],error:void 0,hasError:!1},T.label=11;case 11:return T.trys.push([11,20,21,22]),(a=this.kP).V>0&&!a.Cr(h)&&((l=a.LM(h))===a.An(0)&&Oi.X_&&this.ct===1/0&&function(t){return(null==t?void 0:t.Cd.Km)===Ly.AV}(this.aq)&&a.Cr(l-BN)&&(l-=BN),h=l,c=!0),!i||!Vi.Zs.Dp&&this.pT.fastSeek||(g=this.Fx).Cr(h)||(w=AP(g,h,1))!==h&&(h=w,c=!0),LN&&void 0!==(m=this.N9())&&h>m&&(h=m,c=!0),f?[3,14]:void 0!==(p=this.B9())&&h>p?(f=!0,[4,this.M9(p,!1,e)]):[3,14];case 12:return T.sent(),[4,cg(this.pT,"seeked",e)];case 13:T.sent(),pr(e),c=!0,T.label=14;case 14:return c?(c=!1,[4,this.M9(h,i,e)]):[3,18];case 15:T.sent(),pr(e),y=this.zx,a=this.kP,h=a.LM(h),_=1,T.label=16;case 16:return A.abs(h-y)>=me?(a=this.kP,h=function(t,i,n){void 0===n&&(n=0);if(!i.V)return 0;var r=i.LM(t),e=VN*n;r===i.Tn(0)?r+=e:r===i.An(i.V-1)&&(r-=e);return r}(h,a,_),[4,this.M9(h,i,e)]):[3,18];case 17:return T.sent(),pr(e),y=this.zx,_++,[3,16];case 18:return this.pT.seeking||this.e9.AP0}V(),It(),Bt(),Dt();var WN={sZ:void 0,nZ:void 0,rZ:void 0,hZ:void 0,oZ:void 0,aZ:void 0,uZ:void 0,cZ:void 0,dZ:void 0,lZ:void 0},zN=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).hu=void 0,i}return Pt(i,t),xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=zR(this)),this.hu}},{key:"sZ",get:function(){}},{key:"nZ",get:function(){}},{key:"rZ",get:function(){}},{key:"hZ",get:function(){}},{key:"oZ",get:function(){}},{key:"aZ",get:function(){}},{key:"stt",get:function(){}},{key:"uZ",get:function(){}},{key:"cZ",get:function(){}},{key:"dZ",get:function(){}},{key:"lZ",get:function(){}}]),i}(uh),qN=function(t){function i(i,n,r,e){return t.call(this,i,n,r,new zN,e)||this}return Pt(i,t),i.prototype.zP=function(){},xt(i,[{key:"DP",get:function(){return 0}},{key:"MP",get:function(){return 0}}]),i}(UN);V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Bt();var XN=function(){function t(t){void 0===t&&(t=5),this.ntt=void 0;var i=f.document.createElement("div");i.className="theoplayer-texttracks",i.style.position="absolute",i.style.display="none",i.style.overflow="hidden",i.style.pointerEvents="none",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.width="100%",i.style.height="100%",i.style.lineHeight="1.3em",i.style.zIndex=""+t,this.ntt=i,this.be()}var i=t.prototype;return i.we=function(){this.ntt.style.display="none"},i.be=function(){this.ntt.style.display="block"},i.Y7=function(t){t.appendChild(this.ntt)},i.kn=function(){Zi(this.ntt)},xt(t,[{key:"xe",get:function(){return this.ntt}}]),t}();function GN(t,i){return io({},i,Qg(function(t){return{sZ:t.sZ,nZ:t.nZ,rZ:t.rZ,hZ:t.hZ,oZ:t.oZ,aZ:t.aZ,uZ:t.uZ,cZ:t.cZ,dZ:t.dZ,lZ:t.lZ}}(t)))}function QN(t){return t.rZ&&qo(t.rZ,"%")?Number(t.rZ.replace("%",""))/100:t.rZ&&qo(t.rZ,"em")?Number(t.rZ.replace("em","")):1}V(),It(),Bt(),H(),Ut(),V(),It(),Dt(),Ut(),V(),It(),Bt(),Ut(),V(),It(),V(),It(),Bt();var YN=function(){function t(t,i,n,r){this.ott=void 0,this.utt=void 0,this.Ti=void 0,this.Mi=void 0,this.ott=t,this.utt=i,this.Ti=n,this.Mi=r}var i=t.prototype;return i.ctt=function(t){return this.ottt.ott&&this.uttt.utt},i.pO=function(t){return this.ott<=t.ott&&t.htt<=this.htt&&this.utt<=t.utt&&t.att<=this.att},i.Fy=function(){return new t(this.ott,this.utt,this.Ti,this.Mi)},i.dtt=function(i){return new t(this.ott+i,this.utt+i,A.max(0,this.Ti-2*i),A.max(0,this.Mi-2*i))},i.ltt=function(i){var n=A.min(this.ott,i.ott),r=A.max(this.htt,i.htt),e=A.min(this.utt,i.utt);return new t(n,e,r-n,A.max(this.att,i.att)-e)},xt(t,[{key:"htt",get:function(){return this.ott+this.Ti},set:function(t){this.ott=t-this.Ti}},{key:"att",get:function(){return this.utt+this.Mi},set:function(t){this.utt=t-this.Mi}}]),t}(),$N=function(){function t(t,i,n,r,e){var s=this;this.Ptt=eo(),this.qtt=!0,this.mtt=void 0,this.ytt=io({},WN),this.Gtt=[],this.WO=void 0,this.pT=void 0,this.sc=void 0,this.Ttt=void 0,this.Itt=function(t){return s.nV(t.PO)},this.Ctt=function(t){return s.XU(t.PO)},this.Rtt=function(){return s.Vtt()},this.Btt=function(t){return s.Ftt(t.PO)},this.Mtt=function(t){return s.Utt(t.PO)},this.Ltt=function(t){return s.ztt(t.PO)},this.Att=function(t){return s.oe(t.width,t.height)},this.WO=t,this.Ttt=this.mtt=e,this.pT=this.Ytt(n),this.sc=r,i.appendChild(this.pT)}var i=t.prototype;return i.ftt=function(t){var i=this._tt(t);if(!i)return!1;for(var n,r=Ft(i);!(n=r()).done;){Zi(n.value)}return this.gtt(t),!0},i.GY=function(){var t=this;this.btt(),this.WO.L.NI.forEach(function(i){return t.nV(i)}),this.Wu.wn(AI.yn,this.Att),this.oe(this.Wu.Eu,this.Wu.Iu)},i.Stt=function(t){this.ytt=t,this.mtt=GN(this.ytt,this.Ttt),this.mtt.sZ&&(this.hq.style.fontFamily=this.mtt.sZ),this.oe(this.Wu.Eu,this.Wu.Iu),this.ktt(!0)},i.Ett=function(){return this.mtt},i.xtt=function(t){return this.Ptt.has(t.JI)},i.btt=function(){this.WO.wn(Fg.uI,this.Itt),this.WO.wn(Fg.dI,this.Ctt),this.WO.wn(Fg.pa,this.Rtt)},i.Dtt=function(){this.WO.mn(Fg.uI,this.Itt),this.WO.mn(Fg.dI,this.Ctt),this.WO.mn(Fg.pa,this.Rtt)},i.Ntt=function(t){t.wn(Qw.QL,this.Btt),t.wn(Qw.KL,this.Mtt),t.wn(Qw.xI,this.Ltt)},i.Ott=function(t){t.mn(Qw.QL,this.Btt),t.mn(Qw.KL,this.Mtt),t.mn(Qw.xI,this.Ltt)},i.nV=function(t){this.Ntt(t),t.ro&&this.Ftt(t)},i.XU=function(t){this.Ott(t),this.Utt(t)},i.Vtt=function(){this.WO.Qk===Jp.Kn?this.Htt():this.Wtt()},i.Htt=function(){if(this.qtt){this.qtt=!1;var t=this.Wu.Eu,i=this.Wu.Iu;this.oe(t,i),this.ktt(!1)}},i.Wtt=function(){this.qtt||(this.qtt=!0,this.ktt(!0))},i.Ftt=function(t){this.qtt||t.ro&&!this.xtt(t)&&this.ktt(!1)},i.Utt=function(t){this.xtt(t)&&this.ktt(!0)},i.ztt=function(t){(t.ro||this.xtt(t))&&this.ktt(!0)},i.ktt=function(t){var i=this.Gtt,n=this.qtt?[]:this.WO.q.NI.slice();this.Xtt(n,i,t),this.Gtt=n},i._tt=function(t){return this.Ptt.get(t.JI)},i.jtt=function(t,i){this.Ptt.set(t.JI,i)},i.gtt=function(t){this.Ptt.delete(t.JI)},i.Qtt=function(t){var i=[],n=this.mtt;if(void 0!==n.uZ){var r=t.Fy();r.Mi=n.uZ,i.push(r)}if(void 0!==n.cZ){var e=t.Fy();e.Mi=n.cZ,e.att=t.att,i.push(e)}return i},i.Ktt=function(){return this.Gtt.slice()},i.kn=function(){var t=this;Zi(this.hq),this.Ptt.clear(),this.Dtt(),this.WO.L.NI.forEach(function(i){return t.Ott(i)}),this.Wu.mn(AI.yn,this.Att)},xt(t,[{key:"Ht",get:function(){return this.WO}},{key:"hq",get:function(){return this.pT}},{key:"Wu",get:function(){return this.sc}},{key:"ptt",get:function(){return this.mtt}},{key:"wtt",get:function(){return this.ytt}}]),t}();function KN(t,i,n,r,e){var s=t.Fy(),u=s,o=1,h=!1,a=S(getComputedStyle(i).lineHeight)/4;if(!E(a)&&a>0){for(var c=0;cf&&(u=t.Fy(),o=f),t=s.Fy()}r.pO(t)||(u=s.Fy())}i.style.left=(u.ott-r.ott)/r.Ti*100+"%",i.style.top=(u.utt-r.utt)/r.Mi*100+"%"}function JN(t,i){return i.some(function(i){return t.ctt(i)})}function ZN(t){return new YN(t.left,t.top,t.width,t.height)}var tx=function(t){return t[t.POS_X=0]="POS_X",t[t.NEG_X=1]="NEG_X",t[t.POS_Y=2]="POS_Y",t[t.NEG_Y=3]="NEG_Y",t}({});function ix(t,i,n){switch(i){case 0:t.ott+=n;break;case 1:t.ott-=n;break;case 2:t.utt+=n;break;case 3:t.utt-=n}}function nx(t,i,n,r){switch(n){case 0:return t.htt>i.htt+r;case 1:return t.otti.att+r;case 3:return t.utt0?t.KE[0]:null;return i&&lg(i)?"data:image/png;base64,"+i.lk:""}(i),e.id=t.id,e.style.height="100%",e.style.maxWidth="100%",function(t,i){var n=t.style;vn(n,"flex"),n.flexDirection=n.webkitFlexDirection="column";var r=i.ox("smpte:backgroundImageVertical"),e="center";if(r)switch(r.toLowerCase()){case"left":e="flex-start";break;case"center":e="center";break;case"right":e="flex-end";break;case"inherit":e="inherit"}n.justifyContent=n.webkitJustifyContent=e;var s=i.ox("smpte:backgroundImageHorizontal"),u="center";if(s)switch(s.toLowerCase()){case"left":u="flex-start";break;case"center":u="center";break;case"right":u="flex-end";break;case"inherit":u="inherit"}n.alignItems=n.webkitAlignItems=u}(t,n),t.appendChild(e)}function Ex(t,i,n,r,e,s){if(n)for(var u,o=Ft(n.split(" "));!(u=o()).done;){var h=u.value;if(r[h])for(var a,c=Ft(b.keys(r[h]));!(a=c()).done;){var f=a.value;"style"===f.toLowerCase()?Ex(t,i,r[h][f],r,e,s):Ix(t,i,f,r[h][f],e,s)}}}function Ix(t,i,n,r,e,s){var u=t.style;switch(n){case"backgroundColor":u.backgroundColor=r;break;case"color":u.color=r;break;case"direction":u.direction=r;break;case"display":"none"===r&&(u.display="none");break;case"fontFamily":var o;u.fontFamily=null!=(o=wx.get(r))?o:r;break;case"fontSize":var h=r;if(qo(h,"px")){var a=Number(h.slice(0,-2));h=a*s/16+"em"}else qo(h,"c")&&(h=h.replace("c","em"));u.fontSize=h,u.lineHeight&&"inherit"!==u.lineHeight||(u.lineHeight=mx);break;case"fontStyle":u.fontStyle=r;break;case"fontWeight":u.fontWeight=r;break;case"lineHeight":var c=r;if(qo(c,"px")){var f=Number(c.slice(0,-2));c=f*s+"px"}u.lineHeight=c;break;case"opacity":u.opacity=r;break;case"overflow":u.overflow=r;break;case"padding":u.padding=r;break;case"textAlign":u.textAlign=r;break;case"textDecoration":switch(r){case"lineThrough":u.textDecoration="line-through";break;case"underline":case"overline":u.textDecoration=r;break;case"noUnderline":case"noLineThrough":case"noOverline":u.textDecoration="none"}break;case"unicodeBidi":switch(r){case"bidiOverride":u.unicodeBidi="bidi-override";break;case"normal":case"embed":case"isolate":u.unicodeBidi=r}break;case"visibility":u.visibility=r;break;case"zIndex":u.zIndex=r;break;case"displayAlign":var v;switch(r.toLowerCase()){case"before":v="flex-start";break;case"center":v="center";break;case"after":v="flex-end";break;case"justify":v="space-between";break;default:return}u.justifyContent=u.webkitJustifyContent=v;break;case"extent":var d,l,g=Rx(i.toLowerCase())?e:t,w=r.split(" ",2);2===w.length?(d=w[0],l=w[1]):d=l="100%",g&&(g.style.height=l,g.style.width=d);break;case"origin":var m=Rx(i.toLowerCase())?e:t,p=r.split(" ",2),y=p[0],_=p[1];m&&(y||_)&&(y&&(m.style.left=y),_&&(m.style.top=_));break;case"showBackground":case"textOutline":break;case"wrapOption":switch(r){case"wrap":u.whiteSpace="normal";break;case"noWrap":u.whiteSpace="nowrap"}break;case"writingMode":var k,b,A,T;switch(r){case"lrtb":case"lr":k="horizontal-tb";break;case"rltb":k="horizontal-tb",b="rtl",T="bidi-override";break;case"tbrl":case"tb":k="vertical-rl",A="upright";break;case"tblr":k="vertical-lr",A="upright";break;case"rl":k="horizontal-tb",b="rtl";break;default:return}u.writingMode=k,u.setProperty("-webkit-writing-mode",k),b&&(u.direction=b),A&&(u.textOrientation=A,u.setProperty("-webkit-text-orientation",A)),T&&(u.unicodeBidi=T);break;case"linePadding":if(qo(r,"c")){var S=r.replace("c","em");u.paddingLeft=u.paddingRight=S}break;case"multiRowAlign":"auto"===r.toLowerCase()?u.textAlign="":u.textAlign=r}}function Rx(t){return"div"===t||"p"===t||"span"===t}function Cx(t){var i=t.style;vn(i,"flex"),i.flexDirection=i.webkitFlexDirection="column",i.top="auto",i.left="5%",i.width="90%",i.height="100%",i.maxHeight="100%",i.maxWidth="100%",i.overflow="visible",i.position="absolute",i.fontFamily=lx,i.color=ax.WHITE,i.background=ax.TRANSPARENT,i.textShadow=cx("uniform"),i.textAlign="start",i.writingMode="horizontal-tb",i.setProperty("-webkit-writing-mode","horizontal-tb"),i.padding="0",i.margin="0",i.fontSize="inherit",i.lineHeight="inherit"}function Px(t){var i=t.style;i.fontFamily="inherit",i.color="inherit",i.fontSize="inherit",i.lineHeight="inherit",i.textShadow="inherit"}function Dx(t){var i=ZN(t.getBoundingClientRect());if("visible"===getComputedStyle(t).overflow&&t.scrollHeight>t.clientHeight)for(var n=t.children,r=0;r":return i.Ly(1),o;case"EOF":return o;default:r=s,n="StartTag"}break;case"StartTag":switch(s){case"\t":case"\f":case" ":n="StartTagAnnotation";break;case"\n":u=s,n="StartTagAnnotation";break;case".":n="StartTagClass";break;case">":return i.Ly(1),{Km:"starttag",$E:r,eit:[]};case"EOF":return{Km:"starttag",$E:r,eit:[]};default:r+=s}break;case"StartTagClass":switch(s){case"\t":case"\f":case" ":e.push(u),u="",n="StartTagAnnotation";break;case"\n":e.push(u),u=s,n="StartTagAnnotation";break;case".":e.push(u),u="";break;case">":return i.Ly(1),e.push(u),{Km:"starttag",$E:r,eit:e};case"EOF":return e.push(u),{Km:"starttag",$E:r,eit:e};default:u+=s}break;case"StartTagAnnotation":switch(s){case"&":n="CharRefInAnnotation";break;case">":i.Ly(1);var a=u.trim();return{Km:"starttag",$E:r,eit:e,sit:a=a.replace(/\s/," ")};default:u+=s}break;case"CharRefInAnnotation":for(var c="",f=i.ac;">"===t.charAt(f);f++)c+=t.charAt(f);u+=c||"&",n="StartTagAnnotation";break;case"EndTag":switch(s){case">":return i.Ly(1),{Km:"endtag",$E:r};case"EOF":return{Km:"endtag",$E:r};default:r+=s}break;case"TimestampTag":switch(s){case">":return i.Ly(1),{Km:"timestamp",nit:r};case"EOF":return{Km:"timestamp",nit:r};default:r+=s}}i.Ly(1)}return o}V(),It(),Dt(),Ut(),V(),It();var Bx=function(t){return t.rit="string",t.hit="starttag",t.oit="endtag",t.ait="timestamp",t}({});function Ox(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var n=v.documentElement,r=v.body,e=n.clientLeft||r.clientLeft||0,s=f.pageXOffset||r.scrollLeft,u=i.left+s-e,o=n.clientTop||r.clientTop||0,h=f.pageYOffset||r.scrollTop,a=i.top+h-o;return{left:A.round(u),top:A.round(a)}}function Mx(t,i,n,r){if(void 0===r&&(r=0),t&&i){t.style.left="0px";var e=t.getClientRects(),s=i.getClientRects();if(0!==e.length&&0!==s.length){var u=e[0],o=s[0],h=u.width/2+u.left;Lx(t,o.width/2+o.left-h,n,r)}}}function Lx(t,i,n,r){void 0===r&&(r=0),Fx(t,i,"left","right",n,r)}function Fx(t,i,n,r,e,s){void 0===s&&(s=0);var u=t.getClientRects();if(e&&u.length>0){var o=u[0];i=Cn(i,e[n]+s-o[n],e[r]-s-o[r])}t.style[n]=i+"px"}function Ux(t,i){void 0===t.textContent?t.innerText=i:t.textContent=i}V(),It();var Vx={nZ:ax.WHITE,sZ:"sans-serif",rZ:"100%",hZ:"rgba(0,0,0,0.8)",oZ:ax.TRANSPARENT,aZ:"none",uZ:void 0,cZ:void 0,dZ:void 0,lZ:void 0},jx="theoplayer-webvtt-region-",Hx="theoplayer-webvtt-styling-",Wx="theoplayer-webvtt-default-style",zx=5.23,qx=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,n,r,e,Vx)||this).cit=ro(),s.uit=Kx(3),function(t){var i,n=function(t){var i=null==t.getRootNode?void 0:t.getRootNode.call(t);if(i&&i.host)return i}(t),r=null!=(i=null!=n?n:t.ownerDocument)?i:v;if(r.getElementById(Wx))return;for(var e,s=[],u=Ft(tB);!(e=u()).done;){var o=e.value,h=o[0],a=o[1];s.push("."+Hx+h+" { color: "+a+" !important; }"),s.push("."+Hx+"bg"+iB+h+" { background-color: "+a+" !important; }"),s.push("video::cue(."+h+") { color: "+a+"; }"),s.push("video::cue(.bg"+iB+h+") { background-color: "+a+"; }")}var c=v.createElement("style");c.id=Wx,c.innerHTML=s.join("\n"),n?n.appendChild(c):r.body.appendChild(c)}(n),s}Pt(i,t);var n=i.prototype;return n.Ytt=function(t){var i=v.createElement("div");i.className="theoplayer-webvtt-texttrack-"+t,ln(i),i.style.overflow="hidden",i.style.pointerEvents="none";var n=this.ptt.sZ;return n&&(i.style.fontFamily=n),i.style.whiteSpace="pre-line",i},n.GY=function(){this.hq.appendChild(this.uit),t.prototype.GY.call(this)},n.oe=function(t,i){var n=this,r=A.min(t/100,i/100),e=QN(this.ptt);this.cit.forEach(function(t){var i=t.OO,s=t.dit;n.fit(s,r,e,i)}),this.fit(this.uit,r,e)},n.Stt=function(i){QR(this.hq,i),t.prototype.Stt.call(this,i)},n.Xtt=function(t,i,n){for(var r,e,s=this,u=this.hq,o=this.Wu.Iu/100,h=[],a=Ft(t);!(e=a()).done;){var c=e.value;void 0!==c.OO&&(Jn(h,c.OO)||h.push(c.OO))}this.cit.forEach(function(t,i){var r=t.OO,e=t.dit;!n&&Jn(h,r)||(Zi(e),s.cit.delete(i))});for(var f,v=Ft(i);!(f=v()).done;){var d=f.value;!n&&d.ro||this.ftt(d)}var l=[],g=ZN(this.uit.getBoundingClientRect());(r=l).push.apply(r,[].concat(this.Qtt(g)));for(var w,m=Ft(h);!(w=m()).done;){var p=w.value,y=void 0;this.cit.has(p.o)?y=this.cit.get(p.o).dit:(y=Jx(p,o),u.appendChild(y),this.cit.set(p.o,{OO:p,dit:y})),l.push(ZN(y.getBoundingClientRect()))}t.sort(nB);for(var _,k=Ft(t);!(_=k()).done;){var b=_.value,A=this.tit(b,l,g);void 0!==A&&l.push(A.dtt(.1))}},n.tit=function(t,i,n){var r,e;t.OO?(e=this.cit.get(t.OO.o).dit,"up"===t.OO.iF&&e.children.length>=1&&(e.style.transitionProperty="top",e.style.transitionDuration="0.433s")):e=this.uit;var s=null==(r=this._tt(t))?void 0:r[0];if(s||(s=this.vit(t),this.jtt(t,[s])),e.appendChild(s),t.OO||(Xx(s,t),t.FO?function(t,i,n,r){var e=Zx(t),s=e?n.Mi:n.Ti,u=S(getComputedStyle(i).lineHeight);if(0===u||E(u))return;var o=ZN(i.getBoundingClientRect()),h=A.round(am(t));"rl"===t.Pt&&(h=-(h+1));var a=u*h;"rl"===t.Pt&&(a=a-o.Ti+u);h<0&&(a+=s,u=-u);e?o.utt+=a:o.ott+=a;var c=o.Fy(),f=!1;for(;!n.pO(o)||JN(o,r);)if(e)if(u<0&&o.utt0&&o.att>n.att){if(o.utt=c.utt,f)break;u=-u,f=!0}else o.utt+=u;else if(u<0&&o.ott0&&o.htt>n.htt){if(o.ott=c.ott,f)break;u=-u,f=!0}else o.ott+=u;e?i.style.top=(o.utt-n.utt)/n.Mi*100+"%":i.style.left=(o.ott-n.ott)/n.Ti*100+"%"}(t,s,n,i):function(t,i,n,r){var e,s=ZN(i.getBoundingClientRect());if(0===s.Ti||0===s.Mi)return;Zx(t)?"center"===t.MO?s.utt-=s.Mi/2:"end"===t.MO&&(s.utt-=s.Mi):"center"===t.MO?s.ott-=s.Ti/2:"end"===t.MO&&(s.ott-=s.Ti);e=""===t.Pt?[tx.POS_Y,tx.NEG_Y,tx.POS_X,tx.NEG_X]:"lr"===t.Pt?[tx.POS_X,tx.NEG_X,tx.POS_Y,tx.NEG_Y]:[tx.NEG_X,tx.POS_X,tx.POS_Y,tx.NEG_Y];KN(s,i,e,n,r)}(t,s,n,i)),!t.OO)return ZN(s.getBoundingClientRect())},n.vit=function(t){for(var i=new Pa,n=t.U,r=this._it(t),e={git:void 0,xe:r},s=e,u="",o="",h=[e],a=[],c=[];i.ac0?c[c.length-1]:"")):"rt"===A&&"ruby"===b?(h.pop(),h.pop(),s=h[h.length-1]):"lang"===b&&(a.pop(),u=a.length>0?a[a.length-1]:"")}else if(f.Km===Bx.ait){var T=f.nit,S=new Pa;try{Zm(T,S)}catch(t){Ye("ERROR collecting timestamp",t)}}}return r},n.pit=function(t,i){var n=this.ptt,r=this.wtt;n.hZ&&(t.style.background=n.hZ);var e=r.nZ||i||n.nZ;e&&(t.style.color=e)},n.fit=function(t,i,n,r){if(r){var e=Qx(r,i);t.style.height=e*n+"px",t.style.left=Yx(r)+"%",t.style.top=$x(r,i)+"px"}t.style.fontSize=zx*i*n+"px"},n._it=function(t){var i=v.createElement("div");i.style.position="absolute",i.style.margin="0",i.style.padding="0",i.style.unicodeBidi="plaintext",i.style.wordWrap="break-word",i.style.overflowWrap="break-word",i.style.width="auto",i.style.textAlign=t.DO,function(t,i){"rl"===i.Pt?t.style.writingMode="vertical-rl":"lr"===i.Pt?t.style.writingMode="vertical-lr":t.style.writingMode="horizontal-tb"}(i,t),function(t,i){var n=vm(i);Zx(i)?(t.style.width=n+"%",t.style.height="auto"):(t.style.height=n+"%",t.style.width="auto")}(i,t),Xx(i,t);var n=this.ptt.oZ;n&&(i.style.background=n);var r=this.ptt.nZ;return r&&(i.style.color=r),i.style.textShadow=cx(this.ptt.aZ),i},i}($N);function Xx(t,i){var n,r,e=fm(i),s=cm(i),u=vm(i);if(Zx(i)){switch(e){case"line-left":n=s;break;case"center":n=s-u/2;break;case"line-right":n=s-u}r=i.FO?0:am(i)}else{switch(e){case"line-left":r=s;break;case"center":r=s-u/2;break;case"line-right":r=s-u}n=i.FO?0:am(i)}t.style.left=n+"%",t.style.top=r+"%"}function Gx(t,i){for(var n,r=Ft(i);!(n=r()).done;){var e=n.value;if(e.git){for(var s,u=Ft(e.git.eit);!(s=u()).done;){var o=s.value;hn(t,Hx+o)}"v"===e.git.$E.toLowerCase()&&e.git.sit&&hn(t,"theoplayer-webvtt-voice-"+e.git.sit)}}}function Qx(t,i){return t.ZO*(zx*i)*1.14}function Yx(t){return t.eF-t.$O*t.Ti/100}function $x(t,i){var n=t.sF,r=t.tF*Qx(t,i)/100;return A.max(0,n-r)}function Kx(t){var i=v.createElement("div");return i.className=jx+"default",ln(i),i.style.wordWrap="break-word",i.style.writingMode="horizontal-tb",i.style.pointerEvents="none",i.style.width="auto",i.style.height="auto",i.style.maxHeight="100%",i.style.minHeight="0px",i.style.padding="0",i.style.boxSizing="border-box",i.style.fontSize=zx*t+"px",i.style.lineHeight="1.14em",i}function Jx(t,i){var n=Kx(i);n.className=jx+t.o;var r=t.Ti,e=Qx(t,i);return n.style.width=r+"%",n.style.height=e+"px",n.style.left=Yx(t)+"%",n.style.right="",n.style.top=$x(t,i)+"px",n.style.bottom="",n.style.boxSizing="border-box",n}function Zx(t){return""===t.Pt}var tB=[["white","#fff"],["lime","#0f0"],["cyan","#0ff"],["red","#f00"],["yellow","#ff0"],["magenta","#f0f"],["blue","#00f"],["black","#000"]],iB=String.fromCharCode(95);function nB(t,i){var n=am(t),r=am(i),e=rB(n,t.FO),s=rB(r,i.FO);return e&&s?n-r||QP(i,t)||i.JI-t.JI:QP(t,i)||t.JI-i.JI}function rB(t,i){return i?t<0?t>-8:t>8:t>50}V(),It(),Bt(),Dt(),Ut(),V(),It(),Bt(),V(),It();var eB=function(t){return t.FONT_REGULAR="regular",t.FONT_UNDERLINE="underline",t.FONT_ITALICS="italics",t.FONT_UNDERLINE_ITALICS="underline-italics",t}({}),sB={nZ:ax.WHITE,sZ:ex.nl,rZ:"100%",hZ:ax.BLACK,oZ:"transparent",aZ:"none",mit:"regular",uZ:void 0,cZ:void 0,dZ:void 0,lZ:void 0},uB=[{wit:ax.WHITE,mit:"regular",yit:0},{wit:ax.WHITE,mit:"underline",yit:0},{wit:ax.GREEN,mit:"regular",yit:0},{wit:ax.GREEN,mit:"underline",yit:0},{wit:ax.BLUE,mit:"regular",yit:0},{wit:ax.BLUE,mit:"underline",yit:0},{wit:ax.CYAN,mit:"regular",yit:0},{wit:ax.CYAN,mit:"underline",yit:0},{wit:ax.RED,mit:"regular",yit:0},{wit:ax.RED,mit:"underline",yit:0},{wit:ax.YELLOW,mit:"regular",yit:0},{wit:ax.YELLOW,mit:"underline",yit:0},{wit:ax.MAGENTA,mit:"regular",yit:0},{wit:ax.MAGENTA,mit:"underline",yit:0},{wit:ax.WHITE,mit:"italics",yit:0},{wit:ax.WHITE,mit:"underline-italics",yit:0},{wit:ax.WHITE,mit:"regular",yit:0},{wit:ax.WHITE,mit:"underline",yit:0},{wit:ax.WHITE,mit:"regular",yit:4},{wit:ax.WHITE,mit:"underline",yit:4},{wit:ax.WHITE,mit:"regular",yit:8},{wit:ax.WHITE,mit:"underline",yit:8},{wit:ax.WHITE,mit:"regular",yit:12},{wit:ax.WHITE,mit:"underline",yit:12},{wit:ax.WHITE,mit:"regular",yit:16},{wit:ax.WHITE,mit:"underline",yit:16},{wit:ax.WHITE,mit:"regular",yit:20},{wit:ax.WHITE,mit:"underline",yit:20},{wit:ax.WHITE,mit:"regular",yit:24},{wit:ax.WHITE,mit:"underline",yit:24},{wit:ax.WHITE,mit:"regular",yit:28},{wit:ax.WHITE,mit:"underline",yit:28}],oB=[11,-1,1,2,3,4,12,13,14,15,5,6,7,8,9,10];function hB(t,i){return Rm(t.Ait,i.Ait)||Fn(t.zB,i.zB)}V(),It(),Ut();var aB=32,cB=/CC([1-4])=(.*)/;function fB(t){if(!t)return[];var i=[],n=t.trim().split(";");if(n.every(function(t){return t.match(cB)}))for(var r,e=Ft(n);!(r=e()).done;){var s=r.value.match(cB),u=s[1],o=s[2];i.push({Sit:Number(u),Tit:o})}else for(var h=0;h=0;n-=1){var r=i[n];r.Ht===t&&(r.kn(),$n(i,n))}},i.oet=function(i){fy(i.Lt)&&t.iet(i)&&(i.AP===Vw.ERROR?this.het(i):this.ret(i))},i.hr=function(){for(var t,i=Ft(this.tet);!(t=i()).done;){var n=t.value;n.Ht.mn(Fg.AI,this.uet),n.Ht.mn(Fg.kI,this.uet),n.kn()}tr(this.tet)},i.kn=function(){this.hr();for(var t,i=Ft(this.tet);!(t=i()).done;){t.value.kn()}this.Gl.mn(xg.rI,this.cet),this.Gl.mn(xg.oI,this.det),this.Gl.mn(Fg.pa,this.uet),this.aet.mn(aS.pa,this.let),this.ea.mn([WT.QL,WT.KL],this.let),this.Oz.mn("bI",this.fet)},t.iet=function(t){switch(t.Km){case jw.TTML:case jw.SRT:case jw.WEBVTT:case jw.CEA608:return!0}return!1},xt(t,[{key:"d6",get:function(){return this.aet.ds||this.ea.YL}}]),t}();V(),It(),Wt(),Bt(),Dt(),Yt();var wB=function(t){function i(i){var n;return(n=t.call(this)||this).vet=void 0,n._et=!1,n.pet=function(){n._et=!0,n.So(new zT)},n.met=function(){n._et=!1,n.So(new qT)},n.vet=i,n.vet.addEventListener("enterpictureinpicture",n.pet),n.vet.addEventListener("leavepictureinpicture",n.met),n}Pt(i,t);var n=i.prototype;return n.yo=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.JL?this.YL?[3,3]:(t=this.ww([WT.QL,WT.ma]),[4,this.vet.requestPictureInPicture()]):[3,4];case 1:return i.sent(),[4,t];case 2:i.sent(),this._et||this.So(new vS),i.label=3;case 3:return[3,5];case 4:this.So(new vS),i.label=5;case 5:return[2]}})}).call(this)},n.jo=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.JL?this._et?(t=this.ww([WT.KL,WT.ma]),[4,this.vet.ownerDocument.exitPictureInPicture()]):[3,3]:[3,4];case 1:return i.sent(),[4,t];case 2:i.sent(),this._et&&this.So(new vS),i.label=3;case 3:return[3,5];case 4:this.So(new vS),i.label=5;case 5:return[2]}})}).call(this)},n.kn=function(){this.Vo(),this.vet.removeEventListener("enterpictureinpicture",this.pet),this.vet.removeEventListener("leavepictureinpicture",this.met)},xt(i,[{key:"JL",get:function(){var t;return null!=(t=this.vet.ownerDocument.pictureInPictureEnabled)&&t}},{key:"YL",get:function(){return this._et}}]),i}(uh);function mB(t){var i=new jI,n=function(t){var i=[];return UI.la(t)&&i.push(new UI(t)),VI.la(t)&&i.push(new VI(t)),i}(t);if(n.length>0){for(var r,e=Ft(n);!(r=e()).done;){var s=r.value;i.EK(s)}i.kK(n[0])}return i}var pB=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this,i,n,r,e,s)||this).bet=void 0,u.Aet=void 0,u.wet=void 0,u.yet=void 0,u.wet=mB(i),u.yet=new wB(i),u.bet=new XN,u.Aet=new gB(u.bet.xe,u.Wu,u.nt,u.Ql,u.Ma,u.Sq),u}Pt(i,t);var n=i.prototype;return n.zP=function(){return this.pT},n.zg=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.yet.kn(),this.wet.kn(),this.bet.kn(),this.Aet.kn(),[4,t.prototype.zg.call(i)];case 1:return n.sent(),[2]}})}).call(this)},n.we=function(){t.prototype.we.call(this),this.bet.we()},n.be=function(){t.prototype.be.call(this),this.bet.be()},n.Y7=function(i){t.prototype.Y7.call(this,i),this.bet.Y7(i)},xt(i,[{key:"hq",get:function(){return this.pT}},{key:"DP",get:function(){return this.pT.videoHeight}},{key:"MP",get:function(){return this.pT.videoWidth}},{key:"Ma",get:function(){return this.wet}},{key:"Sq",get:function(){return this.yet}}]),i}(UN);V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It();V(),It(),Wt(),Yt(),V(),It();var yB=!1,_B=function(t){return t.Tet="HELLO",t.ket="HI_THERE",t.Eet="INITIALIZE",t.xet="APPEND_INIT",t.Pet="APPEND_DATA",t.Iet="ACK",t.Cet="REMOVE",t.Ret="DESTROY_SESSION",t}({}),kB=function(){function t(){this.im=void 0,this.yT=void 0,this.ta=new Rd}var i=t.prototype;return i.Det=function(t){var i=this;return this.ta.Zo(function(t){return jt(function(){var i,n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return pr(t),i=new MessageChannel,n=i.port1,r=i.port2,l.serviceWorker.controller?[3,2]:[4,cg(l.serviceWorker,"install",t)];case 1:h.sent(),h.label=2;case 2:return"activated"===l.serviceWorker.controller.state?[3,4]:[4,cg(l.serviceWorker.controller,"activate",t)];case 3:h.sent(),h.label=4;case 4:e={kind:"HELLO",port:r},l.serviceWorker.controller.postMessage(e,[r]),n.start(),this.im=n,h.label=5;case 5:return h.trys.push([5,7,,8]),[4,cg(n,"message",t)];case 6:if(s=h.sent(),"HI_THERE"!==(u=s.data).kind)throw new y("Could not set up message channel");return this.yT=u.sessionId,[3,8];case 7:throw mr(o=h.sent())&&this.Net(),o;case 8:return[2]}})}).call(i)},t)},i.Bet=function(t,i){var n=this;return this.im,this.ta.Zo(function(){return jt(function(){return zt(this,function(n){switch(n.label){case 0:if(!this.im)throw new y("MessageSession not set up yet or already closed.");return i||(i=[]),this.im.postMessage(t,i),[4,cg(this.im,"message")];case 1:return[2,n.sent().data]}})}).call(n)})},i.Met=function(){var t=this;return this.ta.Zo(function(){return t.Net()})},i.Net=function(){if(l.serviceWorker.controller&&"activated"===l.serviceWorker.controller.state&&this.im){var t={kind:"DESTROY_SESSION"};yB,this.im.postMessage(t),this.im.close(),this.im=void 0}},t}();V(),It(),Bt();var bB=function(){function t(){this.Oet=1/0}var i=t.prototype;return i.Fet=function(t,i){var n=t-i;this.Oet=n>this.Let?this.Oet:n},i.Uet=function(t){this.Oet=t},xt(t,[{key:"Let",get:function(){return this.Oet}}]),t}();V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It();var AB=function(t){return t.Bk="audio",t.Mk="video",t.zU="metadata",t}({}),TB=function(t){function i(i,n){var r;return(r=t.call(this)||this).IQ=void 0,r.Xet=void 0,r.Vet=void 0,r.Het=void 0,r.ta=void 0,r.qet=void 0,r.Wet=void 0,r.IQ=i,r.Xet=n,r.Vet=void 0,r.Het=void 0,r.ta=new Rd,r.qet=!1,r.Wet=!1,r}Pt(i,t);var n=i.prototype;return n.G3=function(t,i){},n.X3=function(t,i){},n.jZ=function(){return this.Wet},n.j3=function(){return jt(function(){return zt(this,function(t){return[2]})})()},n.f3=function(t,i){return jt(function(){return zt(this,function(t){return[2]})})()},n.Q2=function(t,i,n){return jt(function(){var r,e,s;return zt(this,function(u){if(r=this,t.Km!==nC.wZ)throw new y("Streaming or opaque segments are not supported yet.");return e=t.lk,s=function(){return jt(function(){var t,n,r;return zt(this,function(s){switch(s.label){case 0:return t=e.buffer,n={kind:_B.Pet,mediaType:SB(this.IQ),segment:e,startPts:i.Get,totalDuration:i.ct},[4,this.Xet.Bet(n,[t])];case 1:return s.sent(),void 0===this.Vet&&(r=i.Get+i.EU,this.Vet=r,this.Het=r),this.Het=this.Het+i.ct,this.So(new ah(tC.pZ)),[2]}})}).call(r)},[2,this.ta.Zo(function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:pr(t),i.label=1;case 1:return i.trys.push([1,,3,4]),this.qet=!0,[4,s()];case 2:return i.sent(),[3,4];case 3:return this.qet=!1,[7];case 4:return[2]}})}).call(r)},n)]})}).call(this)},n.J2=function(t,i,n){return jt(function(){var i,r,e;return zt(this,function(s){if(i=this,t.Km!==nC.wZ)throw new y("Streaming or opaque initialization segments are not supported yet.");return r=t.lk,e=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t={kind:_B.xet,mediaType:SB(this.IQ),segment:r},[4,this.Xet.Bet(t,[])];case 1:return i.sent(),[2]}})}).call(i)},[2,this.ta.Zo(function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:pr(t),i.label=1;case 1:return i.trys.push([1,,3,4]),this.qet=!0,[4,e()];case 2:return i.sent(),[3,4];case 3:return this.qet=!1,[7];case 4:return[2]}})}).call(i)},n)]})}).call(this)},n.F3=function(){this.Wet=!0},n.I3=function(){this.Wet=!1},n.pS=function(t,i,n){return jt(function(){var t,r;return zt(this,function(e){return t=this,r=function(){return jt(function(){var t;return zt(this,function(n){switch(n.label){case 0:return t={kind:_B.Cet,mediaType:SB(this.IQ),endTime:i},[4,this.Xet.Bet(t)];case 1:return n.sent(),this.Vet=void 0,this.Het=void 0,this.So(new ah(tC.pZ)),[2]}})}).call(t)},[2,this.ta.Zo(function(i){return jt(function(){return zt(this,function(t){switch(t.label){case 0:pr(i),t.label=1;case 1:return t.trys.push([1,,3,4]),this.qet=!0,[4,r()];case 2:return t.sent(),[3,4];case 3:return this.qet=!1,[7];case 4:return[2]}})}).call(t)},n)]})}).call(this)},n.IZ=function(t){return this.IQ===t.GT},n.RZ=function(t){return this.IQ=t.GT,ot.resolve()},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),[4,this.ta.kn()];case 1:return t.sent(),[2]}})}).call(this)},xt(i,[{key:"Fx",get:function(){return void 0===this.Vet||void 0===this.Het?LA.rL():new LA([this.Vet,this.Het])}},{key:"Cd",get:function(){return{GT:this.IQ}}},{key:"V3",get:function(){return Qv(this.IQ)?vw.Bk:Yv(this.IQ)?vw.Mk:vw.yk}},{key:"lQ",get:function(){return this.IQ}},{key:"W3",get:function(){return LA.rL()}},{key:"VY",get:function(){return 30},set:function(t){}},{key:"zY",get:function(){return 30},set:function(t){}},{key:"ga",get:function(){return this.qet}},{key:"zet",get:function(){return this.Vet}},{key:"RO",get:function(){return this.Het}}]),i}(uh);function SB(t){return t.match(/video/)?AB.Mk:AB.Bk}var EB=function(){function t(t,i,n,r){this.ZS=void 0,this.hw=void 0,this.pT=void 0,this.B4=void 0,this.M4=void 0,this.ES=void 0,this.ZS=t,this.M4=Wn(i,function(t){return Boolean(t.lQ.match(/video/))}),this.B4=Wn(i,function(t){return Boolean(t.lQ.match(/audio/))}),this.hw=n,this.pT=r,this.Qet()}var i=t.prototype;return i.Qet=function(){},i.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,ot.all([this.B4,this.M4].filter(Fi).map(function(t){return t.zg()}))];case 1:return t.sent(),[2]}})}).call(this)},i.F4=function(t){},i.W4=function(t,i,n,r){},i.F3=function(){var t,i;null==(t=this.B4)||t.F3(),null==(i=this.M4)||i.F3()},i.I3=function(){var t,i;null==(t=this.B4)||t.I3(),null==(i=this.M4)||i.I3()},i.IZ=function(t){return!!NN(this,t)},i.RZ=function(t){return this.ZS=t,ot.resolve()},i.NZ=function(t){},i.xZ=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,this.hw.nw(t.Ym,i)];case 1:return[4,r.sent().RS()];case 2:return n=r.sent(),[4,this.PZ(n)];case 3:return r.sent(),[2,n]}})}).call(this)},i.PZ=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:if(t&&!this.pT.src)throw new lw(pd.CONTENT_PROTECTION_ERROR,"Attempted to attach MediaKeys to a sourceless MediaElement");if(!t&&this.pT.src)throw new lw(pd.CONTENT_PROTECTION_ERROR,"Attempted to remove MediaKeys from a non-empty MediaElement");return(i=this.ES)?[4,i.IS(this.pT)]:[3,2];case 1:n.sent(),this.ES=void 0,n.label=2;case 2:return t?[4,t._n(this.pT)]:[3,4];case 3:n.sent(),this.ES=t,n.label=4;case 4:return[2]}})}).call(this)},t.jet=function(i,n,r,e){for(var s=[],u=0;u0){var n,r,e=(t=i[0]).width,s=this.vet.videoWidth/this.vet.videoHeight,u=t.height;e/u>s?(n=u*s,r=u):(r=e/s,n=e),this.vet.style.width=n+"px",this.vet.style.height=r+"px",this.vet.style.marginLeft=(e-n)/2+"px",this.vet.style.marginTop=(u-r)/2+"px",this.vet.style.backgroundColor="black"}},n.yst=function(){this.vet.style.width="100%",this.vet.style.height="100%",this.vet.style.marginLeft="",this.vet.style.marginTop="",this.vet.style.backgroundColor=""},n.bq=function(t,i,n,r,e){},n.sI=function(t,i,n,r,e,s,u,o,h){var a=new aD(t,i,n,r,e,s,u,h,o);return this.Gl.tt(a),this.J9.tt(a),a},n.Tq=function(t){throw y("Not supported.")},n.$Z=function(t){},n.V9=function(t){return ot.resolve({H9:!1})},n.hP=function(){return DR(this.vet)},n.be=function(){this.vet.style.display="block",this.bet.be()},n.we=function(){this.vet.style.display="none",this.bet.we()},n.G7=function(){},n.Un=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(t.Km===Ly.AV)throw new y("Not yet implemented");return[4,this.Xet.Det()];case 1:return r.sent(),i=Wn(t.fq,function(t){return t.xS.Km===No.jm}),n={kind:_B.Eet,mediaBufferConfigs:t.q4.map(function(t){return t.GT}),fairPlaySdkUri:null==i?void 0:i.GH},[4,this.Xet.Bet(n)];case 2:return r.sent(),this.aq=EB.jet(t,this.Xet,this.hw,this.vet),this.DZ.Un(this.aq,t),this.vet.setAttribute("x-webkit-airplay","deny"),this.vet.setAttribute("x-webkit-wirelessvideoplaybackdisabled",""),this.vet.disableRemotePlayback=!0,this.vet.preload="none",this.vet.src="https://theo.proxy/"+this.Xet.yT+"/master.m3u8",[2,this.aq]}})}).call(this)},n.X7=function(){},n.rV=function(t){this.Gl.it(t),this.J9.it(t)},n.Eq=function(){for(var t,i=Ft(this.Gl.NI.slice());!(t=i()).done;){t.value.kn()}this.Gl.hr()},n.$W=function(t){},n.wq=function(){return!1},n.Y7=function(t){t.appendChild(this.vet),this.bet.Y7(t)},n.zP=function(){return this.vet},n.$P=function(){},xt(i,[{key:"hq",get:function(){return this.vet}},{key:"d5",get:function(){return!1}},{key:"zx",get:function(){return this.vet.currentTime+this.dst.Let}},{key:"lP",get:function(){return this.vet.paused}},{key:"OP",get:function(){return this.vet.volume},set:function(t){this.vet.volume=t}},{key:"vP",get:function(){return this.vet.playbackRate},set:function(t){this.vet.playbackRate=t}},{key:"lst",get:function(){return this.vet.defaultPlaybackRate}},{key:"Fx",get:function(){var t,i;return null!=(i=null==(t=this.aq)?void 0:t.Fx)?i:LA.rL()}},{key:"fst",get:function(){return LA.jn(this.vet.buffered)}},{key:"pP",get:function(){var t=this.vst;return this.Ho.HM(t.Ly(this.dst.Let))}},{key:"vst",get:function(){return LA.jn(this.vet.played)}},{key:"xP",get:function(){return this.Pz}},{key:"n5",get:function(){return!1}},{key:"_5",get:function(){return!1}},{key:"ct",get:function(){return this.vet.duration}},{key:"oP",get:function(){return this.vet.muted},set:function(t){this.vet.muted=t}},{key:"zit",get:function(){return this.vet.style}},{key:"ML",get:function(){return io({},KR,{BL:!0})}},{key:"AP",get:function(){return this.e9.AP}},{key:"DP",get:function(){return this.vet.videoHeight}},{key:"MP",get:function(){return this.vet.videoWidth}},{key:"Qx",get:function(){return this.vet.ended}},{key:"Mi",get:function(){return this.vet.offsetHeight*Vi.Zs.fp}},{key:"Ti",get:function(){return this.vet.offsetWidth*Vi.Zs.fp}},{key:"sP",get:function(){return!1}},{key:"j7",get:function(){return this.Q7}},{key:"Vx",get:function(){}},{key:"Wu",get:function(){return this.bst}},{key:"lt",get:function(){}},{key:"Ma",get:function(){return this.wet}},{key:"Sq",get:function(){return this.ea}},{key:"kP",get:function(){return this.aq?this.aq.kP:LA.rL()}},{key:"uq",get:function(){}},{key:"nt",get:function(){return this.Gl}},{key:"Ql",get:function(){return this.Oz}},{key:"WP",get:function(){return!1},set:function(t){}},{key:"a9",get:function(){return"block"===this.vet.style.display}},{key:"Rq",get:function(){return this.DZ.Rq},set:function(t){this.DZ.Rq=t}},{key:"J7",get:function(){},set:function(t){}},{key:"T8",get:function(){}}]),i}(uh),RB=[vw.Bk,vw.Mk],CB=function(){function t(t,i,n,r,e,s){void 0===r&&(r=2),void 0===e&&(e=RB),void 0===s&&(s=Fd()),this.Cst=void 0,this.Ast=void 0,this.hw=void 0,this.Sst=void 0,this.sc=void 0,this.Oz=void 0,this.GJ=void 0,this.kst=void 0,this.Cst=r,this.Ast=[].concat(e),this.hw=s,this.sc=t,this.Oz=i,this.GJ=n,this.Sst=ro(),this.Ist()}var i=t.prototype;return i.Est=function(t){for(var i,n=Ft(this.Fz);!(i=n()).done;){i.value.Y7(t)}},i.Yq=function(t){var i=this.Sst.get(t);if(i){var n=Wn(i,function(t){return t.xst});return n?(n.xst=!1,n.Tst):void 0}},i.Pst=function(t){if(!this.kst){var i,n=null==(i=this.Sst.get(vw.Mk))?void 0:i[0].Tst.hq;if(!n)throw new y("Error creating iOS Safari MediaController");this.kst=new IB(n,this.hw,this.sc,this.Oz),n.parentElement&&this.kst.Y7(n.parentElement)}return this.kst},i.Dq=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return i=t.hq,n=i.tagName.toLowerCase(),[4,t.hr()];case 1:return e.sent(),Lr(i),(r=Wn(this.Sst.get(n)||[],function(i){return t===i.Tst}))&&(r.xst=!0),[2]}})}).call(this)},i.Nz=function(){for(var t,i=Ft(this.Fz);!(t=i()).done;){t.value.K7()}},i.kn=function(){for(var t,i=Ft(this.Fz);!(t=i()).done;){var n=t.value,r=n.hq;n.zg(),Mr(r),Zi(r)}this.Sst.clear(),this.kst=void 0},i.Ist=function(){for(var t,i=Ft(this.Ast);!(t=i()).done;){var n=t.value,r=[];this.Sst.set(n,r);for(var e=0;e0)for(;n1||t<=0)throw new RangeError("The step must be a number greater than 0 and smaller than or equal to 1");var n;return n="function"==typeof f.IntersectionObserver?new OB(this.bo,t,this.jst(i)):new LB(this.bo,t,this.jst(i)),this.Qst.push(n),n},i.Uo=function(t){t.KP(),Yn(this.Qst,t)},i.Xst=function(t){for(var i,n=Ft(this.Qst);!(i=n()).done;){var r=i.value;if(r.Ca===t)return r}},i.kn=function(){for(var t,i=Ft(this.Qst);!(t=i()).done;){t.value.KP()}tr(this.Qst)},xt(t,[{key:"qst",get:function(){return this.zst}},{key:"Lo",get:function(){return this.Gst},set:function(t){if(E(t)||t<0||t>1)throw new RangeError("The threshold must be a value between 0 and 1");this.Gst=t}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{get ratio(){return t.qst},get visible(){return t.qst>t.Lo},get visibleThreshold(){return t.Lo},set visibleThreshold(i){i=Jg(i),t.Lo=i},addObserver:function(i,n){return i=Jg(i),t.Do(i,n).Ca},removeObserver:function(i){var n=t.Xst(i);n&&t.Uo(n)}}}(this)),this.hu}}]),t}();V(),It(),Dt();var UB=function(t){function i(){return t.call(this,ch.Iw)||this}return Pt(i,t),i}(ah),VB=function(t){function i(i,n,r,e){var s;(s=t.call(this)||this).dnt=void 0,s.Cd=void 0,s.Pa=void 0,s.cnt=void 0,s.Dx=void 0,s.oJ=void 0,s.bJ=void 0,s.ant=void 0,s.ont=void 0,s.Mz=void 0,s.Lz=void 0,s.rnt=void 0,s.QJ=void 0,s.tnt=void 0,s.unt=void 0,s.Oz=void 0,s.Yst=!1,s.ko=!1,s.yO=void 0,s.bz=void 0,s.lnt=!1,s.Bz=void 0,s.Zst=void 0,s.ent=void 0,s.$st=void 0,s.Jc=void 0,s.Io=void 0,s.int=void 0,s.Na=void 0,s.hnt=function(t){if(!s.lnt){s.lnt=!0;var i=s.dnt,n=pw(t);s.Pa.OI=new mS(s.xe,n,t),Er(i.kn())}},s.fnt=function(t){t.type!==ch.Xw&&t.type!==ch.Gw&&s.So(t)};var u=Jg(n.uid);E(u)?s.yO=Pw++:s.yO=u,s.Cd=n;var o=Vi.Dx,h=new jR;s.cnt=new gI("10.3.0",o,h),s.Mz=new kR,s.Lz=new jb;var a=new DB(o,s.Mz);s.Dx=new hR(a,n.allowMixedContent),s.QJ=null!=r?r:new WE(n.isEmbeddable,"10.3.0",LE()),s.rnt=new VR(o,s.QJ,s.cnt,h,n,LE()),s.rnt.qJ().catch(s.hnt),s.tnt=new OI(i),s.tnt.wn(AI.yn,s.Rs),s.Oz=new GR;var c=new(null!=e?e:CB)(s.tnt,s.Oz,n);c.Est(i),s.oJ=new ER,s.bJ=new RR;var f=new wS(i,n,s.Dx,s.Mz,s.Lz,c,s.Oz);s.Mz.GY(f);var v=f;return v=new IR(v,s.snt),v=new CR(v,s.yJ),s.dnt=v,s.Pa=new ZT(s.dnt),s.Pa.lw(s.fnt),s.int=new PR(s.Pa),s.ent=new fR(s.Pa,s.Dx,s.Mz),s.ant=new bI(s),s.unt=new HI(s.Pa,n.allowNativeFullscreen),s.ont=new YI(s.unt,s.Pa.Aa()),s.tnt._n(),s.Io=new FB(i),s.Bz=new CB(s.tnt,s.Oz,n,1,[vw.Mk]),s.Zst=new KI(s.Bz),s.$st=new BR,s}Pt(i,t);var n=i.prototype;return n.Ux=function(){return this.Pa.Fx},n.Gx=function(){return this.Pa.zx},n.Xx=function(t,i){this.Pa.Xx(t,i)},n.nnt=function(){return this.Gx()},n.Nd=function(){return this.Pa.ct},n.Yx=function(){return this.Pa.lt},n.Zx=function(){return this.Pa.Jx},n.uP=function(t){this.Pa.oP=t,t||this.lP||this.GP()},n._P=function(){return this.Pa.vP},n.gP=function(t){this.Pa.vP=t},n.mP=function(){return this.Pa.pP},n.EP=function(){return this.Pa.kP},n.UP=function(t){this.Pa.OP=t},n.Ea=function(){FT(this,PS,this)},n.QP=function(){this.Pa.QP()},n.jP=function(){this.Pa.jP()},n.nu=function(){return this.bz},n.Ta=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.bz=t,t?(this.rnt.Nj(t).catch(this.hnt),n=function(t){t.sources;var i=t.sources.filter(function(t){return Ui(t.integration)});return t.sources=i,t}(t),[4,this.Pa.Ta(n,i)]):[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})}).call(this)},n.IP=function(t,i,n){return this.Pa.IP(t,i,n)},n.CP=function(){return this.Pa.CP()},n.GP=function(){if(!this.ko){this.Pa.GP(),this.Zst.GP();for(var t=this.xe.getElementsByTagName("video"),i=0;i0]}})}).call(this)},n.Yrt=function(i,n,r){return t.prototype.Q2.call(this,i,n,r)},n.Jrt=function(i,n,r){return t.prototype.pS.call(this,i,n,r)},xt(i,[{key:"Tst",get:function(){return this.PL},set:function(t){this.PL=t}}]),i}(zO),XO=function(t){function i(i){var n;return(n=t.call(this,i)||this).PL=void 0,n.Brt(i),n}return Pt(i,t),i.prototype.Lrt=function(t){var i=new qO(t);return i.Tst=this.PL,i},xt(i,[{key:"Tst",get:function(){return this.PL},set:function(t){this.PL=t,this.B4&&(this.B4.Tst=t),this.M4&&(this.M4.Tst=t)}}]),i}(HO);V(),It(),Bt(),Dt();var GO=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),xt(i,[{key:"wP",get:function(){return this.aq.wP},set:function(t){this.aq.wP=t}}]),i}(jO);function QO(t){var i=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.zP=function(){return this.PL.zP()},xt(i,[{key:"hq",get:function(){return this.PL.hq}},{key:"MP",get:function(){return this.PL.MP}},{key:"DP",get:function(){return this.PL.DP}}]),i}(t);return i}V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt(),V(),It(),Wt(),Bt(),Dt(),Yt();var YO=function(t){function i(i){var n;return(n=t.call(this)||this).PL=void 0,n.aq=void 0,n.nht=new fA,n.dht=function(t){return n.iI(t)},n.PL=i,n.nht.OI=i.nt,n.PL.wn($R,n.dht),n}Pt(i,t);var n=i.prototype;return n.Ux=function(){return this.PL.Fx},n.Hx=function(){return this.PL.Vx},n.Gx=function(){return this.PL.zx},n.Nd=function(){return this.PL.ct},n.$rt=function(){return this.PL.uq},n.tht=function(){return this.PL.Qx},n.qP=function(){return this.PL.Ma},n.Aa=function(){return this.PL.Sq},n.iht=function(){return this.PL.lP},n.mP=function(){return this.PL.pP},n.TP=function(){return this.PL.AP},n.EP=function(){return this.PL.kP},n.PP=function(){return this.PL.xP},n.eht=function(){return this.PL.n5},n.sht=function(){return this.PL._5},n.RP=function(){return this.nht},n.Ett=function(){return this.PL.Ql},n.rht=function(){return this.PL.Rq},n.hht=function(t){this.PL.Rq=t},n.oht=function(t){this.PL.J7=t},n.aht=function(){return this.PL.T8},n.hP=function(){return this.PL.hP()},n.QP=function(){return this.PL.QP()},n.jP=function(){this.PL.jP()},n.Oy=function(t,i,n){this.PL.Oy(t,i,n)},n.$W=function(t){this.PL.$W(t)},n.be=function(){this.PL.be()},n.we=function(){this.PL.we()},n.sI=function(t,i,n,r,e,s,u,o){return this.PL.sI(t,i,n,r,e,s,u,o)},n.Tq=function(t){return this.PL.Tq(t)},n.wq=function(){return this.PL.wq()},n.bq=function(t,i,n,r,e){return this.PL.bq(t,i,n,r,e)},n.rV=function(t){this.PL.rV(t)},n.Eq=function(){this.PL.Eq()},n.$Z=function(t){return this.PL.$Z(t)},n.V9=function(t){return this.PL.V9(t)},n.Un=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return[4,this.PL.Un(t)];case 1:return i=r.sent(),n=t.Km===Ly.AV?this.uht(i):this.cht(i),this.aq=n,[2,n]}})}).call(this)},n.hr=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.aq?[4,this.aq.zg()]:[3,2];case 1:t.sent(),this.aq=void 0,t.label=2;case 2:return[4,this.PL.hr()];case 3:return t.sent(),[2]}})}).call(this)},n.F8=function(){return this.PL.F8()},n.G7=function(){this.PL.G7()},n.X7=function(){this.PL.X7()},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),this.PL.mn($R,this.dht),this.nht.OI=void 0,this.nht.kn(),this.aq?[4,this.aq.zg()]:[3,2];case 1:t.sent(),this.aq=void 0,t.label=2;case 2:return[2]}})}).call(this)},n.K7=function(){this.PL.K7()},n.fht=function(t){this.PL.mn($R,this.dht),this.PL=t,this.nht.OI=t.nt,this.PL.wn($R,this.dht)},n.iI=function(t){this.So(t)},xt(i,[{key:"Zrt",get:function(){return this.PL}},{key:"Fx",get:function(){return this.Ux()}},{key:"Vx",get:function(){return this.Hx()}},{key:"zx",get:function(){return this.Gx()}},{key:"Wu",get:function(){return this.PL.Wu}},{key:"ct",get:function(){return this.Nd()}},{key:"uq",get:function(){return this.$rt()}},{key:"Qx",get:function(){return this.tht()}},{key:"lt",get:function(){return this.PL.lt}},{key:"Mi",get:function(){return this.PL.Mi}},{key:"Ti",get:function(){return this.PL.Ti}},{key:"Ma",get:function(){return this.qP()}},{key:"Sq",get:function(){return this.Aa()}},{key:"oP",get:function(){return this.PL.oP},set:function(t){this.PL.oP=t}},{key:"lP",get:function(){return this.iht()}},{key:"vP",get:function(){return this.PL.vP},set:function(t){this.PL.vP=t}},{key:"pP",get:function(){return this.mP()}},{key:"AP",get:function(){return this.TP()}},{key:"kP",get:function(){return this.EP()}},{key:"xP",get:function(){return this.PP()}},{key:"n5",get:function(){return this.eht()}},{key:"_5",get:function(){return this.sht()}},{key:"nt",get:function(){return this.RP()}},{key:"Ql",get:function(){return this.Ett()}},{key:"a9",get:function(){return this.PL.a9}},{key:"OP",get:function(){return this.PL.OP},set:function(t){this.PL.OP=t}},{key:"j7",get:function(){return this.PL.j7}},{key:"sP",get:function(){return this.PL.sP}},{key:"ML",get:function(){return this.PL.ML}},{key:"Rq",get:function(){return this.rht()},set:function(t){this.hht(t)}},{key:"J7",get:function(){return this.PL.J7},set:function(t){this.oht(t)}},{key:"T8",get:function(){return this.aht()}}]),i}(uh),$O=function(t){function i(i){return t.call(this,i)||this}Pt(i,t);var n=i.prototype;return n.Y7=function(t){this.PL.Y7(t)},n.$P=function(){this.PL.$P()},xt(i,[{key:"Zrt",get:function(){return this.PL}},{key:"hq",get:function(){return this.PL.hq}},{key:"d5",get:function(){return this.PL.d5}},{key:"WP",get:function(){return this.PL.WP},set:function(t){this.PL.WP=t}}]),i}(YO),KO=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.cht=function(t){var i=new XO(t);return i.Tst=this,i},n.uht=function(t){return new GO(t)},i}($O),JO=function(t){function i(i){return t.call(this,i)||this}return Pt(i,t),i}(VO(KO)),ZO=function(t){function i(i){return t.call(this,i)||this}return Pt(i,t),i}(QO(KO)),tM=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.Yq=function(i){return i===vw.Mk?new ZO(t.prototype.Yq.call(this,i)):i===vw.Bk?new JO(t.prototype.Yq.call(this,i)):void 0},n.Dq=function(i){var n=this;return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return[4,(r=i).zg()];case 1:return e.sent(),[4,t.prototype.Dq.call(n,r.Zrt)];case 2:return e.sent(),[2]}})})()},i}(UO);V(),It();var iM=function(){function t(t){var i=this;this.oa=void 0,this._ht=function(t){t.persisted&&i.vht()},this.oa=t,f.addEventListener("pageshow",this._ht)}var i=t.prototype;return i.vht=function(){this.oa.tI()},i.kn=function(){f.removeEventListener("pageshow",this._ht)},t}();V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It(),V(),It();var nM=function(){function t(t){this.wht=void 0,this.wht=t}var i=t.prototype;return i.ght=function(t,i,n){return ot.resolve()},i.pht=function(t,i,n,r){var e=[];if(r){var s={TU:i.CO,kU:i.RO,EU:n.mht.EU};r.Km===jw.TTML?e=Vp(t,r,s,n.lQ):r.Km===jw.WEBVTT&&(e=jm(t,s,this.wht).L)}return e},i.hr=function(){},t}();V(),It(),Ut(),V(),It(),Ut(),V(),It();var rM,eM=function(t){return t.PR="vttc",t.yht="vsid",t.bht="iden",t.Aht="ctim",t.Sht="sttg",t.Tht="payl",t.kht="vtte",t.Eht="vtta",t}({}),sM=function(){function t(){}return t.xht=function(i){return Boolean(t.Pht[i])},t.PD=function(i){for(var n,r=[],e=Ft(Sp.lD(new kp(i,new Pa)));!(n=e()).done;){var s=n.value;t.xht(s.Km)&&r.push(t.Pht[s.Km](s.lk))}return r},t.Iht=function(i){var n=Sp.lD(i),r=Ip(n,eM.yht),e=Ip(n,eM.bht),s=Ip(n,eM.Aht),u=Ip(n,eM.Sht),o=Ip(n,eM.Tht);return{Km:eM.PR,Cht:r?t.Rht(r):void 0,Dht:e?t.Nht(e):void 0,Bht:s?t.Mht(s):void 0,Lht:u?t.Oht(u):void 0,Fht:o?t.Uht(o):void 0}},t.Rht=function(t){return{Km:eM.yht,Vht:t.sD()}},t.Nht=function(t){return{Km:eM.bht,Dht:t.aD()}},t.Mht=function(t){return{Km:eM.Aht,Hht:t.aD()}},t.Oht=function(t){return{Km:eM.Sht,Wht:t.aD()}},t.Uht=function(t){return{Km:eM.Tht,qht:t.aD()}},t.zht=function(t){return{Km:eM.kht}},t.Ght=function(t){return{Km:eM.Eht,Xht:t.aD()}},t}();sM.Pht=((rM={})[eM.PR]=sM.Iht,rM[eM.kht]=sM.zht,rM[eM.Eht]=sM.Ght,rM);var uM=function(){function t(){this.Qht=NaN}var i=t.prototype;return i.ght=function(t,i,n){var r=new DataView(t.jht),e=Pp.PD(r),s=Wn(e,function(t){return t.Km===mp.HC});return s&&(this.Qht=s.Z[0].$D.yD.jD),ot.resolve()},i.pht=function(t,i,n){if(E(this.Qht))return[];var r=Aa(t),e=Pp.PD(r),s=Ap(e,mp.NR),u=Ap(e,mp.WR);if(!s||0===s.Z.length||!u)return[];var o=function(t,i,n){for(var r,e=t.Z[0],s=e.KB?e.KB.KB.toNumber()/n:i.CO,u=[],o=Ft(e.QB);!(r=o()).done;){var h,a=r.value;(h=u).push.apply(h,[].concat(a.iM))}return{Kht:s,iM:u}}(s,i,this.Qht),h=n.mht.EU;return function(t,i,n,r){for(var e=sM.PD(Aa(i.lk)),s=t.iM,u=t.Kht+r,o=[],h=0,a=0;a=this.tut},t}(),_M=function(){function t(t,i){this.rut=void 0,this.eut=void 0,this.lut=void 0,this.rut=i,i&&dw(t)?t===vw.Mk?(this.lut=5e3,this.eut=new yM(.05,1,0)):(this.lut=0,this.eut=new yM(.005,.1,0)):(this.lut=16e3,this.eut=new yM)}return t.prototype.sut=function(t){var i=t.nut,n=this.rut?t.hut-t.aut:t.hut-t.uut,r=t.cut;!r&&i=this.Mz.YY}},{key:"rct",get:function(){var t,i=this.ect.ZW;if(i&&i.V>0)t=i.An(0);else{t=this.W8.zx;var n=this.ect.s$,r=n.zM(t);r>=0&&(t=n.An(r))}var e=this.ect.kP.Tn(0);if(e>t){if(this.ect.Tn<=t&&this.ect.An>=t&&e>t+WM)throw new dM(t,e);t=e}return t=this.ect.act.LM(t)}}]),t}();V(),It(),Bt(),Ut();var qM=function(){function t(){this.Wm=void 0,this.cct=void 0,this.Wm=ro(),this.cct=LA.rL()}var i=t.prototype;return i.dct=function(t){return this.Wm.get(t.o)},i.lct=function(){var t=this.cct;return this.Wm.forEach(function(i){t=t.HM(i)}),t},i.fct=function(t){if(this.cct.Cr(t))return!0;var i=!1;return this.Wm.forEach(function(n){i=i||n.Cr(t)}),i},i.vct=function(t,i){var n=this.Wm.get(i.o);return!!n&&n.Cr(t)},i.GM=function(t,i){if(this.cct.GM(t,i))return!0;var n=!1;return this.Wm.forEach(function(r){n=n||r.GM(t,i)}),n},i._ct=function(t,i){var n=this.Wm.get(i),r=n?n.HM(t):t;this.Wm.set(i,r),this.cct=this.cct.HM(t)},i.gct=function(t){var i=this;this.Wm.forEach(function(n,r){i.Wm.set(r,n.HM(t))}),this.cct=this.cct.HM(t)},i.pct=function(t){var i=this;this.Wm.forEach(function(n,r){i.Wm.set(r,n.Mn(t))}),this.cct=this.cct.Mn(t)},i.hr=function(){var t=this;this.Wm.forEach(function(i,n){t.Wm.set(n,LA.rL())}),this.cct=LA.rL()},xt(t,[{key:"uct",get:function(){if(0===this.Wm.size)return this.cct;var t=LA.nL(0,1/0);return t=t.Mn(this.cct),this.Wm.forEach(function(i){t=t.Mn(i)}),t}}]),t}(),XM=function(){function t(t){this.Ht=void 0,this.wct=void 0,this.n$=void 0,this.bct=[],this.Ht=t,this.wct=new qM,this.n$=new qM}var i=t.prototype;return i.yct=function(t){for(var i,n=Ft(this.bct);!(i=n()).done;){var r=i.value;if(r.Tat>t)break;if(r.Eat>t)return r}},i.Act=function(t){for(var i,n=Ft(this.bct);!(i=n()).done;){var r=i.value;if(r.Sct>t)break;if(r.Tct>=t)return r}},i.kct=function(t,i){for(var n,r=[],e=Ft(this.bct);!(n=e()).done;){var s=n.value;if(s.Tat>t)break;s.Eat>=i&&r.push(s)}return r},i.Sat=function(){return this.bct},i.Iat=function(t){var i=LA.nL(t.Sct,t.Tct),n=i.OM();this.wct.pct(n),this.wct._ct(i,t.Pat),this.Ect(n);var r=Xn(this.bct,function(i){return t.Tat<=i.Tat});r<0?this.bct.push(t):this.bct[r].Eat<=t.Eat?this.bct.splice(r,1,t):this.bct.splice(r,0,t)},i.r$=function(t,i){this.n$._ct(t,i)},i.xct=function(t){this.n$.gct(t)},i.pct=function(t){this.wct.pct(t),this.n$.pct(t);var i=this.wct.lct();this.Ect(i)},i.Ect=function(t){this.bct=this.bct.filter(function(i){return t.jM(i.Sct,i.Tct)}).map(function(i){return i.Pct&&!t.GM(i.Sct,i.Tct)?function(t,i){return{Pat:t.Pat,Tat:t.Tat,Eat:t.Eat,Sct:t.Sct,Tct:t.Tct,Pct:i}}(i,!1):i})},i.hr=function(){this.wct.hr(),this.n$.hr(),this.bct=[]},i.kn=function(){this.hr()},xt(t,[{key:"mct",get:function(){return this.wct}},{key:"s$",get:function(){return this.n$}}]),t}();V(),It(),V(),It(),Wt(),Bt(),Ut(),Yt();var GM=function(){function t(t,i,n){this.Dat=void 0,this.Yot=void 0,this.jp=void 0,this.Ict=void 0,this.Dat=t,this.Yot=i,this.jp=n}var i=t.prototype;return i.Cct=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:return pr(n),e=this.Yot.Act(t),r=e&&Pn(e.Tct,t,1e-5)?e.Eat:t,s=this.Rct(r),u=function(t){return QM.bind(void 0,t)}(r),[4,this.jp.Dct(u,s,i,n)];case 1:o=f.sent(),pr(n),f.label=2;case 2:return o&&this.Nct(o.yut)?(h=KM(o.yut),a=o.qot,[4,this.jp.Dct(h,[a],i,n)]):[3,4];case 3:return o=f.sent(),pr(n),[3,2];case 4:return o?this.Bct(o.yut)?(c=this.Mct(o.yut),t=c.An?[4,this.findFirstNonAppendedSegmentAfterSegment(o,i,n)]:[3,8];case 7:return[2,f.sent()];case 8:if(o.qot.Lct(o.yut))return[2,void 0];throw new y("Fatal buffering error")}})}).call(this)},i.findFirstNonAppendedSegmentAfterSegment=function(t,i,n){return jt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:r=t,u.label=1;case 1:return e=KM(r.yut),s=t.qot,[4,this.jp.Dct(e,[s],i,n)];case 2:r=u.sent(),pr(n),u.label=3;case 3:if(r&&this.Bct(r.yut))return[3,1];u.label=4;case 4:return r?[2,r]:[2,void 0]}})}).call(this)},i.findFirstNonAppendedSegmentBeforeSegment=function(t,i,n,r){return jt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:e=t,h.label=1;case 1:return s=function(t){return YM.bind(void 0,t)}(e.yut),u=t.qot,[4,this.jp.Dct(s,[u],i,n)];case 2:e=h.sent(),pr(n),h.label=3;case 3:if(e&&this.Bct(e.yut))return[3,1];h.label=4;case 4:if(!e)throw o=t.qot.Oct.Tn,new dM(o,r.Tn,t.qot);return[2,e]}})}).call(this)},i.Fct=function(t){return this.Yot.mct.fct(t)},i.Uct=function(t){return this.Yot.kct(t.CO,t.RO)},i.Bct=function(t){var i=this.Uct(t);return i.length>0&&function(t,i){return function(t){for(var i,n=LA.rL(),r=Ft(t);!(i=r()).done;){var e=i.value;n=n.HM(LA.nL(e.Tat,e.Eat))}return n}(t).GM(i.CO,i.RO)}(i,t)&&i.every(JM)},i.Nct=function(t){return this.Yot.s$.GM(t.CO,t.RO)},i.Mct=function(t){var i=this.Uct(t);return{Tn:i[0].Sct,An:i[i.length-1].Tct}},i.Rct=function(t){var i=this.Vct(t);if(0===i.length){var n=this.Ict?this.Ict:this.Yot.Ht.xat;return[n[n.length-1]]}var r=i.filter(function(t){var i;return(null==(i=t.qot)?void 0:i.xst)&&!t.Hct});return r.length>0?r:[i[i.length-1]]},i.Vct=function(t){var i=this;return(this.Ict?this.Ict:this.Yot.Ht.xat).filter(function(n){return!i.Yot.s$.vct(t,n)})},xt(t,[{key:"Jot",get:function(){return this.Ict},set:function(t){this.Ict=t}},{key:"iat",get:function(){return this.Yot.Ht.iat}}]),t}();function QM(t,i,n,r){return jt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:return e=i.mht,(s=e.Wct(t))?i.qct(s)?[4,i.Gct(s,n,r)]:[3,2]:[2,void 0];case 1:return[2,u.sent().zct(t)];case 2:return[2,s]}})})()}function YM(t,i,n,r){return jt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return CM(t)?0===t.xut?[2,void 0]:(e=i.mht.Xct(t))?[4,i.Gct(e,n,r)]:[2,void 0]:[3,2];case 1:return[2,s.sent().jct(t.xut-1)];case 2:return[2,i.mht.Qct(t)];case 3:return[2]}})})()}function $M(t,i,n,r){return jt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:return CM(t)?(e=i.mht.Xct(t))?[4,i.Gct(e,n,r)]:[2,void 0]:[3,2];case 1:return s=u.sent(),t.xut+1===s.V?[2,void 0]:[2,s.jct(t.xut+1)];case 2:return[2,i.mht.Kct(t)];case 3:return[2]}})})()}function KM(t){return $M.bind(void 0,t)}function JM(t){return t.Pct}V(),It(),Wt(),Yt();var ZM=function(){function t(t,i,n,r){this.tdt=void 0,this.ect=void 0,this.Mz=void 0,this.Jct=void 0,this.idt=void 0,this.tdt=t,this.ect=i,this.Mz=n,this.Jct=r,this.idt=!1}var i=t.prototype;return i.Dct=function(t,i,n,r){return jt(function(){var e,s,u;return zt(this,function(o){switch(o.label){case 0:return pr(r),(e=this.Yct(i,n))?[4,t(e,this.Jct,r)]:[2,void 0];case 1:return(s=o.sent())?(u=e.Zct(s),[2,{qot:e,yut:s,Yu:u}]):[2,void 0]}})}).call(this)},i.Yct=function(t,i){if(0!==t.length){var n=this.tdt.$ct(t,this.idt?i:void 0,this.ect,this.Mz.jY);return this.idt||(this.idt=!0),n}},t}();V(),It(),Wt(),Ut(),Yt();var tL=function(){function t(t,i,n,r){this.tdt=void 0,this.ect=void 0,this.Sut=void 0,this.Jct=void 0,this.tdt=t,this.ect=i,this.Sut=n,this.Jct=r}return t.prototype.Dct=function(t,i,n,r){return jt(function(){var e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:if(pr(r),!(e=this.tdt.edt(i,n,this.ect)).length)return[2,void 0];u=Ft(e),v.label=1;case 1:if((o=u()).done)return[3,8];h=o.value,v.label=2;case 2:return v.trys.push([2,6,,7]),pr(r),[4,t(h,this.Jct,r)];case 3:return(a=v.sent())?(c=h.Zct(a),[4,this.Sut.sdt(c.Yu,c.Wat)]):[3,5];case 4:if(v.sent())return[2,{yut:a,qot:h,Yu:c}];v.label=5;case 5:return[3,7];case 6:return yr(f=v.sent()),s=f,[3,7];case 7:return[3,1];case 8:if(s)throw s;return[2,void 0]}})}).call(this)},t}();function iL(t){return void 0!==t.vP}function nL(t,i){var n=t.Ti&&i.Ti,r=t.Mi&&i.Mi;return n||r?n&&r?t.Ti*t.Mi-i.Ti*i.Mi:n?t.Ti-i.Ti:r?t.Mi-i.Mi:(t.Ti||1)*(t.Mi||1)-(i.Ti||1)*(i.Mi||1):0}function rL(t,i){return nL(t,i)||function(t,i){return t.IW-i.IW}(t,i)}V(),It(),ft(),Ut(),V(),It();var eL=function(){function t(t,i,n,r,e,s){this.hdt=void 0,this.ddt=void 0,this.Cm=void 0,this.cdt=void 0,this.ndt=void 0,this.ldt=void 0,this.ddt=t,this.hdt=i,this.Cm=n,this.cdt=r,this.ndt=e,this.ldt=s}var i=t.prototype;return i.$ct=function(i,n,r,e){var s=t.sortByQuality(i);if(void 0!==this.ndt&&void 0===n&&i.length>1){var u=t.rdt(s,this.ndt);u&&(s=u)}var o=this.edt(s,n,r,e);return o.length?o[o.length-1]:s[0]},i.edt=function(i,n,r,e){for(var s,u,o=t.sortByQuality(i),h={iut:void 0===e||this.hdt.Zat?this.hdt.iut:e,vP:iL(r)&&r.vP?r.vP:1,odt:r.Ti,adt:r.Mi,udt:null==(s=this.cdt)?void 0:s.restrictToPlayerSize},a=o,c=Ft(this.ddt);!(u=c()).done;){a=(0,u.value)(a,n,h,this.Cm,this.ldt)}return a},t.fdt=function(i){return t.sortByQuality(i)[0]},t.vdt=function(i,n){var r;return n?t.fdt(null!=(r=t.rdt(i,n))?r:i):t.fdt(i)},t.rdt=function(t,i){for(var n,r=function(){var i=n.value,r=t.filter(function(t){return vP(t.Bp,i)});if(r.length>0)return{v:r}},e=Ft(i);!(n=e()).done;){var s=r();if("object"===W(s))return s.v}},t.sortByQuality=function(t){var i=[].concat(t);return i.sort(rL),i},t}();V(),It();var sL=function(t,i,n,r,e){return t.filter(function(t){return e.IZ(t)&&r.Pp(i,t)})};V(),It();var uL=function(t,i,n,r){return void 0===i&&r.Rp?[t[t.length-1]]:t.filter(function(t){return function(t,i,n){var r=n.iut;if(r<=0)return!1;return.8*r>t.IW*n.vP}(t,0,n)})};V(),It();var oL=function(t,i,n,r,e){var s=n.udt;if(void 0===s&&!r.Ks)return t;if(!1===s)return t;if(t.length>0&&t[0].Km!==vw.Mk)return t;for(var u=t.length-1;u>=0;u--){var o=t[u];if(o.Mi===n.adt&&o.Ti===n.odt)return t.slice(0,u+1);if(o.Mi=0;a--){var c=t[a];if(c.Mi<=h&&c.Ti<=o)return t.slice(0,a+1)}return[]},lL=function(){function t(){}return t.jet=function(t,i,n,r,e,s,u,o,h,a){var c=function(t,i){return new aL([new fL(i),new cL(t)])}(s,u),f=new eL([sL],e,Vi.Zs,o,h,a),v=new tL(f,i,u,c),d=new eL([uL,sL,oL,dL],e,Vi.Zs,o,h,a),l=new ZM(d,i,r,c),g=new hL([v,l]);return new GM(t,n,g)},t}();V(),It(),Wt(),Bt(),Dt(),H(),Ut(),Yt(),V(),It(),Dt();var gL=function(t){function i(i,n,r,e,s,u){var o;return void 0===u&&(u=0),(o=t.call(this,ch.ey)||this).segmentStartTime=void 0,o.error=void 0,o.trackType=void 0,o.track=void 0,o.quality=void 0,o.retryCount=void 0,o.segmentStartTime=i,o.error=n,o.trackType=r,o.track=e,o.quality=s,o.retryCount=u,o}return Pt(i,t),i}(ah);V(),It(),Dt();var wL=function(t){function i(i,n){var r;return(r=t.call(this,ch.Sw)||this).track=void 0,r.segments=void 0,r.track=i,r.segments=n,r}return Pt(i,t),i}(ah);V(),It(),Dt();var mL=function(t){function i(i,n,r,e,s,u,o){var h;return void 0===u&&(u=0),void 0===o&&(o=void 0),(h=t.call(this,ch.iy)||this).segmentStartTime=void 0,h.error=void 0,h.trackType=void 0,h.track=void 0,h.quality=void 0,h.retryCount=void 0,h.statusCode=void 0,h.segmentStartTime=i,h.error=n,h.trackType=r,h.track=e,h.quality=s,h.retryCount=u,h.statusCode=o,h}return Pt(i,t),i}(ah),pL=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).mdt=void 0,r.mdt=i,r}return Pt(i,t),i}(gr),yL=[ch.ly,ch._y],_L=function(t){function i(i,n,r,e,s,u,o,h,a){var c;return(c=t.call(this)||this).Dat=void 0,c.Yot=void 0,c.Sdt=void 0,c.bdt=void 0,c.Zdt=void 0,c.Udt=void 0,c.ldt=void 0,c.Ndt=void 0,c.pq=void 0,c.wdt=void 0,c.n3=void 0,c.ydt=void 0,c.Hdt=void 0,c.Cdt=void 0,c.Rdt=void 0,c.Bdt=void 0,c.Dat=i,c.Yot=n,c.Sdt=r,c.bdt=e,c.Zdt=s,c.Udt=u,c.ldt=o,c.Ndt=h,c.pq=a,c.wdt=void 0,c.n3=void 0,c.ydt=void 0,c.Hdt=void 0,c.Cdt=0,c.Rdt=0,c.Bdt=LA.rL(),c.Zdt.wn(yL,c.Rs),c}Pt(i,t);var n=i.prototype;return n.Adt=function(t){return!this.n3||!t||!Oa(this.n3.jht,t.jht)},n.Nat=function(t){if(!this.wdt)return!1;var i=this.wdt.yut,n=LA.nL(i.CO,i.RO),r=this.Sdt.sct,e=r.zM(t);return e<0?n.Cr(t,WM):n.jM(t,r.An(e),!0,!0,WM)},n.Cat=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a,c,f,v,d,l,g;return zt(this,function(w){switch(w.label){case 0:i=this.Yot.Ht.xat,w.label=1;case 1:0,n=void 0,w.label=2;case 2:return w.trys.push([2,12,16,17]),pr(t),this.Bat(),this.Mat()?[3,18]:(n=this.Tdt(),[4,this.Dct(n,t)]);case 3:return void 0===(e=w.sent())?[3,18]:(this.wdt=e,function(t){var i=t.qot,n=i.mht,r=CM(t.yut)?n.Xct(t.yut):t.yut;return n.nlt(r,i.jdt.Xdt())}(this.wdt)?[3,5]:[4,this.kdt(this.wdt,t)]);case 4:return w.sent(),[3,1];case 5:return!this.ydt||oP(this.ydt.qot.Rrt,this.wdt.qot.Rrt)?[3,7]:[4,this.ldt.RZ(this.wdt.qot)];case 6:w.sent(),w.label=7;case 7:return!this.wdt.qot.NW||this.Qot&&(null==(r=this.ydt)?void 0:r.qot)===this.wdt.qot||null==(s=this.pq)||s.VW(this.wdt.qot.NW),[4,this.Edt(n,this.wdt.yut,t)];case 8:return w.sent(),u=this,[4,this.xdt(this.wdt.qot,t)];case 9:return u.n3=w.sent(),[4,this.but(this.wdt,t)];case 10:return o=w.sent(),h=this.Sdt.Fx,a=this.ydt,c=this,[4,this.Pdt(o,t)];case 11:return c.ydt=w.sent(),f=this.Sdt.Fx,this.Idt(a,this.wdt,h,f,n),i.forEach(function(t){return t.Hct=!1}),this.Cdt=0,this.Rdt=0,[3,17];case 12:return j(v=w.sent(),dM)?(this.G3(v.Tn,v.An,v.qot),[3,1]):[3,13];case 13:if(!j(v,pL))return[3,15];if(d=500,i.every(function(t){return t.Hct})){if(2===this.Cdt){if(l=this.Sdt.Fx,this.Ddt(this.wdt),this.Idt(this.ydt,this.wdt,l,l,n),i.forEach(function(t){return t.Hct=!1}),this.Rdt+=1,this.Cdt=0,this.Rdt===this.Ndt.maxRetries)throw new _d(pd.MEDIA_LOAD_ERROR,"The segments could not be loaded.",v);return[3,1]}this.Cdt++,g=this.Ndt.minimumBackoff*A.pow(2,this.Cdt-1),d=A.min(g,this.Ndt.maximumBackoff)}return[4,Rr(d,t)];case 14:return w.sent(),[3,1];case 15:throw this.Bdt=LA.rL(),v;case 16:return this.wdt=void 0,[7];case 17:return[3,1];case 18:return[2]}})}).call(this)},n.Idt=function(t,i,n,r,e){var s=r.qM(n),u=i.qot,o=u.Mdt(i.yut),h=u.Lct(i.yut),a=i.yut.CO,c=i.yut.RO;o&&(a=A.min(a,A.max(0,u.Oct.Tn-.05))),h&&(c=A.max(c,u.Oct.An));var f=LA.nL(a,c).qM(r);if(0!==s.V){if(o||this.Bdt.V>0){var v=f.Mn(LA.nL(a,s.Tn(0)));this.Odt(v)}var d=s.OM().Mn(LA.nL(s.Tn(0),s.An(s.V-1)));if(this.Odt(d),h){var l=f.Mn(LA.nL(s.An(s.V-1),c));this.Odt(l)}if(this.Bdt.V>0){var g=this.Bdt.qM(s);this.Odt(g),this.Bdt=LA.rL()}var w,m=u.mht,p=CM(i.yut)?void 0:m.Qct(i.yut),y=null!=(w=null==t?void 0:t.yut)?w:this.Fdt(p)?p:void 0;if(y){var _=this.Yot.kct(y.CO,y.RO);if(_.length>0){var k=LA.nL(_[_.length-1].Tct,s.Tn(0));this.Odt(k)}}var b=CM(i.yut)?void 0:m.Kct(i.yut);if(b&&this.Fdt(b)){var T=this.Yot.kct(b.CO,b.RO);if(T.length>0){var S=LA.nL(s.An(s.V-1),T[0].Sct);this.Odt(S)}}}else this.Ldt(n,f,a,e)},n.Ldt=function(t,i,n,r){var e=i;0===this.Bdt.V&&(this.Bdt=LA.nL(t.An(t.V-1),n)),0===e.V&&void 0!==r&&(e=LA.sL(r)),this.Bdt=this.Bdt.HM(e),this.Yot.xct(this.Bdt)},n.Fdt=function(t){return!!t&&this.Yot.kct(t.CO,t.RO).length>0},n.Odt=function(t){for(var i=t.qM(this.Sdt.Fx),n=0;n0)){var t,i=this.Sdt.sct.HM(null!=(t=this.Sdt.s$.MM().iL(this.Sdt.rct))?t:LA.rL());this.Yot.pct(i),this.Hdt&&!this.Wdt(this.Hdt)&&(this.Hdt=void 0),this.So(new wL(this.Yot.Ht.iat,this.Yot.Sat()))}},n.Mat=function(){return this.ydt&&this.ydt.qot.Lct(this.ydt.yut)?(this.Udt.F3(),!0):(this.Hdt&&this.Hdt.qot.Lct(this.Hdt.yut)&&this.Wdt(this.Hdt)&&this.Udt.F3(),!!this.Sdt.nct)},n.Wdt=function(t){return this.Yot.mct.GM(t.qdt,t.zdt)},n.Gdt=function(t,i,n){(!this.Hdt||this.Hdt.yut.RO=2?(t.qot.Hct=!0,this.$dt(r,n),this.tlt(r,n),[2,this.Vdt(aM.oot,"Could not fetch the segment.")]):(this.tlt(r,n),[4,Rr(A.min(this.Ndt.minimumBackoff*A.pow(2,n),this.Ndt.maximumBackoff),i)]):[3,6];case 5:return s.sent(),[3,7];case 6:throw new _d(pd.MEDIA_LOAD_ERROR,r.message,r);case 7:return n++,[3,1];case 8:return[2]}})}).call(this)},n.Edt=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:for(r=this.Yot.kct(i.CO,i.RO),e=this.Sdt.sct.iL(t),s=LA.rL(),u=Ft(r);!(o=u()).done;)h=o.value,pr(n),a=h.Sct,c=h.Tct,(f=e&&e.jM(a,c)?A.max(a,e.An(0)):a)<(v=c)&&(s=s.HM(LA.nL(f,v)));d=0,l.label=1;case 1:return d0?n.qualities[0]:void 0,n}return Pt(i,t),i}(ah);V(),It(),Dt();var IL=function(t){function i(i){var n;return(n=t.call(this,Fg.QUALITY_UNAVAILABLE)||this).quality=void 0,n.quality=i,n}return Pt(i,t),i.prototype.xa=function(){return new RL(this.quality.Ca)},i}(Dg),RL=function(t){function i(i){var n;return(n=t.call(this,"qualityunavailable")||this).quality=void 0,n.quality=i,n}return Pt(i,t),i}(Ng);V(),It(),Dt();var CL=function(t){function i(){return t.call(this,Fg.NO_QUALITY)||this}return Pt(i,t),i}(ah);function PL(t){return{IW:t.IW,Bp:t.Rrt,Mi:DL(t)?t.Mi:0,Km:DL(t)?vw.Mk:vw.Bk,Ti:DL(t)?t.Ti:0}}function DL(t){var i=t;return void 0!==i.Mi&&void 0!==i.Ti}V(),It();var NL=0,xL=function(t){function i(i,n,r){var e;return void 0===r&&(r="alternative"),(e=t.call(this)||this)._lt=void 0,e.mat=void 0,e.We=!1,e.hu=void 0,e.wlt=void 0,e.aS="",e.yO=void 0,e.I5=void 0,e.bO=void 0,e.$b=void 0,e.Clt=!1,e._O=new Aw,e.Slt=[],e.flt=void 0,e.ylt=void 0,e.Elt=void 0,e.clt=function(){return e.So(new Ew(e))},e.klt=[],e.mat=i,e.aS=String(NL++),e.yO=Cw(),e.I5=r,e.$b=i.Tit,e.bO=i.Th,e.Elt=i.Km,e.Slt=i.xat.slice(),e.ult(n),e}Pt(i,t);var n=i.prototype;return n.ult=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;r.wn("update",this.clt),this._O.gO(r)}},n.dlt=function(t){if(this._O.pO(t)){t.ZU();var i=this.llt();if(this.flt&&Jn(this.flt,t)){var n=this.flt.filter(function(t){return t.xst});0===n.length&&i.length>0?this.tC=i:this.tC=n}else this.tC=i;this.So(new IL(t))}},n.vlt=function(t){if(this._O.pO(t)){var i=this.llt();t.JU(),this.flt&&!function(t,i){return Zn(t,i,function(t,i){return t===i})}(this.flt,i)||(this.tC=this.llt())}},n.llt=function(){return this._O.NI.filter(function(t){return t.xst})},n.glt=function(t){this._lt=t.qot,this.So(t)},n.blt=function(t){if(t&&0!==t.length){for(var i,n=[],r=Ft(this.xat);!(i=r()).done;)for(var e,s=i.value,u=Ft(t);!(e=u()).done;){var o=e.value;o===s.qot&&o.xst&&n.push(s)}return n}},n.Tlt=function(t){var i;this.klt.push(t),(i=this.Slt).push.apply(i,[].concat(t.xat));var n=t.xat.map(function(t){return t.qot});this.ult(n)},n.SO=function(t){this.We=t,this.wlt&&(t?this.wlt.JU(this):this.wlt.ZU(this))},n.Ilt=function(t){this.We=t,this.Clt!==t&&(this.Clt=t,this.So(new Tw(this)))},n.kn=function(){for(var t,i=Ft(this._O.NI);!(t=i()).done;){t.value.mn("update",this.clt)}this._O.hr()},xt(i,[{key:"ZI",get:function(){return this.mat.olt.map(BL).filter(Fi)}},{key:"YI",get:function(){return this._lt}},{key:"Zut",get:function(){return this.mat}},{key:"Rt",get:function(){return this.We},set:function(t){this.SO(t)}},{key:"Ca",get:function(){return this.hu||(this.hu=hw(this)),this.hu}},{key:"plt",get:function(){return this.wlt},set:function(t){this.wlt=t}},{key:"o",get:function(){return this.aS}},{key:"JI",get:function(){return this.yO}},{key:"Lt",get:function(){return this.I5}},{key:"bs",get:function(){return this.$b}},{key:"Th",get:function(){return this.bO},set:function(t){t!==this.bO&&(this.bO=t,this.So(new Ew(this)))}},{key:"Qk",get:function(){return this.Rt?"enabled":"disabled"}},{key:"tC",get:function(){return this.flt},set:function(t){var i;if(t){var n=this.YI?PL(this.YI):void 0;i=t.filter(function(t){return t.xst&&Vi.Zs.Pp(n,PL(t))})}else i=this.llt();0!==i.length?(this.flt=t&&this._O.pO(t)?t:void 0,this.ylt=this.blt(this.flt),this.So(new SL(t,this))):this.So(new CL)}},{key:"Alt",get:function(){return this.ylt}},{key:"$I",get:function(){return this._O}},{key:"xat",get:function(){return this.Slt}},{key:"iat",get:function(){return this.Elt}},{key:"xlt",get:function(){return this.klt}},{key:"Plt",get:function(){return this.xat.every(function(t){return t.Plt})}}]),i}(uh);function BL(t){if("urn:mpeg:dash:role:2011"===t.x8)return OL(t);if("urn:tva:metadata:cs:AudioPurposeCS:2007"===t.x8){if("1"===t.XE)return sw.GI;if("2"===t.XE)return sw.jI}}function OL(t){if(void 0!==(null==t?void 0:t.XE))switch(t.XE){case"caption":return sw.zI;case"sign":return sw.XI;case"description":return sw.GI;case"enhanced-audio-intelligibility":return sw.jI;default:return}}var ML=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,u)||this).Rz=1,o.Nlt=void 0,o.Dlt=eo(),o.Rlt=void 0,o.Mlt=void 0,o.Qlt=eo(),o.aV=void 0,o.Sut=void 0,o.W8=void 0,o.Mz=void 0,o.Hlt=void 0,o.Wlt=function(t){0},o.W8=i,o.aV=n,o.Mz=r,o.Hlt=e,o.Sut=s,o}Pt(i,t);var n=i.prototype;return n.F3=function(){},n.hct=function(){return this.sct.Cr(this.An)},n.elt=function(t,i,n,r){return jt(function(){var e,s,u,o,h,a,c,f,v,d,l,g;return zt(this,function(w){switch(w.label){case 0:return t.Km!==nC.wZ?[3,1]:(s=t.lk.jht,[3,3]);case 1:return[4,t.lk.qT(r)];case 2:s=w.sent(),w.label=3;case 3:for(e=s,u=this.findTrackForRepresentation(n),o=i.CO,h=i.RO,a=new LA([o,h]),this.jrt(r),c=this.pht(new I(e),i,n,u),f=Ft(c);!(v=f()).done;)d=v.value,u.nV(d);return g=null!=(l=this.Dlt.get(u.JI))?l:LA.rL(),this.Dlt.set(u.JI,g.HM(a)),[2,{qdt:o,zdt:h}]}})}).call(this)},n.jrt=function(t){for(var i,n=Ft(dR(this.W8.zx,void 0,void 0,this.Fx,this.Mz.YY,this.Mz.zY));!(i=n()).done;){var r=i.value,e=r[0],s=r[1];Er(this.ilt(e,s,t))}},n.ght=function(t,i,n){return this.Hlt.ght(t,i,n)},n.pht=function(t,i,n,r){return this.Hlt.pht(t,i,n,r)},n.ilt=function(t,i,n){pr(n);for(var r,e=t,s=i,u=new LA([t,i]),o=Ft(this.Z.NI);!(r=o()).done;){for(var h,a=r.value,c=[],f=Ft(a.L.NI);!(h=f()).done;){var v=h.value;v.CO>=e&&v.RO<=s?c.push(v):u=u.qM(new LA([v.CO,v.RO]))}for(var d,l=Ft(c);!(d=l()).done;){var g=d.value;a.XU(g)}var w=this.Dlt.get(a.JI);w&&this.Dlt.set(a.JI,w.qM(u))}return ot.resolve()},n.r$=function(t,i){},n.h$=function(t,i){},n.iJ=function(){return!1},n.JU=function(t){if(t&&this.Rlt!==t){this.Rlt=t;for(var i,n=Ft(this.Z.NI);!(i=n()).done;){var r=i.value;r!==t&&(r.Qk=Jp.Nh)}if(this.Hlt.hr(),this.Nlt&&(this.Nlt.kn(),this.Nlt=void 0),this.Rlt){var e=this.Flt(this.Rlt);this.Nlt=new bL(this,this.W8,this.W8,this.aV,this.Mz,!1,this.Sut,void 0,void 0,new TL,DT,void 0).hlt(this.Rlt,e),this.Nlt.wn(ty.ma,this.Wlt),this.Nlt.Tn(aM.Zht)}}},n.ZU=function(t){this.Rlt===t&&(t&&this.Rlt===t&&(this.Rlt=void 0),this.Nlt&&(this.Nlt.kn(),this.Nlt=void 0))},n.Un=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.hr()];case 1:return i.sent(),this.Mlt=t,this.qlt(t),[2]}})}).call(this)},n.zlt=function(t){var i=function(t){var i=t.xat&&t.xat.length>0&&t.xat[0],n=i&&vy(i.Rrt),r=vy(t.Rrt),e=t.lQ===qv;return n||r||e?jw.TTML:t.lQ===Gv||wy(t.lQ,t.Rrt)?jw.WEBVTT:jw.DEFAULT}(t);if(!i)throw new y("Unknown TextTrack type for Representation");var n=t.Glt.concat(t.olt);return this.Xlt(function(t){return Jn(t.filter(function(t){return"urn:mpeg:dash:role:2011"===t.x8}).map(function(t){return t.XE}).filter(Fi),"caption")?uy.WU:uy.HU}(n),t.Th,t.Tit,!1,i,t,function(t){return t.filter(function(t){return"urn:mpeg:dash:role:2011"===t.x8}).some(function(t){return function(t){return"forced-subtitle"===t||"forced_subtitle"===t}(t.XE)})}(t.Glt),t.olt.map(OL).filter(Fi))},n.qlt=function(t){for(var i,n=Ft(t.jlt);!(i=n()).done;){var r=i.value,e=this.zlt(r);this.Qlt.set(e.JI,r),e.AP=Vw.LOADED,this.tt(e)}},n.it=function(i){this.Qlt.delete(i.JI),t.prototype.it.call(this,i)},n.Xlt=function(t,i,n,r,e,s,u,o){var h,a,c,f=Wn(s.xat,function(t){return""!==t.o}),v=null!=(c=null!=(a=null==f?void 0:f.o)?a:null==(h=s.o)?void 0:h.toString())?c:"";return this.iV.sI(t,v,i,n,r,e,u,o)},n.eV=function(t,i,n){var r=Ty(t,i,n),e=this.Qlt.get(t.JI);void 0!==e&&(this.Qlt.set(r.JI,e),this.Qlt.delete(t.JI));var s=this.Dlt.get(t.JI);return void 0!==s&&(this.Dlt.set(r.JI,s),this.Dlt.delete(t.JI)),r},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return n.sent(),this.Nlt?[4,this.Nlt.hr(aM.Aot)]:[3,3];case 2:n.sent(),this.Nlt.mn(ty.ma,this.Wlt),this.Nlt=void 0,n.label=3;case 3:return this.Mlt=void 0,this.Dlt.clear(),[2]}})}).call(this)},n.findTrackForRepresentation=function(t){for(var n,r=Ft(this.Z.NI);!(n=r()).done;){var e=n.value,s=this.Flt(e);if(s&&i.Klt(s)===t)return e}},n.Flt=function(t){return this.Qlt.get(t.JI)},n.Llt=function(){if(this.Rlt){var t=this.Flt(this.Rlt);if(t)return i.Klt(t)}},n.kn=function(){for(var i,n=Ft(this.Z.NI);!(i=n()).done;){var r=i.value;this.iV.rV(r)}return t.prototype.kn.call(this)},i.Klt=function(t){return t.xat&&t.xat.length>0?t.xat[0]:void 0},xt(i,[{key:"Rt",get:function(){for(var t,i=Ft(this.Z.NI);!(t=i()).done;){if(t.value.Qk!==Jp.Nh)return!0}return!1}},{key:"ZW",get:function(){var t=this.W8.zx;return this.sct.iL(t,.01)}},{key:"act",get:function(){return LA.hL()}},{key:"Fx",get:function(){var t;return null!=(t=this.Rlt&&this.Dlt.get(this.Rlt.JI))?t:LA.rL()}},{key:"s$",get:function(){return this.Nlt?this.Nlt.Kot.s$.uct:LA.rL()}},{key:"sct",get:function(){return cM(this.Fx,this.s$).VM(2*this.Blt)}},{key:"Tn",get:function(){return this.Mlt?this.Mlt.Oct.Tn:NaN}},{key:"An",get:function(){return this.Mlt?this.Mlt.Oct.An:NaN}},{key:"Qx",get:function(){var t=this.An;return!!t&&this.W8.zx>=t}},{key:"Blt",get:function(){var t,i,n=this.Llt();return n?1/(null!=(i=this.Rlt&&(null==n||null==(t=n.Olt)?void 0:t.rF()))?i:25):.04}},{key:"Mi",get:function(){return 0}},{key:"V3",get:function(){return vw.LT}},{key:"vP",get:function(){return this.Rz},set:function(t){this.Rz=t}},{key:"kP",get:function(){if(!this.Rlt)return LA.sL(0);var t=this.Flt(this.Rlt),i=null==t?void 0:t.Ult,n=null==t?void 0:t.Vlt;if(void 0===n||void 0===i)return LA.sL(0);var r=A.max(i,this.W8.zx);return new LA([n,r]).MM()}},{key:"Ti",get:function(){return 0}}]),i}(Ay),LL=function(){function t(t,i,n,r,e,s){this.Zlt=[],this.Gl=new Fb([]),this.iV=void 0,this.wht=void 0,this.W8=void 0,this.aV=void 0,this.Mz=void 0,this.Sut=void 0,this.W8=t,this.aV=i,this.Mz=n,this.Sut=r,this.iV=e,this.wht=s}var i=t.prototype;return i.oV=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return t.Km!==vw.LT?[2]:(i=function(t,i,n){return vy(i)||t===qv||t===Gv?new nM(n):wy(t,i)?new uM:void 0}(t.lQ,t.Rrt,this.wht),i?(n=this.Ylt(i),this.Jlt(n),[4,n.Un(t)]):[3,2]);case 1:return r.sent(),[2,n];case 2:return[2]}})}).call(this)},i.Ylt=function(t){return new ML(this.W8,this.aV,this.Mz,t,this.Sut,this.iV)},i.Jlt=function(t){this.Zlt.push(t),this.Gl.qW(t.Z)},i.hr=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:t=Ft(this.Zlt.slice()),n.label=1;case 1:return(i=t()).done?[3,4]:[4,i.value.hr()];case 2:n.sent(),n.label=3;case 3:return[3,1];case 4:return tr(this.Zlt),this.Gl.hr(),[2]}})}).call(this)},i.kn=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:t=Ft(this.Zlt),n.label=1;case 1:return(i=t()).done?[3,4]:[4,i.value.kn()];case 2:n.sent(),n.label=3;case 3:return[3,1];case 4:return tr(this.Zlt),this.Gl.kn(),[2]}})}).call(this)},xt(t,[{key:"nt",get:function(){return this.Gl}}]),t}();V(),It(),Dt();var FL=function(t){function i(i){var n;return(n=t.call(this,ch.zw)||this).error=void 0,n.error=i,n}return Pt(i,t),i}(ah);V(),It();var UL=function(t){return t.AV="static",t.SV="dynamic",t}({});V(),It(),Dt(),V(),It();var VL=function(t){return t.$lt="tft",t}({}),jL=function(t){function i(){return t.call(this,VL.$lt)||this}return Pt(i,t),i}(ah);V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Dt();var HL=function(t){function i(i,n){var r;return(r=t.call(this,ch.Yw)||this).representation=void 0,r.previousRepresentation=void 0,r.representation=i,r.previousRepresentation=n,r}return Pt(i,t),i}(ah);V(),It(),Dt(),Ut(),V(),It(),Ut(),V(),It();var WL=function(t){return t[t.ift=0]="ift",t[t.eft=1]="eft",t[t.sft=2]="sft",t[t.nft=3]="nft",t[t.rft=4]="rft",t[t.hft=5]="hft",t}({}),zL=function(t){return t[t.oft=0]="oft",t[t.aft=1]="aft",t[t.uft=2]="uft",t[t.cft=3]="cft",t}({});function qL(t,i,n){return n===WL.ift?n:i!==zL.oft&&i!==zL.aft||n!==WL.eft&&n!==WL.sft?t?i===zL.uft?WL.rft:i===zL.cft?WL.nft:WL.ift:WL.hft:WL.sft}function XL(t,i,n,r){var e={byte:n},s=WL.eft,u=[],o=31&UC(i,e,r);e.byte+=1;for(var h=0;h0;)e-=1,r+=GL(t,i);return r}(i,n,4);if("GA94"!==u)return}if(3===UC(i,n,r)){47===s&&(n.byte+=1);var o=t;return o.pft=n.byte,o}}}}function YL(t){return 4===t.s1}function $L(t){for(var i,n=[],r=Ft(t.filter(YL).map(QL).filter(Fi));!(i=r()).done;){var e,s=i.value;(e=n).push.apply(e,[].concat(XL(s.e1,s.a1,s.pft,s.o1)))}return n}V(),It(),Ut();var KL="und";function JL(t){if(t!==KL)for(var i,n=t.toLowerCase(),r=Ft(ZL);!(i=r()).done;){var e=i.value;if(e[1]===n||e[2]===n||e["2T"]===n||e["2B"]===n||e[3]===n)return e}}var ZL=[{l:"Abkhaz",bh:"\u0410\u04a7\u0441\u0443\u0430",1:"ab",2:"abk","2T":"abk","2B":"abk",3:"abk"},{l:"Afar",bh:"Afaraf",1:"aa",2:"aar","2T":"aar","2B":"aar",3:"aar"},{l:"Afrikaans",bh:"Afrikaans",1:"af",2:"afr","2T":"afr","2B":"afr",3:"afr"},{l:"Akan",bh:"Akan",1:"ak",2:"aka","2T":"aka","2B":"aka",3:"aka"},{l:"Albanian",bh:"Shqip",1:"sq",2:"sqi","2T":"sqi","2B":"alb",3:"sqi"},{l:"Amharic",bh:"\u12a0\u121b\u122d\u129b",1:"am",2:"amh","2T":"amh","2B":"amh",3:"amh"},{l:"Arabic",bh:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",1:"ar",2:"ara","2T":"ara","2B":"ara",3:"ara"},{l:"Aragonese",bh:"Aragon\xe9s",1:"an",2:"arg","2T":"arg","2B":"arg",3:"arg"},{l:"Armenian",bh:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",1:"hy",2:"hye","2T":"hye","2B":"arm",3:"hye"},{l:"Assamese",bh:"\u0985\u09b8\u09ae\u09c0\u09af\u09bc\u09be",1:"as",2:"asm","2T":"asm","2B":"asm",3:"asm"},{l:"Avaric",bh:"\u0410\u0432\u0430\u0440",1:"av",2:"ava","2T":"ava","2B":"ava",3:"ava"},{l:"Avestan",bh:"avesta",1:"ae",2:"ave","2T":"ave","2B":"ave",3:"ave"},{l:"Aymara",bh:"Aymar",1:"ay",2:"aym","2T":"aym","2B":"aym",3:"aym"},{l:"Azerbaijani",bh:"Az\u0259rbaycanca",1:"az",2:"aze","2T":"aze","2B":"aze",3:"aze"},{l:"Bambara",bh:"Bamanankan",1:"bm",2:"bam","2T":"bam","2B":"bam",3:"bam"},{l:"Bashkir",bh:"\u0411\u0430\u0448\u04a1\u043e\u0440\u0442\u0441\u0430",1:"ba",2:"bak","2T":"bak","2B":"bak",3:"bak"},{l:"Basque",bh:"Euskara",1:"eu",2:"eus","2T":"eus","2B":"baq",3:"eus"},{l:"Belarusian",bh:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",1:"be",2:"bel","2T":"bel","2B":"bel",3:"bel"},{l:"Bengali",bh:"\u09ac\u09be\u0982\u09b2\u09be",1:"bn",2:"ben","2T":"ben","2B":"ben",3:"ben"},{l:"Bihari",bh:"\u092d\u094b\u091c\u092a\u0941\u0930\u0940",1:"bh",2:"bih","2T":"bih","2B":"bih",3:"bih"},{l:"Bislama",bh:"Bislama",1:"bi",2:"bis","2T":"bis","2B":"bis",3:"bis"},{l:"Bosnian",bh:"Bosanski",1:"bs",2:"bos","2T":"bos","2B":"bos",3:"bos"},{l:"Breton",bh:"Brezhoneg",1:"br",2:"bre","2T":"bre","2B":"bre",3:"bre"},{l:"Bulgarian",bh:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",1:"bg",2:"bul","2T":"bul","2B":"bul",3:"bul"},{l:"Burmese",bh:"\u1019\u103c\u1014\u103a\u1019\u102c\u1018\u102c\u101e\u102c",1:"my",2:"mya","2T":"mya","2B":"bur",3:"mya"},{l:"Catalan",bh:"Catal\xe0",1:"ca",2:"cat","2T":"cat","2B":"cat",3:"cat"},{l:"Chamorro",bh:"Chamoru",1:"ch",2:"cha","2T":"cha","2B":"cha",3:"cha"},{l:"Chechen",bh:"\u041d\u043e\u0445\u0447\u0438\u0439\u043d",1:"ce",2:"che","2T":"che","2B":"che",3:"che"},{l:"Chichewa",bh:"Chichewa",1:"ny",2:"nya","2T":"nya","2B":"nya",3:"nya"},{l:"Chinese",bh:"\u4e2d\u6587",1:"zh",2:"zho","2T":"zho","2B":"chi",3:"zho"},{l:"Chuvash",bh:"\u0427\u04d1\u0432\u0430\u0448\u043b\u0430",1:"cv",2:"chv","2T":"chv","2B":"chv",3:"chv"},{l:"Cornish",bh:"Kernewek",1:"kw",2:"cor","2T":"cor","2B":"cor",3:"cor"},{l:"Corsican",bh:"Corsu",1:"co",2:"cos","2T":"cos","2B":"cos",3:"cos"},{l:"Cree",bh:"\u14c0\u1426\u1403\u152d\u140d\u140f\u1423",1:"cr",2:"cre","2T":"cre","2B":"cre",3:"cre"},{l:"Croatian",bh:"Hrvatski",1:"hr",2:"hrv","2T":"hrv","2B":"hrv",3:"hrv"},{l:"Czech",bh:"\u010ce\u0161tina",1:"cs",2:"ces","2T":"ces","2B":"cze",3:"ces"},{l:"Danish",bh:"Dansk",1:"da",2:"dan","2T":"dan","2B":"dan",3:"dan"},{l:"Divehi",bh:"Divehi",1:"dv",2:"div","2T":"div","2B":"div",3:"div"},{l:"Dutch",bh:"Nederlands",1:"nl",2:"nld","2T":"nld","2B":"dut",3:"nld"},{l:"Dzongkha",bh:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41",1:"dz",2:"dzo","2T":"dzo","2B":"dzo",3:"dzo"},{l:"English",bh:"English",1:"en",2:"eng","2T":"eng","2B":"eng",3:"eng"},{l:"Esperanto",bh:"Esperanto",1:"eo",2:"epo","2T":"epo","2B":"epo",3:"epo"},{l:"Estonian",bh:"Eesti",1:"et",2:"est","2T":"est","2B":"est",3:"est"},{l:"Ewe",bh:"E\u028begbe",1:"ee",2:"ewe","2T":"ewe","2B":"ewe",3:"ewe"},{l:"Faroese",bh:"F\xf8royskt",1:"fo",2:"fao","2T":"fao","2B":"fao",3:"fao"},{l:"Fijian",bh:"Na Vosa Vaka-Viti",1:"fj",2:"fij","2T":"fij","2B":"fij",3:"fij"},{l:"Finnish",bh:"Suomi",1:"fi",2:"fin","2T":"fin","2B":"fin",3:"fin"},{l:"French",bh:"Fran\xe7ais",1:"fr",2:"fra","2T":"fra","2B":"fre",3:"fra"},{l:"Fula",bh:"Fulfulde",1:"ff",2:"ful","2T":"ful","2B":"ful",3:"ful"},{l:"Galician",bh:"Galego",1:"gl",2:"glg","2T":"glg","2B":"glg",3:"glg"},{l:"Georgian",bh:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",1:"ka",2:"kat","2T":"kat","2B":"geo",3:"kat"},{l:"German",bh:"Deutsch",1:"de",2:"deu","2T":"deu","2B":"ger",3:"deu"},{l:"Greek",bh:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",1:"el",2:"ell","2T":"ell","2B":"gre",3:"ell"},{l:"Guaran\xed",bh:"Ava\xf1e'\u1ebd",1:"gn",2:"grn","2T":"grn","2B":"grn",3:"grn"},{l:"Gujarati",bh:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",1:"gu",2:"guj","2T":"guj","2B":"guj",3:"guj"},{l:"Haitian",bh:"Krey\xf2l Ayisyen",1:"ht",2:"hat","2T":"hat","2B":"hat",3:"hat"},{l:"Hausa",bh:"\u0647\u064e\u0648\u064f\u0633\u064e",1:"ha",2:"hau","2T":"hau","2B":"hau",3:"hau"},{l:"Hebrew",bh:"\u05e2\u05d1\u05e8\u05d9\u05ea",1:"he",2:"heb","2T":"heb","2B":"heb",3:"heb"},{l:"Herero",bh:"Otjiherero",1:"hz",2:"her","2T":"her","2B":"her",3:"her"},{l:"Hindi",bh:"\u0939\u093f\u0928\u094d\u0926\u0940",1:"hi",2:"hin","2T":"hin","2B":"hin",3:"hin"},{l:"Hiri Motu",bh:"Hiri Motu",1:"ho",2:"hmo","2T":"hmo","2B":"hmo",3:"hmo"},{l:"Hungarian",bh:"Magyar",1:"hu",2:"hun","2T":"hun","2B":"hun",3:"hun"},{l:"Interlingua",bh:"Interlingua",1:"ia",2:"ina","2T":"ina","2B":"ina",3:"ina"},{l:"Indonesian",bh:"Bahasa Indonesia",1:"id",2:"ind","2T":"ind","2B":"ind",3:"ind"},{l:"Interlingue",bh:"Interlingue",1:"ie",2:"ile","2T":"ile","2B":"ile",3:"ile"},{l:"Irish",bh:"Gaeilge",1:"ga",2:"gle","2T":"gle","2B":"gle",3:"gle"},{l:"Igbo",bh:"Igbo",1:"ig",2:"ibo","2T":"ibo","2B":"ibo",3:"ibo"},{l:"Inupiaq",bh:"I\xf1upiak",1:"ik",2:"ipk","2T":"ipk","2B":"ipk",3:"ipk"},{l:"Ido",bh:"Ido",1:"io",2:"ido","2T":"ido","2B":"ido",3:"ido"},{l:"Icelandic",bh:"\xcdslenska",1:"is",2:"isl","2T":"isl","2B":"ice",3:"isl"},{l:"Italian",bh:"Italiano",1:"it",2:"ita","2T":"ita","2B":"ita",3:"ita"},{l:"Inuktitut",bh:"\u1403\u14c4\u1483\u144e\u1450\u1466",1:"iu",2:"iku","2T":"iku","2B":"iku",3:"iku"},{l:"Japanese",bh:"\u65e5\u672c\u8a9e",1:"ja",2:"jpn","2T":"jpn","2B":"jpn",3:"jpn"},{l:"Javanese",bh:"Basa Jawa",1:"jv",2:"jav","2T":"jav","2B":"jav",3:"jav"},{l:"Kalaallisut",bh:"Kalaallisut",1:"kl",2:"kal","2T":"kal","2B":"kal",3:"kal"},{l:"Kannada",bh:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",1:"kn",2:"kan","2T":"kan","2B":"kan",3:"kan"},{l:"Kanuri",bh:"Kanuri",1:"kr",2:"kau","2T":"kau","2B":"kau",3:"kau"},{l:"Kashmiri",bh:"\u0643\u0634\u0645\u064a\u0631\u064a",1:"ks",2:"kas","2T":"kas","2B":"kas",3:"kas"},{l:"Kazakh",bh:"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",1:"kk",2:"kaz","2T":"kaz","2B":"kaz",3:"kaz"},{l:"Khmer",bh:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",1:"km",2:"khm","2T":"khm","2B":"khm",3:"khm"},{l:"Kikuyu",bh:"G\u0129k\u0169y\u0169",1:"ki",2:"kik","2T":"kik","2B":"kik",3:"kik"},{l:"Kinyarwanda",bh:"Kinyarwanda",1:"rw",2:"kin","2T":"kin","2B":"kin",3:"kin"},{l:"Kyrgyz",bh:"\u041a\u044b\u0440\u0433\u044b\u0437\u0447\u0430",1:"ky",2:"kir","2T":"kir","2B":"kir",3:"kir"},{l:"Komi",bh:"\u041a\u043e\u043c\u0438",1:"kv",2:"kom","2T":"kom","2B":"kom",3:"kom"},{l:"Kongo",bh:"Kongo",1:"kg",2:"kon","2T":"kon","2B":"kon",3:"kon"},{l:"Korean",bh:"\ud55c\uad6d\uc5b4",1:"ko",2:"kor","2T":"kor","2B":"kor",3:"kor"},{l:"Kurdish",bh:"Kurd\xee",1:"ku",2:"kur","2T":"kur","2B":"kur",3:"kur"},{l:"Kwanyama",bh:"Kuanyama",1:"kj",2:"kua","2T":"kua","2B":"kua",3:"kua"},{l:"Latin",bh:"Latina",1:"la",2:"lat","2T":"lat","2B":"lat",3:"lat"},{l:"Luxembourgish",bh:"L\xebtzebuergesch",1:"lb",2:"ltz","2T":"ltz","2B":"ltz",3:"ltz"},{l:"Ganda",bh:"Luganda",1:"lg",2:"lug","2T":"lug","2B":"lug",3:"lug"},{l:"Limburgish",bh:"Limburgs",1:"li",2:"lim","2T":"lim","2B":"lim",3:"lim"},{l:"Lingala",bh:"Ling\xe1la",1:"ln",2:"lin","2T":"lin","2B":"lin",3:"lin"},{l:"Lao",bh:"\u0e9e\u0eb2\u0eaa\u0eb2\u0ea5\u0eb2\u0ea7",1:"lo",2:"lao","2T":"lao","2B":"lao",3:"lao"},{l:"Lithuanian",bh:"Lietuvi\u0173",1:"lt",2:"lit","2T":"lit","2B":"lit",3:"lit"},{l:"Luba-Katanga",bh:"Tshiluba",1:"lu",2:"lub","2T":"lub","2B":"lub",3:"lub"},{l:"Latvian",bh:"Latvie\u0161u",1:"lv",2:"lav","2T":"lav","2B":"lav",3:"lav"},{l:"Manx",bh:"Gaelg",1:"gv",2:"glv","2T":"glv","2B":"glv",3:"glv"},{l:"Macedonian",bh:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438",1:"mk",2:"mkd","2T":"mkd","2B":"mac",3:"mkd"},{l:"Malagasy",bh:"Malagasy",1:"mg",2:"mlg","2T":"mlg","2B":"mlg",3:"mlg"},{l:"Malay",bh:"Bahasa Melayu",1:"ms",2:"msa","2T":"msa","2B":"may",3:"msa"},{l:"Malayalam",bh:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",1:"ml",2:"mal","2T":"mal","2B":"mal",3:"mal"},{l:"Maltese",bh:"Malti",1:"mt",2:"mlt","2T":"mlt","2B":"mlt",3:"mlt"},{l:"M\u0101ori",bh:"M\u0101ori",1:"mi",2:"mri","2T":"mri","2B":"mao",3:"mri"},{l:"Marathi",bh:"\u092e\u0930\u093e\u0920\u0940",1:"mr",2:"mar","2T":"mar","2B":"mar",3:"mar"},{l:"Marshallese",bh:"Kajin M\u0327aje\u013c",1:"mh",2:"mah","2T":"mah","2B":"mah",3:"mah"},{l:"Mongolian",bh:"\u041c\u043e\u043d\u0433\u043e\u043b",1:"mn",2:"mon","2T":"mon","2B":"mon",3:"mon"},{l:"Nauru",bh:"Dorerin Naoero",1:"na",2:"nau","2T":"nau","2B":"nau",3:"nau"},{l:"Navajo",bh:"Din\xe9 Bizaad",1:"nv",2:"nav","2T":"nav","2B":"nav",3:"nav"},{l:"Northern Ndebele",bh:"isiNdebele",1:"nd",2:"nde","2T":"nde","2B":"nde",3:"nde"},{l:"Nepali",bh:"\u0928\u0947\u092a\u093e\u0932\u0940",1:"ne",2:"nep","2T":"nep","2B":"nep",3:"nep"},{l:"Ndonga",bh:"Owambo",1:"ng",2:"ndo","2T":"ndo","2B":"ndo",3:"ndo"},{l:"Norwegian Bokm\xe5l",bh:"Norsk (Bokm\xe5l)",1:"nb",2:"nob","2T":"nob","2B":"nob",3:"nob"},{l:"Norwegian Nynorsk",bh:"Norsk (Nynorsk)",1:"nn",2:"nno","2T":"nno","2B":"nno",3:"nno"},{l:"Norwegian",bh:"Norsk",1:"no",2:"nor","2T":"nor","2B":"nor",3:"nor"},{l:"Nuosu",bh:"\ua188\ua320\ua4bf Nuosuhxop",1:"ii",2:"iii","2T":"iii","2B":"iii",3:"iii"},{l:"Southern Ndebele",bh:"isiNdebele",1:"nr",2:"nbl","2T":"nbl","2B":"nbl",3:"nbl"},{l:"Occitan",bh:"Occitan",1:"oc",2:"oci","2T":"oci","2B":"oci",3:"oci"},{l:"Ojibwe",bh:"\u140a\u14c2\u1511\u14c8\u142f\u14a7\u140e\u14d0",1:"oj",2:"oji","2T":"oji","2B":"oji",3:"oji"},{l:"Old Church Slavonic",bh:"\u0421\u043b\u043e\u0432\u0463\u0301\u043d\u044c\u0441\u043a\u044a",1:"cu",2:"chu","2T":"chu","2B":"chu",3:"chu"},{l:"Oromo",bh:"Afaan Oromoo",1:"om",2:"orm","2T":"orm","2B":"orm",3:"orm"},{l:"Oriya",bh:"\u0b13\u0b21\u0b3f\u0b3c\u0b06",1:"or",2:"ori","2T":"ori","2B":"ori",3:"ori"},{l:"Ossetian",bh:"\u0418\u0440\u043e\u043d \xe6\u0432\u0437\u0430\u0433",1:"os",2:"oss","2T":"oss","2B":"oss",3:"oss"},{l:"Panjabi",bh:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",1:"pa",2:"pan","2T":"pan","2B":"pan",3:"pan"},{l:"P\u0101li",bh:"\u092a\u093e\u0934\u093f",1:"pi",2:"pli","2T":"pli","2B":"pli",3:"pli"},{l:"Persian",bh:"\u0641\u0627\u0631\u0633\u06cc",1:"fa",2:"fas","2T":"fas","2B":"per",3:"fas"},{l:"Polish",bh:"Polski",1:"pl",2:"pol","2T":"pol","2B":"pol",3:"pol"},{l:"Pashto",bh:"\u067e\u069a\u062a\u0648",1:"ps",2:"pus","2T":"pus","2B":"pus",3:"pus"},{l:"Portuguese",bh:"Portugu\xeas",1:"pt",2:"por","2T":"por","2B":"por",3:"por"},{l:"Quechua",bh:"Runa Simi",1:"qu",2:"que","2T":"que","2B":"que",3:"que"},{l:"Romansh",bh:"Rumantsch",1:"rm",2:"roh","2T":"roh","2B":"roh",3:"roh"},{l:"Kirundi",bh:"Kirundi",1:"rn",2:"run","2T":"run","2B":"run",3:"run"},{l:"Romanian",bh:"Rom\xe2n\u0103",1:"ro",2:"ron","2T":"ron","2B":"rum",3:"ron"},{l:"Russian",bh:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",1:"ru",2:"rus","2T":"rus","2B":"rus",3:"rus"},{l:"Sanskrit",bh:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d",1:"sa",2:"san","2T":"san","2B":"san",3:"san"},{l:"Sardinian",bh:"Sardu",1:"sc",2:"srd","2T":"srd","2B":"srd",3:"srd"},{l:"Sindhi",bh:"\u0633\u0646\u068c\u064a\u200e",1:"sd",2:"snd","2T":"snd","2B":"snd",3:"snd"},{l:"Northern Sami",bh:"S\xe1megiella",1:"se",2:"sme","2T":"sme","2B":"sme",3:"sme"},{l:"Samoan",bh:"Gagana S\u0101moa",1:"sm",2:"smo","2T":"smo","2B":"smo",3:"smo"},{l:"Sango",bh:"S\xe4ng\xf6",1:"sg",2:"sag","2T":"sag","2B":"sag",3:"sag"},{l:"Serbian",bh:"\u0421\u0440\u043f\u0441\u043a\u0438",1:"sr",2:"srp","2T":"srp","2B":"srp",3:"srp"},{l:"Gaelic",bh:"G\xe0idhlig",1:"gd",2:"gla","2T":"gla","2B":"gla",3:"gla"},{l:"Shona",bh:"ChiShona",1:"sn",2:"sna","2T":"sna","2B":"sna",3:"sna"},{l:"Sinhala",bh:"\u0dc3\u0dd2\u0d82\u0dc4\u0dbd",1:"si",2:"sin","2T":"sin","2B":"sin",3:"sin"},{l:"Slovak",bh:"Sloven\u010dina",1:"sk",2:"slk","2T":"slk","2B":"slo",3:"slk"},{l:"Slovene",bh:"Sloven\u0161\u010dina",1:"sl",2:"slv","2T":"slv","2B":"slv",3:"slv"},{l:"Somali",bh:"Soomaaliga",1:"so",2:"som","2T":"som","2B":"som",3:"som"},{l:"Southern Sotho",bh:"Sesotho",1:"st",2:"sot","2T":"sot","2B":"sot",3:"sot"},{l:"Spanish",bh:"Espa\xf1ol",1:"es",2:"spa","2T":"spa","2B":"spa",3:"spa"},{l:"Sundanese",bh:"Basa Sunda",1:"su",2:"sun","2T":"sun","2B":"sun",3:"sun"},{l:"Swahili",bh:"Kiswahili",1:"sw",2:"swa","2T":"swa","2B":"swa",3:"swa"},{l:"Swati",bh:"SiSwati",1:"ss",2:"ssw","2T":"ssw","2B":"ssw",3:"ssw"},{l:"Swedish",bh:"Svenska",1:"sv",2:"swe","2T":"swe","2B":"swe",3:"swe"},{l:"Tamil",bh:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",1:"ta",2:"tam","2T":"tam","2B":"tam",3:"tam"},{l:"Telugu",bh:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",1:"te",2:"tel","2T":"tel","2B":"tel",3:"tel"},{l:"Tajik",bh:"\u0422\u043e\u04b7\u0438\u043a\u04e3",1:"tg",2:"tgk","2T":"tgk","2B":"tgk",3:"tgk"},{l:"Thai",bh:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",1:"th",2:"tha","2T":"tha","2B":"tha",3:"tha"},{l:"Tigrinya",bh:"\u1275\u130d\u122d\u129b",1:"ti",2:"tir","2T":"tir","2B":"tir",3:"tir"},{l:"Tibetan Standard",bh:"\u0f56\u0f7c\u0f51\u0f0b\u0f61\u0f72\u0f42",1:"bo",2:"bod","2T":"bod","2B":"tib",3:"bod"},{l:"Turkmen",bh:"T\xfcrkmen\xe7e",1:"tk",2:"tuk","2T":"tuk","2B":"tuk",3:"tuk"},{l:"Tagalog",bh:"Tagalog",1:"tl",2:"tgl","2T":"tgl","2B":"tgl",3:"tgl"},{l:"Tswana",bh:"Setswana",1:"tn",2:"tsn","2T":"tsn","2B":"tsn",3:"tsn"},{l:"Tonga",bh:"faka Tonga",1:"to",2:"ton","2T":"ton","2B":"ton",3:"ton"},{l:"Turkish",bh:"T\xfcrk\xe7e",1:"tr",2:"tur","2T":"tur","2B":"tur",3:"tur"},{l:"Tsonga",bh:"Xitsonga",1:"ts",2:"tso","2T":"tso","2B":"tso",3:"tso"},{l:"Tatar",bh:"\u0422\u0430\u0442\u0430\u0440\u0447\u0430",1:"tt",2:"tat","2T":"tat","2B":"tat",3:"tat"},{l:"Twi",bh:"Twi",1:"tw",2:"twi","2T":"twi","2B":"twi",3:"twi"},{l:"Tahitian",bh:"Reo M\u0101\u2019ohi",1:"ty",2:"tah","2T":"tah","2B":"tah",3:"tah"},{l:"Uyghur",bh:"\u0626\u06c7\u064a\u063a\u06c7\u0631\u0686\u0647",1:"ug",2:"uig","2T":"uig","2B":"uig",3:"uig"},{l:"Ukrainian",bh:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",1:"uk",2:"ukr","2T":"ukr","2B":"ukr",3:"ukr"},{l:"Urdu",bh:"\u0627\u0631\u062f\u0648",1:"ur",2:"urd","2T":"urd","2B":"urd",3:"urd"},{l:"Uzbek",bh:"O\u2018zbek",1:"uz",2:"uzb","2T":"uzb","2B":"uzb",3:"uzb"},{l:"Venda",bh:"Tshiven\u1e13a",1:"ve",2:"ven","2T":"ven","2B":"ven",3:"ven"},{l:"Vietnamese",bh:"Ti\u1ebfng Vi\u1ec7t",1:"vi",2:"vie","2T":"vie","2B":"vie",3:"vie"},{l:"Volap\xfck",bh:"Volap\xfck",1:"vo",2:"vol","2T":"vol","2B":"vol",3:"vol"},{l:"Walloon",bh:"Walon",1:"wa",2:"wln","2T":"wln","2B":"wln",3:"wln"},{l:"Welsh",bh:"Cymraeg",1:"cy",2:"cym","2T":"cym","2B":"wel",3:"cym"},{l:"Wolof",bh:"Wolof",1:"wo",2:"wol","2T":"wol","2B":"wol",3:"wol"},{l:"Western Frisian",bh:"Frysk",1:"fy",2:"fry","2T":"fry","2B":"fry",3:"fry"},{l:"Xhosa",bh:"isiXhosa",1:"xh",2:"xho","2T":"xho","2B":"xho",3:"xho"},{l:"Yiddish",bh:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",1:"yi",2:"yid","2T":"yid","2B":"yid",3:"yid"},{l:"Yoruba",bh:"Yor\xf9b\xe1",1:"yo",2:"yor","2T":"yor","2B":"yor",3:"yor"},{l:"Zhuang",bh:"Cuengh",1:"za",2:"zha","2T":"zha","2B":"zha",3:"zha"},{l:"Zulu",bh:"isiZulu",1:"zu",2:"zul","2T":"zul","2B":"zul",3:"zul"}];V(),It(),Ut();function tF(t){var i,n=null!=(i=function(t){var i=t.q0,n=new jC;return n.Q0(i,0,i.byteLength),tP(n).I1}(t))?i:24;return t.mft/n}function iF(t){return t.Km===mp.NR}function nF(t,i,n,r,e){for(var s,u=function(t,i,n,r){var e=n.mft,s=fe.fromNumber(t.eM||0),u=r.gO(Im.yF(s,e));return{wft:r.rF(),yft:r,bft:u,Aft:r}}(t,0,n,r),o=Im.bF(t.ct||0,n.mft),h=t.xD||0,a=!(65536&h)&&1!==(h>>24&3),c=Aa(e),f=new Pa;f.ac=n)){var r=nr(t,function(t,i){return new fF(t.map(function(t){return t?t.Xft():null}),i).Oft()});if(0!==r.length)return new aF(i,n,r)}},t}(),lF="black",gF="white";V(),It(),V(),It();var wF=[[42,225],[92,233],[94,237],[95,243],[96,250],[123,231],[124,247],[125,209],[126,241],[127,9608],[128,174],[129,176],[130,189],[131,191],[132,8482],[133,162],[134,163],[135,9834],[136,224],[137,32],[138,232],[139,226],[140,234],[141,238],[142,244],[143,251],[144,193],[145,201],[146,211],[147,218],[148,220],[149,252],[150,8216],[151,161],[152,42],[153,8217],[154,9473],[155,169],[156,8480],[157,8226],[158,8220],[159,8221],[160,192],[161,194],[162,199],[163,200],[164,202],[165,203],[166,235],[167,206],[168,207],[169,239],[170,212],[171,217],[172,249],[173,219],[174,171],[175,187],[176,195],[177,227],[178,205],[179,204],[180,236],[181,210],[182,242],[183,213],[184,245],[185,123],[186,125],[187,92],[188,94],[189,95],[190,124],[191,8764],[192,196],[193,228],[194,214],[195,246],[196,223],[197,165],[198,164],[199,9475],[200,197],[201,229],[202,216],[203,248],[204,9487],[205,9491],[206,9495],[207,9499]].reduce(function(t,i){return t[i[0]]=i[1],t},{}),mF=function(){function t(){this.Qft=[],this.Jft=0,this.tvt=void 0;for(var t=0;taB&&(this.Jft=31)},i.Zft=function(t){var i=this.Jft+t;this.Yft(i)},i.$ft=function(){this.Zft(-1),this.Qft[this.Jft]=null},i.Dft=function(t){t>=144&&this.$ft();var i=function(t){return wF[t]?String.fromCharCode(wF[t]):String.fromCharCode(t)}(t);this.addParsedChar(i)},i.addParsedChar=function(t){this.Jft>=aB||(32===Number(t)?(this.Qft[this.Jft]=this.tvt?"
":"",this.tvt=!this.tvt):this.Qft[this.Jft]=t,this.Zft(1))},i.ivt=function(t){for(var i=t;i=i)return null;var r=(new cF).Mft(this.avt.slice(1));return 0===r.length?null:{PO:new aF(t,i,r),zT:n,uvt:this.rvt<<1|this.ovt+1}},i.hr=function(){this.cvt(),this.dvt=1},i.lvt=function(){return this.dvt},i.fvt=function(t){this.dvt=t},i.Yft=function(t){this.avt[this.dvt].Yft(t)},i.Zft=function(t){this.avt[this.dvt].Zft(t)},i.vvt=function(){return this._vt},i.gvt=function(t){this._vt=t},i.Dft=function(t,i){if(!(i<32||i>127)){var n="";switch(t){case 0:n=void 0!==kF[i]?kF[i]:String.fromCharCode(i);break;case 1:n=bF[i];break;case 2:this.pvt(),n=AF[i];break;case 3:this.pvt(),n=TF[i]}n&&this.avt[this.dvt].addParsedChar(n)}},i.pvt=function(){this.avt[this.dvt].$ft()},i.mvt=function(t,i,n){if(t>=i)for(var r=n-1;r>=0;r--)this.avt[t+r]=this.avt[i+r];else for(var e=0;e0?this._vt:0,this.cvt()},i.bvt=function(t){this.Avt=t},i.Svt=function(t){this.Tvt=t},i.kvt=function(t){this.Evt=t},i.xvt=function(t){this.Pvt=t},t}(),yF=15,_F=function(t){return t[t.Ivt=0]="Ivt",t[t.Cvt=1]="Cvt",t[t.Rvt=2]="Rvt",t[t.Dvt=3]="Dvt",t}({}),kF={39:"\u2019",42:"\xe1",92:"\xe9",94:"\xed",95:"\xf3",96:"\xfa",123:"\xe7",124:"\xf7",125:"\xd1",126:"\xf1",127:"\u2588"},bF={48:"\xae",49:"\xb0",50:"\xbd",51:"\xbf",52:"\u2122",53:"\xa2",54:"\xa3",55:"\u266a",56:"\xe0",57:"\u2800",58:"\xe8",59:"\xe2",60:"\xea",61:"\xee",62:"\xf4",63:"\xfb"},AF={32:"\xc1",33:"\xc9",34:"\xd3",35:"\xda",36:"\xdc",37:"\xfc",38:"\u2018",39:"\xa1",40:"*",41:"'",42:"\u2500",43:"\xa9",44:"\u2120",45:"\xb7",46:"\u201c",47:"\u201d",48:"\xc0",49:"\xc2",50:"\xc7",51:"\xc8",52:"\xca",53:"\xcb",54:"\xeb",55:"\xce",56:"\xcf",57:"\xef",58:"\xd4",59:"\xd9",60:"\xf9",61:"\xdb",62:"\xab",63:"\xbb"},TF={32:"\xc3",33:"\xe3",34:"\xcd",35:"\xcc",36:"\xec",37:"\xd2",38:"\xf2",39:"\xd5",40:"\xf5",41:"{",42:"}",43:"\\",44:"^",45:"_",46:"|",47:"~",48:"\xc4",49:"\xe4",50:"\xd6",51:"\xf6",52:"\xdf",53:"\xa5",54:"\xa4",55:"\u2502",56:"\xc5",57:"\xe5",58:"\xd8",59:"\xf8",60:"\u250c",61:"\u2510",62:"\u2514",63:"\u2518"},SF=function(){function t(t,i){this.Vp=void 0,this.Uvt=void 0,this.Lvt=void 0,this.Fvt=void 0,this.Mvt=void 0,this.Bvt=void 0,this.Ovt=void 0,this.Nvt=void 0,this.Vp=0,this.Uvt=new pF(t,i),this.Lvt=new pF(t,i),this.Fvt=new pF(t,i),this.Mvt=this.Lvt,this.Bvt=0,this.Ovt=void 0,this.Nvt=!1}var i=t.prototype;return i.hr=function(){this.Nvt=!0,this.Bvt=0,this.Vp=0,this.Mvt=this.Lvt,this.Ovt=void 0,this.Lvt.hr(),this.Fvt.hr(),this.Uvt.hr()},i.Vvt=function(t,i){return[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&t)<<1|i>>5&1]},i.Hvt=function(t,i){var n=this.Vvt(t,i),r=(30&i)>>1,e=gF,s=!1;r<7?e=RF[r]:7===r&&(s=!0);var u=!(1&~i);if(4!==this.Vp){var o=this.Mvt;if(3===this.Vp&&n!==o.lvt()){var h=1+o.lvt()-o.vvt(),a=1+n-o.vvt();o.mvt(a,h,o.vvt()),o.wvt(0,a-1),o.wvt(n+1,yF-n)}o.fvt(n);var c=oB[t<<1&14|i>>5&1]-1;if(!(c<0)){var f=function(t,i){var n=i>95?i-96:i-64;return{wit:uB[n].wit,mit:uB[n].mit,yit:uB[n].yit,Dit:t}}(c,i);o.Yft(f.yit),this.Mvt.bvt(u),this.Mvt.Svt(s),this.Mvt.kvt(e),this.Mvt.xvt(lF)}}},i.Wvt=function(t,i){this.Mvt.bvt(!1),this.Mvt.Svt(!1),this.Mvt.kvt(gF);var n=this.qvt(t,_F.Ivt," ".charCodeAt(0)),r=gF,e=!1,s=!(1&~i);return"white_italics"===(r=RF[(14&i)>>1])&&(r="white",e=!0),this.Mvt.bvt(s),this.Mvt.Svt(e),this.Mvt.kvt(r),n},i.qvt=function(t,i,n){if(this.Mvt.Dft(i,n),2===this.Vp||3===this.Vp){var r=this.zvt(this.Mvt,this.Bvt,t);return this.Bvt=t,r}return null},i.zvt=function(t,i,n){return this.Nvt?null:2===this.Vp||3===this.Vp?t.nvt(n,n+10):t.nvt(i,n)},i.Gvt=function(t,i){var n=lF;7&t||(n=IF[(14&i)>>1]),this.Mvt.xvt(n)},i.Xvt=function(t){var i=EF,n=t.jvt,r=t.Qvt,e=null;switch(n){case i.RCL:this.Kvt();break;case i.BS:this.Yvt();break;case i.AOD:case i.AON:case i.DER:break;case i.RU2:e=this.Jvt(2,r);break;case i.RU3:e=this.Jvt(3,r);break;case i.RU4:e=this.Jvt(4,r);break;case i.FON:e=this.Zvt(r);break;case i.RDC:this.$vt(r);break;case i.TR:this.t_t();break;case i.RTD:this.i_t();break;case i.EDM:e=this.e_t(r);break;case i.CR:e=this.s_t(r);break;case i.ENM:this.n_t();break;case i.EOC:e=this.r_t(r)}return e},i.s_t=function(t){var i=this.Mvt;if(3!==this.Vp)return null;var n=this.zvt(i,this.Bvt,t),r=i.lvt()-i.vvt()+1;return i.mvt(r-1,r,i.vvt()),i.wvt(0,r-1),i.wvt(i.lvt(),yF-i.lvt()),this.Bvt=t,n},i.Jvt=function(t,i){this.Mvt=this.Lvt;var n=this.Mvt,r=null;return 3!==this.Vp&&4!==this.Vp&&(r=this.zvt(n,this.Bvt,i),this.Lvt.yvt(),this.Fvt.yvt(),this.Nvt=!1,n.fvt(yF)),this.Vp=3,n.gvt(t),r},i.Zvt=function(t){return this.qvt(t,_F.Ivt," ".charCodeAt(0))},i.e_t=function(t){var i=this.Lvt,n=null;return 4!==this.Vp&&(n=this.zvt(i,this.Bvt,t)),i.cvt(),this.Nvt=!1,n},i.$vt=function(t){this.Vp=2,this.Mvt=this.Lvt,this.Mvt.gvt(0),this.Bvt=t},i.n_t=function(){this.Fvt.cvt()},i.r_t=function(t){var i=null;4!==this.Vp&&(i=this.zvt(this.Lvt,this.Bvt,t));var n=this.Fvt;return this.Fvt=this.Lvt,this.Lvt=n,this.Kvt(),this.Bvt=t,i},i.Kvt=function(){this.Vp=1,this.Mvt=this.Fvt,this.Mvt.gvt(0)},i.Yvt=function(){this.Mvt.pvt()},i.t_t=function(){this.Uvt.hr(),this.Nvt=!1,this.i_t()},i.i_t=function(){this.Mvt=this.Uvt,this.Vp=4},i.h_t=function(t,i,n){return this.Mvt.Dft(_F.Ivt,i),this.qvt(t,_F.Ivt,n)},i.o_t=function(t,i,n){var r=1&i?_F.Dvt:_F.Rvt;return this.qvt(t,r,n)},i.a_t=function(t){var i=t.u_t,n=t.jvt,r=t.Qvt;if(this.Ovt===(i<<8|n))return this.Ovt=void 0,null;if(this.Ovt=i<<8|n,this.c_t(i,n))this.Hvt(i,n);else{if(this.d_t(i,n))return this.Wvt(r,n);if(this.l_t(i,n))this.Gvt(i,n);else{if(this.f_t(i,n))return this.qvt(r,_F.Cvt,n);if(this.v_t(i,n))return this.o_t(r,i,n);if(this.__t(i,n))return this.Xvt(t);this.isTabOffset(i)&&this.Mvt.Zft(n-32)}}return null},i.isTabOffset=function(t){return 23===t||31===t},i.__t=function(t,i){return 20==(246&t)&&32==(240&i)},i.c_t=function(t,i){return 16==(240&t)&&64==(192&i)},i.d_t=function(t,i){return 17==(247&t)&&32==(240&i)},i.l_t=function(t,i){return 16==(247&t)&&32==(240&i)||23==(247&t)&&45==(255&i)},i.f_t=function(t,i){return 17==(247&t)&&48==(240&i)},i.v_t=function(t,i){return 18==(246&t)&&32==(224&i)},t.g_t=function(t){return 16==(112&t)},t}(),EF={RCL:32,BS:33,AOD:34,AON:35,DER:36,RU2:37,RU3:38,RU4:39,FON:40,RDC:41,TR:42,RTD:43,EDM:44,CR:45,ENM:46,EOC:47},IF=["black","green","blue","cyan","red","yellow","magenta","black"],RF=["white","green","blue","cyan","red","yellow","magenta","white_italics"];V(),It(),Ut(),Yt(),V(),It(),V(),It();var CF=function(){function t(t,i,n,r,e){this.p_t=void 0,this.Avt=void 0,this.Tvt=void 0,this.Pvt=void 0,this.Evt=void 0,this.p_t=t,this.Avt=i,this.Tvt=n,this.Pvt=r,this.Evt=e}var i=t.prototype;return i.Xft=function(){return this.p_t},i.m_t=function(){return this.Avt},i.w_t=function(){return this.Tvt},i.y_t=function(){return this.Pvt},i.b_t=function(){return this.Evt},t}(),PF=function(){function t(t){this.K_t=void 0,this.kz=void 0,this.E_t=void 0,this.T_t=void 0,this.S_t=void 0,this.k_t=void 0,this.x_t=void 0,this.P_t=void 0,this.j_t=void 0,this.C_t=void 0,this.HO=void 0,this.dvt=void 0,this.B_t=void 0,this.Tvt=void 0,this.Avt=void 0,this.Evt=void 0,this.Pvt=void 0,this.K_t=t,this.kz=!1,this.E_t=!1,this.T_t=0,this.S_t=0,this.k_t=0,this.x_t=0,this.P_t=0,this.j_t=2,this.C_t=[],this.HO=0,this.dvt=0,this.B_t=0,this.Tvt=!1,this.Avt=!1,this.Evt=gF,this.Pvt=lF,this.I_t()}var i=t.prototype;return i.A_t=function(t,i,n,r,e,s,u){this.kz=t,this.S_t=i,this.T_t=n,this.k_t=r,this.E_t=e,this.x_t=s,this.P_t=u},i.I_t=function(){this.C_t=[];for(var t=0;t=0,i=this.B_t=0;return t&&i},i.Re=function(){return this.kz},i.L_t=function(t){for(var i=0,n=t;n=this.x_t)return this.L_t(1),void(this.B_t=0);this.dvt++,this.B_t=0},i.F_t=function(){this.C_t[this.dvt]=this.R_t(),this.B_t=0},i.nvt=function(t,i){if(this.HO>=t)return null;var n=dF.Gft(this.C_t,this.HO,t);return n?(this.U_t(t),{PO:n,zT:"svc"+i,uvt:i}):null},i.V_t=function(t,i){this.dvt=t,this.B_t=i},i.H_t=function(t){this.Pvt=t},i.W_t=function(t){this.Evt=t},i.q_t=function(t){this.Avt=t},i.z_t=function(t){this.Tvt=t},i.G_t=function(){this.dvt=0,this.B_t=0,this.Avt=!1,this.Tvt=!1,this.Evt=gF,this.Pvt=lF},i.X_t=function(t){this.j_t=t},i.Q_t=function(){this.kz=!0},i.we=function(){this.kz=!1},i.Mh=function(){this.kz=!this.kz},i.U_t=function(t){this.HO=t},t}(),DF=42,NF=15,xF=function(){function t(t){this.ogt=void 0,this.pgt=void 0,this.hgt=void 0,this.ogt=t,this.pgt=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0],this.hgt=void 0}var i=t.prototype;return i.Y_t=function(t){var i=t.J_t(),n=i.XE,r=i.Qvt;n===FF&&(n=n<<16|t.J_t().XE);return n>=0&&n<=31?this.Z_t(n,r):n>=128&&n<=159?this.$_t(t,n,r):(n>=4096&&n<=4127?this.tgt(t,255&n):n>=4224&&n<=4255?this.igt(t,255&n):n>=32&&n<=127?this.egt(n):n>=160&&n<=255?this.sgt(n):n>=4128&&n<=4223?this.ngt(255&n):n>=4256&&n<=4351&&this.rgt(255&n),null)},i.egt=function(t){this.hgt&&(127!==t?this.hgt.D_t(String.fromCharCode(t)):this.hgt.D_t("\u266a"))},i.sgt=function(t){this.hgt&&this.hgt.D_t(String.fromCharCode(t))},i.ngt=function(t){if(this.hgt)if(void 0!==UF[t]){var i=UF[t];this.hgt.D_t(i)}else this.hgt.D_t("_")},i.rgt=function(t){this.hgt&&(160===t?this.hgt.D_t("[CC]"):this.hgt.D_t("_"))},i.Z_t=function(t,i){if(!this.hgt)return null;var n=this.hgt,r=null;switch(t){case BF:n.M_t();break;case MF:n.Re()&&(r=n.nvt(i,this.ogt)),n.O_t();break;case LF:n.Re()&&(r=n.nvt(i,this.ogt)),n.F_t();break;case OF:n.Re()&&(r=n.nvt(i,this.ogt)),n.I_t(),n.V_t(0,0)}return r},i.$_t=function(t,i,n){if(i>=128&&i<=135){var r=7&i;this.agt(r)}else{if(136===i){var e=t.J_t().XE;return this.ugt(e,n)}if(137===i){var s=t.J_t().XE;this.cgt(s,n)}else{if(138===i){var u=t.J_t().XE;return this.dgt(u,n)}if(139===i){var o=t.J_t().XE;return this.lgt(o,n)}if(140===i){var h=t.J_t().XE;return this.fgt(h,n)}if(143===i)return this.hr(n);if(144===i)this.vgt(t);else if(145===i)this._gt(t);else if(146===i)this.V_t(t);else if(151===i)this.ggt(t);else if(i>=152&&i<=159){var a=(15&i)-8;this.A_t(t,a,n)}}}return null},i.tgt=function(t,i){i>=8&&i<=15?t.uD(1):i>=16&&i<=23?t.uD(2):i>=24&&i<=31&&t.uD(3)},i.igt=function(t,i){i>=128&&i<=135?t.uD(4):i>=136&&i<=143&&t.uD(5)},i.agt=function(t){this.pgt[t]&&(this.hgt=this.pgt[t])},i.mgt=function(t){var i;return zt(this,function(n){switch(n.label){case 0:i=0,n.label=1;case 1:return i<8?!(1&~t)&&this.pgt[i]?[4,i]:[3,3]:[3,5];case 2:n.sent(),n.label=3;case 3:t>>=1,n.label=4;case 4:return i++,[3,1];case 5:return[2]}})},i.ugt=function(t,i){for(var n,r=null,e=Ft(this.mgt(t));!(n=e()).done;){var s=n.value,u=this.pgt[s];u.Re()&&(r=u.nvt(i,this.ogt)),u.I_t()}return r},i.cgt=function(t,i){for(var n,r=Ft(this.mgt(t));!(n=r()).done;){var e=n.value,s=this.pgt[e];s.Re()||s.U_t(i),s.Q_t()}},i.dgt=function(t,i){for(var n,r=null,e=Ft(this.mgt(t));!(n=e()).done;){var s=n.value,u=this.pgt[s];u.Re()&&(r=u.nvt(i,this.ogt)),u.we()}return r},i.lgt=function(t,i){for(var n,r=null,e=Ft(this.mgt(t));!(n=e()).done;){var s=n.value,u=this.pgt[s];u.Re()?r=u.nvt(i,this.ogt):u.U_t(i),u.Mh()}return r},i.fgt=function(t,i){for(var n,r=null,e=Ft(this.mgt(t));!(n=e()).done;){var s=n.value,u=this.pgt[s];u.Re()&&(r=u.nvt(i,this.ogt)),this.pgt[s]=void 0}return r},i.hr=function(t){var i=this.fgt(255,t);return this.jy(),i},i.jy=function(){this.hgt=void 0,this.pgt=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0]},i.vgt=function(t){t.uD(1);var i=t.J_t().XE;if(this.hgt){var n=(128&i)>0,r=(64&i)>0;this.hgt.z_t(n),this.hgt.q_t(r)}},i._gt=function(t){var i=t.J_t().XE,n=t.J_t().XE;if(t.uD(1),this.hgt){var r=3&i,e=(12&i)>>2,s=(48&i)>>4,u=3&n,o=(12&n)>>2,h=(48&n)>>4,a=this.wgt(s,e,r),c=this.wgt(h,o,u);this.hgt.W_t(a),this.hgt.H_t(c)}},i.V_t=function(t){var i=t.J_t().XE,n=t.J_t().XE;if(this.hgt){var r=15&i,e=63&n;this.hgt.V_t(r,e)}},i.ggt=function(t){t.uD(1),t.uD(1);var i=t.J_t().XE;if(t.uD(1),this.hgt){var n=3&i;this.hgt.X_t(n)}},i.A_t=function(t,i,n){var r=void 0!==this.pgt[i];if(!r){var e=new PF(i);e.U_t(n),this.pgt[i]=e}var s=t.J_t().XE,u=t.J_t().XE,o=t.J_t().XE,h=t.J_t().XE,a=t.J_t().XE,c=t.J_t().XE,f=(32&s)>0,v=127&u,d=(128&u)>0,l=o,g=1+(15&h),w=(240&h)>>4,m=1+(63&a);r&&0===(7&c)||this.pgt[i].G_t(),this.pgt[i].A_t(f,v,l,w,d,g,m),this.hgt=this.pgt[i]},i.wgt=function(t,i,n){var r={0:0,1:0,2:1,3:1};return VF[r[t]<<2|r[i]<<1|r[n]]},t}(),BF=8,OF=12,MF=13,LF=14,FF=16,UF={32:" ",33:"\xa0",37:"\u2026",42:"\u0160",44:"\u0152",48:"\u2588",49:"\u2018",50:"\u2019",51:"\u201c",52:"\u201d",53:"\u2022",57:"\u2122",58:"\u0161",60:"\u0153",61:"\u2120",63:"\u0178",118:"\u215b",119:"\u215c",120:"\u215d",121:"\u215e",122:"\u2502",123:"\u2510",124:"\u2514",125:"\u2500",126:"\u2518",127:"\u250c"},VF=["black","blue","green","cyan","red","magenta","yellow","white"];V(),It();var jF=function(){function t(){this.Sgt=void 0,this.Agt=void 0,this.bgt=void 0,this.Sgt=[],this.Agt=null,this.bgt=0}var i=t.prototype;return i.ygt=function(t){if(t.Km===zL.cft){var i=63&t.XE;return this.bgt=2*i-1,void(this.Agt=[])}if(this.Agt&&(this.bgt>0&&(this.Agt.push(t),this.bgt--),0===this.bgt)){var n=new HF(this.Agt);this.Sgt.push(n),this.Agt=null,this.bgt=0}},i.Tgt=function(){return this.Sgt},i.kgt=function(){this.Sgt=[]},i.jy=function(){this.Sgt=[],this.Agt=[],this.bgt=0},t}(),HF=function(){function t(t){this.xgt=void 0,this.Pgt=void 0,this.xgt=0,this.Pgt=t}var i=t.prototype;return i.Egt=function(){return this.xgtthis.Pgt.length)throw new _d(pd.SUBTITLE_PARSE_ERROR,"Buffer read out of bounds / invalid CEA-708 Data.");this.xgt+=t},t}(),WF=function(){function t(){this.Rgt=void 0,this.Dgt=void 0,this.Ngt=void 0,this.Cgt=void 0,this.Ogt=void 0,this.Mgt=void 0,this.Lgt=void 0,this.Bgt=void 0,this.Vgt=!1,this.Rgt=[],this.Dgt=[],this.Ngt=new jF,this.Cgt=0,this.Ogt=so({CC1:new SF(0,0),CC2:new SF(0,1),CC3:new SF(1,0),CC4:new SF(1,1)}),this.Mgt=0,this.Lgt=0,this.Bgt=eo(),this.hr()}var i=t.prototype;return i.jy=function(){this.Cgt=0,this.Rgt=[],this.Dgt=[],this.Ngt.jy(),this.hr(),this.Bgt.forEach(function(t){t.jy()})},i.hr=function(){this.Mgt=0,this.Lgt=0,this.Ogt.forEach(function(t){t.hr()})},i.Fgt=function(t,i){if(t.fft){var n=t._ft,r=t.gft,e=t.Km;e===zL.oft||e===zL.aft?this.Rgt.push({Qvt:i,Km:e,u_t:n,jvt:r,Ugt:this.Rgt.length}):this.Vgt&&(this.Dgt.push({Qvt:i,Km:e,XE:n,Ugt:this.Dgt.length}),this.Dgt.push({Qvt:i,Km:zL.uft,XE:r,Ugt:this.Dgt.length}))}},i.dj=function(){var t=[];this.Rgt.sort(function(t,i){return t.Qvt-i.Qvt||t.Ugt-i.Ugt}),this.Dgt.sort(function(t,i){return t.Qvt-i.Qvt||t.Ugt-i.Ugt});for(var i,n=Ft(this.Rgt);!(i=n()).done;){var r=i.value,e=this.Hgt(r);e&&t.push(e)}for(var s,u=Ft(this.Dgt);!(s=u()).done;){var o=s.value;this.Ngt.ygt(o)}for(var h,a=Ft(this.Ngt.Tgt());!(h=a()).done;){var c,f=h.value,v=this.Wgt(f);(c=t).push.apply(c,[].concat(v))}return this.Ngt.kgt(),this.Rgt=[],this.Dgt=[],t},i.Hgt=function(t){var i=t.Km;if(SF.g_t(t.u_t)){var n=t.u_t>>3&1;0===i?this.Mgt=n:this.Lgt=n}var r="CC"+(i<<1|(i?this.Lgt:this.Mgt)+1),e=this.Ogt.get(r);return 255===t.u_t&&255===t.jvt||!t.u_t&&!t.jvt||!this.qgt(t.u_t)||!this.qgt(t.jvt)?(++this.Cgt>=45&&this.hr(),null):(this.Cgt=0,t.u_t&=127,t.jvt&=127,t.u_t||t.jvt?SF.g_t(t.u_t)?e.a_t(t):e.h_t(t.Qvt,t.u_t,t.jvt):null)},i.Wgt=function(t){var i=[];try{for(;t.Egt();){var n=t.J_t().XE,r=(224&n)>>5,e=31&n;if(7===r&&0!==e)r=63&t.J_t().XE;if(0!==r){if(!this.Bgt.has(r)){var s=new xF(r);this.Bgt.set(r,s)}for(var u=this.Bgt.get(r),o=t.Igt();t.Igt()-o>=1;return 1===i},t}();V(),It(),Dt();var zF=function(t){function i(i,n){var r;return(r=t.call(this,"zgt")||this).uvt=void 0,r.PO=void 0,r.uvt=i,r.PO=n,r}return Pt(i,t),i}(ah),qF=Im.hU(.1),XF=function(t){function i(){var i;return(i=t.call(this)||this).Xgt=void 0,i.Xgt=new WF,i}Pt(i,t);var n=i.prototype;return n.Ggt=function(t,i){this.Xgt.Fgt(t,i)},n.dj=function(){for(var t,i=Ft(this.Xgt.dj());!(t=i()).done;){var n=t.value;this.So(new zF(n.uvt,n.PO))}},n.hr=function(){this.Xgt.jy()},n.kn=function(){this.Vo(),this.Xgt.jy()},i}(uh),GF=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Ygt=[],i}Pt(i,t);var n=i.prototype;return n.jgt=function(t,i,n,r){var e=this.Qgt(t,r);this.Kgt(e,i,n),this.dj()},n.Qgt=function(t,i){var n,r=t.slice().sort(hB),e=this.Ygt;if(0===e.length)return r;if(0===r.length)return e;var s=e[0].Ait,u=e[e.length-1].Ait,o=r[0].Ait,h=e[0].qot===r[0].qot;if(u.gF(o).fF().lF(Im.hU(2.5*i))&&h)n=e.concat(r).sort(hB);else if(o.aF(s)){for(var a=0;au.CO?e.RO=u.CO:e.CO>u.CO&&u.RO>e.CO?u.RO=e.CO:e.CO===u.CO&&(e.RO=u.RO)}n.lpt(r,e)},n.Zgt=eo(),n.opt=new GF,n.opt.wn("zgt",n.dpt),n}Pt(i,t);var n=i.prototype;return n.Jgt=function(t){return this.Zgt.get(t)},n.$gt=function(t){var i=this.Zgt.get(t.Sit);return i||(i=this.tpt(t),this.Zgt.set(t.Sit,i)),i},n.tpt=function(t){var i=[sw.zI],n=JL(t.Tit),r=n?n.l:"";t.ipt&&(r="easy "+r,i.push(sw.QI));var e=t.Th||r||"CC"+t.Sit,s=this.ept(e,t.Tit,i);return this.tt(s),s},n.ght=function(t){var i=Pp.PD(Aa(t));this.spt=function(t){for(var i,n=Ft(t.Z);!(i=n()).done;){var r=i.value,e=rF(r),s=r.$D.cN.fN._N.pN,u=Wn(s,function(t){return t.Km===mp.tR});if(!u){var o=s.filter(function(t){return t.Km===mp.DR}),h=Wn(o,function(t){var i;return(null==(i=t.dB)?void 0:i.Km)===mp.tR});h&&(u=h.dB)}if(u){var a=FC(Aa(u.ZN.lk),new Pa),c=u.tB;return io({},e,{sN:r.yD.sN,ZN:Ca(u.ZN.lk),Ti:u.Ti,Mi:u.Mi,MB:c&&c.MB,BB:c&&c.BB,a2:a.U0,npt:a.V0,u2:a.H0,q0:a.q0[0],z0:a.z0[0]})}}}(Wn(i,eF))},n.elt=function(t,i,n,r,e,s){var u;if(this.spt&&(E(this.rpt)||!Pn(this.rpt,i,1e-5))){E(this.hpt)||Pn(this.hpt,i,.1)||this.opt.hr();for(var o,h,a=function(t,i,n,r,e){for(var s,u=[],o=i.filter(iF),h=r(n),a=Ft(o);!(s=a()).done;){var c=s.value,f=Wn(c.Z,function(t){return t.yD.sN===n.sN});if(f)for(var v,d,l=f.yD.FB||0,g=f.yD.UB||0,w=f.KB?f.KB.KB:fe.ZERO,m=c.qB+(null!=(v=f.yD.YB)?v:fe.ZERO).toNumber(),p=Ft(f.QB);!(d=p()).done;)for(var y,_=d.value,k=m+(_.qB||0),b=Ft(_.iM);!(y=b()).done;){var A=y.value,T=A.Wy||g,S=new jC;S.Q0(t,k,k+T);var E=Im.yF(w,n.mft);S.LU=e(A,c,n,E,Ia(t,k,k+T)),u.push(S),k+=T,w=w.add(A.ct||l||h)}}return u}(t,Pp.PD(Aa(t)),this.spt,tF,nF),c=null!=(o=null==(u=ur(a,function(t){return t.LU.ct}))?void 0:u.LU.ct)?o:0,f=function(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){var e,s=i.value;s.LU.xft&&(e=n).push.apply(e,[].concat(s.LU.xft)),delete s.LU.xft}for(var u=0;u0}(o,i)||0!==w.length){var y=Ra(t),_=Wn(s,function(t){return t.Km===mp.ZC}),k=_?Sp.mD(_.lk,mp.$C):void 0,b=k?function(t){var i=t.lk.Fy();return i.uD(4),i.uD(4),i.eD()}(k):1,A=Wn(f,function(t){return t.Km===mp.JC});A&&function(t,i,n){var r=fU(Aa(t),i),e=Sp.pD(r,new Pa),s=e.lk;s.uD(4);for(var u=s.eD(),o=0;o=0;S--){var E=w[S];y=cU(y,E.ppt,v,T,E.mpt,n)}return{wpt:y,ypt:{bpt:w.length,OB:b}}}}}}}}}}function aU(t,i,n){var r=Va(t,n,i.lk.lk.byteOffset+i.lk.lk.byteLength);return vU(fU(Aa(r),i),n.byteLength),r}function cU(t,i,n,r,e,s){var u=function(t,i,n){0;var r=t.lk.lk,e=mU(),s=new I(r.byteLength+e.byteLength),u=Aa(s);s.set(Ta(r),0),vU(u,e.byteLength),ua(u,new Pa(_U),i),s.set(e,r.byteLength),ua(u,new Pa(r.byteLength+pU),t.Km),n&&qh(u,new Pa(r.byteLength+yU),n);return s}(i,e,s),o=Va(t,u,i.lk.lk.byteOffset),h=Aa(o);!function(t,i){var n=Sp.pD(t,new Pa),r=Sp.kD(n.lk,mp.YC,!1),e=Aa(r.lk),s=e.getUint32(0);e.setUint32(0,s+i)}(fU(h,n),1);for(var a,c=Ft(r);!(a=c()).done;){vU(fU(h,a.value),u.byteLength)}return o}function fU(t,i){var n=i.lk.lk.byteOffset;return ba(t,n,n+i.lk.lk.byteLength)}function vU(t,i){var n=new Pa,r=Kh(t,n);if(0===r);else if(1===r){n.Ly(4);var e=Zh(t,n.Fy());ta(t,n,e.add(i))}else n.Oy(0),Jh(t,n,r+i)}V(),It(),Dt(),Ut();var dU=function(t){function i(i){var n;return(n=t.call(this)||this).Spt=void 0,n.iZ=void 0,n.Tpt=[],n.Spt=i,n}Pt(i,t);var n=i.prototype;return n.start=function(t){this.iZ=t},n.transform=function(t){this.E$(t),this.Apt()},n.flush=function(){this.P$(),this.Apt()},n.L$=function(t){return t===mp.NR},n.F$=function(t){var i=Ra(Ta(t.lk.lk)),n=Sp.pD(Aa(i),new Pa);i=lU(i,n,this.Spt),this.Tpt.push(i)},n.V$=function(t){this.Tpt.push(t)},n.Apt=function(){for(var t,i=Ft(function(t){if(t.length<2)return t;for(var i=[],n=t[0],r=n.buffer,e=n.byteOffset,s=n.byteLength,u=1;u=0;s--){var u=e[s];u.Km===mp.LR&&(r=gU(r,u,i,n))}return r}function gU(t,i,n,r){var e=fU(Aa(t),i),s=Sp.pD(e,new Pa),u=Sp.lD(s.lk),o=Wn(u,function(t){return t.Km===mp.OR});if(!o)return t;var h=o.lk,a=h.$R.Fy(),c=h.eD(),f=Cp(c).flags;h.uD(4),f.Uy(yp.BASE_DATA_OFFSET_PRESENT)&&h.uD(8);var v=h.$R.Fy();if(f.Uy(yp.SAMPLE_DESCRIPTION_INDEX_PRESENT)){var d=Kh(h.lk,v);return Jh(h.lk,h.$R,d+r.bpt),t}Jh(h.lk,a,c|yp.SAMPLE_DESCRIPTION_INDEX_PRESENT);var l=new I(4);Aa(l).setUint32(0,r.OB+r.bpt);for(var g,w=h.lk.byteOffset+v.ac,m=Ft(u.filter(function(t){return t.Km===mp.FR}));!(g=m()).done;){wU(g.value,l.byteLength)}for(var p=0,y=[o,i,n];p0?i.An(i.V-1):0;var n=t.An(0);isFinite(n)&&this.Ipt=0;s--){var u=e[s];u.Km===mp.NR&&(n=lU(n,u,i))}return n}(h,this.Upt)),u={Km:nC.wZ,lk:h}),a={Get:i.CO,ct:i.ct,EU:r,u2:null==(s=n.qot)?void 0:s.JI},c=this.Wrt.Fx,[4,this.Vpt()];case 1:return d.sent(),[4,this.Wrt.Q2(u,a,e)];case 2:return d.sent(),f=this.Wrt.Fx,v=this.Wrt.W3,[2,AU(c,f,v,i)]}})}).call(this)},n.ght=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:return pr(n),this.Fpt&&this.Fpt.ght(new I(t.jht)),s=new I(t.jht),this.Hpt(i)&&(u=this.Rpt.Wpt,o=[],u&&(o=nr(u.qpt,function(t){return t.OW}),h=u.zpt.fH?sI(u.zpt.fH):void 0),(a=hU(s,o,h))?(this.Upt=a.ypt,s=a.wpt):this.Upt=void 0),(null==(r=this.Wrt)?void 0:r.Cd)&&this.Wrt.Cd.GT!==i.GT?(c={GT:i.GT},this.Wrt.IZ(c)?[4,this.Wrt.RZ(c)]:[3,2]):[3,2];case 1:v.sent(),pr(n),v.label=2;case 2:return f={Km:nC.wZ,lk:s},[4,this.Vpt()];case 3:return v.sent(),[4,this.Wrt.J2(f,{u2:null==(e=i.qot)?void 0:e.JI},n)];case 4:return v.sent(),[2]}})}).call(this)},n.ilt=function(t,i,n){return this.Wrt.pS(t,i,n)},n.r$=function(t,i){this.Wrt.G3(t,i)},n.h$=function(t,i){this.Wrt.X3(t,i)},n.Ppt=function(){return this.Wrt?this.Wrt.Fx:LA.rL()},n.xpt=function(){return this.Wrt?this.Wrt.W3:LA.rL()},n.Gpt=function(){return this.Wrt?this.Wrt.pS(0,1/0):ot.resolve()},n.Xpt=function(){return this.Wrt&&(this.Wrt.mn(tC.pZ,this.Rs),this.Wrt=void 0),ot.resolve()},n.jpt=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return n=eL.vdt(null!=(i=t.Alt)?i:t.xat,this.ndt),r=n.lQ,this.Wrt||(this.Wrt=this.Rpt.Qpt(r),this.Wrt.wn(tC.pZ,this.Rs),this.ldt=new AL(this.Wrt)),[4,this.Vpt()];case 1:return e.sent(),[2]}})}).call(this)},n.Un=function(t,i){var n=dr.ep([i]);this.uV.Zg(),this.uV=n;var r=this.Kpt(t,this.Ypt,n.Yg);return this.Ypt=r,r},n.Jpt=function(t){if(!Jn(this.Zpt,jw.CEA608)){var i=t.Zut.olt;if(function(t){return t.some(function(t){return t.x8===nU||t.x8===rU})}(i)){this.Fpt=new KF(this.iV);for(var n,r=function(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){var e=i.value;if(e.x8===nU)for(var s,u=Ft(fB(e.XE));!(s=u()).done;){var o=s.value;n.push(o)}else if(e.x8===rU)for(var h,a=Ft(tU(e.XE));!(h=a()).done;){var c=h.value;if(c.Sit<=4){var f=iU[c.Sit];n.push(io({},c,{Sit:f}))}}}return n}(i),e=Ft(r);!(n=e()).done;){var s=n.value;this.Fpt.$gt(s)}this.Ept.qW(this.Fpt.Z)}}},n.Kpt=function(t,i,n){return jt(function(){return zt(this,function(r){switch(r.label){case 0:return pr(n),i?[4,i.catch(pn)]:[3,2];case 1:r.sent(),r.label=2;case 2:return this.Rlt===t&&this.$pt?[2]:[4,this.tmt()];case 3:return r.sent(),pr(n),[4,this.Gpt()];case 4:return r.sent(),pr(n),t?[4,this.oV(t)]:[3,6];case 5:r.sent(),r.label=6;case 6:return[2]}})}).call(this)},n.tmt=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=this.Rlt,this.Rlt=void 0,this.$pt=!1,this.Ipt=void 0,t&&(t.mn(Fg.RI,this.imt),t.Ilt(!1),t.mn(Fg.NO_QUALITY,this.Rs)),this.emt&&(this.emt.kn(),this.emt=void 0),this.Nlt?[4,this.Nlt.kn()]:[3,2];case 1:i.sent(),this.Nlt=void 0,i.label=2;case 2:return this.Fpt?(this.Ept.XW(this.Fpt.Z),[4,this.Fpt.kn()]):[3,4];case 3:i.sent(),i.label=4;case 4:return[2]}})}).call(this)},n.oV=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Rlt=t,this.Jpt(t),t.wn(Fg.RI,this.imt),t.wn(Fg.NO_QUALITY,this.Rs),[4,this.jpt(t)];case 1:return i.sent(),this.Nlt=this.smt(t),this.Nlt.wn(kU,this.Rs),this.Nlt.wn("zot",this.Bpt),this.Nlt.Jot=t.Alt,this.emt=new oU(this.PL,this.Nlt),this.emt.wn(Fg.II,this.glt),t.Ilt(!0),this.$pt=!0,[2]}})}).call(this)},n.smt=function(t){return new bL(this,this.PL,this.PL,this.aV,this.Mz,this.rlt,this.Sut,this.cdt,this.ndt,this.ldt,this.Ndt,this.pq).jet(t)},n.hr=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.uV.Zg(),this.Ypt?[4,this.Ypt.catch(pn)]:[3,2];case 1:i.sent(),this.Ypt=void 0,i.label=2;case 2:return[4,this.tmt()];case 3:return i.sent(),t?[3,5]:[4,this.Gpt()];case 4:i.sent(),i.label=5;case 5:return[4,this.Xpt()];case 6:return i.sent(),[2]}})}).call(this)},n.nmt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.tmt()];case 1:return t.sent(),[2]}})}).call(this)},n.vlt=function(t){var i;null==(i=this.kpt)||i.vlt(t)},n.dlt=function(t,i){return jt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,this.wat()];case 1:if(o.sent(),null==(n=this.kpt)||n.dlt(i),!((e=null==(r=this.Nlt)?void 0:r.Kot.mct.dct(t))&&e.V>0))return[3,5];s=0,o.label=2;case 2:return s=t.Zut.Oct.An?A.max(i,this.An):i;return e=A.max(r,e),LA.nL(r,e).MM()}},{key:"ZW",get:function(){return this.sct.iL(this.zx)}},{key:"act",get:function(){return this.Rpt.act}},{key:"zx",get:function(){return this.PL.zx}},{key:"Tn",get:function(){return this.Rlt?this.Rlt.Zut.Oct.Tn:NaN}},{key:"An",get:function(){var t=this.Dpt(),i=this.Ipt;return void 0===t?NaN:void 0!==i?i:t}},{key:"Mi",get:function(){return this.Rpt.Mi}},{key:"Ti",get:function(){return this.Rpt.Ti}},{key:"Npt",get:function(){return this.Ipt}}]),i}(uh);function AU(t,i,n,r){var e,s,u=i.qM(t.MM());return 0===(u=u.qM(n.qM(i))).V?s=e=r.RO:(e=u.Tn(0),s=u.An(0)),{qdt:e,zdt:s}}var TU=0;var SU=function(t){function i(i,n,r,e,s,u,o,h,a,c,f,v,d,l){var g,w,m;return(g=t.call(this)||this).yO=void 0,g.tO=new fw,g.sO=new fw,g.Gl=void 0,g.iV=void 0,g.fmt=void 0,g.aV=void 0,g.Mz=void 0,g.Sut=void 0,g.PL=void 0,g.lmt=void 0,g.Cmt=[],g.Pmt=new dr,g.Tmt=!0,g.Zlt=[],g.ymt=void 0,g.pq=void 0,g.Ypt=void 0,g.Ndt=void 0,g.Zpt=void 0,g.w3=void 0,g.rlt=void 0,g.ju=void 0,g.Opt=void 0,g._mt=void 0,g.mmt=_n(function(){g.So(new hC(g.zx))},350),g.Dmt=function(t){var i=t.zmt.kpt;if(i)for(var n,r=Ft(g.Cmt);!(n=r()).done;){var e,s=n.value;s.kpt&&s.kpt!==i&&s.Km===(null==(e=i.plt)?void 0:e.Km)&&(s.mn("Rmt",g.Dmt),s.kpt.Rt=!1,s.wn("Rmt",g.Dmt))}g.Rs(t)},g.Lmt=function(t){mr(t)||g.So(new Cb(kd(t,pd.MEDIA_LOAD_ERROR)))},g.kmt=function(t){var i=t.J6;i&&g.Omt(i).catch(g.Lmt)},g.Gmt=function(t){g.Fmt(t).catch(g.Lmt)},g.xmt=function(t){for(var i,n=Ft(g.Zlt);!(i=n()).done;){var r=function(){var i=s.value,n=i.NW;if(void 0===n||0===n.length)return"continue";var r=t.Py;n.filter(function(t){return t.P8&&Ma(new I(r),new I(t.P8))}).forEach(function(t){i.Xmt(t)})},e=i.value.kpt;if(void 0!==e)for(var s,u=Ft(e.xat);!(s=u()).done;)r()}},g.Emt=function(t){var i=t.J6;if(i)for(var n,r=Ft(g.Mmt);!(n=r()).done;)for(var e,s=n.value,u=Ft(s.Zut.xat);!(e=u()).done;){var o=e.value,h=(o.NW||[]).some(function(t){return t.fH&&Ma(Ea(i),sI(t.fH))});o.Plt&&h&&(o.Plt=!1,o.qot&&s.vlt(o.qot))}},g.aV=r,g.Mz=e,g.Sut=s,g.PL=i,g.yO=Cw(),g.Cmt=[],g.lmt=o,g.ymt=h,g.pq=l,g.iV=c,g.fmt=new LL(i,r,e,s,c,null==(m=null==u||null==(w=u.dash)?void 0:w.segmentRelativeVttTiming)||m),g.Gl=new Fb([g.fmt.nt]),g.Ndt=v,g.Zpt=d,g.lmt.wn(vM.Vot,g.Rs),g.ju=a,g.w3=n,g.rlt=u.lowLatency,g.Opt=f,g._mt=u.abr,g.PL.wn(ch.yy,g.kmt),g.PL.wn(ch.xw,g.Emt),g.PL.wn(ch.LICENSE_REQUEST_GENERATED,g.xmt),g}Pt(i,t);var n=i.prototype;return n.GY=function(t,i){return this.umt(t,i)},n.umt=function(t,i){return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:for(n=Ft(t);!(r=n()).done;)e=r.value,this.cmt(e);return[4,this.Un(i)];case 1:h.sent(),s=Ft(this.lmt.dmt),h.label=2;case 2:return(u=s()).done?[3,6]:(o=u.value).Km!==vw.LT?[3,5]:o.xat&&0!==o.xat.length?[3,3]:(this.So(new FL("No supported representation found in the AdaptationSet with mimetype : "+o.Km)),[3,5]);case 3:return[4,this.fmt.oV(o)];case 4:h.sent(),h.label=5;case 5:return[3,2];case 6:return[2]}})}).call(this)},n.vmt=function(t){return new bU(t,this,this.PL,this.aV,this.Mz,this.Sut,this.iV,this.Opt,this._mt,this.Ndt,this.Zpt,this.rlt,this.pq)},n.dat=function(){return this.Zlt.some(function(t){return t.dat()})},n.hct=function(){return 0!==this.Zlt.length&&this.Zlt.every(function(t){return t.hct()})},n.Bpt=function(){this.gmt()&&this.So(new jL)},n.Qpt=function(t){if(Qv(t)){if(this.w3.e4)return this.w3.e4}else if(Yv(t)&&this.w3.s4)return this.w3.s4;throw new y("Cannot allocate source buffer for mime type "+t)},n.pmt=function(t){t.wn([ty.ma,ch.Yw,ch.ey,ch.iy,ch.ly,ch._y,ch.Sw],this.Rs),t.wn(tC.pZ,this.mmt),t.wn("amt",this.Rs)},n.wmt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,ot.all(this.Zlt.map(function(i){return i.kn(t)}))];case 1:return i.sent(),tr(this.Zlt),[2]}})}).call(this)},n.gmt=function(){if(this.dat())return!1;if(!this.hct())return!1;var t=this.Fx;if(0===t.V)return!1;var i=this.zx;if(this.bmt)return t.Tn(t.V-1)<=i;var n=t.Mn(this.act);if(0===n.V)return!0;var r=n.Tn(n.V-1),e=n.An(n.V-1)+.1;return r<=i&&i<=e},n.wat=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Tmt?[2]:(this.Tmt=!0,[4,ot.all(this.Zlt.map(function(i){return i.wat(t)}))]);case 1:return i.sent(),[2]}})}).call(this)},n.bat=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Tmt?(this.Tmt=!1,[4,ot.all(this.Zlt.map(function(i){return i.bat(t)}))]):[2];case 1:return i.sent(),[2]}})}).call(this)},n.kn=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.PL.mn(ch.yy,this.kmt),this.PL.mn(ch.xw,this.Emt),this.PL.mn(ch.LICENSE_REQUEST_GENERATED,this.xmt),this.Vo(),this.lmt.mn(vM.Vot,this.Rs),this.Pmt.Zg(),this.Ypt?[4,this.Ypt.catch(pn)]:[3,2];case 1:i.sent(),this.Ypt=void 0,i.label=2;case 2:return[4,this.wmt(t)];case 3:return i.sent(),[4,this.fmt.kn()];case 4:return i.sent(),this.tO.kn(),this.sO.kn(),this.Gl.kn(),this.Imt(),[2]}})}).call(this)},n.cmt=function(t){this.Cmt.push(t),t.wn("Rmt",this.Dmt);for(var i,n=t.Km===vw.Bk?this.tO:this.sO,r=Ft(t.Z);!(i=r()).done;){var e=i.value;n.tt(e)}},n.Nmt=function(t){for(var i,n=t.Km===vw.Bk?this.tO:this.sO,r=Ft(t.Z);!(i=r()).done;){var e=i.value;n.it(e),e.kn()}t.kn(),Yn(this.Cmt,t)},n.Imt=function(){for(var t=this.Cmt.length-1;t>=0;t--)this.Nmt(this.Cmt[t])},n.Un=function(t,i){return this.Pmt.Zg(),this.Pmt=dr.ep([i]),this.Ypt=br(this.vE(t,this.Ypt,this.Pmt.Yg),this.Pmt).catch(this.Lmt),this.Ypt},n.vE=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:return i?[4,i.catch(pn)]:[3,2];case 1:l.sent(),l.label=2;case 2:pr(n),r=[],e=this.Zlt.slice(),s=t.slice(),tr(this.Zlt),u=Ft(e),l.label=3;case 3:return(o=u()).done?[3,7]:(h=o.value,(a=h.kpt)&&Jn(s,a)?(this.Zlt.push(h),r.push(h.Un(a,n)),Yn(s,a),[3,6]):[3,4]);case 4:return this.Gl.XW(h.nt),[4,h.kn()];case 5:l.sent(),pr(n),l.label=6;case 6:return[3,3];case 7:for(c=Ft(s);!(f=c()).done;)v=f.value,d=this.vmt(v.iat),this.Gl.qW(d.nt),this.Zlt.push(d),this.pmt(d),r.push(d.Un(v,n));return[4,ot.all(r)];case 8:return l.sent(),[2]}})}).call(this)},n.RZ=function(t,i,n){return jt(function(){return zt(this,function(r){switch(r.label){case 0:return this.w3===n?[3,2]:(this.w3=n,[4,this.wmt(!1)]);case 1:r.sent(),r.label=2;case 2:return[4,this.Un(t)];case 3:return r.sent(),this.ymt=i,[2]}})}).call(this)},n.Omt=function(t){return jt(function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:i=Ft(this.Zlt),a.label=1;case 1:if((n=i()).done)return[3,6];if(r=n.value,void 0===(e=r.kpt))return[3,5];s=Ft(e.Zut.xat),a.label=2;case 2:return(u=s()).done?[3,5]:(o=u.value,h=o.NW||[],!h.some(function(i){return i.fH&&Ma(Ea(t),sI(i.fH))})||o.Plt?[3,4]:(o.Plt=!0,[4,r.dlt(o,o.qot)]));case 3:a.sent(),this.So(new mN(new lw(pd.CONTENT_PROTECTION_OUTPUT_RESTRICTED,"Content unavailable due to DRM restrictions"))),a.label=4;case 4:return[3,2];case 5:return[3,1];case 6:return[2]}})}).call(this)},n.Fmt=function(t){return jt(function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:i=Ft(this.Zlt),a.label=1;case 1:if((n=i()).done)return[3,6];if(e=function(){var i,n,e,u;return zt(this,function(o){switch(o.label){case 0:return i=h.value,n=i.NW,e=i.qot,void 0===n||0===n.length||void 0===e?[2,"continue"]:n.some(function(t){return Jn(i.Umt,t)})?(u=r.Vmt(n,t.xy),e.xst===u?[3,3]:u?(s.vlt(e),[3,3]):[3,1]):[2,"continue"];case 1:return[4,s.dlt(i,e)];case 2:o.sent(),o.label=3;case 3:return[2]}})},s=n.value,void 0===(u=s.kpt))return[3,5];o=Ft(u.xat),a.label=2;case 2:return(h=o()).done?[3,5]:(r=this,[5,qt(e())]);case 3:a.sent(),a.label=4;case 4:return[3,2];case 5:return[3,1];case 6:return[2]}})}).call(this)},n.Vmt=function(t,i){var n=!1,r=t.reduce(function(t,i){return!i.fH||Jn(t,i.fH)?t:[].concat(t,[i.fH])},[]);return 0===r.length||(i.Xy(function(e,s){"usable"===e&&((t.some(function(t){return t.fH&&Ma(Ea(s),sI(t.fH))})||La(s,za)&&1===r.length&&1===i.Wy)&&(n=!0))}),n)},n.Aat=function(t){var i=function(){var i=r.value,n=Wn(t.Zlt,function(t){return t.V3===i.V3});void 0!==n&&i.Aat(n)};if(void 0!==t){var n=t.lmt;if(this.lmt.Hmt===n||this.lmt.Wmt===n)for(var r,e=Ft(this.Zlt);!(r=e()).done;)i()}},xt(i,[{key:"JI",get:function(){return this.yO}},{key:"ct",get:function(){return this.PL.ct}},{key:"Rt",get:function(){return this.Zlt.some(function(t){return t.Rt})}},{key:"ht",get:function(){return this.tO}},{key:"Fx",get:function(){if(0===this.Zlt.length)return LA.rL();for(var t,i=this.Zlt.map(function(t){return t.Fx}),n=LA.nL(0,1/0),r=Ft(i);!(t=r()).done;){var e=t.value;n=n.Mn(e)}if(0===n.V)return n;if(this.hct()){var s=n.Mn(this.act);if(0===s.V)return n;for(var u,o=s.An(s.V-1),h=0,a=Ft(this.Zlt);!(u=a()).done;){var c=u.value;h=A.max(h,c.Npt)}o<=h&&(n=n.HM(new LA([o,h],[!0,!0])))}return n}},{key:"T8",get:function(){return this.PL.T8}},{key:"zx",get:function(){return this.PL.zx}},{key:"Wpt",get:function(){return this.ymt}},{key:"An",get:function(){if(this.bmt){var t=this.ct;if(!E(t)&&t!==In)return t}if(!this.Zlt.length)return NaN;for(var i,n=0,r=Ft(this.Zlt);!(i=r()).done;){var e=i.value;n=A.max(n,e.An)}return n}},{key:"bmt",get:function(){var t=this.lmt.jdt;if(t.Km===UL.SV)return!1;var i=t.Amt;return 0!==i.length&&this.lmt===i[i.length-1]}},{key:"kP",get:function(){if(!this.Zlt.length)return LA.rL();for(var t,i=LA.hL(),n=Ft(this.Zlt);!(t=n()).done;){var r=t.value;i=i.Mn(r.kP)}if(i.V>0&&this.bmt&&isFinite(this.ct)){var e=this.ct,s=i.An(i.V-1);e>s&&(i=i.HM(LA.nL(s,e).MM()))}return i}},{key:"Mc",get:function(){return this.lmt}},{key:"nt",get:function(){return this.Gl}},{key:"rt",get:function(){return this.sO}},{key:"Ti",get:function(){return this.ju.Ti}},{key:"Mi",get:function(){return this.ju.Mi}},{key:"ZW",get:function(){var t=this.zx,i=this.Fx,n=i.zM(t);if(-1!==n)return{Tn:i.Tn(n),An:i.An(n)}}},{key:"act",get:function(){var t=this.lmt.Tn,i=this.bmt?1/0:this.lmt.An;return LA.nL(t,i)}},{key:"Smt",get:function(){return this.Tmt}},{key:"Bmt",get:function(){return this.Cmt.map(function(t){return t.kpt}).filter(Fi)}},{key:"Mmt",get:function(){return this.Zlt.map(function(t){return t.kpt}).filter(Fi)}},{key:"qmt",get:function(){return this.Cmt}}]),i}(uh);V(),It(),Wt(),Bt(),Yt(),V(),It(),Ut(),V(),It(),Bt();var EU=/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d*\.?\d*)S)?)?$/,IU=function(){function t(t){this.jmt=void 0,this.jmt=t}var i=t.prototype;return i.Qmt=function(){return this.jmt},i.Kmt=function(){return 1e3*this.jmt},t.PD=function(i){var n=i.match(EU);if(!n)throw new y("The given value could not be parsed as a valid DateTimeInterval");return new t(31536e3*(Number(n[1])||0)+2592e3*(Number(n[2])||0)+86400*(Number(n[3])||0)+3600*(Number(n[4])||0)+60*(Number(n[5])||0)+(Number(n[6])||0))},xt(t,[{key:"wft",get:function(){return Im.hU(this.jmt,1e3)}}]),t}();V(),It();var RU=function(t){return t.Ymt="progressive",t.Jmt="interlaced",t.yk="unknown",t}({});V(),It();var CU=function(){function t(t,i){this.Zmt=void 0,this.$mt=void 0,this.Zmt=t,this.$mt=i}return t.prototype.rF=function(){return this.Zmt/this.$mt},t}();V(),It();var PU=1886614376;function DU(t){var i=sI(mo),n=t.byteLength,r=12+i.length+4+n,e=new I(r),s=Aa(e),u=new Pa;return Jh(s,u,r),Jh(s,u,PU),Jh(s,u,0),qh(s,u,i),Jh(s,u,n),qh(s,u,new I(t)),e.buffer}var NU=/^(?:true|false)$/i,xU=/^(-?)(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:Z|([+-])(\d{2}):(\d{2}))?$/;function BU(t){if(void 0!==t)return IU.PD(t)}function OU(t){if(void 0!==t){var i=t.match(xU);if(!i)throw new y("The given value could not be parsed as a valid Date");var n=i[1],r=i[2],e=i[3],s=i[4],u=i[5],o=i[6],h=i[7],a=i[8],c=i[9],f=i[10],v=i[11],d=("-"===n?-1:1)*Number(r),l=Number(e)-1,g=Number(s),w=Number(u),m=Number(o),p=Number(h),_=Number("0."+(a||"")),k=A.round(1e3*_);if(c)m-=("-"===c?-1:1)*(60*Number(f)+Number(v));var b=new Date(Date.UTC(d,l,g,w,m,p,k));if(E(b.getTime()))throw new y("The given value could not be parsed as a valid Date");return b}}function MU(t){if(t){var i=/(\d+)-(\d+)/.exec(t);if(i)return[FU(i[1]),FU(i[2])]}}function LU(t){if(void 0!==t){if(!E(Number(t)))try{return fe.fromString(t,!0)}catch(t){}throw new y("The given value could not be parsed as a valid unsigned long")}}function FU(t){if(void 0!==t){var i=Number(t);if(!E(i))return i;throw new y("The given value could not be parsed as a valid Number")}}function UU(t){if(void 0!==t){var i=t.split("/"),n=Number(i[0]),r=Number(i[1]||1);if(!E(n)&&!E(r))return new CU(n,r);throw new y("The given value could not be parsed as a valid frame rate")}}function VU(t){if(void 0!==t){if(NU.test(t))return"true"===t.toLowerCase();if(!E(T(t)))return Boolean(T(t));throw new y("The given value could not be parsed as a valid Boolean.")}}function jU(t){return{Yu:t.hx,twt:VU(t.ox("availabilityTimeComplete")),iwt:FU(t.ox("availabilityTimeOffset"))}}function HU(t){return t.map(jU)}function WU(t){var i,n=ZU(t),r=function(t,i,n,r){var e=t.ux(n,i);return void 0===e&&(e=t.ox(r+":"+i)),e}(t,"default_KID","urn:mpeg:cenc:2013","cenc"),e=Op(t,"pssh","urn:mpeg:cenc:2013","cenc")[0];if(void 0!==e&&(i=ja(e.hx)),!i){var s=Op(t,"pro","urn:microsoft:playready","mspr")[0];void 0!==s&&(i=function(t){var i=ja(t.hx);return DU(i)}(s))}return{fH:r,P8:i,x8:n.x8,XE:n.XE}}function zU(t){return{ewt:t.ox("sourceURL"),Wat:MU(t.ox("range"))}}function qU(t,i){var n=t.ox("d"),r=t.ox("t"),e=FU(t.ox("r"));i.push({ct:n,CO:r,swt:e})}function XU(t){return{Put:t.ox("index"),nwt:MU(t.ox("indexRange")),$D:t.ox("media"),rwt:MU(t.ox("mediaRange"))}}function GU(t){var i=YU(t),n=function(t){var i=t.map(XU);return i.length>0?i:void 0}(t.ZE("SegmentURL"));return io({},i,{hwt:n,owt:t.ox("xlink:href"),awt:t.ox("xlink:actuate")})}function QU(t){var i=VU(t.ox("availabilityTimeComplete")),n=FU(t.ox("availabilityTimeOffset")),r=MU(t.ox("indexRange")),e=VU(t.ox("indexRangeExact")),s=t.ZE("Initialization");if(s.length>1)throw new y("The provided MPEG-DASH document's "+t.$E+" element can not have more than one Initialization element.");var u=1===s.length?zU(s[0]):void 0,o=LU(t.ox("presentationTimeOffset")),h=t.ZE("RepresentationIndex");if(h.length>1)throw new y("The provided MPEG-DASH document's "+t.$E+" element can not have more than one RepresentationIndex element.");return{twt:i,iwt:n,nwt:r,uwt:e,cwt:u,dwt:o,lwt:1===h.length?zU(h[0]):void 0,fwt:BU(t.ox("timeShiftBufferDepth")),jD:FU(t.ox("timescale"))}}function YU(t){var i=QU(t),n=t.ZE("BitstreamSwitching"),r=n.length>0?zU(n[0]):void 0,e=FU(t.ox("duration")),s=t.ZE("SegmentTimeline");if(s.length>1)throw new y("The provided MPEG-DASH document's "+t.$E+" element can not have more than one SegmentTimeline element.");var u=1===s.length?function(t){for(var i,n=[],r=Ft(t.ZE("S"));!(i=r()).done;)qU(i.value,n);return n}(s[0]):void 0;return io({},i,{vwt:r,ct:e,mht:u,_wt:FU(t.ox("startNumber")),gwt:FU(t.ox("endNumber"))})}function $U(t){return{mwt:function(t){if(t){var i=t.split(/\s/);return i.length>1?(i.length=2,i.map(FU)):1===i.length?i.map(FU)[0]:void 0}}(t.ox("audioSamplingRate")),Rrt:t.ox("codecs"),wwt:VU(t.ox("codingDependency")),NW:function(t){if(0!==t.length)return t.map(WU)}(t.ZE("ContentProtection")),ywt:function(t){return t.map(tV)}(t.ZE("EssentialProperty")),bwt:function(t){return t.map(iV)}(t.ZE("SupplementalProperty")),Olt:UU(t.ox("frameRate")),Mi:FU(t.ox("height")),Awt:FU(t.ox("maxPlayoutRate")),Swt:FU(t.ox("maximumSAPPeriod")),lQ:t.ox("mimeType"),Twt:t.ox("profiles"),kwt:t.ox("sar"),Ewt:function(t){switch(t){case RU.Ymt:case RU.Jmt:case RU.yk:return t;default:return}}(t.ox("scanType")),xwt:t.ox("segmentProfiles"),Pwt:FU(t.ox("startWithSAP")),Ti:FU(t.ox("width"))}}function KU(t){var i=HU(t.ZE("BaseURL")),n=t.ZE("SegmentBase");if(n.length>1)throw new y("The provided MPEG-DASH document's "+t.WE+" element can not have more than one SegmentBase element.");var r=1===n.length?QU(n[0]):void 0,e=function(t){var i=t.map(GU);return i.length>0?i:void 0}(t.ZE("SegmentList")),s=t.ZE("SegmentTemplate");if(s.length>1)throw new y("The provided MPEG-DASH document's "+t.WE+" element can not have more than one SegmentTemplate element.");var u=1===s.length?function(t){return io({},YU(t),{Iwt:t.ox("bitstreamSwitching"),Cwt:t.ox("index"),Rwt:t.ox("initialization"),Dwt:t.ox("media")})}(s[0]):void 0;return{Nwt:i,Bwt:r,Mwt:e,Lwt:u}}function JU(t){var i=$U(t),n=KU(t),r=FU(t.ox("bandwidth")),e=t.ox("dependencyId"),s=t.ox("id"),u=t.ox("mediaStreamStructureId"),o=FU(t.ox("qualityRanking"));if(t.ZE("SegmentBase").length>1)throw new y("The provided MPEG-DASH document's Representation element can not have more than one SegmentBase element.");return io({},i,n,{IW:r,Owt:e,o:s,Fwt:u,Uwt:o})}function ZU(t){return{x8:t.ox("schemeIdUri"),XE:t.ox("value")}}function tV(t){return ZU(t)}function iV(t){return ZU(t)}function nV(t){return ZU(t)}function rV(t){return ZU(t)}function eV(t){var i,n=$U(t),r=KU(t),e=function(t){return t.map(rV)}(t.ZE("Accessibility")),s=VU(t.ox("bitstreamSwitching")),u=t.ox("contentType"),o=FU(t.ox("group")),h=FU(t.ox("id")),a=(null==(i=t.ZE("Label")[0])?void 0:i.hx)||"",c=t.ox("lang"),f=FU(t.ox("maxBandwidth")),v=UU(t.ox("maxFrameRate")),d=FU(t.ox("maxHeight")),l=FU(t.ox("maxWidth")),g=FU(t.ox("minBandwidth")),w=UU(t.ox("minFrameRate")),m=FU(t.ox("minHeight")),p=FU(t.ox("minWidth")),_=t.ox("par"),k=function(t){return t.map(JU)}(t.ZE("Representation"));if(0===k.length)throw new y("The provided MPEG-DASH document has an AdaptationSet with no valid Representation's");var b,A=function(t){return t.map(nV)}(t.ZE("Role")),T=VU(t.ox("segmentAlignment"))||!1,S=FU(t.ox("selectionPriority")),E=S||1,I=VU(t.ox("subsegmentAlignment"))||!1;try{b=FU(t.ox("subsegmentStartsWithSAP"))}catch(t){}return io({},n,r,{olt:e,vwt:s,GT:u,plt:o,o:h,Th:a,bs:c,Vwt:f,Hwt:v,Wwt:d,qwt:l,zwt:g,Gwt:w,Xwt:m,Qwt:p,Kwt:_,xat:k,Glt:A,Ywt:T,tz:E,Jwt:I,Zwt:b,$wt:t.ox("xlink:actuate")||"onRequest",tyt:t.ox("xlink:href")})}function sV(t){var i=LU(t.ox("presentationTime"))||fe.ZERO,n=LU(t.ox("duration")),r=FU(t.ox("id")),e=function(t){for(var i=t.nx,n={},r=0;r1)throw new y("The provided MPEG-DASH document's Period element can not have more than one AssetIdentifier element.");var r=1===n.length?function(t){return ZU(t)}(n[0]):void 0,e=function(t){return t.map(eV)}(t.ZE("AdaptationSet")),s=VU(t.ox("bitstreamSwitching")),u=BU(t.ox("duration")),o=function(t){return t.map(uV)}(t.ZE("EventStream")),h=t.ox("id"),a=BU(t.ox("start")),c=(t.ZE("Subset"),t.ox("xlink:href"));return io({},i,{jlt:e,iyt:r,vwt:s,ct:u,eyt:o,o:h,Tn:a,$wt:t.ox("xlink:actuate"),tyt:c})}function hV(t){var i=t.ox("schemeIdUri");if(i)return{x8:i,XE:t.ox("value")}}function aV(t,i){var n=OU(t.ox("availabilityEndTime")),r=OU(t.ox("availabilityStartTime")),e=HU(t.ZE("BaseURL")),s=t.ox("id"),u=function(t){return t.map(function(t){return""+t.hx})}(t.ZE("Location")),o=BU(t.ox("maxSegmentDuration")),h=BU(t.ox("maxSubsegmentDuration")),a=BU(t.ox("mediaPresentationDuration")),c=(t.ZE("Metrics"),BU(t.ox("minBufferTime")));if(!c)throw new y("The provided MPEG-DASH document's MPD element does not have the required 'minimumBufferTime' attribute.");var f=BU(t.ox("minimumUpdatePeriod")),v=function(t){return t.map(function(t){return oV(t)})}(t.ZE("Period"));if(!v.length)throw new y("The provided MPEG-DASH document's MPD element does not have the required 'Period' element.");var d=t.ox("profiles");if(!d)throw new y("The provided MPEG-DASH document's MPD element does not have the required 'profiles' attribute.");var l=OU(t.ox("publishTime")),g=BU(t.ox("suggestedPresentationDelay")),w=BU(t.ox("timeShiftBufferDepth")),m=function(t){switch(t){case UL.AV:case UL.SV:return t;default:return}}(t.ox("type")),p=function(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){var e=hV(i.value);e&&n.push(e)}return n}(t.ZE("UTCTiming")),_=function(t){if(0===t.length)return;var i=t[0],n=i.ZE("Latency");if(0===n.length)return;var r=function(t){var i=t[0],n=FU(i.ox("target"));if(void 0===n)return;var r=FU(i.ox("min")),e=FU(i.ox("max"));return{syt:n,iU:r,tU:e}}(n);if(void 0===r)return;var e=function(t){if(0===t.length)return;var i=t[0],n=FU(i.ox("max")),r=FU(i.ox("min"));return{iU:r,tU:n}}(i.ZE("PlaybackRate"));return{nyt:r,vP:e}}(t.ZE("ServiceDescription"));return{ryt:n,hyt:r,Nwt:e,o:s,oyt:u,ayt:i,uyt:o,cyt:h,dyt:a,lyt:c,fyt:f,Amt:v,Twt:d,vyt:l,_yt:g,fwt:w,Km:m,gyt:p,pyt:_}}var cV=function(){function t(){}return t.prototype.myt=function(t,i){return function(t,i){if(!t)throw new y("The provided MPEG-DASH document does not contain a valid MPD root element.");return aV(t,i)}(Vi.HE(t).mx,i)},t}();function fV(t){return{get bandwidth(){return t.IW},get codecs(){return t.Rrt},get id(){return t.o},get uid(){return t.JI},get name(){return t.Th},get averageBandwidth(){return t.wyt},get label(){return t.Th},set label(i){t.Th=tw(i)},get available(){return t.xst},get score(){return t.yyt},addEventListener:function(i,n){t.wn(i,n)},removeEventListener:function(i,n){t.mn(i,n)}}}function vV(t){return Wg(fV(t),{get height(){return t.Mi},get width(){return t.Ti},get frameRate(){return t.Olt},get firstFrame(){return t.byt}})}function dV(t){return Wg(fV(t),{get audioSamplingRate(){return t.mwt}})}V(),It(),Bt(),V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt(),V(),It(),V(),It(),Dt();var lV=function(t){function i(i){var n;return(n=t.call(this,"update")||this).quality=void 0,n.quality=i,n}return Pt(i,t),i}(ah),gV=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).o=void 0,u.IW=void 0,u.Rrt=void 0,u.Syt=void 0,u.JI=void 0,u.bO=void 0,u.Ayt=void 0,u.o=i,u.IW=n,u.Rrt=r,u.Syt=s,u.JI=Nw(),u.bO=e||"",u.Ayt=!0,u}Pt(i,t);var n=i.prototype;return n.ZU=function(){this.Ayt=!1,this.So(new lV(this.Ca))},n.JU=function(){this.Ayt=!0,this.So(new lV(this.Ca))},xt(i,[{key:"Th",get:function(){return this.bO},set:function(t){this.bO!==t&&(this.bO=t,this.So(new lV(this.Ca)))}},{key:"wyt",get:function(){}},{key:"xst",get:function(){return this.Ayt}},{key:"yyt",get:function(){}}]),i}(uh),wV=function(t){function i(i,n,r,e,s,u,o,h,a){var c;return void 0===a&&(a=0),(c=t.call(this,i,n,r,e,s)||this).Olt=void 0,c.Ti=void 0,c.Mi=void 0,c.byt=void 0,c.hu=void 0,c.Olt=u,c.Ti=o,c.Mi=h,c.byt=a,c.hu=void 0,c}return Pt(i,t),xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=vV(this)),this.hu}}]),i}(gV),mV=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,r,e,s)||this).mwt=void 0,o.hu=void 0,o.mwt=u,o.hu=void 0,o}return Pt(i,t),xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=dV(this)),this.hu}}]),i}(gV);V(),It(),V(),It(),Bt(),Dt();var pV=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).xyt=function(t){i.So(t)},i}return Pt(i,t),xt(i,[{key:"Tyt",get:function(){var t=this.kyt();return null==t?void 0:t.Tn}},{key:"Eyt",get:function(){var t=this.kyt();return null==t?void 0:t.An}}]),i}(uh),yV=function(t){function i(i,n){var r;if((r=t.call(this)||this).mat=void 0,r.hu=void 0,r.Pyt=void 0,r.Nyt=void 0,r.Ryt=void 0,r.Myt=!1,r.Lyt=!1,r.Cyt=[],r.mat=i,r.Pyt=n,r.Pyt.wn(vM.Fot,r.xyt),r.Km===vw.Mk){var e,s,u=null!=(s=null==(e=r.Olt)?void 0:e.rF())?s:NaN;r.Nyt=new wV(r.o,r.IW,r.Bp,"","",u,r.Ti,r.Mi)}else r.Km===vw.Bk?r.Nyt=new mV(r.o,r.IW,r.Bp,"","",r.mwt):r.Nyt=void 0;return r}Pt(i,t);var n=i.prototype;return n.Zct=function(t){var i=CM(t)?this.Pyt.Oyt(t):this.Pyt.Zct(t);return{Yu:i.Yu,Wat:i.Wat,Xk:this.jdt.Xk}},n.Fyt=function(){return this.Pyt.Fyt()},n.kyt=function(){return this.Pyt.kyt()},n.Uyt=function(){return this.Pyt.Uyt()},n.qct=function(t){return this.Pyt.qct(t)},n.Gct=function(t,i,n){return this.Pyt.Gct(t,this.jdt.Xk,i,n)},n.Mdt=function(t){return CM(t)?this.mht.Vyt(t,this.Pyt):this.mht.Mdt(t)},n.Lct=function(t){return CM(t)?this.mht.Hyt(t,this.Pyt):this.mht.Lct(t)},n.Xmt=function(t){Jn(this.Cyt,t)||this.Cyt.push(t)},n.kn=function(){this.Pyt.mn(vM.Fot,this.xyt),this.Cyt=[]},xt(i,[{key:"Zut",get:function(){return this.mat}},{key:"mwt",get:function(){var t;return null!=(t=this.Pyt.lk.mwt)?t:this.Zut.mwt}},{key:"IW",get:function(){return this.Pyt.lk.IW||0}},{key:"Rrt",get:function(){var t=this.Pyt.lk;return t.Rrt?[t.Rrt]:this.Zut.Rrt}},{key:"Iyt",get:function(){var t=this.Pyt.lk;return t.Rrt?[t.Rrt]:[]}},{key:"Bp",get:function(){return this.Pyt.lk.Rrt||this.Zut.Bp}},{key:"wwt",get:function(){return this.Pyt.lk.wwt||this.Zut.wwt}},{key:"NW",get:function(){return this.Pyt.lk.NW||this.Zut.NW}},{key:"Umt",get:function(){return this.Cyt}},{key:"GT",get:function(){return this.lQ+'; codecs="'+this.Bp+'"'}},{key:"ywt",get:function(){var t=this.Pyt.lk;return t.ywt.length?t.ywt:this.Zut.ywt}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{get id(){return t.o},get type(){return t.Km},get bandwidth(){return t.IW},get width(){return t.Ti},get height(){return t.Mi},get frameRate(){var i,n;return null!=(n=null==(i=t.Olt)?void 0:i.rF())?n:NaN},get audioSamplingRate(){return t.mwt}}}(this))}},{key:"Olt",get:function(){var t;return null!=(t=this.Pyt.lk.Olt)?t:this.Zut.Olt}},{key:"Mi",get:function(){return this.Pyt.lk.Mi||this.Zut.Mi}},{key:"o",get:function(){return this.Pyt.lk.o||""}},{key:"Jdt",get:function(){return this.Ryt},set:function(t){this.Ryt=t}},{key:"Ydt",get:function(){var t=this.Pyt.Dyt();if(t)return{Yu:t.Yu,Wat:t.Wat,Xk:this.jdt.Xk}}},{key:"Awt",get:function(){return this.Pyt.lk.Awt||this.Zut.Awt||1}},{key:"Swt",get:function(){return this.Pyt.lk.Swt||this.Zut.Swt}},{key:"jdt",get:function(){return this.Oct.jdt}},{key:"lQ",get:function(){return this.Pyt.lk.lQ||this.Zut.lQ}},{key:"Oct",get:function(){return this.Zut.Oct}},{key:"Twt",get:function(){return this.Pyt.lk.Twt||this.Zut.Twt}},{key:"qot",get:function(){return this.Nyt}},{key:"kwt",get:function(){return this.Pyt.lk.kwt||this.Zut.kwt}},{key:"Ewt",get:function(){return this.Pyt.lk.Ewt||this.Zut.Ewt}},{key:"Byt",get:function(){return this.Pyt.Byt}},{key:"xwt",get:function(){return this.Pyt.lk.xwt||this.Zut.xwt}},{key:"mht",get:function(){return this.Pyt.mht}},{key:"Pwt",get:function(){return this.Pyt.lk.Pwt||this.Zut.Pwt}},{key:"Km",get:function(){var t=this.lQ.split("/")[0];return"application"===t||"text"===t||wy(this.lQ,this.Rrt)?vw.LT:"video"===t?vw.Mk:"audio"===t?vw.Bk:"image"===t?vw.Lk:vw.yk}},{key:"Ti",get:function(){return this.Pyt.lk.Ti||this.Zut.Ti}},{key:"Hct",get:function(){return this.Myt},set:function(t){this.Myt=t}},{key:"Plt",get:function(){return this.Lyt},set:function(t){this.Lyt=t}}]),i}(pV),_V=function(t){function i(i,n){var r;return(r=t.call(this)||this).Pyt=void 0,r.lmt=void 0,r.Slt=[],r.lmt=i,r.Pyt=n,r.Pyt.wn(vM.Fot,r.xyt),r}Pt(i,t);var n=i.prototype;return n.er=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return n=this,0!==this.Slt.length?[3,2]:(r=this.Pyt.xat.map(function(r){return n.qyt(r,t,i)}),e=this,[4,ot.all(r)]);case 1:e.Slt=s.sent().filter(Fi),s.label=2;case 2:return this.zyt(),[2]}})}).call(this)},n.qyt=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return r=new yV(this,t),[4,i(r)];case 1:return e=s.sent(),pr(n),e?[2,r]:[2,void 0]}})}).call(this)},n.zyt=function(){if(!this.Slt.length)throw new y("Detected an AdaptationSet without any supported Representations.")},n.kyt=function(){return this.Pyt.kyt()},n.Uyt=function(){return this.Pyt.Uyt()},n.kn=function(){this.Pyt.mn(vM.Fot,this.xyt);for(var t,i=Ft(this.Slt);!(t=i()).done;){t.value.kn()}tr(this.Slt)},xt(i,[{key:"olt",get:function(){return this.Pyt.lk.olt}},{key:"mwt",get:function(){var t;return null!=(t=this.Pyt.lk.mwt)?t:-1}},{key:"Rrt",get:function(){if(this.Pyt.lk.Rrt)return[this.Pyt.lk.Rrt];for(var t,i=[],n=Ft(this.xat);!(t=n()).done;){var r=t.value;r.Iyt.length&&-1===i.indexOf(r.Bp)&&i.push(r.Bp)}return i}},{key:"Bp",get:function(){return this.Rrt.join()}},{key:"wwt",get:function(){return this.Pyt.lk.wwt}},{key:"NW",get:function(){return this.Pyt.lk.NW}},{key:"GT",get:function(){return this.lQ+'; codecs="'+this.Bp+'"'}},{key:"ywt",get:function(){return this.Pyt.ywt}},{key:"bwt",get:function(){return this.Pyt.bwt}},{key:"Olt",get:function(){return this.Pyt.lk.Olt}},{key:"plt",get:function(){return this.Pyt.lk.plt}},{key:"Mi",get:function(){return this.Pyt.lk.Mi||0}},{key:"o",get:function(){return this.Pyt.lk.o}},{key:"Th",get:function(){return this.Pyt.lk.Th||""}},{key:"Awt",get:function(){return this.Pyt.lk.Awt}},{key:"Swt",get:function(){return this.Pyt.lk.Swt}},{key:"jdt",get:function(){return this.Oct.jdt}},{key:"lQ",get:function(){return this.Pyt.lk.lQ||this.Slt[0].lQ}},{key:"Oct",get:function(){return this.lmt}},{key:"Twt",get:function(){return this.Pyt.lk.Twt}},{key:"xat",get:function(){return this.Slt}},{key:"Glt",get:function(){return this.Pyt.lk.Glt||[]}},{key:"kwt",get:function(){return this.Pyt.lk.kwt}},{key:"Ewt",get:function(){return this.Pyt.lk.Ewt}},{key:"xwt",get:function(){return this.Pyt.lk.xwt}},{key:"tz",get:function(){return this.Pyt.lk.tz}},{key:"Pwt",get:function(){return this.Pyt.lk.Pwt}},{key:"Km",get:function(){var t=(this.Pyt.lk.GT||this.lQ).split("/")[0];return"application"===t||"text"===t||"subtitle"===t||wy(this.lQ,this.Rrt)?vw.LT:"video"===t?vw.Mk:"audio"===t?vw.Bk:"image"===t?vw.Lk:vw.yk}},{key:"Ti",get:function(){return this.Pyt.lk.Ti||0}},{key:"Tit",get:function(){return this.Pyt.lk.bs||""}},{key:"Vlt",get:function(){return this.Tyt}},{key:"Ult",get:function(){var t=this.Vlt,i=this.Eyt;if(void 0!==t&&void 0!==i){var n=A.min(i,this.jdt.Wyt);return A.max(t,n)}}}]),i}(pV);function kV(t,i){for(var n,r=[],e=Ft(i);!(n=e()).done;)for(var s,u=n.value,o=Ft(t);!(s=o()).done;){var h=s.value;r.push(Vi.Dh(h,u))}return r}V(),It(),Bt(),Dt(),Ut(),V(),It(),Bt(),Dt(),Ut(),V(),It(),Ut(),V(),It(),Bt(),Dt(),H(),V(),It(),Bt(),Dt(),H(),V(),It(),Dt(),V(),It(),Bt();var bV=function(){function t(t,i){this.lmt=void 0,this.ubt=void 0,this.Jb=void 0,this.obt=void 0,this._bt=void 0,this.lmt=t,this.ubt=i,this.Jb=i.jD,this.obt=i.iwt,this._bt=i.dwt}var i=t.prototype;return i.Gyt=function(t){var i=t-this.lmt.Tn;if(!(i<0||i>=this.lmt.ct)){var n=this.Xyt();return void 0!==n&&Pn(n,i,1e-5)?this.jyt():this.Qyt(i)}},i.Wct=function(t){var i=t-this.lmt.Tn;if(!(i<0))return this.Kyt(A.min(i,this.lmt.ct))},i.jyt=function(){return this.Yyt(0)},i.Jyt=function(){var t=this.lmt.ct;if(isFinite(t))return this.Kyt(t)},i.Fyt=function(t){if(this.lmt.tbt.Km===UL.SV){if(this.Zyt){var i=this.jyt(),n=this.ibt();if(void 0===i||void 0===n)return;return{ebt:t,sbt:i,nbt:n}}var r=this.rbt(t);if(!r)return;return{ebt:t,sbt:this.hbt(t),nbt:r}}var e=this.jyt();if(e)return{ebt:t,sbt:e,nbt:this.Jyt()}},i.Uyt=function(t,i){if(i){var n=this.Qdt(i.sbt),r=this.Kct(i.nbt);if(r){var e=this.Kdt(r);(!n||e.getTime()i.getTime();)n=this.Qct(n);if(n){var r=this.Qdt(n);if(r&&r.getTime()<=i.getTime()){var e=this.Qct(n);for(e&&this.nlt(e,i)&&(n=e);n;){if(this.Kdt(n).getTime()>i.getTime())return;if(this.nlt(n,i))break;n=this.Kct(n)}if(!n)return}return n}},i.nlt=function(t,i){if(this.Zyt)return!0;if(this.Kdt(t).getTime()>i.getTime())return!1;var n=this.Qdt(t);return!(n&&i.getTime()>=n.getTime())},i.cbt=function(t,i){if(this.Zyt)return!0;if(this.dbt(t).getTime()>i.getTime())return!1;var n=this.Qdt(t);return!(n&&i.getTime()>=n.getTime())},i.lbt=function(t,i,n){var r=ye(i,this.Jb)+this.lmt.Tn;return{Put:t,fbt:i,CO:r,ct:n,RO:r+n}},i.dbt=function(t){return this.lmt.tbt.Km===UL.SV?new Date(this.lmt.tbt.hyt.getTime()+1e3*(t.CO+t.ct)):this.lmt.tbt.hyt},i.Kdt=function(t){var i=this.dbt(t);return this.lmt.tbt.Km===UL.SV?new Date(i.getTime()-1e3*this.obt):i},i.Qdt=function(t){var i=1/0;if(this.lmt.tbt.Km===UL.SV){var n=this.ubt.fwt;n&&(i=this.dbt(t).getTime()+1e3*t.ct+n.Kmt())}var r=this.lmt.tbt.ryt;return r&&(i=A.min(i,r.getTime())),i===1/0?void 0:new Date(i)},i.vbt=function(t,i){return t.Put+i},i.qct=function(t){return!1},i.Gct=function(t,i,n,r,e){var s=this.gbt(t);if(!s)return ot.reject(new y("Invalid segment"));var u=this.pbt(s.Put,i);return u?ot.resolve(u):kr(this.mbt(s.Put,i,n,r),e)},i.pbt=function(t,i){},i.mbt=function(t,i,n,r){return ot.reject(new y("Not supported"))},i.Qct=function(t){var i=this.gbt(t);if(i)return this.Yyt(i.Put-1)},i.Kct=function(t){var i=this.gbt(t);if(i)return this.Yyt(i.Put+1)},i.gbt=function(t){var i=this.Yyt(t.Put);if(i&&i.CO===t.CO)return i;var n=this.Gyt(t.CO);return n&&n.CO===t.CO?n:void 0},i.wbt=function(t,i){var n=this.Xct(t);if(n&&this.qct(n.Put)){var r=this.pbt(n.Put,i);if(r)return r.wbt(t)}},i.Xct=function(t){return this.Yyt(t.ybt)},i.Mdt=function(t){var i=this.gbt(t);return!!i&&0===i.Put},i.Vyt=function(t,i){var n=this.wbt(t,i);return!!n&&0===n.xut},i.Lct=function(t){var i=this.gbt(t);if(!i)return!1;var n=this.Jyt();return!!n&&i.Put===n.Put},i.Hyt=function(t,i){var n=this.wbt(t,i);if(!n)return!1;var r=this.Jyt();if(!r||n.ybt!==r.Put)return!1;var e=this.pbt(n.ybt,i);return n.xut+1===e.V},i.zg=function(){},xt(t,[{key:"Zyt",get:function(){return this.lmt.tbt.$yt&&void 0!==this.ibt()}},{key:"EU",get:function(){return this.lmt.Tn-ye(this._bt,this.Jb)}},{key:"dwt",get:function(){return ye(this._bt,this.Jb)}}]),t}(),AV=function(t){function i(i,n){var r;(r=t.call(this,n,i)||this).Sbt=void 0,r.bbt=void 0;var e=i.Ebt,s=i.ct;if(void 0===e||void 0===s)throw new y("MultipleSegmentBase does not have a segment duration specified.");return r.bbt=e,r.Sbt=s,r}Pt(i,t);var n=i.prototype;return n.Yyt=function(t){if(!(t<0)){var i=this.bbt.multiply(t),n=ye(i,this.Jb),r=this.lmt.ct;if(!(n>=r)){var e=this.Abt();if(void 0!==e){if(t>e)return;if(t===e&&isFinite(r))return this.lbt(t,i,r-n)}return isFinite(r)&&n+this.Sbt>r?this.lbt(t,i,r-n):this.lbt(t,i,this.Sbt)}}},n.Xyt=function(){return 0},n.Qyt=function(t){var i=A.floor(t/this.Sbt),n=this.Abt();return void 0!==n&&i>=n?this.Yyt(n):this.Yyt(i)},n.Kyt=function(t){if(t>=this.lmt.ct){var i=A.ceil(this.lmt.ct/this.Sbt)-1,n=this.Abt();return void 0!==n&&i>=n?this.Yyt(n):this.Yyt(i)}return this.Qyt(t)},n.Abt=function(){var t,i=this.ubt.gwt;if(void 0!==i)return i-(null!=(t=this.ubt._wt)?t:1);var n=this.ubt.Tbt;return void 0!==n&&n>0?n-1:void 0},n.ibt=function(){if(isFinite(this.lmt.ct))return this.Jyt()},n.kbt=function(t,i){return this.bbt.multiply(t.Put+(i-1))},n.er=function(){},i}(bV);function TV(t,i,n){var r=i.length;if(0===r)return-1;for(var e=0,s=r-1,u=t.xbt(i[e]),o=t.Pbt(i[s]);e<=s&&t.Ibt(u,n)<=0&&t.Ibt(n,o)<0;){var h=e+A.floor(t.Cbt(n,u,o)*(s-e)),a=i[h],c=t.xbt(a),f=h+10)return ye(this.Dbt[0].CO,this.Jb)},n.Qyt=function(t){if(this.Bbt&&ye(this.Bbt.CO,this.Jb)<=t){var i=ye(this.Bbt.CO,this.Jb),n=ye(this.Bbt.ct,this.Jb),r=A.floor((t-i)/n);return this.Nbt(r)}if(this.Dbt.length>0&&Pn(t,ye(this.Dbt[0].CO,this.Jb),1e-5))return this.Dbt[0].yut;var e=SV(this.Dbt,fe.fromNumber(t*this.Jb));return e<0?void 0:this.Dbt[e].yut},n.Kyt=function(t){if(!this.Bbt&&this.Dbt.length>0){var i=this.Dbt[this.Dbt.length-1];if(function(t,i,n){return Vn(t,i,n)>=0}(t,ye(i.RO,this.Jb),1e-5))return i.yut}var n=this.Xyt();return n&&t=s)){var u=this.Dbt.length+t,o=A.min(ye(n,this.Jb),e+s);return this.lbt(u,r,o)}}},n.Mbt=function(t){return t.fbt.add(this._bt)},n.er=function(){var t=this.ubt.lk.mht;if(!t)throw new y("MultipleSegmentBaseTO does not have a SegmentTimeline specified.");this.Lbt(t)},n.Lbt=function(t){var i=this._bt;this.Obt(t,i);var n=this.Fbt(t);this.Ubt(t,i,n.Vbt,n.ybt)},n.Obt=function(t,i){var n=this.Dbt;if(0===t.length)tr(n);else{for(var r=t[0],e=0,s=ye(r.CO?fe.fromString(r.CO,!1).subtract(i):fe.ZERO,this.Jb);e0&&n.splice(0,e)}},n.Fbt=function(t){for(var i=this.Dbt,n=this.rpt,r=0,e=0;r=i.length)break;if(i[u].CO.greaterThanOrEqual(n))break;if(i[e].yut.Put===e)e=u+1;else for(;e<=u;)i[e].yut.Put=e,e++;0,r++}return{Vbt:r,ybt:e}},n.Ubt=function(t,i,n,r){for(var e,s=this.Dbt,u=n,o=r;u0){var v=s[o-1];v.RO.greaterThan(f)&&(v.ct=f.subtract(v.CO),v.RO=v.CO.add(v.ct))}}else f=o>0?s[o-1].RO:fe.ZERO;if(c<0){if(u+1===t.length){e={CO:f,ct:a};break}for(var d=fe.fromString(t[u+1].CO,!1).subtract(i);f.lessThan(d);){var l=f.add(a);this.Hbt(s,o,f,a,l),f=l,o++}}else for(var g=o+c;o<=g;){var w=f.add(a);this.Hbt(s,o,f,a,w),f=w,o++}u++}o0&&(this.rpt=s[s.length-1].CO),this.Bbt=e},n.Hbt=function(t,i,n,r,e){if(i=0&&t0){var n=this.Jbt[0];if(i<=ye(n.CO,this.jD))return this.Zbt(n)}var r=SV(this.Jbt,fe.fromNumber(i*this.jD));if(!(r<0))return this.Zbt(this.Jbt[r])},n.zct=function(t){var i=this.$bt(t),n=Qn(this.Jbt,-1);return void 0!==n&&i>=ye(n.RO,this.jD)?this.Zbt(n):this.Ybt(t)},n.Zbt=function(t){var i=ye(t.CO,this.jD)-this.dwt,n=i+this.tAt,r=ye(t.ct,this.jD);return{ybt:this.ybt,xut:t.Put,CO:n,fbt:fe.fromNumber(i*this.jD),ct:r,RO:n+r,iAt:[t.eAt,t.sAt]}},n.$bt=function(t){return t-this.tAt+this.dwt},xt(i,[{key:"V",get:function(){return this.Jbt.length}}]),i}(OV);V(),It(),Ut(),V(),It(),V(),It(),Ut();var LV=function(){function t(t){this.lk=void 0,this.$R=void 0,this.lk=t,this.$R=new Pa}var i=t.prototype;return i.Egt=function(){return this.$R.ac7)throw new RangeError("Invalid EBML ID size");for(var i=0,n=0;n=1,"Incorrect log2 value"),zh(this.lk,this.$R,i)},t.aAt=function(t){if(8===t.length&&224&t[1])throw new _("EBML variable sized integer is too large");for(var i=0,n=0;n8)throw new RangeError("EMBL integer field size is too large");if(8===t&&224&this.cAt.getUint8(0))throw new RangeError("EMBL integer field value is too large");for(var i=0,n=0;n0?kV(t.Nwt.map(function(t){return t.Yu}),i):i.slice(),this.ubt&&(t.Lwt?this.ubt.er(t.Lwt):t.Mwt?this.ubt.er(t.Mwt[0]):t.Bwt&&this.ubt.er(t.Bwt))},n.kyt=function(){var t;return null==(t=this.PAt)?void 0:t.IAt},n.Uyt=function(){var t;return null==(t=this.PAt)?void 0:t.CAt},n.RAt=function(t){var i=this.DAt,n=this.Oct.ct,r=this.PAt,e=this.NAt(t);r&&Pn(n,i,1e-5)&&sj(r,e)||(this.DAt=n,this.PAt=e,this.So(new tj))},n.zg=function(){this.Vo(),this.ubt&&(this.ubt.zg(),this.ubt=void 0)},xt(i,[{key:"lk",get:function(){return this.Wp}},{key:"Nwt",get:function(){return this.TAt}}]),i}(uh);function nj(t){for(var i,n,r=Ft(t);!(n=r()).done;){var e=n.value.kyt();if(e){i=e.Tn;break}}if(void 0!==i){for(var s,u=t.length-1;u>=0;u--){var o=t[u].kyt();if(o){s=o.An;break}}if(void 0!==s)return{Tn:i,An:s}}}function rj(t){if(0!==t.length){for(var i,n=0,r=1/0,e=Ft(t);!(i=e()).done;){var s=i.value.kyt();if(!s)return;if((n=A.max(n,s.Tn))>=(r=A.min(r,s.An)))return}return{Tn:n,An:r}}}function ej(t){for(var i,n,r=Ft(t);!(n=r()).done;){var e=n.value.Uyt();e&&(!i||e.getTime()0?this.Rrt[0]:""}},{key:"Km",get:function(){return this.BAt[0].Km}},{key:"o",get:function(){return this.aS}},{key:"jdt",get:function(){return this.lmt.jdt}},{key:"lQ",get:function(){return this.BAt[0].lQ}},{key:"Oct",get:function(){return this.lmt}},{key:"xat",get:function(){return nr(this.jlt,function(t){return t.xat})}}]),i}(pV);V(),It(),Dt();var oj=function(t){function i(){return t.call(this,vM.Vot)||this}return Pt(i,t),i}(ah);function hj(t){for(var i,n=function(){var t=i.value,n=void 0,e=t.plt;void 0===e||(n=Wn(r,function(t){return t.o===e})),n||(n={o:e,jlt:[]},r.push(n)),n.jlt.push(t)},r=[],e=Ft(t);!(i=e()).done;)n();return r}V(),It(),Ut();var aj=function(t){function i(i,n){var r;return(r=t.call(this)||this).Pyt=void 0,r.BAt=[],r.MAt=[],r.OAt=void 0,r.LAt=!1,r.OAt=i,r.Pyt=n,r.Pyt.wn(vM.Fot,r.xyt),r}Pt(i,t);var n=i.prototype;return n.HAt=function(t,i){if(0!==this.MAt.length){for(var n,r=t,e=Ft(this.MAt);!(n=e()).done;){var s=n.value;if(dw(s.Km)){var u=s.Eyt;if(void 0===u)return;r=i(r,u)}}return r}},n.qAt=function(){this.LAt||(this.LAt=!0,this.So(new oj),this.kn())},n.er=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return 0!==this.BAt.length?[3,2]:[4,this.zAt(this.Pyt.jlt,t,i)];case 1:return n.sent(),this.GAt(this.BAt),pr(i),[3,4];case 2:return[4,this.XAt(t,i)];case 3:n.sent(),n.label=4;case 4:return[2]}})}).call(this)},n.zAt=function(t,i,n){return jt(function(){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:r=Ft(t),o.label=1;case 1:if((e=r()).done)return[3,6];s=e.value,u=new _V(this,s),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,u.er(i,n)];case 3:return o.sent(),this.BAt.push(u),[3,5];case 4:return yr(o.sent()),[3,5];case 5:return[3,1];case 6:return[2]}})}).call(this)},n.GAt=function(t){for(var i,n=Ft(hj(t));!(i=n()).done;){var r=i.value,e=new uj(this,r.o,r.jlt);this.MAt.push(e)}},n.XAt=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:n=Ft(this.BAt),e.label=1;case 1:return(r=n()).done?[3,4]:[4,r.value.er(t,i)];case 2:e.sent(),e.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},n.kyt=function(){return this.Pyt.kyt()},n.Uyt=function(){return this.Pyt.Uyt()},n.kn=function(){this.Vo(),this.Pyt.mn(vM.Fot,this.xyt);for(var t,i=Ft(this.MAt);!(t=i()).done;){t.value.kn()}for(var n,r=Ft(this.BAt);!(n=r()).done;){n.value.kn()}tr(this.BAt),tr(this.MAt)},xt(i,[{key:"jlt",get:function(){return this.BAt}},{key:"dmt",get:function(){return this.MAt}},{key:"iyt",get:function(){return this.Pyt.lk.iyt}},{key:"ct",get:function(){return this.Pyt.ct}},{key:"An",get:function(){return this.Tn+this.ct}},{key:"eyt",get:function(){return this.Pyt.lk.eyt||[]}},{key:"o",get:function(){return this.Pyt.o}},{key:"Hot",get:function(){return this.LAt}},{key:"jdt",get:function(){return this.OAt}},{key:"Wmt",get:function(){return this.OAt.FAt(this)}},{key:"Oct",get:function(){return this}},{key:"Hmt",get:function(){return this.OAt.UAt(this)}},{key:"VAt",get:function(){return this.HAt(1/0,A.min)}},{key:"WAt",get:function(){return this.HAt(0,A.max)}},{key:"Tn",get:function(){return this.Pyt.Tn}},{key:"Xk",get:function(){return this.jdt.Xk}}]),i}(pV);V(),It(),Dt();var cj=function(t){function i(){return t.call(this,ch.qw)||this}return Pt(i,t),i}(ah);V(),It(),Dt(),V(),It();var fj=function(t){return t.jAt="QAt",t}({}),vj=function(t){function i(){return t.call(this,fj.jAt)||this}return Pt(i,t),i}(ah);V(),It(),Bt(),Dt(),Ut(),V(),It(),Bt(),Dt(),Ut(),V(),It(),Bt(),Dt(),Ut(),V(),It(),Bt(),Dt();var dj=function(t){function i(i,n){var r;return(r=t.call(this,i,n,n.Nwt)||this).mat=void 0,r.KAt=void 0,r.mat=n,r.EAt(!0),r}Pt(i,t);var n=i.prototype;return n.qct=function(t){var i=this.lQ;return!(!$v(i)&&!Kv(i))&&this.mht.qct(t.Put)},n.Gct=function(t,i,n,r){return this.mht.Gct(t,this,i,n,r)},n.Dyt=function(){return this.Byt.Dyt(this)},n.Zct=function(t){return this.Byt.Zct(t,this)},n.Oyt=function(t){return this.Byt.Oyt(t,this)},n.Fyt=function(){return this.KAt},n.NAt=function(t){var i=this.mht,n=i.Fyt(t),r=n&&function(t,i){var n,r=t.sbt,e=t.nbt,s=t.ebt,u=r.CO,o=i.dbt(e);if(o.getTime()<=s.getTime())n=e.RO;else{var h=(o.getTime()-s.getTime())/1e3,a=A.max(e.ct-h,0);n=e.CO+a}return{Tn:u,An:n}}(n,i),e=this.mht.Uyt(t,n);return this.KAt=n,{ebt:t,IAt:r,CAt:e}},n.er=function(t){this.xAt(t,this.mat.Nwt)},xt(i,[{key:"Zut",get:function(){return this.mat}},{key:"Oct",get:function(){return this.mat.Oct}},{key:"tbt",get:function(){return this.mat.tbt}},{key:"lQ",get:function(){return this.Wp.lQ||this.mat.lQ}},{key:"Byt",get:function(){return this.kAt()}},{key:"mht",get:function(){return this.Byt.mht}}]),i}(ij),lj=function(t){function i(i,n){var r;return(r=t.call(this,i,n,n.Nwt)||this).lmt=void 0,r.Slt=void 0,r.lmt=n,r.EAt(!1),r.Slt=i.xat.map(function(t){return new dj(t,r)}),r}Pt(i,t);var n=i.prototype;return n.er=function(t){this.xAt(t,this.lmt.Nwt);var i=t.xat||[];if(this.Slt.length!==i.length)throw new y("Expected "+this.Slt.length+' representations in adaptation set "'+t.o+'", found '+i.length);for(var n=0;n0?kV(t.Nwt.map(function(t){return t.Yu}),u):u,this.hSt=t.oyt&&t.oyt.length>0?kV(t.oyt,this.TAt):[];var o=this.hSt.map(function(t){return t.href}),h=i.href;Jn(o,h)||(this.hSt.push(i),o.push(h));var a=this.dSt.href;Jn(o,a)||(this.hSt.push(this.dSt),o.push(a)),this.rSt=null==(e=t.dyt)?void 0:e.Qmt(),t.pyt&&(this.ZAt=new wj(t.pyt));var c=t.Km===UL.SV,f=function(t,i,n){for(var r=[],e=0;e0&&t[e-1].ct){u=r[e-1]+t[e-1].ct.Qmt()}else{if(0!==e||i)break;u=0}r.push(u)}for(var o=[],h=0;h0){var a=r.length-1,c=t[a],f=r[a],v=1/0;i||(v=c.ct?c.ct.Qmt():n-f),o.push({lk:c,Tn:f,ct:v})}return o}(t.Amt,c,this.rSt);this.lSt(f,s,c),this.RAt(n)},n.lSt=function(t,i,n){var r=this.oSt;if(0!==t.length){for(var e=t[0].lk.o,s=0;s0&&t.length>0){var h,a,c=null!=(h=yj(r[0].lk))?h:Im.SF,f=null!=(a=yj(t[0].lk))?a:Im.SF;if(f.hF(c)){var v=f.gF(c);void 0!==this.rSt&&(this.rSt+=v.rF());for(var d=0;d0)return this.oSt[i-1]},n.FAt=function(t){var i=this.oSt.indexOf(t);if(i>=0&&i+1t)return r}}},{key:"Twt",get:function(){return this.Pyt&&this.Pyt.lk.Twt}},{key:"vyt",get:function(){return this.Pyt&&this.Pyt.vyt}},{key:"VAt",get:function(){for(var t=this.oSt.length-1;t>=0;t-=1){var i=this.oSt[t].VAt;if(i)return i}}},{key:"Wyt",get:function(){var t=this.VAt;if(void 0!==t){var i=t-this.xSt;return A.max(i,this.kSt)}}},{key:"kSt",get:function(){for(var t,i=Ft(this.oSt);!(t=i()).done;){var n=t.value.Tyt;if(void 0!==n)return n}}},{key:"Xk",get:function(){return Boolean(this.PSt.Xk)}},{key:"xSt",get:function(){var t,i;if(this.PSt.ISt&&this.Km===UL.SV)return this.PSt.ISt;var n=null==(i=this.Pyt)||null==(t=i.lk._yt)?void 0:t.Qmt();return void 0!==n?n:this.Km===UL.SV?1.5*this.lyt.Qmt():0}},{key:"fwt",get:function(){return this.Pyt&&this.Pyt.fwt}},{key:"Km",get:function(){return this.Pyt?this.Pyt.Km:void 0}},{key:"pyt",get:function(){var t;return null==(t=this.Pyt)?void 0:t.pyt}}]),i}(uh),Dj=function(){function t(t,i,n,r,e){this.OAt=void 0,this.OAt=new Pj(t,i,n,r,e)}return xt(t,[{key:"jdt",get:function(){return this.OAt}}]),t}();V(),It(),Dt();var Nj=function(t){function i(){return t.call(this,ch.oy)||this}return Pt(i,t),i}(ah),xj=1e3,Bj=A.pow(2,31)-1,Oj=function(){function t(t,i,n,r,e){var s=this;this.YSt=void 0,this.Pyt=void 0,this.FSt=void 0,this.MSt=void 0,this.zSt=void 0,this.LSt=new dr,this.OSt=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),i=this.Pyt.jdt.Xdt(),[4,this.QSt(this.Pyt.jdt.oyt,t)];case 1:return n=e.sent(),[4,this.Pyt.jdt.er(n,i,t)];case 2:return e.sent(),[3,4];case 3:throw tg(r=e.sent())&&(this.Pyt.jdt.SSt(!1),this.Pyt.jdt.So(new Nj)),r;case 4:return[2]}})}).call(s)},this.YSt=r,this.Pyt=new Dj(t,i,n,this.LSt.Yg,e)}var i=t.prototype;return i.vE=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:this.Pyt.jdt.So(new aC),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.OSt(t)];case 2:return n.sent(),this.Pyt.jdt.SSt(!0),[3,4];case 3:throw yr(i=n.sent()),this.MSt=void 0,this.Pyt.jdt.SSt(!1),new y("The provided MPEG-DASH document could not be loaded - "+i.message);case 4:return this.FSt=this.USt(this.LSt.Yg),[2]}})}).call(this)},i.USt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:i.trys.push([0,4,,5]),i.label=1;case 1:return this.Pyt.jdt.Km!==UL.SV?[3,3]:[4,kr(this.VSt,t)];case 2:return i.sent(),[3,1];case 3:return[3,5];case 4:return i.sent(),[3,5];case 5:return[2]}})}).call(this)},i.WSt=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return pr(t),(i=this.qSt())>0?[4,Rr(A.min(i,Bj),t)]:[3,2];case 1:r.sent(),r.label=2;case 2:return r.trys.push([2,4,5,6]),[4,this.OSt(t)];case 3:return r.sent(),this.Pyt.jdt.SSt(!0),[3,6];case 4:throw n=r.sent(),new y("The provided MPEG-DASH manifest could not be loaded - "+n.message);case 5:return this.zSt=void 0,[7];case 6:return[2]}})}).call(this)},i.qSt=function(){var t=this.Pyt.jdt.Xdt().getTime()-this.Pyt.jdt.aSt.getTime();return this.Pyt.jdt.fyt-t},i.GSt=function(t){var i=this.Pyt.jdt.Uyt();if(i){var n=i.getTime()-t.getTime();if(n>0)return n}this.Pyt.jdt.RAt(t);var r=this.Pyt.jdt.Uyt();return r?r.getTime()-t.getTime():NaN},i.HSt=function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:i={stack:[],error:void 0,hasError:!1},s.label=1;case 1:return s.trys.push([1,3,4,5]),null!=this.zSt||(this.zSt=this.WSt(t)),n=Xt(i,dr.ep([t]),!1),r=[this.zSt,this.XSt(n.Yg)].filter(Fi),[4,ot.race(r).catch(_r)];case 2:return s.sent(),[3,5];case 3:return e=s.sent(),i.error=e,i.hasError=!0,[3,5];case 4:return Gt(i),[7];case 5:return[2]}})}).call(this)},i.XSt=function(t){var i=this.Pyt.jdt.Xdt(),n=this.GSt(i);if(!E(n)&&!this.Br.jdt.$yt)return this.jSt(n,t)},i.jSt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,Rr(t,i)];case 1:return r.sent(),n=this.Pyt.jdt.Xdt(),this.Pyt.jdt.RAt(n),[2]}})}).call(this)},i.QSt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,this.YSt.KSt(t,{},i)];case 1:return n=r.sent(),[2,(new cV).myt(n.JSt,n.wk)]}})}).call(this)},i.kn=function(){return this.LSt.Zg(),this.FSt=void 0,this.MSt=void 0,this.zSt=void 0,this.Pyt.jdt.kn(),ot.resolve()},xt(t,[{key:"Br",get:function(){return this.Pyt}},{key:"W",get:function(){return this.MSt||(this.MSt=this.vE(this.LSt.Yg),Er(this.MSt)),this.MSt}},{key:"VSt",get:function(){return this.Pyt.jdt.wSt&&this.Pyt.jdt.Km===UL.SV?this.HSt(this.LSt.Yg):this.W}}]),t}();V(),It(),Bt(),Dt(),Ut(),V(),It(),Dt();var Mj=function(t){function i(i,n){var r;return(r=t.call(this,"Rmt")||this).zmt=void 0,r.kpt=void 0,r.zmt=i,r.kpt=n,r}return Pt(i,t),i}(ah),Lj=function(t){function i(i,n){var r;(r=t.call(this)||this).Rlt=void 0,r.BI=void 0,r.Vp=void 0,r.Vp=i,r.BI=n;for(var e,s=Ft(r.BI);!(e=s()).done;){e.value.plt=r}return r}Pt(i,t);var n=i.prototype;return n.JU=function(t){t&&this.Rlt!==t&&this.ZSt(t)},n.ZU=function(t){this.Rlt===t&&this.ZSt(void 0)},n.ZSt=function(t){this.Rlt=t,this.So(new Mj(this,this.Rlt))},n.kn=function(){this.Vo();for(var t,i=Ft(this.BI);!(t=i()).done;){t.value.plt=void 0}tr(this.BI)},xt(i,[{key:"kpt",get:function(){return this.Rlt}},{key:"Km",get:function(){return this.Vp}},{key:"Z",get:function(){return this.BI.slice()}}]),i}(uh);V(),It(),V(),It(),V(),It(),Dt();var Fj=function(t){function i(i,n,r){var e;return(e=t.call(this,ch.Dw)||this).currentTime=void 0,e.initDataType=void 0,e.initData=void 0,e.currentTime=i,e.initDataType=n,e.initData=r,e}return Pt(i,t),i}(ah);function Uj(t,i,n,r,e){for(var s,u=[],o=[],h=Ft(i);!(s=h()).done;){var a=s.value;a.Km===vw.Bk?u=u.concat(a.Z):a.Km===vw.Mk&&(o=o.concat(a.Z))}return[Vj(t,u,n,r,null==e?void 0:e.preferredAudioCodecs),jj(t,o,n,r,null==e?void 0:e.preferredVideoCodecs)].filter(Fi)}function Vj(t,i,n,r,e){var s=Wn(r||[],function(t){return t.iat===vw.Bk&&t.Rt}),u=[Wj(s,n,t),zj(s),qj(s),Xj(s,e),Gj(),function(t){var i=t.filter(function(t){return"main"===t.Lt});return i.length>0?i:t}];return Hj(i,u)}function jj(t,i,n,r,e){var s=Wn(r||[],function(t){return t.iat===vw.Mk&&t.Rt}),u=[Wj(s,n,t),Xj(s,e),Gj(),function(t){var i=t.filter(function(t){return"main"===t.Lt});return i.length>0?i:t}];return Hj(i,u)}function Hj(t,i){if(0!==t.length){for(var n,r=t,e=Ft(i);!(n=e()).done;){var s=n.value;if(1===r.length)return r[0];r=s(r)}return r[0]}}function Wj(t,i,n){return function(r){var e=t?t.Zut.o:void 0;if(!Fi(e))return r;var s=null==i?void 0:i.iyt,u=n.iyt,o=s&&u&&s.XE===u.XE,h=Wn(r,function(t){return t.Zut.o===e});return o&&h?[h]:r}}function zj(t){return function(i){var n=t?t.bs:"",r=i.some(function(t){return""!==t.bs})?i.filter(function(t){return""!==t.bs}):i;if(""===n)return r;var e=r.filter(function(t){return t.bs===n});return e.length>0?e:r}}function qj(t){return function(i){var n=t?t.Lt:"";if(""===n)return i;var r=i.filter(function(t){return t.Lt===n});return r.length>0?r:i}}function Xj(t,i){return function(t){if(i&&i.length>0)for(var n,r=function(){var i=n.value,r=t.filter(function(t){return t.$I.NI.some(function(t){return vP(t.Rrt,i)})});if(r.length>0)return{v:r}},e=Ft(i);!(n=e()).done;){var s=r();if("object"===W(s))return s.v}return t}}function Gj(){return function(t){for(var i,n=[],r=-1/0,e=Ft(t);!(i=e()).done;){var s=i.value,u=s.Zut.tz;u>r?(r=u,n=[s]):u===r&&n.push(s)}return n}}V(),It(),ft(),Ut(),V(),It();var Qj=function(t){return t.$St="api",t.tTt="start",t}({});V(),It(),Wt(),Dt(),Ut(),Yt(),V(),It(),Dt();var Yj=function(t){function i(i,n,r){var e;return void 0===i&&(i=0),void 0===n&&(n=void 0),void 0===r&&(r=void 0),(e=t.call(this,ch.sy)||this).retryCount=void 0,e.statusCode=void 0,e.statusMessage=void 0,e.retryCount=i,e.statusCode=n,e.statusMessage=r,e}return Pt(i,t),i}(ah),$j={maxRetries:3,minimumBackoff:1e3,maximumBackoff:1/0},Kj=function(t){function i(i,n,r){var e;return void 0===r&&(r=$j),(e=t.call(this)||this).aV=void 0,e.sTt=void 0,e.Ndt=void 0,e.aV=i,e.sTt=n,e.Ndt=r,e}Pt(i,t);var n=i.prototype;return n.iTt=function(t,i,n){var r=this,e=this.Ndt.maxRetries===1/0?$j:this.Ndt;return CT(function(n,e){return r.eTt(t,i,e,n)},n,e.maxRetries,e.minimumBackoff,e.maximumBackoff)},n.eTt=function(t,i,n,r){return jt(function(){var e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:s=Ft(t),v.label=1;case 1:if((u=s()).done)return[3,7];o=u.value,v.label=2;case 2:return v.trys.push([2,5,,6]),h=new Cl({Yu:o,fk:qd.LT,_k:i,Xk:this.sTt,Hk:Tl.GET,Km:Sl.bk,zk:El.yk,Yg:n,Wk:15e3,qk:5e3}),[4,this.aV.vk(h)];case 3:return[4,(a=v.sent()).HT(n)];case 4:return[2,{JSt:v.sent(),nTt:o,wk:a.wk}];case 5:return c=v.sent(),e=c,f=ig(c)?c.uE.dk:void 0,this.So(new Yj(r,f,c.message)),[3,6];case 6:return[3,1];case 7:throw e}})}).call(this)},i}(uh);function Jj(t){return Bl(t)}function Zj(t,i){var n=Bl(t);return i?""+n+i:""+n}V(),It(),Wt(),Ut(),Yt(),V(),It();var tH=function(){function t(t){this.rTt=void 0,this.rTt=t}return t.prototype.KSt=function(t,i,n){return jt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:e=Ft(this.rTt),h.label=1;case 1:if((s=e()).done)return[3,6];u=s.value,h.label=2;case 2:return h.trys.push([2,4,,5]),[4,u.KSt(t,i,n)];case 3:return[2,h.sent()];case 4:return yr(o=h.sent()),r=o,[3,5];case 5:return[3,1];case 6:throw r}})}).call(this)},t}(),iH=function(){function t(t){this.Sut=void 0,this.Sut=t}return t.prototype.KSt=function(t,i,n){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.Sut.hTt(t)];case 1:if(i=n.sent())return[2,{JSt:i.data,nTt:i.locationURL,wk:i.responseURL}];throw new y("Manifest fetch from cache unsuccesful")}})}).call(this)},t}(),nH=function(){function t(t){this.oTt=void 0,this.oTt=t}return t.prototype.KSt=function(t,i,n){return jt(function(){return zt(this,function(r){switch(r.label){case 0:return[4,this.oTt.iTt(t,i,n)];case 1:return[2,r.sent()]}})}).call(this)},t}();function rH(t,i){return new tH([new iH(i),new nH(t)])}var eH=function(){function t(t,i,n){this.YSt=void 0,this.cTt=void 0,this.dTt=void 0,this.YSt=t,this.cTt=i,this.dTt=n}var i=t.prototype;return i.KSt=function(t,i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return[4,this.YSt.KSt(t,i,n)];case 1:return r=e.sent(),[4,this.aTt(r)];case 2:return e.sent(),[2,r]}})}).call(this)},i.aTt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.cTt.uTt({key:Jj(t.nTt),locationURL:Bl(t.nTt),responseURL:Bl(t.wk),data:t.JSt,references:[this.dTt.o]})];case 1:return i.sent(),[2]}})}).call(this)},t}();V(),It(),Dt();var sH=function(t){function i(){return t.call(this,ch.Xw)||this}return Pt(i,t),i}(ah);V(),It(),Dt();var uH=function(t){function i(){return t.call(this,ch.Gw)||this}return Pt(i,t),i}(ah);V(),It(),Wt(),Dt(),Ut(),Yt(),V(),It(),Dt(),Ut();var oH=function(t){function i(i){return t.call(this,i)||this}Pt(i,t);var n=i.prototype;return n.lTt=function(t){return t.AP=Vw.LOADED,this.tt(t),t},n.fTt=function(t){for(var i,n=Ft(this.Z.NI);!(i=n()).done;){var r=i.value;if(r.eC===t)return r}},i}(Ay);function hH(t,i){return""===i?t:t+" "+i}V(),It(),V(),It(),Bt(),Dt(),V(),It();var aH=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this,i,n,r,!1,null==s?void 0:s.toString())||this).nx=void 0,u.vTt=void 0,u.nx=e,u.vTt=s,u}return Pt(i,t),i.prototype.KO=function(t){return this.U===t.U},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return Wg(Kw(t),{get attributes(){return t.nx},get eventID(){var i;return""+(null!=(i=t.vTt)?i:"")}})}(this)),this.hu}}]),i}(um),cH=function(t){function i(i){var n;return(n=t.call(this,i)||this).YAt=void 0,n.pTt=function(){var t,i,r=null!=(i=null==(t=n.YAt.kyt())?void 0:t.Tn)?i:0;if(r>0)for(var e,s=Ft(n.Z.NI);!(e=s()).done;){ky(e.value,r)}for(var u,o=Ft(n.YAt.Amt);!(u=o()).done;){var h=u.value;if(h.An>r)for(var a,c=Ft(h.eyt);!(a=c()).done;){var f=a.value;n.gTt(f,h,r)}}},n}Pt(i,t);var n=i.prototype;return n._Tt=function(t){var i=this.iV.sI(uy.zU,"","","",void 0,jw.EVENT_STREAM);return i.eC=t,this.lTt(i),i},n.gTt=function(t,i,n){var r,e,s,u=t.x8,o=null!=(r=t.XE)?r:"",h=null!=(e=t.jD)?e:1,a=null!=(s=t.dwt)?s:fe.ZERO,c=hH(u,o),f=this.fTt(c);f||(f=this._Tt(c));for(var v,d=Ft(t.fQ);!(v=d()).done;){var l=v.value;if(!fH(l,f)){var g=vH(l,h,a,i);g.RO>n&&f.nV(g)}}},n.Un=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.hr()];case 1:return i.sent(),this.YAt=t,this.YAt.wn(ch.qw,this.pTt),this.pTt(),[2]}})}).call(this)},n.hr=function(){var i=this;return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:for(this.YAt&&(this.YAt.mn(ch.qw,this.pTt),this.YAt=void 0),n=Ft(this.Z.NI);!(r=n()).done;)e=r.value,this.iV.rV(e);return[4,t.prototype.hr.call(i)];case 1:return s.sent(),[2]}})}).call(this)},n.eV=function(t,i,n){return Ty(t,i,n)},i}(oH);function fH(t,i){var n=t.o;if(void 0!==n&&Wn(i.L.NI,function(i){return i.vTt===n&&i.U===t.lk}))return!0;return!1}function vH(t,i,n,r){var e=t.o,s=t.nM.toSigned().subtract(n),u=t.ct,o=t.lk,h=t.nx,a=s.toNumber()/i+r.Tn,c=u?u.toNumber()/i:void 0,f=void 0!==c?a+c:r.WAt;return new aH(a,f,o,h,e)}function dH(t,i,n,r,e){var s=[],u=Wn(n,function(t){return t.x8===fo});if(void 0!==u){var o=u.XE?function(t){var i=t.split(":",1)[0];switch(i){case"cbcs":case"cenc":return i;default:return}}(u.XE.toLowerCase()):"cenc";if(void 0!==o){for(var h,a=Ft(n);!(h=a()).done;){var c=h.value;if(c.x8!==fo)for(var f,v=Ft(jo(c.x8));!(f=v()).done;){var d,l,g=f.value,w=e&&c.P8?[c.P8]:[],m=null!=(l=null==(d=t.clearkey)?void 0:d.keys)?l:[];s.push({xS:g,OW:w,FW:void 0,GH:void 0,UW:m})}}if(s.length)return{lH:t,zpt:{mTt:o,fH:u.fH},qpt:s,wTt:i===vw.Bk?r.slice():[],yTt:i===vw.Mk?r.slice():[],D8:!1}}}}function lH(t,i){if(!t)return i;if(!i)return t;var n,r=[],e=ro();return gH(r,e,t.qpt),gH(r,e,i.qpt),{lH:t.lH,zpt:{mTt:t.zpt.mTt,fH:null!=(n=t.zpt.fH)?n:i.zpt.fH},qpt:r,wTt:wH(t.wTt,i.wTt,Jn),yTt:wH(t.yTt,i.yTt,Jn),D8:t.D8||i.D8||!1}}function gH(t,i,n){for(var r,e=Ft(n);!(r=e()).done;){var s=r.value,u=s.xS.$m,o=void 0;i.has(u)?(o=i.get(u)).OW=wH(o.OW,s.OW,mH):(o=io({},s),t.push(o),i.set(u,o))}}function wH(t,i,n){for(var r,e=t.slice(),s=Ft(i);!(r=s()).done;){var u=r.value;n(e,u)||e.push(u)}return e}function mH(t,i){for(var n,r=Ft(t);!(n=r()).done;){if(Oa(n.value,i))return!0}return!1}function pH(t,i,n){var r,e=t.NW;if(e){for(var s,u=t.lQ,o=[],h=Ft(t.Rrt);!(s=h()).done;){var a=s.value;o.push(u+'; codecs="'+a+'"')}r=dH(i||{},t.Km,e,o,n)}for(var c,f=Ft(t.xat);!(c=f()).done;){r=lH(r,yH(c.value,i,n))}return r}function yH(t,i,n){return dH(i||{},t.Km,t.NW||[],[t.GT],n)}function _H(t){return t?t.qpt.map(function(i){var n=kH(t.lH,i.xS),r=t.zpt.mTt;return{xS:i.xS,OW:i.OW,GH:i.GH,Vq:[{initDataTypes:[i.xS.Jm],audioCapabilities:bH(t.wTt,r,null==n?void 0:n.audioRobustness),videoCapabilities:bH(t.yTt,r,null==n?void 0:n.videoRobustness),persistentState:null==n?void 0:n.persistentState,distinctiveIdentifier:null==n?void 0:n.distinctiveIdentifier}],UW:i.UW}}):[]}function kH(t,i){switch(i.Km){case No.zm:return t.widevine;case No.qm:return t.playready;case No.jm:return t.fairplay;case No.Gm:case No.Xm:return t.clearkey}}function bH(t,i,n){if(0!==t.length)return t.map(function(t){return{contentType:t,encryptionScheme:i,robustness:n}})}function AH(t,i){var n=function(t){var n=i.indexOf(t.xS.$m);return n>=0?n:i.length};return An(t,function(t,i){return n(t)-n(i)})}V(),It(),Ut(),V(),It(),Wt(),Dt(),Ut(),Yt();var TH=function(t){function i(i){var n;(n=t.call(this,i)||this).Slt=[],n.kTt=void 0,n.YAt=void 0,n.er=function(){for(var t,i=[],r=Ft(n.YAt.Amt);!(t=r()).done;)for(var e,s=Ft(t.value.jlt);!(e=s()).done;){var u=e.value;if(u.Km===vw.Lk&&u.xat.length>0){var o=u.xat[0];i.push(o),n.xTt(o)||n._Tt(o),-1===n.Slt.indexOf(o)&&(n.Slt.push(o),o.wn(vM.Fot,n.kTt)),n.ITt(o)}}n.bTt(i)},n.ITt=function(t){var i=n.PTt(t);i&&t&&i.Qk!==Jp.Nh&&(n.ETt(),function(t,i){var n=t.mht,r=t.Fyt();if(!r)return;var e=r.sbt,s=r.nbt,u=t.Ti,o=t.Mi,h=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;if(Xo(r.x8,EH)||Xo(r.x8,IH)){var e=r.XE.match(SH);if(e){var s=e[1],u=e[2];return[Number(s),Number(u)]}}}return[1,1]}(t.ywt),a=h[0],c=h[1],f=e;for(;f&&f.Put<=s.Put;){for(var v,d=t.Byt.ct||f.ct,l=Ft(RH(i,f,t.Zct(f).Yu,u,o,a,c,d));!(v=l()).done;){var g=v.value;i.nV(g)}f=n.Kct(f)}}(t,i))};var r=n;return n.kTt=function(){r.ITt(this)},n}Pt(i,t);var n=i.prototype;return n._Tt=function(t){var i=this.iV.sI(uy.zU,t.o,"thumbnails","",!1,jw.DEFAULT);return i.Qk=Jp.Kn,this.lTt(i),i},n.Un=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.hr()];case 1:return i.sent(),this.YAt=t,this.YAt.wn(ch.qw,this.er),this.er(),[2]}})}).call(this)},n.bTt=function(t){this.ATt(t),this.STt()},n.STt=function(){for(var t,i=[],n=Ft(this.Z.NI);!(t=n()).done;){var r=t.value;this.TTt(r)||i.push(r)}for(var e,s=Ft(i);!(e=s()).done;){var u=e.value;this.it(u)}},n.ATt=function(t){for(var i,n=[],r=Ft(this.Slt);!(i=r()).done;){var e=i.value;-1===t.indexOf(e)&&n.push(e)}for(var s,u=Ft(n);!(s=u()).done;){var o=s.value;Yn(this.Slt,o)}},n.hr=function(){var i=this;return jt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:for(this.YAt&&(this.YAt.mn(ch.qw,this.er),this.YAt=void 0),n=Ft(this.Slt);!(r=n()).done;)r.value.mn(vM.Fot,this.kTt);for(this.Slt.length=0,e=Ft(this.Z.NI);!(s=e()).done;)u=s.value,this.iV.rV(u);return[4,t.prototype.hr.call(i)];case 1:return o.sent(),[2]}})}).call(this)},n.eV=function(t,i,n){return Ty(t,i,n)},n.kn=function(){return this.kTt=void 0,t.prototype.kn.call(this)},n.ETt=function(){var t,i,n=null!=(i=null==(t=this.YAt.kyt())?void 0:t.Tn)?i:0;if(n>0)for(var r,e=Ft(this.Z.NI);!(r=e()).done;){ky(r.value,n)}},n.xTt=function(t){return this.Z.NI.some(function(i){return i.o===t.o})},n.PTt=function(t){return Wn(this.Z.NI,function(i){return i.o===t.o})},n.TTt=function(t){return this.Slt.some(function(i){return t.o===i.o})},i}(oH),SH=/^(\d+)x(\d+)$/,EH="http://dashif.org/guidelines/thumbnail_tile",IH="http://dashif.org/thumbnail_tile";function RH(t,i,n,r,e,s,u,o){var h=[],a=i.CO,c=s*u,f=r/s,v=e/u,d=A.round(f),l=A.round(v),g=o/c;if(1===c){var w=a+g;return CH(t,a,w,n)?h:[new um(a,w,n,!1)]}for(var m=0;m=i.RO)return h}return h}function CH(t,i,n,r){return t.L.NI.some(function(t){return t.CO===i&&t.RO===n&&t.U===r})}V(),It(),Wt(),Dt(),Yt(),V(),It(),Wt(),Dt(),Ut(),Yt(),V(),It(),Bt(),Dt(),V(),It();var PH=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,u,!1)||this).CTt=void 0,o.RTt=void 0,o.NTt=void 0,o.CTt=r,o.RTt=e,o.NTt=s,o}return Pt(i,t),i.prototype.KO=function(t){return Ma(this.U,t.U)},xt(i,[{key:"sM",get:function(){return this.CTt}},{key:"XE",get:function(){return this.RTt}},{key:"DTt",get:function(){return this.NTt}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return Wg(Kw(t),{get schemeIDURI(){return t.sM},get value(){return t.XE},get emsgID(){return t.DTt}})}(this)),this.hu}}]),i}(um),DH=function(t){function i(i){return t.call(this,i)||this}Pt(i,t);var n=i.prototype;return n.elt=function(t,n,r){var e=Pp.PD(Aa(t));if(e){var s=function(t,i){for(var n,r=[],e=Ft(t);!(n=e()).done;){var s=n.value;bp(s,i)&&r.push(s)}return r}(e,mp.zR);if(s.length){var u=i.BTt(e,n,r);this.MTt(s,u,r)}}},n.MTt=function(t,i,n){for(var r,e=Ft(t);!(r=e()).done;){var s=r.value,u=void 0,o=(u=1===s.ED?s.nM.toNumber()/s.jD+n:i+s.oM/s.jD)+s.rM/s.jD;"https://aomedia.org/emsg/ID3"===s.sM||"https://developer.apple.com/streaming/emsg-id3"===s.sM?this.LTt(s,u):this.OTt(s,u,o)}},n.OTt=function(t,i,n){var r=hH(t.sM,t.XE),e=this.fTt(r);e||(e=this.FTt(r),this.lTt(e)),e.nV(new PH(i,n,t.sM,t.XE,t.o,t.hM))},n.LTt=function(t,i){var n=ZD(Aa(t.hM));if(n){var r=hH(t.sM,t.XE),e=this.fTt(r);e||(e=this.UTt(r),this.lTt(e));for(var s,u=Ft(n.r6);!(s=u()).done;){var o=s.value,h=new fN(i,o);ID(h,e.L.NI),e.nV(h)}}},n.FTt=function(t){var i=this.iV.sI(uy.zU,"","","",void 0,jw.EMSG);return i.eC=t,i.Qk=Jp.iC,i},n.UTt=function(t){var i=this.iV.sI(uy.zU,"","","",void 0,jw.ID3);return i.eC=t,i.Qk=Jp.iC,i},n.eV=function(t,i,n){return Ty(t,i,n)},n.hr=function(){var i=this;return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:for(n=Ft(this.Z.NI);!(r=n()).done;)e=r.value,this.iV.rV(e);return[4,t.prototype.hr.call(i)];case 1:return s.sent(),[2]}})}).call(this)},i.BTt=function(t,i,n){var r=Ap(t,mp.GR);return r?ye(r.wM,r.jD)+n:i},i}(oH),NH=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).YAt=void 0,i.pTt=function(){var t,n,r=null!=(n=null==(t=i.YAt.kyt())?void 0:t.Tn)?n:0;i.jU(r)},i}Pt(i,t);var n=i.prototype;return n.Un=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.hr()];case 1:return i.sent(),this.YAt=t,this.YAt.wn(ch.qw,this.pTt),this.pTt(),[2]}})}).call(this)},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.YAt&&(this.YAt.mn(ch.qw,this.pTt),this.YAt=void 0),[4,t.prototype.hr.call(i)];case 1:return n.sent(),[2]}})}).call(this)},i}(DH);V(),It(),V(),It(),Wt(),Yt();var xH=function(){function t(t){this.Sut=void 0,this.VTt=!1,this.Sut=t}var i=t.prototype;return i.sdt=function(t,i){return this.VTt?this.Sut.sdt(t,i):ot.resolve(!1)},i.Aut=function(t,i){return this.VTt?this.Sut.Aut(t,i):ot.resolve(void 0)},i.hTt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.Sut.hTt(t)];case 1:return i=n.sent(),this.VTt=void 0!==i,[2,i]}})}).call(this)},i.jJ=function(t){return this.Sut.jJ(t)},t}();V(),It(),Dt();var BH=function(t){function i(i,n,r){return t.call(this,i,n,r)||this}Pt(i,t);var n=i.prototype;return n.FL=function(){var t;return null!=(t=this.LL)?t:0},n.dC=function(){this.oa.zx=1/0},n.UL=function(t,i,n){return!1},n.VL=function(){return!0},i}(WA),OH=[ch.Qw,ch.Yw,ch.ey,ch.iy,ch.zw,ch.ly],MH=[ch.Kw,ch.wy,ch.Lw,ch.Bw],LH=function(t){function i(i,n,r,e,s,u,o){var h,a;return(h=t.call(this)||this).aV=void 0,h.Mz=void 0,h.Ndt=void 0,h.Sut=void 0,h.PL=void 0,h.Cq=void 0,h.xq=void 0,h.akt=void 0,h.bkt=void 0,h.d9=!1,h.nxt=NaN,h.nq=void 0,h.rq=void 0,h.t9=!1,h.Akt=void 0,h.Y8=void 0,h.oxt=!1,h.rxt=0,h.hxt=0,h.Mkt=!1,h.uV=new dr,h.okt=new Xa,h.ixt=void 0,h.$Et=!1,h.Pyt=void 0,h.nEt=void 0,h.UEt=void 0,h.ASt=!0,h.Ckt=!0,h.xEt=void 0,h.Ho=LA.rL(),h.oq=uS.pz,h.KEt=void 0,h.FV=!0,h.Ac=void 0,h.FEt=void 0,h._mt=void 0,h.Zpt=[],h.Pz=!1,h.cq=void 0,h.ekt=new dr,h.hkt=ot.resolve(),h.T9=new dr,h.k9=ot.resolve(),h.$kt=!1,h.IEt=!1,h.skt=new dr,h.nkt=ot.resolve(),h._kt=void 0,h.fEt=void 0,h.Ikt=!1,h.tO=void 0,h.sO=void 0,h.Gl=void 0,h.wEt=void 0,h.gEt=void 0,h.Opt=void 0,h.zEt=void 0,h.GEt=void 0,h.Aq=void 0,h.axt=void 0,h.Ekt=0,h.xkt=0,h.Pkt=0,h.lq=new Bb,h.mEt=void 0,h.jTt={rO:0,hO:0,oO:0},h.aq=void 0,h.JTt=void 0,h.pq=void 0,h.JW=void 0,h.jkt=function(t){var i,n,r,e;"Rmt"===(null==t?void 0:t.type)&&(e=t.kpt),e&&(null==(i=e.plt)?void 0:i.Km)===vw.Bk&&(null==(r=h.bt)||null==(n=r.dash)?void 0:n.forceRecreateMediaSourceOnAudioSwitch)?h.ikt(!0):h.ikt()},h.Gmt=function(t){var i;null==(i=h.akt)||i.Gmt(t)},h.xmt=function(t){var i;null==(i=h.akt)||i.xmt(t)},h.Nc=function(){h.So(new Rg(h.zx,h.Vx))},h.U8=function(t){h.So(new Fj(h.zx,t.Jm,t.Py))},h.Wkt=function(t){h.Ekt+=t.uO,h.So(t)},h.qkt=function(t){var i=t.segments.filter(function(t){return t.Pct});t.track===vw.Bk?h.xkt=i.length:t.track===vw.Mk&&(h.Pkt=i.length)},h.B7=function(){var t=h.ct;E(t)||t===h.nxt||(h.nxt=t,h.So(new AT(h.nxt)))},h.cxt=function(){h.tkt(),h.EEt()},h.uxt=function(t){h.IEt||!h.Qx||h.xP||(h.IEt=!0,h.So(null!=t?t:new ST(h.zx)))},h.WEt=function(t){h.Rs(t),h.Mkt||(h.Mkt=!0,h.Cq.zV())},h.HEt=function(){h.Pyt.jdt.mn(ch.Ww,h.HEt),h.So(new aC)},h.Gkt=function(t){var i;if(t.errorObject.code===pd.CONTENT_PROTECTION_OUTPUT_RESTRICTED&&(null==(i=h.akt)?void 0:i.Mmt.every(function(t){return!t.Plt})))return;h.Qq(t.errorObject),h.So(t)},h.zkt=function(t){h.Qq(t.errorObject)},h.Lmt=function(t){mr(t)||h.Qq(new _d(pd.MEDIA_DECODE_ERROR,t.message,t))},h.tkt=function(){if(!h.lP)if(h.Skt())if(h.kkt()){var t=h.Pyt.jdt.TSt;h.Oy(t,!0)}else;else{var i=h.Pyt.jdt.TSt;h.Oy(i,!0)}},h.REt=function(t){h.oxt=h.xP,h.So(t)},h.BEt=function(t){var i=h.oxt,n=h.xP;h.oxt=n,i&&!n&&h.So(t),h.uxt()},h.Xkt=function(){var t=h.MP,i=h.DP;h.rxt===t&&h.hxt===i||(h.rxt=t,h.hxt=i,h.So(new My))},h.yEt=function(t){var i=t.Ht;i.Qk===Jp.Kn?(h.dEt(i),h.fEt=i):i===h.fEt&&i.Qk===Jp.Nh&&(h.fEt=void 0,h.vEt())},h.CEt=function(){h.t9||h.xEt&&(h.xEt.Qy(),h.xEt=void 0)},h.TEt=function(t){h.t9||h.xEt&&(h.xEt.Ky(t),h.xEt=void 0)},h.qEt=function(){h.XEt().catch(h.Lmt)},h.jEt=function(){h.QEt().catch(h.Lmt),h.xq.mn(Fy.xM,h.jEt)},h.fxt=function(t){h.Qq(_w(t.lt))},h.dxt=function(){h.WTt()},h.lxt=function(){h.qTt()},h.vxt=function(t){h.GTt(t.NW)},h.aV=i,h.Sut=new xH(s),h.PL=u,h.JTt=o,h.Mz=r,h.Mz.wn("UY",h.dxt),h.Mz.wn("qY",h.lxt),h.cq=e,h.Ndt=io({},n.retryConfiguration,{maxRetries:null!=(a=n.retryConfiguration.maxRetries)?a:1/0}),h.tO=new cA,h.sO=new cA,h.pq=new Mb(i),h.pq.wn("contentProtectionsTracked",h.vxt),h.PL.wn(ch.Cw,h.B7),h.PL.wn(mh.Dw,h.U8),h.PL.wn(ch.Nw,h.uxt),h.PL.wn(ch.$w,h.REt),h.PL.wn(ch.Zw,h.BEt),h.PL.wn(ch.Jw,h.Xkt),h.PL.wn(ch.py,h.Nc),h.PL.wn([ch.uo,ch.jw],h.cxt),h.PL.wn(MH,h.Rs),h.PL.wn(ty.ma,h.fxt),h.PL.Rq=h.pq,h.PL.J7=h,h.PL.wn([ch.xw,ch.Ew],h.Rs),h.PL.wn(ch.Ay,h.Gmt),h.PL.wn(ch.LICENSE_REQUEST_GENERATED,h.xmt),h.Cq=new $y(h,h.PL),h.xq=new Yy(h.Cq,!0),h.xq.wn(Fy.xM,h.tkt),h.xq.wn(Uy,h.Rs),h.wEt=new fA,h.wEt.wn(Fg.pa,h.yEt),h.gEt=new fA,h.zEt=new cH(h.PL),h.GEt=new TH(h.PL),h.Aq=new Ey(h.PL,h.aV),h.axt=new sy,h.Gl=new Fb([h.wEt,h.zEt.Z,h.GEt.Z,h.Aq.Z,h.axt]),h}Pt(i,t);var n=i.prototype;return n.HTt=function(t){return!!this.aq&&this.aq.IZ(t)},n.Lp=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return i=this,[4,this.PL.Un(t)];case 1:return i.aq=n.sent(),this.WTt(),this.qTt(),this.aq.F4(this.ct),[2]}})}).call(this)},n.zTt=function(t){return this.aq.RZ(t)},n.GTt=function(t){return this.aq.NZ(t)},n.XTt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.jTt=this.QTt,this.aq?[4,this.PL.hr()]:[3,2];case 1:t.sent(),this.aq=void 0,t.label=2;case 2:return[2]}})}).call(this)},n.F3=function(){this.aq.F3()},n.I3=function(){var t=this.ct;this.aq.ct=e||Pn(r,e,.001)},n.kkt=function(){var t;if(!this.Pyt)return!1;if(this.Pyt.jdt.Km!==UL.SV)return!1;var i=null==(t=this.akt)?void 0:t.Mc;if(i&&i.Hot)return!0;for(var n,r=[],e=Ft(this.Pyt.jdt.Amt);!(n=e()).done;){var s=n.value,u=s.Tyt,o=s.WAt;void 0!==u&&void 0!==o&&r.push(u,o)}var h=new LA(r).VM();return function(t,i,n){if(!i.V||!n.V)return LA.rL();var r=i.Tn(0),e=i.An(i.V-1),s=t.Mn(n).OM().Mn(t).HM(i);return LA.nL(s.Tn(0),s.An(s.V-1)).WM(s).YM(function(t,i){return tme})}(this.ykt,this.Tkt,h).V>0},n.Nkt=function(t){this.Ho=this.Ho.HM(t)},n.Hkt=function(t){t.wn(OH,this.Rs),t.wn(ch._y,this.Wkt),t.wn(ch.Sw,this.qkt),t.wn(ty.ma,this.zkt),t.wn(ch.Ew,this.Gkt),t.wn(ch.Yw,this.Xkt),t.wn("Rmt",this.jkt),t.wn("amt",this.jkt)},n.Qkt=function(t){t.mn(OH,this.Rs),t.mn(ch._y,this.Wkt),t.mn(ch.Sw,this.qkt),t.mn(ty.ma,this.zkt),t.mn(ch.Ew,this.Gkt),t.mn(ch.Yw,this.Xkt),t.mn("Rmt",this.jkt),t.mn("amt",this.jkt)},n.Kkt=function(t){t.wn(ch.Qw,this.Rs)},n.Ykt=function(t){t.mn(ch.Qw,this.Rs)},n.Vkt=function(){if(this.akt){var t=Wn(this.akt.Bmt,function(t){return t.iat===vw.Mk});if(t)return t.YI}},n.Lkt=function(t){var i,n=null==(i=this.Pyt)?void 0:i.jdt;if(!n)return LA.rL();var r=n.kSt,e=t?n.VAt:n.Wyt;if(void 0===r||void 0===e)return LA.rL();if(!t){var s=this.Dkt;s.V>0&&s.An(s.V-1)>e&&(e=A.min(s.An(s.V-1),n.VAt))}var u=this.ct;return isFinite(u)&&u>e&&(e=u),LA.nL(r,e).MM()},n.Un=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:pr(i),e=this.Pyt.jdt;try{n=e.ESt,r=e.TSt}catch(t){throw new y("Something went wrong determining the start of the provided MPEG-DASH stream")}if(!n)throw new y("Something went wrong determining the initial Period of the provided MPEG-DASH stream");if(void 0===r)throw new y("Something went wrong determining the start time of the provided MPEG-DASH stream");return t.textTracks&&this.Jkt(t.textTracks),this.R9(),s=this.qlt(n),u=Uj(n,s,void 0,void 0,this._mt),o=this.ukt(n,u,n,u,!0),u.forEach(function(t){return t.Rt=!0}),h=this.ckt(u,o),[4,this.Lp(h)];case 1:return c.sent(),this._kt=h,pr(i),[4,this.$Tt(n,s,u,o)];case 2:return a=c.sent(),pr(i),this.Zkt(a),this.O9(),pr(i),[4,a.bat()];case 3:return c.sent(),pr(i),!this.$kt&&r>0&&this.Oy(r,!0,Qj.tTt),this.Pz||(this.fkt(),this.tEt()),[2]}})}).call(this)},n.fkt=function(){this.ekt.Zg(),this.ekt=new dr,this.hkt=br(this.iEt(this.hkt,this.nkt,this.ekt.Yg),this.ekt).catch(this.Lmt)},n.eEt=function(){this.ekt.Zg()},n.iEt=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return[4,ot.all([t,i])];case 1:s.sent(),pr(n),s.label=2;case 2:return(e=null==(r=this.akt)?void 0:r.Mc)?[4,this.sEt(e,n)]:[3,4];case 3:return s.sent()?[3,2]:[3,4];case 4:return[2]}})}).call(this)},n.sEt=function(t,i){return jt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:pr(i),r=this.akt,u.label=1;case 1:if(this.Pyt.jdt.Km!==UL.SV||void 0!==(null==(n=this.FAt(t))?void 0:n.Tyt))return[3,7];u.label=2;case 2:return u.trys.push([2,4,,5]),[4,kr(this.nEt.VSt,i)];case 3:return u.sent(),[3,5];case 4:if(yr(e=u.sent()),this.rEt())return[2,!0];throw e;case 5:return[4,this.hEt()];case 6:return u.sent(),[3,1];case 7:return pr(i),[4,this.hEt()];case 8:u.sent(),pr(i),u.label=9;case 9:return r.gmt()?[3,12]:[4,r.ww(VL.$lt,i)];case 10:return u.sent(),[4,this.hEt()];case 11:return u.sent(),[3,9];case 12:return pr(i),[4,this.hEt()];case 13:return u.sent(),pr(i),(s=this.FAt(t))?this.oEt(s)?[4,this.aEt(s,i)]:[3,15]:(this.F3(),[2,!1]);case 14:return u.sent(),[3,17];case 15:return[4,this.uEt(s,i)];case 16:u.sent(),u.label=17;case 17:return[2,!0]}})}).call(this)},n.rEt=function(){var t=this.ZW;return Fi(t)&&t.An>this.zx},n.oEt=function(t){var i,n,r,e,s,u=null!=(s=null==(i=this.Ac)?void 0:i.seamlessSwitchStrategy)?s:QA.HL;if(u===QA.WL)return!0;if(u===QA.qL)return!1;var o=this.akt,h=null==o?void 0:o.Mc,a=null==o?void 0:o.Bmt,c=Uj(t,this.qlt(t),h,a,this._mt),f=this.ukt(t,c,h,a,!1);if(u===QA.CLEAR_ONLY&&((null==(n=this.akt)?void 0:n.Wpt)||f)||u===QA.SAME_DRM_ONLY&&!((null==(r=this.akt)?void 0:r.Wpt)&&f||!(null==(e=this.akt)?void 0:e.Wpt)&&!f))return!1;var v=this.ckt(c,f);return this.HTt(v)},n.cEt=function(){return!0},n.dEt=function(t){for(var i,n=Ft(this.lEt());!(i=n()).done;){var r=i.value;r!==t&&(r.Qk=Jp.Nh)}},n.vkt=function(){if(void 0!==this.fEt){if(this.fEt.nC){var t=Wn(this.ht.NI,function(t){return t.Rt});void 0!==t&&this.fEt.bs===t.bs||(this.fEt.Qk=Jp.Nh)}}else this.vEt()},n.vEt=function(){if(!this.lEt().length){var t=Wn(this.ht.NI,function(t){return t.Rt});if(void 0!==t)for(var i,n=Ft(this.nt.NI.filter(function(t){return t.nC}));!(i=n()).done;){var r=i.value;if(r.bs===t.bs)return r.Qk=Jp.Kn,void(this.fEt=r)}}},n.lEt=function(){return this.nt.NI.filter(function(t){return t.Qk===Jp.Kn&&(t.Lt===uy.WU||t.Lt===uy.HU)})},n._Et=function(t){if(t&&this.fEt){var i=function(t,i){if(""!==t.bs)return i.filter(function(i){return i.bs===t.bs})[0]}(this.fEt,t.nt.NI);i&&(i.Qk=Jp.Kn)}},n.aEt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:e=this.akt,s=this.bkt,u=this._kt,l.label=1;case 1:return l.trys.push([1,16,,22]),pr(i),o=e.Mc,h=e.Bmt,a=this.qlt(t),VH(e.qmt,a),c=Uj(t,a,o,h,this._mt),f=this.ukt(t,c,o,h,!1),c.forEach(function(t){return t.Rt=!0}),v=this.ckt(c,f),[4,e.wat()];case 2:return l.sent(),this.I3(),pr(i),s&&s.Mc===t?this.HTt(v)?[4,this.zTt(v)]:[3,4]:[3,5];case 3:l.sent(),l.label=4;case 4:return this._kt=v,[3,11];case 5:return s?[4,s.kn(!0)]:[3,7];case 6:l.sent(),l.label=7;case 7:return this.HTt(v)?[4,this.zTt(v)]:[3,9];case 8:l.sent(),l.label=9;case 9:return this._kt=v,[4,this.$Tt(t,a,c,f)];case 10:s=l.sent(),this.bkt=s,this.Kkt(s),this.gEt.OI=s.nt,s.Aat(e),l.label=11;case 11:return[4,s.bat()];case 12:l.sent(),pr(i),l.label=13;case 13:return this.pkt900))return[3,5];this.mEt=n,this.gkt(),r=A.max(this.pkt,t.Tn),e.label=2;case 2:return e.trys.push([2,,4,5]),[4,this.mkt(r,!1,!0,i)];case 3:return e.sent(),[3,5];case 4:return this.wkt(),[7];case 5:return[2]}})}).call(this)},n.uEt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f,v,d,l;return zt(this,function(g){switch(g.label){case 0:return pr(i),[4,this.akt.wat()];case 1:return g.sent(),this.I3(),[4,this.KTt(t.Tn)];case 2:g.sent(),pr(i),g.label=3;case 3:g.trys.push([3,7,8,9]),this.F3(),this.Ikt=!0,g.label=4;case 4:return!this.PL.Qx&&this.pkt0&&a.push(i.bEt(vw.Bk,r)),e.length>0&&a.push(i.bEt(vw.Mk,e)),a},n.ckt=function(t,i){var n,r,e,s,u,o,h,a,c,f=this,v=t.map(function(t){var i;return eL.vdt(null!=(i=t.Alt)?i:t.xat,BA(t.iat,f._mt))}).map(function(t){return{GT:t.GT}}),d=null==(r=this.Ac)||null==(n=r.dash)?void 0:n.desiredTimescale,l=(null==(e=this.Ac)?void 0:e.seamlessSwitchStrategy)!==QA.qL&&(null==(s=this.Ac)?void 0:s.seamlessSwitchStrategy)!==QA.CLEAR_ONLY&&(null==(u=this.Ac)?void 0:u.seamlessSwitchStrategy)!==QA.SAME_DRM_ONLY&&(null!=(c=null==(h=this.Ac)||null==(o=h.dash)?void 0:o.needsTimescaleShifting)?c:Vi.Zs.kp),g=null==(a=this.Ac)?void 0:a.useManagedMediaSource;return{Km:Ly.SV,q4:v,fq:_H(i),D8:null==i?void 0:i.D8,kp:l,M3:d,t5:g}},n.ukt=function(t,n,r,e,s){var u,o,h,a=this.Ac.contentProtection,c=i.AEt(n,a);if(void 0!==c)return c;var f=null!=(h=null==(u=this.Ac)?void 0:u.seamlessSwitchStrategy)?h:QA.HL;if(f!==QA.qL&&f!==QA.CLEAR_ONLY&&f!==QA.SAME_DRM_ONLY){var v=null==(o=this.akt)?void 0:o.Wpt;if(!s&&void 0!==v){var d=!v.D8;if(f===QA.HL&&d&&!this.cEt())return;return v}var l=!s&&f===QA.HL;if(void 0!==(c=this.SEt(t,a,r,e,l)))return c.D8=!0,c}},n.SEt=function(t,n,r,e,s){for(var u=t,o=!1;;)if(void 0!==(u=o?this.UAt(u):this.FAt(u))){var h=Uj(u,this.qlt(u),r,e,this._mt),a=i.AEt(h,n);if(s){var c=this.ckt(h,a);if(!this.HTt(c))return}if(void 0!==a)return a}else{if(o)return;o=!0,u=t}},n.Jkt=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;r.src&&this.Aq.hV(r)}Oy(this.Aq.Z)},n.jP=function(){var t,i=this.lP;this.Ckt=!0,i||(this.t9||(this.TEt(new wr),this.kEt()),(null==(t=this.JW)?void 0:t.oL)&&this.JW.KP(),this.EEt())},n.QP=function(){this.xEt||(this.xEt=new Xa),this.PEt();var t=this.xEt.Yy;return Er(t),t},n.PEt=function(){if(this.Ckt=!1,this.d9=!0,this.IEt=!1,this.Bkt(),this.Qx){var t=this.Tkt;t.V>0&&this.Oy(t.Tn(0))}this.t9||this.f9().then(this.CEt,this.TEt),this.tkt(),this.EEt()},n.f9=function(){return this.PL.QP()},n.kEt=function(){this.PL.jP()},n.R9=function(){this.t9||(this.Ckt=this.lP,this.t9=!0,this.kEt())},n.O9=function(){this.t9&&(this.t9=!1,this.Ckt||this.f9().then(this.CEt,this.TEt),this.tkt(),this.EEt())},n.EEt=function(){var t=this.FV,i=this.lP;t!==i&&(this.FV=i,this.Ckt=i,i?this.So(new kT(this.zx)):this.So(new bT(this.zx)))},n.Oy=function(t,i,n){return void 0===i&&(i=!1),void 0===n&&(n=Qj.$St),this.$kt=!0,this.ekt.Zg(),this.T9.Zg(),this.Pz=!0,this.Y8=t,this.IEt=this.IEt&&this.J8(),this.Nkt(this.Dkt),this.REt(new ET(this.zx)),this.T9=new dr,this.k9=br(this.E9(t,this.hkt,this.k9,this.nkt,this.T9.Yg,i,n),this.T9).catch(this.Lmt),this.k9},n.DEt=function(){this.T9.Zg()},n.E9=function(){return jt(function(t,i,n,r,e,s,u,o){var h,a,c,f,v,d,l,g,w,m,p,y,_,k,b,A,T,S;return zt(this,function(E){switch(E.label){case 0:void 0===s&&(s=!1),void 0===u&&(u=Qj.$St),void 0===o&&(o=!1),null==(h=this.JW)||h.KP(),E.label=1;case 1:return E.trys.push([1,30,,31]),[4,ot.all([i,n,r])];case 2:return E.sent(),pr(e),[4,kr(this.okt.Yy,e)];case 3:return E.sent(),f=this.Tkt.LM(t),this.Y8=f,v=o||(null==(c=this.Ac)||null==(a=c.dash)?void 0:a.forceHardSwitchWhenSeekingBackwards)&&f<=this.zx,d=this.NEt(f),l=this.akt,v||!l||!l.kP.Cr(f)&&u!==Qj.tTt&&l.Mc!==d?[3,8]:!(g=this.bkt)||g.Smt?[3,7]:[4,g.wat()];case 4:return E.sent(),this.I3(),w=this.ckt(l.Mmt,l.Wpt),this.HTt(w)?[4,this.zTt(w)]:[3,6];case 5:E.sent(),E.label=6;case 6:this._kt=w,E.label=7;case 7:return[3,27];case 8:return d?(m=this.bkt,this.R9(),l?[4,l.wat()]:[3,10]):[3,27];case 9:E.sent(),E.label=10;case 10:return!m||m.Mc!==d||v?[3,13]:(p=this.ckt(m.Mmt,m.Wpt),this.I3(),this.HTt(p)?[4,this.zTt(p)]:[3,12]);case 11:E.sent(),E.label=12;case 12:return this._kt=p,[3,25];case 13:return m?[4,m.kn(!0)]:[3,15];case 14:E.sent(),E.label=15;case 15:return y=this.qlt(d),l&&VH(l.qmt,y),_=null==l?void 0:l.Mc,k=null==l?void 0:l.Bmt,b=Uj(d,y,_,k,this._mt),A=this.ukt(d,b,_,k,!1),b.forEach(function(t){return t.Rt=!0}),T=this.ckt(b,A),!this.oEt(d)||v?[3,18]:(this.I3(),this.HTt(T)?[4,this.zTt(T)]:[3,17]);case 16:E.sent(),E.label=17;case 17:return[3,23];case 18:return A=this.ukt(d,b,_,k,!0),T=this.ckt(b,A),l?(this.wEt.mn(Fg.pa,this.yEt),[4,l.kn()]):[3,20];case 19:E.sent(),this.wEt.wn(Fg.pa,this.yEt),this.akt=void 0,E.label=20;case 20:return[4,this.XTt()];case 21:return E.sent(),[4,this.Lp(T)];case 22:E.sent(),E.label=23;case 23:return this._kt=T,[4,this.$Tt(d,y,b,A)];case 24:m=E.sent(),this.bkt=m,this.gEt.OI=m.nt,this.Kkt(m),m.Aat(this.akt),E.label=25;case 25:return[4,m.bat(aM.tot)];case 26:return E.sent(),this.Zkt(m),[3,27];case 27:return Er(S=this.mkt(f,s,!1,e)),this.Y8=void 0,[4,this.akt.bat(aM.tot)];case 28:return E.sent(),pr(e),this.fkt(),[4,S];case 29:return E.sent(),pr(e),this.O9(),this.Pz=!1,this.BEt(new IT(this.zx)),this.tEt(),[3,31];case 30:return mr(E.sent())?[2]:[3,31];case 31:return[2]}})}).apply(this,arguments)},n.tEt=function(){if(!this.lP&&!this.xP&&void 0!==this.OL){var t,i,n=this.zx;if(this.zx+this.OL-this.VP.Cd.maximumOffset0&&(c=a.LM(t),s!==c&&(a.Cr(s)&&this.Pyt.jdt.Km===UL.SV||(s=c,e=!0))),e)e=!1,null==o||o.Zg(),(o=new dr).$g(r),Er(u=br(this.MEt(s,i,n,o.Yg),o));else if(!this.Fkt&&!this.n5)return[3,7];return f=Xt(h,dr.ep([r]),!1),[4,ot.race([u,this.ww([ch.ey,ch.iy,ch.Cw],f.Yg),this.Pyt.jdt.ww(vM.Fot,f.Yg)])];case 3:return d.sent(),[3,6];case 4:return v=d.sent(),h.error=v,h.hasError=!0,[3,6];case 5:return Gt(h),[7];case 6:return[3,1];case 7:return[2]}})}).call(this)},n.MEt=function(t,i,n,r){return jt(function(){return zt(this,function(e){switch(e.label){case 0:this.PL.Oy(t,i,n),e.label=1;case 1:return this.Fkt||this.n5?[4,this.PL.ww([ch.Zw,ch.Vw],r)]:[3,3];case 2:return e.sent(),[3,1];case 3:return[2]}})}).call(this)},n.gkt=function(){void 0===this.Akt&&(this.Akt=this.pkt,this.PL.mn(ch.$w,this.REt),this.PL.mn(ch.Zw,this.BEt))},n.wkt=function(){if(void 0!==this.Akt){var t=this.pkt;this.Akt=void 0,this.PL.wn(ch.$w,this.REt),this.PL.wn(ch.Zw,this.BEt),this.pkt!==t&&this.Nc()}},n.LEt=function(t){this.Ho=this.Ho.HM(t)},n.NEt=function(t){var i=this.Pyt.jdt,n=i.Amt.filter(function(t){return t.ct>=.2});if(0!==n.length){var r=n[0];if(t<=r.Tn)return r;for(var e,s=Ft(n);!(e=s()).done;){var u=e.value;if(u.An>t)return u}return i.Km!==UL.SV?n[n.length-1]:void 0}},n.UAt=function(t){for(var i=t.Hmt;i&&i.ct<.2;)i=i.Hmt;return i},n.FAt=function(t){for(var i=t.Wmt;i&&i.ct<.2;)i=i.Wmt;return i},n.Ta=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:r={stack:[],error:void 0,hasError:!1},c.label=1;case 1:return c.trys.push([1,8,9,10]),this.pq.BW(t.contentProtection),this.OEt(),!this.Ac||aT(this.Ac)?[3,3]:[4,this.hr()];case 2:c.sent(),c.label=3;case 3:return!t||aT(t)?[2]:(s=Xt(r,dr.ep([n]),!1),this.uV=dr.ep([s.Yg]),this.Ac=t,this.FEt=i,this._mt=t.abr,this.Zpt=t.ignoreEmbeddedTextTrackTypes,this.UEt=new Kj(this.aV,Boolean(this.Ac.useCredentials),this.Ndt),this.UEt.wn(ch.sy,this.Rs),u=rH(this.UEt,this.Sut),this.SSt(!0),this.nEt=new Oj({rC:Vi.Dh(this.Ac.src),ISt:null!=(o=null==(e=this.Ac.latencyConfiguration)?void 0:e.targetOffset)?o:this.Ac.liveOffset,BSt:this.Ac.timeServer,Xk:this.Ac.useCredentials},this.VEt(this._mt),this.aV,u,this.Ac.dash),this.Pyt=this.nEt.Br,this.Pyt.jdt.wn(ch.Ww,this.HEt),this.Pyt.jdt.wn(ch.qw,this.WEt),this.Pyt.jdt.wn(fj.jAt,this.qEt),this.Pyt.jdt.wn(vM.Fot,this.tkt),this.Pyt.jdt.wn(ch.oy,this.Rs),[4,this.zEt.Un(this.Pyt.jdt)]);case 4:return c.sent(),[4,this.GEt.Un(this.Pyt.jdt)];case 5:return c.sent(),Jn(this.Zpt,jw.EMSG)?[3,7]:(this.Opt=new NH(this.PL),this.Gl.qW(this.Opt.Z),[4,this.Opt.Un(this.Pyt.jdt)]);case 6:c.sent(),c.label=7;case 7:return t.latencyConfiguration&&(h=t.latencyConfiguration,this.JW=new BH(this,this.PL,h),this.JW.Rt=!0,this.cq.Ea(this.JW)),this.Bkt(),s.zg(),[3,10];case 8:return a=c.sent(),r.error=a,r.hasError=!0,[3,10];case 9:return Gt(r),[7];case 10:return[2]}})}).call(this)},n.IP=function(t,i,n,r){return ot.resolve()},n.CP=function(){return ot.resolve()},n.XEt=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=this.Pyt.jdt.cP,this.SSt(t),t?(this.jkt(),this.xq.mn(Fy.xM,this.jEt),[2]):this.rEt()?(this.xq.wn(Fy.xM,this.jEt),[2]):[4,this.QEt()];case 1:return i.sent(),[2]}})}).call(this)},n.QEt=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return[4,ot.all([null==(t=this.akt)?void 0:t.wat(aM.pot),null==(i=this.bkt)?void 0:i.wat(aM.pot)].filter(Fi))];case 1:throw n.sent(),this.eEt(),this.DEt(),this.skt.Zg(),new y("The provided MPEG-DASH manifest could not be loaded")}})}).call(this)},n.SSt=function(t){this.ASt!==t&&(this.ASt=t,this.So(t?new sH:new uH))},n.Bkt=function(){this.Pyt&&(this.KEt=this.YEt(this.KEt,this.uV.Yg).catch(this.Lmt))},n.YEt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return t?[4,t]:[3,2];case 1:r.sent(),pr(i),r.label=2;case 2:return r.trys.push([2,7,,8]),this.wP===uS.HL||this.d9?[4,this.JEt(i)]:[3,4];case 3:return r.sent(),[3,6];case 4:return this.wP!==uS.zU?[3,6]:[4,this.ZEt(i)];case 5:return r.sent(),[3,6];case 6:return[3,8];case 7:throw yr(n=r.sent()),this.Qq(new _d(pd.MANIFEST_LOAD_ERROR,n.message,n)),n;case 8:return[2]}})}).call(this)},n.JEt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.ZEt(t)];case 1:n.sent(),this.$Et||(this.$Et=!0,this.okt.$g(this.Un(this.FEt,t))),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,this.okt.Yy];case 3:return n.sent(),[3,5];case 4:return yr(i=n.sent()),this.Qq(new _d(pd.MEDIA_DECODE_ERROR,i.message,i)),[3,5];case 5:return[2]}})}).call(this)},n.ZEt=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,kr(this.nEt.W,t)];case 1:return o.sent(),i=this.Pyt.jdt,void 0===this.JW&&i.Km===UL.SV&&(n=i.pyt,r=(null==n?void 0:n.tSt)?(null==n?void 0:n.tSt)/1e3:i.xSt,e=(null==n?void 0:n.JAt)?(null==n?void 0:n.JAt)/1e3:.5*r,s=(null==n?void 0:n.$At)?(null==n?void 0:n.$At)/1e3:1.5*r,u={minimumOffset:e,maximumOffset:s,targetOffset:r,forceSeekOffset:2.5*r,minimumPlaybackRate:VA,maximumPlaybackRate:jA},this.JW=new BH(this,this.PL,u),this.cq.Ea(this.JW)),[2]}})}).call(this)},n.Zkt=function(t){var n=this.akt;t!==n&&(this.akt&&this.Qkt(this.akt),this.bkt&&this.Ykt(this.bkt),n&&this.Nkt(this.Dkt),this.akt=t,this.bkt=n,this.Hkt(this.akt),this.bkt&&this.Kkt(this.bkt),this.tO.OI=t.ht,this.sO.OI=t.rt,this._Et(t),this.wEt.mn(Fg.pa,this.yEt),i.txt(this.wEt),this.wEt.wn(Fg.pa,this.yEt),this.wEt.OI=t.nt,this.gEt.OI=void 0,this.vEt())},n.be=function(){this.PL.be()},n.we=function(){this.PL.we()},n.Qq=function(t){this.nq||(Er(this.hr()),this.nq=pw(t),this.rq=t,this.So(new Cb(t)))},n.OEt=function(){this.nq=void 0,this.rq=void 0},n.WTt=function(){var t=this.aq;t&&(t.s4&&(t.s4.VY=this.Mz.YY),t.e4&&(t.e4.VY=this.Mz.YY))},n.qTt=function(){var t=this.aq;t&&(t.s4&&(t.s4.zY=this.Mz.zY),t.e4&&(t.e4.zY=this.Mz.zY))},n.determineStallJumpTarget=function(){if(this.akt)return this.akt.gmt()&&this.zx>this.akt.An-TP&&!this.akt.bmt?this.akt.An:void 0},n.hr=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:if(this.ixt)return[2,this.ixt];t.label=1;case 1:return t.trys.push([1,,3,4]),this.ixt=this.sxt(),[4,this.ixt];case 2:return t.sent(),[3,4];case 3:return this.ixt=void 0,[7];case 4:return[2]}})}).call(this)},n.sxt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.vP=1,this.uV.Zg(),this.DEt(),this.eEt(),this.skt.Zg(),this.okt.Zg(),this.$kt=!1,this.jP(),this.d9=!1,this.IEt=!1,this.tO.OI=void 0,this.sO.OI=void 0,this.wEt.OI=void 0,this.gEt.OI=void 0,this.KEt?[4,this.KEt.catch(pn)]:[3,2];case 1:t.sent(),this.KEt=void 0,t.label=2;case 2:return[4,ot.all([this.hkt,this.k9,this.nkt,this.okt.Yy.catch(pn)])];case 3:return t.sent(),this.akt?[4,this.akt.kn(!0)]:[3,5];case 4:t.sent(),this.akt=void 0,t.label=5;case 5:return this.bkt?(this.Ykt(this.bkt),[4,this.bkt.kn(!0)]):[3,7];case 6:t.sent(),this.bkt=void 0,t.label=7;case 7:return[4,this.XTt()];case 8:return t.sent(),this._kt=void 0,this.fEt=void 0,this.xq.mn(Fy.xM,this.jEt),this.xq.hr(),[4,this.zEt.hr()];case 9:return t.sent(),[4,this.GEt.hr()];case 10:return t.sent(),void 0===this.Opt?[3,12]:(this.Gl.XW(this.Opt.Z),[4,this.Opt.kn()]);case 11:t.sent(),this.Opt=void 0,t.label=12;case 12:return this.UEt&&(this.UEt.mn(ch.sy,this.Rs),this.UEt=void 0),this.Pyt?(this.Pyt.jdt.mn(ch.Ww,this.HEt),this.Pyt.jdt.mn(ch.qw,this.WEt),this.Pyt.jdt.mn(fj.jAt,this.qEt),this.Pyt.jdt.mn(vM.Fot,this.tkt),this.Pyt.jdt.mn(ch.oy,this.Rs),[4,this.nEt.kn()]):[3,14];case 13:t.sent(),this.Pyt=void 0,t.label=14;case 14:return this.Mkt=!1,this.nxt=NaN,this.rxt=0,this.hxt=0,this.Akt=void 0,this.t9=!1,this.Ho=LA.rL(),this.FV=!0,this.Y8=void 0,this.oxt=!1,this.Pz=!1,this.$Et=!1,this.okt=new Xa,this.Ekt=0,this.xkt=0,this.Pkt=0,this.Ac=void 0,this.FEt=void 0,this.Zpt=[],this.mEt=void 0,this.cq.hr(),this.JW=void 0,this.jTt={rO:0,hO:0,oO:0},[4,this.Aq.hr()];case 15:return t.sent(),this.PL.Eq(),this.axt.hr(),[2]}})}).call(this)},n.kn=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),this.OEt(),[4,this.hr()];case 1:return t.sent(),this.Vo(),this.tO.kn(),this.sO.kn(),this.wEt.kn(),this.gEt.kn(),this.Gl.kn(),this.xq.kn(),this.Cq.zg(),[4,this.zEt.kn()];case 2:return t.sent(),[4,this.GEt.kn()];case 3:return t.sent(),this.axt.kn(),this.PL.mn(ch.Cw,this.B7),this.PL.mn(mh.Dw,this.U8),this.PL.mn(ch.Nw,this.uxt),this.PL.mn(ch.$w,this.REt),this.PL.mn(ch.Zw,this.BEt),this.PL.mn(ch.Jw,this.Xkt),this.PL.mn(ch.py,this.Nc),this.PL.mn([ch.uo,ch.jw],this.cxt),this.PL.mn(MH,this.Rs),[4,this.Aq.kn()];case 4:return t.sent(),this.Gl.kn(),this.Mz.mn("UY",this.dxt),this.Mz.mn("qY",this.lxt),this.PL.mn(ty.ma,this.fxt),this.PL.mn([ch.xw,ch.Ew],this.Rs),this.PL.mn(ch.Ay,this.Gmt),this.PL.mn(ch.LICENSE_REQUEST_GENERATED,this.xmt),this.PL.Rq=void 0,this.pq.mn("contentProtectionsTracked",this.vxt),this.PL.J7=void 0,[2]}})}).call(this)},n.qP=function(){return this.PL.Ma},n.Aa=function(){return this.PL.Sq},n.YP=function(){return!1},n.JP=function(){},n.ZP=function(){},n.$P=function(){},n.tI=function(){this.ikt(!0)},n.sI=function(t){var i=this.PL.Tq(t);return this.axt.tt(i),i},i.bEt=function(t,i){for(var n,r=[],e=[],s=!i.some(function(t){return t.Glt.some(function(t){return"main"===t.XE})}),u=Ft(i);!(n=u()).done;){var o=n.value;if(-1===r.indexOf(o)){var h=FH(o.olt.concat(o.Glt),s);s=!1;for(var a,c=o.xat.map(function(t){return t.qot}),f=new xL(o,c,h),v=Ft(UH(o,i));!(a=v()).done;){var d=a.value;f.Tlt(d),r.push(d)}e.push(f)}}return new Lj(t,e)},i.AEt=function(t,i){if(t.length){for(var n,r,e=Ft(t);!(r=e()).done;){var s=r.value,u=0===s.xlt.length;n=lH(n,pH(s.Zut,i,u))}return(null==i?void 0:i.preferredKeySystems)&&n&&(n.qpt=AH(n.qpt,i.preferredKeySystems)),n}},i.txt=function(t){for(var i,n=Ft(t.NI);!(i=n()).done;){i.value.Qk=Jp.Nh}},xt(i,[{key:"ht",get:function(){return this.tO}},{key:"ZW",get:function(){var t=this.pkt,i=this.ykt,n=i.zM(t);if(-1!==n)return{Tn:i.Tn(n),An:i.An(n)}}},{key:"ykt",get:function(){var t,i,n,r,e=null!=(n=null==(t=this.akt)?void 0:t.Fx)?n:LA.rL(),s=null!=(r=null==(i=this.bkt)?void 0:i.Fx)?r:LA.rL();return e.HM(s)}},{key:"Fx",get:function(){return this.ykt._s()}},{key:"Vx",get:function(){var t,i=null==(t=this.Pyt)?void 0:t.jdt,n=null==i?void 0:i.hyt;if(i&&n){var r=n.getTime(),e=1e3*this.zx;return new Date(e+r)}},set:function(t){var i,n=null==(i=this.Pyt)?void 0:i.jdt,r=null==n?void 0:n.hyt;if(t&&n&&r){var e=r.getTime()/1e3,s=t.getTime()/1e3;this.Oy(s-e)}}},{key:"bt",get:function(){return this.Ac}},{key:"pkt",get:function(){return void 0!==this.Y8?this.Y8:void 0!==this.Akt?this.Akt:this.PL.zx}},{key:"zx",get:function(){return this.pkt},set:function(t){this.Xx(t)}},{key:"ct",get:function(){var t=NaN;return this.akt&&this.akt.bmt?t=this.akt.An:this.Pyt&&void 0!==this.Pyt.jdt.Km&&(t=this.Pyt.jdt.dyt?this.Pyt.jdt.dyt.Qmt():1/0),t}},{key:"An",get:function(){return this.ct}},{key:"Qx",get:function(){return this.xP?this.J8():!(!this.akt||!this.akt.bmt)&&this.PL.Qx}},{key:"lt",get:function(){return this.nq}},{key:"Jx",get:function(){return this.rq}},{key:"$x",get:function(){}},{key:"iP",get:function(){}},{key:"rP",get:function(){return io({},this.QTt,{aO:Nb.Bg.pW(),uO:this.Ekt,cO:{amountOfBufferedAudioSegments:this.xkt,amountOfBufferedVideoSegments:this.Pkt}})}},{key:"QTt",get:function(){return function(t,i){return{rO:t.rO+i.rO,hO:t.hO+i.hO,oO:t.oO+i.oO}}(this.jTt,this.PL.hP())}},{key:"oP",get:function(){return this.PL.oP},set:function(t){this.PL.oP=t}},{key:"lP",get:function(){return this.t9||this.Ikt&&this.PL.Qx?this.Ckt:this.Rkt}},{key:"vP",get:function(){return this.PL.vP},set:function(t){this.PL.vP=t}},{key:"pP",get:function(){var t=this.Ho;return this.akt&&(t=t.HM(this.Dkt)),t.VM(.1)._s()}},{key:"Dkt",get:function(){return this.PL.pP}},{key:"wP",get:function(){return this.oq},set:function(t){this.oq=t,this.Bkt()}},{key:"AP",get:function(){var t=this.PL.AP;return this.Mkt&&(t=A.max(jy.Qn,t)),t}},{key:"Tkt",get:function(){return this.Lkt(!1)}},{key:"Okt",get:function(){return this.Lkt(!0)}},{key:"kP",get:function(){return this.Tkt._s()}},{key:"xP",get:function(){return this.Pz||this.Fkt}},{key:"Fkt",get:function(){return this.PL.xP}},{key:"n5",get:function(){return this.PL.n5}},{key:"uq",get:function(){}},{key:"Ukt",get:function(){var t,i;return null!=(i=null==(t=this.Pyt)?void 0:t.jdt.Km)?i:UL.AV}},{key:"nt",get:function(){return this.Gl}},{key:"rt",get:function(){return this.sO}},{key:"DP",get:function(){var t;return JR(this.PL)&&(this.PL.DP||(null==(t=this.Vkt())?void 0:t.Mi))||0}},{key:"MP",get:function(){var t;return JR(this.PL)&&(this.PL.MP||(null==(t=this.Vkt())?void 0:t.Ti))||0}},{key:"OP",get:function(){return this.PL.OP},set:function(t){this.PL.OP=Cn(t,0,1)}},{key:"VP",get:function(){return this.cq}},{key:"WP",get:function(){return!1},set:function(t){}},{key:"dq",get:function(){return this.lq}},{key:"Rkt",get:function(){return this.PL.lP}},{key:"cP",get:function(){return this.ASt}},{key:"sP",get:function(){return!1}},{key:"OL",get:function(){var t,i=null==(t=this.Pyt)?void 0:t.jdt;if(i&&i.Km===UL.SV&&i.hyt)return i.Xdt().getTime()/1e3-i.hyt.getTime()/1e3-this.zx}}]),i}(uh);function FH(t,i){var n=t.filter(function(t){return"urn:mpeg:dash:role:2011"===t.x8}).map(function(t){return t.XE}).filter(Fi);return i||Jn(n,"main")?Jn(n,"caption")?"captions":Jn(n,"subtitle")?"subtitles":Jn(n,"dub")?"translation":"main":Jn(n,"sign")?"sign":Jn(n,"description")?"descriptions":Jn(n,"commentary")?"commentary":"alternative"}function UH(t,i){for(var n,r,e,s=function(){var t=e.value,n=Number(t),r=Wn(i,function(t){return t.o===n});r&&h.push(r)},u=Wn([].concat(t.ywt,t.bwt),function(t){return"urn:mpeg:dash:adaptation-set-switching:2016"===t.x8}),o=null!=(r=null==u||null==(n=u.XE)?void 0:n.split(","))?r:[],h=[],a=Ft(o);!(e=a()).done;)s();return h}function VH(t,i){for(var n,r=function(){var t=function(){var t=s.value,i=t.tC;if(!i)return"continue";var n=t.xat.map(function(t){return t.o}),r=Wn(o,function(t){var i=t.xat.map(function(t){return t.o});return ir(n,i)});if(!r)return"continue";var e=i.map(function(t){return t.o});r.tC=r.$I.NI.filter(function(t){return Jn(e,t.o)})},r=n.value,e=Wn(i,function(t){return t.Km===r.Km});if(!e)return"continue";for(var s,u=r.Z,o=e.Z,h=Ft(u);!(s=h()).done;)t()},e=Ft(t);!(n=e()).done;)r()}V(),It(),Wt(),Yt();var jH=function(){function t(t,i,n,r){this.gxt=void 0,this.pxt=void 0,this.mxt=void 0,this.wxt=void 0,this.gxt=t,this.pxt=i,this.mxt=n,this.wxt=r}var i=t.prototype;return i.hTt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.gxt._xt(t.map(Jj))];case 1:return[2,i.sent().shift()]}})}).call(this)},i.sdt=function(t,i){var n=Zj(t,i);return this.pxt.qy(n)},i.Aut=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return r=Zj(t,i),[4,this.mxt.zy(r)];case 1:return[2,null==(n=e.sent())?void 0:n.data]}})}).call(this)},i.jJ=function(t){return this.wxt.zy(t)},t}();V(),It(),Bt(),V(),It(),V(),It();var HH=function(){function t(){}var i=t.prototype;return i.yxt=function(t){return ot.resolve(!1)},i.uTt=function(t){return ot.reject(WH)},i.bxt=function(t){return ot.reject(WH)},i.qy=function(t){return ot.resolve(!1)},i.zy=function(t){return ot.resolve(void 0)},i.Axt=function(t,i){return ot.resolve(void 0)},i._xt=function(t){return ot.resolve([])},i.Sxt=function(){return ot.resolve([])},i.Txt=function(t){return ot.resolve([])},i.kxt=function(t,i){return ot.resolve([])},i.pS=function(t){return ot.reject(WH)},i.Ext=function(t){return ot.reject(WH)},i.xxt=function(){return ot.reject(WH)},t}(),WH="Storage disabled",zH=function(){function t(){this.Nxt=void 0,this.bct=void 0,this.Bxt=void 0,this.Mxt=void 0,this.Lxt=void 0,this.Nxt=new HH,this.bct=new HH,this.Bxt=new HH,this.Mxt=new HH,this.Lxt=new HH}return t.prototype.Rxt=function(t){return ot.reject(qH)},t.jet=function(){return ot.resolve(new t)},t}(),qH="Storage disabled";V(),It(),Wt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Bt(),Yt();var XH=function(){function t(t){var i=this;this.Jg=new Xa,this.Ixt=void 0,this.Jg.$g(t),this.Jg.Yy.then(function(t){i.Ixt=t})}var i=t.prototype;return i.yxt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Ixt)?[3,2]:[4,this.Pxt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.yxt(t)]}})}).call(this)},i.uTt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return(n=this.Ixt)?[3,2]:[4,this.Pxt];case 1:n=r.sent(),r.label=2;case 2:return[2,n.uTt(t,i)]}})}).call(this)},i.bxt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return(n=this.Ixt)?[3,2]:[4,this.Pxt];case 1:n=r.sent(),r.label=2;case 2:return[2,n.bxt(t,i)]}})}).call(this)},i.qy=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Ixt)?[3,2]:[4,this.Pxt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.qy(t)]}})}).call(this)},i.zy=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Ixt)?[3,2]:[4,this.Pxt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.zy(t)]}})}).call(this)},i.Axt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return(n=this.Ixt)?[3,2]:[4,this.Pxt];case 1:n=r.sent(),r.label=2;case 2:return[2,n.Axt(t,i)]}})}).call(this)},i._xt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Ixt)?[3,2]:[4,this.Pxt];case 1:i=n.sent(),n.label=2;case 2:return[2,i._xt(t)]}})}).call(this)},i.Sxt=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(t=this.Ixt)?[3,2]:[4,this.Pxt];case 1:t=i.sent(),i.label=2;case 2:return[2,t.Sxt()]}})}).call(this)},i.Txt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Ixt)?[3,2]:[4,this.Pxt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.Txt(t)]}})}).call(this)},i.kxt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return(n=this.Ixt)?[3,2]:[4,this.Pxt];case 1:n=r.sent(),r.label=2;case 2:return[2,n.kxt(t,i)]}})}).call(this)},i.pS=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Ixt)?[3,2]:[4,this.Pxt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.pS(t)]}})}).call(this)},i.Ext=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Ixt)?[3,2]:[4,this.Pxt];case 1:i=n.sent(),n.label=2;case 2:return[2,i.Ext(t)]}})}).call(this)},i.xxt=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(t=this.Ixt)?[3,2]:[4,this.Pxt];case 1:t=i.sent(),i.label=2;case 2:return[2,t.xxt()]}})}).call(this)},xt(t,[{key:"Pxt",get:function(){return this.Jg.Yy}}]),t}(),GH=function(){function t(t){var i=this;this.Jg=new Xa,this.Dxt=void 0,this.bct=void 0,this.Nxt=void 0,this.Bxt=void 0,this.Mxt=void 0,this.Lxt=void 0,this.Jg.$g(t);var n=this.Jg.Yy;n.then(function(t){i.Dxt=t}),this.bct=new XH(n.then(function(t){return t.bct})),this.Nxt=new XH(n.then(function(t){return t.Nxt})),this.Bxt=new XH(n.then(function(t){return t.Bxt})),this.Mxt=new XH(n.then(function(t){return t.Mxt})),this.Lxt=new XH(n.then(function(t){return t.Lxt}))}return t.prototype.Rxt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return(i=this.Dxt)?[3,2]:[4,this.Cxt];case 1:i=n.sent(),n.label=2;case 2:return[4,i.Rxt(t)];case 3:return[2,n.sent()]}})}).call(this)},xt(t,[{key:"Cxt",get:function(){return this.Jg.Yy}}]),t}();function QH(t){return new y("This storage cannot handle persistency type "+t)}V(),It(),V(),It(),Ut(),V(),It();var YH=function(t){return t.Oxt="readonly",t.Fxt="readwrite",t}({}),$H=function(){function t(){this.Lb=[]}var i=t.prototype;return i.yxt=function(t){return ot.resolve("temporary"===t)},i.uTt=function(t,i){return void 0===i&&(i="temporary"),"temporary"!==i?ot.reject(QH(i)):(this.Uxt(t.key),this.Lb.push(t),ot.resolve())},i.bxt=function(t,i){if(void 0===i&&(i="temporary"),"temporary"!==i)return ot.reject(QH(i));for(var n,r=Ft(t);!(n=r()).done;){var e=n.value;this.Uxt(e.key)}for(var s,u=Ft(t);!(s=u()).done;){var o=s.value;this.Lb.push(o)}return ot.resolve()},i.qy=function(t){return ot.resolve(Boolean(this.Vxt(t)))},i.zy=function(t){return ot.resolve(this.Vxt(t))},i.Axt=function(t,i){return ot.resolve(this.Hxt(t,i))},i._xt=function(t){var i=this,n=t?t.map(function(t){return i.Vxt(t)}):this.Lb;return ot.resolve(n.filter(Fi))},i.Sxt=function(){return ot.resolve([].concat(this.Lb))},i.Txt=function(t){return this.kxt(t,"key")},i.kxt=function(t,i){var n=this.Lb.filter(function(n){return n[i]===t});return ot.resolve(n)},i.pS=function(t){return this.Uxt(t),ot.resolve()},i.Ext=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;this.Uxt(r)}return ot.resolve()},i.xxt=function(){return tr(this.Lb),ot.resolve()},i.Vxt=function(t){return this.Hxt(t,"key")},i.Hxt=function(t,i){for(var n,r=Ft(this.Lb);!(n=r()).done;){var e=n.value;if(e[i]===t)return e}},i.Uxt=function(t){var i=this.Vxt(t);i&&Yn(this.Lb,i)},t}(),KH=function(){function t(){this.Nxt=void 0,this.bct=void 0,this.Bxt=void 0,this.Mxt=void 0,this.Lxt=void 0,this.Nxt=new $H,this.bct=new $H,this.Bxt=new $H,this.Mxt=new $H,this.Lxt=new $H}return t.prototype.Rxt=function(t){return t(this)},t.jet=function(){return ot.resolve(new t)},t}();V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Ut(),Yt();var JH=function(){function t(t){this.Wxt=void 0,this.Wxt=t}var i=t.prototype;return i.yxt=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=Ft(this.Wxt),r.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value.yxt(t)];case 2:if(r.sent())return[2,!0];r.label=3;case 3:return[3,1];case 4:return[2,!1]}})}).call(this)},i.uTt=function(t,i){return void 0===i&&(i="persistent"),jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Ft(this.Wxt),s.label=1;case 1:return(r=n()).done?[3,4]:[4,(e=r.value).yxt(i)];case 2:if(s.sent())return[2,e.uTt(t)];s.label=3;case 3:return[3,1];case 4:throw QH(i)}})}).call(this)},i.bxt=function(t,i){return void 0===i&&(i="persistent"),jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Ft(this.Wxt),s.label=1;case 1:return(r=n()).done?[3,4]:[4,(e=r.value).yxt(i)];case 2:if(s.sent())return[2,e.bxt(t)];s.label=3;case 3:return[3,1];case 4:throw QH(i)}})}).call(this)},i.qy=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=Ft(this.Wxt),r.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value.qy(t)];case 2:if(r.sent())return[2,!0];r.label=3;case 3:return[3,1];case 4:return[2,!1]}})}).call(this)},i.zy=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:i=Ft(this.Wxt),e.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value.zy(t)];case 2:if(r=e.sent())return[2,r];e.label=3;case 3:return[3,1];case 4:return[2,void 0]}})}).call(this)},i.Axt=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Ft(this.Wxt),s.label=1;case 1:return(r=n()).done?[3,4]:[4,r.value.Axt(t,i)];case 2:if(e=s.sent())return[2,e];s.label=3;case 3:return[3,1];case 4:return[2,void 0]}})}).call(this)},i._xt=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:i=[],n=Ft(this.Wxt),f.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,o=(u=(s=i).push).apply,h=[s],c=(a=[]).concat,[4,e._xt(t)]);case 2:o.apply(u,h.concat([c.apply(a,[f.sent()])])),f.label=3;case 3:return[3,1];case 4:return[2,i]}})}).call(this)},i.Sxt=function(){return jt(function(){var t,i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:t=[],i=Ft(this.Wxt),c.label=1;case 1:return(n=i()).done?[3,4]:(r=n.value,u=(s=(e=t).push).apply,o=[e],a=(h=[]).concat,[4,r.Sxt()]);case 2:u.apply(s,o.concat([a.apply(h,[c.sent()])])),c.label=3;case 3:return[3,1];case 4:return[2,t]}})}).call(this)},i.Txt=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:i=[],n=Ft(this.Wxt),f.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,o=(u=(s=i).push).apply,h=[s],c=(a=[]).concat,[4,e.Txt(t)]);case 2:o.apply(u,h.concat([c.apply(a,[f.sent()])])),f.label=3;case 3:return[3,1];case 4:return[2,i]}})}).call(this)},i.kxt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:n=[],r=Ft(this.Wxt),v.label=1;case 1:return(e=r()).done?[3,4]:(s=e.value,h=(o=(u=n).push).apply,a=[u],f=(c=[]).concat,[4,s.kxt(t,i)]);case 2:h.apply(o,a.concat([f.apply(c,[v.sent()])])),v.label=3;case 3:return[3,1];case 4:return[2,n]}})}).call(this)},i.pS=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=Ft(this.Wxt),r.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value.pS(t)];case 2:r.sent(),r.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},i.Ext=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:i=Ft(this.Wxt),r.label=1;case 1:return(n=i()).done?[3,4]:[4,n.value.Ext(t)];case 2:r.sent(),r.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},i.xxt=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:t=Ft(this.Wxt),n.label=1;case 1:return(i=t()).done?[3,4]:[4,i.value.xxt()];case 2:n.sent(),n.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},t}();function ZH(t){return function(){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,ot.all(t.map(function(t){return t()}))];case 1:return i=n.sent(),[2,tW.jet(i)]}})})()}}var tW=function(){function t(t){this.Qxt=void 0,this.qxt=void 0,this.zxt=void 0,this.Gxt=void 0,this.Xxt=void 0,this.jxt=void 0,this.Qxt=t,this.qxt=new JH(t.map(function(t){return t.Mxt})),this.zxt=new JH(t.map(function(t){return t.Lxt})),this.Gxt=new JH(t.map(function(t){return t.Bxt})),this.Xxt=new JH(t.map(function(t){return t.Nxt})),this.jxt=new JH(t.map(function(t){return t.bct}))}return t.prototype.Rxt=function(i){var n=this;if(0===this.Qxt.length)return i(this);var r=[],e=0,s=function(u){return r.push(u),++e0)return A.max(0,t.Tn(0)-300)}return 0},n.E9=function(i,n,r,e,s,u,o,h){return void 0===u&&(u=!1),void 0===o&&(o=Qj.$St),void 0===h&&(h=!1),h||(h=this.ct===1/0&&Oi.w_&&Oi.b_<3&&i<=this.zx),t.prototype.E9.call(this,i,n,r,e,s,u,o,h)},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return n.sent(),this.ePt=void 0,this.PL.tPt=0,[2]}})}).call(this)},n.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.PL.zg()];case 2:return n.sent(),[4,this.Nq.Dq(this.PL)];case 3:return n.sent(),[2]}})}).call(this)},i.US=function(t){var i;return(!t||"google-dai"!==(null==t||null==(i=t.ssai)?void 0:i.integration))&&(Oi.w_&&Oi.b_<4)},i}(rW);V(),It(),Wt(),Dt(),Yt(),V(),It(),Wt(),Dt(),H(),Yt(),V(),It(),Bt(),Dt(),V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It(),Bt(),Dt();var wW=function(t){function i(i){return t.call(this,i)||this}return Pt(i,t),xt(i,[{key:"Zrt",get:function(){return this.PL}},{key:"DP",get:function(){return this.PL.DP}},{key:"MP",get:function(){return this.PL.MP}}]),i}(YO);V(),It(),Wt(),Dt(),Yt(),V(),It(),Wt(),Dt(),Yt(),V(),It(),Wt(),Dt(),Ut(),Yt();var mW=function(t){function i(i){var n;return(n=t.call(this,i)||this).C3=void 0,n.nPt=void 0,n.ZY=0,n.rPt=LA.rL(),n.ZS=void 0,n.hPt=LA.rL(),n.cPt=[],n.yPt=!1,n.KY=0,n.ZS=i.Cd,n}Pt(i,t);var n=i.prototype;return n.Vrt=function(){return this.nPt?this.ZY:t.prototype.Vrt.call(this)},n.Hrt=function(i){this.nPt?this.ZY=i:t.prototype.Hrt.call(this,i)},n.Ux=function(){return this.nPt?this.rPt:t.prototype.Ux.call(this)},n.NS=function(){return this.nPt?this.ZS:t.prototype.NS.call(this)},n.qrt=function(){return this.nPt?this.hPt:t.prototype.qrt.call(this)},n.zrt=function(){return this.nPt?this.KY:t.prototype.zrt.call(this)},n.Grt=function(i){this.nPt?this.KY=i:t.prototype.Grt.call(this,i)},n.Q2=function(t,i,n){var r=this;return this.K2(function(n){return r.oPt(t,i,n)},n)},n.oPt=function(i,n,r){return t.prototype.Q2.call(this,i,n,r)},n.j3=function(){var t=this;return this.K2(function(){return t.aPt()})},n.aPt=function(){return t.prototype.j3.call(this)},n.J2=function(t,i,n){var r=this;return this.K2(function(n){return r.uPt(t,i,n)},n)},n.uPt=function(i,n,r){return t.prototype.J2.call(this,i,n,r)},n.G3=function(t,i){this.nPt?(this.hPt=this.hPt.HM(new LA([t,i])),this.cPt.push({Km:"_ct",CO:t,RO:i})):this.dPt(t,i)},n.dPt=function(i,n){t.prototype.G3.call(this,i,n)},n.f3=function(t,i){var n=this;return this.K2(function(){return n.lPt(t,i)})},n.lPt=function(i,n){return t.prototype.f3.call(this,i,n)},n.X3=function(t,i){this.nPt?(this.hPt=this.hPt.qM(new LA([t,i])),this.cPt.push({Km:"pS",CO:t,RO:i})):this.fPt(t,i)},n.fPt=function(i,n){t.prototype.X3.call(this,i,n)},n.pS=function(t,i,n){var r=this;return this.K2(function(n){return r.vPt(t,i,n)},n)},n.vPt=function(i,n,r){return t.prototype.pS.call(this,i,n,r)},n.RZ=function(t){var i=this;return this.K2(function(){return i._Pt(t)})},n._Pt=function(i){return t.prototype.RZ.call(this,i)},n.K2=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:this.A3(),n.label=1;case 1:return this.nPt?[4,kr(this.nPt.Yy,i)]:[3,3];case 2:return n.sent(),this.A3(),[3,1];case 3:pr(i),n.label=4;case 4:return n.trys.push([4,,6,7]),this.C3=t(i),[4,this.C3];case 5:return n.sent(),[3,7];case 6:return this.C3=void 0,[7];case 7:return[2]}})}).call(this)},n.A3=function(){if(this.C3)throw new y("Internal error")},n.gPt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:if(this.nPt)throw new _("Already locked");return this.nPt=new Xa,this.pPt(),this.C3?[4,this.C3.catch(pn)]:[3,2];case 1:t.sent(),this.pPt(),t.label=2;case 2:return[2]}})}).call(this)},n.mPt=function(){var t=this.nPt;void 0!==t&&(t.Qy(),this.nPt=void 0,this.wPt())},n.pPt=function(){this.ZS=t.prototype.NS.call(this),this.ZY=t.prototype.Vrt.call(this),this.KY=t.prototype.zrt.call(this),this.rPt=t.prototype.Ux.call(this),this.hPt=t.prototype.qrt.call(this),this.yPt=!1},n.wPt=function(){this.A3(),t.prototype.Hrt.call(this,this.ZY),t.prototype.Grt.call(this,this.KY);var i=this.cPt.slice();tr(this.cPt);for(var n,r=Ft(i);!(n=r()).done;){var e=n.value;"_ct"===e.Km?this.dPt(e.CO,e.RO):this.fPt(e.CO,e.RO)}this.rPt.KM(t.prototype.Ux.call(this))||this.So(new ah(tC.pZ))},n.zg=function(){var i;null==(i=this.nPt)||i.Zg(),this.nPt=void 0,t.prototype.zg.call(this)},i}(zO),pW=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).wE=void 0,r.bPt=void 0,r.wE=i,r}Pt(i,t);var n=i.prototype;return n.Ux=function(){var i,n;return t.prototype.Ux.call(this).HM(null!=(n=null==(i=this.bPt)?void 0:i.Fx)?n:LA.rL())},n.qrt=function(){var i,n;return t.prototype.qrt.call(this).HM(null!=(n=null==(i=this.bPt)?void 0:i.W3)?n:LA.rL())},n.Hrt=function(i){t.prototype.Hrt.call(this,i),this.bPt&&(this.bPt.zY=i)},n.Grt=function(i){t.prototype.Grt.call(this,i),this.bPt&&(this.bPt.VY=i)},n.dPt=function(i,n){t.prototype.dPt.call(this,i,n),this.bPt&&this.bPt.G3(i,n)},n.fPt=function(i,n){t.prototype.fPt.call(this,i,n),this.bPt&&this.bPt.X3(i,n)},n.vPt=function(i,n,r){var e=this;return jt(function(){var s;return zt(this,function(u){switch(u.label){case 0:return pr(r),(s=[]).push(t.prototype.vPt.call(e,i,n,r)),this.bPt&&s.push(this.bPt.pS(i,n,r)),[4,ot.all(s)];case 1:return u.sent(),[2]}})}).call(this)},n.IZ=function(i){return!!t.prototype.IZ.call(this,i)||this.wE.APt(i)},n._Pt=function(i){return t.prototype.IZ.call(this,i)?t.prototype._Pt.call(this,i):this.wE.SPt(i)},n.TPt=function(t){var i,n;null==(i=this.bPt)||i.mn(iC,this.Xrt),this.bPt=t,null==(n=this.bPt)||n.wn(iC,this.Xrt)},i}(mW),yW=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).wE=void 0,r.kPt=void 0,r.Zb=NaN,r.RPt=!1,r.DPt=!1,r.NPt=void 0,r.Brt(n),r.wE=i,r}Pt(i,t);var n=i.prototype;return n.IZ=function(i){return!!NN(this,i)&&(!!t.prototype.IZ.call(this,i)||(!(!this.kPt||!this.kPt.IZ(i))||this.wE.EPt(i)))},n.RZ=function(i){var n=this;return jt(function(){return zt(this,function(r){switch(r.label){case 0:return t.prototype.IZ.call(n,i)?[4,t.prototype.RZ.call(n,i)]:[3,2];case 1:case 3:case 6:return[2,r.sent()];case 2:return this.kPt&&this.kPt.IZ(i)?(this.xPt(),[4,this.RZ(i)]):[3,4];case 4:return[4,this.wE.PPt(i)];case 5:return r.sent(),[4,this.RZ(i)];case 7:return[2]}})}).call(this)},n.APt=function(t){return this.IZ(this.IPt(t))},n.SPt=function(t){return this.RZ(this.IPt(t))},n.IPt=function(t){var i=this.Cd,n=i.q4.map(function(i){return Qv(t.GT)&&Qv(i.GT)||Yv(t.GT)&&Yv(i.GT)?t:i});return io({},i,{q4:n})},n.W4=function(i,n,r,e){t.prototype.W4.call(this,i,n,r,e),this.kPt&&this.kPt.W4(i,n,r,e)},n.CPt=function(){return!this.RPt&&this.DPt},n.Nd=function(){return void 0!==this.NPt?this.NPt:this.CPt()?this.Zb:t.prototype.Nd.call(this)},n.F4=function(i){this.Zb=i,this.NPt=void 0,this.CPt()||t.prototype.F4.call(this,i)},n.Nrt=function(){return!this.CPt()&&t.prototype.Nrt.call(this)},n.F3=function(){this.NPt=A.max(_W(this.aq.e4),_W(this.aq.s4)),this.CPt()||t.prototype.F3.call(this)},n.I3=function(){this.NPt=void 0,this.CPt()||t.prototype.I3.call(this)},n.Lrt=function(t){return new pW(this,t)},n.BPt=function(){this.RPt=!this.RPt},n.xPt=function(){var t=this.aq,i=this.kPt;i&&(this.RPt=!this.RPt,this.Brt(i),this.MPt(t),this.CPt()&&this.LPt())},n.MPt=function(t){var i,n;this.kPt=t,null==(i=this.B4)||i.TPt(null==t?void 0:t.e4),null==(n=this.M4)||n.TPt(null==t?void 0:t.s4)},n.OPt=function(t){var i=this.aq,n=this.kPt;if(n){var r=this.RPt,e=r?i:n,s=(r?n:i).Fx.iL(t);if(s){var u=fM(e.Fx,this.qrt()).iL(s.An(0),me);if(u&&!(s.An(0)+me>=u.An(0)))return A.max(s.An(0),u.Tn(0))}}},n.FPt=function(t,i){var n=this;if(this.DPt)return ot.resolve();var r=this.RPt?this.kPt:this.aq;return r?(this.DPt=!0,this.UPt(function(i){if(pr(i),n.DPt)return function(t,i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return pr(n),r=[],t.e4&&r.push(bP(t.e4,i,n)),t.s4&&r.push(bP(t.s4,i,n)),[4,ot.all(r)];case 1:return e.sent(),t.F3(),[2]}})})()}(r,t,i)},i)):ot.resolve()},n.LPt=function(){if(this.DPt){var t=this.RPt?this.kPt:this.aq;if(t){var i;0,this.DPt=!1;var n=null!=(i=this.NPt)?i:this.Zb;t.ct0?i.An(i.V-1):0}var kW=function(t){function i(i,n,r){var e;return(e=t.call(this,i)||this).WPt=void 0,e.Gl=void 0,e.iV=void 0,e.qPt=!1,e.Y8=void 0,e.x9=NaN,e.Ho=LA.rL(),e.Cz=!0,e.tIt=!1,e.kz=!0,e.jPt=void 0,e.KPt=void 0,e.GPt=void 0,e.zPt=new dr,e.T9=new dr,e.WPt=n,e.jPt=i,e.PL.be(),e.WPt.we(),e.iV=new aW(e,r),e.Gl=new Fb([e.iV.nt,t.prototype.RP.call(sW(e))]),e}Pt(i,t);var n=i.prototype;return n.Ux=function(){return t.prototype.Ux.call(this).HM(this.WPt.Fx)},n.Nd=function(){if(!this.qPt){var i=this.aq;if(i&&YR(i))return i.ct}return t.prototype.Nd.call(this)},n.tht=function(){return!!t.prototype.tht.call(this)&&!(!this.qPt&&!this.jZ())},n.iht=function(){return!!t.prototype.iht.call(this)&&!(!this.qPt&&t.prototype.tht.call(this)&&!this.jZ())},n.jZ=function(){var t=this.aq;return!(!t||!YR(t))&&t.jZ},n.mP=function(){return this.Ho.HM(this.PL.pP)},n.EP=function(){return t.prototype.EP.call(this).HM(this.WPt.kP)},n.TP=function(){return t.prototype.TP.call(this)},n.$rt=function(){var i;return null!=(i=t.prototype.$rt.call(this))?i:this.WPt.uq},n.QP=function(){return this.Cz=!1,t.prototype.QP.call(this)},n.jP=function(){this.Cz=!0,t.prototype.jP.call(this)},n.G7=function(){this.qPt=!0,t.prototype.G7.call(this),this.WPt.G7()},n.X7=function(){this.qPt=!1,t.prototype.X7.call(this),this.WPt.G7()},n.Gx=function(){var i;return null!=(i=this.Y8)?i:t.prototype.Gx.call(this)},n.PP=function(){return void 0!==this.Y8||t.prototype.PP.call(this)},n.Oy=function(t,i,n){void 0===i&&(i=!1),void 0===n&&(n=!1),this.zPt.Zg(),this.T9.Zg(),this.T9=new dr,this.GPt=br(this.E9(t,i,n,this.GPt,this.T9.Yg),this.T9).catch(pn)},n.E9=function(i,n,r,e,s){var u=this;return jt(function(){return zt(this,function(o){switch(o.label){case 0:return this.Y8=i,this.x9=i,this.So(new ET(i)),e?[4,e.catch(pn)]:[3,2];case 1:o.sent(),o.label=2;case 2:return pr(s),this.aq&&YR(this.aq)&&this.aq.LPt(),this.Y8=void 0,t.prototype.Oy.call(u,i,n,r),this.WPt.Oy(i,n,r),this.XPt(),[2]}})}).call(this)},n.$W=function(t){var i=this.uq;if(i&&!E(i.getTime())){var n=(t.getTime()-i.getTime())/1e3;this.Oy(n)}},n.K7=function(){t.prototype.K7.call(this),this.WPt.K7()},n.we=function(){this.kz&&(this.kz=!1,this.jPt.we())},n.be=function(){this.kz||(this.kz=!0,this.jPt.be())},n.QPt=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.Y8=void 0,this.x9=NaN,this.Ho=LA.rL(),null==(t=this.KPt)||t.Zg(),this.zPt.Zg(),this.T9.Zg(),this.GPt?[4,this.GPt.catch(pn)]:[3,2];case 1:i.sent(),this.GPt=void 0,i.label=2;case 2:return[2]}})}).call(this)},n.hht=function(i){t.prototype.hht.call(this,i),this.WPt.Rq=i},n.oht=function(i){t.prototype.oht.call(this,i),this.WPt.J7=i},n.RP=function(){return this.Gl},n.sI=function(t,i,n,r,e,s,u,o){return this.iV.sI(t,i,n,r,e,s,u,o)},n.Tq=function(t){return this.iV.Tq(t)},n.bq=function(t,i,n,r,e){throw new y("Not implemented yet")},n.wq=function(){return!1},n.rV=function(t){this.iV.rV(t)},n.Eq=function(){this.iV.hr(),t.prototype.Eq.call(this)},n.Un=function(i){var n=this;return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Un.call(n,i)];case 1:return YR(r=e.sent())&&this.XPt(),[2,r]}})}).call(this)},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.QPt()];case 1:return n.sent(),[4,t.prototype.hr.call(i)];case 2:return n.sent(),[4,this.WPt.hr()];case 3:return n.sent(),[2]}})}).call(this)},n.F8=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.QPt()];case 1:return n.sent(),[4,t.prototype.F8.call(i)];case 2:return n.sent(),[4,this.WPt.F8()];case 3:return n.sent(),[2]}})}).call(this)},n.zg=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.QPt()];case 1:return n.sent(),this.iV.kn(),this.Gl.kn(),[4,t.prototype.zg.call(i)];case 2:return n.sent(),[2]}})}).call(this)},n.cht=function(t){return new yW(this,t)},n.uht=function(t){return new GO(t)},n.XPt=function(){this.zPt.Zg(),this.zPt=new dr,this.GPt=br(this.YPt(this.GPt,this.zPt.Yg),this.zPt).catch(pn)},n.YPt=function(t,i){return jt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return t?[4,t.catch(pn)]:[3,2];case 1:u.sent(),u.label=2;case 2:if(!this.aq||!YR(this.aq))return[2];u.label=3;case 3:0,pr(i),this.JPt()&&this.BPt(),n=void 0,this.aq.LPt(),pr(i),u.label=4;case 4:0,r={stack:[],error:void 0,hasError:!1},u.label=5;case 5:return u.trys.push([5,9,10,11]),pr(i),this.JPt()?[3,12]:void 0===(n=this.aq.OPt(this.Gx()))?[3,7]:(this.ZPt(),[4,this.aq.FPt(n,i)]);case 6:return u.sent(),pr(i),this.WPt.Oy(n),[3,12];case 7:return e=Xt(r,dr.ep([i]),!1),[4,ot.race([this.ww(ch.py,e.Yg),this.$Pt(e.Yg)])];case 8:return u.sent(),[3,11];case 9:return s=u.sent(),r.error=s,r.hasError=!0,[3,11];case 10:return Gt(r),[7];case 11:return[3,4];case 12:pr(i),u.label=13;case 13:return this.JPt()?[3,15]:[4,this.PL.ww([ch.py,ch.Nw,Fy.AI],i)];case 14:return u.sent(),[3,13];case 15:return[3,3];case 16:return[2]}})}).call(this)},n.JPt=function(){var t=this.aq;if(void 0===t||!YR(t))return!1;var i=this.Gx(),n=this.PL.Fx;return!(!this.PL.Qx&&n.Cr(i))&&!!fM(this.WPt.Fx,t.qrt()).jM(i,i+me)},n.BPt=function(){if(!this.tIt){0,this.tIt=!0,this.Ho=this.mP();var t=MP(this),i=this.PP(),n=this.TP(),r=this.PL,e=this.WPt,s=this.aq;s.LPt(),s.BPt(),LP(e,t),this.fht(e),this.WPt=r,r.jP(),r.oP=!0,this.tIt=!1;var u=this.PP();i!==u&&(u?this.So(new ET(this.zx)):this.So(new IT(this.zx)));var o=this.TP();n!==o&&this.So(new Vy(this.zx,o)),u||this.ZPt()}},n.ZPt=function(){var t=this.PL,i=this.jPt;if(i!==t){0;var n=this.MP,r=this.DP;this.jPt=t,this.kz&&(i.we(),t.be());var e=this.MP,s=this.DP;e>0&&s>0&&(n!==e||r!==s)&&this.So(new My)}},n.EPt=function(t){return void 0!==this.WPt.$Z([t])},n.PPt=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return this.ZPt(),i=this.aq,[4,(n=this.WPt).hr()];case 1:return e.sent(),[4,n.Un(t)];case 2:return r=e.sent(),i.VPt(r),[2]}})}).call(this)},n.$Pt=function(t){return this.KPt=new Xa,kr(this.KPt.Yy,t)},n.B3=function(){var t;null==(t=this.KPt)||t.Qy()},n.iI=function(i){i.type===ch.$w&&this.x9===i.currentTime||(i.type===ch.Zw&&(this.x9=NaN,this.ZPt()),i.type!==Fy.AI&&i.type!==ch.jw&&i.type!==ch.Nw||this.tIt||!this.JPt()?(i.type!==ch.Nw||this.Qx)&&t.prototype.iI.call(this,i):this.XPt())},xt(i,[{key:"HPt",get:function(){return this.WPt}},{key:"DP",get:function(){return this.jPt.DP}},{key:"MP",get:function(){return this.jPt.MP}}]),i}(wW),bW=function(t){function i(i,n){var r;return(r=t.call(this,i,n,new hN)||this).bet=void 0,r.Aet=void 0,r.$L=void 0,r.$L=new XT(i.Sq),r.bet=new XN,r.bet.Y7(i.hq.parentElement),r.Aet=new gB(r.bet.xe,r.Wu,r.nt,r.Ql,r.Ma,r.Sq),r}Pt(i,t);var n=i.prototype;return n.we=function(){t.prototype.we.call(this),this.bet.we()},n.be=function(){t.prototype.be.call(this),this.bet.be()},n.Y7=function(t){this.PL.Y7(t),this.WPt.Y7(t)},n.$P=function(){this.PL.$P(),this.WPt.$P()},n.zP=function(){return this.PL.zP()},n.Aa=function(){return this.$L},n.fht=function(i){var n=this.qP(),r=this.zP();t.prototype.fht.call(this,i),this.$L.OI=i.Sq,this.qP()!==n&&this.So(new jT),this.zP()!==r&&this.So(new HT)},n.zg=function(){return this.$L.kn(),this.Aet.kn(),this.bet.kn(),t.prototype.zg.call(this)},xt(i,[{key:"Zrt",get:function(){return this.PL}},{key:"HPt",get:function(){return this.WPt}},{key:"hq",get:function(){return this.PL.hq}},{key:"d5",get:function(){return this.PL.d5}},{key:"WP",get:function(){return this.PL.WP},set:function(t){this.PL.WP=t}}]),i}(kW),AW=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.Yq=function(i){if(i===vw.Mk){var n=t.prototype.Yq.call(this,i),r=t.prototype.Yq.call(this,i);return new bW(n,r)}return t.prototype.Yq.call(this,i)},n.Dq=function(i){var n=this,r=function(){return t.prototype.Dq};return jt(function(){return zt(this,function(t){switch(t.label){case 0:return j(i,bW)?[4,i.zg()]:[3,4];case 1:return t.sent(),[4,r().call(n,i.Zrt)];case 2:return t.sent(),[4,r().call(n,i.HPt)];case 3:return t.sent(),[3,6];case 4:return[4,r().call(n,i)];case 5:t.sent(),t.label=6;case 6:return[2]}})})()},i}(UO),TW=function(t){function i(i,n,r,e,s,u,o){var h,a=new tM(new AW(s)),c=a.Yq(u);return(h=t.call(this,i,n,r,e,c,o)||this).Nq=void 0,h.Nq=a,h}return Pt(i,t),i.prototype.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.Nq.Dq(this.PL)];case 2:return n.sent(),[2]}})}).call(this)},i.US=function(t){var i;return!Oi.Ks&&!Oi.og&&!(t&&"google-dai"===(null==(i=t.ssai)?void 0:i.integration))},i}(rW);V(),It(),Wt(),Dt(),Yt(),V(),It(),Wt(),Dt(),Yt(),V(),It(),Wt(),Dt(),Yt();var SW=function(t){function i(i){var n;return(n=t.call(this,i)||this).iIt=!1,n.rPt=LA.rL(),n.ZS=void 0,n.Zb=0,n.eIt=!1,n.Wet=!1,n.yPt=void 0,n.H4=LA.rL(),n.sIt=void 0,n.Brt(i),n.ZS=i.Cd,n}Pt(i,t);var n=i.prototype;return n.Lrt=function(t){return new mW(t)},n.NS=function(){return this.iIt?this.ZS:t.prototype.NS.call(this)},n.Ux=function(){return this.iIt?this.rPt:t.prototype.Ux.call(this)},n.Nd=function(){return this.iIt?this.Zb:t.prototype.Nd.call(this)},n.F4=function(i){this.iIt?(this.Zb=i,this.eIt=!0):t.prototype.F4.call(this,i)},n.EP=function(){return this.iIt?this.sIt?this.sIt.J3():this.H4:t.prototype.EP.call(this)},n.W4=function(i,n,r,e){this.iIt?this.sIt=new _P(i,n,r,e):t.prototype.W4.call(this,i,n,r,e)},n.Nrt=function(){return this.iIt?this.Wet&&!1!==this.yPt:t.prototype.Nrt.call(this)},n.F3=function(){this.iIt?this.yPt=!0:t.prototype.F3.call(this)},n.I3=function(){this.iIt?this.yPt=!1:t.prototype.I3.call(this)},n.IZ=function(i){return!this.iIt&&t.prototype.IZ.call(this,i)},n.RZ=function(i){return this.iIt?ot.reject(new _("Not supported")):t.prototype.RZ.call(this,i)},n.gPt=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:if(this.iIt)throw new _("Already locked");return this.iIt=!0,this.pPt(),t=[],this.B4&&t.push(this.B4.gPt()),this.M4&&t.push(this.M4.gPt()),[4,ot.all(t)];case 1:return i.sent(),[2]}})}).call(this)},n.mPt=function(){this.iIt=!1,this.B4&&this.B4.mPt(),this.M4&&this.M4.mPt(),this.wPt()},n.pPt=function(){this.ZS=t.prototype.NS.call(this),this.rPt=t.prototype.Ux.call(this),this.Zb=t.prototype.Nd.call(this),this.H4=t.prototype.EP.call(this),this.eIt=!1,this.yPt=void 0,this.sIt=void 0},n.wPt=function(){if(this.eIt&&(t.prototype.F4.call(this,this.Zb),this.eIt=!1),void 0!==this.sIt){var i=this.sIt;t.prototype.W4.call(this,i.Tn,i.An,i.Z3,i.t4),this.sIt=void 0}void 0!==this.yPt&&(this.yPt?t.prototype.F3.call(this):t.prototype.I3.call(this),this.yPt=void 0)},i}(HO),EW=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).rIt=!1,i.oIt=!1,i.lIt=void 0,i.dIt=void 0,i.cIt=new dr,i}Pt(i,t);var n=i.prototype;return n.QP=function(){return void 0!==this.aq&&YR(this.aq)&&this.Qx&&this.Oy(0),t.prototype.QP.call(this)},n.Oy=function(i,n,r){void 0!==this.aq&&YR(this.aq)&&this.Qx&&i0){i=a.tracks[0],n=a;break}}if(Fi(i))break}return(qi(null==n?void 0:n.initPattern)||qi(null==i?void 0:i.initPattern))&&!qi(null==i?void 0:i.initializationPattern)&&!qi(null==n?void 0:n.initializationPattern)}(e=r)&&(e=function(t){return io({},t,{availabilityDuration:{value:t.dvrDuration?t.dvrDuration.duration/t.dvrDuration.timescale:0},manifestVersion:"1.0.0",presentations:t.presentations.map(xW),contentBaseUrl:t.contentBaseUrl||"./"})}(e)),[2,e]}})}).call(this)},t}();V(),It(),Bt(),Dt();var $W=function(t){function i(i){var n;return(n=t.call(this)||this).hu=void 0,n.gIt=void 0,n.gIt=i,n}Pt(i,t);var n=i.prototype;return n.dC=function(){return this.gIt.dC()},n.wn=function(t,i){this.gIt.wn(t,i)},n.mn=function(t,i){this.gIt.mn(t,i)},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=dA(this)),this.hu}},{key:"hC",get:function(){return this.gIt.hC}},{key:"oC",get:function(){return this.gIt.oC}},{key:"aC",get:function(){return this.gIt.aC}},{key:"uC",get:function(){return this.gIt.uC}},{key:"cC",get:function(){return this.gIt.cC}}]),i}(uh);V(),It(),Bt(),Ut(),V(),It(),Bt(),V(),It(),Bt();var KW=function(){function t(t){this.pIt=void 0,this.wIt=0,this.mIt=0,this.pIt=A.exp(A.log(.5)/t)}var i=t.prototype;return i.Gat=function(t,i){var n=A.pow(this.pIt,t),r=i*(1-n)+n*this.wIt;E(r)||(this.wIt=r,this.mIt+=t)},i.RZ=function(t){var i=A.exp(A.log(.5)/t);if(i!==this.pIt)if(0!==this.mIt){var n=this.Fet,r=1-A.pow(i,this.mIt);this.wIt=n*r,this.pIt=i}else this.pIt=i},xt(t,[{key:"Fet",get:function(){var t=1-A.pow(this.pIt,this.mIt);return this.wIt/t}}]),t}(),JW=function(){function t(i,n,r,e){void 0===i&&(i=t.RIt),void 0===n&&(n=t.DIt),void 0===r&&(r=t.$at),void 0===e&&(e=!1),this.yIt=void 0,this.bIt=void 0,this.EIt=0,this.xIt=[],this.TIt=void 0,this.kIt=6e4,this.PIt=10,this.IIt=void 0,this.CIt=void 0,this.AIt=void 0,this.SIt=void 0,this.IIt=i,this.CIt=n,this.AIt=r,this.SIt=e,this.yIt=new KW(i),this.bIt=new KW(n)}var i=t.prototype;return i.Gat=function(t){var i=Vi.Mg(),n=t;this.SIt&&void 0!==this.TIt&&i-this.TIt>=this.kIt&&this.hr(),this.EIt+=1,this.yIt.Gat(1,n),this.bIt.Gat(1,n),this.xIt.push(n),this.xIt.length>this.PIt&&this.xIt.shift(),this.TIt=i},i.Zat=function(){return void 0!==this.TIt&&Vi.Mg()-this.TIt<=this.kIt},i.hr=function(){this.yIt=new KW(this.IIt),this.bIt=new KW(this.CIt),this.EIt=0,this.xIt=[],this.TIt=void 0},xt(t,[{key:"Fet",get:function(){return this.Zat()?A.max(this.yIt.Fet,this.bIt.Fet):this.AIt}}]),t}();JW.RIt=2,JW.DIt=5,JW.$at=.1,V(),It(),Ut();var ZW=function(){function t(t){this.NIt=void 0,this.NIt=t}var i=t.prototype;return i.DY=function(t){for(var i,n=Ft(this.NIt);!(i=n()).done;){i.value.DY(t)}},i.NY=function(t){for(var i,n=Ft(this.NIt);!(i=n()).done;){i.value.NY(t)}},i.BY=function(t,i){for(var n,r=Ft(this.NIt);!(n=r()).done;){n.value.BY(t,i)}},i.MY=function(t){for(var i,n=Ft(this.NIt);!(i=n()).done;){i.value.MY(t)}},t}();V(),It();var tz=function(){function t(t){this.MIt=void 0,this.BIt=0,this.MIt=t}var i=t.prototype;return i.DY=function(t){this.BIt=t},i.NY=function(t){this.MIt.Gat(t-this.BIt)},i.BY=function(t){},i.MY=function(t){},t}();V(),It();var iz=function(){function t(t){this.eut=void 0,this.LIt=0,this.eut=t}var i=t.prototype;return i.NY=function(t){this.LIt=t},i.BY=function(t,i){this.eut.Gat(t-this.LIt,i.byteLength),this.LIt=t},i.MY=function(t){},i.DY=function(t){},t}();V(),It(),Dt();var nz=function(){function t(t,i){void 0===i&&(i=0),this.eut=void 0,this.VIt=void 0,this.FIt=new rz,this.En=0,this.OIt=0,this.eut=t,this.VIt=i}var i=t.prototype;return i.DY=function(t){},i.BY=function(t,i){var n=i.byteLength,r=this.OIt;this.OIt=n;var e=t-this.En;this.En=t,this.FIt.E$(i);var s=!this.FIt.UIt(),u=n>=this.VIt;r!==Vi.Zs.Sp&&s&&u&&this.eut.Gat(e,n)},i.NY=function(t){this.En=t},i.MY=function(t){},t}(),rz=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).WIt=void 0,i.HIt=!1,i}Pt(i,t);var n=i.prototype;return n.UIt=function(){return this.HIt},n.E$=function(i){this.HIt=!1,t.prototype.E$.call(this,i)},n.T$=function(i,n){this.WIt&&this.WIt!==mp.WR||(this.HIt=!0),t.prototype.T$.call(this,i,n),this.WIt=i},n.L$=function(t){return!1},n.F$=function(t){},n.V$=function(t){},i}(wC);V(),It(),Dt();var ez=function(t){return t.qIt="sample",t}({}),sz=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).zIt=0,i}return Pt(i,t),i.prototype.vW=function(){if(this.Zat()){var t=Vi.Mg();t-this.zIt>1e3&&(this.zIt=t,Nb.Bg.vW(this.Fet))}},i}(uh);V(),It(),Bt(),Dt();var uz=function(t){function i(i){var n;return(n=t.call(this)||this).GIt=void 0,n.bA=[],n.wIt=void 0,n.jIt=0,n.GIt=i,n.wIt=i,n}Pt(i,t);var n=i.prototype;return n.Zat=function(){return this.bA.length>=3},n.Gat=function(t,i){if(0!==t){var n={IW:8*i/t,XIt:i};if(this.bA.push(n),this.jIt+=n.XIt,this.bA.length>30){var r=this.bA.shift();this.jIt-=r.XIt}for(var e=this.bA.slice().sort(function(t,i){return t.IW-i.IW}),s=0,u=0;u=.5)break}this.vW(),this.So(new ah(ez.qIt))}},xt(i,[{key:"Fet",get:function(){return this.Zat()?this.wIt:this.GIt}}]),i}(sz);V(),It(),Bt(),Dt();var oz=function(t){function i(n,r,e,s){var u;return void 0===n&&(n=i.RIt),void 0===r&&(r=i.DIt),void 0===e&&(e=i.YIt),void 0===s&&(s=i.$at),(u=t.call(this)||this).yIt=void 0,u.bIt=void 0,u.QIt=0,u.AIt=void 0,u.KIt=void 0,u.KIt=e,u.yIt=new KW(n),u.bIt=new KW(r),u.AIt=s,u}Pt(i,t);var n=i.prototype;return n.Gat=function(t,i){var n=8*i/t;this.yIt.Gat(t,n),this.bIt.Gat(t,n),this.QIt+=i,this.vW(),this.So(new ah(ez.qIt))},n.Zat=function(){return this.QIt>=this.KIt},xt(i,[{key:"Fet",get:function(){return this.Zat()?A.min(this.yIt.Fet,this.bIt.Fet):this.AIt}}]),i}(sz);oz.YIt=128e3,oz.$at=Db,oz.RIt=.5,oz.DIt=5;var hz=function(){function t(t,i){var n=this;this.eut=void 0,this.tCt=[],this.sCt=void 0,this.eCt=void 0,this.ZIt=function(){for(var t,i=Ft(n.tCt);!(t=i()).done;){(0,t.value)()}},this.eCt=t>0?t:oz.$at,this.sCt=new JW(JW.RIt,JW.DIt,i>0?i:JW.$at),this.JIt(this.eCt)}var i=t.prototype;return i.JIt=function(t){var i;null==(i=this.eut)||i.mn(ez.qIt,this.ZIt),this.eut=new uz(t),this.eut.wn(ez.qIt,this.ZIt)},i.$It=function(t){this.tCt.push(t)},i.iCt=function(t){Yn(this.tCt,t)},i.DW=function(t){if("segment"===t.Km&&"video"===t.Gk){var i=[new tz(this.sCt)];return this.eut&&("stream"===t.fk&&"initialization-segment"!==t.zk?i.push(new nz(this.eut,1e3)):i.push(new iz(this.eut))),new ZW(i)}},xt(t,[{key:"IW",get:function(){var t,i;return null!=(i=null==(t=this.eut)?void 0:t.Fet)?i:this.eCt}},{key:"RW",get:function(){return this.sCt.Fet}}]),t}();V(),It(),Bt();var az=function(){function t(){this.rCt=void 0,this.oCt=void 0,this.dCt=void 0,this.uCt=void 0}var i=t.prototype;return i.nCt=function(t,i){var n=i-t;(!this.rCt||n=.4?[4,this.xCt(n)]:[3,5];case 5:return[2]}})}).call(this)},n.J2=function(t,i){return jt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:if(this.yCt)throw new y("Concurrent appends are not supported.");o.label=1;case 1:o.trys.push([1,,8,9]),n={stack:[],error:void 0,hasError:!1},o.label=2;case 2:return o.trys.push([2,5,6,7]),r=Xt(n,dr.ep([i,this.D3.Yg]),!1),e=r.Yg,this.bCt=new Xa,[4,this.xCt(e)];case 3:return o.sent(),[4,this.Wrt.J2({Km:nC.wZ,lk:t},{},e)];case 4:return o.sent(),this.Wrt.V3===vw.Mk&&this.ECt.ght(t),[3,7];case 5:return s=o.sent(),n.error=s,n.hasError=!0,[3,7];case 6:return Gt(n),[7];case 7:return[3,9];case 8:return u=this.bCt,this.bCt=void 0,null==u||u.Qy(),[7];case 9:return[2]}})}).call(this)},n.pS=function(t,i,n){return jt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(this.yCt)throw new y("Concurrent appends are not supported.");h.label=1;case 1:h.trys.push([1,,8,9]),r={stack:[],error:void 0,hasError:!1},h.label=2;case 2:return h.trys.push([2,5,6,7]),e=Xt(r,dr.ep([n,this.D3.Yg]),!1),s=e.Yg,this.bCt=new Xa,[4,this.xCt(s)];case 3:return h.sent(),[4,this.Wrt.pS(t,i,s)];case 4:return h.sent(),this.wCt.gCt(LA.nL(t,i)),[3,7];case 5:return u=h.sent(),r.error=u,r.hasError=!0,[3,7];case 6:return Gt(r),[7];case 7:return[3,9];case 8:return o=this.bCt,this.bCt=void 0,null==o||o.Qy(),[7];case 9:return[2]}})}).call(this)},n.EQ=function(t){return jt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:if(this.yCt)throw new y("Concurrent appends are not supported.");u.label=1;case 1:u.trys.push([1,,7,8]),i={stack:[],error:void 0,hasError:!1},u.label=2;case 2:return u.trys.push([2,4,5,6]),n=Xt(i,dr.ep([t,this.D3.Yg]),!1),r=n.Yg,this.bCt=new Xa,[4,this.xCt(r)];case 3:return u.sent(),[3,6];case 4:return e=u.sent(),i.error=e,i.hasError=!0,[3,6];case 5:return Gt(i),[7];case 6:return[3,8];case 7:return s=this.bCt,this.bCt=void 0,null==s||s.Qy(),[7];case 8:return[2]}})}).call(this)},n.xCt=function(t){return jt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:i=Ft(this.mCt),u.label=1;case 1:return(n=i()).done?[3,4]:(r=n.value,e=r[0],s=r[1],[4,this.Wrt.Q2({Km:nC.wZ,lk:e},s,t)]);case 2:u.sent(),u.label=3;case 3:return[3,1];case 4:return tr(this.mCt),[2]}})}).call(this)},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:this.D3.zg(),t.label=1;case 1:return this.yCt?[4,this.ACt]:[3,3];case 2:return t.sent(),[3,1];case 3:return[2]}})}).call(this)},xt(i,[{key:"Fx",get:function(){for(var t,i=LA.rL(),n=Ft(this.mCt);!(t=n()).done;){var r=t.value[1],e=r.Get+r.EU,s=e+r.ct;i=i.HM(LA.nL(e,s))}return this.Wrt.Fx.HM(i)}},{key:"yCt",get:function(){return void 0!==this.bCt}},{key:"ACt",get:function(){return this.bCt?this.bCt.Yy:ot.resolve()}}]),i}(uh);V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It(),Wt(),Yt();var _z=function(){function t(t){this.ICt=0,this.CCt=void 0,this.CCt=t}var i=t.prototype;return i.PCt=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:if(this.ICt>=this.CCt.maxRetries)throw t;return[4,Rr(this.RCt(this.ICt++),i)];case 1:return n.sent(),[2]}})}).call(this)},i.RCt=function(t){var i=0;return 0!==t&&(i+=A.min(this.CCt.maximumBackoff,this.CCt.minimumBackoff*A.pow(2,t-1))),i},t}();V(),It(),Dt(),V(),It(),Dt();var kz=function(t){return t.DCt="emsgdata",t}({}),bz=function(t){function i(i,n){var r;return(r=t.call(this,"emsgdata")||this).value=void 0,r.data=void 0,r.value=i,r.data=n,r}return Pt(i,t),i}(ah);V(),It();var Az=function(){function t(){this.iZ=void 0}var i=t.prototype;return i.start=function(t){this.iZ=t},i.NCt=function(t){this.iZ.enqueue(t)},t}();V(),It(),V(),It();var Tz=function(t){return t.BCt="initdata",t.MANIFEST_UPDATE="manifestupdate",t.MCt="timestamps:v1",t}({});function Sz(t){if("urn:theo:hesp:2020"===t.sM){var i=t.XE;if(i===Tz.BCt)return function(t){if(t&&Wi(t)){var i=t;if(Yi(i.index)&&Yi(i.offset)&&!(i.index<0&&i.offset<0))return{Km:"initdata",index:i.index,offset:i.offset}}}(JSON.parse(ma(Aa(t.hM),new Pa)));if(i===Tz.MANIFEST_UPDATE)return function(t){if(t&&Wi(t)){var i=t;if(!Fi(i.url)||qi(i.url))return{Km:"manifestupdate",url:i.url}}}(JSON.parse(ma(Aa(t.hM),new Pa)));if(i===Tz.MCt){var n,r=Aa(t.hM),e=new Pa,s=Zh(r,e).toNumber()/t.jD,u=Zh(r,e).toNumber()/1e3,o=Kh(r,e)/1e3;return e.ac+8<=r.byteLength&&(n={hours:Kh(r,e),minutes:Qh(r,e),seconds:Qh(r,e),frames:Yh(r,e)}),{Km:Tz.MCt,LCt:s,OCt:u,FCt:o,UCt:n}}}}var Ez=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).VCt=new uh,i}Pt(i,t);var n=i.prototype;return n.transform=function(t){if(t.Km===mp.zR)try{var i=Sz(Pp.VD(t.lk));i&&this.VCt.So(new bz(i.Km,i))}catch(t){false}this.NCt(t)},n.zg=function(){this.VCt.Vo()},i}(Az);V(),It(),Dt();var Iz=function(){function t(){this.HCt=void 0}var i=t.prototype;return i.start=function(t){this.HCt=new Rz(t)},i.transform=function(t){this.HCt.E$(t)},i.flush=function(){this.HCt.P$()},t}(),Rz=function(t){function i(i){var n;return(n=t.call(this)||this).iZ=void 0,n.iZ=i,n}Pt(i,t);var n=i.prototype;return n.L$=function(t){return!0},n.F$=function(t){this.iZ.enqueue(t)},n.V$=function(t){},i}(wC);V(),It(),Wt(),Dt(),Yt(),V(),It();var Cz=fe.fromNumber(In);var Pz=function(t){function i(i,n){var r;return(r=t.call(this)||this).aV=void 0,r.WCt=void 0,r.aV=i,r.WCt=n,r}return Pt(i,t),i.prototype.vk=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:0,n.label=1;case 1:return n.trys.push([1,3,,5]),[4,this.aV.vk(t)];case 2:return[2,n.sent()];case 3:if(mr(i=n.sent()))throw i;return[4,this.WCt.PCt(i,t.Yg)];case 4:return n.sent(),[3,5];case 5:return[3,0];case 6:return[2]}})}).call(this)},i}(uh);function Dz(t,i,n,r,e,s,u,o){var h=new Xd;return e&&h.UT(function(t,i){return void 0===i&&(i=Cz),new Xd({Range:"bytes="+t.toString()+"-"+i.toString()})}(e.start,e.end)),{Yu:t,_k:h,Xk:!1,Yg:o,Km:Sl.Ak,zk:n,Gk:r,Wk:s,qk:u,fk:i,Kk:i===qd.MT}}V(),It(),V(),It(),Dt(),Ut(),V(),It();var Nz,xz,Bz=function(t){return t[t.INITIALIZER=0]="INITIALIZER",t[t.FRAMES=1]="FRAMES",t}({});V(),It(),V(),It(),function(t){t[t.NON_IDR_PICTURE=1]="NON_IDR_PICTURE",t[t.PARTITION_A_DATA=2]="PARTITION_A_DATA",t[t.PARTITION_B_DATA=3]="PARTITION_B_DATA",t[t.PARTITION_C_DATA=4]="PARTITION_C_DATA",t[t.IDR_PICTURE=5]="IDR_PICTURE",t[t.SUPPLEMENTAL_ENHANCEMENT_INFORMATION=6]="SUPPLEMENTAL_ENHANCEMENT_INFORMATION",t[t.SEQUENCE_PARAMETER_SET=7]="SEQUENCE_PARAMETER_SET",t[t.PICTURE_PARAMETER_SET=8]="PICTURE_PARAMETER_SET",t[t.ACCESS_UNIT_DELIMITER=9]="ACCESS_UNIT_DELIMITER",t[t.END_OF_SEQUENCE=10]="END_OF_SEQUENCE",t[t.END_OF_STREAM=11]="END_OF_STREAM",t[t.FILTER_DATA=12]="FILTER_DATA",t[t.SEQUENCE_PARAMETER_EXTENSION_SET=13]="SEQUENCE_PARAMETER_EXTENSION_SET",t[t.PREFIX_NAL_UNIT=14]="PREFIX_NAL_UNIT",t[t.SUBSET_SEQUENCE_PARAMETER_SET=15]="SUBSET_SEQUENCE_PARAMETER_SET",t[t.DEPTH_PARAMETER_SET=16]="DEPTH_PARAMETER_SET",t[t.CODED_SLICE_WITHOUT_PARITIONING=19]="CODED_SLICE_WITHOUT_PARITIONING",t[t.CODED_SLICE_EXTENSION=20]="CODED_SLICE_EXTENSION",t[t.CODED_SLICE_FOR_DEPTH_VIEW=21]="CODED_SLICE_FOR_DEPTH_VIEW"}(Nz||(Nz={})),V(),It(),V(),It(),V(),It(),function(t){t[t.P=0]="P",t[t.B=1]="B",t[t.I=2]="I",t[t.SP=3]="SP",t[t.SI=4]="SI"}(xz||(xz={})),V(),It();var Oz=255,Mz=[44,83,86,100,110,118,122,128,134,135,138,139,244],Lz=[44,86,100,110,122,244];function Fz(t){return t.separateColourPlaneFlag?0:t.chromaFormatIDC}function Uz(t){return t.parsed&&t.header.type===Nz.SEQUENCE_PARAMETER_SET}V(),It(),V(),It(),V(),It(),V(),It();var Vz=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.emulationTracker=0,i.emulationsSkipped=0,i}return Ja(i,t),b.defineProperty(i.prototype,"skippedEmulationBytes",{get:function(){return this.emulationsSkipped},enumerable:!0,configurable:!0}),i.prototype.peekBit=function(){var i=t.prototype.peekBit.call(this);return 1===i||0===this.emulationTracker&&0!==this.location.bit?this.emulationTracker=0:22===++this.emulationTracker&&(t.prototype.skipBits.call(this,8),this.emulationsSkipped++,this.emulationTracker=0),i},i.prototype.readByte=function(){for(var t=0,i=7;i>=0;i--)t+=this.readBit()<9))return t%5}(R),P=u.readExponentialGolombCode();if(void 0===C)throw new y("Could not read the slice header slice type.");i.separateColourPlaneFlag&&(o=u.readUInt(2));var D=u.readUInt(i.log2MaxFrameNumMinus4+4);(i.frameMbsOnlyFlag||(h=u.readBool())&&(a=u.readBool()),t.header.type===Nz.IDR_PICTURE&&(c=u.readExponentialGolombCode()),0===i.picOrderCntType?(f=u.readUInt(i.log2MaxPicOrderCntLsbMinus4+4),n.bottomFieldPicOrderInFramePresentFlag&&(v=u.readSignedExponentialGolombCode())):1!==i.picOrderCntType||i.deltaPicOrderAlwaysZeroFlag||(d.push(u.readSignedExponentialGolombCode()),n.bottomFieldPicOrderInFramePresentFlag?d.push(u.readSignedExponentialGolombCode()):d.push(0)),n.redundantPicCntPresentFlag&&(l=u.readExponentialGolombCode()),C===xz.B&&(g=u.readBool()),[xz.B,xz.P,xz.SP].includes(C)&&(w=u.readBool())&&(m=u.readExponentialGolombCode(),C===xz.B&&(p=u.readExponentialGolombCode())),r=t.header.type===Nz.CODED_SLICE_EXTENSION||t.header.type===Nz.CODED_SLICE_FOR_DEPTH_VIEW?Hz(u,C,!0):Hz(u,C),(n.weightedPredFlag&&(C===xz.P||C===xz.SP)||1===n.weightedBipredIdc&&C===xz.B)&&(e=function(t,i,n,r,e){var s,u=0,o=t.readExponentialGolombCode();0!==n&&(u=t.readExponentialGolombCode());var h=jz(t,n,r,o,u);return i===xz.B&&(s=jz(t,n,e,o,u)),{chromaLog2WeightDenom:u,lumaLog2WeightDenom:o,l0:h,l1:s}}(u,C,Fz(i),m,p)),0!==t.header.refIdc)&&(s=function(t,i){var n=!1,r=!1,e=!1,s=[],u=[],o=[],h=[],a=[];if(i)n=t.readBool(),r=t.readBool();else if(e=t.readBool()){var c=-1,f=void 0;do{u.push(0),o.push(0),h.push(0),a.push(0),c++,f=t.readExponentialGolombCode(),s.push(f),1!==f&&3!==f||(u[c]=t.readExponentialGolombCode()),2===f&&(o[c]=t.readExponentialGolombCode()),3!==f&&6!==f||(h[c]=t.readExponentialGolombCode()),4===f&&(a[c]=t.readExponentialGolombCode())}while(0!==f)}return{noOutputOfPriorPicsFlag:n,longTermReferenceFlag:r,adaptiveRefPicMarkingModeFlag:e,memoryManagementControlOperation:s,differenceOfPicNumsMinus1:u,longTermPicNum:o,longTermFrameIdx:h,maxLongTermFrameIdxPlus1:a}}(u,t.header.type===Nz.IDR_PICTURE));n.entropyCodingModeFlag&&C!==xz.I&&C!==xz.SI&&(_=u.readExponentialGolombCode());var N=u.readSignedExponentialGolombCode();return C!==xz.SP&&C!==xz.SI||(C===xz.SP&&(k=u.readBool()),b=u.readSignedExponentialGolombCode()),n.deblockingFilterControlPresentFlag&&1!==(A=u.readExponentialGolombCode())&&(T=u.readSignedExponentialGolombCode(),S=u.readSignedExponentialGolombCode()),n.numSliceGroupsMinus1>0&&n.sliceGroupMapType>=3&&n.sliceGroupMapType<=5&&(E=u.readUInt(rc(n.picSizeInMapUnitsMinus1+n.sliceGroupChangeRateMinus1+1))),n.entropyCodingModeFlag&&u.location.bit>0&&u.skipBits(8-u.location.bit),{header:Za(Za({},t.header),{firstMbInSlice:I,sliceType:C,origSliceType:R,picParameterSetID:P,colourPlaneID:o,frameNum:D,fieldPicFlag:h,bottomFieldFlag:a,idrPicID:c,picOrderCntLsb:f,deltaPicOrderCntBottom:v,deltaPicOrderCnt:d,redundantPicCnt:l,directSpatialMvPredFlag:g,numRefIdxActiveOverrideFlag:w,numRefIdxL0ActiveMinus1:m,numRefIdxL1ActiveMinus1:p,cabacInitIdc:_,sliceQpDelta:N,spForSwitchFlag:k,sliceQsDelta:b,disableDeblockingFilterIdc:A,sliceAlphaC0OffsetDiv2:T,sliceBetaOffsetDiv2:S,sliceGroupChangeCycle:E,rplm:r,pwt:e,drpm:s}),parsed:!0,data:new ic(t.data.slice(u.location.byte,t.data.length),u.location.bit)}}function qz(t){var i=function(t,i){return 11===t&&i[3]?Xz["1b"]:Xz[(t/10).toFixed(1)]}(t.levelIDC,t.constraintFlags),n=(t.frameMbsOnlyFlag?1:2)*(t.picHeightInMapUnitsMinus1+1);return A.min(16,i.maxDpbMbs/((t.picWidthInMbsMinus1+1)*n))}V(),It(),V(),It(),V(),It(),V(),It(),V(),It();var Xz={"1.0":{maxMbps:1485,maxFs:99,maxDpbMbs:396,maxBr:64,maxCpb:175},"1b":{maxMbps:1485,maxFs:99,maxDpbMbs:396,maxBr:128,maxCpb:350},1.1:{maxMbps:3e3,maxFs:396,maxDpbMbs:900,maxBr:192,maxCpb:500},1.2:{maxMbps:6e3,maxFs:396,maxDpbMbs:2376,maxBr:384,maxCpb:1e3},1.3:{maxMbps:11880,maxFs:396,maxDpbMbs:2376,maxBr:384,maxCpb:2e3},"2.0":{maxMbps:11880,maxFs:396,maxDpbMbs:2376,maxBr:768,maxCpb:2e3},2.1:{maxMbps:19800,maxFs:792,maxDpbMbs:4752,maxBr:4e3,maxCpb:4e3},2.2:{maxMbps:20250,maxFs:1620,maxDpbMbs:8100,maxBr:4e3,maxCpb:4e3},"3.0":{maxMbps:40500,maxFs:1620,maxDpbMbs:8100,maxBr:1e4,maxCpb:1e4},3.1:{maxMbps:108e3,maxFs:3600,maxDpbMbs:18e3,maxBr:14e3,maxCpb:14e3},3.2:{maxMbps:216e3,maxFs:5120,maxDpbMbs:20480,maxBr:2e4,maxCpb:2e4},"4.0":{maxMbps:245760,maxFs:8192,maxDpbMbs:32768,maxBr:2e4,maxCpb:25e3},4.1:{maxMbps:245760,maxFs:8192,maxDpbMbs:32768,maxBr:5e4,maxCpb:62500},4.2:{maxMbps:522240,maxFs:8704,maxDpbMbs:34816,maxBr:5e4,maxCpb:62500},"5.0":{maxMbps:589824,maxFs:22080,maxDpbMbs:110400,maxBr:135e3,maxCpb:135e3},5.1:{maxMbps:983040,maxFs:36864,maxDpbMbs:184320,maxBr:24e4,maxCpb:24e4},5.2:{maxMbps:2073600,maxFs:36864,maxDpbMbs:184320,maxBr:24e4,maxCpb:24e4},"6.0":{maxMbps:4177920,maxFs:139264,maxDpbMbs:696320,maxBr:24e4,maxCpb:24e4},6.1:{maxMbps:8355840,maxFs:139264,maxDpbMbs:696320,maxBr:48e4,maxCpb:48e4},6.2:{maxMbps:16711680,maxFs:139264,maxDpbMbs:696320,maxBr:8e5,maxCpb:8e5}};function Gz(t,i){for(var n,r=!1,e=[],s=8,u=8,o=0;o0)if(0===(r=n.readExponentialGolombCode()))for(var A=0;A<=b;A++)e.push(n.readExponentialGolombCode());else if(2===r)for(A=0;A=this.lengthSize;){var n=this.currentBuffer.readUIntBE(0,this.lengthSize);if(this.lengthSize+n>this.currentBuffer.length)break;var r=this.currentBuffer.slice(this.lengthSize,this.lengthSize+n);i.push(Kz(r)),this.currentBuffer=this.currentBuffer.slice(this.lengthSize+n)}return i},t}();V(),It(),V(),It();var tq=new I([0,0,1]),iq=new I([0,0,0,1]);function nq(t){return!1===t.parsed}var rq=function(){function t(){this.currentData=new hc,this.startFound=!1}return t.prototype.extractNals=function(i){this.currentData=this.currentData.concat(Jz(i));var n=[];if(!this.startFound){var r=this.currentData.indexOf(iq);if(-1===r)return n;this.currentData=this.currentData.slice(r+4),this.startFound=!0}for(;this.currentData.length>0;){var e=t.findNextIndex(this.currentData);if(void 0===e)break;var s=e[0],u=e[1];n.push(Kz(this.currentData.slice(0,s))),this.currentData=this.currentData.slice(s+u)}return n},t.findNextIndex=function(t){var i=t.indexOf(iq),n=t.indexOf(tq);if(-1!==i||-1!==n)return-1===i||i>n?[n,3]:[i,4]},t}(),eq=function(){function t(){}return t.createStreamingAnnexBExtractor=function(){return new rq},t.createStreamingAvccExtractor=function(t){return new Zz(t)},t.extractAnnexB=function(t){var i=new rq,n=Jz(t);return n.pushRange(new I([0,0,0,1])),i.extractNals(n)},t.extractAvcc=function(t,i){return new Zz(i).extractNals(Jz(t))},t.extractParsedAnnexB=function(t){return(new $z).parseNals(this.extractAnnexB(t))},t.extractParsedAvcc=function(t,i){return(new $z).parseNals(this.extractAvcc(t,i))},t}();V(),It(),V(),It(),V(),It(),V(),It();var sq=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.emulationTracker=0,i}return Ja(i,t),i.prototype.writeBit=function(i){if(22===this.emulationTracker){for(var n=0,r=[1,1,0,0,0,0,0,0];n0)&&(this.emulationTracker+=1),t.prototype.writeBit.call(this,i)},i.prototype.writeByte=function(t){for(var i=7;i>=0;i--)this.writeBool((t&1<0)},i.prototype.writeBuffer=function(i){var n;for(n=0;n0&&n.sliceGroupMapType>=3&&n.sliceGroupMapType<=5&&e.writeUInt(r.sliceGroupChangeCycle,rc(n.picSizeInMapUnitsMinus1+n.sliceGroupChangeRateMinus1+1)),n.entropyCodingModeFlag&&e.padByte(1),e.writeBuffer(t.data),{header:{refIdc:r.refIdc,type:r.type},parsed:!1,data:e.close()}}function cq(t){var i=t.header,n=new sq;n.writeByte(i.profileIDC);for(var r=0,e=i.constraintFlags;r0)if(r.writeExponentialGolombCode(n.sliceGroupMapType),0===n.sliceGroupMapType)for(var e=0,s=n.runLengthMinus1;e=A.pow(2,8*i))throw new y("NAL length size "+i+" is too small, serialized NAL is "+u+"B long.");var o=new ac;o.writeUInt(u,i),n.pushRange(o.close().join()),n=n.concat(s)}return n}(i,n).join():t.serializeAvcc((new vq).writeNals(i),n)},t}();V(),It();!function(){function t(){}t.createAvccDecoderConfig=function(t,i){var n=t.header,r=new vq,e=lq.serializeNal(r.writeNal(t)),s=lq.serializeNal(r.writeNal(i)),u=e.length,o=s.length,h=new ac;return h.writeUInt(1,8),h.writeUInt(n.profileIDC,8),h.writeUInt(this.toNumber(n.constraintFlags),8),h.writeUInt(n.levelIDC,8),h.writeUInt(255,8),h.writeUInt(225,8),h.writeUInt((65280&u)>>8,8),h.writeUInt(255&u,8),h.writeBytes(e),h.writeUInt(1,8),h.writeUInt((65280&o)>>8,8),h.writeUInt(255&o,8),h.writeBytes(s),h.close().join()},t.createCodecInformation=function(t){var i=this.toHex(t.header.profileIDC),n=this.toHex(this.toNumber(function(){for(var t=0,i=0,n=arguments.length;ih){s={WDt:c,wft:Vi.Mg()};break}}if(this.DDt&&iX(this.DDt.WDt,null==s?void 0:s.WDt)){var f=Vi.Mg()-this.DDt.wft,v=this.DDt.WDt.VDt,d=this.qDt.length>=3&&this.qDt.every(function(t){return t>v});if(f>1e3&&d){if(this.PL.ML.BL||Vi.Zs.pp){var l=2*this.xDt.RW;if(!(Kq(this.PL)>l))return}else{var g=A.max(2*this.xDt.RW+Jq,this.JW.aL.minimumOffset);if(!(Kq(this.PL)>g))return void(this.zDt&&this.zDt.minimumOffset===g||(this.fL(),this.zDt={minimumOffset:g},this.JW.cL(this.zDt)))}return this.DDt.WDt}}else this.DDt=s},i.HDt=function(t,i){return void 0===i&&(i=!1),jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return this.DDt=void 0,this.fL(),(n=this.NDt).GDt===t.GDt&&n.XDt===t.XDt?[2]:(r=t.GDt,e=t.XDt,n.XDt&&e&&n.XDt.IW>e.IW&&i&&(this.xDt.JIt(t.VDt),this.qDt=[]),[4,this.BDt.jDt(e,r)]);case 1:return s.sent(),[2]}})}).call(this)},i.fL=function(){this.zDt&&(this.JW.fL(this.zDt),this.zDt=void 0)},i.FDt=function(t,i){var n,r=[],e=[];t&&(r=(null==(n=t.tC)?void 0:n.length)?t.tC:t.$I.NI);if(i){var s,u=(null==(s=i.tC)?void 0:s.length)?i.tC:i.$I.NI,o=u.slice().sort(function(t,i){return t.IW-i.IW}),h=this.QDt(o);0===h.length&&u.length>0&&h.push(rr(u,function(t){return t.IW})),e=h}for(var a,c=[],f=r.length>0?r:[void 0],v=e.length>0?e:[void 0],d=Ft(f);!(a=d()).done;)for(var l,g=a.value,w=Ft(v);!(l=w()).done;){var m=l.value;c.push(tX(g,m))}return function(t){return t.sort(function(t,i){return i.VDt-t.VDt})}(c)},i.QDt=function(t){var i=this,n=Wn(t,function(t){return t.Mi>=i.PL.Mi&&t.Ti>=i.PL.Ti});return n?t.filter(function(t){return t.Mi<=n.Mi&&t.Ti<=n.Ti}):t.slice()},i.zg=function(){this.DDt=void 0,this.IDt.hr(),this.fL()},xt(t,[{key:"NDt",get:function(){return tX(this.BDt.ADt,this.BDt.TDt)}}]),t}();function tX(t,i){var n,r;return{GDt:t,XDt:i,VDt:1.3*((null!=(n=null==t?void 0:t.IW)?n:0)+(null!=(r=null==i?void 0:i.IW)?r:0))}}function iX(t,i){var n,r,e,s;return void 0===t||void 0===i?t===i:(null==(n=t.GDt)?void 0:n.o)===(null==(r=i.GDt)?void 0:r.o)&&(null==(e=t.XDt)?void 0:e.o)===(null==(s=i.XDt)?void 0:s.o)&&t.VDt===i.VDt}V(),It(),Wt(),Bt(),Yt();var nX=function(){function t(t,i,n){this.YDt=void 0,this.hT=new dr,this.YDt=t,this.YPt(i,n,this.hT.Yg).catch(pn)}var i=t.prototype;return i.YPt=function(t,i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return n.Hg?[3,6]:[4,Rr(6e5,n)];case 1:e.sent(),e.label=2;case 2:return e.trys.push([2,4,,5]),r=this,[4,rX(t,i,n)];case 3:return r.YDt=e.sent(),[3,5];case 4:return yr(e.sent()),[3,5];case 5:return[3,0];case 6:return[2]}})}).call(this)},i.zg=function(){this.hT.Zg()},t.create=function(i,n,r){return jt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,rX(i,n,r)];case 1:return[2,new t(e.sent(),i,n)]}})})()},xt(t,[{key:"ebt",get:function(){return(this.YDt.serverTimeMs+(Vi.Mg()-this.YDt.localTimeMs))/1e3}},{key:"JDt",get:function(){return(this.YDt.localTimeMs-this.YDt.serverTimeMs)/1e3}}]),t}();function rX(t,i,n){return jt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return[4,eX(t,i,n)];case 1:return r=h.sent(),e=r[0],s=r[1],u=r[2],s>20?[4,eX(t,i,n)]:[3,3];case 2:o=h.sent(),e=o[0],s=o[1],u=o[2],h.label=3;case 3:return[2,{localTimeMs:e,serverTimeMs:u-s/2}]}})})()}function eX(t,i,n){return jt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return r=Vi.Mg(),[4,i.vk({Hk:Tl.GET,Yu:t,Yg:n})];case 1:return e=h.sent(),s=Vi.Mg()-r,[4,e.HT(n)];case 2:return u=h.sent(),o=1e3*Number(u),[2,[r,s,o]]}})})()}var sX=function(t){function i(){return t.call(this,"seek")||this}return Pt(i,t),i}(ah),uX=function(t){return t.Jz="seek",t}({}),oX=[ch.uo,Fy.AI,ch.py],hX=function(t){function i(i,n,r,e,s,u,o,h,a,c,f){var v;return(v=t.call(this)||this).Ac=void 0,v.aV=void 0,v.oNt=void 0,v.PL=void 0,v.rNt=void 0,v.Ndt=void 0,v.ENt=void 0,v.fNt=!1,v.DNt=!1,v.Mz=void 0,v.tO=new fw,v.sO=new fw,v.NNt=void 0,v.tNt=void 0,v.iNt=void 0,v.URt=void 0,v.sNt=new Xa,v.aNt=void 0,v.dNt=void 0,v.cNt=void 0,v.JW=void 0,v.aq=void 0,v.Ypt=void 0,v.nNt=new Xa,v.uV=new dr,v.ANt=void 0,v.bNt=new dr,v.k9=void 0,v.T9=new dr,v.mNt=void 0,v.ZDt=void 0,v.INt=void 0,v.wNt=void 0,v.$Dt=void 0,v.PNt=void 0,v.CNt=void 0,v.NL=function(){v.DNt=!0},v.updateActiveQualities=function(){var t,i,n=v.PL.zx,r=null==(t=v.ZDt)?void 0:t.pCt(n),e=null==(i=v.$Dt)?void 0:i.pCt(n);if(v.tNt!==r&&(v.tNt=r,r))for(var s,u=Ft(v.tO.NI);!(s=u()).done;){s.value.yDt(r)}if(v.iNt!==e&&(v.iNt=e,e))for(var o,h=Ft(v.sO.NI);!(o=h()).done;){o.value.yDt(e)}},v.xNt=function(t,i){var n=i.data;if(n.Km===Tz.MCt){var r,e=n.OCt,s=n.FCt,u=n.LCt,o=n.UCt;if(v.aNt){var h=v.aNt.ebt,a=v.PL.zx;if(v.DNt&&0!==a){var c={theolive:h-e+u-a,engine:s,distribution:A.max(h-(e+s),0),player:A.min(u-a,v.JW.aL.forceSeekOffset)};t===vw.Bk?(v.dNt=c,v.rNt.cCt(v.aNt.JDt+e,u)):(v.cNt=c,v.rNt.aCt(v.aNt.JDt+e,u))}}if(o)null!=v.NNt||(v.NNt=v.PL.sI(uy.zU,"timecode","timecode",void 0,!1,jw.DEFAULT,!1,void 0)),v.NNt.nV(new um(u,u,o,!1,void 0)),ky(v.NNt,null!=(r=v.PL.Fx.Tn(0))?r:-1)}v.So(i)},v.u8=function(t){mr(t)||(v.KP(),v.So(new Cb(new _d(pd.MEDIA_LOAD_ERROR,t.message))))},v.Ac=i,v.oNt=n,v.PL=r,v.aV=s,v.rNt=u,v.Mz=new Zq(r,o,v,a,e,f),v.Ndt=h,v.ENt=c,v.JW=o,v.PL.wn(Fy.PM,v.NL),v.PL.wn(oX,v.updateActiveQualities),v}Pt(i,t);var n=i.prototype;return n.hNt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.ZDt?[4,this.ZDt.pS(0,1/0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.$Dt?[4,this.$Dt.pS(0,1/0)]:[3,4];case 3:t.sent(),t.label=4;case 4:return[2]}})}).call(this)},n.Un=function(){if(!this.Ac.src)throw new _d(pd.SOURCE_INVALID,"No src property found in given source.");this.Ypt||(this.Ypt=this.vE(this.uV.Yg).catch(this.u8))},n.vE=function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return this.So(new aC),i=this.Ac.src,[4,this.oNt._It(i,t)];case 1:return n=s.sent(),this.URt=new Mq(i,n),this.URt.nDt?(r=this,[4,nX.create(this.URt.nDt,this.aV,t)]):[3,3];case 2:r.aNt=s.sent(),s.label=3;case 3:return this.uNt(),e=Qn(this.URt.ZRt,-1),this.createTracksForPresentation(e),this.sNt.Qy(),this.pDt(),[2]}})}).call(this)},n.bDt=function(t){for(var i,n=Ft(this.tO.NI);!(i=n()).done;){var r=i.value;r.SO(r===t)}},n.SDt=function(t){for(var i,n=Ft(this.sO.NI);!(i=n()).done;){var r=i.value;r.SO(r===t)}},n.pDt=function(){var t=Wn(this.tO.NI,function(t){return t.Rt}),i=Wn(this.sO.NI,function(t){return t.Rt}),n=this.Mz.ODt(t,i);Er(this.jDt(n.XDt,n.GDt))},n.uNt=function(){var t=this;if(this.URt&&"live"===this.URt.P0&&this.aNt){var i=this.URt.ZRt.filter(function(i){return i.o===t.URt.tDt})[0].zx,n=this.aNt.JDt+new Date(this.URt.XRt).getTime()/1e3;this.rNt.hCt(n,i)}},n.createTracksForPresentation=function(t){for(var i,n,r,e,s,u=Ft(null!=(r=t.q9)?r:[]);!(e=u()).done;){var o=e.value;this.tO.tt(new qq(o,this))}for(var h,a=Ft(null!=(s=t.W9)?s:[]);!(h=a()).done;){var c=h.value;this.sO.tt(new Xq(c,this))}null==(i=this.tO.MI(0))||i.SO(!0),null==(n=this.sO.MI(0))||n.SO(!0)},n.Tn=function(){this.fNt=!0,this.vNt()},n.KP=function(){var t;this.fNt=!1,this._Nt().catch(this.u8),"live"===(null==(t=this.cC)?void 0:t.P0)&&(this.gNt(),this.pNt())},n.gNt=function(){this.mNt&&this.mNt.cancelDownload()},n.pNt=function(){this.wNt&&this.wNt.cancelDownload()},n.dC=function(t){var i=this;this.T9.Zg(),this.T9=new dr,this.k9=Ar(function(n){return i.yNt(t,i.k9,n)},this.T9).catch(this.u8)},n.yNt=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return i?[4,i]:[3,2];case 1:s.sent(),s.label=2;case 2:return[4,kr(this.W,n)];case 3:if(s.sent(),"live"!==this.URt.P0)throw new y("The current video source does not support Live playback.");return pr(n),[4,this._Nt()];case 4:if(s.sent(),pr(n),!this.mNt||!this.mNt.ZCt()&&this.mNt.QCt===(null!=t?t:"now"))return[3,10];if(this.gNt(),!this.ZDt)return[3,9];s.label=5;case 5:return this.ZDt.yCt?[4,kr(this.ZDt.ACt,n)]:[3,7];case 6:return s.sent(),[3,5];case 7:return[4,this.ZDt.pS(0,1/0)];case 8:s.sent(),s.label=9;case 9:null==(r=this.mNt)||r.Oy(null!=t?t:"now"),s.label=10;case 10:if(!this.wNt||!this.wNt.ZCt()&&this.wNt.QCt===(null!=t?t:"now"))return[3,16];if(this.pNt(),!this.$Dt)return[3,15];s.label=11;case 11:return this.$Dt.yCt?[4,kr(this.$Dt.ACt,n)]:[3,13];case 12:return s.sent(),[3,11];case 13:return[4,this.$Dt.pS(0,1/0)];case 14:s.sent(),s.label=15;case 15:null==(e=this.wNt)||e.Oy(null!=t?t:"now"),s.label=16;case 16:return this.So(new sX),pr(n),this.k9=void 0,this.vNt(),[2]}})}).call(this)},n.Oy=function(t){var i=this;this.T9.Zg(),this.T9=new dr,this.k9=Ar(function(n){return i.E9(t,i.k9,n)},this.T9).catch(this.u8)},n.E9=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return i?[4,i]:[3,2];case 1:s.sent(),s.label=2;case 2:return[4,kr(this.W,n)];case 3:return s.sent(),pr(n),[4,this._Nt()];case 4:return s.sent(),pr(n),this.mNt&&(this.mNt.ZCt()||this.mNt.QCt!==t)&&this.gNt(),this.wNt&&(this.wNt.ZCt()||this.wNt.QCt!==t)&&this.pNt(),this.So(new sX),pr(n),null==(r=this.mNt)||r.Oy(t),null==(e=this.wNt)||e.Oy(t),this.k9=void 0,this.vNt(),[2]}})}).call(this)},n.jDt=function(t,i){var n,r,e=this;return(null==(n=this.mNt)?void 0:n.qot)===i&&(null==(r=this.wNt)?void 0:r.qot)===t?ot.resolve():(this.bNt.Zg(),this.bNt=new dr,this.ANt=Ar(function(n){return e.SNt(t,i,e.ANt,n)},this.bNt).catch(this.u8),this.ANt)},n.SNt=function(t,i,n,r){return jt(function(){var e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:return n?[4,n]:[3,2];case 1:a.sent(),a.label=2;case 2:return[4,kr(this.sNt.Yy,r)];case 3:return a.sent(),pr(r),[4,this._Nt()];case 4:return a.sent(),pr(r),[4,this.TNt(t,i)];case 5:return a.sent(),[4,this.kNt(t,i)];case 6:for(a.sent(),pr(r),u=Ft(null!=(s=null==t||null==(e=t.Ht)?void 0:e.ORt)?s:[]);!(o=u()).done;)h=o.value,this.ENt.$gt({Sit:h.channel,Tit:h.language,Th:h.label});return this.ANt=void 0,this.vNt(),[2]}})}).call(this)},n.TNt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f,v,d,l,g,w,m,p,y,_;return zt(this,function(k){switch(k.label){case 0:return n=this,u=null!=(s=this.lNt)?s:"now",(null==(r=this.mNt)?void 0:r.qot)===i?[3,5]:(h=this.mNt&&!this.mNt.ZCt(),a=null==(o=this.mNt)?void 0:o.QCt,this.mNt?[4,this.mNt.zg()]:[3,2]);case 1:k.sent(),this.mNt=void 0,k.label=2;case 2:return this.ZDt?[4,this.ZDt.ACt]:[3,4];case 3:k.sent(),k.label=4;case 4:i&&(v=null!=(f=null==(c=this.ZDt)?void 0:c.Fx)?f:LA.rL(),d=h?a:v.An(v.V-1),this.mNt=new _q(i,this.aV,this.Ndt),this.mNt.wn(kz.DCt,function(t){return n.xNt(vw.Bk,t)}),this.mNt.Oy(null!=d?d:u)),k.label=5;case 5:return(null==(e=this.wNt)?void 0:e.qot)===t?[3,10]:(g=this.wNt&&!this.wNt.ZCt(),w=null==(l=this.wNt)?void 0:l.QCt,this.wNt?[4,this.wNt.zg()]:[3,7]);case 6:k.sent(),this.wNt=void 0,k.label=7;case 7:return this.$Dt?[4,this.$Dt.ACt]:[3,9];case 8:k.sent(),k.label=9;case 9:t&&(y=null!=(p=null==(m=this.$Dt)?void 0:m.Fx)?p:LA.rL(),_=g?w:y.An(y.V-1),this.wNt=new kq(t,this.aV,this.Ndt,this.PL),this.wNt.wn(kz.DCt,function(t){return n.xNt(vw.Mk,t)}),this.wNt.Oy(null!=_?_:u)),k.label=10;case 10:return[2]}})}).call(this)},n.kNt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:if(n=function(t,i,n,r,e){var s=Gq(t,null==i?void 0:i.Ht.yRt.yRt,null==n?void 0:n.Ht.yRt.yRt,r),u=_H(s),o=[];i&&o.push({GT:i.lQ});n&&o.push({GT:n.lQ});return{Km:Ly.SV,q4:o,fq:u,t5:e&&!r}}(this.Ac.contentProtection,i,t,this.PL.ML.BL,this.Ac.useManagedMediaSource),!this.aq||!this.aq.IZ(n))return[3,12];if(s=!(null==(r=this.mNt)?void 0:r.ZCt()),!this.ZDt||!s)return[3,5];c.label=1;case 1:return this.ZDt.yCt?[4,this.ZDt.ACt]:[3,3];case 2:return c.sent(),[3,1];case 3:return[4,this.ZDt.EQ()];case 4:c.sent(),c.label=5;case 5:if(u=!(null==(e=this.wNt)?void 0:e.ZCt()),!this.$Dt||!u)return[3,10];c.label=6;case 6:return(null==(o=this.$Dt)?void 0:o.yCt)?[4,this.$Dt.ACt]:[3,8];case 7:return c.sent(),[3,6];case 8:return[4,null==(h=this.$Dt)?void 0:h.EQ()];case 9:c.sent(),c.label=10;case 10:return[4,this.aq.RZ(n)];case 11:return c.sent(),[3,21];case 12:return this.gNt(),this.pNt(),this.ZDt?[4,this.ZDt.zg()]:[3,14];case 13:c.sent(),this.ZDt=void 0,c.label=14;case 14:return this.$Dt?[4,this.$Dt.zg()]:[3,16];case 15:c.sent(),this.$Dt=void 0,c.label=16;case 16:this.PL.G7(),c.label=17;case 17:return c.trys.push([17,,20,21]),[4,this.PL.hr()];case 18:return c.sent(),a=this,[4,this.PL.Un(n)];case 19:return a.aq=c.sent(),this.nNt.Qy(),this.aq.e4&&this.mNt&&(this.aq.e4.wn(tC.pZ,this.Rs),this.ZDt=new yz(this.aq.e4,this.PL,i,this.ENt)),this.aq.s4&&this.wNt&&(this.aq.s4.wn(tC.pZ,this.Rs),this.$Dt=new yz(this.aq.s4,this.PL,t,this.ENt)),"live"===this.URt.P0&&this.aq.F4(1/0),[3,21];case 20:return this.PL.X7(),[7];case 21:return[2]}})}).call(this)},n.vNt=function(){!this.fNt||this.k9||this.ANt||this.PNt||this.INt||(this.Mz.Tn(),this.CNt=new dr,this.wNt&&this.$Dt&&(this.PNt=this.RNt(this.wNt,this.$Dt,this.CNt.Yg).catch(this.u8)),this.mNt&&this.ZDt&&(this.INt=this.RNt(this.mNt,this.ZDt,this.CNt.Yg).catch(this.u8)))},n._Nt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Mz.KP(),this.CNt&&(this.CNt.Zg(),this.CNt=void 0),this.PNt?[4,this.PNt]:[3,2];case 1:t.sent(),this.PNt=void 0,t.label=2;case 2:return this.INt?[4,this.INt]:[3,4];case 3:t.sent(),this.INt=void 0,t.label=4;case 4:return[2]}})}).call(this)},n.RNt=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:return[4,this.W];case 1:v.sent(),v.label=2;case 2:return t.yCt?[4,kr(t.ACt,n)]:[3,4];case 3:return v.sent(),[3,2];case 4:return i.yCt?[4,kr(i.ACt,n)]:[3,6];case 5:return v.sent(),[3,4];case 6:return t.ZCt()?[3,13]:(r=Vi.Mg()/1e3,e="now"===t.QCt,[4,t.$Ct()]);case 7:return s=v.sent(),u=s.initialization,o=s.data,h=s.metadata,a=i.Fx,!Vi.Zs.wp&&!this.PL.ML.BL&&h&&a.An(a.V-1)>h.Get?[4,i.pS(h.Get,1/0)]:[3,9];case 8:v.sent(),v.label=9;case 9:return[4,i.J2(u)];case 10:return v.sent(),o?[4,i.Q2(o,h,t.qot)]:[3,12];case 11:v.sent(),v.label=12;case 12:c=i.Fx.qM(a),e&&c.V>0&&this.rNt.nCt(r,c.An(c.V-1)),v.label=13;case 13:return t.jCt?[3,15]:(pr(n),f=t.oRt(),[4,kr(i.appendStream(f,t),n)]);case 14:return v.sent(),[3,13];case 15:return[2]}})}).call(this)},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.uV.Zg(),this.Ypt?[4,this.Ypt.catch(pn)]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.k9?(this.T9.Zg(),this.gNt(),this.pNt(),[4,this.k9.catch(pn)]):[3,4];case 3:t.sent(),t.label=4;case 4:return this.ANt?(this.bNt.Zg(),this.gNt(),this.pNt(),[4,this.ANt.catch(pn)]):[3,6];case 5:t.sent(),t.label=6;case 6:return[4,this._Nt()];case 7:return t.sent(),this.mNt?[4,this.mNt.zg()]:[3,9];case 8:t.sent(),t.label=9;case 9:return this.wNt?[4,this.wNt.zg()]:[3,11];case 10:t.sent(),t.label=11;case 11:return this.mNt=void 0,this.wNt=void 0,this.nNt.Zg(),this.sNt.Zg(),this.aq?[4,this.PL.hr()]:[3,13];case 12:t.sent(),this.aq=void 0,t.label=13;case 13:return this.ZDt=void 0,this.$Dt=void 0,this.PL.mn(Fy.PM,this.NL),this.PL.mn(oX,this.updateActiveQualities),this.tO.hr(),this.tNt=void 0,this.sO.hr(),this.iNt=void 0,this.URt=void 0,this.aNt&&(this.aNt.zg(),this.aNt=void 0),this.fNt=!1,[2]}})}).call(this)},xt(i,[{key:"cC",get:function(){return this.URt}},{key:"Fx",get:function(){return this.ZDt&&this.$Dt?this.ZDt.Fx.Mn(this.$Dt.Fx):this.ZDt?this.ZDt.Fx:this.$Dt?this.$Dt.Fx:LA.rL()}},{key:"ADt",get:function(){return this.tNt}},{key:"TDt",get:function(){return this.iNt}},{key:"ht",get:function(){return this.tO}},{key:"rt",get:function(){return this.sO}},{key:"eNt",get:function(){return this.sNt.Yy}},{key:"W",get:function(){return this.nNt.Yy}},{key:"kP",get:function(){return this.URt?function(t,i,n){var r,e=null==(r=t.ZRt[0])?void 0:r.zx,s=t.zRt;if(void 0===e||void 0===s)return n>0&&nn+2){var r=t-i;if(r<=this.lastAmountToSeekForward&&!this.oa.xP)return this.oa.zx+=r,this.lastAmountToSeekForward=0,!0;this.lastAmountToSeekForward=r}else this.lastAmountToSeekForward=0;return!1},n.vL=function(){return wz(t.prototype.vL.call(this))},n.VL=function(){return!Vi.Zs.pp},i}(WA),cX=[ch.Jw,ch.Qw,ch.Nw,ch.Kw,ch.wy,ch.Cw,ch.Lw,ch.Bw,ch.xw,ch.Ew],fX=function(t){function i(i,n,r,e,s){var u,o;return(u=t.call(this)||this).PL=void 0,u.aV=void 0,u.lq=void 0,u.Cq=void 0,u.xq=void 0,u.JW=void 0,u.pq=void 0,u.rNt=void 0,u.Lz=void 0,u.FNt=void 0,u.Ndt=void 0,u.Mz=void 0,u.Ac=void 0,u.FEt=void 0,u.BDt=void 0,u.Pz=!1,u.LNt=void 0,u.T9=new dr,u.k9=void 0,u.ixt=void 0,u.YNt=new dr,u.pst=!0,u.DNt=!1,u.tO=new cA,u.sO=new cA,u.Gl=void 0,u.ENt=void 0,u.rq=void 0,u.nq=void 0,u.UNt=uS.pz,u.WNt=void 0,u.bd=function(t){var i=u.Fx;i.length>0&&u.ENt.jU(i.start(0)),u.So(new Rg(t.currentTime,u.Vx))},u.BNt=function(){u.PL.lP!==u.pst&&(u.PL.lP?u.jP():u.QP().catch(pn))},u.YG=function(){u.DNt=!0},u.zNt=function(t){u.rq=t.errorObject,u.nq=pw(u.rq),u.HNt(u.rq)},u.MNt=function(t){u.rq=_w(t.lt),u.nq=t.lt,u.HNt(u.rq)},u.PL=i,u.Cq=new $y(u,u.PL),u.xq=new Yy(u.Cq,!0),u.aV=n,u.Mz=r,u.lq=new hz(r.jY,r.CY.RW),u.pq=new Mb(n),u.PL.Rq=u.pq,s.allowNativeFullscreen?u.ENt=new $F(u.PL):u.ENt=new KF(u.PL),u.Gl=new Fb([u.ENt.Z]),u.rNt=new az,u.FNt=new $W(u),u.Lz=e,u.Ndt=io({},s.retryConfiguration,{maxRetries:null!=(o=s.retryConfiguration.maxRetries)?o:3}),u.HI(),u}Pt(i,t);var n=i.prototype;return n.HI=function(){this.PL.wn(cX,this.Rs),this.PL.wn(Fy.PM,this.YG),this.PL.wn([ch.uo,ch.jw],this.BNt),this.PL.wn(ty.ma,this.MNt),this.PL.wn(ch.py,this.bd),this.xq.wn(Uy,this.Rs)},n.UI=function(){this.PL.mn(cX,this.Rs),this.PL.mn(Fy.PM,this.YG),this.PL.mn([ch.uo,ch.jw],this.BNt),this.PL.mn(ty.ma,this.MNt),this.PL.mn(ch.py,this.bd),this.xq.mn(Uy,this.Rs)},n.YP=function(){return!1},n.qP=function(){return this.PL.Ma},n.Aa=function(){return this.PL.Sq},n.sI=function(t){return this.PL.Tq(t)},n.we=function(){this.PL.we()},n.be=function(){return this.PL.be()},n.$P=function(){},n.tI=function(){},n.JP=function(){},n.ZP=function(){},n.Xx=function(t,i){var n=this;this.T9.Zg(),this.T9=new dr,this.k9=Ar(function(i){return n.E9(t,i,n.k9)},this.T9)},n.ONt=function(){var t=this.cC;if(t){for(var i,n=new Date(t.creationDate).getTime(),r=NaN,e=Ft(t.presentations);!(i=e()).done;){var s=i.value;s.currentTime&&(r=s.currentTime.value/(s.currentTime.scale||1)*1e3)}if(!E(r))return new Date(n-r)}},n.VNt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.UNt!==uS.pz&&this.BDt?(this.BDt.Un(),this.UNt!==uS.HL&&this.UNt!==uS.PW?[3,2]:[4,this.BDt.eNt]):[2];case 1:t.sent(),"vod"===this.BDt.cC.P0&&this.BDt.Tn(),t.label=2;case 2:return[2]}})}).call(this)},n.Ta=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return pr(n),[4,this.hr()];case 1:return s.sent(),pr(n),fT(t)?(r=t,this.Ac=r,this.FEt=i,e=new YW(this.aV),this.WNt=this.qNt(t),this.JW=new aX(this,this.PL,this.WNt),this.JW.Rt=!0,this.JW.wn("latencyrecoveryseek",this.Rs),this.VP.Ea(this.JW),this.BDt=new hX(r,e,this.PL,this.lq,this.aV,this.rNt,this.JW,this.Ndt,this,this.ENt,this.Mz),this.BDt.wn(ch.Ww,this.Rs),this.BDt.wn(ty.ma,this.zNt),this.tO.OI=this.BDt.ht,this.sO.OI=this.BDt.rt,this.pq.BW(t.contentProtection),Er(this.VNt()),[2]):(this.rq=new _d(pd.SOURCE_INVALID,"HESP source incorrectly configured"),this.nq=pw(this.rq),this.HNt(this.rq),[2,ot.resolve()])}})}).call(this)},n.IP=function(t,i,n,r){return ot.resolve()},n.CP=function(){return ot.resolve()},n.qNt=function(t){return t.latencyConfiguration?t.latencyConfiguration:mz()},n.QP=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return this.BDt?(this.pst=!1,this.BDt.Un(),[4,this.BDt.W]):[2];case 1:return n.sent(),this.So(new bT(this.zx)),i=this.BDt.ww(uX.Jz),this.dC(),[4,i];case 2:return n.sent(),this.BDt.Tn(),[4,this.PL.QP()];case 3:return n.sent(),null==(t=this.JW)||t.Tn(),[2]}})}).call(this)},n.jP=function(){var t;this.BDt&&(this.pst=!0,this.So(new kT(this.zx)),this.BDt.KP(),null==(t=this.JW)||t.KP(),this.PL.jP())},n.dC=function(){var t=this;if(this.ixt)throw new y("Cannot seek while resetting");this.T9.Zg(),this.T9=new dr,this.k9=Ar(function(i){return t.yNt(t.k9,i)},this.T9)},n.E9=function(t,i,n){return jt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:if(this.ixt)throw new y("Cannot seek while resetting");return r=t,this.GNt(r),this.kP.length>0&&(r=LA.jn(this.kP).LM(r),this.GNt(r)),this.BDt?n?[4,n.catch(pn)]:[3,2]:[2];case 1:u.sent(),pr(i),u.label=2;case 2:return u.trys.push([2,4,,5]),e=this.PL.ww(ch.Zw,i),this.PL.Oy(r),this.BDt.Oy(r),[4,e];case 3:return u.sent(),[3,5];case 4:throw yr(s=u.sent()),this.BDt.KP(),this.XNt(),s;case 5:return this.jNt(),[2]}})}).call(this)},n.yNt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:return this.So(new ah("golive")),n=this.lNt,this.GNt(n),this.BDt?t?[4,t.catch(pn)]:[3,2]:[2];case 1:c.sent(),pr(i),c.label=2;case 2:return c.trys.push([2,11,,13]),r=this.JW.aL.targetOffset,[4,this.BDt.eNt];case 3:c.sent(),n&&r>=1?(this.JW.VL()||(s=A.min(1,.5*r),r-=s),e=n-r):e=this.lNt?this.lNt-.2:void 0,this.BDt.dC(e),c.label=4;case 4:return this.ykt.V>0?[4,this.BDt.ww(tC.pZ,i)]:[3,6];case 5:return c.sent(),[3,4];case 6:u=this.ykt,c.label=7;case 7:return 0!==this.ykt.qM(u).V?[3,9]:[4,this.BDt.ww(tC.pZ,i)];case 8:return c.sent(),[3,7];case 9:return e=this.ykt.Tn(this.ykt.V-1),e=this.QNt(e),this.GNt(e),o=this.PL.ww(ch.Zw,i),this.PL.Oy(e,!0),[4,o];case 10:return c.sent(),[3,13];case 11:if(mr(h=c.sent()))throw null==(a=this.JW)||a.Tn(),h;return this.BDt.KP(),[4,this.BDt.hNt()];case 12:throw c.sent(),this.XNt(),h;case 13:return this.jNt(),[2]}})}).call(this)},n.GNt=function(t){this.Pz=!0,this.LNt=t,this.So(new ET(this.zx))},n.jNt=function(){this.Pz&&(this.LNt=void 0,this.Pz=!1,this.So(new IT(this.zx)))},n.XNt=function(){this.LNt=void 0,this.Pz=!1},n.QNt=function(t){return t},n.KNt=function(){var t;null==(t=this.BDt)||t.KP()},n.HNt=function(t){this.So(new Cb(t)),this.KNt()},n.sxt=function(t,i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return pr(n),null==(r=this.JW)||r.KP(),t?[4,t.catch(pn)]:[3,2];case 1:e.sent(),e.label=2;case 2:return i?[4,i.catch(pn)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[4,this.ENt.hr()];case 5:return e.sent(),this.BDt?[4,this.BDt.zg()]:[3,7];case 6:e.sent(),this.BDt=void 0,e.label=7;case 7:return pr(n),[4,this.PL.hr()];case 8:return e.sent(),pr(n),this.PL.Eq(),this.sO.hr(),this.tO.hr(),this.XNt(),this.xq.hr(),this.rNt.hr(),this.rq=void 0,this.nq=void 0,this.pst=!0,this.DNt=!1,this.Ac=void 0,this.ixt=void 0,this.WNt=void 0,[2]}})}).call(this)},n.hr=function(){return this.T9.Zg(),this.T9=new dr,this.YNt.Zg(),this.YNt=new dr,this.ixt=this.sxt(this.k9,this.ixt,this.YNt.Yg).catch(function(t){return _r(t)}),this.ixt},n.kn=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return this.UI(),this.xq.kn(),this.Cq.zg(),this.Ac?[4,this.hr()]:[3,2];case 1:n.sent(),n.label=2;case 2:return this.Vo(),this.PL.Rq=void 0,null==(t=this.JW)||t.mn("latencyrecoveryseek",this.Rs),null==(i=this.JW)||i.zg(),[4,this.ENt.kn()];case 3:return n.sent(),this.Gl.kn(),this.tO.kn(),this.sO.kn(),[2]}})}).call(this)},xt(i,[{key:"ht",get:function(){return this.tO}},{key:"rt",get:function(){return this.sO}},{key:"cC",get:function(){var t,i;return null==(i=this.BDt)||null==(t=i.cC)?void 0:t.cC}},{key:"OP",get:function(){return this.PL.OP},set:function(t){this.PL.OP=t}},{key:"WP",get:function(){return!1},set:function(t){}},{key:"dq",get:function(){return this.lq}},{key:"oP",get:function(){return this.PL.oP},set:function(t){this.PL.oP=t}},{key:"zx",get:function(){var t;return null!=(t=this.LNt)?t:this.PL.zx},set:function(t){this.Xx(t)}},{key:"Vx",get:function(){var t=this.ONt();if(t)return new Date(t.getTime()+1e3*this.zx)},set:function(t){var i=this.ONt();t&&i&&(this.zx=i.getTime()-t.getTime())}},{key:"bt",get:function(){return this.Ac}},{key:"vP",get:function(){return this.PL.vP},set:function(t){this.PL.vP=t}},{key:"ct",get:function(){var t=this.PL.ct;return t===In?1/0:t}},{key:"Qx",get:function(){return!1}},{key:"Jx",get:function(){return this.rq}},{key:"lt",get:function(){return this.nq}},{key:"$x",get:function(){return this.FNt}},{key:"iP",get:function(){}},{key:"sP",get:function(){return!1}},{key:"rP",get:function(){return io({},{rO:0,hO:0,oO:0,aO:0,uO:0,cO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.PL.hP())}},{key:"cP",get:function(){return!0}},{key:"xP",get:function(){return this.Pz}},{key:"uq",get:function(){}},{key:"nt",get:function(){return this.Gl}},{key:"DP",get:function(){return this.PL.DP}},{key:"MP",get:function(){return this.PL.MP}},{key:"Fx",get:function(){return this.ykt._s()}},{key:"ykt",get:function(){return this.BDt?this.BDt.Fx:LA.rL()}},{key:"pP",get:function(){return this.PL.pP._s()}},{key:"kP",get:function(){var t,i;return null!=(i=null==(t=this.BDt)?void 0:t.kP._s())?i:LA.rL()._s()}},{key:"lP",get:function(){return this.pst}},{key:"uC",get:function(){return!0}},{key:"VP",get:function(){return this.Lz}},{key:"lNt",get:function(){var t;return null==(t=this.BDt)?void 0:t.lNt}},{key:"OL",get:function(){if(!this.lP&&this.DNt){var t=this.zx,i=this.rNt.fCt(t);if(void 0!==i){var n=this.ykt,r=0;if(n.V>0){var e=n.An(n.V-1);r=A.max(e-t,0)}return A.max(i,r)}}}},{key:"hC",get:function(){var t;return null==(t=this.BDt)?void 0:t.hC}},{key:"oC",get:function(){var t;return null==(t=this.BDt)?void 0:t.oC}},{key:"aC",get:function(){var t;return null==(t=this.BDt)?void 0:t.aC}},{key:"AP",get:function(){return this.PL.AP}},{key:"wP",get:function(){return this.UNt},set:function(t){this.UNt=t,this.VNt()}}]),i}(uh),vX=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,r,e,u)||this).Nq=void 0,o.sBt=void 0,o.iBt=!1,o.JNt=!1,o.$Nt=[],o.tBt=void 0,o.eBt=function(){var i=o.oP||0===o.OP;"hidden"!==v.visibilityState||o.lP||!i||o.Aa().YL?"visible"===v.visibilityState&&o.iBt&&(o.JNt=!0,o.tBt=Vi.Og(function(){for(var i,n=Ft(o.$Nt);!(i=n()).done;){var r=i.value;t.prototype.So.call(sW(o),r)}o.tBt=void 0,o.JNt=!1},2e3),Er(o.QP()),o.iBt=!1):(o.jP(),o.iBt=!0)},o.Nq=s,o.sBt=i,Oi.Rg&&v.addEventListener("visibilitychange",o.eBt),o}Pt(i,t);var n=i.prototype;return n.So=function(i){if(this.JNt){if(i.type===ch.Zw)return void this.ZNt();if(i.type===Fy.xM||i.type===ch.$w||i.type===Fy.PM)return void this.$Nt.push(i)}t.prototype.So.call(this,i)},n.ZNt=function(){this.JNt=!1,void 0!==this.tBt&&Vi.Lg(this.tBt);var i=Wn(this.$Nt,function(t){return t.type===Fy.PM});i&&t.prototype.So.call(this,i),tr(this.$Nt)},n.zP=function(){if(MO(this.PL))return this.PL.zP()},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.iBt=!1,this.ZNt(),[4,t.prototype.hr.call(i)];case 1:return n.sent(),[2]}})}).call(this)},n.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return v.removeEventListener("visibilitychange",this.eBt),this.ZNt(),[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.PL.zg()];case 2:return n.sent(),[4,this.Nq.Dq(this.sBt)];case 3:return n.sent(),[2]}})}).call(this)},n.QNt=function(t){return Oi.X_&&Oi.Q_>=15&&Oi.Kv?t+.25:t},i}(fX);V(),It(),Wt(),Bt(),Yt();var dX=function(){function t(){}var i=t.prototype;return i.Jq=function(t,i){return jt(function(){return zt(this,function(i){return[2,lX(t.type)]})})()},i.Zq=function(t){return jt(function(){return zt(this,function(i){return[2,H_(t)]})})()},xt(t,[{key:"tz",get:function(){return xb.wC}}]),t}();function lX(t){if(!t)return!1;var i=t.toLowerCase();return zo(i,kA.mC)||zo(i,kA.wC)}var gX=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.DC=function(t,i,n,r,e,s,u){var o=new tM(i),h=o.Yq(vw.Mk);return new vX(h,n,e,s,o,r)},n.Jq=function(i,n){return Vi.yx&&Jd?Oi.w_||Oi.S_||Oi.D_?ot.resolve(!1):Me(i.useManagedMediaSource)?t.prototype.Jq.call(this,i,n):ot.resolve(!1):ot.resolve(!1)},n.$q=function(){return!1},i}(dX);rS(new gX),V(),It(),Wt(),Bt(),Dt(),H(),Yt(),V(),It(),Wt(),Dt(),Yt();var wX=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,r,e,u)||this).Nq=void 0,o.Nq=s,o}Pt(i,t);var n=i.prototype;return n.zP=function(){if(MO(this.PL))return this.PL.zP()},n.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.Nq.Dq(this.PL)];case 2:return n.sent(),[2]}})}).call(this)},i}(fX),mX=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.Jq=function(i,n){var r=this;return jt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return Oi.IS_IOS_CHROME?[2,!1]:[4,t.prototype.Jq.call(r,i,n)];case 1:if(u=h.sent(),!(null!=(o=null==(s=xr())||null==(e=s.canPlayType)?void 0:e.call(s,kA._C))?o:"")||!u||!("serviceWorker"in l))return[2,!1];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,Cr(l.serviceWorker.ready,1e3)];case 3:return h.sent(),[2,!0];case 4:return h.sent(),[2,!1];case 5:return[2]}})})()},n.Zq=function(i){var n=this;return jt(function(){return zt(this,function(r){switch(r.label){case 0:return i.fairplay?[4,t.prototype.Zq.call(n,i)]:[2,!1];case 1:return[2,r.sent()]}})})()},n.DC=function(t,i,n,r,e,s,u){if(j(t,HTMLDivElement)){var o=i.Pst(vw.Mk);return new wX(o,n,e,s,i,r)}throw new _d(pd.CONFIGURATION_ERROR,"Container Div element expected.")},n.$q=function(){return!1},xt(i,[{key:"tz",get:function(){return xb.xW}}]),i}(dX);Oi.X_&&Oi.ru&&rS(new mX),V(),It(),V(),It(),V(),It(),Wt(),Bt(),Dt(),H(),ft(),Ut(),Yt(),V(),It(),Bt();var pX="theo_live_user_id",yX=function(){function t(t){this.externalId=void 0,this.id=void 0,this.userId=void 0,this.AA=void 0,this.externalId=t,this.id=uI(),this.userId=_X(),this.AA=0}return t.prototype.incrementSequenceNumber=function(){this.AA+=1},xt(t,[{key:"sequenceNumber",get:function(){return this.AA}}]),t}();function _X(){try{var t=localStorage.getItem(pX);if(t)return t;var i=uI();return localStorage.setItem(pX,i),i}catch(t){return uI()}}function kX(t){var i;return{hespSrc:t.hespSrc,type:"theo.live",hlsSrc:t.hlsSrc,maxMobileBitrate:t.maxMobileBitrate,targetLatency:null==(i=t.metadata.customization)?void 0:i.targetLatency,contentProtection:t.drmConfig?t.drmConfig:void 0}}function bX(t){var i=t.integration,n=t.widevine,r=t.playready,e=t.fairplay;return io({integration:i},n&&{widevine:{licenseAcquisitionURL:n.licenseUrl}},r&&{playready:{licenseAcquisitionURL:r.licenseUrl}},e&&{fairplay:{licenseAcquisitionURL:e.licenseUrl,certificateURL:e.certificateUrl}})}function AX(t,i){return{id:t.id,name:t.name,deleted:"deleted"===t.status,targetLatency:t.source.targetLatency,maxMobileBitrate:t.source.maxMobileBitrate,endpoints:[{hespSrc:t.source.hespSrc,hlsSrc:t.source.hlsSrc,weight:1,priority:1,contentProtection:t.source.contentProtection},t.fallback&&i?{hespSrc:t.fallback.hespSrc,hlsSrc:t.fallback.hlsSrc,weight:1,priority:2,contentProtection:t.fallback.contentProtection}:void 0].filter(Fi)}}V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),V(),It(),Wt(),ft(),Yt(),V(),It();var TX=function(t){return t.STARTING="s",t.PLAYING="p",t.SEEKING="k",t.REBUFFERING="r",t.PAUSED="a",t.ENDED="e",t.QUIT="q",t}({}),SX=function(t){return t.MANIFEST="m",t.AUDIO="a",t.VIDEO="v",t.OTHER="o",t}({});function EX(t){return 100*A.round(t/100)}function IX(t){for(var i=t.Gx(),n=t.Ux(),r=0;r0&&void 0!==n&&void 0!==i&&(this.hBt+=1,this.oBt=this.aBt(this.oBt,n),this.uBt=this.aBt(this.uBt,1e3*this.oa.VP.Cd.targetOffset),this.cq=this.aBt(this.cq,1e3*i),this.cBt=this.aBt(this.cBt,t/1e3))},i.aBt=function(t,i){return t+(i-t)/this.hBt},i.DC=function(){var t={sta:this.Vp,ts:this.nBt,"theo-vt":this.dBt,"theo-at":this.lBt,"theo-d":this.ct,"theo-r":this._f,"theo-e":this.nq};return this.hBt>0?io({},t,{bl:EX(this.oBt),tbl:EX(this.uBt),ltc:EX(this.cq),mtp:EX(this.cBt),"theo-w":this.hBt}):t},i.fBt=function(){return new t(this.Vp,this.oa,this._f)},t.starting=function(i,n,r){return new t(TX.STARTING,i,n,r)},t.playing=function(i){return new t(TX.PLAYING,i)},t.seeking=function(i,n){return new t(TX.SEEKING,i,n)},t.rebuffering=function(i,n){return new t(TX.REBUFFERING,i,n)},t.paused=function(i){return new t(TX.PAUSED,i)},t.ended=function(i){return new t(TX.ENDED,i)},t.quit=function(i){return new t(TX.QUIT,i)},xt(t,[{key:"ct",get:function(){return Date.now()-this.nBt}}]),t}(),NX=function(){function t(t,i,n){var r=this;this.oa=void 0,this.yBt=void 0,this.kBt=void 0,this.BBt=void 0,this.gBt=void 0,this.ABt=[],this._Bt=void 0,this.DNt=!1,this.uX=!1,this.CBt=function(t){var i,n,e;r.SBt(DX.starting(r.oa,"fallback",null!=(e=null==(i=t.reason)?void 0:i.message)?e:null==(n=r.oa.Zx())?void 0:n.message))},this.RBt=function(){r.SBt(DX.starting(r.oa,"loadChannel"))},this.DBt=function(){r.SBt(DX.ended(r.oa))},this.KW=function(t){t.Ht.wn(Fg.II,r.ih)},this.ih=function(){var t,i,n,e,s=null==(i=RX(r.oa.rt))||null==(t=i.YI)?void 0:t.o,u=null==(e=RX(r.oa.ht))||null==(n=e.YI)?void 0:n.o;s&&u&&(r._Bt&&r._Bt.Vp===TX.PLAYING&&r._Bt.dBt===s&&r._Bt.lBt===u||r.SBt(DX.playing(r.oa)))},this.NL=function(){r.DNt=!0,r.uX=!1,r.SBt(DX.playing(r.oa))},this.PBt=function(){r.DNt&&!r.uX&&(r.uX=!0,r.SBt(DX.seeking(r.oa,"latencyRecovery")))},this.IBt=function(){r.DNt&&!r.uX&&(r.uX=!0,r.SBt(DX.seeking(r.oa,"goLive")))},this.DL=function(){r.oa.xP||r.SBt(DX.rebuffering(r.oa,"visible"===v.visibilityState?void 0:"invisible"))},this.xBt=function(){r.SBt(DX.paused(r.oa))},this.NBt=function(t){var i=Vi.Dh(t.url),n=function(t){var i=t.pathname;if(qo(i,"manifest.json"))return SX.MANIFEST;if(Wo(i,"/video/"))return SX.VIDEO;if(Wo(i,"/audio/"))return SX.AUDIO;return SX.OTHER}(i);if(n!==SX.OTHER){r.gBt.incrementSequenceNumber();var e=io({},t.headers,{"CMCD-Request":r.vBt(),"CMCD-Object":r.pBt(n),"CMCD-Status":r.mBt(),"CMCD-Session":r.wBt()});n===SX.VIDEO&&!qo(i.pathname,".hspi")&&r._Bt&&(r.SBt(r._Bt.fBt()),e=io({},e,r.bBt())),t.redirect(io({},t,{headers:e}))}},this.EBt=function(){Er(r.TBt())},this.oa=t,this.yBt=i,this.gBt=n;var e=i.endpoints[0],s=(null==e?void 0:e.hespSrc)||(null==e?void 0:e.hlsSrc)||"";this.kBt=Vi.Dh("bye",s).href,f.addEventListener("beforeunload",this.EBt),this.oa.wn(Fy.PM,this.NL),this.oa.wn(Fy.xM,this.DL),this.oa.wn(ch.jw,this.xBt),this.oa.$x.wn("latencyrecoveryseek",this.PBt),this.oa.$x.wn("golive",this.IBt),this.oa.lX.bY(this.NBt),this.oa.rt.wn(xg.rI,this.KW),this.oa.ht.wn(xg.rI,this.KW),this.oa.pnt.addEventListener("intenttofallback",this.CBt),this.oa.pnt.addEventListener("distributionloadstart",this.RBt),this.oa.pnt.addEventListener("distributionoffline",this.DBt),this._Bt=DX.starting(this.oa,"loadchannel"),this.BBt=Vi.fm(function(){var t;null==(t=r._Bt)||t.rBt()},1e3)}var i=t.prototype;return i.vBt=function(){var t,i=this.oa.VP.OL,n=IX(this.oa),r=this.oa.lX.CY.IW;return xX({bl:void 0!==n?EX(n):void 0,tbl:EX(1e3*this.oa.VP.Cd.targetOffset),ltc:void 0!==i?EX(1e3*i):void 0,mtp:void 0!==r?EX(r/1e3):void 0,sta:null==(t=this._Bt)?void 0:t.Vp,su:!this.DNt||void 0,"theo-sq":this.gBt.sequenceNumber})},i.pBt=function(t){var i,n,r=function(t,i){switch(i){case SX.VIDEO:return RX(t.rt);case SX.AUDIO:return RX(t.ht)}}(this.oa,t);return xX({br:(null==r||null==(i=r.YI)?void 0:i.IW)?EX((null==r||null==(n=r.YI)?void 0:n.IW)/1e3):void 0,ot:t,tb:r?EX(PX(r).IW/1e3):void 0,lb:r?EX(CX(r).IW/1e3):void 0})},i.mBt=function(){return xX({"theo-cw":this.oa.xe.clientWidth,"theo-ch":this.oa.xe.clientHeight,"theo-m":this.oa.oP,"theo-vo":A.ceil(100*this.oa.OP)})},i.wBt=function(){var t;return xX({sf:BX(this.oa.bt),sid:this.gBt.id,st:"l",v:2,"theo-eid":null==(t=this.gBt.externalId)?void 0:t.substring(0,128),"theo-cn":this.yBt.name.substring(0,128),"theo-v":"10.3.0","theo-t":"web","theo-u":this.gBt.userId})},i.bBt=function(){var t={"CMCD-States":btoa(JSON.stringify(this.ABt))};return this.ABt=[],t},i.SBt=function(t){this._Bt&&this.ABt.push(this._Bt.DC()),this._Bt=t},i.TBt=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this._Bt&&(this.ABt.push(this._Bt.DC()),this._Bt=void 0),this.ABt.push(DX.quit(this.oa).DC()),t=io({},this.bBt(),{"CMCD-Session":this.wBt()}),[4,this.oa.Dx.vk({Yu:this.kBt,_k:t,Yk:!0})];case 1:return[4,i.sent().lk()];case 2:return i.sent(),[2]}})}).call(this)},i.destroy=function(){var t=this;this.EBt(),f.removeEventListener("beforeunload",this.EBt),this.oa.mn(Fy.PM,this.NL),this.oa.mn(Fy.xM,this.DL),this.oa.mn(ch.jw,this.xBt),this.oa.$x.mn("latencyrecoveryseek",this.PBt),this.oa.$x.mn("golive",this.IBt),this.oa.rt.mn(xg.rI,this.KW),this.oa.ht.mn(xg.rI,this.KW),this.oa.rt.NI.forEach(function(i){return i.mn(Fg.II,t.ih)}),this.oa.ht.NI.forEach(function(i){return i.mn(Fg.II,t.ih)}),this.oa.pnt.removeEventListener("intenttofallback",this.CBt),this.oa.pnt.removeEventListener("distributionloadstart",this.RBt),this.oa.pnt.removeEventListener("distributionoffline",this.DBt),this.oa.lX.TY(this.NBt),Vi.vm(this.BBt)},t}();function xX(t){return b.keys(t).map(function(i){return function(t,i){switch(void 0===i?"undefined":W(i)){case"boolean":return i?t:t+"=false";case"number":return t+"="+i;case"string":return t+'="'+i+'"';default:return}}(i,t[i])}).filter(Boolean).sort().join(",")}function BX(t){if(t)return t.type===kA._C||t.type===kA.gC?"h":t.type===kA.wC?"e":void 0}var OX=function(t){function i(i,n,r){var e;return(e=t.call(this,i,"Could not load channel with id "+n+": "+r)||this).channelId=void 0,e.reason=void 0,e.channelId=n,e.reason=r,e}return Pt(i,t),i}(_d),MX=function(t){function i(i){return t.call(this,pd.THEO_LIVE_CHANNEL_NOT_FOUND,i,"The channel could not be found")||this}return Pt(i,t),i}(OX),LX=function(t){function i(i){return t.call(this,pd.THEO_LIVE_CHANNEL_NOT_FOUND,i,"This account has been locked")||this}return Pt(i,t),i}(OX),FX=function(t){function i(i){return t.call(this,pd.THEO_LIVE_CHANNEL_NOT_FOUND,i,"The channel got deleted")||this}return Pt(i,t),i}(OX),UX=function(){function t(t,i){this.aV=void 0,this.LBt=void 0,this.MBt=void 0,this.aV=t,this.LBt=i,this.MBt=new Map}return t.prototype.Jgt=function(t){var i=this.MBt.get(t);if(i)return i;var n=new VX(t,this.aV,this.LBt);return this.MBt.set(t,n),n},t}(),VX=function(){function t(t,i,n){var r;this.aS=void 0,this.aV=void 0,this.LBt=void 0,this.FBt=void 0,this.VBt=void 0,this.UBt=void 0,this.WBt=void 0,this.aS=t,this.aV=i,this.LBt=n,this.WBt=new Xd,this.LBt.discoveryHeader&&this.WBt.append("x-theolive-discovery",this.LBt.discoveryHeader),this.WBt.set("CMCD-Session",xX({sid:this.LBt.sessionId,st:"l",v:2,"theo-eid":null==(r=this.LBt.externalSessionId)?void 0:r.substring(0,128),"theo-v":"10.3.0","theo-t":"web","theo-u":this.LBt.userId})),this.er()}var i=t.prototype;return i.er=function(){var t=this;this.UBt=!1,this.FBt=le(),this.VBt=this.KSt(),this.VBt.catch(function(){return t.UBt=!0})},i.KSt=function(){return jt(function(){var t,i,n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:t=Ft(this.LBt.discoveryUrls),f.label=1;case 1:return(i=t()).done?[3,8]:(n=i.value,[4,this.HBt(this.aS,n,this.WBt)]);case 2:if(!(r=f.sent()))return[3,7];if(!function(t){return void 0!==t.mode}(r))return[3,6];if(e=r.mode,s=r.status,u=r.fallback,o=r.metadata,"locked"===e)throw new LX(this.aS);if("deleted"===s)throw new FX(this.aS);return a={id:this.aS,name:o.name,mode:e,status:s,source:kX(r)},u?[4,this.qBt(u,n,this.WBt)]:[3,4];case 3:return c=f.sent(),[3,5];case 4:c=void 0,f.label=5;case 5:return[2,AX.apply(void 0,[(a.fallback=c,a.insights=null==o?void 0:o.insights,a.enhancedLogging=null==o?void 0:o.enhancedLogging,a.customization=null==o?void 0:o.customization,a.sseEndpoint=r.sseEndpoint,a),null==(h=this.LBt.fallbackEnabled)||h])];case 6:return[2,r];case 7:return[3,1];case 8:throw new MX(this.aS)}})}).call(this)},i.qBt=function(t,i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return"hls"===t.type?[2,{hlsSrc:t.src,type:"hls"}]:[4,this.HBt(t.src,i,n)];case 1:return(r=e.sent())?[2,kX(r)]:[2,void 0]}})}).call(this)},i.HBt=function(t,i,n){return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),(r=Vi.Dh(t,i)).searchParams.set("osName",function(){var t=Vi.Zs.ap;if("ios"===t||"macos"===t)return"apple";return t}()),r.searchParams.set("deviceType",Vi.Zs.cp),r.searchParams.set("sdkType","web"),[4,this.aV.vk({Yu:r.toString(),_k:n})];case 1:return[4,e.sent().VT()];case 2:return[2,e.sent()];case 3:return e.sent(),[2,void 0];case 4:return[2]}})}).call(this)},xt(t,[{key:"OBt",get:function(){return le()-this.FBt>36e5}},{key:"zBt",get:function(){return(this.UBt||this.OBt)&&this.er(),this.VBt}}]),t}();V(),It(),Wt(),Bt(),Dt(),Yt();var jX=function(t){function i(i){var n;return(n=t.call(this,"distributionloadstart")||this).distributionId=void 0,n.distributionId=i,n}return Pt(i,t),i}(ah),HX=function(t){function i(i){var n;return(n=t.call(this,"distributionoffline")||this).distributionId=void 0,n.distributionId=i,n}return Pt(i,t),i}(ah),WX=function(t){function i(i){var n;return(n=t.call(this,"endpointloaded")||this).endpoint=void 0,n.endpoint=i,n}return Pt(i,t),i}(ah),zX=function(t){function i(i){var n;return(n=t.call(this,"intenttofallback")||this).reason=void 0,n.reason=i,n}return Pt(i,t),i}(ah),qX=function(t){function i(){return t.call(this,"enterbadnetworkmode")||this}return Pt(i,t),i}(ah),XX=function(t){function i(){return t.call(this,"exitbadnetworkmode")||this}return Pt(i,t),i}(ah),GX=function(t){function i(i){var n;return(n=t.call(this)||this).oa=void 0,n.hu=void 0,n.oa=i,n}return Pt(i,t),i.prototype.jBt=function(t){return this.oa.jBt(t)},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{addEventListener:function(i,n){t.wn(i,n)},removeEventListener:function(i,n){t.mn(i,n)},get badNetworkMode(){return t.GBt},set badNetworkMode(i){t.GBt=i},get authToken(){return t.XBt},set authToken(i){t.XBt=i},preloadPublications:function(i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.jBt(i)];case 1:return[2,n.sent().map(function(t){return{name:t.name}})]}})})()}}}(this)),this.hu}},{key:"GBt",get:function(){return this.oa.GBt},set:function(t){this.oa.GBt=t}},{key:"XBt",get:function(){return this.oa.XBt},set:function(t){this.oa.XBt=t}}]),i}(uh);var QX=["https://discovery.theo.live/channels/"],YX=8e5,$X=function(t){function i(i,n){var r,e;(r=t.call(this,i,n)||this).ZBt=void 0,r.gBt=void 0,r.uMt=void 0,r.dMt=void 0,r.lMt=void 0,r.Ac=void 0,r.mz=void 0,r.cMt=void 0,r.yBt=void 0,r.pMt=void 0,r.fNt=!1,r.Wz=void 0,r.nq=void 0,r.hT=new dr,r.YBt=void 0,r.DNt=!1,r.d9=!1,r._Mt=void 0,r.mMt=void 0,r.iMt=void 0,r.tMt=void 0,r.wMt=[],r.nMt=!1,r.oMt=void 0,r.eMt=!0,r.JBt=0,r.sMt=void 0,r.KW=function(t){var i,n,e=t.Ht,s=null==(i=r.yBt)?void 0:i.maxMobileBitrate;void 0!==s&&Vi.Zs.Ks&&e.$I.NI.filter(function(t){return t.IW>s}).forEach(function(t){return e.$I.pS(t)});e.wn(Fg.II,r.ih);var u=KX(null!=(n=e.tC)?n:e.$I.NI);e.tC=u.length>0?u:KX(e.$I.NI)},r.ih=function(t){var i,n=t.qot;(!n||(null!=(i=n.wyt)?i:n.IW)>=YX)&&r.hMt()},r.PBt=function(){r.rMt(),r.wMt.push(Vi.Mg()),r.wMt=r.wMt.filter(function(t){return Vi.Mg()-t<=3e5}),r.wMt.length>=3&&(r.wMt=[],r.ZBt.So(new zX(new _d(pd.THEO_LIVE_UNKNOWN_ERROR,"Unstable playback detected."))),Er(r.$Bt()))},r.aMt=function(t){r.fNt&&r.oMt&&("manifest"!==t.type&&"segment"!==t.type||(t.headers.Authorization="Bearer "+r.oMt,t.redirect(t)))},r.ZBt=new GX(r);var s,u,o,h=i.Cd.theoLive;return r.dMt={sessionId:null!=(s=null==h?void 0:h.sessionId)?s:uI(),userId:null!=(u=null==h?void 0:h.userId)?u:_X(),externalSessionId:null==h?void 0:h.externalSessionId,analyticsEnabled:!1!==(null==h?void 0:h.analyticsEnabled),fallbackEnabled:!1!==(null==h?void 0:h.fallbackEnabled),discoveryUrls:[].concat([null==h?void 0:h.discoveryUrl],null!=(o=null==h?void 0:h.discoveryUrls)?o:[],QX).filter(Fi).map(function(t){return t.lastIndexOf("/")===t.length-1?t:t+"/"})},r.gBt=new yX(null==(e=r.dMt)?void 0:e.externalSessionId),r.uMt=new UX(i.Dx,r.dMt),r.oa.$x.wn("latencyrecoveryseek",r.PBt),r}Pt(i,t);var n=i.prototype;return n.QBt=function(){this.oa.$x.wn("latencyrecoveryseek",this.PBt),this.oa.rt.wn(xg.rI,this.KW)},n.KBt=function(){this.oa.$x.mn("latencyrecoveryseek",this.PBt),this.oa.rt.mn(xg.rI,this.KW)},n.eI=function(i){var n=this;if(!this.fNt||this.nq||this.Wz)return t.prototype.eI.call(this,i);if(i.type===Fy.PM)return void 0!==this.YBt?(Vi.Lg(this.YBt),this.YBt=void 0,this.DNt||this.So(new Gy(this.Gx()))):this.So(new Gy(this.Gx())),this.JBt=0,this.DNt=!0,!0;if(i.type===Fy.xM)return this.YBt||(this.YBt=Vi.Og(function(){n.So(new zy(n.Gx())),n.YBt=void 0},100)),!0;if(i.type===ty.ma){var r;this.JBt++;var e=(null==(r=this.mz)?void 0:r.src)&&tG(this.mz.src),s=this.JBt>5;return e||s?(this.dispatchErrorEvent(i.errorObject),!0):(this.ZBt.So(new zX(i.errorObject)),Er(this.$Bt()),!0)}if(i.type===ch.uo){if(this.tMt=Vi.Mg(),void 0===this.iMt&&void 0!==this.oa.bt&&(this.iMt=Vi.fm(function(){var t;Vi.Mg()-(null!=(t=n.tMt)?t:0)>15e3&&(n.ZBt.So(new zX(new _d(pd.THEO_LIVE_UNKNOWN_ERROR,"Indefinite stall detected"))),Er(n.$Bt()))},1e3)),this.oa.bt&&(this.eMt=!1),this.eMt)return!0}else if(i.type===ch.jw){if(void 0!==this.iMt&&(Vi.vm(this.iMt),this.iMt=void 0),this.oa.bt&&(this.eMt=!0),!this.eMt)return!0}else i.type===ch.py?this.tMt=Vi.Mg():i.type===Fy.EM?this.sMt&&(!function(t,i){if(t.rt.V>0){var n,r=t.rt.MI(0);if(r.Rt=i.enabledVideo,r.Rt)r.tC=null==(n=i.targetVideoQualities)?void 0:n.map(function(t){return Wn(r.$I.NI,function(i){return i.IW===t})}).filter(Fi)}for(var e,s=Wn(t.ht.NI,function(t){return t.bs===i.enabledAudioLanguage}),u=Ft(t.ht.NI);!(e=u()).done;){var o=e.value;o.Rt=o===s}for(var h,a=Ft(t.nt.NI);!(h=a()).done;){var c,f=h.value,v=null!=(c=i.textTrackModes.get(f.o))?c:Jp.Nh;f.Qk!==v&&(f.Qk=v)}}(this.oa,this.sMt),this.sMt=void 0):i.type===ch.sy&&(this.ZBt.So(new zX(new _d(pd.THEO_LIVE_UNKNOWN_ERROR,"manifest not found"))),Er(this.$Bt()));return t.prototype.eI.call(this,i)},n.mnt=function(){return this.ZBt.Ca},n.Yx=function(){return this.fNt?this.Wz:t.prototype.Yx.call(this)},n.Zx=function(){return this.fNt?this.nq:t.prototype.Zx.call(this)},n.rMt=function(){if(!this.nMt&&(this.nMt=!0,this.ZBt.So(new qX),0!==this.oa.rt.V)){var t,i=this.rt.MI(0),n=sr(i.$I.NI,function(t){return t.IW});(null!=(t=n.wyt)?t:n.IW)0?n:KX(i.$I.NI)}},n.jBt=function(t){var i=this;return ot.all(t.map(function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,kr(this.uMt.Jgt(t).zBt,this.hT.Yg)];case 1:return[2,i.sent()]}})}).call(i)}))},n.nu=function(){var i;return null!=(i=this.Ac)?i:t.prototype.nu.call(this)},n.Ta=function(i,n){var r=this,e=function(){return t.prototype.Ta};return jt(function(){var t,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:this.fNt=!1,s=Ft(null!=(t=null==i?void 0:i.sources)?t:[]),f.label=1;case 1:return(u=s()).done?[3,8]:pT(o=u.value)&&o.type===kA.bC&&o.src?(this.fNt=!0,this.Ac=i,this.mz=o,this.ZBt.So(new jX(o.src)),this.QBt(),tG(o.src)?(h=io({},i,{sources:[io({},o,{type:kA.wC,useManagedMediaSource:!0})]}),[4,e().call(r,h,n)]):[3,3]):[3,7];case 2:return f.sent(),[2];case 3:this.cMt=this.uMt.Jgt(o.src),f.label=4;case 4:return f.trys.push([4,6,,7]),[4,this.cMt.zBt];case 5:return a=f.sent(),this.yBt=a,this.dMt.analyticsEnabled&&(this.lMt=new NX(this,a,this.gBt)),[2];case 6:throw yr(c=f.sent()),this.fMt(),c;case 7:return[3,1];case 8:return[4,e().call(r,i,n)];case 9:return[2,f.sent()]}})}).call(this)},n.fP=function(){return this.fNt?this.eMt:t.prototype.fP.call(this)},n.QP=function(){this.d9||(this.d9=!0,this.vMt(!1)),this.eMt=!1,t.prototype.QP.call(this)},n.jP=function(){this.eMt=!0,t.prototype.jP.call(this)},n.$Bt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return void 0!==this.oa.bt&&(null!=this.sMt||(this.sMt=function(t){var i,n,r=Wn(t.rt.NI,function(t){return t.Rt}),e=null==r||null==(i=r.tC)?void 0:i.map(function(t){return t.IW}),s=null==(n=Wn(t.ht.NI,function(t){return t.Rt}))?void 0:n.bs,u=ro();return t.nt.NI.forEach(function(t){return u.set(t.o,t.Qk)}),{enabledVideo:Boolean(r),targetVideoQualities:e,enabledAudioLanguage:s,textTrackModes:u}}(this.oa))),[4,this.oa.KP().catch(pn)];case 1:return t.sent(),this.vMt(!0),[2]}})}).call(this)},n.vMt=function(t){var i=this;if(this.cMt&&!this._Mt){this.fMt();var n=function(){i._Mt=void 0};this._Mt=this.gMt(this.cMt,t).then(n).catch(n)}},n.gMt=function(t,i){return jt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return n=this,i&&t.er(),[4,t.zBt];case 1:return r=o.sent(),this.yBt=r,[4,this.selectEndpoint(r,this.pMt)];case 2:if(e=o.sent(),this.pMt=e,!e)return[3,7];s=this.convertEndpointToSource(r,e),o.label=3;case 3:return o.trys.push([3,5,,6]),[4,this.oa.Ta(s,(new dr).Yg)];case 4:return o.sent(),[3,6];case 5:return u=o.sent(),this.dispatchErrorEvent(u),this.fMt(),[2];case 6:return this.ZBt.So(new WX(e)),this.eMt||this.oa.QP(),[3,8];case 7:this.ZBt.So(new HX(r.id)),this.mMt=Vi.Og(function(){return n.vMt(!0)},15e3),o.label=8;case 8:return[2]}})}).call(this)},n.convertEndpointToSource=function(t,i){var n,r,e={sources:[this.getHespSource(t,i),this.getMillicastSource(i),this.getHlsSource(i)].filter(Fi),ads:this.DNt?[]:null==(n=this.Ac)?void 0:n.ads,blockContentIfAdError:null==(r=this.Ac)?void 0:r.blockContentIfAdError,streamType:"live"};if(i.adSrc||i.daiAssetKey){var s,u=null!=(s=e.ads)?s:[],o=u.filter(function(t){return"theoads"===t.integration});o.length>0?o.forEach(function(t){var n,r,e=t;e.sseEndpoint=null!=(n=i.adSrc)?n:e.sseEndpoint,e.daiAssetKey=null!=(r=i.daiAssetKey)?r:e.daiAssetKey}):u.push({integration:"theoads",sseEndpoint:i.adSrc,daiAssetKey:i.daiAssetKey}),e.ads=u}i.dvrWindow&&(e.dvr=io({},e.dvr,{windowLength:i.dvrWindow}));var h=bE(e);return h.sources[0].bypassLicense=!0,h},n.getHespSource=function(t,i){var n,r;if(i.hespSrc)return{type:kA.wC,src:i.hespSrc,contentProtection:i.contentProtection?bX(i.contentProtection):void 0,useManagedMediaSource:!0,latencyConfiguration:null!=(r=null==(n=this.mz)?void 0:n.latencyConfiguration)?r:JX(t.targetLatency),hesp:{maxMobileBitrate:t.maxMobileBitrate}}},n.getHlsSource=function(t){if(t.hlsSrc)return{type:kA.gC,src:t.hlsSrc,contentProtection:t.contentProtection?bX(t.contentProtection):void 0}},n.getMillicastSource=function(t){if(t.millicastSrc)return{type:kA.yC,src:t.millicastSrc.name,streamAccountId:t.millicastSrc.accountId,subscriberToken:t.millicastSrc.subscriberToken}},n.dispatchErrorEvent=function(t){var i=j(t,_d)?t:new _d(pd.THEO_LIVE_UNKNOWN_ERROR,t.message,t);this.Wz=pw(i),this.nq=i,this.fMt(),this.So(new Cb(i))},n.fMt=function(){void 0!==this.YBt&&(Vi.Lg(this.YBt),this.YBt=void 0),void 0!==this.mMt&&(Vi.Lg(this.mMt),this.mMt=void 0),void 0!==this.iMt&&(Vi.vm(this.iMt),this.iMt=void 0)},n.KP=function(){var i;return this.hT.Zg(),this.hT=new dr,this.KBt(),this.fMt(),this.tMt=void 0,this.fNt=!1,this.d9=!1,this.DNt=!1,null==(i=this.lMt)||i.destroy(),this.lMt=void 0,this.Ac=void 0,this.mz=void 0,this.cMt=void 0,this.yBt=void 0,this.pMt=void 0,this.nq=void 0,this.Wz=void 0,this.JBt=0,this.wMt=[],this.eMt=!0,this.sMt=void 0,this.nMt&&this.hMt(),t.prototype.KP.call(this)},n.kn=function(i){var n=this;return jt(function(){var r;return zt(this,function(e){switch(e.label){case 0:return this.hT.Zg(),this.oa.lX.TY(this.aMt),void 0!==this.YBt&&(Vi.Lg(this.YBt),this.YBt=void 0),this.Vo(),this.KBt(),null==(r=this.lMt)||r.destroy(),this.oa.$x.mn("latencyrecoveryseek",this.PBt),[4,t.prototype.kn.call(n,i)];case 1:return e.sent(),[2]}})}).call(this)},n.selectEndpoint=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f,v;return zt(this,function(d){switch(d.label){case 0:r=function(){var t,i,r,u;return zt(this,function(o){switch(o.label){case 0:t=a.value,i=s.filter(function(i){return i.priority===t}),o.label=1;case 1:return i.length>0?(r=function(t){var i=t.reduce(function(t,i){return t+i.weight},0);if(0===i){return t[A.floor(A.random()*t.length)]}for(var n,r=A.random()*i,e=0,s=Ft(t);!(n=s()).done;){var u=n.value;if(r<=(e+=u.weight))return u}return t[t.length-1]}(i),[4,ZX(r,n.oa.Dx)]):[3,3];case 2:return"online"===(u=o.sent())?[2,{v:r}]:("invalid-security"===u&&(e=!0),Yn(i,r),[3,1]);case 3:return[2]}})},e=!1,s=t.endpoints.slice().filter(function(t){return!i||!function(t,i){return t.hespSrc===i.hespSrc&&t.hlsSrc===i.hlsSrc&&t.adSrc===i.adSrc}(t,i)}),u=or(s.map(function(t){return t.priority})),o=u.sort(),h=Ft(o),d.label=1;case 1:return(a=h()).done?[3,4]:(n=this,[5,qt(r())]);case 2:if("object"===W(c=d.sent()))return[2,c.v];d.label=3;case 3:return[3,1];case 4:return i?[4,ZX(i,this.oa.Dx)]:[3,6];case 5:if("online"===(f=d.sent()))return[2,i];"invalid-security"===f&&(e=!0),d.label=6;case 6:if(e)throw v=new _d(pd.MEDIA_LOAD_ERROR,"Trying to play a stream without the correct authorization."),this.dispatchErrorEvent(v),v;return[2,void 0]}})}).call(this)},xt(i,[{key:"GBt",get:function(){return this.nMt},set:function(t){this.fNt&&(t?this.rMt():this.hMt())}},{key:"XBt",get:function(){return this.oMt},set:function(t){this.oMt=t,this.oa.lX.TY(this.aMt),this.oMt&&this.oa.lX.bY(this.aMt)}}]),i}(Yb);function KX(t){return t.filter(function(t){var i;return(null!=(i=t.wyt)?i:t.IW)>=YX})}function JX(t){return void 0===t?io({},mz(),{forceSeekOffset:20}):{minimumOffset:t-HA,targetOffset:t,maximumOffset:t+HA,forceSeekOffset:20,minimumPlaybackRate:VA,maximumPlaybackRate:jA}}function ZX(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n=t.hespSrc||t.hlsSrc,[4,i.vk({Yu:n,Km:Sl.bk,Wk:3e3})];case 1:return(r=s.sent()).dk>=200&&r.dk<300?[2,"online"]:[3,3];case 2:return j(e=s.sent(),jl)&&403===e.uE.dk?[2,"invalid-security"]:[3,3];case 3:return[2,"offline"]}})})()}function tG(t){try{return qo(Vi.Dh(t).pathname,"manifest.json")}catch(t){return!1}}iA(function(t){return new $X(t)},Zb.bC),V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It();function iG(t,i,n){var r=null==n?void 0:n.streamType;if(!E(t))return t===1/0?"live"===r||"dvr"===r?r:i&&i.length>0&&i.end(i.length-1)-i.start(0)>60?"dvr":"live":"vod";if(r)return r;if(null==n?void 0:n.dvr)return"dvr";switch(hE(n)){case kA.bC:case kA.yC:case kA.wC:case kA.mC:return"live"}}var nG=function(t){function i(i){var n;return(n=t.call(this,i)||this).Ac=void 0,n.yMt=void 0,n.AMt=void 0,n.SMt=void 0,n.Yo=0,n.k9=void 0,n.T9=void 0,n}Pt(i,t);var n=i.prototype;return n.Ta=function(i,n){if(this.Ac=i,Fi(null==i?void 0:i.dvr)&&i.dvr.windowLength>=60&&i.sources.length>=2){var r=Wn(i.sources,function(t){return fT(t)||hT(t)}),e=Wn(i.sources,function(t){return cT(t)&&(rT(t.type)||nT(t.type))});Fi(r)&&Fi(e)&&(this.Yo=1,this.yMt=this.bMt(i,r),this.AMt=this.bMt(i,e),this.SMt=i.dvr.windowLength)}return t.prototype.Ta.call(this,i,n)},n.nu=function(){return this.Ac},n.KP=function(){var i=this;return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return null==(n=this.T9)||n.Zg(),this.T9=void 0,void 0===this.k9?[3,2]:[4,this.k9.catch(pn)];case 1:r.sent(),this.k9=void 0,r.label=2;case 2:return this.Ac=void 0,this.Yo=0,this.yMt=void 0,this.AMt=void 0,this.SMt=void 0,[4,t.prototype.KP.call(i)];case 3:return r.sent(),[2]}})}).call(this)},n.EP=function(){var i,n=t.prototype.EP.call(this);if(!this.oL||this.GX.xJ)return n;if(0===n.length||1===this.Yo){var r=Date.now()/1e3,e=this.SMt;i=new LA([r-e,r])}else i=LA.jn(n).Ly(this.uAt());return i._s()},n.Xx=function(i,n){var r;if(!this.oL)return t.prototype.Xx.call(this,i,n);null==(r=this.T9)||r.Zg(),this.T9=new dr,this.k9=br(this.E9(i,this.k9,this.T9.Yg),this.T9),this.k9.catch(pn)},n.eI=function(i){return this.oL?i.type===ch.py?(this.So(new Rg(this.Gx(),this.Hx())),!0):i.type===ch.Zw?(this.So(new IT(this.Gx())),!0):t.prototype.eI.call(this,i):t.prototype.eI.call(this,i)},n.E9=function(i,n,r){var e=this;return jt(function(){var s,u;return zt(this,function(o){switch(o.label){case 0:return void 0===n?[3,2]:[4,n.catch(pn)];case 1:o.sent(),o.label=2;case 2:return pr(r),i!==1/0?[3,6]:1===this.Yo?[3,4]:(this.So(new ET(i)),[4,this.kMt(this.yMt,r)]);case 3:return o.sent(),[3,5];case 4:t.prototype.Xx.call(e,i),o.label=5;case 5:return[2];case 6:return s=!1,2===this.Yo?[3,8]:(this.So(new ET(i)),s=!0,[4,this.TMt(this.AMt,r)]);case 7:o.sent(),o.label=8;case 8:if(!E(this.Nd()))return[3,12];s||this.So(new ET(i)),o.label=9;case 9:return[4,this.ww(ch.Cw,r)];case 10:o.sent(),o.label=11;case 11:if(E(this.Nd()))return[3,9];o.label=12;case 12:u=new Date(1e3*i),t.prototype.Wx.call(e,u),o.label=13;case 13:return[2]}})}).call(this)},n.Gx=function(){var i,n;return this.oL&&this.EP().length?this.oa.bt?(null!=(n=null==(i=this.Vx)?void 0:i.getTime())?n:le())/1e3:this.EP().end(0):t.prototype.Gx.call(this)},n.mP=function(){var i=t.prototype.mP.call(this);if(!this.oL||!this.bt||!i.length)return i;var n=LA.jn(i);return(n=n.Ly(this.uAt()))._s()},n.Ux=function(){var i=t.prototype.Ux.call(this);if(!this.oL||!this.bt||!i.length)return i;var n=LA.jn(i);return(n=n.Ly(this.uAt()))._s()},n.Hx=function(){var i=t.prototype.Hx.call(this);return i&&de(i)?i:new Date},n.Wx=function(i){return this.oL?i&&de(i)?this.Xx(i.getTime()/1e3):void 0:t.prototype.Wx.call(this,i)},n.uAt=function(){if(!this.oL)return 0;var i=t.prototype.Gx.call(this);return this.EMt-i},n.kMt=function(i,n){var r=this;return jt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Ta.call(r,i,n)];case 1:return e.sent(),this.Yo=1,this.QP(),[2]}})}).call(this)},n.TMt=function(i,n){var r=this;return jt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Ta.call(r,i,n)];case 1:return e.sent(),this.Yo=2,this.QP(),[2]}})}).call(this)},n.bMt=function(t,i){var n=i.type===kA.yC?lE(i):dE(i);return n.bypassLicense=!0,io({},t,{sources:[n]})},xt(i,[{key:"oL",get:function(){return 0!==this.Yo}},{key:"EMt",get:function(){var t,i;return(null!=(i=null==(t=this.Vx)?void 0:t.getTime())?i:le())/1e3}}]),i}(Yb);iA(function(t){return new nG(t)},Zb.Tnt),V(),It(),V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Bt(),Dt(),Ut(),Yt();var rG=U(ai());V(),It(),Bt(),Dt(),Ut(),V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt();var eG=function(t){function i(i,n){var r;return(r=t.call(this)||this).yO=Nw(),r.vA=void 0,r.xMt=void 0,r.hu=void 0,r.vA=i,r.xMt=n,r}Pt(i,t);var n=i.prototype;return n.er=function(t,i){this.vA=t,this.xMt=i,this.hu&&this.So(new lV(this.hu))},n.JU=function(){throw new y("Method not implemented.")},n.ZU=function(){throw new y("Method not implemented.")},n.kn=function(){this.Vo()},xt(i,[{key:"nN",get:function(){return this.xMt}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()}},{key:"o",get:function(){return this.vA.id}},{key:"JI",get:function(){return this.yO}},{key:"IW",get:function(){return this.vA.bitrate}},{key:"wyt",get:function(){}},{key:"Rrt",get:function(){return""}},{key:"Th",get:function(){return""}},{key:"Syt",get:function(){return""}},{key:"xst",get:function(){return!0}},{key:"yyt",get:function(){}}]),i}(uh),sG=function(t){function i(i,n){return t.call(this,i,n)||this}return Pt(i,t),i.prototype.xa=function(){return vV(this)},xt(i,[{key:"Olt",get:function(){return 0}},{key:"Ti",get:function(){return this.vA.width}},{key:"Mi",get:function(){return this.vA.height}},{key:"byt",get:function(){return 0}}]),i}(eG);V(),It(),Bt(),Dt(),Ut();var uG=function(t){function i(i,n){var r;return(r=t.call(this)||this).yO=Cw(),r._O=new Aw,r.PMt=void 0,r.aS=void 0,r.I5=void 0,r.hu=void 0,r.aS=i,r.I5=n,r}Pt(i,t);var n=i.prototype;return n.SO=function(t){this.Rt=t},n.kn=function(){this.Vo();for(var t,i=Ft(this._O.NI);!(t=i()).done;){t.value.kn()}this._O.hr()},xt(i,[{key:"Rt",get:function(){return!0},set:function(t){}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=hw(this)}},{key:"plt",get:function(){}},{key:"Lt",get:function(){return this.I5}},{key:"o",get:function(){return this.aS||"millitrack"}},{key:"JI",get:function(){return this.yO}},{key:"Th",get:function(){return""}},{key:"bs",get:function(){return""}},{key:"Qk",get:function(){return this.Rt?"enabled":"disabled"},set:function(t){this.SO("enabled"===t)}},{key:"YI",get:function(){}},{key:"$I",get:function(){return this._O}},{key:"tC",get:function(){return this.PMt},set:function(t){if(this.PMt=t,this.Rt){var i=1===(null==t?void 0:t.length)?t[0].nN:void 0;this.IMt(i)}this.So(new SL(this._O.NI.slice(),this)),((null==t?void 0:t.length)||this._O.V)&&this.So(new eU((null==t?void 0:t[0])||this._O.MI(0)))}},{key:"ZI",get:function(){}}]),i}(uh),oG=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).CMt=void 0,e.CMt=r,e}Pt(i,t);var n=i.prototype;return n.er=function(t){for(var i,n,r=function(){var r=n.value,e=Wn(t.layers,function(t){return t.encodingId===r.id}),s=Wn(i._O.NI,function(t){return t.o===r.id});s?s.er(r,e):i._O.gO(new sG(r,e))},e=Ft(t.active);!(n=e()).done;)i=this,r();this.So(new Ew(this))},n.IMt=function(t){var i;null==(i=this.CMt)||i.RMt(t)},n.kn=function(){this.CMt=void 0,t.prototype.kn.call(this)},xt(i,[{key:"Km",get:function(){return vw.Mk}}]),i}(uG);V(),It(),Bt();var hG=function(){function t(){this.DMt=void 0}var i=t.prototype;return i.er=function(t){this.DMt=t},i.DW=function(t){},xt(t,[{key:"IW",get:function(){var t,i,n,r,e,s;return(null!=(e=null==(i=this.DMt)||null==(t=i.video.inbounds)?void 0:t.reduce(function(t,i){return t+i.bitrateBitsPerSecond},0))?e:0)+(null!=(s=null==(r=this.DMt)||null==(n=r.audio.inbounds)?void 0:n.reduce(function(t,i){return t+i.bitrateBitsPerSecond},0))?s:0)}},{key:"RW",get:function(){var t,i;return null!=(i=null==(t=this.DMt)?void 0:t.currentRoundTripTime)?i:0}}]),t}();V(),It(),Bt(),Dt(),Ut(),V(),It(),Bt(),Dt();var aG=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).NMt=0,r}return Pt(i,t),i.prototype.xa=function(){return dV(this)},xt(i,[{key:"mwt",get:function(){return this.NMt}}]),i}(eG),cG=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).CMt=void 0,e.CMt=r,e}Pt(i,t);var n=i.prototype;return n.er=function(t){for(var i,n,r=function(){var r=n.value,e=Wn(t.layers,function(t){return t.encodingId===r.id}),s=Wn(i._O.NI,function(t){return t.o===r.id});s?s.er(r,e):i._O.gO(new aG(r,e))},e=Ft(t.active);!(n=e()).done;)i=this,r();this.So(new Ew(this))},n.IMt=function(t){var i;null==(i=this.CMt)||i.BMt(t)},n.kn=function(){this.CMt=void 0,t.prototype.kn.call(this)},xt(i,[{key:"Km",get:function(){return vw.Bk}}]),i}(uG);V(),It(),Dt();var fG=function(t){function i(i,n){var r;return(r=t.call(this,i,i,void 0,!1)||this).LU=void 0,r.LU=n,r}return Pt(i,t),i.prototype.xa=function(){return function(t){return Wg(Kw(t),{get mid(){return t.LU.mid},get uuid(){return t.LU.uuid},get timecode(){return t.LU.timecode},get unregistered(){return t.LU.unregistered}})}(this)},i}(um);V(),It(),V(),It(),Bt(),Dt();var vG=U(ai()),dG=function(t){function i(i){var n;return(n=t.call(this)||this).hu=void 0,n.MMt=void 0,n.MMt=i,n}Pt(i,t);var n=i.prototype;return n.ZL=function(t){return vG.Logger.diagnose(t)},n.wn=function(t,i){this.MMt.wn(t,i)},n.mn=function(t,i){this.MMt.mn(t,i)},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=QT(this)),this.hu}}]),i}(uh),lG=[ch.uo,ch.jw,Fy.PM,ch.Qw,ch.Ww,ch.$w,ch.Zw,ch.Nw,ch.Kw,ch.wy,ch.Cw,ch.Jw,ch.xw,ch.Ew,ch.Lw,ch.Bw],gG=["active","inactive","stopped","vad","layers","migrate","viewercount"],wG=1e3,mG=function(t){function i(i){var n;return(n=t.call(this,"stats")||this).DMt=void 0,n.DMt=i,n}return Pt(i,t),xt(i,[{key:"stats",get:function(){return this.DMt}}]),i}(ah),pG=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).Bz=void 0,e.Mz=void 0,e.Lz=void 0,e.PL=void 0,e.Lf=void 0,e.zMt=void 0,e.Ac=void 0,e.hT=void 0,e.Ypt=void 0,e.VMt=void 0,e.sO=void 0,e.tO=void 0,e.HMt=void 0,e.nq=void 0,e.rq=void 0,e.FMt=void 0,e.WMt=void 0,e.lq=void 0,e.Cq=void 0,e.xq=void 0,e.OMt=void 0,e.JMt=void 0,e.LMt=void 0,e.C6=void 0,e.Ts=void 0,e.bd=void 0,e.Lmt=void 0,e.Bz=i,e.Mz=n,e.Lz=r,e.hT=new dr,e.Ypt=void 0,e.VMt=void 0,e.sO=new fw,e.tO=new fw,e.WMt=0,e.lq=new hG,e.C6=!1,e.Ts=function(t){e.Qq(_w(t.lt))},e.bd=function(t){e.C6||(e.C6=!0,e.So(new IT(t.currentTime))),e.So(new Rg(t.currentTime,e.Vx))},e.Lmt=function(t){mr(t)||e.Qq(new _d(pd.MEDIA_DECODE_ERROR,t.message,t))},e.PL=e.Bz.Yq(vw.Mk),e.Cq=new $y(e,e.PL),e.xq=new Yy(e.Cq,!0),e.PL.wn(lG,e.Rs),e.PL.wn(ty.ma,e.Ts),e.PL.wn(ch.py,e.bd),e.xq.wn(Uy,e.Rs),e.OMt=new dG(e),e}Pt(i,t);var n=i.prototype;return n.RMt=function(t){var i;null==(i=this.Lf)||i.select(t).catch(this.Lmt)},n.BMt=function(t){var i;null==(i=this.Lf)||i.select(t).catch(this.Lmt)},n.zP=function(){return this.PL.zP()},n.Xx=function(t,i){},n.be=function(){this.PL.be()},n.we=function(){this.PL.we()},n.QP=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.LMt=void 0,this.Un(),[4,this.PL.QP()];case 1:return t.sent(),[2]}})}).call(this)},n.jP=function(){this.LMt=new Date,this.PL.jP()},n.hr=function(){return jt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:return this.UMt(),this.Ac=void 0,this.C6=!1,this.hT.Zg(),null==(t=this.Lf)||t.stop(),this.Lf=void 0,this.Ypt?[4,this.Ypt.catch(pn)]:[3,2];case 1:r.sent(),this.Ypt=void 0,r.label=2;case 2:return this.VMt=void 0,[4,this.PL.hr()];case 3:for(r.sent(),this.HMt=void 0,this.WMt=0,this.PL.Eq(),i=Ft(this.sO.NI);!(n=i()).done;)n.value.kn();return this.tO.hr(),this.sO.hr(),[2]}})}).call(this)},n.kn=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.UMt(),this.Vo(),[4,this.hr()];case 1:return t.sent(),this.tO.kn(),this.sO.kn(),this.xq.kn(),this.Cq.zg(),this.PL.mn(lG,this.Rs),this.PL.mn(ty.ma,this.Ts),this.PL.mn(ch.py,this.bd),[4,this.Bz.Dq(this.PL)];case 2:return t.sent(),[2]}})}).call(this)},n.Ta=function(t,i,n){return jt(function(){var i,r,e,s;return zt(this,function(u){return pr(n),this.OEt(),this.UMt(),r=t,this.Ac=r,this.hT=new dr,r.apiUrl&&rG.Director.setEndpoint(r.apiUrl),e=function(){return rG.Director.getSubscriber({streamName:r.src,streamAccountId:r.streamAccountId,subscriberToken:r.subscriberToken})},s=this.qMt(this.Mz.WY.type),this.Lf=new rG.View(void 0,e,void 0,!0),this.zMt=io({},r.connectOptions,{events:gG,abrConfiguration:{strategy:s,metadata:{bitrate:null==(i=this.Mz.WY.metadata)?void 0:i.bitrate}}}),this.GMt(),[2]})}).call(this)},n.qMt=function(t){switch(t){case vR.PERFORMANCE:return"performance";case vR.BANDWIDTH:return"bandwidth";case vR.QUALITY:return"quality";default:return}},n.IP=function(t,i,n,r){return ot.resolve()},n.CP=function(){return ot.resolve()},n.Un=function(){if(void 0===this.Ypt){var t=this.Lf;void 0!==t&&(this.Ypt=this.vE(t,this.zMt,this.hT.Yg).catch(this.Lmt))}},n.vE=function(t,i,n){return jt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:pr(n),u.label=1;case 1:return u.trys.push([1,3,,6]),[4,kr(t.connect(i),n)];case 2:return u.sent(),t.webRTCPeer.initStats({autoInitStats:!0,statsIntervalMs:A.min(null!=(e=null==(r=this.Ac)?void 0:r.statsIntervalMs)?e:wG,wG)}),[3,6];case 3:return yr(s=u.sent()),function(t){return Wi(t)&&"FetchError"===t.name}(s)&&400===s.status?(Vi.um("[THEOplayer] Millicast connect error, reconnecting.",s),[4,kr(t.reconnect(),n)]):[3,5];case 4:u.sent(),u.label=5;case 5:return this.Qq(new _d(pd.NETWORK_ERROR,s.message,s)),[3,6];case 6:return[2]}})}).call(this)},n.XMt=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:pr(i),n.label=1;case 1:return n.trys.push([1,,4,5]),this.PL.G7(),this.VMt=t,[4,this.PL.hr()];case 2:return n.sent(),[4,this.PL.Un({Km:Ly.AV,rC:"",YZ:t,GT:kA.yC,fq:[]})];case 3:return n.sent(),[3,5];case 4:return this.PL.X7(),[7];case 5:return[2]}})}).call(this)},n.GMt=function(){var t,i=this,n=this.Lf;n.on("track",function(t){return i.jMt(t)}),n.on("broadcastEvent",function(t){return i.QMt(t)}),n.webRTCPeer.on("stats",function(t){i.FMt=t,i.lq.er(t),i.KMt()}),(null==(t=this.zMt)?void 0:t.metadata)&&n.on("metadata",function(t){return i.YMt(t)})},n.KMt=function(){var t,i,n=this;void 0===this.JMt&&(this.So(new mG(this.FMt)),this.JMt=Vi.fm(function(){n.So(new mG(n.FMt))},null!=(i=null==(t=this.Ac)?void 0:t.statsIntervalMs)?i:wG))},n.UMt=function(){void 0!==this.JMt&&(Vi.vm(this.JMt),this.JMt=void 0)},n.jMt=function(t){var i=this.tO.V>0,n=this.sO.V>0,r=i&&!n,e=t.streams[0];if(r)for(var s,u=Ft(e.getVideoTracks().slice());!(s=u()).done;){var o=s.value;e.removeTrack(o)}e!==this.VMt&&this.XMt(e,this.hT.Yg).catch(this.Lmt)},n.QMt=function(t){switch(t.name){case"active":var i,n=function(){var t=r.value;if(t.media!==vw.Mk||s.disableVideo||i.sO.NI.some(function(i){return i.o===t.trackId})){if(t.media===vw.Bk&&!s.disableAudio&&!i.tO.NI.some(function(i){return i.o===t.trackId})){var n=i.tO.V>0?jq.uDt:jq.cDt;i.tO.tt(new cG(t.trackId,n,i))}}else{var e=i.sO.V>0?Hq.uDt:Hq.cDt;i.sO.tt(new oG(t.trackId,e,i))}};this.So(new sH);for(var r,e=t.data,s=this.zMt,u=Ft(e.tracks);!(r=u()).done;)i=this,n();break;case"inactive":this.So(new uH),this.sO.hr(),this.tO.hr();break;case"stopped":this.So(new uH);break;case"viewercount":default:break;case"layers":var o=t.data;if(0===this.sO.V){var h=new oG("",Hq.cDt,this);h.er(o.medias[0]),this.sO.tt(h)}else{var a=Wn(this.sO.NI,function(t){return t.Lt===Hq.cDt});null==a||a.er(o.medias[0])}}},n.YMt=function(t){var i=this.HMt;void 0===i&&((i=this.PL.sI(uy.zU,void 0,void 0,void 0,void 0,jw.MILLICAST)).Qk=Jp.iC,this.HMt=i);var n=this.zx,r=A.max(0,n-10);this.WMt0)||i.some(function(i){return i.toLowerCase()===t.toLowerCase()})},i.OLt=function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r1?i-1:0),r=1;r1?i-1:0),r=1;r1?i-1:0),r=1;r1?i-1:0),r=1;r0?t.IW:oz.$at,n=t.RW>0?t.RW:JW.$at;this.eut=new oz(oz.RIt,oz.DIt,1,i),this.sCt=new JW(JW.RIt,JW.DIt,n)}var i=t.prototype;return i.DW=function(t){if("segment"===t.Km||"preload-hint"===t.Km){var i=[new tz(this.sCt)];return"stream"!==t.fk||!function(t){return"segment"===t.Km&&"initialization-segment"!==t.zk}(t)&&"preload-hint"!==t.Km?i.push(new iz(this.eut)):i.push(new nz(this.eut,1e3)),new ZW(i)}},i.JIt=function(t){this.eut=new oz(oz.RIt,oz.DIt,1,t)},xt(t,[{key:"IW",get:function(){return this.eut.Fet}},{key:"RW",get:function(){return this.sCt.Fet}}]),t}();V(),It();var VG=function(){function t(t){this.Tst=void 0,this.Tst=t}return t.prototype.$Z=function(t,i){var n={Km:Ly.SV,fq:[],q4:t.map(function(t){return{GT:t}}),t5:i};return ot.resolve(void 0!==this.Tst.$Z([n]))},t}();V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It(),Ut();var jG=function(t,i,n,r,e){return t.filter(function(t){return!!Jn(r,t)||1.1*t.IW<=n.IW})},HG=function(t,i,n,r,e){return t.filter(function(t){if(Jn(r,t))return!0;for(var s,u=1/0,o=Ft(t.VLt);!(s=o()).done;){var h,a,c=s.value;u=A.min(u,null!=(a=null!=(h=c.sLt.HLt)?h:c.sLt.WLt)?a:1/0)}u===1/0&&(u=1);var f=2*n.RW+t.IW*u/n.IW;return t.IW<=i.IW||e.qLt>f})},WG=function(t,i,n,r,e){return An(t,function(t,i){return i.IW-t.IW})},zG=function(t,i,n,r,e){return t.every(function(t){return t.yyt&&!E(t.yyt)})?An(t,function(t,i){return i.yyt-t.yyt}):t},qG=function(t,i,n,r,e){return 0===r.length?t:An(t,function(t,i){var n=Jn(r,t)?1:0;return(Jn(r,i)?1:0)-n})},XG=function(t,i,n,r,e,s){return t.filter(function(t){return!t.Rrt||!i.Rrt||!(void 0!==i.Rrt.W9&&void 0!==t.Rrt.W9&&!vP(i.Rrt.W9,t.Rrt.W9)&&!s.zLt({GT:'video/mp4; codecs="'+t.Rrt.W9+'"'}))&&!(void 0!==i.Rrt.q9&&void 0!==t.Rrt.q9&&!vP(i.Rrt.q9,t.Rrt.q9)&&!s.GLt({GT:'audio/mp4; codecs="'+t.Rrt.q9+'"'}))})},GG=function(t,i,n,r,e){if(!1===e.udt)return t;if(Vi.Zs.dp)return t;for(var s,u,o=Vi.Zs.lp,h=(null!=(s=null==o?void 0:o.width)?s:e.Ti)*vL,a=(null!=(u=null==o?void 0:o.height)?u:e.Mi)*vL,c=0;c=r[1]}return!1}function uQ(t,i){return t===i||t.XE===i.XE&&(t.iAt&&i.iAt?t.iAt.Tn===i.iAt.Tn&&t.iAt.V===i.iAt.V:t.iAt===i.iAt)}function oQ(t){var i=!!t.sOt||void 0;return{o:t.o,nOt:t.nOt,uq:t.uq,rOt:t.rOt,ct:t.ct,hOt:t.hOt,sOt:i,oOt:t.aOt,uOt:t.cOt,dOt:t.dOt,lOt:t.lOt}}function hQ(t,i){var n,r,e;return{q9:null!=(n=i.q9)?n:null==t?void 0:t.q9,W9:null!=(r=i.W9)?r:null==t?void 0:t.W9,fOt:null!=(e=i.fOt)?e:null==t?void 0:t.fOt}}function aQ(t,i,n,r,e){return jt(function(){var s,u,o,h,a,c,f,v,d,l,g,w;return zt(this,function(m){switch(m.label){case 0:return s=i.filter(function(t){return Wo(t,"audio")}),u=i.filter(function(t){return Wo(t,"video")}),o=[],h=n.map(function(t){return function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return t.Syt&&t.vOt?t.Hk!==nQ.tOt?[2]:(r=cQ(t.vOt))?r.$m!==Co?[3,1]:[2,{xS:r,OW:[],FW:void 0,GH:t.Syt,UW:[]}]:[2]:[2];case 1:return r.$m!==To||t.vOt!==Do?[3,2]:[2,{xS:r,OW:[],FW:t.Syt,GH:void 0,UW:[]}];case 2:return OG.cN("HLSDrmUtils","Fetching key uri "+t.Syt+"."),[4,i.vk({Yu:t.Syt,Xk:n})];case 3:return[4,s.sent().qT()];case 4:return e=s.sent(),r.$m===po&&(e=function(t){var i=new DataView(t);return i.byteLength>=8&&i.getUint32(4)===PU?t:DU(t)}(e)),[2,{xS:r,OW:[e],FW:void 0,GH:void 0,UW:[]}];case 5:return[2]}})})()}(t,r,e)}),[4,ot.all(h)];case 1:for(a=m.sent().filter(Fi),f=function(t,i){if(0===i.length)return t;var n=function(t){var n=i.indexOf(t.xS.$m);return n>=0?n:i.length};return An(t,function(t,i){return n(t)-n(i)})}(a,null!=(c=null==t?void 0:t.preferredKeySystems)?c:[]),v=Ft(f);!(d=v()).done;)l=d.value,g=kH(null!=t?t:{},l.xS),w="cbcs",o.push({xS:l.xS,OW:l.OW,FW:l.FW,GH:l.GH,Vq:[{initDataTypes:[l.xS.Jm],audioCapabilities:bH(s,w,null==g?void 0:g.audioRobustness),videoCapabilities:bH(u,w,null==g?void 0:g.videoRobustness),persistentState:null==g?void 0:g.persistentState,distinctiveIdentifier:null==g?void 0:g.distinctiveIdentifier}],UW:l.UW});return[2,o]}})})()}function cQ(t){return t===ko?Bo:t===yo?xo:"com.apple.streamingkeydelivery"===t?Mo:t===Do?Lo:void 0}function fQ(t){if("#"!==t[0])throw new y("HLSPlaylistParser - Could not extract M3U8 tag or comment: "+t);return t.split(":",1)[0]}function vQ(t){return"#"!==t[0]?t:t.split(":",1)[0]}function dQ(t){var i=t.indexOf(":");if(-1===i||t.lengtho&&OG.FLt(MG,"#EXT-X-STREAM-INF tag must have BANDWIDTH attribute higher or equal to AVERAGE-BANDWIDTH attribute: "+t+"."),e||OG.cN(MG,"#EXT-X-STREAM-INF tag should have a CODECS attribute: "+t+"."),e&&e.W9&&void 0===s&&OG.cN(MG,"#EXT-X-STREAM-INF tag should have a valid RESOLUTION attribute if it contains video codecs: "+t+"."),void 0===f||Jn(["TYPE-0","TYPE-1","NONE"],f)||OG.FLt(MG,"#EXT-X-STREAM-INF tag has an invalid HDCP-LEVEL attribute: "+t+"."),void 0===g||Jn(["SDR","PQ","HLG"],g)||OG.FLt(MG,"#EXT-X-STREAM-INF tag has an invalid VIDEO-RANGE attribute: "+t+"."),void 0===o)throw new y("HLSPlaylistParser - Could not parse #EXT-X-STREAM-INF tag: "+t+".");return{gOt:v,pOt:w,wyt:h,IW:o,mOt:_,Rrt:e,Olt:c,wOt:f,RRt:s,yyt:a,yOt:p,Syt:r,bOt:m,AOt:g}}function pQ(t,i){var n=gQ(t);if(!n.URI)throw new y("HLSPlaylistParser - Could not parse #EXT-X-I-FRAME-STREAM-INF tag: "+t+".");try{return mQ(t,i,n.URI)}catch(i){throw new y("HLSPlaylistParser - Could not parse #EXT-X-I-FRAME-STREAM-INF tag: "+t+".")}}function yQ(t){var i=Number(t);return E(i)?void 0:i}function _Q(t,i){var n,r,e=gQ(t);try{n=function(t){switch(t){case"NONE":return nQ.pz;case"AES-128":return nQ.$Lt;case"SAMPLE-AES":return nQ.tOt;case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return t}throw new y("LLHLSPlaylistParser - Could not parse M3U8 key method: "+t+".")}(e.METHOD),r=e.URI?RQ(e.URI,i):void 0}catch(i){throw new y("HLSPlaylistParser - Could not parse #EXT-X-KEY tag: "+t+".")}var s,u,o,h,a,c=e.KEYFORMAT,f=e.IV,v=e.KEYFORMATVERSIONS;if(n!==nQ.pz){if(o=c||Do,"SAMPLE-AES-CENC"===n||"SAMPLE-AES-CTR"===n){if(cQ(o)!==Bo)throw new y("HLSPlaylistParser - #EXT-X-KEY tag with METHOD="+n+" is only compatible with Widevine.");s=nQ.tOt}else s=n;u=r,h=f?Da(f):void 0,a=v?v.split("/").map(function(t){return Number(t)}):[1]}else s=nQ.pz,(r||c||v||f)&&OG.FLt(MG,"#EXT-X-KEY tag with METHOD=NONE must not have additional attributes: "+t+".");return{Hk:s,Syt:u,SOt:h,vOt:o,TOt:a}}function kQ(t){var i=dQ(t);if(!i)return[void 0,""];var n=i.split(","),r=n[0],e=n[1];return[yQ(r),e]}function bQ(t,i){var n=t.split("@"),r=yQ(n[0]),e=n.length>1?yQ(n[1]):i;if(void 0===r||void 0===e)throw new y("HLSPlaylistParser - Could not parse #EXT-X-BYTERANGE tag: "+t+".");return{Tn:e,V:r}}function AQ(t){if(void 0!==t)return bQ(t,void 0)}function TQ(t,i){return bQ(dQ(t),i)}function SQ(t,i){var n=gQ(t);try{return{XE:RQ(n.URI,i),iAt:AQ(n.BYTERANGE)}}catch(i){throw new y("HLSPlaylistParser - Could not parse #EXT-X-MAP tag: "+t+".")}}function EQ(t){var i=dQ(t);if(!i)throw new y("HLSPlaylistParser - Could not parse #EXT-X-PROGRAM-DATE-TIME tag: "+t+".");var n=new Date(i.trim());if(!de(n))throw new y("HLSPlaylistParser - Could not parse #EXT-X-PROGRAM-DATE-TIME tag: "+t+".");return n}function IQ(t){var i,n,r,e=gQ(t),s=e["START-DATE"],u=e["END-DATE"],o=yQ(e["PLANNED-DURATION"]),h=yQ(e.DURATION);void 0!==e["SCTE35-CMD"]&&(i=Da(e["SCTE35-CMD"]).buffer),e["SCTE35-IN"]&&(n=Da(e["SCTE35-IN"]).buffer),e["SCTE35-OUT"]&&(r=Da(e["SCTE35-OUT"]).buffer);var a,c,f="YES"===e["END-ON-NEXT"],v=function(t){for(var i,n={},r=Ft(b.keys(t));!(i=r()).done;){var e=i.value,s=t[e];void 0!==s&&zo(e,"X-")&&(n[e]=s)}return n}(e),d=e.ID,l=e.CLASS;if(void 0===s)OG.FLt(MG,"Could not parse #EXT-X-DATERANGE tag without START-DATE attribute: "+s+".");else if(a=new Date(s),c=void 0!==u?new Date(u):void 0,de(a)||OG.FLt(MG,"Could not parse EXT-X-DATERANGE tag with invalid START-DATE attribute: "+a+"."),void 0!==h){var g=new Date(a.getTime()+1e3*h);c?c.getTime()!==g.getTime()&&(OG.FLt(MG,"DURATION and END-DATE attributes of #EXT-X-DATERANGE tag are not aligned, updating the END-DATE: "+t+"."),c=g):c=g}else c&&(h=(a.getTime()-c.getTime())/1e3);if(f&&(e.CLASS||OG.FLt(MG,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute without CLASS attribute: "+t+"."),e.DURATION&&OG.FLt(MG,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute with DURATION attribute: "+t+"."),c&&OG.FLt(MG,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute with END-DATE attribute: "+t+".")),void 0===d&&OG.FLt(MG,"Could not parse #EXT-X-DATERANGE tag without valid ID attribute: "+t+"."),void 0===d||void 0===a)throw new y("HLSPlaylistParser - Could not parse #EXT-X-DATERANGE tag: "+t+".");return{o:d,nOt:l,uq:a,rOt:c,ct:h,hOt:o,cOt:i,lOt:n,dOt:r,sOt:f,aOt:v}}function RQ(t,i){if(void 0===t)throw new y("HLSPlaylistParser - Unable to parse URL from string: "+t+".");return Vi.Pm(t,i)}function CQ(t,i){var n=gQ(t),r=yQ(n.DURATION),e=RQ(n.URI,i),s=AQ(n.BYTERANGE),u="YES"===n.INDEPENDENT,o="YES"===n.GAP;if(void 0===r)throw new y("HLSPlaylistParser - Unable to parse #EXT-X-PART without valid DURATION: "+t);return{ct:r,Syt:{XE:e,iAt:s},kOt:u,EOt:o}}function PQ(t){var i=gQ(t);return{xOt:"YES"===i["CAN-BLOCK-RELOAD"],POt:yQ(i["CAN-SKIP-UNTIL"]),IOt:"YES"===i["CAN-SKIP-DATERANGES"],COt:yQ(i["HOLD-BACK"]),ROt:yQ(i["PART-HOLD-BACK"])}}function DQ(t,i){var n=gQ(t);if(void 0===n.URI)throw new y("HLSPlaylistParser - Could not parse #EXT-X-RENDITION-REPORT: "+t+".");var r=RQ(n.URI,i),e=yQ(n["LAST-MSN"]),s=yQ(n["LAST-PART"]);if(void 0===e)throw new y("HLSPlaylistParser - Could not parse #EXT-X-RENDITION-REPORT: "+t+".");return{Syt:r,DOt:e,NOt:s}}function NQ(t,i){var n,r=gQ(t),e=yQ(r["SKIPPED-SEGMENTS"]),s=null==(n=r["RECENTLY-REMOVED-DATERANGES"])?void 0:n.split("\t");if(void 0===e)throw new y("HLSPlaylistParser - Could not parse #EXT-X-SKIP tag without valid SKIPPED-SEGMENTS attribute: "+t+".");return{BOt:e,MOt:s,LOt:i}}function xQ(t){var i=yQ(gQ(t)["PART-TARGET"]);if(void 0===i)throw new y("HLSPlaylistParser - Could not parse #EXT-X-PART-TARGET-DURATION tag: "+t+".");return i}function BQ(t){switch(dQ(t)){case"VOD":return rQ.iOt;case"EVENT":return rQ.eOt;default:return OG.FLt(MG,"Found #EXT-X-PLAYLIST-TYPE tag with invalid value: "+t+"."),rQ.yk}}function OQ(t,i){var n,r,e=gQ(t);try{n=function(t){if(void 0===t)throw new y("HLSPlaylistParser - Could not parse PRELOAD-HINT type: "+t+".");if("MAP"===t)return iQ.JLt;if("PART"===t)return iQ.ZLt;throw new y("HLSPlaylistParser - Could not parse PRELOAD-HINT type: "+t+".")}(e.TYPE),r=RQ(e.URI,i)}catch(i){throw new y("HLSPlaylistParser - Could not parse #EXT-X-PRELOAD-HINT tag: "+t+".")}var s,u=yQ(e["BYTERANGE-START"]),o=yQ(e["BYTERANGE-LENGTH"]);return void 0===u&&void 0===o||(s={Tn:u||0,V:o}),{Km:n,Syt:{XE:r,iAt:s}}}V(),It(),Ut(),V(),It(),Wt(),Ut(),Yt(),V(),It();var MQ=function(){function t(i){this.UOt=0,this.FOt=void 0,this.FOt=t.HOt(i)}var i=t.prototype;return i.OOt=function(){var t=this.FOt[this.UOt];return this.UOt+=1,t},i.VOt=function(){return this.FOt[this.UOt]},i.Fy=function(){var i=new t("");return i.UOt=0,i.FOt=this.FOt.slice(this.UOt),i},t.HOt=function(t){return t?t.split(/[\r\n]+/).map(function(t){return t.trim()}).filter(function(t){return t}):[]},t}();function LQ(t,i,n){var r=t.Syt,e=t.ED,s=t.WOt,u=t.Tn;switch(n){case"#EXT-X-VERSION":e=function(t){var i=lQ(t);return E(i)?(OG.FLt(MG,"Playlist version is NaN: "+t+"."),1):i}(i);break;case"#EXT-X-INDEPENDENT-SEGMENTS":s=!0;break;case"#EXT-X-START":u=function(t){var i=gQ(t),n=yQ(i["TIME-OFFSET"]);if(void 0===n)throw new y("HLSPlaylistParser - #EXT-X-START is missing a TIME-OFFSET: "+t+".");return{qOt:n,zOt:"YES"===i.PRECISE}}(i);break;case"#EXT-X-DEFINE":OG.FLt(MG,"Ignoring unsupported #EXT-X-DEFINE: "+i+".");break;default:OG.cN(MG,"Ignoring unrecognized line or comment: "+i+".")}return{Syt:r,ED:e,WOt:s,Tn:u}}function FQ(t,i){return t.map(function(t){return t.Hk===nQ.pz||t.SOt?t:io({},t,{SOt:UQ(i)})})}function UQ(t){var i=new DataView(new ArrayBuffer(16)),n=new Pa;return n.Ly(8),ta(i,n,fe.fromNumber(t)),new I(i.buffer)}function VQ(t,i,n){OG.cN(MG,"Parsing M3U8 playlist at "+t+".");var r=new MQ(n);if("#EXTM3U"!==r.OOt())throw new y("HLSPlaylistParser - Could not parse M3U8 playlist. Playlist does not start with #EXTM3U.");return function(t){return/^#EXT-X-(MEDIA|STREAM-INF|I-FRAME-STREAM-INF|SESSION-DATA|SESSION-KEY):/m.test(t)}(n)?function(t,i){var n;try{n=Vi.Pm(t)}catch(i){throw OG.FLt(MG,"The master playlist has no valid base URI: "+t+"."),new y("HLSPlaylistParser - Could not parse HLS master playlist: "+t)}for(var r={Syt:n,WOt:void 0,Tn:void 0,ED:void 0},e=[],s=[],u=[],o=[];;){var h=i.OOt();if(!h)break;try{var a=fQ(h);switch(a){case"#EXT-X-MEDIA":var c=wQ(h,n);e.push(c);break;case"#EXT-X-STREAM-INF":var f=mQ(h,n,i.OOt());s.push(f);break;case"#EXT-X-I-FRAME-STREAM-INF":var v=pQ(h,n);u.push(v);break;case"#EXT-X-SESSION-DATA":OG.FLt(MG,"Ignoring unsupported #EXT-X-SESSION-DATA: "+h+".");break;case"#EXT-X-SESSION-KEY":var d=_Q(h,n);o.push(d);break;default:r=LQ(r,h,a)}}catch(t){OG.FLt(MG,"Ignoring unparsable line: "+h,t)}}var l,g=r.ED,w=null!=(l=r.WOt)&&l,m=r.Tn;return void 0===g&&(OG.FLt(MG,"The playlist has no #EXT-X-VERSION, assuming version is 2."),g=2),g>=8&&(s.some(function(t){return void 0!==t.yyt})||u.some(function(t){return void 0!==t.yyt}))&&(s.some(function(t){return void 0===t.yyt})||u.some(function(t){return void 0===t.yyt}))&&OG.FLt(MG,"If one master playlist variant stream has a SCORE, all variants should have it."),{Syt:n,ED:g,WOt:w,Tn:m,GOt:u,UW:o,$D:e,XOt:s}}(t,r):function(t,i,n){var r,e,s,u,o,h,a,c,f,v,d,l,g,w,m,p,_,k,b={Syt:t,WOt:void 0,Tn:void 0,ED:void 0},A=[],T=!1,S=!1,E=[],I=ro(),R=[],C=[],P=!1,D=!1,N=[],x=[],B=0,O=!1,M=rQ.yk,L=!1,F=0;try{k=Vi.Pm(t)}catch(i){throw OG.FLt(MG,"The media playlist has no valid base URI: "+t+".",i),new y("HLSPlaylistParser - Could not parse HLS media playlist.")}for(var U=n.Fy();void 0===m||void 0===p;){var V=U.OOt();if(!V)break;try{switch(vQ(V)){case"#EXT-X-MEDIA-SEQUENCE":m=lQ(V);break;case"#EXT-X-DISCONTINUITY-SEQUENCE":p=lQ(V)}}catch(t){OG.FLt(MG,"Ignoring unparsable line: "+V,t)}}void 0===m&&(OG.cN(MG,"#EXT-X-MEDIA-SEQUENCE tag is missing, assuming first segment media sequence number is 0."),m=0),void 0===p&&(OG.cN(MG,"#EXT-X-DISCONTINUITY-SEQUENCE tag is missing, assuming first segment discontinuity sequence number is 0."),p=0);for(var j=m,H=p;;){var W=n.OOt();if(!W)break;var z=!1;try{var q=vQ(W);switch(q){case"#EXTINF":var X;z=!0,o=(X=kQ(W))[0],h=X[1];break;case"#EXT-X-BYTERANGE":z=!0,(a=TQ(W,B))&&(B=a.Tn+a.V);break;case"#EXT-X-DISCONTINUITY":z=!0,P=!0,H++;break;case"#EXT-X-KEY":var G;z=!0;var Q,Y=_Q(W,k);if(Y.Hk===nQ.pz){I.clear(),g=void 0;break}var $=null!=(Q=null==(G=Y.vOt)?void 0:G.toString())?Q:"identity";I.set($,Y),Y.Hk===nQ.$Lt&&(g=Y);break;case"#EXT-X-MAP":z=!0,f=SQ(W,k),v=g;break;case"#EXT-X-PROGRAM-DATE-TIME":z=!0,d=EQ(W);break;case"#EXT-X-GAP":z=!0,D=!0;break;case"#EXT-X-BITRATE":z=!0,l=lQ(W);break;case"#EXT-X-TARGETDURATION":r=lQ(W);break;case"#EXT-X-DATERANGE":var K=IQ(W);A.push(K);break;case"#EXT-X-PART":z=!0;var J=CQ(W,k);C.push(J);break;case"#EXT-X-PRELOAD-HINT":var Z=OQ(W,k);N.push(Z);break;case"#EXT-X-SKIP":E.length>0&&OG.FLt(MG,"#EXT-X-SKIP must appear before any #EXTINF tags."),z=!0;var tt=NQ(W,j);F=tt.BOt,_=tt.MOt,j+=tt.BOt;break;case"#EXT-X-SERVER-CONTROL":var it=PQ(W);T=it.xOt,e=it.POt,S=it.IOt,s=it.COt,u=it.ROt;break;case"#EXT-X-RENDITION-REPORT":var nt=DQ(W,k);x.push(nt);break;case"#EXT-X-PART-INF":w=xQ(W);break;case"#EXT-X-MEDIA-SEQUENCE":z&&OG.FLt(MG,"#EXT-X-MEDIA-SEQUENCE must appear before any media segment tags.");break;case"#EXT-X-DISCONTINUITY-SEQUENCE":z&&OG.FLt(MG,"#EXT-X-DISCONTINUITY-SEQUENCE must appear before any media segment tags.");break;case"#EXT-X-ENDLIST":O=!0;break;case"#EXT-X-PLAYLIST-TYPE":M=BQ(W);break;case"#EXT-X-I-FRAMES-ONLY":L=!0;break;default:if(zo(q,"#"))b=LQ(b,W,q);else{c=Vi.Pm(W,k);var rt=f?{Syt:f,jOt:v}:void 0,et={UW:FQ(uo(I),j),LU:R,QOt:C,ct:o,gq:h,KOt:P,Syt:{iAt:a,XE:c},YOt:rt,JOt:d,EOt:D,ZOt:l,LOt:j,$Ot:H};E.push(et),j++,R=[],C=[],o=void 0,h=void 0,P=!1,a=void 0,c=void 0,d=void 0,D=!1,l=void 0}}}catch(t){OG.FLt(MG,"Ignoring unparsable line: "+W,t)}}if(C.length){var st=f?{Syt:f,jOt:g}:void 0,ut={UW:FQ(uo(I),j),LU:R,QOt:C,ct:o,gq:h,KOt:P,Syt:void 0,YOt:st,JOt:d,EOt:D,ZOt:l,LOt:j,$Ot:H};E.push(ut)}var ot,ht=b.ED,at=null!=(ot=b.WOt)&&ot,ct=b.Tn;void 0===ht&&(OG.FLt(MG,"The media playlist has no #EXT-X-VERSION tag, assuming version is 2."),ht=2),void 0===r&&OG.FLt(MG,"Could not parse the HLS media playlist: no #EXT-X-TARGET-DURATION tag was found.");var ft=E.length,vt=ft>0;vt||OG.FLt(MG,"The HLS media playlist contains no segments.");var dt=vt&&E[ft-1].QOt.length>0;return dt&&void 0===w&&OG.FLt(MG,"Could not parse the HLS media playlist: no #EXT-X-PART-TARGET-DURATION tag was found, but it is required when some or all segments contain parts."),dt&&void 0===u&&OG.FLt(MG,"Could not parse the HLS media playlist: The #EXT-X-SERVER-CONTROL tag has no PART-HOLDBACK attribute, but it is required when some or all segments contain parts."),{xOt:T,POt:e,IOt:S,tFt:A,$Ot:p,iFt:O,WOt:at,COt:s,eFt:L,LOt:m,BOt:F,ROt:u,HLt:w,sFt:M,nFt:N,MOt:_,rFt:x,hFt:r,bct:E,Tn:ct,Syt:k,oFt:i,ED:ht}}(t,i,r)}V(),It(),Bt(),Ut(),V(),It(),Bt(),Ut();var jQ=function(){function t(t,i,n){var r,e,s,u;this.o=HQ++,this.sLt=void 0,this.IW=void 0,this.yyt=void 0,this.RRt=void 0,this.Olt=void 0,this.pOt=void 0,this.bOt=void 0,this.yOt=void 0,this.mOt=void 0,this.wyt=void 0,this.uFt=void 0,this.bRt=void 0,this.aFt=!1,this.dFt=[],this.sLt=i,this.IW=t.IW,this.wyt=t.wyt,this.yyt=t.yyt,this.uFt=t.Rrt?WQ(t.Rrt):void 0,this.bRt=this.uFt,this.RRt=t.RRt,this.Olt=t.Olt,this.pOt=null!=(r=t.pOt)?r:"wFt"+this.o,this.bOt=null!=(e=t.bOt)?e:"yFt"+this.o,this.yOt=null!=(s=t.yOt)?s:"bFt"+this.o,this.mOt=null!=(u=t.mOt)?u:"AFt"+this.o,this.dFt=n}var i=t.prototype;return i.gFt=function(t){for(var i,n=Ft(this.dFt);!(i=n()).done;){var r=i.value.sLt.gFt(t);if(void 0!==r)return r}},i.pFt=function(t){for(var i,n=Ft(this.dFt);!(i=n()).done;){var r=i.value.sLt.pFt(t);if(void 0!==r)return r}},i.mFt=function(t){Yn(this.dFt,t)},xt(t,[{key:"Syt",get:function(){return this.sLt.Syt}},{key:"Rrt",get:function(){return this.bRt},set:function(t){this.bRt=t?WQ(t):void 0,this.aFt=function(t,i){return!(void 0!==(null==t?void 0:t.q9)&&void 0===(null==i?void 0:i.q9)||void 0!==(null==t?void 0:t.W9)&&void 0===(null==i?void 0:i.W9))}(this.uFt,this.bRt)}},{key:"cFt",get:function(){return this.aFt}},{key:"VLt",get:function(){return this.dFt}},{key:"lFt",get:function(){return this.dFt.filter(function(t){return t.Km===tQ.Bk})}},{key:"fFt",get:function(){return this.dFt.filter(function(t){return t.Km===tQ.Mk})}},{key:"vFt",get:function(){return this.dFt.filter(function(t){return t.Km===tQ.HU})}},{key:"_Ft",get:function(){return this.dFt.filter(function(t){return t.Km===tQ.YLt})}}]),t}(),HQ=0;function WQ(t){return io({},t,{W9:t.W9?nd(t.W9):void 0})}V(),It(),Bt(),Ut(),V(),It(),Bt(),Ut(),V(),It(),Bt();var zQ=function(){function t(t,i,n,r,e,s){this.PFt=void 0,this.CFt=void 0,this.ct=void 0,this.Syt=void 0,this.kOt=void 0,this.EOt=void 0,this.kFt=void 0,this.xFt=void 0,this.HO=void 0,this.Get=void 0,this.SFt=void 0,this.PFt=t,this.CFt=i,this.HO=n,this.kFt=r,this.xFt=e,this.ct=s.ct,this.Syt=s.Syt,this.kOt=s.kOt,this.EOt=s.EOt}return t.prototype.IFt=function(t,i,n){this.HO=t,this.kFt=i,this.xFt=n},xt(t,[{key:"CO",get:function(){var t;return this.HO+(null!=(t=this.SFt)?t:0)}},{key:"TFt",get:function(){return this.kFt}},{key:"EFt",get:function(){return this.xFt}},{key:"UW",get:function(){return this.PFt.UW}}]),t}(),qQ=function(){function t(t,i,n,r,e){this.Zb=void 0,this.JOt=void 0,this.NFt=void 0,this.YOt=void 0,this.EOt=void 0,this.kFt=void 0,this.xFt=void 0,this.LOt=void 0,this.KOt=void 0,this.$Ot=void 0,this.UW=void 0,this.HO=void 0,this.Get=void 0,this.BFt=[],this.LFt=0,this.RFt=void 0,this.HO=t,this.YOt=e.YOt,this.kFt=n,this.xFt=r,this.Zb=e.ct,this.JOt=e.JOt,this.NFt=e.Syt,this.EOt=e.EOt,this.LOt=e.LOt,this.KOt=e.KOt,this.$Ot=i,this.UW=e.UW,this.HFt(e.QOt)}var i=t.prototype;return i.OFt=function(t){return this.BFt[t]},i.FFt=function(t){for(var i=0;i=0;i--){var n=this.BFt[i];if(n.CO<=t)return n}},i.VFt=function(t){for(var i=this.UFt(t);i&&!i.kOt&&i.CFt>0;)i=this.OFt(i.CFt-1);return i},i.IFt=function(t,i,n){var r=t.QOt.length!==this.BFt.length||n!==this.xFt;this.kFt=i,this.xFt=n,this.Zb=t.ct,null!=this.JOt||(this.JOt=t.JOt),void 0===this.NFt&&(this.NFt=t.Syt),r&&this.HFt(t.QOt)},i.HFt=function(t){this.BFt.length>t.length&&(this.BFt.length=t.length);for(var i=0,n=0;n=0;s--)r(s);for(var u,o=Ft(i);!(u=o()).done;){var h=u.value,a=h.uq;if(void 0!==a&&!t.k5(h.o)){var c=n(a),f=new QQ(h,c);ZQ(t.L.NI,f),t.nV(f)}}}function JQ(t){for(var i,n=ro(),r=[],e=Ft(t);!(i=e()).done;){var s=i.value;if(n.has(s.o)){var u=n.get(s.o),o=io({},u,Qg(s),{oOt:io({},u.oOt,s.oOt)});n.set(s.o,o)}else n.set(s.o,s),r.push(s.o)}return r.map(function(t){return n.get(t)})}function ZQ(t,i){var n=qn(t,function(t){return t.nOt===i.nOt});n&&n.sOt&&n.er({o:n.o,rOt:i.uq})}var tY=String.fromCharCode(95),iY=tY+"HLS_msn",nY=tY+"HLS_part",rY=tY+"HLS_skip",eY="HLSMediaPlaylist",sY=function(){function t(t,i,n){this.Syt=void 0,this.pUt=void 0,this.wUt=void 0,this.CUt=void 0,this.RUt=void 0,this.rUt=void 0,this.hUt=void 0,this.oUt=void 0,this.aUt=void 0,this.Dbt=[],this.yUt=[],this.RFt=void 0,this.uUt=!1,this.cUt=void 0,this.dUt=!1,this.lUt=rQ.yk,this.H4=LA.rL(),this.nUt=LA.rL(),this.Zb=void 0,this.AUt=-1/0,this.UU=void 0,this.FUt=void 0,this.TUt=void 0,this.Syt=t,this.UU=i,this.FUt=n}var i=t.prototype;return i.BLt=function(t){if(!t)return this.Syt;var i=Vi.Dh(this.Syt);return void 0!==t.LOt&&i.searchParams.append(iY,String(t.LOt)),void 0!==t.kUt&&i.searchParams.append(nY,String(t.kUt)),void 0!==t.uD&&i.searchParams.append(rY,t.uD),i.href},i.Oat=function(t){var i=this.EUt(t);return i<0?void 0:this.Dbt[i]},i.EUt=function(t){var i=this.Dbt;if(0===i.length)return-1;var n=t-i[0].LOt;return n<0||n>=i.length?-1:n},i.xUt=function(t){if(0!==this.Dbt.length){var i=TV(uY.Bg,this.Dbt,t);if(!(i<0)){var n=this.Dbt[i];return t===n.RO&&i+1=n.CO?n:this.xUt(t)}},i.gFt=function(t){var i=this.PUt(t);if(void 0!==i)for(var n=i.LOt-this.Dbt[0].LOt;n>=0;n--){var r=this.Dbt[n];if(void 0!==r.JOt)return new Date(r.JOt.getTime()+1e3*(t-r.CO))}},i.pFt=function(t){for(var i,n,r=Ft(this.Dbt);!(n=r()).done;){var e=n.value;if(oY(e))if(void 0===i)i=e;else{if(!(e.JOt.getTime()<=t.getTime()))break;i=e}}if(void 0!==i)return i.CO+(t.getTime()-i.JOt.getTime())/1e3},i.IUt=function(t){switch(t){case iQ.JLt:return this.CUt;case iQ.ZLt:return this.RUt;default:return}},i.IFt=function(t){var i;void 0===this.rUt&&(this.rUt=null!=(i=t.hFt)?i:this.DUt(t));void 0===this.oUt&&void 0!==t.COt&&(this.oUt=t.COt),void 0===this.hUt&&void 0!==t.HLt&&(this.hUt=t.HLt),void 0===this.aUt&&void 0!==t.ROt&&(this.aUt=t.ROt),this.uUt=t.xOt,this.cUt=t.POt,this.dUt=t.IOt,this.lUt=t.sFt,this.Lbt(t),this.NUt(t);var n=Wn(t.nFt,function(t){return t.Km===iQ.JLt}),r=Wn(t.nFt,function(t){return t.Km===iQ.ZLt});this.CUt=n?{Syt:n.Syt,Km:n.Km,$Ot:t.$Ot}:void 0,this.RUt=r?{Syt:r.Syt,Km:r.Km,$Ot:t.$Ot}:void 0,this.pUt=Vi.Mg()/1e3;var e=this.H4.An(this.H4.V-1);this.BUt();var s=this.H4.An(this.H4.V-1);(!this.wUt||s-e>0)&&(this.wUt=this.pUt),null!=this.UU||(this.UU=t.Tn)},i.BUt=function(){this.nUt=this.MUt(),this.H4=this.LUt(this.nUt),this.Zb=this.OUt()},i.MUt=function(){var t=this.bct;if(0===t.length)return LA.rL();var i=t[0].CO,n=t[t.length-1].RO;return new LA([i,n])},i.LUt=function(t){if(0===t.V||this.iFt)return t;var i=t.Tn(0),n=t.An(0)-this.ISt;return n0&&this.Dbt.splice(0,i.HUt);var s=t.BOt;if(s>0){if(s>this.Dbt.length)throw new GQ("New playlist skips over missing segments.");var u=this.Dbt[s-1];if(void 0===u.ct)throw new GQ("New playlist skips over an incomplete segment.");n=u.DFt+u.ct,e=u.$Ot-t.$Ot,r=s;for(var o=0;o0&&void 0===g.YOt)g=io({},g,{YOt:this.Dbt[this.Dbt.length-1].YOt});var w=new qQ(n,d,c,f,g);w.SFt=this.RFt,this.Dbt.push(w)}void 0!==v&&(n+=v)}}},i.VUt=function(t){if(0===this.Dbt.length)return{HUt:0,WUt:0};var i=this.Dbt[0].LOt,n=this.Dbt[this.Dbt.length-1].LOt,r=t.bct[0].LOt-t.BOt,e=t.bct[t.bct.length-1].LOt,s=0,u=0;if(r0&&(s=c)}}return{HUt:s,WUt:u}},i.NUt=function(t){var i=t.tFt.map(oQ);if(t.IOt&&t.oFt.uD===XQ.zFt&&(i=this.yUt.concat(i)),this.yUt=JQ(i),t.MOt)for(var n,r,e=function(){var t=r.value,i=Xn(n.yUt,function(i){return i.o===t});i>=0&&$n(n.yUt,i)},s=Ft(t.MOt);!(r=s()).done;)n=this,e()},i.qUt=function(t,i){if(this.RFt!==t){this.RFt=t;for(var n,r=Ft(this.Dbt);!(n=r()).done;){n.value.SFt=this.RFt}this.BUt()}this.TUt=i},i.UUt=function(){this.RFt=void 0,this.TUt=void 0},xt(t,[{key:"iFt",get:function(){return 0!==this.Dbt.length&&this.Dbt[this.Dbt.length-1].EFt}},{key:"ct",get:function(){return this.Zb}},{key:"kP",get:function(){return this.H4}},{key:"sUt",get:function(){return this.nUt}},{key:"WLt",get:function(){return this.rUt}},{key:"HLt",get:function(){return this.hUt}},{key:"COt",get:function(){return this.iFt?0:this.oUt?this.oUt:this.rUt?3*this.rUt:void 0}},{key:"ROt",get:function(){var t;return null!=(t=this.aUt)?t:this.hUt?3*this.hUt:void 0}},{key:"xOt",get:function(){return this.uUt}},{key:"POt",get:function(){return this.cUt}},{key:"IOt",get:function(){return this.dUt}},{key:"sFt",get:function(){return this.lUt}},{key:"fUt",get:function(){return void 0!==this.HLt}},{key:"vUt",get:function(){if(this.iFt)return!0;var t=Vi.Mg()/1e3,i=this._Ut,n=this.gUt;return void 0!==i&&t-it)return ot.reject(new fY);for(var i,n=[],r=Ft(this.QUt);!(i=r()).done;){var e,s=i.value;if(s0&&this.cVt.every(function(i){return t.sVt.some(function(t){return t.iat===i})})},i.YUt=function(t){if(this.GUt.has(t))return this.GUt.get(t);var i={EU:void 0,KUt:new Xa,sVt:[]};return this.GUt.set(t,i),i},i.dVt=function(t){var i=this;this.cVt=t,this.GUt.forEach(function(t,n){return i.aVt(t,n)})},i.lVt=function(){this.eVt=-1},i.jUt=function(){return this.eVt},i.zg=function(){this.GUt.forEach(function(t){return t.KUt.Zg()}),this.GUt.clear()},t}();function dY(t){return void 0!==t.EU}function lY(t,i){return-function(t,i){if(t.oVt||i.oVt)return function(t,i){var n=t.gF(i);return t.mF()||i.mF()||(n.aF(Nm())?n=n.gF(Dm()):n.lF(Nm()._F())&&(n=n.gO(Dm()))),n}(t.nVt,i.nVt).oF(Im.SF);return t.nVt.oF(i.nVt)}(t,i)||function(t,i){return t.hVt===i.hVt?Ln.rh:t.hVt?Ln.Fg:Ln.Ug}(t,i)||function(t,i){return t.rVt.oF(i.rVt)}(t,i)}var gY=function(){function t(t,i){this.gVt=[],this.vVt=[],this.TVt=ro(),this.pVt=new vY,this.FUt=void 0,this.PVt=void 0,this.PVt=t,this.FUt=i}var i=t.prototype;return i.IFt=function(t,i){if(ZG(t))if(0===this.gVt.length)this.mVt(t);else{if(!i)return void OG.FLt("HLSModel","No rendition was provided to update the playlist. Ignoring the update.");i.sLt.IFt(t)}else{if(0!==this.gVt.length)return void OG.FLt("HLSModel","Master playlist can only be applied once. Ignoring the update.");this.wVt(t)}},i.mVt=function(t){var i=this.yVt(t.Syt);i.IFt(t);var n=this.bVt(tQ.Bk,i),r=this.bVt(tQ.Mk,i),e=new jQ({Syt:i.Syt,IW:0,wyt:0,yyt:NaN,Rrt:void 0,RRt:void 0,Olt:0,gOt:[],wOt:void 0,AOt:void 0,pOt:void 0,bOt:void 0,yOt:void 0,mOt:void 0},i,[n,r]);this.gVt.push(e)},i.wVt=function(t){var i,n,r=function(){var n=e.value,r=s.filter(function(t){return function(t,i){return wY(t.Km,t.oLt,i)&&(!t.uLt||t.sLt.Syt===i.Syt)}(t,n)});i.SVt(n,r);var u=new jQ(n,i.yVt(n.Syt,t.Tn),r);i.gVt.push(u)};(n=this.vVt).push.apply(n,[].concat(t.UW));for(var e,s=this.AVt(t),u=Ft(t.XOt);!(e=u()).done;)i=this,r()},i.yVt=function(t,i){var n=this.TVt.get(t);return void 0===n&&(n=new sY(t,i,this.FUt),this.TVt.set(t,n)),n},i.AVt=function(t){for(var i,n=[],r=Ft(t.$D);!(i=r()).done;){var e=i.value;if(void 0===e.Syt)for(var s,u=Ft(t.XOt);!(s=u()).done;){var o=s.value;if(wY(e.Km,e.oLt,o)){var h=new kG(e,this.yVt(o.Syt));n.push(h)}}else{var a=new kG(e,this.yVt(e.Syt));n.push(a)}}return n},i.bVt=function(t,i){return new kG({Km:t,Syt:void 0,oLt:"",bs:void 0,_Ot:void 0,l:"",nLt:!0,rLt:!1,hLt:!1,cLt:void 0,aLt:void 0,X9:void 0},i)},i.SVt=function(t,i){var n=i.filter(function(t){return t.Km===tQ.Bk}),r=i.filter(function(t){return t.Km===tQ.Mk}),e=t.Rrt&&(t.Rrt.W9||t.Rrt.q9);if((!e||t.Rrt.W9)&&0===r.length){var s=this.bVt(tQ.Mk,this.yVt(t.Syt));i.push(s)}if((!e||t.Rrt.q9)&&0===n.length){var u=this.bVt(tQ.Bk,this.yVt(t.Syt));i.push(u)}t.Rrt&&t.Rrt.fOt},i.kVt=function(t){for(var i,n=Ft(this.gVt);!(i=n()).done;)for(var r,e=Ft(i.value.VLt);!(r=e()).done;){var s=r.value;if(s===t)return s}},i.EVt=function(t){for(var i,n=Ft(this.gVt);!(i=n()).done;){var r=i.value;if(r===t)return r}},i.xVt=function(t){for(var i,n=Ft(this.gVt);!(i=n()).done;){var r=i.value;if(Jn(r.VLt,t))return r}},i.zg=function(){tr(this.gVt),tr(this.vVt),this.TVt.clear(),this.pVt.zg()},xt(t,[{key:"fVt",get:function(){return this.vVt}},{key:"_Vt",get:function(){return this.gVt}},{key:"AM",get:function(){return this.pVt}}]),t}();function wY(t,i,n){switch(t){case tQ.Bk:return n.pOt===i;case tQ.Mk:return n.bOt===i;case tQ.HU:return n.yOt===i;case tQ.YLt:return n.mOt===i}return!1}V(),It(),Dt();var mY=function(t){function i(i){var n;return(n=t.call(this,_Y.IVt)||this).fLt=void 0,n.fLt=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var pY=function(t){function i(i){var n;return(n=t.call(this,_Y.CVt)||this).fLt=void 0,n.fLt=i,n}return Pt(i,t),i}(ah),yY="HlsModelUpdater",_Y=function(t){return t.IVt="RVt",t.CVt="DVt",t}({}),kY=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).aV=void 0,u.Sut=void 0,u.sTt=void 0,u.Pyt=void 0,u.BVt=void 0,u.LVt=void 0,u.YVt=void 0,u.FVt=void 0,u.KVt=void 0,u.aV=i,u.Sut=n,u.sTt=r,u.BVt=!1,u.LVt=!1,u.YVt=void 0,u.FVt=void 0,u.KVt=eo(),u.Pyt=new gY(e,s),u}Pt(i,t);var n=i.prototype;return n.UVt=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:if(!(i=this.Pyt.PVt))throw new y("HLSModelUpdater - Could not load HLS playlist: The provided source is empty.");return this.So(new aC),[4,this.VVt(i,{},2,!0,t)];case 1:if(n=e.sent(),!JG(r=n.sLt)&&!ZG(r))throw new y("HLSModelUpdater - Could not load HLS playlist: The playlist is invalid.");return JG(r)||OG.cN(yY,"Detected media playlist only HLS stream."),this.HVt(r),n.WVt?(this.LVt=!0,[4,this.qVt(t)]):[3,3];case 2:e.sent(),e.label=3;case 3:return this.BVt=!0,[2]}})}).call(this)},n.zVt=function(t,i,n,r){return jt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(!(e=this.Pyt.kVt(t)))throw new y("HLSModelUpdater - Could not load HLS playlist for rendition: the rendition does not exist on the internal model.");s={LOt:i,kUt:n,uD:SY(e)},u=we(A.max(1,3*t.sLt.gUt)),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,this.GVt(e,s,r,u)];case 2:return h.sent(),[3,4];case 3:throw yr(o=h.sent()),this.XVt(e),o;case 4:return[2]}})}).call(this)},n.jVt=function(t,i){var n=this.Pyt.kVt(t);if(!n)throw new y("HLSModelUpdater - Could not load HLS playlist for rendition: the rendition does not exist on the internal model.");var r={LOt:void 0,kUt:void 0,uD:SY(n)},e=we(A.max(1,3*t.sLt.gUt));return this.GVt(n,r,i,e)},n.QVt=function(t,i){return this.KVt.has(t.JI)||this.KVt.set(t.JI,new Xa),kr(this.KVt.get(t.JI).Yy,i)},n.XVt=function(t){this.So(new pY(t))},n.GVt=function(t,i,n,r){return jt(function(){var e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:e=t.sLt.BLt(i),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.VVt(e,i,0,this.LVt,n,r)];case 2:return u=a.sent(),s=u.sLt,[3,4];case 3:throw yr(o=a.sent()),t.sLt.bUt=Vi.Mg(),o;case 4:if(!ZG(s))throw new y("HLSModelUpdater - Could not load HLS playlist for rendition: the playlist is not a media playlist.");if(!this.YVt||t===this.YVt||this.YVt.sLt.vUt)return[3,8];a.label=5;case 5:return a.trys.push([5,7,,8]),[4,this.jVt(this.YVt,n)];case 6:return a.sent(),[3,8];case 7:return yr(a.sent()),this.YVt=t,this.JVt(),[3,8];case 8:try{this.HVt(s,t)}catch(e){if(j(e,GQ)&&void 0!==i.uD)return h=io({},i,{uD:void 0}),[2,this.GVt(t,h,n,r)];throw e}return this.YVt=t,[2]}})}).call(this)},n.VVt=function(t,i,n,r,e,s){return jt(function(){var u;return zt(this,function(o){switch(o.label){case 0:return OG.cN(yY,"Loading HLS playlist at "+t+"."),r?[4,this.ZVt(t,e)]:[3,2];case 1:if(void 0!==(u=o.sent()))return[2,{sLt:u,WVt:!0}];o.label=2;case 2:return[4,this.$Vt(t,i,n,e,s)];case 3:return[2,{sLt:o.sent(),WVt:!1}]}})}).call(this)},n.ZVt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.Sut.hTt([t])];case 1:return n=r.sent(),pr(i),void 0!==n?[2,VQ(n.responseURL,{},n.data)]:[3,3];case 2:return yr(r.sent()),[3,3];case 3:return[2]}})}).call(this)},n.$Vt=function(t,i,n,r,e){return jt(function(){var s,u,o;return zt(this,function(h){switch(h.label){case 0:return s=this,u={Yu:t,fk:qd.LT,Xk:this.sTt,Hk:Tl.GET,Km:Sl.bk,Yg:r,Wk:e},[4,CT(function(t){return s.tHt(u,t)},r,n)];case 1:return[2,VQ((o=h.sent()).wk,i,o.lk)]}})}).call(this)},n.tHt=function(t,i){return void 0===i&&(i=0),jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,this.aV.vk(t)];case 1:return[4,(n=s.sent()).HT()];case 2:return[2,{lk:s.sent(),wk:n.wk}];case 3:throw mr(r=s.sent())||(e=ig(r)?r.uE.dk:void 0,this.So(new Nj),this.So(new Yj(i,e,r.message))),r;case 4:return[2]}})}).call(this)},n.qVt=function(t){return jt(function(){var i,n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:for(pr(t),i=[],n=Ft(this.Pyt._Vt);!(r=n()).done;)for(e=r.value,s=Ft(e.VLt);!(u=s()).done;)o=u.value,i.push(this.iHt(o,t));return[4,ot.all(i)];case 1:return h.sent(),[2]}})}).call(this)},n.iHt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,4,,5]),[4,this.Sut.hTt([t.sLt.Syt])];case 1:return n=r.sent(),pr(i),void 0===n||t.sLt.vUt?[3,3]:[4,this.jVt(t,i)];case 2:r.sent(),r.label=3;case 3:return[3,5];case 4:return yr(r.sent()),[3,5];case 5:return[2]}})}).call(this)},n.JVt=function(){for(var t,i=Ft(this.Pyt._Vt);!(t=i()).done;)for(var n,r=Ft(t.value.VLt);!(n=r()).done;){var e=n.value;e!==this.YVt&&(void 0!==e.sLt.SFt&&(e.sLt.vUt?this.eHt(e):e.sLt.UUt()))}},n.eHt=function(t){if(0!==t.sLt.bct.length){if(!this.YVt)return this.YVt=t,void this.YVt.sLt.qUt(0,void 0);if(this.sHt(this.YVt),!this.sHt(t)&&void 0===t.sLt.SFt){var i=this.nHt(t,this.YVt);OG.OLt(yY,"Assuming global timeline offset of "+i+"s for rendition "+t.sLt.Syt+"."),t.sLt.qUt(i,void 0)}}},n.nHt=function(t,i){if(bY(t)){var n=t.sLt.bct[0],r=i.sLt.bct[0];return OG.OLt(yY,"Synchronizing by start of VOD: "+r.CO+" vs "+n.CO),r.CO-n.DFt}var e=function(t,i){var n=t.length-1,r=i.length-1;for(;n>=0&&r>=0;){var e=t[n],s=i[r];if(e.$Ot>s.$Ot)n--;else if(e.$Ot=t.sLt.POt/2))return t.sLt.IOt?XQ.zFt:XQ.qFt}var EY=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).nEt=void 0,r.oHt=void 0,r.aHt=function(t){r.NUt(t.fLt)},r.nEt=i,r.nEt.wn(_Y.IVt,r.aHt),r}Pt(i,t);var n=i.prototype;return n.NUt=function(t){if(0!==t.sLt.tFt.length){this.oHt||(this.oHt=this.iV.sI(uy.zU,void 0,void 0,void 0,void 0,jw.DATE_RANGE),this.tt(this.oHt));KQ(this.oHt,t.sLt.tFt,function(i){var n;return null!=(n=t.sLt.pFt(i))?n:NaN})}},n.eV=function(t,i,n){var r=Ty(t,i,n);return this.oHt===t&&(this.oHt=r),r},i}(Ay);V(),It(),Dt();var IY=function(t){function i(){return t.call(this,_G.ZMt)||this}return Pt(i,t),i}(ah);V(),It(),Bt(),Ut(),V(),It(),Wt(),Bt(),Yt(),V(),It(),Bt();var RY=function(){function t(t){this.Wrt=void 0,this.Dbt=void 0,this.n3=void 0,this.Ipt=void 0,this.Wrt=t,this.Dbt=[],this.n3=void 0,this.Ipt=void 0}var i=t.prototype;return i.cHt=function(t){var i;return null==(i=this.dHt(t))?void 0:i.fLt},i.lHt=function(t){this.n3=t,this.fHt()},i.elt=function(t,i,n,r,e,s){this.Dbt.push({fLt:t,yut:i,vHt:LA.nL(e,s),_Ht:LA.nL(n,r)}),this.fHt()},i.dHt=function(t){return Wn(this.Dbt,function(i){return i._Ht.Cr(t)})},i.Oat=function(t){return Wn(this.Dbt,function(i){return i.yut===t})},i.Qct=function(t,i){return Wn(this.Dbt,function(n){return n.fLt===t&&cY(n.yut,i)})},i.F3=function(){var t=this.Fx;t.V>0&&(this.Ipt=t.An(t.V-1))},i.fHt=function(){var t=this.Wrt.Fx;this.Dbt=this.Dbt.filter(function(i){return 0!==t.Mn(i._Ht).V})},xt(t,[{key:"uHt",get:function(){return this.n3}},{key:"Fx",get:function(){return cM(this.Wrt.Fx,this.Wrt.W3)}},{key:"bct",get:function(){return this.Dbt}},{key:"Npt",get:function(){return this.Ipt}}]),t}();V(),It();var CY=188,PY=function(t){return t[t.yk=0]="yk",t[t.pC=1]="pC",t[t.gHt=2]="gHt",t[t.pHt=3]="pHt",t}({});function DY(t){return NY(t)?1:function(t){return function(t){if(t.length<376)return-1;for(var i=t.length<564?2:3,n=A.min(1e3,t.length-i*CY),r=0;r<=n;r++){for(var e=!0,s=0;s=0}(t)?2:function(t){return null!==$D(Aa(t),new Pa)}(t)?3:0}function NY(t){var i=ka(t,0,A.min(t.length,16384));return Pp.RD(Aa(i))}var xY=function(){function t(t,i,n,r,e,s,u){var o=this;this.eb=void 0,this.Yot=void 0,this.DHt=void 0,this.Vp=void 0,this.Opt=void 0,this.ENt=void 0,this.WHt=void 0,this.bHt=void 0,this.hT=new dr,this.yHt=LA.rL(),this.qHt=void 0,this.spt=void 0,this.CHt=!0,this.SHt=!1,this.NHt=function(t){o.bHt&&(t?lR(t)&&BY(o)?o.WHt.iJ(o.eb.Fx.eL)?o.bHt.Qy():o.bHt.Ky(t):mr(t)?o.bHt.Qy():(o.SHt=!0,o.bHt.Ky(t)):o.bHt.Qy(),o.bHt=void 0)},this.Vp=t,this.DHt=n,this.eb=i,this.Yot=r,this.WHt=e,this.Opt=s,this.ENt=u}var i=t.prototype;return i.THt=function(){if(this.yCt)throw new y("Cannot perform new operation while BufferAppender is still busy")},i.kHt=function(t){this.eb!==t&&(this.THt(),this.eb=t,this.Yot=new RY(t))},i.EHt=function(){return this.bHt?this.bHt.Yy:ot.resolve()},i.xHt=function(t){var i=this.Yot.Npt;return void 0!==i&&this.PHt(t,i)},i.PHt=function(t,i){var n,r,e=A.min(t,i);return null!=(r=null==(n=this.Yot.Fx.MM().qM(this.wHt).iL(e))?void 0:n.Cr(i))&&r},i.IHt=function(t){return this.Yot.cHt(t)},i.Zg=function(){this.hT.Zg(),this.hT=new dr,this.CHt=!0},i.J2=function(t){var i=this;this.THt(),this.bHt=new Xa;var n=function(n){i.DHt.RHt(t),i.NHt(n)};this.Z2(t,this.hT.Yg).then(n,n)},i.Z2=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return OG.OLt(FG,"Appending initializer",eQ(t.BHt.Syt)),this.spt=t,[4,this.eb.J2(t,i)];case 1:return n.sent(),void 0!==this.ENt&&this.Vp===vw.Mk&&NY(t.lk.lk)&&this.ENt.ght(t.lk.lk),OG.OLt(FG,"Appended initializer",eQ(t.BHt.Syt)),this.CHt=!1,this.Yot.lHt(t),[2]}})}).call(this)},i.Pdt=function(t){var i=this;this.THt(),this.bHt=new Xa;var n=function(n){i.DHt.RHt(t),i.NHt(n)};this.MHt(t,this.hT.Yg).then(n,n)},i.MHt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:if(void 0===(n=t.fLt).sLt.WLt)throw new y("HlsBufferAppender: Cannot append HLSAsset to "+this.Vp+" buffer for a HLSRendition with an undefined targetDuration.");return this.CHt&&void 0!==this.spt?[4,this.Z2(this.spt,i)]:[3,2];case 1:f.sent(),f.label=2;case 2:return r=this.Yot.Fx.IM,e=this.eb.Fx,OG.OLt(FG,"Appending",eQ(t.BHt.Syt)),[4,this.eb.Q2(t,i)];case 3:return f.sent(),void 0!==t.lk&&this.LHt(t.lk,t),OG.OLt(FG,"Appended",eQ(t.BHt.Syt),r,this.Yot.Fx.IM),s=t.CO,u=s+t.ct,o=t.BHt,h=o.CO,c=o.CO+(null!=(a=o.ct)?a:0),this.Yot.elt(n,o,s,u,h,c),this.OHt(n,o,s,u,e),t.BHt.EFt&&this.Yot.F3(),[2]}})}).call(this)},i.OHt=function(t,i,n,r,e){if(this.Km===vw.Mk){var s=this.eb.Fx.qM(e),u=this.Yot.Qct(t,i);if(u)if(this.FHt(u))if(0===s.V){if(void 0===this.Yot.Oat(i)){var o=this.eb.W3.Mn(new LA([n,r]));this.yHt=this.yHt.HM(o)}}else{var h=s.Tn(0),a=new LA([h,r]);if(this.yHt=this.yHt.qM(a),h>n){var c=this.eb.W3.Mn(new LA([n,h]));this.yHt=this.yHt.HM(c)}}else{var f=s.V>0&&s.Tn(0)n?g:n;if(l>w){var m=this.eb.W3.Mn(new LA([w,s.Tn(0)]));this.yHt=this.yHt.HM(m)}}}},i.FHt=function(t){var i=t._Ht,n=i.Tn(0),r=i.An(i.V-1),e=i.RM(0),s=i.NM(i.V-1);return this.yHt.GM(n,r,e,s)},i.LHt=function(t,i){var n;if(NY(t.lk)){var r=i.CO,e=r+i.ct,s=i.EU;if(null==(n=this.Opt)||n.elt(t.lk,r,s),void 0!==this.ENt&&this.Vp===vw.Mk){var u=i.BHt.EFt;this.ENt.elt(t.lk,r,e,s,i.fLt,u)}var o=[];void 0!==this.Opt&&o.push(this.Opt),void 0!==this.ENt&&o.push(this.ENt),by(this.eb.Fx,o)}},i.UHt=function(t){this.THt(),this.bHt=new Xa;try{OG.OLt(FG,"Appending gap from "+t.VHt+" to "+t.HHt,eQ(t.yut.Syt)),this.G3(t.VHt,t.HHt)}finally{this.DHt.RHt(t),this.NHt()}},i.G3=function(t,i){this.eb.G3(t,i)},xt(t,[{key:"Km",get:function(){return this.Vp}},{key:"mHt",get:function(){return this.Yot}},{key:"wHt",get:function(){return this.yHt}},{key:"yCt",get:function(){return void 0!==this.bHt}},{key:"AHt",get:function(){return this.SHt}}]),t}();function BY(t){return dw(t.Km)}V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It(),Wt(),Yt();var OY=function(){function t(t,i,n){this.XHt=void 0,this.aV=void 0,this.sTt=void 0,this.jHt=void 0,this.XHt=t,this.aV=i,this.sTt=n,this.jHt=void 0}var i=t.prototype;return i.zHt=function(t,i,n,r){return jt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,this.GHt(i,r)];case 1:return e=s.sent(),[4,this.XHt.zHt(t,e,n)];case 2:return[2,s.sent()]}})}).call(this)},i.GHt=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return(null==(n=this.jHt)?void 0:n.Yu)===t?[3,3]:(OG.OLt("HLSDecryptor","Fetching new AES-128 decryption key from "+t+"."),[4,this.aV.vk({Yu:t,fk:qd.NT,Hk:Tl.GET,Yg:i,Km:Sl.Tk,zk:El.Nk,Xk:this.sTt})]);case 1:return[4,s.sent().qT()];case 2:r=s.sent(),e=new I(r),this.jHt={Yu:t,lk:e},s.label=3;case 3:return[2,this.jHt.lk]}})}).call(this)},t}();V(),It(),Wt(),Yt();var MY=function(){function t(t,i,n,r,e){void 0===e&&(e=2),this.aV=void 0,this.Sut=void 0,this.qat=void 0,this.sTt=void 0,this.Srt=void 0,this.aV=t,this.Sut=i,this.qat=n,this.sTt=r,this.Srt=e}var i=t.prototype;return i.vk=function(t,i,n,r,e){return jt(function(){var s,u;return zt(this,function(o){switch(o.label){case 0:return[4,this.QHt(t,i,n,qd.NT,r,e)];case 1:return[4,(s=o.sent()).qT(e)];case 2:return u=o.sent(),[2,{httpStatusCode:s.dk,response:new I(u)}]}})}).call(this)},i.KHt=function(t,i,n,r,e){return jt(function(){return zt(this,function(s){switch(s.label){case 0:return[4,this.QHt(t,i,n,qd.MT,r,e)];case 1:return[2,s.sent().zT(e)]}})}).call(this)},i.QHt=function(t,i,n,r,e,s){return jt(function(){var u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:u=this,t.iAt&&0===(o=KG(t.iAt.Tn,t.iAt.V))[0]&&o[1]===In&&(o=void 0),h=o?{Range:"bytes="+o[0]+"-"+o[1]}:void 0,a=new Cl({Yu:t.XE,fk:r,_k:h,Xk:this.sTt,Hk:Tl.GET,Km:i,zk:n,Gk:this.qat,Kk:r===qd.MT,jk:e,Yg:s}),f.label=1;case 1:return f.trys.push([1,3,,4]),[4,this.Sut.Aut(t.XE,o)];case 2:return c=f.sent(),pr(s),void 0!==c?(null==e||e(c.buffer.byteLength,c.buffer.byteLength),[2,new Al({vk:a,fk:a.fk,lk:c.buffer})]):[3,4];case 3:return yr(f.sent()),[3,4];case 4:return[4,CT(function(){return kr(u.aV.vk(a),a.Yg)},s,this.Srt)];case 5:return[2,f.sent()]}})}).call(this)},t}();V(),It(),Wt(),Yt();var LY=function(){function t(t,i){this.nEt=void 0,this.JHt=void 0,this.sWt=void 0,this.hWt=new dr,this.En=-1/0,this.$Ht=void 0,this.nWt=!1,this.nEt=t,this.JHt=i,this.iWt()}var i=t.prototype;return i.YHt=function(){return this.JHt.sLt.xOt},i.ZHt=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:if(!this.YHt())throw new y("Could not perform blocking playlist update.");return r=this.$Ht,e={LOt:t,kUt:i},void 0!==r&&function(t,i,n){if(t.LOt===i.LOt){if(t.kUt===i.kUt)return!0;if(0===t.kUt&&void 0===i.kUt)return!0}if(t.LOt===i.LOt+1&&0===t.kUt&&void 0!==i.kUt){var r=n.Oat(i.LOt);if(r&&r.Syt&&i.kUt>=r.QOt.length)return!0}return!1}(r,e,this.JHt.sLt)?[3,2]:[4,this.tWt()];case 1:s.sent(),this.iWt(e),s.label=2;case 2:return[2,this.nEt.QVt(this.JHt,n)]}})}).call(this)},i.eWt=function(t){return this.iWt(),this.nEt.QVt(this.JHt,t)},i.iWt=function(t){var i=this;if(!this.sWt&&!this.nWt){var n=function(){i.sWt=void 0};this.sWt=this.rWt(t,this.hWt.Yg).then(n,n)}},i.tWt=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.sWt?(this.hWt.Zg(),this.hWt=new dr,[4,this.sWt.catch(pn)]):[3,2];case 1:t.sent(),this.sWt=void 0,t.label=2;case 2:return[2]}})}).call(this)},i.rWt=function(t,i){return jt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:n=t,u.label=1;case 1:if(pr(i),this.JHt.sLt.iFt&&this.JHt.sLt.vUt)return[2];null!=n||(n=this.oWt()),this.$Ht=n,u.label=2;case 2:return u.trys.push([2,9,,10]),n?[4,this.nEt.zVt(this.JHt,n.LOt,n.kUt,i)]:[3,4];case 3:return u.sent(),[3,8];case 4:return r=Vi.Mg()-this.En,e=1e3*this.JHt.sLt.gUt,r=t)return!0;if(e=t},i.cWt=function(t,i){for(var n=[],r=0;r0?(a=Ia(s,0,h),c=Ia(s,h),OG.OLt(UY,"Of the read "+u+" bytes, the first "+h+" will be stored locally for extraction of "+eQ(this.NFt)),this.yWt.lWt(e,a),c.length>0?(OG.OLt(UY,"Extracting "+c.length+" bytes for extraction of "+eQ(this.NFt)),t.enqueue(c),this.pWt(),[2,Er(this.readAndSliceOutAssetBytes(t))]):[3,9]):[3,5];case 5:return e+u<=r?(OG.OLt(UY,"Extracting the read data range for extraction of "+eQ(this.NFt)),t.enqueue(s),this.pWt(),[2,Er(this.readAndSliceOutAssetBytes(t))]):[3,6];case 6:return v=Ia(s,0,f=r-e),d=Ia(s,f),v.length>0&&(OG.OLt(UY,"Extracting "+v.length+" bytes for extraction of "+eQ(this.NFt)),t.enqueue(v)),OG.OLt(UY,"Of the read "+u+" bytes, the last "+d.length+" will be stored locally for extraction of "+eQ(this.NFt)),this.yWt.lWt(e+f,d),OG.OLt(UY,"Extraction of "+eQ(this.NFt)+" completed as the entire request has been fulfilled."),this.AWt(t),this.SWt?(OG.OLt(UY,"Aborting stream upstream as no more bytes are needed from "+eQ(this.NFt)+"."),[4,this.Wd.gWt("AssetExtraction - AbortOnEnd")]):[3,8];case 7:l.sent(),l.label=8;case 8:return[2];case 9:return[3,3];case 10:return[3,12];case 11:return l.sent(),OG.OLt(UY,"Extraction of "+eQ(this.NFt)+" completed as the entire source stream has been read."),this.AWt(t),[3,12];case 12:return[2]}})}).call(this)},i.AWt=function(t){t.close(),this.pWt(),this.TWt.Qy()},i.start=function(t){OG.OLt(UY,"Preparing to push all collected data to controller for extraction of "+eQ(this.NFt)),this.wWt(t),OG.OLt(UY,"Collected data pushed to controller for extraction of "+eQ(this.NFt));var i=zY(this.NFt.iAt).sAt;this.Wd.fWt>=i?(OG.OLt(UY,"Extraction of "+eQ(this.NFt)+" completed as the entire request has been fulfilled."),this.AWt(t)):(OG.OLt(UY,"Continuing read from original stream for extraction of "+eQ(this.NFt)),Er(this.readAndSliceOutAssetBytes(t)))},i.pull=function(){return this.bWt.Qy(),this.bWt=new Xa,this.mWt.Yy},xt(t,[{key:"kWt",get:function(){return this.TWt.Yy}}]),t}(),WY=function(){function t(t,i){this.NFt=void 0,this.yWt=void 0,this.EWt=void 0,this.xWt=void 0,this.NFt=i;var n=zY(this.NFt.iAt).eAt;this.EWt=new jY(t,n),this.yWt=new VY}var i=t.prototype;return i.pO=function(t){if(!sQ(this.NFt,t))return!1;var i=zY(t.iAt),n=i.eAt,r=i.sAt;return this.yWt.aWt(this.EWt.fWt,n,r)},i.Fgt=function(t,i){return void 0===i&&(i=!1),jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return n=this.EWt,r=this.yWt,OG.cN(UY,"Extracting data from "+eQ(t)+" out of "+eQ(this.NFt)),this.xWt?(OG.OLt(UY,"Awaiting previous extraction before extracting "+eQ(t)+" out of "+eQ(this.NFt)),[4,this.xWt]):[3,2];case 1:s.sent(),s.label=2;case 2:if(!this.pO(t))throw new y("The extractor does not contain the data requested");return e=new HY(t,n,r,i),this.xWt=e.kWt,[2,new Zd(e)]}})}).call(this)},t}();function zY(t){if(t){var i=t.Tn;return{eAt:i,sAt:void 0!==t.V?i+t.V:In}}return{eAt:0,sAt:In}}var qY=function(){function t(t,i){this.NFt=void 0,this.PWt=void 0,this.hT=void 0,this.Ypt=void 0,this.NFt=t,this.PWt=i,this.hT=new dr,this.Ypt=this.Un()}var i=t.prototype;return i.Un=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return[4,this.PWt.KHt(this.NFt,Sl.Sk,El.yk,void 0,this.hT.Yg)];case 1:return t=i.sent(),[2,new WY(t,this.NFt)]}})}).call(this)},i.pO=function(t){return sQ(this.NFt,t)},i.Fgt=function(t,i){return void 0===i&&(i=!1),jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.Ypt];case 1:return[4,kr(n.sent().Fgt(t,i),this.hT.Yg)];case 2:return[2,n.sent()]}})}).call(this)},i.Zg=function(){this.Ypt.catch(pn),this.hT.Zg()},t}();V(),It(),Dt();var XY=function(t){function i(i){var n;return(n=t.call(this,ZY.IWt)||this).Gk=void 0,n.Gk=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var GY=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,ZY.CWt)||this).uri=void 0,h.RWt=void 0,h.Gk=void 0,h.mediaSequenceNumeber=void 0,h.mediaTrackId=void 0,h.DWt=void 0,h.httpStatusCode=void 0,h.uri=i,h.RWt=n,h.Gk=r,h.mediaSequenceNumeber=e,h.mediaTrackId=s,h.DWt=u,h.httpStatusCode=o,h}return Pt(i,t),i}(ah);function QY(t,i,n){var r=hY(n)?n:n.PFt;if(i.zUt(r.$Ot)){if(void 0!==n.Get)return i.$Ut(n.Get,n).rF();if(n!==r&&void 0!==r.Get){var e=i.$Ut(r.Get,r).rF();return n.CO+(e-r.CO)}}var s=t.sLt.Oat(r.LOt-1);if(void 0!==s&&i.zUt(s.$Ot)){if(s.QOt.length>0){var u=s.OFt(s.QOt.length-1);if(void 0!==u.Get){var o=i.$Ut(u.Get,u).rF();return n.CO+(o-u.CO)}}if(void 0!==s.Get){var h=i.$Ut(s.Get,s).rF();return n.CO+(h-s.CO)}}var a=t.sLt.Oat(r.LOt+1);if(void 0!==a&&i.zUt(a.$Ot)){if(a.QOt.length>0){var c=a.OFt(0);if(void 0!==c.Get){var f=i.$Ut(c.Get,c).rF();return n.CO+(f-c.CO)}}if(void 0!==a.Get){var v=i.$Ut(a.Get,a).rF();return n.CO+(v-a.CO)}}return n.CO}function YY(t){return void 0!==t.Get}function $Y(t,i,n,r){for(var e=i;e=0;e--){var s=t[e];if(s.$Ot!==n)break;if(YY(s))if(r(s,e))break}}V(),It();var JY="HlsPlaylistDownloader",ZY=function(t){return t.IWt="NWt",t.CWt="BWt",t}({}),t$=function(t){function i(i,n,r,e,s,u,o,h){var a;return(a=t.call(this)||this).Vp=void 0,a.nEt=void 0,a.DHt=void 0,a.PWt=void 0,a.Sqt=void 0,a.JHt=void 0,a.LWt=void 0,a.OWt=void 0,a.WWt=void 0,a.Tqt=void 0,a.kqt=0,a.Eqt=0,a.xqt=0,a.Pqt=0,a.GWt=new dr,a.XWt=void 0,a.FWt=0,a.UWt=void 0,a.VWt=void 0,a.HWt=!1,a.QWt=void 0,a.jWt=void 0,a.uqt=0,a.iqt=function(t){a.OWt&&(a.JHt=a.OWt,a.OWt=void 0,a.FWt=0,a.UWt=void 0,a.VWt=void 0,a.HWt=!1),a.WWt&&(t&&!mr(t)?a.WWt.Ky(t):(a.uqt=0,a.WWt.Qy()),a.WWt=void 0)},a.bqt=function(t,i){a.xqt=t,t>0&&0===a.kqt&&(a.kqt=Vi.Mg()),void 0!==i&&(a.Pqt=i),a.So(new XY(a.Vp))},a.Vp=i,a.nEt=r,a.DHt=e,a.JHt=n,a.LWt=new LY(r,n),a.Sqt=new OY(o,s,h),a.PWt=new MY(s,u,function(t){switch(t){case tQ.Mk:return Il.Mk;case tQ.Bk:return Il.Bk;case tQ.HU:case tQ.YLt:return Il.LT;default:return Il.yk}}(n.Km),h),a}Pt(i,t);var n=i.prototype;return n.MWt=function(t){this.LWt.zg(),this.LWt=new LY(this.nEt,t),this.yCt?this.OWt=t:(this.JHt=t,this.FWt=0,this.UWt=void 0,this.VWt=void 0,this.HWt=!1)},n.EHt=function(){return this.WWt?this.WWt.Yy:ot.resolve()},n.zWt=function(){return this.DHt.zWt()},n.Zg=function(){var t,i,n;this.GWt.Zg(),this.GWt=new dr,null==(t=this.XWt)||t.Zg(),this.XWt=void 0,null==(i=this.jWt)||i.Zg(),null==(n=this.QWt)||n.Zg(),this.jWt=void 0,this.QWt=void 0,this.FWt=0,this.UWt=void 0,this.VWt=void 0,this.HWt=!1},n.zg=function(){this.LWt.zg(),this.Vo()},n.KWt=function(t){var i=this.JHt.sLt.xUt(t);if(!i)return!1;if(void 0!==this.UWt){var n=i.LOt===this.UWt;return void 0!==this.VWt?i.FFt(t)===i.OFt(this.VWt)&&n:n}return!1},n.YWt=function(t){var i,n;if(!this.qWt&&(void 0===this.UWt||t=u&&(i=this.JWt(t))}else if(this.JHt.sLt.iFt&&void 0!==this.UWt){if(this.JHt.sLt.Oat(this.UWt).EFt&&void 0!==(i=this.JWt(t))&&i[0].LOt===this.UWt)return}if(i){this.FWt=t;var o=i[0],h=i[1];return 0===(null==h?void 0:h.CFt)&&void 0!==o.ct?[o,void 0]:[o,h]}},n.JWt=function(t){var i,n,r=this.JHt.sLt.bct;if(0!==r.length){var e,s=this.nEt.Br.AM,u=Im.hU(t),o=function(t,i,n){var r=t.sLt.bct;if(0!==r.length){var e=t.sLt.PUt(n.rF());if(i.zUt(e.$Ot)){var s,u,o,h=e.LOt-r[0].LOt,a=e.$Ot,c=0;if(!(KY(r,h,a,function(t,i){return s=t,c=i,!0}),void 0===s&&($Y(r,h+1,a,function(t,i){return s=t,c=i,!0}),void 0===s)||(i.$Ut(s.Get,s).cF(n)?(u=s,$Y(r,c+1,a,function(t){return i.$Ut(t.Get,t).hF(n)?(o=t,!0):(u=t,!1)})):(o=s,KY(r,c-1,a,function(t){return i.$Ut(t.Get,t).cF(n)?(u=t,!0):(o=t,!1)})),void 0===u||void 0===o)))return[u,o]}}}(this.JHt,s,u);if(void 0!==o){var h=o[0],a=o[1],c=s.$Ut(h.Get,h),f=s.$Ut(a.Get,a),v=u.gF(c).rF()/f.gF(c).rF()*(a.CO-h.CO);e=h.CO+v}else e=t;var d=r[r.length-1];return d.RO<=e?(i=d,n=d.VFt(e)):n=r[0].CO>e?(i=r[0]).OFt(0):null==(i=this.JHt.sLt.xUt(e))?void 0:i.VFt(e),i?[i,n]:void 0}},n.ZWt=function(t,i){var n,r;if((n=this.JHt.sLt.Oat(t))&&void 0!==i){if(0===n.QOt.length)return[n,void 0];r=n.OFt(i+1)}return void 0!==n&&void 0!==r||(r=null==(n=this.JHt.sLt.Oat(t+1))?void 0:n.OFt(0)),n?[n,r]:void 0},n.THt=function(){if(this.yCt)throw new y("Cannot perform new operation while PlaylistDownloader is still busy")},n.$Wt=function(t,i){this.THt(),this.WWt=new Xa;var n=dr.ep([i,this.GWt.Yg]);this.tqt(t,n.Yg).then(this.iqt,this.iqt)},n.eqt=function(){this.LWt.iWt()},n.tqt=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return this.JHt.sLt.iFt?[2]:(n=this.YWt(t))||!this.LWt.YHt()||void 0===this.UWt?[3,2]:[4,this.LWt.ZHt(void 0===this.VWt?this.UWt+1:this.UWt,void 0!==this.VWt?this.VWt+1:void 0,i)];case 1:e.sent(),n=this.YWt(t),e.label=2;case 2:return n||!this.LWt.YHt()||void 0===this.UWt?[3,4]:[4,this.LWt.ZHt(this.UWt+1,0,i)];case 3:e.sent(),n=this.YWt(t),e.label=4;case 4:return n?[3,6]:(OG.cN(JY,"No next segment / part available, need to update playlist before continuing."),[4,this.LWt.eWt(i)]);case 5:return e.sent(),r=this.fLt.sLt.bct,r[0].CO>t&&(this.VWt=void 0,this.UWt=void 0,this.HWt=!1),r[r.length-1].LOt0&&this.xqt>=this.Pqt)&&!(t-this.kqt<500)))},xt(i,[{key:"yCt",get:function(){return void 0!==this.WWt}},{key:"qWt",get:function(){return this.HWt}},{key:"fLt",get:function(){var t;return null!=(t=this.OWt)?t:this.JHt}},{key:"jCt",get:function(){if(!this.JHt.sLt.iFt||void 0===this.UWt)return!1;var t=this.JHt.sLt.Oat(this.UWt);if(!t.EFt)return!1;if(void 0!==this.VWt&&!t.OFt(this.VWt).EFt)return!1;return!0}}]),i}(uh);function i$(t,i,n,r){return{lk:{lk:n,Km:nC.wZ},Km:FY.JLt,jut:r,BHt:t,$Ot:i.$Ot}}function n$(t,i,n){return{lk:{lk:i,Km:nC.wZ},Km:FY.Ak,jut:n,BHt:t,$Ot:t.$Ot}}function r$(t,i,n){return{lk:{lk:i,Km:nC.wZ},jut:n,Km:FY.ZLt,BHt:t,$Ot:t.PFt.$Ot}}V(),It(),Bt(),Ut();var e$=function(){function t(t){this.Lqt=[],this.Fqt=ro(),this.pVt=void 0,this.Vqt=void 0,this.Bqt=void 0,this.pVt=t}var i=t.prototype;return i.vqt=function(t){"YOt"===t.Km&&(this.Bqt=t.YOt),this.Lqt.push(t),this.Vqt&&(this.Vqt.Qy(),this.Vqt=void 0)},i.zWt=function(){return this.Lqt[0]},i.Hqt=function(t){Yn(this.Lqt,t)},i.nqt=function(){return null!=this.Vqt||(this.Vqt=new Xa),this.Vqt.Yy},i.Wqt=function(t){this.qqt(t.iat).Wqt(t)},i.zqt=function(t){return this.qqt(t).zqt()},i.RHt=function(t){this.qqt(t.iat).RHt(t)},i.Gqt=function(t){var i;null==(i=this.Fqt.get(t))||i.zg()},i.Xqt=function(t){return this.qqt(t).Xqt()},i.qqt=function(t){if(this.Fqt.has(t))return this.Fqt.get(t);var i=new s$;return this.Fqt.set(t,i),i},i.jy=function(){this.jqt(),this.Qqt()},i.jqt=function(){this.Bqt=void 0,tr(this.Lqt)},i.Qqt=function(){this.Fqt.forEach(function(t){return t.jy()})},i.zg=function(){this.Fqt.forEach(function(t){return t.zg()}),this.Fqt.clear(),this.jy(),this.Vqt&&(this.Vqt.Zg(),this.Vqt=void 0)},xt(t,[{key:"uHt",get:function(){return this.Bqt}},{key:"Mqt",get:function(){for(var t,i=[],n=Ft(this.Lqt);!(t=n()).done;){var r=t.value;if("yut"===r.Km){var e,s=r.yut.BHt,u=QY(r.fLt,this.pVt,s);i.push({yut:s,fLt:r.fLt,CO:u,RO:u+(null!=(e=s.ct)?e:0)})}else"wqt"===r.Km&&i.push({yut:r.yut,fLt:r.fLt,CO:r.VHt,RO:r.HHt})}return i}},{key:"Oqt",get:function(){var t=[];return this.Fqt.forEach(function(i){for(var n,r=Ft(i.Uqt);!(n=r()).done;){var e=n.value;"yut"===e.Km?t.push({yut:e.BHt,fLt:e.fLt,CO:e.CO,RO:e.CO+e.ct}):"wqt"===e.Km&&t.push({yut:e.yut,fLt:e.fLt,CO:e.VHt,RO:e.HHt})}}),t}}]),t}(),s$=function(){function t(){this.Kqt=[],this.Yqt=void 0}var i=t.prototype;return i.Wqt=function(t){this.Kqt.push(t),this.Yqt&&(this.Yqt.Qy(),this.Yqt=void 0)},i.zqt=function(){return this.Kqt[0]},i.RHt=function(t){Yn(this.Kqt,t)},i.Xqt=function(){return null!=this.Yqt||(this.Yqt=new Xa),this.Yqt.Yy},i.jy=function(){tr(this.Kqt)},i.zg=function(){this.jy(),this.Yqt&&(this.Yqt.Zg(),this.Yqt=void 0)},xt(t,[{key:"Uqt",get:function(){return this.Kqt}}]),t}();V(),It(),Wt(),Dt(),Yt(),V(),It(),Bt(),Dt(),Ut(),V(),It(),Dt();var u$=function(t){function i(i,n){var r;return(r=t.call(this,f$.Jqt)||this).fLt=void 0,r.Rrt=void 0,r.fLt=i,r.Rrt=n,r}return Pt(i,t),i}(ah);V(),It(),Dt();var o$=function(t){function i(i){var n;return(n=t.call(this,f$.Zqt)||this).fLt=void 0,n.fLt=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var h$=function(t){function i(i,n){var r;return(r=t.call(this,f$.$qt)||this).fLt=void 0,r.Olt=void 0,r.fLt=i,r.Olt=n,r}return Pt(i,t),i}(ah);V(),It(),Dt();var a$=function(t){function i(i,n){var r;return(r=t.call(this,f$.tzt)||this).fLt=void 0,r.izt=void 0,r.fLt=i,r.izt=n,r}return Pt(i,t),i}(ah);V(),It(),Dt();var c$=function(t){function i(){return t.call(this,f$.ezt)||this}return Pt(i,t),i}(ah),f$=function(t){return t.Jqt="szt",t.$qt="nzt",t.tzt="rzt",t.Zqt="hzt",t.ezt="ozt",t}({}),v$=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).DHt=void 0,e.pVt=void 0,e.uzt=void 0,e.dzt=void 0,e.hT=new dr,e.DHt=i,e.pVt=n,e.uzt=r,e}Pt(i,t);var n=i.prototype;return n.czt=function(t){for(var i,n=Ft(this.uzt);!(i=n()).done;){var r=i.value;Jn(t,r)||this.DHt.Gqt(r)}this.uzt=t},n.EHt=function(){var t,i;return null!=(i=null==(t=this.dzt)?void 0:t.Yy)?i:ot.resolve()},n.THt=function(){if(this.yCt)throw new y("Cannot perform new operation while transmuxer is still busy")},n.lzt=function(t,i){},n.fzt=function(t){var i=this;this.THt(),this.dzt=new Xa;var n=function(n){i.vzt(t,n)};this._zt(t,this.hT.Yg).then(n,n)},n.gzt=function(t){var i=this;this.THt(),this.dzt=new Xa;var n=function(n){i.vzt(t,n)};this.pzt(t,this.hT.Yg).then(n,n)},n.mzt=function(t){this.THt(),this.dzt=new Xa;try{for(var i,n=Ft(this.azt);!(i=n()).done;){var r={Km:"wqt",iat:i.value,VHt:t.VHt,HHt:t.HHt,$Ot:t.$Ot,fLt:t.fLt,yut:t.yut};this.Wqt(r)}}finally{this.vzt(t)}},n.vzt=function(t,i){this.dzt&&(!i||mr(i)||function(t){return j(t,fY)}(i)?(mr(i)||this.DHt.Hqt(t),this.dzt.Qy(),this.dzt=void 0):this.dzt.Ky(i),this.So(new c$))},n.wzt=function(t,i){this.So(new u$(t,i))},n.yzt=function(t,i){this.So(new h$(t,i))},n.bzt=function(t,i,n){aY(i)&&this.So(new a$(t,n))},n.Azt=function(t){this.So(new o$(t))},n.Wqt=function(t){Jn(this.uzt,t.iat)&&this.DHt.Wqt(t)},n.Szt=function(t){return this.DHt.zqt(t)},n.RHt=function(t){this.DHt.RHt(t)},n.Tzt=function(t){return this.DHt.Xqt(t)},n.Zg=function(){this.hT.Zg(),this.hT=new dr},xt(i,[{key:"azt",get:function(){return this.uzt}},{key:"yCt",get:function(){return void 0!==this.dzt}}]),i}(uh);function d$(t,i){return aY(t)?0:A.min(t.CO,i)}function l$(t,i){var n;return A.max(t.CO,i)+(null!=(n=t.ct)?n:0)}var g$=function(t){function i(i,n,r){return t.call(this,i,n,[r])||this}Pt(i,t);var n=i.prototype;return n._zt=function(t,i){pr(i);var n={Km:"rRt",lk:t.YOt.lk,iat:this.azt[0],$Ot:t.$Ot,kzt:{Rrt:"",UW:t.UW},CO:t.CO,fLt:t.fLt,BHt:t.YOt.BHt};return this.Wqt(n),ot.resolve()},n.pzt=function(t,i){return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return pr(i),void 0===(n=t.yut.BHt).Get?[3,3]:this.pVt.zUt(t.$Ot)?[3,2]:[4,kr(this.pVt.XUt(t.$Ot),i)];case 1:h.sent(),h.label=2;case 2:return r=this.pVt.$Ut(n.Get,n).rF(),[3,4];case 3:r=n.CO,h.label=4;case 4:return e=d$(n,r),s=l$(n,e),o={Km:"yut",lk:t.yut.lk,iat:this.azt[0],VHt:e,HHt:s,CO:r,ct:null!=(u=n.ct)?u:0,EU:0,$Ot:t.$Ot,fLt:t.fLt,BHt:t.yut.BHt},this.Wqt(o),[2]}})}).call(this)},i}(v$);function w$(t,i){for(var n,r=function(){var r=n.value,s=r.CO;if(r.fLt.sLt.iFt&&aY(r.yut))s=0;else{var u=function(t){return r.fLt===t.fLt&&cY(t.yut,r.yut)},o=Wn(t,u);if(void 0!==o)s=A.min(s,o.RO);else{var h=Wn(i,u);void 0!==h&&(s=A.min(s,h._Ht.An(0)))}}e=e.HM(LA.nL(s,r.RO))},e=LA.rL(),s=Ft(t);!(n=s()).done;)r();return e}V(),It(),Ut();var m$=.001,p$=function(){function t(t,i,n,r,e,s){this.Pzt=void 0,this.Rzt=void 0,this.Izt=void 0,this.Dzt=void 0,this.Nzt=void 0,this.Mz=void 0,this.xzt=void 0,this.Pzt=t,this.Rzt=i,this.Izt=n,this.Dzt=r,this.Nzt=e,this.Mz=s,this.xzt=[]}var i=t.prototype;return i.MWt=function(t){this.Pzt.MWt(t)},i.Czt=function(t){for(var i,n=function(t){var n=i.xzt[t];if(!BY(n))throw new y("Invalid state");var r=Xn(e,function(t){return t.Km===n.Km});r>=0&&!n.AHt?(n.kHt(e[r]),$n(e,r)):$n(i.xzt,t)},r=this.xzt.length>0,e=t.slice(),s=this.xzt.length-1;s>=0;s--)i=this,n(s);for(var u,o=Ft(e);!(u=o()).done;){var h=u.value,a=new RY(h);this.xzt.push(new xY(h.Km,h,this.Rzt,a,this,this.Dzt,this.Nzt))}r&&e.length>0&&this.Rzt.jy();var c=t.map(function(t){return t.Km});this.Izt.czt(c)},i.iJ=function(t){var i,n=(null==(i=this.Mz)?void 0:i.iJ(t))||!1;return n&&(this.Zg(),this.Rzt.jy()),n},i.Bzt=function(t){var i=this.xzt[0];if(void 0!==i){if(i.Km!==vw.LT||i.yCt)throw new y("Invalid state");if(!i.AHt)return void i.kHt(t)}var n=new RY(t),r=new xY(vw.LT,t,this.Rzt,n,this,void 0,void 0);this.xzt=[r]},i.Bat=function(){for(var t,i=Ft(this.xzt);!(t=i()).done;){t.value.mHt.fHt()}},i.Tdt=function(t){var i=this.Mzt.iL(t,m$);return i?i.An(i.V-1):t},i.KWt=function(t){return!!this.Mzt.iL(t,m$)||this.Pzt.KWt(t)},i.Ozt=function(t){return this.Lzt.Cr(t,m$)},i.Fzt=function(t,i,n){for(var r,e=Ft(this.xzt);!(r=e()).done;){var s=r.value.mHt,u=s.Npt;if(void 0!==u&&i>=u&&!s.Fx.MM().Cr(u))return!0}return i-t0){var i=this.xzt[0].mHt.uHt;if(i&&this.xzt.every(function(t){return t.mHt.uHt===i}))return i}}},{key:"Mzt",get:function(){var t,i=w$(this.Rzt.Mqt.concat(this.Rzt.Oqt),nr(this.xzt,function(t){return t.mHt.bct})).MM();if(0===this.xzt.length)t=i;else{t=LA.hL();for(var n,r=Ft(this.xzt);!(n=r()).done;){var e=n.value;t=t.Mn(e.mHt.Fx)}for(var s,u=Ft(this.xzt);!(s=u()).done;){var o=s.value;t=t.qM(o.wHt)}t=t.HM(i)}return t.VM(m$)}},{key:"Lzt",get:function(){var t,i=w$(this.Rzt.Oqt,nr(this.xzt,function(t){return t.mHt.bct})).MM();if(0===this.xzt.length)t=i;else{t=LA.hL();for(var n,r=Ft(this.xzt);!(n=r()).done;){var e=n.value;t=t.Mn(e.mHt.Fx)}t=t.HM(i)}return t}}]),t}();V(),It(),Dt();var y$=function(t){function i(){return t.call(this,_G.iLt)||this}return Pt(i,t),i}(ah);V(),It(),Dt();var _$=function(t){function i(){return t.call(this,_G.$Mt)||this}return Pt(i,t),i}(ah);V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Bt(),Dt(),Yt();var k$="LazyMediaBuffer",b$=function(t){function i(i,n){var r;return(r=t.call(this)||this).Vp=void 0,r.zzt=void 0,r.jS=void 0,r.Wrt=void 0,r.Wzt=void 0,r.KY=void 0,r.ZY=void 0,r.q3=void 0,r.Vp=i,r.zzt=n,r.jS=void 0,r.Wrt=void 0,r.Wzt=new Xa,r.KY=20,r.ZY=30,r.q3=new vC,r}Pt(i,t);var n=i.prototype;return n.G3=function(t,i){OG.OLt(k$,"Marking gap from "+t+" to "+i+"."),this.q3.r$(t,i),this.Wrt&&this.Wrt.G3(t,i)},n.X3=function(t,i){OG.OLt(k$,"Removing gap from "+t+" to "+i+"."),this.q3.h$(t,i),this.Wrt&&this.Wrt.X3(t,i)},n.Hzt=function(t){this.Wrt=t,this.Wrt.zY=this.ZY,this.Wrt.VY=this.KY;for(var i=this.q3.s$,n=0;n0?s:e;switch(n.WY.type){case vR.BANDWIDTH:var o=n.jY,h=u.filter(function(t){return t.IW<=o});if(h.length>0)return er(h,function(t){return t.IW});case vR.PERFORMANCE:return rr(u,function(t){return t.IW});case vR.QUALITY:return er(u,function(t){return t.IW})}}function D$(t,i){for(var n,r=function(){var i=n.value,r=t.filter(function(t){return t.Rrt&&t.Rrt.q9&&vP(t.Rrt.q9,i)});return 0===r.length?"continue":{v:r}},e=Ft(i);!(n=e()).done;){var s=r();if("object"===W(s))return s.v}}function N$(t,i){return t.filter(function(t){return x$(t,i)})}function x$(t,i){var n=i+2e3,r=0===t.fFt.length||t.fFt.some(function(t){return t.sLt.bUt0&&this.Xx(i.Tn(0),{gGt:!1}),this.bGt?[3,2]:[4,this.RGt()];case 1:n.sent(),n.label=2;case 2:return this.tkt(),[4,t];case 3:return n.sent(),this.tEt(),[2]}})}).call(this)},n.tkt=function(){if(this.bGt&&this.$kt){if(!this.Skt()){var t,i=null==(t=this.vLt)?void 0:t.sLt;if(null==i?void 0:i.iFt){var n=!0,r=0,e=i.Tn;if(!this.$kt&&e&&(n=!e.zOt,(r=e.qOt)<0)){var s=i.sUt;r+=s.An(s.V-1)}this.SGt(r,{iq:n})}else this.SGt(1/0,{iq:!0})}this.NGt()&&this.SGt(1/0,{iq:!0})}},n.Skt=function(){var t,i=this.Tkt;if(0===i.V)return!0;var n=this.zx,r=null==(t=this._Lt)?void 0:t.BGt,e=null==r?void 0:r.zM(n);return(e&&e>0?r.An(e):n)>=i.Tn(0)},n.NGt=function(){var t=this.zx;return G$(t,this.CLt)||G$(t,this.DLt)},n.OEt=function(){this.nq=void 0,this.rq=void 0},n.Qq=function(t){this.nq||(Er(this.hr()),this.nq=pw(t),this.rq=t,this.So(new Cb(t)))},n.be=function(){OG.cN(V$,"Showing the player."),this.PL.be()},n.JP=function(){throw new y("Not implemented")},n.ZP=function(){throw new y("Not implemented")},n.$P=function(){},n.tI=function(){this.bGt&&Er(this.MGt({tI:!0}))},n.Ta=function(t,i,n){return jt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:r={stack:[],error:void 0,hasError:!1},h.label=1;case 1:return h.trys.push([1,9,10,11]),OG.cN(V$,"Setting the player source to "+t.src+"."),this.OEt(),this._Lt?[4,this.hr()]:[3,3];case 2:h.sent(),pr(n),h.label=3;case 3:return aT(t)?[2]:(e=Xt(r,dr.ep([n]),!1),this.pq.BW(t.contentProtection),void 0===this.EGt||this.EGt.Mc!==t?[3,4]:(this._Lt=this.EGt,this._Lt.mn(W$,this.LGt),this.uV=this.OGt,this.uV.$g(e.Yg),this.OGt=new dr,this.FGt=void 0,null==(s=this.UGt)||s.Zg(),this.UGt=void 0,this.EGt=void 0,this.VGt=!1,this.HGt!==this._Lt&&(this.HGt=void 0),this._Lt.WGt(this.PL),[3,8]));case 4:return void 0===this.EGt?[3,7]:[4,this.CP()];case 5:return h.sent(),[4,this.qGt()];case 6:h.sent(),h.label=7;case 7:this.uV=dr.ep([e.Yg]),this._Lt=this.zGt(t,i,void 0,this.PL),h.label=8;case 8:return this._Lt.wn(W$,this.Rs),this._Lt.wn(_G.iLt,this.GGt),this.tO.OI=this._Lt.ht,this.sO.OI=this._Lt.rt,this.XGt.OI=this._Lt.nt,(u=this._Lt.jGt)&&(this.JW=new BH(this,this.PL,u),this.JW.Rt=!0,this.Lz.Ea(this.JW)),Oy(this.Gl),this.QGt(),this.Xkt(),this.KGt.forEach(this.Rs),this.KGt=[],this.RGt(),e.zg(),[3,11];case 9:return o=h.sent(),r.error=o,r.hasError=!0,[3,11];case 10:return Gt(r),[7];case 11:return[2]}})}).call(this)},n.IP=function(t,i,n,r){return jt(function(){return zt(this,function(e){switch(e.label){case 0:return pr(r),void 0===this.EGt?[3,2]:[4,this.CP()];case 1:e.sent(),e.label=2;case 2:return pr(r),this.EGt=this.zGt(t,i,n,void 0),this.EGt.wn(W$,this.LGt),[2]}})}).call(this)},n.CP=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return void 0===this.EGt?[2]:(this.OGt.Zg(),null==(t=this.UGt)||t.Zg(),this.UGt=void 0,void 0===this.FGt?[3,2]:[4,this.FGt.catch(pn)]);case 1:i.sent(),this.FGt=void 0,i.label=2;case 2:return[4,this.EGt.zg()];case 3:return i.sent(),this.OGt=new dr,this.HGt===this.EGt&&(this.HGt=void 0),this.EGt=void 0,this.VGt=!1,this.KGt=[],[2]}})}).call(this)},n.zGt=function(t,i,n,r){return null!=this.YGt||(this.YGt=this.JGt.jet()),new X$(this,t,i,this.aV,this.Mz,this.ZGt,this.Sut,this.$Gt,this.XHt,this.YGt,this.Ndt,n,r)},n.RGt=function(){return this.Ypt=this.tXt(this.Ypt,this.uV.Yg).catch(this.Lmt),this.Ypt},n.tXt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return t?[4,t]:[3,2];case 1:r.sent(),pr(i),r.label=2;case 2:return this._Lt?(n=this.oq)===uS.HL||this.d9?[4,this.iXt(i)]:[3,5]:[2];case 3:return r.sent(),[4,this.eXt(i)];case 4:return r.sent(),[3,7];case 5:return n!==uS.zU?[3,7]:[4,this.iXt(i)];case 6:r.sent(),r.label=7;case 7:return[2]}})}).call(this)},n.iXt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return pr(t),void 0===this._Lt||this._Lt.DGt?[2]:[4,this._Lt.iXt(t)];case 1:return i.sent(),this.Cq.zV(),this.QGt(),[2]}})}).call(this)},n.QGt=function(){var t;if(!this.JW){var i=null==(t=this._Lt)?void 0:t.jGt;i&&(this.JW=new BH(this,this.PL,i),this.Lz.Ea(this.JW))}},n.eXt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return pr(t),this.bGt?[2]:(this.bGt=!0,[4,this._Lt.MGt(this.CLt,this.DLt,this.cGt,{nXt:!0})]);case 1:return i.sent(),[2]}})}).call(this)},n.rXt=function(){var t=this.EGt;return void 0===t?ot.resolve():(0===t.EU&&(t.EU=this._Lt.EU+this._Lt.ct),null!=this.UGt||(this.UGt=new Xa),void 0===this.FGt&&(this.FGt=t.iXt(this.OGt.Yg),this.UGt.$g(this.FGt)),this.UGt.Yy)},n.hXt=function(){var t;return(null!=(t=this.UGt)?t:this.UGt=new Xa).Yy},n.mGt=function(t){return this.xGt(t,this.PL.zx)},n.xGt=function(t,i){var n=i;return t===this._Lt&&void 0!==this.EGt&&this.EGt.EU>0&&(n=A.min(n,this.EGt.EU)),void 0!==t&&(n=A.max(0,n-t.EU)),n},n.IGt=function(){return void 0!==this.EGt&&0!==this.EGt.EU&&(!!this.VGt&&this.PL.zx+.25>=this.EGt.EU)},n.uXt=function(){var t,i;return{Ti:this.PL.Ti,Mi:this.PL.Mi,qLt:Kq(this.PL),udt:null==(i=this.bt)||null==(t=i.abr)?void 0:t.restrictToPlayerSize}},n.cXt=function(){return new C$(this.aq)},n.MGt=function(t){void 0===t&&(t={});var i={bLt:t.bLt||!1,SLt:t.SLt||!1,ALt:t.ALt||!1,tI:t.tI||!1,nXt:t.nXt||!1},n=[this.TGt,this.k9].filter(Fi);return this.T9.Zg(),this.T9=new dr,this.T9.$g(this.uV.Yg),this.dXt.Zg(),this.dXt=new dr,this.dXt.$g(this.uV.Yg),this.TGt=br(this.lXt(n,i,this.dXt.Yg),this.dXt).catch(this.kGt),this.TGt},n.lXt=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f,v;return zt(this,function(d){switch(d.label){case 0:return this.bGt?[3,2]:[4,this._Lt.fXt(n)];case 1:return d.sent(),[2];case 2:return[4,ot.all(t.map(function(t){return t.catch(pn)}))];case 3:return d.sent(),[4,this.vXt()];case 4:return d.sent(),this._Xt(),[4,this.gXt(n)];case 5:return d.sent(),[4,this.pXt(i.SLt,i.ALt)];case 6:return d.sent(),pr(n),[4,this._Lt.mXt()];case 7:return u=d.sent(),pr(n),[4,this.wXt(u,i.tI,n)];case 8:return o=d.sent(),h=null==(r=this.aq)?void 0:r.e4,a=null==(e=this.aq)?void 0:e.s4,this._Lt.yXt(void 0!==h,void 0!==a,i.bLt||o,i.SLt,i.ALt),this._Lt.bXt(i.bLt),void 0!==this.EGt&&(this.EGt.yXt(void 0!==h,void 0!==a,i.bLt||o,i.SLt,i.ALt),this.EGt.bXt(i.bLt)),this._Lt.Czt(h,a),void 0===this.EGt?[3,10]:[4,this.EGt.mXt()];case 9:(c=d.sent())&&this.aq&&this.aq.IZ(c)?(this.EGt.Czt(h,a),this.VGt=!0):(this.EGt.Czt(void 0,void 0),this.VGt=!1),d.label=10;case 10:this.AXt(),pr(n),d.label=11;case 11:return d.trys.push([11,13,,14]),[4,ot.all([this._Lt.SXt(n),null==(f=this.EGt)?void 0:f.SXt(n)].filter(Fi))];case 12:return d.sent(),[3,14];case 13:return yr(d.sent()),[3,14];case 14:if(pr(n),this.V4(),this._Lt.BUt(),null==(s=this.EGt)||s.BUt(),void 0!==this.pGt)return this.SGt(this.pGt,this.wGt),[2];if(!this.$kt){if(v=this._Lt.TXt)return this.SGt(v.YF,{iq:v.iq}),[2];if(this._Lt.EU>0)return this.SGt(0,{iq:!1}),[2]}return this.oXt.length>0&&this.kXt(),[2]}})}).call(this)},n.wXt=function(t,i,n){return jt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return i||!this.aq?[3,3]:t?this.aq.IZ(t)?[4,this.gXt(n)]:[3,3]:[2,!1];case 1:return h.sent(),[4,this.aq.RZ(t)];case 2:return h.sent(),[2,!1];case 3:for(r=Ft(this._Lt.aXt);!(e=r()).done;)e.value.Ezt.forEach(function(t){return t.Zg()});this.PL.G7(),h.label=4;case 4:return h.trys.push([4,,10,11]),this.aq?[4,this.PL.hr()]:[3,6];case 5:h.sent(),h.label=6;case 6:return t?[4,this.PL.Un(t)]:[3,8];case 7:return s=h.sent(),[3,9];case 8:u=void 0!==this.CLt,o=void 0!==this.DLt,s=new T$(this.PL,u,o),h.label=9;case 9:return this.EXt(s),[3,11];case 10:return this.PL.X7(),[7];case 11:return[2,!0]}})}).call(this)},n.EXt=function(t){this.aq=t,this.V4(),this.WTt(),this.qTt()},n.V4=function(){var t,i,n=this.aq,r=void 0!==this.EGt&&this.VGt?this.EGt:this._Lt;if(n&&void 0!==r&&(r!==this.HGt||E(n.ct))){var e;r!==this.HGt&&n.I3();var s=(null!=(e=r.xXt)?e:NaN)+r.EU;s>0&&n.F4(s),this.HGt=r}null==(t=this._Lt)||t.BUt(),null==(i=this.EGt)||i.BUt()},n.pXt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.aq?(n=[],t&&this.aq.e4&&n.push(this.aq.e4.pS(0,1/0)),i&&this.aq.s4&&n.push(this.aq.s4.pS(0,1/0)),[4,ot.all(n)]):[2];case 1:return r.sent(),[2]}})}).call(this)},n.WTt=function(){var t=this.aq;t&&(t.s4&&(t.s4.VY=this.Mz.YY),t.e4&&(t.e4.VY=this.Mz.YY))},n.qTt=function(){var t=this.aq;t&&(t.s4&&(t.s4.zY=this.Mz.zY),t.e4&&(t.e4.zY=this.Mz.zY))},n.AXt=function(){var t,i,n,r,e=void 0!==(null==(t=this.aq)?void 0:t.e4),s=void 0!==(null==(i=this.aq)?void 0:i.s4);null==(n=this._Lt)||n.AXt(e,s),null==(r=this.EGt)||r.AXt(e,s)},n.E9=function(t,i,n,r){return jt(function(){var e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,ot.all(t.map(function(t){return t.catch(pn)}))];case 1:return o.sent(),pr(r),[4,this.vXt()];case 2:return o.sent(),pr(r),this.pGt=void 0,this.yGt=void 0,this.$kt=!0,e=n.zOt?this.sUt:this.Tkt,s=e.LM(i)+this._Lt.EU,u=this.PL.ww(ch.Zw,r),this.PL.Oy(s,n.iq),this.bGt&&this._Lt.aXt.length>0&&(this.Br.AM.lVt(),this.PXt(this.zx),this.kXt()),[4,u];case 3:return o.sent(),this.tEt(),[2]}})}).call(this)},n.tEt=function(){var t=this.JW;if(void 0!==t){var i=this.OL;if(!this.lP&&!this.xP&&void 0!==i)i0?(this.oXt.forEach(function(t){return t.Uzt()}),[4,this._Nt()]):[3,2];case 1:t.sent(),this.vNt(),this.oXt.forEach(function(t){return t.Pzt.eqt()}),t.label=2;case 2:return[2]}})}).call(this)},n.vNt=function(){var t=this;if(!this.BXt){var i=function(){t.BXt=void 0};this.MXt=new dr,this.MXt.$g(this.uV.Yg),this.BXt=br(this.LXt(this.MXt.Yg),this.MXt).catch(this.kGt).then(i,i)}},n._Nt=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return null==(t=this.MXt)||t.Zg(),i=this.BXt,this.BXt=void 0,i?[4,i]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(this)},n.LXt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return pr(t),[4,this.OXt(this._Lt,t)];case 1:return i.sent(),pr(t),void 0===this.EGt?[3,4]:[4,kr(this.rXt(),t)];case 2:return i.sent(),pr(t),[4,this.OXt(this.EGt,t)];case 3:i.sent(),i.label=4;case 4:return[2]}})}).call(this)},n.OXt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f,v,d,l,g,w,m,p,y,_;return zt(this,function(k){switch(k.label){case 0:pr(i),n=t.aXt,k.label=1;case 1:0,r={stack:[],error:void 0,hasError:!1},k.label=2;case 2:for(k.trys.push([2,4,5,6]),e=[],s=A.max(0,this.PL.zx-t.EU),u=Ft(n);!(o=u()).done;)if(h=o.value,a=h.Pzt,c=h.Tdt(s),a.yCt)e.push(a.EHt());else if(h.Fzt(s,c,this.Mz.YY)||a.qWt){if(f=a.fLt.sLt,void 0===(v=a.YWt(c))){if(f.iFt)continue;(d=f.bct).length&&d[0].CO>c&&(this.zx=1/0),a.rqt(),a.$Wt(c,i)}else l=v[0],g=v[1],a.Lat(l,g,h.uHt),h.Izt.lzt(l,g);e.push(a.EHt())}if(w=Xt(r,dr.ep([i]),!1),0===e.length){for(n.every(function(t){return t.Pzt.jCt})||e.push(this.PL.ww(ch.py,w.Yg)),m=Ft(n);!(p=m()).done;)void 0!==(y=p.value).Pzt.zWt()&&e.push(y.Izt.ww([f$.Zqt,f$.ezt],w.Yg));if(0===e.length)return[3,7]}return[4,kr(ot.race(e),w.Yg)];case 3:return k.sent(),[3,6];case 4:return _=k.sent(),r.error=_,r.hasError=!0,[3,6];case 5:return Gt(r),[7];case 6:return[3,1];case 7:return[2]}})}).call(this)},n.RXt=function(){var t=this;if(!this.FXt){var i=function(){t.FXt=void 0};this.UXt=new dr,this.UXt.$g(this.uV.Yg),this.FXt=br(this.VXt(this.UXt.Yg),this.UXt).catch(this.kGt).then(i,i)}},n.IXt=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return null==(t=this.UXt)||t.Zg(),i=this.FXt,this.FXt=void 0,i?[4,i]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(this)},n.VXt=function(t){return jt(function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:pr(t),i=this.oXt,a.label=1;case 1:for(n=[],r=Ft(i);!(e=r()).done;)s=e.value,u=s.Pzt,(o=s.Izt).yCt?n.push(o.EHt()):(h=u.zWt())?"yut"===h.Km?(o.gzt(h),n.push(o.EHt())):"YOt"===h.Km?(o.fzt(h),n.push(o.EHt())):"wqt"===h.Km&&(o.mzt(h),n.push(o.EHt())):n.push(u.sqt());return 0!==n.length?[3,2]:[3,5];case 2:return[4,kr(ot.race(n),t)];case 3:a.sent(),a.label=4;case 4:return[3,1];case 5:return[2]}})}).call(this)},n.DXt=function(){var t=this;if(!this.HXt){this.WXt=new dr,this.WXt.$g(this.uV.Yg);var i=function(){t.HXt=void 0};this.HXt=br(this.qXt(this.WXt.Yg),this.WXt).catch(this.kGt).then(i,i)}},n.CXt=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return null==(t=this.WXt)||t.Zg(),i=this.HXt,this.HXt=void 0,i?[4,i]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(this)},n.qXt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return pr(t),[4,this.zXt(this._Lt,t)];case 1:return i=n.sent(),void 0!==this.EGt&&this.VGt&&i?(pr(t),[4,kr(this.hXt(),t)]):[3,4];case 2:return n.sent(),pr(t),this.V4(),[4,this.zXt(this.EGt,t)];case 3:i=n.sent(),n.label=4;case 4:return i?this.aq.F3():this.aq.I3(),[2]}})}).call(this)},n.zXt=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:r=function(){var r,e,s,u,o,h,a,c,f,v,d,l,g;return zt(this,function(w){switch(w.label){case 0:for((r=t.aXt).forEach(function(t){return t.Bat()}),e=A.max(0,n.PL.zx-t.EU),s=[],u=[],o=Ft(r);!(h=o()).done;)for(a=h.value,c=a.Izt,f=Ft(a.Ezt);!(v=f()).done;)d=v.value,l=BY(d)?s:u,d.yCt?l.push(d.EHt()):d.xHt(e)||((g=c.Szt(d.Km))?"yut"===g.Km&&g.$Ot===n._Gt?(d.Pdt(g),l.push(d.EHt())):"rRt"===g.Km&&g.$Ot===n._Gt?(d.J2(g),l.push(d.EHt())):"wqt"===g.Km&&(d.UHt(g),l.push(d.EHt())):u.push(c.Tzt(d.Km)));return 0!==s.length?[3,2]:[4,n.GXt(t,r,e,i)];case 1:if(w.sent())return[2,"continue"];w.label=2;case 2:return 0===s.length&&0===u.length?[2,{v:r.every(function(t){return t.Ezt.length>0&&t.Ezt.every(function(t){return t.xHt(e)})})}]:[4,kr(ot.race([].concat(s,u)),i)];case 3:return w.sent(),[2]}})},s.label=1;case 1:return n=this,[5,qt(r())];case 2:return"object"===W(e=s.sent())?[2,e.v]:[3,1];case 3:return[2]}})}).call(this)},n.GXt=function(t,i,n,r){return jt(function(){var e,s,u,o,h,a,c,f,v,d,l,g,w,m,p,y,_,k,b,A,T,S;return zt(this,function(E){switch(E.label){case 0:for(e=[],s=[],u=Ft(i);!(o=u()).done;)for(h=o.value,a=h.Tdt(n),c=Ft(h.Ezt);!(f=c()).done;)if(BY(v=f.value))if(void 0!==(d=h.Izt.Szt(v.Km))){if(d.$Ot===this._Gt)return[2,!1];e.push(d)}else{if(h.yCt||h.Fzt(n,a,this.Mz.YY)||!v.PHt(n,a))return[2,!1];void 0!==(l=v.mHt.uHt)&&s.push(l)}return 0===e.length?[2,!1]:(g=er(e,function(t){return t.$Ot}).$Ot,e.every(function(t){return"rRt"===t.Km&&t.$Ot===g})?(w=rr(e,function(t){return t.CO}).CO+t.EU,m=[].concat(e,s),[4,this.XXt(m)]):[3,6]);case 1:return p=E.sent(),this.jXt(p)?(OG.OLt(LG,"Seamless switch from",this.aq.Cd,"to",p),[4,this.aq.RZ(p)]):[3,3];case 2:return E.sent(),OG.OLt(LG,"Seamless switch complete."),[3,5];case 3:return[4,this.QXt(t,w,p,r)];case 4:E.sent(),E.label=5;case 5:return this._Gt=e[0].$Ot,[3,7];case 6:for(y=Ft(i);!(_=y()).done;)for(k=_.value,b=Ft(k.Ezt);!(A=b()).done;)for(T=A.value,S=k.Izt.Szt(T.Km);void 0!==S&&("rRt"!==S.Km||S.$Ot!==g);)OG.OLt(LG,"Removing append for other discontinuity, expecting "+g,S),k.Izt.RHt(S),S=k.Izt.Szt(T.Km);E.label=7;case 7:return[2,!0]}})}).call(this)},n.jXt=function(t){var i,n;switch(null!=(n=null==(i=this.bt)?void 0:i.seamlessSwitchStrategy)?n:QA.HL){case QA.WL:return!0;case QA.qL:return!1;default:return this.aq.IZ(t)}},n.XXt=function(t){return jt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return i=t.map(function(t){return t.kzt.Rrt}),n=i.map(function(t){return{GT:t}}),r=[].concat(nr(t,function(t){return t.kzt.UW}),this.Br.fVt),[4,aQ((e=this.bt).contentProtection,i,r,this.aV,e.useCredentials)];case 1:return 0===(s=u.sent()).length&&this.aq&&this.aq.Cd.fq.length>0&&(s=this.aq.Cd.fq),[2,{Km:Ly.SV,q4:n,fq:s,t5:e.useManagedMediaSource}]}})}).call(this)},n.QXt=function(t,i,n,r){return jt(function(){var e,s,u,o,h,a,c,f,v,d;return zt(this,function(l){switch(l.label){case 0:if(o=this.aq,h=o.ct,!(a=this.PL.Fx.V>0&&this.PL.zx=i}return this.PL.Qx||this.IGt()}},{key:"lt",get:function(){return this.nq}},{key:"Jx",get:function(){return this.rq}},{key:"$x",get:function(){}},{key:"iP",get:function(){}},{key:"sP",get:function(){return!1}},{key:"rP",get:function(){var t,i;return io({},{rO:0,hO:0,oO:0,aO:0,uO:0,cO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.PL.hP(),{uO:null!=(i=null==(t=this._Lt)?void 0:t.uO)?i:0,aO:this.Mz.CY.IW})}},{key:"Br",get:function(){var t;return null==(t=this._Lt)?void 0:t.Br}},{key:"CGt",get:function(){var t;return null==(t=this._Lt)?void 0:t.CGt}},{key:"oP",get:function(){return this.PL.oP},set:function(t){this.PL.oP=t}},{key:"cP",get:function(){var t,i;return null==(i=null==(t=this._Lt)?void 0:t.cP)||i}},{key:"lP",get:function(){return this.PL.lP}},{key:"vP",get:function(){return this.PL.vP},set:function(t){OG.cN(V$,"Setting playback rate to "+t+"."),this.PL.vP=t}},{key:"pP",get:function(){return this.Dkt._s()}},{key:"Dkt",get:function(){var t=this.PL.pP;return void 0!==this._Lt&&(t=t.Ly(-this._Lt.EU).Mn(LA.hL())),t}},{key:"wP",get:function(){return this.oq},set:function(t){this.oq!==t&&(this.oq=t,this.RGt())}},{key:"AP",get:function(){var t,i=this.PL.AP;return(null==(t=this._Lt)?void 0:t.DGt)&&(i=A.max(jy.Qn,i)),i}},{key:"sUt",get:function(){var t,i;return null!=(i=null==(t=this._Lt)?void 0:t.sUt)?i:LA.rL()}},{key:"kP",get:function(){return this.Tkt._s()}},{key:"Tkt",get:function(){var t,i,n=null!=(i=null==(t=this._Lt)?void 0:t.kP)?i:LA.rL();if(0===n.V)return n;if(this.aq&&this.fGt&&this.aq.ct!==1/0&&(n=new LA([n.Tn(0),this.xGt(this._Lt,this.aq.ct)])),this._Lt&&!this._Lt.iFt){var r=this.Dkt,e=n.An(n.V-1);if(r.V>0&&r.An(r.V-1)>e){var s=r.An(r.V-1),u=this._Lt.sUt;u&&u.V>0&&(s=A.min(s,u.An(u.V-1))),n=n.HM(new LA([e,s]))}}return n}},{key:"xP",get:function(){var t;return null!=(t=this.yGt)?t:this.PL.xP}},{key:"uq",get:function(){}},{key:"nt",get:function(){return this.Gl}},{key:"rt",get:function(){return this.sO}},{key:"DP",get:function(){var t,i;return this.PL.DP||(null==(i=this.vLt)||null==(t=i.RRt)?void 0:t.Mi)||0}},{key:"MP",get:function(){var t,i;return this.PL.MP||(null==(i=this.vLt)||null==(t=i.RRt)?void 0:t.Ti)||0}},{key:"OP",get:function(){return this.PL.OP},set:function(t){OG.cN(V$,"Setting volume to "+t+"."),this.PL.OP=t}},{key:"VP",get:function(){return this.Lz}},{key:"WP",get:function(){return!1},set:function(t){}},{key:"dq",get:function(){return this.lq}},{key:"sXt",get:function(){return this.bGt}},{key:"oXt",get:function(){return void 0===this._Lt?[]:void 0===this.EGt?this._Lt.aXt:this._Lt.aXt.concat(this.EGt.aXt)}}]),i}(uh),X$=function(t){function i(i,n,r,e,s,u,o,h,a,c,f,v,d){var l,g,w,m;l=t.call(this)||this,(g=l).oa=void 0,g.Mc=void 0,g.aV=void 0,g.ZGt=void 0,g.Mz=void 0,g.Sut=void 0,g.$Gt=void 0,g.XHt=void 0,g.YGt=void 0,g.Ndt=void 0,g.wjt=void 0,g.iV=void 0,g.tO=new fw,g.sO=new fw,g.Gl=new Fb([]),g.Sjt=void 0,g.Aq=void 0,g.Opt=void 0,g.kq=void 0,g.ENt=void 0,g.nEt=void 0,g.Ajt=void 0,g.uV=void 0,g.Bjt=void 0,g.Ljt=void 0,g.Ojt=void 0,g.Rjt=void 0,g.Kjt=[],g.cjt=void 0,g.djt=void 0,g.ljt=void 0,g.fjt=void 0,g.B4=void 0,g.M4=void 0,g.cQt=void 0,g._jt=void 0,g.gjt=void 0,g.tQt=void 0,g.ASt=!0,g.Hjt=0,g.Vjt=!1,g.H4=LA.rL(),g.Mkt=!1,g.Ekt=0,g.DDt=void 0,g.vjt=[],g.QU=0,g.aHt=function(){g.BUt()},g.fQt=function(t){Er(g.jjt(t.fLt,g.uV.Yg))},g.retryOfflineRenditionsCallback=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return g.fjt!==t&&g.djt!==t&&g.ljt!==t?[2]:[4,g.nEt.jVt(t,i)];case 1:return n.sent(),t.sLt.bUt=-1/0,[2]}})})()},g.hQt=function(t){var i=g.cjt,n=null==i?void 0:i.cFt;if(g.nEt.rHt(t.Rrt,t.fLt.sLt),!n&&(g.nEt.hHt(t.Rrt,t.fLt.sLt),g.Zjt(),i)){var r=void 0!==g.djt&&!Jn(i.lFt,g.djt),e=void 0!==g.ljt&&!Jn(i.fFt,g.ljt);(r||e)&&g.MGt(r?void 0:g.djt,e?void 0:g.ljt,g.fjt).catch(pn)}},g.oQt=function(t){var i=g.vQt(t.fLt);void 0!==i&&(i.Olt=t.Olt)},g.aQt=function(t){var i=g.vQt(t.fLt);void 0!==i&&(i.byt=t.izt.rF())},g.vQt=function(t){for(var i,n=Ft(g.sO.NI);!(i=n()).done;){var r=i.value.TLt(t);if(void 0!==r)return r}},g.uQt=function(t){g.nEt.sHt(t.fLt)},g.nQt=_n(function(t){t.Gk===vw.Mk&&g.dQt()&&Er(g.lQt())},200),g.rQt=function(t){var i;g.Ekt+=t.DWt;var n=g.sO.V>0?t.Gk===vw.Mk:t.Gk===vw.Bk;"yut"===t.RWt&&n&&Er(g.qjt()),g.So(new VM(function(t){if(t){if(void 0!==t.iAt){var i,n,r=t.iAt.Tn+(null!=(n=t.iAt.V)?n:0);return{Yu:t.XE,Wat:[null==(i=t.iAt)?void 0:i.Tn,r],Xk:!0}}return{Yu:t.XE.toString()||"",Xk:!0}}return{Yu:"",Xk:!0}}(t.uri),(null==(i=g.cjt)?void 0:i.IW)||0,t.mediaSequenceNumeber,t.mediaTrackId,t.Gk,t.httpStatusCode,t.DWt))},g.oa=i,g.Mc=n,g.aV=e,g.Mz=s,g.ZGt=u,g.Sut=o,g.$Gt=h,g.XHt=a,g.YGt=c,g.Ndt=f,g.wjt=v,g.iV=null!=d?d:new hW,g.uV=new dr;var p=null!=(m=null==(w=n.latencyConfiguration)?void 0:w.targetOffset)?m:n.liveOffset;return g.nEt=new kY(g.aV,g.Sut,n.useCredentials,Vi.Pm(n.src),p),g.nEt.wn(_Y.IVt,g.aHt),g.nEt.wn(_Y.CVt,g.fQt),g.nEt.wn(z$,g.Rs),g.Sjt=new U$(g,g.iV),g.Gl.qW(g.Sjt.Z),n.hlsDateRange&&(g.Ajt=new EY(g.nEt,g.iV),g.Gl.qW(g.Ajt.Z)),r.textTracks&&(g.Aq=new Ey(g.iV,g.aV),g.Gl.qW(g.Aq.Z),g.mq(r.textTracks)),!Jn(n.ignoreEmbeddedTextTrackTypes,jw.CEA608)&&(g.ENt=new KF(g.iV),g.Gl.qW(g.ENt.Z)),!Jn(n.ignoreEmbeddedTextTrackTypes,jw.EMSG)&&(g.Opt=new DH(g.iV),g.kq=new Ry(g.iV,g.Opt.Z),g.Gl.qW(g.Opt.Z),g.Gl.qW(g.kq.Z)),l}Pt(i,t);var n=i.prototype;return n.BUt=function(){var t,i,n=function(t){if(0===t.length)return LA.rL();for(var i,n,r=0,e=Ft(t);!(n=e()).done;){var s=n.value.sLt.kP;s.V>0&&(i=i?i.Mn(s):s,r=A.max(r,s.Tn(0)))}if(!i)return LA.rL();if(i.V>0)return i;return LA.sL(r)}(this.vGt);0!==n.V&&(this.H4=n,null==(t=this.Opt)||t.jU(n.Tn(0)),null==(i=this.ENt)||i.jU(n.Tn(0)))},n.ajt=function(t){var i=[];if(this.cjt)for(var n,r=Ft(this.aXt);!(n=r()).done;)for(var e,s=Ft(n.value.Ezt);!(e=s()).done;){var u=e.value.IHt(t);u&&!Jn(i,u)&&i.push(u)}ir(this.vjt,i)||(this.vjt=i,this.So(new IY))},n.mq=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;r.src&&this.Aq.hV(r)}},n.qlt=function(){var t,i,n=function(){var i=u.value,n=new Aw,r=[];n.gO(new DG(o,i)),r.push(i);for(var e,s=Ft(h);!(e=s()).done;){var a=e.value,c=Wn(a.lFt,function(t){return bG(t,i)&&!EG(r,t)});c&&(n.gO(new DG(a,c)),r.push(c))}t.tO.tt(new RG(t,t.Mz,t.tO,n))},r=function(){var t=c.value,n=new Aw,r=[];n.gO(new NG(o,t)),r.push(t);for(var e,s=Ft(h);!(e=s()).done;){var u=e.value,a=Wn(u.fFt,function(i){return bG(i,t)&&!EG(r,i)});a&&(n.gO(new NG(u,a)),r.push(a))}i.sO.tt(new CG(i,i.Mz,i.sO,n))},e=this.Br._Vt;if(0!==e.length){for(var s,u,o=null!=(s=Wn(e,function(t){return 0!==t.lFt.length&&0!==t.fFt.length}))?s:e[0],h=e.filter(function(t){return t!==o}),a=Ft(o.lFt);!(u=a()).done;)t=this,n();for(var c,f=Ft(o.fFt);!(c=f()).done;)i=this,r()}else OG.FLt(V$,"The HLSModel contains no variant streams.")},n.iXt=function(t){return jt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:if(this.Mkt)return[2];if(this.nEt.NVt)return[3,5];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.nEt.UVt(t)];case 2:return u.sent(),[3,4];case 3:throw yr(i=u.sent()),this.cP=!1,new _d(pd.MANIFEST_LOAD_ERROR,"The provided HLS document could not be loaded - "+i.message,i);case 4:this.qlt(),u.label=5;case 5:return[4,this.Tjt()];case 6:return n=u.sent(),this.kjt(n),this.Ejt(n),r=this.xjt(n.lFt),e=this.Pjt(n.fFt),(s=this.Ijt(n.vFt))||this.Cjt(n._Ft),[4,this.MGt(r,e,s,{nXt:!0})];case 7:return u.sent(),this.Mkt=!0,[2]}})}).call(this)},n.Ejt=function(t){var i=this.ENt;if(i)for(var n,r=function(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){var e=i.value,s=R$(e);void 0!==s&&n.push({Sit:s,Tit:e.bs||"",Th:e.l})}return n}(t._Ft),e=Ft(r);!(n=e()).done;){var s=n.value;i.$gt(s)}},n.Tjt=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:if(this.Rjt=this.Br._Vt,!this.Rjt.length)throw new _d(pd.MANIFEST_LOAD_ERROR,"LLHLSPlayer - Could not select initial variant stream: the HLS stream contains no variant streams.");return[4,this.Djt(this.Rjt)];case 1:if(0===(t=n.sent()).length)throw new _d(pd.MANIFEST_LOAD_ERROR,"LLHLSPlayer - Could not select initial variant stream: the HLS stream contains no variant stream with a supported codec.");return[4,this.Njt(t)];case 2:return(i=n.sent()).length>0&&(t=i),OG.cN(V$,"Selecting initial active variant stream."),[2,P$(t,this.Mc.abr,this.Mz,this.Ndt.maximumBackoff)]}})}).call(this)},n.xjt=function(t){if(this.Bjt){var i=this.Mjt(this.Bjt);if(i)return i}return F$(t)},n.Pjt=function(t){if(this.Ljt){var i=this.Mjt(this.Ljt);if(i)return i}return F$(t)},n.Ijt=function(t){for(var i,n=Ft(this.Gl.NI);!(i=n()).done;){var r=i.value;r.Qk===Jp.Kn&&(this.Ojt=this.Sjt.aGt(r))}if(this.Ojt){var e=this.Mjt(this.Ojt);if(e)return e}return L$(t)},n.Cjt=function(t){var i=this.ENt;if(i){var n=L$(t);if(void 0!==n){var r=R$(n);i.Jgt(r).Qk=Jp.Kn}}},n.wLt=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;if(!this.Fjt(r))throw new y("LLHLSPlayer - Could not set an allowed variant stream that does not exists in the internal HLS model.")}this.Rjt=t},n.Fjt=function(t){var i=this.Br;return!!i&&Jn(i._Vt,t)},n.Mjt=function(t){if(t&&this.cjt)return Wn(this.cjt.VLt,function(i){return i===t})},n.Ujt=function(){return jt(function(){var t,i,n,r;return zt(this,function(e){switch(e.label){case 0:return 0!==(i=null!=(t=this.Rjt)?t:this.Br._Vt).length||this.Rjt?1!==i.length||this.Rjt?[4,this.Djt(i)]:(OG.cN(V$,"The HLS stream contains only a single variant stream, skipping ABR selection."),[2,[]]):(OG.cN(V$,"The HLS stream does not contain any variant streams, skipping ABR selection."),[2,[]]);case 1:return 0===(n=e.sent()).length?(OG.FLt(V$,"No variant streams with supported codecs available to perform ABR selection on."),[2,[]]):0!==(r=N$(n,this.Ndt.maximumBackoff)).length?[3,3]:this.Vjt?[2,[]]:(OG.FLt(V$,"No variant streams with online renditions available to perform ABR selection on."),this.Hjt++,[4,this.Wjt(n)]);case 2:return e.sent(),[2,[]];case 3:return[2,r]}})}).call(this)},n.qjt=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return[4,this.QLt()];case 1:return void 0===(t=n.sent())?[2]:(i=!!this.cjt&&t.IWt.IW)&&(this.DDt={gLt:t,wft:Vi.Mg()});var s,u=Vi.Mg()-this.DDt.wft,o=null!=(s=null==(n=this.ljt)?void 0:n.sLt.WLt)?s:1/0;return i>=A.max(o-1,5)||u>1e3},n.Gjt=function(t){return rr(t,function(t){return t.IW})},n.ujt=function(){return jt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:return this.DDt=void 0,[4,this.Ujt()];case 1:return 0===(t=r.sent()).length?[2]:[4,this.Njt(t)];case 2:return(i=r.sent()).length>0&&(t=i),void 0===(n=this.Gjt(t))?[3,4]:[4,this.yLt(n,{bLt:!0})];case 3:r.sent(),this.oa.dq.JIt(n.IW),r.label=4;case 4:return[2]}})}).call(this)},n.Wjt=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:i=this,this.Vjt=!0,n=!1,r=Ft(t),o.label=1;case 1:if((e=r()).done)return[3,6];s=e.value,o.label=2;case 2:return o.trys.push([2,4,,5]),void 0===(u=this.ljt?Wn(s.fFt,function(t){return bG(t,i.ljt)}):void 0)?[3,5]:[4,this.jVt(u)];case 3:return o.sent(),u.sLt.bUt=-1/0,n=!0,[3,5];case 4:return o.sent(),[3,5];case 5:return[3,1];case 6:return n?(this.Hjt=0,[4,this.oa.NXt()]):[3,8];case 7:return o.sent(),[3,10];case 8:return this.Hjt>=this.Ndt.maxRetries?(this.oa.Qq(new _d(pd.MEDIA_LOAD_ERROR,"The provided video renditions could not be loaded.")),[2]):[4,Rr(A.min(this.Ndt.minimumBackoff*A.pow(2,this.Hjt-1),this.Ndt.maximumBackoff))];case 9:o.sent(),o.label=10;case 10:return this.Vjt=!1,[4,this.qjt()];case 11:return o.sent(),[2]}})}).call(this)},n.Djt=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=this,[4,hr(t,function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return 0===(r=[(null==(i=t.Rrt)?void 0:i.q9)?'audio/mp4; codecs="'+t.Rrt.q9+'"':void 0,(null==(n=t.Rrt)?void 0:n.W9)?'video/mp4; codecs="'+t.Rrt.W9+'"':void 0].filter(Fi)).length?[2,!0]:[4,this.$Gt.$Z(r,this.Mc.useManagedMediaSource)];case 1:return[2,e.sent()]}})}).call(i)})];case 1:return(n=r.sent()).some(function(t){var i;return null==(i=t.Rrt)?void 0:i.W9})&&(n=n.filter(function(t){return!t.Rrt||t.Rrt.W9||0!==t.fFt.length})),n.some(function(t){var i;return null==(i=t.Rrt)?void 0:i.q9})&&(n=n.filter(function(t){return!t.Rrt||t.Rrt.q9||0!==t.lFt.length})),[2,n]}})}).call(this)},n.Njt=function(t){var i=this;return this.nEt.MVt?hr(t,function(t){return function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:n=Ft(t),s.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,[4,i(e)]);case 2:if(!s.sent())return[2,!1];s.label=3;case 3:return[3,1];case 4:return[2,!0]}})})()}([F$(t.lFt),F$(t.fFt),L$(t.vFt),L$(t._Ft)].filter(Fi),function(t){return i.Xjt(t)})}):ot.resolve([])},n.Xjt=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:if(0===t.sLt.bct.length)return[2,!1];if(!(i=t.sLt.bct[0]).Syt)return[2,!1];n=i.Syt,r=n.iAt?KG(n.iAt.Tn,n.iAt.V):void 0,e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.Sut.sdt(n.XE,r)];case 2:return[2,e.sent()];case 3:return e.sent(),[2,!1];case 4:return[2]}})}).call(this)},n.RLt=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return this.cjt?(i=this.Mjt(t),t&&!i?(OG.lt(V$,"Trying to set an invalid rendition as the active audio rendition."),[2]):this.djt===i?[2]:(n=Fi(i)!==Fi(this.djt),OG.cN(V$,"Switching audio rendition"),[4,this.MGt(i,this.ljt,this.fjt,{SLt:!0,bLt:n})])):(this.Bjt=t,[2]);case 1:return r.sent(),[2]}})}).call(this)},n.NLt=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return this.cjt?(i=this.Mjt(t),t&&!i?(OG.lt(V$,"Trying to set an invalid rendition as the active video rendition."),[2]):this.ljt===i?[2]:(n=Fi(i)!==Fi(this.ljt),OG.cN(V$,"Switching video rendition"),[4,this.MGt(this.djt,i,this.fjt,{ALt:!0,bLt:n})])):(this.Ljt=t,[2]);case 1:return r.sent(),[2]}})}).call(this)},n.uGt=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.cjt?(i=this.Mjt(t),t&&!i?(OG.lt(V$,"Trying to set an invalid rendition as the active subtitle rendition."),[2]):(OG.cN(V$,"Switching subtitle rendition"),[4,this.MGt(this.djt,this.ljt,i)])):(this.Ojt=t,[2]);case 1:return n.sent(),[2]}})}).call(this)},n.jjt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.Vjt?[2]:(n=0===this.sO.V,t.Km===tQ.Mk||t.Km===tQ.Bk&&n?[3,2]:[4,this.Qjt(t,i)]);case 1:return r.sent(),[3,10];case 2:return this.Rjt&&this.Rjt.length<=1?t.Km!==tQ.Mk||this.ljt===t?[3,4]:[4,this.MGt(this.djt,t,this.fjt)]:[3,8];case 3:return r.sent(),[3,6];case 4:return t.Km===tQ.Bk&&n&&this.djt!==t?[4,this.MGt(t,this.ljt,this.fjt)]:[3,6];case 5:r.sent(),r.label=6;case 6:return[4,this.Qjt(t,i)];case 7:return r.sent(),[3,10];case 8:return[4,this.qjt()];case 9:r.sent(),r.label=10;case 10:return[2]}})}).call(this)},n.jVt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,5]),[4,this.nEt.jVt(t,i)];case 1:return r.sent(),[3,5];case 2:return yr(n=r.sent()),tg(n)||ig(n)?[4,this.jjt(t,i)]:[3,4];case 3:r.sent(),r.label=4;case 4:throw n;case 5:return[2]}})}).call(this)},n.Qjt=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:if(n=this,Jn(this.Kjt,t))return[2];this.Kjt.push(t),s.label=1;case 1:return s.trys.push([1,3,4,7]),r=t.Km===tQ.HU||t.Km===tQ.YLt?1/0:this.Ndt.maxRetries,[4,CT(function(){return n.retryOfflineRenditionsCallback(t,i)},i,r,this.Ndt.minimumBackoff,this.Ndt.maximumBackoff)];case 2:return s.sent(),[3,7];case 3:return e=s.sent(),this.oa.Qq(new _d(pd.MEDIA_LOAD_ERROR,e.message,e)),[3,7];case 4:return Yn(this.Kjt,t),t.sLt.bUt!==-1/0?[3,6]:[4,this.oa.NXt()];case 5:s.sent(),s.label=6;case 6:return[7];case 7:return[2]}})}).call(this)},n.fXt=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return n=this.djt,r=this.ljt,(e=[]).push(this.Yjt(r,t)),AG(n,r)||e.push(this.Yjt(n,t)),s=this.fjt,(null==(i=this.Mc.hls)?void 0:i.delaySubtitlePreload)?[4,ot.all(e)]:[3,3];case 1:return o.sent(),[4,this.Yjt(s,t)];case 2:return o.sent(),[3,5];case 3:return u=this.Yjt(s,t),[4,ot.all([].concat(e,[u]))];case 4:o.sent(),o.label=5;case 5:return[2]}})}).call(this)},n.Yjt=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:if(!t)return[2];r.label=1;case 1:return r.trys.push([1,3,,6]),[4,this.nEt.jVt(t,i)];case 2:return r.sent(),[3,6];case 3:return yr(n=r.sent()),tg(n)||ig(n)?[4,this.Jjt(t,i)]:[3,5];case 4:r.sent(),r.label=5;case 5:return[3,6];case 6:return[2]}})}).call(this)},n.Jjt=function(t,i){return jt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return this.Vjt?[2]:(n=0===this.sO.V,t.Km===tQ.Mk||t.Km===tQ.Bk&&n?[3,2]:[4,this.Qjt(t,i)]);case 1:return o.sent(),[3,7];case 2:return this.Rjt&&this.Rjt.length<=1?[4,this.Qjt(t,i)]:[3,4];case 3:return o.sent(),[3,7];case 4:return[4,this.Tjt()];case 5:return r=o.sent(),this.kjt(r),e=this.xjt(r.lFt),s=this.Pjt(r.fFt),u=this.Ijt(r.vFt),[4,this.MGt(e,s,u)];case 6:o.sent(),o.label=7;case 7:return[2]}})}).call(this)},n.MGt=function(t,i,n,r){void 0===r&&(r={});var e={bLt:r.bLt||!1,SLt:r.SLt||!1,ALt:r.ALt||!1,tI:r.tI||!1,nXt:r.nXt||!1};return e.nXt||e.tI||this.djt!==t||this.ljt!==i||this.fjt!==n?void 0===t&&void 0===i?ot.reject(new y("Trying to buffer no media renditions.")):(this.djt=t,this.ljt=i,this.fjt=n,this.BUt(),this.So(new _$),this.oa.MGt(e)):ot.resolve()},n.yLt=function(t,i){return jt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return n=this,this.oa.sXt?t?this.Fjt(t)?t===this.cjt?(OG.cN(V$,"Trying to set the already active variant stream, ignoring."),[2]):(r=this.djt?Wn(t.lFt,function(t){return bG(t,n.djt)}):void 0,e=this.ljt?Wn(t.fFt,function(t){return bG(t,n.ljt)}):void 0,s=this.fjt?Wn(t.vFt,function(t){return bG(t,n.fjt)}):void 0,this.kjt(t),this.DDt=void 0,[4,this.MGt(r,e,s,i)]):(OG.lt(V$,"Trying to set an active variant stream that does not exists on the internal model."),[2]):(OG.lt(V$,"Cannot explicitly set the active variant stream to undefined."),[2]):(OG.lt(V$,"The LLHLSPlayer is not loaded."),[2]);case 1:return u.sent(),[2]}})}).call(this)},n.kjt=function(t){var i;if(OG.cN(V$,"Setting active variant stream."),this.cjt!==t){var n=(null==(i=this.cjt)?void 0:i.yOt)!==(null==t?void 0:t.yOt);if(this.cjt&&n)for(var r,e=Ft(this.cjt.vFt);!(r=e()).done;){var s=r.value;this.Sjt.mFt(s)}if(this.cjt=t,this.So(new y$),t&&n)for(var u,o=Ft(t.vFt);!(u=o()).done;){var h=u.value;this.Sjt.hGt(h)}}},n.Zjt=function(){this.$jt(this.tO),this.$jt(this.sO)},n.$jt=function(t){for(var i,n=[],r=Ft(t.NI);!(i=r()).done;){for(var e,s=i.value,u=[],o=Ft(s.$I.NI);!(e=o()).done;){var h=e.value;Jn(h.gLt.VLt,h.fLt)||u.push(h)}for(var a,c=Ft(u);!(a=c()).done;){var f=a.value;s.$I.pS(f),f.kn()}0===s.$I.V&&n.push(s)}for(var v,d=Ft(n);!(v=d()).done;){var l=v.value;t.it(l),l.kn()}},n.SXt=function(t){return jt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:i=this,n={stack:[],error:void 0,hasError:!1},u.label=1;case 1:return u.trys.push([1,3,4,5]),r=Xt(n,dr.ep([t]),!1),e=[this.ljt,AG(this.djt,this.ljt)?void 0:this.ljt,this.fjt].filter(Fi),[4,ot.all(e.filter(function(t){return!t.sLt.vUt}).map(function(t){return i.nEt.QVt(t,r.Yg)}))];case 2:return u.sent(),[3,5];case 3:return s=u.sent(),n.error=s,n.hasError=!0,[3,5];case 4:return Gt(n),[7];case 5:return[2]}})}).call(this)},n.mXt=function(){return jt(function(){var t,i,n,r,e,s,u,o,h,a,c,f,v,d,l,g,w,m,p,y,_,k;return zt(this,function(b){switch(b.label){case 0:if(r=this.djt,e=this.ljt,s=null==(t=this.cjt)?void 0:t.Rrt,u=[],void 0!==r){if(!(a=null!=(h=null==(o=r.Rrt)?void 0:o.q9)?h:null==s?void 0:s.q9))return[2,void 0];c='audio/mp4; codecs="'+a+'"',OG.cN(V$,"Configuring MediaSource for initial audio rendition with codec: "+c+"."),u.push(c)}if(void 0!==e){if(!(d=null!=(v=null==(f=e.Rrt)?void 0:f.W9)?v:null==s?void 0:s.W9))return[2,void 0];l='video/mp4; codecs="'+d+'"',OG.cN(V$,"Configuring MediaSource for initial video rendition with codec: "+l+"."),u.push(l)}return 0===u.length?(OG.FLt(V$,"No codecs found on the active variant stream."),[2,void 0]):(w=null!=(g=null==e||null==(i=e.sLt.bct[0])?void 0:i.UW)?g:[],p=null!=(m=null==r||null==(n=r.sLt.bct[0])?void 0:n.UW)?m:[],y=this.Mc,_=this.Br,[4,aQ(y.contentProtection,u,[].concat(_.fVt,p,w),this.aV,y.useCredentials)]);case 1:return k=b.sent(),[2,{Km:Ly.SV,q4:u.map(function(t){return{GT:t}}),fq:k,t5:y.useManagedMediaSource}]}})}).call(this)},n.yXt=function(t,i,n,r,e){var s,u,o=this.djt,h=this.ljt,a=t&&AG(o,h);if(i&&h)if(this.gjt)(n||e||a&&r)&&(this.gjt.Zg(),this.gjt.Rzt.jy()),this.gjt.fLt!==h&&this.gjt.MWt(h);else{var c=a?[vw.Mk,vw.Bk]:[vw.Mk];this.gjt=this.iQt(h,c)}else null==(s=this.gjt)||s.zg(),this.gjt=void 0;t&&o&&!a?this._jt?((n||r)&&(this._jt.Zg(),this._jt.Rzt.jy()),this._jt.fLt!==o&&this._jt.MWt(o)):this._jt=this.eQt(o):(null==(u=this._jt)||u.zg(),this._jt=void 0)},n.bXt=function(t){var i=this.fjt;this.tQt&&(this.tQt.fLt===i?t&&(this.tQt.Zg(),this.tQt.Rzt.jy()):(this.tQt.zg(),this.tQt=void 0));if(!this.tQt&&i&&(this.tQt=this.sQt(i)),i){var n=this.Sjt.dGt(i);n.Qk=Jp.Kn,this.Bzt(n)}},n.iQt=function(t,i){var n=function(t,i,n,r,e,s,u,o,h,a,c){var f=n.Br.AM,v=new e$(f),d=new t$(vw.Mk,t,n,v,r,e,s,c),l=u._Tt(v,f,i);return new p$(d,v,l,o,h,a)}(t,i,this.nEt,this.aV,this.Sut,this.XHt,this.YGt,this.Opt,this.ENt,this.Mz,this.Mc.useCredentials);return n.Pzt.wn(ZY.IWt,this.nQt),n.Pzt.wn(ZY.CWt,this.rQt),n.Pzt.wn(ch.iy,this.Rs),n.Izt.wn(f$.Jqt,this.hQt),n.Izt.wn(f$.$qt,this.oQt),n.Izt.wn(f$.tzt,this.aQt),n.Izt.wn(f$.Zqt,this.uQt),n},n.eQt=function(t){var i=function(t,i,n,r,e,s,u,o,h){var a=i.Br.AM,c=new e$(a),f=new t$(vw.Bk,t,i,c,n,r,e,h),v=s._Tt(c,a,[vw.Bk]);return new p$(f,c,v,u,void 0,o)}(t,this.nEt,this.aV,this.Sut,this.XHt,this.YGt,this.Opt,this.Mz,this.Mc.useCredentials);return i.Pzt.wn(ZY.CWt,this.rQt),i.Izt.wn(f$.Jqt,this.hQt),i.Izt.wn(f$.Zqt,this.uQt),i},n.sQt=function(t){return function(t,i,n,r,e,s){var u=i.Br.AM,o=new e$(u),h=new t$(vw.LT,t,i,o,n,r,e,s),a=new g$(o,u,vw.LT);return new p$(h,o,a)}(t,this.nEt,this.aV,this.Sut,this.XHt,this.Mc.useCredentials)},n.Czt=function(t,i){if(t?this.B4&&this.B4.$zt(t,this.QU)||(this.B4=new S$(vw.Bk,t,this.QU)):this.B4=void 0,i?this.M4&&this.M4.$zt(i,this.QU)||(this.M4=new S$(vw.Mk,i,this.QU)):this.M4=void 0,void 0!==this.gjt){var n=void 0!==t&&void 0===this._jt,r=[this.M4,n?this.B4:void 0].filter(Fi);this.gjt.Czt(r)}if(void 0!==this._jt){var e=this.B4?[this.B4]:[];this._jt.Czt(e)}},n.Bzt=function(t){t?this.cQt&&this.cQt.$zt(t)||(this.cQt=new I$(t,this.Br.AM)):this.cQt=void 0,void 0!==this.tQt&&void 0!==this.cQt&&this.tQt.Bzt(this.cQt)},n.WGt=function(t){if(this.iV!==t){this.iV=t;for(var i,n=Ft(this.bjt);!(i=n()).done;){i.value.tV(t)}var r=this.fjt;if(void 0!==r){var e=this.Sjt.dGt(r);this.Bzt(e)}}},n.AXt=function(t,i){var n=[];t&&n.push(vw.Bk),i&&n.push(vw.Mk),this.Br.AM.dVt(n)},n.dQt=function(){if(void 0===this.gjt)return!1;var t=Vi.Mg();if(!this.gjt.Pzt.Nqt(t))return!1;var i=this.gjt.Pzt.Iqt();if(void 0===i||void 0===i.yut.ct)return!1;var n=this.zx,r=this.oa.vP,e=this.gjt.Mzt.iL(n);return!((void 0!==e?e.An(0)-n:0)>=2*i.yut.ct*r)&&(i.Cqt>0&&0===i.Rqt?i.Dqt>1e3*i.yut.ct*.8:8*i.Rqt/this.Mz.CY.IW>=1.8*i.yut.ct)},n.lQt=function(){return jt(function(){var t,i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return[4,this.QLt()];case 1:return void 0===(i=o.sent())||void 0===(n=null==(t=this.gjt)?void 0:t.Pzt.Iqt())?[2]:(r=this.cjt,n.Rqt>0&&(e=A.max(0,n.Rqt-n.Cqt),s=n.Rqt*(i.IW/r.IW),e<=s)?[2]:(u=i.IW0&&n.every(function(t){return function(t){return t.sLt.bct.length>0&&!t.sLt.iFt}(t)})?1/0:NaN}},{key:"ct",get:function(){var t;return null!=(t=this.xXt)?t:this.mjt}},{key:"PGt",get:function(){var t;return null!=(t=this.pjt)?t:this.mjt}},{key:"lGt",get:function(){var t=this.vGt;if(0!==t.length&&this.ct===1/0){for(var i,n,r=Ft(t);!(n=r()).done;){var e=n.value,s=e.sLt.kP;if(0!==s.V){var u=s.An(s.V-1)+e.sLt.ISt,o=e.sLt.mUt,h=u+(null!=o?o:0);(!i||it}V(),It(),Wt(),Yt();var Q$=function(){function t(){}var i=t.prototype;return i.Jq=function(t,i){return!!rT(t.type)&&!t.useNativePlayback},i.Zq=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return t.aes128?[2,!0]:[4,H_(t,!0)];case 1:return[2,i.sent()]}})})()},t}();V(),It(),V(),It(),Wt(),Yt();var Y$=function(){function t(){}var i=t.prototype;return i.zHt=function(t,i,n){return jt(function(){var r,e;return zt(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,crypto.subtle.importKey("raw",i,{name:"AES-CBC"},!1,["decrypt"])];case 1:return r=s.sent(),[4,crypto.subtle.decrypt({name:"AES-CBC",iv:n},r,t)];case 2:return e=s.sent(),[2,new I(e)];case 3:throw s.sent(),new _d(pd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error during AES128 decrypt.");case 4:return[2]}})})()},i.zg=function(){},t.US=function(){return"undefined"!=typeof crypto&&void 0!==crypto.subtle&&void 0!==crypto.subtle.decrypt},t}();V(),It(),V(),It(),Wt(),Yt(),V(),It(),Bt(),Dt(),H(),Ut(),V(),It(),Dt();var $$=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).data=void 0,r.data=n,r}return Pt(i,t),i}(ah),K$=["message","messageerror","error"];V(),It(),Dt();var J$=function(t){function i(i){var n;return(n=t.call(this,ty.ma)||this).error=void 0,n.error=i,n}return Pt(i,t),i}(ah),Z$=function(t){function i(i){var n;return(n=t.call(this)||this).mQt=void 0,n.gQt=void 0,n.wQt=[],n.AQt=function(t){if(n._Qt)t.bQt();else{n.mQt=t,n.mQt.wn(K$,n.Rs);for(var i,r=Ft(n.wQt);!(i=r()).done;){var e=i.value;t.pQt(e.Iy,e.yQt)}tr(n.wQt)}},n.SQt=function(t){if(!n._Qt){var i=j(t,y)?t:new y("Could not create Worker.");n.So(new J$(i)),n.bQt()}},n.gQt=new dr,i(n.gQt.Yg).then(n.AQt,n.SQt),n}Pt(i,t);var n=i.prototype;return n.pQt=function(t,i){this._Qt||(void 0!==this.mQt?this.mQt.pQt(t,i):this.wQt.push({Iy:t,yQt:i}))},n.bQt=function(){this._Qt||(this.gQt.Zg(),tr(this.wQt),void 0!==this.mQt&&this.mQt.bQt())},xt(i,[{key:"_Qt",get:function(){return this.gQt.Yg.Hg}}]),i}(uh);V(),It(),V(),It(),Dt(),H();var tK=function(t){function i(i,n){var r;return(r=t.call(this)||this).mQt=void 0,r.TQt=function(t){r.So(new $$("message",t.data))},r.kQt=function(t){r.So(new $$("messageerror",t.data))},r.L7=function(t){null==t.preventDefault||t.preventDefault.call(t);var i=j(t.error,y)?t.error:new y(t.message);r.So(new J$(i)),r.bQt()},r.mQt=new R(i,n),r.mQt.addEventListener("message",r.TQt),r.mQt.addEventListener("messageerror",r.kQt),r.mQt.addEventListener("error",r.L7),r}Pt(i,t);var n=i.prototype;return n.pQt=function(t,i){i?this.mQt.postMessage(t,i):this.mQt.postMessage(t)},n.bQt=function(){this.Vo(),this.mQt.removeEventListener("message",this.TQt),this.mQt.removeEventListener("messageerror",this.kQt),this.mQt.removeEventListener("error",this.L7),this.mQt.terminate()},i}(uh);V(),It(),Dt();var iK=0,nK=function(t){function i(i,n){var r;(r=t.call(this)||this).aS=void 0,r.IQt=void 0,r.EQt=void 0,r.CQt=void 0,r.xQt=function(){r.EQt.removeEventListener("load",r.xQt),r.EQt.contentWindow.postMessage({type:"initialize",id:r.aS,script:r.IQt},"*")},r.PQt=function(t){t.origin===r.CQt&&t.data.id===r.aS&&("initialized"===t.data.type||("error"===t.data.type?(r.So(new J$(new y(t.data.data.message))),r.bQt()):r.So(new $$("message",t.data.data))))},r.aS=iK++,r.IQt=i;var e=Vi.Dh("iframe.html",n);return r.EQt=function(t){var i=v.createElement("iframe");return i.width="0",i.height="0",i.style.display="none",i.role="",i.src=t,v.body.appendChild(i),i}(e.href),r.CQt=e.origin,r.EQt.addEventListener("load",r.xQt),self.addEventListener("message",r.PQt),r}Pt(i,t);var n=i.prototype;return n.pQt=function(t,i){i?this.EQt.contentWindow.postMessage({type:"message",data:t},"*",i):this.EQt.contentWindow.postMessage({type:"message",data:t},"*")},n.bQt=function(){var t;this.EQt.removeEventListener("load",this.xQt),self.removeEventListener("message",this.PQt),null==(t=this.EQt.contentWindow)||t.postMessage({type:"terminate"},"*"),Zi(this.EQt)},i}(uh);function rK(t,i,n){var r=Vi.Pm(t,i);return new Z$(function(t){return function(t,i,n,r){return jt(function(){var e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,sK(e=new tK(t,n),r)];case 1:return f.sent(),[2,e];case 2:return s=f.sent(),null==e||e.bQt(),yr(s),[3,3];case 3:if(!eK||!Hd)return[3,13];f.label=4;case 4:return f.trys.push([4,7,,8]),[4,Vi.Dx.vk({Yu:t,Hk:Tl.GET,fk:qd.LT,Yg:r})];case 5:return[4,f.sent().HT(r)];case 6:return u=f.sent(),[3,8];case 7:return yr(f.sent()),[3,8];case 8:if(!u)return[3,13];f.label=9;case 9:return f.trys.push([9,11,12,13]),h=Hd([u],{type:"application/javascript"}),o=URL.createObjectURL(h),[4,sK(e=new tK(o,n),r)];case 10:return f.sent(),[2,e];case 11:return a=f.sent(),null==e||e.bQt(),yr(a),eK=!1,[3,13];case 12:return o&&URL.revokeObjectURL(o),[7];case 13:return f.trys.push([13,15,,16]),[4,sK(e=new nK(t,i),r)];case 14:return f.sent(),[2,e];case 15:throw c=f.sent(),null==e||e.bQt(),c;case 16:return[2]}})})()}(r,i,n,t)})}var eK=!0;function sK(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,t.ww(["message","error"],i)];case 1:if("error"===(n=r.sent()).type)throw function(t){return new _d(pd.CONFIGURATION_ERROR,"THEOplayer workers could not be loaded. Please check the configuration of the libraryLocation.",t)}(n.error);if(!function(t){return zi(t)&&"10.3.0"===t.RQt}(n.data))throw new _d(pd.CONFIGURATION_ERROR,"THEOplayer workers could not be loaded. Please check that the worker's version matches THEOplayer's version (10.3.0).");return[2,n]}})})()}V(),It();var uK=function(t){return t.DQt="zHt",t.NQt="gWt",t}({}),oK=function(t){return t.BQt="MQt",t.LQt="OQt",t}({}),hK=function(){function t(t){var i=this;this.VQt=void 0,this.UQt=void 0,this.mQt=void 0,this.qQt=0,this.KQt=ro(),this.HQt=function(t){var n=t.data,r=n.YQt,e=i.KQt.get(r);if(e)if(i.KQt.delete(r),n.JQt===oK.BQt)e.Qy(n.ZQt);else if(n.JQt===oK.LQt){var s=n.$Qt,u=n.tKt?new y(n.tKt):void 0,o=new _d(pd.CONTENT_PROTECTION_INTERNAL_ERROR,"Error during AES128 decrypt. (code: "+s+")",u);e.Ky(o)}},this.WQt=function(t){var n=new _d(pd.CONTENT_PROTECTION_INTERNAL_ERROR,t.error.message,t.error);i.zg(n)},this.VQt=t;try{this.UQt=Vi.Pm("theoplayer.d.js",t)}catch(t){throw new _d(pd.CONFIGURATION_ERROR,"Invalid player configuration: missing libraryLocation",t)}}var i=t.prototype;return i.FQt=function(){var t=rK(this.UQt,this.VQt,{name:"THEOplayer decrypt worker"});return t.wn("message",this.HQt),t.wn("error",this.WQt),t},i.zHt=function(t,i,n){var r=""+ ++this.qQt,e={zQt:uK.DQt,GQt:r,XQt:t,jQt:i,QQt:n},s=new Xa;return this.KQt.set(r,s),null!=this.mQt||(this.mQt=this.FQt()),this.mQt.pQt(e),s.Yy},i.zg=function(t){void 0===t&&(t=new wr),this.KQt.forEach(function(i){return i.Ky(t)}),this.KQt.clear(),this.mQt&&(this.mQt.bQt(),this.mQt=void 0)},t}();function aK(t){var i=Wn(t.boxes,_C);if(i){var n=Wn(i.boxes,kC);if(n)return n.handlerType}}function cK(t){var i,n=new Tv;return(i=n.boxes).push.apply(i,[].concat(t.boxes)),n}function fK(t){var i,n=new Lf;return(i=n.boxes).push.apply(i,[].concat(t.boxes)),n}V(),It(),Dt(),V(),It(),Wt(),Dt(),Ut(),Yt(),V(),It(),Wt(),Dt(),Ut(),Yt(),V(),It(),H();var vK=8;function dK(t,i){for(var n=function(t){var i,n=new Yf;return(i=n.boxes).push.apply(i,[].concat(t.boxes)),n}(t),r=gK(i),e=0;e=0){var h=u.boxes[o],a=fK(u);a.boxes[o]=new af(new I(h.getSize()-vK)),n.boxes[e]=a}}}return n}function lK(t,i){for(var n=function(t){var i,n=new hv;return(i=n.boxes).push.apply(i,[].concat(t.boxes)),n}(t),r=0;r0){var f=c.samples;if(!c.flags.sampleDurationPresent){c.flags.sampleDurationPresent=!0;for(var v,d=null!=r?r:s.defaultSampleDuration,l=Ft(f);!(v=l()).done;){v.value.duration=d}}f[0].duration+=o.toNumber(),c.samples=f}}}V(),It(),H(),Ut();var mK="Mp4Transmuxer",pK=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).i3=void 0,i.iKt=void 0,i.rKt=void 0,i.hKt=void 0,i.nKt=void 0,i}Pt(i,t);var n=i.prototype;return n._zt=function(t,i){pr(i);var n=t.fLt,r=iP(Aa(t.YOt.lk.lk));if(!r)throw new y("Mp4Transmuxer - Unable to parse "+n.Km+" MP4 initializer.");this.i3=r;var e=function(t){for(var i,n,r,e=Ft(t.Z);!(r=e()).done;){var s=r.value;i||(i=s.N1),n||(n=s.D1)}if(i||n)return{q9:i,W9:n,fOt:void 0};return}(r);e&&this.wzt(n,e);var s=function(t){for(var i,n=Ft(t.Z);!(i=n()).done;){var r=i.value;if(void 0!==r.B1)return r.B1}return}(r);void 0!==s&&this.yzt(n,s);var u=function(t){var i,n,r,e,s,u=Pv(t),o=Wn(u.boxes,mC),h=o.boxes.filter(pC),a=Wn(h,function(t){return aK(t)===yf.AUDIO}),c=Wn(h,function(t){return aK(t)===yf.VIDEO}),f={q9:{sN:a?gK(a):void 0},W9:{sN:c?gK(c):void 0}},v=null==(i=Wn(o.boxes,bC))?void 0:i.boxes.filter(AC),d=v?{q9:null!=(n=Wn(v,function(t){return t.trackId===f.q9.sN}))?n:void 0,W9:null!=(r=Wn(v,function(t){return t.trackId===f.W9.sN}))?r:void 0}:void 0;if(d&&(f.q9.FB=null==(e=d.q9)?void 0:e.defaultSampleDuration,f.W9.FB=null==(s=d.W9)?void 0:s.defaultSampleDuration),!a||!c)return{q9:a?t:void 0,W9:c?t:void 0,LU:f};var l=cK(u),g=cK(u),w=u.boxes.indexOf(o);l.boxes[w]=dK(o,c),g.boxes[w]=dK(o,a);var m=l.serialize().join(),p=g.serialize().join();return{q9:m,W9:p,LU:f}}(t.YOt.lk.lk);if(this.iKt=u.LU,u.W9){var o=Wn(r.Z,function(t){return t.sN===u.LU.W9.sN}),h={Km:"rRt",lk:{Km:nC.wZ,lk:u.W9},iat:vw.Mk,$Ot:t.$Ot,kzt:{Rrt:'video/mp4; codecs="'+o.D1+'"',UW:t.UW},CO:t.CO,fLt:t.fLt,BHt:t.YOt.BHt};this.Wqt(h)}if(u.q9){var a=Wn(r.Z,function(t){return t.sN===u.LU.q9.sN}),c={Km:"rRt",lk:{Km:nC.wZ,lk:u.q9},iat:vw.Bk,$Ot:t.$Ot,kzt:{Rrt:'audio/mp4; codecs="'+a.N1+'"',UW:t.UW},CO:t.CO,fLt:t.fLt,BHt:t.YOt.BHt};this.Wqt(c)}return ot.resolve()},n.pzt=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f,v,d,l,g,w,m,p,y,_,k,b,A,T;return zt(this,function(S){switch(S.label){case 0:if(pr(i),n=t.yut.BHt,OG.cN(mK,"Transmuxing fMP4: "+eQ(n.Syt)),r=t.yut.lk,e=yK(r.lk,this.i3),void 0!==(s=sr(e.map(function(t){return t.zet}),Rm))&&(n.Get=s,this.Azt(t.fLt)),this.pVt.zUt(t.$Ot))return[3,2];if(u=Im.hU(n.CO),e.length>0){for(o=sr(e.map(function(t){return t.eKt}),Rm),h=Ft(this.azt);!(a=h()).done;)c=a.value,this.pVt.iVt(t.$Ot,c,o,u,_K(n),!1);this.Azt(t.fLt)}return this.pVt.zUt(t.$Ot)?[3,2]:[4,kr(this.pVt.XUt(t.$Ot),i)];case 1:S.sent(),S.label=2;case 2:return f=this.pVt.ZUt(t.$Ot),v=n.Get?this.pVt.$Ut(n.Get,n).rF():n.CO,d=d$(n,v),l=l$(n,d),w={VHt:d,HHt:l,CO:v,ct:null!=(g=n.ct)?g:0,EU:f.rF(),$Ot:t.$Ot,fLt:t.fLt,BHt:t.yut.BHt},m=function(t,i){if(void 0===i.q9.sN)return{q9:void 0,W9:t};if(void 0===i.W9.sN)return{q9:t,W9:void 0};for(var n=Pv(t),r=cK(n),e=cK(n),s=0;sa&&(a=p)}var y=Im.yF(t.KB.KB,u.jD);e.push({sN:s,eKt:y,zet:y.gO(Im.bF(h,u.jD)),aKt:y.gO(Im.bF(o,u.jD)),oKt:y.gO(Im.bF(a,u.jD))})},e=[],s=Ft(t.Z);!(n=s()).done;)r();return e}(n,i)}function _K(t){return hY(t)?t.KOt:0===t.CFt&&t.PFt.KOt}var kK="MpegtsTransmuxer",bK=function(t){function i(i,n,r,e){var s;return(s=t.call(this,n,r,e)||this).wE=void 0,s._Kt=void 0,s.pKt=void 0,s.wKt=void 0,s.bKt=void 0,s.mKt=-1,s.yKt=-1,s.lKt=void 0,s.fKt=eo(),s.wE=i,s}Pt(i,t);var n=i.prototype;return n._zt=function(i,n){return t.prototype._zt.call(this,i,n)},n.lzt=function(i,n){if(t.prototype.lzt.call(this,i,n),!this.wE.uKt()){var r,e=null!=(r=null==n?void 0:n.Syt)?r:i.Syt;if(e)/\.(ts|aac|mp3)/i.test(e.XE)&&this.wE.cKt()}},n.dKt=function(t){var i;return t.fLt===this.lKt&&this.fKt.has(t.$Ot)?i=this.fKt.get(t.$Ot):(i=DY(t.yut.lk.lk),this.lKt=t.fLt,this.fKt.set(t.$Ot,i)),i},n.pzt=function(i,n){var r=this;return jt(function(){var e,s,u,o,h,a,c,f,v,d,l,g,w,m,p,y,_,k,b,A,T,S,E,I,R,C,P,D,N,x,B,O,M;return zt(this,function(L){switch(L.label){case 0:if(pr(n),e=this.dKt(i),s=i.yut,e!==PY.gHt&&e!==PY.pHt)return[2,t.prototype.pzt.call(r,i,n)];if(s.BHt.UW.some(TK))throw new _d(pd.CONTENT_PROTECTION_NOT_SUPPORTED,"SAMPLE-AES encryption is not supported for MPEG-TS or Packed Audio segments");return u=this.wE.cKt(),e!==PY.gHt?[3,2]:(OG.cN(kK,"Transmuxing MPEG-TS: "+eQ(s.BHt.Syt)),[4,u.vKt({data:s.lk.lk,metadata:this._Kt})]);case 1:return o=L.sent(),[3,4];case 2:return OG.cN(kK,"Transmuxing raw audio: "+eQ(s.BHt.Syt)),[4,u.gKt({data:s.lk.lk,metadata:this._Kt})];case 3:o=L.sent(),L.label=4;case 4:if(pr(n),this.wzt(i.fLt,{q9:o.metadata.audio_codec,W9:o.metadata.video_codec,fOt:void 0}),o.metadata.video_frame_rate&&this.yzt(i.fLt,o.metadata.video_frame_rate),h=SK(o.metadata.first_decode_timestamp),a=SK(o.metadata.first_presentation_timestamp),c=void 0!==o.metadata.first_video_presentation_timestamp?SK(o.metadata.first_video_presentation_timestamp):void 0,s.BHt.Get=a,this.Azt(i.fLt),void 0!==c&&this.bzt(i.fLt,s.BHt,function(t,i){var n=t.gF(i);return n.lF(Im.SF)&&(n=n.gO(Dm())),n}(c,a)),this.pVt.zUt(i.$Ot))return[3,6];for(f=Im.hU(s.BHt.CO),v=Ft(this.azt);!(d=v()).done;)l=d.value,this.pVt.iVt(i.$Ot,l,h,f,_K(s.BHt),!0);return this.Azt(i.fLt),this.pVt.zUt(i.$Ot)?[3,6]:[4,kr(this.pVt.XUt(i.$Ot),n)];case 5:L.sent(),L.label=6;case 6:if(g=this.pVt.tVt(h,s.BHt),this._Kt=o.metadata,w=this.pVt.$Ut(a,s.BHt).rF(),m=d$(s.BHt,w),p=l$(s.BHt,m),_={VHt:m,HHt:p,CO:w,ct:null!=(y=s.BHt.ct)?y:0,EU:g.rF(),$Ot:i.$Ot,fLt:i.fLt,BHt:s.BHt},void 0===o.data.audio_media&&void 0===o.data.video_media){for(k=Ft(this.azt);!(b=k()).done;)A=b.value,T=io({Km:"yut",lk:void 0,iat:A},_),this.Wqt(T);return[2]}return S=[],void 0!==o.data.audio_media?(!o.data.audio_init||this.pKt&&this.mKt===i.$Ot&&Ma(this.pKt,o.data.audio_init)||(E=this.pVt.$Ut(s.BHt.Get,s.BHt).rF(),I={Km:"rRt",lk:{Km:nC.wZ,lk:o.data.audio_init},iat:vw.Bk,$Ot:i.$Ot,kzt:{Rrt:'audio/mp4; codecs="'+o.metadata.audio_codec+'"',UW:s.BHt.UW},CO:E,fLt:i.fLt,BHt:s.BHt},this.pKt=o.data.audio_init,this.mKt=i.$Ot,this.Wqt(I)),R=io({Km:"yut",lk:{Km:nC.wZ,lk:o.data.audio_media},iat:vw.Bk},_),this.Wqt(R)):i.yut.BHt.EFt&&Jn(this.azt,vw.Bk)&&(C=io({Km:"yut",lk:void 0,iat:vw.Bk},_),this.Wqt(C)),void 0!==o.data.video_media?(!o.data.video_init||this.wKt&&this.yKt===i.$Ot&&Ma(this.wKt,o.data.video_init)||(P=this.pVt.$Ut(s.BHt.Get,s.BHt).rF(),D={Km:"rRt",lk:{Km:nC.wZ,lk:o.data.video_init},iat:vw.Mk,$Ot:i.$Ot,kzt:{Rrt:'video/mp4; codecs="'+o.metadata.video_codec+'"',UW:s.BHt.UW},CO:P,fLt:i.fLt,BHt:s.BHt},this.wKt=o.data.video_init,this.yKt=i.$Ot,this.bKt=iP(Aa(o.data.video_init)),this.Wqt(D)),N=this.bKt.Z[0],x=yK(o.data.video_media,this.bKt)[0],B=this.sKt(o.data.video_media,N,x,void 0,s.BHt),this.nKt=N,O=io({Km:"yut",lk:{Km:nC.wZ,lk:B},iat:vw.Mk},_),this.Wqt(O),S.push(x)):i.yut.BHt.EFt&&Jn(this.azt,vw.Mk)&&(M=io({Km:"yut",lk:void 0,iat:vw.Mk},_),this.Wqt(M)),this.rKt=s.BHt,this.hKt=S,[2]}})}).call(this)},n.Zg=function(){this.pKt=void 0,this.wKt=void 0,this.mKt=-1,this.yKt=-1,t.prototype.Zg.call(this)},i}(pK),AK=function(){function t(){}return t.prototype._Tt=function(t,i,n){return new bK(this,t,i,n)},t}();function TK(t){return t.Hk===nQ.tOt}function SK(t){return Im.yF(fe.fromBits(t.low,t.high),t.base)}V(),It(),V(),It();var EK=function(t){return t[t.MPEGTS_TO_FMP4=0]="MPEGTS_TO_FMP4",t[t.RAW_AUDIO_TO_FMP4=1]="RAW_AUDIO_TO_FMP4",t}({}),IK=function(){var t=function(){if("undefined"==typeof WebAssembly)return!1;var t=Oi.d_;if(t>0&&t<=56)return!1;try{return void 0!==new WebAssembly.Module(Th("AGFzbQEAAAA="))}catch(t){return!1}}();return IK=function(){return t},t};var RK=function(){function t(t){var i=this;this.VQt=void 0,this.UQt=void 0,this.mQt=void 0,this.qQt=0,this.KQt=eo(),this.HQt=function(t){var n=t.data;if(void 0!==n.requestId){var r=i.KQt.get(n.requestId);if(!r)return;i.KQt.delete(n.requestId),n.success?r.Qy(n.output):r.Ky(new _d(n.errorCode,n.error))}else n.success||i.zg(new _d(n.errorCode,n.error))},this.WQt=function(t){var n=new _d(pd.MEDIA_DECODE_ERROR,t.error.message,t.error);i.zg(n)},this.VQt=t;var n=IK()?"THEOplayer.transmux.js":"THEOplayer.transmux.asmjs.js";try{this.UQt=Vi.Pm(n,t)}catch(t){throw new _d(pd.CONFIGURATION_ERROR,"Invalid player configuration: missing libraryLocation",t)}this.mQt=this.FQt()}var i=t.prototype;return i.vKt=function(t){return this.AKt(EK.MPEGTS_TO_FMP4,t)},i.gKt=function(t){return this.AKt(EK.RAW_AUDIO_TO_FMP4,t)},i.FQt=function(){var t=rK(this.UQt,this.VQt,{name:"THEOplayer transmux worker"});return t.wn("message",this.HQt),t.wn("error",this.WQt),t},i.AKt=function(t,i){var n=++this.qQt,r={type:t,id:n,input:i},e=new Xa;return this.KQt.set(n,e),this.mQt.pQt(r),e.Yy},i.zg=function(t){void 0===t&&(t=new wr),this.KQt.forEach(function(i){return i.Ky(t)}),this.KQt.clear(),this.mQt.bQt()},t}(),CK=function(t){function i(i){var n;return(n=t.call(this)||this).SKt=void 0,n.mQt=void 0,n.SKt=i,n.mQt=void 0,n}Pt(i,t);var n=i.prototype;return n.uKt=function(){return void 0!==this.mQt},n.cKt=function(){var t;return null!=(t=this.mQt)?t:this.mQt=new RK(this.SKt)},n.zg=function(){this.mQt&&(this.mQt.zg(),this.mQt=void 0)},i}(AK),PK=function(){function t(t){this.SKt=void 0,this.SKt=t}return t.prototype.jet=function(){return new CK(this.SKt)},t}(),DK=function(t){function i(i,n,r,e,s){var u,o=function(t){return Y$.US()?new Y$:new hK(t)}(s.libraryLocation),h=new PK(s.libraryLocation),a=new jH(nW.Bg.Bxt,nW.Bg.Nxt,nW.Bg.bct,nW.Bg.Lxt);return(u=t.call(this,i,n,r,e,o,h,a,s)||this).$xt=void 0,Oi.X_&&(u.$xt=new iM(u)),u}Pt(i,t);var n=i.prototype;return n.zP=function(){return this.PL.zP()},n.kn=function(){var i=this;return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return r.sent(),null==(n=this.$xt)||n.kn(),[2]}})}).call(this)},xt(i,[{key:"WP",get:function(){return this.PL.WP},set:function(t){this.PL.WP=t}}]),i}(q$),NK=function(t){function i(i,n,r,e,s){var u,o=new tM(i),h=o.Yq(vw.Mk);return(u=t.call(this,h,n,r,e,s)||this).Nq=void 0,u.Nq=o,u}return Pt(i,t),i.prototype.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),[4,this.Nq.Dq(this.PL)];case 2:return n.sent(),[2]}})}).call(this)},i}(DK),xK=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.Jq=function(i,n){return!!Me(i.useManagedMediaSource)&&(!(!i.useManagedMediaSource&&(Oi.ru||Oi.Tg))&&t.prototype.Jq.call(this,i,n))},n.Zq=function(i){var n=this;return jt(function(){return zt(this,function(r){return i.clearkey&&!i.fairplay&&Oi.X_?[2,!1]:[2,t.prototype.Zq.call(n,i)]})})()},i}(Q$),BK=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).tz=xb._C,i}Pt(i,t);var n=i.prototype;return n.DC=function(t,i,n,r,e,s,u){return new NK(i,n,e,s,r)},n.$q=function(){return!0},i}(xK);rS(new BK),OG.Rt=function(){var t;return Boolean(null==(t=f)?void 0:t.THEOplayerDebugLogsEnabled)},V(),It(),V(),It(),Wt(),Dt(),Yt(),V(),It(),Wt(),Dt(),Yt(),V(),It();var OK=function(){function t(){}var i=t.prototype;return i.sdt=function(t,i){return ot.resolve(!1)},i.Aut=function(t,i){return ot.resolve(void 0)},i.hTt=function(t){return ot.resolve(void 0)},i.jJ=function(t){return ot.resolve(void 0)},t}(),MK=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).Ac=void 0,e.nEt=void 0,e.kKt=void 0,e.DKt=void 0,e.i8=void 0,e.xKt=void 0,e.hT=new dr,e.Ac=i,e.nEt=new kY(r,new OK,i.useCredentials,i.src,i.liveOffset),e.nEt.wn(ch.qw,e.Rs),e.i8=!1,e}Pt(i,t);var n=i.prototype;return n.TKt=function(){var t;return null==(t=this.kKt)?void 0:t.sLt},n.Tn=function(){var t=this;Er(CT(function(){return t.EKt(t.hT.Yg)},this.hT.Yg))},n.EKt=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.nEt.UVt(t)];case 1:return i.sent(),this.xKt&&(this.PKt(this.xKt.Ti,this.xKt.Mi),this.xKt=void 0),this.i8=!0,[2]}})}).call(this)},n.IKt=function(t,i){this.i8?this.PKt(t,i):this.xKt={Ti:t,Mi:i}},n.PKt=function(t,i){var n=this.CKt(t,i),r=null==n?void 0:n.fFt[0];r!==this.kKt&&(this.RKt(),void 0!==r&&(this.kKt=r,this.DKt=new LY(this.nEt,r),this.DKt.iWt()))},n.RKt=function(){this.kKt=void 0,this.DKt&&(this.DKt.zg(),this.DKt=void 0)},n.CKt=function(t,i){var n=Wn(this.nEt.Br._Vt,function(n){return void 0!==n.RRt&&n.RRt.Ti===t&&n.RRt.Mi===i});return null!=n?n:this.nEt.Br._Vt[0]},n.kn=function(){this.Vo(),this.hT.Zg(),this.hT.zg(),this.RKt(),this.nEt.zg()},i}(uh);V(),It(),Bt(),Dt(),Ut();var LK=function(t){function i(i){var n;(n=t.call(this)||this).V8=void 0,n.V8=i;for(var r,e=Ft(oS);!(r=e()).done;){var s=r.value;n.V8.wn(s,n.Rs)}return n}Pt(i,t);var n=i.prototype;return n.Xx=function(t,i){this.zx=t},n.YP=function(){return this.V8.YP()},n.qP=function(){return this.V8.qP()},n.Aa=function(){return this.V8.Aa()},n.sI=function(t){return this.V8.sI(t)},n.zP=function(){return this.V8.zP()},n.we=function(){return this.V8.we()},n.$P=function(){return this.V8.$P()},n.tI=function(){return this.V8.tI()},n.jP=function(){return this.V8.jP()},n.QP=function(){return this.V8.QP()},n.hr=function(){return this.V8.hr()},n.Ta=function(t,i,n){return this.V8.Ta(t,i,n)},n.IP=function(t,i,n,r){return this.V8.IP(t,i,n,r)},n.CP=function(){return this.V8.CP()},n.be=function(){return this.V8.be()},n.JP=function(){return this.V8.JP()},n.ZP=function(){return this.V8.ZP()},n.kn=function(){this.Vo();for(var t,i=Ft(oS);!(t=i()).done;){var n=t.value;this.V8.mn(n,this.Rs)}return this.V8.kn()},xt(i,[{key:"ht",get:function(){return this.V8.ht}},{key:"Fx",get:function(){return this.V8.Fx}},{key:"Vx",get:function(){return this.V8.Vx},set:function(t){this.V8.Vx=t}},{key:"bt",get:function(){return this.V8.bt}},{key:"zx",get:function(){return this.V8.zx},set:function(t){this.V8.zx=t}},{key:"ct",get:function(){return this.V8.ct}},{key:"Qx",get:function(){return this.V8.Qx}},{key:"Jx",get:function(){return this.V8.Jx}},{key:"$x",get:function(){return this.V8.$x}},{key:"iP",get:function(){return this.V8.iP}},{key:"lt",get:function(){return this.V8.lt}},{key:"sP",get:function(){return this.V8.sP}},{key:"rP",get:function(){return this.V8.rP}},{key:"oP",get:function(){return this.V8.oP},set:function(t){this.V8.oP=t}},{key:"cP",get:function(){return this.V8.cP}},{key:"lP",get:function(){return this.V8.lP}},{key:"vP",get:function(){return this.V8.vP},set:function(t){this.V8.vP=t}},{key:"pP",get:function(){return this.V8.pP}},{key:"wP",get:function(){return this.V8.wP},set:function(t){this.V8.wP=t}},{key:"AP",get:function(){return this.V8.AP}},{key:"kP",get:function(){return this.V8.kP}},{key:"xP",get:function(){return this.V8.xP}},{key:"uq",get:function(){return this.V8.uq}},{key:"nt",get:function(){return this.V8.nt}},{key:"DP",get:function(){return this.V8.DP}},{key:"rt",get:function(){return this.V8.rt}},{key:"MP",get:function(){return this.V8.MP}},{key:"OP",get:function(){return this.V8.OP},set:function(t){this.V8.OP=t}},{key:"VP",get:function(){return this.V8.VP}},{key:"WP",get:function(){return this.V8.WP},set:function(t){this.V8.WP=t}},{key:"dq",get:function(){return this.V8.dq}},{key:"OL",get:function(){}}]),i}(hh),FK=function(t){function i(i,n,r){var e;return(e=t.call(this,i)||this).NKt=void 0,e.BKt=void 0,e.MKt=!1,e.oHt=void 0,e.J9=void 0,e.handleManifestUpdate=function(t){e.So(t);var i=e.NKt.TKt();if(i){var n=e.uq;if(n){var r=n.getTime(),s=e.oHt;s||(s=new $Q,e.oHt=s),s.er(i.tFt,function(t){return(t.getTime()-r)/1e3}),!e.MKt&&s.L.V>0&&(e.nt.tt(s),e.J9.tt(s),e.MKt=!0)}}},e.rjt=function(){e.NKt&&e.NKt.IKt(e.MP,e.DP)},e.BKt=n,e.J9=new cN(e),e.wn(ch.Jw,e.rjt),e}Pt(i,t);var n=i.prototype;return n.Ta=function(i,n,r){var e=this;return jt(function(){return zt(this,function(s){switch(s.label){case 0:return[4,t.prototype.Ta.call(e,i,n,r)];case 1:return s.sent(),i.hlsDateRange&&this.myt(i,n),[2]}})}).call(this)},n.myt=function(t,i){this.NKt=new MK(t,i,this.BKt),this.NKt.wn(ch.qw,this.handleManifestUpdate),this.NKt.Tn()},n.hr=function(){return this.oHt&&(this.nt.it(this.oHt),this.J9.it(this.oHt),this.oHt.kn(),this.oHt=void 0,this.MKt=!1),this.NKt&&(this.NKt.kn(),this.NKt=void 0),this.J9.hr(),t.prototype.hr.call(this)},n.kn=function(){return this.mn(ch.Jw,this.rjt),this.NKt&&(this.NKt.kn(),this.NKt=void 0),this.J9.kn(),t.prototype.kn.call(this)},i}(LK);!function(t){tS.iz().ez(t)}(function(t,i,n){return new FK(t,i,n)}),V(),It(),V(),It(),V(),It(),Wt(),Dt(),Yt(),V(),It(),Wt(),Yt(),V(),It(),Bt(),Dt();var UK=function(t){function i(i,n){var r;return void 0===n&&(n=""),(r=t.call(this,"An error occurred while casting.")||this).errorCode=void 0,r.description=void 0,r.errorCode=i,r.description=n,r}return Pt(i,t),xt(i,[{key:"name",get:function(){return"CastError"}}]),i}(gr);function VK(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return zK()?[3,2]:[4,jK(t)];case 1:i.sent(),i.label=2;case 2:return WK()?[3,4]:[4,Rr(100,t)];case 3:i.sent(),i.label=4;case 4:return WK()?[3,6]:(Vi.um('Detected the Chromecast library was loaded without the CAF framework. It is strongly encouraged to load it with the CAF framework by using this URL: "//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"'),[4,HK()]);case 5:i.sent(),i.label=6;case 6:return[2]}})})()}function jK(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){return(null==t?void 0:t.Hg)?[2,ot.reject(new wr)]:(i=function(){var t,i;return{Yy:new ot(function(n,r){t=n,i=r}),Qy:t,Ky:i}}(),n=i.Yy,r=i.Qy,e=i.Ky,s=f.__onGCastApiAvailable,u=function(){f.__onGCastApiAvailable=s,e(new wr)},f.__onGCastApiAvailable=function(i,n){i?r():e(new y(n)),null==t||t.jg(u),f.__onGCastApiAvailable=s,s&&s(i,n)},null==t||t.Xg(u),[2,n])})})()}var HK=bn(function(){return function(t){return new ot(function(i,n){var r=v.createElement("script");r.onload=function(){return i()},r.onerror=function(t){return n((null==t?void 0:t.error)||t)},r.type="text/javascript",r.src=t,(v.head||v.documentElement).appendChild(r)})}("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js").catch(function(){throw new UK("API_NOT_INITIALIZED","The Chromecast library could not be loaded successfully.")})});function WK(){return Boolean("undefined"!=typeof cast&&cast.framework)}function zK(){return"undefined"!=typeof chrome&&chrome&&chrome.cast&&chrome.cast.isAvailable}function qK(t,i,n,r){if(Fi(i))for(var e,s=Ft(b.keys(i));!(e=s()).done;){var u=e.value;if("type"!==u&&"images"!==u){var o=i[u];Fi(o)&&(t[u]=o)}}!function(t,i,n,r){if(!Fi(n)&&!Fi(null==i?void 0:i.images))return;t.images=[],n&&t.images.push(new r.Image(n));if(null==i?void 0:i.images)if(qi(i.images))t.images.push(new r.Image(i.images));else if(ji(i.images))for(var e,s=Ft(i.images);!(e=s()).done;){var u,o,h=e.value,a=void 0;if(qi(h))a=new r.Image(h);else(a=new r.Image(h.src)).height=null!=(u=h.height)?u:null,a.width=null!=(o=h.width)?o:null;t.images.push(a)}}(t,i,n,r)}function XK(t,i,n){return void 0===n&&(n=chrome),function(t,i,n){switch(null==t?void 0:t.type){case"movie":var r=new n.MovieMediaMetadata;return qK(r,t,i,n),r;case"audio":var e=new n.MusicTrackMediaMetadata;return qK(e,t,i,n),!Fi(e.artist)&&Fi(t.artistName)&&(e.artist=t.artistName),e;case"tv-show":var s=new n.TvShowMediaMetadata;return qK(s,t,i,n),!Fi(s.title)&&Fi(t.episodeTitle)&&(s.title=t.episodeTitle),!Fi(s.season)&&Fi(t.seasonNumber)&&(s.season=t.seasonNumber),!Fi(s.episode)&&Fi(t.episodeNumber)&&(s.episode=t.episodeNumber),s;default:var u=new n.GenericMediaMetadata;return qK(u,t,i,n),u}}(t,i,function(t){return{GenericMediaMetadata:t.cast.media.GenericMediaMetadata,MovieMediaMetadata:t.cast.media.MovieMediaMetadata,TvShowMediaMetadata:t.cast.media.TvShowMediaMetadata,MusicTrackMediaMetadata:t.cast.media.MusicTrackMediaMetadata,Image:t.cast.Image}}(n))}function GK(t){switch(t){case chrome.cast.ErrorCode.CANCEL:return"CANCEL";case chrome.cast.ErrorCode.TIMEOUT:return"TIMEOUT";case chrome.cast.ErrorCode.API_NOT_INITIALIZED:return"API_NOT_INITIALIZED";case chrome.cast.ErrorCode.INVALID_PARAMETER:return"INVALID_PARAMETER";case chrome.cast.ErrorCode.EXTENSION_NOT_COMPATIBLE:return"EXTENSION_NOT_COMPATIBLE";case chrome.cast.ErrorCode.EXTENSION_MISSING:return"EXTENSION_MISSING";case chrome.cast.ErrorCode.RECEIVER_UNAVAILABLE:return"RECEIVER_UNAVAILABLE";case chrome.cast.ErrorCode.SESSION_ERROR:return"SESSION_ERROR";case chrome.cast.ErrorCode.CHANNEL_ERROR:return"CHANNEL_ERROR";case chrome.cast.ErrorCode.LOAD_MEDIA_FAILED:return"LOAD_MEDIA_FAILED";default:return"CANCEL"}}function QK(t){if(t.items&&t.items.length>0&&Fi(t.currentItemId)&&t.currentItemId>=0)return Wn(t.items,function(i){return i.itemId===t.currentItemId})}V(),It(),Wt(),Dt(),Ut(),Yt(),V(),It(),Bt(),Dt(),V(),It(),V(),It(),Ut(),V(),It();var YK="urn:x-cast:com.theoplayer.cast";V(),It(),V(),It();var $K=function(t){return t.LKt="theoplayer_receiver_info",t.OKt="theoplayer_trackpropertychange",t.FKt="theoplayer_propertychange",t}({});V(),It();var KK=function(t){return t.SKIP_AD="SKIP_AD",t}({});V(),It();function JK(t){v.createElement("img").src=t}V(),It(),Ut(),V(),It(),Wt(),Bt(),Yt(),V(),It();var ZK=new RegExp(/^(\d\d):(\d\d):(\d\d)(?:\.(\d{3}))?$/);function tJ(t){if(qi(t)){var i=t.match(ZK);if(i)return 3600*T(i[1],10)+60*T(i[2],10)+Number(i[3])+(Number(i[4])||0)/1e3}}function iJ(t){if(void 0!==t){var i=t.match(/^([1-9]?\d|100)%$/);if(i)return T(i[1])/100}}function nJ(t,i){return"vmap"===t.type||!Fi(t.type)&&!Fi(i)}function rJ(t,i){return"vast"===t.type||!Fi(t.type)&&Fi(i)}V(),It(),Wt(),H(),Ut(),Yt(),V(),It(),Bt(),Dt(),V(),It();var eJ=function(){},sJ=function(t){function i(i){var n;return(n=t.call(this)||this).qc=void 0,n.HKt=void 0,n.qc=i.sort(function(t,i){return t.zB-i.zB}),n}return Pt(i,t),i.prototype.VKt=function(){return null!=this.HKt||(this.HKt=nr(this.qc,function(t){return t.VKt()})),this.HKt},xt(i,[{key:"UKt",get:function(){return this.qc}}]),i}(eJ);V(),It(),Bt(),Dt(),Ut(),V(),It(),Bt(),Dt();var uJ=function(t){function i(i,n){var r;return(r=t.call(this)||this).WKt=void 0,r.qKt=void 0,r.GKt=void 0,r.WKt=i,r.qKt=n,r.GKt=!1,r}return Pt(i,t),xt(i,[{key:"o",get:function(){return this.WKt}},{key:"zB",get:function(){return this.qKt}},{key:"zKt",get:function(){return this.GKt}}]),i}(eJ),oJ=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,i,n)||this).KKt=void 0,h.JKt=void 0,h.$Kt=void 0,h.jKt=void 0,h.nq=void 0,h.tYt=void 0,h.KKt=r,h.JKt=e,h.$Kt=s,h.jKt=u,h.nq=o,h}return Pt(i,t),i.prototype.VKt=function(){if(void 0===this.tYt){for(var t,i,n,r,e=[],s=Ft(this.jKt);!(r=s()).done;){var u=r.value;u.iYt&&(t=u.iYt),u.eYt&&(i=u.eYt),u.sYt&&(n=u.sYt),e=e.concat(u.universalAdIds)}this.tYt={ZKt:this.ZKt,iYt:t,nYt:i,sYt:n,lt:this.lt,rYt:e}}return[this.tYt]},xt(i,[{key:"XKt",get:function(){return this.jKt}},{key:"QKt",get:function(){return this.KKt}},{key:"YKt",get:function(){return this.JKt}},{key:"ZKt",get:function(){return this.$Kt}},{key:"lt",get:function(){return this.nq}}]),i}(uJ);V(),It(),Bt(),Dt(),Ut(),V(),It(),Bt();var hJ=function(){function t(t,i){this.oYt=void 0,this.uYt=void 0,this.oYt=t,this.uYt=i}return xt(t,[{key:"hYt",get:function(){return this.oYt}},{key:"aYt",get:function(){return this.uYt}}]),t}(),aJ=function(){function t(t,i,n,r,e,s){this.dYt=void 0,this.fYt=void 0,this._Yt=void 0,this.pYt=void 0,this.AYt=void 0,this.yYt=void 0,this.mYt=void 0,this.KKt=void 0,this.dYt=t,this.fYt=i,this._Yt=n,this.pYt=r,this.AYt=!1,this.yYt=e,this.KKt=s}return t.prototype.SYt=function(){this.AYt=!0},xt(t,[{key:"cYt",get:function(){return this.dYt}},{key:"lYt",get:function(){return this.fYt}},{key:"vYt",get:function(){return this._Yt}},{key:"gYt",get:function(){return this.pYt}},{key:"od",get:function(){return this.mYt},set:function(t){this.mYt=t}},{key:"wYt",get:function(){return this.yYt}},{key:"bYt",get:function(){return this.AYt}},{key:"QKt",get:function(){return this.KKt}}]),t}();V(),It(),Bt();var cJ=function(t){return t.TYt="all",t.kYt="any",t.pz="none",t}({});var fJ=function(){function t(t,i){this.xYt=void 0,this.IYt=void 0,this.xYt=t,this.IYt=i}return xt(t,[{key:"EYt",get:function(){return this.xYt}},{key:"PYt",get:function(){return this.IYt}}]),t}(),vJ=function(){function t(t,i,n,r,e,s,u,o,h,a,c,f,v,d,l,g){this.lA=void 0,this.fA=void 0,this.aS=void 0,this.RYt=void 0,this.NYt=void 0,this.MYt=void 0,this.OYt=void 0,this.UYt=void 0,this.HYt=void 0,this.qYt=void 0,this.dYt=void 0,this.fYt=void 0,this._Yt=void 0,this.GYt=void 0,this.XYt=void 0,this.QYt=void 0,this.lA=t,this.fA=i,this.aS=n,this.RYt=r,this.NYt=e,this.MYt=s,this.OYt=u,this.UYt=o,this.HYt=h,this.qYt=a,this.dYt=c,this.fYt=f,this._Yt=v,this.GYt=d,this.XYt=l,this.QYt=g}return xt(t,[{key:"o",get:function(){return this.aS}},{key:"Ti",get:function(){return this.lA}},{key:"Mi",get:function(){return this.fA}},{key:"CYt",get:function(){return this.RYt}},{key:"DYt",get:function(){return this.NYt}},{key:"BYt",get:function(){return this.MYt}},{key:"LYt",get:function(){return this.OYt}},{key:"FYt",get:function(){return this.UYt}},{key:"VYt",get:function(){return this.HYt}},{key:"WYt",get:function(){return this.qYt}},{key:"cYt",get:function(){return this.dYt}},{key:"lYt",get:function(){return this.fYt}},{key:"vYt",get:function(){return this._Yt}},{key:"zYt",get:function(){return this.GYt}},{key:"aYt",get:function(){return this.XYt}},{key:"jYt",get:function(){return this.QYt}}]),t}();V(),It(),Bt();var dJ=function(){function t(t,i){this.aS=void 0,this.NFt=void 0,this.aS=t,this.NFt=i}return xt(t,[{key:"id",get:function(){return this.aS}},{key:"uri",get:function(){return this.NFt}}]),t}(),lJ=function(){function t(t,i,n,r){this.YYt=void 0,this.ZYt=void 0,this.tJt=void 0,this.eJt=void 0,this.YYt=t,this.ZYt=i,this.tJt=n,this.eJt=r}return xt(t,[{key:"KYt",get:function(){return this.YYt}},{key:"JYt",get:function(){return this.ZYt}},{key:"$Yt",get:function(){return this.tJt}},{key:"iJt",get:function(){return this.eJt}}]),t}(),gJ=function(t){function i(i,n,r,e,s,u,o,h,a){var c;return(c=t.call(this,i,n)||this).$Kt=void 0,c.nJt=void 0,c.hJt=void 0,c.aJt=void 0,c.cJt=void 0,c.jKt=void 0,c.nq=void 0,c.HKt=void 0,c.$Kt=r,c.nJt=e,c.hJt=s,c.jKt=u,c.aJt=o,c.cJt=h,c.nq=a,c}Pt(i,t);var n=i.prototype;return n.VKt=function(){var t=this;return void 0===this.nJt?[]:(null!=this.HKt||(this.HKt=this.nJt.VKt().map(function(i){return t.dJt(i)})),this.HKt)},n.dJt=function(t){for(var i,n,r,e,s=Ft(this.XKt);!(e=s()).done;){var u=e.value;u.iYt&&(i=u.iYt),u.eYt&&(n=u.eYt),u.sYt&&(r=u.sYt)}var o=t.ZKt.concat(this.ZKt),h=t.iYt;if(i&&t.iYt){var a=new lJ(t.iYt.lJt.KYt,t.iYt.lJt.JYt,t.iYt.lJt.$Yt.concat(i.lJt.$Yt),t.iYt.lJt.iJt.concat(i.lJt.iJt));(h=t.iYt).lJt=a,h.aYt=h.aYt.concat(i.aYt)}var c=t.nYt;if(n&&n.hYt){for(var f,v,d,l=[],g=Ft(n.hYt);!(d=g()).done;){var w=d.value;l.concat(w.gYt.$Yt)}for(var m,p,y,_=[],k=Ft(null!=(m=null==(f=t.nYt)?void 0:f.hYt)?m:[]);!(p=k()).done;){var b,A,T,S=p.value,E=new lJ(S.gYt.KYt,S.gYt.JYt,S.gYt.$Yt.concat(l),(null!=(A=null==(b=t.iYt)?void 0:b.lJt.iJt)?A:[]).concat(null!=(T=null==i?void 0:i.lJt.iJt)?T:[]));_.push(new aJ(S.cYt,S.lYt,S.vYt,E,S.wYt,S.QKt))}c=new hJ(_,(null!=(y=null==(v=t.nYt)?void 0:v.aYt)?y:[]).concat(n.aYt))}var I=t.sYt;if(I){var R,C,P,D=I.EYt;r&&r.EYt&&(D=r.EYt),I=new fJ(D,(null!=(C=null==(R=t.sYt)?void 0:R.PYt)?C:[]).concat(null!=(P=null==r?void 0:r.PYt)?P:[]))}var N=t.lt;return this.lt&&(N=this.lt),{ZKt:o,iYt:h,nYt:c,sYt:I,lt:N,rYt:t.rYt}},xt(i,[{key:"ZKt",get:function(){return this.$Kt}},{key:"sJt",get:function(){return this.nJt}},{key:"rJt",get:function(){return this.hJt}},{key:"XKt",get:function(){return this.jKt}},{key:"oJt",get:function(){return this.aJt}},{key:"uJt",get:function(){return this.cJt}},{key:"lt",get:function(){return this.nq}}]),i}(uJ);V(),It(),Bt();var wJ=function(){function t(t,i,n,r,e,s,u,o){this.aS=void 0,this.vJt=void 0,this.gJt=void 0,this.UYt=void 0,this.pJt=void 0,this.mJt=void 0,this.wJt=void 0,this.yJt=void 0,this.aS=t,this.vJt=i,this.gJt=n,this.UYt=r,this.pJt=e,this.mJt=s,this.wJt=u,this.yJt=o}return xt(t,[{key:"o",get:function(){return this.aS}},{key:"fJt",get:function(){return this.vJt}},{key:"_Jt",get:function(){return this.gJt}},{key:"FYt",get:function(){return this.UYt}},{key:"iYt",get:function(){return this.pJt}},{key:"eYt",get:function(){return this.mJt}},{key:"sYt",get:function(){return this.wJt}},{key:"universalAdIds",get:function(){return this.yJt}}]),t}();V(),It(),Bt();var mJ=function(){function t(t,i,n,r,e,s,u,o,h){this.bJt=void 0,this.SJt=void 0,this.IJt=void 0,this.uYt=void 0,this.TJt=void 0,this.EJt=void 0,this.AYt=void 0,this.yYt=void 0,this.mYt=void 0,this.KKt=void 0,this.RJt=void 0,this.NJt=void 0,this.bJt=t,this.SJt=i,this.uYt=n,this.TJt=r,this.EJt=e,this.AYt=!1,this.yYt=s,this.KKt=u,this.RJt=o,this.NJt=h}return t.prototype.SYt=function(){this.AYt=!0},xt(t,[{key:"ct",get:function(){return this.bJt}},{key:"AJt",get:function(){return this.SJt}},{key:"aYt",get:function(){return this.uYt},set:function(t){this.uYt=t}},{key:"lJt",get:function(){return this.TJt},set:function(t){this.TJt=t}},{key:"kJt",get:function(){return this.EJt},set:function(t){this.EJt=t}},{key:"xJt",get:function(){return this.AYt}},{key:"od",get:function(){return this.mYt},set:function(t){this.mYt=t}},{key:"wYt",get:function(){return this.yYt}},{key:"QKt",get:function(){return this.KKt}},{key:"PJt",get:function(){return this.IJt},set:function(t){this.IJt=t}},{key:"CJt",get:function(){return this.RJt}},{key:"DJt",get:function(){return this.NJt}}]),t}();function pJ(t,i){return bJ(t)&&t.getAttribute(i)||void 0}function yJ(t,i){return _J(t,i,void 0,!1)}function _J(t,i,n,r){return i===(t.localName?t.localName:t.nodeName)&&(r&&n?n===t.namespaceURI:!n||!t.namespaceURI||n===t.namespaceURI)}function kJ(t,i){for(var n=[],r=0;r0)throw new y('Invalid document for MIME type "'+i+'"');return n}function TJ(t){return AJ(t,"text/xml")}function SJ(t){return t.replace(/[<>&'"]/g,function(t){switch(t){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return""";default:return t}})}function EJ(t){return"data:application/xml,"+encodeURIComponent(t)}V(),It(),V(),It(),Bt();var IJ=function(t){return t.BJt="mute",t.MJt="unmute",t.jw="pause",t.LJt="resume",t.OJt="rewind",t.FJt="skip",t.UJt="playerExpand",t.VJt="playerCollapse",t.HJt="fullscreen",t.WJt="exitFullscreen",t.qJt="expand",t.COLLAPSE="collapse",t.tTt="start",t.zJt="firstQuartile",t.GJt="thirdQuartile",t.XJt="midpoint",t.jJt="complete",t.QJt="acceptInvitationLinear",t.KJt="acceptInvitation",t.YJt="timeSpentViewing",t.JJt="otherAdInteraction",t.Qw="progress",t.ZJt="creativeView",t.$Jt="adExpand",t.tZt="adCollapse",t.iZt="minimize",t.eZt="close",t.sZt="closeLinear",t.nZt="overlayViewDuration",t.rZt="breakStart",t.hZt="breakEnd",t.ma="error",t}({});function RJ(t){switch(t){case"breakStart":case"breakEnd":case"error":return!0;default:return!1}}var CJ=["mute","unmute","pause","resume","rewind","skip","closeLinear","close","playerExpand","playerCollapse","fullscreen","exitFullscreen","expand","collapse","creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","acceptInvitationLinear","acceptInvitation","timeSpentViewing","otherAdInteraction","progress"];function PJ(t){return void 0!==t&&-1!==CJ.indexOf(t)}var DJ=["start","firstQuartile","midpoint","thirdQuartile","complete","mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","expand","collapse","fullscreen","exitFullscreen","creativeView","acceptInvitation","adExpand","adCollapse","minimize","close","overlayViewDuration","otherAdInteraction","progress"];function NJ(t){return void 0!==t&&-1!==DJ.indexOf(t)}var xJ=["mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","creativeView"];function BJ(t){return void 0!==t&&-1!==xJ.indexOf(t)}function OJ(t,i){if(void 0!==t&&""!==t&&void 0!==i){var n=t.match(/^(\d+):(\d+):(\d+)$/);return n?S(n[1]||"0")+60*S(n[2]||"0")+S(n[3]||"0"):(n=t.match(/^(100|[1-9]\d|\d)%$/))?S(n[1]||"0")*i/100:void 0}}var MJ=function(){function t(t,i,n){this.oZt=void 0,this.aZt=void 0,this.uZt=void 0,this.oZt=t,this.aZt=i,this.uZt=n}return xt(t,[{key:"oX",get:function(){return this.oZt}},{key:"ac",get:function(){return this.aZt}},{key:"eventURL",get:function(){return this.uZt}}]),t}();V(),It(),Bt(),Dt();var LJ=function(){function t(t){this.dZt=void 0,this.dZt=t}return xt(t,[{key:"cZt",get:function(){return this.dZt}}]),t}(),FJ=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i)||this).fZt=void 0,s.QYt=void 0,s.YYt=void 0,s.fZt=n,s.YYt=r,s.QYt=e,s}return Pt(i,t),xt(i,[{key:"KYt",get:function(){return this.YYt}},{key:"jYt",get:function(){return this.QYt}},{key:"lZt",get:function(){return this.fZt}}]),i}(LJ),UJ=function(t){function i(i){return t.call(this,i)||this}return Pt(i,t),i}(LJ),VJ=function(t){function i(i){return t.call(this,i)||this}return Pt(i,t),i}(LJ);V(),It(),Bt();var jJ={vZt:{Jy:100,Iy:"XML parsing error."},_Zt:{Jy:303,Iy:"Empty or invalid VAST error."},gZt:{Jy:400,Iy:"General linear error"},pZt:{Jy:403,Iy:"Unsupported MIME-type or missing mediafiles error"},mZt:{Jy:500,Iy:"General nonlinear error"},BG:{Jy:900,Iy:"Network error"}},HJ=function(){function t(t){this.yZt=void 0,this.yZt=t}return t.prototype.bZt=function(t){if(this.wZt){var i=this.wZt.replace(/\[ERRORCODE]/,""+t.Jy);JK(i)}},xt(t,[{key:"wZt",get:function(){return this.yZt}}]),t}();V(),It(),Bt(),Dt();var WJ=function(t){function i(i,n,r,e){var s;return(s=t.call(this,r||n&&XJ[n]||i,e)||this).SZt=void 0,s.kZt=void 0,s.G2=void 0,s.SZt=i,s.kZt=n,s.G2=r,s}return Pt(i,t),xt(i,[{key:"AZt",get:function(){return this.SZt}},{key:"TZt",get:function(){var t;return null!=(t=this.kZt)?t:900}}]),i}(gr),zJ=function(t){return t.ADBLOCK="adblock",t.NETWORK="network",t.PARSING="parsing",t.PLAYBACK="playback",t.GENERAL="general",t}({}),qJ=function(t){return t[t.VAST_MALFORMED_RESPONSE=100]="VAST_MALFORMED_RESPONSE",t[t.VAST_SCHEMA_VALIDATION_ERROR=101]="VAST_SCHEMA_VALIDATION_ERROR",t[t.VAST_UNSUPPORTED_VERSION=102]="VAST_UNSUPPORTED_VERSION",t[t.VAST_TRAFFICKING_ERROR=200]="VAST_TRAFFICKING_ERROR",t[t.VAST_UNEXPECTED_LINEARITY=201]="VAST_UNEXPECTED_LINEARITY",t[t.VAST_UNEXPECTED_DURATION_ERROR=202]="VAST_UNEXPECTED_DURATION_ERROR",t[t.UNEXPECTED_SIZE=203]="UNEXPECTED_SIZE",t[t.VAST_WRAPPER_ERROR=300]="VAST_WRAPPER_ERROR",t[t.VAST_LOAD_TIMEOUT=301]="VAST_LOAD_TIMEOUT",t[t.VAST_TOO_MANY_REDIRECTS=302]="VAST_TOO_MANY_REDIRECTS",t[t.VAST_NO_ADS_AFTER_WRAPPER=303]="VAST_NO_ADS_AFTER_WRAPPER",t[t.GENERAL_LINEAR_ERROR=400]="GENERAL_LINEAR_ERROR",t[t.FILE_NOT_FOUND=401]="FILE_NOT_FOUND",t[t.VAST_MEDIA_LOAD_TIMEOUT=402]="VAST_MEDIA_LOAD_TIMEOUT",t[t.VAST_LINEAR_ASSET_MISMATCH=403]="VAST_LINEAR_ASSET_MISMATCH",t[t.VAST_PROBLEM_DISPLAYING_MEDIA_FILE=405]="VAST_PROBLEM_DISPLAYING_MEDIA_FILE",t[t.MEZZANINE_FILE_REQUIRES=406]="MEZZANINE_FILE_REQUIRES",t[t.MEZZANINE_FILE_DOWNLOADED_FIRST_TIME=407]="MEZZANINE_FILE_DOWNLOADED_FIRST_TIME",t[t.AD_IN_VAST_REJECTED=408]="AD_IN_VAST_REJECTED",t[t.INTERACTIVE_CREATIVE_NOT_EXECUTED=409]="INTERACTIVE_CREATIVE_NOT_EXECUTED",t[t.VERIFICATION_CODE_NOT_EXECUTED=410]="VERIFICATION_CODE_NOT_EXECUTED",t[t.GENERAL_NON_LINEAR_ERROR=500]="GENERAL_NON_LINEAR_ERROR",t[t.NONLINEAR_DIMENSIONS_ERROR=501]="NONLINEAR_DIMENSIONS_ERROR",t[t.OVERLAY_AD_LOADING_FAILED=502]="OVERLAY_AD_LOADING_FAILED",t[t.VAST_NONLINEAR_ASSET_MISMATCH=503]="VAST_NONLINEAR_ASSET_MISMATCH",t[t.GENERAL_COMPANION_AD_ERROR=600]="GENERAL_COMPANION_AD_ERROR",t[t.INVALID_DIMENSIONS_COMPANION_AD=601]="INVALID_DIMENSIONS_COMPANION_AD",t[t.COMPANION_REQUIRED_ERROR=602]="COMPANION_REQUIRED_ERROR",t[t.COMPANION_AD_LOADING_FAILED=603]="COMPANION_AD_LOADING_FAILED",t[t.UNABLE_TO_FIND_SUPPORTED_COMPANION=604]="UNABLE_TO_FIND_SUPPORTED_COMPANION",t[t.UNKNOWN_ERROR=900]="UNKNOWN_ERROR",t[t.GENERAL_VPAID_ERROR=901]="GENERAL_VPAID_ERROR",t[t.MALFORMED_URI=1005]="MALFORMED_URI",t[t.VAST_ASSET_NOT_FOUND=1007]="VAST_ASSET_NOT_FOUND",t[t.VAST_EMPTY_RESPONSE=1009]="VAST_EMPTY_RESPONSE",t[t.UNKNOWN_AD_RESPONSE=1010]="UNKNOWN_AD_RESPONSE",t[t.UNSUPPORTED_LOCALE=1011]="UNSUPPORTED_LOCALE",t[t.INVALID_ARGUMENTS=1101]="INVALID_ARGUMENTS",t[t.INVALID_ADX_EXTENSION=1105]="INVALID_ADX_EXTENSION",t[t.AUTOPLAY_DISALLOWED=1205]="AUTOPLAY_DISALLOWED",t}({}),XJ={100:"XML parsing error.",101:"VAST schema validation error.",102:"VAST version of response not supported.",200:"Trafficking error. The video player received an ad type that it was not expecting and/or cannot display.",201:"Video player expecting different linearity.",202:"Video player expecting different duration.",203:"Video player expecting different size.",300:"General wrapper error.",301:"Timeout of VAST URI provided in wrapper element, or of VAST URI provided in a subsequent wrapper element. This includes request errors such as invalid URI, unreachable or request timeout for URI, and security or other exceptions related to requesting a VAST URI.",302:"Wrapper limit reached, as defined by the video player. Too many wrapper responses have been received with no InLine response. This can be caused by a circular loop of daisy chaining (one network bouncing to another and another).",303:"No ads VAST response after one or more wrappers. This also includes the number of empty VAST responses from fallback.",400:"General linear error. The video player is unable to display the linear ad.",401:"File not found. Unable to find Linear/MediaFile from URI.",402:"Unable to download or timeout of MediaFile URI.",403:"Could not find a media file that is supported by this video player, based on the attributes of the MediaFile element.",405:"Problem displaying a media file.",406:"A mezzanine file was required, but not provided.",407:"The mezzanine file was downloaded for the first time, so the ad did not serve. This can occur when an ad insertion is missed because the creative is being transcoded. It continues to occur until the creative is available for insertion.",408:"The ad returned in the VAST response was rejected.",409:"The interactive creative defined in the InteractiveCreativeFile node was not executed.",410:"The code referenced in the Verification node was not executed.",500:"General NonLinearAds error.",501:"Unable to display non-linear ad because creative dimensions do not align with creative display area (in other words, the creative dimension was too large). This can occur if you use CSS styles to set width and height of the video ,content element. You should instead use the width and height HTML attributes.",502:"Unable to fetch NonLinearAds/NonLinear resource.",503:"Could not find NonLinearResource with supported type. This can occur when a creative size is larger than the player size.",600:"General CompanionAds error.",601:"Unable to display companion because creative dimensions do not fit within the companion display area (in other words, space was not available).",602:"Unable to display required companion.",603:"Unable to fetch CompanionAds/Companion resource.",604:"Could not find Companion resource with supported type.",900:"VAST 2 error. Even if you request VAST 3 or your DFP network default is VAST 3, this can occur if you have a VAST redirect that returns a VAST 2 response.",901:"General VPAID error",1005:"URI malformed."};function GJ(t){if(!t)return!1;switch(t.toLocaleLowerCase()){case kA._C:case kA.gC:case kA.vC:return!0;default:return!1}}function QJ(t){var i=xr();return!!(GJ(t)||t&&i&&(null==i?void 0:i.canPlayType)&&i.canPlayType(t))||($J("Invalid or unsupported MediaFile Content delivery type, skipping mediafile"),!1)}function YJ(t,i){for(var n,r=Ft(i);!(n=r()).done;){var e=n.value;new HJ(e).bZt(t)}}function $J(t){0}V(),It(),Ut(),V(),It(),Bt();var KJ=function(){function t(t,i){this.xZt=void 0,this.IZt=void 0,this.xZt=t,this.IZt=i}return xt(t,[{key:"EZt",get:function(){return this.xZt}},{key:"PZt",get:function(){return this.IZt}}]),t}(),JJ=function(){function t(){}var i=t.prototype;return i.CZt=function(i,n){return jt(function(){var r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return nJ(i.sources,i.timeOffset)?[4,t.RZt(i.sources.src,n)]:[3,7];case 1:if(r=o.sent(),!(e=r&&r.documentElement))throw new WJ(zJ.NETWORK,qJ.VAST_SCHEMA_VALIDATION_ERROR,"Ad source is not a valid XML document.");return yJ(e,"VMAP")?[4,this.DZt(e,i,n)]:[3,3];case 2:return[2,o.sent()];case 3:return yJ(e,"VAST")?[4,this.NZt(e,n,!1)]:[3,5];case 4:return(s=o.sent())?(u=new rZ("",!0,!0,s),[2,[new iZ("start",u,ZJ.BZt,"",[],!1,!0,i)]]):[2,[]];case 5:throw new WJ(zJ.GENERAL,qJ.VAST_MALFORMED_RESPONSE,"Only VMAP and VAST files are allowed as ad source.");case 6:return[3,8];case 7:if(rJ(i.sources,i.timeOffset))return[2,[new nZ(String(i.timeOffset),i,n)]];throw new WJ(zJ.GENERAL,qJ.VAST_MALFORMED_RESPONSE,"Something went wrong parsing the ad source; only VMAP and VAST files are allowed as ad source.");case 8:return[2]}})}).call(this)},i.MZt=function(){return jt(function(i,n,r,e){var s,u,o;return zt(this,function(h){switch(h.label){case 0:void 0===e&&(e=[]),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,t.RZt(i,n)];case 2:return s=h.sent(),[3,4];case 3:throw u=h.sent(),YJ(j(u,WJ)&&u.TZt===qJ.VAST_MALFORMED_RESPONSE?jJ._Zt:jJ.BG,e),u;case 4:return(o=s&&s.documentElement)&&yJ(o,"VAST")?[4,this.NZt(o,n,r,e)]:[3,6];case 5:return[2,h.sent()];case 6:o&&yJ(o,"VMAP")&&Vi.um("Received VMAP ad when expecting VAST. Please set the type of your ad source in the configuration, or make sure to not set a timeOffset for VMAP ad sources. VMAP ads have their own offsets included."),h.label=7;case 7:return[2,void 0]}})}).apply(this,arguments)},i.LZt=function(t,i,n,r){return jt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(!(null==(e=t.sources)?void 0:e.src))throw new WJ(zJ.GENERAL,qJ.MALFORMED_URI,"Property src on adSource is missing.");return[4,this.MZt(t.sources.src,r,!1)];case 1:return s=h.sent(),u=new rZ("",!0,!0,s),(o=new iZ(i,u,ZJ.BZt,"",[],!1,!0,t)).OZt=n,[2,o]}})}).call(this)},i.NZt=function(){return jt(function(t,i,n,r){var e,s,u,o,h,a,c,f,v,d,l,g;return zt(this,function(w){switch(w.label){case 0:if(void 0===r&&(r=[]),e=[],s=[],u=[],!t||!yJ(t,"VAST")){if(YJ(jJ._Zt,r),n)throw new WJ(zJ.PARSING,qJ.VAST_NO_ADS_AFTER_WRAPPER,"No VAST element found after wrapper.");throw new WJ(zJ.PARSING,qJ.VAST_EMPTY_RESPONSE,"The VAST element was empty.")}if(0===kJ(t,"Ad").length)return[3,7];o=Ft(kJ(t,"Ad")),w.label=1;case 1:if((h=o()).done)return[3,6];a=h.value,w.label=2;case 2:return w.trys.push([2,4,,5]),[4,this.FZt(a,i,r)];case 3:return 0===(c=w.sent()).zB?e.push(c):s.push(c),[3,5];case 4:return f=w.sent(),u.push(f),[3,5];case 5:return[3,1];case 6:if(0===e.length&&0===s.length&&u.length>0)throw u[0];if(1===e.length&&0===s.length)return[2,e[0]];if(0===e.length&&0!==s.length)return[2,new sJ(s)];if(e.length>0||s.length>0)return[2,new sJ(s.concat(e))];w.label=7;case 7:if(0!==kJ(t,"Error").length)for(v=Ft(kJ(t,"Error"));!(d=v()).done;)l=d.value,$J(jJ._Zt.Iy),(g=l.textContent)&&r.push(g.trim());if(YJ(jJ._Zt,r),n)throw new WJ(zJ.PARSING,qJ.VAST_NO_ADS_AFTER_WRAPPER,"No VAST element found after wrapper.");throw new WJ(zJ.PARSING,qJ.VAST_EMPTY_RESPONSE,"The VAST element was empty.")}})}).apply(this,arguments)},i.DZt=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:if(r=[],0===(e=kJ(t,"AdBreak")).length)throw new WJ(zJ.PARSING,qJ.VAST_EMPTY_RESPONSE,"The VMAP element was empty.");s=Ft(e),c.label=1;case 1:if((u=s()).done)return[3,6];o=u.value,c.label=2;case 2:return c.trys.push([2,4,,5]),[4,this.UZt(o,i,n)];case 3:return(h=c.sent())&&r.push(h),[3,5];case 4:return a=c.sent(),Vi.hm(a),[3,5];case 5:return[3,1];case 6:return[2,r]}})}).call(this)},i.FZt=function(i,n,r){return jt(function(){var e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return e=pJ(i,"id")||"",(s=FU(pJ(i,"sequence")))||(s=0),u=kJ(i,"InLine"),0===(o=kJ(i,"Wrapper")).length?[3,2]:[4,this.VZt(o[0],e,s,n,r)];case 1:return[2,h.sent()];case 2:if(0!==u.length)return[2,t.HZt(u[0],e,s,r)];h.label=3;case 3:throw new WJ(zJ.PARSING,qJ.VAST_SCHEMA_VALIDATION_ERROR,"An Ad tag without a Wrapper or inline element cannot be parsed")}})}).call(this)},i.VZt=function(i,n,r,e,s){return jt(function(){var u,o,h,a,c,f,v,d,l,g,w,m,p,y,_,k,b;return zt(this,function(A){switch(A.label){case 0:for(u=kJ(i,"Error")[0],o="",u&&u.textContent&&(o=u.textContent,s.push(o)),h=kJ(i,"AdSystem")[0],a="",h&&(a=h.textContent||a),c=[],f=Ft(kJ(i,"Impression"));!(v=f()).done;)(d=v.value).textContent&&c.push(d.textContent);return l=kJ(i,"VASTAdTagURI")[0],g="",l&&l.textContent&&(g=l.textContent),[4,this.MZt(g,e,!0,s)];case 1:return w=A.sent(),m=t.WZt(kJ(i,"Extensions")[0]),p=kJ(i,"Creatives")[0],y=[],p&&(y=t.zZt(p,a,m,s)),(_=VU(pJ(i,"followAdditionalWrappers")))||(_=!0),(k=VU(pJ(i,"allowMultipleAds")))||(k=!0),(b=VU(pJ(i,"fallbackOnNoAd")))||(b=!1),[2,new gJ(n,r,c,w,_,y,k,b,new HJ(o))]}})}).call(this)},i.UZt=function(i,n,r){return jt(function(){var e,s,u,o,h,a,c,f,v,d,l,g,w,m,p,y,_;return zt(this,function(k){switch(k.label){case 0:if(e=pJ(i,"timeOffset")||"0",s=pJ(i,"breakType")||ZJ.yk,u=pJ(i,"breakId"),o=VU(pJ(i,"repeatAfter")),h=void 0!==tZ.$Zt(e),void 0===u&&(u=""),void 0===o&&(o=!1),!h)throw new WJ(zJ.PARSING,qJ.VAST_SCHEMA_VALIDATION_ERROR,"Invalid TimeOffset type");if(a=kJ(i,"AdSource")[0],c=kJ(i,"TrackingEvents")[0],f=[],c&&(f=t.QZt(c,RJ,"vmap")),(v=pJ(a,"id"))||(v=""),void 0===(d=VU(pJ(a,"allowMultipleAds")))&&(d=!0),(l=VU(pJ(a,"followRedirects")))||(l=!0),g=kJ(a,"AdTagURI")[0],w="",m=kJ(a,"VASTAdData")[0],!g||!g.textContent)return[3,1];try{return w=g.textContent,(p=zg(n)).sources.src=w,[2,new nZ(e,p,r)]}catch(t){return[2,void 0]}return[3,6];case 1:return m?m.firstElementChild&&_J(m.firstElementChild,"VAST")?[4,this.NZt(m.firstElementChild,r,!1)]:[3,3]:[3,5];case 2:return(y=k.sent())?(_=new rZ(v,d,l,y),[2,new iZ(e,_,s,u,f,o,!1,n)]):[2,void 0];case 3:throw new WJ(zJ.PARSING,qJ.VAST_SCHEMA_VALIDATION_ERROR,"vmap:VASTAdData does not have a VAST-structure as a child element");case 4:return[3,6];case 5:throw new WJ(zJ.PARSING,qJ.VAST_SCHEMA_VALIDATION_ERROR,"Invalid AdTagURI source or invalid VASTAdData in Adbreak Element");case 6:return[2]}})}).call(this)},t.requestSuccessOnly=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,i.vk(t)];case 1:return n=e.sent(),[3,3];case 2:throw r=e.sent(),new WJ(zJ.NETWORK,qJ.UNKNOWN_ERROR,"Something went wrong while requesting xml from server.",r);case 3:if(!bl(n))throw new WJ(zJ.NETWORK,qJ.UNKNOWN_ERROR,"Something went wrong while requesting xml from server.");return[2,n]}})})()},t.RZt=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return n=new Cl({Yu:t,fk:qd.LT,Hk:Tl.GET}),[4,this.requestSuccessOnly(n,i)];case 1:r=e.sent(),e.label=2;case 2:return e.trys.push([2,4,,5]),[4,r.lk()];case 3:return[2,TJ.apply(void 0,[e.sent()])];case 4:throw e.sent(),new WJ(zJ.NETWORK,qJ.VAST_MALFORMED_RESPONSE,"The ad source could not be loaded.");case 5:return[2]}})}).call(this)},t.HZt=function(i,n,r,e){var s,u=kJ(i,"Error")[0];u&&u.textContent&&(s=u.textContent,e.push(s));var o,h=t.WZt(kJ(i,"Extensions")[0]),a=kJ(i,"AdSystem")[0],c="";a&&(c=a.textContent||c);var f=kJ(i,"AdTitle")[0];f&&(o=f.textContent||void 0);for(var v,d=[],l=Ft(kJ(i,"Impression"));!(v=l()).done;){var g=v.value;g.textContent&&d.push(g.textContent)}var w=t.qZt(kJ(i,"Creatives")[0],c,h,e);return new oJ(n,r,c,o,d,w,new HJ(s))},t.zZt=function(i,n,r,e){for(var s,u=[],o=Ft(kJ(i,"Creative"));!(s=o()).done;){var h=s.value,a=pJ(h,"id");a||(a="");var c=FU(pJ(h,"sequence"));c||(c=0);var f=pJ(h,"adId");f||(f="");var v=kJ(h,"Linear")[0],d=void 0;v&&(d=t.GZt(v,"wrapper",a,n,r,e));var l=kJ(h,"NonLinearAds")[0],g=void 0;if(l)try{g=t.XZt(l,a,n)}catch(t){}var w=kJ(h,"CompanionAds")[0],m=void 0;w&&(m=t.jZt(w)),u.push(new wJ(a,f,c,"",d,g,m,[]))}return u},t.qZt=function(i,n,r,e){for(var s,u=[],o=Ft(kJ(i,"Creative"));!(s=o()).done;){var h=s.value,a=pJ(h,"id");a||(a="");var c=FU(pJ(h,"sequence"));c||(c=0);var f=pJ(h,"adId");f||(f="");var v=pJ(h,"apiFramework");v||(v="");var d=kJ(h,"Linear")[0],l=void 0;if(d)try{l=t.GZt(d,"inline",a,n,r,e)}catch(t){}if(0===(null==l?void 0:l.ct))throw new WJ(zJ.PARSING,qJ.VAST_UNEXPECTED_DURATION_ERROR,"The VAST response had a duration of 0 seconds, so skipping the ad(s).");var g=kJ(h,"NonLinearAds")[0],w=void 0;if(g)try{w=t.XZt(g,a,n)}catch(t){}var m=kJ(h,"CompanionAds")[0],p=void 0;m&&(p=t.jZt(m));var y=kJ(h,"UniversalAdId"),_=t.parseUniversalAdIds(y);u.push(new wJ(a,f,c,v,l,w,p,_))}return u},t.WZt=function(t){var i=[];if(!t)return i;for(var n,r=Ft(kJ(t,"Extension"));!(n=r()).done;){var e,s=n.value,u=null!=(e=pJ(s,"type"))?e:"",o=s.outerHTML;i.push({type:u,xml:o})}return i},t.GZt=function(i,n,r,e,s,u){var o=kJ(i,"Duration")[0],h=0;if(o)h=tJ(o.textContent)||0;else if(!o&&"inline"===n)throw new WJ(zJ.PARSING,qJ.VAST_SCHEMA_VALIDATION_ERROR,"Missing duration element in inLine linear");var a=pJ(i,"skipoffset"),c=-1;if(a){var f=tJ(a);if(void 0===f&&a.indexOf("%")>-1){var v=A.abs(Number(a.replace(/(?![0-9])./g,"")))/100;E(v)||(f=h*v)}void 0!==f&&(c=f)}var d=kJ(i,"MediaFiles")[0],l=[],g=[];if(d&&(l=function(t,i){for(var n,r=[],e=Ft(kJ(t,"MediaFile"));!(n=e()).done;){var s=n.value,u=pJ(s,"delivery"),o=pJ(s,"type");if(o){if(i(o)){var h=FU(pJ(s,"width")),a=FU(pJ(s,"height"));h||($J(),h=0),a||($J(),a=0);var c={delivery:u,type:o,width:h,height:a,contentURL:""+s.textContent};r.push(c)}}else $J()}return r}(d,QJ),g=function(t){var i=kJ(t,"ClosedCaptionFiles");if(0===i.length)return[];for(var n,r=[],e=Ft(kJ(i[0],"ClosedCaptionFile"));!(n=e()).done;){var s=n.value,u=pJ(s,"type");u||$J();var o=pJ(s,"language");o||$J();var h={type:null!=u?u:"",language:null!=o?o:"",contentURL:(""+s.textContent).trim()};r.push(h)}return r}(d)),"inline"===n&&(!d||0===l.length))throw YJ(jJ.pZt,u),new WJ(zJ.PARSING,qJ.VAST_LINEAR_ASSET_MISMATCH,"Missing MediaFiles in linear element");var w=kJ(i,"TrackingEvents")[0],m=[];w&&(m=t.QZt(w,PJ,"linear"));var p=kJ(i,"VideoClicks")[0],y=t.KZt(p);return new mJ(h,l,m,y,c,r,e,g,s)},t.KZt=function(i){if(!i)return new lJ("","",[],[]);var n,r=kJ(i,"ClickThrough")[0],e="";r&&(n=r.textContent||void 0,e=pJ(r,"id")||"");var s=t.YZt(kJ(i,"ClickTracking")),u=t.YZt(kJ(i,"CustomClick"));return new lJ(n,e,s,u)},t.YZt=function(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){var e=i.value,s=e.textContent;if(s){var u=pJ(e,"id")||"";n.push(new dJ(u,s))}}return n},t.QZt=function(t,i,n){for(var r,e=[],s=Ft(kJ(t,"Tracking"));!(r=s()).done;){var u=r.value,o=pJ(u,"event");if(i(o)){var h="";"linear"===n&&(h=pJ(t,"offset")||"0");var a=u.textContent;a&&e.push(new MJ(o,h,a))}else $J()}return e},t.XZt=function(i,n,r){for(var e,s=[],u=Ft(kJ(i,"NonLinear"));!(e=u()).done;){var o=e.value,h=kJ(o,"NonLinearClickThrough")[0],a=void 0;h&&(a=h.textContent||void 0);var c=t.YZt(kJ(o,"NonLinearClickTracking")),f=kJ(o,"StaticResource")[0],v=void 0;if(f&&f.parentNode){var d=pJ(f,"creativeType"),l=f.textContent||"",g=kJ(f.parentNode,"NonLinearClickThrough")[0],w="";g&&(w=g.textContent||""),v=new FJ(l,d,w,"")}var m=t.JZt(o),p=t.parseHtmlResource(o);if(v||m||p){var y=new lJ(a,"",c,[]);s.push(new aJ(v,m,p,y,n,r))}else $J()}if(0===s.length)throw new WJ(zJ.PARSING,qJ.VAST_SCHEMA_VALIDATION_ERROR,"nonLinearAds element found with no nonLinear elements");var _=kJ(i,"TrackingEvents")[0],k=[];return _&&(k=t.QZt(_,NJ,"nonlinear")),new hJ(s,k)},t.parseUniversalAdIds=function(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){var e,s,u,o=i.value,h=null!=(e=pJ(o,"idRegistry"))?e:"",a=null!=(u=null!=(s=pJ(o,"idValue"))?s:o.textContent)?u:"";n.push(new KJ(h,a))}return n},t.jZt=function(i){var n=pJ(i,"requiredType");(function(t){switch(t){case"all":case"any":case"none":return!0;default:return!1}})(n)||(n=cJ.pz);for(var r,e=[],s=Ft(kJ(i,"Companion"));!(r=s()).done;){var u=r.value,o=FU(pJ(u,"width")),h=FU(pJ(u,"height")),a=pJ(u,"id"),c=FU(pJ(u,"assetWidth")),f=FU(pJ(u,"assetHeight")),v=FU(pJ(u,"expandedWidth")),d=FU(pJ(u,"rxpandedHeight")),l=pJ(u,"apiFramework"),g=pJ(u,"adSlotId"),w=FU(pJ(u,"pxratio")),m=kJ(u,"AltText")[0],p=m?m.textContent:"";o||($J(),o=0),h||($J(),h=0),a||(a=""),c||(c=0),f||(f=0),v||(v=0),d||(d=0),l||(l=""),g||(g=""),w||(w=1),p||(p="");var y=t.ZZt(u),_=t.JZt(u),k=t.parseHtmlResource(u),b=kJ(u,"TrackingEvents")[0],A=[];b&&(A=t.QZt(b,BJ,"companion"));var T=kJ(u,"CompanionClickThrough")[0],S=void 0;T&&(S=T.textContent||void 0);var E=t.YZt(kJ(u,"CompanionClickTracking"));(y||_||k)&&e.push(new vJ(o,h,a,c,f,v,d,l,g,w,y,_,k,new lJ(S,"",E,[]),A,p))}return new fJ(n,e)},t.ZZt=function(t){var i,n=kJ(t,"StaticResource")[0];if(n&&n.parentNode){var r=pJ(n,"creativeType");r||(r="");var e,s=n.textContent,u=kJ(n.parentNode,"AltText")[0],o=kJ(n.parentNode,"CompanionClickThrough")[0],h="";u&&(h=u.textContent||""),o&&(e=o.textContent||void 0),s&&(i=new FJ(s,r,e,h))}return i},t.JZt=function(t){var i,n=kJ(t,"IFrameResource")[0];if(n){var r=n.textContent||"";i=new UJ(r)}return i},t.parseHtmlResource=function(t){var i,n=kJ(t,"HTMLResource")[0];if(n){var r=n.textContent||"";i=new VJ(r)}return i},t}(),ZJ=function(t){return t.yk="",t.BZt="linear",t.t$t="nonlinear",t.i$t="display",t}({}),tZ=function(){function t(){}return t.e$t=function(t){switch(t){case"linear":case"nonlinear":case"display":return!0;default:return!1}},t.s$t=function(t){},t.n$t=function(t){if(void 0!==t)return"start"===t?0:"end"===t?-1:void 0},t.r$t=function(t){var i=t.split(":"),n=0;return n+=3600*Number(i[0]),n+=60*Number(i[1]),n+=Number(i[2])},t.h$t=function(t){if(t<=0)return"00:00:00.000";var i=A.floor(t),n=t-i;return this.o$t(i/3600,2)+":"+this.o$t(i/60%60,2)+":"+this.o$t(i%60,2)+"."+this.o$t(1e3*n,3)},t.o$t=function(t,i){return("00"+A.floor(t)).slice(-i)},t.a$t=function(t,i){var n=this.$Zt(t);if(0===n)switch(t){case"start":return 0;case"end":return-1}else{if(2===n)return iJ(t)*i;if(1===n)return tJ(t);if(3===n)return this.n$t(t);if(4===n){var r=Number(t);if(!E(r)&&r>=-1)return r}}},t.$Zt=function(t){return"start"===t||"end"===t?0:void 0!==tJ(t.toString())?1:void 0!==iJ(t.toString())?2:void 0!==this.s$t(t.toString())?3:E(Number(t))?void 0:4},t}(),iZ=function(){function t(t,i,n,r,e,s,u,o){this.l$t=void 0,this.XYt=void 0,this.f$t=void 0,this.EJt=-1,this.y$t=void 0,this._$t=void 0,this.p$t=void 0,this.b$t=void 0,this.c$t=void 0,this.w$t=void 0,this.l$t=i,this.f$t=t,this.y$t=n,this._$t=r,this.p$t=s,this.XYt=e,this.b$t=u,this.c$t=o}return t.prototype.Un=function(){return ot.resolve()},xt(t,[{key:"u$t",get:function(){return this.c$t.integration}},{key:"d$t",get:function(){return this.l$t}},{key:"qOt",get:function(){return this.f$t}},{key:"kJt",get:function(){return this.EJt},set:function(t){this.EJt=t}},{key:"aYt",get:function(){return this.XYt}},{key:"v$t",get:function(){return this._$t}},{key:"g$t",get:function(){return this.p$t}},{key:"irt",get:function(){return this.c$t}},{key:"m$t",get:function(){return this.OZt.dd}},{key:"W",get:function(){return!0}},{key:"OZt",get:function(){return this.w$t},set:function(t){this.w$t=t}}]),t}(),nZ=function(){function t(t,i,n){this.mYt=void 0,this.A$t=void 0,this.dE=!1,this.aV=void 0,this.aV=n,this.mYt=new iZ(t,void 0,"","",[],!1,!1,i)}var i=t.prototype;return i.Un=function(){var t;return null!=(t=this.A$t)?t:this.A$t=this.vE()},i.vE=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return t=new JJ,i=this,[4,t.LZt(this.irt,this.qOt,this.OZt,this.aV)];case 1:return i.mYt=n.sent(),this.dE=!0,[2]}})}).call(this)},xt(t,[{key:"u$t",get:function(){return this.mYt.u$t}},{key:"d$t",get:function(){return this.mYt.d$t}},{key:"qOt",get:function(){return this.mYt.qOt}},{key:"kJt",get:function(){return this.mYt.kJt},set:function(t){this.mYt.kJt=t}},{key:"aYt",get:function(){return this.mYt.aYt}},{key:"v$t",get:function(){return this.mYt.v$t}},{key:"g$t",get:function(){return this.mYt.g$t}},{key:"irt",get:function(){return this.mYt.irt}},{key:"m$t",get:function(){return this.mYt.m$t}},{key:"W",get:function(){return this.dE}},{key:"OZt",get:function(){return this.mYt.OZt},set:function(t){this.mYt.OZt=t}}]),t}(),rZ=function(){function t(t,i,n,r){this.aS=void 0,this.S$t=void 0,this.k$t=void 0,this.E$t=void 0,this.aS=t,this.S$t=i,this.E$t=r,this.k$t=n}return xt(t,[{key:"o",get:function(){return this.aS}},{key:"oJt",get:function(){return this.S$t}},{key:"T$t",get:function(){return this.k$t}},{key:"UKt",get:function(){return this.E$t}}]),t}();function eZ(t,i){var n;if(t.vastAdsRequest&&(n=function(t){if(t.adTagUrl)return t.adTagUrl;if(t.adsResponse)return EJ(t.adsResponse);return}(t.vastAdsRequest)),!n){var r=function(t){var i=t.contentUrl||t.contentId;if(!i)return;var n=t.contentType||"video/mp4",r=nT(n)||rT(n)?"streaming":"progressive",e=void 0!==t.duration?""+tZ.h$t(t.duration)+"":"",s=void 0!==t.whenSkippable&&t.whenSkippable>=0?' skipoffset="'+tZ.h$t(t.whenSkippable)+'"':"",u=''+SJ(i)+"",o=t.clickThroughUrl?""+SJ(t.clickThroughUrl)+"":"",h=""+e+""+u+""+o+"",a=t.title?""+SJ(t.title)+"":"";return''+a+""+h+""}(t);r&&(n=EJ(r))}var e=t.customData;if(n){var s={integration:null==e?void 0:e.integration,sources:{src:n,type:"vast"},timeOffset:i};return s.integration&&"csai"!==s.integration&&"theo"!==s.integration||(s.skipOffset=t.whenSkippable),s}}var sZ=function(t){return t.x$t="error",t.P$t="sourceupdate",t}({}),uZ=function(t){function i(i){var n;return(n=t.call(this,"error")||this).lt=void 0,n.lt=i,n}return Pt(i,t),i}(ah),oZ=function(t){function i(i,n){var r;return(r=t.call(this,"sourceupdate")||this).bt=void 0,r.Mc=void 0,r.bt=i,r.Mc=n,r}return Pt(i,t),i}(ah),hZ=function(t){function i(i,n,r){var e;return(e=t.call(this,n)||this).gBt=void 0,e.R$t=void 0,e.I$t=void 0,e.X$t=0,e.V$t=function(t){e.So(new uZ(t))},e.U$t=function(t){var i,n=new UK(GK(t.code),null!=(i=t.description)?i:void 0);e.V$t(n)},e.gBt=i,e.R$t=n,e.I$t=r,e}Pt(i,t);var n=i.prototype;return n.C$t=function(t){this.R$t.C$t(t)},n.D$t=function(t){this.R$t.D$t(t)},n.N$t=function(t){this.R$t.N$t(t)},n.B$t=function(t){this.R$t.B$t(t)},n.M$t=function(t){this.I$t.addUpdateListener(t)},n.L$t=function(t){this.I$t.removeUpdateListener(t)},n.O$t=function(){var t=this,i=new Xa,n=new chrome.cast.media.GetStatusRequest;return this.I$t.getStatus(n,function(){i.Qy({bt:t.qx(),Mc:t.nu()})},function(t){return i.Ky(t)}),i.Yy},n.qx=function(){var t;return null==(t=this.I$t.customData)?void 0:t.currentSource},n.nu=function(){var t,i;if(null==(t=this.gBt.F$t())?void 0:t.version){var n;i=null==(n=this.I$t.customData)?void 0:n.sourceDescription}else{var r,e=null==(r=QK(this.I$t))?void 0:r.customData;(function(t){return Wi(t)&&t.theoplayer_version>=1&&Fi(t.streamStart)&&Fi(t.isLive)&&Fi(t.sourceDescription)})(e)&&(i=e.sourceDescription),i||(i=function(t){return{sources:[{src:t.contentId,type:t.contentType}],ads:aZ(t)}}(this.I$t.media))}return i},n.jP=function(){var t=new chrome.cast.media.PauseRequest;this.I$t.pause(t,pn,this.U$t)},n.KP=function(){var t=new chrome.cast.media.StopRequest;this.I$t.stop(t,pn,this.U$t)},n.QP=function(){var t=new chrome.cast.media.PlayRequest;this.I$t.play(t,pn,this.U$t)},n.Oy=function(t,i){var n=this,r=new chrome.cast.media.SeekRequest;return r.currentTime=t===1/0?Number.MAX_VALUE:t,r.resumeState=i?chrome.cast.media.ResumeState.PLAYBACK_PAUSE:chrome.cast.media.ResumeState.PLAYBACK_START,new ot(function(t,i){n.I$t.seek(r,t,function(t){var n;i(new UK(GK(t.code),null!=(n=t.description)?n:void 0))})})},n.gP=function(t){this.R$t.Bet(YK,function(t){return{type:$K.FKt,properties:{playbackRate:t}}}(t)).catch(this.V$t)},n.H$t=function(t){var i=new chrome.cast.media.EditTracksInfoRequest(t);this.I$t.editTracksInfo(i,pn,this.U$t)},n.W$t=function(){return this.I$t.getEstimatedTime()},n.q$t=function(){return this.I$t.getEstimatedBreakClipTime()},n.z$t=function(){return this.I$t.getEstimatedBreakTime()},n.G$t=function(){this.R$t.Bet("urn:x-cast:com.google.cast.media",{type:KK.SKIP_AD,requestId:this.X$t++,mediaSessionId:this.I$t.mediaSessionId}).catch(this.V$t)},n.kn=function(){this.Vo()},xt(i,[{key:"$D",get:function(){return this.I$t}}]),i}(uh);function aZ(t){return t.vmapAdsRequest&&t.vmapAdsRequest.adTagUrl?[{sources:{src:t.vmapAdsRequest.adTagUrl,type:"vmap"}}]:t.breaks&&t.breakClips?nr(t.breaks,function(i){return function(t,i){var n=function(){var n=e.value,s=Wn(i,function(t){return t.id===n});if(s){var u=eZ(s,t.position);u&&r.push(u)}},r=[];if(t.isWatched)return r;for(var e,s=Ft(t.breakClipIds);!(e=s()).done;)n();return r}(i,t.breakClips)}):[]}V(),It();var cZ=function(){function t(t){this.gBt=void 0,this.gBt=t}var i=t.prototype;return i.j$t=function(t,i){this.gBt.addMessageListener(t,i)},i.Q$t=function(t,i){this.gBt.removeMessageListener(t,i)},i.Bet=function(t,i){var n=this;return new ot(function(r,e){n.gBt.sendMessage(t,i,r,function(t){var i;e(new UK(GK(t.code),null!=(i=t.description)?i:void 0))})})},i.kn=function(){},t}();function fZ(t){return"vmap"===t||"adrule"===t}function vZ(t){if(t)return qi(t)&&""!==t?{src:tw(t),type:void 0}:function(t){return Wi(t)&&Boolean(t.src)}(t)&&""!==t.src?{src:tw(t.src),type:dZ(t.type)}:void 0}function dZ(t){if(qi(t)){var i=t.toLowerCase();switch(i){case"vast":case"vmap":case"adrule":return i;default:return void Qe("The ad source type provided in the configuration could not be recognized: '"+t+"'.")}}else t||Qe("For better performance it is highly recommended to add the type to the configuration of your ad sources.")}function lZ(t){if(void 0!==t&&""!==t&&("string"==typeof t||"number"==typeof t)){switch(t){case"start":case"00:00:00":case"00:00:00.000":case"0%":case"0":return 0;case"end":case"100%":return-1}if("string"==typeof t){if(function(t){return ZK.test(t)}(t))return tZ.r$t(t);if(gZ(t))return t}return Number(t)>=0?Number(t):void 0}}function gZ(t){return new RegExp(/^\d{1,2}%$/).test(t)}function wZ(t){for(var i,n=[],r=function(t,i){if(ji(i))for(var e=0,s=i.length;e-1&&n.push(e)}var s=n.length?n:void 0;this.U0t(s)}},n.U0t=function(t){(function(t,i){return!t&&i||t&&!i||t&&i&&!ir(t,i)})(this.flt,t)&&(this.flt=t&&this._O.pO(t)?t:void 0,this.So(new SL(this.flt,this)))},n.unload=function(){for(var t,i=Ft(this._O.NI);!(t=i()).done;){t.value.mn("update",this.ILt)}this._O.hr()},xt(i,[{key:"YI",get:function(){return this._lt}},{key:"tC",get:function(){return this.flt},set:function(t){this.U0t(t),this.So(new jZ(this,t))}},{key:"$I",get:function(){return this._O}},{key:"Th",get:function(){return this.bO},set:function(t){t!==this.bO&&(this.bO=t,this.So(new Ew(this)))}},{key:"Rt",get:function(){return this.We},set:function(t){this.We!==t&&(this.We=t,this.V0t!==t&&this.So(new VZ(this.JI,t)),this.So(new Tw(this)))}},{key:"H0t",get:function(){return this.V0t},set:function(t){var i=this.We!==t;this.We=t,this.V0t=t,i&&this.So(new Tw(this))}},{key:"Ca",get:function(){return this.hu||(this.hu=hw(this)),this.hu}},{key:"Qk",get:function(){return this.Rt?"enabled":"disabled"}}]),i}(uh);V(),It();var zZ=function(t){return t.W0t="legacy",t.q0t="caf",t}({});V(),It(),Bt(),Dt(),Ut(),V(),It(),Bt(),Dt(),H(),Ut(),V(),It(),V(),It();var qZ=function(){function t(t){this.qc=void 0,this.z0t=0,this.qc=t}var i=t.prototype;return i.Rc=function(){if(!(this.z0t>=this.qc.length)){var t=this.qc[this.z0t];return this.z0t+=1,t}},i.lt=function(){return this.Rc()},t}();function XZ(t){var i,n,r;return null!=(r=null==(n=t.d$t)||null==(i=n.UKt)?void 0:i.VKt())?r:[]}var GZ=function(){},QZ=function(){function t(){this.hu=void 0}return t.prototype.Ont=function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get ads(){return t.Jc.map(function(t){return t.Ont()})},get integration(){return t.u$t},get maxDuration(){return t.G0t},get maxRemainingDuration(){return t.X0t},get timeOffset(){return t.qOt},get customData(){return t.y0t}}}(this)},t}(),YZ=function(){function t(t,i){this.Q0t=void 0,this.oa=void 0,this.Q0t=t,this.oa=i}return xt(t,[{key:"j0t",get:function(){return this.Q0t}},{key:"t",get:function(){return this.oa}}]),t}(),$Z=function(t){function i(i,n){var r;return(r=t.call(this)||this).w$t=void 0,r.$0t=void 0,r.Z0t=[],r.t1t=[],r.w$t=i,r.$0t=n,r}Pt(i,t);var n=i.prototype;return n.Y0t=function(t,i,n,r){var e=Wn(this.Z0t,function(i){return i.iYt===t});if(void 0!==e)return e;var s=new t0(t,i,this,this.$0t,n,r);return this.Z0t.push(s),s},n.J0t=function(t,i,n,r,e){var s=Wn(this.t1t,function(i){return i.nYt===t});if(void 0!==s)return s;var u=new ZZ(t,i,n,this,this.$0t,r,e);return this.t1t.push(u),u},xt(i,[{key:"OZt",get:function(){return this.w$t}},{key:"Jc",get:function(){for(var t,i=[],n=Ft(this.w$t.K0t);!(t=n()).done;)for(var r,e=t.value,s=Ft(XZ(e));!(r=s()).done;){var u,o,h=r.value,a=null!=(o=null==(u=h.sYt)?void 0:u.PYt)?o:[];if(h.iYt&&i.push(this.Y0t(h.iYt,a,h.rYt,e.irt)),h.nYt)for(var c,f=Ft(h.nYt.hYt);!(c=f()).done;){var v=c.value;i.push(this.J0t(v,a,h.nYt,h.rYt,e.irt))}}return i}},{key:"u$t",get:function(){return DS.CSAI}},{key:"qOt",get:function(){var t=this.w$t.dd;return t>=0?t:this.$0t.t.Nd()}},{key:"X0t",get:function(){for(var t,i=0,n=Ft(this.w$t.K0t);!(t=n()).done;)for(var r,e=Ft(XZ(t.value));!(r=e()).done;){var s=r.value;s.iYt&&!s.iYt.xJt&&(i+=s.iYt.ct)}return this.$0t&&this.$0t.j0t&&(i+=this.$0t.j0t.ct-this.$0t.j0t.zx),i}},{key:"G0t",get:function(){for(var t,i=0,n=Ft(this.w$t.K0t);!(t=n()).done;)for(var r,e=Ft(XZ(t.value));!(r=e()).done;){var s=r.value;s.iYt&&(i+=s.iYt.ct)}return i}},{key:"y0t",get:function(){}}]),i}(QZ),KZ={height:0,width:0,clickThrough:"",contentHTML:"",resourceURI:"",altText:""},JZ=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this)||this).u1t=void 0,o.IYt=void 0,o.mYt=void 0,o.$0t=void 0,o.yJt=void 0,o.c$t=void 0,o.e1t=!1,o.u1t=i,o.IYt=n,o.mYt=r,o.$0t=e,o.yJt=s,o.c$t=u,o}Pt(i,t);var n=i.prototype;return n.i1t=function(){return this.e1t},n.s1t=function(){this.e1t=!0},n.n1t=function(t){return io({},KZ,{resourceURI:t.cZt||""})},n.r1t=function(t){return io({},KZ,{contentHTML:t.cZt.trim(),type:"HTMLResource"})},n.h1t=function(t){var i,n;return io({},KZ,{clickThrough:(null==(i=t.KYt)?void 0:i.trim())||"",resourceURI:(null==(n=t.cZt)?void 0:n.trim())||"",altText:t.jYt||"",type:"StaticResource"})},n.o1t=function(t,i,n){if(t&&i){var r="";return""+r+""}},n.sYt=function(t){var i=this;return t?t.map(function(t){var n,r={adSlotId:t.VYt||"",height:t.Mi||0,width:t.Ti||0};if(t.cYt){var e,s=i.h1t(t.cYt),u=s.clickThrough||(null==(e=t.zYt)?void 0:e.KYt);n=io({},s,{contentHTML:i.o1t(s.resourceURI,u,s.altText)||""})}else if(t.vYt)n=i.r1t(t.vYt);else{if(!t.lYt)return;n=i.n1t(t.lYt)}return Wg(n,r)}).filter(function(t){return void 0!==t}):[]},n.a1t=function(){return this.u1t.QKt},xt(i,[{key:"od",get:function(){return this.mYt}},{key:"irt",get:function(){return this.c$t}},{key:"rYt",get:function(){return this.yJt}}]),i}(GZ),ZZ=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,i,n,e,s,u,o)||this).c1t=void 0,h.hu=void 0,h.c1t=r,h}Pt(i,t);var n=i.prototype;return n.xa=function(){var t=this.mYt,i={companions:this.sYt(this.IYt),type:"nonlinear",id:this.u1t.wYt,skipOffset:this.kJt,integration:this.c$t.integration,adSystem:this.u1t.QKt,get adBreak(){return t.Ont()},creativeId:this.u1t.wYt,universalAdIds:this.yJt.map(function(t){return{adIdRegistry:t.EZt,adIdValue:t.PZt}})};return this.u1t.lYt?Wg(this.n1t(this.u1t.lYt),i):this.u1t.vYt?Wg(this.r1t(this.u1t.vYt),i):this.u1t.cYt?Wg(this.h1t(this.u1t.cYt),i):i},n.Ont=function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()},n.d1t=function(){var t,i;return null!=(i=null==(t=this.u1t.cYt)?void 0:t.cZt)?i:""},n.l1t=function(){var t,i,n;return null!=(n=null==(i=this.u1t)||null==(t=i.cYt)?void 0:t.lZt)?n:""},xt(i,[{key:"nYt",get:function(){return this.u1t}},{key:"eYt",get:function(){return this.c1t}},{key:"kJt",get:function(){var t,i=this.u1t.od;return i&&i.irt&&void 0!==i.irt.skipOffset?tZ.a$t(i.irt.skipOffset,this.$0t.j0t.ct):(null==(t=this.u1t.od)?void 0:t.kJt)||-1}}]),i}(JZ),t0=function(t){function i(i,n,r,e,s,u){var o;return(o=t.call(this,i,n,r,e,s,u)||this).hu=void 0,o}Pt(i,t);var n=i.prototype;return n.xa=function(){var t,i=this.mYt,n=this.u1t;return{companions:this.sYt(this.IYt),duration:n.ct,id:n.wYt,mediaFiles:n.AJt,get mediaUrl(){return n.PJt},skipOffset:this.kJt,type:"linear",integration:this.c$t.integration,adSystem:n.QKt,width:void 0,height:void 0,get adBreak(){return i.Ont()},clickThrough:null==(t=n.lJt)?void 0:t.KYt,creativeId:n.wYt,universalAdIds:this.yJt.map(function(t){return{adIdRegistry:t.EZt,adIdValue:t.PZt}}),closedCaptionFiles:n.CJt,extensions:n.DJt}},n.Ont=function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()},n.d1t=function(){return this.u1t.AJt.length>0?this.u1t.AJt[0].contentURL:""},n.l1t=function(){return this.u1t.AJt.length>0?this.u1t.AJt[0].type:""},xt(i,[{key:"iYt",get:function(){return this.u1t}},{key:"kJt",get:function(){var t=this.u1t.od;return t&&t.irt&&void 0!==t.irt.skipOffset?tZ.a$t(t.irt.skipOffset,this.$0t.j0t.ct):this.u1t.kJt||-1}}]),i}(JZ);function i0(t){return j(t,t0)}V(),It();var n0=function(t){return t.f1t="csai",t.v1t="google-ima",t.so="google-dai",t._1t="freewheel",t.g1t="mediatailor",t.Iv="chromecast",t.knt="theoads",t}({});V(),It(),Dt();var r0=function(t){function i(i){return t.call(this,"p1t",i)||this}return Pt(i,t),i.prototype.xa=function(){return new e0(this.jnt.Ont())},i}(oO),e0=function(t){function i(i){return t.call(this,"updatead",i)||this}return Pt(i,t),i}(hO);V(),It(),Dt();var s0=function(t){function i(i){return t.call(this,"m1t",i)||this}return Pt(i,t),i.prototype.xa=function(){return new u0(this.jnt.Ont())},i}(oO),u0=function(t){function i(i){return t.call(this,"adloaded",i)||this}return Pt(i,t),i}(hO),o0=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).oa=void 0,e.I$t=void 0,e.A1t=void 0,e.y1t=[],e.w1t=void 0,e.u1t=void 0,e.hu=void 0,e.eh=function(t){var i;if(t){var n=e.I$t.$D,r=n.breakStatus,s=n.media,u=s.breakClips,o=s.breaks,h=null==(i=QK(n))?void 0:i.media,a=[];o&&u&&e.T1t(o,u,h,a),e.P1t(r,a);for(var c,f=Ft(a);!(c=f()).done;){var v=c.value;e.So(v)}}},e.oa=i,e.I$t=n,e.A1t=r,e.I$t.M$t(e.eh),e}Pt(i,t);var n=i.prototype;return n.W6=function(t,i,n){throw new _("Scheduling ads while casting is not supported.")},n.uD=function(){this.I$t.G$t()},n.znt=function(t){var i;null==(i=this.A1t)||i.znt(t)},n.Wnt=function(t,i){var n;null==(n=this.A1t)||n.Wnt(t,i)},n.S1t=function(t){return Wn(this.y1t,function(i){return i.o===t})},n.T1t=function(t,i,n,r){for(var e,s=this.y1t,u=[],o=!1,h=Ft(t);!(e=h()).done;){var a=e.value,c=this.S1t(a.id);void 0===c&&(c=new h0(a),r.push(new sO(c))),!Fi(c.k1t)&&Fi(n)&&(c.k1t=this.E1t(c.x1t,n));var f=c.Jc;c.er(a,i,n,r);for(var v,d=Ft(c.Jc);!(v=d()).done;){var l=v.value;Jn(f,l)||(r.push(new aO(l)),o=!0)}u.push(c)}this.y1t=u,o&&r.push(new yO);for(var g,w=Ft(s);!(g=w()).done;){var m=g.value;Jn(u,m)||r.push(new rO(m))}},n.P1t=function(t,i){var n,r,e=this.w1t,s=this.u1t;if(t){var u,o=t.breakId,h=t.breakClipId;n=o?this.S1t(o):void 0,r=h?null==(u=this.w1t)?void 0:u.I1t(h):void 0}if(this.w1t=n,this.u1t=r,n!==e&&(void 0!==e&&(e.C1t=void 0,i.push(new fO(e))),void 0!==n&&(n.C1t=this.I$t,i.push(new dO(n)))),r!==s){var a=this.oa.Gx();void 0!==s&&i.push(new mO(s,a)),void 0!==r&&i.push(new gO(r,a))}},n.E1t=function(t,i){if(i&&i.breaks){var n=Wn(i.breaks,function(i){return i.id===t.id});return n}},n.qnt=function(t){for(var i,n=[],r=Ft(this.y1t);!(i=r()).done;){var e=i.value,s=e.Jc;if(e===this.w1t&&void 0!==this.u1t){var u=s.indexOf(this.u1t);u>=0&&(s=s.slice(u))}else if(e.b1t())continue;for(var o,h=Ft(s);!(o=h()).done;){var a=o.value.R1t();a&&n.push(a)}}for(var c,f=Ft(n);!(c=f()).done;){var v=c.value;t.W6(v,JB.Bnt,!1)}},n.kn=function(){return this.Vo(),this.I$t.L$t(this.eh),void 0!==this.w1t&&(this.w1t.C1t=void 0,this.w1t=void 0),this.u1t=void 0,tr(this.y1t),ot.resolve(void 0)},n.Hnt=function(t){},xt(i,[{key:"zc",get:function(){return void 0!==this.w1t}},{key:"Lnt",get:function(){return this.u1t?[this.u1t]:[]}},{key:"Fnt",get:function(){var t;return null!=(t=this.w1t)?t:null}},{key:"Unt",get:function(){var t=this;return nr(this.y1t,function(i){var n=i.Jc;if(i===t.w1t&&void 0!==t.u1t){var r=n.indexOf(t.u1t);if(r>=0)return n.slice(r+1)}return i.b1t()?[]:n})}},{key:"Vnt",get:function(){var t=this;return this.y1t.filter(function(i){return i===t.w1t||!i.b1t()})}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=ZB(this)}}]),i}(hh),h0=function(t){function i(i){var n;return(n=t.call(this)||this).D1t=void 0,n.k1t=void 0,n.qc=[],n.C1t=void 0,n.D1t=i,n}Pt(i,t);var n=i.prototype;return n.b1t=function(){return this.D1t.isWatched},n.I1t=function(t){return Wn(this.qc,function(i){return i.o===t})},n.er=function(t,i,n,r){for(var e,s=function(s){var o=t.breakClipIds[s],h=Wn(i,function(t){return t.id===o});if(void 0===h)return"continue";var a=s0&&(t=Mn(this.qc,function(t){return t.ct}),E(t)&&(t=void 0)),t}},{key:"X0t",get:function(){var t=this.G0t;if(void 0!==t&&void 0!==this.C1t){var i=this.C1t.z$t();if(void 0!==i)return A.max(0,t-i)}return t}},{key:"qOt",get:function(){return this.D1t.position}},{key:"y0t",get:function(){}}]),i}(QZ),a0=function(){function t(t,i){this.L1t=void 0,this.N1t=void 0,this.od=void 0,this.hu=void 0,this.L1t=t,this.od=i}var i=t.prototype;return i.a1t=function(){return""},i.l1t=function(){var t;return null!=(t=this.L1t.contentType)?t:""},i.d1t=function(){var t,i;return null!=(i=null!=(t=this.L1t.contentUrl)?t:this.L1t.contentId)?i:""},i.er=function(t,i){var n=this.o,r=this.ct,e=this.L1t.contentUrl;this.L1t=t;var s=this.o,u=this.ct,o=this.L1t.contentUrl;n===s&&(r===u||E(r)&&E(u))&&e===o||i.push(new r0(this)),E(r)&&!E(u)&&i.push(new s0(this))},i.R1t=function(){var t;return this.N1t&&(t=eZ(this.N1t,this.od.qOt)),t||(t=eZ(this.L1t,this.od.qOt)),t},i.Ont=function(){var t;return null!=(t=this.hu)?t:this.hu=this.xa()},i.xa=function(){var t=this;return{get extensions(){return[]},get companions(){return t.PYt},get duration(){return t.ct},get id(){return t.o},get mediaFiles(){return t.AJt},get mediaUrl(){return t.PJt},get closedCaptionFiles(){return[]},get skipOffset(){return t.kJt},type:"linear",integration:n0.Iv,get adSystem(){return t.a1t()},width:void 0,height:void 0,get adBreak(){return t.od.Ont()},get resourceURI(){return t.d1t()},get clickThrough(){return t.KYt},get creativeId(){return t.wYt},get customData(){return t.y0t},get isSlate(){return!1},get universalAdIds(){return t.rYt.map(function(t){return{adIdRegistry:t.EZt,adIdValue:t.PZt}})}}},xt(t,[{key:"M1t",get:function(){return this.L1t}},{key:"o",get:function(){return this.L1t.id}},{key:"PYt",get:function(){return[]}},{key:"ct",get:function(){var t;return null!=(t=this.L1t.duration)?t:NaN}},{key:"AJt",get:function(){var t=this.d1t();return t?[{contentURL:t,delivery:"progressive",type:this.l1t(),width:0,height:0}]:[]}},{key:"PJt",get:function(){return this.d1t()}},{key:"kJt",get:function(){var t=this.L1t.whenSkippable;return void 0===t?void 0:t<0?-1:t}},{key:"KYt",get:function(){return this.L1t.clickThroughUrl}},{key:"wYt",get:function(){}},{key:"rYt",get:function(){return[]}},{key:"y0t",get:function(){}}]),t}();V(),It(),Bt(),Dt();var c0=function(t){function i(i,n){var r;return void 0===n&&(n=Vi.Zs.Ke),(r=t.call(this)||this).wE=void 0,r.Ls=void 0,r.U1t=void 0,r.F1t=void 0,r.We=!1,r.V1t=function(t){t.stopPropagation(),r.So(new ah("clickstart"))},r.H1t=function(t){t.stopPropagation(),r.So(new ah("click"))},r.wE=i,r.U1t=n,r.Ls=v.createElement("a"),r.Ls.style.position="absolute",r.Ls.style.zIndex="11",r.Ls.target="Xu",r.U1t?(Ux(r.Ls,"learn more"),r.Ls.className="theoplayer-ad-overlay-component theoplayer-ad-touch-clickthrough",r.Ls.setAttribute("rel","noopener")):ln(r.Ls),r.wE.appendChild(r.Ls),r.ZU(),r}Pt(i,t);var n=i.prototype;return n.JU=function(){if(!this.We){this.We=!0,this.Ls.style.display="",this.U1t||(this.wE.style.cursor="pointer");var t=this.U1t?this.Ls:this.wE;Vi.Zs.Ke?(t.addEventListener("touchstart",this.V1t),t.addEventListener("touchend",this.H1t)):(t.addEventListener("mousedown",this.V1t),t.addEventListener("click",this.H1t))}},n.ZU=function(){if(this.We){this.We=!1,this.Ls.style.display="none",this.U1t||(this.wE.style.cursor="");var t=this.U1t?this.Ls:this.wE;Vi.Zs.Ke?(t.removeEventListener("touchstart",this.V1t),t.removeEventListener("touchend",this.H1t)):(t.removeEventListener("mousedown",this.V1t),t.removeEventListener("click",this.H1t))}},n.zg=function(){this.Vo(),this.ZU(),this.wE.removeChild(this.Ls)},xt(i,[{key:"O1t",get:function(){return this.F1t},set:function(t){this.F1t!==t&&(this.F1t=t,this.Ls.href=null!=t?t:"",t?this.JU():this.ZU())}}]),i}(uh);V(),It(),Bt(),Dt(),V(),It(),Ut();var f0=[1200,992,768,576],v0={1200:"theo-size-xl",992:"theo-size-l",768:"theo-size-m",576:"theo-size-s"},d0=function(){function t(t,i){var n=this;this.Ls=void 0,this.sc=void 0,this.q1t=void 0,this.bn=void 0,this.Ls=t,this.sc=i,this.bn=function(t){n.W1t(t.width)},this.q1t=l0(i.Eu),hn(this.Ls,this.q1t),i.wn(AI.yn,this.bn)}var i=t.prototype;return i.W1t=function(t){var i=l0(t);i!==this.q1t&&(hn(this.Ls,i),an(this.Ls,this.q1t),this.q1t=i)},i.kn=function(){this.sc.mn(AI.yn,this.bn)},t}();function l0(t){for(var i,n=Ft(f0);!(i=n()).done;){var r=i.value;if(t>r)return v0[r]}return"theo-size-xs"}var g0=function(t){function i(i,n){var r;return(r=t.call(this)||this).Ls=void 0,r.K1t=void 0,r.ud=void 0,r.tc=void 0,r.Yo=void 0,r.Q1t=function(){r.So(new ah("uD"))},r.Ls=v.createElement("div"),r.xe.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",r.xe.style.position="absolute",r.ud=v.createElement("span"),r.xe.appendChild(r.ud),n&&(r.K1t=v.createElement("div"),r.K1t.className="theoplayer-ad-skip-poster",r.K1t.style.backgroundImage='url("'+Zo(n)+'")',r.xe.appendChild(r.K1t)),r.Yo="countdown",r.tc=new d0(r.xe,i),r}Pt(i,t);var n=i.prototype;return n.z1t=function(t){"countdown"!==this.Yo&&(this.Yo="countdown",this.G1t(),this.xe.classList.remove("theoplayer-ad-skip-button"),this.xe.classList.add("theoplayer-ad-skip-countdown")),this.HT="You can skip in "+A.round(t)+" seconds"},n.X1t=function(){"skip"!==this.Yo&&(this.Yo="skip",this.HT="Skip Ad",this.j1t(),this.xe.classList.remove("theoplayer-ad-skip-countdown"),this.xe.classList.add("theoplayer-ad-skip-button"))},n.j1t=function(){this.xe.addEventListener("mouseup",this.Q1t),this.xe.addEventListener("touchend",this.Q1t)},n.G1t=function(){this.xe.removeEventListener("mouseup",this.Q1t),this.xe.removeEventListener("touchend",this.Q1t)},n.kn=function(){this.Vo(),this.G1t(),this.tc.kn(),Zi(this.Ls),Zi(this.ud),this.K1t&&Zi(this.K1t)},xt(i,[{key:"xe",get:function(){return this.Ls}},{key:"Qk",get:function(){return this.Yo}},{key:"HT",get:function(){return this.ud.textContent||""},set:function(t){Ux(this.ud,t)}}]),i}(uh),w0=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).oa=void 0,u.gBt=void 0,u.I$t=void 0,u.rPt=LA.rL(),u.p2t=void 0,u.Zb=void 0,u.h5=!1,u.nq=void 0,u.Cz=void 0,u.Rz=void 0,u.u2t=void 0,u.o5=jy.zL,u.y2t=!1,u.Ho=LA.rL(),u.H4=void 0,u.Pz=!1,u.x0t=void 0,u.I0t=void 0,u.C0t=void 0,u.tO=new fw,u.sO=new fw,u.Gl=new sy,u.qc=void 0,u.A2t=void 0,u.T2t=void 0,u.x2t=void 0,u.nxt=NaN,u.g2t=void 0,u.a2t=!1,u._2t=NaN,u.f2t=void 0,u.e2t=0,u.I2t=function(t,i){switch(t){case"buffered":u.rPt=new LA(i),u.So(new hC(u.Gx()));break;case"currentProgramDateTime":u.p2t=new Date(i).getTime()-u.Gx();break;case"played":u.Ho=new LA(i);break;case"seekable":u.r2t();break;case"videoHeight":u.l2t(void 0,i);break;case"videoWidth":u.l2t(i,void 0)}},u.u4=function(t){switch(t.type){case ch.$w:u.Je(t.currentTime);break;case ch.Zw:u.Mq();break;case ch.Yw:u.So(new HL(t.representation,t.previousRepresentation));break;case ch.ey:u.So(new gL(t.segmentStartTime,t.error,t.trackType,t.track,t.quality,t.retryCount));break;case ch.Dw:u.So(new Fj(t.currentTime,t.initDataType,t.initData));break;case ch.Ew:u.So(new mN(new lw(pd.CONTENT_PROTECTION_ERROR,t.error,void 0,t.licenseAcquisitionURL,t.status,t.statusText,t.licenseAcquisitionMessage,t.systemCode)));break;case ch.xw:u.So(new pN)}},u.g0t=function(t){u.r2t(),u.o2t(),u.hh(),u.c2t(),u.v2t(),u.n2t(),u.Z1t(),u.Y1t(),u.b2t(),u.S2t(),u.E2t(),t||m0(u.I$t.$D)&&u.Eh()},u.bd=function(){u.v2t(),u.E2t()},u.C2t=function(t){u.So(t)},u.m2t=kn(function(t){return u.E9(t)},50),u.V$t=function(t){u.g2t=void 0,u.So(new uZ(t))},u.k2t=function(){u.jP()},u.P2t=function(){u.qc.uD()},u.oa=i,u.gBt=r,u.I$t=e,u.qc=new o0(i,e,n.Jc),u.x0t=s.R0t(),u.Zb=s.Nd()-u.x0t,u.Cz=s.fP(),u.Rz=s._P(),u.I0t=s.LP(),u.C0t=s.NP(),u.I$t.N$t(u.u4),u.I$t.C$t(u.I2t),u.I$t.M$t(u.g0t),u.I$t.wn(sZ.x$t,u.C2t),u.I$t.O$t().then(function(t){u.So(new oZ(t.bt,t.Mc))},u.V$t),u}Pt(i,t);var n=i.prototype;return n.Y1t=function(){var t=this.I$t.$D.activeTrackIds;if(t){if(this.J1t()){var i=this.sO.NI.map(function(t){return t.o}),n=this.tO.NI.map(function(t){return t.o});Jn(i.concat(n),"0")&&t.push(0)}k0(t,this.tO),k0(t,this.sO),function(t,i){for(var n,r=!1,e=Ft(i.NI);!(n=e()).done;){var s=n.value;s.O0t=Jn(t,s.JI)?Jp.Kn:Jp.Nh}}(t,this.Gl)}},n.Z1t=function(){var t,i=null==(t=this.I$t.$D.media)?void 0:t.tracks;if(i){var n=i.filter(MZ),r=i.filter(LZ),e=i.filter(FZ);if(this.J1t()&&0===r.length&&0!==this.LP()){var s=this.$1t();r.push(s)}if(this.J1t()&&0===n.length){var u=this.t2t();n.push(u)}y0(this.tO,n.map(function(t){return t.trackId})),y0(this.sO,r.map(function(t){return t.trackId})),y0(this.Gl,e.map(function(t){return t.trackId})),_0(n,this.tO),_0(r,this.sO),function(t,i){for(var n,r=!1,e=Ft(t);!(n=e()).done;){var s=n.value,u=p0(i,s.trackId);u||(u=new UZ(s),i.tt(u),r=!0)}}(e,this.Gl)}},n.i2t=function(){this.Cz||(this.e2t=m(this.bd,250))},n.s2t=function(){p(this.e2t)},n.n2t=function(){this.s2t(),this.i2t()},n.r2t=function(){var t,i,n=this.I$t.$D,r=n.media,e=null!=(i=null==r?void 0:r.duration)?i:NaN,s=(null==r?void 0:r.streamType)===chrome.cast.media.StreamType.LIVE||e<0,u=s?1/0:e;this.Zb=u,this.h2t();var o=n.getEstimatedLiveSeekableRange(),h=null==(t=n.customData)?void 0:t.buffers;if(Fi(o)){var a=o.start,c=o.end,f=o.isMovingWindow,v=void 0===f?s:f,d=o.isLiveDone,l=void 0!==d&&d;this.BUt(a,c,v,l)}else if(Fi(h)){var g=h.seekable,w=g[0],m=g[1];this.BUt(w,m,s,!1)}else s?this.BUt(void 0,void 0,!0,!1):this.BUt(0,u,!1,!1)},n.o2t=function(){var t=this.I$t.$D,i=function(t){return void 0!==t&&t.playerState===chrome.cast.media.PlayerState.PAUSED}(t)||m0(t);this.a2t=i,this.Cz!==i&&(this.Cz=i,this.Cz?this.So(new kT(this.Gx())):this.So(new bT(this.Gx())))},n.hh=function(){var t=this.I$t.$D.playbackRate;this.u2t!==t&&(this.u2t=void 0,this.Rz!==t&&(this.Rz=t,this.So(new TT(this.Gx(),t))))},n.c2t=function(){var t;switch(this.I$t.$D.playerState){case chrome.cast.media.PlayerState.IDLE:t=jy.zL;break;case chrome.cast.media.PlayerState.BUFFERING:t=jy.Qn;break;case chrome.cast.media.PlayerState.PAUSED:case chrome.cast.media.PlayerState.PLAYING:t=jy.XL}this.u5(t),this.d2t()},n.BUt=function(t,i,n,r){Fi(t)&&Fi(i)?this.H4=new _P(t,i,n,n&&!r):this.H4=void 0},n.l2t=function(t,i){this.C0t=null!=i?i:this.C0t,this.I0t=null!=t?t:this.I0t,this.So(new My)},n.Je=function(t){this.f2t!==t?(this.Pz=!0,this.So(new ET(this.Gx()))):this.f2t=void 0},n.Mq=function(){if(this.Pz){this.Pz=!1;var t=this.Gx();this.So(new Rg(t,this.Hx())),this.So(new IT(t))}},n.Eh=function(){this.h5=!0,this.Kx()&&this.So(new ST(this.Gx()))},n.h2t=function(){var t=this.nxt,i=this.Nd();t===i||E(t)&&E(i)||(this.nxt=i,this.So(new AT(i)))},n.v2t=function(){var t=this.Gx();this.Pz||this._2t===t||(this._2t=t,this.So(new Rg(t,this.Hx())))},n.P0t=function(){this.Cz&&(this.Cz=!1,this.So(new bT(this.Gx())),this.u5(jy.zL))},n._nt=function(){return this.qc},n.Ux=function(){return this.rPt.Ly(this.x0t)},n.Gx=function(){if(this.qc.zc){var t=this.I$t.q$t();if(void 0!==t)return t}return this.nnt()},n.nnt=function(){return void 0!==this.g2t?this.x0t+this.g2t:this.h5?this.Nd():this.x0t+this.I$t.W$t()},n.Hx=function(){if(this.p2t)return new Date(this.nnt()+this.p2t)},n.Nd=function(){if(this.qc.zc){var t,i=null==(t=this.qc.Lnt[0])?void 0:t.ct;if(void 0!==i&&!E(i))return i}return this.x0t+this.Zb},n.Yx=function(){return this.nq},n.Kx=function(){return!this.qc.zc&&this.h5},n.fP=function(){return this.Cz},n._P=function(){return this.Rz},n.gP=function(t){this.Rz!==t&&(this.u2t=this.Rz,this.Rz=t,this.So(new TT(this.Gx(),t)),this.I$t.gP(t))},n.TP=function(){return this.o5},n.mP=function(){return this.qc.zc?LA.nL(0,this.Gx()):this.Ho.Ly(this.x0t)},n.EP=function(){var t,i;if(this.qc.zc)return LA.rL();var n=null!=(i=null==(t=this.H4)?void 0:t.J3().Ly(this.x0t))?i:LA.rL();if(n.V>0){var r=n.An(n.V-1);n=n.HM(LA.nL(r,this.Gx()))}return n},n.PP=function(){return this.Pz},n.Mx=function(){return this.tO},n.BP=function(){return this.sO},n.RP=function(){return this.Gl},n.$1t=function(){return{customData:{activeQuality:{averageBandwidth:0,bandwidth:0,codecs:"",frameRate:0,height:this.NP(),id:"0",name:"",width:this.LP()},enabled:!0,id:"0",kind:"main",label:"",language:"",qualities:[],uid:0},language:"",name:"",trackContentId:"",trackContentType:"",trackId:0,type:BZ.Mk}},n.t2t=function(){return{customData:{activeQuality:{averageBandwidth:0,bandwidth:0,codecs:"",id:"0",name:"",audioSamplingRate:0},qualities:[],enabled:!0,id:"0",kind:"main",label:"",language:"",uid:0},language:"",name:"",trackContentId:"",trackContentType:"",trackId:0,type:BZ.Bk}},n.J1t=function(){var t,i;return!(void 0!==(null==(t=this.gBt.F$t())?void 0:t.version))||(null==(i=this.gBt.F$t())?void 0:i.sdkType)===zZ.q0t},n.H$t=function(t){this.J1t()&&Yn(t,0),this.I$t.H$t(t)},n.LP=function(){return this.I0t},n.NP=function(){return this.C0t},n.QP=function(){this.Cz&&(this.Cz=!1,this.a2t=!1,this.So(new bT(this.Gx()))),this.I$t.QP()},n.jP=function(){this.Cz||(this.Cz=!0,this.a2t=!0,this.So(new kT(this.Gx()))),this.I$t.jP()},n.Oy=function(t){if(!this.qc.zc){var i=A.max(0,t-this.x0t);i=A.round(1e6*i)/1e6;var n=this.g2t;this.g2t=i,this.a2t=this.fP(),this.f2t=i,this.Pz=!0,this.So(new ET(this.Gx())),void 0===n&&(this.J1t()?this.m2t(i):this.E9(i))}},n.E9=function(t){this.I$t.Oy(t,this.a2t).then(this.w2t(t)).catch(this.V$t)},n.w2t=function(t){var i=this;return function(){void 0!==i.g2t&&(i.g2t===t?i.g2t=void 0:i.E9(i.g2t))}},n.u5=function(t){this.o5!==t&&(this.o5=t,this.So(new Vy(this.Gx(),t))),void 0===this.g2t&&this.Pz&&t>=jy.GL&&this.Mq(),this.d2t()},n.d2t=function(){if(this.Cz)this.y2t=!1;else{var t=this.o5>=jy.XL;this.y2t!==t&&(this.y2t=t,t?this.So(new Gy(this.Gx())):this.So(new zy(this.Gx())))}},n.b2t=function(){this.A2t||(this.A2t=v.createElement("div"),this.oa.xe.appendChild(this.A2t),this.A2t.className="theoplayer-ad-linear theoplayer-chromecast-ad",this.A2t.style.zIndex="10",ln(this.A2t)),this.A2t.style.display=this.qc.zc?"":"none"},n.S2t=function(){var t,i=null==(t=this.qc.Lnt[0])?void 0:t.KYt;i&&!this.T2t?(this.T2t=new c0(this.A2t,!0),this.T2t.O1t=i,this.T2t.wn("clickstart",this.k2t)):this.T2t&&(this.T2t.O1t=i)},n.E2t=function(){var t,i=null==(t=this.qc.Lnt[0])?void 0:t.kJt;if(void 0===i||i<0)this.x2t&&(this.x2t.kn(),this.x2t=void 0);else{if(!this.x2t){var n,r=null==(n=this.oa.Na)?void 0:n.gi;this.x2t=new g0(this.oa.Wu,r),this.A2t.appendChild(this.x2t.xe),this.x2t.wn("uD",this.P2t)}var e=this.I$t.q$t();void 0!==e&&(e=jy.Qn&&(r.kV=!0,r.So(new Hy(t.currentTime))),!r.xV&&r.RV<=jy.Qn&&i>=jy.GL&&(r.xV=!0,r.So(new Wy(t.currentTime))),r.RV<=jy.GL&&i>=jy.XL&&r.So(new qy(t.currentTime)),r.RV<=jy.XL&&i===jy.jL&&r.So(new Xy(t.currentTime)),r.RV=i},r.cA=r.oa.OP,r.Iz=r.oa.oP,r.gBt=n,r.gBt.wn(yZ.x$t,r.C2t),r.gBt.wn(yZ.n0t,r.s3t),r.gBt.wn(yZ.wy,r.n3t),r.gBt.wn(yZ.s0t,r.r3t),r.gBt.wn(yZ.r0t,r.h3t),r.qc=new kO(r),r.mz=r.oa.bt,r.Ac=r.oa.nu(),r.vft=new DZ(r,0,r.oa.nnt(),r.oa.Nd(),r.oa.Qx,r.oa.lP,r.oa.vP,r.oa.MP,r.oa.DP),r.V2t(),r}Pt(i,t);var n=i.prototype;return n.Ez=function(t){t&&(qg(this.mz&&Yg(this.mz),t&&Yg(t))||(this.mz=t,this.So(new VT(t))))},n.R2t=function(t){if(t){var i=bE(t,this.oa.Cd);qg(this.Ac&&Yg(this.Ac),i&&Yg(i))||(this.Ra.D0t(0),this.Ac=i,this.So(new XB(i)),this.Ra.P0t())}},n.D2t=function(t){for(var i,n=Ft(this.rt.NI);!(i=n()).done;){var r=i.value;if(r.JI===t)return r}for(var e,s=Ft(this.ht.NI);!(e=s()).done;){var u=e.value;if(u.JI===t)return u}},n._nt=function(){return this.qc},n.gnt=function(){return this.Zst},n.Mx=function(){return this.tO},n.Ux=function(){return this.Ra.Ux()._s()},n.Un=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return t?[4,this.m0t(t,null!=(n=t.ads)?n:[],t.streamType,NaN,0,null!=i?i:0)]:[2];case 1:return r.sent(),[2]}})}).call(this)},n.L2t=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:return(n=null!=(i=this.M2t)?i:this.Ac)?(e=this.M2t?null!=(r=this.M2t.ads)?r:[]:this.ort(),s=this.oa.Nd(),u=this.oa.EP(),o=iG(s,u,n),h=u.length>0?u.start(0):0,a=null!=t?t:this.nnt(),[4,this.m0t(n,e,o,s,h,a)]):[2];case 1:return c.sent(),[2]}})}).call(this)},n.ort=function(){var t=new AO;return this.qc.qnt(t),t.ort()},n.Hx=function(){return this.Ra.Hx()},n.qx=function(){return this.mz},n.Gx=function(){return this.Ra.Gx()},n.nnt=function(){return this.Ra.nnt()},n.Xx=function(t,i){this.O2t||(this.gBt.p0t()||this.O2t||!this.Ac?this.Ra.Oy(t):this.Un(this.Ac,t))},n.Nd=function(){return this.Ra.Nd()},n.Kx=function(){return this.Ra.Kx()},n.Yx=function(){return this.nq},n.Zx=function(){return this.rq},n.tP=function(){return this.eO},n.hP=function(){return this.oa.rP},n.aP=function(){return this.Iz},n.uP=function(t){this.Iz=t,this.So(new RT(this.zx,this.OP)),this.gBt.uP(t)},n.fP=function(){return this.Ra.fP()},n._P=function(){return this.Ra._P()},n.gP=function(t){this.Ra.gP(t)},n.mP=function(){return this.Ra.mP()._s()},n.yP=function(){return uS.HL},n.bP=function(t){},n.TP=function(){return this.Ra.TP()},n.EP=function(){return this.Ra.EP()._s()},n.PP=function(){return this.Ra.PP()},n.nu=function(){return this.Ac},n.Ta=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Ac=t,[4,this.Un(t)];case 1:return i.sent(),this.M2t=void 0,this.Ra.P0t(),[2]}})}).call(this)},n.RP=function(){return this.Gl},n.NP=function(){return this.Ra.NP()},n.LP=function(){return this.Ra.LP()},n.BP=function(){return this.sO},n.FP=function(){return this.cA},n.UP=function(t){this.cA=t,this.So(new RT(this.zx,this.OP)),this.gBt.UP(t)},n.zP=function(){},n.qP=function(){return this.ha},n.GP=function(){},n.QP=function(){this.gBt.p0t()||this.O2t||!this.Ac?this.Ra.QP():this.Un(this.Ac)},n.jP=function(){this.Ra.jP()},n.gr=function(){this.ho=!0},n.mr=function(){this.mz=void 0,this.ho=!1},n.be=function(){},n.we=function(){},n.m0t=function(t,i,n,r,e,s){return jt(function(){var u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:this.O2t=!0,this.F2t(),this.Ra.D0t(e),o="vod"===n,h=function(t,i,n,r){return{theoplayer_version:1,streamStart:t,isLive:i,sourceDescription:n,configuration:r}}(e,u="live"===n||"dvr"===n,t,this.Cd),a={w0t:t,Jc:i,zx:s>=0&&s!==1/0&&(o||0!==s)?A.max(0,s-e):void 0,ct:r,P0:u?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED,y0t:h},f.label=1;case 1:return f.trys.push([1,3,4,5]),[4,this.gBt.m0t(a)];case 2:return f.sent(),[3,5];case 3:return c=f.sent(),this.U2t(c),[3,5];case 4:return this.O2t=!1,[7];case 5:return[2]}})}).call(this)},n.V2t=function(){this.H2t(this.tO),this.H2t(this.sO),this.W2t(this.Gl)},n.H2t=function(t){for(var i,n=this,r=Ft(t.NI);!(i=r()).done;){var e=i.value;this.q2t(e)}t.wn(xg.rI,function(t){n.q2t(t.Ht),n.z2t()})},n.W2t=function(t){for(var i,n=this,r=Ft(t.NI);!(i=r()).done;){var e=i.value;this.G2t(e)}t.wn(xg.rI,function(t){n.G2t(t.Ht),n.z2t()})},n.q2t=function(t){t.wn(NZ.B0t,this.imt),t.wn(NZ.M0t,this.X2t),t.wn(NZ.M0t,this.Y1t)},n.G2t=function(t){t.wn(NZ.N0t,this.j2t),t.wn(NZ.N0t,this.Y1t)},n.Q2t=function(){for(var t,i=[],n=Ft(this.rt.NI);!(t=n()).done;){var r=t.value;r.Rt&&i.push(r.JI)}for(var e,s=Ft(this.ht.NI);!(e=s()).done;){var u=e.value;u.Rt&&i.push(u.JI)}for(var o,h=Ft(this.nt.NI);!(o=h()).done;){var a=o.value;a.Qk===Jp.Kn&&i.push(a.JI)}this.Ra.H$t(i)},n.K2t=function(t,i,n){this.Y2t=t,this.J2t=i,this.Z2t=n},n.$2t=function(t){var i,n;return!!t&&((null!=(n=null==(i=this.gBt.F$t())?void 0:i.version)?n:-1)>=2?t.map(function(t){return t.o}):[t[0].o])},n.t3t=function(t){this.i3t=t},n.$P=function(){},n.tI=function(){},n.sI=function(t){throw new y("Can't add a track while casting.")},n.KP=function(){return jt(function(){return zt(this,function(t){return this.Ra.KP(),this.F2t(),[2]})}).call(this)},n.F2t=function(){this.RV=jy.zL,this.kV=!1,this.xV=!1,this.nq=void 0,this.rq=void 0},n.kn=function(){return jt(function(){return zt(this,function(t){return this.F2t(),this.Vo(),this.vft=this.e3t(),this.gBt.mn(yZ.x$t,this.C2t),this.gBt.mn(yZ.n0t,this.s3t),this.gBt.mn(yZ.wy,this.n3t),this.gBt.mn(yZ.s0t,this.r3t),this.gBt.mn(yZ.r0t,this.h3t),this.gBt.kn(),[2]})}).call(this)},n.e3t=function(){return new DZ(this,this.Ra.R0t(),this.Ra.Gx(),this.Ra.Nd(),this.Ra.Kx(),this.Ra.fP(),this.Ra._P(),this.Ra.LP(),this.Ra.NP())},xt(i,[{key:"vft",get:function(){return this.Ra},set:function(t){var i=this.Ra;i&&(i.mn(sZ.x$t,this.C2t),i.mn(sZ.P$t,this.N2t),i.mn(A0,this.Rs),i.mn(Fy.AI,this.qV),t.D0t(i.R0t()),i.qnt(t._nt())),this.Ra=t,this.tO.OI=t.Mx(),this.sO.OI=t.BP(),this.Gl.OI=t.RP(),this.qc.OI=t._nt(),i&&i.kn(),t.wn(sZ.x$t,this.C2t),t.wn(sZ.P$t,this.N2t),t.wn(A0,this.Rs),t.wn(Fy.AI,this.qV)}},{key:"ro",get:function(){return this.ho}},{key:"Jc",get:function(){return this._nt()}},{key:"B2t",get:function(){return this.M2t||this.Ac},set:function(t){this.M2t=t}},{key:"zx",get:function(){return this.Gx()},set:function(t){this.Xx(t)}},{key:"WP",get:function(){return!1},set:function(t){}}]),i}(Yb);V(),It(),Dt();var S0=function(t){function i(i){var n;return(n=t.call(this,"error")||this).lt=void 0,n.lt=i,n}return Pt(i,t),i.prototype.xa=function(){return new E0(this.lt)},i}(Cg),E0=function(t){function i(i){var n;return(n=t.call(this,"error")||this).error=void 0,n.error=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var I0=function(t){function i(i){var n;return(n=t.call(this,"statechange")||this).state=void 0,n.state=i,n}return Pt(i,t),i}(ah);function R0(t,i){var n;return{get casting(){return t.xJ},get error(){return t.lt},get receiverName(){return t.o3t},get state(){return t.vft},start:function(){t.Tn()},stop:function(){t.KP()},join:function(){t.a3t()},leave:function(){t.u3t()},set connectionCallback(t){null==i||i.c3t(t)},get connectionCallback(){return null==i?void 0:i.d3t()},get source(){return n||t.Mc},set source(i){n=i,t.Mc=i},addEventListener:function(i,n){var r=nw(i,tw);t.wn(r,n)},removeEventListener:function(i,n){var r=nw(i,tw);t.mn(r,n)}}}V(),It();var C0=function(t){function i(i,n,r,e){var s;return(s=t.call(this)||this).ZS=void 0,s.nq=void 0,s.hu=void 0,s.v3t=void 0,s.oa=void 0,s.Ra=KS.UNAVAILABLE,s.p3t=void 0,s.LY=void 0,s.l3t=void 0,s._3t=!1,s.uV=new dr,s.D3t=function(){s.l3t.wn(RZ.E0t,s.R3t),s.vft=s.l3t.N3t()},s.R3t=function(t){var i=t.vft;s.vft=i,i!==KS.UNAVAILABLE&&i!==KS.AVAILABLE||s.b3t(!1).catch(s.u8)},s.M2t=void 0,s.u8=function(t){mr(t)||j(t,UK)&&(s.nq=t,s.So(new S0(t).Ca))},s.LY=i,s.v3t=n,s.l3t=e,s.ZS=r.chromecast,s.p3t=br(s.l3t.GY(s.ZS,s.uV.Yg),s.uV),s.p3t.then(s.D3t).catch(s.u8),s}Pt(i,t);var n=i.prototype;return n.g3t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:if(!this.p3t)throw new y("Chromecast must be initialized before starting a session");return[4,this.p3t];case 1:return t.sent(),this.l3t.f3t()?[3,3]:[4,this.l3t.m3t()];case 2:t.sent(),t.label=3;case 3:return[2]}})}).call(this)},n.Tn=function(){return jt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:this._3t=!0,r.label=1;case 1:return r.trys.push([1,5,,6]),this.vft=KS.CONNECTING,[4,this.g3t()];case 2:return r.sent(),[4,this.w3t()];case 3:return r.sent(),this.oa&&(t=this.v3t.nu(),i=this.l3t.y3t(t),this.oa.B2t=i?bE(i,this.v3t.Cd):this.M2t,this.oa.L2t()),this.vft=KS.CONNECTED,[4,this.v3t.KP()];case 4:return r.sent(),[3,6];case 5:return n=r.sent(),this.b3t(!1).catch(pn),this.vft=KS.AVAILABLE,mr(n)||this.u8(n),[3,6];case 6:return[2]}})}).call(this)},n.a3t=function(){return jt(function(){var t,i,n;return zt(this,function(r){switch(r.label){case 0:this._3t=!0,r.label=1;case 1:return r.trys.push([1,5,,7]),this.vft=KS.CONNECTING,[4,this.g3t()];case 2:return r.sent(),[4,this.w3t()];case 3:return r.sent(),this.oa&&(t=this.v3t.nu(),(i=this.l3t.A3t(t))&&(this.oa.B2t=bE(i,this.v3t.Cd))),this.vft=KS.CONNECTED,[4,this.v3t.KP()];case 4:return r.sent(),[3,7];case 5:return n=r.sent(),[4,this.b3t(!0).catch(pn)];case 6:return r.sent(),this.vft=KS.AVAILABLE,mr(n)||this.u8(n),[3,7];case 7:return[2]}})}).call(this)},n.S3t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.l3t.f3t()?[4,this.Tn()]:[2];case 1:return t.sent(),[2]}})}).call(this)},n.w3t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return null!=this.oa||(this.oa=this.T3t()),this.nq=void 0,this.v3t.jP(),[4,this.LY.k3t(this.oa)];case 1:return t.sent(),[2]}})}).call(this)},n.T3t=function(){var t=new T0(this.v3t,this.l3t.f3t());return t.t3t(this.u8),t},n.E3t=function(){this.oa&&(this.oa.kn(),this.oa=void 0)},n.b3t=function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:if(this._3t=!1,!this.oa)return[2];i=this.oa.ro,n=this.oa.nu(),r=this.oa.nnt(),s.label=1;case 1:return s.trys.push([1,,4,5]),i?(null!=(e=t?this.l3t.x3t(n):this.l3t.P3t(n))||(e=n),[4,this.LY.I3t(e,e===n)]):[3,3];case 2:s.sent(),this.v3t.Xx(r),this.v3t.QP(),s.label=3;case 3:return[3,5];case 4:return this.E3t(),[7];case 5:return[2]}})}).call(this)},n.u3t=function(){this.xJ&&(this.l3t.C3t(!1),this.b3t(!0).catch(this.u8))},n.KP=function(){this.xJ&&(this.l3t.C3t(!0),this.b3t(!1).catch(this.u8))},n.kn=function(){this.uV.Zg(),this.l3t.mn(RZ.E0t,this.R3t),this.Vo(),this.E3t()},xt(i,[{key:"xJ",get:function(){return this.vft===KS.CONNECTING||this.vft===KS.CONNECTED}},{key:"lt",get:function(){return this.nq}},{key:"Ca",get:function(){return this.hu||(this.hu=R0(this,this.l3t)),this.hu}},{key:"o3t",get:function(){var t;return null==(t=this.l3t.f3t())?void 0:t.A0t()}},{key:"Mc",get:function(){return this.oa?this.oa.B2t:this.M2t},set:function(t){this.M2t=t?bE(t,this.v3t.Cd):void 0,this.oa&&(this.oa.B2t=this.M2t,this.M2t&&this.oa.Un(this.M2t))}},{key:"vft",get:function(){return this.Ra},set:function(t){var i=t;this._3t||i!==KS.CONNECTING&&i!==KS.CONNECTED||(i=KS.AVAILABLE),this.Ra!==i&&(this.Ra=i,this.So(new I0(this.vft)))}}]),i}(hh);V(),It(),Bt(),Dt();var P0=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).hu=void 0,i}Pt(i,t);var n=i.prototype;return n.a3t=function(){Vi.um("Joining a Chromecast session is not possible when JoinStrategy is configured to disabled")},n.u3t=function(){Vi.um("Leaving a Chromecast session is not possible when JoinStrategy is configured to disabled")},n.Tn=function(){Vi.um("Starting a Chromecast session is not possible when JoinStrategy is configured to disabled")},n.KP=function(){Vi.um("Stopping a Chromecast session is not possible when JoinStrategy is configured to disabled")},n.S3t=function(){return ot.resolve()},n.kn=function(){},xt(i,[{key:"xJ",get:function(){return!1}},{key:"lt",get:function(){}},{key:"o3t",get:function(){}},{key:"Mc",get:function(){},set:function(t){}},{key:"vft",get:function(){return KS.UNAVAILABLE}},{key:"Ca",get:function(){return this.hu||(this.hu=R0(this)),this.hu}}]),i}(hh);function D0(t){return{bt:t.bt,zx:t.Gx(),ct:t.Nd(),Qx:t.Qx,lt:t.Yx(),Jx:t.Zx(),oP:t.oP,lP:t.lP,vP:t.vP,AP:t.AP,xP:t.xP,DP:t.DP,MP:t.MP,OP:t.OP}}V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It();var N0=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).tO=new cA,r.sO=new cA,r.Gl=new fA,r.$L=void 0,r.eO=new wA,r.iO=new KT,r.qc=void 0,r.$L=new XT(i.Sq),r.tO.OI=i.ht,r.sO.OI=i.rt,r.Gl.OI=i.nt,r.eO.OI=i.$x,r.iO.OI=i.iP,r.qc=new kO(r),r.qc.OI=i.Jc,r}Pt(i,t);var n=i.prototype;return n._nt=function(){return this.qc},n.Mx=function(){return this.tO},n.tP=function(){return this.eO},n.eP=function(){return this.iO},n.Aa=function(){return this.$L},n.RP=function(){return this.Gl},n.BP=function(){return this.sO},n.switchContexts=function(t){this.oa=t,this.tO.OI=t.ht,this.sO.OI=t.rt,this.Gl.OI=t.nt,this.$L.OI=t.Sq,this.eO.OI=t.$x,this.iO.OI=t.iP,this.qc.OI=t.Jc},n.B3t=function(t){this.oa!==t&&(this.yz(),this.switchContexts(t),this.wz())},n.nO=function(t){if(this.oa!==t){var i;this.yz(),this.bnt&&(i=D0(this));var n=this.qx(),r=this.qP(),e=this.zP();if(this.switchContexts(t),void 0!==i)FT(this,i,D0(this));var s=this.qx();s!==n&&this.So(new VT(s)),this.qP()!==r&&this.So(new jT),this.zP()!==e&&this.So(new HT),this.wz()}},n.kn=function(i){var n=this;return jt(function(){return zt(this,function(r){switch(r.label){case 0:return[4,t.prototype.kn.call(n,i)];case 1:return r.sent(),this.$L.kn(i),this.tO.kn(i),this.sO.kn(i),this.Gl.kn(i),this.eO.kn(),this.iO.kn(),[4,this.qc.kn(i)];case 2:return r.sent(),[2]}})}).call(this)},xt(i,[{key:"$x",get:function(){return this.tP()}},{key:"iP",get:function(){return this.eP()}}]),i}(Yb);V(),It();function x0(t){var i=v.createElement("div");return hn(i,"theo-ads-sgai-ima-container"),function(t){t.style.boxSizing="border-box",t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%"}(i),t.appendChild(i),i}function B0(t){var i=t.style;i.boxSizing="border-box",i.position="absolute",i.display="none",i.border="0 solid transparent",i.borderWidth="0px",i.width="100%",i.height="100%"}function O0(t){var i=t.style;i.display="",i.backgroundColor="",i.backgroundRepeat="",i.backgroundAttachment="",i.border="",i.borderWidth="",i.flex="",i.transform="",i.transition="",i.backgroundImage="",i.backgroundSize="",i.backgroundPosition="",i.alignItems="",i.position=""}function M0(t,i,n,r,e){var s=i/n,u=1,o=0,h=0;if(s>=r/e){var a=r/s;o=(e-a)/2,u=a/n}else{var c=e*s;h=(r-c)/2,u=c/i}t.style.left=h/r*100+"%",t.style.top=o/e*100+"%",t.style.width=i*u/r*100+"%",t.style.height=n*u/e*100+"%"}function L0(t){return zo(t,"theo-ads://dai.break")}function F0(t){return t&&t.integration===DS.THEOADS}var U0=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).M3t=void 0,r.U3t=void 0,r.q3t=void 0,r.ta=new Rd,r.L3t=void 0,r.H3t=void 0,r.fEt=void 0,r.W3t=void 0,r.z3t=function(t){var i=t.Ht;V0(r.H3t,i)&&(i.Rt=!0)},r.G3t=function(t){var i=t.Ht;V0(r.fEt,i)&&(i.Qk=Jp.Kn)},r.X3t=function(t){var i=t.Ht;V0(r.W3t,i)&&(i.Rt=!0)},r.V3t=function(){r.U3t.ht.mn(xg.rI,r.z3t),r.U3t.nt.mn(xg.rI,r.G3t),r.U3t.rt.mn(xg.rI,r.X3t)},r.U3t=i,r.Cd.cast.strategy!==pA.DISABLED?r.M3t=new C0(r,i,r.Cd.cast,n):r.M3t=new P0,r.GX.BJ(r.M3t),r}Pt(i,t);var n=i.prototype;return n.nu=function(){var i=t.prototype.nu.call(this);return!i&&this.M3t.xJ&&this.M3t.Mc?this.M3t.Mc:i},n.Ta=function(i,n){var r=this;return this.ta.Zo(function(n){return r.L3t=new dr,r.L3t.$g(n),br(t.prototype.Ta.call(r,i,r.L3t.Yg),r.L3t)},n)},n.QP=function(){t.prototype.QP.call(this),this.Cd.cast.strategy!==pA.AUTO||this.M3t.xJ||this.M3t.S3t()},n.k3t=function(t){var i=this;return this.ta.Zo(function(n){return i.O3t(t,n)})},n.I3t=function(t,i){var n=this;return void 0===t&&(t=void 0),void 0===i&&(i=!1),this.ta.Zo(function(r){return n.F3t(t,i,r)})},n.O3t=function(t,i){pr(i),this.U3t.Jc&&this.U3t.Jc.qnt(t.Jc),this.V3t(),this.H3t=Wn(this.U3t.ht.NI,function(t){return t.Rt}),this.fEt=Wn(this.U3t.nt.NI,function(t){return"showing"===t.Qk}),this.W3t=Wn(this.U3t.rt.NI,function(t){return t.Rt}),this.q3t=t,this.q3t.K2t(this.H3t,this.fEt,this.W3t),this.nO(t),this.q3t.gr()},n.F3t=function(t,i,n){return jt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:if(pr(n),void 0===(r=this.q3t))return[2];u.label=1;case 1:return u.trys.push([1,5,6,7]),t?[4,this.U3t.KP()]:[3,4];case 2:return u.sent(),pr(n),(e=bE(t,this.U3t.Cd)).sources.forEach(function(t){t&&(t.bypassLicense=!0)}),i&&(e.ads=null==(s=e.ads)?void 0:s.filter(F0)),this.L3t=new dr,this.L3t.$g(n),[4,br(this.U3t.Ta(e,this.L3t.Yg),this.L3t)];case 3:u.sent(),u.label=4;case 4:return i&&this.U3t.Jc&&r.Jc.qnt(this.U3t.Jc),[3,7];case 5:return _r(u.sent()),[3,7];case 6:return r.mr(),this.nO(this.U3t),this.H3t=Wn(this.q3t.ht.NI,function(t){return t.Rt}),this.fEt=Wn(this.q3t.nt.NI,function(t){return"showing"===t.Qk}),this.W3t=Wn(this.q3t.rt.NI,function(t){return t.Rt}),this.U3t.ht.wn(xg.rI,this.z3t),this.U3t.nt.wn(xg.rI,this.G3t),this.U3t.rt.wn(xg.rI,this.X3t),this.U3t.wn(Fy.EM,this.V3t),this.q3t===r&&(this.q3t=void 0),[7];case 7:return[2]}})}).call(this)},n.KP=function(){var i,n=this;return this.H3t=void 0,this.fEt=void 0,this.W3t=void 0,this.V3t(),null==(i=this.L3t)||i.Zg(),this.ta.Zo(function(){return t.prototype.KP.call(n)})},n.kn=function(){var i=this;return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return null==(n=this.L3t)||n.Zg(),this.M3t.kn(),[4,this.I3t()];case 1:return r.sent(),[4,this.ta.kn()];case 2:return r.sent(),[4,t.prototype.kn.call(i)];case 3:return r.sent(),[2]}})}).call(this)},i}(N0);function V0(t,i){return void 0!==t&&void 0!==i&&(t.bs===i.bs&&i.Th===t.Th)}V(),It(),Wt(),Bt(),Yt();var j0=function(){function t(t){this.p3t=void 0,this.hu=void 0,this.l3t=void 0,this.l3t=t}var i=t.prototype;return i.GY=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.p3t||(this.p3t=this.J3t(t)),[4,this.p3t];case 1:return i.sent(),[2]}})}).call(this)},i.J3t=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.l3t.GY(t)];case 1:return i.sent(),[2]}})}).call(this)},i.m3t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:if(!this.p3t)throw new y("Chromecast must be initialized before starting a session");return[4,this.p3t];case 1:return t.sent(),this.l3t.f3t()?[3,3]:[4,this.l3t.m3t()];case 2:t.sent(),t.label=3;case 3:return[2]}})}).call(this)},i.Z3t=function(){this.l3t.C3t(!1)},i.Y3t=function(){this.l3t.C3t(!0)},xt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{initialize:function(i){var n=t.GY(yA(i));return n.catch(pn),n},startSession:function(){var i=t.m3t();return i.catch(pn),i},endSession:function(){t.Y3t()}}}(this)),this.hu}}]),t}();var H0=new PZ,W0=new j0(H0),z0={get chromecast(){return W0.Ca}};iA(function(t){return new U0(t,H0)},Zb.Ent),V(),It(),V(),It(),V(),It(),V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It(),Wt(),Yt();var q0=function(){function t(t){this.a4t=void 0,this.n4t=void 0,this.h4t=void 0,this.a4t=t,this.n4t=ro(),this.h4t=ro()}var i=t.prototype;return i.$3t=function(t,i,n,r){var e=this;t.Gz.forEach(function(t){if(!e.t4t(t.i4t)){var s=t.e4t(i,n,r);s&&e.s4t(s)}})},i.t4t=function(t){return this.n4t.get(t)},i.s4t=function(t){this.n4t.set(t.r4t,t),this.h4t.set(t.r4t,t.o4t),this.a4t.au(t.u4t)},i.znt=function(t){this.h4t.has(t.r4t)||(this.h4t.set(t.r4t,t),this.a4t.au(t.u4t))},i.c4t=function(t){return this.h4t.forEach(t)},i.d4t=function(t){return this.n4t.forEach(t)},i.l4t=function(t){var i=!1;return this.n4t.forEach(function(n){i=n.l4t(t)||i}),i},i.kn=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=[],this.n4t.forEach(function(i){return t.push(i.kn())}),this.h4t.forEach(function(i){return t.push(i.kn())}),[4,ot.all(t)];case 1:return i.sent(),this.n4t.clear(),this.h4t.clear(),[2]}})}).call(this)},t}();V(),It(),Dt();var X0=function(t){function i(i,n,r,e){var s;return(s=t.call(this,"_4t")||this).AZt=void 0,s.Iy=void 0,s.Jy=void 0,s.Mc=void 0,s.AZt=i,s.Iy=n,s.Jy=r,s.Mc=e,s}return Pt(i,t),i.prototype.xa=function(){return new G0(this.AZt,this.Iy,this.Jy,this.Mc)},i.f4t=function(t){return new i(zJ.GENERAL,t.Iy,t.TZt)},i.v4t=function(t,n){return new i(t.AZt,t.message,t.TZt,n)},i}(Cg),G0=function(t){function i(i,n,r,e){var s;return(s=t.call(this,"aderror")||this).problemType=void 0,s.message=void 0,s.errorCode=void 0,s.source=void 0,s.problemType=i,s.message=n,s.errorCode=r,s.source=e,s}return Pt(i,t),i}(ah),Q0=function(t){function i(i){var n;return(n=t.call(this)||this).A4t=void 0,n.p4t=void 0,n.y4t=!1,n.d9=!1,n.hu=void 0,n.T4t=function(t){if(n.y4t&&t.Jy!==qJ.VAST_NO_ADS_AFTER_WRAPPER&&t.Jy!==qJ.VAST_EMPTY_RESPONSE){var i=new ww(gw.ADVERTISEMENT_ERROR,t.Iy),r=new _d(pd.AD_BLOCKER_DETECTED,t.Iy+" Turn off your AdBlocker and try again.",i);n.A4t.Qq(r)}},n.hst=function(){n.d9=!0},n.A4t=i,n.p4t=new q0(n),n.wn("_4t",n.T4t),i.wn(ch.uo,n.hst),n}Pt(i,t);var n=i.prototype;return n.qnt=function(t){this.m4t(function(i){i.qnt(t)})},n.W6=function(t,i,n){try{this.y4t=n;var r=NS.Bg.jz(t);if(r.i4t===n0.knt)return;var e=this.p4t.t4t(r.i4t);if(!e)throw new WJ(zJ.ADBLOCK,void 0,"Ads could not be loaded.");i!==JB.Mnt&&this.d9||this.A4t.b4t(e),r.W6(t,i,e,this.y4t)}catch(i){0,this.So(X0.v4t(i,t.sources))}},n.uD=function(){this.m4t(function(t){t.uD()})},n.Hnt=function(t){this.m4t(function(i){i.Hnt(t)})},n.znt=function(t){this.p4t.znt(t)},n.Wnt=function(t,i){return this.A4t.Wnt(t,i)},n.S4t=function(t){this.p4t.d4t(function(i){i.S4t(t)})},n.l4t=function(t){return this.p4t.l4t(t)},n.m4t=function(t){return this.p4t.c4t(t)},n.GP=function(){this.p4t.d4t(function(t){return t.GP()})},n.hr=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.d9=!1,t=[],this.p4t.d4t(function(i){return t.push(i.KP())}),[4,ot.all(t)];case 1:return i.sent(),[2]}})}).call(this)},n.kn=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Vo(),[4,this.p4t.kn()];case 1:return t.sent(),this.A4t.mn(ch.uo,this.hst),this.mn("_4t",this.T4t),[2]}})}).call(this)},xt(i,[{key:"g4t",get:function(){return this.p4t}},{key:"zc",get:function(){var t=!1;return this.m4t(function(i){t=t||i.w4t}),t}},{key:"Lnt",get:function(){var t=[];return this.m4t(function(i){var n,r=i.Lnt;r.length&&(n=t).push.apply(n,[].concat(r))}),t}},{key:"Fnt",get:function(){var t=null;return this.m4t(function(i){null!=t||(t=i.Fnt)}),t}},{key:"Unt",get:function(){var t=[];return this.m4t(function(i){var n;(n=t).push.apply(n,[].concat(i.Unt))}),t}},{key:"Vnt",get:function(){var t=[];return this.m4t(function(i){var n;(n=t).push.apply(n,[].concat(i.Vnt))}),t}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=ZB(this)}}]),i}(XI);V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt();var Y0=function(t){function i(i){var n;return(n=t.call(this)||this).f$t=void 0,n.qc=void 0,n.k4t=void 0,n.E4t=void 0,n.x4t=void 0,n.I4t=void 0,n.f$t=i,n.qc=[],n.k4t=-1,n.E4t=-1,n.x4t=void 0,n.I4t=!1,n}Pt(i,t);var n=i.prototype;return n.P4t=function(){this.I4t=!0},n.C4t=function(t){this.qc.push(t),this.I4t=!1},n.R4t=function(t){Yn(this.qc,t)},xt(i,[{key:"Jc",get:function(){return this.qc}},{key:"G0t",get:function(){return this.k4t},set:function(t){this.k4t=t}},{key:"X0t",get:function(){return this.E4t},set:function(t){this.E4t=t}},{key:"qOt",get:function(){return this.f$t},set:function(t){this.f$t=t}},{key:"y0t",get:function(){return this.x4t}},{key:"pP",get:function(){return this.I4t}}]),i}(QZ),$0=function(t){function i(i,n){var r;return(r=t.call(this,n.timeOffset)||this).D4t=void 0,r.N4t=[],r.D4t=i,r.er(n),r}Pt(i,t);var n=i.prototype;return n.er=function(t){void 0!==t.maxDuration&&(this.k4t=t.maxDuration),void 0!==t.customData&&(this.x4t=t.customData)},n.B4t=function(t){var i=this.qc.indexOf(t);return i>=0&&i=.25&&this.u4t.So(new f1(t,e)),n<.5&&r>=.5&&this.u4t.So(new d1(t,e)),n<.75&&r>=.75&&this.u4t.So(new g1(t,e))},i.M4t=function(t){Jn(this.g5t,t)||(this.g5t.push(t),t.od.M4t(t),this.m5t(t.od),this.u4t.So(new gO(t,this.A4t.Gx())))},i.G$t=function(t){if(Jn(this.g5t,t)){var i=t.od.B4t(t);this.u4t.So(new s1(t,t.Q4t)),this.w5t(t,i)}},i.u5t=function(t){if(Jn(this.g5t,t)){var i=t.od.B4t(t);this.u4t.So(new mO(t,this.A4t.Gx())),this.w5t(t,i)}},i.R4t=function(t){if(Jn(this.qc,t)){var i=t.od.B4t(t);Yn(this.qc,t),t.od.R4t(t),this.u4t.So(new a1(t.od)),this.w5t(t,i)}},i.c5t=function(t){var i=new $0(this.u$t,t);return this.y1t.push(i),this.u4t.So(new sO(i)),i},i.d5t=function(t,i){t.er(i),this.u4t.So(new o1(t))},i.l5t=function(t){if(Jn(this.y1t,t)){for(var i,n=Ft(t.Jc.slice());!(i=n()).done;){var r=i.value;this.R4t(r)}Yn(this.y1t,t),this.u4t.So(new rO(t))}},i.f5t=function(){for(var t,i=Ft(this.y1t.slice());!(t=i()).done;){var n=t.value;this.l5t(n)}},i.v5t=function(t){this.u4t.So(new X0(zJ.GENERAL,t.message))},i._5t=function(t,i){var n=new _d(null!=i?i:pd.AD_ERROR,t.message,t);this.A4t.Qq(n)},i.y5t=function(t){return Wn(this.y1t,function(i){return i.qOt===t})},i.p5t=function(t){var i;return null!=(i=this.y5t(t.timeOffset))?i:this.c5t(t)},i.w5t=function(t,i){Yn(this.g5t,t);var n=t.od;0!==this.g5t.length||this.w1t!==n||i||(n.P4t(),this.m5t(void 0))},i.m5t=function(t){this.w1t!==t&&(void 0!==this.w1t&&this.u4t.So(new fO(this.w1t)),this.w1t=t,void 0!==t&&this.u4t.So(new dO(t)))},i.o5t=function(t){var i=Wn(this.qc,function(i){return i.Ont()===t});if(void 0===i)throw new y('Invalid ad for integration "'+this.u$t+'"');return i},i.r5t=function(t){var i=Wn(this.y1t,function(i){return i.Ont()===t});if(void 0===i)throw new y('Invalid ad break for integration "'+this.u$t+'"');return i},i.Ta=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return pr(i),(null==(n=this.f8)?void 0:n.setSource)?[4,ot.resolve(this.f8.setSource(t))]:[3,2];case 1:return uE(r=e.sent())&&(r=t),[2,bE(r,this.A4t.Cd)];case 2:return[2,t];case 3:return[2]}})}).call(this)},i.b5t=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(null==(t=this.f8)?void 0:t.resetSource)?[4,ot.resolve(this.f8.resetSource())]:[3,2];case 1:return i.sent(),[3,3];case 2:this.f5t(),i.label=3;case 3:return[2]}})}).call(this)},i.kn=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(null==(t=this.f8)?void 0:t.destroy)?[4,ot.resolve(this.f8.destroy()).catch(pn)]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.f5t(),this.m5t(void 0),this.f8=void 0,this.u4t.kn(),[2]}})}).call(this)},xt(t,[{key:"Jc",get:function(){return this.qc}},{key:"K0t",get:function(){return this.y1t}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get integration(){return t.u$t},get ads(){return t.Jc.map(function(t){return t.Ont()})},get adBreaks(){return t.K0t.map(function(t){return t.Ont()})},createAd:function(i,n){return t.n5t(i,n?t.r5t(n):void 0).Ont()},updateAd:function(i,n){t.h5t(t.o5t(i),n)},updateAdProgress:function(i,n){var r=Cn(Number(n),0,1);t.a5t(t.o5t(i),r)},beginAd:function(i){t.M4t(t.o5t(i))},endAd:function(i){t.u5t(t.o5t(i))},skipAd:function(i){t.G$t(t.o5t(i))},removeAd:function(i){t.R4t(t.o5t(i))},createAdBreak:function(i){return t.c5t(i).Ont()},updateAdBreak:function(i,n){t.d5t(t.r5t(i),n)},removeAdBreak:function(i){t.l5t(t.r5t(i))},removeAllAds:function(){t.f5t()},error:function(i){t.v5t(i)},fatalError:function(i,n){var r=n?Number(n):void 0;t._5t(i,r)}}}(this)}},{key:"uN",get:function(){return this.f8},set:function(t){this.f8=t}},{key:"w4t",get:function(){return this.g5t.some(function(t){return t.V4t===K0.BZt})}},{key:"r4t",get:function(){return this.u$t}},{key:"Lnt",get:function(){return this.g5t}},{key:"Fnt",get:function(){var t;return null!=(t=this.w1t)?t:null}},{key:"Unt",get:function(){return nr(this.y1t,function(t){return t.Unt})}},{key:"Vnt",get:function(){return this.y1t.filter(function(t){return!t.pP})}}]),t}();V(),It(),Bt();var p1=function(){function t(t){var i=this;this.oa=void 0,this.r9=void 0,this.A5t=!1,this.Ed=function(t){1!==i.oa.vP&&(i.r9=i.oa.vP,i.oa.vP=1),i.A5t=!0},this.Bd=function(t){i.A5t=!1,void 0!==i.r9&&(i.oa.vP=i.r9,i.r9=void 0)},this.oa=t,this.addAdListeners()}var i=t.prototype;return i.destroy=function(){this.removeAdListeners()},i.addAdListeners=function(){var t,i;null==(t=this.oa.Jc)||t.wn("Ynt",this.Ed),null==(i=this.oa.Jc)||i.wn("Knt",this.Bd)},i.removeAdListeners=function(){var t,i;null==(t=this.oa.Jc)||t.mn("Ynt",this.Ed),null==(i=this.oa.Jc)||i.mn("Knt",this.Bd)},xt(t,[{key:"player",get:function(){return this.oa},set:function(t){this.oa&&this.removeAdListeners(),this.oa=t,this.addAdListeners()}},{key:"inAdBreak",get:function(){return this.A5t}}]),t}(),y1=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).S5t=void 0,r.U3t=void 0,r.P5t=[],r.k5t=void 0,r.E5t=void 0,r.nq=void 0,r.Wz=void 0,r.C5t=void 0,r.I5t=1,r.U3t=i,r.S5t=new Q0(r),r.S5t.g4t.$3t(n,i,r,i.Cd),r}Pt(i,t);var n=i.prototype;return n._nt=function(){return this.S5t},n.GP=function(){this.U3t.GP(),this.S5t.GP()},n.QP=function(){void 0===this.nq?(void 0!==this.E5t&&this.x5t(this.E5t),t.prototype.QP.call(this)):this.So(new Cb(this.nq))},n.Ta=function(i,n){var r=this;return jt(function(){var e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:if(pr(n),!(e=i))return[3,4];s=Ft(this.P5t),f.label=1;case 1:return(u=s()).done?[3,4]:[4,u.value.Ta(e,n)];case 2:e=f.sent(),f.label=3;case 3:return[3,1];case 4:return[4,t.prototype.Ta.call(r,e,n)];case 5:if(f.sent(),pr(n),null==e?void 0:e.ads)for(o=Boolean(e.blockContentIfAdError),this.S5t.S4t(e.playAdsAfterTime),h=Ft(e.ads);!(a=h()).done;)c=a.value,this.S5t.W6(c,JB.Mnt,o);return[2]}})}).call(this)},n.KP=function(){var i=this;return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return this.nq=void 0,this.Wz=void 0,[4,this.S5t.hr()];case 1:return e.sent(),this.I3t(),[4,t.prototype.KP.call(i)];case 2:e.sent(),n=Ft(this.P5t),e.label=3;case 3:return(r=n()).done?[3,6]:[4,r.value.b5t()];case 4:e.sent(),e.label=5;case 5:return[3,3];case 6:return[2]}})}).call(this)},n.x5t=function(t){this.I5t=this.oa.vP;var i=this.oa.OP,n=this.oa.oP;t.UP(i),t.uP(n),this.k5t=t,this.E5t=void 0,this.nO(t)},n.b4t=function(t){void 0===this.k5t&&(this.E5t=t)},n.I3t=function(){this.E5t=void 0,void 0!==this.k5t&&(this.U3t.vP=this.I5t,this.U3t.OP=this.OP,this.U3t.oP=this.oP,this.nO(this.U3t),this.k5t=void 0)},n.Yx=function(){var i;return null!=(i=this.Wz)?i:t.prototype.Yx.call(this)},n.Zx=function(){var i;return null!=(i=this.nq)?i:t.prototype.Zx.call(this)},n.Qq=function(t){void 0===this.Zx()&&(this.nq=t,this.Wz=pw(t),this.So(new Cb(t)))},n.eI=function(t){return void 0===this.k5t&&this.S5t.l4t(t)},n.Wnt=function(t,i){try{var n=new m1(t,this);n.uN=i(n.Ca),this.S5t.znt(n),this.P5t.push(n),t!==DS.UPLYNK&&(this.C5t=new p1(this))}catch(i){this.S5t.So(new X0(zJ.GENERAL,'Error while constructing ad integration "'+t+'": '+i+'"'))}},n.gP=function(i){var n;(null==(n=this.C5t)?void 0:n.inAdBreak)||t.prototype.gP.call(this,i)},n.kn=function(){var i=this;return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:r=Ft(this.P5t),s.label=1;case 1:return(e=r()).done?[3,4]:[4,e.value.kn().catch(pn)];case 2:s.sent(),s.label=3;case 3:return[3,1];case 4:return[4,this.S5t.kn()];case 5:return s.sent(),this.I3t(),null==(n=this.C5t)||n.destroy(),this.C5t=void 0,[4,t.prototype.kn.call(i)];case 6:return s.sent(),[2]}})}).call(this)},xt(i,[{key:"T5t",get:function(){return this.k5t}}]),i}(N0);iA(function(t){return new y1(t,NS.Bg)},Zb.Ant),V(),It(),Bt(),V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Dt(),Yt();var _1=Oi.ru&&Oi.Q_<12,k1=function(t){function i(i,n){var r;return(r=t.call(this,i,!0)||this).A4t=void 0,r.M5t=void 0,r.sO=void 0,r.tO=void 0,r.Gl=void 0,r.eO=void 0,r.iO=void 0,r.R5t=void 0,r.ha=void 0,r.cq=void 0,r.L5t=void 0,r.O5t=void 0,r.A4t=n,r.M5t=!1,r.sO=new fw,r.tO=new fw,r.Gl=new sy,r.eO=new vA,r.iO=new GT,r.R5t=new XI,r.ha=new fS,r.cq=new jb,r.L5t=function(){r.oa.be()},r.O5t=function(){r.F5t()},r.oa.wn(ch.Pw,r.Rs),r}Pt(i,t);var n=i.prototype;return n.nnt=function(){return this.oa.nnt()},n.Ux=function(){return LA.rL()._s()},n.Hx=function(){},n.Wx=function(t){},n._P=function(){return 1},n.gP=function(t){},n.mP=function(){return new LA([0,this.zx])._s()},n.PP=function(){return!1},n.RP=function(){return this.Gl},n.BP=function(){return this.sO},n.ds=function(){return this.qP().ds},n.qP=function(){return this.ha},n.Ea=function(){},n.kn=function(){return jt(function(){return zt(this,function(t){return this.Vo(),this.tO.kn(),this.sO.kn(),this.Gl.kn(),this.R5t.kn(),this.oa.mn(ch.Pw,this.Rs),[2]})}).call(this)},n.D5t=function(){_1&&this.N5t(),this.w4t||this.A4t.x5t(this)},n.I3t=function(){this.w4t&&(_1&&this.B5t(),Oi.Tg&&this.xe.querySelectorAll("video[src]").forEach(function(t){t.src=""}),Vi.Zs.Ep&&this.oa.tI(),this.A4t.I3t())},n.N5t=function(){this.M5t||(f.addEventListener("blur",this.L5t),f.addEventListener("focus",this.O5t),this.M5t=!0)},n.B5t=function(){f.removeEventListener("blur",this.L5t),f.removeEventListener("focus",this.O5t),this.M5t=!1},n.F5t=function(){var t=this;requestAnimationFrame(function(){return t.oa.we()})},xt(i,[{key:"zx",get:function(){return this.Gx()},set:function(t){this.Xx(t)}},{key:"ct",get:function(){return this.Nd()}},{key:"$x",get:function(){return this.eO}},{key:"iP",get:function(){return this.iO}},{key:"kP",get:function(){return this.EP()}},{key:"VP",get:function(){return this.cq}},{key:"u4t",get:function(){return this.R5t}},{key:"ht",get:function(){return this.tO}},{key:"w4t",get:function(){return this.A4t.T5t===this}}]),i}(Yb);V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It(),Bt(),Ut();var b1=0,A1="theoplayer-wrapper",T1=function(){function t(i,n,r,e){this.V5t=void 0,this.oa=void 0,this.G5t=void 0,this.Z5t=void 0,this.Q5t=void 0,this.$5t=void 0,this.e6t=void 0,this.n6t=void 0,this.r6t=void 0,this.Y5t=void 0,this.o6t=void 0,this.Yst=void 0,this.Iz=void 0,this.W5t=void 0,this.c6t=void 0,this.JI=void 0,this.V5t=n,this.oa=r,this.G5t=e,this.$5t=NaN,this.e6t=!1,this.n6t=!1,this.Y5t=!1,this.o6t=[],this.Yst=!1,this.Iz=!1,this.W5t=[],this.JI=++b1,this.c6t=i.timeOffset,this.Z5t=t.E6t(this.c6t),this.t6t(),this.W5t.push(i)}var i=t.prototype;return i.X5t=function(t){var i=this.j5t===t.timeOffset;return!this.Q5t&&i},i.t6t=function(){if(E(this.$5t)){var t=this.j5t;if(void 0===t)return void(this.$5t=0);if("string"==typeof t&&gZ(t)){var i=this.oa.Nd();E(i)||i===1/0||(t=iJ(t)*i)}E(t)||(this.$5t=t)}},i.a6t=function(t){this.o6t.push(t)},i.u6t=function(){if(!this.Q5t){var t,i,n=this.V5t===JB.Mnt&&void 0===this.c6t&&1===this.W5t.length,r=this.W5t[0];if(!n&&1===this.W5t.length){var e=Vi.Dh(r.sources.src).searchParams.get("output");e&&e.toLowerCase().indexOf("vmap")>-1&&(n=!0,void 0!==this.c6t&&Qe("Do not set a timeOffset for VMAP ad sources. VMAP ads have their own offsets included."))}if(fZ(r.sources.type)||n)t=r.sources.src;else{if(E(this.oa.Nd())&&"end"===this.d6t())return;i=this.l6t()}var s=this.oa.Nd();(E(s)||s===1/0)&&(s=-3),this.Q5t={f6t:this.oa.xe.offsetWidth,v6t:this.oa.xe.offsetHeight,_6t:this.oa.xe.offsetWidth,g6t:this.oa.xe.offsetHeight,p6t:this.Yst,m6t:this.Iz,w6t:t,y6t:i,b6t:r.omidAccessModeRules,A6t:s}}return this.Q5t},i.l6t=function(){var t=this;return''+this.W5t.map(function(i,n){return t.S6t(i.sources,n)}).join("\n")+""},i.S6t=function(t,i){var n=this.d6t(),r=t.src;return'"},i.d6t=function(){if(0===this.j5t)return"start";if(this.j5t===1/0)return"end";var t=this.j5t;if("string"==typeof t&&gZ(t)){var i=iJ(t)*this.oa.Nd();return tZ.h$t(i)}return tZ.h$t(this.j5t||0)},i.T6t=function(t){this.W5t.push(t)},i.k6t=function(t){for(var i,n=A1+"-"+this.JI+"-",r=Ft(t);!(i=r()).done;){var e=i.value;if(zo(e,n)){var s=Number(e.slice(n.length));if(!E(s)&&s>=0&&st.dd&&this.P6t.dd!==t.dd},i.N6t=function(t){if(t.length)return t.sort(function(t,i){return t.dd-i.dd})[0]},i.B6t=function(){if(this.Unt.length)return this.N6t(this.M6t(this.t.Gx()))},i.L6t=function(){var t=this;if(!(void 0!==this.R6t&&this.R6t>=0))return this.Unt.filter(function(i){return!i.i6t&&0===i.dd&&i!==t.P6t})[0]},i.M6t=function(t){var i=this;if(!this.O6t&&(this.O6t=!this.Unt.some(function(t){return E(t.dd)}),!this.O6t))return[];var n=this.Unt.filter(function(i){return!i.i6t&&(i.q5t||!E(i.dd)&&t<=i.dd)});return void 0===this.R6t?n:n.filter(function(t){return t.q5t||void 0===t.j5t||t.dd>i.R6t})},xt(t,[{key:"P6t",get:function(){return this.I6t.P6t}},{key:"C6t",get:function(){return this.I6t.C6t}},{key:"Unt",get:function(){return this.I6t.Unt}},{key:"t",get:function(){return this.I6t.t}}]),t}(),E1=function(t){return t[t.F6t=0]="F6t",t[t.U6t=1]="U6t",t[t.V6t=2]="V6t",t}({}),I1=function(){function t(t,i,n,r,e){var s=this;this.Q6t=void 0,this.N4t=void 0,this.H6t=void 0,this.ko=void 0,this.oa=void 0,this.A4t=void 0,this.u8t=void 0,this.e8t=void 0,this.a8t=void 0,this.Zst=void 0,this.K6t=0,this.Ypt=void 0,this.X6t=void 0,this.c8t=!1,this.vX=function(){for(var t,i=Ft(s.N4t.filter(function(t){return t.J5t}));!(t=i()).done;){var n=t.value;n.t6t();var r=n.j5t;s.X6t.f8t(r,n.dd)}s.ko&&s.d8t&&s.W6t()},this.N4t=[],this.Q6t=t,this.ko=!1,this.H6t=!1,this.oa=i,this.A4t=n,this.P6t=void 0,this.e8t=0,this.a8t=new S1(this),this.Zst=r,this.X6t=e,this.oa.wn(ch.Cw,this.vX)}var i=t.prototype;return i.GP=function(){this.ko=!0,this.H6t&&this.W6t()},i.q6t=function(t,i){this.z6t(t,i);var n=Wn(this.Unt,function(i){return i.X5t(t)});if(n)n.T6t(t);else{var r,e=new T1(t,i,this.oa,null==(r=t.replaceContent)||r);this.N4t.push(e),2===this.G6t&&this.X6t.c5t(e.dd,e,e.j5t),this.j6t(i,e)}},i.Y6t=function(){if(Yn(this.Unt,this.P6t),this.P6t){for(var t,i=Ft(this.P6t.h6t);!(t=i()).done;){t.value;this.X6t.J6t()}this.P6t=void 0}},i.Z6t=function(){for(var t,i=Ft(this.N4t);!(t=i()).done;)for(var n,r=Ft(t.value.h6t);!(n=r()).done;){var e=n.value;this.X6t.$6t(e,!0)}tr(this.N4t)},i.t8t=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Y6t(),this.i8t=!0,this.P6t=t,this.e8t=t.dd,this.Ypt=this.s8t(t),[4,this.Ypt];case 1:return i.sent(),this.Ypt=void 0,[2]}})}).call(this)},i.s8t=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return[4,this.n8t(t)];case 1:if(r.sent(),!(i=t.u6t()))return this.i8t=!1,this.P6t=void 0,[2];n=this.Q6t.r8t(i),t.i6t=!0,r.label=2;case 2:return r.trys.push([2,4,,6]),[4,n];case 3:return r.sent(),t.U5t===JB.Bnt&&this.Q6t.h8t(),[3,6];case 4:return r.sent(),this.P6t=void 0,[4,this.W6t()];case 5:return r.sent(),[3,6];case 6:return[2]}})}).call(this)},i.n8t=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return t.oP=this.A4t.oP,this.A4t.vO?[4,this.Zst.XK(this.A4t.oP)]:(t.vO=!1,[2]);case 1:switch(i.sent()){case"all":case"muted":t.vO=!0;break;case"none":t.vO=!1}return[2]}})}).call(this)},i.o8t=function(){var t;return null!=(t=this.a8t.L6t())?t:this.a8t.B6t()},i.W6t=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.P6t&&!this.P6t.K5t?[2,this.Ypt]:(t=this.o8t())?[4,this.t8t(t)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})}).call(this)},i.hr=function(){this.Y6t(),tr(this.N4t),this.e8t=0,this.P6t=void 0,this.Ypt=void 0,this.i8t=!1},i.s6t=function(){this.i8t=!1,this.P6t&&(this.P6t.s6t=!0)},i.j6t=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return t===JB.Bnt&&this.ko&&this.a8t.D6t(i)?this.nXt||"linear"===this.Q6t.V4t||!(!this.P6t||this.P6t&&this.P6t.i6t)?[3,3]:[4,ot.resolve()]:[3,3];case 1:return n.sent(),[4,this.t8t(i)];case 2:n.sent(),n.label=3;case 3:return[2]}})}).call(this)},i.x6t=function(){this.P6t&&this.P6t.x6t()},i.l8t=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return this.d8t?(t=this.o8t())?[4,this.t8t(t)]:[3,2]:[2];case 1:i.sent(),i.label=2;case 2:return[2]}})}).call(this)},i.z6t=function(t,i){var n=t.sources.type,r=i===JB.Mnt&&void 0===t.timeOffset,e=fZ(n)||r?1:2;e!==this.K6t&&(this.K6t=e,this.Z6t(),this.Q6t.j0t&&!this.nXt&&"linear"!==this.Q6t.V4t&&(this.Q6t.j0t.zg(),this.P6t=void 0,this.Ypt=void 0),this.e8t=0,this.H6t=!0)},i.S4t=function(t){this.a8t.S4t(t)},i.kn=function(){this.oa.mn(ch.Cw,this.vX)},xt(t,[{key:"C6t",get:function(){return this.Q6t}},{key:"Unt",get:function(){return this.N4t}},{key:"t",get:function(){return this.oa}},{key:"nXt",get:function(){return Boolean(this.Ypt)}},{key:"G6t",get:function(){return this.K6t}},{key:"P6t",get:function(){return this.u8t},set:function(t){this.u8t=t}},{key:"i8t",get:function(){return this.c8t},set:function(t){this.c8t=t}},{key:"d8t",get:function(){var t=this;return!this.nXt&&!this.i8t&&(!(this.P6t&&!this.P6t.K5t)&&(!!this.N4t.filter(function(i){return t.P6t!==i}).length&&Boolean(this.o8t())))}}]),t}();V(),It(),Wt(),Dt(),Yt(),V(),It();var R1=function(t){return t.v8t="contentResumeRequested",t._8t="contentPauseRequested",t.g8t="click",t.Cw="durationChange",t.p8t="expandedChanged",t.m8t="start",t.w8t="impression",t.Yz="pause",t.y8t="resume",t.b8t="adProgress",t.A8t="adBuffering",t.S8t="firstQuartile",t.XJt="midpoint",t.T8t="thirdQuartile",t.jJt="complete",t.k8t="userClose",t.E8t="linearChanged",t.x8t="loaded",t.P8t="adCanPlay",t.I8t="adMetadata",t.C8t="adBreakReady",t.R8t="interaction",t.D8t="allAdsCompleted",t.N8t="skip",t.B8t="skippableStateChanged",t.M8t="log",t.L8t="viewableImpression",t.O8t="volumeChange",t.F8t="mute",t}({});V(),It();var C1=function(t){return t.U8t="adError",t}({});V(),It();var P1=function(t){return t[t.V8t=-1]="V8t",t[t.H8t=-1]="H8t",t[t.W8t=-1]="W8t",t[t.q8t=101]="q8t",t[t.z8t=102]="z8t",t[t.G8t=200]="G8t",t[t.X8t=201]="X8t",t[t.j8t=202]="j8t",t[t.Q8t=300]="Q8t",t[t.K8t=301]="K8t",t[t.Y8t=302]="Y8t",t[t.J8t=303]="J8t",t[t.Z8t=400]="Z8t",t[t.$8t=402]="$8t",t[t.t9t=403]="t9t",t[t.i9t=405]="i9t",t[t.e9t=500]="e9t",t[t.s9t=501]="s9t",t[t.n9t=-1]="n9t",t[t.r9t=503]="r9t",t[t.h9t=602]="h9t",t[t.o9t=900]="o9t",t[t.a9t=901]="a9t",t[t.u9t=1005]="u9t",t[t.c9t=1007]="c9t",t[t.d9t=1009]="d9t",t[t.l9t=1010]="l9t",t[t.f9t=1011]="f9t",t[t.v9t=1012]="v9t",t[t._9t=1013]="_9t",t[t.g9t=1020]="g9t",t[t.p9t=1021]="p9t",t[t.m9t=1101]="m9t",t[t.w9t=1204]="w9t",t[t.y9t=1205]="y9t",t[t.b9t=1300]="b9t",t[t.A9t=-1]="A9t",t[t.S9t=-1]="S9t",t[t.T9t=-1]="T9t",t[t.k9t=-1]="k9t",t}({}),D1=function(t){return t.E9t="adLoadError",t.x9t="adPlayError",t}({});function N1(t,i){if(t===R1.b8t){var n=i;return{P9t:n.adBreakDuration,I9t:n.adPosition,zx:n.currentTime,ct:n.duration,C9t:n.totalAds}}return i}function x1(t){switch(t){case google.ima.AdError.Type.AD_LOAD:return D1.E9t;case google.ima.AdError.Type.AD_PLAY:return D1.x9t}}function B1(t){return Wi(t)&&$i(t.getVastErrorCode)}function O1(t){var i=t.getInnerError(),n=i&&B1(i)?O1(i):void 0;return{Iy:t.getMessage(),TZt:t.getErrorCode(),R9t:t.getVastErrorCode(),Km:x1(t.getType()),D9t:n}}function M1(t){if(Fi(t))return t}V(),It(),V(),It();var L1=function(t){function i(i,n,r){var e,s;return e=t.call(this)||this,(s=e).Q6t=void 0,s.oa=void 0,s.K9t=void 0,s.R7t=void 0,s.x7t=void 0,s.P7t=void 0,s.Q0t=void 0,s.r7t=void 0,s.u7t=void 0,s.c7t=void 0,s.M9t=void 0,s.F9t=void 0,s.U9t=void 0,s.V9t=void 0,s.H9t=void 0,s.W9t=void 0,s.q9t=void 0,s.z9t=void 0,s.L9t=void 0,s.O9t=void 0,s.Q6t=i,s.oa=n,s.K9t=r,s.R7t=!1,s.x7t=void 0,s.P7t=void 0,s.r7t=0,s.u7t=function(t){if(t.jnt&&t.jnt.v7t){var i=t.jnt.v7t;s.K9t.d5t(i.qOt,i.C9t,i.G0t)}},s.c7t=function(t){var i,n,r;if(!(s.r7t>=5)){s.r7t++;var e=t.J9t;if(function(t){return Wi(t)&&void 0!==t.P9t&&void 0!==t.C9t}(e)){var u=null==(r=s.Q0t)||null==(n=r.d7t())||null==(i=n.v7t)?void 0:i.qOt;void 0!==u&&s.K9t.d5t(u,e.C9t,e.P9t)}}},s.M9t=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return t.J9t.D7t?[4,s.i7t(t.J9t.D7t)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})()},s.F9t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return s.R7t=!0,s.Q6t.x6t(),[4,s.O9t()];case 1:return t.sent(),[2]}})})()},s.U9t=function(t){if(t.jnt){0;var i=t.jnt;s.Q6t.w7t(i),s.Q6t.be(),s.Q6t.N7t(),s.Q6t.B7t=!0,s.K9t.M7t(i);var n=i.ct;if(s.Y9t(n),i.h7t){var r=s.Q6t.zx,e=s.Q6t.AP;s.Q6t.a5(jy.XL),s.N9t(new Wy(r,e)),s.N9t(new qy(r,e)),s.N9t(new Xy(r,e)),s.Q6t.lP||s.N9t(new Gy(s.Q6t.zx)),s.setCountdownTimer(),s.X9t(!0)}else s.Q6t.I3t(),s.oa.be(),s.Q6t.lP||s.oa.QP()}},s.V9t=function(t){var i;if(t.jnt){0;var n=t.jnt;if(s.vm(),s.K9t.m7t(s.Q6t.ct,n.h7t),s.Q6t.AP!==jy.zL){var r=jy.zL;s.Q6t.a5(r);var e=s.Q6t.zx;s.N9t(new _T(e,r))}s.Y9t(NaN),s.Q6t.B7t=!1,null==(i=s.Q0t)||i.UP(s.Q6t.o7t())}},s.H9t=function(t){t.jnt&&(s.V9t(t),s.K9t.H9t(t.jnt,s.Q6t.zx,s.Q6t.ct))},s.W9t=function(t){t.jnt&&(s.K9t.m7t(-1,t.jnt.h7t),s.Q6t.x6t(),!t.jnt.h7t&&s.Q6t.d8t()&&s.Q6t.l8t())},s.q9t=function(t){t.jnt&&(t.jnt.h7t?s.Q6t.jP():s.oa.jP())},s.z9t=function(){var t;(s.Q6t.B7t=!0,s.Q6t.L7t)&&(null==(t=s.Q0t)||t.jP(),s.Q6t.L7t=!1)},s.L9t=function(t){var i;if(t.jnt){0,s.Q6t.E7t&&(s.P7t=s.oa.Gx(),s.oa.$P(),s.oa.WP=!0),s.Q6t.O7t=!0;var n=t.jnt;s.K9t.Ed(n);var r=n.ct;s.Q6t.w7t(n),s.Y9t(r),s.Q6t.G9t(!1),s.Q6t.be(),s.Q6t.D5t(),s.Q6t.E7t||s.oa.we(),s.oa.jP(),s.Q6t.F7t(n),0===(null==(i=n.v7t)?void 0:i.qOt)||s.Q6t.So(new zy(s.Q6t.zx))}},s.O9t=function(t){return jt(function(){var i,n,r,e,u;return zt(this,function(o){switch(o.label){case 0:return i=null==t?void 0:t.jnt,s.Q6t.O7t=!1,"linear"===s.Q6t.V4t&&s.K9t.Bd(),i&&i.ct>=0&&s.Y9t(i.ct),s.oa.Nd()===1/0&&s.Q6t.U7t(),s.Q6t.B7t=!1,s.R7t?[4,s.p7t()]:[3,2];case 1:o.sent(),o.label=2;case 2:s.Q6t.G9t(!0),o.label=3;case 3:return o.trys.push([3,5,,6]),[4,s.k7t()];case 4:return o.sent(),[3,6];case 5:return mr(n=o.sent())||s.So(new J$(n)),[2];case 6:return s.Q6t.I3t(),s.Q6t.we(),s.oa.Qx||s.oa.QP(),i&&s.Q6t.w7t(i),s.Q6t.A7t&&(s.Q6t.E7t&&(e=s.oa.zP(),u=null==(r=s.oa.bt)?void 0:r.src,e&&u&&(e.src=u)),s.Q6t.S7t=!0),s.oa.WP=!1,s.Q6t.d8t()?[4,s.Q6t.l8t()]:[3,8];case 7:o.sent(),o.label=8;case 8:return[2]}})})()},e}Pt(i,t);var n=i.prototype;return n.N9t=function(t){this.Q6t.So(t)},n.B9t=function(t){var i=this;this.Q0t=t,this.Q0t.wn(C1.U8t,this.M9t),this.Q0t.wn(R1._8t,this.L9t),this.Q0t.wn(R1.v8t,this.O9t),this.Q0t.wn(R1.D8t,this.F9t),this.Q0t.wn(R1.m8t,this.U9t),this.Q0t.wn(R1.jJt,this.V9t),this.Q0t.wn(R1.N8t,this.H9t),this.Q0t.wn(R1.k8t,this.W9t),this.Q0t.wn(R1.g8t,this.q9t),this.Q0t.wn(R1.P8t,this.z9t),this.Q0t.wn(R1.Yz,function(){i.Q6t.lP||(i.Q6t.G9t(!0),i.Q6t.So(new kT(i.Q6t.zx))),i.X9t(!0)}),this.Q0t.wn(R1.y8t,function(){i.Q6t.lP&&(i.Q6t.G9t(!1),i.Q6t.So(new bT(i.Q6t.zx)))}),this.Q0t.wn(R1.F8t,function(){var n=t.FP();n>=0&&i.j9t(n)}),this.Q0t.wn(R1.O8t,function(){var n=t.FP();n>=0&&i.j9t(n)}),this.Q0t.wn(R1.I8t,function(t){i.K9t.Q9t(t.type)}),this.Q0t.wn(R1.Cw,function(t){t.jnt&&i.Y9t(t.jnt.ct)}),this.Q0t.wn(R1.M8t,function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=t.J9t.adError,(n=B1(i)?O1(i):void 0)?this.Z9t(n)?[4,this.$9t(t)]:[3,2]:[2];case 1:return r.sent(),[3,5];case 2:return this.t7t(n)?[4,this.i7t(n)]:[3,4];case 3:return r.sent(),[3,5];case 4:this.e7t(n)&&this.s7t(n),r.label=5;case 5:return[2]}})}).call(i)}),this.Q0t.wn(R1.x8t,function(t){if(t.jnt&&(i.Q6t.s6t(),i.K9t.n7t(t.jnt),i.r7t=0,t.jnt.h7t)){var n,r=i.Q6t.AP,e=jy.zL;i.Q6t.a5(e);var s=i.Q6t.zx,u=i.Q6t.AP;u!==r&&i.N9t(new _T(s,u)),null==(n=i.Q0t)||n.UP(i.Q6t.o7t()),i.N9t(new Hy(s,e))}}),this.Q0t.wn([R1.A8t,R1.w8t,R1.S8t,R1.XJt,R1.T8t],function(t){t.jnt&&i.K9t.a7t(t.jnt,t.type,i.Q6t.zx)}),this.Q0t.wn(R1.S8t,this.u7t),this.Q0t.wn(R1.b8t,this.c7t)},n.switchToPlayerIfNoNextAd=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return this.Q0t?(t=this.Q0t.d7t())&&this.l7t(t)?[3,3]:this.Q6t.d8t()?[4,this.Q6t.l8t()]:[3,2]:[3,4];case 1:return n.sent(),[3,3];case 2:this.Q6t.f7t(),this.oa.lP&&!this.oa.Qx&&this.oa.QP(),n.label=3;case 3:return[3,7];case 4:return this.Q6t.d8t()?[4,this.Q6t.l8t()]:[3,6];case 5:return n.sent(),[3,7];case 6:i=this.Q6t.lP,this.Q6t.f7t(),i||this.oa.QP(),n.label=7;case 7:return[2]}})}).call(this)},n.l7t=function(t){var i=t.v7t,n=null==i?void 0:i.C9t;return(null==i?void 0:i.I9t)!==n},n.vm=function(){this.Q6t.Dc&&(p(this.Q6t.Dc),this.Q6t.Dc=null)},n.e7t=function(t){return t.Km===D1.E9t},n.t7t=function(t){return t.Km===D1.x9t},n.Z9t=function(t){return t.TZt===P1.d9t},n.i7t=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.s7t(t),this._7t(t)?(this.Q6t.g7t.i8t=!1,null==(i=this.Q6t.g7t.P6t)||i.x6t(),[4,this.switchToPlayerIfNoNextAd()]):[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}).call(this)},n._7t=function(t){var i;if(F1(t))return!0;if(this.Q6t.nrt)return!1;var n=[P1.Z8t,P1.a9t,P1.p9t,P1.y9t];return!(Jn(n,t.TZt)||Jn(n,null==(i=t.D9t)?void 0:i.TZt))},n.s7t=function(t){this.Q6t.v5t(t)},n.p7t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.K9t.J6t(),this.Q6t.x6t(),"nonlinear"===this.Q6t.V4t&&(this.K9t.m7t(-1,!1),this.Q6t.w7t(void 0)),"nonlinear"!==this.Q6t.V4t&&"none"!==this.Q6t.V4t?[3,2]:this.Q6t.d8t()?[4,this.Q6t.l8t()]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.Q6t.y7t(),this.Q6t.w4t?this.Q6t.I3t():this.b7t()&&this.oa.So(new ST(this.oa.Gx())),[2]}})}).call(this)},n.b7t=function(){return this.Q6t.A7t&&!this.Q6t.S7t&&this.oa.Qx},n.setCountdownTimer=function(){var t=this;this.vm(),this.Q6t.Dc=m(function(){return t.X9t()},250)},n.$9t=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return void 0===t.jnt?[2]:(this.Q6t.g7t.i8t=!1,this.Q6t.x6t(),this.Q6t.d8t()?[4,this.Q6t.l8t()]:[3,2]);case 1:return i.sent(),[3,3];case 2:this.Q6t.G9t(!0),i.label=3;case 3:return[2]}})}).call(this)},n.Y9t=function(t){this.Q6t.ct!==t&&t>=0&&(this.Q6t.F4(t),this.N9t(new AT(this.Q6t.ct)))},n.j9t=function(t){this.Q6t.o7t()!==t&&(0===t?this.Q6t.T7t(t,!0,!1):this.Q6t.T7t(t,!1,!1))},n.k7t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Q6t.E7t&&void 0!==this.oa.Yx()?(this.x7t=new dr,[4,br(this.oa.Ta(this.oa.nu(),this.x7t.Yg),this.x7t)]):[3,2];case 1:t.sent(),this.P7t&&this.oa.Xx(this.P7t),this.P7t=void 0,t.label=2;case 2:return[2]}})}).call(this)},n.X9t=function(t){if(this.Q0t){var i=this.Q0t.I7t();i>this.Q6t.ct&&this.Y9t(A.round(i))}var n=this.Q6t.zx;(t||!this.Q6t.lP&&n!==this.Q6t.C7t)&&(this.Q6t.So(new Rg(n,void 0)),this.Q6t.C7t=n)},n.hr=function(){this.x7t&&(this.x7t.Zg(),this.x7t=void 0),this.R7t=!1,this.r7t=0},n.kn=function(){this.hr(),this.Vo()},i}(uh);function F1(t){var i,n;return t.R9t===P1.J8t||(null==(i=t.D9t)?void 0:i.R9t)===P1.J8t||t.TZt===P1.d9t||(null==(n=t.D9t)?void 0:n.TZt)===P1.d9t}V(),It(),Bt(),Dt(),Ut(),V(),It(),Bt(),Dt();var U1=function(t){function i(i,n,r){var e;return(e=t.call(this,i)||this).V7t=void 0,e.H7t=void 0,e.V7t=n,e.H7t=r,e}return Pt(i,t),xt(i,[{key:"u$t",get:function(){return n0.v1t}}]),i}(Y0);V(),It(),Bt(),Dt(),V(),It(),V(),It(),Bt(),Dt();var V1=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).q7t=0,r.z7t=void 0,r}Pt(i,t);var n=i.prototype;return n.a1t=function(){var t;return null==(t=this.z7t)?void 0:t.QKt},n.xa=function(){return function(t,i){return Wg(t,{bitrate:0,contentType:void 0,mediaUrl:void 0,traffickingParameters:void 0,traffickingParametersString:void 0,universalAdIds:[],get description(){return i._N},get apiFramework(){return i.G7t},get creativeId(){return i.wYt},get title(){return i.gq},get wrapperAdIds(){return i.X7t},get wrapperAdSystems(){return i.j7t},get wrapperCreativeIds(){return i.Q7t}})}(t1(this),this)},n.K7t=function(t){this.z7t=t;var i=j1(t);this.O4t(t.fJt,t.Y7t,t.J7t,t.ct,i,-1)},xt(i,[{key:"W7t",get:function(){return this.q7t},set:function(t){this.q7t=t}},{key:"u$t",get:function(){return n0.so}},{key:"G7t",get:function(){var t;return null==(t=this.z7t)?void 0:t.FYt}},{key:"wYt",get:function(){var t;return null==(t=this.z7t)?void 0:t.wYt}},{key:"_N",get:function(){var t;return null==(t=this.z7t)?void 0:t._N}},{key:"gq",get:function(){var t;return null==(t=this.z7t)?void 0:t.gq}},{key:"X7t",get:function(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.X7t)?i:[]}},{key:"j7t",get:function(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.j7t)?i:[]}},{key:"Q7t",get:function(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.Q7t)?i:[]}}]),i}(Z0);function j1(t){return t.sYt.map(function(t){return new i1(t)})}var H1=function(t){function i(i){var n;return(n=t.call(this,i,K0.yk)||this).z7t=void 0,n.IJt=void 0,n}Pt(i,t);var n=i.prototype;return n.xa=function(){return function(t,i){return Wg(t,{get adSystem(){return i.a1t()},get apiFramework(){return i.G7t},get bitrate(){return i.z9},get contentType(){return i.GT},get creativeId(){return i.wYt},get description(){return i._N},get mediaUrl(){return i.PJt},get title(){return i.gq},get traffickingParameters(){return i.Z7t},get traffickingParametersString(){return i.$7t},get wrapperAdIds(){return i.X7t},get wrapperAdSystems(){return i.j7t},get wrapperCreativeIds(){return i.Q7t},get universalAdIds(){return i.rYt}})}(t1(this),this)},n.K7t=function(t){this.z7t=t,this.O4t(t.fJt,t.Y7t,t.J7t,t.ct,j1(t),t.tti),this.H4t=t.h7t?K0.BZt:K0.L4t},n.a1t=function(){return this.z7t?W1(this.z7t.QKt):void 0},xt(i,[{key:"u$t",get:function(){return n0.v1t}},{key:"G7t",get:function(){return this.z7t?W1(this.z7t.FYt):void 0}},{key:"z9",get:function(){return this.z7t?this.z7t.iti:0}},{key:"GT",get:function(){return this.z7t?W1(this.z7t.GT):void 0}},{key:"wYt",get:function(){return this.z7t?W1(this.z7t.wYt):void 0}},{key:"eti",get:function(){return this.z7t?W1(this.z7t.eti):void 0}},{key:"_N",get:function(){var t;return null==(t=this.z7t)?void 0:t._N}},{key:"PJt",get:function(){var t,i=null==(t=this.z7t)?void 0:t.PJt;return Fi(i)?i:this.IJt},set:function(t){this.IJt=t}},{key:"gq",get:function(){var t;return null==(t=this.z7t)?void 0:t.gq}},{key:"Z7t",get:function(){return this.z7t?W1(this.z7t.Z7t):void 0}},{key:"$7t",get:function(){return this.z7t?W1(this.z7t.$7t):void 0}},{key:"X7t",get:function(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.X7t)?i:[]}},{key:"j7t",get:function(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.j7t)?i:[]}},{key:"Q7t",get:function(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.Q7t)?i:[]}},{key:"rYt",get:function(){var t,i;return null!=(i=null==(t=this.z7t)?void 0:t.rYt.map(function(t){return{adIdRegistry:t.sti,adIdValue:t.nti}}))?i:[]}}]),i}(Z0);function W1(t){return null===t?void 0:t}V(),It(),Bt(),V(),It(),Bt();var z1=function(){function t(t,i){this.K9t=void 0,this.rti=void 0,this.K9t=t,this.rti=i}var i=t.prototype;return i.qnt=function(t){this.K9t.qnt(t)},i.uD=function(){this.K9t.uD()},i.Hnt=function(t){this.K9t.Hnt(t)},i.kn=function(){return ot.resolve()},xt(t,[{key:"u4t",get:function(){return this.K9t.u4t}},{key:"r4t",get:function(){return this.rti}},{key:"w4t",get:function(){return this.K9t.w4t}},{key:"Fnt",get:function(){var t;return null!=(t=this.K9t.Fnt)?t:null}},{key:"Lnt",get:function(){var t=this.K9t.hti;return t?[t]:[]}},{key:"Unt",get:function(){return this.K9t.Unt}},{key:"Vnt",get:function(){return this.K9t.Vnt}}]),t}(),q1=function(){function t(t,i){this.R5t=void 0,this.y1t=void 0,this.u1t=void 0,this.w1t=void 0,this.uti=void 0,this.ati=void 0,this.R5t=t,this.y1t=[],this.uti=!1,this.ati=new z1(this,i)}return xt(t,[{key:"oti",get:function(){return this.ati}},{key:"u4t",get:function(){return this.R5t}},{key:"w4t",get:function(){return this.uti}},{key:"hti",get:function(){return this.u1t}},{key:"Fnt",get:function(){return this.w1t}},{key:"Unt",get:function(){var t=this;return nr(this.y1t,function(i){if(i.pP)return[];var n=i.Jc;if(i===t.w1t&&void 0!==t.u1t){var r=n.indexOf(t.u1t);if(r>=0)return n.slice(r+1)}return n})}},{key:"Vnt",get:function(){return this.y1t.filter(function(t){return!t.pP})}}]),t}();V(),It(),Dt();var X1=function(t){function i(i){return t.call(this,"cti",i)||this}return Pt(i,t),i.prototype.xa=function(){return new G1(this.jnt.Ont())},i}(oO),G1=function(t){function i(i){return t.call(this,"adimpression",i)||this}return Pt(i,t),i}(hO);V(),It(),Dt();var Q1=function(t){function i(i){var n;return(n=t.call(this,"dti")||this).jnt=void 0,n.jnt=i,n}return Pt(i,t),i.prototype.xa=function(){return new Y1(this.jnt.Ont())},i}(Cg),Y1=function(t){function i(i){var n;return(n=t.call(this,"adbuffering")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var $1=function(t){function i(){return t.call(this,"lti")||this}return Pt(i,t),i.prototype.xa=function(){return new K1},i}(Cg),K1=function(t){function i(){return t.call(this,"admetadata")||this}return Pt(i,t),i}(ah),J1=function(t){function i(i,n){var r;return(r=t.call(this,i,n0.v1t)||this)._ti=void 0,r.mti=void 0,r.pti=void 0,r._ti=n,r.mti=[],r.pti=[],r}Pt(i,t);var n=i.prototype;return n.fti=function(t,i){for(var n=0;ne){var s=i-e;this.fti(s,r),r.G0t=n,this.u4t.So(new o1(r))}}},n.H9t=function(t,n,r){if(this.w1t){var e=i.yti(this.w1t,t);if(e){var s=n/r;this.u4t.So(new s1(e,s))}}},n.a7t=function(t,n,r){if(this.w1t){var e=this.u1t;if(!e){var s=i.yti(this.w1t,t);if(!s||Jn(this.pti,s))return void this.mti.push(n);e=s,this.h5t(this.w1t,t),this.gti(e)}this.Q9t(n,e,r)}},n.Q9t=function(t,i,n){t===R1.I8t?this.u4t.So(new $1):t===R1.w8t&&i?this.u4t.So(new X1(i)):t===R1.A8t&&i?this.u4t.So(new Q1(i)):t===R1.S8t&&i&&n?this.u4t.So(new f1(i,n)):t===R1.XJt&&i&&n?this.u4t.So(new d1(i,n)):t===R1.T8t&&i&&n&&this.u4t.So(new g1(i,n))},n.uD=function(){this._ti.uD()},n.qnt=function(t){this._ti.qnt(t)},n.hr=function(){var t=Boolean(this.u1t&&this.u1t.V4t===K0.BZt);this.gti(void 0),this.vti(void 0,t);for(var i,n=Ft(this.y1t);!(i=n()).done;){var r=i.value;this.$6t(r)}tr(this.y1t),tr(this.mti),tr(this.pti)},n.kn=function(){this.hr()},n.Hnt=function(t){},i.yti=function(t,i){if(i.v7t)return t.Jc[i.v7t.I9t-1]},xt(i,[{key:"w4t",get:function(){return this._ti.w4t}}]),i}(q1);function Z1(t){var i=f.google.ima.settings;t.ads&&t.ads.vpaidMode&&f.google.ima.settings.setVpaidMode(function(t){var i=f.google.ima.ImaSdkSettings.VpaidMode;switch(t){case KA.ENABLED:return i.ENABLED;case KA.INSECURE:return i.INSECURE;case KA.DISABLED:default:return i.DISABLED}}(t.ads.vpaidMode)),i.setPlayerVersion("10.3.0"),i.setPlayerType("THEOplayer"),i.setAutoPlayAdBreaks(!0),i.setDisableCustomPlaybackForIOS10Plus(!t2(t));var n=function(t){var i,n,r,e=null==(n=t.ads)||null==(i=n.googleIma)?void 0:i.language;if(void 0!==e)return e;var s=null==(r=t.ui)?void 0:r.language;if(qi(s))return s;return}(t);n&&i.setLocale(n)}function t2(t){return Oi.ru&&t.allowNativeFullscreen}V(),It(),V(),It(),Wt(),Bt(),Yt();var i2=function(){function t(t,i,n){this.bti=void 0,this.Ati=void 0,this.Sti=void 0,this.Q0t=void 0,this.bti=t,this.Ati=n,this.Sti=i}var i=t.prototype;return i.r8t=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.y7t(),this.bti.GY(),n=this,[4,this.Ati.r8t(t,this.Sti,i)];case 1:return n.Q0t=r.sent(),[2]}})}).call(this)},i.Tti=function(){var t;null==(t=this.Q0t)||t.Tn()},i.kti=function(){var t;null==(t=this.Q0t)||t.kti()},i.jP=function(){var t;null==(t=this.Q0t)||t.jP()},i.uD=function(){var t;null==(t=this.Q0t)||t.uD()},i.UP=function(t){var i;null==(i=this.Q0t)||i.UP(t)},i.Eti=function(t){var i;null==(i=this.Q0t)||i.Eti(t)},i.xti=function(){return Boolean(this.Q0t&&this.Q0t.d7t())},i.d7t=function(){var t;return null==(t=this.Q0t)?void 0:t.d7t()},i.I7t=function(){var t;return null==(t=this.Q0t)?void 0:t.I7t()},i.y7t=function(){this.Q0t&&(this.Ati.Pti(),this.Q0t.KP(),this.Q0t.zg(),this.Q0t=void 0)},i.kn=function(){this.y7t()},xt(t,[{key:"j0t",get:function(){return this.Q0t},set:function(t){this.Q0t=t}}]),t}(),n2=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,i,n)||this).ko=!1,h.Sti=void 0,h.Cz=void 0,h.o5=void 0,h.Ati=void 0,h.bti=void 0,h.Dc=void 0,h.Zb=void 0,h.Lti=void 0,h.Fti=void 0,h.y4t=!1,h.Uti=void 0,h.Vti=void 0,h.I6t=void 0,h.Kti=void 0,h.eii=-1,h.H4t="none",h.GJ=void 0,h.qti=void 0,h.Hti=!1,h.X6t=void 0,h.Bti=!1,h.zti=new dr,h.R6t=void 0,h.Mti=!1,h.Oti=!1,h.Nti=void 0,h.rii=function(t){h.u4t.So(t)},h.sii=function(t){h.Uti=new ww(gw.ADVERTISEMENT_ERROR,"Error while recovering from failed IMA ad.",t.error.message),h.Vti=_w(h.Uti)},h.C7t=NaN,h.Wti=function(){h.ko||h.GP()},h.GJ=r,h.Cz=!0,h.Zb=NaN,h.o5=jy.zL,h.Lti=!1,h.Fti=!1,h.X6t=new J1(h.u4t,h),h.Kti=new L1(h,h.oa,h.X6t),h.Kti.wn(ty.ma,h.sii),h.oa.wn(ch.uo,h.Wti),h.I6t=new I1(h,h.oa,h.A4t,e,h.X6t),h.Sti=o,h.Ati=u,h.bti=s,h.Nti=new i2(s,o,u),h.we(),h.Ati.wn("nii",h.rii),h}Pt(i,t);var n=i.prototype;return n.Cti=function(t,i,n){i===JB.Mnt&&void 0!==n&&(this.y4t=n),this.I6t.q6t(t,i)},n.qnt=function(t){for(var i,n=Ft(this.Dti());!(i=n()).done;){var r=i.value;nJ(r.sources,r.timeOffset)||t.W6(r,JB.Bnt,!1)}},n.Dti=function(){for(var t,i=[],n=this.o4t,r=n.Lnt,e=n.Unt,s=[],u=Ft(r.concat(e));!(t=u()).done;){var o=t.value,h=o.od.H7t;if(!Jn(s,h.JI)){var a,c,f=h.k6t(o.X7t);if(f>=0)(a=i).push.apply(a,[].concat(h.H5t.slice(f)));else(c=i).push.apply(c,[].concat(h.H5t));s.push(h.JI)}}for(var v,d=Ft(this.I6t.Unt);!(v=d()).done;){var l,g=v.value;if(!g.i6t)(l=i).push.apply(l,[].concat(g.H5t))}return or(i)},n.Gx=function(){var t=this.Nti.I7t();return t?E(this.ct)||t<0?0:this.ct-t:0},n.Xx=function(t,i){},n.Nd=function(){return this.Zb||NaN},n.F4=function(t){this.Zb=t},n.aP=function(){return this.oa.oP},n.uP=function(t){this.T7t(this.OP,t,!0)},n.fP=function(){return this.Cz},n.G9t=function(t){this.Cz=t},n.NP=function(){var t,i;return null!=(i=null==(t=this.Nti.d7t())?void 0:t.J7t)?i:0},n.LP=function(){var t,i;return null!=(i=null==(t=this.Nti.d7t())?void 0:t.Y7t)?i:0},n.Ox=function(){return[]},n.S4t=function(t){this.R6t=t,this.I6t.S4t(t)},n.h8t=function(){!this.Bti&&this.j0t&&(this.Nti.Tti(),this.Bti=!0)},n.w7t=function(t){this.V4t=t?t.h7t?"linear":"nonlinear":"none"},n.EP=function(){return LA.rL()._s()},n.FP=function(){return this.oa.OP},n.UP=function(t){this.T7t(t,this.oP,!0)},n.o7t=function(){return this.oa.oP?0:this.oa.OP},n.T7t=function(t,i,n){var r=this.oa.OP!==t||this.oa.oP!==i;r&&(this.oa.OP=t,this.oa.oP=i),n&&this.Nti.UP(this.o7t()),r&&this.So(new RT(this.zx,this.OP))},n.Kx=function(){return!1},n.Yx=function(){if(this.Uti&&this.y4t)return this.Uti},n.Zx=function(){if(this.Vti&&this.y4t)return this.Vti},n.TP=function(){return this.o5},n.a5=function(t){this.o5=t,this.So(new Vy(this.zx,t))},n.GP=function(){this.oa.mn(ch.uo,this.Wti),this.ko||(this.ko=!0,this.I6t.GP(),this.N7t())},n.QP=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:if(this.qti)return[2];this.zti.Zg(),this.zti=new dr,t=this.lP,this.G9t(!1),this.So(new bT(this.zx)),this.Nti.xti()||(this.E7t||this.oa.we(),this.So(new zy(this.zx))),this.B7t||(this.L7t=!1),i=Boolean(this.j0t),this.qti=this.I6t.W6t(),n.label=1;case 1:return n.trys.push([1,,3,4]),[4,this.qti];case 2:return n.sent(),[3,4];case 3:return this.qti=void 0,[7];case 4:try{pr(this.zti.Yg)}catch(t){return[2]}if(this.ko||this.Wti(),this.Uti&&this.y4t)return[2];if(this.j0t){if(t)if(i)try{pr(this.zti.Yg),this.Nti.kti(),this.So(new Gy(this.zx))}catch(t){return[2]}else this.h8t()}else this.y4t||(this.I3t(),this.A4t.QP());return[2]}})}).call(this)},n.jP=function(){this.lP||(this.G9t(!0),this.So(new kT(this.zx))),this.zti.Zg(),this.B7t?this.Nti.jP():this.L7t=!0},n.uD=function(){this.Nti.uD()},n.y7t=function(){this.j0t&&(this.Nti.y7t(),this.V4t="none",this.Bti=!1)},n.KP=function(){return jt(function(){var t;return zt(this,function(i){return this.C7t=0,this.I6t.hr(),this.zti.Zg(),this.G9t(!0),this.Lti=!1,this.Fti=!1,this.B7t=!1,this.X6t.hr(),this.y7t(),this.f7t(),null==(t=this.Sti)||t.hr(),this.L7t=!1,this.Ati.zg(),[2]})}).call(this)},n.be=function(){this.bti.be(),this.E7t&&this.oa.be()},n.we=function(){this.bti.we()},n.Gti=function(){return Boolean(this.j0t)&&Jn(this.j0t.Xti(),-1)&&!this.Lti},n.s6t=function(){this.I6t.s6t()},n.d8t=function(){return this.I6t.d8t},n.x6t=function(){this.I6t.x6t()},n.l8t=function(){return this.I6t.l8t()},n.l4t=function(t){if(this.Gti()){if(t.type===ch.jw&&this.oa.Qx)return!0;if(t.type===ch.Nw)return this.Lti=!0,this.Ati.Pti(),!0}return!1},n.r8t=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),this.y7t(),i=this.jti(),[4,this.Nti.r8t(t,i)];case 1:return r.sent(),this.Bti=!1,this.Qti(this.j0t),[3,3];case 2:return n=r.sent(),this.Kti.i7t(n),[3,3];case 3:return[2]}})}).call(this)},n.Qti=function(t){if(t.UP(this.o7t()),this.I6t.G6t===E1.U6t){var i=t.Xti();if(i.length)for(var n,r=Ft(i);!(n=r()).done;){var e=n.value;this.X6t.c5t(e,this.I6t.P6t)}else this.X6t.c5t(this.I6t.P6t.dd,this.I6t.P6t)}this.Kti.hr(),this.Kti.B9t(t)},n.zP=function(){if(this.j0t&&this.E7t&&this.Nti.xti())return this.oa.zP()},n.qP=function(){return this.E7t&&this.w4t?this.oa.Ma:t.prototype.qP.call(this)},n.jti=function(){var t,i,n=!!(this.I6t.G6t===E1.U6t)&&this.Rti;return void 0!==this.GJ.ads.googleIma.uiElements?t=this.GJ.ads.googleIma.uiElements:this.GJ.ads.showCountdown||(t=[]),void 0!==this.GJ.ads.allowedMimeTypes&&(i=this.GJ.ads.allowedMimeTypes),{Yti:i,Jti:t,Zti:n,z9:this.GJ.ads.googleIma.bitrate,$ti:void 0,tii:this.R6t}},n.N7t=function(){if(this.j0t){var t=this.jti();this.Nti.Eti(t)}},n.v5t=function(t){F1(t)||(this.Uti=new ww(gw.ADVERTISEMENT_ERROR,t.Iy),this.Vti=new _d(pd.AD_ERROR,"There was a problem playing ads.",this.Uti)),this.u4t.So(X0.f4t(t))},n.f7t=function(){this.w4t&&(this.oa.be(),this.I3t(),this.we())},n.U7t=function(){var t;this.oa.Gx()!==1/0&&0!==this.oa.EP().length&&((null==(t=this.I6t.P6t)?void 0:t.z5t)&&-1!==this.eii&&(this.oa.Xx(this.oa.Gx()+this.eii),this.eii=-1))},n.F7t=function(t){var i,n;this.eii=null!=(n=null==(i=t.v7t)?void 0:i.G0t)?n:-1},n.I3t=function(){t.prototype.I3t.call(this),this.oa.be(),this.E7t&&!this.oa.Qx&&this.oa.QP()},n.F5t=function(){this.E7t||t.prototype.F5t.call(this)},n.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.Kti.mn(ty.ma,this.sii),[4,t.prototype.kn.call(i)];case 1:return n.sent(),this.y7t(),this.Nti.kn(),this.Ati.mn("nii",this.rii),this.Ati.zg(),this.bti.zg(),this.I6t.kn(),this.Kti.kn(),[2]}})}).call(this)},xt(i,[{key:"o4t",get:function(){return this.X6t.oti}},{key:"Iti",get:function(){return this.X6t}},{key:"g7t",get:function(){return this.I6t}},{key:"E7t",get:function(){return t2(this.GJ)}},{key:"r4t",get:function(){return i.r4t}},{key:"Rti",get:function(){return this.GJ.ads.preload===ZA.MIDROLL_AND_POSTROLL}},{key:"V4t",get:function(){return this.H4t},set:function(t){this.H4t=t}},{key:"j0t",get:function(){return this.Nti.j0t},set:function(t){this.Nti.j0t=t,this.Bti=!1}},{key:"B7t",get:function(){return this.Mti},set:function(t){this.Mti=t}},{key:"nrt",get:function(){return this.y4t}},{key:"A7t",get:function(){return this.Lti}},{key:"L7t",get:function(){return this.Oti},set:function(t){this.Oti=t}},{key:"S7t",get:function(){return this.Fti},set:function(t){this.Fti=t}},{key:"O7t",get:function(){return this.Hti},set:function(t){this.Hti=t}}],[{key:"r4t",get:function(){return n0.v1t}}]),i}(k1);V(),It();var r2=function(){function t(){this.hii=void 0}var i=t.prototype;return i.registerWebImaAdPlayerConstructor=function(t){this.hii=t},i.createAdPlayer=function(t,i,n){return e2()&&this.hii?this.hii(t,i,n):void 0},t}();function e2(){return!!Boolean(f.google&&f.google.ima)&&!(1===b.keys(f.google.ima).length&&Boolean(f.google.ima.dai))}r2.Bg=new r2;var s2=function(){function t(){}var i=t.prototype;return i.Qz=function(t){return t&&t.integration===DS.GOOGLE_IMA},i.e4t=function(t,i,n){return r2.Bg.createAdPlayer(t,i,n)},i.W6=function(t,i,n,r){n.Cti(t,i,r)},i.uj=function(t){var i=vZ(t.sources);if(i){var n={integration:DS.GOOGLE_IMA,sources:i,omidAccessModeRules:M1(t.omidAccessModeRules)},r=lZ(t.timeOffset);return void 0!==r&&(n.timeOffset=r),n}},xt(t,[{key:"i4t",get:function(){return n2.r4t}}]),t}();NS.Bg.Kz(new s2),V(),It(),Bt(),V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Dt();var u2=function(t){function i(){return t.call(this,"m1t")||this}return Pt(i,t),i.prototype.xa=function(){return new o2},i}(Cg),o2=function(t){function i(){return t.call(this,"adloaded")||this}return Pt(i,t),i}(ah),h2=-1,a2=function(){function t(t,i){this.y1t=void 0,this.Z5t=void 0,this.aii=void 0,this.e1t=void 0,this.Xp=void 0,this.$0t=void 0,this.lii=void 0,this.dii=void 0,this.y1t=[],this.e1t=!1,this.Z5t=t,this.Xp=0,this.$0t=i,this.lii=NaN,this.dii=!1,this.aii=new $Z(this,this.$0t)}var i=t.prototype;return i.fii=function(){return this.Xp0},n.Cii=function(t,i){for(var n,r,e=0,s=Ft(this.mii);!(r=s()).done;){var u=r.value;if(!u.i1t()){var o=u.dd;o>=t&&o<=i&&o>=e&&!E(o)&&(e=(n=u).dd)}}return n},n.Rii=function(t){return this.xii(new Rg(t,void 0))},n.Dii=function(){if(!this.Nii&&void 0!==this.R6t){this.Nii=!this.mii.some(function(t){return E(t.dd)});for(var t,i=Ft(this.mii);!(t=i()).done;){var n=t.value;n.dd!==h2&&n.dd<=this.R6t&&!n.i1t()&&n.s1t()}}},n.Bii=function(t){for(var i,n=Ft(t);!(i=n()).done;){i.value.s1t()}this.k5t.Mii(t),0===this.pii&&this.Ro()},n.Iii=function(t,i,n){var r=this;return this.mii.filter(function(e){if(e.i1t())return!1;var s=e.dd;return r.Lii(s,t)||r.Oii(s,t,i,n)})},n.Lii=function(t,i){switch(i){case 0:return 0===t;case h2:return t===h2;default:return!1}},n.Oii=function(t,i,n,r){if(t<0)return!1;var e=t-i;return-1!==e&&e<=n&&e>=-r},n.Fii=function(t){if(t&&t.length>0){for(var n,r=Ft(t);!(n=r()).done;){var e=n.value,s=i.E6t(e.qOt),u=this.Igt(e);-1===u&&(this.Nii=void 0===this.R6t,this.mii.push(new a2(s,this.Uii)),u=this.mii.length-1),this.mii[u].vii(e)}this.No()}},n.Igt=function(t){var n=i.E6t(t.qOt);return Xn(this.mii,function(t){return n===i.E6t(t.uii)})},n.Vii=function(t){Yn(this.mii,t)},n.S4t=function(t){this.R6t=t,this.Nii=void 0===t},i.E6t=function(t){switch(t){case"start":case"00:00:00":case"00:00:00.000":case"0%":case"0":return"0";case"end":case"100%":return"-1";default:return t}},xt(i,[{key:"pii",get:function(){for(var t,i=0,n=Ft(this.mii);!(t=n()).done;){t.value.i1t()||(i+=1)}return i}},{key:"Unt",get:function(){return this.mii}}]),i}(hh);V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Bt(),Dt(),Ut();var f2,v2=function(t){function i(i,n){var r;return(r=t.call(this)||this).A2t=void 0,r.Kii=[],r.jii=[],r.nq=void 0,r.Jii=void 0,r.Zii=void 0,r.R5t=new hh,r.$ii=function(t){t.stopPropagation(),r.tei()},r.tei=function(){for(var t,i=Ft(r.Kii);!(t=i()).done;)for(var n,e=Ft(t.value.$Yt);!(n=e()).done;){var s=n.value;JK(s.uri)}},r.A2t=v.createElement("div"),r.A2t.style.display="none",r.Jii=i,r.Zii=n,r}Pt(i,t);var n=i.prototype;return n.qii=function(){this.zii(),this.Gii(),this.nq=void 0},n.Xii=function(t){this.jii=this.jii.concat(t)},n.Qii=function(t){this.Kii=this.Kii.concat(t)},n.Gii=function(){this.jii=[]},n.zii=function(){this.Kii=[]},n.Yii=function(t){for(var i,n=Ft(this.jii);!(i=n()).done;){var r=i.value;r.oX===t&&JK(r.eventURL)}},n.be=function(){this.Wii.style.display=""},n.we=function(){this.Wii.style.display="none"},n.kn=function(){this.Vo(),this.R5t.Vo(),Zi(this.A2t)},xt(i,[{key:"Wii",get:function(){return this.A2t}},{key:"u4t",get:function(){return this.R5t}}]),i}(hh);function d2(t,i){var n=i;if(!function(t){return"ui"in t}(t))return n;var r,e=t.ui.language;if(qi(e)){var s=t.ui.languages;if(!s)return n;r=s[e]}else r=e;return r&&r[i]&&(n=r[i]),n}V(),It(),V(),It(),Ut();var l2=((f2={})[kA.vC]=1,f2[kA._C]=2,f2[kA.gC]=2,f2);function g2(t,i){var n=i?i.map(function(t){return t.toLowerCase()}):i;return An(t.filter(function(t){var i=t.type.toLowerCase();return!!ji(n)&&-1!==n.indexOf(i)&&GJ(i)}),function(t,i){return l2[t.type]-l2[i.type]}).map(w2)}function w2(t){return SA({src:t.contentURL,type:t.type,isAdvertisement:!0})}function m2(t,i){return nL(p2(t),p2(i))}function p2(t){return{Mi:t.height,Ti:t.width}}function y2(t,i,n,r){var e,s=function(t,i,n,r){var e,s=1/0,u=t.filter(function(t){return!GJ(t.type)}).filter(function(t){return void 0===r||-1!==r.indexOf(t.type)});if(u.length){for(var o,h=Ft(u);!(o=h()).done;){var a=o.value,c=(A.abs(a.width/i-1)+A.abs(a.height/n-1))/2;c0&&(t.PJt=null==(e=u[0].src)?void 0:e.trim());return bE({sources:u},r)}var _2=function(t){function i(i,n,r,e,s,u,o){var h;return(h=t.call(this,i,n)||this).Rei=void 0,h.ZS=void 0,h.k5t=void 0,h.sc=void 0,h.sei=void 0,h.rei=void 0,h.pJt=void 0,h.pei=void 0,h.eei=void 0,h.Iei=void 0,h.C4=void 0,h.Cei=void 0,h.Dei=void 0,h.x2t=void 0,h.T2t=void 0,h.hT=void 0,h.hei=void 0,h.Sei=void 0,h.kei=void 0,h.Tei=void 0,h.Aei=void 0,h.wei=void 0,h.yei=void 0,h.bei=void 0,h.vei=void 0,h.lei=void 0,h.Rei=r,h.ZS=e,h.k5t=s,h.sc=u,h.sei=o,h.eei=!1,h.Iei=0,h.C4=-1,h.hT=new dr,h.hei=!0,h.Sei=function(){h.cei()},h.kei=function(){h.hT=void 0,h.eei||(h.xei(),h.eei=!0),h.hei&&(h.hei=!1,h.k5t.wii()),h.Wii.style.display="block",h.sei.mn(Fy.PM,h.kei),h.eei=!0},h.Tei=function(){var t=h.zx,i=h.ct,n=t/i;(0===h.Iei&&n>=.25?(h.Yii(IJ.zJt),h.Iei=1):1===h.Iei&&n>=.5?(h.Yii(IJ.XJt),h.Iei=2):2===h.Iei&&n>=.75&&(h.Yii(IJ.GJt),h.Iei=3),h._ei(t,i),h.Bei(),h.C4=t,h.pJt)&&(-1!==h.pJt.kJt&&h.pJt.kJt1){var e=n.filter(function(t){return t.i1t()}).length;r+=". "+d2(this.ZS,"Ad")+" "+(e+1)+"/"+n.length}Ux(this.Dei,r)}},xt(i,[{key:"iei",get:function(){return this.eei}},{key:"zx",get:function(){return this.sei.zx}},{key:"ct",get:function(){var t=this.sei.ct;return E(t)&&this.pJt&&(t=this.pJt.ct||0),t}},{key:"Qx",get:function(){return this.sei.Qx}},{key:"oP",get:function(){return this.sei.oP},set:function(t){this.sei.oP=t,t?this.Yii(IJ.BJt):this.Yii(IJ.MJt)}},{key:"lP",get:function(){return this.sei.lP}},{key:"AP",get:function(){return this.sei.AP}},{key:"OP",get:function(){return this.sei.OP},set:function(t){this.sei.OP=t}},{key:"DP",get:function(){return this.sei.DP}},{key:"MP",get:function(){return this.sei.MP}},{key:"nei",get:function(){return this.rei}},{key:"Eei",get:function(){return this.pJt&&-1!==this.pJt.kJt&&this.sei.zx>=this.pJt.kJt}}]),i}(v2);V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It(),Bt(),Dt();var k2=function(t){function i(){var n;return(n=t.call(this)||this).Ls=void 0,n.Q1t=function(t){n.So(new ah("uD")),n.Mei(t)},n.Mei=function(t){t.stopPropagation()},n.Ls=i.yr(),n.j1t(),n}Pt(i,t);var n=i.prototype;return n.j1t=function(){this.xe.addEventListener("mouseup",this.Q1t),this.xe.addEventListener("touchend",this.Q1t),this.xe.addEventListener("mousedown",this.Mei)},n.G1t=function(){this.xe.removeEventListener("mouseup",this.Q1t),this.xe.removeEventListener("touchend",this.Q1t),this.xe.removeEventListener("mousedown",this.Mei)},n.kn=function(){this.G1t(),Zi(this.Ls)},i.yr=function(){var t=v.createElement("div");return t.className="theoplayer-ad-nonlinear-close",t.style.position="absolute",t.style.right="0",t.style.top="0",t.style.cursor="pointer",t.style.fontSize="1.7em",t.style.lineHeight="0.75em",t},xt(i,[{key:"xe",get:function(){return this.Ls}}]),i}(uh),b2=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).Oei=void 0,e.c1t=void 0,e.k5t=void 0,e.yu=void 0,e.Wei=void 0,e.Vei=function(){e.zei(),e.Yii(IJ.ZJt),e.Zii()},e.Uei=function(t){var i,n;e.zei(),null==(i=e.nq)||i.bZt(jJ.mZt);var r,s,u,o=null==(n=e.c1t)?void 0:n.hYt[0],h=null!=(s=null!=(r=null==o?void 0:o.lYt)?r:null==o?void 0:o.cYt)?s:null==o?void 0:o.vYt;e.Jii(null!=(u=null==h?void 0:h.cZt)?u:"")},e.qei=function(){e.we(),tn(e.Wii),e.Zii(),e.Oei=void 0,e.c1t=void 0},e.Xei=function(){e.yu||(e.Wei=void 0,e.yu=new k2,e.Wii.children[0].appendChild(e.yu.xe),e.yu.wn("uD",e.jei))},e.jei=function(){e.Yii(IJ.FJt),e.G$t()},e.Wii.className="theoplayer-ad-nonlinear",e.Wii.style.position="absolute",e.Wii.style.width="100%",e.Wii.style.bottom="3em",e.Wii.style.zIndex="10",e.Wii.style.textAlign="center",e.k5t=r,e}Pt(i,t);var n=i.prototype;return n.qii=function(){t.prototype.qii.call(this),this.Wii&&tn(this.Wii)},n.mei=function(t,i,n){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.c1t&&this.uei(),this.Oei=t,this.c1t=t.eYt,0!==this.c1t.aYt.length&&this.Xii(this.c1t.aYt),this.nq=i,0===this.c1t.hYt.length?[3,2]:(this.Qii(this.c1t.hYt[0].gYt),this.Wii.addEventListener("error",this.Uei),this.Wii.addEventListener("load",this.Vei),[4,this.gei()]);case 1:n.sent(),this.Hei(),n.label=2;case 2:return[2]}})}).call(this)},n.G$t=function(){var t;if(void 0===this.Wei){var i=null==(t=this.c1t)?void 0:t.hYt[0];i&&i.od&&-1!==i.od.kJt&&(this.Yii(IJ.FJt),this.u4t.So(new s1(this.Oei,0)),this.qei())}},n.xei=function(){void 0!==this.Oei&&this.u4t.So(new gO(this.Oei,this.k5t.zx))},n.KP=function(){this.uei(),this.Oei=void 0,this.c1t=void 0},n.uei=function(){this.zei(),void 0!==this.Oei&&(this.Oei.s1t(),this.u4t.So(new mO(this.Oei,this.k5t.zx))),this.qii(),this.Gei(),void 0!==this.Wei&&(w(this.Wei),this.Wei=void 0)},n.zei=function(){this.Wii.removeEventListener("load",this.Vei),this.Wii.removeEventListener("error",this.Uei)},n.gei=function(){return jt(function(){var t,i,n,r,e,s,u,o,h;return zt(this,function(a){return(t=v.createElement("div")).className="theoplayer-ad-nonlinear-content",t.style.position="relative",t.style.display="inline-block",i=this.c1t.hYt[0],n=v.createElement("a"),i.gYt.KYt&&(n.href=i.gYt.KYt,n.target="Xu",n.setAttribute("rel","noopener")),i.lYt?(r=i.lYt,(e=v.createElement("iframe")).src=r.cZt,n.appendChild(e)):i.cYt?(s=i.cYt,(u=v.createElement("img")).src=s.cZt,n.appendChild(u)):i.vYt&&(o=i.vYt,(h=v.createElement("iframe")).src=o.cZt,n.appendChild(h)),i.SYt(),n.addEventListener("mousedown",this.$ii),n.addEventListener("touchend",this.$ii),this.Wii.firstChild&&(tn(this.Wii),this.uei()),t.appendChild(n),this.Wii.appendChild(t),this.be(),[2]})}).call(this)},n.Hei=function(){var t;if(this.c1t){var i=null==(t=this.c1t.hYt[0].od)?void 0:t.kJt;void 0!==i&&-1!==i&&(this.Wei=f.setTimeout(this.Xei,1e3*i))}},n.Gei=function(){this.yu&&(this.yu.mn("uD",this.jei),this.yu.kn()),this.yu=void 0},xt(i,[{key:"Lei",get:function(){return this.Oei}},{key:"Fei",get:function(){return this.yu}},{key:"Qei",get:function(){return this.k5t.Kei()}}]),i}(v2);V(),It(),Wt(),Yt();var A2=function(){function t(){}return t.Yei=function(t,i,n){return jt(function(){var r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:r=[],e=t.shift(),s=[],a.label=1;case 1:if(!e)return[3,6];a.label=2;case 2:return a.trys.push([2,4,,5]),[4,(new JJ).CZt(e,i)];case 3:return u=a.sent(),r=r.concat(u),[3,5];case 4:return o=a.sent(),h=X0.v4t(o,e.sources.src),n.So(h),s.push(h.Jy),[3,5];case 5:return e=t.shift(),[3,1];case 6:return[2,[r,s]]}})})()},t}();V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Dt();var T2=function(t){function i(){return t.call(this,"zot")||this}return Pt(i,t),i.prototype.xa=function(){return new S2},i}(Cg),S2=function(t){function i(){return t.call(this,"statechange")||this}return Pt(i,t),i}(ah);V(),It();var E2=function(t){return t.IDLE="idle",t.LOADING="loading",t.DONE="done",t.ERROR="error",t.EVICTED="evicted",t}({});V(),It(),Dt(),V(),It(),Bt(),Dt(),Ut();var I2=function(){function t(){this.nc=[],this.hu=void 0}var i=t.prototype;return i.MI=function(t){return this.nc[t]},i.gO=function(t){this.nc.push(t),this.hu&&this.hu.push(t.Ca),this.Jei(t)},i.Zei=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;this.gO(r)}},i.$ei=function(t,i){i>=0&&i<=this.nc.length&&(this.nc.splice(i,0,t),this.hu&&this.hu.splice(i,0,t.Ca),this.Jei(t))},i.pO=function(t){return Jn(this.nc,t)},i.pS=function(t){this.tsi(this.nc.indexOf(t))},i.tsi=function(t){if(t>=0&&t0&&this.Fsi=i)return r;return r}(t,s)/8}).reduce(function(t,i){return t+i},0)),E=ro(),h&&0!==h.length){for(R=function(){var t=D.value,i=t.qualityId,n=new LA(t.startsAndEnds);if(E.has(i))E.get(i).timeRanges=E.get(i).timeRanges.HM(n).VM(5e-4);else{var r,e=Wn(a,function(t){return t.o===i}),s=A.min(I.msi,null!=(r=null==e?void 0:e.AM.ct)?r:1/0);E.set(i,{timeRanges:n,totalQualityDurationToCache:s})}},C=h.reduce(function(t,i){return t+i.byteSize},0),P=Ft(h);!(D=P()).done;)I=this,R();u=new O2(C,E,this.msi)}else{for(N=Ft(a);!(x=N()).done;)B=x.value,E.set(B.o,{timeRanges:LA.rL(),totalQualityDurationToCache:A.min(B.AM.ct,this.msi)});u=new O2(0,E,this.msi)}return this.Wsi=u,[2]}})}).call(this)},n.mi=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.ko];case 1:return i.sent(),[4,this.Gsi(this.URt,t)];case 2:return i.sent(),[2]}})}).call(this)},n.Gsi=function(t,i){return jt(function(){var n,r,e,s;return zt(this,function(u){switch(u.label){case 0:if(!t.Psi)throw new y("Unexpected - manifest is missing locations");return[4,this.Xsi()];case 1:for(u.sent(),n=[],r=Ft(t.Amt);!(e=r()).done;)s=e.value,n.push(this.jsi(s,t.Psi[0],i));return[2,Ir(n)]}})}).call(this)},n.Xsi=function(){return jt(function(){var t,i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:return[4,this.Qsi.Sxt()];case 1:t=u.sent(),i=Ft(t),u.label=2;case 2:return(n=i()).done?[3,9]:(r=n.value,[4,this.Dxt.Bxt.zy(r.key)]);case 3:return(e=u.sent())?[4,p3(e,this.dTt.o,this.Dxt.Bxt,this.dsi)]:[3,5];case 4:return u.sent(),[3,8];case 5:return u.trys.push([5,7,,8]),[4,this.Dxt.Bxt.uTt(r,this.dsi)];case 6:return u.sent(),[3,8];case 7:throw s=u.sent(),new F2("Unable to store manifest with url: "+r.locationURL,s);case 8:return[3,2];case 9:return[4,this.Qsi.xxt()];case 10:return u.sent(),[2]}})}).call(this)},n.jsi=function(t,i,n){for(var r,e=[],s=Ft(t.qmt);!(r=s()).done;)for(var u,o=Ft(y3(r.value,this.dTt.LS.preferredTrackSelection));!(u=o()).done;){var h=u.value;e.push(this.Ksi(h,i,n))}return Ir(e)},n.Ksi=function(t,i,n){return jt(function(){var r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:return r=this.dTt.LS.bandwidth,e=k3(t.$I,r),t.Km===vw.Mk&&t.Wpt&&t.Wpt.lH.widevine&&"persistent"===t.Wpt.lH.widevine.licenseType?[4,this.Ysi(t.Wpt)]:[3,2];case 1:a.sent(),pr(n),a.label=2;case 2:for(s=[],u=Ft(e);!(o=u()).done;)h=o.value,s.push(this.Jsi(h,i,n));return[2,Ir(s)]}})}).call(this)},n.Jsi=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:pr(n),r=t.AM.bct[0].CO,e=r+this.msi,s=[],u=!1,o=Ft(t.AM.bct),c.label=1;case 1:return(h=o()).done||((a=h.value).CO>=e||this.stopIfFailed(u))?[3,5]:[4,this.Zsi(n)];case 2:return c.sent(),[4,this.$si.Bsi()];case 3:c.sent(),s.push(this.$si.Osi(this.tni(a,t,i),this.ini).catch(function(t){return u=!0,ot.reject(t)})),c.label=4;case 4:return[3,1];case 5:return[2,Ir(s)]}})}).call(this)},n.Zsi=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return(null==t?void 0:t.Hg)?[4,this.ini.Yy]:[3,2];case 1:throw i.sent(),new wr;case 2:return[2]}})}).call(this)},n.eni=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.ko.catch(pn)];case 1:return t.sent(),[2,this.URt]}})}).call(this)},n.Ysi=function(t){return ot.resolve()},n.sni=function(){return Vi.um("License renewal unsupported in this SDK."),ot.resolve()},n.tni=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:return r=this,e=this.Dxt.Nxt,s=Zj(t.xsi.Yu,t.xsi.Wat),[4,e.zy(s)];case 1:return(u=v.sent())?[4,p3(u,this.dTt.o,e,this.dsi)]:[3,3];case 2:return v.sent(),this.nni(u,!1),[3,7];case 3:return v.trys.push([3,6,,7]),[4,this.rni(t.xsi)];case 4:return o=v.sent(),h=this.hni(t,i,n,o),a=h.segmentMetadataEntry,c=h.segmentEntry,[4,this.Dxt.Rxt(function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.Nxt.uTt(a,this.dsi)];case 1:return i.sent(),[4,t.bct.uTt(c,this.dsi)];case 2:return i.sent(),[2]}})}).call(r)})];case 5:return v.sent(),this.nni(a,!0),[3,7];case 6:throw f=v.sent(),new F2("Unable to store segment with url: "+t.xsi.Yu,f);case 7:return[2]}})}).call(this)},n.rni=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return[4,this.$ut.Lat(t,{zat:this.DEFAULT_CACHING_SEGMENT_TIMEOUT,qk:this.DEFAULT_CACHING_SEGMENT_CONNECTION_TIMEOUT})];case 1:return i=n.sent(),[4,this.tct(i)];case 2:return[2,n.sent()]}})}).call(this)},n.tct=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,t.qT()];case 1:return[2,{buffer:i.sent()}]}})})()},n.hni=function(t,i,n,r){var e=Zj(t.xsi.Yu,t.xsi.Wat),s=t.CO,u=t.ct,o=this.oni(r);return{segmentMetadataEntry:{key:e,segmentURLsegmentByteRange:e,manifestURL:Jj(n),qualityId:i.o,byteSize:o,startsAndEnds:new LA([s,s+u]).IM,references:[this.dTt.o]},segmentEntry:{key:e,segmentURLsegmentByteRange:e,manifestURL:Jj(n),data:r,references:[this.dTt.o]}}},n.oni=function(t){return t.buffer.byteLength},n.nni=function(t,i){var n=t.qualityId,r=this.zsi,e=r._O;e.get(n).timeRanges=e.get(n).timeRanges.HM(new LA(t.startsAndEnds)).VM(5e-4),this.Wsi=new O2(i?r.wsi+t.byteSize:r.wsi,e,this.msi)},n.stopIfFailed=function(t){return!1},xt(i,[{key:"fsi",get:function(){return this.GP()}},{key:"qsi",get:function(){return this.Hsi}},{key:"Wsi",get:function(){return this.zsi},set:function(t){this.zsi.QO(t)||(this.zsi=t,t.QO(O2.ksi)||this.So(new L2))}}]),i}(uh);function p3(t,i,n,r){return jt(function(){return zt(this,function(e){switch(e.label){case 0:return Jn(t.references,i)?[3,2]:(t.references.push(i),[4,n.uTt(t,r)]);case 1:e.sent(),e.label=2;case 2:return[2]}})})()}function y3(t,i){switch(t.Km){case vw.Bk:return _3(t.Z,i.audioTrackSelection);case vw.LT:return _3(t.Z,i.textTrackSelection);default:return _3(t.Z,[])}}function _3(t,i){if(0===i.length)return t.length?[t[0]]:[];for(var n,r=[],e=Ft(t);!(n=e()).done;){var s=n.value;i.indexOf(s.bs)>-1&&r.push(s)}return r}function k3(t,i){if(!t.length)return[];var n=[].concat(t).sort(rL),r=n.filter(function(t){return t.IW<=i});return r.length>0?[r.pop()]:[n.shift()]}var b3=function(){function t(t,i,n){this.dTt=void 0,this.Dxt=void 0,this.URt=void 0,this.dTt=t,this.Dxt=i,this.URt=n}var i=t.prototype;return i.ani=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=this,[4,this.Dxt.Rxt(function(i){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.uni(i)];case 1:return t.sent(),[4,this.cni(i)];case 2:return t.sent(),[4,this.dni(i)];case 3:return t.sent(),[4,this.lni(i)];case 4:return t.sent(),[2]}})}).call(t)})];case 1:return i.sent(),[2]}})}).call(this)},i.uni=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:return i=t.Mxt,n=this.dTt.o,[4,i.pS(n)];case 1:return r.sent(),[2]}})}).call(this)},i.cni=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:return i=this,n=t.Nxt,r=t.bct,cT(e=this.dTt.Mc.sources[0])?(s=Jj(e.src),[4,n.kxt(s,"manifestURL")]):[2];case 1:u=c.sent().filter(function(t){return Jn(t.references,i.dTt.o)}),o=Ft(u),c.label=2;case 2:return(h=o()).done?[3,8]:(Yn((a=h.value).references,this.dTt.o),0!==a.references.length?[3,5]:[4,n.pS(a.key)]);case 3:return c.sent(),[4,r.pS(a.key)];case 4:return c.sent(),[3,7];case 5:return[4,n.uTt(a)];case 6:c.sent(),c.label=7;case 7:return[3,2];case 8:return[2]}})}).call(this)},i.dni=function(t){return jt(function(){var i,n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return i=this,n=t.Bxt,r=this.fni(),[4,n._xt(r)];case 1:e=h.sent().filter(function(t){return Jn(t.references,i.dTt.o)}),s=Ft(e),h.label=2;case 2:return(u=s()).done?[3,7]:(Yn((o=u.value).references,this.dTt.o),0!==o.references.length?[3,4]:[4,n.pS(o.key)]);case 3:return h.sent(),[3,6];case 4:return[4,n.uTt(o)];case 5:h.sent(),h.label=6;case 6:return[3,2];case 7:return[2]}})}).call(this)},i.fni=function(){if(!this.URt)return[];var t=this.dTt.Mc.sources[0];if(!cT(t))return[];var i=Jj(t.src),n=function(t){if(!t)return[];for(var i,n=[],r=Ft(t.Amt);!(i=r()).done;)for(var e,s=Ft(i.value.qmt);!(e=s()).done;)for(var u,o=Ft(e.value.Z);!(u=o()).done;)for(var h,a=Ft(u.value.$I);!(h=a()).done;){var c=h.value;c.Isi&&n.push(c.Isi)}return function(t){return t.reduce(function(t,i){return t.indexOf(i)<0&&t.push(i),t},[])}(n)}(this.URt).map(function(t){return{src:t}}).map(function(t){return Jj(t.src)});return[].concat([i],n)},i.lni=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return i=this,[4,(n=t.Lxt).Sxt()];case 1:r=o.sent().filter(function(t){return Jn(t.references,i.dTt.o)}),e=Ft(r),o.label=2;case 2:return(s=e()).done?[3,7]:(Yn((u=s.value).references,this.dTt.o),0!==u.references.length?[3,4]:[4,n.pS(u.key)]);case 3:return o.sent(),this.vni(u),[3,6];case 4:return[4,n.uTt(u)];case 5:o.sent(),o.label=6;case 6:return[3,2];case 7:return[2]}})}).call(this)},i.vni=function(t){},t}(),A3=function(){function t(){}return t.prototype.jet=function(t,i,n){return new b3(t,i,n)},t}(),T3=new A3;V(),It(),Wt(),Bt(),Yt(),V(),It();var S3=function(){function t(t,i){this.wE=void 0,this.pni=void 0,this.hu=void 0,this.wE=t,this.pni=i}var i=t.prototype;return i._ni=function(t){this.gni(t)},i.gni=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.pni.sni(t)];case 1:return i.sent(),[3,3];case 2:return i.sent(),this.wE.$ot(E2.ERROR),[3,3];case 3:return[2]}})}).call(this)},xt(t,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){return{renew:function(i){t._ni(i)}}}(this)),this.hu}}]),t}(),E3=function(t){function i(i,n,r,e,s,u){var o;(o=t.call(this)||this).aS=void 0,o.Zot=void 0,o.hu=void 0,o.Ac=void 0,o.Tni=void 0,o.Dxt=void 0,o.pni=void 0,o.Eni=new dr,o.Sni=void 0,o.evictOnLoading=function(){o.mn("zot",o.evictOnLoading),o.xni()},o.aS=i,o.Ac=n,o.Tni=r,o.Dxt=e,o.pni=s.jet(o,o.Dxt,u),o.Sni=new S3(o,o.pni),o.Zot=1===o.pni.Wsi.Ssi?E2.DONE:E2.IDLE,o.pni.wn("Q4t",function(t){o.Rs(t),1===o.yni&&o.$ot(E2.DONE)});var h=new Date,a=o.Tni.expirationDate.getTime()-h.getTime();return function(t){return t<2147483647}(a)&&g(function(){return o.xni()},a),o}Pt(i,t);var n=i.prototype;return n.$ot=function(t){this.Zot!==t&&(this.Zot=t,this.So(new T2))},n.Tn=function(){this.Zot===E2.EVICTED||this.Zot===E2.DONE||this.kni()},n.kni=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,3,4]),this.$ot(E2.LOADING),t=new dr,this.Eni=t,[4,this.pni.mi(t.Yg)];case 1:return i.sent(),this.$ot(E2.DONE),[3,4];case 2:return mr(i.sent())?this.$ot(E2.IDLE):this.$ot(E2.ERROR),[3,4];case 3:return this.Eni.zg(),[7];case 4:return[2]}})}).call(this)},n.jP=function(){this.Eni.Zg()},n.pS=function(){this.dk===E2.LOADING?(this.wn("zot",this.evictOnLoading),this.jP()):this.xni()},n.xni=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.pni.eni()];case 1:return t=i.sent(),[4,T3.jet(this,this.Dxt,t).ani()];case 2:return i.sent(),this.pni.Wsi=O2.ksi,this.$ot(E2.EVICTED),[3,4];case 3:return i.sent(),this.$ot(E2.ERROR),[3,4];case 4:return[2]}})}).call(this)},xt(i,[{key:"fsi",get:function(){return this.pni.fsi}},{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get id(){return t.o},get status(){return t.dk},get source(){return t.Mc},get parameters(){return t.LS},get duration(){return t.ct},get cached(){return t.mni._s()},get secondsCached(){return t.wni},get percentageCached(){return t.yni},get bytes(){return t.bni},get bytesCached(){return t.Ani},get license(){return t.pQ.Ca},start:function(){t.Tn()},pause:function(){t.jP()},remove:function(){t.pS()},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new TR(t,["Q4t","zot"],n),n}(this)),this.hu}},{key:"o",get:function(){return this.aS}},{key:"pQ",get:function(){return this.Sni}},{key:"dk",get:function(){return this.Zot}},{key:"Mc",get:function(){return this.Ac}},{key:"LS",get:function(){return this.Tni}},{key:"ct",get:function(){return this.pni.Wsi.eL}},{key:"mni",get:function(){return this.pni.Wsi.Asi}},{key:"wni",get:function(){return this.pni.Wsi.bsi}},{key:"yni",get:function(){return this.pni.Wsi.Ssi}},{key:"bni",get:function(){return this.pni.qsi}},{key:"Ani",get:function(){return this.pni.Wsi.wsi}}]),i}(hh);var I3=function(){function t(t,i){this.Dxt=void 0,this.Pni=void 0,this.Dxt=t,this.Pni=i}var i=t.prototype;return i._si=function(t,i,n){var r=eI();return this.asi(r,t,i,n)},i.asi=function(t,i,n,r){return new E3(t,i,n,this.Dxt,this.Pni,r)},t}();V(),It();function R3(t){if(!t)throw new y("Unexpected - The cache parameters are undefined");var i=function(t){if(qi(t)&&!Wo(t,"%"))return T(t);return t}(t.amount);!function(t){if(function(t){return qi(t)&&Wo(t,"%")}(t)){var i=S(t);if(E(i)||i<0||i>100)throw new y("The amount as percentage must be between 0 and 100 percent.")}if(!qi(t)&&E(t))throw new y("The amount must be a number or a string")}(i);var n=function(t){if(!t)return function(){var t=new Date;return t.setMinutes(t.getMinutes()+30),t}();return t}(t.expirationDate);!function(t){if(t&&!function(t){return!t||Qi(t)&&t>new Date}(t))throw new y("Invalid expiration date for the cache parameters")}(n);var r=function(t){if(void 0===t)return 1/0;return t}(t.bandwidth);!function(t){if(E(t)||t<0)throw new y("The bandwidth must be between zero and infinity.")}(r);var e=function(t){if(!t)return 5;if(E(t))throw new y("The amount must be a number");return t}(t.numberOfParallelTasks);return{amount:i,expirationDate:n,bandwidth:r,parallelTasksThreshold:e,preferredTrackSelection:{audioTrackSelection:[],textTrackSelection:[]}}}var C3=function(){function t(t,i,n,r){var e=this;this.Dxt=void 0,this.pni=void 0,this.Ini=void 0,this.GJ=void 0,this.Nni=[],this.Cni=0,this.Rni=0,this.Dni=void 0,this.hT=void 0,this.aV=void 0,this.Pni=void 0,this.Mz=void 0,this.yii=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return(t=this.o8t())?[4,this.tXt(t)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})}).call(e)},this.Sii=function(){var t=e.Nni.shift();null==t||t.pS()},this.Mni=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:n=!1,r.label=1;case 1:return n?[3,3]:[4,t.ww("Q4t")];case 2:return r.sent(),n=1===t.Wsi.Ssi,[3,1];case 3:return i.ct<5&&this.yii(),[2]}})}).call(e)},this.GJ=t,this.aV=i,this.hT=new dr,this.Pni=n,this.Mz=r,this.Dxt=new KH}var i=t.prototype;return i.o8t=function(){if(this.Ini)for(var t=this.Ini.K0t;this.Cni0,o=this.w1t,h=this.eri(o),t.iYt?(t.iYt.od=o,void 0!==o.irt.skipOffset&&void 0!==(a=tZ.a$t(o.irt.skipOffset,t.iYt.ct))&&a0?this.jni():(this.Zni(),this.w1t=o)),[3,10];case 7:return null!==t?[3,9]:[4,this.dri()];case 8:return w.sent(),[3,10];case 9:this.Kni(!0),w.label=10;case 10:return[2]}})}).call(this)},n.dri=function(){var t=this.rri;return this.mei(t&&t.Rc())},n.Kni=function(t){this.ari(IJ.hZt),this.lri(),this.Gni=1;var i=void 0!==this.w1t&&this.w1t.OZt.fii();if(this.$ni=!1,!i||this.Yni){if(!this.w4t)return;this.oa.be(),!this.oa.Qx&&t&&this.oa.QP(),void 0!==this.Jni&&this.oa.Xx(this.Jni),this.I3t(),this.Yni=!1,this.Jni=void 0}else t&&(this.Gni=1,this.jni())},n.I3t=function(){this.fri(),t.prototype.I3t.call(this)},n.fri=function(){if(this.oa.Qx&&(this.Gni=5),this.w1t){var t=this.w1t.OZt;t.gii()&&this.u4t.So(new fO(this.eri(this.w1t))),this.zni.Vii(t),this.w1t=void 0}},n.hri=function(t){this.vri=this.vri.concat(t)},n.lri=function(){this.vri=[]},n._ri=function(t){this.oa.xe.appendChild(t)},n.ari=function(t){for(var i,n=Ft(this.vri);!(i=n()).done;){var r=i.value;r.oX===t&&JK(r.eventURL)}},n.cri=function(t){this.Hni.Yii(IJ.ZJt);for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;JK(r)}},n.qnt=function(t){for(var i,n=Ft(this.Dti());!(i=n()).done;){var r=i.value;nJ(r.sources,r.timeOffset)||t.W6(r,JB.Bnt,!1)}},n.Dti=function(){for(var t,i,n=[],r=Ft(this.Lnt.concat(this.Unt));!(i=r()).done;){var e=i.value;n.push(e.irt)}for(var s,u=Ft(this.Xni.concat(this.zni.Unt.filter(function(t){return!t.i1t()})));!(s=u()).done;)for(var o,h=Ft(s.value.K0t);!(o=h()).done;){var a=o.value;a.W||n.push(a.irt)}return(t=n).push.apply(t,[].concat(this.Vni)),or(n)},n.iri=function(){return!!this.w1t&&XZ(this.w1t).some(function(t){return t.iYt})},n.eri=function(t){return t.OZt.oii},n.Kei=function(){return this.gri},n.zP=function(){return this.sei.zP()},n.Ox=function(){return this.sei.Ox()},n.S4t=function(t){this.zni.S4t(t)},n.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return n.sent(),this.oa.mn(ch.uo,this.qni),this.u4t.LK(this.Hni.u4t),this.u4t.LK(this.Rei.u4t),this.u4t.LK(this.zni),this.Hni.kn(),this.Rei.kn(),[4,this.sei.kn()];case 2:return n.sent(),[2]}})}).call(this)},xt(i,[{key:"o4t",get:function(){return this}},{key:"r4t",get:function(){return i.r4t}},{key:"Fnt",get:function(){return this.w1t?this.eri(this.w1t):null}},{key:"Lnt",get:function(){return this.w1t?[this.Hni.nei,this.Rei.Lei].filter(Fi):[]}},{key:"Unt",get:function(){var t=this.Xni.concat(this.zni.Unt.filter(function(t){return!t.i1t()}));return nr(t,function(t){return t.oii.Jc.filter(function(t){return!t.i1t()})})}},{key:"Vnt",get:function(){return this.zni.Unt.map(function(t){return t.oii})}}],[{key:"r4t",get:function(){return n0.f1t}}]),i}(k1),L3=function(){function t(){}var i=t.prototype;return i.Qz=function(t){return t&&("string"!=typeof t.integration||t.integration===DS.DEFAULT||t.integration===DS.CSAI||t.integration===DS.THEO)},i.e4t=function(t,i,n){var r=new CB(t.tnt,t.Ql,n);r.Est(t.xe);var e=new wS(t.xe,n,t.Dx,t.Kst,t.VP,r,t.Ql);return new M3(t,i,e,n,t.Kst,t.Dx)},i.W6=function(t,i,n,r){n.Cti(t,i,r)},i.uj=function(t){var i=vZ(t.sources);if(i){var n={integration:DS.CSAI,sources:i};"vast"===n.sources.type&&void 0===t.timeOffset?t.timeOffset=0:"vmap"===n.sources.type&&void 0!==t.timeOffset&&Qe("Do not set timeOffset for VMAP ad sources. VMAP ads have their own offsets included.");var r=lZ(t.timeOffset);void 0!==r&&(n.timeOffset=r);var e=lZ(t.skipOffset);return void 0!==e&&(n.skipOffset=e),n}},xt(t,[{key:"i4t",get:function(){return M3.r4t}}]),t}();NS.Bg.Kz(new L3),V(),It(),V(),It(),Bt();var F3=function(){function t(t,i){this.bti=void 0,this.A2t=void 0,this.vet=void 0,this.Tri=void 0,this.i8=!1,this.vet=t;var n=v.createElement("div");n.className="theoplayer-ima-wrapper",ln(n),n.style.zIndex="10",Oi.Ks&&function(t,i){t.addEventListener(i,fn)}(n,"mousedown"),i.appendChild(n);var r=v.createElement("div");r.className="theoplayer-ima",r.style.height="100%",this.Tri=r,n.appendChild(r),this.A2t=n,this.bti=new google.ima.AdDisplayContainer(this.Tri,this.vet)}var i=t.prototype;return i.GY=function(){var t;this.i8||(null==(t=this.bti)||t.initialize(),this.i8=!0)},i.xri=function(t){"linear"===t?this.A2t.style.marginTop="0px":"nonlinear"===t&&(this.A2t.style.marginTop="-45px")},i.be=function(){this.A2t.style.opacity="1",this.A2t.style.pointerEvents=""},i.we=function(){this.A2t.style.opacity="0",this.A2t.style.pointerEvents="none"},i.zg=function(){var t;null==(t=this.bti)||t.destroy(),this.bti=void 0},xt(t,[{key:"Wii",get:function(){return this.A2t}},{key:"Sri",get:function(){return this.Tri.offsetHeight}},{key:"kri",get:function(){return this.Tri.offsetWidth}},{key:"Eri",get:function(){return this.bti}}]),t}();V(),It(),Wt(),Dt(),Yt(),V(),It(),Dt(),Ut(),V(),It(),Bt();var U3=function(){function t(t){this.Pri=void 0,this.IYt=void 0,this.Pri=t;var i=new google.ima.CompanionAdSelectionSettings;i.resourceType=google.ima.CompanionAdSelectionSettings.ResourceType.ALL,i.creativeType=google.ima.CompanionAdSelectionSettings.CreativeType.ALL,i.sizeCriteria=google.ima.CompanionAdSelectionSettings.SizeCriteria.IGNORE,this.IYt=t.getCompanionAds(0,0,i)}return xt(t,[{key:"fJt",get:function(){return this.Pri.getAdId()}},{key:"v7t",get:function(){var t=this.Pri.getAdPodInfo();if(void 0!==t)try{return{I9t:t.getAdPosition(),G0t:t.getMaxDuration(),Iri:t.getPodIndex(),qOt:t.getTimeOffset(),C9t:t.getTotalAds(),Cri:t.getIsBumper()}}catch(t){return}}},{key:"QKt",get:function(){return this.Pri.getAdSystem()}},{key:"Rri",get:function(){return this.Pri.getAdvertiserName()}},{key:"FYt",get:function(){var t;return null!=(t=this.Pri.getApiFramework())?t:void 0}},{key:"sYt",get:function(){return this.IYt.map(function(t){return{VYt:t.getAdSlotId(),GT:t.getContentType(),G4t:t.getContent(),Mi:t.getHeight(),Ti:t.getWidth()}})}},{key:"GT",get:function(){var t;return null!=(t=this.Pri.getContentType())?t:void 0}},{key:"wYt",get:function(){return this.Pri.getCreativeId()}},{key:"eti",get:function(){return this.Pri.getCreativeAdId()}},{key:"Dri",get:function(){return this.Pri.getDealId()}},{key:"_N",get:function(){return this.Pri.getDescription()}},{key:"ct",get:function(){return this.Pri.getDuration()}},{key:"Ti",get:function(){return this.Pri.getWidth()}},{key:"Mi",get:function(){return this.Pri.getHeight()}},{key:"PJt",get:function(){var t;return null!=(t=this.Pri.getMediaUrl())?t:void 0}},{key:"Nri",get:function(){return this.Pri.getMinSuggestedDuration()}},{key:"tti",get:function(){return this.Pri.getSkipTimeOffset()}},{key:"Bri",get:function(){return this.Pri.getSurveyUrl()}},{key:"gq",get:function(){return this.Pri.getTitle()}},{key:"Z7t",get:function(){return this.Pri.getTraffickingParameters()}},{key:"$7t",get:function(){return this.Pri.getTraffickingParametersString()}},{key:"rYt",get:function(){return this.Pri.getUniversalAdIds().map(function(t){return{sti:t.getAdIdRegistry(),nti:t.getAdIdValue()}})}},{key:"Jti",get:function(){return this.Pri.getUiElements()}},{key:"iti",get:function(){return this.Pri.getVastMediaBitrate()}},{key:"J7t",get:function(){return this.Pri.getVastMediaHeight()}},{key:"Y7t",get:function(){return this.Pri.getVastMediaWidth()}},{key:"X7t",get:function(){return this.Pri.getWrapperAdIds()}},{key:"j7t",get:function(){return this.Pri.getWrapperAdSystems()}},{key:"Q7t",get:function(){return this.Pri.getWrapperCreativeIds()}},{key:"h7t",get:function(){return this.Pri.isLinear()}}]),t}();function V3(){return[google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,google.ima.AdEvent.Type.CLICK,google.ima.AdEvent.Type.DURATION_CHANGE,google.ima.AdEvent.Type.EXPANDED_CHANGED,google.ima.AdEvent.Type.STARTED,google.ima.AdEvent.Type.IMPRESSION,google.ima.AdEvent.Type.PAUSED,google.ima.AdEvent.Type.RESUMED,google.ima.AdEvent.Type.AD_PROGRESS,google.ima.AdEvent.Type.AD_BUFFERING,google.ima.AdEvent.Type.FIRST_QUARTILE,google.ima.AdEvent.Type.MIDPOINT,google.ima.AdEvent.Type.THIRD_QUARTILE,google.ima.AdEvent.Type.COMPLETE,google.ima.AdEvent.Type.USER_CLOSE,google.ima.AdEvent.Type.LINEAR_CHANGED,google.ima.AdEvent.Type.LOADED,google.ima.AdEvent.Type.AD_CAN_PLAY,google.ima.AdEvent.Type.AD_METADATA,google.ima.AdEvent.Type.AD_BREAK_READY,google.ima.AdEvent.Type.INTERACTION,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,google.ima.AdEvent.Type.SKIPPED,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,google.ima.AdEvent.Type.LOG,google.ima.AdEvent.Type.VIEWABLE_IMPRESSION,google.ima.AdEvent.Type.VOLUME_CHANGED,google.ima.AdEvent.Type.VOLUME_MUTED]}var j3=function(t){function i(i,n,r){var e;(e=t.call(this)||this).Q0t=void 0,e.bti=void 0,e.sc=void 0,e.qc=[],e.Lri=function(t){t.getAd().isLinear()?e.bti.xri("linear"):e.bti.xri("nonlinear")},e.Mri=function(){e.Q0t.resize(e.bti.kri,e.bti.Sri,google.ima.ViewMode.NORMAL)},e.forwardAdEventListener=function(t){var i=t.getAd(),n=function(t){var i;return((i={})[google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED]=R1.v8t,i[google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED]=R1._8t,i[google.ima.AdEvent.Type.CLICK]=R1.g8t,i[google.ima.AdEvent.Type.DURATION_CHANGE]=R1.Cw,i[google.ima.AdEvent.Type.EXPANDED_CHANGED]=R1.p8t,i[google.ima.AdEvent.Type.STARTED]=R1.m8t,i[google.ima.AdEvent.Type.IMPRESSION]=R1.w8t,i[google.ima.AdEvent.Type.PAUSED]=R1.Yz,i[google.ima.AdEvent.Type.RESUMED]=R1.y8t,i[google.ima.AdEvent.Type.AD_PROGRESS]=R1.b8t,i[google.ima.AdEvent.Type.AD_BUFFERING]=R1.A8t,i[google.ima.AdEvent.Type.FIRST_QUARTILE]=R1.S8t,i[google.ima.AdEvent.Type.MIDPOINT]=R1.XJt,i[google.ima.AdEvent.Type.THIRD_QUARTILE]=R1.T8t,i[google.ima.AdEvent.Type.COMPLETE]=R1.jJt,i[google.ima.AdEvent.Type.USER_CLOSE]=R1.k8t,i[google.ima.AdEvent.Type.LINEAR_CHANGED]=R1.E8t,i[google.ima.AdEvent.Type.LOADED]=R1.x8t,i[google.ima.AdEvent.Type.AD_CAN_PLAY]=R1.P8t,i[google.ima.AdEvent.Type.AD_METADATA]=R1.I8t,i[google.ima.AdEvent.Type.AD_BREAK_READY]=R1.C8t,i[google.ima.AdEvent.Type.INTERACTION]=R1.R8t,i[google.ima.AdEvent.Type.ALL_ADS_COMPLETED]=R1.D8t,i[google.ima.AdEvent.Type.SKIPPED]=R1.N8t,i[google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED]=R1.B8t,i[google.ima.AdEvent.Type.LOG]=R1.M8t,i[google.ima.AdEvent.Type.VIEWABLE_IMPRESSION]=R1.L8t,i[google.ima.AdEvent.Type.VOLUME_CHANGED]=R1.O8t,i[google.ima.AdEvent.Type.VOLUME_MUTED]=R1.F8t,i)[t]}(t.type),r={type:n,date:new Date,jnt:i?e.Ori(i):void 0,J9t:N1(n,t.getAdData())};e.So(r)},e.forwardAdErrorEventListener=function(t){e.So({date:new Date,jnt:void 0,type:C1.U8t,J9t:{D7t:O1(t.getError())}})},e.Q0t=i,e.bti=n,e.sc=r,e.sc.wn(AI.yn,e.Mri),e.Q0t.init(e.bti.kri,e.bti.Sri,google.ima.ViewMode.NORMAL),e.Q0t.addEventListener(google.ima.AdEvent.Type.LOADED,e.Lri),e.Q0t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,e.forwardAdErrorEventListener);for(var s,u=Ft(V3());!(s=u()).done;){var o=s.value;e.Q0t.addEventListener(o,e.forwardAdEventListener)}return e}Pt(i,t);var n=i.prototype;return n.UP=function(t){var i;null==(i=this.Q0t)||i.setVolume(t)},n.FP=function(){return this.Q0t.getVolume()},n.I7t=function(){return this.Q0t.getRemainingTime()},n.zg=function(){tr(this.qc),this.sc.mn(AI.yn,this.Mri),this.Q0t.removeEventListener(google.ima.AdEvent.Type.LOADED,this.Lri),this.Q0t.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.forwardAdErrorEventListener);for(var t,i=Ft(V3());!(t=i()).done;){var n=t.value;this.Q0t.removeEventListener(n,this.forwardAdEventListener)}this.Q0t.destroy()},n.Tn=function(){this.Q0t.start()},n.kti=function(){this.Q0t.resume()},n.jP=function(){this.Q0t.pause()},n.uD=function(){this.Q0t.skip()},n.KP=function(){this.Q0t.stop()},n.d7t=function(){var t=this.Q0t.getCurrentAd();if(t)return this.Ori(t)},n.Xti=function(){return this.Q0t.getCuePoints()},n.Ori=function(t){var i=Wn(this.qc,function(i){return i.Pri===t});return i||(i=new U3(t),this.qc.push(i)),i},n.Eti=function(t){this.Q0t.updateAdsRenderingSettings(q3(t))},i}(uh);V(),It(),Bt(),Dt();var H3=function(t){function i(i,n){var r;return(r=t.call(this,"nii")||this).Uri=void 0,r.A2t=void 0,r.Uri=i,r.A2t=n,r}return Pt(i,t),i.prototype.xa=function(){return new W3(this.Uri)},xt(i,[{key:"Fri",get:function(){return this.Uri}},{key:"Wii",get:function(){return this.A2t}}]),i}(Cg),W3=function(t){function i(i){var n;return(n=t.call(this,"adsmanagerloaded")||this).Uri=void 0,n.Uri=i,n}return Pt(i,t),xt(i,[{key:"adsManager",get:function(){return this.Uri}}]),i}(ah),z3=function(t){function i(i,n){var r;return(r=t.call(this)||this).Ati=void 0,r.sc=void 0,r.Hri=void 0,r.Vri=void 0,r.Wri=void 0,r.qri=void 0,r.onAdsManagerLoadedListener=function(t){if(r.Wri&&r.qri&&r.Vri){var i,n=q3(r.qri),e=r.Wri,s=t.getAdsManager({get currentTime(){return e.zx},get duration(){return e.ct}},n),u=new j3(s,r.Hri,r.sc);r.So(new H3(s,r.Hri.Wii)),null==(i=r.Vri)||i.Qy(u),r.Vri=void 0}},r.onAdsManagerErrorListener=function(t){var i,n={Iy:t.getError().getMessage(),R9t:t.getError().getVastErrorCode(),TZt:t.getError().getErrorCode(),Km:x1(t.getError().getType()),D9t:void 0};null==(i=r.Vri)||i.Ky(n),r.Vri=void 0},r.sc=n,r.Hri=i,r}Pt(i,t);var n=i.prototype;return n.Pti=function(){var t;null==(t=this.Ati)||t.contentComplete()},n.r8t=function(t,i,n){return jt(function(){var r;return zt(this,function(e){if(this.Vri)throw new y("Only one ImaAdsRequest can be made at a time.");if(!this.Hri.Eri)throw new y("AdDisplayContainer is not initialized.");return this.Ati=new google.ima.AdsLoader(this.Hri.Eri),this.Ati.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoadedListener),this.Ati.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsManagerErrorListener),this.Vri=new Xa,this.Wri=i,this.qri=n,r=new google.ima.AdsRequest,t.w6t?r.adTagUrl=t.w6t:t.y6t&&(r.adsResponse=t.y6t),r.linearAdSlotWidth=t.f6t,r.linearAdSlotHeight=t.v6t,r.nonLinearAdSlotWidth=t._6t,r.nonLinearAdSlotHeight=t.g6t,r.contentDuration=t.A6t,r.setAdWillAutoPlay(t.p6t),r.setAdWillPlayMuted(t.m6t),t.b6t&&(r.omidAccessModeRules=t.b6t),this.Ati.requestAds(r),[2,this.Vri.Yy]})}).call(this)},n.zg=function(){var t;void 0!==this.Ati&&(this.Ati.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoadedListener),this.Ati.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsManagerErrorListener),this.Ati.destroy(),this.Ati=void 0),null==(t=this.Vri)||t.Ky("AdsLoader destroyed"),this.Vri=void 0},i}(uh);function q3(t){var i=new google.ima.AdsRenderingSettings;return i.enablePreloading=t.Zti,t.Jti&&(i.uiElements=t.Jti),i.mimeTypes=t.Yti,void 0!==t.tii&&(i.playAdsAfterTime=t.tii),void 0!==t.$ti&&(i.loadVideoTimeout=t.$ti),void 0!==t.z9&&(i.bitrate=t.z9),void 0!==t.tii&&(i.playAdsAfterTime=t.tii),i.restoreCustomPlaybackStateOnAdBreakComplete=!0,i}V(),It(),Bt(),Dt();var X3=function(t){function i(i){var n;return(n=t.call(this)||this).zri=void 0,n.oa=void 0,n.oa=i,n.zri=n.oa.Gx(),n.oa.wn(ch.py,function(){n.oa.xP||(n.zri=n.oa.Gx()),n.So(new Rg(n.zx,void 0))}),n}return Pt(i,t),i.prototype.hr=function(){this.zri=0},xt(i,[{key:"zx",get:function(){return this.oa.xP?this.zri:this.oa.Gx()}},{key:"ct",get:function(){return this.oa.Nd()}},{key:"oP",get:function(){return this.oa.oP}},{key:"OP",get:function(){return this.oa.OP}}]),i}(uh);r2.Bg.registerWebImaAdPlayerConstructor(function(t,i,n){Z1(n);var r=t2(n)?t.zP():void 0,e=new F3(r,t.xe),s=new z3(e,t.Wu),u=new X3(t);return new n2(t,i,n,t.Jst,e,s,u)}),V(),It(),V(),It(),Wt(),Bt(),Dt(),H(),Yt(),V(),It(),Wt(),Bt(),Dt(),Yt();var G3=function(t){function i(i,n,r){var e;return(e=t.call(this,r)||this).dnt=void 0,e.k5t=void 0,e.ehi=!0,e.dnt=i,e.k5t=n,e}Pt(i,t);var n=i.prototype;return n.gr=function(t,i,n,r,e){(e||!r.lP||r.Qx)&&this.oa.lP&&this.oa.QP()},n.Xx=function(t,i){},n.Wx=function(t){},n.Xri=function(i,n){var r=i-this.k5t.jri;return t.prototype.Xx.call(this,r,n)},n.Qri=function(i){return t.prototype.Wx.call(this,i)},n.qx=function(){return this.dnt.bt},n.nu=function(){return this.dnt.nu()},n.Nd=function(){return this.dnt.Nd()},n.EP=function(){var t=LA.jn(this.dnt.EP()).Ly(this.k5t.jri);if(this.Kri())return t._s();var i=LA.jn(this.k5t.EP()),n=i;return N5(this.dnt)||(n=t.HM(i)),(n=n.Mn(LA.nL(0,this.Gx())))._s()},n.Gx=function(){return this.Yri(t.prototype.Gx.call(this))},n.Yri=function(t){return this.k5t.Jri?this.k5t.Jri:this.oa===this.k5t?this.k5t.Zri+t:this.k5t.jri+t},n.Hx=function(){return this.$ri(t.prototype.Gx.call(this))},n.$ri=function(t){return this.k5t.thi?this.k5t.thi:this.oa===this.k5t&&this.k5t.ihi?new Date(this.k5t.ihi.getTime()+1e3*t):this.dnt.Vx},n.Ux=function(){var t=LA.jn(this.dnt.Ux()).Ly(this.k5t.jri);if(this.Kri())return t._s();var i=LA.jn(this.k5t.Ux());return t.An(t.V-1)=r||(this.Roi.push(t),i?this.gai.set(i.JI,t):this.yai.push(t),this.nai.boi(t))},i.bai=function(t){var i=this.gai.get(t.JI);if(void 0!==i){var n=t.oOt["X-RESUME-OFFSET"],r=isFinite(t.RO)?this.nai.lai(t.RO):void 0;i.er({ct:t.ct,RO:r,fhi:void 0!==n?Number(n):void 0})}},i.joi=function(t){this.Aai(t)},i.Aai=function(t){void 0!==this.gai.get(t.JI)&&this.gai.delete(t.JI)},i.Sai=function(t){var i=this;t.forEach(function(t){return i.Aoi(t)})},i.Aoi=function(t){Yn(this.Roi,t)},i.hr=function(){var t,i,n,r;this.fai=void 0,this.zoi(void 0),this.Xoi(void 0);for(var e,s=Ft(this.Foi.slice());!(e=s()).done;){var u=e.value;this.Voi(u)}tr(this.Foi),tr(this.Roi),tr(this.yai),this.gai.clear(),null==(t=this.Noi)||t.removeEventListener("adbreak",this.Boi),null==(i=this.Noi)||i.removeEventListener("overlay",this.Moi),null==(n=this.Noi)||n.removeEventListener("streaminfo",this.Loi),null==(r=this.Noi)||r.close(),this.Noi=void 0},i.kn=function(){this.hr()},xt(t,[{key:"Coi",get:function(){return this.Roi}}]),t}();function B4(t){if(t){var i=t.sz.default;return Oi.Ks&&t.sz.phone?i=t.sz.phone:Oi.og&&t.sz.tv&&(i=t.sz.tv),{Jhi:t.iu,Zhi:i,phi:t.adTagParameters}}}function O4(t){var i=w4[t.type],n=t.default;return Oi.Ks&&t.phone?n=t.phone:Oi.og&&t.tv&&(n=t.tv),{Km:i,Syt:n}}function M4(t){var i,n,r,e;return t.top&&t.top>=0&&t.top<=100?i=t.top:t.bottom&&t.bottom>=0&&t.bottom<=100?n=t.bottom:i=10,t.left&&t.left>=0&&t.left<=100?r=t.left:t.right&&t.right>=0&&t.right<=100?e=t.right:r=10,{utt:i,att:n,ott:r,htt:e}}function L4(t){return{Ti:t.width&&t.width>=0&&t.width<=100?t.width:10,Mi:t.height&&t.height>=0&&t.height<=100?t.height:10}}V(),It(),Bt(),Dt();var F4=function(t){function i(i){var n;return(n=t.call(this)||this).oa=void 0,n.hu=void 0,n.oa=i,n}return Pt(i,t),i.prototype.doi=function(t){Ji(t)?this.oa.doi(t):Vi.dm("Incorrect ad tag parameters type, expecting a Record.")},xt(i,[{key:"Tai",get:function(){return this.oa.Tai.map(function(t){return t.Ont()})}},{key:"kai",get:function(){return this.oa.kai.map(function(t){return t.Ont()})}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=function(t){return{get currentInterstitials(){return t.Tai},get scheduledInterstitials(){return t.kai},replaceAdTagParameters:function(i){t.doi(i)},addEventListener:function(i,n){t.wn(i,n)},removeEventListener:function(i,n){t.mn(i,n)}}}(this)}}]),i}(uh);V(),It(),Bt();var U4=function(){function t(){this.R5t=new XI,this.Eai=void 0}var i=t.prototype;return i.Ioi=function(t){this.Eai=t},i.uD=function(){},i.Hnt=function(t){},i.qnt=function(t){},i.kn=function(){return this.Eai=void 0,ot.resolve()},xt(t,[{key:"u4t",get:function(){return this.R5t}},{key:"w4t",get:function(){var t;return void 0!==(null==(t=this.Eai)?void 0:t.Fnt)}},{key:"r4t",get:function(){return n0.knt}},{key:"Lnt",get:function(){var t;return(null==(t=this.Eai)?void 0:t.hti)?[this.Eai.hti]:[]}},{key:"Fnt",get:function(){var t,i;return null!=(i=null==(t=this.Eai)?void 0:t.Fnt)?i:null}},{key:"Unt",get:function(){var t=this;return this.Eai?nr(this.Eai.K0t,function(i){var n,r=i.Jc;if(i===(null==(n=t.Eai)?void 0:n.Fnt)&&void 0!==t.Eai.hti){var e=r.indexOf(t.Eai.hti);if(e>=0)return r.slice(e+1)}return i.pP?[]:r}):[]}},{key:"Vnt",get:function(){var t=this;return this.Eai?this.Eai.K0t.filter(function(i){var n;return i===(null==(n=t.Eai)?void 0:n.Fnt)||!i.pP}):[]}}]),t}();V(),It(),Wt(),Bt(),Yt();var V4=function(){function t(t,i,n){var r=this;this.oa=void 0,this.loi=void 0,this.xai=[],this.Iai=void 0,this.Cai=ro(),this.Bai=void 0,this.gn=void 0,this.Att=function(t){M0(r.Iai,r.oa.MP,r.oa.DP,t.width,t.height)},this.rjt=function(){M0(r.Iai,r.oa.MP,r.oa.DP,r.gn.Eu,r.gn.Iu)},this.$ii=function(t){t.stopPropagation()},this.oa=t,this.Bai=n;var e=v.createElement("div");e.style.display="none",e.className="theoads-image-overlays-container",ln(e),i.appendChild(e),this.Iai=e,this.gn=new OI(i),this.gn._n(),this.gn.wn(AI.yn,this.Att),this.oa.wn(ch.Jw,this.rjt)}var i=t.prototype;return i.Pai=function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){switch(s.label){case 0:return this.Iai.style.display="",(i=v.createElement("div")).className="theoplayer-theoads-overlay",i.style.display="",this.Cai.set(t.o,i),n=v.createElement("a"),[4,this.Rai(t)];case 1:return(r=s.sent()).clickThroughURI&&(this.Iai.style.zIndex="11",n.href=r.clickThroughURI,n.target="Xu",n.setAttribute("rel","noopener"),n.addEventListener("mousedown",this.$ii),n.addEventListener("touchend",this.$ii)),t.Bhi===g4.image&&(n.style.backgroundImage="url("+r.resourceURI+")",n.style.backgroundSize="contain",n.style.backgroundPosition="center",n.style.backgroundRepeat="no-repeat",r.impressionURI&&((e=v.createElement("img")).src=r.impressionURI,e.style.display="none",n.appendChild(e))),ln(n),function(t,i){t.style.position="absolute";var n=i.mo;n.ott&&(t.style.left=n.ott+"%");n.htt&&(t.style.right=n.htt+"%");n.utt&&(t.style.top=n.utt+"%");n.att&&(t.style.bottom=n.att+"%");var r=i.Wy;r.Ti&&(t.style.width=r.Ti+"%");r.Mi&&(t.style.height=r.Mi+"%");i.Mhi&&i.Mhi>0&&i.Mhi<=100&&(t.style.opacity=""+i.Mhi/100)}(i,t),i.appendChild(n),this.Iai.appendChild(i),this.xai.push(t),[2]}})}).call(this)},i.Dai=function(t){var i=this.Cai.get(t.o);i&&(this.Iai.contains(i)&&this.Iai.removeChild(i),this.Cai.delete(t.o),0===this.Cai.size&&(this.Iai.style.display="none"),Yn(this.xai,t))},i.Nai=function(){var t=this;this.Cai.forEach(function(i){t.Iai.contains(i)&&t.Iai.removeChild(i)}),this.Cai.clear(),this.xai=[]},i.Rai=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return i={resourceURI:""},t.Lhi?((r=io({},this.loi,t.phi))&&!r[b4]&&(r[b4]=T4.noi),[4,this.Bai.Yhi(t.Lhi,r)]):[3,2];case 1:n=o.sent(),o.label=2;case 2:return n?(i.resourceURI=n.image,i.impressionURI=n.impression):t.cZt&&((e=Wn(t.cZt,function(t){return t.Km===w4.svg}))&&(i.resourceURI=e.Syt),(s=Wn(t.cZt,function(t){return t.Km===w4.png}))&&(i.resourceURI=s.Syt)),i.clickThroughURI=null!=(u=null==n?void 0:n.clickThrough)?u:t.KYt,t.er({imageUrl:i.resourceURI,clickThrough:i.clickThroughURI}),[2,i]}})}).call(this)},i.hr=function(){this.Nai(),this.Iai.style.display="none"},xt(t,[{key:"Tai",get:function(){return this.xai}},{key:"phi",get:function(){return this.loi},set:function(t){this.loi=t}}]),t}();V(),It(),Dt();var j4=function(t){function i(i){var n;return(n=t.call(this,"addinterstitial")||this).interstitial=void 0,n.interstitial=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var H4=function(t){function i(i){var n;return(n=t.call(this,"Mai")||this).interstitial=void 0,n.interstitial=i,n}return Pt(i,t),i.prototype.xa=function(){return new W4(this.interstitial.Ont())},i}(Cg),W4=function(t){function i(i){var n;return(n=t.call(this,"interstitialend")||this).interstitial=void 0,n.interstitial=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var z4=function(t){function i(i,n){var r;return(r=t.call(this,"Lai")||this).interstitial=void 0,r.Iy=void 0,r.interstitial=i,r.Iy=n,r}return Pt(i,t),i.prototype.xa=function(){return new q4(this.interstitial.Ont(),this.Iy)},i}(Cg),q4=function(t){function i(i,n){var r;return(r=t.call(this,"interstitialerror")||this).interstitial=void 0,r.message=void 0,r.interstitial=i,r.message=n,r}return Pt(i,t),i}(ah);V(),It(),Wt(),Bt(),Dt(),Yt();var X4=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).d9=!1,i.Uai=function(t){!i.d9&&i.xoi&&(i.d9=!0,i.U9t(i.Yri(t.currentTime)))},i.Toi=function(t){i.Bd(i.Yri(t.currentTime))},i}Pt(i,t);var n=i.prototype;return n.Oai=function(){return!1},n.BW=function(t,i,n){return ot.resolve()},n.Fai=function(t,i,n,r){return void 0===r&&(r=!1),jt(function(){var e,s;return zt(this,function(u){switch(u.label){case 0:return e=this.yoi(t,i),[4,this.poi(t,i,n)];case 1:return s=u.sent(),[2,this.Eoi(s,t,n,e,r)]}})}).call(this)},n.poi=function(t,i,n){return jt(function(){return zt(this,function(i){return this.xoi=t,[2,bE({sources:{src:t.Syt}})]})}).call(this)},n.Soi=function(){t.prototype.Soi.call(this),this.k5t.wn(Fy.PM,this.Uai)},n.koi=function(){this.k5t.mn(Fy.PM,this.Uai),t.prototype.koi.call(this)},n.bd=function(t){if(this.ooi){var i=this.Yri(t.currentTime),n=this.ooi.Q4t;this.ooi.dhi(i);var r=this.ooi.Q4t;n<.25&&r>=.25?this.R5t.So(new f1(this.u1t,i)):n<.5&&r>.5?this.R5t.So(new d1(this.u1t,i)):n<.75&&r>=.75?this.R5t.So(new g1(this.u1t,i)):this.ooi.pP&&this.Bd(i)}else Vi.um("Got timeupdate without a current interstitial")},n.Bd=function(i){t.prototype.Bd.call(this,i),this.d9=!1},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return n.sent(),this.d9=!1,[2]}})}).call(this)},xt(i,[{key:"Vhi",get:function(){return I4.DEFAULT}}]),i}(R4);V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Dt(),H(),V(),It(),Dt();var G4=function(t){function i(i,n,r){var e;return(e=t.call(this,i,new Date)||this).Vai=void 0,e.jnt=void 0,e.Vai=n,e.jnt=r,e}return Pt(i,t),i}(ah),Q4=function(t){return t.LOADED="DAILoaded",t.AD_BREAK_STARTED="DAIAdBreakStarted",t.AD_BREAK_ENDED="DAIAdBreakEnded",t.AD_PERIOD_STARTED="DAIAdPeriodStarted",t.AD_PERIOD_ENDED="DAIAdPeriodEnded",t.AD_PROGRESS="DAIAdProgress",t.CUEPOINTS_CHANGED="DAICuePointsChanged",t.CLICK="DAIClick",t.ERROR="DAIError",t.STARTED="DAIStarted",t.FIRST_QUARTILE="DAIFirstQuartile",t.MIDPOINT="DAIMidpoint",t.STREAM_INITIALIZED="DAIStreamInitialized",t.THIRD_QUARTILE="DAIThirdQuartile",t.COMPLETE="DAIComplete",t}({}),Y4=function(t){function i(i,n){return t.call(this,"DAILoaded",i,n)||this}return Pt(i,t),i}(G4),$4=function(t){function i(i,n){return t.call(this,"DAIAdBreakStarted",i,n)||this}return Pt(i,t),i}(G4),K4=function(t){function i(i,n){return t.call(this,"DAIAdBreakEnded",i,n)||this}return Pt(i,t),i}(G4),J4=function(t){function i(i,n){return t.call(this,"DAIAdProgress",i,n)||this}return Pt(i,t),i}(G4),Z4=function(t){function i(i,n){return t.call(this,"DAICuePointsChanged",i,n)||this}return Pt(i,t),i}(G4),t5=function(t){function i(i,n){return t.call(this,"DAIClick",i,n)||this}return Pt(i,t),i}(G4),i5=function(t){function i(i,n){return t.call(this,"DAIError",i,n)||this}return Pt(i,t),i}(G4),n5=function(t){function i(i,n){return t.call(this,"DAIStarted",i,n)||this}return Pt(i,t),i}(G4),r5=function(t){function i(i,n){return t.call(this,"DAIFirstQuartile",i,n)||this}return Pt(i,t),i}(G4),e5=function(t){function i(i,n){return t.call(this,"DAIMidpoint",i,n)||this}return Pt(i,t),i}(G4),s5=function(t){function i(i,n){return t.call(this,"DAIStreamInitialized",i,n)||this}return Pt(i,t),i}(G4),u5=function(t){function i(i,n){return t.call(this,"DAIThirdQuartile",i,n)||this}return Pt(i,t),i}(G4),o5=function(t){function i(i,n){return t.call(this,"DAIComplete",i,n)||this}return Pt(i,t),i}(G4);var h5=function(t){function i(i,n,r){var e;(e=t.call(this)||this).Hai=void 0,e.T2t=void 0,e.eui=void 0,e.Gai=void 0,e.iui=void 0,e.Xai=void 0,e.Q1t=void 0,e.jai=void 0,e.Qai=void 0,e.Ts=void 0,e.Kai=void 0,e.Yai=void 0,e.Jai=void 0,e.Zai=void 0,e.$ai=void 0,e.tui=void 0,e.Hai=i,e.T2t=n,e.eui=r,e.Gai=function(t){e.zai(!0);var i=c5(t),n=v5(t);e.So(new $4(i,n))},e.iui=function(t){e.zai(!1);var i=c5(t),n=v5(t);e.So(new K4(i,n))},e.Xai=function(t){var i=c5(t),n=v5(t);e.So(new J4(i,n))},e.Q1t=function(t){var i=c5(t),n=v5(t);e.So(new t5(i,n))},e.jai=function(t){var i=c5(t),n=v5(t);e.So(new o5(i,n))},e.Qai=function(t){var i=c5(t),n=v5(t);e.So(new Z4(i,n))},e.Ts=function(t){var i=c5(t),n=v5(t);e.So(new i5(i,n))},e.Kai=function(t){var i=c5(t),n=v5(t);e.So(new r5(i,n))},e.Yai=function(t){var i=c5(t),n=v5(t);e.So(new Y4(i,n))},e.Jai=function(t){var i=c5(t),n=v5(t);e.So(new e5(i,n))},e.Zai=function(t){var i=c5(t),n=v5(t);e.So(new n5(i,n))},e.$ai=function(t){var i=c5(t),n=v5(t);e.So(new s5(i,n))},e.tui=function(t){var i=c5(t),n=v5(t);e.So(new u5(i,n))},e.T2t&&(e.T2t.style.display="none",e.Hai.setClickElement(e.T2t));var s=google.ima.dai.api.StreamEvent.Type;return e.Hai.addEventListener(s.AD_BREAK_STARTED,e.Gai),e.Hai.addEventListener(s.AD_PROGRESS,e.Xai),e.Hai.addEventListener(s.CLICK,e.Q1t),e.Hai.addEventListener(s.COMPLETE,e.jai),e.Hai.addEventListener(s.CUEPOINTS_CHANGED,e.Qai),e.Hai.addEventListener(s.ERROR,e.Ts),e.Hai.addEventListener(s.FIRST_QUARTILE,e.Kai),e.Hai.addEventListener(s.LOADED,e.Yai),e.Hai.addEventListener(s.MIDPOINT,e.Jai),e.Hai.addEventListener(s.STARTED,e.Zai),e.Hai.addEventListener(s.STREAM_INITIALIZED,e.$ai),e.Hai.addEventListener(s.THIRD_QUARTILE,e.tui),e.Hai.addEventListener(s.AD_BREAK_ENDED,e.iui),e}Pt(i,t);var n=i.prototype;return n.replaceAdTagParameters=function(t){return this.Hai.replaceAdTagParameters(null!=t?t:null)},n.Wai=function(t){return this.Hai.contentTimeForStreamTime(t)},n.qai=function(t){return this.Hai.streamTimeForContentTime(t)},n.KHt=function(t,i){var n=function(t){return"vod"===t.availabilityType?new f.google.ima.dai.api.VODStreamRequest(io({},a5(t),{contentSourceId:t.contentSourceID,videoId:t.videoID})):new f.google.ima.dai.api.LiveStreamRequest(io({},a5(t),{assetKey:t.assetKey}))}(t);t.enableNonce&&(n.enableNonce=!0),this.Hai.requestStream(n)},n.hr=function(){this.zai(!1),this.Hai.reset()},n.kn=function(){this.Vo();var t=google.ima.dai.api.StreamEvent.Type;this.Hai.removeEventListener(t.AD_BREAK_STARTED,this.Gai),this.Hai.removeEventListener(t.AD_PROGRESS,this.Xai),this.Hai.removeEventListener(t.CLICK,this.Q1t),this.Hai.removeEventListener(t.COMPLETE,this.jai),this.Hai.removeEventListener(t.CUEPOINTS_CHANGED,this.Qai),this.Hai.removeEventListener(t.ERROR,this.Ts),this.Hai.removeEventListener(t.FIRST_QUARTILE,this.Kai),this.Hai.removeEventListener(t.LOADED,this.Yai),this.Hai.removeEventListener(t.MIDPOINT,this.Jai),this.Hai.removeEventListener(t.STARTED,this.Zai),this.Hai.removeEventListener(t.STREAM_INITIALIZED,this.$ai),this.Hai.removeEventListener(t.THIRD_QUARTILE,this.tui),this.Hai.removeEventListener(t.AD_BREAK_ENDED,this.iui),this.hr(),this.eui&&Zi(this.eui)},n.sui=function(t){this.Hai.onTimedMetadata(t)},n.nui=function(t,i,n){this.Hai.processMetadata(t,i,n)},n.rui=function(t){var i=this.Hai.previousCuePointForStreamTime(t);if(i)return{RO:i.end,CO:i.start,pP:i.played}},n.hui=function(t,i){var n=this.rui(t);if(n){var r=t>i&&n.RO>i,e=n.RO>t&&n.CO<=t;return n.pP||!r&&!e?void 0:n.CO}},n.zai=function(t){this.T2t&&(this.T2t.style.display=t?"block":"none")},i}(uh);function a5(t){var i,n=google.ima.dai.api.StreamRequest.StreamFormat;return{apiKey:t.apiKey,authToken:t.authToken,format:"dash"===t.format?n.DASH:n.HLS,networkCode:t.networkCode,streamActivityMonitorId:t.streamActivityMonitorID,adTagParameters:t.adTagParameters,omidAccessModeRules:null!=(i=M1(t.omidAccessModeRules))?i:{}}}function c5(t){var i,n=t.getStreamData(),r=n.adProgressData;return r&&(i={P9t:r.adBreakDuration,oui:r.duration,I9t:r.adPosition,zx:r.currentTime,ct:r.duration,C9t:r.totalAds}),{aui:i,uui:(n.cuepoints||[]).map(function(t){return{CO:t.start,RO:t.end,pP:t.played}}),cui:n.errorMessage||void 0,dui:n.manifestFormat||void 0,lui:n.streamId||void 0,fui:(n.subtitles||[]).map(function(t){return{_ui:t.webvtt,gui:t.ttml,bs:t.language}}),Yu:n.url}}function f5(t){return{VYt:t.getAdSlotId(),G4t:t.getContent(),GT:t.getContentType(),Mi:t.getHeight(),Ti:t.getWidth()}}function v5(t){var i=t.getAd();if(i){var n=i.getAdPodInfo(),r=i.getCompanionAds().map(f5);return{fJt:i.getAdId(),v7t:{I9t:n.getAdPosition(),G0t:n.getMaxDuration(),Iri:n.getPodIndex(),qOt:n.getTimeOffset(),C9t:n.getTotalAds()},QKt:i.getAdSystem(),Rri:i.getAdvertiserName(),FYt:i.getApiFramework(),sYt:r,wYt:i.getCreativeId(),eti:i.getCreativeAdId(),Dri:i.getDealId(),_N:i.getDescription(),ct:i.getDuration(),gq:i.getTitle(),pui:i.getUniversalAdIdRegistry(),mui:i.getUniversalAdIdValue(),J7t:i.getVastMediaHeight(),Y7t:i.getVastMediaWidth(),X7t:i.getWrapperAdIds(),j7t:i.getWrapperAdSystems(),Q7t:i.getWrapperCreativeIds()}}}function d5(){var t=v.body.lastElementChild;if(j(t,HTMLIFrameElement)&&"Advertisement"===t.title)return t}V(),It(),Dt();var l5=function(t){function i(i){var n;return(n=t.call(this,i)||this).q4t=!0,n.Zb=i.X0t,n}return Pt(i,t),i}(_4);V(),It(),Bt(),Dt();var g5=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).wui=void 0,r.wui=n,r}Pt(i,t);var n=i.prototype;return n.a1t=function(){return this.wui.getAdSystem()},n.d1t=function(){return this.od.Khi.Syt},xt(i,[{key:"o",get:function(){return this.wui.getAdId()}},{key:"ct",get:function(){return this.wui.getDuration()}},{key:"KYt",get:function(){var t,i;return null==(i=this.wui)||null==(t=i.ad)?void 0:t.clickThroughUrl}},{key:"wYt",get:function(){return this.wui.getCreativeId()}},{key:"kJt",get:function(){return this.wui.getSkipTimeOffset()}}]),i}(_4),w5="urn:google:dai:2018",m5=function(t){function i(i,n,r,e,s,u,o,h){var a;return void 0===u&&(u={}),(a=t.call(this,i,n,e,s,u)||this).Hai=void 0,a.Pui=void 0,a.Sui=void 0,a.Lui=void 0,a.yui=void 0,a.bui=void 0,a.Eui=void 0,a.Dui=void 0,a.Aui=void 0,a.Fui=-1,a.Uui=void 0,a.Vui=void 0,a.Wn=function(t){var i=t.Ht;a.Bui(i)},a.Mui=function(t){t.PO.wn(Qw.QL,a.Hui)},a.Joi=function(t){t.PO.mn(Qw.QL,a.Hui)},a.Hui=function(t){var i,n;if(a.Pui)if((null==(i=a.Lui)?void 0:i.Km)===jw.ID3){var r,e=t.PO.U;if(Iy(e))if(a.Fui<=t.PO.CO&&a.Uui!==e.text)a.Fui=t.PO.CO,a.Uui=e.text,null==(r=a.Hai)||r.onTimedMetadata({TXXX:e.text})}else if((null==(n=a.Lui)?void 0:n.Km)===jw.EVENT_STREAM){var s,u,o=t.PO.U;null==(s=a.Hai)||s.onTimedMetadata(((u={})[w5]=o,u))}},a.Oui=function(t){switch(a.w1t&&(a.w1t.X0t=a.k5t.Nd()-a.k5t.Gx()),t.type){case google.ima.dai.api.StreamEvent.Type.ERROR:a.R5t.So(new X0(zJ.GENERAL));break;case google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED:if(a.ooi)break;a.Ed(),a.Vui=Vi.Og(a.Wui,250),a.Cui(a.loi);break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED:a.Vui&&Vi.Lg(a.Vui),a.ooi||a.Ed();break;case google.ima.dai.api.StreamEvent.Type.STARTED:var i,n=t.getAd();a.u1t=new g5(a.w1t,n),null==(i=a.ooi)||i.er({ad:a.u1t}),a.R5t.So(new gO(a.u1t,a.Yri(a.k5t.Gx())));break;case google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE:a.R5t.So(new f1(a.u1t,a.Yri(a.k5t.Gx())));break;case google.ima.dai.api.StreamEvent.Type.MIDPOINT:a.R5t.So(new d1(a.u1t,a.Yri(a.k5t.Gx())));break;case google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE:a.R5t.So(new g1(a.u1t,a.Yri(a.k5t.Gx())));break;case google.ima.dai.api.StreamEvent.Type.COMPLETE:a.R5t.So(new mO(a.u1t,a.Yri(a.k5t.Gx()))),a.u1t=void 0;break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED:if(!a.w1t)break;a.w1t.X0t>1.5&&a.Wui()}},a.Wui=function(){var t;a.u1t=new l5(a.w1t),null==(t=a.ooi)||t.er({ad:a.u1t}),a.R5t.So(new gO(a.u1t,a.Yri(a.k5t.Gx())))},a.Aui=r,a.Eui=o,a.Dui=h,a}Pt(i,t);var n=i.prototype;return n.Oai=function(){return!1},n.BW=function(t,i,n){return jt(function(){var n,r;return zt(this,function(e){if(!t||!i||t===this.yui&&i===this.bui)return[2];if(void 0===this.Hai){if(void 0===(null==(r=f.google)||null==(n=r.ima)?void 0:n.dai))throw new y("IMA DAI SDK missing for THEOads");this.Hai=new google.ima.dai.api.StreamManager(this.k5t.xe.querySelector("video"),this.Aui)}return this.yui=t,this.bui=i,this.Sui=this.Tui(),[2,this.Sui]})}).call(this)},n.Tui=function(){var t=this,i=this.Hai;if(!i)return ot.resolve();this.kui(i),i.reset();var n=new google.ima.dai.api.PodStreamRequest;n.networkCode=this.yui,n.customAssetKey=this.bui,n.adTagParameters=this.loi,this.Eui&&(n.streamActivityMonitorId=this.Eui),n.format="hls";var r=this.xui(i,[google.ima.dai.api.StreamEvent.Type.STREAM_INITIALIZED,google.ima.dai.api.StreamEvent.Type.ERROR]).then(function(n){if(n.type===google.ima.dai.api.StreamEvent.Type.ERROR)throw new y("DAI stream request failed");t.Pui=n.getStreamData(),t.Iui(i)});return i.requestStream(n),r},n.xui=function(t,i,n){return new ot(function(r,e){if(n&&n.Hg)return e(new wr);for(var s,u=function(t){h(),r(t)},o=function(){h(),e(new wr)},h=function(){for(var r,e=Ft(i);!(r=e()).done;){var s=r.value;t.removeEventListener(s,u)}n&&n.jg(o)},a=Ft(i);!(s=a()).done;){var c=s.value;t.addEventListener(c,u)}n&&n.Xg(o)})},n.doi=function(i){void 0===i&&(i={}),t.prototype.doi.call(this,i),this.Cui(this.loi)},n.Cui=function(t){var i;void 0===t&&(t={}),null==(i=this.Hai)||i.replaceAdTagParameters(t)},n.Rui=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return i=this,(null==(n=this.xoi)?void 0:n.ghi)&&!E(this.xoi.ghi)?[2,this.xoi.ghi]:this.Dui&&(null==(r=this.xoi)?void 0:r.Qvt)?[4,CT(function(){return i.Nui()},t,4,500,5e3)]:[2,void 0];case 1:return[2,e.sent()]}})}).call(this)},n.Nui=function(){return jt(function(){var t,i,n,r;return zt(this,function(e){switch(e.label){case 0:t=this.Dui+"/"+this.yui+"/"+this.bui+"/"+this.xoi.Qvt+".json",i=new Cl({Yu:t,fk:qd.BT,Hk:Tl.GET,Wk:1e3}),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.k5t.Dx.vk(i)];case 2:return n=e.sent(),[3,4];case 3:throw e.sent(),new WJ(zJ.NETWORK,qJ.UNKNOWN_AD_RESPONSE,"The ad's PodId could not be loaded.");case 4:if(!bl(n))throw new WJ(zJ.NETWORK,qJ.UNKNOWN_ERROR,"Something went wrong while requesting JSON from server.");return[4,n.lk()];case 5:return(r=e.sent())?[2,r.podid]:[2,void 0]}})}).call(this)},n.Fai=function(t,i,n,r){return void 0===r&&(r=!1),jt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,this.poi(t,i,n)];case 1:return e=s.sent(),[4,this.Eoi(e,t,n,void 0,r)];case 2:return s.sent(),[2]}})}).call(this)},n.poi=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f,v;return zt(this,function(d){switch(d.label){case 0:return this.xoi=t,e=t.Hhi,s=t.Whi,this._oi(t.Ihi),u=io({},this.loi,t.phi),this.Cui(u),[4,this.BW(e,s,n)];case 1:return d.sent(),o=Vi.Dh(t.Syt),h=Number(o.searchParams.get("d")),a=A.floor(1e3*A.min(h,t.ahi-i)),[4,this.Rui(n)];case 2:if(!(c=d.sent()))throw new y("Something went wrong with retrieving the PodID from the server.");return(null==(r=this.Pui)?void 0:r.streamId)?[3,4]:[4,this.Sui];case 3:d.sent(),d.label=4;case 4:return f=Vi.Dh("https://dai.google.com/linear/pods/v1/hls/network/"+this.yui+"/custom_asset/"+this.bui),"V2"===t.qhi?f.pathname+="/ad_break_id/"+c+".m3u8":f.pathname+="/pod/"+c+".m3u8",v=this.Pui.streamId,f.searchParams.set("stream_id",v),f.searchParams.set("pd",String(a)),[2,bE({sources:{src:f.toString()}})]}})}).call(this)},n.Soi=function(){var i=this;this.k5t.nt.NI.forEach(function(t){return i.Wn(new Bg(t))}),this.k5t.nt.wn(xg.rI,this.Wn),t.prototype.Soi.call(this)},n.koi=function(){t.prototype.koi.call(this),this.k5t.nt.mn(xg.rI,this.Wn)},n.Bui=function(t){if(t.Lt===uy.zU&&!(t.Km!==jw.ID3&&t.Km!==jw.EVENT_STREAM||t.Km===jw.EVENT_STREAM&&t.eC!==w5)){if(t.wn(Fg.uI,this.Mui),t.wn(Fg.dI,this.Joi),t.L)for(var i,n=Ft(t.L.NI);!(i=n()).done;){var r=i.value;this.Mui(new sD(r))}t.Qk=Jp.iC,this.Lui=t}},n.Iui=function(t){t&&(t.addEventListener(google.ima.dai.api.StreamEvent.Type.ERROR,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.CLICK,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.STARTED,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.MIDPOINT,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.COMPLETE,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,this.Oui),t.addEventListener(google.ima.dai.api.StreamEvent.Type.RESUMED,this.Oui))},n.kui=function(t){t&&(t.removeEventListener(google.ima.dai.api.StreamEvent.Type.ERROR,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.CLICK,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.STARTED,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.MIDPOINT,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.COMPLETE,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_PERIOD_STARTED,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,this.Oui),t.removeEventListener(google.ima.dai.api.StreamEvent.Type.RESUMED,this.Oui))},n.Ed=function(){this.ooi=this.xoi,this.xoi=void 0,this.w1t=this.y5t(this.ooi),this.w1t?this.R5t.So(new dO(this.w1t)):Vi.dm("Started an ad break without having a current adbreak to our knowledge")},n.Bd=function(i){t.prototype.Bd.call(this,i),this.Fui=-1,this.Uui=void 0},n.hr=function(){var i=this;return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return e.sent(),this.kui(this.Hai),null==(n=this.Hai)||n.reset(),this.Hai=void 0,this.Pui=void 0,this.Sui=void 0,this.Eui=void 0,this.bui=void 0,this.yui=void 0,this.voi=!0,this.Fui=-1,this.Uui=void 0,void 0!==(r=d5())&&Zi(r),[2]}})}).call(this)},n.kn=function(){var i=this;return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return[4,t.prototype.kn.call(i)];case 1:return r.sent(),null==(n=this.Lui)||n.kn(),[2]}})}).call(this)},xt(i,[{key:"Vhi",get:function(){return I4.GOOGLE}}]),i}(R4);V(),It(),Wt(),Dt(),Yt();var p5=function(t){function i(i){return t.call(this,i)||this}Pt(i,t);var n=i.prototype;return n.qui=function(){},n.Eoi=function(t,i,n,r){return jt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,this.oa.Ta(t,r)];case 1:return e.sent(),this.zui(this.oa,i,n),[2]}})}).call(this)},n.zui=function(t,i,n){i&&t.Xx(i),n&&t.QP()},n.Gui=function(t){},i}(N0);V(),It(),Wt(),Bt(),Dt(),Yt(),Et();var y5=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).ePt=0,i.Toi=function(t){i.Bd(i.Yri(t.currentTime))},i}Pt(i,t);var n=i.prototype;return n.Oai=function(){return!0},n.BW=function(t,i,n){return ot.resolve()},n.Fai=function(t,i,n,r){return void 0===r&&(r=!1),this.xoi=t,this.yoi(t,i),ot.resolve()},n.Eoi=function(t,i,n,r,e){return jt(function(){return zt(this,function(t){return[2,ot.resolve()]})})()},n.poi=function(t,i,n){return jt(function(){return zt(this,function(i){return this.xoi=t,[2,bE({sources:{src:t.Syt}})]})}).call(this)},n.uoi=function(t){this.ePt=t-this.k5t.Gx(),this.U9t(t)},n.bd=function(t){if(this.ooi){var i=this.Yri(t.currentTime);this.ooi.dhi(i),this.ooi.pP&&this.Bd(i)}else Vi.um("Got timeupdate without a current interstitial")},n.Yri=function(t){return this.ePt+t},xt(i,[{key:"Vhi",get:function(){return I4.COMPANION}}]),i}(R4);V(),It(),Wt(),Dt(),Yt(),V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),Et(),V(),It(),Bt(),Dt();var _5=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).Xui=void 0,r.Xui=n,r}Pt(i,t);var n=i.prototype;return n.a1t=function(){return this.Xui.QKt},n.d1t=function(){return this.od.Khi.Syt},xt(i,[{key:"o",get:function(){return this.Xui.fJt}},{key:"ct",get:function(){return this.Xui.ct}},{key:"KYt",get:function(){}},{key:"wYt",get:function(){return this.Xui.wYt}},{key:"kJt",get:function(){return this.Xui.tti}}]),i}(_4),k5=function(t){function i(i,n,r,e,s,u){var o,h;void 0===u&&(u={}),o=t.call(this,n,r,e,s,u)||this,(h=o).Nti=void 0,h.rci=void 0,h.dnt=void 0,h.uci=0,h.M9t=function(t){return jt(function(){var i;return zt(this,function(n){return h.R5t.So(new X0(zJ.GENERAL,null==(i=t.J9t.D7t)?void 0:i.Iy)),[2]})})()},h.Kui=function(){h.L9t()},h.Yui=function(){h.O9t()},h.F9t=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,h.O9t()];case 1:return t.sent(),[2]}})})()},h.Jui=function(t){var i=t.jnt;i&&h.w1t&&(h.u1t=new _5(h.w1t,i),h.aci())},h.Zui=function(){h.R5t.So(new f1(h.u1t,h.Yri(h.k5t.Gx())))},h.$ui=function(){h.R5t.So(new d1(h.u1t,h.Yri(h.k5t.Gx())))},h.tci=function(){h.R5t.So(new g1(h.u1t,h.Yri(h.k5t.Gx())))},h.ici=function(){h.cci()},h.eci=function(){h.k5t.So(new bT(h.Yri(h.k5t.Gx()))),h.k5t.So(new Gy(h.Yri(h.k5t.Gx())))},h.sci=function(){h.k5t.So(new kT(h.Yri(h.k5t.Gx())))},h.nci=function(){h.Xai()},h.hci=function(){h.xoi?(h.ooi=h.xoi,h.xoi=void 0,h.w1t=h.y5t(h.ooi),h.R5t.So(new dO(h.w1t))):Vi.um("Started an ad break without having a current ad break to our knowledge")},h.Toi=function(t){h.Bd(h.Yri(t.currentTime))},h.dnt=i,h.rci=t2(h.k5t.Cd)?h.k5t.zP():void 0;var a=new F3(h.rci,h.k5t.xe),c=new z3(a,h.k5t.Wu),f=new X3(h.k5t);return h.Nti=new i2(a,f,c),o}Pt(i,t);var n=i.prototype;return n.BW=function(t,i,n){return ot.resolve()},n.QP=function(){this.hoi&&this.Nti.kti()},n.jP=function(){this.hoi&&this.Nti.jP()},n.coi=function(t){this.hoi&&this.Nti.UP(t)},n.Fai=function(t,i,n,r){return void 0===r&&(r=!1),jt(function(){return zt(this,function(i){return this.xoi=t,[2,this.jui(t)]})}).call(this)},n.jui=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return i=this.u6t(this.Qui(t)),n={Yti:void 0,Jti:void 0,Zti:!0,z9:void 0,$ti:void 0,tii:void 0},[4,this.Nti.r8t(i,n)];case 1:return e.sent(),this.Nti.xti()||(r=this.dnt.oP?0:this.dnt.OP,this.Nti.UP(r)),[2]}})}).call(this)},n.u6t=function(t){return{f6t:this.k5t.xe.offsetWidth,v6t:this.k5t.xe.offsetHeight,_6t:this.k5t.xe.offsetWidth,g6t:this.k5t.xe.offsetHeight,p6t:!0,m6t:this.dnt.oP,w6t:t,y6t:void 0,b6t:void 0,A6t:0}},n.poi=function(t,i,n){return jt(function(){return zt(this,function(i){return this.xoi=t,[2,bE({ads:[{integration:"google-ima",sources:this.Qui(t)}]})]})}).call(this)},n.Qui=function(t){var i=new URL(t.Syt),n=i.searchParams;this._oi(t.Ihi);for(var r,e=io({},this.loi,t.phi),s=Ft(b.keys(e));!(r=s()).done;){var u=r.value;n.set(u,e[u])}return i.toString()},n.Soi=function(){t.prototype.Soi.call(this);var i=this.Nti.j0t;null==i||i.wn(C1.U8t,this.M9t),null==i||i.wn(R1._8t,this.Kui),null==i||i.wn(R1.v8t,this.Yui),null==i||i.wn(R1.D8t,this.F9t),null==i||i.wn(R1.m8t,this.Jui),null==i||i.wn(R1.S8t,this.Zui),null==i||i.wn(R1.XJt,this.$ui),null==i||i.wn(R1.T8t,this.tci),null==i||i.wn(R1.jJt,this.ici),null==i||i.wn(R1.y8t,this.eci),null==i||i.wn(R1.Yz,this.sci),null==i||i.wn(R1.b8t,this.nci)},n.koi=function(){var i=this.Nti.j0t;null==i||i.mn(C1.U8t,this.M9t),null==i||i.mn(R1._8t,this.Kui),null==i||i.mn(R1.v8t,this.Yui),null==i||i.mn(R1.D8t,this.F9t),null==i||i.mn(R1.m8t,this.Jui),null==i||i.mn(R1.S8t,this.Zui),null==i||i.mn(R1.XJt,this.$ui),null==i||i.mn(R1.T8t,this.tci),null==i||i.mn(R1.jJt,this.ici),null==i||i.mn(R1.y8t,this.eci),null==i||i.mn(R1.Yz,this.sci),null==i||i.mn(R1.b8t,this.nci),t.prototype.koi.call(this)},n.L9t=function(){if(this.rci&&(this.rci.style.display="block"),!this.hoi){var t=this.dnt.oP?0:this.dnt.OP;this.Nti.UP(t)}this.hci()},n.O9t=function(){return jt(function(){return zt(this,function(t){return this.w1t?(this.Bd(this.Yri(this.w1t.G0t)),[2]):[2]})}).call(this)},n.aci=function(){var t,i;null==(t=this.ooi)||t.er({ad:this.u1t}),this.uci=this.Yri(null==(i=this.k5t)?void 0:i.Gx()),this.R5t.So(new gO(this.u1t,this.uci))},n.cci=function(){var t=this.uci+this.u1t.ct;this.R5t.So(new mO(this.u1t,t)),this.u1t=void 0},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return n.sent(),this.Nti.kn(),this.uci=0,[2]}})}).call(this)},xt(i,[{key:"Vhi",get:function(){return I4.CSAI}}]),i}(R4),b5=function(t){function i(i,n,r,e,s,u){var o;return void 0===u&&(u={}),(o=t.call(this,i,n,r,e,s,u)||this).dci=function(){o.ooi||o.Nti.Tti()},o.k5t.wn(ch.uo,o.dci),o}Pt(i,t);var n=i.prototype;return n.Oai=function(){return!1},n.Xai=function(){var t=this.Nti.I7t();if(this.w1t&&void 0!==t){var i=this.w1t.G0t-t;this.k5t.Xx(i);var n=this.k5t.ihi?new Date(this.k5t.ihi.getTime()+1e3*i):void 0;this.k5t.So(new Rg(i,n))}},n.hr=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.hr.call(i)];case 1:return n.sent(),this.k5t.mn(ch.uo,this.dci),[2]}})}).call(this)},i}(k5);V(),It(),Wt(),Dt(),Yt();var A5=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).lci=void 0,i.fci=void 0,i}Pt(i,t);var n=i.prototype;return n.Oai=function(){return!0},n.Eoi=function(t,i,n,r,e){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.Fai(i,this.dnt.Gx(),n)];case 1:return t.sent(),this.Nti.Tti(),[2]}})}).call(this)},n.Xai=function(){var t=this.Nti.I7t();if(this.w1t&&void 0!==t){var i,n=null!=(i=this.lci)?i:0;n+=this.w1t.G0t-t,this.dnt.Xx(n);var r=this.fci?new Date(this.fci.getTime()+1e3*n):void 0;this.dnt.So(new Rg(n,r))}},n.L9t=function(){t.prototype.L9t.call(this),this.lci=this.dnt.Gx(),this.fci=this.dnt.Vx,this.dnt.jP()},n.O9t=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,t.prototype.O9t.call(i)];case 1:return n.sent(),this.dnt.QP(),[2]}})}).call(this)},n.Yri=function(t){return t},i}(k5),T5=function(t){function i(i){var n,r,e;return n=t.call(this,i)||this,(r=n).dnt=void 0,r.Eci=void 0,r.Ls=void 0,r.kci=void 0,r.Aui=void 0,r.nq=void 0,r.Wz=void 0,r.pci=void 0,r.bci=void 0,r.gci=void 0,r.Eai=void 0,r.Pci=void 0,r.loi=void 0,r.Wci=void 0,r.Ici=void 0,r.Gci=void 0,r.sdi=void 0,r.Xci=void 0,r.Oci=void 0,r.qci=void 0,r._ci=void 0,r.Bai=void 0,r.vci=void 0,r.Yci=ro(),r.adi=!0,r.udi=NaN,r.Qci=NaN,r.jci=NaN,r.cdi=void 0,r.odi=!1,r.ldi=!0,r.YG=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return r.dnt.mn(Fy.PM,r.YG),r.pci?r.pci.initializationDelay?(r.cdi=Vi.Og(function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return r.pci?[4,r.Sci(r.pci)]:[2];case 1:return t.sent(),[2]}})})()},1e3*r.pci.initializationDelay),[3,3]):[3,1]:[2];case 1:return[4,r.Sci(r.pci)];case 2:t.sent(),t.label=3;case 3:return[2]}})})()},r.Kq=function(){r.dnt.mn(Fy.EM,r.Kq),r._ci.Ooi(r.oa.nt)},r.mci=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),[4,r.rnt.Fj([PE.THEOADS])];case 1:return i.sent(),[3,4];case 2:return t=i.sent(),[4,r.KP().catch(pn)];case 3:return i.sent(),r.Qq(kd(t,pd.LICENSE_INVALID_FEATURE)),[3,4];case 4:return[2]}})})()},r.Att=function(t){M0(r.Eci,r.oa.MP,r.oa.DP,t.width,t.height)},r.rjt=function(){M0(r.Eci,r.oa.MP,r.oa.DP,r.Wu.Eu,r.Wu.Iu)},r.Cci=function(){r.Jci(r.Gx()),r.Zci()},r.JG=function(){r.Jci(r.Gx()),r.Zci()},r.Nci=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return r.rdi()?r.Xci?[2]:(r.Xci=r.Gci,[4,r.Xci]):[3,2];case 1:return t.sent(),r.Lci(function(){return r.Hci()}),[3,3];case 2:r.Lci(function(){return r.I3t()}),t.label=3;case 3:return[2]}})})()},r.Bci=function(t){return r.Fci(r.Wci,"Error playing the current adbreak: "+t.error),r.Lci(function(){return r.I3t()})},r.Kci=function(t){r.gci.So(t.Ca)},r.dnt=new p5(i),r.Ls=i.xe,r.Eci=function(){var t=v.createElement("div");return hn(t,"theo-ads-sgai-container"),t}(),r.kci=function(){var t=v.createElement("div");return hn(t,"theo-ads-sgai-content-player"),t}(),r.gci=new F4(r),r.Pci=new U4,null==(e=r.dnt.Jc)||e.znt(r.Pci),r.Bai=new A4(i.Dx),r._ci=new x4(r),r.vci=new V4(r.dnt,r.kci,r.Bai),n}Pt(i,t);var n=i.prototype;return n._nt=function(){return this.dnt.Jc},n.ynt=function(){return this.gci.Ca},n.jx=function(){return this.Ls},n.vnt=function(){return this.dnt.Kst},n.Yx=function(){var i;return null!=(i=this.Wz)?i:t.prototype.Yx.call(this)},n.Zx=function(){var i;return null!=(i=this.nq)?i:t.prototype.Zx.call(this)},n.GP=function(){this.dnt.GP()},n.lai=function(t){return t},n.QP=function(){var i;t.prototype.QP.call(this),null==(i=this.Eai)||i.QP()},n.jP=function(){var i;t.prototype.jP.call(this),null==(i=this.Eai)||i.jP()},n.UP=function(i){var n;t.prototype.UP.call(this,i),null==(n=this.Eai)||n.coi(i)},n.uP=function(i){var n;t.prototype.uP.call(this,i);var r=i?0:this.oa.OP;null==(n=this.Eai)||n.coi(r)},n.Ta=function(i,n){var r=this;return jt(function(){var e;return zt(this,function(s){switch(s.label){case 0:return[4,this.Xpt()];case 1:return s.sent(),[4,t.prototype.Ta.call(r,i,n)];case 2:return s.sent(),void 0===i||void 0===i.ads?[2]:void 0===(e=Wn(i.ads,F0))?[2]:(this.mci(),this.wci(),this.yci(),this.pci=e,this.bci=e.backdropLShape,this.vci.phi=e.adTagParameters,this._ci.vai=function(t){switch(t){case"single":return n4.SINGLE;case"l-shape":return n4.LSHAPE_AD;case"double":return n4.DOUBLE;case"single-if-mobile":return Oi.Ks?n4.SINGLE:void 0;default:return}}(this.pci.overrideLayout),this._ci.Woi=this.pci.useId3,this.dnt.wn(Fy.EM,this.Kq),this.Wu.wn(AI.yn,this.Att),this.wn(ch.Jw,this.rjt),[4,this.Aci(I4.DEFAULT,void 0,void 0)]);case 3:return s.sent(),this.dnt.wn(Fy.PM,this.YG),[2]}})}).call(this)},n.Sci=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.Tci(),i=void 0===t.networkCode||void 0===t.customAssetKey?I4.DEFAULT:I4.GOOGLE,[4,this.Aci(i,t.networkCode,t.customAssetKey)];case 1:return n.sent(),t.sseEndpoint&&this._ci.Doi(t.sseEndpoint),[2]}})}).call(this)},n.wci=function(){nn(this.Ls,this.kci),ln(this.Eci),ln(this.kci),this.Eci.appendChild(this.kci),this.Ls.appendChild(this.Eci)},n.xci=function(){nn(this.kci,this.Ls),gn(this.kci),gn(this.Eci),Zi(this.kci),Zi(this.Eci)},n.Aci=function(t,i,n){return jt(function(){var r,e,s,u,o,h,a,c,f,v;return zt(this,function(d){switch(d.label){case 0:return u=this.t4t(),o=this.Aui,u&&o?t===(null==(r=this.Eai)?void 0:r.Vhi)?[2]:(a=null!=(h=null==(e=this.Eai)?void 0:e.K0t)?h:[],[4,null==(s=this.Eai)?void 0:s.hr()]):[2];case 1:switch(d.sent(),t){case I4.GOOGLE:return[3,2];case I4.COMPANION:return[3,4];case I4.CSAI:return[3,5];case I4.DEFAULT:return[3,6]}return[3,6];case 2:return this.Eai=new m5(u,this.Pci,o,a,this.Bai,this.phi,null==(c=this.pci)?void 0:c.streamActivityMonitorId,null==(f=this.pci)?void 0:f.retrievePodIdURI),[4,null==(v=this.Eai)?void 0:v.BW(i,n)];case 3:return d.sent(),[3,7];case 4:return this.Eai=new y5(this.dnt,this.Pci,a,this.Bai,this.phi),[3,7];case 5:return u===this.dnt?(this.Eai=new A5(this.dnt,u,this.Pci,a,this.Bai,this.phi),[3,7]):(this.Eai=new b5(this.dnt,u,this.Pci,a,this.Bai,this.phi),[3,7]);case 6:this.Eai=new X4(u,this.Pci,a,this.Bai,this.phi),d.label=7;case 7:return[2]}})}).call(this)},n.eai=function(t,i){return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this.Ici||void 0===t||void 0===i?[2]:(null==(n=this.Eai)?void 0:n.Vhi)===I4.GOOGLE?[3,2]:[4,this.Aci(I4.GOOGLE,t,i)];case 1:r.sent(),r.label=2;case 2:return[2]}})}).call(this)},n.Qq=function(t){void 0===this.Zx()&&(this.nq=t,this.Wz=pw(t),this.So(new Cb(t)))},n.Tci=function(){this.dnt.wn(ch.py,this.Cci),this.dnt.wn(ch.$w,this.JG)},n.Rci=function(){this.dnt.mn(ch.py,this.Cci),this.dnt.mn(ch.$w,this.JG)},n.Dci=function(){var t,i;this.Pci.u4t.wn("Knt",this.Nci),null==(t=this.Eai)||t.wn(E4.AD_ENDED,this.Nci),null==(i=this.t4t())||i.wn(ty.ma,this.Bci)},n.Mci=function(){var t,i;this.Pci.u4t.mn("Knt",this.Nci),null==(t=this.Eai)||t.wn(E4.AD_ENDED,this.Nci),null==(i=this.t4t())||i.mn(ty.ma,this.Bci)},n.Lci=function(t){var i=this,n=function(){i.Oci=void 0};this.Oci=t().then(n).catch(n)},n.Fci=function(t,i){this.gci.So(new z4(t,i).Ca),t.pP=!0,S5(t)&&this.Oci&&(this.Ici=void 0)},n.Uci=function(){return jt(function(){var t;return zt(this,function(i){return null==(t=this.Eai)||t.Soi(),this.Vci(),[2]})}).call(this)},n.Hci=function(){return jt(function(){var t,i,n,r;return zt(this,function(e){switch(e.label){case 0:return this.Aoi(this.Wci),void 0===(i=this.Ici)?[2,this.I3t()]:i.Ihi===n4.LSHAPE_CONTENT?[3,2]:[4,null==(n=this.t4t())?void 0:n.Ta(this.qci,(new dr).Yg)];case 1:e.sent(),null==(r=this.t4t())||r.QP(),e.label=2;case 2:return null==(t=this.Eai)||t.uoi(this.Gx()),this.gci.So(new v4(i).Ca),this.Vci(),[2]}})}).call(this)},n.I3t=function(){return jt(function(){var t;return zt(this,function(i){return this.zci(),null==(t=this.Eai)||t.koi(),this.Aoi(this.Wci),this.Wci=void 0,[2]})}).call(this)},n.Vci=function(){this.zci(),this.Wci=this.Ici,this.Ici=void 0,this.Gci=void 0,this.Xci=void 0},n.zci=function(){var t=this.oa.DP,i=this.oa.MP;t===this.jci&&i===this.Qci||(this.jci=t,this.Qci=i,this.So(new My))},n.boi=function(t){var i;S5(t)&&(null==(i=this.Eai)||i.boi(t),this.pai(this.Gx()));t.wn("ohi",this.Kci),this.gci.So(new j4(t.Ont()))},n.Aoi=function(t){if(Jn(this._ci.Coi,t)){var i;if(this._ci.Aoi(t),S5(t))null==(i=this.Eai)||i.Aoi(t);else E5(t)&&(this.vci.Dai(t),this.Yci.delete(t.o));t.mn("ohi",this.Kci),this.gci.So(new H4(t).Ca)}},n.pai=function(t){this.Jci(t),this.Zci()},n.Jci=function(t){this.$ci(t),this.tdi(t),this.idi(t)},n.$ci=function(t){if(void 0===this.Oci){for(var i,n,r=[],e=Ft(this._ci.Coi.filter(S5));!(n=e()).done;){var s=n.value;s.pP?r.push(s):s!==this.Wci&&(t>=s.CO+5||this.Wci&&s.CO+5=t.CO);var s=t.ahi,u=i>=t.CO&&(void 0===s||i=this.Ici.CO&&(void 0===r||t=e||i.pP)return"continue";var u=i.CO,o=i.CO+i.ct;r>=u&&r<=o&&!t.Yci.has(i.o)&&t.Pai(i).catch(function(){n.Fci(i,"Could not load the overlay."),n.Aoi(i)})},n=this,r=this.Gx(),e=[];this.Yci.forEach(function(t){r>=t.CO&&(void 0===t.ahi||r0&&(n.vdi-=n.dnt.Gx())},n.Dxt=nW.Bg,n.ydi=new B3(Vi.Dx),n}Pt(i,t);var n=i.prototype;return n.Nd=function(){var i;return null!=(i=this.Zb)?i:t.prototype.Nd.call(this)},n.nu=function(){var i;return null!=(i=this.Ac)?i:t.prototype.nu.call(this)},n.Gx=function(){return this.lai(t.prototype.Gx.call(this))},n.Hx=function(){return this.fdi?new Date(this.fdi.getTime()+we(this.dnt.Gx())):t.prototype.Hx.call(this)},n.Ux=function(){var i=t.prototype.Ux.call(this);return LA.jn(i).Ly(this.vdi)._s()},n.EP=function(){var i=t.prototype.EP.call(this);return LA.jn(i).Ly(this.vdi)._s()},n.lai=function(t){return t+this.vdi},n.Ta=function(i,n){var r=this;return jt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Ta.call(r,i,n)];case 1:return e.sent(),this.pci?(this.Ac=i,this._di=new a4(this.dnt),this._di.gr(this.kci,this.Eci),this.nO(this._di),[2]):[2]}})}).call(this)},n.yci=function(){},n.wci=function(){t.prototype.wci.call(this),this.Aui=x0(this.Eci)},n.Tci=function(){t.prototype.Tci.call(this),this.gdi()},n.Rci=function(){t.prototype.Rci.call(this),this.pdi()},n.gdi=function(){this.dnt.wn(ch.Cw,this.ejt),this.dnt.wn(Fy.PM,this.VV)},n.pdi=function(){this.dnt.mn(ch.Cw,this.ejt),this.dnt.mn(Fy.PM,this.VV)},n.t4t=function(){return this.dnt},n.Xx=function(i,n){this.mdi=!0,t.prototype.Xx.call(this,i,n)},n.QP=function(){t.prototype.QP.call(this),this.So(new bT(this.Gx())),this.ldi=!0,this.wdi=!1},n.jP=function(){this.wdi=!0,t.prototype.jP.call(this)},n.hdi=function(t,i,n){return jt(function(){var r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:return s=this,[4,null==(r=this.Eai)?void 0:r.poi(t,i,n)];case 1:return s.l$t=h.sent(),(null==(e=this.Eai)?void 0:e.Oai())?[2]:(u=new I3(this.Dxt,this.ydi),o=new B2(this.Dxt.Mxt,u,"temporary"),this.bdi=o.asi(this.l$t,R3({amount:30,bandwidth:Nb.Bg.pW()||this.Kst.jY}),"temporary"),this.Adi.Zg(),this.Adi=new dr,this.ydi.jet(this.bdi,this.Dxt,"temporary").mi(this.Adi.Yg).catch(pn),[2])}})}).call(this)},n.Sdi=function(t,i){switch(t){case n4.LSHAPE_CONTENT:case n4.LSHAPE_AD:return new f4(this.dnt,i);case n4.SINGLE:default:return new c4(this.dnt)}},n.Tdi=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return null==(i=this.sdi)||i.Zg(),this.sdi=new dr,[4,this.Aci(t.Vhi,t.Hhi,t.Whi)];case 1:return o.sent(),null==(n=this._di)||n.mr(this.kci),(null==(r=this.Eai)?void 0:r.Oai())||(this.odi=!0,this.vdi=this.Gx(),this.fdi=this.Hx(),this.dnt.wn(Fy.PM,this.VV)),this.gci.So(new v4(t).Ca),[4,null==(e=this.Eai)?void 0:e.Eoi(this.l$t,t,this.sdi.Yg,void 0,!0)];case 2:return o.sent(),this._di=this.Sdi(t.Ihi,null!=(u=t.Chi)?u:this.bci),this.B3t(this._di),this._di.gr(this.kci,this.Eci),null==(s=this.Eai)||s.uoi(this.Gx()),[2]}})}).call(this)},n.Uci=function(){var i=this;return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return void 0===this.Ici||void 0===this.l$t?[2]:(this.pdi(),this.Rz=this.vP,[4,this.Tdi(this.Ici)]);case 1:return r.sent(),this.Dci(),(null==(n=this.Eai)?void 0:n.Oai())||(this.kdi=!1),[2,t.prototype.Uci.call(i)]}})}).call(this)},n.Hci=function(){var i=this;return jt(function(){var n;return zt(this,function(r){return(null==(n=this.Eai)?void 0:n.Vhi)!==I4.COMPANION&&(this.odi=!0,this.ehi=!1,this.vdi=this.Gx(),this.fdi=this.Hx(),this._ci.Voi(this.dnt.nt),this.dnt.wn(Fy.kM,this.Edi),this.dnt.wn(Fy.EM,this.Kq),this.dnt.wn(Fy.PM,this.VV)),[2,t.prototype.Hci.call(i)]})}).call(this)},n.I3t=function(){var i=this;return jt(function(){var n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return this.Wci?(null==(n=this.bdi)||n.pS(),this.bdi=void 0,this.Mci(),(null==(r=this.Eai)?void 0:r.Oai())?[3,2]:(this.odi=!0,this.ehi=!1,this.vdi=this.Gx(),this.fdi=this.Hx(),this._ci.Voi(this.dnt.nt),this.dnt.wn(Fy.kM,this.Edi),this.dnt.wn(Fy.EM,this.Kq),this.dnt.wn(Fy.PM,this.VV),[4,this.dnt.Ta(this.Ac,(new dr).Yg)])):[2];case 1:o.sent(),o.label=2;case 2:return null==(e=this._di)||e.mr(this.kci),this._di=new a4(this.dnt),this._di.gr(this.kci,this.Eci),this.B3t(this._di),(null==(s=this.Eai)?void 0:s.Oai())||(this.vP=null!=(u=this.Rz)?u:1,this.dnt.QP()),this.kdi=!0,this.gdi(),[2,t.prototype.I3t.call(i)]}})}).call(this)},n.Xpt=function(){var i=this;return jt(function(){var n;return zt(this,function(r){switch(r.label){case 0:return this._di=void 0,this.Zb=void 0,this.vdi=0,this.l$t=void 0,this.Rz=void 0,this.fdi=void 0,this.kdi=!0,this.odi=!1,this.ldi=!0,this.wdi=!0,this.Adi.Zg(),this.Adi=new dr,null==(n=this.bdi)||n.pS(),this.bdi=void 0,this.dnt.mn(Fy.kM,this.Edi),[4,t.prototype.Xpt.call(i)];case 1:return r.sent(),[2]}})}).call(this)},n.ddi=function(){return t.prototype.ddi.call(this)||this.odi&&!this.mdi},n.eI=function(i){if(void 0!==this._di)switch(i.type){case ch.uo:return!0;case ch.jw:return!this.wdi||(this.wdi=!1,this.So(new kT(this.lai(i.currentTime))),!0);case Fy.PM:return!this.ldi||(this.ldi=!1,this.So(new Gy(this.lai(i.currentTime))),!0);case Fy.xM:return this.odi||(this.ldi=!0,this.So(new zy(this.lai(i.currentTime)))),!0;case ch.Zw:return this.ddi()||(this.mdi=!1,this.So(new IT(this.lai(i.currentTime)))),!0;case ch.$w:return this.ddi()||this.So(new ET(this.lai(i.currentTime))),!0;case ch.Nw:return!this.kdi||(this.So(new ST(this.lai(i.currentTime))),!0);case ch.py:return this.So(new Rg(this.lai(i.currentTime),i.currentProgramDateTime)),!0;case ch.Qw:return this.So(new hC(this.lai(i.currentTime))),!0;case ch.Kw:return this.So(new TT(this.lai(i.currentTime),i.playbackRate)),!0;case ch.wy:return this.ehi?(this.So(new RT(this.lai(i.currentTime),i.volume)),!0):(this.ehi=!0,!0);case ch.Rw:return this.So(new _T(this.lai(i.currentTime),i.readyState)),!0;case Fy.SM:return this.So(new qy(this.lai(i.currentTime),i.readyState)),!0;case Fy.TM:return this.So(new Xy(this.lai(i.currentTime),i.readyState)),!0;case Fy.kM:return this.So(new Wy(this.lai(i.currentTime),i.readyState)),!0;case Fy.EM:return this.So(new Hy(this.lai(i.currentTime),i.readyState)),!0;case Fy.AI:return this.So(new Vy(this.lai(i.currentTime),i.readyState)),!0;case ch.Dw:return this.So(new Fj(this.lai(i.currentTime),i.initDataType,i.initData)),!0}return t.prototype.eI.call(this,i)},i}(T5);V(),It(),Wt(),Bt(),Dt(),Yt();var R5=function(t){function i(i,n){var r;return(r=t.call(this,n)||this).dnt=void 0,r.k5t=void 0,r.Ndi=void 0,r.Ldi=void 0,r.Mdi=void 0,r.Bdi=void 0,r.Vdi=void 0,r.xdi=0,r.Pdi=void 0,r.Idi=0,r.pGt=void 0,r.Cdi=void 0,r.qdi=0,r.Ddi=0,r.zdi=function(){if(r.dnt.mn(Fy.EM,r.zdi),r.Pdi){var t=r.Pdi;t.setSeconds(r.Pdi.getSeconds()+r.qdi),r.dnt.Vx=t,r.Pdi=void 0}r.Idi-=r.dnt.Gx(),r.pGt=void 0,r.Cdi=void 0},r.HV=function(){r.k5t.QP()},r.WV=function(){r.k5t.jP()},r.dnt=i,r.k5t=n,r}Pt(i,t);var n=i.prototype;return n.Eoi=function(t,i,n,r){return this.k5t.Eoi(t,i,n,r)},n.Rdi=function(t,i,n,r){var e,s;this.xdi=t,r?this.Ddi=0:this.Ddi+=n,this.Pdi=i,null==(s=this.Pdi)||s.setSeconds((null==(e=this.Pdi)?void 0:e.getSeconds())+this.Ddi)},n.rhi=function(){var t;if(void 0===this.Ndi){this.pGt=void 0,this.Cdi=void 0;var i=this.Bdi;this.Bdi=void 0,null==(t=this.Mdi)||t.Zg(),N5(this.dnt)&&(this.Ldi=new dr,this.Ndi=br(this.Odi(i,this.Ldi.Yg),this.Ldi).catch(_r))}},n.hhi=function(){var t;this.pGt=this.xdi+this.oa.Gx(),this.ihi&&(this.Cdi=new Date(this.ihi.getTime()+1e3*this.oa.Gx()));var i=this.Ndi;this.Ndi=void 0,null==(t=this.Ldi)||t.Zg(),this.Mdi=new dr,this.Bdi=br(this.Fdi(i,this.Mdi.Yg),this.Mdi).catch(_r)},n.Aa=function(){return this.dnt.Sq},n.Udi=function(){this.Vdi||(this.Vdi={source:this.dnt.nu(),duration:this.dnt.Nd(),currentTime:this.dnt.Gx(),preload:this.dnt.wP,autoplay:this.dnt.vO,playbackRate:this.dnt.vP})},n.Hdi=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:return this.dnt.wP=uS.HL,this.dnt.vO=!1,this.k5t.oP=!0,i=this.k5t.nu(),[4,this.dnt.Ta(i,t)];case 1:return n.sent(),this.dnt.Xx(this.k5t.Gx()),this.dnt.wn(ch.uo,this.HV),this.dnt.wn(ch.jw,this.WV),[2]}})}).call(this)},n.Wdi=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return this.Vdi?(this.dnt.wP=this.Vdi.preload,this.dnt.vO=this.Vdi.autoplay,this.dnt.vP=this.Vdi.playbackRate,[4,this.dnt.Ta(this.Vdi.source,t)]):[2];case 1:return i.sent(),this.Vdi=void 0,[2]}})}).call(this)},n.Odi=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,null==t?void 0:t.catch(pn)];case 1:return n.sent(),this.Udi(),[4,this.dnt.KP()];case 2:return n.sent(),[4,this.Hdi(i)];case 3:return n.sent(),this.B3t(this.dnt),this.dnt.QP(),[2]}})}).call(this)},n.Fdi=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,null==t?void 0:t.catch(pn)];case 1:return n.sent(),this.qdi=this.k5t.Gx(),this.Idi=this.qdi+this.Zri,[4,this.dnt.KP()];case 2:return n.sent(),this.dnt.mn(ch.uo,this.HV),this.dnt.mn(ch.jw,this.WV),[4,this.Wdi(i)];case 3:return n.sent(),this.B3t(this.k5t),this.dnt.wn(Fy.EM,this.zdi),this.dnt.QP(),[2]}})}).call(this)},n.nu=function(){return this.Vdi?this.Vdi.source:t.prototype.nu.call(this)},n.Nd=function(){return this.Vdi?this.Vdi.duration:t.prototype.Nd.call(this)},n.Gdi=function(){return t.prototype.Nd.call(this)},n.EP=function(){var i=t.prototype.EP.call(this);return LA.jn(i).Ly(this.Zri)._s()},n.Ux=function(){var i=t.prototype.Ux.call(this);return LA.jn(i).Ly(this.Zri)._s()},n.KP=function(){return this.k5t.KP()},n.Gui=function(t){return jt(function(){return zt(this,function(i){return this.k5t.Gui(t),[2]})}).call(this)},n.hr=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return null==(t=this.Ldi)||t.Zg(),this.Ldi=void 0,this.Ndi=void 0,null==(i=this.Mdi)||i.Zg(),this.Mdi=void 0,this.Bdi=void 0,this.Vdi=void 0,this.xdi=0,this.Pdi=void 0,this.Idi=0,this.pGt=void 0,this.Cdi=void 0,this.qdi=0,this.Ddi=0,this.dnt.mn(Fy.EM,this.zdi),this.dnt.mn(ch.uo,this.HV),this.dnt.mn(ch.jw,this.WV),[4,this.k5t.KP()];case 1:return n.sent(),[2]}})}).call(this)},n.kn=function(){var i=this;return jt(function(){return zt(this,function(n){switch(n.label){case 0:return[4,this.hr()];case 1:return n.sent(),[4,t.prototype.kn.call(i)];case 2:return n.sent(),[2]}})}).call(this)},xt(i,[{key:"Zri",get:function(){return this.xdi}},{key:"ihi",get:function(){return this.Pdi}},{key:"jri",get:function(){return this.Idi}},{key:"Jri",get:function(){return this.pGt}},{key:"thi",get:function(){return this.Cdi}}]),i}(p5);V(),It(),Dt();var C5=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.Ta=function(i,n){var r;return void 0!==Wn(null!=(r=null==i?void 0:i.ads)?r:[],F0)?ot.reject(new _d(pd.CONFIGURATION_ERROR,"THEOads must be enabled in the player configuration.")):t.prototype.Ta.call(this,i,n)},i}(Yb),P5=1/60,D5=function(t){function i(i){var n;return(n=t.call(this,i)||this).$di=void 0,n.k5t=void 0,n.Ydi=void 0,n.Zdi=void 0,n.ali=!0,n.eli=!0,n.lli=void 0,n.jdi=function(t){switch(t.presentationMode){case"native-picture-in-picture":n.Kdi();break;case"fullscreen":t2(n.Cd)&&n.Kdi()}},n.sli=function(t){n.rli()},n.nli=function(t){n.rli()},n.fli=function(){var t=n.Wci;void 0!==t?(!t.ahi||n.Gx()>=t.ahi)&&(n.dnt.mn(ch.py,n.fli),n.Lci(function(){return n.I3t()})):n.dnt.mn(ch.py,n.fli)},n.cli=function(){n.oa.mn(Fy.PM,n.cli),n.odi=!1,n.ldi=!1},n.Xdi(),n}Pt(i,t);var n=i.prototype;return n.Xdi=function(){this.dnt.ont.wn("presentationmodechange",this.jdi)},n.Qdi=function(){this.dnt.ont.mn("presentationmodechange",this.jdi)},n.Kdi=function(){var t=this;if(this.Ydi&&!Z3(this.Ydi)&&this.k5t&&this.Wci)return function(t){return j(t,o4)}(this.Ydi)?(this.Fci(this.Wci,"Cannot play L-shape content ad breaks in this representation"),void this.Lci(function(){return t.I3t()})):void this.Jdi(new K3(this.dnt,this.k5t),!1,!1)},n.uP=function(i){i||this.lP||this.GP(),t.prototype.uP.call(this,i)},n.Ta=function(i,n){var r=this;return jt(function(){return zt(this,function(e){switch(e.label){case 0:return[4,t.prototype.Ta.call(r,i,n)];case 1:return e.sent(),this.pci?(this.Zdi=this.pci.backdropDoubleBox,this.Jdi(new $3(this.dnt,this.k5t),!1,!0),[2]):[2]}})}).call(this)},n.yci=function(){var t=new p5(function(t,i,n){var r=t.lastElementChild;t.insertBefore(i,r),B0(i);var e=new y1(new VB(i,n,new zE),NS.Bg);return e.wP=uS.HL,e.vO=!1,e}(this.Eci,this.$di,this.oa.Cd));this.k5t=new R5(this.dnt,t)},n.wci=function(){t.prototype.wci.call(this),this.$di=function(){var t=v.createElement("div");return hn(t,"theo-ads-sgai-ad-player"),t}(),this.Eci.appendChild(this.$di),this.Aui=x0(this.$di),this.tli()},n.tli=function(){gn(this.kci),function(t){var i=t.style;i.boxSizing="border-box",i.position="relative",i.alignItems="center",i.border="0 solid transparent",i.borderWidth="0px",i.backgroundColor="transparent",i.backgroundRepeat="no-repeat",i.backgroundAttachment="scroll"}(this.Eci),B0(this.kci),B0(this.$di)},n.xci=function(){this.ili(),t.prototype.xci.call(this),this.$di&&(Zi(this.$di),this.$di=void 0)},n.ili=function(){O0(this.Ls),O0(this.kci)},n.Jdi=function(t,i,n){var r,e=null!=(r=this.Ydi)?r:this,s=null!=t?t:this.dnt;Q3(e,s),void 0!==this.Ydi&&(this.Ydi.mr(this.Eci,this.kci,this.$di),this.Ydi.kn()),null==t||t.gr(this.Eci,this.kci,this.$di,e,i),this.Ydi=t,n?this.nO(s):this.B3t(s)},n.t4t=function(){return this.k5t},n.GP=function(){var i;t.prototype.GP.call(this),null==(i=this.k5t)||i.GP()},n.Xx=function(i,n){this.eli=!0,t.prototype.Xx.call(this,i,n)},n.lai=function(t){var i,n;return t+(null!=(n=null==(i=this.k5t)?void 0:i.jri)?n:0)},n.Dci=function(){var i;t.prototype.Dci.call(this),null==(i=this.k5t)||i.wn(ch.py,this.sli),this.dnt.wn(ch.qw,this.nli)},n.Mci=function(){var i;t.prototype.Mci.call(this),null==(i=this.k5t)||i.mn(ch.py,this.sli),this.dnt.mn(ch.qw,this.nli)},n.rli=function(){this.Jci(this.Gx()),this.hli()},n.hli=function(){var t;if(!(this.rdi()||Z3(this.Ydi)||(null==(t=this.Ydi)?void 0:t.Kri()))){var i=A.min(this.k5t.Nd(),this.Wci.ct)-this.k5t.Gx(),n=this.oli(i);if(void 0!==n&&!(this.dnt.Gx()>n-.75)){var r=LA.jn(this.k5t.Ux()),e=this.k5t.EP();if(0!==e.length){var s=A.min(e.end(e.length-1),this.Wci.ahi);r.MM().Cr(s)&&!this.dnt.xP&&(this.dnt.lP&&(this.dnt.QP(),this.dnt.oP=!0),this.dnt.Xx(n,{zOt:!0}))}}}},n.oli=function(t){var i,n=this.dnt.EP(),r=null==(i=this.Wci)?void 0:i.ahi;if(0!==n.length&&void 0!==r){var e=n.start(0),s=n.end(n.length-1),u=r-t;if((u=16&&Oi.Q_<18&&(null==(i=this.Eai)?void 0:i.Vhi)!==I4.COMPANION&&(null==(u=this.k5t)||u.Xx(this.k5t.Gx()));this.Jdi(h,this.ldi,!1),Oi.zv&&!h.Kri()&&(null==(n=this.Eai)?void 0:n.Vhi)!==I4.COMPANION&&(O0(this.kci),ln(this.kci)),this.gci.So(new v4(t).Ca),this.ali=(null==(r=this.Eai)?void 0:r.Vhi)===I4.COMPANION||(null==(e=this.Eai)?void 0:e.Vhi)===I4.CSAI,null==(s=this.Eai)||s.uoi(this.Gx())},n.uli=function(){var t;N5(this.oa)&&(null==(t=this.Eai)?void 0:t.Vhi)!==I4.COMPANION&&(this.odi=!0,this.oa.wn(Fy.PM,this.cli))},n.Uci=function(){var i=this;return jt(function(){var n,r,e,s,u,o,h;return zt(this,function(a){return void 0===(s=this.Ici)?[2]:s.Ihi===n4.LSHAPE_CONTENT&&N5(this.dnt)?(this.Fci(s,"Cannot play L-shape content ad breaks in this representation."),[2,this.I3t()]):(null==(n=this.k5t)?void 0:n.Zx())?(this.Fci(s,"Could not load the ad break: "+(null==(o=this.k5t)||null==(u=o.Zx())?void 0:u.message)),[2,this.dli()]):(this.Rci(),this.uli(),(null==(r=this.Eai)?void 0:r.Vhi)!==I4.COMPANION&&(this.lli=this.dnt.Vx,null==(h=this.k5t)||h.Rdi(this.Gx(),this.lli,0,!0)),this.oa.xP&&this.So(new IT(this.Gx())),this.zui(s),!Oi.X_||this.oa.lP||(null==(e=this.Ydi)?void 0:e.Kri())||(this.dnt.oP=!0,this.dnt.QP()),this.Dci(),[2,t.prototype.Uci.call(i)])})}).call(this)},n.Hci=function(){var i=this;return jt(function(){var n,r,e,s;return zt(this,function(u){return(null==(n=this.Eai)?void 0:n.Vhi)!==I4.COMPANION&&(this.lli=this.lli?new Date(this.lli.getTime()+1e3*this.dnt.Nd()):void 0,null==(r=this.k5t)||r.Rdi(this.Gx(),this.lli,0,!0)),e=this.Ici,this.Wci.Ihi===e.Ihi?function(t){return j(t,e4)}(this.Ydi)&&this.Ydi.mhi(e.Chi):(s=this.Sdi(e.Ihi,e),this.Jdi(s,this.ldi,!1)),[2,t.prototype.Hci.call(i)]})}).call(this)},n.I3t=function(){var i=this;return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:return void 0===this.Wci?[2]:(this.Mci(),function(t){return j(t,K3)}(this.Ydi)&&(this._ci.Voi(this.dnt.nt),this.dnt.wn(Fy.EM,this.Kq)),r=null==(n=this.Ydi)?void 0:n.Kri(),this.Jdi(new $3(this.dnt,this.k5t),!0,!1),r||(this.eli=!1,(e=this.oli(0))&&this.dnt.Gx().499)t=2*A.atan2(r,u),i=A.PI/2,n=0;else if(o<-.499)t=-2*A.atan2(r,u),i=-A.PI/2,n=0;else{var h=r*r,a=e*e,c=s*s;t=A.atan2(2*e*u-2*r*s,1-2*a-2*c),i=A.asin(2*o),n=A.atan2(2*r*u-2*e*s,1-2*h-2*c)}return new G5(t,n,i)},i.Vli=function(){var t=A.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return 0===t?(this.x=0,this.y=0,this.z=0,this.w=1):(t=1/t,this.x=this.x*t,this.y=this.y*t,this.z=this.z*t,this.w=this.w*t),this},t}(),G5=function(){function t(t,i,n){this.Qli=void 0,this.Kli=void 0,this.Yli=void 0,this.Qli=t||0,this.Kli=i||0,this.Yli=n||0}var i=t.prototype;return i.Gy=function(t,i,n){return this.Qli=t,this.Kli=i,this.Yli=n,this},i.jft=function(t){return this.Gy(t.Qli,t.Kli,t.Yli)},i.gO=function(t){return this.Qli+=t.Qli,this.Kli+=t.Kli,this.Yli+=t.Yli,this},i.gF=function(t){return this.Qli-=t.Qli,this.Kli-=t.Kli,this.Yli-=t.Yli,this},i.Jli=function(){var t=this.Qli,i=this.Yli,n=this.Kli,r=A.cos(t/2),e=A.cos(i/2),s=A.cos(n/2),u=A.sin(t/2),o=A.sin(i/2),h=A.sin(n/2),a=r*e,c=u*o;return new X5(a*h+c*s,u*e*s+r*o*h,r*o*s-u*e*h,a*s-c*h)},t}();V(),It();var Q5=["Zli","zot","$li","error"];V(),It();var Y5=function(t){return t.Os="unavailable",t.tfi="available",t.Ya="presenting",t}({});V(),It();var $5=function(){function t(t,i){var n=this;this.ffi=void 0,this.Ls=void 0,this.We=!1,this.gfi=new z5,this.pfi=new z5,this.vfi=new z5,this.cfi=!1,this.ifi=function(t){n.gfi.Gy(t.clientX,t.clientY),n.cfi=!0,t.preventDefault(),t.stopPropagation()},this.efi=function(t){t.touches&&1===t.touches.length&&(n.gfi.Gy(t.touches[0].pageX,t.touches[0].pageY),n.cfi=!0,t.preventDefault())},this.cr=function(t){if(n.cfi||n._fi()){if(n._fi()){var i=t.movementX||t.mozMovementX||0,r=t.movementY||t.mozMovementY||0;n.pfi.Gy(n.gfi.x-i,n.gfi.y-r)}else n.pfi.Gy(t.clientX,t.clientY);n.vfi.Uli(n.pfi,n.gfi),n.gfi.jft(n.pfi),n.dfi()}},this.sfi=function(t){n.cfi&&(n.pfi.Gy(t.touches[0].pageX,t.touches[0].pageY),n.vfi.Uli(n.pfi,n.gfi),n.gfi.jft(n.pfi),n.dfi())},this.nfi=function(){n.ufi()},this.rfi=function(){n.ufi()},this.afi=function(){n.ufi()},this.ffi=t,this.Ls=i}var i=t.prototype;return i.JU=function(){this.We||(this.We=!0,this.Ls.addEventListener("mousedown",this.ifi),this.Ls.addEventListener("touchstart",this.efi),f.addEventListener("mousemove",this.cr),f.addEventListener("touchmove",this.sfi),f.addEventListener("mouseup",this.nfi),f.addEventListener("touchend",this.rfi),this.hfi(f))},i.ZU=function(){this.We&&(this.We=!1,this.Ls.removeEventListener("mousedown",this.ifi),this.Ls.removeEventListener("touchstart",this.efi),f.removeEventListener("mousemove",this.cr),f.removeEventListener("touchmove",this.sfi),f.removeEventListener("mouseup",this.nfi),f.removeEventListener("touchend",this.rfi),this.ofi(f))},i.hfi=function(t){if(function(t){try{return Boolean(t)&&t===t.top}catch(t){return!1}}(t));else if(mn(t))try{t.parent.addEventListener("mouseup",this.nfi),this.hfi(t.parent)}catch(i){t.document.documentElement.addEventListener("mouseleave",this.afi)}},i.ofi=function(t){if(t.document.documentElement.removeEventListener("mouseleave",this.afi),mn(t))try{t.parent.removeEventListener("mouseup",this.nfi),this.ofi(t.parent)}catch(t){}},i.ufi=function(){this.cfi=!1},i.dfi=function(){var t=this.ffi.lfi;t.yaw+=2*A.PI*this.vfi.x*.4/this.Ls.clientWidth,t.pitch+=2*A.PI*this.vfi.y*.5/this.Ls.clientHeight,t.pitch=Cn(t.pitch,-A.PI/2,A.PI/2),this.ffi.lfi=t},i._fi=function(){return(v.pointerLockElement||v.mozPointerLockElement||v.webkitPointerLockElement)===this.Ls},i.kn=function(){this.ZU()},t}();V(),It(),Dt();var K5=function(t){function i(){return t.call(this,"$li")||this}return Pt(i,t),i.prototype.xa=function(){return new J5},i}(Cg),J5=function(t){function i(){return t.call(this,"stereochange")||this}return Pt(i,t),i}(ah);V(),It();var Z5=function(){function t(){this.hZ=[0,0,0,1],this.yfi=[]}var i=t.prototype;return i.mfi=function(t){var i;(i=t).clearColor.apply(i,[].concat(this.hZ)),t.clear(t.COLOR_BUFFER_BIT)},i.wfi=function(t,i){t.clearDepth(1),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),t.clear(t.DEPTH_BUFFER_BIT),this.yfi.forEach(function(n){n.wfi(t,i)})},i.bfi=function(t){this.yfi.push(t)},i.Afi=function(){this.yfi=[]},t}();V(),It(),Dt(),V(),It(),V(),It(),Dt();var t6=function(){function t(t,i,n,r,e){this.Tfi=void 0,this.eb=void 0,this.kfi=void 0,this.Vp=void 0,this.Efi=void 0,this.xfi=void 0,this.uc=void 0,this.Tfi=t,this.eb=this.Sfi(t,i,n),this.kfi=r,this.Vp=e,this.Efi=!1,this.xfi=0,this.uc=0}return t.prototype.Sfi=function(t,i,n){var r=t.createBuffer();return null===r?(Qe("Failed to create buffer."),null):(t.bindBuffer(i,r),t.bufferData(i,n,t.STATIC_DRAW),r)},t}(),i6=function(t){function i(i,n,r){return t.call(this,i,i.ARRAY_BUFFER,n,r,i.FLOAT)||this}Pt(i,t);var n=i.prototype;return n.JU=function(t){if(null!==this.eb)if(null!==t){var i=this.Tfi;i.bindBuffer(i.ARRAY_BUFFER,this.eb),i.vertexAttribPointer(t,this.kfi,this.Vp,this.Efi,this.xfi,this.uc),i.enableVertexAttribArray(t)}else Qe("Attempted to enable attribute without location.");else Qe("Attempted to enable buffer that failed to initialize.")},n.ZU=function(t){t&&this.Tfi.disableVertexAttribArray(t)},i}(t6);var n6=function(t){function i(i,n){var r;return(r=t.call(this,i,i.ELEMENT_ARRAY_BUFFER,n,1,i.UNSIGNED_SHORT)||this).Ifi=void 0,r.Ifi=n.length,r}return Pt(i,t),i.prototype.Pfi=function(){var t=this.Tfi;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.eb),t.drawElements(t.TRIANGLES,this.Ifi,this.Vp,this.uc)},i}(t6);V(),It();var r6=function(t){return t.VertexPos="aVertexPosition",t.VertexUV="aVertexUV",t.VertexColor="aVertexColor",t}({}),e6=function(t){return t.ProjectionMat="uProjectionMatrix",t.ModelViewMat="uModelViewMatrix",t.Texture="uTexture",t}({}),s6=function(t){return t.Normal="vNormal",t.Color="vColor",t.UV="vUV",t}({}),u6=function(){function t(t,i,n){this.Nfi=void 0,this.Tfi=void 0,this.Tfi=t,this.Nfi=this.Cfi(this.Tfi,i,n)}var i=t.prototype;return i.Cfi=function(t,i,n){var r=this.Rfi(t,t.VERTEX_SHADER,i),e=this.Rfi(t,t.FRAGMENT_SHADER,n);if(null===r||null===e)return Qe("Failed to create vertex or fragment shader."),null;var s=t.createProgram();return null===s?(Qe("Failed to create shader program"),null):(t.attachShader(s,r),t.attachShader(s,e),t.linkProgram(s),t.getProgramParameter(s,t.LINK_STATUS)?s:(Qe("Failed to initialize shader program"),null))},i.Rfi=function(t,i,n){var r=t.createShader(i);if(null===r)return Qe("failed to create shader."),null;if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS)){var e=t.getShaderInfoLog(r);return Qe("Failed to compile shader with error: "+e),t.deleteShader(r),null}return r},i.Dfi=function(){return this.Nfi},i.Bfi=function(t){var i=this.Nfi;if(null===i)return Qe("Attempted to retrieve attribute location when shader program was not initialized"),null;var n=this.Tfi.getAttribLocation(i,t);return-1===n?null:n},i.Mfi=function(t){var i=this.Nfi;if(null===i)return Qe("Attempted to retrieve uniform location when shader program was not initialized"),null;var n=this.Tfi.getUniformLocation(i,t);return null===n&&Ye("Attempted to retrieve nonexistent uniform: "+t),n},t}(),o6=function(){function t(t,i,n){this.Ofi=void 0,this.Ffi=void 0,this.Ufi=void 0,this.Ofi=t,this.Ffi=i,this.Ufi=n}var i=t.prototype;return i.Lfi=function(){var t,i=this.Ofi.length,n=(t=A).max.apply(t,[].concat(this.Ffi));return n>=i?(Ye("Created geometry where largest index ("+n+") is larger than/equal to attribute array size ("+i+")"),!1):(n0)&&c.push(E,I,C),(T!==r-1||a0&&(n.S_i-=1)),null!==e&&void 0!==i){n.c_i=e.requestAnimationFrame(n.f_i);var s=e.renderState.baseLayer,u=i.getViewerPose(n.C_i);if(void 0!==s&&void 0!==u){r.bindFramebuffer(r.FRAMEBUFFER,s.framebuffer);for(var o,h=new G5,a=0,c=Ft(u.views);!(o=c()).done;){var f=o.value,v=new T6(f.eye);if(v.cvi=f.projectionMatrix,n.p_i()){var d=void 0;if(Oi.Ks&&Oi.u_&&null===n.m_i){if(0===(d=f.transform.inverse.orientation).x&&0===d.y&&0===d.z&&1===d.w)return}else d=f.transform.orientation;v.vvi=new X5(d.x,d.y,d.z,d.w)}n.e_i&&v.Pvi(n.N_i.jli()),h=h.gO(v.vvi.jli()),a+=1;var l=s.getViewport(f);l&&r.viewport(l.x,l.y,l.width,l.height),n.jvi.wfi(r,v)}var g=new G5(h.Qli/a,h.Kli/a,h.Yli);n.D_i=g.Jli(),function(t,i){var n=t.qli(i);return 1-n*n=2},n.HNt=function(t,i){this.So(new Cb(new _d(i,t)))},n.O_i=function(){var t=this.oa.nu();return t&&t.vr},n.kn=function(){this.uV.Zg(),this.Zvi(),this.Vo(),this.Lvi&&(Zi(this.Lvi),this.Lvi=void 0),this.Tfi=void 0,this.Ovi&&(this.Ovi.kn(),this.Ovi=void 0),this.oa=void 0},xt(i,[{key:"k_i",get:function(){return this.E_i},set:function(t){var i=this.vft;this.E_i=t,this.vft!==i&&this.So(new T2)}},{key:"Wvi",get:function(){return this.zvi!==iE.NONE}},{key:"zvi",get:function(){return this.x_i},set:function(t){var i=this.vft;this.x_i=t,this.vft!==i&&this.So(new T2)}},{key:"Vvi",get:function(){return this.P_i},set:function(t){var i=this.P_i;this.P_i=t,this.P_i!==i&&this.So(new T2)}},{key:"I_i",get:function(){return this.Vvi}},{key:"l_i",get:function(){return this.h_i||this.e_i}},{key:"h_i",get:function(){return this.m_i},set:function(t){var i=this.vft;this.m_i=t,this.vft!==i&&this.So(new T2)}},{key:"C_i",get:function(){return this.o_i||this.s_i}},{key:"R_i",get:function(){var t=this.D_i.jli();return{yaw:t.Qli*W5,pitch:t.Kli*W5,roll:t.Yli*W5}},set:function(t){var i=C6(t&&t.pitch||0)*H5,n=C6(t&&t.roll||0)*H5,r=C6(t&&t.yaw||0)*H5,e=new G5(r,i,n),s=this.D_i.jli(),u=this.N_i.jli();this.D_i=e.Jli(),this.N_i=e.gF(s).gO(u).Jli()}},{key:"lfi",get:function(){var t=this.N_i.jli();return{yaw:t.Qli,pitch:t.Kli,roll:t.Yli}},set:function(t){var i=P6(t&&t.pitch||0),n=P6(t&&t.roll||0),r=P6(t&&t.yaw||0),e=new G5(r,i,n);this.N_i=e.Jli()}},{key:"vft",get:function(){return this.k_i?this.h_i?Y5.Ya:Y5.tfi:Y5.Os}},{key:"B_i",get:function(){return null!==this.h_i},set:function(t){var i=this.B_i;t&&this.Vvi?this.r_i():this.t_i(),this.B_i!==i&&this.So(new K5)}},{key:"M_i",get:function(){return this.w_i},set:function(t){null===this.m_i&&(this.w_i=t,t&&Oi.ru&&this.b_i())}},{key:"L_i",get:function(){return this.gvi},set:function(t){t&&t>=0&&t<=180&&(this.gvi=t,null!==this.e_i&&this.e_i.updateRenderState({inlineVerticalFieldOfView:this.gvi*H5}))}}]),i}(uh);function C6(t){return Nn(t+180,360)-180}function P6(t){return Nn(t+A.PI,2*A.PI)-A.PI}function D6(t,i){return"function"==typeof t.getAll?N6(void 0===i?t.getAll():t.getAll(i)):function(t){var i=new Xa,n=[];return t.onsuccess=function(){var r=t.result;r&&r.value?(n.push(r.value),r.continue()):i.Qy(n),ht()},t.onerror=function(){i.Ky(t.error),ht()},i.Yy}(void 0===i?t.openCursor():t.openCursor(i))}function N6(t){return new ot(function(i,n){t.onsuccess=function(){i(t.result),ht()},t.onerror=function(){n(t.error),ht()}})}Jb(function(t){return function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).ffi=void 0,r.ffi=new R6(r),r}Pt(i,t);var n=i.prototype;return n.xa=function(){return Wg(t.prototype.xa.call(this),{vr:this.ffi.Ca})},n.kn=function(){this.ffi.kn(),t.prototype.kn.call(this)},i}(t)},$b.lu),V(),It(),V(),It(),V(),It(),Wt(),Bt(),Yt(),V(),It(),Wt(),Yt(),V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It(),Wt(),Yt(),Et();var x6=function(){function t(t){var i=this;this.Rxt=void 0,this.Yy=void 0,this.ro=void 0,this.Rxt=t,this.ro=!0,this.Yy=new ot(function(t,n){i.Rxt.oncomplete=function(){i.ro=!1,t(),ht()},i.Rxt.onerror=function(){i.ro&&(i.ro=!1,n(i.Rxt.error||new y("Transaction error")),ht())},i.Rxt.onabort=function(){i.ro=!1,n(new y("Transaction aborted")),ht()}})}return t.prototype.Zg=function(){if(this.ro)try{this.Rxt.abort(),this.ro=!1}catch(t){}},t}();function B6(t,i,n){return jt(function(){var r,e,s;return zt(this,function(u){switch(u.label){case 0:r=new x6(t),u.label=1;case 1:return u.trys.push([1,3,4,5]),[4,ot.all([i(n),r.Yy])];case 2:return e=u.sent(),[2,e[0]];case 3:if(s=u.sent(),!r.ro)throw new F2("IDBTransaction committed prematurely",s);throw s;case 4:return r.Zg(),[7];case 5:return[2]}})})()}var O6=function(){function t(t,i){this.wE=void 0,this.W_i=void 0,this.wE=t,this.W_i=i}var i=t.prototype;return i.yxt=function(t){return ot.resolve("persistent"===t)},i.uTt=function(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?ot.reject(QH(i)):N6(this.H_i(YH.Fxt).put(t))},i.bxt=function(t,i){return void 0===i&&(i="persistent"),jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:if("persistent"!==i)return[2,ot.reject(QH(i))];n=Ft(t),s.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,[4,this.uTt(e,i)]);case 2:s.sent(),s.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},i.qy=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.zy(t)];case 1:return[2,Boolean.apply(void 0,[i.sent()])]}})}).call(this)},i.zy=function(t){return N6(this.H_i(YH.Oxt).get(t))},i.Axt=function(t,i){return N6(this.H_i(YH.Oxt).index(i).get(t))},i._xt=function(t){return jt(function(){var i,n,r,e,s;return zt(this,function(u){switch(u.label){case 0:i=[],n=Ft(t),u.label=1;case 1:return(r=n()).done?[3,4]:(e=r.value,[4,this.zy(e)]);case 2:(s=u.sent())&&i.push(s),u.label=3;case 3:return[3,1];case 4:return[2,i]}})}).call(this)},i.Sxt=function(){return D6(this.H_i(YH.Oxt))},i.Txt=function(t){return D6(this.H_i(YH.Oxt),t)},i.kxt=function(t,i){return D6(this.H_i(YH.Oxt).index(i),t)},i.pS=function(t){return N6(this.H_i(YH.Fxt).delete(t))},i.Ext=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:i=Ft(t),e.label=1;case 1:return(n=i()).done?[3,4]:(r=n.value,[4,this.pS(r)]);case 2:e.sent(),e.label=3;case 3:return[3,1];case 4:return[2]}})}).call(this)},i.xxt=function(){return N6(this.H_i(YH.Fxt).clear())},i.H_i=function(t){if(!this.W_i)throw new y("Lock was released");if(!function(t,i){return t===YH.Oxt&&i===YH.Oxt||i===YH.Fxt}(t,this.W_i.mode))throw new y("Incompatible transaction mode: "+this.W_i.mode+", expected "+t);return this.W_i.objectStore(this.l)},i.q_i=function(){this.wE.z_i(this),this.W_i=void 0},xt(t,[{key:"l",get:function(){return this.wE.l}}]),t}();var M6=function(){function t(t,i){this.j_i=void 0,this.l=void 0,this.nPt=void 0,this.ta=new Rd,this.j_i=t,this.l=i}var i=t.prototype;return i.yxt=function(t){return ot.resolve("persistent"===t)},i.uTt=function(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?ot.reject(QH(i)):this.Rxt(YH.Fxt,function(i){return i.uTt(t)})},i.bxt=function(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?ot.reject(QH(i)):this.Rxt(YH.Fxt,function(i){return i.bxt(t)})},i.qy=function(t){return this.Rxt(YH.Oxt,function(i){return i.qy(t)})},i.zy=function(t){return this.Rxt(YH.Oxt,function(i){return i.zy(t)})},i.Axt=function(t,i){return this.Rxt(YH.Oxt,function(n){return n.Axt(t,i)})},i._xt=function(t){return this.Rxt(YH.Oxt,function(i){return i._xt(t)})},i.Sxt=function(){return this.Rxt(YH.Oxt,function(t){return t.Sxt()})},i.Txt=function(t){return this.Rxt(YH.Oxt,function(i){return i.Txt(t)})},i.kxt=function(t,i){return this.Rxt(YH.Oxt,function(n){return n.kxt(t,i)})},i.pS=function(t){return this.Rxt(YH.Fxt,function(i){return i.pS(t)})},i.Ext=function(t){return this.Rxt(YH.Fxt,function(i){return i.Ext(t)})},i.xxt=function(){return this.Rxt(YH.Fxt,function(t){return t.xxt()})},i.gPt=function(t){return this.G_i(),this.nPt=new O6(this,t),this.nPt},i.G_i=function(){if(void 0!==this.nPt)throw new y("Already locked")},i.z_i=function(t){if(this.nPt!==t)throw new y("Incorrect lock");this.nPt=void 0},i.Zo=function(t){return this.ta.Zo(t)},i.Rxt=function(t,i){var n=this;return this.Zo(function(){return n.X_i(t,i)})},i.X_i=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:this.G_i(),n=this.j_i.transaction(this.l,t),r=this.gPt(n),e.label=1;case 1:return e.trys.push([1,,3,4]),[4,B6(n,i,r)];case 2:return[2,e.sent()];case 3:return r.q_i(),[7];case 4:return[2]}})}).call(this)},i.Q_i=function(t){this.G_i();var i=this.j_i.transaction(this.l,t);return this.gPt(i)},t.K_i=function(t,i){var n,r=new ot(function(t){n=t}),e=t.reduce(function(t,i){return t.then(function(){var t,n=new ot(function(i){t=i});return i.Zo(function(){return t(),r}).catch(pn),n})},ot.resolve());return n(e.then(i)),r},t}();V(),It(),Bt(),V(),It(),Wt(),Yt(),V(),It(),V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Wt(),Yt();var L6={ED:17,Y_i:function(t){return jt(function(){var i,n,r,e;return zt(this,function(s){if(i=t.transaction,n=t.database,(r=i.objectStoreNames)&&r.length)for(e=0;e1)throw new y("Only one youbora analytics configuration expected");var n=i[0];n.integration;return m_(n,["integration"])}},i}(t)},$b.Snt),V(),It(),V(),It(),Dt(),Ut(),V(),It(),Bt(),Dt();var i8=1,n8=0,r8=1e3,e8=function(t){function i(i,n,r,e,s,u){var o;return void 0===e&&(e=MMPlayerState),void 0===s&&(s=MMAdState),void 0===u&&(u=MMPresentationInfo),(o=t.call(this)||this).oa=void 0,o.ZS=void 0,o.ugi=void 0,o.Igi=void 0,o.Cgi=void 0,o.cgi=void 0,o.Rgi=void 0,o.fgi=void 0,o.pgi=void 0,o._gi=void 0,o.Dgi=void 0,o.Pgi=void 0,o.Agi=void 0,o.Sgi=void 0,o.Bci=void 0,o.Tgi=void 0,o.xgi=void 0,o.kgi=void 0,o.u8=void 0,o.Egi=void 0,o.dci=void 0,o.YG=void 0,o.iK=void 0,o.ZG=void 0,o.QG=void 0,o.ygi=void 0,o.wgi=void 0,o.oa=i,o.ZS=n,o.ugi=r,o.Igi=e,o.Cgi=s,o.cgi=u,o.Rgi=!0,o.fgi=!1,o.pgi=void 0,o._gi=void 0,o.Dgi=void 0,o.Agi=function(t){var i,n=t.jnt,r=(n.d1t(),i=n.Ont().duration,"linear"===n.Ont().type);n.l1t(),n.a1t();r&&(o.fgi=!0),o.ggi=o.Cgi.AD_IMPRESSION,o.ggi=o.Cgi.AD_STARTED},o.Sgi=function(t){o.fgi=!1,o.ggi=o.Cgi.AD_COMPLETED},o.Bci=function(t){t.AZt===zJ.ADBLOCK?o.ggi=o.Cgi.AD_BLOCKED:o.ggi=o.Cgi.AD_ERROR},o.Tgi=function(){o.ggi=o.Cgi.AD_SKIPPED},o.xgi=function(t){var i,n,r,e;t.Gk===vw.Mk&&(o.Dgi&&t.FX!==o.Dgi&&o.ugi.reportABRSwitch(o.Dgi,t.FX),o.Dgi=t.FX,o.ugi.reportChunkRequest(new MMChunkInformation(t.sN,t.FX,t.zB,t.Iut.Yu,void 0,void 0,null!=(r=null==(i=t.Iut.Wat)?void 0:i[0])?r:0,null!=(e=null==(n=t.Iut.Wat)?void 0:n[1])?e:-1)))},o.kgi=function(t){o.vgi=o.Igi.STOPPED,o.So(t)},o.u8=function(t){o.vgi=o.Igi.ERROR,o.ugi.reportError(t.error,o.dgi())},o.Egi=function(){o.lgi?o.ggi=o.Cgi.AD_PAUSED:o.vgi=o.Igi.PAUSED},o.dci=function(){o.lgi&&(o.ggi=o.Cgi.AD_PLAY)},o.YG=function(){o.lgi?(o.pgi===o.Cgi.AD_PAUSED&&(o.ggi=o.Cgi.AD_RESUMED),o.ggi=o.Cgi.AD_PLAYING):(o.Rgi&&(o.Rgi=!1,o.ogi(),o.vgi=o.Igi.STARTED),o.vgi!==o.Igi.PAUSED&&o.vgi!==o.Igi.BUFFERING||(o.vgi=o.Igi.RESUMED))},o.iK=function(){o.ugi.reportPresentationSize(o.oa.MP,o.oa.DP)},o.ZG=function(t){o.lgi||o.vgi!==o.Igi.PAUSED||o.ugi.reportPlayerSeekCompleted(t.currentTime*r8)},o.QG=function(){o.lgi||(o.vgi=o.Igi.BUFFERING)},o.ygi=function(){o.ugi.reportDownloadRate(A.floor(Nb.Bg.pW()))},o.wgi=function(){o.lgi||o.ugi.reportPlaybackPosition(o.dgi())},o.vgi=o.Igi.INITIALIZED,o.QBt(),o.Pgi=o.mgi(),o}Pt(i,t);var n=i.prototype;return n.ogi=function(){var t=this.ct===1/0,i=t?i8:n8,n=t?-1:this.ct,r=nr(this.oa.rt.NI,this.agi);this.ugi.setPresentationInformation(new this.cgi(i,n,r))},n.agi=function(t){for(var i=t.$I.NI,n=[],r=0;r1)throw new y("Only one Moat analytics configuration expected");return i[0]}},i}(t)},$b.Snt),V(),It(),V(),It(),V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It(),Wt(),Bt(),Ut(),Yt();var h8="theo-dai-clickthrough",a8="urn:google:dai:2018",c8=function(){function t(t,i,n,r,e){var s=this;this.oa=void 0,this.upi=void 0,this.Hai=void 0,this.fpi=void 0,this._pi=void 0,this.Lui=void 0,this.nq=void 0,this.rq=void 0,this.T9=new dr,this.ypi=!1,this.cpi=!0,this.mpi=function(t){var i=t.Ht;i.Lt===uy.zU&&(i.Km===jw.ID3||i.Km===jw.EVENT_STREAM&&i.eC===a8)&&(i.Qk=Jp.iC,s.Lui=i,i.wn(Fg.uI,s.bpi))},this.bpi=function(t){t.PO.wn(Qw.QL,s.Api)},this.Api=function(t){var i,n;if(s.Hai)if((null==(i=s.Lui)?void 0:i.Km)===jw.ID3){var r=t.PO.U;"TXXX"===r.id&&s.Hai.sui({TXXX:r.text})}else if((null==(n=s.Lui)?void 0:n.Km)===jw.EVENT_STREAM){var e=t.PO.U;s.Hai.nui(a8,e,t.YF)}},this.oa=t,this.Hai=i,this.fpi=n,this.upi=r,this._pi=e,n&&i&&this.oa.Jc&&this.oa.Jc.znt(n.oti)}var i=t.prototype;return i.Xx=function(t){this.T9.Zg(),this.T9=new dr,Er(br(this.Xri(t,this.T9.Yg),this.T9))},i.Xri=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return pr(i),this.fpi&&this.Hai?this.fpi.Fnt&&!this._pi?[2]:(n=this.oa.Gx(),this.cpi&&(r=this.Hai.hui(t,n))?(this.oa.vpi(r),[4,this.Hai.ww(Q4.AD_BREAK_ENDED,i)]):[3,2]):[2,this.oa.vpi(t)];case 1:if(e.sent(),this.Hai.rui(t).RO>t)return[2];e.label=2;case 2:return this.oa.vpi(t),[2]}})}).call(this)},i.EP=function(){var t=this.fpi&&this.fpi.Fnt;if(t){var i=LA.jn(this.oa.gpi()),n=t.qOt,r=n+t.G0t,e=new LA([n,r]);return i.Mn(e)._s()}return this.oa.gpi()},i.drt=function(t,i){return jt(function(){var n,r,e;return zt(this,function(s){switch(s.label){case 0:if(!t)return[2,this.oa.ppi(t,i)];n=t,s.label=1;case 1:return s.trys.push([1,3,,4]),this.oa.nt.wn(xg.rI,this.mpi),[4,this.upi.wpi(t,i)];case 2:return n=s.sent(),this.fpi&&this.Hai&&(this.ypi=!0),[3,4];case 3:if(yr(r=s.sent()),r.code===gw.LICENSE_INVALID)return[2];throw e=new _d(pd.SOURCE_NOT_SUPPORTED,"Something went wrong while setting up a Google DAI stream.",r),this.nq=pw(e),this.rq=e,this.oa.So(new Cb(e)),e;case 4:return[4,this.oa.ppi(n,i)];case 5:return s.sent(),[2]}})}).call(this)},i.hr=function(){if(this.ypi){if(this.oa.nt.mn(xg.rI,this.mpi),this.Lui){this.Lui.mn(Fg.uI,this.bpi);for(var t,i=Ft(this.Lui.L.NI);!(t=i()).done;){t.value.mn(Qw.QL,this.Api)}this.Lui=void 0}this.nq=void 0,this.rq=void 0,this.T9.Zg(),this.fpi&&this.fpi.hr(),this.Hai&&this.Hai.hr(),this.ypi=!1}},i.kn=function(){this.hr(),this.oa.kpi(),this.Hai&&this.Hai.kn()},xt(t,[{key:"Ca",get:function(){var t=this,i=this.upi;return{contentTimeForStreamTime:function(i){return t.Hai?t.Hai.Wai(i):i},streamTimeForContentTime:function(i){return t.Hai?t.Hai.qai(i):i},replaceAdTagParameters:function(i){t.Hai&&t.Hai.replaceAdTagParameters(i)},get snapback(){return t.cpi},set snapback(i){t.cpi=i},get sourceTransformer(){return i.lpi},set sourceTransformer(t){i.lpi=t}}}},{key:"lt",get:function(){return this.nq||this.oa.Spi()}},{key:"Jx",get:function(){return this.rq||this.oa.Tpi()}}]),t}();V(),It(),Bt(),Dt(),Ut(),V(),It(),Bt(),Dt();var f8=function(t){function i(i,n,r,e){var s;return void 0===e&&(e=!0),(s=t.call(this,r)||this).xpi=void 0,s.xpi=e,s.k4t=i,s.E4t=n,s}return Pt(i,t),xt(i,[{key:"Epi",get:function(){return this.xpi}},{key:"u$t",get:function(){return n0.so}}]),i}(Y0),v8=function(t){function i(i,n){var r;return(r=t.call(this,new XI,n0.so)||this).Hai=void 0,r.oa=void 0,r.Xai=void 0,r.Qai=void 0,r.Ipi=void 0,r.iui=void 0,r.Hai=i,r.oa=n,r.Xai=function(t){var i=r.w1t;if(i&&r.u1t){var n=t.Vai.aui;r.u1t.W7t=n.zx,function(t,i){var n=i.I9t,r=i.P9t,e=i.zx,s=Mn(t.Jc.slice(0,n-1),function(t){var i;return null!=(i=t.ct)?i:0});t.X0t=r-e-s}(i,n)}},r.Qai=function(t){var i=t.Vai.uui;if(i)for(var n,e=Ft(i);!(n=e()).done;){var s=n.value;if(!r.Bpi(s.CO)){var u=s.RO-s.CO,o=new f8(u,u,s.CO,!0);r.y1t.push(o)}}},r.Ipi=function(t){r.Rpi(t.type),r.Npi(t)},r.iui=function(t){r.uti=!1,r.u1t=void 0;var i=r.Fnt;i&&(i.X0t=0,r.Dpi(t.type,!1,!1),r.w1t=void 0)},r.Ppi(),r}Pt(i,t);var n=i.prototype;return n.Ppi=function(){var t=[Q4.STARTED,Q4.FIRST_QUARTILE,Q4.MIDPOINT,Q4.THIRD_QUARTILE,Q4.COMPLETE];this.Hai.wn(t,this.Ipi),this.Hai.wn(Q4.AD_BREAK_ENDED,this.iui),this.Hai.wn(Q4.AD_PROGRESS,this.Xai),this.Hai.wn(Q4.CUEPOINTS_CHANGED,this.Qai)},n.Cpi=function(t){var i=t.v7t.qOt,n=this.w1t||this.findAdBreakWithPredicate(i,function(t){return!t.pP});if(!n){var r=t.v7t.G0t;i=this.oa.Gx(),(n=new f8(r,r,i,!1)).P4t(),this.y1t.push(n)}return n},n.Rpi=function(t){switch(t){case Q4.STARTED:this.uti=!0;break;case Q4.AD_BREAK_ENDED:this.uti=!1}},n.Dpi=function(t,i,n){if(i)switch(t){case Q4.STARTED:case Q4.FIRST_QUARTILE:case Q4.MIDPOINT:case Q4.THIRD_QUARTILE:case Q4.COMPLETE:this.u4t.So(new dO(this.w1t))}if(n)switch(t){case Q4.STARTED:case Q4.FIRST_QUARTILE:case Q4.MIDPOINT:case Q4.THIRD_QUARTILE:case Q4.COMPLETE:this.u4t.So(new gO(this.u1t,this.u1t.W7t))}switch(t){case Q4.COMPLETE:this.u4t.So(new mO(this.u1t,this.hti.W7t));break;case Q4.AD_BREAK_ENDED:this.u4t.So(new fO(this.Fnt))}switch(t){case Q4.FIRST_QUARTILE:this.u4t.So(new f1(this.u1t,this.hti.W7t));break;case Q4.MIDPOINT:this.u4t.So(new d1(this.u1t,this.hti.W7t));break;case Q4.THIRD_QUARTILE:this.u4t.So(new g1(this.u1t,this.hti.W7t))}},n.Npi=function(t){var i=t.jnt,n=this.Cpi(i),r=function(t,i){if(t.Jc.length)return!1;for(var n=0;n=t&&s.qOt<=i&&!s.pP&&(!n||s.qOt>=n.qOt)&&(n=s)}return n},n.uD=function(){},n.qnt=function(t){},n.hr=function(){this.u1t&&(this.u4t.So(new mO(this.u1t,this.u1t.W7t)),this.u1t=void 0),this.w1t&&(this.u4t.So(new fO(this.w1t)),this.w1t=void 0),this.uti=!1,tr(this.y1t)},n.kn=function(){this.hr(),this.u4t.kn()},n.Hnt=function(t){},xt(i,[{key:"w4t",get:function(){return this.uti}},{key:"u4t",get:function(){return this.R5t}},{key:"Mpi",get:function(){var t=this.findAdBreakWithPredicate(0,function(t){return t.Epi}),i=0;return t&&(i=t.G0t),i}}]),i}(q1);V(),It(),Wt(),Ut(),Yt();var d8=function(){function t(t){this.Hai=void 0,this.lpi=void 0,this.Hai=t,this.lpi=function(t){return t}}var i=t.prototype;return i.wpi=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:for(n=[],r=[],e=Ft(t.sources);!(s=e()).done;)if(eT(u=s.value)){if(!this.Hai)continue;n.push(u)}else r.push(u);if(0===n.length)return[2,t];v.label=1;case 1:return void 0!==o||0===n.length?[3,7]:[4,eS.Bg.gz(n,t)];case 2:a=v.sent().Mc,c=a,pr(i),v.label=3;case 3:return v.trys.push([3,5,,6]),[4,this.Opi(c,i)];case 4:return o=v.sent(),r.push(o),[3,6];case 5:return yr(f=v.sent()),h=f,Yn(n,c),[3,6];case 6:return[3,1];case 7:if(0!==t.sources.length&&0===r.length)throw new y("Fatal: unable to play DAI streams.");return h&&Qe(h.message),[2,io({},t,{sources:r})]}})}).call(this)},i.Opi=function(t,i){return jt(function(){var n,r,e,s,u,o;return zt(this,function(h){switch(h.label){case 0:if(!this.Hai)throw new y("Could not find Google\u2019s IMA DAI HTML5 SDK, all DAI sources will be ignored.");return n=this.Hai.ww(Q4.LOADED,i),r=this.Hai.ww(Q4.ERROR,i),e=t.type===kA.vC?"dash":"hls",this.Hai.KHt(io({},t.ssai,{format:e})),[4,ot.race([n,r])];case 1:return(s=h.sent()).type!==Q4.LOADED?[3,5]:(u=t.type===kA.vC?kA.vC:kA.gC,this.lpi?[4,this.lpi(s.Vai.Yu||"")]:[3,3]);case 2:return o=h.sent(),[3,4];case 3:o=s.Vai.Yu,h.label=4;case 4:return[2,SA(io({},t,{src:o,type:u}))];case 5:throw y(s.Vai.cui);case 6:return[2]}})}).call(this)},t}();Jb(function(t){return function(i){return function(i){function n(n,r){var e;(e=i.call(this,n,r)||this).Fpi=void 0,e.Upi=!1,e.T2t=void 0,e.Hpi=void 0,e.Vpi=function(t){13===t.which&&e.T2t.click(),e.jP()};var s,u,o,h=e.zP(),a=r.ads.googleIma.useAdUiElementForSsai,c=null!=(s=r.ads.googleIma.allowSeekingForGoogleDai)&&s;try{var f;a?(e.Hpi=v.createElement("div"),ln(e.Hpi),e.Hpi.className="theo-dai-ad-ui"):(e.T2t=v.createElement("button"),e.T2t.className=h8),u=t(h,e.T2t,e.Hpi),o=new v8(u,e);var d=null!=(f=e.T2t)?f:e.Hpi;d&&e.xe.appendChild(d),e.Upi=!0}catch(t){e.T2t=void 0,e.Hpi=void 0}var l=new d8(u);return e.Fpi=new c8(e,u,o,l,c),e.T2t&&(e.T2t.addEventListener("keydown",e.Vpi),e.T2t.addEventListener("click",e.Vpi)),e}Pt(n,i);var r=n.prototype;return r.xa=function(){var t=i.prototype.xa.call(this),n=t.ads;if(n){var r=this.Fpi.Ca;Wg(n,{get dai(){return r}})}return t},r.vpi=function(t){i.prototype.Xx.call(this,t)},r.Xx=function(t,i){this.Fpi.Xx(t)},r.gpi=function(){return i.prototype.EP.call(this)},r.EP=function(){return this.Fpi.EP()},r.Ta=function(t){return this.Fpi.hr(),i.prototype.Ta.call(this,t)},r.ppi=function(t,n){var r=this;return jt(function(){return zt(this,function(e){return[2,i.prototype.drt.call(r,t,n)]})})()},r.drt=function(t,i){return jt(function(){return zt(this,function(n){return[2,this.Fpi.drt(t,i)]})}).call(this)},r.Spi=function(){return i.prototype.Yx.call(this)},r.Tpi=function(){return i.prototype.Zx.call(this)},r.Yx=function(){return this.Fpi.lt},r.Zx=function(){return this.Fpi.Jx},r.kpi=function(){i.prototype.kn.call(this)},r.kn=function(){this.Fpi.kn(),this.T2t&&(Zi(this.T2t),this.T2t.removeEventListener("keydown",this.Vpi),this.T2t.removeEventListener("click",this.Vpi),this.T2t=void 0),this.Hpi&&(Zi(this.Hpi),this.Hpi=void 0)},xt(n,[{key:"Kl",get:function(){return this.Upi}}]),n}(i)}}(function(t,i,n){if(!(f.google&&f.google.ima&&Wi(f.google.ima.dai)))throw new y("Could not find Google\u2019s IMA DAI HTML5 SDK, all DAI sources will be ignored.");var r=d5(),e=new google.ima.dai.api.StreamManager(t,n),s=d5();return new h5(e,i,s&&s!==r?s:void 0)}),$b.Ant),V(),It(),V(),It(),Dt(),Ut(),V(),It(),Bt();var l8=function(){function t(t,i){var n=this;this.oa=void 0,this.jpi=void 0,this.Gpi=void 0,this.nmi=void 0,this.Zpi=void 0,this.rmi=void 0,this.tmi=void 0,this.fmi=void 0,this.emi=void 0,this.ami=void 0,this.qpi=void 0,this.dci=void 0,this.kgi=void 0,this.Cci=void 0,this.Qpi=void 0,this.Kpi=void 0,this.u8=void 0,this.Ypi=void 0,this.EBt=void 0,this.umi=void 0,this.oa=t,this.jpi=i,this.nmi=!1,this.Zpi=!1,this.rmi=[],this.tmi=-1/0,this.emi=!1,this.dci=function(){n.nmi||(n.jpi.vmi(),n.emi&&n.jpi.omi(),n.nmi=!0)},this.kgi=function(){n.jpi._mi(),n.Zpi=!0},this.Cci=function(){n.tmi0&&(e.Ls.style.cursor="pointer",e.Ls.addEventListener("click",e.lyi))},e.Kwi=function(){e.Ls.style.cursor="",e.Ls.removeEventListener("click",e.lyi)},e.lyi=function(){e.hti&&e.hti.Rwi.getRendererController().processEvent({name:tv.freewheel.SDK.EVENT_AD_CLICK})},e.Ywi=function(t){switch(t.subType){case tv.freewheel.SDK.EVENT_AD_COMPLETE:e.uyi();break;case tv.freewheel.SDK.EVENT_AD_SKIPPED:e.P2t(),e.uyi()}},e}Pt(i,t);var n=i.prototype;return n.Nwi=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return this.Bwi=t,this.Mwi=i,this.Lwi(t),[4,i];case 1:return n.sent(),this.Owi(),[2]}})}).call(this)},n.Owi=function(){this.Gwi()},n.Lwi=function(t){t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.Xwi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.jwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.Qwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION_END,this.Kwi),t.addEventListener(tv.freewheel.SDK.EVENT_AD,this.Ywi)},n.Jwi=function(){this.Bwi&&(this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.Xwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.jwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.Qwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION_END,this.Kwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_AD,this.Ywi))},n.Gwi=function(){this.Uwi=this.Zwi(this.$wi),this.Hwi=this.Zwi(this.tyi).concat(this.Zwi(this.iyi)),this.qwi=this.Zwi(this.eyi),this.zwi=this.Uwi.concat(this.Hwi).concat(this.qwi)},n.Zwi=function(t){if(!this.Bwi)return[];var i=this.Bwi.getSlotsByTimePositionClass(t);return this.syi(i)},n.nyi=function(t){if(this.w1t){var i=t.getSlot().getAdInstances().indexOf(t);-1!==i&&(this.w1t.Cwi=i);var n=this.w1t.Pwi;return n&&(n.Rwi=t),n}},n.ryi=function(t){return Wn(this.zwi,function(i){return i.Ewi===t})},n.syi=function(t){return t.map(function(t){var n=t.getTotalDuration(),r=i.hyi(t);return new N8(n,n,r,t)})},n.P2t=function(){var t=this.hti;t&&this.So(new s1(t,this.ayi()))},n.uyi=function(){var t=this.hti;t&&(this.So(new mO(t,t.Rwi.getPlayheadTime())),this.u1t=void 0)},n.cyi=function(t){var i=this.Fnt;i&&(i.X0t=function(t,i,n){void 0===n&&(n=0);for(var r=0,e=t.Jc.length,s=i;s=0)(i=t).push.apply(i,[].concat(this.w1t.Jc.slice(n+1)))}for(var r,e=Ft(this.zwi);!(r=e()).done;){var s,u=r.value;(s=t).push.apply(s,[].concat(u.Jc))}return t}},{key:"Vnt",get:function(){return this.zwi}}]),i}(hh);V(),It(),Bt(),Dt(),Ut();var M8=function(t){function i(i,n,r,e){var s;return(s=t.call(this)||this).oa=void 0,s.sc=void 0,s.Pyt=void 0,s.A2t=void 0,s.H4=void 0,s.Spt=void 0,s.Cz=void 0,s.cA=void 0,s.Zb=void 0,s.Ayi=void 0,s.h5=void 0,s.o5=void 0,s.xz=void 0,s.Eyi=void 0,s.kyi=void 0,s._yi=void 0,s.pyi=void 0,s.xyi=void 0,s.vm=void 0,s.myi=void 0,s.wyi=void 0,s.yyi=void 0,s.Ed=void 0,s.gyi=void 0,s.oa=i,s.sc=n,s.Pyt=r,s.A2t=e,s.H4=LA.rL()._s(),s.Cz=!0,s.Zb=NaN,s.Ayi=!1,s.h5=!1,s.o5=jy.zL,s.xz=0,s.kyi=0,s._yi=function(t){switch(t.subType){case tv.freewheel.SDK.EVENT_AD_PAUSE:(function(t){if(!t)return!0;var i=t.Rwi,n=i.getPlayheadTime(),r=i.getDuration();return n>=r||Dn(r,n)})(s.Pyt.hti)||(s.lP=!0,s.So(new kT(s.zx)));break;case tv.freewheel.SDK.EVENT_AD_RESUME:s.lP=!1,s.So(new Gy(s.zx));break;case tv.freewheel.SDK.EVENT_AD_VOLUME_CHANGE:if(s.Spt){var i=s.Spt.getAdVolume();0===i?s.Ayi=!0:s.cA=i,s.So(new RT(s.zx,s.OP))}}},s.pyi=function(){s.Qx=!1;var t=s.lP;if(s.lP=!1,t&&(s.So(new bT(s.zx)),s.So(new Gy(s.zx))),s.o5=jy.XL,s.zx=0,s.Pyt.hti){var i=s.Pyt.hti.Rwi;s.Zb=i.getDuration(),s.So(new AT(s.Zb)),s.Eyi=m(function(){if(s.aoi){s.Pyt.cyi(s.zx);var t=i.getPlayheadTime();Pn(t,s.kyi,.001)||s.So(new Rg(t,void 0)),s.kyi=t}else s.vm()},250),s.Spt&&s.Spt.setAdVolume(L8(s.oP,s.OP))}},s.xyi=function(){var t=s.Pyt.hti;t&&(t.V4t===K0.L4t?s.oa.jP():s.lP||s.jP())},s.vm=function(){p(s.Eyi),s.Eyi=void 0},s.myi=function(){s.vm(),s.Qx=!0},s.wyi=function(){s.Tyi("pause")},s.yyi=function(){s.Tyi("playing")},s.Ed=function(t){t.od.V4t===K0.BZt&&(s.lP=!1)},s.gyi=function(){s.Spt&&s.Spt.resize(s.sc.Eu,s.sc.Iu)},s.cA=i.OP,r.wn("Ynt",s.Ed),s.sc.wn(AI.yn,s.gyi),s.A2t.addEventListener("click",s.xyi),s}Pt(i,t);var n=i.prototype;return n.fyi=function(){this.Spt&&this.Spt.setAdVolume(L8(this.oP,this.OP))},n.vyi=function(t){this.Spt=t,this.Lwi(t)},n.Lwi=function(t){t.addEventListener(tv.freewheel.SDK.EVENT_AD,this._yi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.gyi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.pyi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_COMPLETE,this.myi),t.addEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_PAUSE_REQUEST,this.wyi),t.addEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_RESUME_REQUEST,this.yyi)},n.byi=function(){var t=this.Spt;t&&(t.removeEventListener(tv.freewheel.SDK.EVENT_AD,this._yi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.gyi),t.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.pyi),t.removeEventListener(tv.freewheel.SDK.EVENT_AD_COMPLETE,this.myi),t.removeEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_PAUSE_REQUEST,this.wyi),t.removeEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_RESUME_REQUEST,this.yyi))},n.QP=function(){this.Pyt.Fnt&&(this.Pyt.Fnt.Ewi.resume(),this.lP=!1)},n.jP=function(){this.Pyt.Fnt&&(this.Pyt.Fnt.Ewi.pause(),this.lP=!0)},n.Tyi=function(t){var n=i.Syi(t);this.Spt&&n&&this.Spt.setVideoState(n)},n.uD=function(){var t=this.Pyt.hti;t&&t.Rwi.skip()},n.hr=function(){if(this.byi(),this.Spt){this.Tyi("stop"),this.Spt.setVideoState(tv.freewheel.SDK.VIDEO_STATE_STOPPED);for(var t,i=Ft(this.Spt.getTemporalSlots());!(t=i()).done;){t.value.stop()}this.Spt.dispose(),this.Spt=void 0}this.Zb=NaN,this.Qx=!1,this.o5=jy.zL,this.zx=0,this.kyi=0,this.lP=!0,void 0!==this.Eyi&&(p(this.Eyi),this.Eyi=void 0)},n.kn=function(){this.hr(),this.Vo(),this.Pyt.mn("Ynt",this.Ed),this.sc.mn(AI.yn,this.gyi),this.A2t.removeEventListener("click",this.xyi)},i.Syi=function(t){switch(t){case"pause":return tv.freewheel.SDK.VIDEO_STATE_PAUSED;case"playing":return tv.freewheel.SDK.VIDEO_STATE_PLAYING;case"ended":return tv.freewheel.SDK.VIDEO_STATE_COMPLETED;case"stop":return tv.freewheel.SDK.VIDEO_STATE_STOPPED}},xt(i,[{key:"zx",get:function(){var t=this.Pyt.hti;return t&&(this.zx=t.Rwi.getPlayheadTime()),this.xz},set:function(t){this.xz=t}},{key:"ct",get:function(){return this.Zb}},{key:"aoi",get:function(){return!!this.Pyt&&void 0!==this.Pyt.Fnt}},{key:"lP",get:function(){return this.Cz},set:function(t){this.Cz=t}},{key:"OP",get:function(){return this.cA},set:function(t){this.Spt&&this.Spt.setAdVolume(t),this.cA=t}},{key:"oP",get:function(){return this.Spt&&(this.Ayi=0===this.Spt.getAdVolume()),this.Ayi},set:function(t){this.Spt&&this.Spt.setAdVolume(L8(t,this.OP)),this.Ayi=t}},{key:"kP",get:function(){return this.H4}},{key:"Qx",get:function(){return this.h5},set:function(t){this.h5=t}},{key:"AP",get:function(){return this.o5}}]),i}(hh);function L8(t,i){return t?0:i}V(),It(),Wt(),Ut(),Yt(),V(),It(),Bt(),Dt();var F8=function(t){function i(){return t.call(this,"A FreeWheel Ad Error occurred")||this}return Pt(i,t),xt(i,[{key:"name",get:function(){return R8.swi}}]),i}(gr);V(),It(),Bt(),Dt();var U8=function(t){function i(){return t.call(this,"A FreeWheel Reset Error Occurred")||this}return Pt(i,t),xt(i,[{key:"name",get:function(){return R8.ewi}}]),i}(gr),V8=0;function j8(){return"cue-"+ ++V8}var H8=function(){function t(t,i,n,r){var e=this;this.Spt=void 0,this.Cyi=void 0,this.Ryi=void 0,this.Spt=i,this.Ryi=function(t){e.Spt.removeEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,e.Ryi),t.success?e.Cyi.Qy(void 0):e.Cyi.Ky(new F8)},this.Pyi(t,n,r),i.addEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Ryi),this.Cyi=new Xa}var i=t.prototype;return i.Pyi=function(t,i,n){t.setNetwork(i.networkId),t.setServer(i.adServerUrl);var r=this.Spt;if(r.setProfile(i.profile),i.assetId&&i.assetDuration&&r.setVideoAsset(i.assetId,i.assetDuration),i.siteSectionId&&r.setSiteSection(i.siteSectionId),r.registerVideoDisplayBase(n),i.cuePoints&&i.cuePoints.length)for(var e,s=Ft(i.cuePoints);!(e=s()).done;){var u=e.value;r.addTemporalSlot(j8(),u.adUnit,u.timeOffset)}var o=i.customData;if(Wi(o))for(var h,a=Ft(b.keys(o));!(h=a()).done;){var c=h.value,f=o[c];r.addKeyValue(c,f)}},i.Iyi=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return this.Spt.submitRequest(),[4,this.Cyi.Yy];case 1:return t.sent(),[2]}})}).call(this)},i.hr=function(){this.Spt.removeEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Ryi),this.Cyi.Ky(new U8)},t}();V(),It(),Wt(),Ut(),Yt(),V(),It(),Bt();var W8=function(){function t(t){var i=this;this.Bwi=void 0,this.Jg=void 0,this.jwi=void 0,this.i7t=void 0,this.Bwi=t,this.jwi=function(t){i.Dyi(),i.Jg.Qy(void 0)},this.i7t=function(t){i.Dyi(),i.Jg.Ky(new F8)},this.Jg=new Xa,t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.jwi),t.addEventListener(tv.freewheel.SDK.EVENT_ERROR,this.i7t)}var i=t.prototype;return i.Dyi=function(){this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.jwi),this.Bwi.removeEventListener(tv.freewheel.SDK.EVENT_ERROR,this.jwi)},i.gWt=function(){this.Dyi(),this.Jg.Ky(new U8)},xt(t,[{key:"Nyi",get:function(){return this.Jg.Yy}}]),t}(),z8=function(){function t(t,i){var n=this;this.oa=void 0,this.Myi=void 0,this.tMt=void 0,this.Lyi=void 0,this.Bwi=void 0,this.Oyi=void 0,this.oa=t,this.Myi=i,this.tMt=0,this.Oyi=function(){for(var t,i=n.oa.Gx(),r=Ft(n.Myi.Vwi);!(t=r()).done;){var e=t.value,s=new LA([n.tMt,i],[!0,!0]),u=e.Ewi.getTimePosition();if(s.Cr(u))switch(e.Ewi.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL:n.Byi([e]);break;case tv.freewheel.SDK.TIME_POSITION_CLASS_OVERLAY:e.Ewi.play(),e.Ewi.setVisible(!0)}}n.tMt=i},t.wn(ch.py,this.Oyi)}var i=t.prototype;return i.lO=function(t){this.Bwi=t},i.Swi=function(){return this.Byi(this.Myi.Fwi)},i.gwi=function(){this.Byi(this.Myi.Wwi)},i.Byi=function(t){return jt(function(){var i,n;return zt(this,function(r){switch(r.label){case 0:if(!this.Bwi)return[2];r.label=1;case 1:if(!(t.length>0))return[3,6];this.Lyi=new W8(this.Bwi),i=this.Lyi.Nyi,(n=this.Myi.Fnt)&&n.V4t===K0.L4t&&n.Ewi.stop(),t.shift().Ewi.play(),r.label=2;case 2:return r.trys.push([2,,4,5]),[4,i];case 3:return r.sent(),[3,5];case 4:return this.Lyi=void 0,[7];case 5:return[3,1];case 6:return[2]}})}).call(this)},i.hr=function(){this.Lyi&&(this.Lyi.gWt(),this.Lyi=void 0),this.tMt=0},i.kn=function(){this.oa.mn(ch.py,this.Oyi)},t}(),q8=0,X8=function(t){function i(n,r,e){var s;return(s=t.call(this)||this).oa=void 0,s.pT=void 0,s.Fyi=void 0,s.Uyi=void 0,s.qyi=void 0,s.A2t=void 0,s.K9t=void 0,s.Hyi=void 0,s.Vyi=void 0,s.c$t=void 0,s.Wyi=void 0,s.oa=n,s.pT=r,s.Wyi=!1,s.Uyi=i.createUniqueDisplayBaseId(),s.A2t=i.zyi(n.xe,r,s.Uyi),s.Fyi=new f.tv.freewheel.SDK.AdManager,s.qyi=new O8(s.A2t,s.pT),s.Vyi=new z8(s.oa,s.dwi),s.au(s.dwi),s.K9t=new M8(n,e,s.dwi,s.A2t),s}Pt(i,t);var n=i.prototype;return n.r8t=function(){return jt(function(){var t,i,n,r;return zt(this,function(e){switch(e.label){case 0:if(!this.c$t)throw new y("Invalid state");t=this.Fyi,(i=t.newContext()).setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_VIDEO_DISPLAY_CONTROLS_WHEN_PAUSE,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL),i.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_CONTENT_VIDEO_ENABLED,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL),n=new H8(t,i,this.c$t,this.Uyi),r=this.dwi.Nwi(i,n.Iyi()),this.Vyi.lO(i),this.fwi.vyi(i),this.Hyi=n,e.label=1;case 1:return e.trys.push([1,,3,4]),[4,r];case 2:return e.sent(),[3,4];case 3:return this.fwi.fyi(),this.Wyi=!0,[7];case 4:return[2]}})}).call(this)},n.l4t=function(t){this.fwi.Tyi(t.type)},n.be=function(){this.A2t.style.display="block",this.pT.style.display="block"},n.we=function(){this.A2t.style.display="none",this.pT.style.display="none"},n.Cti=function(t){this.c$t=t},n.hr=function(){this.Wyi=!1,this.c$t=void 0,this.dwi.hr(),this.Vyi.hr(),this.Hyi&&(this.Hyi.hr(),this.Hyi=void 0),this.fwi.hr(),this.pT.src=""},n.kn=function(){this.hr(),this.K9t.kn(),this.Vyi.kn(),this.dwi.kn(),this.A2t.remove(),Zi(this.A2t)},i.createUniqueDisplayBaseId=function(){return"theo-freewheel-"+ ++q8},i.zyi=function(t,i,n){var r=v.createElement("div");return r.id=n,r.className="theo-freewheel",i.classList.add("theo-freewheel-video"),r.appendChild(i),t.appendChild(r),r},xt(i,[{key:"_wi",get:function(){return 0!==this.dwi.Wwi.length}},{key:"Awi",get:function(){return 0!==this.dwi.Fwi.length}},{key:"fwi",get:function(){return this.K9t}},{key:"dwi",get:function(){return this.qyi}},{key:"wwi",get:function(){return this.Wyi}},{key:"pwi",get:function(){return this.Vyi}}]),i}(XI);function G8(t){if(f.tv)switch(t){case"preroll":return tv.freewheel.SDK.ADUNIT_PREROLL;case"midroll":return tv.freewheel.SDK.ADUNIT_MIDROLL;case"postroll":return tv.freewheel.SDK.ADUNIT_POSTROLL;case"overlay":return tv.freewheel.SDK.ADUNIT_OVERLAY}}function Q8(t,i,n){if(void 0!==i&&E(i)||i<0||i===1/0)return NaN;switch(t){case"preroll":return 0;case"postroll":return n}return lZ(i)}var Y8=function(){function t(){}var i=t.prototype;return i.Qz=function(t){return t.integration===DS.FREEWHEEL},i.e4t=function(t,i,n){if(Boolean(f.tv&&f.tv.freewheel&&f.tv.freewheel.SDK&&f.tv.freewheel.SDK.AdManager)){var r=new CB(t.Wu,t.Ql,n,1,[vw.Mk]);r.Est(t.xe);var e=r.Yq(vw.Mk),s=new X8(t,e.hq,t.Wu);return new D8(t,i,r,s,e)}},i.uj=function(t){var i=zg(t);ji(i.cuePoints)||(i.cuePoints=[]);for(var n,r=[],e=t.assetDuration||0,s=Ft(i.cuePoints);!(n=s()).done;){var u=n.value,o=Q8(u.adUnit,u.timeOffset,e),h=G8(u.adUnit);!E(o)&&qi(h)?(u.adUnit=h,u.timeOffset=o,r.push(u)):Vi.um("Invalid adUnit/timeOffset combination. Cue was removed.")}return i.cuePoints=r,i},i.W6=function(t,i,n,r){n.Cti(t,i,r)},xt(t,[{key:"i4t",get:function(){return n0._1t}}]),t}();NS.Bg.Kz(new Y8),V(),It(),V(),It(),V(),It(),Dt(),V(),It(),V(),It();var $8,K8=self.theoplayerDeviceMetadata;function J8(t){return t.navigator&&t.navigator.userAgent||""}V(),It(),V(),It(),V(),It(),V(),It();var Z8=(($8={})["Windows 10"]=/(Windows 10.0|Windows NT 10.0)/i,$8["Windows 8.1"]=/(Windows 8.1|Windows NT 6.3)/i,$8["Windows 8"]=/(Windows 8|Windows NT 6.2)/i,$8["Windows 7"]=/(Windows 7|Windows NT 6.1)/i,$8["Windows Vista"]=/Windows NT 6.0/i,$8["Windows Server 2003"]=/Windows NT 5.2/i,$8["Windows XP"]=/(Windows NT 5.1|Windows XP)/i,$8["Windows Phone"]=/Windows Phone/i,$8.Android=/Android/i,$8.Linux=/(Linux(?!.*Ubuntu)|X11)/,$8.Ubuntu=/Ubuntu/i,$8.iOS=/(iPhone|iPad|iPod)/i,$8["Mac OS X"]=/Mac OS X/i,$8["Mac OS"]=/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/i,$8["Chrome OS"]=/CrOS/i,$8);function t7(t,i){var n=Z8[i];return!!n&&Boolean(J8(t).match(n))}function i7(t){return t7(t,"Android")}function n7(t){return t7(t,"Windows Phone")}function r7(t){return t7(t,"iOS")&&!n7(t)}function e7(t){return t7(t,"Ubuntu")}var s7,u7,o7=/Windows (NT|Phone) ([0-9.]+)/i,h7=/Mac.*?(OS |OS X )(\d+(([_.])\d+)?(([_.])\d+)?)/i,a7=((s7={})["Windows 10"]=o7,s7["Windows 8.1"]=o7,s7["Windows 8"]=o7,s7["Windows 7"]=o7,s7["Windows Vista"]=o7,s7["Windows Server 2003"]=o7,s7["Windows XP"]=o7,s7["Windows Phone"]=/Windows Phone ([0-9.]+)/i,s7.Android=/Android (\d+(([_.])\d+)?(([_.])\d+)?)/i,s7.Linux=void 0,s7.Ubuntu=void 0,s7.iOS=/(iPad|iPhone|iPod).*?(OS |os |OS_)(\d+(([_.])\d+)?(([_.])\d+)?)/i,s7["Mac OS X"]=h7,s7["Mac OS"]=h7,s7["Chrome OS"]=void 0,s7);function c7(t,i){var n=a7[i];return n?J8(t).match(n):null}function f7(t){return t.split(/[_.]/).map(function(t){return T(t,10)})}function v7(t){if(function(t){return Boolean(J8(t).match(/Windows/i))}(t)){if(function(t){return t7(t,"Windows 10")}(t))return"Windows 10";if(n7(t))return"Windows Phone";if(function(t){return t7(t,"Windows 8.1")}(t))return"Windows 8.1";if(function(t){return t7(t,"Windows 8")}(t))return"Windows 8";if(function(t){return t7(t,"Windows 7")}(t))return"Windows 7";if(function(t){return t7(t,"Windows Vista")}(t))return"Windows Vista";if(function(t){return t7(t,"Windows Server 2003")}(t))return"Windows Server 2003";if(function(t){return t7(t,"Windows XP")}(t))return"Windows XP"}else{if(i7(t))return"Android";if(r7(t))return"iOS";if(function(t){return t7(t,"Mac OS X")}(t))return"Mac OS X";if(function(t){return t7(t,"Mac OS")}(t))return"Mac OS";if(e7(t))return"Ubuntu";if(function(t){return t7(t,"Chrome OS")}(t))return"Chrome OS";if(function(t){return t7(t,"Linux")&&!e7(t)}(t))return"Linux"}}function d7(t,i){var n=function(t){var i=c7(t,"Windows 10");return i&&i.length>2?f7(i[2]):void 0}(t),r=function(t){var i=c7(t,"Mac OS X");return i&&i.length>2?f7(i[2]):void 0}(t),e=function(t){var i=c7(t,"Android");return i&&i.length>1?f7(i[1]):void 0}(t),s=function(t){var i=c7(t,"iOS");return i&&i.length>3?f7(i[3]):void 0}(t),u=function(t){var i=c7(t,"Chrome OS");return i&&i.length>0?f7(i[0]):void 0}(t);return n?n.length>i?n[i]:void 0:r?r.length>i?r[i]:void 0:e?e.length>i?e[i]:void 0:s?s.length>i?s[i]:void 0:u&&u.length>i?u[i]:void 0}function l7(t){var i=function(t){return d7(t,0)}(t),n=function(t){return d7(t,1)}(t),r=function(t){return d7(t,2)}(t);if(void 0!==i)return void 0===n?""+i:void 0===r?i+"."+n:i+"."+n+"."+r}var g7=((u7={}).Chrome=/Chrome/i,u7["Chrome Mobile"]=void 0,u7["Chrome iOS"]=/CriOS/i,u7.Chromium=/Chromium/i,u7.HeadlessChrome=/HeadlessChrome/i,u7.Firefox=/Firefox/i,u7.Seamonkey=/Seamonkey/i,u7["Firefox iOS"]=/FxiOS/i,u7.Safari=/Safari/i,u7.Edge=/Edge\/\d+/i,u7["Edge Chromium"]=/Edg\/\d+/i,u7.IE=/Trident/i,u7.Opera=/Opera|OPR/i,u7.Vivaldi=/Vivaldi/i,u7["Android Browser"]=void 0,u7);function w7(t,i){var n=g7[i];return!!n&&Boolean(J8(t).match(n))}function m7(t){return Boolean(J8(t).match(/Mobi/i))}function p7(t){return Boolean(t.chrome&&t.navigator&&t.navigator.vendor&&/google/i.test(t.navigator.vendor))||y7(t)}function y7(t){return w7(t,"Chrome iOS")}function _7(t){return w7(t,"Firefox")&&!b7(t)}function k7(t){return w7(t,"Firefox Mobile")&&!b7(t)&&m7(t)}function b7(t){return w7(t,"Seamonkey")}function A7(t){return w7(t,"Firefox iOS")&&!b7(t)}function T7(t){return w7(t,"Safari")&&!w7(t,"Chrome")&&!Oi.Wv}function S7(t){return Boolean(B7(t))}function E7(t){return w7(t,"Edge")}function I7(t){return w7(t,"Edge Chromium")}function R7(t){return w7(t,"IE")}function C7(t){return w7(t,"Vivaldi")}var P7,D7=/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i,N7=((P7={}).Chrome=D7,P7["Chrome Mobile"]=D7,P7["Chrome iOS"]=/CriOS\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i,P7.Chromium=D7,P7.HeadlessChrome=D7,P7.Firefox=/Firefox\/([0-9.]+)/i,P7["Firefox iOS"]=/FxiOS\/([0-9.]+)/i,P7.Safari=/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/,P7["Safari Mobile"]=void 0,P7.Edge=/Edge\/(\d+)/i,P7["Edge Chromium"]=/Edg\/(\d+)/i,P7["Edge Mobile"]=void 0,P7.IE=/(MSIE |Trident.*?rv:)(\d+)/i,P7.Opera=/(OPR\/(\d+\.\d+))|(Opera(?=.*Version\/((\d+)\.(\d+))))/i,P7["Opera Mobile"]=void 0,P7.Vivaldi=/Vivaldi\/((\d+)\.(\d+)\.(\d+)(?:\.(\d+))?)/i,P7["Android Browser"]=void 0,P7);function x7(t,i){var n=N7[i];return n?J8(t).match(n):null}function B7(t){return x7(t,"Opera")}function O7(t){var i=function(t){return x7(t,"Firefox")}(t);return i?S(i[1]):0}function M7(t){var i=function(t){return x7(t,"Firefox iOS")}(t);return i?S(i[1].split(".")[0]):0}function L7(t){var i=function(t){return x7(t,"Safari")}(t);return i?S(i[2].split(".")[0]):0}function F7(t){var i=function(t){return x7(t,"Edge")}(t);return i?S(i[1]):0}function U7(t){var i=function(t){return x7(t,"Edge Chromium")}(t);return i?S(i[1]):0}function V7(t){var i=function(t){return x7(t,"IE")}(t);return i?S(i[2]):0}function j7(t){var i=function(t){return x7(t,"Vivaldi")}(t);return i?S(i[1]):0}function H7(t){if(i7(t))return p7(t)?"Chrome Mobile":_7(t)||k7(t)?"Firefox Mobile":E7(t)?"Edge Mobile":S7(t)?"Opera Mobile":"Android Browser";if(r7(t)){if(p7(t)||y7(t))return"Chrome iOS";if(_7(t)||A7(t))return"Firefox iOS";if(E7(t))return"Edge Mobile";if(T7(t)||function(t){return T7(t)&&m7(t)}(t))return"Safari Mobile";if(S7(t))return"Opera Mobile"}return function(t){return w7(t,"Chromium")}(t)?"Chromium":function(t){return w7(t,"HeadlessChrome")}(t)?"HeadlessChrome":p7(t)?"Chrome":_7(t)?"Firefox":T7(t)?"Safari":E7(t)?"Edge":I7(t)?"Edge Chromium":R7(t)?"IE":S7(t)?"Opera":C7(t)?"Vivaldi":void 0}function W7(t){return C7(t)?j7(t):y7(t)?Number(function(t){var i=N7["Chrome iOS"];return i&&i.exec(J8(t))||[]}(t)[1]):p7(t)?Number(function(t){var i=N7.Chrome;return i&&i.exec(J8(t))||[]}(t)[1]):_7(t)||k7(t)?O7(t):A7(t)?M7(t):T7(t)?L7(t):E7(t)?F7(t):I7(t)?U7(t):R7(t)?V7(t):S7(t)?function(t){var i=B7(t);return i&&i[0].indexOf("Opera")>-1?S(i[5]):i?S(i[2].split(".")[0]):0}(t):void 0}var z7=function(t){return t.Gyi="pc",t.Xyi="console",t.jyi="settop",t.Qyi="mobile",t.Kyi="tablet",t.Yyi="smarttv",t.Jyi="searchbot",t}({});function q7(t){var i=J8(t);return i.match(/CrKey|Roku|AFTS|AppleTV|Nexus Player/i)?"settop":i.match(/Xbox|Playstation|Wii|Nintendo/i)?"console":/(iPad|Tablet|(Android(?!.*Mobi))|(Windows(?!.*Phone)(.*Touch))|Kindle|Playbook|Silk|(Puffin(?!.*(IP|AP|WP))))/i.test(i)?"tablet":/Mobi/.test(i)?"mobile":i.match(/GoogleTV|SmartTV|SMART-TV|Internet TV|NetCast|NETTV|boxee|Kylo|DLNADOC|hbbtv|CE-HTML/i)?"smarttv":i.match(/(nuhk|Googlebot|bingbot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/i)?"searchbot":function(t){return Boolean(H7(t))}(t)?"pc":void 0}var X7=function(){function t(t,i){var n=this;this.empClient=void 0,this.agama=void 0,this.ibi=void 0,this.empClient=t,this.agama=i,this.ibi=function(){var t=Vi.Rx;switch(t){case"wifi":n.empClient.setDeviceMetadata(n.agama.DeviceMetadata.DATA_CONNECTION_TYPE,"wlan");break;case"ethernet":n.empClient.setDeviceMetadata(n.agama.DeviceMetadata.DATA_CONNECTION_TYPE,t);break;case"cellular":var i=function(t){switch(t){case"3g":return"mobile/3G";case"4g":return"mobile/4G";default:return}}(Vi.Cx);i&&n.empClient.setDeviceMetadata(n.agama.DeviceMetadata.DATA_CONNECTION_TYPE,i)}}}var i=t.prototype;return i.aj=function(t){this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_ID,t.deviceID||function(){var t=Vd.zy("deviceId");if(t)return t;var i=YS();return Vd.Gy("deviceId",i),i}()),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.PLAYER,"THEOplayer"),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.PLAYER_VERSION,"10.3.0"),this.Zyi(t),this.$yi(),this.tbi(t),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.EMPCLIENT_INTEGRATION_VERSION,"3.0"),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.EMPCLIENT_INTEGRATION_BUILDDATE,"2023-04-17 12:00:00"),t.application&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.APPLICATION,t.application),t.applicationVersion&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.APPLICATION_VERSION,t.applicationVersion),t.userAccountID&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.USER_ACCOUNT_ID,t.userAccountID);var i=t.connectionType;i?this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,i):(this.ibi(),l.connection&&l.connection.addEventListener&&l.connection.addEventListener("change",this.ibi))},i.Zyi=function(t){this.ebi(t);var i=t.deviceManufacturer||K8&&K8.manufacturer;i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_MANUFACTURER,i);var n=t.deviceModel||K8&&K8.model;n&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_MODEL,n)},i.ebi=function(t){var i=t.deviceType||function(){var t=q7(self);switch(t){case z7.Xyi:return"game-console";case z7.Yyi:return"tv";case z7.jyi:return"media-streamer";default:return t}}();i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_TYPE,i)},i.$yi=function(){var t=H7(self);t&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_BROWSER,t);var i=W7(self);void 0!==i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_BROWSER_VERSION,i.toString())},i.tbi=function(t){var i=t.deviceOs||v7(self);i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_OS,i);var n=t.deviceOsVersion||l7(self);n&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_OS_VERSION,n.toString())},i.kn=function(){l.connection&&l.connection.removeEventListener&&l.connection.removeEventListener("change",this.ibi)},t}();var G7=function(t){function i(){var i;return(i=t.call(this)||this).rbi=void 0,i.WG=void 0,i.ko=!1,i.obi=!1,i.nbi=void 0,i.hbi=void 0,i.rbi=f.Agama,i}Pt(i,t);var n=i.prototype;return n.GP=function(t){this.nbi=t,this.rbi&&(this.WG=function(t,i){var n=function(t,i){switch(i){case"info":return t.LogLevel.INFO;case"debug":return t.LogLevel.DEBUG;case"warning":return t.LogLevel.WARNING;case"error":return t.LogLevel.ERROR;default:return t.LogLevel.FATAL}}(i,t.logLevel);i.setLogLevel(n);var r=new i.EMPClient(t.config);return function(t,i){return t.setExternalConfig(i.config),t}(r,t)}(t,this.rbi),this.WG&&(this.hbi=new X7(this.WG,this.rbi),this.ko=!0))},n.hj=function(){return this.rbi||console.warn("Please load the Agama Library (empclient.min.js) in order to use the integration"),Boolean(this.rbi)},n.nj=function(){return this.ko},n.OX=function(t,i){if(this.WG&&this.rbi)switch(t){case BS.oG:this.WG.setMeasurement(this.rbi.Measurement.BUFFER_LENGTH,i);break;case BS.aG:this.WG.setMeasurement(this.rbi.Measurement.BYTES_RECEIVED,i);break;case BS.cG:this.WG.setMeasurement(this.rbi.Measurement.SEGMENT_PROFILE_BITRATE,i);break;case BS.dG:this.WG.setMeasurement(this.rbi.Measurement.VIDEO_PROFILE_BITRATE,i);break;case BS.uG:this.WG.setMeasurement(this.rbi.Measurement.SEGMENT_READ_BITRATE,i);break;case BS.eG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_1XX,i);break;case BS.sG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_2XX,i);break;case BS.nG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_3XX,i);break;case BS.rG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_4XX,i);break;case BS.hG:this.WG.setMeasurement(this.rbi.Measurement.HTTP_REQUEST_STATUS_CODE_5XX,i);break;case BS.fG:this.WG.setMeasurement(this.rbi.Measurement.PLAYBACK_POSITION,i);break;case BS.vG:this.WG.setMeasurement(this.rbi.Measurement.NUMBER_OF_FRAMES_DECODED,i);break;case BS.lG:this.WG.setMeasurement(this.rbi.Measurement.NUMBER_OF_FRAMES_DROPPED,i)}},n.mX=function(t,i){if(this.WG&&this.rbi)switch(t){case OS.wG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.ASSET_DURATION,i);break;case OS.mG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.MANIFEST_URI,i);break;case OS.yG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.NUMBER_OF_CONTENT_PROFILES,i);break;case OS.SG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.SERVICE_NAME,i);break;case OS.bG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.CDN,i);break;case OS.AG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.CONTENT_TITLE,i);break;case OS.TG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.CONTENT_TYPE,i);break;case OS.kG:this.WG.setSessionMetadata(this.rbi.SessionMetadata.CONTENT_DESCRIPTION,i)}},n.aj=function(){this.hbi&&this.nbi&&this.hbi.aj(this.nbi)},n.rj=function(t,i){this.rbi&&this.WG&&(this.qX(),function(t,i,n,r){var e=$S(t,n,r);i.abrSession(e,t.ViewState.INITIAL_BUFFERING)}(this.rbi,this.WG,t,i),this.obi=!0)},n.kn=function(){this.hbi&&this.hbi.kn(),this.abi(MS.EG),this.WG=void 0},n.nX=function(t){this.ubi(t)},n.oX=function(t,i){this.WG&&this.WG.event(t.code,i)},n.qX=function(){this.WG&&this.obi&&(this.WG.exitSession(),this.obi=!1)},n.abi=function(t){if(this.WG&&this.rbi&&(this.qX(),t===MS.EG))this.WG.shutdown(this.rbi.ShutdownType.NORMAL_SHUTDOWN)},n.rX=function(t,i,n){this.ubi(t,i,n)},n.ubi=function(t,i,n){if(this.WG&&this.rbi)switch(t){case xS.PM:this.cbi(this.rbi.ViewState.PLAYING,i,n);break;case xS.$z:this.cbi(this.rbi.ViewState.FAILED,i,n);break;case xS.tG:this.cbi(this.rbi.ViewState.INITIAL_BUFFERING,i,n);break;case xS.Yz:this.cbi(this.rbi.ViewState.PAUSED,i,n);break;case xS.Jz:this.cbi(this.rbi.ViewState.SEEK,i,n);break;case xS.Zz:this.cbi(this.rbi.ViewState.STALLED,i,n);break;case xS.iG:this.cbi(this.rbi.ViewState.NO_ACCESS,i,n)}},n.cbi=function(t,i,n){if(this.WG)if(i){var r=function(t){return t||""}(n);this.WG.viewStateExtended(t,i.code,r)}else this.WG.viewStateChanged(t)},i}(US);Jb(function(t){return function(i){return function(i){function n(n,r){var e;return(e=i.call(this,n,r)||this).WG=new t,e.sbi=void 0,e.sbi=new JS(e,e.WG,r),e}Pt(n,i);var r=n.prototype;return r.Xx=function(t,n){this.sbi&&this.sbi.$G(),i.prototype.Xx.call(this,t)},r.kn=function(){this.sbi&&this.sbi.kn(),i.prototype.kn.call(this)},n}(i)}}(G7),$b.Snt),V(),It(),V(),It(),Dt(),V(),It(),V(),It(),Wt(),Bt(),Ut(),Yt(),V(),It();var Q7=function(t){return t.PLAY_ALL="play-all",t.PLAY_NONE="play-none",t.PLAY_LAST="play-last",t}({});V(),It();var Y7=function(t){return t.VOD="vod",t.LIVE="live",t}({}),$7=function(){function t(t,i,n,r,e,s,u){var o=this;this.oa=void 0,this.pbi=void 0,this.ybi=void 0,this.fbi=void 0,this.dbi=void 0,this.Pbi=void 0,this.vbi=void 0,this.wbi=void 0,this.nq=void 0,this.rq=void 0,this.T9=void 0,this.bbi=void 0,this.zbi=void 0,this._bi=void 0,this.T2t=void 0,this.Abi=void 0,this.dci=void 0,this.Cci=void 0,this.kgi=void 0,this.Pd=void 0,this.Tbi=void 0,this.hci=void 0,this.kbi=void 0,this.Ebi=void 0,this.xbi=void 0,this.qbi=void 0,this.oa=t,this.pbi=i,this.ybi=n,this.fbi=r,this.dbi=e,this.Pbi=s,this.vbi=u,this.nq=void 0,this.rq=void 0,this.T9=new dr,this.bbi=new dr,this.zbi=void 0,this._bi=!1,this.T2t=void 0,this.Abi=function(t){var i=t.currentSource;if(i&&i.integrationData){var n=i.integrationData,r=n.preplayResponse,e=n.source;o.dbi.Gbi(r),r&&r.type===Y7.VOD&&r.ads&&o.fbi.Cbi(r.ads),o.pbi.Xbi=i.integrationData,e.assetInfo&&Er(o.fetchAssetInfo(i))}},this.dci=function(){o._bi=!0},this.Cci=function(){o._bi&&o.Rbi(o.oa.Gx())},this.kgi=function(){o._bi&&(o.Rbi(1/0),o._bi=!1)},this.Pd=function(){Er(o.pbi.Tn())},this.Tbi=function(t){o.T9.Zg(),o.T9=new dr,Er(br(o.Xri(t.od.RO,o.T9.Yg),o.T9))},this.hci=function(){1!==o.oa.vP&&(o.zbi=o.oa.vP,o.oa.vP=1)},this.kbi=function(){void 0!==o.zbi&&(o.oa.vP=o.zbi,o.zbi=void 0)},this.Ebi=function(t){t.od.wn("Sbi",o.Tbi),t.od.wn("Ynt",o.hci),t.od.wn("Knt",o.kbi)},this.xbi=function(t){t.od.mn("Sbi",o.Tbi),t.od.mn("Ynt",o.hci),t.od.mn("Knt",o.kbi)},this.qbi=function(){o.oa.jP()},this.oa.wn(ch.Pw,this.Abi),this.oa.wn(ch.uo,this.dci),this.oa.wn(ch.py,this.Cci),this.oa.wn(ch.Nw,this.kgi),this.oa.wn(Fy.kM,this.Pd),this.fbi.K0t.wn("Xnt",this.Ebi),this.fbi.K0t.wn("Gnt",this.xbi)}var i=t.prototype;return i.lbi=function(t){this.nq=pw(t),this.rq=t,this.oa.So(new Cb(t))},i.Ta=function(t){this.fbi.resetSource(),this.vbi.jy(),this._bi=!1,this.oa.gbi(t)},i.drt=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return this.pbi.hr(),this._bi=!1,t&&function(t){return t.sources.some(function(t){return t.integration===YA.UPLYNK})}(t)?[3,2]:[4,this.oa.mbi(t,i)];case 1:return[2,e.sent()];case 2:return e.trys.push([2,5,,6]),n=this,[4,this.ybi.wpi(t)];case 3:return n.wbi=e.sent(),[4,this.oa.mbi(this.wbi,i)];case 4:return e.sent(),[3,6];case 5:return r=e.sent(),this.lbi(new _d(pd.MANIFEST_LOAD_ERROR,r.message,r)),[3,6];case 6:return[2]}})}).call(this)},i.kn=function(){this.T9.Zg(),this.bbi.Zg(),this.oa.mn(ch.Pw,this.Abi),this.oa.mn(ch.uo,this.dci),this.oa.mn(ch.py,this.Cci),this.oa.mn(ch.Nw,this.kgi),this.oa.mn(Fy.kM,this.Pd);for(var t,i=Ft(this.fbi.K0t.ec);!(t=i()).done;){var n=t.value;n.mn("Sbi",this.Tbi),n.mn("Ynt",this.hci),n.mn("Knt",this.kbi)}this.fbi.K0t.mn("Xnt",this.Ebi),this.fbi.K0t.mn("Gnt",this.xbi),this.fbi.destroy(),this.T2t&&(this.T2t.zg(),this.T2t=void 0),this._bi=!1},i.fetchAssetInfo=function(t){return jt(function(){var i;return zt(this,function(n){switch(n.label){case 0:if(!t||!t.integrationData)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.Pbi.KSt(t.integrationData.source.prefix,t.integrationData.source.id,this.bbi.Yg,t.integrationData.preplayResponse.sid)];case 2:return i=n.sent(),this.dbi.Ibi(i),this.vbi.Cbi(i,this.fbi.K0t.ec),[3,4];case 3:return n.sent(),[3,4];case 4:return[2]}})}).call(this)},i.Rbi=function(t){this.fbi.Dbi(t),this.fbi.Lnt.forEach(function(i){return i.Nbi(t)}),this.fbi.Bbi(this.oa.EP()),this.S2t()},i.Xx=function(t){this.fbi.Fnt||(this.T9.Zg(),this.T9=new dr,Er(br(this.Xri(t,this.T9.Yg),this.T9)))},i.Xri=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:if(pr(i),t0});if(t){var i=t.Wbi[0];this.T2t||(this.T2t=new c0(this.oa.xe),this.T2t.wn("clickstart",this.qbi)),this.T2t.O1t=i}else this.T2t&&(this.T2t.zg(),this.T2t=void 0)},xt(t,[{key:"Ca",get:function(){return this.dbi.Ca}},{key:"lt",get:function(){return this.nq}},{key:"Jx",get:function(){return this.rq}}]),t}();V(),It(),Wt(),Yt(),V(),It();var K7=Qk({breaksIndex:Vk,adsIndex:Vk,startTime:Vk,endTime:Vk}),J7=Qk({index:Vk,timeOffset:Vk}),Z7=Qk({duration:Vk,apiFramework:Zk(jk,qk),creative:jk,mimeType:jk,width:Vk,height:Vk,companions:ib(function(t){return new eb(t)}(function(){return Z7})),extensions:Zk(Wk,ib(zk)),fw_parameters:Zk(Wk,rb(jk)),events:rb(ib(jk))}),t9=Qk({type:Kk(["linear","nonlinear"]),position:Kk(["preroll","midroll","postroll","pause","overlay",""]),timeOffset:Vk,duration:Vk,ads:ib(Z7),events:rb(ib(jk))}),i9=Qk({breaks:ib(t9),breakOffsets:Zk(Wk,ib(J7)),placeholderOffsets:Zk(Wk,ib(K7))}),n9=Qk({required:Zk(Wk,Hk),fairplayCertificateURL:Zk(Wk,jk),widevineLicenseURL:Zk(Wk,jk),playreadyLicenseURL:Zk(Wk,jk)}),r9={type:Kk(Yk(Y7)),playURL:jk,prefix:jk,sid:jk,drm:Zk(Wk,n9)},e9=Qk(io({},r9,{type:Kk([Y7.VOD]),ads:i9,interstitialURL:Zk(jk,qk,Wk)})),s9=Zk(e9,Qk(io({},r9,{type:Kk([Y7.LIVE])})));V(),It();var u9,o9=jk,h9=Qk({userId:jk,externalId:Zk(jk,ib(jk))}),a9=function(){function t(t){this.aV=void 0,this.aV=t}var i=t.prototype;return i.KSt=function(t){return jt(function(){return zt(this,function(i){try{return[2,this.jbi(t)]}catch(t){throw t}return[2]})}).call(this)},i.jbi=function(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return[4,f9(t)];case 1:return i=e.sent(),[4,this.aV.vk({Hk:Tl.GET,Yu:i,fk:qd.BT})];case 2:return[4,e.sent().lk()];case 3:return n=e.sent(),r=io({},n,{type:t.assetType===eE.ASSET?Y7.VOD:Y7.LIVE}),s9.jH(r)||s9.KH(r,"PreplayResponse"),[2,r]}})}).call(this)},t}(),c9=((u9={})[eE.ASSET]="",u9[eE.CHANNEL]="channel/",u9[eE.EVENT]="event/",u9);function f9(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:return i=t.prefix,n=c9[t.assetType],r=function(t){if(ib(o9).jH(t))return 1===t.length?t[0]:t.join(",")+"/multiple";if(o9.jH(t))return t;if(h9.jH(t)&&ji(t.externalId))return 1===t.externalId.length?"ext/"+t.userId+"/"+t.externalId[0]:"ext/"+t.userId+"/"+t.externalId.join(",")+"/multiple";if(h9.jH(t))return"ext/"+t.userId+"/"+t.externalId;throw new _("Invalid asset id")}(t.id),[4,v9(t.contentProtected)];case 1:return e=o.sent(),s=function(t,i){var n=d9(t,i);return n?{"ad.cping":"1","ad.pingf":String(n)}:{}}(t.assetType,t.ping),u={},ji(t.preplayParameters)?t.preplayParameters.forEach(function(t){u[t[0]]=t[1]}):u=t.preplayParameters,[2,Nl(i+"/preplay/"+n+r+".json",io({v:"2"},u,e,s,u))]}})})()}function v9(t){return jt(function(){var i,n,r;return zt(this,function(e){switch(e.label){case 0:return(i=t)?[4,Vi.wm()]:[3,2];case 1:i=e.sent(),e.label=2;case 2:return i?[2,{rmt:"fps",manifest:"m3u8"}]:[3,3];case 3:return(n=t)?[4,Vi.Am()]:[3,5];case 4:n=e.sent(),e.label=5;case 5:return n?[2,{rmt:"wv",manifest:"mpd"}]:[3,6];case 6:return(r=t)?[4,Vi.ym()]:[3,8];case 7:r=e.sent(),e.label=8;case 8:if(r)return[2,{rmt:"pr",manifest:"mpd"}];e.label=9;case 9:return[2,{}]}})})()}function d9(t,i){var n=t!==eE.ASSET;return(!n&&i.adImpressions?1:0)+(!n&&i.freeWheelVideoViews?2:0)+(n&&i.linearAdData?4:0)}V(),It(),Wt(),Yt(),V(),It();var l9=Qk({ad_id:jk,apiFramework:Zk(qk,jk),companions:ib(zk),creative:jk,duration:Vk,mimeType:jk,height:Vk,width:Vk,extensions:Zk(Wk,ib(zk)),fw_parameters:Zk(Wk,rb(jk))}),g9=Qk({breakId:jk,ads:ib(l9),type:Kk(["linear","nonlinear"]),position:Kk(["preroll","midroll","postroll","pause","overlay",""]),timeOffset:Vk,duration:Vk,height:Zk(Wk,Vk),width:Zk(Wk,Vk),events:rb(ib(jk))}),w9=Qk({breaks:ib(g9)}),m9=Qk({next_time:Vk,ads:Zk(Wk,w9),extensions:Zk(Wk,ib(zk)),error:Zk(Wk,jk),currentBreakEnd:Zk(Wk,Vk)}),p9=function(t){return t.tTt="start",t.Jz="seek",t}({}),y9=function(){function t(t){this.aV=void 0,this.aV=t}var i=t.prototype;return i.KSt=function(t,i){return jt(function(){return zt(this,function(n){try{return[2,this.jbi(t,i)]}catch(t){throw t}return[2]})}).call(this)},i.jbi=function(t,i){return jt(function(){var n,r;return zt(this,function(e){switch(e.label){case 0:return n=function(t){var i={v:"3",pt:String(t.currentTime)};(function(t){return void 0!==t.seekTime})(t)&&t.hasFreeWheelVideoViews&&(i.ft=String(t.seekTime));t.event&&(i.ev=t.event);return Nl(t.zonePrefix+"/session/ping/"+t.sessionId+".json",io({},i))}(t),[4,this.aV.vk({Hk:Tl.GET,Yu:n,fk:qd.BT,Yg:i})];case 1:return[4,e.sent().lk()];case 2:return r=e.sent(),m9.jH(r)||m9.KH(r,"PingResponse"),[2,r]}})}).call(this)},t}();V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It(),Bt(),Dt();var _9=function(t){function i(i){var n;return(n=t.call(this,"Qbi")||this).cE=void 0,n.cE=i,n}return Pt(i,t),i.prototype.xa=function(){return new k9(this.cE)},xt(i,[{key:"uE",get:function(){return this.cE}}]),i}(Cg),k9=function(t){function i(i){var n;return(n=t.call(this,"pingresponse")||this).response=void 0,n.response=i,n}return Pt(i,t),i}(ah);V(),It(),Bt(),Dt();var b9=function(t){function i(i){var n;return(n=t.call(this,"Kbi")||this).nq=void 0,n.nq=i,n}return Pt(i,t),i.prototype.xa=function(){return new A9(this.nq)},xt(i,[{key:"lt",get:function(){return this.nq}}]),i}(Cg),A9=function(t){function i(i){var n;return(n=t.call(this,"pingerror")||this).error=void 0,n.error=i,n}return Pt(i,t),i}(ah),T9=function(t){function i(i,n){var r,e;return r=t.call(this)||this,(e=r).nAi=void 0,e.oa=void 0,e.Ybi=void 0,e.Zbi=void 0,e.sAi=void 0,e.rAi=void 0,e.hAi=void 0,e.hT=void 0,e.eAi=void 0,e.tAi=void 0,e.iAi=void 0,e.nAi=i,e.oa=n,e.Zbi=NaN,e.sAi=void 0,e.rAi=!1,e.hAi=NaN,e.hT=new dr,e.eAi=void 0,e.tAi=function(){return jt(function(){var t;return zt(this,function(i){switch(i.label){case 0:return t=e.oa.Gx(),e.hAi=t,e.rAi||Ui(e.sAi)||E(e.Zbi)?[2]:e.Zbi+e.sAi<=t?(e.rAi=!0,[4,e.$bi()]):[3,2];case 1:i.sent(),e.rAi=!1,i.label=2;case 2:return[2]}})})()},e.iAi=function(){if(e.oa.Gx()!==e.Zbi){e.rAi&&e.oAi(),e.hAi=e.oa.Gx();var t=e.hAi-(e.Zbi||0);E(t)?Er(e.$bi(p9.Jz,0)):Er(e.$bi(p9.Jz,t))}},r}Pt(i,t);var n=i.prototype;return n.Tn=function(){return jt(function(){var t,i;return zt(this,function(n){switch(n.label){case 0:return(t=this.Ybi)?(i=d9(t.source.assetType,t.source.ping),0!==i?(this.Zbi=this.oa.EP().start(0),[4,this.$bi(p9.tTt)]):[2]):[2];case 1:return n.sent(),this.oa.wn("timeupdate",this.tAi),this.oa.wn("seeking",this.iAi),[2]}})}).call(this)},n.$bi=function(t,i){return jt(function(){var n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:if(n=this.Ybi.preplayResponse,r={},E(this.Zbi))return[2];if(Fi(this.eAi)&&Dn(this.eAi,this.oa.Gx()-this.Zbi))return[2];void 0!==i&&(r.seekTime=i),void 0!==t&&(r.event=t),e=this.oa.Gx()-this.Zbi,t===p9.tTt?e=0:t!==p9.Jz&&this.sAi&&(e=A.min(e,this.sAi)),this.eAi=e,a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,this.nAi.KSt(io({zonePrefix:n.prefix,sessionId:n.sid,currentTime:e,hasFreeWheelVideoViews:null==(u=this.Ybi)?void 0:u.source.ping.freeWheelVideoViews},r),this.hT.Yg)];case 2:return o=a.sent(),this.So(new _9(o)),this.sAi=-1!==o.next_time?o.next_time:void 0,s=o.error,[3,5];case 3:return mr(h=a.sent())||(s=h.message),[3,5];case 4:return s&&this.So(new b9(s)),[7];case 5:return[2]}})}).call(this)},n.hr=function(){this.sAi=void 0,this.Ybi=void 0,this.Zbi=NaN,this.rAi=!1,this.hAi=NaN,this.eAi=void 0,this.oa.mn("seeking",this.iAi),this.oa.mn("timeupdate",this.tAi),this.oAi()},n.oAi=function(){this.hT.Zg(),this.hT=new dr},n.kn=function(){this.hr()},xt(i,[{key:"Xbi",set:function(t){this.Ybi=t}},{key:"Jbi",get:function(){return this.Zbi}}]),i}(uh);V(),It(),Wt(),Ut(),Yt();var S9=function(){function t(t,i){this.aAi=void 0,this.GJ=void 0,this.aAi=t,this.GJ=i}return t.prototype.wpi=function(t){return jt(function(){var i,n,r,e,s,u;return zt(this,function(o){switch(o.label){case 0:i=[],n=Ft(t.sources),o.label=1;case 1:return(r=n()).done?[3,6]:sT(e=r.value)?[3,2]:(i.push(e),[3,5]);case 2:return o.trys.push([2,4,,5]),[4,this.aAi.KSt(e)];case 3:return s=o.sent(),u=function(t,i,n){var r,e=t.preplayResponse;t.source.contentProtected&&e.drm&&(r={integration:"uplynk"},e.drm.fairplayCertificateURL&&(r.fairplay={certificateURL:e.drm.fairplayCertificateURL}),e.drm.widevineLicenseURL&&(r.widevine={licenseAcquisitionURL:e.drm.widevineLicenseURL}),e.drm.playreadyLicenseURL&&(r.playready={licenseAcquisitionURL:e.drm.playreadyLicenseURL}));var s=SA({src:e.playURL,contentProtection:r,useNativePlayback:t.source.useNativePlayback,hls:t.source.hls,dash:t.source.dash,seamlessSwitchStrategy:t.source.seamlessSwitchStrategy},i,n);return s.integrationData=t,s}({source:e,preplayResponse:s},t,this.GJ),u.src&&(u.src=Nl(u.src,e.playbackUrlParameters)),i.push(u),[3,5];case 4:return o.sent(),[3,5];case 5:return[3,1];case 6:if(0!==t.sources.length&&0===i.length)throw new y("Fatal: unable to play UplynkSources.");return[2,io({},t,{sources:i})]}})}).call(this)},t}();V(),It(),Bt(),Ut(),V(),It(),Bt(),Dt(),Ut(),V(),It(),Dt();var E9=function(t){function i(i,n){var r;return(r=t.call(this,"Ynt")||this).od=void 0,r.YF=void 0,r.od=i,r.YF=n,r}return Pt(i,t),i.prototype.xa=function(){return new I9(this.od.Ca)},i}(Cg),I9=function(t){function i(i){var n;return(n=t.call(this,"adbreakbegin")||this).adBreak=void 0,n.adBreak=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var R9=function(t){function i(i,n){var r;return(r=t.call(this,"Knt")||this).od=void 0,r.YF=void 0,r.od=i,r.YF=n,r}return Pt(i,t),i.prototype.xa=function(){return new C9(this.od.Ca)},i}(Cg),C9=function(t){function i(i){var n;return(n=t.call(this,"adbreakend")||this).adBreak=void 0,n.adBreak=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var P9=function(t){function i(i){var n;return(n=t.call(this,"Sbi")||this).od=void 0,n.od=i,n}return Pt(i,t),i.prototype.xa=function(){return new D9(this.od.Ca)},i}(Cg),D9=function(t){function i(i){var n;return(n=t.call(this,"adbreakskip")||this).adBreak=void 0,n.adBreak=i,n}return Pt(i,t),i}(ah);V(),It(),V(),It(),Dt();var N9=function(t){function i(i){var n;return(n=t.call(this,"$4t")||this).od=void 0,n.od=i,n}return Pt(i,t),i.prototype.xa=function(){return new x9(this.od.Ca)},i}(Cg),x9=function(t){function i(i){var n;return(n=t.call(this,"updateadbreak")||this).adBreak=void 0,n.adBreak=i,n}return Pt(i,t),i}(ah),B9=function(t){function i(i,n,r,e,s){var u;return(u=t.call(this)||this).HO=void 0,u.Zb=void 0,u.qc=void 0,u.emi=void 0,u.hu=void 0,u.ho=void 0,u.EJt=void 0,u.dAi=void 0,u.HO=i,u.Zb=n,u.qc=r,u.emi=e,u.ho=!1,u.dAi=!1,u.EJt=s,u}Pt(i,t);var n=i.prototype;return n.uAi=function(t){this.Zb=t-this.CO;for(var i,n=Ft(this.Jc.ec);!(i=n()).done;){var r=i.value;r.CO>t&&this.Jc.pS(r)}this.So(new N9(this))},n.fct=function(t){return t>=this.CO&&(Ui(this.ct)||t<=this.CO+this.ct)},n.lAi=function(t){return-1!==this.kJt&&(!!Fi(this.RO)&&t-this.CO>=this.kJt)},n.uD=function(){this.qc.ec.forEach(function(t){return t.uD()}),this.So(new P9(this))},n.fAi=function(t){var i=Fi(this.RO)&&t>=this.RO,n=this.CO<=t&&!i&&!this.ro,r=this.ro&&this.RO&&t>=this.RO;n&&(this.ho=!0,this.So(new E9(this,this.CO))),this.qc.ec.forEach(function(i){return i.fAi(t)}),r&&(this.dAi=!0,this.ho=!1,this.So(new R9(this,this.RO)))},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get startTime(){return t.CO},get endTime(){return t.RO},get duration(){return t.ct},get ads(){return t.Jc.Ca},get skipOffset(){return t.kJt},set skipOffset(i){t.kJt=i},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new SR(t,n),n}(this)),this.hu}},{key:"CO",get:function(){return this.HO}},{key:"RO",get:function(){return this.Zb?this.HO+this.Zb:void 0}},{key:"ct",get:function(){return this.Zb}},{key:"Wat",get:function(){var t=this.RO;return Fi(t)?new LA([this.CO,t]):LA.rL()}},{key:"Jc",get:function(){return this.qc}},{key:"cAi",get:function(){return this.dAi}},{key:"ro",get:function(){return this.ho}},{key:"kJt",get:function(){return this.emi?-1:this.EJt},set:function(t){this.emi||(this.EJt=t)}}]),i}(hh);V(),It(),Bt(),Dt(),V(),It(),Dt();var O9=function(t){function i(i,n){var r;return(r=t.call(this,"Jnt")||this).jnt=void 0,r.YF=void 0,r.jnt=i,r.YF=n,r}return Pt(i,t),i.prototype.xa=function(){return new M9(this.jnt.Ca)},i}(Cg),M9=function(t){function i(i){var n;return(n=t.call(this,"adbegin")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var L9=function(t){function i(i,n){var r;return(r=t.call(this,"Znt")||this).jnt=void 0,r.YF=void 0,r.jnt=i,r.YF=n,r}return Pt(i,t),i.prototype.xa=function(){return new F9(this.jnt.Ca)},i}(Cg),F9=function(t){function i(i){var n;return(n=t.call(this,"adend")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah);V(),It(),Dt(),V(),It(),Dt();var U9=function(t){function i(i){var n;return(n=t.call(this,"vAi")||this).jnt=void 0,n.jnt=i,n}return Pt(i,t),i.prototype.xa=function(){return new V9(this.jnt.Ca)},i}(Cg),V9=function(t){function i(i){var n;return(n=t.call(this,"removead")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah),j9=function(t){function i(){return t.call(this)||this}Pt(i,t);var n=i.prototype;return n.Jei=function(t){},n.isi=function(t){this.So(new U9(t))},i}(R2);V(),It(),Dt();var H9=function(t){function i(i){var n;return(n=t.call(this,"i5t")||this).jnt=void 0,n.jnt=i,n}return Pt(i,t),i.prototype.xa=function(){return new W9(this.jnt.Ca)},i}(Cg),W9=function(t){function i(i){var n;return(n=t.call(this,"adfirstquartile")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah),z9=function(t){function i(i){var n;return(n=t.call(this,"e5t")||this).jnt=void 0,n.jnt=i,n}return Pt(i,t),i.prototype.xa=function(){return new q9(this.jnt.Ca)},i}(Cg),q9=function(t){function i(i){var n;return(n=t.call(this,"admidpoint")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah),X9=function(t){function i(i){var n;return(n=t.call(this,"s5t")||this).jnt=void 0,n.jnt=i,n}return Pt(i,t),i.prototype.xa=function(){return new G9(this.jnt.Ca)},i}(Cg),G9=function(t){function i(i){var n;return(n=t.call(this,"adthirdquartile")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah),Q9=function(t){function i(i){var n;return(n=t.call(this,"_Ai")||this).jnt=void 0,n.jnt=i,n}return Pt(i,t),i.prototype.xa=function(){return new Y9(this.jnt.Ca)},i}(Cg),Y9=function(t){function i(i){var n;return(n=t.call(this,"adcomplete")||this).ad=void 0,n.ad=i,n}return Pt(i,t),i}(ah);V(),It();var $9=function(t){function i(i,n,r,e,s,u,o,h,a,c,f,v){var d;return void 0===a&&(a=[]),void 0===c&&(c={}),void 0===f&&(f={}),(d=t.call(this)||this).HO=void 0,d.Zb=void 0,d.UYt=void 0,d.yAi=void 0,d.IQ=void 0,d.lA=void 0,d.fA=void 0,d.NJt=void 0,d.bAi=void 0,d.Zf=void 0,d.vJt=void 0,d.IYt=void 0,d.hu=void 0,d.ho=void 0,d.AAi=void 0,d.SAi=void 0,d.TAi=void 0,d.kAi=void 0,d.EAi=void 0,d.xAi=void 0,d.HO=i,d.Zb=n,d.UYt=r,d.yAi=e,d.IQ=s,d.lA=u,d.fA=o,d.NJt=a,d.bAi=c,d.Zf=f,d.vJt=v,d.IYt=new j9,d.ho=!1,d.AAi=!1,d.SAi=!1,d.TAi=!1,d.kAi=!1,d.EAi=function(){return d.Nbi(d.HO)},d.xAi=function(){return d.Nbi(d.RO)},d.IYt.Zei(h),d.wn("Jnt",d.EAi),d.wn("Znt",d.xAi),d}Pt(i,t);var n=i.prototype;return n.fAi=function(t){var i=this.CO<=t&&t=.25&&(this.AAi=!0,this.So(new H9(this))),!this.SAi&&i>=.5&&(this.SAi=!0,this.So(new z9(this))),!this.TAi&&i>=.75&&(this.TAi=!0,this.So(new X9(this))),!this.kAi&&i>=.9999&&(this.kAi=!0,this.So(new Q9(this)))},n.uD=function(){this.AAi=!0,this.SAi=!0,this.TAi=!0,this.kAi=!0},n.kn=function(){this.mn("Jnt",this.EAi),this.mn("Znt",this.xAi)},i.gAi=function(t,n){return new i(t,n.duration,n.apiFramework||"",n.creative,n.mimeType,n.width,n.height,n.companions.map(function(n){return i.gAi(t,n)}),n.extensions,n.fw_parameters,n.events,void 0)},i.pAi=function(t,n){return new i(t,n.duration,n.apiFramework||"",n.creative,n.mimeType,n.width,n.height,n.companions.map(function(n){return i.pAi(t,n)}),n.extensions,n.fw_parameters,void 0,n.ad_id)},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get apiFramework(){return t.FYt},get companions(){return t.PYt.Ca},get creative(){return t.mAi},get duration(){return t.ct},get endTime(){return t.RO},get events(){return t.fQ},get extensions(){return t.DJt},get freeWheelParameters(){return t.wAi},get height(){return t.Mi},get mimeType(){return t.lQ},get startTime(){return t.CO},get width(){return t.Ti},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new SR(t,n),n}(this)),this.hu}},{key:"CO",get:function(){return this.HO}},{key:"RO",get:function(){return this.HO+this.Zb}},{key:"ct",get:function(){return this.Zb}},{key:"FYt",get:function(){return this.UYt}},{key:"mAi",get:function(){return this.yAi}},{key:"lQ",get:function(){return this.IQ}},{key:"Ti",get:function(){return this.lA}},{key:"Mi",get:function(){return this.fA}},{key:"fQ",get:function(){return this.Zf}},{key:"PYt",get:function(){return this.IYt}},{key:"DJt",get:function(){return this.NJt}},{key:"wAi",get:function(){return this.bAi}},{key:"ro",get:function(){return this.ho}},{key:"Wbi",get:function(){var t;return null!=(t=this.Zf.clickthroughs)?t:[]}}]),i}(hh);V(),It(),Dt(),V(),It(),Dt();var K9=function(t){function i(i){var n;return(n=t.call(this,"Xnt")||this).od=void 0,n.od=i,n}return Pt(i,t),i.prototype.xa=function(){return new J9(this.od.Ca)},i}(Cg),J9=function(t){function i(i){var n;return(n=t.call(this,"addadbreak")||this).adBreak=void 0,n.adBreak=i,n}return Pt(i,t),i}(ah);V(),It(),Dt();var Z9=function(t){function i(i){var n;return(n=t.call(this,"Gnt")||this).od=void 0,n.od=i,n}return Pt(i,t),i.prototype.xa=function(){return new ttt(this.od.Ca)},i}(Cg),ttt=function(t){function i(i){var n;return(n=t.call(this,"removeadbreak")||this).adBreak=void 0,n.adBreak=i,n}return Pt(i,t),i}(ah),itt=function(t){function i(){return t.call(this)||this}Pt(i,t);var n=i.prototype;return n.Jei=function(t){this.So(new K9(t))},n.isi=function(t){this.So(new Z9(t))},i}(R2),ntt=function(){function t(t,i,n,r){var e,s=this;this.oa=void 0,this.pbi=void 0,this.y1t=void 0,this.CAi=void 0,this.IAi=void 0,this.hu=void 0,this.NAi=void 0,this.RAi=[],this.LAi=void 0,this.FAi=function(t){return s.LAi=t,s},this.MAi=function(t){t.uE.ads&&s.Cbi(t.uE.ads),t.uE.currentBreakEnd&&s.DAi(t.uE.currentBreakEnd)},this.BAi=function(t){if(0!==s.RAi.length&&0!==s.oa.EP().length)for(var i,n=s.oa.EP().end(s.oa.EP().length-1),r=Ft(s.RAi.slice());!(i=r()).done;){var e=i.value;Fi(e.mYt.ct)?Yn(s.RAi,e):e.wIte.RO&&this.y1t.pS(e)}},i.Cbi=function(t){for(var i,n=!function(t){return Fi(t.breakOffsets)}(t),r=n?this.pbi.Jbi:0,e=Ft(t.breaks);!(i=e()).done;){var s=i.value;if(0!==s.ads.length){for(var u,o=s.timeOffset+r,h=new j9,a=0,c=Ft(s.ads);!(u=c()).done;){var f=u.value,v=n?$9.pAi(o,f):$9.gAi(o,f);h.gO(v),o+=v.ct,a+=v.ct}var d=s.timeOffset+r,l=n?void 0:s.duration,g=new B9(d,l,h,n,this.CAi);n&&this.RAi.push({mYt:g,wIt:d+a}),this.y1t.gO(g)}}},i.DAi=function(t){var i=this.PAi;i&&i.uAi(t+this.pbi.Jbi)},i.Dbi=function(t){this.NAi=t,this.y1t.ec.forEach(function(i){return i.fAi(t)})},i.uD=function(){var t=this.NAi,i=this.Fnt;t&&i&&i.lAi(t)&&i.uD()},i.skipAd=function(t){this.uD()},i.Obi=function(t,i){for(var n,r=[],e=Ft(this.K0t.ec);!(n=e()).done;){var s=n.value;!s.cAi&&s.CO>=t&&s.CO1e4?[4,this.kSi(t)]:[3,2];case 1:return n.sent(),this.CSi=Vi.Mg(),this.ISi=0,[3,4];case 2:return[4,Rr(1e4-i,t)];case 3:n.sent(),n.label=4;case 4:return[3,0];case 5:return[2]}})}).call(this)},i.RSi=function(t){var i=t.JOt;if(i&&this.oa.Vx&&0===this.bSi&&!this.DSi&&0!==A.floor(this.oa.EP().start(0))){var n=(this.oa.Vx.getTime()-i.getTime())/1e3,r=this.oa.Gx()-t.qOt;this.bSi=r-n}},i.kSi=function(t){return jt(function(){var i,n,r,e,s,u,o,h,a,c;return zt(this,function(f){switch(f.label){case 0:return f.trys.push([0,3,,4]),[4,this.oa.Dx.vk({Yu:this.NSi})];case 1:return[4,f.sent().VT(t)];case 2:if(0===(i=f.sent()).avails.length)return 0!==this.TSi.length&&(this.TSi=[]),[2];if(i.avails.length===this.TSi.length&&i.avails[0].startTimeInSeconds===this.TSi[0].qOt)return this.RSi(this.TSi[0]),[2];for(n=[],r=Ft(i.avails);!(e=r()).done;){for(s=e.value,u=new Ctt(s.durationInSeconds,s.startTimeInSeconds,s.availProgramDateTime),o=Ft(s.ads);!(h=o()).done;)a=h.value,(c=new Rtt(u,K0.BZt,a.startTimeInSeconds,a.trackingEvents)).O4t(a.adId,a.width,a.height,a.durationInSeconds,[],a.skipoffset),u.C4t(c);n.push(u),this.RSi(u)}return this.TSi=An(n,function(t,i){return t.qOt-i.qOt}),[3,4];case 3:throw yr(f.sent()),new y("Failed to poll MediaTailor tracking events");case 4:return[2]}})}).call(this)},i.BSi=function(){var t;null==(t=this.ESi)||t.Zg(),this.ESi=void 0,this.SSi=void 0,this.CSi=-1/0},i.MSi=function(){if(0!==this.TSi.length){var t=this.TSi[this.TSi.length-1],i=this.ySi();if(t.qOt+t.G0tthis.tMt)){var o;if(this.mSi===s)return;return this.wSi=s,void(null==(o=this.oa.Jc)||o.So(new dO(this.wSi)))}}var h;if(this.wSi)null==(h=this.oa.Jc)||h.So(new fO(this.wSi)),this.wSi=void 0}}},i.LSi=function(){var t=this,i=this.Lnt;if(0!==i.length){for(var n,r=[],e=Ft(i);!(n=e()).done;){var s=n.value.aYt.filter(function(i){return Jn(t.OSi,i.eventType)});r=r.concat(s)}for(var u,o=Ft(r);!(u=o()).done;){var h=u.value;this.FSi(h.startTimeInSeconds)&&(h.eventType===Itt.COMPLETE&&this.USi(Itt.ENGAGED_VIEW),this.VSi(h))}}},i.HSi=function(t,i){return i.aYt.filter(function(i){return Xo(i.eventType,t)})[0]},i.USi=function(t){var i=this.Lnt;if(0!==i.length){var n=this.HSi(t,i[0]);n&&this.VSi(n)}},i.VSi=function(t){this.Dpi(t.eventType);for(var i,n=Ft(t.beaconUrls);!(i=n()).done;){var r=i.value,e={Hk:Tl.GET,Yu:r,XT:"",fk:qd.BT};0,Er(this.WSi(e))}},i.Dpi=function(t){var i,n,r=this.Lnt;switch(t){case Itt.START:i=new gO(r[r.length-1],this.oa.Gx());break;case Itt.COMPLETE:i=new mO(r[0],this.oa.Gx());break;case Itt.FIRST_QUARTILE:i=new f1(r[0],this.oa.Gx());break;case Itt.MID_POINT:i=new d1(r[0],this.oa.Gx());break;case Itt.THIRD_QUARTILE:i=new g1(r[0],this.oa.Gx())}void 0!==i&&(null==(n=this.oa.Jc)||n.So(i))},i.WSi=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,this.oa.Dx.vk(t)];case 1:return i.sent().dk,[2]}})}).call(this)},i.FSi=function(t){var i=this.ySi();return t>=this.tMt&&t=s.CO&&this.tMt<=s.CO+s.ct&&n.push(s)}return n}}]),t}();Jb(function(t){return function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).qSi=void 0,r.nq=void 0,r.rq=void 0,r.GSi=void 0,r}Pt(i,t);var n=i.prototype;return n.Ta=function(i){return this.qSi&&(this.qSi.kn(),this.qSi=void 0,this.OEt()),t.prototype.Ta.call(this,i)},n.drt=function(i,n){var r=this,e=function(){return t.prototype.drt};return jt(function(){var t,s;return zt(this,function(u){switch(u.label){case 0:if(!i||!function(t){return t.sources.some(function(t){return t.integration===YA.MEDIATAILOR})}(i))return[2,e().call(r,i,n)];u.label=1;case 1:return u.trys.push([1,4,,5]),[4,this.zSi(i,n)];case 2:return t=u.sent(),this.GSi=new p1(this),[4,e().call(r,t,n)];case 3:return u.sent(),[3,5];case 4:return s=u.sent(),this.Qq(new _d(pd.MANIFEST_LOAD_ERROR,s.message,s)),[3,5];case 5:return[2]}})}).call(this)},n.gP=function(i){var n;(null==(n=this.GSi)?void 0:n.inAdBreak)||t.prototype.gP.call(this,i)},n.Xx=function(i,n){var r;(null==(r=this.qSi)?void 0:r.mSi)||t.prototype.Xx.call(this,i,n)},n.Yx=function(){var i;return null!=(i=this.nq)?i:t.prototype.Yx.call(this)},n.Zx=function(){var i;return null!=(i=this.rq)?i:t.prototype.Zx.call(this)},n.Qq=function(t){this.nq=pw(t),this.rq=t,this.So(new Cb(t))},n.OEt=function(){this.nq=void 0,this.rq=void 0},n.zSi=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a;return zt(this,function(c){switch(c.label){case 0:n=[],r=Ft(t.sources),c.label=1;case 1:return(e=r()).done?[3,4]:oT(s=e.value)&&(u=s).src?[4,this.XSi(u,i)]:(n.push(s),[3,3]);case 2:o=c.sent(),pr(i),h=io({},u,{integration:void 0,src:o}),n.push(h),c.label=3;case 3:return[3,1];case 4:return(a=zg(t)).sources=n,[2,a]}})}).call(this)},n.XSi=function(t,i){return jt(function(){var n,r,e,s,u,o,h,a,c,f;return zt(this,function(v){switch(v.label){case 0:if(n=this,r=t.src||"",!(e=r.match(/.+?(?=\/v1\/)/)))throw new y("Could not find MediaTailor session initialization url");return s=e[0],u=Wo(r,"?ads."),o=u?{Yu:r,fk:qd.BT}:{Yu:r,Hk:Tl.POST,XT:JSON.stringify({adsParams:t.adsParams}),fk:qd.BT},[4,CT(function(){return n.jSi(o,i)},i)];case 1:h=v.sent();try{a=s+h.manifestUrl,u||(c=s+h.trackingUrl,f=function(t){return!!t&&/\bmpd\b/i.test(t)}(a),this.qSi=new Ptt(this,c,f))}catch(t){throw new y("Something went wrong parsing the MediaTailor session initialization response")}return[2,a]}})}).call(this)},n.jSi=function(t,i){return jt(function(){return zt(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,this.Dx.vk(t)];case 1:return[4,n.sent().VT(i)];case 2:return[2,n.sent()];case 3:throw yr(n.sent()),new y("Failed to initialize MediaTailor session manifest");case 4:return[2]}})}).call(this)},n.kn=function(){var i;this.qSi&&(this.qSi.kn(),this.qSi=void 0),this.OEt(),null==(i=this.GSi)||i.destroy(),this.GSi=void 0,t.prototype.kn.call(this)},i}(t)},$b.Snt),V(),It(),V(),It(),Wt(),Yt(),V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Wt(),Bt(),Dt(),Yt(),V(),It();var Dtt=function(t){return t[t.QSi=0]="QSi",t[t.PM=1]="PM",t[t.Yz=2]="Yz",t[t.KSi=3]="KSi",t[t.YSi=4]="YSi",t[t.JSi=5]="JSi",t[t.ma=6]="ma",t}({});V(),It(),Bt(),Dt();var Ntt=function(t){function i(i,n,r,e,s){var u;return void 0===s&&(s=!1),(u=t.call(this)||this).yO=Cw(),u._O=new Aw,u.vu=void 0,u.bO=void 0,u.I5=void 0,u.hu=void 0,u.CMt=void 0,u.We=void 0,u.vu=i,u.bO=n,u.I5=r,u.We=s,u.CMt=e,u}return Pt(i,t),i.prototype.SO=function(t){this.We=t,t?this.CMt.ZSi(this.vu):this.CMt.$Si(this.vu)},xt(i,[{key:"YI",get:function(){}},{key:"Rt",get:function(){return this.We},set:function(t){this.SO(t)}},{key:"Ca",get:function(){var t;return null!=(t=this.hu)?t:this.hu=hw(this)}},{key:"o",get:function(){return String(this.vu.componentTag)||"hbbtvaudiotrack"}},{key:"Lt",get:function(){return this.I5}},{key:"Th",get:function(){return this.bO}},{key:"bs",get:function(){return""}},{key:"Qk",get:function(){return this.Rt?"enabled":"disabled"},set:function(t){this.SO("enabled"===t)}},{key:"$I",get:function(){return this._O}},{key:"tC",get:function(){},set:function(t){}},{key:"JI",get:function(){return this.yO}}]),i}(uh);V(),It(),Wt(),Bt(),Dt(),Ut(),Yt(),V(),It(),Wt(),Dt(),Ut(),Yt(),V(),It();var xtt=function(t){return t.qm="urn:dvb:casystemid:19219",t.zm="urn:dvb:casystemid:19156",t}({}),Btt=function(t){return t.qm="application/vnd.ms-playready.initiator+xml",t.zm="application/widevine+xml",t}({});function Ott(t,i,n){switch(t){case"urn:dvb:casystemid:19219":return function(t){return''+(null!=t?t:"")+""}(i);case"urn:dvb:casystemid:19156":if(!n)throw new y("Content URL is needed for Widevine license request");return function(t,i){return''+SJ(null!=i?i:"")+""+SJ(null!=t?t:"")+""}(i,n);default:throw new y("DRM key system is not supported")}}var Mtt=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).sTi=void 0,i.hTi=void 0,i.Tu=void 0,i.aTi=void 0,i.oTi=void 0,i.nTi=function(t,n,r){var e,s;if(0!==r){var u=i.uTi(r),o=i.cTi(r),h=new lw(u,o);null==(s=i.oTi)||null==(e=s.Ky)||e.call(s,h)}else{var a,c;null==(c=i.oTi)||null==(a=c.Qy)||a.call(c,t)}},i.rTi=function(t,n,r,e){var s=i.dTi(t),u=i.lTi(t),o=new lw(s,u);i.So(new mN(o))},i}Pt(i,t);var n=i.prototype;return n.tTi=function(t){this.iTi(),this.Tu=t},n.eTi=function(t){return jt(function(){var i,n,r,e,s,u,o,h;return zt(this,function(a){switch(a.label){case 0:if(!t.fq.length)return this.iTi(),[2];if(!this.Tu)throw new y("The OIPF DRM agent has to be attached to the DOM");this.sTi||(this.sTi=v.createElement("object"),this.sTi.type="application/oipfDrmAgent",this.Tu.appendChild(this.sTi),this.sTi.onDRMMessageResult=this.nTi,this.sTi.onDRMRightsError=this.rTi,this.hTi=v.createElement("object"),this.hTi.type="application/oipfCapabilities",this.Tu.appendChild(this.hTi)),n=Ft(t.fq),a.label=1;case 1:if((r=n()).done)return[3,6];if(e=r.value,s=void 0,u=void 0,o=void 0,e.xS===xo)s=xtt.qm,u=Btt.qm,o=Ott(xtt.qm,e.FW);else{if(e.xS!==Bo)return[3,5];s=xtt.zm,u=Btt.zm,o=Ott(xtt.zm,e.FW,t.rC)}a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.Bet(u,o,s)];case 3:return a.sent(),this.So(new pN),[2];case 4:return h=a.sent(),i=h,[3,5];case 5:return[3,1];case 6:return i&&this.So(new mN(i)),[2]}})}).call(this)},n.zg=function(){return this.oTi=void 0,this.Tu=void 0,t.prototype.zg.call(this)},n.Bet=function(t,i,n){var r,e;return this.oTi=new Xa,this.aTi=null==(e=this.sTi)||null==(r=e.sendDRMMessage)?void 0:r.call(e,t,i,n),this.aTi||null==this.oTi.Ky||this.oTi.Ky.call(this.oTi,new lw(pd.CONTENT_PROTECTION_INTERNAL_ERROR,"No DRM message returned by OIPF DRM agent")),this.oTi.Yy},n.uTi=function(t){switch(t){case 5:return pd.CONTENT_PROTECTION_NOT_SUPPORTED;case 2:case 1:case 3:case 4:case 6:return pd.CONTENT_PROTECTION_INTERNAL_ERROR;default:return pd.CONTENT_PROTECTION_ERROR}},n.cTi=function(t){switch(t){case 2:return"The DRM agent was unable to complete the request";case 3:return"The specified MIME type is unknown for the specified DRM system";case 4:return"User consent is needed for that action";case 5:return"The specified DRM System is unknown";case 6:return"The license message has the wrong format";default:return"Unspecified error occurred"}},n.dTi=function(t){return 0===t?pd.CONTENT_PROTECTION_LICENSE_ERROR:1===t?pd.CONTENT_PROTECTION_LICENSE_INVALID:pd.CONTENT_PROTECTION_ERROR},n.lTi=function(t){switch(t){case 0:return"No license, consumption of the content is blocked";case 1:return"Invalid license, consumption of the content is blocked";case 2:return"Valid license, consumption of the content is unblocked";default:return"Unknown error occurred"}},n.iTi=function(){this.sTi&&(Zi(this.sTi),this.sTi=void 0),this.hTi&&(Zi(this.hTi),this.hTi=void 0)},n.I8=function(t,i,n){return jt(function(){return zt(this,function(t){return[2]})})()},i}(EN);V(),It(),Wt(),Bt(),Yt(),V(),It();var Ltt=ot,Ftt=function(){function t(t,i,n){this.ZS=void 0,this.PL=void 0,this.DZ=void 0,this.ZS=t,this.PL=i,this.DZ=n}var i=t.prototype;return i.IZ=function(t){return!1},i.RZ=function(t){return Ltt.resolve(void 0)},i.eTi=function(t){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.DZ.eTi(this.ZS)];case 1:return t.sent(),[2]}})}).call(this)},i.zg=function(){return Ltt.resolve(void 0)},xt(t,[{key:"kP",get:function(){return LA.nL(0,this.PL.ct)}},{key:"wP",get:function(){return uS.pz},set:function(t){}},{key:"Cd",get:function(){return this.ZS}}]),t}(),Utt=function(t){function i(i,n){var r;return(r=t.call(this)||this).sc=void 0,r.Oz=void 0,r.DZ=void 0,r.ha=void 0,r.ea=void 0,r.mTi=void 0,r.Gl=void 0,r.Y9=void 0,r.J9=void 0,r.bet=void 0,r.Aet=void 0,r.aq=void 0,r.Pz=void 0,r.nq=void 0,r.RV=void 0,r.kz=void 0,r._Ti=void 0,r.pTi=void 0,r.sc=i,r.Oz=n,r.ha=new fS,r.ea=new dS,r.Gl=new sy,r.aq=void 0,r.Pz=!1,r.nq=void 0,r.RV=jy.zL,r.kz=!0,r._Ti=void 0,r.pTi=function(){var t,i,n,e;(null==(t=r.mTi)?void 0:t.playState)&&((null==(i=r._Ti)?void 0:i.Yy)||2!==r.mTi.playState||r.vTi().catch(pn),3===r.mTi.playState&&(null==(e=r._Ti)||null==(n=e.Qy)||n.call(e,String(r.mTi.playState)),r._Ti=void 0))},r.DZ=new Mtt(r),r.DZ.wn(wN,r.Rs),r.Y9=new Fb([r.Gl]),r.J9=new cN(r),r.bet=new XN,r.Aet=new gB(r.bet.xe,r.Wu,r.nt,r.Ql,r.Ma,r.Sq),r.mTi=r.gTi(),r.vTi().catch(pn),r}Pt(i,t);var n=i.prototype;return n.Y7=function(t){this.DZ.tTi(t),this.bet.Y7(t)},n.$Z=function(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;if(r.Km===Ly.AV)return r}},n.V9=function(t){return ot.resolve({H9:!1})},n.Un=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:if(this.aq)throw new y("Already loaded a media source");return t.Km!==Ly.AV?[3,2]:(this.aq=new Ftt(t,this,this.DZ),[4,this.aq.eTi(t)]);case 1:return i.sent(),[2,this.aq];case 2:throw new y("Unsupported media source configuration for HbbTV");case 3:return[2]}})}).call(this)},n.fTi=function(t){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.vTi()];case 1:return t.sent(),[2]}})}).call(this)},n.QP=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.vTi()];case 1:return t.sent(),[2]}})}).call(this)},n.$W=function(t){},n.hr=function(){return jt(function(){return zt(this,function(t){return this.aq=void 0,this._Ti=void 0,[2]})}).call(this)},n.F8=function(){return jt(function(){return zt(this,function(t){throw new _("Not supported")})})()},n.zg=function(){return jt(function(){return zt(this,function(t){switch(t.label){case 0:return[4,this.hr()];case 1:return t.sent(),this.Gl.kn(),this.Y9.kn(),this.bet.kn(),this.Aet.kn(),this.DZ.mn(wN,this.Rs),[4,this.DZ.zg()];case 2:return t.sent(),[2]}})}).call(this)},n.be=function(){this.kz=!0,this.bet.be()},n.we=function(){this.kz=!1,this.bet.we()},n.wq=function(){return!1},n.bq=function(t,i,n,r,e){throw new y("Adding native sideloaded text tracks is not supported on HbbTV")},n.G7=function(){},n.X7=function(){},n.K7=function(){},n.hP=function(){return{rO:0,hO:0,oO:0}},n.$P=function(){},n.Tq=function(t){throw new y("Adding custom text tracks is not supported on HbbTV")},n.zP=function(){},n.sI=function(t,i,n,r,e,s,u,o,h){var a=new aD(t,i,n,r,e,s,u,h,o);return this.Gl.tt(a),this.J9.tt(a),a},n.Eq=function(){for(var t,i=Ft(this.Gl.NI.slice());!(t=i()).done;){t.value.kn()}this.Gl.hr()},n.rV=function(t){this.Gl.it(t),this.J9.it(t)},n.gTi=function(){for(var t=v.getElementsByTagName("object"),i=0;i=0?n:i.length};return An(t,function(t,i){return n(t)-n(i)})},xt(i,[{key:"ht",get:function(){return this.PL.ht}},{key:"Fx",get:function(){return this.PL.Fx._s()}},{key:"OL",get:function(){}},{key:"Vx",get:function(){return this.PL.Vx},set:function(t){t&&this.PL.$W(t)}},{key:"bt",get:function(){return this.Ac}},{key:"zx",get:function(){return this.PL.zx},set:function(t){this.PL.Oy(t)}},{key:"dq",get:function(){return this.lq}},{key:"ct",get:function(){return this.PL.ct}},{key:"Qx",get:function(){return this.PL.Qx}},{key:"Jx",get:function(){return this.rq}},{key:"lt",get:function(){return this.nq}},{key:"$x",get:function(){}},{key:"iP",get:function(){}},{key:"sP",get:function(){return!1}},{key:"WP",get:function(){return this.PL.WP},set:function(t){this.PL.WP=t}},{key:"VP",get:function(){return this.Lz}},{key:"rP",get:function(){return io({},{rO:0,hO:0,oO:0,aO:0,uO:0,cO:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.PL.hP())}},{key:"oP",get:function(){return this.PL.oP},set:function(t){this.PL.oP=t}},{key:"cP",get:function(){return!0}},{key:"lP",get:function(){return this.PL.lP}},{key:"vP",get:function(){return this.PL.vP},set:function(t){this.PL.vP=t}},{key:"pP",get:function(){return this.PL.pP._s()}},{key:"wP",get:function(){return this.oq},set:function(t){this.oq=t,this.aq&&(this.aq.wP=t)}},{key:"AP",get:function(){return this.PL.AP}},{key:"kP",get:function(){return this.PL.kP._s()}},{key:"xP",get:function(){return this.PL.xP}},{key:"uq",get:function(){return this.PL.uq}},{key:"nt",get:function(){return this.Gl}},{key:"DP",get:function(){return this.PL.DP}},{key:"rt",get:function(){return this.PL.rt}},{key:"MP",get:function(){return this.PL.MP}},{key:"OP",get:function(){return this.PL.OP},set:function(t){this.PL.OP=t}}]),i}(uh),ztt=function(){function t(){this.tz=xb.mW}var i=t.prototype;return i.DC=function(t,i,n,r,e,s,u,o){return new Wtt(t,n,s,u)},i.Jq=function(t,i){var n;return!(!Oi.k_||t.type!==kA.pC&&!nT(t.type)&&!rT(t.type))&&!(Br()&&!(null==(n=t.contentProtection)?void 0:n.useOipfDrmAgent)&&(!t.contentProtection||nh()))},i.Zq=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return[4,H_(t,!0)];case 1:return i.sent()?[2,!0]:[2,!1]}})})()},i.$q=function(){return!1},t}();rS(new ztt),V(),It(),V(),It(),V(),It(),Ut();var qtt=[];function Xtt(t){qtt.push(t)}var Gtt=[];function Qtt(t){Gtt.push(t)}V(),It(),Bt(),Dt(),V(),It(),V(),It(),V(),It();var Ytt=void 0!==f?f:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},$tt=void 0!==v?v:{createElement:function(){}};function Ktt(t,i){return i||(i=t.slice(0)),t.raw=i,t}var Jtt=1;function Ztt(){return Jtt++}var tit,iit=b.prototype.toString,nit=function(t){return sit(t)?b.keys(t):[]};function rit(t,i){nit(t).forEach(function(n){return i(t[n],n)})}function eit(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r0)for(var n=t.attributes,r=n.length-1;r>=0;r--){var e=n[r].name,s=n[r].value;"boolean"!=typeof t[e]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+e+",")||(s=null!==s),i[e]=s}return i}function Nit(t,i,n){t.setAttribute(i,n)}function xit(t,i){t.removeAttribute(i)}function Bit(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var n=$tt.documentElement,r=$tt.body,e=n.clientLeft||r.clientLeft||0,s=Ytt.pageXOffset||r.scrollLeft,u=i.left+s-e,o=n.clientTop||r.clientTop||0,h=Ytt.pageYOffset||r.scrollTop,a=i.top+h-o;return{left:A.round(u),top:A.round(a)}}function Oit(t,i){var n={},r=Bit(t),e=t.offsetWidth,s=t.offsetHeight,u=r.top,o=r.left,h=i.pageY,a=i.pageX;return i.changedTouches&&(a=i.changedTouches[0].pageX,h=i.changedTouches[0].pageY),n.y=A.max(0,A.min(1,(u-h+s)/s)),n.x=A.max(0,A.min(1,(a-o)/e)),n}function Mit(t){return sit(t)&&3===t.nodeType}function Lit(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Fit(t,i){return function(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),wit(t)||Mit(t)?t:"string"==typeof t&&/\S/.test(t)?$tt.createTextNode(t):void 0}).filter(function(t){return t})}(i).forEach(function(i){return t.appendChild(i)}),t}function Uit(t,i){return Fit(Lit(t),i)}var Vit=mit("querySelector"),jit=mit("querySelectorAll"),Hit=Ytt.navigator&&Ytt.navigator.userAgent||"",Wit=/AppleWebKit\/([\d.]+)/i.exec(Hit),zit=Wit?S(Wit.pop()):null,qit=/iPad/i.test(Hit),Xit=/iPhone/i.test(Hit)&&!qit,Git=/iPod/i.test(Hit),Qit=Xit||qit||Git,Yit=function(){var t=Hit.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),$it=/Android/i.test(Hit),Kit=function(){var t=Hit.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&S(t[1]),n=t[2]&&S(t[2]);return i&&n?S(t[1]+"."+t[2]):i||null}(),Jit=$it&&/webkit/i.test(Hit)&&Kit<2.3,Zit=$it&&Kit<5&&zit<537,tnt=/Firefox/i.test(Hit),int=/Edge/i.test(Hit),nnt=!int&&/Chrome/i.test(Hit),rnt=function(){var t=Hit.match(/Chrome\/(\d+)/);return t&&t[1]?S(t[1]):null}(),ent=/MSIE\s8\.0/.test(Hit),snt=function(){var t=/MSIE\s(\d+)\.\d/.exec(Hit),i=t&&S(t[1]);return!i&&/Trident\/7.0/i.test(Hit)&&/rv:11.0/.test(Hit)&&(i=11),i}(),unt=/Safari/i.test(Hit)&&!nnt&&!$it&&!int,ont=unt||Qit,hnt=git()&&("ontouchstart"in Ytt||Ytt.DocumentTouch&&Ytt.document instanceof Ytt.DocumentTouch),ant=git()&&"backgroundSize"in Ytt.document.createElement("video").style,cnt=b.freeze({__proto__:null,IS_IPAD:qit,IS_IPHONE:Xit,IS_IPOD:Git,IS_IOS:Qit,IOS_VERSION:Yit,IS_ANDROID:$it,ANDROID_VERSION:Kit,IS_OLD_ANDROID:Jit,IS_NATIVE_ANDROID:Zit,IS_FIREFOX:tnt,IS_EDGE:int,IS_CHROME:nnt,CHROME_VERSION:rnt,IS_IE8:ent,IE_VERSION:snt,IS_SAFARI:unt,IS_ANY_SAFARI:ont,TOUCH_ENABLED:hnt,BACKGROUND_SIZE_SUPPORTED:ant});function fnt(t,i){var n=Ait(t);0===n.handlers[i].length&&(delete n.handlers[i],t.removeEventListener?t.removeEventListener(i,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+i,n.dispatcher)),b.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===b.getOwnPropertyNames(n).length&&Sit(t)}function vnt(t,i,n,r){n.forEach(function(n){t(i,n,r)})}function dnt(t){function i(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var r=t||Ytt.event;for(var e in t={},r)"layerX"!==e&&"layerY"!==e&&"keyLocation"!==e&&"webkitMovementX"!==e&&"webkitMovementY"!==e&&"path"!==e&&("returnValue"===e&&r.preventDefault||(t[e]=r[e]));if(t.target||(t.target=t.srcElement||$tt),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=i},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=i,t.stopPropagation()},t.isImmediatePropagationStopped=n,null!==t.clientX&&void 0!==t.clientX){var s=$tt.documentElement,u=$tt.body;t.pageX=t.clientX+(s&&s.scrollLeft||u&&u.scrollLeft||0)-(s&&s.clientLeft||u&&u.clientLeft||0),t.pageY=t.clientY+(s&&s.scrollTop||u&&u.scrollTop||0)-(s&&s.clientTop||u&&u.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var lnt=!1;!function(){try{var t=b.defineProperty({},"passive",{get:function(){lnt=!0}});Ytt.addEventListener("test",null,t)}catch(t){}}();var gnt=["touchstart","touchmove"];function wnt(t,i,n){if(Array.isArray(i))return vnt(wnt,t,i,n);var r=Ait(t);if(r.handlers||(r.handlers={}),r.handlers[i]||(r.handlers[i]=[]),n.guid||(n.guid=Ztt()),r.handlers[i].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(i,n){if(!r.disabled){i=dnt(i);var e=r.handlers[i.type];if(e)for(var s=e.slice(0),u=0,o=s.length;u-1&&(e={passive:!0}),t.addEventListener(i,r.dispatcher,e)}else t.attachEvent&&t.attachEvent("on"+i,r.dispatcher)}function mnt(t,i,n){if(Tit(t)){var r=Ait(t);if(r.handlers){if(Array.isArray(i))return vnt(mnt,t,i,n);var e=function(i){r.handlers[i]=[],fnt(t,i)};if(i){var s=r.handlers[i];if(s)if(n){if(n.guid)for(var u=0;u0)for(var r=0,e=t.length;r0)for(var s=0,u=i.length;s0)for(var o=0,h=n.length;o=0;t--)this.m[t].dispose&&this.m[t].dispose();this.m=null,this.k=null,this.C=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),Sit(this.v),this.v=null},i.player=function(){return this.t},i.options=function(t){return hit.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=Rnt(this.h,t),this.h):this.h},i.el=function(){return this.v},i.createEl=function(t,i,n){return pit(t,i,n)},i.localize=function(t){var i=this.t.language&&this.t.language(),n=this.t.languages&&this.t.languages();if(!i||!n)return t;var r=n[i];if(r&&r[t])return r[t];var e=n[i.split("-")[0]];return e&&e[t]?e[t]:t},i.contentEl=function(){return this.S||this.v},i.id=function(){return this.o},i.name=function(){return this.l},i.children=function(){return this.m},i.getChildById=function(t){return this.k[t]},i.getChild=function(t){if(t)return t=Int(t),this.C[t]},i.addChild=function(i,n,r){var e,s;if(void 0===n&&(n={}),void 0===r&&(r=this.m.length),"string"==typeof i){s=Int(i),n||(n={}),!0===n&&(hit.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),n={});var u=n.componentClass||s;n.name=s;var o=t.getComponent(u);if(!o)throw new y("Component "+u+" does not exist");if("function"!=typeof o)return null;e=new o(this.t||this,n)}else e=i;if(this.m.splice(r,0,e),"function"==typeof e.id&&(this.k[e.id()]=e),(s=s||e.name&&Int(e.name()))&&(this.C[s]=e),"function"==typeof e.el&&e.el()){var h=this.contentEl().children[r]||null;this.contentEl().insertBefore(e.el(),h)}return e},i.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.m){for(var i=!1,n=this.m.length-1;n>=0;n--)if(this.m[n]===t){i=!0,this.m.splice(n,1);break}if(i){this.k[t.id()]=null,this.C[t.name()]=null;var r=t.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},i.initChildren=function(){var i=this,n=this.h.children;if(n){var r,e=this.h,s=t.getComponent("Tech");(r=Array.isArray(n)?n:b.keys(n)).concat(b.keys(this.h).filter(function(t){return!r.some(function(i){return"string"==typeof i?t===i:t===i.name})})).map(function(t){var r,e;return"string"==typeof t?e=n[r=t]||i.h[r]||{}:(r=t.name,e=t),{name:r,opts:e}}).filter(function(i){var n=t.getComponent(i.opts.componentClass||Int(i.name));return n&&!s.isTech(n)}).forEach(function(t){var n=t.name,r=t.opts;if(void 0!==e[n]&&(r=e[n]),!1!==r){!0===r&&(r={}),r.playerOptions=i.h.playerOptions;var s=i.addChild(n,r);s&&(i[n]=s)}})}},i.buildCSSClass=function(){return""},i.on=function(t,i,n){var r=this;if("string"==typeof t||Array.isArray(t))wnt(this.v,t,Ent(this,i));else{var e=t,s=i,u=Ent(this,n),o=function(){return r.off(e,s,u)};o.guid=u.guid,this.on("dispose",o);var h=function(){return r.off("dispose",o)};h.guid=u.guid,t.nodeName?(wnt(e,s,u),wnt(e,"dispose",h)):"function"==typeof t.on&&(e.on(s,u),e.on("dispose",h))}return this},i.off=function(t,i,n){if(!t||"string"==typeof t||Array.isArray(t))mnt(this.v,t,i);else{var r=t,e=i,s=Ent(this,n);this.off("dispose",s),t.nodeName?(mnt(r,e,s),mnt(r,"dispose",s)):(r.off(e,s),r.off("dispose",s))}return this},i.one=function(t,i,n){var r=arguments,e=this;if("string"==typeof t||Array.isArray(t))ynt(this.v,t,Ent(this,i));else{var s=t,u=i,o=Ent(this,n),h=function t(){e.off(s,u,t),o.apply(null,r)};h.guid=o.guid,this.on(s,u,h)}return this},i.trigger=function(t,i){return pnt(this.v,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.j?i?t.call(this):this.setTimeout(t,1):(this.T=this.T||[],this.T.push(t))),this},i.triggerReady=function(){this.j=!0,this.setTimeout(function(){var t=this.T;this.T=[],t&&t.length>0&&t.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},i.$=function(t,i){return Vit(t,i||this.contentEl())},i.$$=function(t,i){return jit(t,i||this.contentEl())},i.hasClass=function(t){return Eit(this.v,t)},i.addClass=function(t){return Iit(this.v,t),this},i.removeClass=function(t){return Rit(this.v,t),this},i.toggleClass=function(t,i){return Cit(this.v,t,i),this},i.show=function(){return this.removeClass("vjs-hidden"),this},i.hide=function(){return this.addClass("vjs-hidden"),this},i.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},i.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},i.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.v,t)},i.setAttribute=function(t,i){return Nit(this.v,t,i),this},i.removeAttribute=function(t){return xit(this.v,t),this},i.width=function(t,i){return this.dimension("width",t,i)},i.height=function(t,i){return this.dimension("height",t,i)},i.dimensions=function(t,i){return this.width(t,!0).height(i)},i.dimension=function(t,i,n){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.v.style[t]=i:this.v.style[t]="auto"===i?"":i+"px",n||this.trigger("resize"),this;if(!this.v)return 0;var r=this.v.style[t],e=r.indexOf("px");return T(-1!==e?r.slice(0,e):this.v["offset"+Int(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new y("currentDimension only accepts width or height value");if("function"==typeof Ytt.getComputedStyle){var n=Ytt.getComputedStyle(this.v);i=n.getPropertyValue(t)||n[t]}if(0===(i=S(i))){var r="offset"+Int(t);i=this.v[r]}return i},i.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},i.currentWidth=function(){return this.currentDimension("width")},i.currentHeight=function(){return this.currentDimension("height")},i.focus=function(){this.v.focus()},i.blur=function(){this.v.blur()},i.emitTapEvents=function(){var t,i=0,n=null;this.on("touchstart",function(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},i=(new Date).getTime(),t=!0)}),this.on("touchmove",function(i){if(i.touches.length>1)t=!1;else if(n){var r=i.touches[0].pageX-n.pageX,e=i.touches[0].pageY-n.pageY;A.sqrt(r*r+e*e)>10&&(t=!1)}});var r=function(){t=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",function(r){(n=null,!0===t)&&((new Date).getTime()-i<200&&(r.preventDefault(),this.trigger("tap")))})},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=Ent(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){i(),this.clearInterval(t),t=this.setInterval(i,250)});var n=function(n){i(),this.clearInterval(t)};this.on("touchmove",i),this.on("touchend",n),this.on("touchcancel",n)}},i.setTimeout=function(t,i){t=Ent(this,t);var n=Ytt.setTimeout(t,i),r=function(){this.clearTimeout(n)};return r.guid="vjs-timeout-"+n,this.on("dispose",r),n},i.clearTimeout=function(t){Ytt.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=Ent(this,t);var n=Ytt.setInterval(t,i),r=function(){this.clearInterval(n)};return r.guid="vjs-interval-"+n,this.on("dispose",r),n},i.clearInterval=function(t){Ytt.clearInterval(t);var i=function(){};return i.guid="vjs-interval-"+t,this.off("dispose",i),t},t.registerComponent=function(i,n){if(i){if(i=Int(i),t.M||(t.M={}),"Player"===i&&t.M[i]){var r=t.M[i];if(r.players&&b.keys(r.players).length>0&&b.keys(r.players).map(function(t){return r.players[t]}).every(Boolean))throw new y("Can not register Player component after player has been created")}return t.M[i]=n,n}},t.getComponent=function(i){if(i)return i=Int(i),t.M&&t.M[i]?t.M[i]:Ytt&&Ytt.videojs&&Ytt.videojs[i]?(hit.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),Ytt.videojs[i]):void 0},t.extend=function(i){i=i||{},hit.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var n=i.init||i.init||this.prototype.init||this.prototype.init||function(){},r=function(){n.apply(this,arguments)};for(var e in(r.prototype=b.create(this.prototype)).constructor=r,r.extend=t.extend,i)i.hasOwnProperty(e)&&(r.prototype[e]=i[e]);return r},t}();Cnt.registerComponent("Component",Cnt);var Pnt=function(){};function Dnt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Nnt(t,i){return(Nnt=b.setPrototypeOf?b.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function xnt(t,i){t.prototype=b.create(i.prototype),t.prototype.constructor=t,Nnt(t,i)}function Bnt(t,i,n,r){return void 0===r&&(hit.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),r=0),function(t,i,n){if(i<0||i>n)throw new y("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+i+") is greater than or equal to the maximum bound ("+n+").")}(t,r,n.length-1),n[r][i]}function Ont(t){return void 0===t||0===t.length?{length:0,start:function(){throw new y("This TimeRanges object is empty")},end:function(){throw new y("This TimeRanges object is empty")}}:{length:t.length,start:Bnt.bind(null,"start",0,t),end:Bnt.bind(null,"end",1,t)}}function Mnt(t,i){return Array.isArray(t)?Ont(t):void 0===t||void 0===i?Ont():Ont([[t,i]])}function Lnt(t,i){var n,r,e=0;if(!i)return 0;t&&t.length||(t=Mnt(0,0));for(var s=0;si&&(r=i),e+=r-n;return e/i}Pnt.prototype.A={},Pnt.prototype.on=function(t,i){var n=this.addEventListener;this.addEventListener=function(){},wnt(this,t,i),this.addEventListener=n},Pnt.prototype.addEventListener=Pnt.prototype.on,Pnt.prototype.off=function(t,i){mnt(this,t,i)},Pnt.prototype.removeEventListener=Pnt.prototype.off,Pnt.prototype.one=function(t,i){var n=this.addEventListener;this.addEventListener=function(){},ynt(this,t,i),this.addEventListener=n},Pnt.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=dnt(t),this.A[i]&&this["on"+i]&&this["on"+i](t),pnt(this,t)},Pnt.prototype.dispatchEvent=Pnt.prototype.trigger;var Fnt,Unt,Vnt,jnt,Hnt={prefixed:!0},Wnt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],znt=Wnt[0];for(Unt=0;Unt',n=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),$tt.body.appendChild(r));for(var s={},u=0;u=0&&"[object Function]"===Srt.call(t.callee)),n};b.keys||(crt=b.prototype.hasOwnProperty,frt=b.prototype.toString,vrt=Ert,drt=b.prototype.propertyIsEnumerable,lrt=!drt.call({toString:null},"toString"),grt=drt.call(function(){},"prototype"),wrt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],mrt=function(t){var i=t.constructor;return i&&i.prototype===t},prt={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},yrt=function(){if(void 0===f)return!1;for(var t in f)try{if(!prt["$"+t]&&crt.call(f,t)&&null!==f[t]&&"object"==typeof f[t])try{mrt(f[t])}catch(t){return!0}}catch(t){return!0}return!1}(),_rt=function(t){if(void 0===f||!yrt)return mrt(t);try{return mrt(t)}catch(t){return!1}},art=function(t){var i=null!==t&&"object"==typeof t,n="[object Function]"===frt.call(t),r=vrt(t),e=i&&"[object String]"===frt.call(t),s=[];if(!i&&!n&&!r)throw new _("Object.keys called on a non-object");var u=grt&&n;if(e&&t.length>0&&!crt.call(t,0))for(var o=0;o0)for(var h=0;h2?arguments[2]:{},r=xrt(i);Brt&&(r=Mrt.call(r,b.getOwnPropertySymbols(i)));for(var e=0;e1&&"boolean"!=typeof i)throw new _('"allowMissing" argument must be a boolean');var n="$ "+t;if(!(n in $rt))throw new k("intrinsic "+t+" does not exist!");if(void 0===$rt[n]&&!i)throw new _("intrinsic "+t+" exists, but is not available. Please file an issue!");return $rt[n]},Jrt=Trt.call(Function.call,b.prototype.hasOwnProperty),Zrt=Krt,tet=Zrt("%TypeError%"),iet=Zrt("%SyntaxError%"),net=Jrt,ret={"Property Descriptor":function(t,i){if("Object"!==t.Type(i))return!1;var n={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in i)if(net(i,r)&&!n[r])return!1;var e=net(i,"[[Value]]"),s=net(i,"[[Get]]")||net(i,"[[Set]]");if(e&&s)throw new tet("Property Descriptors may not be both accessor and data descriptors");return!0}},eet=Number.isNaN||function(t){return t!=t},set=Number.isNaN||function(t){return t!=t},uet=Number.isFinite||function(t){return"number"==typeof t&&!set(t)&&t!==1/0&&t!==-1/0},oet=Function.prototype.toString,het=/^\s*class\b/,aet=function(t){try{var i=oet.call(t);return het.test(i)}catch(t){return!1}},cet=b.prototype.toString,fet="function"==typeof i&&"symbol"==typeof i.toStringTag,vet=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(fet)return function(t){try{return!aet(t)&&(oet.call(t),!0)}catch(t){return!1}}(t);if(aet(t))return!1;var i=cet.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},det=b.prototype.toString,get=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},wet=vet,met=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===det.call(t)?String:Number)===String||i===Number){var n,r,e=i===String?["toString","valueOf"]:["valueOf","toString"];for(r=0;r=0?1:-1},Iet=function(t,i){var n=t%i;return A.floor(n>=0?n:n+i)},Ret=function(t){return get(t)?t:arguments.length>1?met(t,arguments[1]):met(t)},Cet=Jrt,Pet={ToPrimitive:Ret,ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return Aet(i)?0:0!==i&&Tet(i)?Eet(i)*A.floor(A.abs(i)):i},ToInt32:function(t){return this.ToNumber(t)|0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var i=this.ToNumber(t);if(Aet(i)||0===i||!Tet(i))return 0;var n=Eet(i)*A.floor(A.abs(i));return Iet(n,65536)},ToString:function(t){return ket(t)},ToObject:function(t){return this.CheckObjectCoercible(t),yet(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new _et(i||"Cannot call method on "+t);return t},IsCallable:vet,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:Aet(t)&&Aet(i)},Type:function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0},IsPropertyDescriptor:function(t){if("Object"!==this.Type(t))return!1;var i={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in t)if(Cet(t,n)&&!i[n])return!1;var r=Cet(t,"[[Value]]"),e=Cet(t,"[[Get]]")||Cet(t,"[[Set]]");if(r&&e)throw new _et("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(bet(this,"Property Descriptor","Desc",t),!(!Cet(t,"[[Get]]")&&!Cet(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(bet(this,"Property Descriptor","Desc",t),!(!Cet(t,"[[Value]]")&&!Cet(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(bet(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(bet(this,"Property Descriptor","Desc",t),this.IsDataDescriptor(t))return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};if(this.IsAccessorDescriptor(t))return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};throw new _et("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new _et("ToPropertyDescriptor requires an object");var i={};if(Cet(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),Cet(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),Cet(t,"value")&&(i["[[Value]]"]=t.value),Cet(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),Cet(t,"get")){var n=t.get;if(void 0!==n&&!this.IsCallable(n))throw new _("getter must be a function");i["[[Get]]"]=n}if(Cet(t,"set")){var r=t.set;if(void 0!==r&&!this.IsCallable(r))throw new _et("setter must be a function");i["[[Set]]"]=r}if((Cet(i,"[[Get]]")||Cet(i,"[[Set]]"))&&(Cet(i,"[[Value]]")||Cet(i,"[[Writable]]")))throw new _et("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},Det=Trt.call(Function.call,String.prototype.replace),Net=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,xet=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,Bet=function(){var t=Pet.ToString(Pet.CheckObjectCoercible(this));return Det(Det(t,Net,""),xet,"")},Oet=Bet,Met=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:Oet},Let=Hrt,Fet=Met,Uet=Hrt,Vet=Bet,jet=Met,Het=function(){var t=Fet();return Let(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},Wet=Trt.call(Function.call,jet());Uet(Wet,{getPolyfill:jet,implementation:Vet,shim:Het});var zet=Wet,qet=vet,Xet=b.prototype.toString,Get=b.prototype.hasOwnProperty,Qet=function(t,i,n){if(!qet(i))throw new _("iterator must be a function");var r;arguments.length>=3&&(r=n),"[object Array]"===Xet.call(t)?function(t,i,n){for(var r=0,e=t.length;r0&&(c=g(function(){h=!0,a.abort("timeout");var t=new y("XMLHttpRequest timeout");t.code="ETIMEDOUT",s(t)},t.timeout)),a.setRequestHeader)for(o in l)l.hasOwnProperty(o)&&a.setRequestHeader(o,l[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new y("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(a.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(a),a.send(d),a}sst.XMLHttpRequest=Zet.XMLHttpRequest||function(){},sst.XDomainRequest="withCredentials"in new sst.XMLHttpRequest?sst.XMLHttpRequest:Zet.XDomainRequest,function(t,i){for(var n=0;n0&&(Ytt.console&&Ytt.console.groupCollapsed&&Ytt.console.groupCollapsed("Text Track parsing errors for "+i.src),r.forEach(function(t){return hit.error(t)}),Ytt.console&&Ytt.console.groupEnd&&Ytt.console.groupEnd()),n.flush()},hst=function(t){function i(n){var r;if(void 0===n&&(n={}),!n.tech)throw new y("A tech was not provided.");var e=Rnt(n,{kind:irt[n.kind]||"subtitles",language:n.language||n.srclang||""}),s=nrt[e.mode]||"disabled",u=e.default;"metadata"!==e.kind&&"chapters"!==e.kind||(s="hidden");var o=r=t.call(this,e)||this;if(o.H=e.tech,ent)for(var h in i.prototype)"constructor"!==h&&(o[h]=i.prototype[h]);o.L=[],o.q=[];var a=new Jnt(o.L),c=new Jnt(o.q),f=!1,v=Ent(o,function(){this.activeCues,f&&(this.trigger("cuechange"),f=!1)});return"disabled"!==s&&o.H.ready(function(){o.H.on("timeupdate",v)},!0),b.defineProperty(o,"default",{get:function(){return u},set:function(){}}),b.defineProperty(o,"mode",{get:function(){return s},set:function(t){var i=this;nrt[t]&&("showing"===(s=t)&&this.H.ready(function(){i.H.on("timeupdate",v)},!0),this.trigger("modechange"))}}),b.defineProperty(o,"cues",{get:function(){return this.W?a:null},set:function(){}}),b.defineProperty(o,"activeCues",{get:function(){if(!this.W)return null;if(0===this.cues.length)return c;for(var t=this.H.currentTime(),i=[],n=0,r=this.cues.length;n=t||e.startTime===e.endTime&&e.startTime<=t&&e.startTime+.5>=t)&&i.push(e)}if(f=!1,i.length!==this.q.length)f=!0;else for(var s=0;s=0;s--)if(n[s].selected){lst(n,n[s]);break}if(ent){for(var u in e=$tt.createElement("custom"),vst.prototype)"constructor"!==u&&(e[u]=vst.prototype[u]);for(var o in i.prototype)"constructor"!==o&&(e[o]=i.prototype[o])}return(e=r=t.call(this,n,e)||this).st=!1,b.defineProperty(e,"selectedIndex",{get:function(){for(var t=0;t=0;s--)if(n[s].enabled){wst(n,n[s]);break}if(ent){for(var u in e=$tt.createElement("custom"),vst.prototype)"constructor"!==u&&(e[u]=vst.prototype[u]);for(var o in i.prototype)"constructor"!==o&&(e[o]=i.prototype[o])}return(e=r=t.call(this,n,e)||this).st=!1,e||Dnt(r)}xnt(i,t);var n=i.prototype;return n.tt=function(i){var n=this;i.enabled&&wst(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",function(){n.st||(n.st=!0,wst(n,i),n.st=!1,n.trigger("change"))})},n.addTrack=function(t){this.tt(t)},n.removeTrack=function(i){t.prototype.it.call(this,i)},i}(vst),pst=void 0;var yst=function(t){function i(i,n){var r;return void 0===i&&(i={}),void 0===n&&(n=function(){}),i.reportTouchActivity=!1,(r=t.call(this,null,i,n)||this).et=!1,r.on("playing",function(){this.et=!0}),r.on("loadstart",function(){this.et=!1}),r.nt=i.textTracks,r.rt=i.videoTracks,r.ht=i.audioTracks,r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===i["native"+t+"Tracks"]&&(r["featuresNative"+t+"Tracks"]=!1)}),!1===i.nativeCaptions&&(r.featuresNativeTextTracks=!1),r.featuresNativeTextTracks||r.emulateTextTracks(),r.ot=new dst,r.initTextTrackListeners(),r.initTrackListeners(),i.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.l=r.constructor.name||"Unknown Tech"),r}xnt(i,t);var n=i.prototype;return 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(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Ent(this,function(){var t=this.bufferedPercent();this.ut!==t&&this.trigger("progress"),this.ut=t,1===t&&this.stopTrackingProgress()}),500)},n.onDurationChange=function(t){this.ct=this.duration()},n.buffered=function(){return Mnt(0,0)},n.bufferedPercent=function(){return Lnt(this.buffered(),this.ct)},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(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},n.clearTracks=function(t){var i=this;(t=[].concat(t)).forEach(function(t){for(var n=i[t+"Tracks"]()||[],r=n.length;r--;){var e=n[r];"text"===t&&i.removeRemoteTextTrack(e),n.it(e)}})},n.cleanupAutoTextTracks=function(){for(var t=this.ot||[],i=t.length;i--;){var n=t[i];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.error=function(t){return void 0!==t&&(this.lt=new qnt(t),this.trigger("error")),this.lt},n.played=function(){return this.et?Mnt(0,0):Mnt()},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTextTrackListeners=function(){var t=Ent(this,function(){this.trigger("texttrackchange")}),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",Ent(this,function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)})))},n.initTrackListeners=function(){var t=this;["video","audio"].forEach(function(i){var n=function(){t.trigger(i+"trackchange")},r=t[i+"Tracks"]();r.addEventListener("removetrack",n),r.addEventListener("addtrack",n),t.on("dispose",function(){r.removeEventListener("removetrack",n),r.removeEventListener("addtrack",n)})})},n.dt=function(){var t=this;if(!Ytt.WebVTT)if($tt.body.contains(this.el())){if(!this.h["vtt.js"]&&uit(pst)&&b.keys(pst).length>0)return void this.trigger("vttjsloaded");var i=$tt.createElement("script");i.src=this.h["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",i.onload=function(){t.trigger("vttjsloaded")},i.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){i.onload=null,i.onerror=null}),Ytt.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.dt)},n.emulateTextTracks=function(){var t=this,i=this.textTracks();if(i){var n=this.remoteTextTracks(),r=function(t){return i.tt(t.track)},e=function(t){return i.it(t.track)};n.on("addtrack",r),n.on("removetrack",e),this.dt();var s=function(){return t.trigger("texttrackchange")},u=function(){s();for(var t=0;t0||u>0?e+":":"")+(r=((e||s>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)}Nst.prototype.St="Play",Cnt.registerComponent("PlayToggle",Nst);var Bst=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"timeupdate",r.updateContent),r.on(i,"languagechange",r.updateContent),r}xnt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.S=pit("div",{className:"vjs-current-time-display",innerHTML:'Current Time 0:00'},{"aria-live":"off"}),i.appendChild(this.S),i},n.updateContent=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),n=this.localize("Current Time"),r=xst(i,this.t.duration());r!==this.Mt&&(this.Mt=r,this.S.innerHTML=''+n+" "+r)},i}(Cnt);Cnt.registerComponent("CurrentTimeDisplay",Bst);var Ost=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"durationchange",r.updateContent),r.on(i,"timeupdate",r.updateContent),r.on(i,"loadedmetadata",r.updateContent),r.on(i,"languagechange",r.updateContent),r}xnt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.S=pit("div",{className:"vjs-duration-display",innerHTML:''+this.localize("Duration Time")+" 0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},n.updateContent=function(t){var i=this.t.duration();if(i&&this.ct!==i){this.ct=i;var n=this.localize("Duration Time"),r=xst(i);this.S.innerHTML=''+n+" "+r}},i}(Cnt);Cnt.registerComponent("DurationDisplay",Ost);var Mst=function(t){function i(){return t.apply(this,arguments)||this}return xnt(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"
/
"})},i}(Cnt);Cnt.registerComponent("TimeDivider",Mst);var Lst=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"timeupdate",r.updateContent),r.on(i,"durationchange",r.updateContent),r.on(i,"languagechange",r.updateContent),r}xnt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.S=pit("div",{className:"vjs-remaining-time-display",innerHTML:''+this.localize("Remaining Time")+" -0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},n.updateContent=function(t){if(this.t.duration()){var i=this.localize("Remaining Time"),n=xst(this.t.remainingTime());n!==this.Mt&&(this.Mt=n,this.S.innerHTML=''+i+" -"+n)}},i}(Cnt);Cnt.registerComponent("RemainingTimeDisplay",Lst);var Fst=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).updateShowing(),r.on(r.player(),"durationchange",r.updateShowing),r.on(r.player(),"languagechange",r.handleLanguagechange),r}xnt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.S=pit("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.Ct=pit("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.At=$tt.createTextNode(this.localize("LIVE")),this.S.appendChild(this.Ct),this.S.appendChild(this.At),i.appendChild(this.S),i},n.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},n.handleLanguagechange=function(){this.Ct.innerHTML=this.localize("Stream Type"),this.At.innerHTML=this.localize("LIVE")},i}(Cnt);Cnt.registerComponent("LiveDisplay",Fst);var Ust=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).bar=r.getChild(r.h.barName),r.vertical(!!r.h.vertical),r.on("mousedown",r.handleMouseDown),r.on("touchstart",r.handleMouseDown),r.on("focus",r.handleFocus),r.on("blur",r.handleBlur),r.on("click",r.handleClick),r.on(i,"controlsvisible",r.update),r.on(i,r.playerEvent,r.update),r}xnt(i,t);var n=i.prototype;return n.createEl=function(i,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),n.className=n.className+" vjs-slider",n=eit({tabIndex:0},n),r=eit({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),t.prototype.createEl.call(this,i,n,r)},n.handleMouseDown=function(t){var i=this.bar.v.ownerDocument;t.preventDefault(),$tt.body.focus(),$tt.onselectstart=function(){return!1},this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove),this.on(i,"mouseup",this.handleMouseUp),this.on(i,"touchmove",this.handleMouseMove),this.on(i,"touchend",this.handleMouseUp),this.handleMouseMove(t)},n.handleMouseMove=function(t){},n.handleMouseUp=function(){var t=this.bar.v.ownerDocument;$tt.onselectstart=function(){return!0},this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},n.update=function(){if(this.v){var t=this.getPercent(),i=this.bar;if(i){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var n=(100*t).toFixed(2)+"%";this.vertical()?i.el().style.height=n:i.el().style.width=n}}},n.calculateDistance=function(t){var i=Oit(this.v,t);return this.vertical()?i.y:i.x},n.handleFocus=function(){this.on(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},n.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},n.handleBlur=function(){this.off(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},n.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},n.vertical=function(t){return void 0===t?this.Pt||!1:(this.Pt=!!t,this.Pt?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(Cnt);function Vst(t,i){if(!t||!i)return"";if("function"==typeof Ytt.getComputedStyle){var n=Ytt.getComputedStyle(t);return n?n[i]:""}return t.currentStyle[i]||""}Cnt.registerComponent("Slider",Ust);var jst=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).Nt=[],r.on(i,"progress",r.update),r.on(i,"languagechange",r.handleLanguagechange),r}xnt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Et=pit("span",{innerHTML:this.localize("Loaded")}),this.Bt=$tt.createTextNode(": 0%"),this.Ct=pit("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Et),this.Ct.appendChild(this.Bt),i.appendChild(this.Ct),i},n.update=function(t){var i=this.t.buffered(),n=this.t.duration(),r=this.t.bufferedEnd(),e=this.Nt,s=function(t,i){var n=t/i||0;return 100*(n>=1?1:n)+"%"};this.v.style.width=s(r,n);for(var u=0;ui.length;c--)this.v.removeChild(e[c-1]);e.length=i.length},n.handleLanguagechange=function(){this.Et.innerHTML=this.localize("Loaded")},i}(Cnt);Cnt.registerComponent("LoadProgressBar",jst);var Hst=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).updateDataAttr(),r.on(i,"timeupdate",r.updateDataAttr),r.on(i,"languagechange",r.handleLanguagechange),i.ready(Ent(Dnt(r),r.updateDataAttr)),n.playerOptions&&n.playerOptions.controlBar&&n.playerOptions.controlBar.progressControl&&n.playerOptions.controlBar.progressControl.keepTooltipsInside&&(r.keepTooltipsInside=n.playerOptions.controlBar.progressControl.keepTooltipsInside),r.keepTooltipsInside&&r.addClass("vjs-keep-tooltips-inside"),r}xnt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"});return this.It=pit("span",{innerHTML:this.localize("Progress")}),this.Ft=$tt.createTextNode(": 0%"),this.Ct=pit("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.Ct),i},n.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",xst(i,this.t.duration()))},n.handleLanguagechange=function(){this.It.innerHTML=this.localize("Progress")},i}(Cnt);Cnt.registerComponent("PlayProgressBar",Hst);var Wst=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).updateDataAttr(),r.on(i,"timeupdate",r.updateDataAttr),r.on(i,"languagechange",r.handleLanguagechange),i.ready(Ent(Dnt(r),r.updateDataAttr)),r}xnt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar"});return this.tooltip=pit("div",{className:"vjs-time-tooltip"}),this.It=pit("span",{innerHTML:this.localize("Progress")}),this.Ft=$tt.createTextNode(": 0%"),this.Ct=pit("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.Ct),i},n.updateDataAttr=function(t){var i=xst(this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),this.t.duration());this.v.setAttribute("data-current-time",i),this.tooltip.innerHTML=i},n.handleLanguagechange=function(){this.It.innerHTML=this.localize("Progress")},i}(Cnt);Cnt.registerComponent("TooltipProgressBar",Wst);var zst=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"timeupdate",r.updateProgress),r.on(i,"ended",r.updateProgress),i.ready(Ent(Dnt(r),r.updateProgress)),n.playerOptions&&n.playerOptions.controlBar&&n.playerOptions.controlBar.progressControl&&n.playerOptions.controlBar.progressControl.keepTooltipsInside&&(r.keepTooltipsInside=n.playerOptions.controlBar.progressControl.keepTooltipsInside),r.keepTooltipsInside&&(r.tooltipProgressBar=r.addChild("TooltipProgressBar")),r}xnt(i,t);var n=i.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},n.updateProgress=function(t){if(this.updateAriaAttributes(this.v),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.v),this.tooltipProgressBar.v.style.width=this.bar.v.style.width;var i=S(Vst(this.player().el(),"width")),n=S(Vst(this.tooltipProgressBar.tooltip,"width")),r=this.tooltipProgressBar.el().style;r.maxWidth=A.floor(i-n/2)+"px",r.minWidth=A.ceil(n/2)+"px",r.right="-"+n/2+"px"}},n.updateAriaAttributes=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",xst(i,this.t.duration()))},n.getPercent=function(){var t=this.t.currentTime()/this.t.duration();return t>=1?1:t},n.handleMouseDown=function(i){this.t.scrubbing(!0),this.videoWasPlaying=!this.t.paused(),this.t.pause(),t.prototype.handleMouseDown.call(this,i)},n.handleMouseMove=function(t){var i=this.calculateDistance(t)*this.t.duration();i===this.t.duration()&&(i-=.1),this.t.currentTime(i)},n.handleMouseUp=function(i){t.prototype.handleMouseUp.call(this,i),this.t.scrubbing(!1),this.videoWasPlaying&&this.t.play()},n.stepForward=function(){this.t.currentTime(this.t.currentTime()+5)},n.stepBack=function(){this.t.currentTime(this.t.currentTime()-5)},i}(Ust);zst.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},zst.prototype.playerEvent="timeupdate",Cnt.registerComponent("SeekBar",zst);var qst=function(t){function i(i,n){var r;return r=t.call(this,i,n)||this,n.playerOptions&&n.playerOptions.controlBar&&n.playerOptions.controlBar.progressControl&&n.playerOptions.controlBar.progressControl.keepTooltipsInside&&(r.keepTooltipsInside=n.playerOptions.controlBar.progressControl.keepTooltipsInside),r.keepTooltipsInside&&(r.tooltip=pit("div",{className:"vjs-time-tooltip"}),r.el().appendChild(r.tooltip),r.addClass("vjs-keep-tooltips-inside")),r.update(0,0),i.on("ready",function(){r.on(i.controlBar.progressControl.el(),"mousemove",function(t,i){var n=Date.now();return function(){var r=Date.now();r-n>=i&&(t.apply(void 0,arguments),n=r)}}(Ent(Dnt(r),r.handleMouseMove),25))}),r}xnt(i,t);var n=i.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.handleMouseMove=function(t){var i=this.t.duration(),n=this.calculateDistance(t)*i,r=t.pageX-Bit(this.el().parentNode).left;this.update(n,r)},n.update=function(t,i){var n=xst(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",n),this.keepTooltipsInside){var r=i-this.Dt(i)+1,e=S(Vst(this.tooltip,"width"))/2;this.tooltip.innerHTML=n,this.tooltip.style.right="-"+(e-r)+"px"}},n.calculateDistance=function(t){return Oit(this.el().parentNode,t).x},n.Dt=function(t){if(!this.keepTooltipsInside)return t;var i=S(Vst(this.player().el(),"width")),n=S(Vst(this.tooltip,"width"))/2,r=t;return ti-n&&(r=A.floor(i-n)),r},i}(Cnt);Cnt.registerComponent("MouseTimeDisplay",qst);var Xst=function(t){function i(){return t.apply(this,arguments)||this}return xnt(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(Cnt);Xst.prototype.h={children:["seekBar"]},Cnt.registerComponent("ProgressControl",Xst);var Gst=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"fullscreenchange",r.handleFullscreenChange),r}xnt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(t){this.t.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(t){this.t.isFullscreen()?this.t.exitFullscreen():this.t.requestFullscreen()},i}(Cst);Gst.prototype.St="Fullscreen",Cnt.registerComponent("FullscreenToggle",Gst);var Qst=function(t){function i(){return t.apply(this,arguments)||this}return xnt(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},i}(Cnt);Cnt.registerComponent("VolumeLevel",Qst);var Yst=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"volumechange",r.updateARIAAttributes),i.ready(Ent(Dnt(r),r.updateARIAAttributes)),r}xnt(i,t);var n=i.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},n.handleMouseMove=function(t){this.checkMuted(),this.t.volume(this.calculateDistance(t))},n.checkMuted=function(){this.t.muted()&&this.t.muted(!1)},n.getPercent=function(){return this.t.muted()?0:this.t.volume()},n.stepForward=function(){this.checkMuted(),this.t.volume(this.t.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.t.volume(this.t.volume()-.1)},n.updateARIAAttributes=function(t){var i=(100*this.t.volume()).toFixed(2);this.v.setAttribute("aria-valuenow",i),this.v.setAttribute("aria-valuetext",i+"%")},i}(Ust);Yst.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},Yst.prototype.playerEvent="volumechange",Cnt.registerComponent("VolumeBar",Yst);var $st=function(t){function i(i,n){var r;return r=t.call(this,i,n)||this,i.H&&!1===i.H.featuresVolumeControl&&r.addClass("vjs-hidden"),r.on(i,"loadstart",function(){!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),r}return xnt(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(Cnt);$st.prototype.h={children:["volumeBar"]},Cnt.registerComponent("VolumeControl",$st);var Kst=function(t){function i(){return t.apply(this,arguments)||this}xnt(i,t);var n=i.prototype;return n.addItem=function(t){this.addChild(t),t.on("click",Ent(this,function(){this.unlockShowing()}))},n.createEl=function(){var i=this.h.contentElType||"ul";this.S=pit(i,{className:"vjs-menu-content"});var n=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return n.appendChild(this.S),wnt(n,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),n},i}(Cnt);Cnt.registerComponent("Popup",Kst);var Jst=function(t){function i(i,n){var r;return void 0===n&&(n={}),(r=t.call(this,i,n)||this).update(),r}xnt(i,t);var n=i.prototype;return n.update=function(){var t=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=t,this.addChild(t),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},n.createPopup=function(){},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},n.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},i}(kst);Cnt.registerComponent("PopupButton",Jst);var Zst=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"volumechange",r.update),i.H&&!1===i.H.featuresVolumeControl&&r.addClass("vjs-hidden"),r.on(i,"loadstart",function(){this.update(),!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),r}xnt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(t){this.t.muted(!this.t.muted())},n.update=function(t){var i=this.t.volume(),n=3;this.t.muted()?n=0:i<.33?n=1:i<.67&&(n=2);var r=this.t.muted()?"Unmute":"Mute";this.controlText()!==r&&this.controlText(r);for(var e=0;e<4;e++)Rit(this.v,"vjs-vol-"+e);Iit(this.v,"vjs-vol-"+n)},i}(Cst);Zst.prototype.St="Mute",Cnt.registerComponent("MuteToggle",Zst);var tut=function(t){function i(i,n){var r;function e(){i.H&&!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}return void 0===n&&(n={}),void 0===n.inline&&(n.inline=!0),void 0===n.vertical&&(n.inline?n.vertical=!1:n.vertical=!0),n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=!!n.vertical,(r=t.call(this,i,n)||this).on(i,"volumechange",r.volumeUpdate),r.on(i,"loadstart",r.volumeUpdate),e.call(Dnt(r)),r.on(i,"loadstart",e),r.on(r.volumeBar,["slideractive","focus"],function(){this.addClass("vjs-slider-active")}),r.on(r.volumeBar,["sliderinactive","blur"],function(){this.removeClass("vjs-slider-active")}),r.on(r.volumeBar,["focus"],function(){this.addClass("vjs-lock-showing")}),r.on(r.volumeBar,["blur"],function(){this.removeClass("vjs-lock-showing")}),r}xnt(i,t);var n=i.prototype;return n.buildCSSClass=function(){var i="";return i=this.h.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+t.prototype.buildCSSClass.call(this)+" "+i},n.createPopup=function(){var t=new Kst(this.t,{contentElType:"div"}),i=new Yst(this.t,this.h.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},n.handleClick=function(i){Zst.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},n.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],Ent(this,this.handleMouseDown))},n.handleMouseDown=function(t){this.on(["mousemove","touchmove"],Ent(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},n.handleMouseUp=function(t){this.off(["mousemove","touchmove"],Ent(this.volumeBar,this.volumeBar.handleMouseMove))},i}(Jst);tut.prototype.volumeUpdate=Zst.prototype.update,tut.prototype.St="Mute",Cnt.registerComponent("VolumeMenuButton",tut);var iut=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).$t=-1,r.on("keydown",r.handleKeyPress),r}xnt(i,t);var n=i.prototype;return n.addItem=function(t){this.addChild(t),t.on("click",Ent(this,function(t){this.unlockShowing()}))},n.createEl=function(){var i=this.h.contentElType||"ul";this.S=pit(i,{className:"vjs-menu-content"}),this.S.setAttribute("role","menu");var n=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return n.setAttribute("role","presentation"),n.appendChild(this.S),wnt(n,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),n},n.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},n.stepForward=function(){var t=0;void 0!==this.$t&&(t=this.$t+1),this.focus(t)},n.stepBack=function(){var t=0;void 0!==this.$t&&(t=this.$t-1),this.focus(t)},n.focus=function(t){void 0===t&&(t=0);var i=this.children().slice();i.length&&i[0].className&&/vjs-menu-title/.test(i[0].className)&&i.shift(),i.length>0&&(t<0?t=0:t>=i.length&&(t=i.length-1),this.$t=t,i[t].v.focus())},i}(Cnt);Cnt.registerComponent("Menu",iut);var nut=function(t){function i(i,n){var r;return void 0===n&&(n={}),(r=t.call(this,i,n)||this).update(),r.Rt=!0,r.v.setAttribute("aria-haspopup","true"),r.v.setAttribute("role","menuitem"),r.on("keydown",r.handleSubmenuKeyPress),r}xnt(i,t);var n=i.prototype;return n.update=function(){var t=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=t,this.addChild(t),this.Ut=!1,this.v.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Ot?this.hide():this.show()},n.createMenu=function(){var t=new iut(this.t);if(this.Ot=0,this.h.title){var i=pit("li",{className:"vjs-menu-title",innerHTML:Int(this.h.title),tabIndex:-1});this.Ot+=1,t.m.unshift(i),_it(i,t.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n=0;i--){var n=t[i];if(n.kind===this.Lt)return n}},n.getMenuCaption=function(){return this.Ht&&this.Ht.label?this.Ht.label:this.localize(Int(this.Lt))},n.createMenu=function(){return this.h.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},n.createItems=function(){var t=[];if(!this.Ht)return t;var i=this.Ht.cues;if(!i)return t;for(var n=0,r=i.length;n=0;n--)t.addChild(new wut(this.player(),{rate:i[n]+"x"}));return t},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(t){for(var i=this.player().playbackRate(),n=this.playbackRates(),r=n[0],e=0;ei){r=n[e];break}this.player().playbackRate(r)},n.playbackRates=function(){return this.h.playbackRates||this.h.playerOptions&&this.h.playerOptions.playbackRates},n.playbackRateSupported=function(){return this.player().H&&this.player().H.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(t){this.playbackRateSupported()&&(this.Vt.innerHTML=this.player().playbackRate()+"x")},i}(nut);mut.prototype.St="Playback Rate",Cnt.registerComponent("PlaybackRateMenuButton",mut);var put=function(t){function i(){return t.apply(this,arguments)||this}xnt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},i}(Cnt);Cnt.registerComponent("Spacer",put);var yut=function(t){function i(){return t.apply(this,arguments)||this}xnt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){var i=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return i.innerHTML=" ",i},i}(put);Cnt.registerComponent("CustomControlSpacer",yut);var _ut=function(t){function i(){return t.apply(this,arguments)||this}return xnt(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(Cnt);_ut.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},Cnt.registerComponent("ControlBar",_ut);var kut=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"error",r.open),r}xnt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},n.content=function(){var t=this.player().error();return t?this.localize(t.message):""},i}(Knt);kut.prototype.h=Rnt(Knt.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Cnt.registerComponent("ErrorDisplay",kut);var but="vjs-text-track-settings",Aut=["#000","Black"],Tut=["#00F","Blue"],Sut=["#0FF","Cyan"],Eut=["#0F0","Green"],Iut=["#F0F","Magenta"],Rut=["#F00","Red"],Cut=["#FFF","White"],Put=["#FF0","Yellow"],Dut=["1","Opaque"],Nut=["0.5","Semi-Transparent"],xut=["0","Transparent"],But={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Aut,Cut,Rut,Eut,Tut,Put,Iut,Sut]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Dut,Nut,xut]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Cut,Aut,Rut,Eut,Tut,Put,Iut,Sut]},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(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Dut,Nut]},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:[xut,Nut,Dut]}};function Out(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}But.windowColor.options=But.backgroundColor.options;var Mut,Lut=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).setDefaults(),r.hide(),r.updateDisplay=Ent(Dnt(r),r.updateDisplay),void 0===n.persistTextTrackSettings&&(r.h.persistTextTrackSettings=r.h.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",function(){r.saveSettings(),r.hide()}),r.on(r.$(".vjs-default-button"),"click",function(){r.setDefaults(),r.updateDisplay()}),rit(But,function(t){r.on(r.$(t.selector),"change",r.updateDisplay)}),r.h.persistTextTrackSettings&&r.restoreSettings(),r}xnt(i,t);var n=i.prototype;return n.zt=function(t){var i=this,n=But[t],r=n.id.replace("%s",this.o);return[pit("label",{className:"vjs-label",textContent:n.label},{for:r}),pit("select",{id:r},void 0,n.options.map(function(t){return pit("option",{textContent:i.localize(t[1]),value:t[0]})}))]},n.Wt=function(){var t=pit("legend",{textContent:this.localize("Text")}),i=this.zt("color"),n=pit("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.zt("textOpacity"));return pit("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,n))},n.Gt=function(){var t=pit("legend",{textContent:this.localize("Background")}),i=this.zt("backgroundColor"),n=pit("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.zt("backgroundOpacity"));return pit("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,n))},n.Xt=function(){var t=pit("legend",{textContent:this.localize("Window")}),i=this.zt("windowColor"),n=pit("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.zt("windowOpacity"));return pit("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,n))},n.Jt=function(){return pit("div",{className:"vjs-tracksettings-colors"},void 0,[this.Wt(),this.Gt(),this.Xt()])},n.Qt=function(){var t=pit("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.zt("fontPercent")),i=pit("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.zt("edgeStyle")),n=pit("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.zt("fontFamily"));return pit("div",{className:"vjs-tracksettings-font"},void 0,[t,i,n])},n.Yt=function(){var t=pit("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=pit("button",{className:"vjs-done-button",textContent:"Done"});return pit("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},n.createEl=function(){var t=pit("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=pit("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),n=pit("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),r=pit("div",void 0,{role:"document"},[i,n,t]);return pit("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":n.id},r)},n.getValues=function(){var t=this;return function(t,i,n){return void 0===n&&(n=0),nit(t).reduce(function(n,r){return i(n,t[r],r)},n)}(But,function(i,n,r){var e=function(t,i){return Out(t.options[t.options.selectedIndex].value,i)}(t.$(n.selector),n.parser);return void 0!==e&&(i[r]=e),i},{})},n.setValues=function(t){var i=this;rit(But,function(n,r){!function(t,i,n){if(i)for(var r=0;r=0;s--){var u=e[s],o=this.h[u];void 0!==o&&(o?Nit(t,u,u):xit(t,u),t[u]=o)}return t},n.Zt=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var i=!1,n=function(){i=!0};this.on("loadstart",n);var r=function(){i||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready(function(){this.off("loadstart",n),this.off("loadedmetadata",r),i||this.trigger("loadstart")})}var e=["loadstart"];e.push("loadedmetadata"),t.readyState>=2&&e.push("loadeddata"),t.readyState>=3&&e.push("canplay"),t.readyState>=4&&e.push("canplaythrough"),this.ready(function(){e.forEach(function(t){this.trigger(t)},this)})}},n.ai=function(){var t=this.el().textTracks;if(t){for(var i=0;i0&&(t.v.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",i))}),NaN}return this.v.duration||NaN},n.width=function(){return this.v.offsetWidth},n.height=function(){return this.v.offsetHeight},n.di=function(){var t=this;if("webkitDisplayingFullscreen"in this.v){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.v&&"picture-in-picture"!==this.v.webkitPresentationMode&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",function(){t.off("webkitbeginfullscreen",n),t.off("webkitendfullscreen",i)})}},n.supportsFullScreen=function(){if("function"==typeof this.v.webkitEnterFullScreen){var t=Ytt.navigator&&Ytt.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},n.enterFullScreen=function(){var t=this.v;t.paused&&t.networkState<=t.HAVE_METADATA?(this.v.play(),this.setTimeout(function(){t.pause(),t.webkitEnterFullScreen()},0)):t.webkitEnterFullScreen()},n.exitFullScreen=function(){this.v.webkitExitFullScreen()},n.src=function(t){if(void 0===t)return this.v.src;this.setSrc(t)},n.reset=function(){i.resetMediaElement(this.v)},n.currentSrc=function(){return this.bt?this.bt.src:this.v.currentSrc},n.setControls=function(t){this.v.controls=!!t},n.addTextTrack=function(i,n,r){return this.featuresNativeTextTracks?this.v.addTextTrack(i,n,r):t.prototype.addTextTrack.call(this,i,n,r)},n.createRemoteTextTrack=function(i){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,i);var n=$tt.createElement("track");return i.kind&&(n.kind=i.kind),i.label&&(n.label=i.label),(i.language||i.srclang)&&(n.srclang=i.language||i.srclang),i.default&&(n.default=i.default),i.id&&(n.id=i.id),i.src&&(n.src=i.src),n},n.addRemoteTextTrack=function(i,n){var r=t.prototype.addRemoteTextTrack.call(this,i,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},n.removeRemoteTextTrack=function(i){if(t.prototype.removeRemoteTextTrack.call(this,i),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)i!==n[r]&&i!==n[r].track||this.el().removeChild(n[r])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),Ytt.performance&&"function"==typeof Ytt.performance.now?t.creationTime=Ytt.performance.now():Ytt.performance&&Ytt.performance.timing&&"number"==typeof Ytt.performance.timing.navigationStart&&(t.creationTime=Ytt.Date.now()-Ytt.performance.timing.navigationStart),t},i}(yst);git()&&(Uut.TEST_VID=$tt.createElement("video"),(Fut=$tt.createElement("track")).kind="captions",Fut.srclang="en",Fut.label="English",Uut.TEST_VID.appendChild(Fut)),Uut.isSupported=function(){try{Uut.TEST_VID.volume=.5}catch(t){return!1}return!(!Uut.TEST_VID||!Uut.TEST_VID.canPlayType)},Uut.canControlVolume=function(){try{var t=Uut.TEST_VID.volume;return Uut.TEST_VID.volume=t/2+.1,t!==Uut.TEST_VID.volume}catch(t){return!1}},Uut.canControlPlaybackRate=function(){if($it&&nnt&&rnt<58)return!1;try{var t=Uut.TEST_VID.playbackRate;return Uut.TEST_VID.playbackRate=t/2+.1,t!==Uut.TEST_VID.playbackRate}catch(t){return!1}},Uut.supportsNativeTextTracks=function(){return ont},Uut.supportsNativeVideoTracks=function(){return!(!Uut.TEST_VID||!Uut.TEST_VID.videoTracks)},Uut.supportsNativeAudioTracks=function(){return!(!Uut.TEST_VID||!Uut.TEST_VID.audioTracks)},Uut.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],Uut.prototype.featuresVolumeControl=Uut.canControlVolume(),Uut.prototype.featuresPlaybackRate=Uut.canControlPlaybackRate(),Uut.prototype.movingMediaElementInDOM=!Qit,Uut.prototype.featuresFullscreenResize=!0,Uut.prototype.featuresProgressEvents=!0,Uut.prototype.featuresTimeupdateEvents=!0,Uut.prototype.featuresNativeTextTracks=Uut.supportsNativeTextTracks(),Uut.prototype.featuresNativeVideoTracks=Uut.supportsNativeVideoTracks(),Uut.prototype.featuresNativeAudioTracks=Uut.supportsNativeAudioTracks();var Vut=Uut.TEST_VID&&Uut.TEST_VID.constructor.prototype.canPlayType,jut=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,Hut=/^video\/mp4/i;Uut.patchCanPlayType=function(){Kit>=4&&!tnt?Uut.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&jut.test(t)?"maybe":Vut.call(this,t)}:Jit&&(Uut.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Hut.test(t)?"maybe":Vut.call(this,t)})},Uut.unpatchCanPlayType=function(){var t=Uut.TEST_VID.constructor.prototype.canPlayType;return Uut.TEST_VID.constructor.prototype.canPlayType=Vut,t},Uut.patchCanPlayType(),Uut.disposeMediaElement=function(t){if(t){var i=t.nodeName.toLowerCase();if("video"===i||"audio"===i){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}}},Uut.resetMediaElement=function(t){if(t){for(var i=t.querySelectorAll("source"),n=i.length;n--;)t.removeChild(i[n]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(t){Uut.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){Uut.prototype["set"+Int(t)]=function(i){this.v[t]=i,i?this.v.setAttribute(t,t):this.v.removeAttribute(t)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(t){Uut.prototype[t]=function(){return this.v[t]}}),["volume","src","poster","preload","playbackRate"].forEach(function(t){Uut.prototype["set"+Int(t)]=function(i){this.v[t]=i}}),["pause","load"].forEach(function(t){Uut.prototype[t]=function(){return this.v[t]()}}),yst.withSourceHandlers(Uut),Uut.nativeSourceHandler={},Uut.nativeSourceHandler.canPlayType=function(t){try{return Uut.TEST_VID.canPlayType(t)}catch(t){return""}},Uut.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return Uut.nativeSourceHandler.canPlayType(t.type);if(t.src){var n=function(t){if("string"==typeof t){var i=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(i)return i.pop().toLowerCase()}return""}(t.src);return Uut.nativeSourceHandler.canPlayType("video/"+n)}return""},Uut.nativeSourceHandler.handleSource=function(t,i,n){i.setSrc(t.src)},Uut.nativeSourceHandler.dispose=function(){},Uut.registerSourceHandler(Uut.nativeSourceHandler),Cnt.registerComponent("Html5",Uut),yst.registerTech("Html5",Uut);var Wut=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],zut=function(t){function i(n,r,e){var s;if(n.id=n.id||["vjs_video",Ztt()].join("_"),(r=eit(i.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var u=n.closest("[lang]");u&&(r.language=u.getAttribute("lang"))}else for(var o=n;o&&1===o.nodeType;){if(Dit(o).hasOwnProperty("lang")){r.language=o.getAttribute("lang");break}o=o.parentNode}if(!(s=t.call(this,null,r,e)||this).h||!s.h.techOrder||!s.h.techOrder.length)throw new y("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=n,s.tagAttributes=n&&Dit(n),s.language(s.h.language),r.languages){var h={};b.getOwnPropertyNames(r.languages).forEach(function(t){h[t.toLowerCase()]=r.languages[t]}),s.pi=h}else s.pi=i.prototype.h.languages;s.mi={},s.gi=r.poster||"",s.yi=!!r.controls,n.controls=!1,s.bi=!1,s.v=s.createEl();var a=Rnt(s.h);if(r.plugins){var c=r.plugins;b.getOwnPropertyNames(c).forEach(function(t){"function"==typeof this[t]?this[t](c[t]):hit.error("Unable to find plugin:",t)},Dnt(s))}s.h.playerOptions=a,s.initChildren(),s.isAudio("audio"===n.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.v.setAttribute("role","region"),s.isAudio()?s.v.setAttribute("aria-label","audio player"):s.v.setAttribute("aria-label","video player"),s.isAudio()&&s.addClass("vjs-audio"),s.ki()&&s.addClass("vjs-no-flex"),Qit||s.addClass("vjs-workinghover"),i.players[s.o]=Dnt(s);var f="5.20.6-opentelly.14".split(".")[0];return s.addClass("vjs-v"+f),s.userActive(!0),s.reportUserActivity(),s.wi(),s.on("fullscreenchange",s._i),s.on("stageclick",s.xi),s}xnt(i,t);var n=i.prototype;return n.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.Ci&&this.Ci.parentNode&&this.Ci.parentNode.removeChild(this.Ci),i.players[this.o]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.v&&this.v.player&&(this.v.player=null),this.H&&this.H.dispose(),t.prototype.dispose.call(this)},n.createEl=function(){var i,n=this.tag,r=this.Si=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player");i=this.v=r?n.parentNode:t.prototype.createEl.call(this,"div"),n.setAttribute("tabindex","-1"),n.removeAttribute("width"),n.removeAttribute("height");var e=Dit(n);if(b.getOwnPropertyNames(e).forEach(function(t){"class"===t?i.className+=" "+e[t]:i.setAttribute(t,e[t])}),n.playerId=n.id,n.id+="ji",n.className="vjs-tech",n.player=i.player=this,this.addClass("vjs-paused"),!0!==Ytt.VIDEOJS_NO_DYNAMIC_STYLE){this.Ci=Tnt("vjs-styles-dimensions");var s=Vit(".vjs-styles-defaults"),u=Vit("head");u.insertBefore(this.Ci,s?s.nextSibling:u.firstChild)}this.width(this.h.width),this.height(this.h.height),this.fluid(this.h.fluid),this.aspectRatio(this.h.aspectRatio);for(var o=n.getElementsByTagName("a"),h=0;h0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),e=r[1]/r[0];t=void 0!==this.Ti?this.Ti:void 0!==this.Mi?this.Mi/e:this.videoWidth()||300,i=void 0!==this.Mi?this.Mi:t*e,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Snt(this.Ci,"\n ."+n+" {\n width: "+t+"px;\n height: "+i+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*e+"%;\n }\n ")}else{var s="number"==typeof this.Ti?this.Ti:this.h.width,u="number"==typeof this.Mi?this.Mi:this.h.height,o=this.H&&this.H.el();o&&(s>=0&&(o.width=s),u>=0&&(o.height=u))}},n._t=function(t,i){var n=this;this.H&&this.Ei(),"Html5"!==t&&this.tag&&(yst.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Bi=t,this.j=!1;var r=eit({source:i,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Ii",videoTracks:this.rt,textTracks:this.nt,audioTracks:this.ht,autoplay:this.h.autoplay,playsinline:this.h.playsinline,preload:this.h.preload,loop:this.h.loop,muted:this.h.muted,poster:this.poster(),language:this.language(),playerElIngest:this.Si||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(r.tag=this.tag),i&&(this.Fi=i.type,i.src===this.mi.src&&this.mi.currentTime>0&&(r.startTime=this.mi.currentTime),this.mi.sources=null,this.mi.source=i,this.mi.src=i.src);var e=yst.getTech(t);e||(e=Cnt.getComponent(t)),this.H=new e(r),this.H.ready(Ent(this,this.Di),!0),Ynt(this.$i||[],this.H),Wut.forEach(function(t){n.on(n.H,t,n["handleTech"+Int(t)+"_"])}),this.on(this.H,"loadstart",this.Ri),this.on(this.H,"waiting",this.Ui),this.on(this.H,"canplay",this.Oi),this.on(this.H,"canplaythrough",this.Vi),this.on(this.H,"playing",this.Li),this.on(this.H,"ended",this.Hi),this.on(this.H,"seeking",this.qi),this.on(this.H,"seeked",this.zi),this.on(this.H,"play",this.Wi),this.on(this.H,"firstplay",this.Gi),this.on(this.H,"pause",this.Xi),this.on(this.H,"durationchange",this.Ji),this.on(this.H,"fullscreenchange",this.Qi),this.on(this.H,"error",this.Yi),this.on(this.H,"loadedmetadata",this.Ai),this.on(this.H,"resize",this.Ai),this.on(this.H,"posterchange",this.Ki),this.on(this.H,"textdata",this.Zi),this.usingNativeControls(this.ts("controls")),this.controls()&&!this.usingNativeControls()&&this.ss(),this.H.el().parentNode===this.contentEl()||"Html5"===t&&this.tag||_it(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},n.Ei=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.$i=Qnt(this.H),this.j=!1,this.H.dispose(),this.H=!1},n.tech=function(t){if(t&&t.IWillNotUseThisInPlugins)return this.H;var i="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw Ytt.alert(i),new y(i)},n.ss=function(){this.es(),this.on(this.H,"mousedown",this.ns),this.on(this.H,"touchstart",this.rs),this.on(this.H,"touchmove",this.hs),this.on(this.H,"touchend",this.us),this.on(this.H,"tap",this.cs)},n.es=function(){this.off(this.H,"tap",this.cs),this.off(this.H,"touchstart",this.rs),this.off(this.H,"touchmove",this.hs),this.off(this.H,"touchend",this.us),this.off(this.H,"mousedown",this.ns)},n.Di=function(){if(this.triggerReady(),this.mi.volume&&this.ls("setVolume",this.mi.volume),this.Ki(),this.Ji(),(this.src()||this.currentSrc())&&this.tag&&this.h.autoplay&&this.paused()){try{delete this.tag.poster}catch(t){hit("deleting tag.poster throws in some browsers",t)}this.play()}},n.Ri=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},n.hasStarted=function(t){return void 0!==t?(this.et!==t&&(this.et=t,t?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.et},n.Wi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.Ui=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return t.removeClass("vjs-waiting")})},n.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.Li=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.qi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.zi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},n.Gi=function(){this.h.starttime&&(hit.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.h.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},n.Xi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.Hi=function(){this.addClass("vjs-ended"),this.h.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},n.Ji=function(){this.duration(this.ts("duration"))},n.ns=function(t){0===t.button&&this.controls()&&(void 0!==this.h&&void 0!==this.h.userActions&&void 0!==this.h.userActions.click&&!1===this.h.userActions.click||(void 0!==this.h&&void 0!==this.h.userActions&&"function"==typeof this.h.userActions.click?this.h.userActions.click.call(this,t):this.paused()?this.play():this.pause()))},n.cs=function(){this.userActive(!this.userActive())},n.rs=function(){this.userWasActive=this.userActive()},n.hs=function(){this.userWasActive&&this.reportUserActivity()},n.us=function(t){t.cancelable&&t.preventDefault()},n._i=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.xi=function(){this.reportUserActivity()},n.Qi=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},n.Yi=function(){var t=this.H.error();this.error(t)},n.Zi=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},n.getCache=function(){return this.mi},n.ls=function(t,i){if(this.H&&!this.H.j)this.H.ready(function(){this[t](i)},!0);else try{this.H&&this.H[t](i)}catch(t){throw hit(t),t}},n.ts=function(t){if(this.H&&this.H.j)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?hit("Video.js: "+t+" method not defined for "+this.Bi+" playback technology.",i):"TypeError"===i.name?(hit("Video.js: "+t+" unavailable on "+this.Bi+" playback technology element.",i),this.H.j=!1):hit(i),i}},n.play=function(){return this.src()||this.currentSrc()?this.ls("play"):this.H.one("loadstart",function(){this.play()}),this},n.pause=function(){return this.ls("pause"),this},n.paused=function(){return!1!==this.ts("paused")},n.scrubbing=function(t){return void 0!==t?(this.bi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.bi},n.currentTime=function(t){return void 0!==t?(this.ls("setCurrentTime",t),this):(this.mi.currentTime=this.ts("currentTime")||0,this.mi.currentTime)},n.duration=function(t){return void 0===t?void 0!==this.mi.duration?this.mi.duration:NaN:((t=S(t))<0&&(t=1/0),t!==this.mi.duration&&(this.mi.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},n.remainingTime=function(){return this.duration()-this.currentTime()},n.buffered=function(){var t=this.ts("buffered");return t&&t.length||(t=Mnt(0,0)),t},n.bufferedPercent=function(){return Lnt(this.buffered(),this.duration())},n.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),n=t.end(t.length-1);return n>i&&(n=i),n},n.volume=function(t){var i;return void 0!==t?(i=A.max(0,A.min(1,S(t))),this.mi.volume=i,this.ls("setVolume",i),this):(i=S(this.ts("volume")),E(i)?1:i)},n.muted=function(t){return void 0!==t?(this.ls("setMuted",t),this):this.ts("muted")||!1},n.supportsFullScreen=function(){return this.ts("supportsFullScreen")||!1},n.isFullscreen=function(t){return void 0!==t?(this.ds=!!t,this):!!this.ds},n.requestFullscreen=function(t){var i,n=Hnt;return this.isFullscreen(!0),n.requestFullscreen?(wnt($tt,n.fullscreenchange,Ent(this,function t(i){this.isFullscreen($tt[n.fullscreenElement]),!1===this.isFullscreen()&&mnt($tt,n.fullscreenchange,t),this.trigger("fullscreenchange")})),n.prefixed||(i=this.h.fullscreenOptions,void 0!==t&&(i=t)),this.v[n.requestFullscreen](i)):this.H.supportsFullScreen()?this.ls("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},n.exitFullscreen=function(){var t=Hnt;return this.isFullscreen(!1),t.requestFullscreen?$tt[t.exitFullscreen]():this.H.supportsFullScreen()?this.ls("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},n.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=$tt.documentElement.style.overflow,wnt($tt,"keydown",Ent(this,this.fullWindowOnEscKey)),$tt.documentElement.style.overflow="hidden",Iit($tt.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},n.exitFullWindow=function(){this.isFullWindow=!1,mnt($tt,"keydown",this.fullWindowOnEscKey),$tt.documentElement.style.overflow=this.docOrigOverflow,Rit($tt.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.canPlayType=function(t){for(var i,n=0,r=this.h.techOrder;n0&&(r=this.setTimeout(function(){this.ps||this.userActive(!1)},t))}},250)},n.playbackRate=function(t){return void 0!==t?(this.ls("setPlaybackRate",t),this):this.H&&this.H.featuresPlaybackRate?this.ts("playbackRate"):1},n.isAudio=function(t){return void 0!==t?(this.ys=!!t,this):!!this.ys},n.videoTracks=function(){return this.H?this.H.videoTracks():(this.rt=this.rt||new gst,this.rt)},n.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new mst,this.ht)},n.textTracks=function(){if(this.H)return this.H.textTracks()},n.remoteTextTracks=function(){if(this.H)return this.H.remoteTextTracks()},n.remoteTextTrackEls=function(){if(this.H)return this.H.remoteTextTrackEls()},n.addTextTrack=function(t,i,n){if(this.H)return this.H.addTextTrack(t,i,n)},n.addRemoteTextTrack=function(t,i){if(this.H)return this.H.addRemoteTextTrack(t,i)},n.removeRemoteTextTrack=function(t){var i=(void 0===t?{}:t).track,n=void 0===i?arguments[0]:i;if(this.H)return this.H.removeRemoteTextTrack(n)},n.getVideoPlaybackQuality=function(){return this.ts("getVideoPlaybackQuality")},n.videoWidth=function(){return this.H&&this.H.videoWidth&&this.H.videoWidth()||0},n.videoHeight=function(){return this.H&&this.H.videoHeight&&this.H.videoHeight()||0},n.language=function(t){return void 0===t?this.bs:(this.bs!==String(t).toLowerCase()&&(this.bs=String(t).toLowerCase(),void 0!==this.v&&this.trigger("languagechange")),this)},n.languages=function(){return Rnt(i.prototype.h.languages,this.pi)},n.toJSON=function(){var t=Rnt(this.h),i=t.tracks;t.tracks=[];for(var n=0;n0||o>0?s+":":"")+(e=((s||u>=10)&&Number(e)<10?"0"+e:e)+":")+(r=Number(r)<10?"0"+r:r)}function eot(t){return function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Cs=void 0,i}return Pt(i,t),i.prototype.dispose=function(){this.Cs=void 0,t.prototype.dispose.call(this)},xt(i,[{key:"xs",get:function(){var t;return null!=(t=this.Cs)?t:this.Cs=sot(this.player())}}]),i}(t)}function sot(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function uot(t){var i=sot(t),n=function(){var n=Jut(t);t.toggleClass("theo-at-live",function(t,i){if(Kut(t)){var n=t.seekable;return 0===n.length||n.end(n.length-1)-i<10}return!1}(i,n)),t.toggleClass("vjs-live",Kut(i)),t.toggleClass("theo-dvr",function(t){return"dvr"===iG(t.duration,t.seekable,t.source)}(i))};t.on("emptied",n),t.on("timeupdate",n),t.on("durationchange",n)}V(),It(),Bt(),Dt(),V(),It();function oot(t,i,n){t.toggleClass("theo-ad-playing",i),t.toggleClass("theo-dai-ad-playing",i&&n)}function hot(){this.userActive(!1)}V(),It(),V(),It(),Bt(),Dt(),Ut(),V(),It();var aot=function(t,i){this.type=void 0,this.target=void 0,this.playerEvent=void 0,this.type=t.type,this.target=i,this.playerEvent=t},cot=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],fot=$ut.getTech("Tech"),vot=$ut.getTech("Html5"),dot=function(t){function i(i,n){var r;void 0===i&&(i={}),(r=t.call(this,i,n)||this).xs=void 0,r.js=function(t){return r.Rs(t)},r.Vs=!1,r.Ms=function(){void 0===r.xs.errorObject&&(r.Rs(new _T(r.xs.currentTime,r.xs.readyState)),r.Rs(new aC),r.Rs(new AT(r.xs.duration)))},r.As=function(){r.Rs(new zy(r.xs.currentTime))},r.Ns=function(t){r.textTracks().tt(t.track)},r.Is=function(t){r.audioTracks().tt(t.track)},r.Es=function(t){r.textTracks().it(t.track)},r.Fs=function(t){r.audioTracks().it(t.track)},r.Bs=function(){var t=r.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},r.Ds=function(){var t=r.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},r.Ps=function(){if(r.supportsFullScreen()){var t=r.Vs,i=r.xs.presentation.currentMode===NT.FULLSCREEN;t!==i&&(r.Vs=i,r.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))}},r.Ts=function(){var t=r.xs.errorObject,i=t&&yw(t.code)||-1,n=t&&t.message||"An unknown error occurred.";r.error({code:i,message:r.localize(n)})},r.xs=r.h.player,r.Ss();var e=!r.paused();return e&&r.pause(),i.preload&&r.setPreload(i.preload),i.autoplay&&r.setAutoplay(i.autoplay),i.muted&&r.setMuted(i.muted),i.source?r.setSrc(i.source):r.Zt(),e&&r.ready(function(){return r.play()}),r.triggerReady(),r}Pt(i,t);var n=i.prototype;return n.Ss=function(){for(var t,i,n=Ft(cot);!(i=n()).done;){var r=i.value;this.xs.addEventListener(r,this.js)}this.xs.addEventListener("error",this.Ts),this.xs.addEventListener("contentprotectionerror",this.Ts),this.xs.addEventListener("sourcechange",this.Ms),this.xs.addEventListener("loadstart",this.As),null==(t=this.xs.presentation)||t.addEventListener(WI.MODE_CHANGE,this.Ps),this.xs.textTracks.addEventListener("addtrack",this.Ns),this.xs.textTracks.addEventListener("removetrack",this.Es),this.xs.textTracks.addEventListener("change",this.Bs),this.xs.audioTracks.addEventListener("addtrack",this.Is),this.xs.audioTracks.addEventListener("removetrack",this.Fs),this.xs.audioTracks.addEventListener("change",this.Ds)},n.$s=function(){for(var t,i,n=Ft(cot);!(i=n()).done;){var r=i.value;this.xs.removeEventListener(r,this.js)}this.xs.removeEventListener("error",this.Ts),this.xs.removeEventListener("contentprotectionerror",this.Ts),this.xs.removeEventListener("sourcechange",this.Ms),this.xs.removeEventListener("loadstart",this.As),null==(t=this.xs.presentation)||t.removeEventListener(WI.MODE_CHANGE,this.Ps),this.xs.textTracks.removeEventListener("addtrack",this.Ns),this.xs.textTracks.removeEventListener("removetrack",this.Es),this.xs.textTracks.removeEventListener("change",this.Bs),this.xs.audioTracks.removeEventListener("addtrack",this.Is),this.xs.audioTracks.removeEventListener("removetrack",this.Fs),this.xs.audioTracks.removeEventListener("change",this.Ds)},n.Rs=function(t){this.trigger(new aot(t,this))},n.createEl=function(){var t=this.h,i=t.player;if(!i)throw new y(this.localize('Missing required tech option "player"'));var n=i.element;return $ut.setAttributes(n,{id:t.techId}),n},n.theoplayer=function(){return this.xs},n.addTextTrack=function(i,n,r){return t.prototype.addTextTrack.call(this,i,n,r)},n.buffered=function(){return this.xs.buffered},n.played=function(){return this.xs.played},n.reset=function(){this.xs.stop()},n.play=function(){this.xs.play()},n.pause=function(){this.xs.pause()},n.paused=function(){return this.xs.paused},n.currentTime=function(){return this.xs.currentTime},n.setCurrentTime=function(t){this.xs.currentTime=t},n.duration=function(){return this.xs.duration},n.volume=function(){return this.xs.volume},n.setVolume=function(t){this.xs.volume=t},n.muted=function(){return this.xs.muted},n.setMuted=function(t){this.xs.muted=t},n.src=function(t){if(void 0!==t)this.setSrc(t);else{if(this.xs.src)return this.xs.src;if(this.xs.source){if(!oE(this.xs.source.ads))return this.xs.source.ads[0].sources;if(function(t){return!!t.sources&&(ji(t.sources)?t.sources.some(sT):sT(t.sources))}(this.xs.source))return"This source is managed by the Uplynk integration extension.";if(function(t){if(t.sources)if(ji(t.sources)){for(var i,n=Ft(t.sources);!(i=n()).done;)if(eT(i.value))return!0}else if(Wi(t.sources))return eT(t.sources);return!1}(this.xs.source))return"This source is managed by the DAI integration extension.";if(function(t){if(t.sources)if(ji(t.sources)){for(var i,n=Ft(t.sources);!(i=n()).done;)if(hT(i.value))return!0}else if(Wi(t.sources))return hT(t.sources);return!1}(this.xs.source))return"This source is managed by Millicast."}}},n.setSrc=function(t){return this.setSource({src:t})},n.setSource=function(t){this.lt=null,this.trigger("error")},n.currentSrc=function(){return this.xs.src},n.load=function(){this.setPreload("auto")},n.preload=function(){return this.xs.preload},n.setPreload=function(t){this.xs.preload=t},n.autoplay=function(){return this.xs.autoplay},n.setAutoplay=function(t){this.xs.autoplay=Boolean(t)},n.seeking=function(){return this.xs.seeking},n.seekable=function(){return this.xs.seekable},n.ended=function(){return this.xs.ended},n.playbackRate=function(){return this.xs.playbackRate},n.setPlaybackRate=function(t){this.xs.playbackRate=t},n.readyState=function(){return this.xs.readyState},n.networkState=function(){return 0},n.controls=function(){return!1},n.videoHeight=function(){return this.xs.videoHeight},n.videoWidth=function(){return this.xs.videoWidth},n.supportsFullScreen=function(){return this.xs.presentation.supportsMode(NT.FULLSCREEN)},n.enterFullScreen=function(){this.xs.presentation.requestMode(NT.FULLSCREEN)},n.exitFullScreen=function(){this.xs.presentation.requestMode(NT.INLINE)},n.Us=function(){var t=this.xs.ads;if(t&&t.playing)return!0;var i=this.xs.vr;return!(!i||i.state===Y5.Os)},n.initTextTrackListeners=function(){var i=this;return this.on("touchend",function(t){i.Us()&&(t.preventDefault=function(){})}),t.prototype.initTextTrackListeners.call(this)},n.Zt=function(){var t=this;if(this.src()){var i=this.readyState();if(0===i){var n=!1,r=function(){n=!0};this.on("loadstart",r);var e=function(){n||t.trigger("loadstart")};return this.on("loadedmetadata",e),void this.ready(function(){t.off("loadstart",r),t.off("loadedmetadata",e),n||t.trigger("loadstart")})}var s=["loadstart"];s.push("loadedmetadata"),i>=2&&s.push("loadeddata"),i>=3&&s.push("canplay"),i>=4&&s.push("canplaythrough"),this.ready(function(){for(var i,n=Ft(s);!(i=n()).done;){var r=i.value;t.trigger(r)}})}},n.dispose=function(){this.$s(),this.xs=null,t.prototype.dispose.call(this)},i.isSupported=function(){return!0},i.canPlayType=function(){return"maybe"},i.canPlaySource=function(t){return"maybe"},xt(i,[{key:"featuresVolumeControl",get:function(){return Ne}}]),i}(fot);dot.prototype.featuresFullscreenResize=vot.prototype.featuresFullscreenResize,dot.prototype.featuresPlaybackRate=vot.prototype.featuresPlaybackRate,dot.prototype.featuresProgressEvents=!0,dot.prototype.featuresTimeupdateEvents=!0,dot.prototype.featuresNativeTextTracks=!0,$ut.registerTech("THEOplayer",dot),V(),It(),V(),It(),Dt(),V(),It(),Bt(),Dt(),V(),It();var lot=function(t){var i=this;this.Ls=void 0,this.Hs=function(t){hn(i.Ls,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.qs=function(t){an(i.Ls,"theo-mobile-button-hover")},this.zs=function(t){i.Ls.blur()},this.Ls=t,t.addEventListener("touchstart",this.Hs),t.addEventListener("touchend",this.qs),t.addEventListener("focusin",this.zs)};V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt();var got=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.Gs=function(){hn(this.Ws,"theo-menu-opened")},n.Xs=function(){an(this.Ws,"theo-menu-opened")},xt(i,[{key:"Ws",get:function(){return this.player().el()}}]),i}(eot($ut.getComponent("Menu")));V(),It(),Bt(),Dt();var wot=function(t){function i(i,n,r){var e;return(e=t.call(this,i,io({selectable:!0},n))||this).Js=void 0,e.Qs=!1,e.Hs=function(t){hn(e.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},e.qs=function(t){an(e.el(),"theo-mobile-menu-item-hover")},e.Js=r,Vi.Zs.Ks&&(e.el().addEventListener("touchstart",e.Hs),e.el().addEventListener("touchend",e.qs)),e}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-menu-item vjs-menu-item"},n.createEl=function(){var i=t.prototype.createEl.call(this,"li",{className:this.buildCSSClass(),tabIndex:0},{"aria-live":"off","aria-label":""});return i.innerHTML="",i},n.handleClick=function(t){this.Qs||(this.parentMenu.Ys(this),"tap"!==t.type&&"keydown"!==t.type||(this.Qs=!0,this.trigger("click"),this.Qs=!1))},n.dispose=function(){Vi.Zs.Ks&&(this.el().removeEventListener("touchstart",this.Hs),this.el().removeEventListener("touchend",this.qs)),t.prototype.dispose.call(this)},xt(i,[{key:"parentMenu",get:function(){return this.Js}}]),i}(eot($ut.getComponent("MenuItem")));V(),It(),Bt(),Dt();var mot=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).Js=void 0,e.Qs=!1,e.ie=!1,e.Js=r,e.on(i,"languagechange",e.se),e}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-primary-background theo-menu-header"},n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-live":"off","aria-label":""});return i.innerHTML="",i},n.handleClick=function(t){!this.Qs&&this.te&&(this.Js.ee(),"tap"===t.type&&(this.Qs=!0,this.trigger("click"),this.Qs=!1))},n.se=function(){this.te?this.el().setAttribute("aria-label",this.localize("Go back to the previous menu")):this.el().setAttribute("aria-label","")},xt(i,[{key:"parentMenu",get:function(){return this.Js}},{key:"te",get:function(){return this.ie},set:function(t){this.ie=t,this.el().setAttribute("tabindex",this.te?"0":"-1"),this.se()}}]),i}($ut.getComponent("ClickableComponent")),pot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).le=void 0,r.he=function(){return r.oe()},r.le=r.player().el(),r.hide(),r.on("menuchange",r.oe),r}Pt(i,t);var n=i.prototype;return n.addMenuItem=function(t){t=io({playerOptions:this.h.playerOptions},t);var i=new wot(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i},n.addSubMenuItem=function(t){t=io({playerOptions:this.h.playerOptions},t);var i=this.re(this.player(),t);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i},n.removeMenuItem=function(t){this.removeChild(t),this.trigger("menuchange")},n.buildCSSClass=function(){return"theo-menu vjs-menu"},n.Gs=function(){t.prototype.Gs.call(this),f.removeEventListener("resize",this.he),f.addEventListener("resize",this.he),this.show()},n.oe=function(){var t=this.ae();if(t){var i=t.getClientRects();Vi.Zs.Ks?this.ue(t,i):this.ce(t,i)}},n.ae=function(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0},n.ce=function(t,i){},n.ue=function(t,i){},n.Xs=function(){f.removeEventListener("resize",this.he),t.prototype.Xs.call(this),this.hide(),Vi.Zs.Ks&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))},n.createEl=function(){var i=t.prototype.createEl.call(this);i.className=this.buildCSSClass();var n=this.contentEl();hn(n,"theo-menu-content");var r=new mot(this.player(),this.h,this);return n.parentNode.insertBefore(r.el(),n),this.ne=r,i},n.Ys=function(t){},n.show=function(){return this.oe(),t.prototype.show.call(this)},n.dispose=function(){this.ne&&this.ne.dispose(),t.prototype.dispose.call(this)},xt(i,[{key:"menuHeader",get:function(){return this.ne}},{key:"menuItems",get:function(){return this.children()}}]),i}(got),yot=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.me=function(t){this.de.ge(t,"replace")},n.ye=function(t){t.de.ge(this,"restore")},n.be=function(){an(this.ke,"vjs-hidden"),this.ke.style.opacity="1",t.prototype.show.call(this)},n.we=function(){hn(this.ke,"vjs-hidden")},n.Gs=function(){this.de&&this.de.Gs(),t.prototype.Gs.call(this)},n.Xs=function(){this.de&&this.de.Xs(),t.prototype.Xs.call(this),hn(this.ke,"vjs-hidden")},n.ae=function(){if(this.de&&this.de._e)return this.de._e.ke},n.ce=function(i,n){if(n.length>0){var r=n[0].height,e=n[0].width;this.fe.xe.style.height=r+"px",this.fe.xe.style.width=e+"px"}t.prototype.ce.call(this,i,n)},xt(i,[{key:"de",get:function(){return this.fe},set:function(t){this.fe&&this.fe.ve(this),this.fe=t,t&&t.pe(this)}}]),i}(pot);V(),It(),Bt();var _ot=function(){function t(t){this.Ce=void 0,this.Te=void 0,this.Ls=void 0,this.le=void 0,this.Te=this.Ce=t,this.Ls=v.createElement("div"),this.Ls.className="theo-tertiary-background theo-menu-animation-container",this.Ls.appendChild(this.Te.ke),this.le=this.Ce.player().el()}var i=t.prototype;return i.pe=function(t){t.we(),this.Ls.appendChild(t.ke)},i.ve=function(t){this.Ls.removeChild(t.ke)},i.ge=function(t,i){if(t!=this.Ce){var n=this.Ce;if(this.Ce=t,this.Ce.be(),this._e.focus(),Vi.Zs.Ks)n.we();else{var r=DI("transform");n.ke.style.opacity="0",n.ke.style[r]="replace"===i?"translateX(-100%)":"translateX(100%)",this.Ce.ke.style.opacity="1",this.Ce.ke.style[r]="",g(function(){n.we(),n.ke.style[r]=""},300)}}},i.Gs=function(){this.Se(),this.Ce.be(),this.je()},i.Xs=function(){this.Se(),this.Ce.we(),this.Te.we(),this.Ce=this.Te,this.je()},i.je=function(){var t=this;pI(function(){an(t.Ls,"theo-no-transition"),an(t.Ce.ke,"theo-no-transition")})},i.Se=function(){hn(this.Ls,"theo-no-transition"),hn(this.Ce.ke,"theo-no-transition")},xt(t,[{key:"xe",get:function(){return this.Ls}},{key:"_e",get:function(){return this.Ce}}]),t}();V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt();var kot=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).Me=void 0,e.Pe=!1,e.Me=r,e.menuHeader.te=!0,e}Pt(i,t);var n=i.prototype;return n.re=function(t,i){var n=new bot(t,i,this);return n.subMenu.de=this.de,n},n.ee=function(){this.Ae()},n.Ys=function(i){t.prototype.Ys.call(this,i),this.Ae()},n.Ae=function(){this.parentMenu.ye(this)},n.buildCSSClass=function(){return"theo-submenu "+(this.Pe?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+t.prototype.buildCSSClass.call(this)},n.addSubMenuItem=function(i){this.Pe=!0;var n=t.prototype.addSubMenuItem.call(this,i);return this.removeClass("theo-leaf-submenu"),n},xt(i,[{key:"ke",get:function(){return this.el()}},{key:"parentMenu",get:function(){return this.Me}}]),i}(yot),bot=function(t){function i(i,n,r){var e;return(e=t.call(this,i,io({selectable:!1},n),r)||this).Ne=void 0,e.Ne=new kot(i,n,r),e}return Pt(i,t),i.prototype.handleClick=function(t){this.parentMenu.me(this.subMenu)},xt(i,[{key:"subMenu",get:function(){return this.Ne}}]),i}(wot),Aot=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).Ee=void 0,e.Ie=!1,e.Ee=r,e}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=$ut.createEl("div",{className:this.buildCSSClass()});return this.Be=t.prototype.createEl.call(this),this.Be.className=t.prototype.buildCSSClass.call(this),hn(this.Be,"theo-menu-content-animatable"),i.appendChild(this.Be),this.de=new _ot(this),i.appendChild(this.de.xe),i},n.buildCSSClass=function(){return"theo-menu-animatable "+t.prototype.buildCSSClass.call(this)},n.re=function(t,i){var n=new bot(t,i,this);return n.subMenu.de=this.de,n},n.ce=function(i,n){t.prototype.ce.call(this,i,n);var r=this.le.getClientRects(),e=r.length>0?r[0]:void 0,s=S(getComputedStyle(this.el()).fontSize);Mx(this.el(),this.Ee.el(),e,s)},n.ee=function(){this.Ee.closeMenu()},n.dispose=function(){this.Ie||(this.Ie=!0,t.prototype.dispose.call(this))},xt(i,[{key:"menuButton",get:function(){return this.Ee}},{key:"ke",get:function(){return this.Be}}]),i}(yot);V(),It(),Bt();var Tot=function(){function t(t,i){var n=this;this.De=void 0,this.$e=void 0,this.Ue=function(){an(n.De,"vjs-hidden");var t=n.$e.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,r=S(getComputedStyle(n.De).fontSize);Mx(n.De,n.$e.el(),i,r)},this.Ve=function(){hn(n.De,"vjs-hidden")},this.Le=function(){return n.Oe()},this.$e=t,wn(t.el()),function(t){t.addEventListener("mouseover",function(t){wn(t.target)})}(t.el()),this.De=v.createElement("span"),this.De.innerHTML=this.$e.localize(i),this.De.className="theo-button-tooltip vjs-hidden",this.De.setAttribute("aria-hidden","true"),this.$e.el().appendChild(this.De),this.$e.on("mouseover",this.Ue),this.$e.on("mouseout",this.Ve),this.$e.on("dispose",this.Le)}var i=t.prototype;return i.Re=function(){return!on(this.De,"vjs-hidden")},i.Oe=function(){this.$e.off("mouseover",this.Ue),this.$e.off("mouseout",this.Ve),this.$e.off("dispose",this.Le),Zi(this.De)},xt(t,[{key:"Fe",get:function(){return this.De.textContent||""},set:function(t){this.De.innerHTML=this.$e.localize(t),this.Re()&&this.Ue(),wn(this.$e.el())}}]),t}(),Sot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).qe=void 0,r.De=void 0,r.ze=!1,r.Ge=1,r.We=!0,r.Qe=function(t){var i,n=r.el().contains(t.target),e=r.qe.el().contains(t.target),s=!1;Vi.Zs.Ks&&r.He&&(s=(null==(i=r.el().parentElement)?void 0:i.querySelector(".theo-mobile-menu-background"))===t.target);n||e||!r.ze||(s&&t.preventDefault(),r.closeMenu())},r.Ye=function(t){27===t.which&&(r.closeMenu(),r.focus())},r.Je=function(){r.ze&&r.closeMenu()},r.Xe=function(){r.qe.menuItems.length>=r.Ge?r.show():(r.closeMenu(),r.hide())},r.qe=new Aot(i,n,r),r.player().getChild("controlBarMenuContainer").addChild(r.qe),r.De=new Tot(r,r.controlText()),r.el().setAttribute("aria-haspopup","true"),Vi.Zs.Ke?(r.on(v,"touchend",r.Qe),new lot(r.el())):(r.on(v,"click",r.Qe),r.on(v,"keydown",r.Ye),LI&&r.on(v,LI.Ze,r.closeMenu)),r.xs.addEventListener("seeking",r.Je),r.on(r.qe,"menuchange",r.Xe),r.on(i,"languagechange",r.se),r.Xe(),r}Pt(i,t);var n=i.prototype;return n.isMenuOpen=function(){return this.ze},n.openMenu=function(){this.We&&!this.ze&&(this.qe.Gs(),this.el().setAttribute("aria-expanded","true"),this.ze=!0,this.qe.focus())},n.closeMenu=function(){this.We&&this.ze&&(this.qe.Xs(),this.el().setAttribute("aria-expanded","false"),this.ze=!1)},n.buildCSSClass=function(){return"theo-controlbar-button vjs-menu-button vjs-menu-button-popup "+t.prototype.buildCSSClass.call(this)},n.createEl=function(i,n,r){return t.prototype.createEl.call(this,"button",{},{"aria-live":"off"})},n.handleClick=function(){this.ze?this.closeMenu():this.openMenu()},n.enable=function(){return this.We=!0,t.prototype.enable.call(this)},n.disable=function(){return this.closeMenu(),this.We=!1,t.prototype.disable.call(this)},n.se=function(){this.De.Fe=this.controlText()},n.dispose=function(){this.player().removeChild(this.qe),this.qe.dispose(),this.De.Oe(),this.xs.removeEventListener("seeking",this.Je),t.prototype.dispose.call(this)},xt(i,[{key:"He",get:function(){var t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}},{key:"menu",get:function(){return this.qe}},{key:"minimumMenuItems",set:function(t){this.Ge=t,this.Xe()}}]),i}(eot($ut.getComponent("Button"))),Eot=$ut.getComponent("Component"),Iot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).addChild("THEOControlBarShadow",void 0,0),r}Pt(i,t);var n=i.prototype;return n.addMenuButton=function(t){t=io({playerOptions:this.h.playerOptions},t);var i=new Sot(this.player(),t);return this.addChild(i),i},n.removeMenuButton=function(t){this.removeChild(t)},n.createEl=function(){var i=t.prototype.createEl.call(this);return i.className=this.buildCSSClass(),i},n.buildCSSClass=function(){return"theo-secondary-color vjs-control-bar "+t.prototype.buildCSSClass.call(this)},i}($ut.getComponent("ControlBar")),Rot=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},n.buildCSSClass=function(){return"theo-tertiary-color theo-control-bar-shadow"},i}(Eot);$ut.registerComponent("THEOControlBarShadow",Rot),V(),It(),Dt(),V(),It(),Dt();var Cot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).tn=void 0,r.tn=n.sn,r}Pt(i,t);var n=i.prototype;return n.handleFocus=function(i){t.prototype.handleFocus.call(this,i),this.tn.addClass("focus-within")},n.handleBlur=function(i){t.prototype.handleBlur.call(this,i),this.tn.removeClass("focus-within")},i}($ut.getComponent("VolumeBar"));V(),It(),Dt();var Pot=$ut.getComponent("VolumeControl"),Dot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).nn=void 0,r.nn=new Cot(i,{sn:r}),r.addChild(r.nn),r}return Pt(i,t),i}(Pot);Dot.prototype.h=io({},Pot.prototype.h,{children:[]}),$ut.registerComponent("VolumeControl",Dot);var Not=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).gn=void 0,r.vn=!1,r.cn=0,r.ln=function(){0!==r.cn&&(r.cn=0,r.hn(r.an()))},r.bn=function(){r.vn&&r.pn()},r.on(i,"ready",r.rn),r.on(i,"pause",r.rn),r.on(i,"useractive",r.rn),r.on(i,"firstplay",r.un),r.on(i,"play",r.un),r.on(i,"userinactive",r.un),r.on("transitionstart",r.dn),r.on("transitionend",r.fn),r.gn=new OI(r.el()),r.gn.wn(AI.yn,r.bn),r.gn._n(!0),r}Pt(i,t);var n=i.prototype;return n.rn=function(){this.hn(this.an())},n.un=function(){0===this.cn&&(this.cn=g(this.ln,100))},n.dn=function(t){"opacity"===t.propertyName&&(0!==this.cn&&(w(this.cn),this.cn=0),this.hn(!0))},n.fn=function(t){"opacity"===t.propertyName&&(this.an()||this.hn(!1))},n.an=function(){return"0"!==f.getComputedStyle(this.el()).opacity},n.hn=function(t){this.vn!==t&&(this.vn=t,t?this.pn():this.xs.textTrackStyle.marginBottom=void 0)},n.pn=function(){var t=this.el().getBoundingClientRect().height;this.xs.textTrackStyle.marginBottom!==t&&(this.xs.textTrackStyle.marginBottom=t)},n.dispose=function(){w(this.cn),this.cn=0,this.gn.mn(AI.yn,this.bn),this.gn.kn(),t.prototype.dispose.call(this)},i}(eot(Iot));Not.prototype.h=io({},Iot.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),$ut.registerComponent("ControlBar",Not),V(),It(),Dt();var xot=function(t){function i(i,n){var r;return r=t.call(this,i,n)||this,i.topControlBar=r,r}return Pt(i,t),i.prototype.buildCSSClass=function(){return"theo-top-controlbar "+t.prototype.buildCSSClass.call(this)},i}(Iot);xot.prototype.h=io({},Iot.prototype.h,{children:[]}),$ut.registerComponent("TopControlBar",xot),V(),It(),Dt();var Bot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"timeupdate",r.updateContent),r.on(i,"emptied",r.updateContent),r}return Pt(i,t),i.prototype.updateContent=function(){var t=Jut(this.player()),i=this.xs,n=tot(i),r=this.localize("Current Time"),e=rot(A.max(0,t-n),iot(i));e!==this.Mt&&(this.Mt=e,this.contentEl().innerHTML=''+r+" "+e)},i}(eot($ut.getComponent("CurrentTimeDisplay")));$ut.registerComponent("CurrentTimeDisplay",Bot),V(),It(),Dt();var Oot=function(t){function i(i,n){var r,e;return(r=t.call(this,i,n)||this).xn=function(){return r.updateContent()},r.off(i,"durationchange",r.updateContent),r.on(i,"durationchange",r.updateContent),r.off(i,"timeupdate",r.updateContent),r.on(i,"timeupdate",r.updateContent),r.off(i,"emptied",r.updateContent),r.on(i,"emptied",r.updateContent),null==(e=r.xs)||e.clip.addEventListener("change",r.xn),r}Pt(i,t);var n=i.prototype;return n.updateContent=function(){var t=this.xs,i=E(t.duration)?NaN:iot(t),n=t.clip.endTime-t.clip.startTime,r=A.min(i,n)||0;if(this.ct!==r){this.ct=r;var e=this.localize("Duration Time"),s=rot(r);this.S.innerHTML=''+e+" "+s}},n.dispose=function(){var i;null==(i=this.xs)||i.clip.removeEventListener("change",this.xn),t.prototype.dispose.call(this)},i}(eot($ut.getComponent("DurationDisplay")));$ut.registerComponent("DurationDisplay",Oot),V(),It(),Dt();var Mot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).controlText("Live"),r.Sn(),r.on(i,"emptied",r.Sn),r.on(i,"durationchange",r.Sn),Vi.Zs.Ke&&new lot(r.el()),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-live-control "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){var i=t.prototype.createEl.call(this,"button",{},{"aria-live":"off"});return this.Cn=$ut.createEl("span",{className:"theo-live-control-indicator"}),rn(i,this.Cn),i},n.createControlTextEl=function(i){var n=t.prototype.createControlTextEl.call(this,i);return $ut.removeClass(n,"vjs-control-text"),$ut.addClass(n,"theo-live-control-text"),n},n.handleClick=function(){var t,i=this.xs;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{var n=this.player();n.currentTime(1/0),n.play()}},n.Sn=function(){Kut(this.xs)?this.show():this.hide()},i}(eot($ut.getComponent("Button")));$ut.registerComponent("LiveDisplay",Mot),V(),It(),Dt();var Lot=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-secondary-color vjs-loading-spinner "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){var i=t.prototype.createEl.call(this);i.className=this.buildCSSClass();var n=$ut.createEl("div",{className:"theo-loading-spinner-rotator"}),r=$ut.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=$ut.createEl("div",{className:"theo-loading-spinner-circle-right"});return n.appendChild(r),n.appendChild(e),i.appendChild(n),i},i}($ut.getComponent("LoadingSpinner"));$ut.registerComponent("LoadingSpinner",Lot),V(),It(),Dt();var Fot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).Pn=[],r.on(i,"emptied",r.update),r}return Pt(i,t),i.prototype.update=function(){var t=this.xs,i=LA.jn(not(t)),n=i.Tn(0),r=LA.jn(t.buffered).Mn(i),e=i.An(0)-n,s=r.V&&r.An(r.V-1)||0;s=A.max(0,s-n);var u=this.el(),o=this.Pn;u.style.width=Uot(s,e);for(var h=0;hr.V;d--)u.removeChild(o[d-1]);o.length=r.V},i}(eot($ut.getComponent("LoadProgressBar")));function Uot(t,i){var n=t/i||0;return 100*(n>=1?1:n)+"%"}$ut.registerComponent("LoadProgressBar",Fot),V(),It(),Dt();var Vot=function(t){function i(i,n){var r,e;((r=t.call(this,i,n)||this).En=NaN,r.Fn=function(){var t=Jut(r.player()),i=r.xs,n=(t-tot(i))/iot(i)||0;n=Cn(n,0,1),r.update(t,100*n+"%")},r.keepTooltipsInside&&($ut.addClass(r.tooltip,"theo-secondary-color"),r.tooltip.appendChild(r.Nn)),r.on(i,"ready",function(){r.on(i.controlBar.progressControl,"mouseenter",r.handleMouseMove)}),Oi.Ks)&&(r.on(i,"firstplay",r.Fn),r.on(i,"play",r.Fn),r.on(i,"seeking",r.Fn),r.on(i,"seeked",r.Fn),r.on(i,"timeupdate",r.Fn),r.xs.addEventListener("dimensionchange",r.Fn),null==(e=r.xs.presentation)||e.addEventListener(WI.MODE_CHANGE,r.Fn),r.on(i,"ready",function(){r.on(i.controlBar.progressControl,"touchstart",r.handleTouchMove),r.on(i.controlBar.progressControl,"touchmove",_n(function(t){return r.handleTouchMove(t)},25)),r.Fn()}));return r}Pt(i,t);var n=i.prototype;return n.handleMouseMove=function(t){var i=t,n=this.xs,r=tot(n)+this.calculateDistance(i)*iot(n),e=i.pageX-Ox(this.el().parentNode).left;this.update(r,e+"px")},n.handleTouchMove=function(t){var i=t,n=this.xs,r=tot(n)+this.calculateDistance(i)*iot(n),e=i.touches[0].pageX-Ox(this.el().parentNode).left;this.update(r,e+"px")},n.createEl=function(){var i=t.prototype.createEl.call(this);return this.Nn=$ut.createEl("span",{className:"theo-time-tooltip-text"}),i},n.update=function(t,i){this.En=t;var n=this.Bn(t);this.el().style.left=i,this.el().setAttribute("data-current-time",n),this.keepTooltipsInside&&(Ux(this.Nn,n),this.In())},n.In=function(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){var t=this.player().contentEl(),i=t.getClientRects(),n=i.length>0?i[0]:void 0,r=S(getComputedStyle(t).fontSize);Mx(this.tooltip,this.el(),n,r)}},n.Bn=function(t){var i=this.xs,n=t-Zut(i);return rot(Kut(i)?A.min(n,0):n,iot(i))},n.dispose=function(){var i;this.xs.removeEventListener("dimensionchange",this.Fn),null==(i=this.xs.presentation)||i.removeEventListener(WI.MODE_CHANGE,this.Fn),t.prototype.dispose.call(this)},i}(eot($ut.getComponent("MouseTimeDisplay")));$ut.registerComponent("MouseTimeDisplay",Vot),V(),It(),Dt();var jot=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.updateDataAttr=function(){var t=Jut(this.player());this.el().setAttribute("data-current-time",this.Bn(t))},n.Bn=function(t){var i=this.xs;return rot(t-Zut(i),iot(i))},n.createEl=function(){var i=t.prototype.createEl.call(this);return i.className=this.buildCSSClass(),i},n.buildCSSClass=function(){return"theo-primary-color vjs-play-progress vjs-slider-bar "+t.prototype.buildCSSClass.call(this)},i}(eot($ut.getComponent("PlayProgressBar")));$ut.registerComponent("PlayProgressBar",jot),V(),It(),Dt();var Hot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(i,"timeupdate",r.updateContent),r.on(i,"emptied",r.updateContent),r}return Pt(i,t),i.prototype.updateContent=function(){var t=this.xs,i=iot(t);if(i){var n=not(t).end(0),r=this.localize("Remaining Time"),e=rot(A.max(0,n-this.player().currentTime()),i);e!==this.Mt&&(this.Mt=e,this.contentEl().innerHTML=''+r+" -"+e)}},i}(eot($ut.getComponent("RemainingTimeDisplay")));$ut.registerComponent("RemainingTimeDisplay",Hot),V(),It(),Dt(),V(),It(),Bt(),Ut();var Wot=function(){function t(t,i){var n=this;this.Dn=void 0,this.Ln=void 0,this.On=void 0,this.ur=void 0,this.Rn=void 0,this.Vn=void 0,this.ar=void 0,this.Cs=void 0,this.qn=void 0,this.Wn=void 0,this.Gn=void 0,this.cr=void 0,this.dr=void 0,this.lr=void 0,this.zn=void 0,this.ir=void 0,this.Dn=i,this.Vn=[],this.Cs=void 0,this.qn=function(){n.Zn(n.Jn())},this.Wn=function(t){var i=t.track;i.kind===uy.Yn&&(i.addEventListener("addcue",n.qn),i.addEventListener("removecue",n.qn),i.addEventListener("readystatechange",n.qn)),n.qn()},this.Gn=function(t){var i=t.track;i.kind===uy.Yn&&(i.removeEventListener("addcue",n.qn),i.removeEventListener("removecue",n.qn),i.removeEventListener("readystatechange",n.qn)),n.qn()},this.cr=function(t){var i=n.xs,r=function(t,i){var n,r,e=Ox(t),s=t.offsetWidth,u=t.offsetHeight,o=e.top,h=e.left;!function(t){return void 0!==t.changedTouches}(i)?(r=i.pageX,n=i.pageY):(r=i.changedTouches[0].pageX,n=i.changedTouches[0].pageY);var a=Cn((o-n+u)/u,0,1),c=Cn((r-h)/s,0,1);return{x:c,y:a}}(n.Ln,t),e=tot(i)+r.x*iot(i);e===i.duration&&(e-=.1),n.sr(e)},this.dr=function(){n.On.we()},this.lr=function(){n.On.be()},this.zn=function(){n.Rn&&(n.tr(),n.$n(),n.ir())},this.ir=function(){var t,i,r,e=null==(i=n.Rn)||null==(t=i.activeCues)?void 0:t[0],s=Wn(n.Vn,function(t){return t.pr===e});s!==n.ar&&(null==(r=n.ar)||r.mr(),n.ar=s,null==s||s.gr())},this.ur=t,this.On=new qot,this.Dn.contentEl().appendChild(this.On.xe),this.Ln=v.createElement("div"),hn(this.Ln,"theoplayer-chapterbar"),this.ur.appendChild(this.Ln),this.ur.addEventListener("mousemove",this.cr),this.ur.addEventListener("mouseenter",this.lr),this.ur.addEventListener("mouseleave",this.dr),this.Hn()}var i=t.prototype;return i.$n=function(){var t=this.Rn;if(t){var i=this.xs;if(0!==i.seekable.length){var n=t.cues.slice();this.On.Un(n);for(var r=0;r0&&n.readyState!==Vw.ERROR)return n}},i.Zn=function(t){var i=this.Rn;t!==i&&(i&&(this.tr(),i.removeEventListener("cuechange",this.ir)),this.Rn=t,t&&(t.addEventListener("cuechange",this.ir),this.zn()))},i.sr=function(t){this.On.er(t)},i.nr=function(){this.On.be()},i.rr=function(){this.On.we()},i.tr=function(){for(var t,i=Ft(this.Vn);!(t=i()).done;){t.value.Oe()}this.On.hr(),this.Vn=[],this.ar=void 0},i.Oe=function(){this.Xn(),this.ur.removeEventListener("mousemove",this.cr),this.ur.removeEventListener("mouseenter",this.lr),this.ur.removeEventListener("mouseleave",this.dr),this.Zn(void 0),this.On.Oe(),this.Cs=void 0},xt(t,[{key:"xs",get:function(){var t;return null!=(t=this.Cs)?t:this.Cs=sot(this.Dn)}}]),t}(),zot=function(){function t(t,i,n){this.pr=void 0,this.Ls=void 0,this.pr=t,this.Ls=this.yr(i,n)}var i=t.prototype;return i.gr=function(){hn(this.Ls,"theoplayer-chapter-indicator-active")},i.mr=function(){an(this.Ls,"theoplayer-chapter-indicator-active")},i.yr=function(t,i){var n=t.seekable.start(0),r=t.seekable.end(t.seekable.length-1),e=r-n,s=this.pr.startTime,u=this.pr.endTime,o=u>=n&&s<=r,h=Cn(s-n,0,e),a=Cn(u-n,0,e),c=A.max(0,a-h),f=v.createElement("div");hn(f,"theoplayer-chapter-indicator");var d=v.createElement("div");hn(d,"theoplayer-chapter-indicator-highlight"),f.appendChild(d),i&&hn(f,"theoplayer-chapter-indicator-discontinuous");var l=h/e*100,g=c/e*100;return f.style.display=o?"":"none",f.style.width=g+"%",f.style.left=l+"%",f},i.Oe=function(){Zi(this.Ls)},xt(t,[{key:"xe",get:function(){return this.Ls}}]),t}(),qot=function(){function t(){this.kr=[],this.xe=void 0,this._r=void 0,this.br=0,this.xe=v.createElement("div"),hn(this.xe,"theoplayer-chaptertitle"),this.xe.style.display="none",this._r=v.createElement("p"),this.xe.appendChild(this._r)}var i=t.prototype;return i.we=function(){this.br--,0===this.br&&an(this.xe,"theoplayer-chapter-hovering")},i.Un=function(t){this.kr=t||[],this.kr.length>0&&(this.xe.style.display="")},i.wr=function(t){Ux(this._r,t.content)},i.hr=function(){this.kr=[],Ux(this._r,""),this.xe.style.display="none"},i.be=function(){this.br++,this.br>0&&hn(this.xe,"theoplayer-chapter-hovering")},i.er=function(t){for(var i,n=Ft(this.kr);!(i=n()).done;){var r=i.value;if(Xot(r,t)){this.wr(r);break}}},i.Oe=function(){Zi(this.xe)},t}();function Xot(t,i){return new LA([t.startTime,t.endTime]).Cr(i)}var Got=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).Ln=void 0,r.playingStates=[],r.on(i,"emptied",r.update),r.on(i,"seeking",r.update),r.Ln=new Wot(r.el(),i),r}Pt(i,t);var n=i.prototype;return n.updateAriaAttributes=function(t){var i=Jut(this.player()),n=this.xs;t.setAttribute("aria-valuenow",(100*this.Sr(i)).toFixed(2)),t.setAttribute("aria-valuetext",rot(i-Zut(n),iot(n)))},n.getPercent=function(){return this.Sr(this.player().currentTime())},n.handleMouseMove=function(t){if(!(this.xs&&this.xs.ads&&this.xs.ads.playing)){var i=this.xs,n=tot(i)+this.calculateDistance(t)*iot(i);n>=i.duration&&(n=i.duration-.1),this.Ln.sr(n),this.player().currentTime(n)}},n.handleMouseDown=function(i){this.playingStates.push(!this.player().paused()),this.Ln.nr(),t.prototype.handleMouseDown.call(this,i)},n.handleMouseUp=function(i){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.Ln.rr(),t.prototype.handleMouseUp.call(this,i)},n.Sr=function(t){var i=this.xs;return Cn((t-tot(i))/iot(i),0,1)},n.dispose=function(){this.Ln.Oe(),tr(this.playingStates)},i}(eot($ut.getComponent("SeekBar")));$ut.registerComponent("SeekBar",Got),V(),It(),Dt();var Qot=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).on(r,"touchmove",r.handleMouseMove),r.on("touchstart",r.handleMouseDown),r.seekBar.off(["touchmove","touchstart"]),r}Pt(i,t);var n=i.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(t){this.seekBar.handleMouseMove(t)},n.handleMouseDown=function(t){this.seekBar.handleMouseDown(t)},i}($ut.getComponent("ProgressControl"));Vi.Zs.Ks&&$ut.registerComponent("ProgressControl",Qot),V(),It(),Dt();var Yot=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.updateDataAttr=function(){var t=Jut(this.player()),i=this.Bn(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i},n.Bn=function(t){var i=this.xs;return rot(t-Zut(i),iot(i))},n.createEl=function(){var i=t.prototype.createEl.call(this);return i.className=this.buildCSSClass(),i},n.buildCSSClass=function(){return"theo-primary-color vjs-tooltip-progress-bar vjs-slider-bar "+t.prototype.buildCSSClass.call(this)},i}(eot($ut.getComponent("TooltipProgressBar")));function $ot(t){for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;if(r.enabled)return r}}function Kot(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:Jot(t),description:Zot(t),hd:!!t.height&&t.height>=720}}function Jot(t){return t.height?t.height+"p":t.bandwidth?Zot(t):""}function Zot(t){return t.bandwidth?t.bandwidth>1e7?(t.bandwidth/1e6).toFixed(0)+"Mbps":t.bandwidth>1e6?(t.bandwidth/1e6).toFixed(1)+"Mbps":(t.bandwidth/1e3).toFixed(0)+"kbps":""}$ut.registerComponent("TooltipProgressBar",Yot),V(),It(),Dt(),V(),It(),Bt(),Dt(),Ut(),V(),It(),Ut(),V(),It(),V(),It(),Bt(),Ut();var tht=function(){function t(t){this.Pr=void 0,this.Tr=[],this.Pr=t}var i=t.prototype;return i.Er=function(t){var i=this.Nr;if(i)for(var n,r=Ft(i);!(n=r()).done;){var e=n.value;if(e.Br===t)return e}},i.Ir=function(t){var i=this,n=this.Pr.addMenuItem();return n.Br=t,n.on("click",function(){return i.Fr(n)}),n.el().setAttribute("role","menuitemradio"),n},i.Dr=function(t){t.dispose()},i.$r=function(t){return!0},i.Ar=function(t){if(this.$r(t)){Jn(this.Tr,t)||this.Tr.push(t);var i=this.Er(t)||this.Ir(t);return this.Rr(i),i}this.Mr(t)},i.Mr=function(t){var i=this.Er(t);i&&(this.Pr.removeMenuItem(i),this.Dr(i)),Yn(this.Tr,t)},i.Oe=function(){for(var t,i=[],n=Ft(this.Tr);!(t=n()).done;){var r=t.value;i.push(r)}for(var e,s=Ft(i);!(e=s()).done;){var u=e.value;this.Mr(u)}tr(i)},xt(t,[{key:"jr",get:function(){return this.Tr},set:function(t){for(var i=this.Tr,n=i.length-1;n>=0;n--){var r=i[n];Jn(t,r)||this.Mr(r)}for(var e,s=Ft(t);!(e=s()).done;){var u=e.value;this.Ar(u)}this.Pr.oe()}},{key:"Nr",get:function(){return this.Pr.menuItems}}]),t}(),iht=function(t){function i(i,n,r){var e;return(e=t.call(this,i.subMenu)||this).Jr=void 0,e.Cs=void 0,e.Vr=void 0,e.Yr=void 0,e.Zr=void 0,e.Or=void 0,e.Hr=void 0,e.zr=void 0,e.Gr=void 0,e.th=function(){var t=$ot(e.Cs.videoTracks);if(t!==e.Yr){var i=[];if(e.Yr&&(e.Yr.removeEventListener("activequalitychanged",e.ih),e.Yr.removeEventListener("targetqualitychanged",e.sh),e.Yr.removeEventListener("update",e.eh)),e.Yr=t,t){t.addEventListener("activequalitychanged",e.ih),t.addEventListener("targetqualitychanged",e.sh),t.addEventListener("update",e.eh);var n=rht(uht(t.qualities.filter(function(t){return t.available})));i=n.length>1?[].concat([void 0],n):[void 0]}e.jr=i,e.sh(),e.ih()}},e.eh=function(t){var i=t.track;if(i===e.Yr){var n,r=rht(uht(i.qualities.filter(function(t){return t.available}))),s=i&&hht(i.targetQuality);e.Zr=e.Kr(s,r),n=r.length>1?[].concat([void 0],r):[void 0],e.jr=n,e.Qr()}},e.ih=function(){e.Ar(void 0),e.Qr()},e.sh=function(){var t=$ot(e.Cs.videoTracks),i=t&&hht(t.targetQuality),n=e.Kr(i),r=e.Zr;n!==r&&(e.Zr=n,n&&r||e.Ar(void 0),r&&Jn(e.jr,r)&&e.Ar(r),i&&e.Ar(n),e.Qr())},e.se=function(){Ux(e.Pr.menuHeader.el(),e.Vr.localize("Quality")),Ux(e.Or,e.Vr.localize("Quality")),Ux(e.Hr,e.Vr.localize("Automatic")),Ux(e.zr,e.Vr.localize("Automatic")),Ux(e.Gr,e.Vr.localize("HD")),e.Jr.el().setAttribute("aria-label",e.Vr.localize("Open the video quality settings menu"));for(var t,i=Ft(e.Nr);!(t=i()).done;){var n=t.value;e.Rr(n)}e.Qr()},e.Jr=i,e.Cs=n,e.Vr=r,e.Or=e.Ur(),e.Hr=e.Lr(),e.zr=e.qr(),e.Gr=e.Wr(),e.Xr(),Ux(e.Pr.menuHeader.el(),e.Vr.localize("Quality")),e.jr=[void 0],e.Cs.videoTracks.addEventListener(["addtrack","removetrack","change"],e.th),e.Vr.on("languagechange",e.se),e.th(),e}Pt(i,t);var n=i.prototype;return n.Ur=function(){return this.Or=v.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",Ux(this.Or,this.Vr.localize("Quality")),this.Or},n.Lr=function(){return this.Hr=v.createElement("span"),this.Hr.className="theo-settings-control-menu-quality-automatic",Ux(this.Hr,this.Vr.localize("Automatic")),this.Hr},n.qr=function(){return this.zr=v.createElement("span"),Ux(this.zr,this.Vr.localize("Automatic")),this.zr},n.Wr=function(){return this.Gr=v.createElement("span"),this.Gr.className="theo-primary-color theo-settings-control-menu-item-hd-label",Ux(this.Gr,this.Vr.localize("HD")),this.Gr},n.Xr=function(){var t=v.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.Hr),t.appendChild(v.createTextNode(" ")),t.appendChild(this.zr),t.appendChild(v.createTextNode(" ")),t.appendChild(this.Gr),this.Jr.el().appendChild(this.Or),this.Jr.el().appendChild(t),this.Jr.el().setAttribute("aria-label",this.Vr.localize("Open the video quality settings menu"))},n.Qr=function(){var t=this.Yr,i=t&&hht(t.targetQuality),n=t&&t.activeQuality,r=Kot(this.Kr(i||n))||{name:this.Vr.localize("Automatic")};Ux(this.zr,r.name),cn(this.Hr,"vjs-hidden",Boolean(i)),cn(this.Gr,"vjs-hidden",!r.hd)},n.Rr=function(t){var i=Kot(t.Br)||{name:this.Vr.localize("Automatic")},n=i.name;i.hd&&(n+=''+this.Vr.localize("HD")+""),i.description&&(n+=''+i.description+""),t.el().innerHTML=n,t.el().setAttribute("aria-label",this.Vr.localize("Set video quality to ")+i.name),t.Br?t.selected(t.Br===this.Zr):t.selected(!this.Zr)},n.Fr=function(t){this.Yr&&(this.Yr.targetQuality=t.Br&&t.Br.videoQualities)},n.Kr=function(t,i){for(var n,r=Ft(i||this.jr);!(n=r()).done;){var e=n.value;if(t&&e&&-1!==e.videoQualities.indexOf(t))return e}},n.Oe=function(){this.Cs.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.th),this.Vr.off("languagechange",this.se),this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr.removeEventListener("targetqualitychanged",this.sh),this.Yr.removeEventListener("update",this.eh)),t.prototype.Oe.call(this)},i}(tht),nht=function(){function t(t){this.nh=void 0,this.nh=t}return t.prototype.add=function(t){this.nh.push(t)},xt(t,[{key:"height",get:function(){return this.nh[0].height}},{key:"bandwidth",get:function(){return this.nh[0].bandwidth}},{key:"videoQualities",get:function(){return this.nh}},{key:"label",get:function(){return this.nh[0].label}}]),t}();function rht(t){for(var i,n=[],r=Ft(t);!(i=r()).done;){for(var e,s=i.value,u=!1,o=Ft(n);!(e=o()).done;){var h=e.value;if(oht(h,s)){h.add(s),u=!0;break}}u||n.push(new nht([s]))}return n}function eht(t,i){return t&&i?Un(t,i):Ln.rh}function sht(t,i){return t===i?Ln.rh:eht(t.height,i.height)||eht(t.width,i.width)||eht(t.bandwidth,i.bandwidth)}function uht(t){return An(t,sht).reverse()}function oht(t,i){return t.label&&i.label&&t.label===i.label||qg(Kot(t),Kot(i))}function hht(t){return ji(t)?1===t.length?t[0]:void 0:t}function aht(t){return 1===t?"Normal":""+A.round(100*t)/100}V(),It(),Dt(),Ut();var cht=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i.subMenu)||this).Jr=void 0,s.Cs=void 0,s.Vr=void 0,s.oh=void 0,s.Or=void 0,s.ah=void 0,s.hh=function(){s.oh&&s.Ar(s.oh);var t=s.Cs.playbackRate;s.oh=t,Ux(s.ah,s.Vr.localize(aht(t))),t&&s.Ar(t)},s.se=function(){Ux(s.Pr.menuHeader.el(),s.Vr.localize("Speed")),Ux(s.Or,s.Vr.localize("Speed")),s.Jr.el().setAttribute("aria-label",s.Vr.localize("Open the video speed settings menu"));for(var t,i=Ft(s.Nr);!(t=i()).done;){var n=t.value;s.Rr(n)}s.hh()},s.Jr=i,s.Cs=n,s.Vr=r,s.Or=s.Ur(),s.ah=s.Xr(),Ux(s.Pr.menuHeader.el(),s.Vr.localize("Speed")),s.jr=e,s.Cs.addEventListener("ratechange",s.hh),s.Vr.on("languagechange",s.se),s.hh(),s}Pt(i,t);var n=i.prototype;return n.Ur=function(){return this.Or=v.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",Ux(this.Or,this.Vr.localize("Speed")),this.Or},n.Xr=function(){var t=v.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Jr.el().appendChild(this.Or),this.Jr.el().appendChild(t),this.Jr.el().setAttribute("aria-label",this.Vr.localize("Open the video speed settings menu")),t},n.Ir=function(i){var n=t.prototype.Ir.call(this,i);return this.Rr(n),n},n.Rr=function(t){var i=t.Br,n=this.Vr.localize(aht(i));Ux(t.el(),n),t.el().setAttribute("aria-label",this.Vr.localize("Set video speed to ")+n),t.selected(t.Br===this.Cs.playbackRate)},n.Fr=function(t){this.Cs.playbackRate=t.Br},n.Oe=function(){this.Cs.removeEventListener("ratechange",this.hh),this.Vr.off("languagechange",this.se),t.prototype.Oe.call(this)},i}(tht),fht=function(t){function i(i,n){var r,e,s;(r=t.call(this,i,n)||this).mh=void 0,r.fh=void 0,r.gh=void 0,r.ph=void 0,r.Yr=void 0,r.dh=function(){var t=$ot(r.xs.videoTracks);t!==r.Yr&&(r.Yr&&r.Yr.removeEventListener("activequalitychanged",r.ih),r.Yr=t,t&&t.addEventListener("activequalitychanged",r.ih),r.ih())},r.ih=function(){var t,i=null==(t=r.Yr)?void 0:t.activeQuality,n=Boolean(i&&i.height>=720);r.player().toggleClass("theo-hd",n)},hn(r.menu.el(),"theo-settings-control-menu"),Ux(r.menu.menuHeader.el(),i.localize("Settings")),r.controlText("Settings"),r.De.Fe=r.controlText(),r.mh=r.menu.addSubMenuItem({name:"QualityMenuItem"}),r.fh=new iht(r.mh,r.xs,i);var u=null!=(s=null==n||null==(e=n.playerOptions)?void 0:e.playbackRates)?s:[];return r.gh=r.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),r.ph=new cht(r.gh,r.xs,i,u),r.xs.videoTracks.addEventListener(["addtrack","removetrack","change"],r.dh),r.dh(),r}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this);return this.uh=$ut.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),Ux(this.uh,this.localize("HD")),i.appendChild(this.uh),i},n.buildCSSClass=function(){return"vjs-icon-cog theo-settings-control-button "+t.prototype.buildCSSClass.call(this)},n.se=function(){t.prototype.se.call(this),Ux(this.uh,this.localize("HD")),Ux(this.menu.menuHeader.el(),this.localize("Settings"))},n.dispose=function(){this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr=void 0),this.xs.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.dh),this.fh.Oe(),this.ph.Oe(),t.prototype.dispose.call(this)},i}(Sot);$ut.registerComponent("SettingsButton",fht),V(),It(),Dt(),V(),It(),Dt(),Ut(),V(),It(),Dt(),Ut();var vht=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).wh=void 0,r._h=function(t){var i=t.track;r.Ar(i),i.addEventListener("update",r.Sh)},r.xh=function(t){var i=t.track;r.Mr(i),i.removeEventListener("update",r.Sh)},r.Ch=function(t){return r.kh()},r.Sh=function(){for(var t,i=Ft(r.jr);!(t=i()).done;){var n=t.value;r.Ar(n)}},r.wh=n,r.wh.addEventListener("addtrack",r._h),r.wh.addEventListener("removetrack",r.xh),r.wh.addEventListener("change",r.Ch),r.kh(),r}Pt(i,t);var n=i.prototype;return n.yh=function(t){var i=t.label;if(i)return i;var n=t.language;if(n){var r=JL(n);if(r)return r.bh}return n||""},n.kh=function(){this.jr=this.wh},n.Oe=function(){this.wh.removeEventListener("addtrack",this._h),this.wh.removeEventListener("removetrack",this.xh),this.wh.removeEventListener("change",this.Ch),t.prototype.Oe.call(this)},i}(tht),dht=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n.audioTracks)||this).xs=void 0,e.Vr=void 0,e.se=function(){Ux(e.Pr.menuHeader.el(),e.Vr.localize("Language"));for(var t,i=Ft(e.Nr);!(t=i()).done;){var n=t.value;e.Rr(n)}},e.xs=n,e.Vr=r,Ux(e.Pr.menuHeader.el(),e.Vr.localize("Language")),e.Vr.on("languagechange",e.se),e}Pt(i,t);var n=i.prototype;return n.Rr=function(t){var i=t.Br,n=this.Vr.localize(this.yh(i));Ux(t.el(),n),t.el().setAttribute("aria-label",this.Vr.localize("Set the audio language to")+" "+n),t.selected(i.enabled)},n.Fr=function(t){for(var i,n=t.Br,r=Ft(this.xs.audioTracks);!(i=r()).done;){var e=i.value;e!==n&&(e.enabled=!1)}n.enabled=!0},n.Oe=function(){this.Vr.off("languagechange",this.se),t.prototype.Oe.call(this)},i}(vht),lht=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).jh=void 0,r.minimumMenuItems=2,r.jh=new dht(r.menu,r.xs,i),r.controlText("Language"),r.De.Fe=r.controlText(),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-icon-audio theo-audio-track-control-button "+t.prototype.buildCSSClass.call(this)},n.dispose=function(){this.jh.Oe(),t.prototype.dispose.call(this)},i}(Sot);$ut.registerComponent("audioTrackButton",lht),V(),It(),Dt(),V(),It(),Dt(),Ut();var ght=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n.textTracks)||this).xs=void 0,e.Vr=void 0,e.se=function(){Ux(e.Pr.menuHeader.el(),e.Vr.localize("Subtitles"));for(var t,i=Ft(e.Nr);!(t=i()).done;){var n=t.value;e.Rr(n)}},e.xs=n,e.Vr=r,Ux(e.Pr.menuHeader.el(),r.localize("Subtitles")),e.Vr.on("languagechange",e.se),e}Pt(i,t);var n=i.prototype;return n.$r=function(i){return!!t.prototype.$r.call(this,i)&&(!i.forced&&fy(i.kind))},n.Ir=function(i){var n=this,r=t.prototype.Ir.call(this,i);hn(r.el(),"theo-text-track-menu-item");var e=v.createElement("span");r.Th=e;var s=v.createElement("div");s.className="theo-text-track-menu-item-toggle",r.Mh=s;var u=function(t){return n.Ah(t,r)};r.Ph=u,s.addEventListener("click",u);var o=v.createElement("div");return o.className="theo-text-track-menu-item-toggle-slider",s.appendChild(o),r.el().appendChild(e),r.el().appendChild(s),r},n.Rr=function(t){var i=t,n=i.Br,r=this.Vr.localize(this.yh(n));Ux(i.Th,r),i.el().setAttribute("aria-label",this.Vr.localize("Set the subtitle language to")+" "+r),i.el().setAttribute("role","menuitemcheckbox"),i.selected(n.mode===Jp.Kn)},n.Dr=function(i){var n=i;n.Mh.removeEventListener("click",n.Ph),t.prototype.Dr.call(this,i)},n.Fr=function(t){for(var i,n=t.Br,r=Ft(this.xs.textTracks);!(i=r()).done;){var e=i.value;e!==n&&ay(e.kind,n.kind)&&(e.mode=Jp.Nh)}n.mode!==Jp.Kn?n.mode=Jp.Kn:n.mode=Jp.Nh},n.Ah=function(t,i){t.stopImmediatePropagation(),this.Fr(i)},n.Oe=function(){this.Vr.off("languagechange",this.se),t.prototype.Oe.call(this)},i}(vht),wht=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).jh=void 0,r.jh=new ght(r.menu,r.xs,i),r.controlText("Subtitles"),r.De.Fe=r.controlText(),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-icon-subtitles theo-text-track-control-button "+t.prototype.buildCSSClass.call(this)},n.dispose=function(){this.jh.Oe(),t.prototype.dispose.call(this)},i}(Sot);$ut.registerComponent("subtitlesButton",wht),V(),It(),Dt();var mht=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).De=void 0,r.Eh=function(){r.controlText("Replay"),r.De.Fe=r.controlText()},r.controlText("Play"),r.De=new Tot(r,r.controlText()),r.xs.addEventListener("ended",r.Eh),r.on(i,"languagechange",r.se),Vi.Zs.Ke&&new lot(r.el()),r}Pt(i,t);var n=i.prototype;return n.handleClick=function(i){this.xs.muted||this.xs.prepareWithUserAction(),t.prototype.handleClick.call(this,i)},n.handlePlay=function(i){t.prototype.handlePlay.call(this,i),this.controlText("Pause"),this.De.Fe=this.controlText()},n.handlePause=function(i){this.xs.ended||(t.prototype.handlePause.call(this,i),this.controlText("Play"),this.De.Fe=this.controlText())},n.se=function(){this.De.Fe=this.controlText()},n.dispose=function(){this.De.Oe(),this.xs.removeEventListener("ended",this.Eh),t.prototype.dispose.call(this)},i}(eot($ut.getComponent("playToggle")));$ut.registerComponent("playToggle",mht),V(),It(),Dt();var pht=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).De=void 0,r.controlText("Fullscreen"),r.De=new Tot(r,r.controlText()),Vi.Zs.Ke&&new lot(r.el()),r.on(i,"languagechange",r.updateContent),r}Pt(i,t);var n=i.prototype;return n.handleClick=function(i){this.xs.prepareWithUserAction(),t.prototype.handleClick.call(this,i)},n.handleFullscreenChange=function(i){t.prototype.handleFullscreenChange.call(this,i),this.updateContent()},n.updateContent=function(){var t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.De.Fe=this.controlText()},n.dispose=function(){this.De.Oe(),t.prototype.dispose.call(this)},i}(eot($ut.getComponent("fullscreenToggle")));$ut.registerComponent("fullscreenToggle",pht),V(),It(),Dt();var yht=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).De=void 0,r.controlText("Mute"),r.De=new Tot(r,r.controlText()),Vi.Zs.Ke&&new lot(r.el()),r.on(i,"languagechange",r.se),De&&(r.removeClass("vjs-hidden"),r.on(i,"loadstart",function(){r.removeClass("vjs-hidden")})),r}Pt(i,t);var n=i.prototype;return n.handleClick=function(i){this.xs.muted&&!this.xs.paused&&this.xs.prepareWithUserAction(),t.prototype.handleClick.call(this,i)},n.update=function(i){t.prototype.update.call(this,i),this.se()},n.se=function(){var t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.De.Fe=this.controlText()},n.dispose=function(){this.De.Oe(),t.prototype.dispose.call(this)},i}(eot($ut.getComponent("muteToggle")));$ut.registerComponent("muteToggle",yht),V(),It(),Dt();var _ht=$ut.getComponent("BigPlayButton"),kht="theo-play-svg-circle",bht='\n \n \n \n \n \n',Aht=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this),n=$ut.createEl("div",{className:"theo-big-play-button-svg-container"});return n.innerHTML=bht,i.appendChild(n),i},n.buildCSSClass=function(){return"theo-primary-color "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(i){this.xs.muted||this.xs.prepareWithUserAction(),t.prototype.handleClick.call(this,i),void 0!==this.xs.vr&&"unavailable"!==this.xs.vr.state&&(this.xs.vr.useDeviceMotionControls=!0)},i}(eot(_ht));$ut.registerComponent("BigPlayButton",Aht),V(),It(),Dt(),Ut();var Tht=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;var Sht=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).Kh=void 0,r.Ih=void 0,r.Fh=void 0,r.Zh=function(t){return r.Bh(t)},r.io=function(t){return r.Uh(t)},r.$h=function(t){return r.Rh()},r.qh=void 0,r.showThumbnails=function(){r.Kh&&r.Kh.hidden&&(r.Kh.hidden=!1,r.In())},r.hideThumbnails=function(){!r.Kh||r.Kh.hidden||r.player().scrubbing()||(r.Kh.hidden=!0,r.In())},r.on(r.player().textTracks(),"addtrack",r.Zh),r.on(r.player().textTracks(),"removetrack",r.io),Oi.Ks&&(r.on(i,"seeking",r.showThumbnails),r.on(i,"seeked",r.hideThumbnails)),r}Pt(i,t);var n=i.prototype;return n.Bh=function(t){var i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Ih&&(this.Ih=i,this.Fh=i.src?Vi.Dh(i.src).href:void 0,this.Ih.addEventListener(["addcue","removecue"],this.$h),this.Rh())},n.Uh=function(t){t.track===this.Ih&&this.Oh()},n.createEl=function(){var i=t.prototype.createEl.call(this);return this.Vh=$ut.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.Lh=$ut.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),i},n.update=function(i,n){t.prototype.update.call(this,i,n),this.keepTooltipsInside&&this.Hh(i)},n.Hh=function(t){var i;if(this.Ih&&this.Ih.cues){var n=function(t,i){for(var n,r=t[0],e=Ft(t);!(n=e()).done;){var s=n.value;if(s.startTime<=i)r=s;else if(i>=s.endTime)return r}return r}(this.Ih.cues,t);i=n&&n.content}if(i!==this.qh)if(this.qh=i,$ut.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",Boolean(i)),i){var r=i.match(Tht);if(r){var e=r[1],s=r[2],u=r[3],o=r[4],h=r[5];e=this.Wh(e);var a={Gh:Number(s),Xh:Number(u),Ti:Number(o),Mi:Number(h)};this.Jh(e,a)}else{var c=this.Wh(i);this.Jh(c)}}else this.zh()},n.Rh=function(){E(this.En)||this.Hh(this.En)},n.Wh=function(t){return this.Ih&&this.Fh?Vi.Dh(t,this.Fh).href:t},n.Jh=function(t,i){var n=this;this.Vh&&(this.Vh.src!==t?(this.Vh.onload=function(){n.Qh(i)},this.Vh.src="",this.Vh.src=t):this.Qh(i))},n.Qh=function(t){if(this.Lh&&this.Vh){var i=this.Lh.getContext("2d");i&&(null!=t||(t={Gh:0,Xh:0,Ti:this.Vh.naturalWidth,Mi:this.Vh.naturalHeight}),this.Lh.width=t.Ti,this.Lh.height=t.Mi,i.drawImage(this.Vh,t.Gh,t.Xh,t.Ti,t.Mi,0,0,t.Ti,t.Mi),this.Yh(this.Lh))}},n.Yh=function(t){this.Kh||(rn(this.tooltip,t),this.Kh=t),this.In()},n.zh=function(){this.Kh&&(this.tooltip.removeChild(this.Kh),this.Kh=void 0,this.In())},n.Oh=function(){void 0!==this.Ih&&(this.Ih.removeEventListener(["addcue","removecue"],this.$h),this.Ih=void 0),this.Fh=void 0,this.zh(),this.qh=void 0},n.dispose=function(){this.Oh(),t.prototype.dispose.call(this)},i}(Vot);$ut.registerComponent("MouseTimeDisplay",Sht),V(),It(),Dt();var Eht=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this);return i.className=this.buildCSSClass(),i},n.buildCSSClass=function(){return"theo-primary-color vjs-volume-level "+t.prototype.buildCSSClass.call(this)},i}($ut.getComponent("VolumeLevel"));$ut.registerComponent("VolumeLevel",Eht),V(),It(),Dt(),V(),It(),Dt();var Iht=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this);return i.className=this.buildCSSClass(),i},n.buildCSSClass=function(){return"theo-menu-container "+t.prototype.buildCSSClass.call(this)},i}($ut.getComponent("Component"));Iht.prototype.h=io({},Iht.prototype.h,{children:[]}),$ut.registerComponent("controlBarMenuContainer",Iht);var Rht=$ut.getComponent("Player"),Cht=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).handleKeyPress=function(t){9===t.which&&e.addClass("theo-probably-keyboard-focus")},e.handleClick=function(t){0===t.x&&0===t.y||e.removeClass("theo-probably-keyboard-focus")},v.body.addEventListener("keydown",e.handleKeyPress),v.body.addEventListener("click",e.handleClick),e}return Pt(i,t),i.prototype.dispose=function(){var i=this.el(),n=this.contentEl(),r=i.parentNode,e=i.nextSibling;t.prototype.dispose.call(this),Zi(n),this.Si&&r&&(e?r.insertBefore(i,e):r.appendChild(i)),v.body.removeEventListener("keydown",this.handleKeyPress),v.body.removeEventListener("click",this.handleClick)},i}(Rht);Cht.prototype.h=io({},Rht.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),$ut.registerComponent("Player",Cht),V(),It(),V(),It();var Pht=$ut.getComponent("Player"),Dht=Pht.prototype.ns;Pht.prototype.ns=function(t){if(!(this.H&&this.H.Us&&this.H.Us()))return Dht.call(this,t)};var Nht=Pht.prototype.createEl;function xht(t,i,n,r){var e=io({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},n);e.controlBar=io({progressControl:{keepTooltipsInside:!0}},e.controlBar);var s,u=e.techOrder||(e.techOrder=[]);(-1===u.indexOf("THEOplayer")&&u.unshift("THEOplayer"),(e.theoplayer||(e.theoplayer={})).player=t,n&&Wi(n.language))&&(e.languages=io({},e.languages,((s={})[KL]=n.language,s)),e.language=KL);i.setAttribute("data-vjs-player","");var o=i.getAttribute("style"),h=$ut(t.element,e,r);return h.ready(function(){uot(h),function(t,i){if(i){if(i.ads){var n=function(i){var n="adbreakbegin"===i.type,r=i.adBreak.integration===n0.so;oot(t,n,r)};i.ads.addEventListener("adbreakbegin",n),i.ads.addEventListener("adbreakend",n)}if(i.uplynk){var r,e=function(i){var n="adbreakbegin"===i.type;oot(t,n,!1)};null==(r=i.uplynk)||r.ads.adBreaks.addEventListener("addadbreak",function(t){t.adBreak.addEventListener("adbreakbegin",e),t.adBreak.addEventListener("adbreakend",e)})}i.addEventListener("sourcechange",function(){oot(t,!1,!1)})}}(h,t),function(t){t.on("mouseleave",hot)}(h)}),i.removeAttribute("data-vjs-player"),o?i.setAttribute("style",o):i.removeAttribute("style"),Vi.Zs.Ks&&(hn(i,"theo-mobile"),function(t){var i=f.outerHeight,n=f.outerWidth,r=i>n;r?(an(t,"theo-mobile-landscape"),hn(t,"theo-mobile-portrait")):(an(t,"theo-mobile-portrait"),hn(t,"theo-mobile-landscape"))}(i)),function(t){t.on("seeking",function(){on(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()})}(h),h}Pht.prototype.createEl=function(){var t=Nht.call(this),i=$ut.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t},V(),It(),V(),It(),Wt(),Dt(),Yt(),V(),It(),Bt(),Dt(),V(),It(),Dt();var Bht=$ut.getComponent("Button");var Oht="THEOPiPCloseButton",Mht=function(t){function i(i,n){var r;if((r=t.call(this,i,n)||this).no=void 0,r.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.no)}(n))throw new y("Invalid Picture-in-picture options.");return r.no=n.no,r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-close-button theo-pip-close"},n.handleClick=function(){this.no.eo()},i}(Bht);$ut.registerComponent(Oht,Mht);var Lht=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).Lo=void 0,e.mo=void 0,e.lo=void 0,e.t=void 0,e.bo=void 0,e.Ho=!1,e.ho=!1,e.Co=!1,e.xo=!1,e.ko=!1,e.eo=void 0,e.Bo=!1,e.Fo=void 0,e.Po=void 0,e.Ao=void 0,e.Mo=!1,e.Eo=void 0,e.co=function(){e.Ho=!0,e.Eo&&!e.ro&&e.Fo&&e.Lo&&e.Fo.qo<=e.Lo&&e.yo(!1)},e.fo=function(){e.lo||(e.Ho=!1,e.eo(),e.jo(!1))},e.se=function(){if(e.Ao){var t=e.t.vo;Ux(e.Ao,t.localize("Video playing in Picture-in-Picture mode"))}},e.$o=function(t){!e.xo&&e.Eo&&(E(t)||(e.Lo&&t<=e.Lo||e.Mo?e.ho||e.Co||e.yo(!1):e.ho?e.jo(!1):e.Co=!1))},e.Lo=n.visibility,e.mo=n.position,e.lo=n.retainPresentationModeOnSourceChange,e.Eo=void 0!==e.Lo,e.t=i,e.bo=i.zo,e.eo=r,e.ao(),e}Pt(i,t);var n=i.prototype;return n.ao=function(){this.t.wn(ch.uo,this.co),this.lo||this.t.wn(ch.do,this.fo),this.t.vo.on("languagechange",this.se)},n.po=function(){var t;return"theo-pip-"+(null!=(t=this.mo)?t:"bottom-right")},n.yo=function(t){var i=this.bo;i&&!this.oo&&(this.ko||this.wo(),this._o(),hn(i,"theo-pip"),hn(i,this.po()),this.ho=!0,this.xo=t,this.Co=!1,this.So(new zI(NT.PICTURE_IN_PICTURE)))},n.jo=function(t){var i=this.bo;i&&(this.To(),an(i,"theo-pip"),an(i,this.po()),this.ho=!1,this.Co=t,this.Mo=this.xo,this.xo=!1,this.So(new zI(NT.INLINE)))},n.wo=function(){if(!this.ko){var t=this.t.vo;t.addChild(Oht,{no:this});var i=v.createElement("div");i.className="theo-pip-overlay",this.Ao=v.createElement("div"),this.Ao.className="theo-pip-overlay-text",Ux(this.Ao,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.Ao),rn(t.el(),i),this.Po=i,this.ko=!0}},n.No=function(){this.Eo&&!this.Bo&&this.t.Io&&(this.Fo=this.t.Io.Do(.1,this.$o),this.Bo=!0)},n.Ro=function(){this.Fo&&this.t.Io&&(this.t.Io.Uo(this.Fo),this.Bo=!1)},n._o=function(){var t=this.t.vo.contentEl(),i=t.getBoundingClientRect(),n=v.documentElement.clientWidth,r=v.documentElement.clientHeight;t.style.top=i.top+"px",t.style.bottom=r-i.bottom+"px",t.style.right=n-i.right+"px",t.style.left=i.left+"px",t.style.width=i.width+"px",t.style.height=i.height+"px",t.style.position="fixed"},n.To=function(){var t=this.t.vo.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""},n.Oo=function(){an(this.bo,"theo-pip"),this.ro&&this.mo&&an(this.bo,"theo-pip-"+this.mo),this.Po&&(Zi(this.Po),this.Po=void 0)},n.kn=function(){this.Oo(),this.Ro(),this.Vo(),this.t.mn(ch.uo,this.co),this.t.mn(ch.do,this.fo),this.t.vo.off("languagechange",this.se),this.t=void 0},xt(i,[{key:"ro",get:function(){return this.ho}},{key:"oo",get:function(){return this.t.ds()}}]),i}(uh),Fht=function(t){function i(i,n,r,e){var s;return(s=t.call(this,n,r)||this).oa=void 0,s.Go=void 0,s.Qo=NT.INLINE,s.na=!1,s.eo=function(){s.Yo===NT.PICTURE_IN_PICTURE&&s.Jo(NT.INLINE)},s.ua=function(t){s.ra||(s.Yo!==NT.PICTURE_IN_PICTURE||s.Go.ro?s.Yo!==NT.PICTURE_IN_PICTURE&&s.Go.ro&&(s.na=!0,s.Jo(NT.PICTURE_IN_PICTURE)):s.Jo(NT.INLINE))},s.aa=function(){s.Wo()!==NT.PICTURE_IN_PICTURE&&s.Wo()!==NT.INLINE||s.Go.No(),s.oa.mn(ch.uo,s.aa)},s.oa=i,s.Go=new Lht(i,e.pip,s.eo),s.Go.wn(WI.MODE_CHANGE,s.ua),s.oa.wn(ch.uo,s.aa),s}Pt(i,t);var n=i.prototype;return n.Wo=function(){var i=t.prototype.Wo.call(this);return i===NT.INLINE&&this.Go.ro?NT.PICTURE_IN_PICTURE:i},n.Xo=function(i){return i===NT.PICTURE_IN_PICTURE||t.prototype.Xo.call(this,i)},n.Jo=function(i){this.Qo=this.Yo,i===NT.FULLSCREEN||i===NT.NATIVE_PICTURE_IN_PICTURE?this.Go.Ro():this.Go.No(),t.prototype.Jo.call(this,i)},n.Ko=function(i){var n=this;t.prototype.Ko.call(this,i),i===NT.PICTURE_IN_PICTURE?Er(this.ta.Zo(function(t){return n.ia(t)})):i===NT.FULLSCREEN?this.Go.jo(!1):this.Go.jo(!0)},n.ia=function(t){return jt(function(){return zt(this,function(i){switch(i.label){case 0:return pr(t),[4,ot.all([this.sa(),this.ea.jo()]).catch(pn)];case 1:return i.sent(),pr(t),this.Go.yo(!this.na),this.So(new zI(this.Yo)),this.na=!1,this.ra=!1,[2]}})}).call(this)},n._i=function(){this.ra||(this.Go.ro&&this.ha.ds?this.Jo(NT.FULLSCREEN):this.Qo!==NT.PICTURE_IN_PICTURE||this.ha.ds?t.prototype._i.call(this):(this.na=!0,this.Jo(NT.PICTURE_IN_PICTURE)))},n.kn=function(){t.prototype.kn.call(this),this.Go.kn(),this.oa.mn(ch.uo,this.aa),this.oa=void 0},i}(YI);V(),It(),Bt(),Dt();var Uht=function(t){function i(i,n){var r;return(r=t.call(this)||this).vo=void 0,r.fa=void 0,r.Vs=!1,r.da=!1,r.ga=!1,r.va=function(){if(!r.ga){var t=r.Vs,i=r.ds;t!==i&&(r.Vs=i,r.So(new MI))}},r.ya=function(){r.da=r.fa.ds,r.va()},r.ba=function(){r.ga||(r.vo.isFullWindow&&r.vo.supportsFullScreen()||r.da&&!r.vo.supportsFullScreen())&&(r.ga=!0,r.vo.exitFullscreen(),r.vo.requestFullscreen(),r.ga=!1,r.va())},r.vo=i,r.fa=n,r.vo.on("fullscreenchange",r.va),r.fa.wn(aS.pa,r.ya),r.fa.wn(aS.ka,r.ba),r.fa.wn(aS.ma,r.Rs),r.va(),r}Pt(i,t);var n=i.prototype;return n.yo=function(){this.vo.requestFullscreen()},n.jo=function(){this.vo.exitFullscreen(),this.fa.jo()},n.kn=function(){this.Vo(),this.vo.off("fullscreenchange",this.va),this.fa.mn(aS.pa,this.va),this.fa.mn(aS.ma,this.Rs),this.vo.isFullWindow&&this.vo.exitFullscreen()},xt(i,[{key:"ca",get:function(){return UI.la(this.vo.el())||this.vo.supportsFullScreen()}},{key:"ds",get:function(){return this.vo.isFullscreen()||this.da}}]),i}(uh);function Vht(t){return function(t){function i(i,n,r){var e;return(e=t.call(this,n,r)||this).zo=void 0,e.vo=void 0,e.Sa=void 0,e.wa=void 0,e._a=void 0,e.ja=void 0,e.zo=i,e.wa=new FB(i),e.Sa=t.prototype.xa.call(sW(e)),b.defineProperty(e.Sa,"constructor",{value:EO}),e.vo=xht(e.Sa,e.zo,r.ui),e.ja=new Uht(e.vo,e.Ma),e._a=new Fht(e,e.ja,e.Pa.Aa(),r),e._a.wn(WI.MODE_CHANGE,e.Rs),e}Pt(i,t);var n=i.prototype;return n.ds=function(){return this._a.Wo()===NT.FULLSCREEN},n.xa=function(){return function(t,i){var n=b.create(t),r=i.vo;return Wg(n,{get controls(){return r.controls()},set controls(t){r.controls($g(t))},get presentation(){return i._a.Ca},get presentationMode(){return i._a.Wo()},set presentationMode(t){var n=UT(t);n&&i._a.Jo(n)},get ui(){return r},get visibility(){return i.Io.Ca}})}(this.Sa,this)},n.kn=function(){t.prototype.kn.call(this),this._a.kn(),this.ja.kn(),this.vo.dispose(),this.wa.kn()},n.Ta=function(i){this.vo.src(""),t.prototype.Ta.call(this,i)},xt(i,[{key:"Io",get:function(){return this.wa}}]),i}(t)}function jht(t){return(t=t||{}).position=function(t){switch(t){case"top-left":case"top-right":case"bottom-left":case"bottom-right":return t;default:return}}(t.position),t.visibility=function(t){if(Fi(t)&&!E(t))return Cn(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=$g(t.retainPresentationModeOnSourceChange),t}V(),It(),V(),It();var Hht=bn(function(){var t=Vht(SO());return t=function(t){for(var i,n=t,r=Ft(qtt);!(i=r()).done;)n=(0,i.value)(n);return n}(t)});function Wht(t,i){var n=function(t){var i=OT(t);return i.ui=i.ui||{},void 0!==(null==t?void 0:t.width)&&void 0===i.ui.width&&(i.ui.width=t.width),void 0!==(null==t?void 0:t.height)&&void 0===i.ui.height&&(i.ui.height=t.height),void 0!==(null==t?void 0:t.fluid)&&void 0===i.ui.fluid&&(i.ui.fluid=t.fluid),i.pip=jht(i.pip),i}(i),r=v.createElement("div");ln(r),t.appendChild(r);var e=new(Hht())(t,r,n);e.Na=e;var s=e.Ca;return e.Ea(),e.Ba(zB),b.defineProperty(s,"constructor",{value:Wht}),s=Hg(s),rA(e),function(t){for(var i,n=Ft(Gtt);!(i=n()).done;)(0,i.value)(t)}(e),s}V(),It(),V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt();var zht="theo-cast-",qht=function(t){function i(i,n){var r,e;return(r=t.call(this,i,n)||this).bo=void 0,r.Ra=void 0,r.De=void 0,r.Va=void 0,r.bo=i.el(),r.Ra=KS.UNAVAILABLE,r.controlText("Unavailable"),r.De=new Tot(r,r.controlText()),null==(e=r.Ia)||e.addEventListener("statechange",function(t){var i=t;r.Ua(i.state)}),Vi.Zs.Ke&&(r.Va=new lot(r.el())),r.Ua(r.Ia?r.Ia.state:KS.UNAVAILABLE),r.on(i,"languagechange",r.se),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return zht+"button theo-"+this.$a+"-button theo-controlbar-button "+t.prototype.buildCSSClass.call(this)},n.createEl=function(i,n,r){var e=t.prototype.createEl.call(this),s=v.createElement("div");s.className="theo-button-icon-blur";var u=v.createElement("div");return u.className=zht+"svg-container",u.innerHTML=this.Da,e.appendChild(s),e.appendChild(u),e},n.handleClick=function(i){var n;if(t.prototype.handleClick.call(this,i),this.Ra===KS.AVAILABLE)null==(n=this.Ia)||n.start();else if(this.Ra===KS.CONNECTED||this.Ra===KS.CONNECTING){var r;null==(r=this.Ia)||r.stop()}},n.Ua=function(t){an(this.bo,"theo-"+this.$a+"-"+this.Ra),this.Ra=t,hn(this.bo,"theo-"+this.$a+"-"+this.Ra),this.se()},n.se=function(){this.Oa(this.Ra),this.De.Fe=this.controlText()},n.Oa=function(t){t===KS.CONNECTED?this.controlText("Stop Casting"):t===KS.AVAILABLE?this.controlText("Start Casting"):t===KS.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")},xt(i,[{key:"Ia",get:function(){throw new y("Fa")}},{key:"Da",get:function(){return this.h.Da}},{key:"$a",get:function(){return this.h.$a}}]),i}(eot($ut.getComponent("Button"))),Xht=0;function Ght(){var t='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ';return Xht++,t}var Qht=function(t){function i(i,n){return t.call(this,i,io({},n,{$a:"chromecast",Da:Ght()}))||this}return Pt(i,t),xt(i,[{key:"Ia",get:function(){var t;return null==(t=this.xs.cast)?void 0:t.chromecast}}]),i}(qht);$ut.registerComponent("chromecastButton",Qht),V(),It(),Dt();var Yht="theo-chromecast-",$ht=function(t){function i(i,n){var r,e,s;return(r=t.call(this,i,n)||this).La=void 0,r.update=function(){r.La?(r._r&&Ux(r._r,r.La.receiverName||""),r.La.state===KS.CONNECTED?r.show():r.hide()):r.hide()},r.La=null==(e=r.xs.cast)?void 0:e.chromecast,null==(s=r.La)||s.addEventListener("statechange",r.update),r.xs.addEventListener("play",r.update),r.update(),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return Yht+"overlay "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){var n=t.prototype.createEl.call(this);hn(n,Yht+"overlay");var r=$ut.createEl("div",{className:Yht+"status-icon",innerHTML:i.ICON_SVG}),e=$ut.createEl("div",{className:Yht+"status-info"});Ux(e,"Playing on");var s=$ut.createEl("div",{className:Yht+"status-title"}),u=$ut.createEl("div",{className:Yht+"status"});return this._r=s,u.appendChild(r),u.appendChild(e),u.appendChild(s),n.appendChild(u),n},n.dispose=function(){var i;null==(i=this.La)||i.removeEventListener("statechange",this.update),this.La=void 0,this.xs.removeEventListener("play",this.update),t.prototype.dispose.call(this)},i}(eot($ut.getComponent("Component")));$ht.ICON_SVG='\n\n \n',$ut.registerComponent("chromecastOverlay",$ht),V(),It(),V(),It(),Bt(),Dt();var Kht=function(t){function i(i,n){var r,e,s;return(r=t.call(this,i,io({},n,{$a:"airplay",Da:'\n\n \n \n'}))||this).qa=function(){r.enable()},r.Ha=function(){r.disable()},null==(e=r.xs.ads)||e.addEventListener("adbreakbegin",r.Ha),null==(s=r.xs.ads)||s.addEventListener("adbreakend",r.qa),r.xs.addEventListener("currentsourcechange",r.qa),r}return Pt(i,t),i.prototype.dispose=function(){var i,n;null==(i=this.xs.ads)||i.removeEventListener("adbreakbegin",this.Ha),null==(n=this.xs.ads)||n.removeEventListener("adbreakend",this.qa),this.xs.removeEventListener("currentsourcechange",this.qa),t.prototype.dispose.call(this)},xt(i,[{key:"Ia",get:function(){var t;return null==(t=this.xs.cast)?void 0:t.airplay}}]),i}(qht);$ut.registerComponent("airplayButton",Kht),V(),It(),V(),It(),V(),It(),Dt();var Jht=function(t){function i(i,n){var r,e;return(r=t.call(this,i,n)||this).za=void 0,r.Va=void 0,r.Wa=function(){return r.Sn()},r.controlText("Watch in VR"),r.za=new Tot(r,r.controlText()),null==(e=r.xs.vr)||e.addEventListener(["statechange","stereochange"],r.Wa),r.Sn(),Vi.Zs.Ke&&(r.Va=new lot(r.el())),r.on(i,"languagechange",r.se),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-vr-button theo-controlbar-button "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(){this.xs.vr.stereo=!this.xs.vr.stereo,this.se()},n.Sn=function(){var t=this.xs.vr;t&&t.state!==Y5.Os?(this.show(),t.canPresentVR?this.enable():this.disable()):this.hide(),this.se()},n.se=function(){var t=this.xs.vr;t&&t.state!==Y5.Os&&(t.stereo?this.controlText("Stop watching in VR"):t.canPresentVR?this.controlText("Watch in VR"):this.controlText("No VR capable device found"),this.za.Fe=this.controlText())},n.dispose=function(){var i;null==(i=this.xs.vr)||i.removeEventListener(["statechange","stereochange"],this.Wa),t.prototype.dispose.call(this)},i}(eot($ut.getComponent("Button")));$ut.registerComponent("vrButton",Jht),V(),It(),Dt();var Zht=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).xs=void 0,e.Wa=function(){return e.Sn()},e.Ja=function(){return e.Xa()},e.xs=r,e.xs.vr.addEventListener("statechange",e.Wa),e.xs.vr.addEventListener("directionchange",e.Ja),e.Sn(),e.Xa(),e}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()}),n=$ut.createEl("div",{className:"theo-360-fov"});return i.appendChild(n),this.Ga=n,i},n.buildCSSClass=function(){return"theo-360-compass "+t.prototype.buildCSSClass.call(this)},n.Sn=function(){this.xs.vr.state===Y5.Os?this.hide():this.show()},n.Xa=function(){var t=-this.xs.vr.direction.yaw+40;this.Ga.style[DI("transform")]="scale(0.875) rotate("+t+"deg) skew("+"-10deg)"},n.dispose=function(){this.xs.vr.removeEventListener("statechange",this.Wa),this.xs.vr.removeEventListener("directionchange",this.Ja),t.prototype.dispose.call(this)},i}($ut.getComponent("Component"));V(),It(),Dt();var tat=A.pow(2,31)-1,iat=function(t){function i(i,n,r){var e;return(e=t.call(this,i,n)||this).xs=void 0,e.tu=!1,e.su=!1,e.iu="",e.eu=function(){return e.Qa()},e.xs=r,e.xs.vr.addEventListener("statechange",e.eu),e.Qa(),e}Pt(i,t);var n=i.prototype;return n.Qa=function(){this.xs.vr.state===Y5.Ya?this.Ka():this.Za()},n.Ka=function(){if(!this.tu){this.tu=!0;var t=this.xs.element;this.iu=t.style.zIndex||"",t.style.zIndex=""+tat,this.su=this.player().isFullscreen(),this.player().requestFullscreen()}},n.Za=function(){this.tu&&(this.tu=!1,this.xs.element.style.zIndex=this.iu,this.su?this.player().requestFullscreen():this.player().exitFullscreen())},n.dispose=function(){this.Za(),this.xs.vr.removeEventListener("statechange",this.eu),t.prototype.dispose.call(this)},i}($ut.getComponent("Component"));Qtt(function(t){var i=t.Ca;if(i.vr){var n=t.vo,r=new Zht(n,{},i);if(t.wn(ch.do,function(){var i;n.removeChild(r);var e=null==(i=t.nu())?void 0:i.vr;void 0===e||e.nativeVR||n.addChild(r)}),Oi.ru){var e=new iat(n,{},i);n.addChild(e)}}}),V(),It(),V(),It(),Bt(),Dt(),V(),It(),Dt();var nat=function(t){function i(){return t.call(this,"relatedchange")||this}return Pt(i,t),i}(ah),rat=["relatedchange"],eat=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).hu=void 0,i.uu=[],i}return Pt(i,t),i.prototype.kn=function(){this.Vo(),this.uu=[]},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get sources(){return t.ou},set sources(i){t.ou=i},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new qI(rat,!0,n),i.au(t),n}(this)),this.hu}},{key:"ou",get:function(){return this.uu},set:function(t){this.uu=function(t){return t.filter(function(t){return t&&(qi(t.link)||Xg(t,["source"]))})}(t),t.length>this.uu.length&&console.warn("One or more of the configured related content sources are invalid. Check if they have a source or a link."),this.So(new nat)}}]),i}(uh);Jb(function(t){return function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).cu=void 0,r.cu=new eat,r}Pt(i,t);var n=i.prototype;return n.xa=function(){var i=this.cu;return Wg(t.prototype.xa.call(this),{get related(){return i.Ca}})},n.kn=function(){this.cu.kn(),t.prototype.kn.call(this)},i}(t)},$b.lu),V(),It(),Bt(),Dt(),V(),It(),Dt();var sat=function(t){function i(i,n,r){var e;return(e=t.call(this,i,r)||this).bo=void 0,e.fu=void 0,e.De=void 0,e.bo=i.el(),e.fu=n,e.player().topControlBar.addChild(e),e.hide(),e.controlText(e.localize("Related content")),e.De=new Tot(e,e.controlText()),e.on(i,"languagechange",e.se),e}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-icon-view-grid theo-related-button "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(){this.fu.du?this.fu.we():this.fu.be()},n.se=function(){this.De.Fe=this.controlText()},n.dispose=function(){this.player().topControlBar.removeChild(this),t.prototype.dispose.call(this)},i}($ut.getComponent("Button"));V(),It(),Bt(),Dt(),Ut(),V(),It(),Dt();var uat=function(t){function i(i,n){var r;return(r=t.call(this,i)||this).vu=void 0,r.vu=n,r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-secondary-background theo-close-button"},n.handleClick=function(){this.vu.hide()},i}($ut.getComponent("Button")),oat=function(){var t=v.createElement("div");return t.className="theo-related-grid-tile",t.innerHTML='',t}();function hat(t,i,n){var r=oat.cloneNode(!0),e=r.querySelector(".theo-related-grid-tile-content");Xg(n,["source"])?(e.style.cursor="pointer",e.addEventListener("click",function(){t.source=n.source,i.we()})):qi(n.link)&&e.setAttribute("href",n.link);var s=r.querySelector(".theo-related-grid-tile-image");s.style.backgroundImage='url("'+Zo(n.image)+'")',s.removeAttribute("id");var u=r.querySelector(".theo-related-grid-tile-title");n.title?(Ux(u,n.title),u.removeAttribute("id")):Zi(u);var o=r.querySelector(".theo-related-grid-tile-duration");return n.duration?(Ux(o,n.duration),o.removeAttribute("id")):Zi(o),r}var aat=[15,12,9,8,6,4,3,2,1];var cat=function(){function t(t,i,n,r,e){var s=this;this._u=void 0,this.Pu=void 0,this.xu=void 0,this.Tu=void 0,this.mu=void 0,this.yu=void 0,this.Cu=void 0,this.ju=void 0,this.Mu=void 0,this.Au=void 0,this.Nu=void 0,this._u=t,this.Pu=i,this.xu=n,this.Tu=r,this.mu=12,this.Nu=function(t){s.Cu.style.width=t.width+"px"},this.ju=v.createElement("div"),this.yu=new uat(this.Pu,{hide:function(){s.xu.we()}}),this.Cu=this.Su(),this.Au=new fat(e),this.Au.wn(AI.yn,this.Nu),this.Mu=new d0(this.Cu,this.Au),this.wu(12)}var i=t.prototype;return i.gu=function(){this.yu.focus()},i.bu=function(t){this.ku(),function(t){if(t.length)for(var i,n=Ft(aat);!(i=n()).done;){var r=i.value;if(t.length>=r){t.length=r;break}}}(t),this.wu(t.length);for(var i,n=Ft(t);!(i=n()).done;){var r=i.value,e=hat(this._u.Ca,this.xu,r);this.Cu.appendChild(e)}},i.ku=function(){this.Cu.innerHTML=""},i.Su=function(){var t=v.createElement("div");t.className="theo-overlay-panel";var i=v.createElement("div");return i.className="theo-related-grid",this.ju.className="theo-related",this.yu.controlText("Close Related Content"),this.Tu.appendChild(this.ju),this.ju.appendChild(t),t.appendChild(this.yu.el()),t.appendChild(i),i},i.wu=function(t){an(this.Cu,this.pu),this.mu=t,hn(this.Cu,this.pu)},i.kn=function(){Zi(this.ju),this.Mu.kn(),this.Au.kn(),this.yu.dispose(),this._u=void 0},xt(t,[{key:"pu",get:function(){return"theo-"+this.mu+"-item-grid"}}]),t}(),fat=function(t){function i(i){var n;return(n=t.call(this)||this).Fu=void 0,n.Bu=void 0,n.Du=void 0,n.Fu=i,n.Du=function(t){var i=t.width;9*(t.width/16)>t.height&&(i=16*(t.height/9));n.Bu=i,n.So(new TI(n.Eu,t.height))},n.Fu.wn(AI.yn,n.Du),n}return Pt(i,t),i.prototype.kn=function(){this.Vo(),this.Fu.mn(AI.yn,this.Du)},xt(i,[{key:"Eu",get:function(){return this.Bu||0}},{key:"Iu",get:function(){return this.Fu.Iu}}]),i}(uh);V(),It(),Dt();var vat=function(t){function i(){return t.call(this,"show")||this}return Pt(i,t),i}(ah);V(),It(),Dt();var dat=function(t){function i(){return t.call(this,"hide")||this}return Pt(i,t),i}(ah),lat="theo-related-available",gat="theo-related-showing",wat=[].concat(rat,["show","hide"]),mat=function(t){function i(i,n,r,e){var s;return(s=t.call(this)||this).$u=void 0,s.Hu=void 0,s.hu=void 0,s.Pu=void 0,s.Ou=void 0,s.Ru=!1,s.Vu=!1,s.qu=function(t){var i=s.ou;s.Ou.bu(i),i.length?(s.Uu(lat),s.Hu.show()):(s.Lu(lat),s.Hu.hide()),s.So(t)},s.$u=n,s.$u.wn("relatedchange",s.qu),s.Pu=r,s.Ou=new cat(i,s.Pu,s,r.contentEl(),e),s.Hu=new sat(r,s,{}),s}Pt(i,t);var n=i.prototype;return n.be=function(){var t=this.Ru;this.Ru=!0,this.Uu(gat),this.Ou.gu(),this.Pu.paused()?this.Vu=!0:this.Pu.pause(),t!==this.Ru&&this.So(new vat)},n.we=function(){var t=this.Ru;this.Ru=!1,this.Lu(gat),this.Hu.focus(),this.Vu||this.Pu.play(),this.Vu=!1,t!==this.Ru&&this.So(new dat)},n.Uu=function(t){this.Pu.el().classList.add(t)},n.Lu=function(t){this.Pu.el().classList.remove(t)},n.kn=function(){this.Vo(),this.Ou.kn()},xt(i,[{key:"Ca",get:function(){return this.hu||(this.hu=function(t){var i,n={get sources(){return t.ou},set sources(i){t.ou=i},get showing(){return t.du},show:function(){t.be()},hide:function(){t.we()},addEventListener:function(t,n){i.wn(t,n)},removeEventListener:function(t,n){i.mn(t,n)}};return i=new qI(wat,!0,n),i.au(t),n}(this)),this.hu}},{key:"ou",get:function(){return this.$u.ou},set:function(t){this.$u.ou=t}},{key:"du",get:function(){return this.Ru}}]),i}(uh);Xtt(function(t){return function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).zu=void 0,e.zu=new mat(e,e.cu,e.vo,e.Wu),e}Pt(i,t);var n=i.prototype;return n.xa=function(){var i=this.zu;return Wg(t.prototype.xa.call(this),{get related(){return i.Ca}})},n.kn=function(){this.zu.kn(),t.prototype.kn.call(this)},i}(t)}),V(),It(),V(),It(),Bt(),Dt(),V(),It(),Dt();var pat=function(t){function i(i,n,r){var e;return(e=t.call(this,i,r)||this).bo=void 0,e.Gu=void 0,e.De=void 0,e.bo=i.el(),e.Gu=n,e.player().topControlBar.addChild(e),e.hide(),e.controlText("Share Video"),e.De=new Tot(e,e.controlText()),e.on(i,"languagechange",e.se),e}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"vjs-icon-share theo-social-button "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(){this.Gu.showing?this.Gu.hide():this.Gu.show()},n.se=function(){this.De.Fe=this.controlText()},n.dispose=function(){this.player().topControlBar.removeChild(this),t.prototype.dispose.call(this)},i}($ut.getComponent("Button"));function yat(t,i,n){switch(i){case"iconurl":return function(t,i){var n,r=v.createElement("a");r.className="theo-social-iconurl",r.title=null!=(n=t.label)?n:"",r.target="Xu",r.href=i;var e,s,u=v.createElement("img");return u.src=null!=(e=t.icon)?e:"",u.alt=null!=(s=t.label)?s:"",u.width=25,u.height=25,r.appendChild(u),r}(t,n);case"text":return function(t){var i=v.createElement("div");if(i.className="theo-social-text",t.label){var n=v.createElement("h5");n.className="theo-primary-background theo-social-label",Ux(n,t.label),i.appendChild(n)}var r,e=v.createElement("p");return e.className="theo-social-content-container theo-tertiary-background",e.tabIndex=0,Ux(e,null!=(r=t.text)?r:""),i.appendChild(e),i}(t);case"texturl":return function(t,i){var n=v.createElement("div");if(n.className="theo-social-texturl",t.label){var r=v.createElement("h5");r.className="theo-primary-background theo-social-label",Ux(r,t.label),n.appendChild(r)}var e=v.createElement("div");e.className="theo-social-content-container theo-tertiary-background";var s=v.createElement("a");return s.target="Xu",s.href=i,Ux(s,i),e.appendChild(s),n.appendChild(e),n}(t,n)}}V(),It(),Bt(),Ut();var _at="";var kat=function(){function t(t,i,n,r){this.oa=void 0,this.xu=void 0,this.Tu=void 0,this.sc=void 0,this.yu=void 0,this.Ou=void 0,this.ju=void 0,this.Ku=void 0,this.Zu=void 0,this.tc=void 0,this.oa=t,this.xu=i,this.Tu=n,this.sc=r;var e=v.createElement("div");e.className="theo-overlay-panel",this.yu=new uat(this.oa,this.xu.Ca),this.yu.controlText("Close Share"),this.Ou=v.createElement("div"),this.Ou.className="theo-social-container",this.ju=v.createElement("div"),this.ju.className="theo-social",this.Ku=v.createElement("div"),this.Ku.className="theo-social-icon-container",this.Zu=v.createElement("div"),this.Zu.className="theo-social-text-container",this.Tu.appendChild(this.ju),this.ju.appendChild(e),this.Ou.appendChild(this.Ku),this.Ou.appendChild(this.Zu),e.appendChild(this.yu.el()),e.appendChild(this.Ou),this.tc=new d0(this.ju,this.sc)}var i=t.prototype;return i.Ju=function(t){this.ku();for(var i,n=Ft(t);!(i=n()).done;){var r=i.value;this.Qu(r)}},i.gu=function(){this.yu.focus()},i.Qu=function(t){var i=function(t,i){return t.src?Wo(t.src,_at)?t.src.replace(_at,i):t.src:i}(t,this.xu.Yu),n=function(t){if(t)return t.icon?"iconurl":t.text?"text":"texturl"}(t),r=yat(t,n,i);r&&("iconurl"===n?this.Ku.appendChild(r):this.Zu.appendChild(r))},i.ku=function(){this.Ku.innerHTML="",this.Zu.innerHTML=""},i.kn=function(){Zi(this.ju),this.tc.kn()},xt(t,[{key:"xe",get:function(){return this.ju}}]),t}(),bat="theo-social-available",Aat="theo-social-showing",Tat=function(){function t(t,i){this.Hu=void 0,this.hu=void 0,this.hc=void 0,this.Ou=void 0,this.Ru=!1,this.nc=[],this.rc=void 0,this.Vu=!1,this.hu=function(t){return{get showing(){return t.du},get items(){return t.ec},set items(i){t.ec=i},get url(){return t.Yu},set url(i){t.Yu=i},show:function(){t.be()},hide:function(){t.we()}}}(this),this.hc=t,this.Ou=new kat(this.hc,this,t.contentEl(),i),this.Hu=new pat(t,this.hu,{})}var i=t.prototype;return i.be=function(){this.Ru=!0,this.Uu(Aat),this.Ou.gu(),this.hc.paused()?this.Vu=!0:this.hc.pause()},i.we=function(){this.Ru=!1,this.Lu(Aat),this.Hu.focus(),this.Vu||this.hc.play(),this.Vu=!1},i.Uu=function(t){this.hc.el().classList.add(t)},i.Lu=function(t){this.hc.el().classList.remove(t)},i.kn=function(){this.Hu.dispose(),this.Ou.kn()},xt(t,[{key:"Ca",get:function(){return this.hu}},{key:"du",get:function(){return this.Ru}},{key:"ec",get:function(){return this.nc},set:function(t){this.nc=t,this.Ou.Ju(t),t.length?(this.Uu(bat),this.Hu.show()):(this.Lu(bat),this.Hu.hide())}},{key:"Yu",get:function(){return this.rc||function(){for(var t=f,i=t.location.href;t!==f.top;){t=t.parent;try{i=t.location.href}catch(t){}}return i}()},set:function(t){this.rc=t}}]),t}();Xtt(function(t){return function(t){function i(i,n,r){var e;return(e=t.call(this,i,n,r)||this).Gu=void 0,e.Gu=new Tat(e.vo,e.Wu),e}return Pt(i,t),i.prototype.xa=function(){var i=this.Gu;return Wg(t.prototype.xa.call(this),{get social(){return i.Ca}})},i}(t)}),V(),It(),V(),It(),Dt();var Sat=function(t){function i(){return t.apply(this,arguments)||this}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this);return i.className=this.buildCSSClass(),i},n.buildCSSClass=function(){return"theo-upnext-container "+t.prototype.buildCSSClass.call(this)},i}($ut.getComponent("Component"));Sat.prototype.h=io({},Sat.prototype.h,{children:[]}),$ut.registerComponent("upNextContainer",Sat),V(),It(),Bt(),Dt(),V(),It(),Bt(),Dt();var Eat="theo-upnext-bar-",Iat=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,r)||this).lc=void 0,s.tc=void 0,s.Ru=void 0,s.uc=void 0,s.oc=void 0,s.dc=void 0,s.lc=n,s.tc=new d0(s.el(),e),s.Ru=!1,s.uc=10,s.on(i,"languagechange",s.se),s}Pt(i,t);var n=i.prototype;return n.Ta=function(t){this.ku(),this.cc(t)},n.cc=function(t){var i=this;if(t&&t.link&&t.image){var n=v.createElement("div");hn(n,Eat+"content"),n.onclick=function(){i.lc.next()},n.onkeypress=function(t){13===t.which&&i.lc.next()};var r=v.createElement("div");if(r.style.backgroundImage='url("'+Zo(t.image)+'")',hn(r,Eat+"image"),n.appendChild(r),t.duration){var e=v.createElement("span");hn(e,Eat+"duration"),e.innerHTML=""+t.duration,r.appendChild(e)}var s=v.createElement("div");hn(s,Eat+"text");var u=v.createElement("div");if(hn(u,Eat+"upnext"),Ux(u,this.localize("Up Next")),s.appendChild(u),t.title){var o=v.createElement("div");hn(o,Eat+"title"),Ux(o,t.title),s.appendChild(o)}n.appendChild(s),this.oc=n,this.dc=u,this.el().appendChild(this.oc)}},n.ku=function(){this.el().innerHTML="",this.oc=void 0,this.dc=void 0},n.se=function(){this.dc&&Ux(this.dc,this.localize("Up Next"))},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},n.buildCSSClass=function(){return"theo-upnext-bar "+t.prototype.buildCSSClass.call(this)},n.dispose=function(){this.tc.kn(),t.prototype.dispose.call(this)},xt(i,[{key:"du",get:function(){return this.Ru},set:function(t){this.Ru=t,this.oc&&(this.oc.tabIndex=t?0:-1)}},{key:"ac",get:function(){return this.uc},set:function(t){this.uc=t}}]),i}($ut.getComponent("Component"));V(),It(),Bt(),Dt();var Rat="theo-upnext-panel-",Cat=kht,Pat=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i,r)||this).lc=void 0,s.tc=void 0,s.kc=void 0,s.bc=void 0,s.wc=void 0,s.xc=0,s.Ru=void 0,s.vc=void 0,s.gc=void 0,s.lc=n,s.tc=new d0(s.el(),e),s.Ru=!1,s.vc=10,s.gc=!0,s.on(i,"languagechange",s.se),s}Pt(i,t);var n=i.prototype;return n.Ta=function(t){this.ku(),this.yc(t)},n.yc=function(t){var i=this;if(t&&t.link&&t.image){var n=v.createElement("div");n.className=Rat+"content";var r=v.createElement("div");r.style.backgroundImage='url("'+Zo(t.image)+'")',r.className=Rat+"image",n.appendChild(r);var e=v.createElement("div");e.className=Rat+"text";var s=v.createElement("div");if(s.className=Rat+"upnext",Ux(s,this.localize("Up Next")),e.appendChild(s),t.title){var u=v.createElement("div");u.className=Rat+"title",Ux(u,t.title),e.appendChild(u)}n.appendChild(e),this.bc=v.createElement("div"),this.bc.className=Rat+"autoplay",this.bc.innerHTML=bht;var o=this.bc.querySelector("svg");o.onclick=function(){i.lc.next()},o.tabIndex=0,o.onkeypress=function(t){13===t.which&&i.lc.next()},this.kc=s,this.wc=this.bc.querySelector("."+Cat),n.appendChild(this.bc),this.el().appendChild(n)}},n.ku=function(){this.el().innerHTML="",this.kc=void 0,this.wc=void 0},n.se=function(){this.kc&&Ux(this.kc,this.localize("Up Next"))},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},n.buildCSSClass=function(){return"theo-upnext-panel "+t.prototype.buildCSSClass.call(this)},n.dispose=function(){this.tc.kn(),t.prototype.dispose.call(this)},xt(i,[{key:"du",get:function(){return this.Ru},set:function(t){this.Ru=t}},{key:"fc",get:function(){return this.vc},set:function(t){this.vc=t}},{key:"mc",get:function(){return this.gc},set:function(t){this.gc=t}},{key:"_c",get:function(){return this.xc},set:function(t){this.xc=t,this.wc.style.strokeDashoffset=""+A.round(1e5*t)/1e5}}]),i}($ut.getComponent("Component")),Dat="theo-upnext-panel-showing",Nat="theo-upnext-bar-showing",xat=2*A.PI*73,Bat=function(){function t(i,n,r){var e=this;this.Pc=void 0,this.Ou=void 0,this.hu=void 0,this.Sc=void 0,this.Tc=void 0,this.hc=void 0,this.Ac=void 0,this.Ic=10,this.Oc=1,this.Dc=void 0,this.Fc=!0,this.qc=void 0,this.$c=function(){e.Oc!==e.Ic?(e.Ou._c-=xat/e.Ic,e.Oc+=1):e.Rc()},this.Ec=function(){e.Ou.du||e.Bc()},this.Nc=function(){var i=e.hc.currentTime(),n=e.hc.duration(),r=n?t.Gc(e.Pc.ac,n):void 0;void 0!==r&&e.Hc(i,r),e.Ou.mc&&e.Wc(i,n)},this.hu=function(t){return{get source(){return t.Mc},set source(i){t.Mc=i},get bar(){return t.Cc},get panel(){return t.jc},next:function(){t.Rc()}}}(this),this.Pc=new Iat(i,this.hu,{},n),this.Ou=new Pat(i,this.hu,{},n),this.Sc=function(t,i){return{get showing(){return i.du},get offset(){return i.ac},set offset(t){i.ac=t},show:function(){t.Vc()},hide:function(){t.Lc()}}}(this,this.Pc),this.Tc=function(t,i){return{get showing(){return i.du},get countdownDuration(){return i.fc},set countdownDuration(t){i.fc=t},get showUpNextPanel(){return i.mc},set showUpNextPanel(t){i.mc=t},show:function(){t.Bc()},hide:function(){t.Uc()}}}(this,this.Ou),this.hc=i,this.qc=r,i.getChild("upNextContainer").addChild(this.Pc,{}),i.getChild("upNextContainer").addChild(this.Ou,{})}var i=t.prototype;return i.Bc=function(){this.Ou.fc?this.Ic=Jg(this.Ou.fc):0===this.Ou.fc?this.Ic=0:this.Ic=10,0!==this.Ic?(isFinite(this.Ic)&&(this.Fc=!0),this.Ou.du=!0,this.Uu(Dat),this.Fc&&(this.Ou._c=xat-xat/this.Ic,this.Dc=m(this.$c,1e3))):this.Rc()},i.Uc=function(){this.Ou.du=!1,this.Lu(Dat),this.Fc&&(p(this.Dc),this.Oc=1,this.Ou._c=xat)},i.Vc=function(){this.Pc.du=!0,this.Uu(Nat)},i.Lc=function(){this.Pc.du=!1,this.Lu(Nat)},i.Rc=function(){p(this.Dc),this.Mc&&(f.location.href=this.Mc.link)},i.Uu=function(t){this.hc.el().classList.add(t)},i.Lu=function(t){this.hc.el().classList.remove(t)},i.Hc=function(t,i){var n=t>=i&&!(this.qc&&this.qc.zc);this.Pc.du&&!n?this.Lc():!this.Pc.du&&n&&this.Vc()},i.Wc=function(t,i){this.Ou.du&&t\n\t\n\t\t\n\t\n\t\n\t\t\n\t\n\t\n\t\t\n\t\n\n',r.appendChild(e);var s=v.createElement("div");return s.className="theo-context-version",Ux(s,"Powered by THEOplayer 10.3.0"),r.appendChild(s),r.href="https://www.theoplayer.com/player-referral",r.target="Xu",i.appendChild(n),i},n.Qc=function(t){var i=t;i.preventDefault(),this.show(),this.el().style.left="0",this.el().style.top="0";var n=this.player().contentEl(),r=n.getClientRects(),e=r.length>0?r[0]:void 0,s=i.clientX-n.getBoundingClientRect().left,u=S(getComputedStyle(this.el()).fontSize);Lx(this.el(),s,e,u);var o=i.clientY-n.getBoundingClientRect().top;!function(t,i,n,r){void 0===r&&(r=0),Fx(t,i,"top","bottom",n,r)}(this.el(),o,e,u),this.Yc()},n.Kc=function(){this.hide(),this.clearTimeout(this.Zc)},n.Yc=function(){this.Zc=this.setTimeout(this.Kc,4e3)},n.tl=function(){this.clearTimeout(this.Zc)},n.dispose=function(){this.Kc(),this.off(this.player(),"contextmenu",this.Qc),this.el().removeEventListener("mousedown",Mat,!0),this.off(v,"mousedown",this.Kc),this.off("mouseout",this.Yc),this.off("mouseover",this.tl),t.prototype.dispose.call(this)},i}($ut.getComponent("Component"));function Mat(t){t.stopPropagation()}Qtt(function(t){var i=new Oat(t.vo,{});t.vo.addChild(i),t.vo.on("dispose",function(){t.vo.removeChild(i),i.dispose()})}),V(),It(),V(),It(),V(),It(),Dt(),Ut(),V(),It();var Lat={Default:"","Monospaced Serif":ex.il,"Proportional Serif":ex.sl,"Monospaced Sans-Serif":ex.nl,"Proportional Sans-Serif":ex.rl},Fat={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},Uat=[50,75,100,150,200];function Vat(t){return{label:t+"%",value:t}}function jat(t){return b.keys(t).map(function(i){return{label:i,value:t[i]}})}Uat.map(function(t){return{label:t+"%",value:t/100+"em"}});var Hat=Uat.map(function(t){return{label:t+"%",value:t+"%"}}),Wat=[25,50,75,100].map(Vat),zat=[0,25,50,75,100].map(Vat),qat=jat(Fat),Xat=jat(Lat),Gat=jat({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Qat=100,Yat="#000000",$at="#FFFFFF",Kat="#000000";V(),It(),Dt(),Ut();var Jat=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i.subMenu)||this).al=void 0,s.Vr=void 0,s.ol=void 0,s.Or=void 0,s.ml=void 0,s.pl=void 0,s.fl=void 0,s.se=void 0,s.al=i,s.Vr=e,s.pl="",s.se=function(){var t=s.Vr.localize(s.ol);Ux(s.al.subMenu.menuHeader.el(),t),Ux(s.Or,t),s.vl(s.pl);for(var i,n=Ft(s.Nr);!(i=n()).done;){var r=i.value;s.Rr(r)}},s.ol=n,s.fl=r.gl,s.ml=s.hl(),s.jr=r.yl,s.Vr.on("languagechange",s.se),s}Pt(i,t);var n=i.prototype;return n.hl=function(){var t=this.Vr.localize(this.ol);Ux(this.al.subMenu.menuHeader.el(),t),this.Or=v.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",Ux(this.Or,t);var i=v.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",hn(this.al.el(),"theo-subtitle-options-menu-item"),this.al.el().appendChild(this.Or),this.al.el().appendChild(i),i},n.cl=function(t){var i=this.Er(t);i&&this.ll(i)},n.dl=function(){return this.jr},n.Fr=function(t){this.fl(t.Br)},n.ll=function(t){for(var i,n=Ft(this.Pr.menuItems);!(i=n()).done;){i.value.selected(!1)}t?(t.selected(!0),this.vl(t.Br.label)):this.vl("Custom")},n.vl=function(t){this.pl=t,Ux(this.ml,this.Vr.localize(t)),this.al.parentMenu.oe()},n.Ir=function(i){var n=t.prototype.Ir.call(this,i);return hn(n.el(),"theo-subtitle-options-menu-item"),this.Rr(n),n},n.Rr=function(t){var i=this.Vr.localize(t.Br.label);Ux(t.el(),i);var n=this.Vr.localize("Set "+this.ol+" to ")+i;t.el().setAttribute("aria-label",n)},n.Oe=function(){this.Vr.off("languagechange",this.se),t.prototype.Oe.call(this)},i}(tht);V(),It();var Zat=function(){function t(i){var n=this;this.kl=void 0,this.wl=void 0,this._l=void 0,this.xl=void 0,this.Cl=void 0,this.Sl=void 0,this.jl=void 0,this.Tl=void 0,this.Ml=void 0,this.Al=void 0,this.Pl=void 0,this.Nl=void 0,this.El=void 0,this.Bl=void 0,this.Il=void 0,this.Fl=void 0,this.kl=i,this.Tl=function(t){n.kl.fontFamily=t.value},this.Ml=function(t){n.kl.fontSize=t.value},this.Al=function(i){n.wl=i.value,n.kl.fontColor=t.bl(n._l,n.wl,$at,Qat)},this.Pl=function(i){n._l=i.value,n.kl.fontColor=t.bl(n._l,n.wl,$at,Qat)},this.Nl=function(i){n.Cl=i.value,n.kl.backgroundColor=t.bl(n.Cl,n.xl,Yat,Qat)},this.El=function(i){n.xl=i.value,n.kl.backgroundColor=t.bl(n.Cl,n.xl,Yat,Qat)},this.Bl=function(i){n.jl=i.value,n.kl.windowColor=t.bl(n.jl,n.Sl,Kat,Qat)},this.Il=function(i){n.Sl=i.value,n.kl.windowColor=t.bl(n.jl,n.Sl,Kat,Qat)},this.Fl=function(t){n.kl.edgeStyle=t.value}}return t.bl=function(t,i,n,r){if(void 0!==t||void 0!==i)return function(t,i){return function(t){return t?"rgba("+t.Jtt+", "+t.Ztt+", "+t.$tt+", "+t.Ul+")":void 0}(sx(ux(t),i/100))}(void 0===t?n:t,void 0===i?r:i)},t}();V(),It();var tct=function(){function t(t,i){var n=this;this.kl=void 0,this.Ol=void 0,this.Vl=void 0,this.kl=t,this.Ol=i,this.Vl=function(){var t=n.kl.fontFamily;n.Dl(t,n.Ol["Font family"]);var i=n.kl.fontColor;n.Rl(i,n.Ol["Font color"],n.Ol["Font opacity"]);var r=n.kl.fontSize;n.Dl(r,n.Ol["Font size"]);var e=n.kl.backgroundColor;n.Rl(e,n.Ol["Background color"],n.Ol["Background opacity"]);var s=n.kl.windowColor;n.Rl(s,n.Ol["Window color"],n.Ol["Window opacity"]);var u=n.kl.edgeStyle;n.Dl(u,n.Ol["Character edge style"])},this.kl.addEventListener("change",this.Vl),this.Vl()}var i=t.prototype;return i.Dl=function(t,i){var n=this.$l(t,i.dl());n&&i.cl(n)},i.$l=function(t,i){return Wn(i,function(i){return i.value===t})},i.Rl=function(t,i,n){var r,e;if(void 0===t)r=this.$l(void 0,i.dl()),e=this.$l(void 0,n.dl());else if(t){var s=function(t){var i=hx(t);i||(i=hx(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=sx(ux(t),1));if(!i){var n=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=sx(ux(Fat[n]),1)}return i}(t);if(s){var u=function(t){return"#"+ox(t.Jtt)+ox(t.Ztt)+ox(t.$tt)}(s),o=100*s.Ul;r=this.$l(u,i.dl()),e=this.$l(o,n.dl())}}r&&i.cl(r),e&&n.cl(e)},t}();var ict=function(t){function i(i,n,r,e){var s;return(s=t.call(this,i.subMenu)||this).Jr=void 0,s.Gl=void 0,s.Vr=void 0,s.Hl=void 0,s.Jl=void 0,s.Wl=void 0,s.Ol=void 0,s.Or=void 0,s.zl=void 0,s.Xl=void 0,s.se=void 0,s.Jr=i,s.Gl=n,s.Vr=e,s.Ol={},s.Xl=function(){s.Gl.some(function(t){return fy(t.kind)})?s.Jr.show():s.Jr.hide()},s.se=function(){Ux(s.Pr.menuHeader.el(),s.Vr.localize("Subtitle Options")),Ux(s.Or,s.Vr.localize("Subtitle")),Ux(s.zl,s.Vr.localize("Options")),s.Jr.el().setAttribute("aria-label",s.Vr.localize("Open the subtitle options menu"))},s.Hl=new Zat(r),s.Wl=s.Ll(),s.jr=b.keys(s.Wl),s.ql(),s.Jl=new tct(r,s.Ol),s.Vr.on("languagechange",s.se),s.Gl.addEventListener(["addtrack","removetrack"],s.Xl),s.Xl(),s}Pt(i,t);var n=i.prototype;return n.Ll=function(){return{"Font family":{yl:nct(Xat),gl:this.Hl.Tl},"Font color":{yl:nct(qat),gl:this.Hl.Pl},"Font opacity":{yl:nct(Wat),gl:this.Hl.Al},"Font size":{yl:nct(Hat),gl:this.Hl.Ml},"Background color":{yl:nct(qat),gl:this.Hl.Nl},"Background opacity":{yl:nct(zat),gl:this.Hl.El},"Window color":{yl:nct(qat),gl:this.Hl.Bl},"Window opacity":{yl:nct(zat),gl:this.Hl.Il},"Character edge style":{yl:nct(Gat),gl:this.Hl.Fl}}},n.ql=function(){this.Or=v.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",this.zl=v.createElement("span"),this.zl.className="theo-primary-color theo-settings-control-menu-item-value",this.Jr.el().appendChild(this.Or),this.Jr.el().appendChild(this.zl),this.se()},n.Ir=function(t){var i=this.Pr.addSubMenuItem();return i.Br=t,this.Ol[t]=new Jat(i,t,this.Wl[t],this.Vr),i},n.Rr=function(t){},n.Fr=function(t){},n.Oe=function(){this.Vr.off("languagechange",this.se),this.Gl.removeEventListener(["addtrack","removetrack"],this.Xl),t.prototype.Oe.call(this)},i}(tht);function nct(t){for(var i,n=[{label:"Default",value:void 0}],r=Ft(t);!(i=r()).done;){var e=i.value;"Default"!==e.label&&n.push(e)}return n}Qtt(function(t){var i=t.vo.controlBar.getChild("SettingsButton").menu,n=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),r=new ict(n,t.nt.Ca,t.Ql.Ca,t.vo);t.vo.on("dispose",function(){i.removeMenuItem(n),n.dispose(),r.Oe(),i.dispose()})}),V(),It(),V(),It(),Dt();var rct=$ut.getComponent("Component"),ect=function(t){function i(i,n){var r;return r=t.call(this,i,n)||this,i.adControlBar=r,r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-ad-control-panel"},n.createEl=function(){var i=t.prototype.createEl.call(this);return i.className=this.buildCSSClass(),i},i}(rct);ect.prototype.h=io({},rct.prototype.h,{children:[]}),$ut.registerComponent("AdControlPanel",ect),V(),It(),V(),It(),Dt();var sct=$ut.getComponent("Component"),uct="theo-dai-countdown",oct=function(t){function i(i,n,r){var e;return(e=t.call(this,i,r)||this).oa=void 0,e.hu=void 0,e.bo=void 0,e.se=void 0,e.oa=i,e.hu=n,e.se=function(){var t=e.hu.ads;t.playing&&t.currentAdBreak&&t.currentAds.length&&Ux(e.contentEl(),function(t,i,n){var r=t.ads,e="",s=r.length;if(s>1){var u=r.indexOf(i)+1;e=n("Ad")+" "+u+"/"+s+". "}var o=A.ceil(t.maxRemainingDuration);return e+=n("The content will resume in {1} seconds.").replace("{1}",""+o),e}(t.currentAdBreak,t.currentAds[0],function(t){return e.oa.localize(t)}))},e.bo=i.el(),e.Yl(n,n.ads),e.on(i,"languagechange",e.se),e}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return uct},n.createEl=function(t,i,n){var r=v.createElement("div");return r.className=uct,r},n.Yl=function(t,i){var n=this;i.addEventListener("adbreakbegin",function(){return n.show()}),i.addEventListener("adbreakend",function(){return n.hide()}),t.addEventListener("timeupdate",this.se)},i}(sct);V(),It(),Dt();var hct=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).bo=void 0,r.hu=void 0,Ux(r.el(),i.localize("Learn more")),r.hu=n.Ca,r.bo=i.el(),r.on(i,"languagechange",r.se),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return h8},n.createEl=function(t,i,n){return this.h.Ca.element.querySelector("."+h8)},n.emitTapEvents=function(){},n.se=function(){Ux(this.el(),this.localize("Learn more"))},i}($ut.getComponent("ClickableComponent"));function act(t,i){return!i||"object"!==W(i)&&"function"!=typeof i?sW(t):i}Qtt(function(t){if(t.Ca.ads&&t.Kl){var i=t.vo,n=new oct(i,t.Ca);if(i.adControlBar.addChild(n),t.Ca.element.querySelector("."+h8)){var r=new hct(i,{Ca:t.Ca});i.adControlBar.addChild(r)}}}),V(),It(),V(),It(),Dt(),V(),It(),ft();var cct=$ut.getComponent("Component"),fct=["addtrack","removetrack","change"],vct=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).qualityLabel=void 0,r.Yr=void 0,r.startFadeOutID=void 0,r.removeLabelClassesID=void 0,r.dh=function(){var t=$ot(r.xs.videoTracks);t!==r.Yr&&(r.Yr&&r.Yr.removeEventListener("activequalitychanged",r.Zl),r.Yr=t,t&&t.addEventListener("activequalitychanged",r.Zl),r.Zl())},r.Zl=function(){var t=r.Yr&&r.Yr.activeQuality;if(r.qualityLabel&&t){var i=t.label?t.label:t.height?t.height+"p":void 0;i&&(Ux(r.qualityLabel,i),r.addClass("theo-quality-label-show"),r.hideActiveQualityLabel())}},r.hideActiveQualityLabel=function(){r.resetTimeout(),r.startFadeOutID=r.setTimeout(r.fadeoutLabel,3750),r.removeLabelClassesID=r.setTimeout(r.hideLabel,4e3)},r.resetTimeout=function(){r.startFadeOutID&&r.clearTimeout(r.startFadeOutID),r.removeLabelClassesID&&r.clearTimeout(r.removeLabelClassesID)},r.fadeoutLabel=function(){r.addClass("theo-quality-label-fadeout")},r.hideLabel=function(){r.removeClass("theo-quality-label-show"),r.removeClass("theo-quality-label-fadeout")},t.prototype.addClass.call(sW(r),"theo-quality-label"),r.xs.videoTracks?(r.xs.videoTracks.addEventListener(fct,r.dh),r.dh(),r):act(r)}Pt(i,t);var n=i.prototype;return n.createEl=function(){var i=t.prototype.createEl.call(this);return this.qualityLabel=$ut.createEl("div",{className:"theo-quality-label-text"}),i.appendChild(this.qualityLabel),wn(this.qualityLabel),i},n.dispose=function(){this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.Zl),this.Yr=void 0),this.xs.videoTracks.removeEventListener(fct,this.dh),t.prototype.dispose.call(this)},i}(eot(cct));$ut.registerComponent("activeQualityLabel",vct),V(),It(),V(),It(),Dt();var dct="theo-upcoming-ad-notification",lct=["adbreakbegin","adbreakend","adadded","adloaded","adbegin","adend"],gct=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).currentAdBreak=void 0,r.currentAdBreakValid=!1,r.rd=NaN,r.handleTimeUpdate=function(){r.sd()},r.handleAdEvent=function(){r.td(),r.sd()},r.xs.ads?(r.hide(),r.xs.addEventListener("timeupdate",r.handleTimeUpdate),r.xs.ads.addEventListener(lct,r.handleAdEvent),r):act(r)}Pt(i,t);var n=i.prototype;return n.createEl=function(){var t=$ut.createEl("div",{className:dct});return this.notificationText=$ut.createEl("div",{className:dct+"text"}),t.appendChild(this.notificationText),t},n.td=function(){if(this.xs.ads){for(var t,i=this.xs.ads.scheduledAdBreaks,n=1/0,r=0;rt+10)this.ed();else{var i=A.ceil(this.currentAdBreak.timeOffset-t);i<0?this.ed():this.nd(i)}}else this.ed()},n.nd=function(t){this.rd!==t&&(Ux(this.notificationText,"Your video will be temporarily interrupted in 0:"+(t<10?"0"+t:t)),this.rd=t,this.show())},n.ed=function(){this.rd=NaN,this.hide()},n.dispose=function(){var i;this.xs.removeEventListener("timeupdate",this.handleTimeUpdate),null==(i=this.xs.ads)||i.removeEventListener(lct,this.handleAdEvent),this.currentAdBreak=void 0,t.prototype.dispose.call(this)},i}(eot(Eot));$ut.registerComponent("upcomingAdNotificationText",gct),V(),It(),V(),It(),Bt(),Dt();var wct=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).ad=function(){r.se(r.player().currentTime(),r.el())},r.on(i,"timeupdate",r.ad),r}Pt(i,t);var n=i.prototype;return n.createEl=function(){var t=v.createElement("div");return t.className="theoplayer-ad-overlay-component theo-ad-remaining-container",t},n.se=function(t,i){if(this.od&&this.od.endTime){var n=A.max(this.od.endTime-t,0);Ux(i,"Content will resume in "+A.ceil(n)+"s"),this.show()}else this.hide()},xt(i,[{key:"od",get:function(){return this.h.adBreakProvider()}}]),i}($ut.getComponent("Component"));$ut.registerComponent("UplynkAdBreakBar",wct),V(),It(),Bt(),Dt();var mct=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).ad=function(){r.se(r.el(),r.ud)},r.on(i,"timeupdate",r.ad),r}Pt(i,t);var n=i.prototype;return n.createEl=function(){var t=v.createElement("div");return t.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.ud=v.createElement("span"),t.appendChild(this.ud),this.se(t,this.ud),t},n.handleClick=function(){this.h.skipCallback()},n.se=function(t,i){this.ld<=Am.fd.dd?(an(t,"theoplayer-ad-skip-countdown"),hn(t,"theoplayer-ad-skip-button"),Ux(i,"Skip ads")):Ux(i,"Skip ads in "+A.ceil(this.ld)+"s")},xt(i,[{key:"ld",get:function(){return this.h.adBreak.startTime+this.h.adBreak.skipOffset-this.player().currentTime()}}]),i}($ut.getComponent("ClickableComponent"));$ut.registerComponent("UplynkAdSkipButton",mct),V(),It(),Dt(),V(),It(),Dt();var pct=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-uplynk-marker-bar"},n.createEl=function(t,i,n){var r=v.createElement("div");return r.className=this.buildCSSClass(),r},i}($ut.getComponent("Component")),yct=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" theo-uplynk-marker-bar-adbreak"},i}(pct);$ut.registerComponent("UplynkAdBreakMarkerBar",yct),V(),It(),Dt(),V(),It(),Bt(),Dt();var _ct=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-uplynk-marker"},n.createEl=function(t,i,n){var r=v.createElement("div");r.className=this.buildCSSClass();var e=this.seekable.start(0),s=this.seekable.end(this.seekable.length-1),u=A.max(this.startTime-e,0),o=void 0!==this.endTime?A.max(s-this.endTime,0):0,h=s-e;return r.style.left=u/h*100+"%",r.style.right=o/h*100+"%",r},xt(i,[{key:"startTime",get:function(){return this.h.startTime}},{key:"endTime",get:function(){return this.h.endTime}},{key:"seekable",get:function(){return this.player().seekable()}}]),i}($ut.getComponent("Component")),kct=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" theo-uplynk-marker-adbreak"},i}(_ct);$ut.registerComponent("UplynkAdBreakMarker",kct),V(),It(),Dt();var bct=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" theo-uplynk-marker-bar-asset"},i}(pct);$ut.registerComponent("UplynkAssetMarkerBar",bct),V(),It(),Dt();var Act=function(t){function i(){return t.apply(this,arguments)||this}return Pt(i,t),i.prototype.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" theo-uplynk-marker-asset"},i}(_ct);$ut.registerComponent("UplynkAssetMarker",Act),V(),It(),Dt();var Tct=function(t){function i(i,n){return t.call(this,i,n)||this}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){var t="theo-uplynk-content-notification-bar";return t+(Oi.ru||Oi.vd?" "+t+"-ios":"")},n.createEl=function(t,i,n){var r=v.createElement("div");return r.className=this.buildCSSClass(),r},i}($ut.getComponent("Component"));$ut.registerComponent("UplynkContentNotificationBar",Tct),V(),It(),Bt(),Dt();var Sct=$ut.getComponent("Component"),Ect=function(t){function i(i,n){var r;return(r=t.call(this,i,n)||this).md=void 0,r.wo(),r.on(i,"timeupdate",r.bd),r.hide(),r}Pt(i,t);var n=i.prototype;return n.buildCSSClass=function(){return"theo-uplynk-content-notification"},n.createEl=function(t,i,n){var r=v.createElement("div");return r.className=this.buildCSSClass(),r},n.wo=function(){var t=v.createElement("img");t.src=this.pd.posterUrl,t.className=this.buildCSSClass()+"-thumbnail",this.el().appendChild(t);var i=v.createElement("div");i.className=this.buildCSSClass()+"-description";var n=function(t){return"Next: "+t}(this.pd.description);Ux(i,n),this.el().appendChild(i),this.md=v.createElement("div"),this.md.className=this.buildCSSClass()+"-countdown",Ux(this.md,this.gd),this.el().appendChild(this.md)},n.bd=function(){var t=this.yd;t>10||t<=0?this.hide():(Ux(this.md,this.gd),this.show())},xt(i,[{key:"pd",get:function(){return this.h.asset}},{key:"gd",get:function(){var t=A.min(10,this.yd);return"Starting in "+A.ceil(t)+" seconds"}},{key:"yd",get:function(){return A.max(0,this.pd.startTime-this.player().currentTime())}}]),i}(Sct);function Ict(t,i){var n=t.uplynk;return Boolean(t&&void 0===n)||Boolean(t&&n&&void 0===n.ui)||Boolean(t&&n&&n.ui&&void 0===n.ui[i])||Boolean(t&&n&&n.ui&&!0===n.ui[i])}return $ut.registerComponent("UplynkContentNotification",Ect),V(),It(),Bt(),Dt(),Xtt(function(t){return function(t){function i(i,n,r){var e;(e=t.call(this,i,n,r)||this).wd=!1,e.Pd=function(){e.wd=!0,isFinite(e.Nd())||e.Ca.addEventListener("timeupdate",e._d),e._d(),e.xd(),e.Sd()},e.jd=function(t){t.adBreak.addEventListener("adbreakbegin",e.Ed),t.adBreak.addEventListener("adbreakend",e.Bd),e._d()},e.Td=function(t){t.adBreak.removeEventListener("adbreakbegin",e.Ed),t.adBreak.removeEventListener("adbreakend",e.Bd),e._d()},e._d=function(){if(function(t){return Ict(t,"adBreakMarkers")}(e.Cd)&&e.wd){var t=e.Ca.uplynk,i=null==t?void 0:t.ads.adBreaks.map(function(t){return{name:"UplynkAdBreakMarker",startTime:t.startTime,endTime:t.endTime}});e.kd.removeChild("UplynkAdBreakMarkerBar"),e.kd.addChild("UplynkAdBreakMarkerBar",{children:i})}},e.Ed=function(){if(function(t){return Ict(t,"adNotification")}(e.Cd)){var t=e.Ca.uplynk,i=t.ads.currentAdBreak;e.vo.addChild("UplynkAdBreakBar",{adBreakProvider:e.Id}),-1!==i.skipOffset&&e.vo.addChild("UplynkAdSkipButton",{adBreak:i,skipCallback:t.ads.skip})}},e.Id=function(){return e.Ca.uplynk.ads.currentAdBreak},e.Bd=function(){e.vo.removeChild("UplynkAdBreakBar"),e.vo.removeChild("UplynkAdSkipButton")},e.Md=function(){e.xd(),e.Sd()};var s=e.Ca.uplynk;return null==s||s.ads.adBreaks.addEventListener("addadbreak",e.jd),null==s||s.ads.adBreaks.addEventListener("removeadbreak",e.Td),null==s||s.assets.addEventListener("addasset",e.Md),null==s||s.assets.addEventListener("removeasset",e.Md),e.Ca.addEventListener("loadeddata",e.Pd),e}Pt(i,t);var n=i.prototype;return n.Ta=function(i){this.wd=!1,this.Ca.removeEventListener("timeupdate",this._d),this.vo.removeChild("UplynkAdBreakBar"),this.vo.removeChild("UplynkAdSkipButton"),this.kd.removeChild("UplynkAdBreakMarkerBar"),this.kd.removeChild("UplynkAssetMarkerBar"),this.vo.removeChild("UplynkContentNotificationBar"),t.prototype.Ta.call(this,i)},n.xd=function(){if(function(t){return Ict(t,"assetMarkers")}(this.Cd)&&this.wd){var t=this.Ca.uplynk.assets.map(function(t){return{name:"UplynkAssetMarker",startTime:t.startTime,endTime:t.endTime}});this.kd.removeChild("UplynkAssetMarkerBar"),this.kd.addChild("UplynkAssetMarkerBar",{children:t})}},n.Sd=function(){if(function(t){return Ict(t,"contentNotification")}(this.Cd)){var t=this.Ca.uplynk.assets.map(function(t){return{name:"UplynkContentNotification",asset:t}});this.vo.removeChild("UplynkContentNotificationBar"),this.vo.addChild("UplynkContentNotificationBar",{children:t})}},n.kn=function(){this.Ca.removeEventListener("timeupdate",this._d);var i=this.Ca.uplynk;null==i||i.ads.adBreaks.removeEventListener("addadbreak",this.jd),null==i||i.ads.adBreaks.removeEventListener("removeadbreak",this.Td),null==i||i.assets.removeEventListener("addasset",this.Md),null==i||i.assets.removeEventListener("removeasset",this.Md),this.Ca.removeEventListener("loadeddata",this.Pd),t.prototype.kn.call(this)},xt(i,[{key:"kd",get:function(){return this.vo.controlBar.progressControl.seekBar}}]),i}(t)}),c.exports}); //# sourceMappingURL=THEOplayer.js.map \ No newline at end of file diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.transmux.asmjs.js b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.transmux.asmjs.js index d5f21851..3a902a1c 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.transmux.asmjs.js +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.transmux.asmjs.js @@ -24,8 +24,8 @@ THEOplayer is based on patented technology developed by THEO Technologies (https://www.theoplayer.com). - Version: 10.0.0 - Created: 2025-09-12T12:50:32.290Z + Version: 10.3.0 + Created: 2025-10-23T15:33:11.023Z */ -!function(r){"use strict";var e,i,A,f,n,a,t,b,k,u=r.window,o=r.document,c=(r.location,r.navigator),s=r.setTimeout,l=r.clearTimeout,h=r.setInterval,v=r.clearInterval,d=r.Error,w=r.TypeError,g=(r.SyntaxError,r.Object),y=r.Math,B=r.parseInt,E=r.parseFloat,_=r.isNaN,I=r.Uint8Array;r.Worker,r.WorkerGlobalScope,r.XMLHttpRequest;function Q(r,i){return null!=i&&void 0!==e&&i[e.hasInstance]?!!i[e.hasInstance](r):r instanceof i}function N(r){return r&&void 0!==e&&r.constructor===e?"symbol":typeof r}"function"==typeof Symbol&&Symbol.iterator?(e=Symbol,i=null!=(a=Symbol.for)?a:Symbol,A=Symbol.iterator,f=null!=(t=Symbol.dispose)?t:i("Symbol.dispose"),n=null!=(b=Symbol.asyncDispose)?b:i("Symbol.asyncDispose")):(k=0,e=function(r){return"hd"+r+"_"+ ++k},A=(i=function(r){return"hd"+r})("Symbol.iterator"),f=i("Symbol.dispose"),n=i("Symbol.asyncDispose"),e.for=i,e.iterator=A,e.dispose=f,e.asyncDispose=n);var R=s;function C(r){return Boolean(r&&void 0!==r.length)}function p(){}function m(r){if(!Q(this,m))throw new w("Promises must be constructed via new");if("function"!=typeof r)throw new w("not a function");this.Ra=0,this.ttn=!1,this.lTt=void 0,this.ntn=[],F(r,this)}function G(r,e){for(;3===r.Ra;)r=r.lTt;0!==r.Ra?(r.ttn=!0,m.itn(function(){var i=1===r.Ra?e.onFulfilled:e.onRejected;if(null!==i){var A;try{A=i(r.lTt)}catch(r){return void W(e.promise,r)}Y(e.promise,A)}else(1===r.Ra?Y:W)(e.promise,r.lTt)})):r.ntn.push(e)}function Y(r,e){try{if(e===r)throw new w("A promise cannot be resolved with itself.");if(e&&("object"===(void 0===e?"undefined":N(e))||"function"==typeof e)){var i=e.then;if(Q(e,m))return r.Ra=3,r.lTt=e,void D(r);if("function"==typeof i)return void F(function(r,e){return function(){r.apply(e,arguments)}}(i,e),r)}r.Ra=1,r.lTt=e,D(r)}catch(e){W(r,e)}}function W(r,e){r.Ra=2,r.lTt=e,D(r)}function D(r){2===r.Ra&&0===r.ntn.length&&m.itn(function(){r.ttn||m.rtn(r.lTt)});for(var e=0,i=r.ntn.length;er.length)&&(e=r.length);for(var i=0,A=new Array(e);i=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new w("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}T&&!(Z&&L<60||V&&X<15)?$=T:($=m,fr=null!==(q=function(){var r=self.queueMicrotask;if("function"==typeof r)return function(e){return r(e)};var e=T;if(e&&"function"==typeof e.resolve){var i=e.resolve();return function(r){return i.then(r)}}}())&&void 0!==q?q:m.itn,rr=fr,er=new J(16),ir=!1,(nr={M6:function(r){er.push(r),ir||(ir=!0,rr(Ar))},AQ:Ar=function(){for(;er.length()>0;)er.shift()();ir=!1}}).AQ,m.itn=nr.M6,m.rtn=function(r){try{var e=ar(r);if(!self.dispatchEvent(e)||e.defaultPrevented)return}catch(r){}s(function(){throw new d("Unhandled promise rejection: ".concat(r))},0)});var sr=function(r){return r.Sv="web",r.Tv="android",r.Ev="android-tv",r.Pv="ios",r.xv="tvos",r.Iv="chromecast",r.Rv="theoliveweb",r}({});var lr=c?c.userAgent:"",hr=lr.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),vr=lr.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),dr=lr.match(/Android ([0-9\.]+)/i),wr=lr.match(/Windows NT ([0-9\.]+)/i),gr=lr.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),yr=lr.match(/Firefox\/([0-9\.]+)/i),Br=lr.match(/OPR\/(\d+\.\d+)/i),Er=lr.match(/Tizen ([0-9\.]+)/i),_r=lr.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Ir=lr.match(/HbbTV\/([0-9.]+)/i),Qr=lr.match(/(AFT.*) Build/i),Nr=function(){function r(){this.Cv=Boolean("ontouchstart"in self||self.DocumentTouch&&Q(o,self.DocumentTouch)||c&&c.msMaxTouchPoints),this.Bv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(lr)||/(macintosh|mac(?=_powerpc)\s)/i.test(lr),this.Mv=/Windows NT/i.test(lr),this.Ov=wr?E(wr[1]):0,this.Uv=/Android/i.test(lr),this.Hv=dr?E(dr[1]):0,this.qv=/windows phone (8|8\.1)/i.test(lr),this.Gv=/iPhone/i.test(lr),this.Qv=/iPad/i.test(lr),this.Yv=this.Bv&&this.Cv&&!this.Qv,this.Zv=/iPod/i.test(lr),this.r_=/Mobile Safari/i.test(lr),this.s_=/EOS\d*STB/i.test(lr),this.n_=/APP\d*STB/i.test(lr),this.$v=(this.Gv||this.Qv||this.Yv||this.Zv)&&!this.qv,this.i_=_r?E(_r[2]):0,this.h_=this.qv||this.$v||this.Uv||this.r_,this.a_=/CriOS/i.test(lr),this.c_=Boolean(self.chrome&&/google/i.test(c.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(c.userAgent),this.p_=vr?B(vr[1],10):0,this.Bg=Boolean(/CriOS/i.test(lr)),this.Dg=Boolean(self.chrome||/Chrome/i.test(lr)||this.Bg),this.f_=hr?B(hr[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(lr),this.b_=Er?E(Er[1]):0,this.l_=this.b_>0?function(r){return r>=8?108:r>=7?94:r>=6.5?85:r>=6?76:r>=5.5?69:r>=5?63:r>=4?56:r>=3?47:0}(this.b_):void 0,this.T_=/webos|web0s/i.test(lr),this.E_=/HbbTV/i.test(lr),this.x_=!!Ir&&function(r){if(!r)return!1;var e=r.split(".").map(Number);return 3===e.length&&1===e[0]&&2===e[1]}(Ir[1]),this.R_=/AFT.* Build/i.test(lr),this.C_=Qr?Qr[1]:void 0,this.B_=/VIZIO/i.test(lr),this.M_=/Edge\/\d+/i.test(lr),this.O_=/Trident/i.test(lr),this.U_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.H_=/Vivaldi/i.test(lr),this.q_=/Firefox/i.test(lr)&&!/Seamonkey/i.test(lr),this.G_=yr?E(yr[1]):0,this.j_=/Safari/i.test(lr)&&!/Chrome/i.test(lr)&&!this.qv&&!this.y_,this.K_=gr?E(gr[2]):0,this.J_=Boolean(Br),this.eg=Br?E(Br[1]):0,this.hg=/CrKey/.test(lr),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(lr),this.fg=/PlayStation 4/i.test(lr),this._g=/PlayStation 5/i.test(lr),this.pg="web"===sr.Ev,this.yg="web"===sr.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===sr.Pv,this.xg="web"===sr.xv,this.Rg="web"===sr.Iv}return ur(r,[{key:"Ke",get:function(){return this.Cv}},{key:"Dv",get:function(){return this.Bv}},{key:"Nv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Ov}},{key:"Fv",get:function(){return this.Uv}},{key:"Vv",get:function(){return this.Hv}},{key:"Wv",get:function(){return this.qv}},{key:"zv",get:function(){return this.Gv}},{key:"Xv",get:function(){return this.Qv}},{key:"Kv",get:function(){return this.Yv}},{key:"Jv",get:function(){return this.Zv}},{key:"ru",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"e_",get:function(){return this.s_||this.n_}},{key:"vd",get:function(){return this.r_}},{key:"Ks",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"d_",get:function(){var r;return null!=(r=this.l_)?r:this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){var r;return(null==(r=u.chrome)?void 0:r.webview)&&this.p_>0}},{key:"m_",get:function(){return this.p_}},{key:"w_",get:function(){return this.y_}},{key:"A_",get:function(){return this.b_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"P_",get:function(){return this.x_}},{key:"I_",get:function(){return this.R_}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.C_}},{key:"D_",get:function(){return this.B_}},{key:"N_",get:function(){return this.M_}},{key:"L_",get:function(){return this.O_}},{key:"F_",get:function(){return this.U_}},{key:"V_",get:function(){return this.H_}},{key:"W_",get:function(){return this.q_}},{key:"z_",get:function(){return this.G_}},{key:"X_",get:function(){return this.j_}},{key:"Q_",get:function(){return 0===this.K_&&Rr.ru?this.i_:this.K_}},{key:"Y_",get:function(){return this.J_}},{key:"Z_",get:function(){return this.eg}},{key:"rg",get:function(){return this.hg}},{key:"og",get:function(){return this.ag}},{key:"cg",get:function(){return!(!this.S_&&!this.w_)&&this.d_<=56}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"Pg",get:function(){return this.xg}},{key:"Ig",get:function(){return this.Rg}},{key:"Cg",get:function(){return this.Dg}},{key:"IS_IOS_CHROME",get:function(){return this.Bg}}]),r}();Nr.Ng=new Nr;var Rr=Nr.Ng,Cr={}.toString;function pr(r){return null!=r}Array.isArray;function mr(r){return"object"===(void 0===r?"undefined":N(r))&&null!==r}function Gr(r){return function(r){return"function"==typeof r}(r)||mr(r)}var Yr=function(){};function Wr(r){var e;return function(){return void 0!==r&&(e=r(),r=void 0),e}}function Dr(r,e,i,A,f,n,a){try{var t=r[n](a),b=t.value}catch(r){return void i(r)}t.done?e(b):$.resolve(b).then(A,f)}function Sr(r,i){var f,n,a,t={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},b=g.create(("function"==typeof Iterator?Iterator:g).prototype);return b.next=k(0),b.throw=k(1),b.return=k(2),"function"==typeof e&&(b[A]=function(){return this}),b;function k(e){return function(A){return function(e){if(f)throw new w("Generator is already executing.");for(;b&&(b=0,e[0]&&(t=0)),t;)try{if(f=1,n&&(a=2&e[0]?n.return:e[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,e[1])).done)return a;switch(n=0,a&&(e=[2&e[0],a.value]),e[0]){case 0:case 1:a=e;break;case 4:return t.label++,{value:e[1],done:!1};case 5:t.label++,n=e[1],e=[0];continue;case 7:e=t.ops.pop(),t.trys.pop();continue;default:if(!(a=t.trys,(a=a.length>0&&a[a.length-1])||6!==e[0]&&2!==e[0])){t=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]=0;i-=1){if(e(r[i],i,r))return i}return-1};Array.prototype.at;function Mr(r,e){var i=r.indexOf(e);return-1!==i&&(function(r,e){0===e?r.shift():r.splice(e,1)}(r,i),!0)}function Or(r){r.length=0}Array.prototype.flat,Array.prototype.flatMap;var Zr=function(){function r(){this.Hg=!1,this.Wg=!1,this.qg=[],this.Gg=[]}var e=r.prototype;return e.Vg=function(){if(!this.Hg&&!this.Wg){this.Hg=!0;for(var r,e=cr(this.qg.slice());!(r=e()).done;){(0,r.value)()}this.zg()}},e.zg=function(){if(!this.Wg){this.Wg=!0;for(var r,e=cr(this.Gg.slice());!(r=e()).done;){(0,r.value)()}Or(this.qg),Or(this.Gg)}},e.Xg=function(r){this.Wg||this.qg.push(r)},e.jg=function(r){this.Wg||Mr(this.qg,r)},e.Qg=function(r){this.Wg||this.Gg.push(r)},e.Kg=function(r){this.Wg||Mr(this.Gg,r)},r}(),Lr=function(){function r(){this.Jg=new Zr}var e=r.prototype;return e.Zg=function(){this.Jg.Vg()},e.zg=function(){this.Jg.zg()},e.$g=function(r){var e=this.Jg;if(!e.Hg)if(r.Hg)e.Vg();else if(!e.Wg&&!r.Wg){var i=function(){A(),e.Vg()},A=function(){r.jg(i),r.Kg(A),e.jg(i),e.Kg(A)};r.Xg(i),r.Qg(A),e.Xg(i),e.Qg(A)}},e.tp=function(){var e=new r,i=new r,A=e.Yg,f=i.Yg,n=this.Jg,a=function(){A.Hg&&f.Wg||f.Hg&&A.Wg?n.Vg():A.Wg&&f.Wg&&n.zg()};A.Xg(a),f.Xg(a),A.Qg(a),f.Qg(a),e.$g(n),i.$g(n);return n.Qg(function(){A.jg(a),f.jg(a),A.Kg(a),f.Kg(a)}),[e,i]},e[f]=function(){this.Zg()},r.ep=function(e){for(var i,A=new r,f=cr(e);!(i=f()).done;){var n=i.value;void 0!==n&&A.$g(n)}return A},ur(r,[{key:"Yg",get:function(){return this.Jg}}]),r}(),Ur=function(){for(var r=arguments.length,e=new Array(r),i=0;i>>=0)&&r<256)&&(A=Kr[r])?A:(i=re(r,0,!0),f&&(Kr[r]=i),i):(f=-128<=(r|=0)&&r<128)&&(A=Pr[r])?A:(i=re(r,r<0?-1:0,!1),f&&(Pr[r]=i),i)}function $r(r,e){if(_(r))return e?ke:be;if(e){if(r<0)return ke;if(r>=ne)return le}else{if(r<=-ae)return he;if(r+1>=ae)return se}return r<0?$r(-r,e).neg():re(r%fe|0,r/fe|0,e)}function re(r,e,i){return new Hr(r,e,i)}Hr.fromInt=qr,Hr.fromNumber=$r,Hr.fromBits=re;var ee=y.pow;function ie(r,e,i){if(0===r.length)throw d("empty string");if("number"==typeof e?(i=e,e=!1):e=!!e,"NaN"===r||"Infinity"===r||"+Infinity"===r||"-Infinity"===r)return e?ke:be;if((i=i||10)<2||360)throw d("interior hyphen");if(0===A)return ie(r.substring(1),e,i).neg();for(var f=$r(ee(i,8)),n=be,a=0;a>>0:this.low},ve.toNumber=function(){return this.unsigned?(this.high>>>0)*fe+(this.low>>>0):this.high*fe+(this.low>>>0)},ve.toString=function(r){if((r=r||10)<2||36>>0).toString(r);if((n=t).isZero())return b+a;for(;b.length<6;)b="0"+b;a=""+b+a}},ve.getHighBits=function(){return this.high},ve.getHighBitsUnsigned=function(){return this.high>>>0},ve.getLowBits=function(){return this.low},ve.getLowBitsUnsigned=function(){return this.low>>>0},ve.getNumBitsAbs=function(){if(this.isNegative())return this.eq(he)?64:this.neg().getNumBitsAbs();for(var r=0!=this.high?this.high:this.low,e=31;e>0&&!(r&1<>21;return!r||!this.unsigned&&(-1===r&&!(0===this.low&&-2097152===this.high))},ve.isZero=function(){return 0===this.high&&0===this.low},ve.eqz=ve.isZero,ve.isNegative=function(){return!this.unsigned&&this.high<0},ve.isPositive=function(){return this.unsigned||this.high>=0},ve.isOdd=function(){return!(1&~this.low)},ve.isEven=function(){return!(1&this.low)},ve.equals=function(r){return jr(r)||(r=Ae(r)),(this.unsigned===r.unsigned||this.high>>>31!=1||r.high>>>31!=1)&&(this.high===r.high&&this.low===r.low)},ve.eq=ve.equals,ve.notEquals=function(r){return!this.eq(r)},ve.neq=ve.notEquals,ve.ne=ve.notEquals,ve.lessThan=function(r){return this.comp(r)<0},ve.lt=ve.lessThan,ve.lessThanOrEqual=function(r){return this.comp(r)<=0},ve.lte=ve.lessThanOrEqual,ve.le=ve.lessThanOrEqual,ve.greaterThan=function(r){return this.comp(r)>0},ve.gt=ve.greaterThan,ve.greaterThanOrEqual=function(r){return this.comp(r)>=0},ve.gte=ve.greaterThanOrEqual,ve.ge=ve.greaterThanOrEqual,ve.compare=function(r){if(jr(r)||(r=Ae(r)),this.eq(r))return 0;var e=this.isNegative(),i=r.isNegative();return e&&!i?-1:!e&&i?1:this.unsigned?r.high>>>0>this.high>>>0||r.high===this.high&&r.low>>>0>this.low>>>0?-1:1:this.sub(r).isNegative()?-1:1},ve.comp=ve.compare,ve.negate=function(){return!this.unsigned&&this.eq(he)?he:this.not().add(ue)},ve.neg=ve.negate,ve.add=function(r){jr(r)||(r=Ae(r));var e=this.high>>>16,i=65535&this.high,A=this.low>>>16,f=65535&this.low,n=r.high>>>16,a=65535&r.high,t=r.low>>>16,b=0,k=0,u=0,o=0;return u+=(o+=f+(65535&r.low))>>>16,k+=(u+=A+t)>>>16,b+=(k+=i+a)>>>16,b+=e+n,re((u&=65535)<<16|(o&=65535),(b&=65535)<<16|(k&=65535),this.unsigned)},ve.subtract=function(r){return jr(r)||(r=Ae(r)),this.add(r.neg())},ve.sub=ve.subtract,ve.multiply=function(r){if(this.isZero())return this;if(jr(r)||(r=Ae(r)),xr)return re(xr.mul(this.low,this.high,r.low,r.high),xr.get_high(),this.unsigned);if(r.isZero())return this.unsigned?ke:be;if(this.eq(he))return r.isOdd()?he:be;if(r.eq(he))return this.isOdd()?he:be;if(this.isNegative())return r.isNegative()?this.neg().mul(r.neg()):this.neg().mul(r).neg();if(r.isNegative())return this.mul(r.neg()).neg();if(this.lt(te)&&r.lt(te))return $r(this.toNumber()*r.toNumber(),this.unsigned);var e=this.high>>>16,i=65535&this.high,A=this.low>>>16,f=65535&this.low,n=r.high>>>16,a=65535&r.high,t=r.low>>>16,b=65535&r.low,k=0,u=0,o=0,c=0;return o+=(c+=f*b)>>>16,u+=(o+=A*b)>>>16,o&=65535,u+=(o+=f*t)>>>16,k+=(u+=i*b)>>>16,u&=65535,k+=(u+=A*t)>>>16,u&=65535,k+=(u+=f*a)>>>16,k+=e*b+i*t+A*a+f*n,re((o&=65535)<<16|(c&=65535),(k&=65535)<<16|(u&=65535),this.unsigned)},ve.mul=ve.multiply,ve.divide=function(r){if(jr(r)||(r=Ae(r)),r.isZero())throw d("division by zero");var e,i,A;if(xr)return this.unsigned||-2147483648!==this.high||-1!==r.low||-1!==r.high?re((this.unsigned?xr.div_u:xr.div_s)(this.low,this.high,r.low,r.high),xr.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?ke:be;if(this.unsigned){if(r.unsigned||(r=r.toUnsigned()),r.gt(this))return ke;if(r.gt(this.shru(1)))return oe;A=ke}else{if(this.eq(he))return r.eq(ue)||r.eq(ce)?he:r.eq(he)?ue:(e=this.shr(1).div(r).shl(1)).eq(be)?r.isNegative()?ue:ce:(i=this.sub(r.mul(e)),A=e.add(i.div(r)));if(r.eq(he))return this.unsigned?ke:be;if(this.isNegative())return r.isNegative()?this.neg().div(r.neg()):this.neg().div(r).neg();if(r.isNegative())return this.div(r.neg()).neg();A=be}for(i=this;i.gte(r);){e=y.max(1,y.floor(i.toNumber()/r.toNumber()));for(var f=y.ceil(y.log(e)/y.LN2),n=f<=48?1:ee(2,f-48),a=$r(e),t=a.mul(r);t.isNegative()||t.gt(i);)t=(a=$r(e-=n,this.unsigned)).mul(r);a.isZero()&&(a=ue),A=A.add(a),i=i.sub(t)}return A},ve.div=ve.divide,ve.modulo=function(r){return jr(r)||(r=Ae(r)),xr?re((this.unsigned?xr.rem_u:xr.rem_s)(this.low,this.high,r.low,r.high),xr.get_high(),this.unsigned):this.sub(this.div(r).mul(r))},ve.mod=ve.modulo,ve.rem=ve.modulo,ve.not=function(){return re(~this.low,~this.high,this.unsigned)},ve.countLeadingZeros=function(){return this.high?y.clz32(this.high):y.clz32(this.low)+32},ve.clz=ve.countLeadingZeros,ve.countTrailingZeros=function(){return this.low?zr(this.low):zr(this.high)+32},ve.ctz=ve.countTrailingZeros,ve.and=function(r){return jr(r)||(r=Ae(r)),re(this.low&r.low,this.high&r.high,this.unsigned)},ve.or=function(r){return jr(r)||(r=Ae(r)),re(this.low|r.low,this.high|r.high,this.unsigned)},ve.xor=function(r){return jr(r)||(r=Ae(r)),re(this.low^r.low,this.high^r.high,this.unsigned)},ve.shiftLeft=function(r){return jr(r)&&(r=r.toInt()),0==(r&=63)?this:r<32?re(this.low<>>32-r,this.unsigned):re(0,this.low<>>r|this.high<<32-r,this.high>>r,this.unsigned):re(this.high>>r-32,this.high>=0?0:-1,this.unsigned)},ve.shr=ve.shiftRight,ve.shiftRightUnsigned=function(r){return jr(r)&&(r=r.toInt()),0==(r&=63)?this:r<32?re(this.low>>>r|this.high<<32-r,this.high>>>r,this.unsigned):re(32===r?this.high:this.high>>>r-32,0,this.unsigned)},ve.shru=ve.shiftRightUnsigned,ve.shr_u=ve.shiftRightUnsigned,ve.rotateLeft=function(r){var e;return jr(r)&&(r=r.toInt()),0==(r&=63)?this:32===r?re(this.high,this.low,this.unsigned):r<32?(e=32-r,re(this.low<>>e,this.high<>>e,this.unsigned)):(e=32-(r-=32),re(this.high<>>e,this.low<>>e,this.unsigned))},ve.rotl=ve.rotateLeft,ve.rotateRight=function(r){var e;return jr(r)&&(r=r.toInt()),0==(r&=63)?this:32===r?re(this.high,this.low,this.unsigned):r<32?(e=32-r,re(this.high<>>r,this.low<>>r,this.unsigned)):(e=32-(r-=32),re(this.low<>>r,this.high<>>r,this.unsigned))},ve.rotr=ve.rotateRight,ve.toSigned=function(){return this.unsigned?re(this.low,this.high,!1):this},ve.toUnsigned=function(){return this.unsigned?this:re(this.low,this.high,!0)},ve.toBytes=function(r){return r?this.toBytesLE():this.toBytesBE()},ve.toBytesLE=function(){var r=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&r,r>>>8&255,r>>>16&255,r>>>24]},ve.toBytesBE=function(){var r=this.high,e=this.low;return[r>>>24,r>>>16&255,r>>>8&255,255&r,e>>>24,e>>>16&255,e>>>8&255,255&e]},Hr.fromBytes=function(r,e,i){return i?Hr.fromBytesLE(r,e):Hr.fromBytesBE(r,e)},Hr.fromBytesLE=function(r,e){return new Hr(r[0]|r[1]<<8|r[2]<<16|r[3]<<24,r[4]|r[5]<<8|r[6]<<16|r[7]<<24,e)},Hr.fromBytesBE=function(r,e){return new Hr(r[4]<<24|r[5]<<16|r[6]<<8|r[7],r[0]<<24|r[1]<<16|r[2]<<8|r[3],e)},"function"==typeof BigInt&&(Hr.fromBigInt=function(r,e){return re(Number(BigInt.asIntN(32,r)),Number(BigInt.asIntN(32,r>>BigInt(32))),e)},Hr.fromValue=function(r,e){return"bigint"===(void 0===r?"undefined":N(r))?Hr.fromBigInt(r,e):Ae(r,e)},ve.toBigInt=function(){var r=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<=2*we},ur(r,[{key:"rp",get:function(){return void 0===this.hp&&(this.hp=this.op()),this.hp}},{key:"ap",get:function(){return Rr.Fv?"android":Rr.Dv?"macos":Rr.ru?"ios":Rr.Nv?"windows":"other"}},{key:"cp",get:function(){return Rr.og?"tv":Rr.Ks?"mobile":"desktop"}},{key:"dp",get:function(){return!Rr.og}},{key:"lp",get:function(){if(u.screen)return{width:u.screen.width,height:u.screen.height}}},{key:"fp",get:function(){return u.devicePixelRatio||1}},{key:"vp",get:function(){return Be}},{key:"_p",get:function(){return!1}},{key:"gp",get:function(){return!0}},{key:"pp",get:function(){return!!(Rr.X_||Rr.ru||Rr.g_)||!!Rr.D_}},{key:"mp",get:function(){return Rr.D_}},{key:"wp",get:function(){return!Rr.ru}},{key:"yp",get:function(){return!0}},{key:"Ap",get:function(){return!0}},{key:"bp",get:function(){return!1}},{key:"Sp",get:function(){}},{key:"Tp",get:function(){return!0}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){return Rr.D_}},{key:"Pp",get:function(){return!1}},{key:"Rp",get:function(){return!1}},{key:"Cp",get:function(){return!1}},{key:"Dp",get:function(){return!1}}]),r}(),_e=function(r){function e(){return r.call(this)||this}return br(e,r),e}(Ee),Ie=function(r){function e(){return r.apply(this,arguments)||this}return br(e,r),e.prototype.xp=function(r,e){if(r&&r.Np&&e&&e.Np){var i=Qe(r.Np,"mp4a.40.2")&&Qe(e.Np,"mp4a.40.5"),A=Qe(r.Np,"mp4a.40.5")&&Qe(e.Np,"mp4a.40.2"),f=Qe(r.Np,"mp4a.40.2")&&Qe(e.Np,"mp4a.40.34"),n=Qe(r.Np,"mp4a.40.34")&&Qe(e.Np,"mp4a.40.2"),a=Qe(r.Np,"mp4a.40.5")&&Qe(e.Np,"mp4a.40.34"),t=Qe(r.Np,"mp4a.40.34")&&Qe(e.Np,"mp4a.40.5");return!(i||A||f||n||a||t)}return!0},ur(e,[{key:"Sp",get:function(){if(Rr.Dv)return 4096}},{key:"Dp",get:function(){return!0}}]),e}(_e);function Qe(r,e){return r.indexOf(e)>-1}var Ne,Re=function(r){function e(){return r.apply(this,arguments)||this}return br(e,r),e.prototype.Ip=function(r){return r>=2},e}(_e),Ce=function(r){function e(){var e;return(e=r.call(this)||this).Bp=Rr.Q_>=11,e.sp=Rr.X_&&!(Rr.ru&&Rr.Q_<10),e}return br(e,r),ur(e,[{key:"Pp",get:function(){return Rr.Q_<17}},{key:"Rp",get:function(){return!0}}]),e}(_e),pe=function(r){function e(){return r.apply(this,arguments)||this}return br(e,r),ur(e,[{key:"Tp",get:function(){return!Rr.Nv||(Rr.v_?92!==Rr.m_:Rr.d_>=100)}}]),e}(_e);var me=function(){var r=Xr();if(!r)return!1;var e=r.muted;return r.muted=!e,r.muted!==e}();!function(){if(Rr.Kv)return!1;var r=Xr();if(!r)return!1;var e=r.volume;r.volume=e/2+.1,r.volume}();var Ge=function(r){function e(e){var i;return(i=r.call(this)||this).Mp=void 0,i.Mp=e,i.Bp=i.Mp.Bp,i.Ke=i.Mp.Ke,i.sp=me&&i.Mp.sp,i}br(e,r);var i=e.prototype;return i.op=function(){return this.Mp.rp},i.xp=function(r,e){return this.Mp.xp(r,e)},i.Ip=function(r){return this.Mp.Ip(r)},ur(e,[{key:"Sp",get:function(){return this.Mp.Sp}},{key:"Tp",get:function(){return this.Mp.Tp}},{key:"Pp",get:function(){return this.Mp.Pp}},{key:"Dp",get:function(){return this.Mp.Dp}}]),e}(Ee),Ye=function(r){function e(e){var i;return(i=r.call(this,e)||this).Bp=!0,i.Ks=!0,i}return br(e,r),ur(e,[{key:"bp",get:function(){return Rr.ru}}]),e}(Ge);var We=function(r){function e(){return r.apply(this,arguments)||this}return br(e,r),e.prototype.op=function(){return function(r){return r&&Gr(u.ManagedMediaSource)?u.ManagedMediaSource:Gr(u.MediaSource)?u.MediaSource:void 0}(!0)?r.prototype.op.call(this):1},ur(e,[{key:"bp",get:function(){return!0}}]),e}(Ye),De=function(r){function e(){var e;return(e=r.apply(this,arguments)||this).Up=void 0,e}return br(e,r),e.prototype.xp=function(e,i){return r.prototype.xp.call(this,e,i)},ur(e,[{key:"_p",get:function(){return Rr.A_<3}},{key:"gp",get:function(){return Rr.A_>=3}},{key:"lp",get:function(){var r=this;return u.tizen&&!this.Up&&u.tizen.systeminfo.getPropertyValue("DISPLAY",function(e){var i=e.resolutionWidth,A=e.resolutionHeight;1===i&&1===A||(r.Up={width:i,height:A})}),this.Up}},{key:"kp",get:function(){return Rr.A_<3}}]),e}(Ge),Se=function(r){function e(){var e;return(e=r.apply(this,arguments)||this).Up=void 0,e}return br(e,r),ur(e,[{key:"lp",get:function(){var r=this;return u.webOS&&!this.Up&&u.webOS.deviceInfo(function(e){r.Up={width:e.screenWidth,height:e.screenHeight}}),this.Up}},{key:"yp",get:function(){return!1}}]),e}(Ge),Fe=function(r){function e(){return r.apply(this,arguments)||this}return br(e,r),ur(e,[{key:"bp",get:function(){return!0}},{key:"Rp",get:function(){return this.Mp.Rp}}]),e}(Ge),Te=function(r){function e(){return r.apply(this,arguments)||this}return br(e,r),ur(e,[{key:"Cp",get:function(){return Rr.IS_FIRETV_AFTMM}}]),e}(Ge);!function(r){Ne=r}(function(){var r=function(){if(Rr.W_)return new Ie;if(Rr.N_||Rr.L_)return new Re;if(Rr.X_)return new Ce;if(Rr.u_)return new pe;return new _e}();return Rr.ru?new We(r):Rr.I_?new Te(r):Rr.Ks?new Ye(r):Rr.w_?new De(r):Rr.S_?new Se(r):Rr.Dv?new Fe(r):new Ge(r)}());var Me=!(Rr.L_&&!Rr.F_),Oe=self.console;function Ze(r){if(mr(r))try{return JSON.stringify(r)}catch(r){}return r}function Le(r){return r.map(Ze).join(" ")}function Ue(r){var e=Oe&&Oe[r];return e?e.bind&&Me?e.bind(Oe):function(){for(var e=arguments.length,i=new Array(e),A=0;A1?e-1:0),A=1;A1?e-1:0),A=1;Ak&&(n=k),a>k&&(a=k),t=f,b=n;;)if(t=65&&r<=90}function ki(r){return bi(r)||function(r){return r>=97&&r<=122}(r)}function ui(r){return r>=48&&r<=57}function oi(r){return ui(r)||ki(r)}function ci(r){return ui(r)||r>=65&&r<=70||r>=97&&r<=102}function si(r){return bi(r)?r+32:r}function li(r){return ui(r)?r-48:r>=65&&r<=70?r-65+10:r>=97&&r<=102?r-97+10:-1}function hi(r,e){return void 0===e&&(e=!1),0<=r&&r<=9?r+48:10<=r&&r<=15?r+(e?87:55):-1}var vi=y.min,di=String.fromCharCode;function wi(r){for(var e=r.length,i=[],A=0;A= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_i=y.floor,Ii=String.fromCharCode;function Qi(r){throw new RangeError(Ei[r])}function Ni(r){for(var e=[],i=0,A=r.length;i=55296&&f<=56319&&i>1,r+=_i(r/e);r>455;A+=36)r=_i(r/35);return _i(A+36*r/(r+38))},Yi=function(r){return function(r,e){var i=r.split("@"),A="";i.length>1&&(A=i[0]+"@",r=i[1]);var f=function(r,e){for(var i=[],A=r.length;A--;)i[A]=e(r[A]);return i}((r=r.replace(Bi,".")).split("."),e).join(".");return A+f}(r,function(r){return yi.test(r)?"xn--"+function(r){for(var e=[],i=(r=Ni(r)).length,A=128,f=0,n=72,a=0,t=r;a=A&&l_i((gi-f)/h)&&Qi("overflow"),f+=(o-A)*h,A=o;for(var v=0,d=r;vgi&&Qi("overflow"),w==A){for(var g=f,y=36;;y+=36){var B=y<=n?1:y>=n+26?26:y-n;if(g65535&&(A-=65536,e.push(A>>>10&1023|55296),A=56320|1023&A),e.push(A)}return wi(e)}function Di(r){if(r>=55296&&r<=57343)throw new d("Lone surrogate U+"+r.toString(16).toUpperCase()+" is not a scalar value")}function Si(r,e){return r>>e&63|128}function Fi(r,e){4294967168&r?(4294965248&r?4294901760&r?4292870144&r||(e.push(r>>18&7|240),e.push(Si(r,12)),e.push(Si(r,6))):(Di(r),e.push(r>>12&15|224),e.push(Si(r,6))):e.push(r>>6&31|192),e.push(63&r|128)):e.push(r)}function Ti(r){for(var e=[],i=0;i=Ci)throw new d("Invalid byte index");var r=255&Ri[pi];if(pi++,128==(192&r))return 63&r;throw new d("Invalid continuation byte")}function Oi(){var r,e;if(pi>Ci)throw new d("Invalid byte index");if(pi===Ci)return!1;if(r=255&Ri[pi],pi++,!(128&r))return r;if(192==(224&r)){if((e=(31&r)<<6|Mi())>=128)return e;throw new d("Invalid continuation byte")}if(224==(240&r)){if((e=(15&r)<<12|Mi()<<6|Mi())>=2048)return Di(e),e;throw new d("Invalid continuation byte")}if(240==(248&r)&&(e=(7&r)<<18|Mi()<<12|Mi()<<6|Mi())>=65536&&e<=1114111)return e;throw new d("Invalid UTF-8 detected")}function Zi(r){return[37,hi(r>>4),hi(15&r)]}function Li(r){return function(r){return r>=0&&r<=31}(r)||r>126}function Ui(r){return Li(r)||32===r||34===r||60===r||62===r||96===r}function Vi(r){return Ui(r)||35===r||63===r||123===r||125===r}function Xi(r){return Vi(r)||47===r||58===r||59===r||61===r||64===r||r>=91&&r<=94||124===r}function Ji(r){return r<33||r>126||34===r||35===r||60===r||62===r}function xi(r){return Ji(r)||39===r}function Hi(r,e){if(!e(r))return[r];for(var i=Ti([r]),A=[],f=0;f6)throw new w;for(var b=0;n0){if(!("."===r[n]&&b<4))throw new w;n+=1}if(!Ke.test(r[n]))throw new w;for(;n255)throw new w}n+=1}i[A]=i[A]<<8|k,2!==(b+=1)&&4!==b||(A+=1)}if(4!==b)throw new w;break}if(":"===r[n]){if((n+=1)===e)throw new w}else if(n0;)ti(i,A,f+o-1),A-=1,o-=1}else if(8!==A)throw new w;return i}function qi(r){var e=10,i=ri;return $e.test(r)?(r=r.slice(2),e=16,i=ei):r.length>=2&&"0"===r[0]&&(r=r.slice(1),e=8,i=ii),""===r?0:i.test(r)?B(r,e):void 0}var $i={Vp:4},rA=/[\0\t\n\r #%/:?@\[\\\]]/,eA=/[\0\t\n\r #/:?@\[\\\]]/;function iA(r,e){if("["===r[0]){if("]"!==r[r.length-1])throw new w("Invalid IPv6 address");return{Vp:2,Hp:Ki(r.slice(1,-1))}}if(!e)return function(r){if(eA.test(r))throw new w("Invalid code point in opaque host");var e=ji(r,Li);return""===e?$i:{Vp:3,Wp:e}}(r);var i=function(r){var e=function(r){return Yi(r.toLowerCase())}(r);return e}(Pi(r));if(rA.test(i))throw new w("Invalid code point in host");var A=function(r){var e=r.split(".");if(""===e[e.length-1]&&e.pop(),!(e.length>4)){for(var i=[],A=0;A255)throw new w;if(i[i.length-1]>=y.pow(256,5-i.length))throw new w;for(var t=i.pop(),b=0;b>>=8;return e.reverse().join("")}(r.Hp);case 2:return"["+function(r){for(var e="",i=function(r){for(var e=0,i=0,A=0,f=0,n=0;n<8;n++)0===r[n]?(0===f&&(A=n),f++):(f>i&&(e=A,i=f),f=0);return f>i&&(e=A,i=f),i>1?e:null}(r),A=!1,f=0;f<8;f++){if(A){if(0===r[f])continue;A=!1}i!==f?(e+=r[f].toString(16),7!==f&&(e+=":")):(e+=0===f?"::":":",A=!0)}return e}(r.Hp)+"]";case 3:return r.Wp;case 4:return""}}var fA=/\+/g;function nA(r){return 42===r||45===r||46===r||95===r||oi(r)}function aA(r){for(var e=r.split("&"),i=[],A=0;A0&&(e+="&"),e+=bA(Ti(Ni(A[0])))+"="+bA(Ti(Ni(A[1])))}return e}function bA(r){for(var e=[],i=0;i0&&"?"===r[0]&&(r=r.slice(1)),this.zp=aA(r)}var e=r.prototype;return e.append=function(r,e){r=uA(r),e=uA(e),this.zp.push([r,e]),dA(this)},e.delete=function(r){r=uA(r);for(var e=this.zp,i=0;i=2))return!1;if(!SA(r.slice(0,2)))return!1;if(2!==e){var i=r[2];if(47!==i&&92!==i&&63!==i&&35!==i)return!1}return!0}function DA(r){return 2===r.length&&Pe.test(r[0])&&(":"===r[1]||"|"===r[1])}function SA(r){return 2===r.length&&DA(wi(r))}function FA(r){return DA(r)&&":"===r[1]}function TA(r){var e=r.Jp;0!==e.length&&("file"===r.Qp&&1===e.length&&FA(e[0])||e.pop())}function MA(r){return null===r.Zp||$i===r.Zp||r.$p||"file"===r.Qp}var OA=-1,ZA=/\t|\n|\r/g,LA=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function UA(r,e,i,A){void 0===i&&(i=null),void 0===A&&(A=null),i||(i=new XA,r=r.replace(LA,""));var f=null!==A?A:0;e=e||null;for(var n=[],a=!1,t=!1,b=!1,k=Ni(r=r.replace(ZA,"")),u=k.length,o=0;o<=u;){var c=o65535)throw new w("Invalid port");i.im=y===QA[i.Qp]?null:y,n.length=0}if(null!==A)return;f=16,o-=1}break;case 13:i.Qp="file",47===c||92===c?f=14:e&&"file"===e.Qp?OA===c?(i.Zp=e.Zp,i.Jp=e.Jp.slice(),i.Gp=e.Gp):63===c?(i.Zp=e.Zp,i.Jp=e.Jp.slice(),i.Gp="",f=19):35===c?(i.Zp=e.Zp,i.Jp=e.Jp.slice(),i.Gp=e.Gp,i.nm="",f=20):(WA(k.slice(o))||(i.Zp=e.Zp,i.Jp=e.Jp.slice(),TA(i)),f=17,o-=1):(f=17,o-=1);break;case 14:47===c||92===c?f=15:(e&&"file"===e.Qp&&!WA(k.slice(o))&&(FA(e.Jp[0])?i.Jp.push(e.Jp[0]):i.Zp=e.Zp),f=17,o-=1);break;case 15:if(OA===c||47===c||92===c||63===c||35===c)if(o-=1,null===A&&SA(n))f=17;else if(0===n.length){if(i.Zp=$i,null!==A)return;f=16}else{var E=iA(Wi(n),GA(i));if(0===E.Vp&&"localhost"===E.qp&&(E=$i),i.Zp=E,null!==A)return;n.length=0,f=16}else n.push(c);break;case 16:GA(i)?(f=17,47!==c&&92!==c&&(o-=1)):null===A&&63===c?(i.Gp="",f=19):null===A&&35===c?(i.nm="",f=20):OA!==c&&(f=17,47!==c&&(o-=1));break;case 17:if(OA===c||47===c||GA(i)&&92===c||null===A&&(63===c||35===c)){var _=Wi(n);if(pA(_)?(TA(i),47===c||GA(i)&&92===c||i.Jp.push("")):!CA(_)||47===c||GA(i)&&92===c?CA(_)||("file"===i.Qp&&0===i.Jp.length&&SA(n)&&($i!==i.Zp&&null!==i.Zp&&(i.Zp=$i),n[1]=58,_=Wi(n)),i.Jp.push(_)):i.Jp.push(""),n.length=0,"file"===i.Qp&&(OA===c||63===c||35===c))for(;i.Jp.length>1&&""===i.Jp[0];)i.Jp.shift();63===c?(i.Gp="",f=19):35===c&&(i.nm="",f=20)}else n.push.apply(n,Hi(c,Vi));break;case 18:63===c?(i.Gp="",f=19):35===c?(i.nm="",f=20):OA!==c&&(i.Jp[0]+=Wi(Hi(c,Li)));break;case 19:null===A&&35===c?(i.nm="",f=20):OA!==c&&(i.Gp+=Wi(Hi(c,GA(i)?xi:Ji)));break;case 20:OA===c||0===c||(i.nm+=Wi(Hi(c,Ui)))}o++}return i}function VA(r,e,i,A){try{UA(r,e,i,A)}catch(r){}}var XA=function(){this.Qp="",this.Kp="",this.Yp="",this.Zp=null,this.im=null,this.Jp=[],this.Gp=null,this.nm=null,this.$p=!1};function JA(r){switch(r.Qp){case"blob":var e;try{e=UA(r.Jp[0],null)}catch(r){return IA}return JA(e);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(r,e,i){return r+"://"+AA(e)+(null===i?"":":"+i)}(r.Qp,r.Zp,r.im);default:return IA}}var xA=function(){function r(r,e){var i,A=null;if(null!=e)if(function(r){return null!=r&&r instanceof xA&&"object"==typeof r.rc}(e))A=e.rc;else try{A=UA(String(e),null)}catch(r){throw new w("Invalid base URL: "+r.message)}try{i=UA(String(r),A)}catch(r){throw new w("Invalid URL: "+r.message)}var f=i.Gp;this.rc=i,this.Gp=function(r){var e=new wA;return null!==r&&vA(e,r),e}(f),this.Gp.rc=this}var e=r.prototype;return e.toString=function(){return this.href},e.toJSON=function(){return this.href},function(r,e,i){e&&He(r.prototype,e),i&&He(r,i)}(r,[{key:"href",get:function(){return function(r,e){void 0===e&&(e=!1);var i=r.Qp+":";if(null!==r.Zp?(i+="//",YA(r)&&(i+=r.Kp,""!==r.Yp&&(i+=":"+r.Yp),i+="@"),i+=AA(r.Zp),null!==r.im&&(i+=":"+r.im)):null===r.Zp&&"file"===r.Qp&&(i+="//"),r.$p)i+=r.Jp[0];else for(var A=0,f=r.Jp;A1?e-1:0),A=1;A>>16)*A+i*(e>>>16)<<16)|0},vf=(y.fround,y.clz32||function(r){var e=32,i=r>>16;return i&&(e-=16,r=i),(i=r>>8)&&(e-=8,r=i),(i=r>>4)&&(e-=4,r=i),(i=r>>2)&&(e-=2,r=i),(i=r>>1)?e-2:e-r}),df=(y.trunc,function(){function r(r){this.encoding=r}return r.prototype.encode=function(r){if(!r)return new I(0);for(var e=new I(r.length),i=0;i>>=0,pf().subarray(r/1,r/1+e)}var Gf=new(void 0===wf?(0,module.require)("util").TextDecoder:wf)("utf-8",{ignoreBOM:!0,fatal:!0});function Yf(r,e){return r>>>=0,Gf.decode(pf().subarray(r,r+e))}Gf.decode();var Wf=0;function Df(r,e){var i=e(1*r.length,1)>>>0;return pf().set(r,i/1),Wf=r.length,i}var Sf=null;function Ff(){return(null===Sf||!0===Sf.buffer.detached||void 0===Sf.buffer.detached&&Sf.buffer!==lf.memory.buffer)&&(Sf=new DataView(lf.memory.buffer)),Sf}var Tf=new(void 0===df?(0,module.require)("util").TextEncoder:df)("utf-8"),Mf="function"==typeof Tf.encodeInto?function(r,e){return Tf.encodeInto(r,e)}:function(r,e){var i=Tf.encode(r);return e.set(i),{read:r.length,written:i.length}};function Of(r){try{var e=lf.__wbindgen_add_to_stack_pointer(-16);lf.mpegts_to_fmp4(e,Rf(r));var i=Ff().getInt32(e+0,!0),A=Ff().getInt32(e+4,!0);if(Ff().getInt32(e+8,!0))throw Nf(A);return Nf(i)}finally{lf.__wbindgen_add_to_stack_pointer(16)}}function Zf(r){try{var e=lf.__wbindgen_add_to_stack_pointer(-16);lf.raw_audio_to_fmp4(e,Rf(r));var i=Ff().getInt32(e+0,!0),A=Ff().getInt32(e+4,!0);if(Ff().getInt32(e+8,!0))throw Nf(A);return Nf(i)}finally{lf.__wbindgen_add_to_stack_pointer(16)}}var Lf,Uf,Vf={__proto__:null,__wbg_audiopid_3c9ffbcf8a29acc3:function(r){var e=_f(r).audio_pid;return If(e)?16777215:e},__wbg_createoutput_2b6e36bfa255fecf:function(r,e){var i=function(r,e){return{data:r,metadata:e}}(Nf(r),Nf(e));return Rf(i)},__wbg_createoutputdata_c0eeb4a388c51889:function(r,e,i,A,f,n,a,t){var b,k,u,o;0!==r&&(b=gf(mf(r,e)),lf.__wbindgen_export_0(r,1*e,1)),0!==i&&(k=gf(mf(i,A)),lf.__wbindgen_export_0(i,1*A,1)),0!==f&&(u=gf(mf(f,n)),lf.__wbindgen_export_0(f,1*n,1)),0!==a&&(o=gf(mf(a,t)),lf.__wbindgen_export_0(a,1*t,1));var c=function(r,e,i,A){return{video_init:r,audio_init:e,video_media:i,audio_media:A}}(b,k,u,o);return Rf(c)},__wbg_createoutputmetadata_502b2a1d6e23cc5d:function(r,e,i,A,f,n,a,t,b,k,u,o,c,s,l,h){var v,d,w,g;0!==i&&(v=Yf(i,A).slice(),lf.__wbindgen_export_0(i,1*A,1)),0!==f&&(d=Yf(f,n).slice(),lf.__wbindgen_export_0(f,1*n,1)),0!==a&&(w=gf(mf(a,t)),lf.__wbindgen_export_0(a,1*t,1)),0!==b&&(g=gf(mf(b,k)),lf.__wbindgen_export_0(b,1*k,1));var y=function(r,e,i,A,f,n,a,t,b,k,u){return{video_pid:r,audio_pid:e,video_codec:i,audio_codec:A,sps_nal:f,pps_nal:n,first_decode_timestamp:a,first_presentation_timestamp:t,first_video_presentation_timestamp:b,program_map_table_pid:k,video_frame_rate:u}}(16777215===r?void 0:r,16777215===e?void 0:e,v,d,w,g,Nf(u),Nf(o),Nf(c),16777215===s?void 0:s,0===l?void 0:h);return Rf(y)},__wbg_createtimestampwithbase_72cbc187bece8945:function(r,e,i){var A=function(r,e,i){return{low:r,high:e,base:i}}(r>>>0,e>>>0,i>>>0);return Rf(A)},__wbg_data_dc6f1640362bd080:function(r,e){var i=Df(_f(e).data,lf.__wbindgen_export_1),A=Wf;Ff().setInt32(r+4,A,!0),Ff().setInt32(r+0,i,!0)},__wbg_error_7534b8e9a36f1ab4:function(r,e){var i,A;try{i=r,A=e,console.error(Yf(r,e))}finally{lf.__wbindgen_export_0(i,A,1)}},__wbg_metadata_2c31ca0ee55988b0:function(r){var e=_f(r).metadata;return If(e)?0:Rf(e)},__wbg_new_8a6f238a6ece86ea:function(){return Rf(new d)},__wbg_ppsnal_3c5a6e2ca6ad0008:function(r,e){var i=_f(e).pps_nal,A=If(i)?0:Df(i,lf.__wbindgen_export_1),f=Wf;Ff().setInt32(r+4,f,!0),Ff().setInt32(r+0,A,!0)},__wbg_programmaptablepid_d7511cd7e35e5ebc:function(r){var e=_f(r).program_map_table_pid;return If(e)?16777215:e},__wbg_set_wasm:yf,__wbg_spsnal_68e223ae90328906:function(r,e){var i=_f(e).sps_nal,A=If(i)?0:Df(i,lf.__wbindgen_export_1),f=Wf;Ff().setInt32(r+4,f,!0),Ff().setInt32(r+0,A,!0)},__wbg_stack_0ed75d68575b0f3c:function(r,e){var i=function(r,e,i){if(void 0===i){var A=Tf.encode(r),f=e(A.length,1)>>>0;return pf().subarray(f,f+A.length).set(A),Wf=A.length,f}for(var n=r.length,a=e(n,1)>>>0,t=pf(),b=0;b127)break;t[a+b]=k}if(b!==n){0!==b&&(r=r.slice(b)),a=i(a,n,n=b+3*r.length,1)>>>0;var u=pf().subarray(a+b,a+n);a=i(a,n,b+=Mf(r,u).written,1)>>>0}return Wf=b,a}(_f(e).stack,lf.__wbindgen_export_1,lf.__wbindgen_export_2),A=Wf;Ff().setInt32(r+4,A,!0),Ff().setInt32(r+0,i,!0)},__wbg_videopid_8c9364c3427c8b09:function(r){var e=_f(r).video_pid;return If(e)?16777215:e},__wbindgen_object_drop_ref:function(r){Nf(r)},__wbindgen_string_new:function(r,e){return Rf(Yf(r,e))},main:function(){lf.main()},mpegts_to_fmp4:Of,raw_audio_to_fmp4:Zf},Xf=new I(123);for(Uf=25;Uf>=0;--Uf)Xf[48+Uf]=52+Uf,Xf[65+Uf]=Uf,Xf[97+Uf]=26+Uf;function Jf(r,e,i){for(var A,f,n=0,a=e,t=i.length,b=e+(3*t>>2)-("="==i[t-2])-("="==i[t-1]);n>4,a>2),a>>8&65280|t>>>24;r:{e:{i:{A:{f:{n:{a:{t:{b:{k:{u:{o:{if(t=f[r+4>>2],f[r+8>>2]-t>>>0>=4)c=f[r>>2]+t|0,i[0|c]=k,i[c+1|0]=k>>>8,i[c+2|0]=k>>>16,i[c+3|0]=k>>>24;else if(or(r,4),c=(t=f[r+4>>2])+f[r>>2]|0,i[0|c]=k,i[c+1|0]=k>>>8,i[c+2|0]=k>>>16,i[c+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=109,i[t+1|0]=111,i[t+2|0]=111,i[t+3|0]=118,(k=(c=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,c-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=120;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=120,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=109,i[t+1|0]=118,i[t+2|0]=104,i[t+3|0]=100,(k=(c=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,c-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=1,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=1,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=8)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0;else if(or(r,8),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0,(k=f[r+8>>2]-t|0)>>>0<=7)break k;if(t=t+8|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=8)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0;else if(or(r,8),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0,(k=f[r+8>>2]-t|0)>>>0<=7)break k;if(t=t+8|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=1,i[k+2|0]=95,i[k+3|0]=144;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=1,i[k+2|0]=95,i[k+3|0]=144,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=8)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0;else if(or(r,8),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0,(k=f[r+8>>2]-t|0)>>>0<=7)break k;if(t=t+8|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=0,i[t+1|0]=1,i[t+2|0]=0,i[t+3|0]=0,(k=(c=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,c-t>>>0<=1&&(or(r,2),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=1,i[t+1|0]=0,(k=(c=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=1)break t;t=t+2|0,f[r+4>>2]=t,c-t>>>0<=9&&(or(r,10),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=0,i[t+1|0]=0,i[t+2|0]=0,i[t+3|0]=0,i[t+4|0]=0,i[t+5|0]=0,i[t+6|0]=0,i[t+7|0]=0,i[0|(t=t+8|0)]=0,i[t+1|0]=0;c:{s:{if((c=(k=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0>9){if(t=t+10|0,f[r+4>>2]=t,k-t>>>0<=35&&(or(r,36),t=f[r+4>>2]),k=n[1054832]|n[1054833]<<8|n[1054834]<<16|n[1054835]<<24,t=f[r>>2]+t|0,c=n[1054828]|n[1054829]<<8|n[1054830]<<16|n[1054831]<<24,i[0|t]=c,i[t+1|0]=c>>>8,i[t+2|0]=c>>>16,i[t+3|0]=c>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=t+32|0,c=n[1054860]|n[1054861]<<8|n[1054862]<<16|n[1054863]<<24,i[0|k]=c,i[k+1|0]=c>>>8,i[k+2|0]=c>>>16,i[k+3|0]=c>>>24,c=n[1054856]|n[1054857]<<8|n[1054858]<<16|n[1054859]<<24,k=t+24|0,o=n[1054852]|n[1054853]<<8|n[1054854]<<16|n[1054855]<<24,i[0|k]=o,i[k+1|0]=o>>>8,i[k+2|0]=o>>>16,i[k+3|0]=o>>>24,i[k+4|0]=c,i[k+5|0]=c>>>8,i[k+6|0]=c>>>16,i[k+7|0]=c>>>24,c=n[1054848]|n[1054849]<<8|n[1054850]<<16|n[1054851]<<24,k=t+16|0,o=n[1054844]|n[1054845]<<8|n[1054846]<<16|n[1054847]<<24,i[0|k]=o,i[k+1|0]=o>>>8,i[k+2|0]=o>>>16,i[k+3|0]=o>>>24,i[k+4|0]=c,i[k+5|0]=c>>>8,i[k+6|0]=c>>>16,i[k+7|0]=c>>>24,k=n[1054840]|n[1054841]<<8|n[1054842]<<16|n[1054843]<<24,t=t+8|0,c=n[1054836]|n[1054837]<<8|n[1054838]<<16|n[1054839]<<24,i[0|t]=c,i[t+1|0]=c>>>8,i[t+2|0]=c>>>16,i[t+3|0]=c>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,(k=(c=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=35)break b;if(t=t+36|0,f[r+4>>2]=t,c-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=3;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=3,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,k=e?671088640:134217728,k=A?k+536870912|0:k,f[r+8>>2]-t>>>0>=4)c=f[r>>2]+t|0,i[0|c]=k,i[c+1|0]=k>>>8,i[c+2|0]=k>>>16,i[c+3|0]=k>>>24;else if(or(r,4),c=(t=f[r+4>>2])+f[r>>2]|0,i[0|c]=k,i[c+1|0]=k>>>8,i[c+2|0]=k>>>16,i[c+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=109,i[t+1|0]=118,i[t+2|0]=101,i[t+3|0]=120,t=f[r+4>>2],(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(f[r+4>>2]=t+4,e)break s;break c}f[b+12>>2]=c,f[b+8>>2]=10;break r}br(r,1)}A&&br(r,2);c:{s:{l:{h:{v:{d:{w:{g:{y:{B:{E:{_:{if(e){if(1==(0|(v=a[e+108>>1]))&&(t=475,a[e+112>>1])||(t=459),k=(t=t+(c=f[e+104>>2])|0)<<24|(65280&t)<<8|t>>>8&65280|t>>>24,t=f[r+4>>2],f[r+8>>2]-t>>>0>=4)o=f[r>>2]+t|0,i[0|o]=k,i[o+1|0]=k>>>8,i[o+2|0]=k>>>16,i[o+3|0]=k>>>24;else if(or(r,4),o=(t=f[r+4>>2])+f[r>>2]|0,i[0|o]=k,i[o+1|0]=k>>>8,i[o+2|0]=k>>>16,i[o+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=116,i[t+1|0]=114,i[t+2|0]=97,i[t+3|0]=107,t=f[r+4>>2],(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(f[r+4>>2]=t+4,l=a[e+116>>1],u=a[e+118>>1],Ar(r,1),t=f[r+4>>2],f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=1&&(or(r,2),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=0,i[t+1|0]=0,(k=(o=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,o-t>>>0<=1&&(or(r,2),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=0,i[t+1|0]=0,(k=(o=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,o-t>>>0<=35&&(or(r,36),t=f[r+4>>2]),k=n[1054832]|n[1054833]<<8|n[1054834]<<16|n[1054835]<<24,t=f[r>>2]+t|0,o=n[1054828]|n[1054829]<<8|n[1054830]<<16|n[1054831]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=t+32|0,o=n[1054860]|n[1054861]<<8|n[1054862]<<16|n[1054863]<<24,i[0|k]=o,i[k+1|0]=o>>>8,i[k+2|0]=o>>>16,i[k+3|0]=o>>>24,o=n[1054856]|n[1054857]<<8|n[1054858]<<16|n[1054859]<<24,k=t+24|0,h=n[1054852]|n[1054853]<<8|n[1054854]<<16|n[1054855]<<24,i[0|k]=h,i[k+1|0]=h>>>8,i[k+2|0]=h>>>16,i[k+3|0]=h>>>24,i[k+4|0]=o,i[k+5|0]=o>>>8,i[k+6|0]=o>>>16,i[k+7|0]=o>>>24,o=n[1054848]|n[1054849]<<8|n[1054850]<<16|n[1054851]<<24,k=t+16|0,h=n[1054844]|n[1054845]<<8|n[1054846]<<16|n[1054847]<<24,i[0|k]=h,i[k+1|0]=h>>>8,i[k+2|0]=h>>>16,i[k+3|0]=h>>>24,i[k+4|0]=o,i[k+5|0]=o>>>8,i[k+6|0]=o>>>16,i[k+7|0]=o>>>24,k=n[1054840]|n[1054841]<<8|n[1054842]<<16|n[1054843]<<24,t=t+8|0,o=n[1054836]|n[1054837]<<8|n[1054838]<<16|n[1054839]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,(o=(k=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=35)break _;if(t=t+36|0,f[r+4>>2]=t,o=l<<8|(65280&l)>>>8,k-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=o,i[k+1|0]=o>>>8;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=o,i[k+1|0]=o>>>8,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,h=u<<8|(65280&u)>>>8,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=h,i[k+1|0]=h>>>8;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=h,i[k+1|0]=h>>>8,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,d=a[e+112>>1],k=(k=(l=c+(v&&1&d?126:110)|0)+237|0)<<24|(65280&k)<<8|k>>>8&65280|k>>>24,f[r+8>>2]-t>>>0>=4)u=f[r>>2]+t|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24;else if(or(r,4),u=(t=f[r+4>>2])+f[r>>2]|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=109,i[t+1|0]=100,i[t+2|0]=105,i[t+3|0]=97,t=f[r+4>>2],(k=f[r+8>>2]-t|0)>>>0<=3)break n;if(f[r+4>>2]=t+4,fr(r,9e4),t=f[r+4>>2],f[r+8>>2]-t>>>0<=44&&(or(r,45),t=f[r+4>>2]),k=n[1054913]|n[1054914]<<8|n[1054915]<<16|n[1054916]<<24,t=f[r>>2]+t|0,u=n[1054909]|n[1054910]<<8|n[1054911]<<16|n[1054912]<<24,i[0|t]=u,i[t+1|0]=u>>>8,i[t+2|0]=u>>>16,i[t+3|0]=u>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,u=n[1054950]|n[1054951]<<8|n[1054952]<<16|n[1054953]<<24,k=t+37|0,s=n[1054946]|n[1054947]<<8|n[1054948]<<16|n[1054949]<<24,i[0|k]=s,i[k+1|0]=s>>>8,i[k+2|0]=s>>>16,i[k+3|0]=s>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,u=n[1054945]|n[1054946]<<8|n[1054947]<<16|n[1054948]<<24,k=t+32|0,s=n[1054941]|n[1054942]<<8|n[1054943]<<16|n[1054944]<<24,i[0|k]=s,i[k+1|0]=s>>>8,i[k+2|0]=s>>>16,i[k+3|0]=s>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,u=n[1054937]|n[1054938]<<8|n[1054939]<<16|n[1054940]<<24,k=t+24|0,s=n[1054933]|n[1054934]<<8|n[1054935]<<16|n[1054936]<<24,i[0|k]=s,i[k+1|0]=s>>>8,i[k+2|0]=s>>>16,i[k+3|0]=s>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,u=n[1054929]|n[1054930]<<8|n[1054931]<<16|n[1054932]<<24,k=t+16|0,s=n[1054925]|n[1054926]<<8|n[1054927]<<16|n[1054928]<<24,i[0|k]=s,i[k+1|0]=s>>>8,i[k+2|0]=s>>>16,i[k+3|0]=s>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,k=n[1054921]|n[1054922]<<8|n[1054923]<<16|n[1054924]<<24,t=t+8|0,u=n[1054917]|n[1054918]<<8|n[1054919]<<16|n[1054920]<<24,i[0|t]=u,i[t+1|0]=u>>>8,i[t+2|0]=u>>>16,i[t+3|0]=u>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,(k=(u=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=44)break E;if(t=t+45|0,f[r+4>>2]=t,k=(k=l+140|0)<<24|(65280&k)<<8|k>>>8&65280|k>>>24,u-t>>>0>=4)u=f[r>>2]+t|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24;else if(or(r,4),u=(t=f[r+4>>2])+f[r>>2]|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=109,i[t+1|0]=105,i[t+2|0]=110,i[t+3|0]=102,(t=(k=f[r+8>>2])-(u=f[r+4>>2])|0)>>>0<=3)break A;if(t=u+4|0,f[r+4>>2]=t,k-t>>>0<=19&&(or(r,20),t=f[r+4>>2]),k=n[1054958]|n[1054959]<<8|n[1054960]<<16|n[1054961]<<24,t=f[r>>2]+t|0,u=n[1054954]|n[1054955]<<8|n[1054956]<<16|n[1054957]<<24,i[0|t]=u,i[t+1|0]=u>>>8,i[t+2|0]=u>>>16,i[t+3|0]=u>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=t+16|0,u=n[1054970]|n[1054971]<<8|n[1054972]<<16|n[1054973]<<24,i[0|k]=u,i[k+1|0]=u>>>8,i[k+2|0]=u>>>16,i[k+3|0]=u>>>24,k=n[1054966]|n[1054967]<<8|n[1054968]<<16|n[1054969]<<24,t=t+8|0,u=n[1054962]|n[1054963]<<8|n[1054964]<<16|n[1054965]<<24,i[0|t]=u,i[t+1|0]=u>>>8,i[t+2|0]=u>>>16,i[t+3|0]=u>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,(u=(k=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=19)break B;if(t=t+20|0,f[r+4>>2]=t,k-t>>>0<=35&&(or(r,36),t=f[r+4>>2]),k=n[1054994]|n[1054995]<<8|n[1054996]<<16|n[1054997]<<24,t=f[r>>2]+t|0,u=n[1054990]|n[1054991]<<8|n[1054992]<<16|n[1054993]<<24,i[0|t]=u,i[t+1|0]=u>>>8,i[t+2|0]=u>>>16,i[t+3|0]=u>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=t+32|0,u=n[1055022]|n[1055023]<<8|n[1055024]<<16|n[1055025]<<24,i[0|k]=u,i[k+1|0]=u>>>8,i[k+2|0]=u>>>16,i[k+3|0]=u>>>24,u=n[1055018]|n[1055019]<<8|n[1055020]<<16|n[1055021]<<24,k=t+24|0,s=n[1055014]|n[1055015]<<8|n[1055016]<<16|n[1055017]<<24,i[0|k]=s,i[k+1|0]=s>>>8,i[k+2|0]=s>>>16,i[k+3|0]=s>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,u=n[1055010]|n[1055011]<<8|n[1055012]<<16|n[1055013]<<24,k=t+16|0,s=n[1055006]|n[1055007]<<8|n[1055008]<<16|n[1055009]<<24,i[0|k]=s,i[k+1|0]=s>>>8,i[k+2|0]=s>>>16,i[k+3|0]=s>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,k=n[1055002]|n[1055003]<<8|n[1055004]<<16|n[1055005]<<24,t=t+8|0,u=n[1054998]|n[1054999]<<8|n[1055e3]<<16|n[1055001]<<24,i[0|t]=u,i[t+1|0]=u>>>8,i[t+2|0]=u>>>16,i[t+3|0]=u>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,(k=(u=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=35)break y;if(t=t+36|0,f[r+4>>2]=t,k=(k=l+76|0)<<24|(65280&k)<<8|k>>>8&65280|k>>>24,u-t>>>0>=4)u=f[r>>2]+t|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24;else if(or(r,4),u=(t=f[r+4>>2])+f[r>>2]|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=115,i[t+1|0]=116,i[t+2|0]=98,i[t+3|0]=108,(k=(u=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,k=l<<24|(65280&l)<<8|l>>>8&65280|l>>>24,u-t>>>0>=4)u=f[r>>2]+t|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24;else if(or(r,4),u=(t=f[r+4>>2])+f[r>>2]|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=115,i[t+1|0]=116,i[t+2|0]=115,i[t+3|0]=100,(t=(k=f[r+8>>2])-(u=f[r+4>>2])|0)>>>0<=3)break A;if(t=u+4|0,f[r+4>>2]=t,k-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=1;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=1,(k=f[r+8>>2]-t|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,k=(k=l-16|0)<<24|(65280&k)<<8|k>>>8&65280|k>>>24,f[r+8>>2]-t>>>0>=4)l=f[r>>2]+t|0,i[0|l]=k,i[l+1|0]=k>>>8,i[l+2|0]=k>>>16,i[l+3|0]=k>>>24;else if(or(r,4),l=(t=f[r+4>>2])+f[r>>2]|0,i[0|l]=k,i[l+1|0]=k>>>8,i[l+2|0]=k>>>16,i[l+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=97,i[t+1|0]=118,i[t+2|0]=99,i[t+3|0]=49,(k=(l=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,l-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=1;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=1,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=o,i[k+1|0]=o>>>8;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=o,i[k+1|0]=o>>>8,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=h,i[k+1|0]=h>>>8;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=h,i[k+1|0]=h>>>8,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=72;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=72,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=72;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=72,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=1;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=1,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=31&&(or(r,32),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=0,i[t+1|0]=0,i[t+2|0]=0,i[t+3|0]=0,i[t+4|0]=0,i[t+5|0]=0,i[t+6|0]=0,i[t+7|0]=0,i[0|(k=t+24|0)]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0,i[0|(k=t+16|0)]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0,i[0|(t=t+8|0)]=0,i[t+1|0]=0,i[t+2|0]=0,i[t+3|0]=0,i[t+4|0]=0,i[t+5|0]=0,i[t+6|0]=0,i[t+7|0]=0,(o=(k=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=31)break g;if(t=t+32|0,f[r+4>>2]=t,k-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=24;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=24,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=1&&(or(r,2),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=255,i[t+1|0]=255,(k=(o=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,k=(k=c+8|0)<<24|(65280&k)<<8|k>>>8&65280|k>>>24,o-t>>>0>=4)o=f[r>>2]+t|0,i[0|o]=k,i[o+1|0]=k>>>8,i[o+2|0]=k>>>16,i[o+3|0]=k>>>24;else if(or(r,4),o=(t=f[r+4>>2])+f[r>>2]|0,i[0|o]=k,i[o+1|0]=k>>>8,i[o+2|0]=k>>>16,i[o+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=97,i[t+1|0]=118,i[t+2|0]=99,i[t+3|0]=67,(t=(k=f[r+8>>2])-(o=f[r+4>>2])|0)>>>0<=3)break i;if(t=o+4|0,f[r+4>>2]=t,o=f[e+100>>2],c>>>0>k-t>>>0&&(or(r,c),t=f[r+4>>2]),ze(f[r>>2]+t|0,o,c),(o=(k=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0>>0)break w;if(t=t+c|0,f[r+4>>2]=t,!(!v|!d)){if(k-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=16;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=16,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=112,i[t+1|0]=97,i[t+2|0]=115,i[t+3|0]=112,(k=(c=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,!v)break d;if(k=(k=a[e+110>>1])<<24|(65280&k)<<8,c-t>>>0>=4)c=f[r>>2]+t|0,i[0|c]=k,i[c+1|0]=k>>>8,i[c+2|0]=k>>>16,i[c+3|0]=k>>>24;else if(or(r,4),c=(t=f[r+4>>2])+f[r>>2]|0,i[0|c]=k,i[c+1|0]=k>>>8,i[c+2|0]=k>>>16,i[c+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,e=(e=a[e+114>>1])<<24|(65280&e)<<8,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(e=f[r+8>>2]-t|0)>>>0<=3)break v;f[r+4>>2]=t+4}Sr(r),er(r)}if(A&&(e=(c=f[A+88>>2])+409|0)){if(e=e<<24|(65280&e)<<8|e>>>8&65280|e>>>24,t=f[r+4>>2],f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=3&&(or(r,4),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=116,i[e+1|0]=114,i[e+2|0]=97,i[e+3|0]=107,e=f[r+4>>2],(k=f[r+8>>2]-e|0)>>>0<=3)break o;if(f[r+4>>2]=e+4,Ar(r,2),t=f[r+4>>2],f[r+8>>2]-t>>>0>=2)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=1;else if(or(r,2),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=1,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(e=t+2|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=1&&(or(r,2),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=1,i[e+1|0]=0,(k=(t=f[r+8>>2])-(e=f[r+4>>2])|0)>>>0<=1)break t;if(e=e+2|0,f[r+4>>2]=e,t-e>>>0<=1&&(or(r,2),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=0,i[e+1|0]=0,(k=(t=f[r+8>>2])-(e=f[r+4>>2])|0)>>>0<=1)break t;if(e=e+2|0,f[r+4>>2]=e,t-e>>>0<=35&&(or(r,36),e=f[r+4>>2]),t=n[1054832]|n[1054833]<<8|n[1054834]<<16|n[1054835]<<24,e=f[r>>2]+e|0,k=n[1054828]|n[1054829]<<8|n[1054830]<<16|n[1054831]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,t=e+32|0,k=n[1054860]|n[1054861]<<8|n[1054862]<<16|n[1054863]<<24,i[0|t]=k,i[t+1|0]=k>>>8,i[t+2|0]=k>>>16,i[t+3|0]=k>>>24,k=n[1054856]|n[1054857]<<8|n[1054858]<<16|n[1054859]<<24,t=e+24|0,o=n[1054852]|n[1054853]<<8|n[1054854]<<16|n[1054855]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=n[1054848]|n[1054849]<<8|n[1054850]<<16|n[1054851]<<24,t=e+16|0,o=n[1054844]|n[1054845]<<8|n[1054846]<<16|n[1054847]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,t=n[1054840]|n[1054841]<<8|n[1054842]<<16|n[1054843]<<24,e=e+8|0,k=n[1054836]|n[1054837]<<8|n[1054838]<<16|n[1054839]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,(k=(e=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=35)break b;if(t=t+36|0,f[r+4>>2]=t,e-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,e=(e=c+297|0)<<24|(65280&e)<<8|e>>>8&65280|e>>>24,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=3&&(or(r,4),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=109,i[e+1|0]=100,i[e+2|0]=105,i[e+3|0]=97,e=f[r+4>>2],(k=f[r+8>>2]-e|0)>>>0<=3)break o;if(f[r+4>>2]=e+4,fr(r,h=f[A+92>>2]),e=f[r+4>>2],f[r+8>>2]-e>>>0<=44&&(or(r,45),e=f[r+4>>2]),t=n[1054868]|n[1054869]<<8|n[1054870]<<16|n[1054871]<<24,e=f[r>>2]+e|0,k=n[1054864]|n[1054865]<<8|n[1054866]<<16|n[1054867]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,k=n[1054905]|n[1054906]<<8|n[1054907]<<16|n[1054908]<<24,t=e+37|0,o=n[1054901]|n[1054902]<<8|n[1054903]<<16|n[1054904]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=n[1054900]|n[1054901]<<8|n[1054902]<<16|n[1054903]<<24,t=e+32|0,o=n[1054896]|n[1054897]<<8|n[1054898]<<16|n[1054899]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=n[1054892]|n[1054893]<<8|n[1054894]<<16|n[1054895]<<24,t=e+24|0,o=n[1054888]|n[1054889]<<8|n[1054890]<<16|n[1054891]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=n[1054884]|n[1054885]<<8|n[1054886]<<16|n[1054887]<<24,t=e+16|0,o=n[1054880]|n[1054881]<<8|n[1054882]<<16|n[1054883]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,t=n[1054876]|n[1054877]<<8|n[1054878]<<16|n[1054879]<<24,e=e+8|0,k=n[1054872]|n[1054873]<<8|n[1054874]<<16|n[1054875]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,(t=(k=f[r+8>>2])-(e=f[r+4>>2])|0)>>>0<=44)break h;if(t=e+45|0,f[r+4>>2]=t,e=(e=c+200|0)<<24|(65280&e)<<8|e>>>8&65280|e>>>24,k-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=3&&(or(r,4),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=109,i[e+1|0]=105,i[e+2|0]=110,i[e+3|0]=102,(t=(k=f[r+8>>2])-(e=f[r+4>>2])|0)>>>0<=3)break i;if(e=e+4|0,f[r+4>>2]=e,k-e>>>0<=15&&(or(r,16),e=f[r+4>>2]),t=n[1054978]|n[1054979]<<8|n[1054980]<<16|n[1054981]<<24,e=f[r>>2]+e|0,k=n[1054974]|n[1054975]<<8|n[1054976]<<16|n[1054977]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,t=n[1054986]|n[1054987]<<8|n[1054988]<<16|n[1054989]<<24,e=e+8|0,k=n[1054982]|n[1054983]<<8|n[1054984]<<16|n[1054985]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,(k=(t=f[r+8>>2])-(e=f[r+4>>2])|0)>>>0<=15)break l;if(e=e+16|0,f[r+4>>2]=e,t-e>>>0<=35&&(or(r,36),e=f[r+4>>2]),t=n[1054994]|n[1054995]<<8|n[1054996]<<16|n[1054997]<<24,e=f[r>>2]+e|0,k=n[1054990]|n[1054991]<<8|n[1054992]<<16|n[1054993]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,t=e+32|0,k=n[1055022]|n[1055023]<<8|n[1055024]<<16|n[1055025]<<24,i[0|t]=k,i[t+1|0]=k>>>8,i[t+2|0]=k>>>16,i[t+3|0]=k>>>24,k=n[1055018]|n[1055019]<<8|n[1055020]<<16|n[1055021]<<24,t=e+24|0,o=n[1055014]|n[1055015]<<8|n[1055016]<<16|n[1055017]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=n[1055010]|n[1055011]<<8|n[1055012]<<16|n[1055013]<<24,t=e+16|0,o=n[1055006]|n[1055007]<<8|n[1055008]<<16|n[1055009]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,t=n[1055002]|n[1055003]<<8|n[1055004]<<16|n[1055005]<<24,e=e+8|0,k=n[1054998]|n[1054999]<<8|n[1055e3]<<16|n[1055001]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,(t=(k=f[r+8>>2])-(e=f[r+4>>2])|0)>>>0<=35)break s;if(t=e+36|0,f[r+4>>2]=t,e=(e=c+140|0)<<24|(65280&e)<<8|e>>>8&65280|e>>>24,k-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=3&&(or(r,4),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=115,i[e+1|0]=116,i[e+2|0]=98,i[e+3|0]=108,(k=(o=f[r+8>>2])-(e=f[r+4>>2])|0)>>>0<=3)break o;if(t=e+4|0,f[r+4>>2]=t,e=(e=c- -64|0)<<24|(65280&e)<<8|e>>>8&65280|e>>>24,o-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=3&&(or(r,4),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=115,i[e+1|0]=116,i[e+2|0]=115,i[e+3|0]=100,(t=(e=f[r+8>>2])-(k=f[r+4>>2])|0)>>>0<=3)break i;if(t=k+4|0,f[r+4>>2]=t,e-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=1;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=1,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,e=(e=c+48|0)<<24|(65280&e)<<8|e>>>8&65280|e>>>24,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=3&&(or(r,4),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=109,i[e+1|0]=112,i[e+2|0]=52,i[e+3|0]=97,(t=(e=f[r+8>>2])-(k=f[r+4>>2])|0)>>>0<=3)break i;if(t=k+4|0,f[r+4>>2]=t,e-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0;else if(or(r,2),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=1;else if(or(r,2),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=1,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,e=n[(f[A>>2]?100:101)+A|0]<<8,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=16;else if(or(r,2),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=16,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0;else if(or(r,2),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0;else if(or(r,2),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,e=h<<8|(65280&h)>>>8,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0;else if(or(r,2),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,e=(e=c+12|0)<<24|(65280&e)<<8|e>>>8&65280|e>>>24,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=3&&(or(r,4),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=101,i[e+1|0]=115,i[e+2|0]=100,i[e+3|0]=115,(k=(e=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,e-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,A=f[A+84>>2],c>>>0>f[r+8>>2]-e>>>0&&(or(r,c),e=f[r+4>>2]),ze(f[r>>2]+e|0,A,c),e=f[r+4>>2],(A=f[r+8>>2]-e|0)>>>0>>0)break c;f[r+4>>2]=e+c,Sr(r),er(r)}return void(S=b+16|0)}f[b+12>>2]=o;break a}f[b+12>>2]=k;break f}f[b+12>>2]=u,f[b+8>>2]=20;break r}f[b+12>>2]=k;break a}f[b+12>>2]=o,f[b+8>>2]=32;break r}f[b+12>>2]=o,f[b+8>>2]=c;break r}Ve(1055028),$f()}f[b+12>>2]=e;break e}f[b+12>>2]=t;break f}f[b+12>>2]=k,f[b+8>>2]=16;break r}f[b+12>>2]=t;break a}f[b+12>>2]=A,f[b+8>>2]=c;break r}f[b+12>>2]=k;break e}f[b+12>>2]=k;break e}f[b+12>>2]=k,f[b+8>>2]=8;break r}f[b+12>>2]=k;break a}f[b+12>>2]=k,f[b+8>>2]=2;break r}f[b+8>>2]=36;break r}f[b+12>>2]=k;break e}f[b+8>>2]=45;break r}f[b+12>>2]=t;break e}f[b+12>>2]=t}f[b+8>>2]=4}pe(b+8|0),$f()}function Z(r,e){var t,o=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0,p=0,m=0,G=0,Y=0,W=0,D=0,F=0,T=0,O=0,Z=0,L=0,U=0,X=0,J=0,x=0,H=0;S=t=S-640|0,ze(t+8|0,e,264),o=f[e+248>>2],f[t+280>>2]=o,v=f[e+244>>2],f[t+272>>2]=f[e+240>>2],f[t+276>>2]=v;r:{e:{i:{A:{f:{n:{a:{t:{if(o){if(d=f[t+276>>2],(m=f[d+64>>2])?B=9e4/(D=.0009765625*+(m>>>0)):(m=9e4,B=0),B=s(B),u(B)<0x8000000000000000?(e=~~B>>>0,v=u(B)>=1?~~(N=B>0?c(s(2.3283064365386963e-10*B),4294967295):l(2.3283064365386963e-10*(B-+(~~B>>>0>>>0))))>>>0:0):(e=0,v=-2147483648),n[d+70|0])break t;Ve(1056300),$f()}if(m=9e4,F=n[t+268|0],f[t+264>>2])break a;break n}y=e,e=B>=-0x8000000000000000,h=B>0x7ffffffffffffc00,T=(g=B==B)?h?-1:e?y:0:0,O=g?h?2147483647:e?v:-2147483648:0,Z=n[d+71|0],F=n[t+268|0];t:{if(f[t+264>>2]){f[t+376>>2]=0,f[t+380>>2]=4,f[t+384>>2]=0,f[t+388>>2]=0,i[t+374|0]=0,i[t+372|0]=0,f[t+368>>2]=0,f[t+352>>2]=0,f[t+356>>2]=0,f[t+336>>2]=0,f[t+340>>2]=0,f[t+320>>2]=0,f[t+324>>2]=0,f[t+304>>2]=0,f[t+308>>2]=0;b:{k:{u:{o:{c:{s:{l:{h:{if(v=d+k(o,88)|0,1==(0|(d=n[v-18|0])))switch(h=v-88|0,e=6,E=1056380,(g=n[v-17|0])-1|0){case 5:break c;case 0:break k;case 1:break u;case 2:break h;case 3:break l;case 4:break s;default:break o}Ve(1056364),$f()}e=13,E=1056395;break k}e=18,E=1056408;break k}e=21,E=1056426;break k}e=26,E=1056447;break k}f[t+572>>2]=0,f[t+564>>2]=1,f[t+568>>2]=0,f[t+560>>2]=1056088;break b}e=9,E=1056386}f[(o=t+568|0)>>2]=e,f[t+572>>2]=0,f[t+564>>2]=E,f[t+560>>2]=1056088,f[t+388>>2]=e,ce(t+376|0,1058736),w=f[t+564>>2],e=f[t+380>>2],f[e>>2]=f[t+560>>2],f[e+4>>2]=w,w=f[o+4>>2],f[(e=e+8|0)>>2]=f[o>>2],f[e+4>>2]=w,f[t+384>>2]=1}if(w=f[(o=h+8|0)+4>>2],f[(e=t+312|0)>>2]=f[o>>2],f[e+4>>2]=w,w=f[(o=h+16|0)+4>>2],f[(e=t+320|0)>>2]=f[o>>2],f[e+4>>2]=w,w=f[(o=h+24|0)+4>>2],f[(e=t+328|0)>>2]=f[o>>2],f[e+4>>2]=w,i[t+375|0]=g,i[t+374|0]=d,e=f[h+4>>2],f[t+304>>2]=f[h>>2],f[t+308>>2]=e,A[t+372>>1]=a[v-20>>1],f[t+368>>2]=f[v-24>>2],o=f[(e=v-32|0)+4>>2],f[t+360>>2]=f[e>>2],f[t+364>>2]=o,o=f[(e=v-40|0)+4>>2],f[t+352>>2]=f[e>>2],f[t+356>>2]=o,o=f[(e=v-48|0)+4>>2],f[t+344>>2]=f[e>>2],f[t+348>>2]=o,o=f[(e=v-56|0)+4>>2],f[t+336>>2]=f[e>>2],f[t+340>>2]=o,d=f[(g=v-12|0)>>2],o=f[v-8>>2]){e=0;b:{if(1!=(0|o)){for(w=1&o,y=-2&o,o=d;fi[f[f[o>>2]+16>>2]](o+12|0,f[o+4>>2],f[o+8>>2]),fi[f[f[o+16>>2]+16>>2]](o+28|0,f[o+20>>2],f[o+24>>2]),o=o+32|0,(0|y)!=(0|(e=e+2|0)););if(!w)break b}fi[f[f[(e=(e<<4)+d|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}d=f[g>>2]}if(o=f[v-16>>2]){if((e=-8&(v=f[d-4>>2]))>>>0<((o<<=4)|((v&=3)?4:8))>>>0)break t;if(e>>>0>o+39>>>0&&v)break e;nr(d)}if(ze(h,t+304|0,88),f[t+264>>2]=0,!(o=f[t+280>>2]))break n}if(1!=(0|o)){for(N=(+(T>>>0)+4294967296*+(0|O))/9e4,e=1,E=1;;){b:{k:{u:{o:{c:{s:{if((v=e-1|0)>>>0>>0){if(w=(g=f[t+276>>2])+k(v,88)|0,!f[w+32>>2])break s;if(d=g+k(e,88)|0,1!=f[d+32>>2])break c;if((0|(v=f[d+40>>2]))==(0|(h=f[w+40>>2]))&(0|(y=f[d+44>>2]))==(0|(w=f[w+44>>2])))break o;if(qf(+(Oe(1022)+-2220446049250313e-31*Oe(1021))),_=0|zf(1),C=0|zf(0),qf(+(B=(+(v-h>>>0)+4294967296*+(y-((h>>>0>v>>>0)+w|0)|0))/9e4/N)),v=0|zf(1),zf(0),Pf(0,0|C),Pf(1,2147483647&_|-2147483648&v),qf(+(B+=+Kf())),v=0|zf(1),zf(0),(0|(h=(v>>>20&2047)-1023|0))<=51&&(v=31&h,(63&h)>>>0>=32?(w=-1,v=-1048576>>v):(w=-1048576>>v,v=((1<=0)&B<4294967296?~~B>>>0:0,(v=(v=B>4294967295?-1:h?v:0)>>>0<=1?1:v)>>>0>>0){if(v=e-(h=E-v|0)|0,e>>>0>>0)break u;if(e>>>0>o>>>0)break k;f[t+572>>2]=e,f[t+576>>2]=o-e,f[t+564>>2]=d,f[t+280>>2]=v,f[t+560>>2]=g+k(v,88),f[t+568>>2]=t+272,mr(t+560|0),o=f[t+280>>2],e=v}E=1;break b}Ne(v,o,1056476),$f()}Ve(1056492),$f()}Ve(1056508),$f()}E=E+1|0;break b}S=r=S-48|0,f[r+4>>2]=e,f[r>>2]=v,f[r+12>>2]=2,f[r+8>>2]=1053040,f[r+20>>2]=2,f[r+24>>2]=0,f[r+40>>2]=r+4,f[r+44>>2]=8,f[r+32>>2]=r,f[r+36>>2]=8,f[r+16>>2]=r+32,Me(r+8|0,1057108),$f()}Je(e,o,1057108),$f()}if(!(o>>>0>(e=e+1|0)>>>0))break}if(o>>>0>=2)for(L=t+528|0,U=t+484|0,w=1;;){b:{k:{u:{o:{c:{s:{l:{h:{v:{d:{if((e=w-1|0)>>>0>>0){if(e=(y=f[t+276>>2])+k(e,88)|0,!(v=f[e+64>>2]))break d;if(d=(B=s(9216e4/+(v>>>0)))>=-0x8000000000000000,(N=u(B))<0x8000000000000000?(v=~~B>>>0,h=N>=1?~~(N=B>0?c(s(2.3283064365386963e-10*B),4294967295):l(2.3283064365386963e-10*(B-+(~~B>>>0>>>0))))>>>0:0):(v=0,h=-2147483648),g=B>0x7ffffffffffffc00,v=(I=B==B)?g?-1:d?v:0:0,g=d=I?g?2147483647:d?h:-2147483648:0,f[t+392>>2]=v,f[t+396>>2]=d,!f[e+16>>2])break v;if(o>>>0<=w>>>0)break h;if(h=y+k(w,88)|0,!f[h+16>>2])break l;if(!(v|d))break s;if(y=f[(d=h+16|0)+8>>2],E=f[d+12>>2],d=g+f[e+28>>2]|0,!(I=y-(h=v+f[e+24>>2]|0)|0)&-2147483648==(0|(y=E-((h>>>0>y>>>0)+(d=h>>>0>>0?d+1|0:d)|0)|0))&-1==(v&g))break c;if(I=$e(I,y,v,g),y=v=M,!((0|v)>=0&&((0|v)>0||I)))break b;E=a[e+68>>1],_=f[e+56>>2],C=f[e+60>>2],G=f[e+48>>2],p=f[e+52>>2],W=f[e+40>>2],X=f[e+44>>2],J=f[e+32>>2],x=f[e+36>>2],v=n[e+71|0],g=n[e+70|0],H=f[e+64>>2],Y=f[(R=e+8|0)+4>>2],f[(Q=t+408|0)>>2]=f[R>>2],f[Q+4>>2]=Y,Y=f[(R=e+16|0)+4>>2],f[(Q=t+416|0)>>2]=f[R>>2],f[Q+4>>2]=Y,Y=f[(R=e+24|0)+4>>2],f[(Q=t+424|0)>>2]=f[R>>2],f[Q+4>>2]=Y,Q=f[e+4>>2],f[t+400>>2]=f[e>>2],f[t+404>>2]=Q,f[t+464>>2]=H,i[t+470|0]=g,i[t+471|0]=v,f[t+432>>2]=J,f[t+436>>2]=x,f[t+440>>2]=W,f[t+444>>2]=X,f[t+448>>2]=G,f[t+452>>2]=p,f[t+456>>2]=_,f[t+460>>2]=C,A[t+468>>1]=E;w:{g:{if(g){if((255&(e=v-1|0))>>>0<6)break g;e=0,v=1;break w}Ve(1056620),$f()}e=f[(v=e<<2&1020)+1059424>>2],v=f[v+1059400>>2]}if(f[t+484>>2]=0,f[t+480>>2]=e,f[t+476>>2]=v,f[t+472>>2]=1056088,f[t+488>>2]=h,f[t+492>>2]=d,o>>>0>>0)break o;if(f[t+540>>2]=w,f[t+280>>2]=w,f[t+528>>2]=8,f[t+532>>2]=8,f[t+520>>2]=I,f[t+524>>2]=y,f[t+512>>2]=0,f[t+516>>2]=0,f[t+544>>2]=o-w,e=t+272|0,f[t+536>>2]=e,f[t+508>>2]=t+392,f[t+504>>2]=t+488,f[t+500>>2]=t+400,f[t+496>>2]=t+472,(0|o)==(0|w)){Rr(e,t+496|0,1056072);break k}if(!Gr(t+272|0,w,t+496|0))break k;e=f[t+520>>2],o=v=f[t+512>>2];w:if(!(o=(0|(d=f[t+516>>2]))>(0|(h=f[t+524>>2]))?1:(0|h)<=(0|d)&e>>>0<=o>>>0)){if(o=-1,g=e-v|0,!((_=(0|h)>(0|(y=h-((e>>>0>>0)+d|0)|0))?1:e>>>0>g>>>0&(0|h)>=(0|y))^(E=(0|d)>0?1:!!(0|v)&(0|d)>=0)|!!(0|y))){if(!(g|y))break w;o=g}if(e=f[t+536>>2],h=(d=f[t+544>>2])+(v=f[t+540>>2])|0,f[e>>2]-h>>>0>>0&&Ae(e,h,o,8,88),Pe((h=f[e+4>>2])+k(o=o+v|0,88)|0,h+k(v,88)|0,k(d,88)),f[t+540>>2]=o,!Gr(e,o,t+496|0))break k;e=f[t+520>>2],h=f[t+524>>2],v=f[t+512>>2],d=f[t+516>>2]}o=0,g=v,v=e;w:{if(e>>>0>g>>>0&(0|h)>=(0|d)|(0|h)>(0|d)){if(e=e-g|0,E=t+556|0,(v=(0|(y=h-((v>>>0>>0)+d|0)|0))<(0|h)?1:e>>>0>>0&(0|h)>=(0|y))^(d=(0|d)>0?1:!!(0|g)&(0|d)>=0)|y)break w;o=e}f[t+556>>2]=1,E=t+552|0}if(f[E>>2]=o,1==f[t+556>>2]){if(E=0,o=qe(e=f[t+552>>2],0,88,0),!(M||o>>>0>2147483640)){if(!o){v=8,e=0;break u}if(v=V(o))break u;E=8}Ze(E,1057400),$f()}f[t+576>>2]=0,f[t+564>>2]=1,f[t+560>>2]=1057100,f[t+568>>2]=4,f[t+572>>2]=0,Me(t+560|0,1057400),$f()}Ne(e,o,1056524),$f()}Ve(1056540),$f()}Ve(1056556),$f()}Ne(w,o,1056572),$f()}Ve(1056588),$f()}S=r=S-32|0,f[r+24>>2]=0,f[r+12>>2]=1,f[r+8>>2]=1052896;break r}S=r=S-32|0,f[r+24>>2]=0,f[r+12>>2]=1,f[r+8>>2]=1052860;break r}Je(w,o,1057108),$f()}f[t+568>>2]=0,f[t+564>>2]=v,f[t+560>>2]=e,Rr(t+560|0,t+496|0,1057400),e=f[t+568>>2],y=(E=k(e,88))+(h=f[t+564>>2])|0,C=f[t+560>>2],v=h;u:if(e&&(_=f[t+536>>2],d=(v=f[t+544>>2])+(o=f[t+540>>2])|0,e>>>0>f[_>>2]-d>>>0&&Ae(_,d,e,8,88),Pe((d=f[_+4>>2])+(g=k(e=e+o|0,88))|0,d+k(o,88)|0,k(v,88)),f[t+540>>2]=e,v=h,(0|(o=e))!=(0|(e=f[_+8>>2]))))for(G=(o=f[_+4>>2])+g|0,g=h+88|0,e=o+k(e,88)|0,o=h;;){if(v=g,!E){v=y;break u}if(d=o+88|0,!(p=f[o+4>>2])&2==(0|(g=f[o>>2]))){v=d;break u}if(ze(W=t+560|0,o+8|0,80),f[e>>2]=g,f[e+4>>2]=p,ze(e+8|0,W,80),f[_+8>>2]=f[_+8>>2]+1,g=v+88|0,E=E-88|0,o=d,(0|G)==(0|(e=e+88|0)))break}if((0|v)!=(0|y))for(E=(y-v>>>0)/88|0,g=0;;){if(y=k(g,88)+v|0,d=f[(_=y+76|0)>>2],o=f[y+80>>2]){e=0;u:{if(1!=(0|o)){for(G=1&o,p=-2&o,o=d;fi[f[f[o>>2]+16>>2]](o+12|0,f[o+4>>2],f[o+8>>2]),fi[f[f[o+16>>2]+16>>2]](o+28|0,f[o+20>>2],f[o+24>>2]),o=o+32|0,(0|p)!=(0|(e=e+2|0)););if(!G)break u}fi[f[f[(e=(e<<4)+d|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}d=f[_>>2]}if(o=f[y+72>>2]){if((e=-8&(y=f[d-4>>2]))>>>0<((o<<=4)|((y&=3)?4:8))>>>0)break i;if(e>>>0>o+39>>>0&&y)break e;nr(d)}if((0|E)==(0|(g=g+1|0)))break}if(C){if((e=-8&(o=f[h-4>>2]))>>>0<(v=k(C,88))+((o&=3)?4:8)>>>0)break i;if(e>>>0>v+39>>>0&&o)break e;nr(h)}}mr(L),fi[f[f[t+472>>2]+16>>2]](U,f[t+476>>2],f[t+480>>2]),w=w+I|0,o=f[t+280>>2]}if(!((w=w+1|0)>>>0>>0))break}if(v=a[t+154>>1],e=a[t+152>>1],!o)break f;o=f[t+276>>2]}else v=a[t+154>>1],e=a[t+152>>1],o=f[t+276>>2];if(n[o+68|0]){if(1==n[o+70|0]){w=n[o+71|0]<<3,d=n[o+69|0];break A}Ve(1056652),$f()}Ve(1056636),$f()}break i}f[t+264>>2]=0}v=a[t+154>>1],e=a[t+152>>1]}w=0,d=0}(o=V(27))||(Ze(1,1056668),$f()),f[t+564>>2]=o,f[t+560>>2]=27,i[0|o]=3,f[t+568>>2]=1,1==f[t+560>>2]&&de(t+560|0,1056684),i[f[t+564>>2]+1|0]=25,f[t+568>>2]=2,o=2,2==(2147483646&f[t+560>>2])&&(Ae(t+560|0,2,2,1,1),o=f[t+568>>2]),h=f[t+564>>2]+o|0,i[0|h]=0,i[h+1|0]=2,h=o+2|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056700),i[h+f[t+564>>2]|0]=0,h=o+3|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056716),i[h+f[t+564>>2]|0]=4,h=o+4|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056732),i[h+f[t+564>>2]|0]=17,h=o+5|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056748),i[h+f[t+564>>2]|0]=64,h=o+6|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056764),i[h+f[t+564>>2]|0]=21,h=o+7|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056780),i[h+f[t+564>>2]|0]=0,h=o+8|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056796),i[h+f[t+564>>2]|0]=0,h=o+9|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056812),i[h+f[t+564>>2]|0]=0,h=o+10|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056828),i[h+f[t+564>>2]|0]=0,h=o+11|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056844),i[h+f[t+564>>2]|0]=0,h=o+12|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056860),i[h+f[t+564>>2]|0]=0,h=o+13|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056876),i[h+f[t+564>>2]|0]=0,h=o+14|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056892),i[h+f[t+564>>2]|0]=0,h=o+15|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056908),i[h+f[t+564>>2]|0]=0,h=o+16|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056924),i[h+f[t+564>>2]|0]=0,h=o+17|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056940),i[h+f[t+564>>2]|0]=0,h=o+18|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056956),i[h+f[t+564>>2]|0]=5,h=o+19|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056972),i[h+f[t+564>>2]|0]=2,o=o+20|0,f[t+568>>2]=o,f[t+560>>2]-o>>>0<=1&&(Ae(t+560|0,o,2,1,1),o=f[t+568>>2]),o=f[t+564>>2]+o|0,d=16+((254&d)>>>1|0)|(d<<7)+w<<8,i[0|o]=d,i[o+1|0]=d>>>8,d=(o=f[t+568>>2])+2|0,f[t+568>>2]=d,(0|d)==f[t+560>>2]&&de(t+560|0,1056988),i[d+f[t+564>>2]|0]=6,d=o+3|0,f[t+568>>2]=d,(0|d)==f[t+560>>2]&&de(t+560|0,1057004),i[d+f[t+564>>2]|0]=1,d=o+4|0,f[t+568>>2]=d,(0|d)==f[t+560>>2]&&de(t+560|0,1057020),i[d+f[t+564>>2]|0]=2,f[(d=t+296|0)>>2]=o+5,o=f[t+564>>2],f[t+288>>2]=f[t+560>>2],f[t+292>>2]=o;A:{f:{if(1==f[t+72>>2]){if(!f[t+88>>2])break f;if(f[t+104>>2]){if(o=f[t+80>>2],h=f[t+84>>2],g=f[t+96>>2],w=f[t+100>>2],y=f[t+276>>2],f[r+56>>2]=f[t+272>>2],f[r+60>>2]=y,i[r+93|0]=Z,f[r+88>>2]=1024,f[r+84>>2]=m,A[r+70>>1]=v,A[r+68>>1]=e,e=f[t+116>>2],f[r+48>>2]=f[t+112>>2],f[r+52>>2]=e,f[r+40>>2]=g,f[r+44>>2]=w,f[r+32>>2]=o,f[r+36>>2]=h,f[r+24>>2]=T,f[r+28>>2]=O,b[r+16>>3]=D,f[r>>2]=0,f[r+4>>2]=0,e=f[t+292>>2],f[r+72>>2]=f[t+288>>2],f[r+76>>2]=e,f[r- -64>>2]=f[t+280>>2],f[r+80>>2]=f[d>>2],i[r+92|0]=F,(r=f[t+136>>2])&&fi[f[r+16>>2]](t+148|0,f[t+140>>2],f[t+144>>2]),!(!f[t+164>>2]&2==f[t+160>>2])){if(w=f[t+236>>2],r=f[t+240>>2]){e=0;n:{if(1!=(0|r)){for(v=1&r,r&=-2,o=w;fi[f[f[o>>2]+16>>2]](o+12|0,f[o+4>>2],f[o+8>>2]),fi[f[f[o+16>>2]+16>>2]](o+28|0,f[o+20>>2],f[o+24>>2]),o=o+32|0,(0|r)!=(0|(e=e+2|0)););if(!v)break n}fi[f[f[(r=(e<<4)+w|0)>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2])}w=f[t+236>>2]}if(e=f[t+232>>2]){if((r=-8&(o=f[w-4>>2]))>>>0<((e<<=4)|((o&=3)?4:8))>>>0)break i;if(r>>>0>e+39>>>0&&o)break A;nr(w)}}return void(S=t+640|0)}Ve(1056348),$f()}Ve(1056316),$f()}Ve(1056332),$f()}break e}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}f[r+16>>2]=4,f[r+20>>2]=0,Me(r+8|0,1056604),$f()}function L(r,e,A,a,t,b,u,o){var c,s=0,l=0,h=0,v=0,d=0,w=0;S=c=S-16|0,s=t<<24|(65280&t)<<8|t>>>8&65280|t>>>24;r:{e:{i:{A:{if(t=f[e+4>>2],f[e+8>>2]-t>>>0>=4)l=f[e>>2]+t|0,i[0|l]=s,i[l+1|0]=s>>>8,i[l+2|0]=s>>>16,i[l+3|0]=s>>>24;else if(or(e,4),l=(t=f[e+4>>2])+f[e>>2]|0,i[0|l]=s,i[l+1|0]=s>>>8,i[l+2|0]=s>>>16,i[l+3|0]=s>>>24,(l=f[e+8>>2]-t|0)>>>0<=3)break A;t=t+4|0,f[e+4>>2]=t,f[e+8>>2]-t>>>0<=3&&(or(e,4),t=f[e+4>>2]),t=f[e>>2]+t|0,i[0|t]=109,i[t+1|0]=111,i[t+2|0]=111,i[t+3|0]=102;f:if(!((h=(s=f[e+8>>2])-(t=f[e+4>>2])|0)>>>0<=3)){if(t=t+4|0,f[e+4>>2]=t,s-t>>>0>=4)s=f[e>>2]+t|0,i[0|s]=0,i[s+1|0]=0,i[s+2|0]=0,i[s+3|0]=16;else if(or(e,4),s=(t=f[e+4>>2])+f[e>>2]|0,i[0|s]=0,i[s+1|0]=0,i[s+2|0]=0,i[s+3|0]=16,(l=f[e+8>>2]-t|0)>>>0<=3)break A;if(t=t+4|0,f[e+4>>2]=t,f[e+8>>2]-t>>>0<=3&&(or(e,4),t=f[e+4>>2]),t=f[e>>2]+t|0,i[0|t]=109,i[t+1|0]=102,i[t+2|0]=104,i[t+3|0]=100,!((h=(s=f[e+8>>2])-(t=f[e+4>>2])|0)>>>0<=3)){if(t=t+4|0,f[e+4>>2]=t,s-t>>>0>=4)s=f[e>>2]+t|0,i[0|s]=0,i[s+1|0]=0,i[s+2|0]=0,i[s+3|0]=0;else if(or(e,4),s=(t=f[e+4>>2])+f[e>>2]|0,i[0|s]=0,i[s+1|0]=0,i[s+2|0]=0,i[s+3|0]=0,(l=f[e+8>>2]-t|0)>>>0<=3)break A;if(t=t+4|0,f[e+4>>2]=t,f[e+8>>2]-t>>>0>=4)s=f[e>>2]+t|0,i[0|s]=0,i[s+1|0]=0,i[s+2|0]=0,i[s+3|0]=0;else if(or(e,4),s=(t=f[e+4>>2])+f[e>>2]|0,i[0|s]=0,i[s+1|0]=0,i[s+2|0]=0,i[s+3|0]=0,(l=f[e+8>>2]-t|0)>>>0<=3)break A;t=t+4|0,f[e+4>>2]=t;n:{a:{t:{b:{k:{if(A){if(s=(s=(v=(l=f[A+64>>2])<<4)+72|0)<<24|(65280&s)<<8|s>>>8&65280|s>>>24,f[e+8>>2]-t>>>0>=4)h=f[e>>2]+t|0,i[0|h]=s,i[h+1|0]=s>>>8,i[h+2|0]=s>>>16,i[h+3|0]=s>>>24;else if(or(e,4),h=(t=f[e+4>>2])+f[e>>2]|0,i[0|h]=s,i[h+1|0]=s>>>8,i[h+2|0]=s>>>16,i[h+3|0]=s>>>24,(h=f[e+8>>2]-t|0)>>>0<=3)break f;if(t=t+4|0,f[e+4>>2]=t,f[e+8>>2]-t>>>0<=3&&(or(e,4),t=f[e+4>>2]),t=f[e>>2]+t|0,i[0|t]=116,i[t+1|0]=114,i[t+2|0]=97,i[t+3|0]=102,t=f[e+4>>2],(h=f[e+8>>2]-t|0)>>>0<=3)break f;if(f[e+4>>2]=t+4,Ir(e,f[A+24>>2],1),t=f[e+4>>2],f[e+8>>2]-t>>>0<=3&&(or(e,4),t=f[e+4>>2]),t=f[e>>2]+t|0,i[0|t]=0,i[t+1|0]=1,i[t+2|0]=0,i[t+3|0]=0,t=f[e+4>>2],(h=f[e+8>>2]-t|0)>>>0<=3)break f;if(f[e+4>>2]=t+4,Nr(e,9e4,b,u,o),s=(t=v+20|0)<<24|(65280&t)<<8|t>>>8&65280|t>>>24,d=f[A+60>>2],t=f[e+4>>2],f[e+8>>2]-t>>>0>=4)A=f[e>>2]+t|0,i[0|A]=s,i[A+1|0]=s>>>8,i[A+2|0]=s>>>16,i[A+3|0]=s>>>24;else if(or(e,4),A=(t=f[e+4>>2])+f[e>>2]|0,i[0|A]=s,i[A+1|0]=s>>>8,i[A+2|0]=s>>>16,i[A+3|0]=s>>>24,(A=f[e+8>>2]-t|0)>>>0<=3)break i;if(A=t+4|0,f[e+4>>2]=A,f[e+8>>2]-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=116,i[A+1|0]=114,i[A+2|0]=117,i[A+3|0]=110,(h=(t=f[e+8>>2])-(A=f[e+4>>2])|0)>>>0<=3)break f;if(A=A+4|0,f[e+4>>2]=A,t-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=1,i[A+1|0]=0,i[A+2|0]=15,i[A+3|0]=1,(t=(s=f[e+8>>2])-(A=f[e+4>>2])|0)>>>0<=3)break k;if(t=A+4|0,f[e+4>>2]=t,A=l<<24|(65280&l)<<8|l>>>8&65280|l>>>24,s-t>>>0>=4)s=f[e>>2]+t|0,i[0|s]=A,i[s+1|0]=A>>>8,i[s+2|0]=A>>>16,i[s+3|0]=A>>>24;else if(or(e,4),s=(t=f[e+4>>2])+f[e>>2]|0,i[0|s]=A,i[s+1|0]=A>>>8,i[s+2|0]=A>>>16,i[s+3|0]=A>>>24,(A=f[e+8>>2]-t|0)>>>0<=3)break i;if(t=t+4|0,f[e+4>>2]=t,A=(A=v+104|0)<<24|(65280&A)<<8|A>>>8&65280|A>>>24,f[e+8>>2]-t>>>0>=4)s=f[e>>2]+t|0,i[0|s]=A,i[s+1|0]=A>>>8,i[s+2|0]=A>>>16,i[s+3|0]=A>>>24;else if(or(e,4),s=(t=f[e+4>>2])+f[e>>2]|0,i[0|s]=A,i[s+1|0]=A>>>8,i[s+2|0]=A>>>16,i[s+3|0]=A>>>24,(A=f[e+8>>2]-t|0)>>>0<=3)break i;if(t=t+4|0,f[e+4>>2]=t,l)for(w=k(l,120),l=0;;){if(1!=f[(v=l+d|0)- -64>>2])break b;if(A=(A=f[v+72>>2])<<24|(65280&A)<<8|A>>>8&65280|A>>>24,f[e+8>>2]-t>>>0>=4)s=f[e>>2]+t|0,i[0|s]=A,i[s+1|0]=A>>>8,i[s+2|0]=A>>>16,i[s+3|0]=A>>>24;else if(or(e,4),s=(t=f[e+4>>2])+f[e>>2]|0,i[0|s]=A,i[s+1|0]=A>>>8,i[s+2|0]=A>>>16,i[s+3|0]=A>>>24,(h=f[e+8>>2]-t|0)>>>0<=3)break f;if(t=t+4|0,f[e+4>>2]=t,!f[v+80>>2])break t;if(A=(A=f[v+116>>2])<<24|(65280&A)<<8|A>>>8&65280|A>>>24,s=f[v+88>>2],f[e+8>>2]-t>>>0>=4)h=f[e>>2]+t|0,i[0|h]=A,i[h+1|0]=A>>>8,i[h+2|0]=A>>>16,i[h+3|0]=A>>>24;else if(or(e,4),h=(t=f[e+4>>2])+f[e>>2]|0,i[0|h]=A,i[h+1|0]=A>>>8,i[h+2|0]=A>>>16,i[h+3|0]=A>>>24,(h=f[e+8>>2]-t|0)>>>0<=3)break f;A=t+4|0,f[e+4>>2]=A;u:{if(!n[v+96|0]){if(f[e+8>>2]-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=0,i[A+1|0]=1,i[A+2|0]=0,i[A+3|0]=0,(h=(A=f[e+8>>2])-(t=f[e+4>>2])|0)>>>0>3)break u;break f}if(f[e+8>>2]-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=2,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(h=(A=f[e+8>>2])-(t=f[e+4>>2])|0)>>>0<=3)break f}if(t=t+4|0,f[e+4>>2]=t,s=s<<24|(65280&s)<<8|s>>>8&65280|s>>>24,A-t>>>0>=4)A=f[e>>2]+t|0,i[0|A]=s,i[A+1|0]=s>>>8,i[A+2|0]=s>>>16,i[A+3|0]=s>>>24;else if(or(e,4),A=(t=f[e+4>>2])+f[e>>2]|0,i[0|A]=s,i[A+1|0]=s>>>8,i[A+2|0]=s>>>16,i[A+3|0]=s>>>24,(A=f[e+8>>2]-t|0)>>>0<=3)break i;if(t=t+4|0,f[e+4>>2]=t,(0|w)==(0|(l=l+120|0)))break}}if(!a)break n;if(A=(A=(h=(s=f[a+72>>2])<<2)+72|0)<<24|(65280&A)<<8|A>>>8&65280|A>>>24,v=f[a>>2],f[e+8>>2]-t>>>0>=4)l=f[e>>2]+t|0,i[0|l]=A,i[l+1|0]=A>>>8,i[l+2|0]=A>>>16,i[l+3|0]=A>>>24;else if(or(e,4),l=(t=f[e+4>>2])+f[e>>2]|0,i[0|l]=A,i[l+1|0]=A>>>8,i[l+2|0]=A>>>16,i[l+3|0]=A>>>24,(l=f[e+8>>2]-t|0)>>>0<=3)break A;if(A=t+4|0,f[e+4>>2]=A,f[e+8>>2]-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=116,i[A+1|0]=114,i[A+2|0]=97,i[A+3|0]=102,A=f[e+4>>2],(l=f[e+8>>2]-A|0)>>>0<=3)break A;if(f[e+4>>2]=A+4,Ir(e,f[a+96>>2],2),A=f[e+4>>2],f[e+8>>2]-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=2,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,A=f[e+4>>2],(l=f[e+8>>2]-A|0)>>>0<=3)break A;if(f[e+4>>2]=A+4,Nr(e,f[a+92>>2],b,u,o),A=(A=h+20|0)<<24|(65280&A)<<8|A>>>8&65280|A>>>24,t=f[e+4>>2],f[e+8>>2]-t>>>0>=4)b=f[e>>2]+t|0,i[0|b]=A,i[b+1|0]=A>>>8,i[b+2|0]=A>>>16,i[b+3|0]=A>>>24;else if(or(e,4),b=(t=f[e+4>>2])+f[e>>2]|0,i[0|b]=A,i[b+1|0]=A>>>8,i[b+2|0]=A>>>16,i[b+3|0]=A>>>24,(o=f[e+8>>2]-t|0)>>>0<=3)break e;if(A=t+4|0,f[e+4>>2]=A,f[e+8>>2]-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=116,i[A+1|0]=114,i[A+2|0]=117,i[A+3|0]=110,(l=(t=f[e+8>>2])-(A=f[e+4>>2])|0)>>>0<=3)break A;if(A=A+4|0,f[e+4>>2]=A,t-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=2,i[A+3|0]=1,(o=(b=f[e+8>>2])-(A=f[e+4>>2])|0)>>>0<=3)break e;if(t=A+4|0,f[e+4>>2]=t,A=s<<24|(65280&s)<<8|s>>>8&65280|s>>>24,b-t>>>0>=4)b=f[e>>2]+t|0,i[0|b]=A,i[b+1|0]=A>>>8,i[b+2|0]=A>>>16,i[b+3|0]=A>>>24;else if(or(e,4),b=(t=f[e+4>>2])+f[e>>2]|0,i[0|b]=A,i[b+1|0]=A>>>8,i[b+2|0]=A>>>16,i[b+3|0]=A>>>24,(o=f[e+8>>2]-t|0)>>>0<=3)break e;if(t=t+4|0,f[e+4>>2]=t,A=(A=h+104|0)<<24|(65280&A)<<8|A>>>8&65280|A>>>24,f[e+8>>2]-t>>>0>=4)b=f[e>>2]+t|0,i[0|b]=A,i[b+1|0]=A>>>8,i[b+2|0]=A>>>16,i[b+3|0]=A>>>24;else if(or(e,4),b=(t=f[e+4>>2])+f[e>>2]|0,i[0|b]=A,i[b+1|0]=A>>>8,i[b+2|0]=A>>>16,i[b+3|0]=A>>>24,(o=f[e+8>>2]-t|0)>>>0<=3)break e;if(t=t+4|0,f[e+4>>2]=t,A=f[a+68>>2],!(1&v))break a;if(!s)break n;for(l=k(s,104),A=A+100|0,a=f[e+8>>2];;){if(b=(b=f[A>>2])<<24|(65280&b)<<8|b>>>8&65280|b>>>24,a-t>>>0>=4)u=f[e>>2]+t|0,i[0|u]=b,i[u+1|0]=b>>>8,i[u+2|0]=b>>>16,i[u+3|0]=b>>>24;else if(or(e,4),a=(t=f[e+4>>2])+f[e>>2]|0,i[0|a]=b,i[a+1|0]=b>>>8,i[a+2|0]=b>>>16,i[a+3|0]=b>>>24,(o=(a=f[e+8>>2])-t|0)>>>0<=3)break e;if(t=t+4|0,f[e+4>>2]=t,A=A+104|0,!(l=l-104|0))break}break n}f[c+12>>2]=t;break r}Ve(1055044),$f()}Ve(1055060),$f()}if(s)for(l=k(s,88),A=A+84|0,a=f[e+8>>2];;){if(b=(b=f[A>>2])<<24|(65280&b)<<8|b>>>8&65280|b>>>24,a-t>>>0>=4)u=f[e>>2]+t|0,i[0|u]=b,i[u+1|0]=b>>>8,i[u+2|0]=b>>>16,i[u+3|0]=b>>>24;else if(or(e,4),a=(t=f[e+4>>2])+f[e>>2]|0,i[0|a]=b,i[a+1|0]=b>>>8,i[a+2|0]=b>>>16,i[a+3|0]=b>>>24,(o=(a=f[e+8>>2])-t|0)>>>0<=3)break e;if(t=t+4|0,f[e+4>>2]=t,A=A+88|0,!(l=l-88|0))break}}return f[r>>2]=-2147483648,void(S=c+16|0)}}f[c+12>>2]=h;break r}f[c+12>>2]=l;break r}f[c+12>>2]=A;break r}f[c+12>>2]=o}f[c+8>>2]=4,pe(c+8|0),$f()}function U(r,e){var A,a=0,b=0,u=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0;S=A=S-496|0,f[A+400>>2]=0,f[A+384>>2]=0,f[A+368>>2]=0,f[A+344>>2]=0,f[A+328>>2]=0,R=c=f[e+108>>2];r:{e:{i:{A:{f:{n:{a:{t:{b:{if(2!=(0|(Q=f[e+104>>2]))|c){if(v=24,-2147483648!=(0|(N=f[e+240>>2]))&&(u=f[e+248>>2])){c=f[e+244>>2];k:{if(1==(0|u))a=62;else{for(h=1&u,w=-2&u,b=c;u=f[(a=b+72|0)>>2],d=124+(f[(!f[b+4>>2]&t[b>>2]<2?68:60)+b>>2]+(f[72+((!f[a+4>>2]&u>>>0<2?68:60)+b|0)>>2]+d|0)|0)|0,b=b+144|0,(0|w)!=(0|(y=y+2|0)););if(!h)break k;a=d+62|0}u=c+k(y,72)|0,c=f[u>>2],d=f[u+(!f[u+4>>2]&c>>>0<2?68:60)>>2]+a|0}v=d+24|0}if(l=f[e+232>>2],C=f[e+236>>2],h=f[e+136>>2],_=f[e+140>>2],u=f[e+144>>2],g=f[e+148>>2],B=96+((c=f[e+168>>2])<<4)|0,f[A+408>>2]=B,c){if(a=f[e+164>>2],y=3&c,c>>>0<4)d=0;else for(b=a+476|0,c&=33554428,d=0;d=f[b>>2]+(f[b-120>>2]+(f[b-240>>2]+(f[b-360>>2]+d|0)|0)|0)|0,b=b+480|0,(0|c)!=(0|(E=E+4|0)););if(y)for(b=116+(a+k(E,120)|0)|0;d=f[b>>2]+d|0,b=b+120|0,y=y-1|0;);w=d+8|0}else w=8;f[A+412>>2]=w;k:{u:{o:{if((0|(b=w+(v+B|0)|0))>=0){if(!b){f[A+440>>2]=0,f[A+444>>2]=1,f[A+432>>2]=1,f[A+436>>2]=0;break u}if(E=V(b))break o;r=1}else r=0;Ze(r,1058752),$f()}if(f[A+436>>2]=0,f[A+432>>2]=E,f[A+440>>2]=b,f[A+444>>2]=b>>>0>131071?29:129-(o(b>>>10|0)<<2)|0,a=0,b>>>0>23)break k}or(A+432|0,24),b=f[A+440>>2],E=f[A+432>>2],a=f[A+436>>2]}if(s=n[1054744]|n[1054745]<<8|n[1054746]<<16|n[1054747]<<24,c=a+E|0,v=n[1054740]|n[1054741]<<8|n[1054742]<<16|n[1054743]<<24,i[0|c]=v,i[c+1|0]=v>>>8,i[c+2|0]=v>>>16,i[c+3|0]=v>>>24,i[c+4|0]=s,i[c+5|0]=s>>>8,i[c+6|0]=s>>>16,i[c+7|0]=s>>>24,s=n[1054760]|n[1054761]<<8|n[1054762]<<16|n[1054763]<<24,I=c+16|0,v=n[1054756]|n[1054757]<<8|n[1054758]<<16|n[1054759]<<24,i[0|I]=v,i[I+1|0]=v>>>8,i[I+2|0]=v>>>16,i[I+3|0]=v>>>24,i[I+4|0]=s,i[I+5|0]=s>>>8,i[I+6|0]=s>>>16,i[I+7|0]=s>>>24,v=n[1054752]|n[1054753]<<8|n[1054754]<<16|n[1054755]<<24,s=c+8|0,c=n[1054748]|n[1054749]<<8|n[1054750]<<16|n[1054751]<<24,i[0|s]=c,i[s+1|0]=c>>>8,i[s+2|0]=c>>>16,i[s+3|0]=c>>>24,i[s+4|0]=v,i[s+5|0]=v>>>8,i[s+6|0]=v>>>16,i[s+7|0]=v>>>24,(b=b-a|0)>>>0<=23)break r;if(I=e+104|0,c=u-l|0,b=(u=g-((u>>>0>>0)+C|0)|0)-2|0,g=(g=(0|u)<-1)?u+2|0:u,g=C+((u=(0|u)>0)?b:g)|0,g=(c=c+l|0)>>>0>>0?g+1|0:g,b=a+24|0,f[A+436>>2]=b,-2147483648!=(0|N)&&(u=f[e+248>>2])){for(b=f[e+244>>2],d=k(u,72);K(A+432|0,b),b=b+72|0,d=d-72|0;);b=f[A+436>>2]}if(d=v=A+432|0,L(N=A+456|0,v,I,0,B,c,g,9e4),-2147483648!=(0|(E=f[A+456>>2])))break i;if(u=(a=f[A+436>>2])-b|0,f[A+416>>2]=u,(0|u)!=(0|B))break b;if(tr(v,I,0,w),u=f[A+436>>2]-a|0,f[A+420>>2]=u,(0|u)!=(0|w))break t;if(w=h-l|0,h=u=_-((l>>>0>h>>>0)+C|0)|0,v=u+2|0,a=w,u=(u=(0|u)<-1)?v:h,_=h-2|0,v=f[(s=A+440|0)+4>>2],f[(b=A+464|0)>>2]=f[s>>2],f[b+4>>2]=v,v=f[A+436>>2],f[A+456>>2]=f[A+432>>2],f[A+460>>2]=v,Lr(A+480|0,N),(v=f[A+328>>2])&&fi[f[v+16>>2]](A+340|0,f[A+332>>2],f[A+336>>2]),v=f[(s=A+488|0)+4>>2],f[(b=A+336|0)>>2]=f[s>>2],f[b+4>>2]=v,v=f[A+484>>2],f[A+328>>2]=f[A+480>>2],f[A+332>>2]=v,b=0,v=C+((h=(0|h)>0)?_:u)|0,s=(a=(a=h?w:a)+l|0)>>>0>>0?v+1|0:v,I=f[A+368>>2]){u=g,h=_=f[A+364>>2],d=w=f[A+360>>2];k:{u:switch((I>>>0<9e4)-(I>>>0>9e4)&255){default:9e4!=(0|I)&&(Ue(A+272|0,w,h,l=h>>31,l,9e4,0,0,0),Le(A+256|0,f[A+272>>2],f[A+276>>2],f[A+280>>2],f[A+284>>2],I),w=f[A+256>>2],h=f[A+260>>2]),h=c>>>0>>0&(0|h)>=(0|g)|(0|u)<(0|h);break k;case 0:h=c>>>0>>0&(0|h)>=(0|g)|(0|u)<(0|h);break k;case 1:break u}9e4!=(0|I)?(Ue(A+304|0,c,u,l=g>>31,l,I,0,0,0),Le(A+288|0,f[A+304>>2],f[A+308>>2],f[A+312>>2],f[A+316>>2],9e4),l=f[A+292>>2],v=f[A+288>>2]):(l=u,v=c),h=v>>>0>>0&(0|l)<=(0|h)|(0|l)<(0|h)}w=h?c:d,_=h?u:_,u=h?9e4:I}else u=0;if(f[A+368>>2]=u||9e4,f[A+360>>2]=u?w:c,f[A+364>>2]=u?_:g,_=f[A+384>>2]){u=s,g=v=f[A+380>>2],b=c=f[A+376>>2];k:{u:switch((_>>>0<9e4)-(_>>>0>9e4)&255){default:9e4!=(0|_)&&(Ue(A+208|0,c,g,l=g>>31,l,9e4,0,0,0),Le(A+192|0,f[A+208>>2],f[A+212>>2],f[A+216>>2],f[A+220>>2],_),c=f[A+192>>2],g=f[A+196>>2]),w=a>>>0>>0&(0|s)<=(0|g)|(0|u)<(0|g);break k;case 0:w=a>>>0>>0&(0|s)<=(0|g)|(0|u)<(0|g);break k;case 1:break u}9e4!=(0|_)?(Ue(A+240|0,a,u,l=s>>31,l,_,0,0,0),Le(A+224|0,f[A+240>>2],f[A+244>>2],f[A+248>>2],f[A+252>>2],9e4),h=f[A+228>>2],w=f[A+224>>2]):(h=u,w=a),w=(0|h)<=(0|g)&c>>>0>w>>>0|(0|h)<(0|g)}c=w?a:b,b=w?9e4:_,g=w?u:v}f[A+400>>2]=9e4,f[A+384>>2]=b||9e4,f[A+392>>2]=a,f[A+396>>2]=s,f[A+376>>2]=b?c:a,f[A+380>>2]=b?g:s}if(h=f[e>>2],!f[e+4>>2]&2==(0|h))break n;if(c=(u=f[e+48>>2])-(w=f[e+232>>2])|0,_=f[e+236>>2],l=(u=f[e+52>>2]-(_+(u>>>0>>0)|0)|0)-2|0,a=(a=(0|u)<-1)?u+2|0:u,l=_+((u=(0|u)>0)?l:a)|0,v=(u=c+w|0)>>>0>>0?l+1|0:l,(N=9e4==(0|(B=f[e+92>>2])))||(Ue(A+176|0,B,0,0,0,a=u,v,u=v>>31,u),Le(A+160|0,f[A+176>>2],f[A+180>>2],f[A+184>>2],f[A+188>>2],9e4),v=f[A+164>>2],u=f[A+160>>2]),c=(a=f[e+40>>2])-w|0,b=(a=f[e+44>>2]-((a>>>0>>0)+_|0)|0)-2|0,g=(g=(0|a)<-1)?a+2|0:a,l=_+((a=(0|a)>0)?b:g)|0,g=(c=c+w|0)>>>0>>0?l+1|0:l,N||(Ue(A+144|0,B,0,0,0,c,g,l=g>>31,l),Le(A+128|0,f[A+144>>2],f[A+148>>2],f[A+152>>2],f[A+156>>2],9e4),g=f[A+132>>2],c=f[A+128>>2]),l=24,I=2!=(0|Q)|!!(0|R)|-2147483648==f[e+240>>2])break a;if(!(s=f[e+248>>2]))break a;a=f[e+244>>2];k:{if(1!=(0|s)){for(R=1&s,N=-2&s,d=0,b=a,y=0;l=f[(s=b+72|0)>>2],d=124+(f[(!f[b+4>>2]&t[b>>2]<2?68:60)+b>>2]+(f[72+((!f[s+4>>2]&l>>>0<2?68:60)+b|0)>>2]+d|0)|0)|0,b=b+144|0,(0|N)!=(0|(y=y+2|0)););if(!R)break k;s=d+62|0}else y=0,s=62;l=a+k(y,72)|0,a=f[l>>2],d=f[l+(!f[l+4>>2]&a>>>0<2?68:60)>>2]+s|0}l=d+24|0;break a}f[A+468>>2]=0,f[A+472>>2]=0,f[A+460>>2]=1,f[A+464>>2]=4,f[A+456>>2]=1054700,Se(A+416|0,A+408|0,A+456|0,1054764),$f()}f[A+468>>2]=0,f[A+472>>2]=0,f[A+460>>2]=1,f[A+464>>2]=4,f[A+456>>2]=1054700,Se(A+420|0,A+412|0,A+456|0,1054780),$f()}N=96+((a=f[e+72>>2])<<2)|0,f[A+424>>2]=N,s=f[e+68>>2];a:if(1&h){if(!a){b=0;break a}if(y=3&a,a>>>0<4)b=0,E=0;else for(d=s+412|0,a&=-4,b=0,E=0;b=f[d>>2]+(f[d-104>>2]+(f[d-208>>2]+(f[d-312>>2]+b|0)|0)|0)|0,d=d+416|0,(0|a)!=(0|(E=E+4|0)););if(!y)break a;for(d=100+(s+k(E,104)|0)|0;b=f[d>>2]+b|0,d=d+104|0,y=y-1|0;);}else if(a){if(y=3&a,a>>>0<4)b=0,E=0;else for(d=s+348|0,a&=-4,b=0,E=0;b=f[d>>2]+(f[d-88>>2]+(f[d-176>>2]+(f[d-264>>2]+b|0)|0)|0)|0,d=d+352|0,(0|a)!=(0|(E=E+4|0)););if(y)for(d=84+(s+k(E,88)|0)|0;b=f[d>>2]+b|0,d=d+88|0,y=y-1|0;);}else b=0;Q=b+8|0,f[A+428>>2]=Q;a:{t:{b:{if((0|(b=Q+(l+N|0)|0))>=0){if(!b){f[A+440>>2]=0,f[A+444>>2]=1,f[A+432>>2]=1,f[A+436>>2]=0;break t}if(y=V(b))break b;r=1}else r=0;Ze(r,1058752),$f()}if(f[A+436>>2]=0,f[A+432>>2]=y,f[A+440>>2]=b,f[A+444>>2]=b>>>0>131071?29:129-(o(b>>>10|0)<<2)|0,a=0,b>>>0>23)break a}or(A+432|0,24),b=f[A+440>>2],y=f[A+432>>2],a=f[A+436>>2]}if(s=n[1054744]|n[1054745]<<8|n[1054746]<<16|n[1054747]<<24,h=a+y|0,l=n[1054740]|n[1054741]<<8|n[1054742]<<16|n[1054743]<<24,i[0|h]=l,i[h+1|0]=l>>>8,i[h+2|0]=l>>>16,i[h+3|0]=l>>>24,i[h+4|0]=s,i[h+5|0]=s>>>8,i[h+6|0]=s>>>16,i[h+7|0]=s>>>24,s=n[1054760]|n[1054761]<<8|n[1054762]<<16|n[1054763]<<24,R=h+16|0,l=n[1054756]|n[1054757]<<8|n[1054758]<<16|n[1054759]<<24,i[0|R]=l,i[R+1|0]=l>>>8,i[R+2|0]=l>>>16,i[R+3|0]=l>>>24,i[R+4|0]=s,i[R+5|0]=s>>>8,i[R+6|0]=s>>>16,i[R+7|0]=s>>>24,l=n[1054752]|n[1054753]<<8|n[1054754]<<16|n[1054755]<<24,s=h+8|0,h=n[1054748]|n[1054749]<<8|n[1054750]<<16|n[1054751]<<24,i[0|s]=h,i[s+1|0]=h>>>8,i[s+2|0]=h>>>16,i[s+3|0]=h>>>24,i[s+4|0]=l,i[s+5|0]=l>>>8,i[s+6|0]=l>>>16,i[s+7|0]=l>>>24,(b=b-a|0)>>>0<=23)break r;if(b=a+24|0,f[A+436>>2]=b,!I&&(a=f[e+248>>2])){for(b=f[e+244>>2],d=k(a,72);K(A+432|0,b),b=b+72|0,d=d-72|0;);b=f[A+436>>2]}if(d=l=A+432|0,L(s=A+456|0,l,0,e,N,u,v,B),-2147483648!=(0|(E=f[A+456>>2])))break i;if(a=(h=f[A+436>>2])-b|0,f[A+448>>2]=a,(0|a)!=(0|N))break f;if(tr(l,0,e,Q),e=f[A+436>>2]-h|0,f[A+452>>2]=e,(0|e)!=(0|Q))break A;if(e=f[(a=A+440|0)+4>>2],f[(h=A+464|0)>>2]=f[a>>2],f[h+4>>2]=e,e=f[A+436>>2],f[A+456>>2]=f[A+432>>2],f[A+460>>2]=e,Lr(A+480|0,s),(e=f[A+344>>2])&&fi[f[e+16>>2]](A+356|0,f[A+348>>2],f[A+352>>2]),e=f[A+484>>2],f[(a=A+344|0)>>2]=f[A+480>>2],f[a+4>>2]=e,h=a+8|0,e=f[(a=A+488|0)+4>>2],f[h>>2]=f[a>>2],f[h+4>>2]=e,b=0,Q=f[A+368>>2]){e=v,w=s=f[A+364>>2],d=a=f[A+360>>2];a:{t:switch((B>>>0>Q>>>0)-(B>>>0>>0)&255){default:(0|B)!=(0|Q)&&(Ue(A+80|0,a,w,l=w>>31,l,B,0,0,0),Le(A- -64|0,f[A+80>>2],f[A+84>>2],f[A+88>>2],f[A+92>>2],Q),a=f[A+64>>2],w=f[A+68>>2]),a=(0|v)<=(0|w)&a>>>0>u>>>0|(0|e)<(0|w);break a;case 0:a=(0|v)<=(0|w)&a>>>0>u>>>0|(0|e)<(0|w);break a;case 1:break t}(0|B)!=(0|Q)?(Ue(A+112|0,u,e,l=v>>31,l,Q,0,0,0),Le(A+96|0,f[A+112>>2],f[A+116>>2],f[A+120>>2],f[A+124>>2],B),l=f[A+100>>2],h=f[A+96>>2]):(l=e,h=u),a=(0|l)<=(0|w)&a>>>0>h>>>0|(0|l)<(0|w)}w=a?u:d,_=a?e:s,e=a?B:Q}else e=0;if(f[A+368>>2]=e||B,f[A+360>>2]=e?w:u,f[A+364>>2]=e?_:v,s=f[A+384>>2]){e=g,a=v=f[A+380>>2],b=u=f[A+376>>2];a:{t:switch((s>>>0>>0)-(s>>>0>B>>>0)&255){default:(0|s)!=(0|B)&&(Ue(A+16|0,h=u,a,u=a>>31,u,B,0,0,0),Le(A,f[A+16>>2],f[A+20>>2],f[A+24>>2],f[A+28>>2],s),u=f[A>>2],a=f[A+4>>2]),a=u>>>0>c>>>0&(0|a)>=(0|g)|(0|e)<(0|a);break a;case 0:a=u>>>0>c>>>0&(0|a)>=(0|g)|(0|e)<(0|a);break a;case 1:break t}(0|s)!=(0|B)?(Ue(A+48|0,c,e,l=g>>31,l,s,0,0,0),Le(A+32|0,f[A+48>>2],f[A+52>>2],f[A+56>>2],f[A+60>>2],B),h=f[A+36>>2],w=f[A+32>>2]):(h=e,w=c),a=u>>>0>w>>>0&(0|a)>=(0|h)|(0|a)>(0|h)}u=a?c:b,b=a?B:s,v=a?e:v}f[A+384>>2]=b||B,f[A+376>>2]=b?u:c,f[A+380>>2]=b?v:g}ze(r+8|0,A+328|0,80),f[r>>2]=0;break e}f[A+468>>2]=0,f[A+472>>2]=0,f[A+460>>2]=1,f[A+464>>2]=4,f[A+456>>2]=1054700,Se(A+448|0,A+424|0,A+456|0,1054796),$f()}f[A+468>>2]=0,f[A+472>>2]=0,f[A+460>>2]=1,f[A+464>>2]=4,f[A+456>>2]=1054700,Se(A+452|0,A+428|0,A+456|0,1054812),$f()}e=f[A+464>>2],f[r+8>>2]=f[A+460>>2],f[r+12>>2]=e,f[r+4>>2]=E,f[r>>2]=1;i:{A:{f:{n:{if(1&(r=f[d+12>>2])){if(!(u=(r=r>>>5|0)+f[d+8>>2]|0))break i;if(r=f[d>>2]-r|0,(c=-8&(e=f[r-4>>2]))>>>0>>0)break A;if(!e|c>>>0<=u+39>>>0)break n;break f}if(e=f[r+16>>2],f[r+16>>2]=e-1,1!=(0|e))break i;if(a=f[r>>2]){if(c=f[r+4>>2],(u=-8&(e=f[c-4>>2]))>>>0>>0)break A;if(u>>>0>a+39>>>0&&e)break f;nr(c)}if((c=-8&(e=f[r-4>>2]))>>>0<((e&=3)?24:28)>>>0)break A;if(e&&c>>>0>=60)break f}nr(r);break i}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}(r=f[A+328>>2])&&fi[f[r+16>>2]](A+340|0,f[A+332>>2],f[A+336>>2]),(r=f[A+344>>2])&&fi[f[r+16>>2]](A+356|0,f[A+348>>2],f[A+352>>2])}return void(S=A+496|0)}f[A+460>>2]=b,f[A+456>>2]=24,pe(A+456|0),$f()}function V(r){var e=0,i=0,A=0,n=0,a=0,b=0,k=0,u=0,c=0,s=0,l=0;r:{e:{i:{A:{f:{n:{a:{t:{if(!(r>>>0>=245)){if(3&(e=(i=f[264978])>>>(r=(a=r>>>0<11?16:r+11&504)>>>3|0)|0)){A=(r=(b=r+(1&~e)|0)<<3)+1059648|0,e=f[r+1059656>>2],(0|A)==(0|(n=f[e+8>>2]))?(s=1059912,l=Ai(b)&i,f[s>>2]=l):(f[n+12>>2]=A,f[A+8>>2]=n),f[e+4>>2]=3|r,f[(r=r+e|0)+4>>2]=1|f[r+4>>2];break e}if(t[264980]>=a>>>0)break n;b:{k:{if(!e){if(!(r=f[264979]))break n;for(r=r?31-o(r-1^r)|0:32,i=f[1059504+(r<<2)>>2],n=(-8&f[i+4>>2])-a|0,e=i;;){if(!(r=f[i+16>>2])&&!(r=f[i+20>>2])){k=f[e+24>>2];u:{o:{if((0|e)==(0|(r=f[e+12>>2]))){if(r=f[e+20>>2],i=f[(r?20:16)+e>>2])break o;r=0;break u}i=f[e+8>>2],f[i+12>>2]=r,f[r+8>>2]=i;break u}for(A=r?e+20|0:e+16|0;b=A,A=(i=f[(r=i)+20>>2])?r+20|0:r+16|0,i=f[(i?20:16)+r>>2];);f[b>>2]=0}if(!k)break b;i=f[e+28>>2];u:{if(f[(A=1059504+(i<<2)|0)>>2]!=(0|e)){if(f[k+16>>2]!=(0|e)){if(f[k+20>>2]=r,r)break u;break b}if(f[k+16>>2]=r,r)break u;break b}if(f[A>>2]=r,!r)break k}if(f[r+24>>2]=k,(i=f[e+16>>2])&&(f[r+16>>2]=i,f[i+24>>2]=r),!(i=f[e+20>>2]))break b;f[r+20>>2]=i,f[i+24>>2]=r;break b}n=(i=(A=(-8&f[r+4>>2])-a|0)>>>0>>0)?A:n,e=i?r:e,i=r}}A=(e=(b=(r=(0-(A=2<>2],(0|A)==(0|(n=f[r+8>>2]))?(s=1059912,l=Ai(b)&i,f[s>>2]=l):(f[n+12>>2]=A,f[A+8>>2]=n),f[r+4>>2]=3|a,A=e-a|0,f[(b=r+a|0)+4>>2]=1|A,f[r+e>>2]=A,(n=f[264980])&&(e=1059648+(-8&n)|0,i=f[264982],(a=f[264978])&(n=1<<(n>>>3))?n=f[e+8>>2]:(f[264978]=n|a,n=e),f[e+8>>2]=i,f[n+12>>2]=i,f[i+12>>2]=e,f[i+8>>2]=n),f[264982]=b,f[264980]=A;break r}s=1059916,l=f[264979]&Ai(i),f[s>>2]=l}n>>>0>=16?(f[e+4>>2]=3|a,f[(A=e+a|0)+4>>2]=1|n,f[n+A>>2]=n,(b=f[264980])&&(r=1059648+(-8&b)|0,i=f[264982],(a=f[264978])&(b=1<<(b>>>3))?b=f[r+8>>2]:(f[264978]=a|b,b=r),f[r+8>>2]=i,f[b+12>>2]=i,f[i+12>>2]=r,f[i+8>>2]=b),f[264982]=A,f[264980]=n):(r=n+a|0,f[e+4>>2]=3|r,f[(r=r+e|0)+4>>2]=1|f[r+4>>2]);break e}if(r>>>0>4294901708)break f;if(a=-8&(e=r+11|0),!(u=f[264979]))break n;if(k=31,n=0-a|0,r>>>0<=16777204&&(k=62+((a>>>6-(r=o(e>>>8|0))&1)-(r<<1)|0)|0),e=f[1059504+(k<<2)>>2])for(r=0,A=a<<(31!=(0|k)?25-(k>>>1|0)|0:0);;){if(!((b=-8&f[e+4>>2])>>>0>>0||(b=b-a|0)>>>0>=n>>>0||(i=e,n=b))){n=0,r=e;break t}if(b=f[e+20>>2],e=f[16+((A>>>29&4)+e|0)>>2],r=b&&(0|b)!=(0|e)?b:r,A<<=1,!e)break}else r=0;if(!(r|i)){if(i=0,!(r=u&(0-(r=2<>2]}if(!r)break a}for(;u=(k=(b=(A=-8&f[r+4>>2])-a|0)>>>0>>0)?r:i,(e=f[r+16>>2])||(e=f[r+20>>2]),i=(r=A>>>0>>0)?i:u,n=r?n:k?b:n,r=e;);}if(i&&!((r=f[264980])>>>0>=a>>>0&r-a>>>0<=n>>>0)){k=f[i+24>>2];a:{t:{if((0|i)==(0|(r=f[i+12>>2]))){if(r=f[i+20>>2],e=f[(r?20:16)+i>>2])break t;r=0;break a}e=f[i+8>>2],f[e+12>>2]=r,f[r+8>>2]=e;break a}for(A=r?i+20|0:i+16|0;b=A,A=(e=f[(r=e)+20>>2])?r+20|0:r+16|0,e=f[(e?20:16)+r>>2];);f[b>>2]=0}if(!k)break i;e=f[i+28>>2];a:{if(f[(A=1059504+(e<<2)|0)>>2]!=(0|i)){if(f[k+16>>2]!=(0|i)){if(f[k+20>>2]=r,r)break a;break i}if(f[k+16>>2]=r,r)break a;break i}if(f[A>>2]=r,!r)break A}if(f[r+24>>2]=k,(e=f[i+16>>2])&&(f[r+16>>2]=e,f[e+24>>2]=r),!(e=f[i+20>>2]))break i;f[r+20>>2]=e,f[e+24>>2]=r;break i}}n:{a:{t:{b:{if((e=f[264980])>>>0>>0){if((r=f[264981])>>>0<=a>>>0){if(n=0,i=-1==(0|(e=ni((r=a+65583|0)>>>16|0))))break f;if(!(e<<=16))break f;r=(n=i?0:-65536&r)+f[264984]|0,f[264984]=r,i=f[264985],f[264985]=r>>>0>i>>>0?r:i;k:{u:{if(i=f[264983]){for(r=1059632;;){if(((A=f[r>>2])+(b=f[r+4>>2])|0)==(0|e))break u;if(!(r=f[r+8>>2]))break}break k}(r=f[264987])>>>0<=e>>>0&&r||(f[264987]=e),f[264988]=4095,f[264909]=n,f[264908]=e,f[264915]=1059648,f[264917]=1059656,f[264914]=1059648,f[264919]=1059664,f[264916]=1059656,f[264921]=1059672,f[264918]=1059664,f[264923]=1059680,f[264920]=1059672,f[264925]=1059688,f[264922]=1059680,f[264927]=1059696,f[264924]=1059688,f[264929]=1059704,f[264926]=1059696,f[264911]=0,f[264931]=1059712,f[264928]=1059704,f[264930]=1059712,f[264933]=1059720,f[264932]=1059720,f[264935]=1059728,f[264934]=1059728,f[264937]=1059736,f[264936]=1059736,f[264939]=1059744,f[264938]=1059744,f[264941]=1059752,f[264940]=1059752,f[264943]=1059760,f[264942]=1059760,f[264945]=1059768,f[264944]=1059768,f[264947]=1059776,f[264949]=1059784,f[264946]=1059776,f[264951]=1059792,f[264948]=1059784,f[264953]=1059800,f[264950]=1059792,f[264955]=1059808,f[264952]=1059800,f[264957]=1059816,f[264954]=1059808,f[264959]=1059824,f[264956]=1059816,f[264961]=1059832,f[264958]=1059824,f[264963]=1059840,f[264960]=1059832,f[264965]=1059848,f[264962]=1059840,f[264967]=1059856,f[264964]=1059848,f[264969]=1059864,f[264966]=1059856,f[264971]=1059872,f[264968]=1059864,f[264973]=1059880,f[264970]=1059872,f[264975]=1059888,f[264972]=1059880,f[264977]=1059896,f[264974]=1059888,f[264976]=1059896,f[264983]=e,r=n-40|0,f[e+4>>2]=1|r,f[264981]=r,f[4+(r+e|0)>>2]=40,f[264986]=2097152;break n}if(!(i>>>0>>0|e>>>0<=i>>>0)&&!f[r+12>>2])break b}r=f[264987],f[264987]=r>>>0>>0?r:e,A=e+n|0,r=1059632;k:{u:{for(;;){if((0|(b=f[r>>2]))!=(0|A)){if(r=f[r+8>>2])continue;break u}break}if(!f[r+12>>2])break k}for(r=1059632;!((A=f[r>>2])>>>0<=i>>>0&&(b=A+f[r+4>>2]|0)>>>0>i>>>0);)r=f[r+8>>2];for(r=n-40|0,f[e+4>>2]=1|r,f[264983]=e,f[264986]=2097152,f[264981]=r,f[4+(r+e|0)>>2]=40,f[(A=(r=(b-32&-8)-8|0)>>>0>>0?i:r)+4>>2]=27,r=f[264908],k=f[264909],u=f[264911],f[(c=A+16|0)>>2]=f[264910],f[c+4>>2]=u,f[A+8>>2]=r,f[A+12>>2]=k,f[264909]=n,f[264908]=e,f[264910]=A+8,f[264911]=0,r=A+28|0;f[r>>2]=7,b>>>0>(r=r+4|0)>>>0;);if((0|i)==(0|A))break n;if(f[A+4>>2]=-2&f[A+4>>2],r=A-i|0,f[i+4>>2]=1|r,f[A>>2]=r,r>>>0>=256){$r(i,r);break n}e=1059648+(248&r)|0,(A=f[264978])&(r=1<<(r>>>3))?r=f[e+8>>2]:(f[264978]=r|A,r=e),f[e+8>>2]=i,f[r+12>>2]=i,f[i+12>>2]=e,f[i+8>>2]=r;break n}if(f[r>>2]=e,f[r+4>>2]=n+f[r+4>>2],f[e+4>>2]=3|a,a=(n=(b+15&-8)-8|0)-(r=e+a|0)|0,f[264983]==(0|n))break t;if(f[264982]==(0|n))break a;if(1==(3&(i=f[n+4>>2]))&&(Ur(n,i&=-8),a=i+a|0,i=f[(n=i+n|0)+4>>2]),f[n+4>>2]=-2&i,f[r+4>>2]=1|a,f[r+a>>2]=a,a>>>0>=256){$r(r,a);break e}i=1059648+(248&a)|0,(A=f[264978])&(n=1<<(a>>>3))?A=f[i+8>>2]:(f[264978]=n|A,A=i),f[i+8>>2]=r,f[A+12>>2]=r,f[r+12>>2]=i,f[r+8>>2]=A;break e}e=r-a|0,f[264981]=e,i=(r=f[264983])+a|0,f[264983]=i,f[i+4>>2]=1|e,f[r+4>>2]=3|a,n=r+8|0;break f}r=f[264982],(i=e-a|0)>>>0<=15?(f[264982]=0,f[264980]=0,f[r+4>>2]=3|e,f[(e=r+e|0)+4>>2]=1|f[e+4>>2]):(f[264980]=i,A=r+a|0,f[264982]=A,f[A+4>>2]=1|i,f[r+e>>2]=i,f[r+4>>2]=3|a);break r}f[r+4>>2]=n+b,i=(e=(r=f[264983])+15&-8)-8|0,e=8+((A=n+f[264981]|0)+(r-e|0)|0)|0,f[i+4>>2]=1|e,f[264986]=2097152,f[264983]=i,f[264981]=e,f[4+(r+A|0)>>2]=40;break n}f[264983]=r,i=f[264981]+a|0,f[264981]=i,f[r+4>>2]=1|i;break e}i=f[264980]+a|0,f[r+4>>2]=1|i,f[264982]=r,f[264980]=i,f[r+i>>2]=i;break e}if(n=0,!((r=f[264981])>>>0<=a>>>0)){e=r-a|0,f[264981]=e,i=(r=f[264983])+a|0,f[264983]=i,f[i+4>>2]=1|e,f[r+4>>2]=3|a;break r}}return n}s=1059916,l=f[264979]&Ai(e),f[s>>2]=l}i:if(n>>>0>=16){if(f[i+4>>2]=3|a,f[(r=i+a|0)+4>>2]=1|n,f[r+n>>2]=n,n>>>0>=256){$r(r,n);break i}e=1059648+(248&n)|0,(A=f[264978])&(n=1<<(n>>>3))?A=f[e+8>>2]:(f[264978]=n|A,A=e),f[e+8>>2]=r,f[A+12>>2]=r,f[r+12>>2]=e,f[r+8>>2]=A}else r=n+a|0,f[i+4>>2]=3|r,f[(r=r+i|0)+4>>2]=1|f[r+4>>2];return i+8|0}return e+8|0}return r+8|0}function X(r,e,i,A,n,a){var t,b=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0;S=t=S-32|0;r:{e:{i:{A:if(e>>>0<33)s=r,h=e;else for(_=i-8|0;;){if(!n){rr(r,e,i,A,1);break r}s=k(o=e>>>3|0,56)+r|0,b=(o<<5)+r|0,n=n-1|0,e>>>0>=64?w=we(r,b,s,o):(o=s,s=f[r>>2],h=b,b=f[b>>2],w=o,u=h,v=(0|(d=f[r+4>>2]))<(0|(B=f[h+4>>2]))?1:(0|d)<=(0|B)&b>>>0>s>>>0,h=b,b=f[o>>2],h=(0|(o=f[o+4>>2]))>(0|B)?1:b>>>0>h>>>0&(0|o)>=(0|B),w=(b>>>0>s>>>0&(0|o)>=(0|d)|(0|o)>(0|d))^v?r:v^h?w:u),d=s=f[w+4>>2],o=f[w>>2],f[t>>2]=o,f[t+4>>2]=s,B=w-r>>>3|0;f:{n:{if(!(a&&(s=f[a>>2],h=(0|d)<(0|(b=f[a+4>>2]))?1:(0|b)>=(0|d)&s>>>0>=o>>>0))){if(e>>>0>A>>>0)break i;for(h=0,b=r,u=N=(I=e<<3)+i|0,s=B;;){if((l=((s>>>0>=(c=s-3|0)>>>0?c:0)<<3)+r|0)>>>0>b>>>0)for(;c=f[b>>2],Q=h<<3,E=u-8|0,v=f[b+4>>2],f[(g=Q+((y=(0|d)>(0|v)?1:(0|v)<=(0|d)&o>>>0>c>>>0)?i:E)|0)>>2]=c,f[g+4>>2]=v,c=f[(v=b+8|0)>>2],R=(y=h+y|0)<<3,h=o,E=u-16|0,g=f[v+4>>2],f[(E=R+((Q=(0|g)<(0|(v=d))?1:c>>>0>>0&(0|v)>=(0|g))?i:E)|0)>>2]=c,f[E+4>>2]=g,c=f[(g=b+16|0)>>2],R=(y=y+Q|0)<<3,E=u-24|0,g=f[g+4>>2],f[(E=R+((Q=(0|v)>(0|g)?1:c>>>0>>0&(0|v)>=(0|g))?i:E)|0)>>2]=c,f[E+4>>2]=g,c=f[(g=b+24|0)>>2],E=(y=y+Q|0)<<3,u=u-32|0,h=f[g+4>>2],f[(g=E+((v=(0|v)>(0|h)?1:(0|h)<=(0|d)&o>>>0>c>>>0)?i:u)|0)>>2]=c,f[g+4>>2]=h,h=v+y|0,l>>>0>(b=b+32|0)>>>0;);if((v=(s<<3)+r|0)>>>0>b>>>0)for(;c=f[b>>2],E=h<<3,u=u-8|0,l=f[b+4>>2],f[(g=E+((y=(0|d)>(0|l)?1:(0|l)<=(0|d)&o>>>0>c>>>0)?i:u)|0)>>2]=c,f[g+4>>2]=l,h=h+y|0,v>>>0>(b=b+8|0)>>>0;);if((0|e)==(0|s))break;c=f[b+4>>2],f[(s=(u=u-8|0)+(h<<3)|0)>>2]=f[b>>2],f[s+4>>2]=c,b=b+8|0,s=e}if(s=ze(r,i,d=h<<3),c=e-h|0,(0|e)!=(0|h)){if(o=3&c,u=0,h-e>>>0<=4294967292)for(b=s+d|0,v=-4&c,l=_+I|0;y=f[l+4>>2],f[b>>2]=f[l>>2],f[b+4>>2]=y,Q=f[(g=N+((536870910^u)<<3)|0)+4>>2],f[(y=b+8|0)>>2]=f[g>>2],f[y+4>>2]=Q,Q=f[(g=N+((536870909^u)<<3)|0)+4>>2],f[(y=b+16|0)>>2]=f[g>>2],f[y+4>>2]=Q,Q=f[(g=N+((536870908^u)<<3)|0)+4>>2],f[(y=b+24|0)>>2]=f[g>>2],f[y+4>>2]=Q,l=l-32|0,b=b+32|0,(0|v)!=(0|(u=u+4|0)););if(o)for(b=_+(I-(v=u<<3)|0)|0,u=d+(s+v|0)|0;v=f[b+4>>2],f[u>>2]=f[b>>2],f[u+4>>2]=v,b=b-8|0,u=u+8|0,o=o-1|0;);}if(h){if(e>>>0>=h>>>0)break n;f[t+24>>2]=0,f[t+12>>2]=1,f[t+8>>2]=1058780,f[t+16>>2]=4,f[t+20>>2]=0,Me(t+8|0,1058788),$f()}}if(e>>>0>A>>>0)break i;for(l=0,b=r,u=v=(N=e<<3)+i|0;;){if((I=(((a=B-3|0)>>>0<=B>>>0?a:0)<<3)+r|0)>>>0>b>>>0)for(a=f[w>>2],d=f[w+4>>2];o=f[b>>2],E=l<<3,c=u-8|0,s=d,g=f[b+4>>2],f[(c=E+((h=(0|s)>(0|(h=g))?1:(0|s)>=(0|h)&a>>>0>=o>>>0)?i:c)|0)>>2]=o,f[c+4>>2]=g,g=(y=l+h|0)<<3,c=f[(l=b+8|0)>>2],h=a,o=i,Q=u-16|0,E=f[l+4>>2],f[(g=((l=(0|(l=E))<(0|s)?1:c>>>0<=h>>>0&(0|s)>=(0|l))?o:Q)+g|0)>>2]=c,f[g+4>>2]=E,g=(y=l+y|0)<<3,c=f[(l=b+16|0)>>2],Q=u-24|0,E=f[l+4>>2],f[(g=((l=(0|(l=E))<(0|s)?1:c>>>0<=h>>>0&(0|s)>=(0|l))?o:Q)+g|0)>>2]=c,f[g+4>>2]=E,l=(c=l+y|0)<<3,o=f[(y=b+24|0)>>2],u=u-32|0,E=s,h=f[y+4>>2],f[(l=((s=(0|E)>(0|(s=h))?1:(0|s)<=(0|d)&a>>>0>=o>>>0)?i:u)+l|0)>>2]=o,f[l+4>>2]=h,l=s+c|0,I>>>0>(b=b+32|0)>>>0;);if((d=(B<<3)+r|0)>>>0>b>>>0)for(a=f[w>>2],s=f[w+4>>2];o=f[b>>2],c=l<<3,u=u-8|0,I=f[b+4>>2],f[(c=c+((h=(0|(h=I))<(0|s)?1:(0|s)>=(0|h)&a>>>0>=o>>>0)?i:u)|0)>>2]=o,f[c+4>>2]=I,l=l+h|0,d>>>0>(b=b+8|0)>>>0;);if((0|e)==(0|B))break;s=f[b+4>>2],f[(a=(l<<3)+i|0)>>2]=f[b>>2],f[a+4>>2]=s,b=b+8|0,l=l+1|0,u=u-8|0,B=e}if(d=ze(a=r,i,r=l<<3),(0|e)==(0|l))break r;if(a=3&(h=e-l|0),s=r+d|0,u=0,l-e>>>0<=4294967292)for(B=-4&h,o=_+N|0,b=s;c=f[o+4>>2],f[b>>2]=f[o>>2],f[b+4>>2]=c,I=f[(w=v+((536870910^u)<<3)|0)+4>>2],f[(c=b+8|0)>>2]=f[w>>2],f[c+4>>2]=I,I=f[(w=v+((536870909^u)<<3)|0)+4>>2],f[(c=b+16|0)>>2]=f[w>>2],f[c+4>>2]=I,I=f[(w=v+((536870908^u)<<3)|0)+4>>2],f[(c=b+24|0)>>2]=f[w>>2],f[c+4>>2]=I,o=o-32|0,b=b+32|0,(0|B)!=(0|(u=u+4|0)););if(a)for(b=N+(_-(o=u<<3)|0)|0,u=r+(o+d|0)|0;r=f[b+4>>2],f[u>>2]=f[b>>2],f[u+4>>2]=r,b=b-8|0,u=u+8|0,a=a-1|0;);if(e>>>0>=l>>>0)break f;xe(l,e,1058804),$f()}if(X(s+d|0,c,i,A,n,t),(e=h)>>>0>=33)continue;break A}if(a=0,r=s,!((e=h)>>>0>=33))break}if(h>>>0<2)break r;if(!(h+16>>>0>A>>>0)){r=h>>>1|0;A:{f:{if(h>>>0<=15){if(h>>>0<=7)break f;e=f[s+24>>2],A=f[s+16>>2],n=f[s+28>>2],a=f[s+20>>2],A=f[(e=l=((u=(0|n)<(0|a)?1:e>>>0>>0&(0|n)<=(0|a))?16:24)+s|0)>>2],o=e=f[e+4>>2],d=e,a=f[s>>2],e=n=f[s+8>>2],v=i,b=B=f[s+12>>2],c=f[s+4>>2],e=f[(b=w=((e=(0|b)>(0|c)?1:(0|b)>=(0|c)&e>>>0>=a>>>0)<<3)+s|0)>>2],_=(0|o)>(0|(b=f[b+4>>2]))?1:e>>>0>>0&(0|b)<=(0|o),f[v+24>>2]=_?A:e,f[v+28>>2]=_?d:b,d=f[(u=(u?24:16)+s|0)>>2],v=f[u+4>>2],_=((n>>>0>>0&(0|c)>=(0|B)|(0|c)>(0|B))<<3)+s|0,B=i,E=n=f[(a=_)>>2],n=(0|(a=f[a+4>>2]))>(0|(c=v))?1:n>>>0>d>>>0&(0|a)>=(0|c),f[i>>2]=n?d:E,f[B+4>>2]=n?v:a,A=f[(e=(b=e>>>0>A>>>0&(0|b)>=(0|o)|(0|b)>(0|o))?l:n?w:u)>>2],a=e=f[e+4>>2],e=f[(n=n?_:b?u:w)>>2],b=i,o=(0|a)>(0|(n=f[n+4>>2]))?1:e>>>0>>0&(0|n)<=(0|a),f[b+16>>2]=o?A:e,f[b+20>>2]=o?a:n,o=e,e=e>>>0>A>>>0&(0|n)>=(0|a)|(0|n)>(0|a),f[i+8>>2]=e?A:o,f[i+12>>2]=e?a:n,e=(A=r<<3)+i|0,A=f[(u=A+s|0)+24>>2],n=f[u+16>>2],a=f[u+28>>2],b=f[u+20>>2],n=f[(A=N=u+((_=(0|a)<(0|b)?1:A>>>0>>0&(0|a)<=(0|b))?16:24)|0)>>2],d=A=f[A+4>>2],B=A,b=f[u>>2],A=a=f[u+8>>2],w=e,o=c=f[u+12>>2],v=f[u+4>>2],A=f[(o=l=((A=(0|o)>(0|v)?1:(0|o)>=(0|v)&A>>>0>=b>>>0)<<3)+u|0)>>2],I=(0|d)>(0|(o=f[o+4>>2]))?1:A>>>0>>0&(0|o)<=(0|d),f[e+24>>2]=I?n:A,f[w+28>>2]=I?B:o,B=f[(w=_=u+(_?24:16)|0)>>2],w=f[w+4>>2],u=((a>>>0>>0&(0|c)<=(0|v)|(0|c)<(0|v))<<3)+u|0,c=e,E=a=f[(b=u)>>2],a=(0|(b=f[b+4>>2]))>(0|(v=w))?1:a>>>0>B>>>0&(0|b)>=(0|v),f[e>>2]=a?B:E,f[c+4>>2]=a?w:b,n=f[(A=(o=A>>>0>n>>>0&(0|o)>=(0|d)|(0|o)>(0|d))?N:a?l:_)>>2],b=A=f[A+4>>2],A=f[(a=a?u:o?_:l)>>2],o=e,d=(0|b)<(0|(a=f[a+4>>2]))?1:A>>>0>n>>>0&(0|a)>=(0|b),f[e+8>>2]=d?n:A,f[o+12>>2]=d?b:a,o=A,A=A>>>0>>0&(0|a)<=(0|b)|(0|a)<(0|b),f[e+16>>2]=A?n:o,f[e+20>>2]=A?b:a,n=4;break A}ur(s,i,e=(h<<3)+i|0),ur((A=r<<3)+s|0,i+A|0,e- -64|0),n=8;break A}e=f[s+4>>2],f[i>>2]=f[s>>2],f[i+4>>2]=e,A=(e=r<<3)+i|0,n=f[(e=e+s|0)+4>>2],f[A>>2]=f[e>>2],f[A+4>>2]=n,n=1}for(B=0,f[t+16>>2]=0,v=n<<3,f[t+20>>2]=r,l=h-r|0,_=t+16|0;;){if((N=(e=f[_+(B<<2)>>2])?l:r)>>>0>n>>>0)for(c=(e<<=3)+i|0,I=e+s|0,a=v,o=n;;){if(e=f[(A=(b=o<<3)+I|0)>>2],A=f[A+4>>2],f[(b=b+c|0)>>2]=e,f[b+4>>2]=A,d=f[(b=b-8|0)>>2],b=(0|A)<(0|(b=w=f[b+4>>2]))?1:e>>>0>>0&(0|A)<=(0|b)){b=a;A:{for(;;){if(f[(u=b+c|0)>>2]=d,f[u+4>>2]=w,d=c,8==(0|b))break A;if(b=b-8|0,d=f[(w=u-16|0)>>2],!(u=(0|(w=f[w+4>>2]))>(0|A)?1:e>>>0>>0&(0|A)<=(0|w)))break}d=b+c|0}f[d>>2]=e,f[d+4>>2]=A}if(a=a+8|0,(0|N)==(0|(o=o+1|0)))break}if(2==(0|(B=B+1|0)))break}for(u=(b=(r<<3)+i|0)-8|0,l=(e=(h<<3)-8|0)+i|0,o=e+s|0;B=n=f[i+4>>2],n=e=f[b>>2],n=e,e=a=f[i>>2],d=A=f[b+4>>2],e=w=(0|B)>(0|A)?1:(0|d)<=(0|B)&e>>>0>n>>>0,f[s>>2]=e?n:a,f[s+4>>2]=e?A:B,v=A=f[l+4>>2],e=f[l>>2],A=f[u>>2],_=(0|v)>(0|(c=f[u+4>>2]))?1:(0|c)<=(0|v)&e>>>0>A>>>0,f[o>>2]=_?e:A,f[o+4>>2]=_?v:c,o=o-8|0,s=s+8|0,u=(e>>>0>>0&(0|c)>=(0|v)|(0|c)>(0|v)?-8:0)+u|0,l=((0|c)<=(0|v)&e>>>0>=A>>>0|(0|c)<(0|v)?-8:0)+l|0,i=(((0|d)>=(0|B)&n>>>0>=a>>>0|(0|d)>(0|B))<<3)+i|0,b=(w<<3)+b|0,r=r-1|0;);break e}}$f()}r=u+8|0,1&h&&(n=f[(A=(e=r>>>0>i>>>0)?i:b)+4>>2],f[s>>2]=f[A>>2],f[s+4>>2]=n,b=((r>>>0<=i>>>0)<<3)+b|0,i=(e<<3)+i|0),(0|r)==(0|i)&(l+8|0)==(0|b)||(Fe(),$f())}S=t+32|0}function J(r,e,i,A,n,a){var t,b=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0;S=t=S-144|0;r:{e:{i:{A:{f:if(e>>>0<33)c=e;else{B=i-120|0;n:for(;;){for(I=r+48|0;;){if(!n){H(r,e,i,A,1);break e}if(s=k(b=e>>>3|0,840)+r|0,l=k(b,480)+r|0,e>>>0>=64)o=ae(r,l,s,b);else{if(!f[I>>2])break r;if(!(1&f[l+48>>2]))break r;if(!(1&f[s+48>>2]))break r;b=s,s=f[(u=r+56|0)>>2],l=f[(o=(c=l)+56|0)>>2],d=f[(v=b+56|0)>>2],g=b,w=c,h=(0|(u=f[u+4>>2]))<(0|(o=f[o+4>>2]))?1:s>>>0>>0&(0|u)<=(0|o),b=l,l=d,b=(0|(c=f[v+4>>2]))>(0|o)?1:b>>>0>>0&(0|o)<=(0|c),o=(s>>>0>>0&(0|u)<=(0|c)|(0|u)<(0|c))^h?r:h^b?g:w}n=n-1|0,h=ze(t,o,120),l=(o-r>>>0)/120|0;a:{t:{if(a){if(!f[a+48>>2])break r;if(!(1&f[o+48>>2]))break r;if(b=f[(s=a+56|0)>>2],u=f[(c=o+56|0)>>2],b=(0|(s=f[s+4>>2]))>(0|(c=f[c+4>>2]))?1:(0|c)<=(0|s)&b>>>0>=u>>>0)break t}if(e>>>0>A>>>0)break A;for(c=0,b=r,u=g=(Q=k(e,120))+i|0,s=l;;){b:if(!((d=k(s,120)+r|0)>>>0<=b>>>0)){k:{for(;;){if(f[b+48>>2]){if(!(1&f[o+48>>2]))break k;if(w=f[(v=b+56|0)>>2],_=f[(y=o+56|0)>>2],u=u-120|0,ze((E=k(c,120))+((v=(0|(v=f[v+4>>2]))<(0|(y=f[y+4>>2]))?1:w>>>0<_>>>0&(0|v)<=(0|y))?i:u)|0,b,120),c=c+v|0,d>>>0>(b=b+120|0)>>>0)continue;break b}break}break r}Ve(1058820);break A}if((0|e)==(0|s))break;ze((u=u-120|0)+k(c,120)|0,b,120),b=b+120|0,s=e}if(y=ze(r,i,w=k(c,120)),v=e-c|0,(0|e)!=(0|c)){if(d=w+y|0,b=0,(c+1|0)!=(0|e))for(_=-2&v,u=B+Q|0,s=d;s=ze(s,u,120),ze(s+120|0,g+k(536870910^b,120)|0,120),u=u-240|0,s=s+240|0,(0|_)!=(0|(b=b+2|0)););1&v&&ze(d+k(b,120)|0,g+k(-1^b,120)|0,120)}if(c){if(e>>>0>=c>>>0)break a;f[h+136>>2]=0,f[h+124>>2]=1,f[h+120>>2]=1058780,f[h+128>>2]=4,f[h+132>>2]=0,Me(h+120|0,1058788),$f()}}if(e>>>0>A>>>0)break A;for(u=0,b=r,c=a=(s=k(e,120))+i|0;;){t:if(!((d=k(l,120)+r|0)>>>0<=b>>>0)){b:{for(;;){if(f[o+48>>2]){if(!(1&f[b+48>>2]))break b;if(v=f[(h=o+56|0)>>2],w=f[(g=b+56|0)>>2],c=c-120|0,ze((y=k(u,120))+((h=(0|(h=f[h+4>>2]))>(0|(g=f[g+4>>2]))?1:(0|h)>=(0|g)&v>>>0>=w>>>0)?i:c)|0,b,120),u=u+h|0,d>>>0>(b=b+120|0)>>>0)continue;break t}break}break r}break r}if((0|e)==(0|l))break;ze(k(u,120)+i|0,b,120),b=b+120|0,u=u+1|0,c=c-120|0,l=e}if(l=ze(b=r,i,r=k(u,120)),(0|e)==(0|u))break e;if(d=1&(c=e-u|0),r=r+l|0,b=0,(u+1|0)!=(0|e))for(l=-2&c,o=s+B|0,s=r;s=ze(s,o,120),ze(s+120|0,a+k(536870910^b,120)|0,120),o=o-240|0,s=s+240|0,(0|l)!=(0|(b=b+2|0)););if(d&&ze(k(b,120)+r|0,a+k(-1^b,120)|0,120),e>>>0>>0&&(xe(u,e,1058804),$f()),a=0,(e=c)>>>0<33)break f;continue n}if(J(w+y|0,v,i,A,n,h),!((e=c)>>>0>=33))break}break}}if(c>>>0<2)break e;if(!(c+16>>>0>A>>>0)){if(l=1,v=(e=k(s=c>>>1|0,120))+i|0,e=r+e|0,c>>>0>7?(Yr(r,i),Yr(e,v),l=4):(ze(i,r,120),ze(v,e,120)),s>>>0<=l>>>0)break i;for(A=k(l,120),e=l;;){if(a=ze(i+(n=k(e,120))|0,d=n+r|0,120),n=f[(b=a+48|0)>>2],g=f[b+4>>2],!(o=n))break r;if(!(1&f[a-72>>2]))break r;if(n=f[(b=a+56|0)>>2],h=f[(a=a+-64|0)>>2],a=(0|(b=u=f[b+4>>2]))<(0|(a=f[a+4>>2]))?1:n>>>0>>0&(0|a)>=(0|b)){h=d- -64|0,b=A;f:{n:{for(;;){if(B=ze(a=i+b|0,a-120|0,120),120==(0|b))break n;if(!(1&f[B-192>>2]))break r;if(b=b-120|0,w=f[(a=B-184|0)>>2],!(a=(0|(a=f[a+4>>2]))>(0|u)?1:n>>>0>>0&(0|a)>=(0|u)))break}a=i+b|0;break f}a=i}b=f[d+4>>2],f[a>>2]=f[d>>2],f[a+4>>2]=b,y=f[(w=d+40|0)+4>>2],f[(b=a+40|0)>>2]=f[w>>2],f[b+4>>2]=y,y=f[(w=d+32|0)+4>>2],f[(b=a+32|0)>>2]=f[w>>2],f[b+4>>2]=y,y=f[(w=d+24|0)+4>>2],f[(b=a+24|0)>>2]=f[w>>2],f[b+4>>2]=y,y=f[(w=d+16|0)+4>>2],f[(b=a+16|0)>>2]=f[w>>2],f[b+4>>2]=y,d=f[(b=d+8|0)+4>>2],f[(a=a+8|0)>>2]=f[b>>2],f[a+4>>2]=d,f[(a=B+-64|0)>>2]=n,f[a+4>>2]=u,f[(n=B-72|0)>>2]=o,f[n+4>>2]=g,a=f[h+4>>2],f[(n=B-56|0)>>2]=f[h>>2],f[n+4>>2]=a,u=f[(b=h+8|0)+4>>2],f[(a=n+8|0)>>2]=f[b>>2],f[a+4>>2]=u,u=f[(b=h+16|0)+4>>2],f[(a=n+16|0)>>2]=f[b>>2],f[a+4>>2]=u,u=f[(b=h+24|0)+4>>2],f[(a=n+24|0)>>2]=f[b>>2],f[a+4>>2]=u,u=f[(b=h+32|0)+4>>2],f[(a=n+32|0)>>2]=f[b>>2],f[a+4>>2]=u,u=f[(b=h+40|0)+4>>2],f[(a=n+40|0)>>2]=f[b>>2],f[a+4>>2]=u,b=f[(a=h+48|0)+4>>2],f[(n=n+48|0)>>2]=f[a>>2],f[n+4>>2]=b}if(A=A+120|0,(0|s)==(0|(e=e+1|0)))break}break i}}$f()}if((I=c-s|0)>>>0>l>>>0)for(Q=(e=k(s,120))+r|0,y=k(l,120),n=120,a=b=e+i|0;;){if(A=ze((e=k(l,120))+b|0,B=e+Q|0,120),e=f[(u=A+48|0)>>2],_=f[u+4>>2],h=e,1!=(0|e))break r;if(!(1&f[A-72>>2]))break r;if(e=f[(u=A+56|0)>>2],o=f[(A=A+-64|0)>>2],A=(0|(u=d=f[u+4>>2]))<(0|(A=f[A+4>>2]))?1:e>>>0>>0&(0|A)>=(0|u)){g=B- -64|0,o=n,u=a;i:{A:{for(;;){if(w=ze(A=u+y|0,A-120|0,120),(0|o)==(0|y))break A;if(!(1&f[w-192>>2]))break r;if(o=o+120|0,u=u-120|0,E=f[(A=w-184|0)>>2],!(A=(0|(A=f[A+4>>2]))>(0|d)?1:e>>>0>>0&(0|A)>=(0|d)))break}A=u+y|0;break i}A=b}u=f[B+4>>2],f[A>>2]=f[B>>2],f[A+4>>2]=u,E=f[(o=B+40|0)+4>>2],f[(u=A+40|0)>>2]=f[o>>2],f[u+4>>2]=E,E=f[(o=B+32|0)+4>>2],f[(u=A+32|0)>>2]=f[o>>2],f[u+4>>2]=E,E=f[(o=B+24|0)+4>>2],f[(u=A+24|0)>>2]=f[o>>2],f[u+4>>2]=E,E=f[(o=B+16|0)+4>>2],f[(u=A+16|0)>>2]=f[o>>2],f[u+4>>2]=E,o=f[(u=B+8|0)+4>>2],f[(A=A+8|0)>>2]=f[u>>2],f[A+4>>2]=o,f[(A=w+-64|0)>>2]=e,f[A+4>>2]=d,f[(e=w-72|0)>>2]=h,f[e+4>>2]=_,A=f[g+4>>2],f[(e=w-56|0)>>2]=f[g>>2],f[e+4>>2]=A,o=f[(u=g+8|0)+4>>2],f[(A=e+8|0)>>2]=f[u>>2],f[A+4>>2]=o,o=f[(u=g+16|0)+4>>2],f[(A=e+16|0)>>2]=f[u>>2],f[A+4>>2]=o,o=f[(u=g+24|0)+4>>2],f[(A=e+24|0)>>2]=f[u>>2],f[A+4>>2]=o,o=f[(u=g+32|0)+4>>2],f[(A=e+32|0)>>2]=f[u>>2],f[A+4>>2]=o,o=f[(u=g+40|0)+4>>2],f[(A=e+40|0)>>2]=f[u>>2],f[A+4>>2]=o,u=f[(A=g+48|0)+4>>2],f[(e=e+48|0)>>2]=f[A>>2],f[e+4>>2]=u}if(n=n-120|0,a=a+120|0,(0|I)==(0|(l=l+1|0)))break}u=v-120|0,b=(e=k(c,120)-120|0)+i|0,o=r+e|0;i:{for(;;){if(!f[v+48>>2])break r;if(!(1&f[i+48>>2]))break r;if(A=f[(a=i+56|0)>>2],h=r,r=e=f[(n=v+56|0)>>2],r=ze(h,(l=(0|(n=f[n+4>>2]))<(0|(a=f[a+4>>2]))?1:r>>>0>>0&(0|n)<=(0|a))?v:i,120),!f[b+48>>2])break r;if(!(1&f[u+48>>2]))break i;if(r=r+120|0,i=k((0|n)>=(0|a)&e>>>0>=A>>>0|(0|n)>(0|a),120)+i|0,v=k(l,120)+v|0,e=f[(n=b+56|0)>>2],A=f[(a=u+56|0)>>2],o=ze(o,(l=(0|(n=f[n+4>>2]))<(0|(a=f[a+4>>2]))?1:e>>>0>>0&(0|n)<=(0|a))?u:b,120)-120|0,u=(l?-120:0)+u|0,b=((0|n)>=(0|a)&e>>>0>=A>>>0|(0|n)>(0|a)?-120:0)+b|0,!(s=s-1|0))break}if(e=u+120|0,1&c&&(ze(A=r,(r=e>>>0>i>>>0)?i:v,120),v=k(e>>>0<=i>>>0,120)+v|0,i=k(r,120)+i|0),(0|e)==(0|i)&(b+120|0)==(0|v))break e;Fe(),$f()}break r}return void(S=t+144|0)}Ve(1058820),$f()}function x(r,e){var a,t=0,b=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0;S=a=S-176|0,o=n[e+278|0];r:{e:if(b=f[r+8>>2])for(y=r+12|0,B=e+160|0,E=e+256|0,h=e+240|0,s=e+152|0,_=a+172|0,d=a+144|0,I=a+124|0;;){i:{A:{f:{n:{a:{t:{b:{k:{u:{o:{c:{s:{l:{h:{v:{d:{w:{g:{y:{B:switch(0|o){case 1:if(f[r+8>>2]=b-1,t=f[r+4>>2],f[r+4>>2]=t+1,(c=n[0|t])>>>0>223)break y;t=f[s>>2],b=f[s+4>>2];break n;case 0:break B;case 2:break g;case 3:break w;case 4:break d;default:break i}if(u=f[r+4>>2],255==n[0|u])o=1;else{if(2!=f[s>>2]|f[s+4>>2]){if(fi[f[f[r>>2]>>2]](a+132|0,y,u,b),f[(t=a+140|0)>>2]=1,o=f[t+4>>2],t=f[t>>2],f[(b=a+168|0)>>2]=t,f[b+4>>2]=o,o=f[a+136>>2],f[a+160>>2]=f[a+132>>2],f[a+164>>2]=o,t?(f[e+252>>2]=t+f[e+252>>2],(0|(t=f[e+248>>2]))==f[e+240>>2]&&ce(h,1058736),f[e+248>>2]=t+1,o=f[a+164>>2],t=f[e+244>>2]+(t<<4)|0,f[t>>2]=f[a+160>>2],f[t+4>>2]=o,o=f[b+4>>2],f[(t=t+8|0)>>2]=f[b>>2],f[t+4>>2]=o):fi[f[f[a+160>>2]+16>>2]](_,f[a+164>>2],0),b=f[r+8>>2],f[a+128>>2]=1,!b)break v;u=f[r+4>>2]}o=0}if(f[r+4>>2]=u+1,b=b-1|0,f[r+8>>2]=b,b)continue;break e}if(18!=(22&c)){if(t=f[s>>2],b=f[s+4>>2],255!=(0|c))break n;if(o=1,!b&2==(0|t))break i;f[e+252>>2]=f[e+252>>2]+1,(0|(t=f[e+248>>2]))==f[e+240>>2]&&ce(h,1058736),f[e+248>>2]=t+1,t=f[e+244>>2]+(t<<4)|0,f[t+8>>2]=1,f[t+12>>2]=0,f[t+4>>2]=1057632,f[t>>2]=1057596;break i}if(i[e+279|0]=c,u=f[e+152>>2],v=f[e+156>>2],b=f[e+32>>2],o=f[e+36>>2],t=f[e+40>>2],l=f[e+44>>2],ze(a+16|0,B,96),f[e+248>>2]=0,f[e+252>>2]=0,f[e+240>>2]=0,f[e+244>>2]=4,i[e+232|0]=0,A[e+230>>1]=257,i[e+229|0]=c>>>3&3,i[e+228|0]=1,f[e+224>>2]=0,f[e+216>>2]=0,f[e+208>>2]=t,f[e+212>>2]=l,f[e+200>>2]=b,f[e+204>>2]=o,f[e+192>>2]=t,f[e+196>>2]=l,f[e+184>>2]=b,f[e+188>>2]=o,f[e+176>>2]=t,f[e+180>>2]=l,f[e+168>>2]=b,f[e+172>>2]=o,f[e+152>>2]=0,f[e+156>>2]=0,o=2,!v&2==(0|(t=u)))break i;(0|(b=f[e+264>>2]))==f[e+256>>2]&&be(E,1057616),u=f[e+260>>2]+k(b,104)|0,f[u>>2]=t,f[u+4>>2]=v,ze(u+8|0,a+16|0,96),f[e+264>>2]=b+1;break i}if(f[r+8>>2]=b-1,b=f[r+4>>2],f[r+4>>2]=b+1,!f[s+4>>2]&2==f[s>>2])break h;g:{if(n[e+228|0]){if(o=2,(t=n[e+229|0])>>>0>=2)break g;break e}Ve(1057652),$f()}if(o=n[0|b],i[e+280|0]=o,t>>>0>=4)break l;if(f[e+216>>2]=1,u=f[1057668+(o>>>2&60|t<<6)>>2],f[e+220>>2]=u,!(b=f[1057940+(12&o|t<<4)>>2]))break s;f[e+224>>2]=b,c=o>>>1&1,i[e+276|0]=c,o=3,u=((t=k(u,f[1058020+(t<<2)>>2]>>>3|0))>>>0)/(b>>>0)|0,f[e+268>>2]=((u+c|0)+(b>>>0<=t-k(b,u)<<1>>>0)|0)-1;break i}if(f[r+8>>2]=b-1,t=f[r+4>>2],f[r+4>>2]=t+1,!f[s+4>>2]&2==f[s>>2])break c;if(b=n[0|t],i[e+232|0]=1,i[e+281|0]=b,i[e+233|0]=n[1058052+(b>>>6|0)|0],!(t=V(4)))break f;if(o=n[e+279|0]|n[e+280|0]<<8,i[t+3|0]=b,i[t+1|0]=o,i[t+2|0]=o>>>8,i[0|t]=255,f[a+168>>2]=4,f[a+164>>2]=t,f[a+160>>2]=4,se(a+8|0,a+160|0),!(b=f[a+12>>2]))break o;t=f[a+8>>2],f[a+136>>2]=t,u=t,o=1|t,t&=1,f[a+144>>2]=t?u:o,f[a+132>>2]=t?1051916:1051896,f[a+140>>2]=b,f[e+252>>2]=b+f[e+252>>2],(0|(t=f[e+248>>2]))==f[e+240>>2]&&ce(h,1058736),f[e+248>>2]=t+1,b=f[a+136>>2],t=f[e+244>>2]+(t<<4)|0,f[t>>2]=f[a+132>>2],f[t+4>>2]=b,o=f[(b=a+140|0)+4>>2],f[(t=t+8|0)>>2]=f[b>>2],f[t+4>>2]=o;break a}if(w=!f[s+4>>2]&2==f[s>>2])break u;if(u=f[e+272>>2])break t;if(t=n[f[r+4>>2]],n[e+277|0]){if(242==(246&t)){c=0;break k}f[e+252>>2]=f[e+252>>2]+1,(0|(t=f[e+248>>2]))==f[e+240>>2]&&ce(h,1058736),c=1,f[e+248>>2]=t+1,t=f[e+244>>2]+(t<<4)|0,f[t+8>>2]=1,f[t+12>>2]=0,f[t+4>>2]=1057632,f[t>>2]=1057596,t=0}else c=255!=(0|t),t=255==(0|t);if(o=4,b>>>0<2)break b;for(Q=f[r+4>>2],v=f[r+8>>2],u=1;;){d:{w:{if(u>>>0>>0){if(l=n[u+Q|0],t)break w;g=255!=(0|l),t=255==(0|l);break d}Ne(u,v,1058072),$f()}if(242==(246&l))break k;g=2,t=0}if(c=c+g|0,(0|(u=u+1|0))==(0|b))break}break b}f[a+156>>2]=0;break r}Ve(1057636),$f()}Ne(t,4,1057924),$f()}Ve(1058004),$f()}Ve(1058036),$f()}f[a+144>>2]=0,f[a+136>>2]=1,f[a+140>>2]=0,f[a+132>>2]=1051612,fi[f[262907]](d,1,0);break a}Ve(1058056),$f()}t=1,o=1}if(qr(a+112|0,r,c),!(u=f[a+120>>2])){fi[f[f[a+112>>2]+16>>2]](I,f[a+116>>2],0),i[e+277|0]=t;break i}f[(b=w?0:s)+100>>2]=u+f[b+100>>2],(0|(u=f[b+96>>2]))==f[b+88>>2]&&ce(b+88|0,1058736),f[b+96>>2]=u+1,b=f[b+92>>2]+(u<<4)|0,u=f[a+116>>2],f[b>>2]=f[a+112>>2],f[b+4>>2]=u,c=f[(u=a+120|0)+4>>2],f[(b=b+8|0)>>2]=f[u>>2],f[b+4>>2]=c,i[e+277|0]=t;break i}if(zr(a+132|0,r,0,o=b>>>0>u>>>0?u:b),(t=f[a+140>>2])?(f[e+252>>2]=t+f[e+252>>2],(0|(t=f[e+248>>2]))==f[e+240>>2]&&ce(h,1058736),f[e+248>>2]=t+1,c=f[a+136>>2],t=f[e+244>>2]+(t<<4)|0,f[t>>2]=f[a+132>>2],f[t+4>>2]=c,l=f[(c=a+140|0)+4>>2],f[(t=t+8|0)>>2]=f[c>>2],f[t+4>>2]=l):fi[f[f[a+132>>2]+16>>2]](d,f[a+136>>2],0),f[e+272>>2]=f[e+272>>2]-o,f[a+128>>2]=o,(t=f[r+8>>2])>>>0>=o>>>0){if(t=t-o|0,f[r+8>>2]=t,f[r+4>>2]=o+f[r+4>>2],o=(b>>>0>>0)<<2,b=t,t)continue;break e}f[a+156>>2]=t;break r}b=(t=f[e+268>>2])-4|0,f[e+272>>2]=t>>>0>=b>>>0?b:0,o=4;break i}if(o=0,!b&2==(0|t))break i;if(t=V(2))break A}$f()}i[t+1|0]=c,i[0|t]=255,f[a+168>>2]=2,f[a+164>>2]=t,f[a+160>>2]=2,se(a,a+160|0),(b=f[a+4>>2])?(t=f[a>>2],f[a+136>>2]=t,u=t,c=1|t,t&=1,f[a+144>>2]=t?u:c,f[a+132>>2]=t?1051916:1051896,f[a+140>>2]=b,f[e+252>>2]=b+f[e+252>>2],(0|(t=f[e+248>>2]))==f[e+240>>2]&&ce(h,1058736),f[e+248>>2]=t+1,b=f[a+136>>2],t=f[e+244>>2]+(t<<4)|0,f[t>>2]=f[a+132>>2],f[t+4>>2]=b,u=f[(b=a+140|0)+4>>2],f[(t=t+8|0)>>2]=f[b>>2],f[t+4>>2]=u):(f[a+144>>2]=0,f[a+136>>2]=1,f[a+140>>2]=0,f[a+132>>2]=1051612,fi[f[262907]](d,1,0))}if(!(b=f[r+8>>2]))break}return i[e+278|0]=o,void(S=a+176|0)}f[a+136>>2]=2,f[a+132>>2]=1058600,f[a+144>>2]=2,f[a+148>>2]=0,f[a+168>>2]=a+156,f[a+172>>2]=3,f[a+160>>2]=a+128,f[a+164>>2]=3,f[a+140>>2]=a+160,Me(a+132|0,1058616),$f()}function H(r,e,A,a,t){var b,u,c,s,l,h,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0,p=0,m=0,G=0,Y=0,W=0,D=0;S=u=S-336|0,b=e,c=ri(e=e-1|0,E=-1!=(0|e)?1073741824:1073741823,b,0),s=M,m=b>>>0>=4097?(1<<(e=32-o(1|b)>>>1|0))+(b>>>e|0)>>>1|0:(e=b-(b>>>1|0)|0)>>>0>=64?64:e,l=r-120|0,h=r+168|0,e=1;r:{for(;;){if(p=0,_=1,Y=R>>>0>>0){w=(I=k(R,120))+r|0;e:{i:if(!((d=b-R|0)>>>0>>0)){A:{if(!(d>>>0<2)){f:{if(f[w+168>>2]){if(!(1&f[w+48>>2]))break r;E=f[(B=w+176|0)>>2],N=f[(_=w+56|0)>>2],B=y=f[B+4>>2];n:{a:{if(p=(0|y)<(0|(_=f[_+4>>2]))?1:E>>>0>>0&(0|B)<=(0|_)){if(_=2,v=1,2==(0|d))break n;for(B=I+h|0;;){if(!f[(N=B+120|0)>>2])break r;if(!(1&f[B>>2]))break f;if(v=E,E=f[(C=B+128|0)>>2],v=(0|(B=y))<(0|(y=f[C+4>>2]))?1:v>>>0<=E>>>0&(0|y)>=(0|B))break a;if(B=N,(0|d)==(0|(_=_+1|0)))break}}else{if(_=2,2==(0|d))break A;for(B=I+h|0;;){if(!f[(N=B+120|0)>>2])break r;if(!(1&f[B>>2]))break r;if(v=E,E=f[(C=B+128|0)>>2],v=(0|(B=y))>(0|(y=f[C+4>>2]))?1:(0|y)<=(0|B)&v>>>0>E>>>0)break a;if(B=N,(0|d)==(0|(_=_+1|0)))break}}_=d}if(_>>>0>>0)break i;if(!p)break A;if(_>>>0<2){_=1;break A}v=_>>>1|0}for(E=v,N=k(_,120)+l|0,B=r;v=f[(d=I+N|0)>>2],y=B+I|0,f[d>>2]=f[y>>2],f[y>>2]=v,w=f[(v=y+4|0)>>2],g=v,v=d+4|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+8|0)>>2],g=v,v=y+8|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+12|0)>>2],g=v,v=d+12|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+16|0)>>2],g=v,v=y+16|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+20|0)>>2],g=v,v=d+20|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+24|0)>>2],g=v,v=y+24|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+28|0)>>2],g=v,v=d+28|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+32|0)>>2],g=v,v=y+32|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+36|0)>>2],g=v,v=d+36|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+40|0)>>2],g=v,v=y+40|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+44|0)>>2],g=v,v=d+44|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+48|0)>>2],g=v,v=y+48|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+52|0)>>2],g=v,v=d+52|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+56|0)>>2],g=v,v=y+56|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+60|0)>>2],g=v,v=d+60|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d- -64|0)>>2],g=v,v=y- -64|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+68|0)>>2],g=v,v=d+68|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+72|0)>>2],g=v,v=y+72|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+76|0)>>2],g=v,v=d+76|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+80|0)>>2],g=v,v=y+80|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+84|0)>>2],g=v,v=d+84|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+88|0)>>2],g=v,v=y+88|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+92|0)>>2],g=v,v=d+92|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+96|0)>>2],g=v,v=y+96|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+100|0)>>2],g=v,v=d+100|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+104|0)>>2],g=v,v=y+104|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+108|0)>>2],g=v,v=d+108|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+112|0)>>2],g=v,v=y+112|0,f[g>>2]=f[v>>2],f[v>>2]=w,v=f[(y=y+116|0)>>2],d=d+116|0,f[y>>2]=f[d>>2],f[d>>2]=v,N=N-120|0,B=B+120|0,E=E-1|0;);break A}break r}break r}_=d}_=_<<1|1;break e}_=(d>>>0>>0?d:m)<<1,t&&(J(w,E=d>>>0>=32?32:d,A,a,0,0),_=E<<1|1)}v=E=R+(_>>>1|0)|0,B=qe(E=E+R|0,B=v>>>0>E>>>0,c,s),d=M,v=o(qe(y=R+(R-(e>>>1|0)|0)|0,E=R>>>0>y>>>0,c,s)^B)+32|0,p=32==(0|(E=o(M^d)))?v:E}e:{i:if(!(Q>>>0<2)){for(v=(E=k(R,120))+l|0,W=r+E|0;;){if(n[(N=Q-1|0)+(u+270|0)|0]

>>0&(0|I)>=(0|Q)|(0|I)>(0|Q))?g:N,Q=p?Q:I,I=f[B>>2],y=(N=(0|_)>(0|(p=f[B+4>>2]))?1:y>>>0>I>>>0&(0|_)>=(0|p))?y:I,_=N?_:p,N=I,E=(I=E>>>0>>0&(0|p)>=(0|m)|(0|p)>(0|m))?E:N,m=I?m:p,B=B+88|0,!(e=e-88|0))break}}else g=-1,Q=2147483647,d=1,w=-2147483648,y=1,_=-2147483648,E=-1,m=2147483647;e=f[K+4>>2],f[(B=o+2240|0)>>2]=f[K>>2],f[B+4>>2]=e,e=f[rr+4>>2],f[(B=o+2232|0)>>2]=f[rr>>2],f[B+4>>2]=e,e=f[W+4>>2],f[(B=o+2224|0)>>2]=f[W>>2],f[B+4>>2]=e,e=f[Y+4>>2],f[(B=o+2216|0)>>2]=f[Y>>2],f[B+4>>2]=e,e=f[O+4>>2],f[(B=o+2208|0)>>2]=f[O>>2],f[B+4>>2]=e,e=f[C+4>>2],f[(B=o+2200|0)>>2]=f[C>>2],f[B+4>>2]=e,e=f[Er+4>>2],f[(B=o+2192|0)>>2]=f[Er>>2],f[B+4>>2]=e,e=f[o+3020>>2],f[o+2184>>2]=f[o+3016>>2],f[o+2188>>2]=e,f[o+2304>>2]=y,f[o+2308>>2]=_,f[o+2296>>2]=1,f[o+2300>>2]=0,f[o+2288>>2]=d,f[o+2292>>2]=w,f[o+2280>>2]=1,f[o+2284>>2]=0,f[o+2272>>2]=E,f[o+2276>>2]=m,f[o+2264>>2]=1,f[o+2268>>2]=0,f[o+2256>>2]=g,f[o+2260>>2]=Q,f[o+2248>>2]=1,f[o+2252>>2]=0,ze(o+2312|0,o+736|0,116),f[o+2444>>2]=f[L>>2],f[o+2432>>2]=D,f[o+2428>>2]=Gr,e=f[o+1708>>2],f[o+2436>>2]=f[o+1704>>2],f[o+2440>>2]=e,Z(o+1512|0,o+2184|0),e=f[(d=o+1528|0)+4>>2],f[(w=o+1472|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+1536|0)>>2],B=w=f[d+4>>2],f[(d=o+1480|0)>>2]=e,f[d+4>>2]=w,d=f[(w=o+1544|0)+4>>2],f[(g=o+1488|0)>>2]=f[w>>2],f[g+4>>2]=d,d=f[(w=o+1552|0)+4>>2],f[(g=o+1496|0)>>2]=f[w>>2],f[g+4>>2]=d,d=f[(w=o+1560|0)+4>>2],f[(g=o+1504|0)>>2]=f[w>>2],f[g+4>>2]=d,p=qe(e,B,O=f[o+1576>>2],0),K=d=M,f[(e=o+1520|0)>>2]=p,f[e+4>>2]=d,f[(e=o+1464|0)>>2]=p,f[e+4>>2]=d,f[o+1512>>2]=1,f[o+1516>>2]=0,f[o+1456>>2]=1,f[o+1460>>2]=0,Ir=f[o+1568>>2],N=f[o+1572>>2],rr=f[o+1580>>2],Gr=f[o+1584>>2],Or=f[o+1588>>2],e=f[(d=o+1600|0)+4>>2],f[(w=o+2944|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[o+1596>>2],f[o+2936>>2]=f[o+1592>>2],f[o+2940>>2]=e,me=0,Le=1,ke=0,L=0;break Q}for(I=k(F,104),e=0;;){if(!f[(d=e+Or|0)+16>>2])break C;if(f[d>>2]=1,f[d+4>>2]=0,p=d+8|0,d=(g=f[(w=d+24|0)>>2])-Ar|0,y=(w=f[w+4>>2]-((g>>>0>>0)+br|0)|0)-2|0,g=(g=(0|w)<-1)?w+2|0:w,w=br+((w=(0|w)>0)?y:g)|0,w=(d=d+Ar|0)>>>0>>0?w+1|0:w,f[p>>2]=d,f[p+4>>2]=w,(0|I)==(0|(e=e+104|0)))break}for(e=k(F,104),B=Or+56|0,y=1,_=-2147483648,E=-1,m=2147483647,g=-1,Q=2147483647,d=1,w=-2147483648;;){if(1!=f[B-8>>2])break R;if(!f[B-24>>2])break N;if(p=f[(I=B-16|0)>>2],d=(N=(0|(I=f[I+4>>2]))<(0|w)?1:d>>>0>p>>>0&(0|w)>=(0|I))?d:p,w=N?w:I,N=p,g=(p=g>>>0

>>0&(0|I)>=(0|Q)|(0|I)>(0|Q))?g:N,Q=p?Q:I,I=f[B>>2],y=(N=(0|_)>(0|(p=f[B+4>>2]))?1:y>>>0>I>>>0&(0|_)>=(0|p))?y:I,_=N?_:p,N=I,E=(I=E>>>0>>0&(0|p)>=(0|m)|(0|p)>(0|m))?E:N,m=I?m:p,B=B+104|0,!(e=e-104|0))break}}e=f[W+4>>2],f[(B=o+2240|0)>>2]=f[W>>2],f[B+4>>2]=e,e=f[Y+4>>2],f[(B=o+2232|0)>>2]=f[Y>>2],f[B+4>>2]=e,e=f[O+4>>2],f[(B=o+2224|0)>>2]=f[O>>2],f[B+4>>2]=e,e=f[C+4>>2],f[(B=o+2216|0)>>2]=f[C>>2],f[B+4>>2]=e,e=f[Er+4>>2],f[(B=o+2208|0)>>2]=f[Er>>2],f[B+4>>2]=e,e=f[D+4>>2],f[(B=o+2200|0)>>2]=f[D>>2],f[B+4>>2]=e,e=f[Gr+4>>2],f[(B=o+2192|0)>>2]=f[Gr>>2],f[B+4>>2]=e,e=f[o+3020>>2],f[o+2184>>2]=f[o+3016>>2],f[o+2188>>2]=e,f[o+2304>>2]=y,f[o+2308>>2]=_,me=1,f[o+2296>>2]=1,f[o+2300>>2]=0,f[o+2288>>2]=d,f[o+2292>>2]=w,f[o+2280>>2]=1,f[o+2284>>2]=0,f[o+2272>>2]=E,f[o+2276>>2]=m,f[o+2264>>2]=1,f[o+2268>>2]=0,f[o+2256>>2]=g,f[o+2260>>2]=Q,f[o+2248>>2]=1,f[o+2252>>2]=0,ze(o+2312|0,o+736|0,132),e=f[rr+4>>2],f[(d=o+2460|0)>>2]=f[rr>>2],f[d+4>>2]=e,f[o+2468>>2]=f[K>>2],f[o+2448>>2]=F,f[o+2444>>2]=Or,e=f[o+1708>>2],f[o+2452>>2]=f[o+1704>>2],f[o+2456>>2]=e,j(o+1608|0,o+2184|0),e=f[(d=o+1624|0)+4>>2],f[(w=o+1472|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+1632|0)>>2],B=w=f[d+4>>2],f[(d=o+1480|0)>>2]=e,f[d+4>>2]=w,d=f[(w=o+1640|0)+4>>2],f[(g=o+1488|0)>>2]=f[w>>2],f[g+4>>2]=d,d=f[(w=o+1648|0)+4>>2],f[(g=o+1496|0)>>2]=f[w>>2],f[g+4>>2]=d,d=f[(w=o+1656|0)+4>>2],f[(g=o+1504|0)>>2]=f[w>>2],f[g+4>>2]=d,p=qe(e,B,O=f[o+1672>>2],0),K=d=M,f[(e=o+1616|0)>>2]=p,f[e+4>>2]=d,f[(e=o+1464|0)>>2]=p,f[e+4>>2]=d,f[o+1608>>2]=1,f[o+1612>>2]=0,f[o+1456>>2]=1,f[o+1460>>2]=0,Ir=f[o+1664>>2],N=f[o+1668>>2],rr=f[o+1676>>2],Gr=f[o+1680>>2],Or=f[o+1684>>2],e=f[(d=o+1696|0)+4>>2],f[(w=o+2944|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[o+1692>>2],f[o+2936>>2]=f[o+1688>>2],f[o+2940>>2]=e,ke=0,T=0;break Q}Ve(1054600),$f()}Ve(1054616),$f()}Ve(1054632),$f()}Ve(1054600),$f()}Ve(1054616),$f()}Ve(1054632),$f()}if(f[o+3016>>2]=2,f[o+3020>>2]=0,Ue=e=f[o+4>>2],!e&2==(0|(Er=f[o>>2])))break d;if(e=f[(d=o+8|0)+4>>2],f[(w=kr=o+1832|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+16|0)+4>>2],f[(w=J=o+1840|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+24|0)+4>>2],f[(w=er=o+1848|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+32|0)+4>>2],f[(w=q=o+1856|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+40|0)+4>>2],f[(w=F=o+1864|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+48|0)+4>>2],f[(w=D=o+1872|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+56|0)+4>>2],f[(w=C=o+1880|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[o+4>>2],f[o+1824>>2]=f[o>>2],f[o+1828>>2]=e,ze(o+1704|0,o+128|0,116),Y=f[o+252>>2],Nr=f[o+244>>2],vr=f[o+248>>2]){for(I=k(vr,88),e=0;;){if(!f[(d=e+Nr|0)+16>>2])break _;if(f[d>>2]=1,f[d+4>>2]=0,p=d+8|0,d=(g=f[(w=d+24|0)>>2])-Ar|0,y=(w=f[w+4>>2]-((g>>>0>>0)+br|0)|0)-2|0,g=(g=(0|w)<-1)?w+2|0:w,w=br+((w=(0|w)>0)?y:g)|0,w=(d=d+Ar|0)>>>0>>0?w+1|0:w,f[p>>2]=d,f[p+4>>2]=w,(0|I)==(0|(e=e+88|0)))break}for(e=k(vr,88),B=Nr+56|0,y=1,_=-2147483648,E=-1,m=2147483647,g=-1,Q=2147483647,d=1,w=-2147483648;;){if(1!=f[B-8>>2])break E;if(!f[B-24>>2])break B;if(p=f[(I=B-16|0)>>2],d=(K=(0|(I=f[I+4>>2]))<(0|w)?1:d>>>0>p>>>0&(0|w)>=(0|I))?d:p,w=K?w:I,K=p,g=(p=g>>>0

>>0&(0|I)>=(0|Q)|(0|I)>(0|Q))?g:K,Q=p?Q:I,p=f[B>>2],y=(W=(0|_)>(0|(I=f[B+4>>2]))?1:y>>>0>p>>>0&(0|_)>=(0|I))?y:p,_=W?_:I,E=(W=E>>>0

>>0&(0|m)<=(0|(K=I))|(0|I)>(0|m))?E:p,m=W?m:I,B=B+88|0,!(e=e-88|0))break}}else g=-1,Q=2147483647,d=1,w=-2147483648,y=1,_=-2147483648,E=-1,m=2147483647;if(e=f[C+4>>2],f[(B=o+2240|0)>>2]=f[C>>2],f[B+4>>2]=e,e=f[D+4>>2],f[(B=o+2232|0)>>2]=f[D>>2],f[B+4>>2]=e,e=f[F+4>>2],f[(B=o+2224|0)>>2]=f[F>>2],f[B+4>>2]=e,e=f[q+4>>2],f[(B=o+2216|0)>>2]=f[q>>2],f[B+4>>2]=e,e=f[er+4>>2],f[(B=o+2208|0)>>2]=f[er>>2],f[B+4>>2]=e,e=f[J+4>>2],f[(B=o+2200|0)>>2]=f[J>>2],f[B+4>>2]=e,e=f[kr+4>>2],f[(B=o+2192|0)>>2]=f[kr>>2],f[B+4>>2]=e,e=f[o+1828>>2],f[o+2184>>2]=f[o+1824>>2],f[o+2188>>2]=e,f[o+2304>>2]=y,f[o+2308>>2]=_,f[o+2296>>2]=1,f[o+2300>>2]=0,f[o+2288>>2]=d,f[o+2292>>2]=w,f[o+2280>>2]=1,f[o+2284>>2]=0,f[o+2272>>2]=E,f[o+2276>>2]=m,f[o+2264>>2]=1,f[o+2268>>2]=0,f[o+2256>>2]=g,f[o+2260>>2]=Q,f[o+2248>>2]=1,f[o+2252>>2]=0,ze(o+2312|0,o+1704|0,116),f[o+2436>>2]=Y,f[o+2432>>2]=vr,f[o+2428>>2]=Nr,tr=0,S=g=S-560|0,e=f[(X=o+2184|0)+248>>2])for(W=(B=f[X+244>>2])+k(e,88)|0,d=g+512|0,Q=g+348|0;;){y=n[B+64|0],i[g+512|0]=y;Q:{N:{if((y-1&255)>>>0<=8)i[g+460|0]=y;else{if(f[g+356>>2]=1,f[g+352>>2]=1057284,f[g+340>>2]=1,f[g+336>>2]=1057176,f[g+348>>2]=1,f[g+528>>2]=d,f[g+532>>2]=7,f[g+344>>2]=g+528,Mr(g+456|0,g+336|0),-2147483648!=(0|(y=f[g+456>>2])))break N;y=n[g+460|0]}if((y-6&255)>>>0>3)break Q;if(!(C=f[B+80>>2]))break Q;for(E=(Y=f[B+76>>2])+(m=C<<4)|0,e=I=f[B+84>>2];;){y=f[E-12>>2]-1|0,e=e-(_=f[E-8>>2])|0;R:{C:{for(;;){if(!(w=_))break C;if(_=w-1|0,n[w+y|0])break}if((0|(D=e+w|0))==(0|I))break Q;if(I>>>0<=D>>>0)break R;for(_=C-1|0,y=(m+Y|0)-16|0;;){if((0|I)!=(0|D)){if(D>>>0>(I=I-f[(E=y+8|0)>>2]|0)>>>0){zr(g+336|0,y,0,D-I|0),fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[E>>2]),e=f[(w=g+344|0)+4>>2],f[E>>2]=f[w>>2],f[E+4>>2]=e,e=f[g+340>>2],f[y>>2]=f[g+336>>2],f[y+4>>2]=e,f[B+84>>2]=D;break Q}if(f[B+80>>2]=_,e=f[E+4>>2],f[(w=g+344|0)>>2]=f[E>>2],f[w+4>>2]=e,e=f[y+4>>2],w=f[y>>2],f[g+336>>2]=w,f[g+340>>2]=e,w&&fi[f[w+16>>2]](Q,f[g+340>>2],f[g+344>>2]),y=y-16|0,-1!=(0|(_=_-1|0)))continue}break}f[B+84>>2]=D;break Q}if((0|Y)!=(0|(E=E-16|0)))continue;break Q}break}f[g+352>>2]=0,f[g+340>>2]=1,f[g+336>>2]=1058712,f[g+344>>2]=4,f[g+348>>2]=0,Me(g+336|0,1058720),$f()}if(y){if(w=f[g+460>>2],(E=-8&(e=f[w-4>>2]))>>>0>>0)break e;if(E>>>0>y+39>>>0&&e)break r;nr(w)}}if((0|W)==(0|(B=B+88|0)))break}F=o+736|0;Q:{N:{R:{if(W=V(16)){if(f[g+520>>2]=0,f[g+516>>2]=W,f[g+512>>2]=1,m=V(16)){if(f[g+536>>2]=0,f[g+532>>2]=m,f[g+528>>2]=1,!(e=f[X+248>>2]))break N;for(I=(E=f[X+244>>2])+k(e,88)|0,y=E+88|0,e=g+304|0;;){d=E,E=y,y=n[d+64|0],i[g+304|0]=y;C:{if((y-1&255)>>>0<=8)f[g+456>>2]=-2147483648,i[g+460|0]=y;else{if(f[g+356>>2]=1,f[g+352>>2]=1057284,f[g+340>>2]=1,f[g+336>>2]=1057176,f[g+348>>2]=1,f[g+320>>2]=e,f[g+324>>2]=7,f[g+344>>2]=g+320,Mr(g+456|0,g+336|0),-2147483648!=(0|(y=f[g+456>>2]))){if(!y)break C;w=f[g+460>>2];p:{if((B=-8&(d=f[w-4>>2]))>>>0>=y+((d&=3)?4:8)>>>0){if(B>>>0>y+39>>>0&&d)break p;nr(w);break C}break e}break r}y=n[g+460|0]}p:{m:{G:switch((255&y)-7|0){case 0:for(_=pr<<4,y=W;;){if(!_)break m;if(_=_-16|0,B=y+8|0,w=y+4|0,y=y+16|0,ve(d,f[w>>2],f[B>>2]))break}break C;case 1:break G;default:break C}for(_=tr<<4,y=m;;){if(!_)break p;if(_=_-16|0,B=y+8|0,w=y+4|0,y=y+16|0,ve(d,f[w>>2],f[B>>2]))break}break C}wr(g+336|0,d),f[g+512>>2]==(0|pr)&&(ce(g+512|0,1055332),W=f[g+516>>2]),d=f[g+340>>2],f[(w=(pr<<4)+W|0)>>2]=f[g+336>>2],f[w+4>>2]=d,B=w+8|0,d=f[(w=g+344|0)+4>>2],f[B>>2]=f[w>>2],f[B+4>>2]=d,pr=pr+1|0,f[g+520>>2]=pr;break C}wr(g+336|0,d),f[g+528>>2]==(0|tr)&&(ce(g+528|0,1055348),m=f[g+532>>2]),d=f[g+340>>2],f[(w=(tr<<4)+m|0)>>2]=f[g+336>>2],f[w+4>>2]=d,B=w+8|0,d=f[(w=g+344|0)+4>>2],f[B>>2]=f[w>>2],f[B+4>>2]=d,tr=tr+1|0,f[g+536>>2]=tr}if(y=((d=(0|E)==(0|I))?0:88)+E|0,d)break}break R}Ze(4,1055284),$f()}Ze(4,1055268),$f()}if(pr)break Q}(e=f[R+12>>2])?(fi[f[e>>2]](g+336|0,R+24|0,f[R+16>>2],f[R+20>>2]),f[g+512>>2]||(ce(g+512|0,1055300),W=f[g+516>>2]),e=f[g+340>>2],f[W>>2]=f[g+336>>2],f[W+4>>2]=e,e=f[(d=g+344|0)+4>>2],f[(w=W+8|0)>>2]=f[d>>2],f[w+4>>2]=e,pr=1,f[g+520>>2]=1):pr=0}Q:{N:{R:{C:{p:{m:{G:{if(!tr){if(!(e=f[R+28>>2]))break G;fi[f[e>>2]](g+336|0,R+40|0,f[R+32>>2],f[R+36>>2]),f[g+528>>2]||(ce(g+528|0,1055316),m=f[g+532>>2]),e=f[g+340>>2],f[m>>2]=f[g+336>>2],f[m+4>>2]=e,e=f[(d=g+344|0)+4>>2],f[(w=m+8|0)>>2]=f[d>>2],f[w+4>>2]=e,f[g+536>>2]=1,tr=1}if(pr)break m;if(tr){if(_=0,1!=(0|tr)){for(d=1&tr,e=-2&tr,y=m;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+16>>2]+16>>2]](y+28|0,f[y+20>>2],f[y+24>>2]),y=y+32|0,(0|e)!=(0|(_=_+2|0)););if(!d)break G}fi[f[f[(e=(_<<4)+m|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}}if(w=f[g+528>>2]){if((B=-8&(e=f[m-4>>2]))>>>0<(((d=3&e)?4:8)|(e=w<<4))>>>0)break e;if(B>>>0>e+39>>>0&&d)break r;nr(m)}e=f[g+516>>2];G:if(d=f[g+520>>2]){if(_=0,1!=(0|d)){for(w=1&d,d&=-2,y=e;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+16>>2]+16>>2]](y+28|0,f[y+20>>2],f[y+24>>2]),y=y+32|0,(0|d)!=(0|(_=_+2|0)););if(!w)break G}fi[f[f[(d=e+(_<<4)|0)>>2]+16>>2]](d+12|0,f[d+4>>2],f[d+8>>2])}if(!(B=f[g+512>>2]))break p;if((E=-8&(d=f[e-4>>2]))>>>0<(((w=3&d)?4:8)|(d=B<<4))>>>0)break e;if(E>>>0>d+39>>>0&&w)break r;nr(e);break p}if(-2147483648!=(0|(Se=f[g+512>>2]))){if(Y=3&pr,pr>>>0<4)_=0,B=0;else for(y=W+56|0,e=134217724&pr,_=0,B=0;_=f[y>>2]+(f[y-16>>2]+(f[y-32>>2]+(f[y-48>>2]+_|0)|0)|0)|0,y=y- -64|0,(0|e)!=(0|(B=B+4|0)););if(Y)for(y=8+((B<<4)+W|0)|0;_=f[y>>2]+_|0,y=y+16|0,Y=Y-1|0;);if(B=3&tr,tr>>>0<4)Y=0,I=0;else for(y=m+56|0,e=134217724&tr,Y=0,I=0;Y=f[y>>2]+(f[y-16>>2]+(f[y-32>>2]+(f[y-48>>2]+Y|0)|0)|0)|0,y=y- -64|0,(0|e)!=(0|(I=I+4|0)););if(B)for(y=8+((I<<4)+m|0)|0;Y=f[y>>2]+Y|0,y=y+16|0,B=B-1|0;);m:{G:{Y:{if((0|(e=7+(((tr+pr<<1)+_|0)+Y|0)|0))>=0){if(Xe=f[g+528>>2],!e)break G;if(y=V(e))break Y;r=1}else r=0;Ze(r,1055412),$f()}f[g+344>>2]=0,f[g+340>>2]=y,f[g+336>>2]=e;break m}f[g+344>>2]=0,f[g+336>>2]=0,f[g+340>>2]=1,de(g+336|0,1055428),y=f[g+340>>2]}i[0|y]=1,f[g+344>>2]=1;m:{G:{Y:{W:{D:{if((e=f[W+8>>2])>>>0>=2){if(e=n[f[W+4>>2]+1|0],1==f[g+336>>2]&&(de(g+336|0,1055460),y=f[g+340>>2]),i[y+1|0]=e,f[g+344>>2]=2,(e=f[W+8>>2])>>>0<3)break D;if(e=n[f[W+4>>2]+2|0],2==f[g+336>>2]&&de(g+336|0,1055492),y=f[g+340>>2],i[y+2|0]=e,f[g+344>>2]=3,(e=f[W+8>>2])>>>0<4)break W;for(e=n[f[W+4>>2]+3|0],3==(0|(_=f[g+336>>2]))&&(de(g+336|0,1055524),_=f[g+336>>2],y=f[g+340>>2]),i[y+3|0]=e,f[g+344>>2]=4,4==(0|_)&&(de(g+336|0,1055540),_=f[g+336>>2],y=f[g+340>>2]),i[y+4|0]=255,f[g+344>>2]=5,5==(0|_)&&de(g+336|0,1055556),_=f[g+340>>2],i[_+5|0]=-32|pr,y=6,f[g+344>>2]=6,E=pr<<4,Y=0;e=(d=f[(w=(B=Y+W|0)+8|0)>>2])>>>8|0,f[g+336>>2]==(0|y)&&(de(g+336|0,1055620),_=f[g+340>>2]),i[y+_|0]=e,e=y+1|0,f[g+344>>2]=e,(0|e)==(0|(I=f[g+336>>2]))&&(de(g+336|0,1055636),I=f[g+336>>2]),_=f[g+340>>2],i[e+_|0]=d,y=y+2|0,f[g+344>>2]=y,e=f[B+4>>2],(d=f[w>>2])>>>0>I-y>>>0&&(Ae(g+336|0,y,d,1,1),_=f[g+340>>2],y=f[g+344>>2]),ze(y+_|0,e,d),y=d+y|0,f[g+344>>2]=y,(0|E)!=(0|(Y=Y+16|0)););for(f[g+336>>2]==(0|y)&&(de(g+336|0,1055572),_=f[g+340>>2]),i[y+_|0]=tr,y=y+1|0,f[g+344>>2]=y,I=tr<<4,B=0;e=(d=f[(w=(E=B+m|0)+8|0)>>2])>>>8|0,(0|(_=f[g+336>>2]))==(0|y)&&(de(g+336|0,1055588),_=f[g+336>>2]),Y=f[g+340>>2],i[Y+y|0]=e,e=y+1|0,f[g+344>>2]=e,(0|e)==(0|_)&&(de(g+336|0,1055604),Y=f[g+340>>2],_=f[g+336>>2]),i[e+Y|0]=d,y=y+2|0,f[g+344>>2]=y,e=f[E+4>>2],(d=f[w>>2])>>>0>_-y>>>0&&(Ae(g+336|0,y,d,1,1),Y=f[g+340>>2],y=f[g+344>>2]),ze(y+Y|0,e,d),y=d+y|0,f[g+344>>2]=y,(0|I)!=(0|(B=B+16|0)););f[g+464>>2]=f[g+344>>2],e=f[g+340>>2],f[g+456>>2]=f[g+336>>2],f[g+460>>2]=e,d=f[(e=W+4|0)>>2],e=f[e+4>>2],f[g+360>>2]=4,f[g+364>>2]=0,f[g+336>>2]=0,f[g+340>>2]=0,f[g+344>>2]=d,f[g+348>>2]=e,f[g+352>>2]=0,f[g+356>>2]=0,Vr(g+296|0,g+336|0,1);S:{if(n[g+296|0]){for(R=g+356|0,E=n[g+297|0],w=f[g+340>>2],w=(d=f[g+336>>2]+32|0)>>>0<32?w+1|0:w,f[g+336>>2]=d,f[g+340>>2]=w,y=0;;){if(Vr(g+288|0,g+336|0,(7&w)<<29|d>>>3),!n[g+288|0])break N;if(B=n[g+289|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}if(Zr(g+336|0,y),(e=E-100|0)>>>0<=22)break S;break Y}Ve(1055652),$f()}if(!(1<>2],w=f[g+340>>2];G:{for(;;){if(Vr(g+280|0,g+336|0,(7&w)<<29|d>>>3),!n[g+280|0])break G;if(B=n[g+281|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}e=Zr(g+336|0,y),d=f[g+336>>2],w=f[g+340>>2],-4==(0|(Y=(-1<>2]=d,f[g+340>>2]=w),y=0;Y:{for(;;){if(Vr(g+272|0,g+336|0,(7&w)<<29|d>>>3),!n[g+272|0])break Y;if(B=n[g+273|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}Zr(g+336|0,y),y=0,d=f[g+336>>2],w=f[g+340>>2];W:{for(;;){if(Vr(g+264|0,g+336|0,(7&w)<<29|d>>>3),!n[g+264|0])break W;if(B=n[g+265|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}if(Zr(E=g+336|0,y),w=f[g+340>>2],w=(e=f[g+336>>2]+1|0)?w:w+1|0,f[g+336>>2]=e,f[g+340>>2]=w,Vr(g+256|0,E,(7&w)<<29|e>>>3),n[g+256|0]){if(d=n[g+257|0],w=f[g+340>>2],w=(B=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=B,f[g+340>>2]=w,!(d>>>(7&~e)&1))break m;Vr(g+248|0,E,(7&w)<<29|B>>>3);D:if(n[g+248|0]&&(I=n[g+249|0],w=f[g+340>>2],w=(e=(B=f[(d=g)+336>>2])+1|0)?w:w+1|0,f[d+336>>2]=e,f[d+340>>2]=w,y=d+240|0,I>>>(7&~B)&1&&(Cr(E,16),e=f[d+336>>2],w=f[d+340>>2]),Vr(y,E,(7&w)<<29|e>>>3),n[d+240|0]&&(Q=n[d+241|0],w=f[d+340>>2],w=(e=(B=f[d+336>>2])+1|0)?w:w+1|0,f[d+336>>2]=e,f[d+340>>2]=w,I=d+232|0,y=_=d+336|0,Q>>>(7&~B)&1&&(Cr(E,16),e=f[d+336>>2],w=f[d+340>>2]),Vr(I,y,(7&w)<<29|e>>>3),n[d+232|0]&&(I=n[d+233|0],w=f[d+340>>2],w=(e=(B=f[d+336>>2])+1|0)?w:w+1|0,f[d+336>>2]=e,f[d+340>>2]=w,y=d+224|0,E=Q=d+336|0,I>>>(7&~B)&1&&(Cr(_,16),e=f[d+336>>2],w=f[d+340>>2]),Vr(y,E,(7&w)<<29|e>>>3),n[d+224|0]&&(I=n[d+225|0],w=f[d+340>>2],w=(e=(B=f[d+336>>2])+1|0)?w:w+1|0,f[d+336>>2]=e,f[d+340>>2]=w,y=d+216|0,E=_=d+336|0,I>>>(7&~B)&1&&(Cr(Q,16),e=f[d+336>>2],w=f[d+340>>2]),Vr(y,E,(7&w)<<29|e>>>3),n[d+216|0]&&(I=n[d+217|0],w=f[d+340>>2],w=(e=(B=f[d+336>>2])+1|0)?w:w+1|0,f[d+336>>2]=e,f[d+340>>2]=w,y=d+208|0,E=d+336|0,I>>>(7&~B)&1&&(Cr(_,16),e=f[d+336>>2],w=f[d+340>>2]),Vr(y,E,(7&w)<<29|e>>>3),n[d+208|0])))))){for(B=n[d+209|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1&&Cr(E,16),y=-4==(0|Y)?6:2;;){if(e=f[g+336>>2],Vr(g+200|0,E=g+336|0,(7&f[g+340>>2])<<29|e>>>3),!n[g+200|0])break D;if(B=n[g+201|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1&&Cr(E,64),!(y=y-1|0))break}break m}break N}break N}break N}break N}break N}for(y=0,d=f[g+336>>2],w=f[g+340>>2];;){if(Vr(g+192|0,g+336|0,(7&w)<<29|d>>>3),!n[g+192|0])break N;if(B=n[g+193|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}for(Zr(g+336|0,y),y=0,d=f[g+336>>2],w=f[g+340>>2];;){if(Vr(g+184|0,g+336|0,(7&w)<<29|d>>>3),!n[g+184|0])break N;if(B=n[g+185|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}m:{G:switch(Zr(g+336|0,y)+~(-1<>2],w=f[g+340>>2];;){if(Vr(g+152|0,g+336|0,(7&w)<<29|d>>>3),!n[g+152|0])break N;if(B=n[g+153|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}Zr(g+336|0,y);break m;case 1:break G;default:break m}w=f[g+340>>2],w=(d=f[g+336>>2]+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,y=0;G:{for(;;){if(Vr(g+176|0,g+336|0,(7&w)<<29|d>>>3),!n[g+176|0])break G;if(B=n[g+177|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}Zr(g+336|0,y),y=0,d=f[g+336>>2],w=f[g+340>>2];Y:{for(;;){if(Vr(g+168|0,g+336|0,(7&w)<<29|d>>>3),!n[g+168|0])break Y;if(B=n[g+169|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}Zr(g+336|0,y),y=0,d=f[g+336>>2],w=f[g+340>>2];W:{for(;;){if(Vr(g+160|0,g+336|0,(7&w)<<29|d>>>3),!n[g+160|0])break W;if(B=n[g+161|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}if(!(C=Zr(g+336|0,y)+~(-1<>2],(y=(7&f[g+340>>2])<<29|e>>>3)>>>0>=(I=f[g+348>>2])>>>0)break N;for(Q=0,e=f[g+352>>2];;){if(e>>>0>=y>>>0)E=f[g+364>>2],B=I;else{D:{S:{if((_=(w=e)+((e=(E=f[g+364>>2])-2|0)>>>0<=E>>>0?e:0)|0)>>>0<=I>>>0){if((0|_)!=(0|I))break S;B=I;break D}xe(_,I,1055768),$f()}for(d=f[g+344>>2],Y=0;;){e=Y,Y=0;S:{F:switch(n[d+_|0]){case 0:Y=e+1|0;break S;case 3:break F;default:break S}(0|e)<2||(f[g+356>>2]==(0|E)&&he(R),f[f[g+360>>2]+(E<<2)>>2]=_,E=E+1|0,f[g+364>>2]=E)}if((0|(_=_+1|0))==(0|I))break}B=f[g+348>>2]}e=I-E|0,f[g+352>>2]=e}D:if(E)for(_=f[g+360>>2],Y=E<<2;;){if(t[_>>2]>y>>>0)break D;if(y=y+1|0,_=_+4|0,!(Y=Y-4|0))break}if(y>>>0>=B>>>0)break N;if(E=n[f[g+344>>2]+y|0],w=f[g+340>>2],w=(y=(d=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=y,f[g+340>>2]=w,!(E>>>(7&~d)&1|Q>>>0>31)){if(Q=Q+1|0,I=B,(y=(7&w)<<29|y>>>3)>>>0>>0)continue;break N}break}if(Zr(g+336|0,Q),D=(e=C>>>0>D>>>0)+D|0,!e)break}break m}break N}break N}break N}for(y=0,d=f[g+336>>2],w=f[g+340>>2];;){if(Vr(g+144|0,g+336|0,(7&w)<<29|d>>>3),!n[g+144|0])break N;if(B=n[g+145|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}for(Zr(g+336|0,y),w=f[g+340>>2],w=(d=f[g+336>>2]+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B=0;;){if(Vr(g+136|0,g+336|0,(7&w)<<29|d>>>3),!n[g+136|0])break N;if(E=n[g+137|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|B>>>0>31)break;B=B+1|0}for(I=0,Je=Zr(g+336|0,B),d=f[g+336>>2],w=f[g+340>>2];;){if(Vr(g+128|0,g+336|0,(7&w)<<29|d>>>3),!n[g+128|0])break N;if(E=n[g+129|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|I>>>0>31)break;I=I+1|0}if(He=Zr(E=g+336|0,I),e=f[g+336>>2],Vr(g+120|0,E,(7&f[g+340>>2])<<29|e>>>3),!n[g+120|0])break N;if(d=(w=e=f[g+336>>2])+(e=(ur=n[g+121|0]&1<<(7&~e))?1:2)|0,w=f[g+340>>2],w=e>>>0>d>>>0?w+1|0:w,w=(e=d+1|0)?w:w+1|0,f[g+336>>2]=e,f[g+340>>2]=w,Vr(g+112|0,E,(7&w)<<29|e>>>3),!n[g+112|0])break N;if(E=n[g+113|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1){for(y=0;;){if(Vr(g+104|0,g+336|0,(7&w)<<29|d>>>3),!n[g+104|0])break N;if(E=n[g+105|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}for(Y=1+((-1<>2],w=f[g+340>>2];;){if(Vr(g+96|0,g+336|0,(7&w)<<29|d>>>3),!n[g+96|0])break N;if(E=n[g+97|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}for(Q=1+((-1<>2],w=f[g+340>>2];;){if(Vr(g+88|0,g+336|0,(7&w)<<29|d>>>3),!n[g+88|0])break N;if(E=n[g+89|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}for(_=1+((-1<>2],w=f[g+340>>2];;){if(Vr(g+80|0,g+336|0,(7&w)<<29|d>>>3),!n[g+80|0])break N;if(E=n[g+81|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}je=_<<1,Ke=Q<<1,ri=Y<<1,ei=2+((-1<>2],d=f[g+336>>2]}Vr(g+72|0,_=g+336|0,(7&w)<<29|d>>>3);m:{G:{if(n[g+72|0]){if(d=n[g+73|0],w=f[g+340>>2],w=(E=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=E,f[g+340>>2]=w,Fe=1,we=24,!(d>>>(7&~e)&1))break m;if(Vr(g- -64|0,_,(7&w)<<29|E>>>3),!n[g+64|0])break N;if(y=n[g+65|0],w=f[g+340>>2],e=g,w=(E=(d=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=E,f[g+340>>2]=w,!(y>>>(7&~d)&1))break G;if(255==(0|(d=Zr(_,8)))){Ge=1,We=Zr(_,16),De=Zr(_,16);break G}if(d>>>0<=16){Ge=0!=((We=a[(d<<=2)+1055668>>1])|(De=a[d+1055670>>1]));break G}Ne(d,17,1055736),$f()}break N}if(d=f[e+336>>2],Vr(e+56|0,_=e+336|0,(7&f[e+340>>2])<<29|d>>>3),!n[e+56|0])break N;if(E=f[e+336>>2],d=n[e+57|0]>>>(7&~E)&1?2:1,w=f[e+340>>2],w=(d=d+E|0)>>>0>>0?w+1|0:w,f[e+336>>2]=d,f[e+340>>2]=w,Vr(e+48|0,_,(7&w)<<29|d>>>3),!n[e+48|0])break N;if(y=n[e+49|0],e=w=f[g+340>>2],w=(d=(E=f[g+336>>2])+1|0)?e:e+1|0,f[g+336>>2]=d,f[g+340>>2]=w,y>>>(7&~E)&1){if(w=e,w=(e=E+5|0)>>>0<5?w+1|0:w,f[g+336>>2]=e,f[g+340>>2]=w,Vr(g+40|0,_,(7&w)<<29|e>>>3),!n[g+40|0])break N;y=n[g+41|0],e=w=f[g+340>>2],w=(d=(E=f[g+336>>2])+1|0)?e:e+1|0,f[g+336>>2]=d,f[g+340>>2]=w,y>>>(7&~E)&1&&(w=(d=E+25|0)>>>0<25?e+1|0:e,f[g+336>>2]=d,f[g+340>>2]=w)}Vr(g+32|0,g+336|0,(7&w)<<29|d>>>3);G:{Y:{if(n[g+32|0]){if(E=n[g+33|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,!(E>>>(7&~e)&1))break G;for(y=0;;){if(Vr(g+24|0,g+336|0,(7&w)<<29|d>>>3),!n[g+24|0])break N;if(E=n[g+25|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}for(Zr(g+336|0,y),y=0,d=f[g+336>>2],w=f[g+340>>2];;){if(Vr(g+16|0,g+336|0,(7&w)<<29|d>>>3),!n[g+16|0])break N;if(E=n[g+17|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|y>>>0>31)break Y;y=y+1|0}}break N}Zr(g+336|0,y),d=f[g+336>>2],w=f[g+340>>2]}if(Vr(g+8|0,y=g+336|0,(7&w)<<29|d>>>3),!n[g+8|0])break N;E=n[g+9|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1&&(E=Zr(y,32),d=Zr(y,32),w=f[g+340>>2],w=(e=f[g+336>>2]+1|0)?w:w+1|0,f[g+336>>2]=e,f[g+340>>2]=w,we=+(d>>>0)/+(E<<1>>>0),Fe=0)}if(E=f[g+356>>2]){if(w=f[g+360>>2],(y=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=E<<2)>>>0)break e;if(y>>>0>e+39>>>0&&d)break r;nr(w)}m:{G:{if((e=f[W+8>>2])>>>0>=2){if(2!=(0|e)){if(e>>>0>3){if(d=f[W+4>>2],Rr=n[d+1|0],ne=g+464|0,f[g+312>>2]=f[ne>>2],e=f[g+460>>2],f[g+304>>2]=f[g+456>>2],f[g+308>>2]=e,Nr=n[d+3|0],vr=n[d+2|0],Lr=f[X+240>>2],Y=f[X+244>>2],d=f[X+248>>2],C=0,f[g+328>>2]=0,f[g+320>>2]=0,f[g+324>>2]=8,f[g+440>>2]=0,f[g+444>>2]=4,f[g+448>>2]=0,f[g+452>>2]=0,i[g+434|0]=0,A[g+432>>1]=0,f[g+416>>2]=0,f[g+420>>2]=0,f[g+400>>2]=0,f[g+404>>2]=0,f[g+384>>2]=0,f[g+388>>2]=0,f[g+368>>2]=0,f[g+372>>2]=0,f[g+352>>2]=0,f[g+356>>2]=0,f[g+336>>2]=0,f[g+340>>2]=0,ae=Y+k(d,88)|0,e=Y,!d)break G;kr=g+440|0,w=g+527|0,D=g+540|0,mr=g+344|0,J=(Pr=g+435|0)+4|0,yr=8,y=e;Y:{for(;;){if(e=y+88|0,er=E=f[y+4>>2],!E&2==(0|(d=f[y>>2])))break G;E=f[(_=y+56|0)+4>>2],f[(Q=Be=g+504|0)>>2]=f[_>>2],f[Q+4>>2]=E,E=f[(_=y+48|0)+4>>2],f[(Q=fr=g+496|0)>>2]=f[_>>2],f[Q+4>>2]=E,E=f[(_=y+40|0)+4>>2],f[(Q=Kr=g+488|0)>>2]=f[_>>2],f[Q+4>>2]=E,E=f[(_=y+32|0)+4>>2],f[(Q=$r=g+480|0)>>2]=f[_>>2],f[Q+4>>2]=E,E=f[(_=y+24|0)+4>>2],f[(Q=re=g+472|0)>>2]=f[_>>2],f[Q+4>>2]=E,E=f[(_=y+16|0)+4>>2],f[ne>>2]=f[_>>2],f[ne+4>>2]=E,E=f[y+12>>2],f[g+456>>2]=f[y+8>>2],f[g+460>>2]=E,q=f[y+72>>2],Wr=f[y+76>>2],ee=f[y+80>>2],Ee=f[y+84>>2],y=n[y+64|0],i[g+527|0]=y;W:{D:{if((y-1&255)>>>0<=8)f[g+512>>2]=-2147483648,i[g+516|0]=y;else{if(f[g+548>>2]=1,f[g+544>>2]=1057284,f[g+532>>2]=1,f[g+528>>2]=1057176,f[g+540>>2]=1,f[g+552>>2]=w,f[g+556>>2]=7,f[g+536>>2]=g+552,Mr(g+512|0,g+528|0),-2147483648!=(0|(y=f[g+512>>2])))break D;y=n[g+516|0]}S:{F:{T:{M:switch((255&y)-5|0){default:i[g+433|0]=1;break W;case 0:A[g+432>>1]=257;break W;case 1:case 2:case 3:if(!(Q=n[g+433|0]))break W;if(Sr=f[g+448>>2],_=f[g+452>>2],E=f[g+444>>2],or=f[g+440>>2],!(1&(y=n[g+434|0]))){if(C)break T;C=0}f[g+320>>2]==(0|C)&&oe(g+320|0),R=ze((yr=f[g+324>>2])+k(C,120)|0,g+336|0,97),i[R+98|0]=y,i[R+97|0]=Q,y=n[0|Pr]|n[Pr+1|0]<<8|n[Pr+2|0]<<16|n[Pr+3|0]<<24,i[R+99|0]=y,i[R+100|0]=y>>>8,i[R+101|0]=y>>>16,i[R+102|0]=y>>>24,i[R+103|0]=n[0|J],f[R+116>>2]=_,f[R+112>>2]=Sr,f[R+108>>2]=E,f[R+104>>2]=or,C=C+1|0,f[g+328>>2]=C;break F;case 4:break M}i[0|(R=g+532|0)]=n[0|J],f[g+528>>2]=n[0|Pr]|n[Pr+1|0]<<8|n[Pr+2|0]<<16|n[Pr+3|0]<<24,Sr=f[g+448>>2],E=f[g+444>>2],or=f[g+440>>2];M:if(1&(Q=n[g+433|0])){if(_=f[g+452>>2],!(1&(y=n[g+434|0]))){if(C)break M;C=0}f[g+320>>2]==(0|C)&&(oe(g+320|0),yr=f[g+324>>2]),Fr=Pe(k(C,120)+yr|0,g+336|0,97),i[Fr+98|0]=y,i[Fr+97|0]=Q,y=f[g+528>>2],i[Fr+99|0]=y,i[Fr+100|0]=y>>>8,i[Fr+101|0]=y>>>16,i[Fr+102|0]=y>>>24,i[Fr+103|0]=n[0|R],f[Fr+116>>2]=_,f[Fr+112>>2]=Sr,f[Fr+108>>2]=E,f[Fr+104>>2]=or,C=C+1|0,f[g+328>>2]=C,y=f[g+512>>2];break S}M:if(Sr){if(_=0,1!=(0|Sr)){for(R=1&Sr,Q=-2&Sr,y=E;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+16>>2]+16>>2]](y+28|0,f[y+20>>2],f[y+24>>2]),y=y+32|0,(0|Q)!=(0|(_=_+2|0)););if(!R)break M}fi[f[f[(y=E+(_<<4)|0)>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2])}if(y=-2147483648,!or)break S;if((R=-8&(_=f[E-4>>2]))>>>0<(((Q=3&_)?4:8)|(_=or<<4))>>>0)break e;if(R>>>0>_+39>>>0&&Q)break r;nr(E);break S}T:if(Sr){if(_=0,1!=(0|Sr)){for(R=1&Sr,Q=-2&Sr,y=E;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+16>>2]+16>>2]](y+28|0,f[y+20>>2],f[y+24>>2]),y=y+32|0,(0|Q)!=(0|(_=_+2|0)););if(!R)break T}fi[f[f[(y=E+(_<<4)|0)>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2])}if(or){if((Q=-8&(y=f[E-4>>2]))>>>0<(((_=3&y)?4:8)|(y=or<<4))>>>0)break e;if(Q>>>0>y+39>>>0&&_)break r;nr(E)}}E=f[g+460>>2],f[mr>>2]=f[g+456>>2],f[mr+4>>2]=E,E=f[ne+4>>2],f[(y=mr+8|0)>>2]=f[ne>>2],f[y+4>>2]=E,E=f[re+4>>2],f[(y=mr+16|0)>>2]=f[re>>2],f[y+4>>2]=E,E=f[$r+4>>2],f[(y=mr+24|0)>>2]=f[$r>>2],f[y+4>>2]=E,E=f[Kr+4>>2],f[(y=mr+32|0)>>2]=f[Kr>>2],f[y+4>>2]=E,E=f[fr+4>>2],f[(y=mr+40|0)>>2]=f[fr>>2],f[y+4>>2]=E,E=f[Be+4>>2],f[(y=mr+48|0)>>2]=f[Be>>2],f[y+4>>2]=E,f[g+336>>2]=d,f[g+340>>2]=er,f[g+448>>2]=0,f[g+452>>2]=0,f[g+440>>2]=0,f[g+444>>2]=4,i[g+434|0]=0,A[g+432>>1]=0,f[g+416>>2]=0,f[g+420>>2]=0,f[g+400>>2]=0,f[g+404>>2]=0;break W}if(E=f[g+460>>2],f[mr>>2]=f[g+456>>2],f[mr+4>>2]=E,E=f[ne+4>>2],f[(_=mr+8|0)>>2]=f[ne>>2],f[_+4>>2]=E,E=f[re+4>>2],f[(_=mr+16|0)>>2]=f[re>>2],f[_+4>>2]=E,E=f[$r+4>>2],f[(_=mr+24|0)>>2]=f[$r>>2],f[_+4>>2]=E,E=f[Kr+4>>2],f[(_=mr+32|0)>>2]=f[Kr>>2],f[_+4>>2]=E,E=f[fr+4>>2],f[(_=mr+40|0)>>2]=f[fr>>2],f[_+4>>2]=E,E=f[Be+4>>2],f[(_=mr+48|0)>>2]=f[Be>>2],f[_+4>>2]=E,f[g+336>>2]=d,f[g+340>>2]=er,f[g+448>>2]=0,f[g+452>>2]=0,f[g+440>>2]=0,f[g+444>>2]=4,A[g+432>>1]=0,f[g+416>>2]=0,f[g+420>>2]=0,f[g+400>>2]=0,f[g+404>>2]=0,i[g+434|0]=1,-2147483648==(0|y))break W}if(y){if(E=f[g+516>>2],(_=-8&(d=f[E-4>>2]))>>>0<((d&=3)?4:8)+y>>>0)break e;if(_>>>0>y+39>>>0&&d)break r;nr(E)}}if(!(E=V(4)))break A;d=Ee<<24|(65280&Ee)<<8|Ee>>>8&65280|Ee>>>24,i[0|E]=d,i[E+1|0]=d>>>8,i[E+2|0]=d>>>16,i[E+3|0]=d>>>24,f[g+520>>2]=4,f[g+516>>2]=E,f[g+512>>2]=4,se(g,g+512|0),(E=f[g+4>>2])?(d=f[g>>2],f[g+532>>2]=d,y=d,R=1|d,d&=1,f[g+540>>2]=d?y:R,f[g+528>>2]=d?1051916:1051896,f[g+536>>2]=E,f[g+452>>2]=E+f[g+452>>2],(0|(_=f[g+448>>2]))==f[g+440>>2]&&ce(kr,1058736),d=f[g+532>>2],E=f[g+444>>2]+(_<<4)|0,f[E>>2]=f[g+528>>2],f[E+4>>2]=d,y=E+8|0,d=f[(E=g+536|0)+4>>2],f[y>>2]=f[E>>2],f[y+4>>2]=d,y=_+1|0,f[g+448>>2]=y):(f[g+540>>2]=0,f[g+532>>2]=1,f[g+536>>2]=0,f[g+528>>2]=1051612,fi[f[262907]](D,1,0),y=f[g+448>>2]),ee>>>0>f[g+440>>2]-y>>>0&&(Ae(kr,y,ee,4,16),y=f[g+448>>2]),ze(f[g+444>>2]+(y<<4)|0,Wr,ee<<4),f[g+448>>2]=y+ee;W:{if(q){if((y=-8&(d=f[Wr-4>>2]))>>>0<(((E=3&d)?4:8)|(d=q<<4))>>>0)break W;if(y>>>0>d+39>>>0&&E)break Y;nr(Wr)}if(f[g+452>>2]=Ee+f[g+452>>2],y=e,(0|ae)!=(0|e))continue;break m}break}break e}break r}Ne(3,3,1055396),$f()}Ne(2,2,1055380),$f()}Ne(1,e,1055364),$f()}if((0|e)!=(0|ae))for(D=(ae-e>>>0)/88|0,Q=0;;){if(q=k(Q,88)+e|0,E=f[(R=q+76|0)>>2],d=f[q+80>>2]){_=0;G:{if(1!=(0|d)){for(w=1&d,d&=-2,y=E;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+16>>2]+16>>2]](y+28|0,f[y+20>>2],f[y+24>>2]),y=y+32|0,(0|d)!=(0|(_=_+2|0)););if(!w)break G}fi[f[f[(d=(_<<4)+E|0)>>2]+16>>2]](d+12|0,f[d+4>>2],f[d+8>>2])}E=f[R>>2]}if(y=f[q+72>>2]){if((_=-8&(d=f[E-4>>2]))>>>0<(((w=3&d)?4:8)|(d=y<<4))>>>0)break e;if(_>>>0>d+39>>>0&&w)break r;nr(E)}if((0|D)==(0|(Q=Q+1|0)))break}}if(Lr){if((w=-8&(e=f[Y-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(Lr,88))>>>0)break e;if(w>>>0>e+39>>>0&&d)break r;nr(Y)}y=f[g+448>>2],e=f[g+444>>2],Q=f[g+440>>2];m:{G:if(1&(E=n[g+433|0])){if(w=f[g+452>>2],!(1&(d=n[g+434|0]))){if(C)break G;C=0}f[g+320>>2]==(0|C)&&oe(g+320|0),_=ze((Y=f[g+324>>2])+k(C,120)|0,g+336|0,97),i[_+98|0]=d,i[_+97|0]=E,d=n[0|(E=g+435|0)]|n[E+1|0]<<8|n[E+2|0]<<16|n[E+3|0]<<24,i[_+99|0]=d,i[_+100|0]=d>>>8,i[_+101|0]=d>>>16,i[_+102|0]=d>>>24,i[_+103|0]=n[E+4|0],f[_+116>>2]=w,f[_+112>>2]=y,f[_+108>>2]=e,f[_+104>>2]=Q,C=C+1|0;break m}G:if(y){if(_=0,1!=(0|y)){for(w=1&y,d=-2&y,y=e;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+16>>2]+16>>2]](y+28|0,f[y+20>>2],f[y+24>>2]),y=y+32|0,(0|d)!=(0|(_=_+2|0)););if(!w)break G}fi[f[f[(d=e+(_<<4)|0)>>2]+16>>2]](d+12|0,f[d+4>>2],f[d+8>>2])}if(Q){if((E=-8&(d=f[e-4>>2]))>>>0<(((w=3&d)?4:8)|(d=Q<<4))>>>0)break e;if(E>>>0>d+39>>>0&&w)break r;nr(e)}Y=f[g+324>>2]}m:{G:{Y:{W:{D:{S:{F:{T:{M:{O:{Z:{if(C>>>0>=2){L:{if(C>>>0>=21){U:{if(w=e=qe(d=(e=(e=C-(C>>>1|0)|0)>>>0<(d=C>>>0>=66666?66666:C)>>>0?d:e)>>>0<=48?48:e,0,120,0),M|e>>>0>2147483640)r=0;else{if(e=0,Q=8,!w)break U;if(e=d,Q=V(w))break U;r=8}Ze(r,1057124),$f()}H(Y,C,Q,e,C>>>0<65),jr(Q,0);U:{if((w=-8&(d=f[Q-4>>2]))>>>0>=(e=k(e,120))+((d&=3)?4:8)>>>0){if(w>>>0>e+39>>>0&&d)break U;nr(Q);break L}break e}break r}y=0,S=fr=S-112|0,E=Y+120|0,q=k(C,120)+Y|0;U:{V:{X:{for(;;){if(w=f[(e=E+48|0)>>2],D=f[e+4>>2],!w)break X;if(!(1&f[E-72>>2]))break V;if(d=f[(_=E+56|0)>>2],Q=f[(e=E+-64|0)>>2],e=(0|(_=f[_+4>>2]))<(0|(e=f[e+4>>2]))?1:d>>>0>>0&(0|e)>=(0|_)){e=f[(Q=E+8|0)+4>>2],f[(R=$r=fr+72|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+16|0)+4>>2],f[(R=re=fr+80|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+24|0)+4>>2],f[(R=ee=fr+88|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+32|0)+4>>2],f[(R=ae=fr+96|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+40|0)+4>>2],f[(R=yr=fr+104|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+72|0)+4>>2],f[(R=Wr=fr+16|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+80|0)+4>>2],f[(R=or=fr+24|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+88|0)+4>>2],f[(R=Lr=fr+32|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+96|0)+4>>2],f[(R=kr=fr+40|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+104|0)+4>>2],f[(R=J=fr+48|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+112|0)+4>>2],f[(R=er=fr+56|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[E+4>>2],f[fr+64>>2]=f[E>>2],f[fr+68>>2]=e,e=f[E+68>>2],f[fr+8>>2]=f[E+64>>2],f[fr+12>>2]=e,e=y;J:{x:{H:{for(;;){if(Kr=ze((Q=e+Y|0)+120|0,Q,120),!e)break x;if(!(1&f[Q-72>>2]))break H;if(e=e-120|0,R=f[(Q=Q+-64|0)>>2],!(R=(0|(Q=f[Q+4>>2]))>(0|_)?1:d>>>0>>0&(0|_)<=(0|Q)))break}e=120+(e+Y|0)|0;break J}Ve(1058820),$f()}e=Y}Q=f[fr+68>>2],f[e>>2]=f[fr+64>>2],f[e+4>>2]=Q,Q=f[yr+4>>2],f[(R=e+40|0)>>2]=f[yr>>2],f[R+4>>2]=Q,Q=f[ae+4>>2],f[(R=e+32|0)>>2]=f[ae>>2],f[R+4>>2]=Q,Q=f[ee+4>>2],f[(R=e+24|0)>>2]=f[ee>>2],f[R+4>>2]=Q,Q=f[re+4>>2],f[(R=e+16|0)>>2]=f[re>>2],f[R+4>>2]=Q,Q=e+8|0,e=f[$r+4>>2],f[Q>>2]=f[$r>>2],f[Q+4>>2]=e,f[(e=Kr+-64|0)>>2]=d,f[e+4>>2]=_,f[(e=Kr-72|0)>>2]=w,f[e+4>>2]=D,e=f[fr+12>>2],f[(d=w=Kr-56|0)>>2]=f[fr+8>>2],f[d+4>>2]=e,e=f[Wr+4>>2],f[(d=d+8|0)>>2]=f[Wr>>2],f[d+4>>2]=e,e=f[or+4>>2],f[(d=w+16|0)>>2]=f[or>>2],f[d+4>>2]=e,e=f[Lr+4>>2],f[(d=w+24|0)>>2]=f[Lr>>2],f[d+4>>2]=e,e=f[kr+4>>2],f[(d=w+32|0)>>2]=f[kr>>2],f[d+4>>2]=e,e=f[J+4>>2],f[(d=w+40|0)>>2]=f[J>>2],f[d+4>>2]=e,e=f[er+4>>2],f[(d=w+48|0)>>2]=f[er>>2],f[d+4>>2]=e}if(y=y+120|0,(0|q)==(0|(E=E+120|0)))break}S=fr+112|0;break U}Ve(1058820),$f()}Ve(1058820),$f()}}if(!f[X+96>>2])break O;if(!f[X+64>>2])break M;if(_=f[g+320>>2],e=$e((E=f[X+104>>2])-(w=f[X+72>>2])|0,f[X+108>>2]-(f[X+76>>2]+(w>>>0>E>>>0)|0)|0,C-1|0,0),!((0|(d=M))>=0&&((0|d)>0||e)))break Z;if(!(Fe||u(we+-1/((+(e>>>0)+4294967296*+(d>>>0))/9e4))>10))break Z;if(!(E=V(Lr=C<<3)))break D;for(y=Y+40|0,e=E,Q=C;;){if(!f[y-8>>2])break W;if(d=f[y+4>>2],f[e>>2]=f[y>>2],f[e+4>>2]=d,e=e+8|0,y=y+120|0,!(Q=Q-1|0))break}if(C>>>0<21)break T;fe(E,C);break F}_=f[g+320>>2]}y=(Ur=s(9e4/we))>=-0x8000000000000000,(pe=u(Ur))<0x8000000000000000?(e=~~Ur>>>0,E=pe>=1?~~(pe=Ur>0?c(s(2.3283064365386963e-10*Ur),4294967295):l(2.3283064365386963e-10*(Ur-+(~~Ur>>>0>>>0))))>>>0:0):(e=0,E=-2147483648),d=(w=Ur>0x7ffffffffffffc00)?-1:y?e:0,d=(e=Ur==Ur)?d:0,w=e?w?2147483647:y?E:-2147483648:0;break S}Ve(1055188),$f()}Ve(1055204),$f()}for(Q=E+8|0,er=E+(C<<3)|0,q=0;;){if(e=f[Q>>2],d=f[(w=Q-8|0)>>2],y=(0|(y=R=f[Q+4>>2]))<(0|(w=f[w+4>>2]))?1:e>>>0>>0&(0|w)>=(0|y)){y=q;T:{for(;;){if(f[(D=8+(y+E|0)|0)>>2]=d,f[D+4>>2]=w,d=E,!y)break T;if(d=f[(w=D=d+(y=y-8|0)|0)>>2],!(J=(0|(w=f[w+4>>2]))>(0|R)?1:e>>>0>>0&(0|w)>=(0|R)))break}d=D+8|0}f[d>>2]=e,f[d+4>>2]=R}if(q=q+8|0,(0|er)==(0|(Q=Q+8|0)))break}}if(D=0,!(er=V((kr=(e=C-1|0)>>>0<=C>>>0?e:0)<<3)))break Y;if(q=3&e,d=f[E>>2],w=f[E+4>>2],C-2>>>0<3)e=E;else{for(R=-4&e,y=0;yr=f[(e=(Wr=y+E|0)+8|0)>>2],J=f[e+4>>2],f[(e=or=y+er|0)>>2]=yr-d,f[e+4>>2]=J-((d>>>0>yr>>>0)+w|0),Q=f[(e=Wr+16|0)>>2],w=f[e+4>>2],f[(e=or+8|0)>>2]=Q-yr,f[e+4>>2]=w-((Q>>>0>>0)+J|0),yr=f[(e=Wr+24|0)>>2],J=f[e+4>>2],f[(e=or+16|0)>>2]=yr-Q,f[e+4>>2]=J-((Q>>>0>yr>>>0)+w|0),d=f[(e=Wr+32|0)>>2],w=f[e+4>>2],f[(e=or+24|0)>>2]=d-yr,f[e+4>>2]=w-((d>>>0>>0)+J|0),y=y+32|0,(0|R)!=(0|(D=D+4|0)););e=y+E|0}if(q){for(Q=D+q|0,y=e+8|0,e=er+(D<<3)|0;R=f[y+4>>2],D=f[y>>2],f[e>>2]=D-d,f[e+4>>2]=R-((d>>>0>D>>>0)+w|0),y=y+8|0,e=e+8|0,d=D,w=R,q=q-1|0;);D=Q}if((d=-8&(e=f[E-4>>2]))>>>0>>0)break e;if(d>>>0>Lr+39>>>0&&e)break r;if(nr(E),!(D>>>0<2))if(D>>>0>=21)fe(er,D);else for(e=er+8|0,J=er+(D<<3)|0,Q=0;;){if(E=f[e>>2],d=f[(w=e-8|0)>>2],y=(0|(y=R=f[e+4>>2]))<(0|(w=f[w+4>>2]))?1:d>>>0>E>>>0&(0|w)>=(0|y)){y=Q;F:{for(;;){if(f[(q=8+(y+er|0)|0)>>2]=d,f[q+4>>2]=w,d=er,!y)break F;if(d=f[(w=q=d+(y=y-8|0)|0)>>2],!(or=(0|(w=f[w+4>>2]))>(0|R)?1:d>>>0>E>>>0&(0|w)>=(0|R)))break}d=q+8|0}f[d>>2]=E,f[d+4>>2]=R}if(Q=Q+8|0,(0|J)==(0|(e=e+8|0)))break}if((Q=-8&(e=f[er-4>>2]))>>>0<(E=kr<<3)+((y=3&e)?4:8)>>>0)break e;if(d=f[(e=er+(D<<2&-8)|0)>>2],w=e=f[e+4>>2],Q>>>0>E+39>>>0&&y)break r;nr(er),we=1/((+(d>>>0)+4294967296*+(0|e))/9e4)}if(1!=f[X+64>>2])break G;if(!f[X+80>>2])break m;if(f[X+96>>2]){if(q=f[X+72>>2],D=f[X+76>>2],R=a[X+146>>1],Q=a[X+144>>1],y=f[X+88>>2],E=f[X+92>>2],e=f[g+308>>2],f[F+96>>2]=f[g+304>>2],f[F+100>>2]=e,i[F+122|0]=Nr,i[F+121|0]=vr,i[F+120|0]=Rr,A[F+118>>1]=(((1<>1]=16+(((~(-1<>1]=De,A[F+112>>1]=Ge,A[F+110>>1]=We,A[F+108>>1]=Ge,f[F+92>>2]=tr,f[F+88>>2]=m,f[F+84>>2]=Xe,f[F+80>>2]=pr,f[F+76>>2]=W,f[F+72>>2]=Se,A[F+70>>1]=R,A[F+68>>1]=Q,f[F+64>>2]=C,f[F+60>>2]=Y,f[F+56>>2]=_,f[F+40>>2]=y,f[F+44>>2]=E,f[F+32>>2]=q,f[F+36>>2]=D,f[F+24>>2]=d,f[F+28>>2]=w,b[F+16>>3]=we,f[F>>2]=0,f[F+4>>2]=0,e=f[X+108>>2],f[F+48>>2]=f[X+104>>2],f[F+52>>2]=e,f[F+104>>2]=f[g+312>>2],(e=f[X+128>>2])&&fi[f[e+16>>2]](X+140|0,f[X+132>>2],f[X+136>>2]),2!=f[X+152>>2]|f[X+156>>2])break C;break R}Ve(1055252),$f()}Ze(8,1057400),$f()}Ve(1057416),$f()}Ze(8,1057400),$f()}Ve(1055220),$f()}Ve(1055236),$f()}}if(!(e=V(41)))break A;if(i[e+40|0]=n[1055184],w=n[1055180]|n[1055181]<<8|n[1055182]<<16|n[1055183]<<24,B=e+32|0,d=n[1055176]|n[1055177]<<8|n[1055178]<<16|n[1055179]<<24,i[0|B]=d,i[B+1|0]=d>>>8,i[B+2|0]=d>>>16,i[B+3|0]=d>>>24,i[B+4|0]=w,i[B+5|0]=w>>>8,i[B+6|0]=w>>>16,i[B+7|0]=w>>>24,w=n[1055172]|n[1055173]<<8|n[1055174]<<16|n[1055175]<<24,B=e+24|0,d=n[1055168]|n[1055169]<<8|n[1055170]<<16|n[1055171]<<24,i[0|B]=d,i[B+1|0]=d>>>8,i[B+2|0]=d>>>16,i[B+3|0]=d>>>24,i[B+4|0]=w,i[B+5|0]=w>>>8,i[B+6|0]=w>>>16,i[B+7|0]=w>>>24,w=n[1055164]|n[1055165]<<8|n[1055166]<<16|n[1055167]<<24,B=e+16|0,d=n[1055160]|n[1055161]<<8|n[1055162]<<16|n[1055163]<<24,i[0|B]=d,i[B+1|0]=d>>>8,i[B+2|0]=d>>>16,i[B+3|0]=d>>>24,i[B+4|0]=w,i[B+5|0]=w>>>8,i[B+6|0]=w>>>16,i[B+7|0]=w>>>24,w=n[1055156]|n[1055157]<<8|n[1055158]<<16|n[1055159]<<24,B=e+8|0,d=n[1055152]|n[1055153]<<8|n[1055154]<<16|n[1055155]<<24,i[0|B]=d,i[B+1|0]=d>>>8,i[B+2|0]=d>>>16,i[B+3|0]=d>>>24,i[B+4|0]=w,i[B+5|0]=w>>>8,i[B+6|0]=w>>>16,i[B+7|0]=w>>>24,w=n[1055148]|n[1055149]<<8|n[1055150]<<16|n[1055151]<<24,d=n[1055144]|n[1055145]<<8|n[1055146]<<16|n[1055147]<<24,i[0|e]=d,i[e+1|0]=d>>>8,i[e+2|0]=d>>>16,i[e+3|0]=d>>>24,i[e+4|0]=w,i[e+5|0]=w>>>8,i[e+6|0]=w>>>16,i[e+7|0]=w>>>24,f[F+16>>2]=41,f[F+12>>2]=e,f[F+8>>2]=41,f[F>>2]=2,f[F+4>>2]=0,(e=f[X+128>>2])&&fi[f[e+16>>2]](X+140|0,f[X+132>>2],f[X+136>>2]),xr(f[X+244>>2],f[X+248>>2]),B=f[X+240>>2]){if(w=f[X+244>>2],(E=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(B,88))>>>0)break e;if(E>>>0>e+39>>>0&&d)break r;nr(w)}if(!f[X+156>>2]&2==f[X+152>>2])break R}if(B=f[X+228>>2],e=f[X+232>>2]){_=0;C:{if(1!=(0|e)){for(d=1&e,e&=-2,y=B;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+16>>2]+16>>2]](y+28|0,f[y+20>>2],f[y+24>>2]),y=y+32|0,(0|e)!=(0|(_=_+2|0)););if(!d)break C}fi[f[f[(e=(_<<4)+B|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}B=f[X+228>>2]}if(w=f[X+224>>2]){if((E=-8&(e=f[B-4>>2]))>>>0<(((d=3&e)?4:8)|(e=w<<4))>>>0)break e;if(E>>>0>e+39>>>0&&d)break r;nr(B)}}S=g+560|0;break Q}Ve(1055784),$f()}if(f[(d=o+3328|0)>>2]=f[o+752>>2],e=f[o+748>>2],f[o+3320>>2]=f[o+744>>2],f[o+3324>>2]=e,2!=f[o+736>>2]|f[o+740>>2])break w;e=f[o+3324>>2],f[v+8>>2]=f[o+3320>>2],f[v+12>>2]=e,f[v>>2]=3,f[v+4>>2]=0,f[v+16>>2]=f[d>>2],lr(o+3016|0),ke||(Le?(xr(N,O),_e(Ir,N)):(Hr(N,O),Qe(Ir,N)),Re(Gr,Or)),d=1}if(e=(w=f[o+424>>2])-2|0,f[o+428>>2]==(w>>>0<2|0)&e>>>0<=1){if(!L|1==(0|e))break g;if((e=f[o+560>>2])&&fi[f[e+16>>2]](o+572|0,f[o+564>>2],f[o+568>>2]),xr(f[o+676>>2],f[o+680>>2]),_e(f[o+672>>2],f[o+676>>2]),2!=f[o+584>>2]|f[o+588>>2])break y;break g}if(!T)break g;if((e=f[o+552>>2])&&fi[f[e+16>>2]](o+564|0,f[o+556>>2],f[o+560>>2]),Hr(f[o+684>>2],f[o+688>>2]),Qe(f[o+680>>2],f[o+684>>2]),ue=Te,2!=f[o+576>>2]|f[o+580>>2])break y;break g}Ve(1054600),$f()}Ve(1054616),$f()}Ve(1054632),$f()}if(E=f[ue+4>>2],w=f[ue+8>>2]){e=0;y:{if(1!=(0|w)){for(g=1&w,w&=-2,B=E;fi[f[f[B>>2]+16>>2]](B+12|0,f[B+4>>2],f[B+8>>2]),fi[f[f[B+16>>2]+16>>2]](B+28|0,f[B+20>>2],f[B+24>>2]),B=B+32|0,(0|w)!=(0|(e=e+2|0)););if(!g)break y}fi[f[f[(e=(e<<4)+E|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}E=f[ue+4>>2]}Ie(f[ue>>2],E)}g:if(!(d|!f[o+4>>2]&2==f[o>>2])){(e=f[o+128>>2])&&fi[f[e+16>>2]](o+140|0,f[o+132>>2],f[o+136>>2]),xr(f[o+244>>2],f[o+248>>2]);y:{if(g=f[o+240>>2]){if(w=f[o+244>>2],(B=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(g,88))>>>0)break e;if(B>>>0>e+39>>>0&&d)break y;nr(w)}if(!f[o+156>>2]&2==f[o+152>>2])break g;if(I=f[o+228>>2],d=f[o+232>>2]){e=0;B:{if(1!=(0|d)){for(w=1&d,d&=-2,B=I;fi[f[f[B>>2]+16>>2]](B+12|0,f[B+4>>2],f[B+8>>2]),fi[f[f[B+16>>2]+16>>2]](B+28|0,f[B+20>>2],f[B+24>>2]),B=B+32|0,(0|d)!=(0|(e=e+2|0)););if(!w)break B}fi[f[f[(e=(e<<4)+I|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}I=f[o+228>>2]}Ie(f[o+224>>2],I);break g}break r}if(!f[o+260>>2]&2==f[o+256>>2])break n;if((e=f[o+384>>2])&&fi[f[e+16>>2]](o+396|0,f[o+388>>2],f[o+392>>2]),gr(f[o+412>>2],f[o+416>>2]),!(g=f[o+408>>2]))break n;w=f[o+412>>2];g:{if((B=-8&(e=f[w-4>>2]))>>>0>=((d=3&e)?4:8)+(e=k(g,72))>>>0){if(B>>>0>e+39>>>0&&d)break g;nr(w);break n}break e}break r}ze(o+1908|0,o+756|0,108),f[o+1904>>2]=f[o+3328>>2],e=f[o+3324>>2],f[o+1896>>2]=f[o+3320>>2],f[o+1900>>2]=e,f[(e=m=o+1888|0)>>2]=1,f[e+4>>2]=0,y=(B=f[e+24>>2])+(d=f[e+48>>2])|0,w=(g=f[e+28>>2])+f[e+52>>2]|0,w=d>>>0>y>>>0?w+1|0:w,E=y-(d=f[e+32>>2])|0,d=w-(f[e+36>>2]+(d>>>0>y>>>0)|0)|0,f[e+8>>2]=E,f[e+12>>2]=d;w:{g:{y:{B:{E:{_:{if(L=f[e+64>>2]){if(W=f[e+60>>2],1!=(0|L))for(e=L-1|0,y=W+168|0;;){if(!f[y>>2])break _;if(!f[y-120>>2])break E;if(Q=f[(d=y+8|0)>>2],I=f[d+4>>2],f[(d=y-104|0)>>2]=1,f[d+4>>2]=0,d=Q-(w=f[(E=y-112|0)>>2])|0,E=w=I-(f[E+4>>2]+(w>>>0>Q>>>0)|0)|0,d=(w=!((0|w)>=0&&((0|w)>0||d)))?B:d,f[(_=y-96|0)>>2]=d,w=w?g:E,f[_+4>>2]=w,y=y+120|0,!(e=e-1|0))break}else d=B,w=g;if(y=k(L,120),f[(e=(g=y+W|0)-48|0)>>2]=d,f[e+4>>2]=w,f[(e=g-56|0)>>2]=1,f[e+4>>2]=0,1!=f[W+48>>2])break B;for(d=f[W+56>>2],w=f[W+60>>2],e=0;;){if(1!=f[(I=e+W|0)+32>>2])break y;if(f[(g=I+80|0)>>2]=1,f[g+4>>2]=0,B=f[(g=I+40|0)>>2],E=f[g+4>>2]-((d>>>0>B>>>0)+w|0)|0,B=B-d|0,f[(g=I+88|0)>>2]=B,f[g+4>>2]=E,!f[I- -64>>2])break g;if(g=f[(B=I+72|0)>>2],w=w+f[B+4>>2]|0,w=(B=d)>>>0>(d=d+g|0)>>>0?w+1|0:w,(0|y)==(0|(e=e+120|0)))break}}break w}Ve(1055888),$f()}Ve(1055904),$f()}Ve(1055920),$f()}Ve(1055936),$f()}Ve(1055952),$f()}lr(e=o+3016|0),ze(e,m,128)}_=e=f[o+260>>2];d:if(!e&2==(0|(g=f[o+256>>2])))B=-2147483648;else{ze(o+2016|0,Yr,168);w:{if(e=f[o+2176>>2])for(m=f[o+2172>>2],p=k(e,72),e=0;;){if(1!=f[(w=e+m|0)+24>>2])break w;if(f[(d=w+8|0)>>2]=1,f[d+4>>2]=0,Q=w+16|0,d=(B=f[(w=w+32|0)>>2])-Ar|0,I=(w=f[w+4>>2]-((B>>>0>>0)+br|0)|0)-2|0,B=(B=(0|w)<-1)?w+2|0:w,w=br+((w=(0|w)>0)?I:B)|0,w=(d=d+Ar|0)>>>0>>0?w+1|0:w,f[Q>>2]=d,f[Q+4>>2]=w,(0|p)==(0|(e=e+72|0)))break}if(p=f[o+2172>>2],K=f[o+2176>>2],B=f[o+2168>>2],!(e=f[o+2144>>2]))break d;fi[f[e+16>>2]](o+2156|0,f[o+2148>>2],f[o+2152>>2]);break d}Ve(1054032),$f()}e=f[o+1460>>2],f[v+8>>2]=f[o+1456>>2],f[v+12>>2]=e,e=f[o+2940>>2],f[v+88>>2]=f[o+2936>>2],f[v+92>>2]=e,e=f[(d=o+1504|0)+4>>2],f[(w=v+56|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+1496|0)+4>>2],f[(w=v+48|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+1488|0)+4>>2],f[(w=v+40|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+1480|0)+4>>2],f[(w=v+32|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+1472|0)+4>>2],f[(w=v+24|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+1464|0)+4>>2],f[(w=v+16|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+2944|0)+4>>2],f[(w=v+96|0)>>2]=f[d>>2],f[w+4>>2]=e,ze(v+104|0,o+3016|0,128),f[v+244>>2]=p,f[v+248>>2]=K,f[v+240>>2]=B,A[v+254>>1]=Oe,A[v+252>>1]=ie,f[v+232>>2]=Ar,f[v+236>>2]=br,f[v+84>>2]=Or,f[v+80>>2]=Gr,f[v+76>>2]=rr,f[v+72>>2]=O,f[v+68>>2]=N,f[v+64>>2]=Ir,f[v>>2]=me,f[v+4>>2]=0;d:if(!(2!=(0|Er)|Ue||!f[o+4>>2]&2==f[o>>2])){(e=f[o+128>>2])&&fi[f[e+16>>2]](o+140|0,f[o+132>>2],f[o+136>>2]),xr(f[o+244>>2],f[o+248>>2]);w:{if(B=f[o+240>>2]){if(w=f[o+244>>2],(E=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(B,88))>>>0)break e;if(E>>>0>e+39>>>0&&d)break w;nr(w)}if(!f[o+156>>2]&2==f[o+152>>2])break d;if(I=f[o+228>>2],d=f[o+232>>2]){e=0;g:{if(1!=(0|d)){for(w=1&d,d&=-2,B=I;fi[f[f[B>>2]+16>>2]](B+12|0,f[B+4>>2],f[B+8>>2]),fi[f[f[B+16>>2]+16>>2]](B+28|0,f[B+20>>2],f[B+24>>2]),B=B+32|0,(0|d)!=(0|(e=e+2|0)););if(!w)break g}fi[f[f[(e=(e<<4)+I|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}I=f[o+228>>2]}Ie(f[o+224>>2],I);break d}break r}if(2!=(0|g)|_)break n;if(!f[o+260>>2]&2==f[o+256>>2])break n;if((e=f[o+384>>2])&&fi[f[e+16>>2]](o+396|0,f[o+388>>2],f[o+392>>2]),gr(f[o+412>>2],f[o+416>>2]),!(g=f[o+408>>2]))break n;w=f[o+412>>2];d:{if((B=-8&(e=f[w-4>>2]))>>>0>=((d=3&e)?4:8)+(e=k(g,72))>>>0){if(B>>>0>e+39>>>0&&d)break d;nr(w);break n}break e}break r}v:switch(N-1|0){default:if(e)break h;e=0,rr=0;break l;case 0:w=255&m,d=B,rr=1;break l;case 1:break v}w=255&m,d=B,rr=2;break l}e=1+(e>>>3|0)|0,rr=0}f[o+3020>>2]=e,A[o+3024>>1]=d,i[o+3031|0]=w>>>24,i[o+3030|0]=w>>>16,i[o+3029|0]=w>>>8,i[o+3028|0]=w,A[o+3026>>1]=(65535&w)<<16|d>>>16;break o}E=N,L=1}f[o+3028>>2]=ke,f[o+3024>>2]=E,f[o+3020>>2]=L}if(rr){f[o+3328>>2]=f[q+8>>2],e=f[q+4>>2],f[o+3320>>2]=f[q>>2],f[o+3324>>2]=e,f[o+1460>>2]=1,f[o+1456>>2]=1054480,f[o+1468>>2]=1,f[o+1472>>2]=0,f[o+2976>>2]=o+3320,f[o+2980>>2]=4,f[o+1464>>2]=o+2976,Mr(o+3304|0,o+1456|0);break k}}if(!(e=V(25)))break A;i[e+24|0]=n[1054456],w=n[1054452]|n[1054453]<<8|n[1054454]<<16|n[1054455]<<24,g=e+16|0,d=n[1054448]|n[1054449]<<8|n[1054450]<<16|n[1054451]<<24,i[0|g]=d,i[g+1|0]=d>>>8,i[g+2|0]=d>>>16,i[g+3|0]=d>>>24,i[g+4|0]=w,i[g+5|0]=w>>>8,i[g+6|0]=w>>>16,i[g+7|0]=w>>>24,w=n[1054444]|n[1054445]<<8|n[1054446]<<16|n[1054447]<<24,g=e+8|0,d=n[1054440]|n[1054441]<<8|n[1054442]<<16|n[1054443]<<24,i[0|g]=d,i[g+1|0]=d>>>8,i[g+2|0]=d>>>16,i[g+3|0]=d>>>24,i[g+4|0]=w,i[g+5|0]=w>>>8,i[g+6|0]=w>>>16,i[g+7|0]=w>>>24,w=n[1054436]|n[1054437]<<8|n[1054438]<<16|n[1054439]<<24,d=n[1054432]|n[1054433]<<8|n[1054434]<<16|n[1054435]<<24,i[0|e]=d,i[e+1|0]=d>>>8,i[e+2|0]=d>>>16,i[e+3|0]=d>>>24,i[e+4|0]=w,i[e+5|0]=w>>>8,i[e+6|0]=w>>>16,i[e+7|0]=w>>>24,f[o+3312>>2]=25,f[o+3308>>2]=e,f[o+3304>>2]=25}e=f[o+3312>>2],f[o+1832>>2]=e,f[o+752>>2]=e,e=f[o+3308>>2],d=f[o+3304>>2],f[o+1824>>2]=d,f[o+1828>>2]=e,f[o+744>>2]=d,f[o+748>>2]=e,fi[f[f[o+2936>>2]+16>>2]](Er,f[o+2940>>2],f[o+2944>>2])}d=f[o+2912>>2];b:if(w=f[o+2916>>2]){if(e=0,1!=(0|w)){for(g=1&w,w&=-2,B=d;fi[f[f[B>>2]+16>>2]](B+12|0,f[B+4>>2],f[B+8>>2]),fi[f[f[B+20>>2]+16>>2]](B+32|0,f[B+24>>2],f[B+28>>2]),B=B+40|0,(0|w)!=(0|(e=e+2|0)););if(!g)break b}e=d+k(e,20)|0,fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}if(g=f[o+2908>>2]){if((B=-8&(e=f[d-4>>2]))>>>0<((w=3&e)?4:8)+(e=k(g,20))>>>0)break e;if(B>>>0>e+39>>>0&&w)break r;nr(d)}}if(Br(p),!(!f[o+2188>>2]&2==f[o+2184>>2])){if((e=f[o+2312>>2])&&fi[f[e+16>>2]](o+2324|0,f[o+2316>>2],f[o+2320>>2]),xr(f[o+2428>>2],f[o+2432>>2]),g=f[o+2424>>2]){if(w=f[o+2428>>2],(B=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(g,88))>>>0)break e;if(B>>>0>e+39>>>0&&d)break r;nr(w)}if(!(!f[o+2340>>2]&2==f[o+2336>>2])){if(I=f[o+2412>>2],d=f[o+2416>>2]){e=0;t:{if(1!=(0|d)){for(w=1&d,d&=-2,B=I;fi[f[f[B>>2]+16>>2]](B+12|0,f[B+4>>2],f[B+8>>2]),fi[f[f[B+16>>2]+16>>2]](B+28|0,f[B+20>>2],f[B+24>>2]),B=B+32|0,(0|d)!=(0|(e=e+2|0)););if(!w)break t}fi[f[f[(e=(e<<4)+I|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}I=f[o+2412>>2]}if(w=f[o+2408>>2]){if((g=-8&(e=f[I-4>>2]))>>>0<(((d=3&e)?4:8)|(e=w<<4))>>>0)break e;if(g>>>0>e+39>>>0&&d)break r;nr(I)}}}if(!f[o+2444>>2]&2==f[o+2440>>2])break a;if((e=f[o+2568>>2])&&fi[f[e+16>>2]](o+2580|0,f[o+2572>>2],f[o+2576>>2]),gr(f[o+2596>>2],f[o+2600>>2]),!(g=f[o+2592>>2]))break a;if(w=f[o+2596>>2],(B=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(g,72))>>>0)break e;if(!(B>>>0>e+39>>>0&&d)){nr(w);break a}break r}if(B=B+1|0,!((e=e-1|0)>>>0>=376))break}if(!(e=V(48)))break A;w=n[1054320]|n[1054321]<<8|n[1054322]<<16|n[1054323]<<24,g=e+40|0,d=n[1054316]|n[1054317]<<8|n[1054318]<<16|n[1054319]<<24,i[0|g]=d,i[g+1|0]=d>>>8,i[g+2|0]=d>>>16,i[g+3|0]=d>>>24,i[g+4|0]=w,i[g+5|0]=w>>>8,i[g+6|0]=w>>>16,i[g+7|0]=w>>>24,w=n[1054312]|n[1054313]<<8|n[1054314]<<16|n[1054315]<<24,g=e+32|0,d=n[1054308]|n[1054309]<<8|n[1054310]<<16|n[1054311]<<24,i[0|g]=d,i[g+1|0]=d>>>8,i[g+2|0]=d>>>16,i[g+3|0]=d>>>24,i[g+4|0]=w,i[g+5|0]=w>>>8,i[g+6|0]=w>>>16,i[g+7|0]=w>>>24,w=n[1054304]|n[1054305]<<8|n[1054306]<<16|n[1054307]<<24,g=e+24|0,d=n[1054300]|n[1054301]<<8|n[1054302]<<16|n[1054303]<<24,i[0|g]=d,i[g+1|0]=d>>>8,i[g+2|0]=d>>>16,i[g+3|0]=d>>>24,i[g+4|0]=w,i[g+5|0]=w>>>8,i[g+6|0]=w>>>16,i[g+7|0]=w>>>24,w=n[1054296]|n[1054297]<<8|n[1054298]<<16|n[1054299]<<24,g=e+16|0,d=n[1054292]|n[1054293]<<8|n[1054294]<<16|n[1054295]<<24,i[0|g]=d,i[g+1|0]=d>>>8,i[g+2|0]=d>>>16,i[g+3|0]=d>>>24,i[g+4|0]=w,i[g+5|0]=w>>>8,i[g+6|0]=w>>>16,i[g+7|0]=w>>>24,w=n[1054288]|n[1054289]<<8|n[1054290]<<16|n[1054291]<<24,g=e+8|0,d=n[1054284]|n[1054285]<<8|n[1054286]<<16|n[1054287]<<24,i[0|g]=d,i[g+1|0]=d>>>8,i[g+2|0]=d>>>16,i[g+3|0]=d>>>24,i[g+4|0]=w,i[g+5|0]=w>>>8,i[g+6|0]=w>>>16,i[g+7|0]=w>>>24,w=n[1054280]|n[1054281]<<8|n[1054282]<<16|n[1054283]<<24,d=n[1054276]|n[1054277]<<8|n[1054278]<<16|n[1054279]<<24,i[0|e]=d,i[e+1|0]=d>>>8,i[e+2|0]=d>>>16,i[e+3|0]=d>>>24,i[e+4|0]=w,i[e+5|0]=w>>>8,i[e+6|0]=w>>>16,i[e+7|0]=w>>>24,f[o+752>>2]=48,f[o+748>>2]=e,f[o+744>>2]=48}e=f[o+752>>2],f[o+728>>2]=e,d=f[o+748>>2],w=f[o+744>>2],f[o+720>>2]=w,f[o+724>>2]=d,f[v+16>>2]=e,f[v+8>>2]=w,f[v+12>>2]=d,f[v>>2]=3,f[v+4>>2]=0}fi[f[f[Tr>>2]+16>>2]](Tr+12|0,f[Tr+4>>2],f[Tr+8>>2]),S=o+3344|0;break i}ge(1053512,55,o+3343|0,1053496,1053568),$f()}Ze(1,1057036),$f()}B=f[h+856>>2],E=f[h+852>>2],e=f[h+848>>2];i:{A:{f:{n:{a:{if(3!=(0|(d=f[h+840>>2]))|(w=f[h+844>>2])){if(ze(h+524|0,h+860|0,236),f[h+520>>2]=B,f[h+516>>2]=E,f[h+512>>2]=e,f[h+504>>2]=d,f[h+508>>2]=w,ar(v,y=h+504|0),B=f[h+852>>2],E=f[h+848>>2],e=f[h+844>>2],1!=f[h+840>>2]){if(I=h+872|0,f[h+788>>2]=f[I>>2],d=f[(w=h+864|0)+4>>2],f[(g=h+780|0)>>2]=f[w>>2],f[g+4>>2]=d,d=f[h+860>>2],f[h+772>>2]=f[h+856>>2],f[h+776>>2]=d,f[h+768>>2]=B,f[h+764>>2]=E,f[h+760>>2]=e,U(v,y),1!=f[h+840>>2]){if(e=f[I+4>>2],f[(d=Y=h+800|0)>>2]=f[I>>2],f[d+4>>2]=e,e=f[(d=h+768|0)+4>>2],f[(w=W=h+816|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[h+868>>2],f[h+792>>2]=f[h+864>>2],f[h+796>>2]=e,e=f[h+764>>2],f[h+808>>2]=f[h+760>>2],f[h+812>>2]=e,rr=f[h+848>>2],K=f[h+852>>2],L=f[h+856>>2],Q=f[h+860>>2],_=f[h+920>>2],m=f[h+912>>2],N=f[h+916>>2],d=f[h+888>>2],p=f[h+880>>2],I=f[h+884>>2],e=f[h+904>>2],y=f[h+896>>2],E=f[h+900>>2],w=f[(g=h+784|0)+4>>2],f[(B=h+832|0)>>2]=f[g>>2],f[B+4>>2]=w,w=f[h+780>>2],f[(g=h+824|0)>>2]=f[h+776>>2],f[g+4>>2]=w,ze(w=h+840|0,h+504|0,256),hr(h+1096|0,w,d?p:0,d?I:0,d||9e4,e?y:0,e?E:0,e||9e4,m,N,_),e=f[W+4>>2],f[(d=h+1240|0)>>2]=f[W>>2],f[d+4>>2]=e,e=f[g+4>>2],f[(d=h+1248|0)>>2]=f[g>>2],f[d+4>>2]=e,e=f[B+4>>2],f[(d=h+1256|0)>>2]=f[B>>2],f[d+4>>2]=e,e=f[Y+4>>2],f[(d=h+1288|0)>>2]=f[Y>>2],f[d+4>>2]=e,f[h+1272>>2]=L,f[h+1276>>2]=Q,f[h+1264>>2]=rr,f[h+1268>>2]=K,e=f[h+812>>2],f[h+1232>>2]=f[h+808>>2],f[h+1236>>2]=e,e=f[h+796>>2],f[h+1280>>2]=f[h+792>>2],f[h+1284>>2]=e,d=f[h+1096>>2],w=f[h+1100>>2],e=f[h+1104>>2],E=f[h+1108>>2],B=f[h+1112>>2],y=ze(h,h+1116|0,180),(g=f[y+472>>2])&&fi[f[g+16>>2]](y+484|0,f[y+476>>2],f[y+480>>2]),!(y=f[y+488>>2]))break n;break a}(g=f[h+852>>2],w=f[h+848>>2],d=f[h+844>>2],e&&fi[f[e+16>>2]](h+772|0,E,B),e=f[h+776>>2])&&fi[f[e+16>>2]](h+788|0,f[h+780>>2],f[h+784>>2]),B=g,E=w,e=d}ir(h+504|0)}if((d=f[h+472>>2])&&fi[f[d+16>>2]](h+484|0,f[h+476>>2],f[h+480>>2]),d=2,w=0,!(y=f[h+488>>2]))break f}fi[f[y+16>>2]](h+500|0,f[h+492>>2],f[h+496>>2])}if(!(!w&2==(0|d))){ze(h+260|0,h,180),f[h+256>>2]=B,f[h+252>>2]=E,f[h+248>>2]=e,f[h+240>>2]=d,f[h+244>>2]=w,B=$(h+240|0),y=0;break A}}if(y=0,-2147483648!=(0|e)){if(y=1,B=0|G(0|E,0|B),e){if((w=-8&(d=f[E-4>>2]))>>>0<((d&=3)?4:8)+e>>>0)break e;if(w>>>0>e+39>>>0&&d)break i;nr(E)}}else B=E}return f[r+8>>2]=y,f[r+4>>2]=y?B:0,f[r>>2]=y?0:B,void(S=h+1296|0)}break r}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},raw_audio_to_fmp4:function(r,e){r|=0;var b,u=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0,p=0,m=0,Y=0,W=0,D=0,F=0,T=0,O=0,L=0,X=0,J=0,H=0,K=0,q=0,rr=0;S=b=S-2928|0,Dr(b+196|0,e|=0),s=f[(u=b+248|0)+4>>2],f[(e=b+464|0)>>2]=f[u>>2],f[e+4>>2]=s,e=f[b+244>>2],f[b+456>>2]=f[b+240>>2],f[b+460>>2]=e,2==(0|(e=a[b+196>>1]))?(e=0,f[b+504>>2]=0,f[b+488>>2]=0,A[b+484>>1]=0,A[b+480>>1]=0):(A[b+518>>1]=a[b+238>>1],l=a[(s=b+230|0)+4>>1]|a[s+6>>1]<<16,u=b+510|0,s=a[s>>1]|a[s+2>>1]<<16,A[u>>1]=s,A[u+2>>1]=s>>>16,A[u+4>>1]=l,A[u+6>>1]=l>>>16,l=a[(s=b+222|0)+4>>1]|a[s+6>>1]<<16,u=b+502|0,s=a[s>>1]|a[s+2>>1]<<16,A[u>>1]=s,A[u+2>>1]=s>>>16,A[u+4>>1]=l,A[u+6>>1]=l>>>16,l=a[(s=b+214|0)+4>>1]|a[s+6>>1]<<16,u=b+494|0,s=a[s>>1]|a[s+2>>1]<<16,A[u>>1]=s,A[u+2>>1]=s>>>16,A[u+4>>1]=l,A[u+6>>1]=l>>>16,l=a[(s=b+206|0)+4>>1]|a[s+6>>1]<<16,u=b+486|0,s=a[s>>1]|a[s+2>>1]<<16,A[u>>1]=s,A[u+2>>1]=s>>>16,A[u+4>>1]=l,A[u+6>>1]=l>>>16,u=a[b+202>>1]|a[b+204>>1]<<16,s=a[b+198>>1]|a[b+200>>1]<<16,A[b+478>>1]=s,A[b+480>>1]=s>>>16,A[b+482>>1]=u,A[b+484>>1]=u>>>16),A[b+476>>1]=e,f[b+1592>>2]=2,f[b+1596>>2]=0,f[b+1760>>2]=3,f[b+1764>>2]=0,f[b+2664>>2]=0,f[b+2668>>2]=0,f[b+2656>>2]=0,f[b+2660>>2]=8,i[b+2654|0]=0,A[b+2652>>1]=0,A[b+2648>>1]=0,f[b+2632>>2]=0,f[b+2616>>2]=0,f[b+2620>>2]=0,f[b+2600>>2]=0,f[b+2604>>2]=0,f[b+2584>>2]=0,f[b+2588>>2]=0,f[b+2568>>2]=0,f[b+2572>>2]=0,f[b+2552>>2]=0,f[b+2556>>2]=0,f[b+2536>>2]=0,f[b+2540>>2]=0,f[b+2520>>2]=0,f[b+2524>>2]=0,f[b+2504>>2]=0,f[b+2508>>2]=0;r:{e:{i:{A:{f:{n:{a:{t:{b:{k:{u:{o:{c:{s:{l:{h:if(e=f[b+464>>2]){for(F=b+2060|0,_=b+468|0,l=b+2884|0,h=b+2900|0;;){if(f[b+2840>>2]=e,f[b+2856>>2]=10,e>>>0<=9)break l;if(g=b+2048|0,fi[f[f[b+456>>2]>>2]](g,_,f[b+460>>2],e),f[(e=b+2056|0)>>2]=10,s=f[e+4>>2],f[(u=b+2880|0)>>2]=f[e>>2],f[u+4>>2]=s,u=f[b+2052>>2],f[b+2872>>2]=f[b+2048>>2],f[b+2876>>2]=u,Tr(b+2216|0,b+2872|0,0,0),2!=f[b+2216>>2]|f[b+2220>>2]){if(qr(u=b+2888|0,b+456|0,f[b+2248>>2]+10|0),z(u,0,0,b+2504|0),(s=f[b+2668>>2])&&(p=f[b+2664>>2])){B=f[b+2660>>2],qr(g,I=u,v=(u=f[b+2896>>2])>>>0>>0?u:s);v:{d:{w:{g:switch(u=B+k(p,72)|0,f[u-72>>2]-1|0){case 0:break w;case 1:break d;default:break g}if(!(d=f[b+2056>>2])){fi[f[f[b+2048>>2]+16>>2]](F,f[b+2052>>2],0);break v}f[(y=u-4|0)>>2]=f[y>>2]+d,(0|(d=f[(R=u-8|0)>>2]))==f[(y=u-16|0)>>2]&&ce(y,1058736),f[R>>2]=d+1,g=f[b+2052>>2],u=f[u-12>>2]+(d<<4)|0,f[u>>2]=f[b+2048>>2],f[u+4>>2]=g,g=f[e+4>>2],f[(u=u+8|0)>>2]=f[e>>2],f[u+4>>2]=g;break v}if(!(d=f[b+2056>>2])){fi[f[f[b+2048>>2]+16>>2]](F,f[b+2052>>2],0);break v}f[(y=u-4|0)>>2]=f[y>>2]+d,(0|(d=f[(R=u-8|0)>>2]))==f[(y=u-16|0)>>2]&&ce(y,1058736),f[R>>2]=d+1,g=f[b+2052>>2],u=f[u-12>>2]+(d<<4)|0,f[u>>2]=f[b+2048>>2],f[u+4>>2]=g,g=f[e+4>>2],f[(u=u+8|0)>>2]=f[e>>2],f[u+4>>2]=g;break v}(d=f[b+2056>>2])?(f[(y=u-12|0)>>2]=f[y>>2]+d,(0|(d=f[(R=u-16|0)>>2]))==f[(y=u-24|0)>>2]&&ce(y,1058736),f[R>>2]=d+1,g=f[b+2052>>2],u=f[u-20>>2]+(d<<4)|0,f[u>>2]=f[b+2048>>2],f[u+4>>2]=g,g=f[e+4>>2],f[(u=u+8|0)>>2]=f[e>>2],f[u+4>>2]=g):fi[f[f[b+2048>>2]+16>>2]](F,f[b+2052>>2],0)}f[b+2668>>2]=s-v}if(fi[f[f[b+2888>>2]+16>>2]](h,f[b+2892>>2],f[b+2896>>2]),fi[f[f[b+2872>>2]+16>>2]](l,f[b+2876>>2],f[b+2880>>2]),e=f[b+464>>2])continue;break h}break}fi[f[f[b+2872>>2]+16>>2]](l,f[b+2876>>2],f[b+2880>>2])}ze(b+2048|0,b+2504|0,168);h:{if(C=f[b+2208>>2]){B=(Q=f[b+2204>>2])+k(C,72)|0,W=b+2516|0,D=b+2900|0,I=b+2852|0,N=b+2868|0,p=b+2820|0,Y=Q;v:{for(;;){f[b+2800>>2]=0,f[b+2804>>2]=1,f[b+2792>>2]=1,f[b+2796>>2]=0;d:{w:switch(f[Y>>2]-1|0){case 1:if(!(e=f[Y+56>>2]))break d;for(_=e<<4,s=f[Y+52>>2]+8|0,d=1,v=0,e=0;;){if(c=f[s-4>>2],(h=f[s>>2])>>>0>(l=v-e|0)>>>0&&(or(b+2792|0,h),d=f[b+2792>>2],l=(v=f[b+2800>>2])-(e=f[b+2796>>2])|0),ze(e+d|0,c,h),l>>>0>>0)break f;if(e=e+h|0,f[b+2796>>2]=e,s=s+16|0,!(_=_-16|0))break}break d;default:if(e=f[Y+64>>2],c=f[Y+60>>2],!n[Y+48|0]){if(!e)break d;for(_=e<<4,s=c+8|0,d=1,v=0,e=0;;){if(c=f[s-4>>2],(h=f[s>>2])>>>0>(l=v-e|0)>>>0&&(or(b+2792|0,h),d=f[b+2792>>2],l=(v=f[b+2800>>2])-(e=f[b+2796>>2])|0),ze(e+d|0,c,h),l>>>0>>0)break f;if(e=e+h|0,f[b+2796>>2]=e,s=s+16|0,!(_=_-16|0))break}break d}if(!e)break d;for(h=e<<4,e=c+8|0,s=0;s=Pr(f[e-4>>2],f[e>>2],b+2792|0,1&s),e=e+16|0,h=h-16|0;);break d;case 0:break w}if(e=f[Y+64>>2],c=f[Y+60>>2],n[Y+48|0]){if(e)for(h=e<<4,e=c+8|0,s=0;s=Pr(f[e-4>>2],f[e>>2],b+2792|0,1&s),e=e+16|0,h=h-16|0;);}else{if(!e)break d;for(_=e<<4,s=c+8|0,d=1,v=0,e=0;;){if(c=f[s-4>>2],(h=f[s>>2])>>>0>(l=v-e|0)>>>0&&(or(b+2792|0,h),d=f[b+2792>>2],l=(v=f[b+2800>>2])-(e=f[b+2796>>2])|0),ze(e+d|0,c,h),l>>>0>>0)break f;if(e=e+h|0,f[b+2796>>2]=e,s=s+16|0,!(_=_-16|0))break}}}s=f[b+2792>>2],e=f[b+2796>>2];d:{w:{g:{y:{B:{E:{_:{I:{Q:{N:{R:{C:{if(1&(c=f[b+2804>>2])){u=f[b+2800>>2],l=(c=c>>>5|0)+e|0,f[b+2896>>2]=l,s=s-c|0,f[b+2892>>2]=s,h=u+c|0,f[b+2888>>2]=h;p:{m:{if((0|e)!=(0|u)){if(e=V(12))break m;break w}if(se(b+8|0,b+2888|0),!(l=f[b+12>>2])){l=0,s=1,e=0,h=1051612;break p}if(1&(s=f[b+8>>2])){e=s,h=1051916;break p}e=1|s,h=1051896;break p}f[e+8>>2]=1,f[e+4>>2]=h,f[e>>2]=s,h=1052028}if(_=h,f[b+2840>>2]=c,c>>>0>l>>>0)break C;f[b+2820>>2]=e,f[b+2808>>2]=_,e=l-c|0,f[b+2816>>2]=e,s=c+s|0,f[b+2812>>2]=s}else f[b+2820>>2]=c,f[b+2812>>2]=s,f[b+2808>>2]=1058540;if(f[b+2856>>2]=10,e>>>0>9){if(s=s+10|0,f[b+2812>>2]=s,e=e-10|0,f[b+2816>>2]=e,!e)break N;p:switch(n[Y+44|0]-3|0){case 0:break p;case 1:break R;default:break Q}p:{m:{for(;;){if(f[b+2840>>2]=10,10==(0|e))u=f[(e=b+2816|0)+4>>2],f[(c=b+2896|0)>>2]=f[e>>2],f[c+4>>2]=u,f[e>>2]=0,f[e+4>>2]=0,e=f[b+2812>>2],f[b+2888>>2]=f[b+2808>>2],f[b+2892>>2]=e,f[b+2808>>2]=1051612,f[b+2812>>2]=s+10;else{if(e>>>0<10)break k;fi[f[f[b+2808>>2]>>2]](b+2504|0,p,s,e),f[(e=b+2512|0)>>2]=10,u=f[e+4>>2],f[(c=b+2896|0)>>2]=f[e>>2],f[c+4>>2]=u,e=f[b+2508>>2],f[b+2888>>2]=f[b+2504>>2],f[b+2892>>2]=e,f[b+2816>>2]=f[b+2816>>2]-10,f[b+2812>>2]=f[b+2812>>2]+10}if((s=f[b+2896>>2])>>>0<=3)break t;if(c=s-4|0,f[b+2896>>2]=c,e=f[b+2892>>2],f[b+2892>>2]=e+4,!c)break a;if(u=n[0|e]|n[e+1|0]<<8|n[e+2|0]<<16|n[e+3|0]<<24,c=s-5|0,f[b+2896>>2]=c,f[b+2892>>2]=e+5,!c)break a;if(_=n[e+4|0],c=s-6|0,f[b+2896>>2]=c,f[b+2892>>2]=e+6,!c)break a;if(c=n[e+5|0],l=s-7|0,f[b+2896>>2]=l,f[b+2892>>2]=e+7,!l)break p;if(l=n[e+6|0],s=s-8|0,f[b+2896>>2]=s,d=e+8|0,f[b+2892>>2]=d,e=n[e+7|0],fi[f[f[b+2888>>2]+16>>2]](D,d,s),c=127&e|(127&c)<<14|(127&_)<<21|(127&l)<<7,1447645776==(0|u)){if(zr(e=b+2504|0,b+2808|0,0,c),Fr(b+2824|0,e),u=f[b+2824>>2])break m;fi[f[f[b+2504>>2]+16>>2]](W,f[b+2508>>2],f[b+2512>>2])}if(f[b+2856>>2]=c,(u=f[b+2816>>2])>>>0>=c>>>0){if(e=u-c|0,f[b+2816>>2]=e,s=c+f[b+2812>>2]|0,f[b+2812>>2]=s,(0|u)!=(0|c))continue;break N}break}f[b+2888>>2]=u;break b}c=f[b+2832>>2],w=f[b+2836>>2],fi[f[f[b+2504>>2]+16>>2]](W,f[b+2508>>2],f[b+2512>>2]);break y}break a}f[b+2888>>2]=e;break b}f[b+2856>>2]=l;break n}for(;;){if(f[b+2840>>2]=10,10==(0|e))u=f[(e=b+2816|0)+4>>2],f[(c=b+2896|0)>>2]=f[e>>2],f[c+4>>2]=u,f[e>>2]=0,f[e+4>>2]=0,e=f[b+2812>>2],f[b+2888>>2]=f[b+2808>>2],f[b+2892>>2]=e,f[b+2808>>2]=1051612,f[b+2812>>2]=s+10;else{if(e>>>0<10)break k;fi[f[f[b+2808>>2]>>2]](b+2504|0,p,s,e),f[(e=b+2512|0)>>2]=10,u=f[e+4>>2],f[(c=b+2896|0)>>2]=f[e>>2],f[c+4>>2]=u,e=f[b+2508>>2],f[b+2888>>2]=f[b+2504>>2],f[b+2892>>2]=e,f[b+2816>>2]=f[b+2816>>2]-10,f[b+2812>>2]=f[b+2812>>2]+10}if((s=f[b+2896>>2])>>>0<=3)break t;if(c=s-4|0,f[b+2896>>2]=c,e=f[b+2892>>2],f[b+2892>>2]=e+4,!c)break a;if(c=n[0|e]|n[e+1|0]<<8|n[e+2|0]<<16|n[e+3|0]<<24,u=s-5|0,f[b+2896>>2]=u,f[b+2892>>2]=e+5,!u)break a;if(_=n[e+4|0],u=s-6|0,f[b+2896>>2]=u,f[b+2892>>2]=e+6,!u)break a;if(u=n[e+5|0],l=s-7|0,f[b+2896>>2]=l,f[b+2892>>2]=e+7,!l)break a;if(d=n[e+6|0],l=s-8|0,f[b+2896>>2]=l,f[b+2892>>2]=e+8,v=n[e+7|0],f[b+2840>>2]=1,!l)break I;if(f[b+2892>>2]=e+9,l=s-9|0,f[b+2896>>2]=l,!l)break a;if(g=127&v|(127&u)<<14|(127&_)<<21|(127&d)<<7,u=s-10|0,f[b+2896>>2]=u,s=e+10|0,f[b+2892>>2]=s,e=n[e+9|0],fi[f[f[b+2888>>2]+16>>2]](D,s,u),1447645776==(0|c)){if(zr(b+2840|0,b+2808|0,0,g),2&e){c=f[(e=b+2848|0)>>2],e=f[e+4>>2],f[(u=b+2864|0)>>2]=c,f[u+4>>2]=e,e=f[b+2844>>2],f[b+2856>>2]=f[b+2840>>2],f[b+2860>>2]=e;R:{C:{p:{if((0|c)>=0){if(!c)break p;if(R=V(c))break C;r=1}else r=0;Ze(r,1058752),$f()}f[b+2896>>2]=0,f[b+2900>>2]=1,f[b+2888>>2]=1,f[b+2892>>2]=0,d=0,w=f[b+2860>>2],_=0,s=1,e=1;break R}for(_=0,f[b+2892>>2]=0,f[b+2888>>2]=R,f[b+2896>>2]=c,f[b+2900>>2]=c>>>0>131071?29:129-(o(c>>>10|0)<<2)|0,v=0,s=w=f[b+2860>>2],y=c,h=c;;){if(h){d=s+h|0,e=0;C:{p:{for(;;){if(255==n[e+s|0])break p;if(l=1,(0|h)==(0|(e=e+1|0)))break}F=0;break C}d=(e=e+1|0)+s|0,F=h-e|0,l=(0|e)==(0|h),h=e}if(u=(e=1&v)+s|0,(e=h-e|0)>>>0>(h=y-_|0)>>>0&&(or(b+2888|0,e),R=f[b+2888>>2],h=(y=f[b+2896>>2])-(_=f[b+2892>>2])|0),ze(_+R|0,u,e),e>>>0>h>>>0)break g;if(_=e+_|0,f[b+2892>>2]=_,v=e?255==n[(e+u|0)-1|0]:0,s=d,h=F,!l)continue}break}d=f[b+2896>>2],s=f[b+2888>>2],e=f[b+2900>>2]}if(l=1058540,1&e){if(v=(u=e>>>5|0)+_|0,f[b+2916>>2]=v,s=s-u|0,f[b+2912>>2]=s,l=u+d|0,f[b+2908>>2]=l,(0|d)==(0|_))se(b,b+2908|0),(v=f[b+4>>2])?1&(s=f[b>>2])?(e=s,l=1051916):(e=1|s,l=1051896):(v=0,s=1,e=0,l=1051612);else{if(!(e=V(12)))break w;f[e+8>>2]=1,f[e+4>>2]=l,f[e>>2]=s,l=1052028}if(f[b+2920>>2]=u,u>>>0>v>>>0)break E;_=v-u|0,s=u+s|0}fi[f[f[b+2856>>2]+16>>2]](N,w,c),f[b+2852>>2]=e,f[b+2848>>2]=_,f[b+2844>>2]=s,f[b+2840>>2]=l}if(Fr(b+2872|0,b+2840|0),u=f[b+2872>>2])break B;fi[f[f[b+2840>>2]+16>>2]](I,f[b+2844>>2],f[b+2848>>2])}if(f[b+2856>>2]=g,(c=f[b+2816>>2])>>>0>>0)break _;if(e=c-g|0,f[b+2816>>2]=e,s=g+f[b+2812>>2]|0,f[b+2812>>2]=s,(0|c)==(0|g))break}}e=0}fi[f[f[b+2808>>2]+16>>2]](p,s,e);break d}f[b+2856>>2]=0;break n}f[b+2888>>2]=c;break b}f[b+2924>>2]=v,f[b+2508>>2]=2,f[b+2504>>2]=1058600,f[b+2516>>2]=2,f[b+2520>>2]=0,f[b+2224>>2]=b+2924,f[b+2228>>2]=3,f[b+2216>>2]=b+2920,f[b+2220>>2]=3;break A}c=f[b+2880>>2],w=f[b+2884>>2],fi[f[f[b+2840>>2]+16>>2]](I,f[b+2844>>2],f[b+2848>>2])}if(fi[f[f[b+2808>>2]+16>>2]](p,f[b+2812>>2],f[b+2816>>2]),!u)break d;break v}f[b+2508>>2]=h,f[b+2504>>2]=e;break i}$f()}if((0|B)==(0|(Y=Y+72|0)))break}c=0,w=0}if(3&~(e=((u=k(C,72)-72|0)>>>0)/72|0))for(e=0-(e+1&3)|0;f[(s=Q+32|0)>>2]=c,f[s+4>>2]=w,f[(s=Q+24|0)>>2]=1,f[s+4>>2]=0,f[(s=Q+16|0)>>2]=c,f[s+4>>2]=w,f[(s=Q+8|0)>>2]=1,f[s+4>>2]=0,Q=Q+72|0,e=e+1|0;);if(u>>>0>=216)for(;f[(u=Q+32|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+24|0)>>2]=1,f[u+4>>2]=0,f[(u=Q+104|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+96|0)>>2]=1,f[u+4>>2]=0,f[(u=Q+16|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+8|0)>>2]=1,f[u+4>>2]=0,f[(u=Q+176|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+168|0)>>2]=1,f[u+4>>2]=0,f[(u=Q+88|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+80|0)>>2]=1,f[u+4>>2]=0,f[(u=Q+248|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+240|0)>>2]=1,f[u+4>>2]=0,f[(u=Q+160|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+152|0)>>2]=1,f[u+4>>2]=0,f[(u=Q+232|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+224|0)>>2]=1,f[u+4>>2]=0,(0|B)!=(0|(Q=Q+288|0)););if(f[b+2104>>2]=c,f[b+2108>>2]=w,f[b+2096>>2]=1,f[b+2100>>2]=0,f[b+2088>>2]=c,f[b+2092>>2]=w,f[b+2080>>2]=1,f[b+2084>>2]=0,i[b+2198|0]=1,!(!f[b+1596>>2]&2==f[b+1592>>2])&&((e=f[b+1720>>2])&&fi[f[e+16>>2]](b+1732|0,f[b+1724>>2],f[b+1728>>2]),gr(f[b+1748>>2],f[b+1752>>2]),e=f[b+1744>>2])){if(s=f[b+1748>>2],(u=-8&(l=f[s-4>>2]))>>>0<(e=k(e,72))+((l&=3)?4:8)>>>0)break e;if(u>>>0>e+39>>>0&&l)break h;nr(s)}ze(b+1592|0,b+2048|0,168)}if(t[b+464>>2]<2||(e=f[b+460>>2],255!=n[0|e]||242!=(-10&n[e+1|0]))){i[b+2764|0]=0,i[b+2654|0]=1,A[b+2652>>1]=256,A[b+2648>>1]=0,f[b+2632>>2]=0,f[b+2616>>2]=0,f[b+2620>>2]=0,f[b+2600>>2]=0,f[b+2604>>2]=0,f[b+2592>>2]=c,f[b+2596>>2]=w,f[b+2584>>2]=1,f[b+2588>>2]=0,f[b+2576>>2]=c,f[b+2580>>2]=w,f[b+2568>>2]=1,f[b+2572>>2]=0,f[b+2560>>2]=c,f[b+2564>>2]=w,f[b+2552>>2]=1,f[b+2556>>2]=0,f[b+2544>>2]=c,f[b+2548>>2]=w,f[b+2536>>2]=1,f[b+2540>>2]=0,f[b+2520>>2]=0,f[b+2524>>2]=0,f[b+2504>>2]=0,f[b+2508>>2]=0,f[b+2752>>2]=0,f[b+2744>>2]=0,f[b+2748>>2]=8,f[b+2656>>2]=2,f[b+2660>>2]=0,i[b+2765|0]=0,i[b+2766|0]=0,f[b+2756>>2]=0,f[b+2760>>2]=0,P(b+456|0,b+2504|0),c=f[b+2656>>2],u=f[b+2660>>2],f[b+2656>>2]=2,f[b+2660>>2]=0,2!=(0|c)|u&&(ze(b+2216|0,b+2664|0,80),(0|(e=f[b+2752>>2]))==f[b+2744>>2]&&te(b+2744|0,1056284),s=f[b+2748>>2]+k(e,88)|0,f[s>>2]=c,f[s+4>>2]=u,ze(s+8|0,b+2216|0,80),f[b+2752>>2]=e+1),ze(b+2224|0,b+2504|0,264),f[b+2216>>2]=2,f[b+2220>>2]=0;break s}if(f[b+2768>>2]=0,f[b+2760>>2]=0,f[b+2764>>2]=8,i[b+2654|0]=1,A[b+2648>>1]=0,f[b+2632>>2]=0,f[b+2616>>2]=0,f[b+2620>>2]=0,f[b+2600>>2]=0,f[b+2604>>2]=0,f[b+2592>>2]=c,f[b+2596>>2]=w,f[b+2584>>2]=1,f[b+2588>>2]=0,f[b+2576>>2]=c,f[b+2580>>2]=w,f[b+2568>>2]=1,f[b+2572>>2]=0,f[b+2560>>2]=c,f[b+2564>>2]=w,f[b+2552>>2]=1,f[b+2556>>2]=0,f[b+2544>>2]=c,f[b+2548>>2]=w,f[b+2536>>2]=1,f[b+2540>>2]=0,f[b+2520>>2]=0,f[b+2524>>2]=0,f[b+2504>>2]=0,f[b+2508>>2]=0,A[b+2652>>1]=256,A[(c=b+2778|0)>>1]=0,A[c+2>>1]=0,A[c+4>>1]=0,A[c+6>>1]=0,f[b+2772>>2]=0,f[b+2776>>2]=0,f[b+2656>>2]=2,f[b+2660>>2]=0,x(b+456|0,b+2504|0),c=f[b+2656>>2],u=f[b+2660>>2],f[b+2656>>2]=2,f[b+2660>>2]=0,2!=(0|c)|u&&(ze(b+2216|0,b+2664|0,96),(0|(e=f[b+2768>>2]))==f[b+2760>>2]&&be(b+2760|0,1058088),s=f[b+2764>>2]+k(e,104)|0,f[s>>2]=c,f[s+4>>2]=u,ze(s+8|0,b+2216|0,96),f[b+2768>>2]=e+1),ze(b+2216|0,b+2504|0,288),!f[b+2220>>2]&2==f[b+2216>>2])break s;if(!f[b+2480>>2])break c;break o}break r}f[b+2052>>2]=2,f[b+2048>>2]=1057564,f[b+2060>>2]=2,f[b+2064>>2]=0,f[b+2896>>2]=b+2840,f[b+2900>>2]=3,f[b+2888>>2]=b+2856,f[b+2892>>2]=3,f[b+2056>>2]=b+2888,Me(b+2048|0,1057580),$f()}if(f[b+2472>>2])break o}l=f[b+1608>>2],s=f[b+1604>>2],h=f[b+1600>>2],D=f[b+1592>>2],T=f[b+1596>>2],ze(b+1380|0,b+1612|0,148),g=f[(u=b+1776|0)+4>>2],f[(c=b+1344|0)>>2]=f[u>>2],f[c+4>>2]=g,g=f[(u=b+1784|0)+4>>2],f[(c=b+1352|0)>>2]=f[u>>2],f[c+4>>2]=g,g=f[(u=b+1792|0)+4>>2],f[(c=b+1360|0)>>2]=f[u>>2],f[c+4>>2]=g,g=f[(u=b+1800|0)+4>>2],f[(c=b+1368|0)>>2]=f[u>>2],f[c+4>>2]=g,c=f[b+1772>>2],f[b+1336>>2]=f[b+1768>>2],f[b+1340>>2]=c,I=f[b+1760>>2],L=f[b+1764>>2],p=f[b+1808>>2],J=f[b+1812>>2],g=f[b+1816>>2],W=f[b+1820>>2],B=f[b+1824>>2],H=f[b+1828>>2],N=f[b+1888>>2],rr=f[b+1892>>2],ze(b+1220|0,b+1896|0,116),w=f[(u=b+2040|0)+4>>2],f[(c=b+1208|0)>>2]=f[u>>2],f[c+4>>2]=w,c=f[b+2036>>2],f[b+1200>>2]=f[b+2032>>2],f[b+1204>>2]=c,K=f[b+2028>>2],Q=f[b+2024>>2],X=f[b+2020>>2],O=f[b+2016>>2],Y=f[b+2012>>2],Er(b+2216|0);break u}e=b+1760|0,3!=f[b+1760>>2]|f[b+1764>>2]&&Er(e),ze(e,b+2216|0,288),l=f[b+1608>>2],s=f[b+1604>>2],h=f[b+1600>>2],D=f[b+1592>>2],T=f[b+1596>>2],ze(b+1380|0,b+1612|0,148),g=f[(u=b+2232|0)+4>>2],f[(c=b+1344|0)>>2]=f[u>>2],f[c+4>>2]=g,g=f[(u=b+2240|0)+4>>2],f[(c=b+1352|0)>>2]=f[u>>2],f[c+4>>2]=g,g=f[(u=b+2248|0)+4>>2],f[(c=b+1360|0)>>2]=f[u>>2],f[c+4>>2]=g,g=f[(u=b+2256|0)+4>>2],f[(c=b+1368|0)>>2]=f[u>>2],f[c+4>>2]=g,c=f[b+2228>>2],f[b+1336>>2]=f[b+2224>>2],f[b+1340>>2]=c,I=f[b+1760>>2],L=f[b+1764>>2],p=f[b+1808>>2],J=f[b+1812>>2],g=f[b+1816>>2],W=f[b+1820>>2],B=f[b+1824>>2],H=f[b+1828>>2],N=f[b+2344>>2],rr=f[b+2348>>2],ze(b+1220|0,b+2352|0,116),w=f[(u=b+2496|0)+4>>2],f[(c=b+1208|0)>>2]=f[u>>2],f[c+4>>2]=w,c=f[b+2492>>2],f[b+1200>>2]=f[b+2488>>2],f[b+1204>>2]=c,K=f[b+2484>>2],Q=f[b+2480>>2],X=f[b+2476>>2],O=f[b+2472>>2],Y=f[b+2468>>2]}if(!C&&((e=f[b+2176>>2])&&fi[f[e+16>>2]](b+2188|0,f[b+2180>>2],f[b+2184>>2]),gr(f[b+2204>>2],f[b+2208>>2]),e=f[b+2200>>2])){if(c=f[b+2204>>2],(d=-8&(u=f[c-4>>2]))>>>0<(e=k(e,72))+((_=3&u)?4:8)>>>0)break e;if(e+39>>>0>>0&&_)break r;nr(c)}if(c=3,!T&3==(0|D))u=0,C=0,q=-2147483648;else if(ze(b+2504|0,b+1380|0,148),w=f[(u=b+1368|0)+4>>2],f[(c=b+1192|0)>>2]=f[u>>2],f[c+4>>2]=w,w=f[(u=b+1360|0)+4>>2],f[(c=b+1184|0)>>2]=f[u>>2],f[c+4>>2]=w,w=f[(u=b+1352|0)+4>>2],f[(c=b+1176|0)>>2]=f[u>>2],f[c+4>>2]=w,w=f[(u=b+1344|0)+4>>2],f[(c=b+1168|0)>>2]=f[u>>2],f[c+4>>2]=w,c=f[b+1340>>2],f[b+1160>>2]=f[b+1336>>2],f[b+1164>>2]=c,ze(b+1040|0,b+1220|0,116),w=f[(u=b+1208|0)+4>>2],f[(c=b+1032|0)>>2]=f[u>>2],f[c+4>>2]=w,c=f[b+1204>>2],f[b+1024>>2]=f[b+1200>>2],f[b+1028>>2]=c,q=-2147483648,3!=(0|I)|!!(0|L)|2!=(0|D)|!!(0|T)){m=c=L-(I>>>0<2)|0;u:{o:{c:{s:{l:{h:{v:{if(!c&(E=I-2|0)>>>0<=1){if(u=0,C=0,c=2,E-1|0)break v;break u}if(Q)for(_=k(Q,104),e=X+56|0,c=1,w=-2147483648,y=-1,d=2147483647,u=-1,C=2147483647,E=1,m=-2147483648;;){if(1!=f[e-8>>2])break h;if(!f[e-24>>2])break l;if(B=f[(v=e-16|0)>>2],E=(R=(0|(v=f[v+4>>2]))<(0|m)?1:(0|v)<=(0|m)&E>>>0>B>>>0)?E:B,m=R?m:v,R=B,u=(B=u>>>0>>0&(0|v)>=(0|C)|(0|v)>(0|C))?u:R,C=B?C:v,B=f[e>>2],c=(R=(0|(v=f[e+4>>2]))<(0|w)?1:c>>>0>B>>>0&(0|w)>=(0|v))?c:B,w=R?w:v,R=B,y=(B=y>>>0>>0&(0|d)<=(0|v)|(0|d)<(0|v))?y:R,d=B?d:v,e=e+104|0,!(_=_-104|0))break}else u=-1,C=2147483647,E=1,m=-2147483648,c=1,w=-2147483648,y=-1,d=2147483647;v=f[(B=b+1168|0)+4>>2],f[(e=b+1608|0)>>2]=f[B>>2],f[e+4>>2]=v,v=f[(B=b+1176|0)+4>>2],f[(e=b+1616|0)>>2]=f[B>>2],f[e+4>>2]=v,v=f[(B=b+1184|0)+4>>2],f[(e=b+1624|0)>>2]=f[B>>2],f[e+4>>2]=v,v=f[(B=b+1192|0)+4>>2],f[(e=b+1632|0)>>2]=f[B>>2],f[e+4>>2]=v,f[b+1592>>2]=I,f[b+1596>>2]=L,e=f[b+1164>>2],f[b+1600>>2]=f[b+1160>>2],f[b+1604>>2]=e,f[b+1720>>2]=N,f[b+1724>>2]=rr,f[b+1712>>2]=c,f[b+1716>>2]=w,c=1,f[b+1704>>2]=1,f[b+1708>>2]=0,f[b+1696>>2]=E,f[b+1700>>2]=m,f[b+1688>>2]=1,f[b+1692>>2]=0,f[b+1680>>2]=y,f[b+1684>>2]=d,f[b+1672>>2]=1,f[b+1676>>2]=0,f[b+1664>>2]=u,f[b+1668>>2]=C,f[b+1656>>2]=1,f[b+1660>>2]=0,f[b+1648>>2]=g,f[b+1652>>2]=W,f[b+1640>>2]=p,f[b+1644>>2]=J,ze(b+1728|0,b+1040|0,116),u=f[(E=b+1032|0)+4>>2],f[(e=b+1872|0)>>2]=f[E>>2],f[e+4>>2]=u,f[b+1860>>2]=K,f[b+1856>>2]=Q,f[b+1852>>2]=X,f[b+1848>>2]=O,f[b+1844>>2]=Y,e=f[b+1028>>2],f[b+1864>>2]=f[b+1024>>2],f[b+1868>>2]=e,j(e=b+2216|0,b+1592|0);break o}if(O)for(_=k(O,88),e=Y+56|0,c=1,w=-2147483648,y=-1,d=2147483647,u=-1,C=2147483647,E=1,m=-2147483648;;){if(1!=f[e-8>>2])break s;if(!f[e-24>>2])break c;if(I=f[(N=e-16|0)>>2],E=(v=(0|(N=f[N+4>>2]))<(0|m)?1:(0|N)<=(0|m)&E>>>0>I>>>0)?E:I,m=v?m:N,v=I,u=(I=u>>>0>>0&(0|N)>=(0|C)|(0|N)>(0|C))?u:v,C=I?C:N,I=f[e>>2],c=(v=(0|(N=f[e+4>>2]))<(0|w)?1:c>>>0>I>>>0&(0|w)>=(0|N))?c:I,w=v?w:N,v=I,y=(I=y>>>0>>0&(0|d)<=(0|N)|(0|d)<(0|N))?y:v,d=I?d:N,e=e+88|0,!(_=_-88|0))break}else u=-1,C=2147483647,E=1,m=-2147483648,c=1,w=-2147483648,y=-1,d=2147483647;N=f[(I=b+1192|0)+4>>2],f[(e=b+1624|0)>>2]=f[I>>2],f[e+4>>2]=N,N=f[(I=b+1184|0)+4>>2],f[(e=b+1616|0)>>2]=f[I>>2],f[e+4>>2]=N,N=f[(I=b+1176|0)+4>>2],f[(e=b+1608|0)>>2]=f[I>>2],f[e+4>>2]=N,N=f[(I=b+1168|0)+4>>2],f[(e=b+1600|0)>>2]=f[I>>2],f[e+4>>2]=N,e=f[b+1164>>2],f[b+1592>>2]=f[b+1160>>2],f[b+1596>>2]=e,f[b+1712>>2]=c,f[b+1716>>2]=w,f[b+1704>>2]=1,f[b+1708>>2]=0,f[b+1696>>2]=E,f[b+1700>>2]=m,f[b+1688>>2]=1,f[b+1692>>2]=0,f[b+1680>>2]=y,f[b+1684>>2]=d,f[b+1672>>2]=1,f[b+1676>>2]=0,f[b+1664>>2]=u,f[b+1668>>2]=C,f[b+1656>>2]=1,f[b+1660>>2]=0,f[b+1648>>2]=B,f[b+1652>>2]=H,f[b+1640>>2]=g,f[b+1644>>2]=W,f[b+1632>>2]=p,f[b+1636>>2]=J,ze(b+1720|0,b+1040|0,116),f[b+1852>>2]=K,f[b+1848>>2]=Q,f[b+1844>>2]=X,f[b+1840>>2]=O,f[b+1836>>2]=Y,Z(e=b+2216|0,b+1592|0),c=0,p=g,g=B,W=H;break o}Ve(1054616),$f()}Ve(1054632),$f()}Ve(1054616),$f()}Ve(1054632),$f()}F=f[e+64>>2],E=qe(f[e+24>>2],f[e+28>>2],F,0),m=u=M,f[e+8>>2]=E,f[e+12>>2]=u,f[e>>2]=1,f[e+4>>2]=0,B=f[(y=e+20|0)+4>>2],f[(u=b+1552|0)>>2]=f[y>>2],f[u+4>>2]=B,B=f[(y=e+28|0)+4>>2],f[(u=b+1560|0)>>2]=f[y>>2],f[u+4>>2]=B,B=f[(y=e+36|0)+4>>2],f[(u=b+1568|0)>>2]=f[y>>2],f[u+4>>2]=B,B=f[(y=e+44|0)+4>>2],f[(u=b+1576|0)>>2]=f[y>>2],f[u+4>>2]=B,f[b+1584>>2]=f[e+52>>2],u=f[e+16>>2],f[b+1544>>2]=f[e+12>>2],f[b+1548>>2]=u,y=f[e+56>>2],R=f[e+60>>2],v=f[e+68>>2],d=f[e+72>>2],_=f[e+76>>2],w=f[(B=e+88|0)+4>>2],f[(u=b+1536|0)>>2]=f[B>>2],f[u+4>>2]=w,u=f[e+84>>2],f[b+1528>>2]=f[e+80>>2],f[b+1532>>2]=u,u=(e=1&p)?g:0,C=e?W:0,e=E}!T&2==(0|D)?(l=e,s=0,h=1):(f[b+1608>>2]=l,f[b+1604>>2]=s,f[b+1600>>2]=h,f[b+1592>>2]=D,f[b+1596>>2]=T,ze(b+1612|0,b+2504|0,148),E=f[b+1748>>2],m=f[b+1752>>2],q=f[b+1744>>2],(s=f[b+1720>>2])&&fi[f[s+16>>2]](b+1732|0,f[b+1724>>2],f[b+1728>>2]),l=e,s=0,h=1)}else c=2,u=0,C=0;fi[f[f[b+456>>2]+16>>2]](b+468|0,f[b+460>>2],f[b+464>>2]);u:{o:{c:{s:{l:{if(3!=(0|c)){if(f[b+580>>2]=f[b+1584>>2],p=f[(g=b+1576|0)+4>>2],f[(e=b+572|0)>>2]=f[g>>2],f[e+4>>2]=p,p=f[(g=b+1568|0)+4>>2],f[(e=b+564|0)>>2]=f[g>>2],f[e+4>>2]=p,p=f[(g=b+1560|0)+4>>2],f[(e=b+556|0)>>2]=f[g>>2],f[e+4>>2]=p,p=f[(g=b+1552|0)+4>>2],f[(e=b+548|0)>>2]=f[g>>2],f[e+4>>2]=p,e=f[b+1548>>2],f[b+540>>2]=f[b+1544>>2],f[b+544>>2]=e,f[b+604>>2]=_,f[b+600>>2]=d,f[b+596>>2]=v,f[b+592>>2]=F,f[b+588>>2]=R,f[b+584>>2]=y,g=f[(y=b+1536|0)+4>>2],f[(e=b+616|0)>>2]=f[y>>2],f[e+4>>2]=g,f[b+528>>2]=h,f[b+532>>2]=s,f[b+536>>2]=l,f[b+520>>2]=c,f[b+524>>2]=0,f[b+624>>2]=2,f[b+628>>2]=0,f[b+752>>2]=u,f[b+756>>2]=C,f[b+760>>2]=q,f[b+764>>2]=E,f[b+768>>2]=m,A[b+772>>1]=0,e=f[b+1532>>2],f[b+608>>2]=f[b+1528>>2],f[b+612>>2]=e,ar(e=b+1592|0,E=b+520|0),l=f[b+1604>>2],s=f[b+1600>>2],h=f[b+1596>>2],1!=f[b+1592>>2]){if(f[b+2532>>2]=f[b+1624>>2],y=f[(u=b+1616|0)+4>>2],f[(c=b+2524|0)>>2]=f[u>>2],f[c+4>>2]=y,c=f[b+1612>>2],f[b+2516>>2]=f[b+1608>>2],f[b+2520>>2]=c,f[b+2512>>2]=l,f[b+2508>>2]=s,f[b+2504>>2]=h,U(e,E),1!=f[b+1592>>2]){if(u=f[(E=b+1624|0)+4>>2],f[(e=c=b+784|0)>>2]=f[E>>2],f[e+4>>2]=u,s=f[(E=b+2512|0)+4>>2],f[(e=u=b+800|0)>>2]=f[E>>2],f[e+4>>2]=s,e=f[b+1620>>2],f[b+776>>2]=f[b+1616>>2],f[b+780>>2]=e,e=f[b+2508>>2],f[b+792>>2]=f[b+2504>>2],f[b+796>>2]=e,h=f[b+1600>>2],y=f[b+1604>>2],g=f[b+1608>>2],p=f[b+1612>>2],B=f[b+1672>>2],w=f[b+1664>>2],C=f[b+1668>>2],E=f[b+1640>>2],m=f[b+1632>>2],d=f[b+1636>>2],e=f[b+1656>>2],W=f[b+1648>>2],D=f[b+1652>>2],I=f[(l=b+2528|0)+4>>2],f[(s=b+816|0)>>2]=f[l>>2],f[s+4>>2]=I,I=f[b+2524>>2],f[(l=b+808|0)>>2]=f[b+2520>>2],f[l+4>>2]=I,ze(I=b+1592|0,b+520|0,256),hr(b+824|0,I,E?m:0,E?d:0,E||9e4,e?W:0,e?D:0,e||9e4,w,C,B),E=f[u+4>>2],f[(e=b+968|0)>>2]=f[u>>2],f[e+4>>2]=E,E=f[l+4>>2],f[(e=b+976|0)>>2]=f[l>>2],f[e+4>>2]=E,E=f[s+4>>2],f[(e=b+984|0)>>2]=f[s>>2],f[e+4>>2]=E,E=f[c+4>>2],f[(e=b+1016|0)>>2]=f[c>>2],f[e+4>>2]=E,f[b+1e3>>2]=g,f[b+1004>>2]=p,f[b+992>>2]=h,f[b+996>>2]=y,e=f[b+796>>2],f[b+960>>2]=f[b+792>>2],f[b+964>>2]=e,e=f[b+780>>2],f[b+1008>>2]=f[b+776>>2],f[b+1012>>2]=e,c=f[b+824>>2],w=f[b+828>>2],h=f[b+832>>2],s=f[b+836>>2],l=f[b+840>>2],ze(b+16|0,b+844|0,180),(e=f[b+488>>2])&&fi[f[e+16>>2]](b+500|0,f[b+492>>2],f[b+496>>2]),!(e=f[b+504>>2]))break s;break l}(e=f[b+1604>>2],E=f[b+1600>>2],c=f[b+1596>>2],h&&fi[f[h+16>>2]](b+2516|0,s,l),u=f[b+2520>>2])&&fi[f[u+16>>2]](b+2532|0,f[b+2524>>2],f[b+2528>>2]),l=e,h=c,s=E}ir(b+520|0)}if((e=f[b+488>>2])&&fi[f[e+16>>2]](b+500|0,f[b+492>>2],f[b+496>>2]),c=2,w=0,!(e=f[b+504>>2]))break c}fi[f[e+16>>2]](b+516|0,f[b+508>>2],f[b+512>>2])}if(!(!w&2==(0|c))){ze(b+276|0,b+16|0,180),f[b+272>>2]=l,f[b+268>>2]=s,f[b+264>>2]=h,f[b+256>>2]=c,f[b+260>>2]=w,l=$(b+256|0),e=0;break o}}if(e=0,-2147483648!=(0|h)){if(e=1,l=0|G(0|s,0|l),h){if((E=-8&(c=f[s-4>>2]))>>>0<((c&=3)?4:8)+h>>>0)break e;if(E>>>0>h+39>>>0&&c)break u;nr(s)}}else l=s}return f[r+8>>2]=e,f[r+4>>2]=e?l:0,f[r>>2]=e?0:l,void(S=b+2928|0)}break r}f[b+2856>>2]=e,f[b+2508>>2]=2,f[b+2504>>2]=1051848,f[b+2516>>2]=2,f[b+2520>>2]=0,f[b+2224>>2]=b+2856,f[b+2228>>2]=3,f[b+2216>>2]=b+2840,f[b+2220>>2]=3,f[b+2512>>2]=b+2216,Me(b+2504|0,1051864),$f()}f[b+2508>>2]=2,f[b+2504>>2]=1058600,f[b+2516>>2]=2,f[b+2520>>2]=0,f[b+2224>>2]=b+2888,f[b+2228>>2]=3,f[b+2216>>2]=b+2856,f[b+2220>>2]=3;break A}f[b+2508>>2]=s,f[b+2504>>2]=4;break i}pe(1057432),$f()}f[b+2508>>2]=2,f[b+2504>>2]=1058600,f[b+2516>>2]=2,f[b+2520>>2]=0,f[b+2224>>2]=b+2856,f[b+2228>>2]=3,f[b+2216>>2]=b+2840,f[b+2220>>2]=3;break A}f[b+2508>>2]=l,f[b+2504>>2]=h;break i}f[b+2512>>2]=b+2216,Me(b+2504|0,1058616),$f()}pe(b+2504|0),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},__wbindgen_export_0:function(r,e,i){r|=0,i|=0;var A=0;r:{e:{if(e|=0){if((A=-8&(i=f[r-4>>2]))>>>0<((i&=3)?4:8)+e>>>0)break e;if(e+39>>>0>>0&&i)break r;nr(r)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},__wbindgen_export_1:function(r,e){if(r|=0,!(1!=(0|ii(e|=0))|-2147483648-e>>>0>>0)&&(!r||(e=e>>>0>=9?Or(e,r):V(r))))return 0|e;$f()},__wbindgen_export_2:function(r,e,i,A){return r|=0,e|=0,i|=0,(1!=(0|ii(A|=0))|-2147483648-A>>>0>>0||!(r=kr(r,e,A,i)))&&$f(),0|r},__wbindgen_add_to_stack_pointer:function(r){return 0|(S=S+(r|=0)|0)},__wbindgen_start:Te}}({"./theomux_bg.js":Vf}),en=rn.memory,An=rn.main,fn=rn.mpegts_to_fmp4,nn=rn.raw_audio_to_fmp4,an=rn.__wbindgen_export_0,tn=rn.__wbindgen_export_1,bn=rn.__wbindgen_export_2,kn=rn.__wbindgen_add_to_stack_pointer,un=rn.__wbindgen_start;yf({__proto__:null,__wbindgen_add_to_stack_pointer:kn,__wbindgen_export_0:an,__wbindgen_export_1:tn,__wbindgen_export_2:bn,__wbindgen_start:un,main:An,memory:en,mpegts_to_fmp4:fn,raw_audio_to_fmp4:nn}),un(),function(r){var e,i=$.resolve(r()).then(function(r){e=r,i=void 0,self.postMessage({sQt:"10.0.0"})},function(r){var e=r,i={success:!1,error:e.message,errorCode:Q(e,sf)?e.code:of.MEDIA_DECODE_ERROR};self.postMessage(i)});self.addEventListener("message",function(r){var A=r.data.id;(function(r){return function(r){return function(){var e=this,i=arguments;return new $(function(A,f){var n=r.apply(e,i);function a(r){Dr(n,A,f,a,t,"next",r)}function t(r){Dr(n,A,f,a,t,"throw",r)}a(void 0)})}}(function(){var A,f,n,a,t,b;return Sr(this,function(k){switch(k.label){case 0:return void 0===i?[3,2]:[4,i];case 1:k.sent(),k.label=2;case 2:if(n=r.id,r.type===uf.MPEGTS_TO_FMP4)a=e.mpegts_to_fmp4(r.input);else{if(r.type!==uf.RAW_AUDIO_TO_FMP4)throw new d("Unknown request type: "+r.type);a=e.raw_audio_to_fmp4(r.input)}return t={success:!0,requestId:n,output:a},b=[null==(A=r.input.metadata)?void 0:A.sps_nal,null==(f=r.input.metadata)?void 0:f.pps_nal,r.input.data,a.data.video_init,a.data.audio_init,a.data.video_media,a.data.audio_media].filter(pr).map(function(r){return r.buffer}),self.postMessage(t,b),[2]}})})()})(r.data).catch(function(r){var e=r,i={success:!1,requestId:A,error:e.message,errorCode:Q(e,sf)?e.code:of.MEDIA_DECODE_ERROR};self.postMessage(i)})})}(function(){return{mpegts_to_fmp4:Of,raw_audio_to_fmp4:Zf}})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this); +!function(r){"use strict";var e,i,A,f,n,a,t,b,k,u=r.window,o=r.document,c=(r.location,r.navigator),s=r.setTimeout,l=r.clearTimeout,h=r.setInterval,v=r.clearInterval,d=r.Error,w=r.TypeError,g=(r.SyntaxError,r.Object),y=r.Math,B=r.parseInt,E=r.parseFloat,_=r.isNaN,I=r.Uint8Array;r.Worker,r.WorkerGlobalScope,r.XMLHttpRequest;function Q(r,i){return null!=i&&void 0!==e&&i[e.hasInstance]?!!i[e.hasInstance](r):r instanceof i}function N(r){return r&&void 0!==e&&r.constructor===e?"symbol":typeof r}"function"==typeof Symbol&&Symbol.iterator?(e=Symbol,i=null!=(a=Symbol.for)?a:Symbol,A=Symbol.iterator,f=null!=(t=Symbol.dispose)?t:i("Symbol.dispose"),n=null!=(b=Symbol.asyncDispose)?b:i("Symbol.asyncDispose")):(k=0,e=function(r){return"hd"+r+"_"+ ++k},A=(i=function(r){return"hd"+r})("Symbol.iterator"),f=i("Symbol.dispose"),n=i("Symbol.asyncDispose"),e.for=i,e.iterator=A,e.dispose=f,e.asyncDispose=n);var R=s;function C(r){return Boolean(r&&void 0!==r.length)}function p(){}function m(r){if(!Q(this,m))throw new w("Promises must be constructed via new");if("function"!=typeof r)throw new w("not a function");this.Ra=0,this.tki=!1,this.RTt=void 0,this.iki=[],F(r,this)}function G(r,e){for(;3===r.Ra;)r=r.RTt;0!==r.Ra?(r.tki=!0,m.nki(function(){var i=1===r.Ra?e.onFulfilled:e.onRejected;if(null!==i){var A;try{A=i(r.RTt)}catch(r){return void W(e.promise,r)}Y(e.promise,A)}else(1===r.Ra?Y:W)(e.promise,r.RTt)})):r.iki.push(e)}function Y(r,e){try{if(e===r)throw new w("A promise cannot be resolved with itself.");if(e&&("object"===(void 0===e?"undefined":N(e))||"function"==typeof e)){var i=e.then;if(Q(e,m))return r.Ra=3,r.RTt=e,void D(r);if("function"==typeof i)return void F(function(r,e){return function(){r.apply(e,arguments)}}(i,e),r)}r.Ra=1,r.RTt=e,D(r)}catch(e){W(r,e)}}function W(r,e){r.Ra=2,r.RTt=e,D(r)}function D(r){2===r.Ra&&0===r.iki.length&&m.nki(function(){r.tki||m.rki(r.RTt)});for(var e=0,i=r.iki.length;er.length)&&(e=r.length);for(var i=0,A=new Array(e);i=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new w("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}T&&!(Z&&L<60||V&&X<15)?$=T:($=m,fr=null!==(q=function(){var r=self.queueMicrotask;if("function"==typeof r)return function(e){return r(e)};var e=T;if(e&&"function"==typeof e.resolve){var i=e.resolve();return function(r){return i.then(r)}}}())&&void 0!==q?q:m.nki,rr=fr,er=new J(16),ir=!1,(nr={W6:function(r){er.push(r),ir||(ir=!0,rr(Ar))},EQ:Ar=function(){for(;er.length()>0;)er.shift()();ir=!1}}).EQ,m.nki=nr.W6,m.rki=function(r){try{var e=ar(r);if(!self.dispatchEvent(e)||e.defaultPrevented)return}catch(r){}s(function(){throw new d("Unhandled promise rejection: ".concat(r))},0)});var sr=function(r){return r.Sv="web",r.Tv="android",r.Ev="android-tv",r.xv="ios",r.Pv="tvos",r.Iv="chromecast",r.Cv="theoliveweb",r}({});var lr=c?c.userAgent:"",hr=lr.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),vr=lr.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),dr=lr.match(/Android ([0-9\.]+)/i),wr=lr.match(/Windows NT ([0-9\.]+)/i),gr=lr.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),yr=lr.match(/Firefox\/([0-9\.]+)/i),Br=lr.match(/OPR\/(\d+\.\d+)/i),Er=lr.match(/Tizen ([0-9\.]+)/i),_r=lr.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Ir=lr.match(/HbbTV\/([0-9.]+)/i),Qr=lr.match(/(AFT.*) Build/i),Nr=function(){function r(){this.Rv=Boolean("ontouchstart"in self||self.DocumentTouch&&Q(o,self.DocumentTouch)||c&&c.msMaxTouchPoints),this.Nv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(lr)||/(macintosh|mac(?=_powerpc)\s)/i.test(lr),this.Mv=/Windows NT/i.test(lr),this.Ov=wr?E(wr[1]):0,this.Uv=/Android/i.test(lr),this.Hv=dr?E(dr[1]):0,this.qv=/windows phone (8|8\.1)/i.test(lr),this.Gv=/iPhone/i.test(lr),this.Qv=/iPad/i.test(lr),this.Yv=this.Nv&&this.Rv&&!this.Qv,this.Zv=/iPod/i.test(lr),this.r_=/Mobile Safari/i.test(lr),this.s_=/EOS\d*STB/i.test(lr),this.n_=/APP\d*STB/i.test(lr),this.$v=(this.Gv||this.Qv||this.Yv||this.Zv)&&!this.qv,this.i_=_r?E(_r[2]):0,this.h_=this.qv||this.$v||this.Uv||this.r_,this.a_=/CriOS/i.test(lr),this.c_=Boolean(self.chrome&&/google/i.test(c.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(c.userAgent),this.p_=vr?B(vr[1],10):0,this.Ng=Boolean(/CriOS/i.test(lr)),this.Dg=Boolean(self.chrome||/Chrome/i.test(lr)||this.Ng),this.f_=hr?B(hr[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(lr),this.A_=Er?E(Er[1]):0,this.l_=this.A_>0?function(r){return r>=8?108:r>=7?94:r>=6.5?85:r>=6?76:r>=5.5?69:r>=5?63:r>=4?56:r>=3?47:0}(this.A_):void 0,this.T_=/webos|web0s/i.test(lr),this.E_=/HbbTV/i.test(lr),this.P_=!!Ir&&function(r){if(!r)return!1;var e=r.split(".").map(Number);return 3===e.length&&1===e[0]&&2===e[1]}(Ir[1]),this.C_=/AFT.* Build/i.test(lr),this.R_=Qr?Qr[1]:void 0,this.N_=/VIZIO/i.test(lr),this.M_=/Edge\/\d+/i.test(lr),this.O_=/Trident/i.test(lr),this.U_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.H_=/Vivaldi/i.test(lr),this.q_=/Firefox/i.test(lr)&&!/Seamonkey/i.test(lr),this.G_=yr?E(yr[1]):0,this.j_=/Safari/i.test(lr)&&!/Chrome/i.test(lr)&&!this.qv&&!this.y_,this.K_=gr?E(gr[2]):0,this.J_=Boolean(Br),this.eg=Br?E(Br[1]):0,this.hg=/CrKey/.test(lr),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(lr),this.fg=/PlayStation 4/i.test(lr),this._g=/PlayStation 5/i.test(lr),this.pg="web"===sr.Ev,this.yg="web"===sr.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===sr.xv,this.Pg="web"===sr.Pv,this.Cg="web"===sr.Iv}return ur(r,[{key:"Ke",get:function(){return this.Rv}},{key:"Dv",get:function(){return this.Nv}},{key:"Bv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Ov}},{key:"Fv",get:function(){return this.Uv}},{key:"Vv",get:function(){return this.Hv}},{key:"Wv",get:function(){return this.qv}},{key:"zv",get:function(){return this.Gv}},{key:"Xv",get:function(){return this.Qv}},{key:"Kv",get:function(){return this.Yv}},{key:"Jv",get:function(){return this.Zv}},{key:"ru",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"e_",get:function(){return this.s_||this.n_}},{key:"vd",get:function(){return this.r_}},{key:"Ks",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"d_",get:function(){var r;return null!=(r=this.l_)?r:this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){var r;return(null==(r=u.chrome)?void 0:r.webview)&&this.p_>0}},{key:"m_",get:function(){return this.p_}},{key:"w_",get:function(){return this.y_}},{key:"b_",get:function(){return this.A_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"x_",get:function(){return this.P_}},{key:"I_",get:function(){return this.C_}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.R_}},{key:"D_",get:function(){return this.N_}},{key:"B_",get:function(){return this.M_}},{key:"L_",get:function(){return this.O_}},{key:"F_",get:function(){return this.U_}},{key:"V_",get:function(){return this.H_}},{key:"W_",get:function(){return this.q_}},{key:"z_",get:function(){return this.G_}},{key:"X_",get:function(){return this.j_}},{key:"Q_",get:function(){return 0===this.K_&&Rr.ru?this.i_:this.K_}},{key:"Y_",get:function(){return this.J_}},{key:"Z_",get:function(){return this.eg}},{key:"rg",get:function(){return this.hg}},{key:"og",get:function(){return this.ag}},{key:"cg",get:function(){return!(!this.S_&&!this.w_)&&this.d_<=56}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"xg",get:function(){return this.Pg}},{key:"Ig",get:function(){return this.Cg}},{key:"Rg",get:function(){return this.Dg}},{key:"IS_IOS_CHROME",get:function(){return this.Ng}}]),r}();Nr.Bg=new Nr;var Rr=Nr.Bg,Cr={}.toString;function pr(r){return null!=r}Array.isArray;function mr(r){return"object"===(void 0===r?"undefined":N(r))&&null!==r}function Gr(r){return function(r){return"function"==typeof r}(r)||mr(r)}var Yr=function(){};function Wr(r){var e;return function(){return void 0!==r&&(e=r(),r=void 0),e}}function Dr(r,e,i,A,f,n,a){try{var t=r[n](a),b=t.value}catch(r){return void i(r)}t.done?e(b):$.resolve(b).then(A,f)}function Sr(r,i){var f,n,a,t={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},b=g.create(("function"==typeof Iterator?Iterator:g).prototype);return b.next=k(0),b.throw=k(1),b.return=k(2),"function"==typeof e&&(b[A]=function(){return this}),b;function k(e){return function(A){return function(e){if(f)throw new w("Generator is already executing.");for(;b&&(b=0,e[0]&&(t=0)),t;)try{if(f=1,n&&(a=2&e[0]?n.return:e[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,e[1])).done)return a;switch(n=0,a&&(e=[2&e[0],a.value]),e[0]){case 0:case 1:a=e;break;case 4:return t.label++,{value:e[1],done:!1};case 5:t.label++,n=e[1],e=[0];continue;case 7:e=t.ops.pop(),t.trys.pop();continue;default:if(!(a=t.trys,(a=a.length>0&&a[a.length-1])||6!==e[0]&&2!==e[0])){t=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]=0;i-=1){if(e(r[i],i,r))return i}return-1};Array.prototype.at;function Mr(r,e){var i=r.indexOf(e);return-1!==i&&(function(r,e){0===e?r.shift():r.splice(e,1)}(r,i),!0)}function Or(r){r.length=0}Array.prototype.flat,Array.prototype.flatMap;var Zr=function(){function r(){this.Hg=!1,this.Wg=!1,this.qg=[],this.Gg=[]}var e=r.prototype;return e.Vg=function(){if(!this.Hg&&!this.Wg){this.Hg=!0;for(var r,e=cr(this.qg.slice());!(r=e()).done;){(0,r.value)()}this.zg()}},e.zg=function(){if(!this.Wg){this.Wg=!0;for(var r,e=cr(this.Gg.slice());!(r=e()).done;){(0,r.value)()}Or(this.qg),Or(this.Gg)}},e.Xg=function(r){this.Wg||this.qg.push(r)},e.jg=function(r){this.Wg||Mr(this.qg,r)},e.Qg=function(r){this.Wg||this.Gg.push(r)},e.Kg=function(r){this.Wg||Mr(this.Gg,r)},r}(),Lr=function(){function r(){this.Jg=new Zr}var e=r.prototype;return e.Zg=function(){this.Jg.Vg()},e.zg=function(){this.Jg.zg()},e.$g=function(r){var e=this.Jg;if(!e.Hg)if(r.Hg)e.Vg();else if(!e.Wg&&!r.Wg){var i=function(){A(),e.Vg()},A=function(){r.jg(i),r.Kg(A),e.jg(i),e.Kg(A)};r.Xg(i),r.Qg(A),e.Xg(i),e.Qg(A)}},e.tp=function(){var e=new r,i=new r,A=e.Yg,f=i.Yg,n=this.Jg,a=function(){A.Hg&&f.Wg||f.Hg&&A.Wg?n.Vg():A.Wg&&f.Wg&&n.zg()};A.Xg(a),f.Xg(a),A.Qg(a),f.Qg(a),e.$g(n),i.$g(n);return n.Qg(function(){A.jg(a),f.jg(a),A.Kg(a),f.Kg(a)}),[e,i]},e[f]=function(){this.Zg()},r.ep=function(e){for(var i,A=new r,f=cr(e);!(i=f()).done;){var n=i.value;void 0!==n&&A.$g(n)}return A},ur(r,[{key:"Yg",get:function(){return this.Jg}}]),r}(),Ur=function(){for(var r=arguments.length,e=new Array(r),i=0;i>>=0)&&r<256)&&(A=Kr[r])?A:(i=re(r,0,!0),f&&(Kr[r]=i),i):(f=-128<=(r|=0)&&r<128)&&(A=Pr[r])?A:(i=re(r,r<0?-1:0,!1),f&&(Pr[r]=i),i)}function $r(r,e){if(_(r))return e?ke:be;if(e){if(r<0)return ke;if(r>=ne)return le}else{if(r<=-ae)return he;if(r+1>=ae)return se}return r<0?$r(-r,e).neg():re(r%fe|0,r/fe|0,e)}function re(r,e,i){return new Hr(r,e,i)}Hr.fromInt=qr,Hr.fromNumber=$r,Hr.fromBits=re;var ee=y.pow;function ie(r,e,i){if(0===r.length)throw d("empty string");if("number"==typeof e?(i=e,e=!1):e=!!e,"NaN"===r||"Infinity"===r||"+Infinity"===r||"-Infinity"===r)return e?ke:be;if((i=i||10)<2||360)throw d("interior hyphen");if(0===A)return ie(r.substring(1),e,i).neg();for(var f=$r(ee(i,8)),n=be,a=0;a>>0:this.low},ve.toNumber=function(){return this.unsigned?(this.high>>>0)*fe+(this.low>>>0):this.high*fe+(this.low>>>0)},ve.toString=function(r){if((r=r||10)<2||36>>0).toString(r);if((n=t).isZero())return b+a;for(;b.length<6;)b="0"+b;a=""+b+a}},ve.getHighBits=function(){return this.high},ve.getHighBitsUnsigned=function(){return this.high>>>0},ve.getLowBits=function(){return this.low},ve.getLowBitsUnsigned=function(){return this.low>>>0},ve.getNumBitsAbs=function(){if(this.isNegative())return this.eq(he)?64:this.neg().getNumBitsAbs();for(var r=0!=this.high?this.high:this.low,e=31;e>0&&!(r&1<>21;return!r||!this.unsigned&&(-1===r&&!(0===this.low&&-2097152===this.high))},ve.isZero=function(){return 0===this.high&&0===this.low},ve.eqz=ve.isZero,ve.isNegative=function(){return!this.unsigned&&this.high<0},ve.isPositive=function(){return this.unsigned||this.high>=0},ve.isOdd=function(){return!(1&~this.low)},ve.isEven=function(){return!(1&this.low)},ve.equals=function(r){return jr(r)||(r=Ae(r)),(this.unsigned===r.unsigned||this.high>>>31!=1||r.high>>>31!=1)&&(this.high===r.high&&this.low===r.low)},ve.eq=ve.equals,ve.notEquals=function(r){return!this.eq(r)},ve.neq=ve.notEquals,ve.ne=ve.notEquals,ve.lessThan=function(r){return this.comp(r)<0},ve.lt=ve.lessThan,ve.lessThanOrEqual=function(r){return this.comp(r)<=0},ve.lte=ve.lessThanOrEqual,ve.le=ve.lessThanOrEqual,ve.greaterThan=function(r){return this.comp(r)>0},ve.gt=ve.greaterThan,ve.greaterThanOrEqual=function(r){return this.comp(r)>=0},ve.gte=ve.greaterThanOrEqual,ve.ge=ve.greaterThanOrEqual,ve.compare=function(r){if(jr(r)||(r=Ae(r)),this.eq(r))return 0;var e=this.isNegative(),i=r.isNegative();return e&&!i?-1:!e&&i?1:this.unsigned?r.high>>>0>this.high>>>0||r.high===this.high&&r.low>>>0>this.low>>>0?-1:1:this.sub(r).isNegative()?-1:1},ve.comp=ve.compare,ve.negate=function(){return!this.unsigned&&this.eq(he)?he:this.not().add(ue)},ve.neg=ve.negate,ve.add=function(r){jr(r)||(r=Ae(r));var e=this.high>>>16,i=65535&this.high,A=this.low>>>16,f=65535&this.low,n=r.high>>>16,a=65535&r.high,t=r.low>>>16,b=0,k=0,u=0,o=0;return u+=(o+=f+(65535&r.low))>>>16,k+=(u+=A+t)>>>16,b+=(k+=i+a)>>>16,b+=e+n,re((u&=65535)<<16|(o&=65535),(b&=65535)<<16|(k&=65535),this.unsigned)},ve.subtract=function(r){return jr(r)||(r=Ae(r)),this.add(r.neg())},ve.sub=ve.subtract,ve.multiply=function(r){if(this.isZero())return this;if(jr(r)||(r=Ae(r)),xr)return re(xr.mul(this.low,this.high,r.low,r.high),xr.get_high(),this.unsigned);if(r.isZero())return this.unsigned?ke:be;if(this.eq(he))return r.isOdd()?he:be;if(r.eq(he))return this.isOdd()?he:be;if(this.isNegative())return r.isNegative()?this.neg().mul(r.neg()):this.neg().mul(r).neg();if(r.isNegative())return this.mul(r.neg()).neg();if(this.lt(te)&&r.lt(te))return $r(this.toNumber()*r.toNumber(),this.unsigned);var e=this.high>>>16,i=65535&this.high,A=this.low>>>16,f=65535&this.low,n=r.high>>>16,a=65535&r.high,t=r.low>>>16,b=65535&r.low,k=0,u=0,o=0,c=0;return o+=(c+=f*b)>>>16,u+=(o+=A*b)>>>16,o&=65535,u+=(o+=f*t)>>>16,k+=(u+=i*b)>>>16,u&=65535,k+=(u+=A*t)>>>16,u&=65535,k+=(u+=f*a)>>>16,k+=e*b+i*t+A*a+f*n,re((o&=65535)<<16|(c&=65535),(k&=65535)<<16|(u&=65535),this.unsigned)},ve.mul=ve.multiply,ve.divide=function(r){if(jr(r)||(r=Ae(r)),r.isZero())throw d("division by zero");var e,i,A;if(xr)return this.unsigned||-2147483648!==this.high||-1!==r.low||-1!==r.high?re((this.unsigned?xr.div_u:xr.div_s)(this.low,this.high,r.low,r.high),xr.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?ke:be;if(this.unsigned){if(r.unsigned||(r=r.toUnsigned()),r.gt(this))return ke;if(r.gt(this.shru(1)))return oe;A=ke}else{if(this.eq(he))return r.eq(ue)||r.eq(ce)?he:r.eq(he)?ue:(e=this.shr(1).div(r).shl(1)).eq(be)?r.isNegative()?ue:ce:(i=this.sub(r.mul(e)),A=e.add(i.div(r)));if(r.eq(he))return this.unsigned?ke:be;if(this.isNegative())return r.isNegative()?this.neg().div(r.neg()):this.neg().div(r).neg();if(r.isNegative())return this.div(r.neg()).neg();A=be}for(i=this;i.gte(r);){e=y.max(1,y.floor(i.toNumber()/r.toNumber()));for(var f=y.ceil(y.log(e)/y.LN2),n=f<=48?1:ee(2,f-48),a=$r(e),t=a.mul(r);t.isNegative()||t.gt(i);)t=(a=$r(e-=n,this.unsigned)).mul(r);a.isZero()&&(a=ue),A=A.add(a),i=i.sub(t)}return A},ve.div=ve.divide,ve.modulo=function(r){return jr(r)||(r=Ae(r)),xr?re((this.unsigned?xr.rem_u:xr.rem_s)(this.low,this.high,r.low,r.high),xr.get_high(),this.unsigned):this.sub(this.div(r).mul(r))},ve.mod=ve.modulo,ve.rem=ve.modulo,ve.not=function(){return re(~this.low,~this.high,this.unsigned)},ve.countLeadingZeros=function(){return this.high?y.clz32(this.high):y.clz32(this.low)+32},ve.clz=ve.countLeadingZeros,ve.countTrailingZeros=function(){return this.low?zr(this.low):zr(this.high)+32},ve.ctz=ve.countTrailingZeros,ve.and=function(r){return jr(r)||(r=Ae(r)),re(this.low&r.low,this.high&r.high,this.unsigned)},ve.or=function(r){return jr(r)||(r=Ae(r)),re(this.low|r.low,this.high|r.high,this.unsigned)},ve.xor=function(r){return jr(r)||(r=Ae(r)),re(this.low^r.low,this.high^r.high,this.unsigned)},ve.shiftLeft=function(r){return jr(r)&&(r=r.toInt()),0==(r&=63)?this:r<32?re(this.low<>>32-r,this.unsigned):re(0,this.low<>>r|this.high<<32-r,this.high>>r,this.unsigned):re(this.high>>r-32,this.high>=0?0:-1,this.unsigned)},ve.shr=ve.shiftRight,ve.shiftRightUnsigned=function(r){return jr(r)&&(r=r.toInt()),0==(r&=63)?this:r<32?re(this.low>>>r|this.high<<32-r,this.high>>>r,this.unsigned):re(32===r?this.high:this.high>>>r-32,0,this.unsigned)},ve.shru=ve.shiftRightUnsigned,ve.shr_u=ve.shiftRightUnsigned,ve.rotateLeft=function(r){var e;return jr(r)&&(r=r.toInt()),0==(r&=63)?this:32===r?re(this.high,this.low,this.unsigned):r<32?(e=32-r,re(this.low<>>e,this.high<>>e,this.unsigned)):(e=32-(r-=32),re(this.high<>>e,this.low<>>e,this.unsigned))},ve.rotl=ve.rotateLeft,ve.rotateRight=function(r){var e;return jr(r)&&(r=r.toInt()),0==(r&=63)?this:32===r?re(this.high,this.low,this.unsigned):r<32?(e=32-r,re(this.high<>>r,this.low<>>r,this.unsigned)):(e=32-(r-=32),re(this.low<>>r,this.high<>>r,this.unsigned))},ve.rotr=ve.rotateRight,ve.toSigned=function(){return this.unsigned?re(this.low,this.high,!1):this},ve.toUnsigned=function(){return this.unsigned?this:re(this.low,this.high,!0)},ve.toBytes=function(r){return r?this.toBytesLE():this.toBytesBE()},ve.toBytesLE=function(){var r=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&r,r>>>8&255,r>>>16&255,r>>>24]},ve.toBytesBE=function(){var r=this.high,e=this.low;return[r>>>24,r>>>16&255,r>>>8&255,255&r,e>>>24,e>>>16&255,e>>>8&255,255&e]},Hr.fromBytes=function(r,e,i){return i?Hr.fromBytesLE(r,e):Hr.fromBytesBE(r,e)},Hr.fromBytesLE=function(r,e){return new Hr(r[0]|r[1]<<8|r[2]<<16|r[3]<<24,r[4]|r[5]<<8|r[6]<<16|r[7]<<24,e)},Hr.fromBytesBE=function(r,e){return new Hr(r[4]<<24|r[5]<<16|r[6]<<8|r[7],r[0]<<24|r[1]<<16|r[2]<<8|r[3],e)},"function"==typeof BigInt&&(Hr.fromBigInt=function(r,e){return re(Number(BigInt.asIntN(32,r)),Number(BigInt.asIntN(32,r>>BigInt(32))),e)},Hr.fromValue=function(r,e){return"bigint"===(void 0===r?"undefined":N(r))?Hr.fromBigInt(r,e):Ae(r,e)},ve.toBigInt=function(){var r=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<=2*we},ur(r,[{key:"rp",get:function(){return void 0===this.hp&&(this.hp=this.op()),this.hp}},{key:"ap",get:function(){return Rr.Fv?"android":Rr.Dv?"macos":Rr.ru?"ios":Rr.Bv?"windows":"other"}},{key:"cp",get:function(){return Rr.og?"tv":Rr.Ks?"mobile":"desktop"}},{key:"dp",get:function(){return!Rr.og}},{key:"lp",get:function(){if(u.screen)return{width:u.screen.width*this.fp,height:u.screen.height*this.fp}}},{key:"fp",get:function(){return u.devicePixelRatio||1}},{key:"vp",get:function(){return Be}},{key:"_p",get:function(){return!1}},{key:"gp",get:function(){return!0}},{key:"pp",get:function(){return!!(Rr.X_||Rr.ru||Rr.g_)||!!Rr.D_}},{key:"mp",get:function(){return Rr.D_}},{key:"wp",get:function(){return!Rr.ru}},{key:"yp",get:function(){return!0}},{key:"bp",get:function(){return!0}},{key:"Ap",get:function(){return!1}},{key:"Sp",get:function(){}},{key:"Tp",get:function(){return!0}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){return Rr.D_}},{key:"xp",get:function(){return!1}},{key:"Cp",get:function(){return!1}},{key:"Rp",get:function(){return!1}},{key:"Dp",get:function(){return!0}}]),r}(),_e=function(r){function e(){return r.call(this)||this}return br(e,r),e}(Ee),Ie=function(r){function e(){return r.apply(this,arguments)||this}return br(e,r),e.prototype.Pp=function(r,e){if(r&&r.Bp&&e&&e.Bp){var i=Qe(r.Bp,"mp4a.40.2")&&Qe(e.Bp,"mp4a.40.5"),A=Qe(r.Bp,"mp4a.40.5")&&Qe(e.Bp,"mp4a.40.2"),f=Qe(r.Bp,"mp4a.40.2")&&Qe(e.Bp,"mp4a.40.34"),n=Qe(r.Bp,"mp4a.40.34")&&Qe(e.Bp,"mp4a.40.2"),a=Qe(r.Bp,"mp4a.40.5")&&Qe(e.Bp,"mp4a.40.34"),t=Qe(r.Bp,"mp4a.40.34")&&Qe(e.Bp,"mp4a.40.5");return!(i||A||f||n||a||t)}return!0},ur(e,[{key:"Sp",get:function(){if(Rr.Dv)return 4096}}]),e}(_e);function Qe(r,e){return r.indexOf(e)>-1}var Ne,Re=function(r){function e(){return r.apply(this,arguments)||this}return br(e,r),e.prototype.Ip=function(r){return r>=2},e}(_e),Ce=function(r){function e(){var e;return(e=r.call(this)||this).Np=Rr.Q_>=11,e.sp=Rr.X_&&!(Rr.ru&&Rr.Q_<10),e}return br(e,r),ur(e,[{key:"xp",get:function(){return Rr.Q_<17}},{key:"Cp",get:function(){return!0}}]),e}(_e),pe=function(r){function e(){return r.apply(this,arguments)||this}return br(e,r),ur(e,[{key:"Tp",get:function(){return!(Rr.d_>=133)}}]),e}(_e);var me=function(){var r=Xr();if(!r)return!1;var e=r.muted;return r.muted=!e,r.muted!==e}();!function(){if(Rr.Kv)return!1;var r=Xr();if(!r)return!1;var e=r.volume;r.volume=e/2+.1,r.volume}();var Ge=function(r){function e(e){var i;return(i=r.call(this)||this).Mp=void 0,i.Mp=e,i.Np=i.Mp.Np,i.Ke=i.Mp.Ke,i.sp=me&&i.Mp.sp,i}br(e,r);var i=e.prototype;return i.op=function(){return this.Mp.rp},i.Pp=function(r,e){return this.Mp.Pp(r,e)},i.Ip=function(r){return this.Mp.Ip(r)},ur(e,[{key:"Sp",get:function(){return this.Mp.Sp}},{key:"Tp",get:function(){return this.Mp.Tp}},{key:"xp",get:function(){return this.Mp.xp}}]),e}(Ee),Ye=function(r){function e(e){var i;return(i=r.call(this,e)||this).Np=!0,i.Ks=!0,i}return br(e,r),ur(e,[{key:"Ap",get:function(){return Rr.ru}}]),e}(Ge);var We=function(r){function e(){return r.apply(this,arguments)||this}return br(e,r),e.prototype.op=function(){return function(r){return r&&Gr(u.ManagedMediaSource)?u.ManagedMediaSource:Gr(u.MediaSource)?u.MediaSource:void 0}(!0)?r.prototype.op.call(this):1},ur(e,[{key:"Ap",get:function(){return!0}}]),e}(Ye),De=function(r){function e(){var e;return(e=r.apply(this,arguments)||this).Up=void 0,e}return br(e,r),e.prototype.Pp=function(e,i){return r.prototype.Pp.call(this,e,i)},ur(e,[{key:"_p",get:function(){return Rr.b_<3}},{key:"gp",get:function(){return Rr.b_>=3}},{key:"lp",get:function(){var r=this;return u.tizen&&!this.Up&&u.tizen.systeminfo.getPropertyValue("DISPLAY",function(e){var i=e.resolutionWidth,A=e.resolutionHeight;1===i&&1===A||(r.Up={width:i,height:A})}),this.Up}},{key:"kp",get:function(){return Rr.b_<3}}]),e}(Ge),Se=function(r){function e(){var e;return(e=r.apply(this,arguments)||this).Up=void 0,e}return br(e,r),ur(e,[{key:"lp",get:function(){var r=this;return u.webOS&&!this.Up&&u.webOS.deviceInfo(function(e){r.Up={width:e.screenWidth,height:e.screenHeight}}),this.Up}},{key:"yp",get:function(){return!1}}]),e}(Ge),Fe=function(r){function e(){return r.apply(this,arguments)||this}return br(e,r),ur(e,[{key:"Ap",get:function(){return!0}},{key:"Cp",get:function(){return this.Mp.Cp}}]),e}(Ge),Te=function(r){function e(){return r.apply(this,arguments)||this}return br(e,r),ur(e,[{key:"Rp",get:function(){return Rr.IS_FIRETV_AFTMM}}]),e}(Ge);!function(r){Ne=r}(function(){var r=function(){if(Rr.W_)return new Ie;if(Rr.B_||Rr.L_)return new Re;if(Rr.X_)return new Ce;if(Rr.Rg)return new pe;return new _e}();return Rr.ru?new We(r):Rr.I_?new Te(r):Rr.Ks?new Ye(r):Rr.w_?new De(r):Rr.S_?new Se(r):Rr.Dv?new Fe(r):new Ge(r)}());var Me=!(Rr.L_&&!Rr.F_),Oe=self.console;function Ze(r){if(mr(r))try{return JSON.stringify(r)}catch(r){}return r}function Le(r){return r.map(Ze).join(" ")}function Ue(r){var e=Oe&&Oe[r];return e?e.bind&&Me?e.bind(Oe):function(){for(var e=arguments.length,i=new Array(e),A=0;A1?e-1:0),A=1;A1?e-1:0),A=1;Ak&&(n=k),a>k&&(a=k),t=f,b=n;;)if(t=65&&r<=90}function ki(r){return bi(r)||function(r){return r>=97&&r<=122}(r)}function ui(r){return r>=48&&r<=57}function oi(r){return ui(r)||ki(r)}function ci(r){return ui(r)||r>=65&&r<=70||r>=97&&r<=102}function si(r){return bi(r)?r+32:r}function li(r){return ui(r)?r-48:r>=65&&r<=70?r-65+10:r>=97&&r<=102?r-97+10:-1}function hi(r,e){return void 0===e&&(e=!1),0<=r&&r<=9?r+48:10<=r&&r<=15?r+(e?87:55):-1}var vi=y.min,di=String.fromCharCode;function wi(r){for(var e=r.length,i=[],A=0;A= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_i=y.floor,Ii=String.fromCharCode;function Qi(r){throw new RangeError(Ei[r])}function Ni(r){for(var e=[],i=0,A=r.length;i=55296&&f<=56319&&i>1,r+=_i(r/e);r>455;A+=36)r=_i(r/35);return _i(A+36*r/(r+38))},Yi=function(r){return function(r,e){var i=r.split("@"),A="";i.length>1&&(A=i[0]+"@",r=i[1]);var f=function(r,e){for(var i=[],A=r.length;A--;)i[A]=e(r[A]);return i}((r=r.replace(Bi,".")).split("."),e).join(".");return A+f}(r,function(r){return yi.test(r)?"xn--"+function(r){for(var e=[],i=(r=Ni(r)).length,A=128,f=0,n=72,a=0,t=r;a=A&&l_i((gi-f)/h)&&Qi("overflow"),f+=(o-A)*h,A=o;for(var v=0,d=r;vgi&&Qi("overflow"),w==A){for(var g=f,y=36;;y+=36){var B=y<=n?1:y>=n+26?26:y-n;if(g65535&&(A-=65536,e.push(A>>>10&1023|55296),A=56320|1023&A),e.push(A)}return wi(e)}function Di(r){if(r>=55296&&r<=57343)throw new d("Lone surrogate U+"+r.toString(16).toUpperCase()+" is not a scalar value")}function Si(r,e){return r>>e&63|128}function Fi(r,e){4294967168&r?(4294965248&r?4294901760&r?4292870144&r||(e.push(r>>18&7|240),e.push(Si(r,12)),e.push(Si(r,6))):(Di(r),e.push(r>>12&15|224),e.push(Si(r,6))):e.push(r>>6&31|192),e.push(63&r|128)):e.push(r)}function Ti(r){for(var e=[],i=0;i=Ci)throw new d("Invalid byte index");var r=255&Ri[pi];if(pi++,128==(192&r))return 63&r;throw new d("Invalid continuation byte")}function Oi(){var r,e;if(pi>Ci)throw new d("Invalid byte index");if(pi===Ci)return!1;if(r=255&Ri[pi],pi++,!(128&r))return r;if(192==(224&r)){if((e=(31&r)<<6|Mi())>=128)return e;throw new d("Invalid continuation byte")}if(224==(240&r)){if((e=(15&r)<<12|Mi()<<6|Mi())>=2048)return Di(e),e;throw new d("Invalid continuation byte")}if(240==(248&r)&&(e=(7&r)<<18|Mi()<<12|Mi()<<6|Mi())>=65536&&e<=1114111)return e;throw new d("Invalid UTF-8 detected")}function Zi(r){return[37,hi(r>>4),hi(15&r)]}function Li(r){return function(r){return r>=0&&r<=31}(r)||r>126}function Ui(r){return Li(r)||32===r||34===r||60===r||62===r||96===r}function Vi(r){return Ui(r)||35===r||63===r||123===r||125===r}function Xi(r){return Vi(r)||47===r||58===r||59===r||61===r||64===r||r>=91&&r<=94||124===r}function Ji(r){return r<33||r>126||34===r||35===r||60===r||62===r}function xi(r){return Ji(r)||39===r}function Hi(r,e){if(!e(r))return[r];for(var i=Ti([r]),A=[],f=0;f6)throw new w;for(var b=0;n0){if(!("."===r[n]&&b<4))throw new w;n+=1}if(!Ke.test(r[n]))throw new w;for(;n255)throw new w}n+=1}i[A]=i[A]<<8|k,2!==(b+=1)&&4!==b||(A+=1)}if(4!==b)throw new w;break}if(":"===r[n]){if((n+=1)===e)throw new w}else if(n0;)ti(i,A,f+o-1),A-=1,o-=1}else if(8!==A)throw new w;return i}function qi(r){var e=10,i=ri;return $e.test(r)?(r=r.slice(2),e=16,i=ei):r.length>=2&&"0"===r[0]&&(r=r.slice(1),e=8,i=ii),""===r?0:i.test(r)?B(r,e):void 0}var $i={Vp:4},rA=/[\0\t\n\r #%/:?@\[\\\]]/,eA=/[\0\t\n\r #/:?@\[\\\]]/;function iA(r,e){if("["===r[0]){if("]"!==r[r.length-1])throw new w("Invalid IPv6 address");return{Vp:2,Hp:Ki(r.slice(1,-1))}}if(!e)return function(r){if(eA.test(r))throw new w("Invalid code point in opaque host");var e=ji(r,Li);return""===e?$i:{Vp:3,Wp:e}}(r);var i=function(r){var e=function(r){return Yi(r.toLowerCase())}(r);return e}(Pi(r));if(rA.test(i))throw new w("Invalid code point in host");var A=function(r){var e=r.split(".");if(""===e[e.length-1]&&e.pop(),!(e.length>4)){for(var i=[],A=0;A255)throw new w;if(i[i.length-1]>=y.pow(256,5-i.length))throw new w;for(var t=i.pop(),b=0;b>>=8;return e.reverse().join("")}(r.Hp);case 2:return"["+function(r){for(var e="",i=function(r){for(var e=0,i=0,A=0,f=0,n=0;n<8;n++)0===r[n]?(0===f&&(A=n),f++):(f>i&&(e=A,i=f),f=0);return f>i&&(e=A,i=f),i>1?e:null}(r),A=!1,f=0;f<8;f++){if(A){if(0===r[f])continue;A=!1}i!==f?(e+=r[f].toString(16),7!==f&&(e+=":")):(e+=0===f?"::":":",A=!0)}return e}(r.Hp)+"]";case 3:return r.Wp;case 4:return""}}var fA=/\+/g;function nA(r){return 42===r||45===r||46===r||95===r||oi(r)}function aA(r){for(var e=r.split("&"),i=[],A=0;A0&&(e+="&"),e+=bA(Ti(Ni(A[0])))+"="+bA(Ti(Ni(A[1])))}return e}function bA(r){for(var e=[],i=0;i0&&"?"===r[0]&&(r=r.slice(1)),this.zp=aA(r)}var e=r.prototype;return e.append=function(r,e){r=uA(r),e=uA(e),this.zp.push([r,e]),dA(this)},e.delete=function(r){r=uA(r);for(var e=this.zp,i=0;i=2))return!1;if(!SA(r.slice(0,2)))return!1;if(2!==e){var i=r[2];if(47!==i&&92!==i&&63!==i&&35!==i)return!1}return!0}function DA(r){return 2===r.length&&Pe.test(r[0])&&(":"===r[1]||"|"===r[1])}function SA(r){return 2===r.length&&DA(wi(r))}function FA(r){return DA(r)&&":"===r[1]}function TA(r){var e=r.Jp;0!==e.length&&("file"===r.Qp&&1===e.length&&FA(e[0])||e.pop())}function MA(r){return null===r.Zp||$i===r.Zp||r.$p||"file"===r.Qp}var OA=-1,ZA=/\t|\n|\r/g,LA=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function UA(r,e,i,A){void 0===i&&(i=null),void 0===A&&(A=null),i||(i=new XA,r=r.replace(LA,""));var f=null!==A?A:0;e=e||null;for(var n=[],a=!1,t=!1,b=!1,k=Ni(r=r.replace(ZA,"")),u=k.length,o=0;o<=u;){var c=o65535)throw new w("Invalid port");i.im=y===QA[i.Qp]?null:y,n.length=0}if(null!==A)return;f=16,o-=1}break;case 13:i.Qp="file",47===c||92===c?f=14:e&&"file"===e.Qp?OA===c?(i.Zp=e.Zp,i.Jp=e.Jp.slice(),i.Gp=e.Gp):63===c?(i.Zp=e.Zp,i.Jp=e.Jp.slice(),i.Gp="",f=19):35===c?(i.Zp=e.Zp,i.Jp=e.Jp.slice(),i.Gp=e.Gp,i.nm="",f=20):(WA(k.slice(o))||(i.Zp=e.Zp,i.Jp=e.Jp.slice(),TA(i)),f=17,o-=1):(f=17,o-=1);break;case 14:47===c||92===c?f=15:(e&&"file"===e.Qp&&!WA(k.slice(o))&&(FA(e.Jp[0])?i.Jp.push(e.Jp[0]):i.Zp=e.Zp),f=17,o-=1);break;case 15:if(OA===c||47===c||92===c||63===c||35===c)if(o-=1,null===A&&SA(n))f=17;else if(0===n.length){if(i.Zp=$i,null!==A)return;f=16}else{var E=iA(Wi(n),GA(i));if(0===E.Vp&&"localhost"===E.qp&&(E=$i),i.Zp=E,null!==A)return;n.length=0,f=16}else n.push(c);break;case 16:GA(i)?(f=17,47!==c&&92!==c&&(o-=1)):null===A&&63===c?(i.Gp="",f=19):null===A&&35===c?(i.nm="",f=20):OA!==c&&(f=17,47!==c&&(o-=1));break;case 17:if(OA===c||47===c||GA(i)&&92===c||null===A&&(63===c||35===c)){var _=Wi(n);if(pA(_)?(TA(i),47===c||GA(i)&&92===c||i.Jp.push("")):!CA(_)||47===c||GA(i)&&92===c?CA(_)||("file"===i.Qp&&0===i.Jp.length&&SA(n)&&($i!==i.Zp&&null!==i.Zp&&(i.Zp=$i),n[1]=58,_=Wi(n)),i.Jp.push(_)):i.Jp.push(""),n.length=0,"file"===i.Qp&&(OA===c||63===c||35===c))for(;i.Jp.length>1&&""===i.Jp[0];)i.Jp.shift();63===c?(i.Gp="",f=19):35===c&&(i.nm="",f=20)}else n.push.apply(n,Hi(c,Vi));break;case 18:63===c?(i.Gp="",f=19):35===c?(i.nm="",f=20):OA!==c&&(i.Jp[0]+=Wi(Hi(c,Li)));break;case 19:null===A&&35===c?(i.nm="",f=20):OA!==c&&(i.Gp+=Wi(Hi(c,GA(i)?xi:Ji)));break;case 20:OA===c||0===c||(i.nm+=Wi(Hi(c,Ui)))}o++}return i}function VA(r,e,i,A){try{UA(r,e,i,A)}catch(r){}}var XA=function(){this.Qp="",this.Kp="",this.Yp="",this.Zp=null,this.im=null,this.Jp=[],this.Gp=null,this.nm=null,this.$p=!1};function JA(r){switch(r.Qp){case"blob":var e;try{e=UA(r.Jp[0],null)}catch(r){return IA}return JA(e);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(r,e,i){return r+"://"+AA(e)+(null===i?"":":"+i)}(r.Qp,r.Zp,r.im);default:return IA}}var xA=function(){function r(r,e){var i,A=null;if(null!=e)if(function(r){return null!=r&&r instanceof xA&&"object"==typeof r.rc}(e))A=e.rc;else try{A=UA(String(e),null)}catch(r){throw new w("Invalid base URL: "+r.message)}try{i=UA(String(r),A)}catch(r){throw new w("Invalid URL: "+r.message)}var f=i.Gp;this.rc=i,this.Gp=function(r){var e=new wA;return null!==r&&vA(e,r),e}(f),this.Gp.rc=this}var e=r.prototype;return e.toString=function(){return this.href},e.toJSON=function(){return this.href},function(r,e,i){e&&He(r.prototype,e),i&&He(r,i)}(r,[{key:"href",get:function(){return function(r,e){void 0===e&&(e=!1);var i=r.Qp+":";if(null!==r.Zp?(i+="//",YA(r)&&(i+=r.Kp,""!==r.Yp&&(i+=":"+r.Yp),i+="@"),i+=AA(r.Zp),null!==r.im&&(i+=":"+r.im)):null===r.Zp&&"file"===r.Qp&&(i+="//"),r.$p)i+=r.Jp[0];else for(var A=0,f=r.Jp;A1?e-1:0),A=1;A>>16)*A+i*(e>>>16)<<16)|0},vf=(y.fround,y.clz32||function(r){var e=32,i=r>>16;return i&&(e-=16,r=i),(i=r>>8)&&(e-=8,r=i),(i=r>>4)&&(e-=4,r=i),(i=r>>2)&&(e-=2,r=i),(i=r>>1)?e-2:e-r}),df=(y.trunc,function(){function r(r){this.encoding=r}return r.prototype.encode=function(r){if(!r)return new I(0);for(var e=new I(r.length),i=0;i>>=0,pf().subarray(r/1,r/1+e)}var Gf=new(void 0===wf?(0,module.require)("util").TextDecoder:wf)("utf-8",{ignoreBOM:!0,fatal:!0});function Yf(r,e){return r>>>=0,Gf.decode(pf().subarray(r,r+e))}Gf.decode();var Wf=0;function Df(r,e){var i=e(1*r.length,1)>>>0;return pf().set(r,i/1),Wf=r.length,i}var Sf=null;function Ff(){return(null===Sf||Sf.buffer.detached||Sf.buffer!==lf.memory.buffer)&&(Sf=new DataView(lf.memory.buffer)),Sf}var Tf=new(void 0===df?(0,module.require)("util").TextEncoder:df)("utf-8"),Mf="function"==typeof Tf.encodeInto?function(r,e){return Tf.encodeInto(r,e)}:function(r,e){var i=Tf.encode(r);return e.set(i),{read:r.length,written:i.length}};function Of(r){try{var e=lf.__wbindgen_add_to_stack_pointer(-16);lf.mpegts_to_fmp4(e,Rf(r));var i=Ff().getInt32(e+0,!0),A=Ff().getInt32(e+4,!0);if(Ff().getInt32(e+8,!0))throw Nf(A);return Nf(i)}finally{lf.__wbindgen_add_to_stack_pointer(16)}}function Zf(r){try{var e=lf.__wbindgen_add_to_stack_pointer(-16);lf.raw_audio_to_fmp4(e,Rf(r));var i=Ff().getInt32(e+0,!0),A=Ff().getInt32(e+4,!0);if(Ff().getInt32(e+8,!0))throw Nf(A);return Nf(i)}finally{lf.__wbindgen_add_to_stack_pointer(16)}}var Lf,Uf,Vf={__proto__:null,__wbg_audiopid_cf63a2881fb603de:function(r){var e=_f(r).audio_pid;return If(e)?16777215:e},__wbg_createoutput_f81a086f372d422e:function(r,e){var i=function(r,e){return{data:r,metadata:e}}(Nf(r),Nf(e));return Rf(i)},__wbg_createoutputdata_f9352c5065ea01aa:function(r,e,i,A,f,n,a,t){var b,k,u,o;0!==r&&(b=gf(mf(r,e)),lf.__wbindgen_export_0(r,1*e,1)),0!==i&&(k=gf(mf(i,A)),lf.__wbindgen_export_0(i,1*A,1)),0!==f&&(u=gf(mf(f,n)),lf.__wbindgen_export_0(f,1*n,1)),0!==a&&(o=gf(mf(a,t)),lf.__wbindgen_export_0(a,1*t,1));var c=function(r,e,i,A){return{video_init:r,audio_init:e,video_media:i,audio_media:A}}(b,k,u,o);return Rf(c)},__wbg_createoutputmetadata_79a74f7d3aafd2c5:function(r,e,i,A,f,n,a,t,b,k,u,o,c,s,l,h){var v,d,w,g;0!==i&&(v=Yf(i,A).slice(),lf.__wbindgen_export_0(i,1*A,1)),0!==f&&(d=Yf(f,n).slice(),lf.__wbindgen_export_0(f,1*n,1)),0!==a&&(w=gf(mf(a,t)),lf.__wbindgen_export_0(a,1*t,1)),0!==b&&(g=gf(mf(b,k)),lf.__wbindgen_export_0(b,1*k,1));var y=function(r,e,i,A,f,n,a,t,b,k,u){return{video_pid:r,audio_pid:e,video_codec:i,audio_codec:A,sps_nal:f,pps_nal:n,first_decode_timestamp:a,first_presentation_timestamp:t,first_video_presentation_timestamp:b,program_map_table_pid:k,video_frame_rate:u}}(16777215===r?void 0:r,16777215===e?void 0:e,v,d,w,g,Nf(u),Nf(o),Nf(c),16777215===s?void 0:s,0===l?void 0:h);return Rf(y)},__wbg_createtimestampwithbase_9f3b56a7f281a060:function(r,e,i){var A=function(r,e,i){return{low:r,high:e,base:i}}(r>>>0,e>>>0,i>>>0);return Rf(A)},__wbg_data_0dfa593a0aa2e64c:function(r,e){var i=Df(_f(e).data,lf.__wbindgen_export_1),A=Wf;Ff().setInt32(r+4,A,!0),Ff().setInt32(r+0,i,!0)},__wbg_error_7534b8e9a36f1ab4:function(r,e){var i,A;try{i=r,A=e,console.error(Yf(r,e))}finally{lf.__wbindgen_export_0(i,A,1)}},__wbg_metadata_262906c02690f219:function(r){var e=_f(r).metadata;return If(e)?0:Rf(e)},__wbg_new_8a6f238a6ece86ea:function(){return Rf(new d)},__wbg_ppsnal_24d7d831a1284b13:function(r,e){var i=_f(e).pps_nal,A=If(i)?0:Df(i,lf.__wbindgen_export_1),f=Wf;Ff().setInt32(r+4,f,!0),Ff().setInt32(r+0,A,!0)},__wbg_programmaptablepid_2bf8112d9d4d8cb1:function(r){var e=_f(r).program_map_table_pid;return If(e)?16777215:e},__wbg_set_wasm:yf,__wbg_spsnal_b5454d39031feeca:function(r,e){var i=_f(e).sps_nal,A=If(i)?0:Df(i,lf.__wbindgen_export_1),f=Wf;Ff().setInt32(r+4,f,!0),Ff().setInt32(r+0,A,!0)},__wbg_stack_0ed75d68575b0f3c:function(r,e){var i=function(r,e,i){if(void 0===i){var A=Tf.encode(r),f=e(A.length,1)>>>0;return pf().subarray(f,f+A.length).set(A),Wf=A.length,f}for(var n=r.length,a=e(n,1)>>>0,t=pf(),b=0;b127)break;t[a+b]=k}if(b!==n){0!==b&&(r=r.slice(b)),a=i(a,n,n=b+3*r.length,1)>>>0;var u=pf().subarray(a+b,a+n);a=i(a,n,b+=Mf(r,u).written,1)>>>0}return Wf=b,a}(_f(e).stack,lf.__wbindgen_export_1,lf.__wbindgen_export_2),A=Wf;Ff().setInt32(r+4,A,!0),Ff().setInt32(r+0,i,!0)},__wbg_videopid_60d3be6c566fc051:function(r){var e=_f(r).video_pid;return If(e)?16777215:e},__wbindgen_object_drop_ref:function(r){Nf(r)},__wbindgen_string_new:function(r,e){return Rf(Yf(r,e))},main:function(){lf.main()},mpegts_to_fmp4:Of,raw_audio_to_fmp4:Zf},Xf=new I(123);for(Uf=25;Uf>=0;--Uf)Xf[48+Uf]=52+Uf,Xf[65+Uf]=Uf,Xf[97+Uf]=26+Uf;function Jf(r,e,i){for(var A,f,n=0,a=e,t=i.length,b=e+(3*t>>2)-("="==i[t-2])-("="==i[t-1]);n>4,a>2),a>>8&65280|t>>>24;r:{e:{i:{A:{f:{n:{a:{t:{b:{k:{u:{o:{if(t=f[r+4>>2],f[r+8>>2]-t>>>0>=4)c=f[r>>2]+t|0,i[0|c]=k,i[c+1|0]=k>>>8,i[c+2|0]=k>>>16,i[c+3|0]=k>>>24;else if(or(r,4),c=(t=f[r+4>>2])+f[r>>2]|0,i[0|c]=k,i[c+1|0]=k>>>8,i[c+2|0]=k>>>16,i[c+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=109,i[t+1|0]=111,i[t+2|0]=111,i[t+3|0]=118,(k=(c=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,c-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=120;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=120,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=109,i[t+1|0]=118,i[t+2|0]=104,i[t+3|0]=100,(k=(c=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,c-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=1,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=1,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=8)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0;else if(or(r,8),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0,(k=f[r+8>>2]-t|0)>>>0<=7)break k;if(t=t+8|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=8)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0;else if(or(r,8),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0,(k=f[r+8>>2]-t|0)>>>0<=7)break k;if(t=t+8|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=1,i[k+2|0]=95,i[k+3|0]=144;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=1,i[k+2|0]=95,i[k+3|0]=144,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=8)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0;else if(or(r,8),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0,(k=f[r+8>>2]-t|0)>>>0<=7)break k;if(t=t+8|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=0,i[t+1|0]=1,i[t+2|0]=0,i[t+3|0]=0,(k=(c=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,c-t>>>0<=1&&(or(r,2),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=1,i[t+1|0]=0,(k=(c=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=1)break t;t=t+2|0,f[r+4>>2]=t,c-t>>>0<=9&&(or(r,10),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=0,i[t+1|0]=0,i[t+2|0]=0,i[t+3|0]=0,i[t+4|0]=0,i[t+5|0]=0,i[t+6|0]=0,i[t+7|0]=0,i[0|(t=t+8|0)]=0,i[t+1|0]=0;c:{s:{if((c=(k=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0>9){if(t=t+10|0,f[r+4>>2]=t,k-t>>>0<=35&&(or(r,36),t=f[r+4>>2]),k=n[1054832]|n[1054833]<<8|n[1054834]<<16|n[1054835]<<24,t=f[r>>2]+t|0,c=n[1054828]|n[1054829]<<8|n[1054830]<<16|n[1054831]<<24,i[0|t]=c,i[t+1|0]=c>>>8,i[t+2|0]=c>>>16,i[t+3|0]=c>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=t+32|0,c=n[1054860]|n[1054861]<<8|n[1054862]<<16|n[1054863]<<24,i[0|k]=c,i[k+1|0]=c>>>8,i[k+2|0]=c>>>16,i[k+3|0]=c>>>24,c=n[1054856]|n[1054857]<<8|n[1054858]<<16|n[1054859]<<24,k=t+24|0,o=n[1054852]|n[1054853]<<8|n[1054854]<<16|n[1054855]<<24,i[0|k]=o,i[k+1|0]=o>>>8,i[k+2|0]=o>>>16,i[k+3|0]=o>>>24,i[k+4|0]=c,i[k+5|0]=c>>>8,i[k+6|0]=c>>>16,i[k+7|0]=c>>>24,c=n[1054848]|n[1054849]<<8|n[1054850]<<16|n[1054851]<<24,k=t+16|0,o=n[1054844]|n[1054845]<<8|n[1054846]<<16|n[1054847]<<24,i[0|k]=o,i[k+1|0]=o>>>8,i[k+2|0]=o>>>16,i[k+3|0]=o>>>24,i[k+4|0]=c,i[k+5|0]=c>>>8,i[k+6|0]=c>>>16,i[k+7|0]=c>>>24,k=n[1054840]|n[1054841]<<8|n[1054842]<<16|n[1054843]<<24,t=t+8|0,c=n[1054836]|n[1054837]<<8|n[1054838]<<16|n[1054839]<<24,i[0|t]=c,i[t+1|0]=c>>>8,i[t+2|0]=c>>>16,i[t+3|0]=c>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,(k=(c=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=35)break b;if(t=t+36|0,f[r+4>>2]=t,c-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=3;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=3,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,k=e?671088640:134217728,k=A?k+536870912|0:k,f[r+8>>2]-t>>>0>=4)c=f[r>>2]+t|0,i[0|c]=k,i[c+1|0]=k>>>8,i[c+2|0]=k>>>16,i[c+3|0]=k>>>24;else if(or(r,4),c=(t=f[r+4>>2])+f[r>>2]|0,i[0|c]=k,i[c+1|0]=k>>>8,i[c+2|0]=k>>>16,i[c+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=109,i[t+1|0]=118,i[t+2|0]=101,i[t+3|0]=120,t=f[r+4>>2],(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(f[r+4>>2]=t+4,e)break s;break c}f[b+12>>2]=c,f[b+8>>2]=10;break r}br(r,1)}A&&br(r,2);c:{s:{l:{h:{v:{d:{w:{g:{y:{B:{E:{_:{if(e){if(1==(0|(v=a[e+108>>1]))&&(t=475,a[e+112>>1])||(t=459),k=(t=t+(c=f[e+104>>2])|0)<<24|(65280&t)<<8|t>>>8&65280|t>>>24,t=f[r+4>>2],f[r+8>>2]-t>>>0>=4)o=f[r>>2]+t|0,i[0|o]=k,i[o+1|0]=k>>>8,i[o+2|0]=k>>>16,i[o+3|0]=k>>>24;else if(or(r,4),o=(t=f[r+4>>2])+f[r>>2]|0,i[0|o]=k,i[o+1|0]=k>>>8,i[o+2|0]=k>>>16,i[o+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=116,i[t+1|0]=114,i[t+2|0]=97,i[t+3|0]=107,t=f[r+4>>2],(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(f[r+4>>2]=t+4,l=a[e+116>>1],u=a[e+118>>1],Ar(r,1),t=f[r+4>>2],f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=1&&(or(r,2),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=0,i[t+1|0]=0,(k=(o=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,o-t>>>0<=1&&(or(r,2),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=0,i[t+1|0]=0,(k=(o=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,o-t>>>0<=35&&(or(r,36),t=f[r+4>>2]),k=n[1054832]|n[1054833]<<8|n[1054834]<<16|n[1054835]<<24,t=f[r>>2]+t|0,o=n[1054828]|n[1054829]<<8|n[1054830]<<16|n[1054831]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=t+32|0,o=n[1054860]|n[1054861]<<8|n[1054862]<<16|n[1054863]<<24,i[0|k]=o,i[k+1|0]=o>>>8,i[k+2|0]=o>>>16,i[k+3|0]=o>>>24,o=n[1054856]|n[1054857]<<8|n[1054858]<<16|n[1054859]<<24,k=t+24|0,h=n[1054852]|n[1054853]<<8|n[1054854]<<16|n[1054855]<<24,i[0|k]=h,i[k+1|0]=h>>>8,i[k+2|0]=h>>>16,i[k+3|0]=h>>>24,i[k+4|0]=o,i[k+5|0]=o>>>8,i[k+6|0]=o>>>16,i[k+7|0]=o>>>24,o=n[1054848]|n[1054849]<<8|n[1054850]<<16|n[1054851]<<24,k=t+16|0,h=n[1054844]|n[1054845]<<8|n[1054846]<<16|n[1054847]<<24,i[0|k]=h,i[k+1|0]=h>>>8,i[k+2|0]=h>>>16,i[k+3|0]=h>>>24,i[k+4|0]=o,i[k+5|0]=o>>>8,i[k+6|0]=o>>>16,i[k+7|0]=o>>>24,k=n[1054840]|n[1054841]<<8|n[1054842]<<16|n[1054843]<<24,t=t+8|0,o=n[1054836]|n[1054837]<<8|n[1054838]<<16|n[1054839]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,(o=(k=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=35)break _;if(t=t+36|0,f[r+4>>2]=t,o=l<<8|(65280&l)>>>8,k-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=o,i[k+1|0]=o>>>8;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=o,i[k+1|0]=o>>>8,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,h=u<<8|(65280&u)>>>8,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=h,i[k+1|0]=h>>>8;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=h,i[k+1|0]=h>>>8,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,d=a[e+112>>1],k=(k=(l=c+(v&&1&d?126:110)|0)+237|0)<<24|(65280&k)<<8|k>>>8&65280|k>>>24,f[r+8>>2]-t>>>0>=4)u=f[r>>2]+t|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24;else if(or(r,4),u=(t=f[r+4>>2])+f[r>>2]|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=109,i[t+1|0]=100,i[t+2|0]=105,i[t+3|0]=97,t=f[r+4>>2],(k=f[r+8>>2]-t|0)>>>0<=3)break n;if(f[r+4>>2]=t+4,fr(r,9e4),t=f[r+4>>2],f[r+8>>2]-t>>>0<=44&&(or(r,45),t=f[r+4>>2]),k=n[1054913]|n[1054914]<<8|n[1054915]<<16|n[1054916]<<24,t=f[r>>2]+t|0,u=n[1054909]|n[1054910]<<8|n[1054911]<<16|n[1054912]<<24,i[0|t]=u,i[t+1|0]=u>>>8,i[t+2|0]=u>>>16,i[t+3|0]=u>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,u=n[1054950]|n[1054951]<<8|n[1054952]<<16|n[1054953]<<24,k=t+37|0,s=n[1054946]|n[1054947]<<8|n[1054948]<<16|n[1054949]<<24,i[0|k]=s,i[k+1|0]=s>>>8,i[k+2|0]=s>>>16,i[k+3|0]=s>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,u=n[1054945]|n[1054946]<<8|n[1054947]<<16|n[1054948]<<24,k=t+32|0,s=n[1054941]|n[1054942]<<8|n[1054943]<<16|n[1054944]<<24,i[0|k]=s,i[k+1|0]=s>>>8,i[k+2|0]=s>>>16,i[k+3|0]=s>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,u=n[1054937]|n[1054938]<<8|n[1054939]<<16|n[1054940]<<24,k=t+24|0,s=n[1054933]|n[1054934]<<8|n[1054935]<<16|n[1054936]<<24,i[0|k]=s,i[k+1|0]=s>>>8,i[k+2|0]=s>>>16,i[k+3|0]=s>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,u=n[1054929]|n[1054930]<<8|n[1054931]<<16|n[1054932]<<24,k=t+16|0,s=n[1054925]|n[1054926]<<8|n[1054927]<<16|n[1054928]<<24,i[0|k]=s,i[k+1|0]=s>>>8,i[k+2|0]=s>>>16,i[k+3|0]=s>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,k=n[1054921]|n[1054922]<<8|n[1054923]<<16|n[1054924]<<24,t=t+8|0,u=n[1054917]|n[1054918]<<8|n[1054919]<<16|n[1054920]<<24,i[0|t]=u,i[t+1|0]=u>>>8,i[t+2|0]=u>>>16,i[t+3|0]=u>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,(k=(u=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=44)break E;if(t=t+45|0,f[r+4>>2]=t,k=(k=l+140|0)<<24|(65280&k)<<8|k>>>8&65280|k>>>24,u-t>>>0>=4)u=f[r>>2]+t|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24;else if(or(r,4),u=(t=f[r+4>>2])+f[r>>2]|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=109,i[t+1|0]=105,i[t+2|0]=110,i[t+3|0]=102,(t=(k=f[r+8>>2])-(u=f[r+4>>2])|0)>>>0<=3)break A;if(t=u+4|0,f[r+4>>2]=t,k-t>>>0<=19&&(or(r,20),t=f[r+4>>2]),k=n[1054958]|n[1054959]<<8|n[1054960]<<16|n[1054961]<<24,t=f[r>>2]+t|0,u=n[1054954]|n[1054955]<<8|n[1054956]<<16|n[1054957]<<24,i[0|t]=u,i[t+1|0]=u>>>8,i[t+2|0]=u>>>16,i[t+3|0]=u>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=t+16|0,u=n[1054970]|n[1054971]<<8|n[1054972]<<16|n[1054973]<<24,i[0|k]=u,i[k+1|0]=u>>>8,i[k+2|0]=u>>>16,i[k+3|0]=u>>>24,k=n[1054966]|n[1054967]<<8|n[1054968]<<16|n[1054969]<<24,t=t+8|0,u=n[1054962]|n[1054963]<<8|n[1054964]<<16|n[1054965]<<24,i[0|t]=u,i[t+1|0]=u>>>8,i[t+2|0]=u>>>16,i[t+3|0]=u>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,(u=(k=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=19)break B;if(t=t+20|0,f[r+4>>2]=t,k-t>>>0<=35&&(or(r,36),t=f[r+4>>2]),k=n[1054994]|n[1054995]<<8|n[1054996]<<16|n[1054997]<<24,t=f[r>>2]+t|0,u=n[1054990]|n[1054991]<<8|n[1054992]<<16|n[1054993]<<24,i[0|t]=u,i[t+1|0]=u>>>8,i[t+2|0]=u>>>16,i[t+3|0]=u>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=t+32|0,u=n[1055022]|n[1055023]<<8|n[1055024]<<16|n[1055025]<<24,i[0|k]=u,i[k+1|0]=u>>>8,i[k+2|0]=u>>>16,i[k+3|0]=u>>>24,u=n[1055018]|n[1055019]<<8|n[1055020]<<16|n[1055021]<<24,k=t+24|0,s=n[1055014]|n[1055015]<<8|n[1055016]<<16|n[1055017]<<24,i[0|k]=s,i[k+1|0]=s>>>8,i[k+2|0]=s>>>16,i[k+3|0]=s>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,u=n[1055010]|n[1055011]<<8|n[1055012]<<16|n[1055013]<<24,k=t+16|0,s=n[1055006]|n[1055007]<<8|n[1055008]<<16|n[1055009]<<24,i[0|k]=s,i[k+1|0]=s>>>8,i[k+2|0]=s>>>16,i[k+3|0]=s>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,k=n[1055002]|n[1055003]<<8|n[1055004]<<16|n[1055005]<<24,t=t+8|0,u=n[1054998]|n[1054999]<<8|n[1055e3]<<16|n[1055001]<<24,i[0|t]=u,i[t+1|0]=u>>>8,i[t+2|0]=u>>>16,i[t+3|0]=u>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,(k=(u=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=35)break y;if(t=t+36|0,f[r+4>>2]=t,k=(k=l+76|0)<<24|(65280&k)<<8|k>>>8&65280|k>>>24,u-t>>>0>=4)u=f[r>>2]+t|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24;else if(or(r,4),u=(t=f[r+4>>2])+f[r>>2]|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=115,i[t+1|0]=116,i[t+2|0]=98,i[t+3|0]=108,(k=(u=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,k=l<<24|(65280&l)<<8|l>>>8&65280|l>>>24,u-t>>>0>=4)u=f[r>>2]+t|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24;else if(or(r,4),u=(t=f[r+4>>2])+f[r>>2]|0,i[0|u]=k,i[u+1|0]=k>>>8,i[u+2|0]=k>>>16,i[u+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=115,i[t+1|0]=116,i[t+2|0]=115,i[t+3|0]=100,(t=(k=f[r+8>>2])-(u=f[r+4>>2])|0)>>>0<=3)break A;if(t=u+4|0,f[r+4>>2]=t,k-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=1;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=1,(k=f[r+8>>2]-t|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,k=(k=l-16|0)<<24|(65280&k)<<8|k>>>8&65280|k>>>24,f[r+8>>2]-t>>>0>=4)l=f[r>>2]+t|0,i[0|l]=k,i[l+1|0]=k>>>8,i[l+2|0]=k>>>16,i[l+3|0]=k>>>24;else if(or(r,4),l=(t=f[r+4>>2])+f[r>>2]|0,i[0|l]=k,i[l+1|0]=k>>>8,i[l+2|0]=k>>>16,i[l+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=97,i[t+1|0]=118,i[t+2|0]=99,i[t+3|0]=49,(k=(l=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=3)break n;if(t=t+4|0,f[r+4>>2]=t,l-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=1;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=1,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=o,i[k+1|0]=o>>>8;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=o,i[k+1|0]=o>>>8,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=h,i[k+1|0]=h>>>8;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=h,i[k+1|0]=h>>>8,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=72;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=72,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=72;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=72,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=1;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=1,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=31&&(or(r,32),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=0,i[t+1|0]=0,i[t+2|0]=0,i[t+3|0]=0,i[t+4|0]=0,i[t+5|0]=0,i[t+6|0]=0,i[t+7|0]=0,i[0|(k=t+24|0)]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0,i[0|(k=t+16|0)]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=0,i[k+4|0]=0,i[k+5|0]=0,i[k+6|0]=0,i[k+7|0]=0,i[0|(t=t+8|0)]=0,i[t+1|0]=0,i[t+2|0]=0,i[t+3|0]=0,i[t+4|0]=0,i[t+5|0]=0,i[t+6|0]=0,i[t+7|0]=0,(o=(k=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=31)break g;if(t=t+32|0,f[r+4>>2]=t,k-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=24;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=24,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=1&&(or(r,2),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=255,i[t+1|0]=255,(k=(o=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,k=(k=c+8|0)<<24|(65280&k)<<8|k>>>8&65280|k>>>24,o-t>>>0>=4)o=f[r>>2]+t|0,i[0|o]=k,i[o+1|0]=k>>>8,i[o+2|0]=k>>>16,i[o+3|0]=k>>>24;else if(or(r,4),o=(t=f[r+4>>2])+f[r>>2]|0,i[0|o]=k,i[o+1|0]=k>>>8,i[o+2|0]=k>>>16,i[o+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=97,i[t+1|0]=118,i[t+2|0]=99,i[t+3|0]=67,(t=(k=f[r+8>>2])-(o=f[r+4>>2])|0)>>>0<=3)break i;if(t=o+4|0,f[r+4>>2]=t,o=f[e+100>>2],c>>>0>k-t>>>0&&(or(r,c),t=f[r+4>>2]),ze(f[r>>2]+t|0,o,c),(o=(k=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0>>0)break w;if(t=t+c|0,f[r+4>>2]=t,!(!v|!d)){if(k-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=16;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=0,i[k+1|0]=0,i[k+2|0]=0,i[k+3|0]=16,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0<=3&&(or(r,4),t=f[r+4>>2]),t=f[r>>2]+t|0,i[0|t]=112,i[t+1|0]=97,i[t+2|0]=115,i[t+3|0]=112,(k=(c=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,!v)break d;if(k=(k=a[e+110>>1])<<24|(65280&k)<<8,c-t>>>0>=4)c=f[r>>2]+t|0,i[0|c]=k,i[c+1|0]=k>>>8,i[c+2|0]=k>>>16,i[c+3|0]=k>>>24;else if(or(r,4),c=(t=f[r+4>>2])+f[r>>2]|0,i[0|c]=k,i[c+1|0]=k>>>8,i[c+2|0]=k>>>16,i[c+3|0]=k>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,e=(e=a[e+114>>1])<<24|(65280&e)<<8,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(e=f[r+8>>2]-t|0)>>>0<=3)break v;f[r+4>>2]=t+4}Sr(r),er(r)}if(A&&(e=(c=f[A+88>>2])+409|0)){if(e=e<<24|(65280&e)<<8|e>>>8&65280|e>>>24,t=f[r+4>>2],f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=3&&(or(r,4),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=116,i[e+1|0]=114,i[e+2|0]=97,i[e+3|0]=107,e=f[r+4>>2],(k=f[r+8>>2]-e|0)>>>0<=3)break o;if(f[r+4>>2]=e+4,Ar(r,2),t=f[r+4>>2],f[r+8>>2]-t>>>0>=2)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=1;else if(or(r,2),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=1,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(e=t+2|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=1&&(or(r,2),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=1,i[e+1|0]=0,(k=(t=f[r+8>>2])-(e=f[r+4>>2])|0)>>>0<=1)break t;if(e=e+2|0,f[r+4>>2]=e,t-e>>>0<=1&&(or(r,2),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=0,i[e+1|0]=0,(k=(t=f[r+8>>2])-(e=f[r+4>>2])|0)>>>0<=1)break t;if(e=e+2|0,f[r+4>>2]=e,t-e>>>0<=35&&(or(r,36),e=f[r+4>>2]),t=n[1054832]|n[1054833]<<8|n[1054834]<<16|n[1054835]<<24,e=f[r>>2]+e|0,k=n[1054828]|n[1054829]<<8|n[1054830]<<16|n[1054831]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,t=e+32|0,k=n[1054860]|n[1054861]<<8|n[1054862]<<16|n[1054863]<<24,i[0|t]=k,i[t+1|0]=k>>>8,i[t+2|0]=k>>>16,i[t+3|0]=k>>>24,k=n[1054856]|n[1054857]<<8|n[1054858]<<16|n[1054859]<<24,t=e+24|0,o=n[1054852]|n[1054853]<<8|n[1054854]<<16|n[1054855]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=n[1054848]|n[1054849]<<8|n[1054850]<<16|n[1054851]<<24,t=e+16|0,o=n[1054844]|n[1054845]<<8|n[1054846]<<16|n[1054847]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,t=n[1054840]|n[1054841]<<8|n[1054842]<<16|n[1054843]<<24,e=e+8|0,k=n[1054836]|n[1054837]<<8|n[1054838]<<16|n[1054839]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,(k=(e=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=35)break b;if(t=t+36|0,f[r+4>>2]=t,e-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,e=(e=c+297|0)<<24|(65280&e)<<8|e>>>8&65280|e>>>24,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=3&&(or(r,4),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=109,i[e+1|0]=100,i[e+2|0]=105,i[e+3|0]=97,e=f[r+4>>2],(k=f[r+8>>2]-e|0)>>>0<=3)break o;if(f[r+4>>2]=e+4,fr(r,h=f[A+92>>2]),e=f[r+4>>2],f[r+8>>2]-e>>>0<=44&&(or(r,45),e=f[r+4>>2]),t=n[1054868]|n[1054869]<<8|n[1054870]<<16|n[1054871]<<24,e=f[r>>2]+e|0,k=n[1054864]|n[1054865]<<8|n[1054866]<<16|n[1054867]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,k=n[1054905]|n[1054906]<<8|n[1054907]<<16|n[1054908]<<24,t=e+37|0,o=n[1054901]|n[1054902]<<8|n[1054903]<<16|n[1054904]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=n[1054900]|n[1054901]<<8|n[1054902]<<16|n[1054903]<<24,t=e+32|0,o=n[1054896]|n[1054897]<<8|n[1054898]<<16|n[1054899]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=n[1054892]|n[1054893]<<8|n[1054894]<<16|n[1054895]<<24,t=e+24|0,o=n[1054888]|n[1054889]<<8|n[1054890]<<16|n[1054891]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=n[1054884]|n[1054885]<<8|n[1054886]<<16|n[1054887]<<24,t=e+16|0,o=n[1054880]|n[1054881]<<8|n[1054882]<<16|n[1054883]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,t=n[1054876]|n[1054877]<<8|n[1054878]<<16|n[1054879]<<24,e=e+8|0,k=n[1054872]|n[1054873]<<8|n[1054874]<<16|n[1054875]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,(t=(k=f[r+8>>2])-(e=f[r+4>>2])|0)>>>0<=44)break h;if(t=e+45|0,f[r+4>>2]=t,e=(e=c+200|0)<<24|(65280&e)<<8|e>>>8&65280|e>>>24,k-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=3&&(or(r,4),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=109,i[e+1|0]=105,i[e+2|0]=110,i[e+3|0]=102,(t=(k=f[r+8>>2])-(e=f[r+4>>2])|0)>>>0<=3)break i;if(e=e+4|0,f[r+4>>2]=e,k-e>>>0<=15&&(or(r,16),e=f[r+4>>2]),t=n[1054978]|n[1054979]<<8|n[1054980]<<16|n[1054981]<<24,e=f[r>>2]+e|0,k=n[1054974]|n[1054975]<<8|n[1054976]<<16|n[1054977]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,t=n[1054986]|n[1054987]<<8|n[1054988]<<16|n[1054989]<<24,e=e+8|0,k=n[1054982]|n[1054983]<<8|n[1054984]<<16|n[1054985]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,(k=(t=f[r+8>>2])-(e=f[r+4>>2])|0)>>>0<=15)break l;if(e=e+16|0,f[r+4>>2]=e,t-e>>>0<=35&&(or(r,36),e=f[r+4>>2]),t=n[1054994]|n[1054995]<<8|n[1054996]<<16|n[1054997]<<24,e=f[r>>2]+e|0,k=n[1054990]|n[1054991]<<8|n[1054992]<<16|n[1054993]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,t=e+32|0,k=n[1055022]|n[1055023]<<8|n[1055024]<<16|n[1055025]<<24,i[0|t]=k,i[t+1|0]=k>>>8,i[t+2|0]=k>>>16,i[t+3|0]=k>>>24,k=n[1055018]|n[1055019]<<8|n[1055020]<<16|n[1055021]<<24,t=e+24|0,o=n[1055014]|n[1055015]<<8|n[1055016]<<16|n[1055017]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,k=n[1055010]|n[1055011]<<8|n[1055012]<<16|n[1055013]<<24,t=e+16|0,o=n[1055006]|n[1055007]<<8|n[1055008]<<16|n[1055009]<<24,i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=k,i[t+5|0]=k>>>8,i[t+6|0]=k>>>16,i[t+7|0]=k>>>24,t=n[1055002]|n[1055003]<<8|n[1055004]<<16|n[1055005]<<24,e=e+8|0,k=n[1054998]|n[1054999]<<8|n[1055e3]<<16|n[1055001]<<24,i[0|e]=k,i[e+1|0]=k>>>8,i[e+2|0]=k>>>16,i[e+3|0]=k>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,(t=(k=f[r+8>>2])-(e=f[r+4>>2])|0)>>>0<=35)break s;if(t=e+36|0,f[r+4>>2]=t,e=(e=c+140|0)<<24|(65280&e)<<8|e>>>8&65280|e>>>24,k-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=3&&(or(r,4),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=115,i[e+1|0]=116,i[e+2|0]=98,i[e+3|0]=108,(k=(o=f[r+8>>2])-(e=f[r+4>>2])|0)>>>0<=3)break o;if(t=e+4|0,f[r+4>>2]=t,e=(e=c- -64|0)<<24|(65280&e)<<8|e>>>8&65280|e>>>24,o-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=3&&(or(r,4),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=115,i[e+1|0]=116,i[e+2|0]=115,i[e+3|0]=100,(t=(e=f[r+8>>2])-(k=f[r+4>>2])|0)>>>0<=3)break i;if(t=k+4|0,f[r+4>>2]=t,e-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=1;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=1,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,e=(e=c+48|0)<<24|(65280&e)<<8|e>>>8&65280|e>>>24,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=3&&(or(r,4),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=109,i[e+1|0]=112,i[e+2|0]=52,i[e+3|0]=97,(t=(e=f[r+8>>2])-(k=f[r+4>>2])|0)>>>0<=3)break i;if(t=k+4|0,f[r+4>>2]=t,e-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0;else if(or(r,2),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=1;else if(or(r,2),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=1,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(t=t+4|0,f[r+4>>2]=t,e=n[(f[A>>2]?100:101)+A|0]<<8,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=16;else if(or(r,2),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=16,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0;else if(or(r,2),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0;else if(or(r,2),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,e=h<<8|(65280&h)>>>8,f[r+8>>2]-t>>>0>=2)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8;else if(or(r,2),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=2)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0;else if(or(r,2),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,(k=f[r+8>>2]-t|0)>>>0<=1)break t;if(t=t+2|0,f[r+4>>2]=t,e=(e=c+12|0)<<24|(65280&e)<<8|e>>>8&65280|e>>>24,f[r+8>>2]-t>>>0>=4)k=f[r>>2]+t|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24;else if(or(r,4),k=(t=f[r+4>>2])+f[r>>2]|0,i[0|k]=e,i[k+1|0]=e>>>8,i[k+2|0]=e>>>16,i[k+3|0]=e>>>24,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,f[r+8>>2]-e>>>0<=3&&(or(r,4),e=f[r+4>>2]),e=f[r>>2]+e|0,i[0|e]=101,i[e+1|0]=115,i[e+2|0]=100,i[e+3|0]=115,(k=(e=f[r+8>>2])-(t=f[r+4>>2])|0)>>>0<=3)break u;if(t=t+4|0,f[r+4>>2]=t,e-t>>>0>=4)e=f[r>>2]+t|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(t=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(k=f[r+8>>2]-t|0)>>>0<=3)break o;if(e=t+4|0,f[r+4>>2]=e,A=f[A+84>>2],c>>>0>f[r+8>>2]-e>>>0&&(or(r,c),e=f[r+4>>2]),ze(f[r>>2]+e|0,A,c),e=f[r+4>>2],(A=f[r+8>>2]-e|0)>>>0>>0)break c;f[r+4>>2]=e+c,Sr(r),er(r)}return void(S=b+16|0)}f[b+12>>2]=o;break a}f[b+12>>2]=k;break f}f[b+12>>2]=u,f[b+8>>2]=20;break r}f[b+12>>2]=k;break a}f[b+12>>2]=o,f[b+8>>2]=32;break r}f[b+12>>2]=o,f[b+8>>2]=c;break r}Ve(1055028),$f()}f[b+12>>2]=e;break e}f[b+12>>2]=t;break f}f[b+12>>2]=k,f[b+8>>2]=16;break r}f[b+12>>2]=t;break a}f[b+12>>2]=A,f[b+8>>2]=c;break r}f[b+12>>2]=k;break e}f[b+12>>2]=k;break e}f[b+12>>2]=k,f[b+8>>2]=8;break r}f[b+12>>2]=k;break a}f[b+12>>2]=k,f[b+8>>2]=2;break r}f[b+8>>2]=36;break r}f[b+12>>2]=k;break e}f[b+8>>2]=45;break r}f[b+12>>2]=t;break e}f[b+12>>2]=t}f[b+8>>2]=4}pe(b+8|0),$f()}function Z(r,e){var t,o=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0,p=0,m=0,G=0,Y=0,W=0,D=0,F=0,T=0,O=0,Z=0,L=0,U=0,X=0,J=0,x=0,H=0;S=t=S-640|0,ze(t+8|0,e,264),o=f[e+248>>2],f[t+280>>2]=o,v=f[e+244>>2],f[t+272>>2]=f[e+240>>2],f[t+276>>2]=v;r:{e:{i:{A:{f:{n:{a:{t:{if(o){if(d=f[t+276>>2],(m=f[d+64>>2])?B=9e4/(D=.0009765625*+(m>>>0)):(m=9e4,B=0),B=s(B),u(B)<0x8000000000000000?(e=~~B>>>0,v=u(B)>=1?~~(N=B>0?c(s(2.3283064365386963e-10*B),4294967295):l(2.3283064365386963e-10*(B-+(~~B>>>0>>>0))))>>>0:0):(e=0,v=-2147483648),n[d+70|0])break t;Ve(1056300),$f()}if(m=9e4,F=n[t+268|0],f[t+264>>2])break a;break n}y=e,e=B>=-0x8000000000000000,h=B>0x7ffffffffffffc00,T=(g=B==B)?h?-1:e?y:0:0,O=g?h?2147483647:e?v:-2147483648:0,Z=n[d+71|0],F=n[t+268|0];t:{if(f[t+264>>2]){f[t+376>>2]=0,f[t+380>>2]=4,f[t+384>>2]=0,f[t+388>>2]=0,i[t+374|0]=0,i[t+372|0]=0,f[t+368>>2]=0,f[t+352>>2]=0,f[t+356>>2]=0,f[t+336>>2]=0,f[t+340>>2]=0,f[t+320>>2]=0,f[t+324>>2]=0,f[t+304>>2]=0,f[t+308>>2]=0;b:{k:{u:{o:{c:{s:{l:{h:{if(v=d+k(o,88)|0,1==(0|(d=n[v-18|0])))switch(h=v-88|0,e=6,E=1056380,(g=n[v-17|0])-1|0){case 5:break c;case 0:break k;case 1:break u;case 2:break h;case 3:break l;case 4:break s;default:break o}Ve(1056364),$f()}e=13,E=1056395;break k}e=18,E=1056408;break k}e=21,E=1056426;break k}e=26,E=1056447;break k}f[t+572>>2]=0,f[t+564>>2]=1,f[t+568>>2]=0,f[t+560>>2]=1056088;break b}e=9,E=1056386}f[(o=t+568|0)>>2]=e,f[t+572>>2]=0,f[t+564>>2]=E,f[t+560>>2]=1056088,f[t+388>>2]=e,ce(t+376|0,1058736),w=f[t+564>>2],e=f[t+380>>2],f[e>>2]=f[t+560>>2],f[e+4>>2]=w,w=f[o+4>>2],f[(e=e+8|0)>>2]=f[o>>2],f[e+4>>2]=w,f[t+384>>2]=1}if(w=f[(o=h+8|0)+4>>2],f[(e=t+312|0)>>2]=f[o>>2],f[e+4>>2]=w,w=f[(o=h+16|0)+4>>2],f[(e=t+320|0)>>2]=f[o>>2],f[e+4>>2]=w,w=f[(o=h+24|0)+4>>2],f[(e=t+328|0)>>2]=f[o>>2],f[e+4>>2]=w,i[t+375|0]=g,i[t+374|0]=d,e=f[h+4>>2],f[t+304>>2]=f[h>>2],f[t+308>>2]=e,A[t+372>>1]=a[v-20>>1],f[t+368>>2]=f[v-24>>2],o=f[(e=v-32|0)+4>>2],f[t+360>>2]=f[e>>2],f[t+364>>2]=o,o=f[(e=v-40|0)+4>>2],f[t+352>>2]=f[e>>2],f[t+356>>2]=o,o=f[(e=v-48|0)+4>>2],f[t+344>>2]=f[e>>2],f[t+348>>2]=o,o=f[(e=v-56|0)+4>>2],f[t+336>>2]=f[e>>2],f[t+340>>2]=o,d=f[(g=v-12|0)>>2],o=f[v-8>>2]){e=0;b:{if(1!=(0|o)){for(w=1&o,y=-2&o,o=d;fi[f[f[o>>2]+16>>2]](o+12|0,f[o+4>>2],f[o+8>>2]),fi[f[f[o+16>>2]+16>>2]](o+28|0,f[o+20>>2],f[o+24>>2]),o=o+32|0,(0|y)!=(0|(e=e+2|0)););if(!w)break b}fi[f[f[(e=(e<<4)+d|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}d=f[g>>2]}if(o=f[v-16>>2]){if((e=-8&(v=f[d-4>>2]))>>>0<((o<<=4)|((v&=3)?4:8))>>>0)break t;if(e>>>0>o+39>>>0&&v)break e;nr(d)}if(ze(h,t+304|0,88),f[t+264>>2]=0,!(o=f[t+280>>2]))break n}if(1!=(0|o)){for(N=(+(T>>>0)+4294967296*+(0|O))/9e4,e=1,E=1;;){b:{k:{u:{o:{c:{s:{if((v=e-1|0)>>>0>>0){if(w=(g=f[t+276>>2])+k(v,88)|0,!f[w+32>>2])break s;if(d=g+k(e,88)|0,1!=f[d+32>>2])break c;if((0|(v=f[d+40>>2]))==(0|(h=f[w+40>>2]))&(0|(y=f[d+44>>2]))==(0|(w=f[w+44>>2])))break o;if(qf(+(Oe(1022)+-2220446049250313e-31*Oe(1021))),_=0|zf(1),C=0|zf(0),qf(+(B=(+(v-h>>>0)+4294967296*+(y-((h>>>0>v>>>0)+w|0)|0))/9e4/N)),v=0|zf(1),zf(0),Pf(0,0|C),Pf(1,2147483647&_|-2147483648&v),qf(+(B+=+Kf())),v=0|zf(1),zf(0),(0|(h=(v>>>20&2047)-1023|0))<=51&&(v=31&h,(63&h)>>>0>=32?(w=-1,v=-1048576>>v):(w=-1048576>>v,v=((1<=0)&B<4294967296?~~B>>>0:0,(v=(v=B>4294967295?-1:h?v:0)>>>0<=1?1:v)>>>0>>0){if(v=e-(h=E-v|0)|0,e>>>0>>0)break u;if(e>>>0>o>>>0)break k;f[t+572>>2]=e,f[t+576>>2]=o-e,f[t+564>>2]=d,f[t+280>>2]=v,f[t+560>>2]=g+k(v,88),f[t+568>>2]=t+272,mr(t+560|0),o=f[t+280>>2],e=v}E=1;break b}Ne(v,o,1056476),$f()}Ve(1056492),$f()}Ve(1056508),$f()}E=E+1|0;break b}S=r=S-48|0,f[r+4>>2]=e,f[r>>2]=v,f[r+12>>2]=2,f[r+8>>2]=1053040,f[r+20>>2]=2,f[r+24>>2]=0,f[r+40>>2]=r+4,f[r+44>>2]=8,f[r+32>>2]=r,f[r+36>>2]=8,f[r+16>>2]=r+32,Me(r+8|0,1057108),$f()}Je(e,o,1057108),$f()}if(!(o>>>0>(e=e+1|0)>>>0))break}if(o>>>0>=2)for(L=t+528|0,U=t+484|0,w=1;;){b:{k:{u:{o:{c:{s:{l:{h:{v:{d:{if((e=w-1|0)>>>0>>0){if(e=(y=f[t+276>>2])+k(e,88)|0,!(v=f[e+64>>2]))break d;if(d=(B=s(9216e4/+(v>>>0)))>=-0x8000000000000000,(N=u(B))<0x8000000000000000?(v=~~B>>>0,h=N>=1?~~(N=B>0?c(s(2.3283064365386963e-10*B),4294967295):l(2.3283064365386963e-10*(B-+(~~B>>>0>>>0))))>>>0:0):(v=0,h=-2147483648),g=B>0x7ffffffffffffc00,v=(I=B==B)?g?-1:d?v:0:0,g=d=I?g?2147483647:d?h:-2147483648:0,f[t+392>>2]=v,f[t+396>>2]=d,!f[e+16>>2])break v;if(o>>>0<=w>>>0)break h;if(h=y+k(w,88)|0,!f[h+16>>2])break l;if(!(v|d))break s;if(y=f[(d=h+16|0)+8>>2],E=f[d+12>>2],d=g+f[e+28>>2]|0,!(I=y-(h=v+f[e+24>>2]|0)|0)&-2147483648==(0|(y=E-((h>>>0>y>>>0)+(d=h>>>0>>0?d+1|0:d)|0)|0))&-1==(v&g))break c;if(I=$e(I,y,v,g),y=v=M,!((0|v)>=0&&((0|v)>0||I)))break b;E=a[e+68>>1],_=f[e+56>>2],C=f[e+60>>2],G=f[e+48>>2],p=f[e+52>>2],W=f[e+40>>2],X=f[e+44>>2],J=f[e+32>>2],x=f[e+36>>2],v=n[e+71|0],g=n[e+70|0],H=f[e+64>>2],Y=f[(R=e+8|0)+4>>2],f[(Q=t+408|0)>>2]=f[R>>2],f[Q+4>>2]=Y,Y=f[(R=e+16|0)+4>>2],f[(Q=t+416|0)>>2]=f[R>>2],f[Q+4>>2]=Y,Y=f[(R=e+24|0)+4>>2],f[(Q=t+424|0)>>2]=f[R>>2],f[Q+4>>2]=Y,Q=f[e+4>>2],f[t+400>>2]=f[e>>2],f[t+404>>2]=Q,f[t+464>>2]=H,i[t+470|0]=g,i[t+471|0]=v,f[t+432>>2]=J,f[t+436>>2]=x,f[t+440>>2]=W,f[t+444>>2]=X,f[t+448>>2]=G,f[t+452>>2]=p,f[t+456>>2]=_,f[t+460>>2]=C,A[t+468>>1]=E;w:{g:{if(g){if((255&(e=v-1|0))>>>0<6)break g;e=0,v=1;break w}Ve(1056620),$f()}e=f[(v=e<<2&1020)+1059424>>2],v=f[v+1059400>>2]}if(f[t+484>>2]=0,f[t+480>>2]=e,f[t+476>>2]=v,f[t+472>>2]=1056088,f[t+488>>2]=h,f[t+492>>2]=d,o>>>0>>0)break o;if(f[t+540>>2]=w,f[t+280>>2]=w,f[t+528>>2]=8,f[t+532>>2]=8,f[t+520>>2]=I,f[t+524>>2]=y,f[t+512>>2]=0,f[t+516>>2]=0,f[t+544>>2]=o-w,e=t+272|0,f[t+536>>2]=e,f[t+508>>2]=t+392,f[t+504>>2]=t+488,f[t+500>>2]=t+400,f[t+496>>2]=t+472,(0|o)==(0|w)){Rr(e,t+496|0,1056072);break k}if(!Gr(t+272|0,w,t+496|0))break k;e=f[t+520>>2],o=v=f[t+512>>2];w:if(!(o=(0|(d=f[t+516>>2]))>(0|(h=f[t+524>>2]))?1:(0|h)<=(0|d)&e>>>0<=o>>>0)){if(o=-1,g=e-v|0,!((_=(0|h)>(0|(y=h-((e>>>0>>0)+d|0)|0))?1:e>>>0>g>>>0&(0|h)>=(0|y))^(E=(0|d)>0?1:!!(0|v)&(0|d)>=0)|!!(0|y))){if(!(g|y))break w;o=g}if(e=f[t+536>>2],h=(d=f[t+544>>2])+(v=f[t+540>>2])|0,f[e>>2]-h>>>0>>0&&Ae(e,h,o,8,88),Pe((h=f[e+4>>2])+k(o=o+v|0,88)|0,h+k(v,88)|0,k(d,88)),f[t+540>>2]=o,!Gr(e,o,t+496|0))break k;e=f[t+520>>2],h=f[t+524>>2],v=f[t+512>>2],d=f[t+516>>2]}o=0,g=v,v=e;w:{if(e>>>0>g>>>0&(0|h)>=(0|d)|(0|h)>(0|d)){if(e=e-g|0,E=t+556|0,(v=(0|(y=h-((v>>>0>>0)+d|0)|0))<(0|h)?1:e>>>0>>0&(0|h)>=(0|y))^(d=(0|d)>0?1:!!(0|g)&(0|d)>=0)|y)break w;o=e}f[t+556>>2]=1,E=t+552|0}if(f[E>>2]=o,1==f[t+556>>2]){if(E=0,o=qe(e=f[t+552>>2],0,88,0),!(M||o>>>0>2147483640)){if(!o){v=8,e=0;break u}if(v=V(o))break u;E=8}Ze(E,1057400),$f()}f[t+576>>2]=0,f[t+564>>2]=1,f[t+560>>2]=1057100,f[t+568>>2]=4,f[t+572>>2]=0,Me(t+560|0,1057400),$f()}Ne(e,o,1056524),$f()}Ve(1056540),$f()}Ve(1056556),$f()}Ne(w,o,1056572),$f()}Ve(1056588),$f()}S=r=S-32|0,f[r+24>>2]=0,f[r+12>>2]=1,f[r+8>>2]=1052896;break r}S=r=S-32|0,f[r+24>>2]=0,f[r+12>>2]=1,f[r+8>>2]=1052860;break r}Je(w,o,1057108),$f()}f[t+568>>2]=0,f[t+564>>2]=v,f[t+560>>2]=e,Rr(t+560|0,t+496|0,1057400),e=f[t+568>>2],y=(E=k(e,88))+(h=f[t+564>>2])|0,C=f[t+560>>2],v=h;u:if(e&&(_=f[t+536>>2],d=(v=f[t+544>>2])+(o=f[t+540>>2])|0,e>>>0>f[_>>2]-d>>>0&&Ae(_,d,e,8,88),Pe((d=f[_+4>>2])+(g=k(e=e+o|0,88))|0,d+k(o,88)|0,k(v,88)),f[t+540>>2]=e,v=h,(0|(o=e))!=(0|(e=f[_+8>>2]))))for(G=(o=f[_+4>>2])+g|0,g=h+88|0,e=o+k(e,88)|0,o=h;;){if(v=g,!E){v=y;break u}if(d=o+88|0,!(p=f[o+4>>2])&2==(0|(g=f[o>>2]))){v=d;break u}if(ze(W=t+560|0,o+8|0,80),f[e>>2]=g,f[e+4>>2]=p,ze(e+8|0,W,80),f[_+8>>2]=f[_+8>>2]+1,g=v+88|0,E=E-88|0,o=d,(0|G)==(0|(e=e+88|0)))break}if((0|v)!=(0|y))for(E=(y-v>>>0)/88|0,g=0;;){if(y=k(g,88)+v|0,d=f[(_=y+76|0)>>2],o=f[y+80>>2]){e=0;u:{if(1!=(0|o)){for(G=1&o,p=-2&o,o=d;fi[f[f[o>>2]+16>>2]](o+12|0,f[o+4>>2],f[o+8>>2]),fi[f[f[o+16>>2]+16>>2]](o+28|0,f[o+20>>2],f[o+24>>2]),o=o+32|0,(0|p)!=(0|(e=e+2|0)););if(!G)break u}fi[f[f[(e=(e<<4)+d|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}d=f[_>>2]}if(o=f[y+72>>2]){if((e=-8&(y=f[d-4>>2]))>>>0<((o<<=4)|((y&=3)?4:8))>>>0)break i;if(e>>>0>o+39>>>0&&y)break e;nr(d)}if((0|E)==(0|(g=g+1|0)))break}if(C){if((e=-8&(o=f[h-4>>2]))>>>0<(v=k(C,88))+((o&=3)?4:8)>>>0)break i;if(e>>>0>v+39>>>0&&o)break e;nr(h)}}mr(L),fi[f[f[t+472>>2]+16>>2]](U,f[t+476>>2],f[t+480>>2]),w=w+I|0,o=f[t+280>>2]}if(!((w=w+1|0)>>>0>>0))break}if(v=a[t+154>>1],e=a[t+152>>1],!o)break f;o=f[t+276>>2]}else v=a[t+154>>1],e=a[t+152>>1],o=f[t+276>>2];if(n[o+68|0]){if(1==n[o+70|0]){w=n[o+71|0]<<3,d=n[o+69|0];break A}Ve(1056652),$f()}Ve(1056636),$f()}break i}f[t+264>>2]=0}v=a[t+154>>1],e=a[t+152>>1]}w=0,d=0}(o=V(27))||(Ze(1,1056668),$f()),f[t+564>>2]=o,f[t+560>>2]=27,i[0|o]=3,f[t+568>>2]=1,1==f[t+560>>2]&&de(t+560|0,1056684),i[f[t+564>>2]+1|0]=25,f[t+568>>2]=2,o=2,2==(2147483646&f[t+560>>2])&&(Ae(t+560|0,2,2,1,1),o=f[t+568>>2]),h=f[t+564>>2]+o|0,i[0|h]=0,i[h+1|0]=2,h=o+2|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056700),i[h+f[t+564>>2]|0]=0,h=o+3|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056716),i[h+f[t+564>>2]|0]=4,h=o+4|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056732),i[h+f[t+564>>2]|0]=17,h=o+5|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056748),i[h+f[t+564>>2]|0]=64,h=o+6|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056764),i[h+f[t+564>>2]|0]=21,h=o+7|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056780),i[h+f[t+564>>2]|0]=0,h=o+8|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056796),i[h+f[t+564>>2]|0]=0,h=o+9|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056812),i[h+f[t+564>>2]|0]=0,h=o+10|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056828),i[h+f[t+564>>2]|0]=0,h=o+11|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056844),i[h+f[t+564>>2]|0]=0,h=o+12|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056860),i[h+f[t+564>>2]|0]=0,h=o+13|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056876),i[h+f[t+564>>2]|0]=0,h=o+14|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056892),i[h+f[t+564>>2]|0]=0,h=o+15|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056908),i[h+f[t+564>>2]|0]=0,h=o+16|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056924),i[h+f[t+564>>2]|0]=0,h=o+17|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056940),i[h+f[t+564>>2]|0]=0,h=o+18|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056956),i[h+f[t+564>>2]|0]=5,h=o+19|0,f[t+568>>2]=h,(0|h)==f[t+560>>2]&&de(t+560|0,1056972),i[h+f[t+564>>2]|0]=2,o=o+20|0,f[t+568>>2]=o,f[t+560>>2]-o>>>0<=1&&(Ae(t+560|0,o,2,1,1),o=f[t+568>>2]),o=f[t+564>>2]+o|0,d=16+((254&d)>>>1|0)|(d<<7)+w<<8,i[0|o]=d,i[o+1|0]=d>>>8,d=(o=f[t+568>>2])+2|0,f[t+568>>2]=d,(0|d)==f[t+560>>2]&&de(t+560|0,1056988),i[d+f[t+564>>2]|0]=6,d=o+3|0,f[t+568>>2]=d,(0|d)==f[t+560>>2]&&de(t+560|0,1057004),i[d+f[t+564>>2]|0]=1,d=o+4|0,f[t+568>>2]=d,(0|d)==f[t+560>>2]&&de(t+560|0,1057020),i[d+f[t+564>>2]|0]=2,f[(d=t+296|0)>>2]=o+5,o=f[t+564>>2],f[t+288>>2]=f[t+560>>2],f[t+292>>2]=o;A:{f:{if(1==f[t+72>>2]){if(!f[t+88>>2])break f;if(f[t+104>>2]){if(o=f[t+80>>2],h=f[t+84>>2],g=f[t+96>>2],w=f[t+100>>2],y=f[t+276>>2],f[r+56>>2]=f[t+272>>2],f[r+60>>2]=y,i[r+93|0]=Z,f[r+88>>2]=1024,f[r+84>>2]=m,A[r+70>>1]=v,A[r+68>>1]=e,e=f[t+116>>2],f[r+48>>2]=f[t+112>>2],f[r+52>>2]=e,f[r+40>>2]=g,f[r+44>>2]=w,f[r+32>>2]=o,f[r+36>>2]=h,f[r+24>>2]=T,f[r+28>>2]=O,b[r+16>>3]=D,f[r>>2]=0,f[r+4>>2]=0,e=f[t+292>>2],f[r+72>>2]=f[t+288>>2],f[r+76>>2]=e,f[r- -64>>2]=f[t+280>>2],f[r+80>>2]=f[d>>2],i[r+92|0]=F,(r=f[t+136>>2])&&fi[f[r+16>>2]](t+148|0,f[t+140>>2],f[t+144>>2]),!(!f[t+164>>2]&2==f[t+160>>2])){if(w=f[t+236>>2],r=f[t+240>>2]){e=0;n:{if(1!=(0|r)){for(v=1&r,r&=-2,o=w;fi[f[f[o>>2]+16>>2]](o+12|0,f[o+4>>2],f[o+8>>2]),fi[f[f[o+16>>2]+16>>2]](o+28|0,f[o+20>>2],f[o+24>>2]),o=o+32|0,(0|r)!=(0|(e=e+2|0)););if(!v)break n}fi[f[f[(r=(e<<4)+w|0)>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2])}w=f[t+236>>2]}if(e=f[t+232>>2]){if((r=-8&(o=f[w-4>>2]))>>>0<((e<<=4)|((o&=3)?4:8))>>>0)break i;if(r>>>0>e+39>>>0&&o)break A;nr(w)}}return void(S=t+640|0)}Ve(1056348),$f()}Ve(1056316),$f()}Ve(1056332),$f()}break e}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}f[r+16>>2]=4,f[r+20>>2]=0,Me(r+8|0,1056604),$f()}function L(r,e,A,a,t,b,u,o){var c,s=0,l=0,h=0,v=0,d=0,w=0;S=c=S-16|0,s=t<<24|(65280&t)<<8|t>>>8&65280|t>>>24;r:{e:{i:{A:{if(t=f[e+4>>2],f[e+8>>2]-t>>>0>=4)l=f[e>>2]+t|0,i[0|l]=s,i[l+1|0]=s>>>8,i[l+2|0]=s>>>16,i[l+3|0]=s>>>24;else if(or(e,4),l=(t=f[e+4>>2])+f[e>>2]|0,i[0|l]=s,i[l+1|0]=s>>>8,i[l+2|0]=s>>>16,i[l+3|0]=s>>>24,(l=f[e+8>>2]-t|0)>>>0<=3)break A;t=t+4|0,f[e+4>>2]=t,f[e+8>>2]-t>>>0<=3&&(or(e,4),t=f[e+4>>2]),t=f[e>>2]+t|0,i[0|t]=109,i[t+1|0]=111,i[t+2|0]=111,i[t+3|0]=102;f:if(!((h=(s=f[e+8>>2])-(t=f[e+4>>2])|0)>>>0<=3)){if(t=t+4|0,f[e+4>>2]=t,s-t>>>0>=4)s=f[e>>2]+t|0,i[0|s]=0,i[s+1|0]=0,i[s+2|0]=0,i[s+3|0]=16;else if(or(e,4),s=(t=f[e+4>>2])+f[e>>2]|0,i[0|s]=0,i[s+1|0]=0,i[s+2|0]=0,i[s+3|0]=16,(l=f[e+8>>2]-t|0)>>>0<=3)break A;if(t=t+4|0,f[e+4>>2]=t,f[e+8>>2]-t>>>0<=3&&(or(e,4),t=f[e+4>>2]),t=f[e>>2]+t|0,i[0|t]=109,i[t+1|0]=102,i[t+2|0]=104,i[t+3|0]=100,!((h=(s=f[e+8>>2])-(t=f[e+4>>2])|0)>>>0<=3)){if(t=t+4|0,f[e+4>>2]=t,s-t>>>0>=4)s=f[e>>2]+t|0,i[0|s]=0,i[s+1|0]=0,i[s+2|0]=0,i[s+3|0]=0;else if(or(e,4),s=(t=f[e+4>>2])+f[e>>2]|0,i[0|s]=0,i[s+1|0]=0,i[s+2|0]=0,i[s+3|0]=0,(l=f[e+8>>2]-t|0)>>>0<=3)break A;if(t=t+4|0,f[e+4>>2]=t,f[e+8>>2]-t>>>0>=4)s=f[e>>2]+t|0,i[0|s]=0,i[s+1|0]=0,i[s+2|0]=0,i[s+3|0]=0;else if(or(e,4),s=(t=f[e+4>>2])+f[e>>2]|0,i[0|s]=0,i[s+1|0]=0,i[s+2|0]=0,i[s+3|0]=0,(l=f[e+8>>2]-t|0)>>>0<=3)break A;t=t+4|0,f[e+4>>2]=t;n:{a:{t:{b:{k:{if(A){if(s=(s=(v=(l=f[A+64>>2])<<4)+72|0)<<24|(65280&s)<<8|s>>>8&65280|s>>>24,f[e+8>>2]-t>>>0>=4)h=f[e>>2]+t|0,i[0|h]=s,i[h+1|0]=s>>>8,i[h+2|0]=s>>>16,i[h+3|0]=s>>>24;else if(or(e,4),h=(t=f[e+4>>2])+f[e>>2]|0,i[0|h]=s,i[h+1|0]=s>>>8,i[h+2|0]=s>>>16,i[h+3|0]=s>>>24,(h=f[e+8>>2]-t|0)>>>0<=3)break f;if(t=t+4|0,f[e+4>>2]=t,f[e+8>>2]-t>>>0<=3&&(or(e,4),t=f[e+4>>2]),t=f[e>>2]+t|0,i[0|t]=116,i[t+1|0]=114,i[t+2|0]=97,i[t+3|0]=102,t=f[e+4>>2],(h=f[e+8>>2]-t|0)>>>0<=3)break f;if(f[e+4>>2]=t+4,Ir(e,f[A+24>>2],1),t=f[e+4>>2],f[e+8>>2]-t>>>0<=3&&(or(e,4),t=f[e+4>>2]),t=f[e>>2]+t|0,i[0|t]=0,i[t+1|0]=1,i[t+2|0]=0,i[t+3|0]=0,t=f[e+4>>2],(h=f[e+8>>2]-t|0)>>>0<=3)break f;if(f[e+4>>2]=t+4,Nr(e,9e4,b,u,o),s=(t=v+20|0)<<24|(65280&t)<<8|t>>>8&65280|t>>>24,d=f[A+60>>2],t=f[e+4>>2],f[e+8>>2]-t>>>0>=4)A=f[e>>2]+t|0,i[0|A]=s,i[A+1|0]=s>>>8,i[A+2|0]=s>>>16,i[A+3|0]=s>>>24;else if(or(e,4),A=(t=f[e+4>>2])+f[e>>2]|0,i[0|A]=s,i[A+1|0]=s>>>8,i[A+2|0]=s>>>16,i[A+3|0]=s>>>24,(A=f[e+8>>2]-t|0)>>>0<=3)break i;if(A=t+4|0,f[e+4>>2]=A,f[e+8>>2]-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=116,i[A+1|0]=114,i[A+2|0]=117,i[A+3|0]=110,(h=(t=f[e+8>>2])-(A=f[e+4>>2])|0)>>>0<=3)break f;if(A=A+4|0,f[e+4>>2]=A,t-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=1,i[A+1|0]=0,i[A+2|0]=15,i[A+3|0]=1,(t=(s=f[e+8>>2])-(A=f[e+4>>2])|0)>>>0<=3)break k;if(t=A+4|0,f[e+4>>2]=t,A=l<<24|(65280&l)<<8|l>>>8&65280|l>>>24,s-t>>>0>=4)s=f[e>>2]+t|0,i[0|s]=A,i[s+1|0]=A>>>8,i[s+2|0]=A>>>16,i[s+3|0]=A>>>24;else if(or(e,4),s=(t=f[e+4>>2])+f[e>>2]|0,i[0|s]=A,i[s+1|0]=A>>>8,i[s+2|0]=A>>>16,i[s+3|0]=A>>>24,(A=f[e+8>>2]-t|0)>>>0<=3)break i;if(t=t+4|0,f[e+4>>2]=t,A=(A=v+104|0)<<24|(65280&A)<<8|A>>>8&65280|A>>>24,f[e+8>>2]-t>>>0>=4)s=f[e>>2]+t|0,i[0|s]=A,i[s+1|0]=A>>>8,i[s+2|0]=A>>>16,i[s+3|0]=A>>>24;else if(or(e,4),s=(t=f[e+4>>2])+f[e>>2]|0,i[0|s]=A,i[s+1|0]=A>>>8,i[s+2|0]=A>>>16,i[s+3|0]=A>>>24,(A=f[e+8>>2]-t|0)>>>0<=3)break i;if(t=t+4|0,f[e+4>>2]=t,l)for(w=k(l,120),l=0;;){if(1!=f[(v=l+d|0)- -64>>2])break b;if(A=(A=f[v+72>>2])<<24|(65280&A)<<8|A>>>8&65280|A>>>24,f[e+8>>2]-t>>>0>=4)s=f[e>>2]+t|0,i[0|s]=A,i[s+1|0]=A>>>8,i[s+2|0]=A>>>16,i[s+3|0]=A>>>24;else if(or(e,4),s=(t=f[e+4>>2])+f[e>>2]|0,i[0|s]=A,i[s+1|0]=A>>>8,i[s+2|0]=A>>>16,i[s+3|0]=A>>>24,(h=f[e+8>>2]-t|0)>>>0<=3)break f;if(t=t+4|0,f[e+4>>2]=t,!f[v+80>>2])break t;if(A=(A=f[v+116>>2])<<24|(65280&A)<<8|A>>>8&65280|A>>>24,s=f[v+88>>2],f[e+8>>2]-t>>>0>=4)h=f[e>>2]+t|0,i[0|h]=A,i[h+1|0]=A>>>8,i[h+2|0]=A>>>16,i[h+3|0]=A>>>24;else if(or(e,4),h=(t=f[e+4>>2])+f[e>>2]|0,i[0|h]=A,i[h+1|0]=A>>>8,i[h+2|0]=A>>>16,i[h+3|0]=A>>>24,(h=f[e+8>>2]-t|0)>>>0<=3)break f;A=t+4|0,f[e+4>>2]=A;u:{if(!n[v+96|0]){if(f[e+8>>2]-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=0,i[A+1|0]=1,i[A+2|0]=0,i[A+3|0]=0,(h=(A=f[e+8>>2])-(t=f[e+4>>2])|0)>>>0>3)break u;break f}if(f[e+8>>2]-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=2,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(h=(A=f[e+8>>2])-(t=f[e+4>>2])|0)>>>0<=3)break f}if(t=t+4|0,f[e+4>>2]=t,s=s<<24|(65280&s)<<8|s>>>8&65280|s>>>24,A-t>>>0>=4)A=f[e>>2]+t|0,i[0|A]=s,i[A+1|0]=s>>>8,i[A+2|0]=s>>>16,i[A+3|0]=s>>>24;else if(or(e,4),A=(t=f[e+4>>2])+f[e>>2]|0,i[0|A]=s,i[A+1|0]=s>>>8,i[A+2|0]=s>>>16,i[A+3|0]=s>>>24,(A=f[e+8>>2]-t|0)>>>0<=3)break i;if(t=t+4|0,f[e+4>>2]=t,(0|w)==(0|(l=l+120|0)))break}}if(!a)break n;if(A=(A=(h=(s=f[a+72>>2])<<2)+72|0)<<24|(65280&A)<<8|A>>>8&65280|A>>>24,v=f[a>>2],f[e+8>>2]-t>>>0>=4)l=f[e>>2]+t|0,i[0|l]=A,i[l+1|0]=A>>>8,i[l+2|0]=A>>>16,i[l+3|0]=A>>>24;else if(or(e,4),l=(t=f[e+4>>2])+f[e>>2]|0,i[0|l]=A,i[l+1|0]=A>>>8,i[l+2|0]=A>>>16,i[l+3|0]=A>>>24,(l=f[e+8>>2]-t|0)>>>0<=3)break A;if(A=t+4|0,f[e+4>>2]=A,f[e+8>>2]-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=116,i[A+1|0]=114,i[A+2|0]=97,i[A+3|0]=102,A=f[e+4>>2],(l=f[e+8>>2]-A|0)>>>0<=3)break A;if(f[e+4>>2]=A+4,Ir(e,f[a+96>>2],2),A=f[e+4>>2],f[e+8>>2]-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=2,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,A=f[e+4>>2],(l=f[e+8>>2]-A|0)>>>0<=3)break A;if(f[e+4>>2]=A+4,Nr(e,f[a+92>>2],b,u,o),A=(A=h+20|0)<<24|(65280&A)<<8|A>>>8&65280|A>>>24,t=f[e+4>>2],f[e+8>>2]-t>>>0>=4)b=f[e>>2]+t|0,i[0|b]=A,i[b+1|0]=A>>>8,i[b+2|0]=A>>>16,i[b+3|0]=A>>>24;else if(or(e,4),b=(t=f[e+4>>2])+f[e>>2]|0,i[0|b]=A,i[b+1|0]=A>>>8,i[b+2|0]=A>>>16,i[b+3|0]=A>>>24,(o=f[e+8>>2]-t|0)>>>0<=3)break e;if(A=t+4|0,f[e+4>>2]=A,f[e+8>>2]-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=116,i[A+1|0]=114,i[A+2|0]=117,i[A+3|0]=110,(l=(t=f[e+8>>2])-(A=f[e+4>>2])|0)>>>0<=3)break A;if(A=A+4|0,f[e+4>>2]=A,t-A>>>0<=3&&(or(e,4),A=f[e+4>>2]),A=f[e>>2]+A|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=2,i[A+3|0]=1,(o=(b=f[e+8>>2])-(A=f[e+4>>2])|0)>>>0<=3)break e;if(t=A+4|0,f[e+4>>2]=t,A=s<<24|(65280&s)<<8|s>>>8&65280|s>>>24,b-t>>>0>=4)b=f[e>>2]+t|0,i[0|b]=A,i[b+1|0]=A>>>8,i[b+2|0]=A>>>16,i[b+3|0]=A>>>24;else if(or(e,4),b=(t=f[e+4>>2])+f[e>>2]|0,i[0|b]=A,i[b+1|0]=A>>>8,i[b+2|0]=A>>>16,i[b+3|0]=A>>>24,(o=f[e+8>>2]-t|0)>>>0<=3)break e;if(t=t+4|0,f[e+4>>2]=t,A=(A=h+104|0)<<24|(65280&A)<<8|A>>>8&65280|A>>>24,f[e+8>>2]-t>>>0>=4)b=f[e>>2]+t|0,i[0|b]=A,i[b+1|0]=A>>>8,i[b+2|0]=A>>>16,i[b+3|0]=A>>>24;else if(or(e,4),b=(t=f[e+4>>2])+f[e>>2]|0,i[0|b]=A,i[b+1|0]=A>>>8,i[b+2|0]=A>>>16,i[b+3|0]=A>>>24,(o=f[e+8>>2]-t|0)>>>0<=3)break e;if(t=t+4|0,f[e+4>>2]=t,A=f[a+68>>2],!(1&v))break a;if(!s)break n;for(l=k(s,104),A=A+100|0,a=f[e+8>>2];;){if(b=(b=f[A>>2])<<24|(65280&b)<<8|b>>>8&65280|b>>>24,a-t>>>0>=4)u=f[e>>2]+t|0,i[0|u]=b,i[u+1|0]=b>>>8,i[u+2|0]=b>>>16,i[u+3|0]=b>>>24;else if(or(e,4),a=(t=f[e+4>>2])+f[e>>2]|0,i[0|a]=b,i[a+1|0]=b>>>8,i[a+2|0]=b>>>16,i[a+3|0]=b>>>24,(o=(a=f[e+8>>2])-t|0)>>>0<=3)break e;if(t=t+4|0,f[e+4>>2]=t,A=A+104|0,!(l=l-104|0))break}break n}f[c+12>>2]=t;break r}Ve(1055044),$f()}Ve(1055060),$f()}if(s)for(l=k(s,88),A=A+84|0,a=f[e+8>>2];;){if(b=(b=f[A>>2])<<24|(65280&b)<<8|b>>>8&65280|b>>>24,a-t>>>0>=4)u=f[e>>2]+t|0,i[0|u]=b,i[u+1|0]=b>>>8,i[u+2|0]=b>>>16,i[u+3|0]=b>>>24;else if(or(e,4),a=(t=f[e+4>>2])+f[e>>2]|0,i[0|a]=b,i[a+1|0]=b>>>8,i[a+2|0]=b>>>16,i[a+3|0]=b>>>24,(o=(a=f[e+8>>2])-t|0)>>>0<=3)break e;if(t=t+4|0,f[e+4>>2]=t,A=A+88|0,!(l=l-88|0))break}}return f[r>>2]=-2147483648,void(S=c+16|0)}}f[c+12>>2]=h;break r}f[c+12>>2]=l;break r}f[c+12>>2]=A;break r}f[c+12>>2]=o}f[c+8>>2]=4,pe(c+8|0),$f()}function U(r,e){var A,a=0,b=0,u=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0;S=A=S-496|0,f[A+400>>2]=0,f[A+384>>2]=0,f[A+368>>2]=0,f[A+344>>2]=0,f[A+328>>2]=0,R=c=f[e+108>>2];r:{e:{i:{A:{f:{n:{a:{t:{b:{if(2!=(0|(Q=f[e+104>>2]))|c){if(v=24,-2147483648!=(0|(N=f[e+240>>2]))&&(u=f[e+248>>2])){c=f[e+244>>2];k:{if(1==(0|u))a=62;else{for(h=1&u,w=-2&u,b=c;u=f[(a=b+72|0)>>2],d=124+(f[(!f[b+4>>2]&t[b>>2]<2?68:60)+b>>2]+(f[72+((!f[a+4>>2]&u>>>0<2?68:60)+b|0)>>2]+d|0)|0)|0,b=b+144|0,(0|w)!=(0|(y=y+2|0)););if(!h)break k;a=d+62|0}u=c+k(y,72)|0,c=f[u>>2],d=f[u+(!f[u+4>>2]&c>>>0<2?68:60)>>2]+a|0}v=d+24|0}if(l=f[e+232>>2],C=f[e+236>>2],h=f[e+136>>2],_=f[e+140>>2],u=f[e+144>>2],g=f[e+148>>2],B=96+((c=f[e+168>>2])<<4)|0,f[A+408>>2]=B,c){if(a=f[e+164>>2],y=3&c,c>>>0<4)d=0;else for(b=a+476|0,c&=33554428,d=0;d=f[b>>2]+(f[b-120>>2]+(f[b-240>>2]+(f[b-360>>2]+d|0)|0)|0)|0,b=b+480|0,(0|c)!=(0|(E=E+4|0)););if(y)for(b=116+(a+k(E,120)|0)|0;d=f[b>>2]+d|0,b=b+120|0,y=y-1|0;);w=d+8|0}else w=8;f[A+412>>2]=w;k:{u:{o:{if((0|(b=w+(v+B|0)|0))>=0){if(!b){f[A+440>>2]=0,f[A+444>>2]=1,f[A+432>>2]=1,f[A+436>>2]=0;break u}if(E=V(b))break o;r=1}else r=0;Ze(r,1058752),$f()}if(f[A+436>>2]=0,f[A+432>>2]=E,f[A+440>>2]=b,f[A+444>>2]=b>>>0>131071?29:129-(o(b>>>10|0)<<2)|0,a=0,b>>>0>23)break k}or(A+432|0,24),b=f[A+440>>2],E=f[A+432>>2],a=f[A+436>>2]}if(s=n[1054744]|n[1054745]<<8|n[1054746]<<16|n[1054747]<<24,c=a+E|0,v=n[1054740]|n[1054741]<<8|n[1054742]<<16|n[1054743]<<24,i[0|c]=v,i[c+1|0]=v>>>8,i[c+2|0]=v>>>16,i[c+3|0]=v>>>24,i[c+4|0]=s,i[c+5|0]=s>>>8,i[c+6|0]=s>>>16,i[c+7|0]=s>>>24,s=n[1054760]|n[1054761]<<8|n[1054762]<<16|n[1054763]<<24,I=c+16|0,v=n[1054756]|n[1054757]<<8|n[1054758]<<16|n[1054759]<<24,i[0|I]=v,i[I+1|0]=v>>>8,i[I+2|0]=v>>>16,i[I+3|0]=v>>>24,i[I+4|0]=s,i[I+5|0]=s>>>8,i[I+6|0]=s>>>16,i[I+7|0]=s>>>24,v=n[1054752]|n[1054753]<<8|n[1054754]<<16|n[1054755]<<24,s=c+8|0,c=n[1054748]|n[1054749]<<8|n[1054750]<<16|n[1054751]<<24,i[0|s]=c,i[s+1|0]=c>>>8,i[s+2|0]=c>>>16,i[s+3|0]=c>>>24,i[s+4|0]=v,i[s+5|0]=v>>>8,i[s+6|0]=v>>>16,i[s+7|0]=v>>>24,(b=b-a|0)>>>0<=23)break r;if(I=e+104|0,c=u-l|0,b=(u=g-((u>>>0>>0)+C|0)|0)-2|0,g=(g=(0|u)<-1)?u+2|0:u,g=C+((u=(0|u)>0)?b:g)|0,g=(c=c+l|0)>>>0>>0?g+1|0:g,b=a+24|0,f[A+436>>2]=b,-2147483648!=(0|N)&&(u=f[e+248>>2])){for(b=f[e+244>>2],d=k(u,72);K(A+432|0,b),b=b+72|0,d=d-72|0;);b=f[A+436>>2]}if(d=v=A+432|0,L(N=A+456|0,v,I,0,B,c,g,9e4),-2147483648!=(0|(E=f[A+456>>2])))break i;if(u=(a=f[A+436>>2])-b|0,f[A+416>>2]=u,(0|u)!=(0|B))break b;if(tr(v,I,0,w),u=f[A+436>>2]-a|0,f[A+420>>2]=u,(0|u)!=(0|w))break t;if(w=h-l|0,h=u=_-((l>>>0>h>>>0)+C|0)|0,v=u+2|0,a=w,u=(u=(0|u)<-1)?v:h,_=h-2|0,v=f[(s=A+440|0)+4>>2],f[(b=A+464|0)>>2]=f[s>>2],f[b+4>>2]=v,v=f[A+436>>2],f[A+456>>2]=f[A+432>>2],f[A+460>>2]=v,Lr(A+480|0,N),(v=f[A+328>>2])&&fi[f[v+16>>2]](A+340|0,f[A+332>>2],f[A+336>>2]),v=f[(s=A+488|0)+4>>2],f[(b=A+336|0)>>2]=f[s>>2],f[b+4>>2]=v,v=f[A+484>>2],f[A+328>>2]=f[A+480>>2],f[A+332>>2]=v,b=0,v=C+((h=(0|h)>0)?_:u)|0,s=(a=(a=h?w:a)+l|0)>>>0>>0?v+1|0:v,I=f[A+368>>2]){u=g,h=_=f[A+364>>2],d=w=f[A+360>>2];k:{u:switch((I>>>0<9e4)-(I>>>0>9e4)&255){default:9e4!=(0|I)&&(Ue(A+272|0,w,h,l=h>>31,l,9e4,0,0,0),Le(A+256|0,f[A+272>>2],f[A+276>>2],f[A+280>>2],f[A+284>>2],I),w=f[A+256>>2],h=f[A+260>>2]),h=c>>>0>>0&(0|h)>=(0|g)|(0|u)<(0|h);break k;case 0:h=c>>>0>>0&(0|h)>=(0|g)|(0|u)<(0|h);break k;case 1:break u}9e4!=(0|I)?(Ue(A+304|0,c,u,l=g>>31,l,I,0,0,0),Le(A+288|0,f[A+304>>2],f[A+308>>2],f[A+312>>2],f[A+316>>2],9e4),l=f[A+292>>2],v=f[A+288>>2]):(l=u,v=c),h=v>>>0>>0&(0|l)<=(0|h)|(0|l)<(0|h)}w=h?c:d,_=h?u:_,u=h?9e4:I}else u=0;if(f[A+368>>2]=u||9e4,f[A+360>>2]=u?w:c,f[A+364>>2]=u?_:g,_=f[A+384>>2]){u=s,g=v=f[A+380>>2],b=c=f[A+376>>2];k:{u:switch((_>>>0<9e4)-(_>>>0>9e4)&255){default:9e4!=(0|_)&&(Ue(A+208|0,c,g,l=g>>31,l,9e4,0,0,0),Le(A+192|0,f[A+208>>2],f[A+212>>2],f[A+216>>2],f[A+220>>2],_),c=f[A+192>>2],g=f[A+196>>2]),w=a>>>0>>0&(0|s)<=(0|g)|(0|u)<(0|g);break k;case 0:w=a>>>0>>0&(0|s)<=(0|g)|(0|u)<(0|g);break k;case 1:break u}9e4!=(0|_)?(Ue(A+240|0,a,u,l=s>>31,l,_,0,0,0),Le(A+224|0,f[A+240>>2],f[A+244>>2],f[A+248>>2],f[A+252>>2],9e4),h=f[A+228>>2],w=f[A+224>>2]):(h=u,w=a),w=(0|h)<=(0|g)&c>>>0>w>>>0|(0|h)<(0|g)}c=w?a:b,b=w?9e4:_,g=w?u:v}f[A+400>>2]=9e4,f[A+384>>2]=b||9e4,f[A+392>>2]=a,f[A+396>>2]=s,f[A+376>>2]=b?c:a,f[A+380>>2]=b?g:s}if(h=f[e>>2],!f[e+4>>2]&2==(0|h))break n;if(c=(u=f[e+48>>2])-(w=f[e+232>>2])|0,_=f[e+236>>2],l=(u=f[e+52>>2]-(_+(u>>>0>>0)|0)|0)-2|0,a=(a=(0|u)<-1)?u+2|0:u,l=_+((u=(0|u)>0)?l:a)|0,v=(u=c+w|0)>>>0>>0?l+1|0:l,(N=9e4==(0|(B=f[e+92>>2])))||(Ue(A+176|0,B,0,0,0,a=u,v,u=v>>31,u),Le(A+160|0,f[A+176>>2],f[A+180>>2],f[A+184>>2],f[A+188>>2],9e4),v=f[A+164>>2],u=f[A+160>>2]),c=(a=f[e+40>>2])-w|0,b=(a=f[e+44>>2]-((a>>>0>>0)+_|0)|0)-2|0,g=(g=(0|a)<-1)?a+2|0:a,l=_+((a=(0|a)>0)?b:g)|0,g=(c=c+w|0)>>>0>>0?l+1|0:l,N||(Ue(A+144|0,B,0,0,0,c,g,l=g>>31,l),Le(A+128|0,f[A+144>>2],f[A+148>>2],f[A+152>>2],f[A+156>>2],9e4),g=f[A+132>>2],c=f[A+128>>2]),l=24,I=2!=(0|Q)|!!(0|R)|-2147483648==f[e+240>>2])break a;if(!(s=f[e+248>>2]))break a;a=f[e+244>>2];k:{if(1!=(0|s)){for(R=1&s,N=-2&s,d=0,b=a,y=0;l=f[(s=b+72|0)>>2],d=124+(f[(!f[b+4>>2]&t[b>>2]<2?68:60)+b>>2]+(f[72+((!f[s+4>>2]&l>>>0<2?68:60)+b|0)>>2]+d|0)|0)|0,b=b+144|0,(0|N)!=(0|(y=y+2|0)););if(!R)break k;s=d+62|0}else y=0,s=62;l=a+k(y,72)|0,a=f[l>>2],d=f[l+(!f[l+4>>2]&a>>>0<2?68:60)>>2]+s|0}l=d+24|0;break a}f[A+468>>2]=0,f[A+472>>2]=0,f[A+460>>2]=1,f[A+464>>2]=4,f[A+456>>2]=1054700,Se(A+416|0,A+408|0,A+456|0,1054764),$f()}f[A+468>>2]=0,f[A+472>>2]=0,f[A+460>>2]=1,f[A+464>>2]=4,f[A+456>>2]=1054700,Se(A+420|0,A+412|0,A+456|0,1054780),$f()}N=96+((a=f[e+72>>2])<<2)|0,f[A+424>>2]=N,s=f[e+68>>2];a:if(1&h){if(!a){b=0;break a}if(y=3&a,a>>>0<4)b=0,E=0;else for(d=s+412|0,a&=-4,b=0,E=0;b=f[d>>2]+(f[d-104>>2]+(f[d-208>>2]+(f[d-312>>2]+b|0)|0)|0)|0,d=d+416|0,(0|a)!=(0|(E=E+4|0)););if(!y)break a;for(d=100+(s+k(E,104)|0)|0;b=f[d>>2]+b|0,d=d+104|0,y=y-1|0;);}else if(a){if(y=3&a,a>>>0<4)b=0,E=0;else for(d=s+348|0,a&=-4,b=0,E=0;b=f[d>>2]+(f[d-88>>2]+(f[d-176>>2]+(f[d-264>>2]+b|0)|0)|0)|0,d=d+352|0,(0|a)!=(0|(E=E+4|0)););if(y)for(d=84+(s+k(E,88)|0)|0;b=f[d>>2]+b|0,d=d+88|0,y=y-1|0;);}else b=0;Q=b+8|0,f[A+428>>2]=Q;a:{t:{b:{if((0|(b=Q+(l+N|0)|0))>=0){if(!b){f[A+440>>2]=0,f[A+444>>2]=1,f[A+432>>2]=1,f[A+436>>2]=0;break t}if(y=V(b))break b;r=1}else r=0;Ze(r,1058752),$f()}if(f[A+436>>2]=0,f[A+432>>2]=y,f[A+440>>2]=b,f[A+444>>2]=b>>>0>131071?29:129-(o(b>>>10|0)<<2)|0,a=0,b>>>0>23)break a}or(A+432|0,24),b=f[A+440>>2],y=f[A+432>>2],a=f[A+436>>2]}if(s=n[1054744]|n[1054745]<<8|n[1054746]<<16|n[1054747]<<24,h=a+y|0,l=n[1054740]|n[1054741]<<8|n[1054742]<<16|n[1054743]<<24,i[0|h]=l,i[h+1|0]=l>>>8,i[h+2|0]=l>>>16,i[h+3|0]=l>>>24,i[h+4|0]=s,i[h+5|0]=s>>>8,i[h+6|0]=s>>>16,i[h+7|0]=s>>>24,s=n[1054760]|n[1054761]<<8|n[1054762]<<16|n[1054763]<<24,R=h+16|0,l=n[1054756]|n[1054757]<<8|n[1054758]<<16|n[1054759]<<24,i[0|R]=l,i[R+1|0]=l>>>8,i[R+2|0]=l>>>16,i[R+3|0]=l>>>24,i[R+4|0]=s,i[R+5|0]=s>>>8,i[R+6|0]=s>>>16,i[R+7|0]=s>>>24,l=n[1054752]|n[1054753]<<8|n[1054754]<<16|n[1054755]<<24,s=h+8|0,h=n[1054748]|n[1054749]<<8|n[1054750]<<16|n[1054751]<<24,i[0|s]=h,i[s+1|0]=h>>>8,i[s+2|0]=h>>>16,i[s+3|0]=h>>>24,i[s+4|0]=l,i[s+5|0]=l>>>8,i[s+6|0]=l>>>16,i[s+7|0]=l>>>24,(b=b-a|0)>>>0<=23)break r;if(b=a+24|0,f[A+436>>2]=b,!I&&(a=f[e+248>>2])){for(b=f[e+244>>2],d=k(a,72);K(A+432|0,b),b=b+72|0,d=d-72|0;);b=f[A+436>>2]}if(d=l=A+432|0,L(s=A+456|0,l,0,e,N,u,v,B),-2147483648!=(0|(E=f[A+456>>2])))break i;if(a=(h=f[A+436>>2])-b|0,f[A+448>>2]=a,(0|a)!=(0|N))break f;if(tr(l,0,e,Q),e=f[A+436>>2]-h|0,f[A+452>>2]=e,(0|e)!=(0|Q))break A;if(e=f[(a=A+440|0)+4>>2],f[(h=A+464|0)>>2]=f[a>>2],f[h+4>>2]=e,e=f[A+436>>2],f[A+456>>2]=f[A+432>>2],f[A+460>>2]=e,Lr(A+480|0,s),(e=f[A+344>>2])&&fi[f[e+16>>2]](A+356|0,f[A+348>>2],f[A+352>>2]),e=f[A+484>>2],f[(a=A+344|0)>>2]=f[A+480>>2],f[a+4>>2]=e,h=a+8|0,e=f[(a=A+488|0)+4>>2],f[h>>2]=f[a>>2],f[h+4>>2]=e,b=0,Q=f[A+368>>2]){e=v,w=s=f[A+364>>2],d=a=f[A+360>>2];a:{t:switch((B>>>0>Q>>>0)-(B>>>0>>0)&255){default:(0|B)!=(0|Q)&&(Ue(A+80|0,a,w,l=w>>31,l,B,0,0,0),Le(A- -64|0,f[A+80>>2],f[A+84>>2],f[A+88>>2],f[A+92>>2],Q),a=f[A+64>>2],w=f[A+68>>2]),a=(0|v)<=(0|w)&a>>>0>u>>>0|(0|e)<(0|w);break a;case 0:a=(0|v)<=(0|w)&a>>>0>u>>>0|(0|e)<(0|w);break a;case 1:break t}(0|B)!=(0|Q)?(Ue(A+112|0,u,e,l=v>>31,l,Q,0,0,0),Le(A+96|0,f[A+112>>2],f[A+116>>2],f[A+120>>2],f[A+124>>2],B),l=f[A+100>>2],h=f[A+96>>2]):(l=e,h=u),a=(0|l)<=(0|w)&a>>>0>h>>>0|(0|l)<(0|w)}w=a?u:d,_=a?e:s,e=a?B:Q}else e=0;if(f[A+368>>2]=e||B,f[A+360>>2]=e?w:u,f[A+364>>2]=e?_:v,s=f[A+384>>2]){e=g,a=v=f[A+380>>2],b=u=f[A+376>>2];a:{t:switch((s>>>0>>0)-(s>>>0>B>>>0)&255){default:(0|s)!=(0|B)&&(Ue(A+16|0,h=u,a,u=a>>31,u,B,0,0,0),Le(A,f[A+16>>2],f[A+20>>2],f[A+24>>2],f[A+28>>2],s),u=f[A>>2],a=f[A+4>>2]),a=u>>>0>c>>>0&(0|a)>=(0|g)|(0|e)<(0|a);break a;case 0:a=u>>>0>c>>>0&(0|a)>=(0|g)|(0|e)<(0|a);break a;case 1:break t}(0|s)!=(0|B)?(Ue(A+48|0,c,e,l=g>>31,l,s,0,0,0),Le(A+32|0,f[A+48>>2],f[A+52>>2],f[A+56>>2],f[A+60>>2],B),h=f[A+36>>2],w=f[A+32>>2]):(h=e,w=c),a=u>>>0>w>>>0&(0|a)>=(0|h)|(0|a)>(0|h)}u=a?c:b,b=a?B:s,v=a?e:v}f[A+384>>2]=b||B,f[A+376>>2]=b?u:c,f[A+380>>2]=b?v:g}ze(r+8|0,A+328|0,80),f[r>>2]=0;break e}f[A+468>>2]=0,f[A+472>>2]=0,f[A+460>>2]=1,f[A+464>>2]=4,f[A+456>>2]=1054700,Se(A+448|0,A+424|0,A+456|0,1054796),$f()}f[A+468>>2]=0,f[A+472>>2]=0,f[A+460>>2]=1,f[A+464>>2]=4,f[A+456>>2]=1054700,Se(A+452|0,A+428|0,A+456|0,1054812),$f()}e=f[A+464>>2],f[r+8>>2]=f[A+460>>2],f[r+12>>2]=e,f[r+4>>2]=E,f[r>>2]=1;i:{A:{f:{n:{if(1&(r=f[d+12>>2])){if(!(u=(r=r>>>5|0)+f[d+8>>2]|0))break i;if(r=f[d>>2]-r|0,(c=-8&(e=f[r-4>>2]))>>>0>>0)break A;if(!e|c>>>0<=u+39>>>0)break n;break f}if(e=f[r+16>>2],f[r+16>>2]=e-1,1!=(0|e))break i;if(a=f[r>>2]){if(c=f[r+4>>2],(u=-8&(e=f[c-4>>2]))>>>0>>0)break A;if(u>>>0>a+39>>>0&&e)break f;nr(c)}if((c=-8&(e=f[r-4>>2]))>>>0<((e&=3)?24:28)>>>0)break A;if(e&&c>>>0>=60)break f}nr(r);break i}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}(r=f[A+328>>2])&&fi[f[r+16>>2]](A+340|0,f[A+332>>2],f[A+336>>2]),(r=f[A+344>>2])&&fi[f[r+16>>2]](A+356|0,f[A+348>>2],f[A+352>>2])}return void(S=A+496|0)}f[A+460>>2]=b,f[A+456>>2]=24,pe(A+456|0),$f()}function V(r){var e=0,i=0,A=0,n=0,a=0,b=0,k=0,u=0,c=0,s=0,l=0;r:{e:{i:{A:{f:{n:{a:{t:{if(!(r>>>0>=245)){if(3&(e=(i=f[264978])>>>(r=(a=r>>>0<11?16:r+11&504)>>>3|0)|0)){A=(r=(b=r+(1&~e)|0)<<3)+1059648|0,e=f[r+1059656>>2],(0|A)==(0|(n=f[e+8>>2]))?(s=1059912,l=Ai(b)&i,f[s>>2]=l):(f[n+12>>2]=A,f[A+8>>2]=n),f[e+4>>2]=3|r,f[(r=r+e|0)+4>>2]=1|f[r+4>>2];break e}if(t[264980]>=a>>>0)break n;b:{k:{if(!e){if(!(r=f[264979]))break n;for(r=r?31-o(r-1^r)|0:32,i=f[1059504+(r<<2)>>2],n=(-8&f[i+4>>2])-a|0,e=i;;){if(!(r=f[i+16>>2])&&!(r=f[i+20>>2])){k=f[e+24>>2];u:{o:{if((0|e)==(0|(r=f[e+12>>2]))){if(r=f[e+20>>2],i=f[(r?20:16)+e>>2])break o;r=0;break u}i=f[e+8>>2],f[i+12>>2]=r,f[r+8>>2]=i;break u}for(A=r?e+20|0:e+16|0;b=A,A=(i=f[(r=i)+20>>2])?r+20|0:r+16|0,i=f[(i?20:16)+r>>2];);f[b>>2]=0}if(!k)break b;i=f[e+28>>2];u:{if(f[(A=1059504+(i<<2)|0)>>2]!=(0|e)){if(f[k+16>>2]!=(0|e)){if(f[k+20>>2]=r,r)break u;break b}if(f[k+16>>2]=r,r)break u;break b}if(f[A>>2]=r,!r)break k}if(f[r+24>>2]=k,(i=f[e+16>>2])&&(f[r+16>>2]=i,f[i+24>>2]=r),!(i=f[e+20>>2]))break b;f[r+20>>2]=i,f[i+24>>2]=r;break b}n=(i=(A=(-8&f[r+4>>2])-a|0)>>>0>>0)?A:n,e=i?r:e,i=r}}A=(e=(b=(r=(0-(A=2<>2],(0|A)==(0|(n=f[r+8>>2]))?(s=1059912,l=Ai(b)&i,f[s>>2]=l):(f[n+12>>2]=A,f[A+8>>2]=n),f[r+4>>2]=3|a,A=e-a|0,f[(b=r+a|0)+4>>2]=1|A,f[r+e>>2]=A,(n=f[264980])&&(e=1059648+(-8&n)|0,i=f[264982],(a=f[264978])&(n=1<<(n>>>3))?n=f[e+8>>2]:(f[264978]=n|a,n=e),f[e+8>>2]=i,f[n+12>>2]=i,f[i+12>>2]=e,f[i+8>>2]=n),f[264982]=b,f[264980]=A;break r}s=1059916,l=f[264979]&Ai(i),f[s>>2]=l}n>>>0>=16?(f[e+4>>2]=3|a,f[(A=e+a|0)+4>>2]=1|n,f[n+A>>2]=n,(b=f[264980])&&(r=1059648+(-8&b)|0,i=f[264982],(a=f[264978])&(b=1<<(b>>>3))?b=f[r+8>>2]:(f[264978]=a|b,b=r),f[r+8>>2]=i,f[b+12>>2]=i,f[i+12>>2]=r,f[i+8>>2]=b),f[264982]=A,f[264980]=n):(r=n+a|0,f[e+4>>2]=3|r,f[(r=r+e|0)+4>>2]=1|f[r+4>>2]);break e}if(r>>>0>4294901708)break f;if(a=-8&(e=r+11|0),!(u=f[264979]))break n;if(k=31,n=0-a|0,r>>>0<=16777204&&(k=62+((a>>>6-(r=o(e>>>8|0))&1)-(r<<1)|0)|0),e=f[1059504+(k<<2)>>2])for(r=0,A=a<<(31!=(0|k)?25-(k>>>1|0)|0:0);;){if(!((b=-8&f[e+4>>2])>>>0>>0||(b=b-a|0)>>>0>=n>>>0||(i=e,n=b))){n=0,r=e;break t}if(b=f[e+20>>2],e=f[16+((A>>>29&4)+e|0)>>2],r=b&&(0|b)!=(0|e)?b:r,A<<=1,!e)break}else r=0;if(!(r|i)){if(i=0,!(r=u&(0-(r=2<>2]}if(!r)break a}for(;u=(k=(b=(A=-8&f[r+4>>2])-a|0)>>>0>>0)?r:i,(e=f[r+16>>2])||(e=f[r+20>>2]),i=(r=A>>>0>>0)?i:u,n=r?n:k?b:n,r=e;);}if(i&&!((r=f[264980])>>>0>=a>>>0&r-a>>>0<=n>>>0)){k=f[i+24>>2];a:{t:{if((0|i)==(0|(r=f[i+12>>2]))){if(r=f[i+20>>2],e=f[(r?20:16)+i>>2])break t;r=0;break a}e=f[i+8>>2],f[e+12>>2]=r,f[r+8>>2]=e;break a}for(A=r?i+20|0:i+16|0;b=A,A=(e=f[(r=e)+20>>2])?r+20|0:r+16|0,e=f[(e?20:16)+r>>2];);f[b>>2]=0}if(!k)break i;e=f[i+28>>2];a:{if(f[(A=1059504+(e<<2)|0)>>2]!=(0|i)){if(f[k+16>>2]!=(0|i)){if(f[k+20>>2]=r,r)break a;break i}if(f[k+16>>2]=r,r)break a;break i}if(f[A>>2]=r,!r)break A}if(f[r+24>>2]=k,(e=f[i+16>>2])&&(f[r+16>>2]=e,f[e+24>>2]=r),!(e=f[i+20>>2]))break i;f[r+20>>2]=e,f[e+24>>2]=r;break i}}n:{a:{t:{b:{if((e=f[264980])>>>0>>0){if((r=f[264981])>>>0<=a>>>0){if(n=0,i=-1==(0|(e=ni((r=a+65583|0)>>>16|0))))break f;if(!(e<<=16))break f;r=(n=i?0:-65536&r)+f[264984]|0,f[264984]=r,i=f[264985],f[264985]=r>>>0>i>>>0?r:i;k:{u:{if(i=f[264983]){for(r=1059632;;){if(((A=f[r>>2])+(b=f[r+4>>2])|0)==(0|e))break u;if(!(r=f[r+8>>2]))break}break k}(r=f[264987])>>>0<=e>>>0&&r||(f[264987]=e),f[264988]=4095,f[264909]=n,f[264908]=e,f[264915]=1059648,f[264917]=1059656,f[264914]=1059648,f[264919]=1059664,f[264916]=1059656,f[264921]=1059672,f[264918]=1059664,f[264923]=1059680,f[264920]=1059672,f[264925]=1059688,f[264922]=1059680,f[264927]=1059696,f[264924]=1059688,f[264929]=1059704,f[264926]=1059696,f[264911]=0,f[264931]=1059712,f[264928]=1059704,f[264930]=1059712,f[264933]=1059720,f[264932]=1059720,f[264935]=1059728,f[264934]=1059728,f[264937]=1059736,f[264936]=1059736,f[264939]=1059744,f[264938]=1059744,f[264941]=1059752,f[264940]=1059752,f[264943]=1059760,f[264942]=1059760,f[264945]=1059768,f[264944]=1059768,f[264947]=1059776,f[264949]=1059784,f[264946]=1059776,f[264951]=1059792,f[264948]=1059784,f[264953]=1059800,f[264950]=1059792,f[264955]=1059808,f[264952]=1059800,f[264957]=1059816,f[264954]=1059808,f[264959]=1059824,f[264956]=1059816,f[264961]=1059832,f[264958]=1059824,f[264963]=1059840,f[264960]=1059832,f[264965]=1059848,f[264962]=1059840,f[264967]=1059856,f[264964]=1059848,f[264969]=1059864,f[264966]=1059856,f[264971]=1059872,f[264968]=1059864,f[264973]=1059880,f[264970]=1059872,f[264975]=1059888,f[264972]=1059880,f[264977]=1059896,f[264974]=1059888,f[264976]=1059896,f[264983]=e,r=n-40|0,f[e+4>>2]=1|r,f[264981]=r,f[4+(r+e|0)>>2]=40,f[264986]=2097152;break n}if(!(i>>>0>>0|e>>>0<=i>>>0)&&!f[r+12>>2])break b}r=f[264987],f[264987]=r>>>0>>0?r:e,A=e+n|0,r=1059632;k:{u:{for(;;){if((0|(b=f[r>>2]))!=(0|A)){if(r=f[r+8>>2])continue;break u}break}if(!f[r+12>>2])break k}for(r=1059632;!((A=f[r>>2])>>>0<=i>>>0&&(b=A+f[r+4>>2]|0)>>>0>i>>>0);)r=f[r+8>>2];for(r=n-40|0,f[e+4>>2]=1|r,f[264983]=e,f[264986]=2097152,f[264981]=r,f[4+(r+e|0)>>2]=40,f[(A=(r=(b-32&-8)-8|0)>>>0>>0?i:r)+4>>2]=27,r=f[264908],k=f[264909],u=f[264911],f[(c=A+16|0)>>2]=f[264910],f[c+4>>2]=u,f[A+8>>2]=r,f[A+12>>2]=k,f[264909]=n,f[264908]=e,f[264910]=A+8,f[264911]=0,r=A+28|0;f[r>>2]=7,b>>>0>(r=r+4|0)>>>0;);if((0|i)==(0|A))break n;if(f[A+4>>2]=-2&f[A+4>>2],r=A-i|0,f[i+4>>2]=1|r,f[A>>2]=r,r>>>0>=256){$r(i,r);break n}e=1059648+(248&r)|0,(A=f[264978])&(r=1<<(r>>>3))?r=f[e+8>>2]:(f[264978]=r|A,r=e),f[e+8>>2]=i,f[r+12>>2]=i,f[i+12>>2]=e,f[i+8>>2]=r;break n}if(f[r>>2]=e,f[r+4>>2]=n+f[r+4>>2],f[e+4>>2]=3|a,a=(n=(b+15&-8)-8|0)-(r=e+a|0)|0,f[264983]==(0|n))break t;if(f[264982]==(0|n))break a;if(1==(3&(i=f[n+4>>2]))&&(Ur(n,i&=-8),a=i+a|0,i=f[(n=i+n|0)+4>>2]),f[n+4>>2]=-2&i,f[r+4>>2]=1|a,f[r+a>>2]=a,a>>>0>=256){$r(r,a);break e}i=1059648+(248&a)|0,(A=f[264978])&(n=1<<(a>>>3))?A=f[i+8>>2]:(f[264978]=n|A,A=i),f[i+8>>2]=r,f[A+12>>2]=r,f[r+12>>2]=i,f[r+8>>2]=A;break e}e=r-a|0,f[264981]=e,i=(r=f[264983])+a|0,f[264983]=i,f[i+4>>2]=1|e,f[r+4>>2]=3|a,n=r+8|0;break f}r=f[264982],(i=e-a|0)>>>0<=15?(f[264982]=0,f[264980]=0,f[r+4>>2]=3|e,f[(e=r+e|0)+4>>2]=1|f[e+4>>2]):(f[264980]=i,A=r+a|0,f[264982]=A,f[A+4>>2]=1|i,f[r+e>>2]=i,f[r+4>>2]=3|a);break r}f[r+4>>2]=n+b,i=(e=(r=f[264983])+15&-8)-8|0,e=8+((A=n+f[264981]|0)+(r-e|0)|0)|0,f[i+4>>2]=1|e,f[264986]=2097152,f[264983]=i,f[264981]=e,f[4+(r+A|0)>>2]=40;break n}f[264983]=r,i=f[264981]+a|0,f[264981]=i,f[r+4>>2]=1|i;break e}i=f[264980]+a|0,f[r+4>>2]=1|i,f[264982]=r,f[264980]=i,f[r+i>>2]=i;break e}if(n=0,!((r=f[264981])>>>0<=a>>>0)){e=r-a|0,f[264981]=e,i=(r=f[264983])+a|0,f[264983]=i,f[i+4>>2]=1|e,f[r+4>>2]=3|a;break r}}return n}s=1059916,l=f[264979]&Ai(e),f[s>>2]=l}i:if(n>>>0>=16){if(f[i+4>>2]=3|a,f[(r=i+a|0)+4>>2]=1|n,f[r+n>>2]=n,n>>>0>=256){$r(r,n);break i}e=1059648+(248&n)|0,(A=f[264978])&(n=1<<(n>>>3))?A=f[e+8>>2]:(f[264978]=n|A,A=e),f[e+8>>2]=r,f[A+12>>2]=r,f[r+12>>2]=e,f[r+8>>2]=A}else r=n+a|0,f[i+4>>2]=3|r,f[(r=r+i|0)+4>>2]=1|f[r+4>>2];return i+8|0}return e+8|0}return r+8|0}function X(r,e,i,A,n,a){var t,b=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0;S=t=S-32|0;r:{e:{i:{A:if(e>>>0<33)s=r,h=e;else for(_=i-8|0;;){if(!n){rr(r,e,i,A,1);break r}s=k(o=e>>>3|0,56)+r|0,b=(o<<5)+r|0,n=n-1|0,e>>>0>=64?w=we(r,b,s,o):(o=s,s=f[r>>2],h=b,b=f[b>>2],w=o,u=h,v=(0|(d=f[r+4>>2]))<(0|(B=f[h+4>>2]))?1:(0|d)<=(0|B)&b>>>0>s>>>0,h=b,b=f[o>>2],h=(0|(o=f[o+4>>2]))>(0|B)?1:b>>>0>h>>>0&(0|o)>=(0|B),w=(b>>>0>s>>>0&(0|o)>=(0|d)|(0|o)>(0|d))^v?r:v^h?w:u),d=s=f[w+4>>2],o=f[w>>2],f[t>>2]=o,f[t+4>>2]=s,B=w-r>>>3|0;f:{n:{if(!(a&&(s=f[a>>2],h=(0|d)<(0|(b=f[a+4>>2]))?1:(0|b)>=(0|d)&s>>>0>=o>>>0))){if(e>>>0>A>>>0)break i;for(h=0,b=r,u=N=(I=e<<3)+i|0,s=B;;){if((l=((s>>>0>=(c=s-3|0)>>>0?c:0)<<3)+r|0)>>>0>b>>>0)for(;c=f[b>>2],Q=h<<3,E=u-8|0,v=f[b+4>>2],f[(g=Q+((y=(0|d)>(0|v)?1:(0|v)<=(0|d)&o>>>0>c>>>0)?i:E)|0)>>2]=c,f[g+4>>2]=v,c=f[(v=b+8|0)>>2],R=(y=h+y|0)<<3,h=o,E=u-16|0,g=f[v+4>>2],f[(E=R+((Q=(0|g)<(0|(v=d))?1:c>>>0>>0&(0|v)>=(0|g))?i:E)|0)>>2]=c,f[E+4>>2]=g,c=f[(g=b+16|0)>>2],R=(y=y+Q|0)<<3,E=u-24|0,g=f[g+4>>2],f[(E=R+((Q=(0|v)>(0|g)?1:c>>>0>>0&(0|v)>=(0|g))?i:E)|0)>>2]=c,f[E+4>>2]=g,c=f[(g=b+24|0)>>2],E=(y=y+Q|0)<<3,u=u-32|0,h=f[g+4>>2],f[(g=E+((v=(0|v)>(0|h)?1:(0|h)<=(0|d)&o>>>0>c>>>0)?i:u)|0)>>2]=c,f[g+4>>2]=h,h=v+y|0,l>>>0>(b=b+32|0)>>>0;);if((v=(s<<3)+r|0)>>>0>b>>>0)for(;c=f[b>>2],E=h<<3,u=u-8|0,l=f[b+4>>2],f[(g=E+((y=(0|d)>(0|l)?1:(0|l)<=(0|d)&o>>>0>c>>>0)?i:u)|0)>>2]=c,f[g+4>>2]=l,h=h+y|0,v>>>0>(b=b+8|0)>>>0;);if((0|e)==(0|s))break;c=f[b+4>>2],f[(s=(u=u-8|0)+(h<<3)|0)>>2]=f[b>>2],f[s+4>>2]=c,b=b+8|0,s=e}if(s=ze(r,i,d=h<<3),c=e-h|0,(0|e)!=(0|h)){if(o=3&c,u=0,h-e>>>0<=4294967292)for(b=s+d|0,v=-4&c,l=_+I|0;y=f[l+4>>2],f[b>>2]=f[l>>2],f[b+4>>2]=y,Q=f[(g=N+((536870910^u)<<3)|0)+4>>2],f[(y=b+8|0)>>2]=f[g>>2],f[y+4>>2]=Q,Q=f[(g=N+((536870909^u)<<3)|0)+4>>2],f[(y=b+16|0)>>2]=f[g>>2],f[y+4>>2]=Q,Q=f[(g=N+((536870908^u)<<3)|0)+4>>2],f[(y=b+24|0)>>2]=f[g>>2],f[y+4>>2]=Q,l=l-32|0,b=b+32|0,(0|v)!=(0|(u=u+4|0)););if(o)for(b=_+(I-(v=u<<3)|0)|0,u=d+(s+v|0)|0;v=f[b+4>>2],f[u>>2]=f[b>>2],f[u+4>>2]=v,b=b-8|0,u=u+8|0,o=o-1|0;);}if(h){if(e>>>0>=h>>>0)break n;f[t+24>>2]=0,f[t+12>>2]=1,f[t+8>>2]=1058780,f[t+16>>2]=4,f[t+20>>2]=0,Me(t+8|0,1058788),$f()}}if(e>>>0>A>>>0)break i;for(l=0,b=r,u=v=(N=e<<3)+i|0;;){if((I=(((a=B-3|0)>>>0<=B>>>0?a:0)<<3)+r|0)>>>0>b>>>0)for(a=f[w>>2],d=f[w+4>>2];o=f[b>>2],E=l<<3,c=u-8|0,s=d,g=f[b+4>>2],f[(c=E+((h=(0|s)>(0|(h=g))?1:(0|s)>=(0|h)&a>>>0>=o>>>0)?i:c)|0)>>2]=o,f[c+4>>2]=g,g=(y=l+h|0)<<3,c=f[(l=b+8|0)>>2],h=a,o=i,Q=u-16|0,E=f[l+4>>2],f[(g=((l=(0|(l=E))<(0|s)?1:c>>>0<=h>>>0&(0|s)>=(0|l))?o:Q)+g|0)>>2]=c,f[g+4>>2]=E,g=(y=l+y|0)<<3,c=f[(l=b+16|0)>>2],Q=u-24|0,E=f[l+4>>2],f[(g=((l=(0|(l=E))<(0|s)?1:c>>>0<=h>>>0&(0|s)>=(0|l))?o:Q)+g|0)>>2]=c,f[g+4>>2]=E,l=(c=l+y|0)<<3,o=f[(y=b+24|0)>>2],u=u-32|0,E=s,h=f[y+4>>2],f[(l=((s=(0|E)>(0|(s=h))?1:(0|s)<=(0|d)&a>>>0>=o>>>0)?i:u)+l|0)>>2]=o,f[l+4>>2]=h,l=s+c|0,I>>>0>(b=b+32|0)>>>0;);if((d=(B<<3)+r|0)>>>0>b>>>0)for(a=f[w>>2],s=f[w+4>>2];o=f[b>>2],c=l<<3,u=u-8|0,I=f[b+4>>2],f[(c=c+((h=(0|(h=I))<(0|s)?1:(0|s)>=(0|h)&a>>>0>=o>>>0)?i:u)|0)>>2]=o,f[c+4>>2]=I,l=l+h|0,d>>>0>(b=b+8|0)>>>0;);if((0|e)==(0|B))break;s=f[b+4>>2],f[(a=(l<<3)+i|0)>>2]=f[b>>2],f[a+4>>2]=s,b=b+8|0,l=l+1|0,u=u-8|0,B=e}if(d=ze(a=r,i,r=l<<3),(0|e)==(0|l))break r;if(a=3&(h=e-l|0),s=r+d|0,u=0,l-e>>>0<=4294967292)for(B=-4&h,o=_+N|0,b=s;c=f[o+4>>2],f[b>>2]=f[o>>2],f[b+4>>2]=c,I=f[(w=v+((536870910^u)<<3)|0)+4>>2],f[(c=b+8|0)>>2]=f[w>>2],f[c+4>>2]=I,I=f[(w=v+((536870909^u)<<3)|0)+4>>2],f[(c=b+16|0)>>2]=f[w>>2],f[c+4>>2]=I,I=f[(w=v+((536870908^u)<<3)|0)+4>>2],f[(c=b+24|0)>>2]=f[w>>2],f[c+4>>2]=I,o=o-32|0,b=b+32|0,(0|B)!=(0|(u=u+4|0)););if(a)for(b=N+(_-(o=u<<3)|0)|0,u=r+(o+d|0)|0;r=f[b+4>>2],f[u>>2]=f[b>>2],f[u+4>>2]=r,b=b-8|0,u=u+8|0,a=a-1|0;);if(e>>>0>=l>>>0)break f;xe(l,e,1058804),$f()}if(X(s+d|0,c,i,A,n,t),(e=h)>>>0>=33)continue;break A}if(a=0,r=s,!((e=h)>>>0>=33))break}if(h>>>0<2)break r;if(!(h+16>>>0>A>>>0)){r=h>>>1|0;A:{f:{if(h>>>0<=15){if(h>>>0<=7)break f;e=f[s+24>>2],A=f[s+16>>2],n=f[s+28>>2],a=f[s+20>>2],A=f[(e=l=((u=(0|n)<(0|a)?1:e>>>0>>0&(0|n)<=(0|a))?16:24)+s|0)>>2],o=e=f[e+4>>2],d=e,a=f[s>>2],e=n=f[s+8>>2],v=i,b=B=f[s+12>>2],c=f[s+4>>2],e=f[(b=w=((e=(0|b)>(0|c)?1:(0|b)>=(0|c)&e>>>0>=a>>>0)<<3)+s|0)>>2],_=(0|o)>(0|(b=f[b+4>>2]))?1:e>>>0>>0&(0|b)<=(0|o),f[v+24>>2]=_?A:e,f[v+28>>2]=_?d:b,d=f[(u=(u?24:16)+s|0)>>2],v=f[u+4>>2],_=((n>>>0>>0&(0|c)>=(0|B)|(0|c)>(0|B))<<3)+s|0,B=i,E=n=f[(a=_)>>2],n=(0|(a=f[a+4>>2]))>(0|(c=v))?1:n>>>0>d>>>0&(0|a)>=(0|c),f[i>>2]=n?d:E,f[B+4>>2]=n?v:a,A=f[(e=(b=e>>>0>A>>>0&(0|b)>=(0|o)|(0|b)>(0|o))?l:n?w:u)>>2],a=e=f[e+4>>2],e=f[(n=n?_:b?u:w)>>2],b=i,o=(0|a)>(0|(n=f[n+4>>2]))?1:e>>>0>>0&(0|n)<=(0|a),f[b+16>>2]=o?A:e,f[b+20>>2]=o?a:n,o=e,e=e>>>0>A>>>0&(0|n)>=(0|a)|(0|n)>(0|a),f[i+8>>2]=e?A:o,f[i+12>>2]=e?a:n,e=(A=r<<3)+i|0,A=f[(u=A+s|0)+24>>2],n=f[u+16>>2],a=f[u+28>>2],b=f[u+20>>2],n=f[(A=N=u+((_=(0|a)<(0|b)?1:A>>>0>>0&(0|a)<=(0|b))?16:24)|0)>>2],d=A=f[A+4>>2],B=A,b=f[u>>2],A=a=f[u+8>>2],w=e,o=c=f[u+12>>2],v=f[u+4>>2],A=f[(o=l=((A=(0|o)>(0|v)?1:(0|o)>=(0|v)&A>>>0>=b>>>0)<<3)+u|0)>>2],I=(0|d)>(0|(o=f[o+4>>2]))?1:A>>>0>>0&(0|o)<=(0|d),f[e+24>>2]=I?n:A,f[w+28>>2]=I?B:o,B=f[(w=_=u+(_?24:16)|0)>>2],w=f[w+4>>2],u=((a>>>0>>0&(0|c)<=(0|v)|(0|c)<(0|v))<<3)+u|0,c=e,E=a=f[(b=u)>>2],a=(0|(b=f[b+4>>2]))>(0|(v=w))?1:a>>>0>B>>>0&(0|b)>=(0|v),f[e>>2]=a?B:E,f[c+4>>2]=a?w:b,n=f[(A=(o=A>>>0>n>>>0&(0|o)>=(0|d)|(0|o)>(0|d))?N:a?l:_)>>2],b=A=f[A+4>>2],A=f[(a=a?u:o?_:l)>>2],o=e,d=(0|b)<(0|(a=f[a+4>>2]))?1:A>>>0>n>>>0&(0|a)>=(0|b),f[e+8>>2]=d?n:A,f[o+12>>2]=d?b:a,o=A,A=A>>>0>>0&(0|a)<=(0|b)|(0|a)<(0|b),f[e+16>>2]=A?n:o,f[e+20>>2]=A?b:a,n=4;break A}ur(s,i,e=(h<<3)+i|0),ur((A=r<<3)+s|0,i+A|0,e- -64|0),n=8;break A}e=f[s+4>>2],f[i>>2]=f[s>>2],f[i+4>>2]=e,A=(e=r<<3)+i|0,n=f[(e=e+s|0)+4>>2],f[A>>2]=f[e>>2],f[A+4>>2]=n,n=1}for(B=0,f[t+16>>2]=0,v=n<<3,f[t+20>>2]=r,l=h-r|0,_=t+16|0;;){if((N=(e=f[_+(B<<2)>>2])?l:r)>>>0>n>>>0)for(c=(e<<=3)+i|0,I=e+s|0,a=v,o=n;;){if(e=f[(A=(b=o<<3)+I|0)>>2],A=f[A+4>>2],f[(b=b+c|0)>>2]=e,f[b+4>>2]=A,d=f[(b=b-8|0)>>2],b=(0|A)<(0|(b=w=f[b+4>>2]))?1:e>>>0>>0&(0|A)<=(0|b)){b=a;A:{for(;;){if(f[(u=b+c|0)>>2]=d,f[u+4>>2]=w,d=c,8==(0|b))break A;if(b=b-8|0,d=f[(w=u-16|0)>>2],!(u=(0|(w=f[w+4>>2]))>(0|A)?1:e>>>0>>0&(0|A)<=(0|w)))break}d=b+c|0}f[d>>2]=e,f[d+4>>2]=A}if(a=a+8|0,(0|N)==(0|(o=o+1|0)))break}if(2==(0|(B=B+1|0)))break}for(u=(b=(r<<3)+i|0)-8|0,l=(e=(h<<3)-8|0)+i|0,o=e+s|0;B=n=f[i+4>>2],n=e=f[b>>2],n=e,e=a=f[i>>2],d=A=f[b+4>>2],e=w=(0|B)>(0|A)?1:(0|d)<=(0|B)&e>>>0>n>>>0,f[s>>2]=e?n:a,f[s+4>>2]=e?A:B,v=A=f[l+4>>2],e=f[l>>2],A=f[u>>2],_=(0|v)>(0|(c=f[u+4>>2]))?1:(0|c)<=(0|v)&e>>>0>A>>>0,f[o>>2]=_?e:A,f[o+4>>2]=_?v:c,o=o-8|0,s=s+8|0,u=(e>>>0>>0&(0|c)>=(0|v)|(0|c)>(0|v)?-8:0)+u|0,l=((0|c)<=(0|v)&e>>>0>=A>>>0|(0|c)<(0|v)?-8:0)+l|0,i=(((0|d)>=(0|B)&n>>>0>=a>>>0|(0|d)>(0|B))<<3)+i|0,b=(w<<3)+b|0,r=r-1|0;);break e}}$f()}r=u+8|0,1&h&&(n=f[(A=(e=r>>>0>i>>>0)?i:b)+4>>2],f[s>>2]=f[A>>2],f[s+4>>2]=n,b=((r>>>0<=i>>>0)<<3)+b|0,i=(e<<3)+i|0),(0|r)==(0|i)&(l+8|0)==(0|b)||(Fe(),$f())}S=t+32|0}function J(r,e,i,A,n,a){var t,b=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0;S=t=S-144|0;r:{e:{i:{A:{f:if(e>>>0<33)c=e;else{B=i-120|0;n:for(;;){for(I=r+48|0;;){if(!n){H(r,e,i,A,1);break e}if(s=k(b=e>>>3|0,840)+r|0,l=k(b,480)+r|0,e>>>0>=64)o=ae(r,l,s,b);else{if(!f[I>>2])break r;if(!(1&f[l+48>>2]))break r;if(!(1&f[s+48>>2]))break r;b=s,s=f[(u=r+56|0)>>2],l=f[(o=(c=l)+56|0)>>2],d=f[(v=b+56|0)>>2],g=b,w=c,h=(0|(u=f[u+4>>2]))<(0|(o=f[o+4>>2]))?1:s>>>0>>0&(0|u)<=(0|o),b=l,l=d,b=(0|(c=f[v+4>>2]))>(0|o)?1:b>>>0>>0&(0|o)<=(0|c),o=(s>>>0>>0&(0|u)<=(0|c)|(0|u)<(0|c))^h?r:h^b?g:w}n=n-1|0,h=ze(t,o,120),l=(o-r>>>0)/120|0;a:{t:{if(a){if(!f[a+48>>2])break r;if(!(1&f[o+48>>2]))break r;if(b=f[(s=a+56|0)>>2],u=f[(c=o+56|0)>>2],b=(0|(s=f[s+4>>2]))>(0|(c=f[c+4>>2]))?1:(0|c)<=(0|s)&b>>>0>=u>>>0)break t}if(e>>>0>A>>>0)break A;for(c=0,b=r,u=g=(Q=k(e,120))+i|0,s=l;;){b:if(!((d=k(s,120)+r|0)>>>0<=b>>>0)){k:{for(;;){if(f[b+48>>2]){if(!(1&f[o+48>>2]))break k;if(w=f[(v=b+56|0)>>2],_=f[(y=o+56|0)>>2],u=u-120|0,ze((E=k(c,120))+((v=(0|(v=f[v+4>>2]))<(0|(y=f[y+4>>2]))?1:w>>>0<_>>>0&(0|v)<=(0|y))?i:u)|0,b,120),c=c+v|0,d>>>0>(b=b+120|0)>>>0)continue;break b}break}break r}Ve(1058820);break A}if((0|e)==(0|s))break;ze((u=u-120|0)+k(c,120)|0,b,120),b=b+120|0,s=e}if(y=ze(r,i,w=k(c,120)),v=e-c|0,(0|e)!=(0|c)){if(d=w+y|0,b=0,(c+1|0)!=(0|e))for(_=-2&v,u=B+Q|0,s=d;s=ze(s,u,120),ze(s+120|0,g+k(536870910^b,120)|0,120),u=u-240|0,s=s+240|0,(0|_)!=(0|(b=b+2|0)););1&v&&ze(d+k(b,120)|0,g+k(-1^b,120)|0,120)}if(c){if(e>>>0>=c>>>0)break a;f[h+136>>2]=0,f[h+124>>2]=1,f[h+120>>2]=1058780,f[h+128>>2]=4,f[h+132>>2]=0,Me(h+120|0,1058788),$f()}}if(e>>>0>A>>>0)break A;for(u=0,b=r,c=a=(s=k(e,120))+i|0;;){t:if(!((d=k(l,120)+r|0)>>>0<=b>>>0)){b:{for(;;){if(f[o+48>>2]){if(!(1&f[b+48>>2]))break b;if(v=f[(h=o+56|0)>>2],w=f[(g=b+56|0)>>2],c=c-120|0,ze((y=k(u,120))+((h=(0|(h=f[h+4>>2]))>(0|(g=f[g+4>>2]))?1:(0|h)>=(0|g)&v>>>0>=w>>>0)?i:c)|0,b,120),u=u+h|0,d>>>0>(b=b+120|0)>>>0)continue;break t}break}break r}break r}if((0|e)==(0|l))break;ze(k(u,120)+i|0,b,120),b=b+120|0,u=u+1|0,c=c-120|0,l=e}if(l=ze(b=r,i,r=k(u,120)),(0|e)==(0|u))break e;if(d=1&(c=e-u|0),r=r+l|0,b=0,(u+1|0)!=(0|e))for(l=-2&c,o=s+B|0,s=r;s=ze(s,o,120),ze(s+120|0,a+k(536870910^b,120)|0,120),o=o-240|0,s=s+240|0,(0|l)!=(0|(b=b+2|0)););if(d&&ze(k(b,120)+r|0,a+k(-1^b,120)|0,120),e>>>0>>0&&(xe(u,e,1058804),$f()),a=0,(e=c)>>>0<33)break f;continue n}if(J(w+y|0,v,i,A,n,h),!((e=c)>>>0>=33))break}break}}if(c>>>0<2)break e;if(!(c+16>>>0>A>>>0)){if(l=1,v=(e=k(s=c>>>1|0,120))+i|0,e=r+e|0,c>>>0>7?(Yr(r,i),Yr(e,v),l=4):(ze(i,r,120),ze(v,e,120)),s>>>0<=l>>>0)break i;for(A=k(l,120),e=l;;){if(a=ze(i+(n=k(e,120))|0,d=n+r|0,120),n=f[(b=a+48|0)>>2],g=f[b+4>>2],!(o=n))break r;if(!(1&f[a-72>>2]))break r;if(n=f[(b=a+56|0)>>2],h=f[(a=a+-64|0)>>2],a=(0|(b=u=f[b+4>>2]))<(0|(a=f[a+4>>2]))?1:n>>>0>>0&(0|a)>=(0|b)){h=d- -64|0,b=A;f:{n:{for(;;){if(B=ze(a=i+b|0,a-120|0,120),120==(0|b))break n;if(!(1&f[B-192>>2]))break r;if(b=b-120|0,w=f[(a=B-184|0)>>2],!(a=(0|(a=f[a+4>>2]))>(0|u)?1:n>>>0>>0&(0|a)>=(0|u)))break}a=i+b|0;break f}a=i}b=f[d+4>>2],f[a>>2]=f[d>>2],f[a+4>>2]=b,y=f[(w=d+40|0)+4>>2],f[(b=a+40|0)>>2]=f[w>>2],f[b+4>>2]=y,y=f[(w=d+32|0)+4>>2],f[(b=a+32|0)>>2]=f[w>>2],f[b+4>>2]=y,y=f[(w=d+24|0)+4>>2],f[(b=a+24|0)>>2]=f[w>>2],f[b+4>>2]=y,y=f[(w=d+16|0)+4>>2],f[(b=a+16|0)>>2]=f[w>>2],f[b+4>>2]=y,d=f[(b=d+8|0)+4>>2],f[(a=a+8|0)>>2]=f[b>>2],f[a+4>>2]=d,f[(a=B+-64|0)>>2]=n,f[a+4>>2]=u,f[(n=B-72|0)>>2]=o,f[n+4>>2]=g,a=f[h+4>>2],f[(n=B-56|0)>>2]=f[h>>2],f[n+4>>2]=a,u=f[(b=h+8|0)+4>>2],f[(a=n+8|0)>>2]=f[b>>2],f[a+4>>2]=u,u=f[(b=h+16|0)+4>>2],f[(a=n+16|0)>>2]=f[b>>2],f[a+4>>2]=u,u=f[(b=h+24|0)+4>>2],f[(a=n+24|0)>>2]=f[b>>2],f[a+4>>2]=u,u=f[(b=h+32|0)+4>>2],f[(a=n+32|0)>>2]=f[b>>2],f[a+4>>2]=u,u=f[(b=h+40|0)+4>>2],f[(a=n+40|0)>>2]=f[b>>2],f[a+4>>2]=u,b=f[(a=h+48|0)+4>>2],f[(n=n+48|0)>>2]=f[a>>2],f[n+4>>2]=b}if(A=A+120|0,(0|s)==(0|(e=e+1|0)))break}break i}}$f()}if((I=c-s|0)>>>0>l>>>0)for(Q=(e=k(s,120))+r|0,y=k(l,120),n=120,a=b=e+i|0;;){if(A=ze((e=k(l,120))+b|0,B=e+Q|0,120),e=f[(u=A+48|0)>>2],_=f[u+4>>2],h=e,1!=(0|e))break r;if(!(1&f[A-72>>2]))break r;if(e=f[(u=A+56|0)>>2],o=f[(A=A+-64|0)>>2],A=(0|(u=d=f[u+4>>2]))<(0|(A=f[A+4>>2]))?1:e>>>0>>0&(0|A)>=(0|u)){g=B- -64|0,o=n,u=a;i:{A:{for(;;){if(w=ze(A=u+y|0,A-120|0,120),(0|o)==(0|y))break A;if(!(1&f[w-192>>2]))break r;if(o=o+120|0,u=u-120|0,E=f[(A=w-184|0)>>2],!(A=(0|(A=f[A+4>>2]))>(0|d)?1:e>>>0>>0&(0|A)>=(0|d)))break}A=u+y|0;break i}A=b}u=f[B+4>>2],f[A>>2]=f[B>>2],f[A+4>>2]=u,E=f[(o=B+40|0)+4>>2],f[(u=A+40|0)>>2]=f[o>>2],f[u+4>>2]=E,E=f[(o=B+32|0)+4>>2],f[(u=A+32|0)>>2]=f[o>>2],f[u+4>>2]=E,E=f[(o=B+24|0)+4>>2],f[(u=A+24|0)>>2]=f[o>>2],f[u+4>>2]=E,E=f[(o=B+16|0)+4>>2],f[(u=A+16|0)>>2]=f[o>>2],f[u+4>>2]=E,o=f[(u=B+8|0)+4>>2],f[(A=A+8|0)>>2]=f[u>>2],f[A+4>>2]=o,f[(A=w+-64|0)>>2]=e,f[A+4>>2]=d,f[(e=w-72|0)>>2]=h,f[e+4>>2]=_,A=f[g+4>>2],f[(e=w-56|0)>>2]=f[g>>2],f[e+4>>2]=A,o=f[(u=g+8|0)+4>>2],f[(A=e+8|0)>>2]=f[u>>2],f[A+4>>2]=o,o=f[(u=g+16|0)+4>>2],f[(A=e+16|0)>>2]=f[u>>2],f[A+4>>2]=o,o=f[(u=g+24|0)+4>>2],f[(A=e+24|0)>>2]=f[u>>2],f[A+4>>2]=o,o=f[(u=g+32|0)+4>>2],f[(A=e+32|0)>>2]=f[u>>2],f[A+4>>2]=o,o=f[(u=g+40|0)+4>>2],f[(A=e+40|0)>>2]=f[u>>2],f[A+4>>2]=o,u=f[(A=g+48|0)+4>>2],f[(e=e+48|0)>>2]=f[A>>2],f[e+4>>2]=u}if(n=n-120|0,a=a+120|0,(0|I)==(0|(l=l+1|0)))break}u=v-120|0,b=(e=k(c,120)-120|0)+i|0,o=r+e|0;i:{for(;;){if(!f[v+48>>2])break r;if(!(1&f[i+48>>2]))break r;if(A=f[(a=i+56|0)>>2],h=r,r=e=f[(n=v+56|0)>>2],r=ze(h,(l=(0|(n=f[n+4>>2]))<(0|(a=f[a+4>>2]))?1:r>>>0>>0&(0|n)<=(0|a))?v:i,120),!f[b+48>>2])break r;if(!(1&f[u+48>>2]))break i;if(r=r+120|0,i=k((0|n)>=(0|a)&e>>>0>=A>>>0|(0|n)>(0|a),120)+i|0,v=k(l,120)+v|0,e=f[(n=b+56|0)>>2],A=f[(a=u+56|0)>>2],o=ze(o,(l=(0|(n=f[n+4>>2]))<(0|(a=f[a+4>>2]))?1:e>>>0>>0&(0|n)<=(0|a))?u:b,120)-120|0,u=(l?-120:0)+u|0,b=((0|n)>=(0|a)&e>>>0>=A>>>0|(0|n)>(0|a)?-120:0)+b|0,!(s=s-1|0))break}if(e=u+120|0,1&c&&(ze(A=r,(r=e>>>0>i>>>0)?i:v,120),v=k(e>>>0<=i>>>0,120)+v|0,i=k(r,120)+i|0),(0|e)==(0|i)&(b+120|0)==(0|v))break e;Fe(),$f()}break r}return void(S=t+144|0)}Ve(1058820),$f()}function x(r,e){var a,t=0,b=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0;S=a=S-176|0,o=n[e+278|0];r:{e:if(b=f[r+8>>2])for(y=r+12|0,B=e+160|0,E=e+256|0,h=e+240|0,s=e+152|0,_=a+172|0,d=a+144|0,I=a+124|0;;){i:{A:{f:{n:{a:{t:{b:{k:{u:{o:{c:{s:{l:{h:{v:{d:{w:{g:{y:{B:switch(0|o){case 1:if(f[r+8>>2]=b-1,t=f[r+4>>2],f[r+4>>2]=t+1,(c=n[0|t])>>>0>223)break y;t=f[s>>2],b=f[s+4>>2];break n;case 0:break B;case 2:break g;case 3:break w;case 4:break d;default:break i}if(u=f[r+4>>2],255==n[0|u])o=1;else{if(2!=f[s>>2]|f[s+4>>2]){if(fi[f[f[r>>2]>>2]](a+132|0,y,u,b),f[(t=a+140|0)>>2]=1,o=f[t+4>>2],t=f[t>>2],f[(b=a+168|0)>>2]=t,f[b+4>>2]=o,o=f[a+136>>2],f[a+160>>2]=f[a+132>>2],f[a+164>>2]=o,t?(f[e+252>>2]=t+f[e+252>>2],(0|(t=f[e+248>>2]))==f[e+240>>2]&&ce(h,1058736),f[e+248>>2]=t+1,o=f[a+164>>2],t=f[e+244>>2]+(t<<4)|0,f[t>>2]=f[a+160>>2],f[t+4>>2]=o,o=f[b+4>>2],f[(t=t+8|0)>>2]=f[b>>2],f[t+4>>2]=o):fi[f[f[a+160>>2]+16>>2]](_,f[a+164>>2],0),b=f[r+8>>2],f[a+128>>2]=1,!b)break v;u=f[r+4>>2]}o=0}if(f[r+4>>2]=u+1,b=b-1|0,f[r+8>>2]=b,b)continue;break e}if(18!=(22&c)){if(t=f[s>>2],b=f[s+4>>2],255!=(0|c))break n;if(o=1,!b&2==(0|t))break i;f[e+252>>2]=f[e+252>>2]+1,(0|(t=f[e+248>>2]))==f[e+240>>2]&&ce(h,1058736),f[e+248>>2]=t+1,t=f[e+244>>2]+(t<<4)|0,f[t+8>>2]=1,f[t+12>>2]=0,f[t+4>>2]=1057632,f[t>>2]=1057596;break i}if(i[e+279|0]=c,u=f[e+152>>2],v=f[e+156>>2],b=f[e+32>>2],o=f[e+36>>2],t=f[e+40>>2],l=f[e+44>>2],ze(a+16|0,B,96),f[e+248>>2]=0,f[e+252>>2]=0,f[e+240>>2]=0,f[e+244>>2]=4,i[e+232|0]=0,A[e+230>>1]=257,i[e+229|0]=c>>>3&3,i[e+228|0]=1,f[e+224>>2]=0,f[e+216>>2]=0,f[e+208>>2]=t,f[e+212>>2]=l,f[e+200>>2]=b,f[e+204>>2]=o,f[e+192>>2]=t,f[e+196>>2]=l,f[e+184>>2]=b,f[e+188>>2]=o,f[e+176>>2]=t,f[e+180>>2]=l,f[e+168>>2]=b,f[e+172>>2]=o,f[e+152>>2]=0,f[e+156>>2]=0,o=2,!v&2==(0|(t=u)))break i;(0|(b=f[e+264>>2]))==f[e+256>>2]&&be(E,1057616),u=f[e+260>>2]+k(b,104)|0,f[u>>2]=t,f[u+4>>2]=v,ze(u+8|0,a+16|0,96),f[e+264>>2]=b+1;break i}if(f[r+8>>2]=b-1,b=f[r+4>>2],f[r+4>>2]=b+1,!f[s+4>>2]&2==f[s>>2])break h;g:{if(n[e+228|0]){if(o=2,(t=n[e+229|0])>>>0>=2)break g;break e}Ve(1057652),$f()}if(o=n[0|b],i[e+280|0]=o,t>>>0>=4)break l;if(f[e+216>>2]=1,u=f[1057668+(o>>>2&60|t<<6)>>2],f[e+220>>2]=u,!(b=f[1057940+(12&o|t<<4)>>2]))break s;f[e+224>>2]=b,c=o>>>1&1,i[e+276|0]=c,o=3,u=((t=k(u,f[1058020+(t<<2)>>2]>>>3|0))>>>0)/(b>>>0)|0,f[e+268>>2]=((u+c|0)+(b>>>0<=t-k(b,u)<<1>>>0)|0)-1;break i}if(f[r+8>>2]=b-1,t=f[r+4>>2],f[r+4>>2]=t+1,!f[s+4>>2]&2==f[s>>2])break c;if(b=n[0|t],i[e+232|0]=1,i[e+281|0]=b,i[e+233|0]=n[1058052+(b>>>6|0)|0],!(t=V(4)))break f;if(o=n[e+279|0]|n[e+280|0]<<8,i[t+3|0]=b,i[t+1|0]=o,i[t+2|0]=o>>>8,i[0|t]=255,f[a+168>>2]=4,f[a+164>>2]=t,f[a+160>>2]=4,se(a+8|0,a+160|0),!(b=f[a+12>>2]))break o;t=f[a+8>>2],f[a+136>>2]=t,u=t,o=1|t,t&=1,f[a+144>>2]=t?u:o,f[a+132>>2]=t?1051916:1051896,f[a+140>>2]=b,f[e+252>>2]=b+f[e+252>>2],(0|(t=f[e+248>>2]))==f[e+240>>2]&&ce(h,1058736),f[e+248>>2]=t+1,b=f[a+136>>2],t=f[e+244>>2]+(t<<4)|0,f[t>>2]=f[a+132>>2],f[t+4>>2]=b,o=f[(b=a+140|0)+4>>2],f[(t=t+8|0)>>2]=f[b>>2],f[t+4>>2]=o;break a}if(w=!f[s+4>>2]&2==f[s>>2])break u;if(u=f[e+272>>2])break t;if(t=n[f[r+4>>2]],n[e+277|0]){if(242==(246&t)){c=0;break k}f[e+252>>2]=f[e+252>>2]+1,(0|(t=f[e+248>>2]))==f[e+240>>2]&&ce(h,1058736),c=1,f[e+248>>2]=t+1,t=f[e+244>>2]+(t<<4)|0,f[t+8>>2]=1,f[t+12>>2]=0,f[t+4>>2]=1057632,f[t>>2]=1057596,t=0}else c=255!=(0|t),t=255==(0|t);if(o=4,b>>>0<2)break b;for(Q=f[r+4>>2],v=f[r+8>>2],u=1;;){d:{w:{if(u>>>0>>0){if(l=n[u+Q|0],t)break w;g=255!=(0|l),t=255==(0|l);break d}Ne(u,v,1058072),$f()}if(242==(246&l))break k;g=2,t=0}if(c=c+g|0,(0|(u=u+1|0))==(0|b))break}break b}f[a+156>>2]=0;break r}Ve(1057636),$f()}Ne(t,4,1057924),$f()}Ve(1058004),$f()}Ve(1058036),$f()}f[a+144>>2]=0,f[a+136>>2]=1,f[a+140>>2]=0,f[a+132>>2]=1051612,fi[f[262907]](d,1,0);break a}Ve(1058056),$f()}t=1,o=1}if(qr(a+112|0,r,c),!(u=f[a+120>>2])){fi[f[f[a+112>>2]+16>>2]](I,f[a+116>>2],0),i[e+277|0]=t;break i}f[(b=w?0:s)+100>>2]=u+f[b+100>>2],(0|(u=f[b+96>>2]))==f[b+88>>2]&&ce(b+88|0,1058736),f[b+96>>2]=u+1,b=f[b+92>>2]+(u<<4)|0,u=f[a+116>>2],f[b>>2]=f[a+112>>2],f[b+4>>2]=u,c=f[(u=a+120|0)+4>>2],f[(b=b+8|0)>>2]=f[u>>2],f[b+4>>2]=c,i[e+277|0]=t;break i}if(zr(a+132|0,r,0,o=b>>>0>u>>>0?u:b),(t=f[a+140>>2])?(f[e+252>>2]=t+f[e+252>>2],(0|(t=f[e+248>>2]))==f[e+240>>2]&&ce(h,1058736),f[e+248>>2]=t+1,c=f[a+136>>2],t=f[e+244>>2]+(t<<4)|0,f[t>>2]=f[a+132>>2],f[t+4>>2]=c,l=f[(c=a+140|0)+4>>2],f[(t=t+8|0)>>2]=f[c>>2],f[t+4>>2]=l):fi[f[f[a+132>>2]+16>>2]](d,f[a+136>>2],0),f[e+272>>2]=f[e+272>>2]-o,f[a+128>>2]=o,(t=f[r+8>>2])>>>0>=o>>>0){if(t=t-o|0,f[r+8>>2]=t,f[r+4>>2]=o+f[r+4>>2],o=(b>>>0>>0)<<2,b=t,t)continue;break e}f[a+156>>2]=t;break r}b=(t=f[e+268>>2])-4|0,f[e+272>>2]=t>>>0>=b>>>0?b:0,o=4;break i}if(o=0,!b&2==(0|t))break i;if(t=V(2))break A}$f()}i[t+1|0]=c,i[0|t]=255,f[a+168>>2]=2,f[a+164>>2]=t,f[a+160>>2]=2,se(a,a+160|0),(b=f[a+4>>2])?(t=f[a>>2],f[a+136>>2]=t,u=t,c=1|t,t&=1,f[a+144>>2]=t?u:c,f[a+132>>2]=t?1051916:1051896,f[a+140>>2]=b,f[e+252>>2]=b+f[e+252>>2],(0|(t=f[e+248>>2]))==f[e+240>>2]&&ce(h,1058736),f[e+248>>2]=t+1,b=f[a+136>>2],t=f[e+244>>2]+(t<<4)|0,f[t>>2]=f[a+132>>2],f[t+4>>2]=b,u=f[(b=a+140|0)+4>>2],f[(t=t+8|0)>>2]=f[b>>2],f[t+4>>2]=u):(f[a+144>>2]=0,f[a+136>>2]=1,f[a+140>>2]=0,f[a+132>>2]=1051612,fi[f[262907]](d,1,0))}if(!(b=f[r+8>>2]))break}return i[e+278|0]=o,void(S=a+176|0)}f[a+136>>2]=2,f[a+132>>2]=1058600,f[a+144>>2]=2,f[a+148>>2]=0,f[a+168>>2]=a+156,f[a+172>>2]=3,f[a+160>>2]=a+128,f[a+164>>2]=3,f[a+140>>2]=a+160,Me(a+132|0,1058616),$f()}function H(r,e,A,a,t){var b,u,c,s,l,h,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0,p=0,m=0,G=0,Y=0,W=0,D=0;S=u=S-336|0,b=e,c=ri(e=e-1|0,E=-1!=(0|e)?1073741824:1073741823,b,0),s=M,m=b>>>0>=4097?(1<<(e=32-o(1|b)>>>1|0))+(b>>>e|0)>>>1|0:(e=b-(b>>>1|0)|0)>>>0>=64?64:e,l=r-120|0,h=r+168|0,e=1;r:{for(;;){if(p=0,_=1,Y=R>>>0>>0){w=(I=k(R,120))+r|0;e:{i:if(!((d=b-R|0)>>>0>>0)){A:{if(!(d>>>0<2)){f:{if(f[w+168>>2]){if(!(1&f[w+48>>2]))break r;E=f[(B=w+176|0)>>2],N=f[(_=w+56|0)>>2],B=y=f[B+4>>2];n:{a:{if(p=(0|y)<(0|(_=f[_+4>>2]))?1:E>>>0>>0&(0|B)<=(0|_)){if(_=2,v=1,2==(0|d))break n;for(B=I+h|0;;){if(!f[(N=B+120|0)>>2])break r;if(!(1&f[B>>2]))break f;if(v=E,E=f[(C=B+128|0)>>2],v=(0|(B=y))<(0|(y=f[C+4>>2]))?1:v>>>0<=E>>>0&(0|y)>=(0|B))break a;if(B=N,(0|d)==(0|(_=_+1|0)))break}}else{if(_=2,2==(0|d))break A;for(B=I+h|0;;){if(!f[(N=B+120|0)>>2])break r;if(!(1&f[B>>2]))break r;if(v=E,E=f[(C=B+128|0)>>2],v=(0|(B=y))>(0|(y=f[C+4>>2]))?1:(0|y)<=(0|B)&v>>>0>E>>>0)break a;if(B=N,(0|d)==(0|(_=_+1|0)))break}}_=d}if(_>>>0>>0)break i;if(!p)break A;if(_>>>0<2){_=1;break A}v=_>>>1|0}for(E=v,N=k(_,120)+l|0,B=r;v=f[(d=I+N|0)>>2],y=B+I|0,f[d>>2]=f[y>>2],f[y>>2]=v,w=f[(v=y+4|0)>>2],g=v,v=d+4|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+8|0)>>2],g=v,v=y+8|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+12|0)>>2],g=v,v=d+12|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+16|0)>>2],g=v,v=y+16|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+20|0)>>2],g=v,v=d+20|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+24|0)>>2],g=v,v=y+24|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+28|0)>>2],g=v,v=d+28|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+32|0)>>2],g=v,v=y+32|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+36|0)>>2],g=v,v=d+36|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+40|0)>>2],g=v,v=y+40|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+44|0)>>2],g=v,v=d+44|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+48|0)>>2],g=v,v=y+48|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+52|0)>>2],g=v,v=d+52|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+56|0)>>2],g=v,v=y+56|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+60|0)>>2],g=v,v=d+60|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d- -64|0)>>2],g=v,v=y- -64|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+68|0)>>2],g=v,v=d+68|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+72|0)>>2],g=v,v=y+72|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+76|0)>>2],g=v,v=d+76|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+80|0)>>2],g=v,v=y+80|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+84|0)>>2],g=v,v=d+84|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+88|0)>>2],g=v,v=y+88|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+92|0)>>2],g=v,v=d+92|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+96|0)>>2],g=v,v=y+96|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+100|0)>>2],g=v,v=d+100|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+104|0)>>2],g=v,v=y+104|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=y+108|0)>>2],g=v,v=d+108|0,f[g>>2]=f[v>>2],f[v>>2]=w,w=f[(v=d+112|0)>>2],g=v,v=y+112|0,f[g>>2]=f[v>>2],f[v>>2]=w,v=f[(y=y+116|0)>>2],d=d+116|0,f[y>>2]=f[d>>2],f[d>>2]=v,N=N-120|0,B=B+120|0,E=E-1|0;);break A}break r}break r}_=d}_=_<<1|1;break e}_=(d>>>0>>0?d:m)<<1,t&&(J(w,E=d>>>0>=32?32:d,A,a,0,0),_=E<<1|1)}v=E=R+(_>>>1|0)|0,B=qe(E=E+R|0,B=v>>>0>E>>>0,c,s),d=M,v=o(qe(y=R+(R-(e>>>1|0)|0)|0,E=R>>>0>y>>>0,c,s)^B)+32|0,p=32==(0|(E=o(M^d)))?v:E}e:{i:if(!(Q>>>0<2)){for(v=(E=k(R,120))+l|0,W=r+E|0;;){if(n[(N=Q-1|0)+(u+270|0)|0]

>>0)break i;if((C=(E=(d=f[(u+4|0)+(N<<2)>>2])>>>1|0)+(B=e>>>1|0)|0)>>>0<=a>>>0&!(1&(e|d)))e=C<<1;else{if(Q=k(R-C|0,120)+r|0,1&d||J(Q,E,A,a,o(1|E)<<1^62,0),1&e||J(k(E,120)+Q|0,B,A,a,o(1|B)<<1^62,0),!(d>>>0<2|e>>>0<2||(y=(e=E>>>0>B>>>0)?B:E)>>>0>a>>>0)){d=k(E,120)+Q|0,B=(E=ze(A,e?d:Q,B=k(y,120)))+B|0;A:{f:{if(!e){if(!y){e=E;break A}for(e=E;;){if(!f[d+48>>2])break r;if(!(1&f[e+48>>2]))break r;if(E=f[(w=d+56|0)>>2],G=Q,Q=y=f[(I=e+56|0)>>2],Q=ze(G,(g=(0|(w=f[w+4>>2]))<(0|(I=f[I+4>>2]))?1:E>>>0>>0&(0|w)<=(0|I))?d:e,120)+120|0,(0|B)==(0|(e=k(y>>>0<=E>>>0&(0|w)>=(0|I)|(0|w)>(0|I),120)+e|0)))break A;if((0|W)==(0|(d=k(g,120)+d|0)))break}break A}for(e=v;;){if(!f[B-72>>2])break r;if(!(1&f[d-72>>2]))break r;if(I=B+-64|0,D=e,G=d-120|0,B=B-120|0,e=y=f[I>>2],d=f[(g=d+-64|0)>>2],g=ze(D,(I=(0|(y=f[I+4>>2]))<(0|(w=f[g+4>>2]))?1:e>>>0>>0&(0|w)>=(0|y))?G:B,120),B=B+k(I,120)|0,(0|Q)==(0|(d=k((0|w)<=(0|y)&e>>>0>=d>>>0|(0|w)<(0|y),120)+G|0)))break f;if(e=g-120|0,(0|E)==(0|B))break}}Q=d,e=E}ze(Q,e,B-e|0)}e=C<<1|1}if(d=1,!((Q=N)>>>0>1))break}break e}d=Q}if(i[(u+270|0)+d|0]=p,f[(u+4|0)+(d<<2)>>2]=e,!Y)break;Q=d+1|0,R=(_>>>1|0)+R|0,e=_}return 1&e||J(r,b,A,a,o(1|b)<<1^62,0),void(S=u+336|0)}Ve(1058820),$f()}function j(r,e){var t,k,o,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0,p=0,m=0;S=t=S-32|0,k=f[e+260>>2],o=f[e+256>>2];r:{e:{i:{A:{f:{n:{a:{if(I=f[e+264>>2]){if(R=1==n[k+80|0]?n[k+81|0]:0,!(v=f[k+72>>2]))break a;if(1==n[k+76|0]){if((w=n[k+77|0])>>>0>3)break f;_=f[1058020+(w<<2)>>2],d=(y=s(9e4/(Q=+(v>>>0)/+(_>>>0))))>=-0x8000000000000000,(E=u(y))<0x8000000000000000?(w=~~y>>>0,g=E>=1?~~(E=y>0?c(s(2.3283064365386963e-10*y),4294967295):l(2.3283064365386963e-10*(y-+(~~y>>>0>>>0))))>>>0:0):(w=0,g=-2147483648),B=(h=y>0x7ffffffffffffc00)?-1:d?w:0,B=(w=y==y)?B:0,C=w?h?2147483647:d?g:-2147483648:0,w=v}else _=1152,w=9e4;v<<=5}else w=9e4,_=1152,v=0;if(p=a[e+146>>1],m=a[e+144>>1],!(h=V(32)))break n;if(f[t+24>>2]=h,f[t+20>>2]=32,i[0|h]=3,i[f[t+24>>2]+1|0]=128,f[t+28>>2]=2,2==f[t+20>>2]&&de(t+20|0,1058200),i[f[t+24>>2]+2|0]=128,f[t+28>>2]=3,3==f[t+20>>2]&&de(t+20|0,1058216),i[f[t+24>>2]+3|0]=128,f[t+28>>2]=4,4==(0|(h=f[t+20>>2]))&&(de(t+20|0,1058232),h=f[t+20>>2]),i[f[t+24>>2]+4|0]=27,d=5,f[t+28>>2]=5,h-5>>>0<=1&&(Ae(t+20|0,5,2,1,1),d=f[t+28>>2]),h=f[t+24>>2]+d|0,i[0|h]=0,i[h+1|0]=2,h=d+2|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058248),i[h+f[t+24>>2]|0]=0,h=d+3|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058264),i[h+f[t+24>>2]|0]=4,h=d+4|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058280),i[h+f[t+24>>2]|0]=128,h=d+5|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058296),i[h+f[t+24>>2]|0]=128,h=d+6|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058312),i[h+f[t+24>>2]|0]=128,h=d+7|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058328),i[h+f[t+24>>2]|0]=13,h=d+8|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058344),i[h+f[t+24>>2]|0]=107,h=d+9|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058360),i[h+f[t+24>>2]|0]=21,h=d+10|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058376),i[h+f[t+24>>2]|0]=0,h=d+11|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058392),i[h+f[t+24>>2]|0]=0,h=d+12|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058408),i[h+f[t+24>>2]|0]=0,d=d+13|0,f[t+28>>2]=d,f[t+20>>2]-d>>>0<=3&&(Ae(t+20|0,d,4,1,1),d=f[t+28>>2]),h=f[t+24>>2]+d|0,g=v<<24|(65280&v)<<8|v>>>8&65280|v>>>24,i[0|h]=g,i[h+1|0]=g>>>8,i[h+2|0]=g>>>16,i[h+3|0]=g>>>24,d=d+4|0,f[t+28>>2]=d,f[t+20>>2]-d>>>0<=3&&(Ae(t+20|0,d,4,1,1),d=f[t+28>>2]),v=f[t+24>>2]+d|0,i[0|v]=g,i[v+1|0]=g>>>8,i[v+2|0]=g>>>16,i[v+3|0]=g>>>24,v=d+4|0,f[t+28>>2]=v,(0|v)==f[t+20>>2]&&de(t+20|0,1058424),i[v+f[t+24>>2]|0]=6,v=d+5|0,f[t+28>>2]=v,(0|v)==f[t+20>>2]&&de(t+20|0,1058440),i[v+f[t+24>>2]|0]=128,v=d+6|0,f[t+28>>2]=v,(0|v)==f[t+20>>2]&&de(t+20|0,1058456),i[v+f[t+24>>2]|0]=128,v=d+7|0,f[t+28>>2]=v,(0|v)==f[t+20>>2]&&de(t+20|0,1058472),i[v+f[t+24>>2]|0]=128,v=d+8|0,f[t+28>>2]=v,(0|v)==f[t+20>>2]&&de(t+20|0,1058488),i[v+f[t+24>>2]|0]=1,v=d+9|0,f[t+28>>2]=v,(0|v)==f[t+20>>2]&&de(t+20|0,1058504),i[v+f[t+24>>2]|0]=2,f[(N=t+16|0)>>2]=d+10,v=f[t+24>>2],f[t+8>>2]=f[t+20>>2],f[t+12>>2]=v,!f[e+64>>2])break A;if(!f[e+80>>2])break i;if(f[e+96>>2]){if(d=f[e+72>>2],g=f[e+76>>2],h=f[e+92>>2],v=f[e+88>>2],i[r+92|0]=R,f[r+88>>2]=_,f[r+84>>2]=w,A[r+70>>1]=p,A[r+68>>1]=m,f[r+64>>2]=I,f[r+60>>2]=k,f[r+56>>2]=o,f[r+40>>2]=v,f[r+44>>2]=h,f[r+32>>2]=d,f[r+36>>2]=g,f[r+24>>2]=B,f[r+28>>2]=C,b[r+16>>3]=Q,f[r>>2]=0,f[r+4>>2]=0,w=f[t+12>>2],f[r+72>>2]=f[t+8>>2],f[r+76>>2]=w,w=f[e+108>>2],f[r+48>>2]=f[e+104>>2],f[r+52>>2]=w,f[r+80>>2]=f[N>>2],(r=f[e+128>>2])&&fi[f[r+16>>2]](e+140|0,f[e+132>>2],f[e+136>>2]),!(!f[e+156>>2]&2==f[e+152>>2])){if(w=f[e+244>>2],r=f[e+248>>2]){d=0;t:{if(1!=(0|r)){for(v=1&r,B=-2&r,r=w;fi[f[f[r>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2]),fi[f[f[r+16>>2]+16>>2]](r+28|0,f[r+20>>2],f[r+24>>2]),r=r+32|0,(0|B)!=(0|(d=d+2|0)););if(!v)break t}fi[f[f[(r=(d<<4)+w|0)>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2])}w=f[e+244>>2]}if(B=f[e+240>>2]){if((v=-8&(r=f[w-4>>2]))>>>0<(((e=3&r)?4:8)|(r=B<<4))>>>0)break e;if(v>>>0>r+39>>>0&&e)break r;nr(w)}}return void(S=t+32|0)}Ve(1058152),$f()}Ve(1058168),$f()}Ze(1,1058184),$f()}Ne(w,4,1058104),$f()}Ve(1058120),$f()}Ve(1058136),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function z(r,e,t,b){var u,o=0,c=0,s=0,l=0,h=0;S=u=S-272|0,f[u+252>>2]=10;r:{e:{if(10!=(0|(o=f[r+8>>2]))){if(o>>>0<10)break e;fi[f[f[r>>2]>>2]](u+24|0,r+12|0,f[r+4>>2],o),f[(o=u+32|0)>>2]=10,f[r+8>>2]=f[r+8>>2]-10,f[r+4>>2]=f[r+4>>2]+10,c=f[o+4>>2],f[(r=u+16|0)>>2]=f[o>>2],f[r+4>>2]=c,r=f[u+28>>2],f[u+8>>2]=f[u+24>>2],f[u+12>>2]=r;break r}c=f[r>>2],s=f[r+4>>2],f[r>>2]=1051612,l=f[(o=r+8|0)>>2],h=f[o+4>>2],f[o>>2]=0,f[o+4>>2]=0,f[(o=u+16|0)>>2]=l,f[o+4>>2]=h,f[r+4>>2]=f[r+4>>2]+10,f[u+8>>2]=c,f[u+12>>2]=s;break r}f[u+8>>2]=o,f[u+28>>2]=2,f[u+24>>2]=1051848,f[u+36>>2]=2,f[u+40>>2]=0,f[u+264>>2]=u+8,f[u+268>>2]=3,f[u+256>>2]=u+252,f[u+260>>2]=3,f[u+32>>2]=u+256,Me(u+24|0,1051864),$f()}r=u+256|0,o=u+20|0,fi[f[f[u+8>>2]>>2]](r,o,f[u+12>>2],f[u+16>>2]),Tr(u+24|0,r,e,t),fi[f[f[u+256>>2]+16>>2]](u+268|0,f[u+260>>2],f[u+264>>2]);r:{e:{i:{A:{f:{if(2!=f[u+24>>2]|f[u+28>>2])switch(t=a[u+62>>1],r=n[u+61|0],e=f[u+56>>2],n[u+60|0]-3|0){case 0:break A;case 1:break i;default:break f}fi[f[f[u+8>>2]+16>>2]](o,f[u+12>>2],f[u+16>>2]);break r}s=f[(c=u+48|0)+4>>2],f[(o=u+88|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+40|0)+4>>2],f[(o=u+80|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+32|0)+4>>2],f[(o=u+72|0)>>2]=f[c>>2],f[o+4>>2]=s,o=f[u+28>>2],f[u+64>>2]=f[u+24>>2],f[u+68>>2]=o,f[u+120>>2]=0,f[u+124>>2]=0,f[u+112>>2]=0,f[u+116>>2]=4,A[u+102>>1]=t,i[u+100|0]=2,f[u+96>>2]=e,i[u+101|0]=r,i[u+104|0]=(128&r)>>>7,r=f[(t=u+16|0)>>2],o=f[t+4>>2],f[(t=u+264|0)>>2]=r,f[t+4>>2]=o,o=f[u+12>>2],f[u+256>>2]=f[u+8>>2],f[u+260>>2]=o,r?(f[u+124>>2]=r,ce(u+112|0,1058736),o=f[u+260>>2],r=f[u+116>>2],f[r>>2]=f[u+256>>2],f[r+4>>2]=o,o=f[t+4>>2],f[(r=r+8|0)>>2]=f[t>>2],f[r+4>>2]=o,f[u+120>>2]=1):fi[f[f[u+256>>2]+16>>2]](u+268|0,f[u+260>>2],0),(0|(t=f[b+160>>2]))==f[b+152>>2]&&ke(b+152|0,1057308),r=f[b+156>>2]+k(t,72)|0,f[r>>2]=0,f[r+4>>2]=0,o=f[u+68>>2],f[r+8>>2]=f[u+64>>2],f[r+12>>2]=o,s=f[(c=u+72|0)+4>>2],f[(o=r+16|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+80|0)+4>>2],f[(o=r+24|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+88|0)+4>>2],f[(o=r+32|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+96|0)+4>>2],f[(o=r+40|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+104|0)+4>>2],f[(o=r+48|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+112|0)+4>>2],f[(o=r+56|0)>>2]=f[c>>2],f[o+4>>2]=s,c=f[(o=u+120|0)+4>>2],f[(r=r- -64|0)>>2]=f[o>>2],f[r+4>>2]=c,f[b+160>>2]=t+1;break e}s=f[(c=u+48|0)+4>>2],f[(o=u+152|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+40|0)+4>>2],f[(o=u+144|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+32|0)+4>>2],f[(o=u+136|0)>>2]=f[c>>2],f[o+4>>2]=s,o=f[u+28>>2],f[u+128>>2]=f[u+24>>2],f[u+132>>2]=o,f[u+184>>2]=0,f[u+188>>2]=0,f[u+176>>2]=0,f[u+180>>2]=4,A[u+166>>1]=t,i[u+164|0]=3,f[u+160>>2]=e,i[u+165|0]=r,i[u+168|0]=(128&r)>>>7,r=f[(t=u+16|0)>>2],o=f[t+4>>2],f[(t=u+264|0)>>2]=r,f[t+4>>2]=o,o=f[u+12>>2],f[u+256>>2]=f[u+8>>2],f[u+260>>2]=o,r?(f[u+188>>2]=r,ce(u+176|0,1058736),o=f[u+260>>2],r=f[u+180>>2],f[r>>2]=f[u+256>>2],f[r+4>>2]=o,o=f[t+4>>2],f[(r=r+8|0)>>2]=f[t>>2],f[r+4>>2]=o,f[u+184>>2]=1):fi[f[f[u+256>>2]+16>>2]](u+268|0,f[u+260>>2],0),(0|(t=f[b+160>>2]))==f[b+152>>2]&&ke(b+152|0,1057324),r=f[b+156>>2]+k(t,72)|0,f[r>>2]=1,f[r+4>>2]=0,o=f[u+132>>2],f[r+8>>2]=f[u+128>>2],f[r+12>>2]=o,s=f[(c=u+136|0)+4>>2],f[(o=r+16|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+144|0)+4>>2],f[(o=r+24|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+152|0)+4>>2],f[(o=r+32|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+160|0)+4>>2],f[(o=r+40|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+168|0)+4>>2],f[(o=r+48|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+176|0)+4>>2],f[(o=r+56|0)>>2]=f[c>>2],f[o+4>>2]=s,c=f[(o=u+184|0)+4>>2],f[(r=r- -64|0)>>2]=f[o>>2],f[r+4>>2]=c,f[b+160>>2]=t+1;break e}s=f[(c=u+48|0)+4>>2],f[(o=u+216|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+40|0)+4>>2],f[(o=u+208|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+32|0)+4>>2],f[(o=u+200|0)>>2]=f[c>>2],f[o+4>>2]=s,o=f[u+28>>2],f[u+192>>2]=f[u+24>>2],f[u+196>>2]=o,f[u+240>>2]=0,f[u+244>>2]=0,f[u+232>>2]=0,f[u+236>>2]=4,A[u+230>>1]=t,i[u+229|0]=r,i[u+228|0]=4,f[u+224>>2]=e,r=f[(t=u+16|0)>>2],o=f[t+4>>2],f[(t=u+264|0)>>2]=r,f[t+4>>2]=o,o=f[u+12>>2],f[u+256>>2]=f[u+8>>2],f[u+260>>2]=o,r?(f[u+244>>2]=r,ce(u+232|0,1058736),o=f[u+260>>2],r=f[u+236>>2],f[r>>2]=f[u+256>>2],f[r+4>>2]=o,o=f[t+4>>2],f[(r=r+8|0)>>2]=f[t>>2],f[r+4>>2]=o,f[u+240>>2]=1):fi[f[f[u+256>>2]+16>>2]](u+268|0,f[u+260>>2],0),(0|(r=f[b+160>>2]))==f[b+152>>2]&&ke(b+152|0,1057340),f[b+160>>2]=r+1,r=f[b+156>>2]+k(r,72)|0,f[r>>2]=2,f[r+4>>2]=0,t=f[u+196>>2],f[r+8>>2]=f[u+192>>2],f[r+12>>2]=t,c=f[(o=u+200|0)+4>>2],f[(t=r+16|0)>>2]=f[o>>2],f[t+4>>2]=c,c=f[(o=u+208|0)+4>>2],f[(t=r+24|0)>>2]=f[o>>2],f[t+4>>2]=c,c=f[(o=u+216|0)+4>>2],f[(t=r+32|0)>>2]=f[o>>2],f[t+4>>2]=c,c=f[(o=u+224|0)+4>>2],f[(t=r+40|0)>>2]=f[o>>2],f[t+4>>2]=c,c=f[(o=u+232|0)+4>>2],f[(t=r+48|0)>>2]=f[o>>2],f[t+4>>2]=c,o=f[(t=u+240|0)+4>>2],f[(r=r+56|0)>>2]=f[t>>2],f[r+4>>2]=o}f[b+164>>2]=e}S=u+272|0}function P(r,e){var A,a,t=0,b=0,o=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0;S=A=S-144|0,_=n[e+261|0],g=f[e+252>>2],v=f[e+256>>2],h=n[e+262|0],a=r+12|0,fi[f[f[r>>2]>>2]](A,a,f[r+4>>2],f[r+8>>2]);r:{e:{if(o=f[r+8>>2])for(I=e+160|0,Q=e+240|0,N=e+224|0,R=A+112|0,C=A+12|0;;){i:{A:{f:{n:{a:{t:{b:{k:switch(255&h){case 0:o=o-1|0,f[r+8>>2]=o,t=f[r+4>>2],f[r+4>>2]=t+1,h=255==n[0|t];break i;case 4:f[r+8>>2]=o-1,t=f[r+4>>2],f[r+4>>2]=t+1,g=(n[0|t]<<3)+g|0,h=5;break A;case 1:if(o=o-1|0,f[r+8>>2]=o,t=f[r+4>>2],f[r+4>>2]=t+1,h=0,(d=n[0|t])>>>0<240)break i;o=f[e+152>>2],h=f[e+156>>2],b=f[e+32>>2],B=f[e+36>>2],t=f[e+40>>2],y=f[e+44>>2],ze(A+16|0,I,80),f[e+232>>2]=0,f[e+236>>2]=0,f[e+224>>2]=0,f[e+228>>2]=4,i[e+222|0]=0,i[e+220|0]=0,f[e+216>>2]=0,f[e+208>>2]=t,f[e+212>>2]=y,f[e+200>>2]=b,f[e+204>>2]=B,f[e+192>>2]=t,f[e+196>>2]=y,f[e+184>>2]=b,f[e+188>>2]=B,f[e+176>>2]=t,f[e+180>>2]=y,f[e+168>>2]=b,f[e+172>>2]=B,f[e+152>>2]=0,f[e+156>>2]=0,2!=(0|o)|h&&((0|(b=f[e+248>>2]))==f[e+240>>2]&&te(Q,1056108),t=f[e+244>>2]+k(b,88)|0,f[t>>2]=o,f[t+4>>2]=h,ze(t+8|0,A+16|0,80),f[e+248>>2]=b+1),_=1&d,h=2;break A;case 2:if(f[r+8>>2]=o-1,t=f[r+4>>2],f[r+4>>2]=t+1,(o=(b=n[0|t])>>>2&15)>>>0>11)break b;if(!f[e+156>>2]&2==f[e+152>>2])break t;if(t=f[1056124+(o<<2)>>2],i[e+221|0]=o,i[e+220|0]=1,!t)break a;if(i[e+222|0]=1,f[e+216>>2]=t,i[e+223|0]=b<<2&4,f[e+32>>2]){f[e+32>>2]=1,f[e+36>>2]=0,B=(w=s(9216e4/+(t>>>0)))>=-0x8000000000000000,b=f[e+40>>2],d=f[e+44>>2],(E=u(w))<0x8000000000000000?(t=~~w>>>0,y=E>=1?~~(E=w>0?c(s(2.3283064365386963e-10*w),4294967295):l(2.3283064365386963e-10*(w-+(~~w>>>0>>>0))))>>>0:0):(t=0,y=-2147483648),o=w>0x7ffffffffffffc00,h=(h=b)+(t=(b=w==w)?o?-1:B?t:0:0)|0,b=(b?o?2147483647:B?y:-2147483648:0)+d|0,f[e+40>>2]=h,f[e+44>>2]=t>>>0>h>>>0?b+1|0:b,h=3;break A}Ve(1056220),$f();case 3:if(f[r+8>>2]=o-1,b=f[r+4>>2],f[r+4>>2]=b+1,!f[e+156>>2]&2==f[e+152>>2])break n;if(n[e+222|0]){t=n[0|b],i[e+222|0]=1,i[e+223|0]=n[e+223|0]+((192&t)>>>6|0),g=(3&t)<<11,h=4;break A}Ve(1056252),$f();case 5:f[r+8>>2]=o-1,t=f[r+4>>2],f[r+4>>2]=t+1,g=(n[0|t]>>>5|0)+g|0,h=6;break A;case 6:d=o-1|0,f[r+8>>2]=d,t=(b=f[r+4>>2])+1|0,f[r+4>>2]=t,o=n[0|b],fi[f[f[r>>2]>>2]](A+100|0,a,t,d),d=A+8|0,fi[f[f[A>>2]+16>>2]](C,f[A+4>>2],f[d>>2]),t=f[(b=A+108|0)+4>>2],f[d>>2]=f[b>>2],f[d+4>>2]=t,t=f[A+104>>2],f[A>>2]=f[A+100>>2],f[A+4>>2]=t,v=(t=g-7|0)>>>0<=g>>>0?t:0,h=3&o||1&_?9:7;break A;case 7:if(f[r+8>>2]=o-1,f[r+4>>2]=f[r+4>>2]+1,f[A+96>>2]=1,!(t=f[A+8>>2]))break e;f[A+8>>2]=t-1,f[A+4>>2]=f[A+4>>2]+1,v=v-1|0,h=8;break A;case 8:if(f[r+8>>2]=o-1,f[r+4>>2]=f[r+4>>2]+1,f[A+96>>2]=1,!(t=f[A+8>>2]))break e;f[A+8>>2]=t-1,f[A+4>>2]=f[A+4>>2]+1,v=v-1|0,h=9;break A;default:break k}k:{u:{if(b=(t=f[A+8>>2])>>>0>v>>>0?v:t){if(f[A+96>>2]=b,b>>>0>o>>>0)break f;if(f[r+8>>2]=o-b,f[r+4>>2]=b+f[r+4>>2],!f[e+156>>2]&2==f[e+152>>2])break k;if(zr(A+100|0,A,0,b),v=v-b|0,t=f[A+108>>2])break u;fi[f[f[A+100>>2]+16>>2]](R,f[A+104>>2],0)}h=v?h:0;break A}f[e+236>>2]=t+f[e+236>>2],(0|(t=f[e+232>>2]))==f[e+224>>2]&&ce(N,1058736),f[e+232>>2]=t+1,b=f[e+228>>2]+(t<<4)|0,t=f[A+104>>2],f[b>>2]=f[A+100>>2],f[b+4>>2]=t,o=b+8|0,t=f[(b=A+108|0)+4>>2],f[o>>2]=f[b>>2],f[o+4>>2]=t,h=v?h:0;break A}Ve(1056268),$f()}Ne(o,12,1056172),$f()}Ve(1056188),$f()}Ve(1056204),$f()}Ve(1056236),$f()}f[A+124>>2]=o;break r}o=f[r+8>>2]}if(!o)break}return f[e+256>>2]=v,i[e+262|0]=h,f[e+252>>2]=g,i[e+261|0]=1&_,fi[f[f[A>>2]+16>>2]](A+12|0,f[A+4>>2],f[A+8>>2]),void(S=A+144|0)}f[A+124>>2]=0}f[A+104>>2]=2,f[A+100>>2]=1058600,f[A+112>>2]=2,f[A+116>>2]=0,f[A+136>>2]=A+124,f[A+140>>2]=3,f[A+128>>2]=A+96,f[A+132>>2]=3,f[A+108>>2]=A+128,Me(A+100|0,1058616),$f()}function K(r,e){var A,a=0,t=0,b=0,k=0,u=0,o=0,c=0,s=0;S=A=S-16|0,o=f[e>>2],b=(a=f[(!f[e+4>>2]&o>>>0<2?68:60)+e>>2]+62|0)<<24|(65280&a)<<8|a>>>8&65280|a>>>24;r:{e:{i:{A:{if(t=f[r+4>>2],f[r+8>>2]-t>>>0>=4)a=f[r>>2]+t|0,i[0|a]=b,i[a+1|0]=b>>>8,i[a+2|0]=b>>>16,i[a+3|0]=b>>>24;else if(or(r,4),a=(t=f[r+4>>2])+f[r>>2]|0,i[0|a]=b,i[a+1|0]=b>>>8,i[a+2|0]=b>>>16,i[a+3|0]=b>>>24,(u=f[r+8>>2]-t|0)>>>0<=3)break A;a=t+4|0,f[r+4>>2]=a,f[r+8>>2]-a>>>0<=3&&(or(r,4),a=f[r+4>>2]),a=f[r>>2]+a|0,i[0|a]=101,i[a+1|0]=109,i[a+2|0]=115,i[a+3|0]=103;f:{n:{a:{if((a=(k=f[r+8>>2])-(b=f[r+4>>2])|0)>>>0>3){if(t=b+4|0,f[r+4>>2]=t,k-t>>>0>=4)a=f[r>>2]+t|0,i[0|a]=1,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0;else if(or(r,4),a=(t=f[r+4>>2])+f[r>>2]|0,i[0|a]=1,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,(u=f[r+8>>2]-t|0)>>>0<=3)break A;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)a=f[r>>2]+t|0,i[0|a]=0,i[a+1|0]=1,i[a+2|0]=95,i[a+3|0]=144;else if(or(r,4),a=(t=f[r+4>>2])+f[r>>2]|0,i[0|a]=0,i[a+1|0]=1,i[a+2|0]=95,i[a+3|0]=144,(u=f[r+8>>2]-t|0)>>>0<=3)break A;if(t=t+4|0,f[r+4>>2]=t,1==f[e+8>>2]){if(c=(a=16711680&(u=f[e+16>>2]))<<24,a=k=a>>>8|0,s=c,c=(k=-16777216&u)>>>24|0,k=s|k<<8,c=a|c|(b=u<<24|(65280&u)<<8),u=-16777216&((255&(a=f[e+20>>2]))<<24|u>>>8)|16711680&((16777215&a)<<8|u>>>24)|a>>>8&65280|a>>>24|k,a=c,f[r+8>>2]-t>>>0>=8)b=f[r>>2]+t|0,i[0|b]=u,i[b+1|0]=u>>>8,i[b+2|0]=u>>>16,i[b+3|0]=u>>>24,i[b+4|0]=a,i[b+5|0]=a>>>8,i[b+6|0]=a>>>16,i[b+7|0]=a>>>24;else if(or(r,8),b=(t=f[r+4>>2])+f[r>>2]|0,i[0|b]=u,i[b+1|0]=u>>>8,i[b+2|0]=u>>>16,i[b+3|0]=u>>>24,i[b+4|0]=a,i[b+5|0]=a>>>8,i[b+6|0]=a>>>16,i[b+7|0]=a>>>24,(a=f[r+8>>2]-t|0)>>>0<=7)break a;if(t=t+8|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)a=f[r>>2]+t|0,i[0|a]=255,i[a+1|0]=255,i[a+2|0]=255,i[a+3|0]=255;else if(or(r,4),a=(t=f[r+4>>2])+f[r>>2]|0,i[0|a]=255,i[a+1|0]=255,i[a+2|0]=255,i[a+3|0]=255,(u=f[r+8>>2]-t|0)>>>0<=3)break A;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)a=f[r>>2]+t|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0;else if(or(r,4),a=(t=f[r+4>>2])+f[r>>2]|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,(u=f[r+8>>2]-t|0)>>>0<=3)break A;if(a=t+4|0,f[r+4>>2]=a,f[r+8>>2]-a>>>0<=28&&(or(r,29),a=f[r+4>>2]),b=n[1051356]|n[1051357]<<8|n[1051358]<<16|n[1051359]<<24,u=f[r>>2]+a|0,a=n[1051352]|n[1051353]<<8|n[1051354]<<16|n[1051355]<<24,i[0|u]=a,i[u+1|0]=a>>>8,i[u+2|0]=a>>>16,i[u+3|0]=a>>>24,i[u+4|0]=b,i[u+5|0]=b>>>8,i[u+6|0]=b>>>16,i[u+7|0]=b>>>24,b=n[1051377]|n[1051378]<<8|n[1051379]<<16|n[1051380]<<24,k=u+21|0,a=n[1051373]|n[1051374]<<8|n[1051375]<<16|n[1051376]<<24,i[0|k]=a,i[k+1|0]=a>>>8,i[k+2|0]=a>>>16,i[k+3|0]=a>>>24,i[k+4|0]=b,i[k+5|0]=b>>>8,i[k+6|0]=b>>>16,i[k+7|0]=b>>>24,b=n[1051372]|n[1051373]<<8|n[1051374]<<16|n[1051375]<<24,k=u+16|0,a=n[1051368]|n[1051369]<<8|n[1051370]<<16|n[1051371]<<24,i[0|k]=a,i[k+1|0]=a>>>8,i[k+2|0]=a>>>16,i[k+3|0]=a>>>24,i[k+4|0]=b,i[k+5|0]=b>>>8,i[k+6|0]=b>>>16,i[k+7|0]=b>>>24,b=n[1051364]|n[1051365]<<8|n[1051366]<<16|n[1051367]<<24,k=u+8|0,a=n[1051360]|n[1051361]<<8|n[1051362]<<16|n[1051363]<<24,i[0|k]=a,i[k+1|0]=a>>>8,i[k+2|0]=a>>>16,i[k+3|0]=a>>>24,i[k+4|0]=b,i[k+5|0]=b>>>8,i[k+6|0]=b>>>16,i[k+7|0]=b>>>24,(a=(k=f[r+8>>2])-(b=f[r+4>>2])|0)>>>0<=28)break n;if(a=b+29|0,f[r+4>>2]=a,(0|a)==(0|k)&&(or(r,1),a=f[r+4>>2]),i[f[r>>2]+a|0]=0,(0|(b=f[r+8>>2]))==(0|(a=f[r+4>>2])))break f;t=a+1|0,f[r+4>>2]=t;t:{b:switch(o-1|0){default:if(!(a=f[e+64>>2]))break t;for(o=a<<4,e=f[e+60>>2]+8|0;;){if(a=f[e-4>>2],(u=b-t|0)>>>0<(k=f[e>>2])>>>0&&(or(r,k),u=(b=f[r+8>>2])-(t=f[r+4>>2])|0),ze(f[r>>2]+t|0,a,k),k>>>0>u>>>0)break e;if(t=t+k|0,f[r+4>>2]=t,e=e+16|0,!(o=o-16|0))break}break t;case 0:if(!(a=f[e+64>>2]))break t;for(o=a<<4,e=f[e+60>>2]+8|0;;){if(a=f[e-4>>2],(u=b-t|0)>>>0<(k=f[e>>2])>>>0&&(or(r,k),u=(b=f[r+8>>2])-(t=f[r+4>>2])|0),ze(f[r>>2]+t|0,a,k),k>>>0>u>>>0)break e;if(t=t+k|0,f[r+4>>2]=t,e=e+16|0,!(o=o-16|0))break}break t;case 1:break b}if(a=f[e+56>>2])for(o=a<<4,e=f[e+52>>2]+8|0;;){if(a=f[e-4>>2],(u=b-t|0)>>>0<(k=f[e>>2])>>>0&&(or(r,k),u=(b=f[r+8>>2])-(t=f[r+4>>2])|0),ze(f[r>>2]+t|0,a,k),k>>>0>u>>>0)break e;if(t=t+k|0,f[r+4>>2]=t,e=e+16|0,!(o=o-16|0))break}}return void(S=A+16|0)}Ve(1055076),$f()}f[A+12>>2]=a;break i}f[A+12>>2]=a,f[A+8>>2]=8;break r}f[A+12>>2]=a,f[A+8>>2]=29;break r}f[A+8>>2]=1,f[A+12>>2]=0;break r}f[A+12>>2]=u}f[A+8>>2]=4;break r}f[A+12>>2]=u,f[A+8>>2]=k}pe(A+8|0),$f()}function q(r,e,A){var n=0,t=0,b=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0;r:{if(402653184&(v=f[r+8>>2])){e:{i:{A:{f:{if(268435456&v){if(t=a[r+14>>1])break f;A=0;break A}if(A>>>0>=16){if((c=(o=e-(t=e+3&-4)|0)+A|0)>>>0>=4){if(l=3&c,!(h=(0|e)==(0|t))){if(o>>>0<=4294967292)for(;n=((((s=n)+(i[0|(n=e+b|0)]>-65)|0)+(i[n+1|0]>-65)|0)+(i[n+2|0]>-65)|0)+(i[n+3|0]>-65)|0,b=b+4|0;);if(!h)for(b=e+b|0;n=(i[0|b]>-65)+n|0,b=b+1|0,o=o+1|0;);}for(l&&(u=i[0|(b=(-4&c)+t|0)]>-65,1!=(0|l)&&(u=(i[b+1|0]>-65)+u|0,2!=(0|l)&&(u=(i[b+2|0]>-65)+u|0))),o=c>>>2|0,u=n+u|0;;){if(c=t,!o)break e;if(h=3&(l=o>>>0>=192?192:o),n=0,o>>>0>=4)for(b=l>>>2<<4;n=(s=(s=(s=(s=n)+(16843009&((-1^(n=f[t>>2]))>>>7|n>>>6))|0)+(16843009&((-1^(n=f[t+4>>2]))>>>7|n>>>6))|0)+(16843009&((-1^(n=f[t+8>>2]))>>>7|n>>>6))|0)+(16843009&((-1^(n=f[t+12>>2]))>>>7|n>>>6))|0,t=t+16|0,b=b-16|0;);if(o=o-l|0,t=c+(l<<2)|0,u=(k((n>>>8&16711935)+(16711935&n)|0,65537)>>>16|0)+u|0,h)break}b=n=16843009&((-1^(n=f[(t=c+((252&l)<<2)|0)>>2]))>>>7|n>>>6),1!=(0|h)&&(b=n=b+(16843009&((-1^(n=f[t+4>>2]))>>>7|n>>>6))|0,2!=(0|h)&&(b=b+(16843009&((-1^(n=f[t+8>>2]))>>>7|n>>>6))|0)),u=(k(((n=b)>>>8&459007)+(16711935&n)|0,65537)>>>16|0)+u|0;break e}for(n=-4&A,b=3&A,t=e;u=((((i[0|t]>-65)+u|0)+(i[t+1|0]>-65)|0)+(i[t+2|0]>-65)|0)+(i[t+3|0]>-65)|0,t=t+4|0,n=n-4|0;);if(!b)break e;for(;u=(i[0|t]>-65)+u|0,t=t+1|0,b=b-1|0;);break e}if(!A){A=0;break e}if(b=3&A,A>>>0>=4)for(c=12&A;u=((((i[0|(t=e+n|0)]>-65)+u|0)+(i[t+1|0]>-65)|0)+(i[t+2|0]>-65)|0)+(i[t+3|0]>-65)|0,(0|c)!=(0|(n=n+4|0)););if(!b)break e;for(t=e+n|0;u=(i[0|t]>-65)+u|0,t=t+1|0,b=b-1|0;);break e}for(o=e+A|0,A=0,n=e,b=t;;){if(u=n,(0|n)==(0|o))break i;if(s=n+1|0,(0|(c=i[0|n]))>=0||(s=n+2|0,c>>>0<4294967264||(s=n+3|0,c>>>0<4294967280||(s=n+4|0))),A=((n=s)-u|0)+A|0,!(b=b-1|0))break}}b=0}u=t-b|0}if(!((n=a[r+12>>1])>>>0<=u>>>0)){b=n-u|0,t=0,u=0;e:{i:switch((v>>>29&3)-1|0){case 0:u=b;break e;case 1:break i;default:break e}u=(65534&b)>>>1|0}for(o=2097151&v,c=f[r+4>>2],r=f[r>>2];;){if((65535&t)>>>0<(65535&u)>>>0){if(n=1,t=t+1|0,!(0|fi[f[c+16>>2]](r,o)))continue;break r}break}if(n=1,0|fi[f[c+12>>2]](r,e,A))break r;for(e=b-u&65535,t=0;;){if(e>>>0<=(65535&t)>>>0)return 0;if(t=t+1|0,0|fi[f[c+16>>2]](r,o))break}break r}}n=0|fi[f[f[r+4>>2]+12>>2]](f[r>>2],e,A)}return n}function $(r){var e,i=0,A=0,n=0,t=0,k=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,G=0,Y=0,W=0,D=0,F=0,T=0,M=0,O=0;S=e=S-16|0,l=f[r+184>>2],i=f[r+168>>2],o=f[r+152>>2];r:{e:{i:{A:{f:{n:{a:{if(k=f[r+136>>2]){if(f[e+12>>2]=f[r+148>>2],t=f[r+144>>2],A=f[r+140>>2],f[e+4>>2]=A,f[e+8>>2]=t,f[e>>2]=k,(0|(c=f[e+8>>2]))<0)break a;if(c){if(!(t=V(c)))break n}else t=1;ze(t,A,c),fi[f[k+16>>2]](e+12|0,A,c)}if(o){if(u=r+156|0,f[e+12>>2]=f[u+8>>2],A=f[u>>2],u=f[u+4>>2],f[e+4>>2]=A,f[e+8>>2]=u,f[e>>2]=o,(0|(k=f[e+8>>2]))<0)break r;if(k){if(!(s=V(k)))break n}else s=1;ze(s,A,k),fi[f[o+16>>2]](e+12|0,A,k)}if(A=0,i){if(n=r+172|0,f[e+12>>2]=f[n+8>>2],u=f[n>>2],n=f[n+4>>2],f[e+4>>2]=u,f[e+8>>2]=n,f[e>>2]=i,(0|(o=f[e+8>>2]))<0)break r;if(o){if(!(n=V(o)))break n}else n=1;ze(n,u,o),fi[f[i+16>>2]](e+12|0,u,o)}if(l){if(i=r+188|0,f[e+12>>2]=f[i+8>>2],u=f[i>>2],i=f[i+4>>2],f[e+4>>2]=u,f[e+8>>2]=i,f[e>>2]=l,(0|(i=f[e+8>>2]))<0)break r;if(i){if(!(A=V(i)))break n}else A=1;ze(A,u,i),fi[f[l+16>>2]](e+12|0,u,i)}if(i=0|R(0|t,0|(t?c:0),0|s,0|(s?k:0),0|n,0|(n?o:0),0|A,0|(A?i:0)),_=a[r+130>>1],I=a[r+128>>1],Q=a[r+126>>1],N=a[r+124>>1],G=i,Y=a[r+122>>1],W=a[r+120>>1],u=f[r+116>>2],s=f[r+112>>2],h=f[r+108>>2],i=f[r+104>>2],n=f[r+100>>2],v=f[r+96>>2],E=f[r+88>>2],A=f[r+80>>2],D=f[r+84>>2],w=f[r+64>>2],F=f[r+40>>2],o=f[r+32>>2],g=f[r+36>>2],T=f[r+24>>2],y=f[r+16>>2],M=f[r+20>>2],O=b[r+8>>3],l=f[r>>2],B=f[r+48>>2]){if(f[e+12>>2]=f[r+60>>2],k=f[r+56>>2],t=f[r+52>>2],f[e+4>>2]=t,f[e+8>>2]=k,f[e>>2]=B,(0|(c=f[e+8>>2]))<0)break r;if(c){if(!(k=V(c)))break n}else k=1;ze(k,t,c),fi[f[B+16>>2]](e+12|0,t,c)}else k=0;if(w){if(r=r+68|0,f[e+12>>2]=f[r+8>>2],t=f[r>>2],r=f[r+4>>2],f[e+4>>2]=t,f[e+8>>2]=r,f[e>>2]=w,(0|(r=f[e+8>>2]))<0)break r;if(r){if(!(d=V(r)))break n}else d=1;ze(d,t,r),fi[f[w+16>>2]](e+12|0,t,r)}if(t=0,y=0|C(0|y,0|M,0|T),g=0|C(0|o,0|g,0|F),o=0,E&&(o=0|C(0|A,0|D,0|E)),A=0,-2147483648!=(0|v)){if(i>>>0>=v>>>0)t=n;else if(i){if(!(t=kr(n,v,1,i)))break n}else{if((t=-8&(A=f[n-4>>2]))>>>0<((A&=3)?4:8)+v>>>0)break f;if(t>>>0>v+39>>>0&&A)break A;nr(n),t=1}A=i}if(i=0,n=0,-2147483648!=(0|h)){if(u>>>0>=h>>>0)i=s;else if(u){if(!(i=kr(s,h,1,u)))break n}else{if((i=-8&(n=f[s-4>>2]))>>>0<((n&=3)?4:8)+h>>>0)break i;if(i>>>0>h+39>>>0&&n)break e;nr(s),i=1}n=u}return r=0|m(0|G,0|p(0|(1&W?Y:16777215),0|(1&N?Q:16777215),0|t,0|A,0|i,0|n,0|k,0|(k?c:0),0|d,0|(d?r:0),0|y,0|g,0|o,0|(1&I?_:16777215),0|l,+(1&l?O:0))),S=e+16|0,r}De(1057036)}$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}De(1057036),$f()}function rr(r,e,A,a,t){var b,k,u,c,s,l,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0,p=0,m=0,G=0,Y=0,W=0,D=0;for(S=k=S-336|0,b=e,u=ri(e=e-1|0,h=-1!=(0|e)?1073741824:1073741823,b,0),c=M,m=b>>>0>=4097?(1<<(e=32-o(1|b)>>>1|0))+(b>>>e|0)>>>1|0:(e=b-(b>>>1|0)|0)>>>0>=64?64:e,s=r-8|0,l=r+16|0,g=1;;){if(Y=0,y=1,W=Q>>>0>>0){E=(_=Q<<3)+r|0;r:{e:if(!((v=b-Q|0)>>>0>>0)){i:if(v>>>0<2)h=v;else{e=f[E+8>>2],y=f[E>>2];A:{f:{n:{a:{if(C=(0|(d=f[E+12>>2]))<(0|(h=f[E+4>>2]))?1:e>>>0>>0&(0|h)>=(0|d)){if(2==(0|v))break n;for(y=_+l|0,h=2;;){if(B=e,e=f[y>>2],w=(0|(w=d))<(0|(d=f[y+4>>2]))?1:(0|d)>=(0|w)&e>>>0>=B>>>0)break a;if(y=y+8|0,(0|v)==(0|(h=h+1|0)))break}}else{if(h=2,2==(0|v))break i;for(y=_+l|0;;){if(B=e,e=f[y>>2],w=(0|(w=d))>(0|(d=f[y+4>>2]))?1:e>>>0>>0&(0|d)<=(0|w))break a;if(y=y+8|0,(0|v)==(0|(h=h+1|0)))break}}h=v}if(h>>>0>>0)break e;if(!C)break i;if(h>>>0>=2)break f;h=1;break i}p=E+16|0,N=0,h=2;break A}if(p=(e=h<<3)+E|0,N=0,1!=(0|(d=h>>>1|0))){for(C=1&d,y=(e+_|0)+s|0,B=2147483646&d,e=E;w=f[y>>2],v=f[y+4>>2],d=f[e+4>>2],f[y>>2]=f[e>>2],f[y+4>>2]=d,f[e>>2]=w,f[e+4>>2]=v,w=f[(R=((536870910^N)<<3)+p|0)>>2],v=f[R+4>>2],d=f[(_=e+8|0)+4>>2],f[R>>2]=f[_>>2],f[R+4>>2]=d,f[_>>2]=w,f[_+4>>2]=v,y=y-16|0,e=e+16|0,(0|B)!=(0|(N=N+2|0)););if(!C)break i}}y=f[(w=E+(N<<3)|0)>>2],d=f[w+4>>2],e=f[(v=(~N<<3)+p|0)+4>>2],f[w>>2]=f[v>>2],f[w+4>>2]=e,f[v>>2]=y,f[v+4>>2]=d}y=h<<1|1;break r}y=(v>>>0>>0?v:m)<<1,t&&(X(E,e=v>>>0>=32?32:v,A,a,0,0),y=e<<1|1)}h=e=Q+(y>>>1|0)|0,d=qe(e=e+Q|0,h=h>>>0>e>>>0,u,c),h=M,v=o(qe(e=Q+(Q-(g>>>1|0)|0)|0,v=Q>>>0>e>>>0,u,c)^d)+32|0,Y=32==(0|(e=o(M^h)))?v:e}r:{e:if(!(I>>>0<2)){for(C=(e=Q<<3)+s|0,D=r+e|0;;){if(n[(_=I-1|0)+(k+270|0)|0]>>0)break e;if((G=(B=(e=f[(k+4|0)+(_<<2)>>2])>>>1|0)+(d=g>>>1|0)|0)>>>0<=a>>>0&!(1&(e|g)))g=G<<1;else{if(h=(Q-G<<3)+r|0,1&e||X(h,B,A,a,o(1|B)<<1^62,0),1&g||X((B<<3)+h|0,d,A,a,o(1|d)<<1^62,0),!(e>>>0<2|g>>>0<2||(w=(e=v=d>>>0>>0)?d:B)>>>0>a>>>0)){g=(B<<3)+h|0,d=e?g:h,I=(e=w<<3)+(d=ze(A,d,e))|0;i:{A:{if(!v){if(!w){e=d;break i}for(e=d;;){if(B=f[g>>2],w=f[e>>2],E=(0|(v=f[g+4>>2]))<(0|(d=f[e+4>>2]))?1:(0|v)<=(0|d)&w>>>0>B>>>0,f[h>>2]=E?B:w,f[h+4>>2]=E?v:d,h=h+8|0,(0|I)==(0|(e=((w>>>0<=B>>>0&(0|v)>=(0|d)|(0|v)>(0|d))<<3)+e|0)))break i;if((0|D)==(0|(g=(E<<3)+g|0)))break}break i}for(e=C;;){if(w=f[(v=N=I-8|0)>>2],E=f[v+4>>2],v=f[(g=p=g-8|0)>>2],I=f[g+4>>2],B=e,B=e,R=(0|(g=E))>(0|(e=I))?1:v>>>0>>0&(0|e)<=(0|g),f[B>>2]=R?w:v,f[B+4>>2]=R?E:I,I=((v>>>0>w>>>0&(0|e)>=(0|g)|(0|e)>(0|g))<<3)+N|0,(0|(g=(((0|e)<=(0|g)&v>>>0<=w>>>0|(0|e)<(0|g))<<3)+p|0))==(0|h))break A;if(e=B-8|0,(0|d)==(0|I))break}}h=g,e=d}ze(h,e,I-e|0)}g=G<<1|1}if(h=1,I=_,!(_>>>0>1))break}break r}h=I}if(i[(k+270|0)+h|0]=Y,f[(k+4|0)+(h<<2)>>2]=g,!W)break;I=h+1|0,Q=(y>>>1|0)+Q|0,g=y}1&g||X(r,b,A,a,o(1|b)<<1^62,0),S=k+336|0}function er(r){var e,A=0,n=0,a=0;S=e=S-16|0;r:{e:{i:{if(n=f[r+4>>2],f[r+8>>2]-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=16;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=16,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0<=3&&(or(r,4),n=f[r+4>>2]),n=f[r>>2]+n|0,i[0|n]=115,i[n+1|0]=116,i[n+2|0]=115,i[n+3|0]=99,(n=(A=f[r+8>>2])-(a=f[r+4>>2])|0)>>>0<=3)break e;if(n=a+4|0,f[r+4>>2]=n,A-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=20;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=20,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0<=3&&(or(r,4),n=f[r+4>>2]),n=f[r>>2]+n|0,i[0|n]=115,i[n+1|0]=116,i[n+2|0]=115,i[n+3|0]=122,(n=(A=f[r+8>>2])-(a=f[r+4>>2])|0)>>>0<=3)break e;if(n=a+4|0,f[r+4>>2]=n,A-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=16;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=16,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0<=3&&(or(r,4),n=f[r+4>>2]),n=f[r>>2]+n|0,i[0|n]=115,i[n+1|0]=116,i[n+2|0]=99,i[n+3|0]=111,(n=(A=f[r+8>>2])-(a=f[r+4>>2])|0)>>>0<=3)break e;if(n=a+4|0,f[r+4>>2]=n,A-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(A=f[r+8>>2]-n|0)>>>0<=3)break i;return f[r+4>>2]=n+4,void(S=e+16|0)}f[e+12>>2]=A;break r}f[e+12>>2]=n}f[e+8>>2]=4,pe(e+8|0),$f()}function ir(r){var e=0,i=0,A=0,n=0,a=0;r:{e:{if(!(!(A=f[r+4>>2])&2==(0|(e=f[r>>2])))){i=f[r+72>>2],n=f[r+68>>2];i:{A:{if(!(e|A)){if(xr(n,i),!(i=f[r+64>>2]))break i;if((e=-8&(A=f[n-4>>2]))>>>0<(i=k(i,88))+((A&=3)?4:8)>>>0)break r;if(!A|e>>>0<=i+39>>>0)break A;break e}if(Hr(n,i),!(i=f[r+64>>2]))break i;if((e=-8&(A=f[n-4>>2]))>>>0<(i=k(i,104))+((A&=3)?4:8)>>>0)break r;if(A&&e>>>0>i+39>>>0)break e}nr(n)}if(e=f[r+80>>2]){if(i=f[r+84>>2],(n=-8&(A=f[i-4>>2]))>>>0>>0)break r;if(n>>>0>e+39>>>0&&A)break e;nr(i)}}if(!(!f[r+108>>2]&2==f[r+104>>2])){if(jr(e=f[r+164>>2],f[r+168>>2]),i=f[r+160>>2]){if((n=-8&(A=f[e-4>>2]))>>>0<(i=k(i,120))+((A&=3)?4:8)>>>0)break r;if(n>>>0>i+39>>>0&&A)break e;nr(e)}n=f[r+180>>2];i:if(e=f[r+184>>2]){if(i=0,1!=(0|e)){for(A=1&e,a=-2&e,e=n;fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]),fi[f[f[e+16>>2]+16>>2]](e+28|0,f[e+20>>2],f[e+24>>2]),e=e+32|0,(0|a)!=(0|(i=i+2|0)););if(!A)break i}fi[f[f[(e=n+(i<<4)|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}if(i=f[r+176>>2]){if((e=-8&(A=f[n-4>>2]))>>>0<((i<<=4)|((A&=3)?4:8))>>>0)break r;if(e>>>0>i+39>>>0&&A)break e;nr(n)}n=f[r+192>>2];i:if(e=f[r+196>>2]){if(i=0,1!=(0|e)){for(A=1&e,a=-2&e,e=n;fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]),fi[f[f[e+16>>2]+16>>2]](e+28|0,f[e+20>>2],f[e+24>>2]),e=e+32|0,(0|a)!=(0|(i=i+2|0)););if(!A)break i}fi[f[f[(e=n+(i<<4)|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}if(i=f[r+188>>2]){if((e=-8&(A=f[n-4>>2]))>>>0<((i<<=4)|((A&=3)?4:8))>>>0)break r;if(e>>>0>i+39>>>0&&A)break e;nr(n)}if(e=f[r+200>>2]){if(i=f[r+204>>2],(n=-8&(A=f[i-4>>2]))>>>0>>0)break r;if(n>>>0>e+39>>>0&&A)break e;nr(i)}}if(-2147483648!=(0|(e=f[r+240>>2]))&&(gr(n=f[r+244>>2],f[r+248>>2]),e)){if((r=-8&(i=f[n-4>>2]))>>>0<(e=k(e,72))+((i&=3)?4:8)>>>0)break r;if(r>>>0>e+39>>>0&&i)break e;nr(n)}return}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}function Ar(r,e){var A,n=0,a=0,t=0;S=A=S-16|0;r:{e:{i:{A:{f:{n:{if(n=f[r+4>>2],f[r+8>>2]-n>>>0>=4)a=f[r>>2]+n|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=104;else if(or(r,4),a=(n=f[r+4>>2])+f[r>>2]|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=104,(a=f[r+8>>2]-n|0)>>>0<=3)break n;n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0<=3&&(or(r,4),n=f[r+4>>2]),n=f[r>>2]+n|0,i[0|n]=116,i[n+1|0]=107,i[n+2|0]=104,i[n+3|0]=100;a:{t:{if((t=(a=f[r+8>>2])-(n=f[r+4>>2])|0)>>>0>3){if(n=n+4|0,f[r+4>>2]=n,a-n>>>0>=4)a=f[r>>2]+n|0,i[0|a]=1,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=15;else if(or(r,4),a=(n=f[r+4>>2])+f[r>>2]|0,i[0|a]=1,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=15,(a=f[r+8>>2]-n|0)>>>0<=3)break n;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=8)a=f[r>>2]+n|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,i[a+4|0]=0,i[a+5|0]=0,i[a+6|0]=0,i[a+7|0]=0;else if(or(r,8),a=(n=f[r+4>>2])+f[r>>2]|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,i[a+4|0]=0,i[a+5|0]=0,i[a+6|0]=0,i[a+7|0]=0,(a=f[r+8>>2]-n|0)>>>0<=7)break i;if(n=n+8|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=8)a=f[r>>2]+n|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,i[a+4|0]=0,i[a+5|0]=0,i[a+6|0]=0,i[a+7|0]=0;else if(or(r,8),a=(n=f[r+4>>2])+f[r>>2]|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,i[a+4|0]=0,i[a+5|0]=0,i[a+6|0]=0,i[a+7|0]=0,(a=f[r+8>>2]-n|0)>>>0<=7)break i;if(n=n+8|0,f[r+4>>2]=n,e<<=24,f[r+8>>2]-n>>>0>=4)a=f[r>>2]+n|0,i[0|a]=e,i[a+1|0]=e>>>8,i[a+2|0]=e>>>16,i[a+3|0]=e>>>24;else if(or(r,4),a=(n=f[r+4>>2])+f[r>>2]|0,i[0|a]=e,i[a+1|0]=e>>>8,i[a+2|0]=e>>>16,i[a+3|0]=e>>>24,(e=f[r+8>>2]-n|0)>>>0<=3)break f;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)e=f[r>>2]+n|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(e=f[r+8>>2]-n|0)>>>0<=3)break f;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=8)e=f[r>>2]+n|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,i[e+4|0]=0,i[e+5|0]=0,i[e+6|0]=0,i[e+7|0]=0;else if(or(r,8),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,i[e+4|0]=0,i[e+5|0]=0,i[e+6|0]=0,i[e+7|0]=0,(e=f[r+8>>2]-n|0)>>>0<=7)break t;if(n=n+8|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)e=f[r>>2]+n|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(e=f[r+8>>2]-n|0)>>>0<=3)break f;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)e=f[r>>2]+n|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(e=f[r+8>>2]-n|0)>>>0<=3)break f;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=2)e=f[r>>2]+n|0,i[0|e]=0,i[e+1|0]=0;else if(or(r,2),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,(e=f[r+8>>2]-n|0)>>>0<=1)break a;return f[r+4>>2]=n+2,void(S=A+16|0)}f[A+12>>2]=t;break A}f[A+12>>2]=e;break e}f[A+12>>2]=e,f[A+8>>2]=2;break r}f[A+12>>2]=a;break A}f[A+12>>2]=e}f[A+8>>2]=4;break r}f[A+12>>2]=a}f[A+8>>2]=8}pe(A+8|0),$f()}function fr(r,e){var A,n=0,a=0,t=0,b=0;S=A=S-16|0;r:{e:{i:{A:{f:{if((a=f[r+8>>2])-(n=f[r+4>>2])>>>0>=4)b=f[r>>2],i[0|(t=b+n|0)]=0,i[t+1|0]=0,i[t+2|0]=0,i[t+3|0]=44;else if(or(r,4),n=f[r+4>>2],b=f[r>>2],i[0|(a=n+b|0)]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=44,(t=(a=f[r+8>>2])-n|0)>>>0<=3)break f;n=n+4|0,f[r+4>>2]=n,a-n>>>0<=3&&(or(r,4),b=f[r>>2],n=f[r+4>>2]),i[0|(n=n+b|0)]=109,i[n+1|0]=100,i[n+2|0]=104,i[n+3|0]=100;n:{a:{t:{b:{k:{u:{if((b=(n=f[r+8>>2])-(a=f[r+4>>2])|0)>>>0>3){if(a=a+4|0,f[r+4>>2]=a,n-a>>>0>=4)b=f[r>>2],i[0|(t=b+a|0)]=1,i[t+1|0]=0,i[t+2|0]=0,i[t+3|0]=0;else if(or(r,4),a=f[r+4>>2],b=f[r>>2],i[0|(n=a+b|0)]=1,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0,(t=(n=f[r+8>>2])-a|0)>>>0<=3)break f;if(a=a+4|0,f[r+4>>2]=a,n-a>>>0>=8)i[0|(t=a+b|0)]=0,i[t+1|0]=0,i[t+2|0]=0,i[t+3|0]=0,i[t+4|0]=0,i[t+5|0]=0,i[t+6|0]=0,i[t+7|0]=0;else if(or(r,8),a=f[r+4>>2],b=f[r>>2],i[0|(n=a+b|0)]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0,i[n+4|0]=0,i[n+5|0]=0,i[n+6|0]=0,i[n+7|0]=0,(t=(n=f[r+8>>2])-a|0)>>>0<=7)break u;if(a=a+8|0,f[r+4>>2]=a,n-a>>>0>=8)i[0|(n=a+b|0)]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0,i[n+4|0]=0,i[n+5|0]=0,i[n+6|0]=0,i[n+7|0]=0,n=f[r+8>>2];else if(or(r,8),n=(a=f[r+4>>2])+f[r>>2]|0,i[0|n]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0,i[n+4|0]=0,i[n+5|0]=0,i[n+6|0]=0,i[n+7|0]=0,(b=(n=f[r+8>>2])-a|0)>>>0<=7)break k;if(a=a+8|0,f[r+4>>2]=a,e=e<<24|(65280&e)<<8|e>>>8&65280|e>>>24,n-a>>>0>=4)b=f[r>>2],i[0|(t=b+a|0)]=e,i[t+1|0]=e>>>8,i[t+2|0]=e>>>16,i[t+3|0]=e>>>24;else if(or(r,4),a=f[r+4>>2],b=f[r>>2],i[0|(n=a+b|0)]=e,i[n+1|0]=e>>>8,i[n+2|0]=e>>>16,i[n+3|0]=e>>>24,(e=(n=f[r+8>>2])-a|0)>>>0<=3)break b;if(e=a+4|0,f[r+4>>2]=e,n-e>>>0>=8)i[0|(a=e+b|0)]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,i[a+4|0]=0,i[a+5|0]=0,i[a+6|0]=0,i[a+7|0]=0;else if(or(r,8),e=f[r+4>>2],b=f[r>>2],i[0|(n=e+b|0)]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0,i[n+4|0]=0,i[n+5|0]=0,i[n+6|0]=0,i[n+7|0]=0,(a=(n=f[r+8>>2])-e|0)>>>0<=7)break t;if(e=e+8|0,f[r+4>>2]=e,n-e>>>0<=1&&(or(r,2),b=f[r>>2],e=f[r+4>>2]),i[0|(e=e+b|0)]=85,i[e+1|0]=196,(a=(e=f[r+8>>2])-(n=f[r+4>>2])|0)>>>0<=1)break a;if(n=n+2|0,f[r+4>>2]=n,e-n>>>0>=2)e=f[r>>2]+n|0,i[0|e]=0,i[e+1|0]=0;else if(or(r,2),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,(e=f[r+8>>2]-n|0)>>>0<=1)break n;return f[r+4>>2]=n+2,void(S=A+16|0)}f[A+12>>2]=b;break A}f[A+12>>2]=t;break i}f[A+12>>2]=b;break i}f[A+12>>2]=e;break A}f[A+12>>2]=a;break i}f[A+12>>2]=a;break e}f[A+12>>2]=e;break e}f[A+12>>2]=t}f[A+8>>2]=4;break r}f[A+8>>2]=8;break r}f[A+8>>2]=2}pe(A+8|0),$f()}function nr(r){var e=0,i=0,A=0,n=0,a=0;i=(e=r-8|0)+(r=-8&(A=f[r-4>>2]))|0;r:{e:if(!(1&A)){if(!(2&A))break r;if(r=(A=f[e>>2])+r|0,(0|(e=e-A|0))==f[264982]){if(3&~(A=f[i+4>>2]))break e;return f[264980]=r,f[i+4>>2]=-2&A,f[e+4>>2]=1|r,void(f[i>>2]=r)}Ur(e,A)}e:{i:{A:{f:{n:{a:{t:{if(!(2&(A=f[i+4>>2]))){if((0|i)==f[264983])break a;if((0|i)==f[264982])break n;if(Ur(n=i,i=-8&A),r=r+i|0,f[e+4>>2]=1|r,f[r+e>>2]=r,f[264982]!=(0|e))break t;return void(f[264980]=r)}f[i+4>>2]=-2&A,f[e+4>>2]=1|r,f[r+e>>2]=r}if(r>>>0<256)break f;if(i=31,f[e+16>>2]=0,f[e+20>>2]=0,r>>>0<=16777215&&(i=62+((r>>>6-(i=o(r>>>8|0))&1)-(i<<1)|0)|0),f[e+28>>2]=i,A=1059504+(i<<2)|0,(n=1<>2]=e,f[e+24>>2]=A,f[e+12>>2]=e,f[e+8>>2]=e,f[264979]=n|f[264979];break i}if(f[264983]=e,r=f[264981]+r|0,f[264981]=r,f[e+4>>2]=1|r,f[264982]==(0|e)&&(f[264980]=0,f[264982]=0),r>>>0<=t[264986])break r;if(r>>>0<41)break e;for(r=1059632;;){if((i=f[r>>2])>>>0<=e>>>0&i+f[r+4>>2]>>>0>e>>>0)break e;r=f[r+8>>2]}}return f[264982]=e,r=f[264980]+r|0,f[264980]=r,f[e+4>>2]=1|r,void(f[r+e>>2]=r)}return i=1059648+(248&r)|0,(A=f[264978])&(r=1<<(r>>>3))?r=f[i+8>>2]:(f[264978]=r|A,r=i),f[i+8>>2]=e,f[r+12>>2]=e,f[e+12>>2]=i,void(f[e+8>>2]=r)}A:{if(A=f[A>>2],(-8&f[A+4>>2])!=(0|r))for(n=r<<(31!=(0|i)?25-(i>>>1|0)|0:0);;){if(!(i=f[(a=(n>>>29&4)+A|0)+16>>2]))break A;if(n<<=1,A=i,(-8&f[i+4>>2])==(0|r))break}else i=A;r=f[i+8>>2],f[r+12>>2]=e,f[i+8>>2]=e,f[e+24>>2]=0,f[e+12>>2]=i,f[e+8>>2]=r;break i}f[a+16>>2]=e,f[e+24>>2]=A,f[e+12>>2]=e,f[e+8>>2]=e}if(e=0,r=f[264988]-1|0,f[264988]=r,r)break r;if(r=f[264910])for(;e=e+1|0,r=f[r+8>>2];);return void(f[264988]=e>>>0<=4095?4095:e)}if(e=0,r=f[264910])for(;e=e+1|0,r=f[r+8>>2];);f[264986]=-1,f[264988]=e>>>0<=4095?4095:e}}function ar(r,e){var t,b=0,k=0,u=0,c=0,s=0,l=0,h=0;S=t=S-112|0,f[t+24>>2]=0,f[t+8>>2]=0;r:{e:{i:{A:{if(2!=f[e+104>>2]|f[e+108>>2]){if(l=(c=f[e+208>>2]+(a[e+212>>1]&&1&A[e+216>>1]?126:110)|0)+517|0,f[t+40>>2]=l,(0|(u=c+549|0))<0)break A;if(b=1,!(k=V(u)))break A;if(f[t+52>>2]=k,f[t+60>>2]=u,f[t+64>>2]=c>>>0>130522?29:129-(o(u>>>10|0)<<2)|0,b=n[1054660]|n[1054661]<<8|n[1054662]<<16|n[1054663]<<24,u=k+8|0,c=n[1054656]|n[1054657]<<8|n[1054658]<<16|n[1054659]<<24,i[0|u]=c,i[u+1|0]=c>>>8,i[u+2|0]=c>>>16,i[u+3|0]=c>>>24,i[u+4|0]=b,i[u+5|0]=b>>>8,i[u+6|0]=b>>>16,i[u+7|0]=b>>>24,u=n[1054652]|n[1054653]<<8|n[1054654]<<16|n[1054655]<<24,b=n[1054648]|n[1054649]<<8|n[1054650]<<16|n[1054651]<<24,i[0|k]=b,i[k+1|0]=b>>>8,i[k+2|0]=b>>>16,i[k+3|0]=b>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,b=n[1054668]|n[1054669]<<8|n[1054670]<<16|n[1054671]<<24,u=k+16|0,c=n[1054664]|n[1054665]<<8|n[1054666]<<16|n[1054667]<<24,i[0|u]=c,i[u+1|0]=c>>>8,i[u+2|0]=c>>>16,i[u+3|0]=c>>>24,i[u+4|0]=b,i[u+5|0]=b>>>8,i[u+6|0]=b>>>16,i[u+7|0]=b>>>24,u=n[1054676]|n[1054677]<<8|n[1054678]<<16|n[1054679]<<24,k=k+24|0,b=n[1054672]|n[1054673]<<8|n[1054674]<<16|n[1054675]<<24,i[0|k]=b,i[k+1|0]=b>>>8,i[k+2|0]=b>>>16,i[k+3|0]=b>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,f[t+56>>2]=32,O(t+52|0,e+104|0,0,l),k=f[t+56>>2]-32|0,f[t+44>>2]=k,(0|k)!=(0|l))break i;b=f[(u=t+60|0)+4>>2],f[(k=t+80|0)>>2]=f[u>>2],f[k+4>>2]=b,k=f[t+56>>2],f[t+72>>2]=f[t+52>>2],f[t+76>>2]=k,Lr(t+96|0,t+72|0),(k=f[t+8>>2])&&fi[f[k+16>>2]](t+20|0,f[t+12>>2],f[t+16>>2]),b=f[(u=t+104|0)+4>>2],f[(k=t+16|0)>>2]=f[u>>2],f[k+4>>2]=b,k=f[t+100>>2],f[t+8>>2]=f[t+96>>2],f[t+12>>2]=k}if(2!=f[e>>2]|f[e+4>>2]){h=(k=f[e+88>>2])+577|0,f[t+48>>2]=h;f:{n:{a:{if((0|(u=k+609|0))>=0){if(!u){f[t+60>>2]=0,f[t+64>>2]=1,f[t+52>>2]=1,f[t+56>>2]=0;break n}if(b=V(u))break a;r=1}else r=0;Ze(r,1058752),$f()}if(f[t+56>>2]=0,f[t+52>>2]=b,f[t+60>>2]=u,f[t+64>>2]=u>>>0>131071?29:129-(o(u>>>10|0)<<2)|0,k=0,u>>>0>31)break f}or(t+52|0,32),u=f[t+60>>2],b=f[t+52>>2],k=f[t+56>>2]}if(c=n[1054652]|n[1054653]<<8|n[1054654]<<16|n[1054655]<<24,b=l=b+k|0,s=n[1054648]|n[1054649]<<8|n[1054650]<<16|n[1054651]<<24,i[0|b]=s,i[b+1|0]=s>>>8,i[b+2|0]=s>>>16,i[b+3|0]=s>>>24,i[b+4|0]=c,i[b+5|0]=c>>>8,i[b+6|0]=c>>>16,i[b+7|0]=c>>>24,c=n[1054676]|n[1054677]<<8|n[1054678]<<16|n[1054679]<<24,b=b+24|0,s=n[1054672]|n[1054673]<<8|n[1054674]<<16|n[1054675]<<24,i[0|b]=s,i[b+1|0]=s>>>8,i[b+2|0]=s>>>16,i[b+3|0]=s>>>24,i[b+4|0]=c,i[b+5|0]=c>>>8,i[b+6|0]=c>>>16,i[b+7|0]=c>>>24,c=n[1054668]|n[1054669]<<8|n[1054670]<<16|n[1054671]<<24,b=l+16|0,s=n[1054664]|n[1054665]<<8|n[1054666]<<16|n[1054667]<<24,i[0|b]=s,i[b+1|0]=s>>>8,i[b+2|0]=s>>>16,i[b+3|0]=s>>>24,i[b+4|0]=c,i[b+5|0]=c>>>8,i[b+6|0]=c>>>16,i[b+7|0]=c>>>24,c=n[1054660]|n[1054661]<<8|n[1054662]<<16|n[1054663]<<24,b=l+8|0,l=n[1054656]|n[1054657]<<8|n[1054658]<<16|n[1054659]<<24,i[0|b]=l,i[b+1|0]=l>>>8,i[b+2|0]=l>>>16,i[b+3|0]=l>>>24,i[b+4|0]=c,i[b+5|0]=c>>>8,i[b+6|0]=c>>>16,i[b+7|0]=c>>>24,(u=u-k|0)>>>0<=31)break e;if(k=k+32|0,f[t+56>>2]=k,O(t+52|0,0,e,h),e=f[t+56>>2]-k|0,f[t+68>>2]=e,(0|e)!=(0|h))break r;u=f[(k=t+60|0)+4>>2],f[(e=t+80|0)>>2]=f[k>>2],f[e+4>>2]=u,e=f[t+56>>2],f[t+72>>2]=f[t+52>>2],f[t+76>>2]=e,Lr(t+96|0,t+72|0),(e=f[t+24>>2])&&fi[f[e+16>>2]](t+36|0,f[t+28>>2],f[t+32>>2]),k=f[t+100>>2],f[(e=t+24|0)>>2]=f[t+96>>2],f[e+4>>2]=k,u=f[(k=t+104|0)+4>>2],f[(e=e+8|0)>>2]=f[k>>2],f[e+4>>2]=u}return e=f[t+12>>2],f[r+4>>2]=f[t+8>>2],f[r+8>>2]=e,f[r>>2]=0,u=f[(k=t+32|0)+4>>2],f[(e=r+28|0)>>2]=f[k>>2],f[e+4>>2]=u,u=f[(k=t+24|0)+4>>2],f[(e=r+20|0)>>2]=f[k>>2],f[e+4>>2]=u,k=f[(e=t+16|0)+4>>2],f[(r=r+12|0)>>2]=f[e>>2],f[r+4>>2]=k,void(S=t+112|0)}Ze(b,1058752),$f()}f[t+84>>2]=0,f[t+88>>2]=0,f[t+76>>2]=1,f[t+80>>2]=4,f[t+72>>2]=1054700,Se(t+44|0,t+40|0,t+72|0,1054708),$f()}f[t+76>>2]=u,f[t+72>>2]=32,pe(t+72|0),$f()}f[t+84>>2]=0,f[t+88>>2]=0,f[t+76>>2]=1,f[t+80>>2]=4,f[t+72>>2]=1054700,Se(t+68|0,t+48|0,t+72|0,1054724),$f()}function tr(r,e,A,n){var a,t=0,b=0,u=0,o=0,c=0,s=0;S=a=S-16|0,b=n<<24|(65280&n)<<8|n>>>8&65280|n>>>24;r:{e:{i:{A:{f:{n:{if((u=f[r+8>>2])-(n=f[r+4>>2])>>>0>=4)t=f[r>>2],i[0|(o=t+n|0)]=b,i[o+1|0]=b>>>8,i[o+2|0]=b>>>16,i[o+3|0]=b>>>24;else if(or(r,4),n=f[r+4>>2],t=f[r>>2],i[0|(u=n+t|0)]=b,i[u+1|0]=b>>>8,i[u+2|0]=b>>>16,i[u+3|0]=b>>>24,(b=(u=f[r+8>>2])-n|0)>>>0<=3)break n;if(n=n+4|0,f[r+4>>2]=n,u-n>>>0<=3&&(or(r,4),t=f[r>>2],n=f[r+4>>2]),i[0|(n=n+t|0)]=109,i[n+1|0]=100,i[n+2|0]=97,i[n+3|0]=116,(t=(u=f[r+8>>2])-(n=f[r+4>>2])|0)>>>0<=3)break f;if(n=n+4|0,f[r+4>>2]=n,e&&(t=f[e+64>>2]))for(c=(e=f[e+60>>2])+k(t,120)|0;;){if(t=f[e+112>>2])for(b=t<<4,t=f[e+108>>2]+8|0;;){if(s=f[t-4>>2],(o=f[t>>2])>>>0>u-n>>>0&&(or(r,o),u=f[r+8>>2],n=f[r+4>>2]),ze(f[r>>2]+n|0,s,o),(s=u-n|0)>>>0>>0)break A;if(n=n+o|0,f[r+4>>2]=n,t=t+16|0,!(b=b-16|0))break}if((0|c)==(0|(e=e+120|0)))break}a:if(A)if(t=f[A+72>>2],e=f[A+68>>2],f[A>>2]){if(!t)break a;for(c=k(t,104)+e|0;;){if(A=f[e+96>>2])for(b=A<<4,t=f[e+92>>2]+8|0;;){if(o=f[t-4>>2],(A=f[t>>2])>>>0>u-n>>>0&&(or(r,A),u=f[r+8>>2],n=f[r+4>>2]),ze(f[r>>2]+n|0,o,A),(o=u-n|0)>>>0>>0)break e;if(n=A+n|0,f[r+4>>2]=n,t=t+16|0,!(b=b-16|0))break}if((0|c)==(0|(e=e+104|0)))break}}else if(t)for(c=k(t,88)+e|0;;){if(A=f[e+80>>2])for(b=A<<4,t=f[e+76>>2]+8|0;;){if(o=f[t-4>>2],(A=f[t>>2])>>>0>u-n>>>0&&(or(r,A),u=f[r+8>>2],n=f[r+4>>2]),ze(f[r>>2]+n|0,o,A),(o=u-n|0)>>>0>>0)break e;if(n=A+n|0,f[r+4>>2]=n,t=t+16|0,!(b=b-16|0))break}if((0|c)==(0|(e=e+88|0)))break}return void(S=a+16|0)}f[a+12>>2]=b;break i}f[a+12>>2]=t;break i}f[a+12>>2]=s,f[a+8>>2]=o;break r}f[a+8>>2]=4;break r}f[a+12>>2]=o,f[a+8>>2]=A}pe(a+8|0),$f()}function br(r,e){var A,n=0,a=0,t=0,b=0;S=A=S-16|0;r:{e:{i:{if((n=f[r+8>>2])-(a=f[r+4>>2])>>>0>=4)t=f[r>>2],i[0|(b=t+a|0)]=0,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=32;else if(or(r,4),a=f[r+4>>2],t=f[r>>2],i[0|(n=a+t|0)]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=32,(b=(n=f[r+8>>2])-a|0)>>>0<=3)break i;if(a=a+4|0,f[r+4>>2]=a,n-a>>>0<=3&&(or(r,4),t=f[r>>2],a=f[r+4>>2]),i[0|(a=a+t|0)]=116,i[a+1|0]=114,i[a+2|0]=101,i[a+3|0]=120,(t=(a=f[r+8>>2])-(n=f[r+4>>2])|0)>>>0>3){if(n=n+4|0,f[r+4>>2]=n,a-n>>>0>=4)t=f[r>>2],i[0|(b=t+n|0)]=0,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=0;else if(or(r,4),n=f[r+4>>2],t=f[r>>2],i[0|(a=n+t|0)]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,(b=(a=f[r+8>>2])-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,e<<=24,a-n>>>0>=4)i[0|(b=n+t|0)]=e,i[b+1|0]=e>>>8,i[b+2|0]=e>>>16,i[b+3|0]=e>>>24;else if(or(r,4),n=f[r+4>>2],t=f[r>>2],i[0|(a=n+t|0)]=e,i[a+1|0]=e>>>8,i[a+2|0]=e>>>16,i[a+3|0]=e>>>24,(e=(a=f[r+8>>2])-n|0)>>>0<=3)break e;if(n=n+4|0,f[r+4>>2]=n,a-n>>>0>=4)i[0|(e=n+t|0)]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=1,a=f[r+8>>2];else if(or(r,4),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=1,(e=(a=f[r+8>>2])-n|0)>>>0<=3)break e;if(n=n+4|0,f[r+4>>2]=n,a-n>>>0>=4)t=f[r>>2],i[0|(e=t+n|0)]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),n=f[r+4>>2],t=f[r>>2],i[0|(e=n+t|0)]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(e=(a=f[r+8>>2])-n|0)>>>0<=3)break e;if(n=n+4|0,f[r+4>>2]=n,a-n>>>0>=4)i[0|(e=n+t|0)]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),n=f[r+4>>2],t=f[r>>2],i[0|(e=n+t|0)]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(e=(a=f[r+8>>2])-n|0)>>>0<=3)break e;if(n=n+4|0,f[r+4>>2]=n,a-n>>>0>=4)i[0|(e=n+t|0)]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(e=f[r+8>>2]-n|0)>>>0<=3)break e;return f[r+4>>2]=n+4,void(S=A+16|0)}f[A+12>>2]=t;break r}f[A+12>>2]=b;break r}f[A+12>>2]=e}f[A+8>>2]=4,pe(A+8|0),$f()}function kr(r,e,i,A){var n=0,a=0,t=0,b=0,k=0;r:{e:{i:{A:{f:{if((n=-8&(b=f[(a=r-4|0)>>2]))>>>0>=((t=3&b)?4:8)+e>>>0){if((k=e+39|0)>>>0>>0&&t)break f;n:{a:{if(i>>>0>=9){if(i=Or(i,A))break a;return 0}if(i=0,A>>>0>4294901708)break n;e=A>>>0<11?16:A+11&-8;t:{if(!t){if(e>>>0<256|n>>>0<(4|e)>>>0|n-e>>>0>=131073)break t;break r}k=(t=r-8|0)+n|0;b:{k:{u:{o:{if(e>>>0>n>>>0){if((0|k)==f[264983])break b;if((0|k)==f[264982])break u;if(2&(b=f[k+4>>2]))break t;if((n=(b&=-8)+n|0)>>>0>>0)break t;if(Ur(k,b),(i=n-e|0)>>>0<16)break o;f[a>>2]=e|1&f[a>>2]|2,f[(e=e+t|0)+4>>2]=3|i,f[(A=n+t|0)+4>>2]=1|f[A+4>>2],vr(e,i);break r}if((i=n-e|0)>>>0>15)break k;break r}f[a>>2]=n|1&f[a>>2]|2,f[(e=n+t|0)+4>>2]=1|f[e+4>>2];break r}if((n=n+f[264980]|0)>>>0>>0)break t;(A=n-e|0)>>>0<=15?(f[a>>2]=n|1&b|2,f[(e=n+t|0)+4>>2]=1|f[e+4>>2],A=0,e=0):(f[a>>2]=e|1&b|2,f[(e=e+t|0)+4>>2]=1|A,f[(i=n+t|0)>>2]=A,f[i+4>>2]=-2&f[i+4>>2]),f[264982]=e,f[264980]=A;break r}f[a>>2]=e|1&b|2,f[(e=e+t|0)+4>>2]=3|i,f[k+4>>2]=1|f[k+4>>2],vr(e,i);break r}if((n=n+f[264981]|0)>>>0>e>>>0)break e}if(!(e=V(A)))break n;return e=ze(i=e,r,(e=(3&(e=f[a>>2])?-4:-8)+(-8&e)|0)>>>0>A>>>0?A:e),nr(r),e}if(ze(i,r,e>>>0>A>>>0?A:e),(A=-8&(a=f[a>>2]))>>>0<(n=e)+((e=3&a)?4:8)>>>0)break A;if(A>>>0>k>>>0&&e)break i;nr(r)}return i}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}return f[a>>2]=e|1&b|2,i=e+t|0,f[264983]=i,e=n-e|0,f[264981]=e,f[i+4>>2]=1|e,r}return r}function ur(r,e,i){var A,n,a,t=0,b=0,k=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0;k=f[r+8>>2],b=f[r>>2],h=l=((c=(0|(u=s=f[r+12>>2]))<(0|(t=f[r+4>>2]))?1:b>>>0>k>>>0&(0|t)>=(0|u))<<3)+r|0,u=f[r+24>>2],o=f[r+16>>2],c=f[r+28>>2],d=f[r+20>>2],o=f[(u=((d=(0|c)<(0|d)?1:u>>>0>>0&(0|c)<=(0|d))?24:16)+r|0)>>2],c=f[l>>2],v=h,h=(((0|t)<=(0|s)&b>>>0<=k>>>0|(0|t)<(0|s))<<3)+r|0,b=f[(k=d=(d?16:24)+r|0)>>2],s=f[h>>2],w=(g=(0|(k=f[k+4>>2]))<(0|(t=f[h+4>>2]))?1:b>>>0>>0&(0|t)>=(0|k))?u:h,k=o,b=c,s=y=f[u+4>>2],B=f[l+4>>2],b=f[(k=v=(s=(0|s)<(0|(t=B))?1:b>>>0>k>>>0&(0|t)>=(0|s))?v:w)>>2],t=f[k+4>>2],u=f[(k=w=g?d:s?h:u)>>2],l=f[k+4>>2],k=s?o:c,f[i>>2]=k,s=s?y:B,f[i+4>>2]=s,y=i,u=f[(b=(i=b>>>0>u>>>0&(0|t)>=(0|l)|(0|t)>(0|l))?w:v)+4>>2],f[y+8>>2]=f[b>>2],f[y+12>>2]=u,b=f[(i=i?v:w)+4>>2],f[y+16>>2]=f[i>>2],f[y+20>>2]=b,i=f[(b=g?h:d)>>2],l=b=f[b+4>>2],f[(u=A=y+24|0)>>2]=i,f[u+4>>2]=b,b=f[r+40>>2],u=f[r+32>>2],g=c=(v=r+32|0)+((c=(0|(t=f[r+44>>2]))<(0|(o=f[r+36>>2]))?1:b>>>0>>0&(0|t)<=(0|o))<<3)|0,h=f[r+56>>2],d=f[r+48>>2],w=f[r+60>>2],r=f[r+52>>2],h=f[(r=((w=(0|w)<(0|r)?1:h>>>0>>0&(0|r)>=(0|w))?24:16)+v|0)>>2],d=f[c>>2],B=g,g=(((0|t)>=(0|o)&b>>>0>=u>>>0|(0|t)>(0|o))<<3)+v|0,u=f[(b=v=v+(w?16:24)|0)>>2],t=f[g>>2],E=(w=(0|(b=f[b+4>>2]))<(0|(o=f[g+4>>2]))?1:(0|b)<=(0|o)&t>>>0>u>>>0)?r:g,b=h,u=d,t=n=f[r+4>>2],a=f[c+4>>2],t=f[(b=B=(u=(0|t)<(0|(o=a))?1:b>>>0>>0&(0|t)<=(0|o))?B:E)>>2],o=f[b+4>>2],r=f[(b=E=w?v:u?g:r)>>2],c=f[b+4>>2],b=u?h:d,f[(h=d=y+32|0)>>2]=b,u=u?n:a,f[h+4>>2]=u,o=f[(t=(r=r>>>0>>0&(0|o)>=(0|c)|(0|o)>(0|c))?E:B)+4>>2],f[(h=y+40|0)>>2]=f[t>>2],f[h+4>>2]=o,o=f[(r=r?B:E)+4>>2],f[(t=y+48|0)>>2]=f[r>>2],f[t+4>>2]=o,r=f[(t=w?g:v)>>2],t=f[t+4>>2],f[(o=g=y+56|0)>>2]=r,f[o+4>>2]=t,o=v=b>>>0>>0&(0|u)<=(0|s)|(0|u)<(0|s),f[e>>2]=o?b:k,f[e+4>>2]=o?u:s,c=i,h=r,r=i>>>0>>0&(0|t)>=(0|l)|(0|t)>(0|l),f[(o=e)+56>>2]=r?h:i,f[o+60>>2]=r?t:l,i=f[(r=v=(v<<3)+d|0)>>2],d=r=f[r+4>>2],B=i,r=f[(k=y=(((0|u)>=(0|s)&b>>>0>=k>>>0|(0|u)>(0|s))<<3)+y|0)>>2],b=i,u=k=f[k+4>>2],i=w=(0|k)>(0|(s=d))?1:r>>>0>b>>>0&(0|u)>=(0|s),f[o+8>>2]=i?B:r,f[o+12>>2]=i?d:k,i=f[(k=g=(c>>>0<=h>>>0&(0|t)>=(0|l)|(0|t)>(0|l)?-8:0)+g|0)>>2],o=k=f[k+4>>2],k=f[(t=B=((0|t)<=(0|l)&c>>>0>h>>>0|(0|t)<(0|l)?-8:0)+A|0)>>2],l=t=f[t+4>>2],i=(t=i)>>>0>k>>>0&(0|o)>=(0|l)|(0|o)>(0|l),f[(c=e)+48>>2]=i?t:k,f[c+52>>2]=i?o:l,i=f[(c=d=v+(w<<3)|0)>>2],c=f[c+4>>2],r=f[(b=y=(((0|u)<=(0|s)&r>>>0<=b>>>0|(0|u)<(0|s))<<3)+y|0)>>2],u=b=f[b+4>>2],b=i,s=c,i=v=(0|c)<(0|u)?1:r>>>0>b>>>0&(0|u)>=(0|s),f[(h=e)+16>>2]=i?b:r,f[h+20>>2]=i?c:u,i=f[(c=g=((0|o)>=(0|l)&t>>>0>=k>>>0|(0|o)>(0|l)?-8:0)+g|0)>>2],c=f[c+4>>2],k=f[(t=w=(t>>>0>>0&(0|o)<=(0|l)|(0|o)<(0|l)?-8:0)+B|0)>>2],l=t=f[t+4>>2],t=i,i=(0|(o=c))>(0|l)?1:t>>>0>k>>>0&(0|o)>=(0|l),f[e+40>>2]=i?t:k,f[h+44>>2]=i?c:l,i=f[(c=d=d+(v<<3)|0)>>2],c=f[c+4>>2],r=f[(b=y=(((0|u)<=(0|s)&r>>>0<=b>>>0|(0|u)<(0|s))<<3)+y|0)>>2],u=b=f[b+4>>2],b=i,s=c,i=v=(0|c)<(0|u)?1:r>>>0>b>>>0&(0|u)>=(0|s),f[e+24>>2]=i?b:r,f[h+28>>2]=i?c:u,i=e,e=f[(c=h=((0|o)>=(0|l)&t>>>0>=k>>>0|(0|o)>(0|l)?-8:0)+g|0)>>2],c=f[c+4>>2],o=(t>>>0>>0&(0|o)<=(0|l)|(0|o)<(0|l)?-8:0)+w|0,l=i,w=i,i=t=f[(k=o)>>2],i=t,g=(0|(k=f[k+4>>2]))<(0|(t=c))?1:e>>>0>i>>>0&(0|t)>=(0|k),f[w+32>>2]=g?e:i,f[l+36>>2]=g?c:k,((((0|u)<=(0|s)&r>>>0<=b>>>0|(0|u)<(0|s))<<3)+y|0)==(8+((e>>>0>>0&(0|t)<=(0|k)|(0|t)<(0|k)?-8:0)+o|0)|0)&&(d+(v<<3)|0)==(8+(((0|t)>=(0|k)&e>>>0>=i>>>0|(0|t)>(0|k)?-8:0)+h|0)|0)||(Fe(),$f())}function or(r,e){var i,A=0,n=0,a=0,t=0,b=0,k=0,u=0,o=0,c=0;S=i=S-16|0,A=f[r+4>>2];r:{e:{i:{A:{f:{n:{a:{t:{b:{k:{u:{if(!(1&(a=f[r+12>>2]))){if((n=e+A|0)>>>0>>0)break u;if(1!=f[a+16>>2])break k;if((e=f[a>>2])>>>0>=(k=(b=(u=f[r>>2])-(t=f[a+4>>2])|0)+n|0)>>>0)break t;if(e>>>0>>0|A>>>0>b>>>0)break b;o=r,c=ze(t,u,A),f[o>>2]=c,f[r+8>>2]=f[a>>2];break f}if((b=(t=f[r+8>>2])+(n=a>>>5|0)|0)-A>>>0>>0|A>>>0>n>>>0)break a;e=ze((e=f[r>>2])-n|0,e,A),f[r+12>>2]=31&a,f[r>>2]=e,f[r+8>>2]=b;break f}Ye(1052156,8,1052164),$f()}if(e=1<<(b=f[a+12>>2])+9,(0|(A=b&&e>>>0>n>>>0?e:n))>=0){if(!A){e=1,A=0;break n}if(e=V(A))break n;r=1}else r=0;Ze(r,1052180),$f()}if(n>>>0<=k>>>0){A=A+b|0,f[a+8>>2]=A,(n=((n=e<<1)>>>0>>0?k:n)-A|0)>>>0>e-A>>>0&&(ue(a,A,n),t=f[a+4>>2],e=f[a>>2]),f[r+8>>2]=e-b,f[r>>2]=t+b;break f}S=r=S-48|0,f[r+12>>2]=8,f[r+8>>2]=1052156,f[r+20>>2]=1,f[r+16>>2]=1054404,f[r+28>>2]=1,f[r+32>>2]=0,f[r+40>>2]=r+8,f[r+44>>2]=2,f[r+24>>2]=r+40,Me(r+16|0,1052196),$f()}f[r+8>>2]=n;break f}f[i+4>>2]=b,k=A+n|0,f[i+12>>2]=k,a=f[r>>2]-n|0,f[i+8>>2]=a,t-A>>>0>>0&&(ue(i+4|0,k,e),b=f[i+4>>2],a=f[i+8>>2]),f[r+8>>2]=b-n,f[r>>2]=n+a;break f}if(f[i+12>>2]=0,f[i+8>>2]=e,f[i+4>>2]=A,n=f[r>>2],(u=A)>>>0<(A=f[r+4>>2])>>>0&&(ue(i+4|0,0,A),t=f[i+12>>2],e=f[i+8>>2]),ze(e+t|0,n,A),e=f[a+16>>2],f[a+16>>2]=e-1,f[i+12>>2]=A+t,1==(0|e)){if(e=f[a>>2]){if(n=f[a+4>>2],(A=-8&(t=f[n-4>>2]))>>>0>>0)break A;if(A>>>0>e+39>>>0&&t)break i;nr(n)}if((e=-8&(A=f[a-4>>2]))>>>0<((A&=3)?24:28)>>>0)break e;if(e>>>0>=60&&A)break r;nr(a)}f[r>>2]=f[i+8>>2],f[r+8>>2]=f[i+4>>2],f[r+12>>2]=b<<2|1}return void(S=i+16|0)}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function cr(r,e,A,a){var t,b=0,k=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0;S=t=S-32|0,b=(k=A>>>0<3)?3-A|0:3;r:{e:{i:{A:{f:{n:{if(!k){if(A>>>0>>0)break A;if((0|A)==(0|b)){f[r+12>>2]=1,f[r>>2]=0,f[r+4>>2]=1;break r}A=(u=(k=(-1^b)+A|0)>>>0<2)?2-k|0:2;a:{if(!u){if(A>>>0<=k>>>0)break a;xe(A,k,1053076),$f()}f[r+4>>2]=A,f[r>>2]=0;break r}if((0|A)==(0|k))break n;if(48&n[0|(e=A+(1+(e+b|0)|0)|0)])break f;if(1==(0|(A=k-A|0))){f[r>>2]=0,f[r+4>>2]=1;break r}if(b=n[e+1|0],2==(0|A)){f[r>>2]=0,f[r+4>>2]=1;break r}if(ye(t+8|0,n[e+2|0],e+3|0,A-3|0),A=f[t+24>>2],e=f[t+20>>2],w=f[t+16>>2],g=f[t+12>>2],1==f[t+8>>2]){f[r+12>>2]=A,f[r+8>>2]=e,f[r+4>>2]=w,f[r>>2]=g;break r}if((0|(h=b<<24>>24))>=0)break e;if(ee(t+8|0,e,A),f[t+8>>2])break i;s=f[t+24>>2],v=f[t+28>>2],A=f[t+20>>2],e=f[t+16>>2];break e}f[r+8>>2]=e,f[r+4>>2]=b,f[r>>2]=0;break r}f[r>>2]=0,f[r+4>>2]=1;break r}i[r+12|0]=57,f[r+8>>2]=31,f[r+4>>2]=1054489,f[r>>2]=2;break r}xe(b,A,1053076),$f()}e=f[t+12>>2],A=f[t+16>>2],a=f[t+24>>2],f[r+8>>2]=f[t+20>>2],f[r+12>>2]=a,f[r>>2]=e,f[r+4>>2]=A;break r}if(o=64&b){if(ee(t+8|0,e,A),f[t+8>>2]){e=f[t+12>>2],A=f[t+16>>2],a=f[t+24>>2],f[r+8>>2]=f[t+20>>2],f[r+12>>2]=a,f[r>>2]=e,f[r+4>>2]=A;break r}y=f[t+28>>2],d=f[t+24>>2]}u=f[a+4>>2],e=f[a+8>>2],l=1&(b=f[a>>2]),k=(c=f[a+16>>2])?f[a+24>>2]:l?e:d,A=f[a+12>>2],l=c?f[a+28>>2]:l?A:y,(0|h)<0&&(f[a>>2]=1,f[a+4>>2]=0,e=s-(A=(b=1&(b|c))||o?k:s)|0,s=(b=v-((u=b||o?l:v)+(A>>>0>s>>>0)|0)|0)-2|0,c=e,v=(h=(0|b)<-1)?b+2|0:b,b=u+((e=(0|b)>0)?s:v)|0,b=(e=A+(h=c)|0)>>>0>>0?b+1|0:b,f[a+8>>2]=e,A=b,f[a+12>>2]=A,u=0,b=1),i[a+148|0]=o>>>6,o&&(b=1,u=0,s=(A=y-((k>>>0>d>>>0)+l|0)|0)-2|0,v=e=d-k|0,d=(o=(0|A)<-1)?A+2|0:A,c=e,A=l+((e=(0|A)>0)?s:d)|0,A=(e=k+(o=e?c:v)|0)>>>0>>0?A+1|0:A),f[a+40>>2]=e,f[a+44>>2]=A,f[a+32>>2]=b,f[a+36>>2]=u,f[a+24>>2]=e,f[a+28>>2]=A,f[a+16>>2]=b,f[a+20>>2]=u,f[a+48>>2]|f[a+52>>2]||(f[a+56>>2]=e,f[a+60>>2]=A,f[a+48>>2]=b,f[a+52>>2]=u),f[r+8>>2]=w,f[r+4>>2]=g,i[a+149|0]=1,f[r>>2]=3}S=t+32|0}function sr(r,e){var A,a,t,b,u,o,c,s,l,h,v,d=0,w=0,g=0,y=0,B=0,E=0;S=A=S-192|0,d=f[r+152>>2],w=f[r+156>>2],g=f[r+32>>2],y=f[r+36>>2],B=f[r+40>>2],t=f[r+44>>2],b=f[r>>2],u=f[r+4>>2],o=f[r+8>>2],c=f[r+12>>2],s=f[r+16>>2],l=f[r+20>>2],h=f[r+24>>2],v=f[r+28>>2],ze(a=A+8|0,r+160|0,80),f[r+232>>2]=0,f[r+236>>2]=0,f[r+224>>2]=0,f[r+228>>2]=4,i[r+216|0]=0,f[r+208>>2]=h,f[r+212>>2]=v,f[r+200>>2]=s,f[r+204>>2]=l,f[r+192>>2]=o,f[r+196>>2]=c,f[r+184>>2]=b,f[r+188>>2]=u,f[r+176>>2]=B,f[r+180>>2]=t,f[r+168>>2]=g,f[r+172>>2]=y,f[r+152>>2]=0,f[r+156>>2]=0;r:{e:{i:{if(2!=(0|d)|w){f[A+88>>2]=d,f[A+92>>2]=w,ze(A+96|0,a,80),d=f[(w=e+8|0)>>2],w=f[w+4>>2],f[(g=A+184|0)>>2]=d,f[g+4>>2]=w,w=f[e+4>>2],f[A+176>>2]=f[e>>2],f[A+180>>2]=w,d?(f[A+172>>2]=d+f[A+172>>2],(0|(d=f[A+168>>2]))==f[A+160>>2]&&ce(A+160|0,1058736),g=f[e+4>>2],w=f[A+164>>2]+(d<<4)|0,f[w>>2]=f[e>>2],f[w+4>>2]=g,g=f[(e=e+8|0)+4>>2],f[(w=w+8|0)>>2]=f[e>>2],f[w+4>>2]=g,f[A+168>>2]=d+1):fi[f[f[A+176>>2]+16>>2]](A+188|0,f[A+180>>2],0);A:{if(f[A+172>>2]){if(d=f[A+168>>2])for(e=f[A+164>>2],d<<=4;;){if(f[e+8>>2])break A;if(e=e+16|0,!(d=d-16|0))break}Ve(1055112),$f()}d=f[A+164>>2];f:if(e=f[A+168>>2]){if(r=0,1!=(0|e)){for(w=1&e,g=-2&e,e=d;fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]),fi[f[f[e+16>>2]+16>>2]](e+28|0,f[e+20>>2],f[e+24>>2]),e=e+32|0,(0|g)!=(0|(r=r+2|0)););if(!w)break f}fi[f[f[(r=d+(r<<4)|0)>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2])}if(!(e=f[A+160>>2]))break r;if((r=-8&(w=f[d-4>>2]))>>>0<((e<<=4)|((w&=3)?4:8))>>>0)break i;if(r>>>0>e+39>>>0&&w)break e;nr(d);break r}if(i[A+152|0]=31&n[f[e+4>>2]],(0|(w=f[r+248>>2]))!=f[r+240>>2]){ze(f[r+244>>2]+k(w,88)|0,A+88|0,88),f[r+248>>2]=w+1;break r}S=d=S-32|0,e=qe(B=(e=(y=f[(g=r+240|0)>>2])<<1)>>>0<=4?4:e,0,88,0);A:{if(!(M||e>>>0>2147483640)){if(y?(f[d+28>>2]=k(y,88),f[d+20>>2]=f[g+4>>2],y=8):y=0,f[d+24>>2]=y,Ce(d+8|0,8,e,d+20|0),1!=f[d+8>>2])break A;E=f[d+12>>2]}Ze(E,1055128),$f()}e=f[d+12>>2],f[g>>2]=B,f[g+4>>2]=e,S=d+32|0,ze(f[r+244>>2]+k(w,88)|0,A+88|0,88),f[r+248>>2]=w+1;break r}fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]);break r}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}S=A+192|0}function lr(r){var e=0,i=0,A=0,n=0,a=0;r:{e:{if(!(!f[r+4>>2]&2==f[r>>2])){if(jr(e=f[r+60>>2],f[r+64>>2]),i=f[r+56>>2]){if((n=-8&(A=f[e-4>>2]))>>>0<(i=k(i,120))+((A&=3)?4:8)>>>0)break e;if(n>>>0>i+39>>>0&&A)break r;nr(e)}n=f[r+76>>2];i:if(e=f[r+80>>2]){if(i=0,1!=(0|e)){for(A=1&e,a=-2&e,e=n;fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]),fi[f[f[e+16>>2]+16>>2]](e+28|0,f[e+20>>2],f[e+24>>2]),e=e+32|0,(0|a)!=(0|(i=i+2|0)););if(!A)break i}fi[f[f[(e=n+(i<<4)|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}if(i=f[r+72>>2]){if((e=-8&(A=f[n-4>>2]))>>>0<((i<<=4)|((A&=3)?4:8))>>>0)break e;if(e>>>0>i+39>>>0&&A)break r;nr(n)}n=f[r+88>>2];i:if(e=f[r+92>>2]){if(i=0,1!=(0|e)){for(A=1&e,a=-2&e,e=n;fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]),fi[f[f[e+16>>2]+16>>2]](e+28|0,f[e+20>>2],f[e+24>>2]),e=e+32|0,(0|a)!=(0|(i=i+2|0)););if(!A)break i}fi[f[f[(e=n+(i<<4)|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}if(i=f[r+84>>2]){if((e=-8&(A=f[n-4>>2]))>>>0<((i<<=4)|((A&=3)?4:8))>>>0)break e;if(e>>>0>i+39>>>0&&A)break r;nr(n)}if(e=f[r+96>>2]){if(n=f[r+100>>2],(r=-8&(i=f[n-4>>2]))>>>0>>0)break e;if(r>>>0>e+39>>>0&&i)break r;nr(n)}}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function hr(r,e,i,t,k,u,o,c,s,l,h){var v,d,w,g,y,B,E,_,I=0,Q=0,N=0,R=0,C=0,p=0,m=0,G=0,Y=0,W=0,D=0,F=0,T=0,M=0;S=v=S+-64|0,g=a[e+78>>1],y=a[e+76>>1],B=a[e+174>>1],E=a[e+172>>1],N=-2147483648,_=R=f[e+4>>2],I=d=f[e>>2],Q=R,G=-2147483648,2!=(0|(R=f[e+104>>2]))|(w=f[e+108>>2])&&(f[v+36>>2]=3,f[v+32>>2]=1056e3,f[v+20>>2]=3,f[v+16>>2]=1055976,f[v+28>>2]=3,f[v+56>>2]=e+226,f[v+60>>2]=7,f[v+48>>2]=e+225,f[v+52>>2]=7,f[v+40>>2]=e+224,f[v+44>>2]=7,f[v+24>>2]=v+40,Mr(v,v+16|0),G=f[v>>2],Y=f[v+4>>2],W=f[v+8>>2],Q=f[e+4>>2],I=f[e>>2]);r:{e:{i:{if(2!=(0|I)|Q){if(Q=n[e+100|0],!(I=V(N=(C=1&I)?10:9)))break i;D=ze(I,C?1057070:1&Q?1057061:1057052,N),C=N,I=0}if(!(Q=f[e+108>>2])&2==(0|(I=f[e+104>>2]))||f[e+184>>2]&&(I=f[e+180>>2],fi[f[f[I>>2]>>2]](v+40|0,I+12|0,f[I+4>>2],f[I+8>>2]),f[v+8>>2]=f[v+52>>2],I=f[v+48>>2],f[v>>2]=f[v+44>>2],f[v+4>>2]=I,F=f[v+40>>2],I=f[e+104>>2],Q=f[e+108>>2]),!Q&2==(0|I))p=a[e+254>>1],m=a[e+252>>1];else{if(!f[e+196>>2]){p=a[e+254>>1],m=a[e+252>>1];break e}if(I=f[e+192>>2],fi[f[f[I>>2]>>2]](v+40|0,I+12|0,f[I+4>>2],f[I+8>>2]),f[v+24>>2]=f[v+52>>2],I=f[v+48>>2],f[v+16>>2]=f[v+44>>2],f[v+20>>2]=I,T=f[v+40>>2],p=a[e+254>>1],m=a[e+252>>1],2!=f[e+104>>2]|f[e+108>>2])break e}Q=0;break r}Ze(1,1057036),$f()}M=b[e+120>>3],Q=1}A[r+126>>1]=g,A[r+122>>1]=B,f[r+112>>2]=D,f[r+116>>2]=C,f[r+108>>2]=N,f[r+100>>2]=Y,f[r+104>>2]=W,f[r+96>>2]=G,f[r+48>>2]=F,I=f[v+4>>2],f[r+52>>2]=f[v>>2],f[r+56>>2]=I,f[r+64>>2]=T,I=f[v+20>>2],f[r+68>>2]=f[v+16>>2],f[r+72>>2]=I,A[r+124>>1]=2!=(0|d)|_?y:0,A[r+120>>1]=2!=(0|R)|w?E:0,f[r+60>>2]=f[v+8>>2],f[r+76>>2]=f[v+24>>2],A[r+130>>1]=p,A[r+128>>1]=m,f[r+88>>2]=h,f[r+80>>2]=s,f[r+84>>2]=l,f[r+40>>2]=c,f[r+32>>2]=u,f[r+36>>2]=o,f[r+24>>2]=k,f[r+16>>2]=i,f[r+20>>2]=t,f[r>>2]=Q,f[r+4>>2]=0,b[r+8>>3]=M,ir(e),S=v- -64|0}function vr(r,e){var i=0,A=0,n=0,a=0;A=r+e|0;r:{e:if(!(1&(i=f[r+4>>2]))){if(!(2&i))break r;if(e=(i=f[r>>2])+e|0,(0|(r=r-i|0))==f[264982]){if(3&~(i=f[A+4>>2]))break e;f[264980]=e,f[A+4>>2]=-2&i,f[r+4>>2]=1|e,f[A>>2]=e;break r}Ur(r,i)}e:{i:{A:{if(!(2&(i=f[A+4>>2]))){if((0|A)==f[264983])break i;if((0|A)==f[264982])break e;if(Ur(A,i&=-8),e=e+i|0,f[r+4>>2]=1|e,f[r+e>>2]=e,f[264982]!=(0|r))break A;return void(f[264980]=e)}f[A+4>>2]=-2&i,f[r+4>>2]=1|e,f[r+e>>2]=e}if(e>>>0>=256){if(A=31,f[r+16>>2]=0,f[r+20>>2]=0,e>>>0<=16777215&&(A=62+((e>>>6-(i=o(e>>>8|0))&1)-(i<<1)|0)|0),f[r+28>>2]=A,n=1059504+(A<<2)|0,!((i=1<>2]=r,f[r+24>>2]=n,f[r+12>>2]=r,f[r+8>>2]=r,void(f[264979]=i|f[264979]);A:{if(i=f[n>>2],(-8&f[i+4>>2])!=(0|e))for(a=e<<(31!=(0|A)?25-(A>>>1|0)|0:0);;){if(!(A=f[(n=(a>>>29&4)+i|0)+16>>2]))break A;if(a<<=1,(-8&f[(i=A)+4>>2])==(0|e))break}else A=i;return e=f[A+8>>2],f[e+12>>2]=r,f[A+8>>2]=r,f[r+24>>2]=0,f[r+12>>2]=A,void(f[r+8>>2]=e)}return f[n+16>>2]=r,f[r+24>>2]=i,f[r+12>>2]=r,void(f[r+8>>2]=r)}return i=1059648+(248&e)|0,(A=f[264978])&(e=1<<(e>>>3))?e=f[i+8>>2]:(f[264978]=e|A,e=i),f[i+8>>2]=r,f[e+12>>2]=r,f[r+12>>2]=i,void(f[r+8>>2]=e)}if(f[264983]=r,e=f[264981]+e|0,f[264981]=e,f[r+4>>2]=1|e,f[264982]!=(0|r))break r;return f[264980]=0,void(f[264982]=0)}f[264982]=r,e=f[264980]+e|0,f[264980]=e,f[r+4>>2]=1|e,f[r+e>>2]=e}}function dr(r,e,i){var A,n=0,a=0,t=0,b=0,k=0;S=A=S-96|0;r:{e:{if((0|(n=(t=f[e+8>>2])+f[i+8>>2]|0))>=0){if(!n){a=1,n=0,b=1;break r}if(a=V(n))break e;r=1}else r=0;Ze(r,1058752),$f()}t=f[e+8>>2],b=n>>>0>131071?29:129-(o(n>>>10|0)<<2)|0}f[A+32>>2]=b,f[A+24>>2]=0,f[A+20>>2]=a,f[A+28>>2]=n,e=f[e+4>>2],n>>>0>>0&&(or(A+20|0,t),k=f[A+24>>2],n=f[A+28>>2],a=f[A+20>>2]),ze(a+k|0,e,t);r:{e:{if((e=n-k|0)>>>0>=t>>>0){if(k=t+k|0,f[A+24>>2]=k,e=f[i+4>>2],(b=f[i+8>>2])>>>0>(i=n-k|0)>>>0&&(or(A+20|0,b),a=f[A+20>>2],i=(n=f[A+28>>2])-(k=f[A+24>>2])|0),ze(a+k|0,e,b),i>>>0>>0)break e;if(b=b+k|0,1&(e=f[A+32>>2])){i=(t=e>>>5|0)+b|0,f[A+44>>2]=i,a=a-t|0,f[A+40>>2]=a,e=n+t|0,f[A+36>>2]=e;i:{A:{if((0|n)!=(0|b)){if(n=V(12))break A;$f()}if(se(A+8|0,A+36|0),!(i=f[A+12>>2])){i=0,a=1,n=0,e=1051612;break i}if(1&(a=f[A+8>>2])){n=a,e=1051916;break i}n=1|a,e=1051896;break i}f[n+8>>2]=1,f[n+4>>2]=e,f[n>>2]=a,e=1052028}if(f[A+48>>2]=t,i>>>0>>0)break r;f[r+12>>2]=n,f[r>>2]=e,f[r+8>>2]=i-t,f[r+4>>2]=a+t}else f[r+12>>2]=e,f[r+8>>2]=b,f[r+4>>2]=a,f[r>>2]=1058540;return void(S=A+96|0)}f[A+56>>2]=e,f[A+52>>2]=t,pe(A+52|0),$f()}f[A+56>>2]=i,f[A+52>>2]=b,pe(A+52|0),$f()}f[A+76>>2]=i,f[A+56>>2]=2,f[A+52>>2]=1058600,f[A+64>>2]=2,f[A+68>>2]=0,f[A+88>>2]=A+76,f[A+92>>2]=3,f[A+80>>2]=A+48,f[A+84>>2]=3,f[A+60>>2]=A+80,Me(A+52|0,1058616),$f()}function wr(r,e){var i,A=0,n=0,a=0,t=0,b=0,k=0,u=0;S=i=S-96|0;r:{e:{i:{A:switch(0|(n=f[e+80>>2])){case 0:break A;case 1:break i;default:break e}f[r+12>>2]=0,f[r+4>>2]=1,f[r+8>>2]=0,f[r>>2]=1058520;break r}A=r,r=f[e+76>>2],fi[f[f[r>>2]>>2]](A,r+12|0,f[r+4>>2],f[r+8>>2]);break r}e:{i:{if((0|(a=f[e+84>>2]))>=0){if(!a){b=1,a=0,t=1;break e}if(b=V(a))break i;r=1}else r=0;Ze(r,1058752),$f()}t=a>>>0>131071?29:129-(o(a>>>10|0)<<2)|0}f[i+32>>2]=t,f[i+28>>2]=a,f[i+24>>2]=0,f[i+20>>2]=b,k=n<<4,e=f[e+76>>2]+8|0;e:{i:{for(;;){if(u=f[e-4>>2],(t=a-A|0)>>>0<(n=f[e>>2])>>>0&&(or(i+20|0,n),b=f[i+20>>2],t=(a=f[i+28>>2])-(A=f[i+24>>2])|0),ze(A+b|0,u,n),n>>>0>t>>>0)break i;if(A=A+n|0,f[i+24>>2]=A,e=e+16|0,!(k=k-16|0))break}if(!(1&(e=f[i+32>>2]))){f[r+12>>2]=e,f[r+8>>2]=A,f[r+4>>2]=b,f[r>>2]=1058540;break r}e=(n=e>>>5|0)+A|0,f[i+44>>2]=e,t=b-n|0,f[i+40>>2]=t,b=n+a|0,f[i+36>>2]=b;A:{f:{if((0|A)!=(0|a)){if(A=V(12))break f;$f()}if(se(i+8|0,i+36|0),!(e=f[i+12>>2])){e=0,t=1,A=0,a=1051612;break A}if(1&(t=f[i+8>>2])){A=t,a=1051916;break A}A=1|t,a=1051896;break A}f[A+8>>2]=1,f[A+4>>2]=b,f[A>>2]=t,a=1052028}if(f[i+48>>2]=n,e>>>0>>0)break e;f[r+12>>2]=A,f[r>>2]=a,f[r+8>>2]=e-n,f[r+4>>2]=n+t;break r}f[i+56>>2]=t,f[i+52>>2]=n,pe(i+52|0),$f()}f[i+76>>2]=e,f[i+56>>2]=2,f[i+52>>2]=1058600,f[i+64>>2]=2,f[i+68>>2]=0,f[i+88>>2]=i+76,f[i+92>>2]=3,f[i+80>>2]=i+48,f[i+84>>2]=3,f[i+60>>2]=i+80,Me(i+52|0,1058616),$f()}S=i+96|0}function gr(r,e){var i=0,A=0,n=0,a=0,t=0,b=0,u=0,o=0;r:{e:{if(e)for(;;){i:{A:{f:{n:switch(t=k(b,72)+r|0,f[t>>2]){case 0:case 1:break f;default:break n}if(n=48,!(i=f[t+56>>2]))break i;if(a=f[t+52>>2],A=0,1!=(0|i)){for(u=1&i,o=-2&i,i=a;fi[f[f[i>>2]+16>>2]](i+12|0,f[i+4>>2],f[i+8>>2]),fi[f[f[i+16>>2]+16>>2]](i+28|0,f[i+20>>2],f[i+24>>2]),i=i+32|0,(0|o)!=(0|(A=A+2|0)););if(!u)break i}break A}if(n=56,!(i=f[t+64>>2]))break i;if(a=f[t+60>>2],A=0,1!=(0|i)){for(u=1&i,o=-2&i,i=a;fi[f[f[i>>2]+16>>2]](i+12|0,f[i+4>>2],f[i+8>>2]),fi[f[f[i+16>>2]+16>>2]](i+28|0,f[i+20>>2],f[i+24>>2]),i=i+32|0,(0|o)!=(0|(A=A+2|0)););if(!u)break i}}fi[f[f[(i=a+(A<<4)|0)>>2]+16>>2]](i+12|0,f[i+4>>2],f[i+8>>2])}if(n=f[(i=n+t|0)>>2]){if(a=f[i+4>>2],(i=-8&(A=f[a-4>>2]))>>>0<((n<<=4)|((A&=3)?4:8))>>>0)break e;if(i>>>0>n+39>>>0&&A)break r;nr(a)}if((0|(b=b+1|0))==(0|e))break}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function yr(r,e,i,A){var n,a=0,t=0,b=0,k=0,u=0;S=n=S-16|0;r:{e:{i:{A:{f:{n:{if(1==f[e+8>>2]){if((a=-8&(b=f[e-4>>2]))>>>0<((t=3&b)?16:20)>>>0)break r;if(b=f[e+4>>2],k=f[e>>2],a>>>0>=52&&t)break n;if(nr(e),a=b>>>0>131071?29:129-(o(b>>>10|0)<<2)|0,A=(t=i-k|0)+A|0,(0|i)==(0|k)){e=a;break e}if((e=(i=a>>>5|0)+t|0)>>>0>=134217728){if(!(e=V(20)))break f;f[e+16>>2]=1,f[e>>2]=i+b,f[e+8>>2]=i+A,f[e+4>>2]=k-i,f[e+12>>2]=a>>>2&7;break i}e=29&a|e<<5;break i}if((0|A)>=0){if(!A){k=1;break A}if(k=V(b=A))break A;r=1}else r=0;Ze(r,1057036),$f()}Ye(1053156,46,1053204)}$f()}ze(k,i,A),i=f[e+8>>2],f[e+8>>2]=i-1;A:{f:{n:{if(1==(0|i)){if((0|(i=f[e+4>>2]))<0)break n;if(a=f[e>>2],(u=-8&(t=f[a-4>>2]))>>>0>>0)break r;if(i+39>>>0>>0&&t)break f;if(nr(a),(i=-8&(a=f[e-4>>2]))>>>0<((a&=3)?16:20)>>>0)break r;if(i>>>0>=52&&a)break A;nr(e)}e=b>>>0>131071?29:129-(o(b>>>10|0)<<2)|0;break e}ge(1051952,43,n+15|0,1051936,1052012),$f()}Ye(1053156,46,1053204),$f()}Ye(1053156,46,1053204),$f()}A=(i=A-t|0)>>>0<=A>>>0?i:0,b=b-t|0,k=t+k|0}return f[r+12>>2]=e,f[r+8>>2]=b,f[r+4>>2]=A,f[r>>2]=k,void(S=n+16|0)}Ye(1053092,46,1053140),$f()}function Br(r){var e=0,i=0,A=0,n=0,a=0;r:{e:{i:if(!(!(e=f[r+4>>2])&3==(0|(i=f[r>>2])))){if(!e&2==(0|i)){if((i=f[r+136>>2])&&fi[f[i+16>>2]](r+148|0,f[r+140>>2],f[r+144>>2]),xr(f[r+252>>2],f[r+256>>2]),e=f[r+248>>2]){if(A=f[r+252>>2],(i=-8&(n=f[A-4>>2]))>>>0<(e=k(e,88))+((n&=3)?4:8)>>>0)break e;if(i>>>0>e+39>>>0&&n)break r;nr(A)}if(!f[r+164>>2]&2==f[r+160>>2])break i;i=232}else{if((i=f[r+128>>2])&&fi[f[i+16>>2]](r+140|0,f[r+132>>2],f[r+136>>2]),Hr(f[r+260>>2],f[r+264>>2]),e=f[r+256>>2]){if(A=f[r+260>>2],(i=-8&(n=f[A-4>>2]))>>>0<(e=k(e,104))+((n&=3)?4:8)>>>0)break e;if(i>>>0>e+39>>>0&&n)break r;nr(A)}if(!f[r+156>>2]&2==f[r+152>>2])break i;i=240}if(i=f[(e=i+r|0)+4>>2],r=f[e+8>>2]){A=0;A:{if(1!=(0|r)){for(n=1&r,a=-2&r,r=i;fi[f[f[r>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2]),fi[f[f[r+16>>2]+16>>2]](r+28|0,f[r+20>>2],f[r+24>>2]),r=r+32|0,(0|a)!=(0|(A=A+2|0)););if(!n)break A}fi[f[f[(r=(A<<4)+i|0)>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2])}i=f[e+4>>2]}if(e=f[e>>2]){if((r=-8&(A=f[i-4>>2]))>>>0<((e<<=4)|((A&=3)?4:8))>>>0)break e;if(r>>>0>e+39>>>0&&A)break r;nr(i)}}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Er(r){var e=0,i=0,A=0,n=0,a=0;r:{e:{i:{if(!f[r+4>>2]&2==f[r>>2]){if((i=f[r+136>>2])&&fi[f[i+16>>2]](r+148|0,f[r+140>>2],f[r+144>>2]),xr(f[r+252>>2],f[r+256>>2]),e=f[r+248>>2]){if(A=f[r+252>>2],(i=-8&(n=f[A-4>>2]))>>>0<(e=k(e,88))+((n&=3)?4:8)>>>0)break e;if(i>>>0>e+39>>>0&&n)break r;nr(A)}if(!f[r+164>>2]&2==f[r+160>>2])break i;i=232}else{if((i=f[r+128>>2])&&fi[f[i+16>>2]](r+140|0,f[r+132>>2],f[r+136>>2]),Hr(f[r+260>>2],f[r+264>>2]),e=f[r+256>>2]){if(A=f[r+260>>2],(i=-8&(n=f[A-4>>2]))>>>0<(e=k(e,104))+((n&=3)?4:8)>>>0)break e;if(i>>>0>e+39>>>0&&n)break r;nr(A)}if(!f[r+156>>2]&2==f[r+152>>2])break i;i=240}if(i=f[(e=i+r|0)+4>>2],r=f[e+8>>2]){A=0;A:{if(1!=(0|r)){for(n=1&r,a=-2&r,r=i;fi[f[f[r>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2]),fi[f[f[r+16>>2]+16>>2]](r+28|0,f[r+20>>2],f[r+24>>2]),r=r+32|0,(0|a)!=(0|(A=A+2|0)););if(!n)break A}fi[f[f[(r=(A<<4)+i|0)>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2])}i=f[e+4>>2]}if(e=f[e>>2]){if((r=-8&(A=f[i-4>>2]))>>>0<((e<<=4)|((A&=3)?4:8))>>>0)break e;if(r>>>0>e+39>>>0&&A)break r;nr(i)}}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function _r(r,e,i,A){var n,a=0,t=0;S=n=S-96|0,f[n+72>>2]=A;r:if(A){if(t=f[e+8>>2],f[n+12>>2]=t,(a=f[e+4>>2])>>>0<=i>>>0){e:{i:{if(i+A>>>0<=a+t>>>0){if(f[n+84>>2]=t,i=i-a|0,f[n+88>>2]=i,A=i+A|0,f[n+92>>2]=A,i>>>0>A>>>0)break i;if(A>>>0>t>>>0)break e;fi[f[f[e>>2]>>2]](n+40|0,e+12|0,a,t),f[(e=n+48|0)>>2]=f[n+92>>2]-i,f[n+44>>2]=i+f[n+44>>2],i=f[n+44>>2],f[r>>2]=f[n+40>>2],f[r+4>>2]=i,i=f[e+4>>2],f[(r=r+8|0)>>2]=f[e>>2],f[r+4>>2]=i;break r}f[n+80>>2]=a,f[n+92>>2]=i,f[n+20>>2]=5,f[n+16>>2]=1051768,f[n+28>>2]=4,f[n+32>>2]=0,f[n+64>>2]=n+72,f[n+68>>2]=8,f[n+56>>2]=n+92,f[n+60>>2]=10,f[n+48>>2]=n+12,f[n+52>>2]=8,f[n+40>>2]=n+80,f[n+44>>2]=10,f[n+24>>2]=n+40,Me(n+16|0,1051808),$f()}f[n+44>>2]=2,f[n+40>>2]=1057504,f[n+52>>2]=2,f[n+56>>2]=0,f[n+24>>2]=n+92,f[n+28>>2]=3,f[n+16>>2]=n+88,f[n+20>>2]=3,f[n+48>>2]=n+16,Me(n+40|0,1057520),$f()}f[n+44>>2]=2,f[n+40>>2]=1057564,f[n+52>>2]=2,f[n+56>>2]=0,f[n+24>>2]=n+84,f[n+28>>2]=3,f[n+16>>2]=n+92,f[n+20>>2]=3,f[n+48>>2]=n+16,Me(n+40|0,1057580),$f()}f[n+76>>2]=a,f[n+92>>2]=i,f[n+44>>2]=3,f[n+40>>2]=1051680,f[n+52>>2]=2,f[n+56>>2]=0,f[n+24>>2]=n+76,f[n+28>>2]=10,f[n+16>>2]=n+92,f[n+20>>2]=10,f[n+48>>2]=n+16,Me(n+40|0,1051704),$f()}else f[r+12>>2]=0,f[r+4>>2]=1,f[r+8>>2]=0,f[r>>2]=1051612;S=n+96|0}function Ir(r,e,A){var n,a=0,t=0,b=0,k=0;S=n=S-16|0;r:{e:{if((a=f[r+8>>2])-(t=f[r+4>>2])>>>0>=4)k=f[r>>2],i[0|(b=k+t|0)]=0,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=24;else if(or(r,4),t=f[r+4>>2],k=f[r>>2],i[0|(a=t+k|0)]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=24,(b=(a=f[r+8>>2])-t|0)>>>0<=3)break e;t=t+4|0,f[r+4>>2]=t,a-t>>>0<=3&&(or(r,4),k=f[r>>2],t=f[r+4>>2]),i[0|(t=t+k|0)]=116,i[t+1|0]=102,i[t+2|0]=104,i[t+3|0]=100;i:{A:{if((k=(t=f[r+8>>2])-(a=f[r+4>>2])|0)>>>0>3){if(a=a+4|0,f[r+4>>2]=a,t-a>>>0>=4)k=f[r>>2],i[0|(b=k+a|0)]=0,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=40;else if(or(r,4),a=f[r+4>>2],k=f[r>>2],i[0|(t=a+k|0)]=0,i[t+1|0]=0,i[t+2|0]=0,i[t+3|0]=40,(b=(t=f[r+8>>2])-a|0)>>>0<=3)break e;if(a=a+4|0,f[r+4>>2]=a,A<<=24,t-a>>>0>=4)i[0|(b=a+k|0)]=A,i[b+1|0]=A>>>8,i[b+2|0]=A>>>16,i[b+3|0]=A>>>24;else if(or(r,4),a=f[r+4>>2],k=f[r>>2],i[0|(t=a+k|0)]=A,i[t+1|0]=A>>>8,i[t+2|0]=A>>>16,i[t+3|0]=A>>>24,(A=(t=f[r+8>>2])-a|0)>>>0<=3)break A;if(a=a+4|0,f[r+4>>2]=a,e=e<<24|(65280&e)<<8|e>>>8&65280|e>>>24,t-a>>>0>=4)i[0|(A=a+k|0)]=e,i[A+1|0]=e>>>8,i[A+2|0]=e>>>16,i[A+3|0]=e>>>24;else if(or(r,4),A=(a=f[r+4>>2])+f[r>>2]|0,i[0|A]=e,i[A+1|0]=e>>>8,i[A+2|0]=e>>>16,i[A+3|0]=e>>>24,(e=f[r+8>>2]-a|0)>>>0<=3)break i;return f[r+4>>2]=a+4,void(S=n+16|0)}f[n+12>>2]=k;break r}f[n+12>>2]=A;break r}f[n+12>>2]=e;break r}f[n+12>>2]=b}f[n+8>>2]=4,pe(n+8|0),$f()}function Qr(r,e,i){var n,b=0,u=0,o=0,c=0,s=0,l=0,h=0;S=n=S-16|0,f[n+4>>2]=e,f[n>>2]=r,f[n+8>>2]=-536870880,f[n+12>>2]=0;r:{e:{i:{if(e=f[i+16>>2]){if(r=f[i+20>>2])break i;break e}if(!(r=f[i+12>>2]))break e;for(c=(u=f[i+8>>2])+(r<<3)|0,b=u+8|0,s=1+(r-1&536870911)|0,r=f[i>>2];;){if(e=b,(b=f[r+4>>2])&&0|fi[f[f[n+4>>2]+12>>2]](f[n>>2],f[r>>2],b)){b=1;break r}if(b=1,0|fi[f[u+4>>2]](f[u>>2],n))break r;if(r=r+8|0,b=e+(((0|e)!=(0|c))<<3)|0,u=e,(0|(o=o+1|0))==(0|s))break}break e}for(h=k(r,24)+e|0,b=e+24|0,s=1+(r-1&536870911)|0,c=f[i+8>>2],u=f[i>>2];;){if(r=b,(b=f[u+4>>2])&&0|fi[f[f[n+4>>2]+12>>2]](f[n>>2],f[u>>2],b)){b=1;break r}b=0,o=0;i:{A:switch(a[e+8>>1]-1|0){default:o=a[e+10>>1];break i;case 0:break A;case 1:break i}o=a[4+(c+(f[e+12>>2]<<3)|0)>>1]}i:{A:switch(a[e>>1]-1|0){default:b=a[e+2>>1];break i;case 1:break i;case 0:break A}b=a[4+(c+(f[e+4>>2]<<3)|0)>>1]}if(A[n+14>>1]=b,A[n+12>>1]=o,f[n+8>>2]=f[e+20>>2],e=c+(f[e+16>>2]<<3)|0,b=1,0|fi[f[e+4>>2]](f[e>>2],n))break r;if(u=u+8|0,b=r+((0|r)!=(0|h)?24:0)|0,e=r,(0|(l=l+1|0))==(0|s))break}}t[i+4>>2]<=s>>>0||(r=f[i>>2]+(s<<3)|0,!(0|fi[f[f[n+4>>2]+12>>2]](f[n>>2],f[r>>2],f[r+4>>2])))?b=0:b=1}return S=n+16|0,b}function Nr(r,e,A,n,a){var t,b=0,k=0,u=0,o=0,c=0,s=0;S=t=S-48|0;r:{if((u=f[r+8>>2])-(k=f[r+4>>2])>>>0>=4)o=f[r>>2],i[0|(b=o+k|0)]=0,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=20;else if(or(r,4),k=f[r+4>>2],o=f[r>>2],i[0|(b=k+o|0)]=0,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=20,(b=(u=f[r+8>>2])-k|0)>>>0<=3)break r;b=k+4|0,f[r+4>>2]=b,u-b>>>0<=3&&(or(r,4),o=f[r>>2],b=f[r+4>>2]),i[0|(b=b+o|0)]=116,i[b+1|0]=102,i[b+2|0]=100,i[b+3|0]=116;e:{if((b=(u=f[r+8>>2])-(c=f[r+4>>2])|0)>>>0<=3)break r;if(k=c+4|0,f[r+4>>2]=k,u-k>>>0>=4)o=f[r>>2],i[0|(b=o+k|0)]=1,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=0;else if(or(r,4),k=f[r+4>>2],o=f[r>>2],i[0|(b=k+o|0)]=1,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=0,(b=(u=f[r+8>>2])-k|0)>>>0<=3)break r;if(k=k+4|0,f[r+4>>2]=k,(0|e)!=(0|a)&&(Ue(t+16|0,b=A,n,A=n>>31,A,e,0,0,0),Le(t,f[t+16>>2],f[t+20>>2],f[t+24>>2],f[t+28>>2],a),n=f[t+4>>2],A=f[t>>2]),s=b=(e=16711680&A)<<24,b=(e=a=e>>>8|0)|(b=(a=-16777216&A)>>>24|0)|(c=A<<24|(65280&A)<<8),n=-16777216&((255&(e=n))<<24|A>>>8)|16711680&((16777215&e)<<8|A>>>24)|e>>>8&65280|e>>>24|(a=s|a<<8),e=b,u-k>>>0>=8)i[0|(A=k+o|0)]=n,i[A+1|0]=n>>>8,i[A+2|0]=n>>>16,i[A+3|0]=n>>>24,i[A+4|0]=b,i[A+5|0]=b>>>8,i[A+6|0]=b>>>16,i[A+7|0]=b>>>24;else if(or(r,8),A=(k=f[r+4>>2])+f[r>>2]|0,i[0|A]=n,i[A+1|0]=n>>>8,i[A+2|0]=n>>>16,i[A+3|0]=n>>>24,i[A+4|0]=e,i[A+5|0]=e>>>8,i[A+6|0]=e>>>16,i[A+7|0]=e>>>24,(e=f[r+8>>2]-k|0)>>>0<=7)break e;return f[r+4>>2]=k+8,void(S=t+48|0)}f[t+44>>2]=e,f[t+40>>2]=8,pe(t+40|0),$f()}f[t+44>>2]=b,f[t+40>>2]=4,pe(t+40|0),$f()}function Rr(r,e,A){var n,a,t,b=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0;S=n=S-176|0,u=f[e+16>>2],a=f[e+24>>2];r:{if(!(l=(0|(o=f[e+20>>2]))>(0|(b=t=f[e+28>>2]))?1:(0|b)<=(0|o)&u>>>0>=a>>>0)){if(b=a-u|0,h=n+88|0,(c=(0|t)>(0|(v=t-(o+(u>>>0>a>>>0)|0)|0))?1:b>>>0>>0&(0|v)<=(0|t))^(d=(0|o)>0?1:!!(0|u)&(0|o)>=0)|v)break r;s=b}f[n+88>>2]=1,h=n}if(f[h>>2]=s,1==f[n+88>>2]){if(A=f[n>>2],c=f[r+8>>2],A>>>0>f[r>>2]-c>>>0&&(Ae(r,c,A,8,88),c=f[r+8>>2]),!l)for(w=f[r+4>>2]+k(c,88)|0,_=(d=f[e>>2])+12|0,c=(c+a|0)-u|0,I=n+12|0,g=f[e+12>>2],l=f[e+8>>2],h=f[e+4>>2],Q=n+160|0;o=(u=u+1|0)?o:o+1|0,f[e+16>>2]=u,f[e+20>>2]=o,f[n+160>>2]=0,f[n+164>>2]=4,f[n+168>>2]=0,f[n+172>>2]=0,i[n+158|0]=0,i[n+156|0]=0,f[n+152>>2]=0,f[n+136>>2]=0,f[n+140>>2]=0,f[n+120>>2]=0,f[n+124>>2]=0,f[n+104>>2]=0,f[n+108>>2]=0,f[n+88>>2]=0,f[n+92>>2]=0,fi[f[f[d>>2]>>2]](n,_,f[d+4>>2],f[d+8>>2]),(A=f[n+8>>2])?(f[n+172>>2]=A,ce(Q,1058736),A=f[n+4>>2],b=f[n+164>>2],f[b>>2]=f[n>>2],f[b+4>>2]=A,s=b+8|0,A=f[(b=n+8|0)+4>>2],f[s>>2]=f[b>>2],f[s+4>>2]=A,f[n+168>>2]=1):fi[f[f[n>>2]+16>>2]](I,f[n+4>>2],0),A=f[(b=h+8|0)+4>>2],f[(s=n+96|0)>>2]=f[b>>2],f[s+4>>2]=A,s=f[h+64>>2],N=f[h+68>>2],b=f[h>>2],R=f[h+4>>2],B=(v=f[l>>2])+(y=f[g>>2])|0,E=(A=f[l+4>>2])+f[g+4>>2]|0,f[l>>2]=B,f[l+4>>2]=B>>>0>>0?E+1|0:E,f[n+136>>2]=1,f[n+140>>2]=0,f[n+120>>2]=1,f[n+124>>2]=0,f[n+104>>2]=1,f[n+108>>2]=0,f[n+88>>2]=b,f[n+92>>2]=R,f[n+152>>2]=s,f[n+156>>2]=N,f[n+144>>2]=v,f[n+148>>2]=A,f[n+128>>2]=v,f[n+132>>2]=A,f[n+112>>2]=v,f[n+116>>2]=A,w=ze(w,ze(n,n+88|0,88),88)+88|0,(0|u)!=(0|a)|(0|o)!=(0|t););return f[r+8>>2]=c,void(S=n+176|0)}f[n+104>>2]=0,f[n+92>>2]=1,f[n+88>>2]=1057100,f[n+96>>2]=4,f[n+100>>2]=0,Me(n+88|0,A),$f()}function Cr(r,e){var i,A=0,a=0,b=0,k=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0;i=r+20|0,l=8,k=8;r:{for(;;){if(k){if(A=f[r>>2],(k=(7&f[r+4>>2])<<29|A>>>3)>>>0>=(a=f[r+12>>2])>>>0)break r;for(s=f[r+16>>2],c=0;;){if(k>>>0<=s>>>0)u=f[r+28>>2],A=a;else{e:{i:{if((o=((A=(u=f[r+28>>2])-2|0)>>>0<=u>>>0?A:0)+s|0)>>>0<=a>>>0){if((0|a)!=(0|o))break i;A=a;break e}xe(o,a,1055768),$f()}for(h=f[r+8>>2],b=0;;){A=b,b=0;i:{A:switch(n[o+h|0]){case 0:b=A+1|0;break i;case 3:break A;default:break i}(0|A)<2||(f[i>>2]==(0|u)&&he(i),A=u+1|0,f[r+28>>2]=A,f[f[r+24>>2]+(u<<2)>>2]=o,u=A)}if((0|(o=o+1|0))==(0|a))break}A=f[r+12>>2]}s=a-u|0,f[r+16>>2]=s}h=f[r+8>>2];e:if(u)for(o=f[r+24>>2],b=u<<2;;){if(t[o>>2]>k>>>0)break e;if(k=k+1|0,o=o+4|0,!(b=b-4|0))break}if(A>>>0<=k>>>0)break r;if(b=f[r+4>>2],b=(u=(a=f[r>>2])+1|0)?b:b+1|0,f[r>>2]=u,f[r+4>>2]=b,!(n[k+h|0]>>>(7&~a)&1|c>>>0>31)){if(c=c+1|0,(a=A)>>>0>(k=(7&b)<<29|u>>>3)>>>0)continue;break r}break}l=(k=(256+((1&(b=(A=Zr(r,c))+(-1^(a=-1<>1:0-(b>>1)|0)+l|0)|0)%256|0)||l}else k=0;if((0|(v=v+1|0))==(0|e))break}return}Ve(1055784),$f()}function pr(r,e,A,n,t){var b,k=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0;b=(k=2097152&(o=f[r+8>>2]))?43:1114112,k=(k>>>21|0)+t|0,8388608&o?(u=0,A&&(u=i[0|e]>-65,1!=(0|A)&&(u=u+(i[e+1|0]>-65)|0)),k=u+k|0):e=0;r:{e:{if((s=a[r+12>>1])>>>0>k>>>0){if(16777216&o)break e;u=s-k|0,k=0;i:{A:switch((o>>>29&3)-1|0){case 0:case 2:k=u;break i;case 1:break A;default:break i}k=(65534&u)>>>1|0}for(l=2097151&o,s=f[r+4>>2],r=f[r>>2];;){if((65535&c)>>>0<(65535&k)>>>0){if(o=1,c=c+1|0,!(0|fi[f[s+16>>2]](r,l)))continue;break r}break}if(o=1,We(r,s,b,e,A))break r;if(0|fi[f[s+12>>2]](r,n,t))break r;for(e=u-k&65535,c=0;;){if(e>>>0<=(65535&c)>>>0)return 0;if(c=c+1|0,0|fi[f[s+16>>2]](r,l))break}break r}if(o=1,We(k=f[r>>2],r=f[r+4>>2],b,e,A))break r;o=0|fi[f[r+12>>2]](k,n,t);break r}if(v=f[r+12>>2],u=f[r+8>>2],f[r+8>>2]=-1612709888&u|536870960,o=1,!We(l=f[r>>2],h=f[r+4>>2],b,e,A)){for(e=s-k&65535;;){if(e>>>0>(65535&c)>>>0){if(c=c+1|0,!(0|fi[f[h+16>>2]](l,48)))continue;break r}break}if(!(0|fi[f[h+12>>2]](l,n,t)))return f[r+8>>2]=u,f[r+12>>2]=v,0}}return o}function mr(r){var e,i,A,n=0,a=0,t=0,b=0,u=0,o=0,c=0,s=0;a=f[r+4>>2],i=f[r>>2],f[r>>2]=8,f[r+4>>2]=8,A=(a-i>>>0)/88|0,e=f[r+8>>2];r:{e:{if((0|a)==(0|i)){if(!(t=f[r+16>>2]))break e;if((0|(a=f[r+12>>2]))==(0|(n=f[e+8>>2])))break r;Pe((r=f[e+4>>2])+k(n,88)|0,r+k(a,88)|0,k(t,88));break r}i:{A:{f:{for(;;){b=(s=k(c,88)+i|0)+76|0;n:if(n=f[s+80>>2]){if(a=f[b>>2],u=0,1!=(0|n)){for(o=1&n,t=-2&n,n=a;fi[f[f[n>>2]+16>>2]](n+12|0,f[n+4>>2],f[n+8>>2]),fi[f[f[n+16>>2]+16>>2]](n+28|0,f[n+20>>2],f[n+24>>2]),n=n+32|0,(0|t)!=(0|(u=u+2|0)););if(!o)break n}fi[f[f[(a=a+(u<<4)|0)>>2]+16>>2]](a+12|0,f[a+4>>2],f[a+8>>2])}if(o=f[s+72>>2]){if(t=f[b>>2],(b=-8&(a=f[t-4>>2]))>>>0<(((n=3&a)?4:8)|(a=o<<4))>>>0)break f;if(b>>>0>a+39>>>0&&n)break A;nr(t)}if((0|A)==(0|(c=c+1|0)))break}if(!(t=f[r+16>>2]))break e;if((0|(a=f[r+12>>2]))==(0|(n=f[e+8>>2])))break i;Pe((r=f[e+4>>2])+k(n,88)|0,r+k(a,88)|0,k(t,88));break i}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}f[e+8>>2]=n+t}return}f[e+8>>2]=n+t}function Gr(r,e,A){var n,a=0,t=0,b=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0,p=0;S=n=S-192|0,a=1;r:if((0|(u=f[r+8>>2]))!=(0|e))for(_=(b=f[r+4>>2])+k(e,88)|0,t=e=f[A+28>>2],c=f[A+16>>2],a=f[A+24>>2],I=(e=(0|(o=f[A+20>>2]))>(0|e)?1:a>>>0>>0&(0|e)<=(0|o))?c:a,Q=e?o:t,N=(l=f[A>>2])+12|0,e=b+k(u,88)|0,R=n+188|0,v=n+96|0,g=f[A+12>>2],h=f[A+8>>2],u=f[A+4>>2],C=n+160|0;;){if((0|c)==(0|I)&(0|o)==(0|Q)){a=0;break r}if(o=(c=c+1|0)?o:o+1|0,f[A+16>>2]=c,f[A+20>>2]=o,f[(a=n)+160>>2]=0,f[a+164>>2]=4,f[a+168>>2]=0,f[a+172>>2]=0,i[a+158|0]=0,i[a+156|0]=0,f[a+152>>2]=0,f[a+136>>2]=0,f[a+140>>2]=0,f[a+120>>2]=0,f[a+124>>2]=0,f[a+104>>2]=0,f[a+108>>2]=0,f[a+88>>2]=0,f[a+92>>2]=0,fi[f[f[l>>2]>>2]](a+176|0,N,f[l+4>>2],f[l+8>>2]),(t=f[a+184>>2])?(f[a+172>>2]=t,ce(C,1058736),t=f[a+180>>2],b=f[a+164>>2],f[b>>2]=f[a+176>>2],f[b+4>>2]=t,s=b+8|0,t=f[(b=a+184|0)+4>>2],f[s>>2]=f[b>>2],f[s+4>>2]=t,f[a+168>>2]=1):fi[f[f[a+176>>2]+16>>2]](R,f[a+180>>2],0),t=f[(b=u+8|0)+4>>2],f[v>>2]=f[b>>2],f[v+4>>2]=t,b=f[u+64>>2],p=f[u+68>>2],d=f[u>>2],w=f[u+4>>2],B=(s=f[h>>2])+(y=f[g>>2])|0,E=(t=f[h+4>>2])+f[g+4>>2]|0,f[h>>2]=B,f[h+4>>2]=B>>>0>>0?E+1|0:E,f[a+136>>2]=1,f[n+140>>2]=0,f[n+120>>2]=1,f[n+124>>2]=0,f[n+104>>2]=1,f[n+108>>2]=0,f[n+88>>2]=d,f[n+92>>2]=w,f[n+152>>2]=b,f[n+156>>2]=p,f[n+144>>2]=s,f[n+148>>2]=t,f[n+128>>2]=s,f[n+132>>2]=t,f[n+112>>2]=s,f[n+116>>2]=t,ze(n+8|0,v,80),!w&2==(0|d)){a=0;break r}if(f[e>>2]=d,f[e+4>>2]=w,ze(e+8|0,n+8|0,80),a=1,f[r+8>>2]=f[r+8>>2]+1,(0|_)==(0|(e=e+88|0)))break}return S=n+192|0,a}function Yr(r,e){var i=0,A=0,n=0,a=0,t=0,b=0,u=0,o=0,c=0,s=0,l=0;if(f[r+168>>2]&&1&f[r+48>>2]&&f[r+408>>2]&&1&f[r+288>>2]&&(A=f[(a=r+416|0)>>2],n=f[(i=r+296|0)>>2],a=f[a+4>>2],i=f[i+4>>2],f[(o=((t=(0|a)<(0|i)?1:A>>>0>>0&(0|i)>=(0|a))?360:240)+r|0)+48>>2]&&(a=f[(i=r+176|0)>>2],A=f[(n=r+56|0)>>2],i=f[i+4>>2],n=f[n+4>>2],c=k(b=(0|i)<(0|n)?1:(0|i)<=(0|n)&A>>>0>a>>>0,120)+r|0,1&f[c+48>>2]&&f[(t=(t?240:360)+r|0)+48>>2]&&(n=k(A>>>0<=a>>>0&(0|i)>=(0|n)|(0|i)>(0|n),120)+r|0,1&f[n+48>>2]&&(a=f[(r=o+56|0)>>2],i=f[(A=c+56|0)>>2],u=(b=(0|(r=f[r+4>>2]))<(0|(A=f[A+4>>2]))?1:(0|r)<=(0|A)&i>>>0>a>>>0)?n:o,a=f[(r=t+56|0)>>2],i=f[(A=n+56|0)>>2],r=f[r+4>>2],A=f[A+4>>2],f[(u=(s=(0|r)<(0|A)?1:(0|r)<=(0|A)&i>>>0>a>>>0)?t:u)+48>>2]&&1&f[(l=b?c:s?o:n)+48>>2])))))return r=f[(A=l+56|0)>>2],a=f[(i=u+56|0)>>2],A=f[A+4>>2],i=f[i+4>>2],e=ze(e,b?o:c,120),ze(e+120|0,(r=(0|i)<=(0|A)&r>>>0>a>>>0|(0|i)<(0|A))?u:l,120),ze(e+240|0,r?l:u,120),void ze(e+360|0,s?n:t,120);Ve(1058820),$f()}function Wr(r,e,i,A){var n,a=0,t=0,b=0,k=0,u=0;S=n=S-16|0,t=f[e+8>>2],f[e+8>>2]=1!=(0|t)?t:0;r:{e:{i:{if(1!=(0|t)){A:{if((0|A)>=0){if(!A){t=1;break A}if(k=A,t=V(A))break A;r=1}else r=0;Ze(r,1057036),$f()}if(ze(t,i,A),i=f[e+8>>2],f[e+8>>2]=i-1,1==(0|i)){if((0|(i=f[e+4>>2]))<0)break i;if(a=f[e>>2],(u=-8&(b=f[a-4>>2]))>>>0>>0)break e;if(i+39>>>0>>0&&b)break r;if(nr(a),(i=-8&(a=f[e-4>>2]))>>>0<((a&=3)?16:20)>>>0)break e;if(i>>>0>=52&&a)break r;nr(e)}}else{if((a=-8&(k=f[e-4>>2]))>>>0<((b=3&k)?16:20)>>>0)break e;if(k=f[e+4>>2],t=f[e>>2],a>>>0>=52&&b)break r;nr(e),Pe(t,i,A)}return f[r+8>>2]=A,f[r+4>>2]=t,f[r>>2]=k,void(S=n+16|0)}ge(1051952,43,n+15|0,1051936,1052012),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Dr(r,e){var i,n,a=0,t=0,b=0,k=0,u=0,o=0,c=0,s=0,l=0,h=0,g=0,y=0,I=0,R=0,C=0,p=0,m=0,G=0;S=i=S-16|0,v(i+8|0,0|e),(u=f[i+12>>2])?1&(b=f[i+8>>2])?(o=1051916,c=b):(o=1051896,c=1|b):(o=1051612,u=0,b=1,c=0),(n=0|d(0|e))?(w(i+8|0,0|n),k=0,(a=f[i+8>>2])&&((s=f[i+12>>2])?1&a?(y=a,k=1051916):(y=1|a,k=1051896):(s=0,a=1,k=1051612)),B(i+8|0,0|n),(t=f[i+8>>2])&&((l=f[i+12>>2])?1&t?(h=1051916,I=t):(I=1|t,h=1051896):(h=1051612,l=0,t=1)),g=16777215!=(0|(R=0|E(0|n))),m=16777215!=(0|(C=0|_(0|n))),G=16777215!=(0|(p=0|Q(0|n))),n>>>0<132||N(0|n)):g=2,f[r+56>>2]=c,f[r+52>>2]=u,f[r+48>>2]=b,f[r+44>>2]=o,f[r+40>>2]=I,f[r+36>>2]=l,f[r+32>>2]=t,f[r+28>>2]=h,f[r+24>>2]=y,f[r+20>>2]=s,f[r+16>>2]=a,f[r+12>>2]=k,A[r+10>>1]=p,A[r+8>>1]=G,A[r+6>>1]=C,A[r+4>>1]=m,A[r+2>>1]=R,A[r>>1]=g,e>>>0>=132&&N(0|e),S=i+16|0}function Sr(r){var e,A=0,n=0,a=0,t=0;S=e=S-16|0;r:{e:{if((n=f[r+8>>2])-(A=f[r+4>>2])>>>0>=4)t=f[r>>2],i[0|(a=t+A|0)]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=16;else if(or(r,4),A=f[r+4>>2],t=f[r>>2],i[0|(n=A+t|0)]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=16,(a=(n=f[r+8>>2])-A|0)>>>0<=3)break e;A=A+4|0,f[r+4>>2]=A,n-A>>>0<=3&&(or(r,4),t=f[r>>2],A=f[r+4>>2]),i[0|(A=A+t|0)]=115,i[A+1|0]=116,i[A+2|0]=116,i[A+3|0]=115;i:{if((t=(n=f[r+8>>2])-(A=f[r+4>>2])|0)>>>0>3){if(A=A+4|0,f[r+4>>2]=A,n-A>>>0>=4)t=f[r>>2],i[0|(a=t+A|0)]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0;else if(or(r,4),A=f[r+4>>2],t=f[r>>2],i[0|(n=A+t|0)]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0,(a=(n=f[r+8>>2])-A|0)>>>0<=3)break e;if(A=A+4|0,f[r+4>>2]=A,n-A>>>0>=4)i[0|(n=A+t|0)]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0;else if(or(r,4),n=(A=f[r+4>>2])+f[r>>2]|0,i[0|n]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0,(n=f[r+8>>2]-A|0)>>>0<=3)break i;return f[r+4>>2]=A+4,void(S=e+16|0)}f[e+12>>2]=t;break r}f[e+12>>2]=n;break r}f[e+12>>2]=a}f[e+8>>2]=4,pe(e+8|0),$f()}function Fr(r,e){var i,A=0,a=0,t=0,b=0,k=0,u=0,o=0,c=0;S=i=S+-64|0;r:{e:{if(k=f[e+8>>2])for(A=f[e+4>>2];;){if(!n[A+a|0])break e;if((0|k)==(0|(a=a+1|0)))break}f[r>>2]=0,f[r+4>>2]=0;break r}qr(i,e,a),k=f[i+4>>2];e:{if(44==(0|(o=f[i+8>>2]))){A=k,u=44,c=1057356;i:{for(;;){if((0|(b=n[0|A]))==(0|(a=n[0|c]))){if(A=A+1|0,c=c+1|0,u=u-1|0)continue;break i}break}t=b-a|0}if(!t){if(f[i+16>>2]=1,!(t=f[e+8>>2]))break e;if(f[e+8>>2]=t-1,A=f[e+4>>2],f[e+4>>2]=A+1,!(t>>>0<9)){f[e+8>>2]=t-9,f[e+4>>2]=A+9,f[r>>2]=1,f[r+4>>2]=0,e=r,b=(r=16711680&(a=n[A+1|0]|n[A+2|0]<<8|n[A+3|0]<<16|n[A+4|0]<<24))<<24,r=t=r>>>8|0,u=b,b=(t=-16777216&a)>>>24|0,t=u|t<<8,b=r|b|(o=a<<24|(65280&a)<<8),r=n[A+5|0]|n[A+6|0]<<8|n[A+7|0]<<16|n[A+8|0]<<24,f[e+8>>2]=-16777216&((255&r)<<24|a>>>8)|16711680&((16777215&r)<<8|a>>>24)|r>>>8&65280|r>>>24|t,f[e+12>>2]=b,fi[f[f[i>>2]+16>>2]](i+12|0,k,44);break r}}}f[r>>2]=0,f[r+4>>2]=0,fi[f[f[i>>2]+16>>2]](i+12|0,k,o);break r}f[i+44>>2]=0,f[i+24>>2]=2,f[i+20>>2]=1058600,f[i+32>>2]=2,f[i+36>>2]=0,f[i+56>>2]=i+44,f[i+60>>2]=3,f[i+48>>2]=i+16,f[i+52>>2]=3,f[i+28>>2]=i+48,Me(i+20|0,1058616),$f()}S=i- -64|0}function Tr(r,e,A,a){var t,b,k=0,u=0;S=t=S-48|0;r:if((b=f[e+8>>2])>>>0>=10){if(f[e+8>>2]=b-1,k=f[e+4>>2],f[e+4>>2]=k+1,73==n[0|k]&&(f[e+8>>2]=b-2,f[e+4>>2]=k+2,68==n[k+1|0]&&(f[e+8>>2]=b-3,f[e+4>>2]=k+3,51==n[k+2|0]))){f[e+8>>2]=b-4,f[e+4>>2]=k+4,u=n[k+3|0],i[t+15|0]=u;e:{if((u-2&255)>>>0>2){if(f[t+36>>2]=1,f[t+32>>2]=1057284,f[t+20>>2]=2,f[t+16>>2]=1057268,f[t+28>>2]=1,f[t+40>>2]=t+15,f[t+44>>2]=7,f[t+24>>2]=t+40,Mr(t,t+16|0),-2147483648!=(0|(u=f[t>>2])))break e;u=n[t+4|0]}i[r+36|0]=u,f[r+24>>2]=A,f[r+28>>2]=a,f[r+16>>2]=1,f[r+20>>2]=0,f[r>>2]=0,f[r+4>>2]=0,f[e+8>>2]=b-10,f[e+4>>2]=k+10,i[r+37|0]=n[k+5|0],f[r+32>>2]=127&n[k+9|0]|(127&n[k+7|0])<<14|(127&n[k+6|0])<<21|(127&n[k+8|0])<<7;break r}Re(u,f[t+4>>2]),f[r>>2]=2,f[r+4>>2]=0;break r}f[r>>2]=2,f[r+4>>2]=0}else f[r>>2]=2,f[r+4>>2]=0;S=t+48|0}function Mr(r,e){var i,A=0,n=0,a=0,t=0,b=0,k=0;S=i=S-16|0;r:{e:{i:{A:{if(A=f[e+4>>2]){if(t=f[e>>2],a=3&A,A>>>0<4)A=0;else for(n=t+28|0,k=-4&A,A=0;A=f[n>>2]+(f[n-8>>2]+(f[n-16>>2]+(f[n-24>>2]+A|0)|0)|0)|0,n=n+32|0,(0|k)!=(0|(b=b+4|0)););if(a)for(n=4+((b<<3)+t|0)|0;A=f[n>>2]+A|0,n=n+8|0,a=a-1|0;);if(!f[e+12>>2])break i;if(A>>>0>15)break A;if(f[t+4>>2])break A;break e}if(A=0,!f[e+12>>2])break e}A=((0|A)>0?A:0)<<1}if((0|A)>=0){if(!A)break e;if(n=V(A))break r;r=1}else r=0;Ze(r,1051464),$f()}A=0,n=1}f[i+8>>2]=0,f[i+4>>2]=n,f[i>>2]=A,Qr(i,1051440,e)&&(ge(1051496,86,i+15|0,1051480,1051584),$f()),e=f[i+4>>2],f[r>>2]=f[i>>2],f[r+4>>2]=e,f[r+8>>2]=f[i+8>>2],S=i+16|0}function Or(r,e){var i=0,A=0,n=0,a=0,t=0,b=0;return-65587-(r=r>>>0<=16?16:r)>>>0<=e>>>0||(i=V(12+((n=e>>>0<11?16:e+11&-8)+r|0)|0))&&(e=i-8|0,(A=r-1|0)&i?(b=r,A=(-8&(t=f[(a=i-4|0)>>2]))-(i=(r=((r=(i+A&0-r)-8|0)-e>>>0<=16?b:0)+r|0)-e|0)|0,3&t?(f[r+4>>2]=A|1&f[r+4>>2]|2,f[(A=r+A|0)+4>>2]=1|f[A+4>>2],f[a>>2]=i|1&f[a>>2]|2,f[(A=e+i|0)+4>>2]=1|f[A+4>>2],vr(e,i)):(e=f[e>>2],f[r+4>>2]=A,f[r>>2]=e+i)):r=e,3&(e=f[r+4>>2])&&((i=-8&e)>>>0<=n+16>>>0||(f[r+4>>2]=n|1&e|2,e=r+n|0,n=i-n|0,f[e+4>>2]=3|n,f[(i=r+i|0)+4>>2]=1|f[i+4>>2],vr(e,n))),A=r+8|0),A}function Zr(r,e){var i,A=0,a=0,t=0,b=0,k=0;S=i=S-32|0;r:{e:{i:{A:{f:if(e)for(a=f[r>>2],A=f[r+4>>2];;){if(!(7&a)){if(e>>>0>=8){for(;;){if(7&a)break i;if(Vr(i+16|0,r,(7&A)<<29|a>>>3),!n[i+16|0])break e;if(t=n[i+17|0],A=f[r+4>>2],A=(a=f[r>>2]+8|0)>>>0<8?A+1|0:A,f[r>>2]=a,f[r+4>>2]=A,b=b<<8|t,!((e=e-8|0)>>>0>7))break}if(!e)break f}for(;;){if(Vr(i+8|0,r,(7&A)<<29|a>>>3),!n[i+8|0])break r;if(k=n[i+9|0],A=f[r+4>>2],A=(a=(t=f[r>>2])+1|0)?A:A+1|0,f[r>>2]=a,f[r+4>>2]=A,b=k>>>(7&~t)&1|b<<1,!(e=e-1|0))break}break f}if(Vr(i+24|0,r,(7&A)<<29|a>>>3),!n[i+24|0])break A;if(k=n[i+25|0],A=f[r+4>>2],A=(a=(t=f[r>>2])+1|0)?A:A+1|0,f[r>>2]=a,f[r+4>>2]=A,b=k>>>(7&~t)&1|b<<1,!(e=e-1|0))break}return S=i+32|0,b}Ve(1055784),$f()}Ye(1055816,40,1055856),$f()}Ve(1055800),$f()}Ve(1055784),$f()}function Lr(r,e){var i,A=0,n=0,a=0,t=0,b=0;S=i=S-80|0;r:{if(1&(A=f[e+12>>2])){t=(n=A>>>5|0)+(a=f[e+4>>2])|0,f[i+28>>2]=t,A=f[e>>2]-n|0,f[i+24>>2]=A,b=(e=f[e+8>>2])+n|0,f[i+20>>2]=b;e:{i:{if((0|e)!=(0|a)){if(e=V(12))break i;$f()}if(se(i+8|0,i+20|0),!(t=f[i+12>>2])){t=0,A=1,e=0,a=1051612;break e}if(1&(A=f[i+8>>2])){e=A,a=1051916;break e}e=1|A,a=1051896;break e}f[e+8>>2]=1,f[e+4>>2]=b,f[e>>2]=A,a=1052028}if(f[i+32>>2]=n,n>>>0>t>>>0)break r;f[r+12>>2]=e,f[r>>2]=a,f[r+8>>2]=t-n,f[r+4>>2]=A+n}else f[r+12>>2]=A,f[r>>2]=1058540,A=f[e+4>>2],f[r+4>>2]=f[e>>2],f[r+8>>2]=A;return void(S=i+80|0)}f[i+60>>2]=t,f[i+40>>2]=2,f[i+36>>2]=1058600,f[i+48>>2]=2,f[i+52>>2]=0,f[i+72>>2]=i+60,f[i+76>>2]=3,f[i+64>>2]=i+32,f[i+68>>2]=3,f[i+44>>2]=i- -64,Me(i+36|0,1058616),$f()}function Ur(r,e){var i=0,A=0,n=0,a=0,t=0,b=0;r:{e:{i:{if(e>>>0>=256){A=f[r+24>>2];A:{f:{if((0|(e=f[r+12>>2]))==(0|r)){if(e=f[r+20>>2],i=f[(e?20:16)+r>>2])break f;e=0;break A}i=f[r+8>>2],f[i+12>>2]=e,f[e+8>>2]=i;break A}for(n=e?r+20|0:r+16|0;a=n,n=(i=f[(e=i)+20>>2])?e+20|0:e+16|0,i=f[(i?20:16)+e>>2];);f[a>>2]=0}if(!A)break e;A:{if(i=f[r+28>>2],f[(n=1059504+(i<<2)|0)>>2]!=(0|r)){if(f[A+16>>2]==(0|r))break A;if(f[A+20>>2]=e,e)break i;break e}if(f[n>>2]=e,!e)break r;break i}if(f[A+16>>2]=e,e)break i;break e}return(0|(i=f[r+12>>2]))!=(0|(r=f[r+8>>2]))?(f[r+12>>2]=i,void(f[i+8>>2]=r)):(t=1059912,b=f[264978]&Ai(e>>>3|0),void(f[t>>2]=b))}if(f[e+24>>2]=A,(i=f[r+16>>2])&&(f[e+16>>2]=i,f[i+24>>2]=e),r=f[r+20>>2])return f[e+20>>2]=r,void(f[r+24>>2]=e)}return}t=1059916,b=f[264979]&Ai(i),f[t>>2]=b}function Vr(r,e,A){var a,b=0,k=0,u=0,o=0,c=0,s=0,l=0;if(!((a=f[e+12>>2])>>>0<=A>>>0)){if((b=f[e+16>>2])>>>0>=A>>>0)u=f[e+28>>2],k=a;else{r:{e:{if(a>>>0>=(b=((u=f[e+28>>2])>>>0>=(k=u-2|0)>>>0?k:0)+b|0)>>>0){if((0|b)!=(0|a))break e;k=a;break r}xe(b,a,1055768),$f()}for(c=e+20|0,s=f[e+8>>2];;){k=o,o=0;e:{i:switch(n[b+s|0]){case 0:o=k+1|0;break e;case 3:break i;default:break e}(0|k)<2||(f[c>>2]==(0|u)&&he(c),k=u+1|0,f[e+28>>2]=k,f[f[e+24>>2]+(u<<2)>>2]=b,u=k)}if((0|a)==(0|(b=b+1|0)))break}k=f[e+12>>2]}f[e+16>>2]=a-u}r:if(u)for(b=f[e+24>>2],o=u<<2;;){if(t[b>>2]>A>>>0)break r;if(A=A+1|0,b=b+4|0,!(o=o-4|0))break}A>>>0>=k>>>0||(b=n[f[e+8>>2]+A|0],l=1)}i[r+1|0]=b,i[0|r]=l}function Xr(r,e,i){var a=0,t=0,b=0,k=0,u=0,o=0,c=0,s=0,l=0;r:{e:{if((t=(a=f[i+8>>2])+e|0)>>>0<=(b=f[i+4>>2])<<3>>>0){if(k=t>>>3|0,c=f[i>>2],!b){i=0;break r}if(u=n[0|c]&255>>>(7&a),(o=8-a|0)>>>0>e>>>0){i=0;break e}if(i=u<<(15&(e=e-o|0)),t>>>0<8)break r;for(s=c+1|0,a=b-1|0,t=k;;){if(!a|!e)break r;if(o=8,u=n[0|s],e>>>0<8){a=0;break e}if(s=s+1|0,a=a-1|0,i=(u<<(15&(e=e-8|0)))+i|0,!(t=t-1|0))break}break r}return f[r+4>>2]=e,void(f[r>>2]=0)}l=e+a|0,i=(u>>>(o-e&15)|0)+i|0}if(b>>>0>=k>>>0)return A[r+16>>1]=i,f[r+12>>2]=l,f[r>>2]=3,f[r+8>>2]=b-k,void(f[r+4>>2]=k+c);xe(k,b,1053076),$f()}function Jr(r,e){var A=0,a=0,t=0,b=0,k=0,u=0,o=0,c=0,s=0,l=0,h=0;r:{e:{if((a=(A=f[e+8>>2])+1|0)>>>0<=(t=f[e+4>>2])<<3>>>0){if(b=a>>>3|0,o=f[e>>2],t){if(u=n[0|o]&255>>>(7&A),c=1,(s=8-A|0)>>>0>1)break e;if(k=u<<(e=A-7|0),a>>>0<8)break r;for(l=o+1|0,A=t-1|0,c=7&e,a=b;;){if(!A|!e)break r;if(u=n[0|l],s=8,e>>>0<8){A=0;break e}if(l=l+1|0,A=A-1|0,k=(u<<(e=e-8|0))+k|0,!(a=a-1|0))break}}break r}return f[r>>2]=0,void(f[r+4>>2]=1)}h=A+c|0,k=(u>>>s-c|0)+k|0}if(t>>>0>=b>>>0)return f[r+12>>2]=h,f[r>>2]=3,i[r+16|0]=!!(0|k),f[r+8>>2]=t-b,void(f[r+4>>2]=b+o);xe(b,t,1053076),$f()}function xr(r,e){var i=0,A=0,n=0,a=0,t=0,b=0,u=0,o=0;r:{e:{if(e)for(;;){if(o=k(u,88)+r|0,A=f[(n=o+76|0)>>2],i=f[o+80>>2]){a=0;i:{if(1!=(0|i)){for(t=1&i,b=-2&i,i=A;fi[f[f[i>>2]+16>>2]](i+12|0,f[i+4>>2],f[i+8>>2]),fi[f[f[i+16>>2]+16>>2]](i+28|0,f[i+20>>2],f[i+24>>2]),i=i+32|0,(0|b)!=(0|(a=a+2|0)););if(!t)break i}fi[f[f[(A=(a<<4)+A|0)>>2]+16>>2]](A+12|0,f[A+4>>2],f[A+8>>2])}A=f[n>>2]}if(n=f[o+72>>2]){if((t=-8&(i=f[A-4>>2]))>>>0<(((b=3&i)?4:8)|(i=n<<4))>>>0)break e;if(i+39>>>0>>0&&b)break r;nr(A)}if((0|(u=u+1|0))==(0|e))break}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Hr(r,e){var i=0,A=0,n=0,a=0,t=0,b=0,u=0,o=0;r:{e:{if(e)for(;;){if(o=k(u,104)+r|0,A=f[(n=o+92|0)>>2],i=f[o+96>>2]){a=0;i:{if(1!=(0|i)){for(t=1&i,b=-2&i,i=A;fi[f[f[i>>2]+16>>2]](i+12|0,f[i+4>>2],f[i+8>>2]),fi[f[f[i+16>>2]+16>>2]](i+28|0,f[i+20>>2],f[i+24>>2]),i=i+32|0,(0|b)!=(0|(a=a+2|0)););if(!t)break i}fi[f[f[(A=(a<<4)+A|0)>>2]+16>>2]](A+12|0,f[A+4>>2],f[A+8>>2])}A=f[n>>2]}if(n=f[o+88>>2]){if((t=-8&(i=f[A-4>>2]))>>>0<(((b=3&i)?4:8)|(i=n<<4))>>>0)break e;if(i+39>>>0>>0&&b)break r;nr(A)}if((0|(u=u+1|0))==(0|e))break}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function jr(r,e){var i=0,A=0,n=0,a=0,t=0,b=0,u=0,o=0;r:{e:{if(e)for(;;){if(o=k(u,120)+r|0,A=f[(n=o+108|0)>>2],i=f[o+112>>2]){a=0;i:{if(1!=(0|i)){for(t=1&i,b=-2&i,i=A;fi[f[f[i>>2]+16>>2]](i+12|0,f[i+4>>2],f[i+8>>2]),fi[f[f[i+16>>2]+16>>2]](i+28|0,f[i+20>>2],f[i+24>>2]),i=i+32|0,(0|b)!=(0|(a=a+2|0)););if(!t)break i}fi[f[f[(A=(a<<4)+A|0)>>2]+16>>2]](A+12|0,f[A+4>>2],f[A+8>>2])}A=f[n>>2]}if(n=f[o+104>>2]){if((t=-8&(i=f[A-4>>2]))>>>0<(((b=3&i)?4:8)|(i=n<<4))>>>0)break e;if(i+39>>>0>>0&&b)break r;nr(A)}if((0|(u=u+1|0))==(0|e))break}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function zr(r,e,i,A){var n,a;S=n=S+-64|0,a=f[e+8>>2],f[n+12>>2]=a,f[n+16>>2]=i,f[n+20>>2]=A;r:{if(i>>>0<=A>>>0){if(A>>>0>a>>>0)break r;return(0|i)==(0|A)?(f[r+12>>2]=0,f[r+4>>2]=1,f[r+8>>2]=0,f[r>>2]=1057440):(fi[f[f[e>>2]>>2]](n+24|0,e+12|0,f[e+4>>2],a),f[(e=n+32|0)>>2]=f[n+20>>2]-i,f[n+28>>2]=f[n+28>>2]+i,i=f[n+28>>2],f[r>>2]=f[n+24>>2],f[r+4>>2]=i,i=f[e+4>>2],f[(r=r+8|0)>>2]=f[e>>2],f[r+4>>2]=i),void(S=n- -64|0)}f[n+28>>2]=2,f[n+24>>2]=1057504,f[n+36>>2]=2,f[n+40>>2]=0,f[n+56>>2]=n+20,f[n+60>>2]=3,f[n+48>>2]=n+16,f[n+52>>2]=3,f[n+32>>2]=n+48,Me(n+24|0,1057520),$f()}f[n+28>>2]=2,f[n+24>>2]=1057564,f[n+36>>2]=2,f[n+40>>2]=0,f[n+56>>2]=n+12,f[n+60>>2]=3,f[n+48>>2]=n+20,f[n+52>>2]=3,f[n+32>>2]=n+48,Me(n+24|0,1057580),$f()}function Pr(r,e,i,A){var a,t=0,b=0,k=0,u=0,o=0;S=a=S-16|0,u=!e;r:{e:{for(;;){if(t=e,u)break e;if(r=(k=r)+t|0,e=0,u=1,t){i:{A:{f:{for(;;){if(255==n[e+k|0])break f;if((0|t)==(0|(e=e+1|0)))break}e=0;break A}if(b=e+1|0,e>>>0>=t>>>0)break i;r=b+k|0,e=t-b|0,u=(0|t)==(0|b),t=b}if(k=(o=1&A)+k|0,b=f[i+4>>2],(A=f[i+8>>2]-b|0)>>>0<(t=t-o|0)>>>0&&(or(i,t),b=f[i+4>>2],A=f[i+8>>2]-b|0),ze(f[i>>2]+b|0,k,t),A>>>0>>0)break r;if(f[i+4>>2]=t+b,A=0,!t)continue;A=255==n[(t+k|0)-1|0];continue}break}}Je(b,t,1057200),$f()}return S=a+16|0,1&A}f[a+12>>2]=A,f[a+8>>2]=t,pe(a+8|0),$f()}function Kr(r,e,A){var a=0,t=0,b=0,u=0,o=0,c=0,s=0;if(a=10,(t=e)>>>0>=1e3)for(b=t;u=A+a|0,s=(c=((65535&(o=b-k(t=(b>>>0)/1e4|0,1e4)|0))>>>0)/100|0)<<1,i[u-3|0]=n[s+1052265|0],i[u-4|0]=n[s+1052264|0],o=(o-k(c,100)&65535)<<1,i[u-1|0]=n[o+1052265|0],i[u-2|0]=n[o+1052264|0],a=a-4|0,u=b>>>0>9999999,b=t,u;);t>>>0<=9?b=t:(t=(t-k(b=((65535&t)>>>0)/100|0,100)&65535)<<1,i[(A+a|0)-1|0]=n[t+1052265|0],i[(a=a-2|0)+A|0]=n[t+1052264|0]),!b&&e||(i[(a=a-1|0)+A|0]=n[1052265+(b<<1&30)|0]),f[r+4>>2]=10-a,f[r>>2]=A+a}function qr(r,e,i){var A,n=0,a=0,t=0;S=A=S-48|0,f[A>>2]=i;r:{e:{if((0|(n=f[e+8>>2]))!=(0|i)){if(i)break e;f[r+8>>2]=0,f[r+12>>2]=0,f[r>>2]=1051612,f[r+4>>2]=f[e+4>>2];break r}n=f[e>>2],a=f[e+4>>2],f[e>>2]=1051612,f[r>>2]=n,f[r+4>>2]=a,a=f[(n=e+8|0)>>2],t=f[n+4>>2],f[n>>2]=0,f[n+4>>2]=0,f[(r=r+8|0)>>2]=a,f[r+4>>2]=t,f[e+4>>2]=f[e+4>>2]+i;break r}i>>>0<=n>>>0?(fi[f[f[e>>2]>>2]](A+4|0,e+12|0,f[e+4>>2],n),f[(n=A+12|0)>>2]=i,a=f[A+8>>2],f[r>>2]=f[A+4>>2],f[r+4>>2]=a,f[e+8>>2]=f[e+8>>2]-i,f[e+4>>2]=f[e+4>>2]+i,e=f[n+4>>2],f[(r=r+8|0)>>2]=f[n>>2],f[r+4>>2]=e):(f[A+28>>2]=n,f[A+8>>2]=2,f[A+4>>2]=1051848,f[A+16>>2]=2,f[A+20>>2]=0,f[A+40>>2]=A+28,f[A+44>>2]=3,f[A+32>>2]=A,f[A+36>>2]=3,f[A+12>>2]=A+32,Me(A+4|0,1051864),$f())}S=A+48|0}function $r(r,e){var i=0,A=0,n=0,a=0;if(i=31,f[r+16>>2]=0,f[r+20>>2]=0,e>>>0<=16777215&&(i=62+((e>>>6-(A=o(e>>>8|0))&1)-(A<<1)|0)|0),f[r+28>>2]=i,n=1059504+(i<<2)|0,!((A=1<>2]=r,f[r+24>>2]=n,f[r+12>>2]=r,f[r+8>>2]=r,void(f[264979]=A|f[264979]);r:{if(A=f[n>>2],(-8&f[A+4>>2])!=(0|e))for(a=e<<(31!=(0|i)?25-(i>>>1|0)|0:0);;){if(!(i=f[(n=(a>>>29&4)+A|0)+16>>2]))break r;if(a<<=1,A=i,(-8&f[i+4>>2])==(0|e))break}else i=A;return e=f[i+8>>2],f[e+12>>2]=r,f[i+8>>2]=r,f[r+24>>2]=0,f[r+12>>2]=i,void(f[r+8>>2]=e)}f[n+16>>2]=r,f[r+24>>2]=A,f[r+12>>2]=r,f[r+8>>2]=r}function re(r,e){e|=0;var A,n=0,a=0;n=A=f[(r|=0)+8>>2],a=1,e>>>0<128||(a=2,e>>>0<2048||(a=e>>>0<65536?3:4)),a>>>0>f[r>>2]-A>>>0&&(ue(r,A,a),n=f[r+8>>2]),n=f[r+4>>2]+n|0;r:{e:{if(e>>>0>=128){if(e>>>0<2048)break e;if(e>>>0>=65536){i[n+3|0]=63&e|128,i[0|n]=e>>>18|240,i[n+2|0]=e>>>6&63|128,i[n+1|0]=e>>>12&63|128;break r}i[n+2|0]=63&e|128,i[0|n]=e>>>12|224,i[n+1|0]=e>>>6&63|128;break r}i[0|n]=e;break r}i[n+1|0]=63&e|128,i[0|n]=e>>>6|192}return f[r+8>>2]=A+a,0}function ee(r,e,i){var A,a=0,t=0,b=0,k=0;S=A=S-16|0,a=(t=i>>>0<5)?5-i|0:5;r:{e:{i:{A:{if(!t){if(i>>>0>>0)break r;f:switch(0|a){case 0:Ne(0,0,1054520),$f();case 1:Ne(1,1,1054536),$f();default:break f}if(a>>>0<=2)break i;if(3==(0|a))break e;if(a>>>0>4){f[r+12>>2]=i-a,f[r+8>>2]=e+a,t=i=(a=14&n[0|e])>>>3|0,b=a<<=29,i=(a=n[e+1|0])>>>10|0,a=b|a<<22,t|=i,k=n[e+4|0]>>>1|0,b=a,i=(a=254&n[e+2|0])>>>18|0,b|=a<<14,a=(e=n[e+3|0])>>>25|0,f[r+16>>2]=k|b|e<<7,f[r+20>>2]=a|i|t,e=0;break A}Ne(4,4,1054584),$f()}f[r+16>>2]=f[A+8>>2],f[r+12>>2]=e,f[r+8>>2]=a,f[r+4>>2]=0,e=1}return f[r>>2]=e,void(S=A+16|0)}Ne(2,2,1054552),$f()}Ne(3,3,1054568),$f()}xe(a,i,1053076),$f()}function ie(r,e,A,a,t){var b,k=0,u=0,o=0;S=b=S-32|0,k=f[264991],f[264991]=k+1;r:{e:{i:{if((0|k)>=0){if(!n[1059500]){if(i[1059500]=1,f[264874]=f[264874]+1,(0|(k=f[264989]))<0)break r;if(f[264989]=k+1,!f[264990])break i;fi[f[e+20>>2]](b+8|0,r),i[b+29|0]=t,i[b+28|0]=a,f[b+24>>2]=A,r=f[b+12>>2],f[b+16>>2]=f[b+8>>2],f[b+20>>2]=r,S=t=S-80|0,f[t+20>>2]=0,f[t+12>>2]=0,f[t+16>>2]=1,ue(k=t+12|0,0,12),e=n[1053252]|n[1053253]<<8|n[1053254]<<16|n[1053255]<<24,r=(u=f[t+20>>2])+f[t+16>>2]|0,A=n[1053248]|n[1053249]<<8|n[1053250]<<16|n[1053251]<<24,i[0|r]=A,i[r+1|0]=A>>>8,i[r+2|0]=A>>>16,i[r+3|0]=A>>>24,i[r+4|0]=e,i[r+5|0]=e>>>8,i[r+6|0]=e>>>16,i[r+7|0]=e>>>24,r=r+8|0,e=n[1053256]|n[1053257]<<8|n[1053258]<<16|n[1053259]<<24,i[0|r]=e,i[r+1|0]=e>>>8,i[r+2|0]=e>>>16,i[r+3|0]=e>>>24,f[t+20>>2]=u+12,r=f[(A=b+16|0)+8>>2],f[t+48>>2]=f[r>>2],f[t+52>>2]=f[r+4>>2]-1,f[t+28>>2]=3,f[t+24>>2]=1053224,f[t+36>>2]=3,f[t+40>>2]=0,f[t+72>>2]=r+12,f[t+76>>2]=1,f[t+64>>2]=r+8,f[t+68>>2]=1,f[t+56>>2]=t+48,f[t+60>>2]=2,r=t+56|0,f[t+32>>2]=r;A:{f:{n:{a:{if(!Qr(k,1052212,t+24|0)){e=f[A>>2],k=f[f[A+4>>2]+12>>2],fi[0|k](r,e);t:{if(!(1470513528==f[t+56>>2]&-1182065807==f[t+60>>2]&&(A=4,r=e,-691315347==f[t+64>>2]&1676365868==f[t+68>>2]))){if(fi[0|k](t+56|0,e),-2078298696!=f[t+56>>2]|662475520!=f[t+60>>2])break t;if(2086828853!=f[t+64>>2]|-1795647643!=f[t+68>>2])break t;A=8,r=e+4|0}A=f[e+A>>2],r=f[r>>2],e=f[t+20>>2],f[t+12>>2]-e>>>0<=1&&(ue(t+12|0,e,2),e=f[t+20>>2]),k=f[t+16>>2]+e|0,i[0|k]=58,i[k+1|0]=10,e=e+2|0,f[t+20>>2]=e,A>>>0>f[t+12>>2]-e>>>0&&(ue(t+12|0,e,A),e=f[t+20>>2]),ze(f[t+16>>2]+e|0,r,A),f[t+20>>2]=e+A}if(r=f[t+20>>2],f[t- -64>>2]=r,e=f[t+16>>2],A=f[t+12>>2],f[t+56>>2]=A,f[t+60>>2]=e,A-r>>>0<=9&&(ue(t+56|0,r,10),A=f[t+56>>2],r=f[t+64>>2]),u=n[1052256]|n[1052257]<<8|n[1052258]<<16|n[1052259]<<24,k=(e=f[t+60>>2])+r|0,o=n[1052252]|n[1052253]<<8|n[1052254]<<16|n[1052255]<<24,i[0|k]=o,i[k+1|0]=o>>>8,i[k+2|0]=o>>>16,i[k+3|0]=o>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,k=k+8|0,u=n[1052260]|n[1052261]<<8,i[0|k]=u,i[k+1|0]=u>>>8,r=r+10|0,f[t+64>>2]=r,o=0|Y(),W(t+24|0,0|o),u=f[t+24>>2],(k=f[t+28>>2])>>>0>A-r>>>0&&(ue(t+56|0,r,k),A=f[t+56>>2],e=f[t+60>>2],r=f[t+64>>2]),ze(r+e|0,u,k),r=r+k|0,f[t+64>>2]=r,A-r>>>0<=1&&(ue(t+56|0,r,2),e=f[t+60>>2],r=f[t+64>>2]),i[0|(A=r+e|0)]=10,i[A+1|0]=10,r=r+2|0,f[t+64>>2]=r,(A=f[t+56>>2])>>>0>r>>>0&&!(e=kr(e,A,1,r)))break a;if(D(0|e,0|r),k){if((r=-8&(e=f[u-4>>2]))>>>0>>0)break n;if(r>>>0>k+39>>>0&&e)break f;nr(u)}o>>>0>=132&&N(0|o),S=t+80|0;break A}ge(1053512,55,t+56|0,1052236,1053568)}$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}break e}fi[f[e+24>>2]](b,r);break r}break r}f[b+16>>2]=-2147483648,Be(b+16|0)}f[264989]=f[264989]-1,i[1059500]=0,a&&$f()}f[b+16>>2]=-2147483648,Be(b+16|0),$f()}function Ae(r,e,i,A,n){var a,t=0,b=0;S=a=S-32|0;r:{if((i=e+i|0)>>>0>>0)e=0;else if(i=qe((A+n|0)-1&0-A,0,t=(i=i>>>0>(t=(b=f[r>>2])<<1)>>>0?i:t)>>>0>(t=1==(0|n)?8:4)>>>0?i:t,0),!((e=0)|M||-2147483648-A>>>0>>0)){if(b?(f[a+28>>2]=k(n,b),f[a+20>>2]=f[r+4>>2],e=A):e=0,f[a+24>>2]=e,Ce(a+8|0,A,i,a+20|0),1!=f[a+8>>2])break r;e=f[a+12>>2]}Ze(e,1057184),$f()}e=f[a+12>>2],f[r>>2]=t,f[r+4>>2]=e,S=a+32|0}function fe(r,e){var i,A=0,n=0,a=0;S=i=S-4096|0;r:{e:{if((a=(n=e-(e>>>1|0)|0)>>>0<(A=e>>>0>=1e6?1e6:e)>>>0?A:n)>>>0>=513){i:{if((A=n>>>0>536870911)|(n=a<<3)>>>0>2147483640)r=0;else{if(A=V(n))break i;r=8}Ze(r,1057124),$f()}if(rr(r,e,A,a,e>>>0<65),(r=-8&(e=f[A-4>>2]))>>>0>>0)break e;if(r>>>0>n+39>>>0&&e)break r;nr(A)}else rr(r,e,i,512,e>>>0<65);return void(S=i+4096|0)}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function ne(r,e,i,A,n,a){var t=0;r:{e:{i:{if(t=V(12)){if(f[t+8>>2]=2,f[t>>2]=A,f[t+4>>2]=(n-A|0)+a,A=(0|(A=i))==(0|(i=f[e>>2])),f[e>>2]=A?t:i,!A){if(e=f[i+8>>2],f[i+8>>2]=e+1,(0|e)<0)break i;if(f[r+12>>2]=i,f[r+8>>2]=a,f[r+4>>2]=n,f[r>>2]=1052028,(r=-8&(e=f[t-4>>2]))>>>0<((e&=3)?16:20)>>>0)break e;if(r>>>0>=52&&e)break r;return void nr(t)}return f[r+12>>2]=t,f[r+8>>2]=a,f[r+4>>2]=n,void(f[r>>2]=1052028)}$f()}Xe(),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function ae(r,e,i,A){var n=0,a=0,t=0,b=0,u=0,o=0,c=0,s=0;A>>>0>=8&&(r=ae(r,(a=k(A=A>>>3|0,480))+r|0,(n=k(A,840))+r|0,A),e=ae(e,e+a|0,e+n|0,A),i=ae(i,i+a|0,i+n|0,A));r:{e:{if(f[r+48>>2]){if(!(1&f[e+48>>2]))break e;if(!(1&f[i+48>>2]))break r;return r=f[(n=(A=r)+56|0)>>2],a=e,e=f[(t=e+56|0)>>2],u=f[(b=i+56|0)>>2],o=A,c=i,s=a,A=(0|(n=f[n+4>>2]))<(0|(t=f[t+4>>2]))?1:r>>>0>>0&(0|n)<=(0|t),i=e,e=u,i=(0|(a=f[b+4>>2]))>(0|t)?1:e>>>0>i>>>0&(0|a)>=(0|t),(r>>>0>>0&(0|a)>=(0|n)|(0|a)>(0|n))^A?o:A^i?c:s}Ve(1058820),$f()}Ve(1058820),$f()}Ve(1058820),$f()}function te(r,e){var i,A,n=0,a=0;S=i=S-32|0,a=qe(A=(a=(n=f[r>>2])<<1)>>>0<=4?4:a,0,88,0),0|M&&(Ze(0,e),$f());r:{if(a>>>0<=2147483640){if(n?(f[i+28>>2]=k(n,88),f[i+20>>2]=f[r+4>>2],n=8):n=0,f[i+24>>2]=n,Ce(i+8|0,8,a,i+20|0),1!=f[i+8>>2])break r;r=f[i+12>>2]}else r=0;Ze(r,e),$f()}e=f[i+12>>2],f[r>>2]=A,f[r+4>>2]=e,S=i+32|0}function be(r,e){var i,A,n=0,a=0;S=i=S-32|0,a=qe(A=(a=(n=f[r>>2])<<1)>>>0<=4?4:a,0,104,0),0|M&&(Ze(0,e),$f());r:{if(a>>>0<=2147483640){if(n?(f[i+28>>2]=k(n,104),f[i+20>>2]=f[r+4>>2],n=8):n=0,f[i+24>>2]=n,Ce(i+8|0,8,a,i+20|0),1!=f[i+8>>2])break r;r=f[i+12>>2]}else r=0;Ze(r,e),$f()}e=f[i+12>>2],f[r>>2]=A,f[r+4>>2]=e,S=i+32|0}function ke(r,e){var i,A,n=0,a=0;S=i=S-32|0,a=qe(A=(a=(n=f[r>>2])<<1)>>>0<=4?4:a,0,72,0),0|M&&(Ze(0,e),$f());r:{if(a>>>0<=2147483640){if(n?(f[i+28>>2]=k(n,72),f[i+20>>2]=f[r+4>>2],n=8):n=0,f[i+24>>2]=n,Ce(i+8|0,8,a,i+20|0),1!=f[i+8>>2])break r;r=f[i+12>>2]}else r=0;Ze(r,e),$f()}e=f[i+12>>2],f[r>>2]=A,f[r+4>>2]=e,S=i+32|0}function ue(r,e,i){var A,n=0,a=0;S=A=S-32|0;r:{if(n=0,!((a=e)>>>0>(e=e+i|0)>>>0||(n=0,(0|(e=(e=e>>>0>(a=(i=f[r>>2])<<1)>>>0?e:a)>>>0<=8?8:e))<0))){if(i?(f[A+28>>2]=i,f[A+20>>2]=f[r+4>>2],i=1):i=0,f[A+24>>2]=i,me(A+8|0,e,A+20|0),1!=f[A+8>>2])break r;n=f[A+12>>2]}Ze(n,1057184),$f()}i=f[A+12>>2],f[r>>2]=e,f[r+4>>2]=i,S=A+32|0}function oe(r){var e,i,A,n=0,a=0;S=e=S-32|0,n=qe(A=(n=(i=f[r>>2])<<1)>>>0<=4?4:n,0,120,0);r:{if(!(0|M||n>>>0>2147483640)){if(i?(f[e+28>>2]=k(i,120),f[e+20>>2]=f[r+4>>2],a=8):a=0,f[e+24>>2]=a,Ce(e+8|0,8,n,e+20|0),1!=f[e+8>>2])break r;a=f[e+12>>2]}Ze(a,1055872),$f()}n=f[e+12>>2],f[r>>2]=A,f[r+4>>2]=n,S=e+32|0}function ce(r,e){var i,A=0,n=0,a=0;S=i=S-32|0,(A=f[r>>2])>>>0>134217727&&(Ze(0,e),$f());r:{if((n=(a=(n=A<<1)>>>0<=4?4:n)<<4)>>>0<=2147483644){if(A?(f[i+28>>2]=A<<4,f[i+20>>2]=f[r+4>>2],A=4):A=0,f[i+24>>2]=A,Ce(i+8|0,4,n,i+20|0),1!=f[i+8>>2])break r;r=f[i+12>>2]}else r=0;Ze(r,e),$f()}e=f[i+12>>2],f[r>>2]=a,f[r+4>>2]=e,S=i+32|0}function se(r,e){var i,A=0,n=0,a=0,t=0;if((i=f[e+8>>2])>>>0>=(A=f[e>>2])>>>0)A=f[e+4>>2];else{a=f[e+4>>2];r:{e:{i:{if(!i){if((t=-8&(n=f[a-4>>2]))>>>0>>0)break i;if(A+39>>>0>>0&&n)break e;nr(a),A=1;break r}if(A=kr(a,A,1,i))break r;Ze(1,1051880),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}f[e>>2]=i,f[e+4>>2]=A}f[r+4>>2]=i,f[r>>2]=A}function le(r,e,i){var a=0,t=0;t=2;r:{e:{if(536870911&i&&536870911&(a=i-1|0)){if(t=1,1==(0|i))break e;if(536870911&(a=i-2|0)&&(t=2,536870910&a)){if(2==(0|i)|3==(0|i))break r;return t=n[e+2|0],f[r>>2]=3,f[r+8>>2]=i-4,f[r+4>>2]=e+4,void(A[r+12>>1]=n[e+3|0]|(15&t)<<8)}}return f[r+4>>2]=t,void(f[r>>2]=0)}xe(1,a,1053076),$f()}xe(2,a,1053076),$f()}function he(r){var e,i=0,A=0,n=0,a=0;S=e=S-32|0;r:{if(!((n=f[r>>2])>>>0>536870911||(A=(a=(A=n<<1)>>>0<=4?4:A)<<2)>>>0>2147483644)){if(n?(f[e+28>>2]=n<<2,f[e+20>>2]=f[r+4>>2],i=4):i=0,f[e+24>>2]=i,Ce(e+8|0,4,A,e+20|0),1!=f[e+8>>2])break r;i=f[e+12>>2]}Ze(i,1055752),$f()}i=f[e+12>>2],f[r>>2]=a,f[r+4>>2]=i,S=e+32|0}function ve(r,e,i){var A=0,a=0,t=0,b=0,k=0;r:if(f[r+84>>2]==(0|i)){if(t=e+i|0,i=f[r+80>>2])for(b=(A=f[r+76>>2])+(i<<4)|0,r=e;;){if(a=f[A+8>>2]){for(i=f[A+4>>2],e=r+a|0;;){if((0|r)==(0|t))break r;if(n[0|i]!=n[0|r])break r;if(r=r+1|0,i=i+1|0,!(a=a-1|0))break}r=e}if((0|b)==(0|(A=A+16|0)))break}k=(0|e)==(0|t)}return k}function de(r,e){var i,A=0,n=0;S=i=S-32|0,(0|(n=(n=(A=f[r>>2])<<1)>>>0<=8?8:n))<0&&(Ze(0,e),$f()),A?(f[i+28>>2]=A,f[i+20>>2]=f[r+4>>2],A=1):A=0,f[i+24>>2]=A,me(i+8|0,n,i+20|0),1==f[i+8>>2]&&(Ze(f[i+12>>2],e),$f()),e=f[i+12>>2],f[r>>2]=n,f[r+4>>2]=e,S=i+32|0}function we(r,e,i,A){var n,a,t,b=0,u=0,o=0;return A>>>0>=8&&(r=we(r,(b=(A=A>>>3|0)<<5)+r|0,(u=k(A,56))+r|0,A),e=we(e,e+b|0,e+u|0,A),i=we(i,i+b|0,i+u|0,A)),r=f[(A=r)>>2],b=e,e=f[e>>2],n=A,a=i,t=b,o=(0|(u=f[A+4>>2]))<(0|(A=f[b+4>>2]))?1:r>>>0>>0&(0|A)>=(0|u),b=e,e=f[i>>2],A=(0|(i=f[i+4>>2]))>(0|A)?1:e>>>0>b>>>0&(0|i)>=(0|A),(r>>>0>>0&(0|i)>=(0|u)|(0|i)>(0|u))^o?n:o^A?a:t}function ge(r,e,i,A,n){var a;S=a=S+-64|0,f[a+12>>2]=e,f[a+8>>2]=r,f[a+20>>2]=A,f[a+16>>2]=i,f[a+28>>2]=2,f[a+24>>2]=1053060,f[a+36>>2]=2,f[a+40>>2]=0,f[a+56>>2]=a+16,f[a+60>>2]=9,f[a+48>>2]=a+8,f[a+52>>2]=2,f[a+32>>2]=a+48,Me(a+24|0,n),$f()}function ye(r,e,i,A){var n;e=e-((n=e>>>0>A>>>0)?A:0)|0;r:{if(n)f[r+4>>2]=0,A=1,i=8;else{if(e>>>0>A>>>0)break r;f[r+12>>2]=i,f[r+8>>2]=A-e,f[r+4>>2]=e+i,A=0,i=16}return f[i+r>>2]=e,void(f[r>>2]=A)}xe(e,A,1053076),$f()}function Be(r){var e=0,i=0,A=0;r:{e:{if(!(-2147483648==(0|(i=f[(r|=0)>>2]))|!i)){if(r=f[r+4>>2],(A=-8&(e=f[r-4>>2]))>>>0<((e&=3)?4:8)+i>>>0)break e;if(i+39>>>0>>0&&e)break r;nr(r)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Ee(r){var e=0,i=0,A=0;r:{e:{if(i=f[(r|=0)>>2]){if(r=f[r+4>>2],(A=-8&(e=f[r-4>>2]))>>>0<((e&=3)?4:8)+i>>>0)break e;if(i+39>>>0>>0&&e)break r;nr(r)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function _e(r,e){var i=0,A=0;r:{e:{if(r){if((A=-8&(i=f[e-4>>2]))>>>0<(r=k(r,88))+((i&=3)?4:8)>>>0)break e;if(r+39>>>0>>0&&i)break r;nr(e)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Ie(r,e){var i=0,A=0;r:{e:{if(r){if((A=-8&(i=f[e-4>>2]))>>>0<((r<<=4)|((i&=3)?4:8))>>>0)break e;if(r+39>>>0>>0&&i)break r;nr(e)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Qe(r,e){var i=0,A=0;r:{e:{if(r){if((A=-8&(i=f[e-4>>2]))>>>0<(r=k(r,104))+((i&=3)?4:8)>>>0)break e;if(r+39>>>0>>0&&i)break r;nr(e)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Ne(r,e,i){var A;S=A=S-48|0,f[A+4>>2]=e,f[A>>2]=r,f[A+12>>2]=2,f[A+8>>2]=1052516,f[A+20>>2]=2,f[A+24>>2]=0,f[A+40>>2]=A,f[A+44>>2]=8,f[A+32>>2]=A+4,f[A+36>>2]=8,f[A+16>>2]=A+32,Me(A+8|0,i),$f()}function Re(r,e){var i=0,A=0;r:{e:{if(r){if((A=-8&(i=f[e-4>>2]))>>>0<((i&=3)?4:8)+r>>>0)break e;if(r+39>>>0>>0&&i)break r;nr(e)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Ce(r,e,i,A){var n=0;r:{e:{if(f[A+4>>2]){if(!(n=f[A+8>>2])){if(i)break e;A=e;break r}A=kr(f[A>>2],n,e,i);break r}if(!i){A=e;break r}}A=V(i)}f[r+8>>2]=i,f[r+4>>2]=A||e,f[r>>2]=!A}function pe(r){var e;S=e=S-48|0,f[e+12>>2]=2,f[e+8>>2]=1052124,f[e+20>>2]=2,f[e+24>>2]=0,f[e+40>>2]=r,f[e+44>>2]=8,f[e+32>>2]=r+4,f[e+36>>2]=8,f[e+16>>2]=e+32,Me(e+8|0,1052140),$f()}function me(r,e,i){var A=0;i=f[i+4>>2]&&(A=f[i+8>>2])?kr(f[i>>2],A,1,e):V(e),f[r+8>>2]=e,f[r+4>>2]=i||1,f[r>>2]=!i}function Ge(r,e,i){e|=0,i|=0;var A=0;return A=f[(r|=0)+8>>2],f[r>>2]-A>>>0>>0&&(ue(r,A,i),A=f[r+8>>2]),ze(f[r+4>>2]+A|0,e,i),f[r+8>>2]=i+A,0}function Ye(r,e,i){var A;S=A=S-32|0,f[A+16>>2]=0,f[A+4>>2]=1,f[A+8>>2]=4,f[A+12>>2]=0,f[A+28>>2]=e,f[A+24>>2]=r,f[A>>2]=A+24,Me(A,i),$f()}function We(r,e,i,A,n){return 1114112!=(0|i)&&0|fi[f[e+16>>2]](r,i)?1:A?0|fi[f[e+12>>2]](r,A,n):0}function De(r){var e;S=e=S-32|0,f[e+24>>2]=0,f[e+12>>2]=1,f[e+8>>2]=1057100,f[e+16>>2]=4,f[e+20>>2]=0,Me(e+8|0,r),$f()}function Se(r,e,i,A){var n=0,a=0;S=n=S-16|0,f[n+12>>2]=e,f[n+8>>2]=r,S=r=S-112|0,f[r+12>>2]=1052532,f[r+8>>2]=n+8,f[r+20>>2]=1052532,f[r+16>>2]=n+12,f[r+28>>2]=2,f[r+24>>2]=1052548,f[i>>2]?(a=f[(n=i+16|0)+4>>2],f[(e=r+48|0)>>2]=f[n>>2],f[e+4>>2]=a,a=f[(n=i+8|0)+4>>2],f[(e=r+40|0)>>2]=f[n>>2],f[e+4>>2]=a,e=f[i+4>>2],f[r+32>>2]=f[i>>2],f[r+36>>2]=e,f[r+92>>2]=4,f[r+88>>2]=1052652,f[r+100>>2]=4,f[r+104>>2]=0,f[r+80>>2]=r+16,f[r+84>>2]=9,f[r+72>>2]=r+8,f[r+76>>2]=9,f[r+64>>2]=r+32,f[r+68>>2]=11):(f[r+92>>2]=3,f[r+88>>2]=1052600,f[r+100>>2]=3,f[r+104>>2]=0,f[r+72>>2]=r+16,f[r+76>>2]=9,f[r+64>>2]=r+8,f[r+68>>2]=9),f[r+56>>2]=r+24,f[r+60>>2]=2,f[r+96>>2]=r+56,Me(r+88|0,A),$f()}function Fe(){var r;S=r=S-32|0,f[r+24>>2]=0,f[r+12>>2]=1,f[r+8>>2]=1052760,f[r+16>>2]=4,f[r+20>>2]=0,Me(r+8|0,1052768),$f()}function Te(){var r,e=0,A=0,a=0;if(S=r=S-16|0,3!=n[1059492]){i[r+15|0]=1,A=r+15|0,S=e=S-32|0;r:{e:{i:{A:{f:{n:{a:{t:switch(n[1059492]-1|0){default:if(i[1059492]=2,a=n[0|A],i[0|A]=0,!a)break A;if(f[264874]&&2147483647&f[264991])break a;if(A=f[264989],f[264989]=-1,A)break i;f[264990]=1,i[1059492]=3,f[264989]=0;break;case 0:break f;case 1:break n;case 2:break t}S=e+32|0;break r}f[e+24>>2]=0,f[e+12>>2]=1,f[e+8>>2]=1053336,f[e+16>>2]=4,f[e+20>>2]=0,Me(e+8|0,1053344),$f()}f[e+24>>2]=0,f[e+12>>2]=1,f[e+8>>2]=1048684;break e}f[e+24>>2]=0,f[e+12>>2]=1,f[e+8>>2]=1048620;break e}Ve(1051384),$f()}f[e+8>>2]=-2147483648,Be(e+8|0),$f()}f[e+16>>2]=4,f[e+20>>2]=0,Me(e+8|0,1051400),$f()}}S=r+16|0}function Me(r,e){var i=0,a=0;S=i=S-16|0,A[i+12>>1]=1,f[i+8>>2]=e,f[i+4>>2]=r,S=e=S-16|0,i=f[(r=i+4|0)>>2],a=f[r+4>>2],f[e+12>>2]=r,f[e+4>>2]=i,f[e+8>>2]=a,S=r=S-16|0,i=f[(e=e+4|0)>>2],a=f[i+12>>2];r:{e:{i:switch(f[i+4>>2]){case 0:if(a)break e;i=1,a=0;break r;case 1:break i;default:break e}if(!a){i=f[i>>2],a=f[i+4>>2],i=f[i>>2];break r}}f[r>>2]=-2147483648,f[r+12>>2]=e,i=r,r=f[e+8>>2],ie(i,1053444,f[e+4>>2],n[r+8|0],n[r+9|0]),$f()}f[r+4>>2]=a,f[r>>2]=i,i=r,r=f[e+8>>2],ie(i,1053416,f[e+4>>2],n[r+8|0],n[r+9|0]),$f()}function Oe(r){return Pf(0,0),Pf(1,(2047&r)<<20),+Kf()}function Ze(r,e){r&&$f(),De(e),$f()}function Le(r,e,i,A,n,a){var t,b,k=0,u=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0;c=(u=b=(0|n)<0)?0-e|0:e,k=u?0-(!!(0|e)+i|0)|0:i,S=u=(S=t=S-32|0)-176|0,d=(e=0!=(e|i))>>>0>(i=e+A|0)>>>0?n+1|0:n,A=0!=((e=b?0-i|0:A)|(i=b?0-(!!(0|i)+d|0)|0:n));r:{e:{i:{if(h=32==(0|(n=o(i)))?o(e)+32|0:n,n=o(k),(n=A?h:(32==(0|n)?o(c)+32|0:n)- -64|0)>>>0<(d=o(a)+96|0)>>>0){if(n>>>0>63)break i;if(d>>>0>95)break e;A:{if(!(d-n>>>0>=32)){if(je(u+48|0,c,k,e,i,A=64-n|0),je(u+32|0,a,0,0,0,A),Ue(u,a,0,0,0,l=ri(f[u+48>>2],f[u+52>>2],f[u+32>>2],f[u+36>>2]),s=M,0,0),Ue(u+16|0,0,0,0,0,l,s,0,0),d=f[u>>2],y=f[u+4>>2],n=(h=f[u+8>>2])+(v=f[u+16>>2])|0,B=(A=f[u+28>>2])+1|0,E=A,_=(A=f[u+12>>2])+f[u+20>>2]|0,h=A=(0|(v=n>>>0>>0?_+1|0:_))==(0|A)&n>>>0>>0|A>>>0>v>>>0,!((A=A+f[u+24>>2]|0)|(h=h>>>0>A>>>0?B:E)||(h=(0|k)==(0|y)&c>>>0>>0|k>>>0>>0,(A=(0|i)==(0|v))&(0|e)==(0|n)?h:A&e>>>0>>0|i>>>0>>0)))break A;E=i+1|0,h=i,A=e,e=k,A=A>>>0>(i=A+(!(k=(i=c)>>>0>(c=a+c|0)>>>0?e+1|0:e)&a>>>0>c>>>0)|0)>>>0?E:h,e=(a=i-n|0)-(h=(_=c>>>0>>0)&(0|k)==(0|y)|k>>>0>>0)|0,i=(A-((i>>>0>>0)+v|0)|0)-(a>>>0>>0)|0,l=(A=l)-1|0,s=s-!A|0,A=c-d|0,k=k-(y+_|0)|0;break r}je(u+160|0,a,0,0,0,y=96-d|0),_=!(h=f[u+160>>2]+1|0);f:{n:{for(;;){if(je(u+144|0,c,k,e,i,A=64-n|0),n=f[u+144>>2],v=f[u+148>>2],A>>>0>>0){if(je(u+80|0,a,0,0,0,A),Ue(u- -64|0,a,0,0,0,v=ri(n,v,f[u+80>>2],f[u+84>>2]),_=M,0,0),B=(0|(d=f[u+68>>2]))==(0|k)&(y=f[u+64>>2])>>>0>c>>>0|k>>>0>>0,h=A=f[u+76>>2],!((0|e)==(0|(n=f[u+72>>2]))&(0|i)==(0|A)?B:(0|A)==(0|i)&n>>>0>e>>>0|i>>>0>>0)){e=(a=(A=e)-n|0)-B|0,i=(i-((A>>>0>>0)+h|0)|0)-(a>>>0>>0)|0,s=(n=_+(A=s)|0)+1|0,a=n,s=(n=l+v|0)>>>0>>0?s:a,a=l,l=n,w=(A=(0|A)==(0|s)&a>>>0>n>>>0|A>>>0>s>>>0)>>>0>(g=A+g|0)>>>0?w+1|0:w,A=c-y|0,k=k-((c>>>0>>0)+d|0)|0;break r}B=i+1|0,E=i,c=(i=((0|(h=(a=a+c|0)>>>0>>0?k+1|0:k))==(0|k)&a>>>0>>0|k>>>0>h>>>0)+e|0)>>>0>>0?B:E,e=(k=i-n|0)-(B=(I=a>>>0>>0)&(0|d)==(0|h)|d>>>0>h>>>0)|0,i=(c-((i>>>0>>0)+A|0)|0)-(k>>>0>>0)|0,k=(n=_+(A=s)|0)+1|0,s=n,w=(A=(0|A)==(0|(s=((l=v+(n=l)|0)>>>0>>0?k:s)-!l|0))&n>>>0>(l=l-1|0)>>>0|A>>>0>s>>>0)>>>0>(g=A+g|0)>>>0?w+1|0:w,A=a-y|0,k=h-(d+I|0)|0;break r}if(He(u+128|0,n=ri(n,v,h,_),v=M,0,0,A=A-y|0),Ue(u+112|0,a,0,0,0,n,v,0,0),He(u+96|0,f[u+112>>2],f[u+116>>2],f[u+120>>2],f[u+124>>2],A),E=(A=w+f[u+140>>2]|0)+1|0,n=A,B=(n=(A=g+f[u+136>>2]|0)>>>0>>0?E:n)+1|0,E=n,s=s+(n=f[u+132>>2])|0,w=(g=A+((0|(s=(v=l)>>>0>(l=l+(w=f[u+128>>2])|0)>>>0?s+1|0:s))==(0|n)&l>>>0>>0|n>>>0>s>>>0)|0)>>>0>>0?B:E,A=0!=((e=(v=(A=e)-(n=f[u+104>>2])|0)-(Q=(I=(B=f[u+96>>2])>>>0>c>>>0)&(0|(e=E=f[u+100>>2]))==(0|k)|e>>>0>k>>>0)|0)|(i=(i-(f[u+108>>2]+(A>>>0>>0)|0)|0)-(v>>>0>>0)|0)),v=32==(0|(n=o(i)))?o(e)+32|0:n,c=c-B|0,n=o(k=k-(I+E|0)|0),!(d>>>0>(n=A?v:(32==(0|n)?o(c)+32|0:n)- -64|0)>>>0))break;if(n>>>0>63)break n}if(!((n=!k&a>>>0>c>>>0)&!(e|i)))break f;A=c;break r}e=l,A=ri(c,k,a,0),n=(i=s)+M|0,w=(e=(0|i)==(0|(s=A>>>0>(l=e+A|0)>>>0?n+1|0:n))&e>>>0>l>>>0|i>>>0>s>>>0)>>>0>(g=e+g|0)>>>0?w+1|0:w,e=0,i=0,A=ei(c,k,a),k=M;break r}e=(A=e)-n|0,i=i-(A>>>0>>0)|0,w=(A=!((s=(l=l+1|0)?s:s+1|0)|l))>>>0>(g=A+g|0)>>>0?w+1|0:w,A=c-a|0,k=k-(a>>>0>c>>>0)|0;break r}e=(a=(A=e)-n|0)-h|0,i=(i-((A>>>0>>0)+v|0)|0)-(a>>>0>>0)|0,A=c-d|0,k=k-((c>>>0>>0)+y|0)|0;break r}e=(A=e)-(d=(a=(n=(l=i|A?1:!k&a>>>0<=c>>>0|!!(0|k))?a:0)>>>0>c>>>0)&!k)|0,i=i-(A>>>0>>0)|0,A=c-n|0,k=k-a|0;break r}l=ri(c,k,a,0),s=M,e=0,i=0,A=ei(c,k,a),k=M;break r}s=ri(A=k,n=ei(e,i,a),a,0),k=M,l=ri(c,A=ei(A,n,a),a,0),s|=M,g=ri(e,i,a,0)|k,w=M,e=0,i=0,A=ei(c,A,a),k=M}f[t+16>>2]=A,f[t+20>>2]=k,f[t>>2]=l,f[t+4>>2]=s,f[t+24>>2]=e,f[t+28>>2]=i,f[t+8>>2]=g,f[t+12>>2]=w,S=u+176|0,n=f[t+8>>2],e=f[t+12>>2],i=f[t+4>>2],A=f[t>>2],f[r>>2]=b?0-A|0:A,f[r+4>>2]=b?0-(!!(0|A)+i|0)|0:i,A=(i=(A=0!=(i|A))+n|0)>>>0>>0?e+1|0:e,f[r+8>>2]=b?0-i|0:n,f[r+12>>2]=b?0-(!!(0|i)+A|0)|0:e,S=t+32|0}function Ue(r,e,i,A,n,a,t,b,k){var u,o,c,s,l,h=0,v=0,d=0;u=r,s=a,d=qe(a,0,e,0),o=M,l=qe(e,0,t,0),v=h=M,a=i,i=qe(s,0,i,0),h=M+h|0,i=(r=i+l|0)>>>0>>0?h+1|0:h,c=r+o|0,h=(h=0)+d|0,f[u>>2]=h,f[u+4>>2]=c,d=(0|c)==(0|o)&d>>>0>h>>>0|c>>>0>>0,r=(0|i)==(0|v)&r>>>0>>0|i>>>0>>0,v=qe(t,0,a,0)+i|0,r=r+M|0,r=i>>>0>v>>>0?r+1|0:r,r=(i=v+d|0)>>>0>>0?r+1|0:r,v=i,i=r,e=qe(e,a,b,k),r=M,a=e,e=qe(A,n,s,t),r=M+r|0,h=(e>>>0>(A=a+e|0)>>>0?r+1|0:r)+i|0,h=(r=A+v|0)>>>0>>0?h+1|0:h,f[u+8>>2]=r,f[u+12>>2]=h}function Ve(r){Ye(1052784,43,r),$f()}function Xe(){Ye(1052048,5,1052056),$f()}function Je(r,e,i){var A;S=A=S-48|0,f[A+4>>2]=e,f[A>>2]=r,f[A+12>>2]=2,f[A+8>>2]=1052988,f[A+20>>2]=2,f[A+24>>2]=0,f[A+40>>2]=A+4,f[A+44>>2]=8,f[A+32>>2]=A,f[A+36>>2]=8,f[A+16>>2]=A+32,Me(A+8|0,i),$f()}function xe(r,e,i){var A;S=A=S-48|0,f[A+4>>2]=e,f[A>>2]=r,f[A+12>>2]=2,f[A+8>>2]=1052956,f[A+20>>2]=2,f[A+24>>2]=0,f[A+40>>2]=A+4,f[A+44>>2]=8,f[A+32>>2]=A,f[A+36>>2]=8,f[A+16>>2]=A+32,Me(A+8|0,i),$f()}function He(r,e,i,A,n,a){var t=0,b=0,k=0,u=0,o=0,c=0;r:if(64&a)f[r>>2]=0,f[r+4>>2]=0,n=31&(A=63&a),A>>>0>=32?(t=e<>>32-n|i<>2]=e,f[r+12>>2]=t;else{if(!a){f[r>>2]=e,f[r+4>>2]=i,f[r+8>>2]=A,f[r+12>>2]=n;break r}k=r,r=31&(u=63&a),u>>>0>=32?(t=e<>>32-r|i<>>0>=32?(A=0,e=i>>>a|0):(A=i>>>a|0,e=((1<>>a),u>>>0>=32?(r=o<>>32-b|n<>2]=e|i,f[k+12>>2]=r|A,f[k>>2]=c,f[k+4>>2]=t}}function je(r,e,i,A,n,a){var t=0,b=0,k=0,u=0;r:if(64&a)f[r+8>>2]=0,f[r+12>>2]=0,e=31&(i=63&a),i>>>0>=32?e=n>>>e|0:(t=n>>>e|0,e=((1<>>e),f[r>>2]=e,f[r+4>>2]=t;else{if(!a){f[r>>2]=e,f[r+4>>2]=i,f[r+8>>2]=A,f[r+12>>2]=n;break r}b=31&(u=0-a&63),t=31&(k=63&a),k>>>0>=32?(a=0,e=i>>>t|0):(a=i>>>t|0,e=((1<>>t),u>>>0>=32?(t=A<>>32-b|n<>>0>=32?(t=0,e=n>>>e|0):(t=n>>>e|0,e=((1<>>e),f[r+8>>2]=e,f[r+12>>2]=t,f[r>>2]=i,f[r+4>>2]=a}}function ze(r,e,t){var b,k=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0;if(b=S-16|0,u=t,t>>>0<16)t=r;else{if((k=(c=0-r&3)+r|0)>>>0>r>>>0)for(s=c,t=r,o=e;i[0|t]=n[0|o],o=o+1|0,t=t+1|0,s=s-1|0;);t=(w=-4&(d=u-c|0))+k|0;r:if(e=3&(c=e+c|0)){if(o=0,f[b+12>>2]=0,u=e|b+12,1&(s=4-e|0)&&(i[0|u]=n[0|c],o=1),2&s&&(A[o+u>>1]=a[o+c>>1]),o=c-e|0,s=e<<3,h=f[b+12>>2],k+4>>>0>=t>>>0)u=k;else for(l=0-s&24;u=h>>>s|0,h=f[(o=o+4|0)>>2],f[k>>2]=u|h<>>0>v>>>0;);k=0,i[b+8|0]=0,i[b+6|0]=0,1!=(0|e)?(l=n[o+5|0],e=n[o+4|0],i[b+8|0]=e,g=2,v=b+6|0,l<<=8):(e=0,v=b+8|0,l=0),1&c&&(i[0|v]=n[(o+4|0)+g|0],k=n[b+6|0]<<16,e=n[b+8|0]),f[u>>2]=(255&e|k|l)<<(0-s&24)|h>>>s}else{if(t>>>0<=k>>>0)break r;for(e=c;f[k>>2]=f[e>>2],e=e+4|0,(k=k+4|0)>>>0>>0;);}u=3&d,e=c+w|0}if(t+u>>>0>t>>>0)for(;i[0|t]=n[0|e],e=e+1|0,t=t+1|0,u=u-1|0;);return r}function Pe(r,e,t){var b,k,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0;b=S-32|0,k=r;r:{e:{i:{if(!(r-e>>>0>>0)){if(t>>>0>=16){if(k>>>0<(o=(l=0-k&3)+k|0)>>>0)for(s=l,u=e;i[0|r]=n[0|u],u=u+1|0,r=r+1|0,s=s-1|0;);r=(w=-4&(d=t-l|0))+o|0;A:if(e=3&(l=e+l|0)){if(f[b+16>>2]=0,t=e|b+16,1&(u=4-e|0)&&(i[0|t]=n[0|l],c=1),2&u&&(A[t+c>>1]=a[c+l>>1]),c=l-e|0,v=e<<3,h=f[b+16>>2],o+4>>>0>=r>>>0)u=o;else for(t=0-v&24;u=h>>>v|0,h=f[(c=c+4|0)>>2],f[o>>2]=u|h<>>0>s>>>0;);o=0,i[b+12|0]=0,i[b+10|0]=0,1!=(0|e)?(t=n[c+5|0],e=n[c+4|0],i[b+12|0]=e,g=2,s=b+10|0,t<<=8):(s=b+12|0,e=0,t=0),1&l&&(i[0|s]=n[(c+4|0)+g|0],o=n[b+10|0]<<16,e=n[b+12|0]),f[u>>2]=(255&e|t|o)<<(0-v&24)|h>>>v}else{if(r>>>0<=o>>>0)break A;for(e=l;f[o>>2]=f[e>>2],e=e+4|0,(o=o+4|0)>>>0>>0;);}t=3&d,e=l+w|0}if(r+t>>>0<=r>>>0)break r;for(;i[0|r]=n[0|e],e=e+1|0,r=r+1|0,t=t-1|0;);break r}if(c=u=e+t|0,r=r+t|0,t>>>0<16)break e;if(v=0-(s=3&r)|0,(l=-4&r)>>>0>>0)for(o=u-1|0,u=r;i[0|(u=u-1|0)]=n[0|o],o=o-1|0,u>>>0>l>>>0;);if(d=l-(u=-4&(g=t-s|0))|0,B=0-u|0,c=3&(w=c+v|0)){u=0,i[b+24|0]=0,i[b+22|0]=0,s=w-c|0;A:{if(1!=(0|c)){if(u=n[0|s],i[b+24|0]=u,o=n[s+1|0],y=0,!(1&w))break A;u=2,h=b+22|0}else o=0,h=b+24|0;i[0|h]=n[u+s|0],u=n[b+24|0],y=n[b+22|0]<<16}if(h=c<<3,u=255&u|o<<8|y,(o=d+4|0)>>>0>=l>>>0)t=l;else for(e=(t-c|0)+e|0,d=0-h&24;t=u<>2],f[(r+v|0)-4>>2]=t|u>>>h,o>>>0<(t=v+(r=r-4|0)|0)>>>0;);r=0,f[b+28>>2]=0,e=(c+s|0)-4|0,o=c|b+28,1&(s=4-c|0)&&(i[0|o]=n[0|e],r=1),2&s&&(A[r+o>>1]=a[r+e>>1]),f[t-4>>2]=u<<(0-h&24)|f[b+28>>2]>>>h}else{if(l>>>0<=d>>>0)break i;for(r=(e+g|0)-4|0,e=l;f[(e=e-4|0)>>2]=f[r>>2],r=r-4|0,e>>>0>d>>>0;);}}t=3&g,c=w+B|0,r=l+B|0}if(!(r>>>0<=(t=r-t|0)>>>0))for(e=c-1|0;i[0|(r=r-1|0)]=n[0|e],e=e-1|0,r>>>0>t>>>0;);}return k}function Ke(r,e,i,A){var f=0,n=0,a=0,t=0,b=0,u=0,c=0,s=0,l=0;r:{e:{i:{A:{f:{n:{a:{t:{b:{k:{if(e){if(a=i,!i)break k;if(!A)break b;if((i=o(A)-o(e)|0)>>>0<=31)break t;break e}if(1==(0|A)|A>>>0>1)break e;return F=(e=r)-k(r=(r>>>0)/(i>>>0)|0,i)|0,T=0,M=0,r}if(!r)break a;if(!A)break n;if((i=A-1|0)&A)break n;return F=r,T=e&i,M=0,e>>>(r=A?31-o(i^A)|0:32)|0}if(!((i=a-1|0)&a))break f;n=0-(t=(o(a)+33|0)-o(e)|0)|0;break i}t=i+1|0,n=63-i|0;break i}return F=0,T=e-k(r=(e>>>0)/(A>>>0)|0,A)|0,M=0,r}if((i=o(A)-o(e)|0)>>>0<31)break A;break e}if(F=r&i,T=0,1==(0|a))break r;return A=31&(i=a?31-o(a-1^a)|0:32),(63&i)>>>0>=32?(i=0,r=e>>>A|0):(i=e>>>A|0,r=((1<>>A),M=i,r}t=i+1|0,n=63-i|0}if(f=31&(i=63&t),i>>>0>=32?(i=0,u=e>>>f|0):(i=e>>>f|0,u=((1<>>f),f=31&(n&=63),n>>>0>=32?(e=r<>>32-f|e<>>31,u=(i=u<<1|e>>>31)-(c=a&(n=s-(b+(i>>>0>f>>>0)|0)>>31))|0,i=b-((A&n)+(i>>>0>>0)|0)|0,e=e<<1|r>>>31,r=l|r<<1,l=b=1&n,t=t-1|0;);return F=u,T=i,M=e<<1|r>>>31,b|r<<1}F=r,T=e,r=0,e=0}return M=e,r}function qe(r,e,i,A){var f,n,a,t,b=0,u=0;return t=k(b=i>>>16|0,u=r>>>16|0),b=(65535&(u=((a=k(f=65535&i,n=65535&r))>>>16|0)+k(u,f)|0))+k(b,n)|0,M=(k(e,i)+t|0)+k(r,A)+(u>>>16)+(b>>>16)|0,65535&a|b<<16}function $e(r,e,i,A){var f,n=0,a=0;return f=(a=e^A)>>31,a>>=31,r=ri((r^=n=e>>31)-n|0,n=(e^n)-((r>>>0>>0)+n|0)|0,(e=i^(r=A>>31))-r|0,(r^A)-((r>>>0>e>>>0)+r|0)|0)^a,M=(f^M)-((r>>>0>>0)+f|0)|0,e=r-a|0}function ri(r,e,i,A){return r=Ke(r,e,i,A)}function ei(r,e,i){return Ke(r,e,i,0),M=T,F}function ii(r){for(var e=0;r;)r&=r-1,e=e+1|0;return e}function Ai(r){var e;return(-1>>>(e=31&r)&-2)<>>r}Jf(Lf=n,1048576,"T25jZSBpbnN0YW5jZSBoYXMgcHJldmlvdXNseSBiZWVuIHBvaXNvbmVkAAAAABAAKgAAAG9uZS10aW1lIGluaXRpYWxpemF0aW9uIG1heSBub3QgYmUgcGVyZm9ybWVkIHJlY3Vyc2l2ZWx5NAAQADgAAAAvaG9tZS9jaXJjbGVjaS8uY2FyZ28vcmVnaXN0cnkvc3JjL2luZGV4LmNyYXRlcy5pby0xOTQ5Y2Y4YzZiNWI1NTdmL2J5dGVzLTEuMTAuMS9zcmMvYnl0ZXNfbXV0LnJzAC9ob21lL2NpcmNsZWNpLy5ydXN0dXAvdG9vbGNoYWlucy9uaWdodGx5LTIwMjUtMDYtMjQteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvY29yZS9zcmMvc2xpY2Uvc29ydC9zaGFyZWQvc21hbGxzb3J0LnJzAC9ob21lL2NpcmNsZWNpLy5ydXN0dXAvdG9vbGNoYWlucy9uaWdodGx5LTIwMjUtMDYtMjQteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvY29yZS9zcmMvc2xpY2Uvc29ydC9zdGFibGUvcXVpY2tzb3J0LnJzAC9ob21lL2NpcmNsZWNpLy5ydXN0dXAvdG9vbGNoYWlucy9uaWdodGx5LTIwMjUtMDYtMjQteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvYWxsb2Mvc3JjL2ZtdC5ycwAvaG9tZS9jaXJjbGVjaS8ucnVzdHVwL3Rvb2xjaGFpbnMvbmlnaHRseS0yMDI1LTA2LTI0LXg4Nl82NC11bmtub3duLWxpbnV4LWdudS9saWIvcnVzdGxpYi9zcmMvcnVzdC9saWJyYXJ5L2NvbXBpbGVyLWJ1aWx0aW5zL2NvbXBpbGVyLWJ1aWx0aW5zL3NyYy9tYXRoLy4uLy4uLy4uL2xpYm0vc3JjL21hdGgvc3VwcG9ydC9mbG9hdF90cmFpdHMucnMAL2hvbWUvY2lyY2xlY2kvLmNhcmdvL3JlZ2lzdHJ5L3NyYy9pbmRleC5jcmF0ZXMuaW8tMTk0OWNmOGM2YjViNTU3Zi9ub20tOC4wLjAvc3JjL3RyYWl0cy5ycwAvaG9tZS9jaXJjbGVjaS8uY2FyZ28vcmVnaXN0cnkvc3JjL2luZGV4LmNyYXRlcy5pby0xOTQ5Y2Y4YzZiNWI1NTdmL2J5dGVzLTEuMTAuMS9zcmMvYnl0ZXMucnMAbGliL3NyYy9tcGVndHNfZXh0cmFjdG9yLnJzAC9ob21lL2NpcmNsZWNpLy5ydXN0dXAvdG9vbGNoYWlucy9uaWdodGx5LTIwMjUtMDYtMjQteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvY29yZS9zcmMvaXRlci90cmFpdHMvaXRlcmF0b3IucnMAL2hvbWUvY2lyY2xlY2kvLnJ1c3R1cC90b29sY2hhaW5zL25pZ2h0bHktMjAyNS0wNi0yNC14ODZfNjQtdW5rbm93bi1saW51eC1nbnUvbGliL3J1c3RsaWIvc3JjL3J1c3QvbGlicmFyeS9jb3JlL3NyYy9zbGljZS9pdGVyLnJzAGxpYi9zcmMvYWFjX21lZGlhaGVscGVyLnJzAGxpYi9zcmMvaDI2NF9tZWRpYWhlbHBlci5ycwBsaWIvc3JjL21wM19tZWRpYWhlbHBlci5ycwBsaWIvc3JjL2lkM19tZWRpYWhlbHBlci5ycwBsaWIvc3JjL2lzb21fcGFja2FnZXIucnMAL2hvbWUvY2lyY2xlY2kvLnJ1c3R1cC90b29sY2hhaW5zL25pZ2h0bHktMjAyNS0wNi0yNC14ODZfNjQtdW5rbm93bi1saW51eC1nbnUvbGliL3J1c3RsaWIvc3JjL3J1c3QvbGlicmFyeS9hbGxvYy9zcmMvc3RyaW5nLnJzAC9ob21lL2NpcmNsZWNpLy5ydXN0dXAvdG9vbGNoYWlucy9uaWdodGx5LTIwMjUtMDYtMjQteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvc3RkL3NyYy9wYW5pY2tpbmcucnMAL2hvbWUvY2lyY2xlY2kvLnJ1c3R1cC90b29sY2hhaW5zL25pZ2h0bHktMjAyNS0wNi0yNC14ODZfNjQtdW5rbm93bi1saW51eC1nbnUvbGliL3J1c3RsaWIvc3JjL3J1c3QvbGlicmFyeS9zdGQvc3JjL3N5bmMvcG9pc29uL29uY2UucnMAL2hvbWUvY2lyY2xlY2kvLnJ1c3R1cC90b29sY2hhaW5zL25pZ2h0bHktMjAyNS0wNi0yNC14ODZfNjQtdW5rbm93bi1saW51eC1nbnUvbGliL3J1c3RsaWIvc3JjL3J1c3QvbGlicmFyeS9hbGxvYy9zcmMvc2xpY2UucnMAL2hvbWUvY2lyY2xlY2kvLnJ1c3R1cC90b29sY2hhaW5zL25pZ2h0bHktMjAyNS0wNi0yNC14ODZfNjQtdW5rbm93bi1saW51eC1nbnUvbGliL3J1c3RsaWIvc3JjL3J1c3QvbGlicmFyeS9jb3JlL3NyYy9wdHIvbW9kLnJzAC9ob21lL2NpcmNsZWNpLy5ydXN0dXAvdG9vbGNoYWlucy9uaWdodGx5LTIwMjUtMDYtMjQteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvYWxsb2Mvc3JjL3Jhd192ZWMvbW9kLnJzAC9ob21lL2NpcmNsZWNpLy5ydXN0dXAvdG9vbGNoYWlucy9uaWdodGx5LTIwMjUtMDYtMjQteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvYWxsb2Mvc3JjL3ZlYy9tb2QucnMAL2hvbWUvY2lyY2xlY2kvLmNhcmdvL3JlZ2lzdHJ5L3NyYy9pbmRleC5jcmF0ZXMuaW8tMTk0OWNmOGM2YjViNTU3Zi9kbG1hbGxvYy0wLjIuOS9zcmMvZGxtYWxsb2MucnMAL2hvbWUvY2lyY2xlY2kvLmNhcmdvL3JlZ2lzdHJ5L3NyYy9pbmRleC5jcmF0ZXMuaW8tMTk0OWNmOGM2YjViNTU3Zi9jb25zb2xlX2Vycm9yX3BhbmljX2hvb2stMC4xLjcvc3JjL2xpYi5ycwAvaG9tZS9jaXJjbGVjaS8uY2FyZ28vcmVnaXN0cnkvc3JjL2luZGV4LmNyYXRlcy5pby0xOTQ5Y2Y4YzZiNWI1NTdmL29uY2VfY2VsbC0xLjIxLjMvc3JjL2xpYi5ycwAvaG9tZS9jaXJjbGVjaS8uY2FyZ28vcmVnaXN0cnkvc3JjL2luZGV4LmNyYXRlcy5pby0xOTQ5Y2Y4YzZiNWI1NTdmL2J5dGVzLTEuMTAuMS9zcmMvbGliLnJzAGxpYi9zcmMvZnJhZ21lbnRlZF9kYXRhLnJzAGh0dHBzOi8vYW9tZWRpYS5vcmcvZW1zZy9JRDMAAAAAqAYQAIcAAACbAAAAMgAAAJMJEABuAAAAlQAAAA4AAAAMAAAADAAAAAQAAAANAAAADgAAAA8AAAAMAAAADAAAAAQAAAAQAAAAEQAAAA8AAACpBRAAfwAAAOgBAAAX"),Jf(Lf,1051488,"AQAAABIAAABhIGZvcm1hdHRpbmcgdHJhaXQgaW1wbGVtZW50YXRpb24gcmV0dXJuZWQgYW4gZXJyb3Igd2hlbiB0aGUgdW5kZXJseWluZyBzdHJlYW0gZGlkIG5vdAAA/AEQAHwAAACKAgAADgAAAExheW91dEVycm9yABMAAAAUAAAAFQAAABYAAAAXAAAAc3Vic2V0IHBvaW50ZXIgKCkgaXMgc21hbGxlciB0aGFuIHNlbGYgcG9pbnRlciAo8AsQABAAAAAADBAAIAAAABgXEAABAAAAmwMQAF4AAADFAQAACQAAAHN1YnNldCBpcyBvdXQgb2YgYm91bmRzOiBzZWxmID0gKCwgKSwgc3Vic2V0ID0gKEgMEAAhAAAAaQwQAAIAAABrDBAADQAAAGkMEAACAAAAGBcQAAEAAACbAxAAXgAAAMsBAAAJAAAAc3BsaXRfdG8gb3V0IG9mIGJvdW5kczogsAwQABgAAAAhJxAABAAAAJsDEABeAAAALgIAAAkAAACbAxAAXgAAAM4DAAAkAAAAGAAAABkAAAAaAAAAGwAAABwAAAAdAAAAHgAAAB8AAAAbAAAAIA=="),Jf(Lf,1051944,"AQAAACEAAABjYWxsZWQgYFJlc3VsdDo6dW53cmFwKClgIG9uIGFuIGBFcnJgIHZhbHVlAJsDEABeAAAASAUAADIAAACbAxAAXgAAAFYFAABJAAAAIgAAACMAAAAkAAAAJQAAACYAAABhYm9ydAAAAGEKEABcAAAAbgAAAAkAAABhZHZhbmNlIG91dCBvZiBib3VuZHM6IHRoZSBsZW4gaXMgIGJ1dCBhZHZhbmNpbmcgYnkgqA0QACIAAADKDRAAEgAAAGEKEABcAAAArAAAAAUAAABvdmVyZmxvd3QAEABiAAAAqgIAABUAAAB0ABAAYgAAAAADAAAnAAAAdAAQAGIAAADUAgAAOAAAACcAAAAMAAAABAAAACgAAAApAAAAKg=="),Jf(Lf,1052244,"AQAAABIAAAAKClN0YWNrOgoKMHgwMDAxMDIwMzA0MDUwNjA3MDgwOTEwMTExMjEzMTQxNTE2MTcxODE5MjAyMTIyMjMyNDI1MjYyNzI4MjkzMDMxMzIzMzM0MzUzNjM3MzgzOTQwNDE0MjQzNDQ0NTQ2NDc0ODQ5NTA1MTUyNTM1NDU1NTY1NzU4NTk2MDYxNjI2MzY0NjU2NjY3Njg2OTcwNzE3MjczNzQ3NTc2Nzc3ODc5ODA4MTgyODM4NDg1ODY4Nzg4ODk5MDkxOTI5Mzk0OTU5Njk3OTg5OWluZGV4IG91dCBvZiBib3VuZHM6IHRoZSBsZW4gaXMgIGJ1dCB0aGUgaW5kZXggaXMgAAAwDxAAIAAAAFAPEAASAAAAAAAAAAQAAAAEAAAAKwAAAD09YXNzZXJ0aW9uIGBsZWZ0ICByaWdodGAgZmFpbGVkCiAgbGVmdDogCiByaWdodDogAACGDxAAEAAAAJYPEAAXAAAArQ8QAAkAAAAgcmlnaHRgIGZhaWxlZDogCiAgbGVmdDogAAAAhg8QABAAAADQDxAAEAAAAOAPEAAJAAAArQ8QAAkAAAB1c2VyLXByb3ZpZGVkIGNvbXBhcmlzb24gZnVuY3Rpb24gZG9lcyBub3QgY29ycmVjdGx5IGltcGxlbWVudCBhIHRvdGFsIG9yZGVyDBAQAEwAAADWABAAkwAAAFwDAAAFAAAAY2FsbGVkIGBPcHRpb246OnVud3JhcCgpYCBvbiBhIGBOb25lYCB2YWx1ZWF0dGVtcHQgdG8gZGl2aWRlIHdpdGggb3ZlcmZsb3cAAJsQEAAfAAAAYXR0ZW1wdCB0byBkaXZpZGUgYnkgemVybwAAAMQQEAAZAAAAcmFuZ2Ugc3RhcnQgaW5kZXggIG91dCBvZiByYW5nZSBmb3Igc2xpY2Ugb2YgbGVuZ3RoIOgQEAASAAAA+hAQACIAAAByYW5nZSBlbmQgaW5kZXggLBEQABAAAAD6EBAAIgAAAHNsaWNlIGluZGV4IHN0YXJ0cyBhdCAgYnV0IGVuZHMgYXQgAEwREAAWAAAAYhEQAA0AAAA6IAAAAQAAAAAAAACAERAAAgAAAD8DEABcAAAA0AAAAAoAAABhc3NlcnRpb24gZmFpbGVkOiBwc2l6ZSA+PSBzaXplICsgbWluX292ZXJoZWFkAAAwCRAAYwAAALAEAAAJAAAAYXNzZXJ0aW9uIGZhaWxlZDogcHNpemUgPD0gc2l6ZSArIG1heF9vdmVyaGVhZAAAMAkQAGMAAAC2BAAADQAAADoAAAABAAAAAAAAACQSEAABAAAAJBIQAAEAAABwYW5pY2tlZCBhdCAnAAAADAAAAAQAAAAQAAAAEQAAACwAAABjYW5ub3QgbW9kaWZ5IHRoZSBwYW5pYyBob29rIGZyb20gYSBwYW5pY2tpbmcgdGhyZWFkZBIQADQAAAAoBhAAgAAAAJAAAAAJAAAAJwAAAAwAAAAEAAAADQAAAC0AAAAsAAAAJwAAAAwAAAAEAAAALgAAAAAAAAAIAAAABAAAAC8AAAAAAAAACAAAAAQAAAAwAAAAMQAAADIAAAAzAAAANAAAABAAAAAEAAAANQAAADYAAAA3AAAAOAAAAAwAAAAMAAAABAAAADkAAAA6AAAAOw=="),Jf(Lf,1053504,"AQAAABIAAABhIERpc3BsYXkgaW1wbGVtZW50YXRpb24gcmV0dXJuZWQgYW4gZXJyb3IgdW5leHBlY3RlZGx5AKkFEAB/AAAADgsAAA4AAABFcnJvclRhZ01hcFJlc01hcE9wdEFsdElzTm90SXNBU2VwYXJhdGVkTGlzdFNlcGFyYXRlZE5vbkVtcHR5TGlzdE1hbnkwTWFueTFNYW55VGlsbENvdW50VGFrZVVudGlsTGVuZ3RoVmFsdWVUYWdDbG9zdXJlQWxwaGFEaWdpdEhleERpZ2l0T2N0RGlnaXRCaW5EaWdpdEFscGhhTnVtZXJpY1NwYWNlTXVsdGlTcGFjZUxlbmd0aFZhbHVlRm5Fb2ZTd2l0Y2hUYWdCaXRzT25lT2ZOb25lT2ZDaGFyQ3JMZlJlZ2V4cE1hdGNoUmVnZXhwTWF0Y2hlc1JlZ2V4cEZpbmRSZWdleHBDYXB0dXJlUmVnZXhwQ2FwdHVyZXNUYWtlV2hpbGUxQ29tcGxldGVGaXhFc2NhcGVkRXNjYXBlZFRyYW5zZm9ybU5vbkVtcHR5TWFueU1OTm90UGVybXV0YXRpb25WZXJpZnlUYWtlVGlsbDFUYWtlV2hpbGVNTlRvb0xhcmdlTWFueTBDb3VudE1hbnkxQ291bnRGbG9hdFNhdGlzZnlGYWlsTWFueUZvbGRQcmVjZWRlbmNl+QMQABwAAAC1AAAAMgAAAENvdWxkIG5vdCBmaW5kIHByb2dyYW0gbWFwIHRhYmxlIFBJRCBpbiBzdHJlYW0gb3IgaW4gaW5wdXQgbWV0YWRhdGEu+QMQABwAAADZAAAAFwAAAENvdWxkIG5vdCBmaW5kIGF1ZGlvIHN0cmVhbSBQSUQgaW4gc3RyZWFtIG9yIGluIGlucHV0IG1ldGFkYXRhLkNvdWxkIG5vdCBmaW5kIHZpZGVvIHN0cmVhbSBQSUQgaW4gc3RyZWFtIG9yIGluIGlucHV0IG1ldGFkYXRhLgAA+QMQABwAAADfAAAAFQAAAENvdWxkIG5vdCBmaW5kIE1QRUdUUyBzeW5jIG9mZnNldCBieXRlIGluIGFycmF5LkhFVkMgaW4gTVBFRy1UUyBpcyBub3Qgc3VwcG9ydGVk+QMQABwAAADGAQAAJQAAAPkDEAAcAAAAaQIAADkAAAD5AxAAHAAAAP4CAAAPAAAAAQAAAAAAAABQYXJzZSBlcnJvciDMFhAADAAAAEluY29tcGxldGUgTVBFR1RTIHBhY2tldC5JbnZhbGlkIE1QRUdUUyBwYWNrZXQ6IPkWEAAXAAAAKVNjcmFtYmxlZCBQRVMgYXJlIG5vdCBzdXBwb3J0ZWT5AxAAHAAAAJcDAAALAAAA+QMQABwAAACYAwAAEQAAAPkDEAAcAAAAmQMAABEAAAD5AxAAHAAAAJoDAAARAAAA+QMQABwAAACbAwAAEQAAAPkDEAAcAAAAtwMAADkAAAD5AxAAHAAAAMYDAAA8AAAA+QMQABwAAADHAwAAQAAAAAAAACBmdHlwbXA0MgAAAABpc29tbXA0MmRhc2hhaWQzYm94IHNpemUgbWlzbWF0Y2gAAADYFxAAEQAAAJAFEAAZAAAAgQAAAAkAAACQBRAAGQAAAJMAAAAJAAAAAAAAGHN0eXBtc2RoAAAAAG1zZGhtc2l4kAUQABkAAAC2AAAACQAAAJAFEAAZAAAAuQAAAAkAAACQBRAAGQAAAOYAAAAJAAAAkAUQABkAAADpAAAACQAAAAAB"),Jf(Lf,1054845,"AQ=="),Jf(Lf,1054860,"QAAAAAAAAC1oZGxyAAAAAAAAAABzb3Vu"),Jf(Lf,1054896,"U291bmRIYW5kbGVyAAAAAC1oZGxyAAAAAAAAAAB2aWRl"),Jf(Lf,1054941,"VmlkZW9IYW5kbGVyAAAAABR2bWhkAAAAAQ=="),Jf(Lf,1054977,"EHNtaGQ="),Jf(Lf,1054993,"JGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAACQBRAAGQAAAOICAAAoAAAAkAUQABkAAADIAwAAEgAAAJAFEAAZAAAAywMAAEQAAACQBRAAGQAAAOMDAAAOAAAAPAAAABQAAAAVAAAAFgAAABcAAAA+BRAAHAAAAKIAAAA1AAAAPgUQABwAAACjAAAAGAAAAE1pc3NpbmcgU1BTIGFuZC9vciBQUFMgaW4gSDI2NCB2aWRlbyBkYXRhAAAAPgUQABwAAAC7AAAALQAAAD4FEAAcAAAAuwAAAFkAAAA+BRAAHAAAANwAAAA6AAAAPgUQABwAAADdAAAAOgAAAD4FEAAcAAAA3gAAADgAAAA+BRAAHAAAADsBAAAkAAAAPgUQABwAAAA8AQAAJAAAAD4FEAAcAAAAUQEAABYAAAA+BRAAHAAAAFcBAAAWAAAAPgUQABwAAABDAQAAHgAAAD4FEAAcAAAASAEAAB4AAAA+BRAAHAAAAG8BAAATAAAAPgUQABwAAABwAQAAGgAAAD4FEAAcAAAAcQEAABEAAAA+BRAAHAAAAJABAAAfAAAAPgUQABwAAACRAQAADAAAAD4FEAAcAAAAkgEAABEAAAA+BRAAHAAAAJIBAAAMAAAAPgUQABwAAACTAQAAEQAAAD4FEAAcAAAAkwEAAAwAAAA+BRAAHAAAAJQBAAARAAAAPgUQABwAAACUAQAADAAAAD4FEAAcAAAAlQEAAAwAAAA+BRAAHAAAAJYBAAAMAAAAPgUQABwAAACdAQAADAAAAD4FEAAcAAAAoAEAABAAAAA+BRAAHAAAAKEBAAAQAAAAPgUQABwAAACZAQAAEAAAAD4FEAAcAAAAmgEAABAAAAA+BRAAHAAAALYBAAAsAAAAAAAAAAEAAQAMAAsACgALABAACwAoACEAGAALABQACwAgAAsAUAAhABIACwAPAAsAQAAhAKAAYwAEAAMAAwACAAIAAQA+BRAAHAAAAAYCAAAiAAAAPgUQABwAAABtAgAAQgAAAD4FEAAcAAAAZwIAACUAAAA+BRAAHAAAAIYCAAA2AAAAPgUQABwAAACQAgAAMgAAAGFzc2VydGlvbiBmYWlsZWQ6IHNlbGYuaXNfYnl0ZV9hbGlnbmVkKCk+BRAAHAAAAI4CAAAJAAAAPgUQABwAAAA0AwAAFAAAAD4FEAAcAAAAUwMAAA4AAAA+BRAAHAAAAFgDAAAOAAAAPgUQABwAAABtAwAACgAAAD4FEAAcAAAAdAMAABIAAAA+BRAAHAAAAHcDAAA8AAAAYXZjMS4AAADgHBAABQAAAAEAAAAAAAAAAQAAAAAAAAAC"),Jf(Lf,1056010,"Ag=="),Jf(Lf,1056020,"IAAA6QI="),Jf(Lf,1056034,"AgAAAAAAAQAAACAAAOkC"),Jf(Lf,1056058,"AgAAAAAAAgAAACAAAOmtBxAAfwAAAB8DAAABAAAAPQAAABQAAAAVAAAAFgAAABcAAAAjBRAAGwAAAEIAAAAiAAAAAHcBAIhYAQAA+gAAgLsAAESsAAAAfQAAwF0AACJWAACAPgAA4C4AABErAABAHwAAIwUQABsAAABPAAAAJgAAACMFEAAbAAAAUAAAAD4AAAAjBRAAGwAAAFMAAAA6AAAAIwUQABsAAABXAAAAQgAAACMFEAAbAAAAYAAAAD4AAAAjBRAAGwAAAGIAAABDAAAAIwUQABsAAACWAAAAQgAAACMFEAAbAAAArAAAABYAAAAjBRAAGwAAAM4AAAA7AAAAIwUQABsAAADcAAAAOgAAACMFEAAbAAAA3QAAADoAAAAjBRAAGwAAAN4AAAA4AAAAIwUQABsAAAAUAQAANwAAAADIAIAjgCEASZACGQAjgADIAIAghAEmQAhkAI4AyACAIIQBJkAIZACALIAIAjgAyACAIIQBJkAIZACCMASZACGQAjgAyACAIIQBJkAIZACCMASZACGQAgCyACAI4AAAACMFEAAbAAAAJwEAACIAAAAjBRAAGwAAACsBAAAOAAAAIwUQABsAAAAwAQAADgAAACMFEAAbAAAAUAEAACgAAAAjBRAAGwAAAFABAABWAAAAIwUQABsAAABaAQAADgAAACMFEAAbAAAAWwEAACUAAAAjBRAAGwAAAGABAAAOAAAAIwUQABsAAABjAQAAJAAAACMFEAAbAAAAaQEAAFoAAAAjBRAAGwAAAI4BAABHAAAAIwUQABsAAACPAQAASgAAACMFEAAbAAAAngEAACMAAAAjBRAAGwAAAKABAAAQAAAAIwUQABsAAACjAQAAEAAAACMFEAAbAAAApAEAABAAAAAjBRAAGwAAAKUBAAAQAAAAIwUQABsAAACmAQAAEAAAACMFEAAbAAAApwEAABAAAAAjBRAAGwAAAKgBAAAQAAAAIwUQABsAAACpAQAAEAAAACMFEAAbAAAAqgEAABAAAAAjBRAAGwAAAKsBAAAQAAAAIwUQABsAAACsAQAAEAAAACMFEAAbAAAArQEAABAAAAAjBRAAGwAAAK4BAAAQAAAAIwUQABsAAACvAQAAEAAAACMFEAAbAAAAsAEAABAAAAAjBRAAGwAAALEBAAAQAAAAIwUQABsAAACyAQAAEAAAACMFEAAbAAAAswEAABAAAAAjBRAAGwAAALQBAAAQAAAAIwUQABsAAAC2AQAAEAAAACMFEAAbAAAAtwEAABAAAAAjBRAAGwAAALgBAAAQAAAALwcQAH4AAADBAQAAHQAAAG1wNGEuNDAuMm1wNGEuNDAuNW1wNGEuNDAuMzRjYXBhY2l0eSBvdmVyZmxvdwAAADghEAARAAAAsAgQAIAAAAB2CgAAJAAAAC8HEAB+AAAAYwMAAAkAAABVbnJlY29nbml6ZWQgSDI2NCBOQUwgdW5pdCB0eXBlOiAAAAB0IRAAIQAAACwIEACEAAAALgIAABEAAAChBBAAggAAAGgCAAAfAAAADAAAAAwAAAAEAAAAOQAAADoAAAA7AAAAVW5yZWNvZ25pemVkIElEMyB2ZXJzaW9uOiAuANghEAAaAAAA8iEQAAEAAAACAAAAAAAAAAI="),Jf(Lf,1057304,"IACA4HUFEAAbAAAAzQAAAB0AAAB1BRAAGwAAAN4AAAAdAAAAdQUQABsAAADxAAAAHQAAAGNvbS5hcHBsZS5zdHJlYW1pbmcudHJhbnNwb3J0U3RyZWFtVGltZXN0YW1wFQQQAIwAAADrBwAACQAAAD4FEAAcAAAAGwEAABIAAAABAAAAAAAAAD4AAAAUAAAAFQAAABYAAAAXAAAAcmFuZ2Ugc3RhcnQgbXVzdCBub3QgYmUgZ3JlYXRlciB0aGFuIGVuZDogAAC0IhAAKgAAACEnEAAEAAAAmwMQAF4AAACGAQAACQAAAHJhbmdlIGVuZCBvdXQgb2YgYm91bmRzOiAAAAAAIxAAGQAAACEnEAAEAAAAmwMQAF4AAACMAQAACQAAAD8AAAAUAAAAFQAAABYAAAAXAAAAWgUQABsAAAByAAAAJgAAAP8AAABaBRAAGwAAAIMAAABCAAAAWgUQABsAAACEAAAATw=="),Jf(Lf,1057800,"QB8AAIA+AADAXQAAAH0AAECcAACAuwAAwNoAAAD6AACAOAEAAHcBAIC1AQAA9AEAgDICAABxAg=="),Jf(Lf,1057865,"fQAAQJwAAIC7AADA2gAAAPoAAIA4AQAAdwEAgLUBAAD0AQAAcQIAAO4CAABrAwAA6AMAAOIEAAAAAABaBRAAGwAAAIwAAAA3"),Jf(Lf,1057972,"IlYAAMBdAACAPgAAAAAAAESsAACAuwAAAH0AAAAAAABaBRAAGwAAAI8AAABWAAAAQAIAAAAAAABAAgAAgAQAAFoFEAAbAAAAoAAAAEIAAAACAgIBWgUQABsAAACqAAAAQgAAAFoFEAAbAAAAvAAAADwAAABaBRAAGwAAAPgAAAAWAAAAWgUQABsAAAAKAQAAOAAAAFoFEAAbAAAAGgEAADoAAABaBRAAGwAAABsBAAA6AAAAWgUQABsAAAAcAQAAOAAAAFoFEAAbAAAAOAEAAEoAAABaBRAAGwAAAEEBAAAjAAAAWgUQABsAAABEAQAAEAAAAFoFEAAbAAAARQEAABAAAABaBRAAGwAAAEYBAAAQAAAAWgUQABsAAABJAQAAEAAAAFoFEAAbAAAASgEAABAAAABaBRAAGwAAAEsBAAAQAAAAWgUQABsAAABMAQAAEAAAAFoFEAAbAAAATQEAABAAAABaBRAAGwAAAE4BAAAQAAAAWgUQABsAAABPAQAAEAAAAFoFEAAbAAAAUAEAABAAAABaBRAAGwAAAFEBAAAQAAAAWgUQABsAAABSAQAAEAAAAFoFEAAbAAAAUwEAABAAAABaBRAAGwAAAFYBAAAQAAAAWgUQABsAAABXAQAAEAAAAFoFEAAbAAAAWAEAABAAAABaBRAAGwAAAFkBAAAQAAAAWgUQABsAAABaAQAAEAAAAFoFEAAbAAAAWwEAABAAAABAAAAAFAAAABUAAAAWAAAAFwAAAEEAAABCAAAAQwAAAEQAAABFAAAAY2Fubm90IGFkdmFuY2UgcGFzdCBgcmVtYWluaW5nYDogIDw9IAAAAAAnEAAhAAAAIScQAAQAAACbAxAAXgAAAMcCAAAJAAAAdHJpbV9sZW5ndGhfZnJvbV9lbmQgY2FuIG9ubHkgYmUgdXNlZCB0byByZWR1Y2UgdGhlIGxlbmd0aCBvZiBhIEZyYWdtZW50ZWREYXRhAABIJxAATgAAAL0KEAAbAAAARwAAAAkAAAC9ChAAGwAAAGsAAAAYAAAAdAAQAGIAAACVAAAAHAAAAG1pZCA+IGxlbgAAANAnEAAJAAAAaQEQAJMAAABOAAAAHwAAAGkBEACTAAAASAAAABcAAAA+BRAAHAAAAAkDAAAOAAAATGF6eSBpbnN0YW5jZSBoYXMgcHJldmlvdXNseSBiZWVuIHBvaXNvbmVkAAAUKBAAKgAAAAEKEABgAAAACAMAABkAAAByZWVudHJhbnQgaW5pdAAAWCgQAA4AAAABChAAYAAAAHoCAAANAAAAAwAAAAYAAAAGAAAAAwAAAAUAAAADAAAADQAAABUAAAAFAAAABQAAAAgAAAAFAAAACQAAAAsAAAAKAAAABQAAAAUAAAAIAAAACAAAAAgAAAAMAAAABQAAAAoAAAANAAAAAwAAAAYAAAAHAAAABQAAAAYAAAAEAAAABAAAAAsAAAANAAAACgAAAA0AAAAOAAAACgAAAAgAAAADAAAABwAAABAAAAAIAAAABgAAAAMAAAALAAAABgAAAAkAAAALAAAACAAAAAoAAAAKAAAABQAAAAcAAAAEAAAABAAAAAQAAAAKAAAAlRMQAJgTEACeExAApBMQAKcTEACsExAArxMQALwTEADRExAA1hMQANsTEADjExAA6BMQAPETEAD8ExAABhQQAAsUEAAQFBAAGBQQACAUEAAoFBAANBQQADkUEABDFBAAUBQQAFMUEABZFBAAYBQQAGUUEABrFBAAbxQQAHMUEAB+FBAAixQQAJUUEACiFBAAsBQQALoUEADCFBAAxRQQAMwUEADcFBAA5BQQAOoUEADtFBAA+BQQAP4UEAAHFRAAEhUQABoVEAAkFRAALhUQADMVEAA6FRAAPhUQAEIVEABGFRAAfB4QAIIeEACLHhAAmB4QAKoeEAC/HhAABgAAAAkAAAANAAAAEgAAABUAAAAaAAAAeAIQAMcAAACmAAAAFA=="),Jf(Lf,1059488,"Rg==");var fi=[null,function(r,e){e|=0;var A,a,t=0,b=0,u=0,o=0,c=0,s=0;if(S=A=S-16|0,t=10,(b=a=f[(r|=0)>>2])>>>0>=1e3)for(r=b;u=(A+6|0)+t|0,s=(c=((65535&(o=r-k(b=(r>>>0)/1e4|0,1e4)|0))>>>0)/100|0)<<1,i[u-3|0]=n[s+1052265|0],i[u-4|0]=n[s+1052264|0],o=(o-k(c,100)&65535)<<1,i[u-1|0]=n[o+1052265|0],i[u-2|0]=n[o+1052264|0],t=t-4|0,u=r>>>0>9999999,r=b,u;);return b>>>0<=9?r=b:(b=(b-k(r=((65535&b)>>>0)/100|0,100)&65535)<<1,i[5+(t+A|0)|0]=n[b+1052265|0],i[(t=t-2|0)+(A+6|0)|0]=n[b+1052264|0]),!r&&a||(i[(t=t-1|0)+(A+6|0)|0]=n[1052265+(r<<1&30)|0]),r=pr(e,1,0,(A+6|0)+t|0,10-t|0),S=A+16|0,0|r},function(r,e){return 0|q(e|=0,f[(r|=0)>>2],f[r+4>>2])},function(r,e){r|=0;var A,n=0,a=0;S=A=S-144|0;r:{e:{if(!(33554432&(n=f[(e|=0)+8>>2]))){if(67108864&n)break e;Kr(A+8|0,f[r>>2],A+16|0),r=pr(e,1,0,f[A+8>>2],f[A+12>>2]);break r}for(r=f[r>>2],n=129;a=15&r,i[14+(n+A|0)|0]=a>>>0<10?48|a:a+87|0,n=n-1|0,a=r>>>0>15,r=r>>>4|0,a;);r=pr(e,1052262,2,15+(n+A|0)|0,129-n|0);break r}for(r=f[r>>2],n=129;a=15&r,i[14+(n+A|0)|0]=a>>>0<10?48|a:a+55|0,n=n-1|0,a=r>>>0>15,r=r>>>4|0,a;);r=pr(e,1052262,2,15+(n+A|0)|0,129-n|0)}return S=A+144|0,0|r},function(r,e){var i;return e|=0,S=i=S-48|0,57==n[(r|=0)+8|0]?(f[i+12>>2]=r,f[i+20>>2]=1,f[i+16>>2]=1054404,f[i+28>>2]=1,f[i+32>>2]=0,f[i+40>>2]=i+12,f[i+44>>2]=5):(f[i+20>>2]=1,f[i+16>>2]=1054424,f[i+28>>2]=1,f[i+32>>2]=0,f[i+40>>2]=r+8,f[i+44>>2]=6),f[i+24>>2]=i+40,r=Qr(f[e>>2],f[e+4>>2],i+16|0),S=i+48|0,0|r},function(r,e){return e|=0,r=f[(r|=0)>>2],0|q(e,f[r>>2],f[r+4>>2])},function(r,e){return e|=0,r=n[0|(r|=0)]<<2,0|fi[f[f[e+4>>2]+12>>2]](f[e>>2],f[r+1059172>>2],f[r+1058944>>2])},function(r,e){e|=0;var A,f=0,a=0;for(S=A=S-128|0,a=n[0|(r|=0)],r=129;f=15&a,i[(r+A|0)-2|0]=f>>>0<10?48|f:f+87|0,a=(f=a)>>>4|0,r=r-1|0,f>>>0>15;);return r=pr(e,1052262,2,(r+A|0)-1|0,129-r|0),S=A+128|0,0|r},function(r,e){var i;return e|=0,S=i=S-32|0,Kr(i+8|0,f[(r|=0)>>2],i+22|0),r=pr(e,1,0,f[i+8>>2],f[i+12>>2]),S=i+32|0,0|r},function(r,e){return e|=0,0|fi[f[f[(r|=0)+4>>2]+12>>2]](f[r>>2],e)},function(r,e){e|=0;var n,a,t,b=0,k=0;for(S=n=S-128|0,r=f[(r|=0)>>2],t=f[e+12>>2],8388608&(b=a=f[e+8>>2])&&(134217728&b?b|=16777216:(A[e+12>>1]=10,b|=150994944)),f[e+8>>2]=8388608|b,b=129;k=15&r,i[(b+n|0)-2|0]=k>>>0<10?48|k:k+87|0,b=b-1|0,k=r>>>0<16,r=r>>>4|0,!k;);return r=pr(e,1052262,2,(b+n|0)-1|0,129-b|0),f[e+8>>2]=a,f[e+12>>2]=t,S=n+128|0,0|r},function(r,e){return r|=0,0|Qr(f[(e|=0)>>2],f[e+4>>2],r)},Ee,Ge,re,function(r,e){return 0|Qr(r|=0,1051416,e|=0)},Ge,re,function(r,e){return 0|fi[f[f[(e|=0)+4>>2]+12>>2]](f[e>>2],1053584,5)},function(r,e,i,A){i|=0,A|=0,f[(r|=0)+12>>2]=0,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1051612},function(r,e,i,A){r|=0,e|=0,i|=0;var n=0;e=0;r:{if((0|(A|=0))>=0){if(!A){n=1;break r}if(e=A,n=V(A))break r;r=1}else r=0;Ze(r,1057036),$f()}i=ze(n,i,A),f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=e},function(r,e,i,A){r|=0,e|=0,i|=0;var n=0;e=0;r:{if((0|(A|=0))>=0){if(!A){n=1;break r}if(e=A,n=V(A))break r;r=1}else r=0;Ze(r,1057036),$f()}i=ze(n,i,A),f[r+8>>2]=e,f[r+4>>2]=A,f[r>>2]=i,f[r+12>>2]=e>>>0>131071?29:129-(o(e>>>10|0)<<2)|0},function(r){return 0},function(r,e,i){},function(r,e,i,A){var n;if(r|=0,i|=0,A|=0,1&(n=f[(e|=0)>>2]))ne(r,e,n,-2&n,i,A);else{if(e=f[n+8>>2],f[n+8>>2]=e+1,(0|e)>=0)return f[r+12>>2]=n,f[r+8>>2]=A,f[r+4>>2]=i,void(f[r>>2]=1052028);Xe(),$f()}},function(r,e,i,A){if(r|=0,i|=0,A|=0,1&(e=f[(e|=0)>>2]))return e=Pe(-2&e,i,A),f[r+8>>2]=A,f[r+4>>2]=e,void(f[r>>2]=(i-e|0)+A);Wr(r,e,i,A)},function(r,e,i,A){r|=0,i|=0,A|=0;var n=0,a=0,t=0,b=0,k=0;r:{e:{i:{A:{if(1&(e=f[(e|=0)>>2])){if(n=(e=(t=i-(a=-2&e)|0)+A|0)>>>0>131071?29:129-(o(e>>>10|0)<<2)|0,(0|i)==(0|a)){i=n,A=e;break r}if((i=(b=n>>>5|0)+t|0)>>>0<134217728)break i;if(!(i=V(20)))break A;f[i+16>>2]=1,k=e+b|0,f[i+8>>2]=k,f[i>>2]=k,f[i+4>>2]=a-b,f[i+12>>2]=n>>>2&7;break e}return void yr(r,e,i,A)}$f()}i=29&n|i<<5}e=e>>>0>=(n=e-t|0)>>>0?n:0,a=a+t|0}f[r+12>>2]=i,f[r+8>>2]=A,f[r+4>>2]=e,f[r>>2]=a},function(r){return 0|(r=1&(r=f[(r|=0)>>2])?1:1==f[r+8>>2])},function(r,e,i){e|=0,i|=0;var A,n=0,a=0;S=A=S-16|0;r:{e:{i:{A:{if(1&(r=f[(r|=0)>>2])){if((0|(e=(e-(r&=-2)|0)+i|0))<0)break A;if((i=-8&(n=f[r-4>>2]))>>>0>>0)break e;if(i>>>0>e+39>>>0&&n)break r;nr(r)}else if(e=f[r+8>>2],f[r+8>>2]=e-1,1==(0|e)){if((0|(e=f[r+4>>2]))<0)break i;if(i=f[r>>2],(a=-8&(n=f[i-4>>2]))>>>0>>0)break e;if(e+39>>>0>>0&&n)break r;if(nr(i),(e=-8&(i=f[r-4>>2]))>>>0<((i&=3)?16:20)>>>0)break e;if(e>>>0>=52&&i)break r;nr(r)}return void(S=A+16|0)}ge(1051952,43,A+15|0,1051936,1051996),$f()}ge(1051952,43,A+15|0,1051936,1052012),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},function(r,e,i,A){var n;if(r|=0,i|=0,A|=0,1&(n=f[(e|=0)>>2]))ne(r,e,n,n,i,A);else{if(e=f[n+8>>2],f[n+8>>2]=e+1,(0|e)>=0)return f[r+12>>2]=n,f[r+8>>2]=A,f[r+4>>2]=i,void(f[r>>2]=1052028);Xe(),$f()}},function(r,e,i,A){if(r|=0,i|=0,A|=0,1&(e=f[(e|=0)>>2]))return e=Pe(e,i,A),f[r+8>>2]=A,f[r+4>>2]=e,void(f[r>>2]=(i-e|0)+A);Wr(r,e,i,A)},function(r,e,i,A){r|=0,i|=0,A|=0;var n=0,a=0,t=0,b=0,k=0;r:{e:{i:{A:{if(1&(e=f[(e|=0)>>2])){if(a=(n=(t=i-e|0)+A|0)>>>0>131071?29:129-(o(n>>>10|0)<<2)|0,(0|e)==(0|i)){i=a,A=n;break r}if((i=(b=a>>>5|0)+t|0)>>>0<134217728)break i;if(!(i=V(20)))break A;f[i+16>>2]=1,k=n+b|0,f[i+8>>2]=k,f[i>>2]=k,f[i+4>>2]=e-b,f[i+12>>2]=a>>>2&7;break e}return void yr(r,e,i,A)}$f()}i=29&a|i<<5}n=n>>>0>=(a=n-t|0)>>>0?a:0,e=e+t|0}f[r+12>>2]=i,f[r+8>>2]=A,f[r+4>>2]=n,f[r>>2]=e},function(r,e,i){e|=0,i|=0;var A,n=0,a=0;S=A=S-16|0;r:{e:{i:{A:{f:{n:{if(1&(r=f[(r|=0)>>2])){if((0|(e=(e-r|0)+i|0))<0)break A;if((i=-8&(n=f[r-4>>2]))>>>0>>0)break r;if(!n|i>>>0<=e+39>>>0)break n;break e}if(e=f[r+8>>2],f[r+8>>2]=e-1,1!=(0|e))break f;if((0|(e=f[r+4>>2]))<0)break i;if(i=f[r>>2],(a=-8&(n=f[i-4>>2]))>>>0>>0)break r;if(e+39>>>0>>0&&n)break e;if(nr(i),(e=-8&(i=f[r-4>>2]))>>>0<((i&=3)?16:20)>>>0)break r;if(i&&e>>>0>=52)break e}nr(r)}return void(S=A+16|0)}ge(1051952,43,A+15|0,1051936,1051996),$f()}ge(1051952,43,A+15|0,1051936,1052012),$f()}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()},function(r,e){return 0|fi[f[f[(e|=0)+4>>2]+12>>2]](f[e>>2],1051600,11)},function(r,e,i,A){var n;r|=0,i|=0,A|=0,e=f[(e|=0)>>2],n=f[e+8>>2],f[e+8>>2]=n+1,(0|n)<0&&(Xe(),$f()),f[r+12>>2]=e,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1052028},function(r,e,i,A){i|=0,A|=0,Wr(r|=0,f[(e|=0)>>2],i,A)},function(r,e,i,A){i|=0,A|=0,yr(r|=0,f[(e|=0)>>2],i,A)},function(r){return 1==f[f[(r|=0)>>2]+8>>2]|0},function(r,e,i){e|=0,i|=0;var A=0,n=0,a=0;S=e=S-16|0,r=f[(r|=0)>>2],i=f[r+8>>2],f[r+8>>2]=i-1;r:{e:{i:{A:{f:{if(1==(0|i)){if((0|(i=f[r+4>>2]))<0)break f;if(A=f[r>>2],(a=-8&(n=f[A-4>>2]))>>>0>>0)break A;if(i+39>>>0>>0&&n)break i;if(nr(A),(i=-8&(A=f[r-4>>2]))>>>0<((A&=3)?16:20)>>>0)break e;if(i>>>0>=52&&A)break r;nr(r)}return void(S=e+16|0)}ge(1051952,43,e+15|0,1051936,1052012),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},Ee,Ge,re,function(r,e){return 0|Qr(r|=0,1052212,e|=0)},function(r,e){e|=0;var A,n=0,a=0;S=A=S-144|0,r=f[(r|=0)>>2];r:{e:{if(!(33554432&(n=f[e+8>>2]))){if(67108864&n)break e;Kr(A+8|0,f[r>>2],A+16|0),r=pr(e,1,0,f[A+8>>2],f[A+12>>2]);break r}for(r=f[r>>2],n=129;a=15&r,i[14+(n+A|0)|0]=a>>>0<10?48|a:a+87|0,n=n-1|0,a=r>>>0>15,r=r>>>4|0,a;);r=pr(e,1052262,2,15+(n+A|0)|0,129-n|0);break r}for(r=f[r>>2],n=129;a=15&r,i[14+(n+A|0)|0]=a>>>0<10?48|a:a+55|0,n=n-1|0,a=r>>>0>15,r=r>>>4|0,a;);r=pr(e,1052262,2,15+(n+A|0)|0,129-n|0)}return S=A+144|0,0|r},function(r,e){return 0|Qr(r|=0,1053260,e|=0)},re,function(r,e){f[(r|=0)+8>>2]=2086828853,f[r+12>>2]=-1795647643,f[r>>2]=-2078298696,f[r+4>>2]=662475520},function(r,e){f[(r|=0)+8>>2]=-691315347,f[r+12>>2]=1676365868,f[r>>2]=1470513528,f[r+4>>2]=-1182065807},function(r,e){return r|=0,0|fi[f[f[(e|=0)+4>>2]+12>>2]](f[e>>2],f[r>>2],f[r+4>>2])},function(r,e){var i,A;r|=0,i=f[(e|=0)+4>>2],A=f[e>>2],(e=V(8))||$f(),f[e+4>>2]=i,f[e>>2]=A,f[r+4>>2]=1053400,f[r>>2]=e},function(r,e){e|=0,f[(r|=0)+4>>2]=1053400,f[r>>2]=e},function(r,e){var i;r|=0,i=f[(e|=0)+4>>2],f[r>>2]=f[e>>2],f[r+4>>2]=i},Be,function(r,e){e|=0;var i,A=0,n=0,a=0;return S=i=S-32|0,-2147483648==f[(r|=0)>>2]?(r=f[f[r+12>>2]>>2],a=f[(n=r+8|0)+4>>2],f[(A=i+16|0)>>2]=f[n>>2],f[A+4>>2]=a,a=f[(n=r+16|0)+4>>2],f[(A=i+24|0)>>2]=f[n>>2],f[A+4>>2]=a,A=f[r+4>>2],f[i+8>>2]=f[r>>2],f[i+12>>2]=A,r=Qr(f[e>>2],f[e+4>>2],i+8|0)):r=0|fi[f[f[e+4>>2]+12>>2]](f[e>>2],f[r+4>>2],f[r+8>>2]),S=i+32|0,0|r},function(r,e){r|=0;var i,A=0,n=0,a=0,t=0;S=i=S+-64|0,-2147483648==f[(e|=0)>>2]&&(A=f[e+12>>2],f[i+36>>2]=0,f[i+28>>2]=0,f[i+32>>2]=1,A=f[A>>2],t=f[(a=A+8|0)+4>>2],f[(n=i+48|0)>>2]=f[a>>2],f[n+4>>2]=t,t=f[(a=A+16|0)+4>>2],f[(n=i+56|0)>>2]=f[a>>2],f[n+4>>2]=t,n=f[A+4>>2],f[i+40>>2]=f[A>>2],f[i+44>>2]=n,Qr(i+28|0,1053360,i+40|0),a=f[i+36>>2],f[i+24>>2]=a,n=f[i+32>>2],A=f[i+28>>2],f[i+16>>2]=A,f[i+20>>2]=n,f[e+8>>2]=a,f[e>>2]=A,f[e+4>>2]=n),A=f[e>>2],n=f[e+4>>2],f[e>>2]=0,f[e+4>>2]=1,e=e+8|0,f[(a=i+8|0)>>2]=f[e>>2],f[e>>2]=0,f[i>>2]=A,f[i+4>>2]=n,(e=V(12))||$f(),A=f[i+4>>2],f[e>>2]=f[i>>2],f[e+4>>2]=A,f[e+8>>2]=f[a>>2],f[r+4>>2]=1053384,f[r>>2]=e,S=i- -64|0},function(r,e){r|=0;var i,A=0,n=0,a=0,t=0;S=i=S-48|0,-2147483648==f[(e|=0)>>2]&&(n=f[e+12>>2],f[i+20>>2]=0,f[i+12>>2]=0,f[i+16>>2]=1,n=f[n>>2],t=f[(a=n+8|0)+4>>2],f[(A=i+32|0)>>2]=f[a>>2],f[A+4>>2]=t,t=f[(a=n+16|0)+4>>2],f[(A=i+40|0)>>2]=f[a>>2],f[A+4>>2]=t,A=f[n+4>>2],f[i+24>>2]=f[n>>2],f[i+28>>2]=A,Qr(i+12|0,1053360,i+24|0),a=f[i+20>>2],f[i+8>>2]=a,n=f[i+16>>2],A=f[i+12>>2],f[i>>2]=A,f[i+4>>2]=n,f[e+8>>2]=a,f[e>>2]=A,f[e+4>>2]=n),f[r+4>>2]=1053384,f[r>>2]=e,S=i+48|0},function(r,e){f[(r|=0)>>2]=0},function(r,e,i){e|=0,i|=0;var A=0;return A=f[(r|=0)+8>>2],f[r>>2]-A>>>0>>0&&(Ae(r,A,i,1,1),A=f[r+8>>2]),ze(f[r+4>>2]+A|0,e,i),f[r+8>>2]=i+A,0},function(r,e){e|=0;var A,n=0,a=0;n=A=f[(r|=0)+8>>2],a=1,e>>>0<128||(a=2,e>>>0<2048||(a=e>>>0<65536?3:4)),a>>>0>f[r>>2]-A>>>0&&(Ae(r,A,a,1,1),n=f[r+8>>2]),n=f[r+4>>2]+n|0;r:{e:{if(e>>>0>=128){if(e>>>0<2048)break e;if(e>>>0>=65536){i[n+3|0]=63&e|128,i[0|n]=e>>>18|240,i[n+2|0]=e>>>6&63|128,i[n+1|0]=e>>>12&63|128;break r}i[n+2|0]=63&e|128,i[0|n]=e>>>12|224,i[n+1|0]=e>>>6&63|128;break r}i[0|n]=e;break r}i[n+1|0]=63&e|128,i[0|n]=e>>>6|192}return f[r+8>>2]=A+a,0},function(r,e){return 0|Qr(r|=0,1057216,e|=0)},function(r,e,i,A){i|=0,A|=0,f[(r|=0)+12>>2]=0,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1055092},function(r,e,i,A){i|=0,A|=0,f[(r|=0)+12>>2]=0,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1056088},function(r,e,i,A){i|=0,A|=0,f[(r|=0)+12>>2]=0,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1057440},function(r,e,i,A){i|=0,A|=0,f[(r|=0)+12>>2]=0,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1057596},function(r,e,i,A){i|=0,A|=0,f[(r|=0)+12>>2]=0,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1058520},function(r,e,i,A){var n;r|=0,i|=0,A|=0,e=f[(e|=0)>>2],n=f[e+16>>2],f[e+16>>2]=n+1,(0|n)<0&&(Xe(),$f()),f[r+12>>2]=e,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1058540},function(r,e,i,A){r|=0,i|=0,A|=0;var n=0,a=0,t=0,b=0,k=0,u=0;r:{e:{i:{A:{if(a=f[(e|=0)>>2],1!=f[a+16>>2]){if((0|A)>=0){if(!A){e=0,k=1;break A}if(e=A,k=V(A))break A;r=1}else r=0;Ze(r,1057036),$f()}f[a+8>>2]=0,k=f[(t=a+4|0)>>2],e=f[a>>2],f[a>>2]=0,f[a+4>>2]=1,n=f[a+16>>2],f[a+16>>2]=n-1;f:{if(1==(0|n)){if(n=f[a>>2]){if(t=f[t>>2],(u=-8&(b=f[t-4>>2]))>>>0>>0)break e;if(n+39>>>0>>0&&b)break r;nr(t)}if((n=-8&(t=f[a-4>>2]))>>>0<((t&=3)?24:28)>>>0)break e;if(n>>>0>=60&&t)break f;nr(a)}Pe(k,i,A);break i}break r}if(ze(k,i,A),i=f[a+16>>2],f[a+16>>2]=i-1,1==(0|i)){if(i=f[a>>2]){if(t=f[a+4>>2],(n=-8&(b=f[t-4>>2]))>>>0>>0)break e;if(n>>>0>i+39>>>0&&b)break r;nr(t)}if((i=-8&(n=f[a-4>>2]))>>>0<((n&=3)?24:28)>>>0)break e;if(i>>>0>=60&&n)break r;nr(a)}}return f[r+8>>2]=A,f[r+4>>2]=k,void(f[r>>2]=e)}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},function(r,e,i,A){r|=0,i|=0,A|=0;var n=0,a=0,t=0,b=0,k=0;r:{e:{i:{A:{f:{n:{if(e=f[(e|=0)>>2],1!=f[e+16>>2]){if((0|A)>=0){if(!A){a=1;break n}if(b=A,a=V(A))break n;r=1}else r=0;Ze(r,1057036),$f()}b=f[e+4>>2]+(f[e>>2]-i|0)|0,a=i;break f}if(ze(a,i,A),i=f[e+16>>2],f[e+16>>2]=i-1,1==(0|i)){if(i=f[e>>2]){if(n=f[e+4>>2],(k=-8&(t=f[n-4>>2]))>>>0>>0)break A;if(i+39>>>0>>0&&t)break i;nr(n)}if((i=-8&(n=f[e-4>>2]))>>>0<((n&=3)?24:28)>>>0)break e;if(i>>>0>=60&&n)break r;nr(e)}e=b>>>0>131071?29:129-(o(b>>>10|0)<<2)|0}return f[r+12>>2]=e,f[r+8>>2]=b,f[r+4>>2]=A,void(f[r>>2]=a)}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},function(r){return 1==f[f[(r|=0)>>2]+16>>2]|0},function(r,e,i){e|=0,i|=0;var A=0,n=0;r=f[(r|=0)>>2],e=f[r+16>>2],f[r+16>>2]=e-1;r:{e:{i:{A:{if(1==(0|e)){if(e=f[r>>2]){if(i=f[r+4>>2],(n=-8&(A=f[i-4>>2]))>>>0>>0)break A;if(e+39>>>0>>0&&A)break i;nr(i)}if((e=-8&(i=f[r-4>>2]))>>>0<((i&=3)?24:28)>>>0)break e;if(e>>>0>=60&&i)break r;nr(r)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},function(r){f[(r|=0)+16>>2]=0,f[r+8>>2]=0,f[r+12>>2]=0,f[r>>2]=0,f[r+4>>2]=4}];function ni(r){r|=0;var u=e.byteLength/65536|0,o=u+r|0;if(u>2],f[(E=h+448|0)>>2]=f[g>>2],f[E+4>>2]=e,e=f[h+228>>2],f[h+440>>2]=f[h+224>>2],f[h+444>>2]=e,2==(0|(e=a[h+180>>1]))?(e=0,f[h+488>>2]=0,f[h+472>>2]=0,A[h+468>>1]=0,A[h+464>>1]=0):(A[h+502>>1]=a[h+222>>1],E=a[(g=h+214|0)+4>>1]|a[g+6>>1]<<16,y=h+494|0,g=a[g>>1]|a[g+2>>1]<<16,A[y>>1]=g,A[y+2>>1]=g>>>16,A[y+4>>1]=E,A[y+6>>1]=E>>>16,E=a[(g=h+206|0)+4>>1]|a[g+6>>1]<<16,y=h+486|0,g=a[g>>1]|a[g+2>>1]<<16,A[y>>1]=g,A[y+2>>1]=g>>>16,A[y+4>>1]=E,A[y+6>>1]=E>>>16,E=a[(g=h+198|0)+4>>1]|a[g+6>>1]<<16,y=h+478|0,g=a[g>>1]|a[g+2>>1]<<16,A[y>>1]=g,A[y+2>>1]=g>>>16,A[y+4>>1]=E,A[y+6>>1]=E>>>16,E=a[(g=h+190|0)+4>>1]|a[g+6>>1]<<16,y=h+470|0,g=a[g>>1]|a[g+2>>1]<<16,A[y>>1]=g,A[y+2>>1]=g>>>16,A[y+4>>1]=E,A[y+6>>1]=E>>>16,E=a[h+186>>1]|a[h+188>>1]<<16,g=a[h+182>>1]|a[h+184>>1]<<16,A[h+462>>1]=g,A[h+464>>1]=g>>>16,A[h+466>>1]=E,A[h+468>>1]=E>>>16),A[h+460>>1]=e,v=h+840|0,R=h+460|0,S=o=S-3344|0;r:{e:{i:{A:{f:{n:{a:{if((L=f[(Tr=h+440|0)+8>>2])>>>0>=376)for(Te=o+664|0,ue=o+656|0,Or=o+688|0,Gr=o+680|0,p=o+2608|0,g=o+2616|0,y=f[Tr+4>>2],e=L>>>0>=1e3?1e3:L;;){if(71==n[0|(E=y+B|0)]&&71==n[E+188|0]){B&&(f[o+1456>>2]=B,B>>>0<=L>>>0?(L=L-B|0,f[Tr+8>>2]=L,f[Tr+4>>2]=f[Tr+4>>2]+B):(f[o+1704>>2]=L,f[o+2188>>2]=2,f[o+2184>>2]=1058600,f[o+2196>>2]=2,f[o+2200>>2]=0,f[o+3024>>2]=o+1704,f[o+3028>>2]=3,f[o+3016>>2]=o+1456,f[o+3020>>2]=3,f[o+2192>>2]=o+3016,Me(o+2184|0,1058616),$f())),A[o+2896>>1]=0,f[o+2440>>2]=2,f[o+2444>>2]=0,f[o+2184>>2]=2,f[o+2188>>2]=0,f[o+2608>>2]=3,f[o+2612>>2]=0,B=(L>>>0)/188|0,T=4,e=0;t:{b:{k:{u:{o:{c:{s:{l:{h:{v:{d:{w:{if(!(L>>>0>=188)||(T=V(k(e=B,20)))){if(f[o+2912>>2]=T,f[o+2908>>2]=e,f[o+2916>>2]=0,!(I=B+!!(((k(B,188)-L|0)+L>>>0)%188|0)|0))break d;Ar=o+1832|0,Er=o+2948|0,br=o+3024|0,q=o+3020|0,ke=1,e=188,B=0;g:{y:{for(;;){if(zr(o+2936|0,Tr,B,B+188|0),!(E=f[o+2944>>2]))break s;y=e,I=I-1|0,e=!!(0|E),B=L=f[o+2940>>2];B:{E:{for(;;){if(71!=n[0|B])break E;if(B=B+1|0,!(e=e-1|0))break}if(!E)break s;if(f[o+2928>>2]=0,f[o+2924>>2]=E-1,f[o+2920>>2]=L+1,Jr(E=o+1456|0,o+2920|0),m=n[o+1472|0],B=f[o+1464>>2],e=f[o+1460>>2],3!=(0|(N=f[o+1456>>2])))break v;if(f[o+2968>>2]=f[o+1468>>2],f[o+2964>>2]=B,f[o+2960>>2]=e,Jr(E,o+2960|0),K=n[o+1472|0],B=f[o+1464>>2],e=f[o+1460>>2],3==(0|(N=f[o+1456>>2])))break B;m=K;break v}rr=1,ke=0;break c}if(f[o+2984>>2]=f[o+1468>>2],f[o+2980>>2]=B,f[o+2976>>2]=e,Jr(o+1456|0,o+2976|0),B=f[o+1464>>2],_=f[o+1460>>2],3!=(0|(N=f[o+1456>>2]))){m=n[o+1472|0],e=_;break v}if(e=13,(Q=(O=f[o+1468>>2])+13|0)>>>0>B<<3>>>0)break h;N=Q>>>3|0;B:{E:{if(B){if(C=n[0|_]&255>>>(7&O),er=13,(ie=8-O|0)>>>0>13){E=0;break E}if(E=C<<(e=O+5|0),J=0,Q>>>0<8)break B;for(Ir=_+1|0,O=B-1|0,er=7&e,W=N;;){if(!O|!e)break B;if(ie=8,C=n[0|Ir],e>>>0<8){O=0;break E}if(Ir=Ir+1|0,O=O-1|0,E=(C<<(15&(e=e-8|0)))+E|0,!(W=W-1|0))break}}else E=0;J=0;break B}J=O+er|0,E=(C>>>(ie-er&15)|0)+E|0}B:{E:{if(B>>>0>=N>>>0){if(e=2,(Y=J+2|0)>>>0>(F=B-N|0)<<3>>>0)break h;if(Yr=_+N|0,_=Y>>>3|0,O=0,er=0,(0|B)==(0|N))break B;if(W=n[0|Yr]&255>>>(7&J),D=2,(ur=8-J|0)>>>0>2)break E;if(O=W<<(Q=J-6|0),Y>>>0<8)break B;for(e=J-14|0,D=7&Q,C=Yr+1|0,B=(-1^N)+B|0,N=_;;){if(!B|-8==(0|e))break B;if(ur=8,W=n[0|C],e+8>>>0<8){J=0;break E}if(C=C+1|0,B=B-1|0,O=(W<<(15&e))+O|0,e=e-8|0,!(N=N-1|0))break}break B}xe(N,B,1053076),$f()}er=D+J|0,O=(W>>>(ur-D&15)|0)+O|0}if(!(_>>>0<=F>>>0))break;if(f[o+3312>>2]=er,f[o+3308>>2]=F-_,f[o+3304>>2]=_+Yr,Jr(o+1456|0,o+3304|0),Q=n[o+1472|0],B=f[o+1464>>2],e=f[o+1460>>2],3!=(0|(N=f[o+1456>>2]))){m=Q;break v}if(f[o+3328>>2]=f[o+1468>>2],f[o+3324>>2]=B,f[o+3320>>2]=e,Jr(o+1456|0,o+3320|0),_=n[o+1472|0],B=f[o+1464>>2],Ir=f[o+1460>>2],3!=(0|(N=f[o+1456>>2]))){m=_,e=Ir;break v}if(e=4,(N=f[o+1468>>2]+4|0)>>>0>B<<3>>>0)break h;if((w=N>>>3|0)>>>0>B>>>0)break y;if((e=B-w|0)>>>0<(d=!!(7&N))>>>0)break g;B=e-d|0,e=d+(w+Ir|0)|0;B:{E:{_:{if(!(!(1&_)|1&m|65535&O)){if(1&Q){if(!B)break u;if((d=B-1|0)>>>0<(w=n[0|e])>>>0)break _;B=d-w|0,e=1+(e+w|0)|0}if(B)break E;B=0}d=f[(w=o+3032|0)>>2],w=f[w+4>>2],f[(N=o+1720|0)>>2]=d,f[N+4>>2]=w,N=f[br+4>>2],f[Ar>>2]=f[br>>2],f[Ar+4>>2]=N,f[(N=o+1840|0)>>2]=d,f[N+4>>2]=w,A[o+1848>>1]=a[o+3040>>1],f[o+3020>>2]=B,f[o+3016>>2]=e,e=f[o+3020>>2],f[o+1824>>2]=f[o+3016>>2],f[o+1828>>2]=e;break B}xe(w,d,1054388),$f()}if(_r(br,o+2936|0,e,B),A[o+1728>>1]=E,w=f[(e=o+3032|0)>>2],d=f[e+4>>2],f[(e=o+1720|0)>>2]=w,f[e+4>>2]=d,A[o+1848>>1]=E,e=f[br+4>>2],f[Ar>>2]=f[br>>2],f[Ar+4>>2]=e,f[(e=o+1840|0)>>2]=w,f[e+4>>2]=d,f[o+1824>>2]=1,f[o+1828>>2]=0,N=n[o+3043|0],f[o+2908>>2]==(0|tr)){E=0,S=B=S-32|0,e=qe(m=(e=(_=f[(Q=o+2908|0)>>2])<<1)>>>0<=4?4:e,0,20,0);E:{if(!(M||e>>>0>2147483644)){if(d=e,e=B,_?(f[e+28>>2]=k(_,20),f[e+20>>2]=f[Q+4>>2],w=4):w=0,f[e+24>>2]=w,Ce(e+8|0,4,d,e+20|0),1!=f[e+8>>2])break E;E=f[e+12>>2]}Ze(E,1054260),$f()}d=f[e+12>>2],f[Q>>2]=m,f[Q+4>>2]=d,S=e+32|0,T=f[o+2912>>2]}e=f[Ar+4>>2],B=k(tr,20)+T|0,f[(d=B)>>2]=f[Ar>>2],f[d+4>>2]=e,d=f[(e=Ar+8|0)>>2],w=f[e+4>>2],E=a[Ar+16>>1],i[B+19|0]=N,i[B+18|0]=1&K,A[B+16>>1]=E,f[(e=B+8|0)>>2]=d,f[e+4>>2]=w,tr=tr+1|0,f[o+2916>>2]=tr}if(fi[f[f[o+2936>>2]+16>>2]](Er,f[o+2940>>2],f[o+2944>>2]),e=y+188|0,N=L,B=y,!I)break w}xe(_,F,1053076),$f()}xe(w,B,1053076),$f()}xe(d,e,1053076),$f()}Ze(4,1054116),$f()}if(tr){q=(e=f[o+2912>>2])+k(tr,20)|0,I=e+20|0,Y=o+1704|0,Ar=o+3156|0,Nr=o+2864|0,K=o+2740|0,Q=o+3284|0,er=o+3168|0,vr=o+3272|0,rr=o+3148|0,_=o+2876|0,kr=o+2856|0,F=o+2768|0,Yr=o+2760|0,m=o+2748|0,J=o+3256|0,y=o+2572|0,Ir=o+2316|0;w:{for(;;){g:{B=I;y:{B:{E:{_:{I:{Q:{N:{R:{C:{if(d=a[e+16>>1]){if(1!=a[o+2896>>1]){e=E;break y}if((0|d)==a[o+2898>>1])break C;e=E;break y}if(n[e+18|0])break R;e=E;break y}if(1!=n[e+18|0]){e=E;break y}if(le(o+3016|0,f[e+4>>2],f[e+8>>2]),w=a[o+3028>>1],I=f[o+3024>>2],e=f[o+3020>>2],3!=(0|(N=f[o+3016>>2]))){T=e,e=E,O=w|a[o+3030>>1]<<16;break I}if(d=w>>>0>I>>>0)break _;if((d=w-(d?I:0)|0)>>>0<=I>>>0){if(!(65534&(d=d>>>0>=(I=d-4|0)>>>0?I:0))){T=16;break Q}if(T=2,2==(536870911&d))break Q;if(T=8,!(d-3&536870911))break Q;if(!(536870911&(I=d-4|0)))break Q;if(I){if(!(536870911&(I=d-5|0))){T=3;break Q}if(!(536870910&I)){T=13;break Q}if(I>>>0>1){if(!(536870911&(d=d-7|0))){T=4;break Q}f[o+1704>>2]=e+7,f[o+1708>>2]=d,f[o+1712>>2]=4,Xr(o+3016|0,12,o+1704|0),T=f[o+3020>>2],d=f[o+3024>>2],w=f[o+3028>>2],E=a[o+3032>>1];C:switch(f[o+3016>>2]-1|0){default:if(T)break Q;T=0,N=0,O=0;break I;case 0:I=d,N=1,O=255&E;break I;case 1:I=d,N=2,O=255&E;break I;case 2:break C}if((w=(w>>>3|0)+!!(7&w)|0)>>>0<=d>>>0){if(ye(o+3016|0,E,w+T|0,d-w|0),T=f[o+3024>>2],N=f[o+3020>>2],f[o+3016>>2])break N;if(T>>>0<5)break y;for(;;){Rr=n[N+2|0]|(31&n[N+1|0])<<8,Er=n[N+3|0],O=n[N+4|0],(d=n[0|N])>>>0>36?(ur=0,C=0,L=0,D=0,W=1,I=1,br=1):(w=31&d,I=(63&d)>>>0>=32?15>>>w|0:((1<>>w,w=31&d,W=(63&d)>>>0>=32?31>>>w|0:((1<>>w,D=(63&d)>>>0<32?131072>>>d|0:0,L=(63&d)>>>0<32?32768>>>d|0:0,C=(63&d)>>>0<32?16>>>d|0:0,ur=(63&d)>>>0<32?8>>>d|0:0,w=31&d,br=(63&d)>>>0>=32?31>>>w|0:((1<>>w),E=w=f[o+2188>>2];C:{p:{m:{G:{if(!(!(1&br)&!w&2==(0|(d=f[o+2184>>2])))){if(1&(w=!f[o+2612>>2]&3==f[o+2608>>2])&(C|ur))break G;if(1&w&(D|L))break m;if(!(1&(2!=f[o+2440>>2]|0!=f[o+2444>>2]|W)))break p;if(1&(2!=(0|d)|!!(0|E)|I))break C;N=2,T=1054324,I=32,O=57;break I}d=f[o+3308>>2],f[Ir>>2]=f[o+3304>>2],f[Ir+4>>2]=d,f[Ir+8>>2]=f[o+3312>>2],f[o+2312>>2]=0,f[o+2296>>2]=0,f[o+2300>>2]=0,f[o+2280>>2]=0,f[o+2284>>2]=0,f[o+2264>>2]=0,f[o+2268>>2]=0,f[o+2248>>2]=0,f[o+2252>>2]=0,f[o+2232>>2]=0,f[o+2236>>2]=0,f[o+2216>>2]=0,f[o+2220>>2]=0,f[o+2200>>2]=0,f[o+2204>>2]=0,f[o+2184>>2]=0,f[o+2188>>2]=0,i[o+2436|0]=0,f[o+2432>>2]=0,f[o+2424>>2]=0,f[o+2428>>2]=8,f[o+2336>>2]=2,f[o+2340>>2]=0,i[o+2334|0]=0,A[o+2332>>1]=0,A[o+2330>>1]=Rr,A[o+2328>>1]=1;break C}if(I=o+3328|0,f[rr+8>>2]=f[I>>2],d=f[o+3324>>2],f[rr>>2]=f[o+3320>>2],f[rr+4>>2]=d,f[o+3272>>2]=0,f[o+3276>>2]=8,i[o+3166|0]=0,A[o+3164>>1]=0,A[o+3160>>1]=0,f[o+3144>>2]=0,f[o+3128>>2]=0,f[o+3132>>2]=0,f[o+3112>>2]=0,f[o+3116>>2]=0,f[o+3096>>2]=0,f[o+3100>>2]=0,f[o+3080>>2]=0,f[o+3084>>2]=0,f[o+3064>>2]=0,f[o+3068>>2]=0,f[o+3048>>2]=0,f[o+3052>>2]=0,f[o+3032>>2]=0,f[o+3036>>2]=0,f[o+3016>>2]=0,f[o+3020>>2]=0,f[Q>>2]=0,f[Q+4>>2]=0,A[(d=Q+6|0)>>1]=0,A[d+2>>1]=0,A[d+4>>1]=0,A[d+6>>1]=0,f[o+3280>>2]=0,f[(E=o+2984|0)>>2]=f[vr+8>>2],f[o+3168>>2]=2,f[o+3172>>2]=0,d=f[vr+4>>2],f[o+2976>>2]=f[vr>>2],f[o+2980>>2]=d,ze(w=o+1704|0,er,104),Br(p),d=f[o+3324>>2],f[K>>2]=f[o+3320>>2],f[K+4>>2]=d,f[K+8>>2]=f[I>>2],f[o+2736>>2]=0,f[o+2720>>2]=0,f[o+2724>>2]=0,f[o+2704>>2]=0,f[o+2708>>2]=0,f[o+2688>>2]=0,f[o+2692>>2]=0,f[o+2672>>2]=0,f[o+2676>>2]=0,f[o+2656>>2]=0,f[o+2660>>2]=0,f[o+2640>>2]=0,f[o+2644>>2]=0,f[o+2624>>2]=0,f[o+2628>>2]=0,f[o+2608>>2]=0,f[o+2612>>2]=0,i[o+2758|0]=0,A[o+2756>>1]=0,A[o+2754>>1]=Rr,A[o+2752>>1]=1,ze(Yr,w,104),f[_>>2]=0,f[_+4>>2]=0,A[(d=_+6|0)>>1]=0,A[d+2>>1]=0,A[d+4>>1]=0,A[d+6>>1]=0,f[Nr+8>>2]=f[E>>2],d=f[o+2980>>2],f[Nr>>2]=f[o+2976>>2],f[Nr+4>>2]=d,!(d=f[o+3144>>2]))break C;fi[f[d+16>>2]](Ar,f[o+3148>>2],f[o+3152>>2]);break C}if(I=o+2944|0,f[rr+8>>2]=f[I>>2],d=f[o+2940>>2],f[rr>>2]=f[o+2936>>2],f[rr+4>>2]=d,i[o+3276|0]=0,i[o+3166|0]=0,A[o+3164>>1]=0,A[o+3160>>1]=0,f[o+3144>>2]=0,f[o+3128>>2]=0,f[o+3132>>2]=0,f[o+3112>>2]=0,f[o+3116>>2]=0,f[o+3096>>2]=0,f[o+3100>>2]=0,f[o+3080>>2]=0,f[o+3084>>2]=0,f[o+3064>>2]=0,f[o+3068>>2]=0,f[o+3048>>2]=0,f[o+3052>>2]=0,f[o+3032>>2]=0,f[o+3036>>2]=0,f[o+3016>>2]=0,f[o+3020>>2]=0,f[o+3256>>2]=0,f[o+3260>>2]=8,f[o+3264>>2]=0,f[(E=o+2984|0)>>2]=f[J+8>>2],f[o+3168>>2]=2,f[o+3172>>2]=0,i[o+3277|0]=0,i[o+3278|0]=0,f[o+3268>>2]=0,f[o+3272>>2]=0,d=f[J+4>>2],f[o+2976>>2]=f[J>>2],f[o+2980>>2]=d,ze(w=o+1704|0,er,88),Br(p),d=f[o+2940>>2],f[m>>2]=f[o+2936>>2],f[m+4>>2]=d,f[m+8>>2]=f[I>>2],f[o+2744>>2]=0,f[o+2728>>2]=0,f[o+2732>>2]=0,f[o+2712>>2]=0,f[o+2716>>2]=0,f[o+2696>>2]=0,f[o+2700>>2]=0,f[o+2680>>2]=0,f[o+2684>>2]=0,f[o+2664>>2]=0,f[o+2668>>2]=0,f[o+2648>>2]=0,f[o+2652>>2]=0,f[o+2632>>2]=0,f[o+2636>>2]=0,f[o+2616>>2]=0,f[o+2620>>2]=0,f[o+2608>>2]=2,f[o+2612>>2]=0,i[o+2766|0]=0,A[o+2764>>1]=0,A[o+2762>>1]=Rr,A[o+2760>>1]=1,ze(F,w,88),f[kr+8>>2]=f[E>>2],d=f[o+2980>>2],f[kr>>2]=f[o+2976>>2],f[kr+4>>2]=d,i[o+2877|0]=0,i[o+2878|0]=0,i[o+2876|0]=1&D,f[o+2868>>2]=0,f[o+2872>>2]=0,!(d=f[o+3144>>2]))break C;fi[f[d+16>>2]](Ar,f[o+3148>>2],f[o+3152>>2]);break C}d=f[o+1460>>2],f[y>>2]=f[o+1456>>2],f[y+4>>2]=d,f[y+8>>2]=f[o+1464>>2],f[o+2568>>2]=0,f[o+2552>>2]=0,f[o+2556>>2]=0,f[o+2536>>2]=0,f[o+2540>>2]=0,f[o+2520>>2]=0,f[o+2524>>2]=0,f[o+2504>>2]=0,f[o+2508>>2]=0,f[o+2488>>2]=0,f[o+2492>>2]=0,f[o+2472>>2]=0,f[o+2476>>2]=0,f[o+2456>>2]=0,f[o+2460>>2]=0,f[o+2440>>2]=0,f[o+2444>>2]=0,f[o+2600>>2]=0,f[o+2604>>2]=0,f[o+2592>>2]=0,f[o+2596>>2]=8,i[o+2590|0]=0,A[o+2588>>1]=0,A[o+2586>>1]=Rr,A[o+2584>>1]=1}if((d=5+((15&Er)<<8|O)|0)>>>0<=T>>>0){if(N=d+N|0,(T=T-d|0)>>>0>4)continue;break y}break}xe(d,T,1054356),$f()}xe(w,d,1053076),$f()}xe(2,I,1053076),$f()}xe(1,0,1053076),$f()}xe(d,I,1053076),$f()}le(o+3016|0,f[e+4>>2],f[e+8>>2]),d=a[o+3028>>1],I=f[o+3024>>2],N=f[o+3020>>2];R:{C:{p:{T=f[o+3016>>2],e=d|a[o+3030>>1]<<16;m:if(3==(0|T)){if(d>>>0<13){e=E;break y}if(e=d>>>0>I>>>0)break p;G:{Y:{W:{if((d=d-(e?I:0)|0)>>>0<=I>>>0){if(!(65534&(I=(e=d-4|0)>>>0<=d>>>0?e:0))){e=16;break G}if(e=2,2==(536870911&I))break G;if(e=8,!(I-3&536870911))break G;if(!(536870911&(d=I-4|0)))break G;if(!d)break W;f[o+1712>>2]=0,f[o+1708>>2]=I-5,f[o+1704>>2]=N+5,Xr(o+3016|0,16,o+1704|0),e=f[o+3020>>2],d=f[o+3024>>2],w=f[o+3028>>2],I=a[o+3032>>1];D:{S:{F:switch(f[o+3016>>2]-1|0){default:if(e)break G;N=0,T=0,e=0;break m;case 0:T=1;break S;case 1:break F;case 2:break D}T=2}O=255&I,I=d,N=e,e=65535&O;break m}if((O=d)>>>0<(d=(w>>>3|0)+!!(7&w)|0)>>>0)break Y;if(N=e+d|0,e=O-d|0,!(65535&I)){if(e>>>0<4){e=E;break y}N=N+4|0,e=e-4|0}if(!(536870910&e))break p;A[o+2896>>1]=1,A[o+2898>>1]=n[N+1|0]|(31&n[0|N])<<8,e=E;break y}xe(d,I,1053076),$f()}xe(1,0,1053076),$f()}xe(d,O,1053076),$f()}N=1+(e>>>3|0)|0,T=0,e=0}if(T){f[o+1712>>2]=e,f[o+1708>>2]=I,f[o+1704>>2]=N,f[o+3020>>2]=1,f[o+3016>>2]=1054480,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+2936>>2]=Y,f[o+2940>>2]=4,f[o+3024>>2]=o+2936,Mr(o+1456|0,o+3016|0),I=f[o+1460>>2],T=f[o+1456>>2],N=f[o+1464>>2];break C}}if(!(I=V(25)))break R;i[I+24|0]=n[1054456],d=n[1054452]|n[1054453]<<8|n[1054454]<<16|n[1054455]<<24,w=I+16|0,e=n[1054448]|n[1054449]<<8|n[1054450]<<16|n[1054451]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054444]|n[1054445]<<8|n[1054446]<<16|n[1054447]<<24,w=I+8|0,e=n[1054440]|n[1054441]<<8|n[1054442]<<16|n[1054443]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054436]|n[1054437]<<8|n[1054438]<<16|n[1054439]<<24,e=n[1054432]|n[1054433]<<8|n[1054434]<<16|n[1054435]<<24,i[0|I]=e,i[I+1|0]=e>>>8,i[I+2|0]=e>>>16,i[I+3|0]=e>>>24,i[I+4|0]=d,i[I+5|0]=d>>>8,i[I+6|0]=d>>>16,i[I+7|0]=d>>>24,T=25,N=25}e=E;break B}break A}if(3==(0|N))break y;I=f[o+3028>>2],O=f[o+3032>>2];break I}T=1+(T>>>3|0)|0,N=0,O=0}if(N)break E;E=e}if(!(I=V(25)))break w;i[I+24|0]=n[1054456],d=n[1054452]|n[1054453]<<8|n[1054454]<<16|n[1054455]<<24,w=I+16|0,e=n[1054448]|n[1054449]<<8|n[1054450]<<16|n[1054451]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054444]|n[1054445]<<8|n[1054446]<<16|n[1054447]<<24,w=I+8|0,e=n[1054440]|n[1054441]<<8|n[1054442]<<16|n[1054443]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054436]|n[1054437]<<8|n[1054438]<<16|n[1054439]<<24,e=n[1054432]|n[1054433]<<8|n[1054434]<<16|n[1054435]<<24,i[0|I]=e,i[I+1|0]=e>>>8,i[I+2|0]=e>>>16,i[I+3|0]=e>>>24,i[I+4|0]=d,i[I+5|0]=d>>>8,i[I+6|0]=d>>>16,i[I+7|0]=d>>>24,N=25,e=E,T=25;break B}f[o+1712>>2]=O,f[o+1708>>2]=I,f[o+1704>>2]=T,f[o+3020>>2]=1,f[o+3016>>2]=1054480,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+2936>>2]=Y,f[o+2940>>2]=4,f[o+3024>>2]=o+2936,Mr(o+1456|0,o+3016|0),N=f[o+1464>>2],I=f[o+1460>>2],T=f[o+1456>>2]}if(-2147483648!=(0|T))break g}if(d=(0|B)==(0|q))break d;if(I=B+(d?0:20)|0,E=e,e=B)continue;break d}break}f[o+744>>2]=T,f[o+748>>2]=I,f[o+752>>2]=N;break b}break A}}B=p,e=(d=f[o+2608>>2])-2|0;d:{w:{g:{y:{if(f[o+2612>>2]==(d>>>0<2|0)&e>>>0<=1){if(1==(0|e))break y;B=g}if(!a[B+144>>1]){if(!a[R+4>>1])break g;A[B+144>>1]=1,A[B+146>>1]=a[R+6>>1]}}if(!f[o+2188>>2]&2==f[o+2184>>2])break d;if(!a[o+2328>>1])break w;break d}if(!(g=V(63)))break A;d=n[1054191]|n[1054192]<<8|n[1054193]<<16|n[1054194]<<24,w=g+55|0,e=n[1054187]|n[1054188]<<8|n[1054189]<<16|n[1054190]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054184]|n[1054185]<<8|n[1054186]<<16|n[1054187]<<24,w=g+48|0,e=n[1054180]|n[1054181]<<8|n[1054182]<<16|n[1054183]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054176]|n[1054177]<<8|n[1054178]<<16|n[1054179]<<24,w=g+40|0,e=n[1054172]|n[1054173]<<8|n[1054174]<<16|n[1054175]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054168]|n[1054169]<<8|n[1054170]<<16|n[1054171]<<24,w=g+32|0,e=n[1054164]|n[1054165]<<8|n[1054166]<<16|n[1054167]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054160]|n[1054161]<<8|n[1054162]<<16|n[1054163]<<24,w=g+24|0,e=n[1054156]|n[1054157]<<8|n[1054158]<<16|n[1054159]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054152]|n[1054153]<<8|n[1054154]<<16|n[1054155]<<24,w=g+16|0,e=n[1054148]|n[1054149]<<8|n[1054150]<<16|n[1054151]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054144]|n[1054145]<<8|n[1054146]<<16|n[1054147]<<24,w=g+8|0,e=n[1054140]|n[1054141]<<8|n[1054142]<<16|n[1054143]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054136]|n[1054137]<<8|n[1054138]<<16|n[1054139]<<24,e=n[1054132]|n[1054133]<<8|n[1054134]<<16|n[1054135]<<24,i[0|g]=e,i[g+1|0]=e>>>8,i[g+2|0]=e>>>16,i[g+3|0]=e>>>24,i[g+4|0]=d,i[g+5|0]=d>>>8,i[g+6|0]=d>>>16,i[g+7|0]=d>>>24,f[o+752>>2]=63,f[o+748>>2]=g,f[o+744>>2]=63;break b}if(!a[R>>1]){if(!(g=V(63)))break A;f[(e=o+744|0)+8>>2]=63,f[e+4>>2]=g,f[e>>2]=63,d=n[1054254]|n[1054255]<<8|n[1054256]<<16|n[1054257]<<24,w=g+55|0,e=n[1054250]|n[1054251]<<8|n[1054252]<<16|n[1054253]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054247]|n[1054248]<<8|n[1054249]<<16|n[1054250]<<24,w=g+48|0,e=n[1054243]|n[1054244]<<8|n[1054245]<<16|n[1054246]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054239]|n[1054240]<<8|n[1054241]<<16|n[1054242]<<24,w=g+40|0,e=n[1054235]|n[1054236]<<8|n[1054237]<<16|n[1054238]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054231]|n[1054232]<<8|n[1054233]<<16|n[1054234]<<24,w=g+32|0,e=n[1054227]|n[1054228]<<8|n[1054229]<<16|n[1054230]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054223]|n[1054224]<<8|n[1054225]<<16|n[1054226]<<24,w=g+24|0,e=n[1054219]|n[1054220]<<8|n[1054221]<<16|n[1054222]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054215]|n[1054216]<<8|n[1054217]<<16|n[1054218]<<24,w=g+16|0,e=n[1054211]|n[1054212]<<8|n[1054213]<<16|n[1054214]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054207]|n[1054208]<<8|n[1054209]<<16|n[1054210]<<24,w=g+8|0,e=n[1054203]|n[1054204]<<8|n[1054205]<<16|n[1054206]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054199]|n[1054200]<<8|n[1054201]<<16|n[1054202]<<24,e=n[1054195]|n[1054196]<<8|n[1054197]<<16|n[1054198]<<24,i[0|g]=e,i[g+1|0]=e>>>8,i[g+2|0]=e>>>16,i[g+3|0]=e>>>24,i[g+4|0]=d,i[g+5|0]=d>>>8,i[g+6|0]=d>>>16,i[g+7|0]=d>>>24;break b}A[o+2328>>1]=1,A[o+2330>>1]=a[R+2>>1]}e=f[o+2916>>2],B=f[o+2912>>2],f[o+2928>>2]=f[o+2908>>2],f[o+2924>>2]=B,f[o+2920>>2]=B,E=k(e,20)+B|0,f[o+2932>>2]=E;d:{w:{if(e){for(q=o+2440|0,m=o+3004|0,I=o+3e3|0,y=o+3008|0,rr=o+2968|0,er=o+3028|0,Er=o+2408|0,Y=o+3332|0,F=o+2756|0,br=o+2748|0,Nr=o+3316|0,ur=o+3324|0,vr=o+2988|0,Ar=o+2736|0,kr=o+2744|0,W=o+1716|0,D=o+2324|0,J=o+2972|0,T=o+2312|0,Ir=o+1468|0,K=o+2752|0,L=o+2740|0;;){if(e=f[(d=B+8|0)+4>>2],f[(w=Q=o+2944|0)>>2]=f[d>>2],f[w+4>>2]=e,A[(w=o+2952|0)>>1]=a[B+16>>1],e=B+20|0,f[o+2924>>2]=e,d=f[B+4>>2],f[o+2936>>2]=f[B>>2],f[o+2940>>2]=d,2==(0|(_=n[B+18|0]))){E=f[o+2932>>2];break w}E=n[B+19|0],N=o+1472|0,B=a[w>>1],A[N>>1]=B,d=f[Q+4>>2],f[(w=C=o+1464|0)>>2]=f[Q>>2],f[w+4>>2]=d,d=f[o+2940>>2],f[o+1456>>2]=f[o+2936>>2],f[o+1460>>2]=d,i[o+1475|0]=E,i[o+1474|0]=_;g:{y:{B:{E:{_:{if((_=!f[o+2188>>2]&2==f[o+2184>>2])||1!=a[o+2328>>1]||a[o+2330>>1]!=(0|B)){E=p,Q=(d=f[o+2608>>2])-2|0;I:{Q:{if((0|(w=f[o+2612>>2]))==(d>>>0<2|0)&Q>>>0<=1){if(1==(0|Q))break Q;E=g}if(1==a[E+144>>1]&&a[E+146>>1]==(0|B))break I}if(!f[o+2444>>2]&2==f[o+2440>>2]||1!=a[o+2584>>1]||a[o+2586>>1]!=(0|B)){fi[f[f[o+1456>>2]+16>>2]](Ir,f[o+1460>>2],f[o+1464>>2]);break g}}if(f[o+1720>>2]=f[N>>2],B=f[C+4>>2],f[(E=o+1712|0)>>2]=f[C>>2],f[E+4>>2]=B,B=f[o+1460>>2],f[o+1704>>2]=f[o+1456>>2],f[o+1708>>2]=B,_)break _;if(!(1&A[o+2328>>1]))break _;B=a[o+2330>>1]}else f[o+1720>>2]=f[N>>2],d=f[C+4>>2],f[(w=o+1712|0)>>2]=f[C>>2],f[w+4>>2]=d,d=f[o+1460>>2],f[o+1704>>2]=f[o+1456>>2],f[o+1708>>2]=d;if(a[o+1720>>1]==(65535&B)){E=n[o+1722|0],d=f[(w=o+1712|0)+4>>2],f[rr>>2]=f[w>>2],f[rr+4>>2]=d,d=f[o+1708>>2],f[o+2960>>2]=f[o+1704>>2],f[o+2964>>2]=d,d=f[(w=_=T+8|0)+4>>2],f[(B=o+2984|0)>>2]=f[w>>2],f[B+4>>2]=d,d=f[T+4>>2],w=f[T>>2],f[o+2976>>2]=w,f[o+2980>>2]=d,f[o+2312>>2]=0;I:{Q:{N:{R:{C:{p:{if(w)dr(o+3016|0,o+2976|0,o+2960|0),fi[f[f[o+2960>>2]+16>>2]](J,f[o+2964>>2],f[rr>>2]),d=f[(w=o+3024|0)+4>>2],f[rr>>2]=f[w>>2],f[rr+4>>2]=d,d=f[o+3020>>2],f[o+2960>>2]=f[o+3016>>2],f[o+2964>>2]=d;else if(!(1&E))break p;cr(o+3320|0,f[o+2964>>2],f[o+2968>>2],o+2184|0);m:switch(f[o+3320>>2]-1|0){case 0:case 1:break R;case 2:break m;default:break C}B=f[o+3328>>2],w=f[o+3324>>2],(d=f[o+2312>>2])&&fi[f[d+16>>2]](D,f[o+2316>>2],f[o+2320>>2]),f[o+2312>>2]=0,_r(o+3016|0,o+2960|0,w,B),fi[f[f[o+2960>>2]+16>>2]](J,f[o+2964>>2],f[rr>>2]),d=f[(w=o+3024|0)+4>>2],f[rr>>2]=f[w>>2],f[rr+4>>2]=d,d=f[o+3020>>2],f[o+2960>>2]=f[o+3016>>2],f[o+2964>>2]=d}if(!n[o+2333|0])break I;if(E=n[o+2436|0],!(N=f[o+2968>>2]))break Q;for(O=f[o+2964>>2],C=0,B=0;;){B=(d=B)+1|0,_=n[d+O|0];p:{m:{G:{Y:{W:{D:{S:switch((w=255&E)-1|0){case 0:break D;case 1:break W;case 2:break Y;default:break S}if(_)break G;E=1;break p}if(_)break G;E=2;break p}switch(E=3,0|_){case 0:break p;case 1:break m;default:break G}}switch(E=3,0|_){case 0:break p;case 1:break m;default:break G}}E=0;break p}E=0,zr(_=o+3304|0,o+2960|0,C,(d=d>>>0>=(w=d-(2==(0|w)?2:3)|0)>>>0?w:0)>>>0>C>>>0?d:C),sr(o+2184|0,_),C=B}if((0|B)==(0|N))break}break N}if(d=f[rr+4>>2],f[(w=o+3024|0)>>2]=f[rr>>2],f[w+4>>2]=d,d=f[o+2964>>2],f[o+3016>>2]=f[o+2960>>2],f[o+3020>>2]=d,(d=f[o+2312>>2])&&fi[f[d+16>>2]](D,f[o+2316>>2],f[o+2320>>2]),d=f[o+3020>>2],f[T>>2]=f[o+3016>>2],f[T+4>>2]=d,d=f[w+4>>2],f[_>>2]=f[w>>2],f[_+4>>2]=d,!(d=f[o+2976>>2]))break g;fi[f[d+16>>2]](vr,f[o+2980>>2],f[o+2984>>2]);break g}w=f[ur+8>>2],f[I>>2]=w,d=f[ur+4>>2],f[o+2992>>2]=f[ur>>2],f[o+2996>>2]=d,f[o+3312>>2]=0,f[o+3304>>2]=0,f[o+3308>>2]=1;R:{C:{if(57!=(255&w)){if(f[o+3020>>2]=1,f[o+3016>>2]=1054424,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+3008>>2]=I,f[o+3012>>2]=6,f[o+3024>>2]=o+3008,!Qr(o+3304|0,1053472,o+3016|0))break C;break R}if(f[o+3004>>2]=o+2992,f[o+3020>>2]=1,f[o+3016>>2]=1054404,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+3008>>2]=m,f[o+3012>>2]=5,f[o+3024>>2]=o+3008,Qr(o+3304|0,1053472,o+3016|0))break R}d=f[o+3308>>2],w=f[o+3312>>2],B=f[o+3304>>2],(E=f[o+2976>>2])&&fi[f[E+16>>2]](vr,f[o+2980>>2],f[o+2984>>2]),fi[f[f[o+2960>>2]+16>>2]](J,f[o+2964>>2],f[o+2968>>2]);break E}break f}if(!((w=f[o+2968>>2])>>>0<=C>>>0||!f[o+2340>>2]&2==f[o+2336>>2])){if(fi[f[f[o+2960>>2]>>2]](o+3016|0,J,f[o+2964>>2],w),f[(d=o+3024|0)>>2]=w-C,B=f[d+4>>2],d=f[d>>2],f[(w=_=o+3328|0)>>2]=d,f[w+4>>2]=B,f[o+3020>>2]=f[o+3020>>2]+C,w=f[o+3020>>2],f[o+3320>>2]=f[o+3016>>2],f[o+3324>>2]=w,!d){fi[f[f[o+3320>>2]+16>>2]](Y,f[o+3324>>2],0),i[o+2436|0]=E;break I}f[o+2420>>2]=d+f[o+2420>>2],(0|(B=f[o+2416>>2]))==f[o+2408>>2]&&ce(Er,1058736),d=f[o+3324>>2],w=f[o+2412>>2]+(B<<4)|0,f[w>>2]=f[o+3320>>2],f[w+4>>2]=d,d=f[_+4>>2],f[(w=w+8|0)>>2]=f[_>>2],f[w+4>>2]=d,f[o+2416>>2]=B+1}}i[o+2436|0]=E}(d=f[o+2976>>2])&&fi[f[d+16>>2]](vr,f[o+2980>>2],f[o+2984>>2]),fi[f[f[o+2960>>2]+16>>2]](J,f[o+2964>>2],f[o+2968>>2]);break g}d=f[o+2608>>2],w=f[o+2612>>2]}B=p;_:{if((d>>>0<2|0)==(0|w)&(E=d-2|0)>>>0<=1){if(1==(0|E))break _;B=g}if(1==a[B+144>>1]&&a[o+1720>>1]==a[B+146>>1]){Q=n[o+1722|0],B=f[(E=o+1712|0)+4>>2],f[(_=Rr=o+2984|0)>>2]=f[E>>2],f[_+4>>2]=B,B=f[o+1708>>2],f[o+2976>>2]=f[o+1704>>2],f[o+2980>>2]=B,B=f[(E=(C=(Yr=!w&2==(0|d))?kr:Ar)+8|0)+4>>2],f[(_=o+3312|0)>>2]=f[E>>2],f[_+4>>2]=B,E=f[C>>2],B=f[C+4>>2],f[(o+2184|0)+(Yr?560:552)>>2]=0,f[o+3304>>2]=E,f[o+3308>>2]=B;I:{Q:{if(E?(dr(o+3016|0,o+3304|0,o+2976|0),fi[f[f[o+2976>>2]+16>>2]](vr,f[o+2980>>2],f[Rr>>2]),B=f[(E=o+3024|0)+4>>2],f[Rr>>2]=f[E>>2],f[Rr+4>>2]=B,B=f[o+3020>>2],f[o+2976>>2]=f[o+3016>>2],f[o+2980>>2]=B,B=f[o+3304>>2]):B=0,B|1&Q){cr(o+3320|0,f[o+2980>>2],f[o+2984>>2],Yr?g:p);N:switch(f[o+3320>>2]-1|0){case 0:case 1:break I;case 2:break N;default:break Q}B=f[o+3328>>2],w=f[o+3324>>2],E=!f[o+2612>>2]&2==f[o+2608>>2],(N=f[(d=(o+2184|0)+(E?560:552)|0)>>2])&&fi[f[N+16>>2]](E?F:br,f[(E?br:L)>>2],f[(E?K:kr)>>2]),f[d>>2]=0,_r(o+3016|0,o+2976|0,w,B),fi[f[f[o+2976>>2]+16>>2]](vr,f[o+2980>>2],f[Rr>>2]),d=f[(w=o+3024|0)+4>>2],f[Rr>>2]=f[w>>2],f[Rr+4>>2]=d,d=f[o+3020>>2],f[o+2976>>2]=f[o+3016>>2],f[o+2980>>2]=d,d=f[o+2608>>2],w=f[o+2612>>2]}N:if(2!=(0|d)|w){if(!n[o+2757|0])break N;x(o+2976|0,p)}else 1==n[o+2765|0]&&P(o+2976|0,g);(d=f[o+3304>>2])&&fi[f[d+16>>2]](Nr,f[o+3308>>2],f[o+3312>>2]),fi[f[f[o+2976>>2]+16>>2]](vr,f[o+2980>>2],f[o+2984>>2]);break g}if(d=f[Rr+4>>2],f[(w=B=o+3024|0)>>2]=f[Rr>>2],f[w+4>>2]=d,d=f[o+2980>>2],f[o+3016>>2]=f[o+2976>>2],f[o+3020>>2]=d,2!=f[o+2608>>2]|f[o+2612>>2]){if((d=f[o+2736>>2])&&fi[f[d+16>>2]](br,f[o+2740>>2],f[o+2744>>2]),d=f[o+3020>>2],f[Ar>>2]=f[o+3016>>2],f[Ar+4>>2]=d,d=f[B+4>>2],f[(w=Ar+8|0)>>2]=f[B>>2],f[w+4>>2]=d,!(d=f[o+3304>>2]))break g;fi[f[d+16>>2]](Nr,f[o+3308>>2],f[o+3312>>2]);break g}if((d=f[o+2744>>2])&&fi[f[d+16>>2]](F,f[o+2748>>2],f[o+2752>>2]),d=f[o+3020>>2],f[kr>>2]=f[o+3016>>2],f[kr+4>>2]=d,d=f[B+4>>2],f[(w=kr+8|0)>>2]=f[B>>2],f[w+4>>2]=d,!(d=f[o+3304>>2]))break g;fi[f[d+16>>2]](Nr,f[o+3308>>2],f[o+3312>>2]);break g}w=f[ur+8>>2],f[I>>2]=w,d=f[ur+4>>2],f[o+2992>>2]=f[ur>>2],f[o+2996>>2]=d,f[o+2968>>2]=0,f[o+2960>>2]=0,f[o+2964>>2]=1;I:{if(57!=(255&w)){if(f[o+3020>>2]=1,f[o+3016>>2]=1054424,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+3008>>2]=I,f[o+3012>>2]=6,f[o+3024>>2]=o+3008,!Qr(o+2960|0,1053472,o+3016|0))break I;break f}if(f[o+3004>>2]=o+2992,f[o+3020>>2]=1,f[o+3016>>2]=1054404,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+3008>>2]=m,f[o+3012>>2]=5,f[o+3024>>2]=o+3008,Qr(o+2960|0,1053472,o+3016|0))break f}d=f[o+2964>>2],w=f[o+2968>>2],B=f[o+2960>>2],(E=f[o+3304>>2])&&fi[f[E+16>>2]](Nr,f[o+3308>>2],f[o+3312>>2]),fi[f[f[o+2976>>2]+16>>2]](vr,f[o+2980>>2],f[o+2984>>2]);break E}}if(!f[o+2444>>2]&2==f[o+2440>>2])break y;if(!a[o+2584>>1])break y;if(a[o+1720>>1]!=a[o+2586>>1])break y;if(Q=n[o+1722|0],B=f[(E=o+1712|0)+4>>2],f[(_=o+3312|0)>>2]=f[E>>2],f[_+4>>2]=B,B=f[o+1708>>2],f[o+3304>>2]=f[o+1704>>2],f[o+3308>>2]=B,!(1&Q))break B;cr(o+3320|0,f[o+3308>>2],f[o+3312>>2],q),B=-2147483648;_:switch(f[o+3320>>2]-1|0){case 2:if(_r(o+3016|0,B=o+3304|0,f[o+3324>>2],f[o+3328>>2]),fi[f[f[o+3304>>2]+16>>2]](Nr,f[o+3308>>2],f[_>>2]),d=f[(w=o+3024|0)+4>>2],f[_>>2]=f[w>>2],f[_+4>>2]=d,d=f[o+3020>>2],f[o+3304>>2]=f[o+3016>>2],f[o+3308>>2]=d,1==f[o+2440>>2]){z(B,f[o+2448>>2],f[o+2452>>2],q);break B}Ve(1054372),$f();case 0:case 1:w=f[ur+8>>2],f[rr>>2]=w,d=f[ur+4>>2],f[o+2960>>2]=f[ur>>2],f[o+2964>>2]=d,f[o+2984>>2]=0,f[o+2976>>2]=0,f[o+2980>>2]=1;I:{if(57!=(255&w)){if(f[o+3020>>2]=1,f[o+3016>>2]=1054424,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+2992>>2]=rr,f[o+2996>>2]=6,f[o+3024>>2]=o+2992,!Qr(o+2976|0,1053472,o+3016|0))break I;break f}if(f[o+3008>>2]=o+2960,f[o+3020>>2]=1,f[o+3016>>2]=1054404,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+2992>>2]=y,f[o+2996>>2]=5,f[o+3024>>2]=o+2992,Qr(o+2976|0,1053472,o+3016|0))break f}d=f[o+2980>>2],w=f[o+2984>>2],B=f[o+2976>>2];break;default:break _}fi[f[f[o+3304>>2]+16>>2]](Nr,f[o+3308>>2],f[o+3312>>2])}if(-2147483648==(0|B))break g;if(f[o+748>>2]=d,f[o+752>>2]=w,f[o+744>>2]=B,B=0,g=((d=(w=f[(E=o+2920|0)+12>>2])-(e=f[E+4>>2])|0)>>>0)/20|0,(0|e)!=(0|w)){if(d-20>>>0>=20)for(d=268435454&g,y=e;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+20>>2]+16>>2]](y+32|0,f[y+24>>2],f[y+28>>2]),y=y+40|0,(0|d)!=(0|(B=B+2|0)););1&g&&(e=e+k(B,20)|0,fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]))}if(g=f[E+8>>2]){if(w=f[E>>2],(B=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(g,20))>>>0)break e;if(B>>>0>e+39>>>0&&d)break r;nr(w)}break t}if(n[o+2589|0]&&(_=f[o+2604>>2])&&(B=f[o+2600>>2])){w=f[o+2596>>2],qr(o+3016|0,o+3304|0,E=(d=f[o+3312>>2])>>>0<_>>>0?d:_);B:{E:{_:{I:switch(B=w+k(B,72)|0,f[B-72>>2]-1|0){case 0:break _;case 1:break E;default:break I}if(!(w=f[o+3024>>2])){fi[f[f[o+3016>>2]+16>>2]](er,f[o+3020>>2],0);break B}f[(d=B-4|0)>>2]=w+f[d>>2],(0|(w=f[(d=B-8|0)>>2]))==f[(N=B-16|0)>>2]&&ce(N,1058736),f[d>>2]=w+1,d=f[o+3020>>2],w=f[B-12>>2]+(w<<4)|0,f[w>>2]=f[o+3016>>2],f[w+4>>2]=d,B=w+8|0,d=f[(w=o+3024|0)+4>>2],f[B>>2]=f[w>>2],f[B+4>>2]=d;break B}if(!(w=f[o+3024>>2])){fi[f[f[o+3016>>2]+16>>2]](er,f[o+3020>>2],0);break B}f[(d=B-4|0)>>2]=w+f[d>>2],(0|(w=f[(d=B-8|0)>>2]))==f[(N=B-16|0)>>2]&&ce(N,1058736),f[d>>2]=w+1,d=f[o+3020>>2],w=f[B-12>>2]+(w<<4)|0,f[w>>2]=f[o+3016>>2],f[w+4>>2]=d,B=w+8|0,d=f[(w=o+3024|0)+4>>2],f[B>>2]=f[w>>2],f[B+4>>2]=d;break B}(w=f[o+3024>>2])?(f[(d=B-12|0)>>2]=w+f[d>>2],(0|(w=f[(d=B-16|0)>>2]))==f[(N=B-24|0)>>2]&&ce(N,1058736),f[d>>2]=w+1,d=f[o+3020>>2],w=f[B-20>>2]+(w<<4)|0,f[w>>2]=f[o+3016>>2],f[w+4>>2]=d,B=w+8|0,d=f[(w=o+3024|0)+4>>2],f[B>>2]=f[w>>2],f[B+4>>2]=d):fi[f[f[o+3016>>2]+16>>2]](er,f[o+3020>>2],0)}f[o+2604>>2]=_-E}fi[f[f[o+3304>>2]+16>>2]](Nr,f[o+3308>>2],f[o+3312>>2]);break g}fi[f[f[o+1704>>2]+16>>2]](W,f[o+1708>>2],f[o+1712>>2])}if(B=e,(0|e)==f[o+2932>>2])break}break d}e=B}if((0|e)!=(0|E)){if(w=1&(d=((g=E-e|0)>>>0)/20|0),E=0,g-20>>>0>=20)for(d&=268435454,B=e;fi[f[f[B>>2]+16>>2]](B+12|0,f[B+4>>2],f[B+8>>2]),fi[f[f[B+20>>2]+16>>2]](B+32|0,f[B+24>>2],f[B+28>>2]),B=B+40|0,(0|d)!=(0|(E=E+2|0)););w&&(e=k(E,20)+e|0,fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]))}}if(g=f[o+2928>>2]){if(w=f[o+2920>>2],(B=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(g,20))>>>0)break e;if(B>>>0>e+39>>>0&&d)break r;nr(w)}2!=f[o+2184>>2]|f[o+2188>>2]&&(f[o+3028>>2]=0,f[o+3020>>2]=1,f[o+3024>>2]=0,f[o+3016>>2]=1055092,sr(o+2184|0,o+3016|0)),e=(d=f[o+2608>>2])-2|0;d:{w:{if(f[o+2612>>2]==(d>>>0<2|0)&e>>>0<=1){if(e-1|0)break w;break d}if(e=f[o+2760>>2],g=f[o+2764>>2],f[o+2760>>2]=2,f[o+2764>>2]=0,!g&2==(0|e))break d;ze(o+3016|0,o+2768|0,96),(0|(w=f[o+2872>>2]))==f[o+2864>>2]&&be(o+2864|0,1058088),d=f[o+2868>>2]+k(w,104)|0,f[d>>2]=e,f[d+4>>2]=g,ze(d+8|0,o+3016|0,96),f[o+2872>>2]=w+1;break d}e=f[o+2768>>2],g=f[o+2772>>2],f[o+2768>>2]=2,f[o+2772>>2]=0,!g&2==(0|e)||(ze(o+3016|0,o+2776|0,80),(0|(w=f[o+2864>>2]))==f[o+2856>>2]&&te(o+2856|0,1056284),d=f[o+2860>>2]+k(w,88)|0,f[d>>2]=e,f[d+4>>2]=g,ze(d+8|0,o+3016|0,80),f[o+2864>>2]=w+1)}if(ze(o+736|0,o+2184|0,720),w=e=f[o+740>>2],!e&3==(0|(d=f[o+736>>2])))break a;f[(g=o+728|0)>>2]=f[o+752>>2],e=f[o+748>>2],f[o+720>>2]=f[o+744>>2],f[o+724>>2]=e,ze(o+20|0,o+756|0,700),f[o+16>>2]=f[g>>2],f[o>>2]=d,f[o+4>>2]=w,e=f[o+724>>2],f[o+8>>2]=f[o+720>>2],f[o+12>>2]=e,m=o+424|0,e=(g=f[o+424>>2])-2|0;d:{if(f[o+428>>2]==(g>>>0<2|0)&e>>>0<=1){if(1==(0|e))break d;Or=Gr}f[Or>>2]||(Br(m),f[o+424>>2]=3,f[o+428>>2]=0,d=f[o>>2],w=f[o+4>>2])}if(p=2,K=0,!(!w&2==(0|d)||(p=d,K=w,f[o+248>>2]))){if((e=f[o+128>>2])?(fi[f[e+16>>2]](o+140|0,f[o+132>>2],f[o+136>>2]),e=f[o+248>>2]):e=0,xr(f[o+244>>2],e),_e(f[o+240>>2],f[o+244>>2]),p=2,K=0,2!=f[o+152>>2]|f[o+156>>2]){if(L=f[o+228>>2],d=f[o+232>>2]){e=0;d:{if(1!=(0|d)){for(w=1&d,d&=-2,B=L;fi[f[f[B>>2]+16>>2]](B+12|0,f[B+4>>2],f[B+8>>2]),fi[f[f[B+16>>2]+16>>2]](B+28|0,f[B+20>>2],f[B+24>>2]),B=B+32|0,(0|d)!=(0|(e=e+2|0)););if(!w)break d}fi[f[f[(e=(e<<4)+L|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}L=f[o+228>>2]}Ie(f[o+224>>2],L)}f[o>>2]=2,f[o+4>>2]=0}Yr=o+256|0;d:{w:{g:{y:{B:{E:{_:{I:{Q:{if(2!=f[o+256>>2]|f[o+260>>2]){if(f[o+416>>2]){E=!K&2==(0|p),g=f[o+424>>2],Q=f[o+428>>2],L=Yr;break Q}if((e=f[o+384>>2])?(fi[f[e+16>>2]](o+396|0,f[o+388>>2],f[o+392>>2]),e=f[o+416>>2]):e=0,gr(f[o+412>>2],e),B=f[o+412>>2],w=f[o+408>>2]){if((g=-8&(e=f[B-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(w,72))>>>0)break e;if(g>>>0>e+39>>>0&&d)break r;nr(B)}f[o+256>>2]=2,f[o+260>>2]=0,K=f[o+4>>2],p=f[o>>2]}if(E=!K&2==(0|p),L=0,Q=e=f[o+428>>2],!(3!=(0|(g=f[o+424>>2]))|e|2!=(0|p)|K)){A[v+252>>1]=0,f[v+240>>2]=-2147483648,f[v+232>>2]=0,f[v+236>>2]=0,f[v+104>>2]=2,f[v+108>>2]=0,f[v>>2]=2,f[v+4>>2]=0,L=1,T=1,d=0;break I}}if(!(ie=a[o+712>>1])){if(!a[R+8>>1]){if(e=V(68)){e=ze(e,1054048,68),f[v+16>>2]=68,f[v+12>>2]=e,f[v+8>>2]=68,f[v>>2]=3,f[v+4>>2]=0,L=1,T=1,d=0;break I}break A}ie=1,A[o+712>>1]=1,A[o+714>>1]=a[R+10>>1]}e=0,f[o+2248>>2]=0,f[o+2240>>2]=0,f[o+2236>>2]=L,d=m,!(w=Q-(g>>>0<2)|0)&(B=g-2|0)>>>0>1|w||(d=0,1!=(0|B)&&(d=o+432|0)),f[o+2228>>2]=d,f[o+2224>>2]=3,f[o+2216>>2]=1,f[o+2200>>2]=2,f[o+2204>>2]=0,f[o+2184>>2]=2,f[o+2188>>2]=0,f[o+2232>>2]=E?0:o,d=o+2228|0,y=o+2220|0;Q:{N:{for(;;){B=d+(e<<2)|0,e=e+1|0;R:{for(;;){if(w=f[B>>2])break R;if(B=B+4|0,4==(0|(e=e+1|0)))break}d=0,w=0;break Q}if(1==f[w+48>>2])break N;if(3==(0|e))break}d=0,w=0;break Q}if(f[o+2220>>2]=e,d=f[(e=w+56|0)>>2],w=f[e+4>>2],f[o+772>>2]=f[y+32>>2],e=f[(B=y+24|0)+4>>2],f[(E=o+764|0)>>2]=f[B>>2],f[E+4>>2]=e,e=f[(B=y+16|0)+4>>2],f[(E=o+756|0)>>2]=f[B>>2],f[E+4>>2]=e,e=f[(B=y+8|0)+4>>2],f[(E=o+748|0)>>2]=f[B>>2],f[E+4>>2]=e,f[o+736>>2]=1,e=f[y+4>>2],f[o+740>>2]=f[y>>2],f[o+744>>2]=e,I=S-32|0,1&f[(y=o+736|0)>>2]&&(f[I+24>>2]=f[y+20>>2],e=f[(B=y+12|0)+4>>2],f[(E=I+16|0)>>2]=f[B>>2],f[E+4>>2]=e,e=f[y+8>>2],B=f[y+4>>2],f[I+8>>2]=B,f[I+12>>2]=e,(0|(K=f[I+12>>2]))!=(0|B)))for(e=16+(I+(B<<2)|0)|0;(E=f[e>>2])&&1==f[E+48>>2]&&(p=f[(E=E+56|0)>>2],y=d,I=f[E+4>>2],E=w,L=(w=I-(w+(d>>>0>p>>>0)|0)|0)-2|0,d=(0|w)<-1,d=(w=(0|((0|w)>0?L:d?w+2:w))<0)?p:y,w=w?I:E),e=e+4|0,(0|K)!=(0|(B=B+1|0)););}Ar=d,br=w,Oe=a[o+714>>1],L=1,K=e=Q-(g>>>0<2)|0;Q:{N:{R:{C:{p:{m:{G:{Y:{W:{D:{if(!e&(p=g-2|0)>>>0<=1){if(me=2,ke=1,T=1,p-1|0)break D;break Q}if(e=f[(d=m+8|0)+4>>2],f[(w=Gr=o+3024|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=m+16|0)+4>>2],f[(w=D=o+3032|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=m+24|0)+4>>2],f[(w=Er=o+3040|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=m+32|0)+4>>2],f[(w=C=o+3048|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=m+40|0)+4>>2],f[(w=O=o+3056|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=m+48|0)+4>>2],f[(w=Y=o+3064|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=m+56|0)+4>>2],f[(w=W=o+3072|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[m+4>>2],f[o+3016>>2]=f[m>>2],f[o+3020>>2]=e,ze(o+736|0,o+552|0,132),e=f[(d=o+700|0)+4>>2],f[(w=rr=o+1712|0)>>2]=f[d>>2],f[w+4>>2]=e,f[(K=o+1720|0)>>2]=f[o+708>>2],e=f[o+696>>2],f[o+1704>>2]=f[o+692>>2],f[o+1708>>2]=e,Or=f[o+684>>2],F=f[o+688>>2])break W;g=-1,Q=2147483647,d=1,w=-2147483648,y=1,_=-2147483648,E=-1,m=2147483647;break Y}if(e=f[(d=o+440|0)+4>>2],f[(w=Er=o+3024|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+448|0)+4>>2],f[(w=C=o+3032|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+456|0)+4>>2],f[(w=O=o+3040|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+464|0)+4>>2],f[(w=Y=o+3048|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+472|0)+4>>2],f[(w=W=o+3056|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+480|0)+4>>2],f[(w=rr=o+3064|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+488|0)+4>>2],f[(w=K=o+3072|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[o+436>>2],f[o+3016>>2]=f[o+432>>2],f[o+3020>>2]=e,ze(o+736|0,o+560|0,116),f[(L=o+1712|0)>>2]=f[o+692>>2],e=f[o+688>>2],f[o+1704>>2]=f[o+684>>2],f[o+1708>>2]=e,Gr=f[o+676>>2],D=f[o+680>>2]){for(I=k(D,88),e=0;;){if(!f[(d=e+Gr|0)+16>>2])break G;if(f[d>>2]=1,f[d+4>>2]=0,p=d+8|0,d=(g=f[(w=d+24|0)>>2])-Ar|0,y=(w=f[w+4>>2]-((g>>>0>>0)+br|0)|0)-2|0,g=(g=(0|w)<-1)?w+2|0:w,w=br+((w=(0|w)>0)?y:g)|0,w=(d=d+Ar|0)>>>0>>0?w+1|0:w,f[p>>2]=d,f[p+4>>2]=w,(0|I)==(0|(e=e+88|0)))break}for(e=k(D,88),B=Gr+56|0,y=1,_=-2147483648,E=-1,m=2147483647,g=-1,Q=2147483647,d=1,w=-2147483648;;){if(1!=f[B-8>>2])break m;if(!f[B-24>>2])break p;if(p=f[(I=B-16|0)>>2],d=(N=(0|(I=f[I+4>>2]))<(0|w)?1:d>>>0>p>>>0&(0|w)>=(0|I))?d:p,w=N?w:I,N=p,g=(p=g>>>0

>>0&(0|I)>=(0|Q)|(0|I)>(0|Q))?g:N,Q=p?Q:I,I=f[B>>2],y=(N=(0|_)>(0|(p=f[B+4>>2]))?1:y>>>0>I>>>0&(0|_)>=(0|p))?y:I,_=N?_:p,N=I,E=(I=E>>>0>>0&(0|p)>=(0|m)|(0|p)>(0|m))?E:N,m=I?m:p,B=B+88|0,!(e=e-88|0))break}}else g=-1,Q=2147483647,d=1,w=-2147483648,y=1,_=-2147483648,E=-1,m=2147483647;e=f[K+4>>2],f[(B=o+2240|0)>>2]=f[K>>2],f[B+4>>2]=e,e=f[rr+4>>2],f[(B=o+2232|0)>>2]=f[rr>>2],f[B+4>>2]=e,e=f[W+4>>2],f[(B=o+2224|0)>>2]=f[W>>2],f[B+4>>2]=e,e=f[Y+4>>2],f[(B=o+2216|0)>>2]=f[Y>>2],f[B+4>>2]=e,e=f[O+4>>2],f[(B=o+2208|0)>>2]=f[O>>2],f[B+4>>2]=e,e=f[C+4>>2],f[(B=o+2200|0)>>2]=f[C>>2],f[B+4>>2]=e,e=f[Er+4>>2],f[(B=o+2192|0)>>2]=f[Er>>2],f[B+4>>2]=e,e=f[o+3020>>2],f[o+2184>>2]=f[o+3016>>2],f[o+2188>>2]=e,f[o+2304>>2]=y,f[o+2308>>2]=_,f[o+2296>>2]=1,f[o+2300>>2]=0,f[o+2288>>2]=d,f[o+2292>>2]=w,f[o+2280>>2]=1,f[o+2284>>2]=0,f[o+2272>>2]=E,f[o+2276>>2]=m,f[o+2264>>2]=1,f[o+2268>>2]=0,f[o+2256>>2]=g,f[o+2260>>2]=Q,f[o+2248>>2]=1,f[o+2252>>2]=0,ze(o+2312|0,o+736|0,116),f[o+2444>>2]=f[L>>2],f[o+2432>>2]=D,f[o+2428>>2]=Gr,e=f[o+1708>>2],f[o+2436>>2]=f[o+1704>>2],f[o+2440>>2]=e,Z(o+1512|0,o+2184|0),e=f[(d=o+1528|0)+4>>2],f[(w=o+1472|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+1536|0)>>2],B=w=f[d+4>>2],f[(d=o+1480|0)>>2]=e,f[d+4>>2]=w,d=f[(w=o+1544|0)+4>>2],f[(g=o+1488|0)>>2]=f[w>>2],f[g+4>>2]=d,d=f[(w=o+1552|0)+4>>2],f[(g=o+1496|0)>>2]=f[w>>2],f[g+4>>2]=d,d=f[(w=o+1560|0)+4>>2],f[(g=o+1504|0)>>2]=f[w>>2],f[g+4>>2]=d,p=qe(e,B,O=f[o+1576>>2],0),K=d=M,f[(e=o+1520|0)>>2]=p,f[e+4>>2]=d,f[(e=o+1464|0)>>2]=p,f[e+4>>2]=d,f[o+1512>>2]=1,f[o+1516>>2]=0,f[o+1456>>2]=1,f[o+1460>>2]=0,Ir=f[o+1568>>2],N=f[o+1572>>2],rr=f[o+1580>>2],Gr=f[o+1584>>2],Or=f[o+1588>>2],e=f[(d=o+1600|0)+4>>2],f[(w=o+2944|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[o+1596>>2],f[o+2936>>2]=f[o+1592>>2],f[o+2940>>2]=e,me=0,Le=1,ke=0,L=0;break Q}for(I=k(F,104),e=0;;){if(!f[(d=e+Or|0)+16>>2])break C;if(f[d>>2]=1,f[d+4>>2]=0,p=d+8|0,d=(g=f[(w=d+24|0)>>2])-Ar|0,y=(w=f[w+4>>2]-((g>>>0>>0)+br|0)|0)-2|0,g=(g=(0|w)<-1)?w+2|0:w,w=br+((w=(0|w)>0)?y:g)|0,w=(d=d+Ar|0)>>>0>>0?w+1|0:w,f[p>>2]=d,f[p+4>>2]=w,(0|I)==(0|(e=e+104|0)))break}for(e=k(F,104),B=Or+56|0,y=1,_=-2147483648,E=-1,m=2147483647,g=-1,Q=2147483647,d=1,w=-2147483648;;){if(1!=f[B-8>>2])break R;if(!f[B-24>>2])break N;if(p=f[(I=B-16|0)>>2],d=(N=(0|(I=f[I+4>>2]))<(0|w)?1:d>>>0>p>>>0&(0|w)>=(0|I))?d:p,w=N?w:I,N=p,g=(p=g>>>0

>>0&(0|I)>=(0|Q)|(0|I)>(0|Q))?g:N,Q=p?Q:I,I=f[B>>2],y=(N=(0|_)>(0|(p=f[B+4>>2]))?1:y>>>0>I>>>0&(0|_)>=(0|p))?y:I,_=N?_:p,N=I,E=(I=E>>>0>>0&(0|p)>=(0|m)|(0|p)>(0|m))?E:N,m=I?m:p,B=B+104|0,!(e=e-104|0))break}}e=f[W+4>>2],f[(B=o+2240|0)>>2]=f[W>>2],f[B+4>>2]=e,e=f[Y+4>>2],f[(B=o+2232|0)>>2]=f[Y>>2],f[B+4>>2]=e,e=f[O+4>>2],f[(B=o+2224|0)>>2]=f[O>>2],f[B+4>>2]=e,e=f[C+4>>2],f[(B=o+2216|0)>>2]=f[C>>2],f[B+4>>2]=e,e=f[Er+4>>2],f[(B=o+2208|0)>>2]=f[Er>>2],f[B+4>>2]=e,e=f[D+4>>2],f[(B=o+2200|0)>>2]=f[D>>2],f[B+4>>2]=e,e=f[Gr+4>>2],f[(B=o+2192|0)>>2]=f[Gr>>2],f[B+4>>2]=e,e=f[o+3020>>2],f[o+2184>>2]=f[o+3016>>2],f[o+2188>>2]=e,f[o+2304>>2]=y,f[o+2308>>2]=_,me=1,f[o+2296>>2]=1,f[o+2300>>2]=0,f[o+2288>>2]=d,f[o+2292>>2]=w,f[o+2280>>2]=1,f[o+2284>>2]=0,f[o+2272>>2]=E,f[o+2276>>2]=m,f[o+2264>>2]=1,f[o+2268>>2]=0,f[o+2256>>2]=g,f[o+2260>>2]=Q,f[o+2248>>2]=1,f[o+2252>>2]=0,ze(o+2312|0,o+736|0,132),e=f[rr+4>>2],f[(d=o+2460|0)>>2]=f[rr>>2],f[d+4>>2]=e,f[o+2468>>2]=f[K>>2],f[o+2448>>2]=F,f[o+2444>>2]=Or,e=f[o+1708>>2],f[o+2452>>2]=f[o+1704>>2],f[o+2456>>2]=e,j(o+1608|0,o+2184|0),e=f[(d=o+1624|0)+4>>2],f[(w=o+1472|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+1632|0)>>2],B=w=f[d+4>>2],f[(d=o+1480|0)>>2]=e,f[d+4>>2]=w,d=f[(w=o+1640|0)+4>>2],f[(g=o+1488|0)>>2]=f[w>>2],f[g+4>>2]=d,d=f[(w=o+1648|0)+4>>2],f[(g=o+1496|0)>>2]=f[w>>2],f[g+4>>2]=d,d=f[(w=o+1656|0)+4>>2],f[(g=o+1504|0)>>2]=f[w>>2],f[g+4>>2]=d,p=qe(e,B,O=f[o+1672>>2],0),K=d=M,f[(e=o+1616|0)>>2]=p,f[e+4>>2]=d,f[(e=o+1464|0)>>2]=p,f[e+4>>2]=d,f[o+1608>>2]=1,f[o+1612>>2]=0,f[o+1456>>2]=1,f[o+1460>>2]=0,Ir=f[o+1664>>2],N=f[o+1668>>2],rr=f[o+1676>>2],Gr=f[o+1680>>2],Or=f[o+1684>>2],e=f[(d=o+1696|0)+4>>2],f[(w=o+2944|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[o+1692>>2],f[o+2936>>2]=f[o+1688>>2],f[o+2940>>2]=e,ke=0,T=0;break Q}Ve(1054600),$f()}Ve(1054616),$f()}Ve(1054632),$f()}Ve(1054600),$f()}Ve(1054616),$f()}Ve(1054632),$f()}if(f[o+3016>>2]=2,f[o+3020>>2]=0,Ue=e=f[o+4>>2],!e&2==(0|(Er=f[o>>2])))break d;if(e=f[(d=o+8|0)+4>>2],f[(w=kr=o+1832|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+16|0)+4>>2],f[(w=J=o+1840|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+24|0)+4>>2],f[(w=er=o+1848|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+32|0)+4>>2],f[(w=q=o+1856|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+40|0)+4>>2],f[(w=F=o+1864|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+48|0)+4>>2],f[(w=D=o+1872|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+56|0)+4>>2],f[(w=C=o+1880|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[o+4>>2],f[o+1824>>2]=f[o>>2],f[o+1828>>2]=e,ze(o+1704|0,o+128|0,116),Y=f[o+252>>2],Nr=f[o+244>>2],vr=f[o+248>>2]){for(I=k(vr,88),e=0;;){if(!f[(d=e+Nr|0)+16>>2])break _;if(f[d>>2]=1,f[d+4>>2]=0,p=d+8|0,d=(g=f[(w=d+24|0)>>2])-Ar|0,y=(w=f[w+4>>2]-((g>>>0>>0)+br|0)|0)-2|0,g=(g=(0|w)<-1)?w+2|0:w,w=br+((w=(0|w)>0)?y:g)|0,w=(d=d+Ar|0)>>>0>>0?w+1|0:w,f[p>>2]=d,f[p+4>>2]=w,(0|I)==(0|(e=e+88|0)))break}for(e=k(vr,88),B=Nr+56|0,y=1,_=-2147483648,E=-1,m=2147483647,g=-1,Q=2147483647,d=1,w=-2147483648;;){if(1!=f[B-8>>2])break E;if(!f[B-24>>2])break B;if(p=f[(I=B-16|0)>>2],d=(K=(0|(I=f[I+4>>2]))<(0|w)?1:d>>>0>p>>>0&(0|w)>=(0|I))?d:p,w=K?w:I,K=p,g=(p=g>>>0

>>0&(0|I)>=(0|Q)|(0|I)>(0|Q))?g:K,Q=p?Q:I,p=f[B>>2],y=(W=(0|_)>(0|(I=f[B+4>>2]))?1:y>>>0>p>>>0&(0|_)>=(0|I))?y:p,_=W?_:I,E=(W=E>>>0

>>0&(0|m)<=(0|(K=I))|(0|I)>(0|m))?E:p,m=W?m:I,B=B+88|0,!(e=e-88|0))break}}else g=-1,Q=2147483647,d=1,w=-2147483648,y=1,_=-2147483648,E=-1,m=2147483647;if(e=f[C+4>>2],f[(B=o+2240|0)>>2]=f[C>>2],f[B+4>>2]=e,e=f[D+4>>2],f[(B=o+2232|0)>>2]=f[D>>2],f[B+4>>2]=e,e=f[F+4>>2],f[(B=o+2224|0)>>2]=f[F>>2],f[B+4>>2]=e,e=f[q+4>>2],f[(B=o+2216|0)>>2]=f[q>>2],f[B+4>>2]=e,e=f[er+4>>2],f[(B=o+2208|0)>>2]=f[er>>2],f[B+4>>2]=e,e=f[J+4>>2],f[(B=o+2200|0)>>2]=f[J>>2],f[B+4>>2]=e,e=f[kr+4>>2],f[(B=o+2192|0)>>2]=f[kr>>2],f[B+4>>2]=e,e=f[o+1828>>2],f[o+2184>>2]=f[o+1824>>2],f[o+2188>>2]=e,f[o+2304>>2]=y,f[o+2308>>2]=_,f[o+2296>>2]=1,f[o+2300>>2]=0,f[o+2288>>2]=d,f[o+2292>>2]=w,f[o+2280>>2]=1,f[o+2284>>2]=0,f[o+2272>>2]=E,f[o+2276>>2]=m,f[o+2264>>2]=1,f[o+2268>>2]=0,f[o+2256>>2]=g,f[o+2260>>2]=Q,f[o+2248>>2]=1,f[o+2252>>2]=0,ze(o+2312|0,o+1704|0,116),f[o+2436>>2]=Y,f[o+2432>>2]=vr,f[o+2428>>2]=Nr,tr=0,S=g=S-560|0,e=f[(X=o+2184|0)+248>>2])for(W=(B=f[X+244>>2])+k(e,88)|0,d=g+512|0,Q=g+348|0;;){y=n[B+64|0],i[g+512|0]=y;Q:{N:{if((y-1&255)>>>0<=8)i[g+460|0]=y;else{if(f[g+356>>2]=1,f[g+352>>2]=1057284,f[g+340>>2]=1,f[g+336>>2]=1057176,f[g+348>>2]=1,f[g+528>>2]=d,f[g+532>>2]=7,f[g+344>>2]=g+528,Mr(g+456|0,g+336|0),-2147483648!=(0|(y=f[g+456>>2])))break N;y=n[g+460|0]}if((y-6&255)>>>0>3)break Q;if(!(C=f[B+80>>2]))break Q;for(E=(Y=f[B+76>>2])+(m=C<<4)|0,e=I=f[B+84>>2];;){y=f[E-12>>2]-1|0,e=e-(_=f[E-8>>2])|0;R:{C:{for(;;){if(!(w=_))break C;if(_=w-1|0,n[w+y|0])break}if((0|(D=e+w|0))==(0|I))break Q;if(I>>>0<=D>>>0)break R;for(_=C-1|0,y=(m+Y|0)-16|0;;){if((0|I)!=(0|D)){if(D>>>0>(I=I-f[(E=y+8|0)>>2]|0)>>>0){zr(g+336|0,y,0,D-I|0),fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[E>>2]),e=f[(w=g+344|0)+4>>2],f[E>>2]=f[w>>2],f[E+4>>2]=e,e=f[g+340>>2],f[y>>2]=f[g+336>>2],f[y+4>>2]=e,f[B+84>>2]=D;break Q}if(f[B+80>>2]=_,e=f[E+4>>2],f[(w=g+344|0)>>2]=f[E>>2],f[w+4>>2]=e,e=f[y+4>>2],w=f[y>>2],f[g+336>>2]=w,f[g+340>>2]=e,w&&fi[f[w+16>>2]](Q,f[g+340>>2],f[g+344>>2]),y=y-16|0,-1!=(0|(_=_-1|0)))continue}break}f[B+84>>2]=D;break Q}if((0|Y)!=(0|(E=E-16|0)))continue;break Q}break}f[g+352>>2]=0,f[g+340>>2]=1,f[g+336>>2]=1058712,f[g+344>>2]=4,f[g+348>>2]=0,Me(g+336|0,1058720),$f()}if(y){if(w=f[g+460>>2],(E=-8&(e=f[w-4>>2]))>>>0>>0)break e;if(E>>>0>y+39>>>0&&e)break r;nr(w)}}if((0|W)==(0|(B=B+88|0)))break}F=o+736|0;Q:{N:{R:{if(W=V(16)){if(f[g+520>>2]=0,f[g+516>>2]=W,f[g+512>>2]=1,m=V(16)){if(f[g+536>>2]=0,f[g+532>>2]=m,f[g+528>>2]=1,!(e=f[X+248>>2]))break N;for(I=(E=f[X+244>>2])+k(e,88)|0,y=E+88|0,e=g+304|0;;){d=E,E=y,y=n[d+64|0],i[g+304|0]=y;C:{if((y-1&255)>>>0<=8)f[g+456>>2]=-2147483648,i[g+460|0]=y;else{if(f[g+356>>2]=1,f[g+352>>2]=1057284,f[g+340>>2]=1,f[g+336>>2]=1057176,f[g+348>>2]=1,f[g+320>>2]=e,f[g+324>>2]=7,f[g+344>>2]=g+320,Mr(g+456|0,g+336|0),-2147483648!=(0|(y=f[g+456>>2]))){if(!y)break C;w=f[g+460>>2];p:{if((B=-8&(d=f[w-4>>2]))>>>0>=y+((d&=3)?4:8)>>>0){if(B>>>0>y+39>>>0&&d)break p;nr(w);break C}break e}break r}y=n[g+460|0]}p:{m:{G:switch((255&y)-7|0){case 0:for(_=pr<<4,y=W;;){if(!_)break m;if(_=_-16|0,B=y+8|0,w=y+4|0,y=y+16|0,ve(d,f[w>>2],f[B>>2]))break}break C;case 1:break G;default:break C}for(_=tr<<4,y=m;;){if(!_)break p;if(_=_-16|0,B=y+8|0,w=y+4|0,y=y+16|0,ve(d,f[w>>2],f[B>>2]))break}break C}wr(g+336|0,d),f[g+512>>2]==(0|pr)&&(ce(g+512|0,1055332),W=f[g+516>>2]),d=f[g+340>>2],f[(w=(pr<<4)+W|0)>>2]=f[g+336>>2],f[w+4>>2]=d,B=w+8|0,d=f[(w=g+344|0)+4>>2],f[B>>2]=f[w>>2],f[B+4>>2]=d,pr=pr+1|0,f[g+520>>2]=pr;break C}wr(g+336|0,d),f[g+528>>2]==(0|tr)&&(ce(g+528|0,1055348),m=f[g+532>>2]),d=f[g+340>>2],f[(w=(tr<<4)+m|0)>>2]=f[g+336>>2],f[w+4>>2]=d,B=w+8|0,d=f[(w=g+344|0)+4>>2],f[B>>2]=f[w>>2],f[B+4>>2]=d,tr=tr+1|0,f[g+536>>2]=tr}if(y=((d=(0|E)==(0|I))?0:88)+E|0,d)break}break R}Ze(4,1055284),$f()}Ze(4,1055268),$f()}if(pr)break Q}(e=f[R+12>>2])?(fi[f[e>>2]](g+336|0,R+24|0,f[R+16>>2],f[R+20>>2]),f[g+512>>2]||(ce(g+512|0,1055300),W=f[g+516>>2]),e=f[g+340>>2],f[W>>2]=f[g+336>>2],f[W+4>>2]=e,e=f[(d=g+344|0)+4>>2],f[(w=W+8|0)>>2]=f[d>>2],f[w+4>>2]=e,pr=1,f[g+520>>2]=1):pr=0}Q:{N:{R:{C:{p:{m:{G:{if(!tr){if(!(e=f[R+28>>2]))break G;fi[f[e>>2]](g+336|0,R+40|0,f[R+32>>2],f[R+36>>2]),f[g+528>>2]||(ce(g+528|0,1055316),m=f[g+532>>2]),e=f[g+340>>2],f[m>>2]=f[g+336>>2],f[m+4>>2]=e,e=f[(d=g+344|0)+4>>2],f[(w=m+8|0)>>2]=f[d>>2],f[w+4>>2]=e,f[g+536>>2]=1,tr=1}if(pr)break m;if(tr){if(_=0,1!=(0|tr)){for(d=1&tr,e=-2&tr,y=m;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+16>>2]+16>>2]](y+28|0,f[y+20>>2],f[y+24>>2]),y=y+32|0,(0|e)!=(0|(_=_+2|0)););if(!d)break G}fi[f[f[(e=(_<<4)+m|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}}if(w=f[g+528>>2]){if((B=-8&(e=f[m-4>>2]))>>>0<(((d=3&e)?4:8)|(e=w<<4))>>>0)break e;if(B>>>0>e+39>>>0&&d)break r;nr(m)}e=f[g+516>>2];G:if(d=f[g+520>>2]){if(_=0,1!=(0|d)){for(w=1&d,d&=-2,y=e;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+16>>2]+16>>2]](y+28|0,f[y+20>>2],f[y+24>>2]),y=y+32|0,(0|d)!=(0|(_=_+2|0)););if(!w)break G}fi[f[f[(d=e+(_<<4)|0)>>2]+16>>2]](d+12|0,f[d+4>>2],f[d+8>>2])}if(!(B=f[g+512>>2]))break p;if((E=-8&(d=f[e-4>>2]))>>>0<(((w=3&d)?4:8)|(d=B<<4))>>>0)break e;if(E>>>0>d+39>>>0&&w)break r;nr(e);break p}if(-2147483648!=(0|(Se=f[g+512>>2]))){if(Y=3&pr,pr>>>0<4)_=0,B=0;else for(y=W+56|0,e=134217724&pr,_=0,B=0;_=f[y>>2]+(f[y-16>>2]+(f[y-32>>2]+(f[y-48>>2]+_|0)|0)|0)|0,y=y- -64|0,(0|e)!=(0|(B=B+4|0)););if(Y)for(y=8+((B<<4)+W|0)|0;_=f[y>>2]+_|0,y=y+16|0,Y=Y-1|0;);if(B=3&tr,tr>>>0<4)Y=0,I=0;else for(y=m+56|0,e=134217724&tr,Y=0,I=0;Y=f[y>>2]+(f[y-16>>2]+(f[y-32>>2]+(f[y-48>>2]+Y|0)|0)|0)|0,y=y- -64|0,(0|e)!=(0|(I=I+4|0)););if(B)for(y=8+((I<<4)+m|0)|0;Y=f[y>>2]+Y|0,y=y+16|0,B=B-1|0;);m:{G:{Y:{if((0|(e=7+(((tr+pr<<1)+_|0)+Y|0)|0))>=0){if(Xe=f[g+528>>2],!e)break G;if(y=V(e))break Y;r=1}else r=0;Ze(r,1055412),$f()}f[g+344>>2]=0,f[g+340>>2]=y,f[g+336>>2]=e;break m}f[g+344>>2]=0,f[g+336>>2]=0,f[g+340>>2]=1,de(g+336|0,1055428),y=f[g+340>>2]}i[0|y]=1,f[g+344>>2]=1;m:{G:{Y:{W:{D:{if((e=f[W+8>>2])>>>0>=2){if(e=n[f[W+4>>2]+1|0],1==f[g+336>>2]&&(de(g+336|0,1055460),y=f[g+340>>2]),i[y+1|0]=e,f[g+344>>2]=2,(e=f[W+8>>2])>>>0<3)break D;if(e=n[f[W+4>>2]+2|0],2==f[g+336>>2]&&de(g+336|0,1055492),y=f[g+340>>2],i[y+2|0]=e,f[g+344>>2]=3,(e=f[W+8>>2])>>>0<4)break W;for(e=n[f[W+4>>2]+3|0],3==(0|(_=f[g+336>>2]))&&(de(g+336|0,1055524),_=f[g+336>>2],y=f[g+340>>2]),i[y+3|0]=e,f[g+344>>2]=4,4==(0|_)&&(de(g+336|0,1055540),_=f[g+336>>2],y=f[g+340>>2]),i[y+4|0]=255,f[g+344>>2]=5,5==(0|_)&&de(g+336|0,1055556),_=f[g+340>>2],i[_+5|0]=-32|pr,y=6,f[g+344>>2]=6,E=pr<<4,Y=0;e=(d=f[(w=(B=Y+W|0)+8|0)>>2])>>>8|0,f[g+336>>2]==(0|y)&&(de(g+336|0,1055620),_=f[g+340>>2]),i[y+_|0]=e,e=y+1|0,f[g+344>>2]=e,(0|e)==(0|(I=f[g+336>>2]))&&(de(g+336|0,1055636),I=f[g+336>>2]),_=f[g+340>>2],i[e+_|0]=d,y=y+2|0,f[g+344>>2]=y,e=f[B+4>>2],(d=f[w>>2])>>>0>I-y>>>0&&(Ae(g+336|0,y,d,1,1),_=f[g+340>>2],y=f[g+344>>2]),ze(y+_|0,e,d),y=d+y|0,f[g+344>>2]=y,(0|E)!=(0|(Y=Y+16|0)););for(f[g+336>>2]==(0|y)&&(de(g+336|0,1055572),_=f[g+340>>2]),i[y+_|0]=tr,y=y+1|0,f[g+344>>2]=y,I=tr<<4,B=0;e=(d=f[(w=(E=B+m|0)+8|0)>>2])>>>8|0,(0|(_=f[g+336>>2]))==(0|y)&&(de(g+336|0,1055588),_=f[g+336>>2]),Y=f[g+340>>2],i[Y+y|0]=e,e=y+1|0,f[g+344>>2]=e,(0|e)==(0|_)&&(de(g+336|0,1055604),Y=f[g+340>>2],_=f[g+336>>2]),i[e+Y|0]=d,y=y+2|0,f[g+344>>2]=y,e=f[E+4>>2],(d=f[w>>2])>>>0>_-y>>>0&&(Ae(g+336|0,y,d,1,1),Y=f[g+340>>2],y=f[g+344>>2]),ze(y+Y|0,e,d),y=d+y|0,f[g+344>>2]=y,(0|I)!=(0|(B=B+16|0)););f[g+464>>2]=f[g+344>>2],e=f[g+340>>2],f[g+456>>2]=f[g+336>>2],f[g+460>>2]=e,d=f[(e=W+4|0)>>2],e=f[e+4>>2],f[g+360>>2]=4,f[g+364>>2]=0,f[g+336>>2]=0,f[g+340>>2]=0,f[g+344>>2]=d,f[g+348>>2]=e,f[g+352>>2]=0,f[g+356>>2]=0,Vr(g+296|0,g+336|0,1);S:{if(n[g+296|0]){for(R=g+356|0,E=n[g+297|0],w=f[g+340>>2],w=(d=f[g+336>>2]+32|0)>>>0<32?w+1|0:w,f[g+336>>2]=d,f[g+340>>2]=w,y=0;;){if(Vr(g+288|0,g+336|0,(7&w)<<29|d>>>3),!n[g+288|0])break N;if(B=n[g+289|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}if(Zr(g+336|0,y),(e=E-100|0)>>>0<=22)break S;break Y}Ve(1055652),$f()}if(!(1<>2],w=f[g+340>>2];G:{for(;;){if(Vr(g+280|0,g+336|0,(7&w)<<29|d>>>3),!n[g+280|0])break G;if(B=n[g+281|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}e=Zr(g+336|0,y),d=f[g+336>>2],w=f[g+340>>2],-4==(0|(Y=(-1<>2]=d,f[g+340>>2]=w),y=0;Y:{for(;;){if(Vr(g+272|0,g+336|0,(7&w)<<29|d>>>3),!n[g+272|0])break Y;if(B=n[g+273|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}Zr(g+336|0,y),y=0,d=f[g+336>>2],w=f[g+340>>2];W:{for(;;){if(Vr(g+264|0,g+336|0,(7&w)<<29|d>>>3),!n[g+264|0])break W;if(B=n[g+265|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}if(Zr(E=g+336|0,y),w=f[g+340>>2],w=(e=f[g+336>>2]+1|0)?w:w+1|0,f[g+336>>2]=e,f[g+340>>2]=w,Vr(g+256|0,E,(7&w)<<29|e>>>3),n[g+256|0]){if(d=n[g+257|0],w=f[g+340>>2],w=(B=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=B,f[g+340>>2]=w,!(d>>>(7&~e)&1))break m;Vr(g+248|0,E,(7&w)<<29|B>>>3);D:if(n[g+248|0]&&(I=n[g+249|0],w=f[g+340>>2],w=(e=(B=f[(d=g)+336>>2])+1|0)?w:w+1|0,f[d+336>>2]=e,f[d+340>>2]=w,y=d+240|0,I>>>(7&~B)&1&&(Cr(E,16),e=f[d+336>>2],w=f[d+340>>2]),Vr(y,E,(7&w)<<29|e>>>3),n[d+240|0]&&(Q=n[d+241|0],w=f[d+340>>2],w=(e=(B=f[d+336>>2])+1|0)?w:w+1|0,f[d+336>>2]=e,f[d+340>>2]=w,I=d+232|0,y=_=d+336|0,Q>>>(7&~B)&1&&(Cr(E,16),e=f[d+336>>2],w=f[d+340>>2]),Vr(I,y,(7&w)<<29|e>>>3),n[d+232|0]&&(I=n[d+233|0],w=f[d+340>>2],w=(e=(B=f[d+336>>2])+1|0)?w:w+1|0,f[d+336>>2]=e,f[d+340>>2]=w,y=d+224|0,E=Q=d+336|0,I>>>(7&~B)&1&&(Cr(_,16),e=f[d+336>>2],w=f[d+340>>2]),Vr(y,E,(7&w)<<29|e>>>3),n[d+224|0]&&(I=n[d+225|0],w=f[d+340>>2],w=(e=(B=f[d+336>>2])+1|0)?w:w+1|0,f[d+336>>2]=e,f[d+340>>2]=w,y=d+216|0,E=_=d+336|0,I>>>(7&~B)&1&&(Cr(Q,16),e=f[d+336>>2],w=f[d+340>>2]),Vr(y,E,(7&w)<<29|e>>>3),n[d+216|0]&&(I=n[d+217|0],w=f[d+340>>2],w=(e=(B=f[d+336>>2])+1|0)?w:w+1|0,f[d+336>>2]=e,f[d+340>>2]=w,y=d+208|0,E=d+336|0,I>>>(7&~B)&1&&(Cr(_,16),e=f[d+336>>2],w=f[d+340>>2]),Vr(y,E,(7&w)<<29|e>>>3),n[d+208|0])))))){for(B=n[d+209|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1&&Cr(E,16),y=-4==(0|Y)?6:2;;){if(e=f[g+336>>2],Vr(g+200|0,E=g+336|0,(7&f[g+340>>2])<<29|e>>>3),!n[g+200|0])break D;if(B=n[g+201|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1&&Cr(E,64),!(y=y-1|0))break}break m}break N}break N}break N}break N}break N}for(y=0,d=f[g+336>>2],w=f[g+340>>2];;){if(Vr(g+192|0,g+336|0,(7&w)<<29|d>>>3),!n[g+192|0])break N;if(B=n[g+193|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}for(Zr(g+336|0,y),y=0,d=f[g+336>>2],w=f[g+340>>2];;){if(Vr(g+184|0,g+336|0,(7&w)<<29|d>>>3),!n[g+184|0])break N;if(B=n[g+185|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}m:{G:switch(Zr(g+336|0,y)+~(-1<>2],w=f[g+340>>2];;){if(Vr(g+152|0,g+336|0,(7&w)<<29|d>>>3),!n[g+152|0])break N;if(B=n[g+153|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}Zr(g+336|0,y);break m;case 1:break G;default:break m}w=f[g+340>>2],w=(d=f[g+336>>2]+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,y=0;G:{for(;;){if(Vr(g+176|0,g+336|0,(7&w)<<29|d>>>3),!n[g+176|0])break G;if(B=n[g+177|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}Zr(g+336|0,y),y=0,d=f[g+336>>2],w=f[g+340>>2];Y:{for(;;){if(Vr(g+168|0,g+336|0,(7&w)<<29|d>>>3),!n[g+168|0])break Y;if(B=n[g+169|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}Zr(g+336|0,y),y=0,d=f[g+336>>2],w=f[g+340>>2];W:{for(;;){if(Vr(g+160|0,g+336|0,(7&w)<<29|d>>>3),!n[g+160|0])break W;if(B=n[g+161|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}if(!(C=Zr(g+336|0,y)+~(-1<>2],(y=(7&f[g+340>>2])<<29|e>>>3)>>>0>=(I=f[g+348>>2])>>>0)break N;for(Q=0,e=f[g+352>>2];;){if(e>>>0>=y>>>0)E=f[g+364>>2],B=I;else{D:{S:{if((_=(w=e)+((e=(E=f[g+364>>2])-2|0)>>>0<=E>>>0?e:0)|0)>>>0<=I>>>0){if((0|_)!=(0|I))break S;B=I;break D}xe(_,I,1055768),$f()}for(d=f[g+344>>2],Y=0;;){e=Y,Y=0;S:{F:switch(n[d+_|0]){case 0:Y=e+1|0;break S;case 3:break F;default:break S}(0|e)<2||(f[g+356>>2]==(0|E)&&he(R),f[f[g+360>>2]+(E<<2)>>2]=_,E=E+1|0,f[g+364>>2]=E)}if((0|(_=_+1|0))==(0|I))break}B=f[g+348>>2]}e=I-E|0,f[g+352>>2]=e}D:if(E)for(_=f[g+360>>2],Y=E<<2;;){if(t[_>>2]>y>>>0)break D;if(y=y+1|0,_=_+4|0,!(Y=Y-4|0))break}if(y>>>0>=B>>>0)break N;if(E=n[f[g+344>>2]+y|0],w=f[g+340>>2],w=(y=(d=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=y,f[g+340>>2]=w,!(E>>>(7&~d)&1|Q>>>0>31)){if(Q=Q+1|0,I=B,(y=(7&w)<<29|y>>>3)>>>0>>0)continue;break N}break}if(Zr(g+336|0,Q),D=(e=C>>>0>D>>>0)+D|0,!e)break}break m}break N}break N}break N}for(y=0,d=f[g+336>>2],w=f[g+340>>2];;){if(Vr(g+144|0,g+336|0,(7&w)<<29|d>>>3),!n[g+144|0])break N;if(B=n[g+145|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}for(Zr(g+336|0,y),w=f[g+340>>2],w=(d=f[g+336>>2]+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,B=0;;){if(Vr(g+136|0,g+336|0,(7&w)<<29|d>>>3),!n[g+136|0])break N;if(E=n[g+137|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|B>>>0>31)break;B=B+1|0}for(I=0,Je=Zr(g+336|0,B),d=f[g+336>>2],w=f[g+340>>2];;){if(Vr(g+128|0,g+336|0,(7&w)<<29|d>>>3),!n[g+128|0])break N;if(E=n[g+129|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|I>>>0>31)break;I=I+1|0}if(He=Zr(E=g+336|0,I),e=f[g+336>>2],Vr(g+120|0,E,(7&f[g+340>>2])<<29|e>>>3),!n[g+120|0])break N;if(d=(w=e=f[g+336>>2])+(e=(ur=n[g+121|0]&1<<(7&~e))?1:2)|0,w=f[g+340>>2],w=e>>>0>d>>>0?w+1|0:w,w=(e=d+1|0)?w:w+1|0,f[g+336>>2]=e,f[g+340>>2]=w,Vr(g+112|0,E,(7&w)<<29|e>>>3),!n[g+112|0])break N;if(E=n[g+113|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1){for(y=0;;){if(Vr(g+104|0,g+336|0,(7&w)<<29|d>>>3),!n[g+104|0])break N;if(E=n[g+105|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}for(Y=1+((-1<>2],w=f[g+340>>2];;){if(Vr(g+96|0,g+336|0,(7&w)<<29|d>>>3),!n[g+96|0])break N;if(E=n[g+97|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}for(Q=1+((-1<>2],w=f[g+340>>2];;){if(Vr(g+88|0,g+336|0,(7&w)<<29|d>>>3),!n[g+88|0])break N;if(E=n[g+89|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}for(_=1+((-1<>2],w=f[g+340>>2];;){if(Vr(g+80|0,g+336|0,(7&w)<<29|d>>>3),!n[g+80|0])break N;if(E=n[g+81|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}je=_<<1,Ke=Q<<1,ri=Y<<1,ei=2+((-1<>2],d=f[g+336>>2]}Vr(g+72|0,_=g+336|0,(7&w)<<29|d>>>3);m:{G:{if(n[g+72|0]){if(d=n[g+73|0],w=f[g+340>>2],w=(E=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=E,f[g+340>>2]=w,Fe=1,we=24,!(d>>>(7&~e)&1))break m;if(Vr(g- -64|0,_,(7&w)<<29|E>>>3),!n[g+64|0])break N;if(y=n[g+65|0],w=f[g+340>>2],e=g,w=(E=(d=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=E,f[g+340>>2]=w,!(y>>>(7&~d)&1))break G;if(255==(0|(d=Zr(_,8)))){Ge=1,We=Zr(_,16),De=Zr(_,16);break G}if(d>>>0<=16){Ge=0!=((We=a[(d<<=2)+1055668>>1])|(De=a[d+1055670>>1]));break G}Ne(d,17,1055736),$f()}break N}if(d=f[e+336>>2],Vr(e+56|0,_=e+336|0,(7&f[e+340>>2])<<29|d>>>3),!n[e+56|0])break N;if(E=f[e+336>>2],d=n[e+57|0]>>>(7&~E)&1?2:1,w=f[e+340>>2],w=(d=d+E|0)>>>0>>0?w+1|0:w,f[e+336>>2]=d,f[e+340>>2]=w,Vr(e+48|0,_,(7&w)<<29|d>>>3),!n[e+48|0])break N;if(y=n[e+49|0],e=w=f[g+340>>2],w=(d=(E=f[g+336>>2])+1|0)?e:e+1|0,f[g+336>>2]=d,f[g+340>>2]=w,y>>>(7&~E)&1){if(w=e,w=(e=E+5|0)>>>0<5?w+1|0:w,f[g+336>>2]=e,f[g+340>>2]=w,Vr(g+40|0,_,(7&w)<<29|e>>>3),!n[g+40|0])break N;y=n[g+41|0],e=w=f[g+340>>2],w=(d=(E=f[g+336>>2])+1|0)?e:e+1|0,f[g+336>>2]=d,f[g+340>>2]=w,y>>>(7&~E)&1&&(w=(d=E+25|0)>>>0<25?e+1|0:e,f[g+336>>2]=d,f[g+340>>2]=w)}Vr(g+32|0,g+336|0,(7&w)<<29|d>>>3);G:{Y:{if(n[g+32|0]){if(E=n[g+33|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,!(E>>>(7&~e)&1))break G;for(y=0;;){if(Vr(g+24|0,g+336|0,(7&w)<<29|d>>>3),!n[g+24|0])break N;if(E=n[g+25|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|y>>>0>31)break;y=y+1|0}for(Zr(g+336|0,y),y=0,d=f[g+336>>2],w=f[g+340>>2];;){if(Vr(g+16|0,g+336|0,(7&w)<<29|d>>>3),!n[g+16|0])break N;if(E=n[g+17|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1|y>>>0>31)break Y;y=y+1|0}}break N}Zr(g+336|0,y),d=f[g+336>>2],w=f[g+340>>2]}if(Vr(g+8|0,y=g+336|0,(7&w)<<29|d>>>3),!n[g+8|0])break N;E=n[g+9|0],w=f[g+340>>2],w=(d=(e=f[g+336>>2])+1|0)?w:w+1|0,f[g+336>>2]=d,f[g+340>>2]=w,E>>>(7&~e)&1&&(E=Zr(y,32),d=Zr(y,32),w=f[g+340>>2],w=(e=f[g+336>>2]+1|0)?w:w+1|0,f[g+336>>2]=e,f[g+340>>2]=w,we=+(d>>>0)/+(E<<1>>>0),Fe=0)}if(E=f[g+356>>2]){if(w=f[g+360>>2],(y=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=E<<2)>>>0)break e;if(y>>>0>e+39>>>0&&d)break r;nr(w)}m:{G:{if((e=f[W+8>>2])>>>0>=2){if(2!=(0|e)){if(e>>>0>3){if(d=f[W+4>>2],Rr=n[d+1|0],ne=g+464|0,f[g+312>>2]=f[ne>>2],e=f[g+460>>2],f[g+304>>2]=f[g+456>>2],f[g+308>>2]=e,Nr=n[d+3|0],vr=n[d+2|0],Lr=f[X+240>>2],Y=f[X+244>>2],d=f[X+248>>2],C=0,f[g+328>>2]=0,f[g+320>>2]=0,f[g+324>>2]=8,f[g+440>>2]=0,f[g+444>>2]=4,f[g+448>>2]=0,f[g+452>>2]=0,i[g+434|0]=0,A[g+432>>1]=0,f[g+416>>2]=0,f[g+420>>2]=0,f[g+400>>2]=0,f[g+404>>2]=0,f[g+384>>2]=0,f[g+388>>2]=0,f[g+368>>2]=0,f[g+372>>2]=0,f[g+352>>2]=0,f[g+356>>2]=0,f[g+336>>2]=0,f[g+340>>2]=0,ae=Y+k(d,88)|0,e=Y,!d)break G;kr=g+440|0,w=g+527|0,D=g+540|0,mr=g+344|0,J=(Pr=g+435|0)+4|0,yr=8,y=e;Y:{for(;;){if(e=y+88|0,er=E=f[y+4>>2],!E&2==(0|(d=f[y>>2])))break G;E=f[(_=y+56|0)+4>>2],f[(Q=Be=g+504|0)>>2]=f[_>>2],f[Q+4>>2]=E,E=f[(_=y+48|0)+4>>2],f[(Q=fr=g+496|0)>>2]=f[_>>2],f[Q+4>>2]=E,E=f[(_=y+40|0)+4>>2],f[(Q=Kr=g+488|0)>>2]=f[_>>2],f[Q+4>>2]=E,E=f[(_=y+32|0)+4>>2],f[(Q=$r=g+480|0)>>2]=f[_>>2],f[Q+4>>2]=E,E=f[(_=y+24|0)+4>>2],f[(Q=re=g+472|0)>>2]=f[_>>2],f[Q+4>>2]=E,E=f[(_=y+16|0)+4>>2],f[ne>>2]=f[_>>2],f[ne+4>>2]=E,E=f[y+12>>2],f[g+456>>2]=f[y+8>>2],f[g+460>>2]=E,q=f[y+72>>2],Wr=f[y+76>>2],ee=f[y+80>>2],Ee=f[y+84>>2],y=n[y+64|0],i[g+527|0]=y;W:{D:{if((y-1&255)>>>0<=8)f[g+512>>2]=-2147483648,i[g+516|0]=y;else{if(f[g+548>>2]=1,f[g+544>>2]=1057284,f[g+532>>2]=1,f[g+528>>2]=1057176,f[g+540>>2]=1,f[g+552>>2]=w,f[g+556>>2]=7,f[g+536>>2]=g+552,Mr(g+512|0,g+528|0),-2147483648!=(0|(y=f[g+512>>2])))break D;y=n[g+516|0]}S:{F:{T:{M:switch((255&y)-5|0){default:i[g+433|0]=1;break W;case 0:A[g+432>>1]=257;break W;case 1:case 2:case 3:if(!(Q=n[g+433|0]))break W;if(Sr=f[g+448>>2],_=f[g+452>>2],E=f[g+444>>2],or=f[g+440>>2],!(1&(y=n[g+434|0]))){if(C)break T;C=0}f[g+320>>2]==(0|C)&&oe(g+320|0),R=ze((yr=f[g+324>>2])+k(C,120)|0,g+336|0,97),i[R+98|0]=y,i[R+97|0]=Q,y=n[0|Pr]|n[Pr+1|0]<<8|n[Pr+2|0]<<16|n[Pr+3|0]<<24,i[R+99|0]=y,i[R+100|0]=y>>>8,i[R+101|0]=y>>>16,i[R+102|0]=y>>>24,i[R+103|0]=n[0|J],f[R+116>>2]=_,f[R+112>>2]=Sr,f[R+108>>2]=E,f[R+104>>2]=or,C=C+1|0,f[g+328>>2]=C;break F;case 4:break M}i[0|(R=g+532|0)]=n[0|J],f[g+528>>2]=n[0|Pr]|n[Pr+1|0]<<8|n[Pr+2|0]<<16|n[Pr+3|0]<<24,Sr=f[g+448>>2],E=f[g+444>>2],or=f[g+440>>2];M:if(1&(Q=n[g+433|0])){if(_=f[g+452>>2],!(1&(y=n[g+434|0]))){if(C)break M;C=0}f[g+320>>2]==(0|C)&&(oe(g+320|0),yr=f[g+324>>2]),Fr=Pe(k(C,120)+yr|0,g+336|0,97),i[Fr+98|0]=y,i[Fr+97|0]=Q,y=f[g+528>>2],i[Fr+99|0]=y,i[Fr+100|0]=y>>>8,i[Fr+101|0]=y>>>16,i[Fr+102|0]=y>>>24,i[Fr+103|0]=n[0|R],f[Fr+116>>2]=_,f[Fr+112>>2]=Sr,f[Fr+108>>2]=E,f[Fr+104>>2]=or,C=C+1|0,f[g+328>>2]=C,y=f[g+512>>2];break S}M:if(Sr){if(_=0,1!=(0|Sr)){for(R=1&Sr,Q=-2&Sr,y=E;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+16>>2]+16>>2]](y+28|0,f[y+20>>2],f[y+24>>2]),y=y+32|0,(0|Q)!=(0|(_=_+2|0)););if(!R)break M}fi[f[f[(y=E+(_<<4)|0)>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2])}if(y=-2147483648,!or)break S;if((R=-8&(_=f[E-4>>2]))>>>0<(((Q=3&_)?4:8)|(_=or<<4))>>>0)break e;if(R>>>0>_+39>>>0&&Q)break r;nr(E);break S}T:if(Sr){if(_=0,1!=(0|Sr)){for(R=1&Sr,Q=-2&Sr,y=E;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+16>>2]+16>>2]](y+28|0,f[y+20>>2],f[y+24>>2]),y=y+32|0,(0|Q)!=(0|(_=_+2|0)););if(!R)break T}fi[f[f[(y=E+(_<<4)|0)>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2])}if(or){if((Q=-8&(y=f[E-4>>2]))>>>0<(((_=3&y)?4:8)|(y=or<<4))>>>0)break e;if(Q>>>0>y+39>>>0&&_)break r;nr(E)}}E=f[g+460>>2],f[mr>>2]=f[g+456>>2],f[mr+4>>2]=E,E=f[ne+4>>2],f[(y=mr+8|0)>>2]=f[ne>>2],f[y+4>>2]=E,E=f[re+4>>2],f[(y=mr+16|0)>>2]=f[re>>2],f[y+4>>2]=E,E=f[$r+4>>2],f[(y=mr+24|0)>>2]=f[$r>>2],f[y+4>>2]=E,E=f[Kr+4>>2],f[(y=mr+32|0)>>2]=f[Kr>>2],f[y+4>>2]=E,E=f[fr+4>>2],f[(y=mr+40|0)>>2]=f[fr>>2],f[y+4>>2]=E,E=f[Be+4>>2],f[(y=mr+48|0)>>2]=f[Be>>2],f[y+4>>2]=E,f[g+336>>2]=d,f[g+340>>2]=er,f[g+448>>2]=0,f[g+452>>2]=0,f[g+440>>2]=0,f[g+444>>2]=4,i[g+434|0]=0,A[g+432>>1]=0,f[g+416>>2]=0,f[g+420>>2]=0,f[g+400>>2]=0,f[g+404>>2]=0;break W}if(E=f[g+460>>2],f[mr>>2]=f[g+456>>2],f[mr+4>>2]=E,E=f[ne+4>>2],f[(_=mr+8|0)>>2]=f[ne>>2],f[_+4>>2]=E,E=f[re+4>>2],f[(_=mr+16|0)>>2]=f[re>>2],f[_+4>>2]=E,E=f[$r+4>>2],f[(_=mr+24|0)>>2]=f[$r>>2],f[_+4>>2]=E,E=f[Kr+4>>2],f[(_=mr+32|0)>>2]=f[Kr>>2],f[_+4>>2]=E,E=f[fr+4>>2],f[(_=mr+40|0)>>2]=f[fr>>2],f[_+4>>2]=E,E=f[Be+4>>2],f[(_=mr+48|0)>>2]=f[Be>>2],f[_+4>>2]=E,f[g+336>>2]=d,f[g+340>>2]=er,f[g+448>>2]=0,f[g+452>>2]=0,f[g+440>>2]=0,f[g+444>>2]=4,A[g+432>>1]=0,f[g+416>>2]=0,f[g+420>>2]=0,f[g+400>>2]=0,f[g+404>>2]=0,i[g+434|0]=1,-2147483648==(0|y))break W}if(y){if(E=f[g+516>>2],(_=-8&(d=f[E-4>>2]))>>>0<((d&=3)?4:8)+y>>>0)break e;if(_>>>0>y+39>>>0&&d)break r;nr(E)}}if(!(E=V(4)))break A;d=Ee<<24|(65280&Ee)<<8|Ee>>>8&65280|Ee>>>24,i[0|E]=d,i[E+1|0]=d>>>8,i[E+2|0]=d>>>16,i[E+3|0]=d>>>24,f[g+520>>2]=4,f[g+516>>2]=E,f[g+512>>2]=4,se(g,g+512|0),(E=f[g+4>>2])?(d=f[g>>2],f[g+532>>2]=d,y=d,R=1|d,d&=1,f[g+540>>2]=d?y:R,f[g+528>>2]=d?1051916:1051896,f[g+536>>2]=E,f[g+452>>2]=E+f[g+452>>2],(0|(_=f[g+448>>2]))==f[g+440>>2]&&ce(kr,1058736),d=f[g+532>>2],E=f[g+444>>2]+(_<<4)|0,f[E>>2]=f[g+528>>2],f[E+4>>2]=d,y=E+8|0,d=f[(E=g+536|0)+4>>2],f[y>>2]=f[E>>2],f[y+4>>2]=d,y=_+1|0,f[g+448>>2]=y):(f[g+540>>2]=0,f[g+532>>2]=1,f[g+536>>2]=0,f[g+528>>2]=1051612,fi[f[262907]](D,1,0),y=f[g+448>>2]),ee>>>0>f[g+440>>2]-y>>>0&&(Ae(kr,y,ee,4,16),y=f[g+448>>2]),ze(f[g+444>>2]+(y<<4)|0,Wr,ee<<4),f[g+448>>2]=y+ee;W:{if(q){if((y=-8&(d=f[Wr-4>>2]))>>>0<(((E=3&d)?4:8)|(d=q<<4))>>>0)break W;if(y>>>0>d+39>>>0&&E)break Y;nr(Wr)}if(f[g+452>>2]=Ee+f[g+452>>2],y=e,(0|ae)!=(0|e))continue;break m}break}break e}break r}Ne(3,3,1055396),$f()}Ne(2,2,1055380),$f()}Ne(1,e,1055364),$f()}if((0|e)!=(0|ae))for(D=(ae-e>>>0)/88|0,Q=0;;){if(q=k(Q,88)+e|0,E=f[(R=q+76|0)>>2],d=f[q+80>>2]){_=0;G:{if(1!=(0|d)){for(w=1&d,d&=-2,y=E;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+16>>2]+16>>2]](y+28|0,f[y+20>>2],f[y+24>>2]),y=y+32|0,(0|d)!=(0|(_=_+2|0)););if(!w)break G}fi[f[f[(d=(_<<4)+E|0)>>2]+16>>2]](d+12|0,f[d+4>>2],f[d+8>>2])}E=f[R>>2]}if(y=f[q+72>>2]){if((_=-8&(d=f[E-4>>2]))>>>0<(((w=3&d)?4:8)|(d=y<<4))>>>0)break e;if(_>>>0>d+39>>>0&&w)break r;nr(E)}if((0|D)==(0|(Q=Q+1|0)))break}}if(Lr){if((w=-8&(e=f[Y-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(Lr,88))>>>0)break e;if(w>>>0>e+39>>>0&&d)break r;nr(Y)}y=f[g+448>>2],e=f[g+444>>2],Q=f[g+440>>2];m:{G:if(1&(E=n[g+433|0])){if(w=f[g+452>>2],!(1&(d=n[g+434|0]))){if(C)break G;C=0}f[g+320>>2]==(0|C)&&oe(g+320|0),_=ze((Y=f[g+324>>2])+k(C,120)|0,g+336|0,97),i[_+98|0]=d,i[_+97|0]=E,d=n[0|(E=g+435|0)]|n[E+1|0]<<8|n[E+2|0]<<16|n[E+3|0]<<24,i[_+99|0]=d,i[_+100|0]=d>>>8,i[_+101|0]=d>>>16,i[_+102|0]=d>>>24,i[_+103|0]=n[E+4|0],f[_+116>>2]=w,f[_+112>>2]=y,f[_+108>>2]=e,f[_+104>>2]=Q,C=C+1|0;break m}G:if(y){if(_=0,1!=(0|y)){for(w=1&y,d=-2&y,y=e;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+16>>2]+16>>2]](y+28|0,f[y+20>>2],f[y+24>>2]),y=y+32|0,(0|d)!=(0|(_=_+2|0)););if(!w)break G}fi[f[f[(d=e+(_<<4)|0)>>2]+16>>2]](d+12|0,f[d+4>>2],f[d+8>>2])}if(Q){if((E=-8&(d=f[e-4>>2]))>>>0<(((w=3&d)?4:8)|(d=Q<<4))>>>0)break e;if(E>>>0>d+39>>>0&&w)break r;nr(e)}Y=f[g+324>>2]}m:{G:{Y:{W:{D:{S:{F:{T:{M:{O:{Z:{if(C>>>0>=2){L:{if(C>>>0>=21){U:{if(w=e=qe(d=(e=(e=C-(C>>>1|0)|0)>>>0<(d=C>>>0>=66666?66666:C)>>>0?d:e)>>>0<=48?48:e,0,120,0),M|e>>>0>2147483640)r=0;else{if(e=0,Q=8,!w)break U;if(e=d,Q=V(w))break U;r=8}Ze(r,1057124),$f()}H(Y,C,Q,e,C>>>0<65),jr(Q,0);U:{if((w=-8&(d=f[Q-4>>2]))>>>0>=(e=k(e,120))+((d&=3)?4:8)>>>0){if(w>>>0>e+39>>>0&&d)break U;nr(Q);break L}break e}break r}y=0,S=fr=S-112|0,E=Y+120|0,q=k(C,120)+Y|0;U:{V:{X:{for(;;){if(w=f[(e=E+48|0)>>2],D=f[e+4>>2],!w)break X;if(!(1&f[E-72>>2]))break V;if(d=f[(_=E+56|0)>>2],Q=f[(e=E+-64|0)>>2],e=(0|(_=f[_+4>>2]))<(0|(e=f[e+4>>2]))?1:d>>>0>>0&(0|e)>=(0|_)){e=f[(Q=E+8|0)+4>>2],f[(R=$r=fr+72|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+16|0)+4>>2],f[(R=re=fr+80|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+24|0)+4>>2],f[(R=ee=fr+88|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+32|0)+4>>2],f[(R=ae=fr+96|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+40|0)+4>>2],f[(R=yr=fr+104|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+72|0)+4>>2],f[(R=Wr=fr+16|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+80|0)+4>>2],f[(R=or=fr+24|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+88|0)+4>>2],f[(R=Lr=fr+32|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+96|0)+4>>2],f[(R=kr=fr+40|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+104|0)+4>>2],f[(R=J=fr+48|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[(Q=E+112|0)+4>>2],f[(R=er=fr+56|0)>>2]=f[Q>>2],f[R+4>>2]=e,e=f[E+4>>2],f[fr+64>>2]=f[E>>2],f[fr+68>>2]=e,e=f[E+68>>2],f[fr+8>>2]=f[E+64>>2],f[fr+12>>2]=e,e=y;J:{x:{H:{for(;;){if(Kr=ze((Q=e+Y|0)+120|0,Q,120),!e)break x;if(!(1&f[Q-72>>2]))break H;if(e=e-120|0,R=f[(Q=Q+-64|0)>>2],!(R=(0|(Q=f[Q+4>>2]))>(0|_)?1:d>>>0>>0&(0|_)<=(0|Q)))break}e=120+(e+Y|0)|0;break J}Ve(1058820),$f()}e=Y}Q=f[fr+68>>2],f[e>>2]=f[fr+64>>2],f[e+4>>2]=Q,Q=f[yr+4>>2],f[(R=e+40|0)>>2]=f[yr>>2],f[R+4>>2]=Q,Q=f[ae+4>>2],f[(R=e+32|0)>>2]=f[ae>>2],f[R+4>>2]=Q,Q=f[ee+4>>2],f[(R=e+24|0)>>2]=f[ee>>2],f[R+4>>2]=Q,Q=f[re+4>>2],f[(R=e+16|0)>>2]=f[re>>2],f[R+4>>2]=Q,Q=e+8|0,e=f[$r+4>>2],f[Q>>2]=f[$r>>2],f[Q+4>>2]=e,f[(e=Kr+-64|0)>>2]=d,f[e+4>>2]=_,f[(e=Kr-72|0)>>2]=w,f[e+4>>2]=D,e=f[fr+12>>2],f[(d=w=Kr-56|0)>>2]=f[fr+8>>2],f[d+4>>2]=e,e=f[Wr+4>>2],f[(d=d+8|0)>>2]=f[Wr>>2],f[d+4>>2]=e,e=f[or+4>>2],f[(d=w+16|0)>>2]=f[or>>2],f[d+4>>2]=e,e=f[Lr+4>>2],f[(d=w+24|0)>>2]=f[Lr>>2],f[d+4>>2]=e,e=f[kr+4>>2],f[(d=w+32|0)>>2]=f[kr>>2],f[d+4>>2]=e,e=f[J+4>>2],f[(d=w+40|0)>>2]=f[J>>2],f[d+4>>2]=e,e=f[er+4>>2],f[(d=w+48|0)>>2]=f[er>>2],f[d+4>>2]=e}if(y=y+120|0,(0|q)==(0|(E=E+120|0)))break}S=fr+112|0;break U}Ve(1058820),$f()}Ve(1058820),$f()}}if(!f[X+96>>2])break O;if(!f[X+64>>2])break M;if(_=f[g+320>>2],e=$e((E=f[X+104>>2])-(w=f[X+72>>2])|0,f[X+108>>2]-(f[X+76>>2]+(w>>>0>E>>>0)|0)|0,C-1|0,0),!((0|(d=M))>=0&&((0|d)>0||e)))break Z;if(!(Fe||u(we+-1/((+(e>>>0)+4294967296*+(d>>>0))/9e4))>10))break Z;if(!(E=V(Lr=C<<3)))break D;for(y=Y+40|0,e=E,Q=C;;){if(!f[y-8>>2])break W;if(d=f[y+4>>2],f[e>>2]=f[y>>2],f[e+4>>2]=d,e=e+8|0,y=y+120|0,!(Q=Q-1|0))break}if(C>>>0<21)break T;fe(E,C);break F}_=f[g+320>>2]}y=(Ur=s(9e4/we))>=-0x8000000000000000,(pe=u(Ur))<0x8000000000000000?(e=~~Ur>>>0,E=pe>=1?~~(pe=Ur>0?c(s(2.3283064365386963e-10*Ur),4294967295):l(2.3283064365386963e-10*(Ur-+(~~Ur>>>0>>>0))))>>>0:0):(e=0,E=-2147483648),d=(w=Ur>0x7ffffffffffffc00)?-1:y?e:0,d=(e=Ur==Ur)?d:0,w=e?w?2147483647:y?E:-2147483648:0;break S}Ve(1055188),$f()}Ve(1055204),$f()}for(Q=E+8|0,er=E+(C<<3)|0,q=0;;){if(e=f[Q>>2],d=f[(w=Q-8|0)>>2],y=(0|(y=R=f[Q+4>>2]))<(0|(w=f[w+4>>2]))?1:e>>>0>>0&(0|w)>=(0|y)){y=q;T:{for(;;){if(f[(D=8+(y+E|0)|0)>>2]=d,f[D+4>>2]=w,d=E,!y)break T;if(d=f[(w=D=d+(y=y-8|0)|0)>>2],!(J=(0|(w=f[w+4>>2]))>(0|R)?1:e>>>0>>0&(0|w)>=(0|R)))break}d=D+8|0}f[d>>2]=e,f[d+4>>2]=R}if(q=q+8|0,(0|er)==(0|(Q=Q+8|0)))break}}if(D=0,!(er=V((kr=(e=C-1|0)>>>0<=C>>>0?e:0)<<3)))break Y;if(q=3&e,d=f[E>>2],w=f[E+4>>2],C-2>>>0<3)e=E;else{for(R=-4&e,y=0;yr=f[(e=(Wr=y+E|0)+8|0)>>2],J=f[e+4>>2],f[(e=or=y+er|0)>>2]=yr-d,f[e+4>>2]=J-((d>>>0>yr>>>0)+w|0),Q=f[(e=Wr+16|0)>>2],w=f[e+4>>2],f[(e=or+8|0)>>2]=Q-yr,f[e+4>>2]=w-((Q>>>0>>0)+J|0),yr=f[(e=Wr+24|0)>>2],J=f[e+4>>2],f[(e=or+16|0)>>2]=yr-Q,f[e+4>>2]=J-((Q>>>0>yr>>>0)+w|0),d=f[(e=Wr+32|0)>>2],w=f[e+4>>2],f[(e=or+24|0)>>2]=d-yr,f[e+4>>2]=w-((d>>>0>>0)+J|0),y=y+32|0,(0|R)!=(0|(D=D+4|0)););e=y+E|0}if(q){for(Q=D+q|0,y=e+8|0,e=er+(D<<3)|0;R=f[y+4>>2],D=f[y>>2],f[e>>2]=D-d,f[e+4>>2]=R-((d>>>0>D>>>0)+w|0),y=y+8|0,e=e+8|0,d=D,w=R,q=q-1|0;);D=Q}if((d=-8&(e=f[E-4>>2]))>>>0>>0)break e;if(d>>>0>Lr+39>>>0&&e)break r;if(nr(E),!(D>>>0<2))if(D>>>0>=21)fe(er,D);else for(e=er+8|0,J=er+(D<<3)|0,Q=0;;){if(E=f[e>>2],d=f[(w=e-8|0)>>2],y=(0|(y=R=f[e+4>>2]))<(0|(w=f[w+4>>2]))?1:d>>>0>E>>>0&(0|w)>=(0|y)){y=Q;F:{for(;;){if(f[(q=8+(y+er|0)|0)>>2]=d,f[q+4>>2]=w,d=er,!y)break F;if(d=f[(w=q=d+(y=y-8|0)|0)>>2],!(or=(0|(w=f[w+4>>2]))>(0|R)?1:d>>>0>E>>>0&(0|w)>=(0|R)))break}d=q+8|0}f[d>>2]=E,f[d+4>>2]=R}if(Q=Q+8|0,(0|J)==(0|(e=e+8|0)))break}if((Q=-8&(e=f[er-4>>2]))>>>0<(E=kr<<3)+((y=3&e)?4:8)>>>0)break e;if(d=f[(e=er+(D<<2&-8)|0)>>2],w=e=f[e+4>>2],Q>>>0>E+39>>>0&&y)break r;nr(er),we=1/((+(d>>>0)+4294967296*+(0|e))/9e4)}if(1!=f[X+64>>2])break G;if(!f[X+80>>2])break m;if(f[X+96>>2]){if(q=f[X+72>>2],D=f[X+76>>2],R=a[X+146>>1],Q=a[X+144>>1],y=f[X+88>>2],E=f[X+92>>2],e=f[g+308>>2],f[F+96>>2]=f[g+304>>2],f[F+100>>2]=e,i[F+122|0]=Nr,i[F+121|0]=vr,i[F+120|0]=Rr,A[F+118>>1]=(((1<>1]=16+(((~(-1<>1]=De,A[F+112>>1]=Ge,A[F+110>>1]=We,A[F+108>>1]=Ge,f[F+92>>2]=tr,f[F+88>>2]=m,f[F+84>>2]=Xe,f[F+80>>2]=pr,f[F+76>>2]=W,f[F+72>>2]=Se,A[F+70>>1]=R,A[F+68>>1]=Q,f[F+64>>2]=C,f[F+60>>2]=Y,f[F+56>>2]=_,f[F+40>>2]=y,f[F+44>>2]=E,f[F+32>>2]=q,f[F+36>>2]=D,f[F+24>>2]=d,f[F+28>>2]=w,b[F+16>>3]=we,f[F>>2]=0,f[F+4>>2]=0,e=f[X+108>>2],f[F+48>>2]=f[X+104>>2],f[F+52>>2]=e,f[F+104>>2]=f[g+312>>2],(e=f[X+128>>2])&&fi[f[e+16>>2]](X+140|0,f[X+132>>2],f[X+136>>2]),2!=f[X+152>>2]|f[X+156>>2])break C;break R}Ve(1055252),$f()}Ze(8,1057400),$f()}Ve(1057416),$f()}Ze(8,1057400),$f()}Ve(1055220),$f()}Ve(1055236),$f()}}if(!(e=V(41)))break A;if(i[e+40|0]=n[1055184],w=n[1055180]|n[1055181]<<8|n[1055182]<<16|n[1055183]<<24,B=e+32|0,d=n[1055176]|n[1055177]<<8|n[1055178]<<16|n[1055179]<<24,i[0|B]=d,i[B+1|0]=d>>>8,i[B+2|0]=d>>>16,i[B+3|0]=d>>>24,i[B+4|0]=w,i[B+5|0]=w>>>8,i[B+6|0]=w>>>16,i[B+7|0]=w>>>24,w=n[1055172]|n[1055173]<<8|n[1055174]<<16|n[1055175]<<24,B=e+24|0,d=n[1055168]|n[1055169]<<8|n[1055170]<<16|n[1055171]<<24,i[0|B]=d,i[B+1|0]=d>>>8,i[B+2|0]=d>>>16,i[B+3|0]=d>>>24,i[B+4|0]=w,i[B+5|0]=w>>>8,i[B+6|0]=w>>>16,i[B+7|0]=w>>>24,w=n[1055164]|n[1055165]<<8|n[1055166]<<16|n[1055167]<<24,B=e+16|0,d=n[1055160]|n[1055161]<<8|n[1055162]<<16|n[1055163]<<24,i[0|B]=d,i[B+1|0]=d>>>8,i[B+2|0]=d>>>16,i[B+3|0]=d>>>24,i[B+4|0]=w,i[B+5|0]=w>>>8,i[B+6|0]=w>>>16,i[B+7|0]=w>>>24,w=n[1055156]|n[1055157]<<8|n[1055158]<<16|n[1055159]<<24,B=e+8|0,d=n[1055152]|n[1055153]<<8|n[1055154]<<16|n[1055155]<<24,i[0|B]=d,i[B+1|0]=d>>>8,i[B+2|0]=d>>>16,i[B+3|0]=d>>>24,i[B+4|0]=w,i[B+5|0]=w>>>8,i[B+6|0]=w>>>16,i[B+7|0]=w>>>24,w=n[1055148]|n[1055149]<<8|n[1055150]<<16|n[1055151]<<24,d=n[1055144]|n[1055145]<<8|n[1055146]<<16|n[1055147]<<24,i[0|e]=d,i[e+1|0]=d>>>8,i[e+2|0]=d>>>16,i[e+3|0]=d>>>24,i[e+4|0]=w,i[e+5|0]=w>>>8,i[e+6|0]=w>>>16,i[e+7|0]=w>>>24,f[F+16>>2]=41,f[F+12>>2]=e,f[F+8>>2]=41,f[F>>2]=2,f[F+4>>2]=0,(e=f[X+128>>2])&&fi[f[e+16>>2]](X+140|0,f[X+132>>2],f[X+136>>2]),xr(f[X+244>>2],f[X+248>>2]),B=f[X+240>>2]){if(w=f[X+244>>2],(E=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(B,88))>>>0)break e;if(E>>>0>e+39>>>0&&d)break r;nr(w)}if(!f[X+156>>2]&2==f[X+152>>2])break R}if(B=f[X+228>>2],e=f[X+232>>2]){_=0;C:{if(1!=(0|e)){for(d=1&e,e&=-2,y=B;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+16>>2]+16>>2]](y+28|0,f[y+20>>2],f[y+24>>2]),y=y+32|0,(0|e)!=(0|(_=_+2|0)););if(!d)break C}fi[f[f[(e=(_<<4)+B|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}B=f[X+228>>2]}if(w=f[X+224>>2]){if((E=-8&(e=f[B-4>>2]))>>>0<(((d=3&e)?4:8)|(e=w<<4))>>>0)break e;if(E>>>0>e+39>>>0&&d)break r;nr(B)}}S=g+560|0;break Q}Ve(1055784),$f()}if(f[(d=o+3328|0)>>2]=f[o+752>>2],e=f[o+748>>2],f[o+3320>>2]=f[o+744>>2],f[o+3324>>2]=e,2!=f[o+736>>2]|f[o+740>>2])break w;e=f[o+3324>>2],f[v+8>>2]=f[o+3320>>2],f[v+12>>2]=e,f[v>>2]=3,f[v+4>>2]=0,f[v+16>>2]=f[d>>2],lr(o+3016|0),ke||(Le?(xr(N,O),_e(Ir,N)):(Hr(N,O),Qe(Ir,N)),Re(Gr,Or)),d=1}if(e=(w=f[o+424>>2])-2|0,f[o+428>>2]==(w>>>0<2|0)&e>>>0<=1){if(!L|1==(0|e))break g;if((e=f[o+560>>2])&&fi[f[e+16>>2]](o+572|0,f[o+564>>2],f[o+568>>2]),xr(f[o+676>>2],f[o+680>>2]),_e(f[o+672>>2],f[o+676>>2]),2!=f[o+584>>2]|f[o+588>>2])break y;break g}if(!T)break g;if((e=f[o+552>>2])&&fi[f[e+16>>2]](o+564|0,f[o+556>>2],f[o+560>>2]),Hr(f[o+684>>2],f[o+688>>2]),Qe(f[o+680>>2],f[o+684>>2]),ue=Te,2!=f[o+576>>2]|f[o+580>>2])break y;break g}Ve(1054600),$f()}Ve(1054616),$f()}Ve(1054632),$f()}if(E=f[ue+4>>2],w=f[ue+8>>2]){e=0;y:{if(1!=(0|w)){for(g=1&w,w&=-2,B=E;fi[f[f[B>>2]+16>>2]](B+12|0,f[B+4>>2],f[B+8>>2]),fi[f[f[B+16>>2]+16>>2]](B+28|0,f[B+20>>2],f[B+24>>2]),B=B+32|0,(0|w)!=(0|(e=e+2|0)););if(!g)break y}fi[f[f[(e=(e<<4)+E|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}E=f[ue+4>>2]}Ie(f[ue>>2],E)}g:if(!(d|!f[o+4>>2]&2==f[o>>2])){(e=f[o+128>>2])&&fi[f[e+16>>2]](o+140|0,f[o+132>>2],f[o+136>>2]),xr(f[o+244>>2],f[o+248>>2]);y:{if(g=f[o+240>>2]){if(w=f[o+244>>2],(B=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(g,88))>>>0)break e;if(B>>>0>e+39>>>0&&d)break y;nr(w)}if(!f[o+156>>2]&2==f[o+152>>2])break g;if(I=f[o+228>>2],d=f[o+232>>2]){e=0;B:{if(1!=(0|d)){for(w=1&d,d&=-2,B=I;fi[f[f[B>>2]+16>>2]](B+12|0,f[B+4>>2],f[B+8>>2]),fi[f[f[B+16>>2]+16>>2]](B+28|0,f[B+20>>2],f[B+24>>2]),B=B+32|0,(0|d)!=(0|(e=e+2|0)););if(!w)break B}fi[f[f[(e=(e<<4)+I|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}I=f[o+228>>2]}Ie(f[o+224>>2],I);break g}break r}if(!f[o+260>>2]&2==f[o+256>>2])break n;if((e=f[o+384>>2])&&fi[f[e+16>>2]](o+396|0,f[o+388>>2],f[o+392>>2]),gr(f[o+412>>2],f[o+416>>2]),!(g=f[o+408>>2]))break n;w=f[o+412>>2];g:{if((B=-8&(e=f[w-4>>2]))>>>0>=((d=3&e)?4:8)+(e=k(g,72))>>>0){if(B>>>0>e+39>>>0&&d)break g;nr(w);break n}break e}break r}ze(o+1908|0,o+756|0,108),f[o+1904>>2]=f[o+3328>>2],e=f[o+3324>>2],f[o+1896>>2]=f[o+3320>>2],f[o+1900>>2]=e,f[(e=m=o+1888|0)>>2]=1,f[e+4>>2]=0,y=(B=f[e+24>>2])+(d=f[e+48>>2])|0,w=(g=f[e+28>>2])+f[e+52>>2]|0,w=d>>>0>y>>>0?w+1|0:w,E=y-(d=f[e+32>>2])|0,d=w-(f[e+36>>2]+(d>>>0>y>>>0)|0)|0,f[e+8>>2]=E,f[e+12>>2]=d;w:{g:{y:{B:{E:{_:{if(L=f[e+64>>2]){if(W=f[e+60>>2],1!=(0|L))for(e=L-1|0,y=W+168|0;;){if(!f[y>>2])break _;if(!f[y-120>>2])break E;if(Q=f[(d=y+8|0)>>2],I=f[d+4>>2],f[(d=y-104|0)>>2]=1,f[d+4>>2]=0,d=Q-(w=f[(E=y-112|0)>>2])|0,E=w=I-(f[E+4>>2]+(w>>>0>Q>>>0)|0)|0,d=(w=!((0|w)>=0&&((0|w)>0||d)))?B:d,f[(_=y-96|0)>>2]=d,w=w?g:E,f[_+4>>2]=w,y=y+120|0,!(e=e-1|0))break}else d=B,w=g;if(y=k(L,120),f[(e=(g=y+W|0)-48|0)>>2]=d,f[e+4>>2]=w,f[(e=g-56|0)>>2]=1,f[e+4>>2]=0,1!=f[W+48>>2])break B;for(d=f[W+56>>2],w=f[W+60>>2],e=0;;){if(1!=f[(I=e+W|0)+32>>2])break y;if(f[(g=I+80|0)>>2]=1,f[g+4>>2]=0,B=f[(g=I+40|0)>>2],E=f[g+4>>2]-((d>>>0>B>>>0)+w|0)|0,B=B-d|0,f[(g=I+88|0)>>2]=B,f[g+4>>2]=E,!f[I- -64>>2])break g;if(g=f[(B=I+72|0)>>2],w=w+f[B+4>>2]|0,w=(B=d)>>>0>(d=d+g|0)>>>0?w+1|0:w,(0|y)==(0|(e=e+120|0)))break}}break w}Ve(1055888),$f()}Ve(1055904),$f()}Ve(1055920),$f()}Ve(1055936),$f()}Ve(1055952),$f()}lr(e=o+3016|0),ze(e,m,128)}_=e=f[o+260>>2];d:if(!e&2==(0|(g=f[o+256>>2])))B=-2147483648;else{ze(o+2016|0,Yr,168);w:{if(e=f[o+2176>>2])for(m=f[o+2172>>2],p=k(e,72),e=0;;){if(1!=f[(w=e+m|0)+24>>2])break w;if(f[(d=w+8|0)>>2]=1,f[d+4>>2]=0,Q=w+16|0,d=(B=f[(w=w+32|0)>>2])-Ar|0,I=(w=f[w+4>>2]-((B>>>0>>0)+br|0)|0)-2|0,B=(B=(0|w)<-1)?w+2|0:w,w=br+((w=(0|w)>0)?I:B)|0,w=(d=d+Ar|0)>>>0>>0?w+1|0:w,f[Q>>2]=d,f[Q+4>>2]=w,(0|p)==(0|(e=e+72|0)))break}if(p=f[o+2172>>2],K=f[o+2176>>2],B=f[o+2168>>2],!(e=f[o+2144>>2]))break d;fi[f[e+16>>2]](o+2156|0,f[o+2148>>2],f[o+2152>>2]);break d}Ve(1054032),$f()}e=f[o+1460>>2],f[v+8>>2]=f[o+1456>>2],f[v+12>>2]=e,e=f[o+2940>>2],f[v+88>>2]=f[o+2936>>2],f[v+92>>2]=e,e=f[(d=o+1504|0)+4>>2],f[(w=v+56|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+1496|0)+4>>2],f[(w=v+48|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+1488|0)+4>>2],f[(w=v+40|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+1480|0)+4>>2],f[(w=v+32|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+1472|0)+4>>2],f[(w=v+24|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+1464|0)+4>>2],f[(w=v+16|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+2944|0)+4>>2],f[(w=v+96|0)>>2]=f[d>>2],f[w+4>>2]=e,ze(v+104|0,o+3016|0,128),f[v+244>>2]=p,f[v+248>>2]=K,f[v+240>>2]=B,A[v+254>>1]=Oe,A[v+252>>1]=ie,f[v+232>>2]=Ar,f[v+236>>2]=br,f[v+84>>2]=Or,f[v+80>>2]=Gr,f[v+76>>2]=rr,f[v+72>>2]=O,f[v+68>>2]=N,f[v+64>>2]=Ir,f[v>>2]=me,f[v+4>>2]=0;d:if(!(2!=(0|Er)|Ue||!f[o+4>>2]&2==f[o>>2])){(e=f[o+128>>2])&&fi[f[e+16>>2]](o+140|0,f[o+132>>2],f[o+136>>2]),xr(f[o+244>>2],f[o+248>>2]);w:{if(B=f[o+240>>2]){if(w=f[o+244>>2],(E=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(B,88))>>>0)break e;if(E>>>0>e+39>>>0&&d)break w;nr(w)}if(!f[o+156>>2]&2==f[o+152>>2])break d;if(I=f[o+228>>2],d=f[o+232>>2]){e=0;g:{if(1!=(0|d)){for(w=1&d,d&=-2,B=I;fi[f[f[B>>2]+16>>2]](B+12|0,f[B+4>>2],f[B+8>>2]),fi[f[f[B+16>>2]+16>>2]](B+28|0,f[B+20>>2],f[B+24>>2]),B=B+32|0,(0|d)!=(0|(e=e+2|0)););if(!w)break g}fi[f[f[(e=(e<<4)+I|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}I=f[o+228>>2]}Ie(f[o+224>>2],I);break d}break r}if(2!=(0|g)|_)break n;if(!f[o+260>>2]&2==f[o+256>>2])break n;if((e=f[o+384>>2])&&fi[f[e+16>>2]](o+396|0,f[o+388>>2],f[o+392>>2]),gr(f[o+412>>2],f[o+416>>2]),!(g=f[o+408>>2]))break n;w=f[o+412>>2];d:{if((B=-8&(e=f[w-4>>2]))>>>0>=((d=3&e)?4:8)+(e=k(g,72))>>>0){if(B>>>0>e+39>>>0&&d)break d;nr(w);break n}break e}break r}v:switch(N-1|0){default:if(e)break h;e=0,rr=0;break l;case 0:w=255&m,d=B,rr=1;break l;case 1:break v}w=255&m,d=B,rr=2;break l}e=1+(e>>>3|0)|0,rr=0}f[o+3020>>2]=e,A[o+3024>>1]=d,i[o+3031|0]=w>>>24,i[o+3030|0]=w>>>16,i[o+3029|0]=w>>>8,i[o+3028|0]=w,A[o+3026>>1]=(65535&w)<<16|d>>>16;break o}E=N,L=1}f[o+3028>>2]=ke,f[o+3024>>2]=E,f[o+3020>>2]=L}if(rr){f[o+3328>>2]=f[q+8>>2],e=f[q+4>>2],f[o+3320>>2]=f[q>>2],f[o+3324>>2]=e,f[o+1460>>2]=1,f[o+1456>>2]=1054480,f[o+1468>>2]=1,f[o+1472>>2]=0,f[o+2976>>2]=o+3320,f[o+2980>>2]=4,f[o+1464>>2]=o+2976,Mr(o+3304|0,o+1456|0);break k}}if(!(e=V(25)))break A;i[e+24|0]=n[1054456],w=n[1054452]|n[1054453]<<8|n[1054454]<<16|n[1054455]<<24,g=e+16|0,d=n[1054448]|n[1054449]<<8|n[1054450]<<16|n[1054451]<<24,i[0|g]=d,i[g+1|0]=d>>>8,i[g+2|0]=d>>>16,i[g+3|0]=d>>>24,i[g+4|0]=w,i[g+5|0]=w>>>8,i[g+6|0]=w>>>16,i[g+7|0]=w>>>24,w=n[1054444]|n[1054445]<<8|n[1054446]<<16|n[1054447]<<24,g=e+8|0,d=n[1054440]|n[1054441]<<8|n[1054442]<<16|n[1054443]<<24,i[0|g]=d,i[g+1|0]=d>>>8,i[g+2|0]=d>>>16,i[g+3|0]=d>>>24,i[g+4|0]=w,i[g+5|0]=w>>>8,i[g+6|0]=w>>>16,i[g+7|0]=w>>>24,w=n[1054436]|n[1054437]<<8|n[1054438]<<16|n[1054439]<<24,d=n[1054432]|n[1054433]<<8|n[1054434]<<16|n[1054435]<<24,i[0|e]=d,i[e+1|0]=d>>>8,i[e+2|0]=d>>>16,i[e+3|0]=d>>>24,i[e+4|0]=w,i[e+5|0]=w>>>8,i[e+6|0]=w>>>16,i[e+7|0]=w>>>24,f[o+3312>>2]=25,f[o+3308>>2]=e,f[o+3304>>2]=25}e=f[o+3312>>2],f[o+1832>>2]=e,f[o+752>>2]=e,e=f[o+3308>>2],d=f[o+3304>>2],f[o+1824>>2]=d,f[o+1828>>2]=e,f[o+744>>2]=d,f[o+748>>2]=e,fi[f[f[o+2936>>2]+16>>2]](Er,f[o+2940>>2],f[o+2944>>2])}d=f[o+2912>>2];b:if(w=f[o+2916>>2]){if(e=0,1!=(0|w)){for(g=1&w,w&=-2,B=d;fi[f[f[B>>2]+16>>2]](B+12|0,f[B+4>>2],f[B+8>>2]),fi[f[f[B+20>>2]+16>>2]](B+32|0,f[B+24>>2],f[B+28>>2]),B=B+40|0,(0|w)!=(0|(e=e+2|0)););if(!g)break b}e=d+k(e,20)|0,fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}if(g=f[o+2908>>2]){if((B=-8&(e=f[d-4>>2]))>>>0<((w=3&e)?4:8)+(e=k(g,20))>>>0)break e;if(B>>>0>e+39>>>0&&w)break r;nr(d)}}if(Br(p),!(!f[o+2188>>2]&2==f[o+2184>>2])){if((e=f[o+2312>>2])&&fi[f[e+16>>2]](o+2324|0,f[o+2316>>2],f[o+2320>>2]),xr(f[o+2428>>2],f[o+2432>>2]),g=f[o+2424>>2]){if(w=f[o+2428>>2],(B=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(g,88))>>>0)break e;if(B>>>0>e+39>>>0&&d)break r;nr(w)}if(!(!f[o+2340>>2]&2==f[o+2336>>2])){if(I=f[o+2412>>2],d=f[o+2416>>2]){e=0;t:{if(1!=(0|d)){for(w=1&d,d&=-2,B=I;fi[f[f[B>>2]+16>>2]](B+12|0,f[B+4>>2],f[B+8>>2]),fi[f[f[B+16>>2]+16>>2]](B+28|0,f[B+20>>2],f[B+24>>2]),B=B+32|0,(0|d)!=(0|(e=e+2|0)););if(!w)break t}fi[f[f[(e=(e<<4)+I|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}I=f[o+2412>>2]}if(w=f[o+2408>>2]){if((g=-8&(e=f[I-4>>2]))>>>0<(((d=3&e)?4:8)|(e=w<<4))>>>0)break e;if(g>>>0>e+39>>>0&&d)break r;nr(I)}}}if(!f[o+2444>>2]&2==f[o+2440>>2])break a;if((e=f[o+2568>>2])&&fi[f[e+16>>2]](o+2580|0,f[o+2572>>2],f[o+2576>>2]),gr(f[o+2596>>2],f[o+2600>>2]),!(g=f[o+2592>>2]))break a;if(w=f[o+2596>>2],(B=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(g,72))>>>0)break e;if(!(B>>>0>e+39>>>0&&d)){nr(w);break a}break r}if(B=B+1|0,!((e=e-1|0)>>>0>=376))break}if(!(e=V(48)))break A;w=n[1054320]|n[1054321]<<8|n[1054322]<<16|n[1054323]<<24,g=e+40|0,d=n[1054316]|n[1054317]<<8|n[1054318]<<16|n[1054319]<<24,i[0|g]=d,i[g+1|0]=d>>>8,i[g+2|0]=d>>>16,i[g+3|0]=d>>>24,i[g+4|0]=w,i[g+5|0]=w>>>8,i[g+6|0]=w>>>16,i[g+7|0]=w>>>24,w=n[1054312]|n[1054313]<<8|n[1054314]<<16|n[1054315]<<24,g=e+32|0,d=n[1054308]|n[1054309]<<8|n[1054310]<<16|n[1054311]<<24,i[0|g]=d,i[g+1|0]=d>>>8,i[g+2|0]=d>>>16,i[g+3|0]=d>>>24,i[g+4|0]=w,i[g+5|0]=w>>>8,i[g+6|0]=w>>>16,i[g+7|0]=w>>>24,w=n[1054304]|n[1054305]<<8|n[1054306]<<16|n[1054307]<<24,g=e+24|0,d=n[1054300]|n[1054301]<<8|n[1054302]<<16|n[1054303]<<24,i[0|g]=d,i[g+1|0]=d>>>8,i[g+2|0]=d>>>16,i[g+3|0]=d>>>24,i[g+4|0]=w,i[g+5|0]=w>>>8,i[g+6|0]=w>>>16,i[g+7|0]=w>>>24,w=n[1054296]|n[1054297]<<8|n[1054298]<<16|n[1054299]<<24,g=e+16|0,d=n[1054292]|n[1054293]<<8|n[1054294]<<16|n[1054295]<<24,i[0|g]=d,i[g+1|0]=d>>>8,i[g+2|0]=d>>>16,i[g+3|0]=d>>>24,i[g+4|0]=w,i[g+5|0]=w>>>8,i[g+6|0]=w>>>16,i[g+7|0]=w>>>24,w=n[1054288]|n[1054289]<<8|n[1054290]<<16|n[1054291]<<24,g=e+8|0,d=n[1054284]|n[1054285]<<8|n[1054286]<<16|n[1054287]<<24,i[0|g]=d,i[g+1|0]=d>>>8,i[g+2|0]=d>>>16,i[g+3|0]=d>>>24,i[g+4|0]=w,i[g+5|0]=w>>>8,i[g+6|0]=w>>>16,i[g+7|0]=w>>>24,w=n[1054280]|n[1054281]<<8|n[1054282]<<16|n[1054283]<<24,d=n[1054276]|n[1054277]<<8|n[1054278]<<16|n[1054279]<<24,i[0|e]=d,i[e+1|0]=d>>>8,i[e+2|0]=d>>>16,i[e+3|0]=d>>>24,i[e+4|0]=w,i[e+5|0]=w>>>8,i[e+6|0]=w>>>16,i[e+7|0]=w>>>24,f[o+752>>2]=48,f[o+748>>2]=e,f[o+744>>2]=48}e=f[o+752>>2],f[o+728>>2]=e,d=f[o+748>>2],w=f[o+744>>2],f[o+720>>2]=w,f[o+724>>2]=d,f[v+16>>2]=e,f[v+8>>2]=w,f[v+12>>2]=d,f[v>>2]=3,f[v+4>>2]=0}fi[f[f[Tr>>2]+16>>2]](Tr+12|0,f[Tr+4>>2],f[Tr+8>>2]),S=o+3344|0;break i}ge(1053512,55,o+3343|0,1053496,1053568),$f()}Ze(1,1057036),$f()}B=f[h+856>>2],E=f[h+852>>2],e=f[h+848>>2];i:{A:{f:{n:{a:{if(3!=(0|(d=f[h+840>>2]))|(w=f[h+844>>2])){if(ze(h+524|0,h+860|0,236),f[h+520>>2]=B,f[h+516>>2]=E,f[h+512>>2]=e,f[h+504>>2]=d,f[h+508>>2]=w,ar(v,y=h+504|0),B=f[h+852>>2],E=f[h+848>>2],e=f[h+844>>2],1!=f[h+840>>2]){if(I=h+872|0,f[h+788>>2]=f[I>>2],d=f[(w=h+864|0)+4>>2],f[(g=h+780|0)>>2]=f[w>>2],f[g+4>>2]=d,d=f[h+860>>2],f[h+772>>2]=f[h+856>>2],f[h+776>>2]=d,f[h+768>>2]=B,f[h+764>>2]=E,f[h+760>>2]=e,U(v,y),1!=f[h+840>>2]){if(e=f[I+4>>2],f[(d=Y=h+800|0)>>2]=f[I>>2],f[d+4>>2]=e,e=f[(d=h+768|0)+4>>2],f[(w=W=h+816|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[h+868>>2],f[h+792>>2]=f[h+864>>2],f[h+796>>2]=e,e=f[h+764>>2],f[h+808>>2]=f[h+760>>2],f[h+812>>2]=e,rr=f[h+848>>2],K=f[h+852>>2],L=f[h+856>>2],Q=f[h+860>>2],_=f[h+920>>2],m=f[h+912>>2],N=f[h+916>>2],d=f[h+888>>2],p=f[h+880>>2],I=f[h+884>>2],e=f[h+904>>2],y=f[h+896>>2],E=f[h+900>>2],w=f[(g=h+784|0)+4>>2],f[(B=h+832|0)>>2]=f[g>>2],f[B+4>>2]=w,w=f[h+780>>2],f[(g=h+824|0)>>2]=f[h+776>>2],f[g+4>>2]=w,ze(w=h+840|0,h+504|0,256),hr(h+1096|0,w,d?p:0,d?I:0,d||9e4,e?y:0,e?E:0,e||9e4,m,N,_),e=f[W+4>>2],f[(d=h+1240|0)>>2]=f[W>>2],f[d+4>>2]=e,e=f[g+4>>2],f[(d=h+1248|0)>>2]=f[g>>2],f[d+4>>2]=e,e=f[B+4>>2],f[(d=h+1256|0)>>2]=f[B>>2],f[d+4>>2]=e,e=f[Y+4>>2],f[(d=h+1288|0)>>2]=f[Y>>2],f[d+4>>2]=e,f[h+1272>>2]=L,f[h+1276>>2]=Q,f[h+1264>>2]=rr,f[h+1268>>2]=K,e=f[h+812>>2],f[h+1232>>2]=f[h+808>>2],f[h+1236>>2]=e,e=f[h+796>>2],f[h+1280>>2]=f[h+792>>2],f[h+1284>>2]=e,d=f[h+1096>>2],w=f[h+1100>>2],e=f[h+1104>>2],E=f[h+1108>>2],B=f[h+1112>>2],y=ze(h,h+1116|0,180),(g=f[y+472>>2])&&fi[f[g+16>>2]](y+484|0,f[y+476>>2],f[y+480>>2]),!(y=f[y+488>>2]))break n;break a}(g=f[h+852>>2],w=f[h+848>>2],d=f[h+844>>2],e&&fi[f[e+16>>2]](h+772|0,E,B),e=f[h+776>>2])&&fi[f[e+16>>2]](h+788|0,f[h+780>>2],f[h+784>>2]),B=g,E=w,e=d}ir(h+504|0)}if((d=f[h+472>>2])&&fi[f[d+16>>2]](h+484|0,f[h+476>>2],f[h+480>>2]),d=2,w=0,!(y=f[h+488>>2]))break f}fi[f[y+16>>2]](h+500|0,f[h+492>>2],f[h+496>>2])}if(!(!w&2==(0|d))){ze(h+260|0,h,180),f[h+256>>2]=B,f[h+252>>2]=E,f[h+248>>2]=e,f[h+240>>2]=d,f[h+244>>2]=w,B=$(h+240|0),y=0;break A}}if(y=0,-2147483648!=(0|e)){if(y=1,B=0|G(0|E,0|B),e){if((w=-8&(d=f[E-4>>2]))>>>0<((d&=3)?4:8)+e>>>0)break e;if(w>>>0>e+39>>>0&&d)break i;nr(E)}}else B=E}return f[r+8>>2]=y,f[r+4>>2]=y?B:0,f[r>>2]=y?0:B,void(S=h+1296|0)}break r}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},raw_audio_to_fmp4:function(r,e){r|=0;var b,u=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0,p=0,m=0,Y=0,W=0,D=0,F=0,T=0,O=0,L=0,X=0,J=0,H=0,K=0,q=0,rr=0;S=b=S-2928|0,Dr(b+196|0,e|=0),s=f[(u=b+248|0)+4>>2],f[(e=b+464|0)>>2]=f[u>>2],f[e+4>>2]=s,e=f[b+244>>2],f[b+456>>2]=f[b+240>>2],f[b+460>>2]=e,2==(0|(e=a[b+196>>1]))?(e=0,f[b+504>>2]=0,f[b+488>>2]=0,A[b+484>>1]=0,A[b+480>>1]=0):(A[b+518>>1]=a[b+238>>1],l=a[(s=b+230|0)+4>>1]|a[s+6>>1]<<16,u=b+510|0,s=a[s>>1]|a[s+2>>1]<<16,A[u>>1]=s,A[u+2>>1]=s>>>16,A[u+4>>1]=l,A[u+6>>1]=l>>>16,l=a[(s=b+222|0)+4>>1]|a[s+6>>1]<<16,u=b+502|0,s=a[s>>1]|a[s+2>>1]<<16,A[u>>1]=s,A[u+2>>1]=s>>>16,A[u+4>>1]=l,A[u+6>>1]=l>>>16,l=a[(s=b+214|0)+4>>1]|a[s+6>>1]<<16,u=b+494|0,s=a[s>>1]|a[s+2>>1]<<16,A[u>>1]=s,A[u+2>>1]=s>>>16,A[u+4>>1]=l,A[u+6>>1]=l>>>16,l=a[(s=b+206|0)+4>>1]|a[s+6>>1]<<16,u=b+486|0,s=a[s>>1]|a[s+2>>1]<<16,A[u>>1]=s,A[u+2>>1]=s>>>16,A[u+4>>1]=l,A[u+6>>1]=l>>>16,u=a[b+202>>1]|a[b+204>>1]<<16,s=a[b+198>>1]|a[b+200>>1]<<16,A[b+478>>1]=s,A[b+480>>1]=s>>>16,A[b+482>>1]=u,A[b+484>>1]=u>>>16),A[b+476>>1]=e,f[b+1592>>2]=2,f[b+1596>>2]=0,f[b+1760>>2]=3,f[b+1764>>2]=0,f[b+2664>>2]=0,f[b+2668>>2]=0,f[b+2656>>2]=0,f[b+2660>>2]=8,i[b+2654|0]=0,A[b+2652>>1]=0,A[b+2648>>1]=0,f[b+2632>>2]=0,f[b+2616>>2]=0,f[b+2620>>2]=0,f[b+2600>>2]=0,f[b+2604>>2]=0,f[b+2584>>2]=0,f[b+2588>>2]=0,f[b+2568>>2]=0,f[b+2572>>2]=0,f[b+2552>>2]=0,f[b+2556>>2]=0,f[b+2536>>2]=0,f[b+2540>>2]=0,f[b+2520>>2]=0,f[b+2524>>2]=0,f[b+2504>>2]=0,f[b+2508>>2]=0;r:{e:{i:{A:{f:{n:{a:{t:{b:{k:{u:{o:{c:{s:{l:{h:if(e=f[b+464>>2]){for(F=b+2060|0,_=b+468|0,l=b+2884|0,h=b+2900|0;;){if(f[b+2840>>2]=e,f[b+2856>>2]=10,e>>>0<=9)break l;if(g=b+2048|0,fi[f[f[b+456>>2]>>2]](g,_,f[b+460>>2],e),f[(e=b+2056|0)>>2]=10,s=f[e+4>>2],f[(u=b+2880|0)>>2]=f[e>>2],f[u+4>>2]=s,u=f[b+2052>>2],f[b+2872>>2]=f[b+2048>>2],f[b+2876>>2]=u,Tr(b+2216|0,b+2872|0,0,0),2!=f[b+2216>>2]|f[b+2220>>2]){if(qr(u=b+2888|0,b+456|0,f[b+2248>>2]+10|0),z(u,0,0,b+2504|0),(s=f[b+2668>>2])&&(p=f[b+2664>>2])){B=f[b+2660>>2],qr(g,I=u,v=(u=f[b+2896>>2])>>>0>>0?u:s);v:{d:{w:{g:switch(u=B+k(p,72)|0,f[u-72>>2]-1|0){case 0:break w;case 1:break d;default:break g}if(!(d=f[b+2056>>2])){fi[f[f[b+2048>>2]+16>>2]](F,f[b+2052>>2],0);break v}f[(y=u-4|0)>>2]=f[y>>2]+d,(0|(d=f[(R=u-8|0)>>2]))==f[(y=u-16|0)>>2]&&ce(y,1058736),f[R>>2]=d+1,g=f[b+2052>>2],u=f[u-12>>2]+(d<<4)|0,f[u>>2]=f[b+2048>>2],f[u+4>>2]=g,g=f[e+4>>2],f[(u=u+8|0)>>2]=f[e>>2],f[u+4>>2]=g;break v}if(!(d=f[b+2056>>2])){fi[f[f[b+2048>>2]+16>>2]](F,f[b+2052>>2],0);break v}f[(y=u-4|0)>>2]=f[y>>2]+d,(0|(d=f[(R=u-8|0)>>2]))==f[(y=u-16|0)>>2]&&ce(y,1058736),f[R>>2]=d+1,g=f[b+2052>>2],u=f[u-12>>2]+(d<<4)|0,f[u>>2]=f[b+2048>>2],f[u+4>>2]=g,g=f[e+4>>2],f[(u=u+8|0)>>2]=f[e>>2],f[u+4>>2]=g;break v}(d=f[b+2056>>2])?(f[(y=u-12|0)>>2]=f[y>>2]+d,(0|(d=f[(R=u-16|0)>>2]))==f[(y=u-24|0)>>2]&&ce(y,1058736),f[R>>2]=d+1,g=f[b+2052>>2],u=f[u-20>>2]+(d<<4)|0,f[u>>2]=f[b+2048>>2],f[u+4>>2]=g,g=f[e+4>>2],f[(u=u+8|0)>>2]=f[e>>2],f[u+4>>2]=g):fi[f[f[b+2048>>2]+16>>2]](F,f[b+2052>>2],0)}f[b+2668>>2]=s-v}if(fi[f[f[b+2888>>2]+16>>2]](h,f[b+2892>>2],f[b+2896>>2]),fi[f[f[b+2872>>2]+16>>2]](l,f[b+2876>>2],f[b+2880>>2]),e=f[b+464>>2])continue;break h}break}fi[f[f[b+2872>>2]+16>>2]](l,f[b+2876>>2],f[b+2880>>2])}ze(b+2048|0,b+2504|0,168);h:{if(C=f[b+2208>>2]){B=(Q=f[b+2204>>2])+k(C,72)|0,W=b+2516|0,D=b+2900|0,I=b+2852|0,N=b+2868|0,p=b+2820|0,Y=Q;v:{for(;;){f[b+2800>>2]=0,f[b+2804>>2]=1,f[b+2792>>2]=1,f[b+2796>>2]=0;d:{w:switch(f[Y>>2]-1|0){case 1:if(!(e=f[Y+56>>2]))break d;for(_=e<<4,s=f[Y+52>>2]+8|0,d=1,v=0,e=0;;){if(c=f[s-4>>2],(h=f[s>>2])>>>0>(l=v-e|0)>>>0&&(or(b+2792|0,h),d=f[b+2792>>2],l=(v=f[b+2800>>2])-(e=f[b+2796>>2])|0),ze(e+d|0,c,h),l>>>0>>0)break f;if(e=e+h|0,f[b+2796>>2]=e,s=s+16|0,!(_=_-16|0))break}break d;default:if(e=f[Y+64>>2],c=f[Y+60>>2],!n[Y+48|0]){if(!e)break d;for(_=e<<4,s=c+8|0,d=1,v=0,e=0;;){if(c=f[s-4>>2],(h=f[s>>2])>>>0>(l=v-e|0)>>>0&&(or(b+2792|0,h),d=f[b+2792>>2],l=(v=f[b+2800>>2])-(e=f[b+2796>>2])|0),ze(e+d|0,c,h),l>>>0>>0)break f;if(e=e+h|0,f[b+2796>>2]=e,s=s+16|0,!(_=_-16|0))break}break d}if(!e)break d;for(h=e<<4,e=c+8|0,s=0;s=Pr(f[e-4>>2],f[e>>2],b+2792|0,1&s),e=e+16|0,h=h-16|0;);break d;case 0:break w}if(e=f[Y+64>>2],c=f[Y+60>>2],n[Y+48|0]){if(e)for(h=e<<4,e=c+8|0,s=0;s=Pr(f[e-4>>2],f[e>>2],b+2792|0,1&s),e=e+16|0,h=h-16|0;);}else{if(!e)break d;for(_=e<<4,s=c+8|0,d=1,v=0,e=0;;){if(c=f[s-4>>2],(h=f[s>>2])>>>0>(l=v-e|0)>>>0&&(or(b+2792|0,h),d=f[b+2792>>2],l=(v=f[b+2800>>2])-(e=f[b+2796>>2])|0),ze(e+d|0,c,h),l>>>0>>0)break f;if(e=e+h|0,f[b+2796>>2]=e,s=s+16|0,!(_=_-16|0))break}}}s=f[b+2792>>2],e=f[b+2796>>2];d:{w:{g:{y:{B:{E:{_:{I:{Q:{N:{R:{C:{if(1&(c=f[b+2804>>2])){u=f[b+2800>>2],l=(c=c>>>5|0)+e|0,f[b+2896>>2]=l,s=s-c|0,f[b+2892>>2]=s,h=u+c|0,f[b+2888>>2]=h;p:{m:{if((0|e)!=(0|u)){if(e=V(12))break m;break w}if(se(b+8|0,b+2888|0),!(l=f[b+12>>2])){l=0,s=1,e=0,h=1051612;break p}if(1&(s=f[b+8>>2])){e=s,h=1051916;break p}e=1|s,h=1051896;break p}f[e+8>>2]=1,f[e+4>>2]=h,f[e>>2]=s,h=1052028}if(_=h,f[b+2840>>2]=c,c>>>0>l>>>0)break C;f[b+2820>>2]=e,f[b+2808>>2]=_,e=l-c|0,f[b+2816>>2]=e,s=c+s|0,f[b+2812>>2]=s}else f[b+2820>>2]=c,f[b+2812>>2]=s,f[b+2808>>2]=1058540;if(f[b+2856>>2]=10,e>>>0>9){if(s=s+10|0,f[b+2812>>2]=s,e=e-10|0,f[b+2816>>2]=e,!e)break N;p:switch(n[Y+44|0]-3|0){case 0:break p;case 1:break R;default:break Q}p:{m:{for(;;){if(f[b+2840>>2]=10,10==(0|e))u=f[(e=b+2816|0)+4>>2],f[(c=b+2896|0)>>2]=f[e>>2],f[c+4>>2]=u,f[e>>2]=0,f[e+4>>2]=0,e=f[b+2812>>2],f[b+2888>>2]=f[b+2808>>2],f[b+2892>>2]=e,f[b+2808>>2]=1051612,f[b+2812>>2]=s+10;else{if(e>>>0<10)break k;fi[f[f[b+2808>>2]>>2]](b+2504|0,p,s,e),f[(e=b+2512|0)>>2]=10,u=f[e+4>>2],f[(c=b+2896|0)>>2]=f[e>>2],f[c+4>>2]=u,e=f[b+2508>>2],f[b+2888>>2]=f[b+2504>>2],f[b+2892>>2]=e,f[b+2816>>2]=f[b+2816>>2]-10,f[b+2812>>2]=f[b+2812>>2]+10}if((s=f[b+2896>>2])>>>0<=3)break t;if(c=s-4|0,f[b+2896>>2]=c,e=f[b+2892>>2],f[b+2892>>2]=e+4,!c)break a;if(u=n[0|e]|n[e+1|0]<<8|n[e+2|0]<<16|n[e+3|0]<<24,c=s-5|0,f[b+2896>>2]=c,f[b+2892>>2]=e+5,!c)break a;if(_=n[e+4|0],c=s-6|0,f[b+2896>>2]=c,f[b+2892>>2]=e+6,!c)break a;if(c=n[e+5|0],l=s-7|0,f[b+2896>>2]=l,f[b+2892>>2]=e+7,!l)break p;if(l=n[e+6|0],s=s-8|0,f[b+2896>>2]=s,d=e+8|0,f[b+2892>>2]=d,e=n[e+7|0],fi[f[f[b+2888>>2]+16>>2]](D,d,s),c=127&e|(127&c)<<14|(127&_)<<21|(127&l)<<7,1447645776==(0|u)){if(zr(e=b+2504|0,b+2808|0,0,c),Fr(b+2824|0,e),u=f[b+2824>>2])break m;fi[f[f[b+2504>>2]+16>>2]](W,f[b+2508>>2],f[b+2512>>2])}if(f[b+2856>>2]=c,(u=f[b+2816>>2])>>>0>=c>>>0){if(e=u-c|0,f[b+2816>>2]=e,s=c+f[b+2812>>2]|0,f[b+2812>>2]=s,(0|u)!=(0|c))continue;break N}break}f[b+2888>>2]=u;break b}c=f[b+2832>>2],w=f[b+2836>>2],fi[f[f[b+2504>>2]+16>>2]](W,f[b+2508>>2],f[b+2512>>2]);break y}break a}f[b+2888>>2]=e;break b}f[b+2856>>2]=l;break n}for(;;){if(f[b+2840>>2]=10,10==(0|e))u=f[(e=b+2816|0)+4>>2],f[(c=b+2896|0)>>2]=f[e>>2],f[c+4>>2]=u,f[e>>2]=0,f[e+4>>2]=0,e=f[b+2812>>2],f[b+2888>>2]=f[b+2808>>2],f[b+2892>>2]=e,f[b+2808>>2]=1051612,f[b+2812>>2]=s+10;else{if(e>>>0<10)break k;fi[f[f[b+2808>>2]>>2]](b+2504|0,p,s,e),f[(e=b+2512|0)>>2]=10,u=f[e+4>>2],f[(c=b+2896|0)>>2]=f[e>>2],f[c+4>>2]=u,e=f[b+2508>>2],f[b+2888>>2]=f[b+2504>>2],f[b+2892>>2]=e,f[b+2816>>2]=f[b+2816>>2]-10,f[b+2812>>2]=f[b+2812>>2]+10}if((s=f[b+2896>>2])>>>0<=3)break t;if(c=s-4|0,f[b+2896>>2]=c,e=f[b+2892>>2],f[b+2892>>2]=e+4,!c)break a;if(c=n[0|e]|n[e+1|0]<<8|n[e+2|0]<<16|n[e+3|0]<<24,u=s-5|0,f[b+2896>>2]=u,f[b+2892>>2]=e+5,!u)break a;if(_=n[e+4|0],u=s-6|0,f[b+2896>>2]=u,f[b+2892>>2]=e+6,!u)break a;if(u=n[e+5|0],l=s-7|0,f[b+2896>>2]=l,f[b+2892>>2]=e+7,!l)break a;if(d=n[e+6|0],l=s-8|0,f[b+2896>>2]=l,f[b+2892>>2]=e+8,v=n[e+7|0],f[b+2840>>2]=1,!l)break I;if(f[b+2892>>2]=e+9,l=s-9|0,f[b+2896>>2]=l,!l)break a;if(g=127&v|(127&u)<<14|(127&_)<<21|(127&d)<<7,u=s-10|0,f[b+2896>>2]=u,s=e+10|0,f[b+2892>>2]=s,e=n[e+9|0],fi[f[f[b+2888>>2]+16>>2]](D,s,u),1447645776==(0|c)){if(zr(b+2840|0,b+2808|0,0,g),2&e){c=f[(e=b+2848|0)>>2],e=f[e+4>>2],f[(u=b+2864|0)>>2]=c,f[u+4>>2]=e,e=f[b+2844>>2],f[b+2856>>2]=f[b+2840>>2],f[b+2860>>2]=e;R:{C:{p:{if((0|c)>=0){if(!c)break p;if(R=V(c))break C;r=1}else r=0;Ze(r,1058752),$f()}f[b+2896>>2]=0,f[b+2900>>2]=1,f[b+2888>>2]=1,f[b+2892>>2]=0,d=0,w=f[b+2860>>2],_=0,s=1,e=1;break R}for(_=0,f[b+2892>>2]=0,f[b+2888>>2]=R,f[b+2896>>2]=c,f[b+2900>>2]=c>>>0>131071?29:129-(o(c>>>10|0)<<2)|0,v=0,s=w=f[b+2860>>2],y=c,h=c;;){if(h){d=s+h|0,e=0;C:{p:{for(;;){if(255==n[e+s|0])break p;if(l=1,(0|h)==(0|(e=e+1|0)))break}F=0;break C}d=(e=e+1|0)+s|0,F=h-e|0,l=(0|e)==(0|h),h=e}if(u=(e=1&v)+s|0,(e=h-e|0)>>>0>(h=y-_|0)>>>0&&(or(b+2888|0,e),R=f[b+2888>>2],h=(y=f[b+2896>>2])-(_=f[b+2892>>2])|0),ze(_+R|0,u,e),e>>>0>h>>>0)break g;if(_=e+_|0,f[b+2892>>2]=_,v=e?255==n[(e+u|0)-1|0]:0,s=d,h=F,!l)continue}break}d=f[b+2896>>2],s=f[b+2888>>2],e=f[b+2900>>2]}if(l=1058540,1&e){if(v=(u=e>>>5|0)+_|0,f[b+2916>>2]=v,s=s-u|0,f[b+2912>>2]=s,l=u+d|0,f[b+2908>>2]=l,(0|d)==(0|_))se(b,b+2908|0),(v=f[b+4>>2])?1&(s=f[b>>2])?(e=s,l=1051916):(e=1|s,l=1051896):(v=0,s=1,e=0,l=1051612);else{if(!(e=V(12)))break w;f[e+8>>2]=1,f[e+4>>2]=l,f[e>>2]=s,l=1052028}if(f[b+2920>>2]=u,u>>>0>v>>>0)break E;_=v-u|0,s=u+s|0}fi[f[f[b+2856>>2]+16>>2]](N,w,c),f[b+2852>>2]=e,f[b+2848>>2]=_,f[b+2844>>2]=s,f[b+2840>>2]=l}if(Fr(b+2872|0,b+2840|0),u=f[b+2872>>2])break B;fi[f[f[b+2840>>2]+16>>2]](I,f[b+2844>>2],f[b+2848>>2])}if(f[b+2856>>2]=g,(c=f[b+2816>>2])>>>0>>0)break _;if(e=c-g|0,f[b+2816>>2]=e,s=g+f[b+2812>>2]|0,f[b+2812>>2]=s,(0|c)==(0|g))break}}e=0}fi[f[f[b+2808>>2]+16>>2]](p,s,e);break d}f[b+2856>>2]=0;break n}f[b+2888>>2]=c;break b}f[b+2924>>2]=v,f[b+2508>>2]=2,f[b+2504>>2]=1058600,f[b+2516>>2]=2,f[b+2520>>2]=0,f[b+2224>>2]=b+2924,f[b+2228>>2]=3,f[b+2216>>2]=b+2920,f[b+2220>>2]=3;break A}c=f[b+2880>>2],w=f[b+2884>>2],fi[f[f[b+2840>>2]+16>>2]](I,f[b+2844>>2],f[b+2848>>2])}if(fi[f[f[b+2808>>2]+16>>2]](p,f[b+2812>>2],f[b+2816>>2]),!u)break d;break v}f[b+2508>>2]=h,f[b+2504>>2]=e;break i}$f()}if((0|B)==(0|(Y=Y+72|0)))break}c=0,w=0}if(3&~(e=((u=k(C,72)-72|0)>>>0)/72|0))for(e=0-(e+1&3)|0;f[(s=Q+32|0)>>2]=c,f[s+4>>2]=w,f[(s=Q+24|0)>>2]=1,f[s+4>>2]=0,f[(s=Q+16|0)>>2]=c,f[s+4>>2]=w,f[(s=Q+8|0)>>2]=1,f[s+4>>2]=0,Q=Q+72|0,e=e+1|0;);if(u>>>0>=216)for(;f[(u=Q+32|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+24|0)>>2]=1,f[u+4>>2]=0,f[(u=Q+104|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+96|0)>>2]=1,f[u+4>>2]=0,f[(u=Q+16|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+8|0)>>2]=1,f[u+4>>2]=0,f[(u=Q+176|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+168|0)>>2]=1,f[u+4>>2]=0,f[(u=Q+88|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+80|0)>>2]=1,f[u+4>>2]=0,f[(u=Q+248|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+240|0)>>2]=1,f[u+4>>2]=0,f[(u=Q+160|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+152|0)>>2]=1,f[u+4>>2]=0,f[(u=Q+232|0)>>2]=c,f[u+4>>2]=w,f[(u=Q+224|0)>>2]=1,f[u+4>>2]=0,(0|B)!=(0|(Q=Q+288|0)););if(f[b+2104>>2]=c,f[b+2108>>2]=w,f[b+2096>>2]=1,f[b+2100>>2]=0,f[b+2088>>2]=c,f[b+2092>>2]=w,f[b+2080>>2]=1,f[b+2084>>2]=0,i[b+2198|0]=1,!(!f[b+1596>>2]&2==f[b+1592>>2])&&((e=f[b+1720>>2])&&fi[f[e+16>>2]](b+1732|0,f[b+1724>>2],f[b+1728>>2]),gr(f[b+1748>>2],f[b+1752>>2]),e=f[b+1744>>2])){if(s=f[b+1748>>2],(u=-8&(l=f[s-4>>2]))>>>0<(e=k(e,72))+((l&=3)?4:8)>>>0)break e;if(u>>>0>e+39>>>0&&l)break h;nr(s)}ze(b+1592|0,b+2048|0,168)}if(t[b+464>>2]<2||(e=f[b+460>>2],255!=n[0|e]||242!=(-10&n[e+1|0]))){i[b+2764|0]=0,i[b+2654|0]=1,A[b+2652>>1]=256,A[b+2648>>1]=0,f[b+2632>>2]=0,f[b+2616>>2]=0,f[b+2620>>2]=0,f[b+2600>>2]=0,f[b+2604>>2]=0,f[b+2592>>2]=c,f[b+2596>>2]=w,f[b+2584>>2]=1,f[b+2588>>2]=0,f[b+2576>>2]=c,f[b+2580>>2]=w,f[b+2568>>2]=1,f[b+2572>>2]=0,f[b+2560>>2]=c,f[b+2564>>2]=w,f[b+2552>>2]=1,f[b+2556>>2]=0,f[b+2544>>2]=c,f[b+2548>>2]=w,f[b+2536>>2]=1,f[b+2540>>2]=0,f[b+2520>>2]=0,f[b+2524>>2]=0,f[b+2504>>2]=0,f[b+2508>>2]=0,f[b+2752>>2]=0,f[b+2744>>2]=0,f[b+2748>>2]=8,f[b+2656>>2]=2,f[b+2660>>2]=0,i[b+2765|0]=0,i[b+2766|0]=0,f[b+2756>>2]=0,f[b+2760>>2]=0,P(b+456|0,b+2504|0),c=f[b+2656>>2],u=f[b+2660>>2],f[b+2656>>2]=2,f[b+2660>>2]=0,2!=(0|c)|u&&(ze(b+2216|0,b+2664|0,80),(0|(e=f[b+2752>>2]))==f[b+2744>>2]&&te(b+2744|0,1056284),s=f[b+2748>>2]+k(e,88)|0,f[s>>2]=c,f[s+4>>2]=u,ze(s+8|0,b+2216|0,80),f[b+2752>>2]=e+1),ze(b+2224|0,b+2504|0,264),f[b+2216>>2]=2,f[b+2220>>2]=0;break s}if(f[b+2768>>2]=0,f[b+2760>>2]=0,f[b+2764>>2]=8,i[b+2654|0]=1,A[b+2648>>1]=0,f[b+2632>>2]=0,f[b+2616>>2]=0,f[b+2620>>2]=0,f[b+2600>>2]=0,f[b+2604>>2]=0,f[b+2592>>2]=c,f[b+2596>>2]=w,f[b+2584>>2]=1,f[b+2588>>2]=0,f[b+2576>>2]=c,f[b+2580>>2]=w,f[b+2568>>2]=1,f[b+2572>>2]=0,f[b+2560>>2]=c,f[b+2564>>2]=w,f[b+2552>>2]=1,f[b+2556>>2]=0,f[b+2544>>2]=c,f[b+2548>>2]=w,f[b+2536>>2]=1,f[b+2540>>2]=0,f[b+2520>>2]=0,f[b+2524>>2]=0,f[b+2504>>2]=0,f[b+2508>>2]=0,A[b+2652>>1]=256,A[(c=b+2778|0)>>1]=0,A[c+2>>1]=0,A[c+4>>1]=0,A[c+6>>1]=0,f[b+2772>>2]=0,f[b+2776>>2]=0,f[b+2656>>2]=2,f[b+2660>>2]=0,x(b+456|0,b+2504|0),c=f[b+2656>>2],u=f[b+2660>>2],f[b+2656>>2]=2,f[b+2660>>2]=0,2!=(0|c)|u&&(ze(b+2216|0,b+2664|0,96),(0|(e=f[b+2768>>2]))==f[b+2760>>2]&&be(b+2760|0,1058088),s=f[b+2764>>2]+k(e,104)|0,f[s>>2]=c,f[s+4>>2]=u,ze(s+8|0,b+2216|0,96),f[b+2768>>2]=e+1),ze(b+2216|0,b+2504|0,288),!f[b+2220>>2]&2==f[b+2216>>2])break s;if(!f[b+2480>>2])break c;break o}break r}f[b+2052>>2]=2,f[b+2048>>2]=1057564,f[b+2060>>2]=2,f[b+2064>>2]=0,f[b+2896>>2]=b+2840,f[b+2900>>2]=3,f[b+2888>>2]=b+2856,f[b+2892>>2]=3,f[b+2056>>2]=b+2888,Me(b+2048|0,1057580),$f()}if(f[b+2472>>2])break o}l=f[b+1608>>2],s=f[b+1604>>2],h=f[b+1600>>2],D=f[b+1592>>2],T=f[b+1596>>2],ze(b+1380|0,b+1612|0,148),g=f[(u=b+1776|0)+4>>2],f[(c=b+1344|0)>>2]=f[u>>2],f[c+4>>2]=g,g=f[(u=b+1784|0)+4>>2],f[(c=b+1352|0)>>2]=f[u>>2],f[c+4>>2]=g,g=f[(u=b+1792|0)+4>>2],f[(c=b+1360|0)>>2]=f[u>>2],f[c+4>>2]=g,g=f[(u=b+1800|0)+4>>2],f[(c=b+1368|0)>>2]=f[u>>2],f[c+4>>2]=g,c=f[b+1772>>2],f[b+1336>>2]=f[b+1768>>2],f[b+1340>>2]=c,I=f[b+1760>>2],L=f[b+1764>>2],p=f[b+1808>>2],J=f[b+1812>>2],g=f[b+1816>>2],W=f[b+1820>>2],B=f[b+1824>>2],H=f[b+1828>>2],N=f[b+1888>>2],rr=f[b+1892>>2],ze(b+1220|0,b+1896|0,116),w=f[(u=b+2040|0)+4>>2],f[(c=b+1208|0)>>2]=f[u>>2],f[c+4>>2]=w,c=f[b+2036>>2],f[b+1200>>2]=f[b+2032>>2],f[b+1204>>2]=c,K=f[b+2028>>2],Q=f[b+2024>>2],X=f[b+2020>>2],O=f[b+2016>>2],Y=f[b+2012>>2],Er(b+2216|0);break u}e=b+1760|0,3!=f[b+1760>>2]|f[b+1764>>2]&&Er(e),ze(e,b+2216|0,288),l=f[b+1608>>2],s=f[b+1604>>2],h=f[b+1600>>2],D=f[b+1592>>2],T=f[b+1596>>2],ze(b+1380|0,b+1612|0,148),g=f[(u=b+2232|0)+4>>2],f[(c=b+1344|0)>>2]=f[u>>2],f[c+4>>2]=g,g=f[(u=b+2240|0)+4>>2],f[(c=b+1352|0)>>2]=f[u>>2],f[c+4>>2]=g,g=f[(u=b+2248|0)+4>>2],f[(c=b+1360|0)>>2]=f[u>>2],f[c+4>>2]=g,g=f[(u=b+2256|0)+4>>2],f[(c=b+1368|0)>>2]=f[u>>2],f[c+4>>2]=g,c=f[b+2228>>2],f[b+1336>>2]=f[b+2224>>2],f[b+1340>>2]=c,I=f[b+1760>>2],L=f[b+1764>>2],p=f[b+1808>>2],J=f[b+1812>>2],g=f[b+1816>>2],W=f[b+1820>>2],B=f[b+1824>>2],H=f[b+1828>>2],N=f[b+2344>>2],rr=f[b+2348>>2],ze(b+1220|0,b+2352|0,116),w=f[(u=b+2496|0)+4>>2],f[(c=b+1208|0)>>2]=f[u>>2],f[c+4>>2]=w,c=f[b+2492>>2],f[b+1200>>2]=f[b+2488>>2],f[b+1204>>2]=c,K=f[b+2484>>2],Q=f[b+2480>>2],X=f[b+2476>>2],O=f[b+2472>>2],Y=f[b+2468>>2]}if(!C&&((e=f[b+2176>>2])&&fi[f[e+16>>2]](b+2188|0,f[b+2180>>2],f[b+2184>>2]),gr(f[b+2204>>2],f[b+2208>>2]),e=f[b+2200>>2])){if(c=f[b+2204>>2],(d=-8&(u=f[c-4>>2]))>>>0<(e=k(e,72))+((_=3&u)?4:8)>>>0)break e;if(e+39>>>0>>0&&_)break r;nr(c)}if(c=3,!T&3==(0|D))u=0,C=0,q=-2147483648;else if(ze(b+2504|0,b+1380|0,148),w=f[(u=b+1368|0)+4>>2],f[(c=b+1192|0)>>2]=f[u>>2],f[c+4>>2]=w,w=f[(u=b+1360|0)+4>>2],f[(c=b+1184|0)>>2]=f[u>>2],f[c+4>>2]=w,w=f[(u=b+1352|0)+4>>2],f[(c=b+1176|0)>>2]=f[u>>2],f[c+4>>2]=w,w=f[(u=b+1344|0)+4>>2],f[(c=b+1168|0)>>2]=f[u>>2],f[c+4>>2]=w,c=f[b+1340>>2],f[b+1160>>2]=f[b+1336>>2],f[b+1164>>2]=c,ze(b+1040|0,b+1220|0,116),w=f[(u=b+1208|0)+4>>2],f[(c=b+1032|0)>>2]=f[u>>2],f[c+4>>2]=w,c=f[b+1204>>2],f[b+1024>>2]=f[b+1200>>2],f[b+1028>>2]=c,q=-2147483648,3!=(0|I)|!!(0|L)|2!=(0|D)|!!(0|T)){m=c=L-(I>>>0<2)|0;u:{o:{c:{s:{l:{h:{v:{if(!c&(E=I-2|0)>>>0<=1){if(u=0,C=0,c=2,E-1|0)break v;break u}if(Q)for(_=k(Q,104),e=X+56|0,c=1,w=-2147483648,y=-1,d=2147483647,u=-1,C=2147483647,E=1,m=-2147483648;;){if(1!=f[e-8>>2])break h;if(!f[e-24>>2])break l;if(B=f[(v=e-16|0)>>2],E=(R=(0|(v=f[v+4>>2]))<(0|m)?1:(0|v)<=(0|m)&E>>>0>B>>>0)?E:B,m=R?m:v,R=B,u=(B=u>>>0>>0&(0|v)>=(0|C)|(0|v)>(0|C))?u:R,C=B?C:v,B=f[e>>2],c=(R=(0|(v=f[e+4>>2]))<(0|w)?1:c>>>0>B>>>0&(0|w)>=(0|v))?c:B,w=R?w:v,R=B,y=(B=y>>>0>>0&(0|d)<=(0|v)|(0|d)<(0|v))?y:R,d=B?d:v,e=e+104|0,!(_=_-104|0))break}else u=-1,C=2147483647,E=1,m=-2147483648,c=1,w=-2147483648,y=-1,d=2147483647;v=f[(B=b+1168|0)+4>>2],f[(e=b+1608|0)>>2]=f[B>>2],f[e+4>>2]=v,v=f[(B=b+1176|0)+4>>2],f[(e=b+1616|0)>>2]=f[B>>2],f[e+4>>2]=v,v=f[(B=b+1184|0)+4>>2],f[(e=b+1624|0)>>2]=f[B>>2],f[e+4>>2]=v,v=f[(B=b+1192|0)+4>>2],f[(e=b+1632|0)>>2]=f[B>>2],f[e+4>>2]=v,f[b+1592>>2]=I,f[b+1596>>2]=L,e=f[b+1164>>2],f[b+1600>>2]=f[b+1160>>2],f[b+1604>>2]=e,f[b+1720>>2]=N,f[b+1724>>2]=rr,f[b+1712>>2]=c,f[b+1716>>2]=w,c=1,f[b+1704>>2]=1,f[b+1708>>2]=0,f[b+1696>>2]=E,f[b+1700>>2]=m,f[b+1688>>2]=1,f[b+1692>>2]=0,f[b+1680>>2]=y,f[b+1684>>2]=d,f[b+1672>>2]=1,f[b+1676>>2]=0,f[b+1664>>2]=u,f[b+1668>>2]=C,f[b+1656>>2]=1,f[b+1660>>2]=0,f[b+1648>>2]=g,f[b+1652>>2]=W,f[b+1640>>2]=p,f[b+1644>>2]=J,ze(b+1728|0,b+1040|0,116),u=f[(E=b+1032|0)+4>>2],f[(e=b+1872|0)>>2]=f[E>>2],f[e+4>>2]=u,f[b+1860>>2]=K,f[b+1856>>2]=Q,f[b+1852>>2]=X,f[b+1848>>2]=O,f[b+1844>>2]=Y,e=f[b+1028>>2],f[b+1864>>2]=f[b+1024>>2],f[b+1868>>2]=e,j(e=b+2216|0,b+1592|0);break o}if(O)for(_=k(O,88),e=Y+56|0,c=1,w=-2147483648,y=-1,d=2147483647,u=-1,C=2147483647,E=1,m=-2147483648;;){if(1!=f[e-8>>2])break s;if(!f[e-24>>2])break c;if(I=f[(N=e-16|0)>>2],E=(v=(0|(N=f[N+4>>2]))<(0|m)?1:(0|N)<=(0|m)&E>>>0>I>>>0)?E:I,m=v?m:N,v=I,u=(I=u>>>0>>0&(0|N)>=(0|C)|(0|N)>(0|C))?u:v,C=I?C:N,I=f[e>>2],c=(v=(0|(N=f[e+4>>2]))<(0|w)?1:c>>>0>I>>>0&(0|w)>=(0|N))?c:I,w=v?w:N,v=I,y=(I=y>>>0>>0&(0|d)<=(0|N)|(0|d)<(0|N))?y:v,d=I?d:N,e=e+88|0,!(_=_-88|0))break}else u=-1,C=2147483647,E=1,m=-2147483648,c=1,w=-2147483648,y=-1,d=2147483647;N=f[(I=b+1192|0)+4>>2],f[(e=b+1624|0)>>2]=f[I>>2],f[e+4>>2]=N,N=f[(I=b+1184|0)+4>>2],f[(e=b+1616|0)>>2]=f[I>>2],f[e+4>>2]=N,N=f[(I=b+1176|0)+4>>2],f[(e=b+1608|0)>>2]=f[I>>2],f[e+4>>2]=N,N=f[(I=b+1168|0)+4>>2],f[(e=b+1600|0)>>2]=f[I>>2],f[e+4>>2]=N,e=f[b+1164>>2],f[b+1592>>2]=f[b+1160>>2],f[b+1596>>2]=e,f[b+1712>>2]=c,f[b+1716>>2]=w,f[b+1704>>2]=1,f[b+1708>>2]=0,f[b+1696>>2]=E,f[b+1700>>2]=m,f[b+1688>>2]=1,f[b+1692>>2]=0,f[b+1680>>2]=y,f[b+1684>>2]=d,f[b+1672>>2]=1,f[b+1676>>2]=0,f[b+1664>>2]=u,f[b+1668>>2]=C,f[b+1656>>2]=1,f[b+1660>>2]=0,f[b+1648>>2]=B,f[b+1652>>2]=H,f[b+1640>>2]=g,f[b+1644>>2]=W,f[b+1632>>2]=p,f[b+1636>>2]=J,ze(b+1720|0,b+1040|0,116),f[b+1852>>2]=K,f[b+1848>>2]=Q,f[b+1844>>2]=X,f[b+1840>>2]=O,f[b+1836>>2]=Y,Z(e=b+2216|0,b+1592|0),c=0,p=g,g=B,W=H;break o}Ve(1054616),$f()}Ve(1054632),$f()}Ve(1054616),$f()}Ve(1054632),$f()}F=f[e+64>>2],E=qe(f[e+24>>2],f[e+28>>2],F,0),m=u=M,f[e+8>>2]=E,f[e+12>>2]=u,f[e>>2]=1,f[e+4>>2]=0,B=f[(y=e+20|0)+4>>2],f[(u=b+1552|0)>>2]=f[y>>2],f[u+4>>2]=B,B=f[(y=e+28|0)+4>>2],f[(u=b+1560|0)>>2]=f[y>>2],f[u+4>>2]=B,B=f[(y=e+36|0)+4>>2],f[(u=b+1568|0)>>2]=f[y>>2],f[u+4>>2]=B,B=f[(y=e+44|0)+4>>2],f[(u=b+1576|0)>>2]=f[y>>2],f[u+4>>2]=B,f[b+1584>>2]=f[e+52>>2],u=f[e+16>>2],f[b+1544>>2]=f[e+12>>2],f[b+1548>>2]=u,y=f[e+56>>2],R=f[e+60>>2],v=f[e+68>>2],d=f[e+72>>2],_=f[e+76>>2],w=f[(B=e+88|0)+4>>2],f[(u=b+1536|0)>>2]=f[B>>2],f[u+4>>2]=w,u=f[e+84>>2],f[b+1528>>2]=f[e+80>>2],f[b+1532>>2]=u,u=(e=1&p)?g:0,C=e?W:0,e=E}!T&2==(0|D)?(l=e,s=0,h=1):(f[b+1608>>2]=l,f[b+1604>>2]=s,f[b+1600>>2]=h,f[b+1592>>2]=D,f[b+1596>>2]=T,ze(b+1612|0,b+2504|0,148),E=f[b+1748>>2],m=f[b+1752>>2],q=f[b+1744>>2],(s=f[b+1720>>2])&&fi[f[s+16>>2]](b+1732|0,f[b+1724>>2],f[b+1728>>2]),l=e,s=0,h=1)}else c=2,u=0,C=0;fi[f[f[b+456>>2]+16>>2]](b+468|0,f[b+460>>2],f[b+464>>2]);u:{o:{c:{s:{l:{if(3!=(0|c)){if(f[b+580>>2]=f[b+1584>>2],p=f[(g=b+1576|0)+4>>2],f[(e=b+572|0)>>2]=f[g>>2],f[e+4>>2]=p,p=f[(g=b+1568|0)+4>>2],f[(e=b+564|0)>>2]=f[g>>2],f[e+4>>2]=p,p=f[(g=b+1560|0)+4>>2],f[(e=b+556|0)>>2]=f[g>>2],f[e+4>>2]=p,p=f[(g=b+1552|0)+4>>2],f[(e=b+548|0)>>2]=f[g>>2],f[e+4>>2]=p,e=f[b+1548>>2],f[b+540>>2]=f[b+1544>>2],f[b+544>>2]=e,f[b+604>>2]=_,f[b+600>>2]=d,f[b+596>>2]=v,f[b+592>>2]=F,f[b+588>>2]=R,f[b+584>>2]=y,g=f[(y=b+1536|0)+4>>2],f[(e=b+616|0)>>2]=f[y>>2],f[e+4>>2]=g,f[b+528>>2]=h,f[b+532>>2]=s,f[b+536>>2]=l,f[b+520>>2]=c,f[b+524>>2]=0,f[b+624>>2]=2,f[b+628>>2]=0,f[b+752>>2]=u,f[b+756>>2]=C,f[b+760>>2]=q,f[b+764>>2]=E,f[b+768>>2]=m,A[b+772>>1]=0,e=f[b+1532>>2],f[b+608>>2]=f[b+1528>>2],f[b+612>>2]=e,ar(e=b+1592|0,E=b+520|0),l=f[b+1604>>2],s=f[b+1600>>2],h=f[b+1596>>2],1!=f[b+1592>>2]){if(f[b+2532>>2]=f[b+1624>>2],y=f[(u=b+1616|0)+4>>2],f[(c=b+2524|0)>>2]=f[u>>2],f[c+4>>2]=y,c=f[b+1612>>2],f[b+2516>>2]=f[b+1608>>2],f[b+2520>>2]=c,f[b+2512>>2]=l,f[b+2508>>2]=s,f[b+2504>>2]=h,U(e,E),1!=f[b+1592>>2]){if(u=f[(E=b+1624|0)+4>>2],f[(e=c=b+784|0)>>2]=f[E>>2],f[e+4>>2]=u,s=f[(E=b+2512|0)+4>>2],f[(e=u=b+800|0)>>2]=f[E>>2],f[e+4>>2]=s,e=f[b+1620>>2],f[b+776>>2]=f[b+1616>>2],f[b+780>>2]=e,e=f[b+2508>>2],f[b+792>>2]=f[b+2504>>2],f[b+796>>2]=e,h=f[b+1600>>2],y=f[b+1604>>2],g=f[b+1608>>2],p=f[b+1612>>2],B=f[b+1672>>2],w=f[b+1664>>2],C=f[b+1668>>2],E=f[b+1640>>2],m=f[b+1632>>2],d=f[b+1636>>2],e=f[b+1656>>2],W=f[b+1648>>2],D=f[b+1652>>2],I=f[(l=b+2528|0)+4>>2],f[(s=b+816|0)>>2]=f[l>>2],f[s+4>>2]=I,I=f[b+2524>>2],f[(l=b+808|0)>>2]=f[b+2520>>2],f[l+4>>2]=I,ze(I=b+1592|0,b+520|0,256),hr(b+824|0,I,E?m:0,E?d:0,E||9e4,e?W:0,e?D:0,e||9e4,w,C,B),E=f[u+4>>2],f[(e=b+968|0)>>2]=f[u>>2],f[e+4>>2]=E,E=f[l+4>>2],f[(e=b+976|0)>>2]=f[l>>2],f[e+4>>2]=E,E=f[s+4>>2],f[(e=b+984|0)>>2]=f[s>>2],f[e+4>>2]=E,E=f[c+4>>2],f[(e=b+1016|0)>>2]=f[c>>2],f[e+4>>2]=E,f[b+1e3>>2]=g,f[b+1004>>2]=p,f[b+992>>2]=h,f[b+996>>2]=y,e=f[b+796>>2],f[b+960>>2]=f[b+792>>2],f[b+964>>2]=e,e=f[b+780>>2],f[b+1008>>2]=f[b+776>>2],f[b+1012>>2]=e,c=f[b+824>>2],w=f[b+828>>2],h=f[b+832>>2],s=f[b+836>>2],l=f[b+840>>2],ze(b+16|0,b+844|0,180),(e=f[b+488>>2])&&fi[f[e+16>>2]](b+500|0,f[b+492>>2],f[b+496>>2]),!(e=f[b+504>>2]))break s;break l}(e=f[b+1604>>2],E=f[b+1600>>2],c=f[b+1596>>2],h&&fi[f[h+16>>2]](b+2516|0,s,l),u=f[b+2520>>2])&&fi[f[u+16>>2]](b+2532|0,f[b+2524>>2],f[b+2528>>2]),l=e,h=c,s=E}ir(b+520|0)}if((e=f[b+488>>2])&&fi[f[e+16>>2]](b+500|0,f[b+492>>2],f[b+496>>2]),c=2,w=0,!(e=f[b+504>>2]))break c}fi[f[e+16>>2]](b+516|0,f[b+508>>2],f[b+512>>2])}if(!(!w&2==(0|c))){ze(b+276|0,b+16|0,180),f[b+272>>2]=l,f[b+268>>2]=s,f[b+264>>2]=h,f[b+256>>2]=c,f[b+260>>2]=w,l=$(b+256|0),e=0;break o}}if(e=0,-2147483648!=(0|h)){if(e=1,l=0|G(0|s,0|l),h){if((E=-8&(c=f[s-4>>2]))>>>0<((c&=3)?4:8)+h>>>0)break e;if(E>>>0>h+39>>>0&&c)break u;nr(s)}}else l=s}return f[r+8>>2]=e,f[r+4>>2]=e?l:0,f[r>>2]=e?0:l,void(S=b+2928|0)}break r}f[b+2856>>2]=e,f[b+2508>>2]=2,f[b+2504>>2]=1051848,f[b+2516>>2]=2,f[b+2520>>2]=0,f[b+2224>>2]=b+2856,f[b+2228>>2]=3,f[b+2216>>2]=b+2840,f[b+2220>>2]=3,f[b+2512>>2]=b+2216,Me(b+2504|0,1051864),$f()}f[b+2508>>2]=2,f[b+2504>>2]=1058600,f[b+2516>>2]=2,f[b+2520>>2]=0,f[b+2224>>2]=b+2888,f[b+2228>>2]=3,f[b+2216>>2]=b+2856,f[b+2220>>2]=3;break A}f[b+2508>>2]=s,f[b+2504>>2]=4;break i}pe(1057432),$f()}f[b+2508>>2]=2,f[b+2504>>2]=1058600,f[b+2516>>2]=2,f[b+2520>>2]=0,f[b+2224>>2]=b+2856,f[b+2228>>2]=3,f[b+2216>>2]=b+2840,f[b+2220>>2]=3;break A}f[b+2508>>2]=l,f[b+2504>>2]=h;break i}f[b+2512>>2]=b+2216,Me(b+2504|0,1058616),$f()}pe(b+2504|0),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},__wbindgen_export_0:function(r,e,i){r|=0,i|=0;var A=0;r:{e:{if(e|=0){if((A=-8&(i=f[r-4>>2]))>>>0<((i&=3)?4:8)+e>>>0)break e;if(e+39>>>0>>0&&i)break r;nr(r)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},__wbindgen_export_1:function(r,e){if(r|=0,!(1!=(0|ii(e|=0))|-2147483648-e>>>0>>0)&&(!r||(e=e>>>0>=9?Or(e,r):V(r))))return 0|e;$f()},__wbindgen_export_2:function(r,e,i,A){return r|=0,e|=0,i|=0,(1!=(0|ii(A|=0))|-2147483648-A>>>0>>0||!(r=kr(r,e,A,i)))&&$f(),0|r},__wbindgen_add_to_stack_pointer:function(r){return 0|(S=S+(r|=0)|0)},__wbindgen_start:Te}}({"./theomux_bg.js":Vf}),en=rn.memory,An=rn.main,fn=rn.mpegts_to_fmp4,nn=rn.raw_audio_to_fmp4,an=rn.__wbindgen_export_0,tn=rn.__wbindgen_export_1,bn=rn.__wbindgen_export_2,kn=rn.__wbindgen_add_to_stack_pointer,un=rn.__wbindgen_start;yf({__proto__:null,__wbindgen_add_to_stack_pointer:kn,__wbindgen_export_0:an,__wbindgen_export_1:tn,__wbindgen_export_2:bn,__wbindgen_start:un,main:An,memory:en,mpegts_to_fmp4:fn,raw_audio_to_fmp4:nn}),un(),function(r){var e,i=$.resolve(r()).then(function(r){e=r,i=void 0,self.postMessage({RQt:"10.3.0"})},function(r){var e=r,i={success:!1,error:e.message,errorCode:Q(e,sf)?e.code:of.MEDIA_DECODE_ERROR};self.postMessage(i)});self.addEventListener("message",function(r){var A=r.data.id;(function(r){return function(r){return function(){var e=this,i=arguments;return new $(function(A,f){var n=r.apply(e,i);function a(r){Dr(n,A,f,a,t,"next",r)}function t(r){Dr(n,A,f,a,t,"throw",r)}a(void 0)})}}(function(){var A,f,n,a,t,b;return Sr(this,function(k){switch(k.label){case 0:return void 0===i?[3,2]:[4,i];case 1:k.sent(),k.label=2;case 2:if(n=r.id,r.type===uf.MPEGTS_TO_FMP4)a=e.mpegts_to_fmp4(r.input);else{if(r.type!==uf.RAW_AUDIO_TO_FMP4)throw new d("Unknown request type: "+r.type);a=e.raw_audio_to_fmp4(r.input)}return t={success:!0,requestId:n,output:a},b=[null==(A=r.input.metadata)?void 0:A.sps_nal,null==(f=r.input.metadata)?void 0:f.pps_nal,r.input.data,a.data.video_init,a.data.audio_init,a.data.video_media,a.data.audio_media].filter(pr).map(function(r){return r.buffer}),self.postMessage(t,b),[2]}})})()})(r.data).catch(function(r){var e=r,i={success:!1,requestId:A,error:e.message,errorCode:Q(e,sf)?e.code:of.MEDIA_DECODE_ERROR};self.postMessage(i)})})}(function(){return{mpegts_to_fmp4:Of,raw_audio_to_fmp4:Zf}})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this); //# sourceMappingURL=THEOplayer.transmux.asmjs.js.map \ No newline at end of file diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.transmux.js b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.transmux.js index 12d40903..405eb4c2 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.transmux.js +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.transmux.js @@ -24,8 +24,8 @@ THEOplayer is based on patented technology developed by THEO Technologies (https://www.theoplayer.com). - Version: 10.0.0 - Created: 2025-09-12T12:50:32.290Z + Version: 10.3.0 + Created: 2025-10-23T15:33:11.023Z */ -!function(t){"use strict";var n,r,i,e,u,o,f,s,c,a=t.window,h=t.document,v=t.location,l=t.navigator,_=t.setTimeout,d=t.clearTimeout,y=t.setInterval,w=t.clearInterval,I=t.Error,E=t.TypeError,g=(t.SyntaxError,t.Object),R=t.Math,S=t.parseInt,p=t.parseFloat,O=t.isNaN,k=t.Uint8Array,T=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest);function b(t,r){return null!=r&&void 0!==n&&r[n.hasInstance]?!!r[n.hasInstance](t):t instanceof r}function m(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,r=null!=(o=Symbol.for)?o:Symbol,i=Symbol.iterator,e=null!=(f=Symbol.dispose)?f:r("Symbol.dispose"),u=null!=(s=Symbol.asyncDispose)?s:r("Symbol.asyncDispose")):(c=0,n=function(t){return"hd"+t+"_"+ ++c},i=(r=function(t){return"hd"+t})("Symbol.iterator"),e=r("Symbol.dispose"),u=r("Symbol.asyncDispose"),n.for=r,n.iterator=i,n.dispose=e,n.asyncDispose=u);var N=_;function A(t){return Boolean(t&&void 0!==t.length)}function C(){}function D(t){if(!b(this,D))throw new E("Promises must be constructed via new");if("function"!=typeof t)throw new E("not a function");this.Ra=0,this.ttn=!1,this.lTt=void 0,this.ntn=[],U(t,this)}function P(t,n){for(;3===t.Ra;)t=t.lTt;0!==t.Ra?(t.ttn=!0,D.itn(function(){var r=1===t.Ra?n.onFulfilled:n.onRejected;if(null!==r){var i;try{i=r(t.lTt)}catch(t){return void L(n.promise,t)}F(n.promise,i)}else(1===t.Ra?F:L)(n.promise,t.lTt)})):t.ntn.push(n)}function F(t,n){try{if(n===t)throw new E("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":m(n))||"function"==typeof n)){var r=n.then;if(b(n,D))return t.Ra=3,t.lTt=n,void B(t);if("function"==typeof r)return void U(function(t,n){return function(){t.apply(n,arguments)}}(r,n),t)}t.Ra=1,t.lTt=n,B(t)}catch(n){L(t,n)}}function L(t,n){t.Ra=2,t.lTt=n,B(t)}function B(t){2===t.Ra&&0===t.ntn.length&&D.itn(function(){t.ttn||D.rtn(t.lTt)});for(var n=0,r=t.ntn.length;nt.length)&&(n=t.length);for(var r=0,i=new Array(n);r=t.length?{done:!0}:{done:!1,value:t[u++]}}}throw new E("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}V&&!(x&&G<60||K&&q<15)?nt=V:(nt=D,ot=null!==(tt=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=V;if(n&&"function"==typeof n.resolve){var r=n.resolve();return function(t){return r.then(t)}}}())&&void 0!==tt?tt:D.itn,rt=ot,it=new z(16),et=!1,(ft={M6:function(t){it.push(t),et||(et=!0,rt(ut))},AQ:ut=function(){for(;it.length()>0;)it.shift()();et=!1}}).AQ,D.itn=ft.M6,D.rtn=function(t){try{var n=st(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}_(function(){throw new I("Unhandled promise rejection: ".concat(t))},0)});var dt=function(t){return t.Sv="web",t.Tv="android",t.Ev="android-tv",t.Pv="ios",t.xv="tvos",t.Iv="chromecast",t.Rv="theoliveweb",t}({});var yt=l?l.userAgent:"",wt=yt.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),It=yt.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Et=yt.match(/Android ([0-9\.]+)/i),gt=yt.match(/Windows NT ([0-9\.]+)/i),Rt=yt.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),St=yt.match(/Firefox\/([0-9\.]+)/i),pt=yt.match(/OPR\/(\d+\.\d+)/i),Ot=yt.match(/Tizen ([0-9\.]+)/i),kt=yt.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Tt=yt.match(/HbbTV\/([0-9.]+)/i),bt=yt.match(/(AFT.*) Build/i),mt=function(){function t(){this.Cv=Boolean("ontouchstart"in self||self.DocumentTouch&&b(h,self.DocumentTouch)||l&&l.msMaxTouchPoints),this.Bv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(yt)||/(macintosh|mac(?=_powerpc)\s)/i.test(yt),this.Mv=/Windows NT/i.test(yt),this.Ov=gt?p(gt[1]):0,this.Uv=/Android/i.test(yt),this.Hv=Et?p(Et[1]):0,this.qv=/windows phone (8|8\.1)/i.test(yt),this.Gv=/iPhone/i.test(yt),this.Qv=/iPad/i.test(yt),this.Yv=this.Bv&&this.Cv&&!this.Qv,this.Zv=/iPod/i.test(yt),this.r_=/Mobile Safari/i.test(yt),this.s_=/EOS\d*STB/i.test(yt),this.n_=/APP\d*STB/i.test(yt),this.$v=(this.Gv||this.Qv||this.Yv||this.Zv)&&!this.qv,this.i_=kt?p(kt[2]):0,this.h_=this.qv||this.$v||this.Uv||this.r_,this.a_=/CriOS/i.test(yt),this.c_=Boolean(self.chrome&&/google/i.test(l.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(l.userAgent),this.p_=It?S(It[1],10):0,this.Bg=Boolean(/CriOS/i.test(yt)),this.Dg=Boolean(self.chrome||/Chrome/i.test(yt)||this.Bg),this.f_=wt?S(wt[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(yt),this.b_=Ot?p(Ot[1]):0,this.l_=this.b_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.b_):void 0,this.T_=/webos|web0s/i.test(yt),this.E_=/HbbTV/i.test(yt),this.x_=!!Tt&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(Tt[1]),this.R_=/AFT.* Build/i.test(yt),this.C_=bt?bt[1]:void 0,this.B_=/VIZIO/i.test(yt),this.M_=/Edge\/\d+/i.test(yt),this.O_=/Trident/i.test(yt),this.U_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.H_=/Vivaldi/i.test(yt),this.q_=/Firefox/i.test(yt)&&!/Seamonkey/i.test(yt),this.G_=St?p(St[1]):0,this.j_=/Safari/i.test(yt)&&!/Chrome/i.test(yt)&&!this.qv&&!this.y_,this.K_=Rt?p(Rt[2]):0,this.J_=Boolean(pt),this.eg=pt?p(pt[1]):0,this.hg=/CrKey/.test(yt),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(yt),this.fg=/PlayStation 4/i.test(yt),this._g=/PlayStation 5/i.test(yt),this.pg="web"===dt.Ev,this.yg="web"===dt.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===dt.Pv,this.xg="web"===dt.xv,this.Rg="web"===dt.Iv}return vt(t,[{key:"Ke",get:function(){return this.Cv}},{key:"Dv",get:function(){return this.Bv}},{key:"Nv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Ov}},{key:"Fv",get:function(){return this.Uv}},{key:"Vv",get:function(){return this.Hv}},{key:"Wv",get:function(){return this.qv}},{key:"zv",get:function(){return this.Gv}},{key:"Xv",get:function(){return this.Qv}},{key:"Kv",get:function(){return this.Yv}},{key:"Jv",get:function(){return this.Zv}},{key:"ru",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"e_",get:function(){return this.s_||this.n_}},{key:"vd",get:function(){return this.r_}},{key:"Ks",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"d_",get:function(){var t;return null!=(t=this.l_)?t:this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){var t;return(null==(t=a.chrome)?void 0:t.webview)&&this.p_>0}},{key:"m_",get:function(){return this.p_}},{key:"w_",get:function(){return this.y_}},{key:"A_",get:function(){return this.b_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"P_",get:function(){return this.x_}},{key:"I_",get:function(){return this.R_}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.C_}},{key:"D_",get:function(){return this.B_}},{key:"N_",get:function(){return this.M_}},{key:"L_",get:function(){return this.O_}},{key:"F_",get:function(){return this.U_}},{key:"V_",get:function(){return this.H_}},{key:"W_",get:function(){return this.q_}},{key:"z_",get:function(){return this.G_}},{key:"X_",get:function(){return this.j_}},{key:"Q_",get:function(){return 0===this.K_&&Nt.ru?this.i_:this.K_}},{key:"Y_",get:function(){return this.J_}},{key:"Z_",get:function(){return this.eg}},{key:"rg",get:function(){return this.hg}},{key:"og",get:function(){return this.ag}},{key:"cg",get:function(){return!(!this.S_&&!this.w_)&&this.d_<=56}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"Pg",get:function(){return this.xg}},{key:"Ig",get:function(){return this.Rg}},{key:"Cg",get:function(){return this.Dg}},{key:"IS_IOS_CHROME",get:function(){return this.Bg}}]),t}();mt.Ng=new mt;var Nt=mt.Ng,At={}.toString;function Ct(t){return null!=t}Array.isArray;function Dt(t){return"object"===(void 0===t?"undefined":m(t))&&null!==t}function Pt(t){return function(t){return"function"==typeof t}(t)||Dt(t)}var Ft=function(){};function Lt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function Bt(t,n,r,i,e,u,o){try{var f=t[u](o),s=f.value}catch(t){return void r(t)}f.done?n(s):nt.resolve(s).then(i,e)}function Mt(t){return function(){var n=this,r=arguments;return new nt(function(i,e){var u=t.apply(n,r);function o(t){Bt(u,i,e,o,f,"next",t)}function f(t){Bt(u,i,e,o,f,"throw",t)}o(void 0)})}}function Ut(t,r){var e,u,o,f={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=g.create(("function"==typeof Iterator?Iterator:g).prototype);return s.next=c(0),s.throw=c(1),s.return=c(2),"function"==typeof n&&(s[i]=function(){return this}),s;function c(n){return function(i){return function(n){if(e)throw new E("Generator is already executing.");for(;s&&(s=0,n[0]&&(f=0)),f;)try{if(e=1,u&&(o=2&n[0]?u.return:n[0]?u.throw||((o=u.return)&&o.call(u),0):u.next)&&!(o=o.call(u,n[1])).done)return o;switch(u=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return f.label++,{value:n[1],done:!1};case 5:f.label++,u=n[1],n=[0];continue;case 7:n=f.ops.pop(),f.trys.pop();continue;default:if(!(o=f.trys,(o=o.length>0&&o[o.length-1])||6!==n[0]&&2!==n[0])){f=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]=0;r-=1){if(n(t[r],r,t))return r}return-1};Array.prototype.at;function Wt(t,n){var r=t.indexOf(n);return-1!==r&&(function(t,n){0===n?t.shift():t.splice(n,1)}(t,r),!0)}function xt(t){t.length=0}Array.prototype.flat,Array.prototype.flatMap;var Gt=function(){function t(){this.Hg=!1,this.Wg=!1,this.qg=[],this.Gg=[]}var n=t.prototype;return n.Vg=function(){if(!this.Hg&&!this.Wg){this.Hg=!0;for(var t,n=_t(this.qg.slice());!(t=n()).done;){(0,t.value)()}this.zg()}},n.zg=function(){if(!this.Wg){this.Wg=!0;for(var t,n=_t(this.Gg.slice());!(t=n()).done;){(0,t.value)()}xt(this.qg),xt(this.Gg)}},n.Xg=function(t){this.Wg||this.qg.push(t)},n.jg=function(t){this.Wg||Wt(this.qg,t)},n.Qg=function(t){this.Wg||this.Gg.push(t)},n.Kg=function(t){this.Wg||Wt(this.Gg,t)},t}(),jt=function(){function t(){this.Jg=new Gt}var n=t.prototype;return n.Zg=function(){this.Jg.Vg()},n.zg=function(){this.Jg.zg()},n.$g=function(t){var n=this.Jg;if(!n.Hg)if(t.Hg)n.Vg();else if(!n.Wg&&!t.Wg){var r=function(){i(),n.Vg()},i=function(){t.jg(r),t.Kg(i),n.jg(r),n.Kg(i)};t.Xg(r),t.Qg(i),n.Xg(r),n.Qg(i)}},n.tp=function(){var n=new t,r=new t,i=n.Yg,e=r.Yg,u=this.Jg,o=function(){i.Hg&&e.Wg||e.Hg&&i.Wg?u.Vg():i.Wg&&e.Wg&&u.zg()};i.Xg(o),e.Xg(o),i.Qg(o),e.Qg(o),n.$g(u),r.$g(u);return u.Qg(function(){i.jg(o),e.jg(o),i.Kg(o),e.Kg(o)}),[n,r]},n[e]=function(){this.Zg()},t.ep=function(n){for(var r,i=new t,e=_t(n);!(r=e()).done;){var u=r.value;void 0!==u&&i.$g(u)}return i},vt(t,[{key:"Yg",get:function(){return this.Jg}}]),t}(),Kt=function(){for(var t=arguments.length,n=new Array(t),r=0;r>>=0)&&t<256)&&(i=tn[t])?i:(r=en(t,0,!0),e&&(tn[t]=r),r):(e=-128<=(t|=0)&&t<128)&&(i=Qt[t])?i:(r=en(t,t<0?-1:0,!1),e&&(Qt[t]=r),r)}function rn(t,n){if(O(t))return n?ln:vn;if(n){if(t<0)return ln;if(t>=cn)return In}else{if(t<=-an)return En;if(t+1>=an)return wn}return t<0?rn(-t,n).neg():en(t%sn|0,t/sn|0,n)}function en(t,n,r){return new $t(t,n,r)}$t.fromInt=nn,$t.fromNumber=rn,$t.fromBits=en;var un=R.pow;function on(t,n,r){if(0===t.length)throw I("empty string");if("number"==typeof n?(r=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?ln:vn;if((r=r||10)<2||360)throw I("interior hyphen");if(0===i)return on(t.substring(1),n,r).neg();for(var e=rn(un(r,8)),u=vn,o=0;o>>0:this.low},gn.toNumber=function(){return this.unsigned?(this.high>>>0)*sn+(this.low>>>0):this.high*sn+(this.low>>>0)},gn.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((u=f).isZero())return s+o;for(;s.length<6;)s="0"+s;o=""+s+o}},gn.getHighBits=function(){return this.high},gn.getHighBitsUnsigned=function(){return this.high>>>0},gn.getLowBits=function(){return this.low},gn.getLowBitsUnsigned=function(){return this.low>>>0},gn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(En)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&!(t&1<>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},gn.isZero=function(){return 0===this.high&&0===this.low},gn.eqz=gn.isZero,gn.isNegative=function(){return!this.unsigned&&this.high<0},gn.isPositive=function(){return this.unsigned||this.high>=0},gn.isOdd=function(){return!(1&~this.low)},gn.isEven=function(){return!(1&this.low)},gn.equals=function(t){return Zt(t)||(t=fn(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},gn.eq=gn.equals,gn.notEquals=function(t){return!this.eq(t)},gn.neq=gn.notEquals,gn.ne=gn.notEquals,gn.lessThan=function(t){return this.comp(t)<0},gn.lt=gn.lessThan,gn.lessThanOrEqual=function(t){return this.comp(t)<=0},gn.lte=gn.lessThanOrEqual,gn.le=gn.lessThanOrEqual,gn.greaterThan=function(t){return this.comp(t)>0},gn.gt=gn.greaterThan,gn.greaterThanOrEqual=function(t){return this.comp(t)>=0},gn.gte=gn.greaterThanOrEqual,gn.ge=gn.greaterThanOrEqual,gn.compare=function(t){if(Zt(t)||(t=fn(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},gn.comp=gn.compare,gn.negate=function(){return!this.unsigned&&this.eq(En)?En:this.not().add(_n)},gn.neg=gn.negate,gn.add=function(t){Zt(t)||(t=fn(t));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,e=65535&this.low,u=t.high>>>16,o=65535&t.high,f=t.low>>>16,s=0,c=0,a=0,h=0;return a+=(h+=e+(65535&t.low))>>>16,c+=(a+=i+f)>>>16,s+=(c+=r+o)>>>16,s+=n+u,en((a&=65535)<<16|(h&=65535),(s&=65535)<<16|(c&=65535),this.unsigned)},gn.subtract=function(t){return Zt(t)||(t=fn(t)),this.add(t.neg())},gn.sub=gn.subtract,gn.multiply=function(t){if(this.isZero())return this;if(Zt(t)||(t=fn(t)),Yt)return en(Yt.mul(this.low,this.high,t.low,t.high),Yt.get_high(),this.unsigned);if(t.isZero())return this.unsigned?ln:vn;if(this.eq(En))return t.isOdd()?En:vn;if(t.eq(En))return this.isOdd()?En:vn;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(hn)&&t.lt(hn))return rn(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,e=65535&this.low,u=t.high>>>16,o=65535&t.high,f=t.low>>>16,s=65535&t.low,c=0,a=0,h=0,v=0;return h+=(v+=e*s)>>>16,a+=(h+=i*s)>>>16,h&=65535,a+=(h+=e*f)>>>16,c+=(a+=r*s)>>>16,a&=65535,c+=(a+=i*f)>>>16,a&=65535,c+=(a+=e*o)>>>16,c+=n*s+r*f+i*o+e*u,en((h&=65535)<<16|(v&=65535),(c&=65535)<<16|(a&=65535),this.unsigned)},gn.mul=gn.multiply,gn.divide=function(t){if(Zt(t)||(t=fn(t)),t.isZero())throw I("division by zero");var n,r,i;if(Yt)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?en((this.unsigned?Yt.div_u:Yt.div_s)(this.low,this.high,t.low,t.high),Yt.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?ln:vn;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return ln;if(t.gt(this.shru(1)))return dn;i=ln}else{if(this.eq(En))return t.eq(_n)||t.eq(yn)?En:t.eq(En)?_n:(n=this.shr(1).div(t).shl(1)).eq(vn)?t.isNegative()?_n:yn:(r=this.sub(t.mul(n)),i=n.add(r.div(t)));if(t.eq(En))return this.unsigned?ln:vn;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();i=vn}for(r=this;r.gte(t);){n=R.max(1,R.floor(r.toNumber()/t.toNumber()));for(var e=R.ceil(R.log(n)/R.LN2),u=e<=48?1:un(2,e-48),o=rn(n),f=o.mul(t);f.isNegative()||f.gt(r);)f=(o=rn(n-=u,this.unsigned)).mul(t);o.isZero()&&(o=_n),i=i.add(o),r=r.sub(f)}return i},gn.div=gn.divide,gn.modulo=function(t){return Zt(t)||(t=fn(t)),Yt?en((this.unsigned?Yt.rem_u:Yt.rem_s)(this.low,this.high,t.low,t.high),Yt.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},gn.mod=gn.modulo,gn.rem=gn.modulo,gn.not=function(){return en(~this.low,~this.high,this.unsigned)},gn.countLeadingZeros=function(){return this.high?R.clz32(this.high):R.clz32(this.low)+32},gn.clz=gn.countLeadingZeros,gn.countTrailingZeros=function(){return this.low?Jt(this.low):Jt(this.high)+32},gn.ctz=gn.countTrailingZeros,gn.and=function(t){return Zt(t)||(t=fn(t)),en(this.low&t.low,this.high&t.high,this.unsigned)},gn.or=function(t){return Zt(t)||(t=fn(t)),en(this.low|t.low,this.high|t.high,this.unsigned)},gn.xor=function(t){return Zt(t)||(t=fn(t)),en(this.low^t.low,this.high^t.high,this.unsigned)},gn.shiftLeft=function(t){return Zt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?en(this.low<>>32-t,this.unsigned):en(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):en(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},gn.shr=gn.shiftRight,gn.shiftRightUnsigned=function(t){return Zt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?en(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):en(32===t?this.high:this.high>>>t-32,0,this.unsigned)},gn.shru=gn.shiftRightUnsigned,gn.shr_u=gn.shiftRightUnsigned,gn.rotateLeft=function(t){var n;return Zt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?en(this.high,this.low,this.unsigned):t<32?(n=32-t,en(this.low<>>n,this.high<>>n,this.unsigned)):(n=32-(t-=32),en(this.high<>>n,this.low<>>n,this.unsigned))},gn.rotl=gn.rotateLeft,gn.rotateRight=function(t){var n;return Zt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?en(this.high,this.low,this.unsigned):t<32?(n=32-t,en(this.high<>>t,this.low<>>t,this.unsigned)):(n=32-(t-=32),en(this.low<>>t,this.high<>>t,this.unsigned))},gn.rotr=gn.rotateRight,gn.toSigned=function(){return this.unsigned?en(this.low,this.high,!1):this},gn.toUnsigned=function(){return this.unsigned?this:en(this.low,this.high,!0)},gn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},gn.toBytesLE=function(){var t=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},gn.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,n>>>24,n>>>16&255,n>>>8&255,255&n]},$t.fromBytes=function(t,n,r){return r?$t.fromBytesLE(t,n):$t.fromBytesBE(t,n)},$t.fromBytesLE=function(t,n){return new $t(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},$t.fromBytesBE=function(t,n){return new $t(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},"function"==typeof BigInt&&($t.fromBigInt=function(t,n){return en(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),n)},$t.fromValue=function(t,n){return"bigint"===(void 0===t?"undefined":m(t))?$t.fromBigInt(t,n):fn(t,n)},gn.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<=2*Sn},vt(t,[{key:"rp",get:function(){return void 0===this.hp&&(this.hp=this.op()),this.hp}},{key:"ap",get:function(){return Nt.Fv?"android":Nt.Dv?"macos":Nt.ru?"ios":Nt.Nv?"windows":"other"}},{key:"cp",get:function(){return Nt.og?"tv":Nt.Ks?"mobile":"desktop"}},{key:"dp",get:function(){return!Nt.og}},{key:"lp",get:function(){if(a.screen)return{width:a.screen.width,height:a.screen.height}}},{key:"fp",get:function(){return a.devicePixelRatio||1}},{key:"vp",get:function(){return kn}},{key:"_p",get:function(){return!1}},{key:"gp",get:function(){return!0}},{key:"pp",get:function(){return!!(Nt.X_||Nt.ru||Nt.g_)||!!Nt.D_}},{key:"mp",get:function(){return Nt.D_}},{key:"wp",get:function(){return!Nt.ru}},{key:"yp",get:function(){return!0}},{key:"Ap",get:function(){return!0}},{key:"bp",get:function(){return!1}},{key:"Sp",get:function(){}},{key:"Tp",get:function(){return!0}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){return Nt.D_}},{key:"Pp",get:function(){return!1}},{key:"Rp",get:function(){return!1}},{key:"Cp",get:function(){return!1}},{key:"Dp",get:function(){return!1}}]),t}(),bn=function(t){function n(){return t.call(this)||this}return at(n,t),n}(Tn),mn=function(t){function n(){return t.apply(this,arguments)||this}return at(n,t),n.prototype.xp=function(t,n){if(t&&t.Np&&n&&n.Np){var r=Nn(t.Np,"mp4a.40.2")&&Nn(n.Np,"mp4a.40.5"),i=Nn(t.Np,"mp4a.40.5")&&Nn(n.Np,"mp4a.40.2"),e=Nn(t.Np,"mp4a.40.2")&&Nn(n.Np,"mp4a.40.34"),u=Nn(t.Np,"mp4a.40.34")&&Nn(n.Np,"mp4a.40.2"),o=Nn(t.Np,"mp4a.40.5")&&Nn(n.Np,"mp4a.40.34"),f=Nn(t.Np,"mp4a.40.34")&&Nn(n.Np,"mp4a.40.5");return!(r||i||e||u||o||f)}return!0},vt(n,[{key:"Sp",get:function(){if(Nt.Dv)return 4096}},{key:"Dp",get:function(){return!0}}]),n}(bn);function Nn(t,n){return t.indexOf(n)>-1}var An,Cn=function(t){function n(){return t.apply(this,arguments)||this}return at(n,t),n.prototype.Ip=function(t){return t>=2},n}(bn),Dn=function(t){function n(){var n;return(n=t.call(this)||this).Bp=Nt.Q_>=11,n.sp=Nt.X_&&!(Nt.ru&&Nt.Q_<10),n}return at(n,t),vt(n,[{key:"Pp",get:function(){return Nt.Q_<17}},{key:"Rp",get:function(){return!0}}]),n}(bn),Pn=function(t){function n(){return t.apply(this,arguments)||this}return at(n,t),vt(n,[{key:"Tp",get:function(){return!Nt.Nv||(Nt.v_?92!==Nt.m_:Nt.d_>=100)}}]),n}(bn);var Fn=function(){var t=zt();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Nt.Kv)return!1;var t=zt();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var Ln=function(t){function n(n){var r;return(r=t.call(this)||this).Mp=void 0,r.Mp=n,r.Bp=r.Mp.Bp,r.Ke=r.Mp.Ke,r.sp=Fn&&r.Mp.sp,r}at(n,t);var r=n.prototype;return r.op=function(){return this.Mp.rp},r.xp=function(t,n){return this.Mp.xp(t,n)},r.Ip=function(t){return this.Mp.Ip(t)},vt(n,[{key:"Sp",get:function(){return this.Mp.Sp}},{key:"Tp",get:function(){return this.Mp.Tp}},{key:"Pp",get:function(){return this.Mp.Pp}},{key:"Dp",get:function(){return this.Mp.Dp}}]),n}(Tn),Bn=function(t){function n(n){var r;return(r=t.call(this,n)||this).Bp=!0,r.Ks=!0,r}return at(n,t),vt(n,[{key:"bp",get:function(){return Nt.ru}}]),n}(Ln);var Mn=function(t){function n(){return t.apply(this,arguments)||this}return at(n,t),n.prototype.op=function(){return function(t){return t&&Pt(a.ManagedMediaSource)?a.ManagedMediaSource:Pt(a.MediaSource)?a.MediaSource:void 0}(!0)?t.prototype.op.call(this):1},vt(n,[{key:"bp",get:function(){return!0}}]),n}(Bn),Un=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Up=void 0,n}return at(n,t),n.prototype.xp=function(n,r){return t.prototype.xp.call(this,n,r)},vt(n,[{key:"_p",get:function(){return Nt.A_<3}},{key:"gp",get:function(){return Nt.A_>=3}},{key:"lp",get:function(){var t=this;return a.tizen&&!this.Up&&a.tizen.systeminfo.getPropertyValue("DISPLAY",function(n){var r=n.resolutionWidth,i=n.resolutionHeight;1===r&&1===i||(t.Up={width:r,height:i})}),this.Up}},{key:"kp",get:function(){return Nt.A_<3}}]),n}(Ln),Vn=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Up=void 0,n}return at(n,t),vt(n,[{key:"lp",get:function(){var t=this;return a.webOS&&!this.Up&&a.webOS.deviceInfo(function(n){t.Up={width:n.screenWidth,height:n.screenHeight}}),this.Up}},{key:"yp",get:function(){return!1}}]),n}(Ln),Hn=function(t){function n(){return t.apply(this,arguments)||this}return at(n,t),vt(n,[{key:"bp",get:function(){return!0}},{key:"Rp",get:function(){return this.Mp.Rp}}]),n}(Ln),Wn=function(t){function n(){return t.apply(this,arguments)||this}return at(n,t),vt(n,[{key:"Cp",get:function(){return Nt.IS_FIRETV_AFTMM}}]),n}(Ln);!function(t){An=t}(function(){var t=function(){if(Nt.W_)return new mn;if(Nt.N_||Nt.L_)return new Cn;if(Nt.X_)return new Dn;if(Nt.u_)return new Pn;return new bn}();return Nt.ru?new Mn(t):Nt.I_?new Wn(t):Nt.Ks?new Bn(t):Nt.w_?new Un(t):Nt.S_?new Vn(t):Nt.Dv?new Hn(t):new Ln(t)}());var xn=!(Nt.L_&&!Nt.F_),Gn=self.console;function jn(t){if(Dt(t))try{return JSON.stringify(t)}catch(t){}return t}function Kn(t){return t.map(jn).join(" ")}function qn(t){var n=Gn&&Gn[t];return n?n.bind&&xn?n.bind(Gn):function(){for(var n=arguments.length,r=new Array(n),i=0;i1?n-1:0),i=1;i1?n-1:0),i=1;ic&&(u=c),o>c&&(o=c),f=e,s=u;;)if(f=65&&t<=90}function lr(t){return vr(t)||function(t){return t>=97&&t<=122}(t)}function _r(t){return t>=48&&t<=57}function dr(t){return _r(t)||lr(t)}function yr(t){return _r(t)||t>=65&&t<=70||t>=97&&t<=102}function wr(t){return vr(t)?t+32:t}function Ir(t){return _r(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Er(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var gr=R.min,Rr=String.fromCharCode;function Sr(t){for(var n=t.length,r=[],i=0;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},br=R.floor,mr=String.fromCharCode;function Nr(t){throw new RangeError(Tr[t])}function Ar(t){for(var n=[],r=0,i=t.length;r=55296&&e<=56319&&r>1,t+=br(t/n);t>455;i+=36)t=br(t/35);return br(i+36*t/(t+38))},Br=function(t){return function(t,n){var r=t.split("@"),i="";r.length>1&&(i=r[0]+"@",t=r[1]);var e=function(t,n){for(var r=[],i=t.length;i--;)r[i]=n(t[i]);return r}((t=t.replace(kr,".")).split("."),n).join(".");return i+e}(t,function(t){return Or.test(t)?"xn--"+function(t){for(var n=[],r=(t=Ar(t)).length,i=128,e=0,u=72,o=0,f=t;o=i&&_br((pr-e)/d)&&Nr("overflow"),e+=(h-i)*d,i=h;for(var y=0,w=t;ypr&&Nr("overflow"),I==i){for(var E=e,g=36;;g+=36){var R=g<=u?1:g>=u+26?26:g-u;if(E65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i)}return Sr(n)}function Ur(t){if(t>=55296&&t<=57343)throw new I("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Vr(t,n){return t>>n&63|128}function Hr(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(Vr(t,12)),n.push(Vr(t,6))):(Ur(t),n.push(t>>12&15|224),n.push(Vr(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function Wr(t){for(var n=[],r=0;r=Dr)throw new I("Invalid byte index");var t=255&Cr[Pr];if(Pr++,128==(192&t))return 63&t;throw new I("Invalid continuation byte")}function Gr(){var t,n;if(Pr>Dr)throw new I("Invalid byte index");if(Pr===Dr)return!1;if(t=255&Cr[Pr],Pr++,!(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|xr())>=128)return n;throw new I("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|xr()<<6|xr())>=2048)return Ur(n),n;throw new I("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|xr()<<12|xr()<<6|xr())>=65536&&n<=1114111)return n;throw new I("Invalid UTF-8 detected")}function jr(t){return[37,Er(t>>4),Er(15&t)]}function Kr(t){return function(t){return t>=0&&t<=31}(t)||t>126}function qr(t){return Kr(t)||32===t||34===t||60===t||62===t||96===t}function zr(t){return qr(t)||35===t||63===t||123===t||125===t}function Xr(t){return zr(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Yr(t){return t<33||t>126||34===t||35===t||60===t||62===t}function $r(t){return Yr(t)||39===t}function Zr(t,n){if(!n(t))return[t];for(var r=Wr([t]),i=[],e=0;e6)throw new E;for(var s=0;u0){if(!("."===t[u]&&s<4))throw new E;u+=1}if(!nr.test(t[u]))throw new E;for(;u255)throw new E}u+=1}r[i]=r[i]<<8|c,2!==(s+=1)&&4!==s||(i+=1)}if(4!==s)throw new E;break}if(":"===t[u]){if((u+=1)===n)throw new E}else if(u0;)hr(r,i,e+h-1),i-=1,h-=1}else if(8!==i)throw new E;return r}function ri(t){var n=10,r=er;return ir.test(t)?(t=t.slice(2),n=16,r=ur):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,r=or),""===t?0:r.test(t)?S(t,n):void 0}var ii={Vp:4},ei=/[\0\t\n\r #%/:?@\[\\\]]/,ui=/[\0\t\n\r #/:?@\[\\\]]/;function oi(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new E("Invalid IPv6 address");return{Vp:2,Hp:ni(t.slice(1,-1))}}if(!n)return function(t){if(ui.test(t))throw new E("Invalid code point in opaque host");var n=Jr(t,Kr);return""===n?ii:{Vp:3,Wp:n}}(t);var r=function(t){var n=function(t){return Br(t.toLowerCase())}(t);return n}(ti(t));if(ei.test(r))throw new E("Invalid code point in host");var i=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var r=[],i=0;i255)throw new E;if(r[r.length-1]>=R.pow(256,5-r.length))throw new E;for(var f=r.pop(),s=0;s>>=8;return n.reverse().join("")}(t.Hp);case 2:return"["+function(t){for(var n="",r=function(t){for(var n=0,r=0,i=0,e=0,u=0;u<8;u++)0===t[u]?(0===e&&(i=u),e++):(e>r&&(n=i,r=e),e=0);return e>r&&(n=i,r=e),r>1?n:null}(t),i=!1,e=0;e<8;e++){if(i){if(0===t[e])continue;i=!1}r!==e?(n+=t[e].toString(16),7!==e&&(n+=":")):(n+=0===e?"::":":",i=!0)}return n}(t.Hp)+"]";case 3:return t.Wp;case 4:return""}}var si=/\+/g;function ci(t){return 42===t||45===t||46===t||95===t||dr(t)}function ai(t){for(var n=t.split("&"),r=[],i=0;i0&&(n+="&"),n+=vi(Wr(Ar(i[0])))+"="+vi(Wr(Ar(i[1])))}return n}function vi(t){for(var n=[],r=0;r0&&"?"===t[0]&&(t=t.slice(1)),this.zp=ai(t)}var n=t.prototype;return n.append=function(t,n){t=_i(t),n=_i(n),this.zp.push([t,n]),Ri(this)},n.delete=function(t){t=_i(t);for(var n=this.zp,r=0;r=2))return!1;if(!Vi(t.slice(0,2)))return!1;if(2!==n){var r=t[2];if(47!==r&&92!==r&&63!==r&&35!==r)return!1}return!0}function Ui(t){return 2===t.length&&tr.test(t[0])&&(":"===t[1]||"|"===t[1])}function Vi(t){return 2===t.length&&Ui(Sr(t))}function Hi(t){return Ui(t)&&":"===t[1]}function Wi(t){var n=t.Jp;0!==n.length&&("file"===t.Qp&&1===n.length&&Hi(n[0])||n.pop())}function xi(t){return null===t.Zp||ii===t.Zp||t.$p||"file"===t.Qp}var Gi=-1,ji=/\t|\n|\r/g,Ki=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function qi(t,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null),r||(r=new Xi,t=t.replace(Ki,""));var e=null!==i?i:0;n=n||null;for(var u=[],o=!1,f=!1,s=!1,c=Ar(t=t.replace(ji,"")),a=c.length,h=0;h<=a;){var v=h65535)throw new E("Invalid port");r.im=g===Ni[r.Qp]?null:g,u.length=0}if(null!==i)return;e=16,h-=1}break;case 13:r.Qp="file",47===v||92===v?e=14:n&&"file"===n.Qp?Gi===v?(r.Zp=n.Zp,r.Jp=n.Jp.slice(),r.Gp=n.Gp):63===v?(r.Zp=n.Zp,r.Jp=n.Jp.slice(),r.Gp="",e=19):35===v?(r.Zp=n.Zp,r.Jp=n.Jp.slice(),r.Gp=n.Gp,r.nm="",e=20):(Mi(c.slice(h))||(r.Zp=n.Zp,r.Jp=n.Jp.slice(),Wi(r)),e=17,h-=1):(e=17,h-=1);break;case 14:47===v||92===v?e=15:(n&&"file"===n.Qp&&!Mi(c.slice(h))&&(Hi(n.Jp[0])?r.Jp.push(n.Jp[0]):r.Zp=n.Zp),e=17,h-=1);break;case 15:if(Gi===v||47===v||92===v||63===v||35===v)if(h-=1,null===i&&Vi(u))e=17;else if(0===u.length){if(r.Zp=ii,null!==i)return;e=16}else{var R=oi(Mr(u),Li(r));if(0===R.Vp&&"localhost"===R.qp&&(R=ii),r.Zp=R,null!==i)return;u.length=0,e=16}else u.push(v);break;case 16:Li(r)?(e=17,47!==v&&92!==v&&(h-=1)):null===i&&63===v?(r.Gp="",e=19):null===i&&35===v?(r.nm="",e=20):Gi!==v&&(e=17,47!==v&&(h-=1));break;case 17:if(Gi===v||47===v||Li(r)&&92===v||null===i&&(63===v||35===v)){var p=Mr(u);if(Pi(p)?(Wi(r),47===v||Li(r)&&92===v||r.Jp.push("")):!Di(p)||47===v||Li(r)&&92===v?Di(p)||("file"===r.Qp&&0===r.Jp.length&&Vi(u)&&(ii!==r.Zp&&null!==r.Zp&&(r.Zp=ii),u[1]=58,p=Mr(u)),r.Jp.push(p)):r.Jp.push(""),u.length=0,"file"===r.Qp&&(Gi===v||63===v||35===v))for(;r.Jp.length>1&&""===r.Jp[0];)r.Jp.shift();63===v?(r.Gp="",e=19):35===v&&(r.nm="",e=20)}else u.push.apply(u,Zr(v,zr));break;case 18:63===v?(r.Gp="",e=19):35===v?(r.nm="",e=20):Gi!==v&&(r.Jp[0]+=Mr(Zr(v,Kr)));break;case 19:null===i&&35===v?(r.nm="",e=20):Gi!==v&&(r.Gp+=Mr(Zr(v,Li(r)?$r:Yr)));break;case 20:Gi===v||0===v||(r.nm+=Mr(Zr(v,qr)))}h++}return r}function zi(t,n,r,i){try{qi(t,n,r,i)}catch(t){}}var Xi=function(){this.Qp="",this.Kp="",this.Yp="",this.Zp=null,this.im=null,this.Jp=[],this.Gp=null,this.nm=null,this.$p=!1};function Yi(t){switch(t.Qp){case"blob":var n;try{n=qi(t.Jp[0],null)}catch(t){return mi}return Yi(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,r){return t+"://"+fi(n)+(null===r?"":":"+r)}(t.Qp,t.Zp,t.im);default:return mi}}var $i=function(){function t(t,n){var r,i=null;if(null!=n)if(function(t){return null!=t&&t instanceof $i&&"object"==typeof t.rc}(n))i=n.rc;else try{i=qi(String(n),null)}catch(t){throw new E("Invalid base URL: "+t.message)}try{r=qi(String(t),i)}catch(t){throw new E("Invalid URL: "+t.message)}var e=r.Gp;this.rc=r,this.Gp=function(t){var n=new Si;return null!==t&&gi(n,t),n}(e),this.Gp.rc=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,r){n&&Zn(t.prototype,n),r&&Zn(t,r)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var r=t.Qp+":";if(null!==t.Zp?(r+="//",Bi(t)&&(r+=t.Kp,""!==t.Yp&&(r+=":"+t.Yp),r+="@"),r+=fi(t.Zp),null!==t.im&&(r+=":"+t.im)):null===t.Zp&&"file"===t.Qp&&(r+="//"),t.$p)r+=t.Jp[0];else for(var i=0,e=t.Jp;i1?n-1:0),i=1;i>>=0,be().subarray(t/1,t/1+n)}var Ne=void 0!==Ee?new Ee("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:function(){throw I("TextDecoder not available")}};function Ae(t,n){return t>>>=0,Ne.decode(be().subarray(t,t+n))}void 0!==Ee&&Ne.decode();var Ce=0;function De(t,n){var r=n(1*t.length,1)>>>0;return be().set(t,r/1),Ce=t.length,r}var Pe=null;function Fe(){return(null===Pe||!0===Pe.buffer.detached||void 0===Pe.buffer.detached&&Pe.buffer!==we.memory.buffer)&&(Pe=new DataView(we.memory.buffer)),Pe}var Le=void 0!==Ie?new Ie("utf-8"):{encode:function(){throw I("TextEncoder not available")}},Be="function"==typeof Le.encodeInto?function(t,n){return Le.encodeInto(t,n)}:function(t,n){var r=Le.encode(t);return n.set(r),{read:t.length,written:r.length}};function Me(t){try{var n=we.__wbindgen_add_to_stack_pointer(-16);we.mpegts_to_fmp4(n,ke(t));var r=Fe().getInt32(n+0,!0),i=Fe().getInt32(n+4,!0);if(Fe().getInt32(n+8,!0))throw Oe(i);return Oe(r)}finally{we.__wbindgen_add_to_stack_pointer(16)}}function Ue(t){try{var n=we.__wbindgen_add_to_stack_pointer(-16);we.raw_audio_to_fmp4(n,ke(t));var r=Fe().getInt32(n+0,!0),i=Fe().getInt32(n+4,!0);if(Fe().getInt32(n+8,!0))throw Oe(i);return Oe(r)}finally{we.__wbindgen_add_to_stack_pointer(16)}}function Ve(t,n){return Mt(function(){var r,i,e;return Ut(this,function(u){switch(u.label){case 0:if("function"!=typeof Response||!b(t,Response))return[3,7];if("function"!=typeof WebAssembly.instantiateStreaming)return[3,4];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,WebAssembly.instantiateStreaming(t,n)];case 2:return[2,u.sent()];case 3:if(r=u.sent(),"application/wasm"==t.headers.get("Content-Type"))throw r;return console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r),[3,4];case 4:return[4,t.arrayBuffer()];case 5:return i=u.sent(),[4,WebAssembly.instantiate(i,n)];case 6:return[2,u.sent()];case 7:return[4,WebAssembly.instantiate(t,n)];case 8:return b(e=u.sent(),WebAssembly.Instance)?[2,{instance:e,module:t}]:[2,e];case 9:return[2]}})})()}function He(){var t={wbg:{}};return t.wbg.__wbg_audiopid_3c9ffbcf8a29acc3=function(t){var n=Re(t).audio_pid;return Se(n)?16777215:n},t.wbg.__wbg_createoutput_2b6e36bfa255fecf=function(t,n){var r=function(t,n){return{data:t,metadata:n}}(Oe(t),Oe(n));return ke(r)},t.wbg.__wbg_createoutputdata_c0eeb4a388c51889=function(t,n,r,i,e,u,o,f){var s,c,a,h;0!==t&&(s=me(t,n).slice(),we.__wbindgen_export_0(t,1*n,1)),0!==r&&(c=me(r,i).slice(),we.__wbindgen_export_0(r,1*i,1)),0!==e&&(a=me(e,u).slice(),we.__wbindgen_export_0(e,1*u,1)),0!==o&&(h=me(o,f).slice(),we.__wbindgen_export_0(o,1*f,1));var v=function(t,n,r,i){return{video_init:t,audio_init:n,video_media:r,audio_media:i}}(s,c,a,h);return ke(v)},t.wbg.__wbg_createoutputmetadata_502b2a1d6e23cc5d=function(t,n,r,i,e,u,o,f,s,c,a,h,v,l,_,d){var y,w,I,E;0!==r&&(y=Ae(r,i).slice(),we.__wbindgen_export_0(r,1*i,1)),0!==e&&(w=Ae(e,u).slice(),we.__wbindgen_export_0(e,1*u,1)),0!==o&&(I=me(o,f).slice(),we.__wbindgen_export_0(o,1*f,1)),0!==s&&(E=me(s,c).slice(),we.__wbindgen_export_0(s,1*c,1));var g=function(t,n,r,i,e,u,o,f,s,c,a){return{video_pid:t,audio_pid:n,video_codec:r,audio_codec:i,sps_nal:e,pps_nal:u,first_decode_timestamp:o,first_presentation_timestamp:f,first_video_presentation_timestamp:s,program_map_table_pid:c,video_frame_rate:a}}(16777215===t?void 0:t,16777215===n?void 0:n,y,w,I,E,Oe(a),Oe(h),Oe(v),16777215===l?void 0:l,0===_?void 0:d);return ke(g)},t.wbg.__wbg_createtimestampwithbase_72cbc187bece8945=function(t,n,r){var i=function(t,n,r){return{low:t,high:n,base:r}}(t>>>0,n>>>0,r>>>0);return ke(i)},t.wbg.__wbg_data_dc6f1640362bd080=function(t,n){var r=De(Re(n).data,we.__wbindgen_export_1),i=Ce;Fe().setInt32(t+4,i,!0),Fe().setInt32(t+0,r,!0)},t.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,n){var r,i;try{r=t,i=n,console.error(Ae(t,n))}finally{we.__wbindgen_export_0(r,i,1)}},t.wbg.__wbg_metadata_2c31ca0ee55988b0=function(t){var n=Re(t).metadata;return Se(n)?0:ke(n)},t.wbg.__wbg_new_8a6f238a6ece86ea=function(){return ke(new I)},t.wbg.__wbg_ppsnal_3c5a6e2ca6ad0008=function(t,n){var r=Re(n).pps_nal,i=Se(r)?0:De(r,we.__wbindgen_export_1),e=Ce;Fe().setInt32(t+4,e,!0),Fe().setInt32(t+0,i,!0)},t.wbg.__wbg_programmaptablepid_d7511cd7e35e5ebc=function(t){var n=Re(t).program_map_table_pid;return Se(n)?16777215:n},t.wbg.__wbg_spsnal_68e223ae90328906=function(t,n){var r=Re(n).sps_nal,i=Se(r)?0:De(r,we.__wbindgen_export_1),e=Ce;Fe().setInt32(t+4,e,!0),Fe().setInt32(t+0,i,!0)},t.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,n){var r=function(t,n,r){if(void 0===r){var i=Le.encode(t),e=n(i.length,1)>>>0;return be().subarray(e,e+i.length).set(i),Ce=i.length,e}for(var u=t.length,o=n(u,1)>>>0,f=be(),s=0;s127)break;f[o+s]=c}if(s!==u){0!==s&&(t=t.slice(s)),o=r(o,u,u=s+3*t.length,1)>>>0;var a=be().subarray(o+s,o+u);o=r(o,u,s+=Be(t,a).written,1)>>>0}return Ce=s,o}(Re(n).stack,we.__wbindgen_export_1,we.__wbindgen_export_2),i=Ce;Fe().setInt32(t+4,i,!0),Fe().setInt32(t+0,r,!0)},t.wbg.__wbg_videopid_8c9364c3427c8b09=function(t){var n=Re(t).video_pid;return Se(n)?16777215:n},t.wbg.__wbindgen_object_drop_ref=function(t){Oe(t)},t.wbg.__wbindgen_string_new=function(t,n){return ke(Ae(t,n))},t}function We(t,n){return we=t.exports,xe.__wbindgen_wasm_module=n,Pe=null,Te=null,we.__wbindgen_start(),we}function xe(t){return Mt(function(){var n,r,i,e;return Ut(this,function(u){switch(u.label){case 0:return void 0!==we?[2,we]:(void 0!==t&&(g.getPrototypeOf(t)===g.prototype?t=t.module_or_path:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===t&&(t=new URL("theomux_bg.wasm",void 0)),n=He(),("string"==typeof t||"function"==typeof Request&&b(t,Request)||"function"==typeof URL&&b(t,URL))&&(t=fetch(t)),[4,t]);case 1:return[4,Ve.apply(void 0,[u.sent(),n])];case 2:return r=u.sent(),i=r.instance,e=r.module,[2,We(i,e)]}})})()}function Ge(t){return Mt(function(){var n,r;return Ut(this,function(i){switch(i.label){case 0:return b(t,WebAssembly.Module)?n=t:(r="string"==typeof t?new URL(t):t,n="http:"===r.protocol||"https:"===r.protocol?fetch(r.href):function(t){return new nt(function(n,r){var i=new T;i.onload=function(){n(i.response||new ArrayBuffer(0))},i.onerror=function(){r(new E('Failed to fetch "'+t+'", status '+i.status))},i.open("GET",t,!0),i.responseType="arraybuffer",i.send()})}(r.href)),[4,xe({module_or_path:n})];case 1:return i.sent(),[2,{mpegts_to_fmp4:Me,raw_audio_to_fmp4:Ue}]}})})()}var je=new URL("./THEOplayer.transmux.wasm",v.href);!function(t){var n,r=nt.resolve(t()).then(function(t){n=t,r=void 0,self.postMessage({sQt:"10.0.0"})},function(t){var n=t,r={success:!1,error:n.message,errorCode:b(n,ye)?n.code:_e.MEDIA_DECODE_ERROR};self.postMessage(r)});self.addEventListener("message",function(t){var i=t.data.id;(function(t){return Mt(function(){var i,e,u,o,f,s;return Ut(this,function(c){switch(c.label){case 0:return void 0===r?[3,2]:[4,r];case 1:c.sent(),c.label=2;case 2:if(u=t.id,t.type===le.MPEGTS_TO_FMP4)o=n.mpegts_to_fmp4(t.input);else{if(t.type!==le.RAW_AUDIO_TO_FMP4)throw new I("Unknown request type: "+t.type);o=n.raw_audio_to_fmp4(t.input)}return f={success:!0,requestId:u,output:o},s=[null==(i=t.input.metadata)?void 0:i.sps_nal,null==(e=t.input.metadata)?void 0:e.pps_nal,t.input.data,o.data.video_init,o.data.audio_init,o.data.video_media,o.data.audio_media].filter(Ct).map(function(t){return t.buffer}),self.postMessage(f,s),[2]}})})()})(t.data).catch(function(t){var n=t,r={success:!1,requestId:i,error:n.message,errorCode:b(n,ye)?n.code:_e.MEDIA_DECODE_ERROR};self.postMessage(r)})})}(function(){return Ge(je)})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this); +!function(t){"use strict";var n,r,i,e,u,o,f,s,c,a=t.window,h=t.document,v=t.location,l=t.navigator,_=t.setTimeout,d=t.clearTimeout,y=t.setInterval,w=t.clearInterval,I=t.Error,E=t.TypeError,g=(t.SyntaxError,t.Object),R=t.Math,p=t.parseInt,S=t.parseFloat,O=t.isNaN,T=t.Uint8Array,k=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest);function b(t,r){return null!=r&&void 0!==n&&r[n.hasInstance]?!!r[n.hasInstance](t):t instanceof r}function m(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,r=null!=(o=Symbol.for)?o:Symbol,i=Symbol.iterator,e=null!=(f=Symbol.dispose)?f:r("Symbol.dispose"),u=null!=(s=Symbol.asyncDispose)?s:r("Symbol.asyncDispose")):(c=0,n=function(t){return"hd"+t+"_"+ ++c},i=(r=function(t){return"hd"+t})("Symbol.iterator"),e=r("Symbol.dispose"),u=r("Symbol.asyncDispose"),n.for=r,n.iterator=i,n.dispose=e,n.asyncDispose=u);var N=_;function A(t){return Boolean(t&&void 0!==t.length)}function C(){}function D(t){if(!b(this,D))throw new E("Promises must be constructed via new");if("function"!=typeof t)throw new E("not a function");this.Ra=0,this.tki=!1,this.RTt=void 0,this.iki=[],U(t,this)}function P(t,n){for(;3===t.Ra;)t=t.RTt;0!==t.Ra?(t.tki=!0,D.nki(function(){var r=1===t.Ra?n.onFulfilled:n.onRejected;if(null!==r){var i;try{i=r(t.RTt)}catch(t){return void L(n.promise,t)}F(n.promise,i)}else(1===t.Ra?F:L)(n.promise,t.RTt)})):t.iki.push(n)}function F(t,n){try{if(n===t)throw new E("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":m(n))||"function"==typeof n)){var r=n.then;if(b(n,D))return t.Ra=3,t.RTt=n,void B(t);if("function"==typeof r)return void U(function(t,n){return function(){t.apply(n,arguments)}}(r,n),t)}t.Ra=1,t.RTt=n,B(t)}catch(n){L(t,n)}}function L(t,n){t.Ra=2,t.RTt=n,B(t)}function B(t){2===t.Ra&&0===t.iki.length&&D.nki(function(){t.tki||D.rki(t.RTt)});for(var n=0,r=t.iki.length;nt.length)&&(n=t.length);for(var r=0,i=new Array(n);r=t.length?{done:!0}:{done:!1,value:t[u++]}}}throw new E("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}V&&!(x&&G<60||K&&q<15)?nt=V:(nt=D,ot=null!==(tt=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=V;if(n&&"function"==typeof n.resolve){var r=n.resolve();return function(t){return r.then(t)}}}())&&void 0!==tt?tt:D.nki,rt=ot,it=new z(16),et=!1,(ft={W6:function(t){it.push(t),et||(et=!0,rt(ut))},EQ:ut=function(){for(;it.length()>0;)it.shift()();et=!1}}).EQ,D.nki=ft.W6,D.rki=function(t){try{var n=st(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}_(function(){throw new I("Unhandled promise rejection: ".concat(t))},0)});var dt=function(t){return t.Sv="web",t.Tv="android",t.Ev="android-tv",t.xv="ios",t.Pv="tvos",t.Iv="chromecast",t.Cv="theoliveweb",t}({});var yt=l?l.userAgent:"",wt=yt.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),It=yt.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Et=yt.match(/Android ([0-9\.]+)/i),gt=yt.match(/Windows NT ([0-9\.]+)/i),Rt=yt.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),pt=yt.match(/Firefox\/([0-9\.]+)/i),St=yt.match(/OPR\/(\d+\.\d+)/i),Ot=yt.match(/Tizen ([0-9\.]+)/i),Tt=yt.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),kt=yt.match(/HbbTV\/([0-9.]+)/i),bt=yt.match(/(AFT.*) Build/i),mt=function(){function t(){this.Rv=Boolean("ontouchstart"in self||self.DocumentTouch&&b(h,self.DocumentTouch)||l&&l.msMaxTouchPoints),this.Nv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(yt)||/(macintosh|mac(?=_powerpc)\s)/i.test(yt),this.Mv=/Windows NT/i.test(yt),this.Ov=gt?S(gt[1]):0,this.Uv=/Android/i.test(yt),this.Hv=Et?S(Et[1]):0,this.qv=/windows phone (8|8\.1)/i.test(yt),this.Gv=/iPhone/i.test(yt),this.Qv=/iPad/i.test(yt),this.Yv=this.Nv&&this.Rv&&!this.Qv,this.Zv=/iPod/i.test(yt),this.r_=/Mobile Safari/i.test(yt),this.s_=/EOS\d*STB/i.test(yt),this.n_=/APP\d*STB/i.test(yt),this.$v=(this.Gv||this.Qv||this.Yv||this.Zv)&&!this.qv,this.i_=Tt?S(Tt[2]):0,this.h_=this.qv||this.$v||this.Uv||this.r_,this.a_=/CriOS/i.test(yt),this.c_=Boolean(self.chrome&&/google/i.test(l.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(l.userAgent),this.p_=It?p(It[1],10):0,this.Ng=Boolean(/CriOS/i.test(yt)),this.Dg=Boolean(self.chrome||/Chrome/i.test(yt)||this.Ng),this.f_=wt?p(wt[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(yt),this.A_=Ot?S(Ot[1]):0,this.l_=this.A_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.A_):void 0,this.T_=/webos|web0s/i.test(yt),this.E_=/HbbTV/i.test(yt),this.P_=!!kt&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(kt[1]),this.C_=/AFT.* Build/i.test(yt),this.R_=bt?bt[1]:void 0,this.N_=/VIZIO/i.test(yt),this.M_=/Edge\/\d+/i.test(yt),this.O_=/Trident/i.test(yt),this.U_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.H_=/Vivaldi/i.test(yt),this.q_=/Firefox/i.test(yt)&&!/Seamonkey/i.test(yt),this.G_=pt?S(pt[1]):0,this.j_=/Safari/i.test(yt)&&!/Chrome/i.test(yt)&&!this.qv&&!this.y_,this.K_=Rt?S(Rt[2]):0,this.J_=Boolean(St),this.eg=St?S(St[1]):0,this.hg=/CrKey/.test(yt),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(yt),this.fg=/PlayStation 4/i.test(yt),this._g=/PlayStation 5/i.test(yt),this.pg="web"===dt.Ev,this.yg="web"===dt.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===dt.xv,this.Pg="web"===dt.Pv,this.Cg="web"===dt.Iv}return vt(t,[{key:"Ke",get:function(){return this.Rv}},{key:"Dv",get:function(){return this.Nv}},{key:"Bv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Ov}},{key:"Fv",get:function(){return this.Uv}},{key:"Vv",get:function(){return this.Hv}},{key:"Wv",get:function(){return this.qv}},{key:"zv",get:function(){return this.Gv}},{key:"Xv",get:function(){return this.Qv}},{key:"Kv",get:function(){return this.Yv}},{key:"Jv",get:function(){return this.Zv}},{key:"ru",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"e_",get:function(){return this.s_||this.n_}},{key:"vd",get:function(){return this.r_}},{key:"Ks",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"d_",get:function(){var t;return null!=(t=this.l_)?t:this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){var t;return(null==(t=a.chrome)?void 0:t.webview)&&this.p_>0}},{key:"m_",get:function(){return this.p_}},{key:"w_",get:function(){return this.y_}},{key:"b_",get:function(){return this.A_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"x_",get:function(){return this.P_}},{key:"I_",get:function(){return this.C_}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.R_}},{key:"D_",get:function(){return this.N_}},{key:"B_",get:function(){return this.M_}},{key:"L_",get:function(){return this.O_}},{key:"F_",get:function(){return this.U_}},{key:"V_",get:function(){return this.H_}},{key:"W_",get:function(){return this.q_}},{key:"z_",get:function(){return this.G_}},{key:"X_",get:function(){return this.j_}},{key:"Q_",get:function(){return 0===this.K_&&Nt.ru?this.i_:this.K_}},{key:"Y_",get:function(){return this.J_}},{key:"Z_",get:function(){return this.eg}},{key:"rg",get:function(){return this.hg}},{key:"og",get:function(){return this.ag}},{key:"cg",get:function(){return!(!this.S_&&!this.w_)&&this.d_<=56}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"xg",get:function(){return this.Pg}},{key:"Ig",get:function(){return this.Cg}},{key:"Rg",get:function(){return this.Dg}},{key:"IS_IOS_CHROME",get:function(){return this.Ng}}]),t}();mt.Bg=new mt;var Nt=mt.Bg,At={}.toString;function Ct(t){return null!=t}Array.isArray;function Dt(t){return"object"===(void 0===t?"undefined":m(t))&&null!==t}function Pt(t){return function(t){return"function"==typeof t}(t)||Dt(t)}var Ft=function(){};function Lt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function Bt(t,n,r,i,e,u,o){try{var f=t[u](o),s=f.value}catch(t){return void r(t)}f.done?n(s):nt.resolve(s).then(i,e)}function Mt(t){return function(){var n=this,r=arguments;return new nt(function(i,e){var u=t.apply(n,r);function o(t){Bt(u,i,e,o,f,"next",t)}function f(t){Bt(u,i,e,o,f,"throw",t)}o(void 0)})}}function Ut(t,r){var e,u,o,f={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=g.create(("function"==typeof Iterator?Iterator:g).prototype);return s.next=c(0),s.throw=c(1),s.return=c(2),"function"==typeof n&&(s[i]=function(){return this}),s;function c(n){return function(i){return function(n){if(e)throw new E("Generator is already executing.");for(;s&&(s=0,n[0]&&(f=0)),f;)try{if(e=1,u&&(o=2&n[0]?u.return:n[0]?u.throw||((o=u.return)&&o.call(u),0):u.next)&&!(o=o.call(u,n[1])).done)return o;switch(u=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return f.label++,{value:n[1],done:!1};case 5:f.label++,u=n[1],n=[0];continue;case 7:n=f.ops.pop(),f.trys.pop();continue;default:if(!(o=f.trys,(o=o.length>0&&o[o.length-1])||6!==n[0]&&2!==n[0])){f=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]=0;r-=1){if(n(t[r],r,t))return r}return-1};Array.prototype.at;function Wt(t,n){var r=t.indexOf(n);return-1!==r&&(function(t,n){0===n?t.shift():t.splice(n,1)}(t,r),!0)}function xt(t){t.length=0}Array.prototype.flat,Array.prototype.flatMap;var Gt=function(){function t(){this.Hg=!1,this.Wg=!1,this.qg=[],this.Gg=[]}var n=t.prototype;return n.Vg=function(){if(!this.Hg&&!this.Wg){this.Hg=!0;for(var t,n=_t(this.qg.slice());!(t=n()).done;){(0,t.value)()}this.zg()}},n.zg=function(){if(!this.Wg){this.Wg=!0;for(var t,n=_t(this.Gg.slice());!(t=n()).done;){(0,t.value)()}xt(this.qg),xt(this.Gg)}},n.Xg=function(t){this.Wg||this.qg.push(t)},n.jg=function(t){this.Wg||Wt(this.qg,t)},n.Qg=function(t){this.Wg||this.Gg.push(t)},n.Kg=function(t){this.Wg||Wt(this.Gg,t)},t}(),jt=function(){function t(){this.Jg=new Gt}var n=t.prototype;return n.Zg=function(){this.Jg.Vg()},n.zg=function(){this.Jg.zg()},n.$g=function(t){var n=this.Jg;if(!n.Hg)if(t.Hg)n.Vg();else if(!n.Wg&&!t.Wg){var r=function(){i(),n.Vg()},i=function(){t.jg(r),t.Kg(i),n.jg(r),n.Kg(i)};t.Xg(r),t.Qg(i),n.Xg(r),n.Qg(i)}},n.tp=function(){var n=new t,r=new t,i=n.Yg,e=r.Yg,u=this.Jg,o=function(){i.Hg&&e.Wg||e.Hg&&i.Wg?u.Vg():i.Wg&&e.Wg&&u.zg()};i.Xg(o),e.Xg(o),i.Qg(o),e.Qg(o),n.$g(u),r.$g(u);return u.Qg(function(){i.jg(o),e.jg(o),i.Kg(o),e.Kg(o)}),[n,r]},n[e]=function(){this.Zg()},t.ep=function(n){for(var r,i=new t,e=_t(n);!(r=e()).done;){var u=r.value;void 0!==u&&i.$g(u)}return i},vt(t,[{key:"Yg",get:function(){return this.Jg}}]),t}(),Kt=function(){for(var t=arguments.length,n=new Array(t),r=0;r>>=0)&&t<256)&&(i=tn[t])?i:(r=en(t,0,!0),e&&(tn[t]=r),r):(e=-128<=(t|=0)&&t<128)&&(i=Qt[t])?i:(r=en(t,t<0?-1:0,!1),e&&(Qt[t]=r),r)}function rn(t,n){if(O(t))return n?ln:vn;if(n){if(t<0)return ln;if(t>=cn)return In}else{if(t<=-an)return En;if(t+1>=an)return wn}return t<0?rn(-t,n).neg():en(t%sn|0,t/sn|0,n)}function en(t,n,r){return new $t(t,n,r)}$t.fromInt=nn,$t.fromNumber=rn,$t.fromBits=en;var un=R.pow;function on(t,n,r){if(0===t.length)throw I("empty string");if("number"==typeof n?(r=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?ln:vn;if((r=r||10)<2||360)throw I("interior hyphen");if(0===i)return on(t.substring(1),n,r).neg();for(var e=rn(un(r,8)),u=vn,o=0;o>>0:this.low},gn.toNumber=function(){return this.unsigned?(this.high>>>0)*sn+(this.low>>>0):this.high*sn+(this.low>>>0)},gn.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((u=f).isZero())return s+o;for(;s.length<6;)s="0"+s;o=""+s+o}},gn.getHighBits=function(){return this.high},gn.getHighBitsUnsigned=function(){return this.high>>>0},gn.getLowBits=function(){return this.low},gn.getLowBitsUnsigned=function(){return this.low>>>0},gn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(En)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&!(t&1<>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},gn.isZero=function(){return 0===this.high&&0===this.low},gn.eqz=gn.isZero,gn.isNegative=function(){return!this.unsigned&&this.high<0},gn.isPositive=function(){return this.unsigned||this.high>=0},gn.isOdd=function(){return!(1&~this.low)},gn.isEven=function(){return!(1&this.low)},gn.equals=function(t){return Zt(t)||(t=fn(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},gn.eq=gn.equals,gn.notEquals=function(t){return!this.eq(t)},gn.neq=gn.notEquals,gn.ne=gn.notEquals,gn.lessThan=function(t){return this.comp(t)<0},gn.lt=gn.lessThan,gn.lessThanOrEqual=function(t){return this.comp(t)<=0},gn.lte=gn.lessThanOrEqual,gn.le=gn.lessThanOrEqual,gn.greaterThan=function(t){return this.comp(t)>0},gn.gt=gn.greaterThan,gn.greaterThanOrEqual=function(t){return this.comp(t)>=0},gn.gte=gn.greaterThanOrEqual,gn.ge=gn.greaterThanOrEqual,gn.compare=function(t){if(Zt(t)||(t=fn(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},gn.comp=gn.compare,gn.negate=function(){return!this.unsigned&&this.eq(En)?En:this.not().add(_n)},gn.neg=gn.negate,gn.add=function(t){Zt(t)||(t=fn(t));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,e=65535&this.low,u=t.high>>>16,o=65535&t.high,f=t.low>>>16,s=0,c=0,a=0,h=0;return a+=(h+=e+(65535&t.low))>>>16,c+=(a+=i+f)>>>16,s+=(c+=r+o)>>>16,s+=n+u,en((a&=65535)<<16|(h&=65535),(s&=65535)<<16|(c&=65535),this.unsigned)},gn.subtract=function(t){return Zt(t)||(t=fn(t)),this.add(t.neg())},gn.sub=gn.subtract,gn.multiply=function(t){if(this.isZero())return this;if(Zt(t)||(t=fn(t)),Yt)return en(Yt.mul(this.low,this.high,t.low,t.high),Yt.get_high(),this.unsigned);if(t.isZero())return this.unsigned?ln:vn;if(this.eq(En))return t.isOdd()?En:vn;if(t.eq(En))return this.isOdd()?En:vn;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(hn)&&t.lt(hn))return rn(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,e=65535&this.low,u=t.high>>>16,o=65535&t.high,f=t.low>>>16,s=65535&t.low,c=0,a=0,h=0,v=0;return h+=(v+=e*s)>>>16,a+=(h+=i*s)>>>16,h&=65535,a+=(h+=e*f)>>>16,c+=(a+=r*s)>>>16,a&=65535,c+=(a+=i*f)>>>16,a&=65535,c+=(a+=e*o)>>>16,c+=n*s+r*f+i*o+e*u,en((h&=65535)<<16|(v&=65535),(c&=65535)<<16|(a&=65535),this.unsigned)},gn.mul=gn.multiply,gn.divide=function(t){if(Zt(t)||(t=fn(t)),t.isZero())throw I("division by zero");var n,r,i;if(Yt)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?en((this.unsigned?Yt.div_u:Yt.div_s)(this.low,this.high,t.low,t.high),Yt.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?ln:vn;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return ln;if(t.gt(this.shru(1)))return dn;i=ln}else{if(this.eq(En))return t.eq(_n)||t.eq(yn)?En:t.eq(En)?_n:(n=this.shr(1).div(t).shl(1)).eq(vn)?t.isNegative()?_n:yn:(r=this.sub(t.mul(n)),i=n.add(r.div(t)));if(t.eq(En))return this.unsigned?ln:vn;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();i=vn}for(r=this;r.gte(t);){n=R.max(1,R.floor(r.toNumber()/t.toNumber()));for(var e=R.ceil(R.log(n)/R.LN2),u=e<=48?1:un(2,e-48),o=rn(n),f=o.mul(t);f.isNegative()||f.gt(r);)f=(o=rn(n-=u,this.unsigned)).mul(t);o.isZero()&&(o=_n),i=i.add(o),r=r.sub(f)}return i},gn.div=gn.divide,gn.modulo=function(t){return Zt(t)||(t=fn(t)),Yt?en((this.unsigned?Yt.rem_u:Yt.rem_s)(this.low,this.high,t.low,t.high),Yt.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},gn.mod=gn.modulo,gn.rem=gn.modulo,gn.not=function(){return en(~this.low,~this.high,this.unsigned)},gn.countLeadingZeros=function(){return this.high?R.clz32(this.high):R.clz32(this.low)+32},gn.clz=gn.countLeadingZeros,gn.countTrailingZeros=function(){return this.low?Jt(this.low):Jt(this.high)+32},gn.ctz=gn.countTrailingZeros,gn.and=function(t){return Zt(t)||(t=fn(t)),en(this.low&t.low,this.high&t.high,this.unsigned)},gn.or=function(t){return Zt(t)||(t=fn(t)),en(this.low|t.low,this.high|t.high,this.unsigned)},gn.xor=function(t){return Zt(t)||(t=fn(t)),en(this.low^t.low,this.high^t.high,this.unsigned)},gn.shiftLeft=function(t){return Zt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?en(this.low<>>32-t,this.unsigned):en(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):en(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},gn.shr=gn.shiftRight,gn.shiftRightUnsigned=function(t){return Zt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?en(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):en(32===t?this.high:this.high>>>t-32,0,this.unsigned)},gn.shru=gn.shiftRightUnsigned,gn.shr_u=gn.shiftRightUnsigned,gn.rotateLeft=function(t){var n;return Zt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?en(this.high,this.low,this.unsigned):t<32?(n=32-t,en(this.low<>>n,this.high<>>n,this.unsigned)):(n=32-(t-=32),en(this.high<>>n,this.low<>>n,this.unsigned))},gn.rotl=gn.rotateLeft,gn.rotateRight=function(t){var n;return Zt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?en(this.high,this.low,this.unsigned):t<32?(n=32-t,en(this.high<>>t,this.low<>>t,this.unsigned)):(n=32-(t-=32),en(this.low<>>t,this.high<>>t,this.unsigned))},gn.rotr=gn.rotateRight,gn.toSigned=function(){return this.unsigned?en(this.low,this.high,!1):this},gn.toUnsigned=function(){return this.unsigned?this:en(this.low,this.high,!0)},gn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},gn.toBytesLE=function(){var t=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},gn.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,n>>>24,n>>>16&255,n>>>8&255,255&n]},$t.fromBytes=function(t,n,r){return r?$t.fromBytesLE(t,n):$t.fromBytesBE(t,n)},$t.fromBytesLE=function(t,n){return new $t(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},$t.fromBytesBE=function(t,n){return new $t(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},"function"==typeof BigInt&&($t.fromBigInt=function(t,n){return en(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),n)},$t.fromValue=function(t,n){return"bigint"===(void 0===t?"undefined":m(t))?$t.fromBigInt(t,n):fn(t,n)},gn.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<=2*pn},vt(t,[{key:"rp",get:function(){return void 0===this.hp&&(this.hp=this.op()),this.hp}},{key:"ap",get:function(){return Nt.Fv?"android":Nt.Dv?"macos":Nt.ru?"ios":Nt.Bv?"windows":"other"}},{key:"cp",get:function(){return Nt.og?"tv":Nt.Ks?"mobile":"desktop"}},{key:"dp",get:function(){return!Nt.og}},{key:"lp",get:function(){if(a.screen)return{width:a.screen.width*this.fp,height:a.screen.height*this.fp}}},{key:"fp",get:function(){return a.devicePixelRatio||1}},{key:"vp",get:function(){return Tn}},{key:"_p",get:function(){return!1}},{key:"gp",get:function(){return!0}},{key:"pp",get:function(){return!!(Nt.X_||Nt.ru||Nt.g_)||!!Nt.D_}},{key:"mp",get:function(){return Nt.D_}},{key:"wp",get:function(){return!Nt.ru}},{key:"yp",get:function(){return!0}},{key:"bp",get:function(){return!0}},{key:"Ap",get:function(){return!1}},{key:"Sp",get:function(){}},{key:"Tp",get:function(){return!0}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){return Nt.D_}},{key:"xp",get:function(){return!1}},{key:"Cp",get:function(){return!1}},{key:"Rp",get:function(){return!1}},{key:"Dp",get:function(){return!0}}]),t}(),bn=function(t){function n(){return t.call(this)||this}return at(n,t),n}(kn),mn=function(t){function n(){return t.apply(this,arguments)||this}return at(n,t),n.prototype.Pp=function(t,n){if(t&&t.Bp&&n&&n.Bp){var r=Nn(t.Bp,"mp4a.40.2")&&Nn(n.Bp,"mp4a.40.5"),i=Nn(t.Bp,"mp4a.40.5")&&Nn(n.Bp,"mp4a.40.2"),e=Nn(t.Bp,"mp4a.40.2")&&Nn(n.Bp,"mp4a.40.34"),u=Nn(t.Bp,"mp4a.40.34")&&Nn(n.Bp,"mp4a.40.2"),o=Nn(t.Bp,"mp4a.40.5")&&Nn(n.Bp,"mp4a.40.34"),f=Nn(t.Bp,"mp4a.40.34")&&Nn(n.Bp,"mp4a.40.5");return!(r||i||e||u||o||f)}return!0},vt(n,[{key:"Sp",get:function(){if(Nt.Dv)return 4096}}]),n}(bn);function Nn(t,n){return t.indexOf(n)>-1}var An,Cn=function(t){function n(){return t.apply(this,arguments)||this}return at(n,t),n.prototype.Ip=function(t){return t>=2},n}(bn),Dn=function(t){function n(){var n;return(n=t.call(this)||this).Np=Nt.Q_>=11,n.sp=Nt.X_&&!(Nt.ru&&Nt.Q_<10),n}return at(n,t),vt(n,[{key:"xp",get:function(){return Nt.Q_<17}},{key:"Cp",get:function(){return!0}}]),n}(bn),Pn=function(t){function n(){return t.apply(this,arguments)||this}return at(n,t),vt(n,[{key:"Tp",get:function(){return!(Nt.d_>=133)}}]),n}(bn);var Fn=function(){var t=zt();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Nt.Kv)return!1;var t=zt();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var Ln=function(t){function n(n){var r;return(r=t.call(this)||this).Mp=void 0,r.Mp=n,r.Np=r.Mp.Np,r.Ke=r.Mp.Ke,r.sp=Fn&&r.Mp.sp,r}at(n,t);var r=n.prototype;return r.op=function(){return this.Mp.rp},r.Pp=function(t,n){return this.Mp.Pp(t,n)},r.Ip=function(t){return this.Mp.Ip(t)},vt(n,[{key:"Sp",get:function(){return this.Mp.Sp}},{key:"Tp",get:function(){return this.Mp.Tp}},{key:"xp",get:function(){return this.Mp.xp}}]),n}(kn),Bn=function(t){function n(n){var r;return(r=t.call(this,n)||this).Np=!0,r.Ks=!0,r}return at(n,t),vt(n,[{key:"Ap",get:function(){return Nt.ru}}]),n}(Ln);var Mn=function(t){function n(){return t.apply(this,arguments)||this}return at(n,t),n.prototype.op=function(){return function(t){return t&&Pt(a.ManagedMediaSource)?a.ManagedMediaSource:Pt(a.MediaSource)?a.MediaSource:void 0}(!0)?t.prototype.op.call(this):1},vt(n,[{key:"Ap",get:function(){return!0}}]),n}(Bn),Un=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Up=void 0,n}return at(n,t),n.prototype.Pp=function(n,r){return t.prototype.Pp.call(this,n,r)},vt(n,[{key:"_p",get:function(){return Nt.b_<3}},{key:"gp",get:function(){return Nt.b_>=3}},{key:"lp",get:function(){var t=this;return a.tizen&&!this.Up&&a.tizen.systeminfo.getPropertyValue("DISPLAY",function(n){var r=n.resolutionWidth,i=n.resolutionHeight;1===r&&1===i||(t.Up={width:r,height:i})}),this.Up}},{key:"kp",get:function(){return Nt.b_<3}}]),n}(Ln),Vn=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Up=void 0,n}return at(n,t),vt(n,[{key:"lp",get:function(){var t=this;return a.webOS&&!this.Up&&a.webOS.deviceInfo(function(n){t.Up={width:n.screenWidth,height:n.screenHeight}}),this.Up}},{key:"yp",get:function(){return!1}}]),n}(Ln),Hn=function(t){function n(){return t.apply(this,arguments)||this}return at(n,t),vt(n,[{key:"Ap",get:function(){return!0}},{key:"Cp",get:function(){return this.Mp.Cp}}]),n}(Ln),Wn=function(t){function n(){return t.apply(this,arguments)||this}return at(n,t),vt(n,[{key:"Rp",get:function(){return Nt.IS_FIRETV_AFTMM}}]),n}(Ln);!function(t){An=t}(function(){var t=function(){if(Nt.W_)return new mn;if(Nt.B_||Nt.L_)return new Cn;if(Nt.X_)return new Dn;if(Nt.Rg)return new Pn;return new bn}();return Nt.ru?new Mn(t):Nt.I_?new Wn(t):Nt.Ks?new Bn(t):Nt.w_?new Un(t):Nt.S_?new Vn(t):Nt.Dv?new Hn(t):new Ln(t)}());var xn=!(Nt.L_&&!Nt.F_),Gn=self.console;function jn(t){if(Dt(t))try{return JSON.stringify(t)}catch(t){}return t}function Kn(t){return t.map(jn).join(" ")}function qn(t){var n=Gn&&Gn[t];return n?n.bind&&xn?n.bind(Gn):function(){for(var n=arguments.length,r=new Array(n),i=0;i1?n-1:0),i=1;i1?n-1:0),i=1;ic&&(u=c),o>c&&(o=c),f=e,s=u;;)if(f=65&&t<=90}function lr(t){return vr(t)||function(t){return t>=97&&t<=122}(t)}function _r(t){return t>=48&&t<=57}function dr(t){return _r(t)||lr(t)}function yr(t){return _r(t)||t>=65&&t<=70||t>=97&&t<=102}function wr(t){return vr(t)?t+32:t}function Ir(t){return _r(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Er(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var gr=R.min,Rr=String.fromCharCode;function pr(t){for(var n=t.length,r=[],i=0;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},br=R.floor,mr=String.fromCharCode;function Nr(t){throw new RangeError(kr[t])}function Ar(t){for(var n=[],r=0,i=t.length;r=55296&&e<=56319&&r>1,t+=br(t/n);t>455;i+=36)t=br(t/35);return br(i+36*t/(t+38))},Br=function(t){return function(t,n){var r=t.split("@"),i="";r.length>1&&(i=r[0]+"@",t=r[1]);var e=function(t,n){for(var r=[],i=t.length;i--;)r[i]=n(t[i]);return r}((t=t.replace(Tr,".")).split("."),n).join(".");return i+e}(t,function(t){return Or.test(t)?"xn--"+function(t){for(var n=[],r=(t=Ar(t)).length,i=128,e=0,u=72,o=0,f=t;o=i&&_br((Sr-e)/d)&&Nr("overflow"),e+=(h-i)*d,i=h;for(var y=0,w=t;ySr&&Nr("overflow"),I==i){for(var E=e,g=36;;g+=36){var R=g<=u?1:g>=u+26?26:g-u;if(E65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i)}return pr(n)}function Ur(t){if(t>=55296&&t<=57343)throw new I("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Vr(t,n){return t>>n&63|128}function Hr(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(Vr(t,12)),n.push(Vr(t,6))):(Ur(t),n.push(t>>12&15|224),n.push(Vr(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function Wr(t){for(var n=[],r=0;r=Dr)throw new I("Invalid byte index");var t=255&Cr[Pr];if(Pr++,128==(192&t))return 63&t;throw new I("Invalid continuation byte")}function Gr(){var t,n;if(Pr>Dr)throw new I("Invalid byte index");if(Pr===Dr)return!1;if(t=255&Cr[Pr],Pr++,!(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|xr())>=128)return n;throw new I("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|xr()<<6|xr())>=2048)return Ur(n),n;throw new I("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|xr()<<12|xr()<<6|xr())>=65536&&n<=1114111)return n;throw new I("Invalid UTF-8 detected")}function jr(t){return[37,Er(t>>4),Er(15&t)]}function Kr(t){return function(t){return t>=0&&t<=31}(t)||t>126}function qr(t){return Kr(t)||32===t||34===t||60===t||62===t||96===t}function zr(t){return qr(t)||35===t||63===t||123===t||125===t}function Xr(t){return zr(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Yr(t){return t<33||t>126||34===t||35===t||60===t||62===t}function $r(t){return Yr(t)||39===t}function Zr(t,n){if(!n(t))return[t];for(var r=Wr([t]),i=[],e=0;e6)throw new E;for(var s=0;u0){if(!("."===t[u]&&s<4))throw new E;u+=1}if(!nr.test(t[u]))throw new E;for(;u255)throw new E}u+=1}r[i]=r[i]<<8|c,2!==(s+=1)&&4!==s||(i+=1)}if(4!==s)throw new E;break}if(":"===t[u]){if((u+=1)===n)throw new E}else if(u0;)hr(r,i,e+h-1),i-=1,h-=1}else if(8!==i)throw new E;return r}function ri(t){var n=10,r=er;return ir.test(t)?(t=t.slice(2),n=16,r=ur):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,r=or),""===t?0:r.test(t)?p(t,n):void 0}var ii={Vp:4},ei=/[\0\t\n\r #%/:?@\[\\\]]/,ui=/[\0\t\n\r #/:?@\[\\\]]/;function oi(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new E("Invalid IPv6 address");return{Vp:2,Hp:ni(t.slice(1,-1))}}if(!n)return function(t){if(ui.test(t))throw new E("Invalid code point in opaque host");var n=Jr(t,Kr);return""===n?ii:{Vp:3,Wp:n}}(t);var r=function(t){var n=function(t){return Br(t.toLowerCase())}(t);return n}(ti(t));if(ei.test(r))throw new E("Invalid code point in host");var i=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var r=[],i=0;i255)throw new E;if(r[r.length-1]>=R.pow(256,5-r.length))throw new E;for(var f=r.pop(),s=0;s>>=8;return n.reverse().join("")}(t.Hp);case 2:return"["+function(t){for(var n="",r=function(t){for(var n=0,r=0,i=0,e=0,u=0;u<8;u++)0===t[u]?(0===e&&(i=u),e++):(e>r&&(n=i,r=e),e=0);return e>r&&(n=i,r=e),r>1?n:null}(t),i=!1,e=0;e<8;e++){if(i){if(0===t[e])continue;i=!1}r!==e?(n+=t[e].toString(16),7!==e&&(n+=":")):(n+=0===e?"::":":",i=!0)}return n}(t.Hp)+"]";case 3:return t.Wp;case 4:return""}}var si=/\+/g;function ci(t){return 42===t||45===t||46===t||95===t||dr(t)}function ai(t){for(var n=t.split("&"),r=[],i=0;i0&&(n+="&"),n+=vi(Wr(Ar(i[0])))+"="+vi(Wr(Ar(i[1])))}return n}function vi(t){for(var n=[],r=0;r0&&"?"===t[0]&&(t=t.slice(1)),this.zp=ai(t)}var n=t.prototype;return n.append=function(t,n){t=_i(t),n=_i(n),this.zp.push([t,n]),Ri(this)},n.delete=function(t){t=_i(t);for(var n=this.zp,r=0;r=2))return!1;if(!Vi(t.slice(0,2)))return!1;if(2!==n){var r=t[2];if(47!==r&&92!==r&&63!==r&&35!==r)return!1}return!0}function Ui(t){return 2===t.length&&tr.test(t[0])&&(":"===t[1]||"|"===t[1])}function Vi(t){return 2===t.length&&Ui(pr(t))}function Hi(t){return Ui(t)&&":"===t[1]}function Wi(t){var n=t.Jp;0!==n.length&&("file"===t.Qp&&1===n.length&&Hi(n[0])||n.pop())}function xi(t){return null===t.Zp||ii===t.Zp||t.$p||"file"===t.Qp}var Gi=-1,ji=/\t|\n|\r/g,Ki=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function qi(t,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null),r||(r=new Xi,t=t.replace(Ki,""));var e=null!==i?i:0;n=n||null;for(var u=[],o=!1,f=!1,s=!1,c=Ar(t=t.replace(ji,"")),a=c.length,h=0;h<=a;){var v=h65535)throw new E("Invalid port");r.im=g===Ni[r.Qp]?null:g,u.length=0}if(null!==i)return;e=16,h-=1}break;case 13:r.Qp="file",47===v||92===v?e=14:n&&"file"===n.Qp?Gi===v?(r.Zp=n.Zp,r.Jp=n.Jp.slice(),r.Gp=n.Gp):63===v?(r.Zp=n.Zp,r.Jp=n.Jp.slice(),r.Gp="",e=19):35===v?(r.Zp=n.Zp,r.Jp=n.Jp.slice(),r.Gp=n.Gp,r.nm="",e=20):(Mi(c.slice(h))||(r.Zp=n.Zp,r.Jp=n.Jp.slice(),Wi(r)),e=17,h-=1):(e=17,h-=1);break;case 14:47===v||92===v?e=15:(n&&"file"===n.Qp&&!Mi(c.slice(h))&&(Hi(n.Jp[0])?r.Jp.push(n.Jp[0]):r.Zp=n.Zp),e=17,h-=1);break;case 15:if(Gi===v||47===v||92===v||63===v||35===v)if(h-=1,null===i&&Vi(u))e=17;else if(0===u.length){if(r.Zp=ii,null!==i)return;e=16}else{var R=oi(Mr(u),Li(r));if(0===R.Vp&&"localhost"===R.qp&&(R=ii),r.Zp=R,null!==i)return;u.length=0,e=16}else u.push(v);break;case 16:Li(r)?(e=17,47!==v&&92!==v&&(h-=1)):null===i&&63===v?(r.Gp="",e=19):null===i&&35===v?(r.nm="",e=20):Gi!==v&&(e=17,47!==v&&(h-=1));break;case 17:if(Gi===v||47===v||Li(r)&&92===v||null===i&&(63===v||35===v)){var S=Mr(u);if(Pi(S)?(Wi(r),47===v||Li(r)&&92===v||r.Jp.push("")):!Di(S)||47===v||Li(r)&&92===v?Di(S)||("file"===r.Qp&&0===r.Jp.length&&Vi(u)&&(ii!==r.Zp&&null!==r.Zp&&(r.Zp=ii),u[1]=58,S=Mr(u)),r.Jp.push(S)):r.Jp.push(""),u.length=0,"file"===r.Qp&&(Gi===v||63===v||35===v))for(;r.Jp.length>1&&""===r.Jp[0];)r.Jp.shift();63===v?(r.Gp="",e=19):35===v&&(r.nm="",e=20)}else u.push.apply(u,Zr(v,zr));break;case 18:63===v?(r.Gp="",e=19):35===v?(r.nm="",e=20):Gi!==v&&(r.Jp[0]+=Mr(Zr(v,Kr)));break;case 19:null===i&&35===v?(r.nm="",e=20):Gi!==v&&(r.Gp+=Mr(Zr(v,Li(r)?$r:Yr)));break;case 20:Gi===v||0===v||(r.nm+=Mr(Zr(v,qr)))}h++}return r}function zi(t,n,r,i){try{qi(t,n,r,i)}catch(t){}}var Xi=function(){this.Qp="",this.Kp="",this.Yp="",this.Zp=null,this.im=null,this.Jp=[],this.Gp=null,this.nm=null,this.$p=!1};function Yi(t){switch(t.Qp){case"blob":var n;try{n=qi(t.Jp[0],null)}catch(t){return mi}return Yi(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,r){return t+"://"+fi(n)+(null===r?"":":"+r)}(t.Qp,t.Zp,t.im);default:return mi}}var $i=function(){function t(t,n){var r,i=null;if(null!=n)if(function(t){return null!=t&&t instanceof $i&&"object"==typeof t.rc}(n))i=n.rc;else try{i=qi(String(n),null)}catch(t){throw new E("Invalid base URL: "+t.message)}try{r=qi(String(t),i)}catch(t){throw new E("Invalid URL: "+t.message)}var e=r.Gp;this.rc=r,this.Gp=function(t){var n=new pi;return null!==t&&gi(n,t),n}(e),this.Gp.rc=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,r){n&&Zn(t.prototype,n),r&&Zn(t,r)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var r=t.Qp+":";if(null!==t.Zp?(r+="//",Bi(t)&&(r+=t.Kp,""!==t.Yp&&(r+=":"+t.Yp),r+="@"),r+=fi(t.Zp),null!==t.im&&(r+=":"+t.im)):null===t.Zp&&"file"===t.Qp&&(r+="//"),t.$p)r+=t.Jp[0];else for(var i=0,e=t.Jp;i1?n-1:0),i=1;i>>=0,be().subarray(t/1,t/1+n)}var Ne=void 0!==Ee?new Ee("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:function(){throw I("TextDecoder not available")}};function Ae(t,n){return t>>>=0,Ne.decode(be().subarray(t,t+n))}void 0!==Ee&&Ne.decode();var Ce=0;function De(t,n){var r=n(1*t.length,1)>>>0;return be().set(t,r/1),Ce=t.length,r}var Pe=null;function Fe(){return(null===Pe||Pe.buffer.detached||Pe.buffer!==we.memory.buffer)&&(Pe=new DataView(we.memory.buffer)),Pe}var Le=void 0!==Ie?new Ie("utf-8"):{encode:function(){throw I("TextEncoder not available")}},Be="function"==typeof Le.encodeInto?function(t,n){return Le.encodeInto(t,n)}:function(t,n){var r=Le.encode(t);return n.set(r),{read:t.length,written:r.length}};function Me(t){try{var n=we.__wbindgen_add_to_stack_pointer(-16);we.mpegts_to_fmp4(n,Te(t));var r=Fe().getInt32(n+0,!0),i=Fe().getInt32(n+4,!0);if(Fe().getInt32(n+8,!0))throw Oe(i);return Oe(r)}finally{we.__wbindgen_add_to_stack_pointer(16)}}function Ue(t){try{var n=we.__wbindgen_add_to_stack_pointer(-16);we.raw_audio_to_fmp4(n,Te(t));var r=Fe().getInt32(n+0,!0),i=Fe().getInt32(n+4,!0);if(Fe().getInt32(n+8,!0))throw Oe(i);return Oe(r)}finally{we.__wbindgen_add_to_stack_pointer(16)}}function Ve(t,n){return Mt(function(){var r,i,e;return Ut(this,function(u){switch(u.label){case 0:if("function"!=typeof Response||!b(t,Response))return[3,7];if("function"!=typeof WebAssembly.instantiateStreaming)return[3,4];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,WebAssembly.instantiateStreaming(t,n)];case 2:return[2,u.sent()];case 3:if(r=u.sent(),"application/wasm"==t.headers.get("Content-Type"))throw r;return console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r),[3,4];case 4:return[4,t.arrayBuffer()];case 5:return i=u.sent(),[4,WebAssembly.instantiate(i,n)];case 6:return[2,u.sent()];case 7:return[4,WebAssembly.instantiate(t,n)];case 8:return b(e=u.sent(),WebAssembly.Instance)?[2,{instance:e,module:t}]:[2,e];case 9:return[2]}})})()}function He(){var t={wbg:{}};return t.wbg.__wbg_audiopid_cf63a2881fb603de=function(t){var n=Re(t).audio_pid;return pe(n)?16777215:n},t.wbg.__wbg_createoutput_f81a086f372d422e=function(t,n){var r=function(t,n){return{data:t,metadata:n}}(Oe(t),Oe(n));return Te(r)},t.wbg.__wbg_createoutputdata_f9352c5065ea01aa=function(t,n,r,i,e,u,o,f){var s,c,a,h;0!==t&&(s=me(t,n).slice(),we.__wbindgen_export_0(t,1*n,1)),0!==r&&(c=me(r,i).slice(),we.__wbindgen_export_0(r,1*i,1)),0!==e&&(a=me(e,u).slice(),we.__wbindgen_export_0(e,1*u,1)),0!==o&&(h=me(o,f).slice(),we.__wbindgen_export_0(o,1*f,1));var v=function(t,n,r,i){return{video_init:t,audio_init:n,video_media:r,audio_media:i}}(s,c,a,h);return Te(v)},t.wbg.__wbg_createoutputmetadata_79a74f7d3aafd2c5=function(t,n,r,i,e,u,o,f,s,c,a,h,v,l,_,d){var y,w,I,E;0!==r&&(y=Ae(r,i).slice(),we.__wbindgen_export_0(r,1*i,1)),0!==e&&(w=Ae(e,u).slice(),we.__wbindgen_export_0(e,1*u,1)),0!==o&&(I=me(o,f).slice(),we.__wbindgen_export_0(o,1*f,1)),0!==s&&(E=me(s,c).slice(),we.__wbindgen_export_0(s,1*c,1));var g=function(t,n,r,i,e,u,o,f,s,c,a){return{video_pid:t,audio_pid:n,video_codec:r,audio_codec:i,sps_nal:e,pps_nal:u,first_decode_timestamp:o,first_presentation_timestamp:f,first_video_presentation_timestamp:s,program_map_table_pid:c,video_frame_rate:a}}(16777215===t?void 0:t,16777215===n?void 0:n,y,w,I,E,Oe(a),Oe(h),Oe(v),16777215===l?void 0:l,0===_?void 0:d);return Te(g)},t.wbg.__wbg_createtimestampwithbase_9f3b56a7f281a060=function(t,n,r){var i=function(t,n,r){return{low:t,high:n,base:r}}(t>>>0,n>>>0,r>>>0);return Te(i)},t.wbg.__wbg_data_0dfa593a0aa2e64c=function(t,n){var r=De(Re(n).data,we.__wbindgen_export_1),i=Ce;Fe().setInt32(t+4,i,!0),Fe().setInt32(t+0,r,!0)},t.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,n){var r,i;try{r=t,i=n,console.error(Ae(t,n))}finally{we.__wbindgen_export_0(r,i,1)}},t.wbg.__wbg_metadata_262906c02690f219=function(t){var n=Re(t).metadata;return pe(n)?0:Te(n)},t.wbg.__wbg_new_8a6f238a6ece86ea=function(){return Te(new I)},t.wbg.__wbg_ppsnal_24d7d831a1284b13=function(t,n){var r=Re(n).pps_nal,i=pe(r)?0:De(r,we.__wbindgen_export_1),e=Ce;Fe().setInt32(t+4,e,!0),Fe().setInt32(t+0,i,!0)},t.wbg.__wbg_programmaptablepid_2bf8112d9d4d8cb1=function(t){var n=Re(t).program_map_table_pid;return pe(n)?16777215:n},t.wbg.__wbg_spsnal_b5454d39031feeca=function(t,n){var r=Re(n).sps_nal,i=pe(r)?0:De(r,we.__wbindgen_export_1),e=Ce;Fe().setInt32(t+4,e,!0),Fe().setInt32(t+0,i,!0)},t.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,n){var r=function(t,n,r){if(void 0===r){var i=Le.encode(t),e=n(i.length,1)>>>0;return be().subarray(e,e+i.length).set(i),Ce=i.length,e}for(var u=t.length,o=n(u,1)>>>0,f=be(),s=0;s127)break;f[o+s]=c}if(s!==u){0!==s&&(t=t.slice(s)),o=r(o,u,u=s+3*t.length,1)>>>0;var a=be().subarray(o+s,o+u);o=r(o,u,s+=Be(t,a).written,1)>>>0}return Ce=s,o}(Re(n).stack,we.__wbindgen_export_1,we.__wbindgen_export_2),i=Ce;Fe().setInt32(t+4,i,!0),Fe().setInt32(t+0,r,!0)},t.wbg.__wbg_videopid_60d3be6c566fc051=function(t){var n=Re(t).video_pid;return pe(n)?16777215:n},t.wbg.__wbindgen_object_drop_ref=function(t){Oe(t)},t.wbg.__wbindgen_string_new=function(t,n){return Te(Ae(t,n))},t}function We(t,n){return we=t.exports,xe.__wbindgen_wasm_module=n,Pe=null,ke=null,we.__wbindgen_start(),we}function xe(t){return Mt(function(){var n,r,i,e;return Ut(this,function(u){switch(u.label){case 0:return void 0!==we?[2,we]:(void 0!==t&&(g.getPrototypeOf(t)===g.prototype?t=t.module_or_path:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===t&&(t=new URL("theomux_bg.wasm",void 0)),n=He(),("string"==typeof t||"function"==typeof Request&&b(t,Request)||"function"==typeof URL&&b(t,URL))&&(t=fetch(t)),[4,t]);case 1:return[4,Ve.apply(void 0,[u.sent(),n])];case 2:return r=u.sent(),i=r.instance,e=r.module,[2,We(i,e)]}})})()}function Ge(t){return Mt(function(){var n,r;return Ut(this,function(i){switch(i.label){case 0:return b(t,WebAssembly.Module)?n=t:(r="string"==typeof t?new URL(t):t,n="http:"===r.protocol||"https:"===r.protocol?fetch(r.href):function(t){return new nt(function(n,r){var i=new k;i.onload=function(){n(i.response||new ArrayBuffer(0))},i.onerror=function(){r(new E('Failed to fetch "'+t+'", status '+i.status))},i.open("GET",t,!0),i.responseType="arraybuffer",i.send()})}(r.href)),[4,xe({module_or_path:n})];case 1:return i.sent(),[2,{mpegts_to_fmp4:Me,raw_audio_to_fmp4:Ue}]}})})()}var je=new URL("./THEOplayer.transmux.wasm",v.href);!function(t){var n,r=nt.resolve(t()).then(function(t){n=t,r=void 0,self.postMessage({RQt:"10.3.0"})},function(t){var n=t,r={success:!1,error:n.message,errorCode:b(n,ye)?n.code:_e.MEDIA_DECODE_ERROR};self.postMessage(r)});self.addEventListener("message",function(t){var i=t.data.id;(function(t){return Mt(function(){var i,e,u,o,f,s;return Ut(this,function(c){switch(c.label){case 0:return void 0===r?[3,2]:[4,r];case 1:c.sent(),c.label=2;case 2:if(u=t.id,t.type===le.MPEGTS_TO_FMP4)o=n.mpegts_to_fmp4(t.input);else{if(t.type!==le.RAW_AUDIO_TO_FMP4)throw new I("Unknown request type: "+t.type);o=n.raw_audio_to_fmp4(t.input)}return f={success:!0,requestId:u,output:o},s=[null==(i=t.input.metadata)?void 0:i.sps_nal,null==(e=t.input.metadata)?void 0:e.pps_nal,t.input.data,o.data.video_init,o.data.audio_init,o.data.video_media,o.data.audio_media].filter(Ct).map(function(t){return t.buffer}),self.postMessage(f,s),[2]}})})()})(t.data).catch(function(t){var n=t,r={success:!1,requestId:i,error:n.message,errorCode:b(n,ye)?n.code:_e.MEDIA_DECODE_ERROR};self.postMessage(r)})})}(function(){return Ge(je)})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this); //# sourceMappingURL=THEOplayer.transmux.js.map \ No newline at end of file diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.transmux.wasm b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.transmux.wasm index f222e9ee..60f070e8 100644 Binary files a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.transmux.wasm and b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/THEOplayer.transmux.wasm differ diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/theoplayer.d.js b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/theoplayer.d.js index 73e16be8..81613ef5 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/theoplayer.d.js +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/example/web/theoplayer.d.js @@ -25,8 +25,8 @@ THEOplayer is based on patented technology developed by THEO Technologies (https://www.theoplayer.com). - Version: 10.0.0 - Created: 2025-09-12T12:50:32.290Z + Version: 10.3.0 + Created: 2025-10-23T15:33:11.023Z */ -!function(t){"use strict";var n,i,r,e,u,o,s,f,h,c=t.window,a=t.document,v=(t.location,t.navigator),l=t.setTimeout,d=t.clearTimeout,y=t.setInterval,_=t.clearInterval,w=t.Error,g=t.TypeError,k=(t.SyntaxError,t.Object),p=t.Math,S=t.parseInt,I=t.parseFloat,b=t.isNaN,m=t.Uint8Array;t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest;function A(t,i){return null!=i&&void 0!==n&&i[n.hasInstance]?!!i[n.hasInstance](t):t instanceof i}function E(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=null!=(o=Symbol.for)?o:Symbol,r=Symbol.iterator,e=null!=(s=Symbol.dispose)?s:i("Symbol.dispose"),u=null!=(f=Symbol.asyncDispose)?f:i("Symbol.asyncDispose")):(h=0,n=function(t){return"hd"+t+"_"+ ++h},r=(i=function(t){return"hd"+t})("Symbol.iterator"),e=i("Symbol.dispose"),u=i("Symbol.asyncDispose"),n.for=i,n.iterator=r,n.dispose=e,n.asyncDispose=u);var O=l;function R(t){return Boolean(t&&void 0!==t.length)}function D(){}function T(t){if(!A(this,T))throw new g("Promises must be constructed via new");if("function"!=typeof t)throw new g("not a function");this.Ra=0,this.ttn=!1,this.lTt=void 0,this.ntn=[],W(t,this)}function F(t,n){for(;3===t.Ra;)t=t.lTt;0!==t.Ra?(t.ttn=!0,T.itn(function(){var i=1===t.Ra?n.onFulfilled:n.onRejected;if(null!==i){var r;try{r=i(t.lTt)}catch(t){return void B(n.promise,t)}N(n.promise,r)}else(1===t.Ra?N:B)(n.promise,t.lTt)})):t.ntn.push(n)}function N(t,n){try{if(n===t)throw new g("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":E(n))||"function"==typeof n)){var i=n.then;if(A(n,T))return t.Ra=3,t.lTt=n,void P(t);if("function"==typeof i)return void W(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.Ra=1,t.lTt=n,P(t)}catch(n){B(t,n)}}function B(t,n){t.Ra=2,t.lTt=n,P(t)}function P(t){2===t.Ra&&0===t.ntn.length&&T.itn(function(){t.ttn||T.rtn(t.lTt)});for(var n=0,i=t.ntn.length;nt.length)&&(n=t.length);for(var i=0,r=new Array(n);i=t.length?{done:!0}:{done:!1,value:t[u++]}}}throw new g("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}M&&!(H&&L<60||U&&z<15)?Q=M:(Q=T,et=null!==(J=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=M;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==J?J:T.itn,tt=et,nt=new G(16),it=!1,(ut={M6:function(t){nt.push(t),it||(it=!0,tt(rt))},AQ:rt=function(){for(;nt.length()>0;)nt.shift()();it=!1}}).AQ,T.itn=ut.M6,T.rtn=function(t){try{var n=ot(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}l(function(){throw new w("Unhandled promise rejection: ".concat(t))},0)});var lt=function(t){return t.Sv="web",t.Tv="android",t.Ev="android-tv",t.Pv="ios",t.xv="tvos",t.Iv="chromecast",t.Rv="theoliveweb",t}({});var dt=v?v.userAgent:"",yt=dt.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),_t=dt.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),wt=dt.match(/Android ([0-9\.]+)/i),gt=dt.match(/Windows NT ([0-9\.]+)/i),kt=dt.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),pt=dt.match(/Firefox\/([0-9\.]+)/i),St=dt.match(/OPR\/(\d+\.\d+)/i),It=dt.match(/Tizen ([0-9\.]+)/i),bt=dt.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),mt=dt.match(/HbbTV\/([0-9.]+)/i),At=dt.match(/(AFT.*) Build/i),Et=function(){function t(){this.Cv=Boolean("ontouchstart"in self||self.DocumentTouch&&A(a,self.DocumentTouch)||v&&v.msMaxTouchPoints),this.Bv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(dt)||/(macintosh|mac(?=_powerpc)\s)/i.test(dt),this.Mv=/Windows NT/i.test(dt),this.Ov=gt?I(gt[1]):0,this.Uv=/Android/i.test(dt),this.Hv=wt?I(wt[1]):0,this.qv=/windows phone (8|8\.1)/i.test(dt),this.Gv=/iPhone/i.test(dt),this.Qv=/iPad/i.test(dt),this.Yv=this.Bv&&this.Cv&&!this.Qv,this.Zv=/iPod/i.test(dt),this.r_=/Mobile Safari/i.test(dt),this.s_=/EOS\d*STB/i.test(dt),this.n_=/APP\d*STB/i.test(dt),this.$v=(this.Gv||this.Qv||this.Yv||this.Zv)&&!this.qv,this.i_=bt?I(bt[2]):0,this.h_=this.qv||this.$v||this.Uv||this.r_,this.a_=/CriOS/i.test(dt),this.c_=Boolean(self.chrome&&/google/i.test(v.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(v.userAgent),this.p_=_t?S(_t[1],10):0,this.Bg=Boolean(/CriOS/i.test(dt)),this.Dg=Boolean(self.chrome||/Chrome/i.test(dt)||this.Bg),this.f_=yt?S(yt[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(dt),this.b_=It?I(It[1]):0,this.l_=this.b_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.b_):void 0,this.T_=/webos|web0s/i.test(dt),this.E_=/HbbTV/i.test(dt),this.x_=!!mt&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(mt[1]),this.R_=/AFT.* Build/i.test(dt),this.C_=At?At[1]:void 0,this.B_=/VIZIO/i.test(dt),this.M_=/Edge\/\d+/i.test(dt),this.O_=/Trident/i.test(dt),this.U_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.H_=/Vivaldi/i.test(dt),this.q_=/Firefox/i.test(dt)&&!/Seamonkey/i.test(dt),this.G_=pt?I(pt[1]):0,this.j_=/Safari/i.test(dt)&&!/Chrome/i.test(dt)&&!this.qv&&!this.y_,this.K_=kt?I(kt[2]):0,this.J_=Boolean(St),this.eg=St?I(St[1]):0,this.hg=/CrKey/.test(dt),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(dt),this.fg=/PlayStation 4/i.test(dt),this._g=/PlayStation 5/i.test(dt),this.pg="web"===lt.Ev,this.yg="web"===lt.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===lt.Pv,this.xg="web"===lt.xv,this.Rg="web"===lt.Iv}return ct(t,[{key:"Ke",get:function(){return this.Cv}},{key:"Dv",get:function(){return this.Bv}},{key:"Nv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Ov}},{key:"Fv",get:function(){return this.Uv}},{key:"Vv",get:function(){return this.Hv}},{key:"Wv",get:function(){return this.qv}},{key:"zv",get:function(){return this.Gv}},{key:"Xv",get:function(){return this.Qv}},{key:"Kv",get:function(){return this.Yv}},{key:"Jv",get:function(){return this.Zv}},{key:"ru",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"e_",get:function(){return this.s_||this.n_}},{key:"vd",get:function(){return this.r_}},{key:"Ks",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"d_",get:function(){var t;return null!=(t=this.l_)?t:this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){var t;return(null==(t=c.chrome)?void 0:t.webview)&&this.p_>0}},{key:"m_",get:function(){return this.p_}},{key:"w_",get:function(){return this.y_}},{key:"A_",get:function(){return this.b_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"P_",get:function(){return this.x_}},{key:"I_",get:function(){return this.R_}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.C_}},{key:"D_",get:function(){return this.B_}},{key:"N_",get:function(){return this.M_}},{key:"L_",get:function(){return this.O_}},{key:"F_",get:function(){return this.U_}},{key:"V_",get:function(){return this.H_}},{key:"W_",get:function(){return this.q_}},{key:"z_",get:function(){return this.G_}},{key:"X_",get:function(){return this.j_}},{key:"Q_",get:function(){return 0===this.K_&&Ot.ru?this.i_:this.K_}},{key:"Y_",get:function(){return this.J_}},{key:"Z_",get:function(){return this.eg}},{key:"rg",get:function(){return this.hg}},{key:"og",get:function(){return this.ag}},{key:"cg",get:function(){return!(!this.S_&&!this.w_)&&this.d_<=56}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"Pg",get:function(){return this.xg}},{key:"Ig",get:function(){return this.Rg}},{key:"Cg",get:function(){return this.Dg}},{key:"IS_IOS_CHROME",get:function(){return this.Bg}}]),t}();Et.Ng=new Et;var Ot=Et.Ng,Rt={}.toString;function Dt(t){return null!=t}Array.isArray;function Tt(t){return"object"===(void 0===t?"undefined":E(t))&&null!==t}function Ft(t){return function(t){return"function"==typeof t}(t)||Tt(t)}var Nt=function(){};function Bt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}p.pow(2,-52),Array.prototype.find,Array.prototype.findLast;var Pt="function"==typeof Array.prototype.findIndex?function(t,n){return t.findIndex(n)}:function(t,n){for(var i=0;i=0;i-=1){if(n(t[i],i,t))return i}return-1};Array.prototype.at;function Wt(t,n){var i=t.indexOf(n);return-1!==i&&(Mt(t,i),!0)}function Mt(t,n){0===n?t.shift():t.splice(n,1)}function Vt(t){t.length=0}Array.prototype.flat,Array.prototype.flatMap;var jt=function(){function t(){this.Hg=!1,this.Wg=!1,this.qg=[],this.Gg=[]}var n=t.prototype;return n.Vg=function(){if(!this.Hg&&!this.Wg){this.Hg=!0;for(var t,n=vt(this.qg.slice());!(t=n()).done;){(0,t.value)()}this.zg()}},n.zg=function(){if(!this.Wg){this.Wg=!0;for(var t,n=vt(this.Gg.slice());!(t=n()).done;){(0,t.value)()}Vt(this.qg),Vt(this.Gg)}},n.Xg=function(t){this.Wg||this.qg.push(t)},n.jg=function(t){this.Wg||Wt(this.qg,t)},n.Qg=function(t){this.Wg||this.Gg.push(t)},n.Kg=function(t){this.Wg||Wt(this.Gg,t)},t}(),Ht=function(){function t(){this.Jg=new jt}var n=t.prototype;return n.Zg=function(){this.Jg.Vg()},n.zg=function(){this.Jg.zg()},n.$g=function(t){var n=this.Jg;if(!n.Hg)if(t.Hg)n.Vg();else if(!n.Wg&&!t.Wg){var i=function(){r(),n.Vg()},r=function(){t.jg(i),t.Kg(r),n.jg(i),n.Kg(r)};t.Xg(i),t.Qg(r),n.Xg(i),n.Qg(r)}},n.tp=function(){var n=new t,i=new t,r=n.Yg,e=i.Yg,u=this.Jg,o=function(){r.Hg&&e.Wg||e.Hg&&r.Wg?u.Vg():r.Wg&&e.Wg&&u.zg()};r.Xg(o),e.Xg(o),r.Qg(o),e.Qg(o),n.$g(u),i.$g(u);return u.Qg(function(){r.jg(o),e.jg(o),r.Kg(o),e.Kg(o)}),[n,i]},n[e]=function(){this.Zg()},t.ep=function(n){for(var i,r=new t,e=vt(n);!(i=e()).done;){var u=i.value;void 0!==u&&r.$g(u)}return r},ct(t,[{key:"Yg",get:function(){return this.Jg}}]),t}(),Lt=function(){for(var t=arguments.length,n=new Array(t),i=0;i>>=0)&&t<256)&&(r=Zt[t])?r:(i=Qt(t,0,!0),e&&(Zt[t]=i),i):(e=-128<=(t|=0)&&t<128)&&(r=$t[t])?r:(i=Qt(t,t<0?-1:0,!1),e&&($t[t]=i),i)}function Jt(t,n){if(b(t))return n?hn:fn;if(n){if(t<0)return hn;if(t>=un)return dn}else{if(t<=-on)return yn;if(t+1>=on)return ln}return t<0?Jt(-t,n).neg():Qt(t%en|0,t/en|0,n)}function Qt(t,n,i){return new Kt(t,n,i)}Kt.fromInt=Yt,Kt.fromNumber=Jt,Kt.fromBits=Qt;var tn=p.pow;function nn(t,n,i){if(0===t.length)throw w("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?hn:fn;if((i=i||10)<2||360)throw w("interior hyphen");if(0===r)return nn(t.substring(1),n,i).neg();for(var e=Jt(tn(i,8)),u=fn,o=0;o>>0:this.low},_n.toNumber=function(){return this.unsigned?(this.high>>>0)*en+(this.low>>>0):this.high*en+(this.low>>>0)},_n.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((u=s).isZero())return f+o;for(;f.length<6;)f="0"+f;o=""+f+o}},_n.getHighBits=function(){return this.high},_n.getHighBitsUnsigned=function(){return this.high>>>0},_n.getLowBits=function(){return this.low},_n.getLowBitsUnsigned=function(){return this.low>>>0},_n.getNumBitsAbs=function(){if(this.isNegative())return this.eq(yn)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&!(t&1<>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},_n.isZero=function(){return 0===this.high&&0===this.low},_n.eqz=_n.isZero,_n.isNegative=function(){return!this.unsigned&&this.high<0},_n.isPositive=function(){return this.unsigned||this.high>=0},_n.isOdd=function(){return!(1&~this.low)},_n.isEven=function(){return!(1&this.low)},_n.equals=function(t){return Xt(t)||(t=rn(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},_n.eq=_n.equals,_n.notEquals=function(t){return!this.eq(t)},_n.neq=_n.notEquals,_n.ne=_n.notEquals,_n.lessThan=function(t){return this.comp(t)<0},_n.lt=_n.lessThan,_n.lessThanOrEqual=function(t){return this.comp(t)<=0},_n.lte=_n.lessThanOrEqual,_n.le=_n.lessThanOrEqual,_n.greaterThan=function(t){return this.comp(t)>0},_n.gt=_n.greaterThan,_n.greaterThanOrEqual=function(t){return this.comp(t)>=0},_n.gte=_n.greaterThanOrEqual,_n.ge=_n.greaterThanOrEqual,_n.compare=function(t){if(Xt(t)||(t=rn(t)),this.eq(t))return 0;var n=this.isNegative(),i=t.isNegative();return n&&!i?-1:!n&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},_n.comp=_n.compare,_n.negate=function(){return!this.unsigned&&this.eq(yn)?yn:this.not().add(cn)},_n.neg=_n.negate,_n.add=function(t){Xt(t)||(t=rn(t));var n=this.high>>>16,i=65535&this.high,r=this.low>>>16,e=65535&this.low,u=t.high>>>16,o=65535&t.high,s=t.low>>>16,f=0,h=0,c=0,a=0;return c+=(a+=e+(65535&t.low))>>>16,h+=(c+=r+s)>>>16,f+=(h+=i+o)>>>16,f+=n+u,Qt((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},_n.subtract=function(t){return Xt(t)||(t=rn(t)),this.add(t.neg())},_n.sub=_n.subtract,_n.multiply=function(t){if(this.isZero())return this;if(Xt(t)||(t=rn(t)),Gt)return Qt(Gt.mul(this.low,this.high,t.low,t.high),Gt.get_high(),this.unsigned);if(t.isZero())return this.unsigned?hn:fn;if(this.eq(yn))return t.isOdd()?yn:fn;if(t.eq(yn))return this.isOdd()?yn:fn;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(sn)&&t.lt(sn))return Jt(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,r=this.low>>>16,e=65535&this.low,u=t.high>>>16,o=65535&t.high,s=t.low>>>16,f=65535&t.low,h=0,c=0,a=0,v=0;return a+=(v+=e*f)>>>16,c+=(a+=r*f)>>>16,a&=65535,c+=(a+=e*s)>>>16,h+=(c+=i*f)>>>16,c&=65535,h+=(c+=r*s)>>>16,c&=65535,h+=(c+=e*o)>>>16,h+=n*f+i*s+r*o+e*u,Qt((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},_n.mul=_n.multiply,_n.divide=function(t){if(Xt(t)||(t=rn(t)),t.isZero())throw w("division by zero");var n,i,r;if(Gt)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?Qt((this.unsigned?Gt.div_u:Gt.div_s)(this.low,this.high,t.low,t.high),Gt.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?hn:fn;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return hn;if(t.gt(this.shru(1)))return an;r=hn}else{if(this.eq(yn))return t.eq(cn)||t.eq(vn)?yn:t.eq(yn)?cn:(n=this.shr(1).div(t).shl(1)).eq(fn)?t.isNegative()?cn:vn:(i=this.sub(t.mul(n)),r=n.add(i.div(t)));if(t.eq(yn))return this.unsigned?hn:fn;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();r=fn}for(i=this;i.gte(t);){n=p.max(1,p.floor(i.toNumber()/t.toNumber()));for(var e=p.ceil(p.log(n)/p.LN2),u=e<=48?1:tn(2,e-48),o=Jt(n),s=o.mul(t);s.isNegative()||s.gt(i);)s=(o=Jt(n-=u,this.unsigned)).mul(t);o.isZero()&&(o=cn),r=r.add(o),i=i.sub(s)}return r},_n.div=_n.divide,_n.modulo=function(t){return Xt(t)||(t=rn(t)),Gt?Qt((this.unsigned?Gt.rem_u:Gt.rem_s)(this.low,this.high,t.low,t.high),Gt.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},_n.mod=_n.modulo,_n.rem=_n.modulo,_n.not=function(){return Qt(~this.low,~this.high,this.unsigned)},_n.countLeadingZeros=function(){return this.high?p.clz32(this.high):p.clz32(this.low)+32},_n.clz=_n.countLeadingZeros,_n.countTrailingZeros=function(){return this.low?qt(this.low):qt(this.high)+32},_n.ctz=_n.countTrailingZeros,_n.and=function(t){return Xt(t)||(t=rn(t)),Qt(this.low&t.low,this.high&t.high,this.unsigned)},_n.or=function(t){return Xt(t)||(t=rn(t)),Qt(this.low|t.low,this.high|t.high,this.unsigned)},_n.xor=function(t){return Xt(t)||(t=rn(t)),Qt(this.low^t.low,this.high^t.high,this.unsigned)},_n.shiftLeft=function(t){return Xt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qt(this.low<>>32-t,this.unsigned):Qt(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):Qt(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},_n.shr=_n.shiftRight,_n.shiftRightUnsigned=function(t){return Xt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qt(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Qt(32===t?this.high:this.high>>>t-32,0,this.unsigned)},_n.shru=_n.shiftRightUnsigned,_n.shr_u=_n.shiftRightUnsigned,_n.rotateLeft=function(t){var n;return Xt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Qt(this.high,this.low,this.unsigned):t<32?(n=32-t,Qt(this.low<>>n,this.high<>>n,this.unsigned)):(n=32-(t-=32),Qt(this.high<>>n,this.low<>>n,this.unsigned))},_n.rotl=_n.rotateLeft,_n.rotateRight=function(t){var n;return Xt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Qt(this.high,this.low,this.unsigned):t<32?(n=32-t,Qt(this.high<>>t,this.low<>>t,this.unsigned)):(n=32-(t-=32),Qt(this.low<>>t,this.high<>>t,this.unsigned))},_n.rotr=_n.rotateRight,_n.toSigned=function(){return this.unsigned?Qt(this.low,this.high,!1):this},_n.toUnsigned=function(){return this.unsigned?this:Qt(this.low,this.high,!0)},_n.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},_n.toBytesLE=function(){var t=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},_n.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,n>>>24,n>>>16&255,n>>>8&255,255&n]},Kt.fromBytes=function(t,n,i){return i?Kt.fromBytesLE(t,n):Kt.fromBytesBE(t,n)},Kt.fromBytesLE=function(t,n){return new Kt(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Kt.fromBytesBE=function(t,n){return new Kt(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},"function"==typeof BigInt&&(Kt.fromBigInt=function(t,n){return Qt(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),n)},Kt.fromValue=function(t,n){return"bigint"===(void 0===t?"undefined":E(t))?Kt.fromBigInt(t,n):rn(t,n)},_n.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<=2*gn},ct(t,[{key:"rp",get:function(){return void 0===this.hp&&(this.hp=this.op()),this.hp}},{key:"ap",get:function(){return Ot.Fv?"android":Ot.Dv?"macos":Ot.ru?"ios":Ot.Nv?"windows":"other"}},{key:"cp",get:function(){return Ot.og?"tv":Ot.Ks?"mobile":"desktop"}},{key:"dp",get:function(){return!Ot.og}},{key:"lp",get:function(){if(c.screen)return{width:c.screen.width,height:c.screen.height}}},{key:"fp",get:function(){return c.devicePixelRatio||1}},{key:"vp",get:function(){return Sn}},{key:"_p",get:function(){return!1}},{key:"gp",get:function(){return!0}},{key:"pp",get:function(){return!!(Ot.X_||Ot.ru||Ot.g_)||!!Ot.D_}},{key:"mp",get:function(){return Ot.D_}},{key:"wp",get:function(){return!Ot.ru}},{key:"yp",get:function(){return!0}},{key:"Ap",get:function(){return!0}},{key:"bp",get:function(){return!1}},{key:"Sp",get:function(){}},{key:"Tp",get:function(){return!0}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){return Ot.D_}},{key:"Pp",get:function(){return!1}},{key:"Rp",get:function(){return!1}},{key:"Cp",get:function(){return!1}},{key:"Dp",get:function(){return!1}}]),t}(),bn=function(t){function n(){return t.call(this)||this}return ft(n,t),n}(In),mn=function(t){function n(){return t.apply(this,arguments)||this}return ft(n,t),n.prototype.xp=function(t,n){if(t&&t.Np&&n&&n.Np){var i=An(t.Np,"mp4a.40.2")&&An(n.Np,"mp4a.40.5"),r=An(t.Np,"mp4a.40.5")&&An(n.Np,"mp4a.40.2"),e=An(t.Np,"mp4a.40.2")&&An(n.Np,"mp4a.40.34"),u=An(t.Np,"mp4a.40.34")&&An(n.Np,"mp4a.40.2"),o=An(t.Np,"mp4a.40.5")&&An(n.Np,"mp4a.40.34"),s=An(t.Np,"mp4a.40.34")&&An(n.Np,"mp4a.40.5");return!(i||r||e||u||o||s)}return!0},ct(n,[{key:"Sp",get:function(){if(Ot.Dv)return 4096}},{key:"Dp",get:function(){return!0}}]),n}(bn);function An(t,n){return t.indexOf(n)>-1}var En,On=function(t){function n(){return t.apply(this,arguments)||this}return ft(n,t),n.prototype.Ip=function(t){return t>=2},n}(bn),Rn=function(t){function n(){var n;return(n=t.call(this)||this).Bp=Ot.Q_>=11,n.sp=Ot.X_&&!(Ot.ru&&Ot.Q_<10),n}return ft(n,t),ct(n,[{key:"Pp",get:function(){return Ot.Q_<17}},{key:"Rp",get:function(){return!0}}]),n}(bn),Dn=function(t){function n(){return t.apply(this,arguments)||this}return ft(n,t),ct(n,[{key:"Tp",get:function(){return!Ot.Nv||(Ot.v_?92!==Ot.m_:Ot.d_>=100)}}]),n}(bn);var Tn=function(){var t=Ut();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Ot.Kv)return!1;var t=Ut();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var Fn=function(t){function n(n){var i;return(i=t.call(this)||this).Mp=void 0,i.Mp=n,i.Bp=i.Mp.Bp,i.Ke=i.Mp.Ke,i.sp=Tn&&i.Mp.sp,i}ft(n,t);var i=n.prototype;return i.op=function(){return this.Mp.rp},i.xp=function(t,n){return this.Mp.xp(t,n)},i.Ip=function(t){return this.Mp.Ip(t)},ct(n,[{key:"Sp",get:function(){return this.Mp.Sp}},{key:"Tp",get:function(){return this.Mp.Tp}},{key:"Pp",get:function(){return this.Mp.Pp}},{key:"Dp",get:function(){return this.Mp.Dp}}]),n}(In),Nn=function(t){function n(n){var i;return(i=t.call(this,n)||this).Bp=!0,i.Ks=!0,i}return ft(n,t),ct(n,[{key:"bp",get:function(){return Ot.ru}}]),n}(Fn);var Bn=function(t){function n(){return t.apply(this,arguments)||this}return ft(n,t),n.prototype.op=function(){return function(t){return t&&Ft(c.ManagedMediaSource)?c.ManagedMediaSource:Ft(c.MediaSource)?c.MediaSource:void 0}(!0)?t.prototype.op.call(this):1},ct(n,[{key:"bp",get:function(){return!0}}]),n}(Nn),Pn=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Up=void 0,n}return ft(n,t),n.prototype.xp=function(n,i){return t.prototype.xp.call(this,n,i)},ct(n,[{key:"_p",get:function(){return Ot.A_<3}},{key:"gp",get:function(){return Ot.A_>=3}},{key:"lp",get:function(){var t=this;return c.tizen&&!this.Up&&c.tizen.systeminfo.getPropertyValue("DISPLAY",function(n){var i=n.resolutionWidth,r=n.resolutionHeight;1===i&&1===r||(t.Up={width:i,height:r})}),this.Up}},{key:"kp",get:function(){return Ot.A_<3}}]),n}(Fn),Cn=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Up=void 0,n}return ft(n,t),ct(n,[{key:"lp",get:function(){var t=this;return c.webOS&&!this.Up&&c.webOS.deviceInfo(function(n){t.Up={width:n.screenWidth,height:n.screenHeight}}),this.Up}},{key:"yp",get:function(){return!1}}]),n}(Fn),Wn=function(t){function n(){return t.apply(this,arguments)||this}return ft(n,t),ct(n,[{key:"bp",get:function(){return!0}},{key:"Rp",get:function(){return this.Mp.Rp}}]),n}(Fn),Mn=function(t){function n(){return t.apply(this,arguments)||this}return ft(n,t),ct(n,[{key:"Cp",get:function(){return Ot.IS_FIRETV_AFTMM}}]),n}(Fn);!function(t){En=t}(function(){var t=function(){if(Ot.W_)return new mn;if(Ot.N_||Ot.L_)return new On;if(Ot.X_)return new Rn;if(Ot.u_)return new Dn;return new bn}();return Ot.ru?new Bn(t):Ot.I_?new Mn(t):Ot.Ks?new Nn(t):Ot.w_?new Pn(t):Ot.S_?new Cn(t):Ot.Dv?new Wn(t):new Fn(t)}());var Vn=!(Ot.L_&&!Ot.F_),jn=self.console;function Hn(t){if(Tt(t))try{return JSON.stringify(t)}catch(t){}return t}function Ln(t){return t.map(Hn).join(" ")}function xn(t){var n=jn&&jn[t];return n?n.bind&&Vn?n.bind(jn):function(){for(var n=arguments.length,i=new Array(n),r=0;r1?n-1:0),r=1;r1?n-1:0),r=1;rh&&(u=h),o>h&&(o=h),s=e,f=u;;)if(s=65&&t<=90}function hi(t){return fi(t)||function(t){return t>=97&&t<=122}(t)}function ci(t){return t>=48&&t<=57}function ai(t){return ci(t)||hi(t)}function vi(t){return ci(t)||t>=65&&t<=70||t>=97&&t<=102}function li(t){return fi(t)?t+32:t}function di(t){return ci(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function yi(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var _i=p.min,wi=String.fromCharCode;function gi(t){for(var n=t.length,i=[],r=0;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},bi=p.floor,mi=String.fromCharCode;function Ai(t){throw new RangeError(Ii[t])}function Ei(t){for(var n=[],i=0,r=t.length;i=55296&&e<=56319&&i>1,t+=bi(t/n);t>455;r+=36)t=bi(t/35);return bi(r+36*t/(t+38))},Ni=function(t){return function(t,n){var i=t.split("@"),r="";i.length>1&&(r=i[0]+"@",t=i[1]);var e=function(t,n){for(var i=[],r=t.length;r--;)i[r]=n(t[r]);return i}((t=t.replace(Si,".")).split("."),n).join(".");return r+e}(t,function(t){return pi.test(t)?"xn--"+function(t){for(var n=[],i=(t=Ei(t)).length,r=128,e=0,u=72,o=0,s=t;o=r&&dbi((ki-e)/y)&&Ai("overflow"),e+=(a-r)*y,r=a;for(var _=0,w=t;_ki&&Ai("overflow"),g==r){for(var k=e,p=36;;p+=36){var S=p<=u?1:p>=u+26?26:p-u;if(k65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r)}return gi(n)}function Pi(t){if(t>=55296&&t<=57343)throw new w("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Ci(t,n){return t>>n&63|128}function Wi(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(Ci(t,12)),n.push(Ci(t,6))):(Pi(t),n.push(t>>12&15|224),n.push(Ci(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function Mi(t){for(var n=[],i=0;i=Ri)throw new w("Invalid byte index");var t=255&Oi[Di];if(Di++,128==(192&t))return 63&t;throw new w("Invalid continuation byte")}function ji(){var t,n;if(Di>Ri)throw new w("Invalid byte index");if(Di===Ri)return!1;if(t=255&Oi[Di],Di++,!(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Vi())>=128)return n;throw new w("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Vi()<<6|Vi())>=2048)return Pi(n),n;throw new w("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Vi()<<12|Vi()<<6|Vi())>=65536&&n<=1114111)return n;throw new w("Invalid UTF-8 detected")}function Hi(t){return[37,yi(t>>4),yi(15&t)]}function Li(t){return function(t){return t>=0&&t<=31}(t)||t>126}function xi(t){return Li(t)||32===t||34===t||60===t||62===t||96===t}function Ui(t){return xi(t)||35===t||63===t||123===t||125===t}function zi(t){return Ui(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Gi(t){return t<33||t>126||34===t||35===t||60===t||62===t}function Ki(t){return Gi(t)||39===t}function Xi(t,n){if(!n(t))return[t];for(var i=Mi([t]),r=[],e=0;e6)throw new g;for(var f=0;u0){if(!("."===t[u]&&f<4))throw new g;u+=1}if(!Yn.test(t[u]))throw new g;for(;u255)throw new g}u+=1}i[r]=i[r]<<8|h,2!==(f+=1)&&4!==f||(r+=1)}if(4!==f)throw new g;break}if(":"===t[u]){if((u+=1)===n)throw new g}else if(u0;)si(i,r,e+a-1),r-=1,a-=1}else if(8!==r)throw new g;return i}function Ji(t){var n=10,i=ti;return Qn.test(t)?(t=t.slice(2),n=16,i=ni):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=ii),""===t?0:i.test(t)?S(t,n):void 0}var Qi={Vp:4},tr=/[\0\t\n\r #%/:?@\[\\\]]/,nr=/[\0\t\n\r #/:?@\[\\\]]/;function ir(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new g("Invalid IPv6 address");return{Vp:2,Hp:Yi(t.slice(1,-1))}}if(!n)return function(t){if(nr.test(t))throw new g("Invalid code point in opaque host");var n=qi(t,Li);return""===n?Qi:{Vp:3,Wp:n}}(t);var i=function(t){var n=function(t){return Ni(t.toLowerCase())}(t);return n}(Zi(t));if(tr.test(i))throw new g("Invalid code point in host");var r=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var i=[],r=0;r255)throw new g;if(i[i.length-1]>=p.pow(256,5-i.length))throw new g;for(var s=i.pop(),f=0;f>>=8;return n.reverse().join("")}(t.Hp);case 2:return"["+function(t){for(var n="",i=function(t){for(var n=0,i=0,r=0,e=0,u=0;u<8;u++)0===t[u]?(0===e&&(r=u),e++):(e>i&&(n=r,i=e),e=0);return e>i&&(n=r,i=e),i>1?n:null}(t),r=!1,e=0;e<8;e++){if(r){if(0===t[e])continue;r=!1}i!==e?(n+=t[e].toString(16),7!==e&&(n+=":")):(n+=0===e?"::":":",r=!0)}return n}(t.Hp)+"]";case 3:return t.Wp;case 4:return""}}var er=/\+/g;function ur(t){return 42===t||45===t||46===t||95===t||ai(t)}function or(t){for(var n=t.split("&"),i=[],r=0;r0&&(n+="&"),n+=fr(Mi(Ei(r[0])))+"="+fr(Mi(Ei(r[1])))}return n}function fr(t){for(var n=[],i=0;i0&&"?"===t[0]&&(t=t.slice(1)),this.zp=or(t)}var n=t.prototype;return n.append=function(t,n){t=cr(t),n=cr(n),this.zp.push([t,n]),wr(this)},n.delete=function(t){t=cr(t);for(var n=this.zp,i=0;i=2))return!1;if(!Cr(t.slice(0,2)))return!1;if(2!==n){var i=t[2];if(47!==i&&92!==i&&63!==i&&35!==i)return!1}return!0}function Pr(t){return 2===t.length&&Zn.test(t[0])&&(":"===t[1]||"|"===t[1])}function Cr(t){return 2===t.length&&Pr(gi(t))}function Wr(t){return Pr(t)&&":"===t[1]}function Mr(t){var n=t.Jp;0!==n.length&&("file"===t.Qp&&1===n.length&&Wr(n[0])||n.pop())}function Vr(t){return null===t.Zp||Qi===t.Zp||t.$p||"file"===t.Qp}var jr=-1,Hr=/\t|\n|\r/g,Lr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function xr(t,n,i,r){void 0===i&&(i=null),void 0===r&&(r=null),i||(i=new zr,t=t.replace(Lr,""));var e=null!==r?r:0;n=n||null;for(var u=[],o=!1,s=!1,f=!1,h=Ei(t=t.replace(Hr,"")),c=h.length,a=0;a<=c;){var v=a65535)throw new g("Invalid port");i.im=p===Ar[i.Qp]?null:p,u.length=0}if(null!==r)return;e=16,a-=1}break;case 13:i.Qp="file",47===v||92===v?e=14:n&&"file"===n.Qp?jr===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp=n.Gp):63===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp="",e=19):35===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp=n.Gp,i.nm="",e=20):(Br(h.slice(a))||(i.Zp=n.Zp,i.Jp=n.Jp.slice(),Mr(i)),e=17,a-=1):(e=17,a-=1);break;case 14:47===v||92===v?e=15:(n&&"file"===n.Qp&&!Br(h.slice(a))&&(Wr(n.Jp[0])?i.Jp.push(n.Jp[0]):i.Zp=n.Zp),e=17,a-=1);break;case 15:if(jr===v||47===v||92===v||63===v||35===v)if(a-=1,null===r&&Cr(u))e=17;else if(0===u.length){if(i.Zp=Qi,null!==r)return;e=16}else{var I=ir(Bi(u),Fr(i));if(0===I.Vp&&"localhost"===I.qp&&(I=Qi),i.Zp=I,null!==r)return;u.length=0,e=16}else u.push(v);break;case 16:Fr(i)?(e=17,47!==v&&92!==v&&(a-=1)):null===r&&63===v?(i.Gp="",e=19):null===r&&35===v?(i.nm="",e=20):jr!==v&&(e=17,47!==v&&(a-=1));break;case 17:if(jr===v||47===v||Fr(i)&&92===v||null===r&&(63===v||35===v)){var b=Bi(u);if(Dr(b)?(Mr(i),47===v||Fr(i)&&92===v||i.Jp.push("")):!Rr(b)||47===v||Fr(i)&&92===v?Rr(b)||("file"===i.Qp&&0===i.Jp.length&&Cr(u)&&(Qi!==i.Zp&&null!==i.Zp&&(i.Zp=Qi),u[1]=58,b=Bi(u)),i.Jp.push(b)):i.Jp.push(""),u.length=0,"file"===i.Qp&&(jr===v||63===v||35===v))for(;i.Jp.length>1&&""===i.Jp[0];)i.Jp.shift();63===v?(i.Gp="",e=19):35===v&&(i.nm="",e=20)}else u.push.apply(u,Xi(v,Ui));break;case 18:63===v?(i.Gp="",e=19):35===v?(i.nm="",e=20):jr!==v&&(i.Jp[0]+=Bi(Xi(v,Li)));break;case 19:null===r&&35===v?(i.nm="",e=20):jr!==v&&(i.Gp+=Bi(Xi(v,Fr(i)?Ki:Gi)));break;case 20:jr===v||0===v||(i.nm+=Bi(Xi(v,xi)))}a++}return i}function Ur(t,n,i,r){try{xr(t,n,i,r)}catch(t){}}var zr=function(){this.Qp="",this.Kp="",this.Yp="",this.Zp=null,this.im=null,this.Jp=[],this.Gp=null,this.nm=null,this.$p=!1};function Gr(t){switch(t.Qp){case"blob":var n;try{n=xr(t.Jp[0],null)}catch(t){return mr}return Gr(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+rr(n)+(null===i?"":":"+i)}(t.Qp,t.Zp,t.im);default:return mr}}var Kr=function(){function t(t,n){var i,r=null;if(null!=n)if(function(t){return null!=t&&t instanceof Kr&&"object"==typeof t.rc}(n))r=n.rc;else try{r=xr(String(n),null)}catch(t){throw new g("Invalid base URL: "+t.message)}try{i=xr(String(t),r)}catch(t){throw new g("Invalid URL: "+t.message)}var e=i.Gp;this.rc=i,this.Gp=function(t){var n=new gr;return null!==t&&_r(n,t),n}(e),this.Gp.rc=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&Xn(t.prototype,n),i&&Xn(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.Qp+":";if(null!==t.Zp?(i+="//",Nr(t)&&(i+=t.Kp,""!==t.Yp&&(i+=":"+t.Yp),i+="@"),i+=rr(t.Zp),null!==t.im&&(i+=":"+t.im)):null===t.Zp&&"file"===t.Qp&&(i+="//"),t.$p)i+=t.Jp[0];else for(var r=0,e=t.Jp;r1?n-1:0),r=1;ri?r+=p.round(.1*r):r>>=1);)r+=r;return e}),ve=(String.prototype.padStart,String.prototype.padEnd,16384);String.fromCodePoint;function le(t,n){for(var i=[],r=0;r=16;)Wi(0|Ci[t],0|Ci[1|t],0|Ci[2|t],0|Ci[3|t],0|Ci[4|t],0|Ci[5|t],0|Ci[6|t],0|Ci[7|t],0|Ci[8|t],0|Ci[9|t],0|Ci[10|t],0|Ci[11|t],0|Ci[12|t],0|Ci[13|t],0|Ci[14|t],0|Ci[15|t]),r^=i,i=0|Ci[t],e^=k,k=0|Ci[1|t],u^=p,p=0|Ci[2|t],o^=S,S=0|Ci[3|t],s^=I,I=0|Ci[4|t],f^=b,b=0|Ci[5|t],h^=m,m=0|Ci[6|t],c^=A,A=0|Ci[7|t],a^=E,E=0|Ci[8|t],v^=O,O=0|Ci[9|t],l^=R,R=0|Ci[10|t],d^=D,D=0|Ci[11|t],y^=T,T=0|Ci[12|t],_^=F,F=0|Ci[13|t],w^=N,N=0|Ci[14|t],g^=B,B=0|Ci[15|t],Ci[t]=r,Ci[1|t]=e,Ci[2|t]=u,Ci[3|t]=o,Ci[4|t]=s,Ci[5|t]=f,Ci[6|t]=h,Ci[7|t]=c,Ci[8|t]=a,Ci[9|t]=v,Ci[10|t]=l,Ci[11|t]=d,Ci[12|t]=y,Ci[13|t]=_,Ci[14|t]=w,Ci[15|t]=g,t=t+16|0,n=n-16|0,P=P+16|0;return r=i,e=k,u=p,o=S,s=I,f=b,h=m,c=A,a=E,v=O,l=R,d=D,y=T,_=F,w=N,g=B,0|P}}}function pe(t){return new m(t).set(_e),ke({Uint8Array:m},0,t)}var Se=new m(1048576),Ie=function(){function t(t){this.SW=!0,this.HW=void 0,this.IV=void 0,this.Bft=we,this.UV=0,this.oj=null,this.fj=new he,this.kj=new he,this.uz=new he;var n=t.sz||4096;if(n<=0||n%4096)throw new ye("CAD1409","Invalid heap size");this.HW=t.HW||new m(n),this.IV=t.IV||pe(this.HW.buffer),this.hr(t)}var n=t.prototype;return n.hz=function(t){var n=t.az;this.oj=null,this.Bft=we,this.UV=0;var i=new m(16);return n&&(n.length>16&&(n=de(n,0,16)),i.set(n,16-n.length),this.IV.CC(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15])),this},n.dz=function(t){var n=new m(ge);if(t){0;var i=t.length>ge?de(t,0,ge):t;n.set(i,ge-i.length)}this.IV.PC(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15])},n.hr=function(t){this.hz(t);var n=t.SW;return this.SW=void 0===n||Boolean(n),this.dz(t.KLt),this},n.PG=function(t,n,i,r,e){var u=t.byteLength-n,o=u0;)s+=c=this.PG(e,o+s,t,n,i),n+=c,i-=c,c=r.UC(o,s-(u&&0===i&&s%ge===0?ge:0)),a.set(e.subarray(o,o+c),f),f+=c,c0&&(n.UC(e,u),o.set(i.subarray(e,e+u))),r&&(t=o[u-1],o=o.subarray(0,u-t)),this.oj=o.subarray(0,u),this.Bft=we,this.UV=0,this},n.gHt=function(t){var n=this.LG(t).oj,i=this.sq().oj,r=n.length+i.length,e=this.uz.AD(r);return e.set(n),i.length>0&&e.set(i,n.length),this.oj=e.subarray(0,r),this},t}(),be=new Ie({HW:Se,IV:pe(Se.buffer)});var me,Ae=self;function Ee(t,n){return void 0===me&&(me=function(){var t=new m(1);try{return Ae.postMessage(t,[t.buffer]),0===t.byteLength}catch(t){return!1}}()),n&&me?Ae.postMessage(t,n):Ae.postMessage(t)}var Oe=function(t){return t.nQt="gHt",t.rQt="WHt",t}({}),Re=function(t){return t.hQt="oQt",t.aQt="uQt",t}({}),De=self;function Te(t,n,i){De.postMessage({SQt:Re.aQt,bQt:t,kQt:(null==n?void 0:n.code)||i||"DAW0008",EQt:(null==n?void 0:n.message)||""})}var Fe,Ne=[];function Be(t){for(var n=0;nt.length)&&(n=t.length);for(var i=0,r=new Array(n);i=t.length?{done:!0}:{done:!1,value:t[u++]}}}throw new g("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}M&&!(H&&L<60||U&&z<15)?Q=M:(Q=T,et=null!==(J=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=M;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==J?J:T.nki,tt=et,nt=new G(16),it=!1,(ut={W6:function(t){nt.push(t),it||(it=!0,tt(rt))},EQ:rt=function(){for(;nt.length()>0;)nt.shift()();it=!1}}).EQ,T.nki=ut.W6,T.rki=function(t){try{var n=ot(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}l(function(){throw new w("Unhandled promise rejection: ".concat(t))},0)});var lt=function(t){return t.Sv="web",t.Tv="android",t.Ev="android-tv",t.xv="ios",t.Pv="tvos",t.Iv="chromecast",t.Cv="theoliveweb",t}({});var dt=v?v.userAgent:"",yt=dt.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),_t=dt.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),wt=dt.match(/Android ([0-9\.]+)/i),gt=dt.match(/Windows NT ([0-9\.]+)/i),pt=dt.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),kt=dt.match(/Firefox\/([0-9\.]+)/i),St=dt.match(/OPR\/(\d+\.\d+)/i),It=dt.match(/Tizen ([0-9\.]+)/i),bt=dt.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),mt=dt.match(/HbbTV\/([0-9.]+)/i),At=dt.match(/(AFT.*) Build/i),Et=function(){function t(){this.Rv=Boolean("ontouchstart"in self||self.DocumentTouch&&A(a,self.DocumentTouch)||v&&v.msMaxTouchPoints),this.Nv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(dt)||/(macintosh|mac(?=_powerpc)\s)/i.test(dt),this.Mv=/Windows NT/i.test(dt),this.Ov=gt?I(gt[1]):0,this.Uv=/Android/i.test(dt),this.Hv=wt?I(wt[1]):0,this.qv=/windows phone (8|8\.1)/i.test(dt),this.Gv=/iPhone/i.test(dt),this.Qv=/iPad/i.test(dt),this.Yv=this.Nv&&this.Rv&&!this.Qv,this.Zv=/iPod/i.test(dt),this.r_=/Mobile Safari/i.test(dt),this.s_=/EOS\d*STB/i.test(dt),this.n_=/APP\d*STB/i.test(dt),this.$v=(this.Gv||this.Qv||this.Yv||this.Zv)&&!this.qv,this.i_=bt?I(bt[2]):0,this.h_=this.qv||this.$v||this.Uv||this.r_,this.a_=/CriOS/i.test(dt),this.c_=Boolean(self.chrome&&/google/i.test(v.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(v.userAgent),this.p_=_t?S(_t[1],10):0,this.Ng=Boolean(/CriOS/i.test(dt)),this.Dg=Boolean(self.chrome||/Chrome/i.test(dt)||this.Ng),this.f_=yt?S(yt[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(dt),this.A_=It?I(It[1]):0,this.l_=this.A_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.A_):void 0,this.T_=/webos|web0s/i.test(dt),this.E_=/HbbTV/i.test(dt),this.P_=!!mt&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(mt[1]),this.C_=/AFT.* Build/i.test(dt),this.R_=At?At[1]:void 0,this.N_=/VIZIO/i.test(dt),this.M_=/Edge\/\d+/i.test(dt),this.O_=/Trident/i.test(dt),this.U_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.H_=/Vivaldi/i.test(dt),this.q_=/Firefox/i.test(dt)&&!/Seamonkey/i.test(dt),this.G_=kt?I(kt[1]):0,this.j_=/Safari/i.test(dt)&&!/Chrome/i.test(dt)&&!this.qv&&!this.y_,this.K_=pt?I(pt[2]):0,this.J_=Boolean(St),this.eg=St?I(St[1]):0,this.hg=/CrKey/.test(dt),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(dt),this.fg=/PlayStation 4/i.test(dt),this._g=/PlayStation 5/i.test(dt),this.pg="web"===lt.Ev,this.yg="web"===lt.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===lt.xv,this.Pg="web"===lt.Pv,this.Cg="web"===lt.Iv}return ct(t,[{key:"Ke",get:function(){return this.Rv}},{key:"Dv",get:function(){return this.Nv}},{key:"Bv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Ov}},{key:"Fv",get:function(){return this.Uv}},{key:"Vv",get:function(){return this.Hv}},{key:"Wv",get:function(){return this.qv}},{key:"zv",get:function(){return this.Gv}},{key:"Xv",get:function(){return this.Qv}},{key:"Kv",get:function(){return this.Yv}},{key:"Jv",get:function(){return this.Zv}},{key:"ru",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"e_",get:function(){return this.s_||this.n_}},{key:"vd",get:function(){return this.r_}},{key:"Ks",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"d_",get:function(){var t;return null!=(t=this.l_)?t:this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){var t;return(null==(t=c.chrome)?void 0:t.webview)&&this.p_>0}},{key:"m_",get:function(){return this.p_}},{key:"w_",get:function(){return this.y_}},{key:"b_",get:function(){return this.A_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"x_",get:function(){return this.P_}},{key:"I_",get:function(){return this.C_}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.R_}},{key:"D_",get:function(){return this.N_}},{key:"B_",get:function(){return this.M_}},{key:"L_",get:function(){return this.O_}},{key:"F_",get:function(){return this.U_}},{key:"V_",get:function(){return this.H_}},{key:"W_",get:function(){return this.q_}},{key:"z_",get:function(){return this.G_}},{key:"X_",get:function(){return this.j_}},{key:"Q_",get:function(){return 0===this.K_&&Ot.ru?this.i_:this.K_}},{key:"Y_",get:function(){return this.J_}},{key:"Z_",get:function(){return this.eg}},{key:"rg",get:function(){return this.hg}},{key:"og",get:function(){return this.ag}},{key:"cg",get:function(){return!(!this.S_&&!this.w_)&&this.d_<=56}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"xg",get:function(){return this.Pg}},{key:"Ig",get:function(){return this.Cg}},{key:"Rg",get:function(){return this.Dg}},{key:"IS_IOS_CHROME",get:function(){return this.Ng}}]),t}();Et.Bg=new Et;var Ot=Et.Bg,Rt={}.toString;function Dt(t){return null!=t}Array.isArray;function Tt(t){return"object"===(void 0===t?"undefined":E(t))&&null!==t}function Ft(t){return function(t){return"function"==typeof t}(t)||Tt(t)}var Nt=function(){};function Bt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}k.pow(2,-52),Array.prototype.find,Array.prototype.findLast;var Pt="function"==typeof Array.prototype.findIndex?function(t,n){return t.findIndex(n)}:function(t,n){for(var i=0;i=0;i-=1){if(n(t[i],i,t))return i}return-1};Array.prototype.at;function Wt(t,n){var i=t.indexOf(n);return-1!==i&&(Mt(t,i),!0)}function Mt(t,n){0===n?t.shift():t.splice(n,1)}function Vt(t){t.length=0}Array.prototype.flat,Array.prototype.flatMap;var jt=function(){function t(){this.Hg=!1,this.Wg=!1,this.qg=[],this.Gg=[]}var n=t.prototype;return n.Vg=function(){if(!this.Hg&&!this.Wg){this.Hg=!0;for(var t,n=vt(this.qg.slice());!(t=n()).done;){(0,t.value)()}this.zg()}},n.zg=function(){if(!this.Wg){this.Wg=!0;for(var t,n=vt(this.Gg.slice());!(t=n()).done;){(0,t.value)()}Vt(this.qg),Vt(this.Gg)}},n.Xg=function(t){this.Wg||this.qg.push(t)},n.jg=function(t){this.Wg||Wt(this.qg,t)},n.Qg=function(t){this.Wg||this.Gg.push(t)},n.Kg=function(t){this.Wg||Wt(this.Gg,t)},t}(),Ht=function(){function t(){this.Jg=new jt}var n=t.prototype;return n.Zg=function(){this.Jg.Vg()},n.zg=function(){this.Jg.zg()},n.$g=function(t){var n=this.Jg;if(!n.Hg)if(t.Hg)n.Vg();else if(!n.Wg&&!t.Wg){var i=function(){r(),n.Vg()},r=function(){t.jg(i),t.Kg(r),n.jg(i),n.Kg(r)};t.Xg(i),t.Qg(r),n.Xg(i),n.Qg(r)}},n.tp=function(){var n=new t,i=new t,r=n.Yg,e=i.Yg,u=this.Jg,o=function(){r.Hg&&e.Wg||e.Hg&&r.Wg?u.Vg():r.Wg&&e.Wg&&u.zg()};r.Xg(o),e.Xg(o),r.Qg(o),e.Qg(o),n.$g(u),i.$g(u);return u.Qg(function(){r.jg(o),e.jg(o),r.Kg(o),e.Kg(o)}),[n,i]},n[e]=function(){this.Zg()},t.ep=function(n){for(var i,r=new t,e=vt(n);!(i=e()).done;){var u=i.value;void 0!==u&&r.$g(u)}return r},ct(t,[{key:"Yg",get:function(){return this.Jg}}]),t}(),Lt=function(){for(var t=arguments.length,n=new Array(t),i=0;i>>=0)&&t<256)&&(r=Zt[t])?r:(i=Qt(t,0,!0),e&&(Zt[t]=i),i):(e=-128<=(t|=0)&&t<128)&&(r=$t[t])?r:(i=Qt(t,t<0?-1:0,!1),e&&($t[t]=i),i)}function Jt(t,n){if(b(t))return n?hn:sn;if(n){if(t<0)return hn;if(t>=un)return dn}else{if(t<=-on)return yn;if(t+1>=on)return ln}return t<0?Jt(-t,n).neg():Qt(t%en|0,t/en|0,n)}function Qt(t,n,i){return new Kt(t,n,i)}Kt.fromInt=Yt,Kt.fromNumber=Jt,Kt.fromBits=Qt;var tn=k.pow;function nn(t,n,i){if(0===t.length)throw w("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?hn:sn;if((i=i||10)<2||360)throw w("interior hyphen");if(0===r)return nn(t.substring(1),n,i).neg();for(var e=Jt(tn(i,8)),u=sn,o=0;o>>0:this.low},_n.toNumber=function(){return this.unsigned?(this.high>>>0)*en+(this.low>>>0):this.high*en+(this.low>>>0)},_n.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((u=f).isZero())return s+o;for(;s.length<6;)s="0"+s;o=""+s+o}},_n.getHighBits=function(){return this.high},_n.getHighBitsUnsigned=function(){return this.high>>>0},_n.getLowBits=function(){return this.low},_n.getLowBitsUnsigned=function(){return this.low>>>0},_n.getNumBitsAbs=function(){if(this.isNegative())return this.eq(yn)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&!(t&1<>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},_n.isZero=function(){return 0===this.high&&0===this.low},_n.eqz=_n.isZero,_n.isNegative=function(){return!this.unsigned&&this.high<0},_n.isPositive=function(){return this.unsigned||this.high>=0},_n.isOdd=function(){return!(1&~this.low)},_n.isEven=function(){return!(1&this.low)},_n.equals=function(t){return Xt(t)||(t=rn(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},_n.eq=_n.equals,_n.notEquals=function(t){return!this.eq(t)},_n.neq=_n.notEquals,_n.ne=_n.notEquals,_n.lessThan=function(t){return this.comp(t)<0},_n.lt=_n.lessThan,_n.lessThanOrEqual=function(t){return this.comp(t)<=0},_n.lte=_n.lessThanOrEqual,_n.le=_n.lessThanOrEqual,_n.greaterThan=function(t){return this.comp(t)>0},_n.gt=_n.greaterThan,_n.greaterThanOrEqual=function(t){return this.comp(t)>=0},_n.gte=_n.greaterThanOrEqual,_n.ge=_n.greaterThanOrEqual,_n.compare=function(t){if(Xt(t)||(t=rn(t)),this.eq(t))return 0;var n=this.isNegative(),i=t.isNegative();return n&&!i?-1:!n&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},_n.comp=_n.compare,_n.negate=function(){return!this.unsigned&&this.eq(yn)?yn:this.not().add(cn)},_n.neg=_n.negate,_n.add=function(t){Xt(t)||(t=rn(t));var n=this.high>>>16,i=65535&this.high,r=this.low>>>16,e=65535&this.low,u=t.high>>>16,o=65535&t.high,f=t.low>>>16,s=0,h=0,c=0,a=0;return c+=(a+=e+(65535&t.low))>>>16,h+=(c+=r+f)>>>16,s+=(h+=i+o)>>>16,s+=n+u,Qt((c&=65535)<<16|(a&=65535),(s&=65535)<<16|(h&=65535),this.unsigned)},_n.subtract=function(t){return Xt(t)||(t=rn(t)),this.add(t.neg())},_n.sub=_n.subtract,_n.multiply=function(t){if(this.isZero())return this;if(Xt(t)||(t=rn(t)),Gt)return Qt(Gt.mul(this.low,this.high,t.low,t.high),Gt.get_high(),this.unsigned);if(t.isZero())return this.unsigned?hn:sn;if(this.eq(yn))return t.isOdd()?yn:sn;if(t.eq(yn))return this.isOdd()?yn:sn;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(fn)&&t.lt(fn))return Jt(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,r=this.low>>>16,e=65535&this.low,u=t.high>>>16,o=65535&t.high,f=t.low>>>16,s=65535&t.low,h=0,c=0,a=0,v=0;return a+=(v+=e*s)>>>16,c+=(a+=r*s)>>>16,a&=65535,c+=(a+=e*f)>>>16,h+=(c+=i*s)>>>16,c&=65535,h+=(c+=r*f)>>>16,c&=65535,h+=(c+=e*o)>>>16,h+=n*s+i*f+r*o+e*u,Qt((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},_n.mul=_n.multiply,_n.divide=function(t){if(Xt(t)||(t=rn(t)),t.isZero())throw w("division by zero");var n,i,r;if(Gt)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?Qt((this.unsigned?Gt.div_u:Gt.div_s)(this.low,this.high,t.low,t.high),Gt.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?hn:sn;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return hn;if(t.gt(this.shru(1)))return an;r=hn}else{if(this.eq(yn))return t.eq(cn)||t.eq(vn)?yn:t.eq(yn)?cn:(n=this.shr(1).div(t).shl(1)).eq(sn)?t.isNegative()?cn:vn:(i=this.sub(t.mul(n)),r=n.add(i.div(t)));if(t.eq(yn))return this.unsigned?hn:sn;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();r=sn}for(i=this;i.gte(t);){n=k.max(1,k.floor(i.toNumber()/t.toNumber()));for(var e=k.ceil(k.log(n)/k.LN2),u=e<=48?1:tn(2,e-48),o=Jt(n),f=o.mul(t);f.isNegative()||f.gt(i);)f=(o=Jt(n-=u,this.unsigned)).mul(t);o.isZero()&&(o=cn),r=r.add(o),i=i.sub(f)}return r},_n.div=_n.divide,_n.modulo=function(t){return Xt(t)||(t=rn(t)),Gt?Qt((this.unsigned?Gt.rem_u:Gt.rem_s)(this.low,this.high,t.low,t.high),Gt.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},_n.mod=_n.modulo,_n.rem=_n.modulo,_n.not=function(){return Qt(~this.low,~this.high,this.unsigned)},_n.countLeadingZeros=function(){return this.high?k.clz32(this.high):k.clz32(this.low)+32},_n.clz=_n.countLeadingZeros,_n.countTrailingZeros=function(){return this.low?qt(this.low):qt(this.high)+32},_n.ctz=_n.countTrailingZeros,_n.and=function(t){return Xt(t)||(t=rn(t)),Qt(this.low&t.low,this.high&t.high,this.unsigned)},_n.or=function(t){return Xt(t)||(t=rn(t)),Qt(this.low|t.low,this.high|t.high,this.unsigned)},_n.xor=function(t){return Xt(t)||(t=rn(t)),Qt(this.low^t.low,this.high^t.high,this.unsigned)},_n.shiftLeft=function(t){return Xt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qt(this.low<>>32-t,this.unsigned):Qt(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):Qt(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},_n.shr=_n.shiftRight,_n.shiftRightUnsigned=function(t){return Xt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qt(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Qt(32===t?this.high:this.high>>>t-32,0,this.unsigned)},_n.shru=_n.shiftRightUnsigned,_n.shr_u=_n.shiftRightUnsigned,_n.rotateLeft=function(t){var n;return Xt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Qt(this.high,this.low,this.unsigned):t<32?(n=32-t,Qt(this.low<>>n,this.high<>>n,this.unsigned)):(n=32-(t-=32),Qt(this.high<>>n,this.low<>>n,this.unsigned))},_n.rotl=_n.rotateLeft,_n.rotateRight=function(t){var n;return Xt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Qt(this.high,this.low,this.unsigned):t<32?(n=32-t,Qt(this.high<>>t,this.low<>>t,this.unsigned)):(n=32-(t-=32),Qt(this.low<>>t,this.high<>>t,this.unsigned))},_n.rotr=_n.rotateRight,_n.toSigned=function(){return this.unsigned?Qt(this.low,this.high,!1):this},_n.toUnsigned=function(){return this.unsigned?this:Qt(this.low,this.high,!0)},_n.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},_n.toBytesLE=function(){var t=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},_n.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,n>>>24,n>>>16&255,n>>>8&255,255&n]},Kt.fromBytes=function(t,n,i){return i?Kt.fromBytesLE(t,n):Kt.fromBytesBE(t,n)},Kt.fromBytesLE=function(t,n){return new Kt(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Kt.fromBytesBE=function(t,n){return new Kt(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},"function"==typeof BigInt&&(Kt.fromBigInt=function(t,n){return Qt(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),n)},Kt.fromValue=function(t,n){return"bigint"===(void 0===t?"undefined":E(t))?Kt.fromBigInt(t,n):rn(t,n)},_n.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<=2*gn},ct(t,[{key:"rp",get:function(){return void 0===this.hp&&(this.hp=this.op()),this.hp}},{key:"ap",get:function(){return Ot.Fv?"android":Ot.Dv?"macos":Ot.ru?"ios":Ot.Bv?"windows":"other"}},{key:"cp",get:function(){return Ot.og?"tv":Ot.Ks?"mobile":"desktop"}},{key:"dp",get:function(){return!Ot.og}},{key:"lp",get:function(){if(c.screen)return{width:c.screen.width*this.fp,height:c.screen.height*this.fp}}},{key:"fp",get:function(){return c.devicePixelRatio||1}},{key:"vp",get:function(){return Sn}},{key:"_p",get:function(){return!1}},{key:"gp",get:function(){return!0}},{key:"pp",get:function(){return!!(Ot.X_||Ot.ru||Ot.g_)||!!Ot.D_}},{key:"mp",get:function(){return Ot.D_}},{key:"wp",get:function(){return!Ot.ru}},{key:"yp",get:function(){return!0}},{key:"bp",get:function(){return!0}},{key:"Ap",get:function(){return!1}},{key:"Sp",get:function(){}},{key:"Tp",get:function(){return!0}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){return Ot.D_}},{key:"xp",get:function(){return!1}},{key:"Cp",get:function(){return!1}},{key:"Rp",get:function(){return!1}},{key:"Dp",get:function(){return!0}}]),t}(),bn=function(t){function n(){return t.call(this)||this}return st(n,t),n}(In),mn=function(t){function n(){return t.apply(this,arguments)||this}return st(n,t),n.prototype.Pp=function(t,n){if(t&&t.Bp&&n&&n.Bp){var i=An(t.Bp,"mp4a.40.2")&&An(n.Bp,"mp4a.40.5"),r=An(t.Bp,"mp4a.40.5")&&An(n.Bp,"mp4a.40.2"),e=An(t.Bp,"mp4a.40.2")&&An(n.Bp,"mp4a.40.34"),u=An(t.Bp,"mp4a.40.34")&&An(n.Bp,"mp4a.40.2"),o=An(t.Bp,"mp4a.40.5")&&An(n.Bp,"mp4a.40.34"),f=An(t.Bp,"mp4a.40.34")&&An(n.Bp,"mp4a.40.5");return!(i||r||e||u||o||f)}return!0},ct(n,[{key:"Sp",get:function(){if(Ot.Dv)return 4096}}]),n}(bn);function An(t,n){return t.indexOf(n)>-1}var En,On=function(t){function n(){return t.apply(this,arguments)||this}return st(n,t),n.prototype.Ip=function(t){return t>=2},n}(bn),Rn=function(t){function n(){var n;return(n=t.call(this)||this).Np=Ot.Q_>=11,n.sp=Ot.X_&&!(Ot.ru&&Ot.Q_<10),n}return st(n,t),ct(n,[{key:"xp",get:function(){return Ot.Q_<17}},{key:"Cp",get:function(){return!0}}]),n}(bn),Dn=function(t){function n(){return t.apply(this,arguments)||this}return st(n,t),ct(n,[{key:"Tp",get:function(){return!(Ot.d_>=133)}}]),n}(bn);var Tn=function(){var t=Ut();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Ot.Kv)return!1;var t=Ut();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var Fn=function(t){function n(n){var i;return(i=t.call(this)||this).Mp=void 0,i.Mp=n,i.Np=i.Mp.Np,i.Ke=i.Mp.Ke,i.sp=Tn&&i.Mp.sp,i}st(n,t);var i=n.prototype;return i.op=function(){return this.Mp.rp},i.Pp=function(t,n){return this.Mp.Pp(t,n)},i.Ip=function(t){return this.Mp.Ip(t)},ct(n,[{key:"Sp",get:function(){return this.Mp.Sp}},{key:"Tp",get:function(){return this.Mp.Tp}},{key:"xp",get:function(){return this.Mp.xp}}]),n}(In),Nn=function(t){function n(n){var i;return(i=t.call(this,n)||this).Np=!0,i.Ks=!0,i}return st(n,t),ct(n,[{key:"Ap",get:function(){return Ot.ru}}]),n}(Fn);var Bn=function(t){function n(){return t.apply(this,arguments)||this}return st(n,t),n.prototype.op=function(){return function(t){return t&&Ft(c.ManagedMediaSource)?c.ManagedMediaSource:Ft(c.MediaSource)?c.MediaSource:void 0}(!0)?t.prototype.op.call(this):1},ct(n,[{key:"Ap",get:function(){return!0}}]),n}(Nn),Pn=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Up=void 0,n}return st(n,t),n.prototype.Pp=function(n,i){return t.prototype.Pp.call(this,n,i)},ct(n,[{key:"_p",get:function(){return Ot.b_<3}},{key:"gp",get:function(){return Ot.b_>=3}},{key:"lp",get:function(){var t=this;return c.tizen&&!this.Up&&c.tizen.systeminfo.getPropertyValue("DISPLAY",function(n){var i=n.resolutionWidth,r=n.resolutionHeight;1===i&&1===r||(t.Up={width:i,height:r})}),this.Up}},{key:"kp",get:function(){return Ot.b_<3}}]),n}(Fn),Cn=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Up=void 0,n}return st(n,t),ct(n,[{key:"lp",get:function(){var t=this;return c.webOS&&!this.Up&&c.webOS.deviceInfo(function(n){t.Up={width:n.screenWidth,height:n.screenHeight}}),this.Up}},{key:"yp",get:function(){return!1}}]),n}(Fn),Wn=function(t){function n(){return t.apply(this,arguments)||this}return st(n,t),ct(n,[{key:"Ap",get:function(){return!0}},{key:"Cp",get:function(){return this.Mp.Cp}}]),n}(Fn),Mn=function(t){function n(){return t.apply(this,arguments)||this}return st(n,t),ct(n,[{key:"Rp",get:function(){return Ot.IS_FIRETV_AFTMM}}]),n}(Fn);!function(t){En=t}(function(){var t=function(){if(Ot.W_)return new mn;if(Ot.B_||Ot.L_)return new On;if(Ot.X_)return new Rn;if(Ot.Rg)return new Dn;return new bn}();return Ot.ru?new Bn(t):Ot.I_?new Mn(t):Ot.Ks?new Nn(t):Ot.w_?new Pn(t):Ot.S_?new Cn(t):Ot.Dv?new Wn(t):new Fn(t)}());var Vn=!(Ot.L_&&!Ot.F_),jn=self.console;function Hn(t){if(Tt(t))try{return JSON.stringify(t)}catch(t){}return t}function Ln(t){return t.map(Hn).join(" ")}function xn(t){var n=jn&&jn[t];return n?n.bind&&Vn?n.bind(jn):function(){for(var n=arguments.length,i=new Array(n),r=0;r1?n-1:0),r=1;r1?n-1:0),r=1;rh&&(u=h),o>h&&(o=h),f=e,s=u;;)if(f=65&&t<=90}function hi(t){return si(t)||function(t){return t>=97&&t<=122}(t)}function ci(t){return t>=48&&t<=57}function ai(t){return ci(t)||hi(t)}function vi(t){return ci(t)||t>=65&&t<=70||t>=97&&t<=102}function li(t){return si(t)?t+32:t}function di(t){return ci(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function yi(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var _i=k.min,wi=String.fromCharCode;function gi(t){for(var n=t.length,i=[],r=0;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},bi=k.floor,mi=String.fromCharCode;function Ai(t){throw new RangeError(Ii[t])}function Ei(t){for(var n=[],i=0,r=t.length;i=55296&&e<=56319&&i>1,t+=bi(t/n);t>455;r+=36)t=bi(t/35);return bi(r+36*t/(t+38))},Ni=function(t){return function(t,n){var i=t.split("@"),r="";i.length>1&&(r=i[0]+"@",t=i[1]);var e=function(t,n){for(var i=[],r=t.length;r--;)i[r]=n(t[r]);return i}((t=t.replace(Si,".")).split("."),n).join(".");return r+e}(t,function(t){return ki.test(t)?"xn--"+function(t){for(var n=[],i=(t=Ei(t)).length,r=128,e=0,u=72,o=0,f=t;o=r&&dbi((pi-e)/y)&&Ai("overflow"),e+=(a-r)*y,r=a;for(var _=0,w=t;_pi&&Ai("overflow"),g==r){for(var p=e,k=36;;k+=36){var S=k<=u?1:k>=u+26?26:k-u;if(p65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r)}return gi(n)}function Pi(t){if(t>=55296&&t<=57343)throw new w("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Ci(t,n){return t>>n&63|128}function Wi(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(Ci(t,12)),n.push(Ci(t,6))):(Pi(t),n.push(t>>12&15|224),n.push(Ci(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function Mi(t){for(var n=[],i=0;i=Ri)throw new w("Invalid byte index");var t=255&Oi[Di];if(Di++,128==(192&t))return 63&t;throw new w("Invalid continuation byte")}function ji(){var t,n;if(Di>Ri)throw new w("Invalid byte index");if(Di===Ri)return!1;if(t=255&Oi[Di],Di++,!(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Vi())>=128)return n;throw new w("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Vi()<<6|Vi())>=2048)return Pi(n),n;throw new w("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Vi()<<12|Vi()<<6|Vi())>=65536&&n<=1114111)return n;throw new w("Invalid UTF-8 detected")}function Hi(t){return[37,yi(t>>4),yi(15&t)]}function Li(t){return function(t){return t>=0&&t<=31}(t)||t>126}function xi(t){return Li(t)||32===t||34===t||60===t||62===t||96===t}function Ui(t){return xi(t)||35===t||63===t||123===t||125===t}function zi(t){return Ui(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Gi(t){return t<33||t>126||34===t||35===t||60===t||62===t}function Ki(t){return Gi(t)||39===t}function Xi(t,n){if(!n(t))return[t];for(var i=Mi([t]),r=[],e=0;e6)throw new g;for(var s=0;u0){if(!("."===t[u]&&s<4))throw new g;u+=1}if(!Yn.test(t[u]))throw new g;for(;u255)throw new g}u+=1}i[r]=i[r]<<8|h,2!==(s+=1)&&4!==s||(r+=1)}if(4!==s)throw new g;break}if(":"===t[u]){if((u+=1)===n)throw new g}else if(u0;)fi(i,r,e+a-1),r-=1,a-=1}else if(8!==r)throw new g;return i}function Ji(t){var n=10,i=ti;return Qn.test(t)?(t=t.slice(2),n=16,i=ni):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=ii),""===t?0:i.test(t)?S(t,n):void 0}var Qi={Vp:4},tr=/[\0\t\n\r #%/:?@\[\\\]]/,nr=/[\0\t\n\r #/:?@\[\\\]]/;function ir(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new g("Invalid IPv6 address");return{Vp:2,Hp:Yi(t.slice(1,-1))}}if(!n)return function(t){if(nr.test(t))throw new g("Invalid code point in opaque host");var n=qi(t,Li);return""===n?Qi:{Vp:3,Wp:n}}(t);var i=function(t){var n=function(t){return Ni(t.toLowerCase())}(t);return n}(Zi(t));if(tr.test(i))throw new g("Invalid code point in host");var r=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var i=[],r=0;r255)throw new g;if(i[i.length-1]>=k.pow(256,5-i.length))throw new g;for(var f=i.pop(),s=0;s>>=8;return n.reverse().join("")}(t.Hp);case 2:return"["+function(t){for(var n="",i=function(t){for(var n=0,i=0,r=0,e=0,u=0;u<8;u++)0===t[u]?(0===e&&(r=u),e++):(e>i&&(n=r,i=e),e=0);return e>i&&(n=r,i=e),i>1?n:null}(t),r=!1,e=0;e<8;e++){if(r){if(0===t[e])continue;r=!1}i!==e?(n+=t[e].toString(16),7!==e&&(n+=":")):(n+=0===e?"::":":",r=!0)}return n}(t.Hp)+"]";case 3:return t.Wp;case 4:return""}}var er=/\+/g;function ur(t){return 42===t||45===t||46===t||95===t||ai(t)}function or(t){for(var n=t.split("&"),i=[],r=0;r0&&(n+="&"),n+=sr(Mi(Ei(r[0])))+"="+sr(Mi(Ei(r[1])))}return n}function sr(t){for(var n=[],i=0;i0&&"?"===t[0]&&(t=t.slice(1)),this.zp=or(t)}var n=t.prototype;return n.append=function(t,n){t=cr(t),n=cr(n),this.zp.push([t,n]),wr(this)},n.delete=function(t){t=cr(t);for(var n=this.zp,i=0;i=2))return!1;if(!Cr(t.slice(0,2)))return!1;if(2!==n){var i=t[2];if(47!==i&&92!==i&&63!==i&&35!==i)return!1}return!0}function Pr(t){return 2===t.length&&Zn.test(t[0])&&(":"===t[1]||"|"===t[1])}function Cr(t){return 2===t.length&&Pr(gi(t))}function Wr(t){return Pr(t)&&":"===t[1]}function Mr(t){var n=t.Jp;0!==n.length&&("file"===t.Qp&&1===n.length&&Wr(n[0])||n.pop())}function Vr(t){return null===t.Zp||Qi===t.Zp||t.$p||"file"===t.Qp}var jr=-1,Hr=/\t|\n|\r/g,Lr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function xr(t,n,i,r){void 0===i&&(i=null),void 0===r&&(r=null),i||(i=new zr,t=t.replace(Lr,""));var e=null!==r?r:0;n=n||null;for(var u=[],o=!1,f=!1,s=!1,h=Ei(t=t.replace(Hr,"")),c=h.length,a=0;a<=c;){var v=a65535)throw new g("Invalid port");i.im=k===Ar[i.Qp]?null:k,u.length=0}if(null!==r)return;e=16,a-=1}break;case 13:i.Qp="file",47===v||92===v?e=14:n&&"file"===n.Qp?jr===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp=n.Gp):63===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp="",e=19):35===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp=n.Gp,i.nm="",e=20):(Br(h.slice(a))||(i.Zp=n.Zp,i.Jp=n.Jp.slice(),Mr(i)),e=17,a-=1):(e=17,a-=1);break;case 14:47===v||92===v?e=15:(n&&"file"===n.Qp&&!Br(h.slice(a))&&(Wr(n.Jp[0])?i.Jp.push(n.Jp[0]):i.Zp=n.Zp),e=17,a-=1);break;case 15:if(jr===v||47===v||92===v||63===v||35===v)if(a-=1,null===r&&Cr(u))e=17;else if(0===u.length){if(i.Zp=Qi,null!==r)return;e=16}else{var I=ir(Bi(u),Fr(i));if(0===I.Vp&&"localhost"===I.qp&&(I=Qi),i.Zp=I,null!==r)return;u.length=0,e=16}else u.push(v);break;case 16:Fr(i)?(e=17,47!==v&&92!==v&&(a-=1)):null===r&&63===v?(i.Gp="",e=19):null===r&&35===v?(i.nm="",e=20):jr!==v&&(e=17,47!==v&&(a-=1));break;case 17:if(jr===v||47===v||Fr(i)&&92===v||null===r&&(63===v||35===v)){var b=Bi(u);if(Dr(b)?(Mr(i),47===v||Fr(i)&&92===v||i.Jp.push("")):!Rr(b)||47===v||Fr(i)&&92===v?Rr(b)||("file"===i.Qp&&0===i.Jp.length&&Cr(u)&&(Qi!==i.Zp&&null!==i.Zp&&(i.Zp=Qi),u[1]=58,b=Bi(u)),i.Jp.push(b)):i.Jp.push(""),u.length=0,"file"===i.Qp&&(jr===v||63===v||35===v))for(;i.Jp.length>1&&""===i.Jp[0];)i.Jp.shift();63===v?(i.Gp="",e=19):35===v&&(i.nm="",e=20)}else u.push.apply(u,Xi(v,Ui));break;case 18:63===v?(i.Gp="",e=19):35===v?(i.nm="",e=20):jr!==v&&(i.Jp[0]+=Bi(Xi(v,Li)));break;case 19:null===r&&35===v?(i.nm="",e=20):jr!==v&&(i.Gp+=Bi(Xi(v,Fr(i)?Ki:Gi)));break;case 20:jr===v||0===v||(i.nm+=Bi(Xi(v,xi)))}a++}return i}function Ur(t,n,i,r){try{xr(t,n,i,r)}catch(t){}}var zr=function(){this.Qp="",this.Kp="",this.Yp="",this.Zp=null,this.im=null,this.Jp=[],this.Gp=null,this.nm=null,this.$p=!1};function Gr(t){switch(t.Qp){case"blob":var n;try{n=xr(t.Jp[0],null)}catch(t){return mr}return Gr(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+rr(n)+(null===i?"":":"+i)}(t.Qp,t.Zp,t.im);default:return mr}}var Kr=function(){function t(t,n){var i,r=null;if(null!=n)if(function(t){return null!=t&&t instanceof Kr&&"object"==typeof t.rc}(n))r=n.rc;else try{r=xr(String(n),null)}catch(t){throw new g("Invalid base URL: "+t.message)}try{i=xr(String(t),r)}catch(t){throw new g("Invalid URL: "+t.message)}var e=i.Gp;this.rc=i,this.Gp=function(t){var n=new gr;return null!==t&&_r(n,t),n}(e),this.Gp.rc=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&Xn(t.prototype,n),i&&Xn(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.Qp+":";if(null!==t.Zp?(i+="//",Nr(t)&&(i+=t.Kp,""!==t.Yp&&(i+=":"+t.Yp),i+="@"),i+=rr(t.Zp),null!==t.im&&(i+=":"+t.im)):null===t.Zp&&"file"===t.Qp&&(i+="//"),t.$p)i+=t.Jp[0];else for(var r=0,e=t.Jp;r1?n-1:0),r=1;ri?r+=k.round(.1*r):r>>=1);)r+=r;return e}),ve=(String.prototype.padStart,String.prototype.padEnd,16384);String.fromCodePoint;function le(t,n){for(var i=[],r=0;r=16;)Wi(0|Ci[t],0|Ci[1|t],0|Ci[2|t],0|Ci[3|t],0|Ci[4|t],0|Ci[5|t],0|Ci[6|t],0|Ci[7|t],0|Ci[8|t],0|Ci[9|t],0|Ci[10|t],0|Ci[11|t],0|Ci[12|t],0|Ci[13|t],0|Ci[14|t],0|Ci[15|t]),r^=i,i=0|Ci[t],e^=p,p=0|Ci[1|t],u^=k,k=0|Ci[2|t],o^=S,S=0|Ci[3|t],f^=I,I=0|Ci[4|t],s^=b,b=0|Ci[5|t],h^=m,m=0|Ci[6|t],c^=A,A=0|Ci[7|t],a^=E,E=0|Ci[8|t],v^=O,O=0|Ci[9|t],l^=R,R=0|Ci[10|t],d^=D,D=0|Ci[11|t],y^=T,T=0|Ci[12|t],_^=F,F=0|Ci[13|t],w^=N,N=0|Ci[14|t],g^=B,B=0|Ci[15|t],Ci[t]=r,Ci[1|t]=e,Ci[2|t]=u,Ci[3|t]=o,Ci[4|t]=f,Ci[5|t]=s,Ci[6|t]=h,Ci[7|t]=c,Ci[8|t]=a,Ci[9|t]=v,Ci[10|t]=l,Ci[11|t]=d,Ci[12|t]=y,Ci[13|t]=_,Ci[14|t]=w,Ci[15|t]=g,t=t+16|0,n=n-16|0,P=P+16|0;return r=i,e=p,u=k,o=S,f=I,s=b,h=m,c=A,a=E,v=O,l=R,d=D,y=T,_=F,w=N,g=B,0|P}}}function ke(t){return new m(t).set(_e),pe({Uint8Array:m},0,t)}var Se=new m(1048576),Ie=function(){function t(t){this.CC=!0,this.UC=void 0,this.SW=void 0,this.Jft=we,this.HW=0,this.IV=null,this.UV=new he,this.oj=new he,this.fj=new he;var n=t.kj||4096;if(n<=0||n%4096)throw new ye("CAD1409","Invalid heap size");this.UC=t.UC||new m(n),this.SW=t.SW||ke(this.UC.buffer),this.hr(t)}var n=t.prototype;return n.uz=function(t){var n=t.sz;this.IV=null,this.Jft=we,this.HW=0;var i=new m(16);return n&&(n.length>16&&(n=de(n,0,16)),i.set(n,16-n.length),this.SW.XP(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15])),this},n.hz=function(t){var n=new m(ge);if(t){0;var i=t.length>ge?de(t,0,ge):t;n.set(i,ge-i.length)}this.SW.AD(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15])},n.hr=function(t){this.uz(t);var n=t.CC;return this.CC=void 0===n||Boolean(n),this.hz(t.SOt),this},n.az=function(t,n,i,r,e){var u=t.byteLength-n,o=u0;)f+=c=this.az(e,o+f,t,n,i),n+=c,i-=c,c=r.PC(o,f-(u&&0===i&&f%ge===0?ge:0)),a.set(e.subarray(o,o+c),s),s+=c,c0&&(n.PC(e,u),o.set(i.subarray(e,e+u))),r&&(t=o[u-1],o=o.subarray(0,u-t)),this.IV=o.subarray(0,u),this.Jft=we,this.HW=0,this},n.zHt=function(t){var n=this.dz(t).IV,i=this.PG().IV,r=n.length+i.length,e=this.fj.ID(r);return e.set(n),i.length>0&&e.set(i,n.length),this.IV=e.subarray(0,r),this},t}(),be=new Ie({UC:Se,SW:ke(Se.buffer)});var me,Ae=self;function Ee(t,n){return void 0===me&&(me=function(){var t=new m(1);try{return Ae.postMessage(t,[t.buffer]),0===t.byteLength}catch(t){return!1}}()),n&&me?Ae.postMessage(t,n):Ae.postMessage(t)}var Oe=function(t){return t.DQt="zHt",t.NQt="gWt",t}({}),Re=function(t){return t.BQt="MQt",t.LQt="OQt",t}({}),De=self;function Te(t,n,i){De.postMessage({JQt:Re.LQt,YQt:t,$Qt:(null==n?void 0:n.code)||i||"DAW0008",tKt:(null==n?void 0:n.message)||""})}var Fe,Ne=[];function Be(t){for(var n=0;n0;)n.shift()();i=!1}}).AQ,ft.itn=it.M6,ft.rtn=function(t){try{var n=Z(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}d(function(){throw new g("Unhandled promise rejection: ".concat(t))},0)})}),pt=D(function(){mt()}),yt=C(function(t,i){var r,o;x(),pt(),et(),r=t,o=function(t){var i="function"==typeof n&&"symbol"===F(e)?n:function(t){return"Symbol("+t+")"};function r(){}var o=Number.isNaN||function(t){return t!=t},u=r;function s(t){return"object"===(void 0===t?"undefined":F(t))&&null!==t||"function"==typeof t}function f(t){return t.slice()}function h(t,n,i,e,r){new k(t).set(new k(i,e,r),n)}function c(t){return!1!==function(t){return"number"==typeof t&&(!o(t)&&!(t<0))}(t)&&t!==1/0}function a(t,n,i){if("function"!=typeof t)throw new m("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function v(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new m(r+" is not a method");switch(i){case 0:return function(){return l(r,t,e)};case 1:return function(n){var i=[n].concat(e);return l(r,t,i)}}}return function(){return R(void 0)}}function d(t,n,i){var e=t[n];if(void 0!==e)return a(e,t,i)}function l(t,n,i){try{return R(a(t,n,i))}catch(t){return O(t)}}function w(t){if(t=Number(t),o(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function b(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new m("size property of a queuing strategy must be a function");return function(n){return t(n)}}var _=tt,S=tt.prototype.then,T=tt.resolve.bind(_),I=tt.reject.bind(_);function E(t){return new _(t)}function R(t){return T(t)}function O(t){return I(t)}function N(t,n,i){return S.call(t,n,i)}function P(t,n,i){N(N(t,n,i),void 0,u)}function A(t,n){P(t,n)}function D(t,n){P(t,void 0,n)}function C(t,n,i){return N(t,n,i)}function x(t){N(t,void 0,u)}var B=function(){function t(){this.Rd=0,this.Dd=0,this.Ld={Od:[],Fd:void 0},this.Ud=this.Ld,this.Rd=0,this.Dd=0}return p.defineProperty(t.prototype,"length",{get:function(){return this.Dd},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.Ud,i=n;16383===n.Od.length&&(i={Od:[],Fd:void 0}),n.Od.push(t),i!==n&&(this.Ud=i,n.Fd=i),++this.Dd},t.prototype.shift=function(){var t=this.Ld,n=t,i=this.Rd,e=i+1,r=t.Od,o=r[i];return 16384===e&&(n=t.Fd,e=0),--this.Dd,this.Rd=e,t!==n&&(this.Ld=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.Rd,i=this.Ld,e=i.Od;!(n===e.length&&void 0===i.Fd||n===e.length&&(n=0,0===(e=(i=i.Fd).Od).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.Ld,n=this.Rd;return t.Od[n]},t}();function M(t,n,i){var e=null;!0===i&&(e=p.prototype);var r=p.create(e);return r.value=t,r.done=n,r}function L(t,n){t.Vd=!0,t.Hd=n,n.Wd=t,"readable"===n.Ra?V(t):"closed"===n.Ra?function(t){V(t),X(t)}(t):H(t,n.qd)}function U(t,n){return Zn(t.Hd,n)}function z(t){"readable"===t.Hd.Ra?q(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){H(t,n)}(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")),t.Hd.Wd=void 0,t.Hd=void 0}function W(t){return new m("Cannot "+t+" a stream using a released reader")}function V(t){t.zd=E(function(n,i){t.Gd=n,t.Xd=i})}function H(t,n){V(t),q(t,n)}function q(t,n){x(t.zd),t.Xd(n),t.Gd=void 0,t.Xd=void 0}function X(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0}var j=i("[[CancelSteps]]"),Y=i("[[PullSteps]]");function K(t,n){void 0===n&&(n=!1);var i=new it(t);return i.Vd=n,i}function G(t){return E(function(n,i){var e={Qd:n,Kd:i};t.Wd.Yd.push(e)})}function $(t,n,i){var e=t.Wd;e.Yd.shift().Qd(M(n,i,e.Vd))}function Z(t){return t.Wd.Yd.length}function J(t){var n=t.Wd;return void 0!==n&&!!et(n)}var Q,nt,it=function(){function t(t){if(!1===Gn(t))throw new m("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===$n(t))throw new m("This stream has already been locked for exclusive reading by another reader");L(this,t),this.Yd=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return et(this)?this.zd:O(ot("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return et(this)?void 0===this.Hd?O(W("cancel")):U(this,t):O(ot("cancel"))},t.prototype.read=function(){return et(this)?void 0===this.Hd?O(W("read from")):rt(this):O(ot("read"))},t.prototype.releaseLock=function(){if(!et(this))throw ot("releaseLock");if(void 0!==this.Hd){if(this.Yd.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function et(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Yd")}function rt(t){var n=t.Hd;return n.Jd=!0,"closed"===n.Ra?R(M(void 0,!0,t.Vd)):"errored"===n.Ra?O(n.qd):n.Zd[Y]()}function ot(t){return new m("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"===F(i.asyncIterator)&&((Q={})[i.asyncIterator]=function(){return this},nt=Q,p.defineProperty(nt,i.asyncIterator,{enumerable:!1}));var ut={next:function(){if(!1===st(this))return O(ft("next"));var t=this.$d;return void 0===t.Hd?O(W("iterate")):C(rt(t),function(n){var i=n.done;return i&&z(t),M(n.value,i,!0)})},return:function(t){if(!1===st(this))return O(ft("next"));var n=this.$d;if(void 0===n.Hd)return O(W("finish iterating"));if(n.Yd.length>0)return O(new m("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.ul){var i=U(n,t);return z(n),C(i,function(){return M(t,!0,!0)})}return z(n),R(M(t,!0,!0))}};function st(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"$d")}function ft(t){return new m("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function ht(t){var n=t.tf.shift();return t.if-=n.size,t.if<0&&(t.if=0),n.value}function ct(t,n,i){if(!c(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.tf.push({value:n,size:i}),t.if+=i}function at(t){t.tf=new B,t.if=0}void 0!==nt&&p.setPrototypeOf(ut,nt),p.defineProperty(ut,"next",{enumerable:!1}),p.defineProperty(ut,"return",{enumerable:!1});var vt=i("[[AbortSteps]]"),dt=i("[[ErrorSteps]]"),lt=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),bt(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(xt.prototype);function o(){return d(n,"start",[r])}var u=v(n,"write",1,[r]),s=v(n,"close",0,[]),f=v(n,"abort",1,[]);Bt(t,r,o,u,s,f,i,e)}(this,t,e=w(e),r)}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===gt(this))throw Vt("locked");return mt(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===gt(this)?O(Vt("abort")):!0===mt(this)?O(new m("Cannot abort a stream that already has a writer")):pt(this,t)},t.prototype.close=function(){return!1===gt(this)?O(Vt("close")):!0===mt(this)?O(new m("Cannot close a stream that already has a writer")):!0===kt(this)?O(new m("Cannot close an already-closing stream")):yt(this)},t.prototype.getWriter=function(){if(!1===gt(this))throw Vt("getWriter");return wt(this)},t}();function wt(t){return new Rt(t)}function bt(t){t.Ra="writable",t.qd=void 0,t.ef=void 0,t.nf=void 0,t.rf=new B,t.hf=void 0,t.uf=void 0,t.cf=void 0,t.df=void 0,t.lf=!1}function gt(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"nf")}function mt(t){return void 0!==t.ef}function pt(t,n){var i=t.Ra;if("closed"===i||"errored"===i)return R(void 0);if(void 0!==t.df)return t.df.vf;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=E(function(i,r){t.df={vf:void 0,Qd:i,Kd:r,_f:n,gf:e}});return t.df.vf=r,!1===e&&St(t,n),r}function yt(t){var n=t.Ra;if("closed"===n||"errored"===n)return O(new m("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=E(function(n,i){var e={Qd:n,Kd:i};t.uf=e}),e=t.ef;return void 0!==e&&!0===t.lf&&"writable"===n&&Qt(e),function(t){ct(t,"close",0),Lt(t)}(t.nf),i}function _t(t,n){"writable"!==t.Ra?Tt(t):St(t,n)}function St(t,n){var i=t.nf;t.Ra="erroring",t.qd=n;var e=t.ef;void 0!==e&&At(e,n),!1===function(t){return void 0!==t.hf||void 0!==t.cf}(t)&&!0===i.pf&&Tt(t)}function Tt(t){t.Ra="errored",t.nf[dt]();var n=t.qd;if(t.rf.forEach(function(t){t.Kd(n)}),t.rf=new B,void 0!==t.df){var i=t.df;if(t.df=void 0,!0===i.gf)return i.Kd(n),void It(t);P(t.nf[vt](i._f),function(){i.Qd(),It(t)},function(n){i.Kd(n),It(t)})}else It(t)}function kt(t){return void 0!==t.uf||void 0!==t.cf}function It(t){void 0!==t.uf&&(t.uf.Kd(t.qd),t.uf=void 0);var n=t.ef;void 0!==n&&Yt(n,t.qd)}function Et(t,n){var i=t.ef;void 0!==i&&n!==t.lf&&(!0===n?function(t){Gt(t)}(i):Qt(i)),t.lf=n}var Rt=function(){function t(t){if(!1===gt(t))throw new m("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===mt(t))throw new m("This stream has already been locked for exclusive writing by another writer");this.mf=t,t.ef=this;var n=t.Ra;if("writable"===n)!1===kt(t)&&!0===t.lf?Gt(this):Zt(this),Xt(this);else if("erroring"===n)$t(this,t.qd),Xt(this);else if("closed"===n)Zt(this),function(t){Xt(t),Kt(t)}(this);else{var i=t.qd;$t(this,i),jt(this,i)}}return p.defineProperty(t.prototype,"closed",{get:function(){return!1===Ot(this)?O(Ht("closed")):this.zd},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ot(this))throw Ht("desiredSize");if(void 0===this.mf)throw qt("desiredSize");return function(t){var n=t.mf,i=n.Ra;return"errored"===i||"erroring"===i?null:"closed"===i?0:Ft(n.nf)}(this)},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"ready",{get:function(){return!1===Ot(this)?O(Ht("ready")):this.wf},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Ot(this)?O(Ht("abort")):void 0===this.mf?O(qt("abort")):function(t,n){var i=t.mf;return pt(i,n)}(this,t)},t.prototype.close=function(){if(!1===Ot(this))return O(Ht("close"));var t=this.mf;return void 0===t?O(qt("close")):!0===kt(t)?O(new m("Cannot close an already-closing stream")):Nt(this)},t.prototype.releaseLock=function(){if(!1===Ot(this))throw Ht("releaseLock");void 0!==this.mf&&Dt(this)},t.prototype.write=function(t){return!1===Ot(this)?O(Ht("write")):void 0===this.mf?O(qt("write to")):Ct(this,t)},t}();function Ot(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"mf")}function Nt(t){return yt(t.mf)}function Pt(t,n){"pending"===t.yf?Yt(t,n):function(t,n){jt(t,n)}(t,n)}function At(t,n){"pending"===t.Af?Jt(t,n):function(t,n){$t(t,n)}(t,n)}function Dt(t){var n=t.mf,i=new m("Writer was released and can no longer be used to monitor the stream's closedness");At(t,i),Pt(t,i),n.ef=void 0,t.mf=void 0}function Ct(t,n){var i=t.mf,e=i.nf,r=function(t,n){try{return t.bf(n)}catch(n){return Ut(t,n),1}}(e,n);if(i!==t.mf)return O(qt("write to"));var o=i.Ra;if("errored"===o)return O(i.qd);if(!0===kt(i)||"closed"===o)return O(new m("The stream is closing or closed and cannot be written to"));if("erroring"===o)return O(i.qd);var u=function(t){return E(function(n,i){var e={Qd:n,Kd:i};t.rf.push(e)})}(i);return function(t,n,i){var e={chunk:n};try{ct(t,e,i)}catch(n){return void Ut(t,n)}var r=t.Sf;!1===kt(r)&&"writable"===r.Ra&&Et(r,zt(t)),Lt(t)}(e,n,r),u}var xt=function(){function t(){throw new m("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Sf")}(this))throw new m("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.Sf.Ra&&Wt(this,t)},t.prototype[vt]=function(t){var n=this.Tf(t);return Mt(this),n},t.prototype[dt]=function(){at(this)},t}();function Bt(t,n,i,e,r,o,u,s){n.Sf=t,t.nf=n,n.tf=void 0,n.if=void 0,at(n),n.pf=!1,n.bf=s,n.kf=u,n.Ef=e,n.Pf=r,n.Tf=o;var f=zt(n);Et(t,f),P(R(i()),function(){n.pf=!0,Lt(n)},function(i){n.pf=!0,_t(t,i)})}function Mt(t){t.Ef=void 0,t.Pf=void 0,t.Tf=void 0,t.bf=void 0}function Ft(t){return t.kf-t.if}function Lt(t){var n=t.Sf;if(!1!==t.pf&&void 0===n.hf)if("erroring"!==n.Ra){if(0!==t.tf.length){var i=function(t){return t.tf.peek().value}(t);"close"===i?function(t){var n=t.Sf;(function(t){t.cf=t.uf,t.uf=void 0})(n),ht(t);var i=t.Pf();Mt(t),P(i,function(){!function(t){t.cf.Qd(void 0),t.cf=void 0,"erroring"===t.Ra&&(t.qd=void 0,void 0!==t.df&&(t.df.Qd(),t.df=void 0)),t.Ra="closed";var n=t.ef;void 0!==n&&Kt(n)}(n)},function(t){!function(t,n){t.cf.Kd(n),t.cf=void 0,void 0!==t.df&&(t.df.Kd(n),t.df=void 0),_t(t,n)}(n,t)})}(t):function(t,n){var i=t.Sf;!function(t){t.hf=t.rf.shift()}(i);var e=t.Ef(n);P(e,function(){!function(t){t.hf.Qd(void 0),t.hf=void 0}(i);var n=i.Ra;if(ht(t),!1===kt(i)&&"writable"===n){var e=zt(t);Et(i,e)}Lt(t)},function(n){"writable"===i.Ra&&Mt(t),function(t,n){t.hf.Kd(n),t.hf=void 0,_t(t,n)}(i,n)})}(t,i.chunk)}}else Tt(n)}function Ut(t,n){"writable"===t.Sf.Ra&&Wt(t,n)}function zt(t){return Ft(t)<=0}function Wt(t,n){var i=t.Sf;Mt(t),St(i,n)}function Vt(t){return new m("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Ht(t){return new m("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function qt(t){return new m("Cannot "+t+" a stream using a released writer")}function Xt(t){t.zd=E(function(n,i){t.Gd=n,t.Xd=i,t.yf="pending"})}function jt(t,n){Xt(t),Yt(t,n)}function Yt(t,n){x(t.zd),t.Xd(n),t.Gd=void 0,t.Xd=void 0,t.yf="rejected"}function Kt(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0,t.yf="resolved"}function Gt(t){t.wf=E(function(n,i){t.xf=n,t.If=i}),t.Af="pending"}function $t(t,n){Gt(t),Jt(t,n)}function Zt(t){Gt(t),Qt(t)}function Jt(t,n){x(t.wf),t.If(n),t.xf=void 0,t.If=void 0,t.Af="rejected"}function Qt(t){t.xf(void 0),t.xf=void 0,t.If=void 0,t.Af="fulfilled"}function tn(t){if("object"!==(void 0===t?"undefined":F(t))||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var nn,en="undefined"!=typeof DOMException?DOMException:void 0,rn=function(t){if("function"!=typeof t&&"object"!==(void 0===t?"undefined":F(t)))return!1;try{return new t,!0}catch(t){return!1}}(en)?en:((nn=function(t,n){this.message=t||"",this.name=n||"Error",g.captureStackTrace&&g.captureStackTrace(this,this.constructor)}).prototype=p.create(g.prototype),p.defineProperty(nn.prototype,"constructor",{value:nn,writable:!0,configurable:!0}),nn);function on(t,n,i,e,o,u){var s=K(t),f=wt(n);t.Jd=!0;var h=!1,c=R(void 0);return E(function(a,v){var d,l,w,b;if(void 0!==u){if(d=function(){var i=new rn("Aborted","AbortError"),r=[];!1===e&&r.push(function(){return"writable"===n.Ra?pt(n,i):R(void 0)}),!1===o&&r.push(function(){return"readable"===t.Ra?Zn(t,i):R(void 0)}),_(function(){return tt.all(r.map(function(t){return t()}))},!0,i)},!0===u.aborted)return void d();u.addEventListener("abort",d)}if(y(t,s.zd,function(t){!1===e?_(function(){return pt(n,t)},!0,t):S(!0,t)}),y(n,f.zd,function(n){!1===o?_(function(){return Zn(t,n)},!0,n):S(!0,n)}),l=t,w=s.zd,b=function(){!1===i?_(function(){return function(t){var n=t.mf,i=n.Ra;return!0===kt(n)||"closed"===i?R(void 0):"errored"===i?O(n.qd):Nt(t)}(f)}):S()},"closed"===l.Ra?b():A(w,b),!0===kt(n)||"closed"===n.Ra){var g=new m("the destination writable stream closed before all data could be piped to it");!1===o?_(function(){return Zn(t,g)},!0,g):S(!0,g)}function p(){var t=c;return N(c,function(){return t!==c?p():void 0})}function y(t,n,i){"errored"===t.Ra?i(t.qd):D(n,i)}function _(t,i,e){function r(){P(t(),function(){return T(i,e)},function(t){return T(!0,t)})}!0!==h&&(h=!0,"writable"===n.Ra&&!1===kt(n)?A(p(),r):r())}function S(t,i){!0!==h&&(h=!0,"writable"===n.Ra&&!1===kt(n)?A(p(),function(){return T(t,i)}):T(t,i))}function T(t,n){Dt(f),z(s),void 0!==u&&u.removeEventListener("abort",d),t?v(n):a(void 0)}x(E(function(t,n){!function i(e){e?t():N(!0===h?R(!0):N(f.wf,function(){return N(rt(s),function(t){return!0===t.done||(c=N(Ct(f,t.value),void 0,r),!1)})}),i,n)}(!1)}))})}var un=function(){function t(){throw new m}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===sn(this))throw gn("desiredSize");return ln(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===sn(this))throw gn("close");if(!1===wn(this))throw new m("The stream is not in a state that permits close");an(this)},t.prototype.enqueue=function(t){if(!1===sn(this))throw gn("enqueue");if(!1===wn(this))throw new m("The stream is not in a state that permits enqueue");return vn(this,t)},t.prototype.error=function(t){if(!1===sn(this))throw gn("error");dn(this,t)},t.prototype[j]=function(t){at(this);var n=this.Rf(t);return cn(this),n},t.prototype[Y]=function(){var t=this.Cf;if(this.tf.length>0){var n=ht(this);return!0===this.Df&&0===this.tf.length?(cn(this),Jn(t)):fn(this),R(M(n,!1,t.Wd.Vd))}var i=G(t);return fn(this),i},t}();function sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Cf")}function fn(t){!1!==hn(t)&&(!0!==t.Bf?(t.Bf=!0,P(t.Nf(),function(){t.Bf=!1,!0===t.Mf&&(t.Mf=!1,fn(t))},function(n){dn(t,n)})):t.Mf=!0)}function hn(t){var n=t.Cf;return!1!==wn(t)&&!1!==t.pf&&(!0===$n(n)&&Z(n)>0||ln(t)>0)}function cn(t){t.Nf=void 0,t.Rf=void 0,t.bf=void 0}function an(t){var n=t.Cf;t.Df=!0,0===t.tf.length&&(cn(t),Jn(n))}function vn(t,n){var i=t.Cf;if(!0===$n(i)&&Z(i)>0)$(i,n,!1);else{var e=void 0;try{e=t.bf(n)}catch(n){throw dn(t,n),n}try{ct(t,n,e)}catch(n){throw dn(t,n),n}}fn(t)}function dn(t,n){var i=t.Cf;"readable"===i.Ra&&(at(t),cn(t),Qn(i,n))}function ln(t){var n=t.Cf.Ra;return"errored"===n?null:"closed"===n?0:t.kf-t.if}function wn(t){var n=t.Cf.Ra;return!1===t.Df&&"readable"===n}function bn(t,n,i,e,r,o,u){n.Cf=t,n.tf=void 0,n.if=void 0,at(n),n.pf=!1,n.Df=!1,n.Mf=!1,n.Bf=!1,n.bf=u,n.kf=o,n.Nf=e,n.Rf=r,t.Zd=n,P(R(i()),function(){n.pf=!0,fn(n)},function(t){dn(n,t)})}function gn(t){return new m("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var mn=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&y.floor(t)===t},pn=function(){function t(){throw new m("ReadableStreamBYOBRequest cannot be used directly")}return p.defineProperty(t.prototype,"view",{get:function(){if(!1===Sn(this))throw Ln("view");return this.Lf},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Sn(this))throw Ln("respond");if(void 0===this.Of)throw new m("This BYOB request has been invalidated");this.Lf.buffer,function(t,n){if(!1===c(n=Number(n)))throw new RangeError("bytesWritten must be a finite");Dn(t,n)}(this.Of,t)},t.prototype.respondWithNewView=function(t){if(!1===Sn(this))throw Ln("respond");if(void 0===this.Of)throw new m("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new m("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.Ff.peek();if(i.byteOffset+i.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.byteLength!==n.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");i.buffer=n.buffer,Dn(t,n.byteLength)}(this.Of,t)},t}(),yn=function(){function t(){throw new m("ReadableByteStreamController constructor cannot be used directly")}return p.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===_n(this))throw Un("byobRequest");if(void 0===this.Uf&&this.Ff.length>0){var t=this.Ff.peek(),n=new k(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=p.create(pn.prototype);!function(t,n,i){t.Of=n,t.Lf=i}(i,this,n),this.Uf=i}return this.Uf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===_n(this))throw Un("desiredSize");return Mn(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===_n(this))throw Un("close");if(!0===this.Df)throw new m("The stream has already been closed; do not close it again!");var t=this.Vf.Ra;if("readable"!==t)throw new m("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.Vf;if(t.if>0)t.Df=!0;else{if(t.Ff.length>0&&t.Ff.peek().bytesFilled>0){var i=new m("Insufficient bytes to fill elements in the given buffer");throw Bn(t,i),i}xn(t),Jn(n)}}(this)},t.prototype.enqueue=function(t){if(!1===_n(this))throw Un("enqueue");if(!0===this.Df)throw new m("stream is closed or draining");var n=this.Vf.Ra;if("readable"!==n)throw new m("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new m("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.Vf,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;!0===J(i)?0===Z(i)?En(t,u,r,o):$(i,new k(u,r,o),!1):!0===Vn(i)?(En(t,u,r,o),An(t)):En(t,u,r,o),Tn(t)}(this,t)},t.prototype.error=function(t){if(!1===_n(this))throw Un("error");Bn(this,t)},t.prototype[j]=function(t){this.Ff.length>0&&(this.Ff.peek().bytesFilled=0),at(this);var n=this.Rf(t);return xn(this),n},t.prototype[Y]=function(){var t=this.Vf;if(this.if>0){var n=this.tf.shift();this.if-=n.byteLength,Nn(this);var i=void 0;try{i=new k(n.buffer,n.byteOffset,n.byteLength)}catch(t){return O(t)}return R(M(i,!1,t.Wd.Vd))}var e=this.Hf;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return O(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:k,readerType:"default"};this.Ff.push(o)}var u=G(t);return Tn(this),u},t}();function _n(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Vf")}function Sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Of")}function Tn(t){var n=function(t){var n=t.Vf;if("readable"!==n.Ra)return!1;if(!0===t.Df)return!1;if(!1===t.pf)return!1;if(!0===J(n)&&Z(n)>0)return!0;if(!0===Vn(n)&&Wn(n)>0)return!0;var i=Mn(t);return i>0}(t);!1!==n&&(!0!==t.Bf?(t.Bf=!0,P(t.Nf(),function(){t.Bf=!1,!0===t.Mf&&(t.Mf=!1,Tn(t))},function(n){Bn(t,n)})):t.Mf=!0)}function kn(t,n){var i=!1;"closed"===t.Ra&&(i=!0);var e=In(n);"default"===n.readerType?$(t,e,i):function(t,n,i){var e=t.Wd,r=e.Wf.shift();r.Qd(M(n,i,e.Vd))}(t,e,i)}function In(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function En(t,n,i,e){t.tf.push({buffer:n,byteOffset:i,byteLength:e}),t.if+=e}function Rn(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=y.min(t.if,n.byteLength-n.bytesFilled),o=n.bytesFilled+r,u=o-o%i,s=r,f=!1;u>e&&(s=u-n.bytesFilled,f=!0);for(var c=t.tf;s>0;){var a=c.peek(),v=y.min(s,a.byteLength),d=n.byteOffset+n.bytesFilled;h(n.buffer,d,a.buffer,a.byteOffset,v),a.byteLength===v?c.shift():(a.byteOffset+=v,a.byteLength-=v),t.if-=v,On(t,v,n),s-=v}return f}function On(t,n,i){Pn(t),i.bytesFilled+=n}function Nn(t){0===t.if&&!0===t.Df?(xn(t),Jn(t.Vf)):Tn(t)}function Pn(t){void 0!==t.Uf&&(t.Uf.Of=void 0,t.Uf.Lf=void 0,t.Uf=void 0)}function An(t){for(;t.Ff.length>0;){if(0===t.if)return;var n=t.Ff.peek();!0===Rn(t,n)&&(Cn(t),kn(t.Vf,n))}}function Dn(t,n){var i=t.Ff.peek();if("closed"===t.Vf.Ra){if(0!==n)throw new m("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.Vf;if(!0===Vn(i))for(;Wn(i)>0;)kn(i,Cn(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(On(t,n,i),!(i.bytesFilled0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);En(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,kn(t.Vf,i),An(t)}}(t,n,i);Tn(t)}function Cn(t){var n=t.Ff.shift();return Pn(t),n}function xn(t){t.Nf=void 0,t.Rf=void 0}function Bn(t,n){var i=t.Vf;"readable"===i.Ra&&(function(t){Pn(t),t.Ff=new B}(t),at(t),xn(t),Qn(i,n))}function Mn(t){var n=t.Vf.Ra;return"errored"===n?null:"closed"===n?0:t.kf-t.if}function Fn(t,n,i){var e=p.create(yn.prototype),r=v(n,"pull",0,[e]),o=v(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===mn(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.Vf=t,n.Mf=!1,n.Bf=!1,n.Uf=void 0,n.tf=n.if=void 0,at(n),n.Df=!1,n.pf=!1,n.kf=w(o),n.Nf=e,n.Rf=r,n.Hf=u,n.Ff=new B,t.Zd=n,P(R(i()),function(){n.pf=!0,Tn(n)},function(t){Bn(n,t)})}(t,e,function(){return d(n,"start",[e])},r,o,i,u)}function Ln(t){return new m("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Un(t){return new m("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function zn(t){return E(function(n,i){var e={Qd:n,Kd:i};t.Wd.Wf.push(e)})}function Wn(t){return t.Wd.Wf.length}function Vn(t){var n=t.Wd;return void 0!==n&&!!qn(n)}var Hn=function(){function t(t){if(!Gn(t))throw new m("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===_n(t.Zd))throw new m("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if($n(t))throw new m("This stream has already been locked for exclusive reading by another reader");L(this,t),this.Wf=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return qn(this)?this.zd:O(Xn("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return qn(this)?void 0===this.Hd?O(W("cancel")):U(this,t):O(Xn("cancel"))},t.prototype.read=function(t){return qn(this)?void 0===this.Hd?O(W("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?O(new m("view must have non-zero byteLength")):function(t,n){var i=t.Hd;return i.Jd=!0,"errored"===i.Ra?O(i.qd):function(t,n){var i=t.Vf,e=1;n.constructor!==DataView&&(e=n.constructor.BYTES_PER_ELEMENT);var r=n.constructor,o={buffer:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:e,ctor:r,readerType:"byob"};if(t.Ff.length>0)return t.Ff.push(o),zn(i);if("closed"===i.Ra)return R(M(new r(o.buffer,o.byteOffset,0),!0,i.Wd.Vd));if(t.if>0){if(!0===Rn(t,o)){var u=In(o);return Nn(t),R(M(u,!1,i.Wd.Vd))}if(!0===t.Df){var s=new m("Insufficient bytes to fill elements in the given buffer");return Bn(t,s),O(s)}}t.Ff.push(o);var f=zn(i);return Tn(t),f}(i.Zd,n)}(this,t)):O(new m("view must be an array buffer view")):O(Xn("read"))},t.prototype.releaseLock=function(){if(!qn(this))throw Xn("releaseLock");if(void 0!==this.Hd){if(this.Wf.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function qn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Wf")}function Xn(t){return new m("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var jn=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Kn(this);var i=n.size,e=n.highWaterMark,r=t.type;if("bytes"===String(r)){if(void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===e&&(e=0),Fn(this,t,e=w(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(un.prototype),o=v(n,"pull",0,[r]),u=v(n,"cancel",1,[]);bn(t,r,function(){return d(n,"start",[r])},o,u,i,e)}(this,t,e=w(e),o)}}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===Gn(this))throw ti("locked");return $n(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Gn(this)?O(ti("cancel")):!0===$n(this)?O(new m("Cannot cancel a stream that already has a reader")):Zn(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Gn(this))throw ti("getReader");if(void 0===n)return K(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new Hn(t);return i.Vd=n,i}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,n){var i=t.writable,e=t.readable,r=void 0===n?{}:n,o=r.preventClose,u=r.preventAbort,s=r.preventCancel,f=r.signal;if(!1===Gn(this))throw ti("pipeThrough");if(!1===gt(i))throw new m("writable argument to pipeThrough must be a WritableStream");if(!1===Gn(e))throw new m("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!tn(f))throw new m("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===$n(this))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===mt(i))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return x(on(this,i,o,u,s,f)),e},t.prototype.pipeTo=function(t,n){var i=void 0===n?{}:n,e=i.preventClose,r=i.preventAbort,o=i.preventCancel,u=i.signal;return!1===Gn(this)?O(ti("pipeTo")):!1===gt(t)?O(new m("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||tn(u)?!0===$n(this)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===mt(t)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):on(this,t,e,r,o,u):O(new m("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Gn(this))throw ti("tee");var t=function(t){var n,i,e,r,o,u=K(t),s=!1,h=!1,c=!1,a=E(function(t){o=t});function v(){return!0===s||(s=!0,x(C(rt(u),function(t){if(s=!1,!0===t.done)return!1===h&&an(e.Zd),void(!1===c&&an(r.Zd));var n=t.value,i=n,o=n;!1===h&&vn(e.Zd,i),!1===c&&vn(r.Zd,o)}))),R(void 0)}function d(){}return e=Yn(d,v,function(e){if(h=!0,n=e,!0===c){var r=f([n,i]),u=Zn(t,r);o(u)}return a}),r=Yn(d,v,function(e){if(c=!0,i=e,!0===h){var r=f([n,i]),u=Zn(t,r);o(u)}return a}),D(u.zd,function(t){dn(e.Zd,t),dn(r.Zd,t)}),[e,r]}(this);return f(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Gn(this))throw ti("getIterator");return function(t,n){void 0===n&&(n=!1);var i=K(t),e=p.create(ut);return e.$d=i,e.ul=Boolean(n),e}(this,i)},t}();function Yn(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=p.create(jn.prototype);return Kn(o),bn(o,p.create(un.prototype),t,n,i,e,r),o}function Kn(t){t.Ra="readable",t.Wd=void 0,t.qd=void 0,t.Jd=!1}function Gn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Zd")}function $n(t){return void 0!==t.Wd}function Zn(t,n){return t.Jd=!0,"closed"===t.Ra?R(void 0):"errored"===t.Ra?O(t.qd):(Jn(t),C(t.Zd[j](n),r))}function Jn(t){t.Ra="closed";var n=t.Wd;void 0!==n&&(et(n)&&(n.Yd.forEach(function(t){t.Qd(M(void 0,!0,n.Vd))}),n.Yd=new B),X(n))}function Qn(t,n){t.Ra="errored",t.qd=n;var i=t.Wd;void 0!==i&&(et(i)?(i.Yd.forEach(function(t){t.Kd(n)}),i.Yd=new B):(i.Wf.forEach(function(t){t.Kd(n)}),i.Wf=new B),q(i,n))}function ti(t){return new m("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"===F(i.asyncIterator)&&p.defineProperty(jn.prototype,i.asyncIterator,{value:jn.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var ni=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(t){return t.byteLength},t}(),ii=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(){return 1},t}(),ei=function(){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={}),void 0===i&&(i={});var e=n.size,r=n.highWaterMark,o=i.size,u=i.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var s=b(e);if(void 0===r&&(r=1),r=w(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,h=b(o);void 0===u&&(u=0),u=w(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.qf;return!0===t.lf?C(t.zf,function(){var e=t.Gf;if("erroring"===e.Ra)throw e.qd;return vi(i,n)}):vi(i,n)}(t,n)}function f(n){return function(t,n){return oi(t,n),R(void 0)}(t,n)}function h(){return function(t){var n=t.Xf,i=t.qf,e=i.jf();return ci(i),C(e,function(){if("errored"===n.Ra)throw n.qd;var t=n.Zd;!0===wn(t)&&an(t)},function(i){throw oi(t,i),n.qd})}(t)}function c(){return function(t){return si(t,!1),t.zf}(t)}function a(n){return ui(t,n),R(void 0)}t.Gf=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=p.create(lt.prototype);return bt(u),Bt(u,p.create(xt.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.Xf=Yn(u,c,a,r,o),t.lf=void 0,t.zf=void 0,t.Qf=void 0,si(t,!0),t.qf=void 0}(this,E(function(t){f=t}),r,s,u,h),function(t,n){var i=p.create(fi.prototype),e=function(t){try{return ai(i,t),R(void 0)}catch(t){return O(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new m("transform is not a method");e=function(t){return l(r,n,[t,i])}}var o=v(n,"flush",0,[i]);!function(t,n,i,e){n.Kf=t,t.qf=n,n.Yf=i,n.jf=e}(t,i,e,o)}(this,t);var c=d(t,"start",[this.qf]);f(c)}return p.defineProperty(t.prototype,"readable",{get:function(){if(!1===ri(this))throw li("readable");return this.Xf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"writable",{get:function(){if(!1===ri(this))throw li("writable");return this.Gf},enumerable:!0,configurable:!0}),t}();function ri(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"qf")}function oi(t,n){dn(t.Xf.Zd,n),ui(t,n)}function ui(t,n){ci(t.qf),Ut(t.Gf.nf,n),!0===t.lf&&si(t,!1)}function si(t,n){void 0!==t.zf&&t.Qf(),t.zf=E(function(n){t.Qf=n}),t.lf=n}var fi=function(){function t(){throw new m("TransformStreamDefaultController instances cannot be created directly")}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===hi(this))throw di("desiredSize");return ln(this.Kf.Xf.Zd)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===hi(this))throw di("enqueue");ai(this,t)},t.prototype.error=function(t){if(!1===hi(this))throw di("error");!function(t,n){oi(t.Kf,n)}(this,t)},t.prototype.terminate=function(){if(!1===hi(this))throw di("terminate");!function(t){var n=t.Kf,i=n.Xf.Zd;!0===wn(i)&&an(i);var e=new m("TransformStream terminated");ui(n,e)}(this)},t}();function hi(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Kf")}function ci(t){t.Yf=void 0,t.jf=void 0}function ai(t,n){var i=t.Kf,e=i.Xf.Zd;if(!1===wn(e))throw new m("Readable side is not in a state that permits enqueue");try{vn(e,n)}catch(t){throw ui(i,t),i.Xf.qd}var r=function(t){return!0!==hn(t)}(e);r!==i.lf&&si(i,!0)}function vi(t,n){return C(t.Yf(n),void 0,function(n){throw oi(t.Kf,n),n})}function di(t){return new m("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function li(t){return new m("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=ni,t.CountQueuingStrategy=ii,t.ReadableStream=jn,t.TransformStream=ei,t.WritableStream=lt,p.defineProperty(t,"__esModule",{value:!0})},"object"===(void 0===t?"undefined":F(t))&&void 0!==i?o(t):"function"==typeof define&&define.amd?define(["exports"],o):o((r=r||self).WebStreamsPolyfill={})}),_t=C(function(t){function n(){var t=yt();return n=function(){return t},t}x(),pt(),p.defineProperty(t,"__esModule",{value:!0}),function(t,n){for(var i in n)p.defineProperty(t,i,{enumerable:!0,get:p.getOwnPropertyDescriptor(n,i).get})}(t,{get ByteLengthQueuingStrategy(){return n().ByteLengthQueuingStrategy},get CountQueuingStrategy(){return n().CountQueuingStrategy},get ReadableStream(){return n().ReadableStream},get TransformStream(){return n().TransformStream},get WritableStream(){return n().WritableStream}})});function St(t,n){return(St=p.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Tt(t,n){if("function"!=typeof n&&null!==n)throw new m("Super expression must either be null or a function");t.prototype=p.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&St(t,n)}function kt(t,n){for(var i=0;it.length)&&(n=t.length);for(var i=0,e=new Array(n);i=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new m("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt(),M(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt();var Ot,Nt=((Ot={}).Sv="web",Ot.Tv="android",Ot.Ev="android-tv",Ot.Pv="ios",Ot.xv="tvos",Ot.Iv="chromecast",Ot.Rv="theoliveweb",Ot);var Pt=v?v.userAgent:"",At=Pt.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Dt=Pt.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ct=Pt.match(/Android ([0-9\.]+)/i),xt=Pt.match(/Windows NT ([0-9\.]+)/i),Bt=Pt.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Mt=Pt.match(/Firefox\/([0-9\.]+)/i),Ft=Pt.match(/OPR\/(\d+\.\d+)/i),Lt=Pt.match(/Tizen ([0-9\.]+)/i),Ut=Pt.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),zt=Pt.match(/HbbTV\/([0-9.]+)/i),Wt=Pt.match(/(AFT.*) Build/i),Vt=function(){function t(){this.Cv=Boolean("ontouchstart"in self||self.DocumentTouch&&B(a,self.DocumentTouch)||v&&v.msMaxTouchPoints),this.Bv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Pt)||/(macintosh|mac(?=_powerpc)\s)/i.test(Pt),this.Mv=/Windows NT/i.test(Pt),this.Ov=xt?S(xt[1]):0,this.Uv=/Android/i.test(Pt),this.Hv=Ct?S(Ct[1]):0,this.qv=/windows phone (8|8\.1)/i.test(Pt),this.Gv=/iPhone/i.test(Pt),this.Qv=/iPad/i.test(Pt),this.Yv=this.Bv&&this.Cv&&!this.Qv,this.Zv=/iPod/i.test(Pt),this.r_=/Mobile Safari/i.test(Pt),this.s_=/EOS\d*STB/i.test(Pt),this.n_=/APP\d*STB/i.test(Pt),this.$v=(this.Gv||this.Qv||this.Yv||this.Zv)&&!this.qv,this.i_=Ut?S(Ut[2]):0,this.h_=this.qv||this.$v||this.Uv||this.r_,this.a_=/CriOS/i.test(Pt),this.c_=Boolean(self.chrome&&/google/i.test(v.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(v.userAgent),this.p_=Dt?_(Dt[1],10):0,this.Bg=Boolean(/CriOS/i.test(Pt)),this.Dg=Boolean(self.chrome||/Chrome/i.test(Pt)||this.Bg),this.f_=At?_(At[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(Pt),this.b_=Lt?S(Lt[1]):0,this.l_=this.b_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.b_):void 0,this.T_=/webos|web0s/i.test(Pt),this.E_=/HbbTV/i.test(Pt),this.x_=!!zt&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(zt[1]),this.R_=/AFT.* Build/i.test(Pt),this.C_=Wt?Wt[1]:void 0,this.B_=/VIZIO/i.test(Pt),this.M_=/Edge\/\d+/i.test(Pt),this.O_=/Trident/i.test(Pt),this.U_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.H_=/Vivaldi/i.test(Pt),this.q_=/Firefox/i.test(Pt)&&!/Seamonkey/i.test(Pt),this.G_=Mt?S(Mt[1]):0,this.j_=/Safari/i.test(Pt)&&!/Chrome/i.test(Pt)&&!this.qv&&!this.y_,this.K_=Bt?S(Bt[2]):0,this.J_=Boolean(Ft),this.eg=Ft?S(Ft[1]):0,this.hg=/CrKey/.test(Pt),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(Pt),this.fg=/PlayStation 4/i.test(Pt),this._g=/PlayStation 5/i.test(Pt),this.pg="web"===Nt.Ev,this.yg="web"===Nt.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===Nt.Pv,this.xg="web"===Nt.xv,this.Rg="web"===Nt.Iv}return It(t,[{key:"Ke",get:function(){return this.Cv}},{key:"Dv",get:function(){return this.Bv}},{key:"Nv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Ov}},{key:"Fv",get:function(){return this.Uv}},{key:"Vv",get:function(){return this.Hv}},{key:"Wv",get:function(){return this.qv}},{key:"zv",get:function(){return this.Gv}},{key:"Xv",get:function(){return this.Qv}},{key:"Kv",get:function(){return this.Yv}},{key:"Jv",get:function(){return this.Zv}},{key:"ru",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"e_",get:function(){return this.s_||this.n_}},{key:"vd",get:function(){return this.r_}},{key:"Ks",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"d_",get:function(){var t;return null!=(t=this.l_)?t:this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){var t;return(null==(t=c.chrome)?void 0:t.webview)&&this.p_>0}},{key:"m_",get:function(){return this.p_}},{key:"w_",get:function(){return this.y_}},{key:"A_",get:function(){return this.b_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"P_",get:function(){return this.x_}},{key:"I_",get:function(){return this.R_}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.C_}},{key:"D_",get:function(){return this.B_}},{key:"N_",get:function(){return this.M_}},{key:"L_",get:function(){return this.O_}},{key:"F_",get:function(){return this.U_}},{key:"V_",get:function(){return this.H_}},{key:"W_",get:function(){return this.q_}},{key:"z_",get:function(){return this.G_}},{key:"X_",get:function(){return this.j_}},{key:"Q_",get:function(){return 0===this.K_&&Ht.ru?this.i_:this.K_}},{key:"Y_",get:function(){return this.J_}},{key:"Z_",get:function(){return this.eg}},{key:"rg",get:function(){return this.hg}},{key:"og",get:function(){return this.ag}},{key:"cg",get:function(){return!(!this.S_&&!this.w_)&&this.d_<=56}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"Pg",get:function(){return this.xg}},{key:"Ig",get:function(){return this.Rg}},{key:"Cg",get:function(){return this.Dg}},{key:"IS_IOS_CHROME",get:function(){return this.Bg}}]),t}();Vt.Ng=new Vt;var Ht=Vt.Ng;x(),pt(),et();var qt={}.toString;function Xt(t){return null!=t}var jt,Yt=Array.isArray||function(t){return"[object Array]"===qt.call(t)};function Kt(t){return"object"===(void 0===t?"undefined":F(t))&&null!==t}function Gt(t){return"function"==typeof t}function $t(t){return Gt(t)||Kt(t)}function Zt(t){jt=t}x(),pt(),x(),pt();var Jt=function(){};function Qt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function tn(t,n,i,e,r,o,u){try{var s=t[o](u),f=s.value}catch(t){return void i(t)}s.done?n(f):tt.resolve(f).then(e,r)}function nn(t){return function(){var n=this,i=arguments;return new tt(function(e,r){var o=t.apply(n,i);function u(t){tn(o,e,r,u,s,"next",t)}function s(t){tn(o,e,r,u,s,"throw",t)}u(void 0)})}}function en(t,i){var r,o,u,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},f=p.create(("function"==typeof Iterator?Iterator:p).prototype);return f.next=h(0),f.throw=h(1),f.return=h(2),"function"==typeof n&&(f[e]=function(){return this}),f;function h(n){return function(e){return function(n){if(r)throw new m("Generator is already executing.");for(;f&&(f=0,n[0]&&(s=0)),s;)try{if(r=1,o&&(u=2&n[0]?o.return:n[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,n[1])).done)return u;switch(o=0,u&&(n=[2&n[0],u.value]),n[0]){case 0:case 1:u=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(u=s.trys,(u=u.length>0&&u[u.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!u||n[1]>u[0]&&n[1]=0;i-=1){if(n(t[i],i,t))return i}return-1};Array.prototype.at;function fn(t,n){var i=t.indexOf(n);return-1!==i&&(function(t,n){0===n?t.shift():t.splice(n,1)}(t,i),!0)}function hn(t,n){for(var i=new Array(t.length),e=0,r=0;r>>=0)&&t<256)&&(e=On[t])?e:(i=An(t,0,!0),r&&(On[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=Rn[t])?e:(i=An(t,t<0?-1:0,!1),r&&(Rn[t]=i),i)}function Pn(t,n){if(T(t))return n?zn:Un;if(n){if(t<0)return zn;if(t>=Mn)return Xn}else{if(t<=-Fn)return jn;if(t+1>=Fn)return qn}return t<0?Pn(-t,n).neg():An(t%Bn|0,t/Bn|0,n)}function An(t,n,i){return new kn(t,n,i)}kn.fromInt=Nn,kn.fromNumber=Pn,kn.fromBits=An;var Dn=y.pow;function Cn(t,n,i){if(0===t.length)throw g("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?zn:Un;if((i=i||10)<2||360)throw g("interior hyphen");if(0===e)return Cn(t.substring(1),n,i).neg();for(var r=Pn(Dn(i,8)),o=Un,u=0;u>>0:this.low},Yn.toNumber=function(){return this.unsigned?(this.high>>>0)*Bn+(this.low>>>0):this.high*Bn+(this.low>>>0)},Yn.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((o=s).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},Yn.getHighBits=function(){return this.high},Yn.getHighBitsUnsigned=function(){return this.high>>>0},Yn.getLowBits=function(){return this.low},Yn.getLowBitsUnsigned=function(){return this.low>>>0},Yn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(jn)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&!(t&1<>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},Yn.isZero=function(){return 0===this.high&&0===this.low},Yn.eqz=Yn.isZero,Yn.isNegative=function(){return!this.unsigned&&this.high<0},Yn.isPositive=function(){return this.unsigned||this.high>=0},Yn.isOdd=function(){return!(1&~this.low)},Yn.isEven=function(){return!(1&this.low)},Yn.equals=function(t){return In(t)||(t=xn(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},Yn.eq=Yn.equals,Yn.notEquals=function(t){return!this.eq(t)},Yn.neq=Yn.notEquals,Yn.ne=Yn.notEquals,Yn.lessThan=function(t){return this.comp(t)<0},Yn.lt=Yn.lessThan,Yn.lessThanOrEqual=function(t){return this.comp(t)<=0},Yn.lte=Yn.lessThanOrEqual,Yn.le=Yn.lessThanOrEqual,Yn.greaterThan=function(t){return this.comp(t)>0},Yn.gt=Yn.greaterThan,Yn.greaterThanOrEqual=function(t){return this.comp(t)>=0},Yn.gte=Yn.greaterThanOrEqual,Yn.ge=Yn.greaterThanOrEqual,Yn.compare=function(t){if(In(t)||(t=xn(t)),this.eq(t))return 0;var n=this.isNegative(),i=t.isNegative();return n&&!i?-1:!n&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},Yn.comp=Yn.compare,Yn.negate=function(){return!this.unsigned&&this.eq(jn)?jn:this.not().add(Wn)},Yn.neg=Yn.negate,Yn.add=function(t){In(t)||(t=xn(t));var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=0,h=0,c=0,a=0;return c+=(a+=r+(65535&t.low))>>>16,h+=(c+=e+s)>>>16,f+=(h+=i+u)>>>16,f+=n+o,An((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},Yn.subtract=function(t){return In(t)||(t=xn(t)),this.add(t.neg())},Yn.sub=Yn.subtract,Yn.multiply=function(t){if(this.isZero())return this;if(In(t)||(t=xn(t)),Tn)return An(Tn.mul(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned);if(t.isZero())return this.unsigned?zn:Un;if(this.eq(jn))return t.isOdd()?jn:Un;if(t.eq(jn))return this.isOdd()?jn:Un;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(Ln)&&t.lt(Ln))return Pn(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=65535&t.low,h=0,c=0,a=0,v=0;return a+=(v+=r*f)>>>16,c+=(a+=e*f)>>>16,a&=65535,c+=(a+=r*s)>>>16,h+=(c+=i*f)>>>16,c&=65535,h+=(c+=e*s)>>>16,c&=65535,h+=(c+=r*u)>>>16,h+=n*f+i*s+e*u+r*o,An((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},Yn.mul=Yn.multiply,Yn.divide=function(t){if(In(t)||(t=xn(t)),t.isZero())throw g("division by zero");var n,i,e;if(Tn)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?An((this.unsigned?Tn.div_u:Tn.div_s)(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?zn:Un;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return zn;if(t.gt(this.shru(1)))return Vn;e=zn}else{if(this.eq(jn))return t.eq(Wn)||t.eq(Hn)?jn:t.eq(jn)?Wn:(n=this.shr(1).div(t).shl(1)).eq(Un)?t.isNegative()?Wn:Hn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(jn))return this.unsigned?zn:Un;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();e=Un}for(i=this;i.gte(t);){n=y.max(1,y.floor(i.toNumber()/t.toNumber()));for(var r=y.ceil(y.log(n)/y.LN2),o=r<=48?1:Dn(2,r-48),u=Pn(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=Pn(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=Wn),e=e.add(u),i=i.sub(s)}return e},Yn.div=Yn.divide,Yn.modulo=function(t){return In(t)||(t=xn(t)),Tn?An((this.unsigned?Tn.rem_u:Tn.rem_s)(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},Yn.mod=Yn.modulo,Yn.rem=Yn.modulo,Yn.not=function(){return An(~this.low,~this.high,this.unsigned)},Yn.countLeadingZeros=function(){return this.high?y.clz32(this.high):y.clz32(this.low)+32},Yn.clz=Yn.countLeadingZeros,Yn.countTrailingZeros=function(){return this.low?En(this.low):En(this.high)+32},Yn.ctz=Yn.countTrailingZeros,Yn.and=function(t){return In(t)||(t=xn(t)),An(this.low&t.low,this.high&t.high,this.unsigned)},Yn.or=function(t){return In(t)||(t=xn(t)),An(this.low|t.low,this.high|t.high,this.unsigned)},Yn.xor=function(t){return In(t)||(t=xn(t)),An(this.low^t.low,this.high^t.high,this.unsigned)},Yn.shiftLeft=function(t){return In(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?An(this.low<>>32-t,this.unsigned):An(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):An(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Yn.shr=Yn.shiftRight,Yn.shiftRightUnsigned=function(t){return In(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?An(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):An(32===t?this.high:this.high>>>t-32,0,this.unsigned)},Yn.shru=Yn.shiftRightUnsigned,Yn.shr_u=Yn.shiftRightUnsigned,Yn.rotateLeft=function(t){var n;return In(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?An(this.high,this.low,this.unsigned):t<32?(n=32-t,An(this.low<>>n,this.high<>>n,this.unsigned)):(n=32-(t-=32),An(this.high<>>n,this.low<>>n,this.unsigned))},Yn.rotl=Yn.rotateLeft,Yn.rotateRight=function(t){var n;return In(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?An(this.high,this.low,this.unsigned):t<32?(n=32-t,An(this.high<>>t,this.low<>>t,this.unsigned)):(n=32-(t-=32),An(this.low<>>t,this.high<>>t,this.unsigned))},Yn.rotr=Yn.rotateRight,Yn.toSigned=function(){return this.unsigned?An(this.low,this.high,!1):this},Yn.toUnsigned=function(){return this.unsigned?this:An(this.low,this.high,!0)},Yn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Yn.toBytesLE=function(){var t=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},Yn.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,n>>>24,n>>>16&255,n>>>8&255,255&n]},kn.fromBytes=function(t,n,i){return i?kn.fromBytesLE(t,n):kn.fromBytesBE(t,n)},kn.fromBytesLE=function(t,n){return new kn(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},kn.fromBytesBE=function(t,n){return new kn(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},"function"==typeof BigInt&&(kn.fromBigInt=function(t,n){return An(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),n)},kn.fromValue=function(t,n){return"bigint"===(void 0===t?"undefined":F(t))?kn.fromBigInt(t,n):xn(t,n)},Yn.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<=2*$n},It(t,[{key:"rp",get:function(){return void 0===this.hp&&(this.hp=this.op()),this.hp}},{key:"ap",get:function(){return Ht.Fv?"android":Ht.Dv?"macos":Ht.ru?"ios":Ht.Nv?"windows":"other"}},{key:"cp",get:function(){return Ht.og?"tv":Ht.Ks?"mobile":"desktop"}},{key:"dp",get:function(){return!Ht.og}},{key:"lp",get:function(){if(c.screen)return{width:c.screen.width,height:c.screen.height}}},{key:"fp",get:function(){return c.devicePixelRatio||1}},{key:"vp",get:function(){return Qn}},{key:"_p",get:function(){return!1}},{key:"gp",get:function(){return!0}},{key:"pp",get:function(){return!!(Ht.X_||Ht.ru||Ht.g_)||!!Ht.D_}},{key:"mp",get:function(){return Ht.D_}},{key:"wp",get:function(){return!Ht.ru}},{key:"yp",get:function(){return!0}},{key:"Ap",get:function(){return!0}},{key:"bp",get:function(){return!1}},{key:"Sp",get:function(){}},{key:"Tp",get:function(){return!0}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){return Ht.D_}},{key:"Pp",get:function(){return!1}},{key:"Rp",get:function(){return!1}},{key:"Cp",get:function(){return!1}},{key:"Dp",get:function(){return!1}}]),t}(),ni=function(t){function n(){return t.call(this)||this}return Tt(n,t),n}(ti);x(),pt();var ii=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.xp=function(t,n){if(t&&t.Np&&n&&n.Np){var i=ei(t.Np,"mp4a.40.2")&&ei(n.Np,"mp4a.40.5"),e=ei(t.Np,"mp4a.40.5")&&ei(n.Np,"mp4a.40.2"),r=ei(t.Np,"mp4a.40.2")&&ei(n.Np,"mp4a.40.34"),o=ei(t.Np,"mp4a.40.34")&&ei(n.Np,"mp4a.40.2"),u=ei(t.Np,"mp4a.40.5")&&ei(n.Np,"mp4a.40.34"),s=ei(t.Np,"mp4a.40.34")&&ei(n.Np,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},It(n,[{key:"Sp",get:function(){if(Ht.Dv)return 4096}},{key:"Dp",get:function(){return!0}}]),n}(ni);function ei(t,n){return t.indexOf(n)>-1}x(),pt();var ri=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.Ip=function(t){return t>=2},n}(ni);x(),pt();var oi=function(t){function n(){var n;return(n=t.call(this)||this).Bp=Ht.Q_>=11,n.sp=Ht.X_&&!(Ht.ru&&Ht.Q_<10),n}return Tt(n,t),It(n,[{key:"Pp",get:function(){return Ht.Q_<17}},{key:"Rp",get:function(){return!0}}]),n}(ni);x(),pt();var ui,si=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),It(n,[{key:"Tp",get:function(){return!Ht.Nv||(Ht.v_?92!==Ht.m_:Ht.d_>=100)}}]),n}(ni);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var fi=function(){var t=_n();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Ht.Kv)return!1;var t=_n();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var hi=function(t){function n(n){var i;return(i=t.call(this)||this).Mp=void 0,i.Mp=n,i.Bp=i.Mp.Bp,i.Ke=i.Mp.Ke,i.sp=fi&&i.Mp.sp,i}Tt(n,t);var i=n.prototype;return i.op=function(){return this.Mp.rp},i.xp=function(t,n){return this.Mp.xp(t,n)},i.Ip=function(t){return this.Mp.Ip(t)},It(n,[{key:"Sp",get:function(){return this.Mp.Sp}},{key:"Tp",get:function(){return this.Mp.Tp}},{key:"Pp",get:function(){return this.Mp.Pp}},{key:"Dp",get:function(){return this.Mp.Dp}}]),n}(ti),ci=function(t){function n(n){var i;return(i=t.call(this,n)||this).Bp=!0,i.Ks=!0,i}return Tt(n,t),It(n,[{key:"bp",get:function(){return Ht.ru}}]),n}(hi);x(),pt();var ai=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.op=function(){return function(t){return t&&$t(c.ManagedMediaSource)?c.ManagedMediaSource:$t(c.MediaSource)?c.MediaSource:void 0}(!0)?t.prototype.op.call(this):1},It(n,[{key:"bp",get:function(){return!0}}]),n}(ci);x(),pt();var vi=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Up=void 0,n}return Tt(n,t),n.prototype.xp=function(n,i){return t.prototype.xp.call(this,n,i)},It(n,[{key:"_p",get:function(){return Ht.A_<3}},{key:"gp",get:function(){return Ht.A_>=3}},{key:"lp",get:function(){var t=this;return c.tizen&&!this.Up&&c.tizen.systeminfo.getPropertyValue("DISPLAY",function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.Up={width:i,height:e})}),this.Up}},{key:"kp",get:function(){return Ht.A_<3}}]),n}(hi);x(),pt();var di=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Up=void 0,n}return Tt(n,t),It(n,[{key:"lp",get:function(){var t=this;return c.webOS&&!this.Up&&c.webOS.deviceInfo(function(n){t.Up={width:n.screenWidth,height:n.screenHeight}}),this.Up}},{key:"yp",get:function(){return!1}}]),n}(hi);x(),pt();var li=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),It(n,[{key:"bp",get:function(){return!0}},{key:"Rp",get:function(){return this.Mp.Rp}}]),n}(hi);x(),pt();var wi=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),It(n,[{key:"Cp",get:function(){return Ht.IS_FIRETV_AFTMM}}]),n}(hi);!function(t){ui=t}(function(){var t=function(){if(Ht.W_)return new ii;if(Ht.N_||Ht.L_)return new ri;if(Ht.X_)return new oi;if(Ht.u_)return new si;return new ni}();return Ht.ru?new ai(t):Ht.I_?new wi(t):Ht.Ks?new ci(t):Ht.w_?new vi(t):Ht.S_?new di(t):Ht.Dv?new li(t):new hi(t)}()),x(),pt(),x(),pt(),M(),et(),x(),pt();var bi=!(Ht.L_&&!Ht.F_),gi=self.console;function mi(t){if(Kt(t))try{return JSON.stringify(t)}catch(t){}return t}function pi(t){return t.map(mi).join(" ")}function yi(t){var n=gi&&gi[t];return n?n.bind&&bi?n.bind(gi):function(){for(var n=arguments.length,i=new Array(n),e=0;e1?n-1:0),e=1;e1?n-1:0),e=1;eh&&(o=h),u>h&&(u=h),s=r,f=o;;)if(s=65&&t<=90}function Wi(t){return zi(t)||function(t){return t>=97&&t<=122}(t)}function Vi(t){return t>=48&&t<=57}function Hi(t){return Vi(t)||Wi(t)}function qi(t){return Vi(t)||t>=65&&t<=70||t>=97&&t<=102}function Xi(t){return zi(t)?t+32:t}function ji(t){return Vi(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Yi(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var Ki=y.min,Gi=String.fromCharCode;function $i(t){for(var n=t.length,i=[],e=0;e= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ne=y.floor,ie=String.fromCharCode;function ee(t){throw new RangeError(te[t])}function re(t){for(var n=[],i=0,e=t.length;i=55296&&r<=56319&&i>1,t+=ne(t/n);t>455;e+=36)t=ne(t/35);return ne(e+36*t/(t+38))},ce=function(t){return function(t,n){var i=t.split("@"),e="";i.length>1&&(e=i[0]+"@",t=i[1]);var r=function(t,n){for(var i=[],e=t.length;e--;)i[e]=n(t[e]);return i}((t=t.replace(Qi,".")).split("."),n).join(".");return e+r}(t,function(t){return Ji.test(t)?"xn--"+function(t){for(var n=[],i=(t=re(t)).length,e=128,r=0,o=72,u=0,s=t;u=e&&lne((Zi-r)/w)&&ee("overflow"),r+=(a-e)*w,e=a;for(var b=0,g=t;bZi&&ee("overflow"),m==e){for(var p=r,y=36;;y+=36){var _=y<=o?1:y>=o+26?26:y-o;if(p<_)break;var S=p-_,T=36-_;n.push(ie(fe(_+S%T,0))),p=ne(S/T)}n.push(ie(fe(p,0))),o=he(r,w,c==h),r=0,++c}}++r,++e}return n.join("")}(t):t})};function ae(t){for(var n=[],i=0;i65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return $i(n)}function ve(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function de(t,n){return t>>n&63|128}function le(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(de(t,12)),n.push(de(t,6))):(ve(t),n.push(t>>12&15|224),n.push(de(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function we(t){for(var n=[],i=0;i=ue)throw new g("Invalid byte index");var t=255&oe[se];if(se++,128==(192&t))return 63&t;throw new g("Invalid continuation byte")}function ge(){var t,n;if(se>ue)throw new g("Invalid byte index");if(se===ue)return!1;if(t=255&oe[se],se++,!(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|be())>=128)return n;throw new g("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|be()<<6|be())>=2048)return ve(n),n;throw new g("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|be()<<12|be()<<6|be())>=65536&&n<=1114111)return n;throw new g("Invalid UTF-8 detected")}function me(t){return[37,Yi(t>>4),Yi(15&t)]}function pe(t){return function(t){return t>=0&&t<=31}(t)||t>126}function ye(t){return pe(t)||32===t||34===t||60===t||62===t||96===t}function _e(t){return ye(t)||35===t||63===t||123===t||125===t}function Se(t){return _e(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Te(t){return t<33||t>126||34===t||35===t||60===t||62===t}function ke(t){return Te(t)||39===t}function Ie(t,n){if(!n(t))return[t];for(var i=we([t]),e=[],r=0;r6)throw new m;for(var f=0;o0){if(!("."===t[o]&&f<4))throw new m;o+=1}if(!Ni.test(t[o]))throw new m;for(;o255)throw new m}o+=1}i[e]=i[e]<<8|h,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new m;break}if(":"===t[o]){if((o+=1)===n)throw new m}else if(o0;)Ui(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new m;return i}function Pe(t){var n=10,i=Di;return Ai.test(t)?(t=t.slice(2),n=16,i=Ci):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=xi),""===t?0:i.test(t)?_(t,n):void 0}var Ae={Vp:4},De=/[\0\t\n\r #%/:?@\[\\\]]/,Ce=/[\0\t\n\r #/:?@\[\\\]]/;function xe(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new m("Invalid IPv6 address");return{Vp:2,Hp:Ne(t.slice(1,-1))}}if(!n)return function(t){if(Ce.test(t))throw new m("Invalid code point in opaque host");var n=Ee(t,pe);return""===n?Ae:{Vp:3,Wp:n}}(t);var i=function(t){var n=function(t){return ce(t.toLowerCase())}(t);return n}(Oe(t));if(De.test(i))throw new m("Invalid code point in host");var e=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var i=[],e=0;e255)throw new m;if(i[i.length-1]>=y.pow(256,5-i.length))throw new m;for(var s=i.pop(),f=0;f>>=8;return n.reverse().join("")}(t.Hp);case 2:return"["+function(t){for(var n="",i=function(t){for(var n=0,i=0,e=0,r=0,o=0;o<8;o++)0===t[o]?(0===r&&(e=o),r++):(r>i&&(n=e,i=r),r=0);return r>i&&(n=e,i=r),i>1?n:null}(t),e=!1,r=0;r<8;r++){if(e){if(0===t[r])continue;e=!1}i!==r?(n+=t[r].toString(16),7!==r&&(n+=":")):(n+=0===r?"::":":",e=!0)}return n}(t.Hp)+"]";case 3:return t.Wp;case 4:return""}}var Me=/\+/g;function Fe(t){return 42===t||45===t||46===t||95===t||Hi(t)}function Le(t){for(var n=t.split("&"),i=[],e=0;e0&&(n+="&"),n+=ze(we(re(e[0])))+"="+ze(we(re(e[1])))}return n}function ze(t){for(var n=[],i=0;i0&&"?"===t[0]&&(t=t.slice(1)),this.zp=Le(t)}var n=t.prototype;return n.append=function(t,n){t=Ve(t),n=Ve(n),this.zp.push([t,n]),Ge(this)},n.delete=function(t){t=Ve(t);for(var n=this.zp,i=0;i=2))return!1;if(!dr(t.slice(0,2)))return!1;if(2!==n){var i=t[2];if(47!==i&&92!==i&&63!==i&&35!==i)return!1}return!0}function vr(t){return 2===t.length&&Oi.test(t[0])&&(":"===t[1]||"|"===t[1])}function dr(t){return 2===t.length&&vr($i(t))}function lr(t){return vr(t)&&":"===t[1]}function wr(t){var n=t.Jp;0!==n.length&&("file"===t.Qp&&1===n.length&&lr(n[0])||n.pop())}function br(t){return null===t.Zp||Ae===t.Zp||t.$p||"file"===t.Qp}var gr=-1,mr=/\t|\n|\r/g,pr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function yr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new Sr,t=t.replace(pr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=re(t=t.replace(mr,"")),c=h.length,a=0;a<=c;){var v=a65535)throw new m("Invalid port");i.im=y===er[i.Qp]?null:y,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.Qp="file",47===v||92===v?r=14:n&&"file"===n.Qp?gr===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp=n.Gp):63===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp="",r=19):35===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp=n.Gp,i.nm="",r=20):(ar(h.slice(a))||(i.Zp=n.Zp,i.Jp=n.Jp.slice(),wr(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.Qp&&!ar(h.slice(a))&&(lr(n.Jp[0])?i.Jp.push(n.Jp[0]):i.Zp=n.Zp),r=17,a-=1);break;case 15:if(gr===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&dr(o))r=17;else if(0===o.length){if(i.Zp=Ae,null!==e)return;r=16}else{var S=xe(ae(o),hr(i));if(0===S.Vp&&"localhost"===S.qp&&(S=Ae),i.Zp=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:hr(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.Gp="",r=19):null===e&&35===v?(i.nm="",r=20):gr!==v&&(r=17,47!==v&&(a-=1));break;case 17:if(gr===v||47===v||hr(i)&&92===v||null===e&&(63===v||35===v)){var T=ae(o);if(sr(T)?(wr(i),47===v||hr(i)&&92===v||i.Jp.push("")):!ur(T)||47===v||hr(i)&&92===v?ur(T)||("file"===i.Qp&&0===i.Jp.length&&dr(o)&&(Ae!==i.Zp&&null!==i.Zp&&(i.Zp=Ae),o[1]=58,T=ae(o)),i.Jp.push(T)):i.Jp.push(""),o.length=0,"file"===i.Qp&&(gr===v||63===v||35===v))for(;i.Jp.length>1&&""===i.Jp[0];)i.Jp.shift();63===v?(i.Gp="",r=19):35===v&&(i.nm="",r=20)}else o.push.apply(o,Ie(v,_e));break;case 18:63===v?(i.Gp="",r=19):35===v?(i.nm="",r=20):gr!==v&&(i.Jp[0]+=ae(Ie(v,pe)));break;case 19:null===e&&35===v?(i.nm="",r=20):gr!==v&&(i.Gp+=ae(Ie(v,hr(i)?ke:Te)));break;case 20:gr===v||0===v||(i.nm+=ae(Ie(v,ye)))}a++}return i}function _r(t,n,i,e){try{yr(t,n,i,e)}catch(t){}}var Sr=function(){this.Qp="",this.Kp="",this.Yp="",this.Zp=null,this.im=null,this.Jp=[],this.Gp=null,this.nm=null,this.$p=!1};function Tr(t){switch(t.Qp){case"blob":var n;try{n=yr(t.Jp[0],null)}catch(t){return ir}return Tr(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+Be(n)+(null===i?"":":"+i)}(t.Qp,t.Zp,t.im);default:return ir}}var kr=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof kr&&"object"==typeof t.rc}(n))e=n.rc;else try{e=yr(String(n),null)}catch(t){throw new m("Invalid base URL: "+t.message)}try{i=yr(String(t),e)}catch(t){throw new m("Invalid URL: "+t.message)}var r=i.Gp;this.rc=i,this.Gp=function(t){var n=new $e;return null!==t&&Ke(n,t),n}(r),this.Gp.rc=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&Ii(t.prototype,n),i&&Ii(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.Qp+":";if(null!==t.Zp?(i+="//",cr(t)&&(i+=t.Kp,""!==t.Yp&&(i+=":"+t.Yp),i+="@"),i+=Be(t.Zp),null!==t.im&&(i+=":"+t.im)):null===t.Zp&&"file"===t.Qp&&(i+="//"),t.$p)i+=t.Jp[0];else for(var e=0,r=t.Jp;e1?n-1:0),e=1;e>>=1);)e+=e;return r}),go=(String.prototype.padStart,String.prototype.padEnd,16384),mo="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=go?(n=String).fromCodePoint.apply(n,[].concat(t)):yo(t,String.fromCodePoint)}:function(t){for(var n,i=[],e=Rt(t);!(n=e()).done;){var r=n.value;r>65535&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r)}return po(i)};function po(t){var n;return t.length<=go?(n=String).fromCharCode.apply(n,[].concat(t)):yo(t,String.fromCharCode)}function yo(t,n){for(var i=[],e=0;e=42||Ht.W_&&Ht.z_>=38||Ht.N_||Ht.F_||Ht.Y_&&Ht.Z_>=29;function So(t,n){return function(t,n){return Xt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[jr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[jr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var To=function(){function t(t){this.hw=void 0,this.ew=Kr(),this.ow=void 0,this.hw=t}var n=t.prototype;return n.Am=function(){return this.Tm(ao)},n.pm=function(){return this.Tm(lo)},n.ym=function(){return this.Tm(co)},n.wm=function(){return this.Tm(vo)},n.Tm=function(t){var n=t.$m,i=this.ew.get(n);if(i)return i;var e=this.Sm(t,'video/mp4; codecs="avc1.42000a"');return this.ew.set(n,e),e},n.Sm=function(t,n){return nn(function(){return en(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,this.hw.nw(t.Ym,[So(n,!0)])];case 1:return i.sent(),[2,!0];case 2:i.sent(),i.label=3;case 3:return i.trys.push([3,5,,6]),[4,this.hw.nw(t.Ym,[So(n,!1)])];case 4:return i.sent(),[2,!0];case 5:return i.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}})}).call(this)},n._m=function(){return this.ow||(this.ow=this.aw()),this.ow},n.aw=function(){return nn(function(){return en(this,function(t){switch(t.label){case 0:return"https:"===c.location.protocol?[2,!1]:_o?[4,this.pm()]:[2,!1];case 1:return t.sent()?[2,!1]:[2,!0]}})}).call(this)},t}();function ko(t,n,i){if("function"==typeof i)i.call(t,n);else for(var e,r=Rt(i);!(e=r()).done;){e.value.call(t,n)}}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var Io=function(){function t(t){var n=this;this.cw=Yr(),this.fw=void 0,this.dw=0,this._w=void 0,this.Rs=function(t){n.So(t)},this._w=null!=t?t:this}var n=t.prototype;return n.wn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.uw(t,n);else for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;this.uw(r,n)}},n.uw=function(t,n){var i=this.cw[t];void 0===i?this.cw[t]=n:"function"==typeof i?this.cw[t]=[i,n]:0===this.dw?i.push(n):this.cw[t]=i.concat(n)},n.lw=function(t){if("function"==typeof t){var n=this.fw;void 0===n?this.fw=t:"function"==typeof n?this.fw=[n,t]:0===this.dw?n.push(t):this.fw=n.concat(t)}},n.Vo=function(){this.cw=Yr(),this.fw=void 0},n.So=function(t){this.dw++;var n=this.cw[t.type],i=this.fw;void 0!==n&&ko(this._w,t,n),void 0!==i&&ko(this._w,t,i),this.dw--},n.mn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.gw(t,n);else for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;this.gw(r,n)}},n.gw=function(t,n){var i=this.cw[t];void 0!==i&&("function"==typeof i?i===n&&(this.cw[t]=void 0):0===this.dw?fn(i,n):this.cw[t]=hn(i,n))},n.pw=function(t){if("string"==typeof t)this.cw[t]=void 0;else for(var n,i=Rt(t);!(n=i()).done;){var e=n.value;this.cw[e]=void 0}},n.mw=function(t){var n=this.fw;void 0!==n&&("function"==typeof n?n===t&&(this.fw=void 0):0===this.dw?fn(n,t):this.fw=hn(n,t))},n.ww=function(t,n){var i=this;return new tt(function(e,r){if(n&&n.Hg)return r(new bn);var o=function(t){s(),e(t)},u=function(){s(),r(new bn)},s=function(){i.mn(t,o),n&&n.jg(u)};i.wn(t,o),n&&n.Xg(u)})},t}();x(),pt(),x(),pt();var Eo=function(t,n){void 0===n&&(n=new Date),this.type=void 0,this.date=void 0,this.type=t,this.date=n};x(),pt();var Ro=function(t){return t.yw="Aw",t.Sw="Tw",t.Ew="contentprotectionerror",t.Pw="contentprotectionsuccess",t.xw="currentsourcechange",t.Iw="destroy",t.Rw="durationchange",t.Cw="emptied",t.Dw="encrypted",t.Bw="ended",t.Nw="Mw",t.Lw="Ow",t.Fw="Uw",t.Vw="Hw",t.Ww="loadstart",t.qw="manifestupdate",t.zw="nosupportedrepresentationfound",t.Gw="offline",t.Xw="online",t.jw="pause",t.uo="play",t.Qw="progress",t.Kw="ratechange",t.Yw="representationchange",t.Jw="resize",t.Zw="seeked",t.$w="seeking",t.iy="segmentnotfound",t.ey="sy",t.oy="uy",t.ly="vy",t.do="sourcechange",t._y="timeupdate",t.gy="volumechange",t.py="wy",t.yy="Ay",t.LICENSE_REQUEST_GENERATED="by",t.Sy="metricschange",t}({}),Oo=["cenc"],No=["cbcs","cbcs-1-9"],Po=function(t){function n(n){var i;return(i=t.call(this,Ro.yy)||this).Ty=void 0,i.Ty=n,i}return Tt(n,t),n}(Eo),Ao=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"Py")||this).xy=void 0,o.Iy=void 0,o.Py=void 0,o.Ry=void 0,o.xy=n,o.Iy=i,o.Py=e,o.Ry=r,o}return Tt(n,t),n}(Eo),Do=function(t){function n(){return t.call(this,"lt")||this}return Tt(n,t),n}(Eo);x(),pt(),x(),pt(),x(),pt();var Co="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");function xo(t,n,i){return Co[t>>2]+Co[(3&t)<<4|n>>4]+Co[(15&n)<<2|i>>6]+Co[63&i]}function Bo(t,n,i){for(var e=[],r=n;r=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Lo(t,n){return t>>n&63|128}function Uo(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(Lo(t,12)),n.push(Lo(t,6))):(Fo(t),n.push(t>>12&15|224),n.push(Lo(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function zo(t,n){if(n.ac>=t.length)throw new g("Invalid byte index");var i=255&t[n.ac];if(n.Ny(1),128==(192&i))return 63&i;throw new g("Invalid continuation byte")}function Wo(t,n){var i=n.ac;if(i>t.length)throw new g("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.Ny(1),!(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|zo(t,n);if(r>=128)return r;throw new g("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|zo(t,n)<<6|zo(t,n);if(o>=2048)return Fo(o),o;throw new g("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|zo(t,n)<<12|zo(t,n)<<6|zo(t,n);if(u>=65536&&u<=1114111)return u}throw new g("Invalid UTF-8 detected")}x(),pt(),x(),pt();function Vo(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.ac,i);return n.Ny(2),e}function Ho(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.ac,i,e),n.Ny(2)}function qo(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.ac,i,e),n.Ny(4)}function Xo(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o=55296&&r<=56319&&i>2]+Co[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(Co[s>>2]+Co[(3&s)<<4|f>>4]+Co[(15&f)<<2]+"=")}return e.join("")}(new k(t))}var ou=new k([0]).buffer,uu=function(){function t(){this.nc=void 0,this.nc=[]}var n=t.prototype;return n.Hy=function(t){for(var n,i=Rt(this.nc);!(n=i()).done;){if(iu(n.value[0],t))return!0}return!1},n.Wy=function(t){for(var n,i=Rt(this.nc);!(n=i()).done;){var e=n.value;if(iu(e[0],t))return e[1]}},n.qy=function(t,n){for(var i,e=Rt(this.nc);!(i=e()).done;){var r=i.value;if(iu(r[0],t))return void(r[1]=n)}this.nc.push([t,n])},n.zy=function(t,n){this.nc.forEach(function(n){return t(n[1],n[0])},n)},n.Gy=function(){an(this.nc)},It(t,[{key:"Vy",get:function(){return this.nc.length}}]),t}();x(),pt();var su=function(){function t(){var t=this;this.Qy=void 0,this.Qd=void 0,this.Kd=void 0,this.Qy=new tt(function(n,i){t.Qd=n,t.Kd=i})}var n=t.prototype;return n.Xy=function(t){this.Qd&&(this.Qd(t),this.zg())},n.jy=function(t){this.Kd&&(this.Kd(t),this.zg())},n.Zg=function(){this.Qy.catch(Jt),this.jy(new bn)},n.$g=function(t){var n=this;t.then(function(t){return n.Xy(t)},function(t){return n.jy(t)})},n.zg=function(){this.Qd=void 0,this.Kd=void 0},t}();function fu(t,n){return t===Qr?function(t){if(t.byteLength<2*hu.length)return t;var n=new DataView(t,0,2*hu.length),i=jo(n,!0);if(i===hu)return t;return function(t){var n='',i='Content-Typetext/xml; charset=utf-8SOAPAction"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"',e=""+n+ru(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new k(2*t.length);return Xo(Go(i),new Qo,t,n),i}(e,!0).buffer}(t)}(n):n}x(),pt();var hu=">8-this.Zy;return(e<0?1:0}},p.defineProperty(t.prototype,"bitLength",{get:function(){return this.Jy.bitLength-this.Zy},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"length",{get:function(){return this.Jy.length},enumerable:!1,configurable:!0})}();x(),pt(),x(),pt();y.pow(2,-52);function lu(t,n,i){return y.min(y.max(t,n),i)}function wu(t,n){return t>>8-n}function bu(t,n){return t&(1<7&&(this.tA++,this.iA=0)},t.prototype.seek=function(t,n){this.tA=t,this.iA=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new g("Cannot read past end of buffer.");return this.$y.get(this.tA)>>7-this.iA&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new g("Cannot read past end of buffer.");if(0===this.iA)return this.$y.get(this.tA++);var t=bu(this.$y.get(this.tA),8-this.iA),n=wu(this.$y.get(this.tA+1),this.iA);return this.tA++,t<32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=0;if(0===this.iA&&t%8==0)for(var i=t-8;i>=0;i-=8)n|=this.readByte()<=0;i--)n|=this.readBit()<32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<>3,this.iA=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;in?1:T(t)?T(n)?0:1:-1},pu=function(){function t(){this.eA=[],this.sA=[],this.nA=0}return t.from=function(){for(var n=[],i=0;i=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.sA[n];return this.eA[n][i]}},p.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.eA.length<1)return-1;if(this.eA.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.eA[0];return"number"==typeof t?du(i,t):"undefined"!=typeof Buffer?Buffer.from(i.buffer,i.byteOffset,i.byteLength).indexOf(t):function(t,n){if(0===n.length)return 0;for(var i=n[0],e=n.length,r=t.length-e,o=0;o<=r&&!((o=du(t,i,o))<0||o>r);o++){for(var u=o+1,s=o+e,f=1;u4)throw new g("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new g("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-n)+")");if(1===n)return this.get(t);for(var i=0,e=0;er)return new t;if(e===r)return new t;for(var o=new t,u=this.findContainingBufferIndex(e),s=this.eA[u],f=e,h=f-this.sA[u];f+s.length-h=0&&i>=0;){if(0!==e[r])break;if(0===r){if(0===i)return new t;i-=1,r=(e=this.eA[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),yu=function(){function t(n){this.rA=n||t.BUFFER_CHUNK_SIZE,this.hA=!1,this.oA=new pu,this.$y=new k(this.rA),this.aA=0,this.uA=0,this.iA=7}return t.prototype.closeByte=function(){this.$y[this.aA++]=this.uA,this.aA>=this.rA&&this.closeBuffer(),this.uA=0,this.iA=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.aA&&(this.oA.pushRange(this.$y,0,this.aA),t&&(this.$y=new k(this.rA)),this.aA=0)},p.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.iA},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.hA)throw new g("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.hA=!0,this.oA},t.prototype.writeBit=function(t){if(this.hA)throw new g("Cannot write to a closed BitWriter.");this.uA|=t<32)throw new g("The max bitlength that can be provided is 32.");if(t>=y.pow(2,n))throw new g("Uint "+t+" cannot be represented in "+n+" bit(s).");if(this.isWritingStartBit&&n%8==0)for(var i=n-8;i>=0;i-=8)this.writeByte(t>>i&255);else for(i=n-1;i>=0;i--)this.writeBool((t&1<0)},t.prototype.writeInt=function(t,n){if(n>32)throw new g("The max bitlength that can be provided is 32.");if(y.abs(t)>=y.pow(2,n-1))throw new g("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+y.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new g("Received a negative number.");for(var n=y.floor(y.log2(t+1))+1,i=0;i=t.LARGE_SIZE/8,r=16===this.boxType.length;n.writeUInt(e?1:i,32),n.writeString(r?"uuid":this.boxType),e&&(n.writeUInt(y.floor(i/t.LARGE_SIZE),32),n.writeUInt(i%t.LARGE_SIZE,32)),r&&n.writeString(this.boxType)},t.prototype.getSize=function(){var n=8+(this.boxType.length>4?16:0),i=this.getBoxContentSize()+n;return i>=t.LARGE_SIZE/8&&(i+=8),i},t.prototype.serialize=function(){var t=new _u;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=y.pow(2,32),t}();function Tu(t,n){return B(t,Kn)?64===n:t65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r)}return Au(n)}(e)}(t,n,!0)}function Wu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new k(t.buffer,t.byteOffset+n,i-n)}function Vu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new DataView(t.buffer,t.byteOffset+n,i-n)}function Hu(t){return new k(t.buffer,t.byteOffset,t.byteLength)}var qu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new Nu(this.offset<<3)},t}();x(),pt();var Xu=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return Cu(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextUint32=function(){return Mu(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt32(n.offset,i);return n.shift(4),e}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,n,i){void 0===i&&(i=!1);var e=Mu(t,n,i),r=Mu(t,n,i),o=i?r:e,u=i?e:r;return Kn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Fu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return xu(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,n,i){for(var e=[],r=0;rt.byteLength){var s=u;return n.seek(i),{complete:!1,neededOffset:s}}var f={type:r.type,offset:i,data:new Xu(Vu(t,i,u),new qu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Gu(t){return{version:t>>24,flags:new Du(16777215&t)}}function $u(t,n){var i,e,r,o;return 1===n?(i=t.nextUint64(),e=t.nextUint64(),r=t.nextUint32(),o=t.nextUint64()):(i=t.nextUint32(),e=t.nextUint32(),r=t.nextUint32(),o=t.nextUint32()),{creation:i,modification:e,scale:r,duration:o}}function Zu(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function Ju(t){var n=t.nextUint32Array(9);return{a:Eu(n[0],16),b:Eu(n[1],16),u:Eu(n[2],30),c:Eu(n[3],16),d:Eu(n[4],16),v:Eu(n[5],30),x:Eu(n[6],16),y:Eu(n[7],16),w:Eu(n[8],30)}}function Qu(t){return new Ou(t.type,Wu(Hu(t.data.data),t.data.cursor.offset))}var ts=function(t){function n(n,i,e,r){void 0===e&&(e=0),void 0===r&&(r=0);var o=t.call(this,"hdlr",e,r)||this;return o.name=i,o.handlerType=n,o}return vu(n,t),p.defineProperty(n.prototype,"handlerType",{get:function(){return this.dA},set:function(t){this.dA=t},enumerable:!1,configurable:!0}),n.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(i=null===(n=this.name)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeString(this.handlerType),this.serializeReserved(n),this.name&&n.writer.writeString(this.name),n.writer.writeByte(0)},n}(Ru);function ns(t){var n=t.data,i=Gu(n.nextUint32()),e=i.version,r=i.flags;n.skip(4);var o=n.nextChars(4);n.skip(12);var u=n.nextUTF8String();return new ts(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}vu(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(ts);x(),pt(),x(),pt(),x(),pt();var is=function(){function t(t,n){void 0===n&&(n=!1),this.fixed28BitMode=n,this.tag=t}return t.prototype.encodeSize=function(t){for(var n=[];t>0;)n.length>0&&(n[n.length-1]+=128),n.push(t%128),t>>=7;if(this.fixed28BitMode)for(;n.length<4;)n.push(128);return n.reverse()},p.defineProperty(t.prototype,"tag",{get:function(){return this.lA},set:function(t){if(!Tu(t,8))throw new g("Provided tag does not fit in 8 bits.");this.lA=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return this.getDescriptorSize()+1+this.encodeSize(this.getDescriptorSize()).length},t.prototype.serialize=function(t){t.writer.writeByte(this.tag);for(var n=0,i=this.encodeSize(this.getDescriptorSize());n0)throw new g("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeByte(this.defaultSampleInfoSize),n.writer.writeUInt(this.sampleInfoSizes.length,32);for(var i=0,e=this.sampleInfoSizes;i1)throw new g("Provided balance does not fit in the allowed range [-1, 1].");if(!Tu(ku(t,8),16))throw new g("Provided balance does not fit in 16 bits (fixed 8.8).");this.Ob=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(ku(this.balance,8),16),n.writer.writeUInt(0,16)}}(Ru);x(),pt();!function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}vu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.EA},set:function(t){if(!Tu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Tu(t,32)}))throw new g("Not all entries can be represented in 32 bits.");this.EA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i31)throw new g("The provided compressorName should at most be 31 characters long.");this.Hb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"frameCount",{get:function(){return this.Wb},set:function(t){if(!Tu(t,16))throw new g("Provided frameCount does not fit in 16 bits.");this.Wb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"depth",{get:function(){return this.qb},set:function(t){if(!Tu(t,16))throw new g("Provided depth does not fit in 16 bits.");this.qb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i,e,r,o,u;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(i=null===(n=this.clap)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)+(null!==(r=null===(e=this.pasp)||void 0===e?void 0:e.getSize())&&void 0!==r?r:0)+(null!==(u=null===(o=this.extra)||void 0===o?void 0:o.length)&&void 0!==u?u:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.width,16),n.writer.writeUInt(this.height,16),n.writer.writeUInt(ku(this.horizontalResolution,16),32),n.writer.writeUInt(ku(this.verticalResolution,16),32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.frameCount,16),n.writer.writeByte(this.compressorName.length),n.writer.writeString(this.compressorName);for(var i=0;i<31-this.compressorName.length;i++)n.writer.writeByte(0);n.writer.writeUInt(this.depth,16),n.writer.writeInt(-1,16),this.clap&&n.concat(this.clap.serialize()),this.pasp&&n.concat(this.pasp.serialize()),this.extra&&Iu(n.writer,this.extra)},n}(us);x(),pt(),x(),pt(),M();!function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(B(this.esDescriptor,k)?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),B(this.esDescriptor,k)?n.concat(pu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Ru);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.esd.serialize())}}(ss);x(),pt();!function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,"mp4v",n,i,r)||this;return o.esDescriptor=e,o}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(pf);x(),pt();!function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(us);x(),pt(),x(),pt();!function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}vu(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(Su);x(),pt();!function(){function t(t,n,i,e,r,o){void 0===o&&(o=1),this.lengthSizeMinusOne=i,this.version=o,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=n,this.spsSets=e,this.ppsSets=r}p.defineProperty(t.prototype,"version",{get:function(){return this.zb},set:function(t){if(!Tu(t,8))throw new g("Provided version does not fit in 8 bits.");this.zb=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileIndication",{get:function(){return this.Gb},set:function(t){if(!Tu(t,8))throw new g("Provided profileIndication does not fit in 8 bits.");this.Gb=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.Xb},set:function(t){if(!Tu(t,8))throw new g("Provided profileCompatibility does not fit in 8 bits.");this.Xb=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"levelIndication",{get:function(){return this.jb},set:function(t){if(!Tu(t,8))throw new g("Provided levelIndication does not fit in 8 bits.");this.jb=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"spsSets",{get:function(){return this.Qb},set:function(t){if(!Tu(t.length,5))throw new g("Provided number of spsSets exceeds the max (32)");this.Qb=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"ppsSets",{get:function(){return this.Kb},set:function(t){if(!Tu(t.length,8))throw new g("Provided number of ppsSets exceeds the max (256)");this.Kb=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce(function(t,n){return t+n.length},0)+2*this.ppsSets.length+this.ppsSets.reduce(function(t,n){return t+n.length},0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var n=0,i=this.spsSets;n0&&(null!==(r=null===(e=i.constantIv)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0)throw new g("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return s.kId=i.kId,s.isProtected=null!==(o=i.isProtected)&&void 0!==o?o:1,i.perSampleIvSize>0?s.perSampleIvSize=i.perSampleIvSize:s.constantIv=null!==(u=i.constantIv)&&void 0!==u?u:new k(0),s}return vu(n,t),p.defineProperty(n.prototype,"isProtected",{get:function(){return this.Zb},set:function(t){if(!Tu(t,8))throw new g("Provided isProtected does not fit in 1 byte.");this.Zb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.$b},set:function(t){if(![8,16].includes(t))throw new g("Provided perSampleIvSize does not match any allowed value [8, 16].");this.$b=t,this.tS=new k(0)},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"kId",{get:function(){return this.iS},set:function(t){if(16!==t.length)throw new g("Provided kId length is not 16.");this.iS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"constantIv",{get:function(){return this.tS},set:function(t){if(![8,16].includes(t.length))throw new g("Provided constant IV length does not match any allowed value [8, 16].");this.tS=t,this.$b=0},enumerable:!1,configurable:!0}),n.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeOwnContent(n)},n.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),Iu(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),Iu(t.writer,this.constantIv))},n}(Ru),_f=(function(t){function n(n){return t.call(this,0,n)||this}vu(n,t)}(yf),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return vu(n,t),p.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.eS},set:function(t){if(!Tu(t,4))throw new g("Provided cryptByteBlocks does not fit in 4 bits.");this.eS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.sS},set:function(t){if(!Tu(t,4))throw new g("Provided skipByteBlocks does not fit in 4 bits.");this.sS=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(yf));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new _f(n),i}vu(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Ps);function Sf(t){return void 0!==t.iv}function Tf(t){return void 0!==t.subsamples}x(),pt();!function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}vu(n,t),p.defineProperty(n.prototype,"samples",{get:function(){return this.wb},set:function(t){var n;if(!Tu(t.length,32))throw new g("The number of samples provided does not fit in 32 bits.");for(var i=0,e=t;i0&&(e.cS.Gy(),e.So(new Po(e.cS))),e.uS.removeEventListener("keystatuseschange",e.wS),e.uS.removeEventListener("message",e.yS)},e.uS.addEventListener("keystatuseschange",e.wS),e.uS.addEventListener("message",e.yS),e.cS=new uu;var r=[];return e.uS.closed&&r.push(tt.resolve(e.uS.closed)),e.fS=new su,r.push(e.fS.Qy),e.zd=tt.race(r).then(e.bS,e.bS),e.gS(),e}Tt(n,t);var i=n.prototype;return i.Xs=function(){if(this.lS)return this.zd;var t=[];return t.push(tt.resolve(this.uS.close())),t.push(yn(1e3)),this.fS.$g(tt.race(t).catch(Rf)),this.lS=!0,this.zd},i.vS=function(t,n,i){if(Ht.e_){var e=If(Zo(n));if(1===e.version)n=new Ds(e.systemId,e.data).serialize().join()}return tt.resolve(this.uS.generateRequest(t,n)).catch(Rf)},i.Un=function(t){return tt.resolve(this.uS.load(t)).catch(Rf)},i._S=function(){return tt.resolve(this.uS.remove()).catch(Rf)},i.er=function(t){return tt.resolve(this.uS.update(t)).catch(Rf)},i.gS=function(){var t=this;this.cS.Gy(),this.uS.keyStatuses.forEach(function(n,i){t.pS(i,n)}),this.So(new Po(this.cS))},i.pS=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=Zo(t);if(this.mS===Qr&&16===e.byteLength&&(Ht.v_||Ht.dg)){var r=Go(e),o=r.getUint32(0,!0),u=r.getUint16(4,!0),s=r.getUint16(6,!0);r.setUint32(0,o,!1),r.setUint16(4,u,!1),r.setUint16(6,s,!1)}this.mS===Qr&&"status-pending"===n&&(n="usable"),this.cS.qy(e,n)},It(n,[{key:"oS",get:function(){return this.zd}},{key:"aS",get:function(){return this.uS.expiration}},{key:"Ty",get:function(){return this.cS}},{key:"dS",get:function(){return this.uS.sessionId}}]),n}(Io);function Rf(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|_(i[1],16))}throw new cu(t.message,void 0,n,t)}var Of=function(){function t(t,n,i){this.TS=void 0,this.kS=void 0,this.Cd=void 0,this.TS=t,this.kS=n,this.Cd=i}var n=t.prototype;return n.SS=function(t){return nn(function(){return en(this,function(n){return[2,new Ef(this.TS.createSession(t),this.kS)]})}).call(this)},n.ES=function(t){return tt.resolve(this.TS.setServerCertificate(t))},n._n=function(t){return tt.resolve(t.setMediaKeys(this.TS))},n.PS=function(t){return tt.resolve(t.setMediaKeys(null))},n.hr=function(){return tt.resolve()},t}(),Nf=function(){function t(t,n,i){this.xS=void 0,this.mS=void 0,this.RS=void 0,this.xS=t,this.mS=n,this.RS=i}var n=t.prototype;return n.IS=function(){return nn(function(){var t;return en(this,function(n){switch(n.label){case 0:return[4,this.xS.createMediaKeys()];case 1:return t=n.sent(),[2,new Of(t,this.mS,this.RS)]}})}).call(this)},n.CS=function(){return this.RS},It(t,[{key:"kS",get:function(){return this.xS.keySystem}}]),t}();function Pf(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function Af(t,n,i,e){var r=!1;if(!(e.persistentState&&"optional"!==e.persistentState||e.distinctiveIdentifier&&"optional"!==e.distinctiveIdentifier)){var o={audioCapabilities:[],videoCapabilities:[],persistentState:e.persistentState||"optional",distinctiveIdentifier:e.distinctiveIdentifier||"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label,MS:e.MS},u=!1;if(e.audioCapabilities){var s=e.audioCapabilities.filter(function(t){return Boolean(t.contentType)});s.length&&(o.audioCapabilities=s.filter(function(e){return Df(t,n,i,e)}),u=!0,o.audioCapabilities.length&&(r=!0))}if(e.videoCapabilities){var f=e.videoCapabilities.filter(function(t){return Boolean(t.contentType)});f.length&&(o.videoCapabilities=f.filter(function(e){return Df(t,n,i,e)}),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function Df(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!cn(n,e.encryptionScheme))&&(!e.robustness&&t(i,Pf(e.contentType))))}function Cf(t){if(t.videoCapabilities)for(var n,i=Rt(t.videoCapabilities);!(n=i()).done;){var e=n.value;if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r,o=Rt(t.audioCapabilities);!(r=o()).done;){var u=r.value;if(u.contentType)return u.contentType}}function xf(t){for(var n,i=[],e=Rt(t);!(n=e()).done;){var r=n.value;r.encryptionScheme&&i.push({contentType:r.contentType,robustness:r.robustness})}return t.concat(i)}function Bf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Mf))||!(!t.videoCapabilities||!t.videoCapabilities.some(Mf))}function Mf(t){return!t.robustness}function Ff(t,n){for(var i,e=[],r=Rt(t);!(i=r()).done;){var o=i.value;o.robustness?e.push(o):e.push(jr({},o,{robustness:n}))}return e}x(),pt(),x(),pt();var Lf=function(){function t(){}return t.prototype.nw=function(t,n){return nn(function(){var i,e,r,o,u,s,f,h;return en(this,function(c){switch(c.label){case 0:for(n=n.filter(function(t){return!t.MS}),i=Rt(n);!(e=i()).done;)(r=e.value).audioCapabilities&&(r.audioCapabilities=xf(r.audioCapabilities)),r.videoCapabilities&&(r.videoCapabilities=xf(r.videoCapabilities));if(t!==io||!n.some(Bf))return[3,4];o=n.map(function(t){return function(t,n){return jr({},t,{videoCapabilities:t.videoCapabilities?Ff(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Ff(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")}),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,v.requestMediaKeySystemAccess(t,o)];case 2:return u=c.sent(),s=u.getConfiguration(),[2,new Nf(u,t,s)];case 3:return c.sent(),[3,4];case 4:return[4,v.requestMediaKeySystemAccess(t,n)];case 5:return f=c.sent(),h=f.getConfiguration(),[2,new Nf(f,t,h)]}})})()},t.LS=function(){return void 0!==v&&"function"==typeof v.requestMediaKeySystemAccess},t}();x(),pt(),x(),pt(),x(),pt(),x(),pt();var Uf=function(t){function n(n,i){var e;return(e=t.call(this)||this).zS=void 0,e.GS=void 0,e.lS=void 0,e.US=void 0,e.KS=void 0,e.WS=void 0,e.VS=void 0,e.FS=void 0,e.bS=void 0,e.XS=void 0,e.Ts=void 0,e.jS=void 0,e.zS=n,e.GS=i,e.lS=!1,e.KS=void 0,e.WS=void 0,e.FS=void 0,e.bS=function(){e.lS=!0,e.US.Xy(void 0),e.FS&&(e.FS.removeEventListener("mskeyclose",e.bS),e.FS.removeEventListener("mskeymessage",e.XS),e.FS.removeEventListener("mskeyerror",e.Ts),e.FS.removeEventListener("mskeyadded",e.jS))},e.XS=function(t){e.WS&&(e.WS.Xy(void 0),e.WS=void 0),e.So(new Ao(e,"license-request",Jo(t.message).buffer,t.destinationURL||void 0))},e.Ts=function(){var t=e.FS&&e.FS.error;if(t){var n=new cu("Unknown CDM error",t.code,t.systemCode);if(e.WS)e.WS.jy(n),e.WS=void 0;else if(e.KS)e.KS.jy(n),e.KS=void 0;else switch(n.Ky){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.QS("output-not-allowed");break;default:e.QS("internal-error")}}},e.jS=function(){e.WS&&(e.QS("usable"),e.WS.Xy(void 0),e.WS=void 0),e.KS&&(e.QS("usable"),e.KS.Xy(void 0),e.KS=void 0)},e.US=new su,e.VS=new uu,e}Tt(n,t);var i=n.prototype;return i.vS=function(t,n,i){return nn(function(){return en(this,function(t){switch(t.label){case 0:return this.HS(),this.WS=new su,this.SS(Zo(n),i),[4,this.WS.Qy];case 1:return t.sent(),[2]}})}).call(this)},i.SS=function(t,n){if(!t)throw new m("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.qS;return(i=n?this.zS.createSession(this.GS,t,e):this.zS.createSession(this.GS,t)).addEventListener("mskeyclose",this.bS),i.addEventListener("mskeymessage",this.XS),i.addEventListener("mskeyerror",this.Ts),i.addEventListener("mskeyadded",this.jS),this.FS=i,this.QS("status-pending"),i},i.Un=function(t){return nn(function(){return en(this,function(t){return this.HS(),[2,!0]})}).call(this)},i.er=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:if(this.KS=new su,this.HS(),!this.FS)return[2,tt.resolve()];if(0===(n=Zo(t)).byteLength)throw new m("Cannot call update with an empty response.");return this.FS.update(n),[4,this.KS.Qy];case 1:return i.sent(),[2]}})}).call(this)},i.Xs=function(){return!this.lS&&this.FS&&(this.lS=!0,this.FS.close()),this.US.Qy},i._S=function(){return nn(function(){return en(this,function(t){return this.HS(),[2]})}).call(this)},i.HS=function(){if(this.lS)throw new m("Already closing or closed.")},i.QS=function(t){this.VS.Gy(),this.VS.qy(ou,t),this.So(new Po(this.VS))},It(n,[{key:"dS",get:function(){return this.FS&&this.FS.sessionId||""}},{key:"aS",get:function(){return NaN}},{key:"oS",get:function(){return this.US.Qy}},{key:"Ty",get:function(){return this.VS}}]),n}(Io),zf=function(){function t(t,n,i){this.zS=void 0,this.kS=void 0,this.Cd=void 0,this.GS=void 0,this.zS=t,this.kS=n,this.Cd=i;var e=Cf(i)||"video/mp4";this.GS=Pf(e)}var n=t.prototype;return n.SS=function(t){return nn(function(){return en(this,function(t){return[2,new Uf(this.zS,this.GS)]})}).call(this)},n.ES=function(t){return tt.resolve(!1)},n._n=function(t){var n=this,i=function(){t.msSetMediaKeys(n.zS),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.zS):t.addEventListener("loadedmetadata",i),tt.resolve()},n.PS=function(t){return tt.resolve()},n.hr=function(){return tt.resolve()},t}(),Wf=function(){function t(t,n){this.mS=void 0,this.YS=void 0,this.mS=t,this.YS=n}var n=t.prototype;return n.CS=function(){return this.YS},n.IS=function(){var t=new c.MSMediaKeys(this.mS);return tt.resolve(new zf(t,this.mS,this.YS))},It(t,[{key:"kS",get:function(){return this.mS}}]),t}(),Vf=function(){function t(){}return t.prototype.nw=function(t,n){try{return tt.resolve(function(t,n){if(!Hf())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Af(qf,Oo,t,r);if(o)return new Wf(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.LS=function(){return Hf()},t}();function Hf(){return void 0!==c.MSMediaKeys&&"function"==typeof c.MSMediaKeys.isTypeSupported}function qf(t,n){return c.MSMediaKeys.isTypeSupported(t,n)}x(),pt(),x(),pt(),x(),pt(),x(),pt();var Xf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).tT=void 0,r.GS=void 0,r.$S=void 0,r.US=void 0,r.eT=void 0,r.VS=void 0,r.JS=void 0,r.iT=void 0,r.Ts=void 0,r.XS=void 0,r.jS=void 0,r.tT=n,r.GS=i,r.$S=e,r.US=new su,r.eT=void 0,r.VS=new uu,r.JS=void 0,r.iT=new su,r.Ts=function(){var t=r.JS&&r.JS.error;if(t){var n=new cu("Unknown CDM error",t.code,t.systemCode);r.eT?(r.eT.jy(n),r.eT=void 0):n.Ky===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.QS("output-not-allowed"):r.QS("internal-error"),r.So(new Do)}},r.XS=function(t){r.So(new Ao(r,"license-request",Jo(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.jS=function(){r.eT&&(r.eT.Xy(void 0),r.eT=void 0),r.QS("usable")},r}Tt(n,t);var i=n.prototype;return i.vS=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.ZS;if(!e)throw new m("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=Yo(t),r=2*e.length,o=2*n.length,u=new ArrayBuffer(4+r+4+o+4+i.byteLength),s=new DataView(u),f=new Qo;return qo(s,f,r,!0),Xo(s,f,e,!0),qo(s,f,o,!0),Xo(s,f,n,!0),qo(s,f,i.byteLength,!0),function(t,n,i){$o(t).set($o(i),n.ac),n.Ny(i.byteLength)}(s,f,i),new k(u)}(Zo(n),e,this.$S);return this.JS=this.tT.createSession(this.GS,r),this.JS.addEventListener("webkitkeymessage",this.XS,!1),this.JS.addEventListener("webkitkeyadded",this.jS,!1),this.JS.addEventListener("webkitkeyerror",this.Ts,!1),this.QS("status-pending"),this.iT.Xy(this.JS),this.iT=new su,tt.resolve()},i.Un=function(t){return tt.resolve(!0)},i.er=function(t){return nn(function(){var n,i;return en(this,function(e){switch(e.label){case 0:if(0===(n=Zo(t)).byteLength)throw new m("Cannot call update with an empty response.");return this.eT=new su,(i=this.JS)?[3,2]:[4,this.iT.Qy];case 1:i=e.sent(),e.label=2;case 2:return i.update(n),[4,this.eT.Qy];case 3:return e.sent(),[2]}})}).call(this)},i.Xs=function(){var t,n=this.JS;return n&&(n.removeEventListener("webkitkeymessage",this.XS,!1),n.removeEventListener("webkitkeyadded",this.jS,!1),n.removeEventListener("webkitkeyerror",this.Ts,!1),n.close()),this.iT.Zg(),null==(t=this.eT)||t.Zg(),this.US.Xy(void 0),this.US.Qy},i._S=function(){return tt.resolve(void 0)},i.QS=function(t){this.VS.Gy(),this.VS.qy(ou,t),this.So(new Po(this.VS))},It(n,[{key:"dS",get:function(){return this.JS?this.JS.sessionId:""}},{key:"aS",get:function(){return NaN}},{key:"oS",get:function(){return this.US.Qy}},{key:"Ty",get:function(){return this.VS}}]),n}(Io);x(),pt(),x(),pt();var jf=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.PICTURE_IN_PICTURE_ERROR=11001]="PICTURE_IN_PICTURE_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),Yf=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(n){var i=y.floor(n/1e3);if(i in t)return i;throw new m("Invalid error code: "+n)}}(Yf||(Yf={}));var Kf=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=void 0,r.code=n,r}return Tt(n,t),It(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Yf.fromCode(this.code)}}]),n}(wn),Gf=function(){function t(t,n,i){this.tT=void 0,this.kS=void 0,this.Cd=void 0,this.GS=void 0,this.$S=void 0,this.tT=t,this.kS=n,this.Cd=i,this.$S=void 0;var e=Cf(i)||"video/mp4";this.GS=Pf(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.tT},n.SS=function(t){return nn(function(){return en(this,function(t){if(!this.$S)throw new Kf(jf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new Xf(this.tT,this.GS,this.$S)]})}).call(this)},n.ES=function(t){return this.$S=Zo(t),tt.resolve(!0)},n._n=function(t){return t.webkitSetMediaKeys(this.tT),tt.resolve()},n.PS=function(t){return t.webkitSetMediaKeys(null),tt.resolve()},n.hr=function(){return tt.resolve()},t}(),$f=function(){function t(t,n){this.mS=void 0,this.YS=void 0,this.mS=t,this.YS=n}var n=t.prototype;return n.CS=function(){return this.YS},n.IS=function(){var t=new c.WebKitMediaKeys(this.mS);return tt.resolve(new Gf(t,this.mS,this.YS))},It(t,[{key:"kS",get:function(){return this.mS}}]),t}(),Zf=function(){function t(){}return t.prototype.nw=function(t,n){try{return tt.resolve(function(t,n){if(t!==fo)throw new m(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!Jf())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Af(Qf,No,t,r);if(o)return new $f(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.LS=function(){return Jf()},t}();function Jf(){return void 0!==c.WebKitMediaKeys&&"function"==typeof c.WebKitMediaKeys.isTypeSupported}function Qf(t,n){return c.WebKitMediaKeys.isTypeSupported(t,n)}x(),pt();var th=function(){function t(t){this.sT=void 0,this.sT=t}return t.prototype.nw=function(t,n){return nn(function(){var i,e,r;return en(this,function(o){switch(o.label){case 0:i=Rt(this.sT),o.label=1;case 1:if((e=i()).done)return[3,6];r=e.value,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,r.nw(t,n)];case 3:return[2,o.sent()];case 4:return o.sent(),[3,5];case 5:return[3,1];case 6:throw new m("Unsupported key system configuration for "+t)}})}).call(this)},t}();x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var nh=function(){function t(t){var n=this;this.rT=[],this.hT=void 0,this.nT=new dn,this.uT=void 0,this.oT=function(){return 0===n.rT.length?n.uT?ih(n.uT,n.nT.Yg).then(n.cT,n.cT):n.cT():n.rT.shift()().then(n.oT)},this.cT=function(){if(0!==n.rT.length)return n.oT();n.hT=void 0},this.uT=t}var n=t.prototype;return n.Zo=function(t,n){var i=this;return new tt(function(e){var r=dn.ep([i.nT.Yg,n]),o=function(){r.zg()};i.rT.push(function(){var n=ih(t,r.Yg);return e(n),n.then(o,o)}),i.hT||(i.hT=i.oT())})},n.Zg=function(){return this.aT(!0)},n.kn=function(){return this.uT=void 0,this.aT(!1)},n.aT=function(t){var n=this.hT;return this.nT.Zg(),t&&(this.nT=new dn),tt.resolve(n)},t}();function ih(t,n){return new tt(function(i){return i(t(n))})}var eh=new nh,rh=function(t){function n(n){var i;return(i=t.call(this)||this).mS=void 0,i.WS=void 0,i.eT=void 0,i.US=void 0,i.hA=void 0,i.wT=void 0,i.mT=void 0,i.pT=void 0,i._T=void 0,i.gT=void 0,i.mS=n,i.WS=void 0,i.eT=void 0,i.hA=!1,i.wT=void 0,i._T=void 0,i.US=new su,i.mT="",i.gT=new su,i.pT=new uu,i}Tt(n,t);var i=n.prototype;return i.dT=function(){this.eT&&(this.QS("usable"),this.eT.Xy(void 0),this.eT=void 0)},i.lT=function(t){var n=new cu("Unknown CDM error",t.errorCode,t.systemCode);this.eT?(this.eT.jy(n),this.eT=void 0):this.WS?(this.WS.jy(n),this.WS=void 0):n.Ky===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.QS("output-restricted"):1===n.Yy?this.QS("expired"):this.QS("internal-error")},i.fT=function(t){0!==t.message.byteLength?(this.WS&&(this.WS.Xy(void 0),this.WS=void 0),this.So(new Ao(this,"license-request",fu(this.mS,Jo(t.message).buffer),t.defaultURL||void 0))):this.WS&&(this.WS.jy("Empty key message"),this.WS=void 0)},i.vT=function(t){this._T||(this._T=t,this.gT.Xy(t))},i.Xs=function(){return nn(function(){return en(this,function(t){return this.throwIfClosed(),this.eT&&(this.eT.jy(void 0),this.eT=void 0),this.hA=!0,this.US.Xy(void 0),[2]})}).call(this)},i.vS=function(t,n){return nn(function(){var t;return en(this,function(i){switch(i.label){case 0:return this.throwIfClosed(),this.WS=new su,this.wT=Zo(n),(t=this._T)?[3,2]:[4,this.gT.Qy];case 1:t=i.sent(),i.label=2;case 2:return t.webkitGenerateKeyRequest(this.mS,this.wT),[4,this.WS.Qy];case 3:return i.sent(),[2]}})}).call(this)},i.Un=function(t){return nn(function(){return en(this,function(t){return this.throwIfClosed(),[2,!1]})}).call(this)},i._S=function(){return nn(function(){return en(this,function(t){return this.throwIfClosed(),[2]})}).call(this)},i.er=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:return n=this,this.throwIfClosed(),this.eT=new su,Ht.S_||Ht.w_?[2,eh.Zo(function(){return nn(function(){return en(this,function(n){switch(n.label){case 0:return[4,this.doUpdate(t)];case 1:return n.sent(),[2]}})}).call(n)})]:[4,this.doUpdate(t)];case 1:return i.sent(),[2]}})}).call(this)},i.doUpdate=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:return void 0===this.eT?[2]:(n=this._T)?[3,2]:[4,this.gT.Qy];case 1:n=i.sent(),i.label=2;case 2:return n.webkitAddKey(this.mS,Zo(t),this.wT,this.dS),[4,this.eT.Qy];case 3:return i.sent(),Ht.w_?[4,yn(500)]:[3,5];case 4:i.sent(),i.label=5;case 5:return[2]}})}).call(this)},i.throwIfClosed=function(){if(this.hA)throw new m("Already closing or closed.")},i.QS=function(t){this.pT.Gy(),this.pT.qy(ou,t),this.So(new Po(this.pT))},i.yT=function(){return nn(function(){var t,n;return en(this,function(i){switch(i.label){case 0:return(n=this._T)?[3,2]:[4,this.gT.Qy];case 1:n=i.sent(),i.label=2;case 2:if(!(t=n).webkitCancelKeyRequest)return[3,7];i.label=3;case 3:return i.trys.push([3,4,5,7]),t.webkitCancelKeyRequest(this.mS,this.mT),[3,7];case 4:return i.sent(),[3,7];case 5:return[4,yn(500)];case 6:return i.sent(),[7];case 7:return[2]}})}).call(this)},It(n,[{key:"Ty",get:function(){return this.pT}},{key:"dS",get:function(){return this.mT},set:function(t){this.mT=t}},{key:"oS",get:function(){return this.US.Qy}},{key:"aS",get:function(){return NaN}}]),n}(Io),oh=function(){function t(t,n){var i=this;this.kS=void 0,this.Cd=void 0,this._T=void 0,this.ST=void 0,this.TT=void 0,this.jS=void 0,this.AT=void 0,this.bT=void 0,this.kS=t,this.Cd=n,this._T=void 0,this.ST=Kr(),this.TT=[],this.jS=function(t){var n=i.kT(t.sessionId);n&&n.dT()},this.AT=function(t){var n=i.kT(t.sessionId);n&&n.lT(t)},this.bT=function(t){var n=i.kT(t.sessionId);n&&n.fT(t)}}var n=t.prototype;return n._n=function(t){return this._T=t,this._T.addEventListener("webkitkeyadded",this.jS),this._T.addEventListener("webkitkeyerror",this.AT),this._T.addEventListener("webkitkeymessage",this.bT),this.ST.forEach(function(n,i){return n.vT(t)}),this.TT.forEach(function(n){return n.vT(t)}),tt.resolve()},n.PS=function(t){return t.removeEventListener("webkitkeyadded",this.jS),t.removeEventListener("webkitkeyerror",this.AT),t.removeEventListener("webkitkeymessage",this.bT),this._T=void 0,tt.resolve()},n.hr=function(){return nn(function(){var t,n;return en(this,function(i){switch(i.label){case 0:t=this.ST.entries(),n=t.next(),i.label=1;case 1:return n.done?[3,3]:[4,n.value[1].yT()];case 2:return i.sent(),n=t.next(),[3,1];case 3:return this.ST.clear(),[2]}})}).call(this)},n.SS=function(t,n,i){return nn(function(){var t;return en(this,function(n){return t=new rh(this.kS),this._T&&t.vT(this._T),this.TT.push(t),[2,t]})}).call(this)},n.ES=function(t){return tt.resolve(!1)},n.kT=function(t){if(t){var n=this.ST.get(t);return n||((n=this.TT.shift())?(n.dS=t,this.ST.set(t,n),n):void 0)}},t}(),uh=function(){function t(t,n){this.kS=void 0,this.ET=void 0,this.kS=t,this.ET=n}var n=t.prototype;return n.IS=function(){return tt.resolve(new oh(this.kS,this.ET))},n.CS=function(){return this.ET},t}(),sh=function(){function t(){}return t.prototype.nw=function(t,n){try{return tt.resolve(function(t,n){if(!sh.LS())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Af(fh,Oo,t,r);if(o)return new uh(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.LS=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function fh(t,n){var i=Sn();return Boolean(i&&i.canPlayType&&""!==i.canPlayType(n,t))}x(),pt();var hh,ch=function(){function t(){}return t.prototype.nw=function(t,n){return t===io||t===Qr?tt.resolve(void 0):tt.reject(new g("DRM configuration not supported"))},t}();function ah(){return hh||(hh=function(){var t=[];Zf.LS()&&t.push(new Zf);Lf.LS()&&t.push(new Lf);Vf.LS()&&t.push(new Vf);sh.LS()&&t.push(new sh);Ht.k_&&t.push(new ch);return new th(t)}()),hh}x(),pt(),x(),pt();var vh=function(){function t(){this.PT=Kr()}var n=t.prototype;return n.Gy=function(t){this.PT.delete(t)},n.xT=function(){this.PT.clear()},n.Wy=function(t){return this.PT.get(t)},n.qy=function(t,n){this.PT.set(t,n)},t}(),dh=function(){function t(){}return t.IT=function(){return t.Ng||(t.Ng=lh.LS()?new lh:new vh),t.Ng},t.Gy=function(n){t.IT().Gy(n)},t.xT=function(){t.IT().xT()},t.Wy=function(n){return t.IT().Wy(n)},t.qy=function(n,i){t.IT().qy(n,i)},t}();dh.Ng=void 0;var lh=function(t){function n(){return t.apply(this,arguments)||this}Tt(n,t);var i=n.prototype;return i.Gy=function(t){self.sessionStorage.removeItem(t)},i.xT=function(){self.sessionStorage.clear()},i.Wy=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.qy=function(t,n){self.sessionStorage.setItem(t,n)},n.LS=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(dh);x(),pt(),x(),pt();var wh=function(){var t=self.Blob;if(t)try{new t;return function(t){return function(n,i){return new t(n,i)}}(t)}catch(t){}var n=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(n)return function(t){return function(n,i){var e=new t;if(n)for(var r,o=Rt(n);!(r=o()).done;){var u=r.value;e.append(u)}return e.getBlob(i&&i.type||"")}}(n)}();function bh(t,n,i){var e=wh([n],{type:"application/octet-stream"}),r=URL.createObjectURL(e),o=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,i),u=a.createElement("a");u.href=r,u.download=o,a.body.appendChild(u),u.click(),a.body.removeChild(u),URL.revokeObjectURL(r)}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt();var gh=function(t,n,i){return i=null!=t?E(P(t)):{},function(t,n,i,e){if(n&&"object"==typeof n||"function"==typeof n)for(var r,o=N(n),u=0,s=o.length;u=200&&t.hk<=299||304===t.hk}(h=new Wh({ck:f,lk:n,dk:n.dk,fk:hc(e.headers),hk:s,vk:e.statusText,gk:u})))throw new qh(h);return n.Gk&&(h=ec(h,n.Gk)),[2,h]}})}).call(this)},n._E=function(t){return function(t){return B(t,Wr)}(t)?t:gn(t)?this.vE?new Xh(this.hE):new bn(t.message,t):this.aE?new qh(this.aE,t):new Vr(this.hE,t)},t}(),uc=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).pE=void 0,r.gE=void 0,r.nT=void 0,r.JT=new su,r.pE=n,r.gE=i,r.nT=e,r.JT.Qy.catch(Jt),r}Tt(n,t);var i=n.prototype;return i.YT=function(){return this.JT.Qy},i.UT=function(t){return this.ZT(this.gE.text(),t)},i.HT=function(t){return this.ZT(this.gE.arrayBuffer(),t)},i.WT=function(){var t=this.gE.body;return t?this.$T(t):Ih(this.HT().then(Th),this.nT)},i.nk=function(){var t=this.gE.clone(),i=this.nT.tp(),e=i[0],r=i[1];return this.nT=e,new n(this.pE,t,r)},i.ZT=function(t,n){var i=this;n&&this.nT.$g(n);var e=mn(tt.resolve(t),this.nT.Yg).catch(function(t){throw i.pE._E(t)});return e=pn(e,this.nT),this.JT.$g(e.then(Jt)),e},i.$T=function(t){var n=this;return new yh(new cc(t,function(t){return n.pE._E(t)},this.nT,this.JT),{highWaterMark:0})},It(n,[{key:"XT",get:function(){return this.gE.bodyUsed}},{key:"QT",get:function(){return Xt(this.gE.body)}}]),n}(Nh),sc="abort";function fc(t){if(nc()){var n=new Jh;if(t.Hg)n.abort();else if(!t.Wg){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(sc,i),t.jg(i),t.Kg(e)};n.signal.addEventListener(sc,i),t.Xg(i),t.Qg(e)}return n.signal}}function hc(t){if(function(t){return Kt(t)&&"function"==typeof t.forEach}(t)){var n=new xr;return t.forEach(function(t,i){Array.isArray(t)&&2===t.length?n.append(t[0],t[1]):n.append(i,t)}),n}return new xr(t)}var cc=function(){function t(t,n,i,e){this.mE=void 0,this.wE=void 0,this.nT=void 0,this.JT=void 0,this.Wd=void 0,this.mE=t,this.wE=n,this.nT=i,this.JT=e}var n=t.prototype;return n.start=function(t){this.Wd=this.mE.getReader()},n.pull=function(t){return nn(function(){var n,i,e;return en(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,mn(this.Wd.read(),this.nT.Yg)];case 1:return n=r.sent(),[3,3];case 2:return i=r.sent(),e=this.wE(i),this.JT.jy(e),this.nT.Zg(),this.Wd.cancel(e).catch(Jt),t.error(e),[2];case 3:return n.done?(this.JT.Xy(),this.nT.Zg(),t.close()):t.enqueue(n.value),[2]}})}).call(this)},n.cancel=function(t){return this.nT.Zg(),this.JT.jy(t),this.Wd.cancel(t)},t}();x(),pt();var ac=function(){function t(t){var n=this;this.AE=void 0,this.hE=void 0,this.nT=new dn,this.aE=void 0,this.yE=new su,this.DE=void 0,this.RE=!1,this.xE=function(){var t;n.bE(),null==(t=n.AE)||t.abort()},this.hE=t,this.nT.$g(t.Yg),this.AE=new I,this.lE()}var n=t.prototype;return n.lE=function(){var t=this,n=this.AE,i=this.hE;if(i.Yg.Hg)return this.bE();n.onreadystatechange=function(){return t.SE()},n.onprogress=function(n){return t.cE(n)},n.onload=function(){return t.TE()},n.onloadend=function(){return t.kE()},n.onerror=function(){return t.EE()},n.ontimeout=function(){return t.PE()},n.onabort=function(){return t.bE()},n.open(i.Uk,i.Yu,!0),n.withCredentials=Boolean(i.zk),"responseType"in n&&i.dk&&(i.dk===Cr.NT?n.responseType="text":n.responseType="arraybuffer"),i.fk.forEach(function(t,i){n.setRequestHeader(i,t)}),i.Vk&&(n.timeout=i.Vk),this.nT.Yg.Xg(this.xE);var e=i.zT;e?n.send(e):n.send()},n.SE=function(){var t=this.AE;void 0!==t&&t.readyState>=2&&!this.RE&&(this.RE=!0,this.CE())},n.CE=function(){var t,n,i=this.AE,e=function(t){var n=new xr,i=t.replace(/\r?\n[\t ]+/g," ");return i.split(/\r?\n/).forEach(function(t){var i=t.split(":"),e=i.shift().trim();if(e){var r=i.join(":").trim();n.append(e,r)}}),n}(i.getAllResponseHeaders()||""),r=this.hE;this.DE=new su,this.aE=new Wh({lk:r,dk:r.dk,ck:this.DE.Qy,hk:i.status,vk:i.statusText,fk:e,gk:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.yE)||t.Xy(this.aE)},n.TE=function(){var t,n=this.AE;if(void 0!==n){var i=n.response;if(!Xt(i)){var e=this.hE.dk;i=e===Cr.NT?n.responseText:e===Cr.CT?new ArrayBuffer(0):{}}null==(t=this.DE)||t.Xy(i)}},n.kE=function(){this.kn()},n.cE=function(t){void 0!==this.AE&&(null==this.hE.Gk||this.hE.Gk.call(this.hE,t.loaded,t.lengthComputable?t.total:void 0))},n.EE=function(){var t=new g("Network request failed");this.aE?this.Ts(new qh(this.aE,t)):this.Ts(new Vr(this.hE,t))},n.PE=function(){this.Ts(new Xh(this.hE))},n.bE=function(){this.Ts(new bn),this.kn()},n.Ts=function(t){var n,i;null==(n=null!=(i=this.DE)?i:this.yE)||n.jy(t)},n.kn=function(){this.AE=void 0,this.aE=void 0,this.yE=void 0,this.DE=void 0,this.nT.zg()},It(t,[{key:"oE",get:function(){return this.yE.Qy}}]),t}();x(),pt();var vc=function(){function t(){}var n=t.prototype;return n.lk=function(t){return function(t){if(!Qh()||!function(t){try{return tc.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Yu))return!1;if(!ic()&&t.Gk)return!1;if(!t.jk&&t.Uk!==Fr.POST){if(Ht.S_&&Ht.d_<=68)return!1;if(Ht.w_)return!1}return!0}(t)?new oc(t).oE:new ac(t).oE},n.Kk=function(t){var n=c.navigator;if(n&&n.sendBeacon)n.sendBeacon(t.Yu,wh([t.zT],{type:t.qT}));else{var i=t.qT?{"Content-type":t.qT}:void 0;this.lk(new Ur({Uk:Fr.POST,Yu:t.Yu,zT:t.zT,fk:i,Xk:Lr.Lk})).then(function(t){!function(t){t.then(Jt,Jt)}(t.HT())},Jt)}},n.kn=function(){},t}();x(),pt(),x(),pt();var dc=function(t){return t[t.BE=1]="BE",t[t.NE=2]="NE",t[t.NT=3]="NT",t[t.LE=4]="LE",t[t.OE=9]="OE",t}({});var lc=function(){function t(){}return t.prototype.UE=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new qr(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new qr;return new _c(n)},t}(),wc=function(){function t(t){this.HE=void 0,this.HE=t}var n=t.prototype;return n.GE=function(t){return this.HE.isEqualNode(t.HE)},n.XE=function(n){return new t(this.HE.cloneNode(n))},It(t,[{key:"FE",get:function(){return dc.NE}},{key:"VE",get:function(){var t;return null!=(t=this.HE.localName)?t:kc(this.HE.nodeName)}},{key:"l",get:function(){return this.HE.nodeName}},{key:"WE",get:function(){var t;return null!=(t=this.HE.namespaceURI)?t:void 0}},{key:"qE",get:function(){var t;return null!=(t=this.HE.prefix)?t:void 0}},{key:"zE",get:function(){return this.HE.nodeValue}}]),t}(),bc=function(){function t(t){this.KE=void 0,this.QE=void 0,this.KE=t}var n=t.prototype;return n.YE=function(t){return this.jE.filter(function(n){return Sc(n)&&n.JE===t})},n.ZE=function(t,n){return this.jE.filter(function(i){return Sc(i)&&i.VE===n&&i.WE===t})},n.tP=function(t){this.KE.appendChild(t.$E),this.QE&&this.QE.push(t)},n.GE=function(t){return this.KE.isEqualNode(t.$E)},It(t,[{key:"jE",get:function(){return void 0===this.QE&&(this.QE=function(t){for(var n=[],i=0;i=on)for(;r.bw.length>0;)r.nb()},e&&r.dv(new xc(e,"com.apple.streamingkeydelivery","1")),r.Tat=n,r.Trt=i,r.Trt.wn("remove",r.tb),r.sw=new Mc(0),r.dv(r.sw),r}Tt(n,t);var i=n.prototype;return i.DRt=function(){return this.Tat===Ec.Bk?this.Trt.cb:this.Tat===Ec.Dk?this.Trt.ab:void 0},i.yat=function(t){return this.fAt.get(t)},i.zg=function(){this.bw.length=0,this.sw.VN=0,this.fAt.clear(),this.kw=0},i.fB=function(){return this.lb(),[].concat(t.prototype.fB.call(this),this.bw)},i.lb=function(){for(var t,n=Rt(this.Trt.tg());!(t=n()).done;){var i=t.value;if(!this.fAt.has(i.o)){var e=void 0;if(this.Tat===Ec.Bk?(e=i.jv,i.rw=!0):(e=i.Ad,i.tw=!0),!e)return;this.fAt.set(i.o,e),e.wv&&this.bw.push(new Nc(i.o+"-init")),this.bw.push(new Oc(Kc,i.o)),this.kw+=Kc}}this.ng()},i.ng=function(){for(;this.kw>60;)this.nb()},i.nb=function(){var t=this.bw.shift();void 0!==t&&function(t){return t.Km===Rc.yk}(t)&&(this.fAt.delete(t.av),this.kw-=t.cv,this.sw.VN++)},n}(Lc);var $c=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).PO=void 0,i.PO=n,i}return Tt(n,t),n}(Eo),Zc=function(t){function n(n,i){var e;return(e=t.call(this)||this).ig=void 0,e.ug=void 0,e.sg=void 0,e.lg=void 0,e.bg=void 0,e.mg=void 0,e.kg=void 0,e.tm=void 0,e.rm=void 0,e.om=void 0,e.sm=void 0,e.ig=n,e.ug=i,e.sg=[],e.bg=[],e.mg=Kr(),e.kg=Kr(),e.tm=Kr(),e.rm=0,e}Tt(n,t);var i=n.prototype;return i.tg=function(){return this.lg?(this.sg=this.sg.filter(function(t){return!(t.rw&&t.tw)}),[].concat(this.sg,[this.lg],this.bg)):[]},i.z2=function(t){this.am(t)},i.H2=function(t){this.am(t),this.bm(t),this.km(t)},i._S=function(t){this.am(t),this.km(t)},i.zg=function(){var t;null==(t=this.lg)||t.Xs(),this.lg=void 0,this.bg.forEach(function(t){return t.Xs()}),this.bg.length=0,this.sg.length=0,this.tm=Kr(),this.rm=0},i.bm=function(t){var n=t.startPts,i=t.totalDuration;this.kg.set(t.mediaType,n+i)},i.ip=function(){if(this.lg){this.lg.Xs(),this.sg.push(this.lg);var t=this.bg.shift(),n=new Yc(this.ig,this.ug);t?(this.lg=t,this.bg.push(n)):this.lg=n}},i.up=function(t){if(this.lg){var n=!this.lg.Ad||0===this.lg.Ad.IP,i=!this.lg.jv||0===this.lg.jv.IP,e=this.lg.Ad&&this.lg.Ad.wv,r=this.lg.jv&&this.lg.jv.wv,o=i&&(n&&!(this.lg.tw||this.lg.rw)||e),u=n&&(i&&!(this.lg.tw||this.lg.rw)||r);(t===Ec.Dk&&!u||t===Ec.Bk&&!o)&&(this.ip(),this.ip())}},i.am=function(t){var n=t.mediaType,i=t.kind,e=this.mg.get(n);if(void 0===e){if(i===zc.aet||i===zc.uet){var r=[t];this.mg.set(n,r)}}else e.push(t)},i.km=function(t){var n=this.ty(t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value;switch(r.kind){case zc.aet:this.ny(r),this.tm=Kr(),this.rm=0;break;case zc.det:this.hy(r);break;case zc.uet:this.my(r)}}},i.ny=function(t){var n=t.mediaType;void 0===this.lg?(this.lg=new Yc(this.ig,this.ug),this.bg.push(new Yc(this.ig,this.ug))):this.up(n),n===Ec.Bk?(this.sm=t.segment,this.lg.jv.wv=!0):n===Ec.Dk&&(this.om=t.segment,this.lg.Ad.wv=!0)},i.my=function(t){var n,i,e=t.mediaType===Ec.Dk,r=t.totalDuration,o=null!=(n=this.tm.get(t.mediaType))?n:0;e?(this.lg.Ad.H2(t.segment,r),i=o+this.lg.Ad.IP):(this.lg.jv.H2(t.segment,r),i=o+this.lg.jv.IP),i>=this.rm+Kc&&(this.tm.set(t.mediaType,i),this.rm+=Kc,this.ip())},i.hy=function(t){this.kg.set(t.mediaType,void 0),this.up(t.mediaType),this.sg.length=0,this.So(new $c(t.endTime))},i.ty=function(t){var n=this;if(t.kind===zc.det)return this.ky(t);var i=[];return this.mg.forEach(function(t){if(t&&t.length>0){var e=un(t,function(t){return t.kind===zc.det});-1===e&&(e=t.length);for(var r,o=Rt(t.slice(0,e));!(r=o()).done;){var u=r.value;if(!cn(i,u)){var s,f=n.ky(u);if(f.length>0)(s=i).push.apply(s,[].concat(f));else if(u.kind===zc.uet)break}}}}),i},i.ky=function(t){var n=this.mg.get(t.mediaType),i=function(t){return t===Ec.Bk?Ec.Dk:Ec.Bk}(t.mediaType);if(!(i===Ec.Bk?this.ug:this.ig))return n.splice(0,n.indexOf(t)+1);if(t.kind===zc.aet)return[];var e=this.kg.get(i);if(void 0===e)return[];if(t.kind===zc.det){var r=this.OS(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),[].concat(o,r,[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.AS(t,u,i);return[].concat(u,s,[t])}return[]},i.AS=function(t,n,i){var e=this.mg.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=un(e,function(t){return t.kind===zc.det}),u=o-1;-1===o&&(u=e.length-1);for(var s=u+1,f=0;f<=u&&s===u+1;f++){var h=e[f];h.kind===zc.uet&&h.startPts>r&&(s=f)}var c=-1;return-1!==un(n,function(t){return t.kind===zc.aet})&&(c=un(e,function(t){return t.kind===zc.aet})),c>s&&(s=c+1),s>0?(e[s-1].kind===zc.aet&&(s-=1),e.splice(0,s)):[]},i.OS=function(t){var n=this.mg.get(t);if(n){var i=un(n,function(t){return t.kind===zc.det});if(i>=0)return n.splice(0,i+1)}return[]},i.BS=function(){var t="[MEDIABUFFER] endPTS: ";this.kg.forEach(function(n,i){t=t.concat(i+" = "+n+" ")}),jt.hm(t)},i.RT=function(t,n){var i=t+": [";null==n||n.forEach(function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")}),i=i.concat(" ]"),jt.hm(i)},It(n,[{key:"ab",get:function(){var t;return null==(t=this.om)?void 0:t.slice()}},{key:"cb",get:function(){var t;return null==(t=this.sm)?void 0:t.slice()}}]),n}(Io);var Jc=function(){function t(t,n){this.tk=void 0,this.ik=void 0,this.uk=void 0,this.sk=void 0;var i=t.some(function(t){return t.match("audio")}),e=t.some(function(t){return t.match("video")});this.ik=new Zc(i,e),this.tk=new Uc(i,e),i&&(this.uk=new Gc(Ec.Dk,this.ik,n)),e&&(this.sk=new Gc(Ec.Bk,this.ik,n))}var n=t.prototype;return n.ak=function(t){var n,i,e=Qc(t);return e===Ec.Bk?null==(n=this.sk)?void 0:n.DRt():e===Ec.Dk?null==(i=this.uk)?void 0:i.DRt():void 0},n.yat=function(t){var n,i,e=t.split("/")[1],r=Qc(t);return r===Ec.Bk?null==(n=this.sk)?void 0:n.yat(e):r===Ec.Dk?null==(i=this.uk)?void 0:i.yat(e):void 0},n.z2=function(t){this.ik.z2(t)},n.H2=function(t){this.ik.H2(t)},n.Ldt=function(t){this.ik._S(t)},n.zg=function(){var t,n;this.ik.zg(),this.tk.zg(),null==(t=this.uk)||t.zg(),null==(n=this.sk)||n.zg()},It(t,[{key:"mk",get:function(){return this.tk}},{key:"kk",get:function(){return this.uk}},{key:"IE",get:function(){return this.sk}}]),t}();function Qc(t){return t.match(/video/)?Ec.Bk:Ec.Dk}var ta=function(){function t(t,n){var i=this;this.ME=void 0,this.TR=void 0,this.Yat=void 0,this.fQt=void 0,this.ME=t,this.TR=n,this.Yat=void 0,this.fQt=function(t){return nn(function(){var n,i;return en(this,function(e){switch((n=t.data).kind){case zc.oet:this.Yat=new Jc(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case zc.aet:this.Yat.z2(n);break;case zc.uet:this.Yat.H2(n);break;case zc.det:this.Yat.Ldt(n)}return i={kind:zc.cet},this.ME.postMessage(i),[2]})}).call(i)},this.ME.onmessage=this.fQt}var n=t.prototype;return n.XUt=function(t){return"master.m3u8"===t?this.Yat.mk:"video/index.m3u8"===t?this.Yat.IE:"audio/index.m3u8"===t?this.Yat.kk:void 0},n.CR=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.XUt(t))?void 0:n.XUt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(jc)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.Yat)?void 0:r.ak(t);return new Response(o,{headers:e})}var u=this.mat(t);if(!u)return new Response(void 0,{status:404,statusText:"Not Found"});var s=function(t){var n,i=function(t){n.enqueue(t.ck)},e=function(){n.close(),t.mn("append",i),t.mn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.ck),t.oS?n.close():(t.wn("append",i),t.wn("close",e))},cancel:function(){t.mn("append",i),t.mn("close",e)}})}(u);return new Response(s,{headers:e})}return new Response(void 0,{status:404,statusText:"Not Found"})},n.mat=function(t){return this.Yat.yat(t)},n.close=function(){var t;this.ME.close(),null==(t=this.Yat)||t.zg()},t}(),na=function(){function t(){var t=this;this.r8=Kr(),this.zjt=void 0,this.fQt=function(n){var i=n.data;if(i.kind===zc.ret){t.BR().catch(Jt);var e=i.port,r=Hc(),o=new ta(e,n.source.id);t.r8.set(r,o);var u=function(n){n.data.kind===zc.let&&(t.IN(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:zc.het,sessionId:r};e.postMessage(s)}},this.XP=function(n){if(wo(n.request.url,"https://theo.proxy")){var i=new URL(n.request.url).pathname.split("/"),e=i[1],r=i.slice(2).join("/"),o=t.r8.get(e);if(void 0===o){var u=new Response(void 0,{headers:{message:"Given session ["+e+"] not found."},status:404,statusText:"Not Found"});return void n.respondWith(u)}if(void 0===r){var s=new Response(void 0,{headers:{message:"No resource ["+r+"] provided."},status:404,statusText:"Not Found"});return void n.respondWith(s)}var f=o.CR(r);n.respondWith(f)}}}var n=t.prototype;return n.gr=function(t){this.zjt=t,t.addEventListener("message",this.fQt),t.addEventListener("fetch",this.XP)},n.IN=function(t){var n=this.r8.get(t);n&&n.close(),this.r8.delete(t)},n.BR=function(){return nn(function(){var t,n,i;return en(this,function(e){switch(e.label){case 0:return t=this,[4,this.zjt.clients.matchAll()];case 1:return n=e.sent(),i=n.map(function(t){return t.id}),this.r8.forEach(function(n,e){cn(i,n.TR)||t.IN(e)}),[2]}})}).call(this)},t}();na.ID=new na;var ia=self;ia.addEventListener("install",function(t){t.waitUntil(ia.skipWaiting())}),ia.addEventListener("activate",function(t){t.waitUntil(ia.clients.claim())}),na.ID.gr(ia)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this); +!function(t){"use strict";var n,i,e,r,o,u,s,f,h,c=t.window,a=t.document,v=(t.location,t.navigator),d=t.setTimeout,l=t.clearTimeout,w=t.setInterval,b=t.clearInterval,g=t.Error,m=t.TypeError,p=(t.SyntaxError,t.Object),y=t.Math,_=t.parseInt,S=t.parseFloat,T=t.isNaN,k=t.Uint8Array,I=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest),E=p.create,R=p.defineProperty,O=p.getOwnPropertyDescriptor,N=p.getOwnPropertyNames,P=p.getPrototypeOf,A=p.prototype.hasOwnProperty,D=function(t,n){return function(){return t&&(n=t(t=0)),n}},C=function(t,n){return function(){return n||t((n={exports:{}}).exports,n),n.exports}},x=D(function(){"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=null!=(u=Symbol.for)?u:Symbol,e=Symbol.iterator,r=null!=(s=Symbol.dispose)?s:i("Symbol.dispose"),o=null!=(f=Symbol.asyncDispose)?f:i("Symbol.asyncDispose")):(h=0,n=function(t){return"hd"+t+"_"+ ++h},e=(i=function(t){return"hd"+t})("Symbol.iterator"),r=i("Symbol.dispose"),o=i("Symbol.asyncDispose"),n.for=i,n.iterator=e,n.dispose=r,n.asyncDispose=o)});function B(t,i){return null!=i&&void 0!==n&&i[n.hasInstance]?!!i[n.hasInstance](t):t instanceof i}var M=D(function(){x(),pt()});function F(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}var L,U,z,W,V,H,q,X,j,Y,K,G,$,Z,J,Q,tt,nt,it,et=D(function(){x(),pt()});function rt(t){var n=this.constructor;return this.then(function(i){return n.resolve(t()).then(function(){return i})},function(i){return n.resolve(t()).then(function(){return n.reject(i)})})}function ot(t){return new this(function(n,i){if(!t||void 0===t.length)return i(new m((void 0===t?"undefined":F(t))+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,i){if(i&&("object"===(void 0===i?"undefined":F(i))||"function"==typeof i)){var u=i.then;if("function"==typeof u)return void u.call(i,function(n){o(t,n)},function(i){e[t]={status:"rejected",reason:i},0===--r&&n(e)})}e[t]={status:"fulfilled",value:i},0===--r&&n(e)}for(var u=0;u0;)n.shift()();i=!1}}).EQ,ft.nki=it.W6,ft.rki=function(t){try{var n=Z(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}d(function(){throw new g("Unhandled promise rejection: ".concat(t))},0)})}),pt=D(function(){mt()}),yt=C(function(t,i){var r,o;x(),pt(),et(),r=t,o=function(t){var i="function"==typeof n&&"symbol"===F(e)?n:function(t){return"Symbol("+t+")"};function r(){}var o=Number.isNaN||function(t){return t!=t},u=r;function s(t){return"object"===(void 0===t?"undefined":F(t))&&null!==t||"function"==typeof t}function f(t){return t.slice()}function h(t,n,i,e,r){new k(t).set(new k(i,e,r),n)}function c(t){return!1!==function(t){return"number"==typeof t&&(!o(t)&&!(t<0))}(t)&&t!==1/0}function a(t,n,i){if("function"!=typeof t)throw new m("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function v(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new m(r+" is not a method");switch(i){case 0:return function(){return l(r,t,e)};case 1:return function(n){var i=[n].concat(e);return l(r,t,i)}}}return function(){return R(void 0)}}function d(t,n,i){var e=t[n];if(void 0!==e)return a(e,t,i)}function l(t,n,i){try{return R(a(t,n,i))}catch(t){return O(t)}}function w(t){if(t=Number(t),o(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function b(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new m("size property of a queuing strategy must be a function");return function(n){return t(n)}}var _=tt,S=tt.prototype.then,T=tt.resolve.bind(_),I=tt.reject.bind(_);function E(t){return new _(t)}function R(t){return T(t)}function O(t){return I(t)}function N(t,n,i){return S.call(t,n,i)}function P(t,n,i){N(N(t,n,i),void 0,u)}function A(t,n){P(t,n)}function D(t,n){P(t,void 0,n)}function C(t,n,i){return N(t,n,i)}function x(t){N(t,void 0,u)}var B=function(){function t(){this.Rd=0,this.Dd=0,this.Ld={Od:[],Fd:void 0},this.Ud=this.Ld,this.Rd=0,this.Dd=0}return p.defineProperty(t.prototype,"length",{get:function(){return this.Dd},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.Ud,i=n;16383===n.Od.length&&(i={Od:[],Fd:void 0}),n.Od.push(t),i!==n&&(this.Ud=i,n.Fd=i),++this.Dd},t.prototype.shift=function(){var t=this.Ld,n=t,i=this.Rd,e=i+1,r=t.Od,o=r[i];return 16384===e&&(n=t.Fd,e=0),--this.Dd,this.Rd=e,t!==n&&(this.Ld=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.Rd,i=this.Ld,e=i.Od;!(n===e.length&&void 0===i.Fd||n===e.length&&(n=0,0===(e=(i=i.Fd).Od).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.Ld,n=this.Rd;return t.Od[n]},t}();function M(t,n,i){var e=null;!0===i&&(e=p.prototype);var r=p.create(e);return r.value=t,r.done=n,r}function L(t,n){t.Vd=!0,t.Hd=n,n.Wd=t,"readable"===n.Ra?V(t):"closed"===n.Ra?function(t){V(t),X(t)}(t):H(t,n.qd)}function U(t,n){return Zn(t.Hd,n)}function z(t){"readable"===t.Hd.Ra?q(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){H(t,n)}(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")),t.Hd.Wd=void 0,t.Hd=void 0}function W(t){return new m("Cannot "+t+" a stream using a released reader")}function V(t){t.zd=E(function(n,i){t.Gd=n,t.Xd=i})}function H(t,n){V(t),q(t,n)}function q(t,n){x(t.zd),t.Xd(n),t.Gd=void 0,t.Xd=void 0}function X(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0}var j=i("[[CancelSteps]]"),Y=i("[[PullSteps]]");function K(t,n){void 0===n&&(n=!1);var i=new it(t);return i.Vd=n,i}function G(t){return E(function(n,i){var e={Qd:n,Kd:i};t.Wd.Yd.push(e)})}function $(t,n,i){var e=t.Wd;e.Yd.shift().Qd(M(n,i,e.Vd))}function Z(t){return t.Wd.Yd.length}function J(t){var n=t.Wd;return void 0!==n&&!!et(n)}var Q,nt,it=function(){function t(t){if(!1===Gn(t))throw new m("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===$n(t))throw new m("This stream has already been locked for exclusive reading by another reader");L(this,t),this.Yd=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return et(this)?this.zd:O(ot("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return et(this)?void 0===this.Hd?O(W("cancel")):U(this,t):O(ot("cancel"))},t.prototype.read=function(){return et(this)?void 0===this.Hd?O(W("read from")):rt(this):O(ot("read"))},t.prototype.releaseLock=function(){if(!et(this))throw ot("releaseLock");if(void 0!==this.Hd){if(this.Yd.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function et(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Yd")}function rt(t){var n=t.Hd;return n.Jd=!0,"closed"===n.Ra?R(M(void 0,!0,t.Vd)):"errored"===n.Ra?O(n.qd):n.Zd[Y]()}function ot(t){return new m("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"===F(i.asyncIterator)&&((Q={})[i.asyncIterator]=function(){return this},nt=Q,p.defineProperty(nt,i.asyncIterator,{enumerable:!1}));var ut={next:function(){if(!1===st(this))return O(ft("next"));var t=this.$d;return void 0===t.Hd?O(W("iterate")):C(rt(t),function(n){var i=n.done;return i&&z(t),M(n.value,i,!0)})},return:function(t){if(!1===st(this))return O(ft("next"));var n=this.$d;if(void 0===n.Hd)return O(W("finish iterating"));if(n.Yd.length>0)return O(new m("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.ul){var i=U(n,t);return z(n),C(i,function(){return M(t,!0,!0)})}return z(n),R(M(t,!0,!0))}};function st(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"$d")}function ft(t){return new m("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function ht(t){var n=t.tf.shift();return t.if-=n.size,t.if<0&&(t.if=0),n.value}function ct(t,n,i){if(!c(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.tf.push({value:n,size:i}),t.if+=i}function at(t){t.tf=new B,t.if=0}void 0!==nt&&p.setPrototypeOf(ut,nt),p.defineProperty(ut,"next",{enumerable:!1}),p.defineProperty(ut,"return",{enumerable:!1});var vt=i("[[AbortSteps]]"),dt=i("[[ErrorSteps]]"),lt=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),bt(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(xt.prototype);function o(){return d(n,"start",[r])}var u=v(n,"write",1,[r]),s=v(n,"close",0,[]),f=v(n,"abort",1,[]);Bt(t,r,o,u,s,f,i,e)}(this,t,e=w(e),r)}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===gt(this))throw Vt("locked");return mt(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===gt(this)?O(Vt("abort")):!0===mt(this)?O(new m("Cannot abort a stream that already has a writer")):pt(this,t)},t.prototype.close=function(){return!1===gt(this)?O(Vt("close")):!0===mt(this)?O(new m("Cannot close a stream that already has a writer")):!0===kt(this)?O(new m("Cannot close an already-closing stream")):yt(this)},t.prototype.getWriter=function(){if(!1===gt(this))throw Vt("getWriter");return wt(this)},t}();function wt(t){return new Rt(t)}function bt(t){t.Ra="writable",t.qd=void 0,t.ef=void 0,t.nf=void 0,t.rf=new B,t.hf=void 0,t.uf=void 0,t.cf=void 0,t.df=void 0,t.lf=!1}function gt(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"nf")}function mt(t){return void 0!==t.ef}function pt(t,n){var i=t.Ra;if("closed"===i||"errored"===i)return R(void 0);if(void 0!==t.df)return t.df.vf;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=E(function(i,r){t.df={vf:void 0,Qd:i,Kd:r,_f:n,gf:e}});return t.df.vf=r,!1===e&&St(t,n),r}function yt(t){var n=t.Ra;if("closed"===n||"errored"===n)return O(new m("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=E(function(n,i){var e={Qd:n,Kd:i};t.uf=e}),e=t.ef;return void 0!==e&&!0===t.lf&&"writable"===n&&Qt(e),function(t){ct(t,"close",0),Lt(t)}(t.nf),i}function _t(t,n){"writable"!==t.Ra?Tt(t):St(t,n)}function St(t,n){var i=t.nf;t.Ra="erroring",t.qd=n;var e=t.ef;void 0!==e&&At(e,n),!1===function(t){return void 0!==t.hf||void 0!==t.cf}(t)&&!0===i.pf&&Tt(t)}function Tt(t){t.Ra="errored",t.nf[dt]();var n=t.qd;if(t.rf.forEach(function(t){t.Kd(n)}),t.rf=new B,void 0!==t.df){var i=t.df;if(t.df=void 0,!0===i.gf)return i.Kd(n),void It(t);P(t.nf[vt](i._f),function(){i.Qd(),It(t)},function(n){i.Kd(n),It(t)})}else It(t)}function kt(t){return void 0!==t.uf||void 0!==t.cf}function It(t){void 0!==t.uf&&(t.uf.Kd(t.qd),t.uf=void 0);var n=t.ef;void 0!==n&&Yt(n,t.qd)}function Et(t,n){var i=t.ef;void 0!==i&&n!==t.lf&&(!0===n?function(t){Gt(t)}(i):Qt(i)),t.lf=n}var Rt=function(){function t(t){if(!1===gt(t))throw new m("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===mt(t))throw new m("This stream has already been locked for exclusive writing by another writer");this.mf=t,t.ef=this;var n=t.Ra;if("writable"===n)!1===kt(t)&&!0===t.lf?Gt(this):Zt(this),Xt(this);else if("erroring"===n)$t(this,t.qd),Xt(this);else if("closed"===n)Zt(this),function(t){Xt(t),Kt(t)}(this);else{var i=t.qd;$t(this,i),jt(this,i)}}return p.defineProperty(t.prototype,"closed",{get:function(){return!1===Ot(this)?O(Ht("closed")):this.zd},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ot(this))throw Ht("desiredSize");if(void 0===this.mf)throw qt("desiredSize");return function(t){var n=t.mf,i=n.Ra;return"errored"===i||"erroring"===i?null:"closed"===i?0:Ft(n.nf)}(this)},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"ready",{get:function(){return!1===Ot(this)?O(Ht("ready")):this.wf},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Ot(this)?O(Ht("abort")):void 0===this.mf?O(qt("abort")):function(t,n){var i=t.mf;return pt(i,n)}(this,t)},t.prototype.close=function(){if(!1===Ot(this))return O(Ht("close"));var t=this.mf;return void 0===t?O(qt("close")):!0===kt(t)?O(new m("Cannot close an already-closing stream")):Nt(this)},t.prototype.releaseLock=function(){if(!1===Ot(this))throw Ht("releaseLock");void 0!==this.mf&&Dt(this)},t.prototype.write=function(t){return!1===Ot(this)?O(Ht("write")):void 0===this.mf?O(qt("write to")):Ct(this,t)},t}();function Ot(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"mf")}function Nt(t){return yt(t.mf)}function Pt(t,n){"pending"===t.yf?Yt(t,n):function(t,n){jt(t,n)}(t,n)}function At(t,n){"pending"===t.bf?Jt(t,n):function(t,n){$t(t,n)}(t,n)}function Dt(t){var n=t.mf,i=new m("Writer was released and can no longer be used to monitor the stream's closedness");At(t,i),Pt(t,i),n.ef=void 0,t.mf=void 0}function Ct(t,n){var i=t.mf,e=i.nf,r=function(t,n){try{return t.Af(n)}catch(n){return Ut(t,n),1}}(e,n);if(i!==t.mf)return O(qt("write to"));var o=i.Ra;if("errored"===o)return O(i.qd);if(!0===kt(i)||"closed"===o)return O(new m("The stream is closing or closed and cannot be written to"));if("erroring"===o)return O(i.qd);var u=function(t){return E(function(n,i){var e={Qd:n,Kd:i};t.rf.push(e)})}(i);return function(t,n,i){var e={chunk:n};try{ct(t,e,i)}catch(n){return void Ut(t,n)}var r=t.Sf;!1===kt(r)&&"writable"===r.Ra&&Et(r,zt(t)),Lt(t)}(e,n,r),u}var xt=function(){function t(){throw new m("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Sf")}(this))throw new m("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.Sf.Ra&&Wt(this,t)},t.prototype[vt]=function(t){var n=this.Tf(t);return Mt(this),n},t.prototype[dt]=function(){at(this)},t}();function Bt(t,n,i,e,r,o,u,s){n.Sf=t,t.nf=n,n.tf=void 0,n.if=void 0,at(n),n.pf=!1,n.Af=s,n.kf=u,n.Ef=e,n.xf=r,n.Tf=o;var f=zt(n);Et(t,f),P(R(i()),function(){n.pf=!0,Lt(n)},function(i){n.pf=!0,_t(t,i)})}function Mt(t){t.Ef=void 0,t.xf=void 0,t.Tf=void 0,t.Af=void 0}function Ft(t){return t.kf-t.if}function Lt(t){var n=t.Sf;if(!1!==t.pf&&void 0===n.hf)if("erroring"!==n.Ra){if(0!==t.tf.length){var i=function(t){return t.tf.peek().value}(t);"close"===i?function(t){var n=t.Sf;(function(t){t.cf=t.uf,t.uf=void 0})(n),ht(t);var i=t.xf();Mt(t),P(i,function(){!function(t){t.cf.Qd(void 0),t.cf=void 0,"erroring"===t.Ra&&(t.qd=void 0,void 0!==t.df&&(t.df.Qd(),t.df=void 0)),t.Ra="closed";var n=t.ef;void 0!==n&&Kt(n)}(n)},function(t){!function(t,n){t.cf.Kd(n),t.cf=void 0,void 0!==t.df&&(t.df.Kd(n),t.df=void 0),_t(t,n)}(n,t)})}(t):function(t,n){var i=t.Sf;!function(t){t.hf=t.rf.shift()}(i);var e=t.Ef(n);P(e,function(){!function(t){t.hf.Qd(void 0),t.hf=void 0}(i);var n=i.Ra;if(ht(t),!1===kt(i)&&"writable"===n){var e=zt(t);Et(i,e)}Lt(t)},function(n){"writable"===i.Ra&&Mt(t),function(t,n){t.hf.Kd(n),t.hf=void 0,_t(t,n)}(i,n)})}(t,i.chunk)}}else Tt(n)}function Ut(t,n){"writable"===t.Sf.Ra&&Wt(t,n)}function zt(t){return Ft(t)<=0}function Wt(t,n){var i=t.Sf;Mt(t),St(i,n)}function Vt(t){return new m("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Ht(t){return new m("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function qt(t){return new m("Cannot "+t+" a stream using a released writer")}function Xt(t){t.zd=E(function(n,i){t.Gd=n,t.Xd=i,t.yf="pending"})}function jt(t,n){Xt(t),Yt(t,n)}function Yt(t,n){x(t.zd),t.Xd(n),t.Gd=void 0,t.Xd=void 0,t.yf="rejected"}function Kt(t){t.Gd(void 0),t.Gd=void 0,t.Xd=void 0,t.yf="resolved"}function Gt(t){t.wf=E(function(n,i){t.Pf=n,t.If=i}),t.bf="pending"}function $t(t,n){Gt(t),Jt(t,n)}function Zt(t){Gt(t),Qt(t)}function Jt(t,n){x(t.wf),t.If(n),t.Pf=void 0,t.If=void 0,t.bf="rejected"}function Qt(t){t.Pf(void 0),t.Pf=void 0,t.If=void 0,t.bf="fulfilled"}function tn(t){if("object"!==(void 0===t?"undefined":F(t))||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var nn,en="undefined"!=typeof DOMException?DOMException:void 0,rn=function(t){if("function"!=typeof t&&"object"!==(void 0===t?"undefined":F(t)))return!1;try{return new t,!0}catch(t){return!1}}(en)?en:((nn=function(t,n){this.message=t||"",this.name=n||"Error",g.captureStackTrace&&g.captureStackTrace(this,this.constructor)}).prototype=p.create(g.prototype),p.defineProperty(nn.prototype,"constructor",{value:nn,writable:!0,configurable:!0}),nn);function on(t,n,i,e,o,u){var s=K(t),f=wt(n);t.Jd=!0;var h=!1,c=R(void 0);return E(function(a,v){var d,l,w,b;if(void 0!==u){if(d=function(){var i=new rn("Aborted","AbortError"),r=[];!1===e&&r.push(function(){return"writable"===n.Ra?pt(n,i):R(void 0)}),!1===o&&r.push(function(){return"readable"===t.Ra?Zn(t,i):R(void 0)}),_(function(){return tt.all(r.map(function(t){return t()}))},!0,i)},!0===u.aborted)return void d();u.addEventListener("abort",d)}if(y(t,s.zd,function(t){!1===e?_(function(){return pt(n,t)},!0,t):S(!0,t)}),y(n,f.zd,function(n){!1===o?_(function(){return Zn(t,n)},!0,n):S(!0,n)}),l=t,w=s.zd,b=function(){!1===i?_(function(){return function(t){var n=t.mf,i=n.Ra;return!0===kt(n)||"closed"===i?R(void 0):"errored"===i?O(n.qd):Nt(t)}(f)}):S()},"closed"===l.Ra?b():A(w,b),!0===kt(n)||"closed"===n.Ra){var g=new m("the destination writable stream closed before all data could be piped to it");!1===o?_(function(){return Zn(t,g)},!0,g):S(!0,g)}function p(){var t=c;return N(c,function(){return t!==c?p():void 0})}function y(t,n,i){"errored"===t.Ra?i(t.qd):D(n,i)}function _(t,i,e){function r(){P(t(),function(){return T(i,e)},function(t){return T(!0,t)})}!0!==h&&(h=!0,"writable"===n.Ra&&!1===kt(n)?A(p(),r):r())}function S(t,i){!0!==h&&(h=!0,"writable"===n.Ra&&!1===kt(n)?A(p(),function(){return T(t,i)}):T(t,i))}function T(t,n){Dt(f),z(s),void 0!==u&&u.removeEventListener("abort",d),t?v(n):a(void 0)}x(E(function(t,n){!function i(e){e?t():N(!0===h?R(!0):N(f.wf,function(){return N(rt(s),function(t){return!0===t.done||(c=N(Ct(f,t.value),void 0,r),!1)})}),i,n)}(!1)}))})}var un=function(){function t(){throw new m}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===sn(this))throw gn("desiredSize");return ln(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===sn(this))throw gn("close");if(!1===wn(this))throw new m("The stream is not in a state that permits close");an(this)},t.prototype.enqueue=function(t){if(!1===sn(this))throw gn("enqueue");if(!1===wn(this))throw new m("The stream is not in a state that permits enqueue");return vn(this,t)},t.prototype.error=function(t){if(!1===sn(this))throw gn("error");dn(this,t)},t.prototype[j]=function(t){at(this);var n=this.Cf(t);return cn(this),n},t.prototype[Y]=function(){var t=this.Rf;if(this.tf.length>0){var n=ht(this);return!0===this.Df&&0===this.tf.length?(cn(this),Jn(t)):fn(this),R(M(n,!1,t.Wd.Vd))}var i=G(t);return fn(this),i},t}();function sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Rf")}function fn(t){!1!==hn(t)&&(!0!==t.Nf?(t.Nf=!0,P(t.Bf(),function(){t.Nf=!1,!0===t.Mf&&(t.Mf=!1,fn(t))},function(n){dn(t,n)})):t.Mf=!0)}function hn(t){var n=t.Rf;return!1!==wn(t)&&!1!==t.pf&&(!0===$n(n)&&Z(n)>0||ln(t)>0)}function cn(t){t.Bf=void 0,t.Cf=void 0,t.Af=void 0}function an(t){var n=t.Rf;t.Df=!0,0===t.tf.length&&(cn(t),Jn(n))}function vn(t,n){var i=t.Rf;if(!0===$n(i)&&Z(i)>0)$(i,n,!1);else{var e=void 0;try{e=t.Af(n)}catch(n){throw dn(t,n),n}try{ct(t,n,e)}catch(n){throw dn(t,n),n}}fn(t)}function dn(t,n){var i=t.Rf;"readable"===i.Ra&&(at(t),cn(t),Qn(i,n))}function ln(t){var n=t.Rf.Ra;return"errored"===n?null:"closed"===n?0:t.kf-t.if}function wn(t){var n=t.Rf.Ra;return!1===t.Df&&"readable"===n}function bn(t,n,i,e,r,o,u){n.Rf=t,n.tf=void 0,n.if=void 0,at(n),n.pf=!1,n.Df=!1,n.Mf=!1,n.Nf=!1,n.Af=u,n.kf=o,n.Bf=e,n.Cf=r,t.Zd=n,P(R(i()),function(){n.pf=!0,fn(n)},function(t){dn(n,t)})}function gn(t){return new m("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var mn=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&y.floor(t)===t},pn=function(){function t(){throw new m("ReadableStreamBYOBRequest cannot be used directly")}return p.defineProperty(t.prototype,"view",{get:function(){if(!1===Sn(this))throw Ln("view");return this.Lf},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Sn(this))throw Ln("respond");if(void 0===this.Of)throw new m("This BYOB request has been invalidated");this.Lf.buffer,function(t,n){if(!1===c(n=Number(n)))throw new RangeError("bytesWritten must be a finite");Dn(t,n)}(this.Of,t)},t.prototype.respondWithNewView=function(t){if(!1===Sn(this))throw Ln("respond");if(void 0===this.Of)throw new m("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new m("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.Ff.peek();if(i.byteOffset+i.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.byteLength!==n.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");i.buffer=n.buffer,Dn(t,n.byteLength)}(this.Of,t)},t}(),yn=function(){function t(){throw new m("ReadableByteStreamController constructor cannot be used directly")}return p.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===_n(this))throw Un("byobRequest");if(void 0===this.Uf&&this.Ff.length>0){var t=this.Ff.peek(),n=new k(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=p.create(pn.prototype);!function(t,n,i){t.Of=n,t.Lf=i}(i,this,n),this.Uf=i}return this.Uf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===_n(this))throw Un("desiredSize");return Mn(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===_n(this))throw Un("close");if(!0===this.Df)throw new m("The stream has already been closed; do not close it again!");var t=this.Vf.Ra;if("readable"!==t)throw new m("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.Vf;if(t.if>0)t.Df=!0;else{if(t.Ff.length>0&&t.Ff.peek().bytesFilled>0){var i=new m("Insufficient bytes to fill elements in the given buffer");throw Bn(t,i),i}xn(t),Jn(n)}}(this)},t.prototype.enqueue=function(t){if(!1===_n(this))throw Un("enqueue");if(!0===this.Df)throw new m("stream is closed or draining");var n=this.Vf.Ra;if("readable"!==n)throw new m("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new m("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.Vf,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;!0===J(i)?0===Z(i)?En(t,u,r,o):$(i,new k(u,r,o),!1):!0===Vn(i)?(En(t,u,r,o),An(t)):En(t,u,r,o),Tn(t)}(this,t)},t.prototype.error=function(t){if(!1===_n(this))throw Un("error");Bn(this,t)},t.prototype[j]=function(t){this.Ff.length>0&&(this.Ff.peek().bytesFilled=0),at(this);var n=this.Cf(t);return xn(this),n},t.prototype[Y]=function(){var t=this.Vf;if(this.if>0){var n=this.tf.shift();this.if-=n.byteLength,Nn(this);var i=void 0;try{i=new k(n.buffer,n.byteOffset,n.byteLength)}catch(t){return O(t)}return R(M(i,!1,t.Wd.Vd))}var e=this.Hf;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return O(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:k,readerType:"default"};this.Ff.push(o)}var u=G(t);return Tn(this),u},t}();function _n(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Vf")}function Sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Of")}function Tn(t){var n=function(t){var n=t.Vf;if("readable"!==n.Ra)return!1;if(!0===t.Df)return!1;if(!1===t.pf)return!1;if(!0===J(n)&&Z(n)>0)return!0;if(!0===Vn(n)&&Wn(n)>0)return!0;var i=Mn(t);return i>0}(t);!1!==n&&(!0!==t.Nf?(t.Nf=!0,P(t.Bf(),function(){t.Nf=!1,!0===t.Mf&&(t.Mf=!1,Tn(t))},function(n){Bn(t,n)})):t.Mf=!0)}function kn(t,n){var i=!1;"closed"===t.Ra&&(i=!0);var e=In(n);"default"===n.readerType?$(t,e,i):function(t,n,i){var e=t.Wd,r=e.Wf.shift();r.Qd(M(n,i,e.Vd))}(t,e,i)}function In(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function En(t,n,i,e){t.tf.push({buffer:n,byteOffset:i,byteLength:e}),t.if+=e}function Rn(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=y.min(t.if,n.byteLength-n.bytesFilled),o=n.bytesFilled+r,u=o-o%i,s=r,f=!1;u>e&&(s=u-n.bytesFilled,f=!0);for(var c=t.tf;s>0;){var a=c.peek(),v=y.min(s,a.byteLength),d=n.byteOffset+n.bytesFilled;h(n.buffer,d,a.buffer,a.byteOffset,v),a.byteLength===v?c.shift():(a.byteOffset+=v,a.byteLength-=v),t.if-=v,On(t,v,n),s-=v}return f}function On(t,n,i){Pn(t),i.bytesFilled+=n}function Nn(t){0===t.if&&!0===t.Df?(xn(t),Jn(t.Vf)):Tn(t)}function Pn(t){void 0!==t.Uf&&(t.Uf.Of=void 0,t.Uf.Lf=void 0,t.Uf=void 0)}function An(t){for(;t.Ff.length>0;){if(0===t.if)return;var n=t.Ff.peek();!0===Rn(t,n)&&(Cn(t),kn(t.Vf,n))}}function Dn(t,n){var i=t.Ff.peek();if("closed"===t.Vf.Ra){if(0!==n)throw new m("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.Vf;if(!0===Vn(i))for(;Wn(i)>0;)kn(i,Cn(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(On(t,n,i),!(i.bytesFilled0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);En(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,kn(t.Vf,i),An(t)}}(t,n,i);Tn(t)}function Cn(t){var n=t.Ff.shift();return Pn(t),n}function xn(t){t.Bf=void 0,t.Cf=void 0}function Bn(t,n){var i=t.Vf;"readable"===i.Ra&&(function(t){Pn(t),t.Ff=new B}(t),at(t),xn(t),Qn(i,n))}function Mn(t){var n=t.Vf.Ra;return"errored"===n?null:"closed"===n?0:t.kf-t.if}function Fn(t,n,i){var e=p.create(yn.prototype),r=v(n,"pull",0,[e]),o=v(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===mn(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.Vf=t,n.Mf=!1,n.Nf=!1,n.Uf=void 0,n.tf=n.if=void 0,at(n),n.Df=!1,n.pf=!1,n.kf=w(o),n.Bf=e,n.Cf=r,n.Hf=u,n.Ff=new B,t.Zd=n,P(R(i()),function(){n.pf=!0,Tn(n)},function(t){Bn(n,t)})}(t,e,function(){return d(n,"start",[e])},r,o,i,u)}function Ln(t){return new m("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Un(t){return new m("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function zn(t){return E(function(n,i){var e={Qd:n,Kd:i};t.Wd.Wf.push(e)})}function Wn(t){return t.Wd.Wf.length}function Vn(t){var n=t.Wd;return void 0!==n&&!!qn(n)}var Hn=function(){function t(t){if(!Gn(t))throw new m("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===_n(t.Zd))throw new m("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if($n(t))throw new m("This stream has already been locked for exclusive reading by another reader");L(this,t),this.Wf=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return qn(this)?this.zd:O(Xn("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return qn(this)?void 0===this.Hd?O(W("cancel")):U(this,t):O(Xn("cancel"))},t.prototype.read=function(t){return qn(this)?void 0===this.Hd?O(W("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?O(new m("view must have non-zero byteLength")):function(t,n){var i=t.Hd;return i.Jd=!0,"errored"===i.Ra?O(i.qd):function(t,n){var i=t.Vf,e=1;n.constructor!==DataView&&(e=n.constructor.BYTES_PER_ELEMENT);var r=n.constructor,o={buffer:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:e,ctor:r,readerType:"byob"};if(t.Ff.length>0)return t.Ff.push(o),zn(i);if("closed"===i.Ra)return R(M(new r(o.buffer,o.byteOffset,0),!0,i.Wd.Vd));if(t.if>0){if(!0===Rn(t,o)){var u=In(o);return Nn(t),R(M(u,!1,i.Wd.Vd))}if(!0===t.Df){var s=new m("Insufficient bytes to fill elements in the given buffer");return Bn(t,s),O(s)}}t.Ff.push(o);var f=zn(i);return Tn(t),f}(i.Zd,n)}(this,t)):O(new m("view must be an array buffer view")):O(Xn("read"))},t.prototype.releaseLock=function(){if(!qn(this))throw Xn("releaseLock");if(void 0!==this.Hd){if(this.Wf.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function qn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Wf")}function Xn(t){return new m("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var jn=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Kn(this);var i=n.size,e=n.highWaterMark,r=t.type;if("bytes"===String(r)){if(void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===e&&(e=0),Fn(this,t,e=w(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(un.prototype),o=v(n,"pull",0,[r]),u=v(n,"cancel",1,[]);bn(t,r,function(){return d(n,"start",[r])},o,u,i,e)}(this,t,e=w(e),o)}}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===Gn(this))throw ti("locked");return $n(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Gn(this)?O(ti("cancel")):!0===$n(this)?O(new m("Cannot cancel a stream that already has a reader")):Zn(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Gn(this))throw ti("getReader");if(void 0===n)return K(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new Hn(t);return i.Vd=n,i}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,n){var i=t.writable,e=t.readable,r=void 0===n?{}:n,o=r.preventClose,u=r.preventAbort,s=r.preventCancel,f=r.signal;if(!1===Gn(this))throw ti("pipeThrough");if(!1===gt(i))throw new m("writable argument to pipeThrough must be a WritableStream");if(!1===Gn(e))throw new m("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!tn(f))throw new m("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===$n(this))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===mt(i))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return x(on(this,i,o,u,s,f)),e},t.prototype.pipeTo=function(t,n){var i=void 0===n?{}:n,e=i.preventClose,r=i.preventAbort,o=i.preventCancel,u=i.signal;return!1===Gn(this)?O(ti("pipeTo")):!1===gt(t)?O(new m("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||tn(u)?!0===$n(this)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===mt(t)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):on(this,t,e,r,o,u):O(new m("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Gn(this))throw ti("tee");var t=function(t){var n,i,e,r,o,u=K(t),s=!1,h=!1,c=!1,a=E(function(t){o=t});function v(){return!0===s||(s=!0,x(C(rt(u),function(t){if(s=!1,!0===t.done)return!1===h&&an(e.Zd),void(!1===c&&an(r.Zd));var n=t.value,i=n,o=n;!1===h&&vn(e.Zd,i),!1===c&&vn(r.Zd,o)}))),R(void 0)}function d(){}return e=Yn(d,v,function(e){if(h=!0,n=e,!0===c){var r=f([n,i]),u=Zn(t,r);o(u)}return a}),r=Yn(d,v,function(e){if(c=!0,i=e,!0===h){var r=f([n,i]),u=Zn(t,r);o(u)}return a}),D(u.zd,function(t){dn(e.Zd,t),dn(r.Zd,t)}),[e,r]}(this);return f(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Gn(this))throw ti("getIterator");return function(t,n){void 0===n&&(n=!1);var i=K(t),e=p.create(ut);return e.$d=i,e.ul=Boolean(n),e}(this,i)},t}();function Yn(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=p.create(jn.prototype);return Kn(o),bn(o,p.create(un.prototype),t,n,i,e,r),o}function Kn(t){t.Ra="readable",t.Wd=void 0,t.qd=void 0,t.Jd=!1}function Gn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Zd")}function $n(t){return void 0!==t.Wd}function Zn(t,n){return t.Jd=!0,"closed"===t.Ra?R(void 0):"errored"===t.Ra?O(t.qd):(Jn(t),C(t.Zd[j](n),r))}function Jn(t){t.Ra="closed";var n=t.Wd;void 0!==n&&(et(n)&&(n.Yd.forEach(function(t){t.Qd(M(void 0,!0,n.Vd))}),n.Yd=new B),X(n))}function Qn(t,n){t.Ra="errored",t.qd=n;var i=t.Wd;void 0!==i&&(et(i)?(i.Yd.forEach(function(t){t.Kd(n)}),i.Yd=new B):(i.Wf.forEach(function(t){t.Kd(n)}),i.Wf=new B),q(i,n))}function ti(t){return new m("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"===F(i.asyncIterator)&&p.defineProperty(jn.prototype,i.asyncIterator,{value:jn.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var ni=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(t){return t.byteLength},t}(),ii=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(){return 1},t}(),ei=function(){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={}),void 0===i&&(i={});var e=n.size,r=n.highWaterMark,o=i.size,u=i.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var s=b(e);if(void 0===r&&(r=1),r=w(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,h=b(o);void 0===u&&(u=0),u=w(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.qf;return!0===t.lf?C(t.zf,function(){var e=t.Gf;if("erroring"===e.Ra)throw e.qd;return vi(i,n)}):vi(i,n)}(t,n)}function f(n){return function(t,n){return oi(t,n),R(void 0)}(t,n)}function h(){return function(t){var n=t.Xf,i=t.qf,e=i.jf();return ci(i),C(e,function(){if("errored"===n.Ra)throw n.qd;var t=n.Zd;!0===wn(t)&&an(t)},function(i){throw oi(t,i),n.qd})}(t)}function c(){return function(t){return si(t,!1),t.zf}(t)}function a(n){return ui(t,n),R(void 0)}t.Gf=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=p.create(lt.prototype);return bt(u),Bt(u,p.create(xt.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.Xf=Yn(u,c,a,r,o),t.lf=void 0,t.zf=void 0,t.Qf=void 0,si(t,!0),t.qf=void 0}(this,E(function(t){f=t}),r,s,u,h),function(t,n){var i=p.create(fi.prototype),e=function(t){try{return ai(i,t),R(void 0)}catch(t){return O(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new m("transform is not a method");e=function(t){return l(r,n,[t,i])}}var o=v(n,"flush",0,[i]);!function(t,n,i,e){n.Kf=t,t.qf=n,n.Yf=i,n.jf=e}(t,i,e,o)}(this,t);var c=d(t,"start",[this.qf]);f(c)}return p.defineProperty(t.prototype,"readable",{get:function(){if(!1===ri(this))throw li("readable");return this.Xf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"writable",{get:function(){if(!1===ri(this))throw li("writable");return this.Gf},enumerable:!0,configurable:!0}),t}();function ri(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"qf")}function oi(t,n){dn(t.Xf.Zd,n),ui(t,n)}function ui(t,n){ci(t.qf),Ut(t.Gf.nf,n),!0===t.lf&&si(t,!1)}function si(t,n){void 0!==t.zf&&t.Qf(),t.zf=E(function(n){t.Qf=n}),t.lf=n}var fi=function(){function t(){throw new m("TransformStreamDefaultController instances cannot be created directly")}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===hi(this))throw di("desiredSize");return ln(this.Kf.Xf.Zd)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===hi(this))throw di("enqueue");ai(this,t)},t.prototype.error=function(t){if(!1===hi(this))throw di("error");!function(t,n){oi(t.Kf,n)}(this,t)},t.prototype.terminate=function(){if(!1===hi(this))throw di("terminate");!function(t){var n=t.Kf,i=n.Xf.Zd;!0===wn(i)&&an(i);var e=new m("TransformStream terminated");ui(n,e)}(this)},t}();function hi(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Kf")}function ci(t){t.Yf=void 0,t.jf=void 0}function ai(t,n){var i=t.Kf,e=i.Xf.Zd;if(!1===wn(e))throw new m("Readable side is not in a state that permits enqueue");try{vn(e,n)}catch(t){throw ui(i,t),i.Xf.qd}var r=function(t){return!0!==hn(t)}(e);r!==i.lf&&si(i,!0)}function vi(t,n){return C(t.Yf(n),void 0,function(n){throw oi(t.Kf,n),n})}function di(t){return new m("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function li(t){return new m("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=ni,t.CountQueuingStrategy=ii,t.ReadableStream=jn,t.TransformStream=ei,t.WritableStream=lt,p.defineProperty(t,"__esModule",{value:!0})},"object"===(void 0===t?"undefined":F(t))&&void 0!==i?o(t):"function"==typeof define&&define.amd?define(["exports"],o):o((r=r||self).WebStreamsPolyfill={})}),_t=C(function(t){function n(){var t=yt();return n=function(){return t},t}x(),pt(),p.defineProperty(t,"__esModule",{value:!0}),function(t,n){for(var i in n)p.defineProperty(t,i,{enumerable:!0,get:p.getOwnPropertyDescriptor(n,i).get})}(t,{get ByteLengthQueuingStrategy(){return n().ByteLengthQueuingStrategy},get CountQueuingStrategy(){return n().CountQueuingStrategy},get ReadableStream(){return n().ReadableStream},get TransformStream(){return n().TransformStream},get WritableStream(){return n().WritableStream}})});function St(t,n){return(St=p.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Tt(t,n){if("function"!=typeof n&&null!==n)throw new m("Super expression must either be null or a function");t.prototype=p.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&St(t,n)}function kt(t,n){for(var i=0;it.length)&&(n=t.length);for(var i=0,e=new Array(n);i=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new m("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt(),M(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt();var Ot,Nt=((Ot={}).Sv="web",Ot.Tv="android",Ot.Ev="android-tv",Ot.xv="ios",Ot.Pv="tvos",Ot.Iv="chromecast",Ot.Cv="theoliveweb",Ot);var Pt=v?v.userAgent:"",At=Pt.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Dt=Pt.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ct=Pt.match(/Android ([0-9\.]+)/i),xt=Pt.match(/Windows NT ([0-9\.]+)/i),Bt=Pt.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Mt=Pt.match(/Firefox\/([0-9\.]+)/i),Ft=Pt.match(/OPR\/(\d+\.\d+)/i),Lt=Pt.match(/Tizen ([0-9\.]+)/i),Ut=Pt.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),zt=Pt.match(/HbbTV\/([0-9.]+)/i),Wt=Pt.match(/(AFT.*) Build/i),Vt=function(){function t(){this.Rv=Boolean("ontouchstart"in self||self.DocumentTouch&&B(a,self.DocumentTouch)||v&&v.msMaxTouchPoints),this.Nv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Pt)||/(macintosh|mac(?=_powerpc)\s)/i.test(Pt),this.Mv=/Windows NT/i.test(Pt),this.Ov=xt?S(xt[1]):0,this.Uv=/Android/i.test(Pt),this.Hv=Ct?S(Ct[1]):0,this.qv=/windows phone (8|8\.1)/i.test(Pt),this.Gv=/iPhone/i.test(Pt),this.Qv=/iPad/i.test(Pt),this.Yv=this.Nv&&this.Rv&&!this.Qv,this.Zv=/iPod/i.test(Pt),this.r_=/Mobile Safari/i.test(Pt),this.s_=/EOS\d*STB/i.test(Pt),this.n_=/APP\d*STB/i.test(Pt),this.$v=(this.Gv||this.Qv||this.Yv||this.Zv)&&!this.qv,this.i_=Ut?S(Ut[2]):0,this.h_=this.qv||this.$v||this.Uv||this.r_,this.a_=/CriOS/i.test(Pt),this.c_=Boolean(self.chrome&&/google/i.test(v.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(v.userAgent),this.p_=Dt?_(Dt[1],10):0,this.Ng=Boolean(/CriOS/i.test(Pt)),this.Dg=Boolean(self.chrome||/Chrome/i.test(Pt)||this.Ng),this.f_=At?_(At[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(Pt),this.A_=Lt?S(Lt[1]):0,this.l_=this.A_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.A_):void 0,this.T_=/webos|web0s/i.test(Pt),this.E_=/HbbTV/i.test(Pt),this.P_=!!zt&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(zt[1]),this.C_=/AFT.* Build/i.test(Pt),this.R_=Wt?Wt[1]:void 0,this.N_=/VIZIO/i.test(Pt),this.M_=/Edge\/\d+/i.test(Pt),this.O_=/Trident/i.test(Pt),this.U_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.H_=/Vivaldi/i.test(Pt),this.q_=/Firefox/i.test(Pt)&&!/Seamonkey/i.test(Pt),this.G_=Mt?S(Mt[1]):0,this.j_=/Safari/i.test(Pt)&&!/Chrome/i.test(Pt)&&!this.qv&&!this.y_,this.K_=Bt?S(Bt[2]):0,this.J_=Boolean(Ft),this.eg=Ft?S(Ft[1]):0,this.hg=/CrKey/.test(Pt),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(Pt),this.fg=/PlayStation 4/i.test(Pt),this._g=/PlayStation 5/i.test(Pt),this.pg="web"===Nt.Ev,this.yg="web"===Nt.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===Nt.xv,this.Pg="web"===Nt.Pv,this.Cg="web"===Nt.Iv}return It(t,[{key:"Ke",get:function(){return this.Rv}},{key:"Dv",get:function(){return this.Nv}},{key:"Bv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Ov}},{key:"Fv",get:function(){return this.Uv}},{key:"Vv",get:function(){return this.Hv}},{key:"Wv",get:function(){return this.qv}},{key:"zv",get:function(){return this.Gv}},{key:"Xv",get:function(){return this.Qv}},{key:"Kv",get:function(){return this.Yv}},{key:"Jv",get:function(){return this.Zv}},{key:"ru",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"e_",get:function(){return this.s_||this.n_}},{key:"vd",get:function(){return this.r_}},{key:"Ks",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"d_",get:function(){var t;return null!=(t=this.l_)?t:this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){var t;return(null==(t=c.chrome)?void 0:t.webview)&&this.p_>0}},{key:"m_",get:function(){return this.p_}},{key:"w_",get:function(){return this.y_}},{key:"b_",get:function(){return this.A_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"x_",get:function(){return this.P_}},{key:"I_",get:function(){return this.C_}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.R_}},{key:"D_",get:function(){return this.N_}},{key:"B_",get:function(){return this.M_}},{key:"L_",get:function(){return this.O_}},{key:"F_",get:function(){return this.U_}},{key:"V_",get:function(){return this.H_}},{key:"W_",get:function(){return this.q_}},{key:"z_",get:function(){return this.G_}},{key:"X_",get:function(){return this.j_}},{key:"Q_",get:function(){return 0===this.K_&&Ht.ru?this.i_:this.K_}},{key:"Y_",get:function(){return this.J_}},{key:"Z_",get:function(){return this.eg}},{key:"rg",get:function(){return this.hg}},{key:"og",get:function(){return this.ag}},{key:"cg",get:function(){return!(!this.S_&&!this.w_)&&this.d_<=56}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"xg",get:function(){return this.Pg}},{key:"Ig",get:function(){return this.Cg}},{key:"Rg",get:function(){return this.Dg}},{key:"IS_IOS_CHROME",get:function(){return this.Ng}}]),t}();Vt.Bg=new Vt;var Ht=Vt.Bg;x(),pt(),et();var qt={}.toString;function Xt(t){return null!=t}var jt,Yt=Array.isArray||function(t){return"[object Array]"===qt.call(t)};function Kt(t){return"object"===(void 0===t?"undefined":F(t))&&null!==t}function Gt(t){return"function"==typeof t}function $t(t){return Gt(t)||Kt(t)}function Zt(t){jt=t}x(),pt(),x(),pt();var Jt=function(){};function Qt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function tn(t,n,i,e,r,o,u){try{var s=t[o](u),f=s.value}catch(t){return void i(t)}s.done?n(f):tt.resolve(f).then(e,r)}function nn(t){return function(){var n=this,i=arguments;return new tt(function(e,r){var o=t.apply(n,i);function u(t){tn(o,e,r,u,s,"next",t)}function s(t){tn(o,e,r,u,s,"throw",t)}u(void 0)})}}function en(t,i){var r,o,u,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},f=p.create(("function"==typeof Iterator?Iterator:p).prototype);return f.next=h(0),f.throw=h(1),f.return=h(2),"function"==typeof n&&(f[e]=function(){return this}),f;function h(n){return function(e){return function(n){if(r)throw new m("Generator is already executing.");for(;f&&(f=0,n[0]&&(s=0)),s;)try{if(r=1,o&&(u=2&n[0]?o.return:n[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,n[1])).done)return u;switch(o=0,u&&(n=[2&n[0],u.value]),n[0]){case 0:case 1:u=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(u=s.trys,(u=u.length>0&&u[u.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!u||n[1]>u[0]&&n[1]=0;i-=1){if(n(t[i],i,t))return i}return-1};Array.prototype.at;function fn(t,n){var i=t.indexOf(n);return-1!==i&&(function(t,n){0===n?t.shift():t.splice(n,1)}(t,i),!0)}function hn(t,n){for(var i=new Array(t.length),e=0,r=0;r>>=0)&&t<256)&&(e=On[t])?e:(i=An(t,0,!0),r&&(On[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=Rn[t])?e:(i=An(t,t<0?-1:0,!1),r&&(Rn[t]=i),i)}function Pn(t,n){if(T(t))return n?zn:Un;if(n){if(t<0)return zn;if(t>=Mn)return Xn}else{if(t<=-Fn)return jn;if(t+1>=Fn)return qn}return t<0?Pn(-t,n).neg():An(t%Bn|0,t/Bn|0,n)}function An(t,n,i){return new kn(t,n,i)}kn.fromInt=Nn,kn.fromNumber=Pn,kn.fromBits=An;var Dn=y.pow;function Cn(t,n,i){if(0===t.length)throw g("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?zn:Un;if((i=i||10)<2||360)throw g("interior hyphen");if(0===e)return Cn(t.substring(1),n,i).neg();for(var r=Pn(Dn(i,8)),o=Un,u=0;u>>0:this.low},Yn.toNumber=function(){return this.unsigned?(this.high>>>0)*Bn+(this.low>>>0):this.high*Bn+(this.low>>>0)},Yn.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((o=s).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},Yn.getHighBits=function(){return this.high},Yn.getHighBitsUnsigned=function(){return this.high>>>0},Yn.getLowBits=function(){return this.low},Yn.getLowBitsUnsigned=function(){return this.low>>>0},Yn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(jn)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&!(t&1<>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},Yn.isZero=function(){return 0===this.high&&0===this.low},Yn.eqz=Yn.isZero,Yn.isNegative=function(){return!this.unsigned&&this.high<0},Yn.isPositive=function(){return this.unsigned||this.high>=0},Yn.isOdd=function(){return!(1&~this.low)},Yn.isEven=function(){return!(1&this.low)},Yn.equals=function(t){return In(t)||(t=xn(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},Yn.eq=Yn.equals,Yn.notEquals=function(t){return!this.eq(t)},Yn.neq=Yn.notEquals,Yn.ne=Yn.notEquals,Yn.lessThan=function(t){return this.comp(t)<0},Yn.lt=Yn.lessThan,Yn.lessThanOrEqual=function(t){return this.comp(t)<=0},Yn.lte=Yn.lessThanOrEqual,Yn.le=Yn.lessThanOrEqual,Yn.greaterThan=function(t){return this.comp(t)>0},Yn.gt=Yn.greaterThan,Yn.greaterThanOrEqual=function(t){return this.comp(t)>=0},Yn.gte=Yn.greaterThanOrEqual,Yn.ge=Yn.greaterThanOrEqual,Yn.compare=function(t){if(In(t)||(t=xn(t)),this.eq(t))return 0;var n=this.isNegative(),i=t.isNegative();return n&&!i?-1:!n&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},Yn.comp=Yn.compare,Yn.negate=function(){return!this.unsigned&&this.eq(jn)?jn:this.not().add(Wn)},Yn.neg=Yn.negate,Yn.add=function(t){In(t)||(t=xn(t));var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=0,h=0,c=0,a=0;return c+=(a+=r+(65535&t.low))>>>16,h+=(c+=e+s)>>>16,f+=(h+=i+u)>>>16,f+=n+o,An((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},Yn.subtract=function(t){return In(t)||(t=xn(t)),this.add(t.neg())},Yn.sub=Yn.subtract,Yn.multiply=function(t){if(this.isZero())return this;if(In(t)||(t=xn(t)),Tn)return An(Tn.mul(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned);if(t.isZero())return this.unsigned?zn:Un;if(this.eq(jn))return t.isOdd()?jn:Un;if(t.eq(jn))return this.isOdd()?jn:Un;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(Ln)&&t.lt(Ln))return Pn(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=65535&t.low,h=0,c=0,a=0,v=0;return a+=(v+=r*f)>>>16,c+=(a+=e*f)>>>16,a&=65535,c+=(a+=r*s)>>>16,h+=(c+=i*f)>>>16,c&=65535,h+=(c+=e*s)>>>16,c&=65535,h+=(c+=r*u)>>>16,h+=n*f+i*s+e*u+r*o,An((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},Yn.mul=Yn.multiply,Yn.divide=function(t){if(In(t)||(t=xn(t)),t.isZero())throw g("division by zero");var n,i,e;if(Tn)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?An((this.unsigned?Tn.div_u:Tn.div_s)(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?zn:Un;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return zn;if(t.gt(this.shru(1)))return Vn;e=zn}else{if(this.eq(jn))return t.eq(Wn)||t.eq(Hn)?jn:t.eq(jn)?Wn:(n=this.shr(1).div(t).shl(1)).eq(Un)?t.isNegative()?Wn:Hn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(jn))return this.unsigned?zn:Un;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();e=Un}for(i=this;i.gte(t);){n=y.max(1,y.floor(i.toNumber()/t.toNumber()));for(var r=y.ceil(y.log(n)/y.LN2),o=r<=48?1:Dn(2,r-48),u=Pn(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=Pn(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=Wn),e=e.add(u),i=i.sub(s)}return e},Yn.div=Yn.divide,Yn.modulo=function(t){return In(t)||(t=xn(t)),Tn?An((this.unsigned?Tn.rem_u:Tn.rem_s)(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},Yn.mod=Yn.modulo,Yn.rem=Yn.modulo,Yn.not=function(){return An(~this.low,~this.high,this.unsigned)},Yn.countLeadingZeros=function(){return this.high?y.clz32(this.high):y.clz32(this.low)+32},Yn.clz=Yn.countLeadingZeros,Yn.countTrailingZeros=function(){return this.low?En(this.low):En(this.high)+32},Yn.ctz=Yn.countTrailingZeros,Yn.and=function(t){return In(t)||(t=xn(t)),An(this.low&t.low,this.high&t.high,this.unsigned)},Yn.or=function(t){return In(t)||(t=xn(t)),An(this.low|t.low,this.high|t.high,this.unsigned)},Yn.xor=function(t){return In(t)||(t=xn(t)),An(this.low^t.low,this.high^t.high,this.unsigned)},Yn.shiftLeft=function(t){return In(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?An(this.low<>>32-t,this.unsigned):An(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):An(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Yn.shr=Yn.shiftRight,Yn.shiftRightUnsigned=function(t){return In(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?An(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):An(32===t?this.high:this.high>>>t-32,0,this.unsigned)},Yn.shru=Yn.shiftRightUnsigned,Yn.shr_u=Yn.shiftRightUnsigned,Yn.rotateLeft=function(t){var n;return In(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?An(this.high,this.low,this.unsigned):t<32?(n=32-t,An(this.low<>>n,this.high<>>n,this.unsigned)):(n=32-(t-=32),An(this.high<>>n,this.low<>>n,this.unsigned))},Yn.rotl=Yn.rotateLeft,Yn.rotateRight=function(t){var n;return In(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?An(this.high,this.low,this.unsigned):t<32?(n=32-t,An(this.high<>>t,this.low<>>t,this.unsigned)):(n=32-(t-=32),An(this.low<>>t,this.high<>>t,this.unsigned))},Yn.rotr=Yn.rotateRight,Yn.toSigned=function(){return this.unsigned?An(this.low,this.high,!1):this},Yn.toUnsigned=function(){return this.unsigned?this:An(this.low,this.high,!0)},Yn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Yn.toBytesLE=function(){var t=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},Yn.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,n>>>24,n>>>16&255,n>>>8&255,255&n]},kn.fromBytes=function(t,n,i){return i?kn.fromBytesLE(t,n):kn.fromBytesBE(t,n)},kn.fromBytesLE=function(t,n){return new kn(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},kn.fromBytesBE=function(t,n){return new kn(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},"function"==typeof BigInt&&(kn.fromBigInt=function(t,n){return An(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),n)},kn.fromValue=function(t,n){return"bigint"===(void 0===t?"undefined":F(t))?kn.fromBigInt(t,n):xn(t,n)},Yn.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<=2*$n},It(t,[{key:"rp",get:function(){return void 0===this.hp&&(this.hp=this.op()),this.hp}},{key:"ap",get:function(){return Ht.Fv?"android":Ht.Dv?"macos":Ht.ru?"ios":Ht.Bv?"windows":"other"}},{key:"cp",get:function(){return Ht.og?"tv":Ht.Ks?"mobile":"desktop"}},{key:"dp",get:function(){return!Ht.og}},{key:"lp",get:function(){if(c.screen)return{width:c.screen.width*this.fp,height:c.screen.height*this.fp}}},{key:"fp",get:function(){return c.devicePixelRatio||1}},{key:"vp",get:function(){return Qn}},{key:"_p",get:function(){return!1}},{key:"gp",get:function(){return!0}},{key:"pp",get:function(){return!!(Ht.X_||Ht.ru||Ht.g_)||!!Ht.D_}},{key:"mp",get:function(){return Ht.D_}},{key:"wp",get:function(){return!Ht.ru}},{key:"yp",get:function(){return!0}},{key:"bp",get:function(){return!0}},{key:"Ap",get:function(){return!1}},{key:"Sp",get:function(){}},{key:"Tp",get:function(){return!0}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){return Ht.D_}},{key:"xp",get:function(){return!1}},{key:"Cp",get:function(){return!1}},{key:"Rp",get:function(){return!1}},{key:"Dp",get:function(){return!0}}]),t}(),ni=function(t){function n(){return t.call(this)||this}return Tt(n,t),n}(ti);x(),pt();var ii=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.Pp=function(t,n){if(t&&t.Bp&&n&&n.Bp){var i=ei(t.Bp,"mp4a.40.2")&&ei(n.Bp,"mp4a.40.5"),e=ei(t.Bp,"mp4a.40.5")&&ei(n.Bp,"mp4a.40.2"),r=ei(t.Bp,"mp4a.40.2")&&ei(n.Bp,"mp4a.40.34"),o=ei(t.Bp,"mp4a.40.34")&&ei(n.Bp,"mp4a.40.2"),u=ei(t.Bp,"mp4a.40.5")&&ei(n.Bp,"mp4a.40.34"),s=ei(t.Bp,"mp4a.40.34")&&ei(n.Bp,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},It(n,[{key:"Sp",get:function(){if(Ht.Dv)return 4096}}]),n}(ni);function ei(t,n){return t.indexOf(n)>-1}x(),pt();var ri=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.Ip=function(t){return t>=2},n}(ni);x(),pt();var oi=function(t){function n(){var n;return(n=t.call(this)||this).Np=Ht.Q_>=11,n.sp=Ht.X_&&!(Ht.ru&&Ht.Q_<10),n}return Tt(n,t),It(n,[{key:"xp",get:function(){return Ht.Q_<17}},{key:"Cp",get:function(){return!0}}]),n}(ni);x(),pt();var ui,si=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),It(n,[{key:"Tp",get:function(){return!(Ht.d_>=133)}}]),n}(ni);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var fi=function(){var t=_n();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Ht.Kv)return!1;var t=_n();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var hi=function(t){function n(n){var i;return(i=t.call(this)||this).Mp=void 0,i.Mp=n,i.Np=i.Mp.Np,i.Ke=i.Mp.Ke,i.sp=fi&&i.Mp.sp,i}Tt(n,t);var i=n.prototype;return i.op=function(){return this.Mp.rp},i.Pp=function(t,n){return this.Mp.Pp(t,n)},i.Ip=function(t){return this.Mp.Ip(t)},It(n,[{key:"Sp",get:function(){return this.Mp.Sp}},{key:"Tp",get:function(){return this.Mp.Tp}},{key:"xp",get:function(){return this.Mp.xp}}]),n}(ti),ci=function(t){function n(n){var i;return(i=t.call(this,n)||this).Np=!0,i.Ks=!0,i}return Tt(n,t),It(n,[{key:"Ap",get:function(){return Ht.ru}}]),n}(hi);x(),pt();var ai=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.op=function(){return function(t){return t&&$t(c.ManagedMediaSource)?c.ManagedMediaSource:$t(c.MediaSource)?c.MediaSource:void 0}(!0)?t.prototype.op.call(this):1},It(n,[{key:"Ap",get:function(){return!0}}]),n}(ci);x(),pt();var vi=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Up=void 0,n}return Tt(n,t),n.prototype.Pp=function(n,i){return t.prototype.Pp.call(this,n,i)},It(n,[{key:"_p",get:function(){return Ht.b_<3}},{key:"gp",get:function(){return Ht.b_>=3}},{key:"lp",get:function(){var t=this;return c.tizen&&!this.Up&&c.tizen.systeminfo.getPropertyValue("DISPLAY",function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.Up={width:i,height:e})}),this.Up}},{key:"kp",get:function(){return Ht.b_<3}}]),n}(hi);x(),pt();var di=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Up=void 0,n}return Tt(n,t),It(n,[{key:"lp",get:function(){var t=this;return c.webOS&&!this.Up&&c.webOS.deviceInfo(function(n){t.Up={width:n.screenWidth,height:n.screenHeight}}),this.Up}},{key:"yp",get:function(){return!1}}]),n}(hi);x(),pt();var li=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),It(n,[{key:"Ap",get:function(){return!0}},{key:"Cp",get:function(){return this.Mp.Cp}}]),n}(hi);x(),pt();var wi=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),It(n,[{key:"Rp",get:function(){return Ht.IS_FIRETV_AFTMM}}]),n}(hi);!function(t){ui=t}(function(){var t=function(){if(Ht.W_)return new ii;if(Ht.B_||Ht.L_)return new ri;if(Ht.X_)return new oi;if(Ht.Rg)return new si;return new ni}();return Ht.ru?new ai(t):Ht.I_?new wi(t):Ht.Ks?new ci(t):Ht.w_?new vi(t):Ht.S_?new di(t):Ht.Dv?new li(t):new hi(t)}()),x(),pt(),x(),pt(),M(),et(),x(),pt();var bi=!(Ht.L_&&!Ht.F_),gi=self.console;function mi(t){if(Kt(t))try{return JSON.stringify(t)}catch(t){}return t}function pi(t){return t.map(mi).join(" ")}function yi(t){var n=gi&&gi[t];return n?n.bind&&bi?n.bind(gi):function(){for(var n=arguments.length,i=new Array(n),e=0;e1?n-1:0),e=1;e1?n-1:0),e=1;eh&&(o=h),u>h&&(u=h),s=r,f=o;;)if(s=65&&t<=90}function Wi(t){return zi(t)||function(t){return t>=97&&t<=122}(t)}function Vi(t){return t>=48&&t<=57}function Hi(t){return Vi(t)||Wi(t)}function qi(t){return Vi(t)||t>=65&&t<=70||t>=97&&t<=102}function Xi(t){return zi(t)?t+32:t}function ji(t){return Vi(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Yi(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var Ki=y.min,Gi=String.fromCharCode;function $i(t){for(var n=t.length,i=[],e=0;e= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ne=y.floor,ie=String.fromCharCode;function ee(t){throw new RangeError(te[t])}function re(t){for(var n=[],i=0,e=t.length;i=55296&&r<=56319&&i>1,t+=ne(t/n);t>455;e+=36)t=ne(t/35);return ne(e+36*t/(t+38))},ce=function(t){return function(t,n){var i=t.split("@"),e="";i.length>1&&(e=i[0]+"@",t=i[1]);var r=function(t,n){for(var i=[],e=t.length;e--;)i[e]=n(t[e]);return i}((t=t.replace(Qi,".")).split("."),n).join(".");return e+r}(t,function(t){return Ji.test(t)?"xn--"+function(t){for(var n=[],i=(t=re(t)).length,e=128,r=0,o=72,u=0,s=t;u=e&&lne((Zi-r)/w)&&ee("overflow"),r+=(a-e)*w,e=a;for(var b=0,g=t;bZi&&ee("overflow"),m==e){for(var p=r,y=36;;y+=36){var _=y<=o?1:y>=o+26?26:y-o;if(p<_)break;var S=p-_,T=36-_;n.push(ie(fe(_+S%T,0))),p=ne(S/T)}n.push(ie(fe(p,0))),o=he(r,w,c==h),r=0,++c}}++r,++e}return n.join("")}(t):t})};function ae(t){for(var n=[],i=0;i65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return $i(n)}function ve(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function de(t,n){return t>>n&63|128}function le(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(de(t,12)),n.push(de(t,6))):(ve(t),n.push(t>>12&15|224),n.push(de(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function we(t){for(var n=[],i=0;i=ue)throw new g("Invalid byte index");var t=255&oe[se];if(se++,128==(192&t))return 63&t;throw new g("Invalid continuation byte")}function ge(){var t,n;if(se>ue)throw new g("Invalid byte index");if(se===ue)return!1;if(t=255&oe[se],se++,!(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|be())>=128)return n;throw new g("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|be()<<6|be())>=2048)return ve(n),n;throw new g("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|be()<<12|be()<<6|be())>=65536&&n<=1114111)return n;throw new g("Invalid UTF-8 detected")}function me(t){return[37,Yi(t>>4),Yi(15&t)]}function pe(t){return function(t){return t>=0&&t<=31}(t)||t>126}function ye(t){return pe(t)||32===t||34===t||60===t||62===t||96===t}function _e(t){return ye(t)||35===t||63===t||123===t||125===t}function Se(t){return _e(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Te(t){return t<33||t>126||34===t||35===t||60===t||62===t}function ke(t){return Te(t)||39===t}function Ie(t,n){if(!n(t))return[t];for(var i=we([t]),e=[],r=0;r6)throw new m;for(var f=0;o0){if(!("."===t[o]&&f<4))throw new m;o+=1}if(!Ni.test(t[o]))throw new m;for(;o255)throw new m}o+=1}i[e]=i[e]<<8|h,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new m;break}if(":"===t[o]){if((o+=1)===n)throw new m}else if(o0;)Ui(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new m;return i}function Pe(t){var n=10,i=Di;return Ai.test(t)?(t=t.slice(2),n=16,i=Ci):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=xi),""===t?0:i.test(t)?_(t,n):void 0}var Ae={Vp:4},De=/[\0\t\n\r #%/:?@\[\\\]]/,Ce=/[\0\t\n\r #/:?@\[\\\]]/;function xe(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new m("Invalid IPv6 address");return{Vp:2,Hp:Ne(t.slice(1,-1))}}if(!n)return function(t){if(Ce.test(t))throw new m("Invalid code point in opaque host");var n=Ee(t,pe);return""===n?Ae:{Vp:3,Wp:n}}(t);var i=function(t){var n=function(t){return ce(t.toLowerCase())}(t);return n}(Oe(t));if(De.test(i))throw new m("Invalid code point in host");var e=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var i=[],e=0;e255)throw new m;if(i[i.length-1]>=y.pow(256,5-i.length))throw new m;for(var s=i.pop(),f=0;f>>=8;return n.reverse().join("")}(t.Hp);case 2:return"["+function(t){for(var n="",i=function(t){for(var n=0,i=0,e=0,r=0,o=0;o<8;o++)0===t[o]?(0===r&&(e=o),r++):(r>i&&(n=e,i=r),r=0);return r>i&&(n=e,i=r),i>1?n:null}(t),e=!1,r=0;r<8;r++){if(e){if(0===t[r])continue;e=!1}i!==r?(n+=t[r].toString(16),7!==r&&(n+=":")):(n+=0===r?"::":":",e=!0)}return n}(t.Hp)+"]";case 3:return t.Wp;case 4:return""}}var Me=/\+/g;function Fe(t){return 42===t||45===t||46===t||95===t||Hi(t)}function Le(t){for(var n=t.split("&"),i=[],e=0;e0&&(n+="&"),n+=ze(we(re(e[0])))+"="+ze(we(re(e[1])))}return n}function ze(t){for(var n=[],i=0;i0&&"?"===t[0]&&(t=t.slice(1)),this.zp=Le(t)}var n=t.prototype;return n.append=function(t,n){t=Ve(t),n=Ve(n),this.zp.push([t,n]),Ge(this)},n.delete=function(t){t=Ve(t);for(var n=this.zp,i=0;i=2))return!1;if(!dr(t.slice(0,2)))return!1;if(2!==n){var i=t[2];if(47!==i&&92!==i&&63!==i&&35!==i)return!1}return!0}function vr(t){return 2===t.length&&Oi.test(t[0])&&(":"===t[1]||"|"===t[1])}function dr(t){return 2===t.length&&vr($i(t))}function lr(t){return vr(t)&&":"===t[1]}function wr(t){var n=t.Jp;0!==n.length&&("file"===t.Qp&&1===n.length&&lr(n[0])||n.pop())}function br(t){return null===t.Zp||Ae===t.Zp||t.$p||"file"===t.Qp}var gr=-1,mr=/\t|\n|\r/g,pr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function yr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new Sr,t=t.replace(pr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=re(t=t.replace(mr,"")),c=h.length,a=0;a<=c;){var v=a65535)throw new m("Invalid port");i.im=y===er[i.Qp]?null:y,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.Qp="file",47===v||92===v?r=14:n&&"file"===n.Qp?gr===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp=n.Gp):63===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp="",r=19):35===v?(i.Zp=n.Zp,i.Jp=n.Jp.slice(),i.Gp=n.Gp,i.nm="",r=20):(ar(h.slice(a))||(i.Zp=n.Zp,i.Jp=n.Jp.slice(),wr(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.Qp&&!ar(h.slice(a))&&(lr(n.Jp[0])?i.Jp.push(n.Jp[0]):i.Zp=n.Zp),r=17,a-=1);break;case 15:if(gr===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&dr(o))r=17;else if(0===o.length){if(i.Zp=Ae,null!==e)return;r=16}else{var S=xe(ae(o),hr(i));if(0===S.Vp&&"localhost"===S.qp&&(S=Ae),i.Zp=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:hr(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.Gp="",r=19):null===e&&35===v?(i.nm="",r=20):gr!==v&&(r=17,47!==v&&(a-=1));break;case 17:if(gr===v||47===v||hr(i)&&92===v||null===e&&(63===v||35===v)){var T=ae(o);if(sr(T)?(wr(i),47===v||hr(i)&&92===v||i.Jp.push("")):!ur(T)||47===v||hr(i)&&92===v?ur(T)||("file"===i.Qp&&0===i.Jp.length&&dr(o)&&(Ae!==i.Zp&&null!==i.Zp&&(i.Zp=Ae),o[1]=58,T=ae(o)),i.Jp.push(T)):i.Jp.push(""),o.length=0,"file"===i.Qp&&(gr===v||63===v||35===v))for(;i.Jp.length>1&&""===i.Jp[0];)i.Jp.shift();63===v?(i.Gp="",r=19):35===v&&(i.nm="",r=20)}else o.push.apply(o,Ie(v,_e));break;case 18:63===v?(i.Gp="",r=19):35===v?(i.nm="",r=20):gr!==v&&(i.Jp[0]+=ae(Ie(v,pe)));break;case 19:null===e&&35===v?(i.nm="",r=20):gr!==v&&(i.Gp+=ae(Ie(v,hr(i)?ke:Te)));break;case 20:gr===v||0===v||(i.nm+=ae(Ie(v,ye)))}a++}return i}function _r(t,n,i,e){try{yr(t,n,i,e)}catch(t){}}var Sr=function(){this.Qp="",this.Kp="",this.Yp="",this.Zp=null,this.im=null,this.Jp=[],this.Gp=null,this.nm=null,this.$p=!1};function Tr(t){switch(t.Qp){case"blob":var n;try{n=yr(t.Jp[0],null)}catch(t){return ir}return Tr(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+Be(n)+(null===i?"":":"+i)}(t.Qp,t.Zp,t.im);default:return ir}}var kr=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof kr&&"object"==typeof t.rc}(n))e=n.rc;else try{e=yr(String(n),null)}catch(t){throw new m("Invalid base URL: "+t.message)}try{i=yr(String(t),e)}catch(t){throw new m("Invalid URL: "+t.message)}var r=i.Gp;this.rc=i,this.Gp=function(t){var n=new $e;return null!==t&&Ke(n,t),n}(r),this.Gp.rc=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&Ii(t.prototype,n),i&&Ii(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.Qp+":";if(null!==t.Zp?(i+="//",cr(t)&&(i+=t.Kp,""!==t.Yp&&(i+=":"+t.Yp),i+="@"),i+=Be(t.Zp),null!==t.im&&(i+=":"+t.im)):null===t.Zp&&"file"===t.Qp&&(i+="//"),t.$p)i+=t.Jp[0];else for(var e=0,r=t.Jp;e1?n-1:0),e=1;e>>=1);)e+=e;return r}),go=(String.prototype.padStart,String.prototype.padEnd,16384),mo="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=go?(n=String).fromCodePoint.apply(n,[].concat(t)):yo(t,String.fromCodePoint)}:function(t){for(var n,i=[],e=Rt(t);!(n=e()).done;){var r=n.value;r>65535&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r)}return po(i)};function po(t){var n;return t.length<=go?(n=String).fromCharCode.apply(n,[].concat(t)):yo(t,String.fromCharCode)}function yo(t,n){for(var i=[],e=0;e=42||Ht.W_&&Ht.z_>=38||Ht.B_||Ht.F_||Ht.Y_&&Ht.Z_>=29;function So(t,n){return function(t,n){return Xt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[jr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[jr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var To=function(){function t(t){this.hw=void 0,this.ew=Kr(),this.ow=void 0,this.hw=t}var n=t.prototype;return n.Am=function(){return this.Tm(ao)},n.pm=function(){return this.Tm(lo)},n.ym=function(){return this.Tm(co)},n.wm=function(){return this.Tm(vo)},n.Tm=function(t){var n=t.$m,i=this.ew.get(n);if(i)return i;var e=this.Sm(t,'video/mp4; codecs="avc1.42000a"');return this.ew.set(n,e),e},n.Sm=function(t,n){return nn(function(){return en(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,this.hw.nw(t.Ym,[So(n,!0)])];case 1:return i.sent(),[2,!0];case 2:i.sent(),i.label=3;case 3:return i.trys.push([3,5,,6]),[4,this.hw.nw(t.Ym,[So(n,!1)])];case 4:return i.sent(),[2,!0];case 5:return i.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}})}).call(this)},n._m=function(){return this.ow||(this.ow=this.aw()),this.ow},n.aw=function(){return nn(function(){return en(this,function(t){switch(t.label){case 0:return"https:"===c.location.protocol?[2,!1]:_o?[4,this.pm()]:[2,!1];case 1:return t.sent()?[2,!1]:[2,!0]}})}).call(this)},t}();function ko(t,n,i){if("function"==typeof i)i.call(t,n);else for(var e,r=Rt(i);!(e=r()).done;){e.value.call(t,n)}}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var Io=function(){function t(t){var n=this;this.cw=Yr(),this.fw=void 0,this.dw=0,this._w=void 0,this.Rs=function(t){n.So(t)},this._w=null!=t?t:this}var n=t.prototype;return n.wn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.uw(t,n);else for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;this.uw(r,n)}},n.uw=function(t,n){var i=this.cw[t];void 0===i?this.cw[t]=n:"function"==typeof i?this.cw[t]=[i,n]:0===this.dw?i.push(n):this.cw[t]=i.concat(n)},n.lw=function(t){if("function"==typeof t){var n=this.fw;void 0===n?this.fw=t:"function"==typeof n?this.fw=[n,t]:0===this.dw?n.push(t):this.fw=n.concat(t)}},n.Vo=function(){this.cw=Yr(),this.fw=void 0},n.So=function(t){this.dw++;var n=this.cw[t.type],i=this.fw;void 0!==n&&ko(this._w,t,n),void 0!==i&&ko(this._w,t,i),this.dw--},n.mn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.gw(t,n);else for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;this.gw(r,n)}},n.gw=function(t,n){var i=this.cw[t];void 0!==i&&("function"==typeof i?i===n&&(this.cw[t]=void 0):0===this.dw?fn(i,n):this.cw[t]=hn(i,n))},n.pw=function(t){if("string"==typeof t)this.cw[t]=void 0;else for(var n,i=Rt(t);!(n=i()).done;){var e=n.value;this.cw[e]=void 0}},n.mw=function(t){var n=this.fw;void 0!==n&&("function"==typeof n?n===t&&(this.fw=void 0):0===this.dw?fn(n,t):this.fw=hn(n,t))},n.ww=function(t,n){var i=this;return new tt(function(e,r){if(n&&n.Hg)return r(new bn);var o=function(t){s(),e(t)},u=function(){s(),r(new bn)},s=function(){i.mn(t,o),n&&n.jg(u)};i.wn(t,o),n&&n.Xg(u)})},t}();x(),pt(),x(),pt();var Eo=function(t,n){void 0===n&&(n=new Date),this.type=void 0,this.date=void 0,this.type=t,this.date=n};x(),pt();var Ro=function(t){return t.yw="Aw",t.Sw="Tw",t.Ew="contentprotectionerror",t.xw="contentprotectionsuccess",t.Pw="currentsourcechange",t.Iw="destroy",t.Cw="durationchange",t.Rw="emptied",t.Dw="encrypted",t.Nw="ended",t.Bw="Mw",t.Lw="Ow",t.Fw="Uw",t.Vw="Hw",t.Ww="loadstart",t.qw="manifestupdate",t.zw="nosupportedrepresentationfound",t.Gw="offline",t.Xw="online",t.jw="pause",t.uo="play",t.Qw="progress",t.Kw="ratechange",t.Yw="representationchange",t.Jw="resize",t.Zw="seeked",t.$w="seeking",t.iy="segmenterror",t.ey="segmentnotfound",t.sy="manifesterror",t.oy="uy",t.ly="vy",t._y="gy",t.do="sourcechange",t.py="timeupdate",t.wy="volumechange",t.yy="by",t.Ay="Sy",t.LICENSE_REQUEST_GENERATED="Ty",t.Ey="metricschange",t}({}),Oo=["cenc"],No=["cbcs","cbcs-1-9"],Po=function(t){function n(n){var i;return(i=t.call(this,Ro.Ay)||this).xy=void 0,i.xy=n,i}return Tt(n,t),n}(Eo),Ao=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"Iy")||this).Cy=void 0,o.Ry=void 0,o.Iy=void 0,o.Dy=void 0,o.Cy=n,o.Ry=i,o.Iy=e,o.Dy=r,o}return Tt(n,t),n}(Eo),Do=function(t){function n(){return t.call(this,"lt")||this}return Tt(n,t),n}(Eo);x(),pt(),x(),pt(),x(),pt();var Co="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");function xo(t,n,i){return Co[t>>2]+Co[(3&t)<<4|n>>4]+Co[(15&n)<<2|i>>6]+Co[63&i]}function Bo(t,n,i){for(var e=[],r=n;r=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Lo(t,n){return t>>n&63|128}function Uo(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(Lo(t,12)),n.push(Lo(t,6))):(Fo(t),n.push(t>>12&15|224),n.push(Lo(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function zo(t,n){if(n.ac>=t.length)throw new g("Invalid byte index");var i=255&t[n.ac];if(n.Ly(1),128==(192&i))return 63&i;throw new g("Invalid continuation byte")}function Wo(t,n){var i=n.ac;if(i>t.length)throw new g("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.Ly(1),!(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|zo(t,n);if(r>=128)return r;throw new g("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|zo(t,n)<<6|zo(t,n);if(o>=2048)return Fo(o),o;throw new g("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|zo(t,n)<<12|zo(t,n)<<6|zo(t,n);if(u>=65536&&u<=1114111)return u}throw new g("Invalid UTF-8 detected")}x(),pt(),x(),pt();function Vo(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.ac,i);return n.Ly(2),e}function Ho(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.ac,i,e),n.Ly(2)}function qo(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.ac,i,e),n.Ly(4)}function Xo(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o=55296&&r<=56319&&i>2]+Co[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(Co[s>>2]+Co[(3&s)<<4|f>>4]+Co[(15&f)<<2]+"=")}return e.join("")}(new k(t))}var ou=new k([0]).buffer,uu=function(){function t(){this.nc=void 0,this.nc=[]}var n=t.prototype;return n.qy=function(t){for(var n,i=Rt(this.nc);!(n=i()).done;){if(iu(n.value[0],t))return!0}return!1},n.zy=function(t){for(var n,i=Rt(this.nc);!(n=i()).done;){var e=n.value;if(iu(e[0],t))return e[1]}},n.Gy=function(t,n){for(var i,e=Rt(this.nc);!(i=e()).done;){var r=i.value;if(iu(r[0],t))return void(r[1]=n)}this.nc.push([t,n])},n.Xy=function(t,n){this.nc.forEach(function(n){return t(n[1],n[0])},n)},n.jy=function(){an(this.nc)},It(t,[{key:"Wy",get:function(){return this.nc.length}}]),t}();x(),pt();var su=function(){function t(){var t=this;this.Yy=void 0,this.Qd=void 0,this.Kd=void 0,this.Yy=new tt(function(n,i){t.Qd=n,t.Kd=i})}var n=t.prototype;return n.Qy=function(t){this.Qd&&(this.Qd(t),this.zg())},n.Ky=function(t){this.Kd&&(this.Kd(t),this.zg())},n.Zg=function(){this.Yy.catch(Jt),this.Ky(new bn)},n.$g=function(t){var n=this;t.then(function(t){return n.Qy(t)},function(t){return n.Ky(t)})},n.zg=function(){this.Qd=void 0,this.Kd=void 0},t}();function fu(t,n){return t===Qr?function(t){if(t.byteLength<2*hu.length)return t;var n=new DataView(t,0,2*hu.length),i=jo(n,!0);if(i===hu)return t;return function(t){var n='',i='Content-Typetext/xml; charset=utf-8SOAPAction"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"',e=""+n+ru(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new k(2*t.length);return Xo(Go(i),new Qo,t,n),i}(e,!0).buffer}(t)}(n):n}x(),pt();var hu=">8-this.ib;return(e<0?1:0}},p.defineProperty(t.prototype,"bitLength",{get:function(){return this.$y.bitLength-this.ib},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"length",{get:function(){return this.$y.length},enumerable:!1,configurable:!0})}();x(),pt(),x(),pt();y.pow(2,-52);function lu(t,n,i){return y.min(y.max(t,n),i)}function wu(t,n){return t>>8-n}function bu(t,n){return t&(1<7&&(this.sb++,this.hb=0)},t.prototype.seek=function(t,n){this.sb=t,this.hb=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new g("Cannot read past end of buffer.");return this.eb.get(this.sb)>>7-this.hb&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new g("Cannot read past end of buffer.");if(0===this.hb)return this.eb.get(this.sb++);var t=bu(this.eb.get(this.sb),8-this.hb),n=wu(this.eb.get(this.sb+1),this.hb);return this.sb++,t<32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=0;if(0===this.hb&&t%8==0)for(var i=t-8;i>=0;i-=8)n|=this.readByte()<=0;i--)n|=this.readBit()<32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<>3,this.hb=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;in?1:T(t)?T(n)?0:1:-1},pu=function(){function t(){this.ob=[],this.ub=[],this.fb=0}return t.from=function(){for(var n=[],i=0;i=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.ub[n];return this.ob[n][i]}},p.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.ob.length<1)return-1;if(this.ob.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.ob[0];return"number"==typeof t?du(i,t):"undefined"!=typeof Buffer?Buffer.from(i.buffer,i.byteOffset,i.byteLength).indexOf(t):function(t,n){if(0===n.length)return 0;for(var i=n[0],e=n.length,r=t.length-e,o=0;o<=r&&!((o=du(t,i,o))<0||o>r);o++){for(var u=o+1,s=o+e,f=1;u4)throw new g("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new g("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-n)+")");if(1===n)return this.get(t);for(var i=0,e=0;er)return new t;if(e===r)return new t;for(var o=new t,u=this.findContainingBufferIndex(e),s=this.ob[u],f=e,h=f-this.ub[u];f+s.length-h=0&&i>=0;){if(0!==e[r])break;if(0===r){if(0===i)return new t;i-=1,r=(e=this.ob[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),yu=function(){function t(n){this._b=n||t.BUFFER_CHUNK_SIZE,this.gb=!1,this.pb=new pu,this.eb=new k(this._b),this.mb=0,this.wb=0,this.hb=7}return t.prototype.closeByte=function(){this.eb[this.mb++]=this.wb,this.mb>=this._b&&this.closeBuffer(),this.wb=0,this.hb=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.mb&&(this.pb.pushRange(this.eb,0,this.mb),t&&(this.eb=new k(this._b)),this.mb=0)},p.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.hb},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.gb)throw new g("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.gb=!0,this.pb},t.prototype.writeBit=function(t){if(this.gb)throw new g("Cannot write to a closed BitWriter.");this.wb|=t<32)throw new g("The max bitlength that can be provided is 32.");if(t>=y.pow(2,n))throw new g("Uint "+t+" cannot be represented in "+n+" bit(s).");if(this.isWritingStartBit&&n%8==0)for(var i=n-8;i>=0;i-=8)this.writeByte(t>>i&255);else for(i=n-1;i>=0;i--)this.writeBool((t&1<0)},t.prototype.writeInt=function(t,n){if(n>32)throw new g("The max bitlength that can be provided is 32.");if(y.abs(t)>=y.pow(2,n-1))throw new g("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+y.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new g("Received a negative number.");for(var n=y.floor(y.log2(t+1))+1,i=0;i=t.LARGE_SIZE/8,r=16===this.boxType.length;n.writeUInt(e?1:i,32),n.writeString(r?"uuid":this.boxType),e&&(n.writeUInt(y.floor(i/t.LARGE_SIZE),32),n.writeUInt(i%t.LARGE_SIZE,32)),r&&n.writeString(this.boxType)},t.prototype.getSize=function(){var n=8+(this.boxType.length>4?16:0),i=this.getBoxContentSize()+n;return i>=t.LARGE_SIZE/8&&(i+=8),i},t.prototype.serialize=function(){var t=new _u;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=y.pow(2,32),t}();function Tu(t,n){return B(t,Kn)?64===n:t65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r)}return Au(n)}(e)}(t,n,!0)}function Wu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new k(t.buffer,t.byteOffset+n,i-n)}function Vu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new DataView(t.buffer,t.byteOffset+n,i-n)}function Hu(t){return new k(t.buffer,t.byteOffset,t.byteLength)}var qu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new Nu(this.offset<<3)},t}();x(),pt();var Xu=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return Cu(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextUint32=function(){return Mu(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt32(n.offset,i);return n.shift(4),e}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,n,i){void 0===i&&(i=!1);var e=Mu(t,n,i),r=Mu(t,n,i),o=i?r:e,u=i?e:r;return Kn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Fu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return xu(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,n,i){for(var e=[],r=0;rt.byteLength){var s=u;return n.seek(i),{complete:!1,neededOffset:s}}var f={type:r.type,offset:i,data:new Xu(Vu(t,i,u),new qu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Gu(t){return{version:t>>24,flags:new Du(16777215&t)}}function $u(t,n){var i,e,r,o;return 1===n?(i=t.nextUint64(),e=t.nextUint64(),r=t.nextUint32(),o=t.nextUint64()):(i=t.nextUint32(),e=t.nextUint32(),r=t.nextUint32(),o=t.nextUint32()),{creation:i,modification:e,scale:r,duration:o}}function Zu(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function Ju(t){var n=t.nextUint32Array(9);return{a:Eu(n[0],16),b:Eu(n[1],16),u:Eu(n[2],30),c:Eu(n[3],16),d:Eu(n[4],16),v:Eu(n[5],30),x:Eu(n[6],16),y:Eu(n[7],16),w:Eu(n[8],30)}}function Qu(t){return new Ou(t.type,Wu(Hu(t.data.data),t.data.cursor.offset))}var ts=function(t){function n(n,i,e,r){void 0===e&&(e=0),void 0===r&&(r=0);var o=t.call(this,"hdlr",e,r)||this;return o.name=i,o.handlerType=n,o}return vu(n,t),p.defineProperty(n.prototype,"handlerType",{get:function(){return this.bb},set:function(t){this.bb=t},enumerable:!1,configurable:!0}),n.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(i=null===(n=this.name)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeString(this.handlerType),this.serializeReserved(n),this.name&&n.writer.writeString(this.name),n.writer.writeByte(0)},n}(Ru);function ns(t){var n=t.data,i=Gu(n.nextUint32()),e=i.version,r=i.flags;n.skip(4);var o=n.nextChars(4);n.skip(12);var u=n.nextUTF8String();return new ts(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}vu(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(ts);x(),pt(),x(),pt(),x(),pt();var is=function(){function t(t,n){void 0===n&&(n=!1),this.fixed28BitMode=n,this.tag=t}return t.prototype.encodeSize=function(t){for(var n=[];t>0;)n.length>0&&(n[n.length-1]+=128),n.push(t%128),t>>=7;if(this.fixed28BitMode)for(;n.length<4;)n.push(128);return n.reverse()},p.defineProperty(t.prototype,"tag",{get:function(){return this.Ab},set:function(t){if(!Tu(t,8))throw new g("Provided tag does not fit in 8 bits.");this.Ab=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return this.getDescriptorSize()+1+this.encodeSize(this.getDescriptorSize()).length},t.prototype.serialize=function(t){t.writer.writeByte(this.tag);for(var n=0,i=this.encodeSize(this.getDescriptorSize());n0)throw new g("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeByte(this.defaultSampleInfoSize),n.writer.writeUInt(this.sampleInfoSizes.length,32);for(var i=0,e=this.sampleInfoSizes;i1)throw new g("Provided balance does not fit in the allowed range [-1, 1].");if(!Tu(ku(t,8),16))throw new g("Provided balance does not fit in 16 bits (fixed 8.8).");this.UA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(ku(this.balance,8),16),n.writer.writeUInt(0,16)}}(Ru);x(),pt();!function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}vu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.Lb},set:function(t){if(!Tu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Tu(t,32)}))throw new g("Not all entries can be represented in 32 bits.");this.Lb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i31)throw new g("The provided compressorName should at most be 31 characters long.");this.qA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"frameCount",{get:function(){return this.zA},set:function(t){if(!Tu(t,16))throw new g("Provided frameCount does not fit in 16 bits.");this.zA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"depth",{get:function(){return this.GA},set:function(t){if(!Tu(t,16))throw new g("Provided depth does not fit in 16 bits.");this.GA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i,e,r,o,u;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(i=null===(n=this.clap)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)+(null!==(r=null===(e=this.pasp)||void 0===e?void 0:e.getSize())&&void 0!==r?r:0)+(null!==(u=null===(o=this.extra)||void 0===o?void 0:o.length)&&void 0!==u?u:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.width,16),n.writer.writeUInt(this.height,16),n.writer.writeUInt(ku(this.horizontalResolution,16),32),n.writer.writeUInt(ku(this.verticalResolution,16),32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.frameCount,16),n.writer.writeByte(this.compressorName.length),n.writer.writeString(this.compressorName);for(var i=0;i<31-this.compressorName.length;i++)n.writer.writeByte(0);n.writer.writeUInt(this.depth,16),n.writer.writeInt(-1,16),this.clap&&n.concat(this.clap.serialize()),this.pasp&&n.concat(this.pasp.serialize()),this.extra&&Iu(n.writer,this.extra)},n}(us);x(),pt(),x(),pt(),M();!function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(B(this.esDescriptor,k)?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),B(this.esDescriptor,k)?n.concat(pu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Ru);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.esd.serialize())}}(ss);x(),pt();!function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,"mp4v",n,i,r)||this;return o.esDescriptor=e,o}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(pf);x(),pt();!function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(us);x(),pt(),x(),pt();!function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}vu(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(Su);x(),pt();!function(){function t(t,n,i,e,r,o){void 0===o&&(o=1),this.lengthSizeMinusOne=i,this.version=o,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=n,this.spsSets=e,this.ppsSets=r}p.defineProperty(t.prototype,"version",{get:function(){return this.XA},set:function(t){if(!Tu(t,8))throw new g("Provided version does not fit in 8 bits.");this.XA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileIndication",{get:function(){return this.jA},set:function(t){if(!Tu(t,8))throw new g("Provided profileIndication does not fit in 8 bits.");this.jA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.QA},set:function(t){if(!Tu(t,8))throw new g("Provided profileCompatibility does not fit in 8 bits.");this.QA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"levelIndication",{get:function(){return this.KA},set:function(t){if(!Tu(t,8))throw new g("Provided levelIndication does not fit in 8 bits.");this.KA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"spsSets",{get:function(){return this.YA},set:function(t){if(!Tu(t.length,5))throw new g("Provided number of spsSets exceeds the max (32)");this.YA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"ppsSets",{get:function(){return this.JA},set:function(t){if(!Tu(t.length,8))throw new g("Provided number of ppsSets exceeds the max (256)");this.JA=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce(function(t,n){return t+n.length},0)+2*this.ppsSets.length+this.ppsSets.reduce(function(t,n){return t+n.length},0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var n=0,i=this.spsSets;n0&&(null!==(r=null===(e=i.constantIv)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0)throw new g("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return s.kId=i.kId,s.isProtected=null!==(o=i.isProtected)&&void 0!==o?o:1,i.perSampleIvSize>0?s.perSampleIvSize=i.perSampleIvSize:s.constantIv=null!==(u=i.constantIv)&&void 0!==u?u:new k(0),s}return vu(n,t),p.defineProperty(n.prototype,"isProtected",{get:function(){return this.tS},set:function(t){if(!Tu(t,8))throw new g("Provided isProtected does not fit in 1 byte.");this.tS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.iS},set:function(t){if(![8,16].includes(t))throw new g("Provided perSampleIvSize does not match any allowed value [8, 16].");this.iS=t,this.eS=new k(0)},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"kId",{get:function(){return this.sS},set:function(t){if(16!==t.length)throw new g("Provided kId length is not 16.");this.sS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"constantIv",{get:function(){return this.eS},set:function(t){if(![8,16].includes(t.length))throw new g("Provided constant IV length does not match any allowed value [8, 16].");this.eS=t,this.iS=0},enumerable:!1,configurable:!0}),n.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeOwnContent(n)},n.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),Iu(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),Iu(t.writer,this.constantIv))},n}(Ru),_f=(function(t){function n(n){return t.call(this,0,n)||this}vu(n,t)}(yf),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return vu(n,t),p.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.nS},set:function(t){if(!Tu(t,4))throw new g("Provided cryptByteBlocks does not fit in 4 bits.");this.nS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.rS},set:function(t){if(!Tu(t,4))throw new g("Provided skipByteBlocks does not fit in 4 bits.");this.rS=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(yf));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new _f(n),i}vu(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Ps);function Sf(t){return void 0!==t.iv}function Tf(t){return void 0!==t.subsamples}x(),pt();!function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}vu(n,t),p.defineProperty(n.prototype,"samples",{get:function(){return this.bA},set:function(t){var n;if(!Tu(t.length,32))throw new g("The number of samples provided does not fit in 32 bits.");for(var i=0,e=t;i0&&(e.lS.jy(),e.So(new Po(e.lS))),e.dS.removeEventListener("keystatuseschange",e.bS),e.dS.removeEventListener("message",e.SS)},e.dS.addEventListener("keystatuseschange",e.bS),e.dS.addEventListener("message",e.SS),e.lS=new uu;var r=[];return e.dS.closed&&r.push(tt.resolve(e.dS.closed)),e._S=new su,r.push(e._S.Yy),e.zd=tt.race(r).then(e.TS,e.TS),e.mS(),e}Tt(n,t);var i=n.prototype;return i.Xs=function(){if(this.vS)return this.zd;var t=[];return t.push(tt.resolve(this.dS.close())),t.push(yn(1e3)),this._S.$g(tt.race(t).catch(Rf)),this.vS=!0,this.zd},i.gS=function(t,n,i){if(Ht.e_){var e=If(Zo(n));if(1===e.version)n=new Ds(e.systemId,e.data).serialize().join()}return tt.resolve(this.dS.generateRequest(t,n)).catch(Rf)},i.Un=function(t){return tt.resolve(this.dS.load(t)).catch(Rf)},i.pS=function(){return tt.resolve(this.dS.remove()).catch(Rf)},i.er=function(t){return tt.resolve(this.dS.update(t)).catch(Rf)},i.mS=function(){var t=this;this.lS.jy(),this.dS.keyStatuses.forEach(function(n,i){t.wS(i,n)}),this.So(new Po(this.lS))},i.wS=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=Zo(t);if(this.yS===Qr&&16===e.byteLength&&(Ht.v_||Ht.dg)){var r=Go(e),o=r.getUint32(0,!0),u=r.getUint16(4,!0),s=r.getUint16(6,!0);r.setUint32(0,o,!1),r.setUint16(4,u,!1),r.setUint16(6,s,!1)}this.yS===Qr&&"status-pending"===n&&(n="usable"),this.lS.Gy(e,n)},It(n,[{key:"uS",get:function(){return this.zd}},{key:"cS",get:function(){return this.dS.expiration}},{key:"xy",get:function(){return this.lS}},{key:"fS",get:function(){return this.dS.sessionId}}]),n}(Io);function Rf(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|_(i[1],16))}throw new cu(t.message,void 0,n,t)}var Of=function(){function t(t,n,i){this.ES=void 0,this.xS=void 0,this.Cd=void 0,this.ES=t,this.xS=n,this.Cd=i}var n=t.prototype;return n.kS=function(t){return nn(function(){return en(this,function(n){return[2,new Ef(this.ES.createSession(t),this.xS)]})}).call(this)},n.PS=function(t){return tt.resolve(this.ES.setServerCertificate(t))},n._n=function(t){return tt.resolve(t.setMediaKeys(this.ES))},n.IS=function(t){return tt.resolve(t.setMediaKeys(null))},n.hr=function(){return tt.resolve()},t}(),Nf=function(){function t(t,n,i){this.CS=void 0,this.yS=void 0,this.DS=void 0,this.CS=t,this.yS=n,this.DS=i}var n=t.prototype;return n.RS=function(){return nn(function(){var t;return en(this,function(n){switch(n.label){case 0:return[4,this.CS.createMediaKeys()];case 1:return t=n.sent(),[2,new Of(t,this.yS,this.DS)]}})}).call(this)},n.NS=function(){return this.DS},It(t,[{key:"xS",get:function(){return this.CS.keySystem}}]),t}();function Pf(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function Af(t,n,i,e){var r=!1;if(!(e.persistentState&&"optional"!==e.persistentState||e.distinctiveIdentifier&&"optional"!==e.distinctiveIdentifier)){var o={audioCapabilities:[],videoCapabilities:[],persistentState:e.persistentState||"optional",distinctiveIdentifier:e.distinctiveIdentifier||"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label,FS:e.FS},u=!1;if(e.audioCapabilities){var s=e.audioCapabilities.filter(function(t){return Boolean(t.contentType)});s.length&&(o.audioCapabilities=s.filter(function(e){return Df(t,n,i,e)}),u=!0,o.audioCapabilities.length&&(r=!0))}if(e.videoCapabilities){var f=e.videoCapabilities.filter(function(t){return Boolean(t.contentType)});f.length&&(o.videoCapabilities=f.filter(function(e){return Df(t,n,i,e)}),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function Df(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!cn(n,e.encryptionScheme))&&(!e.robustness&&t(i,Pf(e.contentType))))}function Cf(t){if(t.videoCapabilities)for(var n,i=Rt(t.videoCapabilities);!(n=i()).done;){var e=n.value;if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r,o=Rt(t.audioCapabilities);!(r=o()).done;){var u=r.value;if(u.contentType)return u.contentType}}function xf(t){for(var n,i=[],e=Rt(t);!(n=e()).done;){var r=n.value;r.encryptionScheme&&i.push({contentType:r.contentType,robustness:r.robustness})}return t.concat(i)}function Bf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Mf))||!(!t.videoCapabilities||!t.videoCapabilities.some(Mf))}function Mf(t){return!t.robustness}function Ff(t,n){for(var i,e=[],r=Rt(t);!(i=r()).done;){var o=i.value;o.robustness?e.push(o):e.push(jr({},o,{robustness:n}))}return e}x(),pt(),x(),pt();var Lf=function(){function t(){}return t.prototype.nw=function(t,n){return nn(function(){var i,e,r,o,u,s,f,h;return en(this,function(c){switch(c.label){case 0:for(n=n.filter(function(t){return!t.FS}),i=Rt(n);!(e=i()).done;)(r=e.value).audioCapabilities&&(r.audioCapabilities=xf(r.audioCapabilities)),r.videoCapabilities&&(r.videoCapabilities=xf(r.videoCapabilities));if(t!==io||!n.some(Bf))return[3,4];o=n.map(function(t){return function(t,n){return jr({},t,{videoCapabilities:t.videoCapabilities?Ff(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Ff(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")}),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,v.requestMediaKeySystemAccess(t,o)];case 2:return u=c.sent(),s=u.getConfiguration(),[2,new Nf(u,t,s)];case 3:return c.sent(),[3,4];case 4:return[4,v.requestMediaKeySystemAccess(t,n)];case 5:return f=c.sent(),h=f.getConfiguration(),[2,new Nf(f,t,h)]}})})()},t.US=function(){return void 0!==v&&"function"==typeof v.requestMediaKeySystemAccess},t}();x(),pt(),x(),pt(),x(),pt(),x(),pt();var Uf=function(t){function n(n,i){var e;return(e=t.call(this)||this).XS=void 0,e.jS=void 0,e.vS=void 0,e.HS=void 0,e.JS=void 0,e.zS=void 0,e.WS=void 0,e.VS=void 0,e.TS=void 0,e.QS=void 0,e.Ts=void 0,e.KS=void 0,e.XS=n,e.jS=i,e.vS=!1,e.JS=void 0,e.zS=void 0,e.VS=void 0,e.TS=function(){e.vS=!0,e.HS.Qy(void 0),e.VS&&(e.VS.removeEventListener("mskeyclose",e.TS),e.VS.removeEventListener("mskeymessage",e.QS),e.VS.removeEventListener("mskeyerror",e.Ts),e.VS.removeEventListener("mskeyadded",e.KS))},e.QS=function(t){e.zS&&(e.zS.Qy(void 0),e.zS=void 0),e.So(new Ao(e,"license-request",Jo(t.message).buffer,t.destinationURL||void 0))},e.Ts=function(){var t=e.VS&&e.VS.error;if(t){var n=new cu("Unknown CDM error",t.code,t.systemCode);if(e.zS)e.zS.Ky(n),e.zS=void 0;else if(e.JS)e.JS.Ky(n),e.JS=void 0;else switch(n.Jy){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.YS("output-not-allowed");break;default:e.YS("internal-error")}}},e.KS=function(){e.zS&&(e.YS("usable"),e.zS.Qy(void 0),e.zS=void 0),e.JS&&(e.YS("usable"),e.JS.Qy(void 0),e.JS=void 0)},e.HS=new su,e.WS=new uu,e}Tt(n,t);var i=n.prototype;return i.gS=function(t,n,i){return nn(function(){return en(this,function(t){switch(t.label){case 0:return this.qS(),this.zS=new su,this.kS(Zo(n),i),[4,this.zS.Yy];case 1:return t.sent(),[2]}})}).call(this)},i.kS=function(t,n){if(!t)throw new m("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.GS;return(i=n?this.XS.createSession(this.jS,t,e):this.XS.createSession(this.jS,t)).addEventListener("mskeyclose",this.TS),i.addEventListener("mskeymessage",this.QS),i.addEventListener("mskeyerror",this.Ts),i.addEventListener("mskeyadded",this.KS),this.VS=i,this.YS("status-pending"),i},i.Un=function(t){return nn(function(){return en(this,function(t){return this.qS(),[2,!0]})}).call(this)},i.er=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:if(this.JS=new su,this.qS(),!this.VS)return[2,tt.resolve()];if(0===(n=Zo(t)).byteLength)throw new m("Cannot call update with an empty response.");return this.VS.update(n),[4,this.JS.Yy];case 1:return i.sent(),[2]}})}).call(this)},i.Xs=function(){return!this.vS&&this.VS&&(this.vS=!0,this.VS.close()),this.HS.Yy},i.pS=function(){return nn(function(){return en(this,function(t){return this.qS(),[2]})}).call(this)},i.qS=function(){if(this.vS)throw new m("Already closing or closed.")},i.YS=function(t){this.WS.jy(),this.WS.Gy(ou,t),this.So(new Po(this.WS))},It(n,[{key:"fS",get:function(){return this.VS&&this.VS.sessionId||""}},{key:"cS",get:function(){return NaN}},{key:"uS",get:function(){return this.HS.Yy}},{key:"xy",get:function(){return this.WS}}]),n}(Io),zf=function(){function t(t,n,i){this.XS=void 0,this.xS=void 0,this.Cd=void 0,this.jS=void 0,this.XS=t,this.xS=n,this.Cd=i;var e=Cf(i)||"video/mp4";this.jS=Pf(e)}var n=t.prototype;return n.kS=function(t){return nn(function(){return en(this,function(t){return[2,new Uf(this.XS,this.jS)]})}).call(this)},n.PS=function(t){return tt.resolve(!1)},n._n=function(t){var n=this,i=function(){t.msSetMediaKeys(n.XS),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.XS):t.addEventListener("loadedmetadata",i),tt.resolve()},n.IS=function(t){return tt.resolve()},n.hr=function(){return tt.resolve()},t}(),Wf=function(){function t(t,n){this.yS=void 0,this.ZS=void 0,this.yS=t,this.ZS=n}var n=t.prototype;return n.NS=function(){return this.ZS},n.RS=function(){var t=new c.MSMediaKeys(this.yS);return tt.resolve(new zf(t,this.yS,this.ZS))},It(t,[{key:"xS",get:function(){return this.yS}}]),t}(),Vf=function(){function t(){}return t.prototype.nw=function(t,n){try{return tt.resolve(function(t,n){if(!Hf())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Af(qf,Oo,t,r);if(o)return new Wf(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.US=function(){return Hf()},t}();function Hf(){return void 0!==c.MSMediaKeys&&"function"==typeof c.MSMediaKeys.isTypeSupported}function qf(t,n){return c.MSMediaKeys.isTypeSupported(t,n)}x(),pt(),x(),pt(),x(),pt(),x(),pt();var Xf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).eT=void 0,r.jS=void 0,r.iT=void 0,r.HS=void 0,r.nT=void 0,r.WS=void 0,r.$S=void 0,r.sT=void 0,r.Ts=void 0,r.QS=void 0,r.KS=void 0,r.eT=n,r.jS=i,r.iT=e,r.HS=new su,r.nT=void 0,r.WS=new uu,r.$S=void 0,r.sT=new su,r.Ts=function(){var t=r.$S&&r.$S.error;if(t){var n=new cu("Unknown CDM error",t.code,t.systemCode);r.nT?(r.nT.Ky(n),r.nT=void 0):n.Jy===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.YS("output-not-allowed"):r.YS("internal-error"),r.So(new Do)}},r.QS=function(t){r.So(new Ao(r,"license-request",Jo(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.KS=function(){r.nT&&(r.nT.Qy(void 0),r.nT=void 0),r.YS("usable")},r}Tt(n,t);var i=n.prototype;return i.gS=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.tT;if(!e)throw new m("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=Yo(t),r=2*e.length,o=2*n.length,u=new ArrayBuffer(4+r+4+o+4+i.byteLength),s=new DataView(u),f=new Qo;return qo(s,f,r,!0),Xo(s,f,e,!0),qo(s,f,o,!0),Xo(s,f,n,!0),qo(s,f,i.byteLength,!0),function(t,n,i){$o(t).set($o(i),n.ac),n.Ly(i.byteLength)}(s,f,i),new k(u)}(Zo(n),e,this.iT);return this.$S=this.eT.createSession(this.jS,r),this.$S.addEventListener("webkitkeymessage",this.QS,!1),this.$S.addEventListener("webkitkeyadded",this.KS,!1),this.$S.addEventListener("webkitkeyerror",this.Ts,!1),this.YS("status-pending"),this.sT.Qy(this.$S),this.sT=new su,tt.resolve()},i.Un=function(t){return tt.resolve(!0)},i.er=function(t){return nn(function(){var n,i;return en(this,function(e){switch(e.label){case 0:if(0===(n=Zo(t)).byteLength)throw new m("Cannot call update with an empty response.");return this.nT=new su,(i=this.$S)?[3,2]:[4,this.sT.Yy];case 1:i=e.sent(),e.label=2;case 2:return i.update(n),[4,this.nT.Yy];case 3:return e.sent(),[2]}})}).call(this)},i.Xs=function(){var t,n=this.$S;return n&&(n.removeEventListener("webkitkeymessage",this.QS,!1),n.removeEventListener("webkitkeyadded",this.KS,!1),n.removeEventListener("webkitkeyerror",this.Ts,!1),n.close()),this.sT.Zg(),null==(t=this.nT)||t.Zg(),this.HS.Qy(void 0),this.HS.Yy},i.pS=function(){return tt.resolve(void 0)},i.YS=function(t){this.WS.jy(),this.WS.Gy(ou,t),this.So(new Po(this.WS))},It(n,[{key:"fS",get:function(){return this.$S?this.$S.sessionId:""}},{key:"cS",get:function(){return NaN}},{key:"uS",get:function(){return this.HS.Yy}},{key:"xy",get:function(){return this.WS}}]),n}(Io);x(),pt(),x(),pt();var jf=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.PICTURE_IN_PICTURE_ERROR=11001]="PICTURE_IN_PICTURE_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),Yf=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(n){var i=y.floor(n/1e3);if(i in t)return i;throw new m("Invalid error code: "+n)}}(Yf||(Yf={}));var Kf=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=void 0,r.code=n,r}return Tt(n,t),It(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Yf.fromCode(this.code)}}]),n}(wn),Gf=function(){function t(t,n,i){this.eT=void 0,this.xS=void 0,this.Cd=void 0,this.jS=void 0,this.iT=void 0,this.eT=t,this.xS=n,this.Cd=i,this.iT=void 0;var e=Cf(i)||"video/mp4";this.jS=Pf(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.eT},n.kS=function(t){return nn(function(){return en(this,function(t){if(!this.iT)throw new Kf(jf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new Xf(this.eT,this.jS,this.iT)]})}).call(this)},n.PS=function(t){return this.iT=Zo(t),tt.resolve(!0)},n._n=function(t){return t.webkitSetMediaKeys(this.eT),tt.resolve()},n.IS=function(t){return t.webkitSetMediaKeys(null),tt.resolve()},n.hr=function(){return tt.resolve()},t}(),$f=function(){function t(t,n){this.yS=void 0,this.ZS=void 0,this.yS=t,this.ZS=n}var n=t.prototype;return n.NS=function(){return this.ZS},n.RS=function(){var t=new c.WebKitMediaKeys(this.yS);return tt.resolve(new Gf(t,this.yS,this.ZS))},It(t,[{key:"xS",get:function(){return this.yS}}]),t}(),Zf=function(){function t(){}return t.prototype.nw=function(t,n){try{return tt.resolve(function(t,n){if(t!==fo)throw new m(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!Jf())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Af(Qf,No,t,r);if(o)return new $f(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.US=function(){return Jf()},t}();function Jf(){return void 0!==c.WebKitMediaKeys&&"function"==typeof c.WebKitMediaKeys.isTypeSupported}function Qf(t,n){return c.WebKitMediaKeys.isTypeSupported(t,n)}x(),pt();var th=function(){function t(t){this.rT=void 0,this.rT=t}return t.prototype.nw=function(t,n){return nn(function(){var i,e,r;return en(this,function(o){switch(o.label){case 0:i=Rt(this.rT),o.label=1;case 1:if((e=i()).done)return[3,6];r=e.value,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,r.nw(t,n)];case 3:return[2,o.sent()];case 4:return o.sent(),[3,5];case 5:return[3,1];case 6:throw new m("Unsupported key system configuration for "+t)}})}).call(this)},t}();x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var nh=function(){function t(t){var n=this;this.oT=[],this.aT=void 0,this.hT=new dn,this.dT=void 0,this.uT=function(){return 0===n.oT.length?n.dT?ih(n.dT,n.hT.Yg).then(n.lT,n.lT):n.lT():n.oT.shift()().then(n.uT)},this.lT=function(){if(0!==n.oT.length)return n.uT();n.aT=void 0},this.dT=t}var n=t.prototype;return n.Zo=function(t,n){var i=this;return new tt(function(e){var r=dn.ep([i.hT.Yg,n]),o=function(){r.zg()};i.oT.push(function(){var n=ih(t,r.Yg);return e(n),n.then(o,o)}),i.aT||(i.aT=i.uT())})},n.Zg=function(){return this.cT(!0)},n.kn=function(){return this.dT=void 0,this.cT(!1)},n.cT=function(t){var n=this.aT;return this.hT.Zg(),t&&(this.hT=new dn),tt.resolve(n)},t}();function ih(t,n){return new tt(function(i){return i(t(n))})}var eh=new nh,rh=function(t){function n(n){var i;return(i=t.call(this)||this).yS=void 0,i.zS=void 0,i.nT=void 0,i.HS=void 0,i.gb=void 0,i.bT=void 0,i.yT=void 0,i.wT=void 0,i.pT=void 0,i.mT=void 0,i.yS=n,i.zS=void 0,i.nT=void 0,i.gb=!1,i.bT=void 0,i.pT=void 0,i.HS=new su,i.yT="",i.mT=new su,i.wT=new uu,i}Tt(n,t);var i=n.prototype;return i.fT=function(){this.nT&&(this.YS("usable"),this.nT.Qy(void 0),this.nT=void 0)},i.vT=function(t){var n=new cu("Unknown CDM error",t.errorCode,t.systemCode);this.nT?(this.nT.Ky(n),this.nT=void 0):this.zS?(this.zS.Ky(n),this.zS=void 0):n.Jy===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.YS("output-restricted"):1===n.Zy?this.YS("expired"):this.YS("internal-error")},i._T=function(t){0!==t.message.byteLength?(this.zS&&(this.zS.Qy(void 0),this.zS=void 0),this.So(new Ao(this,"license-request",fu(this.yS,Jo(t.message).buffer),t.defaultURL||void 0))):this.zS&&(this.zS.Ky("Empty key message"),this.zS=void 0)},i.gT=function(t){this.pT||(this.pT=t,this.mT.Qy(t))},i.Xs=function(){return nn(function(){return en(this,function(t){return this.throwIfClosed(),this.nT&&(this.nT.Ky(void 0),this.nT=void 0),this.gb=!0,this.HS.Qy(void 0),[2]})}).call(this)},i.gS=function(t,n){return nn(function(){var t;return en(this,function(i){switch(i.label){case 0:return this.throwIfClosed(),this.zS=new su,this.bT=Zo(n),(t=this.pT)?[3,2]:[4,this.mT.Yy];case 1:t=i.sent(),i.label=2;case 2:return t.webkitGenerateKeyRequest(this.yS,this.bT),[4,this.zS.Yy];case 3:return i.sent(),[2]}})}).call(this)},i.Un=function(t){return nn(function(){return en(this,function(t){return this.throwIfClosed(),[2,!1]})}).call(this)},i.pS=function(){return nn(function(){return en(this,function(t){return this.throwIfClosed(),[2]})}).call(this)},i.er=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:return n=this,this.throwIfClosed(),this.nT=new su,Ht.S_||Ht.w_?[2,eh.Zo(function(){return nn(function(){return en(this,function(n){switch(n.label){case 0:return[4,this.doUpdate(t)];case 1:return n.sent(),[2]}})}).call(n)})]:[4,this.doUpdate(t)];case 1:return i.sent(),[2]}})}).call(this)},i.doUpdate=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:return void 0===this.nT?[2]:(n=this.pT)?[3,2]:[4,this.mT.Yy];case 1:n=i.sent(),i.label=2;case 2:return n.webkitAddKey(this.yS,Zo(t),this.bT,this.fS),[4,this.nT.Yy];case 3:return i.sent(),Ht.w_?[4,yn(500)]:[3,5];case 4:i.sent(),i.label=5;case 5:return[2]}})}).call(this)},i.throwIfClosed=function(){if(this.gb)throw new m("Already closing or closed.")},i.YS=function(t){this.wT.jy(),this.wT.Gy(ou,t),this.So(new Po(this.wT))},i.AT=function(){return nn(function(){var t,n;return en(this,function(i){switch(i.label){case 0:return(n=this.pT)?[3,2]:[4,this.mT.Yy];case 1:n=i.sent(),i.label=2;case 2:if(!(t=n).webkitCancelKeyRequest)return[3,7];i.label=3;case 3:return i.trys.push([3,4,5,7]),t.webkitCancelKeyRequest(this.yS,this.yT),[3,7];case 4:return i.sent(),[3,7];case 5:return[4,yn(500)];case 6:return i.sent(),[7];case 7:return[2]}})}).call(this)},It(n,[{key:"xy",get:function(){return this.wT}},{key:"fS",get:function(){return this.yT},set:function(t){this.yT=t}},{key:"uS",get:function(){return this.HS.Yy}},{key:"cS",get:function(){return NaN}}]),n}(Io),oh=function(){function t(t,n){var i=this;this.xS=void 0,this.Cd=void 0,this.pT=void 0,this.kT=void 0,this.ET=void 0,this.KS=void 0,this.ST=void 0,this.TT=void 0,this.xS=t,this.Cd=n,this.pT=void 0,this.kT=Kr(),this.ET=[],this.KS=function(t){var n=i.xT(t.sessionId);n&&n.fT()},this.ST=function(t){var n=i.xT(t.sessionId);n&&n.vT(t)},this.TT=function(t){var n=i.xT(t.sessionId);n&&n._T(t)}}var n=t.prototype;return n._n=function(t){return this.pT=t,this.pT.addEventListener("webkitkeyadded",this.KS),this.pT.addEventListener("webkitkeyerror",this.ST),this.pT.addEventListener("webkitkeymessage",this.TT),this.kT.forEach(function(n,i){return n.gT(t)}),this.ET.forEach(function(n){return n.gT(t)}),tt.resolve()},n.IS=function(t){return t.removeEventListener("webkitkeyadded",this.KS),t.removeEventListener("webkitkeyerror",this.ST),t.removeEventListener("webkitkeymessage",this.TT),this.pT=void 0,tt.resolve()},n.hr=function(){return nn(function(){var t,n;return en(this,function(i){switch(i.label){case 0:t=this.kT.entries(),n=t.next(),i.label=1;case 1:return n.done?[3,3]:[4,n.value[1].AT()];case 2:return i.sent(),n=t.next(),[3,1];case 3:return this.kT.clear(),[2]}})}).call(this)},n.kS=function(t,n,i){return nn(function(){var t;return en(this,function(n){return t=new rh(this.xS),this.pT&&t.gT(this.pT),this.ET.push(t),[2,t]})}).call(this)},n.PS=function(t){return tt.resolve(!1)},n.xT=function(t){if(t){var n=this.kT.get(t);return n||((n=this.ET.shift())?(n.fS=t,this.kT.set(t,n),n):void 0)}},t}(),uh=function(){function t(t,n){this.xS=void 0,this.PT=void 0,this.xS=t,this.PT=n}var n=t.prototype;return n.RS=function(){return tt.resolve(new oh(this.xS,this.PT))},n.NS=function(){return this.PT},t}(),sh=function(){function t(){}return t.prototype.nw=function(t,n){try{return tt.resolve(function(t,n){if(!sh.US())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Af(fh,Oo,t,r);if(o)return new uh(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.US=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function fh(t,n){var i=Sn();return Boolean(i&&i.canPlayType&&""!==i.canPlayType(n,t))}x(),pt();var hh,ch=function(){function t(){}return t.prototype.nw=function(t,n){return t===io||t===Qr?tt.resolve(void 0):tt.reject(new g("DRM configuration not supported"))},t}();function ah(){return hh||(hh=function(){var t=[];Zf.US()&&t.push(new Zf);Lf.US()&&t.push(new Lf);Vf.US()&&t.push(new Vf);sh.US()&&t.push(new sh);Ht.k_&&t.push(new ch);return new th(t)}()),hh}x(),pt(),x(),pt();var vh=function(){function t(){this.IT=Kr()}var n=t.prototype;return n.jy=function(t){this.IT.delete(t)},n.CT=function(){this.IT.clear()},n.zy=function(t){return this.IT.get(t)},n.Gy=function(t,n){this.IT.set(t,n)},t}(),dh=function(){function t(){}return t.DT=function(){return t.Bg||(t.Bg=lh.US()?new lh:new vh),t.Bg},t.jy=function(n){t.DT().jy(n)},t.CT=function(){t.DT().CT()},t.zy=function(n){return t.DT().zy(n)},t.Gy=function(n,i){t.DT().Gy(n,i)},t}();dh.Bg=void 0;var lh=function(t){function n(){return t.apply(this,arguments)||this}Tt(n,t);var i=n.prototype;return i.jy=function(t){self.sessionStorage.removeItem(t)},i.CT=function(){self.sessionStorage.clear()},i.zy=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.Gy=function(t,n){self.sessionStorage.setItem(t,n)},n.US=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(dh);x(),pt(),x(),pt();var wh=function(){var t=self.Blob;if(t)try{new t;return function(t){return function(n,i){return new t(n,i)}}(t)}catch(t){}var n=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(n)return function(t){return function(n,i){var e=new t;if(n)for(var r,o=Rt(n);!(r=o()).done;){var u=r.value;e.append(u)}return e.getBlob(i&&i.type||"")}}(n)}();function bh(t,n,i){var e=wh([n],{type:"application/octet-stream"}),r=URL.createObjectURL(e),o=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,i),u=a.createElement("a");u.href=r,u.download=o,a.body.appendChild(u),u.click(),a.body.removeChild(u),URL.revokeObjectURL(r)}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt();var gh=function(t,n,i){return i=null!=t?E(P(t)):{},function(t,n,i,e){if(n&&"object"==typeof n||"function"==typeof n)for(var r,o=N(n),u=0,s=o.length;u=200&&t.dk<=299||304===t.dk}(h=new Wh({lk:f,vk:n,fk:n.fk,_k:new xr(e.headers),dk:s,gk:e.statusText,wk:u})))throw new qh(h);return n.jk&&(h=ec(h,n.jk)),[2,h]}})}).call(this)},n.pE=function(t){return function(t){return B(t,Wr)}(t)?t:gn(t)?this.gE?new Xh(this.aE):new bn(t.message,t):this.cE?new qh(this.cE,t):new Vr(this.aE,t)},t}(),uc=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).wE=void 0,r.mE=void 0,r.hT=void 0,r.$T=new su,r.wE=n,r.mE=i,r.hT=e,r.$T.Yy.catch(Jt),r}Tt(n,t);var i=n.prototype;return i.ZT=function(){return this.$T.Yy},i.HT=function(t){return this.ek(this.mE.text(),t)},i.qT=function(t){return this.ek(this.mE.arrayBuffer(),t)},i.zT=function(){var t=this.mE.body;return t?this.nk(t):Ih(this.qT().then(Th),this.hT)},i.hk=function(){var t=this.mE.clone(),i=this.hT.tp(),e=i[0],r=i[1];return this.hT=e,new n(this.wE,t,r)},i.ek=function(t,n){var i=this;n&&this.hT.$g(n);var e=mn(tt.resolve(t),this.hT.Yg).catch(function(t){throw i.wE.pE(t)});return e=pn(e,this.hT),this.$T.$g(e.then(Jt)),e},i.nk=function(t){var n=this;return new yh(new hc(t,function(t){return n.wE.pE(t)},this.hT,this.$T),{highWaterMark:0})},It(n,[{key:"QT",get:function(){return this.mE.bodyUsed}},{key:"YT",get:function(){return Xt(this.mE.body)}}]),n}(Nh),sc="abort";function fc(t){if(nc()){var n=new Jh;if(t.Hg)n.abort();else if(!t.Wg){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(sc,i),t.jg(i),t.Kg(e)};n.signal.addEventListener(sc,i),t.Xg(i),t.Qg(e)}return n.signal}}var hc=function(){function t(t,n,i,e){this.yE=void 0,this.bE=void 0,this.hT=void 0,this.$T=void 0,this.Wd=void 0,this.yE=t,this.bE=n,this.hT=i,this.$T=e}var n=t.prototype;return n.start=function(t){this.Wd=this.yE.getReader()},n.pull=function(t){return nn(function(){var n,i,e;return en(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,mn(this.Wd.read(),this.hT.Yg)];case 1:return n=r.sent(),[3,3];case 2:return i=r.sent(),e=this.bE(i),this.$T.Ky(e),this.hT.Zg(),this.Wd.cancel(e).catch(Jt),t.error(e),[2];case 3:return n.done?(this.$T.Qy(),this.hT.Zg(),t.close()):t.enqueue(n.value),[2]}})}).call(this)},n.cancel=function(t){return this.hT.Zg(),this.$T.Ky(t),this.Wd.cancel(t)},t}();x(),pt();var cc=function(){function t(t){var n=this;this.SE=void 0,this.aE=void 0,this.hT=new dn,this.cE=void 0,this.AE=new su,this.BE=void 0,this.DE=!1,this.RE=function(){var t;n.TE(),null==(t=n.SE)||t.abort()},this.aE=t,this.hT.$g(t.Yg),this.SE=new I,this.vE()}var n=t.prototype;return n.vE=function(){var t=this,n=this.SE,i=this.aE;if(i.Yg.Hg)return this.TE();n.onreadystatechange=function(){return t.kE()},n.onprogress=function(n){return t.lE(n)},n.onload=function(){return t.EE()},n.onloadend=function(){return t.xE()},n.onerror=function(){return t.PE()},n.ontimeout=function(){return t.CE()},n.onabort=function(){return t.TE()},n.open(i.Hk,i.Yu,!0),n.withCredentials=Boolean(i.Xk),"responseType"in n&&i.fk&&(i.fk===Cr.LT?n.responseType="text":n.responseType="arraybuffer"),i._k.forEach(function(t,i){n.setRequestHeader(i,t)}),i.Wk&&(n.timeout=i.Wk),this.hT.Yg.Xg(this.RE);var e=i.XT;e?n.send(e):n.send()},n.kE=function(){var t=this.SE;void 0!==t&&t.readyState>=2&&!this.DE&&(this.DE=!0,this.NE())},n.NE=function(){var t,n,i=this.SE,e=function(t){var n=new xr,i=t.replace(/\r?\n[\t ]+/g," ");return i.split(/\r?\n/).forEach(function(t){var i=t.split(":"),e=i.shift().trim();if(e){var r=i.join(":").trim();n.append(e,r)}}),n}(i.getAllResponseHeaders()||""),r=this.aE;this.BE=new su,this.cE=new Wh({vk:r,fk:r.fk,lk:this.BE.Yy,dk:i.status,gk:i.statusText,_k:e,wk:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.AE)||t.Qy(this.cE)},n.EE=function(){var t,n=this.SE;if(void 0!==n){var i=n.response;if(!Xt(i)){var e=this.aE.fk;i=e===Cr.LT?n.responseText:e===Cr.NT?new ArrayBuffer(0):{}}null==(t=this.BE)||t.Qy(i)}},n.xE=function(){this.kn()},n.lE=function(t){void 0!==this.SE&&(null==this.aE.jk||this.aE.jk.call(this.aE,t.loaded,t.lengthComputable?t.total:void 0))},n.PE=function(){var t=new g("Network request failed");this.cE?this.Ts(new qh(this.cE,t)):this.Ts(new Vr(this.aE,t))},n.CE=function(){this.Ts(new Xh(this.aE))},n.TE=function(){this.Ts(new bn),this.kn()},n.Ts=function(t){var n,i;null==(n=null!=(i=this.BE)?i:this.AE)||n.Ky(t)},n.kn=function(){this.SE=void 0,this.cE=void 0,this.AE=void 0,this.BE=void 0,this.hT.zg()},It(t,[{key:"uE",get:function(){return this.AE.Yy}}]),t}();x(),pt();var ac=function(){function t(){}var n=t.prototype;return n.vk=function(t){return function(t){if(!Qh()||!function(t){try{return tc.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Yu))return!1;if(!ic()&&t.jk)return!1;if(!t.Kk&&t.Hk!==Fr.POST){if(Ht.S_&&Ht.d_<=68)return!1;if(Ht.w_)return!1}return!0}(t)?new oc(t).uE:new cc(t).uE},n.Jk=function(t){var n=c.navigator;if(n&&n.sendBeacon)n.sendBeacon(t.Yu,wh([t.XT],{type:t.GT}));else{var i=t.GT?{"Content-type":t.GT}:void 0;this.vk(new Ur({Hk:Fr.POST,Yu:t.Yu,XT:t.XT,_k:i,Qk:Lr.Fk})).then(function(t){!function(t){t.then(Jt,Jt)}(t.qT())},Jt)}},n.kn=function(){},t}();x(),pt(),x(),pt();var vc=function(t){return t[t.LE=1]="LE",t[t.OE=2]="OE",t[t.LT=3]="LT",t[t.FE=4]="FE",t[t.UE=9]="UE",t}({});var dc=function(){function t(){}return t.prototype.HE=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new qr(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new qr;return new yc(n)},t}(),lc=function(){function t(t){this.qE=void 0,this.qE=t}var n=t.prototype;return n.jE=function(t){return this.qE.isEqualNode(t.qE)},n.QE=function(n){return new t(this.qE.cloneNode(n))},It(t,[{key:"VE",get:function(){return vc.OE}},{key:"WE",get:function(){var t;return null!=(t=this.qE.localName)?t:Tc(this.qE.nodeName)}},{key:"l",get:function(){return this.qE.nodeName}},{key:"zE",get:function(){var t;return null!=(t=this.qE.namespaceURI)?t:void 0}},{key:"GE",get:function(){var t;return null!=(t=this.qE.prefix)?t:void 0}},{key:"XE",get:function(){return this.qE.nodeValue}}]),t}(),wc=function(){function t(t){this.JE=void 0,this.YE=void 0,this.JE=t}var n=t.prototype;return n.ZE=function(t){return this.KE.filter(function(n){return _c(n)&&n.$E===t})},n.tx=function(t,n){return this.KE.filter(function(i){return _c(i)&&i.WE===n&&i.zE===t})},n.sx=function(t){this.JE.appendChild(t.ix),this.YE&&this.YE.push(t)},n.jE=function(t){return this.JE.isEqualNode(t.ix)},It(t,[{key:"KE",get:function(){return void 0===this.YE&&(this.YE=function(t){for(var n=[],i=0;i=on)for(;r.bw.length>0;)r.nb()},e&&r.dv(new Cc(e,"com.apple.streamingkeydelivery","1")),r.qat=n,r.Wrt=i,r.Wrt.wn("remove",r.tb),r.sw=new Bc(0),r.dv(r.sw),r}Tt(n,t);var i=n.prototype;return i.$Ct=function(){return this.qat===Ic.Mk?this.Wrt.cb:this.qat===Ic.Bk?this.Wrt.ab:void 0},i.Uat=function(t){return this.Dbt.get(t)},i.zg=function(){this.bw.length=0,this.sw.zB=0,this.Dbt.clear(),this.kw=0},i.pN=function(){return this.lb(),[].concat(t.prototype.pN.call(this),this.bw)},i.lb=function(){for(var t,n=Rt(this.Wrt.tg());!(t=n()).done;){var i=t.value;if(!this.Dbt.has(i.o)){var e=void 0;if(this.qat===Ic.Mk?(e=i.jv,i.rw=!0):(e=i.Ad,i.tw=!0),!e)return;this.Dbt.set(i.o,e),e.wv&&this.bw.push(new Oc(i.o+"-init")),this.bw.push(new Rc(Yc,i.o)),this.kw+=Yc}}this.ng()},i.ng=function(){for(;this.kw>60;)this.nb()},i.nb=function(){var t=this.bw.shift();void 0!==t&&function(t){return t.Km===Ec.Ak}(t)&&(this.Dbt.delete(t.av),this.kw-=t.cv,this.sw.zB++)},n}(Fc);var Gc=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).RO=void 0,i.RO=n,i}return Tt(n,t),n}(Eo),$c=function(t){function n(n,i){var e;return(e=t.call(this)||this).ig=void 0,e.ug=void 0,e.sg=void 0,e.lg=void 0,e.bg=void 0,e.mg=void 0,e.kg=void 0,e.tm=void 0,e.rm=void 0,e.om=void 0,e.sm=void 0,e.ig=n,e.ug=i,e.sg=[],e.bg=[],e.mg=Kr(),e.kg=Kr(),e.tm=Kr(),e.rm=0,e}Tt(n,t);var i=n.prototype;return i.tg=function(){return this.lg?(this.sg=this.sg.filter(function(t){return!(t.rw&&t.tw)}),[].concat(this.sg,[this.lg],this.bg)):[]},i.J2=function(t){this.am(t)},i.Q2=function(t){this.am(t),this.bm(t),this.km(t)},i.pS=function(t){this.am(t),this.km(t)},i.zg=function(){var t;null==(t=this.lg)||t.Xs(),this.lg=void 0,this.bg.forEach(function(t){return t.Xs()}),this.bg.length=0,this.sg.length=0,this.tm=Kr(),this.rm=0},i.bm=function(t){var n=t.startPts,i=t.totalDuration;this.kg.set(t.mediaType,n+i)},i.ip=function(){if(this.lg){this.lg.Xs(),this.sg.push(this.lg);var t=this.bg.shift(),n=new jc(this.ig,this.ug);t?(this.lg=t,this.bg.push(n)):this.lg=n}},i.up=function(t){if(this.lg){var n=!this.lg.Ad||0===this.lg.Ad.Fx,i=!this.lg.jv||0===this.lg.jv.Fx,e=this.lg.Ad&&this.lg.Ad.wv,r=this.lg.jv&&this.lg.jv.wv,o=i&&(n&&!(this.lg.tw||this.lg.rw)||e),u=n&&(i&&!(this.lg.tw||this.lg.rw)||r);(t===Ic.Bk&&!u||t===Ic.Mk&&!o)&&(this.ip(),this.ip())}},i.am=function(t){var n=t.mediaType,i=t.kind,e=this.mg.get(n);if(void 0===e){if(i===Uc.xet||i===Uc.Pet){var r=[t];this.mg.set(n,r)}}else e.push(t)},i.km=function(t){var n=this.ty(t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value;switch(r.kind){case Uc.xet:this.ny(r),this.tm=Kr(),this.rm=0;break;case Uc.Cet:this.hy(r);break;case Uc.Pet:this.my(r)}}},i.ny=function(t){var n=t.mediaType;void 0===this.lg?(this.lg=new jc(this.ig,this.ug),this.bg.push(new jc(this.ig,this.ug))):this.up(n),n===Ic.Mk?(this.sm=t.segment,this.lg.jv.wv=!0):n===Ic.Bk&&(this.om=t.segment,this.lg.Ad.wv=!0)},i.my=function(t){var n,i,e=t.mediaType===Ic.Bk,r=t.totalDuration,o=null!=(n=this.tm.get(t.mediaType))?n:0;e?(this.lg.Ad.Q2(t.segment,r),i=o+this.lg.Ad.Fx):(this.lg.jv.Q2(t.segment,r),i=o+this.lg.jv.Fx),i>=this.rm+Yc&&(this.tm.set(t.mediaType,i),this.rm+=Yc,this.ip())},i.hy=function(t){this.kg.set(t.mediaType,void 0),this.up(t.mediaType),this.sg.length=0,this.So(new Gc(t.endTime))},i.ty=function(t){var n=this;if(t.kind===Uc.Cet)return this.ky(t);var i=[];return this.mg.forEach(function(t){if(t&&t.length>0){var e=un(t,function(t){return t.kind===Uc.Cet});-1===e&&(e=t.length);for(var r,o=Rt(t.slice(0,e));!(r=o()).done;){var u=r.value;if(!cn(i,u)){var s,f=n.ky(u);if(f.length>0)(s=i).push.apply(s,[].concat(f));else if(u.kind===Uc.Pet)break}}}}),i},i.ky=function(t){var n=this.mg.get(t.mediaType),i=function(t){return t===Ic.Mk?Ic.Bk:Ic.Mk}(t.mediaType);if(!(i===Ic.Mk?this.ug:this.ig))return n.splice(0,n.indexOf(t)+1);if(t.kind===Uc.xet)return[];var e=this.kg.get(i);if(void 0===e)return[];if(t.kind===Uc.Cet){var r=this.OS(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),[].concat(o,r,[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.AS(t,u,i);return[].concat(u,s,[t])}return[]},i.AS=function(t,n,i){var e=this.mg.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=un(e,function(t){return t.kind===Uc.Cet}),u=o-1;-1===o&&(u=e.length-1);for(var s=u+1,f=0;f<=u&&s===u+1;f++){var h=e[f];h.kind===Uc.Pet&&h.startPts>r&&(s=f)}var c=-1;return-1!==un(n,function(t){return t.kind===Uc.xet})&&(c=un(e,function(t){return t.kind===Uc.xet})),c>s&&(s=c+1),s>0?(e[s-1].kind===Uc.xet&&(s-=1),e.splice(0,s)):[]},i.OS=function(t){var n=this.mg.get(t);if(n){var i=un(n,function(t){return t.kind===Uc.Cet});if(i>=0)return n.splice(0,i+1)}return[]},i.BS=function(){var t="[MEDIABUFFER] endPTS: ";this.kg.forEach(function(n,i){t=t.concat(i+" = "+n+" ")}),jt.hm(t)},i.RT=function(t,n){var i=t+": [";null==n||n.forEach(function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")}),i=i.concat(" ]"),jt.hm(i)},It(n,[{key:"ab",get:function(){var t;return null==(t=this.om)?void 0:t.slice()}},{key:"cb",get:function(){var t;return null==(t=this.sm)?void 0:t.slice()}}]),n}(Io);var Zc=function(){function t(t,n){this.tk=void 0,this.ik=void 0,this.uk=void 0,this.sk=void 0;var i=t.some(function(t){return t.match("audio")}),e=t.some(function(t){return t.match("video")});this.ik=new $c(i,e),this.tk=new Lc(i,e),i&&(this.uk=new Kc(Ic.Bk,this.ik,n)),e&&(this.sk=new Kc(Ic.Mk,this.ik,n))}var n=t.prototype;return n.ak=function(t){var n,i,e=Jc(t);return e===Ic.Mk?null==(n=this.sk)?void 0:n.$Ct():e===Ic.Bk?null==(i=this.uk)?void 0:i.$Ct():void 0},n.Uat=function(t){var n,i,e=t.split("/")[1],r=Jc(t);return r===Ic.Mk?null==(n=this.sk)?void 0:n.Uat(e):r===Ic.Bk?null==(i=this.uk)?void 0:i.Uat(e):void 0},n.J2=function(t){this.ik.J2(t)},n.Q2=function(t){this.ik.Q2(t)},n.ilt=function(t){this.ik.pS(t)},n.zg=function(){var t,n;this.ik.zg(),this.tk.zg(),null==(t=this.uk)||t.zg(),null==(n=this.sk)||n.zg()},It(t,[{key:"mk",get:function(){return this.tk}},{key:"kk",get:function(){return this.uk}},{key:"SI",get:function(){return this.sk}}]),t}();function Jc(t){return t.match(/video/)?Ic.Mk:Ic.Bk}var Qc=function(){function t(t,n){var i=this;this.IE=void 0,this.ME=void 0,this.gut=void 0,this.HQt=void 0,this.IE=t,this.ME=n,this.gut=void 0,this.HQt=function(t){return nn(function(){var n,i;return en(this,function(e){switch((n=t.data).kind){case Uc.Eet:this.gut=new Zc(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case Uc.xet:this.gut.J2(n);break;case Uc.Pet:this.gut.Q2(n);break;case Uc.Cet:this.gut.ilt(n)}return i={kind:Uc.Iet},this.IE.postMessage(i),[2]})}).call(i)},this.IE.onmessage=this.HQt}var n=t.prototype;return n.yVt=function(t){return"master.m3u8"===t?this.gut.mk:"video/index.m3u8"===t?this.gut.SI:"audio/index.m3u8"===t?this.gut.kk:void 0},n.TR=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.yVt(t))?void 0:n.yVt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(Xc)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.gut)?void 0:r.ak(t);return new Response(o,{headers:e})}var u=this.Oat(t);if(!u)return new Response(void 0,{status:404,statusText:"Not Found"});var s=function(t){var n,i=function(t){n.enqueue(t.lk)},e=function(){n.close(),t.mn("append",i),t.mn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.lk),t.uS?n.close():(t.wn("append",i),t.wn("close",e))},cancel:function(){t.mn("append",i),t.mn("close",e)}})}(u);return new Response(s,{headers:e})}return new Response(void 0,{status:404,statusText:"Not Found"})},n.Oat=function(t){return this.gut.Uat(t)},n.close=function(){var t;this.IE.close(),null==(t=this.gut)||t.zg()},t}(),ta=function(){function t(){var t=this;this.l8=Kr(),this.mQt=void 0,this.HQt=function(n){var i=n.data;if(i.kind===Uc.Tet){t.CR().catch(Jt);var e=i.port,r=Vc(),o=new Qc(e,n.source.id);t.l8.set(r,o);var u=function(n){n.data.kind===Uc.Ret&&(t.BR(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:Uc.ket,sessionId:r};e.postMessage(s)}},this.IN=function(n){if(wo(n.request.url,"https://theo.proxy")){var i=new URL(n.request.url).pathname.split("/"),e=i[1],r=i.slice(2).join("/"),o=t.l8.get(e);if(void 0===o){var u=new Response(void 0,{headers:{message:"Given session ["+e+"] not found."},status:404,statusText:"Not Found"});return void n.respondWith(u)}if(void 0===r){var s=new Response(void 0,{headers:{message:"No resource ["+r+"] provided."},status:404,statusText:"Not Found"});return void n.respondWith(s)}var f=o.TR(r);n.respondWith(f)}}}var n=t.prototype;return n.gr=function(t){this.mQt=t,t.addEventListener("message",this.HQt),t.addEventListener("fetch",this.IN)},n.BR=function(t){var n=this.l8.get(t);n&&n.close(),this.l8.delete(t)},n.CR=function(){return nn(function(){var t,n,i;return en(this,function(e){switch(e.label){case 0:return t=this,[4,this.mQt.clients.matchAll()];case 1:return n=e.sent(),i=n.map(function(t){return t.id}),this.l8.forEach(function(n,e){cn(i,n.ME)||t.BR(e)}),[2]}})}).call(this)},t}();ta.SP=new ta;var na=self;na.addEventListener("install",function(t){t.waitUntil(na.skipWaiting())}),na.addEventListener("activate",function(t){t.waitUntil(na.clients.claim())}),ta.SP.gr(na)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this); //# sourceMappingURL=theoplayer.sw.js.map \ No newline at end of file diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/pubspec.yaml b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/pubspec.yaml index 673f2ed2..26740fa1 100755 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk/pubspec.yaml +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk/pubspec.yaml @@ -1,6 +1,6 @@ name: theoplayer description: Official THEOplayer Flutter SDK that brings streaming video playback for Android, iOS, and Web platforms with DRM support and premium features. -version: 10.0.0 +version: 10.3.0 homepage: https://theoplayer.com repository: https://github.com/THEOplayer/flutter-theoplayer-sdk @@ -13,10 +13,10 @@ dependencies: sdk: flutter flutter_web_plugins: sdk: flutter - theoplayer_platform_interface: 10.0.0 - theoplayer_android: 10.0.0 - theoplayer_ios: 10.0.0 - theoplayer_web: 10.0.0 + theoplayer_platform_interface: 10.3.0 + theoplayer_android: 10.3.0 + theoplayer_ios: 10.3.0 + theoplayer_web: 10.3.0 dev_dependencies: flutter_test: diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_android/CHANGELOG.md b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_android/CHANGELOG.md index 4fa0c45c..a9138744 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_android/CHANGELOG.md +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 10.3.0 + +* Updated THEOplayer to 10.3.0. + ## 10.0.0 * Updated THEOplayer to 10.0.0. diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_android/android/build.gradle b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_android/android/build.gradle index 723fc950..e1f773eb 100755 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_android/android/build.gradle +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_android/android/build.gradle @@ -25,7 +25,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' apply plugin: 'kotlin-android' -def theoplayerVersion ='10.0.0' +def theoplayerVersion ='10.3.0' android { if (project.android.hasProperty("namespace")) { diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_android/pubspec.yaml b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_android/pubspec.yaml index eba13a8b..ed9a6c15 100755 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_android/pubspec.yaml +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_android/pubspec.yaml @@ -1,6 +1,6 @@ name: theoplayer_android description: THEOplayer Flutter SDK for Android. Used by `theoplayer` to support streaming video playback on Android platforms. -version: 10.0.0 +version: 10.3.0 homepage: https://theoplayer.com repository: https://github.com/THEOplayer/flutter-theoplayer-sdk @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - theoplayer_platform_interface: 10.0.0 + theoplayer_platform_interface: 10.3.0 dev_dependencies: flutter_test: diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_ios/CHANGELOG.md b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_ios/CHANGELOG.md index 4fa0c45c..a9138744 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_ios/CHANGELOG.md +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_ios/CHANGELOG.md @@ -1,3 +1,7 @@ +## 10.3.0 + +* Updated THEOplayer to 10.3.0. + ## 10.0.0 * Updated THEOplayer to 10.0.0. diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_ios/ios/theoplayer_ios.podspec b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_ios/ios/theoplayer_ios.podspec index ad9a0eb5..bb8ba17f 100755 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_ios/ios/theoplayer_ios.podspec +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_ios/ios/theoplayer_ios.podspec @@ -22,7 +22,7 @@ THEOplayer Flutter iOS SDK s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } s.swift_version = '5.0' - s.dependency 'THEOplayerSDK-core', '10.0.0' - s.dependency 'THEOplayer-Integration-THEOlive', '10.0.0' + s.dependency 'THEOplayerSDK-core', '10.3.0' + s.dependency 'THEOplayer-Integration-THEOlive', '10.3.0' end diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_ios/pubspec.yaml b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_ios/pubspec.yaml index 2ddd415e..f487dafe 100755 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_ios/pubspec.yaml +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_ios/pubspec.yaml @@ -1,6 +1,6 @@ name: theoplayer_ios description: THEOplayer Flutter SDK for iOS. Used by `theoplayer` to support streaming video playback on the iOS platform. -version: 10.0.0 +version: 10.3.0 homepage: https://theoplayer.com repository: https://github.com/THEOplayer/flutter-theoplayer-sdk @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - theoplayer_platform_interface: 10.0.0 + theoplayer_platform_interface: 10.3.0 dev_dependencies: flutter_test: diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_platform_interface/CHANGELOG.md b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_platform_interface/CHANGELOG.md index 4fa0c45c..a9138744 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_platform_interface/CHANGELOG.md +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_platform_interface/CHANGELOG.md @@ -1,3 +1,7 @@ +## 10.3.0 + +* Updated THEOplayer to 10.3.0. + ## 10.0.0 * Updated THEOplayer to 10.0.0. diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_platform_interface/pubspec.yaml b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_platform_interface/pubspec.yaml index 92b4ef71..c6ea979c 100755 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_platform_interface/pubspec.yaml +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_platform_interface/pubspec.yaml @@ -1,6 +1,6 @@ name: theoplayer_platform_interface description: A common platform interface for the THEOplayer Flutter SDK. Used by the platform-specific packages of `theoplayer`. -version: 10.0.0 +version: 10.3.0 homepage: https://theoplayer.com repository: https://github.com/THEOplayer/flutter-theoplayer-sdk diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_web/CHANGELOG.md b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_web/CHANGELOG.md index 4fa0c45c..a9138744 100644 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_web/CHANGELOG.md +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_web/CHANGELOG.md @@ -1,3 +1,7 @@ +## 10.3.0 + +* Updated THEOplayer to 10.3.0. + ## 10.0.0 * Updated THEOplayer to 10.0.0. diff --git a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_web/pubspec.yaml b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_web/pubspec.yaml index daf843b3..a8cd00d4 100755 --- a/flutter_theoplayer_sdk/flutter_theoplayer_sdk_web/pubspec.yaml +++ b/flutter_theoplayer_sdk/flutter_theoplayer_sdk_web/pubspec.yaml @@ -1,6 +1,6 @@ name: theoplayer_web description: THEOplayer Flutter SDK for Web. Used by `theoplayer` to support streaming video playback on Web platforms. -version: 10.0.0 +version: 10.3.0 homepage: https://theoplayer.com repository: https://github.com/THEOplayer/flutter-theoplayer-sdk @@ -13,7 +13,7 @@ dependencies: sdk: flutter flutter_web_plugins: sdk: flutter - theoplayer_platform_interface: 10.0.0 + theoplayer_platform_interface: 10.3.0 # WASM-compatible JS interop web: '>=1.0.0 <2.0.0'

>>0)break i;if((C=(E=(d=f[(u+4|0)+(N<<2)>>2])>>>1|0)+(B=e>>>1|0)|0)>>>0<=a>>>0&!(1&(e|d)))e=C<<1;else{if(Q=k(R-C|0,120)+r|0,1&d||J(Q,E,A,a,o(1|E)<<1^62,0),1&e||J(k(E,120)+Q|0,B,A,a,o(1|B)<<1^62,0),!(d>>>0<2|e>>>0<2||(y=(e=E>>>0>B>>>0)?B:E)>>>0>a>>>0)){d=k(E,120)+Q|0,B=(E=ze(A,e?d:Q,B=k(y,120)))+B|0;A:{f:{if(!e){if(!y){e=E;break A}for(e=E;;){if(!f[d+48>>2])break r;if(!(1&f[e+48>>2]))break r;if(E=f[(w=d+56|0)>>2],G=Q,Q=y=f[(I=e+56|0)>>2],Q=ze(G,(g=(0|(w=f[w+4>>2]))<(0|(I=f[I+4>>2]))?1:E>>>0>>0&(0|w)<=(0|I))?d:e,120)+120|0,(0|B)==(0|(e=k(y>>>0<=E>>>0&(0|w)>=(0|I)|(0|w)>(0|I),120)+e|0)))break A;if((0|W)==(0|(d=k(g,120)+d|0)))break}break A}for(e=v;;){if(!f[B-72>>2])break r;if(!(1&f[d-72>>2]))break r;if(I=B+-64|0,D=e,G=d-120|0,B=B-120|0,e=y=f[I>>2],d=f[(g=d+-64|0)>>2],g=ze(D,(I=(0|(y=f[I+4>>2]))<(0|(w=f[g+4>>2]))?1:e>>>0>>0&(0|w)>=(0|y))?G:B,120),B=B+k(I,120)|0,(0|Q)==(0|(d=k((0|w)<=(0|y)&e>>>0>=d>>>0|(0|w)<(0|y),120)+G|0)))break f;if(e=g-120|0,(0|E)==(0|B))break}}Q=d,e=E}ze(Q,e,B-e|0)}e=C<<1|1}if(d=1,!((Q=N)>>>0>1))break}break e}d=Q}if(i[(u+270|0)+d|0]=p,f[(u+4|0)+(d<<2)>>2]=e,!Y)break;Q=d+1|0,R=(_>>>1|0)+R|0,e=_}return 1&e||J(r,b,A,a,o(1|b)<<1^62,0),void(S=u+336|0)}Ve(1058820),$f()}function j(r,e){var t,k,o,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0,p=0,m=0;S=t=S-32|0,k=f[e+260>>2],o=f[e+256>>2];r:{e:{i:{A:{f:{n:{a:{if(I=f[e+264>>2]){if(R=1==n[k+80|0]?n[k+81|0]:0,!(v=f[k+72>>2]))break a;if(1==n[k+76|0]){if((w=n[k+77|0])>>>0>3)break f;_=f[1058020+(w<<2)>>2],d=(y=s(9e4/(Q=+(v>>>0)/+(_>>>0))))>=-0x8000000000000000,(E=u(y))<0x8000000000000000?(w=~~y>>>0,g=E>=1?~~(E=y>0?c(s(2.3283064365386963e-10*y),4294967295):l(2.3283064365386963e-10*(y-+(~~y>>>0>>>0))))>>>0:0):(w=0,g=-2147483648),B=(h=y>0x7ffffffffffffc00)?-1:d?w:0,B=(w=y==y)?B:0,C=w?h?2147483647:d?g:-2147483648:0,w=v}else _=1152,w=9e4;v<<=5}else w=9e4,_=1152,v=0;if(p=a[e+146>>1],m=a[e+144>>1],!(h=V(32)))break n;if(f[t+24>>2]=h,f[t+20>>2]=32,i[0|h]=3,i[f[t+24>>2]+1|0]=128,f[t+28>>2]=2,2==f[t+20>>2]&&de(t+20|0,1058200),i[f[t+24>>2]+2|0]=128,f[t+28>>2]=3,3==f[t+20>>2]&&de(t+20|0,1058216),i[f[t+24>>2]+3|0]=128,f[t+28>>2]=4,4==(0|(h=f[t+20>>2]))&&(de(t+20|0,1058232),h=f[t+20>>2]),i[f[t+24>>2]+4|0]=27,d=5,f[t+28>>2]=5,h-5>>>0<=1&&(Ae(t+20|0,5,2,1,1),d=f[t+28>>2]),h=f[t+24>>2]+d|0,i[0|h]=0,i[h+1|0]=2,h=d+2|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058248),i[h+f[t+24>>2]|0]=0,h=d+3|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058264),i[h+f[t+24>>2]|0]=4,h=d+4|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058280),i[h+f[t+24>>2]|0]=128,h=d+5|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058296),i[h+f[t+24>>2]|0]=128,h=d+6|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058312),i[h+f[t+24>>2]|0]=128,h=d+7|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058328),i[h+f[t+24>>2]|0]=13,h=d+8|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058344),i[h+f[t+24>>2]|0]=107,h=d+9|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058360),i[h+f[t+24>>2]|0]=21,h=d+10|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058376),i[h+f[t+24>>2]|0]=0,h=d+11|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058392),i[h+f[t+24>>2]|0]=0,h=d+12|0,f[t+28>>2]=h,(0|h)==f[t+20>>2]&&de(t+20|0,1058408),i[h+f[t+24>>2]|0]=0,d=d+13|0,f[t+28>>2]=d,f[t+20>>2]-d>>>0<=3&&(Ae(t+20|0,d,4,1,1),d=f[t+28>>2]),h=f[t+24>>2]+d|0,g=v<<24|(65280&v)<<8|v>>>8&65280|v>>>24,i[0|h]=g,i[h+1|0]=g>>>8,i[h+2|0]=g>>>16,i[h+3|0]=g>>>24,d=d+4|0,f[t+28>>2]=d,f[t+20>>2]-d>>>0<=3&&(Ae(t+20|0,d,4,1,1),d=f[t+28>>2]),v=f[t+24>>2]+d|0,i[0|v]=g,i[v+1|0]=g>>>8,i[v+2|0]=g>>>16,i[v+3|0]=g>>>24,v=d+4|0,f[t+28>>2]=v,(0|v)==f[t+20>>2]&&de(t+20|0,1058424),i[v+f[t+24>>2]|0]=6,v=d+5|0,f[t+28>>2]=v,(0|v)==f[t+20>>2]&&de(t+20|0,1058440),i[v+f[t+24>>2]|0]=128,v=d+6|0,f[t+28>>2]=v,(0|v)==f[t+20>>2]&&de(t+20|0,1058456),i[v+f[t+24>>2]|0]=128,v=d+7|0,f[t+28>>2]=v,(0|v)==f[t+20>>2]&&de(t+20|0,1058472),i[v+f[t+24>>2]|0]=128,v=d+8|0,f[t+28>>2]=v,(0|v)==f[t+20>>2]&&de(t+20|0,1058488),i[v+f[t+24>>2]|0]=1,v=d+9|0,f[t+28>>2]=v,(0|v)==f[t+20>>2]&&de(t+20|0,1058504),i[v+f[t+24>>2]|0]=2,f[(N=t+16|0)>>2]=d+10,v=f[t+24>>2],f[t+8>>2]=f[t+20>>2],f[t+12>>2]=v,!f[e+64>>2])break A;if(!f[e+80>>2])break i;if(f[e+96>>2]){if(d=f[e+72>>2],g=f[e+76>>2],h=f[e+92>>2],v=f[e+88>>2],i[r+92|0]=R,f[r+88>>2]=_,f[r+84>>2]=w,A[r+70>>1]=p,A[r+68>>1]=m,f[r+64>>2]=I,f[r+60>>2]=k,f[r+56>>2]=o,f[r+40>>2]=v,f[r+44>>2]=h,f[r+32>>2]=d,f[r+36>>2]=g,f[r+24>>2]=B,f[r+28>>2]=C,b[r+16>>3]=Q,f[r>>2]=0,f[r+4>>2]=0,w=f[t+12>>2],f[r+72>>2]=f[t+8>>2],f[r+76>>2]=w,w=f[e+108>>2],f[r+48>>2]=f[e+104>>2],f[r+52>>2]=w,f[r+80>>2]=f[N>>2],(r=f[e+128>>2])&&fi[f[r+16>>2]](e+140|0,f[e+132>>2],f[e+136>>2]),!(!f[e+156>>2]&2==f[e+152>>2])){if(w=f[e+244>>2],r=f[e+248>>2]){d=0;t:{if(1!=(0|r)){for(v=1&r,B=-2&r,r=w;fi[f[f[r>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2]),fi[f[f[r+16>>2]+16>>2]](r+28|0,f[r+20>>2],f[r+24>>2]),r=r+32|0,(0|B)!=(0|(d=d+2|0)););if(!v)break t}fi[f[f[(r=(d<<4)+w|0)>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2])}w=f[e+244>>2]}if(B=f[e+240>>2]){if((v=-8&(r=f[w-4>>2]))>>>0<(((e=3&r)?4:8)|(r=B<<4))>>>0)break e;if(v>>>0>r+39>>>0&&e)break r;nr(w)}}return void(S=t+32|0)}Ve(1058152),$f()}Ve(1058168),$f()}Ze(1,1058184),$f()}Ne(w,4,1058104),$f()}Ve(1058120),$f()}Ve(1058136),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function z(r,e,t,b){var u,o=0,c=0,s=0,l=0,h=0;S=u=S-272|0,f[u+252>>2]=10;r:{e:{if(10!=(0|(o=f[r+8>>2]))){if(o>>>0<10)break e;fi[f[f[r>>2]>>2]](u+24|0,r+12|0,f[r+4>>2],o),f[(o=u+32|0)>>2]=10,f[r+8>>2]=f[r+8>>2]-10,f[r+4>>2]=f[r+4>>2]+10,c=f[o+4>>2],f[(r=u+16|0)>>2]=f[o>>2],f[r+4>>2]=c,r=f[u+28>>2],f[u+8>>2]=f[u+24>>2],f[u+12>>2]=r;break r}c=f[r>>2],s=f[r+4>>2],f[r>>2]=1051612,l=f[(o=r+8|0)>>2],h=f[o+4>>2],f[o>>2]=0,f[o+4>>2]=0,f[(o=u+16|0)>>2]=l,f[o+4>>2]=h,f[r+4>>2]=f[r+4>>2]+10,f[u+8>>2]=c,f[u+12>>2]=s;break r}f[u+8>>2]=o,f[u+28>>2]=2,f[u+24>>2]=1051848,f[u+36>>2]=2,f[u+40>>2]=0,f[u+264>>2]=u+8,f[u+268>>2]=3,f[u+256>>2]=u+252,f[u+260>>2]=3,f[u+32>>2]=u+256,Me(u+24|0,1051864),$f()}r=u+256|0,o=u+20|0,fi[f[f[u+8>>2]>>2]](r,o,f[u+12>>2],f[u+16>>2]),Tr(u+24|0,r,e,t),fi[f[f[u+256>>2]+16>>2]](u+268|0,f[u+260>>2],f[u+264>>2]);r:{e:{i:{A:{f:{if(2!=f[u+24>>2]|f[u+28>>2])switch(t=a[u+62>>1],r=n[u+61|0],e=f[u+56>>2],n[u+60|0]-3|0){case 0:break A;case 1:break i;default:break f}fi[f[f[u+8>>2]+16>>2]](o,f[u+12>>2],f[u+16>>2]);break r}s=f[(c=u+48|0)+4>>2],f[(o=u+88|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+40|0)+4>>2],f[(o=u+80|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+32|0)+4>>2],f[(o=u+72|0)>>2]=f[c>>2],f[o+4>>2]=s,o=f[u+28>>2],f[u+64>>2]=f[u+24>>2],f[u+68>>2]=o,f[u+120>>2]=0,f[u+124>>2]=0,f[u+112>>2]=0,f[u+116>>2]=4,A[u+102>>1]=t,i[u+100|0]=2,f[u+96>>2]=e,i[u+101|0]=r,i[u+104|0]=(128&r)>>>7,r=f[(t=u+16|0)>>2],o=f[t+4>>2],f[(t=u+264|0)>>2]=r,f[t+4>>2]=o,o=f[u+12>>2],f[u+256>>2]=f[u+8>>2],f[u+260>>2]=o,r?(f[u+124>>2]=r,ce(u+112|0,1058736),o=f[u+260>>2],r=f[u+116>>2],f[r>>2]=f[u+256>>2],f[r+4>>2]=o,o=f[t+4>>2],f[(r=r+8|0)>>2]=f[t>>2],f[r+4>>2]=o,f[u+120>>2]=1):fi[f[f[u+256>>2]+16>>2]](u+268|0,f[u+260>>2],0),(0|(t=f[b+160>>2]))==f[b+152>>2]&&ke(b+152|0,1057308),r=f[b+156>>2]+k(t,72)|0,f[r>>2]=0,f[r+4>>2]=0,o=f[u+68>>2],f[r+8>>2]=f[u+64>>2],f[r+12>>2]=o,s=f[(c=u+72|0)+4>>2],f[(o=r+16|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+80|0)+4>>2],f[(o=r+24|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+88|0)+4>>2],f[(o=r+32|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+96|0)+4>>2],f[(o=r+40|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+104|0)+4>>2],f[(o=r+48|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+112|0)+4>>2],f[(o=r+56|0)>>2]=f[c>>2],f[o+4>>2]=s,c=f[(o=u+120|0)+4>>2],f[(r=r- -64|0)>>2]=f[o>>2],f[r+4>>2]=c,f[b+160>>2]=t+1;break e}s=f[(c=u+48|0)+4>>2],f[(o=u+152|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+40|0)+4>>2],f[(o=u+144|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+32|0)+4>>2],f[(o=u+136|0)>>2]=f[c>>2],f[o+4>>2]=s,o=f[u+28>>2],f[u+128>>2]=f[u+24>>2],f[u+132>>2]=o,f[u+184>>2]=0,f[u+188>>2]=0,f[u+176>>2]=0,f[u+180>>2]=4,A[u+166>>1]=t,i[u+164|0]=3,f[u+160>>2]=e,i[u+165|0]=r,i[u+168|0]=(128&r)>>>7,r=f[(t=u+16|0)>>2],o=f[t+4>>2],f[(t=u+264|0)>>2]=r,f[t+4>>2]=o,o=f[u+12>>2],f[u+256>>2]=f[u+8>>2],f[u+260>>2]=o,r?(f[u+188>>2]=r,ce(u+176|0,1058736),o=f[u+260>>2],r=f[u+180>>2],f[r>>2]=f[u+256>>2],f[r+4>>2]=o,o=f[t+4>>2],f[(r=r+8|0)>>2]=f[t>>2],f[r+4>>2]=o,f[u+184>>2]=1):fi[f[f[u+256>>2]+16>>2]](u+268|0,f[u+260>>2],0),(0|(t=f[b+160>>2]))==f[b+152>>2]&&ke(b+152|0,1057324),r=f[b+156>>2]+k(t,72)|0,f[r>>2]=1,f[r+4>>2]=0,o=f[u+132>>2],f[r+8>>2]=f[u+128>>2],f[r+12>>2]=o,s=f[(c=u+136|0)+4>>2],f[(o=r+16|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+144|0)+4>>2],f[(o=r+24|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+152|0)+4>>2],f[(o=r+32|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+160|0)+4>>2],f[(o=r+40|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+168|0)+4>>2],f[(o=r+48|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+176|0)+4>>2],f[(o=r+56|0)>>2]=f[c>>2],f[o+4>>2]=s,c=f[(o=u+184|0)+4>>2],f[(r=r- -64|0)>>2]=f[o>>2],f[r+4>>2]=c,f[b+160>>2]=t+1;break e}s=f[(c=u+48|0)+4>>2],f[(o=u+216|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+40|0)+4>>2],f[(o=u+208|0)>>2]=f[c>>2],f[o+4>>2]=s,s=f[(c=u+32|0)+4>>2],f[(o=u+200|0)>>2]=f[c>>2],f[o+4>>2]=s,o=f[u+28>>2],f[u+192>>2]=f[u+24>>2],f[u+196>>2]=o,f[u+240>>2]=0,f[u+244>>2]=0,f[u+232>>2]=0,f[u+236>>2]=4,A[u+230>>1]=t,i[u+229|0]=r,i[u+228|0]=4,f[u+224>>2]=e,r=f[(t=u+16|0)>>2],o=f[t+4>>2],f[(t=u+264|0)>>2]=r,f[t+4>>2]=o,o=f[u+12>>2],f[u+256>>2]=f[u+8>>2],f[u+260>>2]=o,r?(f[u+244>>2]=r,ce(u+232|0,1058736),o=f[u+260>>2],r=f[u+236>>2],f[r>>2]=f[u+256>>2],f[r+4>>2]=o,o=f[t+4>>2],f[(r=r+8|0)>>2]=f[t>>2],f[r+4>>2]=o,f[u+240>>2]=1):fi[f[f[u+256>>2]+16>>2]](u+268|0,f[u+260>>2],0),(0|(r=f[b+160>>2]))==f[b+152>>2]&&ke(b+152|0,1057340),f[b+160>>2]=r+1,r=f[b+156>>2]+k(r,72)|0,f[r>>2]=2,f[r+4>>2]=0,t=f[u+196>>2],f[r+8>>2]=f[u+192>>2],f[r+12>>2]=t,c=f[(o=u+200|0)+4>>2],f[(t=r+16|0)>>2]=f[o>>2],f[t+4>>2]=c,c=f[(o=u+208|0)+4>>2],f[(t=r+24|0)>>2]=f[o>>2],f[t+4>>2]=c,c=f[(o=u+216|0)+4>>2],f[(t=r+32|0)>>2]=f[o>>2],f[t+4>>2]=c,c=f[(o=u+224|0)+4>>2],f[(t=r+40|0)>>2]=f[o>>2],f[t+4>>2]=c,c=f[(o=u+232|0)+4>>2],f[(t=r+48|0)>>2]=f[o>>2],f[t+4>>2]=c,o=f[(t=u+240|0)+4>>2],f[(r=r+56|0)>>2]=f[t>>2],f[r+4>>2]=o}f[b+164>>2]=e}S=u+272|0}function P(r,e){var A,a,t=0,b=0,o=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0;S=A=S-144|0,_=n[e+261|0],g=f[e+252>>2],v=f[e+256>>2],h=n[e+262|0],a=r+12|0,fi[f[f[r>>2]>>2]](A,a,f[r+4>>2],f[r+8>>2]);r:{e:{if(o=f[r+8>>2])for(I=e+160|0,Q=e+240|0,N=e+224|0,R=A+112|0,C=A+12|0;;){i:{A:{f:{n:{a:{t:{b:{k:switch(255&h){case 0:o=o-1|0,f[r+8>>2]=o,t=f[r+4>>2],f[r+4>>2]=t+1,h=255==n[0|t];break i;case 4:f[r+8>>2]=o-1,t=f[r+4>>2],f[r+4>>2]=t+1,g=(n[0|t]<<3)+g|0,h=5;break A;case 1:if(o=o-1|0,f[r+8>>2]=o,t=f[r+4>>2],f[r+4>>2]=t+1,h=0,(d=n[0|t])>>>0<240)break i;o=f[e+152>>2],h=f[e+156>>2],b=f[e+32>>2],B=f[e+36>>2],t=f[e+40>>2],y=f[e+44>>2],ze(A+16|0,I,80),f[e+232>>2]=0,f[e+236>>2]=0,f[e+224>>2]=0,f[e+228>>2]=4,i[e+222|0]=0,i[e+220|0]=0,f[e+216>>2]=0,f[e+208>>2]=t,f[e+212>>2]=y,f[e+200>>2]=b,f[e+204>>2]=B,f[e+192>>2]=t,f[e+196>>2]=y,f[e+184>>2]=b,f[e+188>>2]=B,f[e+176>>2]=t,f[e+180>>2]=y,f[e+168>>2]=b,f[e+172>>2]=B,f[e+152>>2]=0,f[e+156>>2]=0,2!=(0|o)|h&&((0|(b=f[e+248>>2]))==f[e+240>>2]&&te(Q,1056108),t=f[e+244>>2]+k(b,88)|0,f[t>>2]=o,f[t+4>>2]=h,ze(t+8|0,A+16|0,80),f[e+248>>2]=b+1),_=1&d,h=2;break A;case 2:if(f[r+8>>2]=o-1,t=f[r+4>>2],f[r+4>>2]=t+1,(o=(b=n[0|t])>>>2&15)>>>0>11)break b;if(!f[e+156>>2]&2==f[e+152>>2])break t;if(t=f[1056124+(o<<2)>>2],i[e+221|0]=o,i[e+220|0]=1,!t)break a;if(i[e+222|0]=1,f[e+216>>2]=t,i[e+223|0]=b<<2&4,f[e+32>>2]){f[e+32>>2]=1,f[e+36>>2]=0,B=(w=s(9216e4/+(t>>>0)))>=-0x8000000000000000,b=f[e+40>>2],d=f[e+44>>2],(E=u(w))<0x8000000000000000?(t=~~w>>>0,y=E>=1?~~(E=w>0?c(s(2.3283064365386963e-10*w),4294967295):l(2.3283064365386963e-10*(w-+(~~w>>>0>>>0))))>>>0:0):(t=0,y=-2147483648),o=w>0x7ffffffffffffc00,h=(h=b)+(t=(b=w==w)?o?-1:B?t:0:0)|0,b=(b?o?2147483647:B?y:-2147483648:0)+d|0,f[e+40>>2]=h,f[e+44>>2]=t>>>0>h>>>0?b+1|0:b,h=3;break A}Ve(1056220),$f();case 3:if(f[r+8>>2]=o-1,b=f[r+4>>2],f[r+4>>2]=b+1,!f[e+156>>2]&2==f[e+152>>2])break n;if(n[e+222|0]){t=n[0|b],i[e+222|0]=1,i[e+223|0]=n[e+223|0]+((192&t)>>>6|0),g=(3&t)<<11,h=4;break A}Ve(1056252),$f();case 5:f[r+8>>2]=o-1,t=f[r+4>>2],f[r+4>>2]=t+1,g=(n[0|t]>>>5|0)+g|0,h=6;break A;case 6:d=o-1|0,f[r+8>>2]=d,t=(b=f[r+4>>2])+1|0,f[r+4>>2]=t,o=n[0|b],fi[f[f[r>>2]>>2]](A+100|0,a,t,d),d=A+8|0,fi[f[f[A>>2]+16>>2]](C,f[A+4>>2],f[d>>2]),t=f[(b=A+108|0)+4>>2],f[d>>2]=f[b>>2],f[d+4>>2]=t,t=f[A+104>>2],f[A>>2]=f[A+100>>2],f[A+4>>2]=t,v=(t=g-7|0)>>>0<=g>>>0?t:0,h=3&o||1&_?9:7;break A;case 7:if(f[r+8>>2]=o-1,f[r+4>>2]=f[r+4>>2]+1,f[A+96>>2]=1,!(t=f[A+8>>2]))break e;f[A+8>>2]=t-1,f[A+4>>2]=f[A+4>>2]+1,v=v-1|0,h=8;break A;case 8:if(f[r+8>>2]=o-1,f[r+4>>2]=f[r+4>>2]+1,f[A+96>>2]=1,!(t=f[A+8>>2]))break e;f[A+8>>2]=t-1,f[A+4>>2]=f[A+4>>2]+1,v=v-1|0,h=9;break A;default:break k}k:{u:{if(b=(t=f[A+8>>2])>>>0>v>>>0?v:t){if(f[A+96>>2]=b,b>>>0>o>>>0)break f;if(f[r+8>>2]=o-b,f[r+4>>2]=b+f[r+4>>2],!f[e+156>>2]&2==f[e+152>>2])break k;if(zr(A+100|0,A,0,b),v=v-b|0,t=f[A+108>>2])break u;fi[f[f[A+100>>2]+16>>2]](R,f[A+104>>2],0)}h=v?h:0;break A}f[e+236>>2]=t+f[e+236>>2],(0|(t=f[e+232>>2]))==f[e+224>>2]&&ce(N,1058736),f[e+232>>2]=t+1,b=f[e+228>>2]+(t<<4)|0,t=f[A+104>>2],f[b>>2]=f[A+100>>2],f[b+4>>2]=t,o=b+8|0,t=f[(b=A+108|0)+4>>2],f[o>>2]=f[b>>2],f[o+4>>2]=t,h=v?h:0;break A}Ve(1056268),$f()}Ne(o,12,1056172),$f()}Ve(1056188),$f()}Ve(1056204),$f()}Ve(1056236),$f()}f[A+124>>2]=o;break r}o=f[r+8>>2]}if(!o)break}return f[e+256>>2]=v,i[e+262|0]=h,f[e+252>>2]=g,i[e+261|0]=1&_,fi[f[f[A>>2]+16>>2]](A+12|0,f[A+4>>2],f[A+8>>2]),void(S=A+144|0)}f[A+124>>2]=0}f[A+104>>2]=2,f[A+100>>2]=1058600,f[A+112>>2]=2,f[A+116>>2]=0,f[A+136>>2]=A+124,f[A+140>>2]=3,f[A+128>>2]=A+96,f[A+132>>2]=3,f[A+108>>2]=A+128,Me(A+100|0,1058616),$f()}function K(r,e){var A,a=0,t=0,b=0,k=0,u=0,o=0,c=0,s=0;S=A=S-16|0,o=f[e>>2],b=(a=f[(!f[e+4>>2]&o>>>0<2?68:60)+e>>2]+62|0)<<24|(65280&a)<<8|a>>>8&65280|a>>>24;r:{e:{i:{A:{if(t=f[r+4>>2],f[r+8>>2]-t>>>0>=4)a=f[r>>2]+t|0,i[0|a]=b,i[a+1|0]=b>>>8,i[a+2|0]=b>>>16,i[a+3|0]=b>>>24;else if(or(r,4),a=(t=f[r+4>>2])+f[r>>2]|0,i[0|a]=b,i[a+1|0]=b>>>8,i[a+2|0]=b>>>16,i[a+3|0]=b>>>24,(u=f[r+8>>2]-t|0)>>>0<=3)break A;a=t+4|0,f[r+4>>2]=a,f[r+8>>2]-a>>>0<=3&&(or(r,4),a=f[r+4>>2]),a=f[r>>2]+a|0,i[0|a]=101,i[a+1|0]=109,i[a+2|0]=115,i[a+3|0]=103;f:{n:{a:{if((a=(k=f[r+8>>2])-(b=f[r+4>>2])|0)>>>0>3){if(t=b+4|0,f[r+4>>2]=t,k-t>>>0>=4)a=f[r>>2]+t|0,i[0|a]=1,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0;else if(or(r,4),a=(t=f[r+4>>2])+f[r>>2]|0,i[0|a]=1,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,(u=f[r+8>>2]-t|0)>>>0<=3)break A;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)a=f[r>>2]+t|0,i[0|a]=0,i[a+1|0]=1,i[a+2|0]=95,i[a+3|0]=144;else if(or(r,4),a=(t=f[r+4>>2])+f[r>>2]|0,i[0|a]=0,i[a+1|0]=1,i[a+2|0]=95,i[a+3|0]=144,(u=f[r+8>>2]-t|0)>>>0<=3)break A;if(t=t+4|0,f[r+4>>2]=t,1==f[e+8>>2]){if(c=(a=16711680&(u=f[e+16>>2]))<<24,a=k=a>>>8|0,s=c,c=(k=-16777216&u)>>>24|0,k=s|k<<8,c=a|c|(b=u<<24|(65280&u)<<8),u=-16777216&((255&(a=f[e+20>>2]))<<24|u>>>8)|16711680&((16777215&a)<<8|u>>>24)|a>>>8&65280|a>>>24|k,a=c,f[r+8>>2]-t>>>0>=8)b=f[r>>2]+t|0,i[0|b]=u,i[b+1|0]=u>>>8,i[b+2|0]=u>>>16,i[b+3|0]=u>>>24,i[b+4|0]=a,i[b+5|0]=a>>>8,i[b+6|0]=a>>>16,i[b+7|0]=a>>>24;else if(or(r,8),b=(t=f[r+4>>2])+f[r>>2]|0,i[0|b]=u,i[b+1|0]=u>>>8,i[b+2|0]=u>>>16,i[b+3|0]=u>>>24,i[b+4|0]=a,i[b+5|0]=a>>>8,i[b+6|0]=a>>>16,i[b+7|0]=a>>>24,(a=f[r+8>>2]-t|0)>>>0<=7)break a;if(t=t+8|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)a=f[r>>2]+t|0,i[0|a]=255,i[a+1|0]=255,i[a+2|0]=255,i[a+3|0]=255;else if(or(r,4),a=(t=f[r+4>>2])+f[r>>2]|0,i[0|a]=255,i[a+1|0]=255,i[a+2|0]=255,i[a+3|0]=255,(u=f[r+8>>2]-t|0)>>>0<=3)break A;if(t=t+4|0,f[r+4>>2]=t,f[r+8>>2]-t>>>0>=4)a=f[r>>2]+t|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0;else if(or(r,4),a=(t=f[r+4>>2])+f[r>>2]|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,(u=f[r+8>>2]-t|0)>>>0<=3)break A;if(a=t+4|0,f[r+4>>2]=a,f[r+8>>2]-a>>>0<=28&&(or(r,29),a=f[r+4>>2]),b=n[1051356]|n[1051357]<<8|n[1051358]<<16|n[1051359]<<24,u=f[r>>2]+a|0,a=n[1051352]|n[1051353]<<8|n[1051354]<<16|n[1051355]<<24,i[0|u]=a,i[u+1|0]=a>>>8,i[u+2|0]=a>>>16,i[u+3|0]=a>>>24,i[u+4|0]=b,i[u+5|0]=b>>>8,i[u+6|0]=b>>>16,i[u+7|0]=b>>>24,b=n[1051377]|n[1051378]<<8|n[1051379]<<16|n[1051380]<<24,k=u+21|0,a=n[1051373]|n[1051374]<<8|n[1051375]<<16|n[1051376]<<24,i[0|k]=a,i[k+1|0]=a>>>8,i[k+2|0]=a>>>16,i[k+3|0]=a>>>24,i[k+4|0]=b,i[k+5|0]=b>>>8,i[k+6|0]=b>>>16,i[k+7|0]=b>>>24,b=n[1051372]|n[1051373]<<8|n[1051374]<<16|n[1051375]<<24,k=u+16|0,a=n[1051368]|n[1051369]<<8|n[1051370]<<16|n[1051371]<<24,i[0|k]=a,i[k+1|0]=a>>>8,i[k+2|0]=a>>>16,i[k+3|0]=a>>>24,i[k+4|0]=b,i[k+5|0]=b>>>8,i[k+6|0]=b>>>16,i[k+7|0]=b>>>24,b=n[1051364]|n[1051365]<<8|n[1051366]<<16|n[1051367]<<24,k=u+8|0,a=n[1051360]|n[1051361]<<8|n[1051362]<<16|n[1051363]<<24,i[0|k]=a,i[k+1|0]=a>>>8,i[k+2|0]=a>>>16,i[k+3|0]=a>>>24,i[k+4|0]=b,i[k+5|0]=b>>>8,i[k+6|0]=b>>>16,i[k+7|0]=b>>>24,(a=(k=f[r+8>>2])-(b=f[r+4>>2])|0)>>>0<=28)break n;if(a=b+29|0,f[r+4>>2]=a,(0|a)==(0|k)&&(or(r,1),a=f[r+4>>2]),i[f[r>>2]+a|0]=0,(0|(b=f[r+8>>2]))==(0|(a=f[r+4>>2])))break f;t=a+1|0,f[r+4>>2]=t;t:{b:switch(o-1|0){default:if(!(a=f[e+64>>2]))break t;for(o=a<<4,e=f[e+60>>2]+8|0;;){if(a=f[e-4>>2],(u=b-t|0)>>>0<(k=f[e>>2])>>>0&&(or(r,k),u=(b=f[r+8>>2])-(t=f[r+4>>2])|0),ze(f[r>>2]+t|0,a,k),k>>>0>u>>>0)break e;if(t=t+k|0,f[r+4>>2]=t,e=e+16|0,!(o=o-16|0))break}break t;case 0:if(!(a=f[e+64>>2]))break t;for(o=a<<4,e=f[e+60>>2]+8|0;;){if(a=f[e-4>>2],(u=b-t|0)>>>0<(k=f[e>>2])>>>0&&(or(r,k),u=(b=f[r+8>>2])-(t=f[r+4>>2])|0),ze(f[r>>2]+t|0,a,k),k>>>0>u>>>0)break e;if(t=t+k|0,f[r+4>>2]=t,e=e+16|0,!(o=o-16|0))break}break t;case 1:break b}if(a=f[e+56>>2])for(o=a<<4,e=f[e+52>>2]+8|0;;){if(a=f[e-4>>2],(u=b-t|0)>>>0<(k=f[e>>2])>>>0&&(or(r,k),u=(b=f[r+8>>2])-(t=f[r+4>>2])|0),ze(f[r>>2]+t|0,a,k),k>>>0>u>>>0)break e;if(t=t+k|0,f[r+4>>2]=t,e=e+16|0,!(o=o-16|0))break}}return void(S=A+16|0)}Ve(1055076),$f()}f[A+12>>2]=a;break i}f[A+12>>2]=a,f[A+8>>2]=8;break r}f[A+12>>2]=a,f[A+8>>2]=29;break r}f[A+8>>2]=1,f[A+12>>2]=0;break r}f[A+12>>2]=u}f[A+8>>2]=4;break r}f[A+12>>2]=u,f[A+8>>2]=k}pe(A+8|0),$f()}function q(r,e,A){var n=0,t=0,b=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0;r:{if(402653184&(v=f[r+8>>2])){e:{i:{A:{f:{if(268435456&v){if(t=a[r+14>>1])break f;A=0;break A}if(A>>>0>=16){if((c=(o=e-(t=e+3&-4)|0)+A|0)>>>0>=4){if(l=3&c,!(h=(0|e)==(0|t))){if(o>>>0<=4294967292)for(;n=((((s=n)+(i[0|(n=e+b|0)]>-65)|0)+(i[n+1|0]>-65)|0)+(i[n+2|0]>-65)|0)+(i[n+3|0]>-65)|0,b=b+4|0;);if(!h)for(b=e+b|0;n=(i[0|b]>-65)+n|0,b=b+1|0,o=o+1|0;);}for(l&&(u=i[0|(b=(-4&c)+t|0)]>-65,1!=(0|l)&&(u=(i[b+1|0]>-65)+u|0,2!=(0|l)&&(u=(i[b+2|0]>-65)+u|0))),o=c>>>2|0,u=n+u|0;;){if(c=t,!o)break e;if(h=3&(l=o>>>0>=192?192:o),n=0,o>>>0>=4)for(b=l>>>2<<4;n=(s=(s=(s=(s=n)+(16843009&((-1^(n=f[t>>2]))>>>7|n>>>6))|0)+(16843009&((-1^(n=f[t+4>>2]))>>>7|n>>>6))|0)+(16843009&((-1^(n=f[t+8>>2]))>>>7|n>>>6))|0)+(16843009&((-1^(n=f[t+12>>2]))>>>7|n>>>6))|0,t=t+16|0,b=b-16|0;);if(o=o-l|0,t=c+(l<<2)|0,u=(k((n>>>8&16711935)+(16711935&n)|0,65537)>>>16|0)+u|0,h)break}b=n=16843009&((-1^(n=f[(t=c+((252&l)<<2)|0)>>2]))>>>7|n>>>6),1!=(0|h)&&(b=n=b+(16843009&((-1^(n=f[t+4>>2]))>>>7|n>>>6))|0,2!=(0|h)&&(b=b+(16843009&((-1^(n=f[t+8>>2]))>>>7|n>>>6))|0)),u=(k(((n=b)>>>8&459007)+(16711935&n)|0,65537)>>>16|0)+u|0;break e}for(n=-4&A,b=3&A,t=e;u=((((i[0|t]>-65)+u|0)+(i[t+1|0]>-65)|0)+(i[t+2|0]>-65)|0)+(i[t+3|0]>-65)|0,t=t+4|0,n=n-4|0;);if(!b)break e;for(;u=(i[0|t]>-65)+u|0,t=t+1|0,b=b-1|0;);break e}if(!A){A=0;break e}if(b=3&A,A>>>0>=4)for(c=12&A;u=((((i[0|(t=e+n|0)]>-65)+u|0)+(i[t+1|0]>-65)|0)+(i[t+2|0]>-65)|0)+(i[t+3|0]>-65)|0,(0|c)!=(0|(n=n+4|0)););if(!b)break e;for(t=e+n|0;u=(i[0|t]>-65)+u|0,t=t+1|0,b=b-1|0;);break e}for(o=e+A|0,A=0,n=e,b=t;;){if(u=n,(0|n)==(0|o))break i;if(s=n+1|0,(0|(c=i[0|n]))>=0||(s=n+2|0,c>>>0<4294967264||(s=n+3|0,c>>>0<4294967280||(s=n+4|0))),A=((n=s)-u|0)+A|0,!(b=b-1|0))break}}b=0}u=t-b|0}if(!((n=a[r+12>>1])>>>0<=u>>>0)){b=n-u|0,t=0,u=0;e:{i:switch((v>>>29&3)-1|0){case 0:u=b;break e;case 1:break i;default:break e}u=(65534&b)>>>1|0}for(o=2097151&v,c=f[r+4>>2],r=f[r>>2];;){if((65535&t)>>>0<(65535&u)>>>0){if(n=1,t=t+1|0,!(0|fi[f[c+16>>2]](r,o)))continue;break r}break}if(n=1,0|fi[f[c+12>>2]](r,e,A))break r;for(e=b-u&65535,t=0;;){if(e>>>0<=(65535&t)>>>0)return 0;if(t=t+1|0,0|fi[f[c+16>>2]](r,o))break}break r}}n=0|fi[f[f[r+4>>2]+12>>2]](f[r>>2],e,A)}return n}function $(r){var e,i=0,A=0,n=0,t=0,k=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,G=0,Y=0,W=0,D=0,F=0,T=0,M=0,O=0;S=e=S-16|0,l=f[r+184>>2],i=f[r+168>>2],o=f[r+152>>2];r:{e:{i:{A:{f:{n:{a:{if(k=f[r+136>>2]){if(f[e+12>>2]=f[r+148>>2],t=f[r+144>>2],A=f[r+140>>2],f[e+4>>2]=A,f[e+8>>2]=t,f[e>>2]=k,(0|(c=f[e+8>>2]))<0)break a;if(c){if(!(t=V(c)))break n}else t=1;ze(t,A,c),fi[f[k+16>>2]](e+12|0,A,c)}if(o){if(u=r+156|0,f[e+12>>2]=f[u+8>>2],A=f[u>>2],u=f[u+4>>2],f[e+4>>2]=A,f[e+8>>2]=u,f[e>>2]=o,(0|(k=f[e+8>>2]))<0)break r;if(k){if(!(s=V(k)))break n}else s=1;ze(s,A,k),fi[f[o+16>>2]](e+12|0,A,k)}if(A=0,i){if(n=r+172|0,f[e+12>>2]=f[n+8>>2],u=f[n>>2],n=f[n+4>>2],f[e+4>>2]=u,f[e+8>>2]=n,f[e>>2]=i,(0|(o=f[e+8>>2]))<0)break r;if(o){if(!(n=V(o)))break n}else n=1;ze(n,u,o),fi[f[i+16>>2]](e+12|0,u,o)}if(l){if(i=r+188|0,f[e+12>>2]=f[i+8>>2],u=f[i>>2],i=f[i+4>>2],f[e+4>>2]=u,f[e+8>>2]=i,f[e>>2]=l,(0|(i=f[e+8>>2]))<0)break r;if(i){if(!(A=V(i)))break n}else A=1;ze(A,u,i),fi[f[l+16>>2]](e+12|0,u,i)}if(i=0|R(0|t,0|(t?c:0),0|s,0|(s?k:0),0|n,0|(n?o:0),0|A,0|(A?i:0)),_=a[r+130>>1],I=a[r+128>>1],Q=a[r+126>>1],N=a[r+124>>1],G=i,Y=a[r+122>>1],W=a[r+120>>1],u=f[r+116>>2],s=f[r+112>>2],h=f[r+108>>2],i=f[r+104>>2],n=f[r+100>>2],v=f[r+96>>2],E=f[r+88>>2],A=f[r+80>>2],D=f[r+84>>2],w=f[r+64>>2],F=f[r+40>>2],o=f[r+32>>2],g=f[r+36>>2],T=f[r+24>>2],y=f[r+16>>2],M=f[r+20>>2],O=b[r+8>>3],l=f[r>>2],B=f[r+48>>2]){if(f[e+12>>2]=f[r+60>>2],k=f[r+56>>2],t=f[r+52>>2],f[e+4>>2]=t,f[e+8>>2]=k,f[e>>2]=B,(0|(c=f[e+8>>2]))<0)break r;if(c){if(!(k=V(c)))break n}else k=1;ze(k,t,c),fi[f[B+16>>2]](e+12|0,t,c)}else k=0;if(w){if(r=r+68|0,f[e+12>>2]=f[r+8>>2],t=f[r>>2],r=f[r+4>>2],f[e+4>>2]=t,f[e+8>>2]=r,f[e>>2]=w,(0|(r=f[e+8>>2]))<0)break r;if(r){if(!(d=V(r)))break n}else d=1;ze(d,t,r),fi[f[w+16>>2]](e+12|0,t,r)}if(t=0,y=0|C(0|y,0|M,0|T),g=0|C(0|o,0|g,0|F),o=0,E&&(o=0|C(0|A,0|D,0|E)),A=0,-2147483648!=(0|v)){if(i>>>0>=v>>>0)t=n;else if(i){if(!(t=kr(n,v,1,i)))break n}else{if((t=-8&(A=f[n-4>>2]))>>>0<((A&=3)?4:8)+v>>>0)break f;if(t>>>0>v+39>>>0&&A)break A;nr(n),t=1}A=i}if(i=0,n=0,-2147483648!=(0|h)){if(u>>>0>=h>>>0)i=s;else if(u){if(!(i=kr(s,h,1,u)))break n}else{if((i=-8&(n=f[s-4>>2]))>>>0<((n&=3)?4:8)+h>>>0)break i;if(i>>>0>h+39>>>0&&n)break e;nr(s),i=1}n=u}return r=0|m(0|G,0|p(0|(1&W?Y:16777215),0|(1&N?Q:16777215),0|t,0|A,0|i,0|n,0|k,0|(k?c:0),0|d,0|(d?r:0),0|y,0|g,0|o,0|(1&I?_:16777215),0|l,+(1&l?O:0))),S=e+16|0,r}De(1057036)}$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}De(1057036),$f()}function rr(r,e,A,a,t){var b,k,u,c,s,l,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0,p=0,m=0,G=0,Y=0,W=0,D=0;for(S=k=S-336|0,b=e,u=ri(e=e-1|0,h=-1!=(0|e)?1073741824:1073741823,b,0),c=M,m=b>>>0>=4097?(1<<(e=32-o(1|b)>>>1|0))+(b>>>e|0)>>>1|0:(e=b-(b>>>1|0)|0)>>>0>=64?64:e,s=r-8|0,l=r+16|0,g=1;;){if(Y=0,y=1,W=Q>>>0>>0){E=(_=Q<<3)+r|0;r:{e:if(!((v=b-Q|0)>>>0>>0)){i:if(v>>>0<2)h=v;else{e=f[E+8>>2],y=f[E>>2];A:{f:{n:{a:{if(C=(0|(d=f[E+12>>2]))<(0|(h=f[E+4>>2]))?1:e>>>0>>0&(0|h)>=(0|d)){if(2==(0|v))break n;for(y=_+l|0,h=2;;){if(B=e,e=f[y>>2],w=(0|(w=d))<(0|(d=f[y+4>>2]))?1:(0|d)>=(0|w)&e>>>0>=B>>>0)break a;if(y=y+8|0,(0|v)==(0|(h=h+1|0)))break}}else{if(h=2,2==(0|v))break i;for(y=_+l|0;;){if(B=e,e=f[y>>2],w=(0|(w=d))>(0|(d=f[y+4>>2]))?1:e>>>0>>0&(0|d)<=(0|w))break a;if(y=y+8|0,(0|v)==(0|(h=h+1|0)))break}}h=v}if(h>>>0>>0)break e;if(!C)break i;if(h>>>0>=2)break f;h=1;break i}p=E+16|0,N=0,h=2;break A}if(p=(e=h<<3)+E|0,N=0,1!=(0|(d=h>>>1|0))){for(C=1&d,y=(e+_|0)+s|0,B=2147483646&d,e=E;w=f[y>>2],v=f[y+4>>2],d=f[e+4>>2],f[y>>2]=f[e>>2],f[y+4>>2]=d,f[e>>2]=w,f[e+4>>2]=v,w=f[(R=((536870910^N)<<3)+p|0)>>2],v=f[R+4>>2],d=f[(_=e+8|0)+4>>2],f[R>>2]=f[_>>2],f[R+4>>2]=d,f[_>>2]=w,f[_+4>>2]=v,y=y-16|0,e=e+16|0,(0|B)!=(0|(N=N+2|0)););if(!C)break i}}y=f[(w=E+(N<<3)|0)>>2],d=f[w+4>>2],e=f[(v=(~N<<3)+p|0)+4>>2],f[w>>2]=f[v>>2],f[w+4>>2]=e,f[v>>2]=y,f[v+4>>2]=d}y=h<<1|1;break r}y=(v>>>0>>0?v:m)<<1,t&&(X(E,e=v>>>0>=32?32:v,A,a,0,0),y=e<<1|1)}h=e=Q+(y>>>1|0)|0,d=qe(e=e+Q|0,h=h>>>0>e>>>0,u,c),h=M,v=o(qe(e=Q+(Q-(g>>>1|0)|0)|0,v=Q>>>0>e>>>0,u,c)^d)+32|0,Y=32==(0|(e=o(M^h)))?v:e}r:{e:if(!(I>>>0<2)){for(C=(e=Q<<3)+s|0,D=r+e|0;;){if(n[(_=I-1|0)+(k+270|0)|0]>>0)break e;if((G=(B=(e=f[(k+4|0)+(_<<2)>>2])>>>1|0)+(d=g>>>1|0)|0)>>>0<=a>>>0&!(1&(e|g)))g=G<<1;else{if(h=(Q-G<<3)+r|0,1&e||X(h,B,A,a,o(1|B)<<1^62,0),1&g||X((B<<3)+h|0,d,A,a,o(1|d)<<1^62,0),!(e>>>0<2|g>>>0<2||(w=(e=v=d>>>0>>0)?d:B)>>>0>a>>>0)){g=(B<<3)+h|0,d=e?g:h,I=(e=w<<3)+(d=ze(A,d,e))|0;i:{A:{if(!v){if(!w){e=d;break i}for(e=d;;){if(B=f[g>>2],w=f[e>>2],E=(0|(v=f[g+4>>2]))<(0|(d=f[e+4>>2]))?1:(0|v)<=(0|d)&w>>>0>B>>>0,f[h>>2]=E?B:w,f[h+4>>2]=E?v:d,h=h+8|0,(0|I)==(0|(e=((w>>>0<=B>>>0&(0|v)>=(0|d)|(0|v)>(0|d))<<3)+e|0)))break i;if((0|D)==(0|(g=(E<<3)+g|0)))break}break i}for(e=C;;){if(w=f[(v=N=I-8|0)>>2],E=f[v+4>>2],v=f[(g=p=g-8|0)>>2],I=f[g+4>>2],B=e,B=e,R=(0|(g=E))>(0|(e=I))?1:v>>>0>>0&(0|e)<=(0|g),f[B>>2]=R?w:v,f[B+4>>2]=R?E:I,I=((v>>>0>w>>>0&(0|e)>=(0|g)|(0|e)>(0|g))<<3)+N|0,(0|(g=(((0|e)<=(0|g)&v>>>0<=w>>>0|(0|e)<(0|g))<<3)+p|0))==(0|h))break A;if(e=B-8|0,(0|d)==(0|I))break}}h=g,e=d}ze(h,e,I-e|0)}g=G<<1|1}if(h=1,I=_,!(_>>>0>1))break}break r}h=I}if(i[(k+270|0)+h|0]=Y,f[(k+4|0)+(h<<2)>>2]=g,!W)break;I=h+1|0,Q=(y>>>1|0)+Q|0,g=y}1&g||X(r,b,A,a,o(1|b)<<1^62,0),S=k+336|0}function er(r){var e,A=0,n=0,a=0;S=e=S-16|0;r:{e:{i:{if(n=f[r+4>>2],f[r+8>>2]-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=16;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=16,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0<=3&&(or(r,4),n=f[r+4>>2]),n=f[r>>2]+n|0,i[0|n]=115,i[n+1|0]=116,i[n+2|0]=115,i[n+3|0]=99,(n=(A=f[r+8>>2])-(a=f[r+4>>2])|0)>>>0<=3)break e;if(n=a+4|0,f[r+4>>2]=n,A-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=20;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=20,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0<=3&&(or(r,4),n=f[r+4>>2]),n=f[r>>2]+n|0,i[0|n]=115,i[n+1|0]=116,i[n+2|0]=115,i[n+3|0]=122,(n=(A=f[r+8>>2])-(a=f[r+4>>2])|0)>>>0<=3)break e;if(n=a+4|0,f[r+4>>2]=n,A-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=16;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=16,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0<=3&&(or(r,4),n=f[r+4>>2]),n=f[r>>2]+n|0,i[0|n]=115,i[n+1|0]=116,i[n+2|0]=99,i[n+3|0]=111,(n=(A=f[r+8>>2])-(a=f[r+4>>2])|0)>>>0<=3)break e;if(n=a+4|0,f[r+4>>2]=n,A-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(A=f[r+8>>2]-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)A=f[r>>2]+n|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0;else if(or(r,4),A=(n=f[r+4>>2])+f[r>>2]|0,i[0|A]=0,i[A+1|0]=0,i[A+2|0]=0,i[A+3|0]=0,(A=f[r+8>>2]-n|0)>>>0<=3)break i;return f[r+4>>2]=n+4,void(S=e+16|0)}f[e+12>>2]=A;break r}f[e+12>>2]=n}f[e+8>>2]=4,pe(e+8|0),$f()}function ir(r){var e=0,i=0,A=0,n=0,a=0;r:{e:{if(!(!(A=f[r+4>>2])&2==(0|(e=f[r>>2])))){i=f[r+72>>2],n=f[r+68>>2];i:{A:{if(!(e|A)){if(xr(n,i),!(i=f[r+64>>2]))break i;if((e=-8&(A=f[n-4>>2]))>>>0<(i=k(i,88))+((A&=3)?4:8)>>>0)break r;if(!A|e>>>0<=i+39>>>0)break A;break e}if(Hr(n,i),!(i=f[r+64>>2]))break i;if((e=-8&(A=f[n-4>>2]))>>>0<(i=k(i,104))+((A&=3)?4:8)>>>0)break r;if(A&&e>>>0>i+39>>>0)break e}nr(n)}if(e=f[r+80>>2]){if(i=f[r+84>>2],(n=-8&(A=f[i-4>>2]))>>>0>>0)break r;if(n>>>0>e+39>>>0&&A)break e;nr(i)}}if(!(!f[r+108>>2]&2==f[r+104>>2])){if(jr(e=f[r+164>>2],f[r+168>>2]),i=f[r+160>>2]){if((n=-8&(A=f[e-4>>2]))>>>0<(i=k(i,120))+((A&=3)?4:8)>>>0)break r;if(n>>>0>i+39>>>0&&A)break e;nr(e)}n=f[r+180>>2];i:if(e=f[r+184>>2]){if(i=0,1!=(0|e)){for(A=1&e,a=-2&e,e=n;fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]),fi[f[f[e+16>>2]+16>>2]](e+28|0,f[e+20>>2],f[e+24>>2]),e=e+32|0,(0|a)!=(0|(i=i+2|0)););if(!A)break i}fi[f[f[(e=n+(i<<4)|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}if(i=f[r+176>>2]){if((e=-8&(A=f[n-4>>2]))>>>0<((i<<=4)|((A&=3)?4:8))>>>0)break r;if(e>>>0>i+39>>>0&&A)break e;nr(n)}n=f[r+192>>2];i:if(e=f[r+196>>2]){if(i=0,1!=(0|e)){for(A=1&e,a=-2&e,e=n;fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]),fi[f[f[e+16>>2]+16>>2]](e+28|0,f[e+20>>2],f[e+24>>2]),e=e+32|0,(0|a)!=(0|(i=i+2|0)););if(!A)break i}fi[f[f[(e=n+(i<<4)|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}if(i=f[r+188>>2]){if((e=-8&(A=f[n-4>>2]))>>>0<((i<<=4)|((A&=3)?4:8))>>>0)break r;if(e>>>0>i+39>>>0&&A)break e;nr(n)}if(e=f[r+200>>2]){if(i=f[r+204>>2],(n=-8&(A=f[i-4>>2]))>>>0>>0)break r;if(n>>>0>e+39>>>0&&A)break e;nr(i)}}if(-2147483648!=(0|(e=f[r+240>>2]))&&(gr(n=f[r+244>>2],f[r+248>>2]),e)){if((r=-8&(i=f[n-4>>2]))>>>0<(e=k(e,72))+((i&=3)?4:8)>>>0)break r;if(r>>>0>e+39>>>0&&i)break e;nr(n)}return}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}function Ar(r,e){var A,n=0,a=0,t=0;S=A=S-16|0;r:{e:{i:{A:{f:{n:{if(n=f[r+4>>2],f[r+8>>2]-n>>>0>=4)a=f[r>>2]+n|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=104;else if(or(r,4),a=(n=f[r+4>>2])+f[r>>2]|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=104,(a=f[r+8>>2]-n|0)>>>0<=3)break n;n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0<=3&&(or(r,4),n=f[r+4>>2]),n=f[r>>2]+n|0,i[0|n]=116,i[n+1|0]=107,i[n+2|0]=104,i[n+3|0]=100;a:{t:{if((t=(a=f[r+8>>2])-(n=f[r+4>>2])|0)>>>0>3){if(n=n+4|0,f[r+4>>2]=n,a-n>>>0>=4)a=f[r>>2]+n|0,i[0|a]=1,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=15;else if(or(r,4),a=(n=f[r+4>>2])+f[r>>2]|0,i[0|a]=1,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=15,(a=f[r+8>>2]-n|0)>>>0<=3)break n;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=8)a=f[r>>2]+n|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,i[a+4|0]=0,i[a+5|0]=0,i[a+6|0]=0,i[a+7|0]=0;else if(or(r,8),a=(n=f[r+4>>2])+f[r>>2]|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,i[a+4|0]=0,i[a+5|0]=0,i[a+6|0]=0,i[a+7|0]=0,(a=f[r+8>>2]-n|0)>>>0<=7)break i;if(n=n+8|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=8)a=f[r>>2]+n|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,i[a+4|0]=0,i[a+5|0]=0,i[a+6|0]=0,i[a+7|0]=0;else if(or(r,8),a=(n=f[r+4>>2])+f[r>>2]|0,i[0|a]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,i[a+4|0]=0,i[a+5|0]=0,i[a+6|0]=0,i[a+7|0]=0,(a=f[r+8>>2]-n|0)>>>0<=7)break i;if(n=n+8|0,f[r+4>>2]=n,e<<=24,f[r+8>>2]-n>>>0>=4)a=f[r>>2]+n|0,i[0|a]=e,i[a+1|0]=e>>>8,i[a+2|0]=e>>>16,i[a+3|0]=e>>>24;else if(or(r,4),a=(n=f[r+4>>2])+f[r>>2]|0,i[0|a]=e,i[a+1|0]=e>>>8,i[a+2|0]=e>>>16,i[a+3|0]=e>>>24,(e=f[r+8>>2]-n|0)>>>0<=3)break f;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)e=f[r>>2]+n|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(e=f[r+8>>2]-n|0)>>>0<=3)break f;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=8)e=f[r>>2]+n|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,i[e+4|0]=0,i[e+5|0]=0,i[e+6|0]=0,i[e+7|0]=0;else if(or(r,8),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,i[e+4|0]=0,i[e+5|0]=0,i[e+6|0]=0,i[e+7|0]=0,(e=f[r+8>>2]-n|0)>>>0<=7)break t;if(n=n+8|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)e=f[r>>2]+n|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(e=f[r+8>>2]-n|0)>>>0<=3)break f;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=4)e=f[r>>2]+n|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(e=f[r+8>>2]-n|0)>>>0<=3)break f;if(n=n+4|0,f[r+4>>2]=n,f[r+8>>2]-n>>>0>=2)e=f[r>>2]+n|0,i[0|e]=0,i[e+1|0]=0;else if(or(r,2),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,(e=f[r+8>>2]-n|0)>>>0<=1)break a;return f[r+4>>2]=n+2,void(S=A+16|0)}f[A+12>>2]=t;break A}f[A+12>>2]=e;break e}f[A+12>>2]=e,f[A+8>>2]=2;break r}f[A+12>>2]=a;break A}f[A+12>>2]=e}f[A+8>>2]=4;break r}f[A+12>>2]=a}f[A+8>>2]=8}pe(A+8|0),$f()}function fr(r,e){var A,n=0,a=0,t=0,b=0;S=A=S-16|0;r:{e:{i:{A:{f:{if((a=f[r+8>>2])-(n=f[r+4>>2])>>>0>=4)b=f[r>>2],i[0|(t=b+n|0)]=0,i[t+1|0]=0,i[t+2|0]=0,i[t+3|0]=44;else if(or(r,4),n=f[r+4>>2],b=f[r>>2],i[0|(a=n+b|0)]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=44,(t=(a=f[r+8>>2])-n|0)>>>0<=3)break f;n=n+4|0,f[r+4>>2]=n,a-n>>>0<=3&&(or(r,4),b=f[r>>2],n=f[r+4>>2]),i[0|(n=n+b|0)]=109,i[n+1|0]=100,i[n+2|0]=104,i[n+3|0]=100;n:{a:{t:{b:{k:{u:{if((b=(n=f[r+8>>2])-(a=f[r+4>>2])|0)>>>0>3){if(a=a+4|0,f[r+4>>2]=a,n-a>>>0>=4)b=f[r>>2],i[0|(t=b+a|0)]=1,i[t+1|0]=0,i[t+2|0]=0,i[t+3|0]=0;else if(or(r,4),a=f[r+4>>2],b=f[r>>2],i[0|(n=a+b|0)]=1,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0,(t=(n=f[r+8>>2])-a|0)>>>0<=3)break f;if(a=a+4|0,f[r+4>>2]=a,n-a>>>0>=8)i[0|(t=a+b|0)]=0,i[t+1|0]=0,i[t+2|0]=0,i[t+3|0]=0,i[t+4|0]=0,i[t+5|0]=0,i[t+6|0]=0,i[t+7|0]=0;else if(or(r,8),a=f[r+4>>2],b=f[r>>2],i[0|(n=a+b|0)]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0,i[n+4|0]=0,i[n+5|0]=0,i[n+6|0]=0,i[n+7|0]=0,(t=(n=f[r+8>>2])-a|0)>>>0<=7)break u;if(a=a+8|0,f[r+4>>2]=a,n-a>>>0>=8)i[0|(n=a+b|0)]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0,i[n+4|0]=0,i[n+5|0]=0,i[n+6|0]=0,i[n+7|0]=0,n=f[r+8>>2];else if(or(r,8),n=(a=f[r+4>>2])+f[r>>2]|0,i[0|n]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0,i[n+4|0]=0,i[n+5|0]=0,i[n+6|0]=0,i[n+7|0]=0,(b=(n=f[r+8>>2])-a|0)>>>0<=7)break k;if(a=a+8|0,f[r+4>>2]=a,e=e<<24|(65280&e)<<8|e>>>8&65280|e>>>24,n-a>>>0>=4)b=f[r>>2],i[0|(t=b+a|0)]=e,i[t+1|0]=e>>>8,i[t+2|0]=e>>>16,i[t+3|0]=e>>>24;else if(or(r,4),a=f[r+4>>2],b=f[r>>2],i[0|(n=a+b|0)]=e,i[n+1|0]=e>>>8,i[n+2|0]=e>>>16,i[n+3|0]=e>>>24,(e=(n=f[r+8>>2])-a|0)>>>0<=3)break b;if(e=a+4|0,f[r+4>>2]=e,n-e>>>0>=8)i[0|(a=e+b|0)]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,i[a+4|0]=0,i[a+5|0]=0,i[a+6|0]=0,i[a+7|0]=0;else if(or(r,8),e=f[r+4>>2],b=f[r>>2],i[0|(n=e+b|0)]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0,i[n+4|0]=0,i[n+5|0]=0,i[n+6|0]=0,i[n+7|0]=0,(a=(n=f[r+8>>2])-e|0)>>>0<=7)break t;if(e=e+8|0,f[r+4>>2]=e,n-e>>>0<=1&&(or(r,2),b=f[r>>2],e=f[r+4>>2]),i[0|(e=e+b|0)]=85,i[e+1|0]=196,(a=(e=f[r+8>>2])-(n=f[r+4>>2])|0)>>>0<=1)break a;if(n=n+2|0,f[r+4>>2]=n,e-n>>>0>=2)e=f[r>>2]+n|0,i[0|e]=0,i[e+1|0]=0;else if(or(r,2),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,(e=f[r+8>>2]-n|0)>>>0<=1)break n;return f[r+4>>2]=n+2,void(S=A+16|0)}f[A+12>>2]=b;break A}f[A+12>>2]=t;break i}f[A+12>>2]=b;break i}f[A+12>>2]=e;break A}f[A+12>>2]=a;break i}f[A+12>>2]=a;break e}f[A+12>>2]=e;break e}f[A+12>>2]=t}f[A+8>>2]=4;break r}f[A+8>>2]=8;break r}f[A+8>>2]=2}pe(A+8|0),$f()}function nr(r){var e=0,i=0,A=0,n=0,a=0;i=(e=r-8|0)+(r=-8&(A=f[r-4>>2]))|0;r:{e:if(!(1&A)){if(!(2&A))break r;if(r=(A=f[e>>2])+r|0,(0|(e=e-A|0))==f[264982]){if(3&~(A=f[i+4>>2]))break e;return f[264980]=r,f[i+4>>2]=-2&A,f[e+4>>2]=1|r,void(f[i>>2]=r)}Ur(e,A)}e:{i:{A:{f:{n:{a:{t:{if(!(2&(A=f[i+4>>2]))){if((0|i)==f[264983])break a;if((0|i)==f[264982])break n;if(Ur(n=i,i=-8&A),r=r+i|0,f[e+4>>2]=1|r,f[r+e>>2]=r,f[264982]!=(0|e))break t;return void(f[264980]=r)}f[i+4>>2]=-2&A,f[e+4>>2]=1|r,f[r+e>>2]=r}if(r>>>0<256)break f;if(i=31,f[e+16>>2]=0,f[e+20>>2]=0,r>>>0<=16777215&&(i=62+((r>>>6-(i=o(r>>>8|0))&1)-(i<<1)|0)|0),f[e+28>>2]=i,A=1059504+(i<<2)|0,(n=1<>2]=e,f[e+24>>2]=A,f[e+12>>2]=e,f[e+8>>2]=e,f[264979]=n|f[264979];break i}if(f[264983]=e,r=f[264981]+r|0,f[264981]=r,f[e+4>>2]=1|r,f[264982]==(0|e)&&(f[264980]=0,f[264982]=0),r>>>0<=t[264986])break r;if(r>>>0<41)break e;for(r=1059632;;){if((i=f[r>>2])>>>0<=e>>>0&i+f[r+4>>2]>>>0>e>>>0)break e;r=f[r+8>>2]}}return f[264982]=e,r=f[264980]+r|0,f[264980]=r,f[e+4>>2]=1|r,void(f[r+e>>2]=r)}return i=1059648+(248&r)|0,(A=f[264978])&(r=1<<(r>>>3))?r=f[i+8>>2]:(f[264978]=r|A,r=i),f[i+8>>2]=e,f[r+12>>2]=e,f[e+12>>2]=i,void(f[e+8>>2]=r)}A:{if(A=f[A>>2],(-8&f[A+4>>2])!=(0|r))for(n=r<<(31!=(0|i)?25-(i>>>1|0)|0:0);;){if(!(i=f[(a=(n>>>29&4)+A|0)+16>>2]))break A;if(n<<=1,A=i,(-8&f[i+4>>2])==(0|r))break}else i=A;r=f[i+8>>2],f[r+12>>2]=e,f[i+8>>2]=e,f[e+24>>2]=0,f[e+12>>2]=i,f[e+8>>2]=r;break i}f[a+16>>2]=e,f[e+24>>2]=A,f[e+12>>2]=e,f[e+8>>2]=e}if(e=0,r=f[264988]-1|0,f[264988]=r,r)break r;if(r=f[264910])for(;e=e+1|0,r=f[r+8>>2];);return void(f[264988]=e>>>0<=4095?4095:e)}if(e=0,r=f[264910])for(;e=e+1|0,r=f[r+8>>2];);f[264986]=-1,f[264988]=e>>>0<=4095?4095:e}}function ar(r,e){var t,b=0,k=0,u=0,c=0,s=0,l=0,h=0;S=t=S-112|0,f[t+24>>2]=0,f[t+8>>2]=0;r:{e:{i:{A:{if(2!=f[e+104>>2]|f[e+108>>2]){if(l=(c=f[e+208>>2]+(a[e+212>>1]&&1&A[e+216>>1]?126:110)|0)+517|0,f[t+40>>2]=l,(0|(u=c+549|0))<0)break A;if(b=1,!(k=V(u)))break A;if(f[t+52>>2]=k,f[t+60>>2]=u,f[t+64>>2]=c>>>0>130522?29:129-(o(u>>>10|0)<<2)|0,b=n[1054660]|n[1054661]<<8|n[1054662]<<16|n[1054663]<<24,u=k+8|0,c=n[1054656]|n[1054657]<<8|n[1054658]<<16|n[1054659]<<24,i[0|u]=c,i[u+1|0]=c>>>8,i[u+2|0]=c>>>16,i[u+3|0]=c>>>24,i[u+4|0]=b,i[u+5|0]=b>>>8,i[u+6|0]=b>>>16,i[u+7|0]=b>>>24,u=n[1054652]|n[1054653]<<8|n[1054654]<<16|n[1054655]<<24,b=n[1054648]|n[1054649]<<8|n[1054650]<<16|n[1054651]<<24,i[0|k]=b,i[k+1|0]=b>>>8,i[k+2|0]=b>>>16,i[k+3|0]=b>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,b=n[1054668]|n[1054669]<<8|n[1054670]<<16|n[1054671]<<24,u=k+16|0,c=n[1054664]|n[1054665]<<8|n[1054666]<<16|n[1054667]<<24,i[0|u]=c,i[u+1|0]=c>>>8,i[u+2|0]=c>>>16,i[u+3|0]=c>>>24,i[u+4|0]=b,i[u+5|0]=b>>>8,i[u+6|0]=b>>>16,i[u+7|0]=b>>>24,u=n[1054676]|n[1054677]<<8|n[1054678]<<16|n[1054679]<<24,k=k+24|0,b=n[1054672]|n[1054673]<<8|n[1054674]<<16|n[1054675]<<24,i[0|k]=b,i[k+1|0]=b>>>8,i[k+2|0]=b>>>16,i[k+3|0]=b>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,f[t+56>>2]=32,O(t+52|0,e+104|0,0,l),k=f[t+56>>2]-32|0,f[t+44>>2]=k,(0|k)!=(0|l))break i;b=f[(u=t+60|0)+4>>2],f[(k=t+80|0)>>2]=f[u>>2],f[k+4>>2]=b,k=f[t+56>>2],f[t+72>>2]=f[t+52>>2],f[t+76>>2]=k,Lr(t+96|0,t+72|0),(k=f[t+8>>2])&&fi[f[k+16>>2]](t+20|0,f[t+12>>2],f[t+16>>2]),b=f[(u=t+104|0)+4>>2],f[(k=t+16|0)>>2]=f[u>>2],f[k+4>>2]=b,k=f[t+100>>2],f[t+8>>2]=f[t+96>>2],f[t+12>>2]=k}if(2!=f[e>>2]|f[e+4>>2]){h=(k=f[e+88>>2])+577|0,f[t+48>>2]=h;f:{n:{a:{if((0|(u=k+609|0))>=0){if(!u){f[t+60>>2]=0,f[t+64>>2]=1,f[t+52>>2]=1,f[t+56>>2]=0;break n}if(b=V(u))break a;r=1}else r=0;Ze(r,1058752),$f()}if(f[t+56>>2]=0,f[t+52>>2]=b,f[t+60>>2]=u,f[t+64>>2]=u>>>0>131071?29:129-(o(u>>>10|0)<<2)|0,k=0,u>>>0>31)break f}or(t+52|0,32),u=f[t+60>>2],b=f[t+52>>2],k=f[t+56>>2]}if(c=n[1054652]|n[1054653]<<8|n[1054654]<<16|n[1054655]<<24,b=l=b+k|0,s=n[1054648]|n[1054649]<<8|n[1054650]<<16|n[1054651]<<24,i[0|b]=s,i[b+1|0]=s>>>8,i[b+2|0]=s>>>16,i[b+3|0]=s>>>24,i[b+4|0]=c,i[b+5|0]=c>>>8,i[b+6|0]=c>>>16,i[b+7|0]=c>>>24,c=n[1054676]|n[1054677]<<8|n[1054678]<<16|n[1054679]<<24,b=b+24|0,s=n[1054672]|n[1054673]<<8|n[1054674]<<16|n[1054675]<<24,i[0|b]=s,i[b+1|0]=s>>>8,i[b+2|0]=s>>>16,i[b+3|0]=s>>>24,i[b+4|0]=c,i[b+5|0]=c>>>8,i[b+6|0]=c>>>16,i[b+7|0]=c>>>24,c=n[1054668]|n[1054669]<<8|n[1054670]<<16|n[1054671]<<24,b=l+16|0,s=n[1054664]|n[1054665]<<8|n[1054666]<<16|n[1054667]<<24,i[0|b]=s,i[b+1|0]=s>>>8,i[b+2|0]=s>>>16,i[b+3|0]=s>>>24,i[b+4|0]=c,i[b+5|0]=c>>>8,i[b+6|0]=c>>>16,i[b+7|0]=c>>>24,c=n[1054660]|n[1054661]<<8|n[1054662]<<16|n[1054663]<<24,b=l+8|0,l=n[1054656]|n[1054657]<<8|n[1054658]<<16|n[1054659]<<24,i[0|b]=l,i[b+1|0]=l>>>8,i[b+2|0]=l>>>16,i[b+3|0]=l>>>24,i[b+4|0]=c,i[b+5|0]=c>>>8,i[b+6|0]=c>>>16,i[b+7|0]=c>>>24,(u=u-k|0)>>>0<=31)break e;if(k=k+32|0,f[t+56>>2]=k,O(t+52|0,0,e,h),e=f[t+56>>2]-k|0,f[t+68>>2]=e,(0|e)!=(0|h))break r;u=f[(k=t+60|0)+4>>2],f[(e=t+80|0)>>2]=f[k>>2],f[e+4>>2]=u,e=f[t+56>>2],f[t+72>>2]=f[t+52>>2],f[t+76>>2]=e,Lr(t+96|0,t+72|0),(e=f[t+24>>2])&&fi[f[e+16>>2]](t+36|0,f[t+28>>2],f[t+32>>2]),k=f[t+100>>2],f[(e=t+24|0)>>2]=f[t+96>>2],f[e+4>>2]=k,u=f[(k=t+104|0)+4>>2],f[(e=e+8|0)>>2]=f[k>>2],f[e+4>>2]=u}return e=f[t+12>>2],f[r+4>>2]=f[t+8>>2],f[r+8>>2]=e,f[r>>2]=0,u=f[(k=t+32|0)+4>>2],f[(e=r+28|0)>>2]=f[k>>2],f[e+4>>2]=u,u=f[(k=t+24|0)+4>>2],f[(e=r+20|0)>>2]=f[k>>2],f[e+4>>2]=u,k=f[(e=t+16|0)+4>>2],f[(r=r+12|0)>>2]=f[e>>2],f[r+4>>2]=k,void(S=t+112|0)}Ze(b,1058752),$f()}f[t+84>>2]=0,f[t+88>>2]=0,f[t+76>>2]=1,f[t+80>>2]=4,f[t+72>>2]=1054700,Se(t+44|0,t+40|0,t+72|0,1054708),$f()}f[t+76>>2]=u,f[t+72>>2]=32,pe(t+72|0),$f()}f[t+84>>2]=0,f[t+88>>2]=0,f[t+76>>2]=1,f[t+80>>2]=4,f[t+72>>2]=1054700,Se(t+68|0,t+48|0,t+72|0,1054724),$f()}function tr(r,e,A,n){var a,t=0,b=0,u=0,o=0,c=0,s=0;S=a=S-16|0,b=n<<24|(65280&n)<<8|n>>>8&65280|n>>>24;r:{e:{i:{A:{f:{n:{if((u=f[r+8>>2])-(n=f[r+4>>2])>>>0>=4)t=f[r>>2],i[0|(o=t+n|0)]=b,i[o+1|0]=b>>>8,i[o+2|0]=b>>>16,i[o+3|0]=b>>>24;else if(or(r,4),n=f[r+4>>2],t=f[r>>2],i[0|(u=n+t|0)]=b,i[u+1|0]=b>>>8,i[u+2|0]=b>>>16,i[u+3|0]=b>>>24,(b=(u=f[r+8>>2])-n|0)>>>0<=3)break n;if(n=n+4|0,f[r+4>>2]=n,u-n>>>0<=3&&(or(r,4),t=f[r>>2],n=f[r+4>>2]),i[0|(n=n+t|0)]=109,i[n+1|0]=100,i[n+2|0]=97,i[n+3|0]=116,(t=(u=f[r+8>>2])-(n=f[r+4>>2])|0)>>>0<=3)break f;if(n=n+4|0,f[r+4>>2]=n,e&&(t=f[e+64>>2]))for(c=(e=f[e+60>>2])+k(t,120)|0;;){if(t=f[e+112>>2])for(b=t<<4,t=f[e+108>>2]+8|0;;){if(s=f[t-4>>2],(o=f[t>>2])>>>0>u-n>>>0&&(or(r,o),u=f[r+8>>2],n=f[r+4>>2]),ze(f[r>>2]+n|0,s,o),(s=u-n|0)>>>0>>0)break A;if(n=n+o|0,f[r+4>>2]=n,t=t+16|0,!(b=b-16|0))break}if((0|c)==(0|(e=e+120|0)))break}a:if(A)if(t=f[A+72>>2],e=f[A+68>>2],f[A>>2]){if(!t)break a;for(c=k(t,104)+e|0;;){if(A=f[e+96>>2])for(b=A<<4,t=f[e+92>>2]+8|0;;){if(o=f[t-4>>2],(A=f[t>>2])>>>0>u-n>>>0&&(or(r,A),u=f[r+8>>2],n=f[r+4>>2]),ze(f[r>>2]+n|0,o,A),(o=u-n|0)>>>0>>0)break e;if(n=A+n|0,f[r+4>>2]=n,t=t+16|0,!(b=b-16|0))break}if((0|c)==(0|(e=e+104|0)))break}}else if(t)for(c=k(t,88)+e|0;;){if(A=f[e+80>>2])for(b=A<<4,t=f[e+76>>2]+8|0;;){if(o=f[t-4>>2],(A=f[t>>2])>>>0>u-n>>>0&&(or(r,A),u=f[r+8>>2],n=f[r+4>>2]),ze(f[r>>2]+n|0,o,A),(o=u-n|0)>>>0>>0)break e;if(n=A+n|0,f[r+4>>2]=n,t=t+16|0,!(b=b-16|0))break}if((0|c)==(0|(e=e+88|0)))break}return void(S=a+16|0)}f[a+12>>2]=b;break i}f[a+12>>2]=t;break i}f[a+12>>2]=s,f[a+8>>2]=o;break r}f[a+8>>2]=4;break r}f[a+12>>2]=o,f[a+8>>2]=A}pe(a+8|0),$f()}function br(r,e){var A,n=0,a=0,t=0,b=0;S=A=S-16|0;r:{e:{i:{if((n=f[r+8>>2])-(a=f[r+4>>2])>>>0>=4)t=f[r>>2],i[0|(b=t+a|0)]=0,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=32;else if(or(r,4),a=f[r+4>>2],t=f[r>>2],i[0|(n=a+t|0)]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=32,(b=(n=f[r+8>>2])-a|0)>>>0<=3)break i;if(a=a+4|0,f[r+4>>2]=a,n-a>>>0<=3&&(or(r,4),t=f[r>>2],a=f[r+4>>2]),i[0|(a=a+t|0)]=116,i[a+1|0]=114,i[a+2|0]=101,i[a+3|0]=120,(t=(a=f[r+8>>2])-(n=f[r+4>>2])|0)>>>0>3){if(n=n+4|0,f[r+4>>2]=n,a-n>>>0>=4)t=f[r>>2],i[0|(b=t+n|0)]=0,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=0;else if(or(r,4),n=f[r+4>>2],t=f[r>>2],i[0|(a=n+t|0)]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0,(b=(a=f[r+8>>2])-n|0)>>>0<=3)break i;if(n=n+4|0,f[r+4>>2]=n,e<<=24,a-n>>>0>=4)i[0|(b=n+t|0)]=e,i[b+1|0]=e>>>8,i[b+2|0]=e>>>16,i[b+3|0]=e>>>24;else if(or(r,4),n=f[r+4>>2],t=f[r>>2],i[0|(a=n+t|0)]=e,i[a+1|0]=e>>>8,i[a+2|0]=e>>>16,i[a+3|0]=e>>>24,(e=(a=f[r+8>>2])-n|0)>>>0<=3)break e;if(n=n+4|0,f[r+4>>2]=n,a-n>>>0>=4)i[0|(e=n+t|0)]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=1,a=f[r+8>>2];else if(or(r,4),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=1,(e=(a=f[r+8>>2])-n|0)>>>0<=3)break e;if(n=n+4|0,f[r+4>>2]=n,a-n>>>0>=4)t=f[r>>2],i[0|(e=t+n|0)]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),n=f[r+4>>2],t=f[r>>2],i[0|(e=n+t|0)]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(e=(a=f[r+8>>2])-n|0)>>>0<=3)break e;if(n=n+4|0,f[r+4>>2]=n,a-n>>>0>=4)i[0|(e=n+t|0)]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),n=f[r+4>>2],t=f[r>>2],i[0|(e=n+t|0)]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(e=(a=f[r+8>>2])-n|0)>>>0<=3)break e;if(n=n+4|0,f[r+4>>2]=n,a-n>>>0>=4)i[0|(e=n+t|0)]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0;else if(or(r,4),e=(n=f[r+4>>2])+f[r>>2]|0,i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0,(e=f[r+8>>2]-n|0)>>>0<=3)break e;return f[r+4>>2]=n+4,void(S=A+16|0)}f[A+12>>2]=t;break r}f[A+12>>2]=b;break r}f[A+12>>2]=e}f[A+8>>2]=4,pe(A+8|0),$f()}function kr(r,e,i,A){var n=0,a=0,t=0,b=0,k=0;r:{e:{i:{A:{f:{if((n=-8&(b=f[(a=r-4|0)>>2]))>>>0>=((t=3&b)?4:8)+e>>>0){if((k=e+39|0)>>>0>>0&&t)break f;n:{a:{if(i>>>0>=9){if(i=Or(i,A))break a;return 0}if(i=0,A>>>0>4294901708)break n;e=A>>>0<11?16:A+11&-8;t:{if(!t){if(e>>>0<256|n>>>0<(4|e)>>>0|n-e>>>0>=131073)break t;break r}k=(t=r-8|0)+n|0;b:{k:{u:{o:{if(e>>>0>n>>>0){if((0|k)==f[264983])break b;if((0|k)==f[264982])break u;if(2&(b=f[k+4>>2]))break t;if((n=(b&=-8)+n|0)>>>0>>0)break t;if(Ur(k,b),(i=n-e|0)>>>0<16)break o;f[a>>2]=e|1&f[a>>2]|2,f[(e=e+t|0)+4>>2]=3|i,f[(A=n+t|0)+4>>2]=1|f[A+4>>2],vr(e,i);break r}if((i=n-e|0)>>>0>15)break k;break r}f[a>>2]=n|1&f[a>>2]|2,f[(e=n+t|0)+4>>2]=1|f[e+4>>2];break r}if((n=n+f[264980]|0)>>>0>>0)break t;(A=n-e|0)>>>0<=15?(f[a>>2]=n|1&b|2,f[(e=n+t|0)+4>>2]=1|f[e+4>>2],A=0,e=0):(f[a>>2]=e|1&b|2,f[(e=e+t|0)+4>>2]=1|A,f[(i=n+t|0)>>2]=A,f[i+4>>2]=-2&f[i+4>>2]),f[264982]=e,f[264980]=A;break r}f[a>>2]=e|1&b|2,f[(e=e+t|0)+4>>2]=3|i,f[k+4>>2]=1|f[k+4>>2],vr(e,i);break r}if((n=n+f[264981]|0)>>>0>e>>>0)break e}if(!(e=V(A)))break n;return e=ze(i=e,r,(e=(3&(e=f[a>>2])?-4:-8)+(-8&e)|0)>>>0>A>>>0?A:e),nr(r),e}if(ze(i,r,e>>>0>A>>>0?A:e),(A=-8&(a=f[a>>2]))>>>0<(n=e)+((e=3&a)?4:8)>>>0)break A;if(A>>>0>k>>>0&&e)break i;nr(r)}return i}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}return f[a>>2]=e|1&b|2,i=e+t|0,f[264983]=i,e=n-e|0,f[264981]=e,f[i+4>>2]=1|e,r}return r}function ur(r,e,i){var A,n,a,t=0,b=0,k=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0;k=f[r+8>>2],b=f[r>>2],h=l=((c=(0|(u=s=f[r+12>>2]))<(0|(t=f[r+4>>2]))?1:b>>>0>k>>>0&(0|t)>=(0|u))<<3)+r|0,u=f[r+24>>2],o=f[r+16>>2],c=f[r+28>>2],d=f[r+20>>2],o=f[(u=((d=(0|c)<(0|d)?1:u>>>0>>0&(0|c)<=(0|d))?24:16)+r|0)>>2],c=f[l>>2],v=h,h=(((0|t)<=(0|s)&b>>>0<=k>>>0|(0|t)<(0|s))<<3)+r|0,b=f[(k=d=(d?16:24)+r|0)>>2],s=f[h>>2],w=(g=(0|(k=f[k+4>>2]))<(0|(t=f[h+4>>2]))?1:b>>>0>>0&(0|t)>=(0|k))?u:h,k=o,b=c,s=y=f[u+4>>2],B=f[l+4>>2],b=f[(k=v=(s=(0|s)<(0|(t=B))?1:b>>>0>k>>>0&(0|t)>=(0|s))?v:w)>>2],t=f[k+4>>2],u=f[(k=w=g?d:s?h:u)>>2],l=f[k+4>>2],k=s?o:c,f[i>>2]=k,s=s?y:B,f[i+4>>2]=s,y=i,u=f[(b=(i=b>>>0>u>>>0&(0|t)>=(0|l)|(0|t)>(0|l))?w:v)+4>>2],f[y+8>>2]=f[b>>2],f[y+12>>2]=u,b=f[(i=i?v:w)+4>>2],f[y+16>>2]=f[i>>2],f[y+20>>2]=b,i=f[(b=g?h:d)>>2],l=b=f[b+4>>2],f[(u=A=y+24|0)>>2]=i,f[u+4>>2]=b,b=f[r+40>>2],u=f[r+32>>2],g=c=(v=r+32|0)+((c=(0|(t=f[r+44>>2]))<(0|(o=f[r+36>>2]))?1:b>>>0>>0&(0|t)<=(0|o))<<3)|0,h=f[r+56>>2],d=f[r+48>>2],w=f[r+60>>2],r=f[r+52>>2],h=f[(r=((w=(0|w)<(0|r)?1:h>>>0>>0&(0|r)>=(0|w))?24:16)+v|0)>>2],d=f[c>>2],B=g,g=(((0|t)>=(0|o)&b>>>0>=u>>>0|(0|t)>(0|o))<<3)+v|0,u=f[(b=v=v+(w?16:24)|0)>>2],t=f[g>>2],E=(w=(0|(b=f[b+4>>2]))<(0|(o=f[g+4>>2]))?1:(0|b)<=(0|o)&t>>>0>u>>>0)?r:g,b=h,u=d,t=n=f[r+4>>2],a=f[c+4>>2],t=f[(b=B=(u=(0|t)<(0|(o=a))?1:b>>>0>>0&(0|t)<=(0|o))?B:E)>>2],o=f[b+4>>2],r=f[(b=E=w?v:u?g:r)>>2],c=f[b+4>>2],b=u?h:d,f[(h=d=y+32|0)>>2]=b,u=u?n:a,f[h+4>>2]=u,o=f[(t=(r=r>>>0>>0&(0|o)>=(0|c)|(0|o)>(0|c))?E:B)+4>>2],f[(h=y+40|0)>>2]=f[t>>2],f[h+4>>2]=o,o=f[(r=r?B:E)+4>>2],f[(t=y+48|0)>>2]=f[r>>2],f[t+4>>2]=o,r=f[(t=w?g:v)>>2],t=f[t+4>>2],f[(o=g=y+56|0)>>2]=r,f[o+4>>2]=t,o=v=b>>>0>>0&(0|u)<=(0|s)|(0|u)<(0|s),f[e>>2]=o?b:k,f[e+4>>2]=o?u:s,c=i,h=r,r=i>>>0>>0&(0|t)>=(0|l)|(0|t)>(0|l),f[(o=e)+56>>2]=r?h:i,f[o+60>>2]=r?t:l,i=f[(r=v=(v<<3)+d|0)>>2],d=r=f[r+4>>2],B=i,r=f[(k=y=(((0|u)>=(0|s)&b>>>0>=k>>>0|(0|u)>(0|s))<<3)+y|0)>>2],b=i,u=k=f[k+4>>2],i=w=(0|k)>(0|(s=d))?1:r>>>0>b>>>0&(0|u)>=(0|s),f[o+8>>2]=i?B:r,f[o+12>>2]=i?d:k,i=f[(k=g=(c>>>0<=h>>>0&(0|t)>=(0|l)|(0|t)>(0|l)?-8:0)+g|0)>>2],o=k=f[k+4>>2],k=f[(t=B=((0|t)<=(0|l)&c>>>0>h>>>0|(0|t)<(0|l)?-8:0)+A|0)>>2],l=t=f[t+4>>2],i=(t=i)>>>0>k>>>0&(0|o)>=(0|l)|(0|o)>(0|l),f[(c=e)+48>>2]=i?t:k,f[c+52>>2]=i?o:l,i=f[(c=d=v+(w<<3)|0)>>2],c=f[c+4>>2],r=f[(b=y=(((0|u)<=(0|s)&r>>>0<=b>>>0|(0|u)<(0|s))<<3)+y|0)>>2],u=b=f[b+4>>2],b=i,s=c,i=v=(0|c)<(0|u)?1:r>>>0>b>>>0&(0|u)>=(0|s),f[(h=e)+16>>2]=i?b:r,f[h+20>>2]=i?c:u,i=f[(c=g=((0|o)>=(0|l)&t>>>0>=k>>>0|(0|o)>(0|l)?-8:0)+g|0)>>2],c=f[c+4>>2],k=f[(t=w=(t>>>0>>0&(0|o)<=(0|l)|(0|o)<(0|l)?-8:0)+B|0)>>2],l=t=f[t+4>>2],t=i,i=(0|(o=c))>(0|l)?1:t>>>0>k>>>0&(0|o)>=(0|l),f[e+40>>2]=i?t:k,f[h+44>>2]=i?c:l,i=f[(c=d=d+(v<<3)|0)>>2],c=f[c+4>>2],r=f[(b=y=(((0|u)<=(0|s)&r>>>0<=b>>>0|(0|u)<(0|s))<<3)+y|0)>>2],u=b=f[b+4>>2],b=i,s=c,i=v=(0|c)<(0|u)?1:r>>>0>b>>>0&(0|u)>=(0|s),f[e+24>>2]=i?b:r,f[h+28>>2]=i?c:u,i=e,e=f[(c=h=((0|o)>=(0|l)&t>>>0>=k>>>0|(0|o)>(0|l)?-8:0)+g|0)>>2],c=f[c+4>>2],o=(t>>>0>>0&(0|o)<=(0|l)|(0|o)<(0|l)?-8:0)+w|0,l=i,w=i,i=t=f[(k=o)>>2],i=t,g=(0|(k=f[k+4>>2]))<(0|(t=c))?1:e>>>0>i>>>0&(0|t)>=(0|k),f[w+32>>2]=g?e:i,f[l+36>>2]=g?c:k,((((0|u)<=(0|s)&r>>>0<=b>>>0|(0|u)<(0|s))<<3)+y|0)==(8+((e>>>0>>0&(0|t)<=(0|k)|(0|t)<(0|k)?-8:0)+o|0)|0)&&(d+(v<<3)|0)==(8+(((0|t)>=(0|k)&e>>>0>=i>>>0|(0|t)>(0|k)?-8:0)+h|0)|0)||(Fe(),$f())}function or(r,e){var i,A=0,n=0,a=0,t=0,b=0,k=0,u=0,o=0,c=0;S=i=S-16|0,A=f[r+4>>2];r:{e:{i:{A:{f:{n:{a:{t:{b:{k:{u:{if(!(1&(a=f[r+12>>2]))){if((n=e+A|0)>>>0>>0)break u;if(1!=f[a+16>>2])break k;if((e=f[a>>2])>>>0>=(k=(b=(u=f[r>>2])-(t=f[a+4>>2])|0)+n|0)>>>0)break t;if(e>>>0>>0|A>>>0>b>>>0)break b;o=r,c=ze(t,u,A),f[o>>2]=c,f[r+8>>2]=f[a>>2];break f}if((b=(t=f[r+8>>2])+(n=a>>>5|0)|0)-A>>>0>>0|A>>>0>n>>>0)break a;e=ze((e=f[r>>2])-n|0,e,A),f[r+12>>2]=31&a,f[r>>2]=e,f[r+8>>2]=b;break f}Ye(1052156,8,1052164),$f()}if(e=1<<(b=f[a+12>>2])+9,(0|(A=b&&e>>>0>n>>>0?e:n))>=0){if(!A){e=1,A=0;break n}if(e=V(A))break n;r=1}else r=0;Ze(r,1052180),$f()}if(n>>>0<=k>>>0){A=A+b|0,f[a+8>>2]=A,(n=((n=e<<1)>>>0>>0?k:n)-A|0)>>>0>e-A>>>0&&(ue(a,A,n),t=f[a+4>>2],e=f[a>>2]),f[r+8>>2]=e-b,f[r>>2]=t+b;break f}S=r=S-48|0,f[r+12>>2]=8,f[r+8>>2]=1052156,f[r+20>>2]=1,f[r+16>>2]=1054404,f[r+28>>2]=1,f[r+32>>2]=0,f[r+40>>2]=r+8,f[r+44>>2]=2,f[r+24>>2]=r+40,Me(r+16|0,1052196),$f()}f[r+8>>2]=n;break f}f[i+4>>2]=b,k=A+n|0,f[i+12>>2]=k,a=f[r>>2]-n|0,f[i+8>>2]=a,t-A>>>0>>0&&(ue(i+4|0,k,e),b=f[i+4>>2],a=f[i+8>>2]),f[r+8>>2]=b-n,f[r>>2]=n+a;break f}if(f[i+12>>2]=0,f[i+8>>2]=e,f[i+4>>2]=A,n=f[r>>2],(u=A)>>>0<(A=f[r+4>>2])>>>0&&(ue(i+4|0,0,A),t=f[i+12>>2],e=f[i+8>>2]),ze(e+t|0,n,A),e=f[a+16>>2],f[a+16>>2]=e-1,f[i+12>>2]=A+t,1==(0|e)){if(e=f[a>>2]){if(n=f[a+4>>2],(A=-8&(t=f[n-4>>2]))>>>0>>0)break A;if(A>>>0>e+39>>>0&&t)break i;nr(n)}if((e=-8&(A=f[a-4>>2]))>>>0<((A&=3)?24:28)>>>0)break e;if(e>>>0>=60&&A)break r;nr(a)}f[r>>2]=f[i+8>>2],f[r+8>>2]=f[i+4>>2],f[r+12>>2]=b<<2|1}return void(S=i+16|0)}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function cr(r,e,A,a){var t,b=0,k=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0;S=t=S-32|0,b=(k=A>>>0<3)?3-A|0:3;r:{e:{i:{A:{f:{n:{if(!k){if(A>>>0>>0)break A;if((0|A)==(0|b)){f[r+12>>2]=1,f[r>>2]=0,f[r+4>>2]=1;break r}A=(u=(k=(-1^b)+A|0)>>>0<2)?2-k|0:2;a:{if(!u){if(A>>>0<=k>>>0)break a;xe(A,k,1053076),$f()}f[r+4>>2]=A,f[r>>2]=0;break r}if((0|A)==(0|k))break n;if(48&n[0|(e=A+(1+(e+b|0)|0)|0)])break f;if(1==(0|(A=k-A|0))){f[r>>2]=0,f[r+4>>2]=1;break r}if(b=n[e+1|0],2==(0|A)){f[r>>2]=0,f[r+4>>2]=1;break r}if(ye(t+8|0,n[e+2|0],e+3|0,A-3|0),A=f[t+24>>2],e=f[t+20>>2],w=f[t+16>>2],g=f[t+12>>2],1==f[t+8>>2]){f[r+12>>2]=A,f[r+8>>2]=e,f[r+4>>2]=w,f[r>>2]=g;break r}if((0|(h=b<<24>>24))>=0)break e;if(ee(t+8|0,e,A),f[t+8>>2])break i;s=f[t+24>>2],v=f[t+28>>2],A=f[t+20>>2],e=f[t+16>>2];break e}f[r+8>>2]=e,f[r+4>>2]=b,f[r>>2]=0;break r}f[r>>2]=0,f[r+4>>2]=1;break r}i[r+12|0]=57,f[r+8>>2]=31,f[r+4>>2]=1054489,f[r>>2]=2;break r}xe(b,A,1053076),$f()}e=f[t+12>>2],A=f[t+16>>2],a=f[t+24>>2],f[r+8>>2]=f[t+20>>2],f[r+12>>2]=a,f[r>>2]=e,f[r+4>>2]=A;break r}if(o=64&b){if(ee(t+8|0,e,A),f[t+8>>2]){e=f[t+12>>2],A=f[t+16>>2],a=f[t+24>>2],f[r+8>>2]=f[t+20>>2],f[r+12>>2]=a,f[r>>2]=e,f[r+4>>2]=A;break r}y=f[t+28>>2],d=f[t+24>>2]}u=f[a+4>>2],e=f[a+8>>2],l=1&(b=f[a>>2]),k=(c=f[a+16>>2])?f[a+24>>2]:l?e:d,A=f[a+12>>2],l=c?f[a+28>>2]:l?A:y,(0|h)<0&&(f[a>>2]=1,f[a+4>>2]=0,e=s-(A=(b=1&(b|c))||o?k:s)|0,s=(b=v-((u=b||o?l:v)+(A>>>0>s>>>0)|0)|0)-2|0,c=e,v=(h=(0|b)<-1)?b+2|0:b,b=u+((e=(0|b)>0)?s:v)|0,b=(e=A+(h=c)|0)>>>0>>0?b+1|0:b,f[a+8>>2]=e,A=b,f[a+12>>2]=A,u=0,b=1),i[a+148|0]=o>>>6,o&&(b=1,u=0,s=(A=y-((k>>>0>d>>>0)+l|0)|0)-2|0,v=e=d-k|0,d=(o=(0|A)<-1)?A+2|0:A,c=e,A=l+((e=(0|A)>0)?s:d)|0,A=(e=k+(o=e?c:v)|0)>>>0>>0?A+1|0:A),f[a+40>>2]=e,f[a+44>>2]=A,f[a+32>>2]=b,f[a+36>>2]=u,f[a+24>>2]=e,f[a+28>>2]=A,f[a+16>>2]=b,f[a+20>>2]=u,f[a+48>>2]|f[a+52>>2]||(f[a+56>>2]=e,f[a+60>>2]=A,f[a+48>>2]=b,f[a+52>>2]=u),f[r+8>>2]=w,f[r+4>>2]=g,i[a+149|0]=1,f[r>>2]=3}S=t+32|0}function sr(r,e){var A,a,t,b,u,o,c,s,l,h,v,d=0,w=0,g=0,y=0,B=0,E=0;S=A=S-192|0,d=f[r+152>>2],w=f[r+156>>2],g=f[r+32>>2],y=f[r+36>>2],B=f[r+40>>2],t=f[r+44>>2],b=f[r>>2],u=f[r+4>>2],o=f[r+8>>2],c=f[r+12>>2],s=f[r+16>>2],l=f[r+20>>2],h=f[r+24>>2],v=f[r+28>>2],ze(a=A+8|0,r+160|0,80),f[r+232>>2]=0,f[r+236>>2]=0,f[r+224>>2]=0,f[r+228>>2]=4,i[r+216|0]=0,f[r+208>>2]=h,f[r+212>>2]=v,f[r+200>>2]=s,f[r+204>>2]=l,f[r+192>>2]=o,f[r+196>>2]=c,f[r+184>>2]=b,f[r+188>>2]=u,f[r+176>>2]=B,f[r+180>>2]=t,f[r+168>>2]=g,f[r+172>>2]=y,f[r+152>>2]=0,f[r+156>>2]=0;r:{e:{i:{if(2!=(0|d)|w){f[A+88>>2]=d,f[A+92>>2]=w,ze(A+96|0,a,80),d=f[(w=e+8|0)>>2],w=f[w+4>>2],f[(g=A+184|0)>>2]=d,f[g+4>>2]=w,w=f[e+4>>2],f[A+176>>2]=f[e>>2],f[A+180>>2]=w,d?(f[A+172>>2]=d+f[A+172>>2],(0|(d=f[A+168>>2]))==f[A+160>>2]&&ce(A+160|0,1058736),g=f[e+4>>2],w=f[A+164>>2]+(d<<4)|0,f[w>>2]=f[e>>2],f[w+4>>2]=g,g=f[(e=e+8|0)+4>>2],f[(w=w+8|0)>>2]=f[e>>2],f[w+4>>2]=g,f[A+168>>2]=d+1):fi[f[f[A+176>>2]+16>>2]](A+188|0,f[A+180>>2],0);A:{if(f[A+172>>2]){if(d=f[A+168>>2])for(e=f[A+164>>2],d<<=4;;){if(f[e+8>>2])break A;if(e=e+16|0,!(d=d-16|0))break}Ve(1055112),$f()}d=f[A+164>>2];f:if(e=f[A+168>>2]){if(r=0,1!=(0|e)){for(w=1&e,g=-2&e,e=d;fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]),fi[f[f[e+16>>2]+16>>2]](e+28|0,f[e+20>>2],f[e+24>>2]),e=e+32|0,(0|g)!=(0|(r=r+2|0)););if(!w)break f}fi[f[f[(r=d+(r<<4)|0)>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2])}if(!(e=f[A+160>>2]))break r;if((r=-8&(w=f[d-4>>2]))>>>0<((e<<=4)|((w&=3)?4:8))>>>0)break i;if(r>>>0>e+39>>>0&&w)break e;nr(d);break r}if(i[A+152|0]=31&n[f[e+4>>2]],(0|(w=f[r+248>>2]))!=f[r+240>>2]){ze(f[r+244>>2]+k(w,88)|0,A+88|0,88),f[r+248>>2]=w+1;break r}S=d=S-32|0,e=qe(B=(e=(y=f[(g=r+240|0)>>2])<<1)>>>0<=4?4:e,0,88,0);A:{if(!(M||e>>>0>2147483640)){if(y?(f[d+28>>2]=k(y,88),f[d+20>>2]=f[g+4>>2],y=8):y=0,f[d+24>>2]=y,Ce(d+8|0,8,e,d+20|0),1!=f[d+8>>2])break A;E=f[d+12>>2]}Ze(E,1055128),$f()}e=f[d+12>>2],f[g>>2]=B,f[g+4>>2]=e,S=d+32|0,ze(f[r+244>>2]+k(w,88)|0,A+88|0,88),f[r+248>>2]=w+1;break r}fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]);break r}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}S=A+192|0}function lr(r){var e=0,i=0,A=0,n=0,a=0;r:{e:{if(!(!f[r+4>>2]&2==f[r>>2])){if(jr(e=f[r+60>>2],f[r+64>>2]),i=f[r+56>>2]){if((n=-8&(A=f[e-4>>2]))>>>0<(i=k(i,120))+((A&=3)?4:8)>>>0)break e;if(n>>>0>i+39>>>0&&A)break r;nr(e)}n=f[r+76>>2];i:if(e=f[r+80>>2]){if(i=0,1!=(0|e)){for(A=1&e,a=-2&e,e=n;fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]),fi[f[f[e+16>>2]+16>>2]](e+28|0,f[e+20>>2],f[e+24>>2]),e=e+32|0,(0|a)!=(0|(i=i+2|0)););if(!A)break i}fi[f[f[(e=n+(i<<4)|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}if(i=f[r+72>>2]){if((e=-8&(A=f[n-4>>2]))>>>0<((i<<=4)|((A&=3)?4:8))>>>0)break e;if(e>>>0>i+39>>>0&&A)break r;nr(n)}n=f[r+88>>2];i:if(e=f[r+92>>2]){if(i=0,1!=(0|e)){for(A=1&e,a=-2&e,e=n;fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]),fi[f[f[e+16>>2]+16>>2]](e+28|0,f[e+20>>2],f[e+24>>2]),e=e+32|0,(0|a)!=(0|(i=i+2|0)););if(!A)break i}fi[f[f[(e=n+(i<<4)|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}if(i=f[r+84>>2]){if((e=-8&(A=f[n-4>>2]))>>>0<((i<<=4)|((A&=3)?4:8))>>>0)break e;if(e>>>0>i+39>>>0&&A)break r;nr(n)}if(e=f[r+96>>2]){if(n=f[r+100>>2],(r=-8&(i=f[n-4>>2]))>>>0>>0)break e;if(r>>>0>e+39>>>0&&i)break r;nr(n)}}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function hr(r,e,i,t,k,u,o,c,s,l,h){var v,d,w,g,y,B,E,_,I=0,Q=0,N=0,R=0,C=0,p=0,m=0,G=0,Y=0,W=0,D=0,F=0,T=0,M=0;S=v=S+-64|0,g=a[e+78>>1],y=a[e+76>>1],B=a[e+174>>1],E=a[e+172>>1],N=-2147483648,_=R=f[e+4>>2],I=d=f[e>>2],Q=R,G=-2147483648,2!=(0|(R=f[e+104>>2]))|(w=f[e+108>>2])&&(f[v+36>>2]=3,f[v+32>>2]=1056e3,f[v+20>>2]=3,f[v+16>>2]=1055976,f[v+28>>2]=3,f[v+56>>2]=e+226,f[v+60>>2]=7,f[v+48>>2]=e+225,f[v+52>>2]=7,f[v+40>>2]=e+224,f[v+44>>2]=7,f[v+24>>2]=v+40,Mr(v,v+16|0),G=f[v>>2],Y=f[v+4>>2],W=f[v+8>>2],Q=f[e+4>>2],I=f[e>>2]);r:{e:{i:{if(2!=(0|I)|Q){if(Q=n[e+100|0],!(I=V(N=(C=1&I)?10:9)))break i;D=ze(I,C?1057070:1&Q?1057061:1057052,N),C=N,I=0}if(!(Q=f[e+108>>2])&2==(0|(I=f[e+104>>2]))||f[e+184>>2]&&(I=f[e+180>>2],fi[f[f[I>>2]>>2]](v+40|0,I+12|0,f[I+4>>2],f[I+8>>2]),f[v+8>>2]=f[v+52>>2],I=f[v+48>>2],f[v>>2]=f[v+44>>2],f[v+4>>2]=I,F=f[v+40>>2],I=f[e+104>>2],Q=f[e+108>>2]),!Q&2==(0|I))p=a[e+254>>1],m=a[e+252>>1];else{if(!f[e+196>>2]){p=a[e+254>>1],m=a[e+252>>1];break e}if(I=f[e+192>>2],fi[f[f[I>>2]>>2]](v+40|0,I+12|0,f[I+4>>2],f[I+8>>2]),f[v+24>>2]=f[v+52>>2],I=f[v+48>>2],f[v+16>>2]=f[v+44>>2],f[v+20>>2]=I,T=f[v+40>>2],p=a[e+254>>1],m=a[e+252>>1],2!=f[e+104>>2]|f[e+108>>2])break e}Q=0;break r}Ze(1,1057036),$f()}M=b[e+120>>3],Q=1}A[r+126>>1]=g,A[r+122>>1]=B,f[r+112>>2]=D,f[r+116>>2]=C,f[r+108>>2]=N,f[r+100>>2]=Y,f[r+104>>2]=W,f[r+96>>2]=G,f[r+48>>2]=F,I=f[v+4>>2],f[r+52>>2]=f[v>>2],f[r+56>>2]=I,f[r+64>>2]=T,I=f[v+20>>2],f[r+68>>2]=f[v+16>>2],f[r+72>>2]=I,A[r+124>>1]=2!=(0|d)|_?y:0,A[r+120>>1]=2!=(0|R)|w?E:0,f[r+60>>2]=f[v+8>>2],f[r+76>>2]=f[v+24>>2],A[r+130>>1]=p,A[r+128>>1]=m,f[r+88>>2]=h,f[r+80>>2]=s,f[r+84>>2]=l,f[r+40>>2]=c,f[r+32>>2]=u,f[r+36>>2]=o,f[r+24>>2]=k,f[r+16>>2]=i,f[r+20>>2]=t,f[r>>2]=Q,f[r+4>>2]=0,b[r+8>>3]=M,ir(e),S=v- -64|0}function vr(r,e){var i=0,A=0,n=0,a=0;A=r+e|0;r:{e:if(!(1&(i=f[r+4>>2]))){if(!(2&i))break r;if(e=(i=f[r>>2])+e|0,(0|(r=r-i|0))==f[264982]){if(3&~(i=f[A+4>>2]))break e;f[264980]=e,f[A+4>>2]=-2&i,f[r+4>>2]=1|e,f[A>>2]=e;break r}Ur(r,i)}e:{i:{A:{if(!(2&(i=f[A+4>>2]))){if((0|A)==f[264983])break i;if((0|A)==f[264982])break e;if(Ur(A,i&=-8),e=e+i|0,f[r+4>>2]=1|e,f[r+e>>2]=e,f[264982]!=(0|r))break A;return void(f[264980]=e)}f[A+4>>2]=-2&i,f[r+4>>2]=1|e,f[r+e>>2]=e}if(e>>>0>=256){if(A=31,f[r+16>>2]=0,f[r+20>>2]=0,e>>>0<=16777215&&(A=62+((e>>>6-(i=o(e>>>8|0))&1)-(i<<1)|0)|0),f[r+28>>2]=A,n=1059504+(A<<2)|0,!((i=1<>2]=r,f[r+24>>2]=n,f[r+12>>2]=r,f[r+8>>2]=r,void(f[264979]=i|f[264979]);A:{if(i=f[n>>2],(-8&f[i+4>>2])!=(0|e))for(a=e<<(31!=(0|A)?25-(A>>>1|0)|0:0);;){if(!(A=f[(n=(a>>>29&4)+i|0)+16>>2]))break A;if(a<<=1,(-8&f[(i=A)+4>>2])==(0|e))break}else A=i;return e=f[A+8>>2],f[e+12>>2]=r,f[A+8>>2]=r,f[r+24>>2]=0,f[r+12>>2]=A,void(f[r+8>>2]=e)}return f[n+16>>2]=r,f[r+24>>2]=i,f[r+12>>2]=r,void(f[r+8>>2]=r)}return i=1059648+(248&e)|0,(A=f[264978])&(e=1<<(e>>>3))?e=f[i+8>>2]:(f[264978]=e|A,e=i),f[i+8>>2]=r,f[e+12>>2]=r,f[r+12>>2]=i,void(f[r+8>>2]=e)}if(f[264983]=r,e=f[264981]+e|0,f[264981]=e,f[r+4>>2]=1|e,f[264982]!=(0|r))break r;return f[264980]=0,void(f[264982]=0)}f[264982]=r,e=f[264980]+e|0,f[264980]=e,f[r+4>>2]=1|e,f[r+e>>2]=e}}function dr(r,e,i){var A,n=0,a=0,t=0,b=0,k=0;S=A=S-96|0;r:{e:{if((0|(n=(t=f[e+8>>2])+f[i+8>>2]|0))>=0){if(!n){a=1,n=0,b=1;break r}if(a=V(n))break e;r=1}else r=0;Ze(r,1058752),$f()}t=f[e+8>>2],b=n>>>0>131071?29:129-(o(n>>>10|0)<<2)|0}f[A+32>>2]=b,f[A+24>>2]=0,f[A+20>>2]=a,f[A+28>>2]=n,e=f[e+4>>2],n>>>0>>0&&(or(A+20|0,t),k=f[A+24>>2],n=f[A+28>>2],a=f[A+20>>2]),ze(a+k|0,e,t);r:{e:{if((e=n-k|0)>>>0>=t>>>0){if(k=t+k|0,f[A+24>>2]=k,e=f[i+4>>2],(b=f[i+8>>2])>>>0>(i=n-k|0)>>>0&&(or(A+20|0,b),a=f[A+20>>2],i=(n=f[A+28>>2])-(k=f[A+24>>2])|0),ze(a+k|0,e,b),i>>>0>>0)break e;if(b=b+k|0,1&(e=f[A+32>>2])){i=(t=e>>>5|0)+b|0,f[A+44>>2]=i,a=a-t|0,f[A+40>>2]=a,e=n+t|0,f[A+36>>2]=e;i:{A:{if((0|n)!=(0|b)){if(n=V(12))break A;$f()}if(se(A+8|0,A+36|0),!(i=f[A+12>>2])){i=0,a=1,n=0,e=1051612;break i}if(1&(a=f[A+8>>2])){n=a,e=1051916;break i}n=1|a,e=1051896;break i}f[n+8>>2]=1,f[n+4>>2]=e,f[n>>2]=a,e=1052028}if(f[A+48>>2]=t,i>>>0>>0)break r;f[r+12>>2]=n,f[r>>2]=e,f[r+8>>2]=i-t,f[r+4>>2]=a+t}else f[r+12>>2]=e,f[r+8>>2]=b,f[r+4>>2]=a,f[r>>2]=1058540;return void(S=A+96|0)}f[A+56>>2]=e,f[A+52>>2]=t,pe(A+52|0),$f()}f[A+56>>2]=i,f[A+52>>2]=b,pe(A+52|0),$f()}f[A+76>>2]=i,f[A+56>>2]=2,f[A+52>>2]=1058600,f[A+64>>2]=2,f[A+68>>2]=0,f[A+88>>2]=A+76,f[A+92>>2]=3,f[A+80>>2]=A+48,f[A+84>>2]=3,f[A+60>>2]=A+80,Me(A+52|0,1058616),$f()}function wr(r,e){var i,A=0,n=0,a=0,t=0,b=0,k=0,u=0;S=i=S-96|0;r:{e:{i:{A:switch(0|(n=f[e+80>>2])){case 0:break A;case 1:break i;default:break e}f[r+12>>2]=0,f[r+4>>2]=1,f[r+8>>2]=0,f[r>>2]=1058520;break r}A=r,r=f[e+76>>2],fi[f[f[r>>2]>>2]](A,r+12|0,f[r+4>>2],f[r+8>>2]);break r}e:{i:{if((0|(a=f[e+84>>2]))>=0){if(!a){b=1,a=0,t=1;break e}if(b=V(a))break i;r=1}else r=0;Ze(r,1058752),$f()}t=a>>>0>131071?29:129-(o(a>>>10|0)<<2)|0}f[i+32>>2]=t,f[i+28>>2]=a,f[i+24>>2]=0,f[i+20>>2]=b,k=n<<4,e=f[e+76>>2]+8|0;e:{i:{for(;;){if(u=f[e-4>>2],(t=a-A|0)>>>0<(n=f[e>>2])>>>0&&(or(i+20|0,n),b=f[i+20>>2],t=(a=f[i+28>>2])-(A=f[i+24>>2])|0),ze(A+b|0,u,n),n>>>0>t>>>0)break i;if(A=A+n|0,f[i+24>>2]=A,e=e+16|0,!(k=k-16|0))break}if(!(1&(e=f[i+32>>2]))){f[r+12>>2]=e,f[r+8>>2]=A,f[r+4>>2]=b,f[r>>2]=1058540;break r}e=(n=e>>>5|0)+A|0,f[i+44>>2]=e,t=b-n|0,f[i+40>>2]=t,b=n+a|0,f[i+36>>2]=b;A:{f:{if((0|A)!=(0|a)){if(A=V(12))break f;$f()}if(se(i+8|0,i+36|0),!(e=f[i+12>>2])){e=0,t=1,A=0,a=1051612;break A}if(1&(t=f[i+8>>2])){A=t,a=1051916;break A}A=1|t,a=1051896;break A}f[A+8>>2]=1,f[A+4>>2]=b,f[A>>2]=t,a=1052028}if(f[i+48>>2]=n,e>>>0>>0)break e;f[r+12>>2]=A,f[r>>2]=a,f[r+8>>2]=e-n,f[r+4>>2]=n+t;break r}f[i+56>>2]=t,f[i+52>>2]=n,pe(i+52|0),$f()}f[i+76>>2]=e,f[i+56>>2]=2,f[i+52>>2]=1058600,f[i+64>>2]=2,f[i+68>>2]=0,f[i+88>>2]=i+76,f[i+92>>2]=3,f[i+80>>2]=i+48,f[i+84>>2]=3,f[i+60>>2]=i+80,Me(i+52|0,1058616),$f()}S=i+96|0}function gr(r,e){var i=0,A=0,n=0,a=0,t=0,b=0,u=0,o=0;r:{e:{if(e)for(;;){i:{A:{f:{n:switch(t=k(b,72)+r|0,f[t>>2]){case 0:case 1:break f;default:break n}if(n=48,!(i=f[t+56>>2]))break i;if(a=f[t+52>>2],A=0,1!=(0|i)){for(u=1&i,o=-2&i,i=a;fi[f[f[i>>2]+16>>2]](i+12|0,f[i+4>>2],f[i+8>>2]),fi[f[f[i+16>>2]+16>>2]](i+28|0,f[i+20>>2],f[i+24>>2]),i=i+32|0,(0|o)!=(0|(A=A+2|0)););if(!u)break i}break A}if(n=56,!(i=f[t+64>>2]))break i;if(a=f[t+60>>2],A=0,1!=(0|i)){for(u=1&i,o=-2&i,i=a;fi[f[f[i>>2]+16>>2]](i+12|0,f[i+4>>2],f[i+8>>2]),fi[f[f[i+16>>2]+16>>2]](i+28|0,f[i+20>>2],f[i+24>>2]),i=i+32|0,(0|o)!=(0|(A=A+2|0)););if(!u)break i}}fi[f[f[(i=a+(A<<4)|0)>>2]+16>>2]](i+12|0,f[i+4>>2],f[i+8>>2])}if(n=f[(i=n+t|0)>>2]){if(a=f[i+4>>2],(i=-8&(A=f[a-4>>2]))>>>0<((n<<=4)|((A&=3)?4:8))>>>0)break e;if(i>>>0>n+39>>>0&&A)break r;nr(a)}if((0|(b=b+1|0))==(0|e))break}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function yr(r,e,i,A){var n,a=0,t=0,b=0,k=0,u=0;S=n=S-16|0;r:{e:{i:{A:{f:{n:{if(1==f[e+8>>2]){if((a=-8&(b=f[e-4>>2]))>>>0<((t=3&b)?16:20)>>>0)break r;if(b=f[e+4>>2],k=f[e>>2],a>>>0>=52&&t)break n;if(nr(e),a=b>>>0>131071?29:129-(o(b>>>10|0)<<2)|0,A=(t=i-k|0)+A|0,(0|i)==(0|k)){e=a;break e}if((e=(i=a>>>5|0)+t|0)>>>0>=134217728){if(!(e=V(20)))break f;f[e+16>>2]=1,f[e>>2]=i+b,f[e+8>>2]=i+A,f[e+4>>2]=k-i,f[e+12>>2]=a>>>2&7;break i}e=29&a|e<<5;break i}if((0|A)>=0){if(!A){k=1;break A}if(k=V(b=A))break A;r=1}else r=0;Ze(r,1057036),$f()}Ye(1053156,46,1053204)}$f()}ze(k,i,A),i=f[e+8>>2],f[e+8>>2]=i-1;A:{f:{n:{if(1==(0|i)){if((0|(i=f[e+4>>2]))<0)break n;if(a=f[e>>2],(u=-8&(t=f[a-4>>2]))>>>0>>0)break r;if(i+39>>>0>>0&&t)break f;if(nr(a),(i=-8&(a=f[e-4>>2]))>>>0<((a&=3)?16:20)>>>0)break r;if(i>>>0>=52&&a)break A;nr(e)}e=b>>>0>131071?29:129-(o(b>>>10|0)<<2)|0;break e}ge(1051952,43,n+15|0,1051936,1052012),$f()}Ye(1053156,46,1053204),$f()}Ye(1053156,46,1053204),$f()}A=(i=A-t|0)>>>0<=A>>>0?i:0,b=b-t|0,k=t+k|0}return f[r+12>>2]=e,f[r+8>>2]=b,f[r+4>>2]=A,f[r>>2]=k,void(S=n+16|0)}Ye(1053092,46,1053140),$f()}function Br(r){var e=0,i=0,A=0,n=0,a=0;r:{e:{i:if(!(!(e=f[r+4>>2])&3==(0|(i=f[r>>2])))){if(!e&2==(0|i)){if((i=f[r+136>>2])&&fi[f[i+16>>2]](r+148|0,f[r+140>>2],f[r+144>>2]),xr(f[r+252>>2],f[r+256>>2]),e=f[r+248>>2]){if(A=f[r+252>>2],(i=-8&(n=f[A-4>>2]))>>>0<(e=k(e,88))+((n&=3)?4:8)>>>0)break e;if(i>>>0>e+39>>>0&&n)break r;nr(A)}if(!f[r+164>>2]&2==f[r+160>>2])break i;i=232}else{if((i=f[r+128>>2])&&fi[f[i+16>>2]](r+140|0,f[r+132>>2],f[r+136>>2]),Hr(f[r+260>>2],f[r+264>>2]),e=f[r+256>>2]){if(A=f[r+260>>2],(i=-8&(n=f[A-4>>2]))>>>0<(e=k(e,104))+((n&=3)?4:8)>>>0)break e;if(i>>>0>e+39>>>0&&n)break r;nr(A)}if(!f[r+156>>2]&2==f[r+152>>2])break i;i=240}if(i=f[(e=i+r|0)+4>>2],r=f[e+8>>2]){A=0;A:{if(1!=(0|r)){for(n=1&r,a=-2&r,r=i;fi[f[f[r>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2]),fi[f[f[r+16>>2]+16>>2]](r+28|0,f[r+20>>2],f[r+24>>2]),r=r+32|0,(0|a)!=(0|(A=A+2|0)););if(!n)break A}fi[f[f[(r=(A<<4)+i|0)>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2])}i=f[e+4>>2]}if(e=f[e>>2]){if((r=-8&(A=f[i-4>>2]))>>>0<((e<<=4)|((A&=3)?4:8))>>>0)break e;if(r>>>0>e+39>>>0&&A)break r;nr(i)}}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Er(r){var e=0,i=0,A=0,n=0,a=0;r:{e:{i:{if(!f[r+4>>2]&2==f[r>>2]){if((i=f[r+136>>2])&&fi[f[i+16>>2]](r+148|0,f[r+140>>2],f[r+144>>2]),xr(f[r+252>>2],f[r+256>>2]),e=f[r+248>>2]){if(A=f[r+252>>2],(i=-8&(n=f[A-4>>2]))>>>0<(e=k(e,88))+((n&=3)?4:8)>>>0)break e;if(i>>>0>e+39>>>0&&n)break r;nr(A)}if(!f[r+164>>2]&2==f[r+160>>2])break i;i=232}else{if((i=f[r+128>>2])&&fi[f[i+16>>2]](r+140|0,f[r+132>>2],f[r+136>>2]),Hr(f[r+260>>2],f[r+264>>2]),e=f[r+256>>2]){if(A=f[r+260>>2],(i=-8&(n=f[A-4>>2]))>>>0<(e=k(e,104))+((n&=3)?4:8)>>>0)break e;if(i>>>0>e+39>>>0&&n)break r;nr(A)}if(!f[r+156>>2]&2==f[r+152>>2])break i;i=240}if(i=f[(e=i+r|0)+4>>2],r=f[e+8>>2]){A=0;A:{if(1!=(0|r)){for(n=1&r,a=-2&r,r=i;fi[f[f[r>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2]),fi[f[f[r+16>>2]+16>>2]](r+28|0,f[r+20>>2],f[r+24>>2]),r=r+32|0,(0|a)!=(0|(A=A+2|0)););if(!n)break A}fi[f[f[(r=(A<<4)+i|0)>>2]+16>>2]](r+12|0,f[r+4>>2],f[r+8>>2])}i=f[e+4>>2]}if(e=f[e>>2]){if((r=-8&(A=f[i-4>>2]))>>>0<((e<<=4)|((A&=3)?4:8))>>>0)break e;if(r>>>0>e+39>>>0&&A)break r;nr(i)}}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function _r(r,e,i,A){var n,a=0,t=0;S=n=S-96|0,f[n+72>>2]=A;r:if(A){if(t=f[e+8>>2],f[n+12>>2]=t,(a=f[e+4>>2])>>>0<=i>>>0){e:{i:{if(i+A>>>0<=a+t>>>0){if(f[n+84>>2]=t,i=i-a|0,f[n+88>>2]=i,A=i+A|0,f[n+92>>2]=A,i>>>0>A>>>0)break i;if(A>>>0>t>>>0)break e;fi[f[f[e>>2]>>2]](n+40|0,e+12|0,a,t),f[(e=n+48|0)>>2]=f[n+92>>2]-i,f[n+44>>2]=i+f[n+44>>2],i=f[n+44>>2],f[r>>2]=f[n+40>>2],f[r+4>>2]=i,i=f[e+4>>2],f[(r=r+8|0)>>2]=f[e>>2],f[r+4>>2]=i;break r}f[n+80>>2]=a,f[n+92>>2]=i,f[n+20>>2]=5,f[n+16>>2]=1051768,f[n+28>>2]=4,f[n+32>>2]=0,f[n+64>>2]=n+72,f[n+68>>2]=8,f[n+56>>2]=n+92,f[n+60>>2]=10,f[n+48>>2]=n+12,f[n+52>>2]=8,f[n+40>>2]=n+80,f[n+44>>2]=10,f[n+24>>2]=n+40,Me(n+16|0,1051808),$f()}f[n+44>>2]=2,f[n+40>>2]=1057504,f[n+52>>2]=2,f[n+56>>2]=0,f[n+24>>2]=n+92,f[n+28>>2]=3,f[n+16>>2]=n+88,f[n+20>>2]=3,f[n+48>>2]=n+16,Me(n+40|0,1057520),$f()}f[n+44>>2]=2,f[n+40>>2]=1057564,f[n+52>>2]=2,f[n+56>>2]=0,f[n+24>>2]=n+84,f[n+28>>2]=3,f[n+16>>2]=n+92,f[n+20>>2]=3,f[n+48>>2]=n+16,Me(n+40|0,1057580),$f()}f[n+76>>2]=a,f[n+92>>2]=i,f[n+44>>2]=3,f[n+40>>2]=1051680,f[n+52>>2]=2,f[n+56>>2]=0,f[n+24>>2]=n+76,f[n+28>>2]=10,f[n+16>>2]=n+92,f[n+20>>2]=10,f[n+48>>2]=n+16,Me(n+40|0,1051704),$f()}else f[r+12>>2]=0,f[r+4>>2]=1,f[r+8>>2]=0,f[r>>2]=1051612;S=n+96|0}function Ir(r,e,A){var n,a=0,t=0,b=0,k=0;S=n=S-16|0;r:{e:{if((a=f[r+8>>2])-(t=f[r+4>>2])>>>0>=4)k=f[r>>2],i[0|(b=k+t|0)]=0,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=24;else if(or(r,4),t=f[r+4>>2],k=f[r>>2],i[0|(a=t+k|0)]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=24,(b=(a=f[r+8>>2])-t|0)>>>0<=3)break e;t=t+4|0,f[r+4>>2]=t,a-t>>>0<=3&&(or(r,4),k=f[r>>2],t=f[r+4>>2]),i[0|(t=t+k|0)]=116,i[t+1|0]=102,i[t+2|0]=104,i[t+3|0]=100;i:{A:{if((k=(t=f[r+8>>2])-(a=f[r+4>>2])|0)>>>0>3){if(a=a+4|0,f[r+4>>2]=a,t-a>>>0>=4)k=f[r>>2],i[0|(b=k+a|0)]=0,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=40;else if(or(r,4),a=f[r+4>>2],k=f[r>>2],i[0|(t=a+k|0)]=0,i[t+1|0]=0,i[t+2|0]=0,i[t+3|0]=40,(b=(t=f[r+8>>2])-a|0)>>>0<=3)break e;if(a=a+4|0,f[r+4>>2]=a,A<<=24,t-a>>>0>=4)i[0|(b=a+k|0)]=A,i[b+1|0]=A>>>8,i[b+2|0]=A>>>16,i[b+3|0]=A>>>24;else if(or(r,4),a=f[r+4>>2],k=f[r>>2],i[0|(t=a+k|0)]=A,i[t+1|0]=A>>>8,i[t+2|0]=A>>>16,i[t+3|0]=A>>>24,(A=(t=f[r+8>>2])-a|0)>>>0<=3)break A;if(a=a+4|0,f[r+4>>2]=a,e=e<<24|(65280&e)<<8|e>>>8&65280|e>>>24,t-a>>>0>=4)i[0|(A=a+k|0)]=e,i[A+1|0]=e>>>8,i[A+2|0]=e>>>16,i[A+3|0]=e>>>24;else if(or(r,4),A=(a=f[r+4>>2])+f[r>>2]|0,i[0|A]=e,i[A+1|0]=e>>>8,i[A+2|0]=e>>>16,i[A+3|0]=e>>>24,(e=f[r+8>>2]-a|0)>>>0<=3)break i;return f[r+4>>2]=a+4,void(S=n+16|0)}f[n+12>>2]=k;break r}f[n+12>>2]=A;break r}f[n+12>>2]=e;break r}f[n+12>>2]=b}f[n+8>>2]=4,pe(n+8|0),$f()}function Qr(r,e,i){var n,b=0,u=0,o=0,c=0,s=0,l=0,h=0;S=n=S-16|0,f[n+4>>2]=e,f[n>>2]=r,f[n+8>>2]=-536870880,f[n+12>>2]=0;r:{e:{i:{if(e=f[i+16>>2]){if(r=f[i+20>>2])break i;break e}if(!(r=f[i+12>>2]))break e;for(c=(u=f[i+8>>2])+(r<<3)|0,b=u+8|0,s=1+(r-1&536870911)|0,r=f[i>>2];;){if(e=b,(b=f[r+4>>2])&&0|fi[f[f[n+4>>2]+12>>2]](f[n>>2],f[r>>2],b)){b=1;break r}if(b=1,0|fi[f[u+4>>2]](f[u>>2],n))break r;if(r=r+8|0,b=e+(((0|e)!=(0|c))<<3)|0,u=e,(0|(o=o+1|0))==(0|s))break}break e}for(h=k(r,24)+e|0,b=e+24|0,s=1+(r-1&536870911)|0,c=f[i+8>>2],u=f[i>>2];;){if(r=b,(b=f[u+4>>2])&&0|fi[f[f[n+4>>2]+12>>2]](f[n>>2],f[u>>2],b)){b=1;break r}b=0,o=0;i:{A:switch(a[e+8>>1]-1|0){default:o=a[e+10>>1];break i;case 0:break A;case 1:break i}o=a[4+(c+(f[e+12>>2]<<3)|0)>>1]}i:{A:switch(a[e>>1]-1|0){default:b=a[e+2>>1];break i;case 1:break i;case 0:break A}b=a[4+(c+(f[e+4>>2]<<3)|0)>>1]}if(A[n+14>>1]=b,A[n+12>>1]=o,f[n+8>>2]=f[e+20>>2],e=c+(f[e+16>>2]<<3)|0,b=1,0|fi[f[e+4>>2]](f[e>>2],n))break r;if(u=u+8|0,b=r+((0|r)!=(0|h)?24:0)|0,e=r,(0|(l=l+1|0))==(0|s))break}}t[i+4>>2]<=s>>>0||(r=f[i>>2]+(s<<3)|0,!(0|fi[f[f[n+4>>2]+12>>2]](f[n>>2],f[r>>2],f[r+4>>2])))?b=0:b=1}return S=n+16|0,b}function Nr(r,e,A,n,a){var t,b=0,k=0,u=0,o=0,c=0,s=0;S=t=S-48|0;r:{if((u=f[r+8>>2])-(k=f[r+4>>2])>>>0>=4)o=f[r>>2],i[0|(b=o+k|0)]=0,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=20;else if(or(r,4),k=f[r+4>>2],o=f[r>>2],i[0|(b=k+o|0)]=0,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=20,(b=(u=f[r+8>>2])-k|0)>>>0<=3)break r;b=k+4|0,f[r+4>>2]=b,u-b>>>0<=3&&(or(r,4),o=f[r>>2],b=f[r+4>>2]),i[0|(b=b+o|0)]=116,i[b+1|0]=102,i[b+2|0]=100,i[b+3|0]=116;e:{if((b=(u=f[r+8>>2])-(c=f[r+4>>2])|0)>>>0<=3)break r;if(k=c+4|0,f[r+4>>2]=k,u-k>>>0>=4)o=f[r>>2],i[0|(b=o+k|0)]=1,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=0;else if(or(r,4),k=f[r+4>>2],o=f[r>>2],i[0|(b=k+o|0)]=1,i[b+1|0]=0,i[b+2|0]=0,i[b+3|0]=0,(b=(u=f[r+8>>2])-k|0)>>>0<=3)break r;if(k=k+4|0,f[r+4>>2]=k,(0|e)!=(0|a)&&(Ue(t+16|0,b=A,n,A=n>>31,A,e,0,0,0),Le(t,f[t+16>>2],f[t+20>>2],f[t+24>>2],f[t+28>>2],a),n=f[t+4>>2],A=f[t>>2]),s=b=(e=16711680&A)<<24,b=(e=a=e>>>8|0)|(b=(a=-16777216&A)>>>24|0)|(c=A<<24|(65280&A)<<8),n=-16777216&((255&(e=n))<<24|A>>>8)|16711680&((16777215&e)<<8|A>>>24)|e>>>8&65280|e>>>24|(a=s|a<<8),e=b,u-k>>>0>=8)i[0|(A=k+o|0)]=n,i[A+1|0]=n>>>8,i[A+2|0]=n>>>16,i[A+3|0]=n>>>24,i[A+4|0]=b,i[A+5|0]=b>>>8,i[A+6|0]=b>>>16,i[A+7|0]=b>>>24;else if(or(r,8),A=(k=f[r+4>>2])+f[r>>2]|0,i[0|A]=n,i[A+1|0]=n>>>8,i[A+2|0]=n>>>16,i[A+3|0]=n>>>24,i[A+4|0]=e,i[A+5|0]=e>>>8,i[A+6|0]=e>>>16,i[A+7|0]=e>>>24,(e=f[r+8>>2]-k|0)>>>0<=7)break e;return f[r+4>>2]=k+8,void(S=t+48|0)}f[t+44>>2]=e,f[t+40>>2]=8,pe(t+40|0),$f()}f[t+44>>2]=b,f[t+40>>2]=4,pe(t+40|0),$f()}function Rr(r,e,A){var n,a,t,b=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0;S=n=S-176|0,u=f[e+16>>2],a=f[e+24>>2];r:{if(!(l=(0|(o=f[e+20>>2]))>(0|(b=t=f[e+28>>2]))?1:(0|b)<=(0|o)&u>>>0>=a>>>0)){if(b=a-u|0,h=n+88|0,(c=(0|t)>(0|(v=t-(o+(u>>>0>a>>>0)|0)|0))?1:b>>>0>>0&(0|v)<=(0|t))^(d=(0|o)>0?1:!!(0|u)&(0|o)>=0)|v)break r;s=b}f[n+88>>2]=1,h=n}if(f[h>>2]=s,1==f[n+88>>2]){if(A=f[n>>2],c=f[r+8>>2],A>>>0>f[r>>2]-c>>>0&&(Ae(r,c,A,8,88),c=f[r+8>>2]),!l)for(w=f[r+4>>2]+k(c,88)|0,_=(d=f[e>>2])+12|0,c=(c+a|0)-u|0,I=n+12|0,g=f[e+12>>2],l=f[e+8>>2],h=f[e+4>>2],Q=n+160|0;o=(u=u+1|0)?o:o+1|0,f[e+16>>2]=u,f[e+20>>2]=o,f[n+160>>2]=0,f[n+164>>2]=4,f[n+168>>2]=0,f[n+172>>2]=0,i[n+158|0]=0,i[n+156|0]=0,f[n+152>>2]=0,f[n+136>>2]=0,f[n+140>>2]=0,f[n+120>>2]=0,f[n+124>>2]=0,f[n+104>>2]=0,f[n+108>>2]=0,f[n+88>>2]=0,f[n+92>>2]=0,fi[f[f[d>>2]>>2]](n,_,f[d+4>>2],f[d+8>>2]),(A=f[n+8>>2])?(f[n+172>>2]=A,ce(Q,1058736),A=f[n+4>>2],b=f[n+164>>2],f[b>>2]=f[n>>2],f[b+4>>2]=A,s=b+8|0,A=f[(b=n+8|0)+4>>2],f[s>>2]=f[b>>2],f[s+4>>2]=A,f[n+168>>2]=1):fi[f[f[n>>2]+16>>2]](I,f[n+4>>2],0),A=f[(b=h+8|0)+4>>2],f[(s=n+96|0)>>2]=f[b>>2],f[s+4>>2]=A,s=f[h+64>>2],N=f[h+68>>2],b=f[h>>2],R=f[h+4>>2],B=(v=f[l>>2])+(y=f[g>>2])|0,E=(A=f[l+4>>2])+f[g+4>>2]|0,f[l>>2]=B,f[l+4>>2]=B>>>0>>0?E+1|0:E,f[n+136>>2]=1,f[n+140>>2]=0,f[n+120>>2]=1,f[n+124>>2]=0,f[n+104>>2]=1,f[n+108>>2]=0,f[n+88>>2]=b,f[n+92>>2]=R,f[n+152>>2]=s,f[n+156>>2]=N,f[n+144>>2]=v,f[n+148>>2]=A,f[n+128>>2]=v,f[n+132>>2]=A,f[n+112>>2]=v,f[n+116>>2]=A,w=ze(w,ze(n,n+88|0,88),88)+88|0,(0|u)!=(0|a)|(0|o)!=(0|t););return f[r+8>>2]=c,void(S=n+176|0)}f[n+104>>2]=0,f[n+92>>2]=1,f[n+88>>2]=1057100,f[n+96>>2]=4,f[n+100>>2]=0,Me(n+88|0,A),$f()}function Cr(r,e){var i,A=0,a=0,b=0,k=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0;i=r+20|0,l=8,k=8;r:{for(;;){if(k){if(A=f[r>>2],(k=(7&f[r+4>>2])<<29|A>>>3)>>>0>=(a=f[r+12>>2])>>>0)break r;for(s=f[r+16>>2],c=0;;){if(k>>>0<=s>>>0)u=f[r+28>>2],A=a;else{e:{i:{if((o=((A=(u=f[r+28>>2])-2|0)>>>0<=u>>>0?A:0)+s|0)>>>0<=a>>>0){if((0|a)!=(0|o))break i;A=a;break e}xe(o,a,1055768),$f()}for(h=f[r+8>>2],b=0;;){A=b,b=0;i:{A:switch(n[o+h|0]){case 0:b=A+1|0;break i;case 3:break A;default:break i}(0|A)<2||(f[i>>2]==(0|u)&&he(i),A=u+1|0,f[r+28>>2]=A,f[f[r+24>>2]+(u<<2)>>2]=o,u=A)}if((0|(o=o+1|0))==(0|a))break}A=f[r+12>>2]}s=a-u|0,f[r+16>>2]=s}h=f[r+8>>2];e:if(u)for(o=f[r+24>>2],b=u<<2;;){if(t[o>>2]>k>>>0)break e;if(k=k+1|0,o=o+4|0,!(b=b-4|0))break}if(A>>>0<=k>>>0)break r;if(b=f[r+4>>2],b=(u=(a=f[r>>2])+1|0)?b:b+1|0,f[r>>2]=u,f[r+4>>2]=b,!(n[k+h|0]>>>(7&~a)&1|c>>>0>31)){if(c=c+1|0,(a=A)>>>0>(k=(7&b)<<29|u>>>3)>>>0)continue;break r}break}l=(k=(256+((1&(b=(A=Zr(r,c))+(-1^(a=-1<>1:0-(b>>1)|0)+l|0)|0)%256|0)||l}else k=0;if((0|(v=v+1|0))==(0|e))break}return}Ve(1055784),$f()}function pr(r,e,A,n,t){var b,k=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0;b=(k=2097152&(o=f[r+8>>2]))?43:1114112,k=(k>>>21|0)+t|0,8388608&o?(u=0,A&&(u=i[0|e]>-65,1!=(0|A)&&(u=u+(i[e+1|0]>-65)|0)),k=u+k|0):e=0;r:{e:{if((s=a[r+12>>1])>>>0>k>>>0){if(16777216&o)break e;u=s-k|0,k=0;i:{A:switch((o>>>29&3)-1|0){case 0:case 2:k=u;break i;case 1:break A;default:break i}k=(65534&u)>>>1|0}for(l=2097151&o,s=f[r+4>>2],r=f[r>>2];;){if((65535&c)>>>0<(65535&k)>>>0){if(o=1,c=c+1|0,!(0|fi[f[s+16>>2]](r,l)))continue;break r}break}if(o=1,We(r,s,b,e,A))break r;if(0|fi[f[s+12>>2]](r,n,t))break r;for(e=u-k&65535,c=0;;){if(e>>>0<=(65535&c)>>>0)return 0;if(c=c+1|0,0|fi[f[s+16>>2]](r,l))break}break r}if(o=1,We(k=f[r>>2],r=f[r+4>>2],b,e,A))break r;o=0|fi[f[r+12>>2]](k,n,t);break r}if(v=f[r+12>>2],u=f[r+8>>2],f[r+8>>2]=-1612709888&u|536870960,o=1,!We(l=f[r>>2],h=f[r+4>>2],b,e,A)){for(e=s-k&65535;;){if(e>>>0>(65535&c)>>>0){if(c=c+1|0,!(0|fi[f[h+16>>2]](l,48)))continue;break r}break}if(!(0|fi[f[h+12>>2]](l,n,t)))return f[r+8>>2]=u,f[r+12>>2]=v,0}}return o}function mr(r){var e,i,A,n=0,a=0,t=0,b=0,u=0,o=0,c=0,s=0;a=f[r+4>>2],i=f[r>>2],f[r>>2]=8,f[r+4>>2]=8,A=(a-i>>>0)/88|0,e=f[r+8>>2];r:{e:{if((0|a)==(0|i)){if(!(t=f[r+16>>2]))break e;if((0|(a=f[r+12>>2]))==(0|(n=f[e+8>>2])))break r;Pe((r=f[e+4>>2])+k(n,88)|0,r+k(a,88)|0,k(t,88));break r}i:{A:{f:{for(;;){b=(s=k(c,88)+i|0)+76|0;n:if(n=f[s+80>>2]){if(a=f[b>>2],u=0,1!=(0|n)){for(o=1&n,t=-2&n,n=a;fi[f[f[n>>2]+16>>2]](n+12|0,f[n+4>>2],f[n+8>>2]),fi[f[f[n+16>>2]+16>>2]](n+28|0,f[n+20>>2],f[n+24>>2]),n=n+32|0,(0|t)!=(0|(u=u+2|0)););if(!o)break n}fi[f[f[(a=a+(u<<4)|0)>>2]+16>>2]](a+12|0,f[a+4>>2],f[a+8>>2])}if(o=f[s+72>>2]){if(t=f[b>>2],(b=-8&(a=f[t-4>>2]))>>>0<(((n=3&a)?4:8)|(a=o<<4))>>>0)break f;if(b>>>0>a+39>>>0&&n)break A;nr(t)}if((0|A)==(0|(c=c+1|0)))break}if(!(t=f[r+16>>2]))break e;if((0|(a=f[r+12>>2]))==(0|(n=f[e+8>>2])))break i;Pe((r=f[e+4>>2])+k(n,88)|0,r+k(a,88)|0,k(t,88));break i}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}f[e+8>>2]=n+t}return}f[e+8>>2]=n+t}function Gr(r,e,A){var n,a=0,t=0,b=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0,N=0,R=0,C=0,p=0;S=n=S-192|0,a=1;r:if((0|(u=f[r+8>>2]))!=(0|e))for(_=(b=f[r+4>>2])+k(e,88)|0,t=e=f[A+28>>2],c=f[A+16>>2],a=f[A+24>>2],I=(e=(0|(o=f[A+20>>2]))>(0|e)?1:a>>>0>>0&(0|e)<=(0|o))?c:a,Q=e?o:t,N=(l=f[A>>2])+12|0,e=b+k(u,88)|0,R=n+188|0,v=n+96|0,g=f[A+12>>2],h=f[A+8>>2],u=f[A+4>>2],C=n+160|0;;){if((0|c)==(0|I)&(0|o)==(0|Q)){a=0;break r}if(o=(c=c+1|0)?o:o+1|0,f[A+16>>2]=c,f[A+20>>2]=o,f[(a=n)+160>>2]=0,f[a+164>>2]=4,f[a+168>>2]=0,f[a+172>>2]=0,i[a+158|0]=0,i[a+156|0]=0,f[a+152>>2]=0,f[a+136>>2]=0,f[a+140>>2]=0,f[a+120>>2]=0,f[a+124>>2]=0,f[a+104>>2]=0,f[a+108>>2]=0,f[a+88>>2]=0,f[a+92>>2]=0,fi[f[f[l>>2]>>2]](a+176|0,N,f[l+4>>2],f[l+8>>2]),(t=f[a+184>>2])?(f[a+172>>2]=t,ce(C,1058736),t=f[a+180>>2],b=f[a+164>>2],f[b>>2]=f[a+176>>2],f[b+4>>2]=t,s=b+8|0,t=f[(b=a+184|0)+4>>2],f[s>>2]=f[b>>2],f[s+4>>2]=t,f[a+168>>2]=1):fi[f[f[a+176>>2]+16>>2]](R,f[a+180>>2],0),t=f[(b=u+8|0)+4>>2],f[v>>2]=f[b>>2],f[v+4>>2]=t,b=f[u+64>>2],p=f[u+68>>2],d=f[u>>2],w=f[u+4>>2],B=(s=f[h>>2])+(y=f[g>>2])|0,E=(t=f[h+4>>2])+f[g+4>>2]|0,f[h>>2]=B,f[h+4>>2]=B>>>0>>0?E+1|0:E,f[a+136>>2]=1,f[n+140>>2]=0,f[n+120>>2]=1,f[n+124>>2]=0,f[n+104>>2]=1,f[n+108>>2]=0,f[n+88>>2]=d,f[n+92>>2]=w,f[n+152>>2]=b,f[n+156>>2]=p,f[n+144>>2]=s,f[n+148>>2]=t,f[n+128>>2]=s,f[n+132>>2]=t,f[n+112>>2]=s,f[n+116>>2]=t,ze(n+8|0,v,80),!w&2==(0|d)){a=0;break r}if(f[e>>2]=d,f[e+4>>2]=w,ze(e+8|0,n+8|0,80),a=1,f[r+8>>2]=f[r+8>>2]+1,(0|_)==(0|(e=e+88|0)))break}return S=n+192|0,a}function Yr(r,e){var i=0,A=0,n=0,a=0,t=0,b=0,u=0,o=0,c=0,s=0,l=0;if(f[r+168>>2]&&1&f[r+48>>2]&&f[r+408>>2]&&1&f[r+288>>2]&&(A=f[(a=r+416|0)>>2],n=f[(i=r+296|0)>>2],a=f[a+4>>2],i=f[i+4>>2],f[(o=((t=(0|a)<(0|i)?1:A>>>0>>0&(0|i)>=(0|a))?360:240)+r|0)+48>>2]&&(a=f[(i=r+176|0)>>2],A=f[(n=r+56|0)>>2],i=f[i+4>>2],n=f[n+4>>2],c=k(b=(0|i)<(0|n)?1:(0|i)<=(0|n)&A>>>0>a>>>0,120)+r|0,1&f[c+48>>2]&&f[(t=(t?240:360)+r|0)+48>>2]&&(n=k(A>>>0<=a>>>0&(0|i)>=(0|n)|(0|i)>(0|n),120)+r|0,1&f[n+48>>2]&&(a=f[(r=o+56|0)>>2],i=f[(A=c+56|0)>>2],u=(b=(0|(r=f[r+4>>2]))<(0|(A=f[A+4>>2]))?1:(0|r)<=(0|A)&i>>>0>a>>>0)?n:o,a=f[(r=t+56|0)>>2],i=f[(A=n+56|0)>>2],r=f[r+4>>2],A=f[A+4>>2],f[(u=(s=(0|r)<(0|A)?1:(0|r)<=(0|A)&i>>>0>a>>>0)?t:u)+48>>2]&&1&f[(l=b?c:s?o:n)+48>>2])))))return r=f[(A=l+56|0)>>2],a=f[(i=u+56|0)>>2],A=f[A+4>>2],i=f[i+4>>2],e=ze(e,b?o:c,120),ze(e+120|0,(r=(0|i)<=(0|A)&r>>>0>a>>>0|(0|i)<(0|A))?u:l,120),ze(e+240|0,r?l:u,120),void ze(e+360|0,s?n:t,120);Ve(1058820),$f()}function Wr(r,e,i,A){var n,a=0,t=0,b=0,k=0,u=0;S=n=S-16|0,t=f[e+8>>2],f[e+8>>2]=1!=(0|t)?t:0;r:{e:{i:{if(1!=(0|t)){A:{if((0|A)>=0){if(!A){t=1;break A}if(k=A,t=V(A))break A;r=1}else r=0;Ze(r,1057036),$f()}if(ze(t,i,A),i=f[e+8>>2],f[e+8>>2]=i-1,1==(0|i)){if((0|(i=f[e+4>>2]))<0)break i;if(a=f[e>>2],(u=-8&(b=f[a-4>>2]))>>>0>>0)break e;if(i+39>>>0>>0&&b)break r;if(nr(a),(i=-8&(a=f[e-4>>2]))>>>0<((a&=3)?16:20)>>>0)break e;if(i>>>0>=52&&a)break r;nr(e)}}else{if((a=-8&(k=f[e-4>>2]))>>>0<((b=3&k)?16:20)>>>0)break e;if(k=f[e+4>>2],t=f[e>>2],a>>>0>=52&&b)break r;nr(e),Pe(t,i,A)}return f[r+8>>2]=A,f[r+4>>2]=t,f[r>>2]=k,void(S=n+16|0)}ge(1051952,43,n+15|0,1051936,1052012),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Dr(r,e){var i,n,a=0,t=0,b=0,k=0,u=0,o=0,c=0,s=0,l=0,h=0,g=0,y=0,I=0,R=0,C=0,p=0,m=0,G=0;S=i=S-16|0,v(i+8|0,0|e),(u=f[i+12>>2])?1&(b=f[i+8>>2])?(o=1051916,c=b):(o=1051896,c=1|b):(o=1051612,u=0,b=1,c=0),(n=0|d(0|e))?(w(i+8|0,0|n),k=0,(a=f[i+8>>2])&&((s=f[i+12>>2])?1&a?(y=a,k=1051916):(y=1|a,k=1051896):(s=0,a=1,k=1051612)),B(i+8|0,0|n),(t=f[i+8>>2])&&((l=f[i+12>>2])?1&t?(h=1051916,I=t):(I=1|t,h=1051896):(h=1051612,l=0,t=1)),g=16777215!=(0|(R=0|E(0|n))),m=16777215!=(0|(C=0|_(0|n))),G=16777215!=(0|(p=0|Q(0|n))),n>>>0<132||N(0|n)):g=2,f[r+56>>2]=c,f[r+52>>2]=u,f[r+48>>2]=b,f[r+44>>2]=o,f[r+40>>2]=I,f[r+36>>2]=l,f[r+32>>2]=t,f[r+28>>2]=h,f[r+24>>2]=y,f[r+20>>2]=s,f[r+16>>2]=a,f[r+12>>2]=k,A[r+10>>1]=p,A[r+8>>1]=G,A[r+6>>1]=C,A[r+4>>1]=m,A[r+2>>1]=R,A[r>>1]=g,e>>>0>=132&&N(0|e),S=i+16|0}function Sr(r){var e,A=0,n=0,a=0,t=0;S=e=S-16|0;r:{e:{if((n=f[r+8>>2])-(A=f[r+4>>2])>>>0>=4)t=f[r>>2],i[0|(a=t+A|0)]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=16;else if(or(r,4),A=f[r+4>>2],t=f[r>>2],i[0|(n=A+t|0)]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=16,(a=(n=f[r+8>>2])-A|0)>>>0<=3)break e;A=A+4|0,f[r+4>>2]=A,n-A>>>0<=3&&(or(r,4),t=f[r>>2],A=f[r+4>>2]),i[0|(A=A+t|0)]=115,i[A+1|0]=116,i[A+2|0]=116,i[A+3|0]=115;i:{if((t=(n=f[r+8>>2])-(A=f[r+4>>2])|0)>>>0>3){if(A=A+4|0,f[r+4>>2]=A,n-A>>>0>=4)t=f[r>>2],i[0|(a=t+A|0)]=0,i[a+1|0]=0,i[a+2|0]=0,i[a+3|0]=0;else if(or(r,4),A=f[r+4>>2],t=f[r>>2],i[0|(n=A+t|0)]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0,(a=(n=f[r+8>>2])-A|0)>>>0<=3)break e;if(A=A+4|0,f[r+4>>2]=A,n-A>>>0>=4)i[0|(n=A+t|0)]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0;else if(or(r,4),n=(A=f[r+4>>2])+f[r>>2]|0,i[0|n]=0,i[n+1|0]=0,i[n+2|0]=0,i[n+3|0]=0,(n=f[r+8>>2]-A|0)>>>0<=3)break i;return f[r+4>>2]=A+4,void(S=e+16|0)}f[e+12>>2]=t;break r}f[e+12>>2]=n;break r}f[e+12>>2]=a}f[e+8>>2]=4,pe(e+8|0),$f()}function Fr(r,e){var i,A=0,a=0,t=0,b=0,k=0,u=0,o=0,c=0;S=i=S+-64|0;r:{e:{if(k=f[e+8>>2])for(A=f[e+4>>2];;){if(!n[A+a|0])break e;if((0|k)==(0|(a=a+1|0)))break}f[r>>2]=0,f[r+4>>2]=0;break r}qr(i,e,a),k=f[i+4>>2];e:{if(44==(0|(o=f[i+8>>2]))){A=k,u=44,c=1057356;i:{for(;;){if((0|(b=n[0|A]))==(0|(a=n[0|c]))){if(A=A+1|0,c=c+1|0,u=u-1|0)continue;break i}break}t=b-a|0}if(!t){if(f[i+16>>2]=1,!(t=f[e+8>>2]))break e;if(f[e+8>>2]=t-1,A=f[e+4>>2],f[e+4>>2]=A+1,!(t>>>0<9)){f[e+8>>2]=t-9,f[e+4>>2]=A+9,f[r>>2]=1,f[r+4>>2]=0,e=r,b=(r=16711680&(a=n[A+1|0]|n[A+2|0]<<8|n[A+3|0]<<16|n[A+4|0]<<24))<<24,r=t=r>>>8|0,u=b,b=(t=-16777216&a)>>>24|0,t=u|t<<8,b=r|b|(o=a<<24|(65280&a)<<8),r=n[A+5|0]|n[A+6|0]<<8|n[A+7|0]<<16|n[A+8|0]<<24,f[e+8>>2]=-16777216&((255&r)<<24|a>>>8)|16711680&((16777215&r)<<8|a>>>24)|r>>>8&65280|r>>>24|t,f[e+12>>2]=b,fi[f[f[i>>2]+16>>2]](i+12|0,k,44);break r}}}f[r>>2]=0,f[r+4>>2]=0,fi[f[f[i>>2]+16>>2]](i+12|0,k,o);break r}f[i+44>>2]=0,f[i+24>>2]=2,f[i+20>>2]=1058600,f[i+32>>2]=2,f[i+36>>2]=0,f[i+56>>2]=i+44,f[i+60>>2]=3,f[i+48>>2]=i+16,f[i+52>>2]=3,f[i+28>>2]=i+48,Me(i+20|0,1058616),$f()}S=i- -64|0}function Tr(r,e,A,a){var t,b,k=0,u=0;S=t=S-48|0;r:if((b=f[e+8>>2])>>>0>=10){if(f[e+8>>2]=b-1,k=f[e+4>>2],f[e+4>>2]=k+1,73==n[0|k]&&(f[e+8>>2]=b-2,f[e+4>>2]=k+2,68==n[k+1|0]&&(f[e+8>>2]=b-3,f[e+4>>2]=k+3,51==n[k+2|0]))){f[e+8>>2]=b-4,f[e+4>>2]=k+4,u=n[k+3|0],i[t+15|0]=u;e:{if((u-2&255)>>>0>2){if(f[t+36>>2]=1,f[t+32>>2]=1057284,f[t+20>>2]=2,f[t+16>>2]=1057268,f[t+28>>2]=1,f[t+40>>2]=t+15,f[t+44>>2]=7,f[t+24>>2]=t+40,Mr(t,t+16|0),-2147483648!=(0|(u=f[t>>2])))break e;u=n[t+4|0]}i[r+36|0]=u,f[r+24>>2]=A,f[r+28>>2]=a,f[r+16>>2]=1,f[r+20>>2]=0,f[r>>2]=0,f[r+4>>2]=0,f[e+8>>2]=b-10,f[e+4>>2]=k+10,i[r+37|0]=n[k+5|0],f[r+32>>2]=127&n[k+9|0]|(127&n[k+7|0])<<14|(127&n[k+6|0])<<21|(127&n[k+8|0])<<7;break r}Re(u,f[t+4>>2]),f[r>>2]=2,f[r+4>>2]=0;break r}f[r>>2]=2,f[r+4>>2]=0}else f[r>>2]=2,f[r+4>>2]=0;S=t+48|0}function Mr(r,e){var i,A=0,n=0,a=0,t=0,b=0,k=0;S=i=S-16|0;r:{e:{i:{A:{if(A=f[e+4>>2]){if(t=f[e>>2],a=3&A,A>>>0<4)A=0;else for(n=t+28|0,k=-4&A,A=0;A=f[n>>2]+(f[n-8>>2]+(f[n-16>>2]+(f[n-24>>2]+A|0)|0)|0)|0,n=n+32|0,(0|k)!=(0|(b=b+4|0)););if(a)for(n=4+((b<<3)+t|0)|0;A=f[n>>2]+A|0,n=n+8|0,a=a-1|0;);if(!f[e+12>>2])break i;if(A>>>0>15)break A;if(f[t+4>>2])break A;break e}if(A=0,!f[e+12>>2])break e}A=((0|A)>0?A:0)<<1}if((0|A)>=0){if(!A)break e;if(n=V(A))break r;r=1}else r=0;Ze(r,1051464),$f()}A=0,n=1}f[i+8>>2]=0,f[i+4>>2]=n,f[i>>2]=A,Qr(i,1051440,e)&&(ge(1051496,86,i+15|0,1051480,1051584),$f()),e=f[i+4>>2],f[r>>2]=f[i>>2],f[r+4>>2]=e,f[r+8>>2]=f[i+8>>2],S=i+16|0}function Or(r,e){var i=0,A=0,n=0,a=0,t=0,b=0;return-65587-(r=r>>>0<=16?16:r)>>>0<=e>>>0||(i=V(12+((n=e>>>0<11?16:e+11&-8)+r|0)|0))&&(e=i-8|0,(A=r-1|0)&i?(b=r,A=(-8&(t=f[(a=i-4|0)>>2]))-(i=(r=((r=(i+A&0-r)-8|0)-e>>>0<=16?b:0)+r|0)-e|0)|0,3&t?(f[r+4>>2]=A|1&f[r+4>>2]|2,f[(A=r+A|0)+4>>2]=1|f[A+4>>2],f[a>>2]=i|1&f[a>>2]|2,f[(A=e+i|0)+4>>2]=1|f[A+4>>2],vr(e,i)):(e=f[e>>2],f[r+4>>2]=A,f[r>>2]=e+i)):r=e,3&(e=f[r+4>>2])&&((i=-8&e)>>>0<=n+16>>>0||(f[r+4>>2]=n|1&e|2,e=r+n|0,n=i-n|0,f[e+4>>2]=3|n,f[(i=r+i|0)+4>>2]=1|f[i+4>>2],vr(e,n))),A=r+8|0),A}function Zr(r,e){var i,A=0,a=0,t=0,b=0,k=0;S=i=S-32|0;r:{e:{i:{A:{f:if(e)for(a=f[r>>2],A=f[r+4>>2];;){if(!(7&a)){if(e>>>0>=8){for(;;){if(7&a)break i;if(Vr(i+16|0,r,(7&A)<<29|a>>>3),!n[i+16|0])break e;if(t=n[i+17|0],A=f[r+4>>2],A=(a=f[r>>2]+8|0)>>>0<8?A+1|0:A,f[r>>2]=a,f[r+4>>2]=A,b=b<<8|t,!((e=e-8|0)>>>0>7))break}if(!e)break f}for(;;){if(Vr(i+8|0,r,(7&A)<<29|a>>>3),!n[i+8|0])break r;if(k=n[i+9|0],A=f[r+4>>2],A=(a=(t=f[r>>2])+1|0)?A:A+1|0,f[r>>2]=a,f[r+4>>2]=A,b=k>>>(7&~t)&1|b<<1,!(e=e-1|0))break}break f}if(Vr(i+24|0,r,(7&A)<<29|a>>>3),!n[i+24|0])break A;if(k=n[i+25|0],A=f[r+4>>2],A=(a=(t=f[r>>2])+1|0)?A:A+1|0,f[r>>2]=a,f[r+4>>2]=A,b=k>>>(7&~t)&1|b<<1,!(e=e-1|0))break}return S=i+32|0,b}Ve(1055784),$f()}Ye(1055816,40,1055856),$f()}Ve(1055800),$f()}Ve(1055784),$f()}function Lr(r,e){var i,A=0,n=0,a=0,t=0,b=0;S=i=S-80|0;r:{if(1&(A=f[e+12>>2])){t=(n=A>>>5|0)+(a=f[e+4>>2])|0,f[i+28>>2]=t,A=f[e>>2]-n|0,f[i+24>>2]=A,b=(e=f[e+8>>2])+n|0,f[i+20>>2]=b;e:{i:{if((0|e)!=(0|a)){if(e=V(12))break i;$f()}if(se(i+8|0,i+20|0),!(t=f[i+12>>2])){t=0,A=1,e=0,a=1051612;break e}if(1&(A=f[i+8>>2])){e=A,a=1051916;break e}e=1|A,a=1051896;break e}f[e+8>>2]=1,f[e+4>>2]=b,f[e>>2]=A,a=1052028}if(f[i+32>>2]=n,n>>>0>t>>>0)break r;f[r+12>>2]=e,f[r>>2]=a,f[r+8>>2]=t-n,f[r+4>>2]=A+n}else f[r+12>>2]=A,f[r>>2]=1058540,A=f[e+4>>2],f[r+4>>2]=f[e>>2],f[r+8>>2]=A;return void(S=i+80|0)}f[i+60>>2]=t,f[i+40>>2]=2,f[i+36>>2]=1058600,f[i+48>>2]=2,f[i+52>>2]=0,f[i+72>>2]=i+60,f[i+76>>2]=3,f[i+64>>2]=i+32,f[i+68>>2]=3,f[i+44>>2]=i- -64,Me(i+36|0,1058616),$f()}function Ur(r,e){var i=0,A=0,n=0,a=0,t=0,b=0;r:{e:{i:{if(e>>>0>=256){A=f[r+24>>2];A:{f:{if((0|(e=f[r+12>>2]))==(0|r)){if(e=f[r+20>>2],i=f[(e?20:16)+r>>2])break f;e=0;break A}i=f[r+8>>2],f[i+12>>2]=e,f[e+8>>2]=i;break A}for(n=e?r+20|0:r+16|0;a=n,n=(i=f[(e=i)+20>>2])?e+20|0:e+16|0,i=f[(i?20:16)+e>>2];);f[a>>2]=0}if(!A)break e;A:{if(i=f[r+28>>2],f[(n=1059504+(i<<2)|0)>>2]!=(0|r)){if(f[A+16>>2]==(0|r))break A;if(f[A+20>>2]=e,e)break i;break e}if(f[n>>2]=e,!e)break r;break i}if(f[A+16>>2]=e,e)break i;break e}return(0|(i=f[r+12>>2]))!=(0|(r=f[r+8>>2]))?(f[r+12>>2]=i,void(f[i+8>>2]=r)):(t=1059912,b=f[264978]&Ai(e>>>3|0),void(f[t>>2]=b))}if(f[e+24>>2]=A,(i=f[r+16>>2])&&(f[e+16>>2]=i,f[i+24>>2]=e),r=f[r+20>>2])return f[e+20>>2]=r,void(f[r+24>>2]=e)}return}t=1059916,b=f[264979]&Ai(i),f[t>>2]=b}function Vr(r,e,A){var a,b=0,k=0,u=0,o=0,c=0,s=0,l=0;if(!((a=f[e+12>>2])>>>0<=A>>>0)){if((b=f[e+16>>2])>>>0>=A>>>0)u=f[e+28>>2],k=a;else{r:{e:{if(a>>>0>=(b=((u=f[e+28>>2])>>>0>=(k=u-2|0)>>>0?k:0)+b|0)>>>0){if((0|b)!=(0|a))break e;k=a;break r}xe(b,a,1055768),$f()}for(c=e+20|0,s=f[e+8>>2];;){k=o,o=0;e:{i:switch(n[b+s|0]){case 0:o=k+1|0;break e;case 3:break i;default:break e}(0|k)<2||(f[c>>2]==(0|u)&&he(c),k=u+1|0,f[e+28>>2]=k,f[f[e+24>>2]+(u<<2)>>2]=b,u=k)}if((0|a)==(0|(b=b+1|0)))break}k=f[e+12>>2]}f[e+16>>2]=a-u}r:if(u)for(b=f[e+24>>2],o=u<<2;;){if(t[b>>2]>A>>>0)break r;if(A=A+1|0,b=b+4|0,!(o=o-4|0))break}A>>>0>=k>>>0||(b=n[f[e+8>>2]+A|0],l=1)}i[r+1|0]=b,i[0|r]=l}function Xr(r,e,i){var a=0,t=0,b=0,k=0,u=0,o=0,c=0,s=0,l=0;r:{e:{if((t=(a=f[i+8>>2])+e|0)>>>0<=(b=f[i+4>>2])<<3>>>0){if(k=t>>>3|0,c=f[i>>2],!b){i=0;break r}if(u=n[0|c]&255>>>(7&a),(o=8-a|0)>>>0>e>>>0){i=0;break e}if(i=u<<(15&(e=e-o|0)),t>>>0<8)break r;for(s=c+1|0,a=b-1|0,t=k;;){if(!a|!e)break r;if(o=8,u=n[0|s],e>>>0<8){a=0;break e}if(s=s+1|0,a=a-1|0,i=(u<<(15&(e=e-8|0)))+i|0,!(t=t-1|0))break}break r}return f[r+4>>2]=e,void(f[r>>2]=0)}l=e+a|0,i=(u>>>(o-e&15)|0)+i|0}if(b>>>0>=k>>>0)return A[r+16>>1]=i,f[r+12>>2]=l,f[r>>2]=3,f[r+8>>2]=b-k,void(f[r+4>>2]=k+c);xe(k,b,1053076),$f()}function Jr(r,e){var A=0,a=0,t=0,b=0,k=0,u=0,o=0,c=0,s=0,l=0,h=0;r:{e:{if((a=(A=f[e+8>>2])+1|0)>>>0<=(t=f[e+4>>2])<<3>>>0){if(b=a>>>3|0,o=f[e>>2],t){if(u=n[0|o]&255>>>(7&A),c=1,(s=8-A|0)>>>0>1)break e;if(k=u<<(e=A-7|0),a>>>0<8)break r;for(l=o+1|0,A=t-1|0,c=7&e,a=b;;){if(!A|!e)break r;if(u=n[0|l],s=8,e>>>0<8){A=0;break e}if(l=l+1|0,A=A-1|0,k=(u<<(e=e-8|0))+k|0,!(a=a-1|0))break}}break r}return f[r>>2]=0,void(f[r+4>>2]=1)}h=A+c|0,k=(u>>>s-c|0)+k|0}if(t>>>0>=b>>>0)return f[r+12>>2]=h,f[r>>2]=3,i[r+16|0]=!!(0|k),f[r+8>>2]=t-b,void(f[r+4>>2]=b+o);xe(b,t,1053076),$f()}function xr(r,e){var i=0,A=0,n=0,a=0,t=0,b=0,u=0,o=0;r:{e:{if(e)for(;;){if(o=k(u,88)+r|0,A=f[(n=o+76|0)>>2],i=f[o+80>>2]){a=0;i:{if(1!=(0|i)){for(t=1&i,b=-2&i,i=A;fi[f[f[i>>2]+16>>2]](i+12|0,f[i+4>>2],f[i+8>>2]),fi[f[f[i+16>>2]+16>>2]](i+28|0,f[i+20>>2],f[i+24>>2]),i=i+32|0,(0|b)!=(0|(a=a+2|0)););if(!t)break i}fi[f[f[(A=(a<<4)+A|0)>>2]+16>>2]](A+12|0,f[A+4>>2],f[A+8>>2])}A=f[n>>2]}if(n=f[o+72>>2]){if((t=-8&(i=f[A-4>>2]))>>>0<(((b=3&i)?4:8)|(i=n<<4))>>>0)break e;if(i+39>>>0>>0&&b)break r;nr(A)}if((0|(u=u+1|0))==(0|e))break}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Hr(r,e){var i=0,A=0,n=0,a=0,t=0,b=0,u=0,o=0;r:{e:{if(e)for(;;){if(o=k(u,104)+r|0,A=f[(n=o+92|0)>>2],i=f[o+96>>2]){a=0;i:{if(1!=(0|i)){for(t=1&i,b=-2&i,i=A;fi[f[f[i>>2]+16>>2]](i+12|0,f[i+4>>2],f[i+8>>2]),fi[f[f[i+16>>2]+16>>2]](i+28|0,f[i+20>>2],f[i+24>>2]),i=i+32|0,(0|b)!=(0|(a=a+2|0)););if(!t)break i}fi[f[f[(A=(a<<4)+A|0)>>2]+16>>2]](A+12|0,f[A+4>>2],f[A+8>>2])}A=f[n>>2]}if(n=f[o+88>>2]){if((t=-8&(i=f[A-4>>2]))>>>0<(((b=3&i)?4:8)|(i=n<<4))>>>0)break e;if(i+39>>>0>>0&&b)break r;nr(A)}if((0|(u=u+1|0))==(0|e))break}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function jr(r,e){var i=0,A=0,n=0,a=0,t=0,b=0,u=0,o=0;r:{e:{if(e)for(;;){if(o=k(u,120)+r|0,A=f[(n=o+108|0)>>2],i=f[o+112>>2]){a=0;i:{if(1!=(0|i)){for(t=1&i,b=-2&i,i=A;fi[f[f[i>>2]+16>>2]](i+12|0,f[i+4>>2],f[i+8>>2]),fi[f[f[i+16>>2]+16>>2]](i+28|0,f[i+20>>2],f[i+24>>2]),i=i+32|0,(0|b)!=(0|(a=a+2|0)););if(!t)break i}fi[f[f[(A=(a<<4)+A|0)>>2]+16>>2]](A+12|0,f[A+4>>2],f[A+8>>2])}A=f[n>>2]}if(n=f[o+104>>2]){if((t=-8&(i=f[A-4>>2]))>>>0<(((b=3&i)?4:8)|(i=n<<4))>>>0)break e;if(i+39>>>0>>0&&b)break r;nr(A)}if((0|(u=u+1|0))==(0|e))break}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function zr(r,e,i,A){var n,a;S=n=S+-64|0,a=f[e+8>>2],f[n+12>>2]=a,f[n+16>>2]=i,f[n+20>>2]=A;r:{if(i>>>0<=A>>>0){if(A>>>0>a>>>0)break r;return(0|i)==(0|A)?(f[r+12>>2]=0,f[r+4>>2]=1,f[r+8>>2]=0,f[r>>2]=1057440):(fi[f[f[e>>2]>>2]](n+24|0,e+12|0,f[e+4>>2],a),f[(e=n+32|0)>>2]=f[n+20>>2]-i,f[n+28>>2]=f[n+28>>2]+i,i=f[n+28>>2],f[r>>2]=f[n+24>>2],f[r+4>>2]=i,i=f[e+4>>2],f[(r=r+8|0)>>2]=f[e>>2],f[r+4>>2]=i),void(S=n- -64|0)}f[n+28>>2]=2,f[n+24>>2]=1057504,f[n+36>>2]=2,f[n+40>>2]=0,f[n+56>>2]=n+20,f[n+60>>2]=3,f[n+48>>2]=n+16,f[n+52>>2]=3,f[n+32>>2]=n+48,Me(n+24|0,1057520),$f()}f[n+28>>2]=2,f[n+24>>2]=1057564,f[n+36>>2]=2,f[n+40>>2]=0,f[n+56>>2]=n+12,f[n+60>>2]=3,f[n+48>>2]=n+20,f[n+52>>2]=3,f[n+32>>2]=n+48,Me(n+24|0,1057580),$f()}function Pr(r,e,i,A){var a,t=0,b=0,k=0,u=0,o=0;S=a=S-16|0,u=!e;r:{e:{for(;;){if(t=e,u)break e;if(r=(k=r)+t|0,e=0,u=1,t){i:{A:{f:{for(;;){if(255==n[e+k|0])break f;if((0|t)==(0|(e=e+1|0)))break}e=0;break A}if(b=e+1|0,e>>>0>=t>>>0)break i;r=b+k|0,e=t-b|0,u=(0|t)==(0|b),t=b}if(k=(o=1&A)+k|0,b=f[i+4>>2],(A=f[i+8>>2]-b|0)>>>0<(t=t-o|0)>>>0&&(or(i,t),b=f[i+4>>2],A=f[i+8>>2]-b|0),ze(f[i>>2]+b|0,k,t),A>>>0>>0)break r;if(f[i+4>>2]=t+b,A=0,!t)continue;A=255==n[(t+k|0)-1|0];continue}break}}Je(b,t,1057200),$f()}return S=a+16|0,1&A}f[a+12>>2]=A,f[a+8>>2]=t,pe(a+8|0),$f()}function Kr(r,e,A){var a=0,t=0,b=0,u=0,o=0,c=0,s=0;if(a=10,(t=e)>>>0>=1e3)for(b=t;u=A+a|0,s=(c=((65535&(o=b-k(t=(b>>>0)/1e4|0,1e4)|0))>>>0)/100|0)<<1,i[u-3|0]=n[s+1052265|0],i[u-4|0]=n[s+1052264|0],o=(o-k(c,100)&65535)<<1,i[u-1|0]=n[o+1052265|0],i[u-2|0]=n[o+1052264|0],a=a-4|0,u=b>>>0>9999999,b=t,u;);t>>>0<=9?b=t:(t=(t-k(b=((65535&t)>>>0)/100|0,100)&65535)<<1,i[(A+a|0)-1|0]=n[t+1052265|0],i[(a=a-2|0)+A|0]=n[t+1052264|0]),!b&&e||(i[(a=a-1|0)+A|0]=n[1052265+(b<<1&30)|0]),f[r+4>>2]=10-a,f[r>>2]=A+a}function qr(r,e,i){var A,n=0,a=0,t=0;S=A=S-48|0,f[A>>2]=i;r:{e:{if((0|(n=f[e+8>>2]))!=(0|i)){if(i)break e;f[r+8>>2]=0,f[r+12>>2]=0,f[r>>2]=1051612,f[r+4>>2]=f[e+4>>2];break r}n=f[e>>2],a=f[e+4>>2],f[e>>2]=1051612,f[r>>2]=n,f[r+4>>2]=a,a=f[(n=e+8|0)>>2],t=f[n+4>>2],f[n>>2]=0,f[n+4>>2]=0,f[(r=r+8|0)>>2]=a,f[r+4>>2]=t,f[e+4>>2]=f[e+4>>2]+i;break r}i>>>0<=n>>>0?(fi[f[f[e>>2]>>2]](A+4|0,e+12|0,f[e+4>>2],n),f[(n=A+12|0)>>2]=i,a=f[A+8>>2],f[r>>2]=f[A+4>>2],f[r+4>>2]=a,f[e+8>>2]=f[e+8>>2]-i,f[e+4>>2]=f[e+4>>2]+i,e=f[n+4>>2],f[(r=r+8|0)>>2]=f[n>>2],f[r+4>>2]=e):(f[A+28>>2]=n,f[A+8>>2]=2,f[A+4>>2]=1051848,f[A+16>>2]=2,f[A+20>>2]=0,f[A+40>>2]=A+28,f[A+44>>2]=3,f[A+32>>2]=A,f[A+36>>2]=3,f[A+12>>2]=A+32,Me(A+4|0,1051864),$f())}S=A+48|0}function $r(r,e){var i=0,A=0,n=0,a=0;if(i=31,f[r+16>>2]=0,f[r+20>>2]=0,e>>>0<=16777215&&(i=62+((e>>>6-(A=o(e>>>8|0))&1)-(A<<1)|0)|0),f[r+28>>2]=i,n=1059504+(i<<2)|0,!((A=1<>2]=r,f[r+24>>2]=n,f[r+12>>2]=r,f[r+8>>2]=r,void(f[264979]=A|f[264979]);r:{if(A=f[n>>2],(-8&f[A+4>>2])!=(0|e))for(a=e<<(31!=(0|i)?25-(i>>>1|0)|0:0);;){if(!(i=f[(n=(a>>>29&4)+A|0)+16>>2]))break r;if(a<<=1,A=i,(-8&f[i+4>>2])==(0|e))break}else i=A;return e=f[i+8>>2],f[e+12>>2]=r,f[i+8>>2]=r,f[r+24>>2]=0,f[r+12>>2]=i,void(f[r+8>>2]=e)}f[n+16>>2]=r,f[r+24>>2]=A,f[r+12>>2]=r,f[r+8>>2]=r}function re(r,e){e|=0;var A,n=0,a=0;n=A=f[(r|=0)+8>>2],a=1,e>>>0<128||(a=2,e>>>0<2048||(a=e>>>0<65536?3:4)),a>>>0>f[r>>2]-A>>>0&&(ue(r,A,a),n=f[r+8>>2]),n=f[r+4>>2]+n|0;r:{e:{if(e>>>0>=128){if(e>>>0<2048)break e;if(e>>>0>=65536){i[n+3|0]=63&e|128,i[0|n]=e>>>18|240,i[n+2|0]=e>>>6&63|128,i[n+1|0]=e>>>12&63|128;break r}i[n+2|0]=63&e|128,i[0|n]=e>>>12|224,i[n+1|0]=e>>>6&63|128;break r}i[0|n]=e;break r}i[n+1|0]=63&e|128,i[0|n]=e>>>6|192}return f[r+8>>2]=A+a,0}function ee(r,e,i){var A,a=0,t=0,b=0,k=0;S=A=S-16|0,a=(t=i>>>0<5)?5-i|0:5;r:{e:{i:{A:{if(!t){if(i>>>0>>0)break r;f:switch(0|a){case 0:Ne(0,0,1054520),$f();case 1:Ne(1,1,1054536),$f();default:break f}if(a>>>0<=2)break i;if(3==(0|a))break e;if(a>>>0>4){f[r+12>>2]=i-a,f[r+8>>2]=e+a,t=i=(a=14&n[0|e])>>>3|0,b=a<<=29,i=(a=n[e+1|0])>>>10|0,a=b|a<<22,t|=i,k=n[e+4|0]>>>1|0,b=a,i=(a=254&n[e+2|0])>>>18|0,b|=a<<14,a=(e=n[e+3|0])>>>25|0,f[r+16>>2]=k|b|e<<7,f[r+20>>2]=a|i|t,e=0;break A}Ne(4,4,1054584),$f()}f[r+16>>2]=f[A+8>>2],f[r+12>>2]=e,f[r+8>>2]=a,f[r+4>>2]=0,e=1}return f[r>>2]=e,void(S=A+16|0)}Ne(2,2,1054552),$f()}Ne(3,3,1054568),$f()}xe(a,i,1053076),$f()}function ie(r,e,A,a,t){var b,k=0,u=0,o=0;S=b=S-32|0,k=f[264991],f[264991]=k+1;r:{e:{i:{if((0|k)>=0){if(!n[1059500]){if(i[1059500]=1,f[264874]=f[264874]+1,(0|(k=f[264989]))<0)break r;if(f[264989]=k+1,!f[264990])break i;fi[f[e+20>>2]](b+8|0,r),i[b+29|0]=t,i[b+28|0]=a,f[b+24>>2]=A,r=f[b+12>>2],f[b+16>>2]=f[b+8>>2],f[b+20>>2]=r,S=t=S-80|0,f[t+20>>2]=0,f[t+12>>2]=0,f[t+16>>2]=1,ue(k=t+12|0,0,12),e=n[1053252]|n[1053253]<<8|n[1053254]<<16|n[1053255]<<24,r=(u=f[t+20>>2])+f[t+16>>2]|0,A=n[1053248]|n[1053249]<<8|n[1053250]<<16|n[1053251]<<24,i[0|r]=A,i[r+1|0]=A>>>8,i[r+2|0]=A>>>16,i[r+3|0]=A>>>24,i[r+4|0]=e,i[r+5|0]=e>>>8,i[r+6|0]=e>>>16,i[r+7|0]=e>>>24,r=r+8|0,e=n[1053256]|n[1053257]<<8|n[1053258]<<16|n[1053259]<<24,i[0|r]=e,i[r+1|0]=e>>>8,i[r+2|0]=e>>>16,i[r+3|0]=e>>>24,f[t+20>>2]=u+12,r=f[(A=b+16|0)+8>>2],f[t+48>>2]=f[r>>2],f[t+52>>2]=f[r+4>>2]-1,f[t+28>>2]=3,f[t+24>>2]=1053224,f[t+36>>2]=3,f[t+40>>2]=0,f[t+72>>2]=r+12,f[t+76>>2]=1,f[t+64>>2]=r+8,f[t+68>>2]=1,f[t+56>>2]=t+48,f[t+60>>2]=2,r=t+56|0,f[t+32>>2]=r;A:{f:{n:{a:{if(!Qr(k,1052212,t+24|0)){e=f[A>>2],k=f[f[A+4>>2]+12>>2],fi[0|k](r,e);t:{if(!(1470513528==f[t+56>>2]&-1182065807==f[t+60>>2]&&(A=4,r=e,-691315347==f[t+64>>2]&1676365868==f[t+68>>2]))){if(fi[0|k](t+56|0,e),-2078298696!=f[t+56>>2]|662475520!=f[t+60>>2])break t;if(2086828853!=f[t+64>>2]|-1795647643!=f[t+68>>2])break t;A=8,r=e+4|0}A=f[e+A>>2],r=f[r>>2],e=f[t+20>>2],f[t+12>>2]-e>>>0<=1&&(ue(t+12|0,e,2),e=f[t+20>>2]),k=f[t+16>>2]+e|0,i[0|k]=58,i[k+1|0]=10,e=e+2|0,f[t+20>>2]=e,A>>>0>f[t+12>>2]-e>>>0&&(ue(t+12|0,e,A),e=f[t+20>>2]),ze(f[t+16>>2]+e|0,r,A),f[t+20>>2]=e+A}if(r=f[t+20>>2],f[t- -64>>2]=r,e=f[t+16>>2],A=f[t+12>>2],f[t+56>>2]=A,f[t+60>>2]=e,A-r>>>0<=9&&(ue(t+56|0,r,10),A=f[t+56>>2],r=f[t+64>>2]),u=n[1052256]|n[1052257]<<8|n[1052258]<<16|n[1052259]<<24,k=(e=f[t+60>>2])+r|0,o=n[1052252]|n[1052253]<<8|n[1052254]<<16|n[1052255]<<24,i[0|k]=o,i[k+1|0]=o>>>8,i[k+2|0]=o>>>16,i[k+3|0]=o>>>24,i[k+4|0]=u,i[k+5|0]=u>>>8,i[k+6|0]=u>>>16,i[k+7|0]=u>>>24,k=k+8|0,u=n[1052260]|n[1052261]<<8,i[0|k]=u,i[k+1|0]=u>>>8,r=r+10|0,f[t+64>>2]=r,o=0|Y(),W(t+24|0,0|o),u=f[t+24>>2],(k=f[t+28>>2])>>>0>A-r>>>0&&(ue(t+56|0,r,k),A=f[t+56>>2],e=f[t+60>>2],r=f[t+64>>2]),ze(r+e|0,u,k),r=r+k|0,f[t+64>>2]=r,A-r>>>0<=1&&(ue(t+56|0,r,2),e=f[t+60>>2],r=f[t+64>>2]),i[0|(A=r+e|0)]=10,i[A+1|0]=10,r=r+2|0,f[t+64>>2]=r,(A=f[t+56>>2])>>>0>r>>>0&&!(e=kr(e,A,1,r)))break a;if(D(0|e,0|r),k){if((r=-8&(e=f[u-4>>2]))>>>0>>0)break n;if(r>>>0>k+39>>>0&&e)break f;nr(u)}o>>>0>=132&&N(0|o),S=t+80|0;break A}ge(1053512,55,t+56|0,1052236,1053568)}$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}break e}fi[f[e+24>>2]](b,r);break r}break r}f[b+16>>2]=-2147483648,Be(b+16|0)}f[264989]=f[264989]-1,i[1059500]=0,a&&$f()}f[b+16>>2]=-2147483648,Be(b+16|0),$f()}function Ae(r,e,i,A,n){var a,t=0,b=0;S=a=S-32|0;r:{if((i=e+i|0)>>>0>>0)e=0;else if(i=qe((A+n|0)-1&0-A,0,t=(i=i>>>0>(t=(b=f[r>>2])<<1)>>>0?i:t)>>>0>(t=1==(0|n)?8:4)>>>0?i:t,0),!((e=0)|M||-2147483648-A>>>0>>0)){if(b?(f[a+28>>2]=k(n,b),f[a+20>>2]=f[r+4>>2],e=A):e=0,f[a+24>>2]=e,Ce(a+8|0,A,i,a+20|0),1!=f[a+8>>2])break r;e=f[a+12>>2]}Ze(e,1057184),$f()}e=f[a+12>>2],f[r>>2]=t,f[r+4>>2]=e,S=a+32|0}function fe(r,e){var i,A=0,n=0,a=0;S=i=S-4096|0;r:{e:{if((a=(n=e-(e>>>1|0)|0)>>>0<(A=e>>>0>=1e6?1e6:e)>>>0?A:n)>>>0>=513){i:{if((A=n>>>0>536870911)|(n=a<<3)>>>0>2147483640)r=0;else{if(A=V(n))break i;r=8}Ze(r,1057124),$f()}if(rr(r,e,A,a,e>>>0<65),(r=-8&(e=f[A-4>>2]))>>>0>>0)break e;if(r>>>0>n+39>>>0&&e)break r;nr(A)}else rr(r,e,i,512,e>>>0<65);return void(S=i+4096|0)}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function ne(r,e,i,A,n,a){var t=0;r:{e:{i:{if(t=V(12)){if(f[t+8>>2]=2,f[t>>2]=A,f[t+4>>2]=(n-A|0)+a,A=(0|(A=i))==(0|(i=f[e>>2])),f[e>>2]=A?t:i,!A){if(e=f[i+8>>2],f[i+8>>2]=e+1,(0|e)<0)break i;if(f[r+12>>2]=i,f[r+8>>2]=a,f[r+4>>2]=n,f[r>>2]=1052028,(r=-8&(e=f[t-4>>2]))>>>0<((e&=3)?16:20)>>>0)break e;if(r>>>0>=52&&e)break r;return void nr(t)}return f[r+12>>2]=t,f[r+8>>2]=a,f[r+4>>2]=n,void(f[r>>2]=1052028)}$f()}Xe(),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function ae(r,e,i,A){var n=0,a=0,t=0,b=0,u=0,o=0,c=0,s=0;A>>>0>=8&&(r=ae(r,(a=k(A=A>>>3|0,480))+r|0,(n=k(A,840))+r|0,A),e=ae(e,e+a|0,e+n|0,A),i=ae(i,i+a|0,i+n|0,A));r:{e:{if(f[r+48>>2]){if(!(1&f[e+48>>2]))break e;if(!(1&f[i+48>>2]))break r;return r=f[(n=(A=r)+56|0)>>2],a=e,e=f[(t=e+56|0)>>2],u=f[(b=i+56|0)>>2],o=A,c=i,s=a,A=(0|(n=f[n+4>>2]))<(0|(t=f[t+4>>2]))?1:r>>>0>>0&(0|n)<=(0|t),i=e,e=u,i=(0|(a=f[b+4>>2]))>(0|t)?1:e>>>0>i>>>0&(0|a)>=(0|t),(r>>>0>>0&(0|a)>=(0|n)|(0|a)>(0|n))^A?o:A^i?c:s}Ve(1058820),$f()}Ve(1058820),$f()}Ve(1058820),$f()}function te(r,e){var i,A,n=0,a=0;S=i=S-32|0,a=qe(A=(a=(n=f[r>>2])<<1)>>>0<=4?4:a,0,88,0),0|M&&(Ze(0,e),$f());r:{if(a>>>0<=2147483640){if(n?(f[i+28>>2]=k(n,88),f[i+20>>2]=f[r+4>>2],n=8):n=0,f[i+24>>2]=n,Ce(i+8|0,8,a,i+20|0),1!=f[i+8>>2])break r;r=f[i+12>>2]}else r=0;Ze(r,e),$f()}e=f[i+12>>2],f[r>>2]=A,f[r+4>>2]=e,S=i+32|0}function be(r,e){var i,A,n=0,a=0;S=i=S-32|0,a=qe(A=(a=(n=f[r>>2])<<1)>>>0<=4?4:a,0,104,0),0|M&&(Ze(0,e),$f());r:{if(a>>>0<=2147483640){if(n?(f[i+28>>2]=k(n,104),f[i+20>>2]=f[r+4>>2],n=8):n=0,f[i+24>>2]=n,Ce(i+8|0,8,a,i+20|0),1!=f[i+8>>2])break r;r=f[i+12>>2]}else r=0;Ze(r,e),$f()}e=f[i+12>>2],f[r>>2]=A,f[r+4>>2]=e,S=i+32|0}function ke(r,e){var i,A,n=0,a=0;S=i=S-32|0,a=qe(A=(a=(n=f[r>>2])<<1)>>>0<=4?4:a,0,72,0),0|M&&(Ze(0,e),$f());r:{if(a>>>0<=2147483640){if(n?(f[i+28>>2]=k(n,72),f[i+20>>2]=f[r+4>>2],n=8):n=0,f[i+24>>2]=n,Ce(i+8|0,8,a,i+20|0),1!=f[i+8>>2])break r;r=f[i+12>>2]}else r=0;Ze(r,e),$f()}e=f[i+12>>2],f[r>>2]=A,f[r+4>>2]=e,S=i+32|0}function ue(r,e,i){var A,n=0,a=0;S=A=S-32|0;r:{if(n=0,!((a=e)>>>0>(e=e+i|0)>>>0||(n=0,(0|(e=(e=e>>>0>(a=(i=f[r>>2])<<1)>>>0?e:a)>>>0<=8?8:e))<0))){if(i?(f[A+28>>2]=i,f[A+20>>2]=f[r+4>>2],i=1):i=0,f[A+24>>2]=i,me(A+8|0,e,A+20|0),1!=f[A+8>>2])break r;n=f[A+12>>2]}Ze(n,1057184),$f()}i=f[A+12>>2],f[r>>2]=e,f[r+4>>2]=i,S=A+32|0}function oe(r){var e,i,A,n=0,a=0;S=e=S-32|0,n=qe(A=(n=(i=f[r>>2])<<1)>>>0<=4?4:n,0,120,0);r:{if(!(0|M||n>>>0>2147483640)){if(i?(f[e+28>>2]=k(i,120),f[e+20>>2]=f[r+4>>2],a=8):a=0,f[e+24>>2]=a,Ce(e+8|0,8,n,e+20|0),1!=f[e+8>>2])break r;a=f[e+12>>2]}Ze(a,1055872),$f()}n=f[e+12>>2],f[r>>2]=A,f[r+4>>2]=n,S=e+32|0}function ce(r,e){var i,A=0,n=0,a=0;S=i=S-32|0,(A=f[r>>2])>>>0>134217727&&(Ze(0,e),$f());r:{if((n=(a=(n=A<<1)>>>0<=4?4:n)<<4)>>>0<=2147483644){if(A?(f[i+28>>2]=A<<4,f[i+20>>2]=f[r+4>>2],A=4):A=0,f[i+24>>2]=A,Ce(i+8|0,4,n,i+20|0),1!=f[i+8>>2])break r;r=f[i+12>>2]}else r=0;Ze(r,e),$f()}e=f[i+12>>2],f[r>>2]=a,f[r+4>>2]=e,S=i+32|0}function se(r,e){var i,A=0,n=0,a=0,t=0;if((i=f[e+8>>2])>>>0>=(A=f[e>>2])>>>0)A=f[e+4>>2];else{a=f[e+4>>2];r:{e:{i:{if(!i){if((t=-8&(n=f[a-4>>2]))>>>0>>0)break i;if(A+39>>>0>>0&&n)break e;nr(a),A=1;break r}if(A=kr(a,A,1,i))break r;Ze(1,1051880),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}f[e>>2]=i,f[e+4>>2]=A}f[r+4>>2]=i,f[r>>2]=A}function le(r,e,i){var a=0,t=0;t=2;r:{e:{if(536870911&i&&536870911&(a=i-1|0)){if(t=1,1==(0|i))break e;if(536870911&(a=i-2|0)&&(t=2,536870910&a)){if(2==(0|i)|3==(0|i))break r;return t=n[e+2|0],f[r>>2]=3,f[r+8>>2]=i-4,f[r+4>>2]=e+4,void(A[r+12>>1]=n[e+3|0]|(15&t)<<8)}}return f[r+4>>2]=t,void(f[r>>2]=0)}xe(1,a,1053076),$f()}xe(2,a,1053076),$f()}function he(r){var e,i=0,A=0,n=0,a=0;S=e=S-32|0;r:{if(!((n=f[r>>2])>>>0>536870911||(A=(a=(A=n<<1)>>>0<=4?4:A)<<2)>>>0>2147483644)){if(n?(f[e+28>>2]=n<<2,f[e+20>>2]=f[r+4>>2],i=4):i=0,f[e+24>>2]=i,Ce(e+8|0,4,A,e+20|0),1!=f[e+8>>2])break r;i=f[e+12>>2]}Ze(i,1055752),$f()}i=f[e+12>>2],f[r>>2]=a,f[r+4>>2]=i,S=e+32|0}function ve(r,e,i){var A=0,a=0,t=0,b=0,k=0;r:if(f[r+84>>2]==(0|i)){if(t=e+i|0,i=f[r+80>>2])for(b=(A=f[r+76>>2])+(i<<4)|0,r=e;;){if(a=f[A+8>>2]){for(i=f[A+4>>2],e=r+a|0;;){if((0|r)==(0|t))break r;if(n[0|i]!=n[0|r])break r;if(r=r+1|0,i=i+1|0,!(a=a-1|0))break}r=e}if((0|b)==(0|(A=A+16|0)))break}k=(0|e)==(0|t)}return k}function de(r,e){var i,A=0,n=0;S=i=S-32|0,(0|(n=(n=(A=f[r>>2])<<1)>>>0<=8?8:n))<0&&(Ze(0,e),$f()),A?(f[i+28>>2]=A,f[i+20>>2]=f[r+4>>2],A=1):A=0,f[i+24>>2]=A,me(i+8|0,n,i+20|0),1==f[i+8>>2]&&(Ze(f[i+12>>2],e),$f()),e=f[i+12>>2],f[r>>2]=n,f[r+4>>2]=e,S=i+32|0}function we(r,e,i,A){var n,a,t,b=0,u=0,o=0;return A>>>0>=8&&(r=we(r,(b=(A=A>>>3|0)<<5)+r|0,(u=k(A,56))+r|0,A),e=we(e,e+b|0,e+u|0,A),i=we(i,i+b|0,i+u|0,A)),r=f[(A=r)>>2],b=e,e=f[e>>2],n=A,a=i,t=b,o=(0|(u=f[A+4>>2]))<(0|(A=f[b+4>>2]))?1:r>>>0>>0&(0|A)>=(0|u),b=e,e=f[i>>2],A=(0|(i=f[i+4>>2]))>(0|A)?1:e>>>0>b>>>0&(0|i)>=(0|A),(r>>>0>>0&(0|i)>=(0|u)|(0|i)>(0|u))^o?n:o^A?a:t}function ge(r,e,i,A,n){var a;S=a=S+-64|0,f[a+12>>2]=e,f[a+8>>2]=r,f[a+20>>2]=A,f[a+16>>2]=i,f[a+28>>2]=2,f[a+24>>2]=1053060,f[a+36>>2]=2,f[a+40>>2]=0,f[a+56>>2]=a+16,f[a+60>>2]=9,f[a+48>>2]=a+8,f[a+52>>2]=2,f[a+32>>2]=a+48,Me(a+24|0,n),$f()}function ye(r,e,i,A){var n;e=e-((n=e>>>0>A>>>0)?A:0)|0;r:{if(n)f[r+4>>2]=0,A=1,i=8;else{if(e>>>0>A>>>0)break r;f[r+12>>2]=i,f[r+8>>2]=A-e,f[r+4>>2]=e+i,A=0,i=16}return f[i+r>>2]=e,void(f[r>>2]=A)}xe(e,A,1053076),$f()}function Be(r){var e=0,i=0,A=0;r:{e:{if(!(-2147483648==(0|(i=f[(r|=0)>>2]))|!i)){if(r=f[r+4>>2],(A=-8&(e=f[r-4>>2]))>>>0<((e&=3)?4:8)+i>>>0)break e;if(i+39>>>0>>0&&e)break r;nr(r)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Ee(r){var e=0,i=0,A=0;r:{e:{if(i=f[(r|=0)>>2]){if(r=f[r+4>>2],(A=-8&(e=f[r-4>>2]))>>>0<((e&=3)?4:8)+i>>>0)break e;if(i+39>>>0>>0&&e)break r;nr(r)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function _e(r,e){var i=0,A=0;r:{e:{if(r){if((A=-8&(i=f[e-4>>2]))>>>0<(r=k(r,88))+((i&=3)?4:8)>>>0)break e;if(r+39>>>0>>0&&i)break r;nr(e)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Ie(r,e){var i=0,A=0;r:{e:{if(r){if((A=-8&(i=f[e-4>>2]))>>>0<((r<<=4)|((i&=3)?4:8))>>>0)break e;if(r+39>>>0>>0&&i)break r;nr(e)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Qe(r,e){var i=0,A=0;r:{e:{if(r){if((A=-8&(i=f[e-4>>2]))>>>0<(r=k(r,104))+((i&=3)?4:8)>>>0)break e;if(r+39>>>0>>0&&i)break r;nr(e)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Ne(r,e,i){var A;S=A=S-48|0,f[A+4>>2]=e,f[A>>2]=r,f[A+12>>2]=2,f[A+8>>2]=1052516,f[A+20>>2]=2,f[A+24>>2]=0,f[A+40>>2]=A,f[A+44>>2]=8,f[A+32>>2]=A+4,f[A+36>>2]=8,f[A+16>>2]=A+32,Me(A+8|0,i),$f()}function Re(r,e){var i=0,A=0;r:{e:{if(r){if((A=-8&(i=f[e-4>>2]))>>>0<((i&=3)?4:8)+r>>>0)break e;if(r+39>>>0>>0&&i)break r;nr(e)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}function Ce(r,e,i,A){var n=0;r:{e:{if(f[A+4>>2]){if(!(n=f[A+8>>2])){if(i)break e;A=e;break r}A=kr(f[A>>2],n,e,i);break r}if(!i){A=e;break r}}A=V(i)}f[r+8>>2]=i,f[r+4>>2]=A||e,f[r>>2]=!A}function pe(r){var e;S=e=S-48|0,f[e+12>>2]=2,f[e+8>>2]=1052124,f[e+20>>2]=2,f[e+24>>2]=0,f[e+40>>2]=r,f[e+44>>2]=8,f[e+32>>2]=r+4,f[e+36>>2]=8,f[e+16>>2]=e+32,Me(e+8|0,1052140),$f()}function me(r,e,i){var A=0;i=f[i+4>>2]&&(A=f[i+8>>2])?kr(f[i>>2],A,1,e):V(e),f[r+8>>2]=e,f[r+4>>2]=i||1,f[r>>2]=!i}function Ge(r,e,i){e|=0,i|=0;var A=0;return A=f[(r|=0)+8>>2],f[r>>2]-A>>>0>>0&&(ue(r,A,i),A=f[r+8>>2]),ze(f[r+4>>2]+A|0,e,i),f[r+8>>2]=i+A,0}function Ye(r,e,i){var A;S=A=S-32|0,f[A+16>>2]=0,f[A+4>>2]=1,f[A+8>>2]=4,f[A+12>>2]=0,f[A+28>>2]=e,f[A+24>>2]=r,f[A>>2]=A+24,Me(A,i),$f()}function We(r,e,i,A,n){return 1114112!=(0|i)&&0|fi[f[e+16>>2]](r,i)?1:A?0|fi[f[e+12>>2]](r,A,n):0}function De(r){var e;S=e=S-32|0,f[e+24>>2]=0,f[e+12>>2]=1,f[e+8>>2]=1057100,f[e+16>>2]=4,f[e+20>>2]=0,Me(e+8|0,r),$f()}function Se(r,e,i,A){var n=0,a=0;S=n=S-16|0,f[n+12>>2]=e,f[n+8>>2]=r,S=r=S-112|0,f[r+12>>2]=1052532,f[r+8>>2]=n+8,f[r+20>>2]=1052532,f[r+16>>2]=n+12,f[r+28>>2]=2,f[r+24>>2]=1052548,f[i>>2]?(a=f[(n=i+16|0)+4>>2],f[(e=r+48|0)>>2]=f[n>>2],f[e+4>>2]=a,a=f[(n=i+8|0)+4>>2],f[(e=r+40|0)>>2]=f[n>>2],f[e+4>>2]=a,e=f[i+4>>2],f[r+32>>2]=f[i>>2],f[r+36>>2]=e,f[r+92>>2]=4,f[r+88>>2]=1052652,f[r+100>>2]=4,f[r+104>>2]=0,f[r+80>>2]=r+16,f[r+84>>2]=9,f[r+72>>2]=r+8,f[r+76>>2]=9,f[r+64>>2]=r+32,f[r+68>>2]=11):(f[r+92>>2]=3,f[r+88>>2]=1052600,f[r+100>>2]=3,f[r+104>>2]=0,f[r+72>>2]=r+16,f[r+76>>2]=9,f[r+64>>2]=r+8,f[r+68>>2]=9),f[r+56>>2]=r+24,f[r+60>>2]=2,f[r+96>>2]=r+56,Me(r+88|0,A),$f()}function Fe(){var r;S=r=S-32|0,f[r+24>>2]=0,f[r+12>>2]=1,f[r+8>>2]=1052760,f[r+16>>2]=4,f[r+20>>2]=0,Me(r+8|0,1052768),$f()}function Te(){var r,e=0,A=0,a=0;if(S=r=S-16|0,3!=n[1059492]){i[r+15|0]=1,A=r+15|0,S=e=S-32|0;r:{e:{i:{A:{f:{n:{a:{t:switch(n[1059492]-1|0){default:if(i[1059492]=2,a=n[0|A],i[0|A]=0,!a)break A;if(f[264874]&&2147483647&f[264991])break a;if(A=f[264989],f[264989]=-1,A)break i;f[264990]=1,i[1059492]=3,f[264989]=0;break;case 0:break f;case 1:break n;case 2:break t}S=e+32|0;break r}f[e+24>>2]=0,f[e+12>>2]=1,f[e+8>>2]=1053336,f[e+16>>2]=4,f[e+20>>2]=0,Me(e+8|0,1053344),$f()}f[e+24>>2]=0,f[e+12>>2]=1,f[e+8>>2]=1048684;break e}f[e+24>>2]=0,f[e+12>>2]=1,f[e+8>>2]=1048620;break e}Ve(1051384),$f()}f[e+8>>2]=-2147483648,Be(e+8|0),$f()}f[e+16>>2]=4,f[e+20>>2]=0,Me(e+8|0,1051400),$f()}}S=r+16|0}function Me(r,e){var i=0,a=0;S=i=S-16|0,A[i+12>>1]=1,f[i+8>>2]=e,f[i+4>>2]=r,S=e=S-16|0,i=f[(r=i+4|0)>>2],a=f[r+4>>2],f[e+12>>2]=r,f[e+4>>2]=i,f[e+8>>2]=a,S=r=S-16|0,i=f[(e=e+4|0)>>2],a=f[i+12>>2];r:{e:{i:switch(f[i+4>>2]){case 0:if(a)break e;i=1,a=0;break r;case 1:break i;default:break e}if(!a){i=f[i>>2],a=f[i+4>>2],i=f[i>>2];break r}}f[r>>2]=-2147483648,f[r+12>>2]=e,i=r,r=f[e+8>>2],ie(i,1053444,f[e+4>>2],n[r+8|0],n[r+9|0]),$f()}f[r+4>>2]=a,f[r>>2]=i,i=r,r=f[e+8>>2],ie(i,1053416,f[e+4>>2],n[r+8|0],n[r+9|0]),$f()}function Oe(r){return Pf(0,0),Pf(1,(2047&r)<<20),+Kf()}function Ze(r,e){r&&$f(),De(e),$f()}function Le(r,e,i,A,n,a){var t,b,k=0,u=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0,E=0,_=0,I=0,Q=0;c=(u=b=(0|n)<0)?0-e|0:e,k=u?0-(!!(0|e)+i|0)|0:i,S=u=(S=t=S-32|0)-176|0,d=(e=0!=(e|i))>>>0>(i=e+A|0)>>>0?n+1|0:n,A=0!=((e=b?0-i|0:A)|(i=b?0-(!!(0|i)+d|0)|0:n));r:{e:{i:{if(h=32==(0|(n=o(i)))?o(e)+32|0:n,n=o(k),(n=A?h:(32==(0|n)?o(c)+32|0:n)- -64|0)>>>0<(d=o(a)+96|0)>>>0){if(n>>>0>63)break i;if(d>>>0>95)break e;A:{if(!(d-n>>>0>=32)){if(je(u+48|0,c,k,e,i,A=64-n|0),je(u+32|0,a,0,0,0,A),Ue(u,a,0,0,0,l=ri(f[u+48>>2],f[u+52>>2],f[u+32>>2],f[u+36>>2]),s=M,0,0),Ue(u+16|0,0,0,0,0,l,s,0,0),d=f[u>>2],y=f[u+4>>2],n=(h=f[u+8>>2])+(v=f[u+16>>2])|0,B=(A=f[u+28>>2])+1|0,E=A,_=(A=f[u+12>>2])+f[u+20>>2]|0,h=A=(0|(v=n>>>0>>0?_+1|0:_))==(0|A)&n>>>0>>0|A>>>0>v>>>0,!((A=A+f[u+24>>2]|0)|(h=h>>>0>A>>>0?B:E)||(h=(0|k)==(0|y)&c>>>0>>0|k>>>0>>0,(A=(0|i)==(0|v))&(0|e)==(0|n)?h:A&e>>>0>>0|i>>>0>>0)))break A;E=i+1|0,h=i,A=e,e=k,A=A>>>0>(i=A+(!(k=(i=c)>>>0>(c=a+c|0)>>>0?e+1|0:e)&a>>>0>c>>>0)|0)>>>0?E:h,e=(a=i-n|0)-(h=(_=c>>>0>>0)&(0|k)==(0|y)|k>>>0>>0)|0,i=(A-((i>>>0>>0)+v|0)|0)-(a>>>0>>0)|0,l=(A=l)-1|0,s=s-!A|0,A=c-d|0,k=k-(y+_|0)|0;break r}je(u+160|0,a,0,0,0,y=96-d|0),_=!(h=f[u+160>>2]+1|0);f:{n:{for(;;){if(je(u+144|0,c,k,e,i,A=64-n|0),n=f[u+144>>2],v=f[u+148>>2],A>>>0>>0){if(je(u+80|0,a,0,0,0,A),Ue(u- -64|0,a,0,0,0,v=ri(n,v,f[u+80>>2],f[u+84>>2]),_=M,0,0),B=(0|(d=f[u+68>>2]))==(0|k)&(y=f[u+64>>2])>>>0>c>>>0|k>>>0>>0,h=A=f[u+76>>2],!((0|e)==(0|(n=f[u+72>>2]))&(0|i)==(0|A)?B:(0|A)==(0|i)&n>>>0>e>>>0|i>>>0>>0)){e=(a=(A=e)-n|0)-B|0,i=(i-((A>>>0>>0)+h|0)|0)-(a>>>0>>0)|0,s=(n=_+(A=s)|0)+1|0,a=n,s=(n=l+v|0)>>>0>>0?s:a,a=l,l=n,w=(A=(0|A)==(0|s)&a>>>0>n>>>0|A>>>0>s>>>0)>>>0>(g=A+g|0)>>>0?w+1|0:w,A=c-y|0,k=k-((c>>>0>>0)+d|0)|0;break r}B=i+1|0,E=i,c=(i=((0|(h=(a=a+c|0)>>>0>>0?k+1|0:k))==(0|k)&a>>>0>>0|k>>>0>h>>>0)+e|0)>>>0>>0?B:E,e=(k=i-n|0)-(B=(I=a>>>0>>0)&(0|d)==(0|h)|d>>>0>h>>>0)|0,i=(c-((i>>>0>>0)+A|0)|0)-(k>>>0>>0)|0,k=(n=_+(A=s)|0)+1|0,s=n,w=(A=(0|A)==(0|(s=((l=v+(n=l)|0)>>>0>>0?k:s)-!l|0))&n>>>0>(l=l-1|0)>>>0|A>>>0>s>>>0)>>>0>(g=A+g|0)>>>0?w+1|0:w,A=a-y|0,k=h-(d+I|0)|0;break r}if(He(u+128|0,n=ri(n,v,h,_),v=M,0,0,A=A-y|0),Ue(u+112|0,a,0,0,0,n,v,0,0),He(u+96|0,f[u+112>>2],f[u+116>>2],f[u+120>>2],f[u+124>>2],A),E=(A=w+f[u+140>>2]|0)+1|0,n=A,B=(n=(A=g+f[u+136>>2]|0)>>>0>>0?E:n)+1|0,E=n,s=s+(n=f[u+132>>2])|0,w=(g=A+((0|(s=(v=l)>>>0>(l=l+(w=f[u+128>>2])|0)>>>0?s+1|0:s))==(0|n)&l>>>0>>0|n>>>0>s>>>0)|0)>>>0>>0?B:E,A=0!=((e=(v=(A=e)-(n=f[u+104>>2])|0)-(Q=(I=(B=f[u+96>>2])>>>0>c>>>0)&(0|(e=E=f[u+100>>2]))==(0|k)|e>>>0>k>>>0)|0)|(i=(i-(f[u+108>>2]+(A>>>0>>0)|0)|0)-(v>>>0>>0)|0)),v=32==(0|(n=o(i)))?o(e)+32|0:n,c=c-B|0,n=o(k=k-(I+E|0)|0),!(d>>>0>(n=A?v:(32==(0|n)?o(c)+32|0:n)- -64|0)>>>0))break;if(n>>>0>63)break n}if(!((n=!k&a>>>0>c>>>0)&!(e|i)))break f;A=c;break r}e=l,A=ri(c,k,a,0),n=(i=s)+M|0,w=(e=(0|i)==(0|(s=A>>>0>(l=e+A|0)>>>0?n+1|0:n))&e>>>0>l>>>0|i>>>0>s>>>0)>>>0>(g=e+g|0)>>>0?w+1|0:w,e=0,i=0,A=ei(c,k,a),k=M;break r}e=(A=e)-n|0,i=i-(A>>>0>>0)|0,w=(A=!((s=(l=l+1|0)?s:s+1|0)|l))>>>0>(g=A+g|0)>>>0?w+1|0:w,A=c-a|0,k=k-(a>>>0>c>>>0)|0;break r}e=(a=(A=e)-n|0)-h|0,i=(i-((A>>>0>>0)+v|0)|0)-(a>>>0>>0)|0,A=c-d|0,k=k-((c>>>0>>0)+y|0)|0;break r}e=(A=e)-(d=(a=(n=(l=i|A?1:!k&a>>>0<=c>>>0|!!(0|k))?a:0)>>>0>c>>>0)&!k)|0,i=i-(A>>>0>>0)|0,A=c-n|0,k=k-a|0;break r}l=ri(c,k,a,0),s=M,e=0,i=0,A=ei(c,k,a),k=M;break r}s=ri(A=k,n=ei(e,i,a),a,0),k=M,l=ri(c,A=ei(A,n,a),a,0),s|=M,g=ri(e,i,a,0)|k,w=M,e=0,i=0,A=ei(c,A,a),k=M}f[t+16>>2]=A,f[t+20>>2]=k,f[t>>2]=l,f[t+4>>2]=s,f[t+24>>2]=e,f[t+28>>2]=i,f[t+8>>2]=g,f[t+12>>2]=w,S=u+176|0,n=f[t+8>>2],e=f[t+12>>2],i=f[t+4>>2],A=f[t>>2],f[r>>2]=b?0-A|0:A,f[r+4>>2]=b?0-(!!(0|A)+i|0)|0:i,A=(i=(A=0!=(i|A))+n|0)>>>0>>0?e+1|0:e,f[r+8>>2]=b?0-i|0:n,f[r+12>>2]=b?0-(!!(0|i)+A|0)|0:e,S=t+32|0}function Ue(r,e,i,A,n,a,t,b,k){var u,o,c,s,l,h=0,v=0,d=0;u=r,s=a,d=qe(a,0,e,0),o=M,l=qe(e,0,t,0),v=h=M,a=i,i=qe(s,0,i,0),h=M+h|0,i=(r=i+l|0)>>>0>>0?h+1|0:h,c=r+o|0,h=(h=0)+d|0,f[u>>2]=h,f[u+4>>2]=c,d=(0|c)==(0|o)&d>>>0>h>>>0|c>>>0>>0,r=(0|i)==(0|v)&r>>>0>>0|i>>>0>>0,v=qe(t,0,a,0)+i|0,r=r+M|0,r=i>>>0>v>>>0?r+1|0:r,r=(i=v+d|0)>>>0>>0?r+1|0:r,v=i,i=r,e=qe(e,a,b,k),r=M,a=e,e=qe(A,n,s,t),r=M+r|0,h=(e>>>0>(A=a+e|0)>>>0?r+1|0:r)+i|0,h=(r=A+v|0)>>>0>>0?h+1|0:h,f[u+8>>2]=r,f[u+12>>2]=h}function Ve(r){Ye(1052784,43,r),$f()}function Xe(){Ye(1052048,5,1052056),$f()}function Je(r,e,i){var A;S=A=S-48|0,f[A+4>>2]=e,f[A>>2]=r,f[A+12>>2]=2,f[A+8>>2]=1052988,f[A+20>>2]=2,f[A+24>>2]=0,f[A+40>>2]=A+4,f[A+44>>2]=8,f[A+32>>2]=A,f[A+36>>2]=8,f[A+16>>2]=A+32,Me(A+8|0,i),$f()}function xe(r,e,i){var A;S=A=S-48|0,f[A+4>>2]=e,f[A>>2]=r,f[A+12>>2]=2,f[A+8>>2]=1052956,f[A+20>>2]=2,f[A+24>>2]=0,f[A+40>>2]=A+4,f[A+44>>2]=8,f[A+32>>2]=A,f[A+36>>2]=8,f[A+16>>2]=A+32,Me(A+8|0,i),$f()}function He(r,e,i,A,n,a){var t=0,b=0,k=0,u=0,o=0,c=0;r:if(64&a)f[r>>2]=0,f[r+4>>2]=0,n=31&(A=63&a),A>>>0>=32?(t=e<>>32-n|i<>2]=e,f[r+12>>2]=t;else{if(!a){f[r>>2]=e,f[r+4>>2]=i,f[r+8>>2]=A,f[r+12>>2]=n;break r}k=r,r=31&(u=63&a),u>>>0>=32?(t=e<>>32-r|i<>>0>=32?(A=0,e=i>>>a|0):(A=i>>>a|0,e=((1<>>a),u>>>0>=32?(r=o<>>32-b|n<>2]=e|i,f[k+12>>2]=r|A,f[k>>2]=c,f[k+4>>2]=t}}function je(r,e,i,A,n,a){var t=0,b=0,k=0,u=0;r:if(64&a)f[r+8>>2]=0,f[r+12>>2]=0,e=31&(i=63&a),i>>>0>=32?e=n>>>e|0:(t=n>>>e|0,e=((1<>>e),f[r>>2]=e,f[r+4>>2]=t;else{if(!a){f[r>>2]=e,f[r+4>>2]=i,f[r+8>>2]=A,f[r+12>>2]=n;break r}b=31&(u=0-a&63),t=31&(k=63&a),k>>>0>=32?(a=0,e=i>>>t|0):(a=i>>>t|0,e=((1<>>t),u>>>0>=32?(t=A<>>32-b|n<>>0>=32?(t=0,e=n>>>e|0):(t=n>>>e|0,e=((1<>>e),f[r+8>>2]=e,f[r+12>>2]=t,f[r>>2]=i,f[r+4>>2]=a}}function ze(r,e,t){var b,k=0,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0;if(b=S-16|0,u=t,t>>>0<16)t=r;else{if((k=(c=0-r&3)+r|0)>>>0>r>>>0)for(s=c,t=r,o=e;i[0|t]=n[0|o],o=o+1|0,t=t+1|0,s=s-1|0;);t=(w=-4&(d=u-c|0))+k|0;r:if(e=3&(c=e+c|0)){if(o=0,f[b+12>>2]=0,u=e|b+12,1&(s=4-e|0)&&(i[0|u]=n[0|c],o=1),2&s&&(A[o+u>>1]=a[o+c>>1]),o=c-e|0,s=e<<3,h=f[b+12>>2],k+4>>>0>=t>>>0)u=k;else for(l=0-s&24;u=h>>>s|0,h=f[(o=o+4|0)>>2],f[k>>2]=u|h<>>0>v>>>0;);k=0,i[b+8|0]=0,i[b+6|0]=0,1!=(0|e)?(l=n[o+5|0],e=n[o+4|0],i[b+8|0]=e,g=2,v=b+6|0,l<<=8):(e=0,v=b+8|0,l=0),1&c&&(i[0|v]=n[(o+4|0)+g|0],k=n[b+6|0]<<16,e=n[b+8|0]),f[u>>2]=(255&e|k|l)<<(0-s&24)|h>>>s}else{if(t>>>0<=k>>>0)break r;for(e=c;f[k>>2]=f[e>>2],e=e+4|0,(k=k+4|0)>>>0>>0;);}u=3&d,e=c+w|0}if(t+u>>>0>t>>>0)for(;i[0|t]=n[0|e],e=e+1|0,t=t+1|0,u=u-1|0;);return r}function Pe(r,e,t){var b,k,u=0,o=0,c=0,s=0,l=0,h=0,v=0,d=0,w=0,g=0,y=0,B=0;b=S-32|0,k=r;r:{e:{i:{if(!(r-e>>>0>>0)){if(t>>>0>=16){if(k>>>0<(o=(l=0-k&3)+k|0)>>>0)for(s=l,u=e;i[0|r]=n[0|u],u=u+1|0,r=r+1|0,s=s-1|0;);r=(w=-4&(d=t-l|0))+o|0;A:if(e=3&(l=e+l|0)){if(f[b+16>>2]=0,t=e|b+16,1&(u=4-e|0)&&(i[0|t]=n[0|l],c=1),2&u&&(A[t+c>>1]=a[c+l>>1]),c=l-e|0,v=e<<3,h=f[b+16>>2],o+4>>>0>=r>>>0)u=o;else for(t=0-v&24;u=h>>>v|0,h=f[(c=c+4|0)>>2],f[o>>2]=u|h<>>0>s>>>0;);o=0,i[b+12|0]=0,i[b+10|0]=0,1!=(0|e)?(t=n[c+5|0],e=n[c+4|0],i[b+12|0]=e,g=2,s=b+10|0,t<<=8):(s=b+12|0,e=0,t=0),1&l&&(i[0|s]=n[(c+4|0)+g|0],o=n[b+10|0]<<16,e=n[b+12|0]),f[u>>2]=(255&e|t|o)<<(0-v&24)|h>>>v}else{if(r>>>0<=o>>>0)break A;for(e=l;f[o>>2]=f[e>>2],e=e+4|0,(o=o+4|0)>>>0>>0;);}t=3&d,e=l+w|0}if(r+t>>>0<=r>>>0)break r;for(;i[0|r]=n[0|e],e=e+1|0,r=r+1|0,t=t-1|0;);break r}if(c=u=e+t|0,r=r+t|0,t>>>0<16)break e;if(v=0-(s=3&r)|0,(l=-4&r)>>>0>>0)for(o=u-1|0,u=r;i[0|(u=u-1|0)]=n[0|o],o=o-1|0,u>>>0>l>>>0;);if(d=l-(u=-4&(g=t-s|0))|0,B=0-u|0,c=3&(w=c+v|0)){u=0,i[b+24|0]=0,i[b+22|0]=0,s=w-c|0;A:{if(1!=(0|c)){if(u=n[0|s],i[b+24|0]=u,o=n[s+1|0],y=0,!(1&w))break A;u=2,h=b+22|0}else o=0,h=b+24|0;i[0|h]=n[u+s|0],u=n[b+24|0],y=n[b+22|0]<<16}if(h=c<<3,u=255&u|o<<8|y,(o=d+4|0)>>>0>=l>>>0)t=l;else for(e=(t-c|0)+e|0,d=0-h&24;t=u<>2],f[(r+v|0)-4>>2]=t|u>>>h,o>>>0<(t=v+(r=r-4|0)|0)>>>0;);r=0,f[b+28>>2]=0,e=(c+s|0)-4|0,o=c|b+28,1&(s=4-c|0)&&(i[0|o]=n[0|e],r=1),2&s&&(A[r+o>>1]=a[r+e>>1]),f[t-4>>2]=u<<(0-h&24)|f[b+28>>2]>>>h}else{if(l>>>0<=d>>>0)break i;for(r=(e+g|0)-4|0,e=l;f[(e=e-4|0)>>2]=f[r>>2],r=r-4|0,e>>>0>d>>>0;);}}t=3&g,c=w+B|0,r=l+B|0}if(!(r>>>0<=(t=r-t|0)>>>0))for(e=c-1|0;i[0|(r=r-1|0)]=n[0|e],e=e-1|0,r>>>0>t>>>0;);}return k}function Ke(r,e,i,A){var f=0,n=0,a=0,t=0,b=0,u=0,c=0,s=0,l=0;r:{e:{i:{A:{f:{n:{a:{t:{b:{k:{if(e){if(a=i,!i)break k;if(!A)break b;if((i=o(A)-o(e)|0)>>>0<=31)break t;break e}if(1==(0|A)|A>>>0>1)break e;return F=(e=r)-k(r=(r>>>0)/(i>>>0)|0,i)|0,T=0,M=0,r}if(!r)break a;if(!A)break n;if((i=A-1|0)&A)break n;return F=r,T=e&i,M=0,e>>>(r=A?31-o(i^A)|0:32)|0}if(!((i=a-1|0)&a))break f;n=0-(t=(o(a)+33|0)-o(e)|0)|0;break i}t=i+1|0,n=63-i|0;break i}return F=0,T=e-k(r=(e>>>0)/(A>>>0)|0,A)|0,M=0,r}if((i=o(A)-o(e)|0)>>>0<31)break A;break e}if(F=r&i,T=0,1==(0|a))break r;return A=31&(i=a?31-o(a-1^a)|0:32),(63&i)>>>0>=32?(i=0,r=e>>>A|0):(i=e>>>A|0,r=((1<>>A),M=i,r}t=i+1|0,n=63-i|0}if(f=31&(i=63&t),i>>>0>=32?(i=0,u=e>>>f|0):(i=e>>>f|0,u=((1<>>f),f=31&(n&=63),n>>>0>=32?(e=r<>>32-f|e<>>31,u=(i=u<<1|e>>>31)-(c=a&(n=s-(b+(i>>>0>f>>>0)|0)>>31))|0,i=b-((A&n)+(i>>>0>>0)|0)|0,e=e<<1|r>>>31,r=l|r<<1,l=b=1&n,t=t-1|0;);return F=u,T=i,M=e<<1|r>>>31,b|r<<1}F=r,T=e,r=0,e=0}return M=e,r}function qe(r,e,i,A){var f,n,a,t,b=0,u=0;return t=k(b=i>>>16|0,u=r>>>16|0),b=(65535&(u=((a=k(f=65535&i,n=65535&r))>>>16|0)+k(u,f)|0))+k(b,n)|0,M=(k(e,i)+t|0)+k(r,A)+(u>>>16)+(b>>>16)|0,65535&a|b<<16}function $e(r,e,i,A){var f,n=0,a=0;return f=(a=e^A)>>31,a>>=31,r=ri((r^=n=e>>31)-n|0,n=(e^n)-((r>>>0>>0)+n|0)|0,(e=i^(r=A>>31))-r|0,(r^A)-((r>>>0>e>>>0)+r|0)|0)^a,M=(f^M)-((r>>>0>>0)+f|0)|0,e=r-a|0}function ri(r,e,i,A){return r=Ke(r,e,i,A)}function ei(r,e,i){return Ke(r,e,i,0),M=T,F}function ii(r){for(var e=0;r;)r&=r-1,e=e+1|0;return e}function Ai(r){var e;return(-1>>>(e=31&r)&-2)<>>r}Jf(Lf=n,1048576,"T25jZSBpbnN0YW5jZSBoYXMgcHJldmlvdXNseSBiZWVuIHBvaXNvbmVkAAAAABAAKgAAAG9uZS10aW1lIGluaXRpYWxpemF0aW9uIG1heSBub3QgYmUgcGVyZm9ybWVkIHJlY3Vyc2l2ZWx5NAAQADgAAAAvaG9tZS9jaXJjbGVjaS8uY2FyZ28vcmVnaXN0cnkvc3JjL2luZGV4LmNyYXRlcy5pby0xOTQ5Y2Y4YzZiNWI1NTdmL2J5dGVzLTEuMTAuMS9zcmMvYnl0ZXNfbXV0LnJzAC9ob21lL2NpcmNsZWNpLy5ydXN0dXAvdG9vbGNoYWlucy9uaWdodGx5LTIwMjUtMDYtMjQteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvY29yZS9zcmMvc2xpY2Uvc29ydC9zaGFyZWQvc21hbGxzb3J0LnJzAC9ob21lL2NpcmNsZWNpLy5ydXN0dXAvdG9vbGNoYWlucy9uaWdodGx5LTIwMjUtMDYtMjQteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvY29yZS9zcmMvc2xpY2Uvc29ydC9zdGFibGUvcXVpY2tzb3J0LnJzAC9ob21lL2NpcmNsZWNpLy5ydXN0dXAvdG9vbGNoYWlucy9uaWdodGx5LTIwMjUtMDYtMjQteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvYWxsb2Mvc3JjL2ZtdC5ycwAvaG9tZS9jaXJjbGVjaS8ucnVzdHVwL3Rvb2xjaGFpbnMvbmlnaHRseS0yMDI1LTA2LTI0LXg4Nl82NC11bmtub3duLWxpbnV4LWdudS9saWIvcnVzdGxpYi9zcmMvcnVzdC9saWJyYXJ5L2NvbXBpbGVyLWJ1aWx0aW5zL2NvbXBpbGVyLWJ1aWx0aW5zL3NyYy9tYXRoLy4uLy4uLy4uL2xpYm0vc3JjL21hdGgvc3VwcG9ydC9mbG9hdF90cmFpdHMucnMAL2hvbWUvY2lyY2xlY2kvLmNhcmdvL3JlZ2lzdHJ5L3NyYy9pbmRleC5jcmF0ZXMuaW8tMTk0OWNmOGM2YjViNTU3Zi9ub20tOC4wLjAvc3JjL3RyYWl0cy5ycwAvaG9tZS9jaXJjbGVjaS8uY2FyZ28vcmVnaXN0cnkvc3JjL2luZGV4LmNyYXRlcy5pby0xOTQ5Y2Y4YzZiNWI1NTdmL2J5dGVzLTEuMTAuMS9zcmMvYnl0ZXMucnMAbGliL3NyYy9tcGVndHNfZXh0cmFjdG9yLnJzAC9ob21lL2NpcmNsZWNpLy5ydXN0dXAvdG9vbGNoYWlucy9uaWdodGx5LTIwMjUtMDYtMjQteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvY29yZS9zcmMvaXRlci90cmFpdHMvaXRlcmF0b3IucnMAL2hvbWUvY2lyY2xlY2kvLnJ1c3R1cC90b29sY2hhaW5zL25pZ2h0bHktMjAyNS0wNi0yNC14ODZfNjQtdW5rbm93bi1saW51eC1nbnUvbGliL3J1c3RsaWIvc3JjL3J1c3QvbGlicmFyeS9jb3JlL3NyYy9zbGljZS9pdGVyLnJzAGxpYi9zcmMvYWFjX21lZGlhaGVscGVyLnJzAGxpYi9zcmMvaDI2NF9tZWRpYWhlbHBlci5ycwBsaWIvc3JjL21wM19tZWRpYWhlbHBlci5ycwBsaWIvc3JjL2lkM19tZWRpYWhlbHBlci5ycwBsaWIvc3JjL2lzb21fcGFja2FnZXIucnMAL2hvbWUvY2lyY2xlY2kvLnJ1c3R1cC90b29sY2hhaW5zL25pZ2h0bHktMjAyNS0wNi0yNC14ODZfNjQtdW5rbm93bi1saW51eC1nbnUvbGliL3J1c3RsaWIvc3JjL3J1c3QvbGlicmFyeS9hbGxvYy9zcmMvc3RyaW5nLnJzAC9ob21lL2NpcmNsZWNpLy5ydXN0dXAvdG9vbGNoYWlucy9uaWdodGx5LTIwMjUtMDYtMjQteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvc3RkL3NyYy9wYW5pY2tpbmcucnMAL2hvbWUvY2lyY2xlY2kvLnJ1c3R1cC90b29sY2hhaW5zL25pZ2h0bHktMjAyNS0wNi0yNC14ODZfNjQtdW5rbm93bi1saW51eC1nbnUvbGliL3J1c3RsaWIvc3JjL3J1c3QvbGlicmFyeS9zdGQvc3JjL3N5bmMvcG9pc29uL29uY2UucnMAL2hvbWUvY2lyY2xlY2kvLnJ1c3R1cC90b29sY2hhaW5zL25pZ2h0bHktMjAyNS0wNi0yNC14ODZfNjQtdW5rbm93bi1saW51eC1nbnUvbGliL3J1c3RsaWIvc3JjL3J1c3QvbGlicmFyeS9hbGxvYy9zcmMvc2xpY2UucnMAL2hvbWUvY2lyY2xlY2kvLnJ1c3R1cC90b29sY2hhaW5zL25pZ2h0bHktMjAyNS0wNi0yNC14ODZfNjQtdW5rbm93bi1saW51eC1nbnUvbGliL3J1c3RsaWIvc3JjL3J1c3QvbGlicmFyeS9jb3JlL3NyYy9wdHIvbW9kLnJzAC9ob21lL2NpcmNsZWNpLy5ydXN0dXAvdG9vbGNoYWlucy9uaWdodGx5LTIwMjUtMDYtMjQteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvYWxsb2Mvc3JjL3Jhd192ZWMvbW9kLnJzAC9ob21lL2NpcmNsZWNpLy5ydXN0dXAvdG9vbGNoYWlucy9uaWdodGx5LTIwMjUtMDYtMjQteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvYWxsb2Mvc3JjL3ZlYy9tb2QucnMAL2hvbWUvY2lyY2xlY2kvLmNhcmdvL3JlZ2lzdHJ5L3NyYy9pbmRleC5jcmF0ZXMuaW8tMTk0OWNmOGM2YjViNTU3Zi9kbG1hbGxvYy0wLjIuOS9zcmMvZGxtYWxsb2MucnMAL2hvbWUvY2lyY2xlY2kvLmNhcmdvL3JlZ2lzdHJ5L3NyYy9pbmRleC5jcmF0ZXMuaW8tMTk0OWNmOGM2YjViNTU3Zi9jb25zb2xlX2Vycm9yX3BhbmljX2hvb2stMC4xLjcvc3JjL2xpYi5ycwAvaG9tZS9jaXJjbGVjaS8uY2FyZ28vcmVnaXN0cnkvc3JjL2luZGV4LmNyYXRlcy5pby0xOTQ5Y2Y4YzZiNWI1NTdmL29uY2VfY2VsbC0xLjIxLjMvc3JjL2xpYi5ycwAvaG9tZS9jaXJjbGVjaS8uY2FyZ28vcmVnaXN0cnkvc3JjL2luZGV4LmNyYXRlcy5pby0xOTQ5Y2Y4YzZiNWI1NTdmL2J5dGVzLTEuMTAuMS9zcmMvbGliLnJzAGxpYi9zcmMvZnJhZ21lbnRlZF9kYXRhLnJzAGh0dHBzOi8vYW9tZWRpYS5vcmcvZW1zZy9JRDMAAAAAqAYQAIcAAACbAAAAMgAAAJMJEABuAAAAlQAAAA4AAAAMAAAADAAAAAQAAAANAAAADgAAAA8AAAAMAAAADAAAAAQAAAAQAAAAEQAAAA8AAACpBRAAfwAAAOgBAAAX"),Jf(Lf,1051488,"AQAAABIAAABhIGZvcm1hdHRpbmcgdHJhaXQgaW1wbGVtZW50YXRpb24gcmV0dXJuZWQgYW4gZXJyb3Igd2hlbiB0aGUgdW5kZXJseWluZyBzdHJlYW0gZGlkIG5vdAAA/AEQAHwAAACKAgAADgAAAExheW91dEVycm9yABMAAAAUAAAAFQAAABYAAAAXAAAAc3Vic2V0IHBvaW50ZXIgKCkgaXMgc21hbGxlciB0aGFuIHNlbGYgcG9pbnRlciAo8AsQABAAAAAADBAAIAAAABgXEAABAAAAmwMQAF4AAADFAQAACQAAAHN1YnNldCBpcyBvdXQgb2YgYm91bmRzOiBzZWxmID0gKCwgKSwgc3Vic2V0ID0gKEgMEAAhAAAAaQwQAAIAAABrDBAADQAAAGkMEAACAAAAGBcQAAEAAACbAxAAXgAAAMsBAAAJAAAAc3BsaXRfdG8gb3V0IG9mIGJvdW5kczogsAwQABgAAAAhJxAABAAAAJsDEABeAAAALgIAAAkAAACbAxAAXgAAAM4DAAAkAAAAGAAAABkAAAAaAAAAGwAAABwAAAAdAAAAHgAAAB8AAAAbAAAAIA=="),Jf(Lf,1051944,"AQAAACEAAABjYWxsZWQgYFJlc3VsdDo6dW53cmFwKClgIG9uIGFuIGBFcnJgIHZhbHVlAJsDEABeAAAASAUAADIAAACbAxAAXgAAAFYFAABJAAAAIgAAACMAAAAkAAAAJQAAACYAAABhYm9ydAAAAGEKEABcAAAAbgAAAAkAAABhZHZhbmNlIG91dCBvZiBib3VuZHM6IHRoZSBsZW4gaXMgIGJ1dCBhZHZhbmNpbmcgYnkgqA0QACIAAADKDRAAEgAAAGEKEABcAAAArAAAAAUAAABvdmVyZmxvd3QAEABiAAAAqgIAABUAAAB0ABAAYgAAAAADAAAnAAAAdAAQAGIAAADUAgAAOAAAACcAAAAMAAAABAAAACgAAAApAAAAKg=="),Jf(Lf,1052244,"AQAAABIAAAAKClN0YWNrOgoKMHgwMDAxMDIwMzA0MDUwNjA3MDgwOTEwMTExMjEzMTQxNTE2MTcxODE5MjAyMTIyMjMyNDI1MjYyNzI4MjkzMDMxMzIzMzM0MzUzNjM3MzgzOTQwNDE0MjQzNDQ0NTQ2NDc0ODQ5NTA1MTUyNTM1NDU1NTY1NzU4NTk2MDYxNjI2MzY0NjU2NjY3Njg2OTcwNzE3MjczNzQ3NTc2Nzc3ODc5ODA4MTgyODM4NDg1ODY4Nzg4ODk5MDkxOTI5Mzk0OTU5Njk3OTg5OWluZGV4IG91dCBvZiBib3VuZHM6IHRoZSBsZW4gaXMgIGJ1dCB0aGUgaW5kZXggaXMgAAAwDxAAIAAAAFAPEAASAAAAAAAAAAQAAAAEAAAAKwAAAD09YXNzZXJ0aW9uIGBsZWZ0ICByaWdodGAgZmFpbGVkCiAgbGVmdDogCiByaWdodDogAACGDxAAEAAAAJYPEAAXAAAArQ8QAAkAAAAgcmlnaHRgIGZhaWxlZDogCiAgbGVmdDogAAAAhg8QABAAAADQDxAAEAAAAOAPEAAJAAAArQ8QAAkAAAB1c2VyLXByb3ZpZGVkIGNvbXBhcmlzb24gZnVuY3Rpb24gZG9lcyBub3QgY29ycmVjdGx5IGltcGxlbWVudCBhIHRvdGFsIG9yZGVyDBAQAEwAAADWABAAkwAAAFwDAAAFAAAAY2FsbGVkIGBPcHRpb246OnVud3JhcCgpYCBvbiBhIGBOb25lYCB2YWx1ZWF0dGVtcHQgdG8gZGl2aWRlIHdpdGggb3ZlcmZsb3cAAJsQEAAfAAAAYXR0ZW1wdCB0byBkaXZpZGUgYnkgemVybwAAAMQQEAAZAAAAcmFuZ2Ugc3RhcnQgaW5kZXggIG91dCBvZiByYW5nZSBmb3Igc2xpY2Ugb2YgbGVuZ3RoIOgQEAASAAAA+hAQACIAAAByYW5nZSBlbmQgaW5kZXggLBEQABAAAAD6EBAAIgAAAHNsaWNlIGluZGV4IHN0YXJ0cyBhdCAgYnV0IGVuZHMgYXQgAEwREAAWAAAAYhEQAA0AAAA6IAAAAQAAAAAAAACAERAAAgAAAD8DEABcAAAA0AAAAAoAAABhc3NlcnRpb24gZmFpbGVkOiBwc2l6ZSA+PSBzaXplICsgbWluX292ZXJoZWFkAAAwCRAAYwAAALAEAAAJAAAAYXNzZXJ0aW9uIGZhaWxlZDogcHNpemUgPD0gc2l6ZSArIG1heF9vdmVyaGVhZAAAMAkQAGMAAAC2BAAADQAAADoAAAABAAAAAAAAACQSEAABAAAAJBIQAAEAAABwYW5pY2tlZCBhdCAnAAAADAAAAAQAAAAQAAAAEQAAACwAAABjYW5ub3QgbW9kaWZ5IHRoZSBwYW5pYyBob29rIGZyb20gYSBwYW5pY2tpbmcgdGhyZWFkZBIQADQAAAAoBhAAgAAAAJAAAAAJAAAAJwAAAAwAAAAEAAAADQAAAC0AAAAsAAAAJwAAAAwAAAAEAAAALgAAAAAAAAAIAAAABAAAAC8AAAAAAAAACAAAAAQAAAAwAAAAMQAAADIAAAAzAAAANAAAABAAAAAEAAAANQAAADYAAAA3AAAAOAAAAAwAAAAMAAAABAAAADkAAAA6AAAAOw=="),Jf(Lf,1053504,"AQAAABIAAABhIERpc3BsYXkgaW1wbGVtZW50YXRpb24gcmV0dXJuZWQgYW4gZXJyb3IgdW5leHBlY3RlZGx5AKkFEAB/AAAADgsAAA4AAABFcnJvclRhZ01hcFJlc01hcE9wdEFsdElzTm90SXNBU2VwYXJhdGVkTGlzdFNlcGFyYXRlZE5vbkVtcHR5TGlzdE1hbnkwTWFueTFNYW55VGlsbENvdW50VGFrZVVudGlsTGVuZ3RoVmFsdWVUYWdDbG9zdXJlQWxwaGFEaWdpdEhleERpZ2l0T2N0RGlnaXRCaW5EaWdpdEFscGhhTnVtZXJpY1NwYWNlTXVsdGlTcGFjZUxlbmd0aFZhbHVlRm5Fb2ZTd2l0Y2hUYWdCaXRzT25lT2ZOb25lT2ZDaGFyQ3JMZlJlZ2V4cE1hdGNoUmVnZXhwTWF0Y2hlc1JlZ2V4cEZpbmRSZWdleHBDYXB0dXJlUmVnZXhwQ2FwdHVyZXNUYWtlV2hpbGUxQ29tcGxldGVGaXhFc2NhcGVkRXNjYXBlZFRyYW5zZm9ybU5vbkVtcHR5TWFueU1OTm90UGVybXV0YXRpb25WZXJpZnlUYWtlVGlsbDFUYWtlV2hpbGVNTlRvb0xhcmdlTWFueTBDb3VudE1hbnkxQ291bnRGbG9hdFNhdGlzZnlGYWlsTWFueUZvbGRQcmVjZWRlbmNl+QMQABwAAAC1AAAAMgAAAENvdWxkIG5vdCBmaW5kIHByb2dyYW0gbWFwIHRhYmxlIFBJRCBpbiBzdHJlYW0gb3IgaW4gaW5wdXQgbWV0YWRhdGEu+QMQABwAAADZAAAAFwAAAENvdWxkIG5vdCBmaW5kIGF1ZGlvIHN0cmVhbSBQSUQgaW4gc3RyZWFtIG9yIGluIGlucHV0IG1ldGFkYXRhLkNvdWxkIG5vdCBmaW5kIHZpZGVvIHN0cmVhbSBQSUQgaW4gc3RyZWFtIG9yIGluIGlucHV0IG1ldGFkYXRhLgAA+QMQABwAAADfAAAAFQAAAENvdWxkIG5vdCBmaW5kIE1QRUdUUyBzeW5jIG9mZnNldCBieXRlIGluIGFycmF5LkhFVkMgaW4gTVBFRy1UUyBpcyBub3Qgc3VwcG9ydGVk+QMQABwAAADGAQAAJQAAAPkDEAAcAAAAaQIAADkAAAD5AxAAHAAAAP4CAAAPAAAAAQAAAAAAAABQYXJzZSBlcnJvciDMFhAADAAAAEluY29tcGxldGUgTVBFR1RTIHBhY2tldC5JbnZhbGlkIE1QRUdUUyBwYWNrZXQ6IPkWEAAXAAAAKVNjcmFtYmxlZCBQRVMgYXJlIG5vdCBzdXBwb3J0ZWT5AxAAHAAAAJcDAAALAAAA+QMQABwAAACYAwAAEQAAAPkDEAAcAAAAmQMAABEAAAD5AxAAHAAAAJoDAAARAAAA+QMQABwAAACbAwAAEQAAAPkDEAAcAAAAtwMAADkAAAD5AxAAHAAAAMYDAAA8AAAA+QMQABwAAADHAwAAQAAAAAAAACBmdHlwbXA0MgAAAABpc29tbXA0MmRhc2hhaWQzYm94IHNpemUgbWlzbWF0Y2gAAADYFxAAEQAAAJAFEAAZAAAAgQAAAAkAAACQBRAAGQAAAJMAAAAJAAAAAAAAGHN0eXBtc2RoAAAAAG1zZGhtc2l4kAUQABkAAAC2AAAACQAAAJAFEAAZAAAAuQAAAAkAAACQBRAAGQAAAOYAAAAJAAAAkAUQABkAAADpAAAACQAAAAAB"),Jf(Lf,1054845,"AQ=="),Jf(Lf,1054860,"QAAAAAAAAC1oZGxyAAAAAAAAAABzb3Vu"),Jf(Lf,1054896,"U291bmRIYW5kbGVyAAAAAC1oZGxyAAAAAAAAAAB2aWRl"),Jf(Lf,1054941,"VmlkZW9IYW5kbGVyAAAAABR2bWhkAAAAAQ=="),Jf(Lf,1054977,"EHNtaGQ="),Jf(Lf,1054993,"JGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAACQBRAAGQAAAOICAAAoAAAAkAUQABkAAADIAwAAEgAAAJAFEAAZAAAAywMAAEQAAACQBRAAGQAAAOMDAAAOAAAAPAAAABQAAAAVAAAAFgAAABcAAAA+BRAAHAAAAKIAAAA1AAAAPgUQABwAAACjAAAAGAAAAE1pc3NpbmcgU1BTIGFuZC9vciBQUFMgaW4gSDI2NCB2aWRlbyBkYXRhAAAAPgUQABwAAAC7AAAALQAAAD4FEAAcAAAAuwAAAFkAAAA+BRAAHAAAANwAAAA6AAAAPgUQABwAAADdAAAAOgAAAD4FEAAcAAAA3gAAADgAAAA+BRAAHAAAADsBAAAkAAAAPgUQABwAAAA8AQAAJAAAAD4FEAAcAAAAUQEAABYAAAA+BRAAHAAAAFcBAAAWAAAAPgUQABwAAABDAQAAHgAAAD4FEAAcAAAASAEAAB4AAAA+BRAAHAAAAG8BAAATAAAAPgUQABwAAABwAQAAGgAAAD4FEAAcAAAAcQEAABEAAAA+BRAAHAAAAJABAAAfAAAAPgUQABwAAACRAQAADAAAAD4FEAAcAAAAkgEAABEAAAA+BRAAHAAAAJIBAAAMAAAAPgUQABwAAACTAQAAEQAAAD4FEAAcAAAAkwEAAAwAAAA+BRAAHAAAAJQBAAARAAAAPgUQABwAAACUAQAADAAAAD4FEAAcAAAAlQEAAAwAAAA+BRAAHAAAAJYBAAAMAAAAPgUQABwAAACdAQAADAAAAD4FEAAcAAAAoAEAABAAAAA+BRAAHAAAAKEBAAAQAAAAPgUQABwAAACZAQAAEAAAAD4FEAAcAAAAmgEAABAAAAA+BRAAHAAAALYBAAAsAAAAAAAAAAEAAQAMAAsACgALABAACwAoACEAGAALABQACwAgAAsAUAAhABIACwAPAAsAQAAhAKAAYwAEAAMAAwACAAIAAQA+BRAAHAAAAAYCAAAiAAAAPgUQABwAAABtAgAAQgAAAD4FEAAcAAAAZwIAACUAAAA+BRAAHAAAAIYCAAA2AAAAPgUQABwAAACQAgAAMgAAAGFzc2VydGlvbiBmYWlsZWQ6IHNlbGYuaXNfYnl0ZV9hbGlnbmVkKCk+BRAAHAAAAI4CAAAJAAAAPgUQABwAAAA0AwAAFAAAAD4FEAAcAAAAUwMAAA4AAAA+BRAAHAAAAFgDAAAOAAAAPgUQABwAAABtAwAACgAAAD4FEAAcAAAAdAMAABIAAAA+BRAAHAAAAHcDAAA8AAAAYXZjMS4AAADgHBAABQAAAAEAAAAAAAAAAQAAAAAAAAAC"),Jf(Lf,1056010,"Ag=="),Jf(Lf,1056020,"IAAA6QI="),Jf(Lf,1056034,"AgAAAAAAAQAAACAAAOkC"),Jf(Lf,1056058,"AgAAAAAAAgAAACAAAOmtBxAAfwAAAB8DAAABAAAAPQAAABQAAAAVAAAAFgAAABcAAAAjBRAAGwAAAEIAAAAiAAAAAHcBAIhYAQAA+gAAgLsAAESsAAAAfQAAwF0AACJWAACAPgAA4C4AABErAABAHwAAIwUQABsAAABPAAAAJgAAACMFEAAbAAAAUAAAAD4AAAAjBRAAGwAAAFMAAAA6AAAAIwUQABsAAABXAAAAQgAAACMFEAAbAAAAYAAAAD4AAAAjBRAAGwAAAGIAAABDAAAAIwUQABsAAACWAAAAQgAAACMFEAAbAAAArAAAABYAAAAjBRAAGwAAAM4AAAA7AAAAIwUQABsAAADcAAAAOgAAACMFEAAbAAAA3QAAADoAAAAjBRAAGwAAAN4AAAA4AAAAIwUQABsAAAAUAQAANwAAAADIAIAjgCEASZACGQAjgADIAIAghAEmQAhkAI4AyACAIIQBJkAIZACALIAIAjgAyACAIIQBJkAIZACCMASZACGQAjgAyACAIIQBJkAIZACCMASZACGQAgCyACAI4AAAACMFEAAbAAAAJwEAACIAAAAjBRAAGwAAACsBAAAOAAAAIwUQABsAAAAwAQAADgAAACMFEAAbAAAAUAEAACgAAAAjBRAAGwAAAFABAABWAAAAIwUQABsAAABaAQAADgAAACMFEAAbAAAAWwEAACUAAAAjBRAAGwAAAGABAAAOAAAAIwUQABsAAABjAQAAJAAAACMFEAAbAAAAaQEAAFoAAAAjBRAAGwAAAI4BAABHAAAAIwUQABsAAACPAQAASgAAACMFEAAbAAAAngEAACMAAAAjBRAAGwAAAKABAAAQAAAAIwUQABsAAACjAQAAEAAAACMFEAAbAAAApAEAABAAAAAjBRAAGwAAAKUBAAAQAAAAIwUQABsAAACmAQAAEAAAACMFEAAbAAAApwEAABAAAAAjBRAAGwAAAKgBAAAQAAAAIwUQABsAAACpAQAAEAAAACMFEAAbAAAAqgEAABAAAAAjBRAAGwAAAKsBAAAQAAAAIwUQABsAAACsAQAAEAAAACMFEAAbAAAArQEAABAAAAAjBRAAGwAAAK4BAAAQAAAAIwUQABsAAACvAQAAEAAAACMFEAAbAAAAsAEAABAAAAAjBRAAGwAAALEBAAAQAAAAIwUQABsAAACyAQAAEAAAACMFEAAbAAAAswEAABAAAAAjBRAAGwAAALQBAAAQAAAAIwUQABsAAAC2AQAAEAAAACMFEAAbAAAAtwEAABAAAAAjBRAAGwAAALgBAAAQAAAALwcQAH4AAADBAQAAHQAAAG1wNGEuNDAuMm1wNGEuNDAuNW1wNGEuNDAuMzRjYXBhY2l0eSBvdmVyZmxvdwAAADghEAARAAAAsAgQAIAAAAB2CgAAJAAAAC8HEAB+AAAAYwMAAAkAAABVbnJlY29nbml6ZWQgSDI2NCBOQUwgdW5pdCB0eXBlOiAAAAB0IRAAIQAAACwIEACEAAAALgIAABEAAAChBBAAggAAAGgCAAAfAAAADAAAAAwAAAAEAAAAOQAAADoAAAA7AAAAVW5yZWNvZ25pemVkIElEMyB2ZXJzaW9uOiAuANghEAAaAAAA8iEQAAEAAAACAAAAAAAAAAI="),Jf(Lf,1057304,"IACA4HUFEAAbAAAAzQAAAB0AAAB1BRAAGwAAAN4AAAAdAAAAdQUQABsAAADxAAAAHQAAAGNvbS5hcHBsZS5zdHJlYW1pbmcudHJhbnNwb3J0U3RyZWFtVGltZXN0YW1wFQQQAIwAAADrBwAACQAAAD4FEAAcAAAAGwEAABIAAAABAAAAAAAAAD4AAAAUAAAAFQAAABYAAAAXAAAAcmFuZ2Ugc3RhcnQgbXVzdCBub3QgYmUgZ3JlYXRlciB0aGFuIGVuZDogAAC0IhAAKgAAACEnEAAEAAAAmwMQAF4AAACGAQAACQAAAHJhbmdlIGVuZCBvdXQgb2YgYm91bmRzOiAAAAAAIxAAGQAAACEnEAAEAAAAmwMQAF4AAACMAQAACQAAAD8AAAAUAAAAFQAAABYAAAAXAAAAWgUQABsAAAByAAAAJgAAAP8AAABaBRAAGwAAAIMAAABCAAAAWgUQABsAAACEAAAATw=="),Jf(Lf,1057800,"QB8AAIA+AADAXQAAAH0AAECcAACAuwAAwNoAAAD6AACAOAEAAHcBAIC1AQAA9AEAgDICAABxAg=="),Jf(Lf,1057865,"fQAAQJwAAIC7AADA2gAAAPoAAIA4AQAAdwEAgLUBAAD0AQAAcQIAAO4CAABrAwAA6AMAAOIEAAAAAABaBRAAGwAAAIwAAAA3"),Jf(Lf,1057972,"IlYAAMBdAACAPgAAAAAAAESsAACAuwAAAH0AAAAAAABaBRAAGwAAAI8AAABWAAAAQAIAAAAAAABAAgAAgAQAAFoFEAAbAAAAoAAAAEIAAAACAgIBWgUQABsAAACqAAAAQgAAAFoFEAAbAAAAvAAAADwAAABaBRAAGwAAAPgAAAAWAAAAWgUQABsAAAAKAQAAOAAAAFoFEAAbAAAAGgEAADoAAABaBRAAGwAAABsBAAA6AAAAWgUQABsAAAAcAQAAOAAAAFoFEAAbAAAAOAEAAEoAAABaBRAAGwAAAEEBAAAjAAAAWgUQABsAAABEAQAAEAAAAFoFEAAbAAAARQEAABAAAABaBRAAGwAAAEYBAAAQAAAAWgUQABsAAABJAQAAEAAAAFoFEAAbAAAASgEAABAAAABaBRAAGwAAAEsBAAAQAAAAWgUQABsAAABMAQAAEAAAAFoFEAAbAAAATQEAABAAAABaBRAAGwAAAE4BAAAQAAAAWgUQABsAAABPAQAAEAAAAFoFEAAbAAAAUAEAABAAAABaBRAAGwAAAFEBAAAQAAAAWgUQABsAAABSAQAAEAAAAFoFEAAbAAAAUwEAABAAAABaBRAAGwAAAFYBAAAQAAAAWgUQABsAAABXAQAAEAAAAFoFEAAbAAAAWAEAABAAAABaBRAAGwAAAFkBAAAQAAAAWgUQABsAAABaAQAAEAAAAFoFEAAbAAAAWwEAABAAAABAAAAAFAAAABUAAAAWAAAAFwAAAEEAAABCAAAAQwAAAEQAAABFAAAAY2Fubm90IGFkdmFuY2UgcGFzdCBgcmVtYWluaW5nYDogIDw9IAAAAAAnEAAhAAAAIScQAAQAAACbAxAAXgAAAMcCAAAJAAAAdHJpbV9sZW5ndGhfZnJvbV9lbmQgY2FuIG9ubHkgYmUgdXNlZCB0byByZWR1Y2UgdGhlIGxlbmd0aCBvZiBhIEZyYWdtZW50ZWREYXRhAABIJxAATgAAAL0KEAAbAAAARwAAAAkAAAC9ChAAGwAAAGsAAAAYAAAAdAAQAGIAAACVAAAAHAAAAG1pZCA+IGxlbgAAANAnEAAJAAAAaQEQAJMAAABOAAAAHwAAAGkBEACTAAAASAAAABcAAAA+BRAAHAAAAAkDAAAOAAAATGF6eSBpbnN0YW5jZSBoYXMgcHJldmlvdXNseSBiZWVuIHBvaXNvbmVkAAAUKBAAKgAAAAEKEABgAAAACAMAABkAAAByZWVudHJhbnQgaW5pdAAAWCgQAA4AAAABChAAYAAAAHoCAAANAAAAAwAAAAYAAAAGAAAAAwAAAAUAAAADAAAADQAAABUAAAAFAAAABQAAAAgAAAAFAAAACQAAAAsAAAAKAAAABQAAAAUAAAAIAAAACAAAAAgAAAAMAAAABQAAAAoAAAANAAAAAwAAAAYAAAAHAAAABQAAAAYAAAAEAAAABAAAAAsAAAANAAAACgAAAA0AAAAOAAAACgAAAAgAAAADAAAABwAAABAAAAAIAAAABgAAAAMAAAALAAAABgAAAAkAAAALAAAACAAAAAoAAAAKAAAABQAAAAcAAAAEAAAABAAAAAQAAAAKAAAAlRMQAJgTEACeExAApBMQAKcTEACsExAArxMQALwTEADRExAA1hMQANsTEADjExAA6BMQAPETEAD8ExAABhQQAAsUEAAQFBAAGBQQACAUEAAoFBAANBQQADkUEABDFBAAUBQQAFMUEABZFBAAYBQQAGUUEABrFBAAbxQQAHMUEAB+FBAAixQQAJUUEACiFBAAsBQQALoUEADCFBAAxRQQAMwUEADcFBAA5BQQAOoUEADtFBAA+BQQAP4UEAAHFRAAEhUQABoVEAAkFRAALhUQADMVEAA6FRAAPhUQAEIVEABGFRAAfB4QAIIeEACLHhAAmB4QAKoeEAC/HhAABgAAAAkAAAANAAAAEgAAABUAAAAaAAAAeAIQAMcAAACmAAAAFA=="),Jf(Lf,1059488,"Rg==");var fi=[null,function(r,e){e|=0;var A,a,t=0,b=0,u=0,o=0,c=0,s=0;if(S=A=S-16|0,t=10,(b=a=f[(r|=0)>>2])>>>0>=1e3)for(r=b;u=(A+6|0)+t|0,s=(c=((65535&(o=r-k(b=(r>>>0)/1e4|0,1e4)|0))>>>0)/100|0)<<1,i[u-3|0]=n[s+1052265|0],i[u-4|0]=n[s+1052264|0],o=(o-k(c,100)&65535)<<1,i[u-1|0]=n[o+1052265|0],i[u-2|0]=n[o+1052264|0],t=t-4|0,u=r>>>0>9999999,r=b,u;);return b>>>0<=9?r=b:(b=(b-k(r=((65535&b)>>>0)/100|0,100)&65535)<<1,i[5+(t+A|0)|0]=n[b+1052265|0],i[(t=t-2|0)+(A+6|0)|0]=n[b+1052264|0]),!r&&a||(i[(t=t-1|0)+(A+6|0)|0]=n[1052265+(r<<1&30)|0]),r=pr(e,1,0,(A+6|0)+t|0,10-t|0),S=A+16|0,0|r},function(r,e){return 0|q(e|=0,f[(r|=0)>>2],f[r+4>>2])},function(r,e){r|=0;var A,n=0,a=0;S=A=S-144|0;r:{e:{if(!(33554432&(n=f[(e|=0)+8>>2]))){if(67108864&n)break e;Kr(A+8|0,f[r>>2],A+16|0),r=pr(e,1,0,f[A+8>>2],f[A+12>>2]);break r}for(r=f[r>>2],n=129;a=15&r,i[14+(n+A|0)|0]=a>>>0<10?48|a:a+87|0,n=n-1|0,a=r>>>0>15,r=r>>>4|0,a;);r=pr(e,1052262,2,15+(n+A|0)|0,129-n|0);break r}for(r=f[r>>2],n=129;a=15&r,i[14+(n+A|0)|0]=a>>>0<10?48|a:a+55|0,n=n-1|0,a=r>>>0>15,r=r>>>4|0,a;);r=pr(e,1052262,2,15+(n+A|0)|0,129-n|0)}return S=A+144|0,0|r},function(r,e){var i;return e|=0,S=i=S-48|0,57==n[(r|=0)+8|0]?(f[i+12>>2]=r,f[i+20>>2]=1,f[i+16>>2]=1054404,f[i+28>>2]=1,f[i+32>>2]=0,f[i+40>>2]=i+12,f[i+44>>2]=5):(f[i+20>>2]=1,f[i+16>>2]=1054424,f[i+28>>2]=1,f[i+32>>2]=0,f[i+40>>2]=r+8,f[i+44>>2]=6),f[i+24>>2]=i+40,r=Qr(f[e>>2],f[e+4>>2],i+16|0),S=i+48|0,0|r},function(r,e){return e|=0,r=f[(r|=0)>>2],0|q(e,f[r>>2],f[r+4>>2])},function(r,e){return e|=0,r=n[0|(r|=0)]<<2,0|fi[f[f[e+4>>2]+12>>2]](f[e>>2],f[r+1059172>>2],f[r+1058944>>2])},function(r,e){e|=0;var A,f=0,a=0;for(S=A=S-128|0,a=n[0|(r|=0)],r=129;f=15&a,i[(r+A|0)-2|0]=f>>>0<10?48|f:f+87|0,a=(f=a)>>>4|0,r=r-1|0,f>>>0>15;);return r=pr(e,1052262,2,(r+A|0)-1|0,129-r|0),S=A+128|0,0|r},function(r,e){var i;return e|=0,S=i=S-32|0,Kr(i+8|0,f[(r|=0)>>2],i+22|0),r=pr(e,1,0,f[i+8>>2],f[i+12>>2]),S=i+32|0,0|r},function(r,e){return e|=0,0|fi[f[f[(r|=0)+4>>2]+12>>2]](f[r>>2],e)},function(r,e){e|=0;var n,a,t,b=0,k=0;for(S=n=S-128|0,r=f[(r|=0)>>2],t=f[e+12>>2],8388608&(b=a=f[e+8>>2])&&(134217728&b?b|=16777216:(A[e+12>>1]=10,b|=150994944)),f[e+8>>2]=8388608|b,b=129;k=15&r,i[(b+n|0)-2|0]=k>>>0<10?48|k:k+87|0,b=b-1|0,k=r>>>0<16,r=r>>>4|0,!k;);return r=pr(e,1052262,2,(b+n|0)-1|0,129-b|0),f[e+8>>2]=a,f[e+12>>2]=t,S=n+128|0,0|r},function(r,e){return r|=0,0|Qr(f[(e|=0)>>2],f[e+4>>2],r)},Ee,Ge,re,function(r,e){return 0|Qr(r|=0,1051416,e|=0)},Ge,re,function(r,e){return 0|fi[f[f[(e|=0)+4>>2]+12>>2]](f[e>>2],1053584,5)},function(r,e,i,A){i|=0,A|=0,f[(r|=0)+12>>2]=0,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1051612},function(r,e,i,A){r|=0,e|=0,i|=0;var n=0;e=0;r:{if((0|(A|=0))>=0){if(!A){n=1;break r}if(e=A,n=V(A))break r;r=1}else r=0;Ze(r,1057036),$f()}i=ze(n,i,A),f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=e},function(r,e,i,A){r|=0,e|=0,i|=0;var n=0;e=0;r:{if((0|(A|=0))>=0){if(!A){n=1;break r}if(e=A,n=V(A))break r;r=1}else r=0;Ze(r,1057036),$f()}i=ze(n,i,A),f[r+8>>2]=e,f[r+4>>2]=A,f[r>>2]=i,f[r+12>>2]=e>>>0>131071?29:129-(o(e>>>10|0)<<2)|0},function(r){return 0},function(r,e,i){},function(r,e,i,A){var n;if(r|=0,i|=0,A|=0,1&(n=f[(e|=0)>>2]))ne(r,e,n,-2&n,i,A);else{if(e=f[n+8>>2],f[n+8>>2]=e+1,(0|e)>=0)return f[r+12>>2]=n,f[r+8>>2]=A,f[r+4>>2]=i,void(f[r>>2]=1052028);Xe(),$f()}},function(r,e,i,A){if(r|=0,i|=0,A|=0,1&(e=f[(e|=0)>>2]))return e=Pe(-2&e,i,A),f[r+8>>2]=A,f[r+4>>2]=e,void(f[r>>2]=(i-e|0)+A);Wr(r,e,i,A)},function(r,e,i,A){r|=0,i|=0,A|=0;var n=0,a=0,t=0,b=0,k=0;r:{e:{i:{A:{if(1&(e=f[(e|=0)>>2])){if(n=(e=(t=i-(a=-2&e)|0)+A|0)>>>0>131071?29:129-(o(e>>>10|0)<<2)|0,(0|i)==(0|a)){i=n,A=e;break r}if((i=(b=n>>>5|0)+t|0)>>>0<134217728)break i;if(!(i=V(20)))break A;f[i+16>>2]=1,k=e+b|0,f[i+8>>2]=k,f[i>>2]=k,f[i+4>>2]=a-b,f[i+12>>2]=n>>>2&7;break e}return void yr(r,e,i,A)}$f()}i=29&n|i<<5}e=e>>>0>=(n=e-t|0)>>>0?n:0,a=a+t|0}f[r+12>>2]=i,f[r+8>>2]=A,f[r+4>>2]=e,f[r>>2]=a},function(r){return 0|(r=1&(r=f[(r|=0)>>2])?1:1==f[r+8>>2])},function(r,e,i){e|=0,i|=0;var A,n=0,a=0;S=A=S-16|0;r:{e:{i:{A:{if(1&(r=f[(r|=0)>>2])){if((0|(e=(e-(r&=-2)|0)+i|0))<0)break A;if((i=-8&(n=f[r-4>>2]))>>>0>>0)break e;if(i>>>0>e+39>>>0&&n)break r;nr(r)}else if(e=f[r+8>>2],f[r+8>>2]=e-1,1==(0|e)){if((0|(e=f[r+4>>2]))<0)break i;if(i=f[r>>2],(a=-8&(n=f[i-4>>2]))>>>0>>0)break e;if(e+39>>>0>>0&&n)break r;if(nr(i),(e=-8&(i=f[r-4>>2]))>>>0<((i&=3)?16:20)>>>0)break e;if(e>>>0>=52&&i)break r;nr(r)}return void(S=A+16|0)}ge(1051952,43,A+15|0,1051936,1051996),$f()}ge(1051952,43,A+15|0,1051936,1052012),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},function(r,e,i,A){var n;if(r|=0,i|=0,A|=0,1&(n=f[(e|=0)>>2]))ne(r,e,n,n,i,A);else{if(e=f[n+8>>2],f[n+8>>2]=e+1,(0|e)>=0)return f[r+12>>2]=n,f[r+8>>2]=A,f[r+4>>2]=i,void(f[r>>2]=1052028);Xe(),$f()}},function(r,e,i,A){if(r|=0,i|=0,A|=0,1&(e=f[(e|=0)>>2]))return e=Pe(e,i,A),f[r+8>>2]=A,f[r+4>>2]=e,void(f[r>>2]=(i-e|0)+A);Wr(r,e,i,A)},function(r,e,i,A){r|=0,i|=0,A|=0;var n=0,a=0,t=0,b=0,k=0;r:{e:{i:{A:{if(1&(e=f[(e|=0)>>2])){if(a=(n=(t=i-e|0)+A|0)>>>0>131071?29:129-(o(n>>>10|0)<<2)|0,(0|e)==(0|i)){i=a,A=n;break r}if((i=(b=a>>>5|0)+t|0)>>>0<134217728)break i;if(!(i=V(20)))break A;f[i+16>>2]=1,k=n+b|0,f[i+8>>2]=k,f[i>>2]=k,f[i+4>>2]=e-b,f[i+12>>2]=a>>>2&7;break e}return void yr(r,e,i,A)}$f()}i=29&a|i<<5}n=n>>>0>=(a=n-t|0)>>>0?a:0,e=e+t|0}f[r+12>>2]=i,f[r+8>>2]=A,f[r+4>>2]=n,f[r>>2]=e},function(r,e,i){e|=0,i|=0;var A,n=0,a=0;S=A=S-16|0;r:{e:{i:{A:{f:{n:{if(1&(r=f[(r|=0)>>2])){if((0|(e=(e-r|0)+i|0))<0)break A;if((i=-8&(n=f[r-4>>2]))>>>0>>0)break r;if(!n|i>>>0<=e+39>>>0)break n;break e}if(e=f[r+8>>2],f[r+8>>2]=e-1,1!=(0|e))break f;if((0|(e=f[r+4>>2]))<0)break i;if(i=f[r>>2],(a=-8&(n=f[i-4>>2]))>>>0>>0)break r;if(e+39>>>0>>0&&n)break e;if(nr(i),(e=-8&(i=f[r-4>>2]))>>>0<((i&=3)?16:20)>>>0)break r;if(i&&e>>>0>=52)break e}nr(r)}return void(S=A+16|0)}ge(1051952,43,A+15|0,1051936,1051996),$f()}ge(1051952,43,A+15|0,1051936,1052012),$f()}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()},function(r,e){return 0|fi[f[f[(e|=0)+4>>2]+12>>2]](f[e>>2],1051600,11)},function(r,e,i,A){var n;r|=0,i|=0,A|=0,e=f[(e|=0)>>2],n=f[e+8>>2],f[e+8>>2]=n+1,(0|n)<0&&(Xe(),$f()),f[r+12>>2]=e,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1052028},function(r,e,i,A){i|=0,A|=0,Wr(r|=0,f[(e|=0)>>2],i,A)},function(r,e,i,A){i|=0,A|=0,yr(r|=0,f[(e|=0)>>2],i,A)},function(r){return 1==f[f[(r|=0)>>2]+8>>2]|0},function(r,e,i){e|=0,i|=0;var A=0,n=0,a=0;S=e=S-16|0,r=f[(r|=0)>>2],i=f[r+8>>2],f[r+8>>2]=i-1;r:{e:{i:{A:{f:{if(1==(0|i)){if((0|(i=f[r+4>>2]))<0)break f;if(A=f[r>>2],(a=-8&(n=f[A-4>>2]))>>>0>>0)break A;if(i+39>>>0>>0&&n)break i;if(nr(A),(i=-8&(A=f[r-4>>2]))>>>0<((A&=3)?16:20)>>>0)break e;if(i>>>0>=52&&A)break r;nr(r)}return void(S=e+16|0)}ge(1051952,43,e+15|0,1051936,1052012),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},Ee,Ge,re,function(r,e){return 0|Qr(r|=0,1052212,e|=0)},function(r,e){e|=0;var A,n=0,a=0;S=A=S-144|0,r=f[(r|=0)>>2];r:{e:{if(!(33554432&(n=f[e+8>>2]))){if(67108864&n)break e;Kr(A+8|0,f[r>>2],A+16|0),r=pr(e,1,0,f[A+8>>2],f[A+12>>2]);break r}for(r=f[r>>2],n=129;a=15&r,i[14+(n+A|0)|0]=a>>>0<10?48|a:a+87|0,n=n-1|0,a=r>>>0>15,r=r>>>4|0,a;);r=pr(e,1052262,2,15+(n+A|0)|0,129-n|0);break r}for(r=f[r>>2],n=129;a=15&r,i[14+(n+A|0)|0]=a>>>0<10?48|a:a+55|0,n=n-1|0,a=r>>>0>15,r=r>>>4|0,a;);r=pr(e,1052262,2,15+(n+A|0)|0,129-n|0)}return S=A+144|0,0|r},function(r,e){return 0|Qr(r|=0,1053260,e|=0)},re,function(r,e){f[(r|=0)+8>>2]=2086828853,f[r+12>>2]=-1795647643,f[r>>2]=-2078298696,f[r+4>>2]=662475520},function(r,e){f[(r|=0)+8>>2]=-691315347,f[r+12>>2]=1676365868,f[r>>2]=1470513528,f[r+4>>2]=-1182065807},function(r,e){return r|=0,0|fi[f[f[(e|=0)+4>>2]+12>>2]](f[e>>2],f[r>>2],f[r+4>>2])},function(r,e){var i,A;r|=0,i=f[(e|=0)+4>>2],A=f[e>>2],(e=V(8))||$f(),f[e+4>>2]=i,f[e>>2]=A,f[r+4>>2]=1053400,f[r>>2]=e},function(r,e){e|=0,f[(r|=0)+4>>2]=1053400,f[r>>2]=e},function(r,e){var i;r|=0,i=f[(e|=0)+4>>2],f[r>>2]=f[e>>2],f[r+4>>2]=i},Be,function(r,e){e|=0;var i,A=0,n=0,a=0;return S=i=S-32|0,-2147483648==f[(r|=0)>>2]?(r=f[f[r+12>>2]>>2],a=f[(n=r+8|0)+4>>2],f[(A=i+16|0)>>2]=f[n>>2],f[A+4>>2]=a,a=f[(n=r+16|0)+4>>2],f[(A=i+24|0)>>2]=f[n>>2],f[A+4>>2]=a,A=f[r+4>>2],f[i+8>>2]=f[r>>2],f[i+12>>2]=A,r=Qr(f[e>>2],f[e+4>>2],i+8|0)):r=0|fi[f[f[e+4>>2]+12>>2]](f[e>>2],f[r+4>>2],f[r+8>>2]),S=i+32|0,0|r},function(r,e){r|=0;var i,A=0,n=0,a=0,t=0;S=i=S+-64|0,-2147483648==f[(e|=0)>>2]&&(A=f[e+12>>2],f[i+36>>2]=0,f[i+28>>2]=0,f[i+32>>2]=1,A=f[A>>2],t=f[(a=A+8|0)+4>>2],f[(n=i+48|0)>>2]=f[a>>2],f[n+4>>2]=t,t=f[(a=A+16|0)+4>>2],f[(n=i+56|0)>>2]=f[a>>2],f[n+4>>2]=t,n=f[A+4>>2],f[i+40>>2]=f[A>>2],f[i+44>>2]=n,Qr(i+28|0,1053360,i+40|0),a=f[i+36>>2],f[i+24>>2]=a,n=f[i+32>>2],A=f[i+28>>2],f[i+16>>2]=A,f[i+20>>2]=n,f[e+8>>2]=a,f[e>>2]=A,f[e+4>>2]=n),A=f[e>>2],n=f[e+4>>2],f[e>>2]=0,f[e+4>>2]=1,e=e+8|0,f[(a=i+8|0)>>2]=f[e>>2],f[e>>2]=0,f[i>>2]=A,f[i+4>>2]=n,(e=V(12))||$f(),A=f[i+4>>2],f[e>>2]=f[i>>2],f[e+4>>2]=A,f[e+8>>2]=f[a>>2],f[r+4>>2]=1053384,f[r>>2]=e,S=i- -64|0},function(r,e){r|=0;var i,A=0,n=0,a=0,t=0;S=i=S-48|0,-2147483648==f[(e|=0)>>2]&&(n=f[e+12>>2],f[i+20>>2]=0,f[i+12>>2]=0,f[i+16>>2]=1,n=f[n>>2],t=f[(a=n+8|0)+4>>2],f[(A=i+32|0)>>2]=f[a>>2],f[A+4>>2]=t,t=f[(a=n+16|0)+4>>2],f[(A=i+40|0)>>2]=f[a>>2],f[A+4>>2]=t,A=f[n+4>>2],f[i+24>>2]=f[n>>2],f[i+28>>2]=A,Qr(i+12|0,1053360,i+24|0),a=f[i+20>>2],f[i+8>>2]=a,n=f[i+16>>2],A=f[i+12>>2],f[i>>2]=A,f[i+4>>2]=n,f[e+8>>2]=a,f[e>>2]=A,f[e+4>>2]=n),f[r+4>>2]=1053384,f[r>>2]=e,S=i+48|0},function(r,e){f[(r|=0)>>2]=0},function(r,e,i){e|=0,i|=0;var A=0;return A=f[(r|=0)+8>>2],f[r>>2]-A>>>0>>0&&(Ae(r,A,i,1,1),A=f[r+8>>2]),ze(f[r+4>>2]+A|0,e,i),f[r+8>>2]=i+A,0},function(r,e){e|=0;var A,n=0,a=0;n=A=f[(r|=0)+8>>2],a=1,e>>>0<128||(a=2,e>>>0<2048||(a=e>>>0<65536?3:4)),a>>>0>f[r>>2]-A>>>0&&(Ae(r,A,a,1,1),n=f[r+8>>2]),n=f[r+4>>2]+n|0;r:{e:{if(e>>>0>=128){if(e>>>0<2048)break e;if(e>>>0>=65536){i[n+3|0]=63&e|128,i[0|n]=e>>>18|240,i[n+2|0]=e>>>6&63|128,i[n+1|0]=e>>>12&63|128;break r}i[n+2|0]=63&e|128,i[0|n]=e>>>12|224,i[n+1|0]=e>>>6&63|128;break r}i[0|n]=e;break r}i[n+1|0]=63&e|128,i[0|n]=e>>>6|192}return f[r+8>>2]=A+a,0},function(r,e){return 0|Qr(r|=0,1057216,e|=0)},function(r,e,i,A){i|=0,A|=0,f[(r|=0)+12>>2]=0,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1055092},function(r,e,i,A){i|=0,A|=0,f[(r|=0)+12>>2]=0,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1056088},function(r,e,i,A){i|=0,A|=0,f[(r|=0)+12>>2]=0,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1057440},function(r,e,i,A){i|=0,A|=0,f[(r|=0)+12>>2]=0,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1057596},function(r,e,i,A){i|=0,A|=0,f[(r|=0)+12>>2]=0,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1058520},function(r,e,i,A){var n;r|=0,i|=0,A|=0,e=f[(e|=0)>>2],n=f[e+16>>2],f[e+16>>2]=n+1,(0|n)<0&&(Xe(),$f()),f[r+12>>2]=e,f[r+8>>2]=A,f[r+4>>2]=i,f[r>>2]=1058540},function(r,e,i,A){r|=0,i|=0,A|=0;var n=0,a=0,t=0,b=0,k=0,u=0;r:{e:{i:{A:{if(a=f[(e|=0)>>2],1!=f[a+16>>2]){if((0|A)>=0){if(!A){e=0,k=1;break A}if(e=A,k=V(A))break A;r=1}else r=0;Ze(r,1057036),$f()}f[a+8>>2]=0,k=f[(t=a+4|0)>>2],e=f[a>>2],f[a>>2]=0,f[a+4>>2]=1,n=f[a+16>>2],f[a+16>>2]=n-1;f:{if(1==(0|n)){if(n=f[a>>2]){if(t=f[t>>2],(u=-8&(b=f[t-4>>2]))>>>0>>0)break e;if(n+39>>>0>>0&&b)break r;nr(t)}if((n=-8&(t=f[a-4>>2]))>>>0<((t&=3)?24:28)>>>0)break e;if(n>>>0>=60&&t)break f;nr(a)}Pe(k,i,A);break i}break r}if(ze(k,i,A),i=f[a+16>>2],f[a+16>>2]=i-1,1==(0|i)){if(i=f[a>>2]){if(t=f[a+4>>2],(n=-8&(b=f[t-4>>2]))>>>0>>0)break e;if(n>>>0>i+39>>>0&&b)break r;nr(t)}if((i=-8&(n=f[a-4>>2]))>>>0<((n&=3)?24:28)>>>0)break e;if(i>>>0>=60&&n)break r;nr(a)}}return f[r+8>>2]=A,f[r+4>>2]=k,void(f[r>>2]=e)}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},function(r,e,i,A){r|=0,i|=0,A|=0;var n=0,a=0,t=0,b=0,k=0;r:{e:{i:{A:{f:{n:{if(e=f[(e|=0)>>2],1!=f[e+16>>2]){if((0|A)>=0){if(!A){a=1;break n}if(b=A,a=V(A))break n;r=1}else r=0;Ze(r,1057036),$f()}b=f[e+4>>2]+(f[e>>2]-i|0)|0,a=i;break f}if(ze(a,i,A),i=f[e+16>>2],f[e+16>>2]=i-1,1==(0|i)){if(i=f[e>>2]){if(n=f[e+4>>2],(k=-8&(t=f[n-4>>2]))>>>0>>0)break A;if(i+39>>>0>>0&&t)break i;nr(n)}if((i=-8&(n=f[e-4>>2]))>>>0<((n&=3)?24:28)>>>0)break e;if(i>>>0>=60&&n)break r;nr(e)}e=b>>>0>131071?29:129-(o(b>>>10|0)<<2)|0}return f[r+12>>2]=e,f[r+8>>2]=b,f[r+4>>2]=A,void(f[r>>2]=a)}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},function(r){return 1==f[f[(r|=0)>>2]+16>>2]|0},function(r,e,i){e|=0,i|=0;var A=0,n=0;r=f[(r|=0)>>2],e=f[r+16>>2],f[r+16>>2]=e-1;r:{e:{i:{A:{if(1==(0|e)){if(e=f[r>>2]){if(i=f[r+4>>2],(n=-8&(A=f[i-4>>2]))>>>0>>0)break A;if(e+39>>>0>>0&&A)break i;nr(i)}if((e=-8&(i=f[r-4>>2]))>>>0<((i&=3)?24:28)>>>0)break e;if(e>>>0>=60&&i)break r;nr(r)}return}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()}Ye(1053092,46,1053140),$f()}Ye(1053156,46,1053204),$f()},function(r){f[(r|=0)+16>>2]=0,f[r+8>>2]=0,f[r+12>>2]=0,f[r>>2]=0,f[r+4>>2]=4}];function ni(r){r|=0;var u=e.byteLength/65536|0,o=u+r|0;if(u>2],f[(E=h+448|0)>>2]=f[g>>2],f[E+4>>2]=e,e=f[h+228>>2],f[h+440>>2]=f[h+224>>2],f[h+444>>2]=e,2==(0|(e=a[h+180>>1]))?(e=0,f[h+488>>2]=0,f[h+472>>2]=0,A[h+468>>1]=0,A[h+464>>1]=0):(A[h+502>>1]=a[h+222>>1],E=a[(g=h+214|0)+4>>1]|a[g+6>>1]<<16,y=h+494|0,g=a[g>>1]|a[g+2>>1]<<16,A[y>>1]=g,A[y+2>>1]=g>>>16,A[y+4>>1]=E,A[y+6>>1]=E>>>16,E=a[(g=h+206|0)+4>>1]|a[g+6>>1]<<16,y=h+486|0,g=a[g>>1]|a[g+2>>1]<<16,A[y>>1]=g,A[y+2>>1]=g>>>16,A[y+4>>1]=E,A[y+6>>1]=E>>>16,E=a[(g=h+198|0)+4>>1]|a[g+6>>1]<<16,y=h+478|0,g=a[g>>1]|a[g+2>>1]<<16,A[y>>1]=g,A[y+2>>1]=g>>>16,A[y+4>>1]=E,A[y+6>>1]=E>>>16,E=a[(g=h+190|0)+4>>1]|a[g+6>>1]<<16,y=h+470|0,g=a[g>>1]|a[g+2>>1]<<16,A[y>>1]=g,A[y+2>>1]=g>>>16,A[y+4>>1]=E,A[y+6>>1]=E>>>16,E=a[h+186>>1]|a[h+188>>1]<<16,g=a[h+182>>1]|a[h+184>>1]<<16,A[h+462>>1]=g,A[h+464>>1]=g>>>16,A[h+466>>1]=E,A[h+468>>1]=E>>>16),A[h+460>>1]=e,v=h+840|0,R=h+460|0,S=o=S-3344|0;r:{e:{i:{A:{f:{n:{a:{if((L=f[(Tr=h+440|0)+8>>2])>>>0>=376)for(Te=o+664|0,ue=o+656|0,Or=o+688|0,Gr=o+680|0,p=o+2608|0,g=o+2616|0,y=f[Tr+4>>2],e=L>>>0>=1e3?1e3:L;;){if(71==n[0|(E=y+B|0)]&&71==n[E+188|0]){B&&(f[o+1456>>2]=B,B>>>0<=L>>>0?(L=L-B|0,f[Tr+8>>2]=L,f[Tr+4>>2]=f[Tr+4>>2]+B):(f[o+1704>>2]=L,f[o+2188>>2]=2,f[o+2184>>2]=1058600,f[o+2196>>2]=2,f[o+2200>>2]=0,f[o+3024>>2]=o+1704,f[o+3028>>2]=3,f[o+3016>>2]=o+1456,f[o+3020>>2]=3,f[o+2192>>2]=o+3016,Me(o+2184|0,1058616),$f())),A[o+2896>>1]=0,f[o+2440>>2]=2,f[o+2444>>2]=0,f[o+2184>>2]=2,f[o+2188>>2]=0,f[o+2608>>2]=3,f[o+2612>>2]=0,B=(L>>>0)/188|0,T=4,e=0;t:{b:{k:{u:{o:{c:{s:{l:{h:{v:{d:{w:{if(!(L>>>0>=188)||(T=V(k(e=B,20)))){if(f[o+2912>>2]=T,f[o+2908>>2]=e,f[o+2916>>2]=0,!(I=B+!!(((k(B,188)-L|0)+L>>>0)%188|0)|0))break d;Ar=o+1832|0,Er=o+2948|0,br=o+3024|0,q=o+3020|0,ke=1,e=188,B=0;g:{y:{for(;;){if(zr(o+2936|0,Tr,B,B+188|0),!(E=f[o+2944>>2]))break s;y=e,I=I-1|0,e=!!(0|E),B=L=f[o+2940>>2];B:{E:{for(;;){if(71!=n[0|B])break E;if(B=B+1|0,!(e=e-1|0))break}if(!E)break s;if(f[o+2928>>2]=0,f[o+2924>>2]=E-1,f[o+2920>>2]=L+1,Jr(E=o+1456|0,o+2920|0),m=n[o+1472|0],B=f[o+1464>>2],e=f[o+1460>>2],3!=(0|(N=f[o+1456>>2])))break v;if(f[o+2968>>2]=f[o+1468>>2],f[o+2964>>2]=B,f[o+2960>>2]=e,Jr(E,o+2960|0),K=n[o+1472|0],B=f[o+1464>>2],e=f[o+1460>>2],3==(0|(N=f[o+1456>>2])))break B;m=K;break v}rr=1,ke=0;break c}if(f[o+2984>>2]=f[o+1468>>2],f[o+2980>>2]=B,f[o+2976>>2]=e,Jr(o+1456|0,o+2976|0),B=f[o+1464>>2],_=f[o+1460>>2],3!=(0|(N=f[o+1456>>2]))){m=n[o+1472|0],e=_;break v}if(e=13,(Q=(O=f[o+1468>>2])+13|0)>>>0>B<<3>>>0)break h;N=Q>>>3|0;B:{E:{if(B){if(C=n[0|_]&255>>>(7&O),er=13,(ie=8-O|0)>>>0>13){E=0;break E}if(E=C<<(e=O+5|0),J=0,Q>>>0<8)break B;for(Ir=_+1|0,O=B-1|0,er=7&e,W=N;;){if(!O|!e)break B;if(ie=8,C=n[0|Ir],e>>>0<8){O=0;break E}if(Ir=Ir+1|0,O=O-1|0,E=(C<<(15&(e=e-8|0)))+E|0,!(W=W-1|0))break}}else E=0;J=0;break B}J=O+er|0,E=(C>>>(ie-er&15)|0)+E|0}B:{E:{if(B>>>0>=N>>>0){if(e=2,(Y=J+2|0)>>>0>(F=B-N|0)<<3>>>0)break h;if(Yr=_+N|0,_=Y>>>3|0,O=0,er=0,(0|B)==(0|N))break B;if(W=n[0|Yr]&255>>>(7&J),D=2,(ur=8-J|0)>>>0>2)break E;if(O=W<<(Q=J-6|0),Y>>>0<8)break B;for(e=J-14|0,D=7&Q,C=Yr+1|0,B=(-1^N)+B|0,N=_;;){if(!B|-8==(0|e))break B;if(ur=8,W=n[0|C],e+8>>>0<8){J=0;break E}if(C=C+1|0,B=B-1|0,O=(W<<(15&e))+O|0,e=e-8|0,!(N=N-1|0))break}break B}xe(N,B,1053076),$f()}er=D+J|0,O=(W>>>(ur-D&15)|0)+O|0}if(!(_>>>0<=F>>>0))break;if(f[o+3312>>2]=er,f[o+3308>>2]=F-_,f[o+3304>>2]=_+Yr,Jr(o+1456|0,o+3304|0),Q=n[o+1472|0],B=f[o+1464>>2],e=f[o+1460>>2],3!=(0|(N=f[o+1456>>2]))){m=Q;break v}if(f[o+3328>>2]=f[o+1468>>2],f[o+3324>>2]=B,f[o+3320>>2]=e,Jr(o+1456|0,o+3320|0),_=n[o+1472|0],B=f[o+1464>>2],Ir=f[o+1460>>2],3!=(0|(N=f[o+1456>>2]))){m=_,e=Ir;break v}if(e=4,(N=f[o+1468>>2]+4|0)>>>0>B<<3>>>0)break h;if((w=N>>>3|0)>>>0>B>>>0)break y;if((e=B-w|0)>>>0<(d=!!(7&N))>>>0)break g;B=e-d|0,e=d+(w+Ir|0)|0;B:{E:{_:{if(!(!(1&_)|1&m|65535&O)){if(1&Q){if(!B)break u;if((d=B-1|0)>>>0<(w=n[0|e])>>>0)break _;B=d-w|0,e=1+(e+w|0)|0}if(B)break E;B=0}d=f[(w=o+3032|0)>>2],w=f[w+4>>2],f[(N=o+1720|0)>>2]=d,f[N+4>>2]=w,N=f[br+4>>2],f[Ar>>2]=f[br>>2],f[Ar+4>>2]=N,f[(N=o+1840|0)>>2]=d,f[N+4>>2]=w,A[o+1848>>1]=a[o+3040>>1],f[o+3020>>2]=B,f[o+3016>>2]=e,e=f[o+3020>>2],f[o+1824>>2]=f[o+3016>>2],f[o+1828>>2]=e;break B}xe(w,d,1054388),$f()}if(_r(br,o+2936|0,e,B),A[o+1728>>1]=E,w=f[(e=o+3032|0)>>2],d=f[e+4>>2],f[(e=o+1720|0)>>2]=w,f[e+4>>2]=d,A[o+1848>>1]=E,e=f[br+4>>2],f[Ar>>2]=f[br>>2],f[Ar+4>>2]=e,f[(e=o+1840|0)>>2]=w,f[e+4>>2]=d,f[o+1824>>2]=1,f[o+1828>>2]=0,N=n[o+3043|0],f[o+2908>>2]==(0|tr)){E=0,S=B=S-32|0,e=qe(m=(e=(_=f[(Q=o+2908|0)>>2])<<1)>>>0<=4?4:e,0,20,0);E:{if(!(M||e>>>0>2147483644)){if(d=e,e=B,_?(f[e+28>>2]=k(_,20),f[e+20>>2]=f[Q+4>>2],w=4):w=0,f[e+24>>2]=w,Ce(e+8|0,4,d,e+20|0),1!=f[e+8>>2])break E;E=f[e+12>>2]}Ze(E,1054260),$f()}d=f[e+12>>2],f[Q>>2]=m,f[Q+4>>2]=d,S=e+32|0,T=f[o+2912>>2]}e=f[Ar+4>>2],B=k(tr,20)+T|0,f[(d=B)>>2]=f[Ar>>2],f[d+4>>2]=e,d=f[(e=Ar+8|0)>>2],w=f[e+4>>2],E=a[Ar+16>>1],i[B+19|0]=N,i[B+18|0]=1&K,A[B+16>>1]=E,f[(e=B+8|0)>>2]=d,f[e+4>>2]=w,tr=tr+1|0,f[o+2916>>2]=tr}if(fi[f[f[o+2936>>2]+16>>2]](Er,f[o+2940>>2],f[o+2944>>2]),e=y+188|0,N=L,B=y,!I)break w}xe(_,F,1053076),$f()}xe(w,B,1053076),$f()}xe(d,e,1053076),$f()}Ze(4,1054116),$f()}if(tr){q=(e=f[o+2912>>2])+k(tr,20)|0,I=e+20|0,Y=o+1704|0,Ar=o+3156|0,Nr=o+2864|0,K=o+2740|0,Q=o+3284|0,er=o+3168|0,vr=o+3272|0,rr=o+3148|0,_=o+2876|0,kr=o+2856|0,F=o+2768|0,Yr=o+2760|0,m=o+2748|0,J=o+3256|0,y=o+2572|0,Ir=o+2316|0;w:{for(;;){g:{B=I;y:{B:{E:{_:{I:{Q:{N:{R:{C:{if(d=a[e+16>>1]){if(1!=a[o+2896>>1]){e=E;break y}if((0|d)==a[o+2898>>1])break C;e=E;break y}if(n[e+18|0])break R;e=E;break y}if(1!=n[e+18|0]){e=E;break y}if(le(o+3016|0,f[e+4>>2],f[e+8>>2]),w=a[o+3028>>1],I=f[o+3024>>2],e=f[o+3020>>2],3!=(0|(N=f[o+3016>>2]))){T=e,e=E,O=w|a[o+3030>>1]<<16;break I}if(d=w>>>0>I>>>0)break _;if((d=w-(d?I:0)|0)>>>0<=I>>>0){if(!(65534&(d=d>>>0>=(I=d-4|0)>>>0?I:0))){T=16;break Q}if(T=2,2==(536870911&d))break Q;if(T=8,!(d-3&536870911))break Q;if(!(536870911&(I=d-4|0)))break Q;if(I){if(!(536870911&(I=d-5|0))){T=3;break Q}if(!(536870910&I)){T=13;break Q}if(I>>>0>1){if(!(536870911&(d=d-7|0))){T=4;break Q}f[o+1704>>2]=e+7,f[o+1708>>2]=d,f[o+1712>>2]=4,Xr(o+3016|0,12,o+1704|0),T=f[o+3020>>2],d=f[o+3024>>2],w=f[o+3028>>2],E=a[o+3032>>1];C:switch(f[o+3016>>2]-1|0){default:if(T)break Q;T=0,N=0,O=0;break I;case 0:I=d,N=1,O=255&E;break I;case 1:I=d,N=2,O=255&E;break I;case 2:break C}if((w=(w>>>3|0)+!!(7&w)|0)>>>0<=d>>>0){if(ye(o+3016|0,E,w+T|0,d-w|0),T=f[o+3024>>2],N=f[o+3020>>2],f[o+3016>>2])break N;if(T>>>0<5)break y;for(;;){Rr=n[N+2|0]|(31&n[N+1|0])<<8,Er=n[N+3|0],O=n[N+4|0],(d=n[0|N])>>>0>36?(ur=0,C=0,L=0,D=0,W=1,I=1,br=1):(w=31&d,I=(63&d)>>>0>=32?15>>>w|0:((1<>>w,w=31&d,W=(63&d)>>>0>=32?31>>>w|0:((1<>>w,D=(63&d)>>>0<32?131072>>>d|0:0,L=(63&d)>>>0<32?32768>>>d|0:0,C=(63&d)>>>0<32?16>>>d|0:0,ur=(63&d)>>>0<32?8>>>d|0:0,w=31&d,br=(63&d)>>>0>=32?31>>>w|0:((1<>>w),E=w=f[o+2188>>2];C:{p:{m:{G:{if(!(!(1&br)&!w&2==(0|(d=f[o+2184>>2])))){if(1&(w=!f[o+2612>>2]&3==f[o+2608>>2])&(C|ur))break G;if(1&w&(D|L))break m;if(!(1&(2!=f[o+2440>>2]|0!=f[o+2444>>2]|W)))break p;if(1&(2!=(0|d)|!!(0|E)|I))break C;N=2,T=1054324,I=32,O=57;break I}d=f[o+3308>>2],f[Ir>>2]=f[o+3304>>2],f[Ir+4>>2]=d,f[Ir+8>>2]=f[o+3312>>2],f[o+2312>>2]=0,f[o+2296>>2]=0,f[o+2300>>2]=0,f[o+2280>>2]=0,f[o+2284>>2]=0,f[o+2264>>2]=0,f[o+2268>>2]=0,f[o+2248>>2]=0,f[o+2252>>2]=0,f[o+2232>>2]=0,f[o+2236>>2]=0,f[o+2216>>2]=0,f[o+2220>>2]=0,f[o+2200>>2]=0,f[o+2204>>2]=0,f[o+2184>>2]=0,f[o+2188>>2]=0,i[o+2436|0]=0,f[o+2432>>2]=0,f[o+2424>>2]=0,f[o+2428>>2]=8,f[o+2336>>2]=2,f[o+2340>>2]=0,i[o+2334|0]=0,A[o+2332>>1]=0,A[o+2330>>1]=Rr,A[o+2328>>1]=1;break C}if(I=o+3328|0,f[rr+8>>2]=f[I>>2],d=f[o+3324>>2],f[rr>>2]=f[o+3320>>2],f[rr+4>>2]=d,f[o+3272>>2]=0,f[o+3276>>2]=8,i[o+3166|0]=0,A[o+3164>>1]=0,A[o+3160>>1]=0,f[o+3144>>2]=0,f[o+3128>>2]=0,f[o+3132>>2]=0,f[o+3112>>2]=0,f[o+3116>>2]=0,f[o+3096>>2]=0,f[o+3100>>2]=0,f[o+3080>>2]=0,f[o+3084>>2]=0,f[o+3064>>2]=0,f[o+3068>>2]=0,f[o+3048>>2]=0,f[o+3052>>2]=0,f[o+3032>>2]=0,f[o+3036>>2]=0,f[o+3016>>2]=0,f[o+3020>>2]=0,f[Q>>2]=0,f[Q+4>>2]=0,A[(d=Q+6|0)>>1]=0,A[d+2>>1]=0,A[d+4>>1]=0,A[d+6>>1]=0,f[o+3280>>2]=0,f[(E=o+2984|0)>>2]=f[vr+8>>2],f[o+3168>>2]=2,f[o+3172>>2]=0,d=f[vr+4>>2],f[o+2976>>2]=f[vr>>2],f[o+2980>>2]=d,ze(w=o+1704|0,er,104),Br(p),d=f[o+3324>>2],f[K>>2]=f[o+3320>>2],f[K+4>>2]=d,f[K+8>>2]=f[I>>2],f[o+2736>>2]=0,f[o+2720>>2]=0,f[o+2724>>2]=0,f[o+2704>>2]=0,f[o+2708>>2]=0,f[o+2688>>2]=0,f[o+2692>>2]=0,f[o+2672>>2]=0,f[o+2676>>2]=0,f[o+2656>>2]=0,f[o+2660>>2]=0,f[o+2640>>2]=0,f[o+2644>>2]=0,f[o+2624>>2]=0,f[o+2628>>2]=0,f[o+2608>>2]=0,f[o+2612>>2]=0,i[o+2758|0]=0,A[o+2756>>1]=0,A[o+2754>>1]=Rr,A[o+2752>>1]=1,ze(Yr,w,104),f[_>>2]=0,f[_+4>>2]=0,A[(d=_+6|0)>>1]=0,A[d+2>>1]=0,A[d+4>>1]=0,A[d+6>>1]=0,f[Nr+8>>2]=f[E>>2],d=f[o+2980>>2],f[Nr>>2]=f[o+2976>>2],f[Nr+4>>2]=d,!(d=f[o+3144>>2]))break C;fi[f[d+16>>2]](Ar,f[o+3148>>2],f[o+3152>>2]);break C}if(I=o+2944|0,f[rr+8>>2]=f[I>>2],d=f[o+2940>>2],f[rr>>2]=f[o+2936>>2],f[rr+4>>2]=d,i[o+3276|0]=0,i[o+3166|0]=0,A[o+3164>>1]=0,A[o+3160>>1]=0,f[o+3144>>2]=0,f[o+3128>>2]=0,f[o+3132>>2]=0,f[o+3112>>2]=0,f[o+3116>>2]=0,f[o+3096>>2]=0,f[o+3100>>2]=0,f[o+3080>>2]=0,f[o+3084>>2]=0,f[o+3064>>2]=0,f[o+3068>>2]=0,f[o+3048>>2]=0,f[o+3052>>2]=0,f[o+3032>>2]=0,f[o+3036>>2]=0,f[o+3016>>2]=0,f[o+3020>>2]=0,f[o+3256>>2]=0,f[o+3260>>2]=8,f[o+3264>>2]=0,f[(E=o+2984|0)>>2]=f[J+8>>2],f[o+3168>>2]=2,f[o+3172>>2]=0,i[o+3277|0]=0,i[o+3278|0]=0,f[o+3268>>2]=0,f[o+3272>>2]=0,d=f[J+4>>2],f[o+2976>>2]=f[J>>2],f[o+2980>>2]=d,ze(w=o+1704|0,er,88),Br(p),d=f[o+2940>>2],f[m>>2]=f[o+2936>>2],f[m+4>>2]=d,f[m+8>>2]=f[I>>2],f[o+2744>>2]=0,f[o+2728>>2]=0,f[o+2732>>2]=0,f[o+2712>>2]=0,f[o+2716>>2]=0,f[o+2696>>2]=0,f[o+2700>>2]=0,f[o+2680>>2]=0,f[o+2684>>2]=0,f[o+2664>>2]=0,f[o+2668>>2]=0,f[o+2648>>2]=0,f[o+2652>>2]=0,f[o+2632>>2]=0,f[o+2636>>2]=0,f[o+2616>>2]=0,f[o+2620>>2]=0,f[o+2608>>2]=2,f[o+2612>>2]=0,i[o+2766|0]=0,A[o+2764>>1]=0,A[o+2762>>1]=Rr,A[o+2760>>1]=1,ze(F,w,88),f[kr+8>>2]=f[E>>2],d=f[o+2980>>2],f[kr>>2]=f[o+2976>>2],f[kr+4>>2]=d,i[o+2877|0]=0,i[o+2878|0]=0,i[o+2876|0]=1&D,f[o+2868>>2]=0,f[o+2872>>2]=0,!(d=f[o+3144>>2]))break C;fi[f[d+16>>2]](Ar,f[o+3148>>2],f[o+3152>>2]);break C}d=f[o+1460>>2],f[y>>2]=f[o+1456>>2],f[y+4>>2]=d,f[y+8>>2]=f[o+1464>>2],f[o+2568>>2]=0,f[o+2552>>2]=0,f[o+2556>>2]=0,f[o+2536>>2]=0,f[o+2540>>2]=0,f[o+2520>>2]=0,f[o+2524>>2]=0,f[o+2504>>2]=0,f[o+2508>>2]=0,f[o+2488>>2]=0,f[o+2492>>2]=0,f[o+2472>>2]=0,f[o+2476>>2]=0,f[o+2456>>2]=0,f[o+2460>>2]=0,f[o+2440>>2]=0,f[o+2444>>2]=0,f[o+2600>>2]=0,f[o+2604>>2]=0,f[o+2592>>2]=0,f[o+2596>>2]=8,i[o+2590|0]=0,A[o+2588>>1]=0,A[o+2586>>1]=Rr,A[o+2584>>1]=1}if((d=5+((15&Er)<<8|O)|0)>>>0<=T>>>0){if(N=d+N|0,(T=T-d|0)>>>0>4)continue;break y}break}xe(d,T,1054356),$f()}xe(w,d,1053076),$f()}xe(2,I,1053076),$f()}xe(1,0,1053076),$f()}xe(d,I,1053076),$f()}le(o+3016|0,f[e+4>>2],f[e+8>>2]),d=a[o+3028>>1],I=f[o+3024>>2],N=f[o+3020>>2];R:{C:{p:{T=f[o+3016>>2],e=d|a[o+3030>>1]<<16;m:if(3==(0|T)){if(d>>>0<13){e=E;break y}if(e=d>>>0>I>>>0)break p;G:{Y:{W:{if((d=d-(e?I:0)|0)>>>0<=I>>>0){if(!(65534&(I=(e=d-4|0)>>>0<=d>>>0?e:0))){e=16;break G}if(e=2,2==(536870911&I))break G;if(e=8,!(I-3&536870911))break G;if(!(536870911&(d=I-4|0)))break G;if(!d)break W;f[o+1712>>2]=0,f[o+1708>>2]=I-5,f[o+1704>>2]=N+5,Xr(o+3016|0,16,o+1704|0),e=f[o+3020>>2],d=f[o+3024>>2],w=f[o+3028>>2],I=a[o+3032>>1];D:{S:{F:switch(f[o+3016>>2]-1|0){default:if(e)break G;N=0,T=0,e=0;break m;case 0:T=1;break S;case 1:break F;case 2:break D}T=2}O=255&I,I=d,N=e,e=65535&O;break m}if((O=d)>>>0<(d=(w>>>3|0)+!!(7&w)|0)>>>0)break Y;if(N=e+d|0,e=O-d|0,!(65535&I)){if(e>>>0<4){e=E;break y}N=N+4|0,e=e-4|0}if(!(536870910&e))break p;A[o+2896>>1]=1,A[o+2898>>1]=n[N+1|0]|(31&n[0|N])<<8,e=E;break y}xe(d,I,1053076),$f()}xe(1,0,1053076),$f()}xe(d,O,1053076),$f()}N=1+(e>>>3|0)|0,T=0,e=0}if(T){f[o+1712>>2]=e,f[o+1708>>2]=I,f[o+1704>>2]=N,f[o+3020>>2]=1,f[o+3016>>2]=1054480,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+2936>>2]=Y,f[o+2940>>2]=4,f[o+3024>>2]=o+2936,Mr(o+1456|0,o+3016|0),I=f[o+1460>>2],T=f[o+1456>>2],N=f[o+1464>>2];break C}}if(!(I=V(25)))break R;i[I+24|0]=n[1054456],d=n[1054452]|n[1054453]<<8|n[1054454]<<16|n[1054455]<<24,w=I+16|0,e=n[1054448]|n[1054449]<<8|n[1054450]<<16|n[1054451]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054444]|n[1054445]<<8|n[1054446]<<16|n[1054447]<<24,w=I+8|0,e=n[1054440]|n[1054441]<<8|n[1054442]<<16|n[1054443]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054436]|n[1054437]<<8|n[1054438]<<16|n[1054439]<<24,e=n[1054432]|n[1054433]<<8|n[1054434]<<16|n[1054435]<<24,i[0|I]=e,i[I+1|0]=e>>>8,i[I+2|0]=e>>>16,i[I+3|0]=e>>>24,i[I+4|0]=d,i[I+5|0]=d>>>8,i[I+6|0]=d>>>16,i[I+7|0]=d>>>24,T=25,N=25}e=E;break B}break A}if(3==(0|N))break y;I=f[o+3028>>2],O=f[o+3032>>2];break I}T=1+(T>>>3|0)|0,N=0,O=0}if(N)break E;E=e}if(!(I=V(25)))break w;i[I+24|0]=n[1054456],d=n[1054452]|n[1054453]<<8|n[1054454]<<16|n[1054455]<<24,w=I+16|0,e=n[1054448]|n[1054449]<<8|n[1054450]<<16|n[1054451]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054444]|n[1054445]<<8|n[1054446]<<16|n[1054447]<<24,w=I+8|0,e=n[1054440]|n[1054441]<<8|n[1054442]<<16|n[1054443]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054436]|n[1054437]<<8|n[1054438]<<16|n[1054439]<<24,e=n[1054432]|n[1054433]<<8|n[1054434]<<16|n[1054435]<<24,i[0|I]=e,i[I+1|0]=e>>>8,i[I+2|0]=e>>>16,i[I+3|0]=e>>>24,i[I+4|0]=d,i[I+5|0]=d>>>8,i[I+6|0]=d>>>16,i[I+7|0]=d>>>24,N=25,e=E,T=25;break B}f[o+1712>>2]=O,f[o+1708>>2]=I,f[o+1704>>2]=T,f[o+3020>>2]=1,f[o+3016>>2]=1054480,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+2936>>2]=Y,f[o+2940>>2]=4,f[o+3024>>2]=o+2936,Mr(o+1456|0,o+3016|0),N=f[o+1464>>2],I=f[o+1460>>2],T=f[o+1456>>2]}if(-2147483648!=(0|T))break g}if(d=(0|B)==(0|q))break d;if(I=B+(d?0:20)|0,E=e,e=B)continue;break d}break}f[o+744>>2]=T,f[o+748>>2]=I,f[o+752>>2]=N;break b}break A}}B=p,e=(d=f[o+2608>>2])-2|0;d:{w:{g:{y:{if(f[o+2612>>2]==(d>>>0<2|0)&e>>>0<=1){if(1==(0|e))break y;B=g}if(!a[B+144>>1]){if(!a[R+4>>1])break g;A[B+144>>1]=1,A[B+146>>1]=a[R+6>>1]}}if(!f[o+2188>>2]&2==f[o+2184>>2])break d;if(!a[o+2328>>1])break w;break d}if(!(g=V(63)))break A;d=n[1054191]|n[1054192]<<8|n[1054193]<<16|n[1054194]<<24,w=g+55|0,e=n[1054187]|n[1054188]<<8|n[1054189]<<16|n[1054190]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054184]|n[1054185]<<8|n[1054186]<<16|n[1054187]<<24,w=g+48|0,e=n[1054180]|n[1054181]<<8|n[1054182]<<16|n[1054183]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054176]|n[1054177]<<8|n[1054178]<<16|n[1054179]<<24,w=g+40|0,e=n[1054172]|n[1054173]<<8|n[1054174]<<16|n[1054175]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054168]|n[1054169]<<8|n[1054170]<<16|n[1054171]<<24,w=g+32|0,e=n[1054164]|n[1054165]<<8|n[1054166]<<16|n[1054167]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054160]|n[1054161]<<8|n[1054162]<<16|n[1054163]<<24,w=g+24|0,e=n[1054156]|n[1054157]<<8|n[1054158]<<16|n[1054159]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054152]|n[1054153]<<8|n[1054154]<<16|n[1054155]<<24,w=g+16|0,e=n[1054148]|n[1054149]<<8|n[1054150]<<16|n[1054151]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054144]|n[1054145]<<8|n[1054146]<<16|n[1054147]<<24,w=g+8|0,e=n[1054140]|n[1054141]<<8|n[1054142]<<16|n[1054143]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054136]|n[1054137]<<8|n[1054138]<<16|n[1054139]<<24,e=n[1054132]|n[1054133]<<8|n[1054134]<<16|n[1054135]<<24,i[0|g]=e,i[g+1|0]=e>>>8,i[g+2|0]=e>>>16,i[g+3|0]=e>>>24,i[g+4|0]=d,i[g+5|0]=d>>>8,i[g+6|0]=d>>>16,i[g+7|0]=d>>>24,f[o+752>>2]=63,f[o+748>>2]=g,f[o+744>>2]=63;break b}if(!a[R>>1]){if(!(g=V(63)))break A;f[(e=o+744|0)+8>>2]=63,f[e+4>>2]=g,f[e>>2]=63,d=n[1054254]|n[1054255]<<8|n[1054256]<<16|n[1054257]<<24,w=g+55|0,e=n[1054250]|n[1054251]<<8|n[1054252]<<16|n[1054253]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054247]|n[1054248]<<8|n[1054249]<<16|n[1054250]<<24,w=g+48|0,e=n[1054243]|n[1054244]<<8|n[1054245]<<16|n[1054246]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054239]|n[1054240]<<8|n[1054241]<<16|n[1054242]<<24,w=g+40|0,e=n[1054235]|n[1054236]<<8|n[1054237]<<16|n[1054238]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054231]|n[1054232]<<8|n[1054233]<<16|n[1054234]<<24,w=g+32|0,e=n[1054227]|n[1054228]<<8|n[1054229]<<16|n[1054230]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054223]|n[1054224]<<8|n[1054225]<<16|n[1054226]<<24,w=g+24|0,e=n[1054219]|n[1054220]<<8|n[1054221]<<16|n[1054222]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054215]|n[1054216]<<8|n[1054217]<<16|n[1054218]<<24,w=g+16|0,e=n[1054211]|n[1054212]<<8|n[1054213]<<16|n[1054214]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054207]|n[1054208]<<8|n[1054209]<<16|n[1054210]<<24,w=g+8|0,e=n[1054203]|n[1054204]<<8|n[1054205]<<16|n[1054206]<<24,i[0|w]=e,i[w+1|0]=e>>>8,i[w+2|0]=e>>>16,i[w+3|0]=e>>>24,i[w+4|0]=d,i[w+5|0]=d>>>8,i[w+6|0]=d>>>16,i[w+7|0]=d>>>24,d=n[1054199]|n[1054200]<<8|n[1054201]<<16|n[1054202]<<24,e=n[1054195]|n[1054196]<<8|n[1054197]<<16|n[1054198]<<24,i[0|g]=e,i[g+1|0]=e>>>8,i[g+2|0]=e>>>16,i[g+3|0]=e>>>24,i[g+4|0]=d,i[g+5|0]=d>>>8,i[g+6|0]=d>>>16,i[g+7|0]=d>>>24;break b}A[o+2328>>1]=1,A[o+2330>>1]=a[R+2>>1]}e=f[o+2916>>2],B=f[o+2912>>2],f[o+2928>>2]=f[o+2908>>2],f[o+2924>>2]=B,f[o+2920>>2]=B,E=k(e,20)+B|0,f[o+2932>>2]=E;d:{w:{if(e){for(q=o+2440|0,m=o+3004|0,I=o+3e3|0,y=o+3008|0,rr=o+2968|0,er=o+3028|0,Er=o+2408|0,Y=o+3332|0,F=o+2756|0,br=o+2748|0,Nr=o+3316|0,ur=o+3324|0,vr=o+2988|0,Ar=o+2736|0,kr=o+2744|0,W=o+1716|0,D=o+2324|0,J=o+2972|0,T=o+2312|0,Ir=o+1468|0,K=o+2752|0,L=o+2740|0;;){if(e=f[(d=B+8|0)+4>>2],f[(w=Q=o+2944|0)>>2]=f[d>>2],f[w+4>>2]=e,A[(w=o+2952|0)>>1]=a[B+16>>1],e=B+20|0,f[o+2924>>2]=e,d=f[B+4>>2],f[o+2936>>2]=f[B>>2],f[o+2940>>2]=d,2==(0|(_=n[B+18|0]))){E=f[o+2932>>2];break w}E=n[B+19|0],N=o+1472|0,B=a[w>>1],A[N>>1]=B,d=f[Q+4>>2],f[(w=C=o+1464|0)>>2]=f[Q>>2],f[w+4>>2]=d,d=f[o+2940>>2],f[o+1456>>2]=f[o+2936>>2],f[o+1460>>2]=d,i[o+1475|0]=E,i[o+1474|0]=_;g:{y:{B:{E:{_:{if((_=!f[o+2188>>2]&2==f[o+2184>>2])||1!=a[o+2328>>1]||a[o+2330>>1]!=(0|B)){E=p,Q=(d=f[o+2608>>2])-2|0;I:{Q:{if((0|(w=f[o+2612>>2]))==(d>>>0<2|0)&Q>>>0<=1){if(1==(0|Q))break Q;E=g}if(1==a[E+144>>1]&&a[E+146>>1]==(0|B))break I}if(!f[o+2444>>2]&2==f[o+2440>>2]||1!=a[o+2584>>1]||a[o+2586>>1]!=(0|B)){fi[f[f[o+1456>>2]+16>>2]](Ir,f[o+1460>>2],f[o+1464>>2]);break g}}if(f[o+1720>>2]=f[N>>2],B=f[C+4>>2],f[(E=o+1712|0)>>2]=f[C>>2],f[E+4>>2]=B,B=f[o+1460>>2],f[o+1704>>2]=f[o+1456>>2],f[o+1708>>2]=B,_)break _;if(!(1&A[o+2328>>1]))break _;B=a[o+2330>>1]}else f[o+1720>>2]=f[N>>2],d=f[C+4>>2],f[(w=o+1712|0)>>2]=f[C>>2],f[w+4>>2]=d,d=f[o+1460>>2],f[o+1704>>2]=f[o+1456>>2],f[o+1708>>2]=d;if(a[o+1720>>1]==(65535&B)){E=n[o+1722|0],d=f[(w=o+1712|0)+4>>2],f[rr>>2]=f[w>>2],f[rr+4>>2]=d,d=f[o+1708>>2],f[o+2960>>2]=f[o+1704>>2],f[o+2964>>2]=d,d=f[(w=_=T+8|0)+4>>2],f[(B=o+2984|0)>>2]=f[w>>2],f[B+4>>2]=d,d=f[T+4>>2],w=f[T>>2],f[o+2976>>2]=w,f[o+2980>>2]=d,f[o+2312>>2]=0;I:{Q:{N:{R:{C:{p:{if(w)dr(o+3016|0,o+2976|0,o+2960|0),fi[f[f[o+2960>>2]+16>>2]](J,f[o+2964>>2],f[rr>>2]),d=f[(w=o+3024|0)+4>>2],f[rr>>2]=f[w>>2],f[rr+4>>2]=d,d=f[o+3020>>2],f[o+2960>>2]=f[o+3016>>2],f[o+2964>>2]=d;else if(!(1&E))break p;cr(o+3320|0,f[o+2964>>2],f[o+2968>>2],o+2184|0);m:switch(f[o+3320>>2]-1|0){case 0:case 1:break R;case 2:break m;default:break C}B=f[o+3328>>2],w=f[o+3324>>2],(d=f[o+2312>>2])&&fi[f[d+16>>2]](D,f[o+2316>>2],f[o+2320>>2]),f[o+2312>>2]=0,_r(o+3016|0,o+2960|0,w,B),fi[f[f[o+2960>>2]+16>>2]](J,f[o+2964>>2],f[rr>>2]),d=f[(w=o+3024|0)+4>>2],f[rr>>2]=f[w>>2],f[rr+4>>2]=d,d=f[o+3020>>2],f[o+2960>>2]=f[o+3016>>2],f[o+2964>>2]=d}if(!n[o+2333|0])break I;if(E=n[o+2436|0],!(N=f[o+2968>>2]))break Q;for(O=f[o+2964>>2],C=0,B=0;;){B=(d=B)+1|0,_=n[d+O|0];p:{m:{G:{Y:{W:{D:{S:switch((w=255&E)-1|0){case 0:break D;case 1:break W;case 2:break Y;default:break S}if(_)break G;E=1;break p}if(_)break G;E=2;break p}switch(E=3,0|_){case 0:break p;case 1:break m;default:break G}}switch(E=3,0|_){case 0:break p;case 1:break m;default:break G}}E=0;break p}E=0,zr(_=o+3304|0,o+2960|0,C,(d=d>>>0>=(w=d-(2==(0|w)?2:3)|0)>>>0?w:0)>>>0>C>>>0?d:C),sr(o+2184|0,_),C=B}if((0|B)==(0|N))break}break N}if(d=f[rr+4>>2],f[(w=o+3024|0)>>2]=f[rr>>2],f[w+4>>2]=d,d=f[o+2964>>2],f[o+3016>>2]=f[o+2960>>2],f[o+3020>>2]=d,(d=f[o+2312>>2])&&fi[f[d+16>>2]](D,f[o+2316>>2],f[o+2320>>2]),d=f[o+3020>>2],f[T>>2]=f[o+3016>>2],f[T+4>>2]=d,d=f[w+4>>2],f[_>>2]=f[w>>2],f[_+4>>2]=d,!(d=f[o+2976>>2]))break g;fi[f[d+16>>2]](vr,f[o+2980>>2],f[o+2984>>2]);break g}w=f[ur+8>>2],f[I>>2]=w,d=f[ur+4>>2],f[o+2992>>2]=f[ur>>2],f[o+2996>>2]=d,f[o+3312>>2]=0,f[o+3304>>2]=0,f[o+3308>>2]=1;R:{C:{if(57!=(255&w)){if(f[o+3020>>2]=1,f[o+3016>>2]=1054424,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+3008>>2]=I,f[o+3012>>2]=6,f[o+3024>>2]=o+3008,!Qr(o+3304|0,1053472,o+3016|0))break C;break R}if(f[o+3004>>2]=o+2992,f[o+3020>>2]=1,f[o+3016>>2]=1054404,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+3008>>2]=m,f[o+3012>>2]=5,f[o+3024>>2]=o+3008,Qr(o+3304|0,1053472,o+3016|0))break R}d=f[o+3308>>2],w=f[o+3312>>2],B=f[o+3304>>2],(E=f[o+2976>>2])&&fi[f[E+16>>2]](vr,f[o+2980>>2],f[o+2984>>2]),fi[f[f[o+2960>>2]+16>>2]](J,f[o+2964>>2],f[o+2968>>2]);break E}break f}if(!((w=f[o+2968>>2])>>>0<=C>>>0||!f[o+2340>>2]&2==f[o+2336>>2])){if(fi[f[f[o+2960>>2]>>2]](o+3016|0,J,f[o+2964>>2],w),f[(d=o+3024|0)>>2]=w-C,B=f[d+4>>2],d=f[d>>2],f[(w=_=o+3328|0)>>2]=d,f[w+4>>2]=B,f[o+3020>>2]=f[o+3020>>2]+C,w=f[o+3020>>2],f[o+3320>>2]=f[o+3016>>2],f[o+3324>>2]=w,!d){fi[f[f[o+3320>>2]+16>>2]](Y,f[o+3324>>2],0),i[o+2436|0]=E;break I}f[o+2420>>2]=d+f[o+2420>>2],(0|(B=f[o+2416>>2]))==f[o+2408>>2]&&ce(Er,1058736),d=f[o+3324>>2],w=f[o+2412>>2]+(B<<4)|0,f[w>>2]=f[o+3320>>2],f[w+4>>2]=d,d=f[_+4>>2],f[(w=w+8|0)>>2]=f[_>>2],f[w+4>>2]=d,f[o+2416>>2]=B+1}}i[o+2436|0]=E}(d=f[o+2976>>2])&&fi[f[d+16>>2]](vr,f[o+2980>>2],f[o+2984>>2]),fi[f[f[o+2960>>2]+16>>2]](J,f[o+2964>>2],f[o+2968>>2]);break g}d=f[o+2608>>2],w=f[o+2612>>2]}B=p;_:{if((d>>>0<2|0)==(0|w)&(E=d-2|0)>>>0<=1){if(1==(0|E))break _;B=g}if(1==a[B+144>>1]&&a[o+1720>>1]==a[B+146>>1]){Q=n[o+1722|0],B=f[(E=o+1712|0)+4>>2],f[(_=Rr=o+2984|0)>>2]=f[E>>2],f[_+4>>2]=B,B=f[o+1708>>2],f[o+2976>>2]=f[o+1704>>2],f[o+2980>>2]=B,B=f[(E=(C=(Yr=!w&2==(0|d))?kr:Ar)+8|0)+4>>2],f[(_=o+3312|0)>>2]=f[E>>2],f[_+4>>2]=B,E=f[C>>2],B=f[C+4>>2],f[(o+2184|0)+(Yr?560:552)>>2]=0,f[o+3304>>2]=E,f[o+3308>>2]=B;I:{Q:{if(E?(dr(o+3016|0,o+3304|0,o+2976|0),fi[f[f[o+2976>>2]+16>>2]](vr,f[o+2980>>2],f[Rr>>2]),B=f[(E=o+3024|0)+4>>2],f[Rr>>2]=f[E>>2],f[Rr+4>>2]=B,B=f[o+3020>>2],f[o+2976>>2]=f[o+3016>>2],f[o+2980>>2]=B,B=f[o+3304>>2]):B=0,B|1&Q){cr(o+3320|0,f[o+2980>>2],f[o+2984>>2],Yr?g:p);N:switch(f[o+3320>>2]-1|0){case 0:case 1:break I;case 2:break N;default:break Q}B=f[o+3328>>2],w=f[o+3324>>2],E=!f[o+2612>>2]&2==f[o+2608>>2],(N=f[(d=(o+2184|0)+(E?560:552)|0)>>2])&&fi[f[N+16>>2]](E?F:br,f[(E?br:L)>>2],f[(E?K:kr)>>2]),f[d>>2]=0,_r(o+3016|0,o+2976|0,w,B),fi[f[f[o+2976>>2]+16>>2]](vr,f[o+2980>>2],f[Rr>>2]),d=f[(w=o+3024|0)+4>>2],f[Rr>>2]=f[w>>2],f[Rr+4>>2]=d,d=f[o+3020>>2],f[o+2976>>2]=f[o+3016>>2],f[o+2980>>2]=d,d=f[o+2608>>2],w=f[o+2612>>2]}N:if(2!=(0|d)|w){if(!n[o+2757|0])break N;x(o+2976|0,p)}else 1==n[o+2765|0]&&P(o+2976|0,g);(d=f[o+3304>>2])&&fi[f[d+16>>2]](Nr,f[o+3308>>2],f[o+3312>>2]),fi[f[f[o+2976>>2]+16>>2]](vr,f[o+2980>>2],f[o+2984>>2]);break g}if(d=f[Rr+4>>2],f[(w=B=o+3024|0)>>2]=f[Rr>>2],f[w+4>>2]=d,d=f[o+2980>>2],f[o+3016>>2]=f[o+2976>>2],f[o+3020>>2]=d,2!=f[o+2608>>2]|f[o+2612>>2]){if((d=f[o+2736>>2])&&fi[f[d+16>>2]](br,f[o+2740>>2],f[o+2744>>2]),d=f[o+3020>>2],f[Ar>>2]=f[o+3016>>2],f[Ar+4>>2]=d,d=f[B+4>>2],f[(w=Ar+8|0)>>2]=f[B>>2],f[w+4>>2]=d,!(d=f[o+3304>>2]))break g;fi[f[d+16>>2]](Nr,f[o+3308>>2],f[o+3312>>2]);break g}if((d=f[o+2744>>2])&&fi[f[d+16>>2]](F,f[o+2748>>2],f[o+2752>>2]),d=f[o+3020>>2],f[kr>>2]=f[o+3016>>2],f[kr+4>>2]=d,d=f[B+4>>2],f[(w=kr+8|0)>>2]=f[B>>2],f[w+4>>2]=d,!(d=f[o+3304>>2]))break g;fi[f[d+16>>2]](Nr,f[o+3308>>2],f[o+3312>>2]);break g}w=f[ur+8>>2],f[I>>2]=w,d=f[ur+4>>2],f[o+2992>>2]=f[ur>>2],f[o+2996>>2]=d,f[o+2968>>2]=0,f[o+2960>>2]=0,f[o+2964>>2]=1;I:{if(57!=(255&w)){if(f[o+3020>>2]=1,f[o+3016>>2]=1054424,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+3008>>2]=I,f[o+3012>>2]=6,f[o+3024>>2]=o+3008,!Qr(o+2960|0,1053472,o+3016|0))break I;break f}if(f[o+3004>>2]=o+2992,f[o+3020>>2]=1,f[o+3016>>2]=1054404,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+3008>>2]=m,f[o+3012>>2]=5,f[o+3024>>2]=o+3008,Qr(o+2960|0,1053472,o+3016|0))break f}d=f[o+2964>>2],w=f[o+2968>>2],B=f[o+2960>>2],(E=f[o+3304>>2])&&fi[f[E+16>>2]](Nr,f[o+3308>>2],f[o+3312>>2]),fi[f[f[o+2976>>2]+16>>2]](vr,f[o+2980>>2],f[o+2984>>2]);break E}}if(!f[o+2444>>2]&2==f[o+2440>>2])break y;if(!a[o+2584>>1])break y;if(a[o+1720>>1]!=a[o+2586>>1])break y;if(Q=n[o+1722|0],B=f[(E=o+1712|0)+4>>2],f[(_=o+3312|0)>>2]=f[E>>2],f[_+4>>2]=B,B=f[o+1708>>2],f[o+3304>>2]=f[o+1704>>2],f[o+3308>>2]=B,!(1&Q))break B;cr(o+3320|0,f[o+3308>>2],f[o+3312>>2],q),B=-2147483648;_:switch(f[o+3320>>2]-1|0){case 2:if(_r(o+3016|0,B=o+3304|0,f[o+3324>>2],f[o+3328>>2]),fi[f[f[o+3304>>2]+16>>2]](Nr,f[o+3308>>2],f[_>>2]),d=f[(w=o+3024|0)+4>>2],f[_>>2]=f[w>>2],f[_+4>>2]=d,d=f[o+3020>>2],f[o+3304>>2]=f[o+3016>>2],f[o+3308>>2]=d,1==f[o+2440>>2]){z(B,f[o+2448>>2],f[o+2452>>2],q);break B}Ve(1054372),$f();case 0:case 1:w=f[ur+8>>2],f[rr>>2]=w,d=f[ur+4>>2],f[o+2960>>2]=f[ur>>2],f[o+2964>>2]=d,f[o+2984>>2]=0,f[o+2976>>2]=0,f[o+2980>>2]=1;I:{if(57!=(255&w)){if(f[o+3020>>2]=1,f[o+3016>>2]=1054424,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+2992>>2]=rr,f[o+2996>>2]=6,f[o+3024>>2]=o+2992,!Qr(o+2976|0,1053472,o+3016|0))break I;break f}if(f[o+3008>>2]=o+2960,f[o+3020>>2]=1,f[o+3016>>2]=1054404,f[o+3028>>2]=1,f[o+3032>>2]=0,f[o+2992>>2]=y,f[o+2996>>2]=5,f[o+3024>>2]=o+2992,Qr(o+2976|0,1053472,o+3016|0))break f}d=f[o+2980>>2],w=f[o+2984>>2],B=f[o+2976>>2];break;default:break _}fi[f[f[o+3304>>2]+16>>2]](Nr,f[o+3308>>2],f[o+3312>>2])}if(-2147483648==(0|B))break g;if(f[o+748>>2]=d,f[o+752>>2]=w,f[o+744>>2]=B,B=0,g=((d=(w=f[(E=o+2920|0)+12>>2])-(e=f[E+4>>2])|0)>>>0)/20|0,(0|e)!=(0|w)){if(d-20>>>0>=20)for(d=268435454&g,y=e;fi[f[f[y>>2]+16>>2]](y+12|0,f[y+4>>2],f[y+8>>2]),fi[f[f[y+20>>2]+16>>2]](y+32|0,f[y+24>>2],f[y+28>>2]),y=y+40|0,(0|d)!=(0|(B=B+2|0)););1&g&&(e=e+k(B,20)|0,fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]))}if(g=f[E+8>>2]){if(w=f[E>>2],(B=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(g,20))>>>0)break e;if(B>>>0>e+39>>>0&&d)break r;nr(w)}break t}if(n[o+2589|0]&&(_=f[o+2604>>2])&&(B=f[o+2600>>2])){w=f[o+2596>>2],qr(o+3016|0,o+3304|0,E=(d=f[o+3312>>2])>>>0<_>>>0?d:_);B:{E:{_:{I:switch(B=w+k(B,72)|0,f[B-72>>2]-1|0){case 0:break _;case 1:break E;default:break I}if(!(w=f[o+3024>>2])){fi[f[f[o+3016>>2]+16>>2]](er,f[o+3020>>2],0);break B}f[(d=B-4|0)>>2]=w+f[d>>2],(0|(w=f[(d=B-8|0)>>2]))==f[(N=B-16|0)>>2]&&ce(N,1058736),f[d>>2]=w+1,d=f[o+3020>>2],w=f[B-12>>2]+(w<<4)|0,f[w>>2]=f[o+3016>>2],f[w+4>>2]=d,B=w+8|0,d=f[(w=o+3024|0)+4>>2],f[B>>2]=f[w>>2],f[B+4>>2]=d;break B}if(!(w=f[o+3024>>2])){fi[f[f[o+3016>>2]+16>>2]](er,f[o+3020>>2],0);break B}f[(d=B-4|0)>>2]=w+f[d>>2],(0|(w=f[(d=B-8|0)>>2]))==f[(N=B-16|0)>>2]&&ce(N,1058736),f[d>>2]=w+1,d=f[o+3020>>2],w=f[B-12>>2]+(w<<4)|0,f[w>>2]=f[o+3016>>2],f[w+4>>2]=d,B=w+8|0,d=f[(w=o+3024|0)+4>>2],f[B>>2]=f[w>>2],f[B+4>>2]=d;break B}(w=f[o+3024>>2])?(f[(d=B-12|0)>>2]=w+f[d>>2],(0|(w=f[(d=B-16|0)>>2]))==f[(N=B-24|0)>>2]&&ce(N,1058736),f[d>>2]=w+1,d=f[o+3020>>2],w=f[B-20>>2]+(w<<4)|0,f[w>>2]=f[o+3016>>2],f[w+4>>2]=d,B=w+8|0,d=f[(w=o+3024|0)+4>>2],f[B>>2]=f[w>>2],f[B+4>>2]=d):fi[f[f[o+3016>>2]+16>>2]](er,f[o+3020>>2],0)}f[o+2604>>2]=_-E}fi[f[f[o+3304>>2]+16>>2]](Nr,f[o+3308>>2],f[o+3312>>2]);break g}fi[f[f[o+1704>>2]+16>>2]](W,f[o+1708>>2],f[o+1712>>2])}if(B=e,(0|e)==f[o+2932>>2])break}break d}e=B}if((0|e)!=(0|E)){if(w=1&(d=((g=E-e|0)>>>0)/20|0),E=0,g-20>>>0>=20)for(d&=268435454,B=e;fi[f[f[B>>2]+16>>2]](B+12|0,f[B+4>>2],f[B+8>>2]),fi[f[f[B+20>>2]+16>>2]](B+32|0,f[B+24>>2],f[B+28>>2]),B=B+40|0,(0|d)!=(0|(E=E+2|0)););w&&(e=k(E,20)+e|0,fi[f[f[e>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2]))}}if(g=f[o+2928>>2]){if(w=f[o+2920>>2],(B=-8&(e=f[w-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(g,20))>>>0)break e;if(B>>>0>e+39>>>0&&d)break r;nr(w)}2!=f[o+2184>>2]|f[o+2188>>2]&&(f[o+3028>>2]=0,f[o+3020>>2]=1,f[o+3024>>2]=0,f[o+3016>>2]=1055092,sr(o+2184|0,o+3016|0)),e=(d=f[o+2608>>2])-2|0;d:{w:{if(f[o+2612>>2]==(d>>>0<2|0)&e>>>0<=1){if(e-1|0)break w;break d}if(e=f[o+2760>>2],g=f[o+2764>>2],f[o+2760>>2]=2,f[o+2764>>2]=0,!g&2==(0|e))break d;ze(o+3016|0,o+2768|0,96),(0|(w=f[o+2872>>2]))==f[o+2864>>2]&&be(o+2864|0,1058088),d=f[o+2868>>2]+k(w,104)|0,f[d>>2]=e,f[d+4>>2]=g,ze(d+8|0,o+3016|0,96),f[o+2872>>2]=w+1;break d}e=f[o+2768>>2],g=f[o+2772>>2],f[o+2768>>2]=2,f[o+2772>>2]=0,!g&2==(0|e)||(ze(o+3016|0,o+2776|0,80),(0|(w=f[o+2864>>2]))==f[o+2856>>2]&&te(o+2856|0,1056284),d=f[o+2860>>2]+k(w,88)|0,f[d>>2]=e,f[d+4>>2]=g,ze(d+8|0,o+3016|0,80),f[o+2864>>2]=w+1)}if(ze(o+736|0,o+2184|0,720),w=e=f[o+740>>2],!e&3==(0|(d=f[o+736>>2])))break a;f[(g=o+728|0)>>2]=f[o+752>>2],e=f[o+748>>2],f[o+720>>2]=f[o+744>>2],f[o+724>>2]=e,ze(o+20|0,o+756|0,700),f[o+16>>2]=f[g>>2],f[o>>2]=d,f[o+4>>2]=w,e=f[o+724>>2],f[o+8>>2]=f[o+720>>2],f[o+12>>2]=e,m=o+424|0,e=(g=f[o+424>>2])-2|0;d:{if(f[o+428>>2]==(g>>>0<2|0)&e>>>0<=1){if(1==(0|e))break d;Or=Gr}f[Or>>2]||(Br(m),f[o+424>>2]=3,f[o+428>>2]=0,d=f[o>>2],w=f[o+4>>2])}if(p=2,K=0,!(!w&2==(0|d)||(p=d,K=w,f[o+248>>2]))){if((e=f[o+128>>2])?(fi[f[e+16>>2]](o+140|0,f[o+132>>2],f[o+136>>2]),e=f[o+248>>2]):e=0,xr(f[o+244>>2],e),_e(f[o+240>>2],f[o+244>>2]),p=2,K=0,2!=f[o+152>>2]|f[o+156>>2]){if(L=f[o+228>>2],d=f[o+232>>2]){e=0;d:{if(1!=(0|d)){for(w=1&d,d&=-2,B=L;fi[f[f[B>>2]+16>>2]](B+12|0,f[B+4>>2],f[B+8>>2]),fi[f[f[B+16>>2]+16>>2]](B+28|0,f[B+20>>2],f[B+24>>2]),B=B+32|0,(0|d)!=(0|(e=e+2|0)););if(!w)break d}fi[f[f[(e=(e<<4)+L|0)>>2]+16>>2]](e+12|0,f[e+4>>2],f[e+8>>2])}L=f[o+228>>2]}Ie(f[o+224>>2],L)}f[o>>2]=2,f[o+4>>2]=0}Yr=o+256|0;d:{w:{g:{y:{B:{E:{_:{I:{Q:{if(2!=f[o+256>>2]|f[o+260>>2]){if(f[o+416>>2]){E=!K&2==(0|p),g=f[o+424>>2],Q=f[o+428>>2],L=Yr;break Q}if((e=f[o+384>>2])?(fi[f[e+16>>2]](o+396|0,f[o+388>>2],f[o+392>>2]),e=f[o+416>>2]):e=0,gr(f[o+412>>2],e),B=f[o+412>>2],w=f[o+408>>2]){if((g=-8&(e=f[B-4>>2]))>>>0<((d=3&e)?4:8)+(e=k(w,72))>>>0)break e;if(g>>>0>e+39>>>0&&d)break r;nr(B)}f[o+256>>2]=2,f[o+260>>2]=0,K=f[o+4>>2],p=f[o>>2]}if(E=!K&2==(0|p),L=0,Q=e=f[o+428>>2],!(3!=(0|(g=f[o+424>>2]))|e|2!=(0|p)|K)){A[v+252>>1]=0,f[v+240>>2]=-2147483648,f[v+232>>2]=0,f[v+236>>2]=0,f[v+104>>2]=2,f[v+108>>2]=0,f[v>>2]=2,f[v+4>>2]=0,L=1,T=1,d=0;break I}}if(!(ie=a[o+712>>1])){if(!a[R+8>>1]){if(e=V(68)){e=ze(e,1054048,68),f[v+16>>2]=68,f[v+12>>2]=e,f[v+8>>2]=68,f[v>>2]=3,f[v+4>>2]=0,L=1,T=1,d=0;break I}break A}ie=1,A[o+712>>1]=1,A[o+714>>1]=a[R+10>>1]}e=0,f[o+2248>>2]=0,f[o+2240>>2]=0,f[o+2236>>2]=L,d=m,!(w=Q-(g>>>0<2)|0)&(B=g-2|0)>>>0>1|w||(d=0,1!=(0|B)&&(d=o+432|0)),f[o+2228>>2]=d,f[o+2224>>2]=3,f[o+2216>>2]=1,f[o+2200>>2]=2,f[o+2204>>2]=0,f[o+2184>>2]=2,f[o+2188>>2]=0,f[o+2232>>2]=E?0:o,d=o+2228|0,y=o+2220|0;Q:{N:{for(;;){B=d+(e<<2)|0,e=e+1|0;R:{for(;;){if(w=f[B>>2])break R;if(B=B+4|0,4==(0|(e=e+1|0)))break}d=0,w=0;break Q}if(1==f[w+48>>2])break N;if(3==(0|e))break}d=0,w=0;break Q}if(f[o+2220>>2]=e,d=f[(e=w+56|0)>>2],w=f[e+4>>2],f[o+772>>2]=f[y+32>>2],e=f[(B=y+24|0)+4>>2],f[(E=o+764|0)>>2]=f[B>>2],f[E+4>>2]=e,e=f[(B=y+16|0)+4>>2],f[(E=o+756|0)>>2]=f[B>>2],f[E+4>>2]=e,e=f[(B=y+8|0)+4>>2],f[(E=o+748|0)>>2]=f[B>>2],f[E+4>>2]=e,f[o+736>>2]=1,e=f[y+4>>2],f[o+740>>2]=f[y>>2],f[o+744>>2]=e,I=S-32|0,1&f[(y=o+736|0)>>2]&&(f[I+24>>2]=f[y+20>>2],e=f[(B=y+12|0)+4>>2],f[(E=I+16|0)>>2]=f[B>>2],f[E+4>>2]=e,e=f[y+8>>2],B=f[y+4>>2],f[I+8>>2]=B,f[I+12>>2]=e,(0|(K=f[I+12>>2]))!=(0|B)))for(e=16+(I+(B<<2)|0)|0;(E=f[e>>2])&&1==f[E+48>>2]&&(p=f[(E=E+56|0)>>2],y=d,I=f[E+4>>2],E=w,L=(w=I-(w+(d>>>0>p>>>0)|0)|0)-2|0,d=(0|w)<-1,d=(w=(0|((0|w)>0?L:d?w+2:w))<0)?p:y,w=w?I:E),e=e+4|0,(0|K)!=(0|(B=B+1|0)););}Ar=d,br=w,Oe=a[o+714>>1],L=1,K=e=Q-(g>>>0<2)|0;Q:{N:{R:{C:{p:{m:{G:{Y:{W:{D:{if(!e&(p=g-2|0)>>>0<=1){if(me=2,ke=1,T=1,p-1|0)break D;break Q}if(e=f[(d=m+8|0)+4>>2],f[(w=Gr=o+3024|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=m+16|0)+4>>2],f[(w=D=o+3032|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=m+24|0)+4>>2],f[(w=Er=o+3040|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=m+32|0)+4>>2],f[(w=C=o+3048|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=m+40|0)+4>>2],f[(w=O=o+3056|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=m+48|0)+4>>2],f[(w=Y=o+3064|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=m+56|0)+4>>2],f[(w=W=o+3072|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[m+4>>2],f[o+3016>>2]=f[m>>2],f[o+3020>>2]=e,ze(o+736|0,o+552|0,132),e=f[(d=o+700|0)+4>>2],f[(w=rr=o+1712|0)>>2]=f[d>>2],f[w+4>>2]=e,f[(K=o+1720|0)>>2]=f[o+708>>2],e=f[o+696>>2],f[o+1704>>2]=f[o+692>>2],f[o+1708>>2]=e,Or=f[o+684>>2],F=f[o+688>>2])break W;g=-1,Q=2147483647,d=1,w=-2147483648,y=1,_=-2147483648,E=-1,m=2147483647;break Y}if(e=f[(d=o+440|0)+4>>2],f[(w=Er=o+3024|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+448|0)+4>>2],f[(w=C=o+3032|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+456|0)+4>>2],f[(w=O=o+3040|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+464|0)+4>>2],f[(w=Y=o+3048|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+472|0)+4>>2],f[(w=W=o+3056|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+480|0)+4>>2],f[(w=rr=o+3064|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[(d=o+488|0)+4>>2],f[(w=K=o+3072|0)>>2]=f[d>>2],f[w+4>>2]=e,e=f[o+436>>2],f[o+3016>>2]=f[o+432>>2],f[o+3020>>2]=e,ze(o+736|0,o+560|0,116),f[(L=o+1712|0)>>2]=f[o+692>>2],e=f[o+688>>2],f[o+1704>>2]=f[o+684>>2],f[o+1708>>2]=e,Gr=f[o+676>>2],D=f[o+680>>2]){for(I=k(D,88),e=0;;){if(!f[(d=e+Gr|0)+16>>2])break G;if(f[d>>2]=1,f[d+4>>2]=0,p=d+8|0,d=(g=f[(w=d+24|0)>>2])-Ar|0,y=(w=f[w+4>>2]-((g>>>0>>0)+br|0)|0)-2|0,g=(g=(0|w)<-1)?w+2|0:w,w=br+((w=(0|w)>0)?y:g)|0,w=(d=d+Ar|0)>>>0>>0?w+1|0:w,f[p>>2]=d,f[p+4>>2]=w,(0|I)==(0|(e=e+88|0)))break}for(e=k(D,88),B=Gr+56|0,y=1,_=-2147483648,E=-1,m=2147483647,g=-1,Q=2147483647,d=1,w=-2147483648;;){if(1!=f[B-8>>2])break m;if(!f[B-24>>2])break p;if(p=f[(I=B-16|0)>>2],d=(N=(0|(I=f[I+4>>2]))<(0|w)?1:d>>>0>p>>>0&(0|w)>=(0|I))?d:p,w=N?w:I,N=p,g=(p=g>>>0